diff --git a/.prettierignore b/.prettierignore index bc0a76412b05..644973bb5ce6 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,3 +4,4 @@ CHANGELOG.md **/*.hbs **/*/report.md clients/*/src/endpoint/ruleset.ts +**/*.java \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 323f8bd323d8..8968e2ea8d46 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,9 @@ { "editor.tabSize": 2, + "[java]": { + "editor.tabSize": 4 + }, + "java.format.enabled": false, "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.rulers": [80, 120], diff --git a/Makefile b/Makefile index c25cafa99c07..eb094a60c8b0 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,17 @@ turbo-build: npx turbo run build --api="http://localhost:3000" --team="aws-sdk-js" --token="xyz" node scripts/remote-cache/ stop -# Runs single-client codegen for all clients using Turborepo -turbo-generate-clients: - (cd scripts/remote-cache && yarn) +protocols: + yarn generate-clients -g codegen/sdk-codegen/aws-models/rekognitionstreaming.json + git checkout HEAD clients/client-rekognitionstreaming + yarn test:protocols + +server-protocols: + yarn generate-clients -s + yarn test:server-protocols + +bytes-cjs: + make turbo-build node scripts/remote-cache/ start& - sleep 3 - npx turbo run generate:client --filter=@aws-sdk/client-* --api="http://localhost:3000" --team="aws-sdk-js" --token="xyz" - node scripts/remote-cache/ stop - \ No newline at end of file + npx turbo run build:cjs --api="http://localhost:3000" --team="aws-sdk-js" --token="xyz" + node scripts/remote-cache/ stop \ No newline at end of file diff --git a/clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts b/clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts index 95414d3b2217..69bf883a7a7c 100644 --- a/clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts +++ b/clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -79,11 +79,9 @@ import { AccessDeniedException, AccessPreview, AccessPreviewFinding, - AccessPreviewStatusReason, AccessPreviewSummary, AclGrantee, AnalyzedResource, - AnalyzedResourceSummary, AnalyzerSummary, ArchiveRuleSummary, CloudTrailDetails, @@ -95,10 +93,7 @@ import { EcrRepositoryConfiguration, EfsFileSystemConfiguration, Finding, - FindingSource, - FindingSourceDetail, FindingSummary, - GeneratedPolicy, GeneratedPolicyProperties, GeneratedPolicyResult, IamRoleConfiguration, @@ -106,17 +101,13 @@ import { InternalServerException, InternetConfiguration, JobDetails, - JobError, KmsGrantConfiguration, KmsGrantConstraints, KmsGrantOperation, KmsKeyConfiguration, - Location, NetworkOriginConfiguration, - PathElement, PolicyGeneration, PolicyGenerationDetails, - Position, RdsDbClusterSnapshotAttributeValue, RdsDbClusterSnapshotConfiguration, RdsDbSnapshotAttributeValue, @@ -130,16 +121,10 @@ import { ServiceQuotaExceededException, SnsTopicConfiguration, SortCriteria, - Span, SqsQueueConfiguration, - StatusReason, - Substring, ThrottlingException, Trail, - TrailProperties, - ValidatePolicyFinding, ValidationException, - ValidationExceptionField, VpcConfiguration, } from "../models/models_0"; @@ -156,11 +141,13 @@ export const se_ApplyArchiveRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/archive-rule"; let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.ruleName != null && { ruleName: input.ruleName }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + ruleName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -209,11 +196,13 @@ export const se_CreateAccessPreviewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/access-preview"; let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.configurations != null && { configurations: se_ConfigurationsMap(input.configurations, context) }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + configurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -238,13 +227,15 @@ export const se_CreateAnalyzerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzer"; let body: any; - body = JSON.stringify({ - ...(input.analyzerName != null && { analyzerName: input.analyzerName }), - ...(input.archiveRules != null && { archiveRules: se_InlineArchiveRulesList(input.archiveRules, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + analyzerName: [], + archiveRules: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -278,11 +269,13 @@ export const se_CreateArchiveRuleCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }), - ...(input.ruleName != null && { ruleName: input.ruleName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + filter: (_) => _json(_), + ruleName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -574,12 +567,14 @@ export const se_ListAccessPreviewFindingsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + filter: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -632,12 +627,14 @@ export const se_ListAnalyzedResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analyzed-resource"; let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + maxResults: [], + nextToken: [], + resourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -726,13 +723,15 @@ export const se_ListFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/finding"; let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sort != null && { sort: se_SortCriteria(input.sort, context) }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + filter: (_) => _json(_), + maxResults: [], + nextToken: [], + sort: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -808,15 +807,13 @@ export const se_StartPolicyGenerationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/generation"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.cloudTrailDetails != null && { - cloudTrailDetails: se_CloudTrailDetails(input.cloudTrailDetails, context), - }), - ...(input.policyGenerationDetails != null && { - policyGenerationDetails: se_PolicyGenerationDetails(input.policyGenerationDetails, context), - }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + cloudTrailDetails: (_) => se_CloudTrailDetails(_, context), + policyGenerationDetails: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -841,11 +838,13 @@ export const se_StartResourceScanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource/scan"; let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.resourceOwnerAccount != null && { resourceOwnerAccount: input.resourceOwnerAccount }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + resourceArn: [], + resourceOwnerAccount: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -871,9 +870,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -939,10 +940,12 @@ export const se_UpdateArchiveRuleCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "ruleName", () => input.ruleName!, "{ruleName}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + filter: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -967,13 +970,15 @@ export const se_UpdateFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/finding"; let body: any; - body = JSON.stringify({ - ...(input.analyzerArn != null && { analyzerArn: input.analyzerArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.ids != null && { ids: se_FindingIdList(input.ids, context) }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + analyzerArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + ids: (_) => _json(_), + resourceArn: [], + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1002,12 +1007,14 @@ export const se_ValidatePolicyCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.locale != null && { locale: input.locale }), - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - ...(input.policyType != null && { policyType: input.policyType }), - ...(input.validatePolicyResourceType != null && { validatePolicyResourceType: input.validatePolicyResourceType }), - }); + body = JSON.stringify( + take(input, { + locale: [], + policyDocument: [], + policyType: [], + validatePolicyResourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1067,10 +1074,9 @@ const de_ApplyArchiveRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1120,10 +1126,9 @@ const de_CancelPolicyGenerationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1143,9 +1148,10 @@ export const de_CreateAccessPreviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1185,10 +1191,9 @@ const de_CreateAccessPreviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1208,9 +1213,10 @@ export const de_CreateAnalyzerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1247,10 +1253,9 @@ const de_CreateAnalyzerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1309,10 +1314,9 @@ const de_CreateArchiveRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1365,10 +1369,9 @@ const de_DeleteAnalyzerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1421,10 +1424,9 @@ const de_DeleteArchiveRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1444,9 +1446,10 @@ export const de_GetAccessPreviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessPreview != null) { - contents.accessPreview = de_AccessPreview(data.accessPreview, context); - } + const doc = take(data, { + accessPreview: (_) => de_AccessPreview(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1480,10 +1483,9 @@ const de_GetAccessPreviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1503,9 +1505,10 @@ export const de_GetAnalyzedResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resource != null) { - contents.resource = de_AnalyzedResource(data.resource, context); - } + const doc = take(data, { + resource: (_) => de_AnalyzedResource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1539,10 +1542,9 @@ const de_GetAnalyzedResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1562,9 +1564,10 @@ export const de_GetAnalyzerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analyzer != null) { - contents.analyzer = de_AnalyzerSummary(data.analyzer, context); - } + const doc = take(data, { + analyzer: (_) => de_AnalyzerSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1598,10 +1601,9 @@ const de_GetAnalyzerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1621,9 +1623,10 @@ export const de_GetArchiveRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.archiveRule != null) { - contents.archiveRule = de_ArchiveRuleSummary(data.archiveRule, context); - } + const doc = take(data, { + archiveRule: (_) => de_ArchiveRuleSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1657,10 +1660,9 @@ const de_GetArchiveRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1680,9 +1682,10 @@ export const de_GetFindingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.finding != null) { - contents.finding = de_Finding(data.finding, context); - } + const doc = take(data, { + finding: (_) => de_Finding(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1716,10 +1719,9 @@ const de_GetFindingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1739,12 +1741,11 @@ export const de_GetGeneratedPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.generatedPolicyResult != null) { - contents.generatedPolicyResult = de_GeneratedPolicyResult(data.generatedPolicyResult, context); - } - if (data.jobDetails != null) { - contents.jobDetails = de_JobDetails(data.jobDetails, context); - } + const doc = take(data, { + generatedPolicyResult: (_) => de_GeneratedPolicyResult(_, context), + jobDetails: (_) => de_JobDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1775,10 +1776,9 @@ const de_GetGeneratedPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1798,12 +1798,11 @@ export const de_ListAccessPreviewFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de_AccessPreviewFindingsList(data.findings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findings: (_) => de_AccessPreviewFindingsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1840,10 +1839,9 @@ const de_ListAccessPreviewFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1863,12 +1861,11 @@ export const de_ListAccessPreviewsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessPreviews != null) { - contents.accessPreviews = de_AccessPreviewsList(data.accessPreviews, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + accessPreviews: (_) => de_AccessPreviewsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1902,10 +1899,9 @@ const de_ListAccessPreviewsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1925,12 +1921,11 @@ export const de_ListAnalyzedResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analyzedResources != null) { - contents.analyzedResources = de_AnalyzedResourcesList(data.analyzedResources, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + analyzedResources: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1964,10 +1959,9 @@ const de_ListAnalyzedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1987,12 +1981,11 @@ export const de_ListAnalyzersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analyzers != null) { - contents.analyzers = de_AnalyzersList(data.analyzers, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + analyzers: (_) => de_AnalyzersList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2023,10 +2016,9 @@ const de_ListAnalyzersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2046,12 +2038,11 @@ export const de_ListArchiveRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.archiveRules != null) { - contents.archiveRules = de_ArchiveRulesList(data.archiveRules, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + archiveRules: (_) => de_ArchiveRulesList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2082,10 +2073,9 @@ const de_ListArchiveRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2105,12 +2095,11 @@ export const de_ListFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de_FindingsList(data.findings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findings: (_) => de_FindingsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2144,10 +2133,9 @@ const de_ListFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2167,12 +2155,11 @@ export const de_ListPolicyGenerationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.policyGenerations != null) { - contents.policyGenerations = de_PolicyGenerationList(data.policyGenerations, context); - } + const doc = take(data, { + nextToken: __expectString, + policyGenerations: (_) => de_PolicyGenerationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2203,10 +2190,9 @@ const de_ListPolicyGenerationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2226,9 +2212,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2262,10 +2249,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2285,9 +2271,10 @@ export const de_StartPolicyGenerationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + jobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2324,10 +2311,9 @@ const de_StartPolicyGenerationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2380,10 +2366,9 @@ const de_StartResourceScanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2436,10 +2421,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2492,10 +2476,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2548,10 +2531,9 @@ const de_UpdateArchiveRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2604,10 +2586,9 @@ const de_UpdateFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2627,12 +2608,11 @@ export const de_ValidatePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de_ValidatePolicyFindingList(data.findings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findings: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2663,16 +2643,15 @@ const de_ValidatePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2682,9 +2661,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2698,15 +2678,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2728,9 +2705,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2747,15 +2725,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2772,15 +2747,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2799,9 +2771,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2815,15 +2788,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2831,1369 +2801,442 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AclGrantee - */ -const se_AclGrantee = (input: AclGrantee, context: __SerdeContext): any => { - return AclGrantee.visit(input, { - id: (value) => ({ id: value }), - uri: (value) => ({ uri: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_AclGrantee omitted. /** * serializeAws_restJson1CloudTrailDetails */ const se_CloudTrailDetails = (input: CloudTrailDetails, context: __SerdeContext): any => { - return { - ...(input.accessRole != null && { accessRole: input.accessRole }), - ...(input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }), - ...(input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }), - ...(input.trails != null && { trails: se_TrailList(input.trails, context) }), - }; -}; - -/** - * serializeAws_restJson1Configuration - */ -const se_Configuration = (input: Configuration, context: __SerdeContext): any => { - return Configuration.visit(input, { - ebsSnapshot: (value) => ({ ebsSnapshot: se_EbsSnapshotConfiguration(value, context) }), - ecrRepository: (value) => ({ ecrRepository: se_EcrRepositoryConfiguration(value, context) }), - efsFileSystem: (value) => ({ efsFileSystem: se_EfsFileSystemConfiguration(value, context) }), - iamRole: (value) => ({ iamRole: se_IamRoleConfiguration(value, context) }), - kmsKey: (value) => ({ kmsKey: se_KmsKeyConfiguration(value, context) }), - rdsDbClusterSnapshot: (value) => ({ rdsDbClusterSnapshot: se_RdsDbClusterSnapshotConfiguration(value, context) }), - rdsDbSnapshot: (value) => ({ rdsDbSnapshot: se_RdsDbSnapshotConfiguration(value, context) }), - s3Bucket: (value) => ({ s3Bucket: se_S3BucketConfiguration(value, context) }), - secretsManagerSecret: (value) => ({ secretsManagerSecret: se_SecretsManagerSecretConfiguration(value, context) }), - snsTopic: (value) => ({ snsTopic: se_SnsTopicConfiguration(value, context) }), - sqsQueue: (value) => ({ sqsQueue: se_SqsQueueConfiguration(value, context) }), - _: (name, value) => ({ name: value } as any), + return take(input, { + accessRole: [], + endTime: (_) => _.toISOString().split(".")[0] + "Z", + startTime: (_) => _.toISOString().split(".")[0] + "Z", + trails: _json, }); }; +// se_Configuration omitted. + +// se_ConfigurationsMap omitted. + +// se_Criterion omitted. + +// se_EbsGroupList omitted. + +// se_EbsSnapshotConfiguration omitted. + +// se_EbsUserIdList omitted. + +// se_EcrRepositoryConfiguration omitted. + +// se_EfsFileSystemConfiguration omitted. + +// se_FilterCriteriaMap omitted. + +// se_FindingIdList omitted. + +// se_IamRoleConfiguration omitted. + +// se_InlineArchiveRule omitted. + +// se_InlineArchiveRulesList omitted. + +// se_InternetConfiguration omitted. + +// se_KmsConstraintsMap omitted. + +// se_KmsGrantConfiguration omitted. + +// se_KmsGrantConfigurationsList omitted. + +// se_KmsGrantConstraints omitted. + +// se_KmsGrantOperationsList omitted. + +// se_KmsKeyConfiguration omitted. + +// se_KmsKeyPoliciesMap omitted. + +// se_NetworkOriginConfiguration omitted. + +// se_PolicyGenerationDetails omitted. + +// se_RdsDbClusterSnapshotAccountIdsList omitted. + +// se_RdsDbClusterSnapshotAttributesMap omitted. + +// se_RdsDbClusterSnapshotAttributeValue omitted. + +// se_RdsDbClusterSnapshotConfiguration omitted. + +// se_RdsDbSnapshotAccountIdsList omitted. + +// se_RdsDbSnapshotAttributesMap omitted. + +// se_RdsDbSnapshotAttributeValue omitted. + +// se_RdsDbSnapshotConfiguration omitted. + +// se_RegionList omitted. + +// se_S3AccessPointConfiguration omitted. + +// se_S3AccessPointConfigurationsMap omitted. + +// se_S3BucketAclGrantConfiguration omitted. + +// se_S3BucketAclGrantConfigurationsList omitted. + +// se_S3BucketConfiguration omitted. + +// se_S3PublicAccessBlockConfiguration omitted. + +// se_SecretsManagerSecretConfiguration omitted. + +// se_SnsTopicConfiguration omitted. + +// se_SortCriteria omitted. + +// se_SqsQueueConfiguration omitted. + +// se_TagsMap omitted. + +// se_Trail omitted. + +// se_TrailList omitted. + +// se_ValueList omitted. + +// se_VpcConfiguration omitted. + /** - * serializeAws_restJson1ConfigurationsMap + * deserializeAws_restJson1AccessPreview */ -const se_ConfigurationsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Configuration(value, context); - return acc; - }, {}); +const de_AccessPreview = (output: any, context: __SerdeContext): AccessPreview => { + return take(output, { + analyzerArn: __expectString, + configurations: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + status: __expectString, + statusReason: _json, + }) as any; }; /** - * serializeAws_restJson1Criterion + * deserializeAws_restJson1AccessPreviewFinding */ -const se_Criterion = (input: Criterion, context: __SerdeContext): any => { - return { - ...(input.contains != null && { contains: se_ValueList(input.contains, context) }), - ...(input.eq != null && { eq: se_ValueList(input.eq, context) }), - ...(input.exists != null && { exists: input.exists }), - ...(input.neq != null && { neq: se_ValueList(input.neq, context) }), - }; +const de_AccessPreviewFinding = (output: any, context: __SerdeContext): AccessPreviewFinding => { + return take(output, { + action: _json, + changeType: __expectString, + condition: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + error: __expectString, + existingFindingId: __expectString, + existingFindingStatus: __expectString, + id: __expectString, + isPublic: __expectBoolean, + principal: _json, + resource: __expectString, + resourceOwnerAccount: __expectString, + resourceType: __expectString, + sources: _json, + status: __expectString, + }) as any; }; /** - * serializeAws_restJson1EbsGroupList + * deserializeAws_restJson1AccessPreviewFindingsList */ -const se_EbsGroupList = (input: string[], context: __SerdeContext): any => { - return input +const de_AccessPreviewFindingsList = (output: any, context: __SerdeContext): AccessPreviewFinding[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_AccessPreviewFinding(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1EbsSnapshotConfiguration - */ -const se_EbsSnapshotConfiguration = (input: EbsSnapshotConfiguration, context: __SerdeContext): any => { - return { - ...(input.groups != null && { groups: se_EbsGroupList(input.groups, context) }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.userIds != null && { userIds: se_EbsUserIdList(input.userIds, context) }), - }; -}; - -/** - * serializeAws_restJson1EbsUserIdList + * deserializeAws_restJson1AccessPreviewsList */ -const se_EbsUserIdList = (input: string[], context: __SerdeContext): any => { - return input +const de_AccessPreviewsList = (output: any, context: __SerdeContext): AccessPreviewSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_AccessPreviewSummary(entry, context); }); + return retVal; }; -/** - * serializeAws_restJson1EcrRepositoryConfiguration - */ -const se_EcrRepositoryConfiguration = (input: EcrRepositoryConfiguration, context: __SerdeContext): any => { - return { - ...(input.repositoryPolicy != null && { repositoryPolicy: input.repositoryPolicy }), - }; -}; +// de_AccessPreviewStatusReason omitted. /** - * serializeAws_restJson1EfsFileSystemConfiguration + * deserializeAws_restJson1AccessPreviewSummary */ -const se_EfsFileSystemConfiguration = (input: EfsFileSystemConfiguration, context: __SerdeContext): any => { - return { - ...(input.fileSystemPolicy != null && { fileSystemPolicy: input.fileSystemPolicy }), - }; +const de_AccessPreviewSummary = (output: any, context: __SerdeContext): AccessPreviewSummary => { + return take(output, { + analyzerArn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + status: __expectString, + statusReason: _json, + }) as any; }; +// de_AclGrantee omitted. + +// de_ActionList omitted. + /** - * serializeAws_restJson1FilterCriteriaMap + * deserializeAws_restJson1AnalyzedResource */ -const se_FilterCriteriaMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Criterion(value, context); - return acc; - }, {}); +const de_AnalyzedResource = (output: any, context: __SerdeContext): AnalyzedResource => { + return take(output, { + actions: _json, + analyzedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + error: __expectString, + isPublic: __expectBoolean, + resourceArn: __expectString, + resourceOwnerAccount: __expectString, + resourceType: __expectString, + sharedVia: _json, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_AnalyzedResourcesList omitted. + +// de_AnalyzedResourceSummary omitted. + /** - * serializeAws_restJson1FindingIdList + * deserializeAws_restJson1AnalyzersList */ -const se_FindingIdList = (input: string[], context: __SerdeContext): any => { - return input +const de_AnalyzersList = (output: any, context: __SerdeContext): AnalyzerSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_AnalyzerSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1IamRoleConfiguration - */ -const se_IamRoleConfiguration = (input: IamRoleConfiguration, context: __SerdeContext): any => { - return { - ...(input.trustPolicy != null && { trustPolicy: input.trustPolicy }), - }; -}; - -/** - * serializeAws_restJson1InlineArchiveRule + * deserializeAws_restJson1AnalyzerSummary */ -const se_InlineArchiveRule = (input: InlineArchiveRule, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_FilterCriteriaMap(input.filter, context) }), - ...(input.ruleName != null && { ruleName: input.ruleName }), - }; +const de_AnalyzerSummary = (output: any, context: __SerdeContext): AnalyzerSummary => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastResourceAnalyzed: __expectString, + lastResourceAnalyzedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + statusReason: _json, + tags: _json, + type: __expectString, + }) as any; }; /** - * serializeAws_restJson1InlineArchiveRulesList + * deserializeAws_restJson1ArchiveRulesList */ -const se_InlineArchiveRulesList = (input: InlineArchiveRule[], context: __SerdeContext): any => { - return input +const de_ArchiveRulesList = (output: any, context: __SerdeContext): ArchiveRuleSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_InlineArchiveRule(entry, context); + .map((entry: any) => { + return de_ArchiveRuleSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1InternetConfiguration + * deserializeAws_restJson1ArchiveRuleSummary */ -const se_InternetConfiguration = (input: InternetConfiguration, context: __SerdeContext): any => { - return {}; +const de_ArchiveRuleSummary = (output: any, context: __SerdeContext): ArchiveRuleSummary => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + filter: _json, + ruleName: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** - * serializeAws_restJson1KmsConstraintsMap + * deserializeAws_restJson1CloudTrailProperties */ -const se_KmsConstraintsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); +const de_CloudTrailProperties = (output: any, context: __SerdeContext): CloudTrailProperties => { + return take(output, { + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + trailProperties: _json, + }) as any; }; -/** - * serializeAws_restJson1KmsGrantConfiguration - */ -const se_KmsGrantConfiguration = (input: KmsGrantConfiguration, context: __SerdeContext): any => { - return { - ...(input.constraints != null && { constraints: se_KmsGrantConstraints(input.constraints, context) }), - ...(input.granteePrincipal != null && { granteePrincipal: input.granteePrincipal }), - ...(input.issuingAccount != null && { issuingAccount: input.issuingAccount }), - ...(input.operations != null && { operations: se_KmsGrantOperationsList(input.operations, context) }), - ...(input.retiringPrincipal != null && { retiringPrincipal: input.retiringPrincipal }), - }; -}; +// de_ConditionKeyMap omitted. -/** - * serializeAws_restJson1KmsGrantConfigurationsList - */ -const se_KmsGrantConfigurationsList = (input: KmsGrantConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KmsGrantConfiguration(entry, context); - }); -}; +// de_Configuration omitted. + +// de_ConfigurationsMap omitted. + +// de_Criterion omitted. + +// de_EbsGroupList omitted. + +// de_EbsSnapshotConfiguration omitted. + +// de_EbsUserIdList omitted. + +// de_EcrRepositoryConfiguration omitted. + +// de_EfsFileSystemConfiguration omitted. + +// de_FilterCriteriaMap omitted. /** - * serializeAws_restJson1KmsGrantConstraints + * deserializeAws_restJson1Finding */ -const se_KmsGrantConstraints = (input: KmsGrantConstraints, context: __SerdeContext): any => { - return { - ...(input.encryptionContextEquals != null && { - encryptionContextEquals: se_KmsConstraintsMap(input.encryptionContextEquals, context), - }), - ...(input.encryptionContextSubset != null && { - encryptionContextSubset: se_KmsConstraintsMap(input.encryptionContextSubset, context), - }), - }; +const de_Finding = (output: any, context: __SerdeContext): Finding => { + return take(output, { + action: _json, + analyzedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + condition: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + error: __expectString, + id: __expectString, + isPublic: __expectBoolean, + principal: _json, + resource: __expectString, + resourceOwnerAccount: __expectString, + resourceType: __expectString, + sources: _json, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** - * serializeAws_restJson1KmsGrantOperationsList + * deserializeAws_restJson1FindingsList */ -const se_KmsGrantOperationsList = (input: (KmsGrantOperation | string)[], context: __SerdeContext): any => { - return input +const de_FindingsList = (output: any, context: __SerdeContext): FindingSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_FindingSummary(entry, context); }); + return retVal; }; +// de_FindingSource omitted. + +// de_FindingSourceDetail omitted. + +// de_FindingSourceList omitted. + /** - * serializeAws_restJson1KmsKeyConfiguration + * deserializeAws_restJson1FindingSummary */ -const se_KmsKeyConfiguration = (input: KmsKeyConfiguration, context: __SerdeContext): any => { - return { - ...(input.grants != null && { grants: se_KmsGrantConfigurationsList(input.grants, context) }), - ...(input.keyPolicies != null && { keyPolicies: se_KmsKeyPoliciesMap(input.keyPolicies, context) }), - }; +const de_FindingSummary = (output: any, context: __SerdeContext): FindingSummary => { + return take(output, { + action: _json, + analyzedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + condition: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + error: __expectString, + id: __expectString, + isPublic: __expectBoolean, + principal: _json, + resource: __expectString, + resourceOwnerAccount: __expectString, + resourceType: __expectString, + sources: _json, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_GeneratedPolicy omitted. + +// de_GeneratedPolicyList omitted. + /** - * serializeAws_restJson1KmsKeyPoliciesMap + * deserializeAws_restJson1GeneratedPolicyProperties */ -const se_KmsKeyPoliciesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); +const de_GeneratedPolicyProperties = (output: any, context: __SerdeContext): GeneratedPolicyProperties => { + return take(output, { + cloudTrailProperties: (_: any) => de_CloudTrailProperties(_, context), + isComplete: __expectBoolean, + principalArn: __expectString, + }) as any; }; /** - * serializeAws_restJson1NetworkOriginConfiguration + * deserializeAws_restJson1GeneratedPolicyResult */ -const se_NetworkOriginConfiguration = (input: NetworkOriginConfiguration, context: __SerdeContext): any => { - return NetworkOriginConfiguration.visit(input, { - internetConfiguration: (value) => ({ internetConfiguration: se_InternetConfiguration(value, context) }), - vpcConfiguration: (value) => ({ vpcConfiguration: se_VpcConfiguration(value, context) }), - _: (name, value) => ({ name: value } as any), - }); +const de_GeneratedPolicyResult = (output: any, context: __SerdeContext): GeneratedPolicyResult => { + return take(output, { + generatedPolicies: _json, + properties: (_: any) => de_GeneratedPolicyProperties(_, context), + }) as any; }; +// de_IamRoleConfiguration omitted. + +// de_InternetConfiguration omitted. + /** - * serializeAws_restJson1PolicyGenerationDetails + * deserializeAws_restJson1JobDetails */ -const se_PolicyGenerationDetails = (input: PolicyGenerationDetails, context: __SerdeContext): any => { - return { - ...(input.principalArn != null && { principalArn: input.principalArn }), - }; +const de_JobDetails = (output: any, context: __SerdeContext): JobDetails => { + return take(output, { + completedOn: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + jobError: _json, + jobId: __expectString, + startedOn: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + }) as any; }; -/** - * serializeAws_restJson1RdsDbClusterSnapshotAccountIdsList - */ -const se_RdsDbClusterSnapshotAccountIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RdsDbClusterSnapshotAttributesMap - */ -const se_RdsDbClusterSnapshotAttributesMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_RdsDbClusterSnapshotAttributeValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1RdsDbClusterSnapshotAttributeValue - */ -const se_RdsDbClusterSnapshotAttributeValue = ( - input: RdsDbClusterSnapshotAttributeValue, - context: __SerdeContext -): any => { - return RdsDbClusterSnapshotAttributeValue.visit(input, { - accountIds: (value) => ({ accountIds: se_RdsDbClusterSnapshotAccountIdsList(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1RdsDbClusterSnapshotConfiguration - */ -const se_RdsDbClusterSnapshotConfiguration = ( - input: RdsDbClusterSnapshotConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.attributes != null && { attributes: se_RdsDbClusterSnapshotAttributesMap(input.attributes, context) }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - }; -}; - -/** - * serializeAws_restJson1RdsDbSnapshotAccountIdsList - */ -const se_RdsDbSnapshotAccountIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RdsDbSnapshotAttributesMap - */ -const se_RdsDbSnapshotAttributesMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_RdsDbSnapshotAttributeValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1RdsDbSnapshotAttributeValue - */ -const se_RdsDbSnapshotAttributeValue = (input: RdsDbSnapshotAttributeValue, context: __SerdeContext): any => { - return RdsDbSnapshotAttributeValue.visit(input, { - accountIds: (value) => ({ accountIds: se_RdsDbSnapshotAccountIdsList(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1RdsDbSnapshotConfiguration - */ -const se_RdsDbSnapshotConfiguration = (input: RdsDbSnapshotConfiguration, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_RdsDbSnapshotAttributesMap(input.attributes, context) }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - }; -}; - -/** - * serializeAws_restJson1RegionList - */ -const se_RegionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1S3AccessPointConfiguration - */ -const se_S3AccessPointConfiguration = (input: S3AccessPointConfiguration, context: __SerdeContext): any => { - return { - ...(input.accessPointPolicy != null && { accessPointPolicy: input.accessPointPolicy }), - ...(input.networkOrigin != null && { networkOrigin: se_NetworkOriginConfiguration(input.networkOrigin, context) }), - ...(input.publicAccessBlock != null && { - publicAccessBlock: se_S3PublicAccessBlockConfiguration(input.publicAccessBlock, context), - }), - }; -}; - -/** - * serializeAws_restJson1S3AccessPointConfigurationsMap - */ -const se_S3AccessPointConfigurationsMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_S3AccessPointConfiguration(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1S3BucketAclGrantConfiguration - */ -const se_S3BucketAclGrantConfiguration = (input: S3BucketAclGrantConfiguration, context: __SerdeContext): any => { - return { - ...(input.grantee != null && { grantee: se_AclGrantee(input.grantee, context) }), - ...(input.permission != null && { permission: input.permission }), - }; -}; - -/** - * serializeAws_restJson1S3BucketAclGrantConfigurationsList - */ -const se_S3BucketAclGrantConfigurationsList = ( - input: S3BucketAclGrantConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3BucketAclGrantConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1S3BucketConfiguration - */ -const se_S3BucketConfiguration = (input: S3BucketConfiguration, context: __SerdeContext): any => { - return { - ...(input.accessPoints != null && { accessPoints: se_S3AccessPointConfigurationsMap(input.accessPoints, context) }), - ...(input.bucketAclGrants != null && { - bucketAclGrants: se_S3BucketAclGrantConfigurationsList(input.bucketAclGrants, context), - }), - ...(input.bucketPolicy != null && { bucketPolicy: input.bucketPolicy }), - ...(input.bucketPublicAccessBlock != null && { - bucketPublicAccessBlock: se_S3PublicAccessBlockConfiguration(input.bucketPublicAccessBlock, context), - }), - }; -}; - -/** - * serializeAws_restJson1S3PublicAccessBlockConfiguration - */ -const se_S3PublicAccessBlockConfiguration = (input: S3PublicAccessBlockConfiguration, context: __SerdeContext): any => { - return { - ...(input.ignorePublicAcls != null && { ignorePublicAcls: input.ignorePublicAcls }), - ...(input.restrictPublicBuckets != null && { restrictPublicBuckets: input.restrictPublicBuckets }), - }; -}; - -/** - * serializeAws_restJson1SecretsManagerSecretConfiguration - */ -const se_SecretsManagerSecretConfiguration = ( - input: SecretsManagerSecretConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.secretPolicy != null && { secretPolicy: input.secretPolicy }), - }; -}; - -/** - * serializeAws_restJson1SnsTopicConfiguration - */ -const se_SnsTopicConfiguration = (input: SnsTopicConfiguration, context: __SerdeContext): any => { - return { - ...(input.topicPolicy != null && { topicPolicy: input.topicPolicy }), - }; -}; - -/** - * serializeAws_restJson1SortCriteria - */ -const se_SortCriteria = (input: SortCriteria, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; -}; - -/** - * serializeAws_restJson1SqsQueueConfiguration - */ -const se_SqsQueueConfiguration = (input: SqsQueueConfiguration, context: __SerdeContext): any => { - return { - ...(input.queuePolicy != null && { queuePolicy: input.queuePolicy }), - }; -}; - -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Trail - */ -const se_Trail = (input: Trail, context: __SerdeContext): any => { - return { - ...(input.allRegions != null && { allRegions: input.allRegions }), - ...(input.cloudTrailArn != null && { cloudTrailArn: input.cloudTrailArn }), - ...(input.regions != null && { regions: se_RegionList(input.regions, context) }), - }; -}; - -/** - * serializeAws_restJson1TrailList - */ -const se_TrailList = (input: Trail[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Trail(entry, context); - }); -}; - -/** - * serializeAws_restJson1ValueList - */ -const se_ValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1VpcConfiguration - */ -const se_VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.vpcId != null && { vpcId: input.vpcId }), - }; -}; - -/** - * deserializeAws_restJson1AccessPreview - */ -const de_AccessPreview = (output: any, context: __SerdeContext): AccessPreview => { - return { - analyzerArn: __expectString(output.analyzerArn), - configurations: output.configurations != null ? de_ConfigurationsMap(output.configurations, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - status: __expectString(output.status), - statusReason: output.statusReason != null ? de_AccessPreviewStatusReason(output.statusReason, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AccessPreviewFinding - */ -const de_AccessPreviewFinding = (output: any, context: __SerdeContext): AccessPreviewFinding => { - return { - action: output.action != null ? de_ActionList(output.action, context) : undefined, - changeType: __expectString(output.changeType), - condition: output.condition != null ? de_ConditionKeyMap(output.condition, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - error: __expectString(output.error), - existingFindingId: __expectString(output.existingFindingId), - existingFindingStatus: __expectString(output.existingFindingStatus), - id: __expectString(output.id), - isPublic: __expectBoolean(output.isPublic), - principal: output.principal != null ? de_PrincipalMap(output.principal, context) : undefined, - resource: __expectString(output.resource), - resourceOwnerAccount: __expectString(output.resourceOwnerAccount), - resourceType: __expectString(output.resourceType), - sources: output.sources != null ? de_FindingSourceList(output.sources, context) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1AccessPreviewFindingsList - */ -const de_AccessPreviewFindingsList = (output: any, context: __SerdeContext): AccessPreviewFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessPreviewFinding(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AccessPreviewsList - */ -const de_AccessPreviewsList = (output: any, context: __SerdeContext): AccessPreviewSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessPreviewSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AccessPreviewStatusReason - */ -const de_AccessPreviewStatusReason = (output: any, context: __SerdeContext): AccessPreviewStatusReason => { - return { - code: __expectString(output.code), - } as any; -}; - -/** - * deserializeAws_restJson1AccessPreviewSummary - */ -const de_AccessPreviewSummary = (output: any, context: __SerdeContext): AccessPreviewSummary => { - return { - analyzerArn: __expectString(output.analyzerArn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - status: __expectString(output.status), - statusReason: output.statusReason != null ? de_AccessPreviewStatusReason(output.statusReason, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AclGrantee - */ -const de_AclGrantee = (output: any, context: __SerdeContext): AclGrantee => { - if (__expectString(output.id) !== undefined) { - return { id: __expectString(output.id) as any }; - } - if (__expectString(output.uri) !== undefined) { - return { uri: __expectString(output.uri) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnalyzedResource - */ -const de_AnalyzedResource = (output: any, context: __SerdeContext): AnalyzedResource => { - return { - actions: output.actions != null ? de_ActionList(output.actions, context) : undefined, - analyzedAt: - output.analyzedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.analyzedAt)) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - error: __expectString(output.error), - isPublic: __expectBoolean(output.isPublic), - resourceArn: __expectString(output.resourceArn), - resourceOwnerAccount: __expectString(output.resourceOwnerAccount), - resourceType: __expectString(output.resourceType), - sharedVia: output.sharedVia != null ? de_SharedViaList(output.sharedVia, context) : undefined, - status: __expectString(output.status), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnalyzedResourcesList - */ -const de_AnalyzedResourcesList = (output: any, context: __SerdeContext): AnalyzedResourceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnalyzedResourceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnalyzedResourceSummary - */ -const de_AnalyzedResourceSummary = (output: any, context: __SerdeContext): AnalyzedResourceSummary => { - return { - resourceArn: __expectString(output.resourceArn), - resourceOwnerAccount: __expectString(output.resourceOwnerAccount), - resourceType: __expectString(output.resourceType), - } as any; -}; - -/** - * deserializeAws_restJson1AnalyzersList - */ -const de_AnalyzersList = (output: any, context: __SerdeContext): AnalyzerSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnalyzerSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnalyzerSummary - */ -const de_AnalyzerSummary = (output: any, context: __SerdeContext): AnalyzerSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastResourceAnalyzed: __expectString(output.lastResourceAnalyzed), - lastResourceAnalyzedAt: - output.lastResourceAnalyzedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastResourceAnalyzedAt)) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - statusReason: output.statusReason != null ? de_StatusReason(output.statusReason, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1ArchiveRulesList - */ -const de_ArchiveRulesList = (output: any, context: __SerdeContext): ArchiveRuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ArchiveRuleSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ArchiveRuleSummary - */ -const de_ArchiveRuleSummary = (output: any, context: __SerdeContext): ArchiveRuleSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - filter: output.filter != null ? de_FilterCriteriaMap(output.filter, context) : undefined, - ruleName: __expectString(output.ruleName), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CloudTrailProperties - */ -const de_CloudTrailProperties = (output: any, context: __SerdeContext): CloudTrailProperties => { - return { - endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - trailProperties: - output.trailProperties != null ? de_TrailPropertiesList(output.trailProperties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConditionKeyMap - */ -const de_ConditionKeyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - if (output.ebsSnapshot != null) { - return { - ebsSnapshot: de_EbsSnapshotConfiguration(output.ebsSnapshot, context), - }; - } - if (output.ecrRepository != null) { - return { - ecrRepository: de_EcrRepositoryConfiguration(output.ecrRepository, context), - }; - } - if (output.efsFileSystem != null) { - return { - efsFileSystem: de_EfsFileSystemConfiguration(output.efsFileSystem, context), - }; - } - if (output.iamRole != null) { - return { - iamRole: de_IamRoleConfiguration(output.iamRole, context), - }; - } - if (output.kmsKey != null) { - return { - kmsKey: de_KmsKeyConfiguration(output.kmsKey, context), - }; - } - if (output.rdsDbClusterSnapshot != null) { - return { - rdsDbClusterSnapshot: de_RdsDbClusterSnapshotConfiguration(output.rdsDbClusterSnapshot, context), - }; - } - if (output.rdsDbSnapshot != null) { - return { - rdsDbSnapshot: de_RdsDbSnapshotConfiguration(output.rdsDbSnapshot, context), - }; - } - if (output.s3Bucket != null) { - return { - s3Bucket: de_S3BucketConfiguration(output.s3Bucket, context), - }; - } - if (output.secretsManagerSecret != null) { - return { - secretsManagerSecret: de_SecretsManagerSecretConfiguration(output.secretsManagerSecret, context), - }; - } - if (output.snsTopic != null) { - return { - snsTopic: de_SnsTopicConfiguration(output.snsTopic, context), - }; - } - if (output.sqsQueue != null) { - return { - sqsQueue: de_SqsQueueConfiguration(output.sqsQueue, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1ConfigurationsMap - */ -const de_ConfigurationsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Configuration(__expectUnion(value), context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Criterion - */ -const de_Criterion = (output: any, context: __SerdeContext): Criterion => { - return { - contains: output.contains != null ? de_ValueList(output.contains, context) : undefined, - eq: output.eq != null ? de_ValueList(output.eq, context) : undefined, - exists: __expectBoolean(output.exists), - neq: output.neq != null ? de_ValueList(output.neq, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EbsGroupList - */ -const de_EbsGroupList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EbsSnapshotConfiguration - */ -const de_EbsSnapshotConfiguration = (output: any, context: __SerdeContext): EbsSnapshotConfiguration => { - return { - groups: output.groups != null ? de_EbsGroupList(output.groups, context) : undefined, - kmsKeyId: __expectString(output.kmsKeyId), - userIds: output.userIds != null ? de_EbsUserIdList(output.userIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EbsUserIdList - */ -const de_EbsUserIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EcrRepositoryConfiguration - */ -const de_EcrRepositoryConfiguration = (output: any, context: __SerdeContext): EcrRepositoryConfiguration => { - return { - repositoryPolicy: __expectString(output.repositoryPolicy), - } as any; -}; - -/** - * deserializeAws_restJson1EfsFileSystemConfiguration - */ -const de_EfsFileSystemConfiguration = (output: any, context: __SerdeContext): EfsFileSystemConfiguration => { - return { - fileSystemPolicy: __expectString(output.fileSystemPolicy), - } as any; -}; - -/** - * deserializeAws_restJson1FilterCriteriaMap - */ -const de_FilterCriteriaMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Criterion(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Finding - */ -const de_Finding = (output: any, context: __SerdeContext): Finding => { - return { - action: output.action != null ? de_ActionList(output.action, context) : undefined, - analyzedAt: - output.analyzedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.analyzedAt)) : undefined, - condition: output.condition != null ? de_ConditionKeyMap(output.condition, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - error: __expectString(output.error), - id: __expectString(output.id), - isPublic: __expectBoolean(output.isPublic), - principal: output.principal != null ? de_PrincipalMap(output.principal, context) : undefined, - resource: __expectString(output.resource), - resourceOwnerAccount: __expectString(output.resourceOwnerAccount), - resourceType: __expectString(output.resourceType), - sources: output.sources != null ? de_FindingSourceList(output.sources, context) : undefined, - status: __expectString(output.status), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FindingsList - */ -const de_FindingsList = (output: any, context: __SerdeContext): FindingSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FindingSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FindingSource - */ -const de_FindingSource = (output: any, context: __SerdeContext): FindingSource => { - return { - detail: output.detail != null ? de_FindingSourceDetail(output.detail, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1FindingSourceDetail - */ -const de_FindingSourceDetail = (output: any, context: __SerdeContext): FindingSourceDetail => { - return { - accessPointAccount: __expectString(output.accessPointAccount), - accessPointArn: __expectString(output.accessPointArn), - } as any; -}; - -/** - * deserializeAws_restJson1FindingSourceList - */ -const de_FindingSourceList = (output: any, context: __SerdeContext): FindingSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FindingSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FindingSummary - */ -const de_FindingSummary = (output: any, context: __SerdeContext): FindingSummary => { - return { - action: output.action != null ? de_ActionList(output.action, context) : undefined, - analyzedAt: - output.analyzedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.analyzedAt)) : undefined, - condition: output.condition != null ? de_ConditionKeyMap(output.condition, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - error: __expectString(output.error), - id: __expectString(output.id), - isPublic: __expectBoolean(output.isPublic), - principal: output.principal != null ? de_PrincipalMap(output.principal, context) : undefined, - resource: __expectString(output.resource), - resourceOwnerAccount: __expectString(output.resourceOwnerAccount), - resourceType: __expectString(output.resourceType), - sources: output.sources != null ? de_FindingSourceList(output.sources, context) : undefined, - status: __expectString(output.status), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GeneratedPolicy - */ -const de_GeneratedPolicy = (output: any, context: __SerdeContext): GeneratedPolicy => { - return { - policy: __expectString(output.policy), - } as any; -}; - -/** - * deserializeAws_restJson1GeneratedPolicyList - */ -const de_GeneratedPolicyList = (output: any, context: __SerdeContext): GeneratedPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GeneratedPolicy(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GeneratedPolicyProperties - */ -const de_GeneratedPolicyProperties = (output: any, context: __SerdeContext): GeneratedPolicyProperties => { - return { - cloudTrailProperties: - output.cloudTrailProperties != null ? de_CloudTrailProperties(output.cloudTrailProperties, context) : undefined, - isComplete: __expectBoolean(output.isComplete), - principalArn: __expectString(output.principalArn), - } as any; -}; - -/** - * deserializeAws_restJson1GeneratedPolicyResult - */ -const de_GeneratedPolicyResult = (output: any, context: __SerdeContext): GeneratedPolicyResult => { - return { - generatedPolicies: - output.generatedPolicies != null ? de_GeneratedPolicyList(output.generatedPolicies, context) : undefined, - properties: output.properties != null ? de_GeneratedPolicyProperties(output.properties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1IamRoleConfiguration - */ -const de_IamRoleConfiguration = (output: any, context: __SerdeContext): IamRoleConfiguration => { - return { - trustPolicy: __expectString(output.trustPolicy), - } as any; -}; - -/** - * deserializeAws_restJson1InternetConfiguration - */ -const de_InternetConfiguration = (output: any, context: __SerdeContext): InternetConfiguration => { - return {} as any; -}; - -/** - * deserializeAws_restJson1JobDetails - */ -const de_JobDetails = (output: any, context: __SerdeContext): JobDetails => { - return { - completedOn: - output.completedOn != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completedOn)) : undefined, - jobError: output.jobError != null ? de_JobError(output.jobError, context) : undefined, - jobId: __expectString(output.jobId), - startedOn: - output.startedOn != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startedOn)) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1JobError - */ -const de_JobError = (output: any, context: __SerdeContext): JobError => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_JobError omitted. -/** - * deserializeAws_restJson1KmsConstraintsMap - */ -const de_KmsConstraintsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_KmsConstraintsMap omitted. -/** - * deserializeAws_restJson1KmsGrantConfiguration - */ -const de_KmsGrantConfiguration = (output: any, context: __SerdeContext): KmsGrantConfiguration => { - return { - constraints: output.constraints != null ? de_KmsGrantConstraints(output.constraints, context) : undefined, - granteePrincipal: __expectString(output.granteePrincipal), - issuingAccount: __expectString(output.issuingAccount), - operations: output.operations != null ? de_KmsGrantOperationsList(output.operations, context) : undefined, - retiringPrincipal: __expectString(output.retiringPrincipal), - } as any; -}; +// de_KmsGrantConfiguration omitted. -/** - * deserializeAws_restJson1KmsGrantConfigurationsList - */ -const de_KmsGrantConfigurationsList = (output: any, context: __SerdeContext): KmsGrantConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KmsGrantConfiguration(entry, context); - }); - return retVal; -}; +// de_KmsGrantConfigurationsList omitted. -/** - * deserializeAws_restJson1KmsGrantConstraints - */ -const de_KmsGrantConstraints = (output: any, context: __SerdeContext): KmsGrantConstraints => { - return { - encryptionContextEquals: - output.encryptionContextEquals != null - ? de_KmsConstraintsMap(output.encryptionContextEquals, context) - : undefined, - encryptionContextSubset: - output.encryptionContextSubset != null - ? de_KmsConstraintsMap(output.encryptionContextSubset, context) - : undefined, - } as any; -}; +// de_KmsGrantConstraints omitted. -/** - * deserializeAws_restJson1KmsGrantOperationsList - */ -const de_KmsGrantOperationsList = (output: any, context: __SerdeContext): (KmsGrantOperation | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_KmsGrantOperationsList omitted. -/** - * deserializeAws_restJson1KmsKeyConfiguration - */ -const de_KmsKeyConfiguration = (output: any, context: __SerdeContext): KmsKeyConfiguration => { - return { - grants: output.grants != null ? de_KmsGrantConfigurationsList(output.grants, context) : undefined, - keyPolicies: output.keyPolicies != null ? de_KmsKeyPoliciesMap(output.keyPolicies, context) : undefined, - } as any; -}; +// de_KmsKeyConfiguration omitted. -/** - * deserializeAws_restJson1KmsKeyPoliciesMap - */ -const de_KmsKeyPoliciesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_KmsKeyPoliciesMap omitted. -/** - * deserializeAws_restJson1Location - */ -const de_Location = (output: any, context: __SerdeContext): Location => { - return { - path: output.path != null ? de_PathElementList(output.path, context) : undefined, - span: output.span != null ? de_Span(output.span, context) : undefined, - } as any; -}; +// de_Location omitted. -/** - * deserializeAws_restJson1LocationList - */ -const de_LocationList = (output: any, context: __SerdeContext): Location[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Location(entry, context); - }); - return retVal; -}; +// de_LocationList omitted. -/** - * deserializeAws_restJson1NetworkOriginConfiguration - */ -const de_NetworkOriginConfiguration = (output: any, context: __SerdeContext): NetworkOriginConfiguration => { - if (output.internetConfiguration != null) { - return { - internetConfiguration: de_InternetConfiguration(output.internetConfiguration, context), - }; - } - if (output.vpcConfiguration != null) { - return { - vpcConfiguration: de_VpcConfiguration(output.vpcConfiguration, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_NetworkOriginConfiguration omitted. -/** - * deserializeAws_restJson1PathElement - */ -const de_PathElement = (output: any, context: __SerdeContext): PathElement => { - if (__expectInt32(output.index) !== undefined) { - return { index: __expectInt32(output.index) as any }; - } - if (__expectString(output.key) !== undefined) { - return { key: __expectString(output.key) as any }; - } - if (output.substring != null) { - return { - substring: de_Substring(output.substring, context), - }; - } - if (__expectString(output.value) !== undefined) { - return { value: __expectString(output.value) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_PathElement omitted. -/** - * deserializeAws_restJson1PathElementList - */ -const de_PathElementList = (output: any, context: __SerdeContext): PathElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PathElement(__expectUnion(entry), context); - }); - return retVal; -}; +// de_PathElementList omitted. /** * deserializeAws_restJson1PolicyGeneration */ const de_PolicyGeneration = (output: any, context: __SerdeContext): PolicyGeneration => { - return { - completedOn: - output.completedOn != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completedOn)) : undefined, - jobId: __expectString(output.jobId), - principalArn: __expectString(output.principalArn), - startedOn: - output.startedOn != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startedOn)) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + completedOn: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + jobId: __expectString, + principalArn: __expectString, + startedOn: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + }) as any; }; /** @@ -4203,458 +3246,76 @@ const de_PolicyGenerationList = (output: any, context: __SerdeContext): PolicyGe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PolicyGeneration(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Position - */ -const de_Position = (output: any, context: __SerdeContext): Position => { - return { - column: __expectInt32(output.column), - line: __expectInt32(output.line), - offset: __expectInt32(output.offset), - } as any; -}; +// de_Position omitted. -/** - * deserializeAws_restJson1PrincipalMap - */ -const de_PrincipalMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PrincipalMap omitted. -/** - * deserializeAws_restJson1RdsDbClusterSnapshotAccountIdsList - */ -const de_RdsDbClusterSnapshotAccountIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RdsDbClusterSnapshotAccountIdsList omitted. -/** - * deserializeAws_restJson1RdsDbClusterSnapshotAttributesMap - */ -const de_RdsDbClusterSnapshotAttributesMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_RdsDbClusterSnapshotAttributeValue(__expectUnion(value), context); - return acc; - }, - {} - ); -}; +// de_RdsDbClusterSnapshotAttributesMap omitted. -/** - * deserializeAws_restJson1RdsDbClusterSnapshotAttributeValue - */ -const de_RdsDbClusterSnapshotAttributeValue = ( - output: any, - context: __SerdeContext -): RdsDbClusterSnapshotAttributeValue => { - if (output.accountIds != null) { - return { - accountIds: de_RdsDbClusterSnapshotAccountIdsList(output.accountIds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_RdsDbClusterSnapshotAttributeValue omitted. -/** - * deserializeAws_restJson1RdsDbClusterSnapshotConfiguration - */ -const de_RdsDbClusterSnapshotConfiguration = ( - output: any, - context: __SerdeContext -): RdsDbClusterSnapshotConfiguration => { - return { - attributes: - output.attributes != null ? de_RdsDbClusterSnapshotAttributesMap(output.attributes, context) : undefined, - kmsKeyId: __expectString(output.kmsKeyId), - } as any; -}; +// de_RdsDbClusterSnapshotConfiguration omitted. -/** - * deserializeAws_restJson1RdsDbSnapshotAccountIdsList - */ -const de_RdsDbSnapshotAccountIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RdsDbSnapshotAccountIdsList omitted. -/** - * deserializeAws_restJson1RdsDbSnapshotAttributesMap - */ -const de_RdsDbSnapshotAttributesMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_RdsDbSnapshotAttributeValue(__expectUnion(value), context); - return acc; - }, - {} - ); -}; +// de_RdsDbSnapshotAttributesMap omitted. -/** - * deserializeAws_restJson1RdsDbSnapshotAttributeValue - */ -const de_RdsDbSnapshotAttributeValue = (output: any, context: __SerdeContext): RdsDbSnapshotAttributeValue => { - if (output.accountIds != null) { - return { - accountIds: de_RdsDbSnapshotAccountIdsList(output.accountIds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_RdsDbSnapshotAttributeValue omitted. -/** - * deserializeAws_restJson1RdsDbSnapshotConfiguration - */ -const de_RdsDbSnapshotConfiguration = (output: any, context: __SerdeContext): RdsDbSnapshotConfiguration => { - return { - attributes: output.attributes != null ? de_RdsDbSnapshotAttributesMap(output.attributes, context) : undefined, - kmsKeyId: __expectString(output.kmsKeyId), - } as any; -}; +// de_RdsDbSnapshotConfiguration omitted. -/** - * deserializeAws_restJson1RegionList - */ -const de_RegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RegionList omitted. -/** - * deserializeAws_restJson1S3AccessPointConfiguration - */ -const de_S3AccessPointConfiguration = (output: any, context: __SerdeContext): S3AccessPointConfiguration => { - return { - accessPointPolicy: __expectString(output.accessPointPolicy), - networkOrigin: - output.networkOrigin != null - ? de_NetworkOriginConfiguration(__expectUnion(output.networkOrigin), context) - : undefined, - publicAccessBlock: - output.publicAccessBlock != null - ? de_S3PublicAccessBlockConfiguration(output.publicAccessBlock, context) - : undefined, - } as any; -}; +// de_S3AccessPointConfiguration omitted. -/** - * deserializeAws_restJson1S3AccessPointConfigurationsMap - */ -const de_S3AccessPointConfigurationsMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_S3AccessPointConfiguration(value, context); - return acc; - }, - {} - ); -}; +// de_S3AccessPointConfigurationsMap omitted. -/** - * deserializeAws_restJson1S3BucketAclGrantConfiguration - */ -const de_S3BucketAclGrantConfiguration = (output: any, context: __SerdeContext): S3BucketAclGrantConfiguration => { - return { - grantee: output.grantee != null ? de_AclGrantee(__expectUnion(output.grantee), context) : undefined, - permission: __expectString(output.permission), - } as any; -}; +// de_S3BucketAclGrantConfiguration omitted. -/** - * deserializeAws_restJson1S3BucketAclGrantConfigurationsList - */ -const de_S3BucketAclGrantConfigurationsList = ( - output: any, - context: __SerdeContext -): S3BucketAclGrantConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3BucketAclGrantConfiguration(entry, context); - }); - return retVal; -}; +// de_S3BucketAclGrantConfigurationsList omitted. -/** - * deserializeAws_restJson1S3BucketConfiguration - */ -const de_S3BucketConfiguration = (output: any, context: __SerdeContext): S3BucketConfiguration => { - return { - accessPoints: - output.accessPoints != null ? de_S3AccessPointConfigurationsMap(output.accessPoints, context) : undefined, - bucketAclGrants: - output.bucketAclGrants != null - ? de_S3BucketAclGrantConfigurationsList(output.bucketAclGrants, context) - : undefined, - bucketPolicy: __expectString(output.bucketPolicy), - bucketPublicAccessBlock: - output.bucketPublicAccessBlock != null - ? de_S3PublicAccessBlockConfiguration(output.bucketPublicAccessBlock, context) - : undefined, - } as any; -}; +// de_S3BucketConfiguration omitted. -/** - * deserializeAws_restJson1S3PublicAccessBlockConfiguration - */ -const de_S3PublicAccessBlockConfiguration = ( - output: any, - context: __SerdeContext -): S3PublicAccessBlockConfiguration => { - return { - ignorePublicAcls: __expectBoolean(output.ignorePublicAcls), - restrictPublicBuckets: __expectBoolean(output.restrictPublicBuckets), - } as any; -}; +// de_S3PublicAccessBlockConfiguration omitted. -/** - * deserializeAws_restJson1SecretsManagerSecretConfiguration - */ -const de_SecretsManagerSecretConfiguration = ( - output: any, - context: __SerdeContext -): SecretsManagerSecretConfiguration => { - return { - kmsKeyId: __expectString(output.kmsKeyId), - secretPolicy: __expectString(output.secretPolicy), - } as any; -}; +// de_SecretsManagerSecretConfiguration omitted. -/** - * deserializeAws_restJson1SharedViaList - */ -const de_SharedViaList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SharedViaList omitted. -/** - * deserializeAws_restJson1SnsTopicConfiguration - */ -const de_SnsTopicConfiguration = (output: any, context: __SerdeContext): SnsTopicConfiguration => { - return { - topicPolicy: __expectString(output.topicPolicy), - } as any; -}; +// de_SnsTopicConfiguration omitted. -/** - * deserializeAws_restJson1Span - */ -const de_Span = (output: any, context: __SerdeContext): Span => { - return { - end: output.end != null ? de_Position(output.end, context) : undefined, - start: output.start != null ? de_Position(output.start, context) : undefined, - } as any; -}; +// de_Span omitted. -/** - * deserializeAws_restJson1SqsQueueConfiguration - */ -const de_SqsQueueConfiguration = (output: any, context: __SerdeContext): SqsQueueConfiguration => { - return { - queuePolicy: __expectString(output.queuePolicy), - } as any; -}; +// de_SqsQueueConfiguration omitted. -/** - * deserializeAws_restJson1StatusReason - */ -const de_StatusReason = (output: any, context: __SerdeContext): StatusReason => { - return { - code: __expectString(output.code), - } as any; -}; +// de_StatusReason omitted. -/** - * deserializeAws_restJson1Substring - */ -const de_Substring = (output: any, context: __SerdeContext): Substring => { - return { - length: __expectInt32(output.length), - start: __expectInt32(output.start), - } as any; -}; +// de_Substring omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. -/** - * deserializeAws_restJson1TrailProperties - */ -const de_TrailProperties = (output: any, context: __SerdeContext): TrailProperties => { - return { - allRegions: __expectBoolean(output.allRegions), - cloudTrailArn: __expectString(output.cloudTrailArn), - regions: output.regions != null ? de_RegionList(output.regions, context) : undefined, - } as any; -}; +// de_TrailProperties omitted. -/** - * deserializeAws_restJson1TrailPropertiesList - */ -const de_TrailPropertiesList = (output: any, context: __SerdeContext): TrailProperties[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrailProperties(entry, context); - }); - return retVal; -}; +// de_TrailPropertiesList omitted. -/** - * deserializeAws_restJson1ValidatePolicyFinding - */ -const de_ValidatePolicyFinding = (output: any, context: __SerdeContext): ValidatePolicyFinding => { - return { - findingDetails: __expectString(output.findingDetails), - findingType: __expectString(output.findingType), - issueCode: __expectString(output.issueCode), - learnMoreLink: __expectString(output.learnMoreLink), - locations: output.locations != null ? de_LocationList(output.locations, context) : undefined, - } as any; -}; +// de_ValidatePolicyFinding omitted. -/** - * deserializeAws_restJson1ValidatePolicyFindingList - */ -const de_ValidatePolicyFindingList = (output: any, context: __SerdeContext): ValidatePolicyFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidatePolicyFinding(entry, context); - }); - return retVal; -}; +// de_ValidatePolicyFindingList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1ValueList - */ -const de_ValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ValueList omitted. -/** - * deserializeAws_restJson1VpcConfiguration - */ -const de_VpcConfiguration = (output: any, context: __SerdeContext): VpcConfiguration => { - return { - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-account/src/protocols/Aws_restJson1.ts b/clients/client-account/src/protocols/Aws_restJson1.ts index fcab8eae83d1..0c4affd23f77 100644 --- a/clients/client-account/src/protocols/Aws_restJson1.ts +++ b/clients/client-account/src/protocols/Aws_restJson1.ts @@ -1,12 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -41,16 +43,13 @@ import { import { AccountServiceException as __BaseException } from "../models/AccountServiceException"; import { AccessDeniedException, - AlternateContact, ConflictException, ContactInformation, InternalServerException, - Region, RegionOptStatus, ResourceNotFoundException, TooManyRequestsException, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -67,10 +66,12 @@ export const se_DeleteAlternateContactCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteAlternateContact"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AlternateContactType != null && { AlternateContactType: input.AlternateContactType }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + AlternateContactType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -95,10 +96,12 @@ export const se_DisableRegionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disableRegion"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + RegionName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -123,10 +126,12 @@ export const se_EnableRegionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enableRegion"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + RegionName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -151,10 +156,12 @@ export const se_GetAlternateContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getAlternateContact"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AlternateContactType != null && { AlternateContactType: input.AlternateContactType }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + AlternateContactType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -179,9 +186,11 @@ export const se_GetContactInformationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getContactInformation"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -206,10 +215,12 @@ export const se_GetRegionOptStatusCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getRegionOptStatus"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + RegionName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -234,14 +245,14 @@ export const se_ListRegionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRegions"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RegionOptStatusContains != null && { - RegionOptStatusContains: se_RegionOptStatusList(input.RegionOptStatusContains, context), - }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + MaxResults: [], + NextToken: [], + RegionOptStatusContains: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -266,14 +277,16 @@ export const se_PutAlternateContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putAlternateContact"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AlternateContactType != null && { AlternateContactType: input.AlternateContactType }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.Title != null && { Title: input.Title }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + AlternateContactType: [], + EmailAddress: [], + Name: [], + PhoneNumber: [], + Title: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -298,12 +311,12 @@ export const se_PutContactInformationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putContactInformation"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ContactInformation != null && { - ContactInformation: se_ContactInformation(input.ContactInformation, context), - }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + ContactInformation: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -362,10 +375,9 @@ const de_DeleteAlternateContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -418,10 +430,9 @@ const de_DisableRegionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -474,10 +485,9 @@ const de_EnableRegionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -497,9 +507,10 @@ export const de_GetAlternateContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AlternateContact != null) { - contents.AlternateContact = de_AlternateContact(data.AlternateContact, context); - } + const doc = take(data, { + AlternateContact: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -533,10 +544,9 @@ const de_GetAlternateContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -556,9 +566,10 @@ export const de_GetContactInformationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactInformation != null) { - contents.ContactInformation = de_ContactInformation(data.ContactInformation, context); - } + const doc = take(data, { + ContactInformation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -592,10 +603,9 @@ const de_GetContactInformationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -615,12 +625,11 @@ export const de_GetRegionOptStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RegionName != null) { - contents.RegionName = __expectString(data.RegionName); - } - if (data.RegionOptStatus != null) { - contents.RegionOptStatus = __expectString(data.RegionOptStatus); - } + const doc = take(data, { + RegionName: __expectString, + RegionOptStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -651,10 +660,9 @@ const de_GetRegionOptStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -674,12 +682,11 @@ export const de_ListRegionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Regions != null) { - contents.Regions = de_RegionOptList(data.Regions, context); - } + const doc = take(data, { + NextToken: __expectString, + Regions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -710,10 +717,9 @@ const de_ListRegionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -763,10 +769,9 @@ const de_PutAlternateContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -816,16 +821,15 @@ const de_PutContactInformationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -835,9 +839,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -851,9 +856,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -870,9 +876,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -889,9 +896,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -908,9 +916,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -924,15 +933,12 @@ const de_TooManyRequestsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -940,119 +946,21 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ContactInformation - */ -const se_ContactInformation = (input: ContactInformation, context: __SerdeContext): any => { - return { - ...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }), - ...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }), - ...(input.AddressLine3 != null && { AddressLine3: input.AddressLine3 }), - ...(input.City != null && { City: input.City }), - ...(input.CompanyName != null && { CompanyName: input.CompanyName }), - ...(input.CountryCode != null && { CountryCode: input.CountryCode }), - ...(input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty }), - ...(input.FullName != null && { FullName: input.FullName }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }), - ...(input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }), - }; -}; +// se_ContactInformation omitted. -/** - * serializeAws_restJson1RegionOptStatusList - */ -const se_RegionOptStatusList = (input: (RegionOptStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RegionOptStatusList omitted. -/** - * deserializeAws_restJson1AlternateContact - */ -const de_AlternateContact = (output: any, context: __SerdeContext): AlternateContact => { - return { - AlternateContactType: __expectString(output.AlternateContactType), - EmailAddress: __expectString(output.EmailAddress), - Name: __expectString(output.Name), - PhoneNumber: __expectString(output.PhoneNumber), - Title: __expectString(output.Title), - } as any; -}; +// de_AlternateContact omitted. -/** - * deserializeAws_restJson1ContactInformation - */ -const de_ContactInformation = (output: any, context: __SerdeContext): ContactInformation => { - return { - AddressLine1: __expectString(output.AddressLine1), - AddressLine2: __expectString(output.AddressLine2), - AddressLine3: __expectString(output.AddressLine3), - City: __expectString(output.City), - CompanyName: __expectString(output.CompanyName), - CountryCode: __expectString(output.CountryCode), - DistrictOrCounty: __expectString(output.DistrictOrCounty), - FullName: __expectString(output.FullName), - PhoneNumber: __expectString(output.PhoneNumber), - PostalCode: __expectString(output.PostalCode), - StateOrRegion: __expectString(output.StateOrRegion), - WebsiteUrl: __expectString(output.WebsiteUrl), - } as any; -}; +// de_ContactInformation omitted. -/** - * deserializeAws_restJson1Region - */ -const de_Region = (output: any, context: __SerdeContext): Region => { - return { - RegionName: __expectString(output.RegionName), - RegionOptStatus: __expectString(output.RegionOptStatus), - } as any; -}; +// de_Region omitted. -/** - * deserializeAws_restJson1RegionOptList - */ -const de_RegionOptList = (output: any, context: __SerdeContext): Region[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Region(entry, context); - }); - return retVal; -}; +// de_RegionOptList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-acm-pca/src/protocols/Aws_json1_1.ts b/clients/client-acm-pca/src/protocols/Aws_json1_1.ts index 757f59c34707..f7223c605269 100644 --- a/clients/client-acm-pca/src/protocols/Aws_json1_1.ts +++ b/clients/client-acm-pca/src/protocols/Aws_json1_1.ts @@ -1,14 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -91,9 +91,7 @@ import { CertificateMismatchException, ConcurrentModificationException, CreateCertificateAuthorityAuditReportRequest, - CreateCertificateAuthorityAuditReportResponse, CreateCertificateAuthorityRequest, - CreateCertificateAuthorityResponse, CreatePermissionRequest, CrlConfiguration, CsrExtensions, @@ -111,13 +109,9 @@ import { Extensions, GeneralName, GetCertificateAuthorityCertificateRequest, - GetCertificateAuthorityCertificateResponse, GetCertificateAuthorityCsrRequest, - GetCertificateAuthorityCsrResponse, GetCertificateRequest, - GetCertificateResponse, GetPolicyRequest, - GetPolicyResponse, ImportCertificateAuthorityCertificateRequest, InvalidArgsException, InvalidArnException, @@ -127,7 +121,6 @@ import { InvalidStateException, InvalidTagException, IssueCertificateRequest, - IssueCertificateResponse, KeyUsage, LimitExceededException, ListCertificateAuthoritiesRequest, @@ -135,7 +128,6 @@ import { ListPermissionsRequest, ListPermissionsResponse, ListTagsRequest, - ListTagsResponse, LockoutPreventedException, MalformedCertificateException, MalformedCSRException, @@ -171,7 +163,7 @@ export const se_CreateCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCertificateAuthority"); let body: any; - body = JSON.stringify(se_CreateCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -184,7 +176,7 @@ export const se_CreateCertificateAuthorityAuditReportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCertificateAuthorityAuditReport"); let body: any; - body = JSON.stringify(se_CreateCertificateAuthorityAuditReportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -197,7 +189,7 @@ export const se_CreatePermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePermission"); let body: any; - body = JSON.stringify(se_CreatePermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -210,7 +202,7 @@ export const se_DeleteCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCertificateAuthority"); let body: any; - body = JSON.stringify(se_DeleteCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -223,7 +215,7 @@ export const se_DeletePermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePermission"); let body: any; - body = JSON.stringify(se_DeletePermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -236,7 +228,7 @@ export const se_DeletePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePolicy"); let body: any; - body = JSON.stringify(se_DeletePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -249,7 +241,7 @@ export const se_DescribeCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCertificateAuthority"); let body: any; - body = JSON.stringify(se_DescribeCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -262,7 +254,7 @@ export const se_DescribeCertificateAuthorityAuditReportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCertificateAuthorityAuditReport"); let body: any; - body = JSON.stringify(se_DescribeCertificateAuthorityAuditReportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -275,7 +267,7 @@ export const se_GetCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCertificate"); let body: any; - body = JSON.stringify(se_GetCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -288,7 +280,7 @@ export const se_GetCertificateAuthorityCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCertificateAuthorityCertificate"); let body: any; - body = JSON.stringify(se_GetCertificateAuthorityCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -301,7 +293,7 @@ export const se_GetCertificateAuthorityCsrCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCertificateAuthorityCsr"); let body: any; - body = JSON.stringify(se_GetCertificateAuthorityCsrRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -314,7 +306,7 @@ export const se_GetPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPolicy"); let body: any; - body = JSON.stringify(se_GetPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -353,7 +345,7 @@ export const se_ListCertificateAuthoritiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCertificateAuthorities"); let body: any; - body = JSON.stringify(se_ListCertificateAuthoritiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -366,7 +358,7 @@ export const se_ListPermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPermissions"); let body: any; - body = JSON.stringify(se_ListPermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -379,7 +371,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -392,7 +384,7 @@ export const se_PutPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPolicy"); let body: any; - body = JSON.stringify(se_PutPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +397,7 @@ export const se_RestoreCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreCertificateAuthority"); let body: any; - body = JSON.stringify(se_RestoreCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +410,7 @@ export const se_RevokeCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RevokeCertificate"); let body: any; - body = JSON.stringify(se_RevokeCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +423,7 @@ export const se_TagCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagCertificateAuthority"); let body: any; - body = JSON.stringify(se_TagCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +436,7 @@ export const se_UntagCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagCertificateAuthority"); let body: any; - body = JSON.stringify(se_UntagCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +449,7 @@ export const se_UpdateCertificateAuthorityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCertificateAuthority"); let body: any; - body = JSON.stringify(se_UpdateCertificateAuthorityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -473,12 +465,12 @@ export const de_CreateCertificateAuthorityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCertificateAuthorityResponse(data, context); + contents = _json(data); const response: CreateCertificateAuthorityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -508,10 +500,9 @@ const de_CreateCertificateAuthorityCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -529,12 +520,12 @@ export const de_CreateCertificateAuthorityAuditReportCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCertificateAuthorityAuditReportResponse(data, context); + contents = _json(data); const response: CreateCertificateAuthorityAuditReportCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -570,10 +561,9 @@ const de_CreateCertificateAuthorityAuditReportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -593,7 +583,7 @@ export const de_CreatePermissionCommand = async ( const response: CreatePermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -629,10 +619,9 @@ const de_CreatePermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -652,7 +641,7 @@ export const de_DeleteCertificateAuthorityCommand = async ( const response: DeleteCertificateAuthorityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -682,10 +671,9 @@ const de_DeleteCertificateAuthorityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -705,7 +693,7 @@ export const de_DeletePermissionCommand = async ( const response: DeletePermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -735,10 +723,9 @@ const de_DeletePermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -758,7 +745,7 @@ export const de_DeletePolicyCommand = async ( const response: DeletePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -794,10 +781,9 @@ const de_DeletePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -820,7 +806,7 @@ export const de_DescribeCertificateAuthorityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -844,10 +830,9 @@ const de_DescribeCertificateAuthorityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -870,7 +855,7 @@ export const de_DescribeCertificateAuthorityAuditReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -897,10 +882,9 @@ const de_DescribeCertificateAuthorityAuditReportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -918,12 +902,12 @@ export const de_GetCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCertificateResponse(data, context); + contents = _json(data); const response: GetCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -956,10 +940,9 @@ const de_GetCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -977,12 +960,12 @@ export const de_GetCertificateAuthorityCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCertificateAuthorityCertificateResponse(data, context); + contents = _json(data); const response: GetCertificateAuthorityCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1009,10 +992,9 @@ const de_GetCertificateAuthorityCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1030,12 +1012,12 @@ export const de_GetCertificateAuthorityCsrCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCertificateAuthorityCsrResponse(data, context); + contents = _json(data); const response: GetCertificateAuthorityCsrCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1068,10 +1050,9 @@ const de_GetCertificateAuthorityCsrCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1089,12 +1070,12 @@ export const de_GetPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPolicyResponse(data, context); + contents = _json(data); const response: GetPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1124,10 +1105,9 @@ const de_GetPolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,7 +1127,7 @@ export const de_ImportCertificateAuthorityCertificateCommand = async ( const response: ImportCertificateAuthorityCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1192,10 +1172,9 @@ const de_ImportCertificateAuthorityCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1213,12 +1192,12 @@ export const de_IssueCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_IssueCertificateResponse(data, context); + contents = _json(data); const response: IssueCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1254,10 +1233,9 @@ const de_IssueCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1280,7 +1258,7 @@ export const de_ListCertificateAuthoritiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1301,10 +1279,9 @@ const de_ListCertificateAuthoritiesCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1327,7 +1304,7 @@ export const de_ListPermissionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1360,10 +1337,9 @@ const de_ListPermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1381,12 +1357,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResponse(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1413,10 +1389,9 @@ const de_ListTagsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1436,7 +1411,7 @@ export const de_PutPolicyCommand = async ( const response: PutPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1475,10 +1450,9 @@ const de_PutPolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1498,7 +1472,7 @@ export const de_RestoreCertificateAuthorityCommand = async ( const response: RestoreCertificateAuthorityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1525,10 +1499,9 @@ const de_RestoreCertificateAuthorityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1548,7 +1521,7 @@ export const de_RevokeCertificateCommand = async ( const response: RevokeCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1593,10 +1566,9 @@ const de_RevokeCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1616,7 +1588,7 @@ export const de_TagCertificateAuthorityCommand = async ( const response: TagCertificateAuthorityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1649,10 +1621,9 @@ const de_TagCertificateAuthorityCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1672,7 +1643,7 @@ export const de_UntagCertificateAuthorityCommand = async ( const response: UntagCertificateAuthorityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1702,10 +1673,9 @@ const de_UntagCertificateAuthorityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1725,7 +1695,7 @@ export const de_UpdateCertificateAuthorityCommand = async ( const response: UpdateCertificateAuthorityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1761,10 +1731,9 @@ const de_UpdateCertificateAuthorityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1778,7 +1747,7 @@ const de_CertificateMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CertificateMismatchException(body, context); + const deserialized: any = _json(body); const exception = new CertificateMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1794,7 +1763,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1810,7 +1779,7 @@ const de_InvalidArgsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1823,7 +1792,7 @@ const de_InvalidArgsExceptionRes = async ( */ const de_InvalidArnExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1839,7 +1808,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1855,7 +1824,7 @@ const de_InvalidPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1871,7 +1840,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1887,7 +1856,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1900,7 +1869,7 @@ const de_InvalidStateExceptionRes = async ( */ const de_InvalidTagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1916,7 +1885,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1932,7 +1901,7 @@ const de_LockoutPreventedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LockoutPreventedException(body, context); + const deserialized: any = _json(body); const exception = new LockoutPreventedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1948,7 +1917,7 @@ const de_MalformedCertificateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedCertificateException(body, context); + const deserialized: any = _json(body); const exception = new MalformedCertificateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1964,7 +1933,7 @@ const de_MalformedCSRExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedCSRException(body, context); + const deserialized: any = _json(body); const exception = new MalformedCSRException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1980,7 +1949,7 @@ const de_PermissionAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PermissionAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new PermissionAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1996,7 +1965,7 @@ const de_RequestAlreadyProcessedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestAlreadyProcessedException(body, context); + const deserialized: any = _json(body); const exception = new RequestAlreadyProcessedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2012,7 +1981,7 @@ const de_RequestFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestFailedException(body, context); + const deserialized: any = _json(body); const exception = new RequestFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2028,7 +1997,7 @@ const de_RequestInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestInProgressException(body, context); + const deserialized: any = _json(body); const exception = new RequestInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2044,7 +2013,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2060,7 +2029,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2068,411 +2037,69 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccessDescription - */ -const se_AccessDescription = (input: AccessDescription, context: __SerdeContext): any => { - return { - ...(input.AccessLocation != null && { AccessLocation: se_GeneralName(input.AccessLocation, context) }), - ...(input.AccessMethod != null && { AccessMethod: se_AccessMethod(input.AccessMethod, context) }), - }; -}; +// se_AccessDescription omitted. -/** - * serializeAws_json1_1AccessDescriptionList - */ -const se_AccessDescriptionList = (input: AccessDescription[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AccessDescription(entry, context); - }); -}; +// se_AccessDescriptionList omitted. -/** - * serializeAws_json1_1AccessMethod - */ -const se_AccessMethod = (input: AccessMethod, context: __SerdeContext): any => { - return { - ...(input.AccessMethodType != null && { AccessMethodType: input.AccessMethodType }), - ...(input.CustomObjectIdentifier != null && { CustomObjectIdentifier: input.CustomObjectIdentifier }), - }; -}; +// se_AccessMethod omitted. -/** - * serializeAws_json1_1ActionList - */ -const se_ActionList = (input: (ActionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ActionList omitted. -/** - * serializeAws_json1_1ApiPassthrough - */ -const se_ApiPassthrough = (input: ApiPassthrough, context: __SerdeContext): any => { - return { - ...(input.Extensions != null && { Extensions: se_Extensions(input.Extensions, context) }), - ...(input.Subject != null && { Subject: se_ASN1Subject(input.Subject, context) }), - }; -}; +// se_ApiPassthrough omitted. -/** - * serializeAws_json1_1ASN1Subject - */ -const se_ASN1Subject = (input: ASN1Subject, context: __SerdeContext): any => { - return { - ...(input.CommonName != null && { CommonName: input.CommonName }), - ...(input.Country != null && { Country: input.Country }), - ...(input.CustomAttributes != null && { - CustomAttributes: se_CustomAttributeList(input.CustomAttributes, context), - }), - ...(input.DistinguishedNameQualifier != null && { DistinguishedNameQualifier: input.DistinguishedNameQualifier }), - ...(input.GenerationQualifier != null && { GenerationQualifier: input.GenerationQualifier }), - ...(input.GivenName != null && { GivenName: input.GivenName }), - ...(input.Initials != null && { Initials: input.Initials }), - ...(input.Locality != null && { Locality: input.Locality }), - ...(input.Organization != null && { Organization: input.Organization }), - ...(input.OrganizationalUnit != null && { OrganizationalUnit: input.OrganizationalUnit }), - ...(input.Pseudonym != null && { Pseudonym: input.Pseudonym }), - ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }), - ...(input.State != null && { State: input.State }), - ...(input.Surname != null && { Surname: input.Surname }), - ...(input.Title != null && { Title: input.Title }), - }; -}; +// se_ASN1Subject omitted. -/** - * serializeAws_json1_1CertificateAuthorityConfiguration - */ -const se_CertificateAuthorityConfiguration = ( - input: CertificateAuthorityConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CsrExtensions != null && { CsrExtensions: se_CsrExtensions(input.CsrExtensions, context) }), - ...(input.KeyAlgorithm != null && { KeyAlgorithm: input.KeyAlgorithm }), - ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }), - ...(input.Subject != null && { Subject: se_ASN1Subject(input.Subject, context) }), - }; -}; +// se_CertificateAuthorityConfiguration omitted. -/** - * serializeAws_json1_1CertificatePolicyList - */ -const se_CertificatePolicyList = (input: PolicyInformation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PolicyInformation(entry, context); - }); -}; +// se_CertificatePolicyList omitted. -/** - * serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest - */ -const se_CreateCertificateAuthorityAuditReportRequest = ( - input: CreateCertificateAuthorityAuditReportRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuditReportResponseFormat != null && { AuditReportResponseFormat: input.AuditReportResponseFormat }), - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - }; -}; +// se_CreateCertificateAuthorityAuditReportRequest omitted. -/** - * serializeAws_json1_1CreateCertificateAuthorityRequest - */ -const se_CreateCertificateAuthorityRequest = ( - input: CreateCertificateAuthorityRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityConfiguration != null && { - CertificateAuthorityConfiguration: se_CertificateAuthorityConfiguration( - input.CertificateAuthorityConfiguration, - context - ), - }), - ...(input.CertificateAuthorityType != null && { CertificateAuthorityType: input.CertificateAuthorityType }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.KeyStorageSecurityStandard != null && { KeyStorageSecurityStandard: input.KeyStorageSecurityStandard }), - ...(input.RevocationConfiguration != null && { - RevocationConfiguration: se_RevocationConfiguration(input.RevocationConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UsageMode != null && { UsageMode: input.UsageMode }), - }; -}; +// se_CreateCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1CreatePermissionRequest - */ -const se_CreatePermissionRequest = (input: CreatePermissionRequest, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_ActionList(input.Actions, context) }), - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Principal != null && { Principal: input.Principal }), - ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }), - }; -}; +// se_CreatePermissionRequest omitted. -/** - * serializeAws_json1_1CrlConfiguration - */ -const se_CrlConfiguration = (input: CrlConfiguration, context: __SerdeContext): any => { - return { - ...(input.CustomCname != null && { CustomCname: input.CustomCname }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.ExpirationInDays != null && { ExpirationInDays: input.ExpirationInDays }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3ObjectAcl != null && { S3ObjectAcl: input.S3ObjectAcl }), - }; -}; +// se_CrlConfiguration omitted. -/** - * serializeAws_json1_1CsrExtensions - */ -const se_CsrExtensions = (input: CsrExtensions, context: __SerdeContext): any => { - return { - ...(input.KeyUsage != null && { KeyUsage: se_KeyUsage(input.KeyUsage, context) }), - ...(input.SubjectInformationAccess != null && { - SubjectInformationAccess: se_AccessDescriptionList(input.SubjectInformationAccess, context), - }), - }; -}; +// se_CsrExtensions omitted. -/** - * serializeAws_json1_1CustomAttribute - */ -const se_CustomAttribute = (input: CustomAttribute, context: __SerdeContext): any => { - return { - ...(input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_CustomAttribute omitted. -/** - * serializeAws_json1_1CustomAttributeList - */ -const se_CustomAttributeList = (input: CustomAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomAttribute(entry, context); - }); -}; +// se_CustomAttributeList omitted. -/** - * serializeAws_json1_1CustomExtension - */ -const se_CustomExtension = (input: CustomExtension, context: __SerdeContext): any => { - return { - ...(input.Critical != null && { Critical: input.Critical }), - ...(input.ObjectIdentifier != null && { ObjectIdentifier: input.ObjectIdentifier }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_CustomExtension omitted. -/** - * serializeAws_json1_1CustomExtensionList - */ -const se_CustomExtensionList = (input: CustomExtension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomExtension(entry, context); - }); -}; +// se_CustomExtensionList omitted. -/** - * serializeAws_json1_1DeleteCertificateAuthorityRequest - */ -const se_DeleteCertificateAuthorityRequest = ( - input: DeleteCertificateAuthorityRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.PermanentDeletionTimeInDays != null && { - PermanentDeletionTimeInDays: input.PermanentDeletionTimeInDays, - }), - }; -}; +// se_DeleteCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1DeletePermissionRequest - */ -const se_DeletePermissionRequest = (input: DeletePermissionRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Principal != null && { Principal: input.Principal }), - ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }), - }; -}; +// se_DeletePermissionRequest omitted. -/** - * serializeAws_json1_1DeletePolicyRequest - */ -const se_DeletePolicyRequest = (input: DeletePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeletePolicyRequest omitted. -/** - * serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest - */ -const se_DescribeCertificateAuthorityAuditReportRequest = ( - input: DescribeCertificateAuthorityAuditReportRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuditReportId != null && { AuditReportId: input.AuditReportId }), - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - }; -}; +// se_DescribeCertificateAuthorityAuditReportRequest omitted. -/** - * serializeAws_json1_1DescribeCertificateAuthorityRequest - */ -const se_DescribeCertificateAuthorityRequest = ( - input: DescribeCertificateAuthorityRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - }; -}; +// se_DescribeCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1EdiPartyName - */ -const se_EdiPartyName = (input: EdiPartyName, context: __SerdeContext): any => { - return { - ...(input.NameAssigner != null && { NameAssigner: input.NameAssigner }), - ...(input.PartyName != null && { PartyName: input.PartyName }), - }; -}; +// se_EdiPartyName omitted. -/** - * serializeAws_json1_1ExtendedKeyUsage - */ -const se_ExtendedKeyUsage = (input: ExtendedKeyUsage, context: __SerdeContext): any => { - return { - ...(input.ExtendedKeyUsageObjectIdentifier != null && { - ExtendedKeyUsageObjectIdentifier: input.ExtendedKeyUsageObjectIdentifier, - }), - ...(input.ExtendedKeyUsageType != null && { ExtendedKeyUsageType: input.ExtendedKeyUsageType }), - }; -}; +// se_ExtendedKeyUsage omitted. -/** - * serializeAws_json1_1ExtendedKeyUsageList - */ -const se_ExtendedKeyUsageList = (input: ExtendedKeyUsage[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExtendedKeyUsage(entry, context); - }); -}; +// se_ExtendedKeyUsageList omitted. -/** - * serializeAws_json1_1Extensions - */ -const se_Extensions = (input: Extensions, context: __SerdeContext): any => { - return { - ...(input.CertificatePolicies != null && { - CertificatePolicies: se_CertificatePolicyList(input.CertificatePolicies, context), - }), - ...(input.CustomExtensions != null && { - CustomExtensions: se_CustomExtensionList(input.CustomExtensions, context), - }), - ...(input.ExtendedKeyUsage != null && { - ExtendedKeyUsage: se_ExtendedKeyUsageList(input.ExtendedKeyUsage, context), - }), - ...(input.KeyUsage != null && { KeyUsage: se_KeyUsage(input.KeyUsage, context) }), - ...(input.SubjectAlternativeNames != null && { - SubjectAlternativeNames: se_GeneralNameList(input.SubjectAlternativeNames, context), - }), - }; -}; +// se_Extensions omitted. -/** - * serializeAws_json1_1GeneralName - */ -const se_GeneralName = (input: GeneralName, context: __SerdeContext): any => { - return { - ...(input.DirectoryName != null && { DirectoryName: se_ASN1Subject(input.DirectoryName, context) }), - ...(input.DnsName != null && { DnsName: input.DnsName }), - ...(input.EdiPartyName != null && { EdiPartyName: se_EdiPartyName(input.EdiPartyName, context) }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.OtherName != null && { OtherName: se_OtherName(input.OtherName, context) }), - ...(input.RegisteredId != null && { RegisteredId: input.RegisteredId }), - ...(input.Rfc822Name != null && { Rfc822Name: input.Rfc822Name }), - ...(input.UniformResourceIdentifier != null && { UniformResourceIdentifier: input.UniformResourceIdentifier }), - }; -}; +// se_GeneralName omitted. -/** - * serializeAws_json1_1GeneralNameList - */ -const se_GeneralNameList = (input: GeneralName[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GeneralName(entry, context); - }); -}; +// se_GeneralNameList omitted. -/** - * serializeAws_json1_1GetCertificateAuthorityCertificateRequest - */ -const se_GetCertificateAuthorityCertificateRequest = ( - input: GetCertificateAuthorityCertificateRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - }; -}; +// se_GetCertificateAuthorityCertificateRequest omitted. -/** - * serializeAws_json1_1GetCertificateAuthorityCsrRequest - */ -const se_GetCertificateAuthorityCsrRequest = ( - input: GetCertificateAuthorityCsrRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - }; -}; +// se_GetCertificateAuthorityCsrRequest omitted. -/** - * serializeAws_json1_1GetCertificateRequest - */ -const se_GetCertificateRequest = (input: GetCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - }; -}; +// se_GetCertificateRequest omitted. -/** - * serializeAws_json1_1GetPolicyRequest - */ -const se_GetPolicyRequest = (input: GetPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetPolicyRequest omitted. /** * serializeAws_json1_1ImportCertificateAuthorityCertificateRequest @@ -2481,329 +2108,78 @@ const se_ImportCertificateAuthorityCertificateRequest = ( input: ImportCertificateAuthorityCertificateRequest, context: __SerdeContext ): any => { - return { - ...(input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) }), - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) }), - }; + return take(input, { + Certificate: context.base64Encoder, + CertificateAuthorityArn: [], + CertificateChain: context.base64Encoder, + }); }; /** * serializeAws_json1_1IssueCertificateRequest */ const se_IssueCertificateRequest = (input: IssueCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.ApiPassthrough != null && { ApiPassthrough: se_ApiPassthrough(input.ApiPassthrough, context) }), - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Csr != null && { Csr: context.base64Encoder(input.Csr) }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }), - ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }), - ...(input.Validity != null && { Validity: se_Validity(input.Validity, context) }), - ...(input.ValidityNotBefore != null && { ValidityNotBefore: se_Validity(input.ValidityNotBefore, context) }), - }; + return take(input, { + ApiPassthrough: _json, + CertificateAuthorityArn: [], + Csr: context.base64Encoder, + IdempotencyToken: [], + SigningAlgorithm: [], + TemplateArn: [], + Validity: _json, + ValidityNotBefore: _json, + }); }; -/** - * serializeAws_json1_1KeyUsage - */ -const se_KeyUsage = (input: KeyUsage, context: __SerdeContext): any => { - return { - ...(input.CRLSign != null && { CRLSign: input.CRLSign }), - ...(input.DataEncipherment != null && { DataEncipherment: input.DataEncipherment }), - ...(input.DecipherOnly != null && { DecipherOnly: input.DecipherOnly }), - ...(input.DigitalSignature != null && { DigitalSignature: input.DigitalSignature }), - ...(input.EncipherOnly != null && { EncipherOnly: input.EncipherOnly }), - ...(input.KeyAgreement != null && { KeyAgreement: input.KeyAgreement }), - ...(input.KeyCertSign != null && { KeyCertSign: input.KeyCertSign }), - ...(input.KeyEncipherment != null && { KeyEncipherment: input.KeyEncipherment }), - ...(input.NonRepudiation != null && { NonRepudiation: input.NonRepudiation }), - }; -}; +// se_KeyUsage omitted. -/** - * serializeAws_json1_1ListCertificateAuthoritiesRequest - */ -const se_ListCertificateAuthoritiesRequest = ( - input: ListCertificateAuthoritiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceOwner != null && { ResourceOwner: input.ResourceOwner }), - }; -}; +// se_ListCertificateAuthoritiesRequest omitted. -/** - * serializeAws_json1_1ListPermissionsRequest - */ -const se_ListPermissionsRequest = (input: ListPermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPermissionsRequest omitted. -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTagsRequest omitted. -/** - * serializeAws_json1_1OcspConfiguration - */ -const se_OcspConfiguration = (input: OcspConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.OcspCustomCname != null && { OcspCustomCname: input.OcspCustomCname }), - }; -}; +// se_OcspConfiguration omitted. -/** - * serializeAws_json1_1OtherName - */ -const se_OtherName = (input: OtherName, context: __SerdeContext): any => { - return { - ...(input.TypeId != null && { TypeId: input.TypeId }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_OtherName omitted. -/** - * serializeAws_json1_1PolicyInformation - */ -const se_PolicyInformation = (input: PolicyInformation, context: __SerdeContext): any => { - return { - ...(input.CertPolicyId != null && { CertPolicyId: input.CertPolicyId }), - ...(input.PolicyQualifiers != null && { - PolicyQualifiers: se_PolicyQualifierInfoList(input.PolicyQualifiers, context), - }), - }; -}; +// se_PolicyInformation omitted. -/** - * serializeAws_json1_1PolicyQualifierInfo - */ -const se_PolicyQualifierInfo = (input: PolicyQualifierInfo, context: __SerdeContext): any => { - return { - ...(input.PolicyQualifierId != null && { PolicyQualifierId: input.PolicyQualifierId }), - ...(input.Qualifier != null && { Qualifier: se_Qualifier(input.Qualifier, context) }), - }; -}; +// se_PolicyQualifierInfo omitted. -/** - * serializeAws_json1_1PolicyQualifierInfoList - */ -const se_PolicyQualifierInfoList = (input: PolicyQualifierInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PolicyQualifierInfo(entry, context); - }); -}; +// se_PolicyQualifierInfoList omitted. -/** - * serializeAws_json1_1PutPolicyRequest - */ -const se_PutPolicyRequest = (input: PutPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_PutPolicyRequest omitted. -/** - * serializeAws_json1_1Qualifier - */ -const se_Qualifier = (input: Qualifier, context: __SerdeContext): any => { - return { - ...(input.CpsUri != null && { CpsUri: input.CpsUri }), - }; -}; +// se_Qualifier omitted. -/** - * serializeAws_json1_1RestoreCertificateAuthorityRequest - */ -const se_RestoreCertificateAuthorityRequest = ( - input: RestoreCertificateAuthorityRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - }; -}; +// se_RestoreCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1RevocationConfiguration - */ -const se_RevocationConfiguration = (input: RevocationConfiguration, context: __SerdeContext): any => { - return { - ...(input.CrlConfiguration != null && { CrlConfiguration: se_CrlConfiguration(input.CrlConfiguration, context) }), - ...(input.OcspConfiguration != null && { - OcspConfiguration: se_OcspConfiguration(input.OcspConfiguration, context), - }), - }; -}; +// se_RevocationConfiguration omitted. -/** - * serializeAws_json1_1RevokeCertificateRequest - */ -const se_RevokeCertificateRequest = (input: RevokeCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.CertificateSerial != null && { CertificateSerial: input.CertificateSerial }), - ...(input.RevocationReason != null && { RevocationReason: input.RevocationReason }), - }; -}; +// se_RevokeCertificateRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagCertificateAuthorityRequest - */ -const se_TagCertificateAuthorityRequest = (input: TagCertificateAuthorityRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1UntagCertificateAuthorityRequest - */ -const se_UntagCertificateAuthorityRequest = (input: UntagCertificateAuthorityRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_UntagCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1UpdateCertificateAuthorityRequest - */ -const se_UpdateCertificateAuthorityRequest = ( - input: UpdateCertificateAuthorityRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.RevocationConfiguration != null && { - RevocationConfiguration: se_RevocationConfiguration(input.RevocationConfiguration, context), - }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_UpdateCertificateAuthorityRequest omitted. -/** - * serializeAws_json1_1Validity - */ -const se_Validity = (input: Validity, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Validity omitted. -/** - * deserializeAws_json1_1AccessDescription - */ -const de_AccessDescription = (output: any, context: __SerdeContext): AccessDescription => { - return { - AccessLocation: output.AccessLocation != null ? de_GeneralName(output.AccessLocation, context) : undefined, - AccessMethod: output.AccessMethod != null ? de_AccessMethod(output.AccessMethod, context) : undefined, - } as any; -}; +// de_AccessDescription omitted. -/** - * deserializeAws_json1_1AccessDescriptionList - */ -const de_AccessDescriptionList = (output: any, context: __SerdeContext): AccessDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessDescription(entry, context); - }); - return retVal; -}; +// de_AccessDescriptionList omitted. -/** - * deserializeAws_json1_1AccessMethod - */ -const de_AccessMethod = (output: any, context: __SerdeContext): AccessMethod => { - return { - AccessMethodType: __expectString(output.AccessMethodType), - CustomObjectIdentifier: __expectString(output.CustomObjectIdentifier), - } as any; -}; +// de_AccessMethod omitted. -/** - * deserializeAws_json1_1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): (ActionType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ActionList omitted. -/** - * deserializeAws_json1_1ASN1Subject - */ -const de_ASN1Subject = (output: any, context: __SerdeContext): ASN1Subject => { - return { - CommonName: __expectString(output.CommonName), - Country: __expectString(output.Country), - CustomAttributes: - output.CustomAttributes != null ? de_CustomAttributeList(output.CustomAttributes, context) : undefined, - DistinguishedNameQualifier: __expectString(output.DistinguishedNameQualifier), - GenerationQualifier: __expectString(output.GenerationQualifier), - GivenName: __expectString(output.GivenName), - Initials: __expectString(output.Initials), - Locality: __expectString(output.Locality), - Organization: __expectString(output.Organization), - OrganizationalUnit: __expectString(output.OrganizationalUnit), - Pseudonym: __expectString(output.Pseudonym), - SerialNumber: __expectString(output.SerialNumber), - State: __expectString(output.State), - Surname: __expectString(output.Surname), - Title: __expectString(output.Title), - } as any; -}; +// de_ASN1Subject omitted. /** * deserializeAws_json1_1CertificateAuthorities @@ -2812,9 +2188,6 @@ const de_CertificateAuthorities = (output: any, context: __SerdeContext): Certif const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CertificateAuthority(entry, context); }); return retVal; @@ -2824,148 +2197,42 @@ const de_CertificateAuthorities = (output: any, context: __SerdeContext): Certif * deserializeAws_json1_1CertificateAuthority */ const de_CertificateAuthority = (output: any, context: __SerdeContext): CertificateAuthority => { - return { - Arn: __expectString(output.Arn), - CertificateAuthorityConfiguration: - output.CertificateAuthorityConfiguration != null - ? de_CertificateAuthorityConfiguration(output.CertificateAuthorityConfiguration, context) - : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - FailureReason: __expectString(output.FailureReason), - KeyStorageSecurityStandard: __expectString(output.KeyStorageSecurityStandard), - LastStateChangeAt: - output.LastStateChangeAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStateChangeAt))) - : undefined, - NotAfter: - output.NotAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfter))) : undefined, - NotBefore: - output.NotBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBefore))) : undefined, - OwnerAccount: __expectString(output.OwnerAccount), - RestorableUntil: - output.RestorableUntil != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RestorableUntil))) - : undefined, - RevocationConfiguration: - output.RevocationConfiguration != null - ? de_RevocationConfiguration(output.RevocationConfiguration, context) - : undefined, - Serial: __expectString(output.Serial), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - UsageMode: __expectString(output.UsageMode), - } as any; -}; - -/** - * deserializeAws_json1_1CertificateAuthorityConfiguration - */ -const de_CertificateAuthorityConfiguration = ( - output: any, - context: __SerdeContext -): CertificateAuthorityConfiguration => { - return { - CsrExtensions: output.CsrExtensions != null ? de_CsrExtensions(output.CsrExtensions, context) : undefined, - KeyAlgorithm: __expectString(output.KeyAlgorithm), - SigningAlgorithm: __expectString(output.SigningAlgorithm), - Subject: output.Subject != null ? de_ASN1Subject(output.Subject, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CertificateAuthorityConfiguration: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + KeyStorageSecurityStandard: __expectString, + LastStateChangeAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwnerAccount: __expectString, + RestorableUntil: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RevocationConfiguration: _json, + Serial: __expectString, + Status: __expectString, + Type: __expectString, + UsageMode: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1CertificateMismatchException - */ -const de_CertificateMismatchException = (output: any, context: __SerdeContext): CertificateMismatchException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CertificateAuthorityConfiguration omitted. -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CertificateMismatchException omitted. -/** - * deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse - */ -const de_CreateCertificateAuthorityAuditReportResponse = ( - output: any, - context: __SerdeContext -): CreateCertificateAuthorityAuditReportResponse => { - return { - AuditReportId: __expectString(output.AuditReportId), - S3Key: __expectString(output.S3Key), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1CreateCertificateAuthorityResponse - */ -const de_CreateCertificateAuthorityResponse = ( - output: any, - context: __SerdeContext -): CreateCertificateAuthorityResponse => { - return { - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - } as any; -}; +// de_CreateCertificateAuthorityAuditReportResponse omitted. -/** - * deserializeAws_json1_1CrlConfiguration - */ -const de_CrlConfiguration = (output: any, context: __SerdeContext): CrlConfiguration => { - return { - CustomCname: __expectString(output.CustomCname), - Enabled: __expectBoolean(output.Enabled), - ExpirationInDays: __expectInt32(output.ExpirationInDays), - S3BucketName: __expectString(output.S3BucketName), - S3ObjectAcl: __expectString(output.S3ObjectAcl), - } as any; -}; +// de_CreateCertificateAuthorityResponse omitted. -/** - * deserializeAws_json1_1CsrExtensions - */ -const de_CsrExtensions = (output: any, context: __SerdeContext): CsrExtensions => { - return { - KeyUsage: output.KeyUsage != null ? de_KeyUsage(output.KeyUsage, context) : undefined, - SubjectInformationAccess: - output.SubjectInformationAccess != null - ? de_AccessDescriptionList(output.SubjectInformationAccess, context) - : undefined, - } as any; -}; +// de_CrlConfiguration omitted. -/** - * deserializeAws_json1_1CustomAttribute - */ -const de_CustomAttribute = (output: any, context: __SerdeContext): CustomAttribute => { - return { - ObjectIdentifier: __expectString(output.ObjectIdentifier), - Value: __expectString(output.Value), - } as any; -}; +// de_CsrExtensions omitted. -/** - * deserializeAws_json1_1CustomAttributeList - */ -const de_CustomAttributeList = (output: any, context: __SerdeContext): CustomAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomAttribute(entry, context); - }); - return retVal; -}; +// de_CustomAttribute omitted. + +// de_CustomAttributeList omitted. /** * deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse @@ -2974,13 +2241,12 @@ const de_DescribeCertificateAuthorityAuditReportResponse = ( output: any, context: __SerdeContext ): DescribeCertificateAuthorityAuditReportResponse => { - return { - AuditReportStatus: __expectString(output.AuditReportStatus), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - S3BucketName: __expectString(output.S3BucketName), - S3Key: __expectString(output.S3Key), - } as any; + return take(output, { + AuditReportStatus: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + S3BucketName: __expectString, + S3Key: __expectString, + }) as any; }; /** @@ -2990,179 +2256,42 @@ const de_DescribeCertificateAuthorityResponse = ( output: any, context: __SerdeContext ): DescribeCertificateAuthorityResponse => { - return { - CertificateAuthority: - output.CertificateAuthority != null ? de_CertificateAuthority(output.CertificateAuthority, context) : undefined, - } as any; + return take(output, { + CertificateAuthority: (_: any) => de_CertificateAuthority(_, context), + }) as any; }; -/** - * deserializeAws_json1_1EdiPartyName - */ -const de_EdiPartyName = (output: any, context: __SerdeContext): EdiPartyName => { - return { - NameAssigner: __expectString(output.NameAssigner), - PartyName: __expectString(output.PartyName), - } as any; -}; +// de_EdiPartyName omitted. -/** - * deserializeAws_json1_1GeneralName - */ -const de_GeneralName = (output: any, context: __SerdeContext): GeneralName => { - return { - DirectoryName: output.DirectoryName != null ? de_ASN1Subject(output.DirectoryName, context) : undefined, - DnsName: __expectString(output.DnsName), - EdiPartyName: output.EdiPartyName != null ? de_EdiPartyName(output.EdiPartyName, context) : undefined, - IpAddress: __expectString(output.IpAddress), - OtherName: output.OtherName != null ? de_OtherName(output.OtherName, context) : undefined, - RegisteredId: __expectString(output.RegisteredId), - Rfc822Name: __expectString(output.Rfc822Name), - UniformResourceIdentifier: __expectString(output.UniformResourceIdentifier), - } as any; -}; +// de_GeneralName omitted. -/** - * deserializeAws_json1_1GetCertificateAuthorityCertificateResponse - */ -const de_GetCertificateAuthorityCertificateResponse = ( - output: any, - context: __SerdeContext -): GetCertificateAuthorityCertificateResponse => { - return { - Certificate: __expectString(output.Certificate), - CertificateChain: __expectString(output.CertificateChain), - } as any; -}; +// de_GetCertificateAuthorityCertificateResponse omitted. -/** - * deserializeAws_json1_1GetCertificateAuthorityCsrResponse - */ -const de_GetCertificateAuthorityCsrResponse = ( - output: any, - context: __SerdeContext -): GetCertificateAuthorityCsrResponse => { - return { - Csr: __expectString(output.Csr), - } as any; -}; +// de_GetCertificateAuthorityCsrResponse omitted. -/** - * deserializeAws_json1_1GetCertificateResponse - */ -const de_GetCertificateResponse = (output: any, context: __SerdeContext): GetCertificateResponse => { - return { - Certificate: __expectString(output.Certificate), - CertificateChain: __expectString(output.CertificateChain), - } as any; -}; +// de_GetCertificateResponse omitted. -/** - * deserializeAws_json1_1GetPolicyResponse - */ -const de_GetPolicyResponse = (output: any, context: __SerdeContext): GetPolicyResponse => { - return { - Policy: __expectString(output.Policy), - } as any; -}; +// de_GetPolicyResponse omitted. -/** - * deserializeAws_json1_1InvalidArgsException - */ -const de_InvalidArgsException = (output: any, context: __SerdeContext): InvalidArgsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidArgsException omitted. -/** - * deserializeAws_json1_1InvalidArnException - */ -const de_InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidArnException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidPolicyException - */ -const de_InvalidPolicyException = (output: any, context: __SerdeContext): InvalidPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPolicyException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidStateException omitted. -/** - * deserializeAws_json1_1InvalidTagException - */ -const de_InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTagException omitted. -/** - * deserializeAws_json1_1IssueCertificateResponse - */ -const de_IssueCertificateResponse = (output: any, context: __SerdeContext): IssueCertificateResponse => { - return { - CertificateArn: __expectString(output.CertificateArn), - } as any; -}; +// de_IssueCertificateResponse omitted. -/** - * deserializeAws_json1_1KeyUsage - */ -const de_KeyUsage = (output: any, context: __SerdeContext): KeyUsage => { - return { - CRLSign: __expectBoolean(output.CRLSign), - DataEncipherment: __expectBoolean(output.DataEncipherment), - DecipherOnly: __expectBoolean(output.DecipherOnly), - DigitalSignature: __expectBoolean(output.DigitalSignature), - EncipherOnly: __expectBoolean(output.EncipherOnly), - KeyAgreement: __expectBoolean(output.KeyAgreement), - KeyCertSign: __expectBoolean(output.KeyCertSign), - KeyEncipherment: __expectBoolean(output.KeyEncipherment), - NonRepudiation: __expectBoolean(output.NonRepudiation), - } as any; -}; +// de_KeyUsage omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListCertificateAuthoritiesResponse @@ -3171,108 +2300,49 @@ const de_ListCertificateAuthoritiesResponse = ( output: any, context: __SerdeContext ): ListCertificateAuthoritiesResponse => { - return { - CertificateAuthorities: - output.CertificateAuthorities != null - ? de_CertificateAuthorities(output.CertificateAuthorities, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + CertificateAuthorities: (_: any) => de_CertificateAuthorities(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListPermissionsResponse */ const de_ListPermissionsResponse = (output: any, context: __SerdeContext): ListPermissionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Permissions: output.Permissions != null ? de_PermissionList(output.Permissions, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Permissions: (_: any) => de_PermissionList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsResponse - */ -const de_ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsResponse omitted. -/** - * deserializeAws_json1_1LockoutPreventedException - */ -const de_LockoutPreventedException = (output: any, context: __SerdeContext): LockoutPreventedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LockoutPreventedException omitted. -/** - * deserializeAws_json1_1MalformedCertificateException - */ -const de_MalformedCertificateException = (output: any, context: __SerdeContext): MalformedCertificateException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MalformedCertificateException omitted. -/** - * deserializeAws_json1_1MalformedCSRException - */ -const de_MalformedCSRException = (output: any, context: __SerdeContext): MalformedCSRException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MalformedCSRException omitted. -/** - * deserializeAws_json1_1OcspConfiguration - */ -const de_OcspConfiguration = (output: any, context: __SerdeContext): OcspConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - OcspCustomCname: __expectString(output.OcspCustomCname), - } as any; -}; +// de_OcspConfiguration omitted. -/** - * deserializeAws_json1_1OtherName - */ -const de_OtherName = (output: any, context: __SerdeContext): OtherName => { - return { - TypeId: __expectString(output.TypeId), - Value: __expectString(output.Value), - } as any; -}; +// de_OtherName omitted. /** * deserializeAws_json1_1Permission */ const de_Permission = (output: any, context: __SerdeContext): Permission => { - return { - Actions: output.Actions != null ? de_ActionList(output.Actions, context) : undefined, - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Policy: __expectString(output.Policy), - Principal: __expectString(output.Principal), - SourceAccount: __expectString(output.SourceAccount), - } as any; + return take(output, { + Actions: _json, + CertificateAuthorityArn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Policy: __expectString, + Principal: __expectString, + SourceAccount: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PermissionAlreadyExistsException - */ -const de_PermissionAlreadyExistsException = ( - output: any, - context: __SerdeContext -): PermissionAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PermissionAlreadyExistsException omitted. /** * deserializeAws_json1_1PermissionList @@ -3281,98 +2351,26 @@ const de_PermissionList = (output: any, context: __SerdeContext): Permission[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Permission(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RequestAlreadyProcessedException - */ -const de_RequestAlreadyProcessedException = ( - output: any, - context: __SerdeContext -): RequestAlreadyProcessedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RequestAlreadyProcessedException omitted. -/** - * deserializeAws_json1_1RequestFailedException - */ -const de_RequestFailedException = (output: any, context: __SerdeContext): RequestFailedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RequestFailedException omitted. -/** - * deserializeAws_json1_1RequestInProgressException - */ -const de_RequestInProgressException = (output: any, context: __SerdeContext): RequestInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RequestInProgressException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1RevocationConfiguration - */ -const de_RevocationConfiguration = (output: any, context: __SerdeContext): RevocationConfiguration => { - return { - CrlConfiguration: - output.CrlConfiguration != null ? de_CrlConfiguration(output.CrlConfiguration, context) : undefined, - OcspConfiguration: - output.OcspConfiguration != null ? de_OcspConfiguration(output.OcspConfiguration, context) : undefined, - } as any; -}; +// de_RevocationConfiguration omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3394,6 +2392,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-acm/src/protocols/Aws_json1_1.ts b/clients/client-acm/src/protocols/Aws_json1_1.ts index 9609ba1b7829..5516ca93e3cc 100644 --- a/clients/client-acm/src/protocols/Aws_json1_1.ts +++ b/clients/client-acm/src/protocols/Aws_json1_1.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -68,19 +69,13 @@ import { DeleteCertificateRequest, DescribeCertificateRequest, DescribeCertificateResponse, - DomainValidation, DomainValidationOption, ExpiryEventsConfiguration, ExportCertificateRequest, - ExportCertificateResponse, - ExtendedKeyUsage, ExtendedKeyUsageName, Filters, - GetAccountConfigurationResponse, GetCertificateRequest, - GetCertificateResponse, ImportCertificateRequest, - ImportCertificateResponse, InvalidArgsException, InvalidArnException, InvalidDomainValidationOptionsException, @@ -88,24 +83,20 @@ import { InvalidStateException, InvalidTagException, KeyAlgorithm, - KeyUsage, KeyUsageName, LimitExceededException, ListCertificatesRequest, ListCertificatesResponse, ListTagsForCertificateRequest, - ListTagsForCertificateResponse, PutAccountConfigurationRequest, RemoveTagsFromCertificateRequest, RenewalSummary, RenewCertificateRequest, RequestCertificateRequest, - RequestCertificateResponse, RequestInProgressException, ResendValidationEmailRequest, ResourceInUseException, ResourceNotFoundException, - ResourceRecord, Tag, TagPolicyException, ThrottlingException, @@ -123,7 +114,7 @@ export const se_AddTagsToCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToCertificate"); let body: any; - body = JSON.stringify(se_AddTagsToCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -136,7 +127,7 @@ export const se_DeleteCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCertificate"); let body: any; - body = JSON.stringify(se_DeleteCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -149,7 +140,7 @@ export const se_DescribeCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCertificate"); let body: any; - body = JSON.stringify(se_DescribeCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -187,7 +178,7 @@ export const se_GetCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCertificate"); let body: any; - body = JSON.stringify(se_GetCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -213,7 +204,7 @@ export const se_ListCertificatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCertificates"); let body: any; - body = JSON.stringify(se_ListCertificatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -226,7 +217,7 @@ export const se_ListTagsForCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForCertificate"); let body: any; - body = JSON.stringify(se_ListTagsForCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -239,7 +230,7 @@ export const se_PutAccountConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAccountConfiguration"); let body: any; - body = JSON.stringify(se_PutAccountConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -252,7 +243,7 @@ export const se_RemoveTagsFromCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromCertificate"); let body: any; - body = JSON.stringify(se_RemoveTagsFromCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -265,7 +256,7 @@ export const se_RenewCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RenewCertificate"); let body: any; - body = JSON.stringify(se_RenewCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -278,7 +269,7 @@ export const se_RequestCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RequestCertificate"); let body: any; - body = JSON.stringify(se_RequestCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -291,7 +282,7 @@ export const se_ResendValidationEmailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResendValidationEmail"); let body: any; - body = JSON.stringify(se_ResendValidationEmailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -304,7 +295,7 @@ export const se_UpdateCertificateOptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCertificateOptions"); let body: any; - body = JSON.stringify(se_UpdateCertificateOptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -322,7 +313,7 @@ export const de_AddTagsToCertificateCommand = async ( const response: AddTagsToCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -361,10 +352,9 @@ const de_AddTagsToCertificateCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -384,7 +374,7 @@ export const de_DeleteCertificateCommand = async ( const response: DeleteCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -420,10 +410,9 @@ const de_DeleteCertificateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -446,7 +435,7 @@ export const de_DescribeCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -470,10 +459,9 @@ const de_DescribeCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -491,12 +479,12 @@ export const de_ExportCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportCertificateResponse(data, context); + contents = _json(data); const response: ExportCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -523,10 +511,9 @@ const de_ExportCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -544,12 +531,12 @@ export const de_GetAccountConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAccountConfigurationResponse(data, context); + contents = _json(data); const response: GetAccountConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -573,10 +560,9 @@ const de_GetAccountConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -594,12 +580,12 @@ export const de_GetCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCertificateResponse(data, context); + contents = _json(data); const response: GetCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -626,10 +612,9 @@ const de_GetCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -647,12 +632,12 @@ export const de_ImportCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportCertificateResponse(data, context); + contents = _json(data); const response: ImportCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -691,10 +676,9 @@ const de_ImportCertificateCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -717,7 +701,7 @@ export const de_ListCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -741,10 +725,9 @@ const de_ListCertificatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -762,12 +745,12 @@ export const de_ListTagsForCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForCertificateResponse(data, context); + contents = _json(data); const response: ListTagsForCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -791,10 +774,9 @@ const de_ListTagsForCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -814,7 +796,7 @@ export const de_PutAccountConfigurationCommand = async ( const response: PutAccountConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -844,10 +826,9 @@ const de_PutAccountConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -867,7 +848,7 @@ export const de_RemoveTagsFromCertificateCommand = async ( const response: RemoveTagsFromCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -903,10 +884,9 @@ const de_RemoveTagsFromCertificateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -926,7 +906,7 @@ export const de_RenewCertificateCommand = async ( const response: RenewCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -950,10 +930,9 @@ const de_RenewCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -971,12 +950,12 @@ export const de_RequestCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RequestCertificateResponse(data, context); + contents = _json(data); const response: RequestCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1015,10 +994,9 @@ const de_RequestCertificateCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1038,7 +1016,7 @@ export const de_ResendValidationEmailCommand = async ( const response: ResendValidationEmailCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1068,10 +1046,9 @@ const de_ResendValidationEmailCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1091,7 +1068,7 @@ export const de_UpdateCertificateOptionsCommand = async ( const response: UpdateCertificateOptionsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1121,10 +1098,9 @@ const de_UpdateCertificateOptionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1138,7 +1114,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1151,7 +1127,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1167,7 +1143,7 @@ const de_InvalidArgsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1180,7 +1156,7 @@ const de_InvalidArgsExceptionRes = async ( */ const de_InvalidArnExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1196,7 +1172,7 @@ const de_InvalidDomainValidationOptionsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDomainValidationOptionsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDomainValidationOptionsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1212,7 +1188,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1228,7 +1204,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1241,7 +1217,7 @@ const de_InvalidStateExceptionRes = async ( */ const de_InvalidTagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1257,7 +1233,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1273,7 +1249,7 @@ const de_RequestInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestInProgressException(body, context); + const deserialized: any = _json(body); const exception = new RequestInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1289,7 +1265,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1305,7 +1281,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1318,7 +1294,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_TagPolicyExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagPolicyException(body, context); + const deserialized: any = _json(body); const exception = new TagPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1331,7 +1307,7 @@ const de_TagPolicyExceptionRes = async (parsedOutput: any, context: __SerdeConte */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1347,7 +1323,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1360,7 +1336,7 @@ const de_TooManyTagsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1368,389 +1344,139 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsToCertificateRequest - */ -const se_AddTagsToCertificateRequest = (input: AddTagsToCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AddTagsToCertificateRequest omitted. -/** - * serializeAws_json1_1CertificateOptions - */ -const se_CertificateOptions = (input: CertificateOptions, context: __SerdeContext): any => { - return { - ...(input.CertificateTransparencyLoggingPreference != null && { - CertificateTransparencyLoggingPreference: input.CertificateTransparencyLoggingPreference, - }), - }; -}; +// se_CertificateOptions omitted. -/** - * serializeAws_json1_1CertificateStatuses - */ -const se_CertificateStatuses = (input: (CertificateStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CertificateStatuses omitted. -/** - * serializeAws_json1_1DeleteCertificateRequest - */ -const se_DeleteCertificateRequest = (input: DeleteCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_DeleteCertificateRequest omitted. -/** - * serializeAws_json1_1DescribeCertificateRequest - */ -const se_DescribeCertificateRequest = (input: DescribeCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_DescribeCertificateRequest omitted. -/** - * serializeAws_json1_1DomainList - */ -const se_DomainList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DomainList omitted. -/** - * serializeAws_json1_1DomainValidationOption - */ -const se_DomainValidationOption = (input: DomainValidationOption, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }), - }; -}; +// se_DomainValidationOption omitted. -/** - * serializeAws_json1_1DomainValidationOptionList - */ -const se_DomainValidationOptionList = (input: DomainValidationOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DomainValidationOption(entry, context); - }); -}; +// se_DomainValidationOptionList omitted. -/** - * serializeAws_json1_1ExpiryEventsConfiguration - */ -const se_ExpiryEventsConfiguration = (input: ExpiryEventsConfiguration, context: __SerdeContext): any => { - return { - ...(input.DaysBeforeExpiry != null && { DaysBeforeExpiry: input.DaysBeforeExpiry }), - }; -}; +// se_ExpiryEventsConfiguration omitted. /** * serializeAws_json1_1ExportCertificateRequest */ const se_ExportCertificateRequest = (input: ExportCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Passphrase != null && { Passphrase: context.base64Encoder(input.Passphrase) }), - }; + return take(input, { + CertificateArn: [], + Passphrase: context.base64Encoder, + }); }; -/** - * serializeAws_json1_1ExtendedKeyUsageFilterList - */ -const se_ExtendedKeyUsageFilterList = (input: (ExtendedKeyUsageName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExtendedKeyUsageFilterList omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filters, context: __SerdeContext): any => { - return { - ...(input.extendedKeyUsage != null && { - extendedKeyUsage: se_ExtendedKeyUsageFilterList(input.extendedKeyUsage, context), - }), - ...(input.keyTypes != null && { keyTypes: se_KeyAlgorithmList(input.keyTypes, context) }), - ...(input.keyUsage != null && { keyUsage: se_KeyUsageFilterList(input.keyUsage, context) }), - }; -}; +// se_Filters omitted. -/** - * serializeAws_json1_1GetCertificateRequest - */ -const se_GetCertificateRequest = (input: GetCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_GetCertificateRequest omitted. /** * serializeAws_json1_1ImportCertificateRequest */ const se_ImportCertificateRequest = (input: ImportCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: context.base64Encoder(input.Certificate) }), - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.CertificateChain != null && { CertificateChain: context.base64Encoder(input.CertificateChain) }), - ...(input.PrivateKey != null && { PrivateKey: context.base64Encoder(input.PrivateKey) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + Certificate: context.base64Encoder, + CertificateArn: [], + CertificateChain: context.base64Encoder, + PrivateKey: context.base64Encoder, + Tags: _json, + }); }; -/** - * serializeAws_json1_1KeyAlgorithmList - */ -const se_KeyAlgorithmList = (input: (KeyAlgorithm | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KeyAlgorithmList omitted. -/** - * serializeAws_json1_1KeyUsageFilterList - */ -const se_KeyUsageFilterList = (input: (KeyUsageName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KeyUsageFilterList omitted. -/** - * serializeAws_json1_1ListCertificatesRequest - */ -const se_ListCertificatesRequest = (input: ListCertificatesRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateStatuses != null && { - CertificateStatuses: se_CertificateStatuses(input.CertificateStatuses, context), - }), - ...(input.Includes != null && { Includes: se_Filters(input.Includes, context) }), - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_ListCertificatesRequest omitted. -/** - * serializeAws_json1_1ListTagsForCertificateRequest - */ -const se_ListTagsForCertificateRequest = (input: ListTagsForCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_ListTagsForCertificateRequest omitted. -/** - * serializeAws_json1_1PutAccountConfigurationRequest - */ -const se_PutAccountConfigurationRequest = (input: PutAccountConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ExpiryEvents != null && { ExpiryEvents: se_ExpiryEventsConfiguration(input.ExpiryEvents, context) }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - }; -}; +// se_PutAccountConfigurationRequest omitted. -/** - * serializeAws_json1_1RemoveTagsFromCertificateRequest - */ -const se_RemoveTagsFromCertificateRequest = (input: RemoveTagsFromCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_RemoveTagsFromCertificateRequest omitted. -/** - * serializeAws_json1_1RenewCertificateRequest - */ -const se_RenewCertificateRequest = (input: RenewCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_RenewCertificateRequest omitted. -/** - * serializeAws_json1_1RequestCertificateRequest - */ -const se_RequestCertificateRequest = (input: RequestCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.DomainValidationOptions != null && { - DomainValidationOptions: se_DomainValidationOptionList(input.DomainValidationOptions, context), - }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.KeyAlgorithm != null && { KeyAlgorithm: input.KeyAlgorithm }), - ...(input.Options != null && { Options: se_CertificateOptions(input.Options, context) }), - ...(input.SubjectAlternativeNames != null && { - SubjectAlternativeNames: se_DomainList(input.SubjectAlternativeNames, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.ValidationMethod != null && { ValidationMethod: input.ValidationMethod }), - }; -}; +// se_RequestCertificateRequest omitted. -/** - * serializeAws_json1_1ResendValidationEmailRequest - */ -const se_ResendValidationEmailRequest = (input: ResendValidationEmailRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }), - }; -}; +// se_ResendValidationEmailRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1UpdateCertificateOptionsRequest - */ -const se_UpdateCertificateOptionsRequest = (input: UpdateCertificateOptionsRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Options != null && { Options: se_CertificateOptions(input.Options, context) }), - }; -}; +// se_UpdateCertificateOptionsRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_1CertificateDetail */ const de_CertificateDetail = (output: any, context: __SerdeContext): CertificateDetail => { - return { - CertificateArn: __expectString(output.CertificateArn), - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainName: __expectString(output.DomainName), - DomainValidationOptions: - output.DomainValidationOptions != null - ? de_DomainValidationList(output.DomainValidationOptions, context) - : undefined, - ExtendedKeyUsages: - output.ExtendedKeyUsages != null ? de_ExtendedKeyUsageList(output.ExtendedKeyUsages, context) : undefined, - FailureReason: __expectString(output.FailureReason), - ImportedAt: - output.ImportedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImportedAt))) : undefined, - InUseBy: output.InUseBy != null ? de_InUseList(output.InUseBy, context) : undefined, - IssuedAt: - output.IssuedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.IssuedAt))) : undefined, - Issuer: __expectString(output.Issuer), - KeyAlgorithm: __expectString(output.KeyAlgorithm), - KeyUsages: output.KeyUsages != null ? de_KeyUsageList(output.KeyUsages, context) : undefined, - NotAfter: - output.NotAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfter))) : undefined, - NotBefore: - output.NotBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBefore))) : undefined, - Options: output.Options != null ? de_CertificateOptions(output.Options, context) : undefined, - RenewalEligibility: __expectString(output.RenewalEligibility), - RenewalSummary: output.RenewalSummary != null ? de_RenewalSummary(output.RenewalSummary, context) : undefined, - RevocationReason: __expectString(output.RevocationReason), - RevokedAt: - output.RevokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RevokedAt))) : undefined, - Serial: __expectString(output.Serial), - SignatureAlgorithm: __expectString(output.SignatureAlgorithm), - Status: __expectString(output.Status), - Subject: __expectString(output.Subject), - SubjectAlternativeNames: - output.SubjectAlternativeNames != null ? de_DomainList(output.SubjectAlternativeNames, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1CertificateOptions - */ -const de_CertificateOptions = (output: any, context: __SerdeContext): CertificateOptions => { - return { - CertificateTransparencyLoggingPreference: __expectString(output.CertificateTransparencyLoggingPreference), - } as any; -}; + return take(output, { + CertificateArn: __expectString, + CertificateAuthorityArn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + DomainValidationOptions: _json, + ExtendedKeyUsages: _json, + FailureReason: __expectString, + ImportedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InUseBy: _json, + IssuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Issuer: __expectString, + KeyAlgorithm: __expectString, + KeyUsages: _json, + NotAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Options: _json, + RenewalEligibility: __expectString, + RenewalSummary: (_: any) => de_RenewalSummary(_, context), + RevocationReason: __expectString, + RevokedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Serial: __expectString, + SignatureAlgorithm: __expectString, + Status: __expectString, + Subject: __expectString, + SubjectAlternativeNames: _json, + Type: __expectString, + }) as any; +}; + +// de_CertificateOptions omitted. /** * deserializeAws_json1_1CertificateSummary */ const de_CertificateSummary = (output: any, context: __SerdeContext): CertificateSummary => { - return { - CertificateArn: __expectString(output.CertificateArn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainName: __expectString(output.DomainName), - Exported: __expectBoolean(output.Exported), - ExtendedKeyUsages: - output.ExtendedKeyUsages != null ? de_ExtendedKeyUsageNames(output.ExtendedKeyUsages, context) : undefined, - HasAdditionalSubjectAlternativeNames: __expectBoolean(output.HasAdditionalSubjectAlternativeNames), - ImportedAt: - output.ImportedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImportedAt))) : undefined, - InUse: __expectBoolean(output.InUse), - IssuedAt: - output.IssuedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.IssuedAt))) : undefined, - KeyAlgorithm: __expectString(output.KeyAlgorithm), - KeyUsages: output.KeyUsages != null ? de_KeyUsageNames(output.KeyUsages, context) : undefined, - NotAfter: - output.NotAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfter))) : undefined, - NotBefore: - output.NotBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBefore))) : undefined, - RenewalEligibility: __expectString(output.RenewalEligibility), - RevokedAt: - output.RevokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RevokedAt))) : undefined, - Status: __expectString(output.Status), - SubjectAlternativeNameSummaries: - output.SubjectAlternativeNameSummaries != null - ? de_DomainList(output.SubjectAlternativeNameSummaries, context) - : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + CertificateArn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + Exported: __expectBoolean, + ExtendedKeyUsages: _json, + HasAdditionalSubjectAlternativeNames: __expectBoolean, + ImportedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InUse: __expectBoolean, + IssuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KeyAlgorithm: __expectString, + KeyUsages: _json, + NotAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RenewalEligibility: __expectString, + RevokedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + SubjectAlternativeNameSummaries: _json, + Type: __expectString, + }) as any; }; /** @@ -1760,445 +1486,113 @@ const de_CertificateSummaryList = (output: any, context: __SerdeContext): Certif const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CertificateSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConflictException omitted. /** * deserializeAws_json1_1DescribeCertificateResponse */ const de_DescribeCertificateResponse = (output: any, context: __SerdeContext): DescribeCertificateResponse => { - return { - Certificate: output.Certificate != null ? de_CertificateDetail(output.Certificate, context) : undefined, - } as any; + return take(output, { + Certificate: (_: any) => de_CertificateDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DomainList - */ -const de_DomainList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DomainList omitted. -/** - * deserializeAws_json1_1DomainValidation - */ -const de_DomainValidation = (output: any, context: __SerdeContext): DomainValidation => { - return { - DomainName: __expectString(output.DomainName), - ResourceRecord: output.ResourceRecord != null ? de_ResourceRecord(output.ResourceRecord, context) : undefined, - ValidationDomain: __expectString(output.ValidationDomain), - ValidationEmails: - output.ValidationEmails != null ? de_ValidationEmailList(output.ValidationEmails, context) : undefined, - ValidationMethod: __expectString(output.ValidationMethod), - ValidationStatus: __expectString(output.ValidationStatus), - } as any; -}; +// de_DomainValidation omitted. -/** - * deserializeAws_json1_1DomainValidationList - */ -const de_DomainValidationList = (output: any, context: __SerdeContext): DomainValidation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainValidation(entry, context); - }); - return retVal; -}; +// de_DomainValidationList omitted. -/** - * deserializeAws_json1_1ExpiryEventsConfiguration - */ -const de_ExpiryEventsConfiguration = (output: any, context: __SerdeContext): ExpiryEventsConfiguration => { - return { - DaysBeforeExpiry: __expectInt32(output.DaysBeforeExpiry), - } as any; -}; +// de_ExpiryEventsConfiguration omitted. -/** - * deserializeAws_json1_1ExportCertificateResponse - */ -const de_ExportCertificateResponse = (output: any, context: __SerdeContext): ExportCertificateResponse => { - return { - Certificate: __expectString(output.Certificate), - CertificateChain: __expectString(output.CertificateChain), - PrivateKey: __expectString(output.PrivateKey), - } as any; -}; +// de_ExportCertificateResponse omitted. -/** - * deserializeAws_json1_1ExtendedKeyUsage - */ -const de_ExtendedKeyUsage = (output: any, context: __SerdeContext): ExtendedKeyUsage => { - return { - Name: __expectString(output.Name), - OID: __expectString(output.OID), - } as any; -}; +// de_ExtendedKeyUsage omitted. -/** - * deserializeAws_json1_1ExtendedKeyUsageList - */ -const de_ExtendedKeyUsageList = (output: any, context: __SerdeContext): ExtendedKeyUsage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtendedKeyUsage(entry, context); - }); - return retVal; -}; +// de_ExtendedKeyUsageList omitted. -/** - * deserializeAws_json1_1ExtendedKeyUsageNames - */ -const de_ExtendedKeyUsageNames = (output: any, context: __SerdeContext): (ExtendedKeyUsageName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExtendedKeyUsageNames omitted. -/** - * deserializeAws_json1_1GetAccountConfigurationResponse - */ -const de_GetAccountConfigurationResponse = (output: any, context: __SerdeContext): GetAccountConfigurationResponse => { - return { - ExpiryEvents: output.ExpiryEvents != null ? de_ExpiryEventsConfiguration(output.ExpiryEvents, context) : undefined, - } as any; -}; +// de_GetAccountConfigurationResponse omitted. -/** - * deserializeAws_json1_1GetCertificateResponse - */ -const de_GetCertificateResponse = (output: any, context: __SerdeContext): GetCertificateResponse => { - return { - Certificate: __expectString(output.Certificate), - CertificateChain: __expectString(output.CertificateChain), - } as any; -}; +// de_GetCertificateResponse omitted. -/** - * deserializeAws_json1_1ImportCertificateResponse - */ -const de_ImportCertificateResponse = (output: any, context: __SerdeContext): ImportCertificateResponse => { - return { - CertificateArn: __expectString(output.CertificateArn), - } as any; -}; +// de_ImportCertificateResponse omitted. -/** - * deserializeAws_json1_1InUseList - */ -const de_InUseList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InUseList omitted. -/** - * deserializeAws_json1_1InvalidArgsException - */ -const de_InvalidArgsException = (output: any, context: __SerdeContext): InvalidArgsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidArgsException omitted. -/** - * deserializeAws_json1_1InvalidArnException - */ -const de_InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidArnException omitted. -/** - * deserializeAws_json1_1InvalidDomainValidationOptionsException - */ -const de_InvalidDomainValidationOptionsException = ( - output: any, - context: __SerdeContext -): InvalidDomainValidationOptionsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidDomainValidationOptionsException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidStateException omitted. -/** - * deserializeAws_json1_1InvalidTagException - */ -const de_InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTagException omitted. -/** - * deserializeAws_json1_1KeyUsage - */ -const de_KeyUsage = (output: any, context: __SerdeContext): KeyUsage => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_KeyUsage omitted. -/** - * deserializeAws_json1_1KeyUsageList - */ -const de_KeyUsageList = (output: any, context: __SerdeContext): KeyUsage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyUsage(entry, context); - }); - return retVal; -}; +// de_KeyUsageList omitted. -/** - * deserializeAws_json1_1KeyUsageNames - */ -const de_KeyUsageNames = (output: any, context: __SerdeContext): (KeyUsageName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_KeyUsageNames omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListCertificatesResponse */ const de_ListCertificatesResponse = (output: any, context: __SerdeContext): ListCertificatesResponse => { - return { - CertificateSummaryList: - output.CertificateSummaryList != null - ? de_CertificateSummaryList(output.CertificateSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + CertificateSummaryList: (_: any) => de_CertificateSummaryList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForCertificateResponse - */ -const de_ListTagsForCertificateResponse = (output: any, context: __SerdeContext): ListTagsForCertificateResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForCertificateResponse omitted. /** * deserializeAws_json1_1RenewalSummary */ const de_RenewalSummary = (output: any, context: __SerdeContext): RenewalSummary => { - return { - DomainValidationOptions: - output.DomainValidationOptions != null - ? de_DomainValidationList(output.DomainValidationOptions, context) - : undefined, - RenewalStatus: __expectString(output.RenewalStatus), - RenewalStatusReason: __expectString(output.RenewalStatusReason), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + DomainValidationOptions: _json, + RenewalStatus: __expectString, + RenewalStatusReason: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1RequestCertificateResponse - */ -const de_RequestCertificateResponse = (output: any, context: __SerdeContext): RequestCertificateResponse => { - return { - CertificateArn: __expectString(output.CertificateArn), - } as any; -}; +// de_RequestCertificateResponse omitted. -/** - * deserializeAws_json1_1RequestInProgressException - */ -const de_RequestInProgressException = (output: any, context: __SerdeContext): RequestInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RequestInProgressException omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResourceRecord - */ -const de_ResourceRecord = (output: any, context: __SerdeContext): ResourceRecord => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_ResourceRecord omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagPolicyException - */ -const de_TagPolicyException = (output: any, context: __SerdeContext): TagPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagPolicyException omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1ValidationEmailList - */ -const de_ValidationEmailList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ValidationEmailList omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2220,6 +1614,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts b/clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts index 8041db8336d8..88778e4aafb7 100644 --- a/clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts +++ b/clients/client-alexa-for-business/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -231,142 +231,78 @@ import { UpdateRoomCommandInput, UpdateRoomCommandOutput } from "../commands/Upd import { UpdateSkillGroupCommandInput, UpdateSkillGroupCommandOutput } from "../commands/UpdateSkillGroupCommand"; import { AlexaForBusinessServiceException as __BaseException } from "../models/AlexaForBusinessServiceException"; import { - AddressBook, - AddressBookData, AlreadyExistsException, ApproveSkillRequest, - ApproveSkillResponse, AssociateContactWithAddressBookRequest, - AssociateContactWithAddressBookResponse, AssociateDeviceWithNetworkProfileRequest, - AssociateDeviceWithNetworkProfileResponse, AssociateDeviceWithRoomRequest, - AssociateDeviceWithRoomResponse, AssociateSkillGroupWithRoomRequest, - AssociateSkillGroupWithRoomResponse, AssociateSkillWithSkillGroupRequest, - AssociateSkillWithSkillGroupResponse, AssociateSkillWithUsersRequest, - AssociateSkillWithUsersResponse, Audio, BusinessReport, BusinessReportContentRange, BusinessReportRecurrence, - BusinessReportS3Location, BusinessReportSchedule, - Category, ConcurrentModificationException, ConferencePreference, - ConferenceProvider, - Contact, - ContactData, Content, CreateAddressBookRequest, - CreateAddressBookResponse, CreateBusinessReportScheduleRequest, - CreateBusinessReportScheduleResponse, CreateConferenceProviderRequest, - CreateConferenceProviderResponse, CreateContactRequest, - CreateContactResponse, CreateEndOfMeetingReminder, CreateGatewayGroupRequest, - CreateGatewayGroupResponse, CreateInstantBooking, CreateMeetingRoomConfiguration, CreateNetworkProfileRequest, - CreateNetworkProfileResponse, CreateProfileRequest, - CreateProfileResponse, CreateRequireCheckIn, CreateRoomRequest, - CreateRoomResponse, CreateSkillGroupRequest, - CreateSkillGroupResponse, CreateUserRequest, - CreateUserResponse, DeleteAddressBookRequest, - DeleteAddressBookResponse, DeleteBusinessReportScheduleRequest, - DeleteBusinessReportScheduleResponse, DeleteConferenceProviderRequest, - DeleteConferenceProviderResponse, DeleteContactRequest, - DeleteContactResponse, DeleteDeviceRequest, - DeleteDeviceResponse, DeleteDeviceUsageDataRequest, - DeleteDeviceUsageDataResponse, DeleteGatewayGroupRequest, - DeleteGatewayGroupResponse, DeleteNetworkProfileRequest, - DeleteNetworkProfileResponse, DeleteProfileRequest, - DeleteProfileResponse, DeleteRoomRequest, - DeleteRoomResponse, DeleteRoomSkillParameterRequest, - DeleteRoomSkillParameterResponse, DeleteSkillAuthorizationRequest, - DeleteSkillAuthorizationResponse, DeleteSkillGroupRequest, - DeleteSkillGroupResponse, DeleteUserRequest, - DeleteUserResponse, - DeveloperInfo, Device, DeviceData, DeviceEvent, DeviceNetworkProfileInfo, DeviceNotRegisteredException, - DeviceStatusDetail, DeviceStatusInfo, DisassociateContactFromAddressBookRequest, - DisassociateContactFromAddressBookResponse, DisassociateDeviceFromRoomRequest, - DisassociateDeviceFromRoomResponse, DisassociateSkillFromSkillGroupRequest, - DisassociateSkillFromSkillGroupResponse, DisassociateSkillFromUsersRequest, - DisassociateSkillFromUsersResponse, DisassociateSkillGroupFromRoomRequest, - DisassociateSkillGroupFromRoomResponse, - EndOfMeetingReminder, Feature, Filter, ForgetSmartHomeAppliancesRequest, - ForgetSmartHomeAppliancesResponse, - Gateway, - GatewayGroup, - GatewayGroupSummary, - GatewaySummary, GetAddressBookRequest, - GetAddressBookResponse, GetConferencePreferenceRequest, - GetConferencePreferenceResponse, GetConferenceProviderRequest, - GetConferenceProviderResponse, GetContactRequest, - GetContactResponse, GetDeviceRequest, GetDeviceResponse, GetGatewayGroupRequest, - GetGatewayGroupResponse, GetGatewayRequest, - GetGatewayResponse, GetInvitationConfigurationRequest, - GetInvitationConfigurationResponse, GetNetworkProfileRequest, - GetNetworkProfileResponse, GetProfileRequest, - GetProfileResponse, GetRoomRequest, - GetRoomResponse, GetRoomSkillParameterRequest, - GetRoomSkillParameterResponse, GetSkillGroupRequest, - GetSkillGroupResponse, - InstantBooking, InvalidCertificateAuthorityException, InvalidDeviceException, InvalidSecretsManagerResourceException, @@ -377,123 +313,68 @@ import { ListBusinessReportSchedulesRequest, ListBusinessReportSchedulesResponse, ListConferenceProvidersRequest, - ListConferenceProvidersResponse, ListDeviceEventsRequest, ListDeviceEventsResponse, ListGatewayGroupsRequest, - ListGatewayGroupsResponse, ListGatewaysRequest, - ListGatewaysResponse, ListSkillsRequest, - ListSkillsResponse, ListSkillsStoreCategoriesRequest, - ListSkillsStoreCategoriesResponse, ListSkillsStoreSkillsByCategoryRequest, - ListSkillsStoreSkillsByCategoryResponse, ListSmartHomeAppliancesRequest, - ListSmartHomeAppliancesResponse, ListTagsRequest, - ListTagsResponse, - MeetingRoomConfiguration, MeetingSetting, NameInUseException, - NetworkProfile, - NetworkProfileData, NotFoundException, PhoneNumber, - Profile, - ProfileData, PSTNDialIn, PutConferencePreferenceRequest, - PutConferencePreferenceResponse, PutInvitationConfigurationRequest, - PutInvitationConfigurationResponse, PutRoomSkillParameterRequest, - PutRoomSkillParameterResponse, PutSkillAuthorizationRequest, - PutSkillAuthorizationResponse, RegisterAVSDeviceRequest, - RegisterAVSDeviceResponse, RejectSkillRequest, - RejectSkillResponse, - RequireCheckIn, ResolveRoomRequest, - ResolveRoomResponse, ResourceAssociatedException, ResourceInUseException, RevokeInvitationRequest, - RevokeInvitationResponse, - Room, - RoomData, RoomSkillParameter, SearchAddressBooksRequest, - SearchAddressBooksResponse, SearchContactsRequest, - SearchContactsResponse, SearchDevicesRequest, SearchDevicesResponse, SearchNetworkProfilesRequest, - SearchNetworkProfilesResponse, SearchProfilesRequest, - SearchProfilesResponse, SearchRoomsRequest, - SearchRoomsResponse, SearchSkillGroupsRequest, - SearchSkillGroupsResponse, SearchUsersRequest, - SearchUsersResponse, SendAnnouncementRequest, - SendAnnouncementResponse, SendInvitationRequest, - SendInvitationResponse, SipAddress, - SkillDetails, - SkillGroup, - SkillGroupData, SkillNotLinkedException, - SkillsStoreSkill, - SkillSummary, - SmartHomeAppliance, Sort, Ssml, StartDeviceSyncRequest, - StartDeviceSyncResponse, StartSmartHomeApplianceDiscoveryRequest, - StartSmartHomeApplianceDiscoveryResponse, Tag, TagResourceRequest, - TagResourceResponse, Text, UnauthorizedException, UntagResourceRequest, - UntagResourceResponse, UpdateAddressBookRequest, - UpdateAddressBookResponse, UpdateBusinessReportScheduleRequest, - UpdateBusinessReportScheduleResponse, UpdateConferenceProviderRequest, - UpdateConferenceProviderResponse, UpdateContactRequest, - UpdateContactResponse, UpdateDeviceRequest, - UpdateDeviceResponse, UpdateEndOfMeetingReminder, UpdateGatewayGroupRequest, - UpdateGatewayGroupResponse, UpdateGatewayRequest, - UpdateGatewayResponse, UpdateInstantBooking, UpdateMeetingRoomConfiguration, UpdateNetworkProfileRequest, - UpdateNetworkProfileResponse, UpdateProfileRequest, - UpdateProfileResponse, UpdateRequireCheckIn, UpdateRoomRequest, - UpdateRoomResponse, UpdateSkillGroupRequest, - UpdateSkillGroupResponse, - UserData, } from "../models/models_0"; /** @@ -505,7 +386,7 @@ export const se_ApproveSkillCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ApproveSkill"); let body: any; - body = JSON.stringify(se_ApproveSkillRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -518,7 +399,7 @@ export const se_AssociateContactWithAddressBookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateContactWithAddressBook"); let body: any; - body = JSON.stringify(se_AssociateContactWithAddressBookRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -531,7 +412,7 @@ export const se_AssociateDeviceWithNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDeviceWithNetworkProfile"); let body: any; - body = JSON.stringify(se_AssociateDeviceWithNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -544,7 +425,7 @@ export const se_AssociateDeviceWithRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDeviceWithRoom"); let body: any; - body = JSON.stringify(se_AssociateDeviceWithRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -557,7 +438,7 @@ export const se_AssociateSkillGroupWithRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateSkillGroupWithRoom"); let body: any; - body = JSON.stringify(se_AssociateSkillGroupWithRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -570,7 +451,7 @@ export const se_AssociateSkillWithSkillGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateSkillWithSkillGroup"); let body: any; - body = JSON.stringify(se_AssociateSkillWithSkillGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -583,7 +464,7 @@ export const se_AssociateSkillWithUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateSkillWithUsers"); let body: any; - body = JSON.stringify(se_AssociateSkillWithUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -726,7 +607,7 @@ export const se_DeleteAddressBookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAddressBook"); let body: any; - body = JSON.stringify(se_DeleteAddressBookRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -739,7 +620,7 @@ export const se_DeleteBusinessReportScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBusinessReportSchedule"); let body: any; - body = JSON.stringify(se_DeleteBusinessReportScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -752,7 +633,7 @@ export const se_DeleteConferenceProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConferenceProvider"); let body: any; - body = JSON.stringify(se_DeleteConferenceProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -765,7 +646,7 @@ export const se_DeleteContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContact"); let body: any; - body = JSON.stringify(se_DeleteContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -778,7 +659,7 @@ export const se_DeleteDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDevice"); let body: any; - body = JSON.stringify(se_DeleteDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -791,7 +672,7 @@ export const se_DeleteDeviceUsageDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDeviceUsageData"); let body: any; - body = JSON.stringify(se_DeleteDeviceUsageDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -804,7 +685,7 @@ export const se_DeleteGatewayGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGatewayGroup"); let body: any; - body = JSON.stringify(se_DeleteGatewayGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -817,7 +698,7 @@ export const se_DeleteNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNetworkProfile"); let body: any; - body = JSON.stringify(se_DeleteNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -830,7 +711,7 @@ export const se_DeleteProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProfile"); let body: any; - body = JSON.stringify(se_DeleteProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -843,7 +724,7 @@ export const se_DeleteRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRoom"); let body: any; - body = JSON.stringify(se_DeleteRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -856,7 +737,7 @@ export const se_DeleteRoomSkillParameterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRoomSkillParameter"); let body: any; - body = JSON.stringify(se_DeleteRoomSkillParameterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -869,7 +750,7 @@ export const se_DeleteSkillAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSkillAuthorization"); let body: any; - body = JSON.stringify(se_DeleteSkillAuthorizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -882,7 +763,7 @@ export const se_DeleteSkillGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSkillGroup"); let body: any; - body = JSON.stringify(se_DeleteSkillGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -895,7 +776,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -908,7 +789,7 @@ export const se_DisassociateContactFromAddressBookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateContactFromAddressBook"); let body: any; - body = JSON.stringify(se_DisassociateContactFromAddressBookRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -921,7 +802,7 @@ export const se_DisassociateDeviceFromRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateDeviceFromRoom"); let body: any; - body = JSON.stringify(se_DisassociateDeviceFromRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -934,7 +815,7 @@ export const se_DisassociateSkillFromSkillGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateSkillFromSkillGroup"); let body: any; - body = JSON.stringify(se_DisassociateSkillFromSkillGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -947,7 +828,7 @@ export const se_DisassociateSkillFromUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateSkillFromUsers"); let body: any; - body = JSON.stringify(se_DisassociateSkillFromUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -960,7 +841,7 @@ export const se_DisassociateSkillGroupFromRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateSkillGroupFromRoom"); let body: any; - body = JSON.stringify(se_DisassociateSkillGroupFromRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -973,7 +854,7 @@ export const se_ForgetSmartHomeAppliancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ForgetSmartHomeAppliances"); let body: any; - body = JSON.stringify(se_ForgetSmartHomeAppliancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -986,7 +867,7 @@ export const se_GetAddressBookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAddressBook"); let body: any; - body = JSON.stringify(se_GetAddressBookRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -999,7 +880,7 @@ export const se_GetConferencePreferenceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConferencePreference"); let body: any; - body = JSON.stringify(se_GetConferencePreferenceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1012,7 +893,7 @@ export const se_GetConferenceProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConferenceProvider"); let body: any; - body = JSON.stringify(se_GetConferenceProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1025,7 +906,7 @@ export const se_GetContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContact"); let body: any; - body = JSON.stringify(se_GetContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1038,7 +919,7 @@ export const se_GetDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDevice"); let body: any; - body = JSON.stringify(se_GetDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1051,7 +932,7 @@ export const se_GetGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGateway"); let body: any; - body = JSON.stringify(se_GetGatewayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1064,7 +945,7 @@ export const se_GetGatewayGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGatewayGroup"); let body: any; - body = JSON.stringify(se_GetGatewayGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1077,7 +958,7 @@ export const se_GetInvitationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInvitationConfiguration"); let body: any; - body = JSON.stringify(se_GetInvitationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1090,7 +971,7 @@ export const se_GetNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNetworkProfile"); let body: any; - body = JSON.stringify(se_GetNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1103,7 +984,7 @@ export const se_GetProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetProfile"); let body: any; - body = JSON.stringify(se_GetProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1116,7 +997,7 @@ export const se_GetRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRoom"); let body: any; - body = JSON.stringify(se_GetRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1129,7 +1010,7 @@ export const se_GetRoomSkillParameterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRoomSkillParameter"); let body: any; - body = JSON.stringify(se_GetRoomSkillParameterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1142,7 +1023,7 @@ export const se_GetSkillGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSkillGroup"); let body: any; - body = JSON.stringify(se_GetSkillGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1155,7 +1036,7 @@ export const se_ListBusinessReportSchedulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBusinessReportSchedules"); let body: any; - body = JSON.stringify(se_ListBusinessReportSchedulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1168,7 +1049,7 @@ export const se_ListConferenceProvidersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConferenceProviders"); let body: any; - body = JSON.stringify(se_ListConferenceProvidersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1181,7 +1062,7 @@ export const se_ListDeviceEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeviceEvents"); let body: any; - body = JSON.stringify(se_ListDeviceEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1194,7 +1075,7 @@ export const se_ListGatewayGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGatewayGroups"); let body: any; - body = JSON.stringify(se_ListGatewayGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1207,7 +1088,7 @@ export const se_ListGatewaysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGateways"); let body: any; - body = JSON.stringify(se_ListGatewaysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1220,7 +1101,7 @@ export const se_ListSkillsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSkills"); let body: any; - body = JSON.stringify(se_ListSkillsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1233,7 +1114,7 @@ export const se_ListSkillsStoreCategoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSkillsStoreCategories"); let body: any; - body = JSON.stringify(se_ListSkillsStoreCategoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1246,7 +1127,7 @@ export const se_ListSkillsStoreSkillsByCategoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSkillsStoreSkillsByCategory"); let body: any; - body = JSON.stringify(se_ListSkillsStoreSkillsByCategoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1259,7 +1140,7 @@ export const se_ListSmartHomeAppliancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSmartHomeAppliances"); let body: any; - body = JSON.stringify(se_ListSmartHomeAppliancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1272,7 +1153,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1285,7 +1166,7 @@ export const se_PutConferencePreferenceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutConferencePreference"); let body: any; - body = JSON.stringify(se_PutConferencePreferenceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1298,7 +1179,7 @@ export const se_PutInvitationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutInvitationConfiguration"); let body: any; - body = JSON.stringify(se_PutInvitationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1311,7 +1192,7 @@ export const se_PutRoomSkillParameterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRoomSkillParameter"); let body: any; - body = JSON.stringify(se_PutRoomSkillParameterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1324,7 +1205,7 @@ export const se_PutSkillAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutSkillAuthorization"); let body: any; - body = JSON.stringify(se_PutSkillAuthorizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1337,7 +1218,7 @@ export const se_RegisterAVSDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterAVSDevice"); let body: any; - body = JSON.stringify(se_RegisterAVSDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1350,7 +1231,7 @@ export const se_RejectSkillCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectSkill"); let body: any; - body = JSON.stringify(se_RejectSkillRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1363,7 +1244,7 @@ export const se_ResolveRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResolveRoom"); let body: any; - body = JSON.stringify(se_ResolveRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1376,7 +1257,7 @@ export const se_RevokeInvitationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RevokeInvitation"); let body: any; - body = JSON.stringify(se_RevokeInvitationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1389,7 +1270,7 @@ export const se_SearchAddressBooksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchAddressBooks"); let body: any; - body = JSON.stringify(se_SearchAddressBooksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1402,7 +1283,7 @@ export const se_SearchContactsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchContacts"); let body: any; - body = JSON.stringify(se_SearchContactsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1415,7 +1296,7 @@ export const se_SearchDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchDevices"); let body: any; - body = JSON.stringify(se_SearchDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1428,7 +1309,7 @@ export const se_SearchNetworkProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchNetworkProfiles"); let body: any; - body = JSON.stringify(se_SearchNetworkProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1441,7 +1322,7 @@ export const se_SearchProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchProfiles"); let body: any; - body = JSON.stringify(se_SearchProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1454,7 +1335,7 @@ export const se_SearchRoomsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchRooms"); let body: any; - body = JSON.stringify(se_SearchRoomsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1467,7 +1348,7 @@ export const se_SearchSkillGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchSkillGroups"); let body: any; - body = JSON.stringify(se_SearchSkillGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1480,7 +1361,7 @@ export const se_SearchUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchUsers"); let body: any; - body = JSON.stringify(se_SearchUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1506,7 +1387,7 @@ export const se_SendInvitationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendInvitation"); let body: any; - body = JSON.stringify(se_SendInvitationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1519,7 +1400,7 @@ export const se_StartDeviceSyncCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDeviceSync"); let body: any; - body = JSON.stringify(se_StartDeviceSyncRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1532,7 +1413,7 @@ export const se_StartSmartHomeApplianceDiscoveryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartSmartHomeApplianceDiscovery"); let body: any; - body = JSON.stringify(se_StartSmartHomeApplianceDiscoveryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1545,7 +1426,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1558,7 +1439,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1571,7 +1452,7 @@ export const se_UpdateAddressBookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAddressBook"); let body: any; - body = JSON.stringify(se_UpdateAddressBookRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1584,7 +1465,7 @@ export const se_UpdateBusinessReportScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBusinessReportSchedule"); let body: any; - body = JSON.stringify(se_UpdateBusinessReportScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1597,7 +1478,7 @@ export const se_UpdateConferenceProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConferenceProvider"); let body: any; - body = JSON.stringify(se_UpdateConferenceProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1610,7 +1491,7 @@ export const se_UpdateContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContact"); let body: any; - body = JSON.stringify(se_UpdateContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1623,7 +1504,7 @@ export const se_UpdateDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDevice"); let body: any; - body = JSON.stringify(se_UpdateDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1636,7 +1517,7 @@ export const se_UpdateGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGateway"); let body: any; - body = JSON.stringify(se_UpdateGatewayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1649,7 +1530,7 @@ export const se_UpdateGatewayGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGatewayGroup"); let body: any; - body = JSON.stringify(se_UpdateGatewayGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1662,7 +1543,7 @@ export const se_UpdateNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNetworkProfile"); let body: any; - body = JSON.stringify(se_UpdateNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1675,7 +1556,7 @@ export const se_UpdateProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProfile"); let body: any; - body = JSON.stringify(se_UpdateProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1688,7 +1569,7 @@ export const se_UpdateRoomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRoom"); let body: any; - body = JSON.stringify(se_UpdateRoomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1701,7 +1582,7 @@ export const se_UpdateSkillGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSkillGroup"); let body: any; - body = JSON.stringify(se_UpdateSkillGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1717,12 +1598,12 @@ export const de_ApproveSkillCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ApproveSkillResponse(data, context); + contents = _json(data); const response: ApproveSkillCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1749,10 +1630,9 @@ const de_ApproveSkillCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1770,12 +1650,12 @@ export const de_AssociateContactWithAddressBookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateContactWithAddressBookResponse(data, context); + contents = _json(data); const response: AssociateContactWithAddressBookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1796,10 +1676,9 @@ const de_AssociateContactWithAddressBookCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1817,12 +1696,12 @@ export const de_AssociateDeviceWithNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDeviceWithNetworkProfileResponse(data, context); + contents = _json(data); const response: AssociateDeviceWithNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1849,10 +1728,9 @@ const de_AssociateDeviceWithNetworkProfileCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1870,12 +1748,12 @@ export const de_AssociateDeviceWithRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDeviceWithRoomResponse(data, context); + contents = _json(data); const response: AssociateDeviceWithRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1902,10 +1780,9 @@ const de_AssociateDeviceWithRoomCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1923,12 +1800,12 @@ export const de_AssociateSkillGroupWithRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateSkillGroupWithRoomResponse(data, context); + contents = _json(data); const response: AssociateSkillGroupWithRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1949,10 +1826,9 @@ const de_AssociateSkillGroupWithRoomCommandError = async ( throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1970,12 +1846,12 @@ export const de_AssociateSkillWithSkillGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateSkillWithSkillGroupResponse(data, context); + contents = _json(data); const response: AssociateSkillWithSkillGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2002,10 +1878,9 @@ const de_AssociateSkillWithSkillGroupCommandError = async ( throw await de_SkillNotLinkedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,12 +1898,12 @@ export const de_AssociateSkillWithUsersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateSkillWithUsersResponse(data, context); + contents = _json(data); const response: AssociateSkillWithUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2052,10 +1927,9 @@ const de_AssociateSkillWithUsersCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2073,12 +1947,12 @@ export const de_CreateAddressBookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAddressBookResponse(data, context); + contents = _json(data); const response: CreateAddressBookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2102,10 +1976,9 @@ const de_CreateAddressBookCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2123,12 +1996,12 @@ export const de_CreateBusinessReportScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBusinessReportScheduleResponse(data, context); + contents = _json(data); const response: CreateBusinessReportScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2149,10 +2022,9 @@ const de_CreateBusinessReportScheduleCommandError = async ( throw await de_AlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2170,12 +2042,12 @@ export const de_CreateConferenceProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConferenceProviderResponse(data, context); + contents = _json(data); const response: CreateConferenceProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2196,10 +2068,9 @@ const de_CreateConferenceProviderCommandError = async ( throw await de_AlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2217,12 +2088,12 @@ export const de_CreateContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateContactResponse(data, context); + contents = _json(data); const response: CreateContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2246,10 +2117,9 @@ const de_CreateContactCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2267,12 +2137,12 @@ export const de_CreateGatewayGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGatewayGroupResponse(data, context); + contents = _json(data); const response: CreateGatewayGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2296,10 +2166,9 @@ const de_CreateGatewayGroupCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2317,12 +2186,12 @@ export const de_CreateNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNetworkProfileResponse(data, context); + contents = _json(data); const response: CreateNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2355,10 +2224,9 @@ const de_CreateNetworkProfileCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2376,12 +2244,12 @@ export const de_CreateProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProfileResponse(data, context); + contents = _json(data); const response: CreateProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2408,10 +2276,9 @@ const de_CreateProfileCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2429,12 +2296,12 @@ export const de_CreateRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRoomResponse(data, context); + contents = _json(data); const response: CreateRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2458,10 +2325,9 @@ const de_CreateRoomCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2479,12 +2345,12 @@ export const de_CreateSkillGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSkillGroupResponse(data, context); + contents = _json(data); const response: CreateSkillGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2511,10 +2377,9 @@ const de_CreateSkillGroupCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2532,12 +2397,12 @@ export const de_CreateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserResponse(data, context); + contents = _json(data); const response: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2564,10 +2429,9 @@ const de_CreateUserCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2585,12 +2449,12 @@ export const de_DeleteAddressBookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAddressBookResponse(data, context); + contents = _json(data); const response: DeleteAddressBookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2614,10 +2478,9 @@ const de_DeleteAddressBookCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2635,12 +2498,12 @@ export const de_DeleteBusinessReportScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBusinessReportScheduleResponse(data, context); + contents = _json(data); const response: DeleteBusinessReportScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2664,10 +2527,9 @@ const de_DeleteBusinessReportScheduleCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2685,12 +2547,12 @@ export const de_DeleteConferenceProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConferenceProviderResponse(data, context); + contents = _json(data); const response: DeleteConferenceProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2711,10 +2573,9 @@ const de_DeleteConferenceProviderCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,12 +2593,12 @@ export const de_DeleteContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContactResponse(data, context); + contents = _json(data); const response: DeleteContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2761,10 +2622,9 @@ const de_DeleteContactCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2782,12 +2642,12 @@ export const de_DeleteDeviceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDeviceResponse(data, context); + contents = _json(data); const response: DeleteDeviceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2814,10 +2674,9 @@ const de_DeleteDeviceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2835,12 +2694,12 @@ export const de_DeleteDeviceUsageDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDeviceUsageDataResponse(data, context); + contents = _json(data); const response: DeleteDeviceUsageDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2867,10 +2726,9 @@ const de_DeleteDeviceUsageDataCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2888,12 +2746,12 @@ export const de_DeleteGatewayGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGatewayGroupResponse(data, context); + contents = _json(data); const response: DeleteGatewayGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2914,10 +2772,9 @@ const de_DeleteGatewayGroupCommandError = async ( throw await de_ResourceAssociatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2935,12 +2792,12 @@ export const de_DeleteNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNetworkProfileResponse(data, context); + contents = _json(data); const response: DeleteNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2967,10 +2824,9 @@ const de_DeleteNetworkProfileCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2988,12 +2844,12 @@ export const de_DeleteProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProfileResponse(data, context); + contents = _json(data); const response: DeleteProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3017,10 +2873,9 @@ const de_DeleteProfileCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3038,12 +2893,12 @@ export const de_DeleteRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRoomResponse(data, context); + contents = _json(data); const response: DeleteRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3067,10 +2922,9 @@ const de_DeleteRoomCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3088,12 +2942,12 @@ export const de_DeleteRoomSkillParameterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRoomSkillParameterResponse(data, context); + contents = _json(data); const response: DeleteRoomSkillParameterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3114,10 +2968,9 @@ const de_DeleteRoomSkillParameterCommandError = async ( throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3135,12 +2988,12 @@ export const de_DeleteSkillAuthorizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSkillAuthorizationResponse(data, context); + contents = _json(data); const response: DeleteSkillAuthorizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3164,10 +3017,9 @@ const de_DeleteSkillAuthorizationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3185,12 +3037,12 @@ export const de_DeleteSkillGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSkillGroupResponse(data, context); + contents = _json(data); const response: DeleteSkillGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3214,10 +3066,9 @@ const de_DeleteSkillGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3235,12 +3086,12 @@ export const de_DeleteUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserResponse(data, context); + contents = _json(data); const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3264,10 +3115,9 @@ const de_DeleteUserCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3285,12 +3135,12 @@ export const de_DisassociateContactFromAddressBookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateContactFromAddressBookResponse(data, context); + contents = _json(data); const response: DisassociateContactFromAddressBookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3306,10 +3156,9 @@ const de_DisassociateContactFromAddressBookCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3326,12 +3175,12 @@ export const de_DisassociateDeviceFromRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateDeviceFromRoomResponse(data, context); + contents = _json(data); const response: DisassociateDeviceFromRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3355,10 +3204,9 @@ const de_DisassociateDeviceFromRoomCommandError = async ( throw await de_DeviceNotRegisteredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3376,12 +3224,12 @@ export const de_DisassociateSkillFromSkillGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateSkillFromSkillGroupResponse(data, context); + contents = _json(data); const response: DisassociateSkillFromSkillGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3405,10 +3253,9 @@ const de_DisassociateSkillFromSkillGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3426,12 +3273,12 @@ export const de_DisassociateSkillFromUsersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateSkillFromUsersResponse(data, context); + contents = _json(data); const response: DisassociateSkillFromUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3455,10 +3302,9 @@ const de_DisassociateSkillFromUsersCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3476,12 +3322,12 @@ export const de_DisassociateSkillGroupFromRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateSkillGroupFromRoomResponse(data, context); + contents = _json(data); const response: DisassociateSkillGroupFromRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3502,10 +3348,9 @@ const de_DisassociateSkillGroupFromRoomCommandError = async ( throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3523,12 +3368,12 @@ export const de_ForgetSmartHomeAppliancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ForgetSmartHomeAppliancesResponse(data, context); + contents = _json(data); const response: ForgetSmartHomeAppliancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3549,10 +3394,9 @@ const de_ForgetSmartHomeAppliancesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3570,12 +3414,12 @@ export const de_GetAddressBookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAddressBookResponse(data, context); + contents = _json(data); const response: GetAddressBookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3596,10 +3440,9 @@ const de_GetAddressBookCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3617,12 +3460,12 @@ export const de_GetConferencePreferenceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetConferencePreferenceResponse(data, context); + contents = _json(data); const response: GetConferencePreferenceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3643,10 +3486,9 @@ const de_GetConferencePreferenceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3664,12 +3506,12 @@ export const de_GetConferenceProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetConferenceProviderResponse(data, context); + contents = _json(data); const response: GetConferenceProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3690,10 +3532,9 @@ const de_GetConferenceProviderCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3711,12 +3552,12 @@ export const de_GetContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContactResponse(data, context); + contents = _json(data); const response: GetContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3737,10 +3578,9 @@ const de_GetContactCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3763,7 +3603,7 @@ export const de_GetDeviceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3784,10 +3624,9 @@ const de_GetDeviceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3805,12 +3644,12 @@ export const de_GetGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGatewayResponse(data, context); + contents = _json(data); const response: GetGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3831,10 +3670,9 @@ const de_GetGatewayCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3852,12 +3690,12 @@ export const de_GetGatewayGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGatewayGroupResponse(data, context); + contents = _json(data); const response: GetGatewayGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3878,10 +3716,9 @@ const de_GetGatewayGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3899,12 +3736,12 @@ export const de_GetInvitationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInvitationConfigurationResponse(data, context); + contents = _json(data); const response: GetInvitationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3925,10 +3762,9 @@ const de_GetInvitationConfigurationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3946,12 +3782,12 @@ export const de_GetNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetNetworkProfileResponse(data, context); + contents = _json(data); const response: GetNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3975,10 +3811,9 @@ const de_GetNetworkProfileCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3996,12 +3831,12 @@ export const de_GetProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetProfileResponse(data, context); + contents = _json(data); const response: GetProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4022,10 +3857,9 @@ const de_GetProfileCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4043,12 +3877,12 @@ export const de_GetRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRoomResponse(data, context); + contents = _json(data); const response: GetRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4069,10 +3903,9 @@ const de_GetRoomCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4090,12 +3923,12 @@ export const de_GetRoomSkillParameterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRoomSkillParameterResponse(data, context); + contents = _json(data); const response: GetRoomSkillParameterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4116,10 +3949,9 @@ const de_GetRoomSkillParameterCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4137,12 +3969,12 @@ export const de_GetSkillGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSkillGroupResponse(data, context); + contents = _json(data); const response: GetSkillGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4163,10 +3995,9 @@ const de_GetSkillGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4189,7 +4020,7 @@ export const de_ListBusinessReportSchedulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4205,10 +4036,9 @@ const de_ListBusinessReportSchedulesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4225,12 +4055,12 @@ export const de_ListConferenceProvidersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListConferenceProvidersResponse(data, context); + contents = _json(data); const response: ListConferenceProvidersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4246,10 +4076,9 @@ const de_ListConferenceProvidersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4271,7 +4100,7 @@ export const de_ListDeviceEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4292,10 +4121,9 @@ const de_ListDeviceEventsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4313,12 +4141,12 @@ export const de_ListGatewayGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGatewayGroupsResponse(data, context); + contents = _json(data); const response: ListGatewayGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4334,10 +4162,9 @@ const de_ListGatewayGroupsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4354,12 +4181,12 @@ export const de_ListGatewaysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGatewaysResponse(data, context); + contents = _json(data); const response: ListGatewaysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4375,10 +4202,9 @@ const de_ListGatewaysCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4395,12 +4221,12 @@ export const de_ListSkillsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSkillsResponse(data, context); + contents = _json(data); const response: ListSkillsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4416,10 +4242,9 @@ const de_ListSkillsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4436,12 +4261,12 @@ export const de_ListSkillsStoreCategoriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSkillsStoreCategoriesResponse(data, context); + contents = _json(data); const response: ListSkillsStoreCategoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4457,10 +4282,9 @@ const de_ListSkillsStoreCategoriesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4477,12 +4301,12 @@ export const de_ListSkillsStoreSkillsByCategoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSkillsStoreSkillsByCategoryResponse(data, context); + contents = _json(data); const response: ListSkillsStoreSkillsByCategoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4498,10 +4322,9 @@ const de_ListSkillsStoreSkillsByCategoryCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4518,12 +4341,12 @@ export const de_ListSmartHomeAppliancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSmartHomeAppliancesResponse(data, context); + contents = _json(data); const response: ListSmartHomeAppliancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4544,10 +4367,9 @@ const de_ListSmartHomeAppliancesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4565,12 +4387,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResponse(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4591,10 +4413,9 @@ const de_ListTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4612,12 +4433,12 @@ export const de_PutConferencePreferenceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutConferencePreferenceResponse(data, context); + contents = _json(data); const response: PutConferencePreferenceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4638,10 +4459,9 @@ const de_PutConferencePreferenceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4659,12 +4479,12 @@ export const de_PutInvitationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutInvitationConfigurationResponse(data, context); + contents = _json(data); const response: PutInvitationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4688,10 +4508,9 @@ const de_PutInvitationConfigurationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4709,12 +4528,12 @@ export const de_PutRoomSkillParameterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRoomSkillParameterResponse(data, context); + contents = _json(data); const response: PutRoomSkillParameterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4735,10 +4554,9 @@ const de_PutRoomSkillParameterCommandError = async ( throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4756,12 +4574,12 @@ export const de_PutSkillAuthorizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutSkillAuthorizationResponse(data, context); + contents = _json(data); const response: PutSkillAuthorizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4785,10 +4603,9 @@ const de_PutSkillAuthorizationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4806,12 +4623,12 @@ export const de_RegisterAVSDeviceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterAVSDeviceResponse(data, context); + contents = _json(data); const response: RegisterAVSDeviceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4841,10 +4658,9 @@ const de_RegisterAVSDeviceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4862,12 +4678,12 @@ export const de_RejectSkillCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectSkillResponse(data, context); + contents = _json(data); const response: RejectSkillCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4891,10 +4707,9 @@ const de_RejectSkillCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4912,12 +4727,12 @@ export const de_ResolveRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResolveRoomResponse(data, context); + contents = _json(data); const response: ResolveRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4938,10 +4753,9 @@ const de_ResolveRoomCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4959,12 +4773,12 @@ export const de_RevokeInvitationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RevokeInvitationResponse(data, context); + contents = _json(data); const response: RevokeInvitationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4988,10 +4802,9 @@ const de_RevokeInvitationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5009,12 +4822,12 @@ export const de_SearchAddressBooksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchAddressBooksResponse(data, context); + contents = _json(data); const response: SearchAddressBooksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5030,10 +4843,9 @@ const de_SearchAddressBooksCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5050,12 +4862,12 @@ export const de_SearchContactsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchContactsResponse(data, context); + contents = _json(data); const response: SearchContactsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5071,10 +4883,9 @@ const de_SearchContactsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5096,7 +4907,7 @@ export const de_SearchDevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5112,10 +4923,9 @@ const de_SearchDevicesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5132,12 +4942,12 @@ export const de_SearchNetworkProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchNetworkProfilesResponse(data, context); + contents = _json(data); const response: SearchNetworkProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5153,10 +4963,9 @@ const de_SearchNetworkProfilesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5173,12 +4982,12 @@ export const de_SearchProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchProfilesResponse(data, context); + contents = _json(data); const response: SearchProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5194,10 +5003,9 @@ const de_SearchProfilesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5214,12 +5022,12 @@ export const de_SearchRoomsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchRoomsResponse(data, context); + contents = _json(data); const response: SearchRoomsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5235,10 +5043,9 @@ const de_SearchRoomsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5255,12 +5062,12 @@ export const de_SearchSkillGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchSkillGroupsResponse(data, context); + contents = _json(data); const response: SearchSkillGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5276,10 +5083,9 @@ const de_SearchSkillGroupsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5296,12 +5102,12 @@ export const de_SearchUsersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchUsersResponse(data, context); + contents = _json(data); const response: SearchUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5317,10 +5123,9 @@ const de_SearchUsersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5337,12 +5142,12 @@ export const de_SendAnnouncementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendAnnouncementResponse(data, context); + contents = _json(data); const response: SendAnnouncementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5366,10 +5171,9 @@ const de_SendAnnouncementCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5387,12 +5191,12 @@ export const de_SendInvitationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendInvitationResponse(data, context); + contents = _json(data); const response: SendInvitationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5419,10 +5223,9 @@ const de_SendInvitationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5440,12 +5243,12 @@ export const de_StartDeviceSyncCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDeviceSyncResponse(data, context); + contents = _json(data); const response: StartDeviceSyncCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5466,10 +5269,9 @@ const de_StartDeviceSyncCommandError = async ( throw await de_DeviceNotRegisteredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5487,12 +5289,12 @@ export const de_StartSmartHomeApplianceDiscoveryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSmartHomeApplianceDiscoveryResponse(data, context); + contents = _json(data); const response: StartSmartHomeApplianceDiscoveryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5513,10 +5315,9 @@ const de_StartSmartHomeApplianceDiscoveryCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5534,12 +5335,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5560,10 +5361,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5581,12 +5381,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5607,10 +5407,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5628,12 +5427,12 @@ export const de_UpdateAddressBookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAddressBookResponse(data, context); + contents = _json(data); const response: UpdateAddressBookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5660,10 +5459,9 @@ const de_UpdateAddressBookCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5681,12 +5479,12 @@ export const de_UpdateBusinessReportScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateBusinessReportScheduleResponse(data, context); + contents = _json(data); const response: UpdateBusinessReportScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5710,10 +5508,9 @@ const de_UpdateBusinessReportScheduleCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5731,12 +5528,12 @@ export const de_UpdateConferenceProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConferenceProviderResponse(data, context); + contents = _json(data); const response: UpdateConferenceProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5757,10 +5554,9 @@ const de_UpdateConferenceProviderCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5778,12 +5574,12 @@ export const de_UpdateContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateContactResponse(data, context); + contents = _json(data); const response: UpdateContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5807,10 +5603,9 @@ const de_UpdateContactCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5828,12 +5623,12 @@ export const de_UpdateDeviceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDeviceResponse(data, context); + contents = _json(data); const response: UpdateDeviceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5860,10 +5655,9 @@ const de_UpdateDeviceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5881,12 +5675,12 @@ export const de_UpdateGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGatewayResponse(data, context); + contents = _json(data); const response: UpdateGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5910,10 +5704,9 @@ const de_UpdateGatewayCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5931,12 +5724,12 @@ export const de_UpdateGatewayGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGatewayGroupResponse(data, context); + contents = _json(data); const response: UpdateGatewayGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5960,10 +5753,9 @@ const de_UpdateGatewayGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5981,12 +5773,12 @@ export const de_UpdateNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNetworkProfileResponse(data, context); + contents = _json(data); const response: UpdateNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6019,10 +5811,9 @@ const de_UpdateNetworkProfileCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6040,12 +5831,12 @@ export const de_UpdateProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProfileResponse(data, context); + contents = _json(data); const response: UpdateProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6072,10 +5863,9 @@ const de_UpdateProfileCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6093,12 +5883,12 @@ export const de_UpdateRoomCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRoomResponse(data, context); + contents = _json(data); const response: UpdateRoomCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6122,10 +5912,9 @@ const de_UpdateRoomCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6143,12 +5932,12 @@ export const de_UpdateSkillGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSkillGroupResponse(data, context); + contents = _json(data); const response: UpdateSkillGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6175,10 +5964,9 @@ const de_UpdateSkillGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6192,7 +5980,7 @@ const de_AlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6208,7 +5996,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6224,7 +6012,7 @@ const de_DeviceNotRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeviceNotRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new DeviceNotRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6240,7 +6028,7 @@ const de_InvalidCertificateAuthorityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCertificateAuthorityException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCertificateAuthorityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6256,7 +6044,7 @@ const de_InvalidDeviceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeviceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeviceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6272,7 +6060,7 @@ const de_InvalidSecretsManagerResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSecretsManagerResourceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSecretsManagerResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6288,7 +6076,7 @@ const de_InvalidServiceLinkedRoleStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidServiceLinkedRoleStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidServiceLinkedRoleStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6304,7 +6092,7 @@ const de_InvalidUserStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUserStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidUserStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6320,7 +6108,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6333,7 +6121,7 @@ const de_LimitExceededExceptionRes = async ( */ const de_NameInUseExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NameInUseException(body, context); + const deserialized: any = _json(body); const exception = new NameInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6346,7 +6134,7 @@ const de_NameInUseExceptionRes = async (parsedOutput: any, context: __SerdeConte */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6362,7 +6150,7 @@ const de_ResourceAssociatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAssociatedException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAssociatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6378,7 +6166,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6394,7 +6182,7 @@ const de_SkillNotLinkedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SkillNotLinkedException(body, context); + const deserialized: any = _json(body); const exception = new SkillNotLinkedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6410,7 +6198,7 @@ const de_UnauthorizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnauthorizedException(body, context); + const deserialized: any = _json(body); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6418,170 +6206,44 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ApproveSkillRequest - */ -const se_ApproveSkillRequest = (input: ApproveSkillRequest, context: __SerdeContext): any => { - return { - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_ApproveSkillRequest omitted. -/** - * serializeAws_json1_1AssociateContactWithAddressBookRequest - */ -const se_AssociateContactWithAddressBookRequest = ( - input: AssociateContactWithAddressBookRequest, - context: __SerdeContext -): any => { - return { - ...(input.AddressBookArn != null && { AddressBookArn: input.AddressBookArn }), - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - }; -}; +// se_AssociateContactWithAddressBookRequest omitted. -/** - * serializeAws_json1_1AssociateDeviceWithNetworkProfileRequest - */ -const se_AssociateDeviceWithNetworkProfileRequest = ( - input: AssociateDeviceWithNetworkProfileRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - ...(input.NetworkProfileArn != null && { NetworkProfileArn: input.NetworkProfileArn }), - }; -}; +// se_AssociateDeviceWithNetworkProfileRequest omitted. -/** - * serializeAws_json1_1AssociateDeviceWithRoomRequest - */ -const se_AssociateDeviceWithRoomRequest = (input: AssociateDeviceWithRoomRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; +// se_AssociateDeviceWithRoomRequest omitted. -/** - * serializeAws_json1_1AssociateSkillGroupWithRoomRequest - */ -const se_AssociateSkillGroupWithRoomRequest = ( - input: AssociateSkillGroupWithRoomRequest, - context: __SerdeContext -): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - }; -}; +// se_AssociateSkillGroupWithRoomRequest omitted. -/** - * serializeAws_json1_1AssociateSkillWithSkillGroupRequest - */ -const se_AssociateSkillWithSkillGroupRequest = ( - input: AssociateSkillWithSkillGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_AssociateSkillWithSkillGroupRequest omitted. -/** - * serializeAws_json1_1AssociateSkillWithUsersRequest - */ -const se_AssociateSkillWithUsersRequest = (input: AssociateSkillWithUsersRequest, context: __SerdeContext): any => { - return { - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_AssociateSkillWithUsersRequest omitted. -/** - * serializeAws_json1_1Audio - */ -const se_Audio = (input: Audio, context: __SerdeContext): any => { - return { - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_Audio omitted. -/** - * serializeAws_json1_1AudioList - */ -const se_AudioList = (input: Audio[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Audio(entry, context); - }); -}; +// se_AudioList omitted. -/** - * serializeAws_json1_1AuthorizationResult - */ -const se_AuthorizationResult = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AuthorizationResult omitted. -/** - * serializeAws_json1_1BusinessReportContentRange - */ -const se_BusinessReportContentRange = (input: BusinessReportContentRange, context: __SerdeContext): any => { - return { - ...(input.Interval != null && { Interval: input.Interval }), - }; -}; +// se_BusinessReportContentRange omitted. -/** - * serializeAws_json1_1BusinessReportRecurrence - */ -const se_BusinessReportRecurrence = (input: BusinessReportRecurrence, context: __SerdeContext): any => { - return { - ...(input.StartDate != null && { StartDate: input.StartDate }), - }; -}; +// se_BusinessReportRecurrence omitted. -/** - * serializeAws_json1_1ConferencePreference - */ -const se_ConferencePreference = (input: ConferencePreference, context: __SerdeContext): any => { - return { - ...(input.DefaultConferenceProviderArn != null && { - DefaultConferenceProviderArn: input.DefaultConferenceProviderArn, - }), - }; -}; +// se_ConferencePreference omitted. -/** - * serializeAws_json1_1Content - */ -const se_Content = (input: Content, context: __SerdeContext): any => { - return { - ...(input.AudioList != null && { AudioList: se_AudioList(input.AudioList, context) }), - ...(input.SsmlList != null && { SsmlList: se_SsmlList(input.SsmlList, context) }), - ...(input.TextList != null && { TextList: se_TextList(input.TextList, context) }), - }; -}; +// se_Content omitted. /** * serializeAws_json1_1CreateAddressBookRequest */ const se_CreateAddressBookRequest = (input: CreateAddressBookRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Tags: _json, + }); }; /** @@ -6591,3421 +6253,892 @@ const se_CreateBusinessReportScheduleRequest = ( input: CreateBusinessReportScheduleRequest, context: __SerdeContext ): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ContentRange != null && { ContentRange: se_BusinessReportContentRange(input.ContentRange, context) }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Recurrence != null && { Recurrence: se_BusinessReportRecurrence(input.Recurrence, context) }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - ...(input.ScheduleName != null && { ScheduleName: input.ScheduleName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ContentRange: _json, + Format: [], + Recurrence: _json, + S3BucketName: [], + S3KeyPrefix: [], + ScheduleName: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateConferenceProviderRequest */ const se_CreateConferenceProviderRequest = (input: CreateConferenceProviderRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ConferenceProviderName != null && { ConferenceProviderName: input.ConferenceProviderName }), - ...(input.ConferenceProviderType != null && { ConferenceProviderType: input.ConferenceProviderType }), - ...(input.IPDialIn != null && { IPDialIn: se_IPDialIn(input.IPDialIn, context) }), - ...(input.MeetingSetting != null && { MeetingSetting: se_MeetingSetting(input.MeetingSetting, context) }), - ...(input.PSTNDialIn != null && { PSTNDialIn: se_PSTNDialIn(input.PSTNDialIn, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ConferenceProviderName: [], + ConferenceProviderType: [], + IPDialIn: _json, + MeetingSetting: _json, + PSTNDialIn: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateContactRequest */ const se_CreateContactRequest = (input: CreateContactRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.PhoneNumbers != null && { PhoneNumbers: se_PhoneNumberList(input.PhoneNumbers, context) }), - ...(input.SipAddresses != null && { SipAddresses: se_SipAddressList(input.SipAddresses, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DisplayName: [], + FirstName: [], + LastName: [], + PhoneNumber: [], + PhoneNumbers: _json, + SipAddresses: _json, + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateEndOfMeetingReminder - */ -const se_CreateEndOfMeetingReminder = (input: CreateEndOfMeetingReminder, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.ReminderAtMinutes != null && { - ReminderAtMinutes: se_EndOfMeetingReminderMinutesList(input.ReminderAtMinutes, context), - }), - ...(input.ReminderType != null && { ReminderType: input.ReminderType }), - }; -}; +// se_CreateEndOfMeetingReminder omitted. /** * serializeAws_json1_1CreateGatewayGroupRequest */ const se_CreateGatewayGroupRequest = (input: CreateGatewayGroupRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateInstantBooking - */ -const se_CreateInstantBooking = (input: CreateInstantBooking, context: __SerdeContext): any => { - return { - ...(input.DurationInMinutes != null && { DurationInMinutes: input.DurationInMinutes }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_CreateInstantBooking omitted. -/** - * serializeAws_json1_1CreateMeetingRoomConfiguration - */ -const se_CreateMeetingRoomConfiguration = (input: CreateMeetingRoomConfiguration, context: __SerdeContext): any => { - return { - ...(input.EndOfMeetingReminder != null && { - EndOfMeetingReminder: se_CreateEndOfMeetingReminder(input.EndOfMeetingReminder, context), - }), - ...(input.InstantBooking != null && { InstantBooking: se_CreateInstantBooking(input.InstantBooking, context) }), - ...(input.RequireCheckIn != null && { RequireCheckIn: se_CreateRequireCheckIn(input.RequireCheckIn, context) }), - ...(input.RoomUtilizationMetricsEnabled != null && { - RoomUtilizationMetricsEnabled: input.RoomUtilizationMetricsEnabled, - }), - }; -}; +// se_CreateMeetingRoomConfiguration omitted. /** * serializeAws_json1_1CreateNetworkProfileRequest */ const se_CreateNetworkProfileRequest = (input: CreateNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.CurrentPassword != null && { CurrentPassword: input.CurrentPassword }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EapMethod != null && { EapMethod: input.EapMethod }), - ...(input.NetworkProfileName != null && { NetworkProfileName: input.NetworkProfileName }), - ...(input.NextPassword != null && { NextPassword: input.NextPassword }), - ...(input.SecurityType != null && { SecurityType: input.SecurityType }), - ...(input.Ssid != null && { Ssid: input.Ssid }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrustAnchors != null && { TrustAnchors: se_TrustAnchorList(input.TrustAnchors, context) }), - }; + return take(input, { + CertificateAuthorityArn: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + CurrentPassword: [], + Description: [], + EapMethod: [], + NetworkProfileName: [], + NextPassword: [], + SecurityType: [], + Ssid: [], + Tags: _json, + TrustAnchors: _json, + }); }; /** * serializeAws_json1_1CreateProfileRequest */ const se_CreateProfileRequest = (input: CreateProfileRequest, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataRetentionOptIn != null && { DataRetentionOptIn: input.DataRetentionOptIn }), - ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }), - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.MaxVolumeLimit != null && { MaxVolumeLimit: input.MaxVolumeLimit }), - ...(input.MeetingRoomConfiguration != null && { - MeetingRoomConfiguration: se_CreateMeetingRoomConfiguration(input.MeetingRoomConfiguration, context), - }), - ...(input.PSTNEnabled != null && { PSTNEnabled: input.PSTNEnabled }), - ...(input.ProfileName != null && { ProfileName: input.ProfileName }), - ...(input.SetupModeDisabled != null && { SetupModeDisabled: input.SetupModeDisabled }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TemperatureUnit != null && { TemperatureUnit: input.TemperatureUnit }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - ...(input.WakeWord != null && { WakeWord: input.WakeWord }), - }; + return take(input, { + Address: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataRetentionOptIn: [], + DistanceUnit: [], + Locale: [], + MaxVolumeLimit: [], + MeetingRoomConfiguration: _json, + PSTNEnabled: [], + ProfileName: [], + SetupModeDisabled: [], + Tags: _json, + TemperatureUnit: [], + Timezone: [], + WakeWord: [], + }); }; -/** - * serializeAws_json1_1CreateRequireCheckIn - */ -const se_CreateRequireCheckIn = (input: CreateRequireCheckIn, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.ReleaseAfterMinutes != null && { ReleaseAfterMinutes: input.ReleaseAfterMinutes }), - }; -}; +// se_CreateRequireCheckIn omitted. /** * serializeAws_json1_1CreateRoomRequest */ const se_CreateRoomRequest = (input: CreateRoomRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.ProfileArn != null && { ProfileArn: input.ProfileArn }), - ...(input.ProviderCalendarId != null && { ProviderCalendarId: input.ProviderCalendarId }), - ...(input.RoomName != null && { RoomName: input.RoomName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + ProfileArn: [], + ProviderCalendarId: [], + RoomName: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateSkillGroupRequest */ const se_CreateSkillGroupRequest = (input: CreateSkillGroupRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.SkillGroupName != null && { SkillGroupName: input.SkillGroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + SkillGroupName: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateUserRequest */ const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Email != null && { Email: input.Email }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserId != null && { UserId: input.UserId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Email: [], + FirstName: [], + LastName: [], + Tags: _json, + UserId: [], + }); }; -/** - * serializeAws_json1_1DeleteAddressBookRequest - */ -const se_DeleteAddressBookRequest = (input: DeleteAddressBookRequest, context: __SerdeContext): any => { - return { - ...(input.AddressBookArn != null && { AddressBookArn: input.AddressBookArn }), - }; -}; +// se_DeleteAddressBookRequest omitted. -/** - * serializeAws_json1_1DeleteBusinessReportScheduleRequest - */ -const se_DeleteBusinessReportScheduleRequest = ( - input: DeleteBusinessReportScheduleRequest, - context: __SerdeContext -): any => { - return { - ...(input.ScheduleArn != null && { ScheduleArn: input.ScheduleArn }), - }; -}; +// se_DeleteBusinessReportScheduleRequest omitted. -/** - * serializeAws_json1_1DeleteConferenceProviderRequest - */ -const se_DeleteConferenceProviderRequest = (input: DeleteConferenceProviderRequest, context: __SerdeContext): any => { - return { - ...(input.ConferenceProviderArn != null && { ConferenceProviderArn: input.ConferenceProviderArn }), - }; -}; +// se_DeleteConferenceProviderRequest omitted. -/** - * serializeAws_json1_1DeleteContactRequest - */ -const se_DeleteContactRequest = (input: DeleteContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - }; -}; +// se_DeleteContactRequest omitted. -/** - * serializeAws_json1_1DeleteDeviceRequest - */ -const se_DeleteDeviceRequest = (input: DeleteDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - }; -}; +// se_DeleteDeviceRequest omitted. -/** - * serializeAws_json1_1DeleteDeviceUsageDataRequest - */ -const se_DeleteDeviceUsageDataRequest = (input: DeleteDeviceUsageDataRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - ...(input.DeviceUsageType != null && { DeviceUsageType: input.DeviceUsageType }), - }; -}; +// se_DeleteDeviceUsageDataRequest omitted. -/** - * serializeAws_json1_1DeleteGatewayGroupRequest - */ -const se_DeleteGatewayGroupRequest = (input: DeleteGatewayGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GatewayGroupArn != null && { GatewayGroupArn: input.GatewayGroupArn }), - }; -}; +// se_DeleteGatewayGroupRequest omitted. -/** - * serializeAws_json1_1DeleteNetworkProfileRequest - */ -const se_DeleteNetworkProfileRequest = (input: DeleteNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.NetworkProfileArn != null && { NetworkProfileArn: input.NetworkProfileArn }), - }; -}; +// se_DeleteNetworkProfileRequest omitted. -/** - * serializeAws_json1_1DeleteProfileRequest - */ -const se_DeleteProfileRequest = (input: DeleteProfileRequest, context: __SerdeContext): any => { - return { - ...(input.ProfileArn != null && { ProfileArn: input.ProfileArn }), - }; -}; +// se_DeleteProfileRequest omitted. -/** - * serializeAws_json1_1DeleteRoomRequest - */ -const se_DeleteRoomRequest = (input: DeleteRoomRequest, context: __SerdeContext): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; +// se_DeleteRoomRequest omitted. -/** - * serializeAws_json1_1DeleteRoomSkillParameterRequest - */ -const se_DeleteRoomSkillParameterRequest = (input: DeleteRoomSkillParameterRequest, context: __SerdeContext): any => { - return { - ...(input.ParameterKey != null && { ParameterKey: input.ParameterKey }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_DeleteRoomSkillParameterRequest omitted. -/** - * serializeAws_json1_1DeleteSkillAuthorizationRequest - */ -const se_DeleteSkillAuthorizationRequest = (input: DeleteSkillAuthorizationRequest, context: __SerdeContext): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_DeleteSkillAuthorizationRequest omitted. -/** - * serializeAws_json1_1DeleteSkillGroupRequest - */ -const se_DeleteSkillGroupRequest = (input: DeleteSkillGroupRequest, context: __SerdeContext): any => { - return { - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - }; -}; +// se_DeleteSkillGroupRequest omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.EnrollmentId != null && { EnrollmentId: input.EnrollmentId }), - ...(input.UserArn != null && { UserArn: input.UserArn }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DisassociateContactFromAddressBookRequest - */ -const se_DisassociateContactFromAddressBookRequest = ( - input: DisassociateContactFromAddressBookRequest, - context: __SerdeContext -): any => { - return { - ...(input.AddressBookArn != null && { AddressBookArn: input.AddressBookArn }), - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - }; -}; +// se_DisassociateContactFromAddressBookRequest omitted. -/** - * serializeAws_json1_1DisassociateDeviceFromRoomRequest - */ -const se_DisassociateDeviceFromRoomRequest = ( - input: DisassociateDeviceFromRoomRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - }; -}; +// se_DisassociateDeviceFromRoomRequest omitted. -/** - * serializeAws_json1_1DisassociateSkillFromSkillGroupRequest - */ -const se_DisassociateSkillFromSkillGroupRequest = ( - input: DisassociateSkillFromSkillGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_DisassociateSkillFromSkillGroupRequest omitted. -/** - * serializeAws_json1_1DisassociateSkillFromUsersRequest - */ -const se_DisassociateSkillFromUsersRequest = ( - input: DisassociateSkillFromUsersRequest, - context: __SerdeContext -): any => { - return { - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; +// se_DisassociateSkillFromUsersRequest omitted. -/** - * serializeAws_json1_1DisassociateSkillGroupFromRoomRequest - */ -const se_DisassociateSkillGroupFromRoomRequest = ( - input: DisassociateSkillGroupFromRoomRequest, - context: __SerdeContext -): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - }; -}; +// se_DisassociateSkillGroupFromRoomRequest omitted. -/** - * serializeAws_json1_1EndOfMeetingReminderMinutesList - */ -const se_EndOfMeetingReminderMinutesList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EndOfMeetingReminderMinutesList omitted. -/** - * serializeAws_json1_1Features - */ -const se_Features = (input: (Feature | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Features omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_json1_1FilterValueList - */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ForgetSmartHomeAppliancesRequest - */ -const se_ForgetSmartHomeAppliancesRequest = (input: ForgetSmartHomeAppliancesRequest, context: __SerdeContext): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; - -/** - * serializeAws_json1_1GetAddressBookRequest - */ -const se_GetAddressBookRequest = (input: GetAddressBookRequest, context: __SerdeContext): any => { - return { - ...(input.AddressBookArn != null && { AddressBookArn: input.AddressBookArn }), - }; -}; - -/** - * serializeAws_json1_1GetConferencePreferenceRequest - */ -const se_GetConferencePreferenceRequest = (input: GetConferencePreferenceRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetConferenceProviderRequest - */ -const se_GetConferenceProviderRequest = (input: GetConferenceProviderRequest, context: __SerdeContext): any => { - return { - ...(input.ConferenceProviderArn != null && { ConferenceProviderArn: input.ConferenceProviderArn }), - }; -}; - -/** - * serializeAws_json1_1GetContactRequest - */ -const se_GetContactRequest = (input: GetContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - }; -}; - -/** - * serializeAws_json1_1GetDeviceRequest - */ -const se_GetDeviceRequest = (input: GetDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - }; -}; - -/** - * serializeAws_json1_1GetGatewayGroupRequest - */ -const se_GetGatewayGroupRequest = (input: GetGatewayGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GatewayGroupArn != null && { GatewayGroupArn: input.GatewayGroupArn }), - }; -}; - -/** - * serializeAws_json1_1GetGatewayRequest - */ -const se_GetGatewayRequest = (input: GetGatewayRequest, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; - -/** - * serializeAws_json1_1GetInvitationConfigurationRequest - */ -const se_GetInvitationConfigurationRequest = ( - input: GetInvitationConfigurationRequest, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetNetworkProfileRequest - */ -const se_GetNetworkProfileRequest = (input: GetNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.NetworkProfileArn != null && { NetworkProfileArn: input.NetworkProfileArn }), - }; -}; - -/** - * serializeAws_json1_1GetProfileRequest - */ -const se_GetProfileRequest = (input: GetProfileRequest, context: __SerdeContext): any => { - return { - ...(input.ProfileArn != null && { ProfileArn: input.ProfileArn }), - }; -}; - -/** - * serializeAws_json1_1GetRoomRequest - */ -const se_GetRoomRequest = (input: GetRoomRequest, context: __SerdeContext): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; - -/** - * serializeAws_json1_1GetRoomSkillParameterRequest - */ -const se_GetRoomSkillParameterRequest = (input: GetRoomSkillParameterRequest, context: __SerdeContext): any => { - return { - ...(input.ParameterKey != null && { ParameterKey: input.ParameterKey }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; - -/** - * serializeAws_json1_1GetSkillGroupRequest - */ -const se_GetSkillGroupRequest = (input: GetSkillGroupRequest, context: __SerdeContext): any => { - return { - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - }; -}; - -/** - * serializeAws_json1_1IPDialIn - */ -const se_IPDialIn = (input: IPDialIn, context: __SerdeContext): any => { - return { - ...(input.CommsProtocol != null && { CommsProtocol: input.CommsProtocol }), - ...(input.Endpoint != null && { Endpoint: input.Endpoint }), - }; -}; - -/** - * serializeAws_json1_1ListBusinessReportSchedulesRequest - */ -const se_ListBusinessReportSchedulesRequest = ( - input: ListBusinessReportSchedulesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListConferenceProvidersRequest - */ -const se_ListConferenceProvidersRequest = (input: ListConferenceProvidersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDeviceEventsRequest - */ -const se_ListDeviceEventsRequest = (input: ListDeviceEventsRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - ...(input.EventType != null && { EventType: input.EventType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListGatewayGroupsRequest - */ -const se_ListGatewayGroupsRequest = (input: ListGatewayGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListGatewaysRequest - */ -const se_ListGatewaysRequest = (input: ListGatewaysRequest, context: __SerdeContext): any => { - return { - ...(input.GatewayGroupArn != null && { GatewayGroupArn: input.GatewayGroupArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSkillsRequest - */ -const se_ListSkillsRequest = (input: ListSkillsRequest, context: __SerdeContext): any => { - return { - ...(input.EnablementType != null && { EnablementType: input.EnablementType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - ...(input.SkillType != null && { SkillType: input.SkillType }), - }; -}; - -/** - * serializeAws_json1_1ListSkillsStoreCategoriesRequest - */ -const se_ListSkillsStoreCategoriesRequest = (input: ListSkillsStoreCategoriesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSkillsStoreSkillsByCategoryRequest - */ -const se_ListSkillsStoreSkillsByCategoryRequest = ( - input: ListSkillsStoreSkillsByCategoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.CategoryId != null && { CategoryId: input.CategoryId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSmartHomeAppliancesRequest - */ -const se_ListSmartHomeAppliancesRequest = (input: ListSmartHomeAppliancesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; - -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1MeetingSetting - */ -const se_MeetingSetting = (input: MeetingSetting, context: __SerdeContext): any => { - return { - ...(input.RequirePin != null && { RequirePin: input.RequirePin }), - }; -}; - -/** - * serializeAws_json1_1PhoneNumber - */ -const se_PhoneNumber = (input: PhoneNumber, context: __SerdeContext): any => { - return { - ...(input.Number != null && { Number: input.Number }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1PhoneNumberList - */ -const se_PhoneNumberList = (input: PhoneNumber[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PhoneNumber(entry, context); - }); -}; - -/** - * serializeAws_json1_1PSTNDialIn - */ -const se_PSTNDialIn = (input: PSTNDialIn, context: __SerdeContext): any => { - return { - ...(input.CountryCode != null && { CountryCode: input.CountryCode }), - ...(input.OneClickIdDelay != null && { OneClickIdDelay: input.OneClickIdDelay }), - ...(input.OneClickPinDelay != null && { OneClickPinDelay: input.OneClickPinDelay }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - }; -}; - -/** - * serializeAws_json1_1PutConferencePreferenceRequest - */ -const se_PutConferencePreferenceRequest = (input: PutConferencePreferenceRequest, context: __SerdeContext): any => { - return { - ...(input.ConferencePreference != null && { - ConferencePreference: se_ConferencePreference(input.ConferencePreference, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutInvitationConfigurationRequest - */ -const se_PutInvitationConfigurationRequest = ( - input: PutInvitationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ContactEmail != null && { ContactEmail: input.ContactEmail }), - ...(input.OrganizationName != null && { OrganizationName: input.OrganizationName }), - ...(input.PrivateSkillIds != null && { PrivateSkillIds: se_ShortSkillIdList(input.PrivateSkillIds, context) }), - }; -}; - -/** - * serializeAws_json1_1PutRoomSkillParameterRequest - */ -const se_PutRoomSkillParameterRequest = (input: PutRoomSkillParameterRequest, context: __SerdeContext): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.RoomSkillParameter != null && { - RoomSkillParameter: se_RoomSkillParameter(input.RoomSkillParameter, context), - }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; - -/** - * serializeAws_json1_1PutSkillAuthorizationRequest - */ -const se_PutSkillAuthorizationRequest = (input: PutSkillAuthorizationRequest, context: __SerdeContext): any => { - return { - ...(input.AuthorizationResult != null && { - AuthorizationResult: se_AuthorizationResult(input.AuthorizationResult, context), - }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; - -/** - * serializeAws_json1_1RegisterAVSDeviceRequest - */ -const se_RegisterAVSDeviceRequest = (input: RegisterAVSDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.AmazonId != null && { AmazonId: input.AmazonId }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.DeviceSerialNumber != null && { DeviceSerialNumber: input.DeviceSerialNumber }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserCode != null && { UserCode: input.UserCode }), - }; -}; - -/** - * serializeAws_json1_1RejectSkillRequest - */ -const se_RejectSkillRequest = (input: RejectSkillRequest, context: __SerdeContext): any => { - return { - ...(input.SkillId != null && { SkillId: input.SkillId }), - }; -}; - -/** - * serializeAws_json1_1ResolveRoomRequest - */ -const se_ResolveRoomRequest = (input: ResolveRoomRequest, context: __SerdeContext): any => { - return { - ...(input.SkillId != null && { SkillId: input.SkillId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; - -/** - * serializeAws_json1_1RevokeInvitationRequest - */ -const se_RevokeInvitationRequest = (input: RevokeInvitationRequest, context: __SerdeContext): any => { - return { - ...(input.EnrollmentId != null && { EnrollmentId: input.EnrollmentId }), - ...(input.UserArn != null && { UserArn: input.UserArn }), - }; -}; - -/** - * serializeAws_json1_1RoomSkillParameter - */ -const se_RoomSkillParameter = (input: RoomSkillParameter, context: __SerdeContext): any => { - return { - ...(input.ParameterKey != null && { ParameterKey: input.ParameterKey }), - ...(input.ParameterValue != null && { ParameterValue: input.ParameterValue }), - }; -}; - -/** - * serializeAws_json1_1SearchAddressBooksRequest - */ -const se_SearchAddressBooksRequest = (input: SearchAddressBooksRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchContactsRequest - */ -const se_SearchContactsRequest = (input: SearchContactsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchDevicesRequest - */ -const se_SearchDevicesRequest = (input: SearchDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchNetworkProfilesRequest - */ -const se_SearchNetworkProfilesRequest = (input: SearchNetworkProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchProfilesRequest - */ -const se_SearchProfilesRequest = (input: SearchProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchRoomsRequest - */ -const se_SearchRoomsRequest = (input: SearchRoomsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchSkillGroupsRequest - */ -const se_SearchSkillGroupsRequest = (input: SearchSkillGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchUsersRequest - */ -const se_SearchUsersRequest = (input: SearchUsersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortList(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SendAnnouncementRequest - */ -const se_SendAnnouncementRequest = (input: SendAnnouncementRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: se_Content(input.Content, context) }), - ...(input.RoomFilters != null && { RoomFilters: se_FilterList(input.RoomFilters, context) }), - ...(input.TimeToLiveInSeconds != null && { TimeToLiveInSeconds: input.TimeToLiveInSeconds }), - }; -}; - -/** - * serializeAws_json1_1SendInvitationRequest - */ -const se_SendInvitationRequest = (input: SendInvitationRequest, context: __SerdeContext): any => { - return { - ...(input.UserArn != null && { UserArn: input.UserArn }), - }; -}; - -/** - * serializeAws_json1_1ShortSkillIdList - */ -const se_ShortSkillIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SipAddress - */ -const se_SipAddress = (input: SipAddress, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; - -/** - * serializeAws_json1_1SipAddressList - */ -const se_SipAddressList = (input: SipAddress[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SipAddress(entry, context); - }); -}; - -/** - * serializeAws_json1_1Sort - */ -const se_Sort = (input: Sort, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1SortList - */ -const se_SortList = (input: Sort[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Sort(entry, context); - }); -}; - -/** - * serializeAws_json1_1Ssml - */ -const se_Ssml = (input: Ssml, context: __SerdeContext): any => { - return { - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1SsmlList - */ -const se_SsmlList = (input: Ssml[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Ssml(entry, context); - }); -}; - -/** - * serializeAws_json1_1StartDeviceSyncRequest - */ -const se_StartDeviceSyncRequest = (input: StartDeviceSyncRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - ...(input.Features != null && { Features: se_Features(input.Features, context) }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; - -/** - * serializeAws_json1_1StartSmartHomeApplianceDiscoveryRequest - */ -const se_StartSmartHomeApplianceDiscoveryRequest = ( - input: StartSmartHomeApplianceDiscoveryRequest, - context: __SerdeContext -): any => { - return { - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Text - */ -const se_Text = (input: Text, context: __SerdeContext): any => { - return { - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TextList - */ -const se_TextList = (input: Text[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Text(entry, context); - }); -}; - -/** - * serializeAws_json1_1TrustAnchorList - */ -const se_TrustAnchorList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAddressBookRequest - */ -const se_UpdateAddressBookRequest = (input: UpdateAddressBookRequest, context: __SerdeContext): any => { - return { - ...(input.AddressBookArn != null && { AddressBookArn: input.AddressBookArn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateBusinessReportScheduleRequest - */ -const se_UpdateBusinessReportScheduleRequest = ( - input: UpdateBusinessReportScheduleRequest, - context: __SerdeContext -): any => { - return { - ...(input.Format != null && { Format: input.Format }), - ...(input.Recurrence != null && { Recurrence: se_BusinessReportRecurrence(input.Recurrence, context) }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - ...(input.ScheduleArn != null && { ScheduleArn: input.ScheduleArn }), - ...(input.ScheduleName != null && { ScheduleName: input.ScheduleName }), - }; -}; - -/** - * serializeAws_json1_1UpdateConferenceProviderRequest - */ -const se_UpdateConferenceProviderRequest = (input: UpdateConferenceProviderRequest, context: __SerdeContext): any => { - return { - ...(input.ConferenceProviderArn != null && { ConferenceProviderArn: input.ConferenceProviderArn }), - ...(input.ConferenceProviderType != null && { ConferenceProviderType: input.ConferenceProviderType }), - ...(input.IPDialIn != null && { IPDialIn: se_IPDialIn(input.IPDialIn, context) }), - ...(input.MeetingSetting != null && { MeetingSetting: se_MeetingSetting(input.MeetingSetting, context) }), - ...(input.PSTNDialIn != null && { PSTNDialIn: se_PSTNDialIn(input.PSTNDialIn, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateContactRequest - */ -const se_UpdateContactRequest = (input: UpdateContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.PhoneNumbers != null && { PhoneNumbers: se_PhoneNumberList(input.PhoneNumbers, context) }), - ...(input.SipAddresses != null && { SipAddresses: se_SipAddressList(input.SipAddresses, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateDeviceRequest - */ -const se_UpdateDeviceRequest = (input: UpdateDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceArn != null && { DeviceArn: input.DeviceArn }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - }; -}; - -/** - * serializeAws_json1_1UpdateEndOfMeetingReminder - */ -const se_UpdateEndOfMeetingReminder = (input: UpdateEndOfMeetingReminder, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.ReminderAtMinutes != null && { - ReminderAtMinutes: se_EndOfMeetingReminderMinutesList(input.ReminderAtMinutes, context), - }), - ...(input.ReminderType != null && { ReminderType: input.ReminderType }), - }; -}; - -/** - * serializeAws_json1_1UpdateGatewayGroupRequest - */ -const se_UpdateGatewayGroupRequest = (input: UpdateGatewayGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.GatewayGroupArn != null && { GatewayGroupArn: input.GatewayGroupArn }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateGatewayRequest - */ -const se_UpdateGatewayRequest = (input: UpdateGatewayRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SoftwareVersion != null && { SoftwareVersion: input.SoftwareVersion }), - }; -}; - -/** - * serializeAws_json1_1UpdateInstantBooking - */ -const se_UpdateInstantBooking = (input: UpdateInstantBooking, context: __SerdeContext): any => { - return { - ...(input.DurationInMinutes != null && { DurationInMinutes: input.DurationInMinutes }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_json1_1UpdateMeetingRoomConfiguration - */ -const se_UpdateMeetingRoomConfiguration = (input: UpdateMeetingRoomConfiguration, context: __SerdeContext): any => { - return { - ...(input.EndOfMeetingReminder != null && { - EndOfMeetingReminder: se_UpdateEndOfMeetingReminder(input.EndOfMeetingReminder, context), - }), - ...(input.InstantBooking != null && { InstantBooking: se_UpdateInstantBooking(input.InstantBooking, context) }), - ...(input.RequireCheckIn != null && { RequireCheckIn: se_UpdateRequireCheckIn(input.RequireCheckIn, context) }), - ...(input.RoomUtilizationMetricsEnabled != null && { - RoomUtilizationMetricsEnabled: input.RoomUtilizationMetricsEnabled, - }), - }; -}; - -/** - * serializeAws_json1_1UpdateNetworkProfileRequest - */ -const se_UpdateNetworkProfileRequest = (input: UpdateNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.CurrentPassword != null && { CurrentPassword: input.CurrentPassword }), - ...(input.Description != null && { Description: input.Description }), - ...(input.NetworkProfileArn != null && { NetworkProfileArn: input.NetworkProfileArn }), - ...(input.NetworkProfileName != null && { NetworkProfileName: input.NetworkProfileName }), - ...(input.NextPassword != null && { NextPassword: input.NextPassword }), - ...(input.TrustAnchors != null && { TrustAnchors: se_TrustAnchorList(input.TrustAnchors, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateProfileRequest - */ -const se_UpdateProfileRequest = (input: UpdateProfileRequest, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.DataRetentionOptIn != null && { DataRetentionOptIn: input.DataRetentionOptIn }), - ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }), - ...(input.IsDefault != null && { IsDefault: input.IsDefault }), - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.MaxVolumeLimit != null && { MaxVolumeLimit: input.MaxVolumeLimit }), - ...(input.MeetingRoomConfiguration != null && { - MeetingRoomConfiguration: se_UpdateMeetingRoomConfiguration(input.MeetingRoomConfiguration, context), - }), - ...(input.PSTNEnabled != null && { PSTNEnabled: input.PSTNEnabled }), - ...(input.ProfileArn != null && { ProfileArn: input.ProfileArn }), - ...(input.ProfileName != null && { ProfileName: input.ProfileName }), - ...(input.SetupModeDisabled != null && { SetupModeDisabled: input.SetupModeDisabled }), - ...(input.TemperatureUnit != null && { TemperatureUnit: input.TemperatureUnit }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - ...(input.WakeWord != null && { WakeWord: input.WakeWord }), - }; -}; - -/** - * serializeAws_json1_1UpdateRequireCheckIn - */ -const se_UpdateRequireCheckIn = (input: UpdateRequireCheckIn, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.ReleaseAfterMinutes != null && { ReleaseAfterMinutes: input.ReleaseAfterMinutes }), - }; -}; - -/** - * serializeAws_json1_1UpdateRoomRequest - */ -const se_UpdateRoomRequest = (input: UpdateRoomRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.ProfileArn != null && { ProfileArn: input.ProfileArn }), - ...(input.ProviderCalendarId != null && { ProviderCalendarId: input.ProviderCalendarId }), - ...(input.RoomArn != null && { RoomArn: input.RoomArn }), - ...(input.RoomName != null && { RoomName: input.RoomName }), - }; -}; - -/** - * serializeAws_json1_1UpdateSkillGroupRequest - */ -const se_UpdateSkillGroupRequest = (input: UpdateSkillGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.SkillGroupArn != null && { SkillGroupArn: input.SkillGroupArn }), - ...(input.SkillGroupName != null && { SkillGroupName: input.SkillGroupName }), - }; -}; - -/** - * deserializeAws_json1_1AddressBook - */ -const de_AddressBook = (output: any, context: __SerdeContext): AddressBook => { - return { - AddressBookArn: __expectString(output.AddressBookArn), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AddressBookData - */ -const de_AddressBookData = (output: any, context: __SerdeContext): AddressBookData => { - return { - AddressBookArn: __expectString(output.AddressBookArn), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AddressBookDataList - */ -const de_AddressBookDataList = (output: any, context: __SerdeContext): AddressBookData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AddressBookData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlreadyExistsException - */ -const de_AlreadyExistsException = (output: any, context: __SerdeContext): AlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ApproveSkillResponse - */ -const de_ApproveSkillResponse = (output: any, context: __SerdeContext): ApproveSkillResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateContactWithAddressBookResponse - */ -const de_AssociateContactWithAddressBookResponse = ( - output: any, - context: __SerdeContext -): AssociateContactWithAddressBookResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateDeviceWithNetworkProfileResponse - */ -const de_AssociateDeviceWithNetworkProfileResponse = ( - output: any, - context: __SerdeContext -): AssociateDeviceWithNetworkProfileResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateDeviceWithRoomResponse - */ -const de_AssociateDeviceWithRoomResponse = (output: any, context: __SerdeContext): AssociateDeviceWithRoomResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateSkillGroupWithRoomResponse - */ -const de_AssociateSkillGroupWithRoomResponse = ( - output: any, - context: __SerdeContext -): AssociateSkillGroupWithRoomResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateSkillWithSkillGroupResponse - */ -const de_AssociateSkillWithSkillGroupResponse = ( - output: any, - context: __SerdeContext -): AssociateSkillWithSkillGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateSkillWithUsersResponse - */ -const de_AssociateSkillWithUsersResponse = (output: any, context: __SerdeContext): AssociateSkillWithUsersResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1BulletPoints - */ -const de_BulletPoints = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BusinessReport - */ -const de_BusinessReport = (output: any, context: __SerdeContext): BusinessReport => { - return { - DeliveryTime: - output.DeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeliveryTime))) - : undefined, - DownloadUrl: __expectString(output.DownloadUrl), - FailureCode: __expectString(output.FailureCode), - S3Location: output.S3Location != null ? de_BusinessReportS3Location(output.S3Location, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1BusinessReportContentRange - */ -const de_BusinessReportContentRange = (output: any, context: __SerdeContext): BusinessReportContentRange => { - return { - Interval: __expectString(output.Interval), - } as any; -}; - -/** - * deserializeAws_json1_1BusinessReportRecurrence - */ -const de_BusinessReportRecurrence = (output: any, context: __SerdeContext): BusinessReportRecurrence => { - return { - StartDate: __expectString(output.StartDate), - } as any; -}; - -/** - * deserializeAws_json1_1BusinessReportS3Location - */ -const de_BusinessReportS3Location = (output: any, context: __SerdeContext): BusinessReportS3Location => { - return { - BucketName: __expectString(output.BucketName), - Path: __expectString(output.Path), - } as any; -}; - -/** - * deserializeAws_json1_1BusinessReportSchedule - */ -const de_BusinessReportSchedule = (output: any, context: __SerdeContext): BusinessReportSchedule => { - return { - ContentRange: output.ContentRange != null ? de_BusinessReportContentRange(output.ContentRange, context) : undefined, - Format: __expectString(output.Format), - LastBusinessReport: - output.LastBusinessReport != null ? de_BusinessReport(output.LastBusinessReport, context) : undefined, - Recurrence: output.Recurrence != null ? de_BusinessReportRecurrence(output.Recurrence, context) : undefined, - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - ScheduleArn: __expectString(output.ScheduleArn), - ScheduleName: __expectString(output.ScheduleName), - } as any; -}; - -/** - * deserializeAws_json1_1BusinessReportScheduleList - */ -const de_BusinessReportScheduleList = (output: any, context: __SerdeContext): BusinessReportSchedule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BusinessReportSchedule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Category - */ -const de_Category = (output: any, context: __SerdeContext): Category => { - return { - CategoryId: __expectLong(output.CategoryId), - CategoryName: __expectString(output.CategoryName), - } as any; -}; - -/** - * deserializeAws_json1_1CategoryList - */ -const de_CategoryList = (output: any, context: __SerdeContext): Category[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Category(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConferencePreference - */ -const de_ConferencePreference = (output: any, context: __SerdeContext): ConferencePreference => { - return { - DefaultConferenceProviderArn: __expectString(output.DefaultConferenceProviderArn), - } as any; -}; - -/** - * deserializeAws_json1_1ConferenceProvider - */ -const de_ConferenceProvider = (output: any, context: __SerdeContext): ConferenceProvider => { - return { - Arn: __expectString(output.Arn), - IPDialIn: output.IPDialIn != null ? de_IPDialIn(output.IPDialIn, context) : undefined, - MeetingSetting: output.MeetingSetting != null ? de_MeetingSetting(output.MeetingSetting, context) : undefined, - Name: __expectString(output.Name), - PSTNDialIn: output.PSTNDialIn != null ? de_PSTNDialIn(output.PSTNDialIn, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ConferenceProvidersList - */ -const de_ConferenceProvidersList = (output: any, context: __SerdeContext): ConferenceProvider[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConferenceProvider(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Contact - */ -const de_Contact = (output: any, context: __SerdeContext): Contact => { - return { - ContactArn: __expectString(output.ContactArn), - DisplayName: __expectString(output.DisplayName), - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumbers: output.PhoneNumbers != null ? de_PhoneNumberList(output.PhoneNumbers, context) : undefined, - SipAddresses: output.SipAddresses != null ? de_SipAddressList(output.SipAddresses, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContactData - */ -const de_ContactData = (output: any, context: __SerdeContext): ContactData => { - return { - ContactArn: __expectString(output.ContactArn), - DisplayName: __expectString(output.DisplayName), - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumbers: output.PhoneNumbers != null ? de_PhoneNumberList(output.PhoneNumbers, context) : undefined, - SipAddresses: output.SipAddresses != null ? de_SipAddressList(output.SipAddresses, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContactDataList - */ -const de_ContactDataList = (output: any, context: __SerdeContext): ContactData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContactData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateAddressBookResponse - */ -const de_CreateAddressBookResponse = (output: any, context: __SerdeContext): CreateAddressBookResponse => { - return { - AddressBookArn: __expectString(output.AddressBookArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateBusinessReportScheduleResponse - */ -const de_CreateBusinessReportScheduleResponse = ( - output: any, - context: __SerdeContext -): CreateBusinessReportScheduleResponse => { - return { - ScheduleArn: __expectString(output.ScheduleArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateConferenceProviderResponse - */ -const de_CreateConferenceProviderResponse = ( - output: any, - context: __SerdeContext -): CreateConferenceProviderResponse => { - return { - ConferenceProviderArn: __expectString(output.ConferenceProviderArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateContactResponse - */ -const de_CreateContactResponse = (output: any, context: __SerdeContext): CreateContactResponse => { - return { - ContactArn: __expectString(output.ContactArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateGatewayGroupResponse - */ -const de_CreateGatewayGroupResponse = (output: any, context: __SerdeContext): CreateGatewayGroupResponse => { - return { - GatewayGroupArn: __expectString(output.GatewayGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateNetworkProfileResponse - */ -const de_CreateNetworkProfileResponse = (output: any, context: __SerdeContext): CreateNetworkProfileResponse => { - return { - NetworkProfileArn: __expectString(output.NetworkProfileArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProfileResponse - */ -const de_CreateProfileResponse = (output: any, context: __SerdeContext): CreateProfileResponse => { - return { - ProfileArn: __expectString(output.ProfileArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateRoomResponse - */ -const de_CreateRoomResponse = (output: any, context: __SerdeContext): CreateRoomResponse => { - return { - RoomArn: __expectString(output.RoomArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSkillGroupResponse - */ -const de_CreateSkillGroupResponse = (output: any, context: __SerdeContext): CreateSkillGroupResponse => { - return { - SkillGroupArn: __expectString(output.SkillGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserResponse - */ -const de_CreateUserResponse = (output: any, context: __SerdeContext): CreateUserResponse => { - return { - UserArn: __expectString(output.UserArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteAddressBookResponse - */ -const de_DeleteAddressBookResponse = (output: any, context: __SerdeContext): DeleteAddressBookResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteBusinessReportScheduleResponse - */ -const de_DeleteBusinessReportScheduleResponse = ( - output: any, - context: __SerdeContext -): DeleteBusinessReportScheduleResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteConferenceProviderResponse - */ -const de_DeleteConferenceProviderResponse = ( - output: any, - context: __SerdeContext -): DeleteConferenceProviderResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteContactResponse - */ -const de_DeleteContactResponse = (output: any, context: __SerdeContext): DeleteContactResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDeviceResponse - */ -const de_DeleteDeviceResponse = (output: any, context: __SerdeContext): DeleteDeviceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDeviceUsageDataResponse - */ -const de_DeleteDeviceUsageDataResponse = (output: any, context: __SerdeContext): DeleteDeviceUsageDataResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteGatewayGroupResponse - */ -const de_DeleteGatewayGroupResponse = (output: any, context: __SerdeContext): DeleteGatewayGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteNetworkProfileResponse - */ -const de_DeleteNetworkProfileResponse = (output: any, context: __SerdeContext): DeleteNetworkProfileResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteProfileResponse - */ -const de_DeleteProfileResponse = (output: any, context: __SerdeContext): DeleteProfileResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRoomResponse - */ -const de_DeleteRoomResponse = (output: any, context: __SerdeContext): DeleteRoomResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRoomSkillParameterResponse - */ -const de_DeleteRoomSkillParameterResponse = ( - output: any, - context: __SerdeContext -): DeleteRoomSkillParameterResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteSkillAuthorizationResponse - */ -const de_DeleteSkillAuthorizationResponse = ( - output: any, - context: __SerdeContext -): DeleteSkillAuthorizationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteSkillGroupResponse - */ -const de_DeleteSkillGroupResponse = (output: any, context: __SerdeContext): DeleteSkillGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteUserResponse - */ -const de_DeleteUserResponse = (output: any, context: __SerdeContext): DeleteUserResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeveloperInfo - */ -const de_DeveloperInfo = (output: any, context: __SerdeContext): DeveloperInfo => { - return { - DeveloperName: __expectString(output.DeveloperName), - Email: __expectString(output.Email), - PrivacyPolicy: __expectString(output.PrivacyPolicy), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1Device - */ -const de_Device = (output: any, context: __SerdeContext): Device => { - return { - DeviceArn: __expectString(output.DeviceArn), - DeviceName: __expectString(output.DeviceName), - DeviceSerialNumber: __expectString(output.DeviceSerialNumber), - DeviceStatus: __expectString(output.DeviceStatus), - DeviceStatusInfo: - output.DeviceStatusInfo != null ? de_DeviceStatusInfo(output.DeviceStatusInfo, context) : undefined, - DeviceType: __expectString(output.DeviceType), - MacAddress: __expectString(output.MacAddress), - NetworkProfileInfo: - output.NetworkProfileInfo != null ? de_DeviceNetworkProfileInfo(output.NetworkProfileInfo, context) : undefined, - RoomArn: __expectString(output.RoomArn), - SoftwareVersion: __expectString(output.SoftwareVersion), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceData - */ -const de_DeviceData = (output: any, context: __SerdeContext): DeviceData => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DeviceArn: __expectString(output.DeviceArn), - DeviceName: __expectString(output.DeviceName), - DeviceSerialNumber: __expectString(output.DeviceSerialNumber), - DeviceStatus: __expectString(output.DeviceStatus), - DeviceStatusInfo: - output.DeviceStatusInfo != null ? de_DeviceStatusInfo(output.DeviceStatusInfo, context) : undefined, - DeviceType: __expectString(output.DeviceType), - MacAddress: __expectString(output.MacAddress), - NetworkProfileArn: __expectString(output.NetworkProfileArn), - NetworkProfileName: __expectString(output.NetworkProfileName), - RoomArn: __expectString(output.RoomArn), - RoomName: __expectString(output.RoomName), - SoftwareVersion: __expectString(output.SoftwareVersion), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceDataList - */ -const de_DeviceDataList = (output: any, context: __SerdeContext): DeviceData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceData(entry, context); - }); - return retVal; -}; +// se_FilterValueList omitted. -/** - * deserializeAws_json1_1DeviceEvent - */ -const de_DeviceEvent = (output: any, context: __SerdeContext): DeviceEvent => { - return { - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceEventList - */ -const de_DeviceEventList = (output: any, context: __SerdeContext): DeviceEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeviceNetworkProfileInfo - */ -const de_DeviceNetworkProfileInfo = (output: any, context: __SerdeContext): DeviceNetworkProfileInfo => { - return { - CertificateArn: __expectString(output.CertificateArn), - CertificateExpirationTime: - output.CertificateExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CertificateExpirationTime))) - : undefined, - NetworkProfileArn: __expectString(output.NetworkProfileArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceNotRegisteredException - */ -const de_DeviceNotRegisteredException = (output: any, context: __SerdeContext): DeviceNotRegisteredException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceStatusDetail - */ -const de_DeviceStatusDetail = (output: any, context: __SerdeContext): DeviceStatusDetail => { - return { - Code: __expectString(output.Code), - Feature: __expectString(output.Feature), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceStatusDetails - */ -const de_DeviceStatusDetails = (output: any, context: __SerdeContext): DeviceStatusDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceStatusDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeviceStatusInfo - */ -const de_DeviceStatusInfo = (output: any, context: __SerdeContext): DeviceStatusInfo => { - return { - ConnectionStatus: __expectString(output.ConnectionStatus), - ConnectionStatusUpdatedTime: - output.ConnectionStatusUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectionStatusUpdatedTime))) - : undefined, - DeviceStatusDetails: - output.DeviceStatusDetails != null ? de_DeviceStatusDetails(output.DeviceStatusDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisassociateContactFromAddressBookResponse - */ -const de_DisassociateContactFromAddressBookResponse = ( - output: any, - context: __SerdeContext -): DisassociateContactFromAddressBookResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateDeviceFromRoomResponse - */ -const de_DisassociateDeviceFromRoomResponse = ( - output: any, - context: __SerdeContext -): DisassociateDeviceFromRoomResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateSkillFromSkillGroupResponse - */ -const de_DisassociateSkillFromSkillGroupResponse = ( - output: any, - context: __SerdeContext -): DisassociateSkillFromSkillGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateSkillFromUsersResponse - */ -const de_DisassociateSkillFromUsersResponse = ( - output: any, - context: __SerdeContext -): DisassociateSkillFromUsersResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateSkillGroupFromRoomResponse - */ -const de_DisassociateSkillGroupFromRoomResponse = ( - output: any, - context: __SerdeContext -): DisassociateSkillGroupFromRoomResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1EndOfMeetingReminder - */ -const de_EndOfMeetingReminder = (output: any, context: __SerdeContext): EndOfMeetingReminder => { - return { - Enabled: __expectBoolean(output.Enabled), - ReminderAtMinutes: - output.ReminderAtMinutes != null - ? de_EndOfMeetingReminderMinutesList(output.ReminderAtMinutes, context) - : undefined, - ReminderType: __expectString(output.ReminderType), - } as any; -}; +// se_ForgetSmartHomeAppliancesRequest omitted. -/** - * deserializeAws_json1_1EndOfMeetingReminderMinutesList - */ -const de_EndOfMeetingReminderMinutesList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// se_GetAddressBookRequest omitted. -/** - * deserializeAws_json1_1ForgetSmartHomeAppliancesResponse - */ -const de_ForgetSmartHomeAppliancesResponse = ( - output: any, - context: __SerdeContext -): ForgetSmartHomeAppliancesResponse => { - return {} as any; -}; +// se_GetConferencePreferenceRequest omitted. -/** - * deserializeAws_json1_1Gateway - */ -const de_Gateway = (output: any, context: __SerdeContext): Gateway => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - GatewayGroupArn: __expectString(output.GatewayGroupArn), - Name: __expectString(output.Name), - SoftwareVersion: __expectString(output.SoftwareVersion), - } as any; -}; +// se_GetConferenceProviderRequest omitted. -/** - * deserializeAws_json1_1GatewayGroup - */ -const de_GatewayGroup = (output: any, context: __SerdeContext): GatewayGroup => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - } as any; -}; +// se_GetContactRequest omitted. -/** - * deserializeAws_json1_1GatewayGroupSummaries - */ -const de_GatewayGroupSummaries = (output: any, context: __SerdeContext): GatewayGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewayGroupSummary(entry, context); - }); - return retVal; -}; +// se_GetDeviceRequest omitted. -/** - * deserializeAws_json1_1GatewayGroupSummary - */ -const de_GatewayGroupSummary = (output: any, context: __SerdeContext): GatewayGroupSummary => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - } as any; -}; +// se_GetGatewayGroupRequest omitted. -/** - * deserializeAws_json1_1GatewaySummaries - */ -const de_GatewaySummaries = (output: any, context: __SerdeContext): GatewaySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewaySummary(entry, context); - }); - return retVal; -}; +// se_GetGatewayRequest omitted. -/** - * deserializeAws_json1_1GatewaySummary - */ -const de_GatewaySummary = (output: any, context: __SerdeContext): GatewaySummary => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - GatewayGroupArn: __expectString(output.GatewayGroupArn), - Name: __expectString(output.Name), - SoftwareVersion: __expectString(output.SoftwareVersion), - } as any; -}; +// se_GetInvitationConfigurationRequest omitted. -/** - * deserializeAws_json1_1GenericKeywords - */ -const de_GenericKeywords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_GetNetworkProfileRequest omitted. -/** - * deserializeAws_json1_1GetAddressBookResponse - */ -const de_GetAddressBookResponse = (output: any, context: __SerdeContext): GetAddressBookResponse => { - return { - AddressBook: output.AddressBook != null ? de_AddressBook(output.AddressBook, context) : undefined, - } as any; -}; +// se_GetProfileRequest omitted. -/** - * deserializeAws_json1_1GetConferencePreferenceResponse - */ -const de_GetConferencePreferenceResponse = (output: any, context: __SerdeContext): GetConferencePreferenceResponse => { - return { - Preference: output.Preference != null ? de_ConferencePreference(output.Preference, context) : undefined, - } as any; -}; +// se_GetRoomRequest omitted. -/** - * deserializeAws_json1_1GetConferenceProviderResponse - */ -const de_GetConferenceProviderResponse = (output: any, context: __SerdeContext): GetConferenceProviderResponse => { - return { - ConferenceProvider: - output.ConferenceProvider != null ? de_ConferenceProvider(output.ConferenceProvider, context) : undefined, - } as any; -}; +// se_GetRoomSkillParameterRequest omitted. -/** - * deserializeAws_json1_1GetContactResponse - */ -const de_GetContactResponse = (output: any, context: __SerdeContext): GetContactResponse => { - return { - Contact: output.Contact != null ? de_Contact(output.Contact, context) : undefined, - } as any; -}; +// se_GetSkillGroupRequest omitted. -/** - * deserializeAws_json1_1GetDeviceResponse - */ -const de_GetDeviceResponse = (output: any, context: __SerdeContext): GetDeviceResponse => { - return { - Device: output.Device != null ? de_Device(output.Device, context) : undefined, - } as any; -}; +// se_IPDialIn omitted. -/** - * deserializeAws_json1_1GetGatewayGroupResponse - */ -const de_GetGatewayGroupResponse = (output: any, context: __SerdeContext): GetGatewayGroupResponse => { - return { - GatewayGroup: output.GatewayGroup != null ? de_GatewayGroup(output.GatewayGroup, context) : undefined, - } as any; -}; +// se_ListBusinessReportSchedulesRequest omitted. -/** - * deserializeAws_json1_1GetGatewayResponse - */ -const de_GetGatewayResponse = (output: any, context: __SerdeContext): GetGatewayResponse => { - return { - Gateway: output.Gateway != null ? de_Gateway(output.Gateway, context) : undefined, - } as any; -}; +// se_ListConferenceProvidersRequest omitted. -/** - * deserializeAws_json1_1GetInvitationConfigurationResponse - */ -const de_GetInvitationConfigurationResponse = ( - output: any, - context: __SerdeContext -): GetInvitationConfigurationResponse => { - return { - ContactEmail: __expectString(output.ContactEmail), - OrganizationName: __expectString(output.OrganizationName), - PrivateSkillIds: output.PrivateSkillIds != null ? de_ShortSkillIdList(output.PrivateSkillIds, context) : undefined, - } as any; -}; +// se_ListDeviceEventsRequest omitted. -/** - * deserializeAws_json1_1GetNetworkProfileResponse - */ -const de_GetNetworkProfileResponse = (output: any, context: __SerdeContext): GetNetworkProfileResponse => { - return { - NetworkProfile: output.NetworkProfile != null ? de_NetworkProfile(output.NetworkProfile, context) : undefined, - } as any; -}; +// se_ListGatewayGroupsRequest omitted. -/** - * deserializeAws_json1_1GetProfileResponse - */ -const de_GetProfileResponse = (output: any, context: __SerdeContext): GetProfileResponse => { - return { - Profile: output.Profile != null ? de_Profile(output.Profile, context) : undefined, - } as any; -}; +// se_ListGatewaysRequest omitted. -/** - * deserializeAws_json1_1GetRoomResponse - */ -const de_GetRoomResponse = (output: any, context: __SerdeContext): GetRoomResponse => { - return { - Room: output.Room != null ? de_Room(output.Room, context) : undefined, - } as any; -}; +// se_ListSkillsRequest omitted. -/** - * deserializeAws_json1_1GetRoomSkillParameterResponse - */ -const de_GetRoomSkillParameterResponse = (output: any, context: __SerdeContext): GetRoomSkillParameterResponse => { - return { - RoomSkillParameter: - output.RoomSkillParameter != null ? de_RoomSkillParameter(output.RoomSkillParameter, context) : undefined, - } as any; -}; +// se_ListSkillsStoreCategoriesRequest omitted. -/** - * deserializeAws_json1_1GetSkillGroupResponse - */ -const de_GetSkillGroupResponse = (output: any, context: __SerdeContext): GetSkillGroupResponse => { - return { - SkillGroup: output.SkillGroup != null ? de_SkillGroup(output.SkillGroup, context) : undefined, - } as any; -}; +// se_ListSkillsStoreSkillsByCategoryRequest omitted. -/** - * deserializeAws_json1_1InstantBooking - */ -const de_InstantBooking = (output: any, context: __SerdeContext): InstantBooking => { - return { - DurationInMinutes: __expectInt32(output.DurationInMinutes), - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// se_ListSmartHomeAppliancesRequest omitted. -/** - * deserializeAws_json1_1InvalidCertificateAuthorityException - */ -const de_InvalidCertificateAuthorityException = ( - output: any, - context: __SerdeContext -): InvalidCertificateAuthorityException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_ListTagsRequest omitted. -/** - * deserializeAws_json1_1InvalidDeviceException - */ -const de_InvalidDeviceException = (output: any, context: __SerdeContext): InvalidDeviceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_MeetingSetting omitted. -/** - * deserializeAws_json1_1InvalidSecretsManagerResourceException - */ -const de_InvalidSecretsManagerResourceException = ( - output: any, - context: __SerdeContext -): InvalidSecretsManagerResourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_PhoneNumber omitted. -/** - * deserializeAws_json1_1InvalidServiceLinkedRoleStateException - */ -const de_InvalidServiceLinkedRoleStateException = ( - output: any, - context: __SerdeContext -): InvalidServiceLinkedRoleStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_PhoneNumberList omitted. -/** - * deserializeAws_json1_1InvalidUserStatusException - */ -const de_InvalidUserStatusException = (output: any, context: __SerdeContext): InvalidUserStatusException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_PSTNDialIn omitted. -/** - * deserializeAws_json1_1IPDialIn - */ -const de_IPDialIn = (output: any, context: __SerdeContext): IPDialIn => { - return { - CommsProtocol: __expectString(output.CommsProtocol), - Endpoint: __expectString(output.Endpoint), - } as any; -}; +// se_PutConferencePreferenceRequest omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_PutInvitationConfigurationRequest omitted. -/** - * deserializeAws_json1_1ListBusinessReportSchedulesResponse - */ -const de_ListBusinessReportSchedulesResponse = ( - output: any, - context: __SerdeContext -): ListBusinessReportSchedulesResponse => { - return { - BusinessReportSchedules: - output.BusinessReportSchedules != null - ? de_BusinessReportScheduleList(output.BusinessReportSchedules, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_PutRoomSkillParameterRequest omitted. -/** - * deserializeAws_json1_1ListConferenceProvidersResponse - */ -const de_ListConferenceProvidersResponse = (output: any, context: __SerdeContext): ListConferenceProvidersResponse => { - return { - ConferenceProviders: - output.ConferenceProviders != null ? de_ConferenceProvidersList(output.ConferenceProviders, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_PutSkillAuthorizationRequest omitted. -/** - * deserializeAws_json1_1ListDeviceEventsResponse - */ -const de_ListDeviceEventsResponse = (output: any, context: __SerdeContext): ListDeviceEventsResponse => { - return { - DeviceEvents: output.DeviceEvents != null ? de_DeviceEventList(output.DeviceEvents, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RegisterAVSDeviceRequest omitted. -/** - * deserializeAws_json1_1ListGatewayGroupsResponse - */ -const de_ListGatewayGroupsResponse = (output: any, context: __SerdeContext): ListGatewayGroupsResponse => { - return { - GatewayGroups: output.GatewayGroups != null ? de_GatewayGroupSummaries(output.GatewayGroups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RejectSkillRequest omitted. -/** - * deserializeAws_json1_1ListGatewaysResponse - */ -const de_ListGatewaysResponse = (output: any, context: __SerdeContext): ListGatewaysResponse => { - return { - Gateways: output.Gateways != null ? de_GatewaySummaries(output.Gateways, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ResolveRoomRequest omitted. -/** - * deserializeAws_json1_1ListSkillsResponse - */ -const de_ListSkillsResponse = (output: any, context: __SerdeContext): ListSkillsResponse => { - return { - NextToken: __expectString(output.NextToken), - SkillSummaries: output.SkillSummaries != null ? de_SkillSummaryList(output.SkillSummaries, context) : undefined, - } as any; -}; +// se_RevokeInvitationRequest omitted. -/** - * deserializeAws_json1_1ListSkillsStoreCategoriesResponse - */ -const de_ListSkillsStoreCategoriesResponse = ( - output: any, - context: __SerdeContext -): ListSkillsStoreCategoriesResponse => { - return { - CategoryList: output.CategoryList != null ? de_CategoryList(output.CategoryList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RoomSkillParameter omitted. -/** - * deserializeAws_json1_1ListSkillsStoreSkillsByCategoryResponse - */ -const de_ListSkillsStoreSkillsByCategoryResponse = ( - output: any, - context: __SerdeContext -): ListSkillsStoreSkillsByCategoryResponse => { - return { - NextToken: __expectString(output.NextToken), - SkillsStoreSkills: - output.SkillsStoreSkills != null ? de_SkillsStoreSkillList(output.SkillsStoreSkills, context) : undefined, - } as any; -}; +// se_SearchAddressBooksRequest omitted. -/** - * deserializeAws_json1_1ListSmartHomeAppliancesResponse - */ -const de_ListSmartHomeAppliancesResponse = (output: any, context: __SerdeContext): ListSmartHomeAppliancesResponse => { - return { - NextToken: __expectString(output.NextToken), - SmartHomeAppliances: - output.SmartHomeAppliances != null ? de_SmartHomeApplianceList(output.SmartHomeAppliances, context) : undefined, - } as any; -}; +// se_SearchContactsRequest omitted. -/** - * deserializeAws_json1_1ListTagsResponse - */ -const de_ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// se_SearchDevicesRequest omitted. -/** - * deserializeAws_json1_1MeetingRoomConfiguration - */ -const de_MeetingRoomConfiguration = (output: any, context: __SerdeContext): MeetingRoomConfiguration => { - return { - EndOfMeetingReminder: - output.EndOfMeetingReminder != null ? de_EndOfMeetingReminder(output.EndOfMeetingReminder, context) : undefined, - InstantBooking: output.InstantBooking != null ? de_InstantBooking(output.InstantBooking, context) : undefined, - RequireCheckIn: output.RequireCheckIn != null ? de_RequireCheckIn(output.RequireCheckIn, context) : undefined, - RoomUtilizationMetricsEnabled: __expectBoolean(output.RoomUtilizationMetricsEnabled), - } as any; -}; +// se_SearchNetworkProfilesRequest omitted. -/** - * deserializeAws_json1_1MeetingSetting - */ -const de_MeetingSetting = (output: any, context: __SerdeContext): MeetingSetting => { - return { - RequirePin: __expectString(output.RequirePin), - } as any; -}; +// se_SearchProfilesRequest omitted. -/** - * deserializeAws_json1_1NameInUseException - */ -const de_NameInUseException = (output: any, context: __SerdeContext): NameInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_SearchRoomsRequest omitted. -/** - * deserializeAws_json1_1NetworkProfile - */ -const de_NetworkProfile = (output: any, context: __SerdeContext): NetworkProfile => { - return { - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - CurrentPassword: __expectString(output.CurrentPassword), - Description: __expectString(output.Description), - EapMethod: __expectString(output.EapMethod), - NetworkProfileArn: __expectString(output.NetworkProfileArn), - NetworkProfileName: __expectString(output.NetworkProfileName), - NextPassword: __expectString(output.NextPassword), - SecurityType: __expectString(output.SecurityType), - Ssid: __expectString(output.Ssid), - TrustAnchors: output.TrustAnchors != null ? de_TrustAnchorList(output.TrustAnchors, context) : undefined, - } as any; -}; +// se_SearchSkillGroupsRequest omitted. -/** - * deserializeAws_json1_1NetworkProfileData - */ -const de_NetworkProfileData = (output: any, context: __SerdeContext): NetworkProfileData => { - return { - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - Description: __expectString(output.Description), - EapMethod: __expectString(output.EapMethod), - NetworkProfileArn: __expectString(output.NetworkProfileArn), - NetworkProfileName: __expectString(output.NetworkProfileName), - SecurityType: __expectString(output.SecurityType), - Ssid: __expectString(output.Ssid), - } as any; -}; +// se_SearchUsersRequest omitted. /** - * deserializeAws_json1_1NetworkProfileDataList + * serializeAws_json1_1SendAnnouncementRequest */ -const de_NetworkProfileDataList = (output: any, context: __SerdeContext): NetworkProfileData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkProfileData(entry, context); - }); - return retVal; +const se_SendAnnouncementRequest = (input: SendAnnouncementRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Content: _json, + RoomFilters: _json, + TimeToLiveInSeconds: [], + }); }; -/** - * deserializeAws_json1_1NewInThisVersionBulletPoints - */ -const de_NewInThisVersionBulletPoints = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SendInvitationRequest omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_ShortSkillIdList omitted. -/** - * deserializeAws_json1_1PhoneNumber - */ -const de_PhoneNumber = (output: any, context: __SerdeContext): PhoneNumber => { - return { - Number: __expectString(output.Number), - Type: __expectString(output.Type), - } as any; -}; +// se_SipAddress omitted. -/** - * deserializeAws_json1_1PhoneNumberList - */ -const de_PhoneNumberList = (output: any, context: __SerdeContext): PhoneNumber[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumber(entry, context); - }); - return retVal; -}; +// se_SipAddressList omitted. -/** - * deserializeAws_json1_1Profile - */ -const de_Profile = (output: any, context: __SerdeContext): Profile => { - return { - Address: __expectString(output.Address), - AddressBookArn: __expectString(output.AddressBookArn), - DataRetentionOptIn: __expectBoolean(output.DataRetentionOptIn), - DistanceUnit: __expectString(output.DistanceUnit), - IsDefault: __expectBoolean(output.IsDefault), - Locale: __expectString(output.Locale), - MaxVolumeLimit: __expectInt32(output.MaxVolumeLimit), - MeetingRoomConfiguration: - output.MeetingRoomConfiguration != null - ? de_MeetingRoomConfiguration(output.MeetingRoomConfiguration, context) - : undefined, - PSTNEnabled: __expectBoolean(output.PSTNEnabled), - ProfileArn: __expectString(output.ProfileArn), - ProfileName: __expectString(output.ProfileName), - SetupModeDisabled: __expectBoolean(output.SetupModeDisabled), - TemperatureUnit: __expectString(output.TemperatureUnit), - Timezone: __expectString(output.Timezone), - WakeWord: __expectString(output.WakeWord), - } as any; -}; - -/** - * deserializeAws_json1_1ProfileData - */ -const de_ProfileData = (output: any, context: __SerdeContext): ProfileData => { - return { - Address: __expectString(output.Address), - DistanceUnit: __expectString(output.DistanceUnit), - IsDefault: __expectBoolean(output.IsDefault), - Locale: __expectString(output.Locale), - ProfileArn: __expectString(output.ProfileArn), - ProfileName: __expectString(output.ProfileName), - TemperatureUnit: __expectString(output.TemperatureUnit), - Timezone: __expectString(output.Timezone), - WakeWord: __expectString(output.WakeWord), - } as any; -}; +// se_Sort omitted. -/** - * deserializeAws_json1_1ProfileDataList - */ -const de_ProfileDataList = (output: any, context: __SerdeContext): ProfileData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProfileData(entry, context); - }); - return retVal; -}; +// se_SortList omitted. -/** - * deserializeAws_json1_1PSTNDialIn - */ -const de_PSTNDialIn = (output: any, context: __SerdeContext): PSTNDialIn => { - return { - CountryCode: __expectString(output.CountryCode), - OneClickIdDelay: __expectString(output.OneClickIdDelay), - OneClickPinDelay: __expectString(output.OneClickPinDelay), - PhoneNumber: __expectString(output.PhoneNumber), - } as any; -}; +// se_Ssml omitted. -/** - * deserializeAws_json1_1PutConferencePreferenceResponse - */ -const de_PutConferencePreferenceResponse = (output: any, context: __SerdeContext): PutConferencePreferenceResponse => { - return {} as any; -}; +// se_SsmlList omitted. -/** - * deserializeAws_json1_1PutInvitationConfigurationResponse - */ -const de_PutInvitationConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutInvitationConfigurationResponse => { - return {} as any; -}; +// se_StartDeviceSyncRequest omitted. -/** - * deserializeAws_json1_1PutRoomSkillParameterResponse - */ -const de_PutRoomSkillParameterResponse = (output: any, context: __SerdeContext): PutRoomSkillParameterResponse => { - return {} as any; -}; +// se_StartSmartHomeApplianceDiscoveryRequest omitted. -/** - * deserializeAws_json1_1PutSkillAuthorizationResponse - */ -const de_PutSkillAuthorizationResponse = (output: any, context: __SerdeContext): PutSkillAuthorizationResponse => { - return {} as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1RegisterAVSDeviceResponse - */ -const de_RegisterAVSDeviceResponse = (output: any, context: __SerdeContext): RegisterAVSDeviceResponse => { - return { - DeviceArn: __expectString(output.DeviceArn), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1RejectSkillResponse - */ -const de_RejectSkillResponse = (output: any, context: __SerdeContext): RejectSkillResponse => { - return {} as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1RequireCheckIn - */ -const de_RequireCheckIn = (output: any, context: __SerdeContext): RequireCheckIn => { - return { - Enabled: __expectBoolean(output.Enabled), - ReleaseAfterMinutes: __expectInt32(output.ReleaseAfterMinutes), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1ResolveRoomResponse - */ -const de_ResolveRoomResponse = (output: any, context: __SerdeContext): ResolveRoomResponse => { - return { - RoomArn: __expectString(output.RoomArn), - RoomName: __expectString(output.RoomName), - RoomSkillParameters: - output.RoomSkillParameters != null ? de_RoomSkillParameters(output.RoomSkillParameters, context) : undefined, - } as any; -}; +// se_Text omitted. -/** - * deserializeAws_json1_1ResourceAssociatedException - */ -const de_ResourceAssociatedException = (output: any, context: __SerdeContext): ResourceAssociatedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TextList omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - ClientRequestToken: __expectString(output.ClientRequestToken), - Message: __expectString(output.Message), - } as any; -}; +// se_TrustAnchorList omitted. -/** - * deserializeAws_json1_1Reviews - */ -const de_Reviews = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1RevokeInvitationResponse - */ -const de_RevokeInvitationResponse = (output: any, context: __SerdeContext): RevokeInvitationResponse => { - return {} as any; -}; +// se_UpdateAddressBookRequest omitted. -/** - * deserializeAws_json1_1Room - */ -const de_Room = (output: any, context: __SerdeContext): Room => { - return { - Description: __expectString(output.Description), - ProfileArn: __expectString(output.ProfileArn), - ProviderCalendarId: __expectString(output.ProviderCalendarId), - RoomArn: __expectString(output.RoomArn), - RoomName: __expectString(output.RoomName), - } as any; -}; +// se_UpdateBusinessReportScheduleRequest omitted. -/** - * deserializeAws_json1_1RoomData - */ -const de_RoomData = (output: any, context: __SerdeContext): RoomData => { - return { - Description: __expectString(output.Description), - ProfileArn: __expectString(output.ProfileArn), - ProfileName: __expectString(output.ProfileName), - ProviderCalendarId: __expectString(output.ProviderCalendarId), - RoomArn: __expectString(output.RoomArn), - RoomName: __expectString(output.RoomName), - } as any; -}; +// se_UpdateConferenceProviderRequest omitted. -/** - * deserializeAws_json1_1RoomDataList - */ -const de_RoomDataList = (output: any, context: __SerdeContext): RoomData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoomData(entry, context); - }); - return retVal; -}; +// se_UpdateContactRequest omitted. -/** - * deserializeAws_json1_1RoomSkillParameter - */ -const de_RoomSkillParameter = (output: any, context: __SerdeContext): RoomSkillParameter => { - return { - ParameterKey: __expectString(output.ParameterKey), - ParameterValue: __expectString(output.ParameterValue), - } as any; -}; +// se_UpdateDeviceRequest omitted. -/** - * deserializeAws_json1_1RoomSkillParameters - */ -const de_RoomSkillParameters = (output: any, context: __SerdeContext): RoomSkillParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoomSkillParameter(entry, context); - }); - return retVal; -}; +// se_UpdateEndOfMeetingReminder omitted. -/** - * deserializeAws_json1_1SampleUtterances - */ -const de_SampleUtterances = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UpdateGatewayGroupRequest omitted. -/** - * deserializeAws_json1_1SearchAddressBooksResponse - */ -const de_SearchAddressBooksResponse = (output: any, context: __SerdeContext): SearchAddressBooksResponse => { - return { - AddressBooks: output.AddressBooks != null ? de_AddressBookDataList(output.AddressBooks, context) : undefined, - NextToken: __expectString(output.NextToken), - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateGatewayRequest omitted. -/** - * deserializeAws_json1_1SearchContactsResponse - */ -const de_SearchContactsResponse = (output: any, context: __SerdeContext): SearchContactsResponse => { - return { - Contacts: output.Contacts != null ? de_ContactDataList(output.Contacts, context) : undefined, - NextToken: __expectString(output.NextToken), - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateInstantBooking omitted. -/** - * deserializeAws_json1_1SearchDevicesResponse - */ -const de_SearchDevicesResponse = (output: any, context: __SerdeContext): SearchDevicesResponse => { - return { - Devices: output.Devices != null ? de_DeviceDataList(output.Devices, context) : undefined, - NextToken: __expectString(output.NextToken), - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateMeetingRoomConfiguration omitted. -/** - * deserializeAws_json1_1SearchNetworkProfilesResponse - */ -const de_SearchNetworkProfilesResponse = (output: any, context: __SerdeContext): SearchNetworkProfilesResponse => { - return { - NetworkProfiles: - output.NetworkProfiles != null ? de_NetworkProfileDataList(output.NetworkProfiles, context) : undefined, - NextToken: __expectString(output.NextToken), - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateNetworkProfileRequest omitted. -/** - * deserializeAws_json1_1SearchProfilesResponse - */ -const de_SearchProfilesResponse = (output: any, context: __SerdeContext): SearchProfilesResponse => { - return { - NextToken: __expectString(output.NextToken), - Profiles: output.Profiles != null ? de_ProfileDataList(output.Profiles, context) : undefined, - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateProfileRequest omitted. -/** - * deserializeAws_json1_1SearchRoomsResponse - */ -const de_SearchRoomsResponse = (output: any, context: __SerdeContext): SearchRoomsResponse => { - return { - NextToken: __expectString(output.NextToken), - Rooms: output.Rooms != null ? de_RoomDataList(output.Rooms, context) : undefined, - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateRequireCheckIn omitted. -/** - * deserializeAws_json1_1SearchSkillGroupsResponse - */ -const de_SearchSkillGroupsResponse = (output: any, context: __SerdeContext): SearchSkillGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - SkillGroups: output.SkillGroups != null ? de_SkillGroupDataList(output.SkillGroups, context) : undefined, - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_UpdateRoomRequest omitted. -/** - * deserializeAws_json1_1SearchUsersResponse - */ -const de_SearchUsersResponse = (output: any, context: __SerdeContext): SearchUsersResponse => { - return { - NextToken: __expectString(output.NextToken), - TotalCount: __expectInt32(output.TotalCount), - Users: output.Users != null ? de_UserDataList(output.Users, context) : undefined, - } as any; -}; +// se_UpdateSkillGroupRequest omitted. -/** - * deserializeAws_json1_1SendAnnouncementResponse - */ -const de_SendAnnouncementResponse = (output: any, context: __SerdeContext): SendAnnouncementResponse => { - return { - AnnouncementArn: __expectString(output.AnnouncementArn), - } as any; -}; +// de_AddressBook omitted. -/** - * deserializeAws_json1_1SendInvitationResponse - */ -const de_SendInvitationResponse = (output: any, context: __SerdeContext): SendInvitationResponse => { - return {} as any; -}; +// de_AddressBookData omitted. -/** - * deserializeAws_json1_1ShortSkillIdList - */ -const de_ShortSkillIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AddressBookDataList omitted. -/** - * deserializeAws_json1_1SipAddress - */ -const de_SipAddress = (output: any, context: __SerdeContext): SipAddress => { - return { - Type: __expectString(output.Type), - Uri: __expectString(output.Uri), - } as any; -}; +// de_AlreadyExistsException omitted. -/** - * deserializeAws_json1_1SipAddressList - */ -const de_SipAddressList = (output: any, context: __SerdeContext): SipAddress[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SipAddress(entry, context); - }); - return retVal; -}; +// de_ApproveSkillResponse omitted. -/** - * deserializeAws_json1_1SkillDetails - */ -const de_SkillDetails = (output: any, context: __SerdeContext): SkillDetails => { - return { - BulletPoints: output.BulletPoints != null ? de_BulletPoints(output.BulletPoints, context) : undefined, - DeveloperInfo: output.DeveloperInfo != null ? de_DeveloperInfo(output.DeveloperInfo, context) : undefined, - EndUserLicenseAgreement: __expectString(output.EndUserLicenseAgreement), - GenericKeywords: output.GenericKeywords != null ? de_GenericKeywords(output.GenericKeywords, context) : undefined, - InvocationPhrase: __expectString(output.InvocationPhrase), - NewInThisVersionBulletPoints: - output.NewInThisVersionBulletPoints != null - ? de_NewInThisVersionBulletPoints(output.NewInThisVersionBulletPoints, context) - : undefined, - ProductDescription: __expectString(output.ProductDescription), - ReleaseDate: __expectString(output.ReleaseDate), - Reviews: output.Reviews != null ? de_Reviews(output.Reviews, context) : undefined, - SkillTypes: output.SkillTypes != null ? de_SkillTypes(output.SkillTypes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SkillGroup - */ -const de_SkillGroup = (output: any, context: __SerdeContext): SkillGroup => { - return { - Description: __expectString(output.Description), - SkillGroupArn: __expectString(output.SkillGroupArn), - SkillGroupName: __expectString(output.SkillGroupName), - } as any; -}; +// de_AssociateContactWithAddressBookResponse omitted. -/** - * deserializeAws_json1_1SkillGroupData - */ -const de_SkillGroupData = (output: any, context: __SerdeContext): SkillGroupData => { - return { - Description: __expectString(output.Description), - SkillGroupArn: __expectString(output.SkillGroupArn), - SkillGroupName: __expectString(output.SkillGroupName), - } as any; -}; +// de_AssociateDeviceWithNetworkProfileResponse omitted. -/** - * deserializeAws_json1_1SkillGroupDataList - */ -const de_SkillGroupDataList = (output: any, context: __SerdeContext): SkillGroupData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SkillGroupData(entry, context); - }); - return retVal; -}; +// de_AssociateDeviceWithRoomResponse omitted. + +// de_AssociateSkillGroupWithRoomResponse omitted. -/** - * deserializeAws_json1_1SkillNotLinkedException - */ -const de_SkillNotLinkedException = (output: any, context: __SerdeContext): SkillNotLinkedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AssociateSkillWithSkillGroupResponse omitted. -/** - * deserializeAws_json1_1SkillsStoreSkill - */ -const de_SkillsStoreSkill = (output: any, context: __SerdeContext): SkillsStoreSkill => { - return { - IconUrl: __expectString(output.IconUrl), - SampleUtterances: - output.SampleUtterances != null ? de_SampleUtterances(output.SampleUtterances, context) : undefined, - ShortDescription: __expectString(output.ShortDescription), - SkillDetails: output.SkillDetails != null ? de_SkillDetails(output.SkillDetails, context) : undefined, - SkillId: __expectString(output.SkillId), - SkillName: __expectString(output.SkillName), - SupportsLinking: __expectBoolean(output.SupportsLinking), - } as any; -}; +// de_AssociateSkillWithUsersResponse omitted. -/** - * deserializeAws_json1_1SkillsStoreSkillList - */ -const de_SkillsStoreSkillList = (output: any, context: __SerdeContext): SkillsStoreSkill[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SkillsStoreSkill(entry, context); - }); - return retVal; -}; +// de_BulletPoints omitted. /** - * deserializeAws_json1_1SkillSummary + * deserializeAws_json1_1BusinessReport */ -const de_SkillSummary = (output: any, context: __SerdeContext): SkillSummary => { - return { - EnablementType: __expectString(output.EnablementType), - SkillId: __expectString(output.SkillId), - SkillName: __expectString(output.SkillName), - SkillType: __expectString(output.SkillType), - SupportsLinking: __expectBoolean(output.SupportsLinking), - } as any; +const de_BusinessReport = (output: any, context: __SerdeContext): BusinessReport => { + return take(output, { + DeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DownloadUrl: __expectString, + FailureCode: __expectString, + S3Location: _json, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1SkillSummaryList - */ -const de_SkillSummaryList = (output: any, context: __SerdeContext): SkillSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SkillSummary(entry, context); - }); - return retVal; -}; +// de_BusinessReportContentRange omitted. -/** - * deserializeAws_json1_1SkillTypes - */ -const de_SkillTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_BusinessReportRecurrence omitted. + +// de_BusinessReportS3Location omitted. /** - * deserializeAws_json1_1SmartHomeAppliance + * deserializeAws_json1_1BusinessReportSchedule */ -const de_SmartHomeAppliance = (output: any, context: __SerdeContext): SmartHomeAppliance => { - return { - Description: __expectString(output.Description), - FriendlyName: __expectString(output.FriendlyName), - ManufacturerName: __expectString(output.ManufacturerName), - } as any; +const de_BusinessReportSchedule = (output: any, context: __SerdeContext): BusinessReportSchedule => { + return take(output, { + ContentRange: _json, + Format: __expectString, + LastBusinessReport: (_: any) => de_BusinessReport(_, context), + Recurrence: _json, + S3BucketName: __expectString, + S3KeyPrefix: __expectString, + ScheduleArn: __expectString, + ScheduleName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SmartHomeApplianceList + * deserializeAws_json1_1BusinessReportScheduleList */ -const de_SmartHomeApplianceList = (output: any, context: __SerdeContext): SmartHomeAppliance[] => { +const de_BusinessReportScheduleList = (output: any, context: __SerdeContext): BusinessReportSchedule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SmartHomeAppliance(entry, context); + return de_BusinessReportSchedule(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartDeviceSyncResponse - */ -const de_StartDeviceSyncResponse = (output: any, context: __SerdeContext): StartDeviceSyncResponse => { - return {} as any; -}; +// de_Category omitted. + +// de_CategoryList omitted. + +// de_ConcurrentModificationException omitted. + +// de_ConferencePreference omitted. + +// de_ConferenceProvider omitted. + +// de_ConferenceProvidersList omitted. + +// de_Contact omitted. + +// de_ContactData omitted. + +// de_ContactDataList omitted. + +// de_CreateAddressBookResponse omitted. + +// de_CreateBusinessReportScheduleResponse omitted. + +// de_CreateConferenceProviderResponse omitted. + +// de_CreateContactResponse omitted. + +// de_CreateGatewayGroupResponse omitted. + +// de_CreateNetworkProfileResponse omitted. + +// de_CreateProfileResponse omitted. + +// de_CreateRoomResponse omitted. + +// de_CreateSkillGroupResponse omitted. + +// de_CreateUserResponse omitted. + +// de_DeleteAddressBookResponse omitted. + +// de_DeleteBusinessReportScheduleResponse omitted. + +// de_DeleteConferenceProviderResponse omitted. + +// de_DeleteContactResponse omitted. + +// de_DeleteDeviceResponse omitted. + +// de_DeleteDeviceUsageDataResponse omitted. + +// de_DeleteGatewayGroupResponse omitted. + +// de_DeleteNetworkProfileResponse omitted. + +// de_DeleteProfileResponse omitted. + +// de_DeleteRoomResponse omitted. + +// de_DeleteRoomSkillParameterResponse omitted. + +// de_DeleteSkillAuthorizationResponse omitted. + +// de_DeleteSkillGroupResponse omitted. + +// de_DeleteUserResponse omitted. + +// de_DeveloperInfo omitted. /** - * deserializeAws_json1_1StartSmartHomeApplianceDiscoveryResponse + * deserializeAws_json1_1Device */ -const de_StartSmartHomeApplianceDiscoveryResponse = ( - output: any, - context: __SerdeContext -): StartSmartHomeApplianceDiscoveryResponse => { - return {} as any; +const de_Device = (output: any, context: __SerdeContext): Device => { + return take(output, { + DeviceArn: __expectString, + DeviceName: __expectString, + DeviceSerialNumber: __expectString, + DeviceStatus: __expectString, + DeviceStatusInfo: (_: any) => de_DeviceStatusInfo(_, context), + DeviceType: __expectString, + MacAddress: __expectString, + NetworkProfileInfo: (_: any) => de_DeviceNetworkProfileInfo(_, context), + RoomArn: __expectString, + SoftwareVersion: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1DeviceData */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_DeviceData = (output: any, context: __SerdeContext): DeviceData => { + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceArn: __expectString, + DeviceName: __expectString, + DeviceSerialNumber: __expectString, + DeviceStatus: __expectString, + DeviceStatusInfo: (_: any) => de_DeviceStatusInfo(_, context), + DeviceType: __expectString, + MacAddress: __expectString, + NetworkProfileArn: __expectString, + NetworkProfileName: __expectString, + RoomArn: __expectString, + RoomName: __expectString, + SoftwareVersion: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1DeviceDataList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_DeviceDataList = (output: any, context: __SerdeContext): DeviceData[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_DeviceData(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1TagResourceResponse + * deserializeAws_json1_1DeviceEvent */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; +const de_DeviceEvent = (output: any, context: __SerdeContext): DeviceEvent => { + return take(output, { + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + Value: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TrustAnchorList + * deserializeAws_json1_1DeviceEventList */ -const de_TrustAnchorList = (output: any, context: __SerdeContext): string[] => { +const de_DeviceEventList = (output: any, context: __SerdeContext): DeviceEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DeviceEvent(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1UnauthorizedException + * deserializeAws_json1_1DeviceNetworkProfileInfo */ -const de_UnauthorizedException = (output: any, context: __SerdeContext): UnauthorizedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DeviceNetworkProfileInfo = (output: any, context: __SerdeContext): DeviceNetworkProfileInfo => { + return take(output, { + CertificateArn: __expectString, + CertificateExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NetworkProfileArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_DeviceNotRegisteredException omitted. + +// de_DeviceStatusDetail omitted. + +// de_DeviceStatusDetails omitted. /** - * deserializeAws_json1_1UpdateAddressBookResponse + * deserializeAws_json1_1DeviceStatusInfo */ -const de_UpdateAddressBookResponse = (output: any, context: __SerdeContext): UpdateAddressBookResponse => { - return {} as any; +const de_DeviceStatusInfo = (output: any, context: __SerdeContext): DeviceStatusInfo => { + return take(output, { + ConnectionStatus: __expectString, + ConnectionStatusUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceStatusDetails: _json, + }) as any; }; +// de_DisassociateContactFromAddressBookResponse omitted. + +// de_DisassociateDeviceFromRoomResponse omitted. + +// de_DisassociateSkillFromSkillGroupResponse omitted. + +// de_DisassociateSkillFromUsersResponse omitted. + +// de_DisassociateSkillGroupFromRoomResponse omitted. + +// de_EndOfMeetingReminder omitted. + +// de_EndOfMeetingReminderMinutesList omitted. + +// de_ForgetSmartHomeAppliancesResponse omitted. + +// de_Gateway omitted. + +// de_GatewayGroup omitted. + +// de_GatewayGroupSummaries omitted. + +// de_GatewayGroupSummary omitted. + +// de_GatewaySummaries omitted. + +// de_GatewaySummary omitted. + +// de_GenericKeywords omitted. + +// de_GetAddressBookResponse omitted. + +// de_GetConferencePreferenceResponse omitted. + +// de_GetConferenceProviderResponse omitted. + +// de_GetContactResponse omitted. + /** - * deserializeAws_json1_1UpdateBusinessReportScheduleResponse + * deserializeAws_json1_1GetDeviceResponse */ -const de_UpdateBusinessReportScheduleResponse = ( - output: any, - context: __SerdeContext -): UpdateBusinessReportScheduleResponse => { - return {} as any; +const de_GetDeviceResponse = (output: any, context: __SerdeContext): GetDeviceResponse => { + return take(output, { + Device: (_: any) => de_Device(_, context), + }) as any; }; +// de_GetGatewayGroupResponse omitted. + +// de_GetGatewayResponse omitted. + +// de_GetInvitationConfigurationResponse omitted. + +// de_GetNetworkProfileResponse omitted. + +// de_GetProfileResponse omitted. + +// de_GetRoomResponse omitted. + +// de_GetRoomSkillParameterResponse omitted. + +// de_GetSkillGroupResponse omitted. + +// de_InstantBooking omitted. + +// de_InvalidCertificateAuthorityException omitted. + +// de_InvalidDeviceException omitted. + +// de_InvalidSecretsManagerResourceException omitted. + +// de_InvalidServiceLinkedRoleStateException omitted. + +// de_InvalidUserStatusException omitted. + +// de_IPDialIn omitted. + +// de_LimitExceededException omitted. + /** - * deserializeAws_json1_1UpdateConferenceProviderResponse + * deserializeAws_json1_1ListBusinessReportSchedulesResponse */ -const de_UpdateConferenceProviderResponse = ( +const de_ListBusinessReportSchedulesResponse = ( output: any, context: __SerdeContext -): UpdateConferenceProviderResponse => { - return {} as any; +): ListBusinessReportSchedulesResponse => { + return take(output, { + BusinessReportSchedules: (_: any) => de_BusinessReportScheduleList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateContactResponse - */ -const de_UpdateContactResponse = (output: any, context: __SerdeContext): UpdateContactResponse => { - return {} as any; -}; +// de_ListConferenceProvidersResponse omitted. /** - * deserializeAws_json1_1UpdateDeviceResponse + * deserializeAws_json1_1ListDeviceEventsResponse */ -const de_UpdateDeviceResponse = (output: any, context: __SerdeContext): UpdateDeviceResponse => { - return {} as any; +const de_ListDeviceEventsResponse = (output: any, context: __SerdeContext): ListDeviceEventsResponse => { + return take(output, { + DeviceEvents: (_: any) => de_DeviceEventList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateGatewayGroupResponse - */ -const de_UpdateGatewayGroupResponse = (output: any, context: __SerdeContext): UpdateGatewayGroupResponse => { - return {} as any; -}; +// de_ListGatewayGroupsResponse omitted. -/** - * deserializeAws_json1_1UpdateGatewayResponse - */ -const de_UpdateGatewayResponse = (output: any, context: __SerdeContext): UpdateGatewayResponse => { - return {} as any; -}; +// de_ListGatewaysResponse omitted. -/** - * deserializeAws_json1_1UpdateNetworkProfileResponse - */ -const de_UpdateNetworkProfileResponse = (output: any, context: __SerdeContext): UpdateNetworkProfileResponse => { - return {} as any; -}; +// de_ListSkillsResponse omitted. -/** - * deserializeAws_json1_1UpdateProfileResponse - */ -const de_UpdateProfileResponse = (output: any, context: __SerdeContext): UpdateProfileResponse => { - return {} as any; -}; +// de_ListSkillsStoreCategoriesResponse omitted. -/** - * deserializeAws_json1_1UpdateRoomResponse - */ -const de_UpdateRoomResponse = (output: any, context: __SerdeContext): UpdateRoomResponse => { - return {} as any; -}; +// de_ListSkillsStoreSkillsByCategoryResponse omitted. -/** - * deserializeAws_json1_1UpdateSkillGroupResponse - */ -const de_UpdateSkillGroupResponse = (output: any, context: __SerdeContext): UpdateSkillGroupResponse => { - return {} as any; -}; +// de_ListSmartHomeAppliancesResponse omitted. -/** - * deserializeAws_json1_1UserData - */ -const de_UserData = (output: any, context: __SerdeContext): UserData => { - return { - Email: __expectString(output.Email), - EnrollmentId: __expectString(output.EnrollmentId), - EnrollmentStatus: __expectString(output.EnrollmentStatus), - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - UserArn: __expectString(output.UserArn), - } as any; -}; +// de_ListTagsResponse omitted. + +// de_MeetingRoomConfiguration omitted. + +// de_MeetingSetting omitted. + +// de_NameInUseException omitted. + +// de_NetworkProfile omitted. + +// de_NetworkProfileData omitted. + +// de_NetworkProfileDataList omitted. + +// de_NewInThisVersionBulletPoints omitted. + +// de_NotFoundException omitted. + +// de_PhoneNumber omitted. + +// de_PhoneNumberList omitted. + +// de_Profile omitted. + +// de_ProfileData omitted. + +// de_ProfileDataList omitted. + +// de_PSTNDialIn omitted. + +// de_PutConferencePreferenceResponse omitted. + +// de_PutInvitationConfigurationResponse omitted. + +// de_PutRoomSkillParameterResponse omitted. + +// de_PutSkillAuthorizationResponse omitted. + +// de_RegisterAVSDeviceResponse omitted. + +// de_RejectSkillResponse omitted. + +// de_RequireCheckIn omitted. + +// de_ResolveRoomResponse omitted. + +// de_ResourceAssociatedException omitted. + +// de_ResourceInUseException omitted. + +// de_Reviews omitted. + +// de_RevokeInvitationResponse omitted. + +// de_Room omitted. + +// de_RoomData omitted. + +// de_RoomDataList omitted. + +// de_RoomSkillParameter omitted. + +// de_RoomSkillParameters omitted. + +// de_SampleUtterances omitted. + +// de_SearchAddressBooksResponse omitted. + +// de_SearchContactsResponse omitted. /** - * deserializeAws_json1_1UserDataList + * deserializeAws_json1_1SearchDevicesResponse */ -const de_UserDataList = (output: any, context: __SerdeContext): UserData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserData(entry, context); - }); - return retVal; +const de_SearchDevicesResponse = (output: any, context: __SerdeContext): SearchDevicesResponse => { + return take(output, { + Devices: (_: any) => de_DeviceDataList(_, context), + NextToken: __expectString, + TotalCount: __expectInt32, + }) as any; }; +// de_SearchNetworkProfilesResponse omitted. + +// de_SearchProfilesResponse omitted. + +// de_SearchRoomsResponse omitted. + +// de_SearchSkillGroupsResponse omitted. + +// de_SearchUsersResponse omitted. + +// de_SendAnnouncementResponse omitted. + +// de_SendInvitationResponse omitted. + +// de_ShortSkillIdList omitted. + +// de_SipAddress omitted. + +// de_SipAddressList omitted. + +// de_SkillDetails omitted. + +// de_SkillGroup omitted. + +// de_SkillGroupData omitted. + +// de_SkillGroupDataList omitted. + +// de_SkillNotLinkedException omitted. + +// de_SkillsStoreSkill omitted. + +// de_SkillsStoreSkillList omitted. + +// de_SkillSummary omitted. + +// de_SkillSummaryList omitted. + +// de_SkillTypes omitted. + +// de_SmartHomeAppliance omitted. + +// de_SmartHomeApplianceList omitted. + +// de_StartDeviceSyncResponse omitted. + +// de_StartSmartHomeApplianceDiscoveryResponse omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_TrustAnchorList omitted. + +// de_UnauthorizedException omitted. + +// de_UntagResourceResponse omitted. + +// de_UpdateAddressBookResponse omitted. + +// de_UpdateBusinessReportScheduleResponse omitted. + +// de_UpdateConferenceProviderResponse omitted. + +// de_UpdateContactResponse omitted. + +// de_UpdateDeviceResponse omitted. + +// de_UpdateGatewayGroupResponse omitted. + +// de_UpdateGatewayResponse omitted. + +// de_UpdateNetworkProfileResponse omitted. + +// de_UpdateProfileResponse omitted. + +// de_UpdateRoomResponse omitted. + +// de_UpdateSkillGroupResponse omitted. + +// de_UserData omitted. + +// de_UserDataList omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -10026,6 +7159,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-amp/src/protocols/Aws_restJson1.ts b/clients/client-amp/src/protocols/Aws_restJson1.ts index fe1a222facc0..a253a1c15ce1 100644 --- a/clients/client-amp/src/protocols/Aws_restJson1.ts +++ b/clients/client-amp/src/protocols/Aws_restJson1.ts @@ -1,17 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -90,21 +92,16 @@ import { AmpServiceException as __BaseException } from "../models/AmpServiceExce import { AccessDeniedException, AlertManagerDefinitionDescription, - AlertManagerDefinitionStatus, ConflictException, InternalServerException, LoggingConfigurationMetadata, - LoggingConfigurationStatus, ResourceNotFoundException, RuleGroupsNamespaceDescription, - RuleGroupsNamespaceStatus, RuleGroupsNamespaceSummary, ServiceQuotaExceededException, ThrottlingException, ValidationException, - ValidationExceptionField, WorkspaceDescription, - WorkspaceStatus, WorkspaceSummary, } from "../models/models_0"; @@ -124,10 +121,12 @@ export const se_CreateAlertManagerDefinitionCommand = async ( "/workspaces/{workspaceId}/alertmanager/definition"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.data != null && { data: context.base64Encoder(input.data) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + data: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -154,10 +153,12 @@ export const se_CreateLoggingConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + logGroupArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -185,12 +186,14 @@ export const se_CreateRuleGroupsNamespaceCommand = async ( "/workspaces/{workspaceId}/rulegroupsnamespaces"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.data != null && { data: context.base64Encoder(input.data) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + data: (_) => context.base64Encoder(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -215,11 +218,13 @@ export const se_CreateWorkspaceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces"; let body: any; - body = JSON.stringify({ - ...(input.alias != null && { alias: input.alias }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + alias: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -543,10 +548,12 @@ export const se_PutAlertManagerDefinitionCommand = async ( "/workspaces/{workspaceId}/alertmanager/definition"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.data != null && { data: context.base64Encoder(input.data) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + data: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -575,10 +582,12 @@ export const se_PutRuleGroupsNamespaceCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.data != null && { data: context.base64Encoder(input.data) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + data: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -604,9 +613,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -663,10 +674,12 @@ export const se_UpdateLoggingConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/logging"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + logGroupArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -693,10 +706,12 @@ export const se_UpdateWorkspaceAliasCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/alias"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.alias != null && { alias: input.alias }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + alias: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -722,9 +737,10 @@ export const de_CreateAlertManagerDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = de_AlertManagerDefinitionStatus(data.status, context); - } + const doc = take(data, { + status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -764,10 +780,9 @@ const de_CreateAlertManagerDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -787,9 +802,10 @@ export const de_CreateLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = de_LoggingConfigurationStatus(data.status, context); - } + const doc = take(data, { + status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -820,10 +836,9 @@ const de_CreateLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -843,18 +858,13 @@ export const de_CreateRuleGroupsNamespaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = de_RuleGroupsNamespaceStatus(data.status, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + name: __expectString, + status: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -894,10 +904,9 @@ const de_CreateRuleGroupsNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -917,18 +926,13 @@ export const de_CreateWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.status != null) { - contents.status = de_WorkspaceStatus(data.status, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + status: _json, + tags: _json, + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -965,10 +969,9 @@ const de_CreateWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1024,10 +1027,9 @@ const de_DeleteAlertManagerDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1080,10 +1082,9 @@ const de_DeleteLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1139,10 +1140,9 @@ const de_DeleteRuleGroupsNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1198,10 +1198,9 @@ const de_DeleteWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1221,9 +1220,10 @@ export const de_DescribeAlertManagerDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alertManagerDefinition != null) { - contents.alertManagerDefinition = de_AlertManagerDefinitionDescription(data.alertManagerDefinition, context); - } + const doc = take(data, { + alertManagerDefinition: (_) => de_AlertManagerDefinitionDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1257,10 +1257,9 @@ const de_DescribeAlertManagerDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1280,9 +1279,10 @@ export const de_DescribeLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.loggingConfiguration != null) { - contents.loggingConfiguration = de_LoggingConfigurationMetadata(data.loggingConfiguration, context); - } + const doc = take(data, { + loggingConfiguration: (_) => de_LoggingConfigurationMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1313,10 +1313,9 @@ const de_DescribeLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1336,9 +1335,10 @@ export const de_DescribeRuleGroupsNamespaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ruleGroupsNamespace != null) { - contents.ruleGroupsNamespace = de_RuleGroupsNamespaceDescription(data.ruleGroupsNamespace, context); - } + const doc = take(data, { + ruleGroupsNamespace: (_) => de_RuleGroupsNamespaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1372,10 +1372,9 @@ const de_DescribeRuleGroupsNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1395,9 +1394,10 @@ export const de_DescribeWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1431,10 +1431,9 @@ const de_DescribeWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1454,12 +1453,11 @@ export const de_ListRuleGroupsNamespacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.ruleGroupsNamespaces != null) { - contents.ruleGroupsNamespaces = de_RuleGroupsNamespaceSummaryList(data.ruleGroupsNamespaces, context); - } + const doc = take(data, { + nextToken: __expectString, + ruleGroupsNamespaces: (_) => de_RuleGroupsNamespaceSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1493,10 +1491,9 @@ const de_ListRuleGroupsNamespacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1516,9 +1513,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1552,10 +1550,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1575,12 +1572,11 @@ export const de_ListWorkspacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workspaces != null) { - contents.workspaces = de_WorkspaceSummaryList(data.workspaces, context); - } + const doc = take(data, { + nextToken: __expectString, + workspaces: (_) => de_WorkspaceSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1611,10 +1607,9 @@ const de_ListWorkspacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1634,9 +1629,10 @@ export const de_PutAlertManagerDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = de_AlertManagerDefinitionStatus(data.status, context); - } + const doc = take(data, { + status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1676,10 +1672,9 @@ const de_PutAlertManagerDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1699,18 +1694,13 @@ export const de_PutRuleGroupsNamespaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = de_RuleGroupsNamespaceStatus(data.status, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + name: __expectString, + status: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1750,10 +1740,9 @@ const de_PutRuleGroupsNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1806,10 +1795,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,10 +1850,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1885,9 +1872,10 @@ export const de_UpdateLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = de_LoggingConfigurationStatus(data.status, context); - } + const doc = take(data, { + status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1921,10 +1909,9 @@ const de_UpdateLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1983,16 +1970,15 @@ const de_UpdateWorkspaceAliasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2002,9 +1988,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2018,15 +2005,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2048,9 +2032,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2067,15 +2052,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2092,21 +2074,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2125,15 +2100,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2147,15 +2119,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2163,18 +2132,7 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * deserializeAws_restJson1AlertManagerDefinitionDescription @@ -2183,92 +2141,60 @@ const de_AlertManagerDefinitionDescription = ( output: any, context: __SerdeContext ): AlertManagerDefinitionDescription => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - data: output.data != null ? context.base64Decoder(output.data) : undefined, - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - status: output.status != null ? de_AlertManagerDefinitionStatus(output.status, context) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + data: context.base64Decoder, + modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + }) as any; }; -/** - * deserializeAws_restJson1AlertManagerDefinitionStatus - */ -const de_AlertManagerDefinitionStatus = (output: any, context: __SerdeContext): AlertManagerDefinitionStatus => { - return { - statusCode: __expectString(output.statusCode), - statusReason: __expectString(output.statusReason), - } as any; -}; +// de_AlertManagerDefinitionStatus omitted. /** * deserializeAws_restJson1LoggingConfigurationMetadata */ const de_LoggingConfigurationMetadata = (output: any, context: __SerdeContext): LoggingConfigurationMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - logGroupArn: __expectString(output.logGroupArn), - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - status: output.status != null ? de_LoggingConfigurationStatus(output.status, context) : undefined, - workspace: __expectString(output.workspace), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + logGroupArn: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + workspace: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1LoggingConfigurationStatus - */ -const de_LoggingConfigurationStatus = (output: any, context: __SerdeContext): LoggingConfigurationStatus => { - return { - statusCode: __expectString(output.statusCode), - statusReason: __expectString(output.statusReason), - } as any; -}; +// de_LoggingConfigurationStatus omitted. /** * deserializeAws_restJson1RuleGroupsNamespaceDescription */ const de_RuleGroupsNamespaceDescription = (output: any, context: __SerdeContext): RuleGroupsNamespaceDescription => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - data: output.data != null ? context.base64Decoder(output.data) : undefined, - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - name: __expectString(output.name), - status: output.status != null ? de_RuleGroupsNamespaceStatus(output.status, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + data: context.base64Decoder, + modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1RuleGroupsNamespaceStatus - */ -const de_RuleGroupsNamespaceStatus = (output: any, context: __SerdeContext): RuleGroupsNamespaceStatus => { - return { - statusCode: __expectString(output.statusCode), - statusReason: __expectString(output.statusReason), - } as any; -}; +// de_RuleGroupsNamespaceStatus omitted. /** * deserializeAws_restJson1RuleGroupsNamespaceSummary */ const de_RuleGroupsNamespaceSummary = (output: any, context: __SerdeContext): RuleGroupsNamespaceSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - name: __expectString(output.name), - status: output.status != null ? de_RuleGroupsNamespaceStatus(output.status, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: _json, + tags: _json, + }) as any; }; /** @@ -2278,90 +2204,46 @@ const de_RuleGroupsNamespaceSummaryList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RuleGroupsNamespaceSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. /** * deserializeAws_restJson1WorkspaceDescription */ const de_WorkspaceDescription = (output: any, context: __SerdeContext): WorkspaceDescription => { - return { - alias: __expectString(output.alias), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - prometheusEndpoint: __expectString(output.prometheusEndpoint), - status: output.status != null ? de_WorkspaceStatus(output.status, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - workspaceId: __expectString(output.workspaceId), - } as any; + return take(output, { + alias: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + prometheusEndpoint: __expectString, + status: _json, + tags: _json, + workspaceId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1WorkspaceStatus - */ -const de_WorkspaceStatus = (output: any, context: __SerdeContext): WorkspaceStatus => { - return { - statusCode: __expectString(output.statusCode), - } as any; -}; +// de_WorkspaceStatus omitted. /** * deserializeAws_restJson1WorkspaceSummary */ const de_WorkspaceSummary = (output: any, context: __SerdeContext): WorkspaceSummary => { - return { - alias: __expectString(output.alias), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - status: output.status != null ? de_WorkspaceStatus(output.status, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - workspaceId: __expectString(output.workspaceId), - } as any; + return take(output, { + alias: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + tags: _json, + workspaceId: __expectString, + }) as any; }; /** @@ -2371,9 +2253,6 @@ const de_WorkspaceSummaryList = (output: any, context: __SerdeContext): Workspac const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkspaceSummary(entry, context); }); return retVal; diff --git a/clients/client-amplify/src/protocols/Aws_restJson1.ts b/clients/client-amplify/src/protocols/Aws_restJson1.ts index f020e7bb8a00..ff2d054b6311 100644 --- a/clients/client-amplify/src/protocols/Aws_restJson1.ts +++ b/clients/client-amplify/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -89,14 +91,12 @@ import { UpdateWebhookCommandInput, UpdateWebhookCommandOutput } from "../comman import { AmplifyServiceException as __BaseException } from "../models/AmplifyServiceException"; import { App, - Artifact, AutoBranchCreationConfig, BackendEnvironment, BadRequestException, Branch, CustomRule, DependentServiceFailureException, - DomainAssociation, InternalFailureException, Job, JobSummary, @@ -105,7 +105,6 @@ import { ProductionBranch, ResourceNotFoundException, Step, - SubDomain, SubDomainSetting, UnauthorizedException, Webhook, @@ -124,33 +123,29 @@ export const se_CreateAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps"; let body: any; - body = JSON.stringify({ - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.autoBranchCreationConfig != null && { - autoBranchCreationConfig: se_AutoBranchCreationConfig(input.autoBranchCreationConfig, context), - }), - ...(input.autoBranchCreationPatterns != null && { - autoBranchCreationPatterns: se_AutoBranchCreationPatterns(input.autoBranchCreationPatterns, context), - }), - ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }), - ...(input.buildSpec != null && { buildSpec: input.buildSpec }), - ...(input.customHeaders != null && { customHeaders: input.customHeaders }), - ...(input.customRules != null && { customRules: se_CustomRules(input.customRules, context) }), - ...(input.description != null && { description: input.description }), - ...(input.enableAutoBranchCreation != null && { enableAutoBranchCreation: input.enableAutoBranchCreation }), - ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }), - ...(input.enableBranchAutoBuild != null && { enableBranchAutoBuild: input.enableBranchAutoBuild }), - ...(input.enableBranchAutoDeletion != null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariables(input.environmentVariables, context), - }), - ...(input.iamServiceRoleArn != null && { iamServiceRoleArn: input.iamServiceRoleArn }), - ...(input.name != null && { name: input.name }), - ...(input.oauthToken != null && { oauthToken: input.oauthToken }), - ...(input.platform != null && { platform: input.platform }), - ...(input.repository != null && { repository: input.repository }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + accessToken: [], + autoBranchCreationConfig: (_) => _json(_), + autoBranchCreationPatterns: (_) => _json(_), + basicAuthCredentials: [], + buildSpec: [], + customHeaders: [], + customRules: (_) => _json(_), + description: [], + enableAutoBranchCreation: [], + enableBasicAuth: [], + enableBranchAutoBuild: [], + enableBranchAutoDeletion: [], + environmentVariables: (_) => _json(_), + iamServiceRoleArn: [], + name: [], + oauthToken: [], + platform: [], + repository: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -177,11 +172,13 @@ export const se_CreateBackendEnvironmentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/backendenvironments"; resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); let body: any; - body = JSON.stringify({ - ...(input.deploymentArtifacts != null && { deploymentArtifacts: input.deploymentArtifacts }), - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.stackName != null && { stackName: input.stackName }), - }); + body = JSON.stringify( + take(input, { + deploymentArtifacts: [], + environmentName: [], + stackName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -207,27 +204,27 @@ export const se_CreateBranchCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/branches"; resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); let body: any; - body = JSON.stringify({ - ...(input.backendEnvironmentArn != null && { backendEnvironmentArn: input.backendEnvironmentArn }), - ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }), - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.buildSpec != null && { buildSpec: input.buildSpec }), - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }), - ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }), - ...(input.enableNotification != null && { enableNotification: input.enableNotification }), - ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }), - ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariables(input.environmentVariables, context), - }), - ...(input.framework != null && { framework: input.framework }), - ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }), - ...(input.stage != null && { stage: input.stage }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.ttl != null && { ttl: input.ttl }), - }); + body = JSON.stringify( + take(input, { + backendEnvironmentArn: [], + basicAuthCredentials: [], + branchName: [], + buildSpec: [], + description: [], + displayName: [], + enableAutoBuild: [], + enableBasicAuth: [], + enableNotification: [], + enablePerformanceMode: [], + enablePullRequestPreview: [], + environmentVariables: (_) => _json(_), + framework: [], + pullRequestEnvironmentName: [], + stage: [], + tags: (_) => _json(_), + ttl: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -256,9 +253,11 @@ export const se_CreateDeploymentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName!, "{branchName}", false); let body: any; - body = JSON.stringify({ - ...(input.fileMap != null && { fileMap: se_FileMap(input.fileMap, context) }), - }); + body = JSON.stringify( + take(input, { + fileMap: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -284,17 +283,15 @@ export const se_CreateDomainAssociationCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/domains"; resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); let body: any; - body = JSON.stringify({ - ...(input.autoSubDomainCreationPatterns != null && { - autoSubDomainCreationPatterns: se_AutoSubDomainCreationPatterns(input.autoSubDomainCreationPatterns, context), - }), - ...(input.autoSubDomainIAMRole != null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }), - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.enableAutoSubDomain != null && { enableAutoSubDomain: input.enableAutoSubDomain }), - ...(input.subDomainSettings != null && { - subDomainSettings: se_SubDomainSettings(input.subDomainSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + autoSubDomainCreationPatterns: (_) => _json(_), + autoSubDomainIAMRole: [], + domainName: [], + enableAutoSubDomain: [], + subDomainSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -320,10 +317,12 @@ export const se_CreateWebhookCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/webhooks"; resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); let body: any; - body = JSON.stringify({ - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + branchName: [], + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -505,11 +504,13 @@ export const se_GenerateAccessLogsCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}/accesslogs"; resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); let body: any; - body = JSON.stringify({ - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + domainName: [], + endTime: (_) => Math.round(_.getTime() / 1000), + startTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -937,10 +938,12 @@ export const se_StartDeploymentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName!, "{branchName}", false); let body: any; - body = JSON.stringify({ - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.sourceUrl != null && { sourceUrl: input.sourceUrl }), - }); + body = JSON.stringify( + take(input, { + jobId: [], + sourceUrl: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -968,14 +971,16 @@ export const se_StartJobCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName!, "{branchName}", false); let body: any; - body = JSON.stringify({ - ...(input.commitId != null && { commitId: input.commitId }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.commitTime != null && { commitTime: Math.round(input.commitTime.getTime() / 1000) }), - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.jobReason != null && { jobReason: input.jobReason }), - ...(input.jobType != null && { jobType: input.jobType }), - }); + body = JSON.stringify( + take(input, { + commitId: [], + commitMessage: [], + commitTime: (_) => Math.round(_.getTime() / 1000), + jobId: [], + jobReason: [], + jobType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1028,9 +1033,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1086,32 +1093,28 @@ export const se_UpdateAppCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apps/{appId}"; resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); let body: any; - body = JSON.stringify({ - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.autoBranchCreationConfig != null && { - autoBranchCreationConfig: se_AutoBranchCreationConfig(input.autoBranchCreationConfig, context), - }), - ...(input.autoBranchCreationPatterns != null && { - autoBranchCreationPatterns: se_AutoBranchCreationPatterns(input.autoBranchCreationPatterns, context), - }), - ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }), - ...(input.buildSpec != null && { buildSpec: input.buildSpec }), - ...(input.customHeaders != null && { customHeaders: input.customHeaders }), - ...(input.customRules != null && { customRules: se_CustomRules(input.customRules, context) }), - ...(input.description != null && { description: input.description }), - ...(input.enableAutoBranchCreation != null && { enableAutoBranchCreation: input.enableAutoBranchCreation }), - ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }), - ...(input.enableBranchAutoBuild != null && { enableBranchAutoBuild: input.enableBranchAutoBuild }), - ...(input.enableBranchAutoDeletion != null && { enableBranchAutoDeletion: input.enableBranchAutoDeletion }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariables(input.environmentVariables, context), - }), - ...(input.iamServiceRoleArn != null && { iamServiceRoleArn: input.iamServiceRoleArn }), - ...(input.name != null && { name: input.name }), - ...(input.oauthToken != null && { oauthToken: input.oauthToken }), - ...(input.platform != null && { platform: input.platform }), - ...(input.repository != null && { repository: input.repository }), - }); + body = JSON.stringify( + take(input, { + accessToken: [], + autoBranchCreationConfig: (_) => _json(_), + autoBranchCreationPatterns: (_) => _json(_), + basicAuthCredentials: [], + buildSpec: [], + customHeaders: [], + customRules: (_) => _json(_), + description: [], + enableAutoBranchCreation: [], + enableBasicAuth: [], + enableBranchAutoBuild: [], + enableBranchAutoDeletion: [], + environmentVariables: (_) => _json(_), + iamServiceRoleArn: [], + name: [], + oauthToken: [], + platform: [], + repository: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1139,25 +1142,25 @@ export const se_UpdateBranchCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "branchName", () => input.branchName!, "{branchName}", false); let body: any; - body = JSON.stringify({ - ...(input.backendEnvironmentArn != null && { backendEnvironmentArn: input.backendEnvironmentArn }), - ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }), - ...(input.buildSpec != null && { buildSpec: input.buildSpec }), - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }), - ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }), - ...(input.enableNotification != null && { enableNotification: input.enableNotification }), - ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }), - ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariables(input.environmentVariables, context), - }), - ...(input.framework != null && { framework: input.framework }), - ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }), - ...(input.stage != null && { stage: input.stage }), - ...(input.ttl != null && { ttl: input.ttl }), - }); + body = JSON.stringify( + take(input, { + backendEnvironmentArn: [], + basicAuthCredentials: [], + buildSpec: [], + description: [], + displayName: [], + enableAutoBuild: [], + enableBasicAuth: [], + enableNotification: [], + enablePerformanceMode: [], + enablePullRequestPreview: [], + environmentVariables: (_) => _json(_), + framework: [], + pullRequestEnvironmentName: [], + stage: [], + ttl: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1185,16 +1188,14 @@ export const se_UpdateDomainAssociationCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "appId", () => input.appId!, "{appId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName!, "{domainName}", false); let body: any; - body = JSON.stringify({ - ...(input.autoSubDomainCreationPatterns != null && { - autoSubDomainCreationPatterns: se_AutoSubDomainCreationPatterns(input.autoSubDomainCreationPatterns, context), - }), - ...(input.autoSubDomainIAMRole != null && { autoSubDomainIAMRole: input.autoSubDomainIAMRole }), - ...(input.enableAutoSubDomain != null && { enableAutoSubDomain: input.enableAutoSubDomain }), - ...(input.subDomainSettings != null && { - subDomainSettings: se_SubDomainSettings(input.subDomainSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + autoSubDomainCreationPatterns: (_) => _json(_), + autoSubDomainIAMRole: [], + enableAutoSubDomain: [], + subDomainSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1220,10 +1221,12 @@ export const se_UpdateWebhookCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webhooks/{webhookId}"; resolvedPath = __resolvedPath(resolvedPath, input, "webhookId", () => input.webhookId!, "{webhookId}", false); let body: any; - body = JSON.stringify({ - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + branchName: [], + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1249,9 +1252,10 @@ export const de_CreateAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1285,10 +1289,9 @@ const de_CreateAppCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1308,9 +1311,10 @@ export const de_CreateBackendEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.backendEnvironment != null) { - contents.backendEnvironment = de_BackendEnvironment(data.backendEnvironment, context); - } + const doc = take(data, { + backendEnvironment: (_) => de_BackendEnvironment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1344,10 +1348,9 @@ const de_CreateBackendEnvironmentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1367,9 +1370,10 @@ export const de_CreateBranchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.branch != null) { - contents.branch = de_Branch(data.branch, context); - } + const doc = take(data, { + branch: (_) => de_Branch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1406,10 +1410,9 @@ const de_CreateBranchCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1429,15 +1432,12 @@ export const de_CreateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fileUploadUrls != null) { - contents.fileUploadUrls = de_FileUploadUrls(data.fileUploadUrls, context); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.zipUploadUrl != null) { - contents.zipUploadUrl = __expectString(data.zipUploadUrl); - } + const doc = take(data, { + fileUploadUrls: _json, + jobId: __expectString, + zipUploadUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1468,10 +1468,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1491,9 +1490,10 @@ export const de_CreateDomainAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainAssociation != null) { - contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context); - } + const doc = take(data, { + domainAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1530,10 +1530,9 @@ const de_CreateDomainAssociationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1553,9 +1552,10 @@ export const de_CreateWebhookCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.webhook != null) { - contents.webhook = de_Webhook(data.webhook, context); - } + const doc = take(data, { + webhook: (_) => de_Webhook(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1592,10 +1592,9 @@ const de_CreateWebhookCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1615,9 +1614,10 @@ export const de_DeleteAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1651,10 +1651,9 @@ const de_DeleteAppCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1674,9 +1673,10 @@ export const de_DeleteBackendEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.backendEnvironment != null) { - contents.backendEnvironment = de_BackendEnvironment(data.backendEnvironment, context); - } + const doc = take(data, { + backendEnvironment: (_) => de_BackendEnvironment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1710,10 +1710,9 @@ const de_DeleteBackendEnvironmentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1733,9 +1732,10 @@ export const de_DeleteBranchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.branch != null) { - contents.branch = de_Branch(data.branch, context); - } + const doc = take(data, { + branch: (_) => de_Branch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1769,10 +1769,9 @@ const de_DeleteBranchCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1792,9 +1791,10 @@ export const de_DeleteDomainAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainAssociation != null) { - contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context); - } + const doc = take(data, { + domainAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1828,10 +1828,9 @@ const de_DeleteDomainAssociationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1851,9 +1850,10 @@ export const de_DeleteJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummary != null) { - contents.jobSummary = de_JobSummary(data.jobSummary, context); - } + const doc = take(data, { + jobSummary: (_) => de_JobSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1887,10 +1887,9 @@ const de_DeleteJobCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1910,9 +1909,10 @@ export const de_DeleteWebhookCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.webhook != null) { - contents.webhook = de_Webhook(data.webhook, context); - } + const doc = take(data, { + webhook: (_) => de_Webhook(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1946,10 +1946,9 @@ const de_DeleteWebhookCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1969,9 +1968,10 @@ export const de_GenerateAccessLogsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.logUrl != null) { - contents.logUrl = __expectString(data.logUrl); - } + const doc = take(data, { + logUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2002,10 +2002,9 @@ const de_GenerateAccessLogsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2025,9 +2024,10 @@ export const de_GetAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2055,10 +2055,9 @@ const de_GetAppCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2078,12 +2077,11 @@ export const de_GetArtifactUrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.artifactId != null) { - contents.artifactId = __expectString(data.artifactId); - } - if (data.artifactUrl != null) { - contents.artifactUrl = __expectString(data.artifactUrl); - } + const doc = take(data, { + artifactId: __expectString, + artifactUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2117,10 +2115,9 @@ const de_GetArtifactUrlCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2140,9 +2137,10 @@ export const de_GetBackendEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.backendEnvironment != null) { - contents.backendEnvironment = de_BackendEnvironment(data.backendEnvironment, context); - } + const doc = take(data, { + backendEnvironment: (_) => de_BackendEnvironment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2173,10 +2171,9 @@ const de_GetBackendEnvironmentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2196,9 +2193,10 @@ export const de_GetBranchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.branch != null) { - contents.branch = de_Branch(data.branch, context); - } + const doc = take(data, { + branch: (_) => de_Branch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2229,10 +2227,9 @@ const de_GetBranchCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2252,9 +2249,10 @@ export const de_GetDomainAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainAssociation != null) { - contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context); - } + const doc = take(data, { + domainAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2285,10 +2283,9 @@ const de_GetDomainAssociationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2308,9 +2305,10 @@ export const de_GetJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: (_) => de_Job(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2341,10 +2339,9 @@ const de_GetJobCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2364,9 +2361,10 @@ export const de_GetWebhookCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.webhook != null) { - contents.webhook = de_Webhook(data.webhook, context); - } + const doc = take(data, { + webhook: (_) => de_Webhook(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2400,10 +2398,9 @@ const de_GetWebhookCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2423,12 +2420,11 @@ export const de_ListAppsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apps != null) { - contents.apps = de_Apps(data.apps, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + apps: (_) => de_Apps(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2456,10 +2452,9 @@ const de_ListAppsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2479,12 +2474,11 @@ export const de_ListArtifactsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.artifacts != null) { - contents.artifacts = de_Artifacts(data.artifacts, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + artifacts: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2515,10 +2509,9 @@ const de_ListArtifactsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2538,12 +2531,11 @@ export const de_ListBackendEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.backendEnvironments != null) { - contents.backendEnvironments = de_BackendEnvironments(data.backendEnvironments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + backendEnvironments: (_) => de_BackendEnvironments(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2571,10 +2563,9 @@ const de_ListBackendEnvironmentsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2594,12 +2585,11 @@ export const de_ListBranchesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.branches != null) { - contents.branches = de_Branches(data.branches, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + branches: (_) => de_Branches(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2627,10 +2617,9 @@ const de_ListBranchesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2650,12 +2639,11 @@ export const de_ListDomainAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainAssociations != null) { - contents.domainAssociations = de_DomainAssociations(data.domainAssociations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + domainAssociations: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2683,10 +2671,9 @@ const de_ListDomainAssociationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2706,12 +2693,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummaries != null) { - contents.jobSummaries = de_JobSummaries(data.jobSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobSummaries: (_) => de_JobSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2742,10 +2728,9 @@ const de_ListJobsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,9 +2750,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2795,10 +2781,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2818,12 +2803,11 @@ export const de_ListWebhooksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.webhooks != null) { - contents.webhooks = de_Webhooks(data.webhooks, context); - } + const doc = take(data, { + nextToken: __expectString, + webhooks: (_) => de_Webhooks(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2854,10 +2838,9 @@ const de_ListWebhooksCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2877,9 +2860,10 @@ export const de_StartDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummary != null) { - contents.jobSummary = de_JobSummary(data.jobSummary, context); - } + const doc = take(data, { + jobSummary: (_) => de_JobSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2913,10 +2897,9 @@ const de_StartDeploymentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2936,9 +2919,10 @@ export const de_StartJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummary != null) { - contents.jobSummary = de_JobSummary(data.jobSummary, context); - } + const doc = take(data, { + jobSummary: (_) => de_JobSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2972,10 +2956,9 @@ const de_StartJobCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2995,9 +2978,10 @@ export const de_StopJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummary != null) { - contents.jobSummary = de_JobSummary(data.jobSummary, context); - } + const doc = take(data, { + jobSummary: (_) => de_JobSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3031,10 +3015,9 @@ const de_StopJobCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3081,10 +3064,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3131,10 +3113,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3154,9 +3135,10 @@ export const de_UpdateAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3187,10 +3169,9 @@ const de_UpdateAppCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3210,9 +3191,10 @@ export const de_UpdateBranchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.branch != null) { - contents.branch = de_Branch(data.branch, context); - } + const doc = take(data, { + branch: (_) => de_Branch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3246,10 +3228,9 @@ const de_UpdateBranchCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3269,9 +3250,10 @@ export const de_UpdateDomainAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainAssociation != null) { - contents.domainAssociation = de_DomainAssociation(data.domainAssociation, context); - } + const doc = take(data, { + domainAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3305,10 +3287,9 @@ const de_UpdateDomainAssociationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3328,9 +3309,10 @@ export const de_UpdateWebhookCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.webhook != null) { - contents.webhook = de_Webhook(data.webhook, context); - } + const doc = take(data, { + webhook: (_) => de_Webhook(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3364,25 +3346,25 @@ const de_UpdateWebhookCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3399,9 +3381,10 @@ const de_DependentServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DependentServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3418,9 +3401,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3437,9 +3421,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3453,9 +3438,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3472,12 +3458,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3494,9 +3479,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3504,171 +3490,56 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AutoBranchCreationConfig - */ -const se_AutoBranchCreationConfig = (input: AutoBranchCreationConfig, context: __SerdeContext): any => { - return { - ...(input.basicAuthCredentials != null && { basicAuthCredentials: input.basicAuthCredentials }), - ...(input.buildSpec != null && { buildSpec: input.buildSpec }), - ...(input.enableAutoBuild != null && { enableAutoBuild: input.enableAutoBuild }), - ...(input.enableBasicAuth != null && { enableBasicAuth: input.enableBasicAuth }), - ...(input.enablePerformanceMode != null && { enablePerformanceMode: input.enablePerformanceMode }), - ...(input.enablePullRequestPreview != null && { enablePullRequestPreview: input.enablePullRequestPreview }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariables(input.environmentVariables, context), - }), - ...(input.framework != null && { framework: input.framework }), - ...(input.pullRequestEnvironmentName != null && { pullRequestEnvironmentName: input.pullRequestEnvironmentName }), - ...(input.stage != null && { stage: input.stage }), - }; -}; +// se_AutoBranchCreationConfig omitted. -/** - * serializeAws_restJson1AutoBranchCreationPatterns - */ -const se_AutoBranchCreationPatterns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutoBranchCreationPatterns omitted. -/** - * serializeAws_restJson1AutoSubDomainCreationPatterns - */ -const se_AutoSubDomainCreationPatterns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutoSubDomainCreationPatterns omitted. -/** - * serializeAws_restJson1CustomRule - */ -const se_CustomRule = (input: CustomRule, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: input.condition }), - ...(input.source != null && { source: input.source }), - ...(input.status != null && { status: input.status }), - ...(input.target != null && { target: input.target }), - }; -}; +// se_CustomRule omitted. -/** - * serializeAws_restJson1CustomRules - */ -const se_CustomRules = (input: CustomRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomRule(entry, context); - }); -}; +// se_CustomRules omitted. -/** - * serializeAws_restJson1EnvironmentVariables - */ -const se_EnvironmentVariables = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EnvironmentVariables omitted. -/** - * serializeAws_restJson1FileMap - */ -const se_FileMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FileMap omitted. -/** - * serializeAws_restJson1SubDomainSetting - */ -const se_SubDomainSetting = (input: SubDomainSetting, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_SubDomainSetting omitted. -/** - * serializeAws_restJson1SubDomainSettings - */ -const se_SubDomainSettings = (input: SubDomainSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SubDomainSetting(entry, context); - }); -}; +// se_SubDomainSettings omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * deserializeAws_restJson1App */ const de_App = (output: any, context: __SerdeContext): App => { - return { - appArn: __expectString(output.appArn), - appId: __expectString(output.appId), - autoBranchCreationConfig: - output.autoBranchCreationConfig != null - ? de_AutoBranchCreationConfig(output.autoBranchCreationConfig, context) - : undefined, - autoBranchCreationPatterns: - output.autoBranchCreationPatterns != null - ? de_AutoBranchCreationPatterns(output.autoBranchCreationPatterns, context) - : undefined, - basicAuthCredentials: __expectString(output.basicAuthCredentials), - buildSpec: __expectString(output.buildSpec), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - customHeaders: __expectString(output.customHeaders), - customRules: output.customRules != null ? de_CustomRules(output.customRules, context) : undefined, - defaultDomain: __expectString(output.defaultDomain), - description: __expectString(output.description), - enableAutoBranchCreation: __expectBoolean(output.enableAutoBranchCreation), - enableBasicAuth: __expectBoolean(output.enableBasicAuth), - enableBranchAutoBuild: __expectBoolean(output.enableBranchAutoBuild), - enableBranchAutoDeletion: __expectBoolean(output.enableBranchAutoDeletion), - environmentVariables: - output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined, - iamServiceRoleArn: __expectString(output.iamServiceRoleArn), - name: __expectString(output.name), - platform: __expectString(output.platform), - productionBranch: - output.productionBranch != null ? de_ProductionBranch(output.productionBranch, context) : undefined, - repository: __expectString(output.repository), - repositoryCloneMethod: __expectString(output.repositoryCloneMethod), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + appArn: __expectString, + appId: __expectString, + autoBranchCreationConfig: _json, + autoBranchCreationPatterns: _json, + basicAuthCredentials: __expectString, + buildSpec: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customHeaders: __expectString, + customRules: _json, + defaultDomain: __expectString, + description: __expectString, + enableAutoBranchCreation: __expectBoolean, + enableBasicAuth: __expectBoolean, + enableBranchAutoBuild: __expectBoolean, + enableBranchAutoDeletion: __expectBoolean, + environmentVariables: _json, + iamServiceRoleArn: __expectString, + name: __expectString, + platform: __expectString, + productionBranch: (_: any) => de_ProductionBranch(_, context), + repository: __expectString, + repositoryCloneMethod: __expectString, + tags: _json, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3678,117 +3549,35 @@ const de_Apps = (output: any, context: __SerdeContext): App[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_App(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Artifact - */ -const de_Artifact = (output: any, context: __SerdeContext): Artifact => { - return { - artifactFileName: __expectString(output.artifactFileName), - artifactId: __expectString(output.artifactId), - } as any; -}; +// de_Artifact omitted. -/** - * deserializeAws_restJson1Artifacts - */ -const de_Artifacts = (output: any, context: __SerdeContext): Artifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Artifact(entry, context); - }); - return retVal; -}; +// de_Artifacts omitted. -/** - * deserializeAws_restJson1AssociatedResources - */ -const de_AssociatedResources = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AssociatedResources omitted. -/** - * deserializeAws_restJson1AutoBranchCreationConfig - */ -const de_AutoBranchCreationConfig = (output: any, context: __SerdeContext): AutoBranchCreationConfig => { - return { - basicAuthCredentials: __expectString(output.basicAuthCredentials), - buildSpec: __expectString(output.buildSpec), - enableAutoBuild: __expectBoolean(output.enableAutoBuild), - enableBasicAuth: __expectBoolean(output.enableBasicAuth), - enablePerformanceMode: __expectBoolean(output.enablePerformanceMode), - enablePullRequestPreview: __expectBoolean(output.enablePullRequestPreview), - environmentVariables: - output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined, - framework: __expectString(output.framework), - pullRequestEnvironmentName: __expectString(output.pullRequestEnvironmentName), - stage: __expectString(output.stage), - } as any; -}; +// de_AutoBranchCreationConfig omitted. -/** - * deserializeAws_restJson1AutoBranchCreationPatterns - */ -const de_AutoBranchCreationPatterns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AutoBranchCreationPatterns omitted. -/** - * deserializeAws_restJson1AutoSubDomainCreationPatterns - */ -const de_AutoSubDomainCreationPatterns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AutoSubDomainCreationPatterns omitted. /** * deserializeAws_restJson1BackendEnvironment */ const de_BackendEnvironment = (output: any, context: __SerdeContext): BackendEnvironment => { - return { - backendEnvironmentArn: __expectString(output.backendEnvironmentArn), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - deploymentArtifacts: __expectString(output.deploymentArtifacts), - environmentName: __expectString(output.environmentName), - stackName: __expectString(output.stackName), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + backendEnvironmentArn: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentArtifacts: __expectString, + environmentName: __expectString, + stackName: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3798,9 +3587,6 @@ const de_BackendEnvironments = (output: any, context: __SerdeContext): BackendEn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackendEnvironment(entry, context); }); return retVal; @@ -3810,39 +3596,35 @@ const de_BackendEnvironments = (output: any, context: __SerdeContext): BackendEn * deserializeAws_restJson1Branch */ const de_Branch = (output: any, context: __SerdeContext): Branch => { - return { - activeJobId: __expectString(output.activeJobId), - associatedResources: - output.associatedResources != null ? de_AssociatedResources(output.associatedResources, context) : undefined, - backendEnvironmentArn: __expectString(output.backendEnvironmentArn), - basicAuthCredentials: __expectString(output.basicAuthCredentials), - branchArn: __expectString(output.branchArn), - branchName: __expectString(output.branchName), - buildSpec: __expectString(output.buildSpec), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - customDomains: output.customDomains != null ? de_CustomDomains(output.customDomains, context) : undefined, - description: __expectString(output.description), - destinationBranch: __expectString(output.destinationBranch), - displayName: __expectString(output.displayName), - enableAutoBuild: __expectBoolean(output.enableAutoBuild), - enableBasicAuth: __expectBoolean(output.enableBasicAuth), - enableNotification: __expectBoolean(output.enableNotification), - enablePerformanceMode: __expectBoolean(output.enablePerformanceMode), - enablePullRequestPreview: __expectBoolean(output.enablePullRequestPreview), - environmentVariables: - output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined, - framework: __expectString(output.framework), - pullRequestEnvironmentName: __expectString(output.pullRequestEnvironmentName), - sourceBranch: __expectString(output.sourceBranch), - stage: __expectString(output.stage), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - thumbnailUrl: __expectString(output.thumbnailUrl), - totalNumberOfJobs: __expectString(output.totalNumberOfJobs), - ttl: __expectString(output.ttl), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + activeJobId: __expectString, + associatedResources: _json, + backendEnvironmentArn: __expectString, + basicAuthCredentials: __expectString, + branchArn: __expectString, + branchName: __expectString, + buildSpec: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customDomains: _json, + description: __expectString, + destinationBranch: __expectString, + displayName: __expectString, + enableAutoBuild: __expectBoolean, + enableBasicAuth: __expectBoolean, + enableNotification: __expectBoolean, + enablePerformanceMode: __expectBoolean, + enablePullRequestPreview: __expectBoolean, + environmentVariables: _json, + framework: __expectString, + pullRequestEnvironmentName: __expectString, + sourceBranch: __expectString, + stage: __expectString, + tags: _json, + thumbnailUrl: __expectString, + totalNumberOfJobs: __expectString, + ttl: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3852,125 +3634,33 @@ const de_Branches = (output: any, context: __SerdeContext): Branch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Branch(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CustomDomains - */ -const de_CustomDomains = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CustomDomains omitted. -/** - * deserializeAws_restJson1CustomRule - */ -const de_CustomRule = (output: any, context: __SerdeContext): CustomRule => { - return { - condition: __expectString(output.condition), - source: __expectString(output.source), - status: __expectString(output.status), - target: __expectString(output.target), - } as any; -}; +// de_CustomRule omitted. -/** - * deserializeAws_restJson1CustomRules - */ -const de_CustomRules = (output: any, context: __SerdeContext): CustomRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomRule(entry, context); - }); - return retVal; -}; +// de_CustomRules omitted. -/** - * deserializeAws_restJson1DomainAssociation - */ -const de_DomainAssociation = (output: any, context: __SerdeContext): DomainAssociation => { - return { - autoSubDomainCreationPatterns: - output.autoSubDomainCreationPatterns != null - ? de_AutoSubDomainCreationPatterns(output.autoSubDomainCreationPatterns, context) - : undefined, - autoSubDomainIAMRole: __expectString(output.autoSubDomainIAMRole), - certificateVerificationDNSRecord: __expectString(output.certificateVerificationDNSRecord), - domainAssociationArn: __expectString(output.domainAssociationArn), - domainName: __expectString(output.domainName), - domainStatus: __expectString(output.domainStatus), - enableAutoSubDomain: __expectBoolean(output.enableAutoSubDomain), - statusReason: __expectString(output.statusReason), - subDomains: output.subDomains != null ? de_SubDomains(output.subDomains, context) : undefined, - } as any; -}; +// de_DomainAssociation omitted. -/** - * deserializeAws_restJson1DomainAssociations - */ -const de_DomainAssociations = (output: any, context: __SerdeContext): DomainAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainAssociation(entry, context); - }); - return retVal; -}; +// de_DomainAssociations omitted. -/** - * deserializeAws_restJson1EnvironmentVariables - */ -const de_EnvironmentVariables = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EnvironmentVariables omitted. -/** - * deserializeAws_restJson1FileUploadUrls - */ -const de_FileUploadUrls = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FileUploadUrls omitted. /** * deserializeAws_restJson1Job */ const de_Job = (output: any, context: __SerdeContext): Job => { - return { - steps: output.steps != null ? de_Steps(output.steps, context) : undefined, - summary: output.summary != null ? de_JobSummary(output.summary, context) : undefined, - } as any; + return take(output, { + steps: (_: any) => de_Steps(_, context), + summary: (_: any) => de_JobSummary(_, context), + }) as any; }; /** @@ -3980,9 +3670,6 @@ const de_JobSummaries = (output: any, context: __SerdeContext): JobSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobSummary(entry, context); }); return retVal; @@ -3992,69 +3679,50 @@ const de_JobSummaries = (output: any, context: __SerdeContext): JobSummary[] => * deserializeAws_restJson1JobSummary */ const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { - return { - commitId: __expectString(output.commitId), - commitMessage: __expectString(output.commitMessage), - commitTime: - output.commitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.commitTime))) : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - jobArn: __expectString(output.jobArn), - jobId: __expectString(output.jobId), - jobType: __expectString(output.jobType), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + commitId: __expectString, + commitMessage: __expectString, + commitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + jobArn: __expectString, + jobId: __expectString, + jobType: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1ProductionBranch */ const de_ProductionBranch = (output: any, context: __SerdeContext): ProductionBranch => { - return { - branchName: __expectString(output.branchName), - lastDeployTime: - output.lastDeployTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeployTime))) - : undefined, - status: __expectString(output.status), - thumbnailUrl: __expectString(output.thumbnailUrl), - } as any; + return take(output, { + branchName: __expectString, + lastDeployTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + thumbnailUrl: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Screenshots - */ -const de_Screenshots = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Screenshots omitted. /** * deserializeAws_restJson1Step */ const de_Step = (output: any, context: __SerdeContext): Step => { - return { - artifactsUrl: __expectString(output.artifactsUrl), - context: __expectString(output.context), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - logUrl: __expectString(output.logUrl), - screenshots: output.screenshots != null ? de_Screenshots(output.screenshots, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - stepName: __expectString(output.stepName), - testArtifactsUrl: __expectString(output.testArtifactsUrl), - testConfigUrl: __expectString(output.testConfigUrl), - } as any; + return take(output, { + artifactsUrl: __expectString, + context: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + logUrl: __expectString, + screenshots: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReason: __expectString, + stepName: __expectString, + testArtifactsUrl: __expectString, + testConfigUrl: __expectString, + }) as any; }; /** @@ -4064,79 +3732,32 @@ const de_Steps = (output: any, context: __SerdeContext): Step[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Step(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SubDomain - */ -const de_SubDomain = (output: any, context: __SerdeContext): SubDomain => { - return { - dnsRecord: __expectString(output.dnsRecord), - subDomainSetting: - output.subDomainSetting != null ? de_SubDomainSetting(output.subDomainSetting, context) : undefined, - verified: __expectBoolean(output.verified), - } as any; -}; +// de_SubDomain omitted. -/** - * deserializeAws_restJson1SubDomains - */ -const de_SubDomains = (output: any, context: __SerdeContext): SubDomain[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubDomain(entry, context); - }); - return retVal; -}; +// de_SubDomains omitted. -/** - * deserializeAws_restJson1SubDomainSetting - */ -const de_SubDomainSetting = (output: any, context: __SerdeContext): SubDomainSetting => { - return { - branchName: __expectString(output.branchName), - prefix: __expectString(output.prefix), - } as any; -}; +// de_SubDomainSetting omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1Webhook */ const de_Webhook = (output: any, context: __SerdeContext): Webhook => { - return { - branchName: __expectString(output.branchName), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - description: __expectString(output.description), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - webhookArn: __expectString(output.webhookArn), - webhookId: __expectString(output.webhookId), - webhookUrl: __expectString(output.webhookUrl), - } as any; + return take(output, { + branchName: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + webhookArn: __expectString, + webhookId: __expectString, + webhookUrl: __expectString, + }) as any; }; /** @@ -4146,9 +3767,6 @@ const de_Webhooks = (output: any, context: __SerdeContext): Webhook[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Webhook(entry, context); }); return retVal; diff --git a/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts b/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts index d4d3ebf87b0a..7ec796785c24 100644 --- a/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts +++ b/clients/client-amplifybackend/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -148,9 +150,11 @@ export const se_CloneBackendCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.TargetEnvironmentName != null && { targetEnvironmentName: input.TargetEnvironmentName }), - }); + body = JSON.stringify( + take(input, { + targetEnvironmentName: [, , `TargetEnvironmentName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -175,13 +179,15 @@ export const se_CreateBackendCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend"; let body: any; - body = JSON.stringify({ - ...(input.AppId != null && { appId: input.AppId }), - ...(input.AppName != null && { appName: input.AppName }), - ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }), - ...(input.ResourceConfig != null && { resourceConfig: se_ResourceConfig(input.ResourceConfig, context) }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + appId: [, , `AppId`], + appName: [, , `AppName`], + backendEnvironmentName: [, , `BackendEnvironmentName`], + resourceConfig: [, (_) => _json(_), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -207,11 +213,13 @@ export const se_CreateBackendAPICommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/api"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }), - ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + backendEnvironmentName: [, , `BackendEnvironmentName`], + resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -237,13 +245,13 @@ export const se_CreateBackendAuthCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/auth"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }), - ...(input.ResourceConfig != null && { - resourceConfig: se_CreateBackendAuthResourceConfig(input.ResourceConfig, context), - }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + backendEnvironmentName: [, , `BackendEnvironmentName`], + resourceConfig: [, (_) => se_CreateBackendAuthResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -269,9 +277,11 @@ export const se_CreateBackendConfigCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/config"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.BackendManagerAppId != null && { backendManagerAppId: input.BackendManagerAppId }), - }); + body = JSON.stringify( + take(input, { + backendManagerAppId: [, , `BackendManagerAppId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -297,13 +307,13 @@ export const se_CreateBackendStorageCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/storage"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }), - ...(input.ResourceConfig != null && { - resourceConfig: se_CreateBackendStorageResourceConfig(input.ResourceConfig, context), - }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + backendEnvironmentName: [, , `BackendEnvironmentName`], + resourceConfig: [, (_) => se_CreateBackendStorageResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -396,10 +406,12 @@ export const se_DeleteBackendAPICommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -435,9 +447,11 @@ export const se_DeleteBackendAuthCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -473,10 +487,12 @@ export const se_DeleteBackendStorageCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - }); + body = JSON.stringify( + take(input, { + resourceName: [, , `ResourceName`], + serviceName: [, , `ServiceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -538,9 +554,11 @@ export const se_GenerateBackendAPIModelsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -566,9 +584,11 @@ export const se_GetBackendCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/details"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.BackendEnvironmentName != null && { backendEnvironmentName: input.BackendEnvironmentName }), - }); + body = JSON.stringify( + take(input, { + backendEnvironmentName: [, , `BackendEnvironmentName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -604,10 +624,12 @@ export const se_GetBackendAPICommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -643,9 +665,11 @@ export const se_GetBackendAPIModelsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -681,9 +705,11 @@ export const se_GetBackendAuthCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -753,9 +779,11 @@ export const se_GetBackendStorageCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -816,12 +844,14 @@ export const se_ImportBackendAuthCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.IdentityPoolId != null && { identityPoolId: input.IdentityPoolId }), - ...(input.NativeClientId != null && { nativeClientId: input.NativeClientId }), - ...(input.UserPoolId != null && { userPoolId: input.UserPoolId }), - ...(input.WebClientId != null && { webClientId: input.WebClientId }), - }); + body = JSON.stringify( + take(input, { + identityPoolId: [, , `IdentityPoolId`], + nativeClientId: [, , `NativeClientId`], + userPoolId: [, , `UserPoolId`], + webClientId: [, , `WebClientId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -857,10 +887,12 @@ export const se_ImportBackendStorageCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BucketName != null && { bucketName: input.BucketName }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - }); + body = JSON.stringify( + take(input, { + bucketName: [, , `BucketName`], + serviceName: [, , `ServiceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -896,13 +928,15 @@ export const se_ListBackendJobsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.JobId != null && { jobId: input.JobId }), - ...(input.MaxResults != null && { maxResults: input.MaxResults }), - ...(input.NextToken != null && { nextToken: input.NextToken }), - ...(input.Operation != null && { operation: input.Operation }), - ...(input.Status != null && { status: input.Status }), - }); + body = JSON.stringify( + take(input, { + jobId: [, , `JobId`], + maxResults: [, , `MaxResults`], + nextToken: [, , `NextToken`], + operation: [, , `Operation`], + status: [, , `Status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -927,9 +961,11 @@ export const se_ListS3BucketsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/s3Buckets"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { nextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + nextToken: [, , `NextToken`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -955,9 +991,11 @@ export const se_RemoveAllBackendsCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/remove"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.CleanAmplifyApp != null && { cleanAmplifyApp: input.CleanAmplifyApp }), - }); + body = JSON.stringify( + take(input, { + cleanAmplifyApp: [, , `CleanAmplifyApp`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1017,10 +1055,12 @@ export const se_UpdateBackendAPICommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceConfig != null && { resourceConfig: se_BackendAPIResourceConfig(input.ResourceConfig, context) }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceConfig: [, (_) => se_BackendAPIResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1056,12 +1096,12 @@ export const se_UpdateBackendAuthCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceConfig != null && { - resourceConfig: se_UpdateBackendAuthResourceConfig(input.ResourceConfig, context), - }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceConfig: [, (_) => se_UpdateBackendAuthResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1088,9 +1128,11 @@ export const se_UpdateBackendConfigCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backend/{AppId}/config/update"; resolvedPath = __resolvedPath(resolvedPath, input, "AppId", () => input.AppId!, "{AppId}", false); let body: any; - body = JSON.stringify({ - ...(input.LoginAuthConfig != null && { loginAuthConfig: se_LoginAuthConfigReqObj(input.LoginAuthConfig, context) }), - }); + body = JSON.stringify( + take(input, { + loginAuthConfig: [, (_) => se_LoginAuthConfigReqObj(_, context), `LoginAuthConfig`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1127,10 +1169,12 @@ export const se_UpdateBackendJobCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "JobId", () => input.JobId!, "{JobId}", false); let body: any; - body = JSON.stringify({ - ...(input.Operation != null && { operation: input.Operation }), - ...(input.Status != null && { status: input.Status }), - }); + body = JSON.stringify( + take(input, { + operation: [, , `Operation`], + status: [, , `Status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1166,12 +1210,12 @@ export const se_UpdateBackendStorageCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceConfig != null && { - resourceConfig: se_UpdateBackendStorageResourceConfig(input.ResourceConfig, context), - }), - ...(input.ResourceName != null && { resourceName: input.ResourceName }), - }); + body = JSON.stringify( + take(input, { + resourceConfig: [, (_) => se_UpdateBackendStorageResourceConfig(_, context), `ResourceConfig`], + resourceName: [, , `ResourceName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1197,24 +1241,15 @@ export const de_CloneBackendCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1245,10 +1280,9 @@ const de_CloneBackendCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1268,24 +1302,15 @@ export const de_CreateBackendCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1316,10 +1341,9 @@ const de_CreateBackendCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1339,24 +1363,15 @@ export const de_CreateBackendAPICommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1387,10 +1402,9 @@ const de_CreateBackendAPICommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1410,24 +1424,15 @@ export const de_CreateBackendAuthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1458,10 +1463,9 @@ const de_CreateBackendAuthCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1481,18 +1485,13 @@ export const de_CreateBackendConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + JobId: [, __expectString, `jobId`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1523,10 +1522,9 @@ const de_CreateBackendConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,18 +1544,13 @@ export const de_CreateBackendStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + JobId: [, __expectString, `jobId`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1588,10 +1581,9 @@ const de_CreateBackendStorageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1611,18 +1603,13 @@ export const de_CreateTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.challengeCode != null) { - contents.ChallengeCode = __expectString(data.challengeCode); - } - if (data.sessionId != null) { - contents.SessionId = __expectString(data.sessionId); - } - if (data.ttl != null) { - contents.Ttl = __expectString(data.ttl); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + ChallengeCode: [, __expectString, `challengeCode`], + SessionId: [, __expectString, `sessionId`], + Ttl: [, __expectString, `ttl`], + }); + Object.assign(contents, doc); return contents; }; @@ -1653,10 +1640,9 @@ const de_CreateTokenCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1676,24 +1662,15 @@ export const de_DeleteBackendCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1724,10 +1701,9 @@ const de_DeleteBackendCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1747,24 +1723,15 @@ export const de_DeleteBackendAPICommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1795,10 +1762,9 @@ const de_DeleteBackendAPICommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1818,24 +1784,15 @@ export const de_DeleteBackendAuthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1866,10 +1823,9 @@ const de_DeleteBackendAuthCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1889,18 +1845,13 @@ export const de_DeleteBackendStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + JobId: [, __expectString, `jobId`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1931,10 +1882,9 @@ const de_DeleteBackendStorageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1954,9 +1904,10 @@ export const de_DeleteTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.isSuccess != null) { - contents.IsSuccess = __expectBoolean(data.isSuccess); - } + const doc = take(data, { + IsSuccess: [, __expectBoolean, `isSuccess`], + }); + Object.assign(contents, doc); return contents; }; @@ -1987,10 +1938,9 @@ const de_DeleteTokenCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,24 +1960,15 @@ export const de_GenerateBackendAPIModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2058,10 +1999,9 @@ const de_GenerateBackendAPIModelsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2081,27 +2021,16 @@ export const de_GetBackendCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.amplifyFeatureFlags != null) { - contents.AmplifyFeatureFlags = __expectString(data.amplifyFeatureFlags); - } - if (data.amplifyMetaConfig != null) { - contents.AmplifyMetaConfig = __expectString(data.amplifyMetaConfig); - } - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.appName != null) { - contents.AppName = __expectString(data.appName); - } - if (data.backendEnvironmentList != null) { - contents.BackendEnvironmentList = de_ListOf__string(data.backendEnvironmentList, context); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } + const doc = take(data, { + AmplifyFeatureFlags: [, __expectString, `amplifyFeatureFlags`], + AmplifyMetaConfig: [, __expectString, `amplifyMetaConfig`], + AppId: [, __expectString, `appId`], + AppName: [, __expectString, `appName`], + BackendEnvironmentList: [, _json, `backendEnvironmentList`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + }); + Object.assign(contents, doc); return contents; }; @@ -2132,10 +2061,9 @@ const de_GetBackendCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2155,21 +2083,14 @@ export const de_GetBackendAPICommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.resourceConfig != null) { - contents.ResourceConfig = de_BackendAPIResourceConfig(data.resourceConfig, context); - } - if (data.resourceName != null) { - contents.ResourceName = __expectString(data.resourceName); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + ResourceConfig: [, (_) => de_BackendAPIResourceConfig(_, context), `resourceConfig`], + ResourceName: [, __expectString, `resourceName`], + }); + Object.assign(contents, doc); return contents; }; @@ -2200,10 +2121,9 @@ const de_GetBackendAPICommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2223,15 +2143,12 @@ export const de_GetBackendAPIModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.modelIntrospectionSchema != null) { - contents.ModelIntrospectionSchema = __expectString(data.modelIntrospectionSchema); - } - if (data.models != null) { - contents.Models = __expectString(data.models); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + ModelIntrospectionSchema: [, __expectString, `modelIntrospectionSchema`], + Models: [, __expectString, `models`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2262,10 +2179,9 @@ const de_GetBackendAPIModelsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2285,21 +2201,14 @@ export const de_GetBackendAuthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.resourceConfig != null) { - contents.ResourceConfig = de_CreateBackendAuthResourceConfig(data.resourceConfig, context); - } - if (data.resourceName != null) { - contents.ResourceName = __expectString(data.resourceName); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + ResourceConfig: [, (_) => de_CreateBackendAuthResourceConfig(_, context), `resourceConfig`], + ResourceName: [, __expectString, `resourceName`], + }); + Object.assign(contents, doc); return contents; }; @@ -2330,10 +2239,9 @@ const de_GetBackendAuthCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2353,30 +2261,17 @@ export const de_GetBackendJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.createTime != null) { - contents.CreateTime = __expectString(data.createTime); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.updateTime != null) { - contents.UpdateTime = __expectString(data.updateTime); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + CreateTime: [, __expectString, `createTime`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + UpdateTime: [, __expectString, `updateTime`], + }); + Object.assign(contents, doc); return contents; }; @@ -2407,10 +2302,9 @@ const de_GetBackendJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2430,18 +2324,13 @@ export const de_GetBackendStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.resourceConfig != null) { - contents.ResourceConfig = de_GetBackendStorageResourceConfig(data.resourceConfig, context); - } - if (data.resourceName != null) { - contents.ResourceName = __expectString(data.resourceName); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + ResourceConfig: [, (_) => de_GetBackendStorageResourceConfig(_, context), `resourceConfig`], + ResourceName: [, __expectString, `resourceName`], + }); + Object.assign(contents, doc); return contents; }; @@ -2472,10 +2361,9 @@ const de_GetBackendStorageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2495,18 +2383,13 @@ export const de_GetTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.challengeCode != null) { - contents.ChallengeCode = __expectString(data.challengeCode); - } - if (data.sessionId != null) { - contents.SessionId = __expectString(data.sessionId); - } - if (data.ttl != null) { - contents.Ttl = __expectString(data.ttl); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + ChallengeCode: [, __expectString, `challengeCode`], + SessionId: [, __expectString, `sessionId`], + Ttl: [, __expectString, `ttl`], + }); + Object.assign(contents, doc); return contents; }; @@ -2537,10 +2420,9 @@ const de_GetTokenCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2560,24 +2442,15 @@ export const de_ImportBackendAuthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2608,10 +2481,9 @@ const de_ImportBackendAuthCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2631,18 +2503,13 @@ export const de_ImportBackendStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + JobId: [, __expectString, `jobId`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2673,10 +2540,9 @@ const de_ImportBackendStorageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2696,12 +2562,11 @@ export const de_ListBackendJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.Jobs = de_ListOfBackendJobRespObj(data.jobs, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Jobs: [, (_) => de_ListOfBackendJobRespObj(_, context), `jobs`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2732,10 +2597,9 @@ const de_ListBackendJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,12 +2619,11 @@ export const de_ListS3BucketsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.buckets != null) { - contents.Buckets = de_ListOfS3BucketInfo(data.buckets, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Buckets: [, (_) => de_ListOfS3BucketInfo(_, context), `buckets`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2791,10 +2654,9 @@ const de_ListS3BucketsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2814,21 +2676,14 @@ export const de_RemoveAllBackendsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2859,10 +2714,9 @@ const de_RemoveAllBackendsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2882,9 +2736,10 @@ export const de_RemoveBackendConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.error != null) { - contents.Error = __expectString(data.error); - } + const doc = take(data, { + Error: [, __expectString, `error`], + }); + Object.assign(contents, doc); return contents; }; @@ -2915,10 +2770,9 @@ const de_RemoveBackendConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2938,24 +2792,15 @@ export const de_UpdateBackendAPICommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2986,10 +2831,9 @@ const de_UpdateBackendAPICommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3009,24 +2853,15 @@ export const de_UpdateBackendAuthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -3057,10 +2892,9 @@ const de_UpdateBackendAuthCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3080,18 +2914,13 @@ export const de_UpdateBackendConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendManagerAppId != null) { - contents.BackendManagerAppId = __expectString(data.backendManagerAppId); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.loginAuthConfig != null) { - contents.LoginAuthConfig = de_LoginAuthConfigReqObj(data.loginAuthConfig, context); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendManagerAppId: [, __expectString, `backendManagerAppId`], + Error: [, __expectString, `error`], + LoginAuthConfig: [, (_) => de_LoginAuthConfigReqObj(_, context), `loginAuthConfig`], + }); + Object.assign(contents, doc); return contents; }; @@ -3122,10 +2951,9 @@ const de_UpdateBackendConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3145,30 +2973,17 @@ export const de_UpdateBackendJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.createTime != null) { - contents.CreateTime = __expectString(data.createTime); - } - if (data.error != null) { - contents.Error = __expectString(data.error); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.operation != null) { - contents.Operation = __expectString(data.operation); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.updateTime != null) { - contents.UpdateTime = __expectString(data.updateTime); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + CreateTime: [, __expectString, `createTime`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + UpdateTime: [, __expectString, `updateTime`], + }); + Object.assign(contents, doc); return contents; }; @@ -3199,10 +3014,9 @@ const de_UpdateBackendJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3222,18 +3036,13 @@ export const de_UpdateBackendStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appId != null) { - contents.AppId = __expectString(data.appId); - } - if (data.backendEnvironmentName != null) { - contents.BackendEnvironmentName = __expectString(data.backendEnvironmentName); - } - if (data.jobId != null) { - contents.JobId = __expectString(data.jobId); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + JobId: [, __expectString, `jobId`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -3264,25 +3073,25 @@ const de_UpdateBackendStorageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3299,9 +3108,10 @@ const de_GatewayTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new GatewayTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3315,12 +3125,11 @@ const de_GatewayTimeoutExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.resourceType != null) { - contents.ResourceType = __expectString(data.resourceType); - } + const doc = take(data, { + Message: [, __expectString, `message`], + ResourceType: [, __expectString, `resourceType`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3337,12 +3146,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.limitType != null) { - contents.LimitType = __expectString(data.limitType); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + LimitType: [, __expectString, `limitType`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3354,87 +3162,81 @@ const de_TooManyRequestsExceptionRes = async ( * serializeAws_restJson1BackendAPIAppSyncAuthSettings */ const se_BackendAPIAppSyncAuthSettings = (input: BackendAPIAppSyncAuthSettings, context: __SerdeContext): any => { - return { - ...(input.CognitoUserPoolId != null && { cognitoUserPoolId: input.CognitoUserPoolId }), - ...(input.Description != null && { description: input.Description }), - ...(input.ExpirationTime != null && { expirationTime: __serializeFloat(input.ExpirationTime) }), - ...(input.OpenIDAuthTTL != null && { openIDAuthTTL: input.OpenIDAuthTTL }), - ...(input.OpenIDClientId != null && { openIDClientId: input.OpenIDClientId }), - ...(input.OpenIDIatTTL != null && { openIDIatTTL: input.OpenIDIatTTL }), - ...(input.OpenIDIssueURL != null && { openIDIssueURL: input.OpenIDIssueURL }), - ...(input.OpenIDProviderName != null && { openIDProviderName: input.OpenIDProviderName }), - }; + return take(input, { + cognitoUserPoolId: [, , `CognitoUserPoolId`], + description: [, , `Description`], + expirationTime: [, __serializeFloat, `ExpirationTime`], + openIDAuthTTL: [, , `OpenIDAuthTTL`], + openIDClientId: [, , `OpenIDClientId`], + openIDIatTTL: [, , `OpenIDIatTTL`], + openIDIssueURL: [, , `OpenIDIssueURL`], + openIDProviderName: [, , `OpenIDProviderName`], + }); }; /** * serializeAws_restJson1BackendAPIAuthType */ const se_BackendAPIAuthType = (input: BackendAPIAuthType, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { mode: input.Mode }), - ...(input.Settings != null && { settings: se_BackendAPIAppSyncAuthSettings(input.Settings, context) }), - }; + return take(input, { + mode: [, , `Mode`], + settings: [, (_) => se_BackendAPIAppSyncAuthSettings(_, context), `Settings`], + }); }; /** * serializeAws_restJson1BackendAPIConflictResolution */ const se_BackendAPIConflictResolution = (input: BackendAPIConflictResolution, context: __SerdeContext): any => { - return { - ...(input.ResolutionStrategy != null && { resolutionStrategy: input.ResolutionStrategy }), - }; + return take(input, { + resolutionStrategy: [, , `ResolutionStrategy`], + }); }; /** * serializeAws_restJson1BackendAPIResourceConfig */ const se_BackendAPIResourceConfig = (input: BackendAPIResourceConfig, context: __SerdeContext): any => { - return { - ...(input.AdditionalAuthTypes != null && { - additionalAuthTypes: se_ListOfBackendAPIAuthType(input.AdditionalAuthTypes, context), - }), - ...(input.ApiName != null && { apiName: input.ApiName }), - ...(input.ConflictResolution != null && { - conflictResolution: se_BackendAPIConflictResolution(input.ConflictResolution, context), - }), - ...(input.DefaultAuthType != null && { defaultAuthType: se_BackendAPIAuthType(input.DefaultAuthType, context) }), - ...(input.Service != null && { service: input.Service }), - ...(input.TransformSchema != null && { transformSchema: input.TransformSchema }), - }; + return take(input, { + additionalAuthTypes: [, (_) => se_ListOfBackendAPIAuthType(_, context), `AdditionalAuthTypes`], + apiName: [, , `ApiName`], + conflictResolution: [, (_) => se_BackendAPIConflictResolution(_, context), `ConflictResolution`], + defaultAuthType: [, (_) => se_BackendAPIAuthType(_, context), `DefaultAuthType`], + service: [, , `Service`], + transformSchema: [, , `TransformSchema`], + }); }; /** * serializeAws_restJson1BackendAuthAppleProviderConfig */ const se_BackendAuthAppleProviderConfig = (input: BackendAuthAppleProviderConfig, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { client_id: input.ClientId }), - ...(input.KeyId != null && { key_id: input.KeyId }), - ...(input.PrivateKey != null && { private_key: input.PrivateKey }), - ...(input.TeamId != null && { team_id: input.TeamId }), - }; + return take(input, { + client_id: [, , `ClientId`], + key_id: [, , `KeyId`], + private_key: [, , `PrivateKey`], + team_id: [, , `TeamId`], + }); }; /** * serializeAws_restJson1BackendAuthSocialProviderConfig */ const se_BackendAuthSocialProviderConfig = (input: BackendAuthSocialProviderConfig, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { client_id: input.ClientId }), - ...(input.ClientSecret != null && { client_secret: input.ClientSecret }), - }; + return take(input, { + client_id: [, , `ClientId`], + client_secret: [, , `ClientSecret`], + }); }; /** * serializeAws_restJson1BackendStoragePermissions */ const se_BackendStoragePermissions = (input: BackendStoragePermissions, context: __SerdeContext): any => { - return { - ...(input.Authenticated != null && { authenticated: se_ListOfAuthenticatedElement(input.Authenticated, context) }), - ...(input.UnAuthenticated != null && { - unAuthenticated: se_ListOfUnAuthenticatedElement(input.UnAuthenticated, context), - }), - }; + return take(input, { + authenticated: [, _json, `Authenticated`], + unAuthenticated: [, _json, `UnAuthenticated`], + }); }; /** @@ -3444,11 +3246,11 @@ const se_CreateBackendAuthForgotPasswordConfig = ( input: CreateBackendAuthForgotPasswordConfig, context: __SerdeContext ): any => { - return { - ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }), - ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }), - ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }), - }; + return take(input, { + deliveryMethod: [, , `DeliveryMethod`], + emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`], + smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`], + }); }; /** @@ -3458,40 +3260,34 @@ const se_CreateBackendAuthIdentityPoolConfig = ( input: CreateBackendAuthIdentityPoolConfig, context: __SerdeContext ): any => { - return { - ...(input.IdentityPoolName != null && { identityPoolName: input.IdentityPoolName }), - ...(input.UnauthenticatedLogin != null && { unauthenticatedLogin: input.UnauthenticatedLogin }), - }; + return take(input, { + identityPoolName: [, , `IdentityPoolName`], + unauthenticatedLogin: [, , `UnauthenticatedLogin`], + }); }; /** * serializeAws_restJson1CreateBackendAuthMFAConfig */ const se_CreateBackendAuthMFAConfig = (input: CreateBackendAuthMFAConfig, context: __SerdeContext): any => { - return { - ...(input.MFAMode != null && { MFAMode: input.MFAMode }), - ...(input.Settings != null && { settings: se_Settings(input.Settings, context) }), - }; + return take(input, { + MFAMode: [], + settings: [, (_) => se_Settings(_, context), `Settings`], + }); }; /** * serializeAws_restJson1CreateBackendAuthOAuthConfig */ const se_CreateBackendAuthOAuthConfig = (input: CreateBackendAuthOAuthConfig, context: __SerdeContext): any => { - return { - ...(input.DomainPrefix != null && { domainPrefix: input.DomainPrefix }), - ...(input.OAuthGrantType != null && { oAuthGrantType: input.OAuthGrantType }), - ...(input.OAuthScopes != null && { oAuthScopes: se_ListOfOAuthScopesElement(input.OAuthScopes, context) }), - ...(input.RedirectSignInURIs != null && { - redirectSignInURIs: se_ListOf__string(input.RedirectSignInURIs, context), - }), - ...(input.RedirectSignOutURIs != null && { - redirectSignOutURIs: se_ListOf__string(input.RedirectSignOutURIs, context), - }), - ...(input.SocialProviderSettings != null && { - socialProviderSettings: se_SocialProviderSettings(input.SocialProviderSettings, context), - }), - }; + return take(input, { + domainPrefix: [, , `DomainPrefix`], + oAuthGrantType: [, , `OAuthGrantType`], + oAuthScopes: [, _json, `OAuthScopes`], + redirectSignInURIs: [, _json, `RedirectSignInURIs`], + redirectSignOutURIs: [, _json, `RedirectSignOutURIs`], + socialProviderSettings: [, (_) => se_SocialProviderSettings(_, context), `SocialProviderSettings`], + }); }; /** @@ -3501,52 +3297,38 @@ const se_CreateBackendAuthPasswordPolicyConfig = ( input: CreateBackendAuthPasswordPolicyConfig, context: __SerdeContext ): any => { - return { - ...(input.AdditionalConstraints != null && { - additionalConstraints: se_ListOfAdditionalConstraintsElement(input.AdditionalConstraints, context), - }), - ...(input.MinimumLength != null && { minimumLength: __serializeFloat(input.MinimumLength) }), - }; + return take(input, { + additionalConstraints: [, _json, `AdditionalConstraints`], + minimumLength: [, __serializeFloat, `MinimumLength`], + }); }; /** * serializeAws_restJson1CreateBackendAuthResourceConfig */ const se_CreateBackendAuthResourceConfig = (input: CreateBackendAuthResourceConfig, context: __SerdeContext): any => { - return { - ...(input.AuthResources != null && { authResources: input.AuthResources }), - ...(input.IdentityPoolConfigs != null && { - identityPoolConfigs: se_CreateBackendAuthIdentityPoolConfig(input.IdentityPoolConfigs, context), - }), - ...(input.Service != null && { service: input.Service }), - ...(input.UserPoolConfigs != null && { - userPoolConfigs: se_CreateBackendAuthUserPoolConfig(input.UserPoolConfigs, context), - }), - }; + return take(input, { + authResources: [, , `AuthResources`], + identityPoolConfigs: [, (_) => se_CreateBackendAuthIdentityPoolConfig(_, context), `IdentityPoolConfigs`], + service: [, , `Service`], + userPoolConfigs: [, (_) => se_CreateBackendAuthUserPoolConfig(_, context), `UserPoolConfigs`], + }); }; /** * serializeAws_restJson1CreateBackendAuthUserPoolConfig */ const se_CreateBackendAuthUserPoolConfig = (input: CreateBackendAuthUserPoolConfig, context: __SerdeContext): any => { - return { - ...(input.ForgotPassword != null && { - forgotPassword: se_CreateBackendAuthForgotPasswordConfig(input.ForgotPassword, context), - }), - ...(input.Mfa != null && { mfa: se_CreateBackendAuthMFAConfig(input.Mfa, context) }), - ...(input.OAuth != null && { oAuth: se_CreateBackendAuthOAuthConfig(input.OAuth, context) }), - ...(input.PasswordPolicy != null && { - passwordPolicy: se_CreateBackendAuthPasswordPolicyConfig(input.PasswordPolicy, context), - }), - ...(input.RequiredSignUpAttributes != null && { - requiredSignUpAttributes: se_ListOfRequiredSignUpAttributesElement(input.RequiredSignUpAttributes, context), - }), - ...(input.SignInMethod != null && { signInMethod: input.SignInMethod }), - ...(input.UserPoolName != null && { userPoolName: input.UserPoolName }), - ...(input.VerificationMessage != null && { - verificationMessage: se_CreateBackendAuthVerificationMessageConfig(input.VerificationMessage, context), - }), - }; + return take(input, { + forgotPassword: [, (_) => se_CreateBackendAuthForgotPasswordConfig(_, context), `ForgotPassword`], + mfa: [, (_) => se_CreateBackendAuthMFAConfig(_, context), `Mfa`], + oAuth: [, (_) => se_CreateBackendAuthOAuthConfig(_, context), `OAuth`], + passwordPolicy: [, (_) => se_CreateBackendAuthPasswordPolicyConfig(_, context), `PasswordPolicy`], + requiredSignUpAttributes: [, _json, `RequiredSignUpAttributes`], + signInMethod: [, , `SignInMethod`], + userPoolName: [, , `UserPoolName`], + verificationMessage: [, (_) => se_CreateBackendAuthVerificationMessageConfig(_, context), `VerificationMessage`], + }); }; /** @@ -3556,11 +3338,11 @@ const se_CreateBackendAuthVerificationMessageConfig = ( input: CreateBackendAuthVerificationMessageConfig, context: __SerdeContext ): any => { - return { - ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }), - ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }), - ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }), - }; + return take(input, { + deliveryMethod: [, , `DeliveryMethod`], + emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`], + smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`], + }); }; /** @@ -3570,58 +3352,28 @@ const se_CreateBackendStorageResourceConfig = ( input: CreateBackendStorageResourceConfig, context: __SerdeContext ): any => { - return { - ...(input.BucketName != null && { bucketName: input.BucketName }), - ...(input.Permissions != null && { permissions: se_BackendStoragePermissions(input.Permissions, context) }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - }; + return take(input, { + bucketName: [, , `BucketName`], + permissions: [, (_) => se_BackendStoragePermissions(_, context), `Permissions`], + serviceName: [, , `ServiceName`], + }); }; /** * serializeAws_restJson1EmailSettings */ const se_EmailSettings = (input: EmailSettings, context: __SerdeContext): any => { - return { - ...(input.EmailMessage != null && { emailMessage: input.EmailMessage }), - ...(input.EmailSubject != null && { emailSubject: input.EmailSubject }), - }; + return take(input, { + emailMessage: [, , `EmailMessage`], + emailSubject: [, , `EmailSubject`], + }); }; -/** - * serializeAws_restJson1ListOf__string - */ -const se_ListOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOf__string omitted. -/** - * serializeAws_restJson1ListOfAdditionalConstraintsElement - */ -const se_ListOfAdditionalConstraintsElement = ( - input: (AdditionalConstraintsElement | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfAdditionalConstraintsElement omitted. -/** - * serializeAws_restJson1ListOfAuthenticatedElement - */ -const se_ListOfAuthenticatedElement = (input: (AuthenticatedElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfAuthenticatedElement omitted. /** * serializeAws_restJson1ListOfBackendAPIAuthType @@ -3634,105 +3386,57 @@ const se_ListOfBackendAPIAuthType = (input: BackendAPIAuthType[], context: __Ser }); }; -/** - * serializeAws_restJson1ListOfMfaTypesElement - */ -const se_ListOfMfaTypesElement = (input: (MfaTypesElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfMfaTypesElement omitted. -/** - * serializeAws_restJson1ListOfOAuthScopesElement - */ -const se_ListOfOAuthScopesElement = (input: (OAuthScopesElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfOAuthScopesElement omitted. -/** - * serializeAws_restJson1ListOfRequiredSignUpAttributesElement - */ -const se_ListOfRequiredSignUpAttributesElement = ( - input: (RequiredSignUpAttributesElement | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfRequiredSignUpAttributesElement omitted. -/** - * serializeAws_restJson1ListOfUnAuthenticatedElement - */ -const se_ListOfUnAuthenticatedElement = (input: (UnAuthenticatedElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfUnAuthenticatedElement omitted. /** * serializeAws_restJson1LoginAuthConfigReqObj */ const se_LoginAuthConfigReqObj = (input: LoginAuthConfigReqObj, context: __SerdeContext): any => { - return { - ...(input.AwsCognitoIdentityPoolId != null && { aws_cognito_identity_pool_id: input.AwsCognitoIdentityPoolId }), - ...(input.AwsCognitoRegion != null && { aws_cognito_region: input.AwsCognitoRegion }), - ...(input.AwsUserPoolsId != null && { aws_user_pools_id: input.AwsUserPoolsId }), - ...(input.AwsUserPoolsWebClientId != null && { aws_user_pools_web_client_id: input.AwsUserPoolsWebClientId }), - }; + return take(input, { + aws_cognito_identity_pool_id: [, , `AwsCognitoIdentityPoolId`], + aws_cognito_region: [, , `AwsCognitoRegion`], + aws_user_pools_id: [, , `AwsUserPoolsId`], + aws_user_pools_web_client_id: [, , `AwsUserPoolsWebClientId`], + }); }; -/** - * serializeAws_restJson1ResourceConfig - */ -const se_ResourceConfig = (input: ResourceConfig, context: __SerdeContext): any => { - return {}; -}; +// se_ResourceConfig omitted. /** * serializeAws_restJson1Settings */ const se_Settings = (input: Settings, context: __SerdeContext): any => { - return { - ...(input.MfaTypes != null && { mfaTypes: se_ListOfMfaTypesElement(input.MfaTypes, context) }), - ...(input.SmsMessage != null && { smsMessage: input.SmsMessage }), - }; + return take(input, { + mfaTypes: [, _json, `MfaTypes`], + smsMessage: [, , `SmsMessage`], + }); }; /** * serializeAws_restJson1SmsSettings */ const se_SmsSettings = (input: SmsSettings, context: __SerdeContext): any => { - return { - ...(input.SmsMessage != null && { smsMessage: input.SmsMessage }), - }; + return take(input, { + smsMessage: [, , `SmsMessage`], + }); }; /** * serializeAws_restJson1SocialProviderSettings */ const se_SocialProviderSettings = (input: SocialProviderSettings, context: __SerdeContext): any => { - return { - ...(input.Facebook != null && { Facebook: se_BackendAuthSocialProviderConfig(input.Facebook, context) }), - ...(input.Google != null && { Google: se_BackendAuthSocialProviderConfig(input.Google, context) }), - ...(input.LoginWithAmazon != null && { - LoginWithAmazon: se_BackendAuthSocialProviderConfig(input.LoginWithAmazon, context), - }), - ...(input.SignInWithApple != null && { - SignInWithApple: se_BackendAuthAppleProviderConfig(input.SignInWithApple, context), - }), - }; + return take(input, { + Facebook: (_) => se_BackendAuthSocialProviderConfig(_, context), + Google: (_) => se_BackendAuthSocialProviderConfig(_, context), + LoginWithAmazon: (_) => se_BackendAuthSocialProviderConfig(_, context), + SignInWithApple: (_) => se_BackendAuthAppleProviderConfig(_, context), + }); }; /** @@ -3742,11 +3446,11 @@ const se_UpdateBackendAuthForgotPasswordConfig = ( input: UpdateBackendAuthForgotPasswordConfig, context: __SerdeContext ): any => { - return { - ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }), - ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }), - ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }), - }; + return take(input, { + deliveryMethod: [, , `DeliveryMethod`], + emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`], + smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`], + }); }; /** @@ -3756,39 +3460,33 @@ const se_UpdateBackendAuthIdentityPoolConfig = ( input: UpdateBackendAuthIdentityPoolConfig, context: __SerdeContext ): any => { - return { - ...(input.UnauthenticatedLogin != null && { unauthenticatedLogin: input.UnauthenticatedLogin }), - }; + return take(input, { + unauthenticatedLogin: [, , `UnauthenticatedLogin`], + }); }; /** * serializeAws_restJson1UpdateBackendAuthMFAConfig */ const se_UpdateBackendAuthMFAConfig = (input: UpdateBackendAuthMFAConfig, context: __SerdeContext): any => { - return { - ...(input.MFAMode != null && { MFAMode: input.MFAMode }), - ...(input.Settings != null && { settings: se_Settings(input.Settings, context) }), - }; + return take(input, { + MFAMode: [], + settings: [, (_) => se_Settings(_, context), `Settings`], + }); }; /** * serializeAws_restJson1UpdateBackendAuthOAuthConfig */ const se_UpdateBackendAuthOAuthConfig = (input: UpdateBackendAuthOAuthConfig, context: __SerdeContext): any => { - return { - ...(input.DomainPrefix != null && { domainPrefix: input.DomainPrefix }), - ...(input.OAuthGrantType != null && { oAuthGrantType: input.OAuthGrantType }), - ...(input.OAuthScopes != null && { oAuthScopes: se_ListOfOAuthScopesElement(input.OAuthScopes, context) }), - ...(input.RedirectSignInURIs != null && { - redirectSignInURIs: se_ListOf__string(input.RedirectSignInURIs, context), - }), - ...(input.RedirectSignOutURIs != null && { - redirectSignOutURIs: se_ListOf__string(input.RedirectSignOutURIs, context), - }), - ...(input.SocialProviderSettings != null && { - socialProviderSettings: se_SocialProviderSettings(input.SocialProviderSettings, context), - }), - }; + return take(input, { + domainPrefix: [, , `DomainPrefix`], + oAuthGrantType: [, , `OAuthGrantType`], + oAuthScopes: [, _json, `OAuthScopes`], + redirectSignInURIs: [, _json, `RedirectSignInURIs`], + redirectSignOutURIs: [, _json, `RedirectSignOutURIs`], + socialProviderSettings: [, (_) => se_SocialProviderSettings(_, context), `SocialProviderSettings`], + }); }; /** @@ -3798,47 +3496,35 @@ const se_UpdateBackendAuthPasswordPolicyConfig = ( input: UpdateBackendAuthPasswordPolicyConfig, context: __SerdeContext ): any => { - return { - ...(input.AdditionalConstraints != null && { - additionalConstraints: se_ListOfAdditionalConstraintsElement(input.AdditionalConstraints, context), - }), - ...(input.MinimumLength != null && { minimumLength: __serializeFloat(input.MinimumLength) }), - }; + return take(input, { + additionalConstraints: [, _json, `AdditionalConstraints`], + minimumLength: [, __serializeFloat, `MinimumLength`], + }); }; /** * serializeAws_restJson1UpdateBackendAuthResourceConfig */ const se_UpdateBackendAuthResourceConfig = (input: UpdateBackendAuthResourceConfig, context: __SerdeContext): any => { - return { - ...(input.AuthResources != null && { authResources: input.AuthResources }), - ...(input.IdentityPoolConfigs != null && { - identityPoolConfigs: se_UpdateBackendAuthIdentityPoolConfig(input.IdentityPoolConfigs, context), - }), - ...(input.Service != null && { service: input.Service }), - ...(input.UserPoolConfigs != null && { - userPoolConfigs: se_UpdateBackendAuthUserPoolConfig(input.UserPoolConfigs, context), - }), - }; + return take(input, { + authResources: [, , `AuthResources`], + identityPoolConfigs: [, (_) => se_UpdateBackendAuthIdentityPoolConfig(_, context), `IdentityPoolConfigs`], + service: [, , `Service`], + userPoolConfigs: [, (_) => se_UpdateBackendAuthUserPoolConfig(_, context), `UserPoolConfigs`], + }); }; /** * serializeAws_restJson1UpdateBackendAuthUserPoolConfig */ const se_UpdateBackendAuthUserPoolConfig = (input: UpdateBackendAuthUserPoolConfig, context: __SerdeContext): any => { - return { - ...(input.ForgotPassword != null && { - forgotPassword: se_UpdateBackendAuthForgotPasswordConfig(input.ForgotPassword, context), - }), - ...(input.Mfa != null && { mfa: se_UpdateBackendAuthMFAConfig(input.Mfa, context) }), - ...(input.OAuth != null && { oAuth: se_UpdateBackendAuthOAuthConfig(input.OAuth, context) }), - ...(input.PasswordPolicy != null && { - passwordPolicy: se_UpdateBackendAuthPasswordPolicyConfig(input.PasswordPolicy, context), - }), - ...(input.VerificationMessage != null && { - verificationMessage: se_UpdateBackendAuthVerificationMessageConfig(input.VerificationMessage, context), - }), - }; + return take(input, { + forgotPassword: [, (_) => se_UpdateBackendAuthForgotPasswordConfig(_, context), `ForgotPassword`], + mfa: [, (_) => se_UpdateBackendAuthMFAConfig(_, context), `Mfa`], + oAuth: [, (_) => se_UpdateBackendAuthOAuthConfig(_, context), `OAuth`], + passwordPolicy: [, (_) => se_UpdateBackendAuthPasswordPolicyConfig(_, context), `PasswordPolicy`], + verificationMessage: [, (_) => se_UpdateBackendAuthVerificationMessageConfig(_, context), `VerificationMessage`], + }); }; /** @@ -3848,11 +3534,11 @@ const se_UpdateBackendAuthVerificationMessageConfig = ( input: UpdateBackendAuthVerificationMessageConfig, context: __SerdeContext ): any => { - return { - ...(input.DeliveryMethod != null && { deliveryMethod: input.DeliveryMethod }), - ...(input.EmailSettings != null && { emailSettings: se_EmailSettings(input.EmailSettings, context) }), - ...(input.SmsSettings != null && { smsSettings: se_SmsSettings(input.SmsSettings, context) }), - }; + return take(input, { + deliveryMethod: [, , `DeliveryMethod`], + emailSettings: [, (_) => se_EmailSettings(_, context), `EmailSettings`], + smsSettings: [, (_) => se_SmsSettings(_, context), `SmsSettings`], + }); }; /** @@ -3862,114 +3548,107 @@ const se_UpdateBackendStorageResourceConfig = ( input: UpdateBackendStorageResourceConfig, context: __SerdeContext ): any => { - return { - ...(input.Permissions != null && { permissions: se_BackendStoragePermissions(input.Permissions, context) }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - }; + return take(input, { + permissions: [, (_) => se_BackendStoragePermissions(_, context), `Permissions`], + serviceName: [, , `ServiceName`], + }); }; /** * deserializeAws_restJson1BackendAPIAppSyncAuthSettings */ const de_BackendAPIAppSyncAuthSettings = (output: any, context: __SerdeContext): BackendAPIAppSyncAuthSettings => { - return { - CognitoUserPoolId: __expectString(output.cognitoUserPoolId), - Description: __expectString(output.description), - ExpirationTime: __limitedParseDouble(output.expirationTime), - OpenIDAuthTTL: __expectString(output.openIDAuthTTL), - OpenIDClientId: __expectString(output.openIDClientId), - OpenIDIatTTL: __expectString(output.openIDIatTTL), - OpenIDIssueURL: __expectString(output.openIDIssueURL), - OpenIDProviderName: __expectString(output.openIDProviderName), - } as any; + return take(output, { + CognitoUserPoolId: [, __expectString, `cognitoUserPoolId`], + Description: [, __expectString, `description`], + ExpirationTime: [, __limitedParseDouble, `expirationTime`], + OpenIDAuthTTL: [, __expectString, `openIDAuthTTL`], + OpenIDClientId: [, __expectString, `openIDClientId`], + OpenIDIatTTL: [, __expectString, `openIDIatTTL`], + OpenIDIssueURL: [, __expectString, `openIDIssueURL`], + OpenIDProviderName: [, __expectString, `openIDProviderName`], + }) as any; }; /** * deserializeAws_restJson1BackendAPIAuthType */ const de_BackendAPIAuthType = (output: any, context: __SerdeContext): BackendAPIAuthType => { - return { - Mode: __expectString(output.mode), - Settings: output.settings != null ? de_BackendAPIAppSyncAuthSettings(output.settings, context) : undefined, - } as any; + return take(output, { + Mode: [, __expectString, `mode`], + Settings: (_) => [, de_BackendAPIAppSyncAuthSettings(_, context), `settings`], + }) as any; }; /** * deserializeAws_restJson1BackendAPIConflictResolution */ const de_BackendAPIConflictResolution = (output: any, context: __SerdeContext): BackendAPIConflictResolution => { - return { - ResolutionStrategy: __expectString(output.resolutionStrategy), - } as any; + return take(output, { + ResolutionStrategy: [, __expectString, `resolutionStrategy`], + }) as any; }; /** * deserializeAws_restJson1BackendAPIResourceConfig */ const de_BackendAPIResourceConfig = (output: any, context: __SerdeContext): BackendAPIResourceConfig => { - return { - AdditionalAuthTypes: - output.additionalAuthTypes != null ? de_ListOfBackendAPIAuthType(output.additionalAuthTypes, context) : undefined, - ApiName: __expectString(output.apiName), - ConflictResolution: - output.conflictResolution != null - ? de_BackendAPIConflictResolution(output.conflictResolution, context) - : undefined, - DefaultAuthType: - output.defaultAuthType != null ? de_BackendAPIAuthType(output.defaultAuthType, context) : undefined, - Service: __expectString(output.service), - TransformSchema: __expectString(output.transformSchema), - } as any; + return take(output, { + AdditionalAuthTypes: (_) => [, de_ListOfBackendAPIAuthType(_, context), `additionalAuthTypes`], + ApiName: [, __expectString, `apiName`], + ConflictResolution: (_) => [, de_BackendAPIConflictResolution(_, context), `conflictResolution`], + DefaultAuthType: (_) => [, de_BackendAPIAuthType(_, context), `defaultAuthType`], + Service: [, __expectString, `service`], + TransformSchema: [, __expectString, `transformSchema`], + }) as any; }; /** * deserializeAws_restJson1BackendAuthAppleProviderConfig */ const de_BackendAuthAppleProviderConfig = (output: any, context: __SerdeContext): BackendAuthAppleProviderConfig => { - return { - ClientId: __expectString(output.client_id), - KeyId: __expectString(output.key_id), - PrivateKey: __expectString(output.private_key), - TeamId: __expectString(output.team_id), - } as any; + return take(output, { + ClientId: [, __expectString, `client_id`], + KeyId: [, __expectString, `key_id`], + PrivateKey: [, __expectString, `private_key`], + TeamId: [, __expectString, `team_id`], + }) as any; }; /** * deserializeAws_restJson1BackendAuthSocialProviderConfig */ const de_BackendAuthSocialProviderConfig = (output: any, context: __SerdeContext): BackendAuthSocialProviderConfig => { - return { - ClientId: __expectString(output.client_id), - ClientSecret: __expectString(output.client_secret), - } as any; + return take(output, { + ClientId: [, __expectString, `client_id`], + ClientSecret: [, __expectString, `client_secret`], + }) as any; }; /** * deserializeAws_restJson1BackendJobRespObj */ const de_BackendJobRespObj = (output: any, context: __SerdeContext): BackendJobRespObj => { - return { - AppId: __expectString(output.appId), - BackendEnvironmentName: __expectString(output.backendEnvironmentName), - CreateTime: __expectString(output.createTime), - Error: __expectString(output.error), - JobId: __expectString(output.jobId), - Operation: __expectString(output.operation), - Status: __expectString(output.status), - UpdateTime: __expectString(output.updateTime), - } as any; + return take(output, { + AppId: [, __expectString, `appId`], + BackendEnvironmentName: [, __expectString, `backendEnvironmentName`], + CreateTime: [, __expectString, `createTime`], + Error: [, __expectString, `error`], + JobId: [, __expectString, `jobId`], + Operation: [, __expectString, `operation`], + Status: [, __expectString, `status`], + UpdateTime: [, __expectString, `updateTime`], + }) as any; }; /** * deserializeAws_restJson1BackendStoragePermissions */ const de_BackendStoragePermissions = (output: any, context: __SerdeContext): BackendStoragePermissions => { - return { - Authenticated: - output.authenticated != null ? de_ListOfAuthenticatedElement(output.authenticated, context) : undefined, - UnAuthenticated: - output.unAuthenticated != null ? de_ListOfUnAuthenticatedElement(output.unAuthenticated, context) : undefined, - } as any; + return take(output, { + Authenticated: [, _json, `authenticated`], + UnAuthenticated: [, _json, `unAuthenticated`], + }) as any; }; /** @@ -3979,11 +3658,11 @@ const de_CreateBackendAuthForgotPasswordConfig = ( output: any, context: __SerdeContext ): CreateBackendAuthForgotPasswordConfig => { - return { - DeliveryMethod: __expectString(output.deliveryMethod), - EmailSettings: output.emailSettings != null ? de_EmailSettings(output.emailSettings, context) : undefined, - SmsSettings: output.smsSettings != null ? de_SmsSettings(output.smsSettings, context) : undefined, - } as any; + return take(output, { + DeliveryMethod: [, __expectString, `deliveryMethod`], + EmailSettings: (_) => [, de_EmailSettings(_, context), `emailSettings`], + SmsSettings: (_) => [, de_SmsSettings(_, context), `smsSettings`], + }) as any; }; /** @@ -3993,39 +3672,34 @@ const de_CreateBackendAuthIdentityPoolConfig = ( output: any, context: __SerdeContext ): CreateBackendAuthIdentityPoolConfig => { - return { - IdentityPoolName: __expectString(output.identityPoolName), - UnauthenticatedLogin: __expectBoolean(output.unauthenticatedLogin), - } as any; + return take(output, { + IdentityPoolName: [, __expectString, `identityPoolName`], + UnauthenticatedLogin: [, __expectBoolean, `unauthenticatedLogin`], + }) as any; }; /** * deserializeAws_restJson1CreateBackendAuthMFAConfig */ const de_CreateBackendAuthMFAConfig = (output: any, context: __SerdeContext): CreateBackendAuthMFAConfig => { - return { - MFAMode: __expectString(output.MFAMode), - Settings: output.settings != null ? de_Settings(output.settings, context) : undefined, - } as any; + return take(output, { + MFAMode: __expectString, + Settings: (_) => [, de_Settings(_, context), `settings`], + }) as any; }; /** * deserializeAws_restJson1CreateBackendAuthOAuthConfig */ const de_CreateBackendAuthOAuthConfig = (output: any, context: __SerdeContext): CreateBackendAuthOAuthConfig => { - return { - DomainPrefix: __expectString(output.domainPrefix), - OAuthGrantType: __expectString(output.oAuthGrantType), - OAuthScopes: output.oAuthScopes != null ? de_ListOfOAuthScopesElement(output.oAuthScopes, context) : undefined, - RedirectSignInURIs: - output.redirectSignInURIs != null ? de_ListOf__string(output.redirectSignInURIs, context) : undefined, - RedirectSignOutURIs: - output.redirectSignOutURIs != null ? de_ListOf__string(output.redirectSignOutURIs, context) : undefined, - SocialProviderSettings: - output.socialProviderSettings != null - ? de_SocialProviderSettings(output.socialProviderSettings, context) - : undefined, - } as any; + return take(output, { + DomainPrefix: [, __expectString, `domainPrefix`], + OAuthGrantType: [, __expectString, `oAuthGrantType`], + OAuthScopes: [, _json, `oAuthScopes`], + RedirectSignInURIs: [, _json, `redirectSignInURIs`], + RedirectSignOutURIs: [, _json, `redirectSignOutURIs`], + SocialProviderSettings: (_) => [, de_SocialProviderSettings(_, context), `socialProviderSettings`], + }) as any; }; /** @@ -4035,57 +3709,38 @@ const de_CreateBackendAuthPasswordPolicyConfig = ( output: any, context: __SerdeContext ): CreateBackendAuthPasswordPolicyConfig => { - return { - AdditionalConstraints: - output.additionalConstraints != null - ? de_ListOfAdditionalConstraintsElement(output.additionalConstraints, context) - : undefined, - MinimumLength: __limitedParseDouble(output.minimumLength), - } as any; + return take(output, { + AdditionalConstraints: [, _json, `additionalConstraints`], + MinimumLength: [, __limitedParseDouble, `minimumLength`], + }) as any; }; /** * deserializeAws_restJson1CreateBackendAuthResourceConfig */ const de_CreateBackendAuthResourceConfig = (output: any, context: __SerdeContext): CreateBackendAuthResourceConfig => { - return { - AuthResources: __expectString(output.authResources), - IdentityPoolConfigs: - output.identityPoolConfigs != null - ? de_CreateBackendAuthIdentityPoolConfig(output.identityPoolConfigs, context) - : undefined, - Service: __expectString(output.service), - UserPoolConfigs: - output.userPoolConfigs != null ? de_CreateBackendAuthUserPoolConfig(output.userPoolConfigs, context) : undefined, - } as any; + return take(output, { + AuthResources: [, __expectString, `authResources`], + IdentityPoolConfigs: (_) => [, de_CreateBackendAuthIdentityPoolConfig(_, context), `identityPoolConfigs`], + Service: [, __expectString, `service`], + UserPoolConfigs: (_) => [, de_CreateBackendAuthUserPoolConfig(_, context), `userPoolConfigs`], + }) as any; }; /** * deserializeAws_restJson1CreateBackendAuthUserPoolConfig */ const de_CreateBackendAuthUserPoolConfig = (output: any, context: __SerdeContext): CreateBackendAuthUserPoolConfig => { - return { - ForgotPassword: - output.forgotPassword != null - ? de_CreateBackendAuthForgotPasswordConfig(output.forgotPassword, context) - : undefined, - Mfa: output.mfa != null ? de_CreateBackendAuthMFAConfig(output.mfa, context) : undefined, - OAuth: output.oAuth != null ? de_CreateBackendAuthOAuthConfig(output.oAuth, context) : undefined, - PasswordPolicy: - output.passwordPolicy != null - ? de_CreateBackendAuthPasswordPolicyConfig(output.passwordPolicy, context) - : undefined, - RequiredSignUpAttributes: - output.requiredSignUpAttributes != null - ? de_ListOfRequiredSignUpAttributesElement(output.requiredSignUpAttributes, context) - : undefined, - SignInMethod: __expectString(output.signInMethod), - UserPoolName: __expectString(output.userPoolName), - VerificationMessage: - output.verificationMessage != null - ? de_CreateBackendAuthVerificationMessageConfig(output.verificationMessage, context) - : undefined, - } as any; + return take(output, { + ForgotPassword: (_) => [, de_CreateBackendAuthForgotPasswordConfig(_, context), `forgotPassword`], + Mfa: (_) => [, de_CreateBackendAuthMFAConfig(_, context), `mfa`], + OAuth: (_) => [, de_CreateBackendAuthOAuthConfig(_, context), `oAuth`], + PasswordPolicy: (_) => [, de_CreateBackendAuthPasswordPolicyConfig(_, context), `passwordPolicy`], + RequiredSignUpAttributes: [, _json, `requiredSignUpAttributes`], + SignInMethod: [, __expectString, `signInMethod`], + UserPoolName: [, __expectString, `userPoolName`], + VerificationMessage: (_) => [, de_CreateBackendAuthVerificationMessageConfig(_, context), `verificationMessage`], + }) as any; }; /** @@ -4095,82 +3750,40 @@ const de_CreateBackendAuthVerificationMessageConfig = ( output: any, context: __SerdeContext ): CreateBackendAuthVerificationMessageConfig => { - return { - DeliveryMethod: __expectString(output.deliveryMethod), - EmailSettings: output.emailSettings != null ? de_EmailSettings(output.emailSettings, context) : undefined, - SmsSettings: output.smsSettings != null ? de_SmsSettings(output.smsSettings, context) : undefined, - } as any; + return take(output, { + DeliveryMethod: [, __expectString, `deliveryMethod`], + EmailSettings: (_) => [, de_EmailSettings(_, context), `emailSettings`], + SmsSettings: (_) => [, de_SmsSettings(_, context), `smsSettings`], + }) as any; }; /** * deserializeAws_restJson1EmailSettings */ const de_EmailSettings = (output: any, context: __SerdeContext): EmailSettings => { - return { - EmailMessage: __expectString(output.emailMessage), - EmailSubject: __expectString(output.emailSubject), - } as any; + return take(output, { + EmailMessage: [, __expectString, `emailMessage`], + EmailSubject: [, __expectString, `emailSubject`], + }) as any; }; /** * deserializeAws_restJson1GetBackendStorageResourceConfig */ const de_GetBackendStorageResourceConfig = (output: any, context: __SerdeContext): GetBackendStorageResourceConfig => { - return { - BucketName: __expectString(output.bucketName), - Imported: __expectBoolean(output.imported), - Permissions: output.permissions != null ? de_BackendStoragePermissions(output.permissions, context) : undefined, - ServiceName: __expectString(output.serviceName), - } as any; + return take(output, { + BucketName: [, __expectString, `bucketName`], + Imported: [, __expectBoolean, `imported`], + Permissions: (_) => [, de_BackendStoragePermissions(_, context), `permissions`], + ServiceName: [, __expectString, `serviceName`], + }) as any; }; -/** - * deserializeAws_restJson1ListOf__string - */ -const de_ListOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOf__string omitted. -/** - * deserializeAws_restJson1ListOfAdditionalConstraintsElement - */ -const de_ListOfAdditionalConstraintsElement = ( - output: any, - context: __SerdeContext -): (AdditionalConstraintsElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfAdditionalConstraintsElement omitted. -/** - * deserializeAws_restJson1ListOfAuthenticatedElement - */ -const de_ListOfAuthenticatedElement = (output: any, context: __SerdeContext): (AuthenticatedElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfAuthenticatedElement omitted. /** * deserializeAws_restJson1ListOfBackendAPIAuthType @@ -4179,9 +3792,6 @@ const de_ListOfBackendAPIAuthType = (output: any, context: __SerdeContext): Back const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackendAPIAuthType(entry, context); }); return retVal; @@ -4194,61 +3804,16 @@ const de_ListOfBackendJobRespObj = (output: any, context: __SerdeContext): Backe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackendJobRespObj(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfMfaTypesElement - */ -const de_ListOfMfaTypesElement = (output: any, context: __SerdeContext): (MfaTypesElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfMfaTypesElement omitted. -/** - * deserializeAws_restJson1ListOfOAuthScopesElement - */ -const de_ListOfOAuthScopesElement = (output: any, context: __SerdeContext): (OAuthScopesElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfOAuthScopesElement omitted. -/** - * deserializeAws_restJson1ListOfRequiredSignUpAttributesElement - */ -const de_ListOfRequiredSignUpAttributesElement = ( - output: any, - context: __SerdeContext -): (RequiredSignUpAttributesElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfRequiredSignUpAttributesElement omitted. /** * deserializeAws_restJson1ListOfS3BucketInfo @@ -4257,82 +3822,64 @@ const de_ListOfS3BucketInfo = (output: any, context: __SerdeContext): S3BucketIn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_S3BucketInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfUnAuthenticatedElement - */ -const de_ListOfUnAuthenticatedElement = (output: any, context: __SerdeContext): (UnAuthenticatedElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfUnAuthenticatedElement omitted. /** * deserializeAws_restJson1LoginAuthConfigReqObj */ const de_LoginAuthConfigReqObj = (output: any, context: __SerdeContext): LoginAuthConfigReqObj => { - return { - AwsCognitoIdentityPoolId: __expectString(output.aws_cognito_identity_pool_id), - AwsCognitoRegion: __expectString(output.aws_cognito_region), - AwsUserPoolsId: __expectString(output.aws_user_pools_id), - AwsUserPoolsWebClientId: __expectString(output.aws_user_pools_web_client_id), - } as any; + return take(output, { + AwsCognitoIdentityPoolId: [, __expectString, `aws_cognito_identity_pool_id`], + AwsCognitoRegion: [, __expectString, `aws_cognito_region`], + AwsUserPoolsId: [, __expectString, `aws_user_pools_id`], + AwsUserPoolsWebClientId: [, __expectString, `aws_user_pools_web_client_id`], + }) as any; }; /** * deserializeAws_restJson1S3BucketInfo */ const de_S3BucketInfo = (output: any, context: __SerdeContext): S3BucketInfo => { - return { - CreationDate: __expectString(output.creationDate), - Name: __expectString(output.name), - } as any; + return take(output, { + CreationDate: [, __expectString, `creationDate`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1Settings */ const de_Settings = (output: any, context: __SerdeContext): Settings => { - return { - MfaTypes: output.mfaTypes != null ? de_ListOfMfaTypesElement(output.mfaTypes, context) : undefined, - SmsMessage: __expectString(output.smsMessage), - } as any; + return take(output, { + MfaTypes: [, _json, `mfaTypes`], + SmsMessage: [, __expectString, `smsMessage`], + }) as any; }; /** * deserializeAws_restJson1SmsSettings */ const de_SmsSettings = (output: any, context: __SerdeContext): SmsSettings => { - return { - SmsMessage: __expectString(output.smsMessage), - } as any; + return take(output, { + SmsMessage: [, __expectString, `smsMessage`], + }) as any; }; /** * deserializeAws_restJson1SocialProviderSettings */ const de_SocialProviderSettings = (output: any, context: __SerdeContext): SocialProviderSettings => { - return { - Facebook: output.Facebook != null ? de_BackendAuthSocialProviderConfig(output.Facebook, context) : undefined, - Google: output.Google != null ? de_BackendAuthSocialProviderConfig(output.Google, context) : undefined, - LoginWithAmazon: - output.LoginWithAmazon != null ? de_BackendAuthSocialProviderConfig(output.LoginWithAmazon, context) : undefined, - SignInWithApple: - output.SignInWithApple != null ? de_BackendAuthAppleProviderConfig(output.SignInWithApple, context) : undefined, - } as any; + return take(output, { + Facebook: (_: any) => de_BackendAuthSocialProviderConfig(_, context), + Google: (_: any) => de_BackendAuthSocialProviderConfig(_, context), + LoginWithAmazon: (_: any) => de_BackendAuthSocialProviderConfig(_, context), + SignInWithApple: (_: any) => de_BackendAuthAppleProviderConfig(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts b/clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts index 8a56ad1fd91d..5abb9661f4c9 100644 --- a/clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts +++ b/clients/client-amplifyuibuilder/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,11 +11,12 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -60,7 +62,6 @@ import { ComponentEvent, ComponentProperty, ComponentPropertyBindingProperties, - ComponentSummary, ComponentVariant, CreateComponentData, CreateFormData, @@ -82,7 +83,6 @@ import { FormInputValuePropertyBindingProperties, FormStyle, FormStyleConfig, - FormSummary, InternalServerException, InvalidParameterException, MutationActionSetStateParameter, @@ -95,7 +95,6 @@ import { ServiceQuotaExceededException, SortProperty, Theme, - ThemeSummary, ThemeValue, ThemeValues, UnauthorizedException, @@ -361,7 +360,7 @@ export const se_ExchangeCodeForTokenCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "provider", () => input.provider!, "{provider}", false); let body: any; if (input.request !== undefined) { - body = se_ExchangeCodeForTokenRequestBody(input.request, context); + body = _json(input.request); } if (body === undefined) { body = {}; @@ -764,7 +763,7 @@ export const se_PutMetadataFlagCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "featureName", () => input.featureName!, "{featureName}", false); let body: any; if (input.body !== undefined) { - body = se_PutMetadataFlagBody(input.body, context); + body = _json(input.body); } if (body === undefined) { body = {}; @@ -797,7 +796,7 @@ export const se_RefreshTokenCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "provider", () => input.provider!, "{provider}", false); let body: any; if (input.refreshTokenBody !== undefined) { - body = se_RefreshTokenRequestBody(input.refreshTokenBody, context); + body = _json(input.refreshTokenBody); } if (body === undefined) { body = {}; @@ -1000,10 +999,9 @@ const de_CreateComponentCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1054,10 +1052,9 @@ const de_CreateFormCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1108,10 +1105,9 @@ const de_CreateThemeCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1158,10 +1154,9 @@ const de_DeleteComponentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1208,10 +1203,9 @@ const de_DeleteFormCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1258,10 +1252,9 @@ const de_DeleteThemeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1281,15 +1274,12 @@ export const de_ExchangeCodeForTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessToken != null) { - contents.accessToken = __expectString(data.accessToken); - } - if (data.expiresIn != null) { - contents.expiresIn = __expectInt32(data.expiresIn); - } - if (data.refreshToken != null) { - contents.refreshToken = __expectString(data.refreshToken); - } + const doc = take(data, { + accessToken: __expectString, + expiresIn: __expectInt32, + refreshToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1311,10 +1301,9 @@ const de_ExchangeCodeForTokenCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1334,12 +1323,11 @@ export const de_ExportComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entities != null) { - contents.entities = de_ComponentList(data.entities, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entities: (_) => de_ComponentList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1364,10 +1352,9 @@ const de_ExportComponentsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1387,12 +1374,11 @@ export const de_ExportFormsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entities != null) { - contents.entities = de_FormList(data.entities, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entities: (_) => de_FormList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1417,10 +1403,9 @@ const de_ExportFormsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1440,12 +1425,11 @@ export const de_ExportThemesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entities != null) { - contents.entities = de_ThemeList(data.entities, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entities: (_) => de_ThemeList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1470,10 +1454,9 @@ const de_ExportThemesCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1521,10 +1504,9 @@ const de_GetComponentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1572,10 +1554,9 @@ const de_GetFormCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1595,9 +1576,10 @@ export const de_GetMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.features != null) { - contents.features = de_FeaturesMap(data.features, context); - } + const doc = take(data, { + features: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1622,10 +1604,9 @@ const de_GetMetadataCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1673,10 +1654,9 @@ const de_GetThemeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1696,12 +1676,11 @@ export const de_ListComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entities != null) { - contents.entities = de_ComponentSummaryList(data.entities, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entities: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1726,10 +1705,9 @@ const de_ListComponentsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1749,12 +1727,11 @@ export const de_ListFormsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entities != null) { - contents.entities = de_FormSummaryList(data.entities, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entities: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1779,10 +1756,9 @@ const de_ListFormsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1802,12 +1778,11 @@ export const de_ListThemesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entities != null) { - contents.entities = de_ThemeSummaryList(data.entities, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entities: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1832,10 +1807,9 @@ const de_ListThemesCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1879,10 +1853,9 @@ const de_PutMetadataFlagCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1902,12 +1875,11 @@ export const de_RefreshTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessToken != null) { - contents.accessToken = __expectString(data.accessToken); - } - if (data.expiresIn != null) { - contents.expiresIn = __expectInt32(data.expiresIn); - } + const doc = take(data, { + accessToken: __expectString, + expiresIn: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -1929,10 +1901,9 @@ const de_RefreshTokenCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1980,10 +1951,9 @@ const de_UpdateComponentCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2031,10 +2001,9 @@ const de_UpdateFormCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2082,16 +2051,15 @@ const de_UpdateThemeCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServerExceptionRes */ @@ -2101,9 +2069,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2120,9 +2089,10 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2139,9 +2109,10 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2158,9 +2129,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2177,9 +2149,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2196,9 +2169,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2210,17 +2184,17 @@ const de_UnauthorizedExceptionRes = async ( * serializeAws_restJson1ActionParameters */ const se_ActionParameters = (input: ActionParameters, context: __SerdeContext): any => { - return { - ...(input.anchor != null && { anchor: se_ComponentProperty(input.anchor, context) }), - ...(input.fields != null && { fields: se_ComponentProperties(input.fields, context) }), - ...(input.global != null && { global: se_ComponentProperty(input.global, context) }), - ...(input.id != null && { id: se_ComponentProperty(input.id, context) }), - ...(input.model != null && { model: input.model }), - ...(input.state != null && { state: se_MutationActionSetStateParameter(input.state, context) }), - ...(input.target != null && { target: se_ComponentProperty(input.target, context) }), - ...(input.type != null && { type: se_ComponentProperty(input.type, context) }), - ...(input.url != null && { url: se_ComponentProperty(input.url, context) }), - }; + return take(input, { + anchor: (_) => se_ComponentProperty(_, context), + fields: (_) => se_ComponentProperties(_, context), + global: (_) => se_ComponentProperty(_, context), + id: (_) => se_ComponentProperty(_, context), + model: [], + state: (_) => se_MutationActionSetStateParameter(_, context), + target: (_) => se_ComponentProperty(_, context), + type: (_) => se_ComponentProperty(_, context), + url: (_) => se_ComponentProperty(_, context), + }); }; /** @@ -2243,13 +2217,11 @@ const se_ComponentBindingProperties = ( * serializeAws_restJson1ComponentBindingPropertiesValue */ const se_ComponentBindingPropertiesValue = (input: ComponentBindingPropertiesValue, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_ComponentBindingPropertiesValueProperties(input.bindingProperties, context), - }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + bindingProperties: (_) => se_ComponentBindingPropertiesValueProperties(_, context), + defaultValue: [], + type: [], + }); }; /** @@ -2259,30 +2231,30 @@ const se_ComponentBindingPropertiesValueProperties = ( input: ComponentBindingPropertiesValueProperties, context: __SerdeContext ): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.field != null && { field: input.field }), - ...(input.key != null && { key: input.key }), - ...(input.model != null && { model: input.model }), - ...(input.predicates != null && { predicates: se_PredicateList(input.predicates, context) }), - ...(input.slotName != null && { slotName: input.slotName }), - ...(input.userAttribute != null && { userAttribute: input.userAttribute }), - }; + return take(input, { + bucket: [], + defaultValue: [], + field: [], + key: [], + model: [], + predicates: (_) => se_PredicateList(_, context), + slotName: [], + userAttribute: [], + }); }; /** * serializeAws_restJson1ComponentChild */ const se_ComponentChild = (input: ComponentChild, context: __SerdeContext): any => { - return { - ...(input.children != null && { children: se_ComponentChildList(input.children, context) }), - ...(input.componentType != null && { componentType: input.componentType }), - ...(input.events != null && { events: se_ComponentEvents(input.events, context) }), - ...(input.name != null && { name: input.name }), - ...(input.properties != null && { properties: se_ComponentProperties(input.properties, context) }), - ...(input.sourceId != null && { sourceId: input.sourceId }), - }; + return take(input, { + children: (_) => se_ComponentChildList(_, context), + componentType: [], + events: (_) => se_ComponentEvents(_, context), + name: [], + properties: (_) => se_ComponentProperties(_, context), + sourceId: [], + }); }; /** @@ -2316,38 +2288,38 @@ const se_ComponentCollectionProperties = ( * serializeAws_restJson1ComponentConditionProperty */ const se_ComponentConditionProperty = (input: ComponentConditionProperty, context: __SerdeContext): any => { - return { - ...(input.else != null && { else: se_ComponentProperty(input.else, context) }), - ...(input.field != null && { field: input.field }), - ...(input.operand != null && { operand: input.operand }), - ...(input.operandType != null && { operandType: input.operandType }), - ...(input.operator != null && { operator: input.operator }), - ...(input.property != null && { property: input.property }), - ...(input.then != null && { then: se_ComponentProperty(input.then, context) }), - }; + return take(input, { + else: (_) => se_ComponentProperty(_, context), + field: [], + operand: [], + operandType: [], + operator: [], + property: [], + then: (_) => se_ComponentProperty(_, context), + }); }; /** * serializeAws_restJson1ComponentDataConfiguration */ const se_ComponentDataConfiguration = (input: ComponentDataConfiguration, context: __SerdeContext): any => { - return { - ...(input.identifiers != null && { identifiers: se_IdentifierList(input.identifiers, context) }), - ...(input.model != null && { model: input.model }), - ...(input.predicate != null && { predicate: se_Predicate(input.predicate, context) }), - ...(input.sort != null && { sort: se_SortPropertyList(input.sort, context) }), - }; + return take(input, { + identifiers: _json, + model: [], + predicate: (_) => se_Predicate(_, context), + sort: _json, + }); }; /** * serializeAws_restJson1ComponentEvent */ const se_ComponentEvent = (input: ComponentEvent, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.bindingEvent != null && { bindingEvent: input.bindingEvent }), - ...(input.parameters != null && { parameters: se_ActionParameters(input.parameters, context) }), - }; + return take(input, { + action: [], + bindingEvent: [], + parameters: (_) => se_ActionParameters(_, context), + }); }; /** @@ -2363,31 +2335,9 @@ const se_ComponentEvents = (input: Record, context: __Se }, {}); }; -/** - * serializeAws_restJson1ComponentOverrides - */ -const se_ComponentOverrides = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ComponentOverridesValue(value, context); - return acc; - }, {}); -}; +// se_ComponentOverrides omitted. -/** - * serializeAws_restJson1ComponentOverridesValue - */ -const se_ComponentOverridesValue = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ComponentOverridesValue omitted. /** * serializeAws_restJson1ComponentProperties @@ -2406,41 +2356,26 @@ const se_ComponentProperties = (input: Record, contex * serializeAws_restJson1ComponentProperty */ const se_ComponentProperty = (input: ComponentProperty, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_ComponentPropertyBindingProperties(input.bindingProperties, context), - }), - ...(input.bindings != null && { bindings: se_FormBindings(input.bindings, context) }), - ...(input.collectionBindingProperties != null && { - collectionBindingProperties: se_ComponentPropertyBindingProperties(input.collectionBindingProperties, context), - }), - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.concat != null && { concat: se_ComponentPropertyList(input.concat, context) }), - ...(input.condition != null && { condition: se_ComponentConditionProperty(input.condition, context) }), - ...(input.configured != null && { configured: input.configured }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.event != null && { event: input.event }), - ...(input.importedValue != null && { importedValue: input.importedValue }), - ...(input.model != null && { model: input.model }), - ...(input.property != null && { property: input.property }), - ...(input.type != null && { type: input.type }), - ...(input.userAttribute != null && { userAttribute: input.userAttribute }), - ...(input.value != null && { value: input.value }), - }; + return take(input, { + bindingProperties: _json, + bindings: _json, + collectionBindingProperties: _json, + componentName: [], + concat: (_) => se_ComponentPropertyList(_, context), + condition: (_) => se_ComponentConditionProperty(_, context), + configured: [], + defaultValue: [], + event: [], + importedValue: [], + model: [], + property: [], + type: [], + userAttribute: [], + value: [], + }); }; -/** - * serializeAws_restJson1ComponentPropertyBindingProperties - */ -const se_ComponentPropertyBindingProperties = ( - input: ComponentPropertyBindingProperties, - context: __SerdeContext -): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.property != null && { property: input.property }), - }; -}; +// se_ComponentPropertyBindingProperties omitted. /** * serializeAws_restJson1ComponentPropertyList @@ -2453,158 +2388,103 @@ const se_ComponentPropertyList = (input: ComponentProperty[], context: __SerdeCo }); }; -/** - * serializeAws_restJson1ComponentVariant - */ -const se_ComponentVariant = (input: ComponentVariant, context: __SerdeContext): any => { - return { - ...(input.overrides != null && { overrides: se_ComponentOverrides(input.overrides, context) }), - ...(input.variantValues != null && { variantValues: se_ComponentVariantValues(input.variantValues, context) }), - }; -}; +// se_ComponentVariant omitted. -/** - * serializeAws_restJson1ComponentVariants - */ -const se_ComponentVariants = (input: ComponentVariant[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentVariant(entry, context); - }); -}; +// se_ComponentVariants omitted. -/** - * serializeAws_restJson1ComponentVariantValues - */ -const se_ComponentVariantValues = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ComponentVariantValues omitted. /** * serializeAws_restJson1CreateComponentData */ const se_CreateComponentData = (input: CreateComponentData, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_ComponentBindingProperties(input.bindingProperties, context), - }), - ...(input.children != null && { children: se_ComponentChildList(input.children, context) }), - ...(input.collectionProperties != null && { - collectionProperties: se_ComponentCollectionProperties(input.collectionProperties, context), - }), - ...(input.componentType != null && { componentType: input.componentType }), - ...(input.events != null && { events: se_ComponentEvents(input.events, context) }), - ...(input.name != null && { name: input.name }), - ...(input.overrides != null && { overrides: se_ComponentOverrides(input.overrides, context) }), - ...(input.properties != null && { properties: se_ComponentProperties(input.properties, context) }), - ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }), - ...(input.sourceId != null && { sourceId: input.sourceId }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.variants != null && { variants: se_ComponentVariants(input.variants, context) }), - }; + return take(input, { + bindingProperties: (_) => se_ComponentBindingProperties(_, context), + children: (_) => se_ComponentChildList(_, context), + collectionProperties: (_) => se_ComponentCollectionProperties(_, context), + componentType: [], + events: (_) => se_ComponentEvents(_, context), + name: [], + overrides: _json, + properties: (_) => se_ComponentProperties(_, context), + schemaVersion: [], + sourceId: [], + tags: _json, + variants: _json, + }); }; /** * serializeAws_restJson1CreateFormData */ const se_CreateFormData = (input: CreateFormData, context: __SerdeContext): any => { - return { - ...(input.cta != null && { cta: se_FormCTA(input.cta, context) }), - ...(input.dataType != null && { dataType: se_FormDataTypeConfig(input.dataType, context) }), - ...(input.fields != null && { fields: se_FieldsMap(input.fields, context) }), - ...(input.formActionType != null && { formActionType: input.formActionType }), - ...(input.labelDecorator != null && { labelDecorator: input.labelDecorator }), - ...(input.name != null && { name: input.name }), - ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }), - ...(input.sectionalElements != null && { - sectionalElements: se_SectionalElementMap(input.sectionalElements, context), - }), - ...(input.style != null && { style: se_FormStyle(input.style, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; + return take(input, { + cta: _json, + dataType: _json, + fields: (_) => se_FieldsMap(_, context), + formActionType: [], + labelDecorator: [], + name: [], + schemaVersion: [], + sectionalElements: _json, + style: _json, + tags: _json, + }); }; /** * serializeAws_restJson1CreateThemeData */ const se_CreateThemeData = (input: CreateThemeData, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.overrides != null && { overrides: se_ThemeValuesList(input.overrides, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.values != null && { values: se_ThemeValuesList(input.values, context) }), - }; + return take(input, { + name: [], + overrides: (_) => se_ThemeValuesList(_, context), + tags: _json, + values: (_) => se_ThemeValuesList(_, context), + }); }; -/** - * serializeAws_restJson1ExchangeCodeForTokenRequestBody - */ -const se_ExchangeCodeForTokenRequestBody = (input: ExchangeCodeForTokenRequestBody, context: __SerdeContext): any => { - return { - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.code != null && { code: input.code }), - ...(input.redirectUri != null && { redirectUri: input.redirectUri }), - }; -}; +// se_ExchangeCodeForTokenRequestBody omitted. /** * serializeAws_restJson1FieldConfig */ const se_FieldConfig = (input: FieldConfig, context: __SerdeContext): any => { - return { - ...(input.excluded != null && { excluded: input.excluded }), - ...(input.inputType != null && { inputType: se_FieldInputConfig(input.inputType, context) }), - ...(input.label != null && { label: input.label }), - ...(input.position != null && { position: se_FieldPosition(input.position, context) }), - ...(input.validations != null && { validations: se_ValidationsList(input.validations, context) }), - }; + return take(input, { + excluded: [], + inputType: (_) => se_FieldInputConfig(_, context), + label: [], + position: _json, + validations: _json, + }); }; /** * serializeAws_restJson1FieldInputConfig */ const se_FieldInputConfig = (input: FieldInputConfig, context: __SerdeContext): any => { - return { - ...(input.defaultChecked != null && { defaultChecked: input.defaultChecked }), - ...(input.defaultCountryCode != null && { defaultCountryCode: input.defaultCountryCode }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.descriptiveText != null && { descriptiveText: input.descriptiveText }), - ...(input.fileUploaderConfig != null && { - fileUploaderConfig: se_FileUploaderFieldConfig(input.fileUploaderConfig, context), - }), - ...(input.isArray != null && { isArray: input.isArray }), - ...(input.maxValue != null && { maxValue: __serializeFloat(input.maxValue) }), - ...(input.minValue != null && { minValue: __serializeFloat(input.minValue) }), - ...(input.name != null && { name: input.name }), - ...(input.placeholder != null && { placeholder: input.placeholder }), - ...(input.readOnly != null && { readOnly: input.readOnly }), - ...(input.required != null && { required: input.required }), - ...(input.step != null && { step: __serializeFloat(input.step) }), - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - ...(input.valueMappings != null && { valueMappings: se_ValueMappings(input.valueMappings, context) }), - }; -}; - -/** - * serializeAws_restJson1FieldPosition - */ -const se_FieldPosition = (input: FieldPosition, context: __SerdeContext): any => { - return FieldPosition.visit(input, { - below: (value) => ({ below: value }), - fixed: (value) => ({ fixed: value }), - rightOf: (value) => ({ rightOf: value }), - _: (name, value) => ({ name: value } as any), + return take(input, { + defaultChecked: [], + defaultCountryCode: [], + defaultValue: [], + descriptiveText: [], + fileUploaderConfig: _json, + isArray: [], + maxValue: __serializeFloat, + minValue: __serializeFloat, + name: [], + placeholder: [], + readOnly: [], + required: [], + step: __serializeFloat, + type: [], + value: [], + valueMappings: (_) => se_ValueMappings(_, context), }); }; +// se_FieldPosition omitted. + /** * serializeAws_restJson1FieldsMap */ @@ -2618,153 +2498,38 @@ const se_FieldsMap = (input: Record, context: __SerdeContex }, {}); }; -/** - * serializeAws_restJson1FieldValidationConfiguration - */ -const se_FieldValidationConfiguration = (input: FieldValidationConfiguration, context: __SerdeContext): any => { - return { - ...(input.numValues != null && { numValues: se_NumValues(input.numValues, context) }), - ...(input.strValues != null && { strValues: se_StrValues(input.strValues, context) }), - ...(input.type != null && { type: input.type }), - ...(input.validationMessage != null && { validationMessage: input.validationMessage }), - }; -}; +// se_FieldValidationConfiguration omitted. -/** - * serializeAws_restJson1FileUploaderFieldConfig - */ -const se_FileUploaderFieldConfig = (input: FileUploaderFieldConfig, context: __SerdeContext): any => { - return { - ...(input.acceptedFileTypes != null && { acceptedFileTypes: se_StrValues(input.acceptedFileTypes, context) }), - ...(input.accessLevel != null && { accessLevel: input.accessLevel }), - ...(input.isResumable != null && { isResumable: input.isResumable }), - ...(input.maxFileCount != null && { maxFileCount: input.maxFileCount }), - ...(input.maxSize != null && { maxSize: input.maxSize }), - ...(input.showThumbnails != null && { showThumbnails: input.showThumbnails }), - }; -}; +// se_FileUploaderFieldConfig omitted. -/** - * serializeAws_restJson1FormBindingElement - */ -const se_FormBindingElement = (input: FormBindingElement, context: __SerdeContext): any => { - return { - ...(input.element != null && { element: input.element }), - ...(input.property != null && { property: input.property }), - }; -}; +// se_FormBindingElement omitted. -/** - * serializeAws_restJson1FormBindings - */ -const se_FormBindings = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FormBindingElement(value, context); - return acc; - }, {}); -}; +// se_FormBindings omitted. -/** - * serializeAws_restJson1FormButton - */ -const se_FormButton = (input: FormButton, context: __SerdeContext): any => { - return { - ...(input.children != null && { children: input.children }), - ...(input.excluded != null && { excluded: input.excluded }), - ...(input.position != null && { position: se_FieldPosition(input.position, context) }), - }; -}; +// se_FormButton omitted. -/** - * serializeAws_restJson1FormCTA - */ -const se_FormCTA = (input: FormCTA, context: __SerdeContext): any => { - return { - ...(input.cancel != null && { cancel: se_FormButton(input.cancel, context) }), - ...(input.clear != null && { clear: se_FormButton(input.clear, context) }), - ...(input.position != null && { position: input.position }), - ...(input.submit != null && { submit: se_FormButton(input.submit, context) }), - }; -}; +// se_FormCTA omitted. -/** - * serializeAws_restJson1FormDataTypeConfig - */ -const se_FormDataTypeConfig = (input: FormDataTypeConfig, context: __SerdeContext): any => { - return { - ...(input.dataSourceType != null && { dataSourceType: input.dataSourceType }), - ...(input.dataTypeName != null && { dataTypeName: input.dataTypeName }), - }; -}; +// se_FormDataTypeConfig omitted. -/** - * serializeAws_restJson1FormInputBindingProperties - */ -const se_FormInputBindingProperties = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FormInputBindingPropertiesValue(value, context); - return acc; - }, {}); -}; +// se_FormInputBindingProperties omitted. -/** - * serializeAws_restJson1FormInputBindingPropertiesValue - */ -const se_FormInputBindingPropertiesValue = (input: FormInputBindingPropertiesValue, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_FormInputBindingPropertiesValueProperties(input.bindingProperties, context), - }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_FormInputBindingPropertiesValue omitted. -/** - * serializeAws_restJson1FormInputBindingPropertiesValueProperties - */ -const se_FormInputBindingPropertiesValueProperties = ( - input: FormInputBindingPropertiesValueProperties, - context: __SerdeContext -): any => { - return { - ...(input.model != null && { model: input.model }), - }; -}; +// se_FormInputBindingPropertiesValueProperties omitted. /** * serializeAws_restJson1FormInputValueProperty */ const se_FormInputValueProperty = (input: FormInputValueProperty, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_FormInputValuePropertyBindingProperties(input.bindingProperties, context), - }), - ...(input.concat != null && { concat: se_FormInputValuePropertyList(input.concat, context) }), - ...(input.value != null && { value: input.value }), - }; + return take(input, { + bindingProperties: _json, + concat: (_) => se_FormInputValuePropertyList(_, context), + value: [], + }); }; -/** - * serializeAws_restJson1FormInputValuePropertyBindingProperties - */ -const se_FormInputValuePropertyBindingProperties = ( - input: FormInputValuePropertyBindingProperties, - context: __SerdeContext -): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.property != null && { property: input.property }), - }; -}; +// se_FormInputValuePropertyBindingProperties omitted. /** * serializeAws_restJson1FormInputValuePropertyList @@ -2777,73 +2542,37 @@ const se_FormInputValuePropertyList = (input: FormInputValueProperty[], context: }); }; -/** - * serializeAws_restJson1FormStyle - */ -const se_FormStyle = (input: FormStyle, context: __SerdeContext): any => { - return { - ...(input.horizontalGap != null && { horizontalGap: se_FormStyleConfig(input.horizontalGap, context) }), - ...(input.outerPadding != null && { outerPadding: se_FormStyleConfig(input.outerPadding, context) }), - ...(input.verticalGap != null && { verticalGap: se_FormStyleConfig(input.verticalGap, context) }), - }; -}; +// se_FormStyle omitted. -/** - * serializeAws_restJson1FormStyleConfig - */ -const se_FormStyleConfig = (input: FormStyleConfig, context: __SerdeContext): any => { - return FormStyleConfig.visit(input, { - tokenReference: (value) => ({ tokenReference: value }), - value: (value) => ({ value: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_FormStyleConfig omitted. -/** - * serializeAws_restJson1IdentifierList - */ -const se_IdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdentifierList omitted. /** * serializeAws_restJson1MutationActionSetStateParameter */ const se_MutationActionSetStateParameter = (input: MutationActionSetStateParameter, context: __SerdeContext): any => { - return { - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.property != null && { property: input.property }), - ...(input.set != null && { set: se_ComponentProperty(input.set, context) }), - }; + return take(input, { + componentName: [], + property: [], + set: (_) => se_ComponentProperty(_, context), + }); }; -/** - * serializeAws_restJson1NumValues - */ -const se_NumValues = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NumValues omitted. /** * serializeAws_restJson1Predicate */ const se_Predicate = (input: Predicate, context: __SerdeContext): any => { - return { - ...(input.and != null && { and: se_PredicateList(input.and, context) }), - ...(input.field != null && { field: input.field }), - ...(input.operand != null && { operand: input.operand }), - ...(input.operandType != null && { operandType: input.operandType }), - ...(input.operator != null && { operator: input.operator }), - ...(input.or != null && { or: se_PredicateList(input.or, context) }), - }; + return take(input, { + and: (_) => se_PredicateList(_, context), + field: [], + operand: [], + operandType: [], + operator: [], + or: (_) => se_PredicateList(_, context), + }); }; /** @@ -2857,115 +2586,40 @@ const se_PredicateList = (input: Predicate[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1PutMetadataFlagBody - */ -const se_PutMetadataFlagBody = (input: PutMetadataFlagBody, context: __SerdeContext): any => { - return { - ...(input.newValue != null && { newValue: input.newValue }), - }; -}; +// se_PutMetadataFlagBody omitted. -/** - * serializeAws_restJson1RefreshTokenRequestBody - */ -const se_RefreshTokenRequestBody = (input: RefreshTokenRequestBody, context: __SerdeContext): any => { - return { - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.token != null && { token: input.token }), - }; -}; +// se_RefreshTokenRequestBody omitted. -/** - * serializeAws_restJson1SectionalElement - */ -const se_SectionalElement = (input: SectionalElement, context: __SerdeContext): any => { - return { - ...(input.excluded != null && { excluded: input.excluded }), - ...(input.level != null && { level: input.level }), - ...(input.orientation != null && { orientation: input.orientation }), - ...(input.position != null && { position: se_FieldPosition(input.position, context) }), - ...(input.text != null && { text: input.text }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_SectionalElement omitted. -/** - * serializeAws_restJson1SectionalElementMap - */ -const se_SectionalElementMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SectionalElement(value, context); - return acc; - }, {}); -}; +// se_SectionalElementMap omitted. -/** - * serializeAws_restJson1SortProperty - */ -const se_SortProperty = (input: SortProperty, context: __SerdeContext): any => { - return { - ...(input.direction != null && { direction: input.direction }), - ...(input.field != null && { field: input.field }), - }; -}; +// se_SortProperty omitted. -/** - * serializeAws_restJson1SortPropertyList - */ -const se_SortPropertyList = (input: SortProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SortProperty(entry, context); - }); -}; +// se_SortPropertyList omitted. -/** - * serializeAws_restJson1StrValues - */ -const se_StrValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StrValues omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. /** * serializeAws_restJson1ThemeValue */ const se_ThemeValue = (input: ThemeValue, context: __SerdeContext): any => { - return { - ...(input.children != null && { children: se_ThemeValuesList(input.children, context) }), - ...(input.value != null && { value: input.value }), - }; + return take(input, { + children: (_) => se_ThemeValuesList(_, context), + value: [], + }); }; /** * serializeAws_restJson1ThemeValues */ const se_ThemeValues = (input: ThemeValues, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: se_ThemeValue(input.value, context) }), - }; + return take(input, { + key: [], + value: (_) => se_ThemeValue(_, context), + }); }; /** @@ -2983,76 +2637,61 @@ const se_ThemeValuesList = (input: ThemeValues[], context: __SerdeContext): any * serializeAws_restJson1UpdateComponentData */ const se_UpdateComponentData = (input: UpdateComponentData, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_ComponentBindingProperties(input.bindingProperties, context), - }), - ...(input.children != null && { children: se_ComponentChildList(input.children, context) }), - ...(input.collectionProperties != null && { - collectionProperties: se_ComponentCollectionProperties(input.collectionProperties, context), - }), - ...(input.componentType != null && { componentType: input.componentType }), - ...(input.events != null && { events: se_ComponentEvents(input.events, context) }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.overrides != null && { overrides: se_ComponentOverrides(input.overrides, context) }), - ...(input.properties != null && { properties: se_ComponentProperties(input.properties, context) }), - ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }), - ...(input.sourceId != null && { sourceId: input.sourceId }), - ...(input.variants != null && { variants: se_ComponentVariants(input.variants, context) }), - }; + return take(input, { + bindingProperties: (_) => se_ComponentBindingProperties(_, context), + children: (_) => se_ComponentChildList(_, context), + collectionProperties: (_) => se_ComponentCollectionProperties(_, context), + componentType: [], + events: (_) => se_ComponentEvents(_, context), + id: [], + name: [], + overrides: _json, + properties: (_) => se_ComponentProperties(_, context), + schemaVersion: [], + sourceId: [], + variants: _json, + }); }; /** * serializeAws_restJson1UpdateFormData */ const se_UpdateFormData = (input: UpdateFormData, context: __SerdeContext): any => { - return { - ...(input.cta != null && { cta: se_FormCTA(input.cta, context) }), - ...(input.dataType != null && { dataType: se_FormDataTypeConfig(input.dataType, context) }), - ...(input.fields != null && { fields: se_FieldsMap(input.fields, context) }), - ...(input.formActionType != null && { formActionType: input.formActionType }), - ...(input.labelDecorator != null && { labelDecorator: input.labelDecorator }), - ...(input.name != null && { name: input.name }), - ...(input.schemaVersion != null && { schemaVersion: input.schemaVersion }), - ...(input.sectionalElements != null && { - sectionalElements: se_SectionalElementMap(input.sectionalElements, context), - }), - ...(input.style != null && { style: se_FormStyle(input.style, context) }), - }; + return take(input, { + cta: _json, + dataType: _json, + fields: (_) => se_FieldsMap(_, context), + formActionType: [], + labelDecorator: [], + name: [], + schemaVersion: [], + sectionalElements: _json, + style: _json, + }); }; /** * serializeAws_restJson1UpdateThemeData */ const se_UpdateThemeData = (input: UpdateThemeData, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.overrides != null && { overrides: se_ThemeValuesList(input.overrides, context) }), - ...(input.values != null && { values: se_ThemeValuesList(input.values, context) }), - }; + return take(input, { + id: [], + name: [], + overrides: (_) => se_ThemeValuesList(_, context), + values: (_) => se_ThemeValuesList(_, context), + }); }; -/** - * serializeAws_restJson1ValidationsList - */ -const se_ValidationsList = (input: FieldValidationConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldValidationConfiguration(entry, context); - }); -}; +// se_ValidationsList omitted. /** * serializeAws_restJson1ValueMapping */ const se_ValueMapping = (input: ValueMapping, context: __SerdeContext): any => { - return { - ...(input.displayValue != null && { displayValue: se_FormInputValueProperty(input.displayValue, context) }), - ...(input.value != null && { value: se_FormInputValueProperty(input.value, context) }), - }; + return take(input, { + displayValue: (_) => se_FormInputValueProperty(_, context), + value: (_) => se_FormInputValueProperty(_, context), + }); }; /** @@ -3070,60 +2709,52 @@ const se_ValueMappingList = (input: ValueMapping[], context: __SerdeContext): an * serializeAws_restJson1ValueMappings */ const se_ValueMappings = (input: ValueMappings, context: __SerdeContext): any => { - return { - ...(input.bindingProperties != null && { - bindingProperties: se_FormInputBindingProperties(input.bindingProperties, context), - }), - ...(input.values != null && { values: se_ValueMappingList(input.values, context) }), - }; + return take(input, { + bindingProperties: _json, + values: (_) => se_ValueMappingList(_, context), + }); }; /** * deserializeAws_restJson1ActionParameters */ const de_ActionParameters = (output: any, context: __SerdeContext): ActionParameters => { - return { - anchor: output.anchor != null ? de_ComponentProperty(output.anchor, context) : undefined, - fields: output.fields != null ? de_ComponentProperties(output.fields, context) : undefined, - global: output.global != null ? de_ComponentProperty(output.global, context) : undefined, - id: output.id != null ? de_ComponentProperty(output.id, context) : undefined, - model: __expectString(output.model), - state: output.state != null ? de_MutationActionSetStateParameter(output.state, context) : undefined, - target: output.target != null ? de_ComponentProperty(output.target, context) : undefined, - type: output.type != null ? de_ComponentProperty(output.type, context) : undefined, - url: output.url != null ? de_ComponentProperty(output.url, context) : undefined, - } as any; + return take(output, { + anchor: (_: any) => de_ComponentProperty(_, context), + fields: (_: any) => de_ComponentProperties(_, context), + global: (_: any) => de_ComponentProperty(_, context), + id: (_: any) => de_ComponentProperty(_, context), + model: __expectString, + state: (_: any) => de_MutationActionSetStateParameter(_, context), + target: (_: any) => de_ComponentProperty(_, context), + type: (_: any) => de_ComponentProperty(_, context), + url: (_: any) => de_ComponentProperty(_, context), + }) as any; }; /** * deserializeAws_restJson1Component */ const de_Component = (output: any, context: __SerdeContext): Component => { - return { - appId: __expectString(output.appId), - bindingProperties: - output.bindingProperties != null ? de_ComponentBindingProperties(output.bindingProperties, context) : undefined, - children: output.children != null ? de_ComponentChildList(output.children, context) : undefined, - collectionProperties: - output.collectionProperties != null - ? de_ComponentCollectionProperties(output.collectionProperties, context) - : undefined, - componentType: __expectString(output.componentType), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - environmentName: __expectString(output.environmentName), - events: output.events != null ? de_ComponentEvents(output.events, context) : undefined, - id: __expectString(output.id), - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.modifiedAt)) : undefined, - name: __expectString(output.name), - overrides: output.overrides != null ? de_ComponentOverrides(output.overrides, context) : undefined, - properties: output.properties != null ? de_ComponentProperties(output.properties, context) : undefined, - schemaVersion: __expectString(output.schemaVersion), - sourceId: __expectString(output.sourceId), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - variants: output.variants != null ? de_ComponentVariants(output.variants, context) : undefined, - } as any; + return take(output, { + appId: __expectString, + bindingProperties: (_: any) => de_ComponentBindingProperties(_, context), + children: (_: any) => de_ComponentChildList(_, context), + collectionProperties: (_: any) => de_ComponentCollectionProperties(_, context), + componentType: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + environmentName: __expectString, + events: (_: any) => de_ComponentEvents(_, context), + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + overrides: _json, + properties: (_: any) => de_ComponentProperties(_, context), + schemaVersion: __expectString, + sourceId: __expectString, + tags: _json, + variants: _json, + }) as any; }; /** @@ -3149,14 +2780,11 @@ const de_ComponentBindingProperties = ( * deserializeAws_restJson1ComponentBindingPropertiesValue */ const de_ComponentBindingPropertiesValue = (output: any, context: __SerdeContext): ComponentBindingPropertiesValue => { - return { - bindingProperties: - output.bindingProperties != null - ? de_ComponentBindingPropertiesValueProperties(output.bindingProperties, context) - : undefined, - defaultValue: __expectString(output.defaultValue), - type: __expectString(output.type), - } as any; + return take(output, { + bindingProperties: (_: any) => de_ComponentBindingPropertiesValueProperties(_, context), + defaultValue: __expectString, + type: __expectString, + }) as any; }; /** @@ -3166,30 +2794,30 @@ const de_ComponentBindingPropertiesValueProperties = ( output: any, context: __SerdeContext ): ComponentBindingPropertiesValueProperties => { - return { - bucket: __expectString(output.bucket), - defaultValue: __expectString(output.defaultValue), - field: __expectString(output.field), - key: __expectString(output.key), - model: __expectString(output.model), - predicates: output.predicates != null ? de_PredicateList(output.predicates, context) : undefined, - slotName: __expectString(output.slotName), - userAttribute: __expectString(output.userAttribute), - } as any; + return take(output, { + bucket: __expectString, + defaultValue: __expectString, + field: __expectString, + key: __expectString, + model: __expectString, + predicates: (_: any) => de_PredicateList(_, context), + slotName: __expectString, + userAttribute: __expectString, + }) as any; }; /** * deserializeAws_restJson1ComponentChild */ const de_ComponentChild = (output: any, context: __SerdeContext): ComponentChild => { - return { - children: output.children != null ? de_ComponentChildList(output.children, context) : undefined, - componentType: __expectString(output.componentType), - events: output.events != null ? de_ComponentEvents(output.events, context) : undefined, - name: __expectString(output.name), - properties: output.properties != null ? de_ComponentProperties(output.properties, context) : undefined, - sourceId: __expectString(output.sourceId), - } as any; + return take(output, { + children: (_: any) => de_ComponentChildList(_, context), + componentType: __expectString, + events: (_: any) => de_ComponentEvents(_, context), + name: __expectString, + properties: (_: any) => de_ComponentProperties(_, context), + sourceId: __expectString, + }) as any; }; /** @@ -3199,9 +2827,6 @@ const de_ComponentChildList = (output: any, context: __SerdeContext): ComponentC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComponentChild(entry, context); }); return retVal; @@ -3230,38 +2855,38 @@ const de_ComponentCollectionProperties = ( * deserializeAws_restJson1ComponentConditionProperty */ const de_ComponentConditionProperty = (output: any, context: __SerdeContext): ComponentConditionProperty => { - return { - else: output.else != null ? de_ComponentProperty(output.else, context) : undefined, - field: __expectString(output.field), - operand: __expectString(output.operand), - operandType: __expectString(output.operandType), - operator: __expectString(output.operator), - property: __expectString(output.property), - then: output.then != null ? de_ComponentProperty(output.then, context) : undefined, - } as any; + return take(output, { + else: (_: any) => de_ComponentProperty(_, context), + field: __expectString, + operand: __expectString, + operandType: __expectString, + operator: __expectString, + property: __expectString, + then: (_: any) => de_ComponentProperty(_, context), + }) as any; }; /** * deserializeAws_restJson1ComponentDataConfiguration */ const de_ComponentDataConfiguration = (output: any, context: __SerdeContext): ComponentDataConfiguration => { - return { - identifiers: output.identifiers != null ? de_IdentifierList(output.identifiers, context) : undefined, - model: __expectString(output.model), - predicate: output.predicate != null ? de_Predicate(output.predicate, context) : undefined, - sort: output.sort != null ? de_SortPropertyList(output.sort, context) : undefined, - } as any; + return take(output, { + identifiers: _json, + model: __expectString, + predicate: (_: any) => de_Predicate(_, context), + sort: _json, + }) as any; }; /** * deserializeAws_restJson1ComponentEvent */ const de_ComponentEvent = (output: any, context: __SerdeContext): ComponentEvent => { - return { - action: __expectString(output.action), - bindingEvent: __expectString(output.bindingEvent), - parameters: output.parameters != null ? de_ActionParameters(output.parameters, context) : undefined, - } as any; + return take(output, { + action: __expectString, + bindingEvent: __expectString, + parameters: (_: any) => de_ActionParameters(_, context), + }) as any; }; /** @@ -3284,39 +2909,14 @@ const de_ComponentList = (output: any, context: __SerdeContext): Component[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Component(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ComponentOverrides - */ -const de_ComponentOverrides = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ComponentOverridesValue(value, context); - return acc; - }, {}); -}; +// de_ComponentOverrides omitted. -/** - * deserializeAws_restJson1ComponentOverridesValue - */ -const de_ComponentOverridesValue = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ComponentOverridesValue omitted. /** * deserializeAws_restJson1ComponentProperties @@ -3335,43 +2935,26 @@ const de_ComponentProperties = (output: any, context: __SerdeContext): Record { - return { - bindingProperties: - output.bindingProperties != null - ? de_ComponentPropertyBindingProperties(output.bindingProperties, context) - : undefined, - bindings: output.bindings != null ? de_FormBindings(output.bindings, context) : undefined, - collectionBindingProperties: - output.collectionBindingProperties != null - ? de_ComponentPropertyBindingProperties(output.collectionBindingProperties, context) - : undefined, - componentName: __expectString(output.componentName), - concat: output.concat != null ? de_ComponentPropertyList(output.concat, context) : undefined, - condition: output.condition != null ? de_ComponentConditionProperty(output.condition, context) : undefined, - configured: __expectBoolean(output.configured), - defaultValue: __expectString(output.defaultValue), - event: __expectString(output.event), - importedValue: __expectString(output.importedValue), - model: __expectString(output.model), - property: __expectString(output.property), - type: __expectString(output.type), - userAttribute: __expectString(output.userAttribute), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_restJson1ComponentPropertyBindingProperties - */ -const de_ComponentPropertyBindingProperties = ( - output: any, - context: __SerdeContext -): ComponentPropertyBindingProperties => { - return { - field: __expectString(output.field), - property: __expectString(output.property), - } as any; -}; + return take(output, { + bindingProperties: _json, + bindings: _json, + collectionBindingProperties: _json, + componentName: __expectString, + concat: (_: any) => de_ComponentPropertyList(_, context), + condition: (_: any) => de_ComponentConditionProperty(_, context), + configured: __expectBoolean, + defaultValue: __expectString, + event: __expectString, + importedValue: __expectString, + model: __expectString, + property: __expectString, + type: __expectString, + userAttribute: __expectString, + value: __expectString, + }) as any; +}; + +// de_ComponentPropertyBindingProperties omitted. /** * deserializeAws_restJson1ComponentPropertyList @@ -3380,146 +2963,61 @@ const de_ComponentPropertyList = (output: any, context: __SerdeContext): Compone const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComponentProperty(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ComponentSummary - */ -const de_ComponentSummary = (output: any, context: __SerdeContext): ComponentSummary => { - return { - appId: __expectString(output.appId), - componentType: __expectString(output.componentType), - environmentName: __expectString(output.environmentName), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_ComponentSummary omitted. -/** - * deserializeAws_restJson1ComponentSummaryList - */ -const de_ComponentSummaryList = (output: any, context: __SerdeContext): ComponentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentSummary(entry, context); - }); - return retVal; -}; +// de_ComponentSummaryList omitted. -/** - * deserializeAws_restJson1ComponentVariant - */ -const de_ComponentVariant = (output: any, context: __SerdeContext): ComponentVariant => { - return { - overrides: output.overrides != null ? de_ComponentOverrides(output.overrides, context) : undefined, - variantValues: output.variantValues != null ? de_ComponentVariantValues(output.variantValues, context) : undefined, - } as any; -}; +// de_ComponentVariant omitted. -/** - * deserializeAws_restJson1ComponentVariants - */ -const de_ComponentVariants = (output: any, context: __SerdeContext): ComponentVariant[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentVariant(entry, context); - }); - return retVal; -}; +// de_ComponentVariants omitted. -/** - * deserializeAws_restJson1ComponentVariantValues - */ -const de_ComponentVariantValues = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ComponentVariantValues omitted. -/** - * deserializeAws_restJson1FeaturesMap - */ -const de_FeaturesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FeaturesMap omitted. /** * deserializeAws_restJson1FieldConfig */ const de_FieldConfig = (output: any, context: __SerdeContext): FieldConfig => { - return { - excluded: __expectBoolean(output.excluded), - inputType: output.inputType != null ? de_FieldInputConfig(output.inputType, context) : undefined, - label: __expectString(output.label), - position: output.position != null ? de_FieldPosition(__expectUnion(output.position), context) : undefined, - validations: output.validations != null ? de_ValidationsList(output.validations, context) : undefined, - } as any; + return take(output, { + excluded: __expectBoolean, + inputType: (_: any) => de_FieldInputConfig(_, context), + label: __expectString, + position: (_: any) => _json(__expectUnion(_)), + validations: _json, + }) as any; }; /** * deserializeAws_restJson1FieldInputConfig */ const de_FieldInputConfig = (output: any, context: __SerdeContext): FieldInputConfig => { - return { - defaultChecked: __expectBoolean(output.defaultChecked), - defaultCountryCode: __expectString(output.defaultCountryCode), - defaultValue: __expectString(output.defaultValue), - descriptiveText: __expectString(output.descriptiveText), - fileUploaderConfig: - output.fileUploaderConfig != null ? de_FileUploaderFieldConfig(output.fileUploaderConfig, context) : undefined, - isArray: __expectBoolean(output.isArray), - maxValue: __limitedParseFloat32(output.maxValue), - minValue: __limitedParseFloat32(output.minValue), - name: __expectString(output.name), - placeholder: __expectString(output.placeholder), - readOnly: __expectBoolean(output.readOnly), - required: __expectBoolean(output.required), - step: __limitedParseFloat32(output.step), - type: __expectString(output.type), - value: __expectString(output.value), - valueMappings: output.valueMappings != null ? de_ValueMappings(output.valueMappings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FieldPosition - */ -const de_FieldPosition = (output: any, context: __SerdeContext): FieldPosition => { - if (__expectString(output.below) !== undefined) { - return { below: __expectString(output.below) as any }; - } - if (__expectString(output.fixed) !== undefined) { - return { fixed: __expectString(output.fixed) as any }; - } - if (__expectString(output.rightOf) !== undefined) { - return { rightOf: __expectString(output.rightOf) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; + return take(output, { + defaultChecked: __expectBoolean, + defaultCountryCode: __expectString, + defaultValue: __expectString, + descriptiveText: __expectString, + fileUploaderConfig: _json, + isArray: __expectBoolean, + maxValue: __limitedParseFloat32, + minValue: __limitedParseFloat32, + name: __expectString, + placeholder: __expectString, + readOnly: __expectBoolean, + required: __expectBoolean, + step: __limitedParseFloat32, + type: __expectString, + value: __expectString, + valueMappings: (_: any) => de_ValueMappings(_, context), + }) as any; +}; + +// de_FieldPosition omitted. /** * deserializeAws_restJson1FieldsMap @@ -3534,180 +3032,59 @@ const de_FieldsMap = (output: any, context: __SerdeContext): Record { - return { - numValues: output.numValues != null ? de_NumValues(output.numValues, context) : undefined, - strValues: output.strValues != null ? de_StrValues(output.strValues, context) : undefined, - type: __expectString(output.type), - validationMessage: __expectString(output.validationMessage), - } as any; -}; +// de_FieldValidationConfiguration omitted. -/** - * deserializeAws_restJson1FileUploaderFieldConfig - */ -const de_FileUploaderFieldConfig = (output: any, context: __SerdeContext): FileUploaderFieldConfig => { - return { - acceptedFileTypes: output.acceptedFileTypes != null ? de_StrValues(output.acceptedFileTypes, context) : undefined, - accessLevel: __expectString(output.accessLevel), - isResumable: __expectBoolean(output.isResumable), - maxFileCount: __expectInt32(output.maxFileCount), - maxSize: __expectInt32(output.maxSize), - showThumbnails: __expectBoolean(output.showThumbnails), - } as any; -}; +// de_FileUploaderFieldConfig omitted. /** * deserializeAws_restJson1Form */ const de_Form = (output: any, context: __SerdeContext): Form => { - return { - appId: __expectString(output.appId), - cta: output.cta != null ? de_FormCTA(output.cta, context) : undefined, - dataType: output.dataType != null ? de_FormDataTypeConfig(output.dataType, context) : undefined, - environmentName: __expectString(output.environmentName), - fields: output.fields != null ? de_FieldsMap(output.fields, context) : undefined, - formActionType: __expectString(output.formActionType), - id: __expectString(output.id), - labelDecorator: __expectString(output.labelDecorator), - name: __expectString(output.name), - schemaVersion: __expectString(output.schemaVersion), - sectionalElements: - output.sectionalElements != null ? de_SectionalElementMap(output.sectionalElements, context) : undefined, - style: output.style != null ? de_FormStyle(output.style, context) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + appId: __expectString, + cta: _json, + dataType: _json, + environmentName: __expectString, + fields: (_: any) => de_FieldsMap(_, context), + formActionType: __expectString, + id: __expectString, + labelDecorator: __expectString, + name: __expectString, + schemaVersion: __expectString, + sectionalElements: _json, + style: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1FormBindingElement - */ -const de_FormBindingElement = (output: any, context: __SerdeContext): FormBindingElement => { - return { - element: __expectString(output.element), - property: __expectString(output.property), - } as any; -}; +// de_FormBindingElement omitted. -/** - * deserializeAws_restJson1FormBindings - */ -const de_FormBindings = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FormBindingElement(value, context); - return acc; - }, {}); -}; +// de_FormBindings omitted. -/** - * deserializeAws_restJson1FormButton - */ -const de_FormButton = (output: any, context: __SerdeContext): FormButton => { - return { - children: __expectString(output.children), - excluded: __expectBoolean(output.excluded), - position: output.position != null ? de_FieldPosition(__expectUnion(output.position), context) : undefined, - } as any; -}; +// de_FormButton omitted. -/** - * deserializeAws_restJson1FormCTA - */ -const de_FormCTA = (output: any, context: __SerdeContext): FormCTA => { - return { - cancel: output.cancel != null ? de_FormButton(output.cancel, context) : undefined, - clear: output.clear != null ? de_FormButton(output.clear, context) : undefined, - position: __expectString(output.position), - submit: output.submit != null ? de_FormButton(output.submit, context) : undefined, - } as any; -}; +// de_FormCTA omitted. -/** - * deserializeAws_restJson1FormDataTypeConfig - */ -const de_FormDataTypeConfig = (output: any, context: __SerdeContext): FormDataTypeConfig => { - return { - dataSourceType: __expectString(output.dataSourceType), - dataTypeName: __expectString(output.dataTypeName), - } as any; -}; +// de_FormDataTypeConfig omitted. -/** - * deserializeAws_restJson1FormInputBindingProperties - */ -const de_FormInputBindingProperties = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FormInputBindingPropertiesValue(value, context); - return acc; - }, - {} - ); -}; +// de_FormInputBindingProperties omitted. -/** - * deserializeAws_restJson1FormInputBindingPropertiesValue - */ -const de_FormInputBindingPropertiesValue = (output: any, context: __SerdeContext): FormInputBindingPropertiesValue => { - return { - bindingProperties: - output.bindingProperties != null - ? de_FormInputBindingPropertiesValueProperties(output.bindingProperties, context) - : undefined, - type: __expectString(output.type), - } as any; -}; +// de_FormInputBindingPropertiesValue omitted. -/** - * deserializeAws_restJson1FormInputBindingPropertiesValueProperties - */ -const de_FormInputBindingPropertiesValueProperties = ( - output: any, - context: __SerdeContext -): FormInputBindingPropertiesValueProperties => { - return { - model: __expectString(output.model), - } as any; -}; +// de_FormInputBindingPropertiesValueProperties omitted. /** * deserializeAws_restJson1FormInputValueProperty */ const de_FormInputValueProperty = (output: any, context: __SerdeContext): FormInputValueProperty => { - return { - bindingProperties: - output.bindingProperties != null - ? de_FormInputValuePropertyBindingProperties(output.bindingProperties, context) - : undefined, - concat: output.concat != null ? de_FormInputValuePropertyList(output.concat, context) : undefined, - value: __expectString(output.value), - } as any; + return take(output, { + bindingProperties: _json, + concat: (_: any) => de_FormInputValuePropertyList(_, context), + value: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1FormInputValuePropertyBindingProperties - */ -const de_FormInputValuePropertyBindingProperties = ( - output: any, - context: __SerdeContext -): FormInputValuePropertyBindingProperties => { - return { - field: __expectString(output.field), - property: __expectString(output.property), - } as any; -}; +// de_FormInputValuePropertyBindingProperties omitted. /** * deserializeAws_restJson1FormInputValuePropertyList @@ -3716,9 +3093,6 @@ const de_FormInputValuePropertyList = (output: any, context: __SerdeContext): Fo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FormInputValueProperty(entry, context); }); return retVal; @@ -3731,123 +3105,46 @@ const de_FormList = (output: any, context: __SerdeContext): Form[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Form(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FormStyle - */ -const de_FormStyle = (output: any, context: __SerdeContext): FormStyle => { - return { - horizontalGap: - output.horizontalGap != null ? de_FormStyleConfig(__expectUnion(output.horizontalGap), context) : undefined, - outerPadding: - output.outerPadding != null ? de_FormStyleConfig(__expectUnion(output.outerPadding), context) : undefined, - verticalGap: - output.verticalGap != null ? de_FormStyleConfig(__expectUnion(output.verticalGap), context) : undefined, - } as any; -}; +// de_FormStyle omitted. -/** - * deserializeAws_restJson1FormStyleConfig - */ -const de_FormStyleConfig = (output: any, context: __SerdeContext): FormStyleConfig => { - if (__expectString(output.tokenReference) !== undefined) { - return { tokenReference: __expectString(output.tokenReference) as any }; - } - if (__expectString(output.value) !== undefined) { - return { value: __expectString(output.value) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_FormStyleConfig omitted. -/** - * deserializeAws_restJson1FormSummary - */ -const de_FormSummary = (output: any, context: __SerdeContext): FormSummary => { - return { - appId: __expectString(output.appId), - dataType: output.dataType != null ? de_FormDataTypeConfig(output.dataType, context) : undefined, - environmentName: __expectString(output.environmentName), - formActionType: __expectString(output.formActionType), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_FormSummary omitted. -/** - * deserializeAws_restJson1FormSummaryList - */ -const de_FormSummaryList = (output: any, context: __SerdeContext): FormSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FormSummary(entry, context); - }); - return retVal; -}; +// de_FormSummaryList omitted. -/** - * deserializeAws_restJson1IdentifierList - */ -const de_IdentifierList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IdentifierList omitted. /** * deserializeAws_restJson1MutationActionSetStateParameter */ const de_MutationActionSetStateParameter = (output: any, context: __SerdeContext): MutationActionSetStateParameter => { - return { - componentName: __expectString(output.componentName), - property: __expectString(output.property), - set: output.set != null ? de_ComponentProperty(output.set, context) : undefined, - } as any; + return take(output, { + componentName: __expectString, + property: __expectString, + set: (_: any) => de_ComponentProperty(_, context), + }) as any; }; -/** - * deserializeAws_restJson1NumValues - */ -const de_NumValues = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_NumValues omitted. /** * deserializeAws_restJson1Predicate */ const de_Predicate = (output: any, context: __SerdeContext): Predicate => { - return { - and: output.and != null ? de_PredicateList(output.and, context) : undefined, - field: __expectString(output.field), - operand: __expectString(output.operand), - operandType: __expectString(output.operandType), - operator: __expectString(output.operator), - or: output.or != null ? de_PredicateList(output.or, context) : undefined, - } as any; + return take(output, { + and: (_: any) => de_PredicateList(_, context), + field: __expectString, + operand: __expectString, + operandType: __expectString, + operator: __expectString, + or: (_: any) => de_PredicateList(_, context), + }) as any; }; /** @@ -3857,111 +3154,38 @@ const de_PredicateList = (output: any, context: __SerdeContext): Predicate[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Predicate(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SectionalElement - */ -const de_SectionalElement = (output: any, context: __SerdeContext): SectionalElement => { - return { - excluded: __expectBoolean(output.excluded), - level: __expectInt32(output.level), - orientation: __expectString(output.orientation), - position: output.position != null ? de_FieldPosition(__expectUnion(output.position), context) : undefined, - text: __expectString(output.text), - type: __expectString(output.type), - } as any; -}; +// de_SectionalElement omitted. -/** - * deserializeAws_restJson1SectionalElementMap - */ -const de_SectionalElementMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SectionalElement(value, context); - return acc; - }, {}); -}; +// de_SectionalElementMap omitted. -/** - * deserializeAws_restJson1SortProperty - */ -const de_SortProperty = (output: any, context: __SerdeContext): SortProperty => { - return { - direction: __expectString(output.direction), - field: __expectString(output.field), - } as any; -}; +// de_SortProperty omitted. -/** - * deserializeAws_restJson1SortPropertyList - */ -const de_SortPropertyList = (output: any, context: __SerdeContext): SortProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SortProperty(entry, context); - }); - return retVal; -}; +// de_SortPropertyList omitted. -/** - * deserializeAws_restJson1StrValues - */ -const de_StrValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StrValues omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. /** * deserializeAws_restJson1Theme */ const de_Theme = (output: any, context: __SerdeContext): Theme => { - return { - appId: __expectString(output.appId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - environmentName: __expectString(output.environmentName), - id: __expectString(output.id), - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.modifiedAt)) : undefined, - name: __expectString(output.name), - overrides: output.overrides != null ? de_ThemeValuesList(output.overrides, context) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - values: output.values != null ? de_ThemeValuesList(output.values, context) : undefined, - } as any; + return take(output, { + appId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + environmentName: __expectString, + id: __expectString, + modifiedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + overrides: (_: any) => de_ThemeValuesList(_, context), + tags: _json, + values: (_: any) => de_ThemeValuesList(_, context), + }) as any; }; /** @@ -3971,59 +3195,33 @@ const de_ThemeList = (output: any, context: __SerdeContext): Theme[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Theme(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ThemeSummary - */ -const de_ThemeSummary = (output: any, context: __SerdeContext): ThemeSummary => { - return { - appId: __expectString(output.appId), - environmentName: __expectString(output.environmentName), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_ThemeSummary omitted. -/** - * deserializeAws_restJson1ThemeSummaryList - */ -const de_ThemeSummaryList = (output: any, context: __SerdeContext): ThemeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThemeSummary(entry, context); - }); - return retVal; -}; +// de_ThemeSummaryList omitted. /** * deserializeAws_restJson1ThemeValue */ const de_ThemeValue = (output: any, context: __SerdeContext): ThemeValue => { - return { - children: output.children != null ? de_ThemeValuesList(output.children, context) : undefined, - value: __expectString(output.value), - } as any; + return take(output, { + children: (_: any) => de_ThemeValuesList(_, context), + value: __expectString, + }) as any; }; /** * deserializeAws_restJson1ThemeValues */ const de_ThemeValues = (output: any, context: __SerdeContext): ThemeValues => { - return { - key: __expectString(output.key), - value: output.value != null ? de_ThemeValue(output.value, context) : undefined, - } as any; + return take(output, { + key: __expectString, + value: (_: any) => de_ThemeValue(_, context), + }) as any; }; /** @@ -4033,37 +3231,21 @@ const de_ThemeValuesList = (output: any, context: __SerdeContext): ThemeValues[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThemeValues(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ValidationsList - */ -const de_ValidationsList = (output: any, context: __SerdeContext): FieldValidationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldValidationConfiguration(entry, context); - }); - return retVal; -}; +// de_ValidationsList omitted. /** * deserializeAws_restJson1ValueMapping */ const de_ValueMapping = (output: any, context: __SerdeContext): ValueMapping => { - return { - displayValue: output.displayValue != null ? de_FormInputValueProperty(output.displayValue, context) : undefined, - value: output.value != null ? de_FormInputValueProperty(output.value, context) : undefined, - } as any; + return take(output, { + displayValue: (_: any) => de_FormInputValueProperty(_, context), + value: (_: any) => de_FormInputValueProperty(_, context), + }) as any; }; /** @@ -4073,9 +3255,6 @@ const de_ValueMappingList = (output: any, context: __SerdeContext): ValueMapping const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ValueMapping(entry, context); }); return retVal; @@ -4085,11 +3264,10 @@ const de_ValueMappingList = (output: any, context: __SerdeContext): ValueMapping * deserializeAws_restJson1ValueMappings */ const de_ValueMappings = (output: any, context: __SerdeContext): ValueMappings => { - return { - bindingProperties: - output.bindingProperties != null ? de_FormInputBindingProperties(output.bindingProperties, context) : undefined, - values: output.values != null ? de_ValueMappingList(output.values, context) : undefined, - } as any; + return take(output, { + bindingProperties: _json, + values: (_: any) => de_ValueMappingList(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-api-gateway/src/protocols/Aws_restJson1.ts b/clients/client-api-gateway/src/protocols/Aws_restJson1.ts index fee9c7d2d6d9..209a2c27c801 100644 --- a/clients/client-api-gateway/src/protocols/Aws_restJson1.ts +++ b/clients/client-api-gateway/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, convertMap, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, @@ -12,11 +13,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -254,42 +256,26 @@ import { UpdateUsagePlanCommandInput, UpdateUsagePlanCommandOutput } from "../co import { UpdateVpcLinkCommandInput, UpdateVpcLinkCommandOutput } from "../commands/UpdateVpcLinkCommand"; import { APIGatewayServiceException as __BaseException } from "../models/APIGatewayServiceException"; import { - AccessLogSettings, ApiKey, ApiStage, - Authorizer, BadRequestException, - BasePathMapping, CanarySettings, ClientCertificate, ConflictException, Deployment, DeploymentCanarySettings, - DocumentationPart, DocumentationPartLocation, DocumentationVersion, DomainName, EndpointConfiguration, EndpointType, - GatewayResponse, - Integration, - IntegrationResponse, LimitExceededException, - Method, - MethodResponse, MethodSetting, - MethodSnapshot, - Model, - MutualTlsAuthentication, MutualTlsAuthenticationInput, NotFoundException, PatchOperation, QuotaSettings, - RequestValidator, - Resource, RestApi, - SdkConfigurationProperty, - SdkType, ServiceUnavailableException, Stage, StageKey, @@ -298,8 +284,6 @@ import { TooManyRequestsException, UnauthorizedException, UsagePlan, - UsagePlanKey, - VpcLink, } from "../models/models_0"; /** @@ -315,16 +299,18 @@ export const se_CreateApiKeyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys"; let body: any; - body = JSON.stringify({ - ...(input.customerId != null && { customerId: input.customerId }), - ...(input.description != null && { description: input.description }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.generateDistinctId != null && { generateDistinctId: input.generateDistinctId }), - ...(input.name != null && { name: input.name }), - ...(input.stageKeys != null && { stageKeys: se_ListOfStageKeys(input.stageKeys, context) }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - ...(input.value != null && { value: input.value }), - }); + body = JSON.stringify( + take(input, { + customerId: [], + description: [], + enabled: [], + generateDistinctId: [], + name: [], + stageKeys: (_) => _json(_), + tags: (_) => _json(_), + value: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -351,21 +337,19 @@ export const se_CreateAuthorizerCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/authorizers"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.authType != null && { authType: input.authType }), - ...(input.authorizerCredentials != null && { authorizerCredentials: input.authorizerCredentials }), - ...(input.authorizerResultTtlInSeconds != null && { - authorizerResultTtlInSeconds: input.authorizerResultTtlInSeconds, - }), - ...(input.authorizerUri != null && { authorizerUri: input.authorizerUri }), - ...(input.identitySource != null && { identitySource: input.identitySource }), - ...(input.identityValidationExpression != null && { - identityValidationExpression: input.identityValidationExpression, - }), - ...(input.name != null && { name: input.name }), - ...(input.providerARNs != null && { providerARNs: se_ListOfARNs(input.providerARNs, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + authType: [], + authorizerCredentials: [], + authorizerResultTtlInSeconds: [], + authorizerUri: [], + identitySource: [], + identityValidationExpression: [], + name: [], + providerARNs: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -393,11 +377,13 @@ export const se_CreateBasePathMappingCommand = async ( "/domainnames/{domainName}/basepathmappings"; resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName!, "{domainName}", false); let body: any; - body = JSON.stringify({ - ...(input.basePath != null && { basePath: input.basePath }), - ...(input.restApiId != null && { restApiId: input.restApiId }), - ...(input.stage != null && { stage: input.stage }), - }); + body = JSON.stringify( + take(input, { + basePath: [], + restApiId: [], + stage: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -424,16 +410,18 @@ export const se_CreateDeploymentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/deployments"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.cacheClusterEnabled != null && { cacheClusterEnabled: input.cacheClusterEnabled }), - ...(input.cacheClusterSize != null && { cacheClusterSize: input.cacheClusterSize }), - ...(input.canarySettings != null && { canarySettings: se_DeploymentCanarySettings(input.canarySettings, context) }), - ...(input.description != null && { description: input.description }), - ...(input.stageDescription != null && { stageDescription: input.stageDescription }), - ...(input.stageName != null && { stageName: input.stageName }), - ...(input.tracingEnabled != null && { tracingEnabled: input.tracingEnabled }), - ...(input.variables != null && { variables: se_MapOfStringToString(input.variables, context) }), - }); + body = JSON.stringify( + take(input, { + cacheClusterEnabled: [], + cacheClusterSize: [], + canarySettings: (_) => se_DeploymentCanarySettings(_, context), + description: [], + stageDescription: [], + stageName: [], + tracingEnabled: [], + variables: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -460,10 +448,12 @@ export const se_CreateDocumentationPartCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.location != null && { location: se_DocumentationPartLocation(input.location, context) }), - ...(input.properties != null && { properties: input.properties }), - }); + body = JSON.stringify( + take(input, { + location: (_) => _json(_), + properties: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -491,11 +481,13 @@ export const se_CreateDocumentationVersionCommand = async ( "/restapis/{restApiId}/documentation/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.documentationVersion != null && { documentationVersion: input.documentationVersion }), - ...(input.stageName != null && { stageName: input.stageName }), - }); + body = JSON.stringify( + take(input, { + description: [], + documentationVersion: [], + stageName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -520,27 +512,23 @@ export const se_CreateDomainNameCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames"; let body: any; - body = JSON.stringify({ - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - ...(input.certificateBody != null && { certificateBody: input.certificateBody }), - ...(input.certificateChain != null && { certificateChain: input.certificateChain }), - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.certificatePrivateKey != null && { certificatePrivateKey: input.certificatePrivateKey }), - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.endpointConfiguration != null && { - endpointConfiguration: se_EndpointConfiguration(input.endpointConfiguration, context), - }), - ...(input.mutualTlsAuthentication != null && { - mutualTlsAuthentication: se_MutualTlsAuthenticationInput(input.mutualTlsAuthentication, context), - }), - ...(input.ownershipVerificationCertificateArn != null && { - ownershipVerificationCertificateArn: input.ownershipVerificationCertificateArn, - }), - ...(input.regionalCertificateArn != null && { regionalCertificateArn: input.regionalCertificateArn }), - ...(input.regionalCertificateName != null && { regionalCertificateName: input.regionalCertificateName }), - ...(input.securityPolicy != null && { securityPolicy: input.securityPolicy }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + certificateArn: [], + certificateBody: [], + certificateChain: [], + certificateName: [], + certificatePrivateKey: [], + domainName: [], + endpointConfiguration: (_) => _json(_), + mutualTlsAuthentication: (_) => _json(_), + ownershipVerificationCertificateArn: [], + regionalCertificateArn: [], + regionalCertificateName: [], + securityPolicy: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -567,12 +555,14 @@ export const se_CreateModelCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.schema != null && { schema: input.schema }), - }); + body = JSON.stringify( + take(input, { + contentType: [], + description: [], + name: [], + schema: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -599,11 +589,13 @@ export const se_CreateRequestValidatorCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/requestvalidators"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - ...(input.validateRequestBody != null && { validateRequestBody: input.validateRequestBody }), - ...(input.validateRequestParameters != null && { validateRequestParameters: input.validateRequestParameters }), - }); + body = JSON.stringify( + take(input, { + name: [], + validateRequestBody: [], + validateRequestParameters: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -632,9 +624,11 @@ export const se_CreateResourceCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "parentId", () => input.parentId!, "{parentId}", false); let body: any; - body = JSON.stringify({ - ...(input.pathPart != null && { pathPart: input.pathPart }), - }); + body = JSON.stringify( + take(input, { + pathPart: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -659,21 +653,21 @@ export const se_CreateRestApiCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis"; let body: any; - body = JSON.stringify({ - ...(input.apiKeySource != null && { apiKeySource: input.apiKeySource }), - ...(input.binaryMediaTypes != null && { binaryMediaTypes: se_ListOfString(input.binaryMediaTypes, context) }), - ...(input.cloneFrom != null && { cloneFrom: input.cloneFrom }), - ...(input.description != null && { description: input.description }), - ...(input.disableExecuteApiEndpoint != null && { disableExecuteApiEndpoint: input.disableExecuteApiEndpoint }), - ...(input.endpointConfiguration != null && { - endpointConfiguration: se_EndpointConfiguration(input.endpointConfiguration, context), - }), - ...(input.minimumCompressionSize != null && { minimumCompressionSize: input.minimumCompressionSize }), - ...(input.name != null && { name: input.name }), - ...(input.policy != null && { policy: input.policy }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - ...(input.version != null && { version: input.version }), - }); + body = JSON.stringify( + take(input, { + apiKeySource: [], + binaryMediaTypes: (_) => _json(_), + cloneFrom: [], + description: [], + disableExecuteApiEndpoint: [], + endpointConfiguration: (_) => _json(_), + minimumCompressionSize: [], + name: [], + policy: [], + tags: (_) => _json(_), + version: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -700,18 +694,20 @@ export const se_CreateStageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.cacheClusterEnabled != null && { cacheClusterEnabled: input.cacheClusterEnabled }), - ...(input.cacheClusterSize != null && { cacheClusterSize: input.cacheClusterSize }), - ...(input.canarySettings != null && { canarySettings: se_CanarySettings(input.canarySettings, context) }), - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.description != null && { description: input.description }), - ...(input.documentationVersion != null && { documentationVersion: input.documentationVersion }), - ...(input.stageName != null && { stageName: input.stageName }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - ...(input.tracingEnabled != null && { tracingEnabled: input.tracingEnabled }), - ...(input.variables != null && { variables: se_MapOfStringToString(input.variables, context) }), - }); + body = JSON.stringify( + take(input, { + cacheClusterEnabled: [], + cacheClusterSize: [], + canarySettings: (_) => se_CanarySettings(_, context), + deploymentId: [], + description: [], + documentationVersion: [], + stageName: [], + tags: (_) => _json(_), + tracingEnabled: [], + variables: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -736,14 +732,16 @@ export const se_CreateUsagePlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans"; let body: any; - body = JSON.stringify({ - ...(input.apiStages != null && { apiStages: se_ListOfApiStage(input.apiStages, context) }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.quota != null && { quota: se_QuotaSettings(input.quota, context) }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - ...(input.throttle != null && { throttle: se_ThrottleSettings(input.throttle, context) }), - }); + body = JSON.stringify( + take(input, { + apiStages: (_) => se_ListOfApiStage(_, context), + description: [], + name: [], + quota: (_) => _json(_), + tags: (_) => _json(_), + throttle: (_) => se_ThrottleSettings(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -770,10 +768,12 @@ export const se_CreateUsagePlanKeyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys"; resolvedPath = __resolvedPath(resolvedPath, input, "usagePlanId", () => input.usagePlanId!, "{usagePlanId}", false); let body: any; - body = JSON.stringify({ - ...(input.keyId != null && { keyId: input.keyId }), - ...(input.keyType != null && { keyType: input.keyType }), - }); + body = JSON.stringify( + take(input, { + keyId: [], + keyType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -798,12 +798,14 @@ export const se_CreateVpcLinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - ...(input.targetArns != null && { targetArns: se_ListOfString(input.targetArns, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + tags: (_) => _json(_), + targetArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1463,10 +1465,12 @@ export const se_GenerateClientCertificateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2915,15 +2919,13 @@ export const se_PutGatewayResponseCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.responseParameters != null && { - responseParameters: se_MapOfStringToString(input.responseParameters, context), - }), - ...(input.responseTemplates != null && { - responseTemplates: se_MapOfStringToString(input.responseTemplates, context), - }), - ...(input.statusCode != null && { statusCode: input.statusCode }), - }); + body = JSON.stringify( + take(input, { + responseParameters: (_) => _json(_), + responseTemplates: (_) => _json(_), + statusCode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2953,26 +2955,24 @@ export const se_PutIntegrationCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "resourceId", () => input.resourceId!, "{resourceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); let body: any; - body = JSON.stringify({ - ...(input.cacheKeyParameters != null && { cacheKeyParameters: se_ListOfString(input.cacheKeyParameters, context) }), - ...(input.cacheNamespace != null && { cacheNamespace: input.cacheNamespace }), - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.connectionType != null && { connectionType: input.connectionType }), - ...(input.contentHandling != null && { contentHandling: input.contentHandling }), - ...(input.credentials != null && { credentials: input.credentials }), - ...(input.integrationHttpMethod != null && { httpMethod: input.integrationHttpMethod }), - ...(input.passthroughBehavior != null && { passthroughBehavior: input.passthroughBehavior }), - ...(input.requestParameters != null && { - requestParameters: se_MapOfStringToString(input.requestParameters, context), - }), - ...(input.requestTemplates != null && { - requestTemplates: se_MapOfStringToString(input.requestTemplates, context), - }), - ...(input.timeoutInMillis != null && { timeoutInMillis: input.timeoutInMillis }), - ...(input.tlsConfig != null && { tlsConfig: se_TlsConfig(input.tlsConfig, context) }), - ...(input.type != null && { type: input.type }), - ...(input.uri != null && { uri: input.uri }), - }); + body = JSON.stringify( + take(input, { + cacheKeyParameters: (_) => _json(_), + cacheNamespace: [], + connectionId: [], + connectionType: [], + contentHandling: [], + credentials: [], + httpMethod: [, , `integrationHttpMethod`], + passthroughBehavior: [], + requestParameters: (_) => _json(_), + requestTemplates: (_) => _json(_), + timeoutInMillis: [], + tlsConfig: (_) => _json(_), + type: [], + uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3003,16 +3003,14 @@ export const se_PutIntegrationResponseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); resolvedPath = __resolvedPath(resolvedPath, input, "statusCode", () => input.statusCode!, "{statusCode}", false); let body: any; - body = JSON.stringify({ - ...(input.contentHandling != null && { contentHandling: input.contentHandling }), - ...(input.responseParameters != null && { - responseParameters: se_MapOfStringToString(input.responseParameters, context), - }), - ...(input.responseTemplates != null && { - responseTemplates: se_MapOfStringToString(input.responseTemplates, context), - }), - ...(input.selectionPattern != null && { selectionPattern: input.selectionPattern }), - }); + body = JSON.stringify( + take(input, { + contentHandling: [], + responseParameters: (_) => _json(_), + responseTemplates: (_) => _json(_), + selectionPattern: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3042,20 +3040,18 @@ export const se_PutMethodCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "resourceId", () => input.resourceId!, "{resourceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); let body: any; - body = JSON.stringify({ - ...(input.apiKeyRequired != null && { apiKeyRequired: input.apiKeyRequired }), - ...(input.authorizationScopes != null && { - authorizationScopes: se_ListOfString(input.authorizationScopes, context), - }), - ...(input.authorizationType != null && { authorizationType: input.authorizationType }), - ...(input.authorizerId != null && { authorizerId: input.authorizerId }), - ...(input.operationName != null && { operationName: input.operationName }), - ...(input.requestModels != null && { requestModels: se_MapOfStringToString(input.requestModels, context) }), - ...(input.requestParameters != null && { - requestParameters: se_MapOfStringToBoolean(input.requestParameters, context), - }), - ...(input.requestValidatorId != null && { requestValidatorId: input.requestValidatorId }), - }); + body = JSON.stringify( + take(input, { + apiKeyRequired: [], + authorizationScopes: (_) => _json(_), + authorizationType: [], + authorizerId: [], + operationName: [], + requestModels: (_) => _json(_), + requestParameters: (_) => _json(_), + requestValidatorId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3086,12 +3082,12 @@ export const se_PutMethodResponseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); resolvedPath = __resolvedPath(resolvedPath, input, "statusCode", () => input.statusCode!, "{statusCode}", false); let body: any; - body = JSON.stringify({ - ...(input.responseModels != null && { responseModels: se_MapOfStringToString(input.responseModels, context) }), - ...(input.responseParameters != null && { - responseParameters: se_MapOfStringToBoolean(input.responseParameters, context), - }), - }); + body = JSON.stringify( + take(input, { + responseModels: (_) => _json(_), + responseParameters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3151,9 +3147,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_MapOfStringToString(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3189,18 +3187,16 @@ export const se_TestInvokeAuthorizerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.additionalContext != null && { - additionalContext: se_MapOfStringToString(input.additionalContext, context), - }), - ...(input.body != null && { body: input.body }), - ...(input.headers != null && { headers: se_MapOfStringToString(input.headers, context) }), - ...(input.multiValueHeaders != null && { - multiValueHeaders: se_MapOfStringToList(input.multiValueHeaders, context), - }), - ...(input.pathWithQueryString != null && { pathWithQueryString: input.pathWithQueryString }), - ...(input.stageVariables != null && { stageVariables: se_MapOfStringToString(input.stageVariables, context) }), - }); + body = JSON.stringify( + take(input, { + additionalContext: (_) => _json(_), + body: [], + headers: (_) => _json(_), + multiValueHeaders: (_) => _json(_), + pathWithQueryString: [], + stageVariables: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3230,16 +3226,16 @@ export const se_TestInvokeMethodCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "resourceId", () => input.resourceId!, "{resourceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); let body: any; - body = JSON.stringify({ - ...(input.body != null && { body: input.body }), - ...(input.clientCertificateId != null && { clientCertificateId: input.clientCertificateId }), - ...(input.headers != null && { headers: se_MapOfStringToString(input.headers, context) }), - ...(input.multiValueHeaders != null && { - multiValueHeaders: se_MapOfStringToList(input.multiValueHeaders, context), - }), - ...(input.pathWithQueryString != null && { pathWithQueryString: input.pathWithQueryString }), - ...(input.stageVariables != null && { stageVariables: se_MapOfStringToString(input.stageVariables, context) }), - }); + body = JSON.stringify( + take(input, { + body: [], + clientCertificateId: [], + headers: (_) => _json(_), + multiValueHeaders: (_) => _json(_), + pathWithQueryString: [], + stageVariables: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3294,9 +3290,11 @@ export const se_UpdateAccountCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account"; let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3322,9 +3320,11 @@ export const se_UpdateApiKeyCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}"; resolvedPath = __resolvedPath(resolvedPath, input, "apiKey", () => input.apiKey!, "{apiKey}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3360,9 +3360,11 @@ export const se_UpdateAuthorizerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3391,9 +3393,11 @@ export const se_UpdateBasePathMappingCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName!, "{domainName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "basePath", () => input.basePath!, "{basePath}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3427,9 +3431,11 @@ export const se_UpdateClientCertificateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3465,9 +3471,11 @@ export const se_UpdateDeploymentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3503,9 +3511,11 @@ export const se_UpdateDocumentationPartCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3541,9 +3551,11 @@ export const se_UpdateDocumentationVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3570,9 +3582,11 @@ export const se_UpdateDomainNameCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}"; resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName!, "{domainName}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3608,9 +3622,11 @@ export const se_UpdateGatewayResponseCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3640,9 +3656,11 @@ export const se_UpdateIntegrationCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "resourceId", () => input.resourceId!, "{resourceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3673,9 +3691,11 @@ export const se_UpdateIntegrationResponseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); resolvedPath = __resolvedPath(resolvedPath, input, "statusCode", () => input.statusCode!, "{statusCode}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3705,9 +3725,11 @@ export const se_UpdateMethodCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "resourceId", () => input.resourceId!, "{resourceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3738,9 +3760,11 @@ export const se_UpdateMethodResponseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "httpMethod", () => input.httpMethod!, "{httpMethod}", false); resolvedPath = __resolvedPath(resolvedPath, input, "statusCode", () => input.statusCode!, "{statusCode}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3768,9 +3792,11 @@ export const se_UpdateModelCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "modelName", () => input.modelName!, "{modelName}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3806,9 +3832,11 @@ export const se_UpdateRequestValidatorCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3837,9 +3865,11 @@ export const se_UpdateResourceCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "resourceId", () => input.resourceId!, "{resourceId}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3865,9 +3895,11 @@ export const se_UpdateRestApiCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}"; resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3895,9 +3927,11 @@ export const se_UpdateStageCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "restApiId", () => input.restApiId!, "{restApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "stageName", () => input.stageName!, "{stageName}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3926,9 +3960,11 @@ export const se_UpdateUsageCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "usagePlanId", () => input.usagePlanId!, "{usagePlanId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "keyId", () => input.keyId!, "{keyId}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3955,9 +3991,11 @@ export const se_UpdateUsagePlanCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}"; resolvedPath = __resolvedPath(resolvedPath, input, "usagePlanId", () => input.usagePlanId!, "{usagePlanId}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3983,9 +4021,11 @@ export const se_UpdateVpcLinkCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}"; resolvedPath = __resolvedPath(resolvedPath, input, "vpcLinkId", () => input.vpcLinkId!, "{vpcLinkId}", false); let body: any; - body = JSON.stringify({ - ...(input.patchOperations != null && { patchOperations: se_ListOfPatchOperation(input.patchOperations, context) }), - }); + body = JSON.stringify( + take(input, { + patchOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4011,36 +4051,19 @@ export const de_CreateApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.customerId != null) { - contents.customerId = __expectString(data.customerId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enabled != null) { - contents.enabled = __expectBoolean(data.enabled); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stageKeys != null) { - contents.stageKeys = de_ListOfString(data.stageKeys, context); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.value != null) { - contents.value = __expectString(data.value); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerId: __expectString, + description: __expectString, + enabled: __expectBoolean, + id: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stageKeys: _json, + tags: _json, + value: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4077,10 +4100,9 @@ const de_CreateApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4100,36 +4122,19 @@ export const de_CreateAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.authorizerCredentials != null) { - contents.authorizerCredentials = __expectString(data.authorizerCredentials); - } - if (data.authorizerResultTtlInSeconds != null) { - contents.authorizerResultTtlInSeconds = __expectInt32(data.authorizerResultTtlInSeconds); - } - if (data.authorizerUri != null) { - contents.authorizerUri = __expectString(data.authorizerUri); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.identitySource != null) { - contents.identitySource = __expectString(data.identitySource); - } - if (data.identityValidationExpression != null) { - contents.identityValidationExpression = __expectString(data.identityValidationExpression); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.providerARNs != null) { - contents.providerARNs = de_ListOfARNs(data.providerARNs, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + authType: __expectString, + authorizerCredentials: __expectString, + authorizerResultTtlInSeconds: __expectInt32, + authorizerUri: __expectString, + id: __expectString, + identitySource: __expectString, + identityValidationExpression: __expectString, + name: __expectString, + providerARNs: _json, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4166,10 +4171,9 @@ const de_CreateAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4189,15 +4193,12 @@ export const de_CreateBasePathMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.basePath != null) { - contents.basePath = __expectString(data.basePath); - } - if (data.restApiId != null) { - contents.restApiId = __expectString(data.restApiId); - } - if (data.stage != null) { - contents.stage = __expectString(data.stage); - } + const doc = take(data, { + basePath: __expectString, + restApiId: __expectString, + stage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4234,10 +4235,9 @@ const de_CreateBasePathMappingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4257,18 +4257,13 @@ export const de_CreateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiSummary != null) { - contents.apiSummary = de_PathToMapOfMethodSnapshot(data.apiSummary, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + apiSummary: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4308,10 +4303,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4331,15 +4325,12 @@ export const de_CreateDocumentationPartCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.location != null) { - contents.location = de_DocumentationPartLocation(data.location, context); - } - if (data.properties != null) { - contents.properties = __expectString(data.properties); - } + const doc = take(data, { + id: __expectString, + location: _json, + properties: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4376,10 +4367,9 @@ const de_CreateDocumentationPartCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4399,15 +4389,12 @@ export const de_CreateDocumentationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4444,10 +4431,9 @@ const de_CreateDocumentationVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4467,57 +4453,26 @@ export const de_CreateDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateName != null) { - contents.certificateName = __expectString(data.certificateName); - } - if (data.certificateUploadDate != null) { - contents.certificateUploadDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.certificateUploadDate))); - } - if (data.distributionDomainName != null) { - contents.distributionDomainName = __expectString(data.distributionDomainName); - } - if (data.distributionHostedZoneId != null) { - contents.distributionHostedZoneId = __expectString(data.distributionHostedZoneId); - } - if (data.domainName != null) { - contents.domainName = __expectString(data.domainName); - } - if (data.domainNameStatus != null) { - contents.domainNameStatus = __expectString(data.domainNameStatus); - } - if (data.domainNameStatusMessage != null) { - contents.domainNameStatusMessage = __expectString(data.domainNameStatusMessage); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.mutualTlsAuthentication != null) { - contents.mutualTlsAuthentication = de_MutualTlsAuthentication(data.mutualTlsAuthentication, context); - } - if (data.ownershipVerificationCertificateArn != null) { - contents.ownershipVerificationCertificateArn = __expectString(data.ownershipVerificationCertificateArn); - } - if (data.regionalCertificateArn != null) { - contents.regionalCertificateArn = __expectString(data.regionalCertificateArn); - } - if (data.regionalCertificateName != null) { - contents.regionalCertificateName = __expectString(data.regionalCertificateName); - } - if (data.regionalDomainName != null) { - contents.regionalDomainName = __expectString(data.regionalDomainName); - } - if (data.regionalHostedZoneId != null) { - contents.regionalHostedZoneId = __expectString(data.regionalHostedZoneId); - } - if (data.securityPolicy != null) { - contents.securityPolicy = __expectString(data.securityPolicy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + certificateArn: __expectString, + certificateName: __expectString, + certificateUploadDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + distributionDomainName: __expectString, + distributionHostedZoneId: __expectString, + domainName: __expectString, + domainNameStatus: __expectString, + domainNameStatusMessage: __expectString, + endpointConfiguration: _json, + mutualTlsAuthentication: _json, + ownershipVerificationCertificateArn: __expectString, + regionalCertificateArn: __expectString, + regionalCertificateName: __expectString, + regionalDomainName: __expectString, + regionalHostedZoneId: __expectString, + securityPolicy: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4551,10 +4506,9 @@ const de_CreateDomainNameCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4574,21 +4528,14 @@ export const de_CreateModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentType != null) { - contents.contentType = __expectString(data.contentType); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.schema != null) { - contents.schema = __expectString(data.schema); - } + const doc = take(data, { + contentType: __expectString, + description: __expectString, + id: __expectString, + name: __expectString, + schema: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4625,10 +4572,9 @@ const de_CreateModelCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4648,18 +4594,13 @@ export const de_CreateRequestValidatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.validateRequestBody != null) { - contents.validateRequestBody = __expectBoolean(data.validateRequestBody); - } - if (data.validateRequestParameters != null) { - contents.validateRequestParameters = __expectBoolean(data.validateRequestParameters); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + validateRequestBody: __expectBoolean, + validateRequestParameters: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -4696,10 +4637,9 @@ const de_CreateRequestValidatorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4719,21 +4659,14 @@ export const de_CreateResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.parentId != null) { - contents.parentId = __expectString(data.parentId); - } - if (data.path != null) { - contents.path = __expectString(data.path); - } - if (data.pathPart != null) { - contents.pathPart = __expectString(data.pathPart); - } - if (data.resourceMethods != null) { - contents.resourceMethods = de_MapOfMethod(data.resourceMethods, context); - } + const doc = take(data, { + id: __expectString, + parentId: __expectString, + path: __expectString, + pathPart: __expectString, + resourceMethods: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4770,10 +4703,9 @@ const de_CreateResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4793,45 +4725,22 @@ export const de_CreateRestApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeySource != null) { - contents.apiKeySource = __expectString(data.apiKeySource); - } - if (data.binaryMediaTypes != null) { - contents.binaryMediaTypes = de_ListOfString(data.binaryMediaTypes, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.disableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.minimumCompressionSize != null) { - contents.minimumCompressionSize = __expectInt32(data.minimumCompressionSize); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + apiKeySource: __expectString, + binaryMediaTypes: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + disableExecuteApiEndpoint: __expectBoolean, + endpointConfiguration: _json, + id: __expectString, + minimumCompressionSize: __expectInt32, + name: __expectString, + policy: __expectString, + tags: _json, + version: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4865,10 +4774,9 @@ const de_CreateRestApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4888,57 +4796,26 @@ export const de_CreateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessLogSettings != null) { - contents.accessLogSettings = de_AccessLogSettings(data.accessLogSettings, context); - } - if (data.cacheClusterEnabled != null) { - contents.cacheClusterEnabled = __expectBoolean(data.cacheClusterEnabled); - } - if (data.cacheClusterSize != null) { - contents.cacheClusterSize = __expectString(data.cacheClusterSize); - } - if (data.cacheClusterStatus != null) { - contents.cacheClusterStatus = __expectString(data.cacheClusterStatus); - } - if (data.canarySettings != null) { - contents.canarySettings = de_CanarySettings(data.canarySettings, context); - } - if (data.clientCertificateId != null) { - contents.clientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.documentationVersion != null) { - contents.documentationVersion = __expectString(data.documentationVersion); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.methodSettings != null) { - contents.methodSettings = de_MapOfMethodSettings(data.methodSettings, context); - } - if (data.stageName != null) { - contents.stageName = __expectString(data.stageName); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.tracingEnabled != null) { - contents.tracingEnabled = __expectBoolean(data.tracingEnabled); - } - if (data.variables != null) { - contents.variables = de_MapOfStringToString(data.variables, context); - } - if (data.webAclArn != null) { - contents.webAclArn = __expectString(data.webAclArn); - } + const doc = take(data, { + accessLogSettings: _json, + cacheClusterEnabled: __expectBoolean, + cacheClusterSize: __expectString, + cacheClusterStatus: __expectString, + canarySettings: (_) => de_CanarySettings(_, context), + clientCertificateId: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + description: __expectString, + documentationVersion: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + methodSettings: (_) => de_MapOfMethodSettings(_, context), + stageName: __expectString, + tags: _json, + tracingEnabled: __expectBoolean, + variables: _json, + webAclArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4975,10 +4852,9 @@ const de_CreateStageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4998,30 +4874,17 @@ export const de_CreateUsagePlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiStages != null) { - contents.apiStages = de_ListOfApiStage(data.apiStages, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.productCode != null) { - contents.productCode = __expectString(data.productCode); - } - if (data.quota != null) { - contents.quota = de_QuotaSettings(data.quota, context); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.throttle != null) { - contents.throttle = de_ThrottleSettings(data.throttle, context); - } + const doc = take(data, { + apiStages: (_) => de_ListOfApiStage(_, context), + description: __expectString, + id: __expectString, + name: __expectString, + productCode: __expectString, + quota: _json, + tags: _json, + throttle: (_) => de_ThrottleSettings(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5058,10 +4921,9 @@ const de_CreateUsagePlanCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5081,18 +4943,13 @@ export const de_CreateUsagePlanKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.value != null) { - contents.value = __expectString(data.value); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + type: __expectString, + value: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5129,10 +4986,9 @@ const de_CreateUsagePlanKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5152,27 +5008,16 @@ export const de_CreateVpcLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.targetArns != null) { - contents.targetArns = de_ListOfString(data.targetArns, context); - } + const doc = take(data, { + description: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + statusMessage: __expectString, + tags: _json, + targetArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5206,10 +5051,9 @@ const de_CreateVpcLinkCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5262,10 +5106,9 @@ const de_DeleteApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5318,10 +5161,9 @@ const de_DeleteAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5374,10 +5216,9 @@ const de_DeleteBasePathMappingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5430,10 +5271,9 @@ const de_DeleteClientCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5489,10 +5329,9 @@ const de_DeleteDeploymentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5545,10 +5384,9 @@ const de_DeleteDocumentationPartCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5601,10 +5439,9 @@ const de_DeleteDocumentationVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5657,10 +5494,9 @@ const de_DeleteDomainNameCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5713,10 +5549,9 @@ const de_DeleteGatewayResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5769,10 +5604,9 @@ const de_DeleteIntegrationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5825,10 +5659,9 @@ const de_DeleteIntegrationResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5878,10 +5711,9 @@ const de_DeleteMethodCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5934,10 +5766,9 @@ const de_DeleteMethodResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5990,10 +5821,9 @@ const de_DeleteModelCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6046,10 +5876,9 @@ const de_DeleteRequestValidatorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6102,10 +5931,9 @@ const de_DeleteResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6158,10 +5986,9 @@ const de_DeleteRestApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6217,10 +6044,9 @@ const de_DeleteStageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6273,10 +6099,9 @@ const de_DeleteUsagePlanCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6329,10 +6154,9 @@ const de_DeleteUsagePlanKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6385,10 +6209,9 @@ const de_DeleteVpcLinkCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6444,10 +6267,9 @@ const de_FlushStageAuthorizersCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6503,10 +6325,9 @@ const de_FlushStageCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6526,24 +6347,15 @@ export const de_GenerateClientCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientCertificateId != null) { - contents.clientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.expirationDate != null) { - contents.expirationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expirationDate))); - } - if (data.pemEncodedCertificate != null) { - contents.pemEncodedCertificate = __expectString(data.pemEncodedCertificate); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + clientCertificateId: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + expirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pemEncodedCertificate: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6577,10 +6389,9 @@ const de_GenerateClientCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6600,18 +6411,13 @@ export const de_GetAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeyVersion != null) { - contents.apiKeyVersion = __expectString(data.apiKeyVersion); - } - if (data.cloudwatchRoleArn != null) { - contents.cloudwatchRoleArn = __expectString(data.cloudwatchRoleArn); - } - if (data.features != null) { - contents.features = de_ListOfString(data.features, context); - } - if (data.throttleSettings != null) { - contents.throttleSettings = de_ThrottleSettings(data.throttleSettings, context); - } + const doc = take(data, { + apiKeyVersion: __expectString, + cloudwatchRoleArn: __expectString, + features: _json, + throttleSettings: (_) => de_ThrottleSettings(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6642,10 +6448,9 @@ const de_GetAccountCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6665,36 +6470,19 @@ export const de_GetApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.customerId != null) { - contents.customerId = __expectString(data.customerId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enabled != null) { - contents.enabled = __expectBoolean(data.enabled); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stageKeys != null) { - contents.stageKeys = de_ListOfString(data.stageKeys, context); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.value != null) { - contents.value = __expectString(data.value); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerId: __expectString, + description: __expectString, + enabled: __expectBoolean, + id: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stageKeys: _json, + tags: _json, + value: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6725,10 +6513,9 @@ const de_GetApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6748,15 +6535,12 @@ export const de_GetApiKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfApiKey(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + items: [, (_) => de_ListOfApiKey(_, context), `item`], + position: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6787,10 +6571,9 @@ const de_GetApiKeysCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6810,36 +6593,19 @@ export const de_GetAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.authorizerCredentials != null) { - contents.authorizerCredentials = __expectString(data.authorizerCredentials); - } - if (data.authorizerResultTtlInSeconds != null) { - contents.authorizerResultTtlInSeconds = __expectInt32(data.authorizerResultTtlInSeconds); - } - if (data.authorizerUri != null) { - contents.authorizerUri = __expectString(data.authorizerUri); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.identitySource != null) { - contents.identitySource = __expectString(data.identitySource); - } - if (data.identityValidationExpression != null) { - contents.identityValidationExpression = __expectString(data.identityValidationExpression); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.providerARNs != null) { - contents.providerARNs = de_ListOfARNs(data.providerARNs, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + authType: __expectString, + authorizerCredentials: __expectString, + authorizerResultTtlInSeconds: __expectInt32, + authorizerUri: __expectString, + id: __expectString, + identitySource: __expectString, + identityValidationExpression: __expectString, + name: __expectString, + providerARNs: _json, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6870,10 +6636,9 @@ const de_GetAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6893,12 +6658,11 @@ export const de_GetAuthorizersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfAuthorizer(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6929,10 +6693,9 @@ const de_GetAuthorizersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6952,15 +6715,12 @@ export const de_GetBasePathMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.basePath != null) { - contents.basePath = __expectString(data.basePath); - } - if (data.restApiId != null) { - contents.restApiId = __expectString(data.restApiId); - } - if (data.stage != null) { - contents.stage = __expectString(data.stage); - } + const doc = take(data, { + basePath: __expectString, + restApiId: __expectString, + stage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6991,10 +6751,9 @@ const de_GetBasePathMappingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7014,12 +6773,11 @@ export const de_GetBasePathMappingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfBasePathMapping(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7050,10 +6808,9 @@ const de_GetBasePathMappingsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7073,24 +6830,15 @@ export const de_GetClientCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientCertificateId != null) { - contents.clientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.expirationDate != null) { - contents.expirationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expirationDate))); - } - if (data.pemEncodedCertificate != null) { - contents.pemEncodedCertificate = __expectString(data.pemEncodedCertificate); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + clientCertificateId: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + expirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pemEncodedCertificate: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7121,10 +6869,9 @@ const de_GetClientCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7144,12 +6891,11 @@ export const de_GetClientCertificatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfClientCertificate(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, (_) => de_ListOfClientCertificate(_, context), `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7180,10 +6926,9 @@ const de_GetClientCertificatesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7203,18 +6948,13 @@ export const de_GetDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiSummary != null) { - contents.apiSummary = de_PathToMapOfMethodSnapshot(data.apiSummary, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + apiSummary: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7248,10 +6988,9 @@ const de_GetDeploymentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7271,12 +7010,11 @@ export const de_GetDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfDeployment(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, (_) => de_ListOfDeployment(_, context), `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7310,10 +7048,9 @@ const de_GetDeploymentsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7333,15 +7070,12 @@ export const de_GetDocumentationPartCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.location != null) { - contents.location = de_DocumentationPartLocation(data.location, context); - } - if (data.properties != null) { - contents.properties = __expectString(data.properties); - } + const doc = take(data, { + id: __expectString, + location: _json, + properties: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7372,10 +7106,9 @@ const de_GetDocumentationPartCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7395,12 +7128,11 @@ export const de_GetDocumentationPartsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfDocumentationPart(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7431,10 +7163,9 @@ const de_GetDocumentationPartsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7454,15 +7185,12 @@ export const de_GetDocumentationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7490,10 +7218,9 @@ const de_GetDocumentationVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7513,12 +7240,11 @@ export const de_GetDocumentationVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfDocumentationVersion(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, (_) => de_ListOfDocumentationVersion(_, context), `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7549,10 +7275,9 @@ const de_GetDocumentationVersionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7572,57 +7297,26 @@ export const de_GetDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateName != null) { - contents.certificateName = __expectString(data.certificateName); - } - if (data.certificateUploadDate != null) { - contents.certificateUploadDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.certificateUploadDate))); - } - if (data.distributionDomainName != null) { - contents.distributionDomainName = __expectString(data.distributionDomainName); - } - if (data.distributionHostedZoneId != null) { - contents.distributionHostedZoneId = __expectString(data.distributionHostedZoneId); - } - if (data.domainName != null) { - contents.domainName = __expectString(data.domainName); - } - if (data.domainNameStatus != null) { - contents.domainNameStatus = __expectString(data.domainNameStatus); - } - if (data.domainNameStatusMessage != null) { - contents.domainNameStatusMessage = __expectString(data.domainNameStatusMessage); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.mutualTlsAuthentication != null) { - contents.mutualTlsAuthentication = de_MutualTlsAuthentication(data.mutualTlsAuthentication, context); - } - if (data.ownershipVerificationCertificateArn != null) { - contents.ownershipVerificationCertificateArn = __expectString(data.ownershipVerificationCertificateArn); - } - if (data.regionalCertificateArn != null) { - contents.regionalCertificateArn = __expectString(data.regionalCertificateArn); - } - if (data.regionalCertificateName != null) { - contents.regionalCertificateName = __expectString(data.regionalCertificateName); - } - if (data.regionalDomainName != null) { - contents.regionalDomainName = __expectString(data.regionalDomainName); - } - if (data.regionalHostedZoneId != null) { - contents.regionalHostedZoneId = __expectString(data.regionalHostedZoneId); - } - if (data.securityPolicy != null) { - contents.securityPolicy = __expectString(data.securityPolicy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + certificateArn: __expectString, + certificateName: __expectString, + certificateUploadDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + distributionDomainName: __expectString, + distributionHostedZoneId: __expectString, + domainName: __expectString, + domainNameStatus: __expectString, + domainNameStatusMessage: __expectString, + endpointConfiguration: _json, + mutualTlsAuthentication: _json, + ownershipVerificationCertificateArn: __expectString, + regionalCertificateArn: __expectString, + regionalCertificateName: __expectString, + regionalDomainName: __expectString, + regionalHostedZoneId: __expectString, + securityPolicy: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7653,10 +7347,9 @@ const de_GetDomainNameCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7676,12 +7369,11 @@ export const de_GetDomainNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfDomainName(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, (_) => de_ListOfDomainName(_, context), `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7712,10 +7404,9 @@ const de_GetDomainNamesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7774,10 +7465,9 @@ const de_GetExportCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7797,21 +7487,14 @@ export const de_GetGatewayResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.defaultResponse != null) { - contents.defaultResponse = __expectBoolean(data.defaultResponse); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToString(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.responseTemplates = de_MapOfStringToString(data.responseTemplates, context); - } - if (data.responseType != null) { - contents.responseType = __expectString(data.responseType); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + defaultResponse: __expectBoolean, + responseParameters: _json, + responseTemplates: _json, + responseType: __expectString, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7842,10 +7525,9 @@ const de_GetGatewayResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7865,12 +7547,11 @@ export const de_GetGatewayResponsesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfGatewayResponse(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7901,10 +7582,9 @@ const de_GetGatewayResponsesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7924,51 +7604,24 @@ export const de_GetIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cacheKeyParameters != null) { - contents.cacheKeyParameters = de_ListOfString(data.cacheKeyParameters, context); - } - if (data.cacheNamespace != null) { - contents.cacheNamespace = __expectString(data.cacheNamespace); - } - if (data.connectionId != null) { - contents.connectionId = __expectString(data.connectionId); - } - if (data.connectionType != null) { - contents.connectionType = __expectString(data.connectionType); - } - if (data.contentHandling != null) { - contents.contentHandling = __expectString(data.contentHandling); - } - if (data.credentials != null) { - contents.credentials = __expectString(data.credentials); - } - if (data.httpMethod != null) { - contents.httpMethod = __expectString(data.httpMethod); - } - if (data.integrationResponses != null) { - contents.integrationResponses = de_MapOfIntegrationResponse(data.integrationResponses, context); - } - if (data.passthroughBehavior != null) { - contents.passthroughBehavior = __expectString(data.passthroughBehavior); - } - if (data.requestParameters != null) { - contents.requestParameters = de_MapOfStringToString(data.requestParameters, context); - } - if (data.requestTemplates != null) { - contents.requestTemplates = de_MapOfStringToString(data.requestTemplates, context); - } - if (data.timeoutInMillis != null) { - contents.timeoutInMillis = __expectInt32(data.timeoutInMillis); - } - if (data.tlsConfig != null) { - contents.tlsConfig = de_TlsConfig(data.tlsConfig, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.uri != null) { - contents.uri = __expectString(data.uri); - } + const doc = take(data, { + cacheKeyParameters: _json, + cacheNamespace: __expectString, + connectionId: __expectString, + connectionType: __expectString, + contentHandling: __expectString, + credentials: __expectString, + httpMethod: __expectString, + integrationResponses: _json, + passthroughBehavior: __expectString, + requestParameters: _json, + requestTemplates: _json, + timeoutInMillis: __expectInt32, + tlsConfig: _json, + type: __expectString, + uri: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7999,10 +7652,9 @@ const de_GetIntegrationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8022,21 +7674,14 @@ export const de_GetIntegrationResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentHandling != null) { - contents.contentHandling = __expectString(data.contentHandling); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToString(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.responseTemplates = de_MapOfStringToString(data.responseTemplates, context); - } - if (data.selectionPattern != null) { - contents.selectionPattern = __expectString(data.selectionPattern); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + contentHandling: __expectString, + responseParameters: _json, + responseTemplates: _json, + selectionPattern: __expectString, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8067,10 +7712,9 @@ const de_GetIntegrationResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8090,39 +7734,20 @@ export const de_GetMethodCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeyRequired != null) { - contents.apiKeyRequired = __expectBoolean(data.apiKeyRequired); - } - if (data.authorizationScopes != null) { - contents.authorizationScopes = de_ListOfString(data.authorizationScopes, context); - } - if (data.authorizationType != null) { - contents.authorizationType = __expectString(data.authorizationType); - } - if (data.authorizerId != null) { - contents.authorizerId = __expectString(data.authorizerId); - } - if (data.httpMethod != null) { - contents.httpMethod = __expectString(data.httpMethod); - } - if (data.methodIntegration != null) { - contents.methodIntegration = de_Integration(data.methodIntegration, context); - } - if (data.methodResponses != null) { - contents.methodResponses = de_MapOfMethodResponse(data.methodResponses, context); - } - if (data.operationName != null) { - contents.operationName = __expectString(data.operationName); - } - if (data.requestModels != null) { - contents.requestModels = de_MapOfStringToString(data.requestModels, context); - } - if (data.requestParameters != null) { - contents.requestParameters = de_MapOfStringToBoolean(data.requestParameters, context); - } - if (data.requestValidatorId != null) { - contents.requestValidatorId = __expectString(data.requestValidatorId); - } + const doc = take(data, { + apiKeyRequired: __expectBoolean, + authorizationScopes: _json, + authorizationType: __expectString, + authorizerId: __expectString, + httpMethod: __expectString, + methodIntegration: _json, + methodResponses: _json, + operationName: __expectString, + requestModels: _json, + requestParameters: _json, + requestValidatorId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8150,10 +7775,9 @@ const de_GetMethodCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8173,15 +7797,12 @@ export const de_GetMethodResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.responseModels != null) { - contents.responseModels = de_MapOfStringToString(data.responseModels, context); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToBoolean(data.responseParameters, context); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + responseModels: _json, + responseParameters: _json, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8209,10 +7830,9 @@ const de_GetMethodResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8232,21 +7852,14 @@ export const de_GetModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentType != null) { - contents.contentType = __expectString(data.contentType); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.schema != null) { - contents.schema = __expectString(data.schema); - } + const doc = take(data, { + contentType: __expectString, + description: __expectString, + id: __expectString, + name: __expectString, + schema: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8277,10 +7890,9 @@ const de_GetModelCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8300,12 +7912,11 @@ export const de_GetModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfModel(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8336,10 +7947,9 @@ const de_GetModelsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8359,9 +7969,10 @@ export const de_GetModelTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.value != null) { - contents.value = __expectString(data.value); - } + const doc = take(data, { + value: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8392,10 +8003,9 @@ const de_GetModelTemplateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8415,18 +8025,13 @@ export const de_GetRequestValidatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.validateRequestBody != null) { - contents.validateRequestBody = __expectBoolean(data.validateRequestBody); - } - if (data.validateRequestParameters != null) { - contents.validateRequestParameters = __expectBoolean(data.validateRequestParameters); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + validateRequestBody: __expectBoolean, + validateRequestParameters: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -8457,10 +8062,9 @@ const de_GetRequestValidatorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8480,12 +8084,11 @@ export const de_GetRequestValidatorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfRequestValidator(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8516,10 +8119,9 @@ const de_GetRequestValidatorsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8539,21 +8141,14 @@ export const de_GetResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.parentId != null) { - contents.parentId = __expectString(data.parentId); - } - if (data.path != null) { - contents.path = __expectString(data.path); - } - if (data.pathPart != null) { - contents.pathPart = __expectString(data.pathPart); - } - if (data.resourceMethods != null) { - contents.resourceMethods = de_MapOfMethod(data.resourceMethods, context); - } + const doc = take(data, { + id: __expectString, + parentId: __expectString, + path: __expectString, + pathPart: __expectString, + resourceMethods: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8581,10 +8176,9 @@ const de_GetResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8604,12 +8198,11 @@ export const de_GetResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfResource(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8640,10 +8233,9 @@ const de_GetResourcesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8663,45 +8255,22 @@ export const de_GetRestApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeySource != null) { - contents.apiKeySource = __expectString(data.apiKeySource); - } - if (data.binaryMediaTypes != null) { - contents.binaryMediaTypes = de_ListOfString(data.binaryMediaTypes, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.disableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.minimumCompressionSize != null) { - contents.minimumCompressionSize = __expectInt32(data.minimumCompressionSize); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + apiKeySource: __expectString, + binaryMediaTypes: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + disableExecuteApiEndpoint: __expectBoolean, + endpointConfiguration: _json, + id: __expectString, + minimumCompressionSize: __expectInt32, + name: __expectString, + policy: __expectString, + tags: _json, + version: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8732,10 +8301,9 @@ const de_GetRestApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8755,12 +8323,11 @@ export const de_GetRestApisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfRestApi(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, (_) => de_ListOfRestApi(_, context), `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8791,10 +8358,9 @@ const de_GetRestApisCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8850,10 +8416,9 @@ const de_GetSdkCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8873,18 +8438,13 @@ export const de_GetSdkTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationProperties != null) { - contents.configurationProperties = de_ListOfSdkConfigurationProperty(data.configurationProperties, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.friendlyName != null) { - contents.friendlyName = __expectString(data.friendlyName); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + configurationProperties: _json, + description: __expectString, + friendlyName: __expectString, + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8915,10 +8475,9 @@ const de_GetSdkTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8938,9 +8497,10 @@ export const de_GetSdkTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfSdkType(data.item, context); - } + const doc = take(data, { + items: [, _json, `item`], + }); + Object.assign(contents, doc); return contents; }; @@ -8971,10 +8531,9 @@ const de_GetSdkTypesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8994,57 +8553,26 @@ export const de_GetStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessLogSettings != null) { - contents.accessLogSettings = de_AccessLogSettings(data.accessLogSettings, context); - } - if (data.cacheClusterEnabled != null) { - contents.cacheClusterEnabled = __expectBoolean(data.cacheClusterEnabled); - } - if (data.cacheClusterSize != null) { - contents.cacheClusterSize = __expectString(data.cacheClusterSize); - } - if (data.cacheClusterStatus != null) { - contents.cacheClusterStatus = __expectString(data.cacheClusterStatus); - } - if (data.canarySettings != null) { - contents.canarySettings = de_CanarySettings(data.canarySettings, context); - } - if (data.clientCertificateId != null) { - contents.clientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.documentationVersion != null) { - contents.documentationVersion = __expectString(data.documentationVersion); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.methodSettings != null) { - contents.methodSettings = de_MapOfMethodSettings(data.methodSettings, context); - } - if (data.stageName != null) { - contents.stageName = __expectString(data.stageName); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.tracingEnabled != null) { - contents.tracingEnabled = __expectBoolean(data.tracingEnabled); - } - if (data.variables != null) { - contents.variables = de_MapOfStringToString(data.variables, context); - } - if (data.webAclArn != null) { - contents.webAclArn = __expectString(data.webAclArn); - } + const doc = take(data, { + accessLogSettings: _json, + cacheClusterEnabled: __expectBoolean, + cacheClusterSize: __expectString, + cacheClusterStatus: __expectString, + canarySettings: (_) => de_CanarySettings(_, context), + clientCertificateId: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + description: __expectString, + documentationVersion: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + methodSettings: (_) => de_MapOfMethodSettings(_, context), + stageName: __expectString, + tags: _json, + tracingEnabled: __expectBoolean, + variables: _json, + webAclArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9081,10 +8609,9 @@ const de_GetStageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9104,9 +8631,10 @@ export const de_GetStagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.item = de_ListOfStage(data.item, context); - } + const doc = take(data, { + item: (_) => de_ListOfStage(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9143,10 +8671,9 @@ const de_GetStagesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9166,9 +8693,10 @@ export const de_GetTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9199,10 +8727,9 @@ const de_GetTagsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9222,21 +8749,14 @@ export const de_GetUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endDate != null) { - contents.endDate = __expectString(data.endDate); - } - if (data.values != null) { - contents.items = de_MapOfKeyUsages(data.values, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } - if (data.startDate != null) { - contents.startDate = __expectString(data.startDate); - } - if (data.usagePlanId != null) { - contents.usagePlanId = __expectString(data.usagePlanId); - } + const doc = take(data, { + endDate: __expectString, + items: [, _json, `values`], + position: __expectString, + startDate: __expectString, + usagePlanId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9267,10 +8787,9 @@ const de_GetUsageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9290,30 +8809,17 @@ export const de_GetUsagePlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiStages != null) { - contents.apiStages = de_ListOfApiStage(data.apiStages, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.productCode != null) { - contents.productCode = __expectString(data.productCode); - } - if (data.quota != null) { - contents.quota = de_QuotaSettings(data.quota, context); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.throttle != null) { - contents.throttle = de_ThrottleSettings(data.throttle, context); - } + const doc = take(data, { + apiStages: (_) => de_ListOfApiStage(_, context), + description: __expectString, + id: __expectString, + name: __expectString, + productCode: __expectString, + quota: _json, + tags: _json, + throttle: (_) => de_ThrottleSettings(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9344,10 +8850,9 @@ const de_GetUsagePlanCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9367,18 +8872,13 @@ export const de_GetUsagePlanKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.value != null) { - contents.value = __expectString(data.value); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + type: __expectString, + value: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9409,10 +8909,9 @@ const de_GetUsagePlanKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9432,12 +8931,11 @@ export const de_GetUsagePlanKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfUsagePlanKey(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9468,10 +8966,9 @@ const de_GetUsagePlanKeysCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9491,12 +8988,11 @@ export const de_GetUsagePlansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfUsagePlan(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, (_) => de_ListOfUsagePlan(_, context), `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9527,10 +9023,9 @@ const de_GetUsagePlansCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9550,27 +9045,16 @@ export const de_GetVpcLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.targetArns != null) { - contents.targetArns = de_ListOfString(data.targetArns, context); - } + const doc = take(data, { + description: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + statusMessage: __expectString, + tags: _json, + targetArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9601,10 +9085,9 @@ const de_GetVpcLinkCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9624,12 +9107,11 @@ export const de_GetVpcLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.item != null) { - contents.items = de_ListOfVpcLink(data.item, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } + const doc = take(data, { + items: [, _json, `item`], + position: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9660,10 +9142,9 @@ const de_GetVpcLinksCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9683,12 +9164,11 @@ export const de_ImportApiKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ids != null) { - contents.ids = de_ListOfString(data.ids, context); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + ids: _json, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9725,10 +9205,9 @@ const de_ImportApiKeysCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9748,12 +9227,11 @@ export const de_ImportDocumentationPartsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ids != null) { - contents.ids = de_ListOfString(data.ids, context); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + ids: _json, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9790,10 +9268,9 @@ const de_ImportDocumentationPartsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9813,45 +9290,22 @@ export const de_ImportRestApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeySource != null) { - contents.apiKeySource = __expectString(data.apiKeySource); - } - if (data.binaryMediaTypes != null) { - contents.binaryMediaTypes = de_ListOfString(data.binaryMediaTypes, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.disableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.minimumCompressionSize != null) { - contents.minimumCompressionSize = __expectInt32(data.minimumCompressionSize); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + apiKeySource: __expectString, + binaryMediaTypes: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + disableExecuteApiEndpoint: __expectBoolean, + endpointConfiguration: _json, + id: __expectString, + minimumCompressionSize: __expectInt32, + name: __expectString, + policy: __expectString, + tags: _json, + version: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9888,10 +9342,9 @@ const de_ImportRestApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9911,21 +9364,14 @@ export const de_PutGatewayResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.defaultResponse != null) { - contents.defaultResponse = __expectBoolean(data.defaultResponse); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToString(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.responseTemplates = de_MapOfStringToString(data.responseTemplates, context); - } - if (data.responseType != null) { - contents.responseType = __expectString(data.responseType); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + defaultResponse: __expectBoolean, + responseParameters: _json, + responseTemplates: _json, + responseType: __expectString, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9962,10 +9408,9 @@ const de_PutGatewayResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9985,51 +9430,24 @@ export const de_PutIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cacheKeyParameters != null) { - contents.cacheKeyParameters = de_ListOfString(data.cacheKeyParameters, context); - } - if (data.cacheNamespace != null) { - contents.cacheNamespace = __expectString(data.cacheNamespace); - } - if (data.connectionId != null) { - contents.connectionId = __expectString(data.connectionId); - } - if (data.connectionType != null) { - contents.connectionType = __expectString(data.connectionType); - } - if (data.contentHandling != null) { - contents.contentHandling = __expectString(data.contentHandling); - } - if (data.credentials != null) { - contents.credentials = __expectString(data.credentials); - } - if (data.httpMethod != null) { - contents.httpMethod = __expectString(data.httpMethod); - } - if (data.integrationResponses != null) { - contents.integrationResponses = de_MapOfIntegrationResponse(data.integrationResponses, context); - } - if (data.passthroughBehavior != null) { - contents.passthroughBehavior = __expectString(data.passthroughBehavior); - } - if (data.requestParameters != null) { - contents.requestParameters = de_MapOfStringToString(data.requestParameters, context); - } - if (data.requestTemplates != null) { - contents.requestTemplates = de_MapOfStringToString(data.requestTemplates, context); - } - if (data.timeoutInMillis != null) { - contents.timeoutInMillis = __expectInt32(data.timeoutInMillis); - } - if (data.tlsConfig != null) { - contents.tlsConfig = de_TlsConfig(data.tlsConfig, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.uri != null) { - contents.uri = __expectString(data.uri); - } + const doc = take(data, { + cacheKeyParameters: _json, + cacheNamespace: __expectString, + connectionId: __expectString, + connectionType: __expectString, + contentHandling: __expectString, + credentials: __expectString, + httpMethod: __expectString, + integrationResponses: _json, + passthroughBehavior: __expectString, + requestParameters: _json, + requestTemplates: _json, + timeoutInMillis: __expectInt32, + tlsConfig: _json, + type: __expectString, + uri: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10066,10 +9484,9 @@ const de_PutIntegrationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10089,21 +9506,14 @@ export const de_PutIntegrationResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentHandling != null) { - contents.contentHandling = __expectString(data.contentHandling); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToString(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.responseTemplates = de_MapOfStringToString(data.responseTemplates, context); - } - if (data.selectionPattern != null) { - contents.selectionPattern = __expectString(data.selectionPattern); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + contentHandling: __expectString, + responseParameters: _json, + responseTemplates: _json, + selectionPattern: __expectString, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10140,10 +9550,9 @@ const de_PutIntegrationResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10163,39 +9572,20 @@ export const de_PutMethodCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeyRequired != null) { - contents.apiKeyRequired = __expectBoolean(data.apiKeyRequired); - } - if (data.authorizationScopes != null) { - contents.authorizationScopes = de_ListOfString(data.authorizationScopes, context); - } - if (data.authorizationType != null) { - contents.authorizationType = __expectString(data.authorizationType); - } - if (data.authorizerId != null) { - contents.authorizerId = __expectString(data.authorizerId); - } - if (data.httpMethod != null) { - contents.httpMethod = __expectString(data.httpMethod); - } - if (data.methodIntegration != null) { - contents.methodIntegration = de_Integration(data.methodIntegration, context); - } - if (data.methodResponses != null) { - contents.methodResponses = de_MapOfMethodResponse(data.methodResponses, context); - } - if (data.operationName != null) { - contents.operationName = __expectString(data.operationName); - } - if (data.requestModels != null) { - contents.requestModels = de_MapOfStringToString(data.requestModels, context); - } - if (data.requestParameters != null) { - contents.requestParameters = de_MapOfStringToBoolean(data.requestParameters, context); - } - if (data.requestValidatorId != null) { - contents.requestValidatorId = __expectString(data.requestValidatorId); - } + const doc = take(data, { + apiKeyRequired: __expectBoolean, + authorizationScopes: _json, + authorizationType: __expectString, + authorizerId: __expectString, + httpMethod: __expectString, + methodIntegration: _json, + methodResponses: _json, + operationName: __expectString, + requestModels: _json, + requestParameters: _json, + requestValidatorId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10232,10 +9622,9 @@ const de_PutMethodCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10255,15 +9644,12 @@ export const de_PutMethodResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.responseModels != null) { - contents.responseModels = de_MapOfStringToString(data.responseModels, context); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToBoolean(data.responseParameters, context); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + responseModels: _json, + responseParameters: _json, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10300,10 +9686,9 @@ const de_PutMethodResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10323,45 +9708,22 @@ export const de_PutRestApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeySource != null) { - contents.apiKeySource = __expectString(data.apiKeySource); - } - if (data.binaryMediaTypes != null) { - contents.binaryMediaTypes = de_ListOfString(data.binaryMediaTypes, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.disableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.minimumCompressionSize != null) { - contents.minimumCompressionSize = __expectInt32(data.minimumCompressionSize); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + apiKeySource: __expectString, + binaryMediaTypes: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + disableExecuteApiEndpoint: __expectBoolean, + endpointConfiguration: _json, + id: __expectString, + minimumCompressionSize: __expectInt32, + name: __expectString, + policy: __expectString, + tags: _json, + version: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -10398,10 +9760,9 @@ const de_PutRestApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10457,10 +9818,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10480,27 +9840,16 @@ export const de_TestInvokeAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorization != null) { - contents.authorization = de_MapOfStringToList(data.authorization, context); - } - if (data.claims != null) { - contents.claims = de_MapOfStringToString(data.claims, context); - } - if (data.clientStatus != null) { - contents.clientStatus = __expectInt32(data.clientStatus); - } - if (data.latency != null) { - contents.latency = __expectLong(data.latency); - } - if (data.log != null) { - contents.log = __expectString(data.log); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.principalId != null) { - contents.principalId = __expectString(data.principalId); - } + const doc = take(data, { + authorization: _json, + claims: _json, + clientStatus: __expectInt32, + latency: __expectLong, + log: __expectString, + policy: __expectString, + principalId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10531,10 +9880,9 @@ const de_TestInvokeAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10554,24 +9902,15 @@ export const de_TestInvokeMethodCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.body != null) { - contents.body = __expectString(data.body); - } - if (data.headers != null) { - contents.headers = de_MapOfStringToString(data.headers, context); - } - if (data.latency != null) { - contents.latency = __expectLong(data.latency); - } - if (data.log != null) { - contents.log = __expectString(data.log); - } - if (data.multiValueHeaders != null) { - contents.multiValueHeaders = de_MapOfStringToList(data.multiValueHeaders, context); - } - if (data.status != null) { - contents.status = __expectInt32(data.status); - } + const doc = take(data, { + body: __expectString, + headers: _json, + latency: __expectLong, + log: __expectString, + multiValueHeaders: _json, + status: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -10602,10 +9941,9 @@ const de_TestInvokeMethodCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10661,10 +9999,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10684,18 +10021,13 @@ export const de_UpdateAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeyVersion != null) { - contents.apiKeyVersion = __expectString(data.apiKeyVersion); - } - if (data.cloudwatchRoleArn != null) { - contents.cloudwatchRoleArn = __expectString(data.cloudwatchRoleArn); - } - if (data.features != null) { - contents.features = de_ListOfString(data.features, context); - } - if (data.throttleSettings != null) { - contents.throttleSettings = de_ThrottleSettings(data.throttleSettings, context); - } + const doc = take(data, { + apiKeyVersion: __expectString, + cloudwatchRoleArn: __expectString, + features: _json, + throttleSettings: (_) => de_ThrottleSettings(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -10732,10 +10064,9 @@ const de_UpdateAccountCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10755,36 +10086,19 @@ export const de_UpdateApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.customerId != null) { - contents.customerId = __expectString(data.customerId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enabled != null) { - contents.enabled = __expectBoolean(data.enabled); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stageKeys != null) { - contents.stageKeys = de_ListOfString(data.stageKeys, context); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.value != null) { - contents.value = __expectString(data.value); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerId: __expectString, + description: __expectString, + enabled: __expectBoolean, + id: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stageKeys: _json, + tags: _json, + value: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10821,10 +10135,9 @@ const de_UpdateApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10844,36 +10157,19 @@ export const de_UpdateAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.authorizerCredentials != null) { - contents.authorizerCredentials = __expectString(data.authorizerCredentials); - } - if (data.authorizerResultTtlInSeconds != null) { - contents.authorizerResultTtlInSeconds = __expectInt32(data.authorizerResultTtlInSeconds); - } - if (data.authorizerUri != null) { - contents.authorizerUri = __expectString(data.authorizerUri); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.identitySource != null) { - contents.identitySource = __expectString(data.identitySource); - } - if (data.identityValidationExpression != null) { - contents.identityValidationExpression = __expectString(data.identityValidationExpression); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.providerARNs != null) { - contents.providerARNs = de_ListOfARNs(data.providerARNs, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + authType: __expectString, + authorizerCredentials: __expectString, + authorizerResultTtlInSeconds: __expectInt32, + authorizerUri: __expectString, + id: __expectString, + identitySource: __expectString, + identityValidationExpression: __expectString, + name: __expectString, + providerARNs: _json, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10910,10 +10206,9 @@ const de_UpdateAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10933,15 +10228,12 @@ export const de_UpdateBasePathMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.basePath != null) { - contents.basePath = __expectString(data.basePath); - } - if (data.restApiId != null) { - contents.restApiId = __expectString(data.restApiId); - } - if (data.stage != null) { - contents.stage = __expectString(data.stage); - } + const doc = take(data, { + basePath: __expectString, + restApiId: __expectString, + stage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10978,10 +10270,9 @@ const de_UpdateBasePathMappingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11001,24 +10292,15 @@ export const de_UpdateClientCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientCertificateId != null) { - contents.clientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.expirationDate != null) { - contents.expirationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expirationDate))); - } - if (data.pemEncodedCertificate != null) { - contents.pemEncodedCertificate = __expectString(data.pemEncodedCertificate); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + clientCertificateId: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + expirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pemEncodedCertificate: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11055,10 +10337,9 @@ const de_UpdateClientCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11078,18 +10359,13 @@ export const de_UpdateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiSummary != null) { - contents.apiSummary = de_PathToMapOfMethodSnapshot(data.apiSummary, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + apiSummary: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11129,10 +10405,9 @@ const de_UpdateDeploymentCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11152,15 +10427,12 @@ export const de_UpdateDocumentationPartCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.location != null) { - contents.location = de_DocumentationPartLocation(data.location, context); - } - if (data.properties != null) { - contents.properties = __expectString(data.properties); - } + const doc = take(data, { + id: __expectString, + location: _json, + properties: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11197,10 +10469,9 @@ const de_UpdateDocumentationPartCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11220,15 +10491,12 @@ export const de_UpdateDocumentationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11265,10 +10533,9 @@ const de_UpdateDocumentationVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11288,57 +10555,26 @@ export const de_UpdateDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateName != null) { - contents.certificateName = __expectString(data.certificateName); - } - if (data.certificateUploadDate != null) { - contents.certificateUploadDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.certificateUploadDate))); - } - if (data.distributionDomainName != null) { - contents.distributionDomainName = __expectString(data.distributionDomainName); - } - if (data.distributionHostedZoneId != null) { - contents.distributionHostedZoneId = __expectString(data.distributionHostedZoneId); - } - if (data.domainName != null) { - contents.domainName = __expectString(data.domainName); - } - if (data.domainNameStatus != null) { - contents.domainNameStatus = __expectString(data.domainNameStatus); - } - if (data.domainNameStatusMessage != null) { - contents.domainNameStatusMessage = __expectString(data.domainNameStatusMessage); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.mutualTlsAuthentication != null) { - contents.mutualTlsAuthentication = de_MutualTlsAuthentication(data.mutualTlsAuthentication, context); - } - if (data.ownershipVerificationCertificateArn != null) { - contents.ownershipVerificationCertificateArn = __expectString(data.ownershipVerificationCertificateArn); - } - if (data.regionalCertificateArn != null) { - contents.regionalCertificateArn = __expectString(data.regionalCertificateArn); - } - if (data.regionalCertificateName != null) { - contents.regionalCertificateName = __expectString(data.regionalCertificateName); - } - if (data.regionalDomainName != null) { - contents.regionalDomainName = __expectString(data.regionalDomainName); - } - if (data.regionalHostedZoneId != null) { - contents.regionalHostedZoneId = __expectString(data.regionalHostedZoneId); - } - if (data.securityPolicy != null) { - contents.securityPolicy = __expectString(data.securityPolicy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } + const doc = take(data, { + certificateArn: __expectString, + certificateName: __expectString, + certificateUploadDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + distributionDomainName: __expectString, + distributionHostedZoneId: __expectString, + domainName: __expectString, + domainNameStatus: __expectString, + domainNameStatusMessage: __expectString, + endpointConfiguration: _json, + mutualTlsAuthentication: _json, + ownershipVerificationCertificateArn: __expectString, + regionalCertificateArn: __expectString, + regionalCertificateName: __expectString, + regionalDomainName: __expectString, + regionalHostedZoneId: __expectString, + securityPolicy: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11375,10 +10611,9 @@ const de_UpdateDomainNameCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11398,21 +10633,14 @@ export const de_UpdateGatewayResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.defaultResponse != null) { - contents.defaultResponse = __expectBoolean(data.defaultResponse); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToString(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.responseTemplates = de_MapOfStringToString(data.responseTemplates, context); - } - if (data.responseType != null) { - contents.responseType = __expectString(data.responseType); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + defaultResponse: __expectBoolean, + responseParameters: _json, + responseTemplates: _json, + responseType: __expectString, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11449,10 +10677,9 @@ const de_UpdateGatewayResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11472,51 +10699,24 @@ export const de_UpdateIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cacheKeyParameters != null) { - contents.cacheKeyParameters = de_ListOfString(data.cacheKeyParameters, context); - } - if (data.cacheNamespace != null) { - contents.cacheNamespace = __expectString(data.cacheNamespace); - } - if (data.connectionId != null) { - contents.connectionId = __expectString(data.connectionId); - } - if (data.connectionType != null) { - contents.connectionType = __expectString(data.connectionType); - } - if (data.contentHandling != null) { - contents.contentHandling = __expectString(data.contentHandling); - } - if (data.credentials != null) { - contents.credentials = __expectString(data.credentials); - } - if (data.httpMethod != null) { - contents.httpMethod = __expectString(data.httpMethod); - } - if (data.integrationResponses != null) { - contents.integrationResponses = de_MapOfIntegrationResponse(data.integrationResponses, context); - } - if (data.passthroughBehavior != null) { - contents.passthroughBehavior = __expectString(data.passthroughBehavior); - } - if (data.requestParameters != null) { - contents.requestParameters = de_MapOfStringToString(data.requestParameters, context); - } - if (data.requestTemplates != null) { - contents.requestTemplates = de_MapOfStringToString(data.requestTemplates, context); - } - if (data.timeoutInMillis != null) { - contents.timeoutInMillis = __expectInt32(data.timeoutInMillis); - } - if (data.tlsConfig != null) { - contents.tlsConfig = de_TlsConfig(data.tlsConfig, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.uri != null) { - contents.uri = __expectString(data.uri); - } + const doc = take(data, { + cacheKeyParameters: _json, + cacheNamespace: __expectString, + connectionId: __expectString, + connectionType: __expectString, + contentHandling: __expectString, + credentials: __expectString, + httpMethod: __expectString, + integrationResponses: _json, + passthroughBehavior: __expectString, + requestParameters: _json, + requestTemplates: _json, + timeoutInMillis: __expectInt32, + tlsConfig: _json, + type: __expectString, + uri: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11553,10 +10753,9 @@ const de_UpdateIntegrationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11576,21 +10775,14 @@ export const de_UpdateIntegrationResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentHandling != null) { - contents.contentHandling = __expectString(data.contentHandling); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToString(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.responseTemplates = de_MapOfStringToString(data.responseTemplates, context); - } - if (data.selectionPattern != null) { - contents.selectionPattern = __expectString(data.selectionPattern); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + contentHandling: __expectString, + responseParameters: _json, + responseTemplates: _json, + selectionPattern: __expectString, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11627,10 +10819,9 @@ const de_UpdateIntegrationResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11650,39 +10841,20 @@ export const de_UpdateMethodCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeyRequired != null) { - contents.apiKeyRequired = __expectBoolean(data.apiKeyRequired); - } - if (data.authorizationScopes != null) { - contents.authorizationScopes = de_ListOfString(data.authorizationScopes, context); - } - if (data.authorizationType != null) { - contents.authorizationType = __expectString(data.authorizationType); - } - if (data.authorizerId != null) { - contents.authorizerId = __expectString(data.authorizerId); - } - if (data.httpMethod != null) { - contents.httpMethod = __expectString(data.httpMethod); - } - if (data.methodIntegration != null) { - contents.methodIntegration = de_Integration(data.methodIntegration, context); - } - if (data.methodResponses != null) { - contents.methodResponses = de_MapOfMethodResponse(data.methodResponses, context); - } - if (data.operationName != null) { - contents.operationName = __expectString(data.operationName); - } - if (data.requestModels != null) { - contents.requestModels = de_MapOfStringToString(data.requestModels, context); - } - if (data.requestParameters != null) { - contents.requestParameters = de_MapOfStringToBoolean(data.requestParameters, context); - } - if (data.requestValidatorId != null) { - contents.requestValidatorId = __expectString(data.requestValidatorId); - } + const doc = take(data, { + apiKeyRequired: __expectBoolean, + authorizationScopes: _json, + authorizationType: __expectString, + authorizerId: __expectString, + httpMethod: __expectString, + methodIntegration: _json, + methodResponses: _json, + operationName: __expectString, + requestModels: _json, + requestParameters: _json, + requestValidatorId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11716,10 +10888,9 @@ const de_UpdateMethodCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11739,15 +10910,12 @@ export const de_UpdateMethodResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.responseModels != null) { - contents.responseModels = de_MapOfStringToString(data.responseModels, context); - } - if (data.responseParameters != null) { - contents.responseParameters = de_MapOfStringToBoolean(data.responseParameters, context); - } - if (data.statusCode != null) { - contents.statusCode = __expectString(data.statusCode); - } + const doc = take(data, { + responseModels: _json, + responseParameters: _json, + statusCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11784,10 +10952,9 @@ const de_UpdateMethodResponseCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11807,21 +10974,14 @@ export const de_UpdateModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentType != null) { - contents.contentType = __expectString(data.contentType); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.schema != null) { - contents.schema = __expectString(data.schema); - } + const doc = take(data, { + contentType: __expectString, + description: __expectString, + id: __expectString, + name: __expectString, + schema: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11858,10 +11018,9 @@ const de_UpdateModelCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11881,18 +11040,13 @@ export const de_UpdateRequestValidatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.validateRequestBody != null) { - contents.validateRequestBody = __expectBoolean(data.validateRequestBody); - } - if (data.validateRequestParameters != null) { - contents.validateRequestParameters = __expectBoolean(data.validateRequestParameters); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + validateRequestBody: __expectBoolean, + validateRequestParameters: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -11929,10 +11083,9 @@ const de_UpdateRequestValidatorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11952,21 +11105,14 @@ export const de_UpdateResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.parentId != null) { - contents.parentId = __expectString(data.parentId); - } - if (data.path != null) { - contents.path = __expectString(data.path); - } - if (data.pathPart != null) { - contents.pathPart = __expectString(data.pathPart); - } - if (data.resourceMethods != null) { - contents.resourceMethods = de_MapOfMethod(data.resourceMethods, context); - } + const doc = take(data, { + id: __expectString, + parentId: __expectString, + path: __expectString, + pathPart: __expectString, + resourceMethods: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12000,10 +11146,9 @@ const de_UpdateResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12023,45 +11168,22 @@ export const de_UpdateRestApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeySource != null) { - contents.apiKeySource = __expectString(data.apiKeySource); - } - if (data.binaryMediaTypes != null) { - contents.binaryMediaTypes = de_ListOfString(data.binaryMediaTypes, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.disableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.endpointConfiguration != null) { - contents.endpointConfiguration = de_EndpointConfiguration(data.endpointConfiguration, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.minimumCompressionSize != null) { - contents.minimumCompressionSize = __expectInt32(data.minimumCompressionSize); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.warnings != null) { - contents.warnings = de_ListOfString(data.warnings, context); - } + const doc = take(data, { + apiKeySource: __expectString, + binaryMediaTypes: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + disableExecuteApiEndpoint: __expectBoolean, + endpointConfiguration: _json, + id: __expectString, + minimumCompressionSize: __expectInt32, + name: __expectString, + policy: __expectString, + tags: _json, + version: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12098,10 +11220,9 @@ const de_UpdateRestApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12121,57 +11242,26 @@ export const de_UpdateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessLogSettings != null) { - contents.accessLogSettings = de_AccessLogSettings(data.accessLogSettings, context); - } - if (data.cacheClusterEnabled != null) { - contents.cacheClusterEnabled = __expectBoolean(data.cacheClusterEnabled); - } - if (data.cacheClusterSize != null) { - contents.cacheClusterSize = __expectString(data.cacheClusterSize); - } - if (data.cacheClusterStatus != null) { - contents.cacheClusterStatus = __expectString(data.cacheClusterStatus); - } - if (data.canarySettings != null) { - contents.canarySettings = de_CanarySettings(data.canarySettings, context); - } - if (data.clientCertificateId != null) { - contents.clientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.documentationVersion != null) { - contents.documentationVersion = __expectString(data.documentationVersion); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.methodSettings != null) { - contents.methodSettings = de_MapOfMethodSettings(data.methodSettings, context); - } - if (data.stageName != null) { - contents.stageName = __expectString(data.stageName); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.tracingEnabled != null) { - contents.tracingEnabled = __expectBoolean(data.tracingEnabled); - } - if (data.variables != null) { - contents.variables = de_MapOfStringToString(data.variables, context); - } - if (data.webAclArn != null) { - contents.webAclArn = __expectString(data.webAclArn); - } + const doc = take(data, { + accessLogSettings: _json, + cacheClusterEnabled: __expectBoolean, + cacheClusterSize: __expectString, + cacheClusterStatus: __expectString, + canarySettings: (_) => de_CanarySettings(_, context), + clientCertificateId: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + description: __expectString, + documentationVersion: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + methodSettings: (_) => de_MapOfMethodSettings(_, context), + stageName: __expectString, + tags: _json, + tracingEnabled: __expectBoolean, + variables: _json, + webAclArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -12208,10 +11298,9 @@ const de_UpdateStageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12231,21 +11320,14 @@ export const de_UpdateUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endDate != null) { - contents.endDate = __expectString(data.endDate); - } - if (data.values != null) { - contents.items = de_MapOfKeyUsages(data.values, context); - } - if (data.position != null) { - contents.position = __expectString(data.position); - } - if (data.startDate != null) { - contents.startDate = __expectString(data.startDate); - } - if (data.usagePlanId != null) { - contents.usagePlanId = __expectString(data.usagePlanId); - } + const doc = take(data, { + endDate: __expectString, + items: [, _json, `values`], + position: __expectString, + startDate: __expectString, + usagePlanId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -12282,10 +11364,9 @@ const de_UpdateUsageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12305,30 +11386,17 @@ export const de_UpdateUsagePlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiStages != null) { - contents.apiStages = de_ListOfApiStage(data.apiStages, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.productCode != null) { - contents.productCode = __expectString(data.productCode); - } - if (data.quota != null) { - contents.quota = de_QuotaSettings(data.quota, context); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.throttle != null) { - contents.throttle = de_ThrottleSettings(data.throttle, context); - } + const doc = take(data, { + apiStages: (_) => de_ListOfApiStage(_, context), + description: __expectString, + id: __expectString, + name: __expectString, + productCode: __expectString, + quota: _json, + tags: _json, + throttle: (_) => de_ThrottleSettings(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12365,10 +11433,9 @@ const de_UpdateUsagePlanCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12388,27 +11455,16 @@ export const de_UpdateVpcLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.tags != null) { - contents.tags = de_MapOfStringToString(data.tags, context); - } - if (data.targetArns != null) { - contents.targetArns = de_ListOfString(data.targetArns, context); - } + const doc = take(data, { + description: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + statusMessage: __expectString, + tags: _json, + targetArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12445,25 +11501,25 @@ const de_UpdateVpcLinkCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12477,9 +11533,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12498,9 +11555,10 @@ const de_LimitExceededExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12514,9 +11572,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12535,9 +11594,10 @@ const de_ServiceUnavailableExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12556,9 +11616,10 @@ const de_TooManyRequestsExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12575,9 +11636,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12589,62 +11651,39 @@ const de_UnauthorizedExceptionRes = async ( * serializeAws_restJson1ApiStage */ const se_ApiStage = (input: ApiStage, context: __SerdeContext): any => { - return { - ...(input.apiId != null && { apiId: input.apiId }), - ...(input.stage != null && { stage: input.stage }), - ...(input.throttle != null && { throttle: se_MapOfApiStageThrottleSettings(input.throttle, context) }), - }; + return take(input, { + apiId: [], + stage: [], + throttle: (_) => se_MapOfApiStageThrottleSettings(_, context), + }); }; /** * serializeAws_restJson1CanarySettings */ const se_CanarySettings = (input: CanarySettings, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.percentTraffic != null && { percentTraffic: __serializeFloat(input.percentTraffic) }), - ...(input.stageVariableOverrides != null && { - stageVariableOverrides: se_MapOfStringToString(input.stageVariableOverrides, context), - }), - ...(input.useStageCache != null && { useStageCache: input.useStageCache }), - }; + return take(input, { + deploymentId: [], + percentTraffic: __serializeFloat, + stageVariableOverrides: _json, + useStageCache: [], + }); }; /** * serializeAws_restJson1DeploymentCanarySettings */ const se_DeploymentCanarySettings = (input: DeploymentCanarySettings, context: __SerdeContext): any => { - return { - ...(input.percentTraffic != null && { percentTraffic: __serializeFloat(input.percentTraffic) }), - ...(input.stageVariableOverrides != null && { - stageVariableOverrides: se_MapOfStringToString(input.stageVariableOverrides, context), - }), - ...(input.useStageCache != null && { useStageCache: input.useStageCache }), - }; + return take(input, { + percentTraffic: __serializeFloat, + stageVariableOverrides: _json, + useStageCache: [], + }); }; -/** - * serializeAws_restJson1DocumentationPartLocation - */ -const se_DocumentationPartLocation = (input: DocumentationPartLocation, context: __SerdeContext): any => { - return { - ...(input.method != null && { method: input.method }), - ...(input.name != null && { name: input.name }), - ...(input.path != null && { path: input.path }), - ...(input.statusCode != null && { statusCode: input.statusCode }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_DocumentationPartLocation omitted. -/** - * serializeAws_restJson1EndpointConfiguration - */ -const se_EndpointConfiguration = (input: EndpointConfiguration, context: __SerdeContext): any => { - return { - ...(input.types != null && { types: se_ListOfEndpointType(input.types, context) }), - ...(input.vpcEndpointIds != null && { vpcEndpointIds: se_ListOfString(input.vpcEndpointIds, context) }), - }; -}; +// se_EndpointConfiguration omitted. /** * serializeAws_restJson1ListOfApiStage @@ -12657,63 +11696,18 @@ const se_ListOfApiStage = (input: ApiStage[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1ListOfARNs - */ -const se_ListOfARNs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfARNs omitted. -/** - * serializeAws_restJson1ListOfEndpointType - */ -const se_ListOfEndpointType = (input: (EndpointType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfEndpointType omitted. -/** - * serializeAws_restJson1ListOfPatchOperation - */ -const se_ListOfPatchOperation = (input: PatchOperation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PatchOperation(entry, context); - }); -}; +// se_ListOfPatchOperation omitted. -/** - * serializeAws_restJson1ListOfStageKeys - */ -const se_ListOfStageKeys = (input: StageKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StageKey(entry, context); - }); -}; +// se_ListOfStageKeys omitted. + +// se_ListOfString omitted. /** - * serializeAws_restJson1ListOfString - */ -const se_ListOfString = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1MapOfApiStageThrottleSettings + * serializeAws_restJson1MapOfApiStageThrottleSettings */ const se_MapOfApiStageThrottleSettings = (input: Record, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { @@ -12725,372 +11719,153 @@ const se_MapOfApiStageThrottleSettings = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_MapOfStringToBoolean omitted. -/** - * serializeAws_restJson1MapOfStringToList - */ -const se_MapOfStringToList = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ListOfString(value, context); - return acc; - }, {}); -}; +// se_MapOfStringToList omitted. -/** - * serializeAws_restJson1MapOfStringToString - */ -const se_MapOfStringToString = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_MapOfStringToString omitted. -/** - * serializeAws_restJson1MutualTlsAuthenticationInput - */ -const se_MutualTlsAuthenticationInput = (input: MutualTlsAuthenticationInput, context: __SerdeContext): any => { - return { - ...(input.truststoreUri != null && { truststoreUri: input.truststoreUri }), - ...(input.truststoreVersion != null && { truststoreVersion: input.truststoreVersion }), - }; -}; +// se_MutualTlsAuthenticationInput omitted. -/** - * serializeAws_restJson1PatchOperation - */ -const se_PatchOperation = (input: PatchOperation, context: __SerdeContext): any => { - return { - ...(input.from != null && { from: input.from }), - ...(input.op != null && { op: input.op }), - ...(input.path != null && { path: input.path }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_PatchOperation omitted. -/** - * serializeAws_restJson1QuotaSettings - */ -const se_QuotaSettings = (input: QuotaSettings, context: __SerdeContext): any => { - return { - ...(input.limit != null && { limit: input.limit }), - ...(input.offset != null && { offset: input.offset }), - ...(input.period != null && { period: input.period }), - }; -}; +// se_QuotaSettings omitted. -/** - * serializeAws_restJson1StageKey - */ -const se_StageKey = (input: StageKey, context: __SerdeContext): any => { - return { - ...(input.restApiId != null && { restApiId: input.restApiId }), - ...(input.stageName != null && { stageName: input.stageName }), - }; -}; +// se_StageKey omitted. /** * serializeAws_restJson1ThrottleSettings */ const se_ThrottleSettings = (input: ThrottleSettings, context: __SerdeContext): any => { - return { - ...(input.burstLimit != null && { burstLimit: input.burstLimit }), - ...(input.rateLimit != null && { rateLimit: __serializeFloat(input.rateLimit) }), - }; + return take(input, { + burstLimit: [], + rateLimit: __serializeFloat, + }); }; -/** - * serializeAws_restJson1TlsConfig - */ -const se_TlsConfig = (input: TlsConfig, context: __SerdeContext): any => { - return { - ...(input.insecureSkipVerification != null && { insecureSkipVerification: input.insecureSkipVerification }), - }; -}; +// se_TlsConfig omitted. -/** - * deserializeAws_restJson1AccessLogSettings - */ -const de_AccessLogSettings = (output: any, context: __SerdeContext): AccessLogSettings => { - return { - destinationArn: __expectString(output.destinationArn), - format: __expectString(output.format), - } as any; -}; +// de_AccessLogSettings omitted. /** * deserializeAws_restJson1ApiKey */ const de_ApiKey = (output: any, context: __SerdeContext): ApiKey => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - customerId: __expectString(output.customerId), - description: __expectString(output.description), - enabled: __expectBoolean(output.enabled), - id: __expectString(output.id), - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - name: __expectString(output.name), - stageKeys: output.stageKeys != null ? de_ListOfString(output.stageKeys, context) : undefined, - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - value: __expectString(output.value), - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerId: __expectString, + description: __expectString, + enabled: __expectBoolean, + id: __expectString, + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stageKeys: _json, + tags: _json, + value: __expectString, + }) as any; }; /** * deserializeAws_restJson1ApiStage */ const de_ApiStage = (output: any, context: __SerdeContext): ApiStage => { - return { - apiId: __expectString(output.apiId), - stage: __expectString(output.stage), - throttle: output.throttle != null ? de_MapOfApiStageThrottleSettings(output.throttle, context) : undefined, - } as any; + return take(output, { + apiId: __expectString, + stage: __expectString, + throttle: (_: any) => de_MapOfApiStageThrottleSettings(_, context), + }) as any; }; -/** - * deserializeAws_restJson1Authorizer - */ -const de_Authorizer = (output: any, context: __SerdeContext): Authorizer => { - return { - authType: __expectString(output.authType), - authorizerCredentials: __expectString(output.authorizerCredentials), - authorizerResultTtlInSeconds: __expectInt32(output.authorizerResultTtlInSeconds), - authorizerUri: __expectString(output.authorizerUri), - id: __expectString(output.id), - identitySource: __expectString(output.identitySource), - identityValidationExpression: __expectString(output.identityValidationExpression), - name: __expectString(output.name), - providerARNs: output.providerARNs != null ? de_ListOfARNs(output.providerARNs, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_Authorizer omitted. -/** - * deserializeAws_restJson1BasePathMapping - */ -const de_BasePathMapping = (output: any, context: __SerdeContext): BasePathMapping => { - return { - basePath: __expectString(output.basePath), - restApiId: __expectString(output.restApiId), - stage: __expectString(output.stage), - } as any; -}; +// de_BasePathMapping omitted. /** * deserializeAws_restJson1CanarySettings */ const de_CanarySettings = (output: any, context: __SerdeContext): CanarySettings => { - return { - deploymentId: __expectString(output.deploymentId), - percentTraffic: __limitedParseDouble(output.percentTraffic), - stageVariableOverrides: - output.stageVariableOverrides != null - ? de_MapOfStringToString(output.stageVariableOverrides, context) - : undefined, - useStageCache: __expectBoolean(output.useStageCache), - } as any; + return take(output, { + deploymentId: __expectString, + percentTraffic: __limitedParseDouble, + stageVariableOverrides: _json, + useStageCache: __expectBoolean, + }) as any; }; /** * deserializeAws_restJson1ClientCertificate */ const de_ClientCertificate = (output: any, context: __SerdeContext): ClientCertificate => { - return { - clientCertificateId: __expectString(output.clientCertificateId), - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - expirationDate: - output.expirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expirationDate))) - : undefined, - pemEncodedCertificate: __expectString(output.pemEncodedCertificate), - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - } as any; + return take(output, { + clientCertificateId: __expectString, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + expirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pemEncodedCertificate: __expectString, + tags: _json, + }) as any; }; /** * deserializeAws_restJson1Deployment */ const de_Deployment = (output: any, context: __SerdeContext): Deployment => { - return { - apiSummary: output.apiSummary != null ? de_PathToMapOfMethodSnapshot(output.apiSummary, context) : undefined, - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - } as any; + return take(output, { + apiSummary: _json, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DocumentationPart - */ -const de_DocumentationPart = (output: any, context: __SerdeContext): DocumentationPart => { - return { - id: __expectString(output.id), - location: output.location != null ? de_DocumentationPartLocation(output.location, context) : undefined, - properties: __expectString(output.properties), - } as any; -}; +// de_DocumentationPart omitted. -/** - * deserializeAws_restJson1DocumentationPartLocation - */ -const de_DocumentationPartLocation = (output: any, context: __SerdeContext): DocumentationPartLocation => { - return { - method: __expectString(output.method), - name: __expectString(output.name), - path: __expectString(output.path), - statusCode: __expectString(output.statusCode), - type: __expectString(output.type), - } as any; -}; +// de_DocumentationPartLocation omitted. /** * deserializeAws_restJson1DocumentationVersion */ const de_DocumentationVersion = (output: any, context: __SerdeContext): DocumentationVersion => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - version: __expectString(output.version), - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + version: __expectString, + }) as any; }; /** * deserializeAws_restJson1DomainName */ const de_DomainName = (output: any, context: __SerdeContext): DomainName => { - return { - certificateArn: __expectString(output.certificateArn), - certificateName: __expectString(output.certificateName), - certificateUploadDate: - output.certificateUploadDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.certificateUploadDate))) - : undefined, - distributionDomainName: __expectString(output.distributionDomainName), - distributionHostedZoneId: __expectString(output.distributionHostedZoneId), - domainName: __expectString(output.domainName), - domainNameStatus: __expectString(output.domainNameStatus), - domainNameStatusMessage: __expectString(output.domainNameStatusMessage), - endpointConfiguration: - output.endpointConfiguration != null - ? de_EndpointConfiguration(output.endpointConfiguration, context) - : undefined, - mutualTlsAuthentication: - output.mutualTlsAuthentication != null - ? de_MutualTlsAuthentication(output.mutualTlsAuthentication, context) - : undefined, - ownershipVerificationCertificateArn: __expectString(output.ownershipVerificationCertificateArn), - regionalCertificateArn: __expectString(output.regionalCertificateArn), - regionalCertificateName: __expectString(output.regionalCertificateName), - regionalDomainName: __expectString(output.regionalDomainName), - regionalHostedZoneId: __expectString(output.regionalHostedZoneId), - securityPolicy: __expectString(output.securityPolicy), - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EndpointConfiguration - */ -const de_EndpointConfiguration = (output: any, context: __SerdeContext): EndpointConfiguration => { - return { - types: output.types != null ? de_ListOfEndpointType(output.types, context) : undefined, - vpcEndpointIds: output.vpcEndpointIds != null ? de_ListOfString(output.vpcEndpointIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GatewayResponse - */ -const de_GatewayResponse = (output: any, context: __SerdeContext): GatewayResponse => { - return { - defaultResponse: __expectBoolean(output.defaultResponse), - responseParameters: - output.responseParameters != null ? de_MapOfStringToString(output.responseParameters, context) : undefined, - responseTemplates: - output.responseTemplates != null ? de_MapOfStringToString(output.responseTemplates, context) : undefined, - responseType: __expectString(output.responseType), - statusCode: __expectString(output.statusCode), - } as any; -}; - -/** - * deserializeAws_restJson1Integration - */ -const de_Integration = (output: any, context: __SerdeContext): Integration => { - return { - cacheKeyParameters: - output.cacheKeyParameters != null ? de_ListOfString(output.cacheKeyParameters, context) : undefined, - cacheNamespace: __expectString(output.cacheNamespace), - connectionId: __expectString(output.connectionId), - connectionType: __expectString(output.connectionType), - contentHandling: __expectString(output.contentHandling), - credentials: __expectString(output.credentials), - httpMethod: __expectString(output.httpMethod), - integrationResponses: - output.integrationResponses != null - ? de_MapOfIntegrationResponse(output.integrationResponses, context) - : undefined, - passthroughBehavior: __expectString(output.passthroughBehavior), - requestParameters: - output.requestParameters != null ? de_MapOfStringToString(output.requestParameters, context) : undefined, - requestTemplates: - output.requestTemplates != null ? de_MapOfStringToString(output.requestTemplates, context) : undefined, - timeoutInMillis: __expectInt32(output.timeoutInMillis), - tlsConfig: output.tlsConfig != null ? de_TlsConfig(output.tlsConfig, context) : undefined, - type: __expectString(output.type), - uri: __expectString(output.uri), - } as any; -}; - -/** - * deserializeAws_restJson1IntegrationResponse - */ -const de_IntegrationResponse = (output: any, context: __SerdeContext): IntegrationResponse => { - return { - contentHandling: __expectString(output.contentHandling), - responseParameters: - output.responseParameters != null ? de_MapOfStringToString(output.responseParameters, context) : undefined, - responseTemplates: - output.responseTemplates != null ? de_MapOfStringToString(output.responseTemplates, context) : undefined, - selectionPattern: __expectString(output.selectionPattern), - statusCode: __expectString(output.statusCode), - } as any; + return take(output, { + certificateArn: __expectString, + certificateName: __expectString, + certificateUploadDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + distributionDomainName: __expectString, + distributionHostedZoneId: __expectString, + domainName: __expectString, + domainNameStatus: __expectString, + domainNameStatusMessage: __expectString, + endpointConfiguration: _json, + mutualTlsAuthentication: _json, + ownershipVerificationCertificateArn: __expectString, + regionalCertificateArn: __expectString, + regionalCertificateName: __expectString, + regionalDomainName: __expectString, + regionalHostedZoneId: __expectString, + securityPolicy: __expectString, + tags: _json, + }) as any; }; +// de_EndpointConfiguration omitted. + +// de_GatewayResponse omitted. + +// de_Integration omitted. + +// de_IntegrationResponse omitted. + /** * deserializeAws_restJson1ListOfApiKey */ @@ -13098,9 +11873,6 @@ const de_ListOfApiKey = (output: any, context: __SerdeContext): ApiKey[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApiKey(entry, context); }); return retVal; @@ -13113,58 +11885,16 @@ const de_ListOfApiStage = (output: any, context: __SerdeContext): ApiStage[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApiStage(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfARNs - */ -const de_ListOfARNs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfARNs omitted. -/** - * deserializeAws_restJson1ListOfAuthorizer - */ -const de_ListOfAuthorizer = (output: any, context: __SerdeContext): Authorizer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Authorizer(entry, context); - }); - return retVal; -}; +// de_ListOfAuthorizer omitted. -/** - * deserializeAws_restJson1ListOfBasePathMapping - */ -const de_ListOfBasePathMapping = (output: any, context: __SerdeContext): BasePathMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BasePathMapping(entry, context); - }); - return retVal; -}; +// de_ListOfBasePathMapping omitted. /** * deserializeAws_restJson1ListOfClientCertificate @@ -13173,9 +11903,6 @@ const de_ListOfClientCertificate = (output: any, context: __SerdeContext): Clien const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ClientCertificate(entry, context); }); return retVal; @@ -13188,28 +11915,12 @@ const de_ListOfDeployment = (output: any, context: __SerdeContext): Deployment[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Deployment(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfDocumentationPart - */ -const de_ListOfDocumentationPart = (output: any, context: __SerdeContext): DocumentationPart[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentationPart(entry, context); - }); - return retVal; -}; +// de_ListOfDocumentationPart omitted. /** * deserializeAws_restJson1ListOfDocumentationVersion @@ -13218,9 +11929,6 @@ const de_ListOfDocumentationVersion = (output: any, context: __SerdeContext): Do const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentationVersion(entry, context); }); return retVal; @@ -13233,103 +11941,22 @@ const de_ListOfDomainName = (output: any, context: __SerdeContext): DomainName[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainName(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfEndpointType - */ -const de_ListOfEndpointType = (output: any, context: __SerdeContext): (EndpointType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfEndpointType omitted. -/** - * deserializeAws_restJson1ListOfGatewayResponse - */ -const de_ListOfGatewayResponse = (output: any, context: __SerdeContext): GatewayResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewayResponse(entry, context); - }); - return retVal; -}; +// de_ListOfGatewayResponse omitted. -/** - * deserializeAws_restJson1ListOfLong - */ -const de_ListOfLong = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; - }); - return retVal; -}; +// de_ListOfLong omitted. -/** - * deserializeAws_restJson1ListOfModel - */ -const de_ListOfModel = (output: any, context: __SerdeContext): Model[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Model(entry, context); - }); - return retVal; -}; +// de_ListOfModel omitted. -/** - * deserializeAws_restJson1ListOfRequestValidator - */ -const de_ListOfRequestValidator = (output: any, context: __SerdeContext): RequestValidator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RequestValidator(entry, context); - }); - return retVal; -}; +// de_ListOfRequestValidator omitted. -/** - * deserializeAws_restJson1ListOfResource - */ -const de_ListOfResource = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_ListOfResource omitted. /** * deserializeAws_restJson1ListOfRestApi @@ -13338,43 +11965,14 @@ const de_ListOfRestApi = (output: any, context: __SerdeContext): RestApi[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RestApi(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfSdkConfigurationProperty - */ -const de_ListOfSdkConfigurationProperty = (output: any, context: __SerdeContext): SdkConfigurationProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SdkConfigurationProperty(entry, context); - }); - return retVal; -}; +// de_ListOfSdkConfigurationProperty omitted. -/** - * deserializeAws_restJson1ListOfSdkType - */ -const de_ListOfSdkType = (output: any, context: __SerdeContext): SdkType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SdkType(entry, context); - }); - return retVal; -}; +// de_ListOfSdkType omitted. /** * deserializeAws_restJson1ListOfStage @@ -13383,43 +11981,14 @@ const de_ListOfStage = (output: any, context: __SerdeContext): Stage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Stage(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfString - */ -const de_ListOfString = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfString omitted. -/** - * deserializeAws_restJson1ListOfUsage - */ -const de_ListOfUsage = (output: any, context: __SerdeContext): number[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListOfLong(entry, context); - }); - return retVal; -}; +// de_ListOfUsage omitted. /** * deserializeAws_restJson1ListOfUsagePlan @@ -13428,43 +11997,14 @@ const de_ListOfUsagePlan = (output: any, context: __SerdeContext): UsagePlan[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsagePlan(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfUsagePlanKey - */ -const de_ListOfUsagePlanKey = (output: any, context: __SerdeContext): UsagePlanKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UsagePlanKey(entry, context); - }); - return retVal; -}; +// de_ListOfUsagePlanKey omitted. -/** - * deserializeAws_restJson1ListOfVpcLink - */ -const de_ListOfVpcLink = (output: any, context: __SerdeContext): VpcLink[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcLink(entry, context); - }); - return retVal; -}; +// de_ListOfVpcLink omitted. /** * deserializeAws_restJson1MapOfApiStageThrottleSettings @@ -13479,57 +12019,13 @@ const de_MapOfApiStageThrottleSettings = (output: any, context: __SerdeContext): }, {}); }; -/** - * deserializeAws_restJson1MapOfIntegrationResponse - */ -const de_MapOfIntegrationResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_IntegrationResponse(value, context); - return acc; - }, {}); -}; +// de_MapOfIntegrationResponse omitted. -/** - * deserializeAws_restJson1MapOfKeyUsages - */ -const de_MapOfKeyUsages = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ListOfUsage(value, context); - return acc; - }, {}); -}; +// de_MapOfKeyUsages omitted. -/** - * deserializeAws_restJson1MapOfMethod - */ -const de_MapOfMethod = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Method(value, context); - return acc; - }, {}); -}; +// de_MapOfMethod omitted. -/** - * deserializeAws_restJson1MapOfMethodResponse - */ -const de_MapOfMethodResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MethodResponse(value, context); - return acc; - }, {}); -}; +// de_MapOfMethodResponse omitted. /** * deserializeAws_restJson1MapOfMethodSettings @@ -13544,348 +12040,131 @@ const de_MapOfMethodSettings = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MethodSnapshot(value, context); - return acc; - }, {}); -}; +// de_MapOfMethodSnapshot omitted. -/** - * deserializeAws_restJson1MapOfStringToBoolean - */ -const de_MapOfStringToBoolean = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectBoolean(value) as any; - return acc; - }, {}); -}; +// de_MapOfStringToBoolean omitted. -/** - * deserializeAws_restJson1MapOfStringToList - */ -const de_MapOfStringToList = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ListOfString(value, context); - return acc; - }, {}); -}; +// de_MapOfStringToList omitted. -/** - * deserializeAws_restJson1MapOfStringToString - */ -const de_MapOfStringToString = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MapOfStringToString omitted. -/** - * deserializeAws_restJson1Method - */ -const de_Method = (output: any, context: __SerdeContext): Method => { - return { - apiKeyRequired: __expectBoolean(output.apiKeyRequired), - authorizationScopes: - output.authorizationScopes != null ? de_ListOfString(output.authorizationScopes, context) : undefined, - authorizationType: __expectString(output.authorizationType), - authorizerId: __expectString(output.authorizerId), - httpMethod: __expectString(output.httpMethod), - methodIntegration: output.methodIntegration != null ? de_Integration(output.methodIntegration, context) : undefined, - methodResponses: - output.methodResponses != null ? de_MapOfMethodResponse(output.methodResponses, context) : undefined, - operationName: __expectString(output.operationName), - requestModels: output.requestModels != null ? de_MapOfStringToString(output.requestModels, context) : undefined, - requestParameters: - output.requestParameters != null ? de_MapOfStringToBoolean(output.requestParameters, context) : undefined, - requestValidatorId: __expectString(output.requestValidatorId), - } as any; -}; +// de_Method omitted. -/** - * deserializeAws_restJson1MethodResponse - */ -const de_MethodResponse = (output: any, context: __SerdeContext): MethodResponse => { - return { - responseModels: output.responseModels != null ? de_MapOfStringToString(output.responseModels, context) : undefined, - responseParameters: - output.responseParameters != null ? de_MapOfStringToBoolean(output.responseParameters, context) : undefined, - statusCode: __expectString(output.statusCode), - } as any; -}; +// de_MethodResponse omitted. /** * deserializeAws_restJson1MethodSetting */ const de_MethodSetting = (output: any, context: __SerdeContext): MethodSetting => { - return { - cacheDataEncrypted: __expectBoolean(output.cacheDataEncrypted), - cacheTtlInSeconds: __expectInt32(output.cacheTtlInSeconds), - cachingEnabled: __expectBoolean(output.cachingEnabled), - dataTraceEnabled: __expectBoolean(output.dataTraceEnabled), - loggingLevel: __expectString(output.loggingLevel), - metricsEnabled: __expectBoolean(output.metricsEnabled), - requireAuthorizationForCacheControl: __expectBoolean(output.requireAuthorizationForCacheControl), - throttlingBurstLimit: __expectInt32(output.throttlingBurstLimit), - throttlingRateLimit: __limitedParseDouble(output.throttlingRateLimit), - unauthorizedCacheControlHeaderStrategy: __expectString(output.unauthorizedCacheControlHeaderStrategy), - } as any; + return take(output, { + cacheDataEncrypted: __expectBoolean, + cacheTtlInSeconds: __expectInt32, + cachingEnabled: __expectBoolean, + dataTraceEnabled: __expectBoolean, + loggingLevel: __expectString, + metricsEnabled: __expectBoolean, + requireAuthorizationForCacheControl: __expectBoolean, + throttlingBurstLimit: __expectInt32, + throttlingRateLimit: __limitedParseDouble, + unauthorizedCacheControlHeaderStrategy: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1MethodSnapshot - */ -const de_MethodSnapshot = (output: any, context: __SerdeContext): MethodSnapshot => { - return { - apiKeyRequired: __expectBoolean(output.apiKeyRequired), - authorizationType: __expectString(output.authorizationType), - } as any; -}; +// de_MethodSnapshot omitted. -/** - * deserializeAws_restJson1Model - */ -const de_Model = (output: any, context: __SerdeContext): Model => { - return { - contentType: __expectString(output.contentType), - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - schema: __expectString(output.schema), - } as any; -}; +// de_Model omitted. -/** - * deserializeAws_restJson1MutualTlsAuthentication - */ -const de_MutualTlsAuthentication = (output: any, context: __SerdeContext): MutualTlsAuthentication => { - return { - truststoreUri: __expectString(output.truststoreUri), - truststoreVersion: __expectString(output.truststoreVersion), - truststoreWarnings: - output.truststoreWarnings != null ? de_ListOfString(output.truststoreWarnings, context) : undefined, - } as any; -}; +// de_MutualTlsAuthentication omitted. -/** - * deserializeAws_restJson1PathToMapOfMethodSnapshot - */ -const de_PathToMapOfMethodSnapshot = ( - output: any, - context: __SerdeContext -): Record> => { - return Object.entries(output).reduce( - (acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MapOfMethodSnapshot(value, context); - return acc; - }, - {} - ); -}; +// de_PathToMapOfMethodSnapshot omitted. -/** - * deserializeAws_restJson1QuotaSettings - */ -const de_QuotaSettings = (output: any, context: __SerdeContext): QuotaSettings => { - return { - limit: __expectInt32(output.limit), - offset: __expectInt32(output.offset), - period: __expectString(output.period), - } as any; -}; +// de_QuotaSettings omitted. -/** - * deserializeAws_restJson1RequestValidator - */ -const de_RequestValidator = (output: any, context: __SerdeContext): RequestValidator => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - validateRequestBody: __expectBoolean(output.validateRequestBody), - validateRequestParameters: __expectBoolean(output.validateRequestParameters), - } as any; -}; +// de_RequestValidator omitted. -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - id: __expectString(output.id), - parentId: __expectString(output.parentId), - path: __expectString(output.path), - pathPart: __expectString(output.pathPart), - resourceMethods: output.resourceMethods != null ? de_MapOfMethod(output.resourceMethods, context) : undefined, - } as any; -}; +// de_Resource omitted. /** * deserializeAws_restJson1RestApi */ const de_RestApi = (output: any, context: __SerdeContext): RestApi => { - return { - apiKeySource: __expectString(output.apiKeySource), - binaryMediaTypes: output.binaryMediaTypes != null ? de_ListOfString(output.binaryMediaTypes, context) : undefined, - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - disableExecuteApiEndpoint: __expectBoolean(output.disableExecuteApiEndpoint), - endpointConfiguration: - output.endpointConfiguration != null - ? de_EndpointConfiguration(output.endpointConfiguration, context) - : undefined, - id: __expectString(output.id), - minimumCompressionSize: __expectInt32(output.minimumCompressionSize), - name: __expectString(output.name), - policy: __expectString(output.policy), - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - version: __expectString(output.version), - warnings: output.warnings != null ? de_ListOfString(output.warnings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1SdkConfigurationProperty - */ -const de_SdkConfigurationProperty = (output: any, context: __SerdeContext): SdkConfigurationProperty => { - return { - defaultValue: __expectString(output.defaultValue), - description: __expectString(output.description), - friendlyName: __expectString(output.friendlyName), - name: __expectString(output.name), - required: __expectBoolean(output.required), - } as any; -}; - -/** - * deserializeAws_restJson1SdkType - */ -const de_SdkType = (output: any, context: __SerdeContext): SdkType => { - return { - configurationProperties: - output.configurationProperties != null - ? de_ListOfSdkConfigurationProperty(output.configurationProperties, context) - : undefined, - description: __expectString(output.description), - friendlyName: __expectString(output.friendlyName), - id: __expectString(output.id), - } as any; + return take(output, { + apiKeySource: __expectString, + binaryMediaTypes: _json, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + disableExecuteApiEndpoint: __expectBoolean, + endpointConfiguration: _json, + id: __expectString, + minimumCompressionSize: __expectInt32, + name: __expectString, + policy: __expectString, + tags: _json, + version: __expectString, + warnings: _json, + }) as any; }; +// de_SdkConfigurationProperty omitted. + +// de_SdkType omitted. + /** * deserializeAws_restJson1Stage */ const de_Stage = (output: any, context: __SerdeContext): Stage => { - return { - accessLogSettings: - output.accessLogSettings != null ? de_AccessLogSettings(output.accessLogSettings, context) : undefined, - cacheClusterEnabled: __expectBoolean(output.cacheClusterEnabled), - cacheClusterSize: __expectString(output.cacheClusterSize), - cacheClusterStatus: __expectString(output.cacheClusterStatus), - canarySettings: output.canarySettings != null ? de_CanarySettings(output.canarySettings, context) : undefined, - clientCertificateId: __expectString(output.clientCertificateId), - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - deploymentId: __expectString(output.deploymentId), - description: __expectString(output.description), - documentationVersion: __expectString(output.documentationVersion), - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - methodSettings: output.methodSettings != null ? de_MapOfMethodSettings(output.methodSettings, context) : undefined, - stageName: __expectString(output.stageName), - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - tracingEnabled: __expectBoolean(output.tracingEnabled), - variables: output.variables != null ? de_MapOfStringToString(output.variables, context) : undefined, - webAclArn: __expectString(output.webAclArn), - } as any; + return take(output, { + accessLogSettings: _json, + cacheClusterEnabled: __expectBoolean, + cacheClusterSize: __expectString, + cacheClusterStatus: __expectString, + canarySettings: (_: any) => de_CanarySettings(_, context), + clientCertificateId: __expectString, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + description: __expectString, + documentationVersion: __expectString, + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + methodSettings: (_: any) => de_MapOfMethodSettings(_, context), + stageName: __expectString, + tags: _json, + tracingEnabled: __expectBoolean, + variables: _json, + webAclArn: __expectString, + }) as any; }; /** * deserializeAws_restJson1ThrottleSettings */ const de_ThrottleSettings = (output: any, context: __SerdeContext): ThrottleSettings => { - return { - burstLimit: __expectInt32(output.burstLimit), - rateLimit: __limitedParseDouble(output.rateLimit), - } as any; + return take(output, { + burstLimit: __expectInt32, + rateLimit: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1TlsConfig - */ -const de_TlsConfig = (output: any, context: __SerdeContext): TlsConfig => { - return { - insecureSkipVerification: __expectBoolean(output.insecureSkipVerification), - } as any; -}; +// de_TlsConfig omitted. /** * deserializeAws_restJson1UsagePlan */ const de_UsagePlan = (output: any, context: __SerdeContext): UsagePlan => { - return { - apiStages: output.apiStages != null ? de_ListOfApiStage(output.apiStages, context) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - productCode: __expectString(output.productCode), - quota: output.quota != null ? de_QuotaSettings(output.quota, context) : undefined, - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - throttle: output.throttle != null ? de_ThrottleSettings(output.throttle, context) : undefined, - } as any; + return take(output, { + apiStages: (_: any) => de_ListOfApiStage(_, context), + description: __expectString, + id: __expectString, + name: __expectString, + productCode: __expectString, + quota: _json, + tags: _json, + throttle: (_: any) => de_ThrottleSettings(_, context), + }) as any; }; -/** - * deserializeAws_restJson1UsagePlanKey - */ -const de_UsagePlanKey = (output: any, context: __SerdeContext): UsagePlanKey => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// de_UsagePlanKey omitted. -/** - * deserializeAws_restJson1VpcLink - */ -const de_VpcLink = (output: any, context: __SerdeContext): VpcLink => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - tags: output.tags != null ? de_MapOfStringToString(output.tags, context) : undefined, - targetArns: output.targetArns != null ? de_ListOfString(output.targetArns, context) : undefined, - } as any; -}; +// de_VpcLink omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-apigatewaymanagementapi/src/protocols/Aws_restJson1.ts b/clients/client-apigatewaymanagementapi/src/protocols/Aws_restJson1.ts index fc8d99c44afa..0c9e126f50a8 100644 --- a/clients/client-apigatewaymanagementapi/src/protocols/Aws_restJson1.ts +++ b/clients/client-apigatewaymanagementapi/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -167,10 +169,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -190,15 +191,12 @@ export const de_GetConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectedAt != null) { - contents.ConnectedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.connectedAt)); - } - if (data.identity != null) { - contents.Identity = de_Identity(data.identity, context); - } - if (data.lastActiveAt != null) { - contents.LastActiveAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastActiveAt)); - } + const doc = take(data, { + ConnectedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `connectedAt`], + Identity: [, (_) => de_Identity(_, context), `identity`], + LastActiveAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastActiveAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -226,10 +224,9 @@ const de_GetConnectionCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -279,22 +276,23 @@ const de_PostToConnectionCommandError = async ( throw await de_PayloadTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ForbiddenExceptionRes */ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -308,6 +306,8 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_GoneExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new GoneException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -324,6 +324,8 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -340,9 +342,10 @@ const de_PayloadTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new PayloadTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -354,10 +357,10 @@ const de_PayloadTooLargeExceptionRes = async ( * deserializeAws_restJson1Identity */ const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - SourceIp: __expectString(output.sourceIp), - UserAgent: __expectString(output.userAgent), - } as any; + return take(output, { + SourceIp: [, __expectString, `sourceIp`], + UserAgent: [, __expectString, `userAgent`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-apigatewayv2/src/protocols/Aws_restJson1.ts b/clients/client-apigatewayv2/src/protocols/Aws_restJson1.ts index 6d02b1d56f2c..4f18d93c047b 100644 --- a/clients/client-apigatewayv2/src/protocols/Aws_restJson1.ts +++ b/clients/client-apigatewayv2/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,11 +10,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -176,21 +178,23 @@ export const se_CreateApiCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis"; let body: any; - body = JSON.stringify({ - ...(input.ApiKeySelectionExpression != null && { apiKeySelectionExpression: input.ApiKeySelectionExpression }), - ...(input.CorsConfiguration != null && { corsConfiguration: se_Cors(input.CorsConfiguration, context) }), - ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }), - ...(input.Description != null && { description: input.Description }), - ...(input.DisableExecuteApiEndpoint != null && { disableExecuteApiEndpoint: input.DisableExecuteApiEndpoint }), - ...(input.DisableSchemaValidation != null && { disableSchemaValidation: input.DisableSchemaValidation }), - ...(input.Name != null && { name: input.Name }), - ...(input.ProtocolType != null && { protocolType: input.ProtocolType }), - ...(input.RouteKey != null && { routeKey: input.RouteKey }), - ...(input.RouteSelectionExpression != null && { routeSelectionExpression: input.RouteSelectionExpression }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.Target != null && { target: input.Target }), - ...(input.Version != null && { version: input.Version }), - }); + body = JSON.stringify( + take(input, { + apiKeySelectionExpression: [, , `ApiKeySelectionExpression`], + corsConfiguration: [, (_) => se_Cors(_, context), `CorsConfiguration`], + credentialsArn: [, , `CredentialsArn`], + description: [, , `Description`], + disableExecuteApiEndpoint: [, , `DisableExecuteApiEndpoint`], + disableSchemaValidation: [, , `DisableSchemaValidation`], + name: [, , `Name`], + protocolType: [, , `ProtocolType`], + routeKey: [, , `RouteKey`], + routeSelectionExpression: [, , `RouteSelectionExpression`], + tags: [, (_) => _json(_), `Tags`], + target: [, , `Target`], + version: [, , `Version`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -217,11 +221,13 @@ export const se_CreateApiMappingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/domainnames/{DomainName}/apimappings"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.ApiId != null && { apiId: input.ApiId }), - ...(input.ApiMappingKey != null && { apiMappingKey: input.ApiMappingKey }), - ...(input.Stage != null && { stage: input.Stage }), - }); + body = JSON.stringify( + take(input, { + apiId: [, , `ApiId`], + apiMappingKey: [, , `ApiMappingKey`], + stage: [, , `Stage`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -248,24 +254,20 @@ export const se_CreateAuthorizerCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}/authorizers"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.AuthorizerCredentialsArn != null && { authorizerCredentialsArn: input.AuthorizerCredentialsArn }), - ...(input.AuthorizerPayloadFormatVersion != null && { - authorizerPayloadFormatVersion: input.AuthorizerPayloadFormatVersion, - }), - ...(input.AuthorizerResultTtlInSeconds != null && { - authorizerResultTtlInSeconds: input.AuthorizerResultTtlInSeconds, - }), - ...(input.AuthorizerType != null && { authorizerType: input.AuthorizerType }), - ...(input.AuthorizerUri != null && { authorizerUri: input.AuthorizerUri }), - ...(input.EnableSimpleResponses != null && { enableSimpleResponses: input.EnableSimpleResponses }), - ...(input.IdentitySource != null && { identitySource: se_IdentitySourceList(input.IdentitySource, context) }), - ...(input.IdentityValidationExpression != null && { - identityValidationExpression: input.IdentityValidationExpression, - }), - ...(input.JwtConfiguration != null && { jwtConfiguration: se_JWTConfiguration(input.JwtConfiguration, context) }), - ...(input.Name != null && { name: input.Name }), - }); + body = JSON.stringify( + take(input, { + authorizerCredentialsArn: [, , `AuthorizerCredentialsArn`], + authorizerPayloadFormatVersion: [, , `AuthorizerPayloadFormatVersion`], + authorizerResultTtlInSeconds: [, , `AuthorizerResultTtlInSeconds`], + authorizerType: [, , `AuthorizerType`], + authorizerUri: [, , `AuthorizerUri`], + enableSimpleResponses: [, , `EnableSimpleResponses`], + identitySource: [, (_) => _json(_), `IdentitySource`], + identityValidationExpression: [, , `IdentityValidationExpression`], + jwtConfiguration: [, (_) => se_JWTConfiguration(_, context), `JwtConfiguration`], + name: [, , `Name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -292,10 +294,12 @@ export const se_CreateDeploymentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}/deployments"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.StageName != null && { stageName: input.StageName }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + stageName: [, , `StageName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -320,16 +324,14 @@ export const se_CreateDomainNameCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/domainnames"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { domainName: input.DomainName }), - ...(input.DomainNameConfigurations != null && { - domainNameConfigurations: se_DomainNameConfigurations(input.DomainNameConfigurations, context), - }), - ...(input.MutualTlsAuthentication != null && { - mutualTlsAuthentication: se_MutualTlsAuthenticationInput(input.MutualTlsAuthentication, context), - }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + domainName: [, , `DomainName`], + domainNameConfigurations: [, (_) => se_DomainNameConfigurations(_, context), `DomainNameConfigurations`], + mutualTlsAuthentication: [, (_) => se_MutualTlsAuthenticationInput(_, context), `MutualTlsAuthentication`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -356,31 +358,27 @@ export const se_CreateIntegrationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}/integrations"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.ConnectionId != null && { connectionId: input.ConnectionId }), - ...(input.ConnectionType != null && { connectionType: input.ConnectionType }), - ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }), - ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }), - ...(input.Description != null && { description: input.Description }), - ...(input.IntegrationMethod != null && { integrationMethod: input.IntegrationMethod }), - ...(input.IntegrationSubtype != null && { integrationSubtype: input.IntegrationSubtype }), - ...(input.IntegrationType != null && { integrationType: input.IntegrationType }), - ...(input.IntegrationUri != null && { integrationUri: input.IntegrationUri }), - ...(input.PassthroughBehavior != null && { passthroughBehavior: input.PassthroughBehavior }), - ...(input.PayloadFormatVersion != null && { payloadFormatVersion: input.PayloadFormatVersion }), - ...(input.RequestParameters != null && { - requestParameters: se_IntegrationParameters(input.RequestParameters, context), - }), - ...(input.RequestTemplates != null && { requestTemplates: se_TemplateMap(input.RequestTemplates, context) }), - ...(input.ResponseParameters != null && { - responseParameters: se_ResponseParameters(input.ResponseParameters, context), - }), - ...(input.TemplateSelectionExpression != null && { - templateSelectionExpression: input.TemplateSelectionExpression, - }), - ...(input.TimeoutInMillis != null && { timeoutInMillis: input.TimeoutInMillis }), - ...(input.TlsConfig != null && { tlsConfig: se_TlsConfigInput(input.TlsConfig, context) }), - }); + body = JSON.stringify( + take(input, { + connectionId: [, , `ConnectionId`], + connectionType: [, , `ConnectionType`], + contentHandlingStrategy: [, , `ContentHandlingStrategy`], + credentialsArn: [, , `CredentialsArn`], + description: [, , `Description`], + integrationMethod: [, , `IntegrationMethod`], + integrationSubtype: [, , `IntegrationSubtype`], + integrationType: [, , `IntegrationType`], + integrationUri: [, , `IntegrationUri`], + passthroughBehavior: [, , `PassthroughBehavior`], + payloadFormatVersion: [, , `PayloadFormatVersion`], + requestParameters: [, (_) => _json(_), `RequestParameters`], + requestTemplates: [, (_) => _json(_), `RequestTemplates`], + responseParameters: [, (_) => _json(_), `ResponseParameters`], + templateSelectionExpression: [, , `TemplateSelectionExpression`], + timeoutInMillis: [, , `TimeoutInMillis`], + tlsConfig: [, (_) => se_TlsConfigInput(_, context), `TlsConfig`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -416,17 +414,15 @@ export const se_CreateIntegrationResponseCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }), - ...(input.IntegrationResponseKey != null && { integrationResponseKey: input.IntegrationResponseKey }), - ...(input.ResponseParameters != null && { - responseParameters: se_IntegrationParameters(input.ResponseParameters, context), - }), - ...(input.ResponseTemplates != null && { responseTemplates: se_TemplateMap(input.ResponseTemplates, context) }), - ...(input.TemplateSelectionExpression != null && { - templateSelectionExpression: input.TemplateSelectionExpression, - }), - }); + body = JSON.stringify( + take(input, { + contentHandlingStrategy: [, , `ContentHandlingStrategy`], + integrationResponseKey: [, , `IntegrationResponseKey`], + responseParameters: [, (_) => _json(_), `ResponseParameters`], + responseTemplates: [, (_) => _json(_), `ResponseTemplates`], + templateSelectionExpression: [, , `TemplateSelectionExpression`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -452,12 +448,14 @@ export const se_CreateModelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}/models"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.ContentType != null && { contentType: input.ContentType }), - ...(input.Description != null && { description: input.Description }), - ...(input.Name != null && { name: input.Name }), - ...(input.Schema != null && { schema: input.Schema }), - }); + body = JSON.stringify( + take(input, { + contentType: [, , `ContentType`], + description: [, , `Description`], + name: [, , `Name`], + schema: [, , `Schema`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -483,23 +481,21 @@ export const se_CreateRouteCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}/routes"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.ApiKeyRequired != null && { apiKeyRequired: input.ApiKeyRequired }), - ...(input.AuthorizationScopes != null && { - authorizationScopes: se_AuthorizationScopes(input.AuthorizationScopes, context), - }), - ...(input.AuthorizationType != null && { authorizationType: input.AuthorizationType }), - ...(input.AuthorizerId != null && { authorizerId: input.AuthorizerId }), - ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }), - ...(input.OperationName != null && { operationName: input.OperationName }), - ...(input.RequestModels != null && { requestModels: se_RouteModels(input.RequestModels, context) }), - ...(input.RequestParameters != null && { requestParameters: se_RouteParameters(input.RequestParameters, context) }), - ...(input.RouteKey != null && { routeKey: input.RouteKey }), - ...(input.RouteResponseSelectionExpression != null && { - routeResponseSelectionExpression: input.RouteResponseSelectionExpression, - }), - ...(input.Target != null && { target: input.Target }), - }); + body = JSON.stringify( + take(input, { + apiKeyRequired: [, , `ApiKeyRequired`], + authorizationScopes: [, (_) => _json(_), `AuthorizationScopes`], + authorizationType: [, , `AuthorizationType`], + authorizerId: [, , `AuthorizerId`], + modelSelectionExpression: [, , `ModelSelectionExpression`], + operationName: [, , `OperationName`], + requestModels: [, (_) => _json(_), `RequestModels`], + requestParameters: [, (_) => se_RouteParameters(_, context), `RequestParameters`], + routeKey: [, , `RouteKey`], + routeResponseSelectionExpression: [, , `RouteResponseSelectionExpression`], + target: [, , `Target`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -528,14 +524,14 @@ export const se_CreateRouteResponseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RouteId", () => input.RouteId!, "{RouteId}", false); let body: any; - body = JSON.stringify({ - ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }), - ...(input.ResponseModels != null && { responseModels: se_RouteModels(input.ResponseModels, context) }), - ...(input.ResponseParameters != null && { - responseParameters: se_RouteParameters(input.ResponseParameters, context), - }), - ...(input.RouteResponseKey != null && { routeResponseKey: input.RouteResponseKey }), - }); + body = JSON.stringify( + take(input, { + modelSelectionExpression: [, , `ModelSelectionExpression`], + responseModels: [, (_) => _json(_), `ResponseModels`], + responseParameters: [, (_) => se_RouteParameters(_, context), `ResponseParameters`], + routeResponseKey: [, , `RouteResponseKey`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -561,22 +557,20 @@ export const se_CreateStageCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}/stages"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccessLogSettings != null && { - accessLogSettings: se_AccessLogSettings(input.AccessLogSettings, context), - }), - ...(input.AutoDeploy != null && { autoDeploy: input.AutoDeploy }), - ...(input.ClientCertificateId != null && { clientCertificateId: input.ClientCertificateId }), - ...(input.DefaultRouteSettings != null && { - defaultRouteSettings: se_RouteSettings(input.DefaultRouteSettings, context), - }), - ...(input.DeploymentId != null && { deploymentId: input.DeploymentId }), - ...(input.Description != null && { description: input.Description }), - ...(input.RouteSettings != null && { routeSettings: se_RouteSettingsMap(input.RouteSettings, context) }), - ...(input.StageName != null && { stageName: input.StageName }), - ...(input.StageVariables != null && { stageVariables: se_StageVariablesMap(input.StageVariables, context) }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + accessLogSettings: [, (_) => se_AccessLogSettings(_, context), `AccessLogSettings`], + autoDeploy: [, , `AutoDeploy`], + clientCertificateId: [, , `ClientCertificateId`], + defaultRouteSettings: [, (_) => se_RouteSettings(_, context), `DefaultRouteSettings`], + deploymentId: [, , `DeploymentId`], + description: [, , `Description`], + routeSettings: [, (_) => se_RouteSettingsMap(_, context), `RouteSettings`], + stageName: [, , `StageName`], + stageVariables: [, (_) => _json(_), `StageVariables`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -601,14 +595,14 @@ export const se_CreateVpcLinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/vpclinks"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { name: input.Name }), - ...(input.SecurityGroupIds != null && { - securityGroupIds: se_SecurityGroupIdList(input.SecurityGroupIds, context), - }), - ...(input.SubnetIds != null && { subnetIds: se_SubnetIdList(input.SubnetIds, context) }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + name: [, , `Name`], + securityGroupIds: [, (_) => _json(_), `SecurityGroupIds`], + subnetIds: [, (_) => _json(_), `SubnetIds`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1886,9 +1880,11 @@ export const se_ImportApiCommand = async ( failOnWarnings: [() => input.FailOnWarnings !== void 0, () => input.FailOnWarnings!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.Body != null && { body: input.Body }), - }); + body = JSON.stringify( + take(input, { + body: [, , `Body`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1919,9 +1915,11 @@ export const se_ReimportApiCommand = async ( failOnWarnings: [() => input.FailOnWarnings !== void 0, () => input.FailOnWarnings!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.Body != null && { body: input.Body }), - }); + body = JSON.stringify( + take(input, { + body: [, , `Body`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1974,9 +1972,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2032,19 +2032,21 @@ export const se_UpdateApiCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis/{ApiId}"; resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); let body: any; - body = JSON.stringify({ - ...(input.ApiKeySelectionExpression != null && { apiKeySelectionExpression: input.ApiKeySelectionExpression }), - ...(input.CorsConfiguration != null && { corsConfiguration: se_Cors(input.CorsConfiguration, context) }), - ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }), - ...(input.Description != null && { description: input.Description }), - ...(input.DisableExecuteApiEndpoint != null && { disableExecuteApiEndpoint: input.DisableExecuteApiEndpoint }), - ...(input.DisableSchemaValidation != null && { disableSchemaValidation: input.DisableSchemaValidation }), - ...(input.Name != null && { name: input.Name }), - ...(input.RouteKey != null && { routeKey: input.RouteKey }), - ...(input.RouteSelectionExpression != null && { routeSelectionExpression: input.RouteSelectionExpression }), - ...(input.Target != null && { target: input.Target }), - ...(input.Version != null && { version: input.Version }), - }); + body = JSON.stringify( + take(input, { + apiKeySelectionExpression: [, , `ApiKeySelectionExpression`], + corsConfiguration: [, (_) => se_Cors(_, context), `CorsConfiguration`], + credentialsArn: [, , `CredentialsArn`], + description: [, , `Description`], + disableExecuteApiEndpoint: [, , `DisableExecuteApiEndpoint`], + disableSchemaValidation: [, , `DisableSchemaValidation`], + name: [, , `Name`], + routeKey: [, , `RouteKey`], + routeSelectionExpression: [, , `RouteSelectionExpression`], + target: [, , `Target`], + version: [, , `Version`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2080,11 +2082,13 @@ export const se_UpdateApiMappingCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.ApiId != null && { apiId: input.ApiId }), - ...(input.ApiMappingKey != null && { apiMappingKey: input.ApiMappingKey }), - ...(input.Stage != null && { stage: input.Stage }), - }); + body = JSON.stringify( + take(input, { + apiId: [, , `ApiId`], + apiMappingKey: [, , `ApiMappingKey`], + stage: [, , `Stage`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2120,24 +2124,20 @@ export const se_UpdateAuthorizerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AuthorizerCredentialsArn != null && { authorizerCredentialsArn: input.AuthorizerCredentialsArn }), - ...(input.AuthorizerPayloadFormatVersion != null && { - authorizerPayloadFormatVersion: input.AuthorizerPayloadFormatVersion, - }), - ...(input.AuthorizerResultTtlInSeconds != null && { - authorizerResultTtlInSeconds: input.AuthorizerResultTtlInSeconds, - }), - ...(input.AuthorizerType != null && { authorizerType: input.AuthorizerType }), - ...(input.AuthorizerUri != null && { authorizerUri: input.AuthorizerUri }), - ...(input.EnableSimpleResponses != null && { enableSimpleResponses: input.EnableSimpleResponses }), - ...(input.IdentitySource != null && { identitySource: se_IdentitySourceList(input.IdentitySource, context) }), - ...(input.IdentityValidationExpression != null && { - identityValidationExpression: input.IdentityValidationExpression, - }), - ...(input.JwtConfiguration != null && { jwtConfiguration: se_JWTConfiguration(input.JwtConfiguration, context) }), - ...(input.Name != null && { name: input.Name }), - }); + body = JSON.stringify( + take(input, { + authorizerCredentialsArn: [, , `AuthorizerCredentialsArn`], + authorizerPayloadFormatVersion: [, , `AuthorizerPayloadFormatVersion`], + authorizerResultTtlInSeconds: [, , `AuthorizerResultTtlInSeconds`], + authorizerType: [, , `AuthorizerType`], + authorizerUri: [, , `AuthorizerUri`], + enableSimpleResponses: [, , `EnableSimpleResponses`], + identitySource: [, (_) => _json(_), `IdentitySource`], + identityValidationExpression: [, , `IdentityValidationExpression`], + jwtConfiguration: [, (_) => se_JWTConfiguration(_, context), `JwtConfiguration`], + name: [, , `Name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2173,9 +2173,11 @@ export const se_UpdateDeploymentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2202,14 +2204,12 @@ export const se_UpdateDomainNameCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/domainnames/{DomainName}"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.DomainNameConfigurations != null && { - domainNameConfigurations: se_DomainNameConfigurations(input.DomainNameConfigurations, context), - }), - ...(input.MutualTlsAuthentication != null && { - mutualTlsAuthentication: se_MutualTlsAuthenticationInput(input.MutualTlsAuthentication, context), - }), - }); + body = JSON.stringify( + take(input, { + domainNameConfigurations: [, (_) => se_DomainNameConfigurations(_, context), `DomainNameConfigurations`], + mutualTlsAuthentication: [, (_) => se_MutualTlsAuthenticationInput(_, context), `MutualTlsAuthentication`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2245,31 +2245,27 @@ export const se_UpdateIntegrationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ConnectionId != null && { connectionId: input.ConnectionId }), - ...(input.ConnectionType != null && { connectionType: input.ConnectionType }), - ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }), - ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }), - ...(input.Description != null && { description: input.Description }), - ...(input.IntegrationMethod != null && { integrationMethod: input.IntegrationMethod }), - ...(input.IntegrationSubtype != null && { integrationSubtype: input.IntegrationSubtype }), - ...(input.IntegrationType != null && { integrationType: input.IntegrationType }), - ...(input.IntegrationUri != null && { integrationUri: input.IntegrationUri }), - ...(input.PassthroughBehavior != null && { passthroughBehavior: input.PassthroughBehavior }), - ...(input.PayloadFormatVersion != null && { payloadFormatVersion: input.PayloadFormatVersion }), - ...(input.RequestParameters != null && { - requestParameters: se_IntegrationParameters(input.RequestParameters, context), - }), - ...(input.RequestTemplates != null && { requestTemplates: se_TemplateMap(input.RequestTemplates, context) }), - ...(input.ResponseParameters != null && { - responseParameters: se_ResponseParameters(input.ResponseParameters, context), - }), - ...(input.TemplateSelectionExpression != null && { - templateSelectionExpression: input.TemplateSelectionExpression, - }), - ...(input.TimeoutInMillis != null && { timeoutInMillis: input.TimeoutInMillis }), - ...(input.TlsConfig != null && { tlsConfig: se_TlsConfigInput(input.TlsConfig, context) }), - }); + body = JSON.stringify( + take(input, { + connectionId: [, , `ConnectionId`], + connectionType: [, , `ConnectionType`], + contentHandlingStrategy: [, , `ContentHandlingStrategy`], + credentialsArn: [, , `CredentialsArn`], + description: [, , `Description`], + integrationMethod: [, , `IntegrationMethod`], + integrationSubtype: [, , `IntegrationSubtype`], + integrationType: [, , `IntegrationType`], + integrationUri: [, , `IntegrationUri`], + passthroughBehavior: [, , `PassthroughBehavior`], + payloadFormatVersion: [, , `PayloadFormatVersion`], + requestParameters: [, (_) => _json(_), `RequestParameters`], + requestTemplates: [, (_) => _json(_), `RequestTemplates`], + responseParameters: [, (_) => _json(_), `ResponseParameters`], + templateSelectionExpression: [, , `TemplateSelectionExpression`], + timeoutInMillis: [, , `TimeoutInMillis`], + tlsConfig: [, (_) => se_TlsConfigInput(_, context), `TlsConfig`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2313,17 +2309,15 @@ export const se_UpdateIntegrationResponseCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }), - ...(input.IntegrationResponseKey != null && { integrationResponseKey: input.IntegrationResponseKey }), - ...(input.ResponseParameters != null && { - responseParameters: se_IntegrationParameters(input.ResponseParameters, context), - }), - ...(input.ResponseTemplates != null && { responseTemplates: se_TemplateMap(input.ResponseTemplates, context) }), - ...(input.TemplateSelectionExpression != null && { - templateSelectionExpression: input.TemplateSelectionExpression, - }), - }); + body = JSON.stringify( + take(input, { + contentHandlingStrategy: [, , `ContentHandlingStrategy`], + integrationResponseKey: [, , `IntegrationResponseKey`], + responseParameters: [, (_) => _json(_), `ResponseParameters`], + responseTemplates: [, (_) => _json(_), `ResponseTemplates`], + templateSelectionExpression: [, , `TemplateSelectionExpression`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2351,12 +2345,14 @@ export const se_UpdateModelCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ModelId", () => input.ModelId!, "{ModelId}", false); let body: any; - body = JSON.stringify({ - ...(input.ContentType != null && { contentType: input.ContentType }), - ...(input.Description != null && { description: input.Description }), - ...(input.Name != null && { name: input.Name }), - ...(input.Schema != null && { schema: input.Schema }), - }); + body = JSON.stringify( + take(input, { + contentType: [, , `ContentType`], + description: [, , `Description`], + name: [, , `Name`], + schema: [, , `Schema`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2384,23 +2380,21 @@ export const se_UpdateRouteCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RouteId", () => input.RouteId!, "{RouteId}", false); let body: any; - body = JSON.stringify({ - ...(input.ApiKeyRequired != null && { apiKeyRequired: input.ApiKeyRequired }), - ...(input.AuthorizationScopes != null && { - authorizationScopes: se_AuthorizationScopes(input.AuthorizationScopes, context), - }), - ...(input.AuthorizationType != null && { authorizationType: input.AuthorizationType }), - ...(input.AuthorizerId != null && { authorizerId: input.AuthorizerId }), - ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }), - ...(input.OperationName != null && { operationName: input.OperationName }), - ...(input.RequestModels != null && { requestModels: se_RouteModels(input.RequestModels, context) }), - ...(input.RequestParameters != null && { requestParameters: se_RouteParameters(input.RequestParameters, context) }), - ...(input.RouteKey != null && { routeKey: input.RouteKey }), - ...(input.RouteResponseSelectionExpression != null && { - routeResponseSelectionExpression: input.RouteResponseSelectionExpression, - }), - ...(input.Target != null && { target: input.Target }), - }); + body = JSON.stringify( + take(input, { + apiKeyRequired: [, , `ApiKeyRequired`], + authorizationScopes: [, (_) => _json(_), `AuthorizationScopes`], + authorizationType: [, , `AuthorizationType`], + authorizerId: [, , `AuthorizerId`], + modelSelectionExpression: [, , `ModelSelectionExpression`], + operationName: [, , `OperationName`], + requestModels: [, (_) => _json(_), `RequestModels`], + requestParameters: [, (_) => se_RouteParameters(_, context), `RequestParameters`], + routeKey: [, , `RouteKey`], + routeResponseSelectionExpression: [, , `RouteResponseSelectionExpression`], + target: [, , `Target`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2437,14 +2431,14 @@ export const se_UpdateRouteResponseCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }), - ...(input.ResponseModels != null && { responseModels: se_RouteModels(input.ResponseModels, context) }), - ...(input.ResponseParameters != null && { - responseParameters: se_RouteParameters(input.ResponseParameters, context), - }), - ...(input.RouteResponseKey != null && { routeResponseKey: input.RouteResponseKey }), - }); + body = JSON.stringify( + take(input, { + modelSelectionExpression: [, , `ModelSelectionExpression`], + responseModels: [, (_) => _json(_), `ResponseModels`], + responseParameters: [, (_) => se_RouteParameters(_, context), `ResponseParameters`], + routeResponseKey: [, , `RouteResponseKey`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2472,20 +2466,18 @@ export const se_UpdateStageCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ApiId", () => input.ApiId!, "{ApiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "StageName", () => input.StageName!, "{StageName}", false); let body: any; - body = JSON.stringify({ - ...(input.AccessLogSettings != null && { - accessLogSettings: se_AccessLogSettings(input.AccessLogSettings, context), - }), - ...(input.AutoDeploy != null && { autoDeploy: input.AutoDeploy }), - ...(input.ClientCertificateId != null && { clientCertificateId: input.ClientCertificateId }), - ...(input.DefaultRouteSettings != null && { - defaultRouteSettings: se_RouteSettings(input.DefaultRouteSettings, context), - }), - ...(input.DeploymentId != null && { deploymentId: input.DeploymentId }), - ...(input.Description != null && { description: input.Description }), - ...(input.RouteSettings != null && { routeSettings: se_RouteSettingsMap(input.RouteSettings, context) }), - ...(input.StageVariables != null && { stageVariables: se_StageVariablesMap(input.StageVariables, context) }), - }); + body = JSON.stringify( + take(input, { + accessLogSettings: [, (_) => se_AccessLogSettings(_, context), `AccessLogSettings`], + autoDeploy: [, , `AutoDeploy`], + clientCertificateId: [, , `ClientCertificateId`], + defaultRouteSettings: [, (_) => se_RouteSettings(_, context), `DefaultRouteSettings`], + deploymentId: [, , `DeploymentId`], + description: [, , `Description`], + routeSettings: [, (_) => se_RouteSettingsMap(_, context), `RouteSettings`], + stageVariables: [, (_) => _json(_), `StageVariables`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2511,9 +2503,11 @@ export const se_UpdateVpcLinkCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/vpclinks/{VpcLinkId}"; resolvedPath = __resolvedPath(resolvedPath, input, "VpcLinkId", () => input.VpcLinkId!, "{VpcLinkId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { name: input.Name }), - }); + body = JSON.stringify( + take(input, { + name: [, , `Name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2539,54 +2533,25 @@ export const de_CreateApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiEndpoint != null) { - contents.ApiEndpoint = __expectString(data.apiEndpoint); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiKeySelectionExpression != null) { - contents.ApiKeySelectionExpression = __expectString(data.apiKeySelectionExpression); - } - if (data.corsConfiguration != null) { - contents.CorsConfiguration = de_Cors(data.corsConfiguration, context); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.DisableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.disableSchemaValidation != null) { - contents.DisableSchemaValidation = __expectBoolean(data.disableSchemaValidation); - } - if (data.importInfo != null) { - contents.ImportInfo = de___listOf__string(data.importInfo, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.protocolType != null) { - contents.ProtocolType = __expectString(data.protocolType); - } - if (data.routeSelectionExpression != null) { - contents.RouteSelectionExpression = __expectString(data.routeSelectionExpression); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.version != null) { - contents.Version = __expectString(data.version); - } - if (data.warnings != null) { - contents.Warnings = de___listOf__string(data.warnings, context); - } + const doc = take(data, { + ApiEndpoint: [, __expectString, `apiEndpoint`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiId: [, __expectString, `apiId`], + ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`], + CorsConfiguration: [, (_) => de_Cors(_, context), `corsConfiguration`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Description: [, __expectString, `description`], + DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`], + DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`], + ImportInfo: [, _json, `importInfo`], + Name: [, __expectString, `name`], + ProtocolType: [, __expectString, `protocolType`], + RouteSelectionExpression: [, __expectString, `routeSelectionExpression`], + Tags: [, _json, `tags`], + Version: [, __expectString, `version`], + Warnings: [, _json, `warnings`], + }); + Object.assign(contents, doc); return contents; }; @@ -2617,10 +2582,9 @@ const de_CreateApiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2640,18 +2604,13 @@ export const de_CreateApiMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiMappingId != null) { - contents.ApiMappingId = __expectString(data.apiMappingId); - } - if (data.apiMappingKey != null) { - contents.ApiMappingKey = __expectString(data.apiMappingKey); - } - if (data.stage != null) { - contents.Stage = __expectString(data.stage); - } + const doc = take(data, { + ApiId: [, __expectString, `apiId`], + ApiMappingId: [, __expectString, `apiMappingId`], + ApiMappingKey: [, __expectString, `apiMappingKey`], + Stage: [, __expectString, `stage`], + }); + Object.assign(contents, doc); return contents; }; @@ -2682,10 +2641,9 @@ const de_CreateApiMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2705,39 +2663,20 @@ export const de_CreateAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerCredentialsArn != null) { - contents.AuthorizerCredentialsArn = __expectString(data.authorizerCredentialsArn); - } - if (data.authorizerId != null) { - contents.AuthorizerId = __expectString(data.authorizerId); - } - if (data.authorizerPayloadFormatVersion != null) { - contents.AuthorizerPayloadFormatVersion = __expectString(data.authorizerPayloadFormatVersion); - } - if (data.authorizerResultTtlInSeconds != null) { - contents.AuthorizerResultTtlInSeconds = __expectInt32(data.authorizerResultTtlInSeconds); - } - if (data.authorizerType != null) { - contents.AuthorizerType = __expectString(data.authorizerType); - } - if (data.authorizerUri != null) { - contents.AuthorizerUri = __expectString(data.authorizerUri); - } - if (data.enableSimpleResponses != null) { - contents.EnableSimpleResponses = __expectBoolean(data.enableSimpleResponses); - } - if (data.identitySource != null) { - contents.IdentitySource = de_IdentitySourceList(data.identitySource, context); - } - if (data.identityValidationExpression != null) { - contents.IdentityValidationExpression = __expectString(data.identityValidationExpression); - } - if (data.jwtConfiguration != null) { - contents.JwtConfiguration = de_JWTConfiguration(data.jwtConfiguration, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } + const doc = take(data, { + AuthorizerCredentialsArn: [, __expectString, `authorizerCredentialsArn`], + AuthorizerId: [, __expectString, `authorizerId`], + AuthorizerPayloadFormatVersion: [, __expectString, `authorizerPayloadFormatVersion`], + AuthorizerResultTtlInSeconds: [, __expectInt32, `authorizerResultTtlInSeconds`], + AuthorizerType: [, __expectString, `authorizerType`], + AuthorizerUri: [, __expectString, `authorizerUri`], + EnableSimpleResponses: [, __expectBoolean, `enableSimpleResponses`], + IdentitySource: [, _json, `identitySource`], + IdentityValidationExpression: [, __expectString, `identityValidationExpression`], + JwtConfiguration: [, (_) => de_JWTConfiguration(_, context), `jwtConfiguration`], + Name: [, __expectString, `name`], + }); + Object.assign(contents, doc); return contents; }; @@ -2768,10 +2707,9 @@ const de_CreateAuthorizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2791,24 +2729,15 @@ export const de_CreateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoDeployed != null) { - contents.AutoDeployed = __expectBoolean(data.autoDeployed); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.deploymentId != null) { - contents.DeploymentId = __expectString(data.deploymentId); - } - if (data.deploymentStatus != null) { - contents.DeploymentStatus = __expectString(data.deploymentStatus); - } - if (data.deploymentStatusMessage != null) { - contents.DeploymentStatusMessage = __expectString(data.deploymentStatusMessage); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } + const doc = take(data, { + AutoDeployed: [, __expectBoolean, `autoDeployed`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DeploymentId: [, __expectString, `deploymentId`], + DeploymentStatus: [, __expectString, `deploymentStatus`], + DeploymentStatusMessage: [, __expectString, `deploymentStatusMessage`], + Description: [, __expectString, `description`], + }); + Object.assign(contents, doc); return contents; }; @@ -2839,10 +2768,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2862,21 +2790,14 @@ export const de_CreateDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiMappingSelectionExpression != null) { - contents.ApiMappingSelectionExpression = __expectString(data.apiMappingSelectionExpression); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.domainNameConfigurations != null) { - contents.DomainNameConfigurations = de_DomainNameConfigurations(data.domainNameConfigurations, context); - } - if (data.mutualTlsAuthentication != null) { - contents.MutualTlsAuthentication = de_MutualTlsAuthentication(data.mutualTlsAuthentication, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ApiMappingSelectionExpression: [, __expectString, `apiMappingSelectionExpression`], + DomainName: [, __expectString, `domainName`], + DomainNameConfigurations: [, (_) => de_DomainNameConfigurations(_, context), `domainNameConfigurations`], + MutualTlsAuthentication: [, (_) => de_MutualTlsAuthentication(_, context), `mutualTlsAuthentication`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2910,10 +2831,9 @@ const de_CreateDomainNameCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2933,66 +2853,29 @@ export const de_CreateIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.connectionId != null) { - contents.ConnectionId = __expectString(data.connectionId); - } - if (data.connectionType != null) { - contents.ConnectionType = __expectString(data.connectionType); - } - if (data.contentHandlingStrategy != null) { - contents.ContentHandlingStrategy = __expectString(data.contentHandlingStrategy); - } - if (data.credentialsArn != null) { - contents.CredentialsArn = __expectString(data.credentialsArn); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.integrationId != null) { - contents.IntegrationId = __expectString(data.integrationId); - } - if (data.integrationMethod != null) { - contents.IntegrationMethod = __expectString(data.integrationMethod); - } - if (data.integrationResponseSelectionExpression != null) { - contents.IntegrationResponseSelectionExpression = __expectString(data.integrationResponseSelectionExpression); - } - if (data.integrationSubtype != null) { - contents.IntegrationSubtype = __expectString(data.integrationSubtype); - } - if (data.integrationType != null) { - contents.IntegrationType = __expectString(data.integrationType); - } - if (data.integrationUri != null) { - contents.IntegrationUri = __expectString(data.integrationUri); - } - if (data.passthroughBehavior != null) { - contents.PassthroughBehavior = __expectString(data.passthroughBehavior); - } - if (data.payloadFormatVersion != null) { - contents.PayloadFormatVersion = __expectString(data.payloadFormatVersion); - } - if (data.requestParameters != null) { - contents.RequestParameters = de_IntegrationParameters(data.requestParameters, context); - } - if (data.requestTemplates != null) { - contents.RequestTemplates = de_TemplateMap(data.requestTemplates, context); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_ResponseParameters(data.responseParameters, context); - } - if (data.templateSelectionExpression != null) { - contents.TemplateSelectionExpression = __expectString(data.templateSelectionExpression); - } - if (data.timeoutInMillis != null) { - contents.TimeoutInMillis = __expectInt32(data.timeoutInMillis); - } - if (data.tlsConfig != null) { - contents.TlsConfig = de_TlsConfig(data.tlsConfig, context); - } + const doc = take(data, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ConnectionId: [, __expectString, `connectionId`], + ConnectionType: [, __expectString, `connectionType`], + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + CredentialsArn: [, __expectString, `credentialsArn`], + Description: [, __expectString, `description`], + IntegrationId: [, __expectString, `integrationId`], + IntegrationMethod: [, __expectString, `integrationMethod`], + IntegrationResponseSelectionExpression: [, __expectString, `integrationResponseSelectionExpression`], + IntegrationSubtype: [, __expectString, `integrationSubtype`], + IntegrationType: [, __expectString, `integrationType`], + IntegrationUri: [, __expectString, `integrationUri`], + PassthroughBehavior: [, __expectString, `passthroughBehavior`], + PayloadFormatVersion: [, __expectString, `payloadFormatVersion`], + RequestParameters: [, _json, `requestParameters`], + RequestTemplates: [, _json, `requestTemplates`], + ResponseParameters: [, _json, `responseParameters`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + TimeoutInMillis: [, __expectInt32, `timeoutInMillis`], + TlsConfig: [, (_) => de_TlsConfig(_, context), `tlsConfig`], + }); + Object.assign(contents, doc); return contents; }; @@ -3023,10 +2906,9 @@ const de_CreateIntegrationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3046,24 +2928,15 @@ export const de_CreateIntegrationResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentHandlingStrategy != null) { - contents.ContentHandlingStrategy = __expectString(data.contentHandlingStrategy); - } - if (data.integrationResponseId != null) { - contents.IntegrationResponseId = __expectString(data.integrationResponseId); - } - if (data.integrationResponseKey != null) { - contents.IntegrationResponseKey = __expectString(data.integrationResponseKey); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_IntegrationParameters(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.ResponseTemplates = de_TemplateMap(data.responseTemplates, context); - } - if (data.templateSelectionExpression != null) { - contents.TemplateSelectionExpression = __expectString(data.templateSelectionExpression); - } + const doc = take(data, { + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + IntegrationResponseId: [, __expectString, `integrationResponseId`], + IntegrationResponseKey: [, __expectString, `integrationResponseKey`], + ResponseParameters: [, _json, `responseParameters`], + ResponseTemplates: [, _json, `responseTemplates`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + }); + Object.assign(contents, doc); return contents; }; @@ -3094,10 +2967,9 @@ const de_CreateIntegrationResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3117,21 +2989,14 @@ export const de_CreateModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentType != null) { - contents.ContentType = __expectString(data.contentType); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.modelId != null) { - contents.ModelId = __expectString(data.modelId); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.schema != null) { - contents.Schema = __expectString(data.schema); - } + const doc = take(data, { + ContentType: [, __expectString, `contentType`], + Description: [, __expectString, `description`], + ModelId: [, __expectString, `modelId`], + Name: [, __expectString, `name`], + Schema: [, __expectString, `schema`], + }); + Object.assign(contents, doc); return contents; }; @@ -3162,10 +3027,9 @@ const de_CreateModelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3185,45 +3049,22 @@ export const de_CreateRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiKeyRequired != null) { - contents.ApiKeyRequired = __expectBoolean(data.apiKeyRequired); - } - if (data.authorizationScopes != null) { - contents.AuthorizationScopes = de_AuthorizationScopes(data.authorizationScopes, context); - } - if (data.authorizationType != null) { - contents.AuthorizationType = __expectString(data.authorizationType); - } - if (data.authorizerId != null) { - contents.AuthorizerId = __expectString(data.authorizerId); - } - if (data.modelSelectionExpression != null) { - contents.ModelSelectionExpression = __expectString(data.modelSelectionExpression); - } - if (data.operationName != null) { - contents.OperationName = __expectString(data.operationName); - } - if (data.requestModels != null) { - contents.RequestModels = de_RouteModels(data.requestModels, context); - } - if (data.requestParameters != null) { - contents.RequestParameters = de_RouteParameters(data.requestParameters, context); - } - if (data.routeId != null) { - contents.RouteId = __expectString(data.routeId); - } - if (data.routeKey != null) { - contents.RouteKey = __expectString(data.routeKey); - } - if (data.routeResponseSelectionExpression != null) { - contents.RouteResponseSelectionExpression = __expectString(data.routeResponseSelectionExpression); - } - if (data.target != null) { - contents.Target = __expectString(data.target); - } + const doc = take(data, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiKeyRequired: [, __expectBoolean, `apiKeyRequired`], + AuthorizationScopes: [, _json, `authorizationScopes`], + AuthorizationType: [, __expectString, `authorizationType`], + AuthorizerId: [, __expectString, `authorizerId`], + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + OperationName: [, __expectString, `operationName`], + RequestModels: [, _json, `requestModels`], + RequestParameters: [, (_) => de_RouteParameters(_, context), `requestParameters`], + RouteId: [, __expectString, `routeId`], + RouteKey: [, __expectString, `routeKey`], + RouteResponseSelectionExpression: [, __expectString, `routeResponseSelectionExpression`], + Target: [, __expectString, `target`], + }); + Object.assign(contents, doc); return contents; }; @@ -3254,10 +3095,9 @@ const de_CreateRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3277,21 +3117,14 @@ export const de_CreateRouteResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.modelSelectionExpression != null) { - contents.ModelSelectionExpression = __expectString(data.modelSelectionExpression); - } - if (data.responseModels != null) { - contents.ResponseModels = de_RouteModels(data.responseModels, context); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_RouteParameters(data.responseParameters, context); - } - if (data.routeResponseId != null) { - contents.RouteResponseId = __expectString(data.routeResponseId); - } - if (data.routeResponseKey != null) { - contents.RouteResponseKey = __expectString(data.routeResponseKey); - } + const doc = take(data, { + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + ResponseModels: [, _json, `responseModels`], + ResponseParameters: [, (_) => de_RouteParameters(_, context), `responseParameters`], + RouteResponseId: [, __expectString, `routeResponseId`], + RouteResponseKey: [, __expectString, `routeResponseKey`], + }); + Object.assign(contents, doc); return contents; }; @@ -3322,10 +3155,9 @@ const de_CreateRouteResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3345,48 +3177,23 @@ export const de_CreateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessLogSettings != null) { - contents.AccessLogSettings = de_AccessLogSettings(data.accessLogSettings, context); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.autoDeploy != null) { - contents.AutoDeploy = __expectBoolean(data.autoDeploy); - } - if (data.clientCertificateId != null) { - contents.ClientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.defaultRouteSettings != null) { - contents.DefaultRouteSettings = de_RouteSettings(data.defaultRouteSettings, context); - } - if (data.deploymentId != null) { - contents.DeploymentId = __expectString(data.deploymentId); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.lastDeploymentStatusMessage != null) { - contents.LastDeploymentStatusMessage = __expectString(data.lastDeploymentStatusMessage); - } - if (data.lastUpdatedDate != null) { - contents.LastUpdatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedDate)); - } - if (data.routeSettings != null) { - contents.RouteSettings = de_RouteSettingsMap(data.routeSettings, context); - } - if (data.stageName != null) { - contents.StageName = __expectString(data.stageName); - } - if (data.stageVariables != null) { - contents.StageVariables = de_StageVariablesMap(data.stageVariables, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + AccessLogSettings: [, (_) => de_AccessLogSettings(_, context), `accessLogSettings`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + AutoDeploy: [, __expectBoolean, `autoDeploy`], + ClientCertificateId: [, __expectString, `clientCertificateId`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DefaultRouteSettings: [, (_) => de_RouteSettings(_, context), `defaultRouteSettings`], + DeploymentId: [, __expectString, `deploymentId`], + Description: [, __expectString, `description`], + LastDeploymentStatusMessage: [, __expectString, `lastDeploymentStatusMessage`], + LastUpdatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedDate`], + RouteSettings: [, (_) => de_RouteSettingsMap(_, context), `routeSettings`], + StageName: [, __expectString, `stageName`], + StageVariables: [, _json, `stageVariables`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3417,10 +3224,9 @@ const de_CreateStageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3440,33 +3246,18 @@ export const de_CreateVpcLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.securityGroupIds != null) { - contents.SecurityGroupIds = de_SecurityGroupIdList(data.securityGroupIds, context); - } - if (data.subnetIds != null) { - contents.SubnetIds = de_SubnetIdList(data.subnetIds, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpcLinkId != null) { - contents.VpcLinkId = __expectString(data.vpcLinkId); - } - if (data.vpcLinkStatus != null) { - contents.VpcLinkStatus = __expectString(data.vpcLinkStatus); - } - if (data.vpcLinkStatusMessage != null) { - contents.VpcLinkStatusMessage = __expectString(data.vpcLinkStatusMessage); - } - if (data.vpcLinkVersion != null) { - contents.VpcLinkVersion = __expectString(data.vpcLinkVersion); - } + const doc = take(data, { + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Name: [, __expectString, `name`], + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetIds: [, _json, `subnetIds`], + Tags: [, _json, `tags`], + VpcLinkId: [, __expectString, `vpcLinkId`], + VpcLinkStatus: [, __expectString, `vpcLinkStatus`], + VpcLinkStatusMessage: [, __expectString, `vpcLinkStatusMessage`], + VpcLinkVersion: [, __expectString, `vpcLinkVersion`], + }); + Object.assign(contents, doc); return contents; }; @@ -3491,10 +3282,9 @@ const de_CreateVpcLinkCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3538,10 +3328,9 @@ const de_DeleteAccessLogSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3585,10 +3374,9 @@ const de_DeleteApiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3635,10 +3423,9 @@ const de_DeleteApiMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3682,10 +3469,9 @@ const de_DeleteAuthorizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3729,10 +3515,9 @@ const de_DeleteCorsConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3776,10 +3561,9 @@ const de_DeleteDeploymentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3823,10 +3607,9 @@ const de_DeleteDomainNameCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3870,10 +3653,9 @@ const de_DeleteIntegrationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3917,10 +3699,9 @@ const de_DeleteIntegrationResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3964,10 +3745,9 @@ const de_DeleteModelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4011,10 +3791,9 @@ const de_DeleteRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4058,10 +3837,9 @@ const de_DeleteRouteRequestParameterCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4105,10 +3883,9 @@ const de_DeleteRouteResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4152,10 +3929,9 @@ const de_DeleteRouteSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4199,10 +3975,9 @@ const de_DeleteStageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4246,10 +4021,9 @@ const de_DeleteVpcLinkCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4297,10 +4071,9 @@ const de_ExportApiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4320,54 +4093,25 @@ export const de_GetApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiEndpoint != null) { - contents.ApiEndpoint = __expectString(data.apiEndpoint); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiKeySelectionExpression != null) { - contents.ApiKeySelectionExpression = __expectString(data.apiKeySelectionExpression); - } - if (data.corsConfiguration != null) { - contents.CorsConfiguration = de_Cors(data.corsConfiguration, context); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.DisableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.disableSchemaValidation != null) { - contents.DisableSchemaValidation = __expectBoolean(data.disableSchemaValidation); - } - if (data.importInfo != null) { - contents.ImportInfo = de___listOf__string(data.importInfo, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.protocolType != null) { - contents.ProtocolType = __expectString(data.protocolType); - } - if (data.routeSelectionExpression != null) { - contents.RouteSelectionExpression = __expectString(data.routeSelectionExpression); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.version != null) { - contents.Version = __expectString(data.version); - } - if (data.warnings != null) { - contents.Warnings = de___listOf__string(data.warnings, context); - } + const doc = take(data, { + ApiEndpoint: [, __expectString, `apiEndpoint`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiId: [, __expectString, `apiId`], + ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`], + CorsConfiguration: [, (_) => de_Cors(_, context), `corsConfiguration`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Description: [, __expectString, `description`], + DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`], + DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`], + ImportInfo: [, _json, `importInfo`], + Name: [, __expectString, `name`], + ProtocolType: [, __expectString, `protocolType`], + RouteSelectionExpression: [, __expectString, `routeSelectionExpression`], + Tags: [, _json, `tags`], + Version: [, __expectString, `version`], + Warnings: [, _json, `warnings`], + }); + Object.assign(contents, doc); return contents; }; @@ -4389,10 +4133,9 @@ const de_GetApiCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4412,18 +4155,13 @@ export const de_GetApiMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiMappingId != null) { - contents.ApiMappingId = __expectString(data.apiMappingId); - } - if (data.apiMappingKey != null) { - contents.ApiMappingKey = __expectString(data.apiMappingKey); - } - if (data.stage != null) { - contents.Stage = __expectString(data.stage); - } + const doc = take(data, { + ApiId: [, __expectString, `apiId`], + ApiMappingId: [, __expectString, `apiMappingId`], + ApiMappingKey: [, __expectString, `apiMappingKey`], + Stage: [, __expectString, `stage`], + }); + Object.assign(contents, doc); return contents; }; @@ -4451,10 +4189,9 @@ const de_GetApiMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4474,12 +4211,11 @@ export const de_GetApiMappingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfApiMapping(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfApiMapping(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4507,10 +4243,9 @@ const de_GetApiMappingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4530,12 +4265,11 @@ export const de_GetApisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfApi(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfApi(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4563,10 +4297,9 @@ const de_GetApisCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4586,39 +4319,20 @@ export const de_GetAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerCredentialsArn != null) { - contents.AuthorizerCredentialsArn = __expectString(data.authorizerCredentialsArn); - } - if (data.authorizerId != null) { - contents.AuthorizerId = __expectString(data.authorizerId); - } - if (data.authorizerPayloadFormatVersion != null) { - contents.AuthorizerPayloadFormatVersion = __expectString(data.authorizerPayloadFormatVersion); - } - if (data.authorizerResultTtlInSeconds != null) { - contents.AuthorizerResultTtlInSeconds = __expectInt32(data.authorizerResultTtlInSeconds); - } - if (data.authorizerType != null) { - contents.AuthorizerType = __expectString(data.authorizerType); - } - if (data.authorizerUri != null) { - contents.AuthorizerUri = __expectString(data.authorizerUri); - } - if (data.enableSimpleResponses != null) { - contents.EnableSimpleResponses = __expectBoolean(data.enableSimpleResponses); - } - if (data.identitySource != null) { - contents.IdentitySource = de_IdentitySourceList(data.identitySource, context); - } - if (data.identityValidationExpression != null) { - contents.IdentityValidationExpression = __expectString(data.identityValidationExpression); - } - if (data.jwtConfiguration != null) { - contents.JwtConfiguration = de_JWTConfiguration(data.jwtConfiguration, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } + const doc = take(data, { + AuthorizerCredentialsArn: [, __expectString, `authorizerCredentialsArn`], + AuthorizerId: [, __expectString, `authorizerId`], + AuthorizerPayloadFormatVersion: [, __expectString, `authorizerPayloadFormatVersion`], + AuthorizerResultTtlInSeconds: [, __expectInt32, `authorizerResultTtlInSeconds`], + AuthorizerType: [, __expectString, `authorizerType`], + AuthorizerUri: [, __expectString, `authorizerUri`], + EnableSimpleResponses: [, __expectBoolean, `enableSimpleResponses`], + IdentitySource: [, _json, `identitySource`], + IdentityValidationExpression: [, __expectString, `identityValidationExpression`], + JwtConfiguration: [, (_) => de_JWTConfiguration(_, context), `jwtConfiguration`], + Name: [, __expectString, `name`], + }); + Object.assign(contents, doc); return contents; }; @@ -4643,10 +4357,9 @@ const de_GetAuthorizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4666,12 +4379,11 @@ export const de_GetAuthorizersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfAuthorizer(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfAuthorizer(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4699,10 +4411,9 @@ const de_GetAuthorizersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4722,24 +4433,15 @@ export const de_GetDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoDeployed != null) { - contents.AutoDeployed = __expectBoolean(data.autoDeployed); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.deploymentId != null) { - contents.DeploymentId = __expectString(data.deploymentId); - } - if (data.deploymentStatus != null) { - contents.DeploymentStatus = __expectString(data.deploymentStatus); - } - if (data.deploymentStatusMessage != null) { - contents.DeploymentStatusMessage = __expectString(data.deploymentStatusMessage); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } + const doc = take(data, { + AutoDeployed: [, __expectBoolean, `autoDeployed`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DeploymentId: [, __expectString, `deploymentId`], + DeploymentStatus: [, __expectString, `deploymentStatus`], + DeploymentStatusMessage: [, __expectString, `deploymentStatusMessage`], + Description: [, __expectString, `description`], + }); + Object.assign(contents, doc); return contents; }; @@ -4764,10 +4466,9 @@ const de_GetDeploymentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4787,12 +4488,11 @@ export const de_GetDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfDeployment(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfDeployment(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4820,10 +4520,9 @@ const de_GetDeploymentsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4843,21 +4542,14 @@ export const de_GetDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiMappingSelectionExpression != null) { - contents.ApiMappingSelectionExpression = __expectString(data.apiMappingSelectionExpression); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.domainNameConfigurations != null) { - contents.DomainNameConfigurations = de_DomainNameConfigurations(data.domainNameConfigurations, context); - } - if (data.mutualTlsAuthentication != null) { - contents.MutualTlsAuthentication = de_MutualTlsAuthentication(data.mutualTlsAuthentication, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ApiMappingSelectionExpression: [, __expectString, `apiMappingSelectionExpression`], + DomainName: [, __expectString, `domainName`], + DomainNameConfigurations: [, (_) => de_DomainNameConfigurations(_, context), `domainNameConfigurations`], + MutualTlsAuthentication: [, (_) => de_MutualTlsAuthentication(_, context), `mutualTlsAuthentication`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -4882,10 +4574,9 @@ const de_GetDomainNameCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4905,12 +4596,11 @@ export const de_GetDomainNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfDomainName(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfDomainName(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4938,10 +4628,9 @@ const de_GetDomainNamesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4961,66 +4650,29 @@ export const de_GetIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.connectionId != null) { - contents.ConnectionId = __expectString(data.connectionId); - } - if (data.connectionType != null) { - contents.ConnectionType = __expectString(data.connectionType); - } - if (data.contentHandlingStrategy != null) { - contents.ContentHandlingStrategy = __expectString(data.contentHandlingStrategy); - } - if (data.credentialsArn != null) { - contents.CredentialsArn = __expectString(data.credentialsArn); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.integrationId != null) { - contents.IntegrationId = __expectString(data.integrationId); - } - if (data.integrationMethod != null) { - contents.IntegrationMethod = __expectString(data.integrationMethod); - } - if (data.integrationResponseSelectionExpression != null) { - contents.IntegrationResponseSelectionExpression = __expectString(data.integrationResponseSelectionExpression); - } - if (data.integrationSubtype != null) { - contents.IntegrationSubtype = __expectString(data.integrationSubtype); - } - if (data.integrationType != null) { - contents.IntegrationType = __expectString(data.integrationType); - } - if (data.integrationUri != null) { - contents.IntegrationUri = __expectString(data.integrationUri); - } - if (data.passthroughBehavior != null) { - contents.PassthroughBehavior = __expectString(data.passthroughBehavior); - } - if (data.payloadFormatVersion != null) { - contents.PayloadFormatVersion = __expectString(data.payloadFormatVersion); - } - if (data.requestParameters != null) { - contents.RequestParameters = de_IntegrationParameters(data.requestParameters, context); - } - if (data.requestTemplates != null) { - contents.RequestTemplates = de_TemplateMap(data.requestTemplates, context); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_ResponseParameters(data.responseParameters, context); - } - if (data.templateSelectionExpression != null) { - contents.TemplateSelectionExpression = __expectString(data.templateSelectionExpression); - } - if (data.timeoutInMillis != null) { - contents.TimeoutInMillis = __expectInt32(data.timeoutInMillis); - } - if (data.tlsConfig != null) { - contents.TlsConfig = de_TlsConfig(data.tlsConfig, context); - } + const doc = take(data, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ConnectionId: [, __expectString, `connectionId`], + ConnectionType: [, __expectString, `connectionType`], + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + CredentialsArn: [, __expectString, `credentialsArn`], + Description: [, __expectString, `description`], + IntegrationId: [, __expectString, `integrationId`], + IntegrationMethod: [, __expectString, `integrationMethod`], + IntegrationResponseSelectionExpression: [, __expectString, `integrationResponseSelectionExpression`], + IntegrationSubtype: [, __expectString, `integrationSubtype`], + IntegrationType: [, __expectString, `integrationType`], + IntegrationUri: [, __expectString, `integrationUri`], + PassthroughBehavior: [, __expectString, `passthroughBehavior`], + PayloadFormatVersion: [, __expectString, `payloadFormatVersion`], + RequestParameters: [, _json, `requestParameters`], + RequestTemplates: [, _json, `requestTemplates`], + ResponseParameters: [, _json, `responseParameters`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + TimeoutInMillis: [, __expectInt32, `timeoutInMillis`], + TlsConfig: [, (_) => de_TlsConfig(_, context), `tlsConfig`], + }); + Object.assign(contents, doc); return contents; }; @@ -5045,10 +4697,9 @@ const de_GetIntegrationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5068,24 +4719,15 @@ export const de_GetIntegrationResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentHandlingStrategy != null) { - contents.ContentHandlingStrategy = __expectString(data.contentHandlingStrategy); - } - if (data.integrationResponseId != null) { - contents.IntegrationResponseId = __expectString(data.integrationResponseId); - } - if (data.integrationResponseKey != null) { - contents.IntegrationResponseKey = __expectString(data.integrationResponseKey); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_IntegrationParameters(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.ResponseTemplates = de_TemplateMap(data.responseTemplates, context); - } - if (data.templateSelectionExpression != null) { - contents.TemplateSelectionExpression = __expectString(data.templateSelectionExpression); - } + const doc = take(data, { + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + IntegrationResponseId: [, __expectString, `integrationResponseId`], + IntegrationResponseKey: [, __expectString, `integrationResponseKey`], + ResponseParameters: [, _json, `responseParameters`], + ResponseTemplates: [, _json, `responseTemplates`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + }); + Object.assign(contents, doc); return contents; }; @@ -5110,10 +4752,9 @@ const de_GetIntegrationResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5133,12 +4774,11 @@ export const de_GetIntegrationResponsesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfIntegrationResponse(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfIntegrationResponse(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5166,10 +4806,9 @@ const de_GetIntegrationResponsesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5189,12 +4828,11 @@ export const de_GetIntegrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfIntegration(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfIntegration(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5222,10 +4860,9 @@ const de_GetIntegrationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5245,21 +4882,14 @@ export const de_GetModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentType != null) { - contents.ContentType = __expectString(data.contentType); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.modelId != null) { - contents.ModelId = __expectString(data.modelId); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.schema != null) { - contents.Schema = __expectString(data.schema); - } + const doc = take(data, { + ContentType: [, __expectString, `contentType`], + Description: [, __expectString, `description`], + ModelId: [, __expectString, `modelId`], + Name: [, __expectString, `name`], + Schema: [, __expectString, `schema`], + }); + Object.assign(contents, doc); return contents; }; @@ -5284,10 +4914,9 @@ const de_GetModelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5307,12 +4936,11 @@ export const de_GetModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfModel(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfModel(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5340,10 +4968,9 @@ const de_GetModelsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5363,9 +4990,10 @@ export const de_GetModelTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.value != null) { - contents.Value = __expectString(data.value); - } + const doc = take(data, { + Value: [, __expectString, `value`], + }); + Object.assign(contents, doc); return contents; }; @@ -5390,10 +5018,9 @@ const de_GetModelTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5413,45 +5040,22 @@ export const de_GetRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiKeyRequired != null) { - contents.ApiKeyRequired = __expectBoolean(data.apiKeyRequired); - } - if (data.authorizationScopes != null) { - contents.AuthorizationScopes = de_AuthorizationScopes(data.authorizationScopes, context); - } - if (data.authorizationType != null) { - contents.AuthorizationType = __expectString(data.authorizationType); - } - if (data.authorizerId != null) { - contents.AuthorizerId = __expectString(data.authorizerId); - } - if (data.modelSelectionExpression != null) { - contents.ModelSelectionExpression = __expectString(data.modelSelectionExpression); - } - if (data.operationName != null) { - contents.OperationName = __expectString(data.operationName); - } - if (data.requestModels != null) { - contents.RequestModels = de_RouteModels(data.requestModels, context); - } - if (data.requestParameters != null) { - contents.RequestParameters = de_RouteParameters(data.requestParameters, context); - } - if (data.routeId != null) { - contents.RouteId = __expectString(data.routeId); - } - if (data.routeKey != null) { - contents.RouteKey = __expectString(data.routeKey); - } - if (data.routeResponseSelectionExpression != null) { - contents.RouteResponseSelectionExpression = __expectString(data.routeResponseSelectionExpression); - } - if (data.target != null) { - contents.Target = __expectString(data.target); - } + const doc = take(data, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiKeyRequired: [, __expectBoolean, `apiKeyRequired`], + AuthorizationScopes: [, _json, `authorizationScopes`], + AuthorizationType: [, __expectString, `authorizationType`], + AuthorizerId: [, __expectString, `authorizerId`], + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + OperationName: [, __expectString, `operationName`], + RequestModels: [, _json, `requestModels`], + RequestParameters: [, (_) => de_RouteParameters(_, context), `requestParameters`], + RouteId: [, __expectString, `routeId`], + RouteKey: [, __expectString, `routeKey`], + RouteResponseSelectionExpression: [, __expectString, `routeResponseSelectionExpression`], + Target: [, __expectString, `target`], + }); + Object.assign(contents, doc); return contents; }; @@ -5476,10 +5080,9 @@ const de_GetRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5499,21 +5102,14 @@ export const de_GetRouteResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.modelSelectionExpression != null) { - contents.ModelSelectionExpression = __expectString(data.modelSelectionExpression); - } - if (data.responseModels != null) { - contents.ResponseModels = de_RouteModels(data.responseModels, context); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_RouteParameters(data.responseParameters, context); - } - if (data.routeResponseId != null) { - contents.RouteResponseId = __expectString(data.routeResponseId); - } - if (data.routeResponseKey != null) { - contents.RouteResponseKey = __expectString(data.routeResponseKey); - } + const doc = take(data, { + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + ResponseModels: [, _json, `responseModels`], + ResponseParameters: [, (_) => de_RouteParameters(_, context), `responseParameters`], + RouteResponseId: [, __expectString, `routeResponseId`], + RouteResponseKey: [, __expectString, `routeResponseKey`], + }); + Object.assign(contents, doc); return contents; }; @@ -5538,10 +5134,9 @@ const de_GetRouteResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5561,12 +5156,11 @@ export const de_GetRouteResponsesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfRouteResponse(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfRouteResponse(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5594,10 +5188,9 @@ const de_GetRouteResponsesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5617,12 +5210,11 @@ export const de_GetRoutesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfRoute(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfRoute(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5650,10 +5242,9 @@ const de_GetRoutesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5673,48 +5264,23 @@ export const de_GetStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessLogSettings != null) { - contents.AccessLogSettings = de_AccessLogSettings(data.accessLogSettings, context); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.autoDeploy != null) { - contents.AutoDeploy = __expectBoolean(data.autoDeploy); - } - if (data.clientCertificateId != null) { - contents.ClientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.defaultRouteSettings != null) { - contents.DefaultRouteSettings = de_RouteSettings(data.defaultRouteSettings, context); - } - if (data.deploymentId != null) { - contents.DeploymentId = __expectString(data.deploymentId); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.lastDeploymentStatusMessage != null) { - contents.LastDeploymentStatusMessage = __expectString(data.lastDeploymentStatusMessage); - } - if (data.lastUpdatedDate != null) { - contents.LastUpdatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedDate)); - } - if (data.routeSettings != null) { - contents.RouteSettings = de_RouteSettingsMap(data.routeSettings, context); - } - if (data.stageName != null) { - contents.StageName = __expectString(data.stageName); - } - if (data.stageVariables != null) { - contents.StageVariables = de_StageVariablesMap(data.stageVariables, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + AccessLogSettings: [, (_) => de_AccessLogSettings(_, context), `accessLogSettings`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + AutoDeploy: [, __expectBoolean, `autoDeploy`], + ClientCertificateId: [, __expectString, `clientCertificateId`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DefaultRouteSettings: [, (_) => de_RouteSettings(_, context), `defaultRouteSettings`], + DeploymentId: [, __expectString, `deploymentId`], + Description: [, __expectString, `description`], + LastDeploymentStatusMessage: [, __expectString, `lastDeploymentStatusMessage`], + LastUpdatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedDate`], + RouteSettings: [, (_) => de_RouteSettingsMap(_, context), `routeSettings`], + StageName: [, __expectString, `stageName`], + StageVariables: [, _json, `stageVariables`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -5739,10 +5305,9 @@ const de_GetStageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5762,12 +5327,11 @@ export const de_GetStagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfStage(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfStage(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5795,10 +5359,9 @@ const de_GetStagesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5818,9 +5381,10 @@ export const de_GetTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -5851,10 +5415,9 @@ const de_GetTagsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5874,33 +5437,18 @@ export const de_GetVpcLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.securityGroupIds != null) { - contents.SecurityGroupIds = de_SecurityGroupIdList(data.securityGroupIds, context); - } - if (data.subnetIds != null) { - contents.SubnetIds = de_SubnetIdList(data.subnetIds, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpcLinkId != null) { - contents.VpcLinkId = __expectString(data.vpcLinkId); - } - if (data.vpcLinkStatus != null) { - contents.VpcLinkStatus = __expectString(data.vpcLinkStatus); - } - if (data.vpcLinkStatusMessage != null) { - contents.VpcLinkStatusMessage = __expectString(data.vpcLinkStatusMessage); - } - if (data.vpcLinkVersion != null) { - contents.VpcLinkVersion = __expectString(data.vpcLinkVersion); - } + const doc = take(data, { + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Name: [, __expectString, `name`], + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetIds: [, _json, `subnetIds`], + Tags: [, _json, `tags`], + VpcLinkId: [, __expectString, `vpcLinkId`], + VpcLinkStatus: [, __expectString, `vpcLinkStatus`], + VpcLinkStatusMessage: [, __expectString, `vpcLinkStatusMessage`], + VpcLinkVersion: [, __expectString, `vpcLinkVersion`], + }); + Object.assign(contents, doc); return contents; }; @@ -5925,10 +5473,9 @@ const de_GetVpcLinkCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5948,12 +5495,11 @@ export const de_GetVpcLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.Items = de___listOfVpcLink(data.items, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Items: [, (_) => de___listOfVpcLink(_, context), `items`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5978,10 +5524,9 @@ const de_GetVpcLinksCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6001,54 +5546,25 @@ export const de_ImportApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiEndpoint != null) { - contents.ApiEndpoint = __expectString(data.apiEndpoint); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiKeySelectionExpression != null) { - contents.ApiKeySelectionExpression = __expectString(data.apiKeySelectionExpression); - } - if (data.corsConfiguration != null) { - contents.CorsConfiguration = de_Cors(data.corsConfiguration, context); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.DisableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.disableSchemaValidation != null) { - contents.DisableSchemaValidation = __expectBoolean(data.disableSchemaValidation); - } - if (data.importInfo != null) { - contents.ImportInfo = de___listOf__string(data.importInfo, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.protocolType != null) { - contents.ProtocolType = __expectString(data.protocolType); - } - if (data.routeSelectionExpression != null) { - contents.RouteSelectionExpression = __expectString(data.routeSelectionExpression); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.version != null) { - contents.Version = __expectString(data.version); - } - if (data.warnings != null) { - contents.Warnings = de___listOf__string(data.warnings, context); - } + const doc = take(data, { + ApiEndpoint: [, __expectString, `apiEndpoint`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiId: [, __expectString, `apiId`], + ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`], + CorsConfiguration: [, (_) => de_Cors(_, context), `corsConfiguration`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Description: [, __expectString, `description`], + DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`], + DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`], + ImportInfo: [, _json, `importInfo`], + Name: [, __expectString, `name`], + ProtocolType: [, __expectString, `protocolType`], + RouteSelectionExpression: [, __expectString, `routeSelectionExpression`], + Tags: [, _json, `tags`], + Version: [, __expectString, `version`], + Warnings: [, _json, `warnings`], + }); + Object.assign(contents, doc); return contents; }; @@ -6079,10 +5595,9 @@ const de_ImportApiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6102,54 +5617,25 @@ export const de_ReimportApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiEndpoint != null) { - contents.ApiEndpoint = __expectString(data.apiEndpoint); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiKeySelectionExpression != null) { - contents.ApiKeySelectionExpression = __expectString(data.apiKeySelectionExpression); - } - if (data.corsConfiguration != null) { - contents.CorsConfiguration = de_Cors(data.corsConfiguration, context); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.DisableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.disableSchemaValidation != null) { - contents.DisableSchemaValidation = __expectBoolean(data.disableSchemaValidation); - } - if (data.importInfo != null) { - contents.ImportInfo = de___listOf__string(data.importInfo, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.protocolType != null) { - contents.ProtocolType = __expectString(data.protocolType); - } - if (data.routeSelectionExpression != null) { - contents.RouteSelectionExpression = __expectString(data.routeSelectionExpression); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.version != null) { - contents.Version = __expectString(data.version); - } - if (data.warnings != null) { - contents.Warnings = de___listOf__string(data.warnings, context); - } + const doc = take(data, { + ApiEndpoint: [, __expectString, `apiEndpoint`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiId: [, __expectString, `apiId`], + ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`], + CorsConfiguration: [, (_) => de_Cors(_, context), `corsConfiguration`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Description: [, __expectString, `description`], + DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`], + DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`], + ImportInfo: [, _json, `importInfo`], + Name: [, __expectString, `name`], + ProtocolType: [, __expectString, `protocolType`], + RouteSelectionExpression: [, __expectString, `routeSelectionExpression`], + Tags: [, _json, `tags`], + Version: [, __expectString, `version`], + Warnings: [, _json, `warnings`], + }); + Object.assign(contents, doc); return contents; }; @@ -6180,10 +5666,9 @@ const de_ReimportApiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6227,10 +5712,9 @@ const de_ResetAuthorizersCacheCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6280,10 +5764,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6333,10 +5816,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6356,54 +5838,25 @@ export const de_UpdateApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiEndpoint != null) { - contents.ApiEndpoint = __expectString(data.apiEndpoint); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiKeySelectionExpression != null) { - contents.ApiKeySelectionExpression = __expectString(data.apiKeySelectionExpression); - } - if (data.corsConfiguration != null) { - contents.CorsConfiguration = de_Cors(data.corsConfiguration, context); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.disableExecuteApiEndpoint != null) { - contents.DisableExecuteApiEndpoint = __expectBoolean(data.disableExecuteApiEndpoint); - } - if (data.disableSchemaValidation != null) { - contents.DisableSchemaValidation = __expectBoolean(data.disableSchemaValidation); - } - if (data.importInfo != null) { - contents.ImportInfo = de___listOf__string(data.importInfo, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.protocolType != null) { - contents.ProtocolType = __expectString(data.protocolType); - } - if (data.routeSelectionExpression != null) { - contents.RouteSelectionExpression = __expectString(data.routeSelectionExpression); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.version != null) { - contents.Version = __expectString(data.version); - } - if (data.warnings != null) { - contents.Warnings = de___listOf__string(data.warnings, context); - } + const doc = take(data, { + ApiEndpoint: [, __expectString, `apiEndpoint`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiId: [, __expectString, `apiId`], + ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`], + CorsConfiguration: [, (_) => de_Cors(_, context), `corsConfiguration`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Description: [, __expectString, `description`], + DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`], + DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`], + ImportInfo: [, _json, `importInfo`], + Name: [, __expectString, `name`], + ProtocolType: [, __expectString, `protocolType`], + RouteSelectionExpression: [, __expectString, `routeSelectionExpression`], + Tags: [, _json, `tags`], + Version: [, __expectString, `version`], + Warnings: [, _json, `warnings`], + }); + Object.assign(contents, doc); return contents; }; @@ -6434,10 +5887,9 @@ const de_UpdateApiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6457,18 +5909,13 @@ export const de_UpdateApiMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiId != null) { - contents.ApiId = __expectString(data.apiId); - } - if (data.apiMappingId != null) { - contents.ApiMappingId = __expectString(data.apiMappingId); - } - if (data.apiMappingKey != null) { - contents.ApiMappingKey = __expectString(data.apiMappingKey); - } - if (data.stage != null) { - contents.Stage = __expectString(data.stage); - } + const doc = take(data, { + ApiId: [, __expectString, `apiId`], + ApiMappingId: [, __expectString, `apiMappingId`], + ApiMappingKey: [, __expectString, `apiMappingKey`], + Stage: [, __expectString, `stage`], + }); + Object.assign(contents, doc); return contents; }; @@ -6499,10 +5946,9 @@ const de_UpdateApiMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6522,39 +5968,20 @@ export const de_UpdateAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerCredentialsArn != null) { - contents.AuthorizerCredentialsArn = __expectString(data.authorizerCredentialsArn); - } - if (data.authorizerId != null) { - contents.AuthorizerId = __expectString(data.authorizerId); - } - if (data.authorizerPayloadFormatVersion != null) { - contents.AuthorizerPayloadFormatVersion = __expectString(data.authorizerPayloadFormatVersion); - } - if (data.authorizerResultTtlInSeconds != null) { - contents.AuthorizerResultTtlInSeconds = __expectInt32(data.authorizerResultTtlInSeconds); - } - if (data.authorizerType != null) { - contents.AuthorizerType = __expectString(data.authorizerType); - } - if (data.authorizerUri != null) { - contents.AuthorizerUri = __expectString(data.authorizerUri); - } - if (data.enableSimpleResponses != null) { - contents.EnableSimpleResponses = __expectBoolean(data.enableSimpleResponses); - } - if (data.identitySource != null) { - contents.IdentitySource = de_IdentitySourceList(data.identitySource, context); - } - if (data.identityValidationExpression != null) { - contents.IdentityValidationExpression = __expectString(data.identityValidationExpression); - } - if (data.jwtConfiguration != null) { - contents.JwtConfiguration = de_JWTConfiguration(data.jwtConfiguration, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } + const doc = take(data, { + AuthorizerCredentialsArn: [, __expectString, `authorizerCredentialsArn`], + AuthorizerId: [, __expectString, `authorizerId`], + AuthorizerPayloadFormatVersion: [, __expectString, `authorizerPayloadFormatVersion`], + AuthorizerResultTtlInSeconds: [, __expectInt32, `authorizerResultTtlInSeconds`], + AuthorizerType: [, __expectString, `authorizerType`], + AuthorizerUri: [, __expectString, `authorizerUri`], + EnableSimpleResponses: [, __expectBoolean, `enableSimpleResponses`], + IdentitySource: [, _json, `identitySource`], + IdentityValidationExpression: [, __expectString, `identityValidationExpression`], + JwtConfiguration: [, (_) => de_JWTConfiguration(_, context), `jwtConfiguration`], + Name: [, __expectString, `name`], + }); + Object.assign(contents, doc); return contents; }; @@ -6585,10 +6012,9 @@ const de_UpdateAuthorizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6608,24 +6034,15 @@ export const de_UpdateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoDeployed != null) { - contents.AutoDeployed = __expectBoolean(data.autoDeployed); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.deploymentId != null) { - contents.DeploymentId = __expectString(data.deploymentId); - } - if (data.deploymentStatus != null) { - contents.DeploymentStatus = __expectString(data.deploymentStatus); - } - if (data.deploymentStatusMessage != null) { - contents.DeploymentStatusMessage = __expectString(data.deploymentStatusMessage); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } + const doc = take(data, { + AutoDeployed: [, __expectBoolean, `autoDeployed`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DeploymentId: [, __expectString, `deploymentId`], + DeploymentStatus: [, __expectString, `deploymentStatus`], + DeploymentStatusMessage: [, __expectString, `deploymentStatusMessage`], + Description: [, __expectString, `description`], + }); + Object.assign(contents, doc); return contents; }; @@ -6656,10 +6073,9 @@ const de_UpdateDeploymentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6679,21 +6095,14 @@ export const de_UpdateDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiMappingSelectionExpression != null) { - contents.ApiMappingSelectionExpression = __expectString(data.apiMappingSelectionExpression); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.domainNameConfigurations != null) { - contents.DomainNameConfigurations = de_DomainNameConfigurations(data.domainNameConfigurations, context); - } - if (data.mutualTlsAuthentication != null) { - contents.MutualTlsAuthentication = de_MutualTlsAuthentication(data.mutualTlsAuthentication, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ApiMappingSelectionExpression: [, __expectString, `apiMappingSelectionExpression`], + DomainName: [, __expectString, `domainName`], + DomainNameConfigurations: [, (_) => de_DomainNameConfigurations(_, context), `domainNameConfigurations`], + MutualTlsAuthentication: [, (_) => de_MutualTlsAuthentication(_, context), `mutualTlsAuthentication`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -6724,10 +6133,9 @@ const de_UpdateDomainNameCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6747,66 +6155,29 @@ export const de_UpdateIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.connectionId != null) { - contents.ConnectionId = __expectString(data.connectionId); - } - if (data.connectionType != null) { - contents.ConnectionType = __expectString(data.connectionType); - } - if (data.contentHandlingStrategy != null) { - contents.ContentHandlingStrategy = __expectString(data.contentHandlingStrategy); - } - if (data.credentialsArn != null) { - contents.CredentialsArn = __expectString(data.credentialsArn); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.integrationId != null) { - contents.IntegrationId = __expectString(data.integrationId); - } - if (data.integrationMethod != null) { - contents.IntegrationMethod = __expectString(data.integrationMethod); - } - if (data.integrationResponseSelectionExpression != null) { - contents.IntegrationResponseSelectionExpression = __expectString(data.integrationResponseSelectionExpression); - } - if (data.integrationSubtype != null) { - contents.IntegrationSubtype = __expectString(data.integrationSubtype); - } - if (data.integrationType != null) { - contents.IntegrationType = __expectString(data.integrationType); - } - if (data.integrationUri != null) { - contents.IntegrationUri = __expectString(data.integrationUri); - } - if (data.passthroughBehavior != null) { - contents.PassthroughBehavior = __expectString(data.passthroughBehavior); - } - if (data.payloadFormatVersion != null) { - contents.PayloadFormatVersion = __expectString(data.payloadFormatVersion); - } - if (data.requestParameters != null) { - contents.RequestParameters = de_IntegrationParameters(data.requestParameters, context); - } - if (data.requestTemplates != null) { - contents.RequestTemplates = de_TemplateMap(data.requestTemplates, context); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_ResponseParameters(data.responseParameters, context); - } - if (data.templateSelectionExpression != null) { - contents.TemplateSelectionExpression = __expectString(data.templateSelectionExpression); - } - if (data.timeoutInMillis != null) { - contents.TimeoutInMillis = __expectInt32(data.timeoutInMillis); - } - if (data.tlsConfig != null) { - contents.TlsConfig = de_TlsConfig(data.tlsConfig, context); - } + const doc = take(data, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ConnectionId: [, __expectString, `connectionId`], + ConnectionType: [, __expectString, `connectionType`], + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + CredentialsArn: [, __expectString, `credentialsArn`], + Description: [, __expectString, `description`], + IntegrationId: [, __expectString, `integrationId`], + IntegrationMethod: [, __expectString, `integrationMethod`], + IntegrationResponseSelectionExpression: [, __expectString, `integrationResponseSelectionExpression`], + IntegrationSubtype: [, __expectString, `integrationSubtype`], + IntegrationType: [, __expectString, `integrationType`], + IntegrationUri: [, __expectString, `integrationUri`], + PassthroughBehavior: [, __expectString, `passthroughBehavior`], + PayloadFormatVersion: [, __expectString, `payloadFormatVersion`], + RequestParameters: [, _json, `requestParameters`], + RequestTemplates: [, _json, `requestTemplates`], + ResponseParameters: [, _json, `responseParameters`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + TimeoutInMillis: [, __expectInt32, `timeoutInMillis`], + TlsConfig: [, (_) => de_TlsConfig(_, context), `tlsConfig`], + }); + Object.assign(contents, doc); return contents; }; @@ -6837,10 +6208,9 @@ const de_UpdateIntegrationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6860,24 +6230,15 @@ export const de_UpdateIntegrationResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentHandlingStrategy != null) { - contents.ContentHandlingStrategy = __expectString(data.contentHandlingStrategy); - } - if (data.integrationResponseId != null) { - contents.IntegrationResponseId = __expectString(data.integrationResponseId); - } - if (data.integrationResponseKey != null) { - contents.IntegrationResponseKey = __expectString(data.integrationResponseKey); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_IntegrationParameters(data.responseParameters, context); - } - if (data.responseTemplates != null) { - contents.ResponseTemplates = de_TemplateMap(data.responseTemplates, context); - } - if (data.templateSelectionExpression != null) { - contents.TemplateSelectionExpression = __expectString(data.templateSelectionExpression); - } + const doc = take(data, { + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + IntegrationResponseId: [, __expectString, `integrationResponseId`], + IntegrationResponseKey: [, __expectString, `integrationResponseKey`], + ResponseParameters: [, _json, `responseParameters`], + ResponseTemplates: [, _json, `responseTemplates`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + }); + Object.assign(contents, doc); return contents; }; @@ -6908,10 +6269,9 @@ const de_UpdateIntegrationResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6931,21 +6291,14 @@ export const de_UpdateModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentType != null) { - contents.ContentType = __expectString(data.contentType); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.modelId != null) { - contents.ModelId = __expectString(data.modelId); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.schema != null) { - contents.Schema = __expectString(data.schema); - } + const doc = take(data, { + ContentType: [, __expectString, `contentType`], + Description: [, __expectString, `description`], + ModelId: [, __expectString, `modelId`], + Name: [, __expectString, `name`], + Schema: [, __expectString, `schema`], + }); + Object.assign(contents, doc); return contents; }; @@ -6976,10 +6329,9 @@ const de_UpdateModelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6999,45 +6351,22 @@ export const de_UpdateRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.apiKeyRequired != null) { - contents.ApiKeyRequired = __expectBoolean(data.apiKeyRequired); - } - if (data.authorizationScopes != null) { - contents.AuthorizationScopes = de_AuthorizationScopes(data.authorizationScopes, context); - } - if (data.authorizationType != null) { - contents.AuthorizationType = __expectString(data.authorizationType); - } - if (data.authorizerId != null) { - contents.AuthorizerId = __expectString(data.authorizerId); - } - if (data.modelSelectionExpression != null) { - contents.ModelSelectionExpression = __expectString(data.modelSelectionExpression); - } - if (data.operationName != null) { - contents.OperationName = __expectString(data.operationName); - } - if (data.requestModels != null) { - contents.RequestModels = de_RouteModels(data.requestModels, context); - } - if (data.requestParameters != null) { - contents.RequestParameters = de_RouteParameters(data.requestParameters, context); - } - if (data.routeId != null) { - contents.RouteId = __expectString(data.routeId); - } - if (data.routeKey != null) { - contents.RouteKey = __expectString(data.routeKey); - } - if (data.routeResponseSelectionExpression != null) { - contents.RouteResponseSelectionExpression = __expectString(data.routeResponseSelectionExpression); - } - if (data.target != null) { - contents.Target = __expectString(data.target); - } + const doc = take(data, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiKeyRequired: [, __expectBoolean, `apiKeyRequired`], + AuthorizationScopes: [, _json, `authorizationScopes`], + AuthorizationType: [, __expectString, `authorizationType`], + AuthorizerId: [, __expectString, `authorizerId`], + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + OperationName: [, __expectString, `operationName`], + RequestModels: [, _json, `requestModels`], + RequestParameters: [, (_) => de_RouteParameters(_, context), `requestParameters`], + RouteId: [, __expectString, `routeId`], + RouteKey: [, __expectString, `routeKey`], + RouteResponseSelectionExpression: [, __expectString, `routeResponseSelectionExpression`], + Target: [, __expectString, `target`], + }); + Object.assign(contents, doc); return contents; }; @@ -7068,10 +6397,9 @@ const de_UpdateRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7091,21 +6419,14 @@ export const de_UpdateRouteResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.modelSelectionExpression != null) { - contents.ModelSelectionExpression = __expectString(data.modelSelectionExpression); - } - if (data.responseModels != null) { - contents.ResponseModels = de_RouteModels(data.responseModels, context); - } - if (data.responseParameters != null) { - contents.ResponseParameters = de_RouteParameters(data.responseParameters, context); - } - if (data.routeResponseId != null) { - contents.RouteResponseId = __expectString(data.routeResponseId); - } - if (data.routeResponseKey != null) { - contents.RouteResponseKey = __expectString(data.routeResponseKey); - } + const doc = take(data, { + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + ResponseModels: [, _json, `responseModels`], + ResponseParameters: [, (_) => de_RouteParameters(_, context), `responseParameters`], + RouteResponseId: [, __expectString, `routeResponseId`], + RouteResponseKey: [, __expectString, `routeResponseKey`], + }); + Object.assign(contents, doc); return contents; }; @@ -7136,10 +6457,9 @@ const de_UpdateRouteResponseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7159,48 +6479,23 @@ export const de_UpdateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessLogSettings != null) { - contents.AccessLogSettings = de_AccessLogSettings(data.accessLogSettings, context); - } - if (data.apiGatewayManaged != null) { - contents.ApiGatewayManaged = __expectBoolean(data.apiGatewayManaged); - } - if (data.autoDeploy != null) { - contents.AutoDeploy = __expectBoolean(data.autoDeploy); - } - if (data.clientCertificateId != null) { - contents.ClientCertificateId = __expectString(data.clientCertificateId); - } - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.defaultRouteSettings != null) { - contents.DefaultRouteSettings = de_RouteSettings(data.defaultRouteSettings, context); - } - if (data.deploymentId != null) { - contents.DeploymentId = __expectString(data.deploymentId); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.lastDeploymentStatusMessage != null) { - contents.LastDeploymentStatusMessage = __expectString(data.lastDeploymentStatusMessage); - } - if (data.lastUpdatedDate != null) { - contents.LastUpdatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedDate)); - } - if (data.routeSettings != null) { - contents.RouteSettings = de_RouteSettingsMap(data.routeSettings, context); - } - if (data.stageName != null) { - contents.StageName = __expectString(data.stageName); - } - if (data.stageVariables != null) { - contents.StageVariables = de_StageVariablesMap(data.stageVariables, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + AccessLogSettings: [, (_) => de_AccessLogSettings(_, context), `accessLogSettings`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + AutoDeploy: [, __expectBoolean, `autoDeploy`], + ClientCertificateId: [, __expectString, `clientCertificateId`], + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DefaultRouteSettings: [, (_) => de_RouteSettings(_, context), `defaultRouteSettings`], + DeploymentId: [, __expectString, `deploymentId`], + Description: [, __expectString, `description`], + LastDeploymentStatusMessage: [, __expectString, `lastDeploymentStatusMessage`], + LastUpdatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedDate`], + RouteSettings: [, (_) => de_RouteSettingsMap(_, context), `routeSettings`], + StageName: [, __expectString, `stageName`], + StageVariables: [, _json, `stageVariables`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -7231,10 +6526,9 @@ const de_UpdateStageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7254,33 +6548,18 @@ export const de_UpdateVpcLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.CreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdDate)); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.securityGroupIds != null) { - contents.SecurityGroupIds = de_SecurityGroupIdList(data.securityGroupIds, context); - } - if (data.subnetIds != null) { - contents.SubnetIds = de_SubnetIdList(data.subnetIds, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpcLinkId != null) { - contents.VpcLinkId = __expectString(data.vpcLinkId); - } - if (data.vpcLinkStatus != null) { - contents.VpcLinkStatus = __expectString(data.vpcLinkStatus); - } - if (data.vpcLinkStatusMessage != null) { - contents.VpcLinkStatusMessage = __expectString(data.vpcLinkStatusMessage); - } - if (data.vpcLinkVersion != null) { - contents.VpcLinkVersion = __expectString(data.vpcLinkVersion); - } + const doc = take(data, { + CreatedDate: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Name: [, __expectString, `name`], + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetIds: [, _json, `subnetIds`], + Tags: [, _json, `tags`], + VpcLinkId: [, __expectString, `vpcLinkId`], + VpcLinkStatus: [, __expectString, `vpcLinkStatus`], + VpcLinkStatusMessage: [, __expectString, `vpcLinkStatusMessage`], + VpcLinkVersion: [, __expectString, `vpcLinkVersion`], + }); + Object.assign(contents, doc); return contents; }; @@ -7308,16 +6587,15 @@ const de_UpdateVpcLinkCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -7327,9 +6605,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7343,9 +6622,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7359,9 +6639,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7375,12 +6656,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.resourceType != null) { - contents.ResourceType = __expectString(data.resourceType); - } + const doc = take(data, { + Message: [, __expectString, `message`], + ResourceType: [, __expectString, `resourceType`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7397,12 +6677,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.limitType != null) { - contents.LimitType = __expectString(data.limitType); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + LimitType: [, __expectString, `limitType`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7410,105 +6689,56 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1AccessLogSettings */ const se_AccessLogSettings = (input: AccessLogSettings, context: __SerdeContext): any => { - return { - ...(input.DestinationArn != null && { destinationArn: input.DestinationArn }), - ...(input.Format != null && { format: input.Format }), - }; + return take(input, { + destinationArn: [, , `DestinationArn`], + format: [, , `Format`], + }); }; -/** - * serializeAws_restJson1AuthorizationScopes - */ -const se_AuthorizationScopes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AuthorizationScopes omitted. /** * serializeAws_restJson1Cors */ const se_Cors = (input: Cors, context: __SerdeContext): any => { - return { - ...(input.AllowCredentials != null && { allowCredentials: input.AllowCredentials }), - ...(input.AllowHeaders != null && { allowHeaders: se_CorsHeaderList(input.AllowHeaders, context) }), - ...(input.AllowMethods != null && { allowMethods: se_CorsMethodList(input.AllowMethods, context) }), - ...(input.AllowOrigins != null && { allowOrigins: se_CorsOriginList(input.AllowOrigins, context) }), - ...(input.ExposeHeaders != null && { exposeHeaders: se_CorsHeaderList(input.ExposeHeaders, context) }), - ...(input.MaxAge != null && { maxAge: input.MaxAge }), - }; + return take(input, { + allowCredentials: [, , `AllowCredentials`], + allowHeaders: [, _json, `AllowHeaders`], + allowMethods: [, _json, `AllowMethods`], + allowOrigins: [, _json, `AllowOrigins`], + exposeHeaders: [, _json, `ExposeHeaders`], + maxAge: [, , `MaxAge`], + }); }; -/** - * serializeAws_restJson1CorsHeaderList - */ -const se_CorsHeaderList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CorsHeaderList omitted. -/** - * serializeAws_restJson1CorsMethodList - */ -const se_CorsMethodList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CorsMethodList omitted. -/** - * serializeAws_restJson1CorsOriginList - */ -const se_CorsOriginList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CorsOriginList omitted. /** * serializeAws_restJson1DomainNameConfiguration */ const se_DomainNameConfiguration = (input: DomainNameConfiguration, context: __SerdeContext): any => { - return { - ...(input.ApiGatewayDomainName != null && { apiGatewayDomainName: input.ApiGatewayDomainName }), - ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }), - ...(input.CertificateName != null && { certificateName: input.CertificateName }), - ...(input.CertificateUploadDate != null && { - certificateUploadDate: input.CertificateUploadDate.toISOString().split(".")[0] + "Z", - }), - ...(input.DomainNameStatus != null && { domainNameStatus: input.DomainNameStatus }), - ...(input.DomainNameStatusMessage != null && { domainNameStatusMessage: input.DomainNameStatusMessage }), - ...(input.EndpointType != null && { endpointType: input.EndpointType }), - ...(input.HostedZoneId != null && { hostedZoneId: input.HostedZoneId }), - ...(input.OwnershipVerificationCertificateArn != null && { - ownershipVerificationCertificateArn: input.OwnershipVerificationCertificateArn, - }), - ...(input.SecurityPolicy != null && { securityPolicy: input.SecurityPolicy }), - }; + return take(input, { + apiGatewayDomainName: [, , `ApiGatewayDomainName`], + certificateArn: [, , `CertificateArn`], + certificateName: [, , `CertificateName`], + certificateUploadDate: [, (_) => _.toISOString().split(".")[0] + "Z", `CertificateUploadDate`], + domainNameStatus: [, , `DomainNameStatus`], + domainNameStatusMessage: [, , `DomainNameStatusMessage`], + endpointType: [, , `EndpointType`], + hostedZoneId: [, , `HostedZoneId`], + ownershipVerificationCertificateArn: [, , `OwnershipVerificationCertificateArn`], + securityPolicy: [, , `SecurityPolicy`], + }); }; /** @@ -7522,84 +6752,42 @@ const se_DomainNameConfigurations = (input: DomainNameConfiguration[], context: }); }; -/** - * serializeAws_restJson1IdentitySourceList - */ -const se_IdentitySourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdentitySourceList omitted. -/** - * serializeAws_restJson1IntegrationParameters - */ -const se_IntegrationParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_IntegrationParameters omitted. /** * serializeAws_restJson1JWTConfiguration */ const se_JWTConfiguration = (input: JWTConfiguration, context: __SerdeContext): any => { - return { - ...(input.Audience != null && { audience: se___listOf__string(input.Audience, context) }), - ...(input.Issuer != null && { issuer: input.Issuer }), - }; + return take(input, { + audience: [, _json, `Audience`], + issuer: [, , `Issuer`], + }); }; /** * serializeAws_restJson1MutualTlsAuthenticationInput */ const se_MutualTlsAuthenticationInput = (input: MutualTlsAuthenticationInput, context: __SerdeContext): any => { - return { - ...(input.TruststoreUri != null && { truststoreUri: input.TruststoreUri }), - ...(input.TruststoreVersion != null && { truststoreVersion: input.TruststoreVersion }), - }; + return take(input, { + truststoreUri: [, , `TruststoreUri`], + truststoreVersion: [, , `TruststoreVersion`], + }); }; /** * serializeAws_restJson1ParameterConstraints */ const se_ParameterConstraints = (input: ParameterConstraints, context: __SerdeContext): any => { - return { - ...(input.Required != null && { required: input.Required }), - }; + return take(input, { + required: [, , `Required`], + }); }; -/** - * serializeAws_restJson1ResponseParameters - */ -const se_ResponseParameters = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_IntegrationParameters(value, context); - return acc; - }, {}); -}; +// se_ResponseParameters omitted. -/** - * serializeAws_restJson1RouteModels - */ -const se_RouteModels = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_RouteModels omitted. /** * serializeAws_restJson1RouteParameters @@ -7618,13 +6806,13 @@ const se_RouteParameters = (input: Record, context * serializeAws_restJson1RouteSettings */ const se_RouteSettings = (input: RouteSettings, context: __SerdeContext): any => { - return { - ...(input.DataTraceEnabled != null && { dataTraceEnabled: input.DataTraceEnabled }), - ...(input.DetailedMetricsEnabled != null && { detailedMetricsEnabled: input.DetailedMetricsEnabled }), - ...(input.LoggingLevel != null && { loggingLevel: input.LoggingLevel }), - ...(input.ThrottlingBurstLimit != null && { throttlingBurstLimit: input.ThrottlingBurstLimit }), - ...(input.ThrottlingRateLimit != null && { throttlingRateLimit: __serializeFloat(input.ThrottlingRateLimit) }), - }; + return take(input, { + dataTraceEnabled: [, , `DataTraceEnabled`], + detailedMetricsEnabled: [, , `DetailedMetricsEnabled`], + loggingLevel: [, , `LoggingLevel`], + throttlingBurstLimit: [, , `ThrottlingBurstLimit`], + throttlingRateLimit: [, __serializeFloat, `ThrottlingRateLimit`], + }); }; /** @@ -7640,90 +6828,26 @@ const se_RouteSettingsMap = (input: Record, context: __Se }, {}); }; -/** - * serializeAws_restJson1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIdList omitted. -/** - * serializeAws_restJson1StageVariablesMap - */ -const se_StageVariablesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StageVariablesMap omitted. -/** - * serializeAws_restJson1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIdList omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1TemplateMap - */ -const se_TemplateMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TemplateMap omitted. /** * serializeAws_restJson1TlsConfigInput */ const se_TlsConfigInput = (input: TlsConfigInput, context: __SerdeContext): any => { - return { - ...(input.ServerNameToVerify != null && { serverNameToVerify: input.ServerNameToVerify }), - }; + return take(input, { + serverNameToVerify: [, , `ServerNameToVerify`], + }); }; -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfApi @@ -7732,9 +6856,6 @@ const de___listOfApi = (output: any, context: __SerdeContext): Api[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Api(entry, context); }); return retVal; @@ -7747,9 +6868,6 @@ const de___listOfApiMapping = (output: any, context: __SerdeContext): ApiMapping const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApiMapping(entry, context); }); return retVal; @@ -7762,9 +6880,6 @@ const de___listOfAuthorizer = (output: any, context: __SerdeContext): Authorizer const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Authorizer(entry, context); }); return retVal; @@ -7777,9 +6892,6 @@ const de___listOfDeployment = (output: any, context: __SerdeContext): Deployment const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Deployment(entry, context); }); return retVal; @@ -7792,9 +6904,6 @@ const de___listOfDomainName = (output: any, context: __SerdeContext): DomainName const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainName(entry, context); }); return retVal; @@ -7807,9 +6916,6 @@ const de___listOfIntegration = (output: any, context: __SerdeContext): Integrati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Integration(entry, context); }); return retVal; @@ -7822,9 +6928,6 @@ const de___listOfIntegrationResponse = (output: any, context: __SerdeContext): I const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IntegrationResponse(entry, context); }); return retVal; @@ -7837,9 +6940,6 @@ const de___listOfModel = (output: any, context: __SerdeContext): Model[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Model(entry, context); }); return retVal; @@ -7852,9 +6952,6 @@ const de___listOfRoute = (output: any, context: __SerdeContext): Route[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Route(entry, context); }); return retVal; @@ -7867,9 +6964,6 @@ const de___listOfRouteResponse = (output: any, context: __SerdeContext): RouteRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RouteResponse(entry, context); }); return retVal; @@ -7882,9 +6976,6 @@ const de___listOfStage = (output: any, context: __SerdeContext): Stage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Stage(entry, context); }); return retVal; @@ -7897,9 +6988,6 @@ const de___listOfVpcLink = (output: any, context: __SerdeContext): VpcLink[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VpcLink(entry, context); }); return retVal; @@ -7909,196 +6997,132 @@ const de___listOfVpcLink = (output: any, context: __SerdeContext): VpcLink[] => * deserializeAws_restJson1AccessLogSettings */ const de_AccessLogSettings = (output: any, context: __SerdeContext): AccessLogSettings => { - return { - DestinationArn: __expectString(output.destinationArn), - Format: __expectString(output.format), - } as any; + return take(output, { + DestinationArn: [, __expectString, `destinationArn`], + Format: [, __expectString, `format`], + }) as any; }; /** * deserializeAws_restJson1Api */ const de_Api = (output: any, context: __SerdeContext): Api => { - return { - ApiEndpoint: __expectString(output.apiEndpoint), - ApiGatewayManaged: __expectBoolean(output.apiGatewayManaged), - ApiId: __expectString(output.apiId), - ApiKeySelectionExpression: __expectString(output.apiKeySelectionExpression), - CorsConfiguration: output.corsConfiguration != null ? de_Cors(output.corsConfiguration, context) : undefined, - CreatedDate: - output.createdDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdDate)) : undefined, - Description: __expectString(output.description), - DisableExecuteApiEndpoint: __expectBoolean(output.disableExecuteApiEndpoint), - DisableSchemaValidation: __expectBoolean(output.disableSchemaValidation), - ImportInfo: output.importInfo != null ? de___listOf__string(output.importInfo, context) : undefined, - Name: __expectString(output.name), - ProtocolType: __expectString(output.protocolType), - RouteSelectionExpression: __expectString(output.routeSelectionExpression), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - Version: __expectString(output.version), - Warnings: output.warnings != null ? de___listOf__string(output.warnings, context) : undefined, - } as any; + return take(output, { + ApiEndpoint: [, __expectString, `apiEndpoint`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiId: [, __expectString, `apiId`], + ApiKeySelectionExpression: [, __expectString, `apiKeySelectionExpression`], + CorsConfiguration: (_) => [, de_Cors(_, context), `corsConfiguration`], + CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Description: [, __expectString, `description`], + DisableExecuteApiEndpoint: [, __expectBoolean, `disableExecuteApiEndpoint`], + DisableSchemaValidation: [, __expectBoolean, `disableSchemaValidation`], + ImportInfo: [, _json, `importInfo`], + Name: [, __expectString, `name`], + ProtocolType: [, __expectString, `protocolType`], + RouteSelectionExpression: [, __expectString, `routeSelectionExpression`], + Tags: [, _json, `tags`], + Version: [, __expectString, `version`], + Warnings: [, _json, `warnings`], + }) as any; }; /** * deserializeAws_restJson1ApiMapping */ const de_ApiMapping = (output: any, context: __SerdeContext): ApiMapping => { - return { - ApiId: __expectString(output.apiId), - ApiMappingId: __expectString(output.apiMappingId), - ApiMappingKey: __expectString(output.apiMappingKey), - Stage: __expectString(output.stage), - } as any; + return take(output, { + ApiId: [, __expectString, `apiId`], + ApiMappingId: [, __expectString, `apiMappingId`], + ApiMappingKey: [, __expectString, `apiMappingKey`], + Stage: [, __expectString, `stage`], + }) as any; }; -/** - * deserializeAws_restJson1AuthorizationScopes - */ -const de_AuthorizationScopes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuthorizationScopes omitted. /** * deserializeAws_restJson1Authorizer */ const de_Authorizer = (output: any, context: __SerdeContext): Authorizer => { - return { - AuthorizerCredentialsArn: __expectString(output.authorizerCredentialsArn), - AuthorizerId: __expectString(output.authorizerId), - AuthorizerPayloadFormatVersion: __expectString(output.authorizerPayloadFormatVersion), - AuthorizerResultTtlInSeconds: __expectInt32(output.authorizerResultTtlInSeconds), - AuthorizerType: __expectString(output.authorizerType), - AuthorizerUri: __expectString(output.authorizerUri), - EnableSimpleResponses: __expectBoolean(output.enableSimpleResponses), - IdentitySource: output.identitySource != null ? de_IdentitySourceList(output.identitySource, context) : undefined, - IdentityValidationExpression: __expectString(output.identityValidationExpression), - JwtConfiguration: - output.jwtConfiguration != null ? de_JWTConfiguration(output.jwtConfiguration, context) : undefined, - Name: __expectString(output.name), - } as any; + return take(output, { + AuthorizerCredentialsArn: [, __expectString, `authorizerCredentialsArn`], + AuthorizerId: [, __expectString, `authorizerId`], + AuthorizerPayloadFormatVersion: [, __expectString, `authorizerPayloadFormatVersion`], + AuthorizerResultTtlInSeconds: [, __expectInt32, `authorizerResultTtlInSeconds`], + AuthorizerType: [, __expectString, `authorizerType`], + AuthorizerUri: [, __expectString, `authorizerUri`], + EnableSimpleResponses: [, __expectBoolean, `enableSimpleResponses`], + IdentitySource: [, _json, `identitySource`], + IdentityValidationExpression: [, __expectString, `identityValidationExpression`], + JwtConfiguration: (_) => [, de_JWTConfiguration(_, context), `jwtConfiguration`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1Cors */ const de_Cors = (output: any, context: __SerdeContext): Cors => { - return { - AllowCredentials: __expectBoolean(output.allowCredentials), - AllowHeaders: output.allowHeaders != null ? de_CorsHeaderList(output.allowHeaders, context) : undefined, - AllowMethods: output.allowMethods != null ? de_CorsMethodList(output.allowMethods, context) : undefined, - AllowOrigins: output.allowOrigins != null ? de_CorsOriginList(output.allowOrigins, context) : undefined, - ExposeHeaders: output.exposeHeaders != null ? de_CorsHeaderList(output.exposeHeaders, context) : undefined, - MaxAge: __expectInt32(output.maxAge), - } as any; + return take(output, { + AllowCredentials: [, __expectBoolean, `allowCredentials`], + AllowHeaders: [, _json, `allowHeaders`], + AllowMethods: [, _json, `allowMethods`], + AllowOrigins: [, _json, `allowOrigins`], + ExposeHeaders: [, _json, `exposeHeaders`], + MaxAge: [, __expectInt32, `maxAge`], + }) as any; }; -/** - * deserializeAws_restJson1CorsHeaderList - */ -const de_CorsHeaderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CorsHeaderList omitted. -/** - * deserializeAws_restJson1CorsMethodList - */ -const de_CorsMethodList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CorsMethodList omitted. -/** - * deserializeAws_restJson1CorsOriginList - */ -const de_CorsOriginList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CorsOriginList omitted. /** * deserializeAws_restJson1Deployment */ const de_Deployment = (output: any, context: __SerdeContext): Deployment => { - return { - AutoDeployed: __expectBoolean(output.autoDeployed), - CreatedDate: - output.createdDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdDate)) : undefined, - DeploymentId: __expectString(output.deploymentId), - DeploymentStatus: __expectString(output.deploymentStatus), - DeploymentStatusMessage: __expectString(output.deploymentStatusMessage), - Description: __expectString(output.description), - } as any; + return take(output, { + AutoDeployed: [, __expectBoolean, `autoDeployed`], + CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DeploymentId: [, __expectString, `deploymentId`], + DeploymentStatus: [, __expectString, `deploymentStatus`], + DeploymentStatusMessage: [, __expectString, `deploymentStatusMessage`], + Description: [, __expectString, `description`], + }) as any; }; /** * deserializeAws_restJson1DomainName */ const de_DomainName = (output: any, context: __SerdeContext): DomainName => { - return { - ApiMappingSelectionExpression: __expectString(output.apiMappingSelectionExpression), - DomainName: __expectString(output.domainName), - DomainNameConfigurations: - output.domainNameConfigurations != null - ? de_DomainNameConfigurations(output.domainNameConfigurations, context) - : undefined, - MutualTlsAuthentication: - output.mutualTlsAuthentication != null - ? de_MutualTlsAuthentication(output.mutualTlsAuthentication, context) - : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + ApiMappingSelectionExpression: [, __expectString, `apiMappingSelectionExpression`], + DomainName: [, __expectString, `domainName`], + DomainNameConfigurations: (_) => [, de_DomainNameConfigurations(_, context), `domainNameConfigurations`], + MutualTlsAuthentication: (_) => [, de_MutualTlsAuthentication(_, context), `mutualTlsAuthentication`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1DomainNameConfiguration */ const de_DomainNameConfiguration = (output: any, context: __SerdeContext): DomainNameConfiguration => { - return { - ApiGatewayDomainName: __expectString(output.apiGatewayDomainName), - CertificateArn: __expectString(output.certificateArn), - CertificateName: __expectString(output.certificateName), - CertificateUploadDate: - output.certificateUploadDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.certificateUploadDate)) - : undefined, - DomainNameStatus: __expectString(output.domainNameStatus), - DomainNameStatusMessage: __expectString(output.domainNameStatusMessage), - EndpointType: __expectString(output.endpointType), - HostedZoneId: __expectString(output.hostedZoneId), - OwnershipVerificationCertificateArn: __expectString(output.ownershipVerificationCertificateArn), - SecurityPolicy: __expectString(output.securityPolicy), - } as any; + return take(output, { + ApiGatewayDomainName: [, __expectString, `apiGatewayDomainName`], + CertificateArn: [, __expectString, `certificateArn`], + CertificateName: [, __expectString, `certificateName`], + CertificateUploadDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `certificateUploadDate`], + DomainNameStatus: [, __expectString, `domainNameStatus`], + DomainNameStatusMessage: [, __expectString, `domainNameStatusMessage`], + EndpointType: [, __expectString, `endpointType`], + HostedZoneId: [, __expectString, `hostedZoneId`], + OwnershipVerificationCertificateArn: [, __expectString, `ownershipVerificationCertificateArn`], + SecurityPolicy: [, __expectString, `securityPolicy`], + }) as any; }; /** @@ -8108,179 +7132,124 @@ const de_DomainNameConfigurations = (output: any, context: __SerdeContext): Doma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainNameConfiguration(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IdentitySourceList - */ -const de_IdentitySourceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IdentitySourceList omitted. /** * deserializeAws_restJson1Integration */ const de_Integration = (output: any, context: __SerdeContext): Integration => { - return { - ApiGatewayManaged: __expectBoolean(output.apiGatewayManaged), - ConnectionId: __expectString(output.connectionId), - ConnectionType: __expectString(output.connectionType), - ContentHandlingStrategy: __expectString(output.contentHandlingStrategy), - CredentialsArn: __expectString(output.credentialsArn), - Description: __expectString(output.description), - IntegrationId: __expectString(output.integrationId), - IntegrationMethod: __expectString(output.integrationMethod), - IntegrationResponseSelectionExpression: __expectString(output.integrationResponseSelectionExpression), - IntegrationSubtype: __expectString(output.integrationSubtype), - IntegrationType: __expectString(output.integrationType), - IntegrationUri: __expectString(output.integrationUri), - PassthroughBehavior: __expectString(output.passthroughBehavior), - PayloadFormatVersion: __expectString(output.payloadFormatVersion), - RequestParameters: - output.requestParameters != null ? de_IntegrationParameters(output.requestParameters, context) : undefined, - RequestTemplates: output.requestTemplates != null ? de_TemplateMap(output.requestTemplates, context) : undefined, - ResponseParameters: - output.responseParameters != null ? de_ResponseParameters(output.responseParameters, context) : undefined, - TemplateSelectionExpression: __expectString(output.templateSelectionExpression), - TimeoutInMillis: __expectInt32(output.timeoutInMillis), - TlsConfig: output.tlsConfig != null ? de_TlsConfig(output.tlsConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1IntegrationParameters - */ -const de_IntegrationParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; + return take(output, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ConnectionId: [, __expectString, `connectionId`], + ConnectionType: [, __expectString, `connectionType`], + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + CredentialsArn: [, __expectString, `credentialsArn`], + Description: [, __expectString, `description`], + IntegrationId: [, __expectString, `integrationId`], + IntegrationMethod: [, __expectString, `integrationMethod`], + IntegrationResponseSelectionExpression: [, __expectString, `integrationResponseSelectionExpression`], + IntegrationSubtype: [, __expectString, `integrationSubtype`], + IntegrationType: [, __expectString, `integrationType`], + IntegrationUri: [, __expectString, `integrationUri`], + PassthroughBehavior: [, __expectString, `passthroughBehavior`], + PayloadFormatVersion: [, __expectString, `payloadFormatVersion`], + RequestParameters: [, _json, `requestParameters`], + RequestTemplates: [, _json, `requestTemplates`], + ResponseParameters: [, _json, `responseParameters`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + TimeoutInMillis: [, __expectInt32, `timeoutInMillis`], + TlsConfig: (_) => [, de_TlsConfig(_, context), `tlsConfig`], + }) as any; +}; + +// de_IntegrationParameters omitted. /** * deserializeAws_restJson1IntegrationResponse */ const de_IntegrationResponse = (output: any, context: __SerdeContext): IntegrationResponse => { - return { - ContentHandlingStrategy: __expectString(output.contentHandlingStrategy), - IntegrationResponseId: __expectString(output.integrationResponseId), - IntegrationResponseKey: __expectString(output.integrationResponseKey), - ResponseParameters: - output.responseParameters != null ? de_IntegrationParameters(output.responseParameters, context) : undefined, - ResponseTemplates: output.responseTemplates != null ? de_TemplateMap(output.responseTemplates, context) : undefined, - TemplateSelectionExpression: __expectString(output.templateSelectionExpression), - } as any; + return take(output, { + ContentHandlingStrategy: [, __expectString, `contentHandlingStrategy`], + IntegrationResponseId: [, __expectString, `integrationResponseId`], + IntegrationResponseKey: [, __expectString, `integrationResponseKey`], + ResponseParameters: [, _json, `responseParameters`], + ResponseTemplates: [, _json, `responseTemplates`], + TemplateSelectionExpression: [, __expectString, `templateSelectionExpression`], + }) as any; }; /** * deserializeAws_restJson1JWTConfiguration */ const de_JWTConfiguration = (output: any, context: __SerdeContext): JWTConfiguration => { - return { - Audience: output.audience != null ? de___listOf__string(output.audience, context) : undefined, - Issuer: __expectString(output.issuer), - } as any; + return take(output, { + Audience: [, _json, `audience`], + Issuer: [, __expectString, `issuer`], + }) as any; }; /** * deserializeAws_restJson1Model */ const de_Model = (output: any, context: __SerdeContext): Model => { - return { - ContentType: __expectString(output.contentType), - Description: __expectString(output.description), - ModelId: __expectString(output.modelId), - Name: __expectString(output.name), - Schema: __expectString(output.schema), - } as any; + return take(output, { + ContentType: [, __expectString, `contentType`], + Description: [, __expectString, `description`], + ModelId: [, __expectString, `modelId`], + Name: [, __expectString, `name`], + Schema: [, __expectString, `schema`], + }) as any; }; /** * deserializeAws_restJson1MutualTlsAuthentication */ const de_MutualTlsAuthentication = (output: any, context: __SerdeContext): MutualTlsAuthentication => { - return { - TruststoreUri: __expectString(output.truststoreUri), - TruststoreVersion: __expectString(output.truststoreVersion), - TruststoreWarnings: - output.truststoreWarnings != null ? de___listOf__string(output.truststoreWarnings, context) : undefined, - } as any; + return take(output, { + TruststoreUri: [, __expectString, `truststoreUri`], + TruststoreVersion: [, __expectString, `truststoreVersion`], + TruststoreWarnings: [, _json, `truststoreWarnings`], + }) as any; }; /** * deserializeAws_restJson1ParameterConstraints */ const de_ParameterConstraints = (output: any, context: __SerdeContext): ParameterConstraints => { - return { - Required: __expectBoolean(output.required), - } as any; + return take(output, { + Required: [, __expectBoolean, `required`], + }) as any; }; -/** - * deserializeAws_restJson1ResponseParameters - */ -const de_ResponseParameters = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_IntegrationParameters(value, context); - return acc; - }, {}); -}; +// de_ResponseParameters omitted. /** * deserializeAws_restJson1Route */ const de_Route = (output: any, context: __SerdeContext): Route => { - return { - ApiGatewayManaged: __expectBoolean(output.apiGatewayManaged), - ApiKeyRequired: __expectBoolean(output.apiKeyRequired), - AuthorizationScopes: - output.authorizationScopes != null ? de_AuthorizationScopes(output.authorizationScopes, context) : undefined, - AuthorizationType: __expectString(output.authorizationType), - AuthorizerId: __expectString(output.authorizerId), - ModelSelectionExpression: __expectString(output.modelSelectionExpression), - OperationName: __expectString(output.operationName), - RequestModels: output.requestModels != null ? de_RouteModels(output.requestModels, context) : undefined, - RequestParameters: - output.requestParameters != null ? de_RouteParameters(output.requestParameters, context) : undefined, - RouteId: __expectString(output.routeId), - RouteKey: __expectString(output.routeKey), - RouteResponseSelectionExpression: __expectString(output.routeResponseSelectionExpression), - Target: __expectString(output.target), - } as any; -}; - -/** - * deserializeAws_restJson1RouteModels - */ -const de_RouteModels = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; + return take(output, { + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + ApiKeyRequired: [, __expectBoolean, `apiKeyRequired`], + AuthorizationScopes: [, _json, `authorizationScopes`], + AuthorizationType: [, __expectString, `authorizationType`], + AuthorizerId: [, __expectString, `authorizerId`], + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + OperationName: [, __expectString, `operationName`], + RequestModels: [, _json, `requestModels`], + RequestParameters: (_) => [, de_RouteParameters(_, context), `requestParameters`], + RouteId: [, __expectString, `routeId`], + RouteKey: [, __expectString, `routeKey`], + RouteResponseSelectionExpression: [, __expectString, `routeResponseSelectionExpression`], + Target: [, __expectString, `target`], + }) as any; +}; + +// de_RouteModels omitted. /** * deserializeAws_restJson1RouteParameters @@ -8299,27 +7268,26 @@ const de_RouteParameters = (output: any, context: __SerdeContext): Record { - return { - ModelSelectionExpression: __expectString(output.modelSelectionExpression), - ResponseModels: output.responseModels != null ? de_RouteModels(output.responseModels, context) : undefined, - ResponseParameters: - output.responseParameters != null ? de_RouteParameters(output.responseParameters, context) : undefined, - RouteResponseId: __expectString(output.routeResponseId), - RouteResponseKey: __expectString(output.routeResponseKey), - } as any; + return take(output, { + ModelSelectionExpression: [, __expectString, `modelSelectionExpression`], + ResponseModels: [, _json, `responseModels`], + ResponseParameters: (_) => [, de_RouteParameters(_, context), `responseParameters`], + RouteResponseId: [, __expectString, `routeResponseId`], + RouteResponseKey: [, __expectString, `routeResponseKey`], + }) as any; }; /** * deserializeAws_restJson1RouteSettings */ const de_RouteSettings = (output: any, context: __SerdeContext): RouteSettings => { - return { - DataTraceEnabled: __expectBoolean(output.dataTraceEnabled), - DetailedMetricsEnabled: __expectBoolean(output.detailedMetricsEnabled), - LoggingLevel: __expectString(output.loggingLevel), - ThrottlingBurstLimit: __expectInt32(output.throttlingBurstLimit), - ThrottlingRateLimit: __limitedParseDouble(output.throttlingRateLimit), - } as any; + return take(output, { + DataTraceEnabled: [, __expectBoolean, `dataTraceEnabled`], + DetailedMetricsEnabled: [, __expectBoolean, `detailedMetricsEnabled`], + LoggingLevel: [, __expectString, `loggingLevel`], + ThrottlingBurstLimit: [, __expectInt32, `throttlingBurstLimit`], + ThrottlingRateLimit: [, __limitedParseDouble, `throttlingRateLimit`], + }) as any; }; /** @@ -8335,129 +7303,62 @@ const de_RouteSettingsMap = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIdList omitted. /** * deserializeAws_restJson1Stage */ const de_Stage = (output: any, context: __SerdeContext): Stage => { - return { - AccessLogSettings: - output.accessLogSettings != null ? de_AccessLogSettings(output.accessLogSettings, context) : undefined, - ApiGatewayManaged: __expectBoolean(output.apiGatewayManaged), - AutoDeploy: __expectBoolean(output.autoDeploy), - ClientCertificateId: __expectString(output.clientCertificateId), - CreatedDate: - output.createdDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdDate)) : undefined, - DefaultRouteSettings: - output.defaultRouteSettings != null ? de_RouteSettings(output.defaultRouteSettings, context) : undefined, - DeploymentId: __expectString(output.deploymentId), - Description: __expectString(output.description), - LastDeploymentStatusMessage: __expectString(output.lastDeploymentStatusMessage), - LastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedDate)) - : undefined, - RouteSettings: output.routeSettings != null ? de_RouteSettingsMap(output.routeSettings, context) : undefined, - StageName: __expectString(output.stageName), - StageVariables: output.stageVariables != null ? de_StageVariablesMap(output.stageVariables, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1StageVariablesMap - */ -const de_StageVariablesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + AccessLogSettings: (_) => [, de_AccessLogSettings(_, context), `accessLogSettings`], + ApiGatewayManaged: [, __expectBoolean, `apiGatewayManaged`], + AutoDeploy: [, __expectBoolean, `autoDeploy`], + ClientCertificateId: [, __expectString, `clientCertificateId`], + CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + DefaultRouteSettings: (_) => [, de_RouteSettings(_, context), `defaultRouteSettings`], + DeploymentId: [, __expectString, `deploymentId`], + Description: [, __expectString, `description`], + LastDeploymentStatusMessage: [, __expectString, `lastDeploymentStatusMessage`], + LastUpdatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedDate`], + RouteSettings: (_) => [, de_RouteSettingsMap(_, context), `routeSettings`], + StageName: [, __expectString, `stageName`], + StageVariables: [, _json, `stageVariables`], + Tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StageVariablesMap omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SubnetIdList omitted. -/** - * deserializeAws_restJson1TemplateMap - */ -const de_TemplateMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. + +// de_TemplateMap omitted. /** * deserializeAws_restJson1TlsConfig */ const de_TlsConfig = (output: any, context: __SerdeContext): TlsConfig => { - return { - ServerNameToVerify: __expectString(output.serverNameToVerify), - } as any; + return take(output, { + ServerNameToVerify: [, __expectString, `serverNameToVerify`], + }) as any; }; /** * deserializeAws_restJson1VpcLink */ const de_VpcLink = (output: any, context: __SerdeContext): VpcLink => { - return { - CreatedDate: - output.createdDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdDate)) : undefined, - Name: __expectString(output.name), - SecurityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined, - SubnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - VpcLinkId: __expectString(output.vpcLinkId), - VpcLinkStatus: __expectString(output.vpcLinkStatus), - VpcLinkStatusMessage: __expectString(output.vpcLinkStatusMessage), - VpcLinkVersion: __expectString(output.vpcLinkVersion), - } as any; + return take(output, { + CreatedDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdDate`], + Name: [, __expectString, `name`], + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetIds: [, _json, `subnetIds`], + Tags: [, _json, `tags`], + VpcLinkId: [, __expectString, `vpcLinkId`], + VpcLinkStatus: [, __expectString, `vpcLinkStatus`], + VpcLinkStatusMessage: [, __expectString, `vpcLinkStatusMessage`], + VpcLinkVersion: [, __expectString, `vpcLinkVersion`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-app-mesh/src/protocols/Aws_restJson1.ts b/clients/client-app-mesh/src/protocols/Aws_restJson1.ts index 9c39c0e9a6e9..111cdcbfaee0 100644 --- a/clients/client-app-mesh/src/protocols/Aws_restJson1.ts +++ b/clients/client-app-mesh/src/protocols/Aws_restJson1.ts @@ -1,20 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -134,7 +133,6 @@ import { GatewayRouteHostnameRewrite, GatewayRouteRef, GatewayRouteSpec, - GatewayRouteStatus, GatewayRouteTarget, GatewayRouteVirtualService, GrpcGatewayRoute, @@ -187,7 +185,6 @@ import { MeshRef, MeshServiceDiscovery, MeshSpec, - MeshStatus, NotFoundException, OutlierDetection, PortMapping, @@ -197,7 +194,6 @@ import { RouteData, RouteRef, RouteSpec, - RouteStatus, ServiceDiscovery, ServiceUnavailableException, SubjectAlternativeNameMatchers, @@ -239,7 +235,6 @@ import { VirtualGatewayPortMapping, VirtualGatewayRef, VirtualGatewaySpec, - VirtualGatewayStatus, VirtualGatewayTlsValidationContext, VirtualGatewayTlsValidationContextAcmTrust, VirtualGatewayTlsValidationContextFileTrust, @@ -253,20 +248,17 @@ import { VirtualNodeRef, VirtualNodeServiceProvider, VirtualNodeSpec, - VirtualNodeStatus, VirtualNodeTcpConnectionPool, VirtualRouterData, VirtualRouterListener, VirtualRouterRef, VirtualRouterServiceProvider, VirtualRouterSpec, - VirtualRouterStatus, VirtualServiceBackend, VirtualServiceData, VirtualServiceProvider, VirtualServiceRef, VirtualServiceSpec, - VirtualServiceStatus, WeightedTarget, } from "../models/models_0"; @@ -297,12 +289,14 @@ export const se_CreateGatewayRouteCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.gatewayRouteName != null && { gatewayRouteName: input.gatewayRouteName }), - ...(input.spec != null && { spec: se_GatewayRouteSpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + gatewayRouteName: [], + spec: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,12 +322,14 @@ export const se_CreateMeshCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20190125/meshes"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.meshName != null && { meshName: input.meshName }), - ...(input.spec != null && { spec: se_MeshSpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + meshName: [], + spec: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -372,12 +368,14 @@ export const se_CreateRouteCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.routeName != null && { routeName: input.routeName }), - ...(input.spec != null && { spec: se_RouteSpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + routeName: [], + spec: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -409,12 +407,14 @@ export const se_CreateVirtualGatewayCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualGatewaySpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualGatewayName != null && { virtualGatewayName: input.virtualGatewayName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + tags: (_) => _json(_), + virtualGatewayName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -445,12 +445,14 @@ export const se_CreateVirtualNodeCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualNodeSpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualNodeName != null && { virtualNodeName: input.virtualNodeName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + tags: (_) => _json(_), + virtualNodeName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -482,12 +484,14 @@ export const se_CreateVirtualRouterCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualRouterSpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualRouterName != null && { virtualRouterName: input.virtualRouterName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + tags: (_) => _json(_), + virtualRouterName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -519,12 +523,14 @@ export const se_CreateVirtualServiceCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualServiceSpec(input.spec, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualServiceName != null && { virtualServiceName: input.virtualServiceName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + tags: (_) => _json(_), + virtualServiceName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1323,9 +1329,11 @@ export const se_TagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1354,9 +1362,11 @@ export const se_UntagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + tagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1404,10 +1414,12 @@ export const se_UpdateGatewayRouteCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_GatewayRouteSpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1435,10 +1447,12 @@ export const se_UpdateMeshCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20190125/meshes/{meshName}"; resolvedPath = __resolvedPath(resolvedPath, input, "meshName", () => input.meshName!, "{meshName}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_MeshSpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1478,10 +1492,12 @@ export const se_UpdateRouteCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_RouteSpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1521,10 +1537,12 @@ export const se_UpdateVirtualGatewayCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualGatewaySpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1564,10 +1582,12 @@ export const se_UpdateVirtualNodeCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualNodeSpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1607,10 +1627,12 @@ export const se_UpdateVirtualRouterCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualRouterSpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1650,10 +1672,12 @@ export const se_UpdateVirtualServiceCommand = async ( meshOwner: [, input.meshOwner!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.spec != null && { spec: se_VirtualServiceSpec(input.spec, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + spec: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1723,10 +1747,9 @@ const de_CreateGatewayRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1789,10 +1812,9 @@ const de_CreateMeshCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1855,10 +1877,9 @@ const de_CreateRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1921,10 +1942,9 @@ const de_CreateVirtualGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1987,10 +2007,9 @@ const de_CreateVirtualNodeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2053,10 +2072,9 @@ const de_CreateVirtualRouterCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2119,10 +2137,9 @@ const de_CreateVirtualServiceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2182,10 +2199,9 @@ const de_DeleteGatewayRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2245,10 +2261,9 @@ const de_DeleteMeshCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2308,10 +2323,9 @@ const de_DeleteRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2371,10 +2385,9 @@ const de_DeleteVirtualGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2434,10 +2447,9 @@ const de_DeleteVirtualNodeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,10 +2509,9 @@ const de_DeleteVirtualRouterCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2560,10 +2571,9 @@ const de_DeleteVirtualServiceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2620,10 +2630,9 @@ const de_DescribeGatewayRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2680,10 +2689,9 @@ const de_DescribeMeshCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2740,10 +2748,9 @@ const de_DescribeRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2800,10 +2807,9 @@ const de_DescribeVirtualGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2860,10 +2866,9 @@ const de_DescribeVirtualNodeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2920,10 +2925,9 @@ const de_DescribeVirtualRouterCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2980,10 +2984,9 @@ const de_DescribeVirtualServiceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3003,12 +3006,11 @@ export const de_ListGatewayRoutesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gatewayRoutes != null) { - contents.gatewayRoutes = de_GatewayRouteList(data.gatewayRoutes, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + gatewayRoutes: (_) => de_GatewayRouteList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3045,10 +3047,9 @@ const de_ListGatewayRoutesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3068,12 +3069,11 @@ export const de_ListMeshesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.meshes != null) { - contents.meshes = de_MeshList(data.meshes, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + meshes: (_) => de_MeshList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3110,10 +3110,9 @@ const de_ListMeshesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3133,12 +3132,11 @@ export const de_ListRoutesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.routes != null) { - contents.routes = de_RouteList(data.routes, context); - } + const doc = take(data, { + nextToken: __expectString, + routes: (_) => de_RouteList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3175,10 +3173,9 @@ const de_ListRoutesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3198,12 +3195,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + nextToken: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3240,10 +3236,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3263,12 +3258,11 @@ export const de_ListVirtualGatewaysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.virtualGateways != null) { - contents.virtualGateways = de_VirtualGatewayList(data.virtualGateways, context); - } + const doc = take(data, { + nextToken: __expectString, + virtualGateways: (_) => de_VirtualGatewayList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3305,10 +3299,9 @@ const de_ListVirtualGatewaysCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3328,12 +3321,11 @@ export const de_ListVirtualNodesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.virtualNodes != null) { - contents.virtualNodes = de_VirtualNodeList(data.virtualNodes, context); - } + const doc = take(data, { + nextToken: __expectString, + virtualNodes: (_) => de_VirtualNodeList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3370,10 +3362,9 @@ const de_ListVirtualNodesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3393,12 +3384,11 @@ export const de_ListVirtualRoutersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.virtualRouters != null) { - contents.virtualRouters = de_VirtualRouterList(data.virtualRouters, context); - } + const doc = take(data, { + nextToken: __expectString, + virtualRouters: (_) => de_VirtualRouterList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3435,10 +3425,9 @@ const de_ListVirtualRoutersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3458,12 +3447,11 @@ export const de_ListVirtualServicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.virtualServices != null) { - contents.virtualServices = de_VirtualServiceList(data.virtualServices, context); - } + const doc = take(data, { + nextToken: __expectString, + virtualServices: (_) => de_VirtualServiceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3500,10 +3488,9 @@ const de_ListVirtualServicesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3562,10 +3549,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3621,10 +3607,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3687,10 +3672,9 @@ const de_UpdateGatewayRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3750,10 +3734,9 @@ const de_UpdateMeshCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3816,10 +3799,9 @@ const de_UpdateRouteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3882,10 +3864,9 @@ const de_UpdateVirtualGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,10 +3929,9 @@ const de_UpdateVirtualNodeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4014,10 +3994,9 @@ const de_UpdateVirtualRouterCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4080,25 +4059,25 @@ const de_UpdateVirtualServiceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4112,9 +4091,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4128,9 +4108,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4147,9 +4128,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4166,9 +4148,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4182,9 +4165,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4201,9 +4185,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4220,9 +4205,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4239,9 +4225,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4258,9 +4245,10 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4268,3138 +4256,660 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccessLog - */ -const se_AccessLog = (input: AccessLog, context: __SerdeContext): any => { - return AccessLog.visit(input, { - file: (value) => ({ file: se_FileAccessLog(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_AccessLog omitted. -/** - * serializeAws_restJson1AwsCloudMapInstanceAttribute - */ -const se_AwsCloudMapInstanceAttribute = (input: AwsCloudMapInstanceAttribute, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_AwsCloudMapInstanceAttribute omitted. -/** - * serializeAws_restJson1AwsCloudMapInstanceAttributes - */ -const se_AwsCloudMapInstanceAttributes = (input: AwsCloudMapInstanceAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCloudMapInstanceAttribute(entry, context); - }); -}; +// se_AwsCloudMapInstanceAttributes omitted. -/** - * serializeAws_restJson1AwsCloudMapServiceDiscovery - */ -const se_AwsCloudMapServiceDiscovery = (input: AwsCloudMapServiceDiscovery, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_AwsCloudMapInstanceAttributes(input.attributes, context) }), - ...(input.ipPreference != null && { ipPreference: input.ipPreference }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_AwsCloudMapServiceDiscovery omitted. -/** - * serializeAws_restJson1Backend - */ -const se_Backend = (input: Backend, context: __SerdeContext): any => { - return Backend.visit(input, { - virtualService: (value) => ({ virtualService: se_VirtualServiceBackend(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Backend omitted. -/** - * serializeAws_restJson1BackendDefaults - */ -const se_BackendDefaults = (input: BackendDefaults, context: __SerdeContext): any => { - return { - ...(input.clientPolicy != null && { clientPolicy: se_ClientPolicy(input.clientPolicy, context) }), - }; -}; +// se_BackendDefaults omitted. -/** - * serializeAws_restJson1Backends - */ -const se_Backends = (input: Backend[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Backend(entry, context); - }); -}; +// se_Backends omitted. -/** - * serializeAws_restJson1CertificateAuthorityArns - */ -const se_CertificateAuthorityArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CertificateAuthorityArns omitted. -/** - * serializeAws_restJson1ClientPolicy - */ -const se_ClientPolicy = (input: ClientPolicy, context: __SerdeContext): any => { - return { - ...(input.tls != null && { tls: se_ClientPolicyTls(input.tls, context) }), - }; -}; +// se_ClientPolicy omitted. -/** - * serializeAws_restJson1ClientPolicyTls - */ -const se_ClientPolicyTls = (input: ClientPolicyTls, context: __SerdeContext): any => { - return { - ...(input.certificate != null && { certificate: se_ClientTlsCertificate(input.certificate, context) }), - ...(input.enforce != null && { enforce: input.enforce }), - ...(input.ports != null && { ports: se_PortSet(input.ports, context) }), - ...(input.validation != null && { validation: se_TlsValidationContext(input.validation, context) }), - }; -}; +// se_ClientPolicyTls omitted. -/** - * serializeAws_restJson1ClientTlsCertificate - */ -const se_ClientTlsCertificate = (input: ClientTlsCertificate, context: __SerdeContext): any => { - return ClientTlsCertificate.visit(input, { - file: (value) => ({ file: se_ListenerTlsFileCertificate(value, context) }), - sds: (value) => ({ sds: se_ListenerTlsSdsCertificate(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ClientTlsCertificate omitted. -/** - * serializeAws_restJson1DnsServiceDiscovery - */ -const se_DnsServiceDiscovery = (input: DnsServiceDiscovery, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: input.hostname }), - ...(input.ipPreference != null && { ipPreference: input.ipPreference }), - ...(input.responseType != null && { responseType: input.responseType }), - }; -}; +// se_DnsServiceDiscovery omitted. -/** - * serializeAws_restJson1Duration - */ -const se_Duration = (input: Duration, context: __SerdeContext): any => { - return { - ...(input.unit != null && { unit: input.unit }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Duration omitted. -/** - * serializeAws_restJson1EgressFilter - */ -const se_EgressFilter = (input: EgressFilter, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - }; -}; +// se_EgressFilter omitted. -/** - * serializeAws_restJson1FileAccessLog - */ -const se_FileAccessLog = (input: FileAccessLog, context: __SerdeContext): any => { - return { - ...(input.format != null && { format: se_LoggingFormat(input.format, context) }), - ...(input.path != null && { path: input.path }), - }; -}; +// se_FileAccessLog omitted. -/** - * serializeAws_restJson1GatewayRouteHostnameMatch - */ -const se_GatewayRouteHostnameMatch = (input: GatewayRouteHostnameMatch, context: __SerdeContext): any => { - return { - ...(input.exact != null && { exact: input.exact }), - ...(input.suffix != null && { suffix: input.suffix }), - }; -}; +// se_GatewayRouteHostnameMatch omitted. -/** - * serializeAws_restJson1GatewayRouteHostnameRewrite - */ -const se_GatewayRouteHostnameRewrite = (input: GatewayRouteHostnameRewrite, context: __SerdeContext): any => { - return { - ...(input.defaultTargetHostname != null && { defaultTargetHostname: input.defaultTargetHostname }), - }; -}; +// se_GatewayRouteHostnameRewrite omitted. -/** - * serializeAws_restJson1GatewayRouteSpec - */ -const se_GatewayRouteSpec = (input: GatewayRouteSpec, context: __SerdeContext): any => { - return { - ...(input.grpcRoute != null && { grpcRoute: se_GrpcGatewayRoute(input.grpcRoute, context) }), - ...(input.http2Route != null && { http2Route: se_HttpGatewayRoute(input.http2Route, context) }), - ...(input.httpRoute != null && { httpRoute: se_HttpGatewayRoute(input.httpRoute, context) }), - ...(input.priority != null && { priority: input.priority }), - }; -}; +// se_GatewayRouteSpec omitted. -/** - * serializeAws_restJson1GatewayRouteTarget - */ -const se_GatewayRouteTarget = (input: GatewayRouteTarget, context: __SerdeContext): any => { - return { - ...(input.port != null && { port: input.port }), - ...(input.virtualService != null && { - virtualService: se_GatewayRouteVirtualService(input.virtualService, context), - }), - }; -}; +// se_GatewayRouteTarget omitted. -/** - * serializeAws_restJson1GatewayRouteVirtualService - */ -const se_GatewayRouteVirtualService = (input: GatewayRouteVirtualService, context: __SerdeContext): any => { - return { - ...(input.virtualServiceName != null && { virtualServiceName: input.virtualServiceName }), - }; -}; +// se_GatewayRouteVirtualService omitted. -/** - * serializeAws_restJson1GrpcGatewayRoute - */ -const se_GrpcGatewayRoute = (input: GrpcGatewayRoute, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_GrpcGatewayRouteAction(input.action, context) }), - ...(input.match != null && { match: se_GrpcGatewayRouteMatch(input.match, context) }), - }; -}; +// se_GrpcGatewayRoute omitted. -/** - * serializeAws_restJson1GrpcGatewayRouteAction - */ -const se_GrpcGatewayRouteAction = (input: GrpcGatewayRouteAction, context: __SerdeContext): any => { - return { - ...(input.rewrite != null && { rewrite: se_GrpcGatewayRouteRewrite(input.rewrite, context) }), - ...(input.target != null && { target: se_GatewayRouteTarget(input.target, context) }), - }; -}; +// se_GrpcGatewayRouteAction omitted. -/** - * serializeAws_restJson1GrpcGatewayRouteMatch - */ -const se_GrpcGatewayRouteMatch = (input: GrpcGatewayRouteMatch, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: se_GatewayRouteHostnameMatch(input.hostname, context) }), - ...(input.metadata != null && { metadata: se_GrpcGatewayRouteMetadataList(input.metadata, context) }), - ...(input.port != null && { port: input.port }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_GrpcGatewayRouteMatch omitted. -/** - * serializeAws_restJson1GrpcGatewayRouteMetadata - */ -const se_GrpcGatewayRouteMetadata = (input: GrpcGatewayRouteMetadata, context: __SerdeContext): any => { - return { - ...(input.invert != null && { invert: input.invert }), - ...(input.match != null && { match: se_GrpcMetadataMatchMethod(input.match, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_GrpcGatewayRouteMetadata omitted. -/** - * serializeAws_restJson1GrpcGatewayRouteMetadataList - */ -const se_GrpcGatewayRouteMetadataList = (input: GrpcGatewayRouteMetadata[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GrpcGatewayRouteMetadata(entry, context); - }); -}; +// se_GrpcGatewayRouteMetadataList omitted. -/** - * serializeAws_restJson1GrpcGatewayRouteRewrite - */ -const se_GrpcGatewayRouteRewrite = (input: GrpcGatewayRouteRewrite, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: se_GatewayRouteHostnameRewrite(input.hostname, context) }), - }; -}; +// se_GrpcGatewayRouteRewrite omitted. -/** - * serializeAws_restJson1GrpcMetadataMatchMethod - */ -const se_GrpcMetadataMatchMethod = (input: GrpcMetadataMatchMethod, context: __SerdeContext): any => { - return GrpcMetadataMatchMethod.visit(input, { - exact: (value) => ({ exact: value }), - prefix: (value) => ({ prefix: value }), - range: (value) => ({ range: se_MatchRange(value, context) }), - regex: (value) => ({ regex: value }), - suffix: (value) => ({ suffix: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_GrpcMetadataMatchMethod omitted. -/** - * serializeAws_restJson1GrpcRetryPolicy - */ -const se_GrpcRetryPolicy = (input: GrpcRetryPolicy, context: __SerdeContext): any => { - return { - ...(input.grpcRetryEvents != null && { grpcRetryEvents: se_GrpcRetryPolicyEvents(input.grpcRetryEvents, context) }), - ...(input.httpRetryEvents != null && { httpRetryEvents: se_HttpRetryPolicyEvents(input.httpRetryEvents, context) }), - ...(input.maxRetries != null && { maxRetries: input.maxRetries }), - ...(input.perRetryTimeout != null && { perRetryTimeout: se_Duration(input.perRetryTimeout, context) }), - ...(input.tcpRetryEvents != null && { tcpRetryEvents: se_TcpRetryPolicyEvents(input.tcpRetryEvents, context) }), - }; -}; +// se_GrpcRetryPolicy omitted. -/** - * serializeAws_restJson1GrpcRetryPolicyEvents - */ -const se_GrpcRetryPolicyEvents = (input: (GrpcRetryPolicyEvent | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GrpcRetryPolicyEvents omitted. -/** - * serializeAws_restJson1GrpcRoute - */ -const se_GrpcRoute = (input: GrpcRoute, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_GrpcRouteAction(input.action, context) }), - ...(input.match != null && { match: se_GrpcRouteMatch(input.match, context) }), - ...(input.retryPolicy != null && { retryPolicy: se_GrpcRetryPolicy(input.retryPolicy, context) }), - ...(input.timeout != null && { timeout: se_GrpcTimeout(input.timeout, context) }), - }; -}; +// se_GrpcRoute omitted. -/** - * serializeAws_restJson1GrpcRouteAction - */ -const se_GrpcRouteAction = (input: GrpcRouteAction, context: __SerdeContext): any => { - return { - ...(input.weightedTargets != null && { weightedTargets: se_WeightedTargets(input.weightedTargets, context) }), - }; -}; +// se_GrpcRouteAction omitted. -/** - * serializeAws_restJson1GrpcRouteMatch - */ -const se_GrpcRouteMatch = (input: GrpcRouteMatch, context: __SerdeContext): any => { - return { - ...(input.metadata != null && { metadata: se_GrpcRouteMetadataList(input.metadata, context) }), - ...(input.methodName != null && { methodName: input.methodName }), - ...(input.port != null && { port: input.port }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_GrpcRouteMatch omitted. -/** - * serializeAws_restJson1GrpcRouteMetadata - */ -const se_GrpcRouteMetadata = (input: GrpcRouteMetadata, context: __SerdeContext): any => { - return { - ...(input.invert != null && { invert: input.invert }), - ...(input.match != null && { match: se_GrpcRouteMetadataMatchMethod(input.match, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_GrpcRouteMetadata omitted. -/** - * serializeAws_restJson1GrpcRouteMetadataList - */ -const se_GrpcRouteMetadataList = (input: GrpcRouteMetadata[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GrpcRouteMetadata(entry, context); - }); -}; +// se_GrpcRouteMetadataList omitted. -/** - * serializeAws_restJson1GrpcRouteMetadataMatchMethod - */ -const se_GrpcRouteMetadataMatchMethod = (input: GrpcRouteMetadataMatchMethod, context: __SerdeContext): any => { - return GrpcRouteMetadataMatchMethod.visit(input, { - exact: (value) => ({ exact: value }), - prefix: (value) => ({ prefix: value }), - range: (value) => ({ range: se_MatchRange(value, context) }), - regex: (value) => ({ regex: value }), - suffix: (value) => ({ suffix: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_GrpcRouteMetadataMatchMethod omitted. -/** - * serializeAws_restJson1GrpcTimeout - */ -const se_GrpcTimeout = (input: GrpcTimeout, context: __SerdeContext): any => { - return { - ...(input.idle != null && { idle: se_Duration(input.idle, context) }), - ...(input.perRequest != null && { perRequest: se_Duration(input.perRequest, context) }), - }; -}; +// se_GrpcTimeout omitted. -/** - * serializeAws_restJson1HeaderMatchMethod - */ -const se_HeaderMatchMethod = (input: HeaderMatchMethod, context: __SerdeContext): any => { - return HeaderMatchMethod.visit(input, { - exact: (value) => ({ exact: value }), - prefix: (value) => ({ prefix: value }), - range: (value) => ({ range: se_MatchRange(value, context) }), - regex: (value) => ({ regex: value }), - suffix: (value) => ({ suffix: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_HeaderMatchMethod omitted. -/** - * serializeAws_restJson1HealthCheckPolicy - */ -const se_HealthCheckPolicy = (input: HealthCheckPolicy, context: __SerdeContext): any => { - return { - ...(input.healthyThreshold != null && { healthyThreshold: input.healthyThreshold }), - ...(input.intervalMillis != null && { intervalMillis: input.intervalMillis }), - ...(input.path != null && { path: input.path }), - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.timeoutMillis != null && { timeoutMillis: input.timeoutMillis }), - ...(input.unhealthyThreshold != null && { unhealthyThreshold: input.unhealthyThreshold }), - }; -}; +// se_HealthCheckPolicy omitted. -/** - * serializeAws_restJson1HttpGatewayRoute - */ -const se_HttpGatewayRoute = (input: HttpGatewayRoute, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_HttpGatewayRouteAction(input.action, context) }), - ...(input.match != null && { match: se_HttpGatewayRouteMatch(input.match, context) }), - }; -}; +// se_HttpGatewayRoute omitted. -/** - * serializeAws_restJson1HttpGatewayRouteAction - */ -const se_HttpGatewayRouteAction = (input: HttpGatewayRouteAction, context: __SerdeContext): any => { - return { - ...(input.rewrite != null && { rewrite: se_HttpGatewayRouteRewrite(input.rewrite, context) }), - ...(input.target != null && { target: se_GatewayRouteTarget(input.target, context) }), - }; -}; +// se_HttpGatewayRouteAction omitted. -/** - * serializeAws_restJson1HttpGatewayRouteHeader - */ -const se_HttpGatewayRouteHeader = (input: HttpGatewayRouteHeader, context: __SerdeContext): any => { - return { - ...(input.invert != null && { invert: input.invert }), - ...(input.match != null && { match: se_HeaderMatchMethod(input.match, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_HttpGatewayRouteHeader omitted. -/** - * serializeAws_restJson1HttpGatewayRouteHeaders - */ -const se_HttpGatewayRouteHeaders = (input: HttpGatewayRouteHeader[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HttpGatewayRouteHeader(entry, context); - }); -}; +// se_HttpGatewayRouteHeaders omitted. -/** - * serializeAws_restJson1HttpGatewayRouteMatch - */ -const se_HttpGatewayRouteMatch = (input: HttpGatewayRouteMatch, context: __SerdeContext): any => { - return { - ...(input.headers != null && { headers: se_HttpGatewayRouteHeaders(input.headers, context) }), - ...(input.hostname != null && { hostname: se_GatewayRouteHostnameMatch(input.hostname, context) }), - ...(input.method != null && { method: input.method }), - ...(input.path != null && { path: se_HttpPathMatch(input.path, context) }), - ...(input.port != null && { port: input.port }), - ...(input.prefix != null && { prefix: input.prefix }), - ...(input.queryParameters != null && { queryParameters: se_HttpQueryParameters(input.queryParameters, context) }), - }; -}; +// se_HttpGatewayRouteMatch omitted. -/** - * serializeAws_restJson1HttpGatewayRoutePathRewrite - */ -const se_HttpGatewayRoutePathRewrite = (input: HttpGatewayRoutePathRewrite, context: __SerdeContext): any => { - return { - ...(input.exact != null && { exact: input.exact }), - }; -}; +// se_HttpGatewayRoutePathRewrite omitted. -/** - * serializeAws_restJson1HttpGatewayRoutePrefixRewrite - */ -const se_HttpGatewayRoutePrefixRewrite = (input: HttpGatewayRoutePrefixRewrite, context: __SerdeContext): any => { - return { - ...(input.defaultPrefix != null && { defaultPrefix: input.defaultPrefix }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_HttpGatewayRoutePrefixRewrite omitted. -/** - * serializeAws_restJson1HttpGatewayRouteRewrite - */ -const se_HttpGatewayRouteRewrite = (input: HttpGatewayRouteRewrite, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: se_GatewayRouteHostnameRewrite(input.hostname, context) }), - ...(input.path != null && { path: se_HttpGatewayRoutePathRewrite(input.path, context) }), - ...(input.prefix != null && { prefix: se_HttpGatewayRoutePrefixRewrite(input.prefix, context) }), - }; -}; +// se_HttpGatewayRouteRewrite omitted. -/** - * serializeAws_restJson1HttpPathMatch - */ -const se_HttpPathMatch = (input: HttpPathMatch, context: __SerdeContext): any => { - return { - ...(input.exact != null && { exact: input.exact }), - ...(input.regex != null && { regex: input.regex }), - }; -}; +// se_HttpPathMatch omitted. -/** - * serializeAws_restJson1HttpQueryParameter - */ -const se_HttpQueryParameter = (input: HttpQueryParameter, context: __SerdeContext): any => { - return { - ...(input.match != null && { match: se_QueryParameterMatch(input.match, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_HttpQueryParameter omitted. -/** - * serializeAws_restJson1HttpQueryParameters - */ -const se_HttpQueryParameters = (input: HttpQueryParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HttpQueryParameter(entry, context); - }); -}; +// se_HttpQueryParameters omitted. -/** - * serializeAws_restJson1HttpRetryPolicy - */ -const se_HttpRetryPolicy = (input: HttpRetryPolicy, context: __SerdeContext): any => { - return { - ...(input.httpRetryEvents != null && { httpRetryEvents: se_HttpRetryPolicyEvents(input.httpRetryEvents, context) }), - ...(input.maxRetries != null && { maxRetries: input.maxRetries }), - ...(input.perRetryTimeout != null && { perRetryTimeout: se_Duration(input.perRetryTimeout, context) }), - ...(input.tcpRetryEvents != null && { tcpRetryEvents: se_TcpRetryPolicyEvents(input.tcpRetryEvents, context) }), - }; -}; +// se_HttpRetryPolicy omitted. -/** - * serializeAws_restJson1HttpRetryPolicyEvents - */ -const se_HttpRetryPolicyEvents = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HttpRetryPolicyEvents omitted. -/** - * serializeAws_restJson1HttpRoute - */ -const se_HttpRoute = (input: HttpRoute, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_HttpRouteAction(input.action, context) }), - ...(input.match != null && { match: se_HttpRouteMatch(input.match, context) }), - ...(input.retryPolicy != null && { retryPolicy: se_HttpRetryPolicy(input.retryPolicy, context) }), - ...(input.timeout != null && { timeout: se_HttpTimeout(input.timeout, context) }), - }; -}; +// se_HttpRoute omitted. -/** - * serializeAws_restJson1HttpRouteAction - */ -const se_HttpRouteAction = (input: HttpRouteAction, context: __SerdeContext): any => { - return { - ...(input.weightedTargets != null && { weightedTargets: se_WeightedTargets(input.weightedTargets, context) }), - }; -}; +// se_HttpRouteAction omitted. -/** - * serializeAws_restJson1HttpRouteHeader - */ -const se_HttpRouteHeader = (input: HttpRouteHeader, context: __SerdeContext): any => { - return { - ...(input.invert != null && { invert: input.invert }), - ...(input.match != null && { match: se_HeaderMatchMethod(input.match, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_HttpRouteHeader omitted. -/** - * serializeAws_restJson1HttpRouteHeaders - */ -const se_HttpRouteHeaders = (input: HttpRouteHeader[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HttpRouteHeader(entry, context); - }); -}; +// se_HttpRouteHeaders omitted. -/** - * serializeAws_restJson1HttpRouteMatch - */ -const se_HttpRouteMatch = (input: HttpRouteMatch, context: __SerdeContext): any => { - return { - ...(input.headers != null && { headers: se_HttpRouteHeaders(input.headers, context) }), - ...(input.method != null && { method: input.method }), - ...(input.path != null && { path: se_HttpPathMatch(input.path, context) }), - ...(input.port != null && { port: input.port }), - ...(input.prefix != null && { prefix: input.prefix }), - ...(input.queryParameters != null && { queryParameters: se_HttpQueryParameters(input.queryParameters, context) }), - ...(input.scheme != null && { scheme: input.scheme }), - }; -}; +// se_HttpRouteMatch omitted. -/** - * serializeAws_restJson1HttpTimeout - */ -const se_HttpTimeout = (input: HttpTimeout, context: __SerdeContext): any => { - return { - ...(input.idle != null && { idle: se_Duration(input.idle, context) }), - ...(input.perRequest != null && { perRequest: se_Duration(input.perRequest, context) }), - }; -}; +// se_HttpTimeout omitted. -/** - * serializeAws_restJson1JsonFormat - */ -const se_JsonFormat = (input: JsonFormatRef[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JsonFormatRef(entry, context); - }); -}; +// se_JsonFormat omitted. -/** - * serializeAws_restJson1JsonFormatRef - */ -const se_JsonFormatRef = (input: JsonFormatRef, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_JsonFormatRef omitted. -/** - * serializeAws_restJson1Listener - */ -const se_Listener = (input: Listener, context: __SerdeContext): any => { - return { - ...(input.connectionPool != null && { - connectionPool: se_VirtualNodeConnectionPool(input.connectionPool, context), - }), - ...(input.healthCheck != null && { healthCheck: se_HealthCheckPolicy(input.healthCheck, context) }), - ...(input.outlierDetection != null && { outlierDetection: se_OutlierDetection(input.outlierDetection, context) }), - ...(input.portMapping != null && { portMapping: se_PortMapping(input.portMapping, context) }), - ...(input.timeout != null && { timeout: se_ListenerTimeout(input.timeout, context) }), - ...(input.tls != null && { tls: se_ListenerTls(input.tls, context) }), - }; -}; +// se_Listener omitted. -/** - * serializeAws_restJson1Listeners - */ -const se_Listeners = (input: Listener[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Listener(entry, context); - }); -}; +// se_Listeners omitted. -/** - * serializeAws_restJson1ListenerTimeout - */ -const se_ListenerTimeout = (input: ListenerTimeout, context: __SerdeContext): any => { - return ListenerTimeout.visit(input, { - grpc: (value) => ({ grpc: se_GrpcTimeout(value, context) }), - http: (value) => ({ http: se_HttpTimeout(value, context) }), - http2: (value) => ({ http2: se_HttpTimeout(value, context) }), - tcp: (value) => ({ tcp: se_TcpTimeout(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ListenerTimeout omitted. -/** - * serializeAws_restJson1ListenerTls - */ -const se_ListenerTls = (input: ListenerTls, context: __SerdeContext): any => { - return { - ...(input.certificate != null && { certificate: se_ListenerTlsCertificate(input.certificate, context) }), - ...(input.mode != null && { mode: input.mode }), - ...(input.validation != null && { validation: se_ListenerTlsValidationContext(input.validation, context) }), - }; -}; +// se_ListenerTls omitted. -/** - * serializeAws_restJson1ListenerTlsAcmCertificate - */ -const se_ListenerTlsAcmCertificate = (input: ListenerTlsAcmCertificate, context: __SerdeContext): any => { - return { - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - }; -}; +// se_ListenerTlsAcmCertificate omitted. -/** - * serializeAws_restJson1ListenerTlsCertificate - */ -const se_ListenerTlsCertificate = (input: ListenerTlsCertificate, context: __SerdeContext): any => { - return ListenerTlsCertificate.visit(input, { - acm: (value) => ({ acm: se_ListenerTlsAcmCertificate(value, context) }), - file: (value) => ({ file: se_ListenerTlsFileCertificate(value, context) }), - sds: (value) => ({ sds: se_ListenerTlsSdsCertificate(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ListenerTlsCertificate omitted. -/** - * serializeAws_restJson1ListenerTlsFileCertificate - */ -const se_ListenerTlsFileCertificate = (input: ListenerTlsFileCertificate, context: __SerdeContext): any => { - return { - ...(input.certificateChain != null && { certificateChain: input.certificateChain }), - ...(input.privateKey != null && { privateKey: input.privateKey }), - }; -}; +// se_ListenerTlsFileCertificate omitted. -/** - * serializeAws_restJson1ListenerTlsSdsCertificate - */ -const se_ListenerTlsSdsCertificate = (input: ListenerTlsSdsCertificate, context: __SerdeContext): any => { - return { - ...(input.secretName != null && { secretName: input.secretName }), - }; -}; +// se_ListenerTlsSdsCertificate omitted. -/** - * serializeAws_restJson1ListenerTlsValidationContext - */ -const se_ListenerTlsValidationContext = (input: ListenerTlsValidationContext, context: __SerdeContext): any => { - return { - ...(input.subjectAlternativeNames != null && { - subjectAlternativeNames: se_SubjectAlternativeNames(input.subjectAlternativeNames, context), - }), - ...(input.trust != null && { trust: se_ListenerTlsValidationContextTrust(input.trust, context) }), - }; -}; +// se_ListenerTlsValidationContext omitted. -/** - * serializeAws_restJson1ListenerTlsValidationContextTrust - */ -const se_ListenerTlsValidationContextTrust = ( - input: ListenerTlsValidationContextTrust, - context: __SerdeContext -): any => { - return ListenerTlsValidationContextTrust.visit(input, { - file: (value) => ({ file: se_TlsValidationContextFileTrust(value, context) }), - sds: (value) => ({ sds: se_TlsValidationContextSdsTrust(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ListenerTlsValidationContextTrust omitted. -/** - * serializeAws_restJson1Logging - */ -const se_Logging = (input: Logging, context: __SerdeContext): any => { - return { - ...(input.accessLog != null && { accessLog: se_AccessLog(input.accessLog, context) }), - }; -}; +// se_Logging omitted. -/** - * serializeAws_restJson1LoggingFormat - */ -const se_LoggingFormat = (input: LoggingFormat, context: __SerdeContext): any => { - return LoggingFormat.visit(input, { - json: (value) => ({ json: se_JsonFormat(value, context) }), - text: (value) => ({ text: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_LoggingFormat omitted. -/** - * serializeAws_restJson1MatchRange - */ -const se_MatchRange = (input: MatchRange, context: __SerdeContext): any => { - return { - ...(input.end != null && { end: input.end }), - ...(input.start != null && { start: input.start }), - }; -}; +// se_MatchRange omitted. -/** - * serializeAws_restJson1MeshServiceDiscovery - */ -const se_MeshServiceDiscovery = (input: MeshServiceDiscovery, context: __SerdeContext): any => { - return { - ...(input.ipPreference != null && { ipPreference: input.ipPreference }), - }; -}; +// se_MeshServiceDiscovery omitted. -/** - * serializeAws_restJson1MeshSpec - */ -const se_MeshSpec = (input: MeshSpec, context: __SerdeContext): any => { - return { - ...(input.egressFilter != null && { egressFilter: se_EgressFilter(input.egressFilter, context) }), - ...(input.serviceDiscovery != null && { - serviceDiscovery: se_MeshServiceDiscovery(input.serviceDiscovery, context), - }), - }; -}; +// se_MeshSpec omitted. -/** - * serializeAws_restJson1OutlierDetection - */ -const se_OutlierDetection = (input: OutlierDetection, context: __SerdeContext): any => { - return { - ...(input.baseEjectionDuration != null && { - baseEjectionDuration: se_Duration(input.baseEjectionDuration, context), - }), - ...(input.interval != null && { interval: se_Duration(input.interval, context) }), - ...(input.maxEjectionPercent != null && { maxEjectionPercent: input.maxEjectionPercent }), - ...(input.maxServerErrors != null && { maxServerErrors: input.maxServerErrors }), - }; -}; +// se_OutlierDetection omitted. -/** - * serializeAws_restJson1PortMapping - */ -const se_PortMapping = (input: PortMapping, context: __SerdeContext): any => { - return { - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; +// se_PortMapping omitted. -/** - * serializeAws_restJson1PortSet - */ -const se_PortSet = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PortSet omitted. -/** - * serializeAws_restJson1QueryParameterMatch - */ -const se_QueryParameterMatch = (input: QueryParameterMatch, context: __SerdeContext): any => { - return { - ...(input.exact != null && { exact: input.exact }), - }; -}; +// se_QueryParameterMatch omitted. -/** - * serializeAws_restJson1RouteSpec - */ -const se_RouteSpec = (input: RouteSpec, context: __SerdeContext): any => { - return { - ...(input.grpcRoute != null && { grpcRoute: se_GrpcRoute(input.grpcRoute, context) }), - ...(input.http2Route != null && { http2Route: se_HttpRoute(input.http2Route, context) }), - ...(input.httpRoute != null && { httpRoute: se_HttpRoute(input.httpRoute, context) }), - ...(input.priority != null && { priority: input.priority }), - ...(input.tcpRoute != null && { tcpRoute: se_TcpRoute(input.tcpRoute, context) }), - }; -}; +// se_RouteSpec omitted. -/** - * serializeAws_restJson1ServiceDiscovery - */ -const se_ServiceDiscovery = (input: ServiceDiscovery, context: __SerdeContext): any => { - return ServiceDiscovery.visit(input, { - awsCloudMap: (value) => ({ awsCloudMap: se_AwsCloudMapServiceDiscovery(value, context) }), - dns: (value) => ({ dns: se_DnsServiceDiscovery(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ServiceDiscovery omitted. -/** - * serializeAws_restJson1SubjectAlternativeNameList - */ -const se_SubjectAlternativeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubjectAlternativeNameList omitted. -/** - * serializeAws_restJson1SubjectAlternativeNameMatchers - */ -const se_SubjectAlternativeNameMatchers = (input: SubjectAlternativeNameMatchers, context: __SerdeContext): any => { - return { - ...(input.exact != null && { exact: se_SubjectAlternativeNameList(input.exact, context) }), - }; -}; +// se_SubjectAlternativeNameMatchers omitted. -/** - * serializeAws_restJson1SubjectAlternativeNames - */ -const se_SubjectAlternativeNames = (input: SubjectAlternativeNames, context: __SerdeContext): any => { - return { - ...(input.match != null && { match: se_SubjectAlternativeNameMatchers(input.match, context) }), - }; -}; +// se_SubjectAlternativeNames omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: TagRef[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagRef(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1TagRef - */ -const se_TagRef = (input: TagRef, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_TagRef omitted. -/** - * serializeAws_restJson1TcpRetryPolicyEvents - */ -const se_TcpRetryPolicyEvents = (input: (TcpRetryPolicyEvent | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TcpRetryPolicyEvents omitted. -/** - * serializeAws_restJson1TcpRoute - */ -const se_TcpRoute = (input: TcpRoute, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_TcpRouteAction(input.action, context) }), - ...(input.match != null && { match: se_TcpRouteMatch(input.match, context) }), - ...(input.timeout != null && { timeout: se_TcpTimeout(input.timeout, context) }), - }; -}; +// se_TcpRoute omitted. -/** - * serializeAws_restJson1TcpRouteAction - */ -const se_TcpRouteAction = (input: TcpRouteAction, context: __SerdeContext): any => { - return { - ...(input.weightedTargets != null && { weightedTargets: se_WeightedTargets(input.weightedTargets, context) }), - }; -}; +// se_TcpRouteAction omitted. -/** - * serializeAws_restJson1TcpRouteMatch - */ -const se_TcpRouteMatch = (input: TcpRouteMatch, context: __SerdeContext): any => { - return { - ...(input.port != null && { port: input.port }), - }; -}; +// se_TcpRouteMatch omitted. -/** - * serializeAws_restJson1TcpTimeout - */ -const se_TcpTimeout = (input: TcpTimeout, context: __SerdeContext): any => { - return { - ...(input.idle != null && { idle: se_Duration(input.idle, context) }), - }; -}; +// se_TcpTimeout omitted. -/** - * serializeAws_restJson1TlsValidationContext - */ -const se_TlsValidationContext = (input: TlsValidationContext, context: __SerdeContext): any => { - return { - ...(input.subjectAlternativeNames != null && { - subjectAlternativeNames: se_SubjectAlternativeNames(input.subjectAlternativeNames, context), - }), - ...(input.trust != null && { trust: se_TlsValidationContextTrust(input.trust, context) }), - }; -}; +// se_TlsValidationContext omitted. -/** - * serializeAws_restJson1TlsValidationContextAcmTrust - */ -const se_TlsValidationContextAcmTrust = (input: TlsValidationContextAcmTrust, context: __SerdeContext): any => { - return { - ...(input.certificateAuthorityArns != null && { - certificateAuthorityArns: se_CertificateAuthorityArns(input.certificateAuthorityArns, context), - }), - }; -}; +// se_TlsValidationContextAcmTrust omitted. -/** - * serializeAws_restJson1TlsValidationContextFileTrust - */ -const se_TlsValidationContextFileTrust = (input: TlsValidationContextFileTrust, context: __SerdeContext): any => { - return { - ...(input.certificateChain != null && { certificateChain: input.certificateChain }), - }; -}; +// se_TlsValidationContextFileTrust omitted. -/** - * serializeAws_restJson1TlsValidationContextSdsTrust - */ -const se_TlsValidationContextSdsTrust = (input: TlsValidationContextSdsTrust, context: __SerdeContext): any => { - return { - ...(input.secretName != null && { secretName: input.secretName }), - }; -}; +// se_TlsValidationContextSdsTrust omitted. -/** - * serializeAws_restJson1TlsValidationContextTrust - */ -const se_TlsValidationContextTrust = (input: TlsValidationContextTrust, context: __SerdeContext): any => { - return TlsValidationContextTrust.visit(input, { - acm: (value) => ({ acm: se_TlsValidationContextAcmTrust(value, context) }), - file: (value) => ({ file: se_TlsValidationContextFileTrust(value, context) }), - sds: (value) => ({ sds: se_TlsValidationContextSdsTrust(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_TlsValidationContextTrust omitted. -/** - * serializeAws_restJson1VirtualGatewayAccessLog - */ -const se_VirtualGatewayAccessLog = (input: VirtualGatewayAccessLog, context: __SerdeContext): any => { - return VirtualGatewayAccessLog.visit(input, { - file: (value) => ({ file: se_VirtualGatewayFileAccessLog(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualGatewayAccessLog omitted. -/** - * serializeAws_restJson1VirtualGatewayBackendDefaults - */ -const se_VirtualGatewayBackendDefaults = (input: VirtualGatewayBackendDefaults, context: __SerdeContext): any => { - return { - ...(input.clientPolicy != null && { clientPolicy: se_VirtualGatewayClientPolicy(input.clientPolicy, context) }), - }; -}; +// se_VirtualGatewayBackendDefaults omitted. -/** - * serializeAws_restJson1VirtualGatewayCertificateAuthorityArns - */ -const se_VirtualGatewayCertificateAuthorityArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VirtualGatewayCertificateAuthorityArns omitted. -/** - * serializeAws_restJson1VirtualGatewayClientPolicy - */ -const se_VirtualGatewayClientPolicy = (input: VirtualGatewayClientPolicy, context: __SerdeContext): any => { - return { - ...(input.tls != null && { tls: se_VirtualGatewayClientPolicyTls(input.tls, context) }), - }; -}; +// se_VirtualGatewayClientPolicy omitted. -/** - * serializeAws_restJson1VirtualGatewayClientPolicyTls - */ -const se_VirtualGatewayClientPolicyTls = (input: VirtualGatewayClientPolicyTls, context: __SerdeContext): any => { - return { - ...(input.certificate != null && { - certificate: se_VirtualGatewayClientTlsCertificate(input.certificate, context), - }), - ...(input.enforce != null && { enforce: input.enforce }), - ...(input.ports != null && { ports: se_PortSet(input.ports, context) }), - ...(input.validation != null && { validation: se_VirtualGatewayTlsValidationContext(input.validation, context) }), - }; -}; +// se_VirtualGatewayClientPolicyTls omitted. -/** - * serializeAws_restJson1VirtualGatewayClientTlsCertificate - */ -const se_VirtualGatewayClientTlsCertificate = ( - input: VirtualGatewayClientTlsCertificate, - context: __SerdeContext -): any => { - return VirtualGatewayClientTlsCertificate.visit(input, { - file: (value) => ({ file: se_VirtualGatewayListenerTlsFileCertificate(value, context) }), - sds: (value) => ({ sds: se_VirtualGatewayListenerTlsSdsCertificate(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualGatewayClientTlsCertificate omitted. -/** - * serializeAws_restJson1VirtualGatewayConnectionPool - */ -const se_VirtualGatewayConnectionPool = (input: VirtualGatewayConnectionPool, context: __SerdeContext): any => { - return VirtualGatewayConnectionPool.visit(input, { - grpc: (value) => ({ grpc: se_VirtualGatewayGrpcConnectionPool(value, context) }), - http: (value) => ({ http: se_VirtualGatewayHttpConnectionPool(value, context) }), - http2: (value) => ({ http2: se_VirtualGatewayHttp2ConnectionPool(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualGatewayConnectionPool omitted. -/** - * serializeAws_restJson1VirtualGatewayFileAccessLog - */ -const se_VirtualGatewayFileAccessLog = (input: VirtualGatewayFileAccessLog, context: __SerdeContext): any => { - return { - ...(input.format != null && { format: se_LoggingFormat(input.format, context) }), - ...(input.path != null && { path: input.path }), - }; -}; +// se_VirtualGatewayFileAccessLog omitted. -/** - * serializeAws_restJson1VirtualGatewayGrpcConnectionPool - */ -const se_VirtualGatewayGrpcConnectionPool = (input: VirtualGatewayGrpcConnectionPool, context: __SerdeContext): any => { - return { - ...(input.maxRequests != null && { maxRequests: input.maxRequests }), - }; -}; +// se_VirtualGatewayGrpcConnectionPool omitted. -/** - * serializeAws_restJson1VirtualGatewayHealthCheckPolicy - */ -const se_VirtualGatewayHealthCheckPolicy = (input: VirtualGatewayHealthCheckPolicy, context: __SerdeContext): any => { - return { - ...(input.healthyThreshold != null && { healthyThreshold: input.healthyThreshold }), - ...(input.intervalMillis != null && { intervalMillis: input.intervalMillis }), - ...(input.path != null && { path: input.path }), - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.timeoutMillis != null && { timeoutMillis: input.timeoutMillis }), - ...(input.unhealthyThreshold != null && { unhealthyThreshold: input.unhealthyThreshold }), - }; -}; +// se_VirtualGatewayHealthCheckPolicy omitted. -/** - * serializeAws_restJson1VirtualGatewayHttp2ConnectionPool - */ -const se_VirtualGatewayHttp2ConnectionPool = ( - input: VirtualGatewayHttp2ConnectionPool, - context: __SerdeContext -): any => { - return { - ...(input.maxRequests != null && { maxRequests: input.maxRequests }), - }; -}; +// se_VirtualGatewayHttp2ConnectionPool omitted. -/** - * serializeAws_restJson1VirtualGatewayHttpConnectionPool - */ -const se_VirtualGatewayHttpConnectionPool = (input: VirtualGatewayHttpConnectionPool, context: __SerdeContext): any => { - return { - ...(input.maxConnections != null && { maxConnections: input.maxConnections }), - ...(input.maxPendingRequests != null && { maxPendingRequests: input.maxPendingRequests }), - }; -}; +// se_VirtualGatewayHttpConnectionPool omitted. -/** - * serializeAws_restJson1VirtualGatewayListener - */ -const se_VirtualGatewayListener = (input: VirtualGatewayListener, context: __SerdeContext): any => { - return { - ...(input.connectionPool != null && { - connectionPool: se_VirtualGatewayConnectionPool(input.connectionPool, context), - }), - ...(input.healthCheck != null && { healthCheck: se_VirtualGatewayHealthCheckPolicy(input.healthCheck, context) }), - ...(input.portMapping != null && { portMapping: se_VirtualGatewayPortMapping(input.portMapping, context) }), - ...(input.tls != null && { tls: se_VirtualGatewayListenerTls(input.tls, context) }), - }; -}; +// se_VirtualGatewayListener omitted. -/** - * serializeAws_restJson1VirtualGatewayListeners - */ -const se_VirtualGatewayListeners = (input: VirtualGatewayListener[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VirtualGatewayListener(entry, context); - }); -}; +// se_VirtualGatewayListeners omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTls - */ -const se_VirtualGatewayListenerTls = (input: VirtualGatewayListenerTls, context: __SerdeContext): any => { - return { - ...(input.certificate != null && { - certificate: se_VirtualGatewayListenerTlsCertificate(input.certificate, context), - }), - ...(input.mode != null && { mode: input.mode }), - ...(input.validation != null && { - validation: se_VirtualGatewayListenerTlsValidationContext(input.validation, context), - }), - }; -}; +// se_VirtualGatewayListenerTls omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTlsAcmCertificate - */ -const se_VirtualGatewayListenerTlsAcmCertificate = ( - input: VirtualGatewayListenerTlsAcmCertificate, - context: __SerdeContext -): any => { - return { - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - }; -}; +// se_VirtualGatewayListenerTlsAcmCertificate omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTlsCertificate - */ -const se_VirtualGatewayListenerTlsCertificate = ( - input: VirtualGatewayListenerTlsCertificate, - context: __SerdeContext -): any => { - return VirtualGatewayListenerTlsCertificate.visit(input, { - acm: (value) => ({ acm: se_VirtualGatewayListenerTlsAcmCertificate(value, context) }), - file: (value) => ({ file: se_VirtualGatewayListenerTlsFileCertificate(value, context) }), - sds: (value) => ({ sds: se_VirtualGatewayListenerTlsSdsCertificate(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualGatewayListenerTlsCertificate omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTlsFileCertificate - */ -const se_VirtualGatewayListenerTlsFileCertificate = ( - input: VirtualGatewayListenerTlsFileCertificate, - context: __SerdeContext -): any => { - return { - ...(input.certificateChain != null && { certificateChain: input.certificateChain }), - ...(input.privateKey != null && { privateKey: input.privateKey }), - }; -}; +// se_VirtualGatewayListenerTlsFileCertificate omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTlsSdsCertificate - */ -const se_VirtualGatewayListenerTlsSdsCertificate = ( - input: VirtualGatewayListenerTlsSdsCertificate, - context: __SerdeContext -): any => { - return { - ...(input.secretName != null && { secretName: input.secretName }), - }; -}; +// se_VirtualGatewayListenerTlsSdsCertificate omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTlsValidationContext - */ -const se_VirtualGatewayListenerTlsValidationContext = ( - input: VirtualGatewayListenerTlsValidationContext, - context: __SerdeContext -): any => { - return { - ...(input.subjectAlternativeNames != null && { - subjectAlternativeNames: se_SubjectAlternativeNames(input.subjectAlternativeNames, context), - }), - ...(input.trust != null && { trust: se_VirtualGatewayListenerTlsValidationContextTrust(input.trust, context) }), - }; -}; +// se_VirtualGatewayListenerTlsValidationContext omitted. -/** - * serializeAws_restJson1VirtualGatewayListenerTlsValidationContextTrust - */ -const se_VirtualGatewayListenerTlsValidationContextTrust = ( - input: VirtualGatewayListenerTlsValidationContextTrust, - context: __SerdeContext -): any => { - return VirtualGatewayListenerTlsValidationContextTrust.visit(input, { - file: (value) => ({ file: se_VirtualGatewayTlsValidationContextFileTrust(value, context) }), - sds: (value) => ({ sds: se_VirtualGatewayTlsValidationContextSdsTrust(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualGatewayListenerTlsValidationContextTrust omitted. -/** - * serializeAws_restJson1VirtualGatewayLogging - */ -const se_VirtualGatewayLogging = (input: VirtualGatewayLogging, context: __SerdeContext): any => { - return { - ...(input.accessLog != null && { accessLog: se_VirtualGatewayAccessLog(input.accessLog, context) }), - }; -}; +// se_VirtualGatewayLogging omitted. -/** - * serializeAws_restJson1VirtualGatewayPortMapping - */ -const se_VirtualGatewayPortMapping = (input: VirtualGatewayPortMapping, context: __SerdeContext): any => { - return { - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; +// se_VirtualGatewayPortMapping omitted. -/** - * serializeAws_restJson1VirtualGatewaySpec - */ -const se_VirtualGatewaySpec = (input: VirtualGatewaySpec, context: __SerdeContext): any => { - return { - ...(input.backendDefaults != null && { - backendDefaults: se_VirtualGatewayBackendDefaults(input.backendDefaults, context), - }), - ...(input.listeners != null && { listeners: se_VirtualGatewayListeners(input.listeners, context) }), - ...(input.logging != null && { logging: se_VirtualGatewayLogging(input.logging, context) }), - }; -}; +// se_VirtualGatewaySpec omitted. -/** - * serializeAws_restJson1VirtualGatewayTlsValidationContext - */ -const se_VirtualGatewayTlsValidationContext = ( - input: VirtualGatewayTlsValidationContext, - context: __SerdeContext -): any => { - return { - ...(input.subjectAlternativeNames != null && { - subjectAlternativeNames: se_SubjectAlternativeNames(input.subjectAlternativeNames, context), - }), - ...(input.trust != null && { trust: se_VirtualGatewayTlsValidationContextTrust(input.trust, context) }), - }; -}; +// se_VirtualGatewayTlsValidationContext omitted. -/** - * serializeAws_restJson1VirtualGatewayTlsValidationContextAcmTrust - */ -const se_VirtualGatewayTlsValidationContextAcmTrust = ( - input: VirtualGatewayTlsValidationContextAcmTrust, - context: __SerdeContext -): any => { - return { - ...(input.certificateAuthorityArns != null && { - certificateAuthorityArns: se_VirtualGatewayCertificateAuthorityArns(input.certificateAuthorityArns, context), - }), - }; -}; +// se_VirtualGatewayTlsValidationContextAcmTrust omitted. -/** - * serializeAws_restJson1VirtualGatewayTlsValidationContextFileTrust - */ -const se_VirtualGatewayTlsValidationContextFileTrust = ( - input: VirtualGatewayTlsValidationContextFileTrust, - context: __SerdeContext -): any => { - return { - ...(input.certificateChain != null && { certificateChain: input.certificateChain }), - }; -}; +// se_VirtualGatewayTlsValidationContextFileTrust omitted. -/** - * serializeAws_restJson1VirtualGatewayTlsValidationContextSdsTrust - */ -const se_VirtualGatewayTlsValidationContextSdsTrust = ( - input: VirtualGatewayTlsValidationContextSdsTrust, - context: __SerdeContext -): any => { - return { - ...(input.secretName != null && { secretName: input.secretName }), - }; -}; +// se_VirtualGatewayTlsValidationContextSdsTrust omitted. -/** - * serializeAws_restJson1VirtualGatewayTlsValidationContextTrust - */ -const se_VirtualGatewayTlsValidationContextTrust = ( - input: VirtualGatewayTlsValidationContextTrust, - context: __SerdeContext -): any => { - return VirtualGatewayTlsValidationContextTrust.visit(input, { - acm: (value) => ({ acm: se_VirtualGatewayTlsValidationContextAcmTrust(value, context) }), - file: (value) => ({ file: se_VirtualGatewayTlsValidationContextFileTrust(value, context) }), - sds: (value) => ({ sds: se_VirtualGatewayTlsValidationContextSdsTrust(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualGatewayTlsValidationContextTrust omitted. -/** - * serializeAws_restJson1VirtualNodeConnectionPool - */ -const se_VirtualNodeConnectionPool = (input: VirtualNodeConnectionPool, context: __SerdeContext): any => { - return VirtualNodeConnectionPool.visit(input, { - grpc: (value) => ({ grpc: se_VirtualNodeGrpcConnectionPool(value, context) }), - http: (value) => ({ http: se_VirtualNodeHttpConnectionPool(value, context) }), - http2: (value) => ({ http2: se_VirtualNodeHttp2ConnectionPool(value, context) }), - tcp: (value) => ({ tcp: se_VirtualNodeTcpConnectionPool(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualNodeConnectionPool omitted. -/** - * serializeAws_restJson1VirtualNodeGrpcConnectionPool - */ -const se_VirtualNodeGrpcConnectionPool = (input: VirtualNodeGrpcConnectionPool, context: __SerdeContext): any => { - return { - ...(input.maxRequests != null && { maxRequests: input.maxRequests }), - }; -}; +// se_VirtualNodeGrpcConnectionPool omitted. -/** - * serializeAws_restJson1VirtualNodeHttp2ConnectionPool - */ -const se_VirtualNodeHttp2ConnectionPool = (input: VirtualNodeHttp2ConnectionPool, context: __SerdeContext): any => { - return { - ...(input.maxRequests != null && { maxRequests: input.maxRequests }), - }; -}; +// se_VirtualNodeHttp2ConnectionPool omitted. -/** - * serializeAws_restJson1VirtualNodeHttpConnectionPool - */ -const se_VirtualNodeHttpConnectionPool = (input: VirtualNodeHttpConnectionPool, context: __SerdeContext): any => { - return { - ...(input.maxConnections != null && { maxConnections: input.maxConnections }), - ...(input.maxPendingRequests != null && { maxPendingRequests: input.maxPendingRequests }), - }; -}; +// se_VirtualNodeHttpConnectionPool omitted. -/** - * serializeAws_restJson1VirtualNodeServiceProvider - */ -const se_VirtualNodeServiceProvider = (input: VirtualNodeServiceProvider, context: __SerdeContext): any => { - return { - ...(input.virtualNodeName != null && { virtualNodeName: input.virtualNodeName }), - }; -}; +// se_VirtualNodeServiceProvider omitted. -/** - * serializeAws_restJson1VirtualNodeSpec - */ -const se_VirtualNodeSpec = (input: VirtualNodeSpec, context: __SerdeContext): any => { - return { - ...(input.backendDefaults != null && { backendDefaults: se_BackendDefaults(input.backendDefaults, context) }), - ...(input.backends != null && { backends: se_Backends(input.backends, context) }), - ...(input.listeners != null && { listeners: se_Listeners(input.listeners, context) }), - ...(input.logging != null && { logging: se_Logging(input.logging, context) }), - ...(input.serviceDiscovery != null && { serviceDiscovery: se_ServiceDiscovery(input.serviceDiscovery, context) }), - }; -}; +// se_VirtualNodeSpec omitted. -/** - * serializeAws_restJson1VirtualNodeTcpConnectionPool - */ -const se_VirtualNodeTcpConnectionPool = (input: VirtualNodeTcpConnectionPool, context: __SerdeContext): any => { - return { - ...(input.maxConnections != null && { maxConnections: input.maxConnections }), - }; -}; +// se_VirtualNodeTcpConnectionPool omitted. -/** - * serializeAws_restJson1VirtualRouterListener - */ -const se_VirtualRouterListener = (input: VirtualRouterListener, context: __SerdeContext): any => { - return { - ...(input.portMapping != null && { portMapping: se_PortMapping(input.portMapping, context) }), - }; -}; +// se_VirtualRouterListener omitted. -/** - * serializeAws_restJson1VirtualRouterListeners - */ -const se_VirtualRouterListeners = (input: VirtualRouterListener[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VirtualRouterListener(entry, context); - }); -}; +// se_VirtualRouterListeners omitted. -/** - * serializeAws_restJson1VirtualRouterServiceProvider - */ -const se_VirtualRouterServiceProvider = (input: VirtualRouterServiceProvider, context: __SerdeContext): any => { - return { - ...(input.virtualRouterName != null && { virtualRouterName: input.virtualRouterName }), - }; -}; +// se_VirtualRouterServiceProvider omitted. -/** - * serializeAws_restJson1VirtualRouterSpec - */ -const se_VirtualRouterSpec = (input: VirtualRouterSpec, context: __SerdeContext): any => { - return { - ...(input.listeners != null && { listeners: se_VirtualRouterListeners(input.listeners, context) }), - }; -}; +// se_VirtualRouterSpec omitted. -/** - * serializeAws_restJson1VirtualServiceBackend - */ -const se_VirtualServiceBackend = (input: VirtualServiceBackend, context: __SerdeContext): any => { - return { - ...(input.clientPolicy != null && { clientPolicy: se_ClientPolicy(input.clientPolicy, context) }), - ...(input.virtualServiceName != null && { virtualServiceName: input.virtualServiceName }), - }; -}; +// se_VirtualServiceBackend omitted. -/** - * serializeAws_restJson1VirtualServiceProvider - */ -const se_VirtualServiceProvider = (input: VirtualServiceProvider, context: __SerdeContext): any => { - return VirtualServiceProvider.visit(input, { - virtualNode: (value) => ({ virtualNode: se_VirtualNodeServiceProvider(value, context) }), - virtualRouter: (value) => ({ virtualRouter: se_VirtualRouterServiceProvider(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VirtualServiceProvider omitted. -/** - * serializeAws_restJson1VirtualServiceSpec - */ -const se_VirtualServiceSpec = (input: VirtualServiceSpec, context: __SerdeContext): any => { - return { - ...(input.provider != null && { provider: se_VirtualServiceProvider(input.provider, context) }), - }; -}; +// se_VirtualServiceSpec omitted. -/** - * serializeAws_restJson1WeightedTarget - */ -const se_WeightedTarget = (input: WeightedTarget, context: __SerdeContext): any => { - return { - ...(input.port != null && { port: input.port }), - ...(input.virtualNode != null && { virtualNode: input.virtualNode }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_WeightedTarget omitted. -/** - * serializeAws_restJson1WeightedTargets - */ -const se_WeightedTargets = (input: WeightedTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WeightedTarget(entry, context); - }); -}; +// se_WeightedTargets omitted. -/** - * deserializeAws_restJson1AccessLog - */ -const de_AccessLog = (output: any, context: __SerdeContext): AccessLog => { - if (output.file != null) { - return { - file: de_FileAccessLog(output.file, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AccessLog omitted. -/** - * deserializeAws_restJson1AwsCloudMapInstanceAttribute - */ -const de_AwsCloudMapInstanceAttribute = (output: any, context: __SerdeContext): AwsCloudMapInstanceAttribute => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_AwsCloudMapInstanceAttribute omitted. -/** - * deserializeAws_restJson1AwsCloudMapInstanceAttributes - */ -const de_AwsCloudMapInstanceAttributes = (output: any, context: __SerdeContext): AwsCloudMapInstanceAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCloudMapInstanceAttribute(entry, context); - }); - return retVal; -}; +// de_AwsCloudMapInstanceAttributes omitted. -/** - * deserializeAws_restJson1AwsCloudMapServiceDiscovery - */ -const de_AwsCloudMapServiceDiscovery = (output: any, context: __SerdeContext): AwsCloudMapServiceDiscovery => { - return { - attributes: output.attributes != null ? de_AwsCloudMapInstanceAttributes(output.attributes, context) : undefined, - ipPreference: __expectString(output.ipPreference), - namespaceName: __expectString(output.namespaceName), - serviceName: __expectString(output.serviceName), - } as any; -}; +// de_AwsCloudMapServiceDiscovery omitted. -/** - * deserializeAws_restJson1Backend - */ -const de_Backend = (output: any, context: __SerdeContext): Backend => { - if (output.virtualService != null) { - return { - virtualService: de_VirtualServiceBackend(output.virtualService, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1BackendDefaults - */ -const de_BackendDefaults = (output: any, context: __SerdeContext): BackendDefaults => { - return { - clientPolicy: output.clientPolicy != null ? de_ClientPolicy(output.clientPolicy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Backends - */ -const de_Backends = (output: any, context: __SerdeContext): Backend[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Backend(__expectUnion(entry), context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CertificateAuthorityArns - */ -const de_CertificateAuthorityArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ClientPolicy - */ -const de_ClientPolicy = (output: any, context: __SerdeContext): ClientPolicy => { - return { - tls: output.tls != null ? de_ClientPolicyTls(output.tls, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ClientPolicyTls - */ -const de_ClientPolicyTls = (output: any, context: __SerdeContext): ClientPolicyTls => { - return { - certificate: - output.certificate != null ? de_ClientTlsCertificate(__expectUnion(output.certificate), context) : undefined, - enforce: __expectBoolean(output.enforce), - ports: output.ports != null ? de_PortSet(output.ports, context) : undefined, - validation: output.validation != null ? de_TlsValidationContext(output.validation, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ClientTlsCertificate - */ -const de_ClientTlsCertificate = (output: any, context: __SerdeContext): ClientTlsCertificate => { - if (output.file != null) { - return { - file: de_ListenerTlsFileCertificate(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_ListenerTlsSdsCertificate(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1DnsServiceDiscovery - */ -const de_DnsServiceDiscovery = (output: any, context: __SerdeContext): DnsServiceDiscovery => { - return { - hostname: __expectString(output.hostname), - ipPreference: __expectString(output.ipPreference), - responseType: __expectString(output.responseType), - } as any; -}; - -/** - * deserializeAws_restJson1Duration - */ -const de_Duration = (output: any, context: __SerdeContext): Duration => { - return { - unit: __expectString(output.unit), - value: __expectLong(output.value), - } as any; -}; - -/** - * deserializeAws_restJson1EgressFilter - */ -const de_EgressFilter = (output: any, context: __SerdeContext): EgressFilter => { - return { - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1FileAccessLog - */ -const de_FileAccessLog = (output: any, context: __SerdeContext): FileAccessLog => { - return { - format: output.format != null ? de_LoggingFormat(__expectUnion(output.format), context) : undefined, - path: __expectString(output.path), - } as any; -}; +// de_Backend omitted. -/** - * deserializeAws_restJson1GatewayRouteData - */ -const de_GatewayRouteData = (output: any, context: __SerdeContext): GatewayRouteData => { - return { - gatewayRouteName: __expectString(output.gatewayRouteName), - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - spec: output.spec != null ? de_GatewayRouteSpec(output.spec, context) : undefined, - status: output.status != null ? de_GatewayRouteStatus(output.status, context) : undefined, - virtualGatewayName: __expectString(output.virtualGatewayName), - } as any; -}; +// de_BackendDefaults omitted. -/** - * deserializeAws_restJson1GatewayRouteHostnameMatch - */ -const de_GatewayRouteHostnameMatch = (output: any, context: __SerdeContext): GatewayRouteHostnameMatch => { - return { - exact: __expectString(output.exact), - suffix: __expectString(output.suffix), - } as any; -}; - -/** - * deserializeAws_restJson1GatewayRouteHostnameRewrite - */ -const de_GatewayRouteHostnameRewrite = (output: any, context: __SerdeContext): GatewayRouteHostnameRewrite => { - return { - defaultTargetHostname: __expectString(output.defaultTargetHostname), - } as any; -}; - -/** - * deserializeAws_restJson1GatewayRouteList - */ -const de_GatewayRouteList = (output: any, context: __SerdeContext): GatewayRouteRef[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewayRouteRef(entry, context); - }); - return retVal; -}; +// de_Backends omitted. -/** - * deserializeAws_restJson1GatewayRouteRef - */ -const de_GatewayRouteRef = (output: any, context: __SerdeContext): GatewayRouteRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - gatewayRouteName: __expectString(output.gatewayRouteName), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - version: __expectLong(output.version), - virtualGatewayName: __expectString(output.virtualGatewayName), - } as any; -}; +// de_CertificateAuthorityArns omitted. -/** - * deserializeAws_restJson1GatewayRouteSpec - */ -const de_GatewayRouteSpec = (output: any, context: __SerdeContext): GatewayRouteSpec => { - return { - grpcRoute: output.grpcRoute != null ? de_GrpcGatewayRoute(output.grpcRoute, context) : undefined, - http2Route: output.http2Route != null ? de_HttpGatewayRoute(output.http2Route, context) : undefined, - httpRoute: output.httpRoute != null ? de_HttpGatewayRoute(output.httpRoute, context) : undefined, - priority: __expectInt32(output.priority), - } as any; -}; +// de_ClientPolicy omitted. -/** - * deserializeAws_restJson1GatewayRouteStatus - */ -const de_GatewayRouteStatus = (output: any, context: __SerdeContext): GatewayRouteStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_ClientPolicyTls omitted. -/** - * deserializeAws_restJson1GatewayRouteTarget - */ -const de_GatewayRouteTarget = (output: any, context: __SerdeContext): GatewayRouteTarget => { - return { - port: __expectInt32(output.port), - virtualService: - output.virtualService != null ? de_GatewayRouteVirtualService(output.virtualService, context) : undefined, - } as any; -}; +// de_ClientTlsCertificate omitted. -/** - * deserializeAws_restJson1GatewayRouteVirtualService - */ -const de_GatewayRouteVirtualService = (output: any, context: __SerdeContext): GatewayRouteVirtualService => { - return { - virtualServiceName: __expectString(output.virtualServiceName), - } as any; -}; - -/** - * deserializeAws_restJson1GrpcGatewayRoute - */ -const de_GrpcGatewayRoute = (output: any, context: __SerdeContext): GrpcGatewayRoute => { - return { - action: output.action != null ? de_GrpcGatewayRouteAction(output.action, context) : undefined, - match: output.match != null ? de_GrpcGatewayRouteMatch(output.match, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GrpcGatewayRouteAction - */ -const de_GrpcGatewayRouteAction = (output: any, context: __SerdeContext): GrpcGatewayRouteAction => { - return { - rewrite: output.rewrite != null ? de_GrpcGatewayRouteRewrite(output.rewrite, context) : undefined, - target: output.target != null ? de_GatewayRouteTarget(output.target, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GrpcGatewayRouteMatch - */ -const de_GrpcGatewayRouteMatch = (output: any, context: __SerdeContext): GrpcGatewayRouteMatch => { - return { - hostname: output.hostname != null ? de_GatewayRouteHostnameMatch(output.hostname, context) : undefined, - metadata: output.metadata != null ? de_GrpcGatewayRouteMetadataList(output.metadata, context) : undefined, - port: __expectInt32(output.port), - serviceName: __expectString(output.serviceName), - } as any; -}; - -/** - * deserializeAws_restJson1GrpcGatewayRouteMetadata - */ -const de_GrpcGatewayRouteMetadata = (output: any, context: __SerdeContext): GrpcGatewayRouteMetadata => { - return { - invert: __expectBoolean(output.invert), - match: output.match != null ? de_GrpcMetadataMatchMethod(__expectUnion(output.match), context) : undefined, - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_restJson1GrpcGatewayRouteMetadataList - */ -const de_GrpcGatewayRouteMetadataList = (output: any, context: __SerdeContext): GrpcGatewayRouteMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GrpcGatewayRouteMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GrpcGatewayRouteRewrite - */ -const de_GrpcGatewayRouteRewrite = (output: any, context: __SerdeContext): GrpcGatewayRouteRewrite => { - return { - hostname: output.hostname != null ? de_GatewayRouteHostnameRewrite(output.hostname, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GrpcMetadataMatchMethod - */ -const de_GrpcMetadataMatchMethod = (output: any, context: __SerdeContext): GrpcMetadataMatchMethod => { - if (__expectString(output.exact) !== undefined) { - return { exact: __expectString(output.exact) as any }; - } - if (__expectString(output.prefix) !== undefined) { - return { prefix: __expectString(output.prefix) as any }; - } - if (output.range != null) { - return { - range: de_MatchRange(output.range, context), - }; - } - if (__expectString(output.regex) !== undefined) { - return { regex: __expectString(output.regex) as any }; - } - if (__expectString(output.suffix) !== undefined) { - return { suffix: __expectString(output.suffix) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1GrpcRetryPolicy - */ -const de_GrpcRetryPolicy = (output: any, context: __SerdeContext): GrpcRetryPolicy => { - return { - grpcRetryEvents: - output.grpcRetryEvents != null ? de_GrpcRetryPolicyEvents(output.grpcRetryEvents, context) : undefined, - httpRetryEvents: - output.httpRetryEvents != null ? de_HttpRetryPolicyEvents(output.httpRetryEvents, context) : undefined, - maxRetries: __expectLong(output.maxRetries), - perRetryTimeout: output.perRetryTimeout != null ? de_Duration(output.perRetryTimeout, context) : undefined, - tcpRetryEvents: output.tcpRetryEvents != null ? de_TcpRetryPolicyEvents(output.tcpRetryEvents, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GrpcRetryPolicyEvents - */ -const de_GrpcRetryPolicyEvents = (output: any, context: __SerdeContext): (GrpcRetryPolicyEvent | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GrpcRoute - */ -const de_GrpcRoute = (output: any, context: __SerdeContext): GrpcRoute => { - return { - action: output.action != null ? de_GrpcRouteAction(output.action, context) : undefined, - match: output.match != null ? de_GrpcRouteMatch(output.match, context) : undefined, - retryPolicy: output.retryPolicy != null ? de_GrpcRetryPolicy(output.retryPolicy, context) : undefined, - timeout: output.timeout != null ? de_GrpcTimeout(output.timeout, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GrpcRouteAction - */ -const de_GrpcRouteAction = (output: any, context: __SerdeContext): GrpcRouteAction => { - return { - weightedTargets: output.weightedTargets != null ? de_WeightedTargets(output.weightedTargets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GrpcRouteMatch - */ -const de_GrpcRouteMatch = (output: any, context: __SerdeContext): GrpcRouteMatch => { - return { - metadata: output.metadata != null ? de_GrpcRouteMetadataList(output.metadata, context) : undefined, - methodName: __expectString(output.methodName), - port: __expectInt32(output.port), - serviceName: __expectString(output.serviceName), - } as any; -}; - -/** - * deserializeAws_restJson1GrpcRouteMetadata - */ -const de_GrpcRouteMetadata = (output: any, context: __SerdeContext): GrpcRouteMetadata => { - return { - invert: __expectBoolean(output.invert), - match: output.match != null ? de_GrpcRouteMetadataMatchMethod(__expectUnion(output.match), context) : undefined, - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_restJson1GrpcRouteMetadataList - */ -const de_GrpcRouteMetadataList = (output: any, context: __SerdeContext): GrpcRouteMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GrpcRouteMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GrpcRouteMetadataMatchMethod - */ -const de_GrpcRouteMetadataMatchMethod = (output: any, context: __SerdeContext): GrpcRouteMetadataMatchMethod => { - if (__expectString(output.exact) !== undefined) { - return { exact: __expectString(output.exact) as any }; - } - if (__expectString(output.prefix) !== undefined) { - return { prefix: __expectString(output.prefix) as any }; - } - if (output.range != null) { - return { - range: de_MatchRange(output.range, context), - }; - } - if (__expectString(output.regex) !== undefined) { - return { regex: __expectString(output.regex) as any }; - } - if (__expectString(output.suffix) !== undefined) { - return { suffix: __expectString(output.suffix) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1GrpcTimeout - */ -const de_GrpcTimeout = (output: any, context: __SerdeContext): GrpcTimeout => { - return { - idle: output.idle != null ? de_Duration(output.idle, context) : undefined, - perRequest: output.perRequest != null ? de_Duration(output.perRequest, context) : undefined, - } as any; -}; +// de_DnsServiceDiscovery omitted. -/** - * deserializeAws_restJson1HeaderMatchMethod - */ -const de_HeaderMatchMethod = (output: any, context: __SerdeContext): HeaderMatchMethod => { - if (__expectString(output.exact) !== undefined) { - return { exact: __expectString(output.exact) as any }; - } - if (__expectString(output.prefix) !== undefined) { - return { prefix: __expectString(output.prefix) as any }; - } - if (output.range != null) { - return { - range: de_MatchRange(output.range, context), - }; - } - if (__expectString(output.regex) !== undefined) { - return { regex: __expectString(output.regex) as any }; - } - if (__expectString(output.suffix) !== undefined) { - return { suffix: __expectString(output.suffix) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_Duration omitted. -/** - * deserializeAws_restJson1HealthCheckPolicy - */ -const de_HealthCheckPolicy = (output: any, context: __SerdeContext): HealthCheckPolicy => { - return { - healthyThreshold: __expectInt32(output.healthyThreshold), - intervalMillis: __expectLong(output.intervalMillis), - path: __expectString(output.path), - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - timeoutMillis: __expectLong(output.timeoutMillis), - unhealthyThreshold: __expectInt32(output.unhealthyThreshold), - } as any; -}; +// de_EgressFilter omitted. -/** - * deserializeAws_restJson1HttpGatewayRoute - */ -const de_HttpGatewayRoute = (output: any, context: __SerdeContext): HttpGatewayRoute => { - return { - action: output.action != null ? de_HttpGatewayRouteAction(output.action, context) : undefined, - match: output.match != null ? de_HttpGatewayRouteMatch(output.match, context) : undefined, - } as any; -}; +// de_FileAccessLog omitted. /** - * deserializeAws_restJson1HttpGatewayRouteAction + * deserializeAws_restJson1GatewayRouteData */ -const de_HttpGatewayRouteAction = (output: any, context: __SerdeContext): HttpGatewayRouteAction => { - return { - rewrite: output.rewrite != null ? de_HttpGatewayRouteRewrite(output.rewrite, context) : undefined, - target: output.target != null ? de_GatewayRouteTarget(output.target, context) : undefined, - } as any; +const de_GatewayRouteData = (output: any, context: __SerdeContext): GatewayRouteData => { + return take(output, { + gatewayRouteName: __expectString, + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + spec: _json, + status: _json, + virtualGatewayName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1HttpGatewayRouteHeader - */ -const de_HttpGatewayRouteHeader = (output: any, context: __SerdeContext): HttpGatewayRouteHeader => { - return { - invert: __expectBoolean(output.invert), - match: output.match != null ? de_HeaderMatchMethod(__expectUnion(output.match), context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_GatewayRouteHostnameMatch omitted. + +// de_GatewayRouteHostnameRewrite omitted. /** - * deserializeAws_restJson1HttpGatewayRouteHeaders + * deserializeAws_restJson1GatewayRouteList */ -const de_HttpGatewayRouteHeaders = (output: any, context: __SerdeContext): HttpGatewayRouteHeader[] => { +const de_GatewayRouteList = (output: any, context: __SerdeContext): GatewayRouteRef[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpGatewayRouteHeader(entry, context); + return de_GatewayRouteRef(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1HttpGatewayRouteMatch + * deserializeAws_restJson1GatewayRouteRef */ -const de_HttpGatewayRouteMatch = (output: any, context: __SerdeContext): HttpGatewayRouteMatch => { - return { - headers: output.headers != null ? de_HttpGatewayRouteHeaders(output.headers, context) : undefined, - hostname: output.hostname != null ? de_GatewayRouteHostnameMatch(output.hostname, context) : undefined, - method: __expectString(output.method), - path: output.path != null ? de_HttpPathMatch(output.path, context) : undefined, - port: __expectInt32(output.port), - prefix: __expectString(output.prefix), - queryParameters: - output.queryParameters != null ? de_HttpQueryParameters(output.queryParameters, context) : undefined, - } as any; +const de_GatewayRouteRef = (output: any, context: __SerdeContext): GatewayRouteRef => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + gatewayRouteName: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + version: __expectLong, + virtualGatewayName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1HttpGatewayRoutePathRewrite - */ -const de_HttpGatewayRoutePathRewrite = (output: any, context: __SerdeContext): HttpGatewayRoutePathRewrite => { - return { - exact: __expectString(output.exact), - } as any; -}; +// de_GatewayRouteSpec omitted. -/** - * deserializeAws_restJson1HttpGatewayRoutePrefixRewrite - */ -const de_HttpGatewayRoutePrefixRewrite = (output: any, context: __SerdeContext): HttpGatewayRoutePrefixRewrite => { - return { - defaultPrefix: __expectString(output.defaultPrefix), - value: __expectString(output.value), - } as any; -}; +// de_GatewayRouteStatus omitted. -/** - * deserializeAws_restJson1HttpGatewayRouteRewrite - */ -const de_HttpGatewayRouteRewrite = (output: any, context: __SerdeContext): HttpGatewayRouteRewrite => { - return { - hostname: output.hostname != null ? de_GatewayRouteHostnameRewrite(output.hostname, context) : undefined, - path: output.path != null ? de_HttpGatewayRoutePathRewrite(output.path, context) : undefined, - prefix: output.prefix != null ? de_HttpGatewayRoutePrefixRewrite(output.prefix, context) : undefined, - } as any; -}; +// de_GatewayRouteTarget omitted. -/** - * deserializeAws_restJson1HttpPathMatch - */ -const de_HttpPathMatch = (output: any, context: __SerdeContext): HttpPathMatch => { - return { - exact: __expectString(output.exact), - regex: __expectString(output.regex), - } as any; -}; +// de_GatewayRouteVirtualService omitted. -/** - * deserializeAws_restJson1HttpQueryParameter - */ -const de_HttpQueryParameter = (output: any, context: __SerdeContext): HttpQueryParameter => { - return { - match: output.match != null ? de_QueryParameterMatch(output.match, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_GrpcGatewayRoute omitted. -/** - * deserializeAws_restJson1HttpQueryParameters - */ -const de_HttpQueryParameters = (output: any, context: __SerdeContext): HttpQueryParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpQueryParameter(entry, context); - }); - return retVal; -}; +// de_GrpcGatewayRouteAction omitted. -/** - * deserializeAws_restJson1HttpRetryPolicy - */ -const de_HttpRetryPolicy = (output: any, context: __SerdeContext): HttpRetryPolicy => { - return { - httpRetryEvents: - output.httpRetryEvents != null ? de_HttpRetryPolicyEvents(output.httpRetryEvents, context) : undefined, - maxRetries: __expectLong(output.maxRetries), - perRetryTimeout: output.perRetryTimeout != null ? de_Duration(output.perRetryTimeout, context) : undefined, - tcpRetryEvents: output.tcpRetryEvents != null ? de_TcpRetryPolicyEvents(output.tcpRetryEvents, context) : undefined, - } as any; -}; +// de_GrpcGatewayRouteMatch omitted. -/** - * deserializeAws_restJson1HttpRetryPolicyEvents - */ -const de_HttpRetryPolicyEvents = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GrpcGatewayRouteMetadata omitted. -/** - * deserializeAws_restJson1HttpRoute - */ -const de_HttpRoute = (output: any, context: __SerdeContext): HttpRoute => { - return { - action: output.action != null ? de_HttpRouteAction(output.action, context) : undefined, - match: output.match != null ? de_HttpRouteMatch(output.match, context) : undefined, - retryPolicy: output.retryPolicy != null ? de_HttpRetryPolicy(output.retryPolicy, context) : undefined, - timeout: output.timeout != null ? de_HttpTimeout(output.timeout, context) : undefined, - } as any; -}; +// de_GrpcGatewayRouteMetadataList omitted. -/** - * deserializeAws_restJson1HttpRouteAction - */ -const de_HttpRouteAction = (output: any, context: __SerdeContext): HttpRouteAction => { - return { - weightedTargets: output.weightedTargets != null ? de_WeightedTargets(output.weightedTargets, context) : undefined, - } as any; -}; +// de_GrpcGatewayRouteRewrite omitted. -/** - * deserializeAws_restJson1HttpRouteHeader - */ -const de_HttpRouteHeader = (output: any, context: __SerdeContext): HttpRouteHeader => { - return { - invert: __expectBoolean(output.invert), - match: output.match != null ? de_HeaderMatchMethod(__expectUnion(output.match), context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_GrpcMetadataMatchMethod omitted. -/** - * deserializeAws_restJson1HttpRouteHeaders - */ -const de_HttpRouteHeaders = (output: any, context: __SerdeContext): HttpRouteHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpRouteHeader(entry, context); - }); - return retVal; -}; +// de_GrpcRetryPolicy omitted. -/** - * deserializeAws_restJson1HttpRouteMatch - */ -const de_HttpRouteMatch = (output: any, context: __SerdeContext): HttpRouteMatch => { - return { - headers: output.headers != null ? de_HttpRouteHeaders(output.headers, context) : undefined, - method: __expectString(output.method), - path: output.path != null ? de_HttpPathMatch(output.path, context) : undefined, - port: __expectInt32(output.port), - prefix: __expectString(output.prefix), - queryParameters: - output.queryParameters != null ? de_HttpQueryParameters(output.queryParameters, context) : undefined, - scheme: __expectString(output.scheme), - } as any; -}; +// de_GrpcRetryPolicyEvents omitted. -/** - * deserializeAws_restJson1HttpTimeout - */ -const de_HttpTimeout = (output: any, context: __SerdeContext): HttpTimeout => { - return { - idle: output.idle != null ? de_Duration(output.idle, context) : undefined, - perRequest: output.perRequest != null ? de_Duration(output.perRequest, context) : undefined, - } as any; -}; +// de_GrpcRoute omitted. -/** - * deserializeAws_restJson1JsonFormat - */ -const de_JsonFormat = (output: any, context: __SerdeContext): JsonFormatRef[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JsonFormatRef(entry, context); - }); - return retVal; -}; +// de_GrpcRouteAction omitted. -/** - * deserializeAws_restJson1JsonFormatRef - */ -const de_JsonFormatRef = (output: any, context: __SerdeContext): JsonFormatRef => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_GrpcRouteMatch omitted. -/** - * deserializeAws_restJson1Listener - */ -const de_Listener = (output: any, context: __SerdeContext): Listener => { - return { - connectionPool: - output.connectionPool != null - ? de_VirtualNodeConnectionPool(__expectUnion(output.connectionPool), context) - : undefined, - healthCheck: output.healthCheck != null ? de_HealthCheckPolicy(output.healthCheck, context) : undefined, - outlierDetection: - output.outlierDetection != null ? de_OutlierDetection(output.outlierDetection, context) : undefined, - portMapping: output.portMapping != null ? de_PortMapping(output.portMapping, context) : undefined, - timeout: output.timeout != null ? de_ListenerTimeout(__expectUnion(output.timeout), context) : undefined, - tls: output.tls != null ? de_ListenerTls(output.tls, context) : undefined, - } as any; -}; +// de_GrpcRouteMetadata omitted. -/** - * deserializeAws_restJson1Listeners - */ -const de_Listeners = (output: any, context: __SerdeContext): Listener[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Listener(entry, context); - }); - return retVal; -}; +// de_GrpcRouteMetadataList omitted. -/** - * deserializeAws_restJson1ListenerTimeout - */ -const de_ListenerTimeout = (output: any, context: __SerdeContext): ListenerTimeout => { - if (output.grpc != null) { - return { - grpc: de_GrpcTimeout(output.grpc, context), - }; - } - if (output.http != null) { - return { - http: de_HttpTimeout(output.http, context), - }; - } - if (output.http2 != null) { - return { - http2: de_HttpTimeout(output.http2, context), - }; - } - if (output.tcp != null) { - return { - tcp: de_TcpTimeout(output.tcp, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_GrpcRouteMetadataMatchMethod omitted. -/** - * deserializeAws_restJson1ListenerTls - */ -const de_ListenerTls = (output: any, context: __SerdeContext): ListenerTls => { - return { - certificate: - output.certificate != null ? de_ListenerTlsCertificate(__expectUnion(output.certificate), context) : undefined, - mode: __expectString(output.mode), - validation: output.validation != null ? de_ListenerTlsValidationContext(output.validation, context) : undefined, - } as any; -}; +// de_GrpcTimeout omitted. -/** - * deserializeAws_restJson1ListenerTlsAcmCertificate - */ -const de_ListenerTlsAcmCertificate = (output: any, context: __SerdeContext): ListenerTlsAcmCertificate => { - return { - certificateArn: __expectString(output.certificateArn), - } as any; -}; +// de_HeaderMatchMethod omitted. -/** - * deserializeAws_restJson1ListenerTlsCertificate - */ -const de_ListenerTlsCertificate = (output: any, context: __SerdeContext): ListenerTlsCertificate => { - if (output.acm != null) { - return { - acm: de_ListenerTlsAcmCertificate(output.acm, context), - }; - } - if (output.file != null) { - return { - file: de_ListenerTlsFileCertificate(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_ListenerTlsSdsCertificate(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_HealthCheckPolicy omitted. -/** - * deserializeAws_restJson1ListenerTlsFileCertificate - */ -const de_ListenerTlsFileCertificate = (output: any, context: __SerdeContext): ListenerTlsFileCertificate => { - return { - certificateChain: __expectString(output.certificateChain), - privateKey: __expectString(output.privateKey), - } as any; -}; +// de_HttpGatewayRoute omitted. -/** - * deserializeAws_restJson1ListenerTlsSdsCertificate - */ -const de_ListenerTlsSdsCertificate = (output: any, context: __SerdeContext): ListenerTlsSdsCertificate => { - return { - secretName: __expectString(output.secretName), - } as any; -}; +// de_HttpGatewayRouteAction omitted. -/** - * deserializeAws_restJson1ListenerTlsValidationContext - */ -const de_ListenerTlsValidationContext = (output: any, context: __SerdeContext): ListenerTlsValidationContext => { - return { - subjectAlternativeNames: - output.subjectAlternativeNames != null - ? de_SubjectAlternativeNames(output.subjectAlternativeNames, context) - : undefined, - trust: - output.trust != null ? de_ListenerTlsValidationContextTrust(__expectUnion(output.trust), context) : undefined, - } as any; -}; +// de_HttpGatewayRouteHeader omitted. -/** - * deserializeAws_restJson1ListenerTlsValidationContextTrust - */ -const de_ListenerTlsValidationContextTrust = ( - output: any, - context: __SerdeContext -): ListenerTlsValidationContextTrust => { - if (output.file != null) { - return { - file: de_TlsValidationContextFileTrust(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_TlsValidationContextSdsTrust(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_HttpGatewayRouteHeaders omitted. -/** - * deserializeAws_restJson1Logging - */ -const de_Logging = (output: any, context: __SerdeContext): Logging => { - return { - accessLog: output.accessLog != null ? de_AccessLog(__expectUnion(output.accessLog), context) : undefined, - } as any; -}; +// de_HttpGatewayRouteMatch omitted. -/** - * deserializeAws_restJson1LoggingFormat - */ -const de_LoggingFormat = (output: any, context: __SerdeContext): LoggingFormat => { - if (output.json != null) { - return { - json: de_JsonFormat(output.json, context), - }; - } - if (__expectString(output.text) !== undefined) { - return { text: __expectString(output.text) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_HttpGatewayRoutePathRewrite omitted. -/** - * deserializeAws_restJson1MatchRange - */ -const de_MatchRange = (output: any, context: __SerdeContext): MatchRange => { - return { - end: __expectLong(output.end), - start: __expectLong(output.start), - } as any; -}; +// de_HttpGatewayRoutePrefixRewrite omitted. -/** - * deserializeAws_restJson1MeshData - */ -const de_MeshData = (output: any, context: __SerdeContext): MeshData => { - return { - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - spec: output.spec != null ? de_MeshSpec(output.spec, context) : undefined, - status: output.status != null ? de_MeshStatus(output.status, context) : undefined, - } as any; -}; +// de_HttpGatewayRouteRewrite omitted. -/** - * deserializeAws_restJson1MeshList - */ -const de_MeshList = (output: any, context: __SerdeContext): MeshRef[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeshRef(entry, context); - }); - return retVal; -}; +// de_HttpPathMatch omitted. -/** - * deserializeAws_restJson1MeshRef - */ -const de_MeshRef = (output: any, context: __SerdeContext): MeshRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - version: __expectLong(output.version), - } as any; -}; +// de_HttpQueryParameter omitted. -/** - * deserializeAws_restJson1MeshServiceDiscovery - */ -const de_MeshServiceDiscovery = (output: any, context: __SerdeContext): MeshServiceDiscovery => { - return { - ipPreference: __expectString(output.ipPreference), - } as any; -}; +// de_HttpQueryParameters omitted. -/** - * deserializeAws_restJson1MeshSpec - */ -const de_MeshSpec = (output: any, context: __SerdeContext): MeshSpec => { - return { - egressFilter: output.egressFilter != null ? de_EgressFilter(output.egressFilter, context) : undefined, - serviceDiscovery: - output.serviceDiscovery != null ? de_MeshServiceDiscovery(output.serviceDiscovery, context) : undefined, - } as any; -}; +// de_HttpRetryPolicy omitted. -/** - * deserializeAws_restJson1MeshStatus - */ -const de_MeshStatus = (output: any, context: __SerdeContext): MeshStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_HttpRetryPolicyEvents omitted. -/** - * deserializeAws_restJson1OutlierDetection - */ -const de_OutlierDetection = (output: any, context: __SerdeContext): OutlierDetection => { - return { - baseEjectionDuration: - output.baseEjectionDuration != null ? de_Duration(output.baseEjectionDuration, context) : undefined, - interval: output.interval != null ? de_Duration(output.interval, context) : undefined, - maxEjectionPercent: __expectInt32(output.maxEjectionPercent), - maxServerErrors: __expectLong(output.maxServerErrors), - } as any; -}; +// de_HttpRoute omitted. -/** - * deserializeAws_restJson1PortMapping - */ -const de_PortMapping = (output: any, context: __SerdeContext): PortMapping => { - return { - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - } as any; -}; +// de_HttpRouteAction omitted. -/** - * deserializeAws_restJson1PortSet - */ -const de_PortSet = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_HttpRouteHeader omitted. -/** - * deserializeAws_restJson1QueryParameterMatch - */ -const de_QueryParameterMatch = (output: any, context: __SerdeContext): QueryParameterMatch => { - return { - exact: __expectString(output.exact), - } as any; -}; +// de_HttpRouteHeaders omitted. -/** - * deserializeAws_restJson1ResourceMetadata - */ -const de_ResourceMetadata = (output: any, context: __SerdeContext): ResourceMetadata => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - uid: __expectString(output.uid), - version: __expectLong(output.version), - } as any; -}; +// de_HttpRouteMatch omitted. -/** - * deserializeAws_restJson1RouteData - */ -const de_RouteData = (output: any, context: __SerdeContext): RouteData => { - return { - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - routeName: __expectString(output.routeName), - spec: output.spec != null ? de_RouteSpec(output.spec, context) : undefined, - status: output.status != null ? de_RouteStatus(output.status, context) : undefined, - virtualRouterName: __expectString(output.virtualRouterName), - } as any; -}; +// de_HttpTimeout omitted. -/** - * deserializeAws_restJson1RouteList - */ -const de_RouteList = (output: any, context: __SerdeContext): RouteRef[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RouteRef(entry, context); - }); - return retVal; -}; +// de_JsonFormat omitted. -/** - * deserializeAws_restJson1RouteRef - */ -const de_RouteRef = (output: any, context: __SerdeContext): RouteRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - routeName: __expectString(output.routeName), - version: __expectLong(output.version), - virtualRouterName: __expectString(output.virtualRouterName), - } as any; -}; +// de_JsonFormatRef omitted. -/** - * deserializeAws_restJson1RouteSpec - */ -const de_RouteSpec = (output: any, context: __SerdeContext): RouteSpec => { - return { - grpcRoute: output.grpcRoute != null ? de_GrpcRoute(output.grpcRoute, context) : undefined, - http2Route: output.http2Route != null ? de_HttpRoute(output.http2Route, context) : undefined, - httpRoute: output.httpRoute != null ? de_HttpRoute(output.httpRoute, context) : undefined, - priority: __expectInt32(output.priority), - tcpRoute: output.tcpRoute != null ? de_TcpRoute(output.tcpRoute, context) : undefined, - } as any; -}; +// de_Listener omitted. -/** - * deserializeAws_restJson1RouteStatus - */ -const de_RouteStatus = (output: any, context: __SerdeContext): RouteStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_Listeners omitted. -/** - * deserializeAws_restJson1ServiceDiscovery - */ -const de_ServiceDiscovery = (output: any, context: __SerdeContext): ServiceDiscovery => { - if (output.awsCloudMap != null) { - return { - awsCloudMap: de_AwsCloudMapServiceDiscovery(output.awsCloudMap, context), - }; - } - if (output.dns != null) { - return { - dns: de_DnsServiceDiscovery(output.dns, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ListenerTimeout omitted. -/** - * deserializeAws_restJson1SubjectAlternativeNameList - */ -const de_SubjectAlternativeNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListenerTls omitted. -/** - * deserializeAws_restJson1SubjectAlternativeNameMatchers - */ -const de_SubjectAlternativeNameMatchers = (output: any, context: __SerdeContext): SubjectAlternativeNameMatchers => { - return { - exact: output.exact != null ? de_SubjectAlternativeNameList(output.exact, context) : undefined, - } as any; -}; +// de_ListenerTlsAcmCertificate omitted. -/** - * deserializeAws_restJson1SubjectAlternativeNames - */ -const de_SubjectAlternativeNames = (output: any, context: __SerdeContext): SubjectAlternativeNames => { - return { - match: output.match != null ? de_SubjectAlternativeNameMatchers(output.match, context) : undefined, - } as any; -}; +// de_ListenerTlsCertificate omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): TagRef[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagRef(entry, context); - }); - return retVal; -}; +// de_ListenerTlsFileCertificate omitted. + +// de_ListenerTlsSdsCertificate omitted. + +// de_ListenerTlsValidationContext omitted. + +// de_ListenerTlsValidationContextTrust omitted. + +// de_Logging omitted. + +// de_LoggingFormat omitted. + +// de_MatchRange omitted. /** - * deserializeAws_restJson1TagRef + * deserializeAws_restJson1MeshData */ -const de_TagRef = (output: any, context: __SerdeContext): TagRef => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; +const de_MeshData = (output: any, context: __SerdeContext): MeshData => { + return take(output, { + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + spec: _json, + status: _json, + }) as any; }; /** - * deserializeAws_restJson1TcpRetryPolicyEvents + * deserializeAws_restJson1MeshList */ -const de_TcpRetryPolicyEvents = (output: any, context: __SerdeContext): (TcpRetryPolicyEvent | string)[] => { +const de_MeshList = (output: any, context: __SerdeContext): MeshRef[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MeshRef(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1TcpRoute - */ -const de_TcpRoute = (output: any, context: __SerdeContext): TcpRoute => { - return { - action: output.action != null ? de_TcpRouteAction(output.action, context) : undefined, - match: output.match != null ? de_TcpRouteMatch(output.match, context) : undefined, - timeout: output.timeout != null ? de_TcpTimeout(output.timeout, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1TcpRouteAction + * deserializeAws_restJson1MeshRef */ -const de_TcpRouteAction = (output: any, context: __SerdeContext): TcpRouteAction => { - return { - weightedTargets: output.weightedTargets != null ? de_WeightedTargets(output.weightedTargets, context) : undefined, - } as any; +const de_MeshRef = (output: any, context: __SerdeContext): MeshRef => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + version: __expectLong, + }) as any; }; -/** - * deserializeAws_restJson1TcpRouteMatch - */ -const de_TcpRouteMatch = (output: any, context: __SerdeContext): TcpRouteMatch => { - return { - port: __expectInt32(output.port), - } as any; -}; +// de_MeshServiceDiscovery omitted. -/** - * deserializeAws_restJson1TcpTimeout - */ -const de_TcpTimeout = (output: any, context: __SerdeContext): TcpTimeout => { - return { - idle: output.idle != null ? de_Duration(output.idle, context) : undefined, - } as any; -}; +// de_MeshSpec omitted. -/** - * deserializeAws_restJson1TlsValidationContext - */ -const de_TlsValidationContext = (output: any, context: __SerdeContext): TlsValidationContext => { - return { - subjectAlternativeNames: - output.subjectAlternativeNames != null - ? de_SubjectAlternativeNames(output.subjectAlternativeNames, context) - : undefined, - trust: output.trust != null ? de_TlsValidationContextTrust(__expectUnion(output.trust), context) : undefined, - } as any; -}; +// de_MeshStatus omitted. -/** - * deserializeAws_restJson1TlsValidationContextAcmTrust - */ -const de_TlsValidationContextAcmTrust = (output: any, context: __SerdeContext): TlsValidationContextAcmTrust => { - return { - certificateAuthorityArns: - output.certificateAuthorityArns != null - ? de_CertificateAuthorityArns(output.certificateAuthorityArns, context) - : undefined, - } as any; -}; +// de_OutlierDetection omitted. -/** - * deserializeAws_restJson1TlsValidationContextFileTrust - */ -const de_TlsValidationContextFileTrust = (output: any, context: __SerdeContext): TlsValidationContextFileTrust => { - return { - certificateChain: __expectString(output.certificateChain), - } as any; -}; +// de_PortMapping omitted. -/** - * deserializeAws_restJson1TlsValidationContextSdsTrust - */ -const de_TlsValidationContextSdsTrust = (output: any, context: __SerdeContext): TlsValidationContextSdsTrust => { - return { - secretName: __expectString(output.secretName), - } as any; -}; +// de_PortSet omitted. -/** - * deserializeAws_restJson1TlsValidationContextTrust - */ -const de_TlsValidationContextTrust = (output: any, context: __SerdeContext): TlsValidationContextTrust => { - if (output.acm != null) { - return { - acm: de_TlsValidationContextAcmTrust(output.acm, context), - }; - } - if (output.file != null) { - return { - file: de_TlsValidationContextFileTrust(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_TlsValidationContextSdsTrust(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_QueryParameterMatch omitted. /** - * deserializeAws_restJson1VirtualGatewayAccessLog + * deserializeAws_restJson1ResourceMetadata */ -const de_VirtualGatewayAccessLog = (output: any, context: __SerdeContext): VirtualGatewayAccessLog => { - if (output.file != null) { - return { - file: de_VirtualGatewayFileAccessLog(output.file, context), - }; - } - return { $unknown: Object.entries(output)[0] }; +const de_ResourceMetadata = (output: any, context: __SerdeContext): ResourceMetadata => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshOwner: __expectString, + resourceOwner: __expectString, + uid: __expectString, + version: __expectLong, + }) as any; }; /** - * deserializeAws_restJson1VirtualGatewayBackendDefaults + * deserializeAws_restJson1RouteData */ -const de_VirtualGatewayBackendDefaults = (output: any, context: __SerdeContext): VirtualGatewayBackendDefaults => { - return { - clientPolicy: output.clientPolicy != null ? de_VirtualGatewayClientPolicy(output.clientPolicy, context) : undefined, - } as any; +const de_RouteData = (output: any, context: __SerdeContext): RouteData => { + return take(output, { + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + routeName: __expectString, + spec: _json, + status: _json, + virtualRouterName: __expectString, + }) as any; }; /** - * deserializeAws_restJson1VirtualGatewayCertificateAuthorityArns + * deserializeAws_restJson1RouteList */ -const de_VirtualGatewayCertificateAuthorityArns = (output: any, context: __SerdeContext): string[] => { +const de_RouteList = (output: any, context: __SerdeContext): RouteRef[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_RouteRef(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1VirtualGatewayClientPolicy + * deserializeAws_restJson1RouteRef */ -const de_VirtualGatewayClientPolicy = (output: any, context: __SerdeContext): VirtualGatewayClientPolicy => { - return { - tls: output.tls != null ? de_VirtualGatewayClientPolicyTls(output.tls, context) : undefined, - } as any; +const de_RouteRef = (output: any, context: __SerdeContext): RouteRef => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + routeName: __expectString, + version: __expectLong, + virtualRouterName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualGatewayClientPolicyTls - */ -const de_VirtualGatewayClientPolicyTls = (output: any, context: __SerdeContext): VirtualGatewayClientPolicyTls => { - return { - certificate: - output.certificate != null - ? de_VirtualGatewayClientTlsCertificate(__expectUnion(output.certificate), context) - : undefined, - enforce: __expectBoolean(output.enforce), - ports: output.ports != null ? de_PortSet(output.ports, context) : undefined, - validation: - output.validation != null ? de_VirtualGatewayTlsValidationContext(output.validation, context) : undefined, - } as any; -}; +// de_RouteSpec omitted. -/** - * deserializeAws_restJson1VirtualGatewayClientTlsCertificate - */ -const de_VirtualGatewayClientTlsCertificate = ( - output: any, - context: __SerdeContext -): VirtualGatewayClientTlsCertificate => { - if (output.file != null) { - return { - file: de_VirtualGatewayListenerTlsFileCertificate(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_VirtualGatewayListenerTlsSdsCertificate(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_RouteStatus omitted. -/** - * deserializeAws_restJson1VirtualGatewayConnectionPool - */ -const de_VirtualGatewayConnectionPool = (output: any, context: __SerdeContext): VirtualGatewayConnectionPool => { - if (output.grpc != null) { - return { - grpc: de_VirtualGatewayGrpcConnectionPool(output.grpc, context), - }; - } - if (output.http != null) { - return { - http: de_VirtualGatewayHttpConnectionPool(output.http, context), - }; - } - if (output.http2 != null) { - return { - http2: de_VirtualGatewayHttp2ConnectionPool(output.http2, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ServiceDiscovery omitted. + +// de_SubjectAlternativeNameList omitted. + +// de_SubjectAlternativeNameMatchers omitted. + +// de_SubjectAlternativeNames omitted. + +// de_TagList omitted. + +// de_TagRef omitted. + +// de_TcpRetryPolicyEvents omitted. + +// de_TcpRoute omitted. + +// de_TcpRouteAction omitted. + +// de_TcpRouteMatch omitted. + +// de_TcpTimeout omitted. + +// de_TlsValidationContext omitted. + +// de_TlsValidationContextAcmTrust omitted. + +// de_TlsValidationContextFileTrust omitted. + +// de_TlsValidationContextSdsTrust omitted. + +// de_TlsValidationContextTrust omitted. + +// de_VirtualGatewayAccessLog omitted. + +// de_VirtualGatewayBackendDefaults omitted. + +// de_VirtualGatewayCertificateAuthorityArns omitted. + +// de_VirtualGatewayClientPolicy omitted. + +// de_VirtualGatewayClientPolicyTls omitted. + +// de_VirtualGatewayClientTlsCertificate omitted. + +// de_VirtualGatewayConnectionPool omitted. /** * deserializeAws_restJson1VirtualGatewayData */ const de_VirtualGatewayData = (output: any, context: __SerdeContext): VirtualGatewayData => { - return { - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - spec: output.spec != null ? de_VirtualGatewaySpec(output.spec, context) : undefined, - status: output.status != null ? de_VirtualGatewayStatus(output.status, context) : undefined, - virtualGatewayName: __expectString(output.virtualGatewayName), - } as any; + return take(output, { + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + spec: _json, + status: _json, + virtualGatewayName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualGatewayFileAccessLog - */ -const de_VirtualGatewayFileAccessLog = (output: any, context: __SerdeContext): VirtualGatewayFileAccessLog => { - return { - format: output.format != null ? de_LoggingFormat(__expectUnion(output.format), context) : undefined, - path: __expectString(output.path), - } as any; -}; +// de_VirtualGatewayFileAccessLog omitted. -/** - * deserializeAws_restJson1VirtualGatewayGrpcConnectionPool - */ -const de_VirtualGatewayGrpcConnectionPool = ( - output: any, - context: __SerdeContext -): VirtualGatewayGrpcConnectionPool => { - return { - maxRequests: __expectInt32(output.maxRequests), - } as any; -}; +// de_VirtualGatewayGrpcConnectionPool omitted. -/** - * deserializeAws_restJson1VirtualGatewayHealthCheckPolicy - */ -const de_VirtualGatewayHealthCheckPolicy = (output: any, context: __SerdeContext): VirtualGatewayHealthCheckPolicy => { - return { - healthyThreshold: __expectInt32(output.healthyThreshold), - intervalMillis: __expectLong(output.intervalMillis), - path: __expectString(output.path), - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - timeoutMillis: __expectLong(output.timeoutMillis), - unhealthyThreshold: __expectInt32(output.unhealthyThreshold), - } as any; -}; +// de_VirtualGatewayHealthCheckPolicy omitted. -/** - * deserializeAws_restJson1VirtualGatewayHttp2ConnectionPool - */ -const de_VirtualGatewayHttp2ConnectionPool = ( - output: any, - context: __SerdeContext -): VirtualGatewayHttp2ConnectionPool => { - return { - maxRequests: __expectInt32(output.maxRequests), - } as any; -}; +// de_VirtualGatewayHttp2ConnectionPool omitted. -/** - * deserializeAws_restJson1VirtualGatewayHttpConnectionPool - */ -const de_VirtualGatewayHttpConnectionPool = ( - output: any, - context: __SerdeContext -): VirtualGatewayHttpConnectionPool => { - return { - maxConnections: __expectInt32(output.maxConnections), - maxPendingRequests: __expectInt32(output.maxPendingRequests), - } as any; -}; +// de_VirtualGatewayHttpConnectionPool omitted. /** * deserializeAws_restJson1VirtualGatewayList @@ -7408,372 +4918,83 @@ const de_VirtualGatewayList = (output: any, context: __SerdeContext): VirtualGat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualGatewayRef(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VirtualGatewayListener - */ -const de_VirtualGatewayListener = (output: any, context: __SerdeContext): VirtualGatewayListener => { - return { - connectionPool: - output.connectionPool != null - ? de_VirtualGatewayConnectionPool(__expectUnion(output.connectionPool), context) - : undefined, - healthCheck: - output.healthCheck != null ? de_VirtualGatewayHealthCheckPolicy(output.healthCheck, context) : undefined, - portMapping: output.portMapping != null ? de_VirtualGatewayPortMapping(output.portMapping, context) : undefined, - tls: output.tls != null ? de_VirtualGatewayListenerTls(output.tls, context) : undefined, - } as any; -}; +// de_VirtualGatewayListener omitted. -/** - * deserializeAws_restJson1VirtualGatewayListeners - */ -const de_VirtualGatewayListeners = (output: any, context: __SerdeContext): VirtualGatewayListener[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VirtualGatewayListener(entry, context); - }); - return retVal; -}; +// de_VirtualGatewayListeners omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTls - */ -const de_VirtualGatewayListenerTls = (output: any, context: __SerdeContext): VirtualGatewayListenerTls => { - return { - certificate: - output.certificate != null - ? de_VirtualGatewayListenerTlsCertificate(__expectUnion(output.certificate), context) - : undefined, - mode: __expectString(output.mode), - validation: - output.validation != null ? de_VirtualGatewayListenerTlsValidationContext(output.validation, context) : undefined, - } as any; -}; +// de_VirtualGatewayListenerTls omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTlsAcmCertificate - */ -const de_VirtualGatewayListenerTlsAcmCertificate = ( - output: any, - context: __SerdeContext -): VirtualGatewayListenerTlsAcmCertificate => { - return { - certificateArn: __expectString(output.certificateArn), - } as any; -}; +// de_VirtualGatewayListenerTlsAcmCertificate omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTlsCertificate - */ -const de_VirtualGatewayListenerTlsCertificate = ( - output: any, - context: __SerdeContext -): VirtualGatewayListenerTlsCertificate => { - if (output.acm != null) { - return { - acm: de_VirtualGatewayListenerTlsAcmCertificate(output.acm, context), - }; - } - if (output.file != null) { - return { - file: de_VirtualGatewayListenerTlsFileCertificate(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_VirtualGatewayListenerTlsSdsCertificate(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VirtualGatewayListenerTlsCertificate omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTlsFileCertificate - */ -const de_VirtualGatewayListenerTlsFileCertificate = ( - output: any, - context: __SerdeContext -): VirtualGatewayListenerTlsFileCertificate => { - return { - certificateChain: __expectString(output.certificateChain), - privateKey: __expectString(output.privateKey), - } as any; -}; +// de_VirtualGatewayListenerTlsFileCertificate omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTlsSdsCertificate - */ -const de_VirtualGatewayListenerTlsSdsCertificate = ( - output: any, - context: __SerdeContext -): VirtualGatewayListenerTlsSdsCertificate => { - return { - secretName: __expectString(output.secretName), - } as any; -}; +// de_VirtualGatewayListenerTlsSdsCertificate omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTlsValidationContext - */ -const de_VirtualGatewayListenerTlsValidationContext = ( - output: any, - context: __SerdeContext -): VirtualGatewayListenerTlsValidationContext => { - return { - subjectAlternativeNames: - output.subjectAlternativeNames != null - ? de_SubjectAlternativeNames(output.subjectAlternativeNames, context) - : undefined, - trust: - output.trust != null - ? de_VirtualGatewayListenerTlsValidationContextTrust(__expectUnion(output.trust), context) - : undefined, - } as any; -}; +// de_VirtualGatewayListenerTlsValidationContext omitted. -/** - * deserializeAws_restJson1VirtualGatewayListenerTlsValidationContextTrust - */ -const de_VirtualGatewayListenerTlsValidationContextTrust = ( - output: any, - context: __SerdeContext -): VirtualGatewayListenerTlsValidationContextTrust => { - if (output.file != null) { - return { - file: de_VirtualGatewayTlsValidationContextFileTrust(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_VirtualGatewayTlsValidationContextSdsTrust(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VirtualGatewayListenerTlsValidationContextTrust omitted. -/** - * deserializeAws_restJson1VirtualGatewayLogging - */ -const de_VirtualGatewayLogging = (output: any, context: __SerdeContext): VirtualGatewayLogging => { - return { - accessLog: - output.accessLog != null ? de_VirtualGatewayAccessLog(__expectUnion(output.accessLog), context) : undefined, - } as any; -}; +// de_VirtualGatewayLogging omitted. -/** - * deserializeAws_restJson1VirtualGatewayPortMapping - */ -const de_VirtualGatewayPortMapping = (output: any, context: __SerdeContext): VirtualGatewayPortMapping => { - return { - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - } as any; -}; +// de_VirtualGatewayPortMapping omitted. /** * deserializeAws_restJson1VirtualGatewayRef */ const de_VirtualGatewayRef = (output: any, context: __SerdeContext): VirtualGatewayRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - version: __expectLong(output.version), - virtualGatewayName: __expectString(output.virtualGatewayName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + version: __expectLong, + virtualGatewayName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualGatewaySpec - */ -const de_VirtualGatewaySpec = (output: any, context: __SerdeContext): VirtualGatewaySpec => { - return { - backendDefaults: - output.backendDefaults != null ? de_VirtualGatewayBackendDefaults(output.backendDefaults, context) : undefined, - listeners: output.listeners != null ? de_VirtualGatewayListeners(output.listeners, context) : undefined, - logging: output.logging != null ? de_VirtualGatewayLogging(output.logging, context) : undefined, - } as any; -}; +// de_VirtualGatewaySpec omitted. -/** - * deserializeAws_restJson1VirtualGatewayStatus - */ -const de_VirtualGatewayStatus = (output: any, context: __SerdeContext): VirtualGatewayStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_VirtualGatewayStatus omitted. -/** - * deserializeAws_restJson1VirtualGatewayTlsValidationContext - */ -const de_VirtualGatewayTlsValidationContext = ( - output: any, - context: __SerdeContext -): VirtualGatewayTlsValidationContext => { - return { - subjectAlternativeNames: - output.subjectAlternativeNames != null - ? de_SubjectAlternativeNames(output.subjectAlternativeNames, context) - : undefined, - trust: - output.trust != null - ? de_VirtualGatewayTlsValidationContextTrust(__expectUnion(output.trust), context) - : undefined, - } as any; -}; +// de_VirtualGatewayTlsValidationContext omitted. -/** - * deserializeAws_restJson1VirtualGatewayTlsValidationContextAcmTrust - */ -const de_VirtualGatewayTlsValidationContextAcmTrust = ( - output: any, - context: __SerdeContext -): VirtualGatewayTlsValidationContextAcmTrust => { - return { - certificateAuthorityArns: - output.certificateAuthorityArns != null - ? de_VirtualGatewayCertificateAuthorityArns(output.certificateAuthorityArns, context) - : undefined, - } as any; -}; +// de_VirtualGatewayTlsValidationContextAcmTrust omitted. -/** - * deserializeAws_restJson1VirtualGatewayTlsValidationContextFileTrust - */ -const de_VirtualGatewayTlsValidationContextFileTrust = ( - output: any, - context: __SerdeContext -): VirtualGatewayTlsValidationContextFileTrust => { - return { - certificateChain: __expectString(output.certificateChain), - } as any; -}; +// de_VirtualGatewayTlsValidationContextFileTrust omitted. -/** - * deserializeAws_restJson1VirtualGatewayTlsValidationContextSdsTrust - */ -const de_VirtualGatewayTlsValidationContextSdsTrust = ( - output: any, - context: __SerdeContext -): VirtualGatewayTlsValidationContextSdsTrust => { - return { - secretName: __expectString(output.secretName), - } as any; -}; +// de_VirtualGatewayTlsValidationContextSdsTrust omitted. -/** - * deserializeAws_restJson1VirtualGatewayTlsValidationContextTrust - */ -const de_VirtualGatewayTlsValidationContextTrust = ( - output: any, - context: __SerdeContext -): VirtualGatewayTlsValidationContextTrust => { - if (output.acm != null) { - return { - acm: de_VirtualGatewayTlsValidationContextAcmTrust(output.acm, context), - }; - } - if (output.file != null) { - return { - file: de_VirtualGatewayTlsValidationContextFileTrust(output.file, context), - }; - } - if (output.sds != null) { - return { - sds: de_VirtualGatewayTlsValidationContextSdsTrust(output.sds, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VirtualGatewayTlsValidationContextTrust omitted. -/** - * deserializeAws_restJson1VirtualNodeConnectionPool - */ -const de_VirtualNodeConnectionPool = (output: any, context: __SerdeContext): VirtualNodeConnectionPool => { - if (output.grpc != null) { - return { - grpc: de_VirtualNodeGrpcConnectionPool(output.grpc, context), - }; - } - if (output.http != null) { - return { - http: de_VirtualNodeHttpConnectionPool(output.http, context), - }; - } - if (output.http2 != null) { - return { - http2: de_VirtualNodeHttp2ConnectionPool(output.http2, context), - }; - } - if (output.tcp != null) { - return { - tcp: de_VirtualNodeTcpConnectionPool(output.tcp, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VirtualNodeConnectionPool omitted. /** * deserializeAws_restJson1VirtualNodeData */ const de_VirtualNodeData = (output: any, context: __SerdeContext): VirtualNodeData => { - return { - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - spec: output.spec != null ? de_VirtualNodeSpec(output.spec, context) : undefined, - status: output.status != null ? de_VirtualNodeStatus(output.status, context) : undefined, - virtualNodeName: __expectString(output.virtualNodeName), - } as any; + return take(output, { + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + spec: _json, + status: _json, + virtualNodeName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualNodeGrpcConnectionPool - */ -const de_VirtualNodeGrpcConnectionPool = (output: any, context: __SerdeContext): VirtualNodeGrpcConnectionPool => { - return { - maxRequests: __expectInt32(output.maxRequests), - } as any; -}; +// de_VirtualNodeGrpcConnectionPool omitted. -/** - * deserializeAws_restJson1VirtualNodeHttp2ConnectionPool - */ -const de_VirtualNodeHttp2ConnectionPool = (output: any, context: __SerdeContext): VirtualNodeHttp2ConnectionPool => { - return { - maxRequests: __expectInt32(output.maxRequests), - } as any; -}; +// de_VirtualNodeHttp2ConnectionPool omitted. -/** - * deserializeAws_restJson1VirtualNodeHttpConnectionPool - */ -const de_VirtualNodeHttpConnectionPool = (output: any, context: __SerdeContext): VirtualNodeHttpConnectionPool => { - return { - maxConnections: __expectInt32(output.maxConnections), - maxPendingRequests: __expectInt32(output.maxPendingRequests), - } as any; -}; +// de_VirtualNodeHttpConnectionPool omitted. /** * deserializeAws_restJson1VirtualNodeList @@ -7782,9 +5003,6 @@ const de_VirtualNodeList = (output: any, context: __SerdeContext): VirtualNodeRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualNodeRef(entry, context); }); return retVal; @@ -7794,76 +5012,37 @@ const de_VirtualNodeList = (output: any, context: __SerdeContext): VirtualNodeRe * deserializeAws_restJson1VirtualNodeRef */ const de_VirtualNodeRef = (output: any, context: __SerdeContext): VirtualNodeRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - version: __expectLong(output.version), - virtualNodeName: __expectString(output.virtualNodeName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + version: __expectLong, + virtualNodeName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualNodeServiceProvider - */ -const de_VirtualNodeServiceProvider = (output: any, context: __SerdeContext): VirtualNodeServiceProvider => { - return { - virtualNodeName: __expectString(output.virtualNodeName), - } as any; -}; +// de_VirtualNodeServiceProvider omitted. -/** - * deserializeAws_restJson1VirtualNodeSpec - */ -const de_VirtualNodeSpec = (output: any, context: __SerdeContext): VirtualNodeSpec => { - return { - backendDefaults: output.backendDefaults != null ? de_BackendDefaults(output.backendDefaults, context) : undefined, - backends: output.backends != null ? de_Backends(output.backends, context) : undefined, - listeners: output.listeners != null ? de_Listeners(output.listeners, context) : undefined, - logging: output.logging != null ? de_Logging(output.logging, context) : undefined, - serviceDiscovery: - output.serviceDiscovery != null - ? de_ServiceDiscovery(__expectUnion(output.serviceDiscovery), context) - : undefined, - } as any; -}; +// de_VirtualNodeSpec omitted. -/** - * deserializeAws_restJson1VirtualNodeStatus - */ -const de_VirtualNodeStatus = (output: any, context: __SerdeContext): VirtualNodeStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_VirtualNodeStatus omitted. -/** - * deserializeAws_restJson1VirtualNodeTcpConnectionPool - */ -const de_VirtualNodeTcpConnectionPool = (output: any, context: __SerdeContext): VirtualNodeTcpConnectionPool => { - return { - maxConnections: __expectInt32(output.maxConnections), - } as any; -}; +// de_VirtualNodeTcpConnectionPool omitted. /** * deserializeAws_restJson1VirtualRouterData */ const de_VirtualRouterData = (output: any, context: __SerdeContext): VirtualRouterData => { - return { - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - spec: output.spec != null ? de_VirtualRouterSpec(output.spec, context) : undefined, - status: output.status != null ? de_VirtualRouterStatus(output.status, context) : undefined, - virtualRouterName: __expectString(output.virtualRouterName), - } as any; + return take(output, { + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + spec: _json, + status: _json, + virtualRouterName: __expectString, + }) as any; }; /** @@ -7873,106 +5052,50 @@ const de_VirtualRouterList = (output: any, context: __SerdeContext): VirtualRout const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualRouterRef(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VirtualRouterListener - */ -const de_VirtualRouterListener = (output: any, context: __SerdeContext): VirtualRouterListener => { - return { - portMapping: output.portMapping != null ? de_PortMapping(output.portMapping, context) : undefined, - } as any; -}; +// de_VirtualRouterListener omitted. -/** - * deserializeAws_restJson1VirtualRouterListeners - */ -const de_VirtualRouterListeners = (output: any, context: __SerdeContext): VirtualRouterListener[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VirtualRouterListener(entry, context); - }); - return retVal; -}; +// de_VirtualRouterListeners omitted. /** * deserializeAws_restJson1VirtualRouterRef */ const de_VirtualRouterRef = (output: any, context: __SerdeContext): VirtualRouterRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - version: __expectLong(output.version), - virtualRouterName: __expectString(output.virtualRouterName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + version: __expectLong, + virtualRouterName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualRouterServiceProvider - */ -const de_VirtualRouterServiceProvider = (output: any, context: __SerdeContext): VirtualRouterServiceProvider => { - return { - virtualRouterName: __expectString(output.virtualRouterName), - } as any; -}; +// de_VirtualRouterServiceProvider omitted. -/** - * deserializeAws_restJson1VirtualRouterSpec - */ -const de_VirtualRouterSpec = (output: any, context: __SerdeContext): VirtualRouterSpec => { - return { - listeners: output.listeners != null ? de_VirtualRouterListeners(output.listeners, context) : undefined, - } as any; -}; +// de_VirtualRouterSpec omitted. -/** - * deserializeAws_restJson1VirtualRouterStatus - */ -const de_VirtualRouterStatus = (output: any, context: __SerdeContext): VirtualRouterStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_VirtualRouterStatus omitted. -/** - * deserializeAws_restJson1VirtualServiceBackend - */ -const de_VirtualServiceBackend = (output: any, context: __SerdeContext): VirtualServiceBackend => { - return { - clientPolicy: output.clientPolicy != null ? de_ClientPolicy(output.clientPolicy, context) : undefined, - virtualServiceName: __expectString(output.virtualServiceName), - } as any; -}; +// de_VirtualServiceBackend omitted. /** * deserializeAws_restJson1VirtualServiceData */ const de_VirtualServiceData = (output: any, context: __SerdeContext): VirtualServiceData => { - return { - meshName: __expectString(output.meshName), - metadata: output.metadata != null ? de_ResourceMetadata(output.metadata, context) : undefined, - spec: output.spec != null ? de_VirtualServiceSpec(output.spec, context) : undefined, - status: output.status != null ? de_VirtualServiceStatus(output.status, context) : undefined, - virtualServiceName: __expectString(output.virtualServiceName), - } as any; + return take(output, { + meshName: __expectString, + metadata: (_: any) => de_ResourceMetadata(_, context), + spec: _json, + status: _json, + virtualServiceName: __expectString, + }) as any; }; /** @@ -7982,94 +5105,36 @@ const de_VirtualServiceList = (output: any, context: __SerdeContext): VirtualSer const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualServiceRef(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VirtualServiceProvider - */ -const de_VirtualServiceProvider = (output: any, context: __SerdeContext): VirtualServiceProvider => { - if (output.virtualNode != null) { - return { - virtualNode: de_VirtualNodeServiceProvider(output.virtualNode, context), - }; - } - if (output.virtualRouter != null) { - return { - virtualRouter: de_VirtualRouterServiceProvider(output.virtualRouter, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VirtualServiceProvider omitted. /** * deserializeAws_restJson1VirtualServiceRef */ const de_VirtualServiceRef = (output: any, context: __SerdeContext): VirtualServiceRef => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - meshName: __expectString(output.meshName), - meshOwner: __expectString(output.meshOwner), - resourceOwner: __expectString(output.resourceOwner), - version: __expectLong(output.version), - virtualServiceName: __expectString(output.virtualServiceName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + meshName: __expectString, + meshOwner: __expectString, + resourceOwner: __expectString, + version: __expectLong, + virtualServiceName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VirtualServiceSpec - */ -const de_VirtualServiceSpec = (output: any, context: __SerdeContext): VirtualServiceSpec => { - return { - provider: output.provider != null ? de_VirtualServiceProvider(__expectUnion(output.provider), context) : undefined, - } as any; -}; +// de_VirtualServiceSpec omitted. -/** - * deserializeAws_restJson1VirtualServiceStatus - */ -const de_VirtualServiceStatus = (output: any, context: __SerdeContext): VirtualServiceStatus => { - return { - status: __expectString(output.status), - } as any; -}; +// de_VirtualServiceStatus omitted. -/** - * deserializeAws_restJson1WeightedTarget - */ -const de_WeightedTarget = (output: any, context: __SerdeContext): WeightedTarget => { - return { - port: __expectInt32(output.port), - virtualNode: __expectString(output.virtualNode), - weight: __expectInt32(output.weight), - } as any; -}; +// de_WeightedTarget omitted. -/** - * deserializeAws_restJson1WeightedTargets - */ -const de_WeightedTargets = (output: any, context: __SerdeContext): WeightedTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WeightedTarget(entry, context); - }); - return retVal; -}; +// de_WeightedTargets omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-appconfig/src/protocols/Aws_restJson1.ts b/clients/client-appconfig/src/protocols/Aws_restJson1.ts index d59cb941a288..1bfe7d77a649 100644 --- a/clients/client-appconfig/src/protocols/Aws_restJson1.ts +++ b/clients/client-appconfig/src/protocols/Aws_restJson1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, @@ -10,12 +10,13 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -132,30 +133,18 @@ import { import { AppConfigServiceException as __BaseException } from "../models/AppConfigServiceException"; import { Action, - ActionInvocation, - ActionPoint, - Application, - AppliedExtension, - BadRequestDetails, BadRequestException, - ConfigurationProfileSummary, ConflictException, DeploymentEvent, DeploymentStrategy, DeploymentSummary, - Environment, - ExtensionAssociationSummary, - ExtensionSummary, - HostedConfigurationVersionSummary, InternalServerException, - InvalidConfigurationDetail, Monitor, Parameter, PayloadTooLargeException, ResourceNotFoundException, ServiceQuotaExceededException, Validator, - ValidatorType, } from "../models/models_0"; /** @@ -171,11 +160,13 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -210,15 +201,17 @@ export const se_CreateConfigurationProfileCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.LocationUri != null && { LocationUri: input.LocationUri }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RetrievalRoleArn != null && { RetrievalRoleArn: input.RetrievalRoleArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Validators != null && { Validators: se_ValidatorList(input.Validators, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + LocationUri: [], + Name: [], + RetrievalRoleArn: [], + Tags: (_) => _json(_), + Type: [], + Validators: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -243,18 +236,18 @@ export const se_CreateDeploymentStrategyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deploymentstrategies"; let body: any; - body = JSON.stringify({ - ...(input.DeploymentDurationInMinutes != null && { - DeploymentDurationInMinutes: input.DeploymentDurationInMinutes, - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FinalBakeTimeInMinutes != null && { FinalBakeTimeInMinutes: input.FinalBakeTimeInMinutes }), - ...(input.GrowthFactor != null && { GrowthFactor: __serializeFloat(input.GrowthFactor) }), - ...(input.GrowthType != null && { GrowthType: input.GrowthType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ReplicateTo != null && { ReplicateTo: input.ReplicateTo }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DeploymentDurationInMinutes: [], + Description: [], + FinalBakeTimeInMinutes: [], + GrowthFactor: (_) => __serializeFloat(_), + GrowthType: [], + Name: [], + ReplicateTo: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -289,12 +282,14 @@ export const se_CreateEnvironmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Monitors != null && { Monitors: se_MonitorList(input.Monitors, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Monitors: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -323,13 +318,15 @@ export const se_CreateExtensionCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/extensions"; let body: any; - body = JSON.stringify({ - ...(input.Actions != null && { Actions: se_ActionsMap(input.Actions, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_ParameterMap(input.Parameters, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Actions: (_) => _json(_), + Description: [], + Name: [], + Parameters: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -354,13 +351,15 @@ export const se_CreateExtensionAssociationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/extensionassociations"; let body: any; - body = JSON.stringify({ - ...(input.ExtensionIdentifier != null && { ExtensionIdentifier: input.ExtensionIdentifier }), - ...(input.ExtensionVersionNumber != null && { ExtensionVersionNumber: input.ExtensionVersionNumber }), - ...(input.Parameters != null && { Parameters: se_ParameterValueMap(input.Parameters, context) }), - ...(input.ResourceIdentifier != null && { ResourceIdentifier: input.ResourceIdentifier }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ExtensionIdentifier: [], + ExtensionVersionNumber: [], + Parameters: (_) => _json(_), + ResourceIdentifier: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1361,14 +1360,16 @@ export const se_StartDeploymentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ConfigurationProfileId != null && { ConfigurationProfileId: input.ConfigurationProfileId }), - ...(input.ConfigurationVersion != null && { ConfigurationVersion: input.ConfigurationVersion }), - ...(input.DeploymentStrategyId != null && { DeploymentStrategyId: input.DeploymentStrategyId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KmsKeyIdentifier != null && { KmsKeyIdentifier: input.KmsKeyIdentifier }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ConfigurationProfileId: [], + ConfigurationVersion: [], + DeploymentStrategyId: [], + Description: [], + KmsKeyIdentifier: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1442,9 +1443,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1508,10 +1511,12 @@ export const se_UpdateApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1554,12 +1559,14 @@ export const se_UpdateConfigurationProfileCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RetrievalRoleArn != null && { RetrievalRoleArn: input.RetrievalRoleArn }), - ...(input.Validators != null && { Validators: se_ValidatorList(input.Validators, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + RetrievalRoleArn: [], + Validators: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1594,15 +1601,15 @@ export const se_UpdateDeploymentStrategyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DeploymentDurationInMinutes != null && { - DeploymentDurationInMinutes: input.DeploymentDurationInMinutes, - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FinalBakeTimeInMinutes != null && { FinalBakeTimeInMinutes: input.FinalBakeTimeInMinutes }), - ...(input.GrowthFactor != null && { GrowthFactor: __serializeFloat(input.GrowthFactor) }), - ...(input.GrowthType != null && { GrowthType: input.GrowthType }), - }); + body = JSON.stringify( + take(input, { + DeploymentDurationInMinutes: [], + Description: [], + FinalBakeTimeInMinutes: [], + GrowthFactor: (_) => __serializeFloat(_), + GrowthType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1645,11 +1652,13 @@ export const se_UpdateEnvironmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Monitors != null && { Monitors: se_MonitorList(input.Monitors, context) }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Monitors: (_) => _json(_), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1683,12 +1692,14 @@ export const se_UpdateExtensionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Actions != null && { Actions: se_ActionsMap(input.Actions, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Parameters != null && { Parameters: se_ParameterMap(input.Parameters, context) }), - ...(input.VersionNumber != null && { VersionNumber: input.VersionNumber }), - }); + body = JSON.stringify( + take(input, { + Actions: (_) => _json(_), + Description: [], + Parameters: (_) => _json(_), + VersionNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1723,9 +1734,11 @@ export const se_UpdateExtensionAssociationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Parameters != null && { Parameters: se_ParameterValueMap(input.Parameters, context) }), - }); + body = JSON.stringify( + take(input, { + Parameters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1795,15 +1808,12 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Description: __expectString, + Id: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1828,10 +1838,9 @@ const de_CreateApplicationCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1851,30 +1860,17 @@ export const de_CreateConfigurationProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LocationUri != null) { - contents.LocationUri = __expectString(data.LocationUri); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RetrievalRoleArn != null) { - contents.RetrievalRoleArn = __expectString(data.RetrievalRoleArn); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.Validators != null) { - contents.Validators = de_ValidatorList(data.Validators, context); - } + const doc = take(data, { + ApplicationId: __expectString, + Description: __expectString, + Id: __expectString, + LocationUri: __expectString, + Name: __expectString, + RetrievalRoleArn: __expectString, + Type: __expectString, + Validators: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1902,10 +1898,9 @@ const de_CreateConfigurationProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1925,30 +1920,17 @@ export const de_CreateDeploymentStrategyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeploymentDurationInMinutes != null) { - contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FinalBakeTimeInMinutes != null) { - contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes); - } - if (data.GrowthFactor != null) { - contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor); - } - if (data.GrowthType != null) { - contents.GrowthType = __expectString(data.GrowthType); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ReplicateTo != null) { - contents.ReplicateTo = __expectString(data.ReplicateTo); - } + const doc = take(data, { + DeploymentDurationInMinutes: __expectInt32, + Description: __expectString, + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + Id: __expectString, + Name: __expectString, + ReplicateTo: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1973,10 +1955,9 @@ const de_CreateDeploymentStrategyCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1996,24 +1977,15 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Monitors != null) { - contents.Monitors = de_MonitorList(data.Monitors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Description: __expectString, + Id: __expectString, + Monitors: _json, + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2041,10 +2013,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2064,27 +2035,16 @@ export const de_CreateExtensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Actions != null) { - contents.Actions = de_ActionsMap(data.Actions, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Parameters != null) { - contents.Parameters = de_ParameterMap(data.Parameters, context); - } - if (data.VersionNumber != null) { - contents.VersionNumber = __expectInt32(data.VersionNumber); - } + const doc = take(data, { + Actions: _json, + Arn: __expectString, + Description: __expectString, + Id: __expectString, + Name: __expectString, + Parameters: _json, + VersionNumber: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2115,10 +2075,9 @@ const de_CreateExtensionCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2138,24 +2097,15 @@ export const de_CreateExtensionAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ExtensionArn != null) { - contents.ExtensionArn = __expectString(data.ExtensionArn); - } - if (data.ExtensionVersionNumber != null) { - contents.ExtensionVersionNumber = __expectInt32(data.ExtensionVersionNumber); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Parameters != null) { - contents.Parameters = de_ParameterValueMap(data.Parameters, context); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } + const doc = take(data, { + Arn: __expectString, + ExtensionArn: __expectString, + ExtensionVersionNumber: __expectInt32, + Id: __expectString, + Parameters: _json, + ResourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2186,10 +2136,9 @@ const de_CreateExtensionAssociationCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2255,10 +2204,9 @@ const de_CreateHostedConfigurationVersionCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2305,10 +2253,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2358,10 +2305,9 @@ const de_DeleteConfigurationProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2408,10 +2354,9 @@ const de_DeleteDeploymentStrategyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2461,10 +2406,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2511,10 +2455,9 @@ const de_DeleteExtensionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2561,10 +2504,9 @@ const de_DeleteExtensionAssociationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2611,10 +2553,9 @@ const de_DeleteHostedConfigurationVersionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2634,15 +2575,12 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Description: __expectString, + Id: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2670,10 +2608,9 @@ const de_GetApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2723,10 +2660,9 @@ const de_GetConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2746,30 +2682,17 @@ export const de_GetConfigurationProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LocationUri != null) { - contents.LocationUri = __expectString(data.LocationUri); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RetrievalRoleArn != null) { - contents.RetrievalRoleArn = __expectString(data.RetrievalRoleArn); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.Validators != null) { - contents.Validators = de_ValidatorList(data.Validators, context); - } + const doc = take(data, { + ApplicationId: __expectString, + Description: __expectString, + Id: __expectString, + LocationUri: __expectString, + Name: __expectString, + RetrievalRoleArn: __expectString, + Type: __expectString, + Validators: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2797,10 +2720,9 @@ const de_GetConfigurationProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2820,69 +2742,30 @@ export const de_GetDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.AppliedExtensions != null) { - contents.AppliedExtensions = de_AppliedExtensions(data.AppliedExtensions, context); - } - if (data.CompletedAt != null) { - contents.CompletedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CompletedAt)); - } - if (data.ConfigurationLocationUri != null) { - contents.ConfigurationLocationUri = __expectString(data.ConfigurationLocationUri); - } - if (data.ConfigurationName != null) { - contents.ConfigurationName = __expectString(data.ConfigurationName); - } - if (data.ConfigurationProfileId != null) { - contents.ConfigurationProfileId = __expectString(data.ConfigurationProfileId); - } - if (data.ConfigurationVersion != null) { - contents.ConfigurationVersion = __expectString(data.ConfigurationVersion); - } - if (data.DeploymentDurationInMinutes != null) { - contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes); - } - if (data.DeploymentNumber != null) { - contents.DeploymentNumber = __expectInt32(data.DeploymentNumber); - } - if (data.DeploymentStrategyId != null) { - contents.DeploymentStrategyId = __expectString(data.DeploymentStrategyId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.EventLog != null) { - contents.EventLog = de_DeploymentEvents(data.EventLog, context); - } - if (data.FinalBakeTimeInMinutes != null) { - contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes); - } - if (data.GrowthFactor != null) { - contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor); - } - if (data.GrowthType != null) { - contents.GrowthType = __expectString(data.GrowthType); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.KmsKeyIdentifier != null) { - contents.KmsKeyIdentifier = __expectString(data.KmsKeyIdentifier); - } - if (data.PercentageComplete != null) { - contents.PercentageComplete = __limitedParseFloat32(data.PercentageComplete); - } - if (data.StartedAt != null) { - contents.StartedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.StartedAt)); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + AppliedExtensions: _json, + CompletedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ConfigurationLocationUri: __expectString, + ConfigurationName: __expectString, + ConfigurationProfileId: __expectString, + ConfigurationVersion: __expectString, + DeploymentDurationInMinutes: __expectInt32, + DeploymentNumber: __expectInt32, + DeploymentStrategyId: __expectString, + Description: __expectString, + EnvironmentId: __expectString, + EventLog: (_) => de_DeploymentEvents(_, context), + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + KmsKeyArn: __expectString, + KmsKeyIdentifier: __expectString, + PercentageComplete: __limitedParseFloat32, + StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2910,10 +2793,9 @@ const de_GetDeploymentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2933,30 +2815,17 @@ export const de_GetDeploymentStrategyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeploymentDurationInMinutes != null) { - contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FinalBakeTimeInMinutes != null) { - contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes); - } - if (data.GrowthFactor != null) { - contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor); - } - if (data.GrowthType != null) { - contents.GrowthType = __expectString(data.GrowthType); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ReplicateTo != null) { - contents.ReplicateTo = __expectString(data.ReplicateTo); - } + const doc = take(data, { + DeploymentDurationInMinutes: __expectInt32, + Description: __expectString, + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + Id: __expectString, + Name: __expectString, + ReplicateTo: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2984,10 +2853,9 @@ const de_GetDeploymentStrategyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3007,24 +2875,15 @@ export const de_GetEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Monitors != null) { - contents.Monitors = de_MonitorList(data.Monitors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Description: __expectString, + Id: __expectString, + Monitors: _json, + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3052,10 +2911,9 @@ const de_GetEnvironmentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3075,27 +2933,16 @@ export const de_GetExtensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Actions != null) { - contents.Actions = de_ActionsMap(data.Actions, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Parameters != null) { - contents.Parameters = de_ParameterMap(data.Parameters, context); - } - if (data.VersionNumber != null) { - contents.VersionNumber = __expectInt32(data.VersionNumber); - } + const doc = take(data, { + Actions: _json, + Arn: __expectString, + Description: __expectString, + Id: __expectString, + Name: __expectString, + Parameters: _json, + VersionNumber: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -3123,10 +2970,9 @@ const de_GetExtensionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3146,24 +2992,15 @@ export const de_GetExtensionAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ExtensionArn != null) { - contents.ExtensionArn = __expectString(data.ExtensionArn); - } - if (data.ExtensionVersionNumber != null) { - contents.ExtensionVersionNumber = __expectInt32(data.ExtensionVersionNumber); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Parameters != null) { - contents.Parameters = de_ParameterValueMap(data.Parameters, context); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } + const doc = take(data, { + Arn: __expectString, + ExtensionArn: __expectString, + ExtensionVersionNumber: __expectInt32, + Id: __expectString, + Parameters: _json, + ResourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3191,10 +3028,9 @@ const de_GetExtensionAssociationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3251,10 +3087,9 @@ const de_GetHostedConfigurationVersionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3274,12 +3109,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ApplicationList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3304,10 +3138,9 @@ const de_ListApplicationsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3327,12 +3160,11 @@ export const de_ListConfigurationProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ConfigurationProfileSummaryList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3360,10 +3192,9 @@ const de_ListConfigurationProfilesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3383,12 +3214,11 @@ export const de_ListDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_DeploymentList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_DeploymentList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3416,10 +3246,9 @@ const de_ListDeploymentsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3439,12 +3268,11 @@ export const de_ListDeploymentStrategiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_DeploymentStrategyList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_DeploymentStrategyList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3469,10 +3297,9 @@ const de_ListDeploymentStrategiesCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3492,12 +3319,11 @@ export const de_ListEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_EnvironmentList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3525,10 +3351,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3548,12 +3373,11 @@ export const de_ListExtensionAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ExtensionAssociationSummaries(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3578,10 +3402,9 @@ const de_ListExtensionAssociationsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3601,12 +3424,11 @@ export const de_ListExtensionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ExtensionSummaries(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3631,10 +3453,9 @@ const de_ListExtensionsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3654,12 +3475,11 @@ export const de_ListHostedConfigurationVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_HostedConfigurationVersionSummaryList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3687,10 +3507,9 @@ const de_ListHostedConfigurationVersionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3710,9 +3529,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3740,10 +3560,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3763,69 +3582,30 @@ export const de_StartDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.AppliedExtensions != null) { - contents.AppliedExtensions = de_AppliedExtensions(data.AppliedExtensions, context); - } - if (data.CompletedAt != null) { - contents.CompletedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CompletedAt)); - } - if (data.ConfigurationLocationUri != null) { - contents.ConfigurationLocationUri = __expectString(data.ConfigurationLocationUri); - } - if (data.ConfigurationName != null) { - contents.ConfigurationName = __expectString(data.ConfigurationName); - } - if (data.ConfigurationProfileId != null) { - contents.ConfigurationProfileId = __expectString(data.ConfigurationProfileId); - } - if (data.ConfigurationVersion != null) { - contents.ConfigurationVersion = __expectString(data.ConfigurationVersion); - } - if (data.DeploymentDurationInMinutes != null) { - contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes); - } - if (data.DeploymentNumber != null) { - contents.DeploymentNumber = __expectInt32(data.DeploymentNumber); - } - if (data.DeploymentStrategyId != null) { - contents.DeploymentStrategyId = __expectString(data.DeploymentStrategyId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.EventLog != null) { - contents.EventLog = de_DeploymentEvents(data.EventLog, context); - } - if (data.FinalBakeTimeInMinutes != null) { - contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes); - } - if (data.GrowthFactor != null) { - contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor); - } - if (data.GrowthType != null) { - contents.GrowthType = __expectString(data.GrowthType); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.KmsKeyIdentifier != null) { - contents.KmsKeyIdentifier = __expectString(data.KmsKeyIdentifier); - } - if (data.PercentageComplete != null) { - contents.PercentageComplete = __limitedParseFloat32(data.PercentageComplete); - } - if (data.StartedAt != null) { - contents.StartedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.StartedAt)); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + AppliedExtensions: _json, + CompletedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ConfigurationLocationUri: __expectString, + ConfigurationName: __expectString, + ConfigurationProfileId: __expectString, + ConfigurationVersion: __expectString, + DeploymentDurationInMinutes: __expectInt32, + DeploymentNumber: __expectInt32, + DeploymentStrategyId: __expectString, + Description: __expectString, + EnvironmentId: __expectString, + EventLog: (_) => de_DeploymentEvents(_, context), + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + KmsKeyArn: __expectString, + KmsKeyIdentifier: __expectString, + PercentageComplete: __limitedParseFloat32, + StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3856,10 +3636,9 @@ const de_StartDeploymentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3879,69 +3658,30 @@ export const de_StopDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.AppliedExtensions != null) { - contents.AppliedExtensions = de_AppliedExtensions(data.AppliedExtensions, context); - } - if (data.CompletedAt != null) { - contents.CompletedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CompletedAt)); - } - if (data.ConfigurationLocationUri != null) { - contents.ConfigurationLocationUri = __expectString(data.ConfigurationLocationUri); - } - if (data.ConfigurationName != null) { - contents.ConfigurationName = __expectString(data.ConfigurationName); - } - if (data.ConfigurationProfileId != null) { - contents.ConfigurationProfileId = __expectString(data.ConfigurationProfileId); - } - if (data.ConfigurationVersion != null) { - contents.ConfigurationVersion = __expectString(data.ConfigurationVersion); - } - if (data.DeploymentDurationInMinutes != null) { - contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes); - } - if (data.DeploymentNumber != null) { - contents.DeploymentNumber = __expectInt32(data.DeploymentNumber); - } - if (data.DeploymentStrategyId != null) { - contents.DeploymentStrategyId = __expectString(data.DeploymentStrategyId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.EventLog != null) { - contents.EventLog = de_DeploymentEvents(data.EventLog, context); - } - if (data.FinalBakeTimeInMinutes != null) { - contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes); - } - if (data.GrowthFactor != null) { - contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor); - } - if (data.GrowthType != null) { - contents.GrowthType = __expectString(data.GrowthType); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.KmsKeyIdentifier != null) { - contents.KmsKeyIdentifier = __expectString(data.KmsKeyIdentifier); - } - if (data.PercentageComplete != null) { - contents.PercentageComplete = __limitedParseFloat32(data.PercentageComplete); - } - if (data.StartedAt != null) { - contents.StartedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.StartedAt)); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + AppliedExtensions: _json, + CompletedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ConfigurationLocationUri: __expectString, + ConfigurationName: __expectString, + ConfigurationProfileId: __expectString, + ConfigurationVersion: __expectString, + DeploymentDurationInMinutes: __expectInt32, + DeploymentNumber: __expectInt32, + DeploymentStrategyId: __expectString, + Description: __expectString, + EnvironmentId: __expectString, + EventLog: (_) => de_DeploymentEvents(_, context), + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + KmsKeyArn: __expectString, + KmsKeyIdentifier: __expectString, + PercentageComplete: __limitedParseFloat32, + StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3969,10 +3709,9 @@ const de_StopDeploymentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4019,10 +3758,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4069,10 +3807,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4092,15 +3829,12 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Description: __expectString, + Id: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4128,10 +3862,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4151,30 +3884,17 @@ export const de_UpdateConfigurationProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LocationUri != null) { - contents.LocationUri = __expectString(data.LocationUri); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RetrievalRoleArn != null) { - contents.RetrievalRoleArn = __expectString(data.RetrievalRoleArn); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.Validators != null) { - contents.Validators = de_ValidatorList(data.Validators, context); - } + const doc = take(data, { + ApplicationId: __expectString, + Description: __expectString, + Id: __expectString, + LocationUri: __expectString, + Name: __expectString, + RetrievalRoleArn: __expectString, + Type: __expectString, + Validators: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4202,10 +3922,9 @@ const de_UpdateConfigurationProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4225,30 +3944,17 @@ export const de_UpdateDeploymentStrategyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeploymentDurationInMinutes != null) { - contents.DeploymentDurationInMinutes = __expectInt32(data.DeploymentDurationInMinutes); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FinalBakeTimeInMinutes != null) { - contents.FinalBakeTimeInMinutes = __expectInt32(data.FinalBakeTimeInMinutes); - } - if (data.GrowthFactor != null) { - contents.GrowthFactor = __limitedParseFloat32(data.GrowthFactor); - } - if (data.GrowthType != null) { - contents.GrowthType = __expectString(data.GrowthType); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ReplicateTo != null) { - contents.ReplicateTo = __expectString(data.ReplicateTo); - } + const doc = take(data, { + DeploymentDurationInMinutes: __expectInt32, + Description: __expectString, + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + Id: __expectString, + Name: __expectString, + ReplicateTo: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4276,10 +3982,9 @@ const de_UpdateDeploymentStrategyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4299,24 +4004,15 @@ export const de_UpdateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Monitors != null) { - contents.Monitors = de_MonitorList(data.Monitors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Description: __expectString, + Id: __expectString, + Monitors: _json, + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4344,10 +4040,9 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4367,27 +4062,16 @@ export const de_UpdateExtensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Actions != null) { - contents.Actions = de_ActionsMap(data.Actions, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Parameters != null) { - contents.Parameters = de_ParameterMap(data.Parameters, context); - } - if (data.VersionNumber != null) { - contents.VersionNumber = __expectInt32(data.VersionNumber); - } + const doc = take(data, { + Actions: _json, + Arn: __expectString, + Description: __expectString, + Id: __expectString, + Name: __expectString, + Parameters: _json, + VersionNumber: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -4418,10 +4102,9 @@ const de_UpdateExtensionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4441,24 +4124,15 @@ export const de_UpdateExtensionAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ExtensionArn != null) { - contents.ExtensionArn = __expectString(data.ExtensionArn); - } - if (data.ExtensionVersionNumber != null) { - contents.ExtensionVersionNumber = __expectInt32(data.ExtensionVersionNumber); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Parameters != null) { - contents.Parameters = de_ParameterValueMap(data.Parameters, context); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } + const doc = take(data, { + Arn: __expectString, + ExtensionArn: __expectString, + ExtensionVersionNumber: __expectInt32, + Id: __expectString, + Parameters: _json, + ResourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4486,10 +4160,9 @@ const de_UpdateExtensionAssociationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4536,31 +4209,27 @@ const de_ValidateConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Details != null) { - contents.Details = de_BadRequestDetails(__expectUnion(data.Details), context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Details: (_) => _json(__expectUnion(_)), + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4574,9 +4243,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4593,9 +4263,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4612,18 +4283,13 @@ const de_PayloadTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Limit != null) { - contents.Limit = __limitedParseFloat32(data.Limit); - } - if (data.Measure != null) { - contents.Measure = __expectString(data.Measure); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Size != null) { - contents.Size = __limitedParseFloat32(data.Size); - } + const doc = take(data, { + Limit: __limitedParseFloat32, + Measure: __expectString, + Message: __expectString, + Size: __limitedParseFloat32, + }); + Object.assign(contents, doc); const exception = new PayloadTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4640,12 +4306,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4662,9 +4327,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4672,310 +4338,63 @@ const de_ServiceQuotaExceededExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Action - */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; +// se_Action omitted. -/** - * serializeAws_restJson1ActionList - */ -const se_ActionList = (input: Action[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Action(entry, context); - }); -}; +// se_ActionList omitted. -/** - * serializeAws_restJson1ActionsMap - */ -const se_ActionsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [ActionPoint | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ActionList(value, context); - return acc; - }, {}); -}; +// se_ActionsMap omitted. -/** - * serializeAws_restJson1Monitor - */ -const se_Monitor = (input: Monitor, context: __SerdeContext): any => { - return { - ...(input.AlarmArn != null && { AlarmArn: input.AlarmArn }), - ...(input.AlarmRoleArn != null && { AlarmRoleArn: input.AlarmRoleArn }), - }; -}; +// se_Monitor omitted. -/** - * serializeAws_restJson1MonitorList - */ -const se_MonitorList = (input: Monitor[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Monitor(entry, context); - }); -}; +// se_MonitorList omitted. -/** - * serializeAws_restJson1Parameter - */ -const se_Parameter = (input: Parameter, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Required != null && { Required: input.Required }), - }; -}; +// se_Parameter omitted. -/** - * serializeAws_restJson1ParameterMap - */ -const se_ParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Parameter(value, context); - return acc; - }, {}); -}; +// se_ParameterMap omitted. -/** - * serializeAws_restJson1ParameterValueMap - */ -const se_ParameterValueMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ParameterValueMap omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1Validator - */ -const se_Validator = (input: Validator, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Validator omitted. -/** - * serializeAws_restJson1ValidatorList - */ -const se_ValidatorList = (input: Validator[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Validator(entry, context); - }); -}; +// se_ValidatorList omitted. -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - Uri: __expectString(output.Uri), - } as any; -}; +// de_Action omitted. -/** - * deserializeAws_restJson1ActionInvocation - */ -const de_ActionInvocation = (output: any, context: __SerdeContext): ActionInvocation => { - return { - ActionName: __expectString(output.ActionName), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ExtensionIdentifier: __expectString(output.ExtensionIdentifier), - InvocationId: __expectString(output.InvocationId), - RoleArn: __expectString(output.RoleArn), - Uri: __expectString(output.Uri), - } as any; -}; +// de_ActionInvocation omitted. -/** - * deserializeAws_restJson1ActionInvocations - */ -const de_ActionInvocations = (output: any, context: __SerdeContext): ActionInvocation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionInvocation(entry, context); - }); - return retVal; -}; +// de_ActionInvocations omitted. -/** - * deserializeAws_restJson1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): Action[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Action(entry, context); - }); - return retVal; -}; +// de_ActionList omitted. -/** - * deserializeAws_restJson1ActionsMap - */ -const de_ActionsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [ActionPoint | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ActionList(value, context); - return acc; - }, {}); -}; +// de_ActionsMap omitted. -/** - * deserializeAws_restJson1Application - */ -const de_Application = (output: any, context: __SerdeContext): Application => { - return { - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_Application omitted. -/** - * deserializeAws_restJson1ApplicationList - */ -const de_ApplicationList = (output: any, context: __SerdeContext): Application[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Application(entry, context); - }); - return retVal; -}; +// de_ApplicationList omitted. -/** - * deserializeAws_restJson1AppliedExtension - */ -const de_AppliedExtension = (output: any, context: __SerdeContext): AppliedExtension => { - return { - ExtensionAssociationId: __expectString(output.ExtensionAssociationId), - ExtensionId: __expectString(output.ExtensionId), - Parameters: output.Parameters != null ? de_ParameterValueMap(output.Parameters, context) : undefined, - VersionNumber: __expectInt32(output.VersionNumber), - } as any; -}; +// de_AppliedExtension omitted. -/** - * deserializeAws_restJson1AppliedExtensions - */ -const de_AppliedExtensions = (output: any, context: __SerdeContext): AppliedExtension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppliedExtension(entry, context); - }); - return retVal; -}; +// de_AppliedExtensions omitted. -/** - * deserializeAws_restJson1BadRequestDetails - */ -const de_BadRequestDetails = (output: any, context: __SerdeContext): BadRequestDetails => { - if (output.InvalidConfiguration != null) { - return { - InvalidConfiguration: de_InvalidConfigurationDetailList(output.InvalidConfiguration, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_BadRequestDetails omitted. -/** - * deserializeAws_restJson1ConfigurationProfileSummary - */ -const de_ConfigurationProfileSummary = (output: any, context: __SerdeContext): ConfigurationProfileSummary => { - return { - ApplicationId: __expectString(output.ApplicationId), - Id: __expectString(output.Id), - LocationUri: __expectString(output.LocationUri), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - ValidatorTypes: output.ValidatorTypes != null ? de_ValidatorTypeList(output.ValidatorTypes, context) : undefined, - } as any; -}; +// de_ConfigurationProfileSummary omitted. -/** - * deserializeAws_restJson1ConfigurationProfileSummaryList - */ -const de_ConfigurationProfileSummaryList = (output: any, context: __SerdeContext): ConfigurationProfileSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigurationProfileSummary(entry, context); - }); - return retVal; -}; +// de_ConfigurationProfileSummaryList omitted. /** * deserializeAws_restJson1DeploymentEvent */ const de_DeploymentEvent = (output: any, context: __SerdeContext): DeploymentEvent => { - return { - ActionInvocations: - output.ActionInvocations != null ? de_ActionInvocations(output.ActionInvocations, context) : undefined, - Description: __expectString(output.Description), - EventType: __expectString(output.EventType), - OccurredAt: - output.OccurredAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.OccurredAt)) : undefined, - TriggeredBy: __expectString(output.TriggeredBy), - } as any; + return take(output, { + ActionInvocations: _json, + Description: __expectString, + EventType: __expectString, + OccurredAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + TriggeredBy: __expectString, + }) as any; }; /** @@ -4985,9 +4404,6 @@ const de_DeploymentEvents = (output: any, context: __SerdeContext): DeploymentEv const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeploymentEvent(entry, context); }); return retVal; @@ -5000,9 +4416,6 @@ const de_DeploymentList = (output: any, context: __SerdeContext): DeploymentSumm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeploymentSummary(entry, context); }); return retVal; @@ -5012,16 +4425,16 @@ const de_DeploymentList = (output: any, context: __SerdeContext): DeploymentSumm * deserializeAws_restJson1DeploymentStrategy */ const de_DeploymentStrategy = (output: any, context: __SerdeContext): DeploymentStrategy => { - return { - DeploymentDurationInMinutes: __expectInt32(output.DeploymentDurationInMinutes), - Description: __expectString(output.Description), - FinalBakeTimeInMinutes: __expectInt32(output.FinalBakeTimeInMinutes), - GrowthFactor: __limitedParseFloat32(output.GrowthFactor), - GrowthType: __expectString(output.GrowthType), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ReplicateTo: __expectString(output.ReplicateTo), - } as any; + return take(output, { + DeploymentDurationInMinutes: __expectInt32, + Description: __expectString, + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + Id: __expectString, + Name: __expectString, + ReplicateTo: __expectString, + }) as any; }; /** @@ -5031,9 +4444,6 @@ const de_DeploymentStrategyList = (output: any, context: __SerdeContext): Deploy const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeploymentStrategy(entry, context); }); return retVal; @@ -5043,282 +4453,58 @@ const de_DeploymentStrategyList = (output: any, context: __SerdeContext): Deploy * deserializeAws_restJson1DeploymentSummary */ const de_DeploymentSummary = (output: any, context: __SerdeContext): DeploymentSummary => { - return { - CompletedAt: - output.CompletedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CompletedAt)) : undefined, - ConfigurationName: __expectString(output.ConfigurationName), - ConfigurationVersion: __expectString(output.ConfigurationVersion), - DeploymentDurationInMinutes: __expectInt32(output.DeploymentDurationInMinutes), - DeploymentNumber: __expectInt32(output.DeploymentNumber), - FinalBakeTimeInMinutes: __expectInt32(output.FinalBakeTimeInMinutes), - GrowthFactor: __limitedParseFloat32(output.GrowthFactor), - GrowthType: __expectString(output.GrowthType), - PercentageComplete: __limitedParseFloat32(output.PercentageComplete), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedAt)) : undefined, - State: __expectString(output.State), - } as any; + return take(output, { + CompletedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ConfigurationName: __expectString, + ConfigurationVersion: __expectString, + DeploymentDurationInMinutes: __expectInt32, + DeploymentNumber: __expectInt32, + FinalBakeTimeInMinutes: __expectInt32, + GrowthFactor: __limitedParseFloat32, + GrowthType: __expectString, + PercentageComplete: __limitedParseFloat32, + StartedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Environment - */ -const de_Environment = (output: any, context: __SerdeContext): Environment => { - return { - ApplicationId: __expectString(output.ApplicationId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Monitors: output.Monitors != null ? de_MonitorList(output.Monitors, context) : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; +// de_Environment omitted. -/** - * deserializeAws_restJson1EnvironmentList - */ -const de_EnvironmentList = (output: any, context: __SerdeContext): Environment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Environment(entry, context); - }); - return retVal; -}; +// de_EnvironmentList omitted. -/** - * deserializeAws_restJson1ExtensionAssociationSummaries - */ -const de_ExtensionAssociationSummaries = (output: any, context: __SerdeContext): ExtensionAssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtensionAssociationSummary(entry, context); - }); - return retVal; -}; +// de_ExtensionAssociationSummaries omitted. -/** - * deserializeAws_restJson1ExtensionAssociationSummary - */ -const de_ExtensionAssociationSummary = (output: any, context: __SerdeContext): ExtensionAssociationSummary => { - return { - ExtensionArn: __expectString(output.ExtensionArn), - Id: __expectString(output.Id), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_ExtensionAssociationSummary omitted. -/** - * deserializeAws_restJson1ExtensionSummaries - */ -const de_ExtensionSummaries = (output: any, context: __SerdeContext): ExtensionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtensionSummary(entry, context); - }); - return retVal; -}; +// de_ExtensionSummaries omitted. -/** - * deserializeAws_restJson1ExtensionSummary - */ -const de_ExtensionSummary = (output: any, context: __SerdeContext): ExtensionSummary => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - VersionNumber: __expectInt32(output.VersionNumber), - } as any; -}; +// de_ExtensionSummary omitted. -/** - * deserializeAws_restJson1HostedConfigurationVersionSummary - */ -const de_HostedConfigurationVersionSummary = ( - output: any, - context: __SerdeContext -): HostedConfigurationVersionSummary => { - return { - ApplicationId: __expectString(output.ApplicationId), - ConfigurationProfileId: __expectString(output.ConfigurationProfileId), - ContentType: __expectString(output.ContentType), - Description: __expectString(output.Description), - VersionLabel: __expectString(output.VersionLabel), - VersionNumber: __expectInt32(output.VersionNumber), - } as any; -}; +// de_HostedConfigurationVersionSummary omitted. -/** - * deserializeAws_restJson1HostedConfigurationVersionSummaryList - */ -const de_HostedConfigurationVersionSummaryList = ( - output: any, - context: __SerdeContext -): HostedConfigurationVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HostedConfigurationVersionSummary(entry, context); - }); - return retVal; -}; +// de_HostedConfigurationVersionSummaryList omitted. -/** - * deserializeAws_restJson1InvalidConfigurationDetail - */ -const de_InvalidConfigurationDetail = (output: any, context: __SerdeContext): InvalidConfigurationDetail => { - return { - Constraint: __expectString(output.Constraint), - Location: __expectString(output.Location), - Reason: __expectString(output.Reason), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_InvalidConfigurationDetail omitted. -/** - * deserializeAws_restJson1InvalidConfigurationDetailList - */ -const de_InvalidConfigurationDetailList = (output: any, context: __SerdeContext): InvalidConfigurationDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InvalidConfigurationDetail(entry, context); - }); - return retVal; -}; +// de_InvalidConfigurationDetailList omitted. -/** - * deserializeAws_restJson1Monitor - */ -const de_Monitor = (output: any, context: __SerdeContext): Monitor => { - return { - AlarmArn: __expectString(output.AlarmArn), - AlarmRoleArn: __expectString(output.AlarmRoleArn), - } as any; -}; +// de_Monitor omitted. -/** - * deserializeAws_restJson1MonitorList - */ -const de_MonitorList = (output: any, context: __SerdeContext): Monitor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Monitor(entry, context); - }); - return retVal; -}; +// de_MonitorList omitted. -/** - * deserializeAws_restJson1Parameter - */ -const de_Parameter = (output: any, context: __SerdeContext): Parameter => { - return { - Description: __expectString(output.Description), - Required: __expectBoolean(output.Required), - } as any; -}; +// de_Parameter omitted. -/** - * deserializeAws_restJson1ParameterMap - */ -const de_ParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Parameter(value, context); - return acc; - }, {}); -}; +// de_ParameterMap omitted. -/** - * deserializeAws_restJson1ParameterValueMap - */ -const de_ParameterValueMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ParameterValueMap omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Validator - */ -const de_Validator = (output: any, context: __SerdeContext): Validator => { - return { - Content: __expectString(output.Content), - Type: __expectString(output.Type), - } as any; -}; +// de_Validator omitted. -/** - * deserializeAws_restJson1ValidatorList - */ -const de_ValidatorList = (output: any, context: __SerdeContext): Validator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Validator(entry, context); - }); - return retVal; -}; +// de_ValidatorList omitted. -/** - * deserializeAws_restJson1ValidatorTypeList - */ -const de_ValidatorTypeList = (output: any, context: __SerdeContext): (ValidatorType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ValidatorTypeList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts b/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts index 70feda07595f..89508ad94115 100644 --- a/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts +++ b/clients/client-appconfigdata/src/protocols/Aws_restJson1.ts @@ -1,15 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -27,10 +29,8 @@ import { } from "../commands/StartConfigurationSessionCommand"; import { AppConfigDataServiceException as __BaseException } from "../models/AppConfigDataServiceException"; import { - BadRequestDetails, BadRequestException, InternalServerException, - InvalidParameterDetail, ResourceNotFoundException, ThrottlingException, } from "../models/models_0"; @@ -74,16 +74,14 @@ export const se_StartConfigurationSessionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configurationsessions"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationIdentifier != null && { ApplicationIdentifier: input.ApplicationIdentifier }), - ...(input.ConfigurationProfileIdentifier != null && { - ConfigurationProfileIdentifier: input.ConfigurationProfileIdentifier, - }), - ...(input.EnvironmentIdentifier != null && { EnvironmentIdentifier: input.EnvironmentIdentifier }), - ...(input.RequiredMinimumPollIntervalInSeconds != null && { - RequiredMinimumPollIntervalInSeconds: input.RequiredMinimumPollIntervalInSeconds, - }), - }); + body = JSON.stringify( + take(input, { + ApplicationIdentifier: [], + ConfigurationProfileIdentifier: [], + EnvironmentIdentifier: [], + RequiredMinimumPollIntervalInSeconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -147,10 +145,9 @@ const de_GetLatestConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -170,9 +167,10 @@ export const de_StartConfigurationSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InitialConfigurationToken != null) { - contents.InitialConfigurationToken = __expectString(data.InitialConfigurationToken); - } + const doc = take(data, { + InitialConfigurationToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -203,31 +201,27 @@ const de_StartConfigurationSessionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Details != null) { - contents.Details = de_BadRequestDetails(__expectUnion(data.Details), context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Details: (_) => _json(__expectUnion(_)), + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -244,9 +238,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -263,15 +258,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ReferencedBy != null) { - contents.ReferencedBy = de_StringMap(data.ReferencedBy, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ReferencedBy: _json, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -285,9 +277,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -295,52 +288,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1BadRequestDetails - */ -const de_BadRequestDetails = (output: any, context: __SerdeContext): BadRequestDetails => { - if (output.InvalidParameters != null) { - return { - InvalidParameters: de_InvalidParameterMap(output.InvalidParameters, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_BadRequestDetails omitted. -/** - * deserializeAws_restJson1InvalidParameterDetail - */ -const de_InvalidParameterDetail = (output: any, context: __SerdeContext): InvalidParameterDetail => { - return { - Problem: __expectString(output.Problem), - } as any; -}; +// de_InvalidParameterDetail omitted. -/** - * deserializeAws_restJson1InvalidParameterMap - */ -const de_InvalidParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_InvalidParameterDetail(value, context); - return acc; - }, {}); -}; +// de_InvalidParameterMap omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-appflow/src/protocols/Aws_restJson1.ts b/clients/client-appflow/src/protocols/Aws_restJson1.ts index 0d8c354a4ed2..a82522896362 100644 --- a/clients/client-appflow/src/protocols/Aws_restJson1.ts +++ b/clients/client-appflow/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,10 +12,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -81,19 +83,14 @@ import { AggregationConfig, AmplitudeConnectorProfileCredentials, AmplitudeConnectorProfileProperties, - AmplitudeMetadata, AmplitudeSourceProperties, ApiKeyCredentials, - AuthenticationConfig, - AuthParameter, BasicAuthCredentials, ConflictException, ConnectorAuthenticationException, ConnectorConfiguration, ConnectorDetail, - ConnectorEntity, ConnectorEntityField, - ConnectorMetadata, ConnectorOAuthRequest, ConnectorOperator, ConnectorProfile, @@ -101,50 +98,38 @@ import { ConnectorProfileCredentials, ConnectorProfileProperties, ConnectorProvisioningConfig, - ConnectorRuntimeSetting, ConnectorServerException, ConnectorType, - CustomAuthConfig, CustomAuthCredentials, CustomConnectorDestinationProperties, CustomConnectorProfileCredentials, CustomConnectorProfileProperties, CustomConnectorSourceProperties, CustomerProfilesDestinationProperties, - CustomerProfilesMetadata, DatadogConnectorProfileCredentials, DatadogConnectorProfileProperties, - DatadogMetadata, DatadogSourceProperties, DestinationConnectorProperties, - DestinationFieldProperties, DestinationFlowConfig, DynatraceConnectorProfileCredentials, DynatraceConnectorProfileProperties, - DynatraceMetadata, DynatraceSourceProperties, ErrorHandlingConfig, - ErrorInfo, EventBridgeDestinationProperties, - EventBridgeMetadata, ExecutionDetails, ExecutionRecord, - ExecutionResult, FieldTypeDetails, FlowDefinition, GlueDataCatalogConfig, GoogleAnalyticsConnectorProfileCredentials, GoogleAnalyticsConnectorProfileProperties, - GoogleAnalyticsMetadata, GoogleAnalyticsSourceProperties, HoneycodeConnectorProfileCredentials, HoneycodeConnectorProfileProperties, HoneycodeDestinationProperties, - HoneycodeMetadata, IncrementalPullConfig, InforNexusConnectorProfileCredentials, InforNexusConnectorProfileProperties, - InforNexusMetadata, InforNexusSourceProperties, InternalServerException, LambdaConnectorProvisioningConfig, @@ -152,71 +137,49 @@ import { MarketoConnectorProfileCredentials, MarketoConnectorProfileProperties, MarketoDestinationProperties, - MarketoMetadata, MarketoSourceProperties, MetadataCatalogConfig, - MetadataCatalogDetail, OAuth2Credentials, - OAuth2CustomParameter, - OAuth2Defaults, - OAuth2GrantType, OAuth2Properties, OAuthCredentials, OAuthProperties, - Operator, - OperatorPropertiesKeys, - Operators, PardotConnectorProfileCredentials, PardotConnectorProfileProperties, - PardotMetadata, PardotSourceProperties, PathPrefix, PrefixConfig, - PrivateConnectionProvisioningState, Range, RedshiftConnectorProfileCredentials, RedshiftConnectorProfileProperties, RedshiftDestinationProperties, - RedshiftMetadata, - RegistrationOutput, ResourceNotFoundException, S3DestinationProperties, S3InputFormatConfig, - S3Metadata, S3OutputFormatConfig, S3SourceProperties, SalesforceConnectorProfileCredentials, SalesforceConnectorProfileProperties, - SalesforceDataTransferApi, SalesforceDestinationProperties, - SalesforceMetadata, SalesforceSourceProperties, SAPODataConnectorProfileCredentials, SAPODataConnectorProfileProperties, SAPODataDestinationProperties, - SAPODataMetadata, SAPODataSourceProperties, ScheduledTriggerProperties, - ScheduleFrequencyType, ServiceNowConnectorProfileCredentials, ServiceNowConnectorProfileProperties, - ServiceNowMetadata, ServiceNowSourceProperties, ServiceQuotaExceededException, SingularConnectorProfileCredentials, SingularConnectorProfileProperties, - SingularMetadata, SingularSourceProperties, SlackConnectorProfileCredentials, SlackConnectorProfileProperties, - SlackMetadata, SlackSourceProperties, SnowflakeConnectorProfileCredentials, SnowflakeConnectorProfileProperties, SnowflakeDestinationProperties, - SnowflakeMetadata, SourceConnectorProperties, - SourceFieldProperties, SourceFlowConfig, SuccessResponseHandlingConfig, SupportedFieldTypeDetails, @@ -224,25 +187,19 @@ import { ThrottlingException, TrendmicroConnectorProfileCredentials, TrendmicroConnectorProfileProperties, - TrendmicroMetadata, TrendmicroSourceProperties, TriggerConfig, TriggerProperties, - TriggerType, UnsupportedOperationException, UpsolverDestinationProperties, - UpsolverMetadata, UpsolverS3OutputFormatConfig, ValidationException, VeevaConnectorProfileCredentials, VeevaConnectorProfileProperties, - VeevaMetadata, VeevaSourceProperties, - WriteOperationType, ZendeskConnectorProfileCredentials, ZendeskConnectorProfileProperties, ZendeskDestinationProperties, - ZendeskMetadata, ZendeskSourceProperties, } from "../models/models_0"; @@ -260,16 +217,16 @@ export const se_CreateConnectorProfileCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-connector-profile"; let body: any; - body = JSON.stringify({ - ...(input.connectionMode != null && { connectionMode: input.connectionMode }), - ...(input.connectorLabel != null && { connectorLabel: input.connectorLabel }), - ...(input.connectorProfileConfig != null && { - connectorProfileConfig: se_ConnectorProfileConfig(input.connectorProfileConfig, context), - }), - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - ...(input.kmsArn != null && { kmsArn: input.kmsArn }), - }); + body = JSON.stringify( + take(input, { + connectionMode: [], + connectorLabel: [], + connectorProfileConfig: (_) => _json(_), + connectorProfileName: [], + connectorType: [], + kmsArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -294,21 +251,19 @@ export const se_CreateFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-flow"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.destinationFlowConfigList != null && { - destinationFlowConfigList: se_DestinationFlowConfigList(input.destinationFlowConfigList, context), - }), - ...(input.flowName != null && { flowName: input.flowName }), - ...(input.kmsArn != null && { kmsArn: input.kmsArn }), - ...(input.metadataCatalogConfig != null && { - metadataCatalogConfig: se_MetadataCatalogConfig(input.metadataCatalogConfig, context), - }), - ...(input.sourceFlowConfig != null && { sourceFlowConfig: se_SourceFlowConfig(input.sourceFlowConfig, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.tasks != null && { tasks: se_Tasks(input.tasks, context) }), - ...(input.triggerConfig != null && { triggerConfig: se_TriggerConfig(input.triggerConfig, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + destinationFlowConfigList: (_) => _json(_), + flowName: [], + kmsArn: [], + metadataCatalogConfig: (_) => _json(_), + sourceFlowConfig: (_) => _json(_), + tags: (_) => _json(_), + tasks: (_) => _json(_), + triggerConfig: (_) => se_TriggerConfig(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -334,10 +289,12 @@ export const se_DeleteConnectorProfileCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-connector-profile"; let body: any; - body = JSON.stringify({ - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - ...(input.forceDelete != null && { forceDelete: input.forceDelete }), - }); + body = JSON.stringify( + take(input, { + connectorProfileName: [], + forceDelete: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -362,10 +319,12 @@ export const se_DeleteFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-flow"; let body: any; - body = JSON.stringify({ - ...(input.flowName != null && { flowName: input.flowName }), - ...(input.forceDelete != null && { forceDelete: input.forceDelete }), - }); + body = JSON.stringify( + take(input, { + flowName: [], + forceDelete: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -390,10 +349,12 @@ export const se_DescribeConnectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-connector"; let body: any; - body = JSON.stringify({ - ...(input.connectorLabel != null && { connectorLabel: input.connectorLabel }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - }); + body = JSON.stringify( + take(input, { + connectorLabel: [], + connectorType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -419,12 +380,14 @@ export const se_DescribeConnectorEntityCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-connector-entity"; let body: any; - body = JSON.stringify({ - ...(input.apiVersion != null && { apiVersion: input.apiVersion }), - ...(input.connectorEntityName != null && { connectorEntityName: input.connectorEntityName }), - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - }); + body = JSON.stringify( + take(input, { + apiVersion: [], + connectorEntityName: [], + connectorProfileName: [], + connectorType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -450,15 +413,15 @@ export const se_DescribeConnectorProfilesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-connector-profiles"; let body: any; - body = JSON.stringify({ - ...(input.connectorLabel != null && { connectorLabel: input.connectorLabel }), - ...(input.connectorProfileNames != null && { - connectorProfileNames: se_ConnectorProfileNameList(input.connectorProfileNames, context), - }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + connectorLabel: [], + connectorProfileNames: (_) => _json(_), + connectorType: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -483,11 +446,13 @@ export const se_DescribeConnectorsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-connectors"; let body: any; - body = JSON.stringify({ - ...(input.connectorTypes != null && { connectorTypes: se_ConnectorTypeList(input.connectorTypes, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + connectorTypes: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -512,9 +477,11 @@ export const se_DescribeFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-flow"; let body: any; - body = JSON.stringify({ - ...(input.flowName != null && { flowName: input.flowName }), - }); + body = JSON.stringify( + take(input, { + flowName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -540,11 +507,13 @@ export const se_DescribeFlowExecutionRecordsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-flow-execution-records"; let body: any; - body = JSON.stringify({ - ...(input.flowName != null && { flowName: input.flowName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + flowName: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -570,14 +539,16 @@ export const se_ListConnectorEntitiesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-connector-entities"; let body: any; - body = JSON.stringify({ - ...(input.apiVersion != null && { apiVersion: input.apiVersion }), - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - ...(input.entitiesPath != null && { entitiesPath: input.entitiesPath }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + apiVersion: [], + connectorProfileName: [], + connectorType: [], + entitiesPath: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -602,10 +573,12 @@ export const se_ListConnectorsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-connectors"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -630,10 +603,12 @@ export const se_ListFlowsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-flows"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -681,14 +656,14 @@ export const se_RegisterConnectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/register-connector"; let body: any; - body = JSON.stringify({ - ...(input.connectorLabel != null && { connectorLabel: input.connectorLabel }), - ...(input.connectorProvisioningConfig != null && { - connectorProvisioningConfig: se_ConnectorProvisioningConfig(input.connectorProvisioningConfig, context), - }), - ...(input.connectorProvisioningType != null && { connectorProvisioningType: input.connectorProvisioningType }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + connectorLabel: [], + connectorProvisioningConfig: (_) => _json(_), + connectorProvisioningType: [], + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -713,9 +688,11 @@ export const se_StartFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-flow"; let body: any; - body = JSON.stringify({ - ...(input.flowName != null && { flowName: input.flowName }), - }); + body = JSON.stringify( + take(input, { + flowName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -740,9 +717,11 @@ export const se_StopFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stop-flow"; let body: any; - body = JSON.stringify({ - ...(input.flowName != null && { flowName: input.flowName }), - }); + body = JSON.stringify( + take(input, { + flowName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -768,9 +747,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -795,10 +776,12 @@ export const se_UnregisterConnectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/unregister-connector"; let body: any; - body = JSON.stringify({ - ...(input.connectorLabel != null && { connectorLabel: input.connectorLabel }), - ...(input.forceDelete != null && { forceDelete: input.forceDelete }), - }); + body = JSON.stringify( + take(input, { + connectorLabel: [], + forceDelete: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -854,13 +837,13 @@ export const se_UpdateConnectorProfileCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-connector-profile"; let body: any; - body = JSON.stringify({ - ...(input.connectionMode != null && { connectionMode: input.connectionMode }), - ...(input.connectorProfileConfig != null && { - connectorProfileConfig: se_ConnectorProfileConfig(input.connectorProfileConfig, context), - }), - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - }); + body = JSON.stringify( + take(input, { + connectionMode: [], + connectorProfileConfig: (_) => _json(_), + connectorProfileName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -886,13 +869,13 @@ export const se_UpdateConnectorRegistrationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-connector-registration"; let body: any; - body = JSON.stringify({ - ...(input.connectorLabel != null && { connectorLabel: input.connectorLabel }), - ...(input.connectorProvisioningConfig != null && { - connectorProvisioningConfig: se_ConnectorProvisioningConfig(input.connectorProvisioningConfig, context), - }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + connectorLabel: [], + connectorProvisioningConfig: (_) => _json(_), + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -917,19 +900,17 @@ export const se_UpdateFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-flow"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.destinationFlowConfigList != null && { - destinationFlowConfigList: se_DestinationFlowConfigList(input.destinationFlowConfigList, context), - }), - ...(input.flowName != null && { flowName: input.flowName }), - ...(input.metadataCatalogConfig != null && { - metadataCatalogConfig: se_MetadataCatalogConfig(input.metadataCatalogConfig, context), - }), - ...(input.sourceFlowConfig != null && { sourceFlowConfig: se_SourceFlowConfig(input.sourceFlowConfig, context) }), - ...(input.tasks != null && { tasks: se_Tasks(input.tasks, context) }), - ...(input.triggerConfig != null && { triggerConfig: se_TriggerConfig(input.triggerConfig, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + destinationFlowConfigList: (_) => _json(_), + flowName: [], + metadataCatalogConfig: (_) => _json(_), + sourceFlowConfig: (_) => _json(_), + tasks: (_) => _json(_), + triggerConfig: (_) => se_TriggerConfig(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -955,9 +936,10 @@ export const de_CreateConnectorProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorProfileArn != null) { - contents.connectorProfileArn = __expectString(data.connectorProfileArn); - } + const doc = take(data, { + connectorProfileArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -991,10 +973,9 @@ const de_CreateConnectorProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1014,12 +995,11 @@ export const de_CreateFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.flowArn = __expectString(data.flowArn); - } - if (data.flowStatus != null) { - contents.flowStatus = __expectString(data.flowStatus); - } + const doc = take(data, { + flowArn: __expectString, + flowStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1059,10 +1039,9 @@ const de_CreateFlowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1109,10 +1088,9 @@ const de_DeleteConnectorProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1159,10 +1137,9 @@ const de_DeleteFlowCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1182,9 +1159,10 @@ export const de_DescribeConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorConfiguration != null) { - contents.connectorConfiguration = de_ConnectorConfiguration(data.connectorConfiguration, context); - } + const doc = take(data, { + connectorConfiguration: (_) => de_ConnectorConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1212,10 +1190,9 @@ const de_DescribeConnectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1235,9 +1212,10 @@ export const de_DescribeConnectorEntityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorEntityFields != null) { - contents.connectorEntityFields = de_ConnectorEntityFieldList(data.connectorEntityFields, context); - } + const doc = take(data, { + connectorEntityFields: (_) => de_ConnectorEntityFieldList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1271,10 +1249,9 @@ const de_DescribeConnectorEntityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1294,12 +1271,11 @@ export const de_DescribeConnectorProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorProfileDetails != null) { - contents.connectorProfileDetails = de_ConnectorProfileDetailList(data.connectorProfileDetails, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + connectorProfileDetails: (_) => de_ConnectorProfileDetailList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1324,10 +1300,9 @@ const de_DescribeConnectorProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1347,15 +1322,12 @@ export const de_DescribeConnectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorConfigurations != null) { - contents.connectorConfigurations = de_ConnectorConfigurationsMap(data.connectorConfigurations, context); - } - if (data.connectors != null) { - contents.connectors = de_ConnectorList(data.connectors, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + connectorConfigurations: (_) => de_ConnectorConfigurationsMap(_, context), + connectors: (_) => de_ConnectorList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1380,10 +1352,9 @@ const de_DescribeConnectorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1403,63 +1374,28 @@ export const de_DescribeFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.destinationFlowConfigList != null) { - contents.destinationFlowConfigList = de_DestinationFlowConfigList(data.destinationFlowConfigList, context); - } - if (data.flowArn != null) { - contents.flowArn = __expectString(data.flowArn); - } - if (data.flowName != null) { - contents.flowName = __expectString(data.flowName); - } - if (data.flowStatus != null) { - contents.flowStatus = __expectString(data.flowStatus); - } - if (data.flowStatusMessage != null) { - contents.flowStatusMessage = __expectString(data.flowStatusMessage); - } - if (data.kmsArn != null) { - contents.kmsArn = __expectString(data.kmsArn); - } - if (data.lastRunExecutionDetails != null) { - contents.lastRunExecutionDetails = de_ExecutionDetails(data.lastRunExecutionDetails, context); - } - if (data.lastRunMetadataCatalogDetails != null) { - contents.lastRunMetadataCatalogDetails = de_MetadataCatalogDetails(data.lastRunMetadataCatalogDetails, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.lastUpdatedBy != null) { - contents.lastUpdatedBy = __expectString(data.lastUpdatedBy); - } - if (data.metadataCatalogConfig != null) { - contents.metadataCatalogConfig = de_MetadataCatalogConfig(data.metadataCatalogConfig, context); - } - if (data.schemaVersion != null) { - contents.schemaVersion = __expectLong(data.schemaVersion); - } - if (data.sourceFlowConfig != null) { - contents.sourceFlowConfig = de_SourceFlowConfig(data.sourceFlowConfig, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.tasks != null) { - contents.tasks = de_Tasks(data.tasks, context); - } - if (data.triggerConfig != null) { - contents.triggerConfig = de_TriggerConfig(data.triggerConfig, context); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + description: __expectString, + destinationFlowConfigList: _json, + flowArn: __expectString, + flowName: __expectString, + flowStatus: __expectString, + flowStatusMessage: __expectString, + kmsArn: __expectString, + lastRunExecutionDetails: (_) => de_ExecutionDetails(_, context), + lastRunMetadataCatalogDetails: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedBy: __expectString, + metadataCatalogConfig: _json, + schemaVersion: __expectLong, + sourceFlowConfig: _json, + tags: _json, + tasks: _json, + triggerConfig: (_) => de_TriggerConfig(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1484,10 +1420,9 @@ const de_DescribeFlowCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,12 +1442,11 @@ export const de_DescribeFlowExecutionRecordsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowExecutions != null) { - contents.flowExecutions = de_FlowExecutionList(data.flowExecutions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + flowExecutions: (_) => de_FlowExecutionList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1540,10 +1474,9 @@ const de_DescribeFlowExecutionRecordsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1563,12 +1496,11 @@ export const de_ListConnectorEntitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorEntityMap != null) { - contents.connectorEntityMap = de_ConnectorEntityMap(data.connectorEntityMap, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + connectorEntityMap: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1602,10 +1534,9 @@ const de_ListConnectorEntitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1625,12 +1556,11 @@ export const de_ListConnectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectors != null) { - contents.connectors = de_ConnectorList(data.connectors, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + connectors: (_) => de_ConnectorList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1655,10 +1585,9 @@ const de_ListConnectorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1678,12 +1607,11 @@ export const de_ListFlowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flows != null) { - contents.flows = de_FlowList(data.flows, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + flows: (_) => de_FlowList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1708,10 +1636,9 @@ const de_ListFlowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1731,9 +1658,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1761,10 +1689,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,9 +1711,10 @@ export const de_RegisterConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorArn != null) { - contents.connectorArn = __expectString(data.connectorArn); - } + const doc = take(data, { + connectorArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1832,10 +1760,9 @@ const de_RegisterConnectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1855,15 +1782,12 @@ export const de_StartFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executionId != null) { - contents.executionId = __expectString(data.executionId); - } - if (data.flowArn != null) { - contents.flowArn = __expectString(data.flowArn); - } - if (data.flowStatus != null) { - contents.flowStatus = __expectString(data.flowStatus); - } + const doc = take(data, { + executionId: __expectString, + flowArn: __expectString, + flowStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1894,10 +1818,9 @@ const de_StartFlowCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1917,12 +1840,11 @@ export const de_StopFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.flowArn = __expectString(data.flowArn); - } - if (data.flowStatus != null) { - contents.flowStatus = __expectString(data.flowStatus); - } + const doc = take(data, { + flowArn: __expectString, + flowStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1953,10 +1875,9 @@ const de_StopFlowCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2003,10 +1924,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2053,10 +1973,9 @@ const de_UnregisterConnectorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2103,10 +2022,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2126,9 +2044,10 @@ export const de_UpdateConnectorProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorProfileArn != null) { - contents.connectorProfileArn = __expectString(data.connectorProfileArn); - } + const doc = take(data, { + connectorProfileArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2162,10 +2081,9 @@ const de_UpdateConnectorProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2185,9 +2103,10 @@ export const de_UpdateConnectorRegistrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorArn != null) { - contents.connectorArn = __expectString(data.connectorArn); - } + const doc = take(data, { + connectorArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2233,10 +2152,9 @@ const de_UpdateConnectorRegistrationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2256,9 +2174,10 @@ export const de_UpdateFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowStatus != null) { - contents.flowStatus = __expectString(data.flowStatus); - } + const doc = take(data, { + flowStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2298,16 +2217,15 @@ const de_UpdateFlowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2317,9 +2235,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2333,9 +2252,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2352,9 +2272,10 @@ const de_ConnectorAuthenticationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConnectorAuthenticationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2371,9 +2292,10 @@ const de_ConnectorServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConnectorServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2390,9 +2312,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2409,9 +2332,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2428,9 +2352,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2444,9 +2369,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2463,9 +2389,10 @@ const de_UnsupportedOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2479,9 +2406,10 @@ const de_UnsupportedOperationExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2489,3667 +2417,832 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AggregationConfig - */ -const se_AggregationConfig = (input: AggregationConfig, context: __SerdeContext): any => { - return { - ...(input.aggregationType != null && { aggregationType: input.aggregationType }), - ...(input.targetFileSize != null && { targetFileSize: input.targetFileSize }), - }; -}; +// se_AggregationConfig omitted. -/** - * serializeAws_restJson1AmplitudeConnectorProfileCredentials - */ -const se_AmplitudeConnectorProfileCredentials = ( - input: AmplitudeConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.apiKey != null && { apiKey: input.apiKey }), - ...(input.secretKey != null && { secretKey: input.secretKey }), - }; -}; +// se_AmplitudeConnectorProfileCredentials omitted. -/** - * serializeAws_restJson1AmplitudeConnectorProfileProperties - */ -const se_AmplitudeConnectorProfileProperties = ( - input: AmplitudeConnectorProfileProperties, - context: __SerdeContext -): any => { - return {}; -}; +// se_AmplitudeConnectorProfileProperties omitted. -/** - * serializeAws_restJson1AmplitudeSourceProperties - */ -const se_AmplitudeSourceProperties = (input: AmplitudeSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; +// se_AmplitudeSourceProperties omitted. -/** - * serializeAws_restJson1ApiKeyCredentials - */ -const se_ApiKeyCredentials = (input: ApiKeyCredentials, context: __SerdeContext): any => { - return { - ...(input.apiKey != null && { apiKey: input.apiKey }), - ...(input.apiSecretKey != null && { apiSecretKey: input.apiSecretKey }), - }; -}; +// se_ApiKeyCredentials omitted. -/** - * serializeAws_restJson1BasicAuthCredentials - */ -const se_BasicAuthCredentials = (input: BasicAuthCredentials, context: __SerdeContext): any => { - return { - ...(input.password != null && { password: input.password }), - ...(input.username != null && { username: input.username }), - }; -}; +// se_BasicAuthCredentials omitted. -/** - * serializeAws_restJson1ConnectorOAuthRequest - */ -const se_ConnectorOAuthRequest = (input: ConnectorOAuthRequest, context: __SerdeContext): any => { - return { - ...(input.authCode != null && { authCode: input.authCode }), - ...(input.redirectUri != null && { redirectUri: input.redirectUri }), - }; -}; +// se_ConnectorOAuthRequest omitted. -/** - * serializeAws_restJson1ConnectorOperator - */ -const se_ConnectorOperator = (input: ConnectorOperator, context: __SerdeContext): any => { - return { - ...(input.Amplitude != null && { Amplitude: input.Amplitude }), - ...(input.CustomConnector != null && { CustomConnector: input.CustomConnector }), - ...(input.Datadog != null && { Datadog: input.Datadog }), - ...(input.Dynatrace != null && { Dynatrace: input.Dynatrace }), - ...(input.GoogleAnalytics != null && { GoogleAnalytics: input.GoogleAnalytics }), - ...(input.InforNexus != null && { InforNexus: input.InforNexus }), - ...(input.Marketo != null && { Marketo: input.Marketo }), - ...(input.Pardot != null && { Pardot: input.Pardot }), - ...(input.S3 != null && { S3: input.S3 }), - ...(input.SAPOData != null && { SAPOData: input.SAPOData }), - ...(input.Salesforce != null && { Salesforce: input.Salesforce }), - ...(input.ServiceNow != null && { ServiceNow: input.ServiceNow }), - ...(input.Singular != null && { Singular: input.Singular }), - ...(input.Slack != null && { Slack: input.Slack }), - ...(input.Trendmicro != null && { Trendmicro: input.Trendmicro }), - ...(input.Veeva != null && { Veeva: input.Veeva }), - ...(input.Zendesk != null && { Zendesk: input.Zendesk }), - }; -}; +// se_ConnectorOperator omitted. -/** - * serializeAws_restJson1ConnectorProfileConfig - */ -const se_ConnectorProfileConfig = (input: ConnectorProfileConfig, context: __SerdeContext): any => { - return { - ...(input.connectorProfileCredentials != null && { - connectorProfileCredentials: se_ConnectorProfileCredentials(input.connectorProfileCredentials, context), - }), - ...(input.connectorProfileProperties != null && { - connectorProfileProperties: se_ConnectorProfileProperties(input.connectorProfileProperties, context), - }), - }; -}; +// se_ConnectorProfileConfig omitted. -/** - * serializeAws_restJson1ConnectorProfileCredentials - */ -const se_ConnectorProfileCredentials = (input: ConnectorProfileCredentials, context: __SerdeContext): any => { - return { - ...(input.Amplitude != null && { Amplitude: se_AmplitudeConnectorProfileCredentials(input.Amplitude, context) }), - ...(input.CustomConnector != null && { - CustomConnector: se_CustomConnectorProfileCredentials(input.CustomConnector, context), - }), - ...(input.Datadog != null && { Datadog: se_DatadogConnectorProfileCredentials(input.Datadog, context) }), - ...(input.Dynatrace != null && { Dynatrace: se_DynatraceConnectorProfileCredentials(input.Dynatrace, context) }), - ...(input.GoogleAnalytics != null && { - GoogleAnalytics: se_GoogleAnalyticsConnectorProfileCredentials(input.GoogleAnalytics, context), - }), - ...(input.Honeycode != null && { Honeycode: se_HoneycodeConnectorProfileCredentials(input.Honeycode, context) }), - ...(input.InforNexus != null && { - InforNexus: se_InforNexusConnectorProfileCredentials(input.InforNexus, context), - }), - ...(input.Marketo != null && { Marketo: se_MarketoConnectorProfileCredentials(input.Marketo, context) }), - ...(input.Pardot != null && { Pardot: se_PardotConnectorProfileCredentials(input.Pardot, context) }), - ...(input.Redshift != null && { Redshift: se_RedshiftConnectorProfileCredentials(input.Redshift, context) }), - ...(input.SAPOData != null && { SAPOData: se_SAPODataConnectorProfileCredentials(input.SAPOData, context) }), - ...(input.Salesforce != null && { - Salesforce: se_SalesforceConnectorProfileCredentials(input.Salesforce, context), - }), - ...(input.ServiceNow != null && { - ServiceNow: se_ServiceNowConnectorProfileCredentials(input.ServiceNow, context), - }), - ...(input.Singular != null && { Singular: se_SingularConnectorProfileCredentials(input.Singular, context) }), - ...(input.Slack != null && { Slack: se_SlackConnectorProfileCredentials(input.Slack, context) }), - ...(input.Snowflake != null && { Snowflake: se_SnowflakeConnectorProfileCredentials(input.Snowflake, context) }), - ...(input.Trendmicro != null && { - Trendmicro: se_TrendmicroConnectorProfileCredentials(input.Trendmicro, context), - }), - ...(input.Veeva != null && { Veeva: se_VeevaConnectorProfileCredentials(input.Veeva, context) }), - ...(input.Zendesk != null && { Zendesk: se_ZendeskConnectorProfileCredentials(input.Zendesk, context) }), - }; -}; +// se_ConnectorProfileCredentials omitted. -/** - * serializeAws_restJson1ConnectorProfileNameList - */ -const se_ConnectorProfileNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConnectorProfileNameList omitted. -/** - * serializeAws_restJson1ConnectorProfileProperties - */ -const se_ConnectorProfileProperties = (input: ConnectorProfileProperties, context: __SerdeContext): any => { - return { - ...(input.Amplitude != null && { Amplitude: se_AmplitudeConnectorProfileProperties(input.Amplitude, context) }), - ...(input.CustomConnector != null && { - CustomConnector: se_CustomConnectorProfileProperties(input.CustomConnector, context), - }), - ...(input.Datadog != null && { Datadog: se_DatadogConnectorProfileProperties(input.Datadog, context) }), - ...(input.Dynatrace != null && { Dynatrace: se_DynatraceConnectorProfileProperties(input.Dynatrace, context) }), - ...(input.GoogleAnalytics != null && { - GoogleAnalytics: se_GoogleAnalyticsConnectorProfileProperties(input.GoogleAnalytics, context), - }), - ...(input.Honeycode != null && { Honeycode: se_HoneycodeConnectorProfileProperties(input.Honeycode, context) }), - ...(input.InforNexus != null && { InforNexus: se_InforNexusConnectorProfileProperties(input.InforNexus, context) }), - ...(input.Marketo != null && { Marketo: se_MarketoConnectorProfileProperties(input.Marketo, context) }), - ...(input.Pardot != null && { Pardot: se_PardotConnectorProfileProperties(input.Pardot, context) }), - ...(input.Redshift != null && { Redshift: se_RedshiftConnectorProfileProperties(input.Redshift, context) }), - ...(input.SAPOData != null && { SAPOData: se_SAPODataConnectorProfileProperties(input.SAPOData, context) }), - ...(input.Salesforce != null && { Salesforce: se_SalesforceConnectorProfileProperties(input.Salesforce, context) }), - ...(input.ServiceNow != null && { ServiceNow: se_ServiceNowConnectorProfileProperties(input.ServiceNow, context) }), - ...(input.Singular != null && { Singular: se_SingularConnectorProfileProperties(input.Singular, context) }), - ...(input.Slack != null && { Slack: se_SlackConnectorProfileProperties(input.Slack, context) }), - ...(input.Snowflake != null && { Snowflake: se_SnowflakeConnectorProfileProperties(input.Snowflake, context) }), - ...(input.Trendmicro != null && { Trendmicro: se_TrendmicroConnectorProfileProperties(input.Trendmicro, context) }), - ...(input.Veeva != null && { Veeva: se_VeevaConnectorProfileProperties(input.Veeva, context) }), - ...(input.Zendesk != null && { Zendesk: se_ZendeskConnectorProfileProperties(input.Zendesk, context) }), - }; -}; +// se_ConnectorProfileProperties omitted. -/** - * serializeAws_restJson1ConnectorProvisioningConfig - */ -const se_ConnectorProvisioningConfig = (input: ConnectorProvisioningConfig, context: __SerdeContext): any => { - return { - ...(input.lambda != null && { lambda: se_LambdaConnectorProvisioningConfig(input.lambda, context) }), - }; -}; +// se_ConnectorProvisioningConfig omitted. -/** - * serializeAws_restJson1ConnectorTypeList - */ -const se_ConnectorTypeList = (input: (ConnectorType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConnectorTypeList omitted. -/** - * serializeAws_restJson1CredentialsMap - */ -const se_CredentialsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CredentialsMap omitted. -/** - * serializeAws_restJson1CustomAuthCredentials - */ -const se_CustomAuthCredentials = (input: CustomAuthCredentials, context: __SerdeContext): any => { - return { - ...(input.credentialsMap != null && { credentialsMap: se_CredentialsMap(input.credentialsMap, context) }), - ...(input.customAuthenticationType != null && { customAuthenticationType: input.customAuthenticationType }), - }; -}; +// se_CustomAuthCredentials omitted. -/** - * serializeAws_restJson1CustomConnectorDestinationProperties - */ -const se_CustomConnectorDestinationProperties = ( - input: CustomConnectorDestinationProperties, - context: __SerdeContext -): any => { - return { - ...(input.customProperties != null && { customProperties: se_CustomProperties(input.customProperties, context) }), - ...(input.entityName != null && { entityName: input.entityName }), - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.idFieldNames != null && { idFieldNames: se_IdFieldNameList(input.idFieldNames, context) }), - ...(input.writeOperationType != null && { writeOperationType: input.writeOperationType }), - }; -}; +// se_CustomConnectorDestinationProperties omitted. -/** - * serializeAws_restJson1CustomConnectorProfileCredentials - */ -const se_CustomConnectorProfileCredentials = ( - input: CustomConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.apiKey != null && { apiKey: se_ApiKeyCredentials(input.apiKey, context) }), - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - ...(input.basic != null && { basic: se_BasicAuthCredentials(input.basic, context) }), - ...(input.custom != null && { custom: se_CustomAuthCredentials(input.custom, context) }), - ...(input.oauth2 != null && { oauth2: se_OAuth2Credentials(input.oauth2, context) }), - }; -}; +// se_CustomConnectorProfileCredentials omitted. -/** - * serializeAws_restJson1CustomConnectorProfileProperties - */ -const se_CustomConnectorProfileProperties = (input: CustomConnectorProfileProperties, context: __SerdeContext): any => { - return { - ...(input.oAuth2Properties != null && { oAuth2Properties: se_OAuth2Properties(input.oAuth2Properties, context) }), - ...(input.profileProperties != null && { - profileProperties: se_ProfilePropertiesMap(input.profileProperties, context), - }), - }; -}; +// se_CustomConnectorProfileProperties omitted. -/** - * serializeAws_restJson1CustomConnectorSourceProperties - */ -const se_CustomConnectorSourceProperties = (input: CustomConnectorSourceProperties, context: __SerdeContext): any => { - return { - ...(input.customProperties != null && { customProperties: se_CustomProperties(input.customProperties, context) }), - ...(input.entityName != null && { entityName: input.entityName }), - }; -}; +// se_CustomConnectorSourceProperties omitted. -/** - * serializeAws_restJson1CustomerProfilesDestinationProperties - */ -const se_CustomerProfilesDestinationProperties = ( - input: CustomerProfilesDestinationProperties, - context: __SerdeContext -): any => { - return { - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.objectTypeName != null && { objectTypeName: input.objectTypeName }), - }; -}; +// se_CustomerProfilesDestinationProperties omitted. -/** - * serializeAws_restJson1CustomProperties - */ -const se_CustomProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CustomProperties omitted. -/** - * serializeAws_restJson1DatadogConnectorProfileCredentials - */ -const se_DatadogConnectorProfileCredentials = ( - input: DatadogConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.apiKey != null && { apiKey: input.apiKey }), - ...(input.applicationKey != null && { applicationKey: input.applicationKey }), - }; -}; +// se_DatadogConnectorProfileCredentials omitted. -/** - * serializeAws_restJson1DatadogConnectorProfileProperties - */ -const se_DatadogConnectorProfileProperties = ( - input: DatadogConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; +// se_DatadogConnectorProfileProperties omitted. -/** - * serializeAws_restJson1DatadogSourceProperties - */ -const se_DatadogSourceProperties = (input: DatadogSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; +// se_DatadogSourceProperties omitted. -/** - * serializeAws_restJson1DestinationConnectorProperties - */ -const se_DestinationConnectorProperties = (input: DestinationConnectorProperties, context: __SerdeContext): any => { - return { - ...(input.CustomConnector != null && { - CustomConnector: se_CustomConnectorDestinationProperties(input.CustomConnector, context), - }), - ...(input.CustomerProfiles != null && { - CustomerProfiles: se_CustomerProfilesDestinationProperties(input.CustomerProfiles, context), - }), - ...(input.EventBridge != null && { EventBridge: se_EventBridgeDestinationProperties(input.EventBridge, context) }), - ...(input.Honeycode != null && { Honeycode: se_HoneycodeDestinationProperties(input.Honeycode, context) }), - ...(input.LookoutMetrics != null && { - LookoutMetrics: se_LookoutMetricsDestinationProperties(input.LookoutMetrics, context), - }), - ...(input.Marketo != null && { Marketo: se_MarketoDestinationProperties(input.Marketo, context) }), - ...(input.Redshift != null && { Redshift: se_RedshiftDestinationProperties(input.Redshift, context) }), - ...(input.S3 != null && { S3: se_S3DestinationProperties(input.S3, context) }), - ...(input.SAPOData != null && { SAPOData: se_SAPODataDestinationProperties(input.SAPOData, context) }), - ...(input.Salesforce != null && { Salesforce: se_SalesforceDestinationProperties(input.Salesforce, context) }), - ...(input.Snowflake != null && { Snowflake: se_SnowflakeDestinationProperties(input.Snowflake, context) }), - ...(input.Upsolver != null && { Upsolver: se_UpsolverDestinationProperties(input.Upsolver, context) }), - ...(input.Zendesk != null && { Zendesk: se_ZendeskDestinationProperties(input.Zendesk, context) }), - }; -}; +// se_DestinationConnectorProperties omitted. -/** - * serializeAws_restJson1DestinationFlowConfig - */ -const se_DestinationFlowConfig = (input: DestinationFlowConfig, context: __SerdeContext): any => { - return { - ...(input.apiVersion != null && { apiVersion: input.apiVersion }), - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - ...(input.destinationConnectorProperties != null && { - destinationConnectorProperties: se_DestinationConnectorProperties(input.destinationConnectorProperties, context), - }), - }; -}; +// se_DestinationFlowConfig omitted. -/** - * serializeAws_restJson1DestinationFlowConfigList - */ -const se_DestinationFlowConfigList = (input: DestinationFlowConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DestinationFlowConfig(entry, context); - }); -}; +// se_DestinationFlowConfigList omitted. -/** - * serializeAws_restJson1DynatraceConnectorProfileCredentials - */ -const se_DynatraceConnectorProfileCredentials = ( - input: DynatraceConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.apiToken != null && { apiToken: input.apiToken }), - }; -}; +// se_DynatraceConnectorProfileCredentials omitted. -/** - * serializeAws_restJson1DynatraceConnectorProfileProperties - */ -const se_DynatraceConnectorProfileProperties = ( - input: DynatraceConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1DynatraceSourceProperties - */ -const se_DynatraceSourceProperties = (input: DynatraceSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1ErrorHandlingConfig - */ -const se_ErrorHandlingConfig = (input: ErrorHandlingConfig, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.failOnFirstDestinationError != null && { - failOnFirstDestinationError: input.failOnFirstDestinationError, - }), - }; -}; - -/** - * serializeAws_restJson1EventBridgeDestinationProperties - */ -const se_EventBridgeDestinationProperties = (input: EventBridgeDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1GlueDataCatalogConfig - */ -const se_GlueDataCatalogConfig = (input: GlueDataCatalogConfig, context: __SerdeContext): any => { - return { - ...(input.databaseName != null && { databaseName: input.databaseName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tablePrefix != null && { tablePrefix: input.tablePrefix }), - }; -}; - -/** - * serializeAws_restJson1GoogleAnalyticsConnectorProfileCredentials - */ -const se_GoogleAnalyticsConnectorProfileCredentials = ( - input: GoogleAnalyticsConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - }; -}; - -/** - * serializeAws_restJson1GoogleAnalyticsConnectorProfileProperties - */ -const se_GoogleAnalyticsConnectorProfileProperties = ( - input: GoogleAnalyticsConnectorProfileProperties, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_restJson1GoogleAnalyticsSourceProperties - */ -const se_GoogleAnalyticsSourceProperties = (input: GoogleAnalyticsSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1HoneycodeConnectorProfileCredentials - */ -const se_HoneycodeConnectorProfileCredentials = ( - input: HoneycodeConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - }; -}; - -/** - * serializeAws_restJson1HoneycodeConnectorProfileProperties - */ -const se_HoneycodeConnectorProfileProperties = ( - input: HoneycodeConnectorProfileProperties, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_restJson1HoneycodeDestinationProperties - */ -const se_HoneycodeDestinationProperties = (input: HoneycodeDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1IdFieldNameList - */ -const se_IdFieldNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1IncrementalPullConfig - */ -const se_IncrementalPullConfig = (input: IncrementalPullConfig, context: __SerdeContext): any => { - return { - ...(input.datetimeTypeFieldName != null && { datetimeTypeFieldName: input.datetimeTypeFieldName }), - }; -}; - -/** - * serializeAws_restJson1InforNexusConnectorProfileCredentials - */ -const se_InforNexusConnectorProfileCredentials = ( - input: InforNexusConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessKeyId != null && { accessKeyId: input.accessKeyId }), - ...(input.datakey != null && { datakey: input.datakey }), - ...(input.secretAccessKey != null && { secretAccessKey: input.secretAccessKey }), - ...(input.userId != null && { userId: input.userId }), - }; -}; - -/** - * serializeAws_restJson1InforNexusConnectorProfileProperties - */ -const se_InforNexusConnectorProfileProperties = ( - input: InforNexusConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1InforNexusSourceProperties - */ -const se_InforNexusSourceProperties = (input: InforNexusSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1LambdaConnectorProvisioningConfig - */ -const se_LambdaConnectorProvisioningConfig = ( - input: LambdaConnectorProvisioningConfig, - context: __SerdeContext -): any => { - return { - ...(input.lambdaArn != null && { lambdaArn: input.lambdaArn }), - }; -}; - -/** - * serializeAws_restJson1LookoutMetricsDestinationProperties - */ -const se_LookoutMetricsDestinationProperties = ( - input: LookoutMetricsDestinationProperties, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_restJson1MarketoConnectorProfileCredentials - */ -const se_MarketoConnectorProfileCredentials = ( - input: MarketoConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - }; -}; - -/** - * serializeAws_restJson1MarketoConnectorProfileProperties - */ -const se_MarketoConnectorProfileProperties = ( - input: MarketoConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1MarketoDestinationProperties - */ -const se_MarketoDestinationProperties = (input: MarketoDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1MarketoSourceProperties - */ -const se_MarketoSourceProperties = (input: MarketoSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1MetadataCatalogConfig - */ -const se_MetadataCatalogConfig = (input: MetadataCatalogConfig, context: __SerdeContext): any => { - return { - ...(input.glueDataCatalog != null && { glueDataCatalog: se_GlueDataCatalogConfig(input.glueDataCatalog, context) }), - }; -}; - -/** - * serializeAws_restJson1OAuth2Credentials - */ -const se_OAuth2Credentials = (input: OAuth2Credentials, context: __SerdeContext): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - }; -}; - -/** - * serializeAws_restJson1OAuth2Properties - */ -const se_OAuth2Properties = (input: OAuth2Properties, context: __SerdeContext): any => { - return { - ...(input.oAuth2GrantType != null && { oAuth2GrantType: input.oAuth2GrantType }), - ...(input.tokenUrl != null && { tokenUrl: input.tokenUrl }), - ...(input.tokenUrlCustomProperties != null && { - tokenUrlCustomProperties: se_TokenUrlCustomProperties(input.tokenUrlCustomProperties, context), - }), - }; -}; - -/** - * serializeAws_restJson1OAuthCredentials - */ -const se_OAuthCredentials = (input: OAuthCredentials, context: __SerdeContext): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - }; -}; - -/** - * serializeAws_restJson1OAuthProperties - */ -const se_OAuthProperties = (input: OAuthProperties, context: __SerdeContext): any => { - return { - ...(input.authCodeUrl != null && { authCodeUrl: input.authCodeUrl }), - ...(input.oAuthScopes != null && { oAuthScopes: se_OAuthScopeList(input.oAuthScopes, context) }), - ...(input.tokenUrl != null && { tokenUrl: input.tokenUrl }), - }; -}; - -/** - * serializeAws_restJson1OAuthScopeList - */ -const se_OAuthScopeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1PardotConnectorProfileCredentials - */ -const se_PardotConnectorProfileCredentials = ( - input: PardotConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientCredentialsArn != null && { clientCredentialsArn: input.clientCredentialsArn }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - }; -}; - -/** - * serializeAws_restJson1PardotConnectorProfileProperties - */ -const se_PardotConnectorProfileProperties = (input: PardotConnectorProfileProperties, context: __SerdeContext): any => { - return { - ...(input.businessUnitId != null && { businessUnitId: input.businessUnitId }), - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - ...(input.isSandboxEnvironment != null && { isSandboxEnvironment: input.isSandboxEnvironment }), - }; -}; - -/** - * serializeAws_restJson1PardotSourceProperties - */ -const se_PardotSourceProperties = (input: PardotSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1PathPrefixHierarchy - */ -const se_PathPrefixHierarchy = (input: (PathPrefix | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1PrefixConfig - */ -const se_PrefixConfig = (input: PrefixConfig, context: __SerdeContext): any => { - return { - ...(input.pathPrefixHierarchy != null && { - pathPrefixHierarchy: se_PathPrefixHierarchy(input.pathPrefixHierarchy, context), - }), - ...(input.prefixFormat != null && { prefixFormat: input.prefixFormat }), - ...(input.prefixType != null && { prefixType: input.prefixType }), - }; -}; - -/** - * serializeAws_restJson1ProfilePropertiesMap - */ -const se_ProfilePropertiesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1RedshiftConnectorProfileCredentials - */ -const se_RedshiftConnectorProfileCredentials = ( - input: RedshiftConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.password != null && { password: input.password }), - ...(input.username != null && { username: input.username }), - }; -}; - -/** - * serializeAws_restJson1RedshiftConnectorProfileProperties - */ -const se_RedshiftConnectorProfileProperties = ( - input: RedshiftConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.clusterIdentifier != null && { clusterIdentifier: input.clusterIdentifier }), - ...(input.dataApiRoleArn != null && { dataApiRoleArn: input.dataApiRoleArn }), - ...(input.databaseName != null && { databaseName: input.databaseName }), - ...(input.databaseUrl != null && { databaseUrl: input.databaseUrl }), - ...(input.isRedshiftServerless != null && { isRedshiftServerless: input.isRedshiftServerless }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; - -/** - * serializeAws_restJson1RedshiftDestinationProperties - */ -const se_RedshiftDestinationProperties = (input: RedshiftDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.intermediateBucketName != null && { intermediateBucketName: input.intermediateBucketName }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1S3DestinationProperties - */ -const se_S3DestinationProperties = (input: S3DestinationProperties, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.s3OutputFormatConfig != null && { - s3OutputFormatConfig: se_S3OutputFormatConfig(input.s3OutputFormatConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1S3InputFormatConfig - */ -const se_S3InputFormatConfig = (input: S3InputFormatConfig, context: __SerdeContext): any => { - return { - ...(input.s3InputFileType != null && { s3InputFileType: input.s3InputFileType }), - }; -}; - -/** - * serializeAws_restJson1S3OutputFormatConfig - */ -const se_S3OutputFormatConfig = (input: S3OutputFormatConfig, context: __SerdeContext): any => { - return { - ...(input.aggregationConfig != null && { - aggregationConfig: se_AggregationConfig(input.aggregationConfig, context), - }), - ...(input.fileType != null && { fileType: input.fileType }), - ...(input.prefixConfig != null && { prefixConfig: se_PrefixConfig(input.prefixConfig, context) }), - ...(input.preserveSourceDataTyping != null && { preserveSourceDataTyping: input.preserveSourceDataTyping }), - }; -}; - -/** - * serializeAws_restJson1S3SourceProperties - */ -const se_S3SourceProperties = (input: S3SourceProperties, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.s3InputFormatConfig != null && { - s3InputFormatConfig: se_S3InputFormatConfig(input.s3InputFormatConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1SalesforceConnectorProfileCredentials - */ -const se_SalesforceConnectorProfileCredentials = ( - input: SalesforceConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientCredentialsArn != null && { clientCredentialsArn: input.clientCredentialsArn }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - }; -}; - -/** - * serializeAws_restJson1SalesforceConnectorProfileProperties - */ -const se_SalesforceConnectorProfileProperties = ( - input: SalesforceConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - ...(input.isSandboxEnvironment != null && { isSandboxEnvironment: input.isSandboxEnvironment }), - ...(input.usePrivateLinkForMetadataAndAuthorization != null && { - usePrivateLinkForMetadataAndAuthorization: input.usePrivateLinkForMetadataAndAuthorization, - }), - }; -}; - -/** - * serializeAws_restJson1SalesforceDestinationProperties - */ -const se_SalesforceDestinationProperties = (input: SalesforceDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.dataTransferApi != null && { dataTransferApi: input.dataTransferApi }), - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.idFieldNames != null && { idFieldNames: se_IdFieldNameList(input.idFieldNames, context) }), - ...(input.object != null && { object: input.object }), - ...(input.writeOperationType != null && { writeOperationType: input.writeOperationType }), - }; -}; - -/** - * serializeAws_restJson1SalesforceSourceProperties - */ -const se_SalesforceSourceProperties = (input: SalesforceSourceProperties, context: __SerdeContext): any => { - return { - ...(input.dataTransferApi != null && { dataTransferApi: input.dataTransferApi }), - ...(input.enableDynamicFieldUpdate != null && { enableDynamicFieldUpdate: input.enableDynamicFieldUpdate }), - ...(input.includeDeletedRecords != null && { includeDeletedRecords: input.includeDeletedRecords }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1SAPODataConnectorProfileCredentials - */ -const se_SAPODataConnectorProfileCredentials = ( - input: SAPODataConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.basicAuthCredentials != null && { - basicAuthCredentials: se_BasicAuthCredentials(input.basicAuthCredentials, context), - }), - ...(input.oAuthCredentials != null && { oAuthCredentials: se_OAuthCredentials(input.oAuthCredentials, context) }), - }; -}; - -/** - * serializeAws_restJson1SAPODataConnectorProfileProperties - */ -const se_SAPODataConnectorProfileProperties = ( - input: SAPODataConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.applicationHostUrl != null && { applicationHostUrl: input.applicationHostUrl }), - ...(input.applicationServicePath != null && { applicationServicePath: input.applicationServicePath }), - ...(input.clientNumber != null && { clientNumber: input.clientNumber }), - ...(input.logonLanguage != null && { logonLanguage: input.logonLanguage }), - ...(input.oAuthProperties != null && { oAuthProperties: se_OAuthProperties(input.oAuthProperties, context) }), - ...(input.portNumber != null && { portNumber: input.portNumber }), - ...(input.privateLinkServiceName != null && { privateLinkServiceName: input.privateLinkServiceName }), - }; -}; - -/** - * serializeAws_restJson1SAPODataDestinationProperties - */ -const se_SAPODataDestinationProperties = (input: SAPODataDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.idFieldNames != null && { idFieldNames: se_IdFieldNameList(input.idFieldNames, context) }), - ...(input.objectPath != null && { objectPath: input.objectPath }), - ...(input.successResponseHandlingConfig != null && { - successResponseHandlingConfig: se_SuccessResponseHandlingConfig(input.successResponseHandlingConfig, context), - }), - ...(input.writeOperationType != null && { writeOperationType: input.writeOperationType }), - }; -}; - -/** - * serializeAws_restJson1SAPODataSourceProperties - */ -const se_SAPODataSourceProperties = (input: SAPODataSourceProperties, context: __SerdeContext): any => { - return { - ...(input.objectPath != null && { objectPath: input.objectPath }), - }; -}; - -/** - * serializeAws_restJson1ScheduledTriggerProperties - */ -const se_ScheduledTriggerProperties = (input: ScheduledTriggerProperties, context: __SerdeContext): any => { - return { - ...(input.dataPullMode != null && { dataPullMode: input.dataPullMode }), - ...(input.firstExecutionFrom != null && { - firstExecutionFrom: Math.round(input.firstExecutionFrom.getTime() / 1000), - }), - ...(input.flowErrorDeactivationThreshold != null && { - flowErrorDeactivationThreshold: input.flowErrorDeactivationThreshold, - }), - ...(input.scheduleEndTime != null && { scheduleEndTime: Math.round(input.scheduleEndTime.getTime() / 1000) }), - ...(input.scheduleExpression != null && { scheduleExpression: input.scheduleExpression }), - ...(input.scheduleOffset != null && { scheduleOffset: input.scheduleOffset }), - ...(input.scheduleStartTime != null && { scheduleStartTime: Math.round(input.scheduleStartTime.getTime() / 1000) }), - ...(input.timezone != null && { timezone: input.timezone }), - }; -}; - -/** - * serializeAws_restJson1ServiceNowConnectorProfileCredentials - */ -const se_ServiceNowConnectorProfileCredentials = ( - input: ServiceNowConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.password != null && { password: input.password }), - ...(input.username != null && { username: input.username }), - }; -}; - -/** - * serializeAws_restJson1ServiceNowConnectorProfileProperties - */ -const se_ServiceNowConnectorProfileProperties = ( - input: ServiceNowConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1ServiceNowSourceProperties - */ -const se_ServiceNowSourceProperties = (input: ServiceNowSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1SingularConnectorProfileCredentials - */ -const se_SingularConnectorProfileCredentials = ( - input: SingularConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.apiKey != null && { apiKey: input.apiKey }), - }; -}; - -/** - * serializeAws_restJson1SingularConnectorProfileProperties - */ -const se_SingularConnectorProfileProperties = ( - input: SingularConnectorProfileProperties, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_restJson1SingularSourceProperties - */ -const se_SingularSourceProperties = (input: SingularSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1SlackConnectorProfileCredentials - */ -const se_SlackConnectorProfileCredentials = (input: SlackConnectorProfileCredentials, context: __SerdeContext): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - }; -}; - -/** - * serializeAws_restJson1SlackConnectorProfileProperties - */ -const se_SlackConnectorProfileProperties = (input: SlackConnectorProfileProperties, context: __SerdeContext): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1SlackSourceProperties - */ -const se_SlackSourceProperties = (input: SlackSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1SnowflakeConnectorProfileCredentials - */ -const se_SnowflakeConnectorProfileCredentials = ( - input: SnowflakeConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.password != null && { password: input.password }), - ...(input.username != null && { username: input.username }), - }; -}; - -/** - * serializeAws_restJson1SnowflakeConnectorProfileProperties - */ -const se_SnowflakeConnectorProfileProperties = ( - input: SnowflakeConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.accountName != null && { accountName: input.accountName }), - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.privateLinkServiceName != null && { privateLinkServiceName: input.privateLinkServiceName }), - ...(input.region != null && { region: input.region }), - ...(input.stage != null && { stage: input.stage }), - ...(input.warehouse != null && { warehouse: input.warehouse }), - }; -}; - -/** - * serializeAws_restJson1SnowflakeDestinationProperties - */ -const se_SnowflakeDestinationProperties = (input: SnowflakeDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.intermediateBucketName != null && { intermediateBucketName: input.intermediateBucketName }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1SourceConnectorProperties - */ -const se_SourceConnectorProperties = (input: SourceConnectorProperties, context: __SerdeContext): any => { - return { - ...(input.Amplitude != null && { Amplitude: se_AmplitudeSourceProperties(input.Amplitude, context) }), - ...(input.CustomConnector != null && { - CustomConnector: se_CustomConnectorSourceProperties(input.CustomConnector, context), - }), - ...(input.Datadog != null && { Datadog: se_DatadogSourceProperties(input.Datadog, context) }), - ...(input.Dynatrace != null && { Dynatrace: se_DynatraceSourceProperties(input.Dynatrace, context) }), - ...(input.GoogleAnalytics != null && { - GoogleAnalytics: se_GoogleAnalyticsSourceProperties(input.GoogleAnalytics, context), - }), - ...(input.InforNexus != null && { InforNexus: se_InforNexusSourceProperties(input.InforNexus, context) }), - ...(input.Marketo != null && { Marketo: se_MarketoSourceProperties(input.Marketo, context) }), - ...(input.Pardot != null && { Pardot: se_PardotSourceProperties(input.Pardot, context) }), - ...(input.S3 != null && { S3: se_S3SourceProperties(input.S3, context) }), - ...(input.SAPOData != null && { SAPOData: se_SAPODataSourceProperties(input.SAPOData, context) }), - ...(input.Salesforce != null && { Salesforce: se_SalesforceSourceProperties(input.Salesforce, context) }), - ...(input.ServiceNow != null && { ServiceNow: se_ServiceNowSourceProperties(input.ServiceNow, context) }), - ...(input.Singular != null && { Singular: se_SingularSourceProperties(input.Singular, context) }), - ...(input.Slack != null && { Slack: se_SlackSourceProperties(input.Slack, context) }), - ...(input.Trendmicro != null && { Trendmicro: se_TrendmicroSourceProperties(input.Trendmicro, context) }), - ...(input.Veeva != null && { Veeva: se_VeevaSourceProperties(input.Veeva, context) }), - ...(input.Zendesk != null && { Zendesk: se_ZendeskSourceProperties(input.Zendesk, context) }), - }; -}; - -/** - * serializeAws_restJson1SourceFields - */ -const se_SourceFields = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SourceFlowConfig - */ -const se_SourceFlowConfig = (input: SourceFlowConfig, context: __SerdeContext): any => { - return { - ...(input.apiVersion != null && { apiVersion: input.apiVersion }), - ...(input.connectorProfileName != null && { connectorProfileName: input.connectorProfileName }), - ...(input.connectorType != null && { connectorType: input.connectorType }), - ...(input.incrementalPullConfig != null && { - incrementalPullConfig: se_IncrementalPullConfig(input.incrementalPullConfig, context), - }), - ...(input.sourceConnectorProperties != null && { - sourceConnectorProperties: se_SourceConnectorProperties(input.sourceConnectorProperties, context), - }), - }; -}; - -/** - * serializeAws_restJson1SuccessResponseHandlingConfig - */ -const se_SuccessResponseHandlingConfig = (input: SuccessResponseHandlingConfig, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - }; -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Task - */ -const se_Task = (input: Task, context: __SerdeContext): any => { - return { - ...(input.connectorOperator != null && { - connectorOperator: se_ConnectorOperator(input.connectorOperator, context), - }), - ...(input.destinationField != null && { destinationField: input.destinationField }), - ...(input.sourceFields != null && { sourceFields: se_SourceFields(input.sourceFields, context) }), - ...(input.taskProperties != null && { taskProperties: se_TaskPropertiesMap(input.taskProperties, context) }), - ...(input.taskType != null && { taskType: input.taskType }), - }; -}; - -/** - * serializeAws_restJson1TaskPropertiesMap - */ -const se_TaskPropertiesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [OperatorPropertiesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; - -/** - * serializeAws_restJson1Tasks - */ -const se_Tasks = (input: Task[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Task(entry, context); - }); -}; - -/** - * serializeAws_restJson1TokenUrlCustomProperties - */ -const se_TokenUrlCustomProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TrendmicroConnectorProfileCredentials - */ -const se_TrendmicroConnectorProfileCredentials = ( - input: TrendmicroConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.apiSecretKey != null && { apiSecretKey: input.apiSecretKey }), - }; -}; - -/** - * serializeAws_restJson1TrendmicroConnectorProfileProperties - */ -const se_TrendmicroConnectorProfileProperties = ( - input: TrendmicroConnectorProfileProperties, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_restJson1TrendmicroSourceProperties - */ -const se_TrendmicroSourceProperties = (input: TrendmicroSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1TriggerConfig - */ -const se_TriggerConfig = (input: TriggerConfig, context: __SerdeContext): any => { - return { - ...(input.triggerProperties != null && { - triggerProperties: se_TriggerProperties(input.triggerProperties, context), - }), - ...(input.triggerType != null && { triggerType: input.triggerType }), - }; -}; - -/** - * serializeAws_restJson1TriggerProperties - */ -const se_TriggerProperties = (input: TriggerProperties, context: __SerdeContext): any => { - return { - ...(input.Scheduled != null && { Scheduled: se_ScheduledTriggerProperties(input.Scheduled, context) }), - }; -}; - -/** - * serializeAws_restJson1UpsolverDestinationProperties - */ -const se_UpsolverDestinationProperties = (input: UpsolverDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bucketPrefix != null && { bucketPrefix: input.bucketPrefix }), - ...(input.s3OutputFormatConfig != null && { - s3OutputFormatConfig: se_UpsolverS3OutputFormatConfig(input.s3OutputFormatConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1UpsolverS3OutputFormatConfig - */ -const se_UpsolverS3OutputFormatConfig = (input: UpsolverS3OutputFormatConfig, context: __SerdeContext): any => { - return { - ...(input.aggregationConfig != null && { - aggregationConfig: se_AggregationConfig(input.aggregationConfig, context), - }), - ...(input.fileType != null && { fileType: input.fileType }), - ...(input.prefixConfig != null && { prefixConfig: se_PrefixConfig(input.prefixConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1VeevaConnectorProfileCredentials - */ -const se_VeevaConnectorProfileCredentials = (input: VeevaConnectorProfileCredentials, context: __SerdeContext): any => { - return { - ...(input.password != null && { password: input.password }), - ...(input.username != null && { username: input.username }), - }; -}; - -/** - * serializeAws_restJson1VeevaConnectorProfileProperties - */ -const se_VeevaConnectorProfileProperties = (input: VeevaConnectorProfileProperties, context: __SerdeContext): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1VeevaSourceProperties - */ -const se_VeevaSourceProperties = (input: VeevaSourceProperties, context: __SerdeContext): any => { - return { - ...(input.documentType != null && { documentType: input.documentType }), - ...(input.includeAllVersions != null && { includeAllVersions: input.includeAllVersions }), - ...(input.includeRenditions != null && { includeRenditions: input.includeRenditions }), - ...(input.includeSourceFiles != null && { includeSourceFiles: input.includeSourceFiles }), - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * serializeAws_restJson1ZendeskConnectorProfileCredentials - */ -const se_ZendeskConnectorProfileCredentials = ( - input: ZendeskConnectorProfileCredentials, - context: __SerdeContext -): any => { - return { - ...(input.accessToken != null && { accessToken: input.accessToken }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.oAuthRequest != null && { oAuthRequest: se_ConnectorOAuthRequest(input.oAuthRequest, context) }), - }; -}; - -/** - * serializeAws_restJson1ZendeskConnectorProfileProperties - */ -const se_ZendeskConnectorProfileProperties = ( - input: ZendeskConnectorProfileProperties, - context: __SerdeContext -): any => { - return { - ...(input.instanceUrl != null && { instanceUrl: input.instanceUrl }), - }; -}; - -/** - * serializeAws_restJson1ZendeskDestinationProperties - */ -const se_ZendeskDestinationProperties = (input: ZendeskDestinationProperties, context: __SerdeContext): any => { - return { - ...(input.errorHandlingConfig != null && { - errorHandlingConfig: se_ErrorHandlingConfig(input.errorHandlingConfig, context), - }), - ...(input.idFieldNames != null && { idFieldNames: se_IdFieldNameList(input.idFieldNames, context) }), - ...(input.object != null && { object: input.object }), - ...(input.writeOperationType != null && { writeOperationType: input.writeOperationType }), - }; -}; - -/** - * serializeAws_restJson1ZendeskSourceProperties - */ -const se_ZendeskSourceProperties = (input: ZendeskSourceProperties, context: __SerdeContext): any => { - return { - ...(input.object != null && { object: input.object }), - }; -}; - -/** - * deserializeAws_restJson1AggregationConfig - */ -const de_AggregationConfig = (output: any, context: __SerdeContext): AggregationConfig => { - return { - aggregationType: __expectString(output.aggregationType), - targetFileSize: __expectLong(output.targetFileSize), - } as any; -}; - -/** - * deserializeAws_restJson1AmplitudeConnectorProfileProperties - */ -const de_AmplitudeConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): AmplitudeConnectorProfileProperties => { - return {} as any; -}; - -/** - * deserializeAws_restJson1AmplitudeMetadata - */ -const de_AmplitudeMetadata = (output: any, context: __SerdeContext): AmplitudeMetadata => { - return {} as any; -}; - -/** - * deserializeAws_restJson1AmplitudeSourceProperties - */ -const de_AmplitudeSourceProperties = (output: any, context: __SerdeContext): AmplitudeSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; - -/** - * deserializeAws_restJson1AuthCodeUrlList - */ -const de_AuthCodeUrlList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuthenticationConfig - */ -const de_AuthenticationConfig = (output: any, context: __SerdeContext): AuthenticationConfig => { - return { - customAuthConfigs: - output.customAuthConfigs != null ? de_CustomAuthConfigList(output.customAuthConfigs, context) : undefined, - isApiKeyAuthSupported: __expectBoolean(output.isApiKeyAuthSupported), - isBasicAuthSupported: __expectBoolean(output.isBasicAuthSupported), - isCustomAuthSupported: __expectBoolean(output.isCustomAuthSupported), - isOAuth2Supported: __expectBoolean(output.isOAuth2Supported), - oAuth2Defaults: output.oAuth2Defaults != null ? de_OAuth2Defaults(output.oAuth2Defaults, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AuthParameter - */ -const de_AuthParameter = (output: any, context: __SerdeContext): AuthParameter => { - return { - connectorSuppliedValues: - output.connectorSuppliedValues != null - ? de_ConnectorSuppliedValueList(output.connectorSuppliedValues, context) - : undefined, - description: __expectString(output.description), - isRequired: __expectBoolean(output.isRequired), - isSensitiveField: __expectBoolean(output.isSensitiveField), - key: __expectString(output.key), - label: __expectString(output.label), - } as any; -}; - -/** - * deserializeAws_restJson1AuthParameterList - */ -const de_AuthParameterList = (output: any, context: __SerdeContext): AuthParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorConfiguration - */ -const de_ConnectorConfiguration = (output: any, context: __SerdeContext): ConnectorConfiguration => { - return { - authenticationConfig: - output.authenticationConfig != null ? de_AuthenticationConfig(output.authenticationConfig, context) : undefined, - canUseAsDestination: __expectBoolean(output.canUseAsDestination), - canUseAsSource: __expectBoolean(output.canUseAsSource), - connectorArn: __expectString(output.connectorArn), - connectorDescription: __expectString(output.connectorDescription), - connectorLabel: __expectString(output.connectorLabel), - connectorMetadata: - output.connectorMetadata != null ? de_ConnectorMetadata(output.connectorMetadata, context) : undefined, - connectorModes: output.connectorModes != null ? de_ConnectorModeList(output.connectorModes, context) : undefined, - connectorName: __expectString(output.connectorName), - connectorOwner: __expectString(output.connectorOwner), - connectorProvisioningConfig: - output.connectorProvisioningConfig != null - ? de_ConnectorProvisioningConfig(output.connectorProvisioningConfig, context) - : undefined, - connectorProvisioningType: __expectString(output.connectorProvisioningType), - connectorRuntimeSettings: - output.connectorRuntimeSettings != null - ? de_ConnectorRuntimeSettingList(output.connectorRuntimeSettings, context) - : undefined, - connectorType: __expectString(output.connectorType), - connectorVersion: __expectString(output.connectorVersion), - isPrivateLinkEnabled: __expectBoolean(output.isPrivateLinkEnabled), - isPrivateLinkEndpointUrlRequired: __expectBoolean(output.isPrivateLinkEndpointUrlRequired), - logoURL: __expectString(output.logoURL), - registeredAt: - output.registeredAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registeredAt))) - : undefined, - registeredBy: __expectString(output.registeredBy), - supportedApiVersions: - output.supportedApiVersions != null - ? de_SupportedApiVersionList(output.supportedApiVersions, context) - : undefined, - supportedDestinationConnectors: - output.supportedDestinationConnectors != null - ? de_ConnectorTypeList(output.supportedDestinationConnectors, context) - : undefined, - supportedOperators: - output.supportedOperators != null ? de_SupportedOperatorList(output.supportedOperators, context) : undefined, - supportedSchedulingFrequencies: - output.supportedSchedulingFrequencies != null - ? de_SchedulingFrequencyTypeList(output.supportedSchedulingFrequencies, context) - : undefined, - supportedTriggerTypes: - output.supportedTriggerTypes != null ? de_TriggerTypeList(output.supportedTriggerTypes, context) : undefined, - supportedWriteOperations: - output.supportedWriteOperations != null - ? de_SupportedWriteOperationList(output.supportedWriteOperations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorConfigurationsMap - */ -const de_ConnectorConfigurationsMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [ConnectorType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ConnectorConfiguration(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_restJson1ConnectorDetail - */ -const de_ConnectorDetail = (output: any, context: __SerdeContext): ConnectorDetail => { - return { - applicationType: __expectString(output.applicationType), - connectorDescription: __expectString(output.connectorDescription), - connectorLabel: __expectString(output.connectorLabel), - connectorModes: output.connectorModes != null ? de_ConnectorModeList(output.connectorModes, context) : undefined, - connectorName: __expectString(output.connectorName), - connectorOwner: __expectString(output.connectorOwner), - connectorProvisioningType: __expectString(output.connectorProvisioningType), - connectorType: __expectString(output.connectorType), - connectorVersion: __expectString(output.connectorVersion), - registeredAt: - output.registeredAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registeredAt))) - : undefined, - registeredBy: __expectString(output.registeredBy), - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorEntity - */ -const de_ConnectorEntity = (output: any, context: __SerdeContext): ConnectorEntity => { - return { - hasNestedEntities: __expectBoolean(output.hasNestedEntities), - label: __expectString(output.label), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorEntityField - */ -const de_ConnectorEntityField = (output: any, context: __SerdeContext): ConnectorEntityField => { - return { - customProperties: - output.customProperties != null ? de_CustomProperties(output.customProperties, context) : undefined, - defaultValue: __expectString(output.defaultValue), - description: __expectString(output.description), - destinationProperties: - output.destinationProperties != null - ? de_DestinationFieldProperties(output.destinationProperties, context) - : undefined, - identifier: __expectString(output.identifier), - isDeprecated: __expectBoolean(output.isDeprecated), - isPrimaryKey: __expectBoolean(output.isPrimaryKey), - label: __expectString(output.label), - parentIdentifier: __expectString(output.parentIdentifier), - sourceProperties: - output.sourceProperties != null ? de_SourceFieldProperties(output.sourceProperties, context) : undefined, - supportedFieldTypeDetails: - output.supportedFieldTypeDetails != null - ? de_SupportedFieldTypeDetails(output.supportedFieldTypeDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorEntityFieldList - */ -const de_ConnectorEntityFieldList = (output: any, context: __SerdeContext): ConnectorEntityField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectorEntityField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorEntityList - */ -const de_ConnectorEntityList = (output: any, context: __SerdeContext): ConnectorEntity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectorEntity(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorEntityMap - */ -const de_ConnectorEntityMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ConnectorEntityList(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1ConnectorList - */ -const de_ConnectorList = (output: any, context: __SerdeContext): ConnectorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectorDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorMetadata - */ -const de_ConnectorMetadata = (output: any, context: __SerdeContext): ConnectorMetadata => { - return { - Amplitude: output.Amplitude != null ? de_AmplitudeMetadata(output.Amplitude, context) : undefined, - CustomerProfiles: - output.CustomerProfiles != null ? de_CustomerProfilesMetadata(output.CustomerProfiles, context) : undefined, - Datadog: output.Datadog != null ? de_DatadogMetadata(output.Datadog, context) : undefined, - Dynatrace: output.Dynatrace != null ? de_DynatraceMetadata(output.Dynatrace, context) : undefined, - EventBridge: output.EventBridge != null ? de_EventBridgeMetadata(output.EventBridge, context) : undefined, - GoogleAnalytics: - output.GoogleAnalytics != null ? de_GoogleAnalyticsMetadata(output.GoogleAnalytics, context) : undefined, - Honeycode: output.Honeycode != null ? de_HoneycodeMetadata(output.Honeycode, context) : undefined, - InforNexus: output.InforNexus != null ? de_InforNexusMetadata(output.InforNexus, context) : undefined, - Marketo: output.Marketo != null ? de_MarketoMetadata(output.Marketo, context) : undefined, - Pardot: output.Pardot != null ? de_PardotMetadata(output.Pardot, context) : undefined, - Redshift: output.Redshift != null ? de_RedshiftMetadata(output.Redshift, context) : undefined, - S3: output.S3 != null ? de_S3Metadata(output.S3, context) : undefined, - SAPOData: output.SAPOData != null ? de_SAPODataMetadata(output.SAPOData, context) : undefined, - Salesforce: output.Salesforce != null ? de_SalesforceMetadata(output.Salesforce, context) : undefined, - ServiceNow: output.ServiceNow != null ? de_ServiceNowMetadata(output.ServiceNow, context) : undefined, - Singular: output.Singular != null ? de_SingularMetadata(output.Singular, context) : undefined, - Slack: output.Slack != null ? de_SlackMetadata(output.Slack, context) : undefined, - Snowflake: output.Snowflake != null ? de_SnowflakeMetadata(output.Snowflake, context) : undefined, - Trendmicro: output.Trendmicro != null ? de_TrendmicroMetadata(output.Trendmicro, context) : undefined, - Upsolver: output.Upsolver != null ? de_UpsolverMetadata(output.Upsolver, context) : undefined, - Veeva: output.Veeva != null ? de_VeevaMetadata(output.Veeva, context) : undefined, - Zendesk: output.Zendesk != null ? de_ZendeskMetadata(output.Zendesk, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorModeList - */ -const de_ConnectorModeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorOperator - */ -const de_ConnectorOperator = (output: any, context: __SerdeContext): ConnectorOperator => { - return { - Amplitude: __expectString(output.Amplitude), - CustomConnector: __expectString(output.CustomConnector), - Datadog: __expectString(output.Datadog), - Dynatrace: __expectString(output.Dynatrace), - GoogleAnalytics: __expectString(output.GoogleAnalytics), - InforNexus: __expectString(output.InforNexus), - Marketo: __expectString(output.Marketo), - Pardot: __expectString(output.Pardot), - S3: __expectString(output.S3), - SAPOData: __expectString(output.SAPOData), - Salesforce: __expectString(output.Salesforce), - ServiceNow: __expectString(output.ServiceNow), - Singular: __expectString(output.Singular), - Slack: __expectString(output.Slack), - Trendmicro: __expectString(output.Trendmicro), - Veeva: __expectString(output.Veeva), - Zendesk: __expectString(output.Zendesk), - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorProfile - */ -const de_ConnectorProfile = (output: any, context: __SerdeContext): ConnectorProfile => { - return { - connectionMode: __expectString(output.connectionMode), - connectorLabel: __expectString(output.connectorLabel), - connectorProfileArn: __expectString(output.connectorProfileArn), - connectorProfileName: __expectString(output.connectorProfileName), - connectorProfileProperties: - output.connectorProfileProperties != null - ? de_ConnectorProfileProperties(output.connectorProfileProperties, context) - : undefined, - connectorType: __expectString(output.connectorType), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - credentialsArn: __expectString(output.credentialsArn), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - privateConnectionProvisioningState: - output.privateConnectionProvisioningState != null - ? de_PrivateConnectionProvisioningState(output.privateConnectionProvisioningState, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorProfileDetailList - */ -const de_ConnectorProfileDetailList = (output: any, context: __SerdeContext): ConnectorProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectorProfile(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorProfileProperties - */ -const de_ConnectorProfileProperties = (output: any, context: __SerdeContext): ConnectorProfileProperties => { - return { - Amplitude: output.Amplitude != null ? de_AmplitudeConnectorProfileProperties(output.Amplitude, context) : undefined, - CustomConnector: - output.CustomConnector != null ? de_CustomConnectorProfileProperties(output.CustomConnector, context) : undefined, - Datadog: output.Datadog != null ? de_DatadogConnectorProfileProperties(output.Datadog, context) : undefined, - Dynatrace: output.Dynatrace != null ? de_DynatraceConnectorProfileProperties(output.Dynatrace, context) : undefined, - GoogleAnalytics: - output.GoogleAnalytics != null - ? de_GoogleAnalyticsConnectorProfileProperties(output.GoogleAnalytics, context) - : undefined, - Honeycode: output.Honeycode != null ? de_HoneycodeConnectorProfileProperties(output.Honeycode, context) : undefined, - InforNexus: - output.InforNexus != null ? de_InforNexusConnectorProfileProperties(output.InforNexus, context) : undefined, - Marketo: output.Marketo != null ? de_MarketoConnectorProfileProperties(output.Marketo, context) : undefined, - Pardot: output.Pardot != null ? de_PardotConnectorProfileProperties(output.Pardot, context) : undefined, - Redshift: output.Redshift != null ? de_RedshiftConnectorProfileProperties(output.Redshift, context) : undefined, - SAPOData: output.SAPOData != null ? de_SAPODataConnectorProfileProperties(output.SAPOData, context) : undefined, - Salesforce: - output.Salesforce != null ? de_SalesforceConnectorProfileProperties(output.Salesforce, context) : undefined, - ServiceNow: - output.ServiceNow != null ? de_ServiceNowConnectorProfileProperties(output.ServiceNow, context) : undefined, - Singular: output.Singular != null ? de_SingularConnectorProfileProperties(output.Singular, context) : undefined, - Slack: output.Slack != null ? de_SlackConnectorProfileProperties(output.Slack, context) : undefined, - Snowflake: output.Snowflake != null ? de_SnowflakeConnectorProfileProperties(output.Snowflake, context) : undefined, - Trendmicro: - output.Trendmicro != null ? de_TrendmicroConnectorProfileProperties(output.Trendmicro, context) : undefined, - Veeva: output.Veeva != null ? de_VeevaConnectorProfileProperties(output.Veeva, context) : undefined, - Zendesk: output.Zendesk != null ? de_ZendeskConnectorProfileProperties(output.Zendesk, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorProvisioningConfig - */ -const de_ConnectorProvisioningConfig = (output: any, context: __SerdeContext): ConnectorProvisioningConfig => { - return { - lambda: output.lambda != null ? de_LambdaConnectorProvisioningConfig(output.lambda, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorRuntimeSetting - */ -const de_ConnectorRuntimeSetting = (output: any, context: __SerdeContext): ConnectorRuntimeSetting => { - return { - connectorSuppliedValueOptions: - output.connectorSuppliedValueOptions != null - ? de_ConnectorSuppliedValueOptionList(output.connectorSuppliedValueOptions, context) - : undefined, - dataType: __expectString(output.dataType), - description: __expectString(output.description), - isRequired: __expectBoolean(output.isRequired), - key: __expectString(output.key), - label: __expectString(output.label), - scope: __expectString(output.scope), - } as any; -}; - -/** - * deserializeAws_restJson1ConnectorRuntimeSettingList - */ -const de_ConnectorRuntimeSettingList = (output: any, context: __SerdeContext): ConnectorRuntimeSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectorRuntimeSetting(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorSuppliedValueList - */ -const de_ConnectorSuppliedValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorSuppliedValueOptionList - */ -const de_ConnectorSuppliedValueOptionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConnectorTypeList - */ -const de_ConnectorTypeList = (output: any, context: __SerdeContext): (ConnectorType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CustomAuthConfig - */ -const de_CustomAuthConfig = (output: any, context: __SerdeContext): CustomAuthConfig => { - return { - authParameters: output.authParameters != null ? de_AuthParameterList(output.authParameters, context) : undefined, - customAuthenticationType: __expectString(output.customAuthenticationType), - } as any; -}; - -/** - * deserializeAws_restJson1CustomAuthConfigList - */ -const de_CustomAuthConfigList = (output: any, context: __SerdeContext): CustomAuthConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomAuthConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CustomConnectorDestinationProperties - */ -const de_CustomConnectorDestinationProperties = ( - output: any, - context: __SerdeContext -): CustomConnectorDestinationProperties => { - return { - customProperties: - output.customProperties != null ? de_CustomProperties(output.customProperties, context) : undefined, - entityName: __expectString(output.entityName), - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - idFieldNames: output.idFieldNames != null ? de_IdFieldNameList(output.idFieldNames, context) : undefined, - writeOperationType: __expectString(output.writeOperationType), - } as any; -}; - -/** - * deserializeAws_restJson1CustomConnectorProfileProperties - */ -const de_CustomConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): CustomConnectorProfileProperties => { - return { - oAuth2Properties: - output.oAuth2Properties != null ? de_OAuth2Properties(output.oAuth2Properties, context) : undefined, - profileProperties: - output.profileProperties != null ? de_ProfilePropertiesMap(output.profileProperties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CustomConnectorSourceProperties - */ -const de_CustomConnectorSourceProperties = (output: any, context: __SerdeContext): CustomConnectorSourceProperties => { - return { - customProperties: - output.customProperties != null ? de_CustomProperties(output.customProperties, context) : undefined, - entityName: __expectString(output.entityName), - } as any; -}; +// se_DynatraceConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1CustomerProfilesDestinationProperties - */ -const de_CustomerProfilesDestinationProperties = ( - output: any, - context: __SerdeContext -): CustomerProfilesDestinationProperties => { - return { - domainName: __expectString(output.domainName), - objectTypeName: __expectString(output.objectTypeName), - } as any; -}; +// se_DynatraceSourceProperties omitted. -/** - * deserializeAws_restJson1CustomerProfilesMetadata - */ -const de_CustomerProfilesMetadata = (output: any, context: __SerdeContext): CustomerProfilesMetadata => { - return {} as any; -}; +// se_ErrorHandlingConfig omitted. -/** - * deserializeAws_restJson1CustomProperties - */ -const de_CustomProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_EventBridgeDestinationProperties omitted. -/** - * deserializeAws_restJson1DatadogConnectorProfileProperties - */ -const de_DatadogConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): DatadogConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// se_GlueDataCatalogConfig omitted. -/** - * deserializeAws_restJson1DatadogMetadata - */ -const de_DatadogMetadata = (output: any, context: __SerdeContext): DatadogMetadata => { - return {} as any; -}; +// se_GoogleAnalyticsConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1DatadogSourceProperties - */ -const de_DatadogSourceProperties = (output: any, context: __SerdeContext): DatadogSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// se_GoogleAnalyticsConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1DestinationConnectorProperties - */ -const de_DestinationConnectorProperties = (output: any, context: __SerdeContext): DestinationConnectorProperties => { - return { - CustomConnector: - output.CustomConnector != null - ? de_CustomConnectorDestinationProperties(output.CustomConnector, context) - : undefined, - CustomerProfiles: - output.CustomerProfiles != null - ? de_CustomerProfilesDestinationProperties(output.CustomerProfiles, context) - : undefined, - EventBridge: - output.EventBridge != null ? de_EventBridgeDestinationProperties(output.EventBridge, context) : undefined, - Honeycode: output.Honeycode != null ? de_HoneycodeDestinationProperties(output.Honeycode, context) : undefined, - LookoutMetrics: - output.LookoutMetrics != null - ? de_LookoutMetricsDestinationProperties(output.LookoutMetrics, context) - : undefined, - Marketo: output.Marketo != null ? de_MarketoDestinationProperties(output.Marketo, context) : undefined, - Redshift: output.Redshift != null ? de_RedshiftDestinationProperties(output.Redshift, context) : undefined, - S3: output.S3 != null ? de_S3DestinationProperties(output.S3, context) : undefined, - SAPOData: output.SAPOData != null ? de_SAPODataDestinationProperties(output.SAPOData, context) : undefined, - Salesforce: output.Salesforce != null ? de_SalesforceDestinationProperties(output.Salesforce, context) : undefined, - Snowflake: output.Snowflake != null ? de_SnowflakeDestinationProperties(output.Snowflake, context) : undefined, - Upsolver: output.Upsolver != null ? de_UpsolverDestinationProperties(output.Upsolver, context) : undefined, - Zendesk: output.Zendesk != null ? de_ZendeskDestinationProperties(output.Zendesk, context) : undefined, - } as any; -}; +// se_GoogleAnalyticsSourceProperties omitted. -/** - * deserializeAws_restJson1DestinationFieldProperties - */ -const de_DestinationFieldProperties = (output: any, context: __SerdeContext): DestinationFieldProperties => { - return { - isCreatable: __expectBoolean(output.isCreatable), - isDefaultedOnCreate: __expectBoolean(output.isDefaultedOnCreate), - isNullable: __expectBoolean(output.isNullable), - isUpdatable: __expectBoolean(output.isUpdatable), - isUpsertable: __expectBoolean(output.isUpsertable), - supportedWriteOperations: - output.supportedWriteOperations != null - ? de_SupportedWriteOperationList(output.supportedWriteOperations, context) - : undefined, - } as any; -}; +// se_HoneycodeConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1DestinationFlowConfig - */ -const de_DestinationFlowConfig = (output: any, context: __SerdeContext): DestinationFlowConfig => { - return { - apiVersion: __expectString(output.apiVersion), - connectorProfileName: __expectString(output.connectorProfileName), - connectorType: __expectString(output.connectorType), - destinationConnectorProperties: - output.destinationConnectorProperties != null - ? de_DestinationConnectorProperties(output.destinationConnectorProperties, context) - : undefined, - } as any; -}; +// se_HoneycodeConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1DestinationFlowConfigList - */ -const de_DestinationFlowConfigList = (output: any, context: __SerdeContext): DestinationFlowConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DestinationFlowConfig(entry, context); - }); - return retVal; -}; +// se_HoneycodeDestinationProperties omitted. -/** - * deserializeAws_restJson1DynatraceConnectorProfileProperties - */ -const de_DynatraceConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): DynatraceConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// se_IdFieldNameList omitted. -/** - * deserializeAws_restJson1DynatraceMetadata - */ -const de_DynatraceMetadata = (output: any, context: __SerdeContext): DynatraceMetadata => { - return {} as any; -}; +// se_IncrementalPullConfig omitted. -/** - * deserializeAws_restJson1DynatraceSourceProperties - */ -const de_DynatraceSourceProperties = (output: any, context: __SerdeContext): DynatraceSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// se_InforNexusConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1ErrorHandlingConfig - */ -const de_ErrorHandlingConfig = (output: any, context: __SerdeContext): ErrorHandlingConfig => { - return { - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - failOnFirstDestinationError: __expectBoolean(output.failOnFirstDestinationError), - } as any; -}; +// se_InforNexusConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1ErrorInfo - */ -const de_ErrorInfo = (output: any, context: __SerdeContext): ErrorInfo => { - return { - executionMessage: __expectString(output.executionMessage), - putFailuresCount: __expectLong(output.putFailuresCount), - } as any; -}; +// se_InforNexusSourceProperties omitted. -/** - * deserializeAws_restJson1EventBridgeDestinationProperties - */ -const de_EventBridgeDestinationProperties = ( - output: any, - context: __SerdeContext -): EventBridgeDestinationProperties => { - return { - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - object: __expectString(output.object), - } as any; -}; +// se_LambdaConnectorProvisioningConfig omitted. -/** - * deserializeAws_restJson1EventBridgeMetadata - */ -const de_EventBridgeMetadata = (output: any, context: __SerdeContext): EventBridgeMetadata => { - return {} as any; -}; +// se_LookoutMetricsDestinationProperties omitted. -/** - * deserializeAws_restJson1ExecutionDetails - */ -const de_ExecutionDetails = (output: any, context: __SerdeContext): ExecutionDetails => { - return { - mostRecentExecutionMessage: __expectString(output.mostRecentExecutionMessage), - mostRecentExecutionStatus: __expectString(output.mostRecentExecutionStatus), - mostRecentExecutionTime: - output.mostRecentExecutionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.mostRecentExecutionTime))) - : undefined, - } as any; -}; +// se_MarketoConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1ExecutionRecord - */ -const de_ExecutionRecord = (output: any, context: __SerdeContext): ExecutionRecord => { - return { - dataPullEndTime: - output.dataPullEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.dataPullEndTime))) - : undefined, - dataPullStartTime: - output.dataPullStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.dataPullStartTime))) - : undefined, - executionId: __expectString(output.executionId), - executionResult: output.executionResult != null ? de_ExecutionResult(output.executionResult, context) : undefined, - executionStatus: __expectString(output.executionStatus), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - metadataCatalogDetails: - output.metadataCatalogDetails != null - ? de_MetadataCatalogDetails(output.metadataCatalogDetails, context) - : undefined, - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - } as any; -}; +// se_MarketoConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1ExecutionResult - */ -const de_ExecutionResult = (output: any, context: __SerdeContext): ExecutionResult => { - return { - bytesProcessed: __expectLong(output.bytesProcessed), - bytesWritten: __expectLong(output.bytesWritten), - errorInfo: output.errorInfo != null ? de_ErrorInfo(output.errorInfo, context) : undefined, - recordsProcessed: __expectLong(output.recordsProcessed), - } as any; -}; +// se_MarketoDestinationProperties omitted. -/** - * deserializeAws_restJson1FieldTypeDetails - */ -const de_FieldTypeDetails = (output: any, context: __SerdeContext): FieldTypeDetails => { - return { - fieldLengthRange: output.fieldLengthRange != null ? de_Range(output.fieldLengthRange, context) : undefined, - fieldType: __expectString(output.fieldType), - fieldValueRange: output.fieldValueRange != null ? de_Range(output.fieldValueRange, context) : undefined, - filterOperators: - output.filterOperators != null ? de_FilterOperatorList(output.filterOperators, context) : undefined, - supportedDateFormat: __expectString(output.supportedDateFormat), - supportedValues: - output.supportedValues != null ? de_SupportedValueList(output.supportedValues, context) : undefined, - valueRegexPattern: __expectString(output.valueRegexPattern), - } as any; -}; +// se_MarketoSourceProperties omitted. -/** - * deserializeAws_restJson1FilterOperatorList - */ -const de_FilterOperatorList = (output: any, context: __SerdeContext): (Operator | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_MetadataCatalogConfig omitted. -/** - * deserializeAws_restJson1FlowDefinition - */ -const de_FlowDefinition = (output: any, context: __SerdeContext): FlowDefinition => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - description: __expectString(output.description), - destinationConnectorLabel: __expectString(output.destinationConnectorLabel), - destinationConnectorType: __expectString(output.destinationConnectorType), - flowArn: __expectString(output.flowArn), - flowName: __expectString(output.flowName), - flowStatus: __expectString(output.flowStatus), - lastRunExecutionDetails: - output.lastRunExecutionDetails != null ? de_ExecutionDetails(output.lastRunExecutionDetails, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lastUpdatedBy: __expectString(output.lastUpdatedBy), - sourceConnectorLabel: __expectString(output.sourceConnectorLabel), - sourceConnectorType: __expectString(output.sourceConnectorType), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - triggerType: __expectString(output.triggerType), - } as any; -}; +// se_OAuth2Credentials omitted. -/** - * deserializeAws_restJson1FlowExecutionList - */ -const de_FlowExecutionList = (output: any, context: __SerdeContext): ExecutionRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutionRecord(entry, context); - }); - return retVal; -}; +// se_OAuth2Properties omitted. -/** - * deserializeAws_restJson1FlowList - */ -const de_FlowList = (output: any, context: __SerdeContext): FlowDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FlowDefinition(entry, context); - }); - return retVal; -}; +// se_OAuthCredentials omitted. -/** - * deserializeAws_restJson1GlueDataCatalogConfig - */ -const de_GlueDataCatalogConfig = (output: any, context: __SerdeContext): GlueDataCatalogConfig => { - return { - databaseName: __expectString(output.databaseName), - roleArn: __expectString(output.roleArn), - tablePrefix: __expectString(output.tablePrefix), - } as any; -}; +// se_OAuthProperties omitted. -/** - * deserializeAws_restJson1GoogleAnalyticsConnectorProfileProperties - */ -const de_GoogleAnalyticsConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): GoogleAnalyticsConnectorProfileProperties => { - return {} as any; -}; +// se_OAuthScopeList omitted. -/** - * deserializeAws_restJson1GoogleAnalyticsMetadata - */ -const de_GoogleAnalyticsMetadata = (output: any, context: __SerdeContext): GoogleAnalyticsMetadata => { - return { - oAuthScopes: output.oAuthScopes != null ? de_OAuthScopeList(output.oAuthScopes, context) : undefined, - } as any; -}; +// se_PardotConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1GoogleAnalyticsSourceProperties - */ -const de_GoogleAnalyticsSourceProperties = (output: any, context: __SerdeContext): GoogleAnalyticsSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// se_PardotConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1HoneycodeConnectorProfileProperties - */ -const de_HoneycodeConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): HoneycodeConnectorProfileProperties => { - return {} as any; -}; +// se_PardotSourceProperties omitted. -/** - * deserializeAws_restJson1HoneycodeDestinationProperties - */ -const de_HoneycodeDestinationProperties = (output: any, context: __SerdeContext): HoneycodeDestinationProperties => { - return { - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - object: __expectString(output.object), - } as any; -}; +// se_PathPrefixHierarchy omitted. -/** - * deserializeAws_restJson1HoneycodeMetadata - */ -const de_HoneycodeMetadata = (output: any, context: __SerdeContext): HoneycodeMetadata => { - return { - oAuthScopes: output.oAuthScopes != null ? de_OAuthScopeList(output.oAuthScopes, context) : undefined, - } as any; -}; +// se_PrefixConfig omitted. -/** - * deserializeAws_restJson1IdFieldNameList - */ -const de_IdFieldNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ProfilePropertiesMap omitted. -/** - * deserializeAws_restJson1IncrementalPullConfig - */ -const de_IncrementalPullConfig = (output: any, context: __SerdeContext): IncrementalPullConfig => { - return { - datetimeTypeFieldName: __expectString(output.datetimeTypeFieldName), - } as any; -}; +// se_RedshiftConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1InforNexusConnectorProfileProperties - */ -const de_InforNexusConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): InforNexusConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// se_RedshiftConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1InforNexusMetadata - */ -const de_InforNexusMetadata = (output: any, context: __SerdeContext): InforNexusMetadata => { - return {} as any; -}; +// se_RedshiftDestinationProperties omitted. -/** - * deserializeAws_restJson1InforNexusSourceProperties - */ -const de_InforNexusSourceProperties = (output: any, context: __SerdeContext): InforNexusSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// se_S3DestinationProperties omitted. -/** - * deserializeAws_restJson1LambdaConnectorProvisioningConfig - */ -const de_LambdaConnectorProvisioningConfig = ( - output: any, - context: __SerdeContext -): LambdaConnectorProvisioningConfig => { - return { - lambdaArn: __expectString(output.lambdaArn), - } as any; -}; +// se_S3InputFormatConfig omitted. -/** - * deserializeAws_restJson1LookoutMetricsDestinationProperties - */ -const de_LookoutMetricsDestinationProperties = ( - output: any, - context: __SerdeContext -): LookoutMetricsDestinationProperties => { - return {} as any; -}; +// se_S3OutputFormatConfig omitted. -/** - * deserializeAws_restJson1MarketoConnectorProfileProperties - */ -const de_MarketoConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): MarketoConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// se_S3SourceProperties omitted. -/** - * deserializeAws_restJson1MarketoDestinationProperties - */ -const de_MarketoDestinationProperties = (output: any, context: __SerdeContext): MarketoDestinationProperties => { - return { - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - object: __expectString(output.object), - } as any; -}; +// se_SalesforceConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1MarketoMetadata - */ -const de_MarketoMetadata = (output: any, context: __SerdeContext): MarketoMetadata => { - return {} as any; -}; +// se_SalesforceConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1MarketoSourceProperties - */ -const de_MarketoSourceProperties = (output: any, context: __SerdeContext): MarketoSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// se_SalesforceDestinationProperties omitted. -/** - * deserializeAws_restJson1MetadataCatalogConfig - */ -const de_MetadataCatalogConfig = (output: any, context: __SerdeContext): MetadataCatalogConfig => { - return { - glueDataCatalog: - output.glueDataCatalog != null ? de_GlueDataCatalogConfig(output.glueDataCatalog, context) : undefined, - } as any; -}; +// se_SalesforceSourceProperties omitted. -/** - * deserializeAws_restJson1MetadataCatalogDetail - */ -const de_MetadataCatalogDetail = (output: any, context: __SerdeContext): MetadataCatalogDetail => { - return { - catalogType: __expectString(output.catalogType), - partitionRegistrationOutput: - output.partitionRegistrationOutput != null - ? de_RegistrationOutput(output.partitionRegistrationOutput, context) - : undefined, - tableName: __expectString(output.tableName), - tableRegistrationOutput: - output.tableRegistrationOutput != null - ? de_RegistrationOutput(output.tableRegistrationOutput, context) - : undefined, - } as any; -}; +// se_SAPODataConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1MetadataCatalogDetails - */ -const de_MetadataCatalogDetails = (output: any, context: __SerdeContext): MetadataCatalogDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetadataCatalogDetail(entry, context); - }); - return retVal; -}; +// se_SAPODataConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1OAuth2CustomParameter - */ -const de_OAuth2CustomParameter = (output: any, context: __SerdeContext): OAuth2CustomParameter => { - return { - connectorSuppliedValues: - output.connectorSuppliedValues != null - ? de_ConnectorSuppliedValueList(output.connectorSuppliedValues, context) - : undefined, - description: __expectString(output.description), - isRequired: __expectBoolean(output.isRequired), - isSensitiveField: __expectBoolean(output.isSensitiveField), - key: __expectString(output.key), - label: __expectString(output.label), - type: __expectString(output.type), - } as any; -}; +// se_SAPODataDestinationProperties omitted. -/** - * deserializeAws_restJson1OAuth2CustomPropertiesList - */ -const de_OAuth2CustomPropertiesList = (output: any, context: __SerdeContext): OAuth2CustomParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OAuth2CustomParameter(entry, context); - }); - return retVal; -}; +// se_SAPODataSourceProperties omitted. /** - * deserializeAws_restJson1OAuth2Defaults + * serializeAws_restJson1ScheduledTriggerProperties */ -const de_OAuth2Defaults = (output: any, context: __SerdeContext): OAuth2Defaults => { - return { - authCodeUrls: output.authCodeUrls != null ? de_AuthCodeUrlList(output.authCodeUrls, context) : undefined, - oauth2CustomProperties: - output.oauth2CustomProperties != null - ? de_OAuth2CustomPropertiesList(output.oauth2CustomProperties, context) - : undefined, - oauth2GrantTypesSupported: - output.oauth2GrantTypesSupported != null - ? de_OAuth2GrantTypeSupportedList(output.oauth2GrantTypesSupported, context) - : undefined, - oauthScopes: output.oauthScopes != null ? de_OAuthScopeList(output.oauthScopes, context) : undefined, - tokenUrls: output.tokenUrls != null ? de_TokenUrlList(output.tokenUrls, context) : undefined, - } as any; +const se_ScheduledTriggerProperties = (input: ScheduledTriggerProperties, context: __SerdeContext): any => { + return take(input, { + dataPullMode: [], + firstExecutionFrom: (_) => Math.round(_.getTime() / 1000), + flowErrorDeactivationThreshold: [], + scheduleEndTime: (_) => Math.round(_.getTime() / 1000), + scheduleExpression: [], + scheduleOffset: [], + scheduleStartTime: (_) => Math.round(_.getTime() / 1000), + timezone: [], + }); }; -/** - * deserializeAws_restJson1OAuth2GrantTypeSupportedList - */ -const de_OAuth2GrantTypeSupportedList = (output: any, context: __SerdeContext): (OAuth2GrantType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ServiceNowConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1OAuth2Properties - */ -const de_OAuth2Properties = (output: any, context: __SerdeContext): OAuth2Properties => { - return { - oAuth2GrantType: __expectString(output.oAuth2GrantType), - tokenUrl: __expectString(output.tokenUrl), - tokenUrlCustomProperties: - output.tokenUrlCustomProperties != null - ? de_TokenUrlCustomProperties(output.tokenUrlCustomProperties, context) - : undefined, - } as any; -}; +// se_ServiceNowConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1OAuthProperties - */ -const de_OAuthProperties = (output: any, context: __SerdeContext): OAuthProperties => { - return { - authCodeUrl: __expectString(output.authCodeUrl), - oAuthScopes: output.oAuthScopes != null ? de_OAuthScopeList(output.oAuthScopes, context) : undefined, - tokenUrl: __expectString(output.tokenUrl), - } as any; -}; +// se_ServiceNowSourceProperties omitted. -/** - * deserializeAws_restJson1OAuthScopeList - */ -const de_OAuthScopeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SingularConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1PardotConnectorProfileProperties - */ -const de_PardotConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): PardotConnectorProfileProperties => { - return { - businessUnitId: __expectString(output.businessUnitId), - instanceUrl: __expectString(output.instanceUrl), - isSandboxEnvironment: __expectBoolean(output.isSandboxEnvironment), - } as any; -}; +// se_SingularConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1PardotMetadata - */ -const de_PardotMetadata = (output: any, context: __SerdeContext): PardotMetadata => { - return {} as any; -}; +// se_SingularSourceProperties omitted. -/** - * deserializeAws_restJson1PardotSourceProperties - */ -const de_PardotSourceProperties = (output: any, context: __SerdeContext): PardotSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// se_SlackConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1PathPrefixHierarchy - */ -const de_PathPrefixHierarchy = (output: any, context: __SerdeContext): (PathPrefix | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SlackConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1PrefixConfig - */ -const de_PrefixConfig = (output: any, context: __SerdeContext): PrefixConfig => { - return { - pathPrefixHierarchy: - output.pathPrefixHierarchy != null ? de_PathPrefixHierarchy(output.pathPrefixHierarchy, context) : undefined, - prefixFormat: __expectString(output.prefixFormat), - prefixType: __expectString(output.prefixType), - } as any; -}; +// se_SlackSourceProperties omitted. -/** - * deserializeAws_restJson1PrivateConnectionProvisioningState - */ -const de_PrivateConnectionProvisioningState = ( - output: any, - context: __SerdeContext -): PrivateConnectionProvisioningState => { - return { - failureCause: __expectString(output.failureCause), - failureMessage: __expectString(output.failureMessage), - status: __expectString(output.status), - } as any; -}; +// se_SnowflakeConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1ProfilePropertiesMap - */ -const de_ProfilePropertiesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_SnowflakeConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1Range - */ -const de_Range = (output: any, context: __SerdeContext): Range => { - return { - maximum: __limitedParseDouble(output.maximum), - minimum: __limitedParseDouble(output.minimum), - } as any; -}; +// se_SnowflakeDestinationProperties omitted. -/** - * deserializeAws_restJson1RedshiftConnectorProfileProperties - */ -const de_RedshiftConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): RedshiftConnectorProfileProperties => { - return { - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - clusterIdentifier: __expectString(output.clusterIdentifier), - dataApiRoleArn: __expectString(output.dataApiRoleArn), - databaseName: __expectString(output.databaseName), - databaseUrl: __expectString(output.databaseUrl), - isRedshiftServerless: __expectBoolean(output.isRedshiftServerless), - roleArn: __expectString(output.roleArn), - workgroupName: __expectString(output.workgroupName), - } as any; -}; +// se_SourceConnectorProperties omitted. -/** - * deserializeAws_restJson1RedshiftDestinationProperties - */ -const de_RedshiftDestinationProperties = (output: any, context: __SerdeContext): RedshiftDestinationProperties => { - return { - bucketPrefix: __expectString(output.bucketPrefix), - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - intermediateBucketName: __expectString(output.intermediateBucketName), - object: __expectString(output.object), - } as any; -}; +// se_SourceFields omitted. -/** - * deserializeAws_restJson1RedshiftMetadata - */ -const de_RedshiftMetadata = (output: any, context: __SerdeContext): RedshiftMetadata => { - return {} as any; -}; +// se_SourceFlowConfig omitted. -/** - * deserializeAws_restJson1RegionList - */ -const de_RegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SuccessResponseHandlingConfig omitted. -/** - * deserializeAws_restJson1RegistrationOutput - */ -const de_RegistrationOutput = (output: any, context: __SerdeContext): RegistrationOutput => { - return { - message: __expectString(output.message), - result: __expectString(output.result), - status: __expectString(output.status), - } as any; -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1S3DestinationProperties - */ -const de_S3DestinationProperties = (output: any, context: __SerdeContext): S3DestinationProperties => { - return { - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - s3OutputFormatConfig: - output.s3OutputFormatConfig != null ? de_S3OutputFormatConfig(output.s3OutputFormatConfig, context) : undefined, - } as any; -}; +// se_Task omitted. -/** - * deserializeAws_restJson1S3InputFormatConfig - */ -const de_S3InputFormatConfig = (output: any, context: __SerdeContext): S3InputFormatConfig => { - return { - s3InputFileType: __expectString(output.s3InputFileType), - } as any; -}; +// se_TaskPropertiesMap omitted. -/** - * deserializeAws_restJson1S3Metadata - */ -const de_S3Metadata = (output: any, context: __SerdeContext): S3Metadata => { - return {} as any; -}; +// se_Tasks omitted. -/** - * deserializeAws_restJson1S3OutputFormatConfig - */ -const de_S3OutputFormatConfig = (output: any, context: __SerdeContext): S3OutputFormatConfig => { - return { - aggregationConfig: - output.aggregationConfig != null ? de_AggregationConfig(output.aggregationConfig, context) : undefined, - fileType: __expectString(output.fileType), - prefixConfig: output.prefixConfig != null ? de_PrefixConfig(output.prefixConfig, context) : undefined, - preserveSourceDataTyping: __expectBoolean(output.preserveSourceDataTyping), - } as any; -}; +// se_TokenUrlCustomProperties omitted. -/** - * deserializeAws_restJson1S3SourceProperties - */ -const de_S3SourceProperties = (output: any, context: __SerdeContext): S3SourceProperties => { - return { - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - s3InputFormatConfig: - output.s3InputFormatConfig != null ? de_S3InputFormatConfig(output.s3InputFormatConfig, context) : undefined, - } as any; -}; +// se_TrendmicroConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1SalesforceConnectorProfileProperties - */ -const de_SalesforceConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): SalesforceConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - isSandboxEnvironment: __expectBoolean(output.isSandboxEnvironment), - usePrivateLinkForMetadataAndAuthorization: __expectBoolean(output.usePrivateLinkForMetadataAndAuthorization), - } as any; -}; +// se_TrendmicroConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1SalesforceDataTransferApiList - */ -const de_SalesforceDataTransferApiList = ( - output: any, - context: __SerdeContext -): (SalesforceDataTransferApi | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TrendmicroSourceProperties omitted. /** - * deserializeAws_restJson1SalesforceDestinationProperties + * serializeAws_restJson1TriggerConfig */ -const de_SalesforceDestinationProperties = (output: any, context: __SerdeContext): SalesforceDestinationProperties => { - return { - dataTransferApi: __expectString(output.dataTransferApi), - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - idFieldNames: output.idFieldNames != null ? de_IdFieldNameList(output.idFieldNames, context) : undefined, - object: __expectString(output.object), - writeOperationType: __expectString(output.writeOperationType), - } as any; +const se_TriggerConfig = (input: TriggerConfig, context: __SerdeContext): any => { + return take(input, { + triggerProperties: (_) => se_TriggerProperties(_, context), + triggerType: [], + }); }; /** - * deserializeAws_restJson1SalesforceMetadata + * serializeAws_restJson1TriggerProperties */ -const de_SalesforceMetadata = (output: any, context: __SerdeContext): SalesforceMetadata => { - return { - dataTransferApis: - output.dataTransferApis != null ? de_SalesforceDataTransferApiList(output.dataTransferApis, context) : undefined, - oAuthScopes: output.oAuthScopes != null ? de_OAuthScopeList(output.oAuthScopes, context) : undefined, - } as any; +const se_TriggerProperties = (input: TriggerProperties, context: __SerdeContext): any => { + return take(input, { + Scheduled: (_) => se_ScheduledTriggerProperties(_, context), + }); }; -/** - * deserializeAws_restJson1SalesforceSourceProperties - */ -const de_SalesforceSourceProperties = (output: any, context: __SerdeContext): SalesforceSourceProperties => { - return { - dataTransferApi: __expectString(output.dataTransferApi), - enableDynamicFieldUpdate: __expectBoolean(output.enableDynamicFieldUpdate), - includeDeletedRecords: __expectBoolean(output.includeDeletedRecords), - object: __expectString(output.object), - } as any; -}; +// se_UpsolverDestinationProperties omitted. -/** - * deserializeAws_restJson1SAPODataConnectorProfileProperties - */ -const de_SAPODataConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): SAPODataConnectorProfileProperties => { - return { - applicationHostUrl: __expectString(output.applicationHostUrl), - applicationServicePath: __expectString(output.applicationServicePath), - clientNumber: __expectString(output.clientNumber), - logonLanguage: __expectString(output.logonLanguage), - oAuthProperties: output.oAuthProperties != null ? de_OAuthProperties(output.oAuthProperties, context) : undefined, - portNumber: __expectInt32(output.portNumber), - privateLinkServiceName: __expectString(output.privateLinkServiceName), - } as any; -}; +// se_UpsolverS3OutputFormatConfig omitted. -/** - * deserializeAws_restJson1SAPODataDestinationProperties - */ -const de_SAPODataDestinationProperties = (output: any, context: __SerdeContext): SAPODataDestinationProperties => { - return { - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - idFieldNames: output.idFieldNames != null ? de_IdFieldNameList(output.idFieldNames, context) : undefined, - objectPath: __expectString(output.objectPath), - successResponseHandlingConfig: - output.successResponseHandlingConfig != null - ? de_SuccessResponseHandlingConfig(output.successResponseHandlingConfig, context) - : undefined, - writeOperationType: __expectString(output.writeOperationType), - } as any; -}; +// se_VeevaConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1SAPODataMetadata - */ -const de_SAPODataMetadata = (output: any, context: __SerdeContext): SAPODataMetadata => { - return {} as any; -}; +// se_VeevaConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1SAPODataSourceProperties - */ -const de_SAPODataSourceProperties = (output: any, context: __SerdeContext): SAPODataSourceProperties => { - return { - objectPath: __expectString(output.objectPath), - } as any; -}; +// se_VeevaSourceProperties omitted. -/** - * deserializeAws_restJson1ScheduledTriggerProperties - */ -const de_ScheduledTriggerProperties = (output: any, context: __SerdeContext): ScheduledTriggerProperties => { - return { - dataPullMode: __expectString(output.dataPullMode), - firstExecutionFrom: - output.firstExecutionFrom != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.firstExecutionFrom))) - : undefined, - flowErrorDeactivationThreshold: __expectInt32(output.flowErrorDeactivationThreshold), - scheduleEndTime: - output.scheduleEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scheduleEndTime))) - : undefined, - scheduleExpression: __expectString(output.scheduleExpression), - scheduleOffset: __expectLong(output.scheduleOffset), - scheduleStartTime: - output.scheduleStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scheduleStartTime))) - : undefined, - timezone: __expectString(output.timezone), - } as any; -}; +// se_ZendeskConnectorProfileCredentials omitted. -/** - * deserializeAws_restJson1SchedulingFrequencyTypeList - */ -const de_SchedulingFrequencyTypeList = (output: any, context: __SerdeContext): (ScheduleFrequencyType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ZendeskConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1ServiceNowConnectorProfileProperties - */ -const de_ServiceNowConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): ServiceNowConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// se_ZendeskDestinationProperties omitted. -/** - * deserializeAws_restJson1ServiceNowMetadata - */ -const de_ServiceNowMetadata = (output: any, context: __SerdeContext): ServiceNowMetadata => { - return {} as any; -}; +// se_ZendeskSourceProperties omitted. -/** - * deserializeAws_restJson1ServiceNowSourceProperties - */ -const de_ServiceNowSourceProperties = (output: any, context: __SerdeContext): ServiceNowSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// de_AggregationConfig omitted. -/** - * deserializeAws_restJson1SingularConnectorProfileProperties - */ -const de_SingularConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): SingularConnectorProfileProperties => { - return {} as any; -}; +// de_AmplitudeConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1SingularMetadata - */ -const de_SingularMetadata = (output: any, context: __SerdeContext): SingularMetadata => { - return {} as any; -}; +// de_AmplitudeMetadata omitted. -/** - * deserializeAws_restJson1SingularSourceProperties - */ -const de_SingularSourceProperties = (output: any, context: __SerdeContext): SingularSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// de_AmplitudeSourceProperties omitted. -/** - * deserializeAws_restJson1SlackConnectorProfileProperties - */ -const de_SlackConnectorProfileProperties = (output: any, context: __SerdeContext): SlackConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// de_AuthCodeUrlList omitted. -/** - * deserializeAws_restJson1SlackMetadata - */ -const de_SlackMetadata = (output: any, context: __SerdeContext): SlackMetadata => { - return { - oAuthScopes: output.oAuthScopes != null ? de_OAuthScopeList(output.oAuthScopes, context) : undefined, - } as any; -}; +// de_AuthenticationConfig omitted. -/** - * deserializeAws_restJson1SlackSourceProperties - */ -const de_SlackSourceProperties = (output: any, context: __SerdeContext): SlackSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// de_AuthParameter omitted. -/** - * deserializeAws_restJson1SnowflakeConnectorProfileProperties - */ -const de_SnowflakeConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): SnowflakeConnectorProfileProperties => { - return { - accountName: __expectString(output.accountName), - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - privateLinkServiceName: __expectString(output.privateLinkServiceName), - region: __expectString(output.region), - stage: __expectString(output.stage), - warehouse: __expectString(output.warehouse), - } as any; -}; +// de_AuthParameterList omitted. /** - * deserializeAws_restJson1SnowflakeDestinationProperties + * deserializeAws_restJson1ConnectorConfiguration */ -const de_SnowflakeDestinationProperties = (output: any, context: __SerdeContext): SnowflakeDestinationProperties => { - return { - bucketPrefix: __expectString(output.bucketPrefix), - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - intermediateBucketName: __expectString(output.intermediateBucketName), - object: __expectString(output.object), - } as any; +const de_ConnectorConfiguration = (output: any, context: __SerdeContext): ConnectorConfiguration => { + return take(output, { + authenticationConfig: _json, + canUseAsDestination: __expectBoolean, + canUseAsSource: __expectBoolean, + connectorArn: __expectString, + connectorDescription: __expectString, + connectorLabel: __expectString, + connectorMetadata: _json, + connectorModes: _json, + connectorName: __expectString, + connectorOwner: __expectString, + connectorProvisioningConfig: _json, + connectorProvisioningType: __expectString, + connectorRuntimeSettings: _json, + connectorType: __expectString, + connectorVersion: __expectString, + isPrivateLinkEnabled: __expectBoolean, + isPrivateLinkEndpointUrlRequired: __expectBoolean, + logoURL: __expectString, + registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registeredBy: __expectString, + supportedApiVersions: _json, + supportedDestinationConnectors: _json, + supportedOperators: _json, + supportedSchedulingFrequencies: _json, + supportedTriggerTypes: _json, + supportedWriteOperations: _json, + }) as any; }; /** - * deserializeAws_restJson1SnowflakeMetadata + * deserializeAws_restJson1ConnectorConfigurationsMap */ -const de_SnowflakeMetadata = (output: any, context: __SerdeContext): SnowflakeMetadata => { - return { - supportedRegions: output.supportedRegions != null ? de_RegionList(output.supportedRegions, context) : undefined, - } as any; +const de_ConnectorConfigurationsMap = ( + output: any, + context: __SerdeContext +): Record => { + return Object.entries(output).reduce( + (acc: Record, [key, value]: [ConnectorType | string, any]) => { + if (value === null) { + return acc; + } + acc[key] = de_ConnectorConfiguration(value, context); + return acc; + }, + {} + ); }; /** - * deserializeAws_restJson1SourceConnectorProperties + * deserializeAws_restJson1ConnectorDetail */ -const de_SourceConnectorProperties = (output: any, context: __SerdeContext): SourceConnectorProperties => { - return { - Amplitude: output.Amplitude != null ? de_AmplitudeSourceProperties(output.Amplitude, context) : undefined, - CustomConnector: - output.CustomConnector != null ? de_CustomConnectorSourceProperties(output.CustomConnector, context) : undefined, - Datadog: output.Datadog != null ? de_DatadogSourceProperties(output.Datadog, context) : undefined, - Dynatrace: output.Dynatrace != null ? de_DynatraceSourceProperties(output.Dynatrace, context) : undefined, - GoogleAnalytics: - output.GoogleAnalytics != null ? de_GoogleAnalyticsSourceProperties(output.GoogleAnalytics, context) : undefined, - InforNexus: output.InforNexus != null ? de_InforNexusSourceProperties(output.InforNexus, context) : undefined, - Marketo: output.Marketo != null ? de_MarketoSourceProperties(output.Marketo, context) : undefined, - Pardot: output.Pardot != null ? de_PardotSourceProperties(output.Pardot, context) : undefined, - S3: output.S3 != null ? de_S3SourceProperties(output.S3, context) : undefined, - SAPOData: output.SAPOData != null ? de_SAPODataSourceProperties(output.SAPOData, context) : undefined, - Salesforce: output.Salesforce != null ? de_SalesforceSourceProperties(output.Salesforce, context) : undefined, - ServiceNow: output.ServiceNow != null ? de_ServiceNowSourceProperties(output.ServiceNow, context) : undefined, - Singular: output.Singular != null ? de_SingularSourceProperties(output.Singular, context) : undefined, - Slack: output.Slack != null ? de_SlackSourceProperties(output.Slack, context) : undefined, - Trendmicro: output.Trendmicro != null ? de_TrendmicroSourceProperties(output.Trendmicro, context) : undefined, - Veeva: output.Veeva != null ? de_VeevaSourceProperties(output.Veeva, context) : undefined, - Zendesk: output.Zendesk != null ? de_ZendeskSourceProperties(output.Zendesk, context) : undefined, - } as any; +const de_ConnectorDetail = (output: any, context: __SerdeContext): ConnectorDetail => { + return take(output, { + applicationType: __expectString, + connectorDescription: __expectString, + connectorLabel: __expectString, + connectorModes: _json, + connectorName: __expectString, + connectorOwner: __expectString, + connectorProvisioningType: __expectString, + connectorType: __expectString, + connectorVersion: __expectString, + registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registeredBy: __expectString, + }) as any; }; +// de_ConnectorEntity omitted. + /** - * deserializeAws_restJson1SourceFieldProperties + * deserializeAws_restJson1ConnectorEntityField */ -const de_SourceFieldProperties = (output: any, context: __SerdeContext): SourceFieldProperties => { - return { - isQueryable: __expectBoolean(output.isQueryable), - isRetrievable: __expectBoolean(output.isRetrievable), - isTimestampFieldForIncrementalQueries: __expectBoolean(output.isTimestampFieldForIncrementalQueries), - } as any; +const de_ConnectorEntityField = (output: any, context: __SerdeContext): ConnectorEntityField => { + return take(output, { + customProperties: _json, + defaultValue: __expectString, + description: __expectString, + destinationProperties: _json, + identifier: __expectString, + isDeprecated: __expectBoolean, + isPrimaryKey: __expectBoolean, + label: __expectString, + parentIdentifier: __expectString, + sourceProperties: _json, + supportedFieldTypeDetails: (_: any) => de_SupportedFieldTypeDetails(_, context), + }) as any; }; /** - * deserializeAws_restJson1SourceFields + * deserializeAws_restJson1ConnectorEntityFieldList */ -const de_SourceFields = (output: any, context: __SerdeContext): string[] => { +const de_ConnectorEntityFieldList = (output: any, context: __SerdeContext): ConnectorEntityField[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ConnectorEntityField(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SourceFlowConfig - */ -const de_SourceFlowConfig = (output: any, context: __SerdeContext): SourceFlowConfig => { - return { - apiVersion: __expectString(output.apiVersion), - connectorProfileName: __expectString(output.connectorProfileName), - connectorType: __expectString(output.connectorType), - incrementalPullConfig: - output.incrementalPullConfig != null - ? de_IncrementalPullConfig(output.incrementalPullConfig, context) - : undefined, - sourceConnectorProperties: - output.sourceConnectorProperties != null - ? de_SourceConnectorProperties(output.sourceConnectorProperties, context) - : undefined, - } as any; -}; +// de_ConnectorEntityList omitted. -/** - * deserializeAws_restJson1SuccessResponseHandlingConfig - */ -const de_SuccessResponseHandlingConfig = (output: any, context: __SerdeContext): SuccessResponseHandlingConfig => { - return { - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - } as any; -}; +// de_ConnectorEntityMap omitted. /** - * deserializeAws_restJson1SupportedApiVersionList + * deserializeAws_restJson1ConnectorList */ -const de_SupportedApiVersionList = (output: any, context: __SerdeContext): string[] => { +const de_ConnectorList = (output: any, context: __SerdeContext): ConnectorDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ConnectorDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SupportedFieldTypeDetails - */ -const de_SupportedFieldTypeDetails = (output: any, context: __SerdeContext): SupportedFieldTypeDetails => { - return { - v1: output.v1 != null ? de_FieldTypeDetails(output.v1, context) : undefined, - } as any; -}; +// de_ConnectorMetadata omitted. + +// de_ConnectorModeList omitted. + +// de_ConnectorOperator omitted. /** - * deserializeAws_restJson1SupportedOperatorList + * deserializeAws_restJson1ConnectorProfile */ -const de_SupportedOperatorList = (output: any, context: __SerdeContext): (Operators | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ConnectorProfile = (output: any, context: __SerdeContext): ConnectorProfile => { + return take(output, { + connectionMode: __expectString, + connectorLabel: __expectString, + connectorProfileArn: __expectString, + connectorProfileName: __expectString, + connectorProfileProperties: _json, + connectorType: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + credentialsArn: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + privateConnectionProvisioningState: _json, + }) as any; }; /** - * deserializeAws_restJson1SupportedValueList + * deserializeAws_restJson1ConnectorProfileDetailList */ -const de_SupportedValueList = (output: any, context: __SerdeContext): string[] => { +const de_ConnectorProfileDetailList = (output: any, context: __SerdeContext): ConnectorProfile[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ConnectorProfile(entry, context); }); return retVal; }; +// de_ConnectorProfileProperties omitted. + +// de_ConnectorProvisioningConfig omitted. + +// de_ConnectorRuntimeSetting omitted. + +// de_ConnectorRuntimeSettingList omitted. + +// de_ConnectorSuppliedValueList omitted. + +// de_ConnectorSuppliedValueOptionList omitted. + +// de_ConnectorTypeList omitted. + +// de_CustomAuthConfig omitted. + +// de_CustomAuthConfigList omitted. + +// de_CustomConnectorDestinationProperties omitted. + +// de_CustomConnectorProfileProperties omitted. + +// de_CustomConnectorSourceProperties omitted. + +// de_CustomerProfilesDestinationProperties omitted. + +// de_CustomerProfilesMetadata omitted. + +// de_CustomProperties omitted. + +// de_DatadogConnectorProfileProperties omitted. + +// de_DatadogMetadata omitted. + +// de_DatadogSourceProperties omitted. + +// de_DestinationConnectorProperties omitted. + +// de_DestinationFieldProperties omitted. + +// de_DestinationFlowConfig omitted. + +// de_DestinationFlowConfigList omitted. + +// de_DynatraceConnectorProfileProperties omitted. + +// de_DynatraceMetadata omitted. + +// de_DynatraceSourceProperties omitted. + +// de_ErrorHandlingConfig omitted. + +// de_ErrorInfo omitted. + +// de_EventBridgeDestinationProperties omitted. + +// de_EventBridgeMetadata omitted. + /** - * deserializeAws_restJson1SupportedWriteOperationList + * deserializeAws_restJson1ExecutionDetails */ -const de_SupportedWriteOperationList = (output: any, context: __SerdeContext): (WriteOperationType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ExecutionDetails = (output: any, context: __SerdeContext): ExecutionDetails => { + return take(output, { + mostRecentExecutionMessage: __expectString, + mostRecentExecutionStatus: __expectString, + mostRecentExecutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1TagMap + * deserializeAws_restJson1ExecutionRecord */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_ExecutionRecord = (output: any, context: __SerdeContext): ExecutionRecord => { + return take(output, { + dataPullEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataPullStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + executionId: __expectString, + executionResult: _json, + executionStatus: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metadataCatalogDetails: _json, + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ExecutionResult omitted. + /** - * deserializeAws_restJson1Task + * deserializeAws_restJson1FieldTypeDetails */ -const de_Task = (output: any, context: __SerdeContext): Task => { - return { - connectorOperator: - output.connectorOperator != null ? de_ConnectorOperator(output.connectorOperator, context) : undefined, - destinationField: __expectString(output.destinationField), - sourceFields: output.sourceFields != null ? de_SourceFields(output.sourceFields, context) : undefined, - taskProperties: output.taskProperties != null ? de_TaskPropertiesMap(output.taskProperties, context) : undefined, - taskType: __expectString(output.taskType), - } as any; +const de_FieldTypeDetails = (output: any, context: __SerdeContext): FieldTypeDetails => { + return take(output, { + fieldLengthRange: (_: any) => de_Range(_, context), + fieldType: __expectString, + fieldValueRange: (_: any) => de_Range(_, context), + filterOperators: _json, + supportedDateFormat: __expectString, + supportedValues: _json, + valueRegexPattern: __expectString, + }) as any; }; +// de_FilterOperatorList omitted. + /** - * deserializeAws_restJson1TaskPropertiesMap + * deserializeAws_restJson1FlowDefinition */ -const de_TaskPropertiesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [OperatorPropertiesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); +const de_FlowDefinition = (output: any, context: __SerdeContext): FlowDefinition => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + description: __expectString, + destinationConnectorLabel: __expectString, + destinationConnectorType: __expectString, + flowArn: __expectString, + flowName: __expectString, + flowStatus: __expectString, + lastRunExecutionDetails: (_: any) => de_ExecutionDetails(_, context), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedBy: __expectString, + sourceConnectorLabel: __expectString, + sourceConnectorType: __expectString, + tags: _json, + triggerType: __expectString, + }) as any; }; /** - * deserializeAws_restJson1Tasks + * deserializeAws_restJson1FlowExecutionList */ -const de_Tasks = (output: any, context: __SerdeContext): Task[] => { +const de_FlowExecutionList = (output: any, context: __SerdeContext): ExecutionRecord[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Task(entry, context); + return de_ExecutionRecord(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1TokenUrlCustomProperties - */ -const de_TokenUrlCustomProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1TokenUrlList + * deserializeAws_restJson1FlowList */ -const de_TokenUrlList = (output: any, context: __SerdeContext): string[] => { +const de_FlowList = (output: any, context: __SerdeContext): FlowDefinition[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_FlowDefinition(entry, context); }); return retVal; }; +// de_GlueDataCatalogConfig omitted. + +// de_GoogleAnalyticsConnectorProfileProperties omitted. + +// de_GoogleAnalyticsMetadata omitted. + +// de_GoogleAnalyticsSourceProperties omitted. + +// de_HoneycodeConnectorProfileProperties omitted. + +// de_HoneycodeDestinationProperties omitted. + +// de_HoneycodeMetadata omitted. + +// de_IdFieldNameList omitted. + +// de_IncrementalPullConfig omitted. + +// de_InforNexusConnectorProfileProperties omitted. + +// de_InforNexusMetadata omitted. + +// de_InforNexusSourceProperties omitted. + +// de_LambdaConnectorProvisioningConfig omitted. + +// de_LookoutMetricsDestinationProperties omitted. + +// de_MarketoConnectorProfileProperties omitted. + +// de_MarketoDestinationProperties omitted. + +// de_MarketoMetadata omitted. + +// de_MarketoSourceProperties omitted. + +// de_MetadataCatalogConfig omitted. + +// de_MetadataCatalogDetail omitted. + +// de_MetadataCatalogDetails omitted. + +// de_OAuth2CustomParameter omitted. + +// de_OAuth2CustomPropertiesList omitted. + +// de_OAuth2Defaults omitted. + +// de_OAuth2GrantTypeSupportedList omitted. + +// de_OAuth2Properties omitted. + +// de_OAuthProperties omitted. + +// de_OAuthScopeList omitted. + +// de_PardotConnectorProfileProperties omitted. + +// de_PardotMetadata omitted. + +// de_PardotSourceProperties omitted. + +// de_PathPrefixHierarchy omitted. + +// de_PrefixConfig omitted. + +// de_PrivateConnectionProvisioningState omitted. + +// de_ProfilePropertiesMap omitted. + /** - * deserializeAws_restJson1TrendmicroConnectorProfileProperties + * deserializeAws_restJson1Range */ -const de_TrendmicroConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): TrendmicroConnectorProfileProperties => { - return {} as any; +const de_Range = (output: any, context: __SerdeContext): Range => { + return take(output, { + maximum: __limitedParseDouble, + minimum: __limitedParseDouble, + }) as any; }; +// de_RedshiftConnectorProfileProperties omitted. + +// de_RedshiftDestinationProperties omitted. + +// de_RedshiftMetadata omitted. + +// de_RegionList omitted. + +// de_RegistrationOutput omitted. + +// de_S3DestinationProperties omitted. + +// de_S3InputFormatConfig omitted. + +// de_S3Metadata omitted. + +// de_S3OutputFormatConfig omitted. + +// de_S3SourceProperties omitted. + +// de_SalesforceConnectorProfileProperties omitted. + +// de_SalesforceDataTransferApiList omitted. + +// de_SalesforceDestinationProperties omitted. + +// de_SalesforceMetadata omitted. + +// de_SalesforceSourceProperties omitted. + +// de_SAPODataConnectorProfileProperties omitted. + +// de_SAPODataDestinationProperties omitted. + +// de_SAPODataMetadata omitted. + +// de_SAPODataSourceProperties omitted. + /** - * deserializeAws_restJson1TrendmicroMetadata + * deserializeAws_restJson1ScheduledTriggerProperties */ -const de_TrendmicroMetadata = (output: any, context: __SerdeContext): TrendmicroMetadata => { - return {} as any; +const de_ScheduledTriggerProperties = (output: any, context: __SerdeContext): ScheduledTriggerProperties => { + return take(output, { + dataPullMode: __expectString, + firstExecutionFrom: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + flowErrorDeactivationThreshold: __expectInt32, + scheduleEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + scheduleExpression: __expectString, + scheduleOffset: __expectLong, + scheduleStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + timezone: __expectString, + }) as any; }; +// de_SchedulingFrequencyTypeList omitted. + +// de_ServiceNowConnectorProfileProperties omitted. + +// de_ServiceNowMetadata omitted. + +// de_ServiceNowSourceProperties omitted. + +// de_SingularConnectorProfileProperties omitted. + +// de_SingularMetadata omitted. + +// de_SingularSourceProperties omitted. + +// de_SlackConnectorProfileProperties omitted. + +// de_SlackMetadata omitted. + +// de_SlackSourceProperties omitted. + +// de_SnowflakeConnectorProfileProperties omitted. + +// de_SnowflakeDestinationProperties omitted. + +// de_SnowflakeMetadata omitted. + +// de_SourceConnectorProperties omitted. + +// de_SourceFieldProperties omitted. + +// de_SourceFields omitted. + +// de_SourceFlowConfig omitted. + +// de_SuccessResponseHandlingConfig omitted. + +// de_SupportedApiVersionList omitted. + /** - * deserializeAws_restJson1TrendmicroSourceProperties + * deserializeAws_restJson1SupportedFieldTypeDetails */ -const de_TrendmicroSourceProperties = (output: any, context: __SerdeContext): TrendmicroSourceProperties => { - return { - object: __expectString(output.object), - } as any; +const de_SupportedFieldTypeDetails = (output: any, context: __SerdeContext): SupportedFieldTypeDetails => { + return take(output, { + v1: (_: any) => de_FieldTypeDetails(_, context), + }) as any; }; +// de_SupportedOperatorList omitted. + +// de_SupportedValueList omitted. + +// de_SupportedWriteOperationList omitted. + +// de_TagMap omitted. + +// de_Task omitted. + +// de_TaskPropertiesMap omitted. + +// de_Tasks omitted. + +// de_TokenUrlCustomProperties omitted. + +// de_TokenUrlList omitted. + +// de_TrendmicroConnectorProfileProperties omitted. + +// de_TrendmicroMetadata omitted. + +// de_TrendmicroSourceProperties omitted. + /** * deserializeAws_restJson1TriggerConfig */ const de_TriggerConfig = (output: any, context: __SerdeContext): TriggerConfig => { - return { - triggerProperties: - output.triggerProperties != null ? de_TriggerProperties(output.triggerProperties, context) : undefined, - triggerType: __expectString(output.triggerType), - } as any; + return take(output, { + triggerProperties: (_: any) => de_TriggerProperties(_, context), + triggerType: __expectString, + }) as any; }; /** * deserializeAws_restJson1TriggerProperties */ const de_TriggerProperties = (output: any, context: __SerdeContext): TriggerProperties => { - return { - Scheduled: output.Scheduled != null ? de_ScheduledTriggerProperties(output.Scheduled, context) : undefined, - } as any; + return take(output, { + Scheduled: (_: any) => de_ScheduledTriggerProperties(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TriggerTypeList - */ -const de_TriggerTypeList = (output: any, context: __SerdeContext): (TriggerType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TriggerTypeList omitted. -/** - * deserializeAws_restJson1UpsolverDestinationProperties - */ -const de_UpsolverDestinationProperties = (output: any, context: __SerdeContext): UpsolverDestinationProperties => { - return { - bucketName: __expectString(output.bucketName), - bucketPrefix: __expectString(output.bucketPrefix), - s3OutputFormatConfig: - output.s3OutputFormatConfig != null - ? de_UpsolverS3OutputFormatConfig(output.s3OutputFormatConfig, context) - : undefined, - } as any; -}; +// de_UpsolverDestinationProperties omitted. -/** - * deserializeAws_restJson1UpsolverMetadata - */ -const de_UpsolverMetadata = (output: any, context: __SerdeContext): UpsolverMetadata => { - return {} as any; -}; +// de_UpsolverMetadata omitted. -/** - * deserializeAws_restJson1UpsolverS3OutputFormatConfig - */ -const de_UpsolverS3OutputFormatConfig = (output: any, context: __SerdeContext): UpsolverS3OutputFormatConfig => { - return { - aggregationConfig: - output.aggregationConfig != null ? de_AggregationConfig(output.aggregationConfig, context) : undefined, - fileType: __expectString(output.fileType), - prefixConfig: output.prefixConfig != null ? de_PrefixConfig(output.prefixConfig, context) : undefined, - } as any; -}; +// de_UpsolverS3OutputFormatConfig omitted. -/** - * deserializeAws_restJson1VeevaConnectorProfileProperties - */ -const de_VeevaConnectorProfileProperties = (output: any, context: __SerdeContext): VeevaConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// de_VeevaConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1VeevaMetadata - */ -const de_VeevaMetadata = (output: any, context: __SerdeContext): VeevaMetadata => { - return {} as any; -}; +// de_VeevaMetadata omitted. -/** - * deserializeAws_restJson1VeevaSourceProperties - */ -const de_VeevaSourceProperties = (output: any, context: __SerdeContext): VeevaSourceProperties => { - return { - documentType: __expectString(output.documentType), - includeAllVersions: __expectBoolean(output.includeAllVersions), - includeRenditions: __expectBoolean(output.includeRenditions), - includeSourceFiles: __expectBoolean(output.includeSourceFiles), - object: __expectString(output.object), - } as any; -}; +// de_VeevaSourceProperties omitted. -/** - * deserializeAws_restJson1ZendeskConnectorProfileProperties - */ -const de_ZendeskConnectorProfileProperties = ( - output: any, - context: __SerdeContext -): ZendeskConnectorProfileProperties => { - return { - instanceUrl: __expectString(output.instanceUrl), - } as any; -}; +// de_ZendeskConnectorProfileProperties omitted. -/** - * deserializeAws_restJson1ZendeskDestinationProperties - */ -const de_ZendeskDestinationProperties = (output: any, context: __SerdeContext): ZendeskDestinationProperties => { - return { - errorHandlingConfig: - output.errorHandlingConfig != null ? de_ErrorHandlingConfig(output.errorHandlingConfig, context) : undefined, - idFieldNames: output.idFieldNames != null ? de_IdFieldNameList(output.idFieldNames, context) : undefined, - object: __expectString(output.object), - writeOperationType: __expectString(output.writeOperationType), - } as any; -}; +// de_ZendeskDestinationProperties omitted. -/** - * deserializeAws_restJson1ZendeskMetadata - */ -const de_ZendeskMetadata = (output: any, context: __SerdeContext): ZendeskMetadata => { - return { - oAuthScopes: output.oAuthScopes != null ? de_OAuthScopeList(output.oAuthScopes, context) : undefined, - } as any; -}; +// de_ZendeskMetadata omitted. -/** - * deserializeAws_restJson1ZendeskSourceProperties - */ -const de_ZendeskSourceProperties = (output: any, context: __SerdeContext): ZendeskSourceProperties => { - return { - object: __expectString(output.object), - } as any; -}; +// de_ZendeskSourceProperties omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-appintegrations/src/protocols/Aws_restJson1.ts b/clients/client-appintegrations/src/protocols/Aws_restJson1.ts index cdf172ead811..c113eef7209e 100644 --- a/clients/client-appintegrations/src/protocols/Aws_restJson1.ts +++ b/clients/client-appintegrations/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -71,12 +73,8 @@ import { import { AppIntegrationsServiceException as __BaseException } from "../models/AppIntegrationsServiceException"; import { AccessDeniedException, - DataIntegrationAssociationSummary, - DataIntegrationSummary, DuplicateResourceException, EventFilter, - EventIntegration, - EventIntegrationAssociation, FileConfiguration, InternalServiceError, InvalidRequestException, @@ -99,21 +97,19 @@ export const se_CreateDataIntegrationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.FileConfiguration != null && { - FileConfiguration: se_FileConfiguration(input.FileConfiguration, context), - }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ObjectConfiguration != null && { - ObjectConfiguration: se_ObjectConfiguration(input.ObjectConfiguration, context), - }), - ...(input.ScheduleConfig != null && { ScheduleConfig: se_ScheduleConfiguration(input.ScheduleConfig, context) }), - ...(input.SourceURI != null && { SourceURI: input.SourceURI }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + FileConfiguration: (_) => _json(_), + KmsKey: [], + Name: [], + ObjectConfiguration: (_) => _json(_), + ScheduleConfig: (_) => _json(_), + SourceURI: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -138,14 +134,16 @@ export const se_CreateEventIntegrationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBridgeBus != null && { EventBridgeBus: input.EventBridgeBus }), - ...(input.EventFilter != null && { EventFilter: se_EventFilter(input.EventFilter, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + EventBridgeBus: [], + EventFilter: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -426,9 +424,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -485,10 +485,12 @@ export const se_UpdateDataIntegrationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataIntegrations/{Identifier}"; resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -515,9 +517,11 @@ export const se_UpdateEventIntegrationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/eventIntegrations/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -543,39 +547,20 @@ export const de_CreateDataIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ClientToken != null) { - contents.ClientToken = __expectString(data.ClientToken); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FileConfiguration != null) { - contents.FileConfiguration = de_FileConfiguration(data.FileConfiguration, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.KmsKey != null) { - contents.KmsKey = __expectString(data.KmsKey); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ObjectConfiguration != null) { - contents.ObjectConfiguration = de_ObjectConfiguration(data.ObjectConfiguration, context); - } - if (data.ScheduleConfiguration != null) { - contents.ScheduleConfiguration = de_ScheduleConfiguration(data.ScheduleConfiguration, context); - } - if (data.SourceURI != null) { - contents.SourceURI = __expectString(data.SourceURI); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + ClientToken: __expectString, + Description: __expectString, + FileConfiguration: _json, + Id: __expectString, + KmsKey: __expectString, + Name: __expectString, + ObjectConfiguration: _json, + ScheduleConfiguration: _json, + SourceURI: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -612,10 +597,9 @@ const de_CreateDataIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -635,9 +619,10 @@ export const de_CreateEventIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventIntegrationArn != null) { - contents.EventIntegrationArn = __expectString(data.EventIntegrationArn); - } + const doc = take(data, { + EventIntegrationArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -674,10 +659,9 @@ const de_CreateEventIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -730,10 +714,9 @@ const de_DeleteDataIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -786,10 +769,9 @@ const de_DeleteEventIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -809,36 +791,19 @@ export const de_GetDataIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FileConfiguration != null) { - contents.FileConfiguration = de_FileConfiguration(data.FileConfiguration, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.KmsKey != null) { - contents.KmsKey = __expectString(data.KmsKey); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ObjectConfiguration != null) { - contents.ObjectConfiguration = de_ObjectConfiguration(data.ObjectConfiguration, context); - } - if (data.ScheduleConfiguration != null) { - contents.ScheduleConfiguration = de_ScheduleConfiguration(data.ScheduleConfiguration, context); - } - if (data.SourceURI != null) { - contents.SourceURI = __expectString(data.SourceURI); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + FileConfiguration: _json, + Id: __expectString, + KmsKey: __expectString, + Name: __expectString, + ObjectConfiguration: _json, + ScheduleConfiguration: _json, + SourceURI: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -872,10 +837,9 @@ const de_GetDataIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -895,24 +859,15 @@ export const de_GetEventIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EventBridgeBus != null) { - contents.EventBridgeBus = __expectString(data.EventBridgeBus); - } - if (data.EventFilter != null) { - contents.EventFilter = de_EventFilter(data.EventFilter, context); - } - if (data.EventIntegrationArn != null) { - contents.EventIntegrationArn = __expectString(data.EventIntegrationArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Description: __expectString, + EventBridgeBus: __expectString, + EventFilter: _json, + EventIntegrationArn: __expectString, + Name: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -946,10 +901,9 @@ const de_GetEventIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -969,15 +923,11 @@ export const de_ListDataIntegrationAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataIntegrationAssociations != null) { - contents.DataIntegrationAssociations = de_DataIntegrationAssociationsList( - data.DataIntegrationAssociations, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DataIntegrationAssociations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1011,10 +961,9 @@ const de_ListDataIntegrationAssociationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1034,12 +983,11 @@ export const de_ListDataIntegrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataIntegrations != null) { - contents.DataIntegrations = de_DataIntegrationsList(data.DataIntegrations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DataIntegrations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1070,10 +1018,9 @@ const de_ListDataIntegrationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1093,15 +1040,11 @@ export const de_ListEventIntegrationAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventIntegrationAssociations != null) { - contents.EventIntegrationAssociations = de_EventIntegrationAssociationsList( - data.EventIntegrationAssociations, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EventIntegrationAssociations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1135,10 +1078,9 @@ const de_ListEventIntegrationAssociationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1158,12 +1100,11 @@ export const de_ListEventIntegrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventIntegrations != null) { - contents.EventIntegrations = de_EventIntegrationsList(data.EventIntegrations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EventIntegrations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1194,10 +1135,9 @@ const de_ListEventIntegrationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1217,9 +1157,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1250,10 +1191,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1303,10 +1243,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1356,10 +1295,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1412,10 +1350,9 @@ const de_UpdateDataIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1468,16 +1405,15 @@ const de_UpdateEventIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1487,9 +1423,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1506,9 +1443,10 @@ const de_DuplicateResourceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DuplicateResourceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1525,9 +1463,10 @@ const de_InternalServiceErrorRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1544,9 +1483,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1563,9 +1503,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1582,9 +1523,10 @@ const de_ResourceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1598,9 +1540,10 @@ const de_ResourceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1608,327 +1551,55 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1EventFilter - */ -const se_EventFilter = (input: EventFilter, context: __SerdeContext): any => { - return { - ...(input.Source != null && { Source: input.Source }), - }; -}; +// se_EventFilter omitted. -/** - * serializeAws_restJson1FieldsList - */ -const se_FieldsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FieldsList omitted. -/** - * serializeAws_restJson1FieldsMap - */ -const se_FieldsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FieldsList(value, context); - return acc; - }, {}); -}; +// se_FieldsMap omitted. -/** - * serializeAws_restJson1FileConfiguration - */ -const se_FileConfiguration = (input: FileConfiguration, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FieldsMap(input.Filters, context) }), - ...(input.Folders != null && { Folders: se_FolderList(input.Folders, context) }), - }; -}; +// se_FileConfiguration omitted. -/** - * serializeAws_restJson1FolderList - */ -const se_FolderList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FolderList omitted. -/** - * serializeAws_restJson1ObjectConfiguration - */ -const se_ObjectConfiguration = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FieldsMap(value, context); - return acc; - }, {}); -}; +// se_ObjectConfiguration omitted. -/** - * serializeAws_restJson1ScheduleConfiguration - */ -const se_ScheduleConfiguration = (input: ScheduleConfiguration, context: __SerdeContext): any => { - return { - ...(input.FirstExecutionFrom != null && { FirstExecutionFrom: input.FirstExecutionFrom }), - ...(input.Object != null && { Object: input.Object }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - }; -}; +// se_ScheduleConfiguration omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1ClientAssociationMetadata - */ -const de_ClientAssociationMetadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ClientAssociationMetadata omitted. -/** - * deserializeAws_restJson1DataIntegrationAssociationsList - */ -const de_DataIntegrationAssociationsList = ( - output: any, - context: __SerdeContext -): DataIntegrationAssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataIntegrationAssociationSummary(entry, context); - }); - return retVal; -}; +// de_DataIntegrationAssociationsList omitted. -/** - * deserializeAws_restJson1DataIntegrationAssociationSummary - */ -const de_DataIntegrationAssociationSummary = ( - output: any, - context: __SerdeContext -): DataIntegrationAssociationSummary => { - return { - ClientId: __expectString(output.ClientId), - DataIntegrationArn: __expectString(output.DataIntegrationArn), - DataIntegrationAssociationArn: __expectString(output.DataIntegrationAssociationArn), - } as any; -}; +// de_DataIntegrationAssociationSummary omitted. -/** - * deserializeAws_restJson1DataIntegrationsList - */ -const de_DataIntegrationsList = (output: any, context: __SerdeContext): DataIntegrationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataIntegrationSummary(entry, context); - }); - return retVal; -}; +// de_DataIntegrationsList omitted. -/** - * deserializeAws_restJson1DataIntegrationSummary - */ -const de_DataIntegrationSummary = (output: any, context: __SerdeContext): DataIntegrationSummary => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - SourceURI: __expectString(output.SourceURI), - } as any; -}; +// de_DataIntegrationSummary omitted. -/** - * deserializeAws_restJson1EventFilter - */ -const de_EventFilter = (output: any, context: __SerdeContext): EventFilter => { - return { - Source: __expectString(output.Source), - } as any; -}; +// de_EventFilter omitted. -/** - * deserializeAws_restJson1EventIntegration - */ -const de_EventIntegration = (output: any, context: __SerdeContext): EventIntegration => { - return { - Description: __expectString(output.Description), - EventBridgeBus: __expectString(output.EventBridgeBus), - EventFilter: output.EventFilter != null ? de_EventFilter(output.EventFilter, context) : undefined, - EventIntegrationArn: __expectString(output.EventIntegrationArn), - Name: __expectString(output.Name), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_EventIntegration omitted. -/** - * deserializeAws_restJson1EventIntegrationAssociation - */ -const de_EventIntegrationAssociation = (output: any, context: __SerdeContext): EventIntegrationAssociation => { - return { - ClientAssociationMetadata: - output.ClientAssociationMetadata != null - ? de_ClientAssociationMetadata(output.ClientAssociationMetadata, context) - : undefined, - ClientId: __expectString(output.ClientId), - EventBridgeRuleName: __expectString(output.EventBridgeRuleName), - EventIntegrationAssociationArn: __expectString(output.EventIntegrationAssociationArn), - EventIntegrationAssociationId: __expectString(output.EventIntegrationAssociationId), - EventIntegrationName: __expectString(output.EventIntegrationName), - } as any; -}; +// de_EventIntegrationAssociation omitted. -/** - * deserializeAws_restJson1EventIntegrationAssociationsList - */ -const de_EventIntegrationAssociationsList = (output: any, context: __SerdeContext): EventIntegrationAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventIntegrationAssociation(entry, context); - }); - return retVal; -}; +// de_EventIntegrationAssociationsList omitted. -/** - * deserializeAws_restJson1EventIntegrationsList - */ -const de_EventIntegrationsList = (output: any, context: __SerdeContext): EventIntegration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventIntegration(entry, context); - }); - return retVal; -}; +// de_EventIntegrationsList omitted. -/** - * deserializeAws_restJson1FieldsList - */ -const de_FieldsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FieldsList omitted. -/** - * deserializeAws_restJson1FieldsMap - */ -const de_FieldsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FieldsList(value, context); - return acc; - }, {}); -}; +// de_FieldsMap omitted. -/** - * deserializeAws_restJson1FileConfiguration - */ -const de_FileConfiguration = (output: any, context: __SerdeContext): FileConfiguration => { - return { - Filters: output.Filters != null ? de_FieldsMap(output.Filters, context) : undefined, - Folders: output.Folders != null ? de_FolderList(output.Folders, context) : undefined, - } as any; -}; +// de_FileConfiguration omitted. -/** - * deserializeAws_restJson1FolderList - */ -const de_FolderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FolderList omitted. -/** - * deserializeAws_restJson1ObjectConfiguration - */ -const de_ObjectConfiguration = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FieldsMap(value, context); - return acc; - }, {}); -}; +// de_ObjectConfiguration omitted. -/** - * deserializeAws_restJson1ScheduleConfiguration - */ -const de_ScheduleConfiguration = (output: any, context: __SerdeContext): ScheduleConfiguration => { - return { - FirstExecutionFrom: __expectString(output.FirstExecutionFrom), - Object: __expectString(output.Object), - ScheduleExpression: __expectString(output.ScheduleExpression), - } as any; -}; +// de_ScheduleConfiguration omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts b/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts index 30b63e086bd9..96c3a4de739e 100644 --- a/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts +++ b/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,7 +11,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -61,15 +63,11 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { ApplicationAutoScalingServiceException as __BaseException } from "../models/ApplicationAutoScalingServiceException"; import { - Alarm, ConcurrentUpdateException, CustomizedMetricSpecification, DeleteScalingPolicyRequest, - DeleteScalingPolicyResponse, DeleteScheduledActionRequest, - DeleteScheduledActionResponse, DeregisterScalableTargetRequest, - DeregisterScalableTargetResponse, DescribeScalableTargetsRequest, DescribeScalableTargetsResponse, DescribeScalingActivitiesRequest, @@ -83,17 +81,12 @@ import { InvalidNextTokenException, LimitExceededException, ListTagsForResourceRequest, - ListTagsForResourceResponse, MetricDimension, - NotScaledReason, ObjectNotFoundException, PredefinedMetricSpecification, PutScalingPolicyRequest, - PutScalingPolicyResponse, PutScheduledActionRequest, - PutScheduledActionResponse, RegisterScalableTargetRequest, - RegisterScalableTargetResponse, ResourceNotFoundException, ScalableTarget, ScalableTargetAction, @@ -104,7 +97,6 @@ import { StepScalingPolicyConfiguration, SuspendedState, TagResourceRequest, - TagResourceResponse, TargetTrackingMetric, TargetTrackingMetricDataQuery, TargetTrackingMetricDimension, @@ -112,7 +104,6 @@ import { TargetTrackingScalingPolicyConfiguration, TooManyTagsException, UntagResourceRequest, - UntagResourceResponse, ValidationException, } from "../models/models_0"; @@ -125,7 +116,7 @@ export const se_DeleteScalingPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteScalingPolicy"); let body: any; - body = JSON.stringify(se_DeleteScalingPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -138,7 +129,7 @@ export const se_DeleteScheduledActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteScheduledAction"); let body: any; - body = JSON.stringify(se_DeleteScheduledActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -151,7 +142,7 @@ export const se_DeregisterScalableTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterScalableTarget"); let body: any; - body = JSON.stringify(se_DeregisterScalableTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -164,7 +155,7 @@ export const se_DescribeScalableTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScalableTargets"); let body: any; - body = JSON.stringify(se_DescribeScalableTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -177,7 +168,7 @@ export const se_DescribeScalingActivitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScalingActivities"); let body: any; - body = JSON.stringify(se_DescribeScalingActivitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -190,7 +181,7 @@ export const se_DescribeScalingPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScalingPolicies"); let body: any; - body = JSON.stringify(se_DescribeScalingPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -203,7 +194,7 @@ export const se_DescribeScheduledActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScheduledActions"); let body: any; - body = JSON.stringify(se_DescribeScheduledActionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -216,7 +207,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -255,7 +246,7 @@ export const se_RegisterScalableTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterScalableTarget"); let body: any; - body = JSON.stringify(se_RegisterScalableTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -268,7 +259,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +272,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -297,12 +288,12 @@ export const de_DeleteScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteScalingPolicyResponse(data, context); + contents = _json(data); const response: DeleteScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -332,10 +323,9 @@ const de_DeleteScalingPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -353,12 +343,12 @@ export const de_DeleteScheduledActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteScheduledActionResponse(data, context); + contents = _json(data); const response: DeleteScheduledActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -388,10 +378,9 @@ const de_DeleteScheduledActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -409,12 +398,12 @@ export const de_DeregisterScalableTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterScalableTargetResponse(data, context); + contents = _json(data); const response: DeregisterScalableTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -444,10 +433,9 @@ const de_DeregisterScalableTargetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -470,7 +458,7 @@ export const de_DescribeScalableTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -500,10 +488,9 @@ const de_DescribeScalableTargetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -526,7 +513,7 @@ export const de_DescribeScalingActivitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -556,10 +543,9 @@ const de_DescribeScalingActivitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -582,7 +568,7 @@ export const de_DescribeScalingPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -615,10 +601,9 @@ const de_DescribeScalingPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -641,7 +626,7 @@ export const de_DescribeScheduledActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -671,10 +656,9 @@ const de_DescribeScheduledActionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -692,12 +676,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -718,10 +702,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -739,12 +722,12 @@ export const de_PutScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutScalingPolicyResponse(data, context); + contents = _json(data); const response: PutScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -780,10 +763,9 @@ const de_PutScalingPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -801,12 +783,12 @@ export const de_PutScheduledActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutScheduledActionResponse(data, context); + contents = _json(data); const response: PutScheduledActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -839,10 +821,9 @@ const de_PutScheduledActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -860,12 +841,12 @@ export const de_RegisterScalableTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterScalableTargetResponse(data, context); + contents = _json(data); const response: RegisterScalableTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -895,10 +876,9 @@ const de_RegisterScalableTargetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -916,12 +896,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -948,10 +928,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -969,12 +948,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -998,10 +977,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1015,7 +993,7 @@ const de_ConcurrentUpdateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentUpdateException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1031,7 +1009,7 @@ const de_FailedResourceAccessExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FailedResourceAccessException(body, context); + const deserialized: any = _json(body); const exception = new FailedResourceAccessException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1047,7 +1025,7 @@ const de_InternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1063,7 +1041,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1079,7 +1057,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1095,7 +1073,7 @@ const de_ObjectNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ObjectNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ObjectNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1111,7 +1089,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1127,7 +1105,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1140,7 +1118,7 @@ const de_TooManyTagsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1148,243 +1126,77 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CustomizedMetricSpecification - */ -const se_CustomizedMetricSpecification = (input: CustomizedMetricSpecification, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Metrics != null && { Metrics: se_TargetTrackingMetricDataQueries(input.Metrics, context) }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_CustomizedMetricSpecification omitted. -/** - * serializeAws_json1_1DeleteScalingPolicyRequest - */ -const se_DeleteScalingPolicyRequest = (input: DeleteScalingPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DeleteScalingPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteScheduledActionRequest - */ -const se_DeleteScheduledActionRequest = (input: DeleteScheduledActionRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ScheduledActionName != null && { ScheduledActionName: input.ScheduledActionName }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DeleteScheduledActionRequest omitted. -/** - * serializeAws_json1_1DeregisterScalableTargetRequest - */ -const se_DeregisterScalableTargetRequest = (input: DeregisterScalableTargetRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DeregisterScalableTargetRequest omitted. -/** - * serializeAws_json1_1DescribeScalableTargetsRequest - */ -const se_DescribeScalableTargetsRequest = (input: DescribeScalableTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceIds != null && { ResourceIds: se_ResourceIdsMaxLen1600(input.ResourceIds, context) }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DescribeScalableTargetsRequest omitted. -/** - * serializeAws_json1_1DescribeScalingActivitiesRequest - */ -const se_DescribeScalingActivitiesRequest = (input: DescribeScalingActivitiesRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeNotScaledActivities != null && { IncludeNotScaledActivities: input.IncludeNotScaledActivities }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DescribeScalingActivitiesRequest omitted. -/** - * serializeAws_json1_1DescribeScalingPoliciesRequest - */ -const se_DescribeScalingPoliciesRequest = (input: DescribeScalingPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyNames != null && { PolicyNames: se_ResourceIdsMaxLen1600(input.PolicyNames, context) }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DescribeScalingPoliciesRequest omitted. -/** - * serializeAws_json1_1DescribeScheduledActionsRequest - */ -const se_DescribeScheduledActionsRequest = (input: DescribeScheduledActionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ScheduledActionNames != null && { - ScheduledActionNames: se_ResourceIdsMaxLen1600(input.ScheduledActionNames, context), - }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - }; -}; +// se_DescribeScheduledActionsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1MetricDimension - */ -const se_MetricDimension = (input: MetricDimension, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MetricDimension omitted. -/** - * serializeAws_json1_1MetricDimensions - */ -const se_MetricDimensions = (input: MetricDimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricDimension(entry, context); - }); -}; +// se_MetricDimensions omitted. -/** - * serializeAws_json1_1PredefinedMetricSpecification - */ -const se_PredefinedMetricSpecification = (input: PredefinedMetricSpecification, context: __SerdeContext): any => { - return { - ...(input.PredefinedMetricType != null && { PredefinedMetricType: input.PredefinedMetricType }), - ...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }), - }; -}; +// se_PredefinedMetricSpecification omitted. /** * serializeAws_json1_1PutScalingPolicyRequest */ const se_PutScalingPolicyRequest = (input: PutScalingPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyType != null && { PolicyType: input.PolicyType }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - ...(input.StepScalingPolicyConfiguration != null && { - StepScalingPolicyConfiguration: se_StepScalingPolicyConfiguration(input.StepScalingPolicyConfiguration, context), - }), - ...(input.TargetTrackingScalingPolicyConfiguration != null && { - TargetTrackingScalingPolicyConfiguration: se_TargetTrackingScalingPolicyConfiguration( - input.TargetTrackingScalingPolicyConfiguration, - context - ), - }), - }; + return take(input, { + PolicyName: [], + PolicyType: [], + ResourceId: [], + ScalableDimension: [], + ServiceNamespace: [], + StepScalingPolicyConfiguration: (_) => se_StepScalingPolicyConfiguration(_, context), + TargetTrackingScalingPolicyConfiguration: (_) => se_TargetTrackingScalingPolicyConfiguration(_, context), + }); }; /** * serializeAws_json1_1PutScheduledActionRequest */ const se_PutScheduledActionRequest = (input: PutScheduledActionRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ScalableTargetAction != null && { - ScalableTargetAction: se_ScalableTargetAction(input.ScalableTargetAction, context), - }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.ScheduledActionName != null && { ScheduledActionName: input.ScheduledActionName }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + ResourceId: [], + ScalableDimension: [], + ScalableTargetAction: _json, + Schedule: [], + ScheduledActionName: [], + ServiceNamespace: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + Timezone: [], + }); }; -/** - * serializeAws_json1_1RegisterScalableTargetRequest - */ -const se_RegisterScalableTargetRequest = (input: RegisterScalableTargetRequest, context: __SerdeContext): any => { - return { - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - ...(input.SuspendedState != null && { SuspendedState: se_SuspendedState(input.SuspendedState, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; -}; +// se_RegisterScalableTargetRequest omitted. -/** - * serializeAws_json1_1ResourceIdsMaxLen1600 - */ -const se_ResourceIdsMaxLen1600 = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceIdsMaxLen1600 omitted. -/** - * serializeAws_json1_1ScalableTargetAction - */ -const se_ScalableTargetAction = (input: ScalableTargetAction, context: __SerdeContext): any => { - return { - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }), - }; -}; +// se_ScalableTargetAction omitted. /** * serializeAws_json1_1StepAdjustment */ const se_StepAdjustment = (input: StepAdjustment, context: __SerdeContext): any => { - return { - ...(input.MetricIntervalLowerBound != null && { - MetricIntervalLowerBound: __serializeFloat(input.MetricIntervalLowerBound), - }), - ...(input.MetricIntervalUpperBound != null && { - MetricIntervalUpperBound: __serializeFloat(input.MetricIntervalUpperBound), - }), - ...(input.ScalingAdjustment != null && { ScalingAdjustment: input.ScalingAdjustment }), - }; + return take(input, { + MetricIntervalLowerBound: __serializeFloat, + MetricIntervalUpperBound: __serializeFloat, + ScalingAdjustment: [], + }); }; /** @@ -1402,126 +1214,34 @@ const se_StepAdjustments = (input: StepAdjustment[], context: __SerdeContext): a * serializeAws_json1_1StepScalingPolicyConfiguration */ const se_StepScalingPolicyConfiguration = (input: StepScalingPolicyConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdjustmentType != null && { AdjustmentType: input.AdjustmentType }), - ...(input.Cooldown != null && { Cooldown: input.Cooldown }), - ...(input.MetricAggregationType != null && { MetricAggregationType: input.MetricAggregationType }), - ...(input.MinAdjustmentMagnitude != null && { MinAdjustmentMagnitude: input.MinAdjustmentMagnitude }), - ...(input.StepAdjustments != null && { StepAdjustments: se_StepAdjustments(input.StepAdjustments, context) }), - }; + return take(input, { + AdjustmentType: [], + Cooldown: [], + MetricAggregationType: [], + MinAdjustmentMagnitude: [], + StepAdjustments: (_) => se_StepAdjustments(_, context), + }); }; -/** - * serializeAws_json1_1SuspendedState - */ -const se_SuspendedState = (input: SuspendedState, context: __SerdeContext): any => { - return { - ...(input.DynamicScalingInSuspended != null && { DynamicScalingInSuspended: input.DynamicScalingInSuspended }), - ...(input.DynamicScalingOutSuspended != null && { DynamicScalingOutSuspended: input.DynamicScalingOutSuspended }), - ...(input.ScheduledScalingSuspended != null && { ScheduledScalingSuspended: input.ScheduledScalingSuspended }), - }; -}; +// se_SuspendedState omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1TargetTrackingMetric - */ -const se_TargetTrackingMetric = (input: TargetTrackingMetric, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_TargetTrackingMetricDimensions(input.Dimensions, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - }; -}; +// se_TargetTrackingMetric omitted. -/** - * serializeAws_json1_1TargetTrackingMetricDataQueries - */ -const se_TargetTrackingMetricDataQueries = (input: TargetTrackingMetricDataQuery[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetTrackingMetricDataQuery(entry, context); - }); -}; +// se_TargetTrackingMetricDataQueries omitted. -/** - * serializeAws_json1_1TargetTrackingMetricDataQuery - */ -const se_TargetTrackingMetricDataQuery = (input: TargetTrackingMetricDataQuery, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Label != null && { Label: input.Label }), - ...(input.MetricStat != null && { MetricStat: se_TargetTrackingMetricStat(input.MetricStat, context) }), - ...(input.ReturnData != null && { ReturnData: input.ReturnData }), - }; -}; +// se_TargetTrackingMetricDataQuery omitted. -/** - * serializeAws_json1_1TargetTrackingMetricDimension - */ -const se_TargetTrackingMetricDimension = (input: TargetTrackingMetricDimension, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_TargetTrackingMetricDimension omitted. -/** - * serializeAws_json1_1TargetTrackingMetricDimensions - */ -const se_TargetTrackingMetricDimensions = (input: TargetTrackingMetricDimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetTrackingMetricDimension(entry, context); - }); -}; +// se_TargetTrackingMetricDimensions omitted. -/** - * serializeAws_json1_1TargetTrackingMetricStat - */ -const se_TargetTrackingMetricStat = (input: TargetTrackingMetricStat, context: __SerdeContext): any => { - return { - ...(input.Metric != null && { Metric: se_TargetTrackingMetric(input.Metric, context) }), - ...(input.Stat != null && { Stat: input.Stat }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_TargetTrackingMetricStat omitted. /** * serializeAws_json1_1TargetTrackingScalingPolicyConfiguration @@ -1530,110 +1250,40 @@ const se_TargetTrackingScalingPolicyConfiguration = ( input: TargetTrackingScalingPolicyConfiguration, context: __SerdeContext ): any => { - return { - ...(input.CustomizedMetricSpecification != null && { - CustomizedMetricSpecification: se_CustomizedMetricSpecification(input.CustomizedMetricSpecification, context), - }), - ...(input.DisableScaleIn != null && { DisableScaleIn: input.DisableScaleIn }), - ...(input.PredefinedMetricSpecification != null && { - PredefinedMetricSpecification: se_PredefinedMetricSpecification(input.PredefinedMetricSpecification, context), - }), - ...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }), - ...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }), - ...(input.TargetValue != null && { TargetValue: __serializeFloat(input.TargetValue) }), - }; + return take(input, { + CustomizedMetricSpecification: _json, + DisableScaleIn: [], + PredefinedMetricSpecification: _json, + ScaleInCooldown: [], + ScaleOutCooldown: [], + TargetValue: __serializeFloat, + }); }; -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1Alarm - */ -const de_Alarm = (output: any, context: __SerdeContext): Alarm => { - return { - AlarmARN: __expectString(output.AlarmARN), - AlarmName: __expectString(output.AlarmName), - } as any; -}; +// de_Alarm omitted. -/** - * deserializeAws_json1_1Alarms - */ -const de_Alarms = (output: any, context: __SerdeContext): Alarm[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Alarm(entry, context); - }); - return retVal; -}; +// de_Alarms omitted. -/** - * deserializeAws_json1_1ConcurrentUpdateException - */ -const de_ConcurrentUpdateException = (output: any, context: __SerdeContext): ConcurrentUpdateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentUpdateException omitted. -/** - * deserializeAws_json1_1CustomizedMetricSpecification - */ -const de_CustomizedMetricSpecification = (output: any, context: __SerdeContext): CustomizedMetricSpecification => { - return { - Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined, - MetricName: __expectString(output.MetricName), - Metrics: output.Metrics != null ? de_TargetTrackingMetricDataQueries(output.Metrics, context) : undefined, - Namespace: __expectString(output.Namespace), - Statistic: __expectString(output.Statistic), - Unit: __expectString(output.Unit), - } as any; -}; +// de_CustomizedMetricSpecification omitted. -/** - * deserializeAws_json1_1DeleteScalingPolicyResponse - */ -const de_DeleteScalingPolicyResponse = (output: any, context: __SerdeContext): DeleteScalingPolicyResponse => { - return {} as any; -}; +// de_DeleteScalingPolicyResponse omitted. -/** - * deserializeAws_json1_1DeleteScheduledActionResponse - */ -const de_DeleteScheduledActionResponse = (output: any, context: __SerdeContext): DeleteScheduledActionResponse => { - return {} as any; -}; +// de_DeleteScheduledActionResponse omitted. -/** - * deserializeAws_json1_1DeregisterScalableTargetResponse - */ -const de_DeregisterScalableTargetResponse = ( - output: any, - context: __SerdeContext -): DeregisterScalableTargetResponse => { - return {} as any; -}; +// de_DeregisterScalableTargetResponse omitted. /** * deserializeAws_json1_1DescribeScalableTargetsResponse */ const de_DescribeScalableTargetsResponse = (output: any, context: __SerdeContext): DescribeScalableTargetsResponse => { - return { - NextToken: __expectString(output.NextToken), - ScalableTargets: output.ScalableTargets != null ? de_ScalableTargets(output.ScalableTargets, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScalableTargets: (_: any) => de_ScalableTargets(_, context), + }) as any; }; /** @@ -1643,21 +1293,20 @@ const de_DescribeScalingActivitiesResponse = ( output: any, context: __SerdeContext ): DescribeScalingActivitiesResponse => { - return { - NextToken: __expectString(output.NextToken), - ScalingActivities: - output.ScalingActivities != null ? de_ScalingActivities(output.ScalingActivities, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScalingActivities: (_: any) => de_ScalingActivities(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeScalingPoliciesResponse */ const de_DescribeScalingPoliciesResponse = (output: any, context: __SerdeContext): DescribeScalingPoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - ScalingPolicies: output.ScalingPolicies != null ? de_ScalingPolicies(output.ScalingPolicies, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScalingPolicies: (_: any) => de_ScalingPolicies(_, context), + }) as any; }; /** @@ -1667,194 +1316,60 @@ const de_DescribeScheduledActionsResponse = ( output: any, context: __SerdeContext ): DescribeScheduledActionsResponse => { - return { - NextToken: __expectString(output.NextToken), - ScheduledActions: - output.ScheduledActions != null ? de_ScheduledActions(output.ScheduledActions, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScheduledActions: (_: any) => de_ScheduledActions(_, context), + }) as any; }; -/** - * deserializeAws_json1_1FailedResourceAccessException - */ -const de_FailedResourceAccessException = (output: any, context: __SerdeContext): FailedResourceAccessException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_FailedResourceAccessException omitted. -/** - * deserializeAws_json1_1InternalServiceException - */ -const de_InternalServiceException = (output: any, context: __SerdeContext): InternalServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1MetricDimension - */ -const de_MetricDimension = (output: any, context: __SerdeContext): MetricDimension => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_MetricDimension omitted. -/** - * deserializeAws_json1_1MetricDimensions - */ -const de_MetricDimensions = (output: any, context: __SerdeContext): MetricDimension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDimension(entry, context); - }); - return retVal; -}; +// de_MetricDimensions omitted. -/** - * deserializeAws_json1_1NotScaledReason - */ -const de_NotScaledReason = (output: any, context: __SerdeContext): NotScaledReason => { - return { - Code: __expectString(output.Code), - CurrentCapacity: __expectInt32(output.CurrentCapacity), - MaxCapacity: __expectInt32(output.MaxCapacity), - MinCapacity: __expectInt32(output.MinCapacity), - } as any; -}; +// de_NotScaledReason omitted. -/** - * deserializeAws_json1_1NotScaledReasons - */ -const de_NotScaledReasons = (output: any, context: __SerdeContext): NotScaledReason[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotScaledReason(entry, context); - }); - return retVal; -}; +// de_NotScaledReasons omitted. -/** - * deserializeAws_json1_1ObjectNotFoundException - */ -const de_ObjectNotFoundException = (output: any, context: __SerdeContext): ObjectNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ObjectNotFoundException omitted. -/** - * deserializeAws_json1_1PredefinedMetricSpecification - */ -const de_PredefinedMetricSpecification = (output: any, context: __SerdeContext): PredefinedMetricSpecification => { - return { - PredefinedMetricType: __expectString(output.PredefinedMetricType), - ResourceLabel: __expectString(output.ResourceLabel), - } as any; -}; +// de_PredefinedMetricSpecification omitted. -/** - * deserializeAws_json1_1PutScalingPolicyResponse - */ -const de_PutScalingPolicyResponse = (output: any, context: __SerdeContext): PutScalingPolicyResponse => { - return { - Alarms: output.Alarms != null ? de_Alarms(output.Alarms, context) : undefined, - PolicyARN: __expectString(output.PolicyARN), - } as any; -}; +// de_PutScalingPolicyResponse omitted. -/** - * deserializeAws_json1_1PutScheduledActionResponse - */ -const de_PutScheduledActionResponse = (output: any, context: __SerdeContext): PutScheduledActionResponse => { - return {} as any; -}; +// de_PutScheduledActionResponse omitted. -/** - * deserializeAws_json1_1RegisterScalableTargetResponse - */ -const de_RegisterScalableTargetResponse = (output: any, context: __SerdeContext): RegisterScalableTargetResponse => { - return { - ScalableTargetARN: __expectString(output.ScalableTargetARN), - } as any; -}; +// de_RegisterScalableTargetResponse omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1ScalableTarget */ const de_ScalableTarget = (output: any, context: __SerdeContext): ScalableTarget => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - MaxCapacity: __expectInt32(output.MaxCapacity), - MinCapacity: __expectInt32(output.MinCapacity), - ResourceId: __expectString(output.ResourceId), - RoleARN: __expectString(output.RoleARN), - ScalableDimension: __expectString(output.ScalableDimension), - ScalableTargetARN: __expectString(output.ScalableTargetARN), - ServiceNamespace: __expectString(output.ServiceNamespace), - SuspendedState: output.SuspendedState != null ? de_SuspendedState(output.SuspendedState, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxCapacity: __expectInt32, + MinCapacity: __expectInt32, + ResourceId: __expectString, + RoleARN: __expectString, + ScalableDimension: __expectString, + ScalableTargetARN: __expectString, + ServiceNamespace: __expectString, + SuspendedState: _json, + }) as any; }; -/** - * deserializeAws_json1_1ScalableTargetAction - */ -const de_ScalableTargetAction = (output: any, context: __SerdeContext): ScalableTargetAction => { - return { - MaxCapacity: __expectInt32(output.MaxCapacity), - MinCapacity: __expectInt32(output.MinCapacity), - } as any; -}; +// de_ScalableTargetAction omitted. /** * deserializeAws_json1_1ScalableTargets @@ -1863,9 +1378,6 @@ const de_ScalableTargets = (output: any, context: __SerdeContext): ScalableTarge const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalableTarget(entry, context); }); return retVal; @@ -1878,9 +1390,6 @@ const de_ScalingActivities = (output: any, context: __SerdeContext): ScalingActi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingActivity(entry, context); }); return retVal; @@ -1890,23 +1399,20 @@ const de_ScalingActivities = (output: any, context: __SerdeContext): ScalingActi * deserializeAws_json1_1ScalingActivity */ const de_ScalingActivity = (output: any, context: __SerdeContext): ScalingActivity => { - return { - ActivityId: __expectString(output.ActivityId), - Cause: __expectString(output.Cause), - Description: __expectString(output.Description), - Details: __expectString(output.Details), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - NotScaledReasons: - output.NotScaledReasons != null ? de_NotScaledReasons(output.NotScaledReasons, context) : undefined, - ResourceId: __expectString(output.ResourceId), - ScalableDimension: __expectString(output.ScalableDimension), - ServiceNamespace: __expectString(output.ServiceNamespace), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - StatusCode: __expectString(output.StatusCode), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + ActivityId: __expectString, + Cause: __expectString, + Description: __expectString, + Details: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotScaledReasons: _json, + ResourceId: __expectString, + ScalableDimension: __expectString, + ServiceNamespace: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StatusCode: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -1916,9 +1422,6 @@ const de_ScalingPolicies = (output: any, context: __SerdeContext): ScalingPolicy const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingPolicy(entry, context); }); return retVal; @@ -1928,52 +1431,37 @@ const de_ScalingPolicies = (output: any, context: __SerdeContext): ScalingPolicy * deserializeAws_json1_1ScalingPolicy */ const de_ScalingPolicy = (output: any, context: __SerdeContext): ScalingPolicy => { - return { - Alarms: output.Alarms != null ? de_Alarms(output.Alarms, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - PolicyARN: __expectString(output.PolicyARN), - PolicyName: __expectString(output.PolicyName), - PolicyType: __expectString(output.PolicyType), - ResourceId: __expectString(output.ResourceId), - ScalableDimension: __expectString(output.ScalableDimension), - ServiceNamespace: __expectString(output.ServiceNamespace), - StepScalingPolicyConfiguration: - output.StepScalingPolicyConfiguration != null - ? de_StepScalingPolicyConfiguration(output.StepScalingPolicyConfiguration, context) - : undefined, - TargetTrackingScalingPolicyConfiguration: - output.TargetTrackingScalingPolicyConfiguration != null - ? de_TargetTrackingScalingPolicyConfiguration(output.TargetTrackingScalingPolicyConfiguration, context) - : undefined, - } as any; + return take(output, { + Alarms: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyARN: __expectString, + PolicyName: __expectString, + PolicyType: __expectString, + ResourceId: __expectString, + ScalableDimension: __expectString, + ServiceNamespace: __expectString, + StepScalingPolicyConfiguration: (_: any) => de_StepScalingPolicyConfiguration(_, context), + TargetTrackingScalingPolicyConfiguration: (_: any) => de_TargetTrackingScalingPolicyConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_1ScheduledAction */ const de_ScheduledAction = (output: any, context: __SerdeContext): ScheduledAction => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ResourceId: __expectString(output.ResourceId), - ScalableDimension: __expectString(output.ScalableDimension), - ScalableTargetAction: - output.ScalableTargetAction != null ? de_ScalableTargetAction(output.ScalableTargetAction, context) : undefined, - Schedule: __expectString(output.Schedule), - ScheduledActionARN: __expectString(output.ScheduledActionARN), - ScheduledActionName: __expectString(output.ScheduledActionName), - ServiceNamespace: __expectString(output.ServiceNamespace), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Timezone: __expectString(output.Timezone), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceId: __expectString, + ScalableDimension: __expectString, + ScalableTargetAction: _json, + Schedule: __expectString, + ScheduledActionARN: __expectString, + ScheduledActionName: __expectString, + ServiceNamespace: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Timezone: __expectString, + }) as any; }; /** @@ -1983,9 +1471,6 @@ const de_ScheduledActions = (output: any, context: __SerdeContext): ScheduledAct const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduledAction(entry, context); }); return retVal; @@ -1995,11 +1480,11 @@ const de_ScheduledActions = (output: any, context: __SerdeContext): ScheduledAct * deserializeAws_json1_1StepAdjustment */ const de_StepAdjustment = (output: any, context: __SerdeContext): StepAdjustment => { - return { - MetricIntervalLowerBound: __limitedParseDouble(output.MetricIntervalLowerBound), - MetricIntervalUpperBound: __limitedParseDouble(output.MetricIntervalUpperBound), - ScalingAdjustment: __expectInt32(output.ScalingAdjustment), - } as any; + return take(output, { + MetricIntervalLowerBound: __limitedParseDouble, + MetricIntervalUpperBound: __limitedParseDouble, + ScalingAdjustment: __expectInt32, + }) as any; }; /** @@ -2009,9 +1494,6 @@ const de_StepAdjustments = (output: any, context: __SerdeContext): StepAdjustmen const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StepAdjustment(entry, context); }); return retVal; @@ -2021,120 +1503,32 @@ const de_StepAdjustments = (output: any, context: __SerdeContext): StepAdjustmen * deserializeAws_json1_1StepScalingPolicyConfiguration */ const de_StepScalingPolicyConfiguration = (output: any, context: __SerdeContext): StepScalingPolicyConfiguration => { - return { - AdjustmentType: __expectString(output.AdjustmentType), - Cooldown: __expectInt32(output.Cooldown), - MetricAggregationType: __expectString(output.MetricAggregationType), - MinAdjustmentMagnitude: __expectInt32(output.MinAdjustmentMagnitude), - StepAdjustments: output.StepAdjustments != null ? de_StepAdjustments(output.StepAdjustments, context) : undefined, - } as any; + return take(output, { + AdjustmentType: __expectString, + Cooldown: __expectInt32, + MetricAggregationType: __expectString, + MinAdjustmentMagnitude: __expectInt32, + StepAdjustments: (_: any) => de_StepAdjustments(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SuspendedState - */ -const de_SuspendedState = (output: any, context: __SerdeContext): SuspendedState => { - return { - DynamicScalingInSuspended: __expectBoolean(output.DynamicScalingInSuspended), - DynamicScalingOutSuspended: __expectBoolean(output.DynamicScalingOutSuspended), - ScheduledScalingSuspended: __expectBoolean(output.ScheduledScalingSuspended), - } as any; -}; +// de_SuspendedState omitted. -/** - * deserializeAws_json1_1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TargetTrackingMetric - */ -const de_TargetTrackingMetric = (output: any, context: __SerdeContext): TargetTrackingMetric => { - return { - Dimensions: output.Dimensions != null ? de_TargetTrackingMetricDimensions(output.Dimensions, context) : undefined, - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - } as any; -}; +// de_TargetTrackingMetric omitted. -/** - * deserializeAws_json1_1TargetTrackingMetricDataQueries - */ -const de_TargetTrackingMetricDataQueries = (output: any, context: __SerdeContext): TargetTrackingMetricDataQuery[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetTrackingMetricDataQuery(entry, context); - }); - return retVal; -}; +// de_TargetTrackingMetricDataQueries omitted. -/** - * deserializeAws_json1_1TargetTrackingMetricDataQuery - */ -const de_TargetTrackingMetricDataQuery = (output: any, context: __SerdeContext): TargetTrackingMetricDataQuery => { - return { - Expression: __expectString(output.Expression), - Id: __expectString(output.Id), - Label: __expectString(output.Label), - MetricStat: output.MetricStat != null ? de_TargetTrackingMetricStat(output.MetricStat, context) : undefined, - ReturnData: __expectBoolean(output.ReturnData), - } as any; -}; +// de_TargetTrackingMetricDataQuery omitted. -/** - * deserializeAws_json1_1TargetTrackingMetricDimension - */ -const de_TargetTrackingMetricDimension = (output: any, context: __SerdeContext): TargetTrackingMetricDimension => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_TargetTrackingMetricDimension omitted. -/** - * deserializeAws_json1_1TargetTrackingMetricDimensions - */ -const de_TargetTrackingMetricDimensions = (output: any, context: __SerdeContext): TargetTrackingMetricDimension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetTrackingMetricDimension(entry, context); - }); - return retVal; -}; +// de_TargetTrackingMetricDimensions omitted. -/** - * deserializeAws_json1_1TargetTrackingMetricStat - */ -const de_TargetTrackingMetricStat = (output: any, context: __SerdeContext): TargetTrackingMetricStat => { - return { - Metric: output.Metric != null ? de_TargetTrackingMetric(output.Metric, context) : undefined, - Stat: __expectString(output.Stat), - Unit: __expectString(output.Unit), - } as any; -}; +// de_TargetTrackingMetricStat omitted. /** * deserializeAws_json1_1TargetTrackingScalingPolicyConfiguration @@ -2143,47 +1537,21 @@ const de_TargetTrackingScalingPolicyConfiguration = ( output: any, context: __SerdeContext ): TargetTrackingScalingPolicyConfiguration => { - return { - CustomizedMetricSpecification: - output.CustomizedMetricSpecification != null - ? de_CustomizedMetricSpecification(output.CustomizedMetricSpecification, context) - : undefined, - DisableScaleIn: __expectBoolean(output.DisableScaleIn), - PredefinedMetricSpecification: - output.PredefinedMetricSpecification != null - ? de_PredefinedMetricSpecification(output.PredefinedMetricSpecification, context) - : undefined, - ScaleInCooldown: __expectInt32(output.ScaleInCooldown), - ScaleOutCooldown: __expectInt32(output.ScaleOutCooldown), - TargetValue: __limitedParseDouble(output.TargetValue), - } as any; + return take(output, { + CustomizedMetricSpecification: _json, + DisableScaleIn: __expectBoolean, + PredefinedMetricSpecification: _json, + ScaleInCooldown: __expectInt32, + ScaleOutCooldown: __expectInt32, + TargetValue: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2205,6 +1573,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts b/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts index bf22e5bed0f2..e9560242b98a 100644 --- a/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -91,34 +92,18 @@ import { import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "../commands/UpdateApplicationCommand"; import { ApplicationDiscoveryServiceServiceException as __BaseException } from "../models/ApplicationDiscoveryServiceServiceException"; import { - AgentConfigurationStatus, - AgentInfo, - AgentNetworkInfo, AssociateConfigurationItemsToApplicationRequest, - AssociateConfigurationItemsToApplicationResponse, AuthorizationErrorException, - BatchDeleteImportDataError, BatchDeleteImportDataRequest, - BatchDeleteImportDataResponse, ConfigurationTag, ConflictErrorException, ContinuousExportDescription, CreateApplicationRequest, - CreateApplicationResponse, CreateTagsRequest, - CreateTagsResponse, - CustomerAgentInfo, - CustomerAgentlessCollectorInfo, - CustomerConnectorInfo, - CustomerMeCollectorInfo, DeleteApplicationsRequest, - DeleteApplicationsResponse, DeleteTagsRequest, - DeleteTagsResponse, DescribeAgentsRequest, - DescribeAgentsResponse, DescribeConfigurationsRequest, - DescribeConfigurationsResponse, DescribeContinuousExportsRequest, DescribeContinuousExportsResponse, DescribeExportConfigurationsRequest, @@ -130,24 +115,18 @@ import { DescribeTagsRequest, DescribeTagsResponse, DisassociateConfigurationItemsFromApplicationRequest, - DisassociateConfigurationItemsFromApplicationResponse, - ExportConfigurationsResponse, ExportDataFormat, ExportFilter, ExportInfo, Filter, GetDiscoverySummaryRequest, - GetDiscoverySummaryResponse, HomeRegionNotSetException, ImportTask, ImportTaskFilter, InvalidParameterException, InvalidParameterValueException, ListConfigurationsRequest, - ListConfigurationsResponse, ListServerNeighborsRequest, - ListServerNeighborsResponse, - NeighborConnectionDetail, OperationNotPermittedException, OrderByElement, ResourceInUseException, @@ -156,19 +135,15 @@ import { StartContinuousExportRequest, StartContinuousExportResponse, StartDataCollectionByAgentIdsRequest, - StartDataCollectionByAgentIdsResponse, StartExportTaskRequest, - StartExportTaskResponse, StartImportTaskRequest, StartImportTaskResponse, StopContinuousExportRequest, StopContinuousExportResponse, StopDataCollectionByAgentIdsRequest, - StopDataCollectionByAgentIdsResponse, Tag, TagFilter, UpdateApplicationRequest, - UpdateApplicationResponse, } from "../models/models_0"; /** @@ -180,7 +155,7 @@ export const se_AssociateConfigurationItemsToApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateConfigurationItemsToApplication"); let body: any; - body = JSON.stringify(se_AssociateConfigurationItemsToApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -193,7 +168,7 @@ export const se_BatchDeleteImportDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteImportData"); let body: any; - body = JSON.stringify(se_BatchDeleteImportDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -206,7 +181,7 @@ export const se_CreateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplication"); let body: any; - body = JSON.stringify(se_CreateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -219,7 +194,7 @@ export const se_CreateTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTags"); let body: any; - body = JSON.stringify(se_CreateTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -232,7 +207,7 @@ export const se_DeleteApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplications"); let body: any; - body = JSON.stringify(se_DeleteApplicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -245,7 +220,7 @@ export const se_DeleteTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTags"); let body: any; - body = JSON.stringify(se_DeleteTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -258,7 +233,7 @@ export const se_DescribeAgentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAgents"); let body: any; - body = JSON.stringify(se_DescribeAgentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -271,7 +246,7 @@ export const se_DescribeConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigurations"); let body: any; - body = JSON.stringify(se_DescribeConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -284,7 +259,7 @@ export const se_DescribeContinuousExportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeContinuousExports"); let body: any; - body = JSON.stringify(se_DescribeContinuousExportsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -297,7 +272,7 @@ export const se_DescribeExportConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExportConfigurations"); let body: any; - body = JSON.stringify(se_DescribeExportConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -310,7 +285,7 @@ export const se_DescribeExportTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExportTasks"); let body: any; - body = JSON.stringify(se_DescribeExportTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -323,7 +298,7 @@ export const se_DescribeImportTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImportTasks"); let body: any; - body = JSON.stringify(se_DescribeImportTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -336,7 +311,7 @@ export const se_DescribeTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTags"); let body: any; - body = JSON.stringify(se_DescribeTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -349,7 +324,7 @@ export const se_DisassociateConfigurationItemsFromApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateConfigurationItemsFromApplication"); let body: any; - body = JSON.stringify(se_DisassociateConfigurationItemsFromApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -374,7 +349,7 @@ export const se_GetDiscoverySummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDiscoverySummary"); let body: any; - body = JSON.stringify(se_GetDiscoverySummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -387,7 +362,7 @@ export const se_ListConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConfigurations"); let body: any; - body = JSON.stringify(se_ListConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -400,7 +375,7 @@ export const se_ListServerNeighborsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServerNeighbors"); let body: any; - body = JSON.stringify(se_ListServerNeighborsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -413,7 +388,7 @@ export const se_StartContinuousExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartContinuousExport"); let body: any; - body = JSON.stringify(se_StartContinuousExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -426,7 +401,7 @@ export const se_StartDataCollectionByAgentIdsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDataCollectionByAgentIds"); let body: any; - body = JSON.stringify(se_StartDataCollectionByAgentIdsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -465,7 +440,7 @@ export const se_StopContinuousExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopContinuousExport"); let body: any; - body = JSON.stringify(se_StopContinuousExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -478,7 +453,7 @@ export const se_StopDataCollectionByAgentIdsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopDataCollectionByAgentIds"); let body: any; - body = JSON.stringify(se_StopDataCollectionByAgentIdsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -491,7 +466,7 @@ export const se_UpdateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplication"); let body: any; - body = JSON.stringify(se_UpdateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -507,12 +482,12 @@ export const de_AssociateConfigurationItemsToApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateConfigurationItemsToApplicationResponse(data, context); + contents = _json(data); const response: AssociateConfigurationItemsToApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -545,10 +520,9 @@ const de_AssociateConfigurationItemsToApplicationCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -566,12 +540,12 @@ export const de_BatchDeleteImportDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteImportDataResponse(data, context); + contents = _json(data); const response: BatchDeleteImportDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -604,10 +578,9 @@ const de_BatchDeleteImportDataCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -625,12 +598,12 @@ export const de_CreateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateApplicationResponse(data, context); + contents = _json(data); const response: CreateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -663,10 +636,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -684,12 +656,12 @@ export const de_CreateTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTagsResponse(data, context); + contents = _json(data); const response: CreateTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -725,10 +697,9 @@ const de_CreateTagsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -746,12 +717,12 @@ export const de_DeleteApplicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationsResponse(data, context); + contents = _json(data); const response: DeleteApplicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -784,10 +755,9 @@ const de_DeleteApplicationsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -805,12 +775,12 @@ export const de_DeleteTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTagsResponse(data, context); + contents = _json(data); const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -846,10 +816,9 @@ const de_DeleteTagsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -867,12 +836,12 @@ export const de_DescribeAgentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAgentsResponse(data, context); + contents = _json(data); const response: DescribeAgentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -905,10 +874,9 @@ const de_DescribeAgentsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -926,12 +894,12 @@ export const de_DescribeConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConfigurationsResponse(data, context); + contents = _json(data); const response: DescribeConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -964,10 +932,9 @@ const de_DescribeConfigurationsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -990,7 +957,7 @@ export const de_DescribeContinuousExportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1029,10 +996,9 @@ const de_DescribeContinuousExportsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1055,7 +1021,7 @@ export const de_DescribeExportConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1091,10 +1057,9 @@ const de_DescribeExportConfigurationsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,7 +1082,7 @@ export const de_DescribeExportTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1150,10 +1115,9 @@ const de_DescribeExportTasksCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1176,7 +1140,7 @@ export const de_DescribeImportTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1209,10 +1173,9 @@ const de_DescribeImportTasksCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1235,7 +1198,7 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1271,10 +1234,9 @@ const de_DescribeTagsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1292,12 +1254,12 @@ export const de_DisassociateConfigurationItemsFromApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateConfigurationItemsFromApplicationResponse(data, context); + contents = _json(data); const response: DisassociateConfigurationItemsFromApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1330,10 +1292,9 @@ const de_DisassociateConfigurationItemsFromApplicationCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1351,12 +1312,12 @@ export const de_ExportConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportConfigurationsResponse(data, context); + contents = _json(data); const response: ExportConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1392,10 +1353,9 @@ const de_ExportConfigurationsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1413,12 +1373,12 @@ export const de_GetDiscoverySummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDiscoverySummaryResponse(data, context); + contents = _json(data); const response: GetDiscoverySummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1451,10 +1411,9 @@ const de_GetDiscoverySummaryCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1472,12 +1431,12 @@ export const de_ListConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListConfigurationsResponse(data, context); + contents = _json(data); const response: ListConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1513,10 +1472,9 @@ const de_ListConfigurationsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,12 +1492,12 @@ export const de_ListServerNeighborsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServerNeighborsResponse(data, context); + contents = _json(data); const response: ListServerNeighborsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1572,10 +1530,9 @@ const de_ListServerNeighborsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1598,7 +1555,7 @@ export const de_StartContinuousExportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1640,10 +1597,9 @@ const de_StartContinuousExportCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1661,12 +1617,12 @@ export const de_StartDataCollectionByAgentIdsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDataCollectionByAgentIdsResponse(data, context); + contents = _json(data); const response: StartDataCollectionByAgentIdsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1699,10 +1655,9 @@ const de_StartDataCollectionByAgentIdsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1720,12 +1675,12 @@ export const de_StartExportTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartExportTaskResponse(data, context); + contents = _json(data); const response: StartExportTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1761,10 +1716,9 @@ const de_StartExportTaskCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1787,7 +1741,7 @@ export const de_StartImportTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1823,10 +1777,9 @@ const de_StartImportTaskCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1849,7 +1802,7 @@ export const de_StopContinuousExportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1891,10 +1844,9 @@ const de_StopContinuousExportCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1912,12 +1864,12 @@ export const de_StopDataCollectionByAgentIdsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopDataCollectionByAgentIdsResponse(data, context); + contents = _json(data); const response: StopDataCollectionByAgentIdsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1950,10 +1902,9 @@ const de_StopDataCollectionByAgentIdsCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1971,12 +1922,12 @@ export const de_UpdateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateApplicationResponse(data, context); + contents = _json(data); const response: UpdateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2009,10 +1960,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ServerInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,7 +1976,7 @@ const de_AuthorizationErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AuthorizationErrorException(body, context); + const deserialized: any = _json(body); const exception = new AuthorizationErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2042,7 +1992,7 @@ const de_ConflictErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictErrorException(body, context); + const deserialized: any = _json(body); const exception = new ConflictErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2058,7 +2008,7 @@ const de_HomeRegionNotSetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HomeRegionNotSetException(body, context); + const deserialized: any = _json(body); const exception = new HomeRegionNotSetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2074,7 +2024,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2090,7 +2040,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2106,7 +2056,7 @@ const de_OperationNotPermittedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotPermittedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotPermittedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2122,7 +2072,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2138,7 +2088,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2154,7 +2104,7 @@ const de_ServerInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServerInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new ServerInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2162,687 +2112,152 @@ const de_ServerInternalErrorExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AgentIds - */ -const se_AgentIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentIds omitted. -/** - * serializeAws_json1_1ApplicationIdsList - */ -const se_ApplicationIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationIdsList omitted. -/** - * serializeAws_json1_1AssociateConfigurationItemsToApplicationRequest - */ -const se_AssociateConfigurationItemsToApplicationRequest = ( - input: AssociateConfigurationItemsToApplicationRequest, - context: __SerdeContext -): any => { - return { - ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }), - ...(input.configurationIds != null && { - configurationIds: se_ConfigurationIdList(input.configurationIds, context), - }), - }; -}; +// se_AssociateConfigurationItemsToApplicationRequest omitted. -/** - * serializeAws_json1_1BatchDeleteImportDataRequest - */ -const se_BatchDeleteImportDataRequest = (input: BatchDeleteImportDataRequest, context: __SerdeContext): any => { - return { - ...(input.importTaskIds != null && { importTaskIds: se_ToDeleteIdentifierList(input.importTaskIds, context) }), - }; -}; +// se_BatchDeleteImportDataRequest omitted. -/** - * serializeAws_json1_1ConfigurationIdList - */ -const se_ConfigurationIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConfigurationIdList omitted. -/** - * serializeAws_json1_1ContinuousExportIds - */ -const se_ContinuousExportIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ContinuousExportIds omitted. -/** - * serializeAws_json1_1CreateApplicationRequest - */ -const se_CreateApplicationRequest = (input: CreateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_CreateApplicationRequest omitted. -/** - * serializeAws_json1_1CreateTagsRequest - */ -const se_CreateTagsRequest = (input: CreateTagsRequest, context: __SerdeContext): any => { - return { - ...(input.configurationIds != null && { - configurationIds: se_ConfigurationIdList(input.configurationIds, context), - }), - ...(input.tags != null && { tags: se_TagSet(input.tags, context) }), - }; -}; +// se_CreateTagsRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationsRequest - */ -const se_DeleteApplicationsRequest = (input: DeleteApplicationsRequest, context: __SerdeContext): any => { - return { - ...(input.configurationIds != null && { configurationIds: se_ApplicationIdsList(input.configurationIds, context) }), - }; -}; +// se_DeleteApplicationsRequest omitted. -/** - * serializeAws_json1_1DeleteTagsRequest - */ -const se_DeleteTagsRequest = (input: DeleteTagsRequest, context: __SerdeContext): any => { - return { - ...(input.configurationIds != null && { - configurationIds: se_ConfigurationIdList(input.configurationIds, context), - }), - ...(input.tags != null && { tags: se_TagSet(input.tags, context) }), - }; -}; +// se_DeleteTagsRequest omitted. -/** - * serializeAws_json1_1DescribeAgentsRequest - */ -const se_DescribeAgentsRequest = (input: DescribeAgentsRequest, context: __SerdeContext): any => { - return { - ...(input.agentIds != null && { agentIds: se_AgentIds(input.agentIds, context) }), - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeAgentsRequest omitted. -/** - * serializeAws_json1_1DescribeConfigurationsRequest - */ -const se_DescribeConfigurationsRequest = (input: DescribeConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.configurationIds != null && { - configurationIds: se_ConfigurationIdList(input.configurationIds, context), - }), - }; -}; +// se_DescribeConfigurationsRequest omitted. -/** - * serializeAws_json1_1DescribeContinuousExportsRequest - */ -const se_DescribeContinuousExportsRequest = (input: DescribeContinuousExportsRequest, context: __SerdeContext): any => { - return { - ...(input.exportIds != null && { exportIds: se_ContinuousExportIds(input.exportIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeContinuousExportsRequest omitted. -/** - * serializeAws_json1_1DescribeExportConfigurationsRequest - */ -const se_DescribeExportConfigurationsRequest = ( - input: DescribeExportConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.exportIds != null && { exportIds: se_ExportIds(input.exportIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeExportConfigurationsRequest omitted. -/** - * serializeAws_json1_1DescribeExportTasksRequest - */ -const se_DescribeExportTasksRequest = (input: DescribeExportTasksRequest, context: __SerdeContext): any => { - return { - ...(input.exportIds != null && { exportIds: se_ExportIds(input.exportIds, context) }), - ...(input.filters != null && { filters: se_ExportFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeExportTasksRequest omitted. -/** - * serializeAws_json1_1DescribeImportTasksFilterList - */ -const se_DescribeImportTasksFilterList = (input: ImportTaskFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ImportTaskFilter(entry, context); - }); -}; +// se_DescribeImportTasksFilterList omitted. -/** - * serializeAws_json1_1DescribeImportTasksRequest - */ -const se_DescribeImportTasksRequest = (input: DescribeImportTasksRequest, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_DescribeImportTasksFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeImportTasksRequest omitted. -/** - * serializeAws_json1_1DescribeTagsRequest - */ -const se_DescribeTagsRequest = (input: DescribeTagsRequest, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_TagFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeTagsRequest omitted. -/** - * serializeAws_json1_1DisassociateConfigurationItemsFromApplicationRequest - */ -const se_DisassociateConfigurationItemsFromApplicationRequest = ( - input: DisassociateConfigurationItemsFromApplicationRequest, - context: __SerdeContext -): any => { - return { - ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }), - ...(input.configurationIds != null && { - configurationIds: se_ConfigurationIdList(input.configurationIds, context), - }), - }; -}; +// se_DisassociateConfigurationItemsFromApplicationRequest omitted. -/** - * serializeAws_json1_1ExportDataFormats - */ -const se_ExportDataFormats = (input: (ExportDataFormat | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportDataFormats omitted. -/** - * serializeAws_json1_1ExportFilter - */ -const se_ExportFilter = (input: ExportFilter, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: input.condition }), - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_ExportFilter omitted. -/** - * serializeAws_json1_1ExportFilters - */ -const se_ExportFilters = (input: ExportFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExportFilter(entry, context); - }); -}; +// se_ExportFilters omitted. -/** - * serializeAws_json1_1ExportIds - */ -const se_ExportIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportIds omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: input.condition }), - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_1GetDiscoverySummaryRequest - */ -const se_GetDiscoverySummaryRequest = (input: GetDiscoverySummaryRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetDiscoverySummaryRequest omitted. -/** - * serializeAws_json1_1ImportTaskFilter - */ -const se_ImportTaskFilter = (input: ImportTaskFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_ImportTaskFilterValueList(input.values, context) }), - }; -}; +// se_ImportTaskFilter omitted. -/** - * serializeAws_json1_1ImportTaskFilterValueList - */ -const se_ImportTaskFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ImportTaskFilterValueList omitted. -/** - * serializeAws_json1_1ListConfigurationsRequest - */ -const se_ListConfigurationsRequest = (input: ListConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.configurationType != null && { configurationType: input.configurationType }), - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.orderBy != null && { orderBy: se_OrderByList(input.orderBy, context) }), - }; -}; +// se_ListConfigurationsRequest omitted. -/** - * serializeAws_json1_1ListServerNeighborsRequest - */ -const se_ListServerNeighborsRequest = (input: ListServerNeighborsRequest, context: __SerdeContext): any => { - return { - ...(input.configurationId != null && { configurationId: input.configurationId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.neighborConfigurationIds != null && { - neighborConfigurationIds: se_ConfigurationIdList(input.neighborConfigurationIds, context), - }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.portInformationNeeded != null && { portInformationNeeded: input.portInformationNeeded }), - }; -}; +// se_ListServerNeighborsRequest omitted. -/** - * serializeAws_json1_1OrderByElement - */ -const se_OrderByElement = (input: OrderByElement, context: __SerdeContext): any => { - return { - ...(input.fieldName != null && { fieldName: input.fieldName }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_OrderByElement omitted. -/** - * serializeAws_json1_1OrderByList - */ -const se_OrderByList = (input: OrderByElement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OrderByElement(entry, context); - }); -}; +// se_OrderByList omitted. -/** - * serializeAws_json1_1StartContinuousExportRequest - */ -const se_StartContinuousExportRequest = (input: StartContinuousExportRequest, context: __SerdeContext): any => { - return {}; -}; +// se_StartContinuousExportRequest omitted. -/** - * serializeAws_json1_1StartDataCollectionByAgentIdsRequest - */ -const se_StartDataCollectionByAgentIdsRequest = ( - input: StartDataCollectionByAgentIdsRequest, - context: __SerdeContext -): any => { - return { - ...(input.agentIds != null && { agentIds: se_AgentIds(input.agentIds, context) }), - }; -}; +// se_StartDataCollectionByAgentIdsRequest omitted. /** * serializeAws_json1_1StartExportTaskRequest */ const se_StartExportTaskRequest = (input: StartExportTaskRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.exportDataFormat != null && { exportDataFormat: se_ExportDataFormats(input.exportDataFormat, context) }), - ...(input.filters != null && { filters: se_ExportFilters(input.filters, context) }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + exportDataFormat: _json, + filters: _json, + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1StartImportTaskRequest */ const se_StartImportTaskRequest = (input: StartImportTaskRequest, context: __SerdeContext): any => { - return { - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.importUrl != null && { importUrl: input.importUrl }), - ...(input.name != null && { name: input.name }), - }; + return take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + importUrl: [], + name: [], + }); }; -/** - * serializeAws_json1_1StopContinuousExportRequest - */ -const se_StopContinuousExportRequest = (input: StopContinuousExportRequest, context: __SerdeContext): any => { - return { - ...(input.exportId != null && { exportId: input.exportId }), - }; -}; +// se_StopContinuousExportRequest omitted. -/** - * serializeAws_json1_1StopDataCollectionByAgentIdsRequest - */ -const se_StopDataCollectionByAgentIdsRequest = ( - input: StopDataCollectionByAgentIdsRequest, - context: __SerdeContext -): any => { - return { - ...(input.agentIds != null && { agentIds: se_AgentIds(input.agentIds, context) }), - }; -}; +// se_StopDataCollectionByAgentIdsRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagFilter - */ -const se_TagFilter = (input: TagFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_TagFilter omitted. -/** - * serializeAws_json1_1TagFilters - */ -const se_TagFilters = (input: TagFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagFilter(entry, context); - }); -}; +// se_TagFilters omitted. -/** - * serializeAws_json1_1TagSet - */ -const se_TagSet = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagSet omitted. -/** - * serializeAws_json1_1ToDeleteIdentifierList - */ -const se_ToDeleteIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ToDeleteIdentifierList omitted. -/** - * serializeAws_json1_1UpdateApplicationRequest - */ -const se_UpdateApplicationRequest = (input: UpdateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.configurationId != null && { configurationId: input.configurationId }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_UpdateApplicationRequest omitted. -/** - * deserializeAws_json1_1AgentConfigurationStatus - */ -const de_AgentConfigurationStatus = (output: any, context: __SerdeContext): AgentConfigurationStatus => { - return { - agentId: __expectString(output.agentId), - description: __expectString(output.description), - operationSucceeded: __expectBoolean(output.operationSucceeded), - } as any; -}; +// de_AgentConfigurationStatus omitted. -/** - * deserializeAws_json1_1AgentConfigurationStatusList - */ -const de_AgentConfigurationStatusList = (output: any, context: __SerdeContext): AgentConfigurationStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentConfigurationStatus(entry, context); - }); - return retVal; -}; +// de_AgentConfigurationStatusList omitted. -/** - * deserializeAws_json1_1AgentInfo - */ -const de_AgentInfo = (output: any, context: __SerdeContext): AgentInfo => { - return { - agentId: __expectString(output.agentId), - agentNetworkInfoList: - output.agentNetworkInfoList != null ? de_AgentNetworkInfoList(output.agentNetworkInfoList, context) : undefined, - agentType: __expectString(output.agentType), - collectionStatus: __expectString(output.collectionStatus), - connectorId: __expectString(output.connectorId), - health: __expectString(output.health), - hostName: __expectString(output.hostName), - lastHealthPingTime: __expectString(output.lastHealthPingTime), - registeredTime: __expectString(output.registeredTime), - version: __expectString(output.version), - } as any; -}; +// de_AgentInfo omitted. -/** - * deserializeAws_json1_1AgentNetworkInfo - */ -const de_AgentNetworkInfo = (output: any, context: __SerdeContext): AgentNetworkInfo => { - return { - ipAddress: __expectString(output.ipAddress), - macAddress: __expectString(output.macAddress), - } as any; -}; +// de_AgentNetworkInfo omitted. -/** - * deserializeAws_json1_1AgentNetworkInfoList - */ -const de_AgentNetworkInfoList = (output: any, context: __SerdeContext): AgentNetworkInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentNetworkInfo(entry, context); - }); - return retVal; -}; +// de_AgentNetworkInfoList omitted. -/** - * deserializeAws_json1_1AgentsInfo - */ -const de_AgentsInfo = (output: any, context: __SerdeContext): AgentInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentInfo(entry, context); - }); - return retVal; -}; +// de_AgentsInfo omitted. -/** - * deserializeAws_json1_1AssociateConfigurationItemsToApplicationResponse - */ -const de_AssociateConfigurationItemsToApplicationResponse = ( - output: any, - context: __SerdeContext -): AssociateConfigurationItemsToApplicationResponse => { - return {} as any; -}; +// de_AssociateConfigurationItemsToApplicationResponse omitted. -/** - * deserializeAws_json1_1AuthorizationErrorException - */ -const de_AuthorizationErrorException = (output: any, context: __SerdeContext): AuthorizationErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AuthorizationErrorException omitted. -/** - * deserializeAws_json1_1BatchDeleteImportDataError - */ -const de_BatchDeleteImportDataError = (output: any, context: __SerdeContext): BatchDeleteImportDataError => { - return { - errorCode: __expectString(output.errorCode), - errorDescription: __expectString(output.errorDescription), - importTaskId: __expectString(output.importTaskId), - } as any; -}; +// de_BatchDeleteImportDataError omitted. -/** - * deserializeAws_json1_1BatchDeleteImportDataErrorList - */ -const de_BatchDeleteImportDataErrorList = (output: any, context: __SerdeContext): BatchDeleteImportDataError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteImportDataError(entry, context); - }); - return retVal; -}; +// de_BatchDeleteImportDataErrorList omitted. -/** - * deserializeAws_json1_1BatchDeleteImportDataResponse - */ -const de_BatchDeleteImportDataResponse = (output: any, context: __SerdeContext): BatchDeleteImportDataResponse => { - return { - errors: output.errors != null ? de_BatchDeleteImportDataErrorList(output.errors, context) : undefined, - } as any; -}; +// de_BatchDeleteImportDataResponse omitted. -/** - * deserializeAws_json1_1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Configuration omitted. -/** - * deserializeAws_json1_1Configurations - */ -const de_Configurations = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Configuration(entry, context); - }); - return retVal; -}; +// de_Configurations omitted. /** * deserializeAws_json1_1ConfigurationTag */ const de_ConfigurationTag = (output: any, context: __SerdeContext): ConfigurationTag => { - return { - configurationId: __expectString(output.configurationId), - configurationType: __expectString(output.configurationType), - key: __expectString(output.key), - timeOfCreation: - output.timeOfCreation != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeOfCreation))) - : undefined, - value: __expectString(output.value), - } as any; + return take(output, { + configurationId: __expectString, + configurationType: __expectString, + key: __expectString, + timeOfCreation: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + value: __expectString, + }) as any; }; /** @@ -2852,40 +2267,27 @@ const de_ConfigurationTagSet = (output: any, context: __SerdeContext): Configura const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigurationTag(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ConflictErrorException - */ -const de_ConflictErrorException = (output: any, context: __SerdeContext): ConflictErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConflictErrorException omitted. /** * deserializeAws_json1_1ContinuousExportDescription */ const de_ContinuousExportDescription = (output: any, context: __SerdeContext): ContinuousExportDescription => { - return { - dataSource: __expectString(output.dataSource), - exportId: __expectString(output.exportId), - s3Bucket: __expectString(output.s3Bucket), - schemaStorageConfig: - output.schemaStorageConfig != null ? de_SchemaStorageConfig(output.schemaStorageConfig, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - statusDetail: __expectString(output.statusDetail), - stopTime: - output.stopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopTime))) : undefined, - } as any; + return take(output, { + dataSource: __expectString, + exportId: __expectString, + s3Bucket: __expectString, + schemaStorageConfig: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusDetail: __expectString, + stopTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2895,151 +2297,34 @@ const de_ContinuousExportDescriptions = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContinuousExportDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CreateApplicationResponse - */ -const de_CreateApplicationResponse = (output: any, context: __SerdeContext): CreateApplicationResponse => { - return { - configurationId: __expectString(output.configurationId), - } as any; -}; +// de_CreateApplicationResponse omitted. -/** - * deserializeAws_json1_1CreateTagsResponse - */ -const de_CreateTagsResponse = (output: any, context: __SerdeContext): CreateTagsResponse => { - return {} as any; -}; +// de_CreateTagsResponse omitted. -/** - * deserializeAws_json1_1CustomerAgentInfo - */ -const de_CustomerAgentInfo = (output: any, context: __SerdeContext): CustomerAgentInfo => { - return { - activeAgents: __expectInt32(output.activeAgents), - blackListedAgents: __expectInt32(output.blackListedAgents), - healthyAgents: __expectInt32(output.healthyAgents), - shutdownAgents: __expectInt32(output.shutdownAgents), - totalAgents: __expectInt32(output.totalAgents), - unhealthyAgents: __expectInt32(output.unhealthyAgents), - unknownAgents: __expectInt32(output.unknownAgents), - } as any; -}; +// de_CustomerAgentInfo omitted. -/** - * deserializeAws_json1_1CustomerAgentlessCollectorInfo - */ -const de_CustomerAgentlessCollectorInfo = (output: any, context: __SerdeContext): CustomerAgentlessCollectorInfo => { - return { - activeAgentlessCollectors: __expectInt32(output.activeAgentlessCollectors), - denyListedAgentlessCollectors: __expectInt32(output.denyListedAgentlessCollectors), - healthyAgentlessCollectors: __expectInt32(output.healthyAgentlessCollectors), - shutdownAgentlessCollectors: __expectInt32(output.shutdownAgentlessCollectors), - totalAgentlessCollectors: __expectInt32(output.totalAgentlessCollectors), - unhealthyAgentlessCollectors: __expectInt32(output.unhealthyAgentlessCollectors), - unknownAgentlessCollectors: __expectInt32(output.unknownAgentlessCollectors), - } as any; -}; +// de_CustomerAgentlessCollectorInfo omitted. -/** - * deserializeAws_json1_1CustomerConnectorInfo - */ -const de_CustomerConnectorInfo = (output: any, context: __SerdeContext): CustomerConnectorInfo => { - return { - activeConnectors: __expectInt32(output.activeConnectors), - blackListedConnectors: __expectInt32(output.blackListedConnectors), - healthyConnectors: __expectInt32(output.healthyConnectors), - shutdownConnectors: __expectInt32(output.shutdownConnectors), - totalConnectors: __expectInt32(output.totalConnectors), - unhealthyConnectors: __expectInt32(output.unhealthyConnectors), - unknownConnectors: __expectInt32(output.unknownConnectors), - } as any; -}; +// de_CustomerConnectorInfo omitted. -/** - * deserializeAws_json1_1CustomerMeCollectorInfo - */ -const de_CustomerMeCollectorInfo = (output: any, context: __SerdeContext): CustomerMeCollectorInfo => { - return { - activeMeCollectors: __expectInt32(output.activeMeCollectors), - denyListedMeCollectors: __expectInt32(output.denyListedMeCollectors), - healthyMeCollectors: __expectInt32(output.healthyMeCollectors), - shutdownMeCollectors: __expectInt32(output.shutdownMeCollectors), - totalMeCollectors: __expectInt32(output.totalMeCollectors), - unhealthyMeCollectors: __expectInt32(output.unhealthyMeCollectors), - unknownMeCollectors: __expectInt32(output.unknownMeCollectors), - } as any; -}; +// de_CustomerMeCollectorInfo omitted. -/** - * deserializeAws_json1_1DeleteApplicationsResponse - */ -const de_DeleteApplicationsResponse = (output: any, context: __SerdeContext): DeleteApplicationsResponse => { - return {} as any; -}; +// de_DeleteApplicationsResponse omitted. -/** - * deserializeAws_json1_1DeleteTagsResponse - */ -const de_DeleteTagsResponse = (output: any, context: __SerdeContext): DeleteTagsResponse => { - return {} as any; -}; +// de_DeleteTagsResponse omitted. -/** - * deserializeAws_json1_1DescribeAgentsResponse - */ -const de_DescribeAgentsResponse = (output: any, context: __SerdeContext): DescribeAgentsResponse => { - return { - agentsInfo: output.agentsInfo != null ? de_AgentsInfo(output.agentsInfo, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeAgentsResponse omitted. -/** - * deserializeAws_json1_1DescribeConfigurationsAttribute - */ -const de_DescribeConfigurationsAttribute = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DescribeConfigurationsAttribute omitted. -/** - * deserializeAws_json1_1DescribeConfigurationsAttributes - */ -const de_DescribeConfigurationsAttributes = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DescribeConfigurationsAttribute(entry, context); - }); - return retVal; -}; +// de_DescribeConfigurationsAttributes omitted. -/** - * deserializeAws_json1_1DescribeConfigurationsResponse - */ -const de_DescribeConfigurationsResponse = (output: any, context: __SerdeContext): DescribeConfigurationsResponse => { - return { - configurations: - output.configurations != null ? de_DescribeConfigurationsAttributes(output.configurations, context) : undefined, - } as any; -}; +// de_DescribeConfigurationsResponse omitted. /** * deserializeAws_json1_1DescribeContinuousExportsResponse @@ -3048,11 +2333,10 @@ const de_DescribeContinuousExportsResponse = ( output: any, context: __SerdeContext ): DescribeContinuousExportsResponse => { - return { - descriptions: - output.descriptions != null ? de_ContinuousExportDescriptions(output.descriptions, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + descriptions: (_: any) => de_ContinuousExportDescriptions(_, context), + nextToken: __expectString, + }) as any; }; /** @@ -3062,84 +2346,60 @@ const de_DescribeExportConfigurationsResponse = ( output: any, context: __SerdeContext ): DescribeExportConfigurationsResponse => { - return { - exportsInfo: output.exportsInfo != null ? de_ExportsInfo(output.exportsInfo, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + exportsInfo: (_: any) => de_ExportsInfo(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeExportTasksResponse */ const de_DescribeExportTasksResponse = (output: any, context: __SerdeContext): DescribeExportTasksResponse => { - return { - exportsInfo: output.exportsInfo != null ? de_ExportsInfo(output.exportsInfo, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + exportsInfo: (_: any) => de_ExportsInfo(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeImportTasksResponse */ const de_DescribeImportTasksResponse = (output: any, context: __SerdeContext): DescribeImportTasksResponse => { - return { - nextToken: __expectString(output.nextToken), - tasks: output.tasks != null ? de_ImportTaskList(output.tasks, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + tasks: (_: any) => de_ImportTaskList(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeTagsResponse */ const de_DescribeTagsResponse = (output: any, context: __SerdeContext): DescribeTagsResponse => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_ConfigurationTagSet(output.tags, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + tags: (_: any) => de_ConfigurationTagSet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DisassociateConfigurationItemsFromApplicationResponse - */ -const de_DisassociateConfigurationItemsFromApplicationResponse = ( - output: any, - context: __SerdeContext -): DisassociateConfigurationItemsFromApplicationResponse => { - return {} as any; -}; +// de_DisassociateConfigurationItemsFromApplicationResponse omitted. -/** - * deserializeAws_json1_1ExportConfigurationsResponse - */ -const de_ExportConfigurationsResponse = (output: any, context: __SerdeContext): ExportConfigurationsResponse => { - return { - exportId: __expectString(output.exportId), - } as any; -}; +// de_ExportConfigurationsResponse omitted. /** * deserializeAws_json1_1ExportInfo */ const de_ExportInfo = (output: any, context: __SerdeContext): ExportInfo => { - return { - configurationsDownloadUrl: __expectString(output.configurationsDownloadUrl), - exportId: __expectString(output.exportId), - exportRequestTime: - output.exportRequestTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.exportRequestTime))) - : undefined, - exportStatus: __expectString(output.exportStatus), - isTruncated: __expectBoolean(output.isTruncated), - requestedEndTime: - output.requestedEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestedEndTime))) - : undefined, - requestedStartTime: - output.requestedStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestedStartTime))) - : undefined, - statusMessage: __expectString(output.statusMessage), - } as any; + return take(output, { + configurationsDownloadUrl: __expectString, + exportId: __expectString, + exportRequestTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + exportStatus: __expectString, + isTruncated: __expectBoolean, + requestedEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + requestedStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + statusMessage: __expectString, + }) as any; }; /** @@ -3149,72 +2409,34 @@ const de_ExportsInfo = (output: any, context: __SerdeContext): ExportInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExportInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1GetDiscoverySummaryResponse - */ -const de_GetDiscoverySummaryResponse = (output: any, context: __SerdeContext): GetDiscoverySummaryResponse => { - return { - agentSummary: output.agentSummary != null ? de_CustomerAgentInfo(output.agentSummary, context) : undefined, - agentlessCollectorSummary: - output.agentlessCollectorSummary != null - ? de_CustomerAgentlessCollectorInfo(output.agentlessCollectorSummary, context) - : undefined, - applications: __expectLong(output.applications), - connectorSummary: - output.connectorSummary != null ? de_CustomerConnectorInfo(output.connectorSummary, context) : undefined, - meCollectorSummary: - output.meCollectorSummary != null ? de_CustomerMeCollectorInfo(output.meCollectorSummary, context) : undefined, - servers: __expectLong(output.servers), - serversMappedToApplications: __expectLong(output.serversMappedToApplications), - serversMappedtoTags: __expectLong(output.serversMappedtoTags), - } as any; -}; - -/** - * deserializeAws_json1_1HomeRegionNotSetException - */ -const de_HomeRegionNotSetException = (output: any, context: __SerdeContext): HomeRegionNotSetException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_GetDiscoverySummaryResponse omitted. + +// de_HomeRegionNotSetException omitted. /** * deserializeAws_json1_1ImportTask */ const de_ImportTask = (output: any, context: __SerdeContext): ImportTask => { - return { - applicationImportFailure: __expectInt32(output.applicationImportFailure), - applicationImportSuccess: __expectInt32(output.applicationImportSuccess), - clientRequestToken: __expectString(output.clientRequestToken), - errorsAndFailedEntriesZip: __expectString(output.errorsAndFailedEntriesZip), - importCompletionTime: - output.importCompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.importCompletionTime))) - : undefined, - importDeletedTime: - output.importDeletedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.importDeletedTime))) - : undefined, - importRequestTime: - output.importRequestTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.importRequestTime))) - : undefined, - importTaskId: __expectString(output.importTaskId), - importUrl: __expectString(output.importUrl), - name: __expectString(output.name), - serverImportFailure: __expectInt32(output.serverImportFailure), - serverImportSuccess: __expectInt32(output.serverImportSuccess), - status: __expectString(output.status), - } as any; + return take(output, { + applicationImportFailure: __expectInt32, + applicationImportSuccess: __expectInt32, + clientRequestToken: __expectString, + errorsAndFailedEntriesZip: __expectString, + importCompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + importDeletedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + importRequestTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + importTaskId: __expectString, + importUrl: __expectString, + name: __expectString, + serverImportFailure: __expectInt32, + serverImportSuccess: __expectInt32, + status: __expectString, + }) as any; }; /** @@ -3224,211 +2446,72 @@ const de_ImportTaskList = (output: any, context: __SerdeContext): ImportTask[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportTask(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterValueException omitted. -/** - * deserializeAws_json1_1ListConfigurationsResponse - */ -const de_ListConfigurationsResponse = (output: any, context: __SerdeContext): ListConfigurationsResponse => { - return { - configurations: output.configurations != null ? de_Configurations(output.configurations, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListConfigurationsResponse omitted. -/** - * deserializeAws_json1_1ListServerNeighborsResponse - */ -const de_ListServerNeighborsResponse = (output: any, context: __SerdeContext): ListServerNeighborsResponse => { - return { - knownDependencyCount: __expectLong(output.knownDependencyCount), - neighbors: output.neighbors != null ? de_NeighborDetailsList(output.neighbors, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListServerNeighborsResponse omitted. -/** - * deserializeAws_json1_1NeighborConnectionDetail - */ -const de_NeighborConnectionDetail = (output: any, context: __SerdeContext): NeighborConnectionDetail => { - return { - connectionsCount: __expectLong(output.connectionsCount), - destinationPort: __expectInt32(output.destinationPort), - destinationServerId: __expectString(output.destinationServerId), - sourceServerId: __expectString(output.sourceServerId), - transportProtocol: __expectString(output.transportProtocol), - } as any; -}; +// de_NeighborConnectionDetail omitted. -/** - * deserializeAws_json1_1NeighborDetailsList - */ -const de_NeighborDetailsList = (output: any, context: __SerdeContext): NeighborConnectionDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NeighborConnectionDetail(entry, context); - }); - return retVal; -}; +// de_NeighborDetailsList omitted. -/** - * deserializeAws_json1_1OperationNotPermittedException - */ -const de_OperationNotPermittedException = (output: any, context: __SerdeContext): OperationNotPermittedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_OperationNotPermittedException omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1SchemaStorageConfig - */ -const de_SchemaStorageConfig = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SchemaStorageConfig omitted. -/** - * deserializeAws_json1_1ServerInternalErrorException - */ -const de_ServerInternalErrorException = (output: any, context: __SerdeContext): ServerInternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServerInternalErrorException omitted. /** * deserializeAws_json1_1StartContinuousExportResponse */ const de_StartContinuousExportResponse = (output: any, context: __SerdeContext): StartContinuousExportResponse => { - return { - dataSource: __expectString(output.dataSource), - exportId: __expectString(output.exportId), - s3Bucket: __expectString(output.s3Bucket), - schemaStorageConfig: - output.schemaStorageConfig != null ? de_SchemaStorageConfig(output.schemaStorageConfig, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; + return take(output, { + dataSource: __expectString, + exportId: __expectString, + s3Bucket: __expectString, + schemaStorageConfig: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1StartDataCollectionByAgentIdsResponse - */ -const de_StartDataCollectionByAgentIdsResponse = ( - output: any, - context: __SerdeContext -): StartDataCollectionByAgentIdsResponse => { - return { - agentsConfigurationStatus: - output.agentsConfigurationStatus != null - ? de_AgentConfigurationStatusList(output.agentsConfigurationStatus, context) - : undefined, - } as any; -}; +// de_StartDataCollectionByAgentIdsResponse omitted. -/** - * deserializeAws_json1_1StartExportTaskResponse - */ -const de_StartExportTaskResponse = (output: any, context: __SerdeContext): StartExportTaskResponse => { - return { - exportId: __expectString(output.exportId), - } as any; -}; +// de_StartExportTaskResponse omitted. /** * deserializeAws_json1_1StartImportTaskResponse */ const de_StartImportTaskResponse = (output: any, context: __SerdeContext): StartImportTaskResponse => { - return { - task: output.task != null ? de_ImportTask(output.task, context) : undefined, - } as any; + return take(output, { + task: (_: any) => de_ImportTask(_, context), + }) as any; }; /** * deserializeAws_json1_1StopContinuousExportResponse */ const de_StopContinuousExportResponse = (output: any, context: __SerdeContext): StopContinuousExportResponse => { - return { - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - stopTime: - output.stopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopTime))) : undefined, - } as any; + return take(output, { + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stopTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1StopDataCollectionByAgentIdsResponse - */ -const de_StopDataCollectionByAgentIdsResponse = ( - output: any, - context: __SerdeContext -): StopDataCollectionByAgentIdsResponse => { - return { - agentsConfigurationStatus: - output.agentsConfigurationStatus != null - ? de_AgentConfigurationStatusList(output.agentsConfigurationStatus, context) - : undefined, - } as any; -}; +// de_StopDataCollectionByAgentIdsResponse omitted. -/** - * deserializeAws_json1_1UpdateApplicationResponse - */ -const de_UpdateApplicationResponse = (output: any, context: __SerdeContext): UpdateApplicationResponse => { - return {} as any; -}; +// de_UpdateApplicationResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3450,6 +2533,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-application-insights/src/protocols/Aws_json1_1.ts b/clients/client-application-insights/src/protocols/Aws_json1_1.ts index dcf664199fce..da5855c7a880 100644 --- a/clients/client-application-insights/src/protocols/Aws_json1_1.ts +++ b/clients/client-application-insights/src/protocols/Aws_json1_1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -10,7 +10,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -73,56 +74,35 @@ import { UpdateLogPatternCommandInput, UpdateLogPatternCommandOutput } from "../ import { ApplicationInsightsServiceException as __BaseException } from "../models/ApplicationInsightsServiceException"; import { AccessDeniedException, - ApplicationComponent, - ApplicationInfo, BadRequestException, ConfigurationEvent, CreateApplicationRequest, - CreateApplicationResponse, CreateComponentRequest, - CreateComponentResponse, CreateLogPatternRequest, - CreateLogPatternResponse, DeleteApplicationRequest, - DeleteApplicationResponse, DeleteComponentRequest, - DeleteComponentResponse, DeleteLogPatternRequest, - DeleteLogPatternResponse, DescribeApplicationRequest, - DescribeApplicationResponse, DescribeComponentConfigurationRecommendationRequest, - DescribeComponentConfigurationRecommendationResponse, DescribeComponentConfigurationRequest, - DescribeComponentConfigurationResponse, DescribeComponentRequest, - DescribeComponentResponse, DescribeLogPatternRequest, - DescribeLogPatternResponse, DescribeObservationRequest, DescribeObservationResponse, DescribeProblemObservationsRequest, DescribeProblemObservationsResponse, DescribeProblemRequest, DescribeProblemResponse, - FeedbackKey, - FeedbackValue, InternalServerException, ListApplicationsRequest, - ListApplicationsResponse, ListComponentsRequest, - ListComponentsResponse, ListConfigurationHistoryRequest, ListConfigurationHistoryResponse, ListLogPatternSetsRequest, - ListLogPatternSetsResponse, ListLogPatternsRequest, - ListLogPatternsResponse, ListProblemsRequest, ListProblemsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, - LogPattern, Observation, Problem, RelatedObservations, @@ -130,20 +110,13 @@ import { ResourceNotFoundException, Tag, TagResourceRequest, - TagResourceResponse, TagsAlreadyExistException, - Tier, TooManyTagsException, UntagResourceRequest, - UntagResourceResponse, UpdateApplicationRequest, - UpdateApplicationResponse, UpdateComponentConfigurationRequest, - UpdateComponentConfigurationResponse, UpdateComponentRequest, - UpdateComponentResponse, UpdateLogPatternRequest, - UpdateLogPatternResponse, ValidationException, } from "../models/models_0"; @@ -156,7 +129,7 @@ export const se_CreateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplication"); let body: any; - body = JSON.stringify(se_CreateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -169,7 +142,7 @@ export const se_CreateComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateComponent"); let body: any; - body = JSON.stringify(se_CreateComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -182,7 +155,7 @@ export const se_CreateLogPatternCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLogPattern"); let body: any; - body = JSON.stringify(se_CreateLogPatternRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -195,7 +168,7 @@ export const se_DeleteApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplication"); let body: any; - body = JSON.stringify(se_DeleteApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -208,7 +181,7 @@ export const se_DeleteComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteComponent"); let body: any; - body = JSON.stringify(se_DeleteComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -221,7 +194,7 @@ export const se_DeleteLogPatternCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLogPattern"); let body: any; - body = JSON.stringify(se_DeleteLogPatternRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -234,7 +207,7 @@ export const se_DescribeApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplication"); let body: any; - body = JSON.stringify(se_DescribeApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -247,7 +220,7 @@ export const se_DescribeComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeComponent"); let body: any; - body = JSON.stringify(se_DescribeComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -260,7 +233,7 @@ export const se_DescribeComponentConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeComponentConfiguration"); let body: any; - body = JSON.stringify(se_DescribeComponentConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -273,7 +246,7 @@ export const se_DescribeComponentConfigurationRecommendationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeComponentConfigurationRecommendation"); let body: any; - body = JSON.stringify(se_DescribeComponentConfigurationRecommendationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -286,7 +259,7 @@ export const se_DescribeLogPatternCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLogPattern"); let body: any; - body = JSON.stringify(se_DescribeLogPatternRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -299,7 +272,7 @@ export const se_DescribeObservationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeObservation"); let body: any; - body = JSON.stringify(se_DescribeObservationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -312,7 +285,7 @@ export const se_DescribeProblemCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProblem"); let body: any; - body = JSON.stringify(se_DescribeProblemRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -325,7 +298,7 @@ export const se_DescribeProblemObservationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProblemObservations"); let body: any; - body = JSON.stringify(se_DescribeProblemObservationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -338,7 +311,7 @@ export const se_ListApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplications"); let body: any; - body = JSON.stringify(se_ListApplicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -351,7 +324,7 @@ export const se_ListComponentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComponents"); let body: any; - body = JSON.stringify(se_ListComponentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +350,7 @@ export const se_ListLogPatternsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLogPatterns"); let body: any; - body = JSON.stringify(se_ListLogPatternsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +363,7 @@ export const se_ListLogPatternSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLogPatternSets"); let body: any; - body = JSON.stringify(se_ListLogPatternSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -416,7 +389,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -429,7 +402,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -442,7 +415,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -455,7 +428,7 @@ export const se_UpdateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplication"); let body: any; - body = JSON.stringify(se_UpdateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -468,7 +441,7 @@ export const se_UpdateComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateComponent"); let body: any; - body = JSON.stringify(se_UpdateComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -481,7 +454,7 @@ export const se_UpdateComponentConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateComponentConfiguration"); let body: any; - body = JSON.stringify(se_UpdateComponentConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -494,7 +467,7 @@ export const se_UpdateLogPatternCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLogPattern"); let body: any; - body = JSON.stringify(se_UpdateLogPatternRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -510,12 +483,12 @@ export const de_CreateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateApplicationResponse(data, context); + contents = _json(data); const response: CreateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -551,10 +524,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -572,12 +544,12 @@ export const de_CreateComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateComponentResponse(data, context); + contents = _json(data); const response: CreateComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -607,10 +579,9 @@ const de_CreateComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -628,12 +599,12 @@ export const de_CreateLogPatternCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLogPatternResponse(data, context); + contents = _json(data); const response: CreateLogPatternCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -663,10 +634,9 @@ const de_CreateLogPatternCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -684,12 +654,12 @@ export const de_DeleteApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationResponse(data, context); + contents = _json(data); const response: DeleteApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -719,10 +689,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -740,12 +709,12 @@ export const de_DeleteComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteComponentResponse(data, context); + contents = _json(data); const response: DeleteComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -772,10 +741,9 @@ const de_DeleteComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -793,12 +761,12 @@ export const de_DeleteLogPatternCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLogPatternResponse(data, context); + contents = _json(data); const response: DeleteLogPatternCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -828,10 +796,9 @@ const de_DeleteLogPatternCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -849,12 +816,12 @@ export const de_DescribeApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeApplicationResponse(data, context); + contents = _json(data); const response: DescribeApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -881,10 +848,9 @@ const de_DescribeApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -902,12 +868,12 @@ export const de_DescribeComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeComponentResponse(data, context); + contents = _json(data); const response: DescribeComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -934,10 +900,9 @@ const de_DescribeComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -955,12 +920,12 @@ export const de_DescribeComponentConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeComponentConfigurationResponse(data, context); + contents = _json(data); const response: DescribeComponentConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -987,10 +952,9 @@ const de_DescribeComponentConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1008,12 +972,12 @@ export const de_DescribeComponentConfigurationRecommendationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeComponentConfigurationRecommendationResponse(data, context); + contents = _json(data); const response: DescribeComponentConfigurationRecommendationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1040,10 +1004,9 @@ const de_DescribeComponentConfigurationRecommendationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1061,12 +1024,12 @@ export const de_DescribeLogPatternCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLogPatternResponse(data, context); + contents = _json(data); const response: DescribeLogPatternCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1093,10 +1056,9 @@ const de_DescribeLogPatternCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1119,7 +1081,7 @@ export const de_DescribeObservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1146,10 +1108,9 @@ const de_DescribeObservationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1172,7 +1133,7 @@ export const de_DescribeProblemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1199,10 +1160,9 @@ const de_DescribeProblemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1225,7 +1185,7 @@ export const de_DescribeProblemObservationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1252,10 +1212,9 @@ const de_DescribeProblemObservationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,12 +1232,12 @@ export const de_ListApplicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationsResponse(data, context); + contents = _json(data); const response: ListApplicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1302,10 +1261,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1323,12 +1281,12 @@ export const de_ListComponentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListComponentsResponse(data, context); + contents = _json(data); const response: ListComponentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1355,10 +1313,9 @@ const de_ListComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1381,7 +1338,7 @@ export const de_ListConfigurationHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1408,10 +1365,9 @@ const de_ListConfigurationHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1429,12 +1385,12 @@ export const de_ListLogPatternsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLogPatternsResponse(data, context); + contents = _json(data); const response: ListLogPatternsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1461,10 +1417,9 @@ const de_ListLogPatternsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1482,12 +1437,12 @@ export const de_ListLogPatternSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLogPatternSetsResponse(data, context); + contents = _json(data); const response: ListLogPatternSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1514,10 +1469,9 @@ const de_ListLogPatternSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1540,7 +1494,7 @@ export const de_ListProblemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1567,10 +1521,9 @@ const de_ListProblemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1588,12 +1541,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1617,10 +1570,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1638,12 +1590,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1670,10 +1622,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1691,12 +1642,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1720,10 +1671,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1741,12 +1691,12 @@ export const de_UpdateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateApplicationResponse(data, context); + contents = _json(data); const response: UpdateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1773,10 +1723,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1794,12 +1743,12 @@ export const de_UpdateComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateComponentResponse(data, context); + contents = _json(data); const response: UpdateComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1829,10 +1778,9 @@ const de_UpdateComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1850,12 +1798,12 @@ export const de_UpdateComponentConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateComponentConfigurationResponse(data, context); + contents = _json(data); const response: UpdateComponentConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1882,10 +1830,9 @@ const de_UpdateComponentConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1903,12 +1850,12 @@ export const de_UpdateLogPatternCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLogPatternResponse(data, context); + contents = _json(data); const response: UpdateLogPatternCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1938,10 +1885,9 @@ const de_UpdateLogPatternCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1955,7 +1901,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1968,7 +1914,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BadRequestException(body, context); + const deserialized: any = _json(body); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1984,7 +1930,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2000,7 +1946,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2016,7 +1962,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2032,7 +1978,7 @@ const de_TagsAlreadyExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagsAlreadyExistException(body, context); + const deserialized: any = _json(body); const exception = new TagsAlreadyExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2048,7 +1994,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2061,7 +2007,7 @@ const de_TooManyTagsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2069,456 +2015,116 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CreateApplicationRequest - */ -const se_CreateApplicationRequest = (input: CreateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled }), - ...(input.AutoCreate != null && { AutoCreate: input.AutoCreate }), - ...(input.CWEMonitorEnabled != null && { CWEMonitorEnabled: input.CWEMonitorEnabled }), - ...(input.GroupingType != null && { GroupingType: input.GroupingType }), - ...(input.OpsCenterEnabled != null && { OpsCenterEnabled: input.OpsCenterEnabled }), - ...(input.OpsItemSNSTopicArn != null && { OpsItemSNSTopicArn: input.OpsItemSNSTopicArn }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateApplicationRequest omitted. -/** - * serializeAws_json1_1CreateComponentRequest - */ -const se_CreateComponentRequest = (input: CreateComponentRequest, context: __SerdeContext): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.ResourceList != null && { ResourceList: se_ResourceList(input.ResourceList, context) }), - }; -}; +// se_CreateComponentRequest omitted. -/** - * serializeAws_json1_1CreateLogPatternRequest - */ -const se_CreateLogPatternRequest = (input: CreateLogPatternRequest, context: __SerdeContext): any => { - return { - ...(input.Pattern != null && { Pattern: input.Pattern }), - ...(input.PatternName != null && { PatternName: input.PatternName }), - ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }), - ...(input.Rank != null && { Rank: input.Rank }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_CreateLogPatternRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationRequest - */ -const se_DeleteApplicationRequest = (input: DeleteApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DeleteApplicationRequest omitted. -/** - * serializeAws_json1_1DeleteComponentRequest - */ -const se_DeleteComponentRequest = (input: DeleteComponentRequest, context: __SerdeContext): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DeleteComponentRequest omitted. -/** - * serializeAws_json1_1DeleteLogPatternRequest - */ -const se_DeleteLogPatternRequest = (input: DeleteLogPatternRequest, context: __SerdeContext): any => { - return { - ...(input.PatternName != null && { PatternName: input.PatternName }), - ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DeleteLogPatternRequest omitted. -/** - * serializeAws_json1_1DescribeApplicationRequest - */ -const se_DescribeApplicationRequest = (input: DescribeApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DescribeApplicationRequest omitted. -/** - * serializeAws_json1_1DescribeComponentConfigurationRecommendationRequest - */ -const se_DescribeComponentConfigurationRecommendationRequest = ( - input: DescribeComponentConfigurationRecommendationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.Tier != null && { Tier: input.Tier }), - }; -}; +// se_DescribeComponentConfigurationRecommendationRequest omitted. -/** - * serializeAws_json1_1DescribeComponentConfigurationRequest - */ -const se_DescribeComponentConfigurationRequest = ( - input: DescribeComponentConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DescribeComponentConfigurationRequest omitted. -/** - * serializeAws_json1_1DescribeComponentRequest - */ -const se_DescribeComponentRequest = (input: DescribeComponentRequest, context: __SerdeContext): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DescribeComponentRequest omitted. -/** - * serializeAws_json1_1DescribeLogPatternRequest - */ -const se_DescribeLogPatternRequest = (input: DescribeLogPatternRequest, context: __SerdeContext): any => { - return { - ...(input.PatternName != null && { PatternName: input.PatternName }), - ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_DescribeLogPatternRequest omitted. -/** - * serializeAws_json1_1DescribeObservationRequest - */ -const se_DescribeObservationRequest = (input: DescribeObservationRequest, context: __SerdeContext): any => { - return { - ...(input.ObservationId != null && { ObservationId: input.ObservationId }), - }; -}; +// se_DescribeObservationRequest omitted. -/** - * serializeAws_json1_1DescribeProblemObservationsRequest - */ -const se_DescribeProblemObservationsRequest = ( - input: DescribeProblemObservationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ProblemId != null && { ProblemId: input.ProblemId }), - }; -}; +// se_DescribeProblemObservationsRequest omitted. -/** - * serializeAws_json1_1DescribeProblemRequest - */ -const se_DescribeProblemRequest = (input: DescribeProblemRequest, context: __SerdeContext): any => { - return { - ...(input.ProblemId != null && { ProblemId: input.ProblemId }), - }; -}; +// se_DescribeProblemRequest omitted. -/** - * serializeAws_json1_1ListApplicationsRequest - */ -const se_ListApplicationsRequest = (input: ListApplicationsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListApplicationsRequest omitted. -/** - * serializeAws_json1_1ListComponentsRequest - */ -const se_ListComponentsRequest = (input: ListComponentsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_ListComponentsRequest omitted. /** * serializeAws_json1_1ListConfigurationHistoryRequest */ const se_ListConfigurationHistoryRequest = (input: ListConfigurationHistoryRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.EventStatus != null && { EventStatus: input.EventStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + EventStatus: [], + MaxResults: [], + NextToken: [], + ResourceGroupName: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListLogPatternSetsRequest - */ -const se_ListLogPatternSetsRequest = (input: ListLogPatternSetsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_ListLogPatternSetsRequest omitted. -/** - * serializeAws_json1_1ListLogPatternsRequest - */ -const se_ListLogPatternsRequest = (input: ListLogPatternsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_ListLogPatternsRequest omitted. /** * serializeAws_json1_1ListProblemsRequest */ const se_ListProblemsRequest = (input: ListProblemsRequest, context: __SerdeContext): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + ComponentName: [], + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + ResourceGroupName: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ResourceList - */ -const se_ResourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateApplicationRequest - */ -const se_UpdateApplicationRequest = (input: UpdateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled }), - ...(input.CWEMonitorEnabled != null && { CWEMonitorEnabled: input.CWEMonitorEnabled }), - ...(input.OpsCenterEnabled != null && { OpsCenterEnabled: input.OpsCenterEnabled }), - ...(input.OpsItemSNSTopicArn != null && { OpsItemSNSTopicArn: input.OpsItemSNSTopicArn }), - ...(input.RemoveSNSTopic != null && { RemoveSNSTopic: input.RemoveSNSTopic }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_UpdateApplicationRequest omitted. -/** - * serializeAws_json1_1UpdateComponentConfigurationRequest - */ -const se_UpdateComponentConfigurationRequest = ( - input: UpdateComponentConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoConfigEnabled != null && { AutoConfigEnabled: input.AutoConfigEnabled }), - ...(input.ComponentConfiguration != null && { ComponentConfiguration: input.ComponentConfiguration }), - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.Monitor != null && { Monitor: input.Monitor }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.Tier != null && { Tier: input.Tier }), - }; -}; +// se_UpdateComponentConfigurationRequest omitted. -/** - * serializeAws_json1_1UpdateComponentRequest - */ -const se_UpdateComponentRequest = (input: UpdateComponentRequest, context: __SerdeContext): any => { - return { - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.NewComponentName != null && { NewComponentName: input.NewComponentName }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - ...(input.ResourceList != null && { ResourceList: se_ResourceList(input.ResourceList, context) }), - }; -}; +// se_UpdateComponentRequest omitted. -/** - * serializeAws_json1_1UpdateLogPatternRequest - */ -const se_UpdateLogPatternRequest = (input: UpdateLogPatternRequest, context: __SerdeContext): any => { - return { - ...(input.Pattern != null && { Pattern: input.Pattern }), - ...(input.PatternName != null && { PatternName: input.PatternName }), - ...(input.PatternSetName != null && { PatternSetName: input.PatternSetName }), - ...(input.Rank != null && { Rank: input.Rank }), - ...(input.ResourceGroupName != null && { ResourceGroupName: input.ResourceGroupName }), - }; -}; +// se_UpdateLogPatternRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1ApplicationComponent - */ -const de_ApplicationComponent = (output: any, context: __SerdeContext): ApplicationComponent => { - return { - ComponentName: __expectString(output.ComponentName), - ComponentRemarks: __expectString(output.ComponentRemarks), - DetectedWorkload: - output.DetectedWorkload != null ? de_DetectedWorkload(output.DetectedWorkload, context) : undefined, - Monitor: __expectBoolean(output.Monitor), - OsType: __expectString(output.OsType), - ResourceType: __expectString(output.ResourceType), - Tier: __expectString(output.Tier), - } as any; -}; +// de_ApplicationComponent omitted. -/** - * deserializeAws_json1_1ApplicationComponentList - */ -const de_ApplicationComponentList = (output: any, context: __SerdeContext): ApplicationComponent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationComponent(entry, context); - }); - return retVal; -}; +// de_ApplicationComponentList omitted. -/** - * deserializeAws_json1_1ApplicationInfo - */ -const de_ApplicationInfo = (output: any, context: __SerdeContext): ApplicationInfo => { - return { - AutoConfigEnabled: __expectBoolean(output.AutoConfigEnabled), - CWEMonitorEnabled: __expectBoolean(output.CWEMonitorEnabled), - DiscoveryType: __expectString(output.DiscoveryType), - LifeCycle: __expectString(output.LifeCycle), - OpsCenterEnabled: __expectBoolean(output.OpsCenterEnabled), - OpsItemSNSTopicArn: __expectString(output.OpsItemSNSTopicArn), - Remarks: __expectString(output.Remarks), - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; -}; +// de_ApplicationInfo omitted. -/** - * deserializeAws_json1_1ApplicationInfoList - */ -const de_ApplicationInfoList = (output: any, context: __SerdeContext): ApplicationInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationInfo(entry, context); - }); - return retVal; -}; +// de_ApplicationInfoList omitted. -/** - * deserializeAws_json1_1BadRequestException - */ -const de_BadRequestException = (output: any, context: __SerdeContext): BadRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_BadRequestException omitted. /** * deserializeAws_json1_1ConfigurationEvent */ const de_ConfigurationEvent = (output: any, context: __SerdeContext): ConfigurationEvent => { - return { - EventDetail: __expectString(output.EventDetail), - EventResourceName: __expectString(output.EventResourceName), - EventResourceType: __expectString(output.EventResourceType), - EventStatus: __expectString(output.EventStatus), - EventTime: - output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined, - MonitoredResourceARN: __expectString(output.MonitoredResourceARN), - } as any; + return take(output, { + EventDetail: __expectString, + EventResourceName: __expectString, + EventResourceType: __expectString, + EventStatus: __expectString, + EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoredResourceARN: __expectString, + }) as any; }; /** @@ -2528,124 +2134,40 @@ const de_ConfigurationEventList = (output: any, context: __SerdeContext): Config const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigurationEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CreateApplicationResponse - */ -const de_CreateApplicationResponse = (output: any, context: __SerdeContext): CreateApplicationResponse => { - return { - ApplicationInfo: output.ApplicationInfo != null ? de_ApplicationInfo(output.ApplicationInfo, context) : undefined, - } as any; -}; +// de_CreateApplicationResponse omitted. -/** - * deserializeAws_json1_1CreateComponentResponse - */ -const de_CreateComponentResponse = (output: any, context: __SerdeContext): CreateComponentResponse => { - return {} as any; -}; +// de_CreateComponentResponse omitted. -/** - * deserializeAws_json1_1CreateLogPatternResponse - */ -const de_CreateLogPatternResponse = (output: any, context: __SerdeContext): CreateLogPatternResponse => { - return { - LogPattern: output.LogPattern != null ? de_LogPattern(output.LogPattern, context) : undefined, - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; -}; +// de_CreateLogPatternResponse omitted. -/** - * deserializeAws_json1_1DeleteApplicationResponse - */ -const de_DeleteApplicationResponse = (output: any, context: __SerdeContext): DeleteApplicationResponse => { - return {} as any; -}; +// de_DeleteApplicationResponse omitted. -/** - * deserializeAws_json1_1DeleteComponentResponse - */ -const de_DeleteComponentResponse = (output: any, context: __SerdeContext): DeleteComponentResponse => { - return {} as any; -}; +// de_DeleteComponentResponse omitted. -/** - * deserializeAws_json1_1DeleteLogPatternResponse - */ -const de_DeleteLogPatternResponse = (output: any, context: __SerdeContext): DeleteLogPatternResponse => { - return {} as any; -}; +// de_DeleteLogPatternResponse omitted. -/** - * deserializeAws_json1_1DescribeApplicationResponse - */ -const de_DescribeApplicationResponse = (output: any, context: __SerdeContext): DescribeApplicationResponse => { - return { - ApplicationInfo: output.ApplicationInfo != null ? de_ApplicationInfo(output.ApplicationInfo, context) : undefined, - } as any; -}; +// de_DescribeApplicationResponse omitted. -/** - * deserializeAws_json1_1DescribeComponentConfigurationRecommendationResponse - */ -const de_DescribeComponentConfigurationRecommendationResponse = ( - output: any, - context: __SerdeContext -): DescribeComponentConfigurationRecommendationResponse => { - return { - ComponentConfiguration: __expectString(output.ComponentConfiguration), - } as any; -}; +// de_DescribeComponentConfigurationRecommendationResponse omitted. -/** - * deserializeAws_json1_1DescribeComponentConfigurationResponse - */ -const de_DescribeComponentConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeComponentConfigurationResponse => { - return { - ComponentConfiguration: __expectString(output.ComponentConfiguration), - Monitor: __expectBoolean(output.Monitor), - Tier: __expectString(output.Tier), - } as any; -}; +// de_DescribeComponentConfigurationResponse omitted. -/** - * deserializeAws_json1_1DescribeComponentResponse - */ -const de_DescribeComponentResponse = (output: any, context: __SerdeContext): DescribeComponentResponse => { - return { - ApplicationComponent: - output.ApplicationComponent != null ? de_ApplicationComponent(output.ApplicationComponent, context) : undefined, - ResourceList: output.ResourceList != null ? de_ResourceList(output.ResourceList, context) : undefined, - } as any; -}; +// de_DescribeComponentResponse omitted. -/** - * deserializeAws_json1_1DescribeLogPatternResponse - */ -const de_DescribeLogPatternResponse = (output: any, context: __SerdeContext): DescribeLogPatternResponse => { - return { - LogPattern: output.LogPattern != null ? de_LogPattern(output.LogPattern, context) : undefined, - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; -}; +// de_DescribeLogPatternResponse omitted. /** * deserializeAws_json1_1DescribeObservationResponse */ const de_DescribeObservationResponse = (output: any, context: __SerdeContext): DescribeObservationResponse => { - return { - Observation: output.Observation != null ? de_Observation(output.Observation, context) : undefined, - } as any; + return take(output, { + Observation: (_: any) => de_Observation(_, context), + }) as any; }; /** @@ -2655,85 +2177,29 @@ const de_DescribeProblemObservationsResponse = ( output: any, context: __SerdeContext ): DescribeProblemObservationsResponse => { - return { - RelatedObservations: - output.RelatedObservations != null ? de_RelatedObservations(output.RelatedObservations, context) : undefined, - } as any; + return take(output, { + RelatedObservations: (_: any) => de_RelatedObservations(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeProblemResponse */ const de_DescribeProblemResponse = (output: any, context: __SerdeContext): DescribeProblemResponse => { - return { - Problem: output.Problem != null ? de_Problem(output.Problem, context) : undefined, - } as any; + return take(output, { + Problem: (_: any) => de_Problem(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DetectedWorkload - */ -const de_DetectedWorkload = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce( - (acc: Record>, [key, value]: [Tier | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_WorkloadMetaData(value, context); - return acc; - }, - {} - ); -}; +// de_DetectedWorkload omitted. -/** - * deserializeAws_json1_1Feedback - */ -const de_Feedback = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [FeedbackKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_Feedback omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1ListApplicationsResponse - */ -const de_ListApplicationsResponse = (output: any, context: __SerdeContext): ListApplicationsResponse => { - return { - ApplicationInfoList: - output.ApplicationInfoList != null ? de_ApplicationInfoList(output.ApplicationInfoList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListApplicationsResponse omitted. -/** - * deserializeAws_json1_1ListComponentsResponse - */ -const de_ListComponentsResponse = (output: any, context: __SerdeContext): ListComponentsResponse => { - return { - ApplicationComponentList: - output.ApplicationComponentList != null - ? de_ApplicationComponentList(output.ApplicationComponentList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListComponentsResponse omitted. /** * deserializeAws_json1_1ListConfigurationHistoryResponse @@ -2742,150 +2208,86 @@ const de_ListConfigurationHistoryResponse = ( output: any, context: __SerdeContext ): ListConfigurationHistoryResponse => { - return { - EventList: output.EventList != null ? de_ConfigurationEventList(output.EventList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + EventList: (_: any) => de_ConfigurationEventList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListLogPatternSetsResponse - */ -const de_ListLogPatternSetsResponse = (output: any, context: __SerdeContext): ListLogPatternSetsResponse => { - return { - LogPatternSets: output.LogPatternSets != null ? de_LogPatternSetList(output.LogPatternSets, context) : undefined, - NextToken: __expectString(output.NextToken), - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; -}; +// de_ListLogPatternSetsResponse omitted. -/** - * deserializeAws_json1_1ListLogPatternsResponse - */ -const de_ListLogPatternsResponse = (output: any, context: __SerdeContext): ListLogPatternsResponse => { - return { - LogPatterns: output.LogPatterns != null ? de_LogPatternList(output.LogPatterns, context) : undefined, - NextToken: __expectString(output.NextToken), - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; -}; +// de_ListLogPatternsResponse omitted. /** * deserializeAws_json1_1ListProblemsResponse */ const de_ListProblemsResponse = (output: any, context: __SerdeContext): ListProblemsResponse => { - return { - NextToken: __expectString(output.NextToken), - ProblemList: output.ProblemList != null ? de_ProblemList(output.ProblemList, context) : undefined, - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; + return take(output, { + NextToken: __expectString, + ProblemList: (_: any) => de_ProblemList(_, context), + ResourceGroupName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1LogPattern - */ -const de_LogPattern = (output: any, context: __SerdeContext): LogPattern => { - return { - Pattern: __expectString(output.Pattern), - PatternName: __expectString(output.PatternName), - PatternSetName: __expectString(output.PatternSetName), - Rank: __expectInt32(output.Rank), - } as any; -}; +// de_LogPattern omitted. -/** - * deserializeAws_json1_1LogPatternList - */ -const de_LogPatternList = (output: any, context: __SerdeContext): LogPattern[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogPattern(entry, context); - }); - return retVal; -}; +// de_LogPatternList omitted. -/** - * deserializeAws_json1_1LogPatternSetList - */ -const de_LogPatternSetList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LogPatternSetList omitted. /** * deserializeAws_json1_1Observation */ const de_Observation = (output: any, context: __SerdeContext): Observation => { - return { - CloudWatchEventDetailType: __expectString(output.CloudWatchEventDetailType), - CloudWatchEventId: __expectString(output.CloudWatchEventId), - CloudWatchEventSource: __expectString(output.CloudWatchEventSource), - CodeDeployApplication: __expectString(output.CodeDeployApplication), - CodeDeployDeploymentGroup: __expectString(output.CodeDeployDeploymentGroup), - CodeDeployDeploymentId: __expectString(output.CodeDeployDeploymentId), - CodeDeployInstanceGroupId: __expectString(output.CodeDeployInstanceGroupId), - CodeDeployState: __expectString(output.CodeDeployState), - EbsCause: __expectString(output.EbsCause), - EbsEvent: __expectString(output.EbsEvent), - EbsRequestId: __expectString(output.EbsRequestId), - EbsResult: __expectString(output.EbsResult), - Ec2State: __expectString(output.Ec2State), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - HealthEventArn: __expectString(output.HealthEventArn), - HealthEventDescription: __expectString(output.HealthEventDescription), - HealthEventTypeCategory: __expectString(output.HealthEventTypeCategory), - HealthEventTypeCode: __expectString(output.HealthEventTypeCode), - HealthService: __expectString(output.HealthService), - Id: __expectString(output.Id), - LineTime: - output.LineTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LineTime))) : undefined, - LogFilter: __expectString(output.LogFilter), - LogGroup: __expectString(output.LogGroup), - LogText: __expectString(output.LogText), - MetricName: __expectString(output.MetricName), - MetricNamespace: __expectString(output.MetricNamespace), - RdsEventCategories: __expectString(output.RdsEventCategories), - RdsEventMessage: __expectString(output.RdsEventMessage), - S3EventName: __expectString(output.S3EventName), - SourceARN: __expectString(output.SourceARN), - SourceType: __expectString(output.SourceType), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - StatesArn: __expectString(output.StatesArn), - StatesExecutionArn: __expectString(output.StatesExecutionArn), - StatesInput: __expectString(output.StatesInput), - StatesStatus: __expectString(output.StatesStatus), - Unit: __expectString(output.Unit), - Value: __limitedParseDouble(output.Value), - XRayErrorPercent: __expectInt32(output.XRayErrorPercent), - XRayFaultPercent: __expectInt32(output.XRayFaultPercent), - XRayNodeName: __expectString(output.XRayNodeName), - XRayNodeType: __expectString(output.XRayNodeType), - XRayRequestAverageLatency: __expectLong(output.XRayRequestAverageLatency), - XRayRequestCount: __expectInt32(output.XRayRequestCount), - XRayThrottlePercent: __expectInt32(output.XRayThrottlePercent), - } as any; + return take(output, { + CloudWatchEventDetailType: __expectString, + CloudWatchEventId: __expectString, + CloudWatchEventSource: __expectString, + CodeDeployApplication: __expectString, + CodeDeployDeploymentGroup: __expectString, + CodeDeployDeploymentId: __expectString, + CodeDeployInstanceGroupId: __expectString, + CodeDeployState: __expectString, + EbsCause: __expectString, + EbsEvent: __expectString, + EbsRequestId: __expectString, + EbsResult: __expectString, + Ec2State: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HealthEventArn: __expectString, + HealthEventDescription: __expectString, + HealthEventTypeCategory: __expectString, + HealthEventTypeCode: __expectString, + HealthService: __expectString, + Id: __expectString, + LineTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogFilter: __expectString, + LogGroup: __expectString, + LogText: __expectString, + MetricName: __expectString, + MetricNamespace: __expectString, + RdsEventCategories: __expectString, + RdsEventMessage: __expectString, + S3EventName: __expectString, + SourceARN: __expectString, + SourceType: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StatesArn: __expectString, + StatesExecutionArn: __expectString, + StatesInput: __expectString, + StatesStatus: __expectString, + Unit: __expectString, + Value: __limitedParseDouble, + XRayErrorPercent: __expectInt32, + XRayFaultPercent: __expectInt32, + XRayNodeName: __expectString, + XRayNodeType: __expectString, + XRayRequestAverageLatency: __expectLong, + XRayRequestCount: __expectInt32, + XRayThrottlePercent: __expectInt32, + }) as any; }; /** @@ -2895,9 +2297,6 @@ const de_ObservationList = (output: any, context: __SerdeContext): Observation[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Observation(entry, context); }); return retVal; @@ -2907,25 +2306,20 @@ const de_ObservationList = (output: any, context: __SerdeContext): Observation[] * deserializeAws_json1_1Problem */ const de_Problem = (output: any, context: __SerdeContext): Problem => { - return { - AffectedResource: __expectString(output.AffectedResource), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Feedback: output.Feedback != null ? de_Feedback(output.Feedback, context) : undefined, - Id: __expectString(output.Id), - Insights: __expectString(output.Insights), - LastRecurrenceTime: - output.LastRecurrenceTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRecurrenceTime))) - : undefined, - RecurringCount: __expectLong(output.RecurringCount), - ResourceGroupName: __expectString(output.ResourceGroupName), - SeverityLevel: __expectString(output.SeverityLevel), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - Title: __expectString(output.Title), - } as any; + return take(output, { + AffectedResource: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Feedback: _json, + Id: __expectString, + Insights: __expectString, + LastRecurrenceTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RecurringCount: __expectLong, + ResourceGroupName: __expectString, + SeverityLevel: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Title: __expectString, + }) as any; }; /** @@ -2935,9 +2329,6 @@ const de_ProblemList = (output: any, context: __SerdeContext): Problem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Problem(entry, context); }); return retVal; @@ -2947,159 +2338,40 @@ const de_ProblemList = (output: any, context: __SerdeContext): Problem[] => { * deserializeAws_json1_1RelatedObservations */ const de_RelatedObservations = (output: any, context: __SerdeContext): RelatedObservations => { - return { - ObservationList: output.ObservationList != null ? de_ObservationList(output.ObservationList, context) : undefined, - } as any; + return take(output, { + ObservationList: (_: any) => de_ObservationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceList - */ -const de_ResourceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceList omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TagsAlreadyExistException - */ -const de_TagsAlreadyExistException = (output: any, context: __SerdeContext): TagsAlreadyExistException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TagsAlreadyExistException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateApplicationResponse - */ -const de_UpdateApplicationResponse = (output: any, context: __SerdeContext): UpdateApplicationResponse => { - return { - ApplicationInfo: output.ApplicationInfo != null ? de_ApplicationInfo(output.ApplicationInfo, context) : undefined, - } as any; -}; +// de_UpdateApplicationResponse omitted. -/** - * deserializeAws_json1_1UpdateComponentConfigurationResponse - */ -const de_UpdateComponentConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateComponentConfigurationResponse => { - return {} as any; -}; +// de_UpdateComponentConfigurationResponse omitted. -/** - * deserializeAws_json1_1UpdateComponentResponse - */ -const de_UpdateComponentResponse = (output: any, context: __SerdeContext): UpdateComponentResponse => { - return {} as any; -}; +// de_UpdateComponentResponse omitted. -/** - * deserializeAws_json1_1UpdateLogPatternResponse - */ -const de_UpdateLogPatternResponse = (output: any, context: __SerdeContext): UpdateLogPatternResponse => { - return { - LogPattern: output.LogPattern != null ? de_LogPattern(output.LogPattern, context) : undefined, - ResourceGroupName: __expectString(output.ResourceGroupName), - } as any; -}; +// de_UpdateLogPatternResponse omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1WorkloadMetaData - */ -const de_WorkloadMetaData = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_WorkloadMetaData omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3121,6 +2393,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-applicationcostprofiler/src/protocols/Aws_restJson1.ts b/clients/client-applicationcostprofiler/src/protocols/Aws_restJson1.ts index e81620dc323e..36efcd309ae1 100644 --- a/clients/client-applicationcostprofiler/src/protocols/Aws_restJson1.ts +++ b/clients/client-applicationcostprofiler/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -116,9 +118,11 @@ export const se_ImportApplicationUsageCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importApplicationUsage"; let body: any; - body = JSON.stringify({ - ...(input.sourceS3Location != null && { sourceS3Location: se_SourceS3Location(input.sourceS3Location, context) }), - }); + body = JSON.stringify( + take(input, { + sourceS3Location: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -170,15 +174,15 @@ export const se_PutReportDefinitionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition"; let body: any; - body = JSON.stringify({ - ...(input.destinationS3Location != null && { - destinationS3Location: se_S3Location(input.destinationS3Location, context), - }), - ...(input.format != null && { format: input.format }), - ...(input.reportDescription != null && { reportDescription: input.reportDescription }), - ...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }), - ...(input.reportId != null && { reportId: input.reportId }), - }); + body = JSON.stringify( + take(input, { + destinationS3Location: (_) => _json(_), + format: [], + reportDescription: [], + reportFrequency: [], + reportId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -205,14 +209,14 @@ export const se_UpdateReportDefinitionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reportDefinition/{reportId}"; resolvedPath = __resolvedPath(resolvedPath, input, "reportId", () => input.reportId!, "{reportId}", false); let body: any; - body = JSON.stringify({ - ...(input.destinationS3Location != null && { - destinationS3Location: se_S3Location(input.destinationS3Location, context), - }), - ...(input.format != null && { format: input.format }), - ...(input.reportDescription != null && { reportDescription: input.reportDescription }), - ...(input.reportFrequency != null && { reportFrequency: input.reportFrequency }), - }); + body = JSON.stringify( + take(input, { + destinationS3Location: (_) => _json(_), + format: [], + reportDescription: [], + reportFrequency: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -238,9 +242,10 @@ export const de_DeleteReportDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } + const doc = take(data, { + reportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -271,10 +276,9 @@ const de_DeleteReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -294,27 +298,16 @@ export const de_GetReportDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.destinationS3Location != null) { - contents.destinationS3Location = de_S3Location(data.destinationS3Location, context); - } - if (data.format != null) { - contents.format = __expectString(data.format); - } - if (data.lastUpdated != null) { - contents.lastUpdated = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdated))); - } - if (data.reportDescription != null) { - contents.reportDescription = __expectString(data.reportDescription); - } - if (data.reportFrequency != null) { - contents.reportFrequency = __expectString(data.reportFrequency); - } - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + destinationS3Location: _json, + format: __expectString, + lastUpdated: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + reportDescription: __expectString, + reportFrequency: __expectString, + reportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -345,10 +338,9 @@ const de_GetReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -368,9 +360,10 @@ export const de_ImportApplicationUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } + const doc = take(data, { + importId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -401,10 +394,9 @@ const de_ImportApplicationUsageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -424,12 +416,11 @@ export const de_ListReportDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.reportDefinitions != null) { - contents.reportDefinitions = de_ReportDefinitionList(data.reportDefinitions, context); - } + const doc = take(data, { + nextToken: __expectString, + reportDefinitions: (_) => de_ReportDefinitionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -460,10 +451,9 @@ const de_ListReportDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -483,9 +473,10 @@ export const de_PutReportDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } + const doc = take(data, { + reportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -519,10 +510,9 @@ const de_PutReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -542,9 +532,10 @@ export const de_UpdateReportDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } + const doc = take(data, { + reportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -575,16 +566,15 @@ const de_UpdateReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -594,9 +584,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -613,9 +604,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -632,9 +624,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -648,9 +641,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -664,9 +658,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -674,45 +669,23 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1SourceS3Location - */ -const se_SourceS3Location = (input: SourceS3Location, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - ...(input.region != null && { region: input.region }), - }; -}; +// se_SourceS3Location omitted. /** * deserializeAws_restJson1ReportDefinition */ const de_ReportDefinition = (output: any, context: __SerdeContext): ReportDefinition => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - destinationS3Location: - output.destinationS3Location != null ? de_S3Location(output.destinationS3Location, context) : undefined, - format: __expectString(output.format), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - reportDescription: __expectString(output.reportDescription), - reportFrequency: __expectString(output.reportFrequency), - reportId: __expectString(output.reportId), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + destinationS3Location: _json, + format: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + reportDescription: __expectString, + reportFrequency: __expectString, + reportId: __expectString, + }) as any; }; /** @@ -722,23 +695,12 @@ const de_ReportDefinitionList = (output: any, context: __SerdeContext): ReportDe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReportDefinition(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - prefix: __expectString(output.prefix), - } as any; -}; +// de_S3Location omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-apprunner/src/protocols/Aws_json1_0.ts b/clients/client-apprunner/src/protocols/Aws_json1_0.ts index cbd473d27cca..657b36677ee1 100644 --- a/clients/client-apprunner/src/protocols/Aws_json1_0.ts +++ b/clients/client-apprunner/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -109,11 +111,8 @@ import { import { AppRunnerServiceException as __BaseException } from "../models/AppRunnerServiceException"; import { AssociateCustomDomainRequest, - AssociateCustomDomainResponse, AuthenticationConfiguration, AutoScalingConfiguration, - AutoScalingConfigurationSummary, - CertificateValidationRecord, CodeConfiguration, CodeConfigurationValues, CodeRepository, @@ -131,7 +130,6 @@ import { CreateVpcConnectorResponse, CreateVpcIngressConnectionRequest, CreateVpcIngressConnectionResponse, - CustomDomain, DeleteAutoScalingConfigurationRequest, DeleteAutoScalingConfigurationResponse, DeleteConnectionRequest, @@ -147,7 +145,6 @@ import { DescribeAutoScalingConfigurationRequest, DescribeAutoScalingConfigurationResponse, DescribeCustomDomainsRequest, - DescribeCustomDomainsResponse, DescribeObservabilityConfigurationRequest, DescribeObservabilityConfigurationResponse, DescribeServiceRequest, @@ -157,7 +154,6 @@ import { DescribeVpcIngressConnectionRequest, DescribeVpcIngressConnectionResponse, DisassociateCustomDomainRequest, - DisassociateCustomDomainResponse, EgressConfiguration, EncryptionConfiguration, HealthCheckConfiguration, @@ -170,25 +166,20 @@ import { InvalidRequestException, InvalidStateException, ListAutoScalingConfigurationsRequest, - ListAutoScalingConfigurationsResponse, ListConnectionsRequest, ListConnectionsResponse, ListObservabilityConfigurationsRequest, - ListObservabilityConfigurationsResponse, ListOperationsRequest, ListOperationsResponse, ListServicesRequest, ListServicesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListVpcConnectorsRequest, ListVpcConnectorsResponse, ListVpcIngressConnectionsFilter, ListVpcIngressConnectionsRequest, - ListVpcIngressConnectionsResponse, NetworkConfiguration, ObservabilityConfiguration, - ObservabilityConfigurationSummary, OperationSummary, PauseServiceRequest, PauseServiceResponse, @@ -202,21 +193,16 @@ import { SourceCodeVersion, SourceConfiguration, StartDeploymentRequest, - StartDeploymentResponse, Tag, TagResourceRequest, - TagResourceResponse, TraceConfiguration, UntagResourceRequest, - UntagResourceResponse, UpdateServiceRequest, UpdateServiceResponse, UpdateVpcIngressConnectionRequest, UpdateVpcIngressConnectionResponse, VpcConnector, - VpcDNSTarget, VpcIngressConnection, - VpcIngressConnectionSummary, } from "../models/models_0"; /** @@ -228,7 +214,7 @@ export const se_AssociateCustomDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateCustomDomain"); let body: any; - body = JSON.stringify(se_AssociateCustomDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -241,7 +227,7 @@ export const se_CreateAutoScalingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAutoScalingConfiguration"); let body: any; - body = JSON.stringify(se_CreateAutoScalingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -254,7 +240,7 @@ export const se_CreateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnection"); let body: any; - body = JSON.stringify(se_CreateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -267,7 +253,7 @@ export const se_CreateObservabilityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateObservabilityConfiguration"); let body: any; - body = JSON.stringify(se_CreateObservabilityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -280,7 +266,7 @@ export const se_CreateServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateService"); let body: any; - body = JSON.stringify(se_CreateServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -293,7 +279,7 @@ export const se_CreateVpcConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVpcConnector"); let body: any; - body = JSON.stringify(se_CreateVpcConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -306,7 +292,7 @@ export const se_CreateVpcIngressConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVpcIngressConnection"); let body: any; - body = JSON.stringify(se_CreateVpcIngressConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -319,7 +305,7 @@ export const se_DeleteAutoScalingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAutoScalingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteAutoScalingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -332,7 +318,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -345,7 +331,7 @@ export const se_DeleteObservabilityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteObservabilityConfiguration"); let body: any; - body = JSON.stringify(se_DeleteObservabilityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -358,7 +344,7 @@ export const se_DeleteServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteService"); let body: any; - body = JSON.stringify(se_DeleteServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -371,7 +357,7 @@ export const se_DeleteVpcConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVpcConnector"); let body: any; - body = JSON.stringify(se_DeleteVpcConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -384,7 +370,7 @@ export const se_DeleteVpcIngressConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVpcIngressConnection"); let body: any; - body = JSON.stringify(se_DeleteVpcIngressConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -397,7 +383,7 @@ export const se_DescribeAutoScalingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAutoScalingConfiguration"); let body: any; - body = JSON.stringify(se_DescribeAutoScalingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -410,7 +396,7 @@ export const se_DescribeCustomDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCustomDomains"); let body: any; - body = JSON.stringify(se_DescribeCustomDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -423,7 +409,7 @@ export const se_DescribeObservabilityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeObservabilityConfiguration"); let body: any; - body = JSON.stringify(se_DescribeObservabilityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -436,7 +422,7 @@ export const se_DescribeServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeService"); let body: any; - body = JSON.stringify(se_DescribeServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -449,7 +435,7 @@ export const se_DescribeVpcConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVpcConnector"); let body: any; - body = JSON.stringify(se_DescribeVpcConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -462,7 +448,7 @@ export const se_DescribeVpcIngressConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVpcIngressConnection"); let body: any; - body = JSON.stringify(se_DescribeVpcIngressConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -475,7 +461,7 @@ export const se_DisassociateCustomDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateCustomDomain"); let body: any; - body = JSON.stringify(se_DisassociateCustomDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -488,7 +474,7 @@ export const se_ListAutoScalingConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAutoScalingConfigurations"); let body: any; - body = JSON.stringify(se_ListAutoScalingConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -501,7 +487,7 @@ export const se_ListConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConnections"); let body: any; - body = JSON.stringify(se_ListConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -514,7 +500,7 @@ export const se_ListObservabilityConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListObservabilityConfigurations"); let body: any; - body = JSON.stringify(se_ListObservabilityConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -527,7 +513,7 @@ export const se_ListOperationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOperations"); let body: any; - body = JSON.stringify(se_ListOperationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -540,7 +526,7 @@ export const se_ListServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServices"); let body: any; - body = JSON.stringify(se_ListServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -553,7 +539,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -566,7 +552,7 @@ export const se_ListVpcConnectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVpcConnectors"); let body: any; - body = JSON.stringify(se_ListVpcConnectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -579,7 +565,7 @@ export const se_ListVpcIngressConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVpcIngressConnections"); let body: any; - body = JSON.stringify(se_ListVpcIngressConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -592,7 +578,7 @@ export const se_PauseServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PauseService"); let body: any; - body = JSON.stringify(se_PauseServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -605,7 +591,7 @@ export const se_ResumeServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResumeService"); let body: any; - body = JSON.stringify(se_ResumeServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -618,7 +604,7 @@ export const se_StartDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDeployment"); let body: any; - body = JSON.stringify(se_StartDeploymentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -631,7 +617,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -644,7 +630,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -657,7 +643,7 @@ export const se_UpdateServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateService"); let body: any; - body = JSON.stringify(se_UpdateServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -670,7 +656,7 @@ export const se_UpdateVpcIngressConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVpcIngressConnection"); let body: any; - body = JSON.stringify(se_UpdateVpcIngressConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -686,12 +672,12 @@ export const de_AssociateCustomDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateCustomDomainResponse(data, context); + contents = _json(data); const response: AssociateCustomDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -718,10 +704,9 @@ const de_AssociateCustomDomainCommandError = async ( throw await de_InvalidStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -744,7 +729,7 @@ export const de_CreateAutoScalingConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -771,10 +756,9 @@ const de_CreateAutoScalingConfigurationCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -797,7 +781,7 @@ export const de_CreateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -824,10 +808,9 @@ const de_CreateConnectionCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -850,7 +833,7 @@ export const de_CreateObservabilityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -877,10 +860,9 @@ const de_CreateObservabilityConfigurationCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -903,7 +885,7 @@ export const de_CreateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -930,10 +912,9 @@ const de_CreateServiceCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -956,7 +937,7 @@ export const de_CreateVpcConnectorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -983,10 +964,9 @@ const de_CreateVpcConnectorCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1009,7 +989,7 @@ export const de_CreateVpcIngressConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1039,10 +1019,9 @@ const de_CreateVpcIngressConnectionCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1065,7 +1044,7 @@ export const de_DeleteAutoScalingConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1092,10 +1071,9 @@ const de_DeleteAutoScalingConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1118,7 +1096,7 @@ export const de_DeleteConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1145,10 +1123,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1171,7 +1148,7 @@ export const de_DeleteObservabilityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1198,10 +1175,9 @@ const de_DeleteObservabilityConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1224,7 +1200,7 @@ export const de_DeleteServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1254,10 +1230,9 @@ const de_DeleteServiceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1280,7 +1255,7 @@ export const de_DeleteVpcConnectorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1307,10 +1282,9 @@ const de_DeleteVpcConnectorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,7 +1307,7 @@ export const de_DeleteVpcIngressConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1363,10 +1337,9 @@ const de_DeleteVpcIngressConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1389,7 +1362,7 @@ export const de_DescribeAutoScalingConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1416,10 +1389,9 @@ const de_DescribeAutoScalingConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1437,12 +1409,12 @@ export const de_DescribeCustomDomainsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCustomDomainsResponse(data, context); + contents = _json(data); const response: DescribeCustomDomainsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1469,10 +1441,9 @@ const de_DescribeCustomDomainsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1495,7 +1466,7 @@ export const de_DescribeObservabilityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1522,10 +1493,9 @@ const de_DescribeObservabilityConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1548,7 +1518,7 @@ export const de_DescribeServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1575,10 +1545,9 @@ const de_DescribeServiceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1601,7 +1570,7 @@ export const de_DescribeVpcConnectorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1628,10 +1597,9 @@ const de_DescribeVpcConnectorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1654,7 +1622,7 @@ export const de_DescribeVpcIngressConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1681,10 +1649,9 @@ const de_DescribeVpcIngressConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1702,12 +1669,12 @@ export const de_DisassociateCustomDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateCustomDomainResponse(data, context); + contents = _json(data); const response: DisassociateCustomDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1737,10 +1704,9 @@ const de_DisassociateCustomDomainCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1758,12 +1724,12 @@ export const de_ListAutoScalingConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAutoScalingConfigurationsResponse(data, context); + contents = _json(data); const response: ListAutoScalingConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1787,10 +1753,9 @@ const de_ListAutoScalingConfigurationsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1813,7 +1778,7 @@ export const de_ListConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1837,10 +1802,9 @@ const de_ListConnectionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1858,12 +1822,12 @@ export const de_ListObservabilityConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListObservabilityConfigurationsResponse(data, context); + contents = _json(data); const response: ListObservabilityConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1887,10 +1851,9 @@ const de_ListObservabilityConfigurationsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1913,7 +1876,7 @@ export const de_ListOperationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1940,10 +1903,9 @@ const de_ListOperationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1966,7 +1928,7 @@ export const de_ListServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1990,10 +1952,9 @@ const de_ListServicesCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2011,12 +1972,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2046,10 +2007,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2072,7 +2032,7 @@ export const de_ListVpcConnectorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2096,10 +2056,9 @@ const de_ListVpcConnectorsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2117,12 +2076,12 @@ export const de_ListVpcIngressConnectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVpcIngressConnectionsResponse(data, context); + contents = _json(data); const response: ListVpcIngressConnectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2146,10 +2105,9 @@ const de_ListVpcIngressConnectionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2172,7 +2130,7 @@ export const de_PauseServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2202,10 +2160,9 @@ const de_PauseServiceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2228,7 +2185,7 @@ export const de_ResumeServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2258,10 +2215,9 @@ const de_ResumeServiceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2279,12 +2235,12 @@ export const de_StartDeploymentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDeploymentResponse(data, context); + contents = _json(data); const response: StartDeploymentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2311,10 +2267,9 @@ const de_StartDeploymentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2332,12 +2287,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2367,10 +2322,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2388,12 +2342,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2423,10 +2377,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2449,7 +2402,7 @@ export const de_UpdateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2479,10 +2432,9 @@ const de_UpdateServiceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,7 +2457,7 @@ export const de_UpdateVpcIngressConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2535,10 +2487,9 @@ const de_UpdateVpcIngressConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2552,7 +2503,7 @@ const de_InternalServiceErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2568,7 +2519,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2584,7 +2535,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2600,7 +2551,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2616,7 +2567,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2624,913 +2575,184 @@ const de_ServiceQuotaExceededExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AssociateCustomDomainRequest - */ -const se_AssociateCustomDomainRequest = (input: AssociateCustomDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EnableWWWSubdomain != null && { EnableWWWSubdomain: input.EnableWWWSubdomain }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_AssociateCustomDomainRequest omitted. -/** - * serializeAws_json1_0AuthenticationConfiguration - */ -const se_AuthenticationConfiguration = (input: AuthenticationConfiguration, context: __SerdeContext): any => { - return { - ...(input.AccessRoleArn != null && { AccessRoleArn: input.AccessRoleArn }), - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - }; -}; +// se_AuthenticationConfiguration omitted. -/** - * serializeAws_json1_0CodeConfiguration - */ -const se_CodeConfiguration = (input: CodeConfiguration, context: __SerdeContext): any => { - return { - ...(input.CodeConfigurationValues != null && { - CodeConfigurationValues: se_CodeConfigurationValues(input.CodeConfigurationValues, context), - }), - ...(input.ConfigurationSource != null && { ConfigurationSource: input.ConfigurationSource }), - }; -}; +// se_CodeConfiguration omitted. -/** - * serializeAws_json1_0CodeConfigurationValues - */ -const se_CodeConfigurationValues = (input: CodeConfigurationValues, context: __SerdeContext): any => { - return { - ...(input.BuildCommand != null && { BuildCommand: input.BuildCommand }), - ...(input.Port != null && { Port: input.Port }), - ...(input.Runtime != null && { Runtime: input.Runtime }), - ...(input.RuntimeEnvironmentSecrets != null && { - RuntimeEnvironmentSecrets: se_RuntimeEnvironmentSecrets(input.RuntimeEnvironmentSecrets, context), - }), - ...(input.RuntimeEnvironmentVariables != null && { - RuntimeEnvironmentVariables: se_RuntimeEnvironmentVariables(input.RuntimeEnvironmentVariables, context), - }), - ...(input.StartCommand != null && { StartCommand: input.StartCommand }), - }; -}; +// se_CodeConfigurationValues omitted. -/** - * serializeAws_json1_0CodeRepository - */ -const se_CodeRepository = (input: CodeRepository, context: __SerdeContext): any => { - return { - ...(input.CodeConfiguration != null && { - CodeConfiguration: se_CodeConfiguration(input.CodeConfiguration, context), - }), - ...(input.RepositoryUrl != null && { RepositoryUrl: input.RepositoryUrl }), - ...(input.SourceCodeVersion != null && { - SourceCodeVersion: se_SourceCodeVersion(input.SourceCodeVersion, context), - }), - }; -}; +// se_CodeRepository omitted. -/** - * serializeAws_json1_0CreateAutoScalingConfigurationRequest - */ -const se_CreateAutoScalingConfigurationRequest = ( - input: CreateAutoScalingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoScalingConfigurationName != null && { - AutoScalingConfigurationName: input.AutoScalingConfigurationName, - }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxSize != null && { MaxSize: input.MaxSize }), - ...(input.MinSize != null && { MinSize: input.MinSize }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateAutoScalingConfigurationRequest omitted. -/** - * serializeAws_json1_0CreateConnectionRequest - */ -const se_CreateConnectionRequest = (input: CreateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ProviderType != null && { ProviderType: input.ProviderType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateConnectionRequest omitted. -/** - * serializeAws_json1_0CreateObservabilityConfigurationRequest - */ -const se_CreateObservabilityConfigurationRequest = ( - input: CreateObservabilityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ObservabilityConfigurationName != null && { - ObservabilityConfigurationName: input.ObservabilityConfigurationName, - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TraceConfiguration != null && { - TraceConfiguration: se_TraceConfiguration(input.TraceConfiguration, context), - }), - }; -}; +// se_CreateObservabilityConfigurationRequest omitted. -/** - * serializeAws_json1_0CreateServiceRequest - */ -const se_CreateServiceRequest = (input: CreateServiceRequest, context: __SerdeContext): any => { - return { - ...(input.AutoScalingConfigurationArn != null && { - AutoScalingConfigurationArn: input.AutoScalingConfigurationArn, - }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.HealthCheckConfiguration != null && { - HealthCheckConfiguration: se_HealthCheckConfiguration(input.HealthCheckConfiguration, context), - }), - ...(input.InstanceConfiguration != null && { - InstanceConfiguration: se_InstanceConfiguration(input.InstanceConfiguration, context), - }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.ObservabilityConfiguration != null && { - ObservabilityConfiguration: se_ServiceObservabilityConfiguration(input.ObservabilityConfiguration, context), - }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.SourceConfiguration != null && { - SourceConfiguration: se_SourceConfiguration(input.SourceConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateServiceRequest omitted. -/** - * serializeAws_json1_0CreateVpcConnectorRequest - */ -const se_CreateVpcConnectorRequest = (input: CreateVpcConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.SecurityGroups != null && { SecurityGroups: se_StringList(input.SecurityGroups, context) }), - ...(input.Subnets != null && { Subnets: se_StringList(input.Subnets, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcConnectorName != null && { VpcConnectorName: input.VpcConnectorName }), - }; -}; +// se_CreateVpcConnectorRequest omitted. -/** - * serializeAws_json1_0CreateVpcIngressConnectionRequest - */ -const se_CreateVpcIngressConnectionRequest = ( - input: CreateVpcIngressConnectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.IngressVpcConfiguration != null && { - IngressVpcConfiguration: se_IngressVpcConfiguration(input.IngressVpcConfiguration, context), - }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcIngressConnectionName != null && { VpcIngressConnectionName: input.VpcIngressConnectionName }), - }; -}; +// se_CreateVpcIngressConnectionRequest omitted. -/** - * serializeAws_json1_0DeleteAutoScalingConfigurationRequest - */ -const se_DeleteAutoScalingConfigurationRequest = ( - input: DeleteAutoScalingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoScalingConfigurationArn != null && { - AutoScalingConfigurationArn: input.AutoScalingConfigurationArn, - }), - }; -}; +// se_DeleteAutoScalingConfigurationRequest omitted. -/** - * serializeAws_json1_0DeleteConnectionRequest - */ -const se_DeleteConnectionRequest = (input: DeleteConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - }; -}; +// se_DeleteConnectionRequest omitted. -/** - * serializeAws_json1_0DeleteObservabilityConfigurationRequest - */ -const se_DeleteObservabilityConfigurationRequest = ( - input: DeleteObservabilityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ObservabilityConfigurationArn != null && { - ObservabilityConfigurationArn: input.ObservabilityConfigurationArn, - }), - }; -}; +// se_DeleteObservabilityConfigurationRequest omitted. -/** - * serializeAws_json1_0DeleteServiceRequest - */ -const se_DeleteServiceRequest = (input: DeleteServiceRequest, context: __SerdeContext): any => { - return { - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_DeleteServiceRequest omitted. -/** - * serializeAws_json1_0DeleteVpcConnectorRequest - */ -const se_DeleteVpcConnectorRequest = (input: DeleteVpcConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.VpcConnectorArn != null && { VpcConnectorArn: input.VpcConnectorArn }), - }; -}; +// se_DeleteVpcConnectorRequest omitted. -/** - * serializeAws_json1_0DeleteVpcIngressConnectionRequest - */ -const se_DeleteVpcIngressConnectionRequest = ( - input: DeleteVpcIngressConnectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.VpcIngressConnectionArn != null && { VpcIngressConnectionArn: input.VpcIngressConnectionArn }), - }; -}; +// se_DeleteVpcIngressConnectionRequest omitted. -/** - * serializeAws_json1_0DescribeAutoScalingConfigurationRequest - */ -const se_DescribeAutoScalingConfigurationRequest = ( - input: DescribeAutoScalingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoScalingConfigurationArn != null && { - AutoScalingConfigurationArn: input.AutoScalingConfigurationArn, - }), - }; -}; +// se_DescribeAutoScalingConfigurationRequest omitted. -/** - * serializeAws_json1_0DescribeCustomDomainsRequest - */ -const se_DescribeCustomDomainsRequest = (input: DescribeCustomDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_DescribeCustomDomainsRequest omitted. -/** - * serializeAws_json1_0DescribeObservabilityConfigurationRequest - */ -const se_DescribeObservabilityConfigurationRequest = ( - input: DescribeObservabilityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ObservabilityConfigurationArn != null && { - ObservabilityConfigurationArn: input.ObservabilityConfigurationArn, - }), - }; -}; +// se_DescribeObservabilityConfigurationRequest omitted. -/** - * serializeAws_json1_0DescribeServiceRequest - */ -const se_DescribeServiceRequest = (input: DescribeServiceRequest, context: __SerdeContext): any => { - return { - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_DescribeServiceRequest omitted. -/** - * serializeAws_json1_0DescribeVpcConnectorRequest - */ -const se_DescribeVpcConnectorRequest = (input: DescribeVpcConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.VpcConnectorArn != null && { VpcConnectorArn: input.VpcConnectorArn }), - }; -}; +// se_DescribeVpcConnectorRequest omitted. -/** - * serializeAws_json1_0DescribeVpcIngressConnectionRequest - */ -const se_DescribeVpcIngressConnectionRequest = ( - input: DescribeVpcIngressConnectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.VpcIngressConnectionArn != null && { VpcIngressConnectionArn: input.VpcIngressConnectionArn }), - }; -}; +// se_DescribeVpcIngressConnectionRequest omitted. -/** - * serializeAws_json1_0DisassociateCustomDomainRequest - */ -const se_DisassociateCustomDomainRequest = (input: DisassociateCustomDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_DisassociateCustomDomainRequest omitted. -/** - * serializeAws_json1_0EgressConfiguration - */ -const se_EgressConfiguration = (input: EgressConfiguration, context: __SerdeContext): any => { - return { - ...(input.EgressType != null && { EgressType: input.EgressType }), - ...(input.VpcConnectorArn != null && { VpcConnectorArn: input.VpcConnectorArn }), - }; -}; +// se_EgressConfiguration omitted. -/** - * serializeAws_json1_0EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - }; -}; +// se_EncryptionConfiguration omitted. -/** - * serializeAws_json1_0HealthCheckConfiguration - */ -const se_HealthCheckConfiguration = (input: HealthCheckConfiguration, context: __SerdeContext): any => { - return { - ...(input.HealthyThreshold != null && { HealthyThreshold: input.HealthyThreshold }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.UnhealthyThreshold != null && { UnhealthyThreshold: input.UnhealthyThreshold }), - }; -}; +// se_HealthCheckConfiguration omitted. -/** - * serializeAws_json1_0ImageConfiguration - */ -const se_ImageConfiguration = (input: ImageConfiguration, context: __SerdeContext): any => { - return { - ...(input.Port != null && { Port: input.Port }), - ...(input.RuntimeEnvironmentSecrets != null && { - RuntimeEnvironmentSecrets: se_RuntimeEnvironmentSecrets(input.RuntimeEnvironmentSecrets, context), - }), - ...(input.RuntimeEnvironmentVariables != null && { - RuntimeEnvironmentVariables: se_RuntimeEnvironmentVariables(input.RuntimeEnvironmentVariables, context), - }), - ...(input.StartCommand != null && { StartCommand: input.StartCommand }), - }; -}; +// se_ImageConfiguration omitted. -/** - * serializeAws_json1_0ImageRepository - */ -const se_ImageRepository = (input: ImageRepository, context: __SerdeContext): any => { - return { - ...(input.ImageConfiguration != null && { - ImageConfiguration: se_ImageConfiguration(input.ImageConfiguration, context), - }), - ...(input.ImageIdentifier != null && { ImageIdentifier: input.ImageIdentifier }), - ...(input.ImageRepositoryType != null && { ImageRepositoryType: input.ImageRepositoryType }), - }; -}; +// se_ImageRepository omitted. -/** - * serializeAws_json1_0IngressConfiguration - */ -const se_IngressConfiguration = (input: IngressConfiguration, context: __SerdeContext): any => { - return { - ...(input.IsPubliclyAccessible != null && { IsPubliclyAccessible: input.IsPubliclyAccessible }), - }; -}; +// se_IngressConfiguration omitted. -/** - * serializeAws_json1_0IngressVpcConfiguration - */ -const se_IngressVpcConfiguration = (input: IngressVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_IngressVpcConfiguration omitted. -/** - * serializeAws_json1_0InstanceConfiguration - */ -const se_InstanceConfiguration = (input: InstanceConfiguration, context: __SerdeContext): any => { - return { - ...(input.Cpu != null && { Cpu: input.Cpu }), - ...(input.InstanceRoleArn != null && { InstanceRoleArn: input.InstanceRoleArn }), - ...(input.Memory != null && { Memory: input.Memory }), - }; -}; +// se_InstanceConfiguration omitted. -/** - * serializeAws_json1_0ListAutoScalingConfigurationsRequest - */ -const se_ListAutoScalingConfigurationsRequest = ( - input: ListAutoScalingConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoScalingConfigurationName != null && { - AutoScalingConfigurationName: input.AutoScalingConfigurationName, - }), - ...(input.LatestOnly != null && { LatestOnly: input.LatestOnly }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAutoScalingConfigurationsRequest omitted. -/** - * serializeAws_json1_0ListConnectionsRequest - */ -const se_ListConnectionsRequest = (input: ListConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListConnectionsRequest omitted. -/** - * serializeAws_json1_0ListObservabilityConfigurationsRequest - */ -const se_ListObservabilityConfigurationsRequest = ( - input: ListObservabilityConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.LatestOnly != null && { LatestOnly: input.LatestOnly }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObservabilityConfigurationName != null && { - ObservabilityConfigurationName: input.ObservabilityConfigurationName, - }), - }; -}; +// se_ListObservabilityConfigurationsRequest omitted. -/** - * serializeAws_json1_0ListOperationsRequest - */ -const se_ListOperationsRequest = (input: ListOperationsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_ListOperationsRequest omitted. -/** - * serializeAws_json1_0ListServicesRequest - */ -const se_ListServicesRequest = (input: ListServicesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListServicesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0ListVpcConnectorsRequest - */ -const se_ListVpcConnectorsRequest = (input: ListVpcConnectorsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListVpcConnectorsRequest omitted. -/** - * serializeAws_json1_0ListVpcIngressConnectionsFilter - */ -const se_ListVpcIngressConnectionsFilter = (input: ListVpcIngressConnectionsFilter, context: __SerdeContext): any => { - return { - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }), - }; -}; +// se_ListVpcIngressConnectionsFilter omitted. -/** - * serializeAws_json1_0ListVpcIngressConnectionsRequest - */ -const se_ListVpcIngressConnectionsRequest = (input: ListVpcIngressConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_ListVpcIngressConnectionsFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_0NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.EgressConfiguration != null && { - EgressConfiguration: se_EgressConfiguration(input.EgressConfiguration, context), - }), - ...(input.IngressConfiguration != null && { - IngressConfiguration: se_IngressConfiguration(input.IngressConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_0PauseServiceRequest - */ -const se_PauseServiceRequest = (input: PauseServiceRequest, context: __SerdeContext): any => { - return { - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; - -/** - * serializeAws_json1_0ResumeServiceRequest - */ -const se_ResumeServiceRequest = (input: ResumeServiceRequest, context: __SerdeContext): any => { - return { - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; - -/** - * serializeAws_json1_0RuntimeEnvironmentSecrets - */ -const se_RuntimeEnvironmentSecrets = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_0RuntimeEnvironmentVariables - */ -const se_RuntimeEnvironmentVariables = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_0ServiceObservabilityConfiguration - */ -const se_ServiceObservabilityConfiguration = ( - input: ServiceObservabilityConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ObservabilityConfigurationArn != null && { - ObservabilityConfigurationArn: input.ObservabilityConfigurationArn, - }), - ...(input.ObservabilityEnabled != null && { ObservabilityEnabled: input.ObservabilityEnabled }), - }; -}; - -/** - * serializeAws_json1_0SourceCodeVersion - */ -const se_SourceCodeVersion = (input: SourceCodeVersion, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ListVpcIngressConnectionsRequest omitted. -/** - * serializeAws_json1_0SourceConfiguration - */ -const se_SourceConfiguration = (input: SourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.AuthenticationConfiguration != null && { - AuthenticationConfiguration: se_AuthenticationConfiguration(input.AuthenticationConfiguration, context), - }), - ...(input.AutoDeploymentsEnabled != null && { AutoDeploymentsEnabled: input.AutoDeploymentsEnabled }), - ...(input.CodeRepository != null && { CodeRepository: se_CodeRepository(input.CodeRepository, context) }), - ...(input.ImageRepository != null && { ImageRepository: se_ImageRepository(input.ImageRepository, context) }), - }; -}; +// se_NetworkConfiguration omitted. -/** - * serializeAws_json1_0StartDeploymentRequest - */ -const se_StartDeploymentRequest = (input: StartDeploymentRequest, context: __SerdeContext): any => { - return { - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - }; -}; +// se_PauseServiceRequest omitted. -/** - * serializeAws_json1_0StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResumeServiceRequest omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_RuntimeEnvironmentSecrets omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RuntimeEnvironmentVariables omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_ServiceObservabilityConfiguration omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_SourceCodeVersion omitted. -/** - * serializeAws_json1_0TraceConfiguration - */ -const se_TraceConfiguration = (input: TraceConfiguration, context: __SerdeContext): any => { - return { - ...(input.Vendor != null && { Vendor: input.Vendor }), - }; -}; +// se_SourceConfiguration omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_StartDeploymentRequest omitted. -/** - * serializeAws_json1_0UpdateServiceRequest - */ -const se_UpdateServiceRequest = (input: UpdateServiceRequest, context: __SerdeContext): any => { - return { - ...(input.AutoScalingConfigurationArn != null && { - AutoScalingConfigurationArn: input.AutoScalingConfigurationArn, - }), - ...(input.HealthCheckConfiguration != null && { - HealthCheckConfiguration: se_HealthCheckConfiguration(input.HealthCheckConfiguration, context), - }), - ...(input.InstanceConfiguration != null && { - InstanceConfiguration: se_InstanceConfiguration(input.InstanceConfiguration, context), - }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.ObservabilityConfiguration != null && { - ObservabilityConfiguration: se_ServiceObservabilityConfiguration(input.ObservabilityConfiguration, context), - }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - ...(input.SourceConfiguration != null && { - SourceConfiguration: se_SourceConfiguration(input.SourceConfiguration, context), - }), - }; -}; +// se_StringList omitted. -/** - * serializeAws_json1_0UpdateVpcIngressConnectionRequest - */ -const se_UpdateVpcIngressConnectionRequest = ( - input: UpdateVpcIngressConnectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.IngressVpcConfiguration != null && { - IngressVpcConfiguration: se_IngressVpcConfiguration(input.IngressVpcConfiguration, context), - }), - ...(input.VpcIngressConnectionArn != null && { VpcIngressConnectionArn: input.VpcIngressConnectionArn }), - }; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_0AssociateCustomDomainResponse - */ -const de_AssociateCustomDomainResponse = (output: any, context: __SerdeContext): AssociateCustomDomainResponse => { - return { - CustomDomain: output.CustomDomain != null ? de_CustomDomain(output.CustomDomain, context) : undefined, - DNSTarget: __expectString(output.DNSTarget), - ServiceArn: __expectString(output.ServiceArn), - VpcDNSTargets: output.VpcDNSTargets != null ? de_VpcDNSTargetList(output.VpcDNSTargets, context) : undefined, - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_0AuthenticationConfiguration - */ -const de_AuthenticationConfiguration = (output: any, context: __SerdeContext): AuthenticationConfiguration => { - return { - AccessRoleArn: __expectString(output.AccessRoleArn), - ConnectionArn: __expectString(output.ConnectionArn), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_0AutoScalingConfiguration - */ -const de_AutoScalingConfiguration = (output: any, context: __SerdeContext): AutoScalingConfiguration => { - return { - AutoScalingConfigurationArn: __expectString(output.AutoScalingConfigurationArn), - AutoScalingConfigurationName: __expectString(output.AutoScalingConfigurationName), - AutoScalingConfigurationRevision: __expectInt32(output.AutoScalingConfigurationRevision), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DeletedAt: - output.DeletedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedAt))) : undefined, - Latest: __expectBoolean(output.Latest), - MaxConcurrency: __expectInt32(output.MaxConcurrency), - MaxSize: __expectInt32(output.MaxSize), - MinSize: __expectInt32(output.MinSize), - Status: __expectString(output.Status), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_0AutoScalingConfigurationSummary - */ -const de_AutoScalingConfigurationSummary = (output: any, context: __SerdeContext): AutoScalingConfigurationSummary => { - return { - AutoScalingConfigurationArn: __expectString(output.AutoScalingConfigurationArn), - AutoScalingConfigurationName: __expectString(output.AutoScalingConfigurationName), - AutoScalingConfigurationRevision: __expectInt32(output.AutoScalingConfigurationRevision), - } as any; -}; +// se_TraceConfiguration omitted. -/** - * deserializeAws_json1_0AutoScalingConfigurationSummaryList - */ -const de_AutoScalingConfigurationSummaryList = ( - output: any, - context: __SerdeContext -): AutoScalingConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoScalingConfigurationSummary(entry, context); - }); - return retVal; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_0CertificateValidationRecord - */ -const de_CertificateValidationRecord = (output: any, context: __SerdeContext): CertificateValidationRecord => { - return { - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// se_UpdateServiceRequest omitted. -/** - * deserializeAws_json1_0CertificateValidationRecordList - */ -const de_CertificateValidationRecordList = (output: any, context: __SerdeContext): CertificateValidationRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CertificateValidationRecord(entry, context); - }); - return retVal; -}; +// se_UpdateVpcIngressConnectionRequest omitted. -/** - * deserializeAws_json1_0CodeConfiguration - */ -const de_CodeConfiguration = (output: any, context: __SerdeContext): CodeConfiguration => { - return { - CodeConfigurationValues: - output.CodeConfigurationValues != null - ? de_CodeConfigurationValues(output.CodeConfigurationValues, context) - : undefined, - ConfigurationSource: __expectString(output.ConfigurationSource), - } as any; -}; +// de_AssociateCustomDomainResponse omitted. -/** - * deserializeAws_json1_0CodeConfigurationValues - */ -const de_CodeConfigurationValues = (output: any, context: __SerdeContext): CodeConfigurationValues => { - return { - BuildCommand: __expectString(output.BuildCommand), - Port: __expectString(output.Port), - Runtime: __expectString(output.Runtime), - RuntimeEnvironmentSecrets: - output.RuntimeEnvironmentSecrets != null - ? de_RuntimeEnvironmentSecrets(output.RuntimeEnvironmentSecrets, context) - : undefined, - RuntimeEnvironmentVariables: - output.RuntimeEnvironmentVariables != null - ? de_RuntimeEnvironmentVariables(output.RuntimeEnvironmentVariables, context) - : undefined, - StartCommand: __expectString(output.StartCommand), - } as any; -}; +// de_AuthenticationConfiguration omitted. /** - * deserializeAws_json1_0CodeRepository + * deserializeAws_json1_0AutoScalingConfiguration */ -const de_CodeRepository = (output: any, context: __SerdeContext): CodeRepository => { - return { - CodeConfiguration: - output.CodeConfiguration != null ? de_CodeConfiguration(output.CodeConfiguration, context) : undefined, - RepositoryUrl: __expectString(output.RepositoryUrl), - SourceCodeVersion: - output.SourceCodeVersion != null ? de_SourceCodeVersion(output.SourceCodeVersion, context) : undefined, - } as any; +const de_AutoScalingConfiguration = (output: any, context: __SerdeContext): AutoScalingConfiguration => { + return take(output, { + AutoScalingConfigurationArn: __expectString, + AutoScalingConfigurationName: __expectString, + AutoScalingConfigurationRevision: __expectInt32, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Latest: __expectBoolean, + MaxConcurrency: __expectInt32, + MaxSize: __expectInt32, + MinSize: __expectInt32, + Status: __expectString, + }) as any; }; +// de_AutoScalingConfigurationSummary omitted. + +// de_AutoScalingConfigurationSummaryList omitted. + +// de_CertificateValidationRecord omitted. + +// de_CertificateValidationRecordList omitted. + +// de_CodeConfiguration omitted. + +// de_CodeConfigurationValues omitted. + +// de_CodeRepository omitted. + /** * deserializeAws_json1_0Connection */ const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionName: __expectString(output.ConnectionName), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ProviderType: __expectString(output.ProviderType), - Status: __expectString(output.Status), - } as any; + return take(output, { + ConnectionArn: __expectString, + ConnectionName: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProviderType: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_0ConnectionSummary */ const de_ConnectionSummary = (output: any, context: __SerdeContext): ConnectionSummary => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionName: __expectString(output.ConnectionName), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ProviderType: __expectString(output.ProviderType), - Status: __expectString(output.Status), - } as any; + return take(output, { + ConnectionArn: __expectString, + ConnectionName: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProviderType: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3540,9 +2762,6 @@ const de_ConnectionSummaryList = (output: any, context: __SerdeContext): Connect const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConnectionSummary(entry, context); }); return retVal; @@ -3555,21 +2774,18 @@ const de_CreateAutoScalingConfigurationResponse = ( output: any, context: __SerdeContext ): CreateAutoScalingConfigurationResponse => { - return { - AutoScalingConfiguration: - output.AutoScalingConfiguration != null - ? de_AutoScalingConfiguration(output.AutoScalingConfiguration, context) - : undefined, - } as any; + return take(output, { + AutoScalingConfiguration: (_: any) => de_AutoScalingConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateConnectionResponse */ const de_CreateConnectionResponse = (output: any, context: __SerdeContext): CreateConnectionResponse => { - return { - Connection: output.Connection != null ? de_Connection(output.Connection, context) : undefined, - } as any; + return take(output, { + Connection: (_: any) => de_Connection(_, context), + }) as any; }; /** @@ -3579,31 +2795,28 @@ const de_CreateObservabilityConfigurationResponse = ( output: any, context: __SerdeContext ): CreateObservabilityConfigurationResponse => { - return { - ObservabilityConfiguration: - output.ObservabilityConfiguration != null - ? de_ObservabilityConfiguration(output.ObservabilityConfiguration, context) - : undefined, - } as any; + return take(output, { + ObservabilityConfiguration: (_: any) => de_ObservabilityConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateServiceResponse */ const de_CreateServiceResponse = (output: any, context: __SerdeContext): CreateServiceResponse => { - return { - OperationId: __expectString(output.OperationId), - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + OperationId: __expectString, + Service: (_: any) => de_Service(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateVpcConnectorResponse */ const de_CreateVpcConnectorResponse = (output: any, context: __SerdeContext): CreateVpcConnectorResponse => { - return { - VpcConnector: output.VpcConnector != null ? de_VpcConnector(output.VpcConnector, context) : undefined, - } as any; + return take(output, { + VpcConnector: (_: any) => de_VpcConnector(_, context), + }) as any; }; /** @@ -3613,41 +2826,14 @@ const de_CreateVpcIngressConnectionResponse = ( output: any, context: __SerdeContext ): CreateVpcIngressConnectionResponse => { - return { - VpcIngressConnection: - output.VpcIngressConnection != null ? de_VpcIngressConnection(output.VpcIngressConnection, context) : undefined, - } as any; + return take(output, { + VpcIngressConnection: (_: any) => de_VpcIngressConnection(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CustomDomain - */ -const de_CustomDomain = (output: any, context: __SerdeContext): CustomDomain => { - return { - CertificateValidationRecords: - output.CertificateValidationRecords != null - ? de_CertificateValidationRecordList(output.CertificateValidationRecords, context) - : undefined, - DomainName: __expectString(output.DomainName), - EnableWWWSubdomain: __expectBoolean(output.EnableWWWSubdomain), - Status: __expectString(output.Status), - } as any; -}; +// de_CustomDomain omitted. -/** - * deserializeAws_json1_0CustomDomainList - */ -const de_CustomDomainList = (output: any, context: __SerdeContext): CustomDomain[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomDomain(entry, context); - }); - return retVal; -}; +// de_CustomDomainList omitted. /** * deserializeAws_json1_0DeleteAutoScalingConfigurationResponse @@ -3656,21 +2842,18 @@ const de_DeleteAutoScalingConfigurationResponse = ( output: any, context: __SerdeContext ): DeleteAutoScalingConfigurationResponse => { - return { - AutoScalingConfiguration: - output.AutoScalingConfiguration != null - ? de_AutoScalingConfiguration(output.AutoScalingConfiguration, context) - : undefined, - } as any; + return take(output, { + AutoScalingConfiguration: (_: any) => de_AutoScalingConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteConnectionResponse */ const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { - return { - Connection: output.Connection != null ? de_Connection(output.Connection, context) : undefined, - } as any; + return take(output, { + Connection: (_: any) => de_Connection(_, context), + }) as any; }; /** @@ -3680,31 +2863,28 @@ const de_DeleteObservabilityConfigurationResponse = ( output: any, context: __SerdeContext ): DeleteObservabilityConfigurationResponse => { - return { - ObservabilityConfiguration: - output.ObservabilityConfiguration != null - ? de_ObservabilityConfiguration(output.ObservabilityConfiguration, context) - : undefined, - } as any; + return take(output, { + ObservabilityConfiguration: (_: any) => de_ObservabilityConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteServiceResponse */ const de_DeleteServiceResponse = (output: any, context: __SerdeContext): DeleteServiceResponse => { - return { - OperationId: __expectString(output.OperationId), - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + OperationId: __expectString, + Service: (_: any) => de_Service(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteVpcConnectorResponse */ const de_DeleteVpcConnectorResponse = (output: any, context: __SerdeContext): DeleteVpcConnectorResponse => { - return { - VpcConnector: output.VpcConnector != null ? de_VpcConnector(output.VpcConnector, context) : undefined, - } as any; + return take(output, { + VpcConnector: (_: any) => de_VpcConnector(_, context), + }) as any; }; /** @@ -3714,10 +2894,9 @@ const de_DeleteVpcIngressConnectionResponse = ( output: any, context: __SerdeContext ): DeleteVpcIngressConnectionResponse => { - return { - VpcIngressConnection: - output.VpcIngressConnection != null ? de_VpcIngressConnection(output.VpcIngressConnection, context) : undefined, - } as any; + return take(output, { + VpcIngressConnection: (_: any) => de_VpcIngressConnection(_, context), + }) as any; }; /** @@ -3727,26 +2906,12 @@ const de_DescribeAutoScalingConfigurationResponse = ( output: any, context: __SerdeContext ): DescribeAutoScalingConfigurationResponse => { - return { - AutoScalingConfiguration: - output.AutoScalingConfiguration != null - ? de_AutoScalingConfiguration(output.AutoScalingConfiguration, context) - : undefined, - } as any; + return take(output, { + AutoScalingConfiguration: (_: any) => de_AutoScalingConfiguration(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DescribeCustomDomainsResponse - */ -const de_DescribeCustomDomainsResponse = (output: any, context: __SerdeContext): DescribeCustomDomainsResponse => { - return { - CustomDomains: output.CustomDomains != null ? de_CustomDomainList(output.CustomDomains, context) : undefined, - DNSTarget: __expectString(output.DNSTarget), - NextToken: __expectString(output.NextToken), - ServiceArn: __expectString(output.ServiceArn), - VpcDNSTargets: output.VpcDNSTargets != null ? de_VpcDNSTargetList(output.VpcDNSTargets, context) : undefined, - } as any; -}; +// de_DescribeCustomDomainsResponse omitted. /** * deserializeAws_json1_0DescribeObservabilityConfigurationResponse @@ -3755,30 +2920,27 @@ const de_DescribeObservabilityConfigurationResponse = ( output: any, context: __SerdeContext ): DescribeObservabilityConfigurationResponse => { - return { - ObservabilityConfiguration: - output.ObservabilityConfiguration != null - ? de_ObservabilityConfiguration(output.ObservabilityConfiguration, context) - : undefined, - } as any; + return take(output, { + ObservabilityConfiguration: (_: any) => de_ObservabilityConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeServiceResponse */ const de_DescribeServiceResponse = (output: any, context: __SerdeContext): DescribeServiceResponse => { - return { - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + Service: (_: any) => de_Service(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeVpcConnectorResponse */ const de_DescribeVpcConnectorResponse = (output: any, context: __SerdeContext): DescribeVpcConnectorResponse => { - return { - VpcConnector: output.VpcConnector != null ? de_VpcConnector(output.VpcConnector, context) : undefined, - } as any; + return take(output, { + VpcConnector: (_: any) => de_VpcConnector(_, context), + }) as any; }; /** @@ -3788,328 +2950,118 @@ const de_DescribeVpcIngressConnectionResponse = ( output: any, context: __SerdeContext ): DescribeVpcIngressConnectionResponse => { - return { - VpcIngressConnection: - output.VpcIngressConnection != null ? de_VpcIngressConnection(output.VpcIngressConnection, context) : undefined, - } as any; + return take(output, { + VpcIngressConnection: (_: any) => de_VpcIngressConnection(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DisassociateCustomDomainResponse - */ -const de_DisassociateCustomDomainResponse = ( - output: any, - context: __SerdeContext -): DisassociateCustomDomainResponse => { - return { - CustomDomain: output.CustomDomain != null ? de_CustomDomain(output.CustomDomain, context) : undefined, - DNSTarget: __expectString(output.DNSTarget), - ServiceArn: __expectString(output.ServiceArn), - VpcDNSTargets: output.VpcDNSTargets != null ? de_VpcDNSTargetList(output.VpcDNSTargets, context) : undefined, - } as any; -}; +// de_DisassociateCustomDomainResponse omitted. -/** - * deserializeAws_json1_0EgressConfiguration - */ -const de_EgressConfiguration = (output: any, context: __SerdeContext): EgressConfiguration => { - return { - EgressType: __expectString(output.EgressType), - VpcConnectorArn: __expectString(output.VpcConnectorArn), - } as any; -}; +// de_EgressConfiguration omitted. -/** - * deserializeAws_json1_0EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - KmsKey: __expectString(output.KmsKey), - } as any; -}; +// de_EncryptionConfiguration omitted. -/** - * deserializeAws_json1_0HealthCheckConfiguration - */ -const de_HealthCheckConfiguration = (output: any, context: __SerdeContext): HealthCheckConfiguration => { - return { - HealthyThreshold: __expectInt32(output.HealthyThreshold), - Interval: __expectInt32(output.Interval), - Path: __expectString(output.Path), - Protocol: __expectString(output.Protocol), - Timeout: __expectInt32(output.Timeout), - UnhealthyThreshold: __expectInt32(output.UnhealthyThreshold), - } as any; -}; +// de_HealthCheckConfiguration omitted. -/** - * deserializeAws_json1_0ImageConfiguration - */ -const de_ImageConfiguration = (output: any, context: __SerdeContext): ImageConfiguration => { - return { - Port: __expectString(output.Port), - RuntimeEnvironmentSecrets: - output.RuntimeEnvironmentSecrets != null - ? de_RuntimeEnvironmentSecrets(output.RuntimeEnvironmentSecrets, context) - : undefined, - RuntimeEnvironmentVariables: - output.RuntimeEnvironmentVariables != null - ? de_RuntimeEnvironmentVariables(output.RuntimeEnvironmentVariables, context) - : undefined, - StartCommand: __expectString(output.StartCommand), - } as any; -}; +// de_ImageConfiguration omitted. -/** - * deserializeAws_json1_0ImageRepository - */ -const de_ImageRepository = (output: any, context: __SerdeContext): ImageRepository => { - return { - ImageConfiguration: - output.ImageConfiguration != null ? de_ImageConfiguration(output.ImageConfiguration, context) : undefined, - ImageIdentifier: __expectString(output.ImageIdentifier), - ImageRepositoryType: __expectString(output.ImageRepositoryType), - } as any; -}; +// de_ImageRepository omitted. -/** - * deserializeAws_json1_0IngressConfiguration - */ -const de_IngressConfiguration = (output: any, context: __SerdeContext): IngressConfiguration => { - return { - IsPubliclyAccessible: __expectBoolean(output.IsPubliclyAccessible), - } as any; -}; +// de_IngressConfiguration omitted. -/** - * deserializeAws_json1_0IngressVpcConfiguration - */ -const de_IngressVpcConfiguration = (output: any, context: __SerdeContext): IngressVpcConfiguration => { - return { - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_IngressVpcConfiguration omitted. -/** - * deserializeAws_json1_0InstanceConfiguration - */ -const de_InstanceConfiguration = (output: any, context: __SerdeContext): InstanceConfiguration => { - return { - Cpu: __expectString(output.Cpu), - InstanceRoleArn: __expectString(output.InstanceRoleArn), - Memory: __expectString(output.Memory), - } as any; -}; +// de_InstanceConfiguration omitted. -/** - * deserializeAws_json1_0InternalServiceErrorException - */ -const de_InternalServiceErrorException = (output: any, context: __SerdeContext): InternalServiceErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceErrorException omitted. -/** - * deserializeAws_json1_0InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_0InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidStateException omitted. -/** - * deserializeAws_json1_0ListAutoScalingConfigurationsResponse - */ -const de_ListAutoScalingConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListAutoScalingConfigurationsResponse => { - return { - AutoScalingConfigurationSummaryList: - output.AutoScalingConfigurationSummaryList != null - ? de_AutoScalingConfigurationSummaryList(output.AutoScalingConfigurationSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAutoScalingConfigurationsResponse omitted. /** * deserializeAws_json1_0ListConnectionsResponse */ const de_ListConnectionsResponse = (output: any, context: __SerdeContext): ListConnectionsResponse => { - return { - ConnectionSummaryList: - output.ConnectionSummaryList != null - ? de_ConnectionSummaryList(output.ConnectionSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ConnectionSummaryList: (_: any) => de_ConnectionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListObservabilityConfigurationsResponse - */ -const de_ListObservabilityConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListObservabilityConfigurationsResponse => { - return { - NextToken: __expectString(output.NextToken), - ObservabilityConfigurationSummaryList: - output.ObservabilityConfigurationSummaryList != null - ? de_ObservabilityConfigurationSummaryList(output.ObservabilityConfigurationSummaryList, context) - : undefined, - } as any; -}; +// de_ListObservabilityConfigurationsResponse omitted. /** * deserializeAws_json1_0ListOperationsResponse */ const de_ListOperationsResponse = (output: any, context: __SerdeContext): ListOperationsResponse => { - return { - NextToken: __expectString(output.NextToken), - OperationSummaryList: - output.OperationSummaryList != null ? de_OperationSummaryList(output.OperationSummaryList, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + OperationSummaryList: (_: any) => de_OperationSummaryList(_, context), + }) as any; }; /** * deserializeAws_json1_0ListServicesResponse */ const de_ListServicesResponse = (output: any, context: __SerdeContext): ListServicesResponse => { - return { - NextToken: __expectString(output.NextToken), - ServiceSummaryList: - output.ServiceSummaryList != null ? de_ServiceSummaryList(output.ServiceSummaryList, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ServiceSummaryList: (_: any) => de_ServiceSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_0ListVpcConnectorsResponse */ const de_ListVpcConnectorsResponse = (output: any, context: __SerdeContext): ListVpcConnectorsResponse => { - return { - NextToken: __expectString(output.NextToken), - VpcConnectors: output.VpcConnectors != null ? de_VpcConnectors(output.VpcConnectors, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + VpcConnectors: (_: any) => de_VpcConnectors(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListVpcIngressConnectionsResponse - */ -const de_ListVpcIngressConnectionsResponse = ( - output: any, - context: __SerdeContext -): ListVpcIngressConnectionsResponse => { - return { - NextToken: __expectString(output.NextToken), - VpcIngressConnectionSummaryList: - output.VpcIngressConnectionSummaryList != null - ? de_VpcIngressConnectionSummaryList(output.VpcIngressConnectionSummaryList, context) - : undefined, - } as any; -}; +// de_ListVpcIngressConnectionsResponse omitted. -/** - * deserializeAws_json1_0NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - EgressConfiguration: - output.EgressConfiguration != null ? de_EgressConfiguration(output.EgressConfiguration, context) : undefined, - IngressConfiguration: - output.IngressConfiguration != null ? de_IngressConfiguration(output.IngressConfiguration, context) : undefined, - } as any; -}; +// de_NetworkConfiguration omitted. /** * deserializeAws_json1_0ObservabilityConfiguration */ const de_ObservabilityConfiguration = (output: any, context: __SerdeContext): ObservabilityConfiguration => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DeletedAt: - output.DeletedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedAt))) : undefined, - Latest: __expectBoolean(output.Latest), - ObservabilityConfigurationArn: __expectString(output.ObservabilityConfigurationArn), - ObservabilityConfigurationName: __expectString(output.ObservabilityConfigurationName), - ObservabilityConfigurationRevision: __expectInt32(output.ObservabilityConfigurationRevision), - Status: __expectString(output.Status), - TraceConfiguration: - output.TraceConfiguration != null ? de_TraceConfiguration(output.TraceConfiguration, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Latest: __expectBoolean, + ObservabilityConfigurationArn: __expectString, + ObservabilityConfigurationName: __expectString, + ObservabilityConfigurationRevision: __expectInt32, + Status: __expectString, + TraceConfiguration: _json, + }) as any; }; -/** - * deserializeAws_json1_0ObservabilityConfigurationSummary - */ -const de_ObservabilityConfigurationSummary = ( - output: any, - context: __SerdeContext -): ObservabilityConfigurationSummary => { - return { - ObservabilityConfigurationArn: __expectString(output.ObservabilityConfigurationArn), - ObservabilityConfigurationName: __expectString(output.ObservabilityConfigurationName), - ObservabilityConfigurationRevision: __expectInt32(output.ObservabilityConfigurationRevision), - } as any; -}; +// de_ObservabilityConfigurationSummary omitted. -/** - * deserializeAws_json1_0ObservabilityConfigurationSummaryList - */ -const de_ObservabilityConfigurationSummaryList = ( - output: any, - context: __SerdeContext -): ObservabilityConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ObservabilityConfigurationSummary(entry, context); - }); - return retVal; -}; +// de_ObservabilityConfigurationSummaryList omitted. /** * deserializeAws_json1_0OperationSummary */ const de_OperationSummary = (output: any, context: __SerdeContext): OperationSummary => { - return { - EndedAt: - output.EndedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) : undefined, - Id: __expectString(output.Id), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - TargetArn: __expectString(output.TargetArn), - Type: __expectString(output.Type), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + EndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TargetArn: __expectString, + Type: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4119,9 +3071,6 @@ const de_OperationSummaryList = (output: any, context: __SerdeContext): Operatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OperationSummary(entry, context); }); return retVal; @@ -4131,137 +3080,68 @@ const de_OperationSummaryList = (output: any, context: __SerdeContext): Operatio * deserializeAws_json1_0PauseServiceResponse */ const de_PauseServiceResponse = (output: any, context: __SerdeContext): PauseServiceResponse => { - return { - OperationId: __expectString(output.OperationId), - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + OperationId: __expectString, + Service: (_: any) => de_Service(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_0ResumeServiceResponse */ const de_ResumeServiceResponse = (output: any, context: __SerdeContext): ResumeServiceResponse => { - return { - OperationId: __expectString(output.OperationId), - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + OperationId: __expectString, + Service: (_: any) => de_Service(_, context), + }) as any; }; -/** - * deserializeAws_json1_0RuntimeEnvironmentSecrets - */ -const de_RuntimeEnvironmentSecrets = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RuntimeEnvironmentSecrets omitted. -/** - * deserializeAws_json1_0RuntimeEnvironmentVariables - */ -const de_RuntimeEnvironmentVariables = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RuntimeEnvironmentVariables omitted. /** * deserializeAws_json1_0Service */ const de_Service = (output: any, context: __SerdeContext): Service => { - return { - AutoScalingConfigurationSummary: - output.AutoScalingConfigurationSummary != null - ? de_AutoScalingConfigurationSummary(output.AutoScalingConfigurationSummary, context) - : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DeletedAt: - output.DeletedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedAt))) : undefined, - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - HealthCheckConfiguration: - output.HealthCheckConfiguration != null - ? de_HealthCheckConfiguration(output.HealthCheckConfiguration, context) - : undefined, - InstanceConfiguration: - output.InstanceConfiguration != null - ? de_InstanceConfiguration(output.InstanceConfiguration, context) - : undefined, - NetworkConfiguration: - output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined, - ObservabilityConfiguration: - output.ObservabilityConfiguration != null - ? de_ServiceObservabilityConfiguration(output.ObservabilityConfiguration, context) - : undefined, - ServiceArn: __expectString(output.ServiceArn), - ServiceId: __expectString(output.ServiceId), - ServiceName: __expectString(output.ServiceName), - ServiceUrl: __expectString(output.ServiceUrl), - SourceConfiguration: - output.SourceConfiguration != null ? de_SourceConfiguration(output.SourceConfiguration, context) : undefined, - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ServiceObservabilityConfiguration - */ -const de_ServiceObservabilityConfiguration = ( - output: any, - context: __SerdeContext -): ServiceObservabilityConfiguration => { - return { - ObservabilityConfigurationArn: __expectString(output.ObservabilityConfigurationArn), - ObservabilityEnabled: __expectBoolean(output.ObservabilityEnabled), - } as any; -}; - -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; + return take(output, { + AutoScalingConfigurationSummary: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EncryptionConfiguration: _json, + HealthCheckConfiguration: _json, + InstanceConfiguration: _json, + NetworkConfiguration: _json, + ObservabilityConfiguration: _json, + ServiceArn: __expectString, + ServiceId: __expectString, + ServiceName: __expectString, + ServiceUrl: __expectString, + SourceConfiguration: _json, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_ServiceObservabilityConfiguration omitted. + +// de_ServiceQuotaExceededException omitted. /** * deserializeAws_json1_0ServiceSummary */ const de_ServiceSummary = (output: any, context: __SerdeContext): ServiceSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ServiceArn: __expectString(output.ServiceArn), - ServiceId: __expectString(output.ServiceId), - ServiceName: __expectString(output.ServiceName), - ServiceUrl: __expectString(output.ServiceUrl), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServiceArn: __expectString, + ServiceId: __expectString, + ServiceName: __expectString, + ServiceUrl: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4271,119 +3151,37 @@ const de_ServiceSummaryList = (output: any, context: __SerdeContext): ServiceSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0SourceCodeVersion - */ -const de_SourceCodeVersion = (output: any, context: __SerdeContext): SourceCodeVersion => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_SourceCodeVersion omitted. -/** - * deserializeAws_json1_0SourceConfiguration - */ -const de_SourceConfiguration = (output: any, context: __SerdeContext): SourceConfiguration => { - return { - AuthenticationConfiguration: - output.AuthenticationConfiguration != null - ? de_AuthenticationConfiguration(output.AuthenticationConfiguration, context) - : undefined, - AutoDeploymentsEnabled: __expectBoolean(output.AutoDeploymentsEnabled), - CodeRepository: output.CodeRepository != null ? de_CodeRepository(output.CodeRepository, context) : undefined, - ImageRepository: output.ImageRepository != null ? de_ImageRepository(output.ImageRepository, context) : undefined, - } as any; -}; +// de_SourceConfiguration omitted. -/** - * deserializeAws_json1_0StartDeploymentResponse - */ -const de_StartDeploymentResponse = (output: any, context: __SerdeContext): StartDeploymentResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_StartDeploymentResponse omitted. -/** - * deserializeAws_json1_0StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0TraceConfiguration - */ -const de_TraceConfiguration = (output: any, context: __SerdeContext): TraceConfiguration => { - return { - Vendor: __expectString(output.Vendor), - } as any; -}; +// de_TraceConfiguration omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_0UpdateServiceResponse */ const de_UpdateServiceResponse = (output: any, context: __SerdeContext): UpdateServiceResponse => { - return { - OperationId: __expectString(output.OperationId), - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + OperationId: __expectString, + Service: (_: any) => de_Service(_, context), + }) as any; }; /** @@ -4393,28 +3191,25 @@ const de_UpdateVpcIngressConnectionResponse = ( output: any, context: __SerdeContext ): UpdateVpcIngressConnectionResponse => { - return { - VpcIngressConnection: - output.VpcIngressConnection != null ? de_VpcIngressConnection(output.VpcIngressConnection, context) : undefined, - } as any; + return take(output, { + VpcIngressConnection: (_: any) => de_VpcIngressConnection(_, context), + }) as any; }; /** * deserializeAws_json1_0VpcConnector */ const de_VpcConnector = (output: any, context: __SerdeContext): VpcConnector => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DeletedAt: - output.DeletedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedAt))) : undefined, - SecurityGroups: output.SecurityGroups != null ? de_StringList(output.SecurityGroups, context) : undefined, - Status: __expectString(output.Status), - Subnets: output.Subnets != null ? de_StringList(output.Subnets, context) : undefined, - VpcConnectorArn: __expectString(output.VpcConnectorArn), - VpcConnectorName: __expectString(output.VpcConnectorName), - VpcConnectorRevision: __expectInt32(output.VpcConnectorRevision), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SecurityGroups: _json, + Status: __expectString, + Subnets: _json, + VpcConnectorArn: __expectString, + VpcConnectorName: __expectString, + VpcConnectorRevision: __expectInt32, + }) as any; }; /** @@ -4424,86 +3219,35 @@ const de_VpcConnectors = (output: any, context: __SerdeContext): VpcConnector[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VpcConnector(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0VpcDNSTarget - */ -const de_VpcDNSTarget = (output: any, context: __SerdeContext): VpcDNSTarget => { - return { - DomainName: __expectString(output.DomainName), - VpcId: __expectString(output.VpcId), - VpcIngressConnectionArn: __expectString(output.VpcIngressConnectionArn), - } as any; -}; +// de_VpcDNSTarget omitted. -/** - * deserializeAws_json1_0VpcDNSTargetList - */ -const de_VpcDNSTargetList = (output: any, context: __SerdeContext): VpcDNSTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcDNSTarget(entry, context); - }); - return retVal; -}; +// de_VpcDNSTargetList omitted. /** * deserializeAws_json1_0VpcIngressConnection */ const de_VpcIngressConnection = (output: any, context: __SerdeContext): VpcIngressConnection => { - return { - AccountId: __expectString(output.AccountId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DeletedAt: - output.DeletedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedAt))) : undefined, - DomainName: __expectString(output.DomainName), - IngressVpcConfiguration: - output.IngressVpcConfiguration != null - ? de_IngressVpcConfiguration(output.IngressVpcConfiguration, context) - : undefined, - ServiceArn: __expectString(output.ServiceArn), - Status: __expectString(output.Status), - VpcIngressConnectionArn: __expectString(output.VpcIngressConnectionArn), - VpcIngressConnectionName: __expectString(output.VpcIngressConnectionName), - } as any; -}; - -/** - * deserializeAws_json1_0VpcIngressConnectionSummary - */ -const de_VpcIngressConnectionSummary = (output: any, context: __SerdeContext): VpcIngressConnectionSummary => { - return { - ServiceArn: __expectString(output.ServiceArn), - VpcIngressConnectionArn: __expectString(output.VpcIngressConnectionArn), - } as any; + return take(output, { + AccountId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + IngressVpcConfiguration: _json, + ServiceArn: __expectString, + Status: __expectString, + VpcIngressConnectionArn: __expectString, + VpcIngressConnectionName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0VpcIngressConnectionSummaryList - */ -const de_VpcIngressConnectionSummaryList = (output: any, context: __SerdeContext): VpcIngressConnectionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcIngressConnectionSummary(entry, context); - }); - return retVal; -}; +// de_VpcIngressConnectionSummary omitted. + +// de_VpcIngressConnectionSummaryList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4525,6 +3269,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-appstream/src/protocols/Aws_json1_1.ts b/clients/client-appstream/src/protocols/Aws_json1_1.ts index 63967b9d0cf0..f3d1d391a02b 100644 --- a/clients/client-appstream/src/protocols/Aws_json1_1.ts +++ b/clients/client-appstream/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -166,25 +168,16 @@ import { AppBlock, Application, ApplicationAttribute, - ApplicationFleetAssociation, ApplicationSettings, - ApplicationSettingsResponse, AssociateApplicationFleetRequest, - AssociateApplicationFleetResult, AssociateApplicationToEntitlementRequest, - AssociateApplicationToEntitlementResult, AssociateFleetRequest, - AssociateFleetResult, BatchAssociateUserStackRequest, - BatchAssociateUserStackResult, BatchDisassociateUserStackRequest, - BatchDisassociateUserStackResult, CertificateBasedAuthProperties, ComputeCapacity, - ComputeCapacityStatus, ConcurrentModificationException, CopyImageRequest, - CopyImageResponse, CreateAppBlockRequest, CreateAppBlockResult, CreateApplicationRequest, @@ -206,35 +199,23 @@ import { CreateUpdatedImageRequest, CreateUpdatedImageResult, CreateUsageReportSubscriptionRequest, - CreateUsageReportSubscriptionResult, CreateUserRequest, - CreateUserResult, DeleteAppBlockRequest, - DeleteAppBlockResult, DeleteApplicationRequest, - DeleteApplicationResult, DeleteDirectoryConfigRequest, - DeleteDirectoryConfigResult, DeleteEntitlementRequest, - DeleteEntitlementResult, DeleteFleetRequest, - DeleteFleetResult, DeleteImageBuilderRequest, DeleteImageBuilderResult, DeleteImagePermissionsRequest, - DeleteImagePermissionsResult, DeleteImageRequest, DeleteImageResult, DeleteStackRequest, - DeleteStackResult, DeleteUsageReportSubscriptionRequest, - DeleteUsageReportSubscriptionResult, DeleteUserRequest, - DeleteUserResult, DescribeAppBlocksRequest, DescribeAppBlocksResult, DescribeApplicationFleetAssociationsRequest, - DescribeApplicationFleetAssociationsResult, DescribeApplicationsRequest, DescribeApplicationsResult, DescribeDirectoryConfigsRequest, @@ -246,7 +227,6 @@ import { DescribeImageBuildersRequest, DescribeImageBuildersResult, DescribeImagePermissionsRequest, - DescribeImagePermissionsResult, DescribeImagesRequest, DescribeImagesResult, DescribeSessionsRequest, @@ -258,49 +238,32 @@ import { DescribeUsersRequest, DescribeUsersResult, DescribeUserStackAssociationsRequest, - DescribeUserStackAssociationsResult, DirectoryConfig, DisableUserRequest, - DisableUserResult, DisassociateApplicationFleetRequest, - DisassociateApplicationFleetResult, DisassociateApplicationFromEntitlementRequest, - DisassociateApplicationFromEntitlementResult, DisassociateFleetRequest, - DisassociateFleetResult, DomainJoinInfo, EnableUserRequest, - EnableUserResult, - EntitledApplication, Entitlement, EntitlementAlreadyExistsException, EntitlementAttribute, EntitlementNotFoundException, ExpireSessionRequest, - ExpireSessionResult, Fleet, FleetAttribute, - FleetError, Image, ImageBuilder, - ImageBuilderStateChangeReason, ImagePermissions, - ImageStateChangeReason, IncompatibleImageException, InvalidAccountStatusException, InvalidParameterCombinationException, InvalidRoleException, - LastReportGenerationExecutionError, LimitExceededException, ListAssociatedFleetsRequest, - ListAssociatedFleetsResult, ListAssociatedStacksRequest, - ListAssociatedStacksResult, ListEntitledApplicationsRequest, - ListEntitledApplicationsResult, ListTagsForResourceRequest, - ListTagsForResourceResponse, - NetworkAccessConfiguration, OperationNotPermittedException, PlatformType, RequestLimitExceededException, @@ -313,24 +276,18 @@ import { ScriptDetails, ServiceAccountCredentials, Session, - SharedImagePermissions, Stack, StackAttribute, - StackError, StartFleetRequest, - StartFleetResult, StartImageBuilderRequest, StartImageBuilderResult, StopFleetRequest, - StopFleetResult, StopImageBuilderRequest, StopImageBuilderResult, StorageConnector, StreamingExperienceSettings, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateApplicationRequest, UpdateApplicationResult, UpdateDirectoryConfigRequest, @@ -340,14 +297,12 @@ import { UpdateFleetRequest, UpdateFleetResult, UpdateImagePermissionsRequest, - UpdateImagePermissionsResult, UpdateStackRequest, UpdateStackResult, UsageReportSubscription, User, UserSetting, UserStackAssociation, - UserStackAssociationError, VpcConfig, } from "../models/models_0"; @@ -360,7 +315,7 @@ export const se_AssociateApplicationFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateApplicationFleet"); let body: any; - body = JSON.stringify(se_AssociateApplicationFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -373,7 +328,7 @@ export const se_AssociateApplicationToEntitlementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateApplicationToEntitlement"); let body: any; - body = JSON.stringify(se_AssociateApplicationToEntitlementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,7 +341,7 @@ export const se_AssociateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateFleet"); let body: any; - body = JSON.stringify(se_AssociateFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -399,7 +354,7 @@ export const se_BatchAssociateUserStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchAssociateUserStack"); let body: any; - body = JSON.stringify(se_BatchAssociateUserStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -412,7 +367,7 @@ export const se_BatchDisassociateUserStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDisassociateUserStack"); let body: any; - body = JSON.stringify(se_BatchDisassociateUserStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,7 +380,7 @@ export const se_CopyImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CopyImage"); let body: any; - body = JSON.stringify(se_CopyImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -438,7 +393,7 @@ export const se_CreateAppBlockCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAppBlock"); let body: any; - body = JSON.stringify(se_CreateAppBlockRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -451,7 +406,7 @@ export const se_CreateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplication"); let body: any; - body = JSON.stringify(se_CreateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -464,7 +419,7 @@ export const se_CreateDirectoryConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDirectoryConfig"); let body: any; - body = JSON.stringify(se_CreateDirectoryConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -477,7 +432,7 @@ export const se_CreateEntitlementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEntitlement"); let body: any; - body = JSON.stringify(se_CreateEntitlementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -490,7 +445,7 @@ export const se_CreateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFleet"); let body: any; - body = JSON.stringify(se_CreateFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -503,7 +458,7 @@ export const se_CreateImageBuilderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateImageBuilder"); let body: any; - body = JSON.stringify(se_CreateImageBuilderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,7 +471,7 @@ export const se_CreateImageBuilderStreamingURLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateImageBuilderStreamingURL"); let body: any; - body = JSON.stringify(se_CreateImageBuilderStreamingURLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -529,7 +484,7 @@ export const se_CreateStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStack"); let body: any; - body = JSON.stringify(se_CreateStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -542,7 +497,7 @@ export const se_CreateStreamingURLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStreamingURL"); let body: any; - body = JSON.stringify(se_CreateStreamingURLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -555,7 +510,7 @@ export const se_CreateUpdatedImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUpdatedImage"); let body: any; - body = JSON.stringify(se_CreateUpdatedImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -568,7 +523,7 @@ export const se_CreateUsageReportSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUsageReportSubscription"); let body: any; - body = JSON.stringify(se_CreateUsageReportSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +536,7 @@ export const se_CreateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUser"); let body: any; - body = JSON.stringify(se_CreateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +549,7 @@ export const se_DeleteAppBlockCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAppBlock"); let body: any; - body = JSON.stringify(se_DeleteAppBlockRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +562,7 @@ export const se_DeleteApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplication"); let body: any; - body = JSON.stringify(se_DeleteApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +575,7 @@ export const se_DeleteDirectoryConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDirectoryConfig"); let body: any; - body = JSON.stringify(se_DeleteDirectoryConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -633,7 +588,7 @@ export const se_DeleteEntitlementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEntitlement"); let body: any; - body = JSON.stringify(se_DeleteEntitlementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +601,7 @@ export const se_DeleteFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFleet"); let body: any; - body = JSON.stringify(se_DeleteFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +614,7 @@ export const se_DeleteImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImage"); let body: any; - body = JSON.stringify(se_DeleteImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -672,7 +627,7 @@ export const se_DeleteImageBuilderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImageBuilder"); let body: any; - body = JSON.stringify(se_DeleteImageBuilderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +640,7 @@ export const se_DeleteImagePermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImagePermissions"); let body: any; - body = JSON.stringify(se_DeleteImagePermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +653,7 @@ export const se_DeleteStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStack"); let body: any; - body = JSON.stringify(se_DeleteStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +666,7 @@ export const se_DeleteUsageReportSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUsageReportSubscription"); let body: any; - body = JSON.stringify(se_DeleteUsageReportSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +679,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -737,7 +692,7 @@ export const se_DescribeAppBlocksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAppBlocks"); let body: any; - body = JSON.stringify(se_DescribeAppBlocksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +705,7 @@ export const se_DescribeApplicationFleetAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplicationFleetAssociations"); let body: any; - body = JSON.stringify(se_DescribeApplicationFleetAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -763,7 +718,7 @@ export const se_DescribeApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplications"); let body: any; - body = JSON.stringify(se_DescribeApplicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -776,7 +731,7 @@ export const se_DescribeDirectoryConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDirectoryConfigs"); let body: any; - body = JSON.stringify(se_DescribeDirectoryConfigsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +744,7 @@ export const se_DescribeEntitlementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEntitlements"); let body: any; - body = JSON.stringify(se_DescribeEntitlementsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +757,7 @@ export const se_DescribeFleetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleets"); let body: any; - body = JSON.stringify(se_DescribeFleetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -815,7 +770,7 @@ export const se_DescribeImageBuildersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImageBuilders"); let body: any; - body = JSON.stringify(se_DescribeImageBuildersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -828,7 +783,7 @@ export const se_DescribeImagePermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImagePermissions"); let body: any; - body = JSON.stringify(se_DescribeImagePermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -841,7 +796,7 @@ export const se_DescribeImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImages"); let body: any; - body = JSON.stringify(se_DescribeImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -854,7 +809,7 @@ export const se_DescribeSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSessions"); let body: any; - body = JSON.stringify(se_DescribeSessionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -867,7 +822,7 @@ export const se_DescribeStacksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStacks"); let body: any; - body = JSON.stringify(se_DescribeStacksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -880,7 +835,7 @@ export const se_DescribeUsageReportSubscriptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUsageReportSubscriptions"); let body: any; - body = JSON.stringify(se_DescribeUsageReportSubscriptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -893,7 +848,7 @@ export const se_DescribeUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUsers"); let body: any; - body = JSON.stringify(se_DescribeUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -906,7 +861,7 @@ export const se_DescribeUserStackAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserStackAssociations"); let body: any; - body = JSON.stringify(se_DescribeUserStackAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -919,7 +874,7 @@ export const se_DisableUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableUser"); let body: any; - body = JSON.stringify(se_DisableUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -932,7 +887,7 @@ export const se_DisassociateApplicationFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateApplicationFleet"); let body: any; - body = JSON.stringify(se_DisassociateApplicationFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -945,7 +900,7 @@ export const se_DisassociateApplicationFromEntitlementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateApplicationFromEntitlement"); let body: any; - body = JSON.stringify(se_DisassociateApplicationFromEntitlementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -958,7 +913,7 @@ export const se_DisassociateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateFleet"); let body: any; - body = JSON.stringify(se_DisassociateFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +926,7 @@ export const se_EnableUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableUser"); let body: any; - body = JSON.stringify(se_EnableUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +939,7 @@ export const se_ExpireSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExpireSession"); let body: any; - body = JSON.stringify(se_ExpireSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -997,7 +952,7 @@ export const se_ListAssociatedFleetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssociatedFleets"); let body: any; - body = JSON.stringify(se_ListAssociatedFleetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1010,7 +965,7 @@ export const se_ListAssociatedStacksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssociatedStacks"); let body: any; - body = JSON.stringify(se_ListAssociatedStacksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1023,7 +978,7 @@ export const se_ListEntitledApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEntitledApplications"); let body: any; - body = JSON.stringify(se_ListEntitledApplicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1036,7 +991,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1049,7 +1004,7 @@ export const se_StartFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartFleet"); let body: any; - body = JSON.stringify(se_StartFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1062,7 +1017,7 @@ export const se_StartImageBuilderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartImageBuilder"); let body: any; - body = JSON.stringify(se_StartImageBuilderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1075,7 +1030,7 @@ export const se_StopFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopFleet"); let body: any; - body = JSON.stringify(se_StopFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1088,7 +1043,7 @@ export const se_StopImageBuilderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopImageBuilder"); let body: any; - body = JSON.stringify(se_StopImageBuilderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1101,7 +1056,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1114,7 +1069,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1127,7 +1082,7 @@ export const se_UpdateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplication"); let body: any; - body = JSON.stringify(se_UpdateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1140,7 +1095,7 @@ export const se_UpdateDirectoryConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDirectoryConfig"); let body: any; - body = JSON.stringify(se_UpdateDirectoryConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1153,7 +1108,7 @@ export const se_UpdateEntitlementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEntitlement"); let body: any; - body = JSON.stringify(se_UpdateEntitlementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1166,7 +1121,7 @@ export const se_UpdateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFleet"); let body: any; - body = JSON.stringify(se_UpdateFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1179,7 +1134,7 @@ export const se_UpdateImagePermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateImagePermissions"); let body: any; - body = JSON.stringify(se_UpdateImagePermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1192,7 +1147,7 @@ export const se_UpdateStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateStack"); let body: any; - body = JSON.stringify(se_UpdateStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1208,12 +1163,12 @@ export const de_AssociateApplicationFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateApplicationFleetResult(data, context); + contents = _json(data); const response: AssociateApplicationFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1246,10 +1201,9 @@ const de_AssociateApplicationFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1267,12 +1221,12 @@ export const de_AssociateApplicationToEntitlementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateApplicationToEntitlementResult(data, context); + contents = _json(data); const response: AssociateApplicationToEntitlementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1302,10 +1256,9 @@ const de_AssociateApplicationToEntitlementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1323,12 +1276,12 @@ export const de_AssociateFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateFleetResult(data, context); + contents = _json(data); const response: AssociateFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1364,10 +1317,9 @@ const de_AssociateFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1385,12 +1337,12 @@ export const de_BatchAssociateUserStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchAssociateUserStackResult(data, context); + contents = _json(data); const response: BatchAssociateUserStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1414,10 +1366,9 @@ const de_BatchAssociateUserStackCommandError = async ( throw await de_OperationNotPermittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1435,12 +1386,12 @@ export const de_BatchDisassociateUserStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDisassociateUserStackResult(data, context); + contents = _json(data); const response: BatchDisassociateUserStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1464,10 +1415,9 @@ const de_BatchDisassociateUserStackCommandError = async ( throw await de_OperationNotPermittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1485,12 +1435,12 @@ export const de_CopyImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CopyImageResponse(data, context); + contents = _json(data); const response: CopyImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1526,10 +1476,9 @@ const de_CopyImageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1552,7 +1501,7 @@ export const de_CreateAppBlockCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1582,10 +1531,9 @@ const de_CreateAppBlockCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1608,7 +1556,7 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1641,10 +1589,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1667,7 +1614,7 @@ export const de_CreateDirectoryConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1703,10 +1650,9 @@ const de_CreateDirectoryConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1729,7 +1675,7 @@ export const de_CreateEntitlementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1759,10 +1705,9 @@ const de_CreateEntitlementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1785,7 +1730,7 @@ export const de_CreateFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1836,10 +1781,9 @@ const de_CreateFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,7 +1806,7 @@ export const de_CreateImageBuilderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1913,10 +1857,9 @@ const de_CreateImageBuilderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1939,7 +1882,7 @@ export const de_CreateImageBuilderStreamingURLCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1963,10 +1906,9 @@ const de_CreateImageBuilderStreamingURLCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1989,7 +1931,7 @@ export const de_CreateStackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2028,10 +1970,9 @@ const de_CreateStackCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2054,7 +1995,7 @@ export const de_CreateStreamingURLCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2084,10 +2025,9 @@ const de_CreateStreamingURLCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2110,7 +2050,7 @@ export const de_CreateUpdatedImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2149,10 +2089,9 @@ const de_CreateUpdatedImageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2170,12 +2109,12 @@ export const de_CreateUsageReportSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUsageReportSubscriptionResult(data, context); + contents = _json(data); const response: CreateUsageReportSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2202,10 +2141,9 @@ const de_CreateUsageReportSubscriptionCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2223,12 +2161,12 @@ export const de_CreateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserResult(data, context); + contents = _json(data); const response: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2261,10 +2199,9 @@ const de_CreateUserCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,12 +2219,12 @@ export const de_DeleteAppBlockCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAppBlockResult(data, context); + contents = _json(data); const response: DeleteAppBlockCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2314,10 +2251,9 @@ const de_DeleteAppBlockCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2335,12 +2271,12 @@ export const de_DeleteApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationResult(data, context); + contents = _json(data); const response: DeleteApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2370,10 +2306,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2391,12 +2326,12 @@ export const de_DeleteDirectoryConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDirectoryConfigResult(data, context); + contents = _json(data); const response: DeleteDirectoryConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2420,10 +2355,9 @@ const de_DeleteDirectoryConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2441,12 +2375,12 @@ export const de_DeleteEntitlementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEntitlementResult(data, context); + contents = _json(data); const response: DeleteEntitlementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2476,10 +2410,9 @@ const de_DeleteEntitlementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,12 +2430,12 @@ export const de_DeleteFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFleetResult(data, context); + contents = _json(data); const response: DeleteFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2529,10 +2462,9 @@ const de_DeleteFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2555,7 +2487,7 @@ export const de_DeleteImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2585,10 +2517,9 @@ const de_DeleteImageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2611,7 +2542,7 @@ export const de_DeleteImageBuilderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2638,10 +2569,9 @@ const de_DeleteImageBuilderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2659,12 +2589,12 @@ export const de_DeleteImagePermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteImagePermissionsResult(data, context); + contents = _json(data); const response: DeleteImagePermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2688,10 +2618,9 @@ const de_DeleteImagePermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2709,12 +2638,12 @@ export const de_DeleteStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteStackResult(data, context); + contents = _json(data); const response: DeleteStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2744,10 +2673,9 @@ const de_DeleteStackCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,12 +2693,12 @@ export const de_DeleteUsageReportSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUsageReportSubscriptionResult(data, context); + contents = _json(data); const response: DeleteUsageReportSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2794,10 +2722,9 @@ const de_DeleteUsageReportSubscriptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2815,12 +2742,12 @@ export const de_DeleteUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserResult(data, context); + contents = _json(data); const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2841,10 +2768,9 @@ const de_DeleteUserCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2867,7 +2793,7 @@ export const de_DescribeAppBlocksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2891,10 +2817,9 @@ const de_DescribeAppBlocksCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2912,12 +2837,12 @@ export const de_DescribeApplicationFleetAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeApplicationFleetAssociationsResult(data, context); + contents = _json(data); const response: DescribeApplicationFleetAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2941,10 +2866,9 @@ const de_DescribeApplicationFleetAssociationsCommandError = async ( throw await de_OperationNotPermittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2967,7 +2891,7 @@ export const de_DescribeApplicationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2991,10 +2915,9 @@ const de_DescribeApplicationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3017,7 +2940,7 @@ export const de_DescribeDirectoryConfigsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3038,10 +2961,9 @@ const de_DescribeDirectoryConfigsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3064,7 +2986,7 @@ export const de_DescribeEntitlementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3091,10 +3013,9 @@ const de_DescribeEntitlementsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3117,7 +3038,7 @@ export const de_DescribeFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3138,10 +3059,9 @@ const de_DescribeFleetsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3164,7 +3084,7 @@ export const de_DescribeImageBuildersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3185,10 +3105,9 @@ const de_DescribeImageBuildersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3206,12 +3125,12 @@ export const de_DescribeImagePermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeImagePermissionsResult(data, context); + contents = _json(data); const response: DescribeImagePermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3232,10 +3151,9 @@ const de_DescribeImagePermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3258,7 +3176,7 @@ export const de_DescribeImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3282,10 +3200,9 @@ const de_DescribeImagesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3308,7 +3225,7 @@ export const de_DescribeSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3329,10 +3246,9 @@ const de_DescribeSessionsCommandError = async ( throw await de_InvalidParameterCombinationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3355,7 +3271,7 @@ export const de_DescribeStacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3376,10 +3292,9 @@ const de_DescribeStacksCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3402,7 +3317,7 @@ export const de_DescribeUsageReportSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3426,10 +3341,9 @@ const de_DescribeUsageReportSubscriptionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3452,7 +3366,7 @@ export const de_DescribeUsersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3479,10 +3393,9 @@ const de_DescribeUsersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3500,12 +3413,12 @@ export const de_DescribeUserStackAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeUserStackAssociationsResult(data, context); + contents = _json(data); const response: DescribeUserStackAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3529,10 +3442,9 @@ const de_DescribeUserStackAssociationsCommandError = async ( throw await de_OperationNotPermittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3550,12 +3462,12 @@ export const de_DisableUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableUserResult(data, context); + contents = _json(data); const response: DisableUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3576,10 +3488,9 @@ const de_DisableUserCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3597,12 +3508,12 @@ export const de_DisassociateApplicationFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateApplicationFleetResult(data, context); + contents = _json(data); const response: DisassociateApplicationFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3629,10 +3540,9 @@ const de_DisassociateApplicationFleetCommandError = async ( throw await de_OperationNotPermittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3650,12 +3560,12 @@ export const de_DisassociateApplicationFromEntitlementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateApplicationFromEntitlementResult(data, context); + contents = _json(data); const response: DisassociateApplicationFromEntitlementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3682,10 +3592,9 @@ const de_DisassociateApplicationFromEntitlementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3703,12 +3612,12 @@ export const de_DisassociateFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateFleetResult(data, context); + contents = _json(data); const response: DisassociateFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3738,10 +3647,9 @@ const de_DisassociateFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3759,12 +3667,12 @@ export const de_EnableUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableUserResult(data, context); + contents = _json(data); const response: EnableUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3788,10 +3696,9 @@ const de_EnableUserCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3809,12 +3716,12 @@ export const de_ExpireSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExpireSessionResult(data, context); + contents = _json(data); const response: ExpireSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3830,10 +3737,9 @@ const de_ExpireSessionCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3850,12 +3756,12 @@ export const de_ListAssociatedFleetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssociatedFleetsResult(data, context); + contents = _json(data); const response: ListAssociatedFleetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3871,10 +3777,9 @@ const de_ListAssociatedFleetsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3891,12 +3796,12 @@ export const de_ListAssociatedStacksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssociatedStacksResult(data, context); + contents = _json(data); const response: ListAssociatedStacksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3912,10 +3817,9 @@ const de_ListAssociatedStacksCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3932,12 +3836,12 @@ export const de_ListEntitledApplicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEntitledApplicationsResult(data, context); + contents = _json(data); const response: ListEntitledApplicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3964,10 +3868,9 @@ const de_ListEntitledApplicationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3985,12 +3888,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4011,10 +3914,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4032,12 +3934,12 @@ export const de_StartFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFleetResult(data, context); + contents = _json(data); const response: StartFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4079,10 +3981,9 @@ const de_StartFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4105,7 +4006,7 @@ export const de_StartImageBuilderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4138,10 +4039,9 @@ const de_StartImageBuilderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4159,12 +4059,12 @@ export const de_StopFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopFleetResult(data, context); + contents = _json(data); const response: StopFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4188,10 +4088,9 @@ const de_StopFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4214,7 +4113,7 @@ export const de_StopImageBuilderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4241,10 +4140,9 @@ const de_StopImageBuilderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4262,12 +4160,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4294,10 +4192,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4315,12 +4212,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4341,10 +4238,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4367,7 +4263,7 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4394,10 +4290,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4420,7 +4315,7 @@ export const de_UpdateDirectoryConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4453,10 +4348,9 @@ const de_UpdateDirectoryConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4479,7 +4373,7 @@ export const de_UpdateEntitlementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4509,10 +4403,9 @@ const de_UpdateEntitlementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4535,7 +4428,7 @@ export const de_UpdateFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4586,10 +4479,9 @@ const de_UpdateFleetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4607,12 +4499,12 @@ export const de_UpdateImagePermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateImagePermissionsResult(data, context); + contents = _json(data); const response: UpdateImagePermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4639,10 +4531,9 @@ const de_UpdateImagePermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4665,7 +4556,7 @@ export const de_UpdateStackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4710,10 +4601,9 @@ const de_UpdateStackCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4727,7 +4617,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4743,7 +4633,7 @@ const de_EntitlementAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntitlementAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new EntitlementAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4759,7 +4649,7 @@ const de_EntitlementNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntitlementNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EntitlementNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4775,7 +4665,7 @@ const de_IncompatibleImageExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncompatibleImageException(body, context); + const deserialized: any = _json(body); const exception = new IncompatibleImageException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4791,7 +4681,7 @@ const de_InvalidAccountStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAccountStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAccountStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4807,7 +4697,7 @@ const de_InvalidParameterCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4823,7 +4713,7 @@ const de_InvalidRoleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRoleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRoleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4839,7 +4729,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4855,7 +4745,7 @@ const de_OperationNotPermittedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotPermittedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotPermittedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4871,7 +4761,7 @@ const de_RequestLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new RequestLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4887,7 +4777,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4903,7 +4793,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4919,7 +4809,7 @@ const de_ResourceNotAvailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotAvailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotAvailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4935,7 +4825,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4943,2932 +4833,1004 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccessEndpoint - */ -const se_AccessEndpoint = (input: AccessEndpoint, context: __SerdeContext): any => { - return { - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.VpceId != null && { VpceId: input.VpceId }), - }; -}; +// se_AccessEndpoint omitted. -/** - * serializeAws_json1_1AccessEndpointList - */ -const se_AccessEndpointList = (input: AccessEndpoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AccessEndpoint(entry, context); - }); -}; +// se_AccessEndpointList omitted. -/** - * serializeAws_json1_1ApplicationAttributes - */ -const se_ApplicationAttributes = (input: (ApplicationAttribute | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationAttributes omitted. -/** - * serializeAws_json1_1ApplicationSettings - */ -const se_ApplicationSettings = (input: ApplicationSettings, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.SettingsGroup != null && { SettingsGroup: input.SettingsGroup }), - }; -}; +// se_ApplicationSettings omitted. -/** - * serializeAws_json1_1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArnList omitted. -/** - * serializeAws_json1_1AssociateApplicationFleetRequest - */ -const se_AssociateApplicationFleetRequest = (input: AssociateApplicationFleetRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - ...(input.FleetName != null && { FleetName: input.FleetName }), - }; -}; +// se_AssociateApplicationFleetRequest omitted. -/** - * serializeAws_json1_1AssociateApplicationToEntitlementRequest - */ -const se_AssociateApplicationToEntitlementRequest = ( - input: AssociateApplicationToEntitlementRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationIdentifier != null && { ApplicationIdentifier: input.ApplicationIdentifier }), - ...(input.EntitlementName != null && { EntitlementName: input.EntitlementName }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; +// se_AssociateApplicationToEntitlementRequest omitted. -/** - * serializeAws_json1_1AssociateFleetRequest - */ -const se_AssociateFleetRequest = (input: AssociateFleetRequest, context: __SerdeContext): any => { - return { - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; +// se_AssociateFleetRequest omitted. -/** - * serializeAws_json1_1AwsAccountIdList - */ -const se_AwsAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AwsAccountIdList omitted. -/** - * serializeAws_json1_1BatchAssociateUserStackRequest - */ -const se_BatchAssociateUserStackRequest = (input: BatchAssociateUserStackRequest, context: __SerdeContext): any => { - return { - ...(input.UserStackAssociations != null && { - UserStackAssociations: se_UserStackAssociationList(input.UserStackAssociations, context), - }), - }; -}; +// se_BatchAssociateUserStackRequest omitted. -/** - * serializeAws_json1_1BatchDisassociateUserStackRequest - */ -const se_BatchDisassociateUserStackRequest = ( - input: BatchDisassociateUserStackRequest, - context: __SerdeContext -): any => { - return { - ...(input.UserStackAssociations != null && { - UserStackAssociations: se_UserStackAssociationList(input.UserStackAssociations, context), - }), - }; -}; +// se_BatchDisassociateUserStackRequest omitted. -/** - * serializeAws_json1_1CertificateBasedAuthProperties - */ -const se_CertificateBasedAuthProperties = (input: CertificateBasedAuthProperties, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_CertificateBasedAuthProperties omitted. -/** - * serializeAws_json1_1ComputeCapacity - */ -const se_ComputeCapacity = (input: ComputeCapacity, context: __SerdeContext): any => { - return { - ...(input.DesiredInstances != null && { DesiredInstances: input.DesiredInstances }), - }; -}; +// se_ComputeCapacity omitted. -/** - * serializeAws_json1_1CopyImageRequest - */ -const se_CopyImageRequest = (input: CopyImageRequest, context: __SerdeContext): any => { - return { - ...(input.DestinationImageDescription != null && { - DestinationImageDescription: input.DestinationImageDescription, - }), - ...(input.DestinationImageName != null && { DestinationImageName: input.DestinationImageName }), - ...(input.DestinationRegion != null && { DestinationRegion: input.DestinationRegion }), - ...(input.SourceImageName != null && { SourceImageName: input.SourceImageName }), - }; -}; +// se_CopyImageRequest omitted. -/** - * serializeAws_json1_1CreateAppBlockRequest - */ -const se_CreateAppBlockRequest = (input: CreateAppBlockRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SetupScriptDetails != null && { - SetupScriptDetails: se_ScriptDetails(input.SetupScriptDetails, context), - }), - ...(input.SourceS3Location != null && { SourceS3Location: se_S3Location(input.SourceS3Location, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateAppBlockRequest omitted. -/** - * serializeAws_json1_1CreateApplicationRequest - */ -const se_CreateApplicationRequest = (input: CreateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.AppBlockArn != null && { AppBlockArn: input.AppBlockArn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.IconS3Location != null && { IconS3Location: se_S3Location(input.IconS3Location, context) }), - ...(input.InstanceFamilies != null && { InstanceFamilies: se_StringList(input.InstanceFamilies, context) }), - ...(input.LaunchParameters != null && { LaunchParameters: input.LaunchParameters }), - ...(input.LaunchPath != null && { LaunchPath: input.LaunchPath }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Platforms != null && { Platforms: se_Platforms(input.Platforms, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.WorkingDirectory != null && { WorkingDirectory: input.WorkingDirectory }), - }; -}; +// se_CreateApplicationRequest omitted. -/** - * serializeAws_json1_1CreateDirectoryConfigRequest - */ -const se_CreateDirectoryConfigRequest = (input: CreateDirectoryConfigRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateBasedAuthProperties != null && { - CertificateBasedAuthProperties: se_CertificateBasedAuthProperties(input.CertificateBasedAuthProperties, context), - }), - ...(input.DirectoryName != null && { DirectoryName: input.DirectoryName }), - ...(input.OrganizationalUnitDistinguishedNames != null && { - OrganizationalUnitDistinguishedNames: se_OrganizationalUnitDistinguishedNamesList( - input.OrganizationalUnitDistinguishedNames, - context - ), - }), - ...(input.ServiceAccountCredentials != null && { - ServiceAccountCredentials: se_ServiceAccountCredentials(input.ServiceAccountCredentials, context), - }), - }; -}; +// se_CreateDirectoryConfigRequest omitted. -/** - * serializeAws_json1_1CreateEntitlementRequest - */ -const se_CreateEntitlementRequest = (input: CreateEntitlementRequest, context: __SerdeContext): any => { - return { - ...(input.AppVisibility != null && { AppVisibility: input.AppVisibility }), - ...(input.Attributes != null && { Attributes: se_EntitlementAttributeList(input.Attributes, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; +// se_CreateEntitlementRequest omitted. -/** - * serializeAws_json1_1CreateFleetRequest - */ -const se_CreateFleetRequest = (input: CreateFleetRequest, context: __SerdeContext): any => { - return { - ...(input.ComputeCapacity != null && { ComputeCapacity: se_ComputeCapacity(input.ComputeCapacity, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisconnectTimeoutInSeconds != null && { DisconnectTimeoutInSeconds: input.DisconnectTimeoutInSeconds }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DomainJoinInfo != null && { DomainJoinInfo: se_DomainJoinInfo(input.DomainJoinInfo, context) }), - ...(input.EnableDefaultInternetAccess != null && { - EnableDefaultInternetAccess: input.EnableDefaultInternetAccess, - }), - ...(input.FleetType != null && { FleetType: input.FleetType }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.IdleDisconnectTimeoutInSeconds != null && { - IdleDisconnectTimeoutInSeconds: input.IdleDisconnectTimeoutInSeconds, - }), - ...(input.ImageArn != null && { ImageArn: input.ImageArn }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.MaxConcurrentSessions != null && { MaxConcurrentSessions: input.MaxConcurrentSessions }), - ...(input.MaxUserDurationInSeconds != null && { MaxUserDurationInSeconds: input.MaxUserDurationInSeconds }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Platform != null && { Platform: input.Platform }), - ...(input.SessionScriptS3Location != null && { - SessionScriptS3Location: se_S3Location(input.SessionScriptS3Location, context), - }), - ...(input.StreamView != null && { StreamView: input.StreamView }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.UsbDeviceFilterStrings != null && { - UsbDeviceFilterStrings: se_UsbDeviceFilterStrings(input.UsbDeviceFilterStrings, context), - }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateImageBuilderRequest - */ -const se_CreateImageBuilderRequest = (input: CreateImageBuilderRequest, context: __SerdeContext): any => { - return { - ...(input.AccessEndpoints != null && { AccessEndpoints: se_AccessEndpointList(input.AccessEndpoints, context) }), - ...(input.AppstreamAgentVersion != null && { AppstreamAgentVersion: input.AppstreamAgentVersion }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DomainJoinInfo != null && { DomainJoinInfo: se_DomainJoinInfo(input.DomainJoinInfo, context) }), - ...(input.EnableDefaultInternetAccess != null && { - EnableDefaultInternetAccess: input.EnableDefaultInternetAccess, - }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.ImageArn != null && { ImageArn: input.ImageArn }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; +// se_CreateFleetRequest omitted. -/** - * serializeAws_json1_1CreateImageBuilderStreamingURLRequest - */ -const se_CreateImageBuilderStreamingURLRequest = ( - input: CreateImageBuilderStreamingURLRequest, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Validity != null && { Validity: input.Validity }), - }; -}; +// se_CreateImageBuilderRequest omitted. -/** - * serializeAws_json1_1CreateStackRequest - */ -const se_CreateStackRequest = (input: CreateStackRequest, context: __SerdeContext): any => { - return { - ...(input.AccessEndpoints != null && { AccessEndpoints: se_AccessEndpointList(input.AccessEndpoints, context) }), - ...(input.ApplicationSettings != null && { - ApplicationSettings: se_ApplicationSettings(input.ApplicationSettings, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.EmbedHostDomains != null && { EmbedHostDomains: se_EmbedHostDomains(input.EmbedHostDomains, context) }), - ...(input.FeedbackURL != null && { FeedbackURL: input.FeedbackURL }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedirectURL != null && { RedirectURL: input.RedirectURL }), - ...(input.StorageConnectors != null && { - StorageConnectors: se_StorageConnectorList(input.StorageConnectors, context), - }), - ...(input.StreamingExperienceSettings != null && { - StreamingExperienceSettings: se_StreamingExperienceSettings(input.StreamingExperienceSettings, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.UserSettings != null && { UserSettings: se_UserSettingList(input.UserSettings, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateStreamingURLRequest - */ -const se_CreateStreamingURLRequest = (input: CreateStreamingURLRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.SessionContext != null && { SessionContext: input.SessionContext }), - ...(input.StackName != null && { StackName: input.StackName }), - ...(input.UserId != null && { UserId: input.UserId }), - ...(input.Validity != null && { Validity: input.Validity }), - }; -}; +// se_CreateImageBuilderStreamingURLRequest omitted. -/** - * serializeAws_json1_1CreateUpdatedImageRequest - */ -const se_CreateUpdatedImageRequest = (input: CreateUpdatedImageRequest, context: __SerdeContext): any => { - return { - ...(input.dryRun != null && { dryRun: input.dryRun }), - ...(input.existingImageName != null && { existingImageName: input.existingImageName }), - ...(input.newImageDescription != null && { newImageDescription: input.newImageDescription }), - ...(input.newImageDisplayName != null && { newImageDisplayName: input.newImageDisplayName }), - ...(input.newImageName != null && { newImageName: input.newImageName }), - ...(input.newImageTags != null && { newImageTags: se_Tags(input.newImageTags, context) }), - }; -}; +// se_CreateStackRequest omitted. -/** - * serializeAws_json1_1CreateUsageReportSubscriptionRequest - */ -const se_CreateUsageReportSubscriptionRequest = ( - input: CreateUsageReportSubscriptionRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_CreateStreamingURLRequest omitted. -/** - * serializeAws_json1_1CreateUserRequest - */ -const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.MessageAction != null && { MessageAction: input.MessageAction }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_CreateUpdatedImageRequest omitted. -/** - * serializeAws_json1_1DeleteAppBlockRequest - */ -const se_DeleteAppBlockRequest = (input: DeleteAppBlockRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateUsageReportSubscriptionRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationRequest - */ -const se_DeleteApplicationRequest = (input: DeleteApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateUserRequest omitted. -/** - * serializeAws_json1_1DeleteDirectoryConfigRequest - */ -const se_DeleteDirectoryConfigRequest = (input: DeleteDirectoryConfigRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryName != null && { DirectoryName: input.DirectoryName }), - }; -}; +// se_DeleteAppBlockRequest omitted. -/** - * serializeAws_json1_1DeleteEntitlementRequest - */ -const se_DeleteEntitlementRequest = (input: DeleteEntitlementRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; +// se_DeleteApplicationRequest omitted. -/** - * serializeAws_json1_1DeleteFleetRequest - */ -const se_DeleteFleetRequest = (input: DeleteFleetRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteDirectoryConfigRequest omitted. -/** - * serializeAws_json1_1DeleteImageBuilderRequest - */ -const se_DeleteImageBuilderRequest = (input: DeleteImageBuilderRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteEntitlementRequest omitted. -/** - * serializeAws_json1_1DeleteImagePermissionsRequest - */ -const se_DeleteImagePermissionsRequest = (input: DeleteImagePermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SharedAccountId != null && { SharedAccountId: input.SharedAccountId }), - }; -}; +// se_DeleteFleetRequest omitted. -/** - * serializeAws_json1_1DeleteImageRequest - */ -const se_DeleteImageRequest = (input: DeleteImageRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteImageBuilderRequest omitted. -/** - * serializeAws_json1_1DeleteStackRequest - */ -const se_DeleteStackRequest = (input: DeleteStackRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteImagePermissionsRequest omitted. -/** - * serializeAws_json1_1DeleteUsageReportSubscriptionRequest - */ -const se_DeleteUsageReportSubscriptionRequest = ( - input: DeleteUsageReportSubscriptionRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_DeleteImageRequest omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DeleteStackRequest omitted. -/** - * serializeAws_json1_1DescribeAppBlocksRequest - */ -const se_DescribeAppBlocksRequest = (input: DescribeAppBlocksRequest, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_ArnList(input.Arns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DeleteUsageReportSubscriptionRequest omitted. -/** - * serializeAws_json1_1DescribeApplicationFleetAssociationsRequest - */ -const se_DescribeApplicationFleetAssociationsRequest = ( - input: DescribeApplicationFleetAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DescribeApplicationsRequest - */ -const se_DescribeApplicationsRequest = (input: DescribeApplicationsRequest, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_ArnList(input.Arns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeAppBlocksRequest omitted. -/** - * serializeAws_json1_1DescribeDirectoryConfigsRequest - */ -const se_DescribeDirectoryConfigsRequest = (input: DescribeDirectoryConfigsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryNames != null && { DirectoryNames: se_DirectoryNameList(input.DirectoryNames, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeApplicationFleetAssociationsRequest omitted. -/** - * serializeAws_json1_1DescribeEntitlementsRequest - */ -const se_DescribeEntitlementsRequest = (input: DescribeEntitlementsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; +// se_DescribeApplicationsRequest omitted. -/** - * serializeAws_json1_1DescribeFleetsRequest - */ -const se_DescribeFleetsRequest = (input: DescribeFleetsRequest, context: __SerdeContext): any => { - return { - ...(input.Names != null && { Names: se_StringList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeDirectoryConfigsRequest omitted. -/** - * serializeAws_json1_1DescribeImageBuildersRequest - */ -const se_DescribeImageBuildersRequest = (input: DescribeImageBuildersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Names != null && { Names: se_StringList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeEntitlementsRequest omitted. -/** - * serializeAws_json1_1DescribeImagePermissionsRequest - */ -const se_DescribeImagePermissionsRequest = (input: DescribeImagePermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SharedAwsAccountIds != null && { - SharedAwsAccountIds: se_AwsAccountIdList(input.SharedAwsAccountIds, context), - }), - }; -}; +// se_DescribeFleetsRequest omitted. -/** - * serializeAws_json1_1DescribeImagesRequest - */ -const se_DescribeImagesRequest = (input: DescribeImagesRequest, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_ArnList(input.Arns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Names != null && { Names: se_StringList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribeImageBuildersRequest omitted. -/** - * serializeAws_json1_1DescribeSessionsRequest - */ -const se_DescribeSessionsRequest = (input: DescribeSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StackName != null && { StackName: input.StackName }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_DescribeImagePermissionsRequest omitted. -/** - * serializeAws_json1_1DescribeStacksRequest - */ -const se_DescribeStacksRequest = (input: DescribeStacksRequest, context: __SerdeContext): any => { - return { - ...(input.Names != null && { Names: se_StringList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeImagesRequest omitted. -/** - * serializeAws_json1_1DescribeUsageReportSubscriptionsRequest - */ -const se_DescribeUsageReportSubscriptionsRequest = ( - input: DescribeUsageReportSubscriptionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeSessionsRequest omitted. -/** - * serializeAws_json1_1DescribeUsersRequest - */ -const se_DescribeUsersRequest = (input: DescribeUsersRequest, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeStacksRequest omitted. -/** - * serializeAws_json1_1DescribeUserStackAssociationsRequest - */ -const se_DescribeUserStackAssociationsRequest = ( - input: DescribeUserStackAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StackName != null && { StackName: input.StackName }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DescribeUsageReportSubscriptionsRequest omitted. -/** - * serializeAws_json1_1DirectoryNameList - */ -const se_DirectoryNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeUsersRequest omitted. -/** - * serializeAws_json1_1DisableUserRequest - */ -const se_DisableUserRequest = (input: DisableUserRequest, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; - -/** - * serializeAws_json1_1DisassociateApplicationFleetRequest - */ -const se_DisassociateApplicationFleetRequest = ( - input: DisassociateApplicationFleetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - ...(input.FleetName != null && { FleetName: input.FleetName }), - }; -}; - -/** - * serializeAws_json1_1DisassociateApplicationFromEntitlementRequest - */ -const se_DisassociateApplicationFromEntitlementRequest = ( - input: DisassociateApplicationFromEntitlementRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationIdentifier != null && { ApplicationIdentifier: input.ApplicationIdentifier }), - ...(input.EntitlementName != null && { EntitlementName: input.EntitlementName }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; - -/** - * serializeAws_json1_1DisassociateFleetRequest - */ -const se_DisassociateFleetRequest = (input: DisassociateFleetRequest, context: __SerdeContext): any => { - return { - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; - -/** - * serializeAws_json1_1DomainJoinInfo - */ -const se_DomainJoinInfo = (input: DomainJoinInfo, context: __SerdeContext): any => { - return { - ...(input.DirectoryName != null && { DirectoryName: input.DirectoryName }), - ...(input.OrganizationalUnitDistinguishedName != null && { - OrganizationalUnitDistinguishedName: input.OrganizationalUnitDistinguishedName, - }), - }; -}; - -/** - * serializeAws_json1_1DomainList - */ -const se_DomainList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1EmbedHostDomains - */ -const se_EmbedHostDomains = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1EnableUserRequest - */ -const se_EnableUserRequest = (input: EnableUserRequest, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; - -/** - * serializeAws_json1_1EntitlementAttribute - */ -const se_EntitlementAttribute = (input: EntitlementAttribute, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1EntitlementAttributeList - */ -const se_EntitlementAttributeList = (input: EntitlementAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntitlementAttribute(entry, context); - }); -}; - -/** - * serializeAws_json1_1ExpireSessionRequest - */ -const se_ExpireSessionRequest = (input: ExpireSessionRequest, context: __SerdeContext): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1FleetAttributes - */ -const se_FleetAttributes = (input: (FleetAttribute | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ImagePermissions - */ -const se_ImagePermissions = (input: ImagePermissions, context: __SerdeContext): any => { - return { - ...(input.allowFleet != null && { allowFleet: input.allowFleet }), - ...(input.allowImageBuilder != null && { allowImageBuilder: input.allowImageBuilder }), - }; -}; - -/** - * serializeAws_json1_1ListAssociatedFleetsRequest - */ -const se_ListAssociatedFleetsRequest = (input: ListAssociatedFleetsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; - -/** - * serializeAws_json1_1ListAssociatedStacksRequest - */ -const se_ListAssociatedStacksRequest = (input: ListAssociatedStacksRequest, context: __SerdeContext): any => { - return { - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEntitledApplicationsRequest - */ -const se_ListEntitledApplicationsRequest = (input: ListEntitledApplicationsRequest, context: __SerdeContext): any => { - return { - ...(input.EntitlementName != null && { EntitlementName: input.EntitlementName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1OrganizationalUnitDistinguishedNamesList - */ -const se_OrganizationalUnitDistinguishedNamesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Platforms - */ -const se_Platforms = (input: (PlatformType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - }; -}; - -/** - * serializeAws_json1_1ScriptDetails - */ -const se_ScriptDetails = (input: ScriptDetails, context: __SerdeContext): any => { - return { - ...(input.ExecutableParameters != null && { ExecutableParameters: input.ExecutableParameters }), - ...(input.ExecutablePath != null && { ExecutablePath: input.ExecutablePath }), - ...(input.ScriptS3Location != null && { ScriptS3Location: se_S3Location(input.ScriptS3Location, context) }), - ...(input.TimeoutInSeconds != null && { TimeoutInSeconds: input.TimeoutInSeconds }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ServiceAccountCredentials - */ -const se_ServiceAccountCredentials = (input: ServiceAccountCredentials, context: __SerdeContext): any => { - return { - ...(input.AccountName != null && { AccountName: input.AccountName }), - ...(input.AccountPassword != null && { AccountPassword: input.AccountPassword }), - }; -}; - -/** - * serializeAws_json1_1StackAttributes - */ -const se_StackAttributes = (input: (StackAttribute | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StartFleetRequest - */ -const se_StartFleetRequest = (input: StartFleetRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StartImageBuilderRequest - */ -const se_StartImageBuilderRequest = (input: StartImageBuilderRequest, context: __SerdeContext): any => { - return { - ...(input.AppstreamAgentVersion != null && { AppstreamAgentVersion: input.AppstreamAgentVersion }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StopFleetRequest - */ -const se_StopFleetRequest = (input: StopFleetRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StopImageBuilderRequest - */ -const se_StopImageBuilderRequest = (input: StopImageBuilderRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StorageConnector - */ -const se_StorageConnector = (input: StorageConnector, context: __SerdeContext): any => { - return { - ...(input.ConnectorType != null && { ConnectorType: input.ConnectorType }), - ...(input.Domains != null && { Domains: se_DomainList(input.Domains, context) }), - ...(input.ResourceIdentifier != null && { ResourceIdentifier: input.ResourceIdentifier }), - }; -}; - -/** - * serializeAws_json1_1StorageConnectorList - */ -const se_StorageConnectorList = (input: StorageConnector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StorageConnector(entry, context); - }); -}; - -/** - * serializeAws_json1_1StreamingExperienceSettings - */ -const se_StreamingExperienceSettings = (input: StreamingExperienceSettings, context: __SerdeContext): any => { - return { - ...(input.PreferredProtocol != null && { PreferredProtocol: input.PreferredProtocol }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateApplicationRequest - */ -const se_UpdateApplicationRequest = (input: UpdateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.AppBlockArn != null && { AppBlockArn: input.AppBlockArn }), - ...(input.AttributesToDelete != null && { - AttributesToDelete: se_ApplicationAttributes(input.AttributesToDelete, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.IconS3Location != null && { IconS3Location: se_S3Location(input.IconS3Location, context) }), - ...(input.LaunchParameters != null && { LaunchParameters: input.LaunchParameters }), - ...(input.LaunchPath != null && { LaunchPath: input.LaunchPath }), - ...(input.Name != null && { Name: input.Name }), - ...(input.WorkingDirectory != null && { WorkingDirectory: input.WorkingDirectory }), - }; -}; - -/** - * serializeAws_json1_1UpdateDirectoryConfigRequest - */ -const se_UpdateDirectoryConfigRequest = (input: UpdateDirectoryConfigRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateBasedAuthProperties != null && { - CertificateBasedAuthProperties: se_CertificateBasedAuthProperties(input.CertificateBasedAuthProperties, context), - }), - ...(input.DirectoryName != null && { DirectoryName: input.DirectoryName }), - ...(input.OrganizationalUnitDistinguishedNames != null && { - OrganizationalUnitDistinguishedNames: se_OrganizationalUnitDistinguishedNamesList( - input.OrganizationalUnitDistinguishedNames, - context - ), - }), - ...(input.ServiceAccountCredentials != null && { - ServiceAccountCredentials: se_ServiceAccountCredentials(input.ServiceAccountCredentials, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateEntitlementRequest - */ -const se_UpdateEntitlementRequest = (input: UpdateEntitlementRequest, context: __SerdeContext): any => { - return { - ...(input.AppVisibility != null && { AppVisibility: input.AppVisibility }), - ...(input.Attributes != null && { Attributes: se_EntitlementAttributeList(input.Attributes, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StackName != null && { StackName: input.StackName }), - }; -}; - -/** - * serializeAws_json1_1UpdateFleetRequest - */ -const se_UpdateFleetRequest = (input: UpdateFleetRequest, context: __SerdeContext): any => { - return { - ...(input.AttributesToDelete != null && { - AttributesToDelete: se_FleetAttributes(input.AttributesToDelete, context), - }), - ...(input.ComputeCapacity != null && { ComputeCapacity: se_ComputeCapacity(input.ComputeCapacity, context) }), - ...(input.DeleteVpcConfig != null && { DeleteVpcConfig: input.DeleteVpcConfig }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisconnectTimeoutInSeconds != null && { DisconnectTimeoutInSeconds: input.DisconnectTimeoutInSeconds }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DomainJoinInfo != null && { DomainJoinInfo: se_DomainJoinInfo(input.DomainJoinInfo, context) }), - ...(input.EnableDefaultInternetAccess != null && { - EnableDefaultInternetAccess: input.EnableDefaultInternetAccess, - }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.IdleDisconnectTimeoutInSeconds != null && { - IdleDisconnectTimeoutInSeconds: input.IdleDisconnectTimeoutInSeconds, - }), - ...(input.ImageArn != null && { ImageArn: input.ImageArn }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.MaxConcurrentSessions != null && { MaxConcurrentSessions: input.MaxConcurrentSessions }), - ...(input.MaxUserDurationInSeconds != null && { MaxUserDurationInSeconds: input.MaxUserDurationInSeconds }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Platform != null && { Platform: input.Platform }), - ...(input.SessionScriptS3Location != null && { - SessionScriptS3Location: se_S3Location(input.SessionScriptS3Location, context), - }), - ...(input.StreamView != null && { StreamView: input.StreamView }), - ...(input.UsbDeviceFilterStrings != null && { - UsbDeviceFilterStrings: se_UsbDeviceFilterStrings(input.UsbDeviceFilterStrings, context), - }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateImagePermissionsRequest - */ -const se_UpdateImagePermissionsRequest = (input: UpdateImagePermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.ImagePermissions != null && { ImagePermissions: se_ImagePermissions(input.ImagePermissions, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SharedAccountId != null && { SharedAccountId: input.SharedAccountId }), - }; -}; - -/** - * serializeAws_json1_1UpdateStackRequest - */ -const se_UpdateStackRequest = (input: UpdateStackRequest, context: __SerdeContext): any => { - return { - ...(input.AccessEndpoints != null && { AccessEndpoints: se_AccessEndpointList(input.AccessEndpoints, context) }), - ...(input.ApplicationSettings != null && { - ApplicationSettings: se_ApplicationSettings(input.ApplicationSettings, context), - }), - ...(input.AttributesToDelete != null && { - AttributesToDelete: se_StackAttributes(input.AttributesToDelete, context), - }), - ...(input.DeleteStorageConnectors != null && { DeleteStorageConnectors: input.DeleteStorageConnectors }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.EmbedHostDomains != null && { EmbedHostDomains: se_EmbedHostDomains(input.EmbedHostDomains, context) }), - ...(input.FeedbackURL != null && { FeedbackURL: input.FeedbackURL }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedirectURL != null && { RedirectURL: input.RedirectURL }), - ...(input.StorageConnectors != null && { - StorageConnectors: se_StorageConnectorList(input.StorageConnectors, context), - }), - ...(input.StreamingExperienceSettings != null && { - StreamingExperienceSettings: se_StreamingExperienceSettings(input.StreamingExperienceSettings, context), - }), - ...(input.UserSettings != null && { UserSettings: se_UserSettingList(input.UserSettings, context) }), - }; -}; - -/** - * serializeAws_json1_1UsbDeviceFilterStrings - */ -const se_UsbDeviceFilterStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UserSetting - */ -const se_UserSetting = (input: UserSetting, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Permission != null && { Permission: input.Permission }), - }; -}; - -/** - * serializeAws_json1_1UserSettingList - */ -const se_UserSettingList = (input: UserSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UserSetting(entry, context); - }); -}; - -/** - * serializeAws_json1_1UserStackAssociation - */ -const se_UserStackAssociation = (input: UserStackAssociation, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.SendEmailNotification != null && { SendEmailNotification: input.SendEmailNotification }), - ...(input.StackName != null && { StackName: input.StackName }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; - -/** - * serializeAws_json1_1UserStackAssociationList - */ -const se_UserStackAssociationList = (input: UserStackAssociation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UserStackAssociation(entry, context); - }); -}; - -/** - * serializeAws_json1_1VpcConfig - */ -const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdList(input.SecurityGroupIds, context), - }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdList(input.SubnetIds, context) }), - }; -}; - -/** - * deserializeAws_json1_1AccessEndpoint - */ -const de_AccessEndpoint = (output: any, context: __SerdeContext): AccessEndpoint => { - return { - EndpointType: __expectString(output.EndpointType), - VpceId: __expectString(output.VpceId), - } as any; -}; - -/** - * deserializeAws_json1_1AccessEndpointList - */ -const de_AccessEndpointList = (output: any, context: __SerdeContext): AccessEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessEndpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AppBlock - */ -const de_AppBlock = (output: any, context: __SerdeContext): AppBlock => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - Name: __expectString(output.Name), - SetupScriptDetails: - output.SetupScriptDetails != null ? de_ScriptDetails(output.SetupScriptDetails, context) : undefined, - SourceS3Location: output.SourceS3Location != null ? de_S3Location(output.SourceS3Location, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AppBlocks - */ -const de_AppBlocks = (output: any, context: __SerdeContext): AppBlock[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppBlock(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Application - */ -const de_Application = (output: any, context: __SerdeContext): Application => { - return { - AppBlockArn: __expectString(output.AppBlockArn), - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - Enabled: __expectBoolean(output.Enabled), - IconS3Location: output.IconS3Location != null ? de_S3Location(output.IconS3Location, context) : undefined, - IconURL: __expectString(output.IconURL), - InstanceFamilies: output.InstanceFamilies != null ? de_StringList(output.InstanceFamilies, context) : undefined, - LaunchParameters: __expectString(output.LaunchParameters), - LaunchPath: __expectString(output.LaunchPath), - Metadata: output.Metadata != null ? de_Metadata(output.Metadata, context) : undefined, - Name: __expectString(output.Name), - Platforms: output.Platforms != null ? de_Platforms(output.Platforms, context) : undefined, - WorkingDirectory: __expectString(output.WorkingDirectory), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationFleetAssociation - */ -const de_ApplicationFleetAssociation = (output: any, context: __SerdeContext): ApplicationFleetAssociation => { - return { - ApplicationArn: __expectString(output.ApplicationArn), - FleetName: __expectString(output.FleetName), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationFleetAssociationList - */ -const de_ApplicationFleetAssociationList = (output: any, context: __SerdeContext): ApplicationFleetAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationFleetAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Applications - */ -const de_Applications = (output: any, context: __SerdeContext): Application[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Application(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApplicationSettingsResponse - */ -const de_ApplicationSettingsResponse = (output: any, context: __SerdeContext): ApplicationSettingsResponse => { - return { - Enabled: __expectBoolean(output.Enabled), - S3BucketName: __expectString(output.S3BucketName), - SettingsGroup: __expectString(output.SettingsGroup), - } as any; -}; - -/** - * deserializeAws_json1_1AssociateApplicationFleetResult - */ -const de_AssociateApplicationFleetResult = (output: any, context: __SerdeContext): AssociateApplicationFleetResult => { - return { - ApplicationFleetAssociation: - output.ApplicationFleetAssociation != null - ? de_ApplicationFleetAssociation(output.ApplicationFleetAssociation, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociateApplicationToEntitlementResult - */ -const de_AssociateApplicationToEntitlementResult = ( - output: any, - context: __SerdeContext -): AssociateApplicationToEntitlementResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateFleetResult - */ -const de_AssociateFleetResult = (output: any, context: __SerdeContext): AssociateFleetResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1BatchAssociateUserStackResult - */ -const de_BatchAssociateUserStackResult = (output: any, context: __SerdeContext): BatchAssociateUserStackResult => { - return { - errors: output.errors != null ? de_UserStackAssociationErrorList(output.errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDisassociateUserStackResult - */ -const de_BatchDisassociateUserStackResult = ( - output: any, - context: __SerdeContext -): BatchDisassociateUserStackResult => { - return { - errors: output.errors != null ? de_UserStackAssociationErrorList(output.errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CertificateBasedAuthProperties - */ -const de_CertificateBasedAuthProperties = (output: any, context: __SerdeContext): CertificateBasedAuthProperties => { - return { - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ComputeCapacityStatus - */ -const de_ComputeCapacityStatus = (output: any, context: __SerdeContext): ComputeCapacityStatus => { - return { - Available: __expectInt32(output.Available), - Desired: __expectInt32(output.Desired), - InUse: __expectInt32(output.InUse), - Running: __expectInt32(output.Running), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CopyImageResponse - */ -const de_CopyImageResponse = (output: any, context: __SerdeContext): CopyImageResponse => { - return { - DestinationImageName: __expectString(output.DestinationImageName), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAppBlockResult - */ -const de_CreateAppBlockResult = (output: any, context: __SerdeContext): CreateAppBlockResult => { - return { - AppBlock: output.AppBlock != null ? de_AppBlock(output.AppBlock, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateApplicationResult - */ -const de_CreateApplicationResult = (output: any, context: __SerdeContext): CreateApplicationResult => { - return { - Application: output.Application != null ? de_Application(output.Application, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDirectoryConfigResult - */ -const de_CreateDirectoryConfigResult = (output: any, context: __SerdeContext): CreateDirectoryConfigResult => { - return { - DirectoryConfig: output.DirectoryConfig != null ? de_DirectoryConfig(output.DirectoryConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateEntitlementResult - */ -const de_CreateEntitlementResult = (output: any, context: __SerdeContext): CreateEntitlementResult => { - return { - Entitlement: output.Entitlement != null ? de_Entitlement(output.Entitlement, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateFleetResult - */ -const de_CreateFleetResult = (output: any, context: __SerdeContext): CreateFleetResult => { - return { - Fleet: output.Fleet != null ? de_Fleet(output.Fleet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateImageBuilderResult - */ -const de_CreateImageBuilderResult = (output: any, context: __SerdeContext): CreateImageBuilderResult => { - return { - ImageBuilder: output.ImageBuilder != null ? de_ImageBuilder(output.ImageBuilder, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateImageBuilderStreamingURLResult - */ -const de_CreateImageBuilderStreamingURLResult = ( - output: any, - context: __SerdeContext -): CreateImageBuilderStreamingURLResult => { - return { - Expires: - output.Expires != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Expires))) : undefined, - StreamingURL: __expectString(output.StreamingURL), - } as any; -}; - -/** - * deserializeAws_json1_1CreateStackResult - */ -const de_CreateStackResult = (output: any, context: __SerdeContext): CreateStackResult => { - return { - Stack: output.Stack != null ? de_Stack(output.Stack, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateStreamingURLResult - */ -const de_CreateStreamingURLResult = (output: any, context: __SerdeContext): CreateStreamingURLResult => { - return { - Expires: - output.Expires != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Expires))) : undefined, - StreamingURL: __expectString(output.StreamingURL), - } as any; -}; - -/** - * deserializeAws_json1_1CreateUpdatedImageResult - */ -const de_CreateUpdatedImageResult = (output: any, context: __SerdeContext): CreateUpdatedImageResult => { - return { - canUpdateImage: __expectBoolean(output.canUpdateImage), - image: output.image != null ? de_Image(output.image, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateUsageReportSubscriptionResult - */ -const de_CreateUsageReportSubscriptionResult = ( - output: any, - context: __SerdeContext -): CreateUsageReportSubscriptionResult => { - return { - S3BucketName: __expectString(output.S3BucketName), - Schedule: __expectString(output.Schedule), - } as any; -}; +// se_DescribeUserStackAssociationsRequest omitted. -/** - * deserializeAws_json1_1CreateUserResult - */ -const de_CreateUserResult = (output: any, context: __SerdeContext): CreateUserResult => { - return {} as any; -}; +// se_DirectoryNameList omitted. -/** - * deserializeAws_json1_1DeleteAppBlockResult - */ -const de_DeleteAppBlockResult = (output: any, context: __SerdeContext): DeleteAppBlockResult => { - return {} as any; -}; +// se_DisableUserRequest omitted. -/** - * deserializeAws_json1_1DeleteApplicationResult - */ -const de_DeleteApplicationResult = (output: any, context: __SerdeContext): DeleteApplicationResult => { - return {} as any; -}; +// se_DisassociateApplicationFleetRequest omitted. -/** - * deserializeAws_json1_1DeleteDirectoryConfigResult - */ -const de_DeleteDirectoryConfigResult = (output: any, context: __SerdeContext): DeleteDirectoryConfigResult => { - return {} as any; -}; +// se_DisassociateApplicationFromEntitlementRequest omitted. -/** - * deserializeAws_json1_1DeleteEntitlementResult - */ -const de_DeleteEntitlementResult = (output: any, context: __SerdeContext): DeleteEntitlementResult => { - return {} as any; -}; +// se_DisassociateFleetRequest omitted. -/** - * deserializeAws_json1_1DeleteFleetResult - */ -const de_DeleteFleetResult = (output: any, context: __SerdeContext): DeleteFleetResult => { - return {} as any; -}; +// se_DomainJoinInfo omitted. -/** - * deserializeAws_json1_1DeleteImageBuilderResult - */ -const de_DeleteImageBuilderResult = (output: any, context: __SerdeContext): DeleteImageBuilderResult => { - return { - ImageBuilder: output.ImageBuilder != null ? de_ImageBuilder(output.ImageBuilder, context) : undefined, - } as any; -}; +// se_DomainList omitted. -/** - * deserializeAws_json1_1DeleteImagePermissionsResult - */ -const de_DeleteImagePermissionsResult = (output: any, context: __SerdeContext): DeleteImagePermissionsResult => { - return {} as any; -}; +// se_EmbedHostDomains omitted. -/** - * deserializeAws_json1_1DeleteImageResult - */ -const de_DeleteImageResult = (output: any, context: __SerdeContext): DeleteImageResult => { - return { - Image: output.Image != null ? de_Image(output.Image, context) : undefined, - } as any; -}; +// se_EnableUserRequest omitted. -/** - * deserializeAws_json1_1DeleteStackResult - */ -const de_DeleteStackResult = (output: any, context: __SerdeContext): DeleteStackResult => { - return {} as any; -}; +// se_EntitlementAttribute omitted. -/** - * deserializeAws_json1_1DeleteUsageReportSubscriptionResult - */ -const de_DeleteUsageReportSubscriptionResult = ( - output: any, - context: __SerdeContext -): DeleteUsageReportSubscriptionResult => { - return {} as any; -}; +// se_EntitlementAttributeList omitted. -/** - * deserializeAws_json1_1DeleteUserResult - */ -const de_DeleteUserResult = (output: any, context: __SerdeContext): DeleteUserResult => { - return {} as any; -}; +// se_ExpireSessionRequest omitted. -/** - * deserializeAws_json1_1DescribeAppBlocksResult - */ -const de_DescribeAppBlocksResult = (output: any, context: __SerdeContext): DescribeAppBlocksResult => { - return { - AppBlocks: output.AppBlocks != null ? de_AppBlocks(output.AppBlocks, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_FleetAttributes omitted. -/** - * deserializeAws_json1_1DescribeApplicationFleetAssociationsResult - */ -const de_DescribeApplicationFleetAssociationsResult = ( - output: any, - context: __SerdeContext -): DescribeApplicationFleetAssociationsResult => { - return { - ApplicationFleetAssociations: - output.ApplicationFleetAssociations != null - ? de_ApplicationFleetAssociationList(output.ApplicationFleetAssociations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ImagePermissions omitted. -/** - * deserializeAws_json1_1DescribeApplicationsResult - */ -const de_DescribeApplicationsResult = (output: any, context: __SerdeContext): DescribeApplicationsResult => { - return { - Applications: output.Applications != null ? de_Applications(output.Applications, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListAssociatedFleetsRequest omitted. -/** - * deserializeAws_json1_1DescribeDirectoryConfigsResult - */ -const de_DescribeDirectoryConfigsResult = (output: any, context: __SerdeContext): DescribeDirectoryConfigsResult => { - return { - DirectoryConfigs: - output.DirectoryConfigs != null ? de_DirectoryConfigList(output.DirectoryConfigs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListAssociatedStacksRequest omitted. -/** - * deserializeAws_json1_1DescribeEntitlementsResult - */ -const de_DescribeEntitlementsResult = (output: any, context: __SerdeContext): DescribeEntitlementsResult => { - return { - Entitlements: output.Entitlements != null ? de_EntitlementList(output.Entitlements, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListEntitledApplicationsRequest omitted. -/** - * deserializeAws_json1_1DescribeFleetsResult - */ -const de_DescribeFleetsResult = (output: any, context: __SerdeContext): DescribeFleetsResult => { - return { - Fleets: output.Fleets != null ? de_FleetList(output.Fleets, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListTagsForResourceRequest omitted. -/** - * deserializeAws_json1_1DescribeImageBuildersResult - */ -const de_DescribeImageBuildersResult = (output: any, context: __SerdeContext): DescribeImageBuildersResult => { - return { - ImageBuilders: output.ImageBuilders != null ? de_ImageBuilderList(output.ImageBuilders, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_OrganizationalUnitDistinguishedNamesList omitted. -/** - * deserializeAws_json1_1DescribeImagePermissionsResult - */ -const de_DescribeImagePermissionsResult = (output: any, context: __SerdeContext): DescribeImagePermissionsResult => { - return { - Name: __expectString(output.Name), - NextToken: __expectString(output.NextToken), - SharedImagePermissionsList: - output.SharedImagePermissionsList != null - ? de_SharedImagePermissionsList(output.SharedImagePermissionsList, context) - : undefined, - } as any; -}; +// se_Platforms omitted. -/** - * deserializeAws_json1_1DescribeImagesResult - */ -const de_DescribeImagesResult = (output: any, context: __SerdeContext): DescribeImagesResult => { - return { - Images: output.Images != null ? de_ImageList(output.Images, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_S3Location omitted. -/** - * deserializeAws_json1_1DescribeSessionsResult - */ -const de_DescribeSessionsResult = (output: any, context: __SerdeContext): DescribeSessionsResult => { - return { - NextToken: __expectString(output.NextToken), - Sessions: output.Sessions != null ? de_SessionList(output.Sessions, context) : undefined, - } as any; -}; +// se_ScriptDetails omitted. -/** - * deserializeAws_json1_1DescribeStacksResult - */ -const de_DescribeStacksResult = (output: any, context: __SerdeContext): DescribeStacksResult => { - return { - NextToken: __expectString(output.NextToken), - Stacks: output.Stacks != null ? de_StackList(output.Stacks, context) : undefined, - } as any; -}; +// se_SecurityGroupIdList omitted. -/** - * deserializeAws_json1_1DescribeUsageReportSubscriptionsResult - */ -const de_DescribeUsageReportSubscriptionsResult = ( - output: any, - context: __SerdeContext -): DescribeUsageReportSubscriptionsResult => { - return { - NextToken: __expectString(output.NextToken), - UsageReportSubscriptions: - output.UsageReportSubscriptions != null - ? de_UsageReportSubscriptionList(output.UsageReportSubscriptions, context) - : undefined, - } as any; -}; +// se_ServiceAccountCredentials omitted. -/** - * deserializeAws_json1_1DescribeUsersResult - */ -const de_DescribeUsersResult = (output: any, context: __SerdeContext): DescribeUsersResult => { - return { - NextToken: __expectString(output.NextToken), - Users: output.Users != null ? de_UserList(output.Users, context) : undefined, - } as any; -}; +// se_StackAttributes omitted. -/** - * deserializeAws_json1_1DescribeUserStackAssociationsResult - */ -const de_DescribeUserStackAssociationsResult = ( - output: any, - context: __SerdeContext -): DescribeUserStackAssociationsResult => { - return { - NextToken: __expectString(output.NextToken), - UserStackAssociations: - output.UserStackAssociations != null - ? de_UserStackAssociationList(output.UserStackAssociations, context) - : undefined, - } as any; -}; +// se_StartFleetRequest omitted. -/** - * deserializeAws_json1_1DirectoryConfig - */ -const de_DirectoryConfig = (output: any, context: __SerdeContext): DirectoryConfig => { - return { - CertificateBasedAuthProperties: - output.CertificateBasedAuthProperties != null - ? de_CertificateBasedAuthProperties(output.CertificateBasedAuthProperties, context) - : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DirectoryName: __expectString(output.DirectoryName), - OrganizationalUnitDistinguishedNames: - output.OrganizationalUnitDistinguishedNames != null - ? de_OrganizationalUnitDistinguishedNamesList(output.OrganizationalUnitDistinguishedNames, context) - : undefined, - ServiceAccountCredentials: - output.ServiceAccountCredentials != null - ? de_ServiceAccountCredentials(output.ServiceAccountCredentials, context) - : undefined, - } as any; -}; +// se_StartImageBuilderRequest omitted. -/** - * deserializeAws_json1_1DirectoryConfigList - */ -const de_DirectoryConfigList = (output: any, context: __SerdeContext): DirectoryConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DirectoryConfig(entry, context); - }); - return retVal; -}; +// se_StopFleetRequest omitted. -/** - * deserializeAws_json1_1DisableUserResult - */ -const de_DisableUserResult = (output: any, context: __SerdeContext): DisableUserResult => { - return {} as any; -}; +// se_StopImageBuilderRequest omitted. -/** - * deserializeAws_json1_1DisassociateApplicationFleetResult - */ -const de_DisassociateApplicationFleetResult = ( - output: any, - context: __SerdeContext -): DisassociateApplicationFleetResult => { - return {} as any; -}; +// se_StorageConnector omitted. -/** - * deserializeAws_json1_1DisassociateApplicationFromEntitlementResult - */ -const de_DisassociateApplicationFromEntitlementResult = ( - output: any, - context: __SerdeContext -): DisassociateApplicationFromEntitlementResult => { - return {} as any; -}; +// se_StorageConnectorList omitted. -/** - * deserializeAws_json1_1DisassociateFleetResult - */ -const de_DisassociateFleetResult = (output: any, context: __SerdeContext): DisassociateFleetResult => { - return {} as any; -}; +// se_StreamingExperienceSettings omitted. -/** - * deserializeAws_json1_1DomainJoinInfo - */ -const de_DomainJoinInfo = (output: any, context: __SerdeContext): DomainJoinInfo => { - return { - DirectoryName: __expectString(output.DirectoryName), - OrganizationalUnitDistinguishedName: __expectString(output.OrganizationalUnitDistinguishedName), - } as any; -}; +// se_StringList omitted. -/** - * deserializeAws_json1_1DomainList - */ -const de_DomainList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SubnetIdList omitted. -/** - * deserializeAws_json1_1EmbedHostDomains - */ -const de_EmbedHostDomains = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1EnableUserResult - */ -const de_EnableUserResult = (output: any, context: __SerdeContext): EnableUserResult => { - return {} as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1EntitledApplication - */ -const de_EntitledApplication = (output: any, context: __SerdeContext): EntitledApplication => { - return { - ApplicationIdentifier: __expectString(output.ApplicationIdentifier), - } as any; -}; +// se_Tags omitted. -/** - * deserializeAws_json1_1EntitledApplicationList - */ -const de_EntitledApplicationList = (output: any, context: __SerdeContext): EntitledApplication[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntitledApplication(entry, context); - }); - return retVal; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1Entitlement - */ -const de_Entitlement = (output: any, context: __SerdeContext): Entitlement => { - return { - AppVisibility: __expectString(output.AppVisibility), - Attributes: output.Attributes != null ? de_EntitlementAttributeList(output.Attributes, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - StackName: __expectString(output.StackName), - } as any; -}; - -/** - * deserializeAws_json1_1EntitlementAlreadyExistsException - */ -const de_EntitlementAlreadyExistsException = ( - output: any, - context: __SerdeContext -): EntitlementAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateApplicationRequest omitted. -/** - * deserializeAws_json1_1EntitlementAttribute - */ -const de_EntitlementAttribute = (output: any, context: __SerdeContext): EntitlementAttribute => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// se_UpdateDirectoryConfigRequest omitted. -/** - * deserializeAws_json1_1EntitlementAttributeList - */ -const de_EntitlementAttributeList = (output: any, context: __SerdeContext): EntitlementAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntitlementAttribute(entry, context); - }); - return retVal; -}; +// se_UpdateEntitlementRequest omitted. -/** - * deserializeAws_json1_1EntitlementList - */ -const de_EntitlementList = (output: any, context: __SerdeContext): Entitlement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Entitlement(entry, context); - }); - return retVal; -}; +// se_UpdateFleetRequest omitted. -/** - * deserializeAws_json1_1EntitlementNotFoundException - */ -const de_EntitlementNotFoundException = (output: any, context: __SerdeContext): EntitlementNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateImagePermissionsRequest omitted. -/** - * deserializeAws_json1_1ExpireSessionResult - */ -const de_ExpireSessionResult = (output: any, context: __SerdeContext): ExpireSessionResult => { - return {} as any; -}; +// se_UpdateStackRequest omitted. -/** - * deserializeAws_json1_1Fleet - */ -const de_Fleet = (output: any, context: __SerdeContext): Fleet => { - return { - Arn: __expectString(output.Arn), - ComputeCapacityStatus: - output.ComputeCapacityStatus != null - ? de_ComputeCapacityStatus(output.ComputeCapacityStatus, context) - : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisconnectTimeoutInSeconds: __expectInt32(output.DisconnectTimeoutInSeconds), - DisplayName: __expectString(output.DisplayName), - DomainJoinInfo: output.DomainJoinInfo != null ? de_DomainJoinInfo(output.DomainJoinInfo, context) : undefined, - EnableDefaultInternetAccess: __expectBoolean(output.EnableDefaultInternetAccess), - FleetErrors: output.FleetErrors != null ? de_FleetErrors(output.FleetErrors, context) : undefined, - FleetType: __expectString(output.FleetType), - IamRoleArn: __expectString(output.IamRoleArn), - IdleDisconnectTimeoutInSeconds: __expectInt32(output.IdleDisconnectTimeoutInSeconds), - ImageArn: __expectString(output.ImageArn), - ImageName: __expectString(output.ImageName), - InstanceType: __expectString(output.InstanceType), - MaxConcurrentSessions: __expectInt32(output.MaxConcurrentSessions), - MaxUserDurationInSeconds: __expectInt32(output.MaxUserDurationInSeconds), - Name: __expectString(output.Name), - Platform: __expectString(output.Platform), - SessionScriptS3Location: - output.SessionScriptS3Location != null ? de_S3Location(output.SessionScriptS3Location, context) : undefined, - State: __expectString(output.State), - StreamView: __expectString(output.StreamView), - UsbDeviceFilterStrings: - output.UsbDeviceFilterStrings != null - ? de_UsbDeviceFilterStrings(output.UsbDeviceFilterStrings, context) - : undefined, - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FleetError - */ -const de_FleetError = (output: any, context: __SerdeContext): FleetError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; +// se_UsbDeviceFilterStrings omitted. -/** - * deserializeAws_json1_1FleetErrors - */ -const de_FleetErrors = (output: any, context: __SerdeContext): FleetError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetError(entry, context); - }); - return retVal; -}; +// se_UserSetting omitted. -/** - * deserializeAws_json1_1FleetList - */ -const de_FleetList = (output: any, context: __SerdeContext): Fleet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Fleet(entry, context); - }); - return retVal; -}; +// se_UserSettingList omitted. -/** - * deserializeAws_json1_1Image - */ -const de_Image = (output: any, context: __SerdeContext): Image => { - return { - Applications: output.Applications != null ? de_Applications(output.Applications, context) : undefined, - AppstreamAgentVersion: __expectString(output.AppstreamAgentVersion), - Arn: __expectString(output.Arn), - BaseImageArn: __expectString(output.BaseImageArn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - ImageBuilderName: __expectString(output.ImageBuilderName), - ImageBuilderSupported: __expectBoolean(output.ImageBuilderSupported), - ImageErrors: output.ImageErrors != null ? de_ResourceErrors(output.ImageErrors, context) : undefined, - ImagePermissions: - output.ImagePermissions != null ? de_ImagePermissions(output.ImagePermissions, context) : undefined, - Name: __expectString(output.Name), - Platform: __expectString(output.Platform), - PublicBaseImageReleasedDate: - output.PublicBaseImageReleasedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PublicBaseImageReleasedDate))) - : undefined, - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null ? de_ImageStateChangeReason(output.StateChangeReason, context) : undefined, - Visibility: __expectString(output.Visibility), - } as any; -}; +// se_UserStackAssociation omitted. + +// se_UserStackAssociationList omitted. + +// se_VpcConfig omitted. + +// de_AccessEndpoint omitted. + +// de_AccessEndpointList omitted. /** - * deserializeAws_json1_1ImageBuilder + * deserializeAws_json1_1AppBlock */ -const de_ImageBuilder = (output: any, context: __SerdeContext): ImageBuilder => { - return { - AccessEndpoints: - output.AccessEndpoints != null ? de_AccessEndpointList(output.AccessEndpoints, context) : undefined, - AppstreamAgentVersion: __expectString(output.AppstreamAgentVersion), - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - DomainJoinInfo: output.DomainJoinInfo != null ? de_DomainJoinInfo(output.DomainJoinInfo, context) : undefined, - EnableDefaultInternetAccess: __expectBoolean(output.EnableDefaultInternetAccess), - IamRoleArn: __expectString(output.IamRoleArn), - ImageArn: __expectString(output.ImageArn), - ImageBuilderErrors: - output.ImageBuilderErrors != null ? de_ResourceErrors(output.ImageBuilderErrors, context) : undefined, - InstanceType: __expectString(output.InstanceType), - Name: __expectString(output.Name), - NetworkAccessConfiguration: - output.NetworkAccessConfiguration != null - ? de_NetworkAccessConfiguration(output.NetworkAccessConfiguration, context) - : undefined, - Platform: __expectString(output.Platform), - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null - ? de_ImageBuilderStateChangeReason(output.StateChangeReason, context) - : undefined, - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; +const de_AppBlock = (output: any, context: __SerdeContext): AppBlock => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + Name: __expectString, + SetupScriptDetails: _json, + SourceS3Location: _json, + }) as any; }; /** - * deserializeAws_json1_1ImageBuilderList + * deserializeAws_json1_1AppBlocks */ -const de_ImageBuilderList = (output: any, context: __SerdeContext): ImageBuilder[] => { +const de_AppBlocks = (output: any, context: __SerdeContext): AppBlock[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageBuilder(entry, context); + return de_AppBlock(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ImageBuilderStateChangeReason + * deserializeAws_json1_1Application */ -const de_ImageBuilderStateChangeReason = (output: any, context: __SerdeContext): ImageBuilderStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +const de_Application = (output: any, context: __SerdeContext): Application => { + return take(output, { + AppBlockArn: __expectString, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + Enabled: __expectBoolean, + IconS3Location: _json, + IconURL: __expectString, + InstanceFamilies: _json, + LaunchParameters: __expectString, + LaunchPath: __expectString, + Metadata: _json, + Name: __expectString, + Platforms: _json, + WorkingDirectory: __expectString, + }) as any; +}; + +// de_ApplicationFleetAssociation omitted. + +// de_ApplicationFleetAssociationList omitted. /** - * deserializeAws_json1_1ImageList + * deserializeAws_json1_1Applications */ -const de_ImageList = (output: any, context: __SerdeContext): Image[] => { +const de_Applications = (output: any, context: __SerdeContext): Application[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Image(entry, context); + return de_Application(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ImagePermissions - */ -const de_ImagePermissions = (output: any, context: __SerdeContext): ImagePermissions => { - return { - allowFleet: __expectBoolean(output.allowFleet), - allowImageBuilder: __expectBoolean(output.allowImageBuilder), - } as any; -}; +// de_ApplicationSettingsResponse omitted. + +// de_AssociateApplicationFleetResult omitted. + +// de_AssociateApplicationToEntitlementResult omitted. + +// de_AssociateFleetResult omitted. + +// de_BatchAssociateUserStackResult omitted. + +// de_BatchDisassociateUserStackResult omitted. + +// de_CertificateBasedAuthProperties omitted. + +// de_ComputeCapacityStatus omitted. + +// de_ConcurrentModificationException omitted. + +// de_CopyImageResponse omitted. /** - * deserializeAws_json1_1ImageStateChangeReason + * deserializeAws_json1_1CreateAppBlockResult */ -const de_ImageStateChangeReason = (output: any, context: __SerdeContext): ImageStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; +const de_CreateAppBlockResult = (output: any, context: __SerdeContext): CreateAppBlockResult => { + return take(output, { + AppBlock: (_: any) => de_AppBlock(_, context), + }) as any; }; /** - * deserializeAws_json1_1IncompatibleImageException + * deserializeAws_json1_1CreateApplicationResult */ -const de_IncompatibleImageException = (output: any, context: __SerdeContext): IncompatibleImageException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateApplicationResult = (output: any, context: __SerdeContext): CreateApplicationResult => { + return take(output, { + Application: (_: any) => de_Application(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidAccountStatusException + * deserializeAws_json1_1CreateDirectoryConfigResult */ -const de_InvalidAccountStatusException = (output: any, context: __SerdeContext): InvalidAccountStatusException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateDirectoryConfigResult = (output: any, context: __SerdeContext): CreateDirectoryConfigResult => { + return take(output, { + DirectoryConfig: (_: any) => de_DirectoryConfig(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidParameterCombinationException + * deserializeAws_json1_1CreateEntitlementResult */ -const de_InvalidParameterCombinationException = ( - output: any, - context: __SerdeContext -): InvalidParameterCombinationException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateEntitlementResult = (output: any, context: __SerdeContext): CreateEntitlementResult => { + return take(output, { + Entitlement: (_: any) => de_Entitlement(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidRoleException + * deserializeAws_json1_1CreateFleetResult */ -const de_InvalidRoleException = (output: any, context: __SerdeContext): InvalidRoleException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateFleetResult = (output: any, context: __SerdeContext): CreateFleetResult => { + return take(output, { + Fleet: (_: any) => de_Fleet(_, context), + }) as any; }; /** - * deserializeAws_json1_1LastReportGenerationExecutionError + * deserializeAws_json1_1CreateImageBuilderResult */ -const de_LastReportGenerationExecutionError = ( - output: any, - context: __SerdeContext -): LastReportGenerationExecutionError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; +const de_CreateImageBuilderResult = (output: any, context: __SerdeContext): CreateImageBuilderResult => { + return take(output, { + ImageBuilder: (_: any) => de_ImageBuilder(_, context), + }) as any; }; /** - * deserializeAws_json1_1LastReportGenerationExecutionErrors + * deserializeAws_json1_1CreateImageBuilderStreamingURLResult */ -const de_LastReportGenerationExecutionErrors = ( +const de_CreateImageBuilderStreamingURLResult = ( output: any, context: __SerdeContext -): LastReportGenerationExecutionError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LastReportGenerationExecutionError(entry, context); - }); - return retVal; +): CreateImageBuilderStreamingURLResult => { + return take(output, { + Expires: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamingURL: __expectString, + }) as any; }; /** - * deserializeAws_json1_1LimitExceededException + * deserializeAws_json1_1CreateStackResult */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateStackResult = (output: any, context: __SerdeContext): CreateStackResult => { + return take(output, { + Stack: (_: any) => de_Stack(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListAssociatedFleetsResult + * deserializeAws_json1_1CreateStreamingURLResult */ -const de_ListAssociatedFleetsResult = (output: any, context: __SerdeContext): ListAssociatedFleetsResult => { - return { - Names: output.Names != null ? de_StringList(output.Names, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_CreateStreamingURLResult = (output: any, context: __SerdeContext): CreateStreamingURLResult => { + return take(output, { + Expires: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamingURL: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListAssociatedStacksResult + * deserializeAws_json1_1CreateUpdatedImageResult */ -const de_ListAssociatedStacksResult = (output: any, context: __SerdeContext): ListAssociatedStacksResult => { - return { - Names: output.Names != null ? de_StringList(output.Names, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_CreateUpdatedImageResult = (output: any, context: __SerdeContext): CreateUpdatedImageResult => { + return take(output, { + canUpdateImage: __expectBoolean, + image: (_: any) => de_Image(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListEntitledApplicationsResult - */ -const de_ListEntitledApplicationsResult = (output: any, context: __SerdeContext): ListEntitledApplicationsResult => { - return { - EntitledApplications: - output.EntitledApplications != null - ? de_EntitledApplicationList(output.EntitledApplications, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateUsageReportSubscriptionResult omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_CreateUserResult omitted. + +// de_DeleteAppBlockResult omitted. + +// de_DeleteApplicationResult omitted. + +// de_DeleteDirectoryConfigResult omitted. + +// de_DeleteEntitlementResult omitted. + +// de_DeleteFleetResult omitted. /** - * deserializeAws_json1_1Metadata + * deserializeAws_json1_1DeleteImageBuilderResult */ -const de_Metadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_DeleteImageBuilderResult = (output: any, context: __SerdeContext): DeleteImageBuilderResult => { + return take(output, { + ImageBuilder: (_: any) => de_ImageBuilder(_, context), + }) as any; }; +// de_DeleteImagePermissionsResult omitted. + /** - * deserializeAws_json1_1NetworkAccessConfiguration + * deserializeAws_json1_1DeleteImageResult */ -const de_NetworkAccessConfiguration = (output: any, context: __SerdeContext): NetworkAccessConfiguration => { - return { - EniId: __expectString(output.EniId), - EniPrivateIpAddress: __expectString(output.EniPrivateIpAddress), - } as any; +const de_DeleteImageResult = (output: any, context: __SerdeContext): DeleteImageResult => { + return take(output, { + Image: (_: any) => de_Image(_, context), + }) as any; }; +// de_DeleteStackResult omitted. + +// de_DeleteUsageReportSubscriptionResult omitted. + +// de_DeleteUserResult omitted. + /** - * deserializeAws_json1_1OperationNotPermittedException + * deserializeAws_json1_1DescribeAppBlocksResult */ -const de_OperationNotPermittedException = (output: any, context: __SerdeContext): OperationNotPermittedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeAppBlocksResult = (output: any, context: __SerdeContext): DescribeAppBlocksResult => { + return take(output, { + AppBlocks: (_: any) => de_AppBlocks(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeApplicationFleetAssociationsResult omitted. + /** - * deserializeAws_json1_1OrganizationalUnitDistinguishedNamesList + * deserializeAws_json1_1DescribeApplicationsResult */ -const de_OrganizationalUnitDistinguishedNamesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeApplicationsResult = (output: any, context: __SerdeContext): DescribeApplicationsResult => { + return take(output, { + Applications: (_: any) => de_Applications(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Platforms + * deserializeAws_json1_1DescribeDirectoryConfigsResult */ -const de_Platforms = (output: any, context: __SerdeContext): (PlatformType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeDirectoryConfigsResult = (output: any, context: __SerdeContext): DescribeDirectoryConfigsResult => { + return take(output, { + DirectoryConfigs: (_: any) => de_DirectoryConfigList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RequestLimitExceededException + * deserializeAws_json1_1DescribeEntitlementsResult */ -const de_RequestLimitExceededException = (output: any, context: __SerdeContext): RequestLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeEntitlementsResult = (output: any, context: __SerdeContext): DescribeEntitlementsResult => { + return take(output, { + Entitlements: (_: any) => de_EntitlementList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceAlreadyExistsException + * deserializeAws_json1_1DescribeFleetsResult */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeFleetsResult = (output: any, context: __SerdeContext): DescribeFleetsResult => { + return take(output, { + Fleets: (_: any) => de_FleetList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceError + * deserializeAws_json1_1DescribeImageBuildersResult */ -const de_ResourceError = (output: any, context: __SerdeContext): ResourceError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ErrorTimestamp: - output.ErrorTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ErrorTimestamp))) - : undefined, - } as any; +const de_DescribeImageBuildersResult = (output: any, context: __SerdeContext): DescribeImageBuildersResult => { + return take(output, { + ImageBuilders: (_: any) => de_ImageBuilderList(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeImagePermissionsResult omitted. + /** - * deserializeAws_json1_1ResourceErrors + * deserializeAws_json1_1DescribeImagesResult */ -const de_ResourceErrors = (output: any, context: __SerdeContext): ResourceError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceError(entry, context); - }); - return retVal; +const de_DescribeImagesResult = (output: any, context: __SerdeContext): DescribeImagesResult => { + return take(output, { + Images: (_: any) => de_ImageList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceInUseException + * deserializeAws_json1_1DescribeSessionsResult */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeSessionsResult = (output: any, context: __SerdeContext): DescribeSessionsResult => { + return take(output, { + NextToken: __expectString, + Sessions: (_: any) => de_SessionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceNotAvailableException + * deserializeAws_json1_1DescribeStacksResult */ -const de_ResourceNotAvailableException = (output: any, context: __SerdeContext): ResourceNotAvailableException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeStacksResult = (output: any, context: __SerdeContext): DescribeStacksResult => { + return take(output, { + NextToken: __expectString, + Stacks: (_: any) => de_StackList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1DescribeUsageReportSubscriptionsResult */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeUsageReportSubscriptionsResult = ( + output: any, + context: __SerdeContext +): DescribeUsageReportSubscriptionsResult => { + return take(output, { + NextToken: __expectString, + UsageReportSubscriptions: (_: any) => de_UsageReportSubscriptionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3Location + * deserializeAws_json1_1DescribeUsersResult */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - S3Bucket: __expectString(output.S3Bucket), - S3Key: __expectString(output.S3Key), - } as any; +const de_DescribeUsersResult = (output: any, context: __SerdeContext): DescribeUsersResult => { + return take(output, { + NextToken: __expectString, + Users: (_: any) => de_UserList(_, context), + }) as any; }; +// de_DescribeUserStackAssociationsResult omitted. + /** - * deserializeAws_json1_1ScriptDetails + * deserializeAws_json1_1DirectoryConfig */ -const de_ScriptDetails = (output: any, context: __SerdeContext): ScriptDetails => { - return { - ExecutableParameters: __expectString(output.ExecutableParameters), - ExecutablePath: __expectString(output.ExecutablePath), - ScriptS3Location: output.ScriptS3Location != null ? de_S3Location(output.ScriptS3Location, context) : undefined, - TimeoutInSeconds: __expectInt32(output.TimeoutInSeconds), - } as any; +const de_DirectoryConfig = (output: any, context: __SerdeContext): DirectoryConfig => { + return take(output, { + CertificateBasedAuthProperties: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DirectoryName: __expectString, + OrganizationalUnitDistinguishedNames: _json, + ServiceAccountCredentials: _json, + }) as any; }; /** - * deserializeAws_json1_1SecurityGroupIdList + * deserializeAws_json1_1DirectoryConfigList */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { +const de_DirectoryConfigList = (output: any, context: __SerdeContext): DirectoryConfig[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DirectoryConfig(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ServiceAccountCredentials - */ -const de_ServiceAccountCredentials = (output: any, context: __SerdeContext): ServiceAccountCredentials => { - return { - AccountName: __expectString(output.AccountName), - AccountPassword: __expectString(output.AccountPassword), - } as any; -}; +// de_DisableUserResult omitted. + +// de_DisassociateApplicationFleetResult omitted. + +// de_DisassociateApplicationFromEntitlementResult omitted. + +// de_DisassociateFleetResult omitted. + +// de_DomainJoinInfo omitted. + +// de_DomainList omitted. + +// de_EmbedHostDomains omitted. + +// de_EnableUserResult omitted. + +// de_EntitledApplication omitted. + +// de_EntitledApplicationList omitted. /** - * deserializeAws_json1_1Session + * deserializeAws_json1_1Entitlement */ -const de_Session = (output: any, context: __SerdeContext): Session => { - return { - AuthenticationType: __expectString(output.AuthenticationType), - ConnectionState: __expectString(output.ConnectionState), - FleetName: __expectString(output.FleetName), - Id: __expectString(output.Id), - MaxExpirationTime: - output.MaxExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.MaxExpirationTime))) - : undefined, - NetworkAccessConfiguration: - output.NetworkAccessConfiguration != null - ? de_NetworkAccessConfiguration(output.NetworkAccessConfiguration, context) - : undefined, - StackName: __expectString(output.StackName), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - UserId: __expectString(output.UserId), - } as any; +const de_Entitlement = (output: any, context: __SerdeContext): Entitlement => { + return take(output, { + AppVisibility: __expectString, + Attributes: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + StackName: __expectString, + }) as any; }; +// de_EntitlementAlreadyExistsException omitted. + +// de_EntitlementAttribute omitted. + +// de_EntitlementAttributeList omitted. + /** - * deserializeAws_json1_1SessionList + * deserializeAws_json1_1EntitlementList */ -const de_SessionList = (output: any, context: __SerdeContext): Session[] => { +const de_EntitlementList = (output: any, context: __SerdeContext): Entitlement[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Session(entry, context); + return de_Entitlement(entry, context); }); return retVal; }; +// de_EntitlementNotFoundException omitted. + +// de_ExpireSessionResult omitted. + /** - * deserializeAws_json1_1SharedImagePermissions + * deserializeAws_json1_1Fleet */ -const de_SharedImagePermissions = (output: any, context: __SerdeContext): SharedImagePermissions => { - return { - imagePermissions: - output.imagePermissions != null ? de_ImagePermissions(output.imagePermissions, context) : undefined, - sharedAccountId: __expectString(output.sharedAccountId), - } as any; -}; +const de_Fleet = (output: any, context: __SerdeContext): Fleet => { + return take(output, { + Arn: __expectString, + ComputeCapacityStatus: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisconnectTimeoutInSeconds: __expectInt32, + DisplayName: __expectString, + DomainJoinInfo: _json, + EnableDefaultInternetAccess: __expectBoolean, + FleetErrors: _json, + FleetType: __expectString, + IamRoleArn: __expectString, + IdleDisconnectTimeoutInSeconds: __expectInt32, + ImageArn: __expectString, + ImageName: __expectString, + InstanceType: __expectString, + MaxConcurrentSessions: __expectInt32, + MaxUserDurationInSeconds: __expectInt32, + Name: __expectString, + Platform: __expectString, + SessionScriptS3Location: _json, + State: __expectString, + StreamView: __expectString, + UsbDeviceFilterStrings: _json, + VpcConfig: _json, + }) as any; +}; + +// de_FleetError omitted. + +// de_FleetErrors omitted. /** - * deserializeAws_json1_1SharedImagePermissionsList + * deserializeAws_json1_1FleetList */ -const de_SharedImagePermissionsList = (output: any, context: __SerdeContext): SharedImagePermissions[] => { +const de_FleetList = (output: any, context: __SerdeContext): Fleet[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SharedImagePermissions(entry, context); + return de_Fleet(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Stack + * deserializeAws_json1_1Image */ -const de_Stack = (output: any, context: __SerdeContext): Stack => { - return { - AccessEndpoints: - output.AccessEndpoints != null ? de_AccessEndpointList(output.AccessEndpoints, context) : undefined, - ApplicationSettings: - output.ApplicationSettings != null - ? de_ApplicationSettingsResponse(output.ApplicationSettings, context) - : undefined, - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - EmbedHostDomains: - output.EmbedHostDomains != null ? de_EmbedHostDomains(output.EmbedHostDomains, context) : undefined, - FeedbackURL: __expectString(output.FeedbackURL), - Name: __expectString(output.Name), - RedirectURL: __expectString(output.RedirectURL), - StackErrors: output.StackErrors != null ? de_StackErrors(output.StackErrors, context) : undefined, - StorageConnectors: - output.StorageConnectors != null ? de_StorageConnectorList(output.StorageConnectors, context) : undefined, - StreamingExperienceSettings: - output.StreamingExperienceSettings != null - ? de_StreamingExperienceSettings(output.StreamingExperienceSettings, context) - : undefined, - UserSettings: output.UserSettings != null ? de_UserSettingList(output.UserSettings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1StackError - */ -const de_StackError = (output: any, context: __SerdeContext): StackError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; +const de_Image = (output: any, context: __SerdeContext): Image => { + return take(output, { + Applications: (_: any) => de_Applications(_, context), + AppstreamAgentVersion: __expectString, + Arn: __expectString, + BaseImageArn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + ImageBuilderName: __expectString, + ImageBuilderSupported: __expectBoolean, + ImageErrors: (_: any) => de_ResourceErrors(_, context), + ImagePermissions: _json, + Name: __expectString, + Platform: __expectString, + PublicBaseImageReleasedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateChangeReason: _json, + Visibility: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1ImageBuilder + */ +const de_ImageBuilder = (output: any, context: __SerdeContext): ImageBuilder => { + return take(output, { + AccessEndpoints: _json, + AppstreamAgentVersion: __expectString, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + DomainJoinInfo: _json, + EnableDefaultInternetAccess: __expectBoolean, + IamRoleArn: __expectString, + ImageArn: __expectString, + ImageBuilderErrors: (_: any) => de_ResourceErrors(_, context), + InstanceType: __expectString, + Name: __expectString, + NetworkAccessConfiguration: _json, + Platform: __expectString, + State: __expectString, + StateChangeReason: _json, + VpcConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1StackErrors + * deserializeAws_json1_1ImageBuilderList */ -const de_StackErrors = (output: any, context: __SerdeContext): StackError[] => { +const de_ImageBuilderList = (output: any, context: __SerdeContext): ImageBuilder[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StackError(entry, context); + return de_ImageBuilder(entry, context); }); return retVal; }; +// de_ImageBuilderStateChangeReason omitted. + /** - * deserializeAws_json1_1StackList + * deserializeAws_json1_1ImageList */ -const de_StackList = (output: any, context: __SerdeContext): Stack[] => { +const de_ImageList = (output: any, context: __SerdeContext): Image[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Stack(entry, context); + return de_Image(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartFleetResult - */ -const de_StartFleetResult = (output: any, context: __SerdeContext): StartFleetResult => { - return {} as any; -}; +// de_ImagePermissions omitted. -/** - * deserializeAws_json1_1StartImageBuilderResult - */ -const de_StartImageBuilderResult = (output: any, context: __SerdeContext): StartImageBuilderResult => { - return { - ImageBuilder: output.ImageBuilder != null ? de_ImageBuilder(output.ImageBuilder, context) : undefined, - } as any; -}; +// de_ImageStateChangeReason omitted. -/** - * deserializeAws_json1_1StopFleetResult - */ -const de_StopFleetResult = (output: any, context: __SerdeContext): StopFleetResult => { - return {} as any; -}; +// de_IncompatibleImageException omitted. -/** - * deserializeAws_json1_1StopImageBuilderResult - */ -const de_StopImageBuilderResult = (output: any, context: __SerdeContext): StopImageBuilderResult => { - return { - ImageBuilder: output.ImageBuilder != null ? de_ImageBuilder(output.ImageBuilder, context) : undefined, - } as any; -}; +// de_InvalidAccountStatusException omitted. + +// de_InvalidParameterCombinationException omitted. + +// de_InvalidRoleException omitted. + +// de_LastReportGenerationExecutionError omitted. + +// de_LastReportGenerationExecutionErrors omitted. + +// de_LimitExceededException omitted. + +// de_ListAssociatedFleetsResult omitted. + +// de_ListAssociatedStacksResult omitted. + +// de_ListEntitledApplicationsResult omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_Metadata omitted. + +// de_NetworkAccessConfiguration omitted. + +// de_OperationNotPermittedException omitted. + +// de_OrganizationalUnitDistinguishedNamesList omitted. + +// de_Platforms omitted. + +// de_RequestLimitExceededException omitted. + +// de_ResourceAlreadyExistsException omitted. /** - * deserializeAws_json1_1StorageConnector + * deserializeAws_json1_1ResourceError */ -const de_StorageConnector = (output: any, context: __SerdeContext): StorageConnector => { - return { - ConnectorType: __expectString(output.ConnectorType), - Domains: output.Domains != null ? de_DomainList(output.Domains, context) : undefined, - ResourceIdentifier: __expectString(output.ResourceIdentifier), - } as any; +const de_ResourceError = (output: any, context: __SerdeContext): ResourceError => { + return take(output, { + ErrorCode: __expectString, + ErrorMessage: __expectString, + ErrorTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1StorageConnectorList + * deserializeAws_json1_1ResourceErrors */ -const de_StorageConnectorList = (output: any, context: __SerdeContext): StorageConnector[] => { +const de_ResourceErrors = (output: any, context: __SerdeContext): ResourceError[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StorageConnector(entry, context); + return de_ResourceError(entry, context); }); return retVal; }; +// de_ResourceInUseException omitted. + +// de_ResourceNotAvailableException omitted. + +// de_ResourceNotFoundException omitted. + +// de_S3Location omitted. + +// de_ScriptDetails omitted. + +// de_SecurityGroupIdList omitted. + +// de_ServiceAccountCredentials omitted. + /** - * deserializeAws_json1_1StreamingExperienceSettings + * deserializeAws_json1_1Session */ -const de_StreamingExperienceSettings = (output: any, context: __SerdeContext): StreamingExperienceSettings => { - return { - PreferredProtocol: __expectString(output.PreferredProtocol), - } as any; +const de_Session = (output: any, context: __SerdeContext): Session => { + return take(output, { + AuthenticationType: __expectString, + ConnectionState: __expectString, + FleetName: __expectString, + Id: __expectString, + MaxExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NetworkAccessConfiguration: _json, + StackName: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + UserId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1SessionList */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { +const de_SessionList = (output: any, context: __SerdeContext): Session[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Session(entry, context); }); return retVal; }; +// de_SharedImagePermissions omitted. + +// de_SharedImagePermissionsList omitted. + +/** + * deserializeAws_json1_1Stack + */ +const de_Stack = (output: any, context: __SerdeContext): Stack => { + return take(output, { + AccessEndpoints: _json, + ApplicationSettings: _json, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + EmbedHostDomains: _json, + FeedbackURL: __expectString, + Name: __expectString, + RedirectURL: __expectString, + StackErrors: _json, + StorageConnectors: _json, + StreamingExperienceSettings: _json, + UserSettings: _json, + }) as any; +}; + +// de_StackError omitted. + +// de_StackErrors omitted. + /** - * deserializeAws_json1_1SubnetIdList + * deserializeAws_json1_1StackList */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { +const de_StackList = (output: any, context: __SerdeContext): Stack[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Stack(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_StartFleetResult omitted. /** - * deserializeAws_json1_1Tags + * deserializeAws_json1_1StartImageBuilderResult */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_StartImageBuilderResult = (output: any, context: __SerdeContext): StartImageBuilderResult => { + return take(output, { + ImageBuilder: (_: any) => de_ImageBuilder(_, context), + }) as any; }; +// de_StopFleetResult omitted. + /** - * deserializeAws_json1_1UntagResourceResponse + * deserializeAws_json1_1StopImageBuilderResult */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; +const de_StopImageBuilderResult = (output: any, context: __SerdeContext): StopImageBuilderResult => { + return take(output, { + ImageBuilder: (_: any) => de_ImageBuilder(_, context), + }) as any; }; +// de_StorageConnector omitted. + +// de_StorageConnectorList omitted. + +// de_StreamingExperienceSettings omitted. + +// de_StringList omitted. + +// de_SubnetIdList omitted. + +// de_TagResourceResponse omitted. + +// de_Tags omitted. + +// de_UntagResourceResponse omitted. + /** * deserializeAws_json1_1UpdateApplicationResult */ const de_UpdateApplicationResult = (output: any, context: __SerdeContext): UpdateApplicationResult => { - return { - Application: output.Application != null ? de_Application(output.Application, context) : undefined, - } as any; + return take(output, { + Application: (_: any) => de_Application(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateDirectoryConfigResult */ const de_UpdateDirectoryConfigResult = (output: any, context: __SerdeContext): UpdateDirectoryConfigResult => { - return { - DirectoryConfig: output.DirectoryConfig != null ? de_DirectoryConfig(output.DirectoryConfig, context) : undefined, - } as any; + return take(output, { + DirectoryConfig: (_: any) => de_DirectoryConfig(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateEntitlementResult */ const de_UpdateEntitlementResult = (output: any, context: __SerdeContext): UpdateEntitlementResult => { - return { - Entitlement: output.Entitlement != null ? de_Entitlement(output.Entitlement, context) : undefined, - } as any; + return take(output, { + Entitlement: (_: any) => de_Entitlement(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateFleetResult */ const de_UpdateFleetResult = (output: any, context: __SerdeContext): UpdateFleetResult => { - return { - Fleet: output.Fleet != null ? de_Fleet(output.Fleet, context) : undefined, - } as any; + return take(output, { + Fleet: (_: any) => de_Fleet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateImagePermissionsResult - */ -const de_UpdateImagePermissionsResult = (output: any, context: __SerdeContext): UpdateImagePermissionsResult => { - return {} as any; -}; +// de_UpdateImagePermissionsResult omitted. /** * deserializeAws_json1_1UpdateStackResult */ const de_UpdateStackResult = (output: any, context: __SerdeContext): UpdateStackResult => { - return { - Stack: output.Stack != null ? de_Stack(output.Stack, context) : undefined, - } as any; + return take(output, { + Stack: (_: any) => de_Stack(_, context), + }) as any; }; /** * deserializeAws_json1_1UsageReportSubscription */ const de_UsageReportSubscription = (output: any, context: __SerdeContext): UsageReportSubscription => { - return { - LastGeneratedReportDate: - output.LastGeneratedReportDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastGeneratedReportDate))) - : undefined, - S3BucketName: __expectString(output.S3BucketName), - Schedule: __expectString(output.Schedule), - SubscriptionErrors: - output.SubscriptionErrors != null - ? de_LastReportGenerationExecutionErrors(output.SubscriptionErrors, context) - : undefined, - } as any; + return take(output, { + LastGeneratedReportDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + S3BucketName: __expectString, + Schedule: __expectString, + SubscriptionErrors: _json, + }) as any; }; /** @@ -7878,46 +5840,27 @@ const de_UsageReportSubscriptionList = (output: any, context: __SerdeContext): U const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageReportSubscription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UsbDeviceFilterStrings - */ -const de_UsbDeviceFilterStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UsbDeviceFilterStrings omitted. /** * deserializeAws_json1_1User */ const de_User = (output: any, context: __SerdeContext): User => { - return { - Arn: __expectString(output.Arn), - AuthenticationType: __expectString(output.AuthenticationType), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Enabled: __expectBoolean(output.Enabled), - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - Status: __expectString(output.Status), - UserName: __expectString(output.UserName), - } as any; + return take(output, { + Arn: __expectString, + AuthenticationType: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Enabled: __expectBoolean, + FirstName: __expectString, + LastName: __expectString, + Status: __expectString, + UserName: __expectString, + }) as any; }; /** @@ -7927,103 +5870,24 @@ const de_UserList = (output: any, context: __SerdeContext): User[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_User(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UserSetting - */ -const de_UserSetting = (output: any, context: __SerdeContext): UserSetting => { - return { - Action: __expectString(output.Action), - Permission: __expectString(output.Permission), - } as any; -}; +// de_UserSetting omitted. -/** - * deserializeAws_json1_1UserSettingList - */ -const de_UserSettingList = (output: any, context: __SerdeContext): UserSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserSetting(entry, context); - }); - return retVal; -}; +// de_UserSettingList omitted. -/** - * deserializeAws_json1_1UserStackAssociation - */ -const de_UserStackAssociation = (output: any, context: __SerdeContext): UserStackAssociation => { - return { - AuthenticationType: __expectString(output.AuthenticationType), - SendEmailNotification: __expectBoolean(output.SendEmailNotification), - StackName: __expectString(output.StackName), - UserName: __expectString(output.UserName), - } as any; -}; +// de_UserStackAssociation omitted. -/** - * deserializeAws_json1_1UserStackAssociationError - */ -const de_UserStackAssociationError = (output: any, context: __SerdeContext): UserStackAssociationError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - UserStackAssociation: - output.UserStackAssociation != null ? de_UserStackAssociation(output.UserStackAssociation, context) : undefined, - } as any; -}; +// de_UserStackAssociationError omitted. -/** - * deserializeAws_json1_1UserStackAssociationErrorList - */ -const de_UserStackAssociationErrorList = (output: any, context: __SerdeContext): UserStackAssociationError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserStackAssociationError(entry, context); - }); - return retVal; -}; +// de_UserStackAssociationErrorList omitted. -/** - * deserializeAws_json1_1UserStackAssociationList - */ -const de_UserStackAssociationList = (output: any, context: __SerdeContext): UserStackAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserStackAssociation(entry, context); - }); - return retVal; -}; +// de_UserStackAssociationList omitted. -/** - * deserializeAws_json1_1VpcConfig - */ -const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIdList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIdList(output.SubnetIds, context) : undefined, - } as any; -}; +// de_VpcConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -8045,6 +5909,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-appsync/src/protocols/Aws_restJson1.ts b/clients/client-appsync/src/protocols/Aws_restJson1.ts index 30bd076201f0..e7982614355d 100644 --- a/clients/client-appsync/src/protocols/Aws_restJson1.ts +++ b/clients/client-appsync/src/protocols/Aws_restJson1.ts @@ -1,17 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -92,32 +91,20 @@ import { AppSyncServiceException as __BaseException } from "../models/AppSyncSer import { AccessDeniedException, AdditionalAuthenticationProvider, - ApiAssociation, - ApiCache, - ApiKey, ApiKeyLimitExceededException, ApiKeyValidityOutOfBoundsException, ApiLimitExceededException, AppSyncRuntime, AuthorizationConfig, AwsIamConfig, - BadRequestDetail, BadRequestException, CachingConfig, - CodeError, - CodeErrorLocation, CognitoUserPoolConfig, ConcurrentModificationException, - DataSource, DeltaSyncConfig, - DomainNameConfig, DynamodbDataSourceConfig, ElasticsearchDataSourceConfig, - ErrorDetail, - EvaluateCodeErrorDetail, EventBridgeDataSourceConfig, - FunctionConfiguration, - GraphqlApi, GraphQLSchemaException, HttpDataSourceConfig, InternalFailureException, @@ -132,9 +119,7 @@ import { PipelineConfig, RdsHttpEndpointConfig, RelationalDatabaseDataSourceConfig, - Resolver, SyncConfig, - Type, UnauthorizedException, UserPoolConfig, } from "../models/models_0"; @@ -155,9 +140,11 @@ export const se_AssociateApiCommand = async ( "/v1/domainnames/{domainName}/apiassociation"; resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName!, "{domainName}", false); let body: any; - body = JSON.stringify({ - ...(input.apiId != null && { apiId: input.apiId }), - }); + body = JSON.stringify( + take(input, { + apiId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -184,13 +171,15 @@ export const se_CreateApiCacheCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/ApiCaches"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.apiCachingBehavior != null && { apiCachingBehavior: input.apiCachingBehavior }), - ...(input.atRestEncryptionEnabled != null && { atRestEncryptionEnabled: input.atRestEncryptionEnabled }), - ...(input.transitEncryptionEnabled != null && { transitEncryptionEnabled: input.transitEncryptionEnabled }), - ...(input.ttl != null && { ttl: input.ttl }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + apiCachingBehavior: [], + atRestEncryptionEnabled: [], + transitEncryptionEnabled: [], + ttl: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -216,10 +205,12 @@ export const se_CreateApiKeyCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/apikeys"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.expires != null && { expires: input.expires }), - }); + body = JSON.stringify( + take(input, { + description: [], + expires: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -246,27 +237,21 @@ export const se_CreateDataSourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/datasources"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.dynamodbConfig != null && { dynamodbConfig: se_DynamodbDataSourceConfig(input.dynamodbConfig, context) }), - ...(input.elasticsearchConfig != null && { - elasticsearchConfig: se_ElasticsearchDataSourceConfig(input.elasticsearchConfig, context), - }), - ...(input.eventBridgeConfig != null && { - eventBridgeConfig: se_EventBridgeDataSourceConfig(input.eventBridgeConfig, context), - }), - ...(input.httpConfig != null && { httpConfig: se_HttpDataSourceConfig(input.httpConfig, context) }), - ...(input.lambdaConfig != null && { lambdaConfig: se_LambdaDataSourceConfig(input.lambdaConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.openSearchServiceConfig != null && { - openSearchServiceConfig: se_OpenSearchServiceDataSourceConfig(input.openSearchServiceConfig, context), - }), - ...(input.relationalDatabaseConfig != null && { - relationalDatabaseConfig: se_RelationalDatabaseDataSourceConfig(input.relationalDatabaseConfig, context), - }), - ...(input.serviceRoleArn != null && { serviceRoleArn: input.serviceRoleArn }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + description: [], + dynamodbConfig: (_) => _json(_), + elasticsearchConfig: (_) => _json(_), + eventBridgeConfig: (_) => _json(_), + httpConfig: (_) => _json(_), + lambdaConfig: (_) => _json(_), + name: [], + openSearchServiceConfig: (_) => _json(_), + relationalDatabaseConfig: (_) => _json(_), + serviceRoleArn: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -291,11 +276,13 @@ export const se_CreateDomainNameCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domainnames"; let body: any; - body = JSON.stringify({ - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - ...(input.description != null && { description: input.description }), - ...(input.domainName != null && { domainName: input.domainName }), - }); + body = JSON.stringify( + take(input, { + certificateArn: [], + description: [], + domainName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -322,18 +309,20 @@ export const se_CreateFunctionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/functions"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.code != null && { code: input.code }), - ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }), - ...(input.description != null && { description: input.description }), - ...(input.functionVersion != null && { functionVersion: input.functionVersion }), - ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }), - ...(input.name != null && { name: input.name }), - ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }), - ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }), - ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }), - ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }), - }); + body = JSON.stringify( + take(input, { + code: [], + dataSourceName: [], + description: [], + functionVersion: [], + maxBatchSize: [], + name: [], + requestMappingTemplate: [], + responseMappingTemplate: [], + runtime: (_) => _json(_), + syncConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -358,26 +347,19 @@ export const se_CreateGraphqlApiCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis"; let body: any; - body = JSON.stringify({ - ...(input.additionalAuthenticationProviders != null && { - additionalAuthenticationProviders: se_AdditionalAuthenticationProviders( - input.additionalAuthenticationProviders, - context - ), - }), - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - ...(input.lambdaAuthorizerConfig != null && { - lambdaAuthorizerConfig: se_LambdaAuthorizerConfig(input.lambdaAuthorizerConfig, context), - }), - ...(input.logConfig != null && { logConfig: se_LogConfig(input.logConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.openIDConnectConfig != null && { - openIDConnectConfig: se_OpenIDConnectConfig(input.openIDConnectConfig, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.userPoolConfig != null && { userPoolConfig: se_UserPoolConfig(input.userPoolConfig, context) }), - ...(input.xrayEnabled != null && { xrayEnabled: input.xrayEnabled }), - }); + body = JSON.stringify( + take(input, { + additionalAuthenticationProviders: (_) => _json(_), + authenticationType: [], + lambdaAuthorizerConfig: (_) => _json(_), + logConfig: (_) => _json(_), + name: [], + openIDConnectConfig: (_) => _json(_), + tags: (_) => _json(_), + userPoolConfig: (_) => _json(_), + xrayEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -406,19 +388,21 @@ export const se_CreateResolverCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "typeName", () => input.typeName!, "{typeName}", false); let body: any; - body = JSON.stringify({ - ...(input.cachingConfig != null && { cachingConfig: se_CachingConfig(input.cachingConfig, context) }), - ...(input.code != null && { code: input.code }), - ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }), - ...(input.fieldName != null && { fieldName: input.fieldName }), - ...(input.kind != null && { kind: input.kind }), - ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }), - ...(input.pipelineConfig != null && { pipelineConfig: se_PipelineConfig(input.pipelineConfig, context) }), - ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }), - ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }), - ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }), - ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }), - }); + body = JSON.stringify( + take(input, { + cachingConfig: (_) => _json(_), + code: [], + dataSourceName: [], + fieldName: [], + kind: [], + maxBatchSize: [], + pipelineConfig: (_) => _json(_), + requestMappingTemplate: [], + responseMappingTemplate: [], + runtime: (_) => _json(_), + syncConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -444,10 +428,12 @@ export const se_CreateTypeCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/types"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.definition != null && { definition: input.definition }), - ...(input.format != null && { format: input.format }), - }); + body = JSON.stringify( + take(input, { + definition: [], + format: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -696,12 +682,14 @@ export const se_EvaluateCodeCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/dataplane-evaluatecode"; let body: any; - body = JSON.stringify({ - ...(input.code != null && { code: input.code }), - ...(input.context != null && { context: input.context }), - ...(input.function != null && { function: input.function }), - ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }), - }); + body = JSON.stringify( + take(input, { + code: [], + context: [], + function: [], + runtime: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -727,10 +715,12 @@ export const se_EvaluateMappingTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/dataplane-evaluatetemplate"; let body: any; - body = JSON.stringify({ - ...(input.context != null && { context: input.context }), - ...(input.template != null && { template: input.template }), - }); + body = JSON.stringify( + take(input, { + context: [], + template: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1289,9 +1279,11 @@ export const se_StartSchemaCreationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/schemacreation"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.definition != null && { definition: context.base64Encoder(input.definition) }), - }); + body = JSON.stringify( + take(input, { + definition: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1317,9 +1309,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1376,11 +1370,13 @@ export const se_UpdateApiCacheCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}/ApiCaches/update"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.apiCachingBehavior != null && { apiCachingBehavior: input.apiCachingBehavior }), - ...(input.ttl != null && { ttl: input.ttl }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + apiCachingBehavior: [], + ttl: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1408,10 +1404,12 @@ export const se_UpdateApiKeyCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.expires != null && { expires: input.expires }), - }); + body = JSON.stringify( + take(input, { + description: [], + expires: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1439,26 +1437,20 @@ export const se_UpdateDataSourceCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.dynamodbConfig != null && { dynamodbConfig: se_DynamodbDataSourceConfig(input.dynamodbConfig, context) }), - ...(input.elasticsearchConfig != null && { - elasticsearchConfig: se_ElasticsearchDataSourceConfig(input.elasticsearchConfig, context), - }), - ...(input.eventBridgeConfig != null && { - eventBridgeConfig: se_EventBridgeDataSourceConfig(input.eventBridgeConfig, context), - }), - ...(input.httpConfig != null && { httpConfig: se_HttpDataSourceConfig(input.httpConfig, context) }), - ...(input.lambdaConfig != null && { lambdaConfig: se_LambdaDataSourceConfig(input.lambdaConfig, context) }), - ...(input.openSearchServiceConfig != null && { - openSearchServiceConfig: se_OpenSearchServiceDataSourceConfig(input.openSearchServiceConfig, context), - }), - ...(input.relationalDatabaseConfig != null && { - relationalDatabaseConfig: se_RelationalDatabaseDataSourceConfig(input.relationalDatabaseConfig, context), - }), - ...(input.serviceRoleArn != null && { serviceRoleArn: input.serviceRoleArn }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + description: [], + dynamodbConfig: (_) => _json(_), + elasticsearchConfig: (_) => _json(_), + eventBridgeConfig: (_) => _json(_), + httpConfig: (_) => _json(_), + lambdaConfig: (_) => _json(_), + openSearchServiceConfig: (_) => _json(_), + relationalDatabaseConfig: (_) => _json(_), + serviceRoleArn: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1485,9 +1477,11 @@ export const se_UpdateDomainNameCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domainnames/{domainName}"; resolvedPath = __resolvedPath(resolvedPath, input, "domainName", () => input.domainName!, "{domainName}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1515,18 +1509,20 @@ export const se_UpdateFunctionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "functionId", () => input.functionId!, "{functionId}", false); let body: any; - body = JSON.stringify({ - ...(input.code != null && { code: input.code }), - ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }), - ...(input.description != null && { description: input.description }), - ...(input.functionVersion != null && { functionVersion: input.functionVersion }), - ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }), - ...(input.name != null && { name: input.name }), - ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }), - ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }), - ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }), - ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }), - }); + body = JSON.stringify( + take(input, { + code: [], + dataSourceName: [], + description: [], + functionVersion: [], + maxBatchSize: [], + name: [], + requestMappingTemplate: [], + responseMappingTemplate: [], + runtime: (_) => _json(_), + syncConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1552,25 +1548,18 @@ export const se_UpdateGraphqlApiCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/apis/{apiId}"; resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); let body: any; - body = JSON.stringify({ - ...(input.additionalAuthenticationProviders != null && { - additionalAuthenticationProviders: se_AdditionalAuthenticationProviders( - input.additionalAuthenticationProviders, - context - ), - }), - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - ...(input.lambdaAuthorizerConfig != null && { - lambdaAuthorizerConfig: se_LambdaAuthorizerConfig(input.lambdaAuthorizerConfig, context), - }), - ...(input.logConfig != null && { logConfig: se_LogConfig(input.logConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.openIDConnectConfig != null && { - openIDConnectConfig: se_OpenIDConnectConfig(input.openIDConnectConfig, context), - }), - ...(input.userPoolConfig != null && { userPoolConfig: se_UserPoolConfig(input.userPoolConfig, context) }), - ...(input.xrayEnabled != null && { xrayEnabled: input.xrayEnabled }), - }); + body = JSON.stringify( + take(input, { + additionalAuthenticationProviders: (_) => _json(_), + authenticationType: [], + lambdaAuthorizerConfig: (_) => _json(_), + logConfig: (_) => _json(_), + name: [], + openIDConnectConfig: (_) => _json(_), + userPoolConfig: (_) => _json(_), + xrayEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1600,18 +1589,20 @@ export const se_UpdateResolverCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "typeName", () => input.typeName!, "{typeName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "fieldName", () => input.fieldName!, "{fieldName}", false); let body: any; - body = JSON.stringify({ - ...(input.cachingConfig != null && { cachingConfig: se_CachingConfig(input.cachingConfig, context) }), - ...(input.code != null && { code: input.code }), - ...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }), - ...(input.kind != null && { kind: input.kind }), - ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }), - ...(input.pipelineConfig != null && { pipelineConfig: se_PipelineConfig(input.pipelineConfig, context) }), - ...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }), - ...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }), - ...(input.runtime != null && { runtime: se_AppSyncRuntime(input.runtime, context) }), - ...(input.syncConfig != null && { syncConfig: se_SyncConfig(input.syncConfig, context) }), - }); + body = JSON.stringify( + take(input, { + cachingConfig: (_) => _json(_), + code: [], + dataSourceName: [], + kind: [], + maxBatchSize: [], + pipelineConfig: (_) => _json(_), + requestMappingTemplate: [], + responseMappingTemplate: [], + runtime: (_) => _json(_), + syncConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1639,10 +1630,12 @@ export const se_UpdateTypeCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId!, "{apiId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "typeName", () => input.typeName!, "{typeName}", false); let body: any; - body = JSON.stringify({ - ...(input.definition != null && { definition: input.definition }), - ...(input.format != null && { format: input.format }), - }); + body = JSON.stringify( + take(input, { + definition: [], + format: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1668,9 +1661,10 @@ export const de_AssociateApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiAssociation != null) { - contents.apiAssociation = de_ApiAssociation(data.apiAssociation, context); - } + const doc = take(data, { + apiAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1701,10 +1695,9 @@ const de_AssociateApiCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1724,9 +1717,10 @@ export const de_CreateApiCacheCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiCache != null) { - contents.apiCache = de_ApiCache(data.apiCache, context); - } + const doc = take(data, { + apiCache: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1760,10 +1754,9 @@ const de_CreateApiCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1783,9 +1776,10 @@ export const de_CreateApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKey != null) { - contents.apiKey = de_ApiKey(data.apiKey, context); - } + const doc = take(data, { + apiKey: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1825,10 +1819,9 @@ const de_CreateApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1848,9 +1841,10 @@ export const de_CreateDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataSource != null) { - contents.dataSource = de_DataSource(data.dataSource, context); - } + const doc = take(data, { + dataSource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1884,10 +1878,9 @@ const de_CreateDataSourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1907,9 +1900,10 @@ export const de_CreateDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainNameConfig != null) { - contents.domainNameConfig = de_DomainNameConfig(data.domainNameConfig, context); - } + const doc = take(data, { + domainNameConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1937,10 +1931,9 @@ const de_CreateDomainNameCommandError = async ( throw await de_InternalFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1960,9 +1953,10 @@ export const de_CreateFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.functionConfiguration != null) { - contents.functionConfiguration = de_FunctionConfiguration(data.functionConfiguration, context); - } + const doc = take(data, { + functionConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1993,10 +1987,9 @@ const de_CreateFunctionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2016,9 +2009,10 @@ export const de_CreateGraphqlApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.graphqlApi != null) { - contents.graphqlApi = de_GraphqlApi(data.graphqlApi, context); - } + const doc = take(data, { + graphqlApi: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2055,10 +2049,9 @@ const de_CreateGraphqlApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2078,9 +2071,10 @@ export const de_CreateResolverCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resolver != null) { - contents.resolver = de_Resolver(data.resolver, context); - } + const doc = take(data, { + resolver: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2114,10 +2108,9 @@ const de_CreateResolverCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2137,9 +2130,10 @@ export const de_CreateTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.type != null) { - contents.type = de_Type(data.type, context); - } + const doc = take(data, { + type: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2173,10 +2167,9 @@ const de_CreateTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2229,10 +2222,9 @@ const de_DeleteApiCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,10 +2274,9 @@ const de_DeleteApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2338,10 +2329,9 @@ const de_DeleteDataSourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2394,10 +2384,9 @@ const de_DeleteDomainNameCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2447,10 +2436,9 @@ const de_DeleteFunctionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2506,10 +2494,9 @@ const de_DeleteGraphqlApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2562,10 +2549,9 @@ const de_DeleteResolverCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,10 +2604,9 @@ const de_DeleteTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2674,10 +2659,9 @@ const de_DisassociateApiCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2697,15 +2681,12 @@ export const de_EvaluateCodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.error != null) { - contents.error = de_EvaluateCodeErrorDetail(data.error, context); - } - if (data.evaluationResult != null) { - contents.evaluationResult = __expectString(data.evaluationResult); - } - if (data.logs != null) { - contents.logs = de_Logs(data.logs, context); - } + const doc = take(data, { + error: _json, + evaluationResult: __expectString, + logs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2733,10 +2714,9 @@ const de_EvaluateCodeCommandError = async ( throw await de_InternalFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2756,15 +2736,12 @@ export const de_EvaluateMappingTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.error != null) { - contents.error = de_ErrorDetail(data.error, context); - } - if (data.evaluationResult != null) { - contents.evaluationResult = __expectString(data.evaluationResult); - } - if (data.logs != null) { - contents.logs = de_Logs(data.logs, context); - } + const doc = take(data, { + error: _json, + evaluationResult: __expectString, + logs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2792,10 +2769,9 @@ const de_EvaluateMappingTemplateCommandError = async ( throw await de_InternalFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2848,10 +2824,9 @@ const de_FlushApiCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2871,9 +2846,10 @@ export const de_GetApiAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiAssociation != null) { - contents.apiAssociation = de_ApiAssociation(data.apiAssociation, context); - } + const doc = take(data, { + apiAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2904,10 +2880,9 @@ const de_GetApiAssociationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2927,9 +2902,10 @@ export const de_GetApiCacheCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiCache != null) { - contents.apiCache = de_ApiCache(data.apiCache, context); - } + const doc = take(data, { + apiCache: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2963,10 +2939,9 @@ const de_GetApiCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2986,9 +2961,10 @@ export const de_GetDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataSource != null) { - contents.dataSource = de_DataSource(data.dataSource, context); - } + const doc = take(data, { + dataSource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3022,10 +2998,9 @@ const de_GetDataSourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3045,9 +3020,10 @@ export const de_GetDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainNameConfig != null) { - contents.domainNameConfig = de_DomainNameConfig(data.domainNameConfig, context); - } + const doc = take(data, { + domainNameConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3078,10 +3054,9 @@ const de_GetDomainNameCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3101,9 +3076,10 @@ export const de_GetFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.functionConfiguration != null) { - contents.functionConfiguration = de_FunctionConfiguration(data.functionConfiguration, context); - } + const doc = take(data, { + functionConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3131,10 +3107,9 @@ const de_GetFunctionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3154,9 +3129,10 @@ export const de_GetGraphqlApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.graphqlApi != null) { - contents.graphqlApi = de_GraphqlApi(data.graphqlApi, context); - } + const doc = take(data, { + graphqlApi: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3190,10 +3166,9 @@ const de_GetGraphqlApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3244,10 +3219,9 @@ const de_GetIntrospectionSchemaCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3267,9 +3241,10 @@ export const de_GetResolverCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resolver != null) { - contents.resolver = de_Resolver(data.resolver, context); - } + const doc = take(data, { + resolver: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3297,10 +3272,9 @@ const de_GetResolverCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3320,12 +3294,11 @@ export const de_GetSchemaCreationStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = __expectString(data.details); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + details: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3356,10 +3329,9 @@ const de_GetSchemaCreationStatusCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3379,9 +3351,10 @@ export const de_GetTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.type != null) { - contents.type = de_Type(data.type, context); - } + const doc = take(data, { + type: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3415,10 +3388,9 @@ const de_GetTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3438,12 +3410,11 @@ export const de_ListApiKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKeys != null) { - contents.apiKeys = de_ApiKeys(data.apiKeys, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + apiKeys: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3474,10 +3445,9 @@ const de_ListApiKeysCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3497,12 +3467,11 @@ export const de_ListDataSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataSources != null) { - contents.dataSources = de_DataSources(data.dataSources, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dataSources: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3533,10 +3502,9 @@ const de_ListDataSourcesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3556,12 +3524,11 @@ export const de_ListDomainNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainNameConfigs != null) { - contents.domainNameConfigs = de_DomainNameConfigs(data.domainNameConfigs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + domainNameConfigs: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3589,10 +3556,9 @@ const de_ListDomainNamesCommandError = async ( throw await de_InternalFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3612,12 +3578,11 @@ export const de_ListFunctionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.functions != null) { - contents.functions = de_Functions(data.functions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + functions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3648,10 +3613,9 @@ const de_ListFunctionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3671,12 +3635,11 @@ export const de_ListGraphqlApisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.graphqlApis != null) { - contents.graphqlApis = de_GraphqlApis(data.graphqlApis, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + graphqlApis: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3704,10 +3667,9 @@ const de_ListGraphqlApisCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3727,12 +3689,11 @@ export const de_ListResolversCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resolvers != null) { - contents.resolvers = de_Resolvers(data.resolvers, context); - } + const doc = take(data, { + nextToken: __expectString, + resolvers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3763,10 +3724,9 @@ const de_ListResolversCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3786,12 +3746,11 @@ export const de_ListResolversByFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resolvers != null) { - contents.resolvers = de_Resolvers(data.resolvers, context); - } + const doc = take(data, { + nextToken: __expectString, + resolvers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3822,10 +3781,9 @@ const de_ListResolversByFunctionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3845,9 +3803,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3884,10 +3843,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3907,12 +3865,11 @@ export const de_ListTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.types != null) { - contents.types = de_TypeList(data.types, context); - } + const doc = take(data, { + nextToken: __expectString, + types: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3946,10 +3903,9 @@ const de_ListTypesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3969,9 +3925,10 @@ export const de_StartSchemaCreationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4005,10 +3962,9 @@ const de_StartSchemaCreationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4064,10 +4020,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4123,10 +4078,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4146,9 +4100,10 @@ export const de_UpdateApiCacheCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiCache != null) { - contents.apiCache = de_ApiCache(data.apiCache, context); - } + const doc = take(data, { + apiCache: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4182,10 +4137,9 @@ const de_UpdateApiCacheCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4205,9 +4159,10 @@ export const de_UpdateApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiKey != null) { - contents.apiKey = de_ApiKey(data.apiKey, context); - } + const doc = take(data, { + apiKey: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4244,10 +4199,9 @@ const de_UpdateApiKeyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4267,9 +4221,10 @@ export const de_UpdateDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataSource != null) { - contents.dataSource = de_DataSource(data.dataSource, context); - } + const doc = take(data, { + dataSource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4303,10 +4258,9 @@ const de_UpdateDataSourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4326,9 +4280,10 @@ export const de_UpdateDomainNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainNameConfig != null) { - contents.domainNameConfig = de_DomainNameConfig(data.domainNameConfig, context); - } + const doc = take(data, { + domainNameConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4362,10 +4317,9 @@ const de_UpdateDomainNameCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4385,9 +4339,10 @@ export const de_UpdateFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.functionConfiguration != null) { - contents.functionConfiguration = de_FunctionConfiguration(data.functionConfiguration, context); - } + const doc = take(data, { + functionConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4418,10 +4373,9 @@ const de_UpdateFunctionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4441,9 +4395,10 @@ export const de_UpdateGraphqlApiCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.graphqlApi != null) { - contents.graphqlApi = de_GraphqlApi(data.graphqlApi, context); - } + const doc = take(data, { + graphqlApi: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4480,10 +4435,9 @@ const de_UpdateGraphqlApiCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4503,9 +4457,10 @@ export const de_UpdateResolverCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resolver != null) { - contents.resolver = de_Resolver(data.resolver, context); - } + const doc = take(data, { + resolver: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4539,10 +4494,9 @@ const de_UpdateResolverCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4562,9 +4516,10 @@ export const de_UpdateTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.type != null) { - contents.type = de_Type(data.type, context); - } + const doc = take(data, { + type: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4598,16 +4553,15 @@ const de_UpdateTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4617,9 +4571,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4636,9 +4591,10 @@ const de_ApiKeyLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ApiKeyLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4655,9 +4611,10 @@ const de_ApiKeyValidityOutOfBoundsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ApiKeyValidityOutOfBoundsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4674,9 +4631,10 @@ const de_ApiLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ApiLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4690,15 +4648,12 @@ const de_ApiLimitExceededExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.detail != null) { - contents.detail = de_BadRequestDetail(data.detail, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + detail: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4715,9 +4670,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4734,9 +4690,10 @@ const de_GraphQLSchemaExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new GraphQLSchemaException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4753,9 +4710,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4772,9 +4730,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4788,9 +4747,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4807,9 +4767,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4817,986 +4778,157 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdditionalAuthenticationProvider - */ -const se_AdditionalAuthenticationProvider = (input: AdditionalAuthenticationProvider, context: __SerdeContext): any => { - return { - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - ...(input.lambdaAuthorizerConfig != null && { - lambdaAuthorizerConfig: se_LambdaAuthorizerConfig(input.lambdaAuthorizerConfig, context), - }), - ...(input.openIDConnectConfig != null && { - openIDConnectConfig: se_OpenIDConnectConfig(input.openIDConnectConfig, context), - }), - ...(input.userPoolConfig != null && { userPoolConfig: se_CognitoUserPoolConfig(input.userPoolConfig, context) }), - }; -}; +// se_AdditionalAuthenticationProvider omitted. -/** - * serializeAws_restJson1AdditionalAuthenticationProviders - */ -const se_AdditionalAuthenticationProviders = ( - input: AdditionalAuthenticationProvider[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdditionalAuthenticationProvider(entry, context); - }); -}; +// se_AdditionalAuthenticationProviders omitted. -/** - * serializeAws_restJson1AppSyncRuntime - */ -const se_AppSyncRuntime = (input: AppSyncRuntime, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.runtimeVersion != null && { runtimeVersion: input.runtimeVersion }), - }; -}; +// se_AppSyncRuntime omitted. -/** - * serializeAws_restJson1AuthorizationConfig - */ -const se_AuthorizationConfig = (input: AuthorizationConfig, context: __SerdeContext): any => { - return { - ...(input.authorizationType != null && { authorizationType: input.authorizationType }), - ...(input.awsIamConfig != null && { awsIamConfig: se_AwsIamConfig(input.awsIamConfig, context) }), - }; -}; +// se_AuthorizationConfig omitted. -/** - * serializeAws_restJson1AwsIamConfig - */ -const se_AwsIamConfig = (input: AwsIamConfig, context: __SerdeContext): any => { - return { - ...(input.signingRegion != null && { signingRegion: input.signingRegion }), - ...(input.signingServiceName != null && { signingServiceName: input.signingServiceName }), - }; -}; +// se_AwsIamConfig omitted. -/** - * serializeAws_restJson1CachingConfig - */ -const se_CachingConfig = (input: CachingConfig, context: __SerdeContext): any => { - return { - ...(input.cachingKeys != null && { cachingKeys: se_CachingKeys(input.cachingKeys, context) }), - ...(input.ttl != null && { ttl: input.ttl }), - }; -}; +// se_CachingConfig omitted. -/** - * serializeAws_restJson1CachingKeys - */ -const se_CachingKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CachingKeys omitted. -/** - * serializeAws_restJson1CognitoUserPoolConfig - */ -const se_CognitoUserPoolConfig = (input: CognitoUserPoolConfig, context: __SerdeContext): any => { - return { - ...(input.appIdClientRegex != null && { appIdClientRegex: input.appIdClientRegex }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.userPoolId != null && { userPoolId: input.userPoolId }), - }; -}; +// se_CognitoUserPoolConfig omitted. -/** - * serializeAws_restJson1DeltaSyncConfig - */ -const se_DeltaSyncConfig = (input: DeltaSyncConfig, context: __SerdeContext): any => { - return { - ...(input.baseTableTTL != null && { baseTableTTL: input.baseTableTTL }), - ...(input.deltaSyncTableName != null && { deltaSyncTableName: input.deltaSyncTableName }), - ...(input.deltaSyncTableTTL != null && { deltaSyncTableTTL: input.deltaSyncTableTTL }), - }; -}; +// se_DeltaSyncConfig omitted. -/** - * serializeAws_restJson1DynamodbDataSourceConfig - */ -const se_DynamodbDataSourceConfig = (input: DynamodbDataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.deltaSyncConfig != null && { deltaSyncConfig: se_DeltaSyncConfig(input.deltaSyncConfig, context) }), - ...(input.tableName != null && { tableName: input.tableName }), - ...(input.useCallerCredentials != null && { useCallerCredentials: input.useCallerCredentials }), - ...(input.versioned != null && { versioned: input.versioned }), - }; -}; +// se_DynamodbDataSourceConfig omitted. -/** - * serializeAws_restJson1ElasticsearchDataSourceConfig - */ -const se_ElasticsearchDataSourceConfig = (input: ElasticsearchDataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.endpoint != null && { endpoint: input.endpoint }), - }; -}; +// se_ElasticsearchDataSourceConfig omitted. -/** - * serializeAws_restJson1EventBridgeDataSourceConfig - */ -const se_EventBridgeDataSourceConfig = (input: EventBridgeDataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.eventBusArn != null && { eventBusArn: input.eventBusArn }), - }; -}; +// se_EventBridgeDataSourceConfig omitted. -/** - * serializeAws_restJson1FunctionsIds - */ -const se_FunctionsIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FunctionsIds omitted. -/** - * serializeAws_restJson1HttpDataSourceConfig - */ -const se_HttpDataSourceConfig = (input: HttpDataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.authorizationConfig != null && { - authorizationConfig: se_AuthorizationConfig(input.authorizationConfig, context), - }), - ...(input.endpoint != null && { endpoint: input.endpoint }), - }; -}; +// se_HttpDataSourceConfig omitted. -/** - * serializeAws_restJson1LambdaAuthorizerConfig - */ -const se_LambdaAuthorizerConfig = (input: LambdaAuthorizerConfig, context: __SerdeContext): any => { - return { - ...(input.authorizerResultTtlInSeconds != null && { - authorizerResultTtlInSeconds: input.authorizerResultTtlInSeconds, - }), - ...(input.authorizerUri != null && { authorizerUri: input.authorizerUri }), - ...(input.identityValidationExpression != null && { - identityValidationExpression: input.identityValidationExpression, - }), - }; -}; +// se_LambdaAuthorizerConfig omitted. -/** - * serializeAws_restJson1LambdaConflictHandlerConfig - */ -const se_LambdaConflictHandlerConfig = (input: LambdaConflictHandlerConfig, context: __SerdeContext): any => { - return { - ...(input.lambdaConflictHandlerArn != null && { lambdaConflictHandlerArn: input.lambdaConflictHandlerArn }), - }; -}; +// se_LambdaConflictHandlerConfig omitted. -/** - * serializeAws_restJson1LambdaDataSourceConfig - */ -const se_LambdaDataSourceConfig = (input: LambdaDataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.lambdaFunctionArn != null && { lambdaFunctionArn: input.lambdaFunctionArn }), - }; -}; +// se_LambdaDataSourceConfig omitted. -/** - * serializeAws_restJson1LogConfig - */ -const se_LogConfig = (input: LogConfig, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogsRoleArn != null && { cloudWatchLogsRoleArn: input.cloudWatchLogsRoleArn }), - ...(input.excludeVerboseContent != null && { excludeVerboseContent: input.excludeVerboseContent }), - ...(input.fieldLogLevel != null && { fieldLogLevel: input.fieldLogLevel }), - }; -}; +// se_LogConfig omitted. -/** - * serializeAws_restJson1OpenIDConnectConfig - */ -const se_OpenIDConnectConfig = (input: OpenIDConnectConfig, context: __SerdeContext): any => { - return { - ...(input.authTTL != null && { authTTL: input.authTTL }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.iatTTL != null && { iatTTL: input.iatTTL }), - ...(input.issuer != null && { issuer: input.issuer }), - }; -}; +// se_OpenIDConnectConfig omitted. -/** - * serializeAws_restJson1OpenSearchServiceDataSourceConfig - */ -const se_OpenSearchServiceDataSourceConfig = ( - input: OpenSearchServiceDataSourceConfig, - context: __SerdeContext -): any => { - return { - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.endpoint != null && { endpoint: input.endpoint }), - }; -}; +// se_OpenSearchServiceDataSourceConfig omitted. -/** - * serializeAws_restJson1PipelineConfig - */ -const se_PipelineConfig = (input: PipelineConfig, context: __SerdeContext): any => { - return { - ...(input.functions != null && { functions: se_FunctionsIds(input.functions, context) }), - }; -}; +// se_PipelineConfig omitted. -/** - * serializeAws_restJson1RdsHttpEndpointConfig - */ -const se_RdsHttpEndpointConfig = (input: RdsHttpEndpointConfig, context: __SerdeContext): any => { - return { - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.awsSecretStoreArn != null && { awsSecretStoreArn: input.awsSecretStoreArn }), - ...(input.databaseName != null && { databaseName: input.databaseName }), - ...(input.dbClusterIdentifier != null && { dbClusterIdentifier: input.dbClusterIdentifier }), - ...(input.schema != null && { schema: input.schema }), - }; -}; +// se_RdsHttpEndpointConfig omitted. -/** - * serializeAws_restJson1RelationalDatabaseDataSourceConfig - */ -const se_RelationalDatabaseDataSourceConfig = ( - input: RelationalDatabaseDataSourceConfig, - context: __SerdeContext -): any => { - return { - ...(input.rdsHttpEndpointConfig != null && { - rdsHttpEndpointConfig: se_RdsHttpEndpointConfig(input.rdsHttpEndpointConfig, context), - }), - ...(input.relationalDatabaseSourceType != null && { - relationalDatabaseSourceType: input.relationalDatabaseSourceType, - }), - }; -}; +// se_RelationalDatabaseDataSourceConfig omitted. -/** - * serializeAws_restJson1SyncConfig - */ -const se_SyncConfig = (input: SyncConfig, context: __SerdeContext): any => { - return { - ...(input.conflictDetection != null && { conflictDetection: input.conflictDetection }), - ...(input.conflictHandler != null && { conflictHandler: input.conflictHandler }), - ...(input.lambdaConflictHandlerConfig != null && { - lambdaConflictHandlerConfig: se_LambdaConflictHandlerConfig(input.lambdaConflictHandlerConfig, context), - }), - }; -}; +// se_SyncConfig omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1UserPoolConfig - */ -const se_UserPoolConfig = (input: UserPoolConfig, context: __SerdeContext): any => { - return { - ...(input.appIdClientRegex != null && { appIdClientRegex: input.appIdClientRegex }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.defaultAction != null && { defaultAction: input.defaultAction }), - ...(input.userPoolId != null && { userPoolId: input.userPoolId }), - }; -}; +// se_UserPoolConfig omitted. -/** - * deserializeAws_restJson1AdditionalAuthenticationProvider - */ -const de_AdditionalAuthenticationProvider = ( - output: any, - context: __SerdeContext -): AdditionalAuthenticationProvider => { - return { - authenticationType: __expectString(output.authenticationType), - lambdaAuthorizerConfig: - output.lambdaAuthorizerConfig != null - ? de_LambdaAuthorizerConfig(output.lambdaAuthorizerConfig, context) - : undefined, - openIDConnectConfig: - output.openIDConnectConfig != null ? de_OpenIDConnectConfig(output.openIDConnectConfig, context) : undefined, - userPoolConfig: - output.userPoolConfig != null ? de_CognitoUserPoolConfig(output.userPoolConfig, context) : undefined, - } as any; -}; +// de_AdditionalAuthenticationProvider omitted. -/** - * deserializeAws_restJson1AdditionalAuthenticationProviders - */ -const de_AdditionalAuthenticationProviders = ( - output: any, - context: __SerdeContext -): AdditionalAuthenticationProvider[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalAuthenticationProvider(entry, context); - }); - return retVal; -}; +// de_AdditionalAuthenticationProviders omitted. -/** - * deserializeAws_restJson1ApiAssociation - */ -const de_ApiAssociation = (output: any, context: __SerdeContext): ApiAssociation => { - return { - apiId: __expectString(output.apiId), - associationStatus: __expectString(output.associationStatus), - deploymentDetail: __expectString(output.deploymentDetail), - domainName: __expectString(output.domainName), - } as any; -}; +// de_ApiAssociation omitted. -/** - * deserializeAws_restJson1ApiCache - */ -const de_ApiCache = (output: any, context: __SerdeContext): ApiCache => { - return { - apiCachingBehavior: __expectString(output.apiCachingBehavior), - atRestEncryptionEnabled: __expectBoolean(output.atRestEncryptionEnabled), - status: __expectString(output.status), - transitEncryptionEnabled: __expectBoolean(output.transitEncryptionEnabled), - ttl: __expectLong(output.ttl), - type: __expectString(output.type), - } as any; -}; +// de_ApiCache omitted. -/** - * deserializeAws_restJson1ApiKey - */ -const de_ApiKey = (output: any, context: __SerdeContext): ApiKey => { - return { - deletes: __expectLong(output.deletes), - description: __expectString(output.description), - expires: __expectLong(output.expires), - id: __expectString(output.id), - } as any; -}; +// de_ApiKey omitted. -/** - * deserializeAws_restJson1ApiKeys - */ -const de_ApiKeys = (output: any, context: __SerdeContext): ApiKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApiKey(entry, context); - }); - return retVal; -}; +// de_ApiKeys omitted. -/** - * deserializeAws_restJson1AppSyncRuntime - */ -const de_AppSyncRuntime = (output: any, context: __SerdeContext): AppSyncRuntime => { - return { - name: __expectString(output.name), - runtimeVersion: __expectString(output.runtimeVersion), - } as any; -}; +// de_AppSyncRuntime omitted. -/** - * deserializeAws_restJson1AuthorizationConfig - */ -const de_AuthorizationConfig = (output: any, context: __SerdeContext): AuthorizationConfig => { - return { - authorizationType: __expectString(output.authorizationType), - awsIamConfig: output.awsIamConfig != null ? de_AwsIamConfig(output.awsIamConfig, context) : undefined, - } as any; -}; +// de_AuthorizationConfig omitted. -/** - * deserializeAws_restJson1AwsIamConfig - */ -const de_AwsIamConfig = (output: any, context: __SerdeContext): AwsIamConfig => { - return { - signingRegion: __expectString(output.signingRegion), - signingServiceName: __expectString(output.signingServiceName), - } as any; -}; +// de_AwsIamConfig omitted. -/** - * deserializeAws_restJson1BadRequestDetail - */ -const de_BadRequestDetail = (output: any, context: __SerdeContext): BadRequestDetail => { - return { - codeErrors: output.codeErrors != null ? de_CodeErrors(output.codeErrors, context) : undefined, - } as any; -}; +// de_BadRequestDetail omitted. -/** - * deserializeAws_restJson1CachingConfig - */ -const de_CachingConfig = (output: any, context: __SerdeContext): CachingConfig => { - return { - cachingKeys: output.cachingKeys != null ? de_CachingKeys(output.cachingKeys, context) : undefined, - ttl: __expectLong(output.ttl), - } as any; -}; +// de_CachingConfig omitted. -/** - * deserializeAws_restJson1CachingKeys - */ -const de_CachingKeys = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CachingKeys omitted. -/** - * deserializeAws_restJson1CodeError - */ -const de_CodeError = (output: any, context: __SerdeContext): CodeError => { - return { - errorType: __expectString(output.errorType), - location: output.location != null ? de_CodeErrorLocation(output.location, context) : undefined, - value: __expectString(output.value), - } as any; -}; +// de_CodeError omitted. -/** - * deserializeAws_restJson1CodeErrorLocation - */ -const de_CodeErrorLocation = (output: any, context: __SerdeContext): CodeErrorLocation => { - return { - column: __expectInt32(output.column), - line: __expectInt32(output.line), - span: __expectInt32(output.span), - } as any; -}; +// de_CodeErrorLocation omitted. -/** - * deserializeAws_restJson1CodeErrors - */ -const de_CodeErrors = (output: any, context: __SerdeContext): CodeError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeError(entry, context); - }); - return retVal; -}; +// de_CodeErrors omitted. -/** - * deserializeAws_restJson1CognitoUserPoolConfig - */ -const de_CognitoUserPoolConfig = (output: any, context: __SerdeContext): CognitoUserPoolConfig => { - return { - appIdClientRegex: __expectString(output.appIdClientRegex), - awsRegion: __expectString(output.awsRegion), - userPoolId: __expectString(output.userPoolId), - } as any; -}; +// de_CognitoUserPoolConfig omitted. -/** - * deserializeAws_restJson1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - dataSourceArn: __expectString(output.dataSourceArn), - description: __expectString(output.description), - dynamodbConfig: - output.dynamodbConfig != null ? de_DynamodbDataSourceConfig(output.dynamodbConfig, context) : undefined, - elasticsearchConfig: - output.elasticsearchConfig != null - ? de_ElasticsearchDataSourceConfig(output.elasticsearchConfig, context) - : undefined, - eventBridgeConfig: - output.eventBridgeConfig != null ? de_EventBridgeDataSourceConfig(output.eventBridgeConfig, context) : undefined, - httpConfig: output.httpConfig != null ? de_HttpDataSourceConfig(output.httpConfig, context) : undefined, - lambdaConfig: output.lambdaConfig != null ? de_LambdaDataSourceConfig(output.lambdaConfig, context) : undefined, - name: __expectString(output.name), - openSearchServiceConfig: - output.openSearchServiceConfig != null - ? de_OpenSearchServiceDataSourceConfig(output.openSearchServiceConfig, context) - : undefined, - relationalDatabaseConfig: - output.relationalDatabaseConfig != null - ? de_RelationalDatabaseDataSourceConfig(output.relationalDatabaseConfig, context) - : undefined, - serviceRoleArn: __expectString(output.serviceRoleArn), - type: __expectString(output.type), - } as any; -}; +// de_DataSource omitted. -/** - * deserializeAws_restJson1DataSources - */ -const de_DataSources = (output: any, context: __SerdeContext): DataSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSource(entry, context); - }); - return retVal; -}; +// de_DataSources omitted. -/** - * deserializeAws_restJson1DeltaSyncConfig - */ -const de_DeltaSyncConfig = (output: any, context: __SerdeContext): DeltaSyncConfig => { - return { - baseTableTTL: __expectLong(output.baseTableTTL), - deltaSyncTableName: __expectString(output.deltaSyncTableName), - deltaSyncTableTTL: __expectLong(output.deltaSyncTableTTL), - } as any; -}; +// de_DeltaSyncConfig omitted. -/** - * deserializeAws_restJson1DomainNameConfig - */ -const de_DomainNameConfig = (output: any, context: __SerdeContext): DomainNameConfig => { - return { - appsyncDomainName: __expectString(output.appsyncDomainName), - certificateArn: __expectString(output.certificateArn), - description: __expectString(output.description), - domainName: __expectString(output.domainName), - hostedZoneId: __expectString(output.hostedZoneId), - } as any; -}; +// de_DomainNameConfig omitted. -/** - * deserializeAws_restJson1DomainNameConfigs - */ -const de_DomainNameConfigs = (output: any, context: __SerdeContext): DomainNameConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainNameConfig(entry, context); - }); - return retVal; -}; +// de_DomainNameConfigs omitted. -/** - * deserializeAws_restJson1DynamodbDataSourceConfig - */ -const de_DynamodbDataSourceConfig = (output: any, context: __SerdeContext): DynamodbDataSourceConfig => { - return { - awsRegion: __expectString(output.awsRegion), - deltaSyncConfig: output.deltaSyncConfig != null ? de_DeltaSyncConfig(output.deltaSyncConfig, context) : undefined, - tableName: __expectString(output.tableName), - useCallerCredentials: __expectBoolean(output.useCallerCredentials), - versioned: __expectBoolean(output.versioned), - } as any; -}; +// de_DynamodbDataSourceConfig omitted. -/** - * deserializeAws_restJson1ElasticsearchDataSourceConfig - */ -const de_ElasticsearchDataSourceConfig = (output: any, context: __SerdeContext): ElasticsearchDataSourceConfig => { - return { - awsRegion: __expectString(output.awsRegion), - endpoint: __expectString(output.endpoint), - } as any; -}; +// de_ElasticsearchDataSourceConfig omitted. -/** - * deserializeAws_restJson1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ErrorDetail omitted. -/** - * deserializeAws_restJson1EvaluateCodeErrorDetail - */ -const de_EvaluateCodeErrorDetail = (output: any, context: __SerdeContext): EvaluateCodeErrorDetail => { - return { - codeErrors: output.codeErrors != null ? de_CodeErrors(output.codeErrors, context) : undefined, - message: __expectString(output.message), - } as any; -}; +// de_EvaluateCodeErrorDetail omitted. -/** - * deserializeAws_restJson1EventBridgeDataSourceConfig - */ -const de_EventBridgeDataSourceConfig = (output: any, context: __SerdeContext): EventBridgeDataSourceConfig => { - return { - eventBusArn: __expectString(output.eventBusArn), - } as any; -}; +// de_EventBridgeDataSourceConfig omitted. -/** - * deserializeAws_restJson1FunctionConfiguration - */ -const de_FunctionConfiguration = (output: any, context: __SerdeContext): FunctionConfiguration => { - return { - code: __expectString(output.code), - dataSourceName: __expectString(output.dataSourceName), - description: __expectString(output.description), - functionArn: __expectString(output.functionArn), - functionId: __expectString(output.functionId), - functionVersion: __expectString(output.functionVersion), - maxBatchSize: __expectInt32(output.maxBatchSize), - name: __expectString(output.name), - requestMappingTemplate: __expectString(output.requestMappingTemplate), - responseMappingTemplate: __expectString(output.responseMappingTemplate), - runtime: output.runtime != null ? de_AppSyncRuntime(output.runtime, context) : undefined, - syncConfig: output.syncConfig != null ? de_SyncConfig(output.syncConfig, context) : undefined, - } as any; -}; +// de_FunctionConfiguration omitted. -/** - * deserializeAws_restJson1Functions - */ -const de_Functions = (output: any, context: __SerdeContext): FunctionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FunctionConfiguration(entry, context); - }); - return retVal; -}; +// de_Functions omitted. -/** - * deserializeAws_restJson1FunctionsIds - */ -const de_FunctionsIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FunctionsIds omitted. -/** - * deserializeAws_restJson1GraphqlApi - */ -const de_GraphqlApi = (output: any, context: __SerdeContext): GraphqlApi => { - return { - additionalAuthenticationProviders: - output.additionalAuthenticationProviders != null - ? de_AdditionalAuthenticationProviders(output.additionalAuthenticationProviders, context) - : undefined, - apiId: __expectString(output.apiId), - arn: __expectString(output.arn), - authenticationType: __expectString(output.authenticationType), - lambdaAuthorizerConfig: - output.lambdaAuthorizerConfig != null - ? de_LambdaAuthorizerConfig(output.lambdaAuthorizerConfig, context) - : undefined, - logConfig: output.logConfig != null ? de_LogConfig(output.logConfig, context) : undefined, - name: __expectString(output.name), - openIDConnectConfig: - output.openIDConnectConfig != null ? de_OpenIDConnectConfig(output.openIDConnectConfig, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - uris: output.uris != null ? de_MapOfStringToString(output.uris, context) : undefined, - userPoolConfig: output.userPoolConfig != null ? de_UserPoolConfig(output.userPoolConfig, context) : undefined, - wafWebAclArn: __expectString(output.wafWebAclArn), - xrayEnabled: __expectBoolean(output.xrayEnabled), - } as any; -}; +// de_GraphqlApi omitted. -/** - * deserializeAws_restJson1GraphqlApis - */ -const de_GraphqlApis = (output: any, context: __SerdeContext): GraphqlApi[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GraphqlApi(entry, context); - }); - return retVal; -}; +// de_GraphqlApis omitted. -/** - * deserializeAws_restJson1HttpDataSourceConfig - */ -const de_HttpDataSourceConfig = (output: any, context: __SerdeContext): HttpDataSourceConfig => { - return { - authorizationConfig: - output.authorizationConfig != null ? de_AuthorizationConfig(output.authorizationConfig, context) : undefined, - endpoint: __expectString(output.endpoint), - } as any; -}; +// de_HttpDataSourceConfig omitted. -/** - * deserializeAws_restJson1LambdaAuthorizerConfig - */ -const de_LambdaAuthorizerConfig = (output: any, context: __SerdeContext): LambdaAuthorizerConfig => { - return { - authorizerResultTtlInSeconds: __expectInt32(output.authorizerResultTtlInSeconds), - authorizerUri: __expectString(output.authorizerUri), - identityValidationExpression: __expectString(output.identityValidationExpression), - } as any; -}; +// de_LambdaAuthorizerConfig omitted. -/** - * deserializeAws_restJson1LambdaConflictHandlerConfig - */ -const de_LambdaConflictHandlerConfig = (output: any, context: __SerdeContext): LambdaConflictHandlerConfig => { - return { - lambdaConflictHandlerArn: __expectString(output.lambdaConflictHandlerArn), - } as any; -}; +// de_LambdaConflictHandlerConfig omitted. -/** - * deserializeAws_restJson1LambdaDataSourceConfig - */ -const de_LambdaDataSourceConfig = (output: any, context: __SerdeContext): LambdaDataSourceConfig => { - return { - lambdaFunctionArn: __expectString(output.lambdaFunctionArn), - } as any; -}; +// de_LambdaDataSourceConfig omitted. -/** - * deserializeAws_restJson1LogConfig - */ -const de_LogConfig = (output: any, context: __SerdeContext): LogConfig => { - return { - cloudWatchLogsRoleArn: __expectString(output.cloudWatchLogsRoleArn), - excludeVerboseContent: __expectBoolean(output.excludeVerboseContent), - fieldLogLevel: __expectString(output.fieldLogLevel), - } as any; -}; +// de_LogConfig omitted. -/** - * deserializeAws_restJson1Logs - */ -const de_Logs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Logs omitted. -/** - * deserializeAws_restJson1MapOfStringToString - */ -const de_MapOfStringToString = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MapOfStringToString omitted. -/** - * deserializeAws_restJson1OpenIDConnectConfig - */ -const de_OpenIDConnectConfig = (output: any, context: __SerdeContext): OpenIDConnectConfig => { - return { - authTTL: __expectLong(output.authTTL), - clientId: __expectString(output.clientId), - iatTTL: __expectLong(output.iatTTL), - issuer: __expectString(output.issuer), - } as any; -}; +// de_OpenIDConnectConfig omitted. -/** - * deserializeAws_restJson1OpenSearchServiceDataSourceConfig - */ -const de_OpenSearchServiceDataSourceConfig = ( - output: any, - context: __SerdeContext -): OpenSearchServiceDataSourceConfig => { - return { - awsRegion: __expectString(output.awsRegion), - endpoint: __expectString(output.endpoint), - } as any; -}; +// de_OpenSearchServiceDataSourceConfig omitted. -/** - * deserializeAws_restJson1PipelineConfig - */ -const de_PipelineConfig = (output: any, context: __SerdeContext): PipelineConfig => { - return { - functions: output.functions != null ? de_FunctionsIds(output.functions, context) : undefined, - } as any; -}; +// de_PipelineConfig omitted. -/** - * deserializeAws_restJson1RdsHttpEndpointConfig - */ -const de_RdsHttpEndpointConfig = (output: any, context: __SerdeContext): RdsHttpEndpointConfig => { - return { - awsRegion: __expectString(output.awsRegion), - awsSecretStoreArn: __expectString(output.awsSecretStoreArn), - databaseName: __expectString(output.databaseName), - dbClusterIdentifier: __expectString(output.dbClusterIdentifier), - schema: __expectString(output.schema), - } as any; -}; +// de_RdsHttpEndpointConfig omitted. -/** - * deserializeAws_restJson1RelationalDatabaseDataSourceConfig - */ -const de_RelationalDatabaseDataSourceConfig = ( - output: any, - context: __SerdeContext -): RelationalDatabaseDataSourceConfig => { - return { - rdsHttpEndpointConfig: - output.rdsHttpEndpointConfig != null - ? de_RdsHttpEndpointConfig(output.rdsHttpEndpointConfig, context) - : undefined, - relationalDatabaseSourceType: __expectString(output.relationalDatabaseSourceType), - } as any; -}; +// de_RelationalDatabaseDataSourceConfig omitted. -/** - * deserializeAws_restJson1Resolver - */ -const de_Resolver = (output: any, context: __SerdeContext): Resolver => { - return { - cachingConfig: output.cachingConfig != null ? de_CachingConfig(output.cachingConfig, context) : undefined, - code: __expectString(output.code), - dataSourceName: __expectString(output.dataSourceName), - fieldName: __expectString(output.fieldName), - kind: __expectString(output.kind), - maxBatchSize: __expectInt32(output.maxBatchSize), - pipelineConfig: output.pipelineConfig != null ? de_PipelineConfig(output.pipelineConfig, context) : undefined, - requestMappingTemplate: __expectString(output.requestMappingTemplate), - resolverArn: __expectString(output.resolverArn), - responseMappingTemplate: __expectString(output.responseMappingTemplate), - runtime: output.runtime != null ? de_AppSyncRuntime(output.runtime, context) : undefined, - syncConfig: output.syncConfig != null ? de_SyncConfig(output.syncConfig, context) : undefined, - typeName: __expectString(output.typeName), - } as any; -}; +// de_Resolver omitted. -/** - * deserializeAws_restJson1Resolvers - */ -const de_Resolvers = (output: any, context: __SerdeContext): Resolver[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resolver(entry, context); - }); - return retVal; -}; +// de_Resolvers omitted. -/** - * deserializeAws_restJson1SyncConfig - */ -const de_SyncConfig = (output: any, context: __SerdeContext): SyncConfig => { - return { - conflictDetection: __expectString(output.conflictDetection), - conflictHandler: __expectString(output.conflictHandler), - lambdaConflictHandlerConfig: - output.lambdaConflictHandlerConfig != null - ? de_LambdaConflictHandlerConfig(output.lambdaConflictHandlerConfig, context) - : undefined, - } as any; -}; +// de_SyncConfig omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Type - */ -const de_Type = (output: any, context: __SerdeContext): Type => { - return { - arn: __expectString(output.arn), - definition: __expectString(output.definition), - description: __expectString(output.description), - format: __expectString(output.format), - name: __expectString(output.name), - } as any; -}; +// de_Type omitted. -/** - * deserializeAws_restJson1TypeList - */ -const de_TypeList = (output: any, context: __SerdeContext): Type[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Type(entry, context); - }); - return retVal; -}; +// de_TypeList omitted. -/** - * deserializeAws_restJson1UserPoolConfig - */ -const de_UserPoolConfig = (output: any, context: __SerdeContext): UserPoolConfig => { - return { - appIdClientRegex: __expectString(output.appIdClientRegex), - awsRegion: __expectString(output.awsRegion), - defaultAction: __expectString(output.defaultAction), - userPoolId: __expectString(output.userPoolId), - } as any; -}; +// de_UserPoolConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-arc-zonal-shift/src/protocols/Aws_restJson1.ts b/clients/client-arc-zonal-shift/src/protocols/Aws_restJson1.ts index 5a1bc84cabe4..93d427292c3c 100644 --- a/clients/client-arc-zonal-shift/src/protocols/Aws_restJson1.ts +++ b/clients/client-arc-zonal-shift/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -8,10 +9,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -33,7 +35,6 @@ import { AccessDeniedException, ConflictException, InternalServerException, - ManagedResourceSummary, ResourceNotFoundException, ThrottlingException, ValidationException, @@ -171,12 +172,14 @@ export const se_StartZonalShiftCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/zonalshifts"; let body: any; - body = JSON.stringify({ - ...(input.awayFrom != null && { awayFrom: input.awayFrom }), - ...(input.comment != null && { comment: input.comment }), - ...(input.expiresIn != null && { expiresIn: input.expiresIn }), - ...(input.resourceIdentifier != null && { resourceIdentifier: input.resourceIdentifier }), - }); + body = JSON.stringify( + take(input, { + awayFrom: [], + comment: [], + expiresIn: [], + resourceIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -210,10 +213,12 @@ export const se_UpdateZonalShiftCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.comment != null && { comment: input.comment }), - ...(input.expiresIn != null && { expiresIn: input.expiresIn }), - }); + body = JSON.stringify( + take(input, { + comment: [], + expiresIn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -239,27 +244,16 @@ export const de_CancelZonalShiftCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.awayFrom != null) { - contents.awayFrom = __expectString(data.awayFrom); - } - if (data.comment != null) { - contents.comment = __expectString(data.comment); - } - if (data.expiryTime != null) { - contents.expiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expiryTime))); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = __expectString(data.resourceIdentifier); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.zonalShiftId != null) { - contents.zonalShiftId = __expectString(data.zonalShiftId); - } + const doc = take(data, { + awayFrom: __expectString, + comment: __expectString, + expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: __expectString, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + zonalShiftId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -296,10 +290,9 @@ const de_CancelZonalShiftCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -319,18 +312,13 @@ export const de_GetManagedResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appliedWeights != null) { - contents.appliedWeights = de_AppliedWeights(data.appliedWeights, context); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.zonalShifts != null) { - contents.zonalShifts = de_ZonalShiftsInResource(data.zonalShifts, context); - } + const doc = take(data, { + appliedWeights: (_) => de_AppliedWeights(_, context), + arn: __expectString, + name: __expectString, + zonalShifts: (_) => de_ZonalShiftsInResource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -364,10 +352,9 @@ const de_GetManagedResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -387,12 +374,11 @@ export const de_ListManagedResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ManagedResourceSummaries(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -423,10 +409,9 @@ const de_ListManagedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -446,12 +431,11 @@ export const de_ListZonalShiftsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ZonalShiftSummaries(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ZonalShiftSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -482,10 +466,9 @@ const de_ListZonalShiftsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -505,27 +488,16 @@ export const de_StartZonalShiftCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.awayFrom != null) { - contents.awayFrom = __expectString(data.awayFrom); - } - if (data.comment != null) { - contents.comment = __expectString(data.comment); - } - if (data.expiryTime != null) { - contents.expiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expiryTime))); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = __expectString(data.resourceIdentifier); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.zonalShiftId != null) { - contents.zonalShiftId = __expectString(data.zonalShiftId); - } + const doc = take(data, { + awayFrom: __expectString, + comment: __expectString, + expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: __expectString, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + zonalShiftId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -562,10 +534,9 @@ const de_StartZonalShiftCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -585,27 +556,16 @@ export const de_UpdateZonalShiftCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.awayFrom != null) { - contents.awayFrom = __expectString(data.awayFrom); - } - if (data.comment != null) { - contents.comment = __expectString(data.comment); - } - if (data.expiryTime != null) { - contents.expiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expiryTime))); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = __expectString(data.resourceIdentifier); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.zonalShiftId != null) { - contents.zonalShiftId = __expectString(data.zonalShiftId); - } + const doc = take(data, { + awayFrom: __expectString, + comment: __expectString, + expiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: __expectString, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + zonalShiftId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -642,16 +602,15 @@ const de_UpdateZonalShiftCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -661,9 +620,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -677,15 +637,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } - if (data.zonalShiftId != null) { - contents.zonalShiftId = __expectString(data.zonalShiftId); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + zonalShiftId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -702,9 +659,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -721,9 +679,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -737,9 +696,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -753,12 +713,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -779,63 +738,25 @@ const de_AppliedWeights = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AvailabilityZones omitted. -/** - * deserializeAws_restJson1ManagedResourceSummaries - */ -const de_ManagedResourceSummaries = (output: any, context: __SerdeContext): ManagedResourceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedResourceSummary(entry, context); - }); - return retVal; -}; +// de_ManagedResourceSummaries omitted. -/** - * deserializeAws_restJson1ManagedResourceSummary - */ -const de_ManagedResourceSummary = (output: any, context: __SerdeContext): ManagedResourceSummary => { - return { - arn: __expectString(output.arn), - availabilityZones: - output.availabilityZones != null ? de_AvailabilityZones(output.availabilityZones, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_ManagedResourceSummary omitted. /** * deserializeAws_restJson1ZonalShiftInResource */ const de_ZonalShiftInResource = (output: any, context: __SerdeContext): ZonalShiftInResource => { - return { - appliedStatus: __expectString(output.appliedStatus), - awayFrom: __expectString(output.awayFrom), - comment: __expectString(output.comment), - expiryTime: - output.expiryTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiryTime))) : undefined, - resourceIdentifier: __expectString(output.resourceIdentifier), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - zonalShiftId: __expectString(output.zonalShiftId), - } as any; + return take(output, { + appliedStatus: __expectString, + awayFrom: __expectString, + comment: __expectString, + expiryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + zonalShiftId: __expectString, + }) as any; }; /** @@ -845,9 +766,6 @@ const de_ZonalShiftsInResource = (output: any, context: __SerdeContext): ZonalSh const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ZonalShiftInResource(entry, context); }); return retVal; @@ -860,9 +778,6 @@ const de_ZonalShiftSummaries = (output: any, context: __SerdeContext): ZonalShif const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ZonalShiftSummary(entry, context); }); return retVal; @@ -872,17 +787,15 @@ const de_ZonalShiftSummaries = (output: any, context: __SerdeContext): ZonalShif * deserializeAws_restJson1ZonalShiftSummary */ const de_ZonalShiftSummary = (output: any, context: __SerdeContext): ZonalShiftSummary => { - return { - awayFrom: __expectString(output.awayFrom), - comment: __expectString(output.comment), - expiryTime: - output.expiryTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiryTime))) : undefined, - resourceIdentifier: __expectString(output.resourceIdentifier), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - zonalShiftId: __expectString(output.zonalShiftId), - } as any; + return take(output, { + awayFrom: __expectString, + comment: __expectString, + expiryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + zonalShiftId: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-athena/src/protocols/Aws_json1_1.ts b/clients/client-athena/src/protocols/Aws_json1_1.ts index 46e65313e65a..4f025808a278 100644 --- a/clients/client-athena/src/protocols/Aws_json1_1.ts +++ b/clients/client-athena/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -151,67 +151,40 @@ import { UpdateWorkGroupCommandInput, UpdateWorkGroupCommandOutput } from "../co import { AthenaServiceException as __BaseException } from "../models/AthenaServiceException"; import { AclConfiguration, - ApplicationDPUSizes, - AthenaError, BatchGetNamedQueryInput, - BatchGetNamedQueryOutput, BatchGetPreparedStatementInput, BatchGetPreparedStatementOutput, BatchGetQueryExecutionInput, BatchGetQueryExecutionOutput, CalculationConfiguration, - CalculationResult, - CalculationStatistics, CalculationStatus, CalculationSummary, - Column, - ColumnInfo, CreateDataCatalogInput, - CreateDataCatalogOutput, CreateNamedQueryInput, - CreateNamedQueryOutput, CreateNotebookInput, - CreateNotebookOutput, CreatePreparedStatementInput, - CreatePreparedStatementOutput, CreatePresignedNotebookUrlRequest, - CreatePresignedNotebookUrlResponse, CreateWorkGroupInput, - CreateWorkGroupOutput, CustomerContentEncryptionConfiguration, - Database, - DataCatalog, - DataCatalogSummary, - Datum, DeleteDataCatalogInput, - DeleteDataCatalogOutput, DeleteNamedQueryInput, - DeleteNamedQueryOutput, DeleteNotebookInput, - DeleteNotebookOutput, DeletePreparedStatementInput, - DeletePreparedStatementOutput, DeleteWorkGroupInput, - DeleteWorkGroupOutput, EncryptionConfiguration, EngineConfiguration, EngineVersion, - ExecutorsSummary, ExportNotebookInput, ExportNotebookOutput, FilterDefinition, GetCalculationExecutionCodeRequest, - GetCalculationExecutionCodeResponse, GetCalculationExecutionRequest, GetCalculationExecutionResponse, GetCalculationExecutionStatusRequest, GetCalculationExecutionStatusResponse, GetDatabaseInput, - GetDatabaseOutput, GetDataCatalogInput, - GetDataCatalogOutput, GetNamedQueryInput, - GetNamedQueryOutput, GetNotebookMetadataInput, GetNotebookMetadataOutput, GetPreparedStatementInput, @@ -219,7 +192,6 @@ import { GetQueryExecutionInput, GetQueryExecutionOutput, GetQueryResultsInput, - GetQueryResultsOutput, GetQueryRuntimeStatisticsInput, GetQueryRuntimeStatisticsOutput, GetSessionRequest, @@ -231,23 +203,16 @@ import { GetWorkGroupInput, GetWorkGroupOutput, ImportNotebookInput, - ImportNotebookOutput, InternalServerException, InvalidRequestException, ListApplicationDPUSizesInput, - ListApplicationDPUSizesOutput, ListCalculationExecutionsRequest, ListCalculationExecutionsResponse, ListDatabasesInput, - ListDatabasesOutput, ListDataCatalogsInput, - ListDataCatalogsOutput, ListEngineVersionsInput, - ListEngineVersionsOutput, ListExecutorsRequest, - ListExecutorsResponse, ListNamedQueriesInput, - ListNamedQueriesOutput, ListNotebookMetadataInput, ListNotebookMetadataOutput, ListNotebookSessionsRequest, @@ -255,28 +220,22 @@ import { ListPreparedStatementsInput, ListPreparedStatementsOutput, ListQueryExecutionsInput, - ListQueryExecutionsOutput, ListSessionsRequest, ListSessionsResponse, ListTableMetadataInput, ListTableMetadataOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, ListWorkGroupsInput, ListWorkGroupsOutput, MetadataException, - NamedQuery, NotebookMetadata, NotebookSessionSummary, PreparedStatement, PreparedStatementSummary, QueryExecution, QueryExecutionContext, - QueryExecutionStatistics, QueryExecutionStatus, QueryRuntimeStatistics, - QueryRuntimeStatisticsRows, - QueryRuntimeStatisticsTimeline, QueryStage, QueryStagePlanNode, ResourceNotFoundException, @@ -284,49 +243,26 @@ import { ResultConfigurationUpdates, ResultReuseByAgeConfiguration, ResultReuseConfiguration, - ResultReuseInformation, - ResultSet, - ResultSetMetadata, - Row, SessionAlreadyExistsException, - SessionConfiguration, - SessionStatistics, SessionStatus, SessionSummary, StartCalculationExecutionRequest, - StartCalculationExecutionResponse, StartQueryExecutionInput, - StartQueryExecutionOutput, StartSessionRequest, - StartSessionResponse, StopCalculationExecutionRequest, - StopCalculationExecutionResponse, StopQueryExecutionInput, - StopQueryExecutionOutput, TableMetadata, Tag, TagResourceInput, - TagResourceOutput, TerminateSessionRequest, - TerminateSessionResponse, TooManyRequestsException, - UnprocessedNamedQueryId, - UnprocessedPreparedStatementName, - UnprocessedQueryExecutionId, UntagResourceInput, - UntagResourceOutput, UpdateDataCatalogInput, - UpdateDataCatalogOutput, UpdateNamedQueryInput, - UpdateNamedQueryOutput, UpdateNotebookInput, UpdateNotebookMetadataInput, - UpdateNotebookMetadataOutput, - UpdateNotebookOutput, UpdatePreparedStatementInput, - UpdatePreparedStatementOutput, UpdateWorkGroupInput, - UpdateWorkGroupOutput, WorkGroup, WorkGroupConfiguration, WorkGroupConfigurationUpdates, @@ -342,7 +278,7 @@ export const se_BatchGetNamedQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetNamedQuery"); let body: any; - body = JSON.stringify(se_BatchGetNamedQueryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -355,7 +291,7 @@ export const se_BatchGetPreparedStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetPreparedStatement"); let body: any; - body = JSON.stringify(se_BatchGetPreparedStatementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -368,7 +304,7 @@ export const se_BatchGetQueryExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetQueryExecution"); let body: any; - body = JSON.stringify(se_BatchGetQueryExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -381,7 +317,7 @@ export const se_CreateDataCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataCatalog"); let body: any; - body = JSON.stringify(se_CreateDataCatalogInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -407,7 +343,7 @@ export const se_CreateNotebookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateNotebook"); let body: any; - body = JSON.stringify(se_CreateNotebookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -420,7 +356,7 @@ export const se_CreatePreparedStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePreparedStatement"); let body: any; - body = JSON.stringify(se_CreatePreparedStatementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -433,7 +369,7 @@ export const se_CreatePresignedNotebookUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePresignedNotebookUrl"); let body: any; - body = JSON.stringify(se_CreatePresignedNotebookUrlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -446,7 +382,7 @@ export const se_CreateWorkGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkGroup"); let body: any; - body = JSON.stringify(se_CreateWorkGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -459,7 +395,7 @@ export const se_DeleteDataCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataCatalog"); let body: any; - body = JSON.stringify(se_DeleteDataCatalogInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -485,7 +421,7 @@ export const se_DeleteNotebookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNotebook"); let body: any; - body = JSON.stringify(se_DeleteNotebookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -498,7 +434,7 @@ export const se_DeletePreparedStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePreparedStatement"); let body: any; - body = JSON.stringify(se_DeletePreparedStatementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -511,7 +447,7 @@ export const se_DeleteWorkGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkGroup"); let body: any; - body = JSON.stringify(se_DeleteWorkGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -524,7 +460,7 @@ export const se_ExportNotebookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportNotebook"); let body: any; - body = JSON.stringify(se_ExportNotebookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -537,7 +473,7 @@ export const se_GetCalculationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCalculationExecution"); let body: any; - body = JSON.stringify(se_GetCalculationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -550,7 +486,7 @@ export const se_GetCalculationExecutionCodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCalculationExecutionCode"); let body: any; - body = JSON.stringify(se_GetCalculationExecutionCodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -563,7 +499,7 @@ export const se_GetCalculationExecutionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCalculationExecutionStatus"); let body: any; - body = JSON.stringify(se_GetCalculationExecutionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -576,7 +512,7 @@ export const se_GetDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDatabase"); let body: any; - body = JSON.stringify(se_GetDatabaseInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -589,7 +525,7 @@ export const se_GetDataCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataCatalog"); let body: any; - body = JSON.stringify(se_GetDataCatalogInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -602,7 +538,7 @@ export const se_GetNamedQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNamedQuery"); let body: any; - body = JSON.stringify(se_GetNamedQueryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -615,7 +551,7 @@ export const se_GetNotebookMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNotebookMetadata"); let body: any; - body = JSON.stringify(se_GetNotebookMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -628,7 +564,7 @@ export const se_GetPreparedStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPreparedStatement"); let body: any; - body = JSON.stringify(se_GetPreparedStatementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -641,7 +577,7 @@ export const se_GetQueryExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueryExecution"); let body: any; - body = JSON.stringify(se_GetQueryExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -654,7 +590,7 @@ export const se_GetQueryResultsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueryResults"); let body: any; - body = JSON.stringify(se_GetQueryResultsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -667,7 +603,7 @@ export const se_GetQueryRuntimeStatisticsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueryRuntimeStatistics"); let body: any; - body = JSON.stringify(se_GetQueryRuntimeStatisticsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -680,7 +616,7 @@ export const se_GetSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSession"); let body: any; - body = JSON.stringify(se_GetSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -693,7 +629,7 @@ export const se_GetSessionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSessionStatus"); let body: any; - body = JSON.stringify(se_GetSessionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -706,7 +642,7 @@ export const se_GetTableMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTableMetadata"); let body: any; - body = JSON.stringify(se_GetTableMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -719,7 +655,7 @@ export const se_GetWorkGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkGroup"); let body: any; - body = JSON.stringify(se_GetWorkGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -732,7 +668,7 @@ export const se_ImportNotebookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportNotebook"); let body: any; - body = JSON.stringify(se_ImportNotebookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -745,7 +681,7 @@ export const se_ListApplicationDPUSizesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplicationDPUSizes"); let body: any; - body = JSON.stringify(se_ListApplicationDPUSizesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -758,7 +694,7 @@ export const se_ListCalculationExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCalculationExecutions"); let body: any; - body = JSON.stringify(se_ListCalculationExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -771,7 +707,7 @@ export const se_ListDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatabases"); let body: any; - body = JSON.stringify(se_ListDatabasesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -784,7 +720,7 @@ export const se_ListDataCatalogsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDataCatalogs"); let body: any; - body = JSON.stringify(se_ListDataCatalogsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -797,7 +733,7 @@ export const se_ListEngineVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEngineVersions"); let body: any; - body = JSON.stringify(se_ListEngineVersionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -810,7 +746,7 @@ export const se_ListExecutorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExecutors"); let body: any; - body = JSON.stringify(se_ListExecutorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -823,7 +759,7 @@ export const se_ListNamedQueriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListNamedQueries"); let body: any; - body = JSON.stringify(se_ListNamedQueriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -836,7 +772,7 @@ export const se_ListNotebookMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListNotebookMetadata"); let body: any; - body = JSON.stringify(se_ListNotebookMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -849,7 +785,7 @@ export const se_ListNotebookSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListNotebookSessions"); let body: any; - body = JSON.stringify(se_ListNotebookSessionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -862,7 +798,7 @@ export const se_ListPreparedStatementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPreparedStatements"); let body: any; - body = JSON.stringify(se_ListPreparedStatementsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -875,7 +811,7 @@ export const se_ListQueryExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListQueryExecutions"); let body: any; - body = JSON.stringify(se_ListQueryExecutionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -888,7 +824,7 @@ export const se_ListSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSessions"); let body: any; - body = JSON.stringify(se_ListSessionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -901,7 +837,7 @@ export const se_ListTableMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTableMetadata"); let body: any; - body = JSON.stringify(se_ListTableMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -914,7 +850,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -927,7 +863,7 @@ export const se_ListWorkGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkGroups"); let body: any; - body = JSON.stringify(se_ListWorkGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -940,7 +876,7 @@ export const se_StartCalculationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartCalculationExecution"); let body: any; - body = JSON.stringify(se_StartCalculationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -966,7 +902,7 @@ export const se_StartSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartSession"); let body: any; - body = JSON.stringify(se_StartSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -979,7 +915,7 @@ export const se_StopCalculationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopCalculationExecution"); let body: any; - body = JSON.stringify(se_StopCalculationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1005,7 +941,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1018,7 +954,7 @@ export const se_TerminateSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TerminateSession"); let body: any; - body = JSON.stringify(se_TerminateSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1031,7 +967,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1044,7 +980,7 @@ export const se_UpdateDataCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDataCatalog"); let body: any; - body = JSON.stringify(se_UpdateDataCatalogInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1057,7 +993,7 @@ export const se_UpdateNamedQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNamedQuery"); let body: any; - body = JSON.stringify(se_UpdateNamedQueryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1070,7 +1006,7 @@ export const se_UpdateNotebookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNotebook"); let body: any; - body = JSON.stringify(se_UpdateNotebookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1083,7 +1019,7 @@ export const se_UpdateNotebookMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNotebookMetadata"); let body: any; - body = JSON.stringify(se_UpdateNotebookMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1096,7 +1032,7 @@ export const se_UpdatePreparedStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePreparedStatement"); let body: any; - body = JSON.stringify(se_UpdatePreparedStatementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1109,7 +1045,7 @@ export const se_UpdateWorkGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkGroup"); let body: any; - body = JSON.stringify(se_UpdateWorkGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1125,12 +1061,12 @@ export const de_BatchGetNamedQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetNamedQueryOutput(data, context); + contents = _json(data); const response: BatchGetNamedQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1154,10 +1090,9 @@ const de_BatchGetNamedQueryCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1180,7 +1115,7 @@ export const de_BatchGetPreparedStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1204,10 +1139,9 @@ const de_BatchGetPreparedStatementCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1230,7 +1164,7 @@ export const de_BatchGetQueryExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1254,10 +1188,9 @@ const de_BatchGetQueryExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1275,12 +1208,12 @@ export const de_CreateDataCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataCatalogOutput(data, context); + contents = _json(data); const response: CreateDataCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1304,10 +1237,9 @@ const de_CreateDataCatalogCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1325,12 +1257,12 @@ export const de_CreateNamedQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNamedQueryOutput(data, context); + contents = _json(data); const response: CreateNamedQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1354,10 +1286,9 @@ const de_CreateNamedQueryCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1375,12 +1306,12 @@ export const de_CreateNotebookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNotebookOutput(data, context); + contents = _json(data); const response: CreateNotebookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1407,10 +1338,9 @@ const de_CreateNotebookCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1428,12 +1358,12 @@ export const de_CreatePreparedStatementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePreparedStatementOutput(data, context); + contents = _json(data); const response: CreatePreparedStatementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1457,10 +1387,9 @@ const de_CreatePreparedStatementCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,12 +1407,12 @@ export const de_CreatePresignedNotebookUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePresignedNotebookUrlResponse(data, context); + contents = _json(data); const response: CreatePresignedNotebookUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1510,10 +1439,9 @@ const de_CreatePresignedNotebookUrlCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1531,12 +1459,12 @@ export const de_CreateWorkGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkGroupOutput(data, context); + contents = _json(data); const response: CreateWorkGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1560,10 +1488,9 @@ const de_CreateWorkGroupCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1581,12 +1508,12 @@ export const de_DeleteDataCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDataCatalogOutput(data, context); + contents = _json(data); const response: DeleteDataCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1610,10 +1537,9 @@ const de_DeleteDataCatalogCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1631,12 +1557,12 @@ export const de_DeleteNamedQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNamedQueryOutput(data, context); + contents = _json(data); const response: DeleteNamedQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1660,10 +1586,9 @@ const de_DeleteNamedQueryCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1681,12 +1606,12 @@ export const de_DeleteNotebookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNotebookOutput(data, context); + contents = _json(data); const response: DeleteNotebookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1713,10 +1638,9 @@ const de_DeleteNotebookCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1734,12 +1658,12 @@ export const de_DeletePreparedStatementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePreparedStatementOutput(data, context); + contents = _json(data); const response: DeletePreparedStatementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1766,10 +1690,9 @@ const de_DeletePreparedStatementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1787,12 +1710,12 @@ export const de_DeleteWorkGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkGroupOutput(data, context); + contents = _json(data); const response: DeleteWorkGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1816,10 +1739,9 @@ const de_DeleteWorkGroupCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1842,7 +1764,7 @@ export const de_ExportNotebookCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1869,10 +1791,9 @@ const de_ExportNotebookCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1895,7 +1816,7 @@ export const de_GetCalculationExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1922,10 +1843,9 @@ const de_GetCalculationExecutionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1943,12 +1863,12 @@ export const de_GetCalculationExecutionCodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCalculationExecutionCodeResponse(data, context); + contents = _json(data); const response: GetCalculationExecutionCodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1975,10 +1895,9 @@ const de_GetCalculationExecutionCodeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2001,7 +1920,7 @@ export const de_GetCalculationExecutionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2028,10 +1947,9 @@ const de_GetCalculationExecutionStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2049,12 +1967,12 @@ export const de_GetDatabaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDatabaseOutput(data, context); + contents = _json(data); const response: GetDatabaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2081,10 +1999,9 @@ const de_GetDatabaseCommandError = async ( throw await de_MetadataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2102,12 +2019,12 @@ export const de_GetDataCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDataCatalogOutput(data, context); + contents = _json(data); const response: GetDataCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2131,10 +2048,9 @@ const de_GetDataCatalogCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2152,12 +2068,12 @@ export const de_GetNamedQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetNamedQueryOutput(data, context); + contents = _json(data); const response: GetNamedQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2181,10 +2097,9 @@ const de_GetNamedQueryCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2207,7 +2122,7 @@ export const de_GetNotebookMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2234,10 +2149,9 @@ const de_GetNotebookMetadataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2260,7 +2174,7 @@ export const de_GetPreparedStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2287,10 +2201,9 @@ const de_GetPreparedStatementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2313,7 +2226,7 @@ export const de_GetQueryExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2337,10 +2250,9 @@ const de_GetQueryExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2358,12 +2270,12 @@ export const de_GetQueryResultsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetQueryResultsOutput(data, context); + contents = _json(data); const response: GetQueryResultsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2390,10 +2302,9 @@ const de_GetQueryResultsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2416,7 +2327,7 @@ export const de_GetQueryRuntimeStatisticsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2440,10 +2351,9 @@ const de_GetQueryRuntimeStatisticsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2466,7 +2376,7 @@ export const de_GetSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2493,10 +2403,9 @@ const de_GetSessionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,7 +2428,7 @@ export const de_GetSessionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2546,10 +2455,9 @@ const de_GetSessionStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2572,7 +2480,7 @@ export const de_GetTableMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2599,10 +2507,9 @@ const de_GetTableMetadataCommandError = async ( throw await de_MetadataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2625,7 +2532,7 @@ export const de_GetWorkGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2649,10 +2556,9 @@ const de_GetWorkGroupCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2670,12 +2576,12 @@ export const de_ImportNotebookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportNotebookOutput(data, context); + contents = _json(data); const response: ImportNotebookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2702,10 +2608,9 @@ const de_ImportNotebookCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2723,12 +2628,12 @@ export const de_ListApplicationDPUSizesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationDPUSizesOutput(data, context); + contents = _json(data); const response: ListApplicationDPUSizesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2755,10 +2660,9 @@ const de_ListApplicationDPUSizesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2781,7 +2685,7 @@ export const de_ListCalculationExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2808,10 +2712,9 @@ const de_ListCalculationExecutionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2829,12 +2732,12 @@ export const de_ListDatabasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDatabasesOutput(data, context); + contents = _json(data); const response: ListDatabasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2861,10 +2764,9 @@ const de_ListDatabasesCommandError = async ( throw await de_MetadataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2882,12 +2784,12 @@ export const de_ListDataCatalogsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDataCatalogsOutput(data, context); + contents = _json(data); const response: ListDataCatalogsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2911,10 +2813,9 @@ const de_ListDataCatalogsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2932,12 +2833,12 @@ export const de_ListEngineVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEngineVersionsOutput(data, context); + contents = _json(data); const response: ListEngineVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2961,10 +2862,9 @@ const de_ListEngineVersionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2982,12 +2882,12 @@ export const de_ListExecutorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListExecutorsResponse(data, context); + contents = _json(data); const response: ListExecutorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3014,10 +2914,9 @@ const de_ListExecutorsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3035,12 +2934,12 @@ export const de_ListNamedQueriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListNamedQueriesOutput(data, context); + contents = _json(data); const response: ListNamedQueriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3064,10 +2963,9 @@ const de_ListNamedQueriesCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3090,7 +2988,7 @@ export const de_ListNotebookMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3117,10 +3015,9 @@ const de_ListNotebookMetadataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3143,7 +3040,7 @@ export const de_ListNotebookSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3170,10 +3067,9 @@ const de_ListNotebookSessionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3196,7 +3092,7 @@ export const de_ListPreparedStatementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3220,10 +3116,9 @@ const de_ListPreparedStatementsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3241,12 +3136,12 @@ export const de_ListQueryExecutionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListQueryExecutionsOutput(data, context); + contents = _json(data); const response: ListQueryExecutionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3270,10 +3165,9 @@ const de_ListQueryExecutionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3296,7 +3190,7 @@ export const de_ListSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3323,10 +3217,9 @@ const de_ListSessionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3349,7 +3242,7 @@ export const de_ListTableMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3376,10 +3269,9 @@ const de_ListTableMetadataCommandError = async ( throw await de_MetadataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3397,12 +3289,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3429,10 +3321,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3455,7 +3346,7 @@ export const de_ListWorkGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3479,10 +3370,9 @@ const de_ListWorkGroupsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3500,12 +3390,12 @@ export const de_StartCalculationExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartCalculationExecutionResponse(data, context); + contents = _json(data); const response: StartCalculationExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3532,10 +3422,9 @@ const de_StartCalculationExecutionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3553,12 +3442,12 @@ export const de_StartQueryExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartQueryExecutionOutput(data, context); + contents = _json(data); const response: StartQueryExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3585,10 +3474,9 @@ const de_StartQueryExecutionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3606,12 +3494,12 @@ export const de_StartSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSessionResponse(data, context); + contents = _json(data); const response: StartSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3644,10 +3532,9 @@ const de_StartSessionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3665,12 +3552,12 @@ export const de_StopCalculationExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopCalculationExecutionResponse(data, context); + contents = _json(data); const response: StopCalculationExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3697,10 +3584,9 @@ const de_StopCalculationExecutionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3718,12 +3604,12 @@ export const de_StopQueryExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopQueryExecutionOutput(data, context); + contents = _json(data); const response: StopQueryExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3747,10 +3633,9 @@ const de_StopQueryExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3768,12 +3653,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3800,10 +3685,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3821,12 +3705,12 @@ export const de_TerminateSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TerminateSessionResponse(data, context); + contents = _json(data); const response: TerminateSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3853,10 +3737,9 @@ const de_TerminateSessionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3874,12 +3757,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3906,10 +3789,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3927,12 +3809,12 @@ export const de_UpdateDataCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDataCatalogOutput(data, context); + contents = _json(data); const response: UpdateDataCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3956,10 +3838,9 @@ const de_UpdateDataCatalogCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3977,12 +3858,12 @@ export const de_UpdateNamedQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNamedQueryOutput(data, context); + contents = _json(data); const response: UpdateNamedQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4006,10 +3887,9 @@ const de_UpdateNamedQueryCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4027,12 +3907,12 @@ export const de_UpdateNotebookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNotebookOutput(data, context); + contents = _json(data); const response: UpdateNotebookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4059,10 +3939,9 @@ const de_UpdateNotebookCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4080,12 +3959,12 @@ export const de_UpdateNotebookMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNotebookMetadataOutput(data, context); + contents = _json(data); const response: UpdateNotebookMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4112,10 +3991,9 @@ const de_UpdateNotebookMetadataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4133,12 +4011,12 @@ export const de_UpdatePreparedStatementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePreparedStatementOutput(data, context); + contents = _json(data); const response: UpdatePreparedStatementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4165,10 +4043,9 @@ const de_UpdatePreparedStatementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4186,12 +4063,12 @@ export const de_UpdateWorkGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWorkGroupOutput(data, context); + contents = _json(data); const response: UpdateWorkGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4215,10 +4092,9 @@ const de_UpdateWorkGroupCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4232,7 +4108,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4248,7 +4124,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4261,7 +4137,7 @@ const de_InvalidRequestExceptionRes = async ( */ const de_MetadataExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MetadataException(body, context); + const deserialized: any = _json(body); const exception = new MetadataException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4277,7 +4153,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4293,7 +4169,7 @@ const de_SessionAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SessionAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new SessionAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4309,7 +4185,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4317,1066 +4193,240 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AclConfiguration - */ -const se_AclConfiguration = (input: AclConfiguration, context: __SerdeContext): any => { - return { - ...(input.S3AclOption != null && { S3AclOption: input.S3AclOption }), - }; -}; +// se_AclConfiguration omitted. -/** - * serializeAws_json1_1BatchGetNamedQueryInput - */ -const se_BatchGetNamedQueryInput = (input: BatchGetNamedQueryInput, context: __SerdeContext): any => { - return { - ...(input.NamedQueryIds != null && { NamedQueryIds: se_NamedQueryIdList(input.NamedQueryIds, context) }), - }; -}; +// se_BatchGetNamedQueryInput omitted. -/** - * serializeAws_json1_1BatchGetPreparedStatementInput - */ -const se_BatchGetPreparedStatementInput = (input: BatchGetPreparedStatementInput, context: __SerdeContext): any => { - return { - ...(input.PreparedStatementNames != null && { - PreparedStatementNames: se_PreparedStatementNameList(input.PreparedStatementNames, context), - }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_BatchGetPreparedStatementInput omitted. -/** - * serializeAws_json1_1BatchGetQueryExecutionInput - */ -const se_BatchGetQueryExecutionInput = (input: BatchGetQueryExecutionInput, context: __SerdeContext): any => { - return { - ...(input.QueryExecutionIds != null && { - QueryExecutionIds: se_QueryExecutionIdList(input.QueryExecutionIds, context), - }), - }; -}; +// se_BatchGetQueryExecutionInput omitted. -/** - * serializeAws_json1_1CalculationConfiguration - */ -const se_CalculationConfiguration = (input: CalculationConfiguration, context: __SerdeContext): any => { - return { - ...(input.CodeBlock != null && { CodeBlock: input.CodeBlock }), - }; -}; +// se_CalculationConfiguration omitted. -/** - * serializeAws_json1_1CreateDataCatalogInput - */ -const se_CreateDataCatalogInput = (input: CreateDataCatalogInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_CreateDataCatalogInput omitted. /** * serializeAws_json1_1CreateNamedQueryInput */ const se_CreateNamedQueryInput = (input: CreateNamedQueryInput, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Database != null && { Database: input.Database }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Database: [], + Description: [], + Name: [], + QueryString: [], + WorkGroup: [], + }); }; -/** - * serializeAws_json1_1CreateNotebookInput - */ -const se_CreateNotebookInput = (input: CreateNotebookInput, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_CreateNotebookInput omitted. -/** - * serializeAws_json1_1CreatePreparedStatementInput - */ -const se_CreatePreparedStatementInput = (input: CreatePreparedStatementInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.QueryStatement != null && { QueryStatement: input.QueryStatement }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_CreatePreparedStatementInput omitted. -/** - * serializeAws_json1_1CreatePresignedNotebookUrlRequest - */ -const se_CreatePresignedNotebookUrlRequest = ( - input: CreatePresignedNotebookUrlRequest, - context: __SerdeContext -): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; +// se_CreatePresignedNotebookUrlRequest omitted. -/** - * serializeAws_json1_1CreateWorkGroupInput - */ -const se_CreateWorkGroupInput = (input: CreateWorkGroupInput, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: se_WorkGroupConfiguration(input.Configuration, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateWorkGroupInput omitted. -/** - * serializeAws_json1_1CustomerContentEncryptionConfiguration - */ -const se_CustomerContentEncryptionConfiguration = ( - input: CustomerContentEncryptionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - }; -}; +// se_CustomerContentEncryptionConfiguration omitted. -/** - * serializeAws_json1_1DeleteDataCatalogInput - */ -const se_DeleteDataCatalogInput = (input: DeleteDataCatalogInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteDataCatalogInput omitted. /** * serializeAws_json1_1DeleteNamedQueryInput */ const se_DeleteNamedQueryInput = (input: DeleteNamedQueryInput, context: __SerdeContext): any => { - return { - NamedQueryId: input.NamedQueryId ?? generateIdempotencyToken(), - }; + return take(input, { + NamedQueryId: (_) => _ ?? generateIdempotencyToken(), + }); }; -/** - * serializeAws_json1_1DeleteNotebookInput - */ -const se_DeleteNotebookInput = (input: DeleteNotebookInput, context: __SerdeContext): any => { - return { - ...(input.NotebookId != null && { NotebookId: input.NotebookId }), - }; -}; +// se_DeleteNotebookInput omitted. -/** - * serializeAws_json1_1DeletePreparedStatementInput - */ -const se_DeletePreparedStatementInput = (input: DeletePreparedStatementInput, context: __SerdeContext): any => { - return { - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_DeletePreparedStatementInput omitted. -/** - * serializeAws_json1_1DeleteWorkGroupInput - */ -const se_DeleteWorkGroupInput = (input: DeleteWorkGroupInput, context: __SerdeContext): any => { - return { - ...(input.RecursiveDeleteOption != null && { RecursiveDeleteOption: input.RecursiveDeleteOption }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_DeleteWorkGroupInput omitted. -/** - * serializeAws_json1_1EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - }; -}; +// se_EncryptionConfiguration omitted. -/** - * serializeAws_json1_1EngineConfiguration - */ -const se_EngineConfiguration = (input: EngineConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdditionalConfigs != null && { AdditionalConfigs: se_ParametersMap(input.AdditionalConfigs, context) }), - ...(input.CoordinatorDpuSize != null && { CoordinatorDpuSize: input.CoordinatorDpuSize }), - ...(input.DefaultExecutorDpuSize != null && { DefaultExecutorDpuSize: input.DefaultExecutorDpuSize }), - ...(input.MaxConcurrentDpus != null && { MaxConcurrentDpus: input.MaxConcurrentDpus }), - }; -}; +// se_EngineConfiguration omitted. -/** - * serializeAws_json1_1EngineVersion - */ -const se_EngineVersion = (input: EngineVersion, context: __SerdeContext): any => { - return { - ...(input.EffectiveEngineVersion != null && { EffectiveEngineVersion: input.EffectiveEngineVersion }), - ...(input.SelectedEngineVersion != null && { SelectedEngineVersion: input.SelectedEngineVersion }), - }; -}; +// se_EngineVersion omitted. -/** - * serializeAws_json1_1ExecutionParameters - */ -const se_ExecutionParameters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExecutionParameters omitted. -/** - * serializeAws_json1_1ExportNotebookInput - */ -const se_ExportNotebookInput = (input: ExportNotebookInput, context: __SerdeContext): any => { - return { - ...(input.NotebookId != null && { NotebookId: input.NotebookId }), - }; -}; +// se_ExportNotebookInput omitted. -/** - * serializeAws_json1_1FilterDefinition - */ -const se_FilterDefinition = (input: FilterDefinition, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_FilterDefinition omitted. -/** - * serializeAws_json1_1GetCalculationExecutionCodeRequest - */ -const se_GetCalculationExecutionCodeRequest = ( - input: GetCalculationExecutionCodeRequest, - context: __SerdeContext -): any => { - return { - ...(input.CalculationExecutionId != null && { CalculationExecutionId: input.CalculationExecutionId }), - }; -}; +// se_GetCalculationExecutionCodeRequest omitted. -/** - * serializeAws_json1_1GetCalculationExecutionRequest - */ -const se_GetCalculationExecutionRequest = (input: GetCalculationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.CalculationExecutionId != null && { CalculationExecutionId: input.CalculationExecutionId }), - }; -}; +// se_GetCalculationExecutionRequest omitted. -/** - * serializeAws_json1_1GetCalculationExecutionStatusRequest - */ -const se_GetCalculationExecutionStatusRequest = ( - input: GetCalculationExecutionStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.CalculationExecutionId != null && { CalculationExecutionId: input.CalculationExecutionId }), - }; -}; +// se_GetCalculationExecutionStatusRequest omitted. -/** - * serializeAws_json1_1GetDatabaseInput - */ -const se_GetDatabaseInput = (input: GetDatabaseInput, context: __SerdeContext): any => { - return { - ...(input.CatalogName != null && { CatalogName: input.CatalogName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - }; -}; +// se_GetDatabaseInput omitted. -/** - * serializeAws_json1_1GetDataCatalogInput - */ -const se_GetDataCatalogInput = (input: GetDataCatalogInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_GetDataCatalogInput omitted. -/** - * serializeAws_json1_1GetNamedQueryInput - */ -const se_GetNamedQueryInput = (input: GetNamedQueryInput, context: __SerdeContext): any => { - return { - ...(input.NamedQueryId != null && { NamedQueryId: input.NamedQueryId }), - }; -}; +// se_GetNamedQueryInput omitted. -/** - * serializeAws_json1_1GetNotebookMetadataInput - */ -const se_GetNotebookMetadataInput = (input: GetNotebookMetadataInput, context: __SerdeContext): any => { - return { - ...(input.NotebookId != null && { NotebookId: input.NotebookId }), - }; -}; +// se_GetNotebookMetadataInput omitted. -/** - * serializeAws_json1_1GetPreparedStatementInput - */ -const se_GetPreparedStatementInput = (input: GetPreparedStatementInput, context: __SerdeContext): any => { - return { - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_GetPreparedStatementInput omitted. -/** - * serializeAws_json1_1GetQueryExecutionInput - */ -const se_GetQueryExecutionInput = (input: GetQueryExecutionInput, context: __SerdeContext): any => { - return { - ...(input.QueryExecutionId != null && { QueryExecutionId: input.QueryExecutionId }), - }; -}; +// se_GetQueryExecutionInput omitted. -/** - * serializeAws_json1_1GetQueryResultsInput - */ -const se_GetQueryResultsInput = (input: GetQueryResultsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryExecutionId != null && { QueryExecutionId: input.QueryExecutionId }), - }; -}; +// se_GetQueryResultsInput omitted. -/** - * serializeAws_json1_1GetQueryRuntimeStatisticsInput - */ -const se_GetQueryRuntimeStatisticsInput = (input: GetQueryRuntimeStatisticsInput, context: __SerdeContext): any => { - return { - ...(input.QueryExecutionId != null && { QueryExecutionId: input.QueryExecutionId }), - }; -}; +// se_GetQueryRuntimeStatisticsInput omitted. -/** - * serializeAws_json1_1GetSessionRequest - */ -const se_GetSessionRequest = (input: GetSessionRequest, context: __SerdeContext): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; +// se_GetSessionRequest omitted. -/** - * serializeAws_json1_1GetSessionStatusRequest - */ -const se_GetSessionStatusRequest = (input: GetSessionStatusRequest, context: __SerdeContext): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; +// se_GetSessionStatusRequest omitted. -/** - * serializeAws_json1_1GetTableMetadataInput - */ -const se_GetTableMetadataInput = (input: GetTableMetadataInput, context: __SerdeContext): any => { - return { - ...(input.CatalogName != null && { CatalogName: input.CatalogName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_GetTableMetadataInput omitted. -/** - * serializeAws_json1_1GetWorkGroupInput - */ -const se_GetWorkGroupInput = (input: GetWorkGroupInput, context: __SerdeContext): any => { - return { - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_GetWorkGroupInput omitted. -/** - * serializeAws_json1_1ImportNotebookInput - */ -const se_ImportNotebookInput = (input: ImportNotebookInput, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Payload != null && { Payload: input.Payload }), - ...(input.Type != null && { Type: input.Type }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_ImportNotebookInput omitted. -/** - * serializeAws_json1_1ListApplicationDPUSizesInput - */ -const se_ListApplicationDPUSizesInput = (input: ListApplicationDPUSizesInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListApplicationDPUSizesInput omitted. -/** - * serializeAws_json1_1ListCalculationExecutionsRequest - */ -const se_ListCalculationExecutionsRequest = (input: ListCalculationExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - ...(input.StateFilter != null && { StateFilter: input.StateFilter }), - }; -}; +// se_ListCalculationExecutionsRequest omitted. -/** - * serializeAws_json1_1ListDatabasesInput - */ -const se_ListDatabasesInput = (input: ListDatabasesInput, context: __SerdeContext): any => { - return { - ...(input.CatalogName != null && { CatalogName: input.CatalogName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatabasesInput omitted. -/** - * serializeAws_json1_1ListDataCatalogsInput - */ -const se_ListDataCatalogsInput = (input: ListDataCatalogsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDataCatalogsInput omitted. -/** - * serializeAws_json1_1ListEngineVersionsInput - */ -const se_ListEngineVersionsInput = (input: ListEngineVersionsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListEngineVersionsInput omitted. -/** - * serializeAws_json1_1ListExecutorsRequest - */ -const se_ListExecutorsRequest = (input: ListExecutorsRequest, context: __SerdeContext): any => { - return { - ...(input.ExecutorStateFilter != null && { ExecutorStateFilter: input.ExecutorStateFilter }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; +// se_ListExecutorsRequest omitted. -/** - * serializeAws_json1_1ListNamedQueriesInput - */ -const se_ListNamedQueriesInput = (input: ListNamedQueriesInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_ListNamedQueriesInput omitted. -/** - * serializeAws_json1_1ListNotebookMetadataInput - */ -const se_ListNotebookMetadataInput = (input: ListNotebookMetadataInput, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterDefinition(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_ListNotebookMetadataInput omitted. -/** - * serializeAws_json1_1ListNotebookSessionsRequest - */ -const se_ListNotebookSessionsRequest = (input: ListNotebookSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.NotebookId != null && { NotebookId: input.NotebookId }), - }; -}; +// se_ListNotebookSessionsRequest omitted. -/** - * serializeAws_json1_1ListPreparedStatementsInput - */ -const se_ListPreparedStatementsInput = (input: ListPreparedStatementsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_ListPreparedStatementsInput omitted. -/** - * serializeAws_json1_1ListQueryExecutionsInput - */ -const se_ListQueryExecutionsInput = (input: ListQueryExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_ListQueryExecutionsInput omitted. -/** - * serializeAws_json1_1ListSessionsRequest - */ -const se_ListSessionsRequest = (input: ListSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StateFilter != null && { StateFilter: input.StateFilter }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; +// se_ListSessionsRequest omitted. -/** - * serializeAws_json1_1ListTableMetadataInput - */ -const se_ListTableMetadataInput = (input: ListTableMetadataInput, context: __SerdeContext): any => { - return { - ...(input.CatalogName != null && { CatalogName: input.CatalogName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTableMetadataInput omitted. -/** - * serializeAws_json1_1ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_1ListWorkGroupsInput - */ -const se_ListWorkGroupsInput = (input: ListWorkGroupsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWorkGroupsInput omitted. -/** - * serializeAws_json1_1NamedQueryIdList - */ -const se_NamedQueryIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NamedQueryIdList omitted. -/** - * serializeAws_json1_1ParametersMap - */ -const se_ParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ParametersMap omitted. -/** - * serializeAws_json1_1PreparedStatementNameList - */ -const se_PreparedStatementNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PreparedStatementNameList omitted. -/** - * serializeAws_json1_1QueryExecutionContext - */ -const se_QueryExecutionContext = (input: QueryExecutionContext, context: __SerdeContext): any => { - return { - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.Database != null && { Database: input.Database }), - }; -}; +// se_QueryExecutionContext omitted. -/** - * serializeAws_json1_1QueryExecutionIdList - */ -const se_QueryExecutionIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_QueryExecutionIdList omitted. -/** - * serializeAws_json1_1ResultConfiguration - */ -const se_ResultConfiguration = (input: ResultConfiguration, context: __SerdeContext): any => { - return { - ...(input.AclConfiguration != null && { AclConfiguration: se_AclConfiguration(input.AclConfiguration, context) }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.ExpectedBucketOwner != null && { ExpectedBucketOwner: input.ExpectedBucketOwner }), - ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }), - }; -}; +// se_ResultConfiguration omitted. -/** - * serializeAws_json1_1ResultConfigurationUpdates - */ -const se_ResultConfigurationUpdates = (input: ResultConfigurationUpdates, context: __SerdeContext): any => { - return { - ...(input.AclConfiguration != null && { AclConfiguration: se_AclConfiguration(input.AclConfiguration, context) }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.ExpectedBucketOwner != null && { ExpectedBucketOwner: input.ExpectedBucketOwner }), - ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }), - ...(input.RemoveAclConfiguration != null && { RemoveAclConfiguration: input.RemoveAclConfiguration }), - ...(input.RemoveEncryptionConfiguration != null && { - RemoveEncryptionConfiguration: input.RemoveEncryptionConfiguration, - }), - ...(input.RemoveExpectedBucketOwner != null && { RemoveExpectedBucketOwner: input.RemoveExpectedBucketOwner }), - ...(input.RemoveOutputLocation != null && { RemoveOutputLocation: input.RemoveOutputLocation }), - }; -}; +// se_ResultConfigurationUpdates omitted. -/** - * serializeAws_json1_1ResultReuseByAgeConfiguration - */ -const se_ResultReuseByAgeConfiguration = (input: ResultReuseByAgeConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.MaxAgeInMinutes != null && { MaxAgeInMinutes: input.MaxAgeInMinutes }), - }; -}; +// se_ResultReuseByAgeConfiguration omitted. -/** - * serializeAws_json1_1ResultReuseConfiguration - */ -const se_ResultReuseConfiguration = (input: ResultReuseConfiguration, context: __SerdeContext): any => { - return { - ...(input.ResultReuseByAgeConfiguration != null && { - ResultReuseByAgeConfiguration: se_ResultReuseByAgeConfiguration(input.ResultReuseByAgeConfiguration, context), - }), - }; -}; +// se_ResultReuseConfiguration omitted. -/** - * serializeAws_json1_1StartCalculationExecutionRequest - */ -const se_StartCalculationExecutionRequest = (input: StartCalculationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.CalculationConfiguration != null && { - CalculationConfiguration: se_CalculationConfiguration(input.CalculationConfiguration, context), - }), - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.CodeBlock != null && { CodeBlock: input.CodeBlock }), - ...(input.Description != null && { Description: input.Description }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; +// se_StartCalculationExecutionRequest omitted. /** * serializeAws_json1_1StartQueryExecutionInput */ const se_StartQueryExecutionInput = (input: StartQueryExecutionInput, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ExecutionParameters != null && { - ExecutionParameters: se_ExecutionParameters(input.ExecutionParameters, context), - }), - ...(input.QueryExecutionContext != null && { - QueryExecutionContext: se_QueryExecutionContext(input.QueryExecutionContext, context), - }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.ResultConfiguration != null && { - ResultConfiguration: se_ResultConfiguration(input.ResultConfiguration, context), - }), - ...(input.ResultReuseConfiguration != null && { - ResultReuseConfiguration: se_ResultReuseConfiguration(input.ResultReuseConfiguration, context), - }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; - -/** - * serializeAws_json1_1StartSessionRequest - */ -const se_StartSessionRequest = (input: StartSessionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EngineConfiguration != null && { - EngineConfiguration: se_EngineConfiguration(input.EngineConfiguration, context), - }), - ...(input.NotebookVersion != null && { NotebookVersion: input.NotebookVersion }), - ...(input.SessionIdleTimeoutInMinutes != null && { - SessionIdleTimeoutInMinutes: input.SessionIdleTimeoutInMinutes, - }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; - -/** - * serializeAws_json1_1StopCalculationExecutionRequest - */ -const se_StopCalculationExecutionRequest = (input: StopCalculationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.CalculationExecutionId != null && { CalculationExecutionId: input.CalculationExecutionId }), - }; -}; - -/** - * serializeAws_json1_1StopQueryExecutionInput - */ -const se_StopQueryExecutionInput = (input: StopQueryExecutionInput, context: __SerdeContext): any => { - return { - QueryExecutionId: input.QueryExecutionId ?? generateIdempotencyToken(), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1TerminateSessionRequest - */ -const se_TerminateSessionRequest = (input: TerminateSessionRequest, context: __SerdeContext): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateDataCatalogInput - */ -const se_UpdateDataCatalogInput = (input: UpdateDataCatalogInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1UpdateNamedQueryInput - */ -const se_UpdateNamedQueryInput = (input: UpdateNamedQueryInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NamedQueryId != null && { NamedQueryId: input.NamedQueryId }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - }; -}; - -/** - * serializeAws_json1_1UpdateNotebookInput - */ -const se_UpdateNotebookInput = (input: UpdateNotebookInput, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.NotebookId != null && { NotebookId: input.NotebookId }), - ...(input.Payload != null && { Payload: input.Payload }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1UpdateNotebookMetadataInput - */ -const se_UpdateNotebookMetadataInput = (input: UpdateNotebookMetadataInput, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotebookId != null && { NotebookId: input.NotebookId }), - }; -}; - -/** - * serializeAws_json1_1UpdatePreparedStatementInput - */ -const se_UpdatePreparedStatementInput = (input: UpdatePreparedStatementInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.QueryStatement != null && { QueryStatement: input.QueryStatement }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; - -/** - * serializeAws_json1_1UpdateWorkGroupInput - */ -const se_UpdateWorkGroupInput = (input: UpdateWorkGroupInput, context: __SerdeContext): any => { - return { - ...(input.ConfigurationUpdates != null && { - ConfigurationUpdates: se_WorkGroupConfigurationUpdates(input.ConfigurationUpdates, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.State != null && { State: input.State }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; - -/** - * serializeAws_json1_1WorkGroupConfiguration - */ -const se_WorkGroupConfiguration = (input: WorkGroupConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdditionalConfiguration != null && { AdditionalConfiguration: input.AdditionalConfiguration }), - ...(input.BytesScannedCutoffPerQuery != null && { BytesScannedCutoffPerQuery: input.BytesScannedCutoffPerQuery }), - ...(input.CustomerContentEncryptionConfiguration != null && { - CustomerContentEncryptionConfiguration: se_CustomerContentEncryptionConfiguration( - input.CustomerContentEncryptionConfiguration, - context - ), - }), - ...(input.EnableMinimumEncryptionConfiguration != null && { - EnableMinimumEncryptionConfiguration: input.EnableMinimumEncryptionConfiguration, - }), - ...(input.EnforceWorkGroupConfiguration != null && { - EnforceWorkGroupConfiguration: input.EnforceWorkGroupConfiguration, - }), - ...(input.EngineVersion != null && { EngineVersion: se_EngineVersion(input.EngineVersion, context) }), - ...(input.ExecutionRole != null && { ExecutionRole: input.ExecutionRole }), - ...(input.PublishCloudWatchMetricsEnabled != null && { - PublishCloudWatchMetricsEnabled: input.PublishCloudWatchMetricsEnabled, - }), - ...(input.RequesterPaysEnabled != null && { RequesterPaysEnabled: input.RequesterPaysEnabled }), - ...(input.ResultConfiguration != null && { - ResultConfiguration: se_ResultConfiguration(input.ResultConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1WorkGroupConfigurationUpdates - */ -const se_WorkGroupConfigurationUpdates = (input: WorkGroupConfigurationUpdates, context: __SerdeContext): any => { - return { - ...(input.AdditionalConfiguration != null && { AdditionalConfiguration: input.AdditionalConfiguration }), - ...(input.BytesScannedCutoffPerQuery != null && { BytesScannedCutoffPerQuery: input.BytesScannedCutoffPerQuery }), - ...(input.CustomerContentEncryptionConfiguration != null && { - CustomerContentEncryptionConfiguration: se_CustomerContentEncryptionConfiguration( - input.CustomerContentEncryptionConfiguration, - context - ), - }), - ...(input.EnableMinimumEncryptionConfiguration != null && { - EnableMinimumEncryptionConfiguration: input.EnableMinimumEncryptionConfiguration, - }), - ...(input.EnforceWorkGroupConfiguration != null && { - EnforceWorkGroupConfiguration: input.EnforceWorkGroupConfiguration, - }), - ...(input.EngineVersion != null && { EngineVersion: se_EngineVersion(input.EngineVersion, context) }), - ...(input.ExecutionRole != null && { ExecutionRole: input.ExecutionRole }), - ...(input.PublishCloudWatchMetricsEnabled != null && { - PublishCloudWatchMetricsEnabled: input.PublishCloudWatchMetricsEnabled, - }), - ...(input.RemoveBytesScannedCutoffPerQuery != null && { - RemoveBytesScannedCutoffPerQuery: input.RemoveBytesScannedCutoffPerQuery, - }), - ...(input.RemoveCustomerContentEncryptionConfiguration != null && { - RemoveCustomerContentEncryptionConfiguration: input.RemoveCustomerContentEncryptionConfiguration, - }), - ...(input.RequesterPaysEnabled != null && { RequesterPaysEnabled: input.RequesterPaysEnabled }), - ...(input.ResultConfigurationUpdates != null && { - ResultConfigurationUpdates: se_ResultConfigurationUpdates(input.ResultConfigurationUpdates, context), - }), - }; -}; - -/** - * deserializeAws_json1_1AclConfiguration - */ -const de_AclConfiguration = (output: any, context: __SerdeContext): AclConfiguration => { - return { - S3AclOption: __expectString(output.S3AclOption), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationDPUSizes - */ -const de_ApplicationDPUSizes = (output: any, context: __SerdeContext): ApplicationDPUSizes => { - return { - ApplicationRuntimeId: __expectString(output.ApplicationRuntimeId), - SupportedDPUSizes: - output.SupportedDPUSizes != null ? de_SupportedDPUSizeList(output.SupportedDPUSizes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationDPUSizesList - */ -const de_ApplicationDPUSizesList = (output: any, context: __SerdeContext): ApplicationDPUSizes[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationDPUSizes(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AthenaError - */ -const de_AthenaError = (output: any, context: __SerdeContext): AthenaError => { - return { - ErrorCategory: __expectInt32(output.ErrorCategory), - ErrorMessage: __expectString(output.ErrorMessage), - ErrorType: __expectInt32(output.ErrorType), - Retryable: __expectBoolean(output.Retryable), - } as any; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ExecutionParameters: _json, + QueryExecutionContext: _json, + QueryString: [], + ResultConfiguration: _json, + ResultReuseConfiguration: _json, + WorkGroup: [], + }); }; +// se_StartSessionRequest omitted. + +// se_StopCalculationExecutionRequest omitted. + /** - * deserializeAws_json1_1BatchGetNamedQueryOutput + * serializeAws_json1_1StopQueryExecutionInput */ -const de_BatchGetNamedQueryOutput = (output: any, context: __SerdeContext): BatchGetNamedQueryOutput => { - return { - NamedQueries: output.NamedQueries != null ? de_NamedQueryList(output.NamedQueries, context) : undefined, - UnprocessedNamedQueryIds: - output.UnprocessedNamedQueryIds != null - ? de_UnprocessedNamedQueryIdList(output.UnprocessedNamedQueryIds, context) - : undefined, - } as any; +const se_StopQueryExecutionInput = (input: StopQueryExecutionInput, context: __SerdeContext): any => { + return take(input, { + QueryExecutionId: (_) => _ ?? generateIdempotencyToken(), + }); }; +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceInput omitted. + +// se_TerminateSessionRequest omitted. + +// se_UntagResourceInput omitted. + +// se_UpdateDataCatalogInput omitted. + +// se_UpdateNamedQueryInput omitted. + +// se_UpdateNotebookInput omitted. + +// se_UpdateNotebookMetadataInput omitted. + +// se_UpdatePreparedStatementInput omitted. + +// se_UpdateWorkGroupInput omitted. + +// se_WorkGroupConfiguration omitted. + +// se_WorkGroupConfigurationUpdates omitted. + +// de_AclConfiguration omitted. + +// de_ApplicationDPUSizes omitted. + +// de_ApplicationDPUSizesList omitted. + +// de_AthenaError omitted. + +// de_BatchGetNamedQueryOutput omitted. + /** * deserializeAws_json1_1BatchGetPreparedStatementOutput */ const de_BatchGetPreparedStatementOutput = (output: any, context: __SerdeContext): BatchGetPreparedStatementOutput => { - return { - PreparedStatements: - output.PreparedStatements != null - ? de_PreparedStatementDetailsList(output.PreparedStatements, context) - : undefined, - UnprocessedPreparedStatementNames: - output.UnprocessedPreparedStatementNames != null - ? de_UnprocessedPreparedStatementNameList(output.UnprocessedPreparedStatementNames, context) - : undefined, - } as any; + return take(output, { + PreparedStatements: (_: any) => de_PreparedStatementDetailsList(_, context), + UnprocessedPreparedStatementNames: _json, + }) as any; }; /** * deserializeAws_json1_1BatchGetQueryExecutionOutput */ const de_BatchGetQueryExecutionOutput = (output: any, context: __SerdeContext): BatchGetQueryExecutionOutput => { - return { - QueryExecutions: - output.QueryExecutions != null ? de_QueryExecutionList(output.QueryExecutions, context) : undefined, - UnprocessedQueryExecutionIds: - output.UnprocessedQueryExecutionIds != null - ? de_UnprocessedQueryExecutionIdList(output.UnprocessedQueryExecutionIds, context) - : undefined, - } as any; + return take(output, { + QueryExecutions: (_: any) => de_QueryExecutionList(_, context), + UnprocessedQueryExecutionIds: _json, + }) as any; }; -/** - * deserializeAws_json1_1CalculationResult - */ -const de_CalculationResult = (output: any, context: __SerdeContext): CalculationResult => { - return { - ResultS3Uri: __expectString(output.ResultS3Uri), - ResultType: __expectString(output.ResultType), - StdErrorS3Uri: __expectString(output.StdErrorS3Uri), - StdOutS3Uri: __expectString(output.StdOutS3Uri), - } as any; -}; +// de_CalculationResult omitted. /** * deserializeAws_json1_1CalculationsList @@ -5385,427 +4435,121 @@ const de_CalculationsList = (output: any, context: __SerdeContext): CalculationS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CalculationSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CalculationStatistics - */ -const de_CalculationStatistics = (output: any, context: __SerdeContext): CalculationStatistics => { - return { - DpuExecutionInMillis: __expectLong(output.DpuExecutionInMillis), - Progress: __expectString(output.Progress), - } as any; -}; +// de_CalculationStatistics omitted. /** * deserializeAws_json1_1CalculationStatus */ const de_CalculationStatus = (output: any, context: __SerdeContext): CalculationStatus => { - return { - CompletionDateTime: - output.CompletionDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDateTime))) - : undefined, - State: __expectString(output.State), - StateChangeReason: __expectString(output.StateChangeReason), - SubmissionDateTime: - output.SubmissionDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmissionDateTime))) - : undefined, - } as any; + return take(output, { + CompletionDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateChangeReason: __expectString, + SubmissionDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1CalculationSummary */ const de_CalculationSummary = (output: any, context: __SerdeContext): CalculationSummary => { - return { - CalculationExecutionId: __expectString(output.CalculationExecutionId), - Description: __expectString(output.Description), - Status: output.Status != null ? de_CalculationStatus(output.Status, context) : undefined, - } as any; + return take(output, { + CalculationExecutionId: __expectString, + Description: __expectString, + Status: (_: any) => de_CalculationStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Column - */ -const de_Column = (output: any, context: __SerdeContext): Column => { - return { - Comment: __expectString(output.Comment), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_Column omitted. -/** - * deserializeAws_json1_1ColumnInfo - */ -const de_ColumnInfo = (output: any, context: __SerdeContext): ColumnInfo => { - return { - CaseSensitive: __expectBoolean(output.CaseSensitive), - CatalogName: __expectString(output.CatalogName), - Label: __expectString(output.Label), - Name: __expectString(output.Name), - Nullable: __expectString(output.Nullable), - Precision: __expectInt32(output.Precision), - Scale: __expectInt32(output.Scale), - SchemaName: __expectString(output.SchemaName), - TableName: __expectString(output.TableName), - Type: __expectString(output.Type), - } as any; -}; +// de_ColumnInfo omitted. -/** - * deserializeAws_json1_1ColumnInfoList - */ -const de_ColumnInfoList = (output: any, context: __SerdeContext): ColumnInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnInfo(entry, context); - }); - return retVal; -}; +// de_ColumnInfoList omitted. -/** - * deserializeAws_json1_1ColumnList - */ -const de_ColumnList = (output: any, context: __SerdeContext): Column[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Column(entry, context); - }); - return retVal; -}; +// de_ColumnList omitted. -/** - * deserializeAws_json1_1CreateDataCatalogOutput - */ -const de_CreateDataCatalogOutput = (output: any, context: __SerdeContext): CreateDataCatalogOutput => { - return {} as any; -}; +// de_CreateDataCatalogOutput omitted. -/** - * deserializeAws_json1_1CreateNamedQueryOutput - */ -const de_CreateNamedQueryOutput = (output: any, context: __SerdeContext): CreateNamedQueryOutput => { - return { - NamedQueryId: __expectString(output.NamedQueryId), - } as any; -}; +// de_CreateNamedQueryOutput omitted. -/** - * deserializeAws_json1_1CreateNotebookOutput - */ -const de_CreateNotebookOutput = (output: any, context: __SerdeContext): CreateNotebookOutput => { - return { - NotebookId: __expectString(output.NotebookId), - } as any; -}; +// de_CreateNotebookOutput omitted. -/** - * deserializeAws_json1_1CreatePreparedStatementOutput - */ -const de_CreatePreparedStatementOutput = (output: any, context: __SerdeContext): CreatePreparedStatementOutput => { - return {} as any; -}; +// de_CreatePreparedStatementOutput omitted. -/** - * deserializeAws_json1_1CreatePresignedNotebookUrlResponse - */ -const de_CreatePresignedNotebookUrlResponse = ( - output: any, - context: __SerdeContext -): CreatePresignedNotebookUrlResponse => { - return { - AuthToken: __expectString(output.AuthToken), - AuthTokenExpirationTime: __expectLong(output.AuthTokenExpirationTime), - NotebookUrl: __expectString(output.NotebookUrl), - } as any; -}; +// de_CreatePresignedNotebookUrlResponse omitted. -/** - * deserializeAws_json1_1CreateWorkGroupOutput - */ -const de_CreateWorkGroupOutput = (output: any, context: __SerdeContext): CreateWorkGroupOutput => { - return {} as any; -}; +// de_CreateWorkGroupOutput omitted. -/** - * deserializeAws_json1_1CustomerContentEncryptionConfiguration - */ -const de_CustomerContentEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): CustomerContentEncryptionConfiguration => { - return { - KmsKey: __expectString(output.KmsKey), - } as any; -}; +// de_CustomerContentEncryptionConfiguration omitted. -/** - * deserializeAws_json1_1Database - */ -const de_Database = (output: any, context: __SerdeContext): Database => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - } as any; -}; +// de_Database omitted. -/** - * deserializeAws_json1_1DatabaseList - */ -const de_DatabaseList = (output: any, context: __SerdeContext): Database[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Database(entry, context); - }); - return retVal; -}; +// de_DatabaseList omitted. -/** - * deserializeAws_json1_1DataCatalog - */ -const de_DataCatalog = (output: any, context: __SerdeContext): DataCatalog => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_DataCatalog omitted. -/** - * deserializeAws_json1_1DataCatalogSummary - */ -const de_DataCatalogSummary = (output: any, context: __SerdeContext): DataCatalogSummary => { - return { - CatalogName: __expectString(output.CatalogName), - Type: __expectString(output.Type), - } as any; -}; +// de_DataCatalogSummary omitted. -/** - * deserializeAws_json1_1DataCatalogSummaryList - */ -const de_DataCatalogSummaryList = (output: any, context: __SerdeContext): DataCatalogSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataCatalogSummary(entry, context); - }); - return retVal; -}; +// de_DataCatalogSummaryList omitted. -/** - * deserializeAws_json1_1Datum - */ -const de_Datum = (output: any, context: __SerdeContext): Datum => { - return { - VarCharValue: __expectString(output.VarCharValue), - } as any; -}; +// de_Datum omitted. -/** - * deserializeAws_json1_1datumList - */ -const de_datumList = (output: any, context: __SerdeContext): Datum[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Datum(entry, context); - }); - return retVal; -}; +// de_datumList omitted. -/** - * deserializeAws_json1_1DeleteDataCatalogOutput - */ -const de_DeleteDataCatalogOutput = (output: any, context: __SerdeContext): DeleteDataCatalogOutput => { - return {} as any; -}; +// de_DeleteDataCatalogOutput omitted. -/** - * deserializeAws_json1_1DeleteNamedQueryOutput - */ -const de_DeleteNamedQueryOutput = (output: any, context: __SerdeContext): DeleteNamedQueryOutput => { - return {} as any; -}; +// de_DeleteNamedQueryOutput omitted. -/** - * deserializeAws_json1_1DeleteNotebookOutput - */ -const de_DeleteNotebookOutput = (output: any, context: __SerdeContext): DeleteNotebookOutput => { - return {} as any; -}; +// de_DeleteNotebookOutput omitted. -/** - * deserializeAws_json1_1DeletePreparedStatementOutput - */ -const de_DeletePreparedStatementOutput = (output: any, context: __SerdeContext): DeletePreparedStatementOutput => { - return {} as any; -}; +// de_DeletePreparedStatementOutput omitted. -/** - * deserializeAws_json1_1DeleteWorkGroupOutput - */ -const de_DeleteWorkGroupOutput = (output: any, context: __SerdeContext): DeleteWorkGroupOutput => { - return {} as any; -}; +// de_DeleteWorkGroupOutput omitted. -/** - * deserializeAws_json1_1EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - EncryptionOption: __expectString(output.EncryptionOption), - KmsKey: __expectString(output.KmsKey), - } as any; -}; +// de_EncryptionConfiguration omitted. -/** - * deserializeAws_json1_1EngineConfiguration - */ -const de_EngineConfiguration = (output: any, context: __SerdeContext): EngineConfiguration => { - return { - AdditionalConfigs: - output.AdditionalConfigs != null ? de_ParametersMap(output.AdditionalConfigs, context) : undefined, - CoordinatorDpuSize: __expectInt32(output.CoordinatorDpuSize), - DefaultExecutorDpuSize: __expectInt32(output.DefaultExecutorDpuSize), - MaxConcurrentDpus: __expectInt32(output.MaxConcurrentDpus), - } as any; -}; +// de_EngineConfiguration omitted. -/** - * deserializeAws_json1_1EngineVersion - */ -const de_EngineVersion = (output: any, context: __SerdeContext): EngineVersion => { - return { - EffectiveEngineVersion: __expectString(output.EffectiveEngineVersion), - SelectedEngineVersion: __expectString(output.SelectedEngineVersion), - } as any; -}; +// de_EngineVersion omitted. -/** - * deserializeAws_json1_1EngineVersionsList - */ -const de_EngineVersionsList = (output: any, context: __SerdeContext): EngineVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EngineVersion(entry, context); - }); - return retVal; -}; +// de_EngineVersionsList omitted. -/** - * deserializeAws_json1_1ExecutionParameters - */ -const de_ExecutionParameters = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExecutionParameters omitted. -/** - * deserializeAws_json1_1ExecutorsSummary - */ -const de_ExecutorsSummary = (output: any, context: __SerdeContext): ExecutorsSummary => { - return { - ExecutorId: __expectString(output.ExecutorId), - ExecutorSize: __expectLong(output.ExecutorSize), - ExecutorState: __expectString(output.ExecutorState), - ExecutorType: __expectString(output.ExecutorType), - StartDateTime: __expectLong(output.StartDateTime), - TerminationDateTime: __expectLong(output.TerminationDateTime), - } as any; -}; +// de_ExecutorsSummary omitted. -/** - * deserializeAws_json1_1ExecutorsSummaryList - */ -const de_ExecutorsSummaryList = (output: any, context: __SerdeContext): ExecutorsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutorsSummary(entry, context); - }); - return retVal; -}; +// de_ExecutorsSummaryList omitted. /** * deserializeAws_json1_1ExportNotebookOutput */ const de_ExportNotebookOutput = (output: any, context: __SerdeContext): ExportNotebookOutput => { - return { - NotebookMetadata: - output.NotebookMetadata != null ? de_NotebookMetadata(output.NotebookMetadata, context) : undefined, - Payload: __expectString(output.Payload), - } as any; + return take(output, { + NotebookMetadata: (_: any) => de_NotebookMetadata(_, context), + Payload: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetCalculationExecutionCodeResponse - */ -const de_GetCalculationExecutionCodeResponse = ( - output: any, - context: __SerdeContext -): GetCalculationExecutionCodeResponse => { - return { - CodeBlock: __expectString(output.CodeBlock), - } as any; -}; +// de_GetCalculationExecutionCodeResponse omitted. /** * deserializeAws_json1_1GetCalculationExecutionResponse */ const de_GetCalculationExecutionResponse = (output: any, context: __SerdeContext): GetCalculationExecutionResponse => { - return { - CalculationExecutionId: __expectString(output.CalculationExecutionId), - Description: __expectString(output.Description), - Result: output.Result != null ? de_CalculationResult(output.Result, context) : undefined, - SessionId: __expectString(output.SessionId), - Statistics: output.Statistics != null ? de_CalculationStatistics(output.Statistics, context) : undefined, - Status: output.Status != null ? de_CalculationStatus(output.Status, context) : undefined, - WorkingDirectory: __expectString(output.WorkingDirectory), - } as any; + return take(output, { + CalculationExecutionId: __expectString, + Description: __expectString, + Result: _json, + SessionId: __expectString, + Statistics: _json, + Status: (_: any) => de_CalculationStatus(_, context), + WorkingDirectory: __expectString, + }) as any; }; /** @@ -5815,176 +4559,108 @@ const de_GetCalculationExecutionStatusResponse = ( output: any, context: __SerdeContext ): GetCalculationExecutionStatusResponse => { - return { - Statistics: output.Statistics != null ? de_CalculationStatistics(output.Statistics, context) : undefined, - Status: output.Status != null ? de_CalculationStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Statistics: _json, + Status: (_: any) => de_CalculationStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetDatabaseOutput - */ -const de_GetDatabaseOutput = (output: any, context: __SerdeContext): GetDatabaseOutput => { - return { - Database: output.Database != null ? de_Database(output.Database, context) : undefined, - } as any; -}; +// de_GetDatabaseOutput omitted. -/** - * deserializeAws_json1_1GetDataCatalogOutput - */ -const de_GetDataCatalogOutput = (output: any, context: __SerdeContext): GetDataCatalogOutput => { - return { - DataCatalog: output.DataCatalog != null ? de_DataCatalog(output.DataCatalog, context) : undefined, - } as any; -}; +// de_GetDataCatalogOutput omitted. -/** - * deserializeAws_json1_1GetNamedQueryOutput - */ -const de_GetNamedQueryOutput = (output: any, context: __SerdeContext): GetNamedQueryOutput => { - return { - NamedQuery: output.NamedQuery != null ? de_NamedQuery(output.NamedQuery, context) : undefined, - } as any; -}; +// de_GetNamedQueryOutput omitted. /** * deserializeAws_json1_1GetNotebookMetadataOutput */ const de_GetNotebookMetadataOutput = (output: any, context: __SerdeContext): GetNotebookMetadataOutput => { - return { - NotebookMetadata: - output.NotebookMetadata != null ? de_NotebookMetadata(output.NotebookMetadata, context) : undefined, - } as any; + return take(output, { + NotebookMetadata: (_: any) => de_NotebookMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetPreparedStatementOutput */ const de_GetPreparedStatementOutput = (output: any, context: __SerdeContext): GetPreparedStatementOutput => { - return { - PreparedStatement: - output.PreparedStatement != null ? de_PreparedStatement(output.PreparedStatement, context) : undefined, - } as any; + return take(output, { + PreparedStatement: (_: any) => de_PreparedStatement(_, context), + }) as any; }; /** * deserializeAws_json1_1GetQueryExecutionOutput */ const de_GetQueryExecutionOutput = (output: any, context: __SerdeContext): GetQueryExecutionOutput => { - return { - QueryExecution: output.QueryExecution != null ? de_QueryExecution(output.QueryExecution, context) : undefined, - } as any; + return take(output, { + QueryExecution: (_: any) => de_QueryExecution(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetQueryResultsOutput - */ -const de_GetQueryResultsOutput = (output: any, context: __SerdeContext): GetQueryResultsOutput => { - return { - NextToken: __expectString(output.NextToken), - ResultSet: output.ResultSet != null ? de_ResultSet(output.ResultSet, context) : undefined, - UpdateCount: __expectLong(output.UpdateCount), - } as any; -}; +// de_GetQueryResultsOutput omitted. /** * deserializeAws_json1_1GetQueryRuntimeStatisticsOutput */ const de_GetQueryRuntimeStatisticsOutput = (output: any, context: __SerdeContext): GetQueryRuntimeStatisticsOutput => { - return { - QueryRuntimeStatistics: - output.QueryRuntimeStatistics != null - ? de_QueryRuntimeStatistics(output.QueryRuntimeStatistics, context) - : undefined, - } as any; + return take(output, { + QueryRuntimeStatistics: (_: any) => de_QueryRuntimeStatistics(_, context), + }) as any; }; /** * deserializeAws_json1_1GetSessionResponse */ const de_GetSessionResponse = (output: any, context: __SerdeContext): GetSessionResponse => { - return { - Description: __expectString(output.Description), - EngineConfiguration: - output.EngineConfiguration != null ? de_EngineConfiguration(output.EngineConfiguration, context) : undefined, - EngineVersion: __expectString(output.EngineVersion), - NotebookVersion: __expectString(output.NotebookVersion), - SessionConfiguration: - output.SessionConfiguration != null ? de_SessionConfiguration(output.SessionConfiguration, context) : undefined, - SessionId: __expectString(output.SessionId), - Statistics: output.Statistics != null ? de_SessionStatistics(output.Statistics, context) : undefined, - Status: output.Status != null ? de_SessionStatus(output.Status, context) : undefined, - WorkGroup: __expectString(output.WorkGroup), - } as any; + return take(output, { + Description: __expectString, + EngineConfiguration: _json, + EngineVersion: __expectString, + NotebookVersion: __expectString, + SessionConfiguration: _json, + SessionId: __expectString, + Statistics: _json, + Status: (_: any) => de_SessionStatus(_, context), + WorkGroup: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetSessionStatusResponse */ const de_GetSessionStatusResponse = (output: any, context: __SerdeContext): GetSessionStatusResponse => { - return { - SessionId: __expectString(output.SessionId), - Status: output.Status != null ? de_SessionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + SessionId: __expectString, + Status: (_: any) => de_SessionStatus(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTableMetadataOutput */ const de_GetTableMetadataOutput = (output: any, context: __SerdeContext): GetTableMetadataOutput => { - return { - TableMetadata: output.TableMetadata != null ? de_TableMetadata(output.TableMetadata, context) : undefined, - } as any; + return take(output, { + TableMetadata: (_: any) => de_TableMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetWorkGroupOutput */ const de_GetWorkGroupOutput = (output: any, context: __SerdeContext): GetWorkGroupOutput => { - return { - WorkGroup: output.WorkGroup != null ? de_WorkGroup(output.WorkGroup, context) : undefined, - } as any; + return take(output, { + WorkGroup: (_: any) => de_WorkGroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ImportNotebookOutput - */ -const de_ImportNotebookOutput = (output: any, context: __SerdeContext): ImportNotebookOutput => { - return { - NotebookId: __expectString(output.NotebookId), - } as any; -}; +// de_ImportNotebookOutput omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - AthenaErrorCode: __expectString(output.AthenaErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1ListApplicationDPUSizesOutput - */ -const de_ListApplicationDPUSizesOutput = (output: any, context: __SerdeContext): ListApplicationDPUSizesOutput => { - return { - ApplicationDPUSizes: - output.ApplicationDPUSizes != null ? de_ApplicationDPUSizesList(output.ApplicationDPUSizes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListApplicationDPUSizesOutput omitted. /** * deserializeAws_json1_1ListCalculationExecutionsResponse @@ -5993,221 +4669,106 @@ const de_ListCalculationExecutionsResponse = ( output: any, context: __SerdeContext ): ListCalculationExecutionsResponse => { - return { - Calculations: output.Calculations != null ? de_CalculationsList(output.Calculations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Calculations: (_: any) => de_CalculationsList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListDatabasesOutput - */ -const de_ListDatabasesOutput = (output: any, context: __SerdeContext): ListDatabasesOutput => { - return { - DatabaseList: output.DatabaseList != null ? de_DatabaseList(output.DatabaseList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDatabasesOutput omitted. -/** - * deserializeAws_json1_1ListDataCatalogsOutput - */ -const de_ListDataCatalogsOutput = (output: any, context: __SerdeContext): ListDataCatalogsOutput => { - return { - DataCatalogsSummary: - output.DataCatalogsSummary != null ? de_DataCatalogSummaryList(output.DataCatalogsSummary, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDataCatalogsOutput omitted. -/** - * deserializeAws_json1_1ListEngineVersionsOutput - */ -const de_ListEngineVersionsOutput = (output: any, context: __SerdeContext): ListEngineVersionsOutput => { - return { - EngineVersions: output.EngineVersions != null ? de_EngineVersionsList(output.EngineVersions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListEngineVersionsOutput omitted. -/** - * deserializeAws_json1_1ListExecutorsResponse - */ -const de_ListExecutorsResponse = (output: any, context: __SerdeContext): ListExecutorsResponse => { - return { - ExecutorsSummary: - output.ExecutorsSummary != null ? de_ExecutorsSummaryList(output.ExecutorsSummary, context) : undefined, - NextToken: __expectString(output.NextToken), - SessionId: __expectString(output.SessionId), - } as any; -}; +// de_ListExecutorsResponse omitted. -/** - * deserializeAws_json1_1ListNamedQueriesOutput - */ -const de_ListNamedQueriesOutput = (output: any, context: __SerdeContext): ListNamedQueriesOutput => { - return { - NamedQueryIds: output.NamedQueryIds != null ? de_NamedQueryIdList(output.NamedQueryIds, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListNamedQueriesOutput omitted. /** * deserializeAws_json1_1ListNotebookMetadataOutput */ const de_ListNotebookMetadataOutput = (output: any, context: __SerdeContext): ListNotebookMetadataOutput => { - return { - NextToken: __expectString(output.NextToken), - NotebookMetadataList: - output.NotebookMetadataList != null ? de_NotebookMetadataArray(output.NotebookMetadataList, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + NotebookMetadataList: (_: any) => de_NotebookMetadataArray(_, context), + }) as any; }; /** * deserializeAws_json1_1ListNotebookSessionsResponse */ const de_ListNotebookSessionsResponse = (output: any, context: __SerdeContext): ListNotebookSessionsResponse => { - return { - NextToken: __expectString(output.NextToken), - NotebookSessionsList: - output.NotebookSessionsList != null ? de_NotebookSessionsList(output.NotebookSessionsList, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + NotebookSessionsList: (_: any) => de_NotebookSessionsList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListPreparedStatementsOutput */ const de_ListPreparedStatementsOutput = (output: any, context: __SerdeContext): ListPreparedStatementsOutput => { - return { - NextToken: __expectString(output.NextToken), - PreparedStatements: - output.PreparedStatements != null ? de_PreparedStatementsList(output.PreparedStatements, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PreparedStatements: (_: any) => de_PreparedStatementsList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListQueryExecutionsOutput - */ -const de_ListQueryExecutionsOutput = (output: any, context: __SerdeContext): ListQueryExecutionsOutput => { - return { - NextToken: __expectString(output.NextToken), - QueryExecutionIds: - output.QueryExecutionIds != null ? de_QueryExecutionIdList(output.QueryExecutionIds, context) : undefined, - } as any; -}; +// de_ListQueryExecutionsOutput omitted. /** * deserializeAws_json1_1ListSessionsResponse */ const de_ListSessionsResponse = (output: any, context: __SerdeContext): ListSessionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Sessions: output.Sessions != null ? de_SessionsList(output.Sessions, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Sessions: (_: any) => de_SessionsList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListTableMetadataOutput */ const de_ListTableMetadataOutput = (output: any, context: __SerdeContext): ListTableMetadataOutput => { - return { - NextToken: __expectString(output.NextToken), - TableMetadataList: - output.TableMetadataList != null ? de_TableMetadataList(output.TableMetadataList, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + TableMetadataList: (_: any) => de_TableMetadataList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceOutput omitted. /** * deserializeAws_json1_1ListWorkGroupsOutput */ const de_ListWorkGroupsOutput = (output: any, context: __SerdeContext): ListWorkGroupsOutput => { - return { - NextToken: __expectString(output.NextToken), - WorkGroups: output.WorkGroups != null ? de_WorkGroupsList(output.WorkGroups, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + WorkGroups: (_: any) => de_WorkGroupsList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1MetadataException - */ -const de_MetadataException = (output: any, context: __SerdeContext): MetadataException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MetadataException omitted. -/** - * deserializeAws_json1_1NamedQuery - */ -const de_NamedQuery = (output: any, context: __SerdeContext): NamedQuery => { - return { - Database: __expectString(output.Database), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - NamedQueryId: __expectString(output.NamedQueryId), - QueryString: __expectString(output.QueryString), - WorkGroup: __expectString(output.WorkGroup), - } as any; -}; +// de_NamedQuery omitted. -/** - * deserializeAws_json1_1NamedQueryIdList - */ -const de_NamedQueryIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NamedQueryIdList omitted. -/** - * deserializeAws_json1_1NamedQueryList - */ -const de_NamedQueryList = (output: any, context: __SerdeContext): NamedQuery[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NamedQuery(entry, context); - }); - return retVal; -}; +// de_NamedQueryList omitted. /** * deserializeAws_json1_1NotebookMetadata */ const de_NotebookMetadata = (output: any, context: __SerdeContext): NotebookMetadata => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - NotebookId: __expectString(output.NotebookId), - Type: __expectString(output.Type), - WorkGroup: __expectString(output.WorkGroup), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NotebookId: __expectString, + Type: __expectString, + WorkGroup: __expectString, + }) as any; }; /** @@ -6217,9 +4778,6 @@ const de_NotebookMetadataArray = (output: any, context: __SerdeContext): Noteboo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NotebookMetadata(entry, context); }); return retVal; @@ -6232,9 +4790,6 @@ const de_NotebookSessionsList = (output: any, context: __SerdeContext): Notebook const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NotebookSessionSummary(entry, context); }); return retVal; @@ -6244,42 +4799,25 @@ const de_NotebookSessionsList = (output: any, context: __SerdeContext): Notebook * deserializeAws_json1_1NotebookSessionSummary */ const de_NotebookSessionSummary = (output: any, context: __SerdeContext): NotebookSessionSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - SessionId: __expectString(output.SessionId), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SessionId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ParametersMap - */ -const de_ParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ParametersMap omitted. /** * deserializeAws_json1_1PreparedStatement */ const de_PreparedStatement = (output: any, context: __SerdeContext): PreparedStatement => { - return { - Description: __expectString(output.Description), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - QueryStatement: __expectString(output.QueryStatement), - StatementName: __expectString(output.StatementName), - WorkGroupName: __expectString(output.WorkGroupName), - } as any; + return take(output, { + Description: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + QueryStatement: __expectString, + StatementName: __expectString, + WorkGroupName: __expectString, + }) as any; }; /** @@ -6289,9 +4827,6 @@ const de_PreparedStatementDetailsList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PreparedStatement(entry, context); }); return retVal; @@ -6304,9 +4839,6 @@ const de_PreparedStatementsList = (output: any, context: __SerdeContext): Prepar const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PreparedStatementSummary(entry, context); }); return retVal; @@ -6316,67 +4848,35 @@ const de_PreparedStatementsList = (output: any, context: __SerdeContext): Prepar * deserializeAws_json1_1PreparedStatementSummary */ const de_PreparedStatementSummary = (output: any, context: __SerdeContext): PreparedStatementSummary => { - return { - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - StatementName: __expectString(output.StatementName), - } as any; + return take(output, { + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StatementName: __expectString, + }) as any; }; /** * deserializeAws_json1_1QueryExecution */ const de_QueryExecution = (output: any, context: __SerdeContext): QueryExecution => { - return { - EngineVersion: output.EngineVersion != null ? de_EngineVersion(output.EngineVersion, context) : undefined, - ExecutionParameters: - output.ExecutionParameters != null ? de_ExecutionParameters(output.ExecutionParameters, context) : undefined, - Query: __expectString(output.Query), - QueryExecutionContext: - output.QueryExecutionContext != null - ? de_QueryExecutionContext(output.QueryExecutionContext, context) - : undefined, - QueryExecutionId: __expectString(output.QueryExecutionId), - ResultConfiguration: - output.ResultConfiguration != null ? de_ResultConfiguration(output.ResultConfiguration, context) : undefined, - ResultReuseConfiguration: - output.ResultReuseConfiguration != null - ? de_ResultReuseConfiguration(output.ResultReuseConfiguration, context) - : undefined, - StatementType: __expectString(output.StatementType), - Statistics: output.Statistics != null ? de_QueryExecutionStatistics(output.Statistics, context) : undefined, - Status: output.Status != null ? de_QueryExecutionStatus(output.Status, context) : undefined, - SubstatementType: __expectString(output.SubstatementType), - WorkGroup: __expectString(output.WorkGroup), - } as any; -}; - -/** - * deserializeAws_json1_1QueryExecutionContext - */ -const de_QueryExecutionContext = (output: any, context: __SerdeContext): QueryExecutionContext => { - return { - Catalog: __expectString(output.Catalog), - Database: __expectString(output.Database), - } as any; + return take(output, { + EngineVersion: _json, + ExecutionParameters: _json, + Query: __expectString, + QueryExecutionContext: _json, + QueryExecutionId: __expectString, + ResultConfiguration: _json, + ResultReuseConfiguration: _json, + StatementType: __expectString, + Statistics: _json, + Status: (_: any) => de_QueryExecutionStatus(_, context), + SubstatementType: __expectString, + WorkGroup: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1QueryExecutionIdList - */ -const de_QueryExecutionIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_QueryExecutionContext omitted. + +// de_QueryExecutionIdList omitted. /** * deserializeAws_json1_1QueryExecutionList @@ -6385,115 +4885,68 @@ const de_QueryExecutionList = (output: any, context: __SerdeContext): QueryExecu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QueryExecution(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1QueryExecutionStatistics - */ -const de_QueryExecutionStatistics = (output: any, context: __SerdeContext): QueryExecutionStatistics => { - return { - DataManifestLocation: __expectString(output.DataManifestLocation), - DataScannedInBytes: __expectLong(output.DataScannedInBytes), - EngineExecutionTimeInMillis: __expectLong(output.EngineExecutionTimeInMillis), - QueryPlanningTimeInMillis: __expectLong(output.QueryPlanningTimeInMillis), - QueryQueueTimeInMillis: __expectLong(output.QueryQueueTimeInMillis), - ResultReuseInformation: - output.ResultReuseInformation != null - ? de_ResultReuseInformation(output.ResultReuseInformation, context) - : undefined, - ServiceProcessingTimeInMillis: __expectLong(output.ServiceProcessingTimeInMillis), - TotalExecutionTimeInMillis: __expectLong(output.TotalExecutionTimeInMillis), - } as any; -}; +// de_QueryExecutionStatistics omitted. /** * deserializeAws_json1_1QueryExecutionStatus */ const de_QueryExecutionStatus = (output: any, context: __SerdeContext): QueryExecutionStatus => { - return { - AthenaError: output.AthenaError != null ? de_AthenaError(output.AthenaError, context) : undefined, - CompletionDateTime: - output.CompletionDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDateTime))) - : undefined, - State: __expectString(output.State), - StateChangeReason: __expectString(output.StateChangeReason), - SubmissionDateTime: - output.SubmissionDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmissionDateTime))) - : undefined, - } as any; + return take(output, { + AthenaError: _json, + CompletionDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateChangeReason: __expectString, + SubmissionDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1QueryRuntimeStatistics */ const de_QueryRuntimeStatistics = (output: any, context: __SerdeContext): QueryRuntimeStatistics => { - return { - OutputStage: output.OutputStage != null ? de_QueryStage(output.OutputStage, context) : undefined, - Rows: output.Rows != null ? de_QueryRuntimeStatisticsRows(output.Rows, context) : undefined, - Timeline: output.Timeline != null ? de_QueryRuntimeStatisticsTimeline(output.Timeline, context) : undefined, - } as any; + return take(output, { + OutputStage: (_: any) => de_QueryStage(_, context), + Rows: _json, + Timeline: _json, + }) as any; }; -/** - * deserializeAws_json1_1QueryRuntimeStatisticsRows - */ -const de_QueryRuntimeStatisticsRows = (output: any, context: __SerdeContext): QueryRuntimeStatisticsRows => { - return { - InputBytes: __expectLong(output.InputBytes), - InputRows: __expectLong(output.InputRows), - OutputBytes: __expectLong(output.OutputBytes), - OutputRows: __expectLong(output.OutputRows), - } as any; -}; +// de_QueryRuntimeStatisticsRows omitted. -/** - * deserializeAws_json1_1QueryRuntimeStatisticsTimeline - */ -const de_QueryRuntimeStatisticsTimeline = (output: any, context: __SerdeContext): QueryRuntimeStatisticsTimeline => { - return { - EngineExecutionTimeInMillis: __expectLong(output.EngineExecutionTimeInMillis), - QueryPlanningTimeInMillis: __expectLong(output.QueryPlanningTimeInMillis), - QueryQueueTimeInMillis: __expectLong(output.QueryQueueTimeInMillis), - ServiceProcessingTimeInMillis: __expectLong(output.ServiceProcessingTimeInMillis), - TotalExecutionTimeInMillis: __expectLong(output.TotalExecutionTimeInMillis), - } as any; -}; +// de_QueryRuntimeStatisticsTimeline omitted. /** * deserializeAws_json1_1QueryStage */ const de_QueryStage = (output: any, context: __SerdeContext): QueryStage => { - return { - ExecutionTime: __expectLong(output.ExecutionTime), - InputBytes: __expectLong(output.InputBytes), - InputRows: __expectLong(output.InputRows), - OutputBytes: __expectLong(output.OutputBytes), - OutputRows: __expectLong(output.OutputRows), - QueryStagePlan: output.QueryStagePlan != null ? de_QueryStagePlanNode(output.QueryStagePlan, context) : undefined, - StageId: __expectLong(output.StageId), - State: __expectString(output.State), - SubStages: output.SubStages != null ? de_QueryStages(output.SubStages, context) : undefined, - } as any; + return take(output, { + ExecutionTime: __expectLong, + InputBytes: __expectLong, + InputRows: __expectLong, + OutputBytes: __expectLong, + OutputRows: __expectLong, + QueryStagePlan: (_: any) => de_QueryStagePlanNode(_, context), + StageId: __expectLong, + State: __expectString, + SubStages: (_: any) => de_QueryStages(_, context), + }) as any; }; /** * deserializeAws_json1_1QueryStagePlanNode */ const de_QueryStagePlanNode = (output: any, context: __SerdeContext): QueryStagePlanNode => { - return { - Children: output.Children != null ? de_QueryStagePlanNodes(output.Children, context) : undefined, - Identifier: __expectString(output.Identifier), - Name: __expectString(output.Name), - RemoteSources: output.RemoteSources != null ? de_StringList(output.RemoteSources, context) : undefined, - } as any; + return take(output, { + Children: (_: any) => de_QueryStagePlanNodes(_, context), + Identifier: __expectString, + Name: __expectString, + RemoteSources: _json, + }) as any; }; /** @@ -6503,9 +4956,6 @@ const de_QueryStagePlanNodes = (output: any, context: __SerdeContext): QueryStag const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QueryStagePlanNode(entry, context); }); return retVal; @@ -6518,138 +4968,32 @@ const de_QueryStages = (output: any, context: __SerdeContext): QueryStage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QueryStage(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResultConfiguration - */ -const de_ResultConfiguration = (output: any, context: __SerdeContext): ResultConfiguration => { - return { - AclConfiguration: - output.AclConfiguration != null ? de_AclConfiguration(output.AclConfiguration, context) : undefined, - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - ExpectedBucketOwner: __expectString(output.ExpectedBucketOwner), - OutputLocation: __expectString(output.OutputLocation), - } as any; -}; +// de_ResultConfiguration omitted. -/** - * deserializeAws_json1_1ResultReuseByAgeConfiguration - */ -const de_ResultReuseByAgeConfiguration = (output: any, context: __SerdeContext): ResultReuseByAgeConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - MaxAgeInMinutes: __expectInt32(output.MaxAgeInMinutes), - } as any; -}; +// de_ResultReuseByAgeConfiguration omitted. -/** - * deserializeAws_json1_1ResultReuseConfiguration - */ -const de_ResultReuseConfiguration = (output: any, context: __SerdeContext): ResultReuseConfiguration => { - return { - ResultReuseByAgeConfiguration: - output.ResultReuseByAgeConfiguration != null - ? de_ResultReuseByAgeConfiguration(output.ResultReuseByAgeConfiguration, context) - : undefined, - } as any; -}; +// de_ResultReuseConfiguration omitted. -/** - * deserializeAws_json1_1ResultReuseInformation - */ -const de_ResultReuseInformation = (output: any, context: __SerdeContext): ResultReuseInformation => { - return { - ReusedPreviousResult: __expectBoolean(output.ReusedPreviousResult), - } as any; -}; +// de_ResultReuseInformation omitted. -/** - * deserializeAws_json1_1ResultSet - */ -const de_ResultSet = (output: any, context: __SerdeContext): ResultSet => { - return { - ResultSetMetadata: - output.ResultSetMetadata != null ? de_ResultSetMetadata(output.ResultSetMetadata, context) : undefined, - Rows: output.Rows != null ? de_RowList(output.Rows, context) : undefined, - } as any; -}; +// de_ResultSet omitted. -/** - * deserializeAws_json1_1ResultSetMetadata - */ -const de_ResultSetMetadata = (output: any, context: __SerdeContext): ResultSetMetadata => { - return { - ColumnInfo: output.ColumnInfo != null ? de_ColumnInfoList(output.ColumnInfo, context) : undefined, - } as any; -}; +// de_ResultSetMetadata omitted. -/** - * deserializeAws_json1_1Row - */ -const de_Row = (output: any, context: __SerdeContext): Row => { - return { - Data: output.Data != null ? de_datumList(output.Data, context) : undefined, - } as any; -}; +// de_Row omitted. -/** - * deserializeAws_json1_1RowList - */ -const de_RowList = (output: any, context: __SerdeContext): Row[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Row(entry, context); - }); - return retVal; -}; +// de_RowList omitted. -/** - * deserializeAws_json1_1SessionAlreadyExistsException - */ -const de_SessionAlreadyExistsException = (output: any, context: __SerdeContext): SessionAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SessionAlreadyExistsException omitted. -/** - * deserializeAws_json1_1SessionConfiguration - */ -const de_SessionConfiguration = (output: any, context: __SerdeContext): SessionConfiguration => { - return { - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - ExecutionRole: __expectString(output.ExecutionRole), - IdleTimeoutSeconds: __expectLong(output.IdleTimeoutSeconds), - WorkingDirectory: __expectString(output.WorkingDirectory), - } as any; -}; +// de_SessionConfiguration omitted. /** * deserializeAws_json1_1SessionsList @@ -6658,160 +5002,67 @@ const de_SessionsList = (output: any, context: __SerdeContext): SessionSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SessionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SessionStatistics - */ -const de_SessionStatistics = (output: any, context: __SerdeContext): SessionStatistics => { - return { - DpuExecutionInMillis: __expectLong(output.DpuExecutionInMillis), - } as any; -}; +// de_SessionStatistics omitted. /** * deserializeAws_json1_1SessionStatus */ const de_SessionStatus = (output: any, context: __SerdeContext): SessionStatus => { - return { - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - IdleSinceDateTime: - output.IdleSinceDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.IdleSinceDateTime))) - : undefined, - LastModifiedDateTime: - output.LastModifiedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDateTime))) - : undefined, - StartDateTime: - output.StartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDateTime))) - : undefined, - State: __expectString(output.State), - StateChangeReason: __expectString(output.StateChangeReason), - } as any; + return take(output, { + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IdleSinceDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateChangeReason: __expectString, + }) as any; }; /** * deserializeAws_json1_1SessionSummary */ const de_SessionSummary = (output: any, context: __SerdeContext): SessionSummary => { - return { - Description: __expectString(output.Description), - EngineVersion: output.EngineVersion != null ? de_EngineVersion(output.EngineVersion, context) : undefined, - NotebookVersion: __expectString(output.NotebookVersion), - SessionId: __expectString(output.SessionId), - Status: output.Status != null ? de_SessionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Description: __expectString, + EngineVersion: _json, + NotebookVersion: __expectString, + SessionId: __expectString, + Status: (_: any) => de_SessionStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StartCalculationExecutionResponse - */ -const de_StartCalculationExecutionResponse = ( - output: any, - context: __SerdeContext -): StartCalculationExecutionResponse => { - return { - CalculationExecutionId: __expectString(output.CalculationExecutionId), - State: __expectString(output.State), - } as any; -}; +// de_StartCalculationExecutionResponse omitted. -/** - * deserializeAws_json1_1StartQueryExecutionOutput - */ -const de_StartQueryExecutionOutput = (output: any, context: __SerdeContext): StartQueryExecutionOutput => { - return { - QueryExecutionId: __expectString(output.QueryExecutionId), - } as any; -}; +// de_StartQueryExecutionOutput omitted. -/** - * deserializeAws_json1_1StartSessionResponse - */ -const de_StartSessionResponse = (output: any, context: __SerdeContext): StartSessionResponse => { - return { - SessionId: __expectString(output.SessionId), - State: __expectString(output.State), - } as any; -}; +// de_StartSessionResponse omitted. -/** - * deserializeAws_json1_1StopCalculationExecutionResponse - */ -const de_StopCalculationExecutionResponse = ( - output: any, - context: __SerdeContext -): StopCalculationExecutionResponse => { - return { - State: __expectString(output.State), - } as any; -}; +// de_StopCalculationExecutionResponse omitted. -/** - * deserializeAws_json1_1StopQueryExecutionOutput - */ -const de_StopQueryExecutionOutput = (output: any, context: __SerdeContext): StopQueryExecutionOutput => { - return {} as any; -}; +// de_StopQueryExecutionOutput omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1SupportedDPUSizeList - */ -const de_SupportedDPUSizeList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_SupportedDPUSizeList omitted. /** * deserializeAws_json1_1TableMetadata */ const de_TableMetadata = (output: any, context: __SerdeContext): TableMetadata => { - return { - Columns: output.Columns != null ? de_ColumnList(output.Columns, context) : undefined, - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - LastAccessTime: - output.LastAccessTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessTime))) - : undefined, - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - PartitionKeys: output.PartitionKeys != null ? de_ColumnList(output.PartitionKeys, context) : undefined, - TableType: __expectString(output.TableType), - } as any; + return take(output, { + Columns: _json, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAccessTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Parameters: _json, + PartitionKeys: _json, + TableType: __expectString, + }) as any; }; /** @@ -6821,235 +5072,61 @@ const de_TableMetadataList = (output: any, context: __SerdeContext): TableMetada const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TableMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_1TerminateSessionResponse - */ -const de_TerminateSessionResponse = (output: any, context: __SerdeContext): TerminateSessionResponse => { - return { - State: __expectString(output.State), - } as any; -}; +// de_TerminateSessionResponse omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// de_TooManyRequestsException omitted. -/** - * deserializeAws_json1_1UnprocessedNamedQueryId - */ -const de_UnprocessedNamedQueryId = (output: any, context: __SerdeContext): UnprocessedNamedQueryId => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - NamedQueryId: __expectString(output.NamedQueryId), - } as any; -}; +// de_UnprocessedNamedQueryId omitted. -/** - * deserializeAws_json1_1UnprocessedNamedQueryIdList - */ -const de_UnprocessedNamedQueryIdList = (output: any, context: __SerdeContext): UnprocessedNamedQueryId[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedNamedQueryId(entry, context); - }); - return retVal; -}; +// de_UnprocessedNamedQueryIdList omitted. -/** - * deserializeAws_json1_1UnprocessedPreparedStatementName - */ -const de_UnprocessedPreparedStatementName = ( - output: any, - context: __SerdeContext -): UnprocessedPreparedStatementName => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - StatementName: __expectString(output.StatementName), - } as any; -}; +// de_UnprocessedPreparedStatementName omitted. -/** - * deserializeAws_json1_1UnprocessedPreparedStatementNameList - */ -const de_UnprocessedPreparedStatementNameList = ( - output: any, - context: __SerdeContext -): UnprocessedPreparedStatementName[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedPreparedStatementName(entry, context); - }); - return retVal; -}; +// de_UnprocessedPreparedStatementNameList omitted. -/** - * deserializeAws_json1_1UnprocessedQueryExecutionId - */ -const de_UnprocessedQueryExecutionId = (output: any, context: __SerdeContext): UnprocessedQueryExecutionId => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - QueryExecutionId: __expectString(output.QueryExecutionId), - } as any; -}; +// de_UnprocessedQueryExecutionId omitted. -/** - * deserializeAws_json1_1UnprocessedQueryExecutionIdList - */ -const de_UnprocessedQueryExecutionIdList = (output: any, context: __SerdeContext): UnprocessedQueryExecutionId[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedQueryExecutionId(entry, context); - }); - return retVal; -}; +// de_UnprocessedQueryExecutionIdList omitted. -/** - * deserializeAws_json1_1UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_UntagResourceOutput omitted. -/** - * deserializeAws_json1_1UpdateDataCatalogOutput - */ -const de_UpdateDataCatalogOutput = (output: any, context: __SerdeContext): UpdateDataCatalogOutput => { - return {} as any; -}; +// de_UpdateDataCatalogOutput omitted. -/** - * deserializeAws_json1_1UpdateNamedQueryOutput - */ -const de_UpdateNamedQueryOutput = (output: any, context: __SerdeContext): UpdateNamedQueryOutput => { - return {} as any; -}; +// de_UpdateNamedQueryOutput omitted. -/** - * deserializeAws_json1_1UpdateNotebookMetadataOutput - */ -const de_UpdateNotebookMetadataOutput = (output: any, context: __SerdeContext): UpdateNotebookMetadataOutput => { - return {} as any; -}; +// de_UpdateNotebookMetadataOutput omitted. -/** - * deserializeAws_json1_1UpdateNotebookOutput - */ -const de_UpdateNotebookOutput = (output: any, context: __SerdeContext): UpdateNotebookOutput => { - return {} as any; -}; +// de_UpdateNotebookOutput omitted. -/** - * deserializeAws_json1_1UpdatePreparedStatementOutput - */ -const de_UpdatePreparedStatementOutput = (output: any, context: __SerdeContext): UpdatePreparedStatementOutput => { - return {} as any; -}; +// de_UpdatePreparedStatementOutput omitted. -/** - * deserializeAws_json1_1UpdateWorkGroupOutput - */ -const de_UpdateWorkGroupOutput = (output: any, context: __SerdeContext): UpdateWorkGroupOutput => { - return {} as any; -}; +// de_UpdateWorkGroupOutput omitted. /** * deserializeAws_json1_1WorkGroup */ const de_WorkGroup = (output: any, context: __SerdeContext): WorkGroup => { - return { - Configuration: output.Configuration != null ? de_WorkGroupConfiguration(output.Configuration, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + Configuration: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Name: __expectString, + State: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1WorkGroupConfiguration - */ -const de_WorkGroupConfiguration = (output: any, context: __SerdeContext): WorkGroupConfiguration => { - return { - AdditionalConfiguration: __expectString(output.AdditionalConfiguration), - BytesScannedCutoffPerQuery: __expectLong(output.BytesScannedCutoffPerQuery), - CustomerContentEncryptionConfiguration: - output.CustomerContentEncryptionConfiguration != null - ? de_CustomerContentEncryptionConfiguration(output.CustomerContentEncryptionConfiguration, context) - : undefined, - EnableMinimumEncryptionConfiguration: __expectBoolean(output.EnableMinimumEncryptionConfiguration), - EnforceWorkGroupConfiguration: __expectBoolean(output.EnforceWorkGroupConfiguration), - EngineVersion: output.EngineVersion != null ? de_EngineVersion(output.EngineVersion, context) : undefined, - ExecutionRole: __expectString(output.ExecutionRole), - PublishCloudWatchMetricsEnabled: __expectBoolean(output.PublishCloudWatchMetricsEnabled), - RequesterPaysEnabled: __expectBoolean(output.RequesterPaysEnabled), - ResultConfiguration: - output.ResultConfiguration != null ? de_ResultConfiguration(output.ResultConfiguration, context) : undefined, - } as any; -}; +// de_WorkGroupConfiguration omitted. /** * deserializeAws_json1_1WorkGroupsList @@ -7058,9 +5135,6 @@ const de_WorkGroupsList = (output: any, context: __SerdeContext): WorkGroupSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkGroupSummary(entry, context); }); return retVal; @@ -7070,16 +5144,13 @@ const de_WorkGroupsList = (output: any, context: __SerdeContext): WorkGroupSumma * deserializeAws_json1_1WorkGroupSummary */ const de_WorkGroupSummary = (output: any, context: __SerdeContext): WorkGroupSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EngineVersion: output.EngineVersion != null ? de_EngineVersion(output.EngineVersion, context) : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EngineVersion: _json, + Name: __expectString, + State: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -7102,6 +5173,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-auditmanager/src/protocols/Aws_restJson1.ts b/clients/client-auditmanager/src/protocols/Aws_restJson1.ts index 517e10ad4114..436b6c448bee 100644 --- a/clients/client-auditmanager/src/protocols/Aws_restJson1.ts +++ b/clients/client-auditmanager/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -205,14 +207,10 @@ import { AssessmentMetadata, AssessmentMetadataItem, AssessmentReport, - AssessmentReportEvidenceError, AssessmentReportMetadata, AssessmentReportsDestination, AWSAccount, AWSService, - BatchCreateDelegationByAssessmentError, - BatchDeleteDelegationByAssessmentError, - BatchImportEvidenceToAssessmentControlError, ChangeLog, Control, ControlComment, @@ -230,28 +228,20 @@ import { DelegationMetadata, DeregistrationPolicy, Evidence, - EvidenceFinderEnablement, - EvidenceInsights, Framework, - FrameworkMetadata, Insights, InsightsByAssessment, InternalServerException, ManualEvidence, Notification, - Resource, ResourceNotFoundException, Role, Scope, - ServiceMetadata, ServiceQuotaExceededException, - Settings, SourceKeyword, ThrottlingException, UpdateAssessmentFrameworkControlSet, - URL, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -277,9 +267,11 @@ export const se_AssociateAssessmentReportEvidenceFolderCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }), - }); + body = JSON.stringify( + take(input, { + evidenceFolderId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -314,10 +306,12 @@ export const se_BatchAssociateAssessmentReportEvidenceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }), - ...(input.evidenceIds != null && { evidenceIds: se_EvidenceIds(input.evidenceIds, context) }), - }); + body = JSON.stringify( + take(input, { + evidenceFolderId: [], + evidenceIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -351,11 +345,11 @@ export const se_BatchCreateDelegationByAssessmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.createDelegationRequests != null && { - createDelegationRequests: se_CreateDelegationRequests(input.createDelegationRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + createDelegationRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -389,9 +383,11 @@ export const se_BatchDeleteDelegationByAssessmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.delegationIds != null && { delegationIds: se_DelegationIds(input.delegationIds, context) }), - }); + body = JSON.stringify( + take(input, { + delegationIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -426,10 +422,12 @@ export const se_BatchDisassociateAssessmentReportEvidenceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }), - ...(input.evidenceIds != null && { evidenceIds: se_EvidenceIds(input.evidenceIds, context) }), - }); + body = JSON.stringify( + take(input, { + evidenceFolderId: [], + evidenceIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -473,9 +471,11 @@ export const se_BatchImportEvidenceToAssessmentControlCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "controlId", () => input.controlId!, "{controlId}", false); let body: any; - body = JSON.stringify({ - ...(input.manualEvidence != null && { manualEvidence: se_ManualEvidenceList(input.manualEvidence, context) }), - }); + body = JSON.stringify( + take(input, { + manualEvidence: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -500,17 +500,17 @@ export const se_CreateAssessmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessments"; let body: any; - body = JSON.stringify({ - ...(input.assessmentReportsDestination != null && { - assessmentReportsDestination: se_AssessmentReportsDestination(input.assessmentReportsDestination, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.frameworkId != null && { frameworkId: input.frameworkId }), - ...(input.name != null && { name: input.name }), - ...(input.roles != null && { roles: se_Roles(input.roles, context) }), - ...(input.scope != null && { scope: se_Scope(input.scope, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + assessmentReportsDestination: (_) => _json(_), + description: [], + frameworkId: [], + name: [], + roles: (_) => _json(_), + scope: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -535,15 +535,15 @@ export const se_CreateAssessmentFrameworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentFrameworks"; let body: any; - body = JSON.stringify({ - ...(input.complianceType != null && { complianceType: input.complianceType }), - ...(input.controlSets != null && { - controlSets: se_CreateAssessmentFrameworkControlSets(input.controlSets, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + complianceType: [], + controlSets: (_) => _json(_), + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -577,11 +577,13 @@ export const se_CreateAssessmentReportCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.queryStatement != null && { queryStatement: input.queryStatement }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + queryStatement: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -606,17 +608,17 @@ export const se_CreateControlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controls"; let body: any; - body = JSON.stringify({ - ...(input.actionPlanInstructions != null && { actionPlanInstructions: input.actionPlanInstructions }), - ...(input.actionPlanTitle != null && { actionPlanTitle: input.actionPlanTitle }), - ...(input.controlMappingSources != null && { - controlMappingSources: se_CreateControlMappingSources(input.controlMappingSources, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.testingInformation != null && { testingInformation: input.testingInformation }), - }); + body = JSON.stringify( + take(input, { + actionPlanInstructions: [], + actionPlanTitle: [], + controlMappingSources: (_) => _json(_), + description: [], + name: [], + tags: (_) => _json(_), + testingInformation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -816,9 +818,11 @@ export const se_DeregisterOrganizationAdminAccountCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account/deregisterOrganizationAdminAccount"; let body: any; - body = JSON.stringify({ - ...(input.adminAccountId != null && { adminAccountId: input.adminAccountId }), - }); + body = JSON.stringify( + take(input, { + adminAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -853,9 +857,11 @@ export const se_DisassociateAssessmentReportEvidenceFolderCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.evidenceFolderId != null && { evidenceFolderId: input.evidenceFolderId }), - }); + body = JSON.stringify( + take(input, { + evidenceFolderId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1785,10 +1791,12 @@ export const se_RegisterAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account/registerAccount"; let body: any; - body = JSON.stringify({ - ...(input.delegatedAdminAccount != null && { delegatedAdminAccount: input.delegatedAdminAccount }), - ...(input.kmsKey != null && { kmsKey: input.kmsKey }), - }); + body = JSON.stringify( + take(input, { + delegatedAdminAccount: [], + kmsKey: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1814,9 +1822,11 @@ export const se_RegisterOrganizationAdminAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account/registerOrganizationAdminAccount"; let body: any; - body = JSON.stringify({ - ...(input.adminAccountId != null && { adminAccountId: input.adminAccountId }), - }); + body = JSON.stringify( + take(input, { + adminAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1844,11 +1854,13 @@ export const se_StartAssessmentFrameworkShareCommand = async ( "/assessmentFrameworks/{frameworkId}/shareRequests"; resolvedPath = __resolvedPath(resolvedPath, input, "frameworkId", () => input.frameworkId!, "{frameworkId}", false); let body: any; - body = JSON.stringify({ - ...(input.comment != null && { comment: input.comment }), - ...(input.destinationAccount != null && { destinationAccount: input.destinationAccount }), - ...(input.destinationRegion != null && { destinationRegion: input.destinationRegion }), - }); + body = JSON.stringify( + take(input, { + comment: [], + destinationAccount: [], + destinationRegion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1874,9 +1886,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1940,15 +1954,15 @@ export const se_UpdateAssessmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.assessmentDescription != null && { assessmentDescription: input.assessmentDescription }), - ...(input.assessmentName != null && { assessmentName: input.assessmentName }), - ...(input.assessmentReportsDestination != null && { - assessmentReportsDestination: se_AssessmentReportsDestination(input.assessmentReportsDestination, context), - }), - ...(input.roles != null && { roles: se_Roles(input.roles, context) }), - ...(input.scope != null && { scope: se_Scope(input.scope, context) }), - }); + body = JSON.stringify( + take(input, { + assessmentDescription: [], + assessmentName: [], + assessmentReportsDestination: (_) => _json(_), + roles: (_) => _json(_), + scope: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1992,10 +2006,12 @@ export const se_UpdateAssessmentControlCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "controlId", () => input.controlId!, "{controlId}", false); let body: any; - body = JSON.stringify({ - ...(input.commentBody != null && { commentBody: input.commentBody }), - ...(input.controlStatus != null && { controlStatus: input.controlStatus }), - }); + body = JSON.stringify( + take(input, { + commentBody: [], + controlStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2038,10 +2054,12 @@ export const se_UpdateAssessmentControlSetStatusCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.comment != null && { comment: input.comment }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + comment: [], + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2068,14 +2086,14 @@ export const se_UpdateAssessmentFrameworkCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentFrameworks/{frameworkId}"; resolvedPath = __resolvedPath(resolvedPath, input, "frameworkId", () => input.frameworkId!, "{frameworkId}", false); let body: any; - body = JSON.stringify({ - ...(input.complianceType != null && { complianceType: input.complianceType }), - ...(input.controlSets != null && { - controlSets: se_UpdateAssessmentFrameworkControlSets(input.controlSets, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + complianceType: [], + controlSets: (_) => _json(_), + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2103,10 +2121,12 @@ export const se_UpdateAssessmentFrameworkShareCommand = async ( "/assessmentFrameworkShareRequests/{requestId}"; resolvedPath = __resolvedPath(resolvedPath, input, "requestId", () => input.requestId!, "{requestId}", false); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - ...(input.requestType != null && { requestType: input.requestType }), - }); + body = JSON.stringify( + take(input, { + action: [], + requestType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2140,9 +2160,11 @@ export const se_UpdateAssessmentStatusCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2168,16 +2190,16 @@ export const se_UpdateControlCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controls/{controlId}"; resolvedPath = __resolvedPath(resolvedPath, input, "controlId", () => input.controlId!, "{controlId}", false); let body: any; - body = JSON.stringify({ - ...(input.actionPlanInstructions != null && { actionPlanInstructions: input.actionPlanInstructions }), - ...(input.actionPlanTitle != null && { actionPlanTitle: input.actionPlanTitle }), - ...(input.controlMappingSources != null && { - controlMappingSources: se_ControlMappingSources(input.controlMappingSources, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.testingInformation != null && { testingInformation: input.testingInformation }), - }); + body = JSON.stringify( + take(input, { + actionPlanInstructions: [], + actionPlanTitle: [], + controlMappingSources: (_) => _json(_), + description: [], + name: [], + testingInformation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2202,21 +2224,16 @@ export const se_UpdateSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings"; let body: any; - body = JSON.stringify({ - ...(input.defaultAssessmentReportsDestination != null && { - defaultAssessmentReportsDestination: se_AssessmentReportsDestination( - input.defaultAssessmentReportsDestination, - context - ), - }), - ...(input.defaultProcessOwners != null && { defaultProcessOwners: se_Roles(input.defaultProcessOwners, context) }), - ...(input.deregistrationPolicy != null && { - deregistrationPolicy: se_DeregistrationPolicy(input.deregistrationPolicy, context), - }), - ...(input.evidenceFinderEnabled != null && { evidenceFinderEnabled: input.evidenceFinderEnabled }), - ...(input.kmsKey != null && { kmsKey: input.kmsKey }), - ...(input.snsTopic != null && { snsTopic: input.snsTopic }), - }); + body = JSON.stringify( + take(input, { + defaultAssessmentReportsDestination: (_) => _json(_), + defaultProcessOwners: (_) => _json(_), + deregistrationPolicy: (_) => _json(_), + evidenceFinderEnabled: [], + kmsKey: [], + snsTopic: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2242,9 +2259,11 @@ export const se_ValidateAssessmentReportIntegrityCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assessmentReports/integrity"; let body: any; - body = JSON.stringify({ - ...(input.s3RelativePath != null && { s3RelativePath: input.s3RelativePath }), - }); + body = JSON.stringify( + take(input, { + s3RelativePath: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2300,10 +2319,9 @@ const de_AssociateAssessmentReportEvidenceFolderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2323,12 +2341,11 @@ export const de_BatchAssociateAssessmentReportEvidenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_AssessmentReportEvidenceErrors(data.errors, context); - } - if (data.evidenceIds != null) { - contents.evidenceIds = de_EvidenceIds(data.evidenceIds, context); - } + const doc = take(data, { + errors: _json, + evidenceIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2359,10 +2376,9 @@ const de_BatchAssociateAssessmentReportEvidenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2382,12 +2398,11 @@ export const de_BatchCreateDelegationByAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.delegations != null) { - contents.delegations = de_Delegations(data.delegations, context); - } - if (data.errors != null) { - contents.errors = de_BatchCreateDelegationByAssessmentErrors(data.errors, context); - } + const doc = take(data, { + delegations: (_) => de_Delegations(_, context), + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2418,10 +2433,9 @@ const de_BatchCreateDelegationByAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2441,9 +2455,10 @@ export const de_BatchDeleteDelegationByAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchDeleteDelegationByAssessmentErrors(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2474,10 +2489,9 @@ const de_BatchDeleteDelegationByAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,12 +2511,11 @@ export const de_BatchDisassociateAssessmentReportEvidenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_AssessmentReportEvidenceErrors(data.errors, context); - } - if (data.evidenceIds != null) { - contents.evidenceIds = de_EvidenceIds(data.evidenceIds, context); - } + const doc = take(data, { + errors: _json, + evidenceIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2533,10 +2546,9 @@ const de_BatchDisassociateAssessmentReportEvidenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2556,9 +2568,10 @@ export const de_BatchImportEvidenceToAssessmentControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchImportEvidenceToAssessmentControlErrors(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2589,10 +2602,9 @@ const de_BatchImportEvidenceToAssessmentControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2612,9 +2624,10 @@ export const de_CreateAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessment != null) { - contents.assessment = de_Assessment(data.assessment, context); - } + const doc = take(data, { + assessment: (_) => de_Assessment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2648,10 +2661,9 @@ const de_CreateAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2671,9 +2683,10 @@ export const de_CreateAssessmentFrameworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.framework != null) { - contents.framework = de_Framework(data.framework, context); - } + const doc = take(data, { + framework: (_) => de_Framework(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2707,10 +2720,9 @@ const de_CreateAssessmentFrameworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2730,9 +2742,10 @@ export const de_CreateAssessmentReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentReport != null) { - contents.assessmentReport = de_AssessmentReport(data.assessmentReport, context); - } + const doc = take(data, { + assessmentReport: (_) => de_AssessmentReport(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2763,10 +2776,9 @@ const de_CreateAssessmentReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2786,9 +2798,10 @@ export const de_CreateControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.control != null) { - contents.control = de_Control(data.control, context); - } + const doc = take(data, { + control: (_) => de_Control(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2822,10 +2835,9 @@ const de_CreateControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2875,10 +2887,9 @@ const de_DeleteAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2928,10 +2939,9 @@ const de_DeleteAssessmentFrameworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,10 +2991,9 @@ const de_DeleteAssessmentFrameworkShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3034,10 +3043,9 @@ const de_DeleteAssessmentReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3087,10 +3095,9 @@ const de_DeleteControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3110,9 +3117,10 @@ export const de_DeregisterAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3143,10 +3151,9 @@ const de_DeregisterAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3196,10 +3203,9 @@ const de_DeregisterOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3249,10 +3255,9 @@ const de_DisassociateAssessmentReportEvidenceFolderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3272,9 +3277,10 @@ export const de_GetAccountStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3296,10 +3302,9 @@ const de_GetAccountStatusCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3319,12 +3324,11 @@ export const de_GetAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessment != null) { - contents.assessment = de_Assessment(data.assessment, context); - } - if (data.userRole != null) { - contents.userRole = de_Role(data.userRole, context); - } + const doc = take(data, { + assessment: (_) => de_Assessment(_, context), + userRole: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3355,10 +3359,9 @@ const de_GetAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3378,9 +3381,10 @@ export const de_GetAssessmentFrameworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.framework != null) { - contents.framework = de_Framework(data.framework, context); - } + const doc = take(data, { + framework: (_) => de_Framework(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3411,10 +3415,9 @@ const de_GetAssessmentFrameworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3434,9 +3437,10 @@ export const de_GetAssessmentReportUrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.preSignedUrl != null) { - contents.preSignedUrl = de_URL(data.preSignedUrl, context); - } + const doc = take(data, { + preSignedUrl: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3467,10 +3471,9 @@ const de_GetAssessmentReportUrlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3490,12 +3493,11 @@ export const de_GetChangeLogsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.changeLogs != null) { - contents.changeLogs = de_ChangeLogs(data.changeLogs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + changeLogs: (_) => de_ChangeLogs(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3526,10 +3528,9 @@ const de_GetChangeLogsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3549,9 +3550,10 @@ export const de_GetControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.control != null) { - contents.control = de_Control(data.control, context); - } + const doc = take(data, { + control: (_) => de_Control(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3582,10 +3584,9 @@ const de_GetControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3605,12 +3606,11 @@ export const de_GetDelegationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.delegations != null) { - contents.delegations = de_DelegationMetadataList(data.delegations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + delegations: (_) => de_DelegationMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3638,10 +3638,9 @@ const de_GetDelegationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3661,9 +3660,10 @@ export const de_GetEvidenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.evidence != null) { - contents.evidence = de_Evidence(data.evidence, context); - } + const doc = take(data, { + evidence: (_) => de_Evidence(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3694,10 +3694,9 @@ const de_GetEvidenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3717,12 +3716,11 @@ export const de_GetEvidenceByEvidenceFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.evidence != null) { - contents.evidence = de_EvidenceList(data.evidence, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + evidence: (_) => de_EvidenceList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3753,10 +3751,9 @@ const de_GetEvidenceByEvidenceFolderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3776,9 +3773,10 @@ export const de_GetEvidenceFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.evidenceFolder != null) { - contents.evidenceFolder = de_AssessmentEvidenceFolder(data.evidenceFolder, context); - } + const doc = take(data, { + evidenceFolder: (_) => de_AssessmentEvidenceFolder(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3809,10 +3807,9 @@ const de_GetEvidenceFolderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3832,12 +3829,11 @@ export const de_GetEvidenceFoldersByAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.evidenceFolders != null) { - contents.evidenceFolders = de_AssessmentEvidenceFolders(data.evidenceFolders, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + evidenceFolders: (_) => de_AssessmentEvidenceFolders(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3868,10 +3864,9 @@ const de_GetEvidenceFoldersByAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3891,12 +3886,11 @@ export const de_GetEvidenceFoldersByAssessmentControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.evidenceFolders != null) { - contents.evidenceFolders = de_AssessmentEvidenceFolders(data.evidenceFolders, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + evidenceFolders: (_) => de_AssessmentEvidenceFolders(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3927,10 +3921,9 @@ const de_GetEvidenceFoldersByAssessmentControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3950,9 +3943,10 @@ export const de_GetInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.insights != null) { - contents.insights = de_Insights(data.insights, context); - } + const doc = take(data, { + insights: (_) => de_Insights(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3977,10 +3971,9 @@ const de_GetInsightsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4000,9 +3993,10 @@ export const de_GetInsightsByAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.insights != null) { - contents.insights = de_InsightsByAssessment(data.insights, context); - } + const doc = take(data, { + insights: (_) => de_InsightsByAssessment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4033,10 +4027,9 @@ const de_GetInsightsByAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4056,12 +4049,11 @@ export const de_GetOrganizationAdminAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adminAccountId != null) { - contents.adminAccountId = __expectString(data.adminAccountId); - } - if (data.organizationId != null) { - contents.organizationId = __expectString(data.organizationId); - } + const doc = take(data, { + adminAccountId: __expectString, + organizationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4092,10 +4084,9 @@ const de_GetOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4115,9 +4106,10 @@ export const de_GetServicesInScopeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.serviceMetadata != null) { - contents.serviceMetadata = de_ServiceMetadataList(data.serviceMetadata, context); - } + const doc = take(data, { + serviceMetadata: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4145,10 +4137,9 @@ const de_GetServicesInScopeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4168,9 +4159,10 @@ export const de_GetSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.settings != null) { - contents.settings = de_Settings(data.settings, context); - } + const doc = take(data, { + settings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4195,10 +4187,9 @@ const de_GetSettingsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4218,15 +4209,11 @@ export const de_ListAssessmentControlInsightsByControlDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlInsightsByAssessment != null) { - contents.controlInsightsByAssessment = de_ControlInsightsMetadataByAssessment( - data.controlInsightsByAssessment, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + controlInsightsByAssessment: (_) => de_ControlInsightsMetadataByAssessment(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4257,10 +4244,9 @@ const de_ListAssessmentControlInsightsByControlDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4280,12 +4266,11 @@ export const de_ListAssessmentFrameworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.frameworkMetadataList != null) { - contents.frameworkMetadataList = de_FrameworkMetadataList(data.frameworkMetadataList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + frameworkMetadataList: (_) => de_FrameworkMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4313,10 +4298,9 @@ const de_ListAssessmentFrameworksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4336,15 +4320,11 @@ export const de_ListAssessmentFrameworkShareRequestsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentFrameworkShareRequests != null) { - contents.assessmentFrameworkShareRequests = de_AssessmentFrameworkShareRequestList( - data.assessmentFrameworkShareRequests, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assessmentFrameworkShareRequests: (_) => de_AssessmentFrameworkShareRequestList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4372,10 +4352,9 @@ const de_ListAssessmentFrameworkShareRequestsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4395,12 +4374,11 @@ export const de_ListAssessmentReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentReports != null) { - contents.assessmentReports = de_AssessmentReportsMetadata(data.assessmentReports, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assessmentReports: (_) => de_AssessmentReportsMetadata(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4428,10 +4406,9 @@ const de_ListAssessmentReportsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4451,12 +4428,11 @@ export const de_ListAssessmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentMetadata != null) { - contents.assessmentMetadata = de_ListAssessmentMetadata(data.assessmentMetadata, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assessmentMetadata: (_) => de_ListAssessmentMetadata(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4484,10 +4460,9 @@ const de_ListAssessmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4507,12 +4482,11 @@ export const de_ListControlDomainInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlDomainInsights != null) { - contents.controlDomainInsights = de_ControlDomainInsightsList(data.controlDomainInsights, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + controlDomainInsights: (_) => de_ControlDomainInsightsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4543,10 +4517,9 @@ const de_ListControlDomainInsightsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4566,12 +4539,11 @@ export const de_ListControlDomainInsightsByAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlDomainInsights != null) { - contents.controlDomainInsights = de_ControlDomainInsightsList(data.controlDomainInsights, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + controlDomainInsights: (_) => de_ControlDomainInsightsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4602,10 +4574,9 @@ const de_ListControlDomainInsightsByAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4625,12 +4596,11 @@ export const de_ListControlInsightsByControlDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlInsightsMetadata != null) { - contents.controlInsightsMetadata = de_ControlInsightsMetadata(data.controlInsightsMetadata, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + controlInsightsMetadata: (_) => de_ControlInsightsMetadata(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4661,10 +4631,9 @@ const de_ListControlInsightsByControlDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4684,12 +4653,11 @@ export const de_ListControlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlMetadataList != null) { - contents.controlMetadataList = de_ControlMetadataList(data.controlMetadataList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + controlMetadataList: (_) => de_ControlMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4717,10 +4685,9 @@ const de_ListControlsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4740,12 +4707,11 @@ export const de_ListKeywordsForDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.keywords != null) { - contents.keywords = de_Keywords(data.keywords, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + keywords: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4773,10 +4739,9 @@ const de_ListKeywordsForDataSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4796,12 +4761,11 @@ export const de_ListNotificationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.notifications != null) { - contents.notifications = de_Notifications(data.notifications, context); - } + const doc = take(data, { + nextToken: __expectString, + notifications: (_) => de_Notifications(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4829,10 +4793,9 @@ const de_ListNotificationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4852,9 +4815,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4882,10 +4846,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4905,9 +4868,10 @@ export const de_RegisterAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4941,10 +4905,9 @@ const de_RegisterAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4964,12 +4927,11 @@ export const de_RegisterOrganizationAdminAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adminAccountId != null) { - contents.adminAccountId = __expectString(data.adminAccountId); - } - if (data.organizationId != null) { - contents.organizationId = __expectString(data.organizationId); - } + const doc = take(data, { + adminAccountId: __expectString, + organizationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5000,10 +4962,9 @@ const de_RegisterOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5023,12 +4984,10 @@ export const de_StartAssessmentFrameworkShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentFrameworkShareRequest != null) { - contents.assessmentFrameworkShareRequest = de_AssessmentFrameworkShareRequest( - data.assessmentFrameworkShareRequest, - context - ); - } + const doc = take(data, { + assessmentFrameworkShareRequest: (_) => de_AssessmentFrameworkShareRequest(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5059,10 +5018,9 @@ const de_StartAssessmentFrameworkShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5109,10 +5067,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5159,10 +5116,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5182,9 +5138,10 @@ export const de_UpdateAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessment != null) { - contents.assessment = de_Assessment(data.assessment, context); - } + const doc = take(data, { + assessment: (_) => de_Assessment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5215,10 +5172,9 @@ const de_UpdateAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5238,9 +5194,10 @@ export const de_UpdateAssessmentControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.control != null) { - contents.control = de_AssessmentControl(data.control, context); - } + const doc = take(data, { + control: (_) => de_AssessmentControl(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5271,10 +5228,9 @@ const de_UpdateAssessmentControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5294,9 +5250,10 @@ export const de_UpdateAssessmentControlSetStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlSet != null) { - contents.controlSet = de_AssessmentControlSet(data.controlSet, context); - } + const doc = take(data, { + controlSet: (_) => de_AssessmentControlSet(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5327,10 +5284,9 @@ const de_UpdateAssessmentControlSetStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5350,9 +5306,10 @@ export const de_UpdateAssessmentFrameworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.framework != null) { - contents.framework = de_Framework(data.framework, context); - } + const doc = take(data, { + framework: (_) => de_Framework(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5383,10 +5340,9 @@ const de_UpdateAssessmentFrameworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5406,12 +5362,10 @@ export const de_UpdateAssessmentFrameworkShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentFrameworkShareRequest != null) { - contents.assessmentFrameworkShareRequest = de_AssessmentFrameworkShareRequest( - data.assessmentFrameworkShareRequest, - context - ); - } + const doc = take(data, { + assessmentFrameworkShareRequest: (_) => de_AssessmentFrameworkShareRequest(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5445,10 +5399,9 @@ const de_UpdateAssessmentFrameworkShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5468,9 +5421,10 @@ export const de_UpdateAssessmentStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessment != null) { - contents.assessment = de_Assessment(data.assessment, context); - } + const doc = take(data, { + assessment: (_) => de_Assessment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5504,10 +5458,9 @@ const de_UpdateAssessmentStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5527,9 +5480,10 @@ export const de_UpdateControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.control != null) { - contents.control = de_Control(data.control, context); - } + const doc = take(data, { + control: (_) => de_Control(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5560,10 +5514,9 @@ const de_UpdateControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5583,9 +5536,10 @@ export const de_UpdateSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.settings != null) { - contents.settings = de_Settings(data.settings, context); - } + const doc = take(data, { + settings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5613,10 +5567,9 @@ const de_UpdateSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5636,21 +5589,14 @@ export const de_ValidateAssessmentReportIntegrityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.signatureAlgorithm != null) { - contents.signatureAlgorithm = __expectString(data.signatureAlgorithm); - } - if (data.signatureDateTime != null) { - contents.signatureDateTime = __expectString(data.signatureDateTime); - } - if (data.signatureKeyId != null) { - contents.signatureKeyId = __expectString(data.signatureKeyId); - } - if (data.signatureValid != null) { - contents.signatureValid = __expectBoolean(data.signatureValid); - } - if (data.validationErrors != null) { - contents.validationErrors = de_ValidationErrors(data.validationErrors, context); - } + const doc = take(data, { + signatureAlgorithm: __expectString, + signatureDateTime: __expectString, + signatureKeyId: __expectString, + signatureValid: __expectBoolean, + validationErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5681,16 +5627,15 @@ const de_ValidateAssessmentReportIntegrityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -5700,9 +5645,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5719,9 +5665,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5738,15 +5685,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5763,9 +5707,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5779,9 +5724,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5795,15 +5741,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fields != null) { - contents.fields = de_ValidationExceptionFieldList(data.fields, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fields: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5811,499 +5754,220 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +// se_AssessmentReportsDestination omitted. + +// se_AWSAccount omitted. + +// se_AWSAccounts omitted. + +// se_AWSService omitted. + +// se_AWSServices omitted. + +// se_ControlMappingSource omitted. + +// se_ControlMappingSources omitted. + +// se_CreateAssessmentFrameworkControl omitted. + +// se_CreateAssessmentFrameworkControls omitted. + +// se_CreateAssessmentFrameworkControlSet omitted. + +// se_CreateAssessmentFrameworkControlSets omitted. + +// se_CreateControlMappingSource omitted. + +// se_CreateControlMappingSources omitted. + +// se_CreateDelegationRequest omitted. + +// se_CreateDelegationRequests omitted. + +// se_DelegationIds omitted. + +// se_DeregistrationPolicy omitted. + +// se_EvidenceIds omitted. + +// se_ManualEvidence omitted. + +// se_ManualEvidenceList omitted. + +// se_Role omitted. + +// se_Roles omitted. + +// se_Scope omitted. + +// se_SourceKeyword omitted. + +// se_TagMap omitted. + +// se_UpdateAssessmentFrameworkControlSet omitted. + +// se_UpdateAssessmentFrameworkControlSets omitted. + /** - * serializeAws_restJson1AssessmentReportsDestination + * deserializeAws_restJson1Assessment */ -const se_AssessmentReportsDestination = (input: AssessmentReportsDestination, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: input.destination }), - ...(input.destinationType != null && { destinationType: input.destinationType }), - }; +const de_Assessment = (output: any, context: __SerdeContext): Assessment => { + return take(output, { + arn: __expectString, + awsAccount: _json, + framework: (_: any) => de_AssessmentFramework(_, context), + metadata: (_: any) => de_AssessmentMetadata(_, context), + tags: _json, + }) as any; }; /** - * serializeAws_restJson1AWSAccount + * deserializeAws_restJson1AssessmentControl */ -const se_AWSAccount = (input: AWSAccount, context: __SerdeContext): any => { - return { - ...(input.emailAddress != null && { emailAddress: input.emailAddress }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }; +const de_AssessmentControl = (output: any, context: __SerdeContext): AssessmentControl => { + return take(output, { + assessmentReportEvidenceCount: __expectInt32, + comments: (_: any) => de_ControlComments(_, context), + description: __expectString, + evidenceCount: __expectInt32, + evidenceSources: _json, + id: __expectString, + name: __expectString, + response: __expectString, + status: __expectString, + }) as any; }; /** - * serializeAws_restJson1AWSAccounts + * deserializeAws_restJson1AssessmentControls */ -const se_AWSAccounts = (input: AWSAccount[], context: __SerdeContext): any => { - return input +const de_AssessmentControls = (output: any, context: __SerdeContext): AssessmentControl[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_AWSAccount(entry, context); + .map((entry: any) => { + return de_AssessmentControl(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1AWSService + * deserializeAws_restJson1AssessmentControlSet */ -const se_AWSService = (input: AWSService, context: __SerdeContext): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; +const de_AssessmentControlSet = (output: any, context: __SerdeContext): AssessmentControlSet => { + return take(output, { + controls: (_: any) => de_AssessmentControls(_, context), + delegations: (_: any) => de_Delegations(_, context), + description: __expectString, + id: __expectString, + manualEvidenceCount: __expectInt32, + roles: _json, + status: __expectString, + systemEvidenceCount: __expectInt32, + }) as any; }; /** - * serializeAws_restJson1AWSServices + * deserializeAws_restJson1AssessmentControlSets */ -const se_AWSServices = (input: AWSService[], context: __SerdeContext): any => { - return input +const de_AssessmentControlSets = (output: any, context: __SerdeContext): AssessmentControlSet[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_AWSService(entry, context); + .map((entry: any) => { + return de_AssessmentControlSet(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1ControlMappingSource + * deserializeAws_restJson1AssessmentEvidenceFolder */ -const se_ControlMappingSource = (input: ControlMappingSource, context: __SerdeContext): any => { - return { - ...(input.sourceDescription != null && { sourceDescription: input.sourceDescription }), - ...(input.sourceFrequency != null && { sourceFrequency: input.sourceFrequency }), - ...(input.sourceId != null && { sourceId: input.sourceId }), - ...(input.sourceKeyword != null && { sourceKeyword: se_SourceKeyword(input.sourceKeyword, context) }), - ...(input.sourceName != null && { sourceName: input.sourceName }), - ...(input.sourceSetUpOption != null && { sourceSetUpOption: input.sourceSetUpOption }), - ...(input.sourceType != null && { sourceType: input.sourceType }), - ...(input.troubleshootingText != null && { troubleshootingText: input.troubleshootingText }), - }; +const de_AssessmentEvidenceFolder = (output: any, context: __SerdeContext): AssessmentEvidenceFolder => { + return take(output, { + assessmentId: __expectString, + assessmentReportSelectionCount: __expectInt32, + author: __expectString, + controlId: __expectString, + controlName: __expectString, + controlSetId: __expectString, + dataSource: __expectString, + date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + evidenceAwsServiceSourceCount: __expectInt32, + evidenceByTypeComplianceCheckCount: __expectInt32, + evidenceByTypeComplianceCheckIssuesCount: __expectInt32, + evidenceByTypeConfigurationDataCount: __expectInt32, + evidenceByTypeManualCount: __expectInt32, + evidenceByTypeUserActivityCount: __expectInt32, + evidenceResourcesIncludedCount: __expectInt32, + id: __expectString, + name: __expectString, + totalEvidence: __expectInt32, + }) as any; }; /** - * serializeAws_restJson1ControlMappingSources + * deserializeAws_restJson1AssessmentEvidenceFolders */ -const se_ControlMappingSources = (input: ControlMappingSource[], context: __SerdeContext): any => { - return input +const de_AssessmentEvidenceFolders = (output: any, context: __SerdeContext): AssessmentEvidenceFolder[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_ControlMappingSource(entry, context); + .map((entry: any) => { + return de_AssessmentEvidenceFolder(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1CreateAssessmentFrameworkControl + * deserializeAws_restJson1AssessmentFramework */ -const se_CreateAssessmentFrameworkControl = (input: CreateAssessmentFrameworkControl, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; +const de_AssessmentFramework = (output: any, context: __SerdeContext): AssessmentFramework => { + return take(output, { + arn: __expectString, + controlSets: (_: any) => de_AssessmentControlSets(_, context), + id: __expectString, + metadata: _json, + }) as any; }; /** - * serializeAws_restJson1CreateAssessmentFrameworkControls - */ -const se_CreateAssessmentFrameworkControls = ( - input: CreateAssessmentFrameworkControl[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAssessmentFrameworkControl(entry, context); - }); -}; - -/** - * serializeAws_restJson1CreateAssessmentFrameworkControlSet - */ -const se_CreateAssessmentFrameworkControlSet = ( - input: CreateAssessmentFrameworkControlSet, - context: __SerdeContext -): any => { - return { - ...(input.controls != null && { controls: se_CreateAssessmentFrameworkControls(input.controls, context) }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_restJson1CreateAssessmentFrameworkControlSets - */ -const se_CreateAssessmentFrameworkControlSets = ( - input: CreateAssessmentFrameworkControlSet[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAssessmentFrameworkControlSet(entry, context); - }); -}; - -/** - * serializeAws_restJson1CreateControlMappingSource - */ -const se_CreateControlMappingSource = (input: CreateControlMappingSource, context: __SerdeContext): any => { - return { - ...(input.sourceDescription != null && { sourceDescription: input.sourceDescription }), - ...(input.sourceFrequency != null && { sourceFrequency: input.sourceFrequency }), - ...(input.sourceKeyword != null && { sourceKeyword: se_SourceKeyword(input.sourceKeyword, context) }), - ...(input.sourceName != null && { sourceName: input.sourceName }), - ...(input.sourceSetUpOption != null && { sourceSetUpOption: input.sourceSetUpOption }), - ...(input.sourceType != null && { sourceType: input.sourceType }), - ...(input.troubleshootingText != null && { troubleshootingText: input.troubleshootingText }), - }; -}; - -/** - * serializeAws_restJson1CreateControlMappingSources - */ -const se_CreateControlMappingSources = (input: CreateControlMappingSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateControlMappingSource(entry, context); - }); -}; - -/** - * serializeAws_restJson1CreateDelegationRequest - */ -const se_CreateDelegationRequest = (input: CreateDelegationRequest, context: __SerdeContext): any => { - return { - ...(input.comment != null && { comment: input.comment }), - ...(input.controlSetId != null && { controlSetId: input.controlSetId }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.roleType != null && { roleType: input.roleType }), - }; -}; - -/** - * serializeAws_restJson1CreateDelegationRequests - */ -const se_CreateDelegationRequests = (input: CreateDelegationRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateDelegationRequest(entry, context); - }); -}; - -/** - * serializeAws_restJson1DelegationIds - */ -const se_DelegationIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1DeregistrationPolicy - */ -const se_DeregistrationPolicy = (input: DeregistrationPolicy, context: __SerdeContext): any => { - return { - ...(input.deleteResources != null && { deleteResources: input.deleteResources }), - }; -}; - -/** - * serializeAws_restJson1EvidenceIds - */ -const se_EvidenceIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ManualEvidence - */ -const se_ManualEvidence = (input: ManualEvidence, context: __SerdeContext): any => { - return { - ...(input.s3ResourcePath != null && { s3ResourcePath: input.s3ResourcePath }), - }; -}; - -/** - * serializeAws_restJson1ManualEvidenceList - */ -const se_ManualEvidenceList = (input: ManualEvidence[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ManualEvidence(entry, context); - }); -}; - -/** - * serializeAws_restJson1Role - */ -const se_Role = (input: Role, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.roleType != null && { roleType: input.roleType }), - }; -}; - -/** - * serializeAws_restJson1Roles - */ -const se_Roles = (input: Role[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Role(entry, context); - }); -}; - -/** - * serializeAws_restJson1Scope - */ -const se_Scope = (input: Scope, context: __SerdeContext): any => { - return { - ...(input.awsAccounts != null && { awsAccounts: se_AWSAccounts(input.awsAccounts, context) }), - ...(input.awsServices != null && { awsServices: se_AWSServices(input.awsServices, context) }), - }; -}; - -/** - * serializeAws_restJson1SourceKeyword - */ -const se_SourceKeyword = (input: SourceKeyword, context: __SerdeContext): any => { - return { - ...(input.keywordInputType != null && { keywordInputType: input.keywordInputType }), - ...(input.keywordValue != null && { keywordValue: input.keywordValue }), - }; -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1UpdateAssessmentFrameworkControlSet - */ -const se_UpdateAssessmentFrameworkControlSet = ( - input: UpdateAssessmentFrameworkControlSet, - context: __SerdeContext -): any => { - return { - ...(input.controls != null && { controls: se_CreateAssessmentFrameworkControls(input.controls, context) }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_restJson1UpdateAssessmentFrameworkControlSets - */ -const se_UpdateAssessmentFrameworkControlSets = ( - input: UpdateAssessmentFrameworkControlSet[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateAssessmentFrameworkControlSet(entry, context); - }); -}; - -/** - * deserializeAws_restJson1Assessment - */ -const de_Assessment = (output: any, context: __SerdeContext): Assessment => { - return { - arn: __expectString(output.arn), - awsAccount: output.awsAccount != null ? de_AWSAccount(output.awsAccount, context) : undefined, - framework: output.framework != null ? de_AssessmentFramework(output.framework, context) : undefined, - metadata: output.metadata != null ? de_AssessmentMetadata(output.metadata, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentControl - */ -const de_AssessmentControl = (output: any, context: __SerdeContext): AssessmentControl => { - return { - assessmentReportEvidenceCount: __expectInt32(output.assessmentReportEvidenceCount), - comments: output.comments != null ? de_ControlComments(output.comments, context) : undefined, - description: __expectString(output.description), - evidenceCount: __expectInt32(output.evidenceCount), - evidenceSources: output.evidenceSources != null ? de_EvidenceSources(output.evidenceSources, context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - response: __expectString(output.response), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentControls - */ -const de_AssessmentControls = (output: any, context: __SerdeContext): AssessmentControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentControl(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssessmentControlSet - */ -const de_AssessmentControlSet = (output: any, context: __SerdeContext): AssessmentControlSet => { - return { - controls: output.controls != null ? de_AssessmentControls(output.controls, context) : undefined, - delegations: output.delegations != null ? de_Delegations(output.delegations, context) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - manualEvidenceCount: __expectInt32(output.manualEvidenceCount), - roles: output.roles != null ? de_Roles(output.roles, context) : undefined, - status: __expectString(output.status), - systemEvidenceCount: __expectInt32(output.systemEvidenceCount), - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentControlSets - */ -const de_AssessmentControlSets = (output: any, context: __SerdeContext): AssessmentControlSet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentControlSet(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssessmentEvidenceFolder - */ -const de_AssessmentEvidenceFolder = (output: any, context: __SerdeContext): AssessmentEvidenceFolder => { - return { - assessmentId: __expectString(output.assessmentId), - assessmentReportSelectionCount: __expectInt32(output.assessmentReportSelectionCount), - author: __expectString(output.author), - controlId: __expectString(output.controlId), - controlName: __expectString(output.controlName), - controlSetId: __expectString(output.controlSetId), - dataSource: __expectString(output.dataSource), - date: output.date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.date))) : undefined, - evidenceAwsServiceSourceCount: __expectInt32(output.evidenceAwsServiceSourceCount), - evidenceByTypeComplianceCheckCount: __expectInt32(output.evidenceByTypeComplianceCheckCount), - evidenceByTypeComplianceCheckIssuesCount: __expectInt32(output.evidenceByTypeComplianceCheckIssuesCount), - evidenceByTypeConfigurationDataCount: __expectInt32(output.evidenceByTypeConfigurationDataCount), - evidenceByTypeManualCount: __expectInt32(output.evidenceByTypeManualCount), - evidenceByTypeUserActivityCount: __expectInt32(output.evidenceByTypeUserActivityCount), - evidenceResourcesIncludedCount: __expectInt32(output.evidenceResourcesIncludedCount), - id: __expectString(output.id), - name: __expectString(output.name), - totalEvidence: __expectInt32(output.totalEvidence), - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentEvidenceFolders - */ -const de_AssessmentEvidenceFolders = (output: any, context: __SerdeContext): AssessmentEvidenceFolder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentEvidenceFolder(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssessmentFramework - */ -const de_AssessmentFramework = (output: any, context: __SerdeContext): AssessmentFramework => { - return { - arn: __expectString(output.arn), - controlSets: output.controlSets != null ? de_AssessmentControlSets(output.controlSets, context) : undefined, - id: __expectString(output.id), - metadata: output.metadata != null ? de_FrameworkMetadata(output.metadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentFrameworkMetadata + * deserializeAws_restJson1AssessmentFrameworkMetadata */ const de_AssessmentFrameworkMetadata = (output: any, context: __SerdeContext): AssessmentFrameworkMetadata => { - return { - arn: __expectString(output.arn), - complianceType: __expectString(output.complianceType), - controlSetsCount: __expectInt32(output.controlSetsCount), - controlsCount: __expectInt32(output.controlsCount), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - logo: __expectString(output.logo), - name: __expectString(output.name), - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + complianceType: __expectString, + controlSetsCount: __expectInt32, + controlsCount: __expectInt32, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + logo: __expectString, + name: __expectString, + type: __expectString, + }) as any; }; /** * deserializeAws_restJson1AssessmentFrameworkShareRequest */ const de_AssessmentFrameworkShareRequest = (output: any, context: __SerdeContext): AssessmentFrameworkShareRequest => { - return { - comment: __expectString(output.comment), - complianceType: __expectString(output.complianceType), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - customControlsCount: __expectInt32(output.customControlsCount), - destinationAccount: __expectString(output.destinationAccount), - destinationRegion: __expectString(output.destinationRegion), - expirationTime: - output.expirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expirationTime))) - : undefined, - frameworkDescription: __expectString(output.frameworkDescription), - frameworkId: __expectString(output.frameworkId), - frameworkName: __expectString(output.frameworkName), - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - sourceAccount: __expectString(output.sourceAccount), - standardControlsCount: __expectInt32(output.standardControlsCount), - status: __expectString(output.status), - } as any; + return take(output, { + comment: __expectString, + complianceType: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customControlsCount: __expectInt32, + destinationAccount: __expectString, + destinationRegion: __expectString, + expirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + frameworkDescription: __expectString, + frameworkId: __expectString, + frameworkName: __expectString, + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + sourceAccount: __expectString, + standardControlsCount: __expectInt32, + status: __expectString, + }) as any; }; /** @@ -6316,9 +5980,6 @@ const de_AssessmentFrameworkShareRequestList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssessmentFrameworkShareRequest(entry, context); }); return retVal; @@ -6328,126 +5989,75 @@ const de_AssessmentFrameworkShareRequestList = ( * deserializeAws_restJson1AssessmentMetadata */ const de_AssessmentMetadata = (output: any, context: __SerdeContext): AssessmentMetadata => { - return { - assessmentReportsDestination: - output.assessmentReportsDestination != null - ? de_AssessmentReportsDestination(output.assessmentReportsDestination, context) - : undefined, - complianceType: __expectString(output.complianceType), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - delegations: output.delegations != null ? de_Delegations(output.delegations, context) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - name: __expectString(output.name), - roles: output.roles != null ? de_Roles(output.roles, context) : undefined, - scope: output.scope != null ? de_Scope(output.scope, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + assessmentReportsDestination: _json, + complianceType: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + delegations: (_: any) => de_Delegations(_, context), + description: __expectString, + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + roles: _json, + scope: _json, + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1AssessmentMetadataItem */ const de_AssessmentMetadataItem = (output: any, context: __SerdeContext): AssessmentMetadataItem => { - return { - complianceType: __expectString(output.complianceType), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - delegations: output.delegations != null ? de_Delegations(output.delegations, context) : undefined, - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - name: __expectString(output.name), - roles: output.roles != null ? de_Roles(output.roles, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + complianceType: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + delegations: (_: any) => de_Delegations(_, context), + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + roles: _json, + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1AssessmentReport */ const de_AssessmentReport = (output: any, context: __SerdeContext): AssessmentReport => { - return { - assessmentId: __expectString(output.assessmentId), - assessmentName: __expectString(output.assessmentName), - author: __expectString(output.author), - awsAccountId: __expectString(output.awsAccountId), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + assessmentId: __expectString, + assessmentName: __expectString, + author: __expectString, + awsAccountId: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AssessmentReportEvidenceError - */ -const de_AssessmentReportEvidenceError = (output: any, context: __SerdeContext): AssessmentReportEvidenceError => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - evidenceId: __expectString(output.evidenceId), - } as any; -}; +// de_AssessmentReportEvidenceError omitted. -/** - * deserializeAws_restJson1AssessmentReportEvidenceErrors - */ -const de_AssessmentReportEvidenceErrors = (output: any, context: __SerdeContext): AssessmentReportEvidenceError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentReportEvidenceError(entry, context); - }); - return retVal; -}; +// de_AssessmentReportEvidenceErrors omitted. /** * deserializeAws_restJson1AssessmentReportMetadata */ const de_AssessmentReportMetadata = (output: any, context: __SerdeContext): AssessmentReportMetadata => { - return { - assessmentId: __expectString(output.assessmentId), - assessmentName: __expectString(output.assessmentName), - author: __expectString(output.author), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + assessmentId: __expectString, + assessmentName: __expectString, + author: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AssessmentReportsDestination - */ -const de_AssessmentReportsDestination = (output: any, context: __SerdeContext): AssessmentReportsDestination => { - return { - destination: __expectString(output.destination), - destinationType: __expectString(output.destinationType), - } as any; -}; +// de_AssessmentReportsDestination omitted. /** * deserializeAws_restJson1AssessmentReportsMetadata @@ -6456,175 +6066,42 @@ const de_AssessmentReportsMetadata = (output: any, context: __SerdeContext): Ass const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssessmentReportMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AWSAccount - */ -const de_AWSAccount = (output: any, context: __SerdeContext): AWSAccount => { - return { - emailAddress: __expectString(output.emailAddress), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_AWSAccount omitted. -/** - * deserializeAws_restJson1AWSAccounts - */ -const de_AWSAccounts = (output: any, context: __SerdeContext): AWSAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AWSAccount(entry, context); - }); - return retVal; -}; +// de_AWSAccounts omitted. -/** - * deserializeAws_restJson1AWSService - */ -const de_AWSService = (output: any, context: __SerdeContext): AWSService => { - return { - serviceName: __expectString(output.serviceName), - } as any; -}; +// de_AWSService omitted. -/** - * deserializeAws_restJson1AWSServices - */ -const de_AWSServices = (output: any, context: __SerdeContext): AWSService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AWSService(entry, context); - }); - return retVal; -}; +// de_AWSServices omitted. -/** - * deserializeAws_restJson1BatchCreateDelegationByAssessmentError - */ -const de_BatchCreateDelegationByAssessmentError = ( - output: any, - context: __SerdeContext -): BatchCreateDelegationByAssessmentError => { - return { - createDelegationRequest: - output.createDelegationRequest != null - ? de_CreateDelegationRequest(output.createDelegationRequest, context) - : undefined, - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_BatchCreateDelegationByAssessmentError omitted. -/** - * deserializeAws_restJson1BatchCreateDelegationByAssessmentErrors - */ -const de_BatchCreateDelegationByAssessmentErrors = ( - output: any, - context: __SerdeContext -): BatchCreateDelegationByAssessmentError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchCreateDelegationByAssessmentError(entry, context); - }); - return retVal; -}; +// de_BatchCreateDelegationByAssessmentErrors omitted. -/** - * deserializeAws_restJson1BatchDeleteDelegationByAssessmentError - */ -const de_BatchDeleteDelegationByAssessmentError = ( - output: any, - context: __SerdeContext -): BatchDeleteDelegationByAssessmentError => { - return { - delegationId: __expectString(output.delegationId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_BatchDeleteDelegationByAssessmentError omitted. -/** - * deserializeAws_restJson1BatchDeleteDelegationByAssessmentErrors - */ -const de_BatchDeleteDelegationByAssessmentErrors = ( - output: any, - context: __SerdeContext -): BatchDeleteDelegationByAssessmentError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteDelegationByAssessmentError(entry, context); - }); - return retVal; -}; +// de_BatchDeleteDelegationByAssessmentErrors omitted. -/** - * deserializeAws_restJson1BatchImportEvidenceToAssessmentControlError - */ -const de_BatchImportEvidenceToAssessmentControlError = ( - output: any, - context: __SerdeContext -): BatchImportEvidenceToAssessmentControlError => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - manualEvidence: output.manualEvidence != null ? de_ManualEvidence(output.manualEvidence, context) : undefined, - } as any; -}; +// de_BatchImportEvidenceToAssessmentControlError omitted. -/** - * deserializeAws_restJson1BatchImportEvidenceToAssessmentControlErrors - */ -const de_BatchImportEvidenceToAssessmentControlErrors = ( - output: any, - context: __SerdeContext -): BatchImportEvidenceToAssessmentControlError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchImportEvidenceToAssessmentControlError(entry, context); - }); - return retVal; -}; +// de_BatchImportEvidenceToAssessmentControlErrors omitted. /** * deserializeAws_restJson1ChangeLog */ const de_ChangeLog = (output: any, context: __SerdeContext): ChangeLog => { - return { - action: __expectString(output.action), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - objectName: __expectString(output.objectName), - objectType: __expectString(output.objectType), - } as any; + return take(output, { + action: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + objectName: __expectString, + objectType: __expectString, + }) as any; }; /** @@ -6634,9 +6111,6 @@ const de_ChangeLogs = (output: any, context: __SerdeContext): ChangeLog[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChangeLog(entry, context); }); return retVal; @@ -6646,42 +6120,34 @@ const de_ChangeLogs = (output: any, context: __SerdeContext): ChangeLog[] => { * deserializeAws_restJson1Control */ const de_Control = (output: any, context: __SerdeContext): Control => { - return { - actionPlanInstructions: __expectString(output.actionPlanInstructions), - actionPlanTitle: __expectString(output.actionPlanTitle), - arn: __expectString(output.arn), - controlMappingSources: - output.controlMappingSources != null - ? de_ControlMappingSources(output.controlMappingSources, context) - : undefined, - controlSources: __expectString(output.controlSources), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lastUpdatedBy: __expectString(output.lastUpdatedBy), - name: __expectString(output.name), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - testingInformation: __expectString(output.testingInformation), - type: __expectString(output.type), - } as any; + return take(output, { + actionPlanInstructions: __expectString, + actionPlanTitle: __expectString, + arn: __expectString, + controlMappingSources: _json, + controlSources: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + description: __expectString, + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedBy: __expectString, + name: __expectString, + tags: _json, + testingInformation: __expectString, + type: __expectString, + }) as any; }; /** * deserializeAws_restJson1ControlComment */ const de_ControlComment = (output: any, context: __SerdeContext): ControlComment => { - return { - authorName: __expectString(output.authorName), - commentBody: __expectString(output.commentBody), - postedDate: - output.postedDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.postedDate))) : undefined, - } as any; + return take(output, { + authorName: __expectString, + commentBody: __expectString, + postedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -6691,9 +6157,6 @@ const de_ControlComments = (output: any, context: __SerdeContext): ControlCommen const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ControlComment(entry, context); }); return retVal; @@ -6703,18 +6166,14 @@ const de_ControlComments = (output: any, context: __SerdeContext): ControlCommen * deserializeAws_restJson1ControlDomainInsights */ const de_ControlDomainInsights = (output: any, context: __SerdeContext): ControlDomainInsights => { - return { - controlsCountByNoncompliantEvidence: __expectInt32(output.controlsCountByNoncompliantEvidence), - evidenceInsights: - output.evidenceInsights != null ? de_EvidenceInsights(output.evidenceInsights, context) : undefined, - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - name: __expectString(output.name), - totalControlsCount: __expectInt32(output.totalControlsCount), - } as any; + return take(output, { + controlsCountByNoncompliantEvidence: __expectInt32, + evidenceInsights: _json, + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + totalControlsCount: __expectInt32, + }) as any; }; /** @@ -6724,9 +6183,6 @@ const de_ControlDomainInsightsList = (output: any, context: __SerdeContext): Con const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ControlDomainInsights(entry, context); }); return retVal; @@ -6739,9 +6195,6 @@ const de_ControlInsightsMetadata = (output: any, context: __SerdeContext): Contr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ControlInsightsMetadataItem(entry, context); }); return retVal; @@ -6757,9 +6210,6 @@ const de_ControlInsightsMetadataByAssessment = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ControlInsightsMetadataByAssessmentItem(entry, context); }); return retVal; @@ -6772,82 +6222,43 @@ const de_ControlInsightsMetadataByAssessmentItem = ( output: any, context: __SerdeContext ): ControlInsightsMetadataByAssessmentItem => { - return { - controlSetName: __expectString(output.controlSetName), - evidenceInsights: - output.evidenceInsights != null ? de_EvidenceInsights(output.evidenceInsights, context) : undefined, - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + controlSetName: __expectString, + evidenceInsights: _json, + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** * deserializeAws_restJson1ControlInsightsMetadataItem */ const de_ControlInsightsMetadataItem = (output: any, context: __SerdeContext): ControlInsightsMetadataItem => { - return { - evidenceInsights: - output.evidenceInsights != null ? de_EvidenceInsights(output.evidenceInsights, context) : undefined, - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + evidenceInsights: _json, + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ControlMappingSource - */ -const de_ControlMappingSource = (output: any, context: __SerdeContext): ControlMappingSource => { - return { - sourceDescription: __expectString(output.sourceDescription), - sourceFrequency: __expectString(output.sourceFrequency), - sourceId: __expectString(output.sourceId), - sourceKeyword: output.sourceKeyword != null ? de_SourceKeyword(output.sourceKeyword, context) : undefined, - sourceName: __expectString(output.sourceName), - sourceSetUpOption: __expectString(output.sourceSetUpOption), - sourceType: __expectString(output.sourceType), - troubleshootingText: __expectString(output.troubleshootingText), - } as any; -}; +// de_ControlMappingSource omitted. -/** - * deserializeAws_restJson1ControlMappingSources - */ -const de_ControlMappingSources = (output: any, context: __SerdeContext): ControlMappingSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ControlMappingSource(entry, context); - }); - return retVal; -}; +// de_ControlMappingSources omitted. /** * deserializeAws_restJson1ControlMetadata */ const de_ControlMetadata = (output: any, context: __SerdeContext): ControlMetadata => { - return { - arn: __expectString(output.arn), - controlSources: __expectString(output.controlSources), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + controlSources: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** @@ -6857,9 +6268,6 @@ const de_ControlMetadataList = (output: any, context: __SerdeContext): ControlMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ControlMetadata(entry, context); }); return retVal; @@ -6872,9 +6280,6 @@ const de_Controls = (output: any, context: __SerdeContext): Control[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Control(entry, context); }); return retVal; @@ -6884,11 +6289,11 @@ const de_Controls = (output: any, context: __SerdeContext): Control[] => { * deserializeAws_restJson1ControlSet */ const de_ControlSet = (output: any, context: __SerdeContext): ControlSet => { - return { - controls: output.controls != null ? de_Controls(output.controls, context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - } as any; + return take(output, { + controls: (_: any) => de_Controls(_, context), + id: __expectString, + name: __expectString, + }) as any; }; /** @@ -6898,67 +6303,45 @@ const de_ControlSets = (output: any, context: __SerdeContext): ControlSet[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ControlSet(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CreateDelegationRequest - */ -const de_CreateDelegationRequest = (output: any, context: __SerdeContext): CreateDelegationRequest => { - return { - comment: __expectString(output.comment), - controlSetId: __expectString(output.controlSetId), - roleArn: __expectString(output.roleArn), - roleType: __expectString(output.roleType), - } as any; -}; +// de_CreateDelegationRequest omitted. /** * deserializeAws_restJson1Delegation */ const de_Delegation = (output: any, context: __SerdeContext): Delegation => { - return { - assessmentId: __expectString(output.assessmentId), - assessmentName: __expectString(output.assessmentName), - comment: __expectString(output.comment), - controlSetId: __expectString(output.controlSetId), - createdBy: __expectString(output.createdBy), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - id: __expectString(output.id), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - roleArn: __expectString(output.roleArn), - roleType: __expectString(output.roleType), - status: __expectString(output.status), - } as any; + return take(output, { + assessmentId: __expectString, + assessmentName: __expectString, + comment: __expectString, + controlSetId: __expectString, + createdBy: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + roleType: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1DelegationMetadata */ const de_DelegationMetadata = (output: any, context: __SerdeContext): DelegationMetadata => { - return { - assessmentId: __expectString(output.assessmentId), - assessmentName: __expectString(output.assessmentName), - controlSetName: __expectString(output.controlSetName), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - id: __expectString(output.id), - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + assessmentId: __expectString, + assessmentName: __expectString, + controlSetName: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + roleArn: __expectString, + status: __expectString, + }) as any; }; /** @@ -6968,9 +6351,6 @@ const de_DelegationMetadataList = (output: any, context: __SerdeContext): Delega const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DelegationMetadata(entry, context); }); return retVal; @@ -6983,96 +6363,43 @@ const de_Delegations = (output: any, context: __SerdeContext): Delegation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Delegation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DeregistrationPolicy - */ -const de_DeregistrationPolicy = (output: any, context: __SerdeContext): DeregistrationPolicy => { - return { - deleteResources: __expectString(output.deleteResources), - } as any; -}; +// de_DeregistrationPolicy omitted. /** * deserializeAws_restJson1Evidence */ const de_Evidence = (output: any, context: __SerdeContext): Evidence => { - return { - assessmentReportSelection: __expectString(output.assessmentReportSelection), - attributes: output.attributes != null ? de_EvidenceAttributes(output.attributes, context) : undefined, - awsAccountId: __expectString(output.awsAccountId), - awsOrganization: __expectString(output.awsOrganization), - complianceCheck: __expectString(output.complianceCheck), - dataSource: __expectString(output.dataSource), - eventName: __expectString(output.eventName), - eventSource: __expectString(output.eventSource), - evidenceAwsAccountId: __expectString(output.evidenceAwsAccountId), - evidenceByType: __expectString(output.evidenceByType), - evidenceFolderId: __expectString(output.evidenceFolderId), - iamId: __expectString(output.iamId), - id: __expectString(output.id), - resourcesIncluded: output.resourcesIncluded != null ? de_Resources(output.resourcesIncluded, context) : undefined, - time: output.time != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.time))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EvidenceAttributes - */ -const de_EvidenceAttributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + assessmentReportSelection: __expectString, + attributes: _json, + awsAccountId: __expectString, + awsOrganization: __expectString, + complianceCheck: __expectString, + dataSource: __expectString, + eventName: __expectString, + eventSource: __expectString, + evidenceAwsAccountId: __expectString, + evidenceByType: __expectString, + evidenceFolderId: __expectString, + iamId: __expectString, + id: __expectString, + resourcesIncluded: _json, + time: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1EvidenceFinderEnablement - */ -const de_EvidenceFinderEnablement = (output: any, context: __SerdeContext): EvidenceFinderEnablement => { - return { - backfillStatus: __expectString(output.backfillStatus), - enablementStatus: __expectString(output.enablementStatus), - error: __expectString(output.error), - eventDataStoreArn: __expectString(output.eventDataStoreArn), - } as any; -}; +// de_EvidenceAttributes omitted. -/** - * deserializeAws_restJson1EvidenceIds - */ -const de_EvidenceIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EvidenceFinderEnablement omitted. -/** - * deserializeAws_restJson1EvidenceInsights - */ -const de_EvidenceInsights = (output: any, context: __SerdeContext): EvidenceInsights => { - return { - compliantEvidenceCount: __expectInt32(output.compliantEvidenceCount), - inconclusiveEvidenceCount: __expectInt32(output.inconclusiveEvidenceCount), - noncompliantEvidenceCount: __expectInt32(output.noncompliantEvidenceCount), - } as any; -}; +// de_EvidenceIds omitted. + +// de_EvidenceInsights omitted. /** * deserializeAws_restJson1EvidenceList @@ -7081,66 +6408,36 @@ const de_EvidenceList = (output: any, context: __SerdeContext): Evidence[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Evidence(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EvidenceSources - */ -const de_EvidenceSources = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EvidenceSources omitted. /** * deserializeAws_restJson1Framework */ const de_Framework = (output: any, context: __SerdeContext): Framework => { - return { - arn: __expectString(output.arn), - complianceType: __expectString(output.complianceType), - controlSets: output.controlSets != null ? de_ControlSets(output.controlSets, context) : undefined, - controlSources: __expectString(output.controlSources), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lastUpdatedBy: __expectString(output.lastUpdatedBy), - logo: __expectString(output.logo), - name: __expectString(output.name), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1FrameworkMetadata - */ -const de_FrameworkMetadata = (output: any, context: __SerdeContext): FrameworkMetadata => { - return { - complianceType: __expectString(output.complianceType), - description: __expectString(output.description), - logo: __expectString(output.logo), - name: __expectString(output.name), - } as any; -}; + return take(output, { + arn: __expectString, + complianceType: __expectString, + controlSets: (_: any) => de_ControlSets(_, context), + controlSources: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + description: __expectString, + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedBy: __expectString, + logo: __expectString, + name: __expectString, + tags: _json, + type: __expectString, + }) as any; +}; + +// de_FrameworkMetadata omitted. /** * deserializeAws_restJson1FrameworkMetadataList @@ -7149,9 +6446,6 @@ const de_FrameworkMetadataList = (output: any, context: __SerdeContext): Assessm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssessmentFrameworkMetadata(entry, context); }); return retVal; @@ -7161,51 +6455,32 @@ const de_FrameworkMetadataList = (output: any, context: __SerdeContext): Assessm * deserializeAws_restJson1Insights */ const de_Insights = (output: any, context: __SerdeContext): Insights => { - return { - activeAssessmentsCount: __expectInt32(output.activeAssessmentsCount), - assessmentControlsCountByNoncompliantEvidence: __expectInt32(output.assessmentControlsCountByNoncompliantEvidence), - compliantEvidenceCount: __expectInt32(output.compliantEvidenceCount), - inconclusiveEvidenceCount: __expectInt32(output.inconclusiveEvidenceCount), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - noncompliantEvidenceCount: __expectInt32(output.noncompliantEvidenceCount), - totalAssessmentControlsCount: __expectInt32(output.totalAssessmentControlsCount), - } as any; + return take(output, { + activeAssessmentsCount: __expectInt32, + assessmentControlsCountByNoncompliantEvidence: __expectInt32, + compliantEvidenceCount: __expectInt32, + inconclusiveEvidenceCount: __expectInt32, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + noncompliantEvidenceCount: __expectInt32, + totalAssessmentControlsCount: __expectInt32, + }) as any; }; /** * deserializeAws_restJson1InsightsByAssessment */ const de_InsightsByAssessment = (output: any, context: __SerdeContext): InsightsByAssessment => { - return { - assessmentControlsCountByNoncompliantEvidence: __expectInt32(output.assessmentControlsCountByNoncompliantEvidence), - compliantEvidenceCount: __expectInt32(output.compliantEvidenceCount), - inconclusiveEvidenceCount: __expectInt32(output.inconclusiveEvidenceCount), - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - noncompliantEvidenceCount: __expectInt32(output.noncompliantEvidenceCount), - totalAssessmentControlsCount: __expectInt32(output.totalAssessmentControlsCount), - } as any; + return take(output, { + assessmentControlsCountByNoncompliantEvidence: __expectInt32, + compliantEvidenceCount: __expectInt32, + inconclusiveEvidenceCount: __expectInt32, + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + noncompliantEvidenceCount: __expectInt32, + totalAssessmentControlsCount: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1Keywords - */ -const de_Keywords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Keywords omitted. /** * deserializeAws_restJson1ListAssessmentMetadata @@ -7214,38 +6489,27 @@ const de_ListAssessmentMetadata = (output: any, context: __SerdeContext): Assess const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssessmentMetadataItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ManualEvidence - */ -const de_ManualEvidence = (output: any, context: __SerdeContext): ManualEvidence => { - return { - s3ResourcePath: __expectString(output.s3ResourcePath), - } as any; -}; +// de_ManualEvidence omitted. /** * deserializeAws_restJson1Notification */ const de_Notification = (output: any, context: __SerdeContext): Notification => { - return { - assessmentId: __expectString(output.assessmentId), - assessmentName: __expectString(output.assessmentName), - controlSetId: __expectString(output.controlSetId), - controlSetName: __expectString(output.controlSetName), - description: __expectString(output.description), - eventTime: - output.eventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventTime))) : undefined, - id: __expectString(output.id), - source: __expectString(output.source), - } as any; + return take(output, { + assessmentId: __expectString, + assessmentName: __expectString, + controlSetId: __expectString, + controlSetName: __expectString, + description: __expectString, + eventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + source: __expectString, + }) as any; }; /** @@ -7255,197 +6519,38 @@ const de_Notifications = (output: any, context: __SerdeContext): Notification[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Notification(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - arn: __expectString(output.arn), - complianceCheck: __expectString(output.complianceCheck), - value: __expectString(output.value), - } as any; -}; +// de_Resource omitted. -/** - * deserializeAws_restJson1Resources - */ -const de_Resources = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_Resources omitted. -/** - * deserializeAws_restJson1Role - */ -const de_Role = (output: any, context: __SerdeContext): Role => { - return { - roleArn: __expectString(output.roleArn), - roleType: __expectString(output.roleType), - } as any; -}; +// de_Role omitted. -/** - * deserializeAws_restJson1Roles - */ -const de_Roles = (output: any, context: __SerdeContext): Role[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Role(entry, context); - }); - return retVal; -}; +// de_Roles omitted. -/** - * deserializeAws_restJson1Scope - */ -const de_Scope = (output: any, context: __SerdeContext): Scope => { - return { - awsAccounts: output.awsAccounts != null ? de_AWSAccounts(output.awsAccounts, context) : undefined, - awsServices: output.awsServices != null ? de_AWSServices(output.awsServices, context) : undefined, - } as any; -}; +// de_Scope omitted. -/** - * deserializeAws_restJson1ServiceMetadata - */ -const de_ServiceMetadata = (output: any, context: __SerdeContext): ServiceMetadata => { - return { - category: __expectString(output.category), - description: __expectString(output.description), - displayName: __expectString(output.displayName), - name: __expectString(output.name), - } as any; -}; +// de_ServiceMetadata omitted. -/** - * deserializeAws_restJson1ServiceMetadataList - */ -const de_ServiceMetadataList = (output: any, context: __SerdeContext): ServiceMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceMetadata(entry, context); - }); - return retVal; -}; +// de_ServiceMetadataList omitted. -/** - * deserializeAws_restJson1Settings - */ -const de_Settings = (output: any, context: __SerdeContext): Settings => { - return { - defaultAssessmentReportsDestination: - output.defaultAssessmentReportsDestination != null - ? de_AssessmentReportsDestination(output.defaultAssessmentReportsDestination, context) - : undefined, - defaultProcessOwners: - output.defaultProcessOwners != null ? de_Roles(output.defaultProcessOwners, context) : undefined, - deregistrationPolicy: - output.deregistrationPolicy != null ? de_DeregistrationPolicy(output.deregistrationPolicy, context) : undefined, - evidenceFinderEnablement: - output.evidenceFinderEnablement != null - ? de_EvidenceFinderEnablement(output.evidenceFinderEnablement, context) - : undefined, - isAwsOrgEnabled: __expectBoolean(output.isAwsOrgEnabled), - kmsKey: __expectString(output.kmsKey), - snsTopic: __expectString(output.snsTopic), - } as any; -}; +// de_Settings omitted. -/** - * deserializeAws_restJson1SourceKeyword - */ -const de_SourceKeyword = (output: any, context: __SerdeContext): SourceKeyword => { - return { - keywordInputType: __expectString(output.keywordInputType), - keywordValue: __expectString(output.keywordValue), - } as any; -}; +// de_SourceKeyword omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1URL - */ -const de_URL = (output: any, context: __SerdeContext): URL => { - return { - hyperlinkName: __expectString(output.hyperlinkName), - link: __expectString(output.link), - } as any; -}; +// de_URL omitted. -/** - * deserializeAws_restJson1ValidationErrors - */ -const de_ValidationErrors = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ValidationErrors omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-auto-scaling-plans/src/protocols/Aws_json1_1.ts b/clients/client-auto-scaling-plans/src/protocols/Aws_json1_1.ts index 73d151b5efc4..57a5bfc6b8b6 100644 --- a/clients/client-auto-scaling-plans/src/protocols/Aws_json1_1.ts +++ b/clients/client-auto-scaling-plans/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -40,12 +42,10 @@ import { ApplicationSource, ConcurrentUpdateException, CreateScalingPlanRequest, - CreateScalingPlanResponse, CustomizedLoadMetricSpecification, CustomizedScalingMetricSpecification, Datapoint, DeleteScalingPlanRequest, - DeleteScalingPlanResponse, DescribeScalingPlanResourcesRequest, DescribeScalingPlanResourcesResponse, DescribeScalingPlansRequest, @@ -66,7 +66,6 @@ import { TagFilter, TargetTrackingConfiguration, UpdateScalingPlanRequest, - UpdateScalingPlanResponse, ValidationException, } from "../models/models_0"; @@ -92,7 +91,7 @@ export const se_DeleteScalingPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteScalingPlan"); let body: any; - body = JSON.stringify(se_DeleteScalingPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -105,7 +104,7 @@ export const se_DescribeScalingPlanResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScalingPlanResources"); let body: any; - body = JSON.stringify(se_DescribeScalingPlanResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -118,7 +117,7 @@ export const se_DescribeScalingPlansCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScalingPlans"); let body: any; - body = JSON.stringify(se_DescribeScalingPlansRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -160,12 +159,12 @@ export const de_CreateScalingPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateScalingPlanResponse(data, context); + contents = _json(data); const response: CreateScalingPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -195,10 +194,9 @@ const de_CreateScalingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -216,12 +214,12 @@ export const de_DeleteScalingPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteScalingPlanResponse(data, context); + contents = _json(data); const response: DeleteScalingPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -251,10 +249,9 @@ const de_DeleteScalingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -277,7 +274,7 @@ export const de_DescribeScalingPlanResourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -307,10 +304,9 @@ const de_DescribeScalingPlanResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -333,7 +329,7 @@ export const de_DescribeScalingPlansCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -363,10 +359,9 @@ const de_DescribeScalingPlansCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -389,7 +384,7 @@ export const de_GetScalingPlanResourceForecastDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -413,10 +408,9 @@ const de_GetScalingPlanResourceForecastDataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -434,12 +428,12 @@ export const de_UpdateScalingPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateScalingPlanResponse(data, context); + contents = _json(data); const response: UpdateScalingPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -469,10 +463,9 @@ const de_UpdateScalingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -486,7 +479,7 @@ const de_ConcurrentUpdateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentUpdateException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -502,7 +495,7 @@ const de_InternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -518,7 +511,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -534,7 +527,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -550,7 +543,7 @@ const de_ObjectNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ObjectNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ObjectNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -563,7 +556,7 @@ const de_ObjectNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -571,113 +564,30 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ApplicationSource - */ -const se_ApplicationSource = (input: ApplicationSource, context: __SerdeContext): any => { - return { - ...(input.CloudFormationStackARN != null && { CloudFormationStackARN: input.CloudFormationStackARN }), - ...(input.TagFilters != null && { TagFilters: se_TagFilters(input.TagFilters, context) }), - }; -}; +// se_ApplicationSource omitted. -/** - * serializeAws_json1_1ApplicationSources - */ -const se_ApplicationSources = (input: ApplicationSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ApplicationSource(entry, context); - }); -}; +// se_ApplicationSources omitted. /** * serializeAws_json1_1CreateScalingPlanRequest */ const se_CreateScalingPlanRequest = (input: CreateScalingPlanRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationSource != null && { - ApplicationSource: se_ApplicationSource(input.ApplicationSource, context), - }), - ...(input.ScalingInstructions != null && { - ScalingInstructions: se_ScalingInstructions(input.ScalingInstructions, context), - }), - ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }), - }; + return take(input, { + ApplicationSource: _json, + ScalingInstructions: (_) => se_ScalingInstructions(_, context), + ScalingPlanName: [], + }); }; -/** - * serializeAws_json1_1CustomizedLoadMetricSpecification - */ -const se_CustomizedLoadMetricSpecification = ( - input: CustomizedLoadMetricSpecification, - context: __SerdeContext -): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_CustomizedLoadMetricSpecification omitted. -/** - * serializeAws_json1_1CustomizedScalingMetricSpecification - */ -const se_CustomizedScalingMetricSpecification = ( - input: CustomizedScalingMetricSpecification, - context: __SerdeContext -): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_MetricDimensions(input.Dimensions, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_CustomizedScalingMetricSpecification omitted. -/** - * serializeAws_json1_1DeleteScalingPlanRequest - */ -const se_DeleteScalingPlanRequest = (input: DeleteScalingPlanRequest, context: __SerdeContext): any => { - return { - ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }), - ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }), - }; -}; +// se_DeleteScalingPlanRequest omitted. -/** - * serializeAws_json1_1DescribeScalingPlanResourcesRequest - */ -const se_DescribeScalingPlanResourcesRequest = ( - input: DescribeScalingPlanResourcesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }), - ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }), - }; -}; +// se_DescribeScalingPlanResourcesRequest omitted. -/** - * serializeAws_json1_1DescribeScalingPlansRequest - */ -const se_DescribeScalingPlansRequest = (input: DescribeScalingPlansRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationSources != null && { - ApplicationSources: se_ApplicationSources(input.ApplicationSources, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ScalingPlanNames != null && { ScalingPlanNames: se_ScalingPlanNames(input.ScalingPlanNames, context) }), - ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }), - }; -}; +// se_DescribeScalingPlansRequest omitted. /** * serializeAws_json1_1GetScalingPlanResourceForecastDataRequest @@ -686,105 +596,46 @@ const se_GetScalingPlanResourceForecastDataRequest = ( input: GetScalingPlanResourceForecastDataRequest, context: __SerdeContext ): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.ForecastDataType != null && { ForecastDataType: input.ForecastDataType }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }), - ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + ForecastDataType: [], + ResourceId: [], + ScalableDimension: [], + ScalingPlanName: [], + ScalingPlanVersion: [], + ServiceNamespace: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1MetricDimension - */ -const se_MetricDimension = (input: MetricDimension, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MetricDimension omitted. -/** - * serializeAws_json1_1MetricDimensions - */ -const se_MetricDimensions = (input: MetricDimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricDimension(entry, context); - }); -}; +// se_MetricDimensions omitted. -/** - * serializeAws_json1_1PredefinedLoadMetricSpecification - */ -const se_PredefinedLoadMetricSpecification = ( - input: PredefinedLoadMetricSpecification, - context: __SerdeContext -): any => { - return { - ...(input.PredefinedLoadMetricType != null && { PredefinedLoadMetricType: input.PredefinedLoadMetricType }), - ...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }), - }; -}; +// se_PredefinedLoadMetricSpecification omitted. -/** - * serializeAws_json1_1PredefinedScalingMetricSpecification - */ -const se_PredefinedScalingMetricSpecification = ( - input: PredefinedScalingMetricSpecification, - context: __SerdeContext -): any => { - return { - ...(input.PredefinedScalingMetricType != null && { - PredefinedScalingMetricType: input.PredefinedScalingMetricType, - }), - ...(input.ResourceLabel != null && { ResourceLabel: input.ResourceLabel }), - }; -}; +// se_PredefinedScalingMetricSpecification omitted. /** * serializeAws_json1_1ScalingInstruction */ const se_ScalingInstruction = (input: ScalingInstruction, context: __SerdeContext): any => { - return { - ...(input.CustomizedLoadMetricSpecification != null && { - CustomizedLoadMetricSpecification: se_CustomizedLoadMetricSpecification( - input.CustomizedLoadMetricSpecification, - context - ), - }), - ...(input.DisableDynamicScaling != null && { DisableDynamicScaling: input.DisableDynamicScaling }), - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }), - ...(input.PredefinedLoadMetricSpecification != null && { - PredefinedLoadMetricSpecification: se_PredefinedLoadMetricSpecification( - input.PredefinedLoadMetricSpecification, - context - ), - }), - ...(input.PredictiveScalingMaxCapacityBehavior != null && { - PredictiveScalingMaxCapacityBehavior: input.PredictiveScalingMaxCapacityBehavior, - }), - ...(input.PredictiveScalingMaxCapacityBuffer != null && { - PredictiveScalingMaxCapacityBuffer: input.PredictiveScalingMaxCapacityBuffer, - }), - ...(input.PredictiveScalingMode != null && { PredictiveScalingMode: input.PredictiveScalingMode }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ScalableDimension != null && { ScalableDimension: input.ScalableDimension }), - ...(input.ScalingPolicyUpdateBehavior != null && { - ScalingPolicyUpdateBehavior: input.ScalingPolicyUpdateBehavior, - }), - ...(input.ScheduledActionBufferTime != null && { ScheduledActionBufferTime: input.ScheduledActionBufferTime }), - ...(input.ServiceNamespace != null && { ServiceNamespace: input.ServiceNamespace }), - ...(input.TargetTrackingConfigurations != null && { - TargetTrackingConfigurations: se_TargetTrackingConfigurations(input.TargetTrackingConfigurations, context), - }), - }; + return take(input, { + CustomizedLoadMetricSpecification: _json, + DisableDynamicScaling: [], + MaxCapacity: [], + MinCapacity: [], + PredefinedLoadMetricSpecification: _json, + PredictiveScalingMaxCapacityBehavior: [], + PredictiveScalingMaxCapacityBuffer: [], + PredictiveScalingMode: [], + ResourceId: [], + ScalableDimension: [], + ScalingPolicyUpdateBehavior: [], + ScheduledActionBufferTime: [], + ServiceNamespace: [], + TargetTrackingConfigurations: (_) => se_TargetTrackingConfigurations(_, context), + }); }; /** @@ -798,72 +649,27 @@ const se_ScalingInstructions = (input: ScalingInstruction[], context: __SerdeCon }); }; -/** - * serializeAws_json1_1ScalingPlanNames - */ -const se_ScalingPlanNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ScalingPlanNames omitted. -/** - * serializeAws_json1_1TagFilter - */ -const se_TagFilter = (input: TagFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_TagValues(input.Values, context) }), - }; -}; +// se_TagFilter omitted. -/** - * serializeAws_json1_1TagFilters - */ -const se_TagFilters = (input: TagFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagFilter(entry, context); - }); -}; +// se_TagFilters omitted. -/** - * serializeAws_json1_1TagValues - */ -const se_TagValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagValues omitted. /** * serializeAws_json1_1TargetTrackingConfiguration */ const se_TargetTrackingConfiguration = (input: TargetTrackingConfiguration, context: __SerdeContext): any => { - return { - ...(input.CustomizedScalingMetricSpecification != null && { - CustomizedScalingMetricSpecification: se_CustomizedScalingMetricSpecification( - input.CustomizedScalingMetricSpecification, - context - ), - }), - ...(input.DisableScaleIn != null && { DisableScaleIn: input.DisableScaleIn }), - ...(input.EstimatedInstanceWarmup != null && { EstimatedInstanceWarmup: input.EstimatedInstanceWarmup }), - ...(input.PredefinedScalingMetricSpecification != null && { - PredefinedScalingMetricSpecification: se_PredefinedScalingMetricSpecification( - input.PredefinedScalingMetricSpecification, - context - ), - }), - ...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }), - ...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }), - ...(input.TargetValue != null && { TargetValue: __serializeFloat(input.TargetValue) }), - }; + return take(input, { + CustomizedScalingMetricSpecification: _json, + DisableScaleIn: [], + EstimatedInstanceWarmup: [], + PredefinedScalingMetricSpecification: _json, + ScaleInCooldown: [], + ScaleOutCooldown: [], + TargetValue: __serializeFloat, + }); }; /** @@ -881,87 +687,32 @@ const se_TargetTrackingConfigurations = (input: TargetTrackingConfiguration[], c * serializeAws_json1_1UpdateScalingPlanRequest */ const se_UpdateScalingPlanRequest = (input: UpdateScalingPlanRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationSource != null && { - ApplicationSource: se_ApplicationSource(input.ApplicationSource, context), - }), - ...(input.ScalingInstructions != null && { - ScalingInstructions: se_ScalingInstructions(input.ScalingInstructions, context), - }), - ...(input.ScalingPlanName != null && { ScalingPlanName: input.ScalingPlanName }), - ...(input.ScalingPlanVersion != null && { ScalingPlanVersion: input.ScalingPlanVersion }), - }; + return take(input, { + ApplicationSource: _json, + ScalingInstructions: (_) => se_ScalingInstructions(_, context), + ScalingPlanName: [], + ScalingPlanVersion: [], + }); }; -/** - * deserializeAws_json1_1ApplicationSource - */ -const de_ApplicationSource = (output: any, context: __SerdeContext): ApplicationSource => { - return { - CloudFormationStackARN: __expectString(output.CloudFormationStackARN), - TagFilters: output.TagFilters != null ? de_TagFilters(output.TagFilters, context) : undefined, - } as any; -}; +// de_ApplicationSource omitted. -/** - * deserializeAws_json1_1ConcurrentUpdateException - */ -const de_ConcurrentUpdateException = (output: any, context: __SerdeContext): ConcurrentUpdateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentUpdateException omitted. -/** - * deserializeAws_json1_1CreateScalingPlanResponse - */ -const de_CreateScalingPlanResponse = (output: any, context: __SerdeContext): CreateScalingPlanResponse => { - return { - ScalingPlanVersion: __expectLong(output.ScalingPlanVersion), - } as any; -}; +// de_CreateScalingPlanResponse omitted. -/** - * deserializeAws_json1_1CustomizedLoadMetricSpecification - */ -const de_CustomizedLoadMetricSpecification = ( - output: any, - context: __SerdeContext -): CustomizedLoadMetricSpecification => { - return { - Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined, - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - Statistic: __expectString(output.Statistic), - Unit: __expectString(output.Unit), - } as any; -}; +// de_CustomizedLoadMetricSpecification omitted. -/** - * deserializeAws_json1_1CustomizedScalingMetricSpecification - */ -const de_CustomizedScalingMetricSpecification = ( - output: any, - context: __SerdeContext -): CustomizedScalingMetricSpecification => { - return { - Dimensions: output.Dimensions != null ? de_MetricDimensions(output.Dimensions, context) : undefined, - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - Statistic: __expectString(output.Statistic), - Unit: __expectString(output.Unit), - } as any; -}; +// de_CustomizedScalingMetricSpecification omitted. /** * deserializeAws_json1_1Datapoint */ const de_Datapoint = (output: any, context: __SerdeContext): Datapoint => { - return { - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: __limitedParseDouble, + }) as any; }; /** @@ -971,20 +722,12 @@ const de_Datapoints = (output: any, context: __SerdeContext): Datapoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Datapoint(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DeleteScalingPlanResponse - */ -const de_DeleteScalingPlanResponse = (output: any, context: __SerdeContext): DeleteScalingPlanResponse => { - return {} as any; -}; +// de_DeleteScalingPlanResponse omitted. /** * deserializeAws_json1_1DescribeScalingPlanResourcesResponse @@ -993,21 +736,20 @@ const de_DescribeScalingPlanResourcesResponse = ( output: any, context: __SerdeContext ): DescribeScalingPlanResourcesResponse => { - return { - NextToken: __expectString(output.NextToken), - ScalingPlanResources: - output.ScalingPlanResources != null ? de_ScalingPlanResources(output.ScalingPlanResources, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScalingPlanResources: (_: any) => de_ScalingPlanResources(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeScalingPlansResponse */ const de_DescribeScalingPlansResponse = (output: any, context: __SerdeContext): DescribeScalingPlansResponse => { - return { - NextToken: __expectString(output.NextToken), - ScalingPlans: output.ScalingPlans != null ? de_ScalingPlans(output.ScalingPlans, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScalingPlans: (_: any) => de_ScalingPlans(_, context), + }) as any; }; /** @@ -1017,127 +759,47 @@ const de_GetScalingPlanResourceForecastDataResponse = ( output: any, context: __SerdeContext ): GetScalingPlanResourceForecastDataResponse => { - return { - Datapoints: output.Datapoints != null ? de_Datapoints(output.Datapoints, context) : undefined, - } as any; + return take(output, { + Datapoints: (_: any) => de_Datapoints(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InternalServiceException - */ -const de_InternalServiceException = (output: any, context: __SerdeContext): InternalServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1MetricDimension - */ -const de_MetricDimension = (output: any, context: __SerdeContext): MetricDimension => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_MetricDimension omitted. -/** - * deserializeAws_json1_1MetricDimensions - */ -const de_MetricDimensions = (output: any, context: __SerdeContext): MetricDimension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDimension(entry, context); - }); - return retVal; -}; +// de_MetricDimensions omitted. -/** - * deserializeAws_json1_1ObjectNotFoundException - */ -const de_ObjectNotFoundException = (output: any, context: __SerdeContext): ObjectNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ObjectNotFoundException omitted. -/** - * deserializeAws_json1_1PredefinedLoadMetricSpecification - */ -const de_PredefinedLoadMetricSpecification = ( - output: any, - context: __SerdeContext -): PredefinedLoadMetricSpecification => { - return { - PredefinedLoadMetricType: __expectString(output.PredefinedLoadMetricType), - ResourceLabel: __expectString(output.ResourceLabel), - } as any; -}; +// de_PredefinedLoadMetricSpecification omitted. -/** - * deserializeAws_json1_1PredefinedScalingMetricSpecification - */ -const de_PredefinedScalingMetricSpecification = ( - output: any, - context: __SerdeContext -): PredefinedScalingMetricSpecification => { - return { - PredefinedScalingMetricType: __expectString(output.PredefinedScalingMetricType), - ResourceLabel: __expectString(output.ResourceLabel), - } as any; -}; +// de_PredefinedScalingMetricSpecification omitted. /** * deserializeAws_json1_1ScalingInstruction */ const de_ScalingInstruction = (output: any, context: __SerdeContext): ScalingInstruction => { - return { - CustomizedLoadMetricSpecification: - output.CustomizedLoadMetricSpecification != null - ? de_CustomizedLoadMetricSpecification(output.CustomizedLoadMetricSpecification, context) - : undefined, - DisableDynamicScaling: __expectBoolean(output.DisableDynamicScaling), - MaxCapacity: __expectInt32(output.MaxCapacity), - MinCapacity: __expectInt32(output.MinCapacity), - PredefinedLoadMetricSpecification: - output.PredefinedLoadMetricSpecification != null - ? de_PredefinedLoadMetricSpecification(output.PredefinedLoadMetricSpecification, context) - : undefined, - PredictiveScalingMaxCapacityBehavior: __expectString(output.PredictiveScalingMaxCapacityBehavior), - PredictiveScalingMaxCapacityBuffer: __expectInt32(output.PredictiveScalingMaxCapacityBuffer), - PredictiveScalingMode: __expectString(output.PredictiveScalingMode), - ResourceId: __expectString(output.ResourceId), - ScalableDimension: __expectString(output.ScalableDimension), - ScalingPolicyUpdateBehavior: __expectString(output.ScalingPolicyUpdateBehavior), - ScheduledActionBufferTime: __expectInt32(output.ScheduledActionBufferTime), - ServiceNamespace: __expectString(output.ServiceNamespace), - TargetTrackingConfigurations: - output.TargetTrackingConfigurations != null - ? de_TargetTrackingConfigurations(output.TargetTrackingConfigurations, context) - : undefined, - } as any; + return take(output, { + CustomizedLoadMetricSpecification: _json, + DisableDynamicScaling: __expectBoolean, + MaxCapacity: __expectInt32, + MinCapacity: __expectInt32, + PredefinedLoadMetricSpecification: _json, + PredictiveScalingMaxCapacityBehavior: __expectString, + PredictiveScalingMaxCapacityBuffer: __expectInt32, + PredictiveScalingMode: __expectString, + ResourceId: __expectString, + ScalableDimension: __expectString, + ScalingPolicyUpdateBehavior: __expectString, + ScheduledActionBufferTime: __expectInt32, + ServiceNamespace: __expectString, + TargetTrackingConfigurations: (_: any) => de_TargetTrackingConfigurations(_, context), + }) as any; }; /** @@ -1147,9 +809,6 @@ const de_ScalingInstructions = (output: any, context: __SerdeContext): ScalingIn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingInstruction(entry, context); }); return retVal; @@ -1159,40 +818,32 @@ const de_ScalingInstructions = (output: any, context: __SerdeContext): ScalingIn * deserializeAws_json1_1ScalingPlan */ const de_ScalingPlan = (output: any, context: __SerdeContext): ScalingPlan => { - return { - ApplicationSource: - output.ApplicationSource != null ? de_ApplicationSource(output.ApplicationSource, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ScalingInstructions: - output.ScalingInstructions != null ? de_ScalingInstructions(output.ScalingInstructions, context) : undefined, - ScalingPlanName: __expectString(output.ScalingPlanName), - ScalingPlanVersion: __expectLong(output.ScalingPlanVersion), - StatusCode: __expectString(output.StatusCode), - StatusMessage: __expectString(output.StatusMessage), - StatusStartTime: - output.StatusStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StatusStartTime))) - : undefined, - } as any; + return take(output, { + ApplicationSource: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ScalingInstructions: (_: any) => de_ScalingInstructions(_, context), + ScalingPlanName: __expectString, + ScalingPlanVersion: __expectLong, + StatusCode: __expectString, + StatusMessage: __expectString, + StatusStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1ScalingPlanResource */ const de_ScalingPlanResource = (output: any, context: __SerdeContext): ScalingPlanResource => { - return { - ResourceId: __expectString(output.ResourceId), - ScalableDimension: __expectString(output.ScalableDimension), - ScalingPlanName: __expectString(output.ScalingPlanName), - ScalingPlanVersion: __expectLong(output.ScalingPlanVersion), - ScalingPolicies: output.ScalingPolicies != null ? de_ScalingPolicies(output.ScalingPolicies, context) : undefined, - ScalingStatusCode: __expectString(output.ScalingStatusCode), - ScalingStatusMessage: __expectString(output.ScalingStatusMessage), - ServiceNamespace: __expectString(output.ServiceNamespace), - } as any; + return take(output, { + ResourceId: __expectString, + ScalableDimension: __expectString, + ScalingPlanName: __expectString, + ScalingPlanVersion: __expectLong, + ScalingPolicies: (_: any) => de_ScalingPolicies(_, context), + ScalingStatusCode: __expectString, + ScalingStatusMessage: __expectString, + ServiceNamespace: __expectString, + }) as any; }; /** @@ -1202,9 +853,6 @@ const de_ScalingPlanResources = (output: any, context: __SerdeContext): ScalingP const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingPlanResource(entry, context); }); return retVal; @@ -1217,9 +865,6 @@ const de_ScalingPlans = (output: any, context: __SerdeContext): ScalingPlan[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingPlan(entry, context); }); return retVal; @@ -1232,9 +877,6 @@ const de_ScalingPolicies = (output: any, context: __SerdeContext): ScalingPolicy const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingPolicy(entry, context); }); return retVal; @@ -1244,75 +886,32 @@ const de_ScalingPolicies = (output: any, context: __SerdeContext): ScalingPolicy * deserializeAws_json1_1ScalingPolicy */ const de_ScalingPolicy = (output: any, context: __SerdeContext): ScalingPolicy => { - return { - PolicyName: __expectString(output.PolicyName), - PolicyType: __expectString(output.PolicyType), - TargetTrackingConfiguration: - output.TargetTrackingConfiguration != null - ? de_TargetTrackingConfiguration(output.TargetTrackingConfiguration, context) - : undefined, - } as any; + return take(output, { + PolicyName: __expectString, + PolicyType: __expectString, + TargetTrackingConfiguration: (_: any) => de_TargetTrackingConfiguration(_, context), + }) as any; }; -/** - * deserializeAws_json1_1TagFilter - */ -const de_TagFilter = (output: any, context: __SerdeContext): TagFilter => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_TagValues(output.Values, context) : undefined, - } as any; -}; +// de_TagFilter omitted. -/** - * deserializeAws_json1_1TagFilters - */ -const de_TagFilters = (output: any, context: __SerdeContext): TagFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagFilter(entry, context); - }); - return retVal; -}; +// de_TagFilters omitted. -/** - * deserializeAws_json1_1TagValues - */ -const de_TagValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagValues omitted. /** * deserializeAws_json1_1TargetTrackingConfiguration */ const de_TargetTrackingConfiguration = (output: any, context: __SerdeContext): TargetTrackingConfiguration => { - return { - CustomizedScalingMetricSpecification: - output.CustomizedScalingMetricSpecification != null - ? de_CustomizedScalingMetricSpecification(output.CustomizedScalingMetricSpecification, context) - : undefined, - DisableScaleIn: __expectBoolean(output.DisableScaleIn), - EstimatedInstanceWarmup: __expectInt32(output.EstimatedInstanceWarmup), - PredefinedScalingMetricSpecification: - output.PredefinedScalingMetricSpecification != null - ? de_PredefinedScalingMetricSpecification(output.PredefinedScalingMetricSpecification, context) - : undefined, - ScaleInCooldown: __expectInt32(output.ScaleInCooldown), - ScaleOutCooldown: __expectInt32(output.ScaleOutCooldown), - TargetValue: __limitedParseDouble(output.TargetValue), - } as any; + return take(output, { + CustomizedScalingMetricSpecification: _json, + DisableScaleIn: __expectBoolean, + EstimatedInstanceWarmup: __expectInt32, + PredefinedScalingMetricSpecification: _json, + ScaleInCooldown: __expectInt32, + ScaleOutCooldown: __expectInt32, + TargetValue: __limitedParseDouble, + }) as any; }; /** @@ -1322,29 +921,14 @@ const de_TargetTrackingConfigurations = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TargetTrackingConfiguration(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UpdateScalingPlanResponse - */ -const de_UpdateScalingPlanResponse = (output: any, context: __SerdeContext): UpdateScalingPlanResponse => { - return {} as any; -}; +// de_UpdateScalingPlanResponse omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1366,6 +950,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-auto-scaling/src/protocols/Aws_query.ts b/clients/client-auto-scaling/src/protocols/Aws_query.ts index 2f0a75ed92c0..3b1f07cc49a4 100644 --- a/clients/client-auto-scaling/src/protocols/Aws_query.ts +++ b/clients/client-auto-scaling/src/protocols/Aws_query.ts @@ -12,7 +12,7 @@ import { serializeFloat as __serializeFloat, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1526,7 +1526,7 @@ export const de_AttachInstancesCommand = async ( const response: AttachInstancesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1550,10 +1550,9 @@ const de_AttachInstancesCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1576,7 +1575,7 @@ export const de_AttachLoadBalancersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1600,10 +1599,9 @@ const de_AttachLoadBalancersCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1626,7 +1624,7 @@ export const de_AttachLoadBalancerTargetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1650,10 +1648,9 @@ const de_AttachLoadBalancerTargetGroupsCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1676,7 +1673,7 @@ export const de_AttachTrafficSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1700,10 +1697,9 @@ const de_AttachTrafficSourcesCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1726,7 +1722,7 @@ export const de_BatchDeleteScheduledActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1747,10 +1743,9 @@ const de_BatchDeleteScheduledActionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1773,7 +1768,7 @@ export const de_BatchPutScheduledUpdateGroupActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1800,10 +1795,9 @@ const de_BatchPutScheduledUpdateGroupActionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1826,7 +1820,7 @@ export const de_CancelInstanceRefreshCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1853,10 +1847,9 @@ const de_CancelInstanceRefreshCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1879,7 +1872,7 @@ export const de_CompleteLifecycleActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1900,10 +1893,9 @@ const de_CompleteLifecycleActionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1923,7 +1915,7 @@ export const de_CreateAutoScalingGroupCommand = async ( const response: CreateAutoScalingGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1953,10 +1945,9 @@ const de_CreateAutoScalingGroupCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1976,7 +1967,7 @@ export const de_CreateLaunchConfigurationCommand = async ( const response: CreateLaunchConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2003,10 +1994,9 @@ const de_CreateLaunchConfigurationCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,7 +2016,7 @@ export const de_CreateOrUpdateTagsCommand = async ( const response: CreateOrUpdateTagsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2056,10 +2046,9 @@ const de_CreateOrUpdateTagsCommandError = async ( throw await de_ResourceInUseFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2079,7 +2068,7 @@ export const de_DeleteAutoScalingGroupCommand = async ( const response: DeleteAutoScalingGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2106,10 +2095,9 @@ const de_DeleteAutoScalingGroupCommandError = async ( throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2129,7 +2117,7 @@ export const de_DeleteLaunchConfigurationCommand = async ( const response: DeleteLaunchConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2153,10 +2141,9 @@ const de_DeleteLaunchConfigurationCommandError = async ( throw await de_ResourceInUseFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2179,7 +2166,7 @@ export const de_DeleteLifecycleHookCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2200,10 +2187,9 @@ const de_DeleteLifecycleHookCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2223,7 +2209,7 @@ export const de_DeleteNotificationConfigurationCommand = async ( const response: DeleteNotificationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2244,10 +2230,9 @@ const de_DeleteNotificationConfigurationCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2267,7 +2252,7 @@ export const de_DeletePolicyCommand = async ( const response: DeletePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2291,10 +2276,9 @@ const de_DeletePolicyCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2314,7 +2298,7 @@ export const de_DeleteScheduledActionCommand = async ( const response: DeleteScheduledActionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2335,10 +2319,9 @@ const de_DeleteScheduledActionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2358,7 +2341,7 @@ export const de_DeleteTagsCommand = async ( const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2382,10 +2365,9 @@ const de_DeleteTagsCommandError = async ( throw await de_ResourceInUseFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2408,7 +2390,7 @@ export const de_DeleteWarmPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2438,10 +2420,9 @@ const de_DeleteWarmPoolCommandError = async ( throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2464,7 +2445,7 @@ export const de_DescribeAccountLimitsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2485,10 +2466,9 @@ const de_DescribeAccountLimitsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2511,7 +2491,7 @@ export const de_DescribeAdjustmentTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2532,10 +2512,9 @@ const de_DescribeAdjustmentTypesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2558,7 +2537,7 @@ export const de_DescribeAutoScalingGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2582,10 +2561,9 @@ const de_DescribeAutoScalingGroupsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2608,7 +2586,7 @@ export const de_DescribeAutoScalingInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2632,10 +2610,9 @@ const de_DescribeAutoScalingInstancesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2658,7 +2635,7 @@ export const de_DescribeAutoScalingNotificationTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2679,10 +2656,9 @@ const de_DescribeAutoScalingNotificationTypesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2705,7 +2681,7 @@ export const de_DescribeInstanceRefreshesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2729,10 +2705,9 @@ const de_DescribeInstanceRefreshesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,7 +2730,7 @@ export const de_DescribeLaunchConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2779,10 +2754,9 @@ const de_DescribeLaunchConfigurationsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2805,7 +2779,7 @@ export const de_DescribeLifecycleHooksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2826,10 +2800,9 @@ const de_DescribeLifecycleHooksCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2852,7 +2825,7 @@ export const de_DescribeLifecycleHookTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2873,10 +2846,9 @@ const de_DescribeLifecycleHookTypesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2899,7 +2871,7 @@ export const de_DescribeLoadBalancersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2923,10 +2895,9 @@ const de_DescribeLoadBalancersCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2949,7 +2920,7 @@ export const de_DescribeLoadBalancerTargetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2973,10 +2944,9 @@ const de_DescribeLoadBalancerTargetGroupsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2999,7 +2969,7 @@ export const de_DescribeMetricCollectionTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3020,10 +2990,9 @@ const de_DescribeMetricCollectionTypesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3046,7 +3015,7 @@ export const de_DescribeNotificationConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3070,10 +3039,9 @@ const de_DescribeNotificationConfigurationsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3096,7 +3064,7 @@ export const de_DescribePoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3123,10 +3091,9 @@ const de_DescribePoliciesCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3149,7 +3116,7 @@ export const de_DescribeScalingActivitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3173,10 +3140,9 @@ const de_DescribeScalingActivitiesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3199,7 +3165,7 @@ export const de_DescribeScalingProcessTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3220,10 +3186,9 @@ const de_DescribeScalingProcessTypesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3246,7 +3211,7 @@ export const de_DescribeScheduledActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3270,10 +3235,9 @@ const de_DescribeScheduledActionsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3296,7 +3260,7 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3320,10 +3284,9 @@ const de_DescribeTagsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3346,7 +3309,7 @@ export const de_DescribeTerminationPolicyTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3367,10 +3330,9 @@ const de_DescribeTerminationPolicyTypesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3393,7 +3355,7 @@ export const de_DescribeTrafficSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3417,10 +3379,9 @@ const de_DescribeTrafficSourcesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3443,7 +3404,7 @@ export const de_DescribeWarmPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3470,10 +3431,9 @@ const de_DescribeWarmPoolCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3496,7 +3456,7 @@ export const de_DetachInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3517,10 +3477,9 @@ const de_DetachInstancesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3543,7 +3502,7 @@ export const de_DetachLoadBalancersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3564,10 +3523,9 @@ const de_DetachLoadBalancersCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3590,7 +3548,7 @@ export const de_DetachLoadBalancerTargetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3611,10 +3569,9 @@ const de_DetachLoadBalancerTargetGroupsCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3637,7 +3594,7 @@ export const de_DetachTrafficSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3658,10 +3615,9 @@ const de_DetachTrafficSourcesCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3681,7 +3637,7 @@ export const de_DisableMetricsCollectionCommand = async ( const response: DisableMetricsCollectionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3702,10 +3658,9 @@ const de_DisableMetricsCollectionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3725,7 +3680,7 @@ export const de_EnableMetricsCollectionCommand = async ( const response: EnableMetricsCollectionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3746,10 +3701,9 @@ const de_EnableMetricsCollectionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3772,7 +3726,7 @@ export const de_EnterStandbyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3793,10 +3747,9 @@ const de_EnterStandbyCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3816,7 +3769,7 @@ export const de_ExecutePolicyCommand = async ( const response: ExecutePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3840,10 +3793,9 @@ const de_ExecutePolicyCommandError = async ( throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3866,7 +3818,7 @@ export const de_ExitStandbyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3887,10 +3839,9 @@ const de_ExitStandbyCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3913,7 +3864,7 @@ export const de_GetPredictiveScalingForecastCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3934,10 +3885,9 @@ const de_GetPredictiveScalingForecastCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3960,7 +3910,7 @@ export const de_PutLifecycleHookCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3984,10 +3934,9 @@ const de_PutLifecycleHookCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4007,7 +3956,7 @@ export const de_PutNotificationConfigurationCommand = async ( const response: PutNotificationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4034,10 +3983,9 @@ const de_PutNotificationConfigurationCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4060,7 +4008,7 @@ export const de_PutScalingPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4087,10 +4035,9 @@ const de_PutScalingPolicyCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4110,7 +4057,7 @@ export const de_PutScheduledUpdateGroupActionCommand = async ( const response: PutScheduledUpdateGroupActionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4137,10 +4084,9 @@ const de_PutScheduledUpdateGroupActionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4163,7 +4109,7 @@ export const de_PutWarmPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4187,10 +4133,9 @@ const de_PutWarmPoolCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4213,7 +4158,7 @@ export const de_RecordLifecycleActionHeartbeatCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4234,10 +4179,9 @@ const de_RecordLifecycleActionHeartbeatCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4257,7 +4201,7 @@ export const de_ResumeProcessesCommand = async ( const response: ResumeProcessesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4281,10 +4225,9 @@ const de_ResumeProcessesCommandError = async ( throw await de_ResourceInUseFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4307,7 +4250,7 @@ export const de_RollbackInstanceRefreshCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4337,10 +4280,9 @@ const de_RollbackInstanceRefreshCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4360,7 +4302,7 @@ export const de_SetDesiredCapacityCommand = async ( const response: SetDesiredCapacityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4384,10 +4326,9 @@ const de_SetDesiredCapacityCommandError = async ( throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4407,7 +4348,7 @@ export const de_SetInstanceHealthCommand = async ( const response: SetInstanceHealthCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4428,10 +4369,9 @@ const de_SetInstanceHealthCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4454,7 +4394,7 @@ export const de_SetInstanceProtectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4478,10 +4418,9 @@ const de_SetInstanceProtectionCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4504,7 +4443,7 @@ export const de_StartInstanceRefreshCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4531,10 +4470,9 @@ const de_StartInstanceRefreshCommandError = async ( throw await de_ResourceContentionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4554,7 +4492,7 @@ export const de_SuspendProcessesCommand = async ( const response: SuspendProcessesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4578,10 +4516,9 @@ const de_SuspendProcessesCommandError = async ( throw await de_ResourceInUseFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4604,7 +4541,7 @@ export const de_TerminateInstanceInAutoScalingGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4628,10 +4565,9 @@ const de_TerminateInstanceInAutoScalingGroupCommandError = async ( throw await de_ScalingActivityInProgressFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4651,7 +4587,7 @@ export const de_UpdateAutoScalingGroupCommand = async ( const response: UpdateAutoScalingGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4678,10 +4614,9 @@ const de_UpdateAutoScalingGroupCommandError = async ( throw await de_ServiceLinkedRoleFailureRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11312,6 +11247,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-backup-gateway/src/protocols/Aws_json1_0.ts b/clients/client-backup-gateway/src/protocols/Aws_json1_0.ts index bcf0db224058..949d6daaa5bd 100644 --- a/clients/client-backup-gateway/src/protocols/Aws_json1_0.ts +++ b/clients/client-backup-gateway/src/protocols/Aws_json1_0.ts @@ -1,14 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -88,70 +88,47 @@ import { BackupGatewayServiceException as __BaseException } from "../models/Back import { AccessDeniedException, AssociateGatewayToServerInput, - AssociateGatewayToServerOutput, BandwidthRateLimitInterval, ConflictException, CreateGatewayInput, - CreateGatewayOutput, DeleteGatewayInput, - DeleteGatewayOutput, DeleteHypervisorInput, - DeleteHypervisorOutput, DisassociateGatewayFromServerInput, - DisassociateGatewayFromServerOutput, Gateway, GatewayDetails, GetBandwidthRateLimitScheduleInput, - GetBandwidthRateLimitScheduleOutput, GetGatewayInput, GetGatewayOutput, GetHypervisorInput, GetHypervisorOutput, GetHypervisorPropertyMappingsInput, - GetHypervisorPropertyMappingsOutput, GetVirtualMachineInput, GetVirtualMachineOutput, - Hypervisor, HypervisorDetails, ImportHypervisorConfigurationInput, - ImportHypervisorConfigurationOutput, InternalServerException, ListGatewaysInput, ListGatewaysOutput, ListHypervisorsInput, - ListHypervisorsOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, ListVirtualMachinesInput, ListVirtualMachinesOutput, - MaintenanceStartTime, PutBandwidthRateLimitScheduleInput, - PutBandwidthRateLimitScheduleOutput, PutHypervisorPropertyMappingsInput, - PutHypervisorPropertyMappingsOutput, PutMaintenanceStartTimeInput, - PutMaintenanceStartTimeOutput, ResourceNotFoundException, StartVirtualMachinesMetadataSyncInput, - StartVirtualMachinesMetadataSyncOutput, Tag, TagResourceInput, - TagResourceOutput, TestHypervisorConfigurationInput, - TestHypervisorConfigurationOutput, ThrottlingException, UntagResourceInput, - UntagResourceOutput, UpdateGatewayInformationInput, - UpdateGatewayInformationOutput, UpdateGatewaySoftwareNowInput, - UpdateGatewaySoftwareNowOutput, UpdateHypervisorInput, - UpdateHypervisorOutput, ValidationException, VirtualMachine, VirtualMachineDetails, - VmwareTag, VmwareToAwsTagMapping, } from "../models/models_0"; @@ -164,7 +141,7 @@ export const se_AssociateGatewayToServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateGatewayToServer"); let body: any; - body = JSON.stringify(se_AssociateGatewayToServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -177,7 +154,7 @@ export const se_CreateGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGateway"); let body: any; - body = JSON.stringify(se_CreateGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -190,7 +167,7 @@ export const se_DeleteGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGateway"); let body: any; - body = JSON.stringify(se_DeleteGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -203,7 +180,7 @@ export const se_DeleteHypervisorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHypervisor"); let body: any; - body = JSON.stringify(se_DeleteHypervisorInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -216,7 +193,7 @@ export const se_DisassociateGatewayFromServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateGatewayFromServer"); let body: any; - body = JSON.stringify(se_DisassociateGatewayFromServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -229,7 +206,7 @@ export const se_GetBandwidthRateLimitScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBandwidthRateLimitSchedule"); let body: any; - body = JSON.stringify(se_GetBandwidthRateLimitScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -242,7 +219,7 @@ export const se_GetGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGateway"); let body: any; - body = JSON.stringify(se_GetGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -255,7 +232,7 @@ export const se_GetHypervisorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetHypervisor"); let body: any; - body = JSON.stringify(se_GetHypervisorInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -268,7 +245,7 @@ export const se_GetHypervisorPropertyMappingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetHypervisorPropertyMappings"); let body: any; - body = JSON.stringify(se_GetHypervisorPropertyMappingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +258,7 @@ export const se_GetVirtualMachineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVirtualMachine"); let body: any; - body = JSON.stringify(se_GetVirtualMachineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -294,7 +271,7 @@ export const se_ImportHypervisorConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportHypervisorConfiguration"); let body: any; - body = JSON.stringify(se_ImportHypervisorConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -307,7 +284,7 @@ export const se_ListGatewaysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGateways"); let body: any; - body = JSON.stringify(se_ListGatewaysInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -320,7 +297,7 @@ export const se_ListHypervisorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHypervisors"); let body: any; - body = JSON.stringify(se_ListHypervisorsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -333,7 +310,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -346,7 +323,7 @@ export const se_ListVirtualMachinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVirtualMachines"); let body: any; - body = JSON.stringify(se_ListVirtualMachinesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -359,7 +336,7 @@ export const se_PutBandwidthRateLimitScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutBandwidthRateLimitSchedule"); let body: any; - body = JSON.stringify(se_PutBandwidthRateLimitScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -372,7 +349,7 @@ export const se_PutHypervisorPropertyMappingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutHypervisorPropertyMappings"); let body: any; - body = JSON.stringify(se_PutHypervisorPropertyMappingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -385,7 +362,7 @@ export const se_PutMaintenanceStartTimeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutMaintenanceStartTime"); let body: any; - body = JSON.stringify(se_PutMaintenanceStartTimeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -398,7 +375,7 @@ export const se_StartVirtualMachinesMetadataSyncCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartVirtualMachinesMetadataSync"); let body: any; - body = JSON.stringify(se_StartVirtualMachinesMetadataSyncInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -411,7 +388,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -424,7 +401,7 @@ export const se_TestHypervisorConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestHypervisorConfiguration"); let body: any; - body = JSON.stringify(se_TestHypervisorConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -437,7 +414,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -450,7 +427,7 @@ export const se_UpdateGatewayInformationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGatewayInformation"); let body: any; - body = JSON.stringify(se_UpdateGatewayInformationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -463,7 +440,7 @@ export const se_UpdateGatewaySoftwareNowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGatewaySoftwareNow"); let body: any; - body = JSON.stringify(se_UpdateGatewaySoftwareNowInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -476,7 +453,7 @@ export const se_UpdateHypervisorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateHypervisor"); let body: any; - body = JSON.stringify(se_UpdateHypervisorInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -492,12 +469,12 @@ export const de_AssociateGatewayToServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateGatewayToServerOutput(data, context); + contents = _json(data); const response: AssociateGatewayToServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -527,10 +504,9 @@ const de_AssociateGatewayToServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -548,12 +524,12 @@ export const de_CreateGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGatewayOutput(data, context); + contents = _json(data); const response: CreateGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -580,10 +556,9 @@ const de_CreateGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -601,12 +576,12 @@ export const de_DeleteGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGatewayOutput(data, context); + contents = _json(data); const response: DeleteGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -636,10 +611,9 @@ const de_DeleteGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -657,12 +631,12 @@ export const de_DeleteHypervisorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHypervisorOutput(data, context); + contents = _json(data); const response: DeleteHypervisorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -698,10 +672,9 @@ const de_DeleteHypervisorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -719,12 +692,12 @@ export const de_DisassociateGatewayFromServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateGatewayFromServerOutput(data, context); + contents = _json(data); const response: DisassociateGatewayFromServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -757,10 +730,9 @@ const de_DisassociateGatewayFromServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -778,12 +750,12 @@ export const de_GetBandwidthRateLimitScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetBandwidthRateLimitScheduleOutput(data, context); + contents = _json(data); const response: GetBandwidthRateLimitScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -813,10 +785,9 @@ const de_GetBandwidthRateLimitScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -839,7 +810,7 @@ export const de_GetGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -869,10 +840,9 @@ const de_GetGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -895,7 +865,7 @@ export const de_GetHypervisorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -925,10 +895,9 @@ const de_GetHypervisorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -946,12 +915,12 @@ export const de_GetHypervisorPropertyMappingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetHypervisorPropertyMappingsOutput(data, context); + contents = _json(data); const response: GetHypervisorPropertyMappingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -981,10 +950,9 @@ const de_GetHypervisorPropertyMappingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1007,7 +975,7 @@ export const de_GetVirtualMachineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1037,10 +1005,9 @@ const de_GetVirtualMachineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1058,12 +1025,12 @@ export const de_ImportHypervisorConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportHypervisorConfigurationOutput(data, context); + contents = _json(data); const response: ImportHypervisorConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1096,10 +1063,9 @@ const de_ImportHypervisorConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1122,7 +1088,7 @@ export const de_ListGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1149,10 +1115,9 @@ const de_ListGatewaysCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1170,12 +1135,12 @@ export const de_ListHypervisorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListHypervisorsOutput(data, context); + contents = _json(data); const response: ListHypervisorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1202,10 +1167,9 @@ const de_ListHypervisorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1223,12 +1187,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1258,10 +1222,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1284,7 +1247,7 @@ export const de_ListVirtualMachinesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1311,10 +1274,9 @@ const de_ListVirtualMachinesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1332,12 +1294,12 @@ export const de_PutBandwidthRateLimitScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutBandwidthRateLimitScheduleOutput(data, context); + contents = _json(data); const response: PutBandwidthRateLimitScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1367,10 +1329,9 @@ const de_PutBandwidthRateLimitScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1388,12 +1349,12 @@ export const de_PutHypervisorPropertyMappingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutHypervisorPropertyMappingsOutput(data, context); + contents = _json(data); const response: PutHypervisorPropertyMappingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1429,10 +1390,9 @@ const de_PutHypervisorPropertyMappingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1450,12 +1410,12 @@ export const de_PutMaintenanceStartTimeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutMaintenanceStartTimeOutput(data, context); + contents = _json(data); const response: PutMaintenanceStartTimeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1488,10 +1448,9 @@ const de_PutMaintenanceStartTimeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1509,12 +1468,12 @@ export const de_StartVirtualMachinesMetadataSyncCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartVirtualMachinesMetadataSyncOutput(data, context); + contents = _json(data); const response: StartVirtualMachinesMetadataSyncCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1547,10 +1506,9 @@ const de_StartVirtualMachinesMetadataSyncCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1568,12 +1526,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1603,10 +1561,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1624,12 +1581,12 @@ export const de_TestHypervisorConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestHypervisorConfigurationOutput(data, context); + contents = _json(data); const response: TestHypervisorConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1662,10 +1619,9 @@ const de_TestHypervisorConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1683,12 +1639,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1718,10 +1674,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1739,12 +1694,12 @@ export const de_UpdateGatewayInformationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGatewayInformationOutput(data, context); + contents = _json(data); const response: UpdateGatewayInformationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1777,10 +1732,9 @@ const de_UpdateGatewayInformationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1798,12 +1752,12 @@ export const de_UpdateGatewaySoftwareNowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGatewaySoftwareNowOutput(data, context); + contents = _json(data); const response: UpdateGatewaySoftwareNowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1833,10 +1787,9 @@ const de_UpdateGatewaySoftwareNowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1854,12 +1807,12 @@ export const de_UpdateHypervisorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHypervisorOutput(data, context); + contents = _json(data); const response: UpdateHypervisorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1895,10 +1848,9 @@ const de_UpdateHypervisorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1912,7 +1864,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1925,7 +1877,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1941,7 +1893,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1957,7 +1909,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1970,7 +1922,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1983,7 +1935,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1991,529 +1943,119 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AssociateGatewayToServerInput - */ -const se_AssociateGatewayToServerInput = (input: AssociateGatewayToServerInput, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - ...(input.ServerArn != null && { ServerArn: input.ServerArn }), - }; -}; +// se_AssociateGatewayToServerInput omitted. -/** - * serializeAws_json1_0BandwidthRateLimitInterval - */ -const se_BandwidthRateLimitInterval = (input: BandwidthRateLimitInterval, context: __SerdeContext): any => { - return { - ...(input.AverageUploadRateLimitInBitsPerSec != null && { - AverageUploadRateLimitInBitsPerSec: input.AverageUploadRateLimitInBitsPerSec, - }), - ...(input.DaysOfWeek != null && { DaysOfWeek: se_DaysOfWeek(input.DaysOfWeek, context) }), - ...(input.EndHourOfDay != null && { EndHourOfDay: input.EndHourOfDay }), - ...(input.EndMinuteOfHour != null && { EndMinuteOfHour: input.EndMinuteOfHour }), - ...(input.StartHourOfDay != null && { StartHourOfDay: input.StartHourOfDay }), - ...(input.StartMinuteOfHour != null && { StartMinuteOfHour: input.StartMinuteOfHour }), - }; -}; +// se_BandwidthRateLimitInterval omitted. -/** - * serializeAws_json1_0BandwidthRateLimitIntervals - */ -const se_BandwidthRateLimitIntervals = (input: BandwidthRateLimitInterval[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BandwidthRateLimitInterval(entry, context); - }); -}; +// se_BandwidthRateLimitIntervals omitted. -/** - * serializeAws_json1_0CreateGatewayInput - */ -const se_CreateGatewayInput = (input: CreateGatewayInput, context: __SerdeContext): any => { - return { - ...(input.ActivationKey != null && { ActivationKey: input.ActivationKey }), - ...(input.GatewayDisplayName != null && { GatewayDisplayName: input.GatewayDisplayName }), - ...(input.GatewayType != null && { GatewayType: input.GatewayType }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateGatewayInput omitted. -/** - * serializeAws_json1_0DaysOfWeek - */ -const se_DaysOfWeek = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DaysOfWeek omitted. -/** - * serializeAws_json1_0DeleteGatewayInput - */ -const se_DeleteGatewayInput = (input: DeleteGatewayInput, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; +// se_DeleteGatewayInput omitted. -/** - * serializeAws_json1_0DeleteHypervisorInput - */ -const se_DeleteHypervisorInput = (input: DeleteHypervisorInput, context: __SerdeContext): any => { - return { - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - }; -}; +// se_DeleteHypervisorInput omitted. -/** - * serializeAws_json1_0DisassociateGatewayFromServerInput - */ -const se_DisassociateGatewayFromServerInput = ( - input: DisassociateGatewayFromServerInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; +// se_DisassociateGatewayFromServerInput omitted. -/** - * serializeAws_json1_0GetBandwidthRateLimitScheduleInput - */ -const se_GetBandwidthRateLimitScheduleInput = ( - input: GetBandwidthRateLimitScheduleInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; +// se_GetBandwidthRateLimitScheduleInput omitted. -/** - * serializeAws_json1_0GetGatewayInput - */ -const se_GetGatewayInput = (input: GetGatewayInput, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; +// se_GetGatewayInput omitted. -/** - * serializeAws_json1_0GetHypervisorInput - */ -const se_GetHypervisorInput = (input: GetHypervisorInput, context: __SerdeContext): any => { - return { - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - }; -}; +// se_GetHypervisorInput omitted. -/** - * serializeAws_json1_0GetHypervisorPropertyMappingsInput - */ -const se_GetHypervisorPropertyMappingsInput = ( - input: GetHypervisorPropertyMappingsInput, - context: __SerdeContext -): any => { - return { - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - }; -}; +// se_GetHypervisorPropertyMappingsInput omitted. -/** - * serializeAws_json1_0GetVirtualMachineInput - */ -const se_GetVirtualMachineInput = (input: GetVirtualMachineInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetVirtualMachineInput omitted. -/** - * serializeAws_json1_0ImportHypervisorConfigurationInput - */ -const se_ImportHypervisorConfigurationInput = ( - input: ImportHypervisorConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_ImportHypervisorConfigurationInput omitted. -/** - * serializeAws_json1_0ListGatewaysInput - */ -const se_ListGatewaysInput = (input: ListGatewaysInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListGatewaysInput omitted. -/** - * serializeAws_json1_0ListHypervisorsInput - */ -const se_ListHypervisorsInput = (input: ListHypervisorsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHypervisorsInput omitted. -/** - * serializeAws_json1_0ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_0ListVirtualMachinesInput - */ -const se_ListVirtualMachinesInput = (input: ListVirtualMachinesInput, context: __SerdeContext): any => { - return { - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListVirtualMachinesInput omitted. -/** - * serializeAws_json1_0PutBandwidthRateLimitScheduleInput - */ -const se_PutBandwidthRateLimitScheduleInput = ( - input: PutBandwidthRateLimitScheduleInput, - context: __SerdeContext -): any => { - return { - ...(input.BandwidthRateLimitIntervals != null && { - BandwidthRateLimitIntervals: se_BandwidthRateLimitIntervals(input.BandwidthRateLimitIntervals, context), - }), - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; +// se_PutBandwidthRateLimitScheduleInput omitted. -/** - * serializeAws_json1_0PutHypervisorPropertyMappingsInput - */ -const se_PutHypervisorPropertyMappingsInput = ( - input: PutHypervisorPropertyMappingsInput, - context: __SerdeContext -): any => { - return { - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.VmwareToAwsTagMappings != null && { - VmwareToAwsTagMappings: se_VmwareToAwsTagMappings(input.VmwareToAwsTagMappings, context), - }), - }; -}; +// se_PutHypervisorPropertyMappingsInput omitted. -/** - * serializeAws_json1_0PutMaintenanceStartTimeInput - */ -const se_PutMaintenanceStartTimeInput = (input: PutMaintenanceStartTimeInput, context: __SerdeContext): any => { - return { - ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }), - ...(input.DayOfWeek != null && { DayOfWeek: input.DayOfWeek }), - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - ...(input.HourOfDay != null && { HourOfDay: input.HourOfDay }), - ...(input.MinuteOfHour != null && { MinuteOfHour: input.MinuteOfHour }), - }; -}; +// se_PutMaintenanceStartTimeInput omitted. -/** - * serializeAws_json1_0StartVirtualMachinesMetadataSyncInput - */ -const se_StartVirtualMachinesMetadataSyncInput = ( - input: StartVirtualMachinesMetadataSyncInput, - context: __SerdeContext -): any => { - return { - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - }; -}; +// se_StartVirtualMachinesMetadataSyncInput omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_0TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_TagResourceInput omitted. -/** - * serializeAws_json1_0Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_json1_0TestHypervisorConfigurationInput - */ -const se_TestHypervisorConfigurationInput = (input: TestHypervisorConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_TestHypervisorConfigurationInput omitted. -/** - * serializeAws_json1_0UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_UntagResourceInput omitted. -/** - * serializeAws_json1_0UpdateGatewayInformationInput - */ -const se_UpdateGatewayInformationInput = (input: UpdateGatewayInformationInput, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - ...(input.GatewayDisplayName != null && { GatewayDisplayName: input.GatewayDisplayName }), - }; -}; +// se_UpdateGatewayInformationInput omitted. -/** - * serializeAws_json1_0UpdateGatewaySoftwareNowInput - */ -const se_UpdateGatewaySoftwareNowInput = (input: UpdateGatewaySoftwareNowInput, context: __SerdeContext): any => { - return { - ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }), - }; -}; +// se_UpdateGatewaySoftwareNowInput omitted. -/** - * serializeAws_json1_0UpdateHypervisorInput - */ -const se_UpdateHypervisorInput = (input: UpdateHypervisorInput, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }), - ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_UpdateHypervisorInput omitted. -/** - * serializeAws_json1_0VmwareToAwsTagMapping - */ -const se_VmwareToAwsTagMapping = (input: VmwareToAwsTagMapping, context: __SerdeContext): any => { - return { - ...(input.AwsTagKey != null && { AwsTagKey: input.AwsTagKey }), - ...(input.AwsTagValue != null && { AwsTagValue: input.AwsTagValue }), - ...(input.VmwareCategory != null && { VmwareCategory: input.VmwareCategory }), - ...(input.VmwareTagName != null && { VmwareTagName: input.VmwareTagName }), - }; -}; +// se_VmwareToAwsTagMapping omitted. -/** - * serializeAws_json1_0VmwareToAwsTagMappings - */ -const se_VmwareToAwsTagMappings = (input: VmwareToAwsTagMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VmwareToAwsTagMapping(entry, context); - }); -}; +// se_VmwareToAwsTagMappings omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0AssociateGatewayToServerOutput - */ -const de_AssociateGatewayToServerOutput = (output: any, context: __SerdeContext): AssociateGatewayToServerOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_AssociateGatewayToServerOutput omitted. -/** - * deserializeAws_json1_0BandwidthRateLimitInterval - */ -const de_BandwidthRateLimitInterval = (output: any, context: __SerdeContext): BandwidthRateLimitInterval => { - return { - AverageUploadRateLimitInBitsPerSec: __expectLong(output.AverageUploadRateLimitInBitsPerSec), - DaysOfWeek: output.DaysOfWeek != null ? de_DaysOfWeek(output.DaysOfWeek, context) : undefined, - EndHourOfDay: __expectInt32(output.EndHourOfDay), - EndMinuteOfHour: __expectInt32(output.EndMinuteOfHour), - StartHourOfDay: __expectInt32(output.StartHourOfDay), - StartMinuteOfHour: __expectInt32(output.StartMinuteOfHour), - } as any; -}; +// de_BandwidthRateLimitInterval omitted. -/** - * deserializeAws_json1_0BandwidthRateLimitIntervals - */ -const de_BandwidthRateLimitIntervals = (output: any, context: __SerdeContext): BandwidthRateLimitInterval[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BandwidthRateLimitInterval(entry, context); - }); - return retVal; -}; +// de_BandwidthRateLimitIntervals omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateGatewayOutput - */ -const de_CreateGatewayOutput = (output: any, context: __SerdeContext): CreateGatewayOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_CreateGatewayOutput omitted. -/** - * deserializeAws_json1_0DaysOfWeek - */ -const de_DaysOfWeek = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_DaysOfWeek omitted. -/** - * deserializeAws_json1_0DeleteGatewayOutput - */ -const de_DeleteGatewayOutput = (output: any, context: __SerdeContext): DeleteGatewayOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_DeleteGatewayOutput omitted. -/** - * deserializeAws_json1_0DeleteHypervisorOutput - */ -const de_DeleteHypervisorOutput = (output: any, context: __SerdeContext): DeleteHypervisorOutput => { - return { - HypervisorArn: __expectString(output.HypervisorArn), - } as any; -}; +// de_DeleteHypervisorOutput omitted. -/** - * deserializeAws_json1_0DisassociateGatewayFromServerOutput - */ -const de_DisassociateGatewayFromServerOutput = ( - output: any, - context: __SerdeContext -): DisassociateGatewayFromServerOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_DisassociateGatewayFromServerOutput omitted. /** * deserializeAws_json1_0Gateway */ const de_Gateway = (output: any, context: __SerdeContext): Gateway => { - return { - GatewayArn: __expectString(output.GatewayArn), - GatewayDisplayName: __expectString(output.GatewayDisplayName), - GatewayType: __expectString(output.GatewayType), - HypervisorId: __expectString(output.HypervisorId), - LastSeenTime: - output.LastSeenTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSeenTime))) - : undefined, - } as any; + return take(output, { + GatewayArn: __expectString, + GatewayDisplayName: __expectString, + GatewayType: __expectString, + HypervisorId: __expectString, + LastSeenTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0GatewayDetails */ const de_GatewayDetails = (output: any, context: __SerdeContext): GatewayDetails => { - return { - GatewayArn: __expectString(output.GatewayArn), - GatewayDisplayName: __expectString(output.GatewayDisplayName), - GatewayType: __expectString(output.GatewayType), - HypervisorId: __expectString(output.HypervisorId), - LastSeenTime: - output.LastSeenTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSeenTime))) - : undefined, - MaintenanceStartTime: - output.MaintenanceStartTime != null ? de_MaintenanceStartTime(output.MaintenanceStartTime, context) : undefined, - NextUpdateAvailabilityTime: - output.NextUpdateAvailabilityTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextUpdateAvailabilityTime))) - : undefined, - VpcEndpoint: __expectString(output.VpcEndpoint), - } as any; + return take(output, { + GatewayArn: __expectString, + GatewayDisplayName: __expectString, + GatewayType: __expectString, + HypervisorId: __expectString, + LastSeenTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaintenanceStartTime: _json, + NextUpdateAvailabilityTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VpcEndpoint: __expectString, + }) as any; }; /** @@ -2523,385 +2065,150 @@ const de_Gateways = (output: any, context: __SerdeContext): Gateway[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Gateway(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0GetBandwidthRateLimitScheduleOutput - */ -const de_GetBandwidthRateLimitScheduleOutput = ( - output: any, - context: __SerdeContext -): GetBandwidthRateLimitScheduleOutput => { - return { - BandwidthRateLimitIntervals: - output.BandwidthRateLimitIntervals != null - ? de_BandwidthRateLimitIntervals(output.BandwidthRateLimitIntervals, context) - : undefined, - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_GetBandwidthRateLimitScheduleOutput omitted. /** * deserializeAws_json1_0GetGatewayOutput */ const de_GetGatewayOutput = (output: any, context: __SerdeContext): GetGatewayOutput => { - return { - Gateway: output.Gateway != null ? de_GatewayDetails(output.Gateway, context) : undefined, - } as any; + return take(output, { + Gateway: (_: any) => de_GatewayDetails(_, context), + }) as any; }; /** * deserializeAws_json1_0GetHypervisorOutput */ const de_GetHypervisorOutput = (output: any, context: __SerdeContext): GetHypervisorOutput => { - return { - Hypervisor: output.Hypervisor != null ? de_HypervisorDetails(output.Hypervisor, context) : undefined, - } as any; + return take(output, { + Hypervisor: (_: any) => de_HypervisorDetails(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetHypervisorPropertyMappingsOutput - */ -const de_GetHypervisorPropertyMappingsOutput = ( - output: any, - context: __SerdeContext -): GetHypervisorPropertyMappingsOutput => { - return { - HypervisorArn: __expectString(output.HypervisorArn), - IamRoleArn: __expectString(output.IamRoleArn), - VmwareToAwsTagMappings: - output.VmwareToAwsTagMappings != null - ? de_VmwareToAwsTagMappings(output.VmwareToAwsTagMappings, context) - : undefined, - } as any; -}; +// de_GetHypervisorPropertyMappingsOutput omitted. /** * deserializeAws_json1_0GetVirtualMachineOutput */ const de_GetVirtualMachineOutput = (output: any, context: __SerdeContext): GetVirtualMachineOutput => { - return { - VirtualMachine: - output.VirtualMachine != null ? de_VirtualMachineDetails(output.VirtualMachine, context) : undefined, - } as any; + return take(output, { + VirtualMachine: (_: any) => de_VirtualMachineDetails(_, context), + }) as any; }; -/** - * deserializeAws_json1_0Hypervisor - */ -const de_Hypervisor = (output: any, context: __SerdeContext): Hypervisor => { - return { - Host: __expectString(output.Host), - HypervisorArn: __expectString(output.HypervisorArn), - KmsKeyArn: __expectString(output.KmsKeyArn), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; +// de_Hypervisor omitted. /** * deserializeAws_json1_0HypervisorDetails */ const de_HypervisorDetails = (output: any, context: __SerdeContext): HypervisorDetails => { - return { - Host: __expectString(output.Host), - HypervisorArn: __expectString(output.HypervisorArn), - KmsKeyArn: __expectString(output.KmsKeyArn), - LastSuccessfulMetadataSyncTime: - output.LastSuccessfulMetadataSyncTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulMetadataSyncTime))) - : undefined, - LatestMetadataSyncStatus: __expectString(output.LatestMetadataSyncStatus), - LatestMetadataSyncStatusMessage: __expectString(output.LatestMetadataSyncStatusMessage), - LogGroupArn: __expectString(output.LogGroupArn), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + Host: __expectString, + HypervisorArn: __expectString, + KmsKeyArn: __expectString, + LastSuccessfulMetadataSyncTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestMetadataSyncStatus: __expectString, + LatestMetadataSyncStatusMessage: __expectString, + LogGroupArn: __expectString, + Name: __expectString, + State: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0Hypervisors - */ -const de_Hypervisors = (output: any, context: __SerdeContext): Hypervisor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Hypervisor(entry, context); - }); - return retVal; -}; +// de_Hypervisors omitted. -/** - * deserializeAws_json1_0ImportHypervisorConfigurationOutput - */ -const de_ImportHypervisorConfigurationOutput = ( - output: any, - context: __SerdeContext -): ImportHypervisorConfigurationOutput => { - return { - HypervisorArn: __expectString(output.HypervisorArn), - } as any; -}; +// de_ImportHypervisorConfigurationOutput omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. /** * deserializeAws_json1_0ListGatewaysOutput */ const de_ListGatewaysOutput = (output: any, context: __SerdeContext): ListGatewaysOutput => { - return { - Gateways: output.Gateways != null ? de_Gateways(output.Gateways, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Gateways: (_: any) => de_Gateways(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListHypervisorsOutput - */ -const de_ListHypervisorsOutput = (output: any, context: __SerdeContext): ListHypervisorsOutput => { - return { - Hypervisors: output.Hypervisors != null ? de_Hypervisors(output.Hypervisors, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListHypervisorsOutput omitted. -/** - * deserializeAws_json1_0ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - ResourceArn: __expectString(output.ResourceArn), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceOutput omitted. /** * deserializeAws_json1_0ListVirtualMachinesOutput */ const de_ListVirtualMachinesOutput = (output: any, context: __SerdeContext): ListVirtualMachinesOutput => { - return { - NextToken: __expectString(output.NextToken), - VirtualMachines: output.VirtualMachines != null ? de_VirtualMachines(output.VirtualMachines, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + VirtualMachines: (_: any) => de_VirtualMachines(_, context), + }) as any; }; -/** - * deserializeAws_json1_0MaintenanceStartTime - */ -const de_MaintenanceStartTime = (output: any, context: __SerdeContext): MaintenanceStartTime => { - return { - DayOfMonth: __expectInt32(output.DayOfMonth), - DayOfWeek: __expectInt32(output.DayOfWeek), - HourOfDay: __expectInt32(output.HourOfDay), - MinuteOfHour: __expectInt32(output.MinuteOfHour), - } as any; -}; +// de_MaintenanceStartTime omitted. -/** - * deserializeAws_json1_0PutBandwidthRateLimitScheduleOutput - */ -const de_PutBandwidthRateLimitScheduleOutput = ( - output: any, - context: __SerdeContext -): PutBandwidthRateLimitScheduleOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_PutBandwidthRateLimitScheduleOutput omitted. -/** - * deserializeAws_json1_0PutHypervisorPropertyMappingsOutput - */ -const de_PutHypervisorPropertyMappingsOutput = ( - output: any, - context: __SerdeContext -): PutHypervisorPropertyMappingsOutput => { - return { - HypervisorArn: __expectString(output.HypervisorArn), - } as any; -}; +// de_PutHypervisorPropertyMappingsOutput omitted. -/** - * deserializeAws_json1_0PutMaintenanceStartTimeOutput - */ -const de_PutMaintenanceStartTimeOutput = (output: any, context: __SerdeContext): PutMaintenanceStartTimeOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_PutMaintenanceStartTimeOutput omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0StartVirtualMachinesMetadataSyncOutput - */ -const de_StartVirtualMachinesMetadataSyncOutput = ( - output: any, - context: __SerdeContext -): StartVirtualMachinesMetadataSyncOutput => { - return { - HypervisorArn: __expectString(output.HypervisorArn), - } as any; -}; +// de_StartVirtualMachinesMetadataSyncOutput omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return { - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_0Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_0TestHypervisorConfigurationOutput - */ -const de_TestHypervisorConfigurationOutput = ( - output: any, - context: __SerdeContext -): TestHypervisorConfigurationOutput => { - return {} as any; -}; +// de_TestHypervisorConfigurationOutput omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return { - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; +// de_UntagResourceOutput omitted. -/** - * deserializeAws_json1_0UpdateGatewayInformationOutput - */ -const de_UpdateGatewayInformationOutput = (output: any, context: __SerdeContext): UpdateGatewayInformationOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_UpdateGatewayInformationOutput omitted. -/** - * deserializeAws_json1_0UpdateGatewaySoftwareNowOutput - */ -const de_UpdateGatewaySoftwareNowOutput = (output: any, context: __SerdeContext): UpdateGatewaySoftwareNowOutput => { - return { - GatewayArn: __expectString(output.GatewayArn), - } as any; -}; +// de_UpdateGatewaySoftwareNowOutput omitted. -/** - * deserializeAws_json1_0UpdateHypervisorOutput - */ -const de_UpdateHypervisorOutput = (output: any, context: __SerdeContext): UpdateHypervisorOutput => { - return { - HypervisorArn: __expectString(output.HypervisorArn), - } as any; -}; +// de_UpdateHypervisorOutput omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. /** * deserializeAws_json1_0VirtualMachine */ const de_VirtualMachine = (output: any, context: __SerdeContext): VirtualMachine => { - return { - HostName: __expectString(output.HostName), - HypervisorId: __expectString(output.HypervisorId), - LastBackupDate: - output.LastBackupDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastBackupDate))) - : undefined, - Name: __expectString(output.Name), - Path: __expectString(output.Path), - ResourceArn: __expectString(output.ResourceArn), - } as any; + return take(output, { + HostName: __expectString, + HypervisorId: __expectString, + LastBackupDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Path: __expectString, + ResourceArn: __expectString, + }) as any; }; /** * deserializeAws_json1_0VirtualMachineDetails */ const de_VirtualMachineDetails = (output: any, context: __SerdeContext): VirtualMachineDetails => { - return { - HostName: __expectString(output.HostName), - HypervisorId: __expectString(output.HypervisorId), - LastBackupDate: - output.LastBackupDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastBackupDate))) - : undefined, - Name: __expectString(output.Name), - Path: __expectString(output.Path), - ResourceArn: __expectString(output.ResourceArn), - VmwareTags: output.VmwareTags != null ? de_VmwareTags(output.VmwareTags, context) : undefined, - } as any; + return take(output, { + HostName: __expectString, + HypervisorId: __expectString, + LastBackupDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Path: __expectString, + ResourceArn: __expectString, + VmwareTags: _json, + }) as any; }; /** @@ -2911,66 +2218,18 @@ const de_VirtualMachines = (output: any, context: __SerdeContext): VirtualMachin const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualMachine(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0VmwareTag - */ -const de_VmwareTag = (output: any, context: __SerdeContext): VmwareTag => { - return { - VmwareCategory: __expectString(output.VmwareCategory), - VmwareTagDescription: __expectString(output.VmwareTagDescription), - VmwareTagName: __expectString(output.VmwareTagName), - } as any; -}; +// de_VmwareTag omitted. -/** - * deserializeAws_json1_0VmwareTags - */ -const de_VmwareTags = (output: any, context: __SerdeContext): VmwareTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VmwareTag(entry, context); - }); - return retVal; -}; +// de_VmwareTags omitted. -/** - * deserializeAws_json1_0VmwareToAwsTagMapping - */ -const de_VmwareToAwsTagMapping = (output: any, context: __SerdeContext): VmwareToAwsTagMapping => { - return { - AwsTagKey: __expectString(output.AwsTagKey), - AwsTagValue: __expectString(output.AwsTagValue), - VmwareCategory: __expectString(output.VmwareCategory), - VmwareTagName: __expectString(output.VmwareTagName), - } as any; -}; +// de_VmwareToAwsTagMapping omitted. -/** - * deserializeAws_json1_0VmwareToAwsTagMappings - */ -const de_VmwareToAwsTagMappings = (output: any, context: __SerdeContext): VmwareToAwsTagMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VmwareToAwsTagMapping(entry, context); - }); - return retVal; -}; +// de_VmwareToAwsTagMappings omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2992,6 +2251,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-backup/src/protocols/Aws_restJson1.ts b/clients/client-backup/src/protocols/Aws_restJson1.ts index 2df59b827f0d..99db5c6a6855 100644 --- a/clients/client-backup/src/protocols/Aws_restJson1.ts +++ b/clients/client-backup/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,10 +11,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -198,12 +200,8 @@ import { AdvancedBackupSetting, AlreadyExistsException, BackupJob, - BackupJobState, - BackupPlan, BackupPlanInput, BackupPlansListMember, - BackupPlanTemplatesListMember, - BackupRule, BackupRuleInput, BackupSelection, BackupSelectionsListMember, @@ -218,7 +216,6 @@ import { ControlScope, CopyAction, CopyJob, - CopyJobState, DateRange, DependencyFailureException, Framework, @@ -233,11 +230,8 @@ import { ProtectedResource, RecoveryPointByBackupVault, RecoveryPointByResource, - RecoveryPointCreator, - RecoveryPointMember, RecoveryPointSelection, ReportDeliveryChannel, - ReportDestination, ReportJob, ReportPlan, ReportSetting, @@ -288,11 +282,13 @@ export const se_CreateBackupPlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backup/plans"; let body: any; - body = JSON.stringify({ - ...(input.BackupPlan != null && { BackupPlan: se_BackupPlanInput(input.BackupPlan, context) }), - ...(input.BackupPlanTags != null && { BackupPlanTags: se_Tags(input.BackupPlanTags, context) }), - ...(input.CreatorRequestId != null && { CreatorRequestId: input.CreatorRequestId }), - }); + body = JSON.stringify( + take(input, { + BackupPlan: (_) => _json(_), + BackupPlanTags: (_) => _json(_), + CreatorRequestId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -326,10 +322,12 @@ export const se_CreateBackupSelectionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BackupSelection != null && { BackupSelection: se_BackupSelection(input.BackupSelection, context) }), - ...(input.CreatorRequestId != null && { CreatorRequestId: input.CreatorRequestId }), - }); + body = JSON.stringify( + take(input, { + BackupSelection: (_) => _json(_), + CreatorRequestId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -363,11 +361,13 @@ export const se_CreateBackupVaultCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BackupVaultTags != null && { BackupVaultTags: se_Tags(input.BackupVaultTags, context) }), - ...(input.CreatorRequestId != null && { CreatorRequestId: input.CreatorRequestId }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - }); + body = JSON.stringify( + take(input, { + BackupVaultTags: (_) => _json(_), + CreatorRequestId: [], + EncryptionKeyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -392,15 +392,15 @@ export const se_CreateFrameworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/frameworks"; let body: any; - body = JSON.stringify({ - ...(input.FrameworkControls != null && { - FrameworkControls: se_FrameworkControls(input.FrameworkControls, context), - }), - ...(input.FrameworkDescription != null && { FrameworkDescription: input.FrameworkDescription }), - ...(input.FrameworkName != null && { FrameworkName: input.FrameworkName }), - ...(input.FrameworkTags != null && { FrameworkTags: se_stringMap(input.FrameworkTags, context) }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + FrameworkControls: (_) => _json(_), + FrameworkDescription: [], + FrameworkName: [], + FrameworkTags: (_) => _json(_), + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -425,15 +425,15 @@ export const se_CreateLegalHoldCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/legal-holds"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.RecoveryPointSelection != null && { - RecoveryPointSelection: se_RecoveryPointSelection(input.RecoveryPointSelection, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Title != null && { Title: input.Title }), - }); + body = JSON.stringify( + take(input, { + Description: [], + IdempotencyToken: [], + RecoveryPointSelection: (_) => se_RecoveryPointSelection(_, context), + Tags: (_) => _json(_), + Title: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -458,16 +458,16 @@ export const se_CreateReportPlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/report-plans"; let body: any; - body = JSON.stringify({ - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.ReportDeliveryChannel != null && { - ReportDeliveryChannel: se_ReportDeliveryChannel(input.ReportDeliveryChannel, context), - }), - ...(input.ReportPlanDescription != null && { ReportPlanDescription: input.ReportPlanDescription }), - ...(input.ReportPlanName != null && { ReportPlanName: input.ReportPlanName }), - ...(input.ReportPlanTags != null && { ReportPlanTags: se_stringMap(input.ReportPlanTags, context) }), - ...(input.ReportSetting != null && { ReportSetting: se_ReportSetting(input.ReportSetting, context) }), - }); + body = JSON.stringify( + take(input, { + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + ReportDeliveryChannel: (_) => _json(_), + ReportPlanDescription: [], + ReportPlanName: [], + ReportPlanTags: (_) => _json(_), + ReportSetting: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1240,9 +1240,11 @@ export const se_GetBackupPlanFromJSONCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backup/template/json/toPlan"; let body: any; - body = JSON.stringify({ - ...(input.BackupPlanTemplateJson != null && { BackupPlanTemplateJson: input.BackupPlanTemplateJson }), - }); + body = JSON.stringify( + take(input, { + BackupPlanTemplateJson: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2074,9 +2076,11 @@ export const se_PutBackupVaultAccessPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2111,11 +2115,13 @@ export const se_PutBackupVaultLockConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ChangeableForDays != null && { ChangeableForDays: input.ChangeableForDays }), - ...(input.MaxRetentionDays != null && { MaxRetentionDays: input.MaxRetentionDays }), - ...(input.MinRetentionDays != null && { MinRetentionDays: input.MinRetentionDays }), - }); + body = JSON.stringify( + take(input, { + ChangeableForDays: [], + MaxRetentionDays: [], + MinRetentionDays: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2150,12 +2156,12 @@ export const se_PutBackupVaultNotificationsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BackupVaultEvents != null && { - BackupVaultEvents: se_BackupVaultEvents(input.BackupVaultEvents, context), - }), - ...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }), - }); + body = JSON.stringify( + take(input, { + BackupVaultEvents: (_) => _json(_), + SNSTopicArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2180,17 +2186,19 @@ export const se_StartBackupJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/backup-jobs"; let body: any; - body = JSON.stringify({ - ...(input.BackupOptions != null && { BackupOptions: se_BackupOptions(input.BackupOptions, context) }), - ...(input.BackupVaultName != null && { BackupVaultName: input.BackupVaultName }), - ...(input.CompleteWindowMinutes != null && { CompleteWindowMinutes: input.CompleteWindowMinutes }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.Lifecycle != null && { Lifecycle: se_Lifecycle(input.Lifecycle, context) }), - ...(input.RecoveryPointTags != null && { RecoveryPointTags: se_Tags(input.RecoveryPointTags, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.StartWindowMinutes != null && { StartWindowMinutes: input.StartWindowMinutes }), - }); + body = JSON.stringify( + take(input, { + BackupOptions: (_) => _json(_), + BackupVaultName: [], + CompleteWindowMinutes: [], + IamRoleArn: [], + IdempotencyToken: [], + Lifecycle: (_) => _json(_), + RecoveryPointTags: (_) => _json(_), + ResourceArn: [], + StartWindowMinutes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2215,14 +2223,16 @@ export const se_StartCopyJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/copy-jobs"; let body: any; - body = JSON.stringify({ - ...(input.DestinationBackupVaultArn != null && { DestinationBackupVaultArn: input.DestinationBackupVaultArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.Lifecycle != null && { Lifecycle: se_Lifecycle(input.Lifecycle, context) }), - ...(input.RecoveryPointArn != null && { RecoveryPointArn: input.RecoveryPointArn }), - ...(input.SourceBackupVaultName != null && { SourceBackupVaultName: input.SourceBackupVaultName }), - }); + body = JSON.stringify( + take(input, { + DestinationBackupVaultArn: [], + IamRoleArn: [], + IdempotencyToken: [], + Lifecycle: (_) => _json(_), + RecoveryPointArn: [], + SourceBackupVaultName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2256,9 +2266,11 @@ export const se_StartReportJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2283,13 +2295,15 @@ export const se_StartRestoreJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restore-jobs"; let body: any; - body = JSON.stringify({ - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.Metadata != null && { Metadata: se_Metadata(input.Metadata, context) }), - ...(input.RecoveryPointArn != null && { RecoveryPointArn: input.RecoveryPointArn }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }); + body = JSON.stringify( + take(input, { + IamRoleArn: [], + IdempotencyToken: [], + Metadata: (_) => _json(_), + RecoveryPointArn: [], + ResourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2339,9 +2353,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2367,9 +2383,11 @@ export const se_UntagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untag/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }), - }); + body = JSON.stringify( + take(input, { + TagKeyList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2403,9 +2421,11 @@ export const se_UpdateBackupPlanCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BackupPlan != null && { BackupPlan: se_BackupPlanInput(input.BackupPlan, context) }), - }); + body = JSON.stringify( + take(input, { + BackupPlan: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2439,13 +2459,13 @@ export const se_UpdateFrameworkCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.FrameworkControls != null && { - FrameworkControls: se_FrameworkControls(input.FrameworkControls, context), - }), - ...(input.FrameworkDescription != null && { FrameworkDescription: input.FrameworkDescription }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + FrameworkControls: (_) => _json(_), + FrameworkDescription: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2470,9 +2490,11 @@ export const se_UpdateGlobalSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-settings"; let body: any; - body = JSON.stringify({ - ...(input.GlobalSettings != null && { GlobalSettings: se_GlobalSettings(input.GlobalSettings, context) }), - }); + body = JSON.stringify( + take(input, { + GlobalSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2515,9 +2537,11 @@ export const se_UpdateRecoveryPointLifecycleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Lifecycle != null && { Lifecycle: se_Lifecycle(input.Lifecycle, context) }), - }); + body = JSON.stringify( + take(input, { + Lifecycle: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2542,17 +2566,12 @@ export const se_UpdateRegionSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account-settings"; let body: any; - body = JSON.stringify({ - ...(input.ResourceTypeManagementPreference != null && { - ResourceTypeManagementPreference: se_ResourceTypeManagementPreference( - input.ResourceTypeManagementPreference, - context - ), - }), - ...(input.ResourceTypeOptInPreference != null && { - ResourceTypeOptInPreference: se_ResourceTypeOptInPreference(input.ResourceTypeOptInPreference, context), - }), - }); + body = JSON.stringify( + take(input, { + ResourceTypeManagementPreference: (_) => _json(_), + ResourceTypeOptInPreference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2586,14 +2605,14 @@ export const se_UpdateReportPlanCommand = async ( false ); let body: any; - body = JSON.stringify({ - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.ReportDeliveryChannel != null && { - ReportDeliveryChannel: se_ReportDeliveryChannel(input.ReportDeliveryChannel, context), - }), - ...(input.ReportPlanDescription != null && { ReportPlanDescription: input.ReportPlanDescription }), - ...(input.ReportSetting != null && { ReportSetting: se_ReportSetting(input.ReportSetting, context) }), - }); + body = JSON.stringify( + take(input, { + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + ReportDeliveryChannel: (_) => _json(_), + ReportPlanDescription: [], + ReportSetting: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2652,10 +2671,9 @@ const de_CancelLegalHoldCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2675,21 +2693,14 @@ export const de_CreateBackupPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdvancedBackupSettings != null) { - contents.AdvancedBackupSettings = de_AdvancedBackupSettings(data.AdvancedBackupSettings, context); - } - if (data.BackupPlanArn != null) { - contents.BackupPlanArn = __expectString(data.BackupPlanArn); - } - if (data.BackupPlanId != null) { - contents.BackupPlanId = __expectString(data.BackupPlanId); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.VersionId != null) { - contents.VersionId = __expectString(data.VersionId); - } + const doc = take(data, { + AdvancedBackupSettings: _json, + BackupPlanArn: __expectString, + BackupPlanId: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2723,10 +2734,9 @@ const de_CreateBackupPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2746,15 +2756,12 @@ export const de_CreateBackupSelectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanId != null) { - contents.BackupPlanId = __expectString(data.BackupPlanId); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.SelectionId != null) { - contents.SelectionId = __expectString(data.SelectionId); - } + const doc = take(data, { + BackupPlanId: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SelectionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2788,10 +2795,9 @@ const de_CreateBackupSelectionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2811,15 +2817,12 @@ export const de_CreateBackupVaultCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.BackupVaultName != null) { - contents.BackupVaultName = __expectString(data.BackupVaultName); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } + const doc = take(data, { + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2853,10 +2856,9 @@ const de_CreateBackupVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2876,12 +2878,11 @@ export const de_CreateFrameworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FrameworkArn != null) { - contents.FrameworkArn = __expectString(data.FrameworkArn); - } - if (data.FrameworkName != null) { - contents.FrameworkName = __expectString(data.FrameworkName); - } + const doc = take(data, { + FrameworkArn: __expectString, + FrameworkName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2915,10 +2916,9 @@ const de_CreateFrameworkCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2938,27 +2938,16 @@ export const de_CreateLegalHoldCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LegalHoldArn != null) { - contents.LegalHoldArn = __expectString(data.LegalHoldArn); - } - if (data.LegalHoldId != null) { - contents.LegalHoldId = __expectString(data.LegalHoldId); - } - if (data.RecoveryPointSelection != null) { - contents.RecoveryPointSelection = de_RecoveryPointSelection(data.RecoveryPointSelection, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Title != null) { - contents.Title = __expectString(data.Title); - } + const doc = take(data, { + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LegalHoldArn: __expectString, + LegalHoldId: __expectString, + RecoveryPointSelection: (_) => de_RecoveryPointSelection(_, context), + Status: __expectString, + Title: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2989,10 +2978,9 @@ const de_CreateLegalHoldCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3012,15 +3000,12 @@ export const de_CreateReportPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.ReportPlanArn != null) { - contents.ReportPlanArn = __expectString(data.ReportPlanArn); - } - if (data.ReportPlanName != null) { - contents.ReportPlanName = __expectString(data.ReportPlanName); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReportPlanArn: __expectString, + ReportPlanName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3054,10 +3039,9 @@ const de_CreateReportPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3077,18 +3061,13 @@ export const de_DeleteBackupPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanArn != null) { - contents.BackupPlanArn = __expectString(data.BackupPlanArn); - } - if (data.BackupPlanId != null) { - contents.BackupPlanId = __expectString(data.BackupPlanId); - } - if (data.DeletionDate != null) { - contents.DeletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.DeletionDate))); - } - if (data.VersionId != null) { - contents.VersionId = __expectString(data.VersionId); - } + const doc = take(data, { + BackupPlanArn: __expectString, + BackupPlanId: __expectString, + DeletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3122,10 +3101,9 @@ const de_DeleteBackupPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3175,10 +3153,9 @@ const de_DeleteBackupSelectionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3231,10 +3208,9 @@ const de_DeleteBackupVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3284,10 +3260,9 @@ const de_DeleteBackupVaultAccessPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3340,10 +3315,9 @@ const de_DeleteBackupVaultLockConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3393,10 +3367,9 @@ const de_DeleteBackupVaultNotificationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3449,10 +3422,9 @@ const de_DeleteFrameworkCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3508,10 +3480,9 @@ const de_DeleteRecoveryPointCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3564,10 +3535,9 @@ const de_DeleteReportPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3587,83 +3557,34 @@ export const de_DescribeBackupJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountId != null) { - contents.AccountId = __expectString(data.AccountId); - } - if (data.BackupJobId != null) { - contents.BackupJobId = __expectString(data.BackupJobId); - } - if (data.BackupOptions != null) { - contents.BackupOptions = de_BackupOptions(data.BackupOptions, context); - } - if (data.BackupSizeInBytes != null) { - contents.BackupSizeInBytes = __expectLong(data.BackupSizeInBytes); - } - if (data.BackupType != null) { - contents.BackupType = __expectString(data.BackupType); - } - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.BackupVaultName != null) { - contents.BackupVaultName = __expectString(data.BackupVaultName); - } - if (data.BytesTransferred != null) { - contents.BytesTransferred = __expectLong(data.BytesTransferred); - } - if (data.ChildJobsInState != null) { - contents.ChildJobsInState = de_BackupJobChildJobsInState(data.ChildJobsInState, context); - } - if (data.CompletionDate != null) { - contents.CompletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletionDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = de_RecoveryPointCreator(data.CreatedBy, context); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.ExpectedCompletionDate != null) { - contents.ExpectedCompletionDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.ExpectedCompletionDate)) - ); - } - if (data.IamRoleArn != null) { - contents.IamRoleArn = __expectString(data.IamRoleArn); - } - if (data.IsParent != null) { - contents.IsParent = __expectBoolean(data.IsParent); - } - if (data.NumberOfChildJobs != null) { - contents.NumberOfChildJobs = __expectLong(data.NumberOfChildJobs); - } - if (data.ParentJobId != null) { - contents.ParentJobId = __expectString(data.ParentJobId); - } - if (data.PercentDone != null) { - contents.PercentDone = __expectString(data.PercentDone); - } - if (data.RecoveryPointArn != null) { - contents.RecoveryPointArn = __expectString(data.RecoveryPointArn); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.StartBy != null) { - contents.StartBy = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartBy))); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StatusMessage != null) { - contents.StatusMessage = __expectString(data.StatusMessage); - } + const doc = take(data, { + AccountId: __expectString, + BackupJobId: __expectString, + BackupOptions: _json, + BackupSizeInBytes: __expectLong, + BackupType: __expectString, + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + BytesTransferred: __expectLong, + ChildJobsInState: _json, + CompletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: _json, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpectedCompletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IamRoleArn: __expectString, + IsParent: __expectBoolean, + NumberOfChildJobs: __expectLong, + ParentJobId: __expectString, + PercentDone: __expectString, + RecoveryPointArn: __expectString, + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + StartBy: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StatusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3697,10 +3618,9 @@ const de_DescribeBackupJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3720,36 +3640,19 @@ export const de_DescribeBackupVaultCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.BackupVaultName != null) { - contents.BackupVaultName = __expectString(data.BackupVaultName); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.CreatorRequestId != null) { - contents.CreatorRequestId = __expectString(data.CreatorRequestId); - } - if (data.EncryptionKeyArn != null) { - contents.EncryptionKeyArn = __expectString(data.EncryptionKeyArn); - } - if (data.LockDate != null) { - contents.LockDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockDate))); - } - if (data.Locked != null) { - contents.Locked = __expectBoolean(data.Locked); - } - if (data.MaxRetentionDays != null) { - contents.MaxRetentionDays = __expectLong(data.MaxRetentionDays); - } - if (data.MinRetentionDays != null) { - contents.MinRetentionDays = __expectLong(data.MinRetentionDays); - } - if (data.NumberOfRecoveryPoints != null) { - contents.NumberOfRecoveryPoints = __expectLong(data.NumberOfRecoveryPoints); - } + const doc = take(data, { + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + EncryptionKeyArn: __expectString, + LockDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Locked: __expectBoolean, + MaxRetentionDays: __expectLong, + MinRetentionDays: __expectLong, + NumberOfRecoveryPoints: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -3780,10 +3683,9 @@ const de_DescribeBackupVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3803,9 +3705,10 @@ export const de_DescribeCopyJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CopyJob != null) { - contents.CopyJob = de_CopyJob(data.CopyJob, context); - } + const doc = take(data, { + CopyJob: (_) => de_CopyJob(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3836,10 +3739,9 @@ const de_DescribeCopyJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3859,30 +3761,17 @@ export const de_DescribeFrameworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DeploymentStatus != null) { - contents.DeploymentStatus = __expectString(data.DeploymentStatus); - } - if (data.FrameworkArn != null) { - contents.FrameworkArn = __expectString(data.FrameworkArn); - } - if (data.FrameworkControls != null) { - contents.FrameworkControls = de_FrameworkControls(data.FrameworkControls, context); - } - if (data.FrameworkDescription != null) { - contents.FrameworkDescription = __expectString(data.FrameworkDescription); - } - if (data.FrameworkName != null) { - contents.FrameworkName = __expectString(data.FrameworkName); - } - if (data.FrameworkStatus != null) { - contents.FrameworkStatus = __expectString(data.FrameworkStatus); - } - if (data.IdempotencyToken != null) { - contents.IdempotencyToken = __expectString(data.IdempotencyToken); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeploymentStatus: __expectString, + FrameworkArn: __expectString, + FrameworkControls: _json, + FrameworkDescription: __expectString, + FrameworkName: __expectString, + FrameworkStatus: __expectString, + IdempotencyToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3913,10 +3802,9 @@ const de_DescribeFrameworkCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3936,12 +3824,11 @@ export const de_DescribeGlobalSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GlobalSettings != null) { - contents.GlobalSettings = de_GlobalSettings(data.GlobalSettings, context); - } - if (data.LastUpdateTime != null) { - contents.LastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdateTime))); - } + const doc = take(data, { + GlobalSettings: _json, + LastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -3966,10 +3853,9 @@ const de_DescribeGlobalSettingsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3989,18 +3875,13 @@ export const de_DescribeProtectedResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastBackupTime != null) { - contents.LastBackupTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastBackupTime))); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + LastBackupTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4031,10 +3912,9 @@ const de_DescribeProtectedResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4054,75 +3934,32 @@ export const de_DescribeRecoveryPointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupSizeInBytes != null) { - contents.BackupSizeInBytes = __expectLong(data.BackupSizeInBytes); - } - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.BackupVaultName != null) { - contents.BackupVaultName = __expectString(data.BackupVaultName); - } - if (data.CalculatedLifecycle != null) { - contents.CalculatedLifecycle = de_CalculatedLifecycle(data.CalculatedLifecycle, context); - } - if (data.CompletionDate != null) { - contents.CompletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletionDate))); - } - if (data.CompositeMemberIdentifier != null) { - contents.CompositeMemberIdentifier = __expectString(data.CompositeMemberIdentifier); - } - if (data.CreatedBy != null) { - contents.CreatedBy = de_RecoveryPointCreator(data.CreatedBy, context); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.EncryptionKeyArn != null) { - contents.EncryptionKeyArn = __expectString(data.EncryptionKeyArn); - } - if (data.IamRoleArn != null) { - contents.IamRoleArn = __expectString(data.IamRoleArn); - } - if (data.IsEncrypted != null) { - contents.IsEncrypted = __expectBoolean(data.IsEncrypted); - } - if (data.IsParent != null) { - contents.IsParent = __expectBoolean(data.IsParent); - } - if (data.LastRestoreTime != null) { - contents.LastRestoreTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastRestoreTime))); - } - if (data.Lifecycle != null) { - contents.Lifecycle = de_Lifecycle(data.Lifecycle, context); - } - if (data.ParentRecoveryPointArn != null) { - contents.ParentRecoveryPointArn = __expectString(data.ParentRecoveryPointArn); - } - if (data.RecoveryPointArn != null) { - contents.RecoveryPointArn = __expectString(data.RecoveryPointArn); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.SourceBackupVaultArn != null) { - contents.SourceBackupVaultArn = __expectString(data.SourceBackupVaultArn); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusMessage != null) { - contents.StatusMessage = __expectString(data.StatusMessage); - } - if (data.StorageClass != null) { - contents.StorageClass = __expectString(data.StorageClass); - } + const doc = take(data, { + BackupSizeInBytes: __expectLong, + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + CalculatedLifecycle: (_) => de_CalculatedLifecycle(_, context), + CompletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompositeMemberIdentifier: __expectString, + CreatedBy: _json, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EncryptionKeyArn: __expectString, + IamRoleArn: __expectString, + IsEncrypted: __expectBoolean, + IsParent: __expectBoolean, + LastRestoreTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Lifecycle: _json, + ParentRecoveryPointArn: __expectString, + RecoveryPointArn: __expectString, + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + SourceBackupVaultArn: __expectString, + Status: __expectString, + StatusMessage: __expectString, + StorageClass: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4153,10 +3990,9 @@ const de_DescribeRecoveryPointCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4176,15 +4012,11 @@ export const de_DescribeRegionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceTypeManagementPreference != null) { - contents.ResourceTypeManagementPreference = de_ResourceTypeManagementPreference( - data.ResourceTypeManagementPreference, - context - ); - } - if (data.ResourceTypeOptInPreference != null) { - contents.ResourceTypeOptInPreference = de_ResourceTypeOptInPreference(data.ResourceTypeOptInPreference, context); - } + const doc = take(data, { + ResourceTypeManagementPreference: _json, + ResourceTypeOptInPreference: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4206,10 +4038,9 @@ const de_DescribeRegionSettingsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4229,9 +4060,10 @@ export const de_DescribeReportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReportJob != null) { - contents.ReportJob = de_ReportJob(data.ReportJob, context); - } + const doc = take(data, { + ReportJob: (_) => de_ReportJob(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4259,10 +4091,9 @@ const de_DescribeReportJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4282,9 +4113,10 @@ export const de_DescribeReportPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReportPlan != null) { - contents.ReportPlan = de_ReportPlan(data.ReportPlan, context); - } + const doc = take(data, { + ReportPlan: (_) => de_ReportPlan(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4315,10 +4147,9 @@ const de_DescribeReportPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4338,45 +4169,22 @@ export const de_DescribeRestoreJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountId != null) { - contents.AccountId = __expectString(data.AccountId); - } - if (data.BackupSizeInBytes != null) { - contents.BackupSizeInBytes = __expectLong(data.BackupSizeInBytes); - } - if (data.CompletionDate != null) { - contents.CompletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletionDate))); - } - if (data.CreatedResourceArn != null) { - contents.CreatedResourceArn = __expectString(data.CreatedResourceArn); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.ExpectedCompletionTimeMinutes != null) { - contents.ExpectedCompletionTimeMinutes = __expectLong(data.ExpectedCompletionTimeMinutes); - } - if (data.IamRoleArn != null) { - contents.IamRoleArn = __expectString(data.IamRoleArn); - } - if (data.PercentDone != null) { - contents.PercentDone = __expectString(data.PercentDone); - } - if (data.RecoveryPointArn != null) { - contents.RecoveryPointArn = __expectString(data.RecoveryPointArn); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.RestoreJobId != null) { - contents.RestoreJobId = __expectString(data.RestoreJobId); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusMessage != null) { - contents.StatusMessage = __expectString(data.StatusMessage); - } + const doc = take(data, { + AccountId: __expectString, + BackupSizeInBytes: __expectLong, + CompletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedResourceArn: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpectedCompletionTimeMinutes: __expectLong, + IamRoleArn: __expectString, + PercentDone: __expectString, + RecoveryPointArn: __expectString, + ResourceType: __expectString, + RestoreJobId: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4410,10 +4218,9 @@ const de_DescribeRestoreJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4469,10 +4276,9 @@ const de_DisassociateRecoveryPointCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4525,10 +4331,9 @@ const de_DisassociateRecoveryPointFromParentCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4548,9 +4353,10 @@ export const de_ExportBackupPlanTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanTemplateJson != null) { - contents.BackupPlanTemplateJson = __expectString(data.BackupPlanTemplateJson); - } + const doc = take(data, { + BackupPlanTemplateJson: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4581,10 +4387,9 @@ const de_ExportBackupPlanTemplateCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4604,33 +4409,18 @@ export const de_GetBackupPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdvancedBackupSettings != null) { - contents.AdvancedBackupSettings = de_AdvancedBackupSettings(data.AdvancedBackupSettings, context); - } - if (data.BackupPlan != null) { - contents.BackupPlan = de_BackupPlan(data.BackupPlan, context); - } - if (data.BackupPlanArn != null) { - contents.BackupPlanArn = __expectString(data.BackupPlanArn); - } - if (data.BackupPlanId != null) { - contents.BackupPlanId = __expectString(data.BackupPlanId); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.CreatorRequestId != null) { - contents.CreatorRequestId = __expectString(data.CreatorRequestId); - } - if (data.DeletionDate != null) { - contents.DeletionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.DeletionDate))); - } - if (data.LastExecutionDate != null) { - contents.LastExecutionDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastExecutionDate))); - } - if (data.VersionId != null) { - contents.VersionId = __expectString(data.VersionId); - } + const doc = take(data, { + AdvancedBackupSettings: _json, + BackupPlan: _json, + BackupPlanArn: __expectString, + BackupPlanId: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + DeletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastExecutionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4661,10 +4451,9 @@ const de_GetBackupPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4684,9 +4473,10 @@ export const de_GetBackupPlanFromJSONCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlan != null) { - contents.BackupPlan = de_BackupPlan(data.BackupPlan, context); - } + const doc = take(data, { + BackupPlan: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4720,10 +4510,9 @@ const de_GetBackupPlanFromJSONCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4743,9 +4532,10 @@ export const de_GetBackupPlanFromTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanDocument != null) { - contents.BackupPlanDocument = de_BackupPlan(data.BackupPlanDocument, context); - } + const doc = take(data, { + BackupPlanDocument: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4776,10 +4566,9 @@ const de_GetBackupPlanFromTemplateCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4799,21 +4588,14 @@ export const de_GetBackupSelectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanId != null) { - contents.BackupPlanId = __expectString(data.BackupPlanId); - } - if (data.BackupSelection != null) { - contents.BackupSelection = de_BackupSelection(data.BackupSelection, context); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.CreatorRequestId != null) { - contents.CreatorRequestId = __expectString(data.CreatorRequestId); - } - if (data.SelectionId != null) { - contents.SelectionId = __expectString(data.SelectionId); - } + const doc = take(data, { + BackupPlanId: __expectString, + BackupSelection: _json, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + SelectionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4844,10 +4626,9 @@ const de_GetBackupSelectionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4867,15 +4648,12 @@ export const de_GetBackupVaultAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.BackupVaultName != null) { - contents.BackupVaultName = __expectString(data.BackupVaultName); - } - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4906,10 +4684,9 @@ const de_GetBackupVaultAccessPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4929,18 +4706,13 @@ export const de_GetBackupVaultNotificationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.BackupVaultEvents != null) { - contents.BackupVaultEvents = de_BackupVaultEvents(data.BackupVaultEvents, context); - } - if (data.BackupVaultName != null) { - contents.BackupVaultName = __expectString(data.BackupVaultName); - } - if (data.SNSTopicArn != null) { - contents.SNSTopicArn = __expectString(data.SNSTopicArn); - } + const doc = take(data, { + BackupVaultArn: __expectString, + BackupVaultEvents: _json, + BackupVaultName: __expectString, + SNSTopicArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4971,10 +4743,9 @@ const de_GetBackupVaultNotificationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4994,36 +4765,19 @@ export const de_GetLegalHoldCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CancelDescription != null) { - contents.CancelDescription = __expectString(data.CancelDescription); - } - if (data.CancellationDate != null) { - contents.CancellationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CancellationDate))); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LegalHoldArn != null) { - contents.LegalHoldArn = __expectString(data.LegalHoldArn); - } - if (data.LegalHoldId != null) { - contents.LegalHoldId = __expectString(data.LegalHoldId); - } - if (data.RecoveryPointSelection != null) { - contents.RecoveryPointSelection = de_RecoveryPointSelection(data.RecoveryPointSelection, context); - } - if (data.RetainRecordUntil != null) { - contents.RetainRecordUntil = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.RetainRecordUntil))); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Title != null) { - contents.Title = __expectString(data.Title); - } + const doc = take(data, { + CancelDescription: __expectString, + CancellationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LegalHoldArn: __expectString, + LegalHoldId: __expectString, + RecoveryPointSelection: (_) => de_RecoveryPointSelection(_, context), + RetainRecordUntil: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Title: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5054,10 +4808,9 @@ const de_GetLegalHoldCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5077,15 +4830,12 @@ export const de_GetRecoveryPointRestoreMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.RecoveryPointArn != null) { - contents.RecoveryPointArn = __expectString(data.RecoveryPointArn); - } - if (data.RestoreMetadata != null) { - contents.RestoreMetadata = de_Metadata(data.RestoreMetadata, context); - } + const doc = take(data, { + BackupVaultArn: __expectString, + RecoveryPointArn: __expectString, + RestoreMetadata: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5116,10 +4866,9 @@ const de_GetRecoveryPointRestoreMetadataCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5139,9 +4888,10 @@ export const de_GetSupportedResourceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceTypes != null) { - contents.ResourceTypes = de_ResourceTypes(data.ResourceTypes, context); - } + const doc = take(data, { + ResourceTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5163,10 +4913,9 @@ const de_GetSupportedResourceTypesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5186,12 +4935,11 @@ export const de_ListBackupJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupJobs != null) { - contents.BackupJobs = de_BackupJobsList(data.BackupJobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BackupJobs: (_) => de_BackupJobsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5216,10 +4964,9 @@ const de_ListBackupJobsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5239,12 +4986,11 @@ export const de_ListBackupPlansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlansList != null) { - contents.BackupPlansList = de_BackupPlansList(data.BackupPlansList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BackupPlansList: (_) => de_BackupPlansList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5275,10 +5021,9 @@ const de_ListBackupPlansCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5298,12 +5043,11 @@ export const de_ListBackupPlanTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanTemplatesList != null) { - contents.BackupPlanTemplatesList = de_BackupPlanTemplatesList(data.BackupPlanTemplatesList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BackupPlanTemplatesList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5334,10 +5078,9 @@ const de_ListBackupPlanTemplatesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5357,12 +5100,11 @@ export const de_ListBackupPlanVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPlanVersionsList != null) { - contents.BackupPlanVersionsList = de_BackupPlanVersionsList(data.BackupPlanVersionsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BackupPlanVersionsList: (_) => de_BackupPlanVersionsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5393,10 +5135,9 @@ const de_ListBackupPlanVersionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5416,12 +5157,11 @@ export const de_ListBackupSelectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupSelectionsList != null) { - contents.BackupSelectionsList = de_BackupSelectionsList(data.BackupSelectionsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BackupSelectionsList: (_) => de_BackupSelectionsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5452,10 +5192,9 @@ const de_ListBackupSelectionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5475,12 +5214,11 @@ export const de_ListBackupVaultsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultList != null) { - contents.BackupVaultList = de_BackupVaultList(data.BackupVaultList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BackupVaultList: (_) => de_BackupVaultList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5511,10 +5249,9 @@ const de_ListBackupVaultsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5534,12 +5271,11 @@ export const de_ListCopyJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CopyJobs != null) { - contents.CopyJobs = de_CopyJobsList(data.CopyJobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CopyJobs: (_) => de_CopyJobsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5564,10 +5300,9 @@ const de_ListCopyJobsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5587,12 +5322,11 @@ export const de_ListFrameworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Frameworks != null) { - contents.Frameworks = de_FrameworkList(data.Frameworks, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Frameworks: (_) => de_FrameworkList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5617,10 +5351,9 @@ const de_ListFrameworksCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5640,12 +5373,11 @@ export const de_ListLegalHoldsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LegalHolds != null) { - contents.LegalHolds = de_LegalHoldsList(data.LegalHolds, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LegalHolds: (_) => de_LegalHoldsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5670,10 +5402,9 @@ const de_ListLegalHoldsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5693,12 +5424,11 @@ export const de_ListProtectedResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Results != null) { - contents.Results = de_ProtectedResourcesList(data.Results, context); - } + const doc = take(data, { + NextToken: __expectString, + Results: (_) => de_ProtectedResourcesList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5723,10 +5453,9 @@ const de_ListProtectedResourcesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5746,12 +5475,11 @@ export const de_ListRecoveryPointsByBackupVaultCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RecoveryPoints != null) { - contents.RecoveryPoints = de_RecoveryPointByBackupVaultList(data.RecoveryPoints, context); - } + const doc = take(data, { + NextToken: __expectString, + RecoveryPoints: (_) => de_RecoveryPointByBackupVaultList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5782,10 +5510,9 @@ const de_ListRecoveryPointsByBackupVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5805,12 +5532,11 @@ export const de_ListRecoveryPointsByLegalHoldCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RecoveryPoints != null) { - contents.RecoveryPoints = de_RecoveryPointsList(data.RecoveryPoints, context); - } + const doc = take(data, { + NextToken: __expectString, + RecoveryPoints: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5838,10 +5564,9 @@ const de_ListRecoveryPointsByLegalHoldCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5861,12 +5586,11 @@ export const de_ListRecoveryPointsByResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RecoveryPoints != null) { - contents.RecoveryPoints = de_RecoveryPointByResourceList(data.RecoveryPoints, context); - } + const doc = take(data, { + NextToken: __expectString, + RecoveryPoints: (_) => de_RecoveryPointByResourceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5897,10 +5621,9 @@ const de_ListRecoveryPointsByResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5920,12 +5643,11 @@ export const de_ListReportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReportJobs != null) { - contents.ReportJobs = de_ReportJobList(data.ReportJobs, context); - } + const doc = take(data, { + NextToken: __expectString, + ReportJobs: (_) => de_ReportJobList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5953,10 +5675,9 @@ const de_ListReportJobsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5976,12 +5697,11 @@ export const de_ListReportPlansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReportPlans != null) { - contents.ReportPlans = de_ReportPlanList(data.ReportPlans, context); - } + const doc = take(data, { + NextToken: __expectString, + ReportPlans: (_) => de_ReportPlanList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6006,10 +5726,9 @@ const de_ListReportPlansCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6029,12 +5748,11 @@ export const de_ListRestoreJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RestoreJobs != null) { - contents.RestoreJobs = de_RestoreJobsList(data.RestoreJobs, context); - } + const doc = take(data, { + NextToken: __expectString, + RestoreJobs: (_) => de_RestoreJobsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6065,10 +5783,9 @@ const de_ListRestoreJobsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6088,12 +5805,11 @@ export const de_ListTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + NextToken: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6124,10 +5840,9 @@ const de_ListTagsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6177,10 +5892,9 @@ const de_PutBackupVaultAccessPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6233,10 +5947,9 @@ const de_PutBackupVaultLockConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6286,10 +5999,9 @@ const de_PutBackupVaultNotificationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6309,18 +6021,13 @@ export const de_StartBackupJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupJobId != null) { - contents.BackupJobId = __expectString(data.BackupJobId); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.IsParent != null) { - contents.IsParent = __expectBoolean(data.IsParent); - } - if (data.RecoveryPointArn != null) { - contents.RecoveryPointArn = __expectString(data.RecoveryPointArn); - } + const doc = take(data, { + BackupJobId: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IsParent: __expectBoolean, + RecoveryPointArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6357,10 +6064,9 @@ const de_StartBackupJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6380,15 +6086,12 @@ export const de_StartCopyJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CopyJobId != null) { - contents.CopyJobId = __expectString(data.CopyJobId); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.IsParent != null) { - contents.IsParent = __expectBoolean(data.IsParent); - } + const doc = take(data, { + CopyJobId: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IsParent: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -6425,10 +6128,9 @@ const de_StartCopyJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6448,9 +6150,10 @@ export const de_StartReportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReportJobId != null) { - contents.ReportJobId = __expectString(data.ReportJobId); - } + const doc = take(data, { + ReportJobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6481,10 +6184,9 @@ const de_StartReportJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6504,9 +6206,10 @@ export const de_StartRestoreJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RestoreJobId != null) { - contents.RestoreJobId = __expectString(data.RestoreJobId); - } + const doc = take(data, { + RestoreJobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6537,10 +6240,9 @@ const de_StartRestoreJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6593,10 +6295,9 @@ const de_StopBackupJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6649,10 +6350,9 @@ const de_TagResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6702,10 +6402,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6725,21 +6424,14 @@ export const de_UpdateBackupPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdvancedBackupSettings != null) { - contents.AdvancedBackupSettings = de_AdvancedBackupSettings(data.AdvancedBackupSettings, context); - } - if (data.BackupPlanArn != null) { - contents.BackupPlanArn = __expectString(data.BackupPlanArn); - } - if (data.BackupPlanId != null) { - contents.BackupPlanId = __expectString(data.BackupPlanId); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.VersionId != null) { - contents.VersionId = __expectString(data.VersionId); - } + const doc = take(data, { + AdvancedBackupSettings: _json, + BackupPlanArn: __expectString, + BackupPlanId: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6770,10 +6462,9 @@ const de_UpdateBackupPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6793,15 +6484,12 @@ export const de_UpdateFrameworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.FrameworkArn != null) { - contents.FrameworkArn = __expectString(data.FrameworkArn); - } - if (data.FrameworkName != null) { - contents.FrameworkName = __expectString(data.FrameworkName); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FrameworkArn: __expectString, + FrameworkName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6841,10 +6529,9 @@ const de_UpdateFrameworkCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6894,10 +6581,9 @@ const de_UpdateGlobalSettingsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6917,18 +6603,13 @@ export const de_UpdateRecoveryPointLifecycleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupVaultArn != null) { - contents.BackupVaultArn = __expectString(data.BackupVaultArn); - } - if (data.CalculatedLifecycle != null) { - contents.CalculatedLifecycle = de_CalculatedLifecycle(data.CalculatedLifecycle, context); - } - if (data.Lifecycle != null) { - contents.Lifecycle = de_Lifecycle(data.Lifecycle, context); - } - if (data.RecoveryPointArn != null) { - contents.RecoveryPointArn = __expectString(data.RecoveryPointArn); - } + const doc = take(data, { + BackupVaultArn: __expectString, + CalculatedLifecycle: (_) => de_CalculatedLifecycle(_, context), + Lifecycle: _json, + RecoveryPointArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6962,10 +6643,9 @@ const de_UpdateRecoveryPointLifecycleCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7012,10 +6692,9 @@ const de_UpdateRegionSettingsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7035,15 +6714,12 @@ export const de_UpdateReportPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.ReportPlanArn != null) { - contents.ReportPlanArn = __expectString(data.ReportPlanArn); - } - if (data.ReportPlanName != null) { - contents.ReportPlanName = __expectString(data.ReportPlanName); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReportPlanArn: __expectString, + ReportPlanName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7077,16 +6753,15 @@ const de_UpdateReportPlanCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AlreadyExistsExceptionRes */ @@ -7096,24 +6771,15 @@ const de_AlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.CreatorRequestId != null) { - contents.CreatorRequestId = __expectString(data.CreatorRequestId); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + Code: __expectString, + Context: __expectString, + CreatorRequestId: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7127,18 +6793,13 @@ const de_AlreadyExistsExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7155,18 +6816,13 @@ const de_DependencyFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new DependencyFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7183,18 +6839,13 @@ const de_InvalidParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7211,18 +6862,13 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7239,18 +6885,13 @@ const de_InvalidResourceStateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidResourceStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7267,18 +6908,13 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7295,18 +6931,13 @@ const de_MissingParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new MissingParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7323,18 +6954,13 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7351,18 +6977,13 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Context != null) { - contents.Context = __expectString(data.Context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Code: __expectString, + Context: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7370,544 +6991,137 @@ const de_ServiceUnavailableExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdvancedBackupSetting - */ -const se_AdvancedBackupSetting = (input: AdvancedBackupSetting, context: __SerdeContext): any => { - return { - ...(input.BackupOptions != null && { BackupOptions: se_BackupOptions(input.BackupOptions, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_AdvancedBackupSetting omitted. -/** - * serializeAws_restJson1AdvancedBackupSettings - */ -const se_AdvancedBackupSettings = (input: AdvancedBackupSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdvancedBackupSetting(entry, context); - }); -}; +// se_AdvancedBackupSettings omitted. -/** - * serializeAws_restJson1BackupOptions - */ -const se_BackupOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_BackupOptions omitted. -/** - * serializeAws_restJson1BackupPlanInput - */ -const se_BackupPlanInput = (input: BackupPlanInput, context: __SerdeContext): any => { - return { - ...(input.AdvancedBackupSettings != null && { - AdvancedBackupSettings: se_AdvancedBackupSettings(input.AdvancedBackupSettings, context), - }), - ...(input.BackupPlanName != null && { BackupPlanName: input.BackupPlanName }), - ...(input.Rules != null && { Rules: se_BackupRulesInput(input.Rules, context) }), - }; -}; +// se_BackupPlanInput omitted. -/** - * serializeAws_restJson1BackupRuleInput - */ -const se_BackupRuleInput = (input: BackupRuleInput, context: __SerdeContext): any => { - return { - ...(input.CompletionWindowMinutes != null && { CompletionWindowMinutes: input.CompletionWindowMinutes }), - ...(input.CopyActions != null && { CopyActions: se_CopyActions(input.CopyActions, context) }), - ...(input.EnableContinuousBackup != null && { EnableContinuousBackup: input.EnableContinuousBackup }), - ...(input.Lifecycle != null && { Lifecycle: se_Lifecycle(input.Lifecycle, context) }), - ...(input.RecoveryPointTags != null && { RecoveryPointTags: se_Tags(input.RecoveryPointTags, context) }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.StartWindowMinutes != null && { StartWindowMinutes: input.StartWindowMinutes }), - ...(input.TargetBackupVaultName != null && { TargetBackupVaultName: input.TargetBackupVaultName }), - }; -}; +// se_BackupRuleInput omitted. -/** - * serializeAws_restJson1BackupRulesInput - */ -const se_BackupRulesInput = (input: BackupRuleInput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BackupRuleInput(entry, context); - }); -}; +// se_BackupRulesInput omitted. -/** - * serializeAws_restJson1BackupSelection - */ -const se_BackupSelection = (input: BackupSelection, context: __SerdeContext): any => { - return { - ...(input.Conditions != null && { Conditions: se_Conditions(input.Conditions, context) }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.ListOfTags != null && { ListOfTags: se_ListOfTags(input.ListOfTags, context) }), - ...(input.NotResources != null && { NotResources: se_ResourceArns(input.NotResources, context) }), - ...(input.Resources != null && { Resources: se_ResourceArns(input.Resources, context) }), - ...(input.SelectionName != null && { SelectionName: input.SelectionName }), - }; -}; +// se_BackupSelection omitted. -/** - * serializeAws_restJson1BackupVaultEvents - */ -const se_BackupVaultEvents = (input: (BackupVaultEvent | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BackupVaultEvents omitted. -/** - * serializeAws_restJson1ComplianceResourceIdList - */ -const se_ComplianceResourceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComplianceResourceIdList omitted. -/** - * serializeAws_restJson1Condition - */ -const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.ConditionKey != null && { ConditionKey: input.ConditionKey }), - ...(input.ConditionType != null && { ConditionType: input.ConditionType }), - ...(input.ConditionValue != null && { ConditionValue: input.ConditionValue }), - }; -}; +// se_Condition omitted. -/** - * serializeAws_restJson1ConditionParameter - */ -const se_ConditionParameter = (input: ConditionParameter, context: __SerdeContext): any => { - return { - ...(input.ConditionKey != null && { ConditionKey: input.ConditionKey }), - ...(input.ConditionValue != null && { ConditionValue: input.ConditionValue }), - }; -}; +// se_ConditionParameter omitted. -/** - * serializeAws_restJson1ConditionParameters - */ -const se_ConditionParameters = (input: ConditionParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConditionParameter(entry, context); - }); -}; +// se_ConditionParameters omitted. -/** - * serializeAws_restJson1Conditions - */ -const se_Conditions = (input: Conditions, context: __SerdeContext): any => { - return { - ...(input.StringEquals != null && { StringEquals: se_ConditionParameters(input.StringEquals, context) }), - ...(input.StringLike != null && { StringLike: se_ConditionParameters(input.StringLike, context) }), - ...(input.StringNotEquals != null && { StringNotEquals: se_ConditionParameters(input.StringNotEquals, context) }), - ...(input.StringNotLike != null && { StringNotLike: se_ConditionParameters(input.StringNotLike, context) }), - }; -}; +// se_Conditions omitted. -/** - * serializeAws_restJson1ControlInputParameter - */ -const se_ControlInputParameter = (input: ControlInputParameter, context: __SerdeContext): any => { - return { - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.ParameterValue != null && { ParameterValue: input.ParameterValue }), - }; -}; +// se_ControlInputParameter omitted. -/** - * serializeAws_restJson1ControlInputParameters - */ -const se_ControlInputParameters = (input: ControlInputParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ControlInputParameter(entry, context); - }); -}; +// se_ControlInputParameters omitted. -/** - * serializeAws_restJson1ControlScope - */ -const se_ControlScope = (input: ControlScope, context: __SerdeContext): any => { - return { - ...(input.ComplianceResourceIds != null && { - ComplianceResourceIds: se_ComplianceResourceIdList(input.ComplianceResourceIds, context), - }), - ...(input.ComplianceResourceTypes != null && { - ComplianceResourceTypes: se_ResourceTypeList(input.ComplianceResourceTypes, context), - }), - ...(input.Tags != null && { Tags: se_stringMap(input.Tags, context) }), - }; -}; +// se_ControlScope omitted. -/** - * serializeAws_restJson1CopyAction - */ -const se_CopyAction = (input: CopyAction, context: __SerdeContext): any => { - return { - ...(input.DestinationBackupVaultArn != null && { DestinationBackupVaultArn: input.DestinationBackupVaultArn }), - ...(input.Lifecycle != null && { Lifecycle: se_Lifecycle(input.Lifecycle, context) }), - }; -}; +// se_CopyAction omitted. -/** - * serializeAws_restJson1CopyActions - */ -const se_CopyActions = (input: CopyAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CopyAction(entry, context); - }); -}; +// se_CopyActions omitted. /** * serializeAws_restJson1DateRange */ const se_DateRange = (input: DateRange, context: __SerdeContext): any => { - return { - ...(input.FromDate != null && { FromDate: Math.round(input.FromDate.getTime() / 1000) }), - ...(input.ToDate != null && { ToDate: Math.round(input.ToDate.getTime() / 1000) }), - }; + return take(input, { + FromDate: (_) => Math.round(_.getTime() / 1000), + ToDate: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1FormatList - */ -const se_FormatList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FormatList omitted. -/** - * serializeAws_restJson1FrameworkControl - */ -const se_FrameworkControl = (input: FrameworkControl, context: __SerdeContext): any => { - return { - ...(input.ControlInputParameters != null && { - ControlInputParameters: se_ControlInputParameters(input.ControlInputParameters, context), - }), - ...(input.ControlName != null && { ControlName: input.ControlName }), - ...(input.ControlScope != null && { ControlScope: se_ControlScope(input.ControlScope, context) }), - }; -}; +// se_FrameworkControl omitted. -/** - * serializeAws_restJson1FrameworkControls - */ -const se_FrameworkControls = (input: FrameworkControl[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FrameworkControl(entry, context); - }); -}; +// se_FrameworkControls omitted. -/** - * serializeAws_restJson1GlobalSettings - */ -const se_GlobalSettings = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_GlobalSettings omitted. -/** - * serializeAws_restJson1Lifecycle - */ -const se_Lifecycle = (input: Lifecycle, context: __SerdeContext): any => { - return { - ...(input.DeleteAfterDays != null && { DeleteAfterDays: input.DeleteAfterDays }), - ...(input.MoveToColdStorageAfterDays != null && { MoveToColdStorageAfterDays: input.MoveToColdStorageAfterDays }), - }; -}; +// se_Lifecycle omitted. -/** - * serializeAws_restJson1ListOfTags - */ -const se_ListOfTags = (input: Condition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Condition(entry, context); - }); -}; +// se_ListOfTags omitted. -/** - * serializeAws_restJson1Metadata - */ -const se_Metadata = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Metadata omitted. /** * serializeAws_restJson1RecoveryPointSelection */ const se_RecoveryPointSelection = (input: RecoveryPointSelection, context: __SerdeContext): any => { - return { - ...(input.DateRange != null && { DateRange: se_DateRange(input.DateRange, context) }), - ...(input.ResourceIdentifiers != null && { - ResourceIdentifiers: se_ResourceIdentifiers(input.ResourceIdentifiers, context), - }), - ...(input.VaultNames != null && { VaultNames: se_VaultNames(input.VaultNames, context) }), - }; + return take(input, { + DateRange: (_) => se_DateRange(_, context), + ResourceIdentifiers: _json, + VaultNames: _json, + }); }; -/** - * serializeAws_restJson1ReportDeliveryChannel - */ -const se_ReportDeliveryChannel = (input: ReportDeliveryChannel, context: __SerdeContext): any => { - return { - ...(input.Formats != null && { Formats: se_FormatList(input.Formats, context) }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - }; -}; +// se_ReportDeliveryChannel omitted. -/** - * serializeAws_restJson1ReportSetting - */ -const se_ReportSetting = (input: ReportSetting, context: __SerdeContext): any => { - return { - ...(input.Accounts != null && { Accounts: se_stringList(input.Accounts, context) }), - ...(input.FrameworkArns != null && { FrameworkArns: se_stringList(input.FrameworkArns, context) }), - ...(input.NumberOfFrameworks != null && { NumberOfFrameworks: input.NumberOfFrameworks }), - ...(input.OrganizationUnits != null && { OrganizationUnits: se_stringList(input.OrganizationUnits, context) }), - ...(input.Regions != null && { Regions: se_stringList(input.Regions, context) }), - ...(input.ReportTemplate != null && { ReportTemplate: input.ReportTemplate }), - }; -}; +// se_ReportSetting omitted. -/** - * serializeAws_restJson1ResourceArns - */ -const se_ResourceArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceArns omitted. -/** - * serializeAws_restJson1ResourceIdentifiers - */ -const se_ResourceIdentifiers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceIdentifiers omitted. -/** - * serializeAws_restJson1ResourceTypeList - */ -const se_ResourceTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceTypeList omitted. -/** - * serializeAws_restJson1ResourceTypeManagementPreference - */ -const se_ResourceTypeManagementPreference = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ResourceTypeManagementPreference omitted. -/** - * serializeAws_restJson1ResourceTypeOptInPreference - */ -const se_ResourceTypeOptInPreference = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ResourceTypeOptInPreference omitted. -/** - * serializeAws_restJson1stringList - */ -const se_stringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_stringList omitted. -/** - * serializeAws_restJson1stringMap - */ -const se_stringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_stringMap omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1VaultNames - */ -const se_VaultNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VaultNames omitted. -/** - * deserializeAws_restJson1AdvancedBackupSetting - */ -const de_AdvancedBackupSetting = (output: any, context: __SerdeContext): AdvancedBackupSetting => { - return { - BackupOptions: output.BackupOptions != null ? de_BackupOptions(output.BackupOptions, context) : undefined, - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_AdvancedBackupSetting omitted. -/** - * deserializeAws_restJson1AdvancedBackupSettings - */ -const de_AdvancedBackupSettings = (output: any, context: __SerdeContext): AdvancedBackupSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdvancedBackupSetting(entry, context); - }); - return retVal; -}; +// de_AdvancedBackupSettings omitted. /** * deserializeAws_restJson1BackupJob */ const de_BackupJob = (output: any, context: __SerdeContext): BackupJob => { - return { - AccountId: __expectString(output.AccountId), - BackupJobId: __expectString(output.BackupJobId), - BackupOptions: output.BackupOptions != null ? de_BackupOptions(output.BackupOptions, context) : undefined, - BackupSizeInBytes: __expectLong(output.BackupSizeInBytes), - BackupType: __expectString(output.BackupType), - BackupVaultArn: __expectString(output.BackupVaultArn), - BackupVaultName: __expectString(output.BackupVaultName), - BytesTransferred: __expectLong(output.BytesTransferred), - CompletionDate: - output.CompletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate))) - : undefined, - CreatedBy: output.CreatedBy != null ? de_RecoveryPointCreator(output.CreatedBy, context) : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - ExpectedCompletionDate: - output.ExpectedCompletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpectedCompletionDate))) - : undefined, - IamRoleArn: __expectString(output.IamRoleArn), - IsParent: __expectBoolean(output.IsParent), - ParentJobId: __expectString(output.ParentJobId), - PercentDone: __expectString(output.PercentDone), - RecoveryPointArn: __expectString(output.RecoveryPointArn), - ResourceArn: __expectString(output.ResourceArn), - ResourceName: __expectString(output.ResourceName), - ResourceType: __expectString(output.ResourceType), - StartBy: - output.StartBy != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartBy))) : undefined, - State: __expectString(output.State), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1BackupJobChildJobsInState - */ -const de_BackupJobChildJobsInState = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [BackupJobState | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; + return take(output, { + AccountId: __expectString, + BackupJobId: __expectString, + BackupOptions: _json, + BackupSizeInBytes: __expectLong, + BackupType: __expectString, + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + BytesTransferred: __expectLong, + CompletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpectedCompletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IamRoleArn: __expectString, + IsParent: __expectBoolean, + ParentJobId: __expectString, + PercentDone: __expectString, + RecoveryPointArn: __expectString, + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + StartBy: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StatusMessage: __expectString, + }) as any; +}; + +// de_BackupJobChildJobsInState omitted. /** * deserializeAws_restJson1BackupJobsList @@ -7916,40 +7130,14 @@ const de_BackupJobsList = (output: any, context: __SerdeContext): BackupJob[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackupJob(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1BackupOptions - */ -const de_BackupOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_BackupOptions omitted. -/** - * deserializeAws_restJson1BackupPlan - */ -const de_BackupPlan = (output: any, context: __SerdeContext): BackupPlan => { - return { - AdvancedBackupSettings: - output.AdvancedBackupSettings != null - ? de_AdvancedBackupSettings(output.AdvancedBackupSettings, context) - : undefined, - BackupPlanName: __expectString(output.BackupPlanName), - Rules: output.Rules != null ? de_BackupRules(output.Rules, context) : undefined, - } as any; -}; +// de_BackupPlan omitted. /** * deserializeAws_restJson1BackupPlansList @@ -7958,9 +7146,6 @@ const de_BackupPlansList = (output: any, context: __SerdeContext): BackupPlansLi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackupPlansListMember(entry, context); }); return retVal; @@ -7970,55 +7155,22 @@ const de_BackupPlansList = (output: any, context: __SerdeContext): BackupPlansLi * deserializeAws_restJson1BackupPlansListMember */ const de_BackupPlansListMember = (output: any, context: __SerdeContext): BackupPlansListMember => { - return { - AdvancedBackupSettings: - output.AdvancedBackupSettings != null - ? de_AdvancedBackupSettings(output.AdvancedBackupSettings, context) - : undefined, - BackupPlanArn: __expectString(output.BackupPlanArn), - BackupPlanId: __expectString(output.BackupPlanId), - BackupPlanName: __expectString(output.BackupPlanName), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - CreatorRequestId: __expectString(output.CreatorRequestId), - DeletionDate: - output.DeletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletionDate))) - : undefined, - LastExecutionDate: - output.LastExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastExecutionDate))) - : undefined, - VersionId: __expectString(output.VersionId), - } as any; -}; - -/** - * deserializeAws_restJson1BackupPlanTemplatesList - */ -const de_BackupPlanTemplatesList = (output: any, context: __SerdeContext): BackupPlanTemplatesListMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BackupPlanTemplatesListMember(entry, context); - }); - return retVal; + return take(output, { + AdvancedBackupSettings: _json, + BackupPlanArn: __expectString, + BackupPlanId: __expectString, + BackupPlanName: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BackupPlanTemplatesListMember - */ -const de_BackupPlanTemplatesListMember = (output: any, context: __SerdeContext): BackupPlanTemplatesListMember => { - return { - BackupPlanTemplateId: __expectString(output.BackupPlanTemplateId), - BackupPlanTemplateName: __expectString(output.BackupPlanTemplateName), - } as any; -}; +// de_BackupPlanTemplatesList omitted. + +// de_BackupPlanTemplatesListMember omitted. /** * deserializeAws_restJson1BackupPlanVersionsList @@ -8027,60 +7179,16 @@ const de_BackupPlanVersionsList = (output: any, context: __SerdeContext): Backup const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackupPlansListMember(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1BackupRule - */ -const de_BackupRule = (output: any, context: __SerdeContext): BackupRule => { - return { - CompletionWindowMinutes: __expectLong(output.CompletionWindowMinutes), - CopyActions: output.CopyActions != null ? de_CopyActions(output.CopyActions, context) : undefined, - EnableContinuousBackup: __expectBoolean(output.EnableContinuousBackup), - Lifecycle: output.Lifecycle != null ? de_Lifecycle(output.Lifecycle, context) : undefined, - RecoveryPointTags: output.RecoveryPointTags != null ? de_Tags(output.RecoveryPointTags, context) : undefined, - RuleId: __expectString(output.RuleId), - RuleName: __expectString(output.RuleName), - ScheduleExpression: __expectString(output.ScheduleExpression), - StartWindowMinutes: __expectLong(output.StartWindowMinutes), - TargetBackupVaultName: __expectString(output.TargetBackupVaultName), - } as any; -}; +// de_BackupRule omitted. -/** - * deserializeAws_restJson1BackupRules - */ -const de_BackupRules = (output: any, context: __SerdeContext): BackupRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BackupRule(entry, context); - }); - return retVal; -}; +// de_BackupRules omitted. -/** - * deserializeAws_restJson1BackupSelection - */ -const de_BackupSelection = (output: any, context: __SerdeContext): BackupSelection => { - return { - Conditions: output.Conditions != null ? de_Conditions(output.Conditions, context) : undefined, - IamRoleArn: __expectString(output.IamRoleArn), - ListOfTags: output.ListOfTags != null ? de_ListOfTags(output.ListOfTags, context) : undefined, - NotResources: output.NotResources != null ? de_ResourceArns(output.NotResources, context) : undefined, - Resources: output.Resources != null ? de_ResourceArns(output.Resources, context) : undefined, - SelectionName: __expectString(output.SelectionName), - } as any; -}; +// de_BackupSelection omitted. /** * deserializeAws_restJson1BackupSelectionsList @@ -8089,9 +7197,6 @@ const de_BackupSelectionsList = (output: any, context: __SerdeContext): BackupSe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackupSelectionsListMember(entry, context); }); return retVal; @@ -8101,33 +7206,17 @@ const de_BackupSelectionsList = (output: any, context: __SerdeContext): BackupSe * deserializeAws_restJson1BackupSelectionsListMember */ const de_BackupSelectionsListMember = (output: any, context: __SerdeContext): BackupSelectionsListMember => { - return { - BackupPlanId: __expectString(output.BackupPlanId), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - CreatorRequestId: __expectString(output.CreatorRequestId), - IamRoleArn: __expectString(output.IamRoleArn), - SelectionId: __expectString(output.SelectionId), - SelectionName: __expectString(output.SelectionName), - } as any; + return take(output, { + BackupPlanId: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + IamRoleArn: __expectString, + SelectionId: __expectString, + SelectionName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BackupVaultEvents - */ -const de_BackupVaultEvents = (output: any, context: __SerdeContext): (BackupVaultEvent | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_BackupVaultEvents omitted. /** * deserializeAws_restJson1BackupVaultList @@ -8136,9 +7225,6 @@ const de_BackupVaultList = (output: any, context: __SerdeContext): BackupVaultLi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackupVaultListMember(entry, context); }); return retVal; @@ -8148,215 +7234,80 @@ const de_BackupVaultList = (output: any, context: __SerdeContext): BackupVaultLi * deserializeAws_restJson1BackupVaultListMember */ const de_BackupVaultListMember = (output: any, context: __SerdeContext): BackupVaultListMember => { - return { - BackupVaultArn: __expectString(output.BackupVaultArn), - BackupVaultName: __expectString(output.BackupVaultName), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - CreatorRequestId: __expectString(output.CreatorRequestId), - EncryptionKeyArn: __expectString(output.EncryptionKeyArn), - LockDate: - output.LockDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LockDate))) : undefined, - Locked: __expectBoolean(output.Locked), - MaxRetentionDays: __expectLong(output.MaxRetentionDays), - MinRetentionDays: __expectLong(output.MinRetentionDays), - NumberOfRecoveryPoints: __expectLong(output.NumberOfRecoveryPoints), - } as any; + return take(output, { + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + EncryptionKeyArn: __expectString, + LockDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Locked: __expectBoolean, + MaxRetentionDays: __expectLong, + MinRetentionDays: __expectLong, + NumberOfRecoveryPoints: __expectLong, + }) as any; }; /** * deserializeAws_restJson1CalculatedLifecycle */ const de_CalculatedLifecycle = (output: any, context: __SerdeContext): CalculatedLifecycle => { - return { - DeleteAt: - output.DeleteAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeleteAt))) : undefined, - MoveToColdStorageAt: - output.MoveToColdStorageAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.MoveToColdStorageAt))) - : undefined, - } as any; + return take(output, { + DeleteAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MoveToColdStorageAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1ComplianceResourceIdList - */ -const de_ComplianceResourceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ComplianceResourceIdList omitted. -/** - * deserializeAws_restJson1Condition - */ -const de_Condition = (output: any, context: __SerdeContext): Condition => { - return { - ConditionKey: __expectString(output.ConditionKey), - ConditionType: __expectString(output.ConditionType), - ConditionValue: __expectString(output.ConditionValue), - } as any; -}; +// de_Condition omitted. -/** - * deserializeAws_restJson1ConditionParameter - */ -const de_ConditionParameter = (output: any, context: __SerdeContext): ConditionParameter => { - return { - ConditionKey: __expectString(output.ConditionKey), - ConditionValue: __expectString(output.ConditionValue), - } as any; -}; +// de_ConditionParameter omitted. -/** - * deserializeAws_restJson1ConditionParameters - */ -const de_ConditionParameters = (output: any, context: __SerdeContext): ConditionParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConditionParameter(entry, context); - }); - return retVal; -}; +// de_ConditionParameters omitted. -/** - * deserializeAws_restJson1Conditions - */ -const de_Conditions = (output: any, context: __SerdeContext): Conditions => { - return { - StringEquals: output.StringEquals != null ? de_ConditionParameters(output.StringEquals, context) : undefined, - StringLike: output.StringLike != null ? de_ConditionParameters(output.StringLike, context) : undefined, - StringNotEquals: - output.StringNotEquals != null ? de_ConditionParameters(output.StringNotEquals, context) : undefined, - StringNotLike: output.StringNotLike != null ? de_ConditionParameters(output.StringNotLike, context) : undefined, - } as any; -}; +// de_Conditions omitted. -/** - * deserializeAws_restJson1ControlInputParameter - */ -const de_ControlInputParameter = (output: any, context: __SerdeContext): ControlInputParameter => { - return { - ParameterName: __expectString(output.ParameterName), - ParameterValue: __expectString(output.ParameterValue), - } as any; -}; +// de_ControlInputParameter omitted. -/** - * deserializeAws_restJson1ControlInputParameters - */ -const de_ControlInputParameters = (output: any, context: __SerdeContext): ControlInputParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ControlInputParameter(entry, context); - }); - return retVal; -}; +// de_ControlInputParameters omitted. -/** - * deserializeAws_restJson1ControlScope - */ -const de_ControlScope = (output: any, context: __SerdeContext): ControlScope => { - return { - ComplianceResourceIds: - output.ComplianceResourceIds != null - ? de_ComplianceResourceIdList(output.ComplianceResourceIds, context) - : undefined, - ComplianceResourceTypes: - output.ComplianceResourceTypes != null ? de_ResourceTypeList(output.ComplianceResourceTypes, context) : undefined, - Tags: output.Tags != null ? de_stringMap(output.Tags, context) : undefined, - } as any; -}; +// de_ControlScope omitted. -/** - * deserializeAws_restJson1CopyAction - */ -const de_CopyAction = (output: any, context: __SerdeContext): CopyAction => { - return { - DestinationBackupVaultArn: __expectString(output.DestinationBackupVaultArn), - Lifecycle: output.Lifecycle != null ? de_Lifecycle(output.Lifecycle, context) : undefined, - } as any; -}; +// de_CopyAction omitted. -/** - * deserializeAws_restJson1CopyActions - */ -const de_CopyActions = (output: any, context: __SerdeContext): CopyAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CopyAction(entry, context); - }); - return retVal; -}; +// de_CopyActions omitted. /** * deserializeAws_restJson1CopyJob */ const de_CopyJob = (output: any, context: __SerdeContext): CopyJob => { - return { - AccountId: __expectString(output.AccountId), - BackupSizeInBytes: __expectLong(output.BackupSizeInBytes), - ChildJobsInState: - output.ChildJobsInState != null ? de_CopyJobChildJobsInState(output.ChildJobsInState, context) : undefined, - CompletionDate: - output.CompletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate))) - : undefined, - CompositeMemberIdentifier: __expectString(output.CompositeMemberIdentifier), - CopyJobId: __expectString(output.CopyJobId), - CreatedBy: output.CreatedBy != null ? de_RecoveryPointCreator(output.CreatedBy, context) : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - DestinationBackupVaultArn: __expectString(output.DestinationBackupVaultArn), - DestinationRecoveryPointArn: __expectString(output.DestinationRecoveryPointArn), - IamRoleArn: __expectString(output.IamRoleArn), - IsParent: __expectBoolean(output.IsParent), - NumberOfChildJobs: __expectLong(output.NumberOfChildJobs), - ParentJobId: __expectString(output.ParentJobId), - ResourceArn: __expectString(output.ResourceArn), - ResourceName: __expectString(output.ResourceName), - ResourceType: __expectString(output.ResourceType), - SourceBackupVaultArn: __expectString(output.SourceBackupVaultArn), - SourceRecoveryPointArn: __expectString(output.SourceRecoveryPointArn), - State: __expectString(output.State), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1CopyJobChildJobsInState - */ -const de_CopyJobChildJobsInState = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [CopyJobState | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; + return take(output, { + AccountId: __expectString, + BackupSizeInBytes: __expectLong, + ChildJobsInState: _json, + CompletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompositeMemberIdentifier: __expectString, + CopyJobId: __expectString, + CreatedBy: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DestinationBackupVaultArn: __expectString, + DestinationRecoveryPointArn: __expectString, + IamRoleArn: __expectString, + IsParent: __expectBoolean, + NumberOfChildJobs: __expectLong, + ParentJobId: __expectString, + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + SourceBackupVaultArn: __expectString, + SourceRecoveryPointArn: __expectString, + State: __expectString, + StatusMessage: __expectString, + }) as any; +}; + +// de_CopyJobChildJobsInState omitted. /** * deserializeAws_restJson1CopyJobsList @@ -8365,9 +7316,6 @@ const de_CopyJobsList = (output: any, context: __SerdeContext): CopyJob[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CopyJob(entry, context); }); return retVal; @@ -8377,73 +7325,31 @@ const de_CopyJobsList = (output: any, context: __SerdeContext): CopyJob[] => { * deserializeAws_restJson1DateRange */ const de_DateRange = (output: any, context: __SerdeContext): DateRange => { - return { - FromDate: - output.FromDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FromDate))) : undefined, - ToDate: output.ToDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ToDate))) : undefined, - } as any; + return take(output, { + FromDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ToDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1FormatList - */ -const de_FormatList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FormatList omitted. /** * deserializeAws_restJson1Framework */ const de_Framework = (output: any, context: __SerdeContext): Framework => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DeploymentStatus: __expectString(output.DeploymentStatus), - FrameworkArn: __expectString(output.FrameworkArn), - FrameworkDescription: __expectString(output.FrameworkDescription), - FrameworkName: __expectString(output.FrameworkName), - NumberOfControls: __expectInt32(output.NumberOfControls), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeploymentStatus: __expectString, + FrameworkArn: __expectString, + FrameworkDescription: __expectString, + FrameworkName: __expectString, + NumberOfControls: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1FrameworkControl - */ -const de_FrameworkControl = (output: any, context: __SerdeContext): FrameworkControl => { - return { - ControlInputParameters: - output.ControlInputParameters != null - ? de_ControlInputParameters(output.ControlInputParameters, context) - : undefined, - ControlName: __expectString(output.ControlName), - ControlScope: output.ControlScope != null ? de_ControlScope(output.ControlScope, context) : undefined, - } as any; -}; +// de_FrameworkControl omitted. -/** - * deserializeAws_restJson1FrameworkControls - */ -const de_FrameworkControls = (output: any, context: __SerdeContext): FrameworkControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FrameworkControl(entry, context); - }); - return retVal; -}; +// de_FrameworkControls omitted. /** * deserializeAws_restJson1FrameworkList @@ -8452,46 +7358,26 @@ const de_FrameworkList = (output: any, context: __SerdeContext): Framework[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Framework(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1GlobalSettings - */ -const de_GlobalSettings = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_GlobalSettings omitted. /** * deserializeAws_restJson1LegalHold */ const de_LegalHold = (output: any, context: __SerdeContext): LegalHold => { - return { - CancellationDate: - output.CancellationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CancellationDate))) - : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - Description: __expectString(output.Description), - LegalHoldArn: __expectString(output.LegalHoldArn), - LegalHoldId: __expectString(output.LegalHoldId), - Status: __expectString(output.Status), - Title: __expectString(output.Title), - } as any; + return take(output, { + CancellationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LegalHoldArn: __expectString, + LegalHoldId: __expectString, + Status: __expectString, + Title: __expectString, + }) as any; }; /** @@ -8501,65 +7387,27 @@ const de_LegalHoldsList = (output: any, context: __SerdeContext): LegalHold[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LegalHold(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Lifecycle - */ -const de_Lifecycle = (output: any, context: __SerdeContext): Lifecycle => { - return { - DeleteAfterDays: __expectLong(output.DeleteAfterDays), - MoveToColdStorageAfterDays: __expectLong(output.MoveToColdStorageAfterDays), - } as any; -}; +// de_Lifecycle omitted. -/** - * deserializeAws_restJson1ListOfTags - */ -const de_ListOfTags = (output: any, context: __SerdeContext): Condition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Condition(entry, context); - }); - return retVal; -}; +// de_ListOfTags omitted. -/** - * deserializeAws_restJson1Metadata - */ -const de_Metadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Metadata omitted. /** * deserializeAws_restJson1ProtectedResource */ const de_ProtectedResource = (output: any, context: __SerdeContext): ProtectedResource => { - return { - LastBackupTime: - output.LastBackupTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastBackupTime))) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - ResourceName: __expectString(output.ResourceName), - ResourceType: __expectString(output.ResourceType), - } as any; + return take(output, { + LastBackupTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + }) as any; }; /** @@ -8569,9 +7417,6 @@ const de_ProtectedResourcesList = (output: any, context: __SerdeContext): Protec const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProtectedResource(entry, context); }); return retVal; @@ -8581,40 +7426,30 @@ const de_ProtectedResourcesList = (output: any, context: __SerdeContext): Protec * deserializeAws_restJson1RecoveryPointByBackupVault */ const de_RecoveryPointByBackupVault = (output: any, context: __SerdeContext): RecoveryPointByBackupVault => { - return { - BackupSizeInBytes: __expectLong(output.BackupSizeInBytes), - BackupVaultArn: __expectString(output.BackupVaultArn), - BackupVaultName: __expectString(output.BackupVaultName), - CalculatedLifecycle: - output.CalculatedLifecycle != null ? de_CalculatedLifecycle(output.CalculatedLifecycle, context) : undefined, - CompletionDate: - output.CompletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate))) - : undefined, - CompositeMemberIdentifier: __expectString(output.CompositeMemberIdentifier), - CreatedBy: output.CreatedBy != null ? de_RecoveryPointCreator(output.CreatedBy, context) : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - EncryptionKeyArn: __expectString(output.EncryptionKeyArn), - IamRoleArn: __expectString(output.IamRoleArn), - IsEncrypted: __expectBoolean(output.IsEncrypted), - IsParent: __expectBoolean(output.IsParent), - LastRestoreTime: - output.LastRestoreTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRestoreTime))) - : undefined, - Lifecycle: output.Lifecycle != null ? de_Lifecycle(output.Lifecycle, context) : undefined, - ParentRecoveryPointArn: __expectString(output.ParentRecoveryPointArn), - RecoveryPointArn: __expectString(output.RecoveryPointArn), - ResourceArn: __expectString(output.ResourceArn), - ResourceName: __expectString(output.ResourceName), - ResourceType: __expectString(output.ResourceType), - SourceBackupVaultArn: __expectString(output.SourceBackupVaultArn), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + BackupSizeInBytes: __expectLong, + BackupVaultArn: __expectString, + BackupVaultName: __expectString, + CalculatedLifecycle: (_: any) => de_CalculatedLifecycle(_, context), + CompletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompositeMemberIdentifier: __expectString, + CreatedBy: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EncryptionKeyArn: __expectString, + IamRoleArn: __expectString, + IsEncrypted: __expectBoolean, + IsParent: __expectBoolean, + LastRestoreTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Lifecycle: _json, + ParentRecoveryPointArn: __expectString, + RecoveryPointArn: __expectString, + ResourceArn: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + SourceBackupVaultArn: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -8624,9 +7459,6 @@ const de_RecoveryPointByBackupVaultList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecoveryPointByBackupVault(entry, context); }); return retVal; @@ -8636,21 +7468,18 @@ const de_RecoveryPointByBackupVaultList = (output: any, context: __SerdeContext) * deserializeAws_restJson1RecoveryPointByResource */ const de_RecoveryPointByResource = (output: any, context: __SerdeContext): RecoveryPointByResource => { - return { - BackupSizeBytes: __expectLong(output.BackupSizeBytes), - BackupVaultName: __expectString(output.BackupVaultName), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - EncryptionKeyArn: __expectString(output.EncryptionKeyArn), - IsParent: __expectBoolean(output.IsParent), - ParentRecoveryPointArn: __expectString(output.ParentRecoveryPointArn), - RecoveryPointArn: __expectString(output.RecoveryPointArn), - ResourceName: __expectString(output.ResourceName), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + BackupSizeBytes: __expectLong, + BackupVaultName: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EncryptionKeyArn: __expectString, + IsParent: __expectBoolean, + ParentRecoveryPointArn: __expectString, + RecoveryPointArn: __expectString, + ResourceName: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -8660,104 +7489,46 @@ const de_RecoveryPointByResourceList = (output: any, context: __SerdeContext): R const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecoveryPointByResource(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RecoveryPointCreator - */ -const de_RecoveryPointCreator = (output: any, context: __SerdeContext): RecoveryPointCreator => { - return { - BackupPlanArn: __expectString(output.BackupPlanArn), - BackupPlanId: __expectString(output.BackupPlanId), - BackupPlanVersion: __expectString(output.BackupPlanVersion), - BackupRuleId: __expectString(output.BackupRuleId), - } as any; -}; +// de_RecoveryPointCreator omitted. -/** - * deserializeAws_restJson1RecoveryPointMember - */ -const de_RecoveryPointMember = (output: any, context: __SerdeContext): RecoveryPointMember => { - return { - RecoveryPointArn: __expectString(output.RecoveryPointArn), - } as any; -}; +// de_RecoveryPointMember omitted. /** * deserializeAws_restJson1RecoveryPointSelection */ const de_RecoveryPointSelection = (output: any, context: __SerdeContext): RecoveryPointSelection => { - return { - DateRange: output.DateRange != null ? de_DateRange(output.DateRange, context) : undefined, - ResourceIdentifiers: - output.ResourceIdentifiers != null ? de_ResourceIdentifiers(output.ResourceIdentifiers, context) : undefined, - VaultNames: output.VaultNames != null ? de_VaultNames(output.VaultNames, context) : undefined, - } as any; + return take(output, { + DateRange: (_: any) => de_DateRange(_, context), + ResourceIdentifiers: _json, + VaultNames: _json, + }) as any; }; -/** - * deserializeAws_restJson1RecoveryPointsList - */ -const de_RecoveryPointsList = (output: any, context: __SerdeContext): RecoveryPointMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoveryPointMember(entry, context); - }); - return retVal; -}; +// de_RecoveryPointsList omitted. -/** - * deserializeAws_restJson1ReportDeliveryChannel - */ -const de_ReportDeliveryChannel = (output: any, context: __SerdeContext): ReportDeliveryChannel => { - return { - Formats: output.Formats != null ? de_FormatList(output.Formats, context) : undefined, - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - } as any; -}; +// de_ReportDeliveryChannel omitted. -/** - * deserializeAws_restJson1ReportDestination - */ -const de_ReportDestination = (output: any, context: __SerdeContext): ReportDestination => { - return { - S3BucketName: __expectString(output.S3BucketName), - S3Keys: output.S3Keys != null ? de_stringList(output.S3Keys, context) : undefined, - } as any; -}; +// de_ReportDestination omitted. /** * deserializeAws_restJson1ReportJob */ const de_ReportJob = (output: any, context: __SerdeContext): ReportJob => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ReportDestination: - output.ReportDestination != null ? de_ReportDestination(output.ReportDestination, context) : undefined, - ReportJobId: __expectString(output.ReportJobId), - ReportPlanArn: __expectString(output.ReportPlanArn), - ReportTemplate: __expectString(output.ReportTemplate), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReportDestination: _json, + ReportJobId: __expectString, + ReportPlanArn: __expectString, + ReportTemplate: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -8767,9 +7538,6 @@ const de_ReportJobList = (output: any, context: __SerdeContext): ReportJob[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReportJob(entry, context); }); return retVal; @@ -8779,29 +7547,17 @@ const de_ReportJobList = (output: any, context: __SerdeContext): ReportJob[] => * deserializeAws_restJson1ReportPlan */ const de_ReportPlan = (output: any, context: __SerdeContext): ReportPlan => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DeploymentStatus: __expectString(output.DeploymentStatus), - LastAttemptedExecutionTime: - output.LastAttemptedExecutionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAttemptedExecutionTime))) - : undefined, - LastSuccessfulExecutionTime: - output.LastSuccessfulExecutionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulExecutionTime))) - : undefined, - ReportDeliveryChannel: - output.ReportDeliveryChannel != null - ? de_ReportDeliveryChannel(output.ReportDeliveryChannel, context) - : undefined, - ReportPlanArn: __expectString(output.ReportPlanArn), - ReportPlanDescription: __expectString(output.ReportPlanDescription), - ReportPlanName: __expectString(output.ReportPlanName), - ReportSetting: output.ReportSetting != null ? de_ReportSetting(output.ReportSetting, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeploymentStatus: __expectString, + LastAttemptedExecutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuccessfulExecutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReportDeliveryChannel: _json, + ReportPlanArn: __expectString, + ReportPlanDescription: __expectString, + ReportPlanName: __expectString, + ReportSetting: _json, + }) as any; }; /** @@ -8811,113 +7567,24 @@ const de_ReportPlanList = (output: any, context: __SerdeContext): ReportPlan[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReportPlan(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ReportSetting - */ -const de_ReportSetting = (output: any, context: __SerdeContext): ReportSetting => { - return { - Accounts: output.Accounts != null ? de_stringList(output.Accounts, context) : undefined, - FrameworkArns: output.FrameworkArns != null ? de_stringList(output.FrameworkArns, context) : undefined, - NumberOfFrameworks: __expectInt32(output.NumberOfFrameworks), - OrganizationUnits: output.OrganizationUnits != null ? de_stringList(output.OrganizationUnits, context) : undefined, - Regions: output.Regions != null ? de_stringList(output.Regions, context) : undefined, - ReportTemplate: __expectString(output.ReportTemplate), - } as any; -}; +// de_ReportSetting omitted. -/** - * deserializeAws_restJson1ResourceArns - */ -const de_ResourceArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceArns omitted. -/** - * deserializeAws_restJson1ResourceIdentifiers - */ -const de_ResourceIdentifiers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceIdentifiers omitted. -/** - * deserializeAws_restJson1ResourceTypeList - */ -const de_ResourceTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceTypeList omitted. -/** - * deserializeAws_restJson1ResourceTypeManagementPreference - */ -const de_ResourceTypeManagementPreference = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectBoolean(value) as any; - return acc; - }, {}); -}; +// de_ResourceTypeManagementPreference omitted. -/** - * deserializeAws_restJson1ResourceTypeOptInPreference - */ -const de_ResourceTypeOptInPreference = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectBoolean(value) as any; - return acc; - }, {}); -}; +// de_ResourceTypeOptInPreference omitted. -/** - * deserializeAws_restJson1ResourceTypes - */ -const de_ResourceTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceTypes omitted. /** * deserializeAws_restJson1RestoreJobsList @@ -8926,9 +7593,6 @@ const de_RestoreJobsList = (output: any, context: __SerdeContext): RestoreJobsLi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RestoreJobsListMember(entry, context); }); return retVal; @@ -8938,84 +7602,30 @@ const de_RestoreJobsList = (output: any, context: __SerdeContext): RestoreJobsLi * deserializeAws_restJson1RestoreJobsListMember */ const de_RestoreJobsListMember = (output: any, context: __SerdeContext): RestoreJobsListMember => { - return { - AccountId: __expectString(output.AccountId), - BackupSizeInBytes: __expectLong(output.BackupSizeInBytes), - CompletionDate: - output.CompletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate))) - : undefined, - CreatedResourceArn: __expectString(output.CreatedResourceArn), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - ExpectedCompletionTimeMinutes: __expectLong(output.ExpectedCompletionTimeMinutes), - IamRoleArn: __expectString(output.IamRoleArn), - PercentDone: __expectString(output.PercentDone), - RecoveryPointArn: __expectString(output.RecoveryPointArn), - ResourceType: __expectString(output.ResourceType), - RestoreJobId: __expectString(output.RestoreJobId), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1stringList - */ -const de_stringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1stringMap - */ -const de_stringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1VaultNames - */ -const de_VaultNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + AccountId: __expectString, + BackupSizeInBytes: __expectLong, + CompletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedResourceArn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpectedCompletionTimeMinutes: __expectLong, + IamRoleArn: __expectString, + PercentDone: __expectString, + RecoveryPointArn: __expectString, + ResourceType: __expectString, + RestoreJobId: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; +}; + +// de_stringList omitted. + +// de_stringMap omitted. + +// de_Tags omitted. + +// de_VaultNames omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-backupstorage/src/protocols/Aws_restJson1.ts b/clients/client-backupstorage/src/protocols/Aws_restJson1.ts index 9cc36f28c111..0953a9895b90 100644 --- a/clients/client-backupstorage/src/protocols/Aws_restJson1.ts +++ b/clients/client-backupstorage/src/protocols/Aws_restJson1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -34,8 +35,6 @@ import { StartObjectCommandInput, StartObjectCommandOutput } from "../commands/S import { BackupStorageServiceException as __BaseException } from "../models/BackupStorageServiceException"; import { AccessDeniedException, - BackupObject, - Chunk, DataAlreadyExistsException, IllegalArgumentException, KMSInvalidKeyUsageException, @@ -369,9 +368,11 @@ export const se_StartObjectCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "BackupJobId", () => input.BackupJobId!, "{BackupJobId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ObjectName", () => input.ObjectName!, "{ObjectName}", false); let body: any; - body = JSON.stringify({ - ...(input.ThrowOnDuplicate != null && { ThrowOnDuplicate: input.ThrowOnDuplicate }), - }); + body = JSON.stringify( + take(input, { + ThrowOnDuplicate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -436,10 +437,9 @@ const de_DeleteObjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -506,10 +506,9 @@ const de_GetChunkCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -580,10 +579,9 @@ const de_GetObjectMetadataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -603,12 +601,11 @@ export const de_ListChunksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChunkList != null) { - contents.ChunkList = de_ChunkList(data.ChunkList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChunkList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -645,10 +642,9 @@ const de_ListChunksCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -668,12 +664,11 @@ export const de_ListObjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ObjectList != null) { - contents.ObjectList = de_ObjectList(data.ObjectList, context); - } + const doc = take(data, { + NextToken: __expectString, + ObjectList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -716,10 +711,9 @@ const de_ListObjectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -739,12 +733,11 @@ export const de_NotifyObjectCompleteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ObjectChecksum != null) { - contents.ObjectChecksum = __expectString(data.ObjectChecksum); - } - if (data.ObjectChecksumAlgorithm != null) { - contents.ObjectChecksumAlgorithm = __expectString(data.ObjectChecksumAlgorithm); - } + const doc = take(data, { + ObjectChecksum: __expectString, + ObjectChecksumAlgorithm: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -787,10 +780,9 @@ const de_NotifyObjectCompleteCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -810,12 +802,11 @@ export const de_PutChunkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChunkChecksum != null) { - contents.ChunkChecksum = __expectString(data.ChunkChecksum); - } - if (data.ChunkChecksumAlgorithm != null) { - contents.ChunkChecksumAlgorithm = __expectString(data.ChunkChecksumAlgorithm); - } + const doc = take(data, { + ChunkChecksum: __expectString, + ChunkChecksumAlgorithm: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -858,10 +849,9 @@ const de_PutChunkCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -881,18 +871,13 @@ export const de_PutObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InlineChunkChecksum != null) { - contents.InlineChunkChecksum = __expectString(data.InlineChunkChecksum); - } - if (data.InlineChunkChecksumAlgorithm != null) { - contents.InlineChunkChecksumAlgorithm = __expectString(data.InlineChunkChecksumAlgorithm); - } - if (data.ObjectChecksum != null) { - contents.ObjectChecksum = __expectString(data.ObjectChecksum); - } - if (data.ObjectChecksumAlgorithm != null) { - contents.ObjectChecksumAlgorithm = __expectString(data.ObjectChecksumAlgorithm); - } + const doc = take(data, { + InlineChunkChecksum: __expectString, + InlineChunkChecksumAlgorithm: __expectString, + ObjectChecksum: __expectString, + ObjectChecksumAlgorithm: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -935,10 +920,9 @@ const de_PutObjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -958,9 +942,10 @@ export const de_StartObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UploadId != null) { - contents.UploadId = __expectString(data.UploadId); - } + const doc = take(data, { + UploadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1003,16 +988,15 @@ const de_StartObjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1022,9 +1006,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1041,15 +1026,12 @@ const de_DataAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Checksum != null) { - contents.Checksum = __expectString(data.Checksum); - } - if (data.ChecksumAlgorithm != null) { - contents.ChecksumAlgorithm = __expectString(data.ChecksumAlgorithm); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Checksum: __expectString, + ChecksumAlgorithm: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DataAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1066,9 +1048,10 @@ const de_IllegalArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IllegalArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1085,9 +1068,10 @@ const de_KMSInvalidKeyUsageExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new KMSInvalidKeyUsageException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1104,9 +1088,10 @@ const de_NotReadableInputStreamExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotReadableInputStreamException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1123,9 +1108,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1139,9 +1125,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_RetryableExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new RetryableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1158,9 +1145,10 @@ const de_ServiceInternalExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceInternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1177,9 +1165,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1193,9 +1182,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1203,62 +1193,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1BackupObject - */ -const de_BackupObject = (output: any, context: __SerdeContext): BackupObject => { - return { - ChunksCount: __expectLong(output.ChunksCount), - MetadataString: __expectString(output.MetadataString), - Name: __expectString(output.Name), - ObjectChecksum: __expectString(output.ObjectChecksum), - ObjectChecksumAlgorithm: __expectString(output.ObjectChecksumAlgorithm), - ObjectToken: __expectString(output.ObjectToken), - } as any; -}; +// de_BackupObject omitted. -/** - * deserializeAws_restJson1Chunk - */ -const de_Chunk = (output: any, context: __SerdeContext): Chunk => { - return { - Checksum: __expectString(output.Checksum), - ChecksumAlgorithm: __expectString(output.ChecksumAlgorithm), - ChunkToken: __expectString(output.ChunkToken), - Index: __expectLong(output.Index), - Length: __expectLong(output.Length), - } as any; -}; +// de_Chunk omitted. -/** - * deserializeAws_restJson1ChunkList - */ -const de_ChunkList = (output: any, context: __SerdeContext): Chunk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Chunk(entry, context); - }); - return retVal; -}; +// de_ChunkList omitted. -/** - * deserializeAws_restJson1ObjectList - */ -const de_ObjectList = (output: any, context: __SerdeContext): BackupObject[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BackupObject(entry, context); - }); - return retVal; -}; +// de_ObjectList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-batch/src/protocols/Aws_restJson1.ts b/clients/client-batch/src/protocols/Aws_restJson1.ts index c7faa426e755..3c801a288d93 100644 --- a/clients/client-batch/src/protocols/Aws_restJson1.ts +++ b/clients/client-batch/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -87,29 +87,19 @@ import { import { BatchServiceException as __BaseException } from "../models/BatchServiceException"; import { ArrayProperties, - ArrayPropertiesDetail, - ArrayPropertiesSummary, - AttemptContainerDetail, - AttemptDetail, ClientException, - ComputeEnvironmentDetail, ComputeEnvironmentOrder, ComputeResource, ComputeResourceUpdate, - ContainerDetail, ContainerOverrides, ContainerProperties, - ContainerSummary, Device, DeviceCgroupPermission, Ec2Configuration, EFSAuthorizationConfig, EFSVolumeConfiguration, - EksAttemptContainerDetail, - EksAttemptDetail, EksConfiguration, EksContainer, - EksContainerDetail, EksContainerEnvironmentVariable, EksContainerOverride, EksContainerResourceRequirements, @@ -119,10 +109,8 @@ import { EksHostPath, EksMetadata, EksPodProperties, - EksPodPropertiesDetail, EksPodPropertiesOverride, EksProperties, - EksPropertiesDetail, EksPropertiesOverride, EksSecret, EksVolume, @@ -131,11 +119,7 @@ import { FairsharePolicy, FargatePlatformConfiguration, Host, - JobDefinition, JobDependency, - JobDetail, - JobQueueDetail, - JobSummary, JobTimeout, KeyValuePair, KeyValuesPair, @@ -144,18 +128,14 @@ import { LogConfiguration, MountPoint, NetworkConfiguration, - NetworkInterface, - NodeDetails, NodeOverrides, NodeProperties, - NodePropertiesSummary, NodePropertyOverride, NodeRangeProperty, PlatformCapability, ResourceRequirement, RetryStrategy, SchedulingPolicyDetail, - SchedulingPolicyListingDetail, Secret, ServerException, ShareAttributes, @@ -178,10 +158,12 @@ export const se_CancelJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/canceljob"; let body: any; - body = JSON.stringify({ - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + jobId: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -207,16 +189,18 @@ export const se_CreateComputeEnvironmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createcomputeenvironment"; let body: any; - body = JSON.stringify({ - ...(input.computeEnvironmentName != null && { computeEnvironmentName: input.computeEnvironmentName }), - ...(input.computeResources != null && { computeResources: se_ComputeResource(input.computeResources, context) }), - ...(input.eksConfiguration != null && { eksConfiguration: se_EksConfiguration(input.eksConfiguration, context) }), - ...(input.serviceRole != null && { serviceRole: input.serviceRole }), - ...(input.state != null && { state: input.state }), - ...(input.tags != null && { tags: se_TagrisTagsMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - ...(input.unmanagedvCpus != null && { unmanagedvCpus: input.unmanagedvCpus }), - }); + body = JSON.stringify( + take(input, { + computeEnvironmentName: [], + computeResources: (_) => _json(_), + eksConfiguration: (_) => _json(_), + serviceRole: [], + state: [], + tags: (_) => _json(_), + type: [], + unmanagedvCpus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -241,16 +225,16 @@ export const se_CreateJobQueueCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createjobqueue"; let body: any; - body = JSON.stringify({ - ...(input.computeEnvironmentOrder != null && { - computeEnvironmentOrder: se_ComputeEnvironmentOrders(input.computeEnvironmentOrder, context), - }), - ...(input.jobQueueName != null && { jobQueueName: input.jobQueueName }), - ...(input.priority != null && { priority: input.priority }), - ...(input.schedulingPolicyArn != null && { schedulingPolicyArn: input.schedulingPolicyArn }), - ...(input.state != null && { state: input.state }), - ...(input.tags != null && { tags: se_TagrisTagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + computeEnvironmentOrder: (_) => _json(_), + jobQueueName: [], + priority: [], + schedulingPolicyArn: [], + state: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -276,11 +260,13 @@ export const se_CreateSchedulingPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createschedulingpolicy"; let body: any; - body = JSON.stringify({ - ...(input.fairsharePolicy != null && { fairsharePolicy: se_FairsharePolicy(input.fairsharePolicy, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagrisTagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + fairsharePolicy: (_) => se_FairsharePolicy(_, context), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -306,9 +292,11 @@ export const se_DeleteComputeEnvironmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletecomputeenvironment"; let body: any; - body = JSON.stringify({ - ...(input.computeEnvironment != null && { computeEnvironment: input.computeEnvironment }), - }); + body = JSON.stringify( + take(input, { + computeEnvironment: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -333,9 +321,11 @@ export const se_DeleteJobQueueCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletejobqueue"; let body: any; - body = JSON.stringify({ - ...(input.jobQueue != null && { jobQueue: input.jobQueue }), - }); + body = JSON.stringify( + take(input, { + jobQueue: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -361,9 +351,11 @@ export const se_DeleteSchedulingPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deleteschedulingpolicy"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -389,9 +381,11 @@ export const se_DeregisterJobDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deregisterjobdefinition"; let body: any; - body = JSON.stringify({ - ...(input.jobDefinition != null && { jobDefinition: input.jobDefinition }), - }); + body = JSON.stringify( + take(input, { + jobDefinition: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -417,13 +411,13 @@ export const se_DescribeComputeEnvironmentsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describecomputeenvironments"; let body: any; - body = JSON.stringify({ - ...(input.computeEnvironments != null && { - computeEnvironments: se_StringList(input.computeEnvironments, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + computeEnvironments: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -449,13 +443,15 @@ export const se_DescribeJobDefinitionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobdefinitions"; let body: any; - body = JSON.stringify({ - ...(input.jobDefinitionName != null && { jobDefinitionName: input.jobDefinitionName }), - ...(input.jobDefinitions != null && { jobDefinitions: se_StringList(input.jobDefinitions, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + jobDefinitionName: [], + jobDefinitions: (_) => _json(_), + maxResults: [], + nextToken: [], + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -480,11 +476,13 @@ export const se_DescribeJobQueuesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobqueues"; let body: any; - body = JSON.stringify({ - ...(input.jobQueues != null && { jobQueues: se_StringList(input.jobQueues, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + jobQueues: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -509,9 +507,11 @@ export const se_DescribeJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobs"; let body: any; - body = JSON.stringify({ - ...(input.jobs != null && { jobs: se_StringList(input.jobs, context) }), - }); + body = JSON.stringify( + take(input, { + jobs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -537,9 +537,11 @@ export const se_DescribeSchedulingPoliciesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describeschedulingpolicies"; let body: any; - body = JSON.stringify({ - ...(input.arns != null && { arns: se_StringList(input.arns, context) }), - }); + body = JSON.stringify( + take(input, { + arns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -564,15 +566,17 @@ export const se_ListJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listjobs"; let body: any; - body = JSON.stringify({ - ...(input.arrayJobId != null && { arrayJobId: input.arrayJobId }), - ...(input.filters != null && { filters: se_ListJobsFilterList(input.filters, context) }), - ...(input.jobQueue != null && { jobQueue: input.jobQueue }), - ...(input.jobStatus != null && { jobStatus: input.jobStatus }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.multiNodeJobId != null && { multiNodeJobId: input.multiNodeJobId }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + arrayJobId: [], + filters: (_) => _json(_), + jobQueue: [], + jobStatus: [], + maxResults: [], + multiNodeJobId: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -598,10 +602,12 @@ export const se_ListSchedulingPoliciesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listschedulingpolicies"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -650,24 +656,22 @@ export const se_RegisterJobDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registerjobdefinition"; let body: any; - body = JSON.stringify({ - ...(input.containerProperties != null && { - containerProperties: se_ContainerProperties(input.containerProperties, context), - }), - ...(input.eksProperties != null && { eksProperties: se_EksProperties(input.eksProperties, context) }), - ...(input.jobDefinitionName != null && { jobDefinitionName: input.jobDefinitionName }), - ...(input.nodeProperties != null && { nodeProperties: se_NodeProperties(input.nodeProperties, context) }), - ...(input.parameters != null && { parameters: se_ParametersMap(input.parameters, context) }), - ...(input.platformCapabilities != null && { - platformCapabilities: se_PlatformCapabilityList(input.platformCapabilities, context), - }), - ...(input.propagateTags != null && { propagateTags: input.propagateTags }), - ...(input.retryStrategy != null && { retryStrategy: se_RetryStrategy(input.retryStrategy, context) }), - ...(input.schedulingPriority != null && { schedulingPriority: input.schedulingPriority }), - ...(input.tags != null && { tags: se_TagrisTagsMap(input.tags, context) }), - ...(input.timeout != null && { timeout: se_JobTimeout(input.timeout, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + containerProperties: (_) => _json(_), + eksProperties: (_) => _json(_), + jobDefinitionName: [], + nodeProperties: (_) => _json(_), + parameters: (_) => _json(_), + platformCapabilities: (_) => _json(_), + propagateTags: [], + retryStrategy: (_) => _json(_), + schedulingPriority: [], + tags: (_) => _json(_), + timeout: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -692,27 +696,25 @@ export const se_SubmitJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/submitjob"; let body: any; - body = JSON.stringify({ - ...(input.arrayProperties != null && { arrayProperties: se_ArrayProperties(input.arrayProperties, context) }), - ...(input.containerOverrides != null && { - containerOverrides: se_ContainerOverrides(input.containerOverrides, context), - }), - ...(input.dependsOn != null && { dependsOn: se_JobDependencyList(input.dependsOn, context) }), - ...(input.eksPropertiesOverride != null && { - eksPropertiesOverride: se_EksPropertiesOverride(input.eksPropertiesOverride, context), - }), - ...(input.jobDefinition != null && { jobDefinition: input.jobDefinition }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.jobQueue != null && { jobQueue: input.jobQueue }), - ...(input.nodeOverrides != null && { nodeOverrides: se_NodeOverrides(input.nodeOverrides, context) }), - ...(input.parameters != null && { parameters: se_ParametersMap(input.parameters, context) }), - ...(input.propagateTags != null && { propagateTags: input.propagateTags }), - ...(input.retryStrategy != null && { retryStrategy: se_RetryStrategy(input.retryStrategy, context) }), - ...(input.schedulingPriorityOverride != null && { schedulingPriorityOverride: input.schedulingPriorityOverride }), - ...(input.shareIdentifier != null && { shareIdentifier: input.shareIdentifier }), - ...(input.tags != null && { tags: se_TagrisTagsMap(input.tags, context) }), - ...(input.timeout != null && { timeout: se_JobTimeout(input.timeout, context) }), - }); + body = JSON.stringify( + take(input, { + arrayProperties: (_) => _json(_), + containerOverrides: (_) => _json(_), + dependsOn: (_) => _json(_), + eksPropertiesOverride: (_) => _json(_), + jobDefinition: [], + jobName: [], + jobQueue: [], + nodeOverrides: (_) => _json(_), + parameters: (_) => _json(_), + propagateTags: [], + retryStrategy: (_) => _json(_), + schedulingPriorityOverride: [], + shareIdentifier: [], + tags: (_) => _json(_), + timeout: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -738,9 +740,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagrisTagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -765,10 +769,12 @@ export const se_TerminateJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/terminatejob"; let body: any; - body = JSON.stringify({ - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + jobId: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -824,16 +830,16 @@ export const se_UpdateComputeEnvironmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatecomputeenvironment"; let body: any; - body = JSON.stringify({ - ...(input.computeEnvironment != null && { computeEnvironment: input.computeEnvironment }), - ...(input.computeResources != null && { - computeResources: se_ComputeResourceUpdate(input.computeResources, context), - }), - ...(input.serviceRole != null && { serviceRole: input.serviceRole }), - ...(input.state != null && { state: input.state }), - ...(input.unmanagedvCpus != null && { unmanagedvCpus: input.unmanagedvCpus }), - ...(input.updatePolicy != null && { updatePolicy: se_UpdatePolicy(input.updatePolicy, context) }), - }); + body = JSON.stringify( + take(input, { + computeEnvironment: [], + computeResources: (_) => _json(_), + serviceRole: [], + state: [], + unmanagedvCpus: [], + updatePolicy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -858,15 +864,15 @@ export const se_UpdateJobQueueCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatejobqueue"; let body: any; - body = JSON.stringify({ - ...(input.computeEnvironmentOrder != null && { - computeEnvironmentOrder: se_ComputeEnvironmentOrders(input.computeEnvironmentOrder, context), - }), - ...(input.jobQueue != null && { jobQueue: input.jobQueue }), - ...(input.priority != null && { priority: input.priority }), - ...(input.schedulingPolicyArn != null && { schedulingPolicyArn: input.schedulingPolicyArn }), - ...(input.state != null && { state: input.state }), - }); + body = JSON.stringify( + take(input, { + computeEnvironmentOrder: (_) => _json(_), + jobQueue: [], + priority: [], + schedulingPolicyArn: [], + state: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -892,10 +898,12 @@ export const se_UpdateSchedulingPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updateschedulingpolicy"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.fairsharePolicy != null && { fairsharePolicy: se_FairsharePolicy(input.fairsharePolicy, context) }), - }); + body = JSON.stringify( + take(input, { + arn: [], + fairsharePolicy: (_) => se_FairsharePolicy(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -945,10 +953,9 @@ const de_CancelJobCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -968,12 +975,11 @@ export const de_CreateComputeEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.computeEnvironmentArn != null) { - contents.computeEnvironmentArn = __expectString(data.computeEnvironmentArn); - } - if (data.computeEnvironmentName != null) { - contents.computeEnvironmentName = __expectString(data.computeEnvironmentName); - } + const doc = take(data, { + computeEnvironmentArn: __expectString, + computeEnvironmentName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -998,10 +1004,9 @@ const de_CreateComputeEnvironmentCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1021,12 +1026,11 @@ export const de_CreateJobQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobQueueArn != null) { - contents.jobQueueArn = __expectString(data.jobQueueArn); - } - if (data.jobQueueName != null) { - contents.jobQueueName = __expectString(data.jobQueueName); - } + const doc = take(data, { + jobQueueArn: __expectString, + jobQueueName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1051,10 +1055,9 @@ const de_CreateJobQueueCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1074,12 +1077,11 @@ export const de_CreateSchedulingPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1104,10 +1106,9 @@ const de_CreateSchedulingPolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1151,10 +1152,9 @@ const de_DeleteComputeEnvironmentCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1198,10 +1198,9 @@ const de_DeleteJobQueueCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1245,10 +1244,9 @@ const de_DeleteSchedulingPolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1292,10 +1290,9 @@ const de_DeregisterJobDefinitionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1315,12 +1312,11 @@ export const de_DescribeComputeEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.computeEnvironments != null) { - contents.computeEnvironments = de_ComputeEnvironmentDetailList(data.computeEnvironments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + computeEnvironments: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1345,10 +1341,9 @@ const de_DescribeComputeEnvironmentsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1368,12 +1363,11 @@ export const de_DescribeJobDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobDefinitions != null) { - contents.jobDefinitions = de_JobDefinitionList(data.jobDefinitions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobDefinitions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1398,10 +1392,9 @@ const de_DescribeJobDefinitionsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1421,12 +1414,11 @@ export const de_DescribeJobQueuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobQueues != null) { - contents.jobQueues = de_JobQueueDetailList(data.jobQueues, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobQueues: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1451,10 +1443,9 @@ const de_DescribeJobQueuesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,9 +1465,10 @@ export const de_DescribeJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.jobs = de_JobDetailList(data.jobs, context); - } + const doc = take(data, { + jobs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1501,10 +1493,9 @@ const de_DescribeJobsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1524,9 +1515,10 @@ export const de_DescribeSchedulingPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.schedulingPolicies != null) { - contents.schedulingPolicies = de_SchedulingPolicyDetailList(data.schedulingPolicies, context); - } + const doc = take(data, { + schedulingPolicies: (_) => de_SchedulingPolicyDetailList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1551,10 +1543,9 @@ const de_DescribeSchedulingPoliciesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1574,12 +1565,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummaryList != null) { - contents.jobSummaryList = de_JobSummaryList(data.jobSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobSummaryList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1604,10 +1594,9 @@ const de_ListJobsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1627,12 +1616,11 @@ export const de_ListSchedulingPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.schedulingPolicies != null) { - contents.schedulingPolicies = de_SchedulingPolicyListingDetailList(data.schedulingPolicies, context); - } + const doc = take(data, { + nextToken: __expectString, + schedulingPolicies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1657,10 +1645,9 @@ const de_ListSchedulingPoliciesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1680,9 +1667,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagrisTagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1707,10 +1695,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1730,15 +1717,12 @@ export const de_RegisterJobDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobDefinitionArn != null) { - contents.jobDefinitionArn = __expectString(data.jobDefinitionArn); - } - if (data.jobDefinitionName != null) { - contents.jobDefinitionName = __expectString(data.jobDefinitionName); - } - if (data.revision != null) { - contents.revision = __expectInt32(data.revision); - } + const doc = take(data, { + jobDefinitionArn: __expectString, + jobDefinitionName: __expectString, + revision: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -1763,10 +1747,9 @@ const de_RegisterJobDefinitionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1786,15 +1769,12 @@ export const de_SubmitJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobName != null) { - contents.jobName = __expectString(data.jobName); - } + const doc = take(data, { + jobArn: __expectString, + jobId: __expectString, + jobName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1819,10 +1799,9 @@ const de_SubmitJobCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1866,10 +1845,9 @@ const de_TagResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1913,10 +1891,9 @@ const de_TerminateJobCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1960,10 +1937,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1983,12 +1959,11 @@ export const de_UpdateComputeEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.computeEnvironmentArn != null) { - contents.computeEnvironmentArn = __expectString(data.computeEnvironmentArn); - } - if (data.computeEnvironmentName != null) { - contents.computeEnvironmentName = __expectString(data.computeEnvironmentName); - } + const doc = take(data, { + computeEnvironmentArn: __expectString, + computeEnvironmentName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2013,10 +1988,9 @@ const de_UpdateComputeEnvironmentCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2036,12 +2010,11 @@ export const de_UpdateJobQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobQueueArn != null) { - contents.jobQueueArn = __expectString(data.jobQueueArn); - } - if (data.jobQueueName != null) { - contents.jobQueueName = __expectString(data.jobQueueName); - } + const doc = take(data, { + jobQueueArn: __expectString, + jobQueueName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2066,10 +2039,9 @@ const de_UpdateJobQueueCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2113,25 +2085,25 @@ const de_UpdateSchedulingPolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ClientExceptionRes */ const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2145,9 +2117,10 @@ const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext) const de_ServerExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2155,2240 +2128,391 @@ const de_ServerExceptionRes = async (parsedOutput: any, context: __SerdeContext) return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ArrayProperties - */ -const se_ArrayProperties = (input: ArrayProperties, context: __SerdeContext): any => { - return { - ...(input.size != null && { size: input.size }), - }; -}; +// se_ArrayProperties omitted. -/** - * serializeAws_restJson1ComputeEnvironmentOrder - */ -const se_ComputeEnvironmentOrder = (input: ComputeEnvironmentOrder, context: __SerdeContext): any => { - return { - ...(input.computeEnvironment != null && { computeEnvironment: input.computeEnvironment }), - ...(input.order != null && { order: input.order }), - }; -}; +// se_ComputeEnvironmentOrder omitted. -/** - * serializeAws_restJson1ComputeEnvironmentOrders - */ -const se_ComputeEnvironmentOrders = (input: ComputeEnvironmentOrder[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComputeEnvironmentOrder(entry, context); - }); -}; +// se_ComputeEnvironmentOrders omitted. -/** - * serializeAws_restJson1ComputeResource - */ -const se_ComputeResource = (input: ComputeResource, context: __SerdeContext): any => { - return { - ...(input.allocationStrategy != null && { allocationStrategy: input.allocationStrategy }), - ...(input.bidPercentage != null && { bidPercentage: input.bidPercentage }), - ...(input.desiredvCpus != null && { desiredvCpus: input.desiredvCpus }), - ...(input.ec2Configuration != null && { - ec2Configuration: se_Ec2ConfigurationList(input.ec2Configuration, context), - }), - ...(input.ec2KeyPair != null && { ec2KeyPair: input.ec2KeyPair }), - ...(input.imageId != null && { imageId: input.imageId }), - ...(input.instanceRole != null && { instanceRole: input.instanceRole }), - ...(input.instanceTypes != null && { instanceTypes: se_StringList(input.instanceTypes, context) }), - ...(input.launchTemplate != null && { - launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context), - }), - ...(input.maxvCpus != null && { maxvCpus: input.maxvCpus }), - ...(input.minvCpus != null && { minvCpus: input.minvCpus }), - ...(input.placementGroup != null && { placementGroup: input.placementGroup }), - ...(input.securityGroupIds != null && { securityGroupIds: se_StringList(input.securityGroupIds, context) }), - ...(input.spotIamFleetRole != null && { spotIamFleetRole: input.spotIamFleetRole }), - ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ComputeResource omitted. -/** - * serializeAws_restJson1ComputeResourceUpdate - */ -const se_ComputeResourceUpdate = (input: ComputeResourceUpdate, context: __SerdeContext): any => { - return { - ...(input.allocationStrategy != null && { allocationStrategy: input.allocationStrategy }), - ...(input.bidPercentage != null && { bidPercentage: input.bidPercentage }), - ...(input.desiredvCpus != null && { desiredvCpus: input.desiredvCpus }), - ...(input.ec2Configuration != null && { - ec2Configuration: se_Ec2ConfigurationList(input.ec2Configuration, context), - }), - ...(input.ec2KeyPair != null && { ec2KeyPair: input.ec2KeyPair }), - ...(input.imageId != null && { imageId: input.imageId }), - ...(input.instanceRole != null && { instanceRole: input.instanceRole }), - ...(input.instanceTypes != null && { instanceTypes: se_StringList(input.instanceTypes, context) }), - ...(input.launchTemplate != null && { - launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context), - }), - ...(input.maxvCpus != null && { maxvCpus: input.maxvCpus }), - ...(input.minvCpus != null && { minvCpus: input.minvCpus }), - ...(input.placementGroup != null && { placementGroup: input.placementGroup }), - ...(input.securityGroupIds != null && { securityGroupIds: se_StringList(input.securityGroupIds, context) }), - ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - ...(input.updateToLatestImageVersion != null && { updateToLatestImageVersion: input.updateToLatestImageVersion }), - }; -}; +// se_ComputeResourceUpdate omitted. -/** - * serializeAws_restJson1ContainerOverrides - */ -const se_ContainerOverrides = (input: ContainerOverrides, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.environment != null && { environment: se_EnvironmentVariables(input.environment, context) }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.memory != null && { memory: input.memory }), - ...(input.resourceRequirements != null && { - resourceRequirements: se_ResourceRequirements(input.resourceRequirements, context), - }), - ...(input.vcpus != null && { vcpus: input.vcpus }), - }; -}; +// se_ContainerOverrides omitted. -/** - * serializeAws_restJson1ContainerProperties - */ -const se_ContainerProperties = (input: ContainerProperties, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.environment != null && { environment: se_EnvironmentVariables(input.environment, context) }), - ...(input.ephemeralStorage != null && { ephemeralStorage: se_EphemeralStorage(input.ephemeralStorage, context) }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.fargatePlatformConfiguration != null && { - fargatePlatformConfiguration: se_FargatePlatformConfiguration(input.fargatePlatformConfiguration, context), - }), - ...(input.image != null && { image: input.image }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.jobRoleArn != null && { jobRoleArn: input.jobRoleArn }), - ...(input.linuxParameters != null && { linuxParameters: se_LinuxParameters(input.linuxParameters, context) }), - ...(input.logConfiguration != null && { logConfiguration: se_LogConfiguration(input.logConfiguration, context) }), - ...(input.memory != null && { memory: input.memory }), - ...(input.mountPoints != null && { mountPoints: se_MountPoints(input.mountPoints, context) }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.privileged != null && { privileged: input.privileged }), - ...(input.readonlyRootFilesystem != null && { readonlyRootFilesystem: input.readonlyRootFilesystem }), - ...(input.resourceRequirements != null && { - resourceRequirements: se_ResourceRequirements(input.resourceRequirements, context), - }), - ...(input.secrets != null && { secrets: se_SecretList(input.secrets, context) }), - ...(input.ulimits != null && { ulimits: se_Ulimits(input.ulimits, context) }), - ...(input.user != null && { user: input.user }), - ...(input.vcpus != null && { vcpus: input.vcpus }), - ...(input.volumes != null && { volumes: se_Volumes(input.volumes, context) }), - }; -}; +// se_ContainerProperties omitted. -/** - * serializeAws_restJson1Device - */ -const se_Device = (input: Device, context: __SerdeContext): any => { - return { - ...(input.containerPath != null && { containerPath: input.containerPath }), - ...(input.hostPath != null && { hostPath: input.hostPath }), - ...(input.permissions != null && { permissions: se_DeviceCgroupPermissions(input.permissions, context) }), - }; -}; +// se_Device omitted. -/** - * serializeAws_restJson1DeviceCgroupPermissions - */ -const se_DeviceCgroupPermissions = (input: (DeviceCgroupPermission | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceCgroupPermissions omitted. -/** - * serializeAws_restJson1DevicesList - */ -const se_DevicesList = (input: Device[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Device(entry, context); - }); -}; +// se_DevicesList omitted. -/** - * serializeAws_restJson1Ec2Configuration - */ -const se_Ec2Configuration = (input: Ec2Configuration, context: __SerdeContext): any => { - return { - ...(input.imageIdOverride != null && { imageIdOverride: input.imageIdOverride }), - ...(input.imageKubernetesVersion != null && { imageKubernetesVersion: input.imageKubernetesVersion }), - ...(input.imageType != null && { imageType: input.imageType }), - }; -}; +// se_Ec2Configuration omitted. -/** - * serializeAws_restJson1Ec2ConfigurationList - */ -const se_Ec2ConfigurationList = (input: Ec2Configuration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Ec2Configuration(entry, context); - }); -}; +// se_Ec2ConfigurationList omitted. -/** - * serializeAws_restJson1EFSAuthorizationConfig - */ -const se_EFSAuthorizationConfig = (input: EFSAuthorizationConfig, context: __SerdeContext): any => { - return { - ...(input.accessPointId != null && { accessPointId: input.accessPointId }), - ...(input.iam != null && { iam: input.iam }), - }; -}; +// se_EFSAuthorizationConfig omitted. -/** - * serializeAws_restJson1EFSVolumeConfiguration - */ -const se_EFSVolumeConfiguration = (input: EFSVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.authorizationConfig != null && { - authorizationConfig: se_EFSAuthorizationConfig(input.authorizationConfig, context), - }), - ...(input.fileSystemId != null && { fileSystemId: input.fileSystemId }), - ...(input.rootDirectory != null && { rootDirectory: input.rootDirectory }), - ...(input.transitEncryption != null && { transitEncryption: input.transitEncryption }), - ...(input.transitEncryptionPort != null && { transitEncryptionPort: input.transitEncryptionPort }), - }; -}; +// se_EFSVolumeConfiguration omitted. -/** - * serializeAws_restJson1EksConfiguration - */ -const se_EksConfiguration = (input: EksConfiguration, context: __SerdeContext): any => { - return { - ...(input.eksClusterArn != null && { eksClusterArn: input.eksClusterArn }), - ...(input.kubernetesNamespace != null && { kubernetesNamespace: input.kubernetesNamespace }), - }; -}; +// se_EksConfiguration omitted. -/** - * serializeAws_restJson1EksContainer - */ -const se_EksContainer = (input: EksContainer, context: __SerdeContext): any => { - return { - ...(input.args != null && { args: se_StringList(input.args, context) }), - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.env != null && { env: se_EksContainerEnvironmentVariables(input.env, context) }), - ...(input.image != null && { image: input.image }), - ...(input.imagePullPolicy != null && { imagePullPolicy: input.imagePullPolicy }), - ...(input.name != null && { name: input.name }), - ...(input.resources != null && { resources: se_EksContainerResourceRequirements(input.resources, context) }), - ...(input.securityContext != null && { - securityContext: se_EksContainerSecurityContext(input.securityContext, context), - }), - ...(input.volumeMounts != null && { volumeMounts: se_EksContainerVolumeMounts(input.volumeMounts, context) }), - }; -}; +// se_EksContainer omitted. -/** - * serializeAws_restJson1EksContainerEnvironmentVariable - */ -const se_EksContainerEnvironmentVariable = (input: EksContainerEnvironmentVariable, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_EksContainerEnvironmentVariable omitted. -/** - * serializeAws_restJson1EksContainerEnvironmentVariables - */ -const se_EksContainerEnvironmentVariables = ( - input: EksContainerEnvironmentVariable[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EksContainerEnvironmentVariable(entry, context); - }); -}; +// se_EksContainerEnvironmentVariables omitted. -/** - * serializeAws_restJson1EksContainerOverride - */ -const se_EksContainerOverride = (input: EksContainerOverride, context: __SerdeContext): any => { - return { - ...(input.args != null && { args: se_StringList(input.args, context) }), - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.env != null && { env: se_EksContainerEnvironmentVariables(input.env, context) }), - ...(input.image != null && { image: input.image }), - ...(input.resources != null && { resources: se_EksContainerResourceRequirements(input.resources, context) }), - }; -}; +// se_EksContainerOverride omitted. -/** - * serializeAws_restJson1EksContainerOverrideList - */ -const se_EksContainerOverrideList = (input: EksContainerOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EksContainerOverride(entry, context); - }); -}; +// se_EksContainerOverrideList omitted. -/** - * serializeAws_restJson1EksContainerResourceRequirements - */ -const se_EksContainerResourceRequirements = (input: EksContainerResourceRequirements, context: __SerdeContext): any => { - return { - ...(input.limits != null && { limits: se_EksLimits(input.limits, context) }), - ...(input.requests != null && { requests: se_EksRequests(input.requests, context) }), - }; -}; +// se_EksContainerResourceRequirements omitted. -/** - * serializeAws_restJson1EksContainers - */ -const se_EksContainers = (input: EksContainer[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EksContainer(entry, context); - }); -}; +// se_EksContainers omitted. + +// se_EksContainerSecurityContext omitted. + +// se_EksContainerVolumeMount omitted. + +// se_EksContainerVolumeMounts omitted. + +// se_EksEmptyDir omitted. + +// se_EksHostPath omitted. + +// se_EksLabelsMap omitted. + +// se_EksLimits omitted. + +// se_EksMetadata omitted. + +// se_EksPodProperties omitted. + +// se_EksPodPropertiesOverride omitted. + +// se_EksProperties omitted. + +// se_EksPropertiesOverride omitted. + +// se_EksRequests omitted. + +// se_EksSecret omitted. + +// se_EksVolume omitted. + +// se_EksVolumes omitted. + +// se_EnvironmentVariables omitted. + +// se_EphemeralStorage omitted. + +// se_EvaluateOnExit omitted. + +// se_EvaluateOnExitList omitted. /** - * serializeAws_restJson1EksContainerSecurityContext + * serializeAws_restJson1FairsharePolicy */ -const se_EksContainerSecurityContext = (input: EksContainerSecurityContext, context: __SerdeContext): any => { - return { - ...(input.privileged != null && { privileged: input.privileged }), - ...(input.readOnlyRootFilesystem != null && { readOnlyRootFilesystem: input.readOnlyRootFilesystem }), - ...(input.runAsGroup != null && { runAsGroup: input.runAsGroup }), - ...(input.runAsNonRoot != null && { runAsNonRoot: input.runAsNonRoot }), - ...(input.runAsUser != null && { runAsUser: input.runAsUser }), - }; +const se_FairsharePolicy = (input: FairsharePolicy, context: __SerdeContext): any => { + return take(input, { + computeReservation: [], + shareDecaySeconds: [], + shareDistribution: (_) => se_ShareAttributesList(_, context), + }); }; +// se_FargatePlatformConfiguration omitted. + +// se_Host omitted. + +// se_JobDependency omitted. + +// se_JobDependencyList omitted. + +// se_JobTimeout omitted. + +// se_KeyValuePair omitted. + +// se_KeyValuesPair omitted. + +// se_LaunchTemplateSpecification omitted. + +// se_LinuxParameters omitted. + +// se_ListJobsFilterList omitted. + +// se_LogConfiguration omitted. + +// se_LogConfigurationOptionsMap omitted. + +// se_MountPoint omitted. + +// se_MountPoints omitted. + +// se_NetworkConfiguration omitted. + +// se_NodeOverrides omitted. + +// se_NodeProperties omitted. + +// se_NodePropertyOverride omitted. + +// se_NodePropertyOverrides omitted. + +// se_NodeRangeProperties omitted. + +// se_NodeRangeProperty omitted. + +// se_ParametersMap omitted. + +// se_PlatformCapabilityList omitted. + +// se_ResourceRequirement omitted. + +// se_ResourceRequirements omitted. + +// se_RetryStrategy omitted. + +// se_Secret omitted. + +// se_SecretList omitted. + /** - * serializeAws_restJson1EksContainerVolumeMount + * serializeAws_restJson1ShareAttributes */ -const se_EksContainerVolumeMount = (input: EksContainerVolumeMount, context: __SerdeContext): any => { - return { - ...(input.mountPath != null && { mountPath: input.mountPath }), - ...(input.name != null && { name: input.name }), - ...(input.readOnly != null && { readOnly: input.readOnly }), - }; +const se_ShareAttributes = (input: ShareAttributes, context: __SerdeContext): any => { + return take(input, { + shareIdentifier: [], + weightFactor: __serializeFloat, + }); }; /** - * serializeAws_restJson1EksContainerVolumeMounts + * serializeAws_restJson1ShareAttributesList */ -const se_EksContainerVolumeMounts = (input: EksContainerVolumeMount[], context: __SerdeContext): any => { +const se_ShareAttributesList = (input: ShareAttributes[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_EksContainerVolumeMount(entry, context); + return se_ShareAttributes(entry, context); }); }; -/** - * serializeAws_restJson1EksEmptyDir - */ -const se_EksEmptyDir = (input: EksEmptyDir, context: __SerdeContext): any => { - return { - ...(input.medium != null && { medium: input.medium }), - ...(input.sizeLimit != null && { sizeLimit: input.sizeLimit }), - }; -}; +// se_StringList omitted. -/** - * serializeAws_restJson1EksHostPath - */ -const se_EksHostPath = (input: EksHostPath, context: __SerdeContext): any => { - return { - ...(input.path != null && { path: input.path }), - }; -}; +// se_TagrisTagsMap omitted. -/** - * serializeAws_restJson1EksLabelsMap - */ -const se_EksLabelsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. -/** - * serializeAws_restJson1EksLimits - */ -const se_EksLimits = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tmpfs omitted. -/** - * serializeAws_restJson1EksMetadata - */ -const se_EksMetadata = (input: EksMetadata, context: __SerdeContext): any => { - return { - ...(input.labels != null && { labels: se_EksLabelsMap(input.labels, context) }), - }; -}; - -/** - * serializeAws_restJson1EksPodProperties - */ -const se_EksPodProperties = (input: EksPodProperties, context: __SerdeContext): any => { - return { - ...(input.containers != null && { containers: se_EksContainers(input.containers, context) }), - ...(input.dnsPolicy != null && { dnsPolicy: input.dnsPolicy }), - ...(input.hostNetwork != null && { hostNetwork: input.hostNetwork }), - ...(input.metadata != null && { metadata: se_EksMetadata(input.metadata, context) }), - ...(input.serviceAccountName != null && { serviceAccountName: input.serviceAccountName }), - ...(input.volumes != null && { volumes: se_EksVolumes(input.volumes, context) }), - }; -}; - -/** - * serializeAws_restJson1EksPodPropertiesOverride - */ -const se_EksPodPropertiesOverride = (input: EksPodPropertiesOverride, context: __SerdeContext): any => { - return { - ...(input.containers != null && { containers: se_EksContainerOverrideList(input.containers, context) }), - ...(input.metadata != null && { metadata: se_EksMetadata(input.metadata, context) }), - }; -}; - -/** - * serializeAws_restJson1EksProperties - */ -const se_EksProperties = (input: EksProperties, context: __SerdeContext): any => { - return { - ...(input.podProperties != null && { podProperties: se_EksPodProperties(input.podProperties, context) }), - }; -}; - -/** - * serializeAws_restJson1EksPropertiesOverride - */ -const se_EksPropertiesOverride = (input: EksPropertiesOverride, context: __SerdeContext): any => { - return { - ...(input.podProperties != null && { podProperties: se_EksPodPropertiesOverride(input.podProperties, context) }), - }; -}; - -/** - * serializeAws_restJson1EksRequests - */ -const se_EksRequests = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1EksSecret - */ -const se_EksSecret = (input: EksSecret, context: __SerdeContext): any => { - return { - ...(input.optional != null && { optional: input.optional }), - ...(input.secretName != null && { secretName: input.secretName }), - }; -}; - -/** - * serializeAws_restJson1EksVolume - */ -const se_EksVolume = (input: EksVolume, context: __SerdeContext): any => { - return { - ...(input.emptyDir != null && { emptyDir: se_EksEmptyDir(input.emptyDir, context) }), - ...(input.hostPath != null && { hostPath: se_EksHostPath(input.hostPath, context) }), - ...(input.name != null && { name: input.name }), - ...(input.secret != null && { secret: se_EksSecret(input.secret, context) }), - }; -}; - -/** - * serializeAws_restJson1EksVolumes - */ -const se_EksVolumes = (input: EksVolume[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EksVolume(entry, context); - }); -}; - -/** - * serializeAws_restJson1EnvironmentVariables - */ -const se_EnvironmentVariables = (input: KeyValuePair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeyValuePair(entry, context); - }); -}; - -/** - * serializeAws_restJson1EphemeralStorage - */ -const se_EphemeralStorage = (input: EphemeralStorage, context: __SerdeContext): any => { - return { - ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }), - }; -}; - -/** - * serializeAws_restJson1EvaluateOnExit - */ -const se_EvaluateOnExit = (input: EvaluateOnExit, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.onExitCode != null && { onExitCode: input.onExitCode }), - ...(input.onReason != null && { onReason: input.onReason }), - ...(input.onStatusReason != null && { onStatusReason: input.onStatusReason }), - }; -}; - -/** - * serializeAws_restJson1EvaluateOnExitList - */ -const se_EvaluateOnExitList = (input: EvaluateOnExit[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EvaluateOnExit(entry, context); - }); -}; - -/** - * serializeAws_restJson1FairsharePolicy - */ -const se_FairsharePolicy = (input: FairsharePolicy, context: __SerdeContext): any => { - return { - ...(input.computeReservation != null && { computeReservation: input.computeReservation }), - ...(input.shareDecaySeconds != null && { shareDecaySeconds: input.shareDecaySeconds }), - ...(input.shareDistribution != null && { - shareDistribution: se_ShareAttributesList(input.shareDistribution, context), - }), - }; -}; - -/** - * serializeAws_restJson1FargatePlatformConfiguration - */ -const se_FargatePlatformConfiguration = (input: FargatePlatformConfiguration, context: __SerdeContext): any => { - return { - ...(input.platformVersion != null && { platformVersion: input.platformVersion }), - }; -}; - -/** - * serializeAws_restJson1Host - */ -const se_Host = (input: Host, context: __SerdeContext): any => { - return { - ...(input.sourcePath != null && { sourcePath: input.sourcePath }), - }; -}; - -/** - * serializeAws_restJson1JobDependency - */ -const se_JobDependency = (input: JobDependency, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_restJson1JobDependencyList - */ -const se_JobDependencyList = (input: JobDependency[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JobDependency(entry, context); - }); -}; - -/** - * serializeAws_restJson1JobTimeout - */ -const se_JobTimeout = (input: JobTimeout, context: __SerdeContext): any => { - return { - ...(input.attemptDurationSeconds != null && { attemptDurationSeconds: input.attemptDurationSeconds }), - }; -}; - -/** - * serializeAws_restJson1KeyValuePair - */ -const se_KeyValuePair = (input: KeyValuePair, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1KeyValuesPair - */ -const se_KeyValuesPair = (input: KeyValuesPair, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_StringList(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1LaunchTemplateSpecification - */ -const se_LaunchTemplateSpecification = (input: LaunchTemplateSpecification, context: __SerdeContext): any => { - return { - ...(input.launchTemplateId != null && { launchTemplateId: input.launchTemplateId }), - ...(input.launchTemplateName != null && { launchTemplateName: input.launchTemplateName }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_restJson1LinuxParameters - */ -const se_LinuxParameters = (input: LinuxParameters, context: __SerdeContext): any => { - return { - ...(input.devices != null && { devices: se_DevicesList(input.devices, context) }), - ...(input.initProcessEnabled != null && { initProcessEnabled: input.initProcessEnabled }), - ...(input.maxSwap != null && { maxSwap: input.maxSwap }), - ...(input.sharedMemorySize != null && { sharedMemorySize: input.sharedMemorySize }), - ...(input.swappiness != null && { swappiness: input.swappiness }), - ...(input.tmpfs != null && { tmpfs: se_TmpfsList(input.tmpfs, context) }), - }; -}; - -/** - * serializeAws_restJson1ListJobsFilterList - */ -const se_ListJobsFilterList = (input: KeyValuesPair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeyValuesPair(entry, context); - }); -}; - -/** - * serializeAws_restJson1LogConfiguration - */ -const se_LogConfiguration = (input: LogConfiguration, context: __SerdeContext): any => { - return { - ...(input.logDriver != null && { logDriver: input.logDriver }), - ...(input.options != null && { options: se_LogConfigurationOptionsMap(input.options, context) }), - ...(input.secretOptions != null && { secretOptions: se_SecretList(input.secretOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1LogConfigurationOptionsMap - */ -const se_LogConfigurationOptionsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1MountPoint - */ -const se_MountPoint = (input: MountPoint, context: __SerdeContext): any => { - return { - ...(input.containerPath != null && { containerPath: input.containerPath }), - ...(input.readOnly != null && { readOnly: input.readOnly }), - ...(input.sourceVolume != null && { sourceVolume: input.sourceVolume }), - }; -}; - -/** - * serializeAws_restJson1MountPoints - */ -const se_MountPoints = (input: MountPoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MountPoint(entry, context); - }); -}; - -/** - * serializeAws_restJson1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.assignPublicIp != null && { assignPublicIp: input.assignPublicIp }), - }; -}; - -/** - * serializeAws_restJson1NodeOverrides - */ -const se_NodeOverrides = (input: NodeOverrides, context: __SerdeContext): any => { - return { - ...(input.nodePropertyOverrides != null && { - nodePropertyOverrides: se_NodePropertyOverrides(input.nodePropertyOverrides, context), - }), - ...(input.numNodes != null && { numNodes: input.numNodes }), - }; -}; - -/** - * serializeAws_restJson1NodeProperties - */ -const se_NodeProperties = (input: NodeProperties, context: __SerdeContext): any => { - return { - ...(input.mainNode != null && { mainNode: input.mainNode }), - ...(input.nodeRangeProperties != null && { - nodeRangeProperties: se_NodeRangeProperties(input.nodeRangeProperties, context), - }), - ...(input.numNodes != null && { numNodes: input.numNodes }), - }; -}; - -/** - * serializeAws_restJson1NodePropertyOverride - */ -const se_NodePropertyOverride = (input: NodePropertyOverride, context: __SerdeContext): any => { - return { - ...(input.containerOverrides != null && { - containerOverrides: se_ContainerOverrides(input.containerOverrides, context), - }), - ...(input.targetNodes != null && { targetNodes: input.targetNodes }), - }; -}; - -/** - * serializeAws_restJson1NodePropertyOverrides - */ -const se_NodePropertyOverrides = (input: NodePropertyOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NodePropertyOverride(entry, context); - }); -}; - -/** - * serializeAws_restJson1NodeRangeProperties - */ -const se_NodeRangeProperties = (input: NodeRangeProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NodeRangeProperty(entry, context); - }); -}; - -/** - * serializeAws_restJson1NodeRangeProperty - */ -const se_NodeRangeProperty = (input: NodeRangeProperty, context: __SerdeContext): any => { - return { - ...(input.container != null && { container: se_ContainerProperties(input.container, context) }), - ...(input.targetNodes != null && { targetNodes: input.targetNodes }), - }; -}; - -/** - * serializeAws_restJson1ParametersMap - */ -const se_ParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1PlatformCapabilityList - */ -const se_PlatformCapabilityList = (input: (PlatformCapability | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ResourceRequirement - */ -const se_ResourceRequirement = (input: ResourceRequirement, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1ResourceRequirements - */ -const se_ResourceRequirements = (input: ResourceRequirement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceRequirement(entry, context); - }); -}; - -/** - * serializeAws_restJson1RetryStrategy - */ -const se_RetryStrategy = (input: RetryStrategy, context: __SerdeContext): any => { - return { - ...(input.attempts != null && { attempts: input.attempts }), - ...(input.evaluateOnExit != null && { evaluateOnExit: se_EvaluateOnExitList(input.evaluateOnExit, context) }), - }; -}; - -/** - * serializeAws_restJson1Secret - */ -const se_Secret = (input: Secret, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.valueFrom != null && { valueFrom: input.valueFrom }), - }; -}; - -/** - * serializeAws_restJson1SecretList - */ -const se_SecretList = (input: Secret[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Secret(entry, context); - }); -}; - -/** - * serializeAws_restJson1ShareAttributes - */ -const se_ShareAttributes = (input: ShareAttributes, context: __SerdeContext): any => { - return { - ...(input.shareIdentifier != null && { shareIdentifier: input.shareIdentifier }), - ...(input.weightFactor != null && { weightFactor: __serializeFloat(input.weightFactor) }), - }; -}; - -/** - * serializeAws_restJson1ShareAttributesList - */ -const se_ShareAttributesList = (input: ShareAttributes[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ShareAttributes(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagrisTagsMap - */ -const se_TagrisTagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Tmpfs - */ -const se_Tmpfs = (input: Tmpfs, context: __SerdeContext): any => { - return { - ...(input.containerPath != null && { containerPath: input.containerPath }), - ...(input.mountOptions != null && { mountOptions: se_StringList(input.mountOptions, context) }), - ...(input.size != null && { size: input.size }), - }; -}; - -/** - * serializeAws_restJson1TmpfsList - */ -const se_TmpfsList = (input: Tmpfs[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tmpfs(entry, context); - }); -}; +// se_TmpfsList omitted. -/** - * serializeAws_restJson1Ulimit - */ -const se_Ulimit = (input: Ulimit, context: __SerdeContext): any => { - return { - ...(input.hardLimit != null && { hardLimit: input.hardLimit }), - ...(input.name != null && { name: input.name }), - ...(input.softLimit != null && { softLimit: input.softLimit }), - }; -}; +// se_Ulimit omitted. -/** - * serializeAws_restJson1Ulimits - */ -const se_Ulimits = (input: Ulimit[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Ulimit(entry, context); - }); -}; +// se_Ulimits omitted. -/** - * serializeAws_restJson1UpdatePolicy - */ -const se_UpdatePolicy = (input: UpdatePolicy, context: __SerdeContext): any => { - return { - ...(input.jobExecutionTimeoutMinutes != null && { jobExecutionTimeoutMinutes: input.jobExecutionTimeoutMinutes }), - ...(input.terminateJobsOnUpdate != null && { terminateJobsOnUpdate: input.terminateJobsOnUpdate }), - }; -}; +// se_UpdatePolicy omitted. -/** - * serializeAws_restJson1Volume - */ -const se_Volume = (input: Volume, context: __SerdeContext): any => { - return { - ...(input.efsVolumeConfiguration != null && { - efsVolumeConfiguration: se_EFSVolumeConfiguration(input.efsVolumeConfiguration, context), - }), - ...(input.host != null && { host: se_Host(input.host, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_Volume omitted. -/** - * serializeAws_restJson1Volumes - */ -const se_Volumes = (input: Volume[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Volume(entry, context); - }); -}; +// se_Volumes omitted. -/** - * deserializeAws_restJson1ArrayJobStatusSummary - */ -const de_ArrayJobStatusSummary = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_ArrayJobStatusSummary omitted. -/** - * deserializeAws_restJson1ArrayPropertiesDetail - */ -const de_ArrayPropertiesDetail = (output: any, context: __SerdeContext): ArrayPropertiesDetail => { - return { - index: __expectInt32(output.index), - size: __expectInt32(output.size), - statusSummary: output.statusSummary != null ? de_ArrayJobStatusSummary(output.statusSummary, context) : undefined, - } as any; -}; +// de_ArrayPropertiesDetail omitted. -/** - * deserializeAws_restJson1ArrayPropertiesSummary - */ -const de_ArrayPropertiesSummary = (output: any, context: __SerdeContext): ArrayPropertiesSummary => { - return { - index: __expectInt32(output.index), - size: __expectInt32(output.size), - } as any; -}; +// de_ArrayPropertiesSummary omitted. -/** - * deserializeAws_restJson1AttemptContainerDetail - */ -const de_AttemptContainerDetail = (output: any, context: __SerdeContext): AttemptContainerDetail => { - return { - containerInstanceArn: __expectString(output.containerInstanceArn), - exitCode: __expectInt32(output.exitCode), - logStreamName: __expectString(output.logStreamName), - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaceList(output.networkInterfaces, context) : undefined, - reason: __expectString(output.reason), - taskArn: __expectString(output.taskArn), - } as any; -}; +// de_AttemptContainerDetail omitted. -/** - * deserializeAws_restJson1AttemptDetail - */ -const de_AttemptDetail = (output: any, context: __SerdeContext): AttemptDetail => { - return { - container: output.container != null ? de_AttemptContainerDetail(output.container, context) : undefined, - startedAt: __expectLong(output.startedAt), - statusReason: __expectString(output.statusReason), - stoppedAt: __expectLong(output.stoppedAt), - } as any; -}; +// de_AttemptDetail omitted. -/** - * deserializeAws_restJson1AttemptDetails - */ -const de_AttemptDetails = (output: any, context: __SerdeContext): AttemptDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttemptDetail(entry, context); - }); - return retVal; -}; +// de_AttemptDetails omitted. -/** - * deserializeAws_restJson1ComputeEnvironmentDetail - */ -const de_ComputeEnvironmentDetail = (output: any, context: __SerdeContext): ComputeEnvironmentDetail => { - return { - computeEnvironmentArn: __expectString(output.computeEnvironmentArn), - computeEnvironmentName: __expectString(output.computeEnvironmentName), - computeResources: - output.computeResources != null ? de_ComputeResource(output.computeResources, context) : undefined, - containerOrchestrationType: __expectString(output.containerOrchestrationType), - ecsClusterArn: __expectString(output.ecsClusterArn), - eksConfiguration: - output.eksConfiguration != null ? de_EksConfiguration(output.eksConfiguration, context) : undefined, - serviceRole: __expectString(output.serviceRole), - state: __expectString(output.state), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - tags: output.tags != null ? de_TagrisTagsMap(output.tags, context) : undefined, - type: __expectString(output.type), - unmanagedvCpus: __expectInt32(output.unmanagedvCpus), - updatePolicy: output.updatePolicy != null ? de_UpdatePolicy(output.updatePolicy, context) : undefined, - uuid: __expectString(output.uuid), - } as any; -}; +// de_ComputeEnvironmentDetail omitted. -/** - * deserializeAws_restJson1ComputeEnvironmentDetailList - */ -const de_ComputeEnvironmentDetailList = (output: any, context: __SerdeContext): ComputeEnvironmentDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComputeEnvironmentDetail(entry, context); - }); - return retVal; -}; +// de_ComputeEnvironmentDetailList omitted. -/** - * deserializeAws_restJson1ComputeEnvironmentOrder - */ -const de_ComputeEnvironmentOrder = (output: any, context: __SerdeContext): ComputeEnvironmentOrder => { - return { - computeEnvironment: __expectString(output.computeEnvironment), - order: __expectInt32(output.order), - } as any; -}; +// de_ComputeEnvironmentOrder omitted. -/** - * deserializeAws_restJson1ComputeEnvironmentOrders - */ -const de_ComputeEnvironmentOrders = (output: any, context: __SerdeContext): ComputeEnvironmentOrder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComputeEnvironmentOrder(entry, context); - }); - return retVal; -}; +// de_ComputeEnvironmentOrders omitted. -/** - * deserializeAws_restJson1ComputeResource - */ -const de_ComputeResource = (output: any, context: __SerdeContext): ComputeResource => { - return { - allocationStrategy: __expectString(output.allocationStrategy), - bidPercentage: __expectInt32(output.bidPercentage), - desiredvCpus: __expectInt32(output.desiredvCpus), - ec2Configuration: - output.ec2Configuration != null ? de_Ec2ConfigurationList(output.ec2Configuration, context) : undefined, - ec2KeyPair: __expectString(output.ec2KeyPair), - imageId: __expectString(output.imageId), - instanceRole: __expectString(output.instanceRole), - instanceTypes: output.instanceTypes != null ? de_StringList(output.instanceTypes, context) : undefined, - launchTemplate: - output.launchTemplate != null ? de_LaunchTemplateSpecification(output.launchTemplate, context) : undefined, - maxvCpus: __expectInt32(output.maxvCpus), - minvCpus: __expectInt32(output.minvCpus), - placementGroup: __expectString(output.placementGroup), - securityGroupIds: output.securityGroupIds != null ? de_StringList(output.securityGroupIds, context) : undefined, - spotIamFleetRole: __expectString(output.spotIamFleetRole), - subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_ComputeResource omitted. -/** - * deserializeAws_restJson1ContainerDetail - */ -const de_ContainerDetail = (output: any, context: __SerdeContext): ContainerDetail => { - return { - command: output.command != null ? de_StringList(output.command, context) : undefined, - containerInstanceArn: __expectString(output.containerInstanceArn), - environment: output.environment != null ? de_EnvironmentVariables(output.environment, context) : undefined, - ephemeralStorage: - output.ephemeralStorage != null ? de_EphemeralStorage(output.ephemeralStorage, context) : undefined, - executionRoleArn: __expectString(output.executionRoleArn), - exitCode: __expectInt32(output.exitCode), - fargatePlatformConfiguration: - output.fargatePlatformConfiguration != null - ? de_FargatePlatformConfiguration(output.fargatePlatformConfiguration, context) - : undefined, - image: __expectString(output.image), - instanceType: __expectString(output.instanceType), - jobRoleArn: __expectString(output.jobRoleArn), - linuxParameters: output.linuxParameters != null ? de_LinuxParameters(output.linuxParameters, context) : undefined, - logConfiguration: - output.logConfiguration != null ? de_LogConfiguration(output.logConfiguration, context) : undefined, - logStreamName: __expectString(output.logStreamName), - memory: __expectInt32(output.memory), - mountPoints: output.mountPoints != null ? de_MountPoints(output.mountPoints, context) : undefined, - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaceList(output.networkInterfaces, context) : undefined, - privileged: __expectBoolean(output.privileged), - readonlyRootFilesystem: __expectBoolean(output.readonlyRootFilesystem), - reason: __expectString(output.reason), - resourceRequirements: - output.resourceRequirements != null ? de_ResourceRequirements(output.resourceRequirements, context) : undefined, - secrets: output.secrets != null ? de_SecretList(output.secrets, context) : undefined, - taskArn: __expectString(output.taskArn), - ulimits: output.ulimits != null ? de_Ulimits(output.ulimits, context) : undefined, - user: __expectString(output.user), - vcpus: __expectInt32(output.vcpus), - volumes: output.volumes != null ? de_Volumes(output.volumes, context) : undefined, - } as any; -}; +// de_ContainerDetail omitted. -/** - * deserializeAws_restJson1ContainerProperties - */ -const de_ContainerProperties = (output: any, context: __SerdeContext): ContainerProperties => { - return { - command: output.command != null ? de_StringList(output.command, context) : undefined, - environment: output.environment != null ? de_EnvironmentVariables(output.environment, context) : undefined, - ephemeralStorage: - output.ephemeralStorage != null ? de_EphemeralStorage(output.ephemeralStorage, context) : undefined, - executionRoleArn: __expectString(output.executionRoleArn), - fargatePlatformConfiguration: - output.fargatePlatformConfiguration != null - ? de_FargatePlatformConfiguration(output.fargatePlatformConfiguration, context) - : undefined, - image: __expectString(output.image), - instanceType: __expectString(output.instanceType), - jobRoleArn: __expectString(output.jobRoleArn), - linuxParameters: output.linuxParameters != null ? de_LinuxParameters(output.linuxParameters, context) : undefined, - logConfiguration: - output.logConfiguration != null ? de_LogConfiguration(output.logConfiguration, context) : undefined, - memory: __expectInt32(output.memory), - mountPoints: output.mountPoints != null ? de_MountPoints(output.mountPoints, context) : undefined, - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - privileged: __expectBoolean(output.privileged), - readonlyRootFilesystem: __expectBoolean(output.readonlyRootFilesystem), - resourceRequirements: - output.resourceRequirements != null ? de_ResourceRequirements(output.resourceRequirements, context) : undefined, - secrets: output.secrets != null ? de_SecretList(output.secrets, context) : undefined, - ulimits: output.ulimits != null ? de_Ulimits(output.ulimits, context) : undefined, - user: __expectString(output.user), - vcpus: __expectInt32(output.vcpus), - volumes: output.volumes != null ? de_Volumes(output.volumes, context) : undefined, - } as any; -}; +// de_ContainerProperties omitted. -/** - * deserializeAws_restJson1ContainerSummary - */ -const de_ContainerSummary = (output: any, context: __SerdeContext): ContainerSummary => { - return { - exitCode: __expectInt32(output.exitCode), - reason: __expectString(output.reason), - } as any; -}; +// de_ContainerSummary omitted. -/** - * deserializeAws_restJson1Device - */ -const de_Device = (output: any, context: __SerdeContext): Device => { - return { - containerPath: __expectString(output.containerPath), - hostPath: __expectString(output.hostPath), - permissions: output.permissions != null ? de_DeviceCgroupPermissions(output.permissions, context) : undefined, - } as any; -}; +// de_Device omitted. -/** - * deserializeAws_restJson1DeviceCgroupPermissions - */ -const de_DeviceCgroupPermissions = (output: any, context: __SerdeContext): (DeviceCgroupPermission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DeviceCgroupPermissions omitted. -/** - * deserializeAws_restJson1DevicesList - */ -const de_DevicesList = (output: any, context: __SerdeContext): Device[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Device(entry, context); - }); - return retVal; -}; +// de_DevicesList omitted. -/** - * deserializeAws_restJson1Ec2Configuration - */ -const de_Ec2Configuration = (output: any, context: __SerdeContext): Ec2Configuration => { - return { - imageIdOverride: __expectString(output.imageIdOverride), - imageKubernetesVersion: __expectString(output.imageKubernetesVersion), - imageType: __expectString(output.imageType), - } as any; -}; +// de_Ec2Configuration omitted. -/** - * deserializeAws_restJson1Ec2ConfigurationList - */ -const de_Ec2ConfigurationList = (output: any, context: __SerdeContext): Ec2Configuration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ec2Configuration(entry, context); - }); - return retVal; -}; +// de_Ec2ConfigurationList omitted. -/** - * deserializeAws_restJson1EFSAuthorizationConfig - */ -const de_EFSAuthorizationConfig = (output: any, context: __SerdeContext): EFSAuthorizationConfig => { - return { - accessPointId: __expectString(output.accessPointId), - iam: __expectString(output.iam), - } as any; -}; +// de_EFSAuthorizationConfig omitted. -/** - * deserializeAws_restJson1EFSVolumeConfiguration - */ -const de_EFSVolumeConfiguration = (output: any, context: __SerdeContext): EFSVolumeConfiguration => { - return { - authorizationConfig: - output.authorizationConfig != null ? de_EFSAuthorizationConfig(output.authorizationConfig, context) : undefined, - fileSystemId: __expectString(output.fileSystemId), - rootDirectory: __expectString(output.rootDirectory), - transitEncryption: __expectString(output.transitEncryption), - transitEncryptionPort: __expectInt32(output.transitEncryptionPort), - } as any; -}; +// de_EFSVolumeConfiguration omitted. -/** - * deserializeAws_restJson1EksAttemptContainerDetail - */ -const de_EksAttemptContainerDetail = (output: any, context: __SerdeContext): EksAttemptContainerDetail => { - return { - exitCode: __expectInt32(output.exitCode), - reason: __expectString(output.reason), - } as any; -}; +// de_EksAttemptContainerDetail omitted. -/** - * deserializeAws_restJson1EksAttemptContainerDetails - */ -const de_EksAttemptContainerDetails = (output: any, context: __SerdeContext): EksAttemptContainerDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksAttemptContainerDetail(entry, context); - }); - return retVal; -}; +// de_EksAttemptContainerDetails omitted. -/** - * deserializeAws_restJson1EksAttemptDetail - */ -const de_EksAttemptDetail = (output: any, context: __SerdeContext): EksAttemptDetail => { - return { - containers: output.containers != null ? de_EksAttemptContainerDetails(output.containers, context) : undefined, - nodeName: __expectString(output.nodeName), - podName: __expectString(output.podName), - startedAt: __expectLong(output.startedAt), - statusReason: __expectString(output.statusReason), - stoppedAt: __expectLong(output.stoppedAt), - } as any; -}; +// de_EksAttemptDetail omitted. -/** - * deserializeAws_restJson1EksAttemptDetails - */ -const de_EksAttemptDetails = (output: any, context: __SerdeContext): EksAttemptDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksAttemptDetail(entry, context); - }); - return retVal; -}; +// de_EksAttemptDetails omitted. -/** - * deserializeAws_restJson1EksConfiguration - */ -const de_EksConfiguration = (output: any, context: __SerdeContext): EksConfiguration => { - return { - eksClusterArn: __expectString(output.eksClusterArn), - kubernetesNamespace: __expectString(output.kubernetesNamespace), - } as any; -}; +// de_EksConfiguration omitted. -/** - * deserializeAws_restJson1EksContainer - */ -const de_EksContainer = (output: any, context: __SerdeContext): EksContainer => { - return { - args: output.args != null ? de_StringList(output.args, context) : undefined, - command: output.command != null ? de_StringList(output.command, context) : undefined, - env: output.env != null ? de_EksContainerEnvironmentVariables(output.env, context) : undefined, - image: __expectString(output.image), - imagePullPolicy: __expectString(output.imagePullPolicy), - name: __expectString(output.name), - resources: output.resources != null ? de_EksContainerResourceRequirements(output.resources, context) : undefined, - securityContext: - output.securityContext != null ? de_EksContainerSecurityContext(output.securityContext, context) : undefined, - volumeMounts: output.volumeMounts != null ? de_EksContainerVolumeMounts(output.volumeMounts, context) : undefined, - } as any; -}; +// de_EksContainer omitted. -/** - * deserializeAws_restJson1EksContainerDetail - */ -const de_EksContainerDetail = (output: any, context: __SerdeContext): EksContainerDetail => { - return { - args: output.args != null ? de_StringList(output.args, context) : undefined, - command: output.command != null ? de_StringList(output.command, context) : undefined, - env: output.env != null ? de_EksContainerEnvironmentVariables(output.env, context) : undefined, - exitCode: __expectInt32(output.exitCode), - image: __expectString(output.image), - imagePullPolicy: __expectString(output.imagePullPolicy), - name: __expectString(output.name), - reason: __expectString(output.reason), - resources: output.resources != null ? de_EksContainerResourceRequirements(output.resources, context) : undefined, - securityContext: - output.securityContext != null ? de_EksContainerSecurityContext(output.securityContext, context) : undefined, - volumeMounts: output.volumeMounts != null ? de_EksContainerVolumeMounts(output.volumeMounts, context) : undefined, - } as any; -}; +// de_EksContainerDetail omitted. -/** - * deserializeAws_restJson1EksContainerDetails - */ -const de_EksContainerDetails = (output: any, context: __SerdeContext): EksContainerDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksContainerDetail(entry, context); - }); - return retVal; -}; +// de_EksContainerDetails omitted. -/** - * deserializeAws_restJson1EksContainerEnvironmentVariable - */ -const de_EksContainerEnvironmentVariable = (output: any, context: __SerdeContext): EksContainerEnvironmentVariable => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_EksContainerEnvironmentVariable omitted. -/** - * deserializeAws_restJson1EksContainerEnvironmentVariables - */ -const de_EksContainerEnvironmentVariables = ( - output: any, - context: __SerdeContext -): EksContainerEnvironmentVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksContainerEnvironmentVariable(entry, context); - }); - return retVal; -}; +// de_EksContainerEnvironmentVariables omitted. -/** - * deserializeAws_restJson1EksContainerResourceRequirements - */ -const de_EksContainerResourceRequirements = ( - output: any, - context: __SerdeContext -): EksContainerResourceRequirements => { - return { - limits: output.limits != null ? de_EksLimits(output.limits, context) : undefined, - requests: output.requests != null ? de_EksRequests(output.requests, context) : undefined, - } as any; -}; +// de_EksContainerResourceRequirements omitted. -/** - * deserializeAws_restJson1EksContainers - */ -const de_EksContainers = (output: any, context: __SerdeContext): EksContainer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksContainer(entry, context); - }); - return retVal; -}; +// de_EksContainers omitted. -/** - * deserializeAws_restJson1EksContainerSecurityContext - */ -const de_EksContainerSecurityContext = (output: any, context: __SerdeContext): EksContainerSecurityContext => { - return { - privileged: __expectBoolean(output.privileged), - readOnlyRootFilesystem: __expectBoolean(output.readOnlyRootFilesystem), - runAsGroup: __expectLong(output.runAsGroup), - runAsNonRoot: __expectBoolean(output.runAsNonRoot), - runAsUser: __expectLong(output.runAsUser), - } as any; -}; +// de_EksContainerSecurityContext omitted. -/** - * deserializeAws_restJson1EksContainerVolumeMount - */ -const de_EksContainerVolumeMount = (output: any, context: __SerdeContext): EksContainerVolumeMount => { - return { - mountPath: __expectString(output.mountPath), - name: __expectString(output.name), - readOnly: __expectBoolean(output.readOnly), - } as any; -}; +// de_EksContainerVolumeMount omitted. -/** - * deserializeAws_restJson1EksContainerVolumeMounts - */ -const de_EksContainerVolumeMounts = (output: any, context: __SerdeContext): EksContainerVolumeMount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksContainerVolumeMount(entry, context); - }); - return retVal; -}; +// de_EksContainerVolumeMounts omitted. -/** - * deserializeAws_restJson1EksEmptyDir - */ -const de_EksEmptyDir = (output: any, context: __SerdeContext): EksEmptyDir => { - return { - medium: __expectString(output.medium), - sizeLimit: __expectString(output.sizeLimit), - } as any; -}; +// de_EksEmptyDir omitted. -/** - * deserializeAws_restJson1EksHostPath - */ -const de_EksHostPath = (output: any, context: __SerdeContext): EksHostPath => { - return { - path: __expectString(output.path), - } as any; -}; +// de_EksHostPath omitted. -/** - * deserializeAws_restJson1EksLabelsMap - */ -const de_EksLabelsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EksLabelsMap omitted. -/** - * deserializeAws_restJson1EksLimits - */ -const de_EksLimits = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EksLimits omitted. -/** - * deserializeAws_restJson1EksMetadata - */ -const de_EksMetadata = (output: any, context: __SerdeContext): EksMetadata => { - return { - labels: output.labels != null ? de_EksLabelsMap(output.labels, context) : undefined, - } as any; -}; +// de_EksMetadata omitted. -/** - * deserializeAws_restJson1EksPodProperties - */ -const de_EksPodProperties = (output: any, context: __SerdeContext): EksPodProperties => { - return { - containers: output.containers != null ? de_EksContainers(output.containers, context) : undefined, - dnsPolicy: __expectString(output.dnsPolicy), - hostNetwork: __expectBoolean(output.hostNetwork), - metadata: output.metadata != null ? de_EksMetadata(output.metadata, context) : undefined, - serviceAccountName: __expectString(output.serviceAccountName), - volumes: output.volumes != null ? de_EksVolumes(output.volumes, context) : undefined, - } as any; -}; +// de_EksPodProperties omitted. -/** - * deserializeAws_restJson1EksPodPropertiesDetail - */ -const de_EksPodPropertiesDetail = (output: any, context: __SerdeContext): EksPodPropertiesDetail => { - return { - containers: output.containers != null ? de_EksContainerDetails(output.containers, context) : undefined, - dnsPolicy: __expectString(output.dnsPolicy), - hostNetwork: __expectBoolean(output.hostNetwork), - metadata: output.metadata != null ? de_EksMetadata(output.metadata, context) : undefined, - nodeName: __expectString(output.nodeName), - podName: __expectString(output.podName), - serviceAccountName: __expectString(output.serviceAccountName), - volumes: output.volumes != null ? de_EksVolumes(output.volumes, context) : undefined, - } as any; -}; +// de_EksPodPropertiesDetail omitted. -/** - * deserializeAws_restJson1EksProperties - */ -const de_EksProperties = (output: any, context: __SerdeContext): EksProperties => { - return { - podProperties: output.podProperties != null ? de_EksPodProperties(output.podProperties, context) : undefined, - } as any; -}; +// de_EksProperties omitted. -/** - * deserializeAws_restJson1EksPropertiesDetail - */ -const de_EksPropertiesDetail = (output: any, context: __SerdeContext): EksPropertiesDetail => { - return { - podProperties: output.podProperties != null ? de_EksPodPropertiesDetail(output.podProperties, context) : undefined, - } as any; -}; +// de_EksPropertiesDetail omitted. -/** - * deserializeAws_restJson1EksRequests - */ -const de_EksRequests = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EksRequests omitted. -/** - * deserializeAws_restJson1EksSecret - */ -const de_EksSecret = (output: any, context: __SerdeContext): EksSecret => { - return { - optional: __expectBoolean(output.optional), - secretName: __expectString(output.secretName), - } as any; -}; +// de_EksSecret omitted. -/** - * deserializeAws_restJson1EksVolume - */ -const de_EksVolume = (output: any, context: __SerdeContext): EksVolume => { - return { - emptyDir: output.emptyDir != null ? de_EksEmptyDir(output.emptyDir, context) : undefined, - hostPath: output.hostPath != null ? de_EksHostPath(output.hostPath, context) : undefined, - name: __expectString(output.name), - secret: output.secret != null ? de_EksSecret(output.secret, context) : undefined, - } as any; -}; +// de_EksVolume omitted. -/** - * deserializeAws_restJson1EksVolumes - */ -const de_EksVolumes = (output: any, context: __SerdeContext): EksVolume[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksVolume(entry, context); - }); - return retVal; -}; +// de_EksVolumes omitted. -/** - * deserializeAws_restJson1EnvironmentVariables - */ -const de_EnvironmentVariables = (output: any, context: __SerdeContext): KeyValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValuePair(entry, context); - }); - return retVal; -}; +// de_EnvironmentVariables omitted. -/** - * deserializeAws_restJson1EphemeralStorage - */ -const de_EphemeralStorage = (output: any, context: __SerdeContext): EphemeralStorage => { - return { - sizeInGiB: __expectInt32(output.sizeInGiB), - } as any; -}; +// de_EphemeralStorage omitted. -/** - * deserializeAws_restJson1EvaluateOnExit - */ -const de_EvaluateOnExit = (output: any, context: __SerdeContext): EvaluateOnExit => { - return { - action: __expectString(output.action), - onExitCode: __expectString(output.onExitCode), - onReason: __expectString(output.onReason), - onStatusReason: __expectString(output.onStatusReason), - } as any; -}; +// de_EvaluateOnExit omitted. -/** - * deserializeAws_restJson1EvaluateOnExitList - */ -const de_EvaluateOnExitList = (output: any, context: __SerdeContext): EvaluateOnExit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluateOnExit(entry, context); - }); - return retVal; -}; +// de_EvaluateOnExitList omitted. /** * deserializeAws_restJson1FairsharePolicy */ const de_FairsharePolicy = (output: any, context: __SerdeContext): FairsharePolicy => { - return { - computeReservation: __expectInt32(output.computeReservation), - shareDecaySeconds: __expectInt32(output.shareDecaySeconds), - shareDistribution: - output.shareDistribution != null ? de_ShareAttributesList(output.shareDistribution, context) : undefined, - } as any; + return take(output, { + computeReservation: __expectInt32, + shareDecaySeconds: __expectInt32, + shareDistribution: (_: any) => de_ShareAttributesList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1FargatePlatformConfiguration - */ -const de_FargatePlatformConfiguration = (output: any, context: __SerdeContext): FargatePlatformConfiguration => { - return { - platformVersion: __expectString(output.platformVersion), - } as any; -}; +// de_FargatePlatformConfiguration omitted. -/** - * deserializeAws_restJson1Host - */ -const de_Host = (output: any, context: __SerdeContext): Host => { - return { - sourcePath: __expectString(output.sourcePath), - } as any; -}; +// de_Host omitted. -/** - * deserializeAws_restJson1JobDefinition - */ -const de_JobDefinition = (output: any, context: __SerdeContext): JobDefinition => { - return { - containerOrchestrationType: __expectString(output.containerOrchestrationType), - containerProperties: - output.containerProperties != null ? de_ContainerProperties(output.containerProperties, context) : undefined, - eksProperties: output.eksProperties != null ? de_EksProperties(output.eksProperties, context) : undefined, - jobDefinitionArn: __expectString(output.jobDefinitionArn), - jobDefinitionName: __expectString(output.jobDefinitionName), - nodeProperties: output.nodeProperties != null ? de_NodeProperties(output.nodeProperties, context) : undefined, - parameters: output.parameters != null ? de_ParametersMap(output.parameters, context) : undefined, - platformCapabilities: - output.platformCapabilities != null ? de_PlatformCapabilityList(output.platformCapabilities, context) : undefined, - propagateTags: __expectBoolean(output.propagateTags), - retryStrategy: output.retryStrategy != null ? de_RetryStrategy(output.retryStrategy, context) : undefined, - revision: __expectInt32(output.revision), - schedulingPriority: __expectInt32(output.schedulingPriority), - status: __expectString(output.status), - tags: output.tags != null ? de_TagrisTagsMap(output.tags, context) : undefined, - timeout: output.timeout != null ? de_JobTimeout(output.timeout, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_JobDefinition omitted. -/** - * deserializeAws_restJson1JobDefinitionList - */ -const de_JobDefinitionList = (output: any, context: __SerdeContext): JobDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobDefinition(entry, context); - }); - return retVal; -}; +// de_JobDefinitionList omitted. -/** - * deserializeAws_restJson1JobDependency - */ -const de_JobDependency = (output: any, context: __SerdeContext): JobDependency => { - return { - jobId: __expectString(output.jobId), - type: __expectString(output.type), - } as any; -}; +// de_JobDependency omitted. -/** - * deserializeAws_restJson1JobDependencyList - */ -const de_JobDependencyList = (output: any, context: __SerdeContext): JobDependency[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobDependency(entry, context); - }); - return retVal; -}; +// de_JobDependencyList omitted. -/** - * deserializeAws_restJson1JobDetail - */ -const de_JobDetail = (output: any, context: __SerdeContext): JobDetail => { - return { - arrayProperties: - output.arrayProperties != null ? de_ArrayPropertiesDetail(output.arrayProperties, context) : undefined, - attempts: output.attempts != null ? de_AttemptDetails(output.attempts, context) : undefined, - container: output.container != null ? de_ContainerDetail(output.container, context) : undefined, - createdAt: __expectLong(output.createdAt), - dependsOn: output.dependsOn != null ? de_JobDependencyList(output.dependsOn, context) : undefined, - eksAttempts: output.eksAttempts != null ? de_EksAttemptDetails(output.eksAttempts, context) : undefined, - eksProperties: output.eksProperties != null ? de_EksPropertiesDetail(output.eksProperties, context) : undefined, - isCancelled: __expectBoolean(output.isCancelled), - isTerminated: __expectBoolean(output.isTerminated), - jobArn: __expectString(output.jobArn), - jobDefinition: __expectString(output.jobDefinition), - jobId: __expectString(output.jobId), - jobName: __expectString(output.jobName), - jobQueue: __expectString(output.jobQueue), - nodeDetails: output.nodeDetails != null ? de_NodeDetails(output.nodeDetails, context) : undefined, - nodeProperties: output.nodeProperties != null ? de_NodeProperties(output.nodeProperties, context) : undefined, - parameters: output.parameters != null ? de_ParametersMap(output.parameters, context) : undefined, - platformCapabilities: - output.platformCapabilities != null ? de_PlatformCapabilityList(output.platformCapabilities, context) : undefined, - propagateTags: __expectBoolean(output.propagateTags), - retryStrategy: output.retryStrategy != null ? de_RetryStrategy(output.retryStrategy, context) : undefined, - schedulingPriority: __expectInt32(output.schedulingPriority), - shareIdentifier: __expectString(output.shareIdentifier), - startedAt: __expectLong(output.startedAt), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - stoppedAt: __expectLong(output.stoppedAt), - tags: output.tags != null ? de_TagrisTagsMap(output.tags, context) : undefined, - timeout: output.timeout != null ? de_JobTimeout(output.timeout, context) : undefined, - } as any; -}; +// de_JobDetail omitted. -/** - * deserializeAws_restJson1JobDetailList - */ -const de_JobDetailList = (output: any, context: __SerdeContext): JobDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobDetail(entry, context); - }); - return retVal; -}; +// de_JobDetailList omitted. -/** - * deserializeAws_restJson1JobQueueDetail - */ -const de_JobQueueDetail = (output: any, context: __SerdeContext): JobQueueDetail => { - return { - computeEnvironmentOrder: - output.computeEnvironmentOrder != null - ? de_ComputeEnvironmentOrders(output.computeEnvironmentOrder, context) - : undefined, - jobQueueArn: __expectString(output.jobQueueArn), - jobQueueName: __expectString(output.jobQueueName), - priority: __expectInt32(output.priority), - schedulingPolicyArn: __expectString(output.schedulingPolicyArn), - state: __expectString(output.state), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - tags: output.tags != null ? de_TagrisTagsMap(output.tags, context) : undefined, - } as any; -}; +// de_JobQueueDetail omitted. -/** - * deserializeAws_restJson1JobQueueDetailList - */ -const de_JobQueueDetailList = (output: any, context: __SerdeContext): JobQueueDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobQueueDetail(entry, context); - }); - return retVal; -}; +// de_JobQueueDetailList omitted. -/** - * deserializeAws_restJson1JobSummary - */ -const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { - return { - arrayProperties: - output.arrayProperties != null ? de_ArrayPropertiesSummary(output.arrayProperties, context) : undefined, - container: output.container != null ? de_ContainerSummary(output.container, context) : undefined, - createdAt: __expectLong(output.createdAt), - jobArn: __expectString(output.jobArn), - jobDefinition: __expectString(output.jobDefinition), - jobId: __expectString(output.jobId), - jobName: __expectString(output.jobName), - nodeProperties: - output.nodeProperties != null ? de_NodePropertiesSummary(output.nodeProperties, context) : undefined, - startedAt: __expectLong(output.startedAt), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - stoppedAt: __expectLong(output.stoppedAt), - } as any; -}; +// de_JobSummary omitted. -/** - * deserializeAws_restJson1JobSummaryList - */ -const de_JobSummaryList = (output: any, context: __SerdeContext): JobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobSummary(entry, context); - }); - return retVal; -}; +// de_JobSummaryList omitted. -/** - * deserializeAws_restJson1JobTimeout - */ -const de_JobTimeout = (output: any, context: __SerdeContext): JobTimeout => { - return { - attemptDurationSeconds: __expectInt32(output.attemptDurationSeconds), - } as any; -}; +// de_JobTimeout omitted. -/** - * deserializeAws_restJson1KeyValuePair - */ -const de_KeyValuePair = (output: any, context: __SerdeContext): KeyValuePair => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_KeyValuePair omitted. -/** - * deserializeAws_restJson1LaunchTemplateSpecification - */ -const de_LaunchTemplateSpecification = (output: any, context: __SerdeContext): LaunchTemplateSpecification => { - return { - launchTemplateId: __expectString(output.launchTemplateId), - launchTemplateName: __expectString(output.launchTemplateName), - version: __expectString(output.version), - } as any; -}; +// de_LaunchTemplateSpecification omitted. -/** - * deserializeAws_restJson1LinuxParameters - */ -const de_LinuxParameters = (output: any, context: __SerdeContext): LinuxParameters => { - return { - devices: output.devices != null ? de_DevicesList(output.devices, context) : undefined, - initProcessEnabled: __expectBoolean(output.initProcessEnabled), - maxSwap: __expectInt32(output.maxSwap), - sharedMemorySize: __expectInt32(output.sharedMemorySize), - swappiness: __expectInt32(output.swappiness), - tmpfs: output.tmpfs != null ? de_TmpfsList(output.tmpfs, context) : undefined, - } as any; -}; +// de_LinuxParameters omitted. -/** - * deserializeAws_restJson1LogConfiguration - */ -const de_LogConfiguration = (output: any, context: __SerdeContext): LogConfiguration => { - return { - logDriver: __expectString(output.logDriver), - options: output.options != null ? de_LogConfigurationOptionsMap(output.options, context) : undefined, - secretOptions: output.secretOptions != null ? de_SecretList(output.secretOptions, context) : undefined, - } as any; -}; +// de_LogConfiguration omitted. -/** - * deserializeAws_restJson1LogConfigurationOptionsMap - */ -const de_LogConfigurationOptionsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_LogConfigurationOptionsMap omitted. -/** - * deserializeAws_restJson1MountPoint - */ -const de_MountPoint = (output: any, context: __SerdeContext): MountPoint => { - return { - containerPath: __expectString(output.containerPath), - readOnly: __expectBoolean(output.readOnly), - sourceVolume: __expectString(output.sourceVolume), - } as any; -}; +// de_MountPoint omitted. -/** - * deserializeAws_restJson1MountPoints - */ -const de_MountPoints = (output: any, context: __SerdeContext): MountPoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MountPoint(entry, context); - }); - return retVal; -}; +// de_MountPoints omitted. -/** - * deserializeAws_restJson1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - assignPublicIp: __expectString(output.assignPublicIp), - } as any; -}; +// de_NetworkConfiguration omitted. -/** - * deserializeAws_restJson1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - attachmentId: __expectString(output.attachmentId), - ipv6Address: __expectString(output.ipv6Address), - privateIpv4Address: __expectString(output.privateIpv4Address), - } as any; -}; +// de_NetworkInterface omitted. -/** - * deserializeAws_restJson1NetworkInterfaceList - */ -const de_NetworkInterfaceList = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; -}; +// de_NetworkInterfaceList omitted. -/** - * deserializeAws_restJson1NodeDetails - */ -const de_NodeDetails = (output: any, context: __SerdeContext): NodeDetails => { - return { - isMainNode: __expectBoolean(output.isMainNode), - nodeIndex: __expectInt32(output.nodeIndex), - } as any; -}; +// de_NodeDetails omitted. -/** - * deserializeAws_restJson1NodeProperties - */ -const de_NodeProperties = (output: any, context: __SerdeContext): NodeProperties => { - return { - mainNode: __expectInt32(output.mainNode), - nodeRangeProperties: - output.nodeRangeProperties != null ? de_NodeRangeProperties(output.nodeRangeProperties, context) : undefined, - numNodes: __expectInt32(output.numNodes), - } as any; -}; +// de_NodeProperties omitted. -/** - * deserializeAws_restJson1NodePropertiesSummary - */ -const de_NodePropertiesSummary = (output: any, context: __SerdeContext): NodePropertiesSummary => { - return { - isMainNode: __expectBoolean(output.isMainNode), - nodeIndex: __expectInt32(output.nodeIndex), - numNodes: __expectInt32(output.numNodes), - } as any; -}; +// de_NodePropertiesSummary omitted. -/** - * deserializeAws_restJson1NodeRangeProperties - */ -const de_NodeRangeProperties = (output: any, context: __SerdeContext): NodeRangeProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NodeRangeProperty(entry, context); - }); - return retVal; -}; +// de_NodeRangeProperties omitted. -/** - * deserializeAws_restJson1NodeRangeProperty - */ -const de_NodeRangeProperty = (output: any, context: __SerdeContext): NodeRangeProperty => { - return { - container: output.container != null ? de_ContainerProperties(output.container, context) : undefined, - targetNodes: __expectString(output.targetNodes), - } as any; -}; +// de_NodeRangeProperty omitted. -/** - * deserializeAws_restJson1ParametersMap - */ -const de_ParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ParametersMap omitted. -/** - * deserializeAws_restJson1PlatformCapabilityList - */ -const de_PlatformCapabilityList = (output: any, context: __SerdeContext): (PlatformCapability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PlatformCapabilityList omitted. -/** - * deserializeAws_restJson1ResourceRequirement - */ -const de_ResourceRequirement = (output: any, context: __SerdeContext): ResourceRequirement => { - return { - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// de_ResourceRequirement omitted. -/** - * deserializeAws_restJson1ResourceRequirements - */ -const de_ResourceRequirements = (output: any, context: __SerdeContext): ResourceRequirement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceRequirement(entry, context); - }); - return retVal; -}; +// de_ResourceRequirements omitted. -/** - * deserializeAws_restJson1RetryStrategy - */ -const de_RetryStrategy = (output: any, context: __SerdeContext): RetryStrategy => { - return { - attempts: __expectInt32(output.attempts), - evaluateOnExit: output.evaluateOnExit != null ? de_EvaluateOnExitList(output.evaluateOnExit, context) : undefined, - } as any; -}; +// de_RetryStrategy omitted. /** * deserializeAws_restJson1SchedulingPolicyDetail */ const de_SchedulingPolicyDetail = (output: any, context: __SerdeContext): SchedulingPolicyDetail => { - return { - arn: __expectString(output.arn), - fairsharePolicy: output.fairsharePolicy != null ? de_FairsharePolicy(output.fairsharePolicy, context) : undefined, - name: __expectString(output.name), - tags: output.tags != null ? de_TagrisTagsMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + fairsharePolicy: (_: any) => de_FairsharePolicy(_, context), + name: __expectString, + tags: _json, + }) as any; }; /** @@ -4398,74 +2522,27 @@ const de_SchedulingPolicyDetailList = (output: any, context: __SerdeContext): Sc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SchedulingPolicyDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SchedulingPolicyListingDetail - */ -const de_SchedulingPolicyListingDetail = (output: any, context: __SerdeContext): SchedulingPolicyListingDetail => { - return { - arn: __expectString(output.arn), - } as any; -}; +// de_SchedulingPolicyListingDetail omitted. -/** - * deserializeAws_restJson1SchedulingPolicyListingDetailList - */ -const de_SchedulingPolicyListingDetailList = ( - output: any, - context: __SerdeContext -): SchedulingPolicyListingDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchedulingPolicyListingDetail(entry, context); - }); - return retVal; -}; +// de_SchedulingPolicyListingDetailList omitted. -/** - * deserializeAws_restJson1Secret - */ -const de_Secret = (output: any, context: __SerdeContext): Secret => { - return { - name: __expectString(output.name), - valueFrom: __expectString(output.valueFrom), - } as any; -}; +// de_Secret omitted. -/** - * deserializeAws_restJson1SecretList - */ -const de_SecretList = (output: any, context: __SerdeContext): Secret[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Secret(entry, context); - }); - return retVal; -}; +// de_SecretList omitted. /** * deserializeAws_restJson1ShareAttributes */ const de_ShareAttributes = (output: any, context: __SerdeContext): ShareAttributes => { - return { - shareIdentifier: __expectString(output.shareIdentifier), - weightFactor: __limitedParseFloat32(output.weightFactor), - } as any; + return take(output, { + shareIdentifier: __expectString, + weightFactor: __limitedParseFloat32, + }) as any; }; /** @@ -4475,145 +2552,30 @@ const de_ShareAttributesList = (output: any, context: __SerdeContext): ShareAttr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ShareAttributes(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1TagrisTagsMap - */ -const de_TagrisTagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagrisTagsMap omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. -/** - * deserializeAws_restJson1Tmpfs - */ -const de_Tmpfs = (output: any, context: __SerdeContext): Tmpfs => { - return { - containerPath: __expectString(output.containerPath), - mountOptions: output.mountOptions != null ? de_StringList(output.mountOptions, context) : undefined, - size: __expectInt32(output.size), - } as any; -}; +// de_Tmpfs omitted. -/** - * deserializeAws_restJson1TmpfsList - */ -const de_TmpfsList = (output: any, context: __SerdeContext): Tmpfs[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tmpfs(entry, context); - }); - return retVal; -}; +// de_TmpfsList omitted. -/** - * deserializeAws_restJson1Ulimit - */ -const de_Ulimit = (output: any, context: __SerdeContext): Ulimit => { - return { - hardLimit: __expectInt32(output.hardLimit), - name: __expectString(output.name), - softLimit: __expectInt32(output.softLimit), - } as any; -}; +// de_Ulimit omitted. -/** - * deserializeAws_restJson1Ulimits - */ -const de_Ulimits = (output: any, context: __SerdeContext): Ulimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ulimit(entry, context); - }); - return retVal; -}; +// de_Ulimits omitted. -/** - * deserializeAws_restJson1UpdatePolicy - */ -const de_UpdatePolicy = (output: any, context: __SerdeContext): UpdatePolicy => { - return { - jobExecutionTimeoutMinutes: __expectLong(output.jobExecutionTimeoutMinutes), - terminateJobsOnUpdate: __expectBoolean(output.terminateJobsOnUpdate), - } as any; -}; +// de_UpdatePolicy omitted. -/** - * deserializeAws_restJson1Volume - */ -const de_Volume = (output: any, context: __SerdeContext): Volume => { - return { - efsVolumeConfiguration: - output.efsVolumeConfiguration != null - ? de_EFSVolumeConfiguration(output.efsVolumeConfiguration, context) - : undefined, - host: output.host != null ? de_Host(output.host, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_Volume omitted. -/** - * deserializeAws_restJson1Volumes - */ -const de_Volumes = (output: any, context: __SerdeContext): Volume[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Volume(entry, context); - }); - return retVal; -}; +// de_Volumes omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-billingconductor/src/protocols/Aws_restJson1.ts b/clients/client-billingconductor/src/protocols/Aws_restJson1.ts index 9f9a9e38b2b7..5022308bc204 100644 --- a/clients/client-billingconductor/src/protocols/Aws_restJson1.ts +++ b/clients/client-billingconductor/src/protocols/Aws_restJson1.ts @@ -1,19 +1,20 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -104,12 +105,7 @@ import { UpdatePricingRuleCommandInput, UpdatePricingRuleCommandOutput } from ". import { BillingconductorServiceException as __BaseException } from "../models/BillingconductorServiceException"; import { AccessDeniedException, - AccountAssociationsListElement, AccountGrouping, - AssociateResourceError, - AssociateResourceResponseElement, - BillingGroupCostReportElement, - BillingGroupListElement, BillingGroupStatus, ComputationPreference, ConflictException, @@ -121,8 +117,6 @@ import { CustomLineItemListElement, CustomLineItemPercentageChargeDetails, CustomLineItemVersionListElement, - DisassociateResourceResponseElement, - FreeTierConfig, InternalServerException, ListAccountAssociationsFilter, ListBillingGroupCostReportsFilter, @@ -136,20 +130,16 @@ import { ListPricingPlansFilter, ListPricingRulesFilter, ListResourcesAssociatedToCustomLineItemFilter, - ListResourcesAssociatedToCustomLineItemResponseElement, - PricingPlanListElement, PricingRuleListElement, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, - Tiering, UpdateCustomLineItemChargeDetails, UpdateCustomLineItemFlatChargeDetails, UpdateCustomLineItemPercentageChargeDetails, UpdateFreeTierConfig, UpdateTieringInput, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -165,10 +155,12 @@ export const se_AssociateAccountsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associate-accounts"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -194,12 +186,12 @@ export const se_AssociatePricingRulesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associate-pricing-rules"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.PricingRuleArns != null && { - PricingRuleArns: se_PricingRuleArnsNonEmptyInput(input.PricingRuleArns, context), - }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + PricingRuleArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -226,15 +218,13 @@ export const se_BatchAssociateResourcesToCustomLineItemCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batch-associate-resources-to-custom-line-item"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriodRange != null && { - BillingPeriodRange: se_CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context), - }), - ...(input.ResourceArns != null && { - ResourceArns: se_CustomLineItemBatchAssociationsList(input.ResourceArns, context), - }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + BillingPeriodRange: (_) => _json(_), + ResourceArns: (_) => _json(_), + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -261,15 +251,13 @@ export const se_BatchDisassociateResourcesFromCustomLineItemCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batch-disassociate-resources-from-custom-line-item"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriodRange != null && { - BillingPeriodRange: se_CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context), - }), - ...(input.ResourceArns != null && { - ResourceArns: se_CustomLineItemBatchDisassociationsList(input.ResourceArns, context), - }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + BillingPeriodRange: (_) => _json(_), + ResourceArns: (_) => _json(_), + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -295,16 +283,16 @@ export const se_CreateBillingGroupCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-billing-group"; let body: any; - body = JSON.stringify({ - ...(input.AccountGrouping != null && { AccountGrouping: se_AccountGrouping(input.AccountGrouping, context) }), - ...(input.ComputationPreference != null && { - ComputationPreference: se_ComputationPreference(input.ComputationPreference, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PrimaryAccountId != null && { PrimaryAccountId: input.PrimaryAccountId }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AccountGrouping: (_) => _json(_), + ComputationPreference: (_) => _json(_), + Description: [], + Name: [], + PrimaryAccountId: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -331,16 +319,16 @@ export const se_CreateCustomLineItemCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-custom-line-item"; let body: any; - body = JSON.stringify({ - ...(input.BillingGroupArn != null && { BillingGroupArn: input.BillingGroupArn }), - ...(input.BillingPeriodRange != null && { - BillingPeriodRange: se_CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context), - }), - ...(input.ChargeDetails != null && { ChargeDetails: se_CustomLineItemChargeDetails(input.ChargeDetails, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + BillingGroupArn: [], + BillingPeriodRange: (_) => _json(_), + ChargeDetails: (_) => se_CustomLineItemChargeDetails(_, context), + Description: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -366,12 +354,14 @@ export const se_CreatePricingPlanCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-plan"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PricingRuleArns != null && { PricingRuleArns: se_PricingRuleArnsInput(input.PricingRuleArns, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + PricingRuleArns: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -397,19 +387,21 @@ export const se_CreatePricingRuleCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-pricing-rule"; let body: any; - body = JSON.stringify({ - ...(input.BillingEntity != null && { BillingEntity: input.BillingEntity }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ModifierPercentage != null && { ModifierPercentage: __serializeFloat(input.ModifierPercentage) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.Service != null && { Service: input.Service }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Tiering != null && { Tiering: se_CreateTieringInput(input.Tiering, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.UsageType != null && { UsageType: input.UsageType }), - }); + body = JSON.stringify( + take(input, { + BillingEntity: [], + Description: [], + ModifierPercentage: (_) => __serializeFloat(_), + Name: [], + Operation: [], + Scope: [], + Service: [], + Tags: (_) => _json(_), + Tiering: (_) => _json(_), + Type: [], + UsageType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -434,9 +426,11 @@ export const se_DeleteBillingGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-billing-group"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -462,12 +456,12 @@ export const se_DeleteCustomLineItemCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-custom-line-item"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.BillingPeriodRange != null && { - BillingPeriodRange: se_CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context), - }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + BillingPeriodRange: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -492,9 +486,11 @@ export const se_DeletePricingPlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-plan"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -519,9 +515,11 @@ export const se_DeletePricingRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-pricing-rule"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -546,10 +544,12 @@ export const se_DisassociateAccountsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-accounts"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -575,12 +575,12 @@ export const se_DisassociatePricingRulesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociate-pricing-rules"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.PricingRuleArns != null && { - PricingRuleArns: se_PricingRuleArnsNonEmptyInput(input.PricingRuleArns, context), - }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + PricingRuleArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -606,11 +606,13 @@ export const se_ListAccountAssociationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-account-associations"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListAccountAssociationsFilter(input.Filters, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + Filters: (_) => _json(_), + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -636,12 +638,14 @@ export const se_ListBillingGroupCostReportsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-group-cost-reports"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListBillingGroupCostReportsFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -666,12 +670,14 @@ export const se_ListBillingGroupsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-billing-groups"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListBillingGroupsFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -697,12 +703,14 @@ export const se_ListCustomLineItemsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-items"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListCustomLineItemsFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -728,12 +736,14 @@ export const se_ListCustomLineItemVersionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-custom-line-item-versions"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Filters != null && { Filters: se_ListCustomLineItemVersionsFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -758,12 +768,14 @@ export const se_ListPricingPlansCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-plans"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListPricingPlansFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -790,12 +802,14 @@ export const se_ListPricingPlansAssociatedWithPricingRuleCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-plans-associated-with-pricing-rule"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PricingRuleArn != null && { PricingRuleArn: input.PricingRuleArn }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + MaxResults: [], + NextToken: [], + PricingRuleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -820,12 +834,14 @@ export const se_ListPricingRulesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-rules"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListPricingRulesFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -852,12 +868,14 @@ export const se_ListPricingRulesAssociatedToPricingPlanCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-pricing-rules-associated-to-pricing-plan"; let body: any; - body = JSON.stringify({ - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PricingPlanArn != null && { PricingPlanArn: input.PricingPlanArn }), - }); + body = JSON.stringify( + take(input, { + BillingPeriod: [], + MaxResults: [], + NextToken: [], + PricingPlanArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -884,13 +902,15 @@ export const se_ListResourcesAssociatedToCustomLineItemCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-resources-associated-to-custom-line-item"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.BillingPeriod != null && { BillingPeriod: input.BillingPeriod }), - ...(input.Filters != null && { Filters: se_ListResourcesAssociatedToCustomLineItemFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + BillingPeriod: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -939,9 +959,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -996,15 +1018,15 @@ export const se_UpdateBillingGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-billing-group"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ComputationPreference != null && { - ComputationPreference: se_ComputationPreference(input.ComputationPreference, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Status != null && { Status: input.Status }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + ComputationPreference: (_) => _json(_), + Description: [], + Name: [], + Status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1030,17 +1052,15 @@ export const se_UpdateCustomLineItemCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-custom-line-item"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.BillingPeriodRange != null && { - BillingPeriodRange: se_CustomLineItemBillingPeriodRange(input.BillingPeriodRange, context), - }), - ...(input.ChargeDetails != null && { - ChargeDetails: se_UpdateCustomLineItemChargeDetails(input.ChargeDetails, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + BillingPeriodRange: (_) => _json(_), + ChargeDetails: (_) => se_UpdateCustomLineItemChargeDetails(_, context), + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1065,11 +1085,13 @@ export const se_UpdatePricingPlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-plan"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1094,14 +1116,16 @@ export const se_UpdatePricingRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-pricing-rule"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ModifierPercentage != null && { ModifierPercentage: __serializeFloat(input.ModifierPercentage) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tiering != null && { Tiering: se_UpdateTieringInput(input.Tiering, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + Description: [], + ModifierPercentage: (_) => __serializeFloat(_), + Name: [], + Tiering: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1127,9 +1151,10 @@ export const de_AssociateAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1169,10 +1194,9 @@ const de_AssociateAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1192,9 +1216,10 @@ export const de_AssociatePricingRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1234,10 +1259,9 @@ const de_AssociatePricingRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1257,15 +1281,11 @@ export const de_BatchAssociateResourcesToCustomLineItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FailedAssociatedResources != null) { - contents.FailedAssociatedResources = de_AssociateResourcesResponseList(data.FailedAssociatedResources, context); - } - if (data.SuccessfullyAssociatedResources != null) { - contents.SuccessfullyAssociatedResources = de_AssociateResourcesResponseList( - data.SuccessfullyAssociatedResources, - context - ); - } + const doc = take(data, { + FailedAssociatedResources: _json, + SuccessfullyAssociatedResources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1305,10 +1325,9 @@ const de_BatchAssociateResourcesToCustomLineItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1328,18 +1347,11 @@ export const de_BatchDisassociateResourcesFromCustomLineItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FailedDisassociatedResources != null) { - contents.FailedDisassociatedResources = de_DisassociateResourcesResponseList( - data.FailedDisassociatedResources, - context - ); - } - if (data.SuccessfullyDisassociatedResources != null) { - contents.SuccessfullyDisassociatedResources = de_DisassociateResourcesResponseList( - data.SuccessfullyDisassociatedResources, - context - ); - } + const doc = take(data, { + FailedDisassociatedResources: _json, + SuccessfullyDisassociatedResources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1376,10 +1388,9 @@ const de_BatchDisassociateResourcesFromCustomLineItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1399,9 +1410,10 @@ export const de_CreateBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1438,10 +1450,9 @@ const de_CreateBillingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1461,9 +1472,10 @@ export const de_CreateCustomLineItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1500,10 +1512,9 @@ const de_CreateCustomLineItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1523,9 +1534,10 @@ export const de_CreatePricingPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1565,10 +1577,9 @@ const de_CreatePricingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1588,9 +1599,10 @@ export const de_CreatePricingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1627,10 +1639,9 @@ const de_CreatePricingRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1650,9 +1661,10 @@ export const de_DeleteBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1683,10 +1695,9 @@ const de_DeleteBillingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1706,9 +1717,10 @@ export const de_DeleteCustomLineItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1742,10 +1754,9 @@ const de_DeleteCustomLineItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1765,9 +1776,10 @@ export const de_DeletePricingPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1801,10 +1813,9 @@ const de_DeletePricingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1824,9 +1835,10 @@ export const de_DeletePricingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1860,10 +1872,9 @@ const de_DeletePricingRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1883,9 +1894,10 @@ export const de_DisassociateAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1922,10 +1934,9 @@ const de_DisassociateAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1945,9 +1956,10 @@ export const de_DisassociatePricingRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1984,10 +1996,9 @@ const de_DisassociatePricingRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2007,12 +2018,11 @@ export const de_ListAccountAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LinkedAccounts != null) { - contents.LinkedAccounts = de_AccountAssociationsList(data.LinkedAccounts, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LinkedAccounts: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2046,10 +2056,9 @@ const de_ListAccountAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2069,12 +2078,11 @@ export const de_ListBillingGroupCostReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BillingGroupCostReports != null) { - contents.BillingGroupCostReports = de_BillingGroupCostReportList(data.BillingGroupCostReports, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BillingGroupCostReports: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2108,10 +2116,9 @@ const de_ListBillingGroupCostReportsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2131,12 +2138,11 @@ export const de_ListBillingGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BillingGroups != null) { - contents.BillingGroups = de_BillingGroupList(data.BillingGroups, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BillingGroups: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2170,10 +2176,9 @@ const de_ListBillingGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2193,12 +2198,11 @@ export const de_ListCustomLineItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomLineItems != null) { - contents.CustomLineItems = de_CustomLineItemList(data.CustomLineItems, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CustomLineItems: (_) => de_CustomLineItemList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2232,10 +2236,9 @@ const de_ListCustomLineItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2255,12 +2258,11 @@ export const de_ListCustomLineItemVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomLineItemVersions != null) { - contents.CustomLineItemVersions = de_CustomLineItemVersionList(data.CustomLineItemVersions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CustomLineItemVersions: (_) => de_CustomLineItemVersionList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2291,10 +2293,9 @@ const de_ListCustomLineItemVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2314,15 +2315,12 @@ export const de_ListPricingPlansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BillingPeriod != null) { - contents.BillingPeriod = __expectString(data.BillingPeriod); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PricingPlans != null) { - contents.PricingPlans = de_PricingPlanList(data.PricingPlans, context); - } + const doc = take(data, { + BillingPeriod: __expectString, + NextToken: __expectString, + PricingPlans: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2353,10 +2351,9 @@ const de_ListPricingPlansCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2376,18 +2373,13 @@ export const de_ListPricingPlansAssociatedWithPricingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BillingPeriod != null) { - contents.BillingPeriod = __expectString(data.BillingPeriod); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PricingPlanArns != null) { - contents.PricingPlanArns = de_PricingPlanArns(data.PricingPlanArns, context); - } - if (data.PricingRuleArn != null) { - contents.PricingRuleArn = __expectString(data.PricingRuleArn); - } + const doc = take(data, { + BillingPeriod: __expectString, + NextToken: __expectString, + PricingPlanArns: _json, + PricingRuleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2421,10 +2413,9 @@ const de_ListPricingPlansAssociatedWithPricingRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2444,15 +2435,12 @@ export const de_ListPricingRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BillingPeriod != null) { - contents.BillingPeriod = __expectString(data.BillingPeriod); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PricingRules != null) { - contents.PricingRules = de_PricingRuleList(data.PricingRules, context); - } + const doc = take(data, { + BillingPeriod: __expectString, + NextToken: __expectString, + PricingRules: (_) => de_PricingRuleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2483,10 +2471,9 @@ const de_ListPricingRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2506,18 +2493,13 @@ export const de_ListPricingRulesAssociatedToPricingPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BillingPeriod != null) { - contents.BillingPeriod = __expectString(data.BillingPeriod); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PricingPlanArn != null) { - contents.PricingPlanArn = __expectString(data.PricingPlanArn); - } - if (data.PricingRuleArns != null) { - contents.PricingRuleArns = de_PricingRuleArns(data.PricingRuleArns, context); - } + const doc = take(data, { + BillingPeriod: __expectString, + NextToken: __expectString, + PricingPlanArn: __expectString, + PricingRuleArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2551,10 +2533,9 @@ const de_ListPricingRulesAssociatedToPricingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2574,18 +2555,12 @@ export const de_ListResourcesAssociatedToCustomLineItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssociatedResources != null) { - contents.AssociatedResources = de_ListResourcesAssociatedToCustomLineItemResponseList( - data.AssociatedResources, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Arn: __expectString, + AssociatedResources: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2619,10 +2594,9 @@ const de_ListResourcesAssociatedToCustomLineItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2642,9 +2616,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2678,10 +2653,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2734,10 +2708,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2790,10 +2763,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2813,33 +2785,18 @@ export const de_UpdateBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectLong(data.LastModifiedTime); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PricingPlanArn != null) { - contents.PricingPlanArn = __expectString(data.PricingPlanArn); - } - if (data.PrimaryAccountId != null) { - contents.PrimaryAccountId = __expectString(data.PrimaryAccountId); - } - if (data.Size != null) { - contents.Size = __expectLong(data.Size); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusReason != null) { - contents.StatusReason = __expectString(data.StatusReason); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + LastModifiedTime: __expectLong, + Name: __expectString, + PricingPlanArn: __expectString, + PrimaryAccountId: __expectString, + Size: __expectLong, + Status: __expectString, + StatusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2876,10 +2833,9 @@ const de_UpdateBillingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2899,27 +2855,16 @@ export const de_UpdateCustomLineItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssociationSize != null) { - contents.AssociationSize = __expectLong(data.AssociationSize); - } - if (data.BillingGroupArn != null) { - contents.BillingGroupArn = __expectString(data.BillingGroupArn); - } - if (data.ChargeDetails != null) { - contents.ChargeDetails = de_ListCustomLineItemChargeDetails(data.ChargeDetails, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectLong(data.LastModifiedTime); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + AssociationSize: __expectLong, + BillingGroupArn: __expectString, + ChargeDetails: (_) => de_ListCustomLineItemChargeDetails(_, context), + Description: __expectString, + LastModifiedTime: __expectLong, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2953,10 +2898,9 @@ const de_UpdateCustomLineItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2976,21 +2920,14 @@ export const de_UpdatePricingPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectLong(data.LastModifiedTime); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Size != null) { - contents.Size = __expectLong(data.Size); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + LastModifiedTime: __expectLong, + Name: __expectString, + Size: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -3027,10 +2964,9 @@ const de_UpdatePricingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3050,45 +2986,22 @@ export const de_UpdatePricingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssociatedPricingPlanCount != null) { - contents.AssociatedPricingPlanCount = __expectLong(data.AssociatedPricingPlanCount); - } - if (data.BillingEntity != null) { - contents.BillingEntity = __expectString(data.BillingEntity); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectLong(data.LastModifiedTime); - } - if (data.ModifierPercentage != null) { - contents.ModifierPercentage = __limitedParseDouble(data.ModifierPercentage); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Operation != null) { - contents.Operation = __expectString(data.Operation); - } - if (data.Scope != null) { - contents.Scope = __expectString(data.Scope); - } - if (data.Service != null) { - contents.Service = __expectString(data.Service); - } - if (data.Tiering != null) { - contents.Tiering = de_UpdateTieringInput(data.Tiering, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.UsageType != null) { - contents.UsageType = __expectString(data.UsageType); - } + const doc = take(data, { + Arn: __expectString, + AssociatedPricingPlanCount: __expectLong, + BillingEntity: __expectString, + Description: __expectString, + LastModifiedTime: __expectLong, + ModifierPercentage: __limitedParseDouble, + Name: __expectString, + Operation: __expectString, + Scope: __expectString, + Service: __expectString, + Tiering: _json, + Type: __expectString, + UsageType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3125,16 +3038,15 @@ const de_UpdatePricingRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3144,9 +3056,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3160,18 +3073,13 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3193,9 +3101,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3212,15 +3121,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3237,21 +3143,14 @@ const de_ServiceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.LimitCode != null) { - contents.LimitCode = __expectString(data.LimitCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + LimitCode: __expectString, + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3270,9 +3169,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3286,15 +3186,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Fields != null) { - contents.Fields = de_ValidationExceptionFieldList(data.Fields, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Fields: _json, + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3302,174 +3199,53 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountGrouping - */ -const se_AccountGrouping = (input: AccountGrouping, context: __SerdeContext): any => { - return { - ...(input.LinkedAccountIds != null && { LinkedAccountIds: se_AccountIdList(input.LinkedAccountIds, context) }), - }; -}; +// se_AccountGrouping omitted. -/** - * serializeAws_restJson1AccountIdFilterList - */ -const se_AccountIdFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdFilterList omitted. -/** - * serializeAws_restJson1AccountIdList - */ -const se_AccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdList omitted. -/** - * serializeAws_restJson1BillingGroupArnList - */ -const se_BillingGroupArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BillingGroupArnList omitted. -/** - * serializeAws_restJson1BillingGroupStatusList - */ -const se_BillingGroupStatusList = (input: (BillingGroupStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BillingGroupStatusList omitted. -/** - * serializeAws_restJson1ComputationPreference - */ -const se_ComputationPreference = (input: ComputationPreference, context: __SerdeContext): any => { - return { - ...(input.PricingPlanArn != null && { PricingPlanArn: input.PricingPlanArn }), - }; -}; +// se_ComputationPreference omitted. -/** - * serializeAws_restJson1CreateFreeTierConfig - */ -const se_CreateFreeTierConfig = (input: CreateFreeTierConfig, context: __SerdeContext): any => { - return { - ...(input.Activated != null && { Activated: input.Activated }), - }; -}; +// se_CreateFreeTierConfig omitted. -/** - * serializeAws_restJson1CreateTieringInput - */ -const se_CreateTieringInput = (input: CreateTieringInput, context: __SerdeContext): any => { - return { - ...(input.FreeTier != null && { FreeTier: se_CreateFreeTierConfig(input.FreeTier, context) }), - }; -}; +// se_CreateTieringInput omitted. -/** - * serializeAws_restJson1CustomLineItemArns - */ -const se_CustomLineItemArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomLineItemArns omitted. -/** - * serializeAws_restJson1CustomLineItemAssociationsList - */ -const se_CustomLineItemAssociationsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomLineItemAssociationsList omitted. -/** - * serializeAws_restJson1CustomLineItemBatchAssociationsList - */ -const se_CustomLineItemBatchAssociationsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomLineItemBatchAssociationsList omitted. -/** - * serializeAws_restJson1CustomLineItemBatchDisassociationsList - */ -const se_CustomLineItemBatchDisassociationsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomLineItemBatchDisassociationsList omitted. -/** - * serializeAws_restJson1CustomLineItemBillingPeriodRange - */ -const se_CustomLineItemBillingPeriodRange = (input: CustomLineItemBillingPeriodRange, context: __SerdeContext): any => { - return { - ...(input.ExclusiveEndBillingPeriod != null && { ExclusiveEndBillingPeriod: input.ExclusiveEndBillingPeriod }), - ...(input.InclusiveStartBillingPeriod != null && { - InclusiveStartBillingPeriod: input.InclusiveStartBillingPeriod, - }), - }; -}; +// se_CustomLineItemBillingPeriodRange omitted. /** * serializeAws_restJson1CustomLineItemChargeDetails */ const se_CustomLineItemChargeDetails = (input: CustomLineItemChargeDetails, context: __SerdeContext): any => { - return { - ...(input.Flat != null && { Flat: se_CustomLineItemFlatChargeDetails(input.Flat, context) }), - ...(input.Percentage != null && { - Percentage: se_CustomLineItemPercentageChargeDetails(input.Percentage, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + Flat: (_) => se_CustomLineItemFlatChargeDetails(_, context), + Percentage: (_) => se_CustomLineItemPercentageChargeDetails(_, context), + Type: [], + }); }; /** * serializeAws_restJson1CustomLineItemFlatChargeDetails */ const se_CustomLineItemFlatChargeDetails = (input: CustomLineItemFlatChargeDetails, context: __SerdeContext): any => { - return { - ...(input.ChargeValue != null && { ChargeValue: __serializeFloat(input.ChargeValue) }), - }; + return take(input, { + ChargeValue: __serializeFloat, + }); }; -/** - * serializeAws_restJson1CustomLineItemNameList - */ -const se_CustomLineItemNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomLineItemNameList omitted. /** * serializeAws_restJson1CustomLineItemPercentageChargeDetails @@ -3478,171 +3254,39 @@ const se_CustomLineItemPercentageChargeDetails = ( input: CustomLineItemPercentageChargeDetails, context: __SerdeContext ): any => { - return { - ...(input.AssociatedValues != null && { - AssociatedValues: se_CustomLineItemAssociationsList(input.AssociatedValues, context), - }), - ...(input.PercentageValue != null && { PercentageValue: __serializeFloat(input.PercentageValue) }), - }; + return take(input, { + AssociatedValues: _json, + PercentageValue: __serializeFloat, + }); }; -/** - * serializeAws_restJson1ListAccountAssociationsFilter - */ -const se_ListAccountAssociationsFilter = (input: ListAccountAssociationsFilter, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AccountIds != null && { AccountIds: se_AccountIdFilterList(input.AccountIds, context) }), - ...(input.Association != null && { Association: input.Association }), - }; -}; +// se_ListAccountAssociationsFilter omitted. -/** - * serializeAws_restJson1ListBillingGroupCostReportsFilter - */ -const se_ListBillingGroupCostReportsFilter = ( - input: ListBillingGroupCostReportsFilter, - context: __SerdeContext -): any => { - return { - ...(input.BillingGroupArns != null && { - BillingGroupArns: se_BillingGroupArnList(input.BillingGroupArns, context), - }), - }; -}; +// se_ListBillingGroupCostReportsFilter omitted. -/** - * serializeAws_restJson1ListBillingGroupsFilter - */ -const se_ListBillingGroupsFilter = (input: ListBillingGroupsFilter, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_BillingGroupArnList(input.Arns, context) }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.Statuses != null && { Statuses: se_BillingGroupStatusList(input.Statuses, context) }), - }; -}; +// se_ListBillingGroupsFilter omitted. -/** - * serializeAws_restJson1ListCustomLineItemsFilter - */ -const se_ListCustomLineItemsFilter = (input: ListCustomLineItemsFilter, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_CustomLineItemArns(input.Arns, context) }), - ...(input.BillingGroups != null && { BillingGroups: se_BillingGroupArnList(input.BillingGroups, context) }), - ...(input.Names != null && { Names: se_CustomLineItemNameList(input.Names, context) }), - }; -}; +// se_ListCustomLineItemsFilter omitted. -/** - * serializeAws_restJson1ListCustomLineItemVersionsBillingPeriodRangeFilter - */ -const se_ListCustomLineItemVersionsBillingPeriodRangeFilter = ( - input: ListCustomLineItemVersionsBillingPeriodRangeFilter, - context: __SerdeContext -): any => { - return { - ...(input.EndBillingPeriod != null && { EndBillingPeriod: input.EndBillingPeriod }), - ...(input.StartBillingPeriod != null && { StartBillingPeriod: input.StartBillingPeriod }), - }; -}; +// se_ListCustomLineItemVersionsBillingPeriodRangeFilter omitted. -/** - * serializeAws_restJson1ListCustomLineItemVersionsFilter - */ -const se_ListCustomLineItemVersionsFilter = (input: ListCustomLineItemVersionsFilter, context: __SerdeContext): any => { - return { - ...(input.BillingPeriodRange != null && { - BillingPeriodRange: se_ListCustomLineItemVersionsBillingPeriodRangeFilter(input.BillingPeriodRange, context), - }), - }; -}; +// se_ListCustomLineItemVersionsFilter omitted. -/** - * serializeAws_restJson1ListPricingPlansFilter - */ -const se_ListPricingPlansFilter = (input: ListPricingPlansFilter, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_PricingPlanArns(input.Arns, context) }), - }; -}; +// se_ListPricingPlansFilter omitted. -/** - * serializeAws_restJson1ListPricingRulesFilter - */ -const se_ListPricingRulesFilter = (input: ListPricingRulesFilter, context: __SerdeContext): any => { - return { - ...(input.Arns != null && { Arns: se_PricingRuleArns(input.Arns, context) }), - }; -}; +// se_ListPricingRulesFilter omitted. -/** - * serializeAws_restJson1ListResourcesAssociatedToCustomLineItemFilter - */ -const se_ListResourcesAssociatedToCustomLineItemFilter = ( - input: ListResourcesAssociatedToCustomLineItemFilter, - context: __SerdeContext -): any => { - return { - ...(input.Relationship != null && { Relationship: input.Relationship }), - }; -}; +// se_ListResourcesAssociatedToCustomLineItemFilter omitted. -/** - * serializeAws_restJson1PricingPlanArns - */ -const se_PricingPlanArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PricingPlanArns omitted. -/** - * serializeAws_restJson1PricingRuleArns - */ -const se_PricingRuleArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PricingRuleArns omitted. -/** - * serializeAws_restJson1PricingRuleArnsInput - */ -const se_PricingRuleArnsInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PricingRuleArnsInput omitted. -/** - * serializeAws_restJson1PricingRuleArnsNonEmptyInput - */ -const se_PricingRuleArnsNonEmptyInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PricingRuleArnsNonEmptyInput omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * serializeAws_restJson1UpdateCustomLineItemChargeDetails @@ -3651,12 +3295,10 @@ const se_UpdateCustomLineItemChargeDetails = ( input: UpdateCustomLineItemChargeDetails, context: __SerdeContext ): any => { - return { - ...(input.Flat != null && { Flat: se_UpdateCustomLineItemFlatChargeDetails(input.Flat, context) }), - ...(input.Percentage != null && { - Percentage: se_UpdateCustomLineItemPercentageChargeDetails(input.Percentage, context), - }), - }; + return take(input, { + Flat: (_) => se_UpdateCustomLineItemFlatChargeDetails(_, context), + Percentage: (_) => se_UpdateCustomLineItemPercentageChargeDetails(_, context), + }); }; /** @@ -3666,9 +3308,9 @@ const se_UpdateCustomLineItemFlatChargeDetails = ( input: UpdateCustomLineItemFlatChargeDetails, context: __SerdeContext ): any => { - return { - ...(input.ChargeValue != null && { ChargeValue: __serializeFloat(input.ChargeValue) }), - }; + return take(input, { + ChargeValue: __serializeFloat, + }); }; /** @@ -3678,170 +3320,34 @@ const se_UpdateCustomLineItemPercentageChargeDetails = ( input: UpdateCustomLineItemPercentageChargeDetails, context: __SerdeContext ): any => { - return { - ...(input.PercentageValue != null && { PercentageValue: __serializeFloat(input.PercentageValue) }), - }; + return take(input, { + PercentageValue: __serializeFloat, + }); }; -/** - * serializeAws_restJson1UpdateFreeTierConfig - */ -const se_UpdateFreeTierConfig = (input: UpdateFreeTierConfig, context: __SerdeContext): any => { - return { - ...(input.Activated != null && { Activated: input.Activated }), - }; -}; +// se_UpdateFreeTierConfig omitted. -/** - * serializeAws_restJson1UpdateTieringInput - */ -const se_UpdateTieringInput = (input: UpdateTieringInput, context: __SerdeContext): any => { - return { - ...(input.FreeTier != null && { FreeTier: se_UpdateFreeTierConfig(input.FreeTier, context) }), - }; -}; +// se_UpdateTieringInput omitted. -/** - * deserializeAws_restJson1AccountAssociationsList - */ -const de_AccountAssociationsList = (output: any, context: __SerdeContext): AccountAssociationsListElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountAssociationsListElement(entry, context); - }); - return retVal; -}; +// de_AccountAssociationsList omitted. -/** - * deserializeAws_restJson1AccountAssociationsListElement - */ -const de_AccountAssociationsListElement = (output: any, context: __SerdeContext): AccountAssociationsListElement => { - return { - AccountEmail: __expectString(output.AccountEmail), - AccountId: __expectString(output.AccountId), - AccountName: __expectString(output.AccountName), - BillingGroupArn: __expectString(output.BillingGroupArn), - } as any; -}; +// de_AccountAssociationsListElement omitted. -/** - * deserializeAws_restJson1AssociateResourceError - */ -const de_AssociateResourceError = (output: any, context: __SerdeContext): AssociateResourceError => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// de_AssociateResourceError omitted. -/** - * deserializeAws_restJson1AssociateResourceResponseElement - */ -const de_AssociateResourceResponseElement = ( - output: any, - context: __SerdeContext -): AssociateResourceResponseElement => { - return { - Arn: __expectString(output.Arn), - Error: output.Error != null ? de_AssociateResourceError(output.Error, context) : undefined, - } as any; -}; +// de_AssociateResourceResponseElement omitted. -/** - * deserializeAws_restJson1AssociateResourcesResponseList - */ -const de_AssociateResourcesResponseList = ( - output: any, - context: __SerdeContext -): AssociateResourceResponseElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociateResourceResponseElement(entry, context); - }); - return retVal; -}; +// de_AssociateResourcesResponseList omitted. -/** - * deserializeAws_restJson1BillingGroupCostReportElement - */ -const de_BillingGroupCostReportElement = (output: any, context: __SerdeContext): BillingGroupCostReportElement => { - return { - AWSCost: __expectString(output.AWSCost), - Arn: __expectString(output.Arn), - Currency: __expectString(output.Currency), - Margin: __expectString(output.Margin), - MarginPercentage: __expectString(output.MarginPercentage), - ProformaCost: __expectString(output.ProformaCost), - } as any; -}; +// de_BillingGroupCostReportElement omitted. -/** - * deserializeAws_restJson1BillingGroupCostReportList - */ -const de_BillingGroupCostReportList = (output: any, context: __SerdeContext): BillingGroupCostReportElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BillingGroupCostReportElement(entry, context); - }); - return retVal; -}; +// de_BillingGroupCostReportList omitted. -/** - * deserializeAws_restJson1BillingGroupList - */ -const de_BillingGroupList = (output: any, context: __SerdeContext): BillingGroupListElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BillingGroupListElement(entry, context); - }); - return retVal; -}; +// de_BillingGroupList omitted. -/** - * deserializeAws_restJson1BillingGroupListElement - */ -const de_BillingGroupListElement = (output: any, context: __SerdeContext): BillingGroupListElement => { - return { - Arn: __expectString(output.Arn), - ComputationPreference: - output.ComputationPreference != null - ? de_ComputationPreference(output.ComputationPreference, context) - : undefined, - CreationTime: __expectLong(output.CreationTime), - Description: __expectString(output.Description), - LastModifiedTime: __expectLong(output.LastModifiedTime), - Name: __expectString(output.Name), - PrimaryAccountId: __expectString(output.PrimaryAccountId), - Size: __expectLong(output.Size), - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - } as any; -}; +// de_BillingGroupListElement omitted. -/** - * deserializeAws_restJson1ComputationPreference - */ -const de_ComputationPreference = (output: any, context: __SerdeContext): ComputationPreference => { - return { - PricingPlanArn: __expectString(output.PricingPlanArn), - } as any; -}; +// de_ComputationPreference omitted. /** * deserializeAws_restJson1CustomLineItemList @@ -3850,9 +3356,6 @@ const de_CustomLineItemList = (output: any, context: __SerdeContext): CustomLine const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CustomLineItemListElement(entry, context); }); return retVal; @@ -3862,19 +3365,18 @@ const de_CustomLineItemList = (output: any, context: __SerdeContext): CustomLine * deserializeAws_restJson1CustomLineItemListElement */ const de_CustomLineItemListElement = (output: any, context: __SerdeContext): CustomLineItemListElement => { - return { - Arn: __expectString(output.Arn), - AssociationSize: __expectLong(output.AssociationSize), - BillingGroupArn: __expectString(output.BillingGroupArn), - ChargeDetails: - output.ChargeDetails != null ? de_ListCustomLineItemChargeDetails(output.ChargeDetails, context) : undefined, - CreationTime: __expectLong(output.CreationTime), - CurrencyCode: __expectString(output.CurrencyCode), - Description: __expectString(output.Description), - LastModifiedTime: __expectLong(output.LastModifiedTime), - Name: __expectString(output.Name), - ProductCode: __expectString(output.ProductCode), - } as any; + return take(output, { + Arn: __expectString, + AssociationSize: __expectLong, + BillingGroupArn: __expectString, + ChargeDetails: (_: any) => de_ListCustomLineItemChargeDetails(_, context), + CreationTime: __expectLong, + CurrencyCode: __expectString, + Description: __expectString, + LastModifiedTime: __expectLong, + Name: __expectString, + ProductCode: __expectString, + }) as any; }; /** @@ -3884,9 +3386,6 @@ const de_CustomLineItemVersionList = (output: any, context: __SerdeContext): Cus const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CustomLineItemVersionListElement(entry, context); }); return retVal; @@ -3899,74 +3398,38 @@ const de_CustomLineItemVersionListElement = ( output: any, context: __SerdeContext ): CustomLineItemVersionListElement => { - return { - Arn: __expectString(output.Arn), - AssociationSize: __expectLong(output.AssociationSize), - BillingGroupArn: __expectString(output.BillingGroupArn), - ChargeDetails: - output.ChargeDetails != null ? de_ListCustomLineItemChargeDetails(output.ChargeDetails, context) : undefined, - CreationTime: __expectLong(output.CreationTime), - CurrencyCode: __expectString(output.CurrencyCode), - Description: __expectString(output.Description), - EndBillingPeriod: __expectString(output.EndBillingPeriod), - LastModifiedTime: __expectLong(output.LastModifiedTime), - Name: __expectString(output.Name), - ProductCode: __expectString(output.ProductCode), - StartBillingPeriod: __expectString(output.StartBillingPeriod), - StartTime: __expectLong(output.StartTime), - } as any; + return take(output, { + Arn: __expectString, + AssociationSize: __expectLong, + BillingGroupArn: __expectString, + ChargeDetails: (_: any) => de_ListCustomLineItemChargeDetails(_, context), + CreationTime: __expectLong, + CurrencyCode: __expectString, + Description: __expectString, + EndBillingPeriod: __expectString, + LastModifiedTime: __expectLong, + Name: __expectString, + ProductCode: __expectString, + StartBillingPeriod: __expectString, + StartTime: __expectLong, + }) as any; }; -/** - * deserializeAws_restJson1DisassociateResourceResponseElement - */ -const de_DisassociateResourceResponseElement = ( - output: any, - context: __SerdeContext -): DisassociateResourceResponseElement => { - return { - Arn: __expectString(output.Arn), - Error: output.Error != null ? de_AssociateResourceError(output.Error, context) : undefined, - } as any; -}; +// de_DisassociateResourceResponseElement omitted. -/** - * deserializeAws_restJson1DisassociateResourcesResponseList - */ -const de_DisassociateResourcesResponseList = ( - output: any, - context: __SerdeContext -): DisassociateResourceResponseElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DisassociateResourceResponseElement(entry, context); - }); - return retVal; -}; +// de_DisassociateResourcesResponseList omitted. -/** - * deserializeAws_restJson1FreeTierConfig - */ -const de_FreeTierConfig = (output: any, context: __SerdeContext): FreeTierConfig => { - return { - Activated: __expectBoolean(output.Activated), - } as any; -}; +// de_FreeTierConfig omitted. /** * deserializeAws_restJson1ListCustomLineItemChargeDetails */ const de_ListCustomLineItemChargeDetails = (output: any, context: __SerdeContext): ListCustomLineItemChargeDetails => { - return { - Flat: output.Flat != null ? de_ListCustomLineItemFlatChargeDetails(output.Flat, context) : undefined, - Percentage: - output.Percentage != null ? de_ListCustomLineItemPercentageChargeDetails(output.Percentage, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Flat: (_: any) => de_ListCustomLineItemFlatChargeDetails(_, context), + Percentage: (_: any) => de_ListCustomLineItemPercentageChargeDetails(_, context), + Type: __expectString, + }) as any; }; /** @@ -3976,9 +3439,9 @@ const de_ListCustomLineItemFlatChargeDetails = ( output: any, context: __SerdeContext ): ListCustomLineItemFlatChargeDetails => { - return { - ChargeValue: __limitedParseDouble(output.ChargeValue), - } as any; + return take(output, { + ChargeValue: __limitedParseDouble, + }) as any; }; /** @@ -3988,101 +3451,22 @@ const de_ListCustomLineItemPercentageChargeDetails = ( output: any, context: __SerdeContext ): ListCustomLineItemPercentageChargeDetails => { - return { - PercentageValue: __limitedParseDouble(output.PercentageValue), - } as any; + return take(output, { + PercentageValue: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1ListResourcesAssociatedToCustomLineItemResponseElement - */ -const de_ListResourcesAssociatedToCustomLineItemResponseElement = ( - output: any, - context: __SerdeContext -): ListResourcesAssociatedToCustomLineItemResponseElement => { - return { - Arn: __expectString(output.Arn), - EndBillingPeriod: __expectString(output.EndBillingPeriod), - Relationship: __expectString(output.Relationship), - } as any; -}; +// de_ListResourcesAssociatedToCustomLineItemResponseElement omitted. -/** - * deserializeAws_restJson1ListResourcesAssociatedToCustomLineItemResponseList - */ -const de_ListResourcesAssociatedToCustomLineItemResponseList = ( - output: any, - context: __SerdeContext -): ListResourcesAssociatedToCustomLineItemResponseElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListResourcesAssociatedToCustomLineItemResponseElement(entry, context); - }); - return retVal; -}; +// de_ListResourcesAssociatedToCustomLineItemResponseList omitted. -/** - * deserializeAws_restJson1PricingPlanArns - */ -const de_PricingPlanArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PricingPlanArns omitted. -/** - * deserializeAws_restJson1PricingPlanList - */ -const de_PricingPlanList = (output: any, context: __SerdeContext): PricingPlanListElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PricingPlanListElement(entry, context); - }); - return retVal; -}; +// de_PricingPlanList omitted. -/** - * deserializeAws_restJson1PricingPlanListElement - */ -const de_PricingPlanListElement = (output: any, context: __SerdeContext): PricingPlanListElement => { - return { - Arn: __expectString(output.Arn), - CreationTime: __expectLong(output.CreationTime), - Description: __expectString(output.Description), - LastModifiedTime: __expectLong(output.LastModifiedTime), - Name: __expectString(output.Name), - Size: __expectLong(output.Size), - } as any; -}; +// de_PricingPlanListElement omitted. -/** - * deserializeAws_restJson1PricingRuleArns - */ -const de_PricingRuleArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PricingRuleArns omitted. /** * deserializeAws_restJson1PricingRuleList @@ -4091,9 +3475,6 @@ const de_PricingRuleList = (output: any, context: __SerdeContext): PricingRuleLi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PricingRuleListElement(entry, context); }); return retVal; @@ -4103,88 +3484,35 @@ const de_PricingRuleList = (output: any, context: __SerdeContext): PricingRuleLi * deserializeAws_restJson1PricingRuleListElement */ const de_PricingRuleListElement = (output: any, context: __SerdeContext): PricingRuleListElement => { - return { - Arn: __expectString(output.Arn), - AssociatedPricingPlanCount: __expectLong(output.AssociatedPricingPlanCount), - BillingEntity: __expectString(output.BillingEntity), - CreationTime: __expectLong(output.CreationTime), - Description: __expectString(output.Description), - LastModifiedTime: __expectLong(output.LastModifiedTime), - ModifierPercentage: __limitedParseDouble(output.ModifierPercentage), - Name: __expectString(output.Name), - Operation: __expectString(output.Operation), - Scope: __expectString(output.Scope), - Service: __expectString(output.Service), - Tiering: output.Tiering != null ? de_Tiering(output.Tiering, context) : undefined, - Type: __expectString(output.Type), - UsageType: __expectString(output.UsageType), - } as any; + return take(output, { + Arn: __expectString, + AssociatedPricingPlanCount: __expectLong, + BillingEntity: __expectString, + CreationTime: __expectLong, + Description: __expectString, + LastModifiedTime: __expectLong, + ModifierPercentage: __limitedParseDouble, + Name: __expectString, + Operation: __expectString, + Scope: __expectString, + Service: __expectString, + Tiering: _json, + Type: __expectString, + UsageType: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Tiering - */ -const de_Tiering = (output: any, context: __SerdeContext): Tiering => { - return { - FreeTier: output.FreeTier != null ? de_FreeTierConfig(output.FreeTier, context) : undefined, - } as any; -}; +// de_Tiering omitted. -/** - * deserializeAws_restJson1UpdateFreeTierConfig - */ -const de_UpdateFreeTierConfig = (output: any, context: __SerdeContext): UpdateFreeTierConfig => { - return { - Activated: __expectBoolean(output.Activated), - } as any; -}; +// de_UpdateFreeTierConfig omitted. -/** - * deserializeAws_restJson1UpdateTieringInput - */ -const de_UpdateTieringInput = (output: any, context: __SerdeContext): UpdateTieringInput => { - return { - FreeTier: output.FreeTier != null ? de_UpdateFreeTierConfig(output.FreeTier, context) : undefined, - } as any; -}; +// de_UpdateTieringInput omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-braket/src/protocols/Aws_restJson1.ts b/clients/client-braket/src/protocols/Aws_restJson1.ts index da64dd64d93b..463574f470ed 100644 --- a/clients/client-braket/src/protocols/Aws_restJson1.ts +++ b/clients/client-braket/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -47,7 +49,6 @@ import { DeviceConfig, DeviceOfflineException, DeviceRetiredException, - DeviceSummary, InputFileConfig, InstanceConfig, InternalServiceException, @@ -113,9 +114,11 @@ export const se_CancelQuantumTaskCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -140,28 +143,22 @@ export const se_CreateJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/job"; let body: any; - body = JSON.stringify({ - ...(input.algorithmSpecification != null && { - algorithmSpecification: se_AlgorithmSpecification(input.algorithmSpecification, context), - }), - ...(input.checkpointConfig != null && { - checkpointConfig: se_JobCheckpointConfig(input.checkpointConfig, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.deviceConfig != null && { deviceConfig: se_DeviceConfig(input.deviceConfig, context) }), - ...(input.hyperParameters != null && { hyperParameters: se_HyperParameters(input.hyperParameters, context) }), - ...(input.inputDataConfig != null && { inputDataConfig: se_InputConfigList(input.inputDataConfig, context) }), - ...(input.instanceConfig != null && { instanceConfig: se_InstanceConfig(input.instanceConfig, context) }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.outputDataConfig != null && { - outputDataConfig: se_JobOutputDataConfig(input.outputDataConfig, context), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stoppingCondition != null && { - stoppingCondition: se_JobStoppingCondition(input.stoppingCondition, context), - }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + algorithmSpecification: (_) => _json(_), + checkpointConfig: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + deviceConfig: (_) => _json(_), + hyperParameters: (_) => _json(_), + inputDataConfig: (_) => _json(_), + instanceConfig: (_) => _json(_), + jobName: [], + outputDataConfig: (_) => _json(_), + roleArn: [], + stoppingCondition: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -186,17 +183,19 @@ export const se_CreateQuantumTaskCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-task"; let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: __LazyJsonString.fromObject(input.action) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.deviceArn != null && { deviceArn: input.deviceArn }), - ...(input.deviceParameters != null && { deviceParameters: __LazyJsonString.fromObject(input.deviceParameters) }), - ...(input.jobToken != null && { jobToken: input.jobToken }), - ...(input.outputS3Bucket != null && { outputS3Bucket: input.outputS3Bucket }), - ...(input.outputS3KeyPrefix != null && { outputS3KeyPrefix: input.outputS3KeyPrefix }), - ...(input.shots != null && { shots: input.shots }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + action: (_) => __LazyJsonString.fromObject(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + deviceArn: [], + deviceParameters: (_) => __LazyJsonString.fromObject(_), + jobToken: [], + outputS3Bucket: [], + outputS3KeyPrefix: [], + shots: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -318,11 +317,13 @@ export const se_SearchDevicesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SearchDevicesFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -347,11 +348,13 @@ export const se_SearchJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SearchJobsFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -376,11 +379,13 @@ export const se_SearchQuantumTasksCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quantum-tasks"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SearchQuantumTasksFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -406,9 +411,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -464,12 +471,11 @@ export const de_CancelJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cancellationStatus != null) { - contents.cancellationStatus = __expectString(data.cancellationStatus); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } + const doc = take(data, { + cancellationStatus: __expectString, + jobArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -506,10 +512,9 @@ const de_CancelJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -529,12 +534,11 @@ export const de_CancelQuantumTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cancellationStatus != null) { - contents.cancellationStatus = __expectString(data.cancellationStatus); - } - if (data.quantumTaskArn != null) { - contents.quantumTaskArn = __expectString(data.quantumTaskArn); - } + const doc = take(data, { + cancellationStatus: __expectString, + quantumTaskArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -571,10 +575,9 @@ const de_CancelQuantumTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -594,9 +597,10 @@ export const de_CreateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } + const doc = take(data, { + jobArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -636,10 +640,9 @@ const de_CreateJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -659,9 +662,10 @@ export const de_CreateQuantumTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.quantumTaskArn != null) { - contents.quantumTaskArn = __expectString(data.quantumTaskArn); - } + const doc = take(data, { + quantumTaskArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -701,10 +705,9 @@ const de_CreateQuantumTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -724,24 +727,15 @@ export const de_GetDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceArn != null) { - contents.deviceArn = __expectString(data.deviceArn); - } - if (data.deviceCapabilities != null) { - contents.deviceCapabilities = new __LazyJsonString(data.deviceCapabilities); - } - if (data.deviceName != null) { - contents.deviceName = __expectString(data.deviceName); - } - if (data.deviceStatus != null) { - contents.deviceStatus = __expectString(data.deviceStatus); - } - if (data.deviceType != null) { - contents.deviceType = __expectString(data.deviceType); - } - if (data.providerName != null) { - contents.providerName = __expectString(data.providerName); - } + const doc = take(data, { + deviceArn: __expectString, + deviceCapabilities: (_) => new __LazyJsonString(_), + deviceName: __expectString, + deviceStatus: __expectString, + deviceType: __expectString, + providerName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -775,10 +769,9 @@ const de_GetDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -798,63 +791,28 @@ export const de_GetJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.algorithmSpecification != null) { - contents.algorithmSpecification = de_AlgorithmSpecification(data.algorithmSpecification, context); - } - if (data.billableDuration != null) { - contents.billableDuration = __expectInt32(data.billableDuration); - } - if (data.checkpointConfig != null) { - contents.checkpointConfig = de_JobCheckpointConfig(data.checkpointConfig, context); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.deviceConfig != null) { - contents.deviceConfig = de_DeviceConfig(data.deviceConfig, context); - } - if (data.endedAt != null) { - contents.endedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.endedAt)); - } - if (data.events != null) { - contents.events = de_JobEvents(data.events, context); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.hyperParameters != null) { - contents.hyperParameters = de_HyperParameters(data.hyperParameters, context); - } - if (data.inputDataConfig != null) { - contents.inputDataConfig = de_InputConfigList(data.inputDataConfig, context); - } - if (data.instanceConfig != null) { - contents.instanceConfig = de_InstanceConfig(data.instanceConfig, context); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobName != null) { - contents.jobName = __expectString(data.jobName); - } - if (data.outputDataConfig != null) { - contents.outputDataConfig = de_JobOutputDataConfig(data.outputDataConfig, context); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.startedAt != null) { - contents.startedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.startedAt)); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.stoppingCondition != null) { - contents.stoppingCondition = de_JobStoppingCondition(data.stoppingCondition, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + algorithmSpecification: _json, + billableDuration: __expectInt32, + checkpointConfig: _json, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + deviceConfig: _json, + endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + events: (_) => de_JobEvents(_, context), + failureReason: __expectString, + hyperParameters: _json, + inputDataConfig: _json, + instanceConfig: _json, + jobArn: __expectString, + jobName: __expectString, + outputDataConfig: _json, + roleArn: __expectString, + startedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + stoppingCondition: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -885,10 +843,9 @@ const de_GetJobCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -908,42 +865,21 @@ export const de_GetQuantumTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.deviceArn != null) { - contents.deviceArn = __expectString(data.deviceArn); - } - if (data.deviceParameters != null) { - contents.deviceParameters = new __LazyJsonString(data.deviceParameters); - } - if (data.endedAt != null) { - contents.endedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.endedAt)); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.outputS3Bucket != null) { - contents.outputS3Bucket = __expectString(data.outputS3Bucket); - } - if (data.outputS3Directory != null) { - contents.outputS3Directory = __expectString(data.outputS3Directory); - } - if (data.quantumTaskArn != null) { - contents.quantumTaskArn = __expectString(data.quantumTaskArn); - } - if (data.shots != null) { - contents.shots = __expectLong(data.shots); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + deviceArn: __expectString, + deviceParameters: (_) => new __LazyJsonString(_), + endedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + failureReason: __expectString, + jobArn: __expectString, + outputS3Bucket: __expectString, + outputS3Directory: __expectString, + quantumTaskArn: __expectString, + shots: __expectLong, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -977,10 +913,9 @@ const de_GetQuantumTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1000,9 +935,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1030,10 +966,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1053,12 +988,11 @@ export const de_SearchDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.devices != null) { - contents.devices = de_DeviceSummaryList(data.devices, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + devices: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1089,10 +1023,9 @@ const de_SearchDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1112,12 +1045,11 @@ export const de_SearchJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.jobs = de_JobSummaryList(data.jobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobs: (_) => de_JobSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1148,10 +1080,9 @@ const de_SearchJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1171,12 +1102,11 @@ export const de_SearchQuantumTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.quantumTasks != null) { - contents.quantumTasks = de_QuantumTaskSummaryList(data.quantumTasks, context); - } + const doc = take(data, { + nextToken: __expectString, + quantumTasks: (_) => de_QuantumTaskSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1207,10 +1137,9 @@ const de_SearchQuantumTasksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1257,10 +1186,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1307,16 +1235,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1326,9 +1253,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1342,9 +1270,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1361,9 +1290,10 @@ const de_DeviceOfflineExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DeviceOfflineException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1380,9 +1310,10 @@ const de_DeviceRetiredExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DeviceRetiredException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1399,9 +1330,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1418,9 +1350,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1437,9 +1370,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1453,9 +1387,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1469,9 +1404,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1479,363 +1415,79 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AlgorithmSpecification - */ -const se_AlgorithmSpecification = (input: AlgorithmSpecification, context: __SerdeContext): any => { - return { - ...(input.containerImage != null && { containerImage: se_ContainerImage(input.containerImage, context) }), - ...(input.scriptModeConfig != null && { scriptModeConfig: se_ScriptModeConfig(input.scriptModeConfig, context) }), - }; -}; +// se_AlgorithmSpecification omitted. -/** - * serializeAws_restJson1ContainerImage - */ -const se_ContainerImage = (input: ContainerImage, context: __SerdeContext): any => { - return { - ...(input.uri != null && { uri: input.uri }), - }; -}; +// se_ContainerImage omitted. -/** - * serializeAws_restJson1DataSource - */ -const se_DataSource = (input: DataSource, context: __SerdeContext): any => { - return { - ...(input.s3DataSource != null && { s3DataSource: se_S3DataSource(input.s3DataSource, context) }), - }; -}; +// se_DataSource omitted. -/** - * serializeAws_restJson1DeviceConfig - */ -const se_DeviceConfig = (input: DeviceConfig, context: __SerdeContext): any => { - return { - ...(input.device != null && { device: input.device }), - }; -}; +// se_DeviceConfig omitted. -/** - * serializeAws_restJson1HyperParameters - */ -const se_HyperParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_HyperParameters omitted. -/** - * serializeAws_restJson1InputConfigList - */ -const se_InputConfigList = (input: InputFileConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputFileConfig(entry, context); - }); -}; +// se_InputConfigList omitted. -/** - * serializeAws_restJson1InputFileConfig - */ -const se_InputFileConfig = (input: InputFileConfig, context: __SerdeContext): any => { - return { - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.dataSource != null && { dataSource: se_DataSource(input.dataSource, context) }), - }; -}; +// se_InputFileConfig omitted. -/** - * serializeAws_restJson1InstanceConfig - */ -const se_InstanceConfig = (input: InstanceConfig, context: __SerdeContext): any => { - return { - ...(input.instanceCount != null && { instanceCount: input.instanceCount }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.volumeSizeInGb != null && { volumeSizeInGb: input.volumeSizeInGb }), - }; -}; +// se_InstanceConfig omitted. -/** - * serializeAws_restJson1JobCheckpointConfig - */ -const se_JobCheckpointConfig = (input: JobCheckpointConfig, context: __SerdeContext): any => { - return { - ...(input.localPath != null && { localPath: input.localPath }), - ...(input.s3Uri != null && { s3Uri: input.s3Uri }), - }; -}; +// se_JobCheckpointConfig omitted. -/** - * serializeAws_restJson1JobOutputDataConfig - */ -const se_JobOutputDataConfig = (input: JobOutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.s3Path != null && { s3Path: input.s3Path }), - }; -}; +// se_JobOutputDataConfig omitted. -/** - * serializeAws_restJson1JobStoppingCondition - */ -const se_JobStoppingCondition = (input: JobStoppingCondition, context: __SerdeContext): any => { - return { - ...(input.maxRuntimeInSeconds != null && { maxRuntimeInSeconds: input.maxRuntimeInSeconds }), - }; -}; +// se_JobStoppingCondition omitted. -/** - * serializeAws_restJson1S3DataSource - */ -const se_S3DataSource = (input: S3DataSource, context: __SerdeContext): any => { - return { - ...(input.s3Uri != null && { s3Uri: input.s3Uri }), - }; -}; +// se_S3DataSource omitted. -/** - * serializeAws_restJson1ScriptModeConfig - */ -const se_ScriptModeConfig = (input: ScriptModeConfig, context: __SerdeContext): any => { - return { - ...(input.compressionType != null && { compressionType: input.compressionType }), - ...(input.entryPoint != null && { entryPoint: input.entryPoint }), - ...(input.s3Uri != null && { s3Uri: input.s3Uri }), - }; -}; +// se_ScriptModeConfig omitted. -/** - * serializeAws_restJson1SearchDevicesFilter - */ -const se_SearchDevicesFilter = (input: SearchDevicesFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_String256List(input.values, context) }), - }; -}; +// se_SearchDevicesFilter omitted. -/** - * serializeAws_restJson1SearchDevicesFilterList - */ -const se_SearchDevicesFilterList = (input: SearchDevicesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchDevicesFilter(entry, context); - }); -}; +// se_SearchDevicesFilterList omitted. -/** - * serializeAws_restJson1SearchJobsFilter - */ -const se_SearchJobsFilter = (input: SearchJobsFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_String256List(input.values, context) }), - }; -}; +// se_SearchJobsFilter omitted. -/** - * serializeAws_restJson1SearchJobsFilterList - */ -const se_SearchJobsFilterList = (input: SearchJobsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchJobsFilter(entry, context); - }); -}; +// se_SearchJobsFilterList omitted. -/** - * serializeAws_restJson1SearchQuantumTasksFilter - */ -const se_SearchQuantumTasksFilter = (input: SearchQuantumTasksFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_String256List(input.values, context) }), - }; -}; +// se_SearchQuantumTasksFilter omitted. -/** - * serializeAws_restJson1SearchQuantumTasksFilterList - */ -const se_SearchQuantumTasksFilterList = (input: SearchQuantumTasksFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchQuantumTasksFilter(entry, context); - }); -}; +// se_SearchQuantumTasksFilterList omitted. -/** - * serializeAws_restJson1String256List - */ -const se_String256List = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_String256List omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. -/** - * deserializeAws_restJson1AlgorithmSpecification - */ -const de_AlgorithmSpecification = (output: any, context: __SerdeContext): AlgorithmSpecification => { - return { - containerImage: output.containerImage != null ? de_ContainerImage(output.containerImage, context) : undefined, - scriptModeConfig: - output.scriptModeConfig != null ? de_ScriptModeConfig(output.scriptModeConfig, context) : undefined, - } as any; -}; +// de_AlgorithmSpecification omitted. -/** - * deserializeAws_restJson1ContainerImage - */ -const de_ContainerImage = (output: any, context: __SerdeContext): ContainerImage => { - return { - uri: __expectString(output.uri), - } as any; -}; +// de_ContainerImage omitted. -/** - * deserializeAws_restJson1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - s3DataSource: output.s3DataSource != null ? de_S3DataSource(output.s3DataSource, context) : undefined, - } as any; -}; +// de_DataSource omitted. -/** - * deserializeAws_restJson1DeviceConfig - */ -const de_DeviceConfig = (output: any, context: __SerdeContext): DeviceConfig => { - return { - device: __expectString(output.device), - } as any; -}; +// de_DeviceConfig omitted. -/** - * deserializeAws_restJson1DeviceSummary - */ -const de_DeviceSummary = (output: any, context: __SerdeContext): DeviceSummary => { - return { - deviceArn: __expectString(output.deviceArn), - deviceName: __expectString(output.deviceName), - deviceStatus: __expectString(output.deviceStatus), - deviceType: __expectString(output.deviceType), - providerName: __expectString(output.providerName), - } as any; -}; +// de_DeviceSummary omitted. -/** - * deserializeAws_restJson1DeviceSummaryList - */ -const de_DeviceSummaryList = (output: any, context: __SerdeContext): DeviceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceSummary(entry, context); - }); - return retVal; -}; +// de_DeviceSummaryList omitted. -/** - * deserializeAws_restJson1HyperParameters - */ -const de_HyperParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_HyperParameters omitted. -/** - * deserializeAws_restJson1InputConfigList - */ -const de_InputConfigList = (output: any, context: __SerdeContext): InputFileConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputFileConfig(entry, context); - }); - return retVal; -}; +// de_InputConfigList omitted. -/** - * deserializeAws_restJson1InputFileConfig - */ -const de_InputFileConfig = (output: any, context: __SerdeContext): InputFileConfig => { - return { - channelName: __expectString(output.channelName), - contentType: __expectString(output.contentType), - dataSource: output.dataSource != null ? de_DataSource(output.dataSource, context) : undefined, - } as any; -}; +// de_InputFileConfig omitted. -/** - * deserializeAws_restJson1InstanceConfig - */ -const de_InstanceConfig = (output: any, context: __SerdeContext): InstanceConfig => { - return { - instanceCount: __expectInt32(output.instanceCount), - instanceType: __expectString(output.instanceType), - volumeSizeInGb: __expectInt32(output.volumeSizeInGb), - } as any; -}; +// de_InstanceConfig omitted. -/** - * deserializeAws_restJson1JobCheckpointConfig - */ -const de_JobCheckpointConfig = (output: any, context: __SerdeContext): JobCheckpointConfig => { - return { - localPath: __expectString(output.localPath), - s3Uri: __expectString(output.s3Uri), - } as any; -}; +// de_JobCheckpointConfig omitted. /** * deserializeAws_restJson1JobEventDetails */ const de_JobEventDetails = (output: any, context: __SerdeContext): JobEventDetails => { - return { - eventType: __expectString(output.eventType), - message: __expectString(output.message), - timeOfEvent: - output.timeOfEvent != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.timeOfEvent)) : undefined, - } as any; + return take(output, { + eventType: __expectString, + message: __expectString, + timeOfEvent: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -1845,49 +1497,29 @@ const de_JobEvents = (output: any, context: __SerdeContext): JobEventDetails[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobEventDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1JobOutputDataConfig - */ -const de_JobOutputDataConfig = (output: any, context: __SerdeContext): JobOutputDataConfig => { - return { - kmsKeyId: __expectString(output.kmsKeyId), - s3Path: __expectString(output.s3Path), - } as any; -}; +// de_JobOutputDataConfig omitted. -/** - * deserializeAws_restJson1JobStoppingCondition - */ -const de_JobStoppingCondition = (output: any, context: __SerdeContext): JobStoppingCondition => { - return { - maxRuntimeInSeconds: __expectInt32(output.maxRuntimeInSeconds), - } as any; -}; +// de_JobStoppingCondition omitted. /** * deserializeAws_restJson1JobSummary */ const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - device: __expectString(output.device), - endedAt: output.endedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endedAt)) : undefined, - jobArn: __expectString(output.jobArn), - jobName: __expectString(output.jobName), - startedAt: - output.startedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startedAt)) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + device: __expectString, + endedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + jobArn: __expectString, + jobName: __expectString, + startedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + tags: _json, + }) as any; }; /** @@ -1897,9 +1529,6 @@ const de_JobSummaryList = (output: any, context: __SerdeContext): JobSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobSummary(entry, context); }); return retVal; @@ -1909,18 +1538,17 @@ const de_JobSummaryList = (output: any, context: __SerdeContext): JobSummary[] = * deserializeAws_restJson1QuantumTaskSummary */ const de_QuantumTaskSummary = (output: any, context: __SerdeContext): QuantumTaskSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - deviceArn: __expectString(output.deviceArn), - endedAt: output.endedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endedAt)) : undefined, - outputS3Bucket: __expectString(output.outputS3Bucket), - outputS3Directory: __expectString(output.outputS3Directory), - quantumTaskArn: __expectString(output.quantumTaskArn), - shots: __expectLong(output.shots), - status: __expectString(output.status), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + deviceArn: __expectString, + endedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + outputS3Bucket: __expectString, + outputS3Directory: __expectString, + quantumTaskArn: __expectString, + shots: __expectLong, + status: __expectString, + tags: _json, + }) as any; }; /** @@ -1930,46 +1558,16 @@ const de_QuantumTaskSummaryList = (output: any, context: __SerdeContext): Quantu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QuantumTaskSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3DataSource - */ -const de_S3DataSource = (output: any, context: __SerdeContext): S3DataSource => { - return { - s3Uri: __expectString(output.s3Uri), - } as any; -}; +// de_S3DataSource omitted. -/** - * deserializeAws_restJson1ScriptModeConfig - */ -const de_ScriptModeConfig = (output: any, context: __SerdeContext): ScriptModeConfig => { - return { - compressionType: __expectString(output.compressionType), - entryPoint: __expectString(output.entryPoint), - s3Uri: __expectString(output.s3Uri), - } as any; -}; +// de_ScriptModeConfig omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-budgets/src/protocols/Aws_json1_1.ts b/clients/client-budgets/src/protocols/Aws_json1_1.ts index f45b9c3dc224..1989b99e3aef 100644 --- a/clients/client-budgets/src/protocols/Aws_json1_1.ts +++ b/clients/client-budgets/src/protocols/Aws_json1_1.ts @@ -1,16 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -84,23 +84,16 @@ import { CalculatedSpend, CostTypes, CreateBudgetActionRequest, - CreateBudgetActionResponse, CreateBudgetRequest, - CreateBudgetResponse, CreateNotificationRequest, - CreateNotificationResponse, CreateSubscriberRequest, - CreateSubscriberResponse, CreationLimitExceededException, Definition, DeleteBudgetActionRequest, DeleteBudgetActionResponse, DeleteBudgetRequest, - DeleteBudgetResponse, DeleteNotificationRequest, - DeleteNotificationResponse, DeleteSubscriberRequest, - DeleteSubscriberResponse, DescribeBudgetActionHistoriesRequest, DescribeBudgetActionHistoriesResponse, DescribeBudgetActionRequest, @@ -120,10 +113,8 @@ import { DescribeNotificationsForBudgetRequest, DescribeNotificationsForBudgetResponse, DescribeSubscribersForNotificationRequest, - DescribeSubscribersForNotificationResponse, DuplicateRecordException, ExecuteBudgetActionRequest, - ExecuteBudgetActionResponse, ExpiredNextTokenException, HistoricalOptions, IamActionDefinition, @@ -143,11 +134,8 @@ import { UpdateBudgetActionRequest, UpdateBudgetActionResponse, UpdateBudgetRequest, - UpdateBudgetResponse, UpdateNotificationRequest, - UpdateNotificationResponse, UpdateSubscriberRequest, - UpdateSubscriberResponse, } from "../models/models_0"; /** @@ -211,7 +199,7 @@ export const se_DeleteBudgetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBudget"); let body: any; - body = JSON.stringify(se_DeleteBudgetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -224,7 +212,7 @@ export const se_DeleteBudgetActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBudgetAction"); let body: any; - body = JSON.stringify(se_DeleteBudgetActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -263,7 +251,7 @@ export const se_DescribeBudgetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBudget"); let body: any; - body = JSON.stringify(se_DescribeBudgetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -276,7 +264,7 @@ export const se_DescribeBudgetActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBudgetAction"); let body: any; - body = JSON.stringify(se_DescribeBudgetActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +290,7 @@ export const se_DescribeBudgetActionsForAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBudgetActionsForAccount"); let body: any; - body = JSON.stringify(se_DescribeBudgetActionsForAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +303,7 @@ export const se_DescribeBudgetActionsForBudgetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBudgetActionsForBudget"); let body: any; - body = JSON.stringify(se_DescribeBudgetActionsForBudgetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +316,7 @@ export const se_DescribeBudgetNotificationsForAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBudgetNotificationsForAccount"); let body: any; - body = JSON.stringify(se_DescribeBudgetNotificationsForAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +342,7 @@ export const se_DescribeBudgetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBudgets"); let body: any; - body = JSON.stringify(se_DescribeBudgetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +355,7 @@ export const se_DescribeNotificationsForBudgetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNotificationsForBudget"); let body: any; - body = JSON.stringify(se_DescribeNotificationsForBudgetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -393,7 +381,7 @@ export const se_ExecuteBudgetActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExecuteBudgetAction"); let body: any; - body = JSON.stringify(se_ExecuteBudgetActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,12 +449,12 @@ export const de_CreateBudgetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBudgetResponse(data, context); + contents = _json(data); const response: CreateBudgetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -502,10 +490,9 @@ const de_CreateBudgetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -523,12 +510,12 @@ export const de_CreateBudgetActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBudgetActionResponse(data, context); + contents = _json(data); const response: CreateBudgetActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -567,10 +554,9 @@ const de_CreateBudgetActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -588,12 +574,12 @@ export const de_CreateNotificationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNotificationResponse(data, context); + contents = _json(data); const response: CreateNotificationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -632,10 +618,9 @@ const de_CreateNotificationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -653,12 +638,12 @@ export const de_CreateSubscriberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSubscriberResponse(data, context); + contents = _json(data); const response: CreateSubscriberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -697,10 +682,9 @@ const de_CreateSubscriberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -718,12 +702,12 @@ export const de_DeleteBudgetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBudgetResponse(data, context); + contents = _json(data); const response: DeleteBudgetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -756,10 +740,9 @@ const de_DeleteBudgetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -782,7 +765,7 @@ export const de_DeleteBudgetActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -818,10 +801,9 @@ const de_DeleteBudgetActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -839,12 +821,12 @@ export const de_DeleteNotificationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNotificationResponse(data, context); + contents = _json(data); const response: DeleteNotificationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -877,10 +859,9 @@ const de_DeleteNotificationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -898,12 +879,12 @@ export const de_DeleteSubscriberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSubscriberResponse(data, context); + contents = _json(data); const response: DeleteSubscriberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -936,10 +917,9 @@ const de_DeleteSubscriberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -962,7 +942,7 @@ export const de_DescribeBudgetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -995,10 +975,9 @@ const de_DescribeBudgetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1021,7 +1000,7 @@ export const de_DescribeBudgetActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1054,10 +1033,9 @@ const de_DescribeBudgetActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1080,7 +1058,7 @@ export const de_DescribeBudgetActionHistoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1116,10 +1094,9 @@ const de_DescribeBudgetActionHistoriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1142,7 +1119,7 @@ export const de_DescribeBudgetActionsForAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1175,10 +1152,9 @@ const de_DescribeBudgetActionsForAccountCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1201,7 +1177,7 @@ export const de_DescribeBudgetActionsForBudgetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1237,10 +1213,9 @@ const de_DescribeBudgetActionsForBudgetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1263,7 +1238,7 @@ export const de_DescribeBudgetNotificationsForAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1302,10 +1277,9 @@ const de_DescribeBudgetNotificationsForAccountCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1328,7 +1302,7 @@ export const de_DescribeBudgetPerformanceHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1367,10 +1341,9 @@ const de_DescribeBudgetPerformanceHistoryCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1393,7 +1366,7 @@ export const de_DescribeBudgetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1432,10 +1405,9 @@ const de_DescribeBudgetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1458,7 +1430,7 @@ export const de_DescribeNotificationsForBudgetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1497,10 +1469,9 @@ const de_DescribeNotificationsForBudgetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1518,12 +1489,12 @@ export const de_DescribeSubscribersForNotificationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSubscribersForNotificationResponse(data, context); + contents = _json(data); const response: DescribeSubscribersForNotificationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1562,10 +1533,9 @@ const de_DescribeSubscribersForNotificationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1583,12 +1553,12 @@ export const de_ExecuteBudgetActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExecuteBudgetActionResponse(data, context); + contents = _json(data); const response: ExecuteBudgetActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1624,10 +1594,9 @@ const de_ExecuteBudgetActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1645,12 +1614,12 @@ export const de_UpdateBudgetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateBudgetResponse(data, context); + contents = _json(data); const response: UpdateBudgetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1683,10 +1652,9 @@ const de_UpdateBudgetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1709,7 +1677,7 @@ export const de_UpdateBudgetActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1745,10 +1713,9 @@ const de_UpdateBudgetActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1766,12 +1733,12 @@ export const de_UpdateNotificationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNotificationResponse(data, context); + contents = _json(data); const response: UpdateNotificationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1807,10 +1774,9 @@ const de_UpdateNotificationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1828,12 +1794,12 @@ export const de_UpdateSubscriberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSubscriberResponse(data, context); + contents = _json(data); const response: UpdateSubscriberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1869,10 +1835,9 @@ const de_UpdateSubscriberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1886,7 +1851,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1902,7 +1867,7 @@ const de_CreationLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CreationLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new CreationLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1918,7 +1883,7 @@ const de_DuplicateRecordExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateRecordException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateRecordException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1934,7 +1899,7 @@ const de_ExpiredNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1950,7 +1915,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1966,7 +1931,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1982,7 +1947,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1995,7 +1960,7 @@ const de_InvalidParameterExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2011,7 +1976,7 @@ const de_ResourceLockedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLockedException(body, context); + const deserialized: any = _json(body); const exception = new ResourceLockedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2024,7 +1989,7 @@ const de_ResourceLockedExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2036,203 +2001,127 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_1ActionThreshold */ const se_ActionThreshold = (input: ActionThreshold, context: __SerdeContext): any => { - return { - ...(input.ActionThresholdType != null && { ActionThresholdType: input.ActionThresholdType }), - ...(input.ActionThresholdValue != null && { ActionThresholdValue: __serializeFloat(input.ActionThresholdValue) }), - }; + return take(input, { + ActionThresholdType: [], + ActionThresholdValue: __serializeFloat, + }); }; /** * serializeAws_json1_1AutoAdjustData */ const se_AutoAdjustData = (input: AutoAdjustData, context: __SerdeContext): any => { - return { - ...(input.AutoAdjustType != null && { AutoAdjustType: input.AutoAdjustType }), - ...(input.HistoricalOptions != null && { - HistoricalOptions: se_HistoricalOptions(input.HistoricalOptions, context), - }), - ...(input.LastAutoAdjustTime != null && { - LastAutoAdjustTime: Math.round(input.LastAutoAdjustTime.getTime() / 1000), - }), - }; + return take(input, { + AutoAdjustType: [], + HistoricalOptions: _json, + LastAutoAdjustTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1Budget */ const se_Budget = (input: Budget, context: __SerdeContext): any => { - return { - ...(input.AutoAdjustData != null && { AutoAdjustData: se_AutoAdjustData(input.AutoAdjustData, context) }), - ...(input.BudgetLimit != null && { BudgetLimit: se_Spend(input.BudgetLimit, context) }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.BudgetType != null && { BudgetType: input.BudgetType }), - ...(input.CalculatedSpend != null && { CalculatedSpend: se_CalculatedSpend(input.CalculatedSpend, context) }), - ...(input.CostFilters != null && { CostFilters: se_CostFilters(input.CostFilters, context) }), - ...(input.CostTypes != null && { CostTypes: se_CostTypes(input.CostTypes, context) }), - ...(input.LastUpdatedTime != null && { LastUpdatedTime: Math.round(input.LastUpdatedTime.getTime() / 1000) }), - ...(input.PlannedBudgetLimits != null && { - PlannedBudgetLimits: se_PlannedBudgetLimits(input.PlannedBudgetLimits, context), - }), - ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }), - ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }), - }; + return take(input, { + AutoAdjustData: (_) => se_AutoAdjustData(_, context), + BudgetLimit: _json, + BudgetName: [], + BudgetType: [], + CalculatedSpend: _json, + CostFilters: _json, + CostTypes: _json, + LastUpdatedTime: (_) => Math.round(_.getTime() / 1000), + PlannedBudgetLimits: _json, + TimePeriod: (_) => se_TimePeriod(_, context), + TimeUnit: [], + }); }; -/** - * serializeAws_json1_1CalculatedSpend - */ -const se_CalculatedSpend = (input: CalculatedSpend, context: __SerdeContext): any => { - return { - ...(input.ActualSpend != null && { ActualSpend: se_Spend(input.ActualSpend, context) }), - ...(input.ForecastedSpend != null && { ForecastedSpend: se_Spend(input.ForecastedSpend, context) }), - }; -}; +// se_CalculatedSpend omitted. -/** - * serializeAws_json1_1CostFilters - */ -const se_CostFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_DimensionValues(value, context); - return acc; - }, {}); -}; +// se_CostFilters omitted. -/** - * serializeAws_json1_1CostTypes - */ -const se_CostTypes = (input: CostTypes, context: __SerdeContext): any => { - return { - ...(input.IncludeCredit != null && { IncludeCredit: input.IncludeCredit }), - ...(input.IncludeDiscount != null && { IncludeDiscount: input.IncludeDiscount }), - ...(input.IncludeOtherSubscription != null && { IncludeOtherSubscription: input.IncludeOtherSubscription }), - ...(input.IncludeRecurring != null && { IncludeRecurring: input.IncludeRecurring }), - ...(input.IncludeRefund != null && { IncludeRefund: input.IncludeRefund }), - ...(input.IncludeSubscription != null && { IncludeSubscription: input.IncludeSubscription }), - ...(input.IncludeSupport != null && { IncludeSupport: input.IncludeSupport }), - ...(input.IncludeTax != null && { IncludeTax: input.IncludeTax }), - ...(input.IncludeUpfront != null && { IncludeUpfront: input.IncludeUpfront }), - ...(input.UseAmortized != null && { UseAmortized: input.UseAmortized }), - ...(input.UseBlended != null && { UseBlended: input.UseBlended }), - }; -}; +// se_CostTypes omitted. /** * serializeAws_json1_1CreateBudgetActionRequest */ const se_CreateBudgetActionRequest = (input: CreateBudgetActionRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActionThreshold != null && { ActionThreshold: se_ActionThreshold(input.ActionThreshold, context) }), - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.Definition != null && { Definition: se_Definition(input.Definition, context) }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.NotificationType != null && { NotificationType: input.NotificationType }), - ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }), - }; + return take(input, { + AccountId: [], + ActionThreshold: (_) => se_ActionThreshold(_, context), + ActionType: [], + ApprovalModel: [], + BudgetName: [], + Definition: _json, + ExecutionRoleArn: [], + NotificationType: [], + Subscribers: _json, + }); }; /** * serializeAws_json1_1CreateBudgetRequest */ const se_CreateBudgetRequest = (input: CreateBudgetRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Budget != null && { Budget: se_Budget(input.Budget, context) }), - ...(input.NotificationsWithSubscribers != null && { - NotificationsWithSubscribers: se_NotificationWithSubscribersList(input.NotificationsWithSubscribers, context), - }), - }; + return take(input, { + AccountId: [], + Budget: (_) => se_Budget(_, context), + NotificationsWithSubscribers: (_) => se_NotificationWithSubscribersList(_, context), + }); }; /** * serializeAws_json1_1CreateNotificationRequest */ const se_CreateNotificationRequest = (input: CreateNotificationRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + Notification: (_) => se_Notification(_, context), + Subscribers: _json, + }); }; /** * serializeAws_json1_1CreateSubscriberRequest */ const se_CreateSubscriberRequest = (input: CreateSubscriberRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.Subscriber != null && { Subscriber: se_Subscriber(input.Subscriber, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + Notification: (_) => se_Notification(_, context), + Subscriber: _json, + }); }; -/** - * serializeAws_json1_1Definition - */ -const se_Definition = (input: Definition, context: __SerdeContext): any => { - return { - ...(input.IamActionDefinition != null && { - IamActionDefinition: se_IamActionDefinition(input.IamActionDefinition, context), - }), - ...(input.ScpActionDefinition != null && { - ScpActionDefinition: se_ScpActionDefinition(input.ScpActionDefinition, context), - }), - ...(input.SsmActionDefinition != null && { - SsmActionDefinition: se_SsmActionDefinition(input.SsmActionDefinition, context), - }), - }; -}; +// se_Definition omitted. -/** - * serializeAws_json1_1DeleteBudgetActionRequest - */ -const se_DeleteBudgetActionRequest = (input: DeleteBudgetActionRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActionId != null && { ActionId: input.ActionId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - }; -}; +// se_DeleteBudgetActionRequest omitted. -/** - * serializeAws_json1_1DeleteBudgetRequest - */ -const se_DeleteBudgetRequest = (input: DeleteBudgetRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - }; -}; +// se_DeleteBudgetRequest omitted. /** * serializeAws_json1_1DeleteNotificationRequest */ const se_DeleteNotificationRequest = (input: DeleteNotificationRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + Notification: (_) => se_Notification(_, context), + }); }; /** * serializeAws_json1_1DeleteSubscriberRequest */ const se_DeleteSubscriberRequest = (input: DeleteSubscriberRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.Subscriber != null && { Subscriber: se_Subscriber(input.Subscriber, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + Notification: (_) => se_Notification(_, context), + Subscriber: _json, + }); }; /** @@ -2242,69 +2131,23 @@ const se_DescribeBudgetActionHistoriesRequest = ( input: DescribeBudgetActionHistoriesRequest, context: __SerdeContext ): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActionId != null && { ActionId: input.ActionId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }), - }; + return take(input, { + AccountId: [], + ActionId: [], + BudgetName: [], + MaxResults: [], + NextToken: [], + TimePeriod: (_) => se_TimePeriod(_, context), + }); }; -/** - * serializeAws_json1_1DescribeBudgetActionRequest - */ -const se_DescribeBudgetActionRequest = (input: DescribeBudgetActionRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActionId != null && { ActionId: input.ActionId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - }; -}; +// se_DescribeBudgetActionRequest omitted. -/** - * serializeAws_json1_1DescribeBudgetActionsForAccountRequest - */ -const se_DescribeBudgetActionsForAccountRequest = ( - input: DescribeBudgetActionsForAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeBudgetActionsForAccountRequest omitted. -/** - * serializeAws_json1_1DescribeBudgetActionsForBudgetRequest - */ -const se_DescribeBudgetActionsForBudgetRequest = ( - input: DescribeBudgetActionsForBudgetRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeBudgetActionsForBudgetRequest omitted. -/** - * serializeAws_json1_1DescribeBudgetNotificationsForAccountRequest - */ -const se_DescribeBudgetNotificationsForAccountRequest = ( - input: DescribeBudgetNotificationsForAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeBudgetNotificationsForAccountRequest omitted. /** * serializeAws_json1_1DescribeBudgetPerformanceHistoryRequest @@ -2313,50 +2156,20 @@ const se_DescribeBudgetPerformanceHistoryRequest = ( input: DescribeBudgetPerformanceHistoryRequest, context: __SerdeContext ): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TimePeriod != null && { TimePeriod: se_TimePeriod(input.TimePeriod, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + MaxResults: [], + NextToken: [], + TimePeriod: (_) => se_TimePeriod(_, context), + }); }; -/** - * serializeAws_json1_1DescribeBudgetRequest - */ -const se_DescribeBudgetRequest = (input: DescribeBudgetRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - }; -}; +// se_DescribeBudgetRequest omitted. -/** - * serializeAws_json1_1DescribeBudgetsRequest - */ -const se_DescribeBudgetsRequest = (input: DescribeBudgetsRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeBudgetsRequest omitted. -/** - * serializeAws_json1_1DescribeNotificationsForBudgetRequest - */ -const se_DescribeNotificationsForBudgetRequest = ( - input: DescribeNotificationsForBudgetRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeNotificationsForBudgetRequest omitted. /** * serializeAws_json1_1DescribeSubscribersForNotificationRequest @@ -2365,103 +2178,48 @@ const se_DescribeSubscribersForNotificationRequest = ( input: DescribeSubscribersForNotificationRequest, context: __SerdeContext ): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + MaxResults: [], + NextToken: [], + Notification: (_) => se_Notification(_, context), + }); }; -/** - * serializeAws_json1_1DimensionValues - */ -const se_DimensionValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DimensionValues omitted. -/** - * serializeAws_json1_1ExecuteBudgetActionRequest - */ -const se_ExecuteBudgetActionRequest = (input: ExecuteBudgetActionRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActionId != null && { ActionId: input.ActionId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.ExecutionType != null && { ExecutionType: input.ExecutionType }), - }; -}; +// se_ExecuteBudgetActionRequest omitted. -/** - * serializeAws_json1_1Groups - */ -const se_Groups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Groups omitted. -/** - * serializeAws_json1_1HistoricalOptions - */ -const se_HistoricalOptions = (input: HistoricalOptions, context: __SerdeContext): any => { - return { - ...(input.BudgetAdjustmentPeriod != null && { BudgetAdjustmentPeriod: input.BudgetAdjustmentPeriod }), - ...(input.LookBackAvailablePeriods != null && { LookBackAvailablePeriods: input.LookBackAvailablePeriods }), - }; -}; +// se_HistoricalOptions omitted. -/** - * serializeAws_json1_1IamActionDefinition - */ -const se_IamActionDefinition = (input: IamActionDefinition, context: __SerdeContext): any => { - return { - ...(input.Groups != null && { Groups: se_Groups(input.Groups, context) }), - ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }), - ...(input.Roles != null && { Roles: se_Roles(input.Roles, context) }), - ...(input.Users != null && { Users: se_Users(input.Users, context) }), - }; -}; +// se_IamActionDefinition omitted. -/** - * serializeAws_json1_1InstanceIds - */ -const se_InstanceIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceIds omitted. /** * serializeAws_json1_1Notification */ const se_Notification = (input: Notification, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.NotificationState != null && { NotificationState: input.NotificationState }), - ...(input.NotificationType != null && { NotificationType: input.NotificationType }), - ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }), - ...(input.ThresholdType != null && { ThresholdType: input.ThresholdType }), - }; + return take(input, { + ComparisonOperator: [], + NotificationState: [], + NotificationType: [], + Threshold: __serializeFloat, + ThresholdType: [], + }); }; /** * serializeAws_json1_1NotificationWithSubscribers */ const se_NotificationWithSubscribers = (input: NotificationWithSubscribers, context: __SerdeContext): any => { - return { - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }), - }; + return take(input, { + Notification: (_) => se_Notification(_, context), + Subscribers: _json, + }); }; /** @@ -2475,191 +2233,104 @@ const se_NotificationWithSubscribersList = (input: NotificationWithSubscribers[] }); }; -/** - * serializeAws_json1_1PlannedBudgetLimits - */ -const se_PlannedBudgetLimits = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Spend(value, context); - return acc; - }, {}); -}; +// se_PlannedBudgetLimits omitted. -/** - * serializeAws_json1_1Roles - */ -const se_Roles = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Roles omitted. -/** - * serializeAws_json1_1ScpActionDefinition - */ -const se_ScpActionDefinition = (input: ScpActionDefinition, context: __SerdeContext): any => { - return { - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.TargetIds != null && { TargetIds: se_TargetIds(input.TargetIds, context) }), - }; -}; +// se_ScpActionDefinition omitted. -/** - * serializeAws_json1_1Spend - */ -const se_Spend = (input: Spend, context: __SerdeContext): any => { - return { - ...(input.Amount != null && { Amount: input.Amount }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_Spend omitted. -/** - * serializeAws_json1_1SsmActionDefinition - */ -const se_SsmActionDefinition = (input: SsmActionDefinition, context: __SerdeContext): any => { - return { - ...(input.ActionSubType != null && { ActionSubType: input.ActionSubType }), - ...(input.InstanceIds != null && { InstanceIds: se_InstanceIds(input.InstanceIds, context) }), - ...(input.Region != null && { Region: input.Region }), - }; -}; +// se_SsmActionDefinition omitted. -/** - * serializeAws_json1_1Subscriber - */ -const se_Subscriber = (input: Subscriber, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }), - }; -}; +// se_Subscriber omitted. -/** - * serializeAws_json1_1Subscribers - */ -const se_Subscribers = (input: Subscriber[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Subscriber(entry, context); - }); -}; +// se_Subscribers omitted. -/** - * serializeAws_json1_1TargetIds - */ -const se_TargetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetIds omitted. /** * serializeAws_json1_1TimePeriod */ const se_TimePeriod = (input: TimePeriod, context: __SerdeContext): any => { - return { - ...(input.End != null && { End: Math.round(input.End.getTime() / 1000) }), - ...(input.Start != null && { Start: Math.round(input.Start.getTime() / 1000) }), - }; + return take(input, { + End: (_) => Math.round(_.getTime() / 1000), + Start: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1UpdateBudgetActionRequest */ const se_UpdateBudgetActionRequest = (input: UpdateBudgetActionRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActionId != null && { ActionId: input.ActionId }), - ...(input.ActionThreshold != null && { ActionThreshold: se_ActionThreshold(input.ActionThreshold, context) }), - ...(input.ApprovalModel != null && { ApprovalModel: input.ApprovalModel }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.Definition != null && { Definition: se_Definition(input.Definition, context) }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.NotificationType != null && { NotificationType: input.NotificationType }), - ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }), - }; + return take(input, { + AccountId: [], + ActionId: [], + ActionThreshold: (_) => se_ActionThreshold(_, context), + ApprovalModel: [], + BudgetName: [], + Definition: _json, + ExecutionRoleArn: [], + NotificationType: [], + Subscribers: _json, + }); }; /** * serializeAws_json1_1UpdateBudgetRequest */ const se_UpdateBudgetRequest = (input: UpdateBudgetRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.NewBudget != null && { NewBudget: se_Budget(input.NewBudget, context) }), - }; + return take(input, { + AccountId: [], + NewBudget: (_) => se_Budget(_, context), + }); }; /** * serializeAws_json1_1UpdateNotificationRequest */ const se_UpdateNotificationRequest = (input: UpdateNotificationRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.NewNotification != null && { NewNotification: se_Notification(input.NewNotification, context) }), - ...(input.OldNotification != null && { OldNotification: se_Notification(input.OldNotification, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + NewNotification: (_) => se_Notification(_, context), + OldNotification: (_) => se_Notification(_, context), + }); }; /** * serializeAws_json1_1UpdateSubscriberRequest */ const se_UpdateSubscriberRequest = (input: UpdateSubscriberRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.NewSubscriber != null && { NewSubscriber: se_Subscriber(input.NewSubscriber, context) }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.OldSubscriber != null && { OldSubscriber: se_Subscriber(input.OldSubscriber, context) }), - }; + return take(input, { + AccountId: [], + BudgetName: [], + NewSubscriber: _json, + Notification: (_) => se_Notification(_, context), + OldSubscriber: _json, + }); }; -/** - * serializeAws_json1_1Users - */ -const se_Users = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Users omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_1Action */ const de_Action = (output: any, context: __SerdeContext): Action => { - return { - ActionId: __expectString(output.ActionId), - ActionThreshold: output.ActionThreshold != null ? de_ActionThreshold(output.ActionThreshold, context) : undefined, - ActionType: __expectString(output.ActionType), - ApprovalModel: __expectString(output.ApprovalModel), - BudgetName: __expectString(output.BudgetName), - Definition: output.Definition != null ? de_Definition(output.Definition, context) : undefined, - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - NotificationType: __expectString(output.NotificationType), - Status: __expectString(output.Status), - Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined, - } as any; + return take(output, { + ActionId: __expectString, + ActionThreshold: (_: any) => de_ActionThreshold(_, context), + ActionType: __expectString, + ApprovalModel: __expectString, + BudgetName: __expectString, + Definition: _json, + ExecutionRoleArn: __expectString, + NotificationType: __expectString, + Status: __expectString, + Subscribers: _json, + }) as any; }; /** @@ -2669,9 +2340,6 @@ const de_ActionHistories = (output: any, context: __SerdeContext): ActionHistory const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ActionHistory(entry, context); }); return retVal; @@ -2681,24 +2349,22 @@ const de_ActionHistories = (output: any, context: __SerdeContext): ActionHistory * deserializeAws_json1_1ActionHistory */ const de_ActionHistory = (output: any, context: __SerdeContext): ActionHistory => { - return { - ActionHistoryDetails: - output.ActionHistoryDetails != null ? de_ActionHistoryDetails(output.ActionHistoryDetails, context) : undefined, - EventType: __expectString(output.EventType), - Status: __expectString(output.Status), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; + return take(output, { + ActionHistoryDetails: (_: any) => de_ActionHistoryDetails(_, context), + EventType: __expectString, + Status: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1ActionHistoryDetails */ const de_ActionHistoryDetails = (output: any, context: __SerdeContext): ActionHistoryDetails => { - return { - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - Message: __expectString(output.Message), - } as any; + return take(output, { + Action: (_: any) => de_Action(_, context), + Message: __expectString, + }) as any; }; /** @@ -2708,9 +2374,6 @@ const de_Actions = (output: any, context: __SerdeContext): Action[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Action(entry, context); }); return retVal; @@ -2720,59 +2383,51 @@ const de_Actions = (output: any, context: __SerdeContext): Action[] => { * deserializeAws_json1_1ActionThreshold */ const de_ActionThreshold = (output: any, context: __SerdeContext): ActionThreshold => { - return { - ActionThresholdType: __expectString(output.ActionThresholdType), - ActionThresholdValue: __limitedParseDouble(output.ActionThresholdValue), - } as any; + return take(output, { + ActionThresholdType: __expectString, + ActionThresholdValue: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1AutoAdjustData */ const de_AutoAdjustData = (output: any, context: __SerdeContext): AutoAdjustData => { - return { - AutoAdjustType: __expectString(output.AutoAdjustType), - HistoricalOptions: - output.HistoricalOptions != null ? de_HistoricalOptions(output.HistoricalOptions, context) : undefined, - LastAutoAdjustTime: - output.LastAutoAdjustTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAutoAdjustTime))) - : undefined, - } as any; + return take(output, { + AutoAdjustType: __expectString, + HistoricalOptions: _json, + LastAutoAdjustTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1Budget */ const de_Budget = (output: any, context: __SerdeContext): Budget => { - return { - AutoAdjustData: output.AutoAdjustData != null ? de_AutoAdjustData(output.AutoAdjustData, context) : undefined, - BudgetLimit: output.BudgetLimit != null ? de_Spend(output.BudgetLimit, context) : undefined, - BudgetName: __expectString(output.BudgetName), - BudgetType: __expectString(output.BudgetType), - CalculatedSpend: output.CalculatedSpend != null ? de_CalculatedSpend(output.CalculatedSpend, context) : undefined, - CostFilters: output.CostFilters != null ? de_CostFilters(output.CostFilters, context) : undefined, - CostTypes: output.CostTypes != null ? de_CostTypes(output.CostTypes, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - PlannedBudgetLimits: - output.PlannedBudgetLimits != null ? de_PlannedBudgetLimits(output.PlannedBudgetLimits, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_TimePeriod(output.TimePeriod, context) : undefined, - TimeUnit: __expectString(output.TimeUnit), - } as any; + return take(output, { + AutoAdjustData: (_: any) => de_AutoAdjustData(_, context), + BudgetLimit: _json, + BudgetName: __expectString, + BudgetType: __expectString, + CalculatedSpend: _json, + CostFilters: _json, + CostTypes: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PlannedBudgetLimits: _json, + TimePeriod: (_: any) => de_TimePeriod(_, context), + TimeUnit: __expectString, + }) as any; }; /** * deserializeAws_json1_1BudgetedAndActualAmounts */ const de_BudgetedAndActualAmounts = (output: any, context: __SerdeContext): BudgetedAndActualAmounts => { - return { - ActualAmount: output.ActualAmount != null ? de_Spend(output.ActualAmount, context) : undefined, - BudgetedAmount: output.BudgetedAmount != null ? de_Spend(output.BudgetedAmount, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_TimePeriod(output.TimePeriod, context) : undefined, - } as any; + return take(output, { + ActualAmount: _json, + BudgetedAmount: _json, + TimePeriod: (_: any) => de_TimePeriod(_, context), + }) as any; }; /** @@ -2782,9 +2437,6 @@ const de_BudgetedAndActualAmountsList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BudgetedAndActualAmounts(entry, context); }); return retVal; @@ -2794,10 +2446,10 @@ const de_BudgetedAndActualAmountsList = (output: any, context: __SerdeContext): * deserializeAws_json1_1BudgetNotificationsForAccount */ const de_BudgetNotificationsForAccount = (output: any, context: __SerdeContext): BudgetNotificationsForAccount => { - return { - BudgetName: __expectString(output.BudgetName), - Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined, - } as any; + return take(output, { + BudgetName: __expectString, + Notifications: (_: any) => de_Notifications(_, context), + }) as any; }; /** @@ -2810,9 +2462,6 @@ const de_BudgetNotificationsForAccountList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BudgetNotificationsForAccount(entry, context); }); return retVal; @@ -2822,17 +2471,14 @@ const de_BudgetNotificationsForAccountList = ( * deserializeAws_json1_1BudgetPerformanceHistory */ const de_BudgetPerformanceHistory = (output: any, context: __SerdeContext): BudgetPerformanceHistory => { - return { - BudgetName: __expectString(output.BudgetName), - BudgetType: __expectString(output.BudgetType), - BudgetedAndActualAmountsList: - output.BudgetedAndActualAmountsList != null - ? de_BudgetedAndActualAmountsList(output.BudgetedAndActualAmountsList, context) - : undefined, - CostFilters: output.CostFilters != null ? de_CostFilters(output.CostFilters, context) : undefined, - CostTypes: output.CostTypes != null ? de_CostTypes(output.CostTypes, context) : undefined, - TimeUnit: __expectString(output.TimeUnit), - } as any; + return take(output, { + BudgetName: __expectString, + BudgetType: __expectString, + BudgetedAndActualAmountsList: (_: any) => de_BudgetedAndActualAmountsList(_, context), + CostFilters: _json, + CostTypes: _json, + TimeUnit: __expectString, + }) as any; }; /** @@ -2842,142 +2488,45 @@ const de_Budgets = (output: any, context: __SerdeContext): Budget[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Budget(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CalculatedSpend - */ -const de_CalculatedSpend = (output: any, context: __SerdeContext): CalculatedSpend => { - return { - ActualSpend: output.ActualSpend != null ? de_Spend(output.ActualSpend, context) : undefined, - ForecastedSpend: output.ForecastedSpend != null ? de_Spend(output.ForecastedSpend, context) : undefined, - } as any; -}; +// de_CalculatedSpend omitted. -/** - * deserializeAws_json1_1CostFilters - */ -const de_CostFilters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_DimensionValues(value, context); - return acc; - }, {}); -}; +// de_CostFilters omitted. -/** - * deserializeAws_json1_1CostTypes - */ -const de_CostTypes = (output: any, context: __SerdeContext): CostTypes => { - return { - IncludeCredit: __expectBoolean(output.IncludeCredit), - IncludeDiscount: __expectBoolean(output.IncludeDiscount), - IncludeOtherSubscription: __expectBoolean(output.IncludeOtherSubscription), - IncludeRecurring: __expectBoolean(output.IncludeRecurring), - IncludeRefund: __expectBoolean(output.IncludeRefund), - IncludeSubscription: __expectBoolean(output.IncludeSubscription), - IncludeSupport: __expectBoolean(output.IncludeSupport), - IncludeTax: __expectBoolean(output.IncludeTax), - IncludeUpfront: __expectBoolean(output.IncludeUpfront), - UseAmortized: __expectBoolean(output.UseAmortized), - UseBlended: __expectBoolean(output.UseBlended), - } as any; -}; +// de_CostTypes omitted. -/** - * deserializeAws_json1_1CreateBudgetActionResponse - */ -const de_CreateBudgetActionResponse = (output: any, context: __SerdeContext): CreateBudgetActionResponse => { - return { - AccountId: __expectString(output.AccountId), - ActionId: __expectString(output.ActionId), - BudgetName: __expectString(output.BudgetName), - } as any; -}; +// de_CreateBudgetActionResponse omitted. -/** - * deserializeAws_json1_1CreateBudgetResponse - */ -const de_CreateBudgetResponse = (output: any, context: __SerdeContext): CreateBudgetResponse => { - return {} as any; -}; +// de_CreateBudgetResponse omitted. -/** - * deserializeAws_json1_1CreateNotificationResponse - */ -const de_CreateNotificationResponse = (output: any, context: __SerdeContext): CreateNotificationResponse => { - return {} as any; -}; +// de_CreateNotificationResponse omitted. -/** - * deserializeAws_json1_1CreateSubscriberResponse - */ -const de_CreateSubscriberResponse = (output: any, context: __SerdeContext): CreateSubscriberResponse => { - return {} as any; -}; +// de_CreateSubscriberResponse omitted. -/** - * deserializeAws_json1_1CreationLimitExceededException - */ -const de_CreationLimitExceededException = (output: any, context: __SerdeContext): CreationLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CreationLimitExceededException omitted. -/** - * deserializeAws_json1_1Definition - */ -const de_Definition = (output: any, context: __SerdeContext): Definition => { - return { - IamActionDefinition: - output.IamActionDefinition != null ? de_IamActionDefinition(output.IamActionDefinition, context) : undefined, - ScpActionDefinition: - output.ScpActionDefinition != null ? de_ScpActionDefinition(output.ScpActionDefinition, context) : undefined, - SsmActionDefinition: - output.SsmActionDefinition != null ? de_SsmActionDefinition(output.SsmActionDefinition, context) : undefined, - } as any; -}; +// de_Definition omitted. /** * deserializeAws_json1_1DeleteBudgetActionResponse */ const de_DeleteBudgetActionResponse = (output: any, context: __SerdeContext): DeleteBudgetActionResponse => { - return { - AccountId: __expectString(output.AccountId), - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - BudgetName: __expectString(output.BudgetName), - } as any; + return take(output, { + AccountId: __expectString, + Action: (_: any) => de_Action(_, context), + BudgetName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeleteBudgetResponse - */ -const de_DeleteBudgetResponse = (output: any, context: __SerdeContext): DeleteBudgetResponse => { - return {} as any; -}; +// de_DeleteBudgetResponse omitted. -/** - * deserializeAws_json1_1DeleteNotificationResponse - */ -const de_DeleteNotificationResponse = (output: any, context: __SerdeContext): DeleteNotificationResponse => { - return {} as any; -}; +// de_DeleteNotificationResponse omitted. -/** - * deserializeAws_json1_1DeleteSubscriberResponse - */ -const de_DeleteSubscriberResponse = (output: any, context: __SerdeContext): DeleteSubscriberResponse => { - return {} as any; -}; +// de_DeleteSubscriberResponse omitted. /** * deserializeAws_json1_1DescribeBudgetActionHistoriesResponse @@ -2986,21 +2535,21 @@ const de_DescribeBudgetActionHistoriesResponse = ( output: any, context: __SerdeContext ): DescribeBudgetActionHistoriesResponse => { - return { - ActionHistories: output.ActionHistories != null ? de_ActionHistories(output.ActionHistories, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ActionHistories: (_: any) => de_ActionHistories(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeBudgetActionResponse */ const de_DescribeBudgetActionResponse = (output: any, context: __SerdeContext): DescribeBudgetActionResponse => { - return { - AccountId: __expectString(output.AccountId), - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - BudgetName: __expectString(output.BudgetName), - } as any; + return take(output, { + AccountId: __expectString, + Action: (_: any) => de_Action(_, context), + BudgetName: __expectString, + }) as any; }; /** @@ -3010,10 +2559,10 @@ const de_DescribeBudgetActionsForAccountResponse = ( output: any, context: __SerdeContext ): DescribeBudgetActionsForAccountResponse => { - return { - Actions: output.Actions != null ? de_Actions(output.Actions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Actions: (_: any) => de_Actions(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -3023,10 +2572,10 @@ const de_DescribeBudgetActionsForBudgetResponse = ( output: any, context: __SerdeContext ): DescribeBudgetActionsForBudgetResponse => { - return { - Actions: output.Actions != null ? de_Actions(output.Actions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Actions: (_: any) => de_Actions(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -3036,13 +2585,10 @@ const de_DescribeBudgetNotificationsForAccountResponse = ( output: any, context: __SerdeContext ): DescribeBudgetNotificationsForAccountResponse => { - return { - BudgetNotificationsForAccount: - output.BudgetNotificationsForAccount != null - ? de_BudgetNotificationsForAccountList(output.BudgetNotificationsForAccount, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + BudgetNotificationsForAccount: (_: any) => de_BudgetNotificationsForAccountList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -3052,32 +2598,29 @@ const de_DescribeBudgetPerformanceHistoryResponse = ( output: any, context: __SerdeContext ): DescribeBudgetPerformanceHistoryResponse => { - return { - BudgetPerformanceHistory: - output.BudgetPerformanceHistory != null - ? de_BudgetPerformanceHistory(output.BudgetPerformanceHistory, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + BudgetPerformanceHistory: (_: any) => de_BudgetPerformanceHistory(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeBudgetResponse */ const de_DescribeBudgetResponse = (output: any, context: __SerdeContext): DescribeBudgetResponse => { - return { - Budget: output.Budget != null ? de_Budget(output.Budget, context) : undefined, - } as any; + return take(output, { + Budget: (_: any) => de_Budget(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeBudgetsResponse */ const de_DescribeBudgetsResponse = (output: any, context: __SerdeContext): DescribeBudgetsResponse => { - return { - Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Budgets: (_: any) => de_Budgets(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -3087,169 +2630,49 @@ const de_DescribeNotificationsForBudgetResponse = ( output: any, context: __SerdeContext ): DescribeNotificationsForBudgetResponse => { - return { - NextToken: __expectString(output.NextToken), - Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Notifications: (_: any) => de_Notifications(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeSubscribersForNotificationResponse - */ -const de_DescribeSubscribersForNotificationResponse = ( - output: any, - context: __SerdeContext -): DescribeSubscribersForNotificationResponse => { - return { - NextToken: __expectString(output.NextToken), - Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined, - } as any; -}; +// de_DescribeSubscribersForNotificationResponse omitted. -/** - * deserializeAws_json1_1DimensionValues - */ -const de_DimensionValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DimensionValues omitted. -/** - * deserializeAws_json1_1DuplicateRecordException - */ -const de_DuplicateRecordException = (output: any, context: __SerdeContext): DuplicateRecordException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DuplicateRecordException omitted. -/** - * deserializeAws_json1_1ExecuteBudgetActionResponse - */ -const de_ExecuteBudgetActionResponse = (output: any, context: __SerdeContext): ExecuteBudgetActionResponse => { - return { - AccountId: __expectString(output.AccountId), - ActionId: __expectString(output.ActionId), - BudgetName: __expectString(output.BudgetName), - ExecutionType: __expectString(output.ExecutionType), - } as any; -}; +// de_ExecuteBudgetActionResponse omitted. -/** - * deserializeAws_json1_1ExpiredNextTokenException - */ -const de_ExpiredNextTokenException = (output: any, context: __SerdeContext): ExpiredNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ExpiredNextTokenException omitted. -/** - * deserializeAws_json1_1Groups - */ -const de_Groups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Groups omitted. -/** - * deserializeAws_json1_1HistoricalOptions - */ -const de_HistoricalOptions = (output: any, context: __SerdeContext): HistoricalOptions => { - return { - BudgetAdjustmentPeriod: __expectInt32(output.BudgetAdjustmentPeriod), - LookBackAvailablePeriods: __expectInt32(output.LookBackAvailablePeriods), - } as any; -}; +// de_HistoricalOptions omitted. -/** - * deserializeAws_json1_1IamActionDefinition - */ -const de_IamActionDefinition = (output: any, context: __SerdeContext): IamActionDefinition => { - return { - Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined, - PolicyArn: __expectString(output.PolicyArn), - Roles: output.Roles != null ? de_Roles(output.Roles, context) : undefined, - Users: output.Users != null ? de_Users(output.Users, context) : undefined, - } as any; -}; +// de_IamActionDefinition omitted. -/** - * deserializeAws_json1_1InstanceIds - */ -const de_InstanceIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InstanceIds omitted. -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalErrorException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotFoundException omitted. /** * deserializeAws_json1_1Notification */ const de_Notification = (output: any, context: __SerdeContext): Notification => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - NotificationState: __expectString(output.NotificationState), - NotificationType: __expectString(output.NotificationType), - Threshold: __limitedParseDouble(output.Threshold), - ThresholdType: __expectString(output.ThresholdType), - } as any; + return take(output, { + ComparisonOperator: __expectString, + NotificationState: __expectString, + NotificationType: __expectString, + Threshold: __limitedParseDouble, + ThresholdType: __expectString, + }) as any; }; /** @@ -3259,188 +2682,60 @@ const de_Notifications = (output: any, context: __SerdeContext): Notification[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Notification(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PlannedBudgetLimits - */ -const de_PlannedBudgetLimits = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Spend(value, context); - return acc; - }, {}); -}; +// de_PlannedBudgetLimits omitted. -/** - * deserializeAws_json1_1ResourceLockedException - */ -const de_ResourceLockedException = (output: any, context: __SerdeContext): ResourceLockedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceLockedException omitted. -/** - * deserializeAws_json1_1Roles - */ -const de_Roles = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Roles omitted. -/** - * deserializeAws_json1_1ScpActionDefinition - */ -const de_ScpActionDefinition = (output: any, context: __SerdeContext): ScpActionDefinition => { - return { - PolicyId: __expectString(output.PolicyId), - TargetIds: output.TargetIds != null ? de_TargetIds(output.TargetIds, context) : undefined, - } as any; -}; +// de_ScpActionDefinition omitted. -/** - * deserializeAws_json1_1Spend - */ -const de_Spend = (output: any, context: __SerdeContext): Spend => { - return { - Amount: __expectString(output.Amount), - Unit: __expectString(output.Unit), - } as any; -}; +// de_Spend omitted. -/** - * deserializeAws_json1_1SsmActionDefinition - */ -const de_SsmActionDefinition = (output: any, context: __SerdeContext): SsmActionDefinition => { - return { - ActionSubType: __expectString(output.ActionSubType), - InstanceIds: output.InstanceIds != null ? de_InstanceIds(output.InstanceIds, context) : undefined, - Region: __expectString(output.Region), - } as any; -}; +// de_SsmActionDefinition omitted. -/** - * deserializeAws_json1_1Subscriber - */ -const de_Subscriber = (output: any, context: __SerdeContext): Subscriber => { - return { - Address: __expectString(output.Address), - SubscriptionType: __expectString(output.SubscriptionType), - } as any; -}; +// de_Subscriber omitted. -/** - * deserializeAws_json1_1Subscribers - */ -const de_Subscribers = (output: any, context: __SerdeContext): Subscriber[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subscriber(entry, context); - }); - return retVal; -}; +// de_Subscribers omitted. -/** - * deserializeAws_json1_1TargetIds - */ -const de_TargetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetIds omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. /** * deserializeAws_json1_1TimePeriod */ const de_TimePeriod = (output: any, context: __SerdeContext): TimePeriod => { - return { - End: output.End != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.End))) : undefined, - Start: output.Start != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Start))) : undefined, - } as any; + return take(output, { + End: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Start: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1UpdateBudgetActionResponse */ const de_UpdateBudgetActionResponse = (output: any, context: __SerdeContext): UpdateBudgetActionResponse => { - return { - AccountId: __expectString(output.AccountId), - BudgetName: __expectString(output.BudgetName), - NewAction: output.NewAction != null ? de_Action(output.NewAction, context) : undefined, - OldAction: output.OldAction != null ? de_Action(output.OldAction, context) : undefined, - } as any; + return take(output, { + AccountId: __expectString, + BudgetName: __expectString, + NewAction: (_: any) => de_Action(_, context), + OldAction: (_: any) => de_Action(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateBudgetResponse - */ -const de_UpdateBudgetResponse = (output: any, context: __SerdeContext): UpdateBudgetResponse => { - return {} as any; -}; +// de_UpdateBudgetResponse omitted. -/** - * deserializeAws_json1_1UpdateNotificationResponse - */ -const de_UpdateNotificationResponse = (output: any, context: __SerdeContext): UpdateNotificationResponse => { - return {} as any; -}; +// de_UpdateNotificationResponse omitted. -/** - * deserializeAws_json1_1UpdateSubscriberResponse - */ -const de_UpdateSubscriberResponse = (output: any, context: __SerdeContext): UpdateSubscriberResponse => { - return {} as any; -}; +// de_UpdateSubscriberResponse omitted. -/** - * deserializeAws_json1_1Users - */ -const de_Users = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Users omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3462,6 +2757,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-chime-sdk-identity/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-identity/src/protocols/Aws_restJson1.ts index 61a136356ee2..02b9ca417d72 100644 --- a/clients/client-chime-sdk-identity/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime-sdk-identity/src/protocols/Aws_restJson1.ts @@ -1,17 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -126,24 +127,17 @@ import { ChimeSDKIdentityServiceException as __BaseException } from "../models/C import { AppInstance, AppInstanceAdmin, - AppInstanceAdminSummary, AppInstanceBot, - AppInstanceBotSummary, AppInstanceRetentionSettings, - AppInstanceSummary, AppInstanceUser, AppInstanceUserEndpoint, - AppInstanceUserEndpointSummary, - AppInstanceUserSummary, BadRequestException, ChannelRetentionSettings, Configuration, ConflictException, EndpointAttributes, - EndpointState, ExpirationSettings, ForbiddenException, - Identity, LexConfiguration, NotFoundException, ResourceLimitExceededException, @@ -167,12 +161,14 @@ export const se_CreateAppInstanceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Metadata: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -206,9 +202,11 @@ export const se_CreateAppInstanceAdminCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AppInstanceAdminArn != null && { AppInstanceAdminArn: input.AppInstanceAdminArn }), - }); + body = JSON.stringify( + take(input, { + AppInstanceAdminArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -233,14 +231,16 @@ export const se_CreateAppInstanceBotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-bots"; let body: any; - body = JSON.stringify({ - ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Configuration != null && { Configuration: se_Configuration(input.Configuration, context) }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppInstanceArn: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Configuration: (_) => _json(_), + Metadata: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -265,17 +265,17 @@ export const se_CreateAppInstanceUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users"; let body: any; - body = JSON.stringify({ - ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }), - ...(input.AppInstanceUserId != null && { AppInstanceUserId: input.AppInstanceUserId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ExpirationSettings != null && { - ExpirationSettings: se_ExpirationSettings(input.ExpirationSettings, context), - }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppInstanceArn: [], + AppInstanceUserId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ExpirationSettings: (_) => _json(_), + Metadata: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -856,11 +856,11 @@ export const se_PutAppInstanceRetentionSettingsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AppInstanceRetentionSettings != null && { - AppInstanceRetentionSettings: se_AppInstanceRetentionSettings(input.AppInstanceRetentionSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + AppInstanceRetentionSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -895,11 +895,11 @@ export const se_PutAppInstanceUserExpirationSettingsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ExpirationSettings != null && { - ExpirationSettings: se_ExpirationSettings(input.ExpirationSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + ExpirationSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -934,16 +934,16 @@ export const se_RegisterAppInstanceUserEndpointCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AllowMessages != null && { AllowMessages: input.AllowMessages }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.EndpointAttributes != null && { - EndpointAttributes: se_EndpointAttributes(input.EndpointAttributes, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + AllowMessages: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + EndpointAttributes: (_) => _json(_), + Name: [], + ResourceArn: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -971,10 +971,12 @@ export const se_TagResourceCommand = async ( operation: [, "tag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1003,10 +1005,12 @@ export const se_UntagResourceCommand = async ( operation: [, "untag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1041,10 +1045,12 @@ export const se_UpdateAppInstanceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1078,10 +1084,12 @@ export const se_UpdateAppInstanceBotCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1115,10 +1123,12 @@ export const se_UpdateAppInstanceUserCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1154,10 +1164,12 @@ export const se_UpdateAppInstanceUserEndpointCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "EndpointId", () => input.EndpointId!, "{EndpointId}", false); let body: any; - body = JSON.stringify({ - ...(input.AllowMessages != null && { AllowMessages: input.AllowMessages }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + AllowMessages: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1183,9 +1195,10 @@ export const de_CreateAppInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } + const doc = take(data, { + AppInstanceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1228,10 +1241,9 @@ const de_CreateAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1251,12 +1263,11 @@ export const de_CreateAppInstanceAdminCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceAdmin != null) { - contents.AppInstanceAdmin = de_Identity(data.AppInstanceAdmin, context); - } - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } + const doc = take(data, { + AppInstanceAdmin: _json, + AppInstanceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1299,10 +1310,9 @@ const de_CreateAppInstanceAdminCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1322,9 +1332,10 @@ export const de_CreateAppInstanceBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceBotArn != null) { - contents.AppInstanceBotArn = __expectString(data.AppInstanceBotArn); - } + const doc = take(data, { + AppInstanceBotArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1367,10 +1378,9 @@ const de_CreateAppInstanceBotCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1390,9 +1400,10 @@ export const de_CreateAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1435,10 +1446,9 @@ const de_CreateAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1497,10 +1507,9 @@ const de_DeleteAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1562,10 +1571,9 @@ const de_DeleteAppInstanceAdminCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1627,10 +1635,9 @@ const de_DeleteAppInstanceBotCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1692,10 +1699,9 @@ const de_DeleteAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1751,10 +1757,9 @@ const de_DeregisterAppInstanceUserEndpointCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1774,9 +1779,10 @@ export const de_DescribeAppInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstance != null) { - contents.AppInstance = de_AppInstance(data.AppInstance, context); - } + const doc = take(data, { + AppInstance: (_) => de_AppInstance(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1813,10 +1819,9 @@ const de_DescribeAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1836,9 +1841,10 @@ export const de_DescribeAppInstanceAdminCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceAdmin != null) { - contents.AppInstanceAdmin = de_AppInstanceAdmin(data.AppInstanceAdmin, context); - } + const doc = take(data, { + AppInstanceAdmin: (_) => de_AppInstanceAdmin(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1875,10 +1881,9 @@ const de_DescribeAppInstanceAdminCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1898,9 +1903,10 @@ export const de_DescribeAppInstanceBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceBot != null) { - contents.AppInstanceBot = de_AppInstanceBot(data.AppInstanceBot, context); - } + const doc = take(data, { + AppInstanceBot: (_) => de_AppInstanceBot(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1940,10 +1946,9 @@ const de_DescribeAppInstanceBotCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1963,9 +1968,10 @@ export const de_DescribeAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUser != null) { - contents.AppInstanceUser = de_AppInstanceUser(data.AppInstanceUser, context); - } + const doc = take(data, { + AppInstanceUser: (_) => de_AppInstanceUser(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2002,10 +2008,9 @@ const de_DescribeAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2025,9 +2030,10 @@ export const de_DescribeAppInstanceUserEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserEndpoint != null) { - contents.AppInstanceUserEndpoint = de_AppInstanceUserEndpoint(data.AppInstanceUserEndpoint, context); - } + const doc = take(data, { + AppInstanceUserEndpoint: (_) => de_AppInstanceUserEndpoint(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2064,10 +2070,9 @@ const de_DescribeAppInstanceUserEndpointCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2087,14 +2092,11 @@ export const de_GetAppInstanceRetentionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceRetentionSettings != null) { - contents.AppInstanceRetentionSettings = de_AppInstanceRetentionSettings(data.AppInstanceRetentionSettings, context); - } - if (data.InitiateDeletionTimestamp != null) { - contents.InitiateDeletionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.InitiateDeletionTimestamp)) - ); - } + const doc = take(data, { + AppInstanceRetentionSettings: _json, + InitiateDeletionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2131,10 +2133,9 @@ const de_GetAppInstanceRetentionSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2154,15 +2155,12 @@ export const de_ListAppInstanceAdminsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceAdmins != null) { - contents.AppInstanceAdmins = de_AppInstanceAdminList(data.AppInstanceAdmins, context); - } - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstanceAdmins: _json, + AppInstanceArn: __expectString, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2202,10 +2200,9 @@ const de_ListAppInstanceAdminsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2225,15 +2222,12 @@ export const de_ListAppInstanceBotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } - if (data.AppInstanceBots != null) { - contents.AppInstanceBots = de_AppInstanceBotList(data.AppInstanceBots, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstanceArn: __expectString, + AppInstanceBots: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2273,10 +2267,9 @@ const de_ListAppInstanceBotsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2296,12 +2289,11 @@ export const de_ListAppInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstances != null) { - contents.AppInstances = de_AppInstanceList(data.AppInstances, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstances: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2338,10 +2330,9 @@ const de_ListAppInstancesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2361,12 +2352,11 @@ export const de_ListAppInstanceUserEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserEndpoints != null) { - contents.AppInstanceUserEndpoints = de_AppInstanceUserEndpointSummaryList(data.AppInstanceUserEndpoints, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstanceUserEndpoints: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2403,10 +2393,9 @@ const de_ListAppInstanceUserEndpointsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2426,15 +2415,12 @@ export const de_ListAppInstanceUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } - if (data.AppInstanceUsers != null) { - contents.AppInstanceUsers = de_AppInstanceUserList(data.AppInstanceUsers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstanceArn: __expectString, + AppInstanceUsers: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2471,10 +2457,9 @@ const de_ListAppInstanceUsersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2494,9 +2479,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2533,10 +2519,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2556,14 +2541,11 @@ export const de_PutAppInstanceRetentionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceRetentionSettings != null) { - contents.AppInstanceRetentionSettings = de_AppInstanceRetentionSettings(data.AppInstanceRetentionSettings, context); - } - if (data.InitiateDeletionTimestamp != null) { - contents.InitiateDeletionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.InitiateDeletionTimestamp)) - ); - } + const doc = take(data, { + AppInstanceRetentionSettings: _json, + InitiateDeletionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2600,10 +2582,9 @@ const de_PutAppInstanceRetentionSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2623,12 +2604,11 @@ export const de_PutAppInstanceUserExpirationSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } - if (data.ExpirationSettings != null) { - contents.ExpirationSettings = de_ExpirationSettings(data.ExpirationSettings, context); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + ExpirationSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2668,10 +2648,9 @@ const de_PutAppInstanceUserExpirationSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2691,12 +2670,11 @@ export const de_RegisterAppInstanceUserEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } - if (data.EndpointId != null) { - contents.EndpointId = __expectString(data.EndpointId); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + EndpointId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2739,10 +2717,9 @@ const de_RegisterAppInstanceUserEndpointCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2801,10 +2778,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2860,10 +2836,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2883,9 +2858,10 @@ export const de_UpdateAppInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } + const doc = take(data, { + AppInstanceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2925,10 +2901,9 @@ const de_UpdateAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2948,9 +2923,10 @@ export const de_UpdateAppInstanceBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceBotArn != null) { - contents.AppInstanceBotArn = __expectString(data.AppInstanceBotArn); - } + const doc = take(data, { + AppInstanceBotArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2993,10 +2969,9 @@ const de_UpdateAppInstanceBotCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3016,9 +2991,10 @@ export const de_UpdateAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3061,10 +3037,9 @@ const de_UpdateAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3084,12 +3059,11 @@ export const de_UpdateAppInstanceUserEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } - if (data.EndpointId != null) { - contents.EndpointId = __expectString(data.EndpointId); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + EndpointId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3129,28 +3103,26 @@ const de_UpdateAppInstanceUserEndpointCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3164,12 +3136,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3183,12 +3154,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3202,12 +3172,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3224,12 +3193,11 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3246,12 +3214,11 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3268,12 +3235,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3290,12 +3256,11 @@ const de_ThrottledClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3312,12 +3277,11 @@ const de_UnauthorizedClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3325,438 +3289,133 @@ const de_UnauthorizedClientExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AppInstanceRetentionSettings - */ -const se_AppInstanceRetentionSettings = (input: AppInstanceRetentionSettings, context: __SerdeContext): any => { - return { - ...(input.ChannelRetentionSettings != null && { - ChannelRetentionSettings: se_ChannelRetentionSettings(input.ChannelRetentionSettings, context), - }), - }; -}; +// se_AppInstanceRetentionSettings omitted. -/** - * serializeAws_restJson1ChannelRetentionSettings - */ -const se_ChannelRetentionSettings = (input: ChannelRetentionSettings, context: __SerdeContext): any => { - return { - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; +// se_ChannelRetentionSettings omitted. -/** - * serializeAws_restJson1Configuration - */ -const se_Configuration = (input: Configuration, context: __SerdeContext): any => { - return { - ...(input.Lex != null && { Lex: se_LexConfiguration(input.Lex, context) }), - }; -}; +// se_Configuration omitted. -/** - * serializeAws_restJson1EndpointAttributes - */ -const se_EndpointAttributes = (input: EndpointAttributes, context: __SerdeContext): any => { - return { - ...(input.DeviceToken != null && { DeviceToken: input.DeviceToken }), - ...(input.VoipDeviceToken != null && { VoipDeviceToken: input.VoipDeviceToken }), - }; -}; +// se_EndpointAttributes omitted. -/** - * serializeAws_restJson1ExpirationSettings - */ -const se_ExpirationSettings = (input: ExpirationSettings, context: __SerdeContext): any => { - return { - ...(input.ExpirationCriterion != null && { ExpirationCriterion: input.ExpirationCriterion }), - ...(input.ExpirationDays != null && { ExpirationDays: input.ExpirationDays }), - }; -}; +// se_ExpirationSettings omitted. -/** - * serializeAws_restJson1LexConfiguration - */ -const se_LexConfiguration = (input: LexConfiguration, context: __SerdeContext): any => { - return { - ...(input.LexBotAliasArn != null && { LexBotAliasArn: input.LexBotAliasArn }), - ...(input.LocaleId != null && { LocaleId: input.LocaleId }), - ...(input.RespondsTo != null && { RespondsTo: input.RespondsTo }), - ...(input.WelcomeIntent != null && { WelcomeIntent: input.WelcomeIntent }), - }; -}; +// se_LexConfiguration omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. /** * deserializeAws_restJson1AppInstance */ const de_AppInstance = (output: any, context: __SerdeContext): AppInstance => { - return { - AppInstanceArn: __expectString(output.AppInstanceArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; + return take(output, { + AppInstanceArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Name: __expectString, + }) as any; }; /** * deserializeAws_restJson1AppInstanceAdmin */ const de_AppInstanceAdmin = (output: any, context: __SerdeContext): AppInstanceAdmin => { - return { - Admin: output.Admin != null ? de_Identity(output.Admin, context) : undefined, - AppInstanceArn: __expectString(output.AppInstanceArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - } as any; + return take(output, { + Admin: _json, + AppInstanceArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1AppInstanceAdminList - */ -const de_AppInstanceAdminList = (output: any, context: __SerdeContext): AppInstanceAdminSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceAdminSummary(entry, context); - }); - return retVal; -}; +// de_AppInstanceAdminList omitted. -/** - * deserializeAws_restJson1AppInstanceAdminSummary - */ -const de_AppInstanceAdminSummary = (output: any, context: __SerdeContext): AppInstanceAdminSummary => { - return { - Admin: output.Admin != null ? de_Identity(output.Admin, context) : undefined, - } as any; -}; +// de_AppInstanceAdminSummary omitted. /** * deserializeAws_restJson1AppInstanceBot */ const de_AppInstanceBot = (output: any, context: __SerdeContext): AppInstanceBot => { - return { - AppInstanceBotArn: __expectString(output.AppInstanceBotArn), - Configuration: output.Configuration != null ? de_Configuration(output.Configuration, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; + return take(output, { + AppInstanceBotArn: __expectString, + Configuration: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AppInstanceBotList - */ -const de_AppInstanceBotList = (output: any, context: __SerdeContext): AppInstanceBotSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceBotSummary(entry, context); - }); - return retVal; -}; +// de_AppInstanceBotList omitted. -/** - * deserializeAws_restJson1AppInstanceBotSummary - */ -const de_AppInstanceBotSummary = (output: any, context: __SerdeContext): AppInstanceBotSummary => { - return { - AppInstanceBotArn: __expectString(output.AppInstanceBotArn), - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; +// de_AppInstanceBotSummary omitted. -/** - * deserializeAws_restJson1AppInstanceList - */ -const de_AppInstanceList = (output: any, context: __SerdeContext): AppInstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceSummary(entry, context); - }); - return retVal; -}; +// de_AppInstanceList omitted. -/** - * deserializeAws_restJson1AppInstanceRetentionSettings - */ -const de_AppInstanceRetentionSettings = (output: any, context: __SerdeContext): AppInstanceRetentionSettings => { - return { - ChannelRetentionSettings: - output.ChannelRetentionSettings != null - ? de_ChannelRetentionSettings(output.ChannelRetentionSettings, context) - : undefined, - } as any; -}; +// de_AppInstanceRetentionSettings omitted. -/** - * deserializeAws_restJson1AppInstanceSummary - */ -const de_AppInstanceSummary = (output: any, context: __SerdeContext): AppInstanceSummary => { - return { - AppInstanceArn: __expectString(output.AppInstanceArn), - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; +// de_AppInstanceSummary omitted. /** * deserializeAws_restJson1AppInstanceUser */ const de_AppInstanceUser = (output: any, context: __SerdeContext): AppInstanceUser => { - return { - AppInstanceUserArn: __expectString(output.AppInstanceUserArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - ExpirationSettings: - output.ExpirationSettings != null ? de_ExpirationSettings(output.ExpirationSettings, context) : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; + return take(output, { + AppInstanceUserArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationSettings: _json, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Name: __expectString, + }) as any; }; /** * deserializeAws_restJson1AppInstanceUserEndpoint */ const de_AppInstanceUserEndpoint = (output: any, context: __SerdeContext): AppInstanceUserEndpoint => { - return { - AllowMessages: __expectString(output.AllowMessages), - AppInstanceUserArn: __expectString(output.AppInstanceUserArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EndpointAttributes: - output.EndpointAttributes != null ? de_EndpointAttributes(output.EndpointAttributes, context) : undefined, - EndpointId: __expectString(output.EndpointId), - EndpointState: output.EndpointState != null ? de_EndpointState(output.EndpointState, context) : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Name: __expectString(output.Name), - ResourceArn: __expectString(output.ResourceArn), - Type: __expectString(output.Type), - } as any; + return take(output, { + AllowMessages: __expectString, + AppInstanceUserArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointAttributes: _json, + EndpointId: __expectString, + EndpointState: _json, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceArn: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AppInstanceUserEndpointSummary - */ -const de_AppInstanceUserEndpointSummary = (output: any, context: __SerdeContext): AppInstanceUserEndpointSummary => { - return { - AllowMessages: __expectString(output.AllowMessages), - AppInstanceUserArn: __expectString(output.AppInstanceUserArn), - EndpointId: __expectString(output.EndpointId), - EndpointState: output.EndpointState != null ? de_EndpointState(output.EndpointState, context) : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_AppInstanceUserEndpointSummary omitted. -/** - * deserializeAws_restJson1AppInstanceUserEndpointSummaryList - */ -const de_AppInstanceUserEndpointSummaryList = ( - output: any, - context: __SerdeContext -): AppInstanceUserEndpointSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceUserEndpointSummary(entry, context); - }); - return retVal; -}; +// de_AppInstanceUserEndpointSummaryList omitted. -/** - * deserializeAws_restJson1AppInstanceUserList - */ -const de_AppInstanceUserList = (output: any, context: __SerdeContext): AppInstanceUserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceUserSummary(entry, context); - }); - return retVal; -}; +// de_AppInstanceUserList omitted. -/** - * deserializeAws_restJson1AppInstanceUserSummary - */ -const de_AppInstanceUserSummary = (output: any, context: __SerdeContext): AppInstanceUserSummary => { - return { - AppInstanceUserArn: __expectString(output.AppInstanceUserArn), - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; +// de_AppInstanceUserSummary omitted. -/** - * deserializeAws_restJson1ChannelRetentionSettings - */ -const de_ChannelRetentionSettings = (output: any, context: __SerdeContext): ChannelRetentionSettings => { - return { - RetentionDays: __expectInt32(output.RetentionDays), - } as any; -}; +// de_ChannelRetentionSettings omitted. -/** - * deserializeAws_restJson1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - Lex: output.Lex != null ? de_LexConfiguration(output.Lex, context) : undefined, - } as any; -}; +// de_Configuration omitted. -/** - * deserializeAws_restJson1EndpointAttributes - */ -const de_EndpointAttributes = (output: any, context: __SerdeContext): EndpointAttributes => { - return { - DeviceToken: __expectString(output.DeviceToken), - VoipDeviceToken: __expectString(output.VoipDeviceToken), - } as any; -}; +// de_EndpointAttributes omitted. -/** - * deserializeAws_restJson1EndpointState - */ -const de_EndpointState = (output: any, context: __SerdeContext): EndpointState => { - return { - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - } as any; -}; +// de_EndpointState omitted. -/** - * deserializeAws_restJson1ExpirationSettings - */ -const de_ExpirationSettings = (output: any, context: __SerdeContext): ExpirationSettings => { - return { - ExpirationCriterion: __expectString(output.ExpirationCriterion), - ExpirationDays: __expectInt32(output.ExpirationDays), - } as any; -}; +// de_ExpirationSettings omitted. -/** - * deserializeAws_restJson1Identity - */ -const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// de_Identity omitted. -/** - * deserializeAws_restJson1LexConfiguration - */ -const de_LexConfiguration = (output: any, context: __SerdeContext): LexConfiguration => { - return { - LexBotAliasArn: __expectString(output.LexBotAliasArn), - LocaleId: __expectString(output.LocaleId), - RespondsTo: __expectString(output.RespondsTo), - WelcomeIntent: __expectString(output.WelcomeIntent), - } as any; -}; +// de_LexConfiguration omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-chime-sdk-media-pipelines/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-media-pipelines/src/protocols/Aws_restJson1.ts index bcd1634b709e..690de4d22b46 100644 --- a/clients/client-chime-sdk-media-pipelines/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime-sdk-media-pipelines/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -121,15 +121,12 @@ import { LiveConnectorSourceConfiguration, MediaCapturePipeline, MediaCapturePipelineSourceConfiguration, - MediaCapturePipelineSummary, MediaConcatenationPipeline, MediaInsightsPipeline, MediaInsightsPipelineConfiguration, MediaInsightsPipelineConfigurationElement, - MediaInsightsPipelineConfigurationSummary, MediaLiveConnectorPipeline, MediaPipeline, - MediaPipelineSummary, MeetingEventsConcatenationConfiguration, NotFoundException, PostCallAnalyticsSettings, @@ -174,17 +171,17 @@ export const se_CreateMediaCapturePipelineCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-capture-pipelines"; let body: any; - body = JSON.stringify({ - ...(input.ChimeSdkMeetingConfiguration != null && { - ChimeSdkMeetingConfiguration: se_ChimeSdkMeetingConfiguration(input.ChimeSdkMeetingConfiguration, context), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.SinkArn != null && { SinkArn: input.SinkArn }), - ...(input.SinkType != null && { SinkType: input.SinkType }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ChimeSdkMeetingConfiguration: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + SinkArn: [], + SinkType: [], + SourceArn: [], + SourceType: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -210,12 +207,14 @@ export const se_CreateMediaConcatenationPipelineCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-concatenation-pipelines"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Sinks != null && { Sinks: se_ConcatenationSinkList(input.Sinks, context) }), - ...(input.Sources != null && { Sources: se_ConcatenationSourceList(input.Sources, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Sinks: (_) => _json(_), + Sources: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -241,34 +240,18 @@ export const se_CreateMediaInsightsPipelineCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-insights-pipelines"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.KinesisVideoStreamRecordingSourceRuntimeConfiguration != null && { - KinesisVideoStreamRecordingSourceRuntimeConfiguration: se_KinesisVideoStreamRecordingSourceRuntimeConfiguration( - input.KinesisVideoStreamRecordingSourceRuntimeConfiguration, - context - ), - }), - ...(input.KinesisVideoStreamSourceRuntimeConfiguration != null && { - KinesisVideoStreamSourceRuntimeConfiguration: se_KinesisVideoStreamSourceRuntimeConfiguration( - input.KinesisVideoStreamSourceRuntimeConfiguration, - context - ), - }), - ...(input.MediaInsightsPipelineConfigurationArn != null && { - MediaInsightsPipelineConfigurationArn: input.MediaInsightsPipelineConfigurationArn, - }), - ...(input.MediaInsightsRuntimeMetadata != null && { - MediaInsightsRuntimeMetadata: se_MediaInsightsRuntimeMetadata(input.MediaInsightsRuntimeMetadata, context), - }), - ...(input.S3RecordingSinkRuntimeConfiguration != null && { - S3RecordingSinkRuntimeConfiguration: se_S3RecordingSinkRuntimeConfiguration( - input.S3RecordingSinkRuntimeConfiguration, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + KinesisVideoStreamRecordingSourceRuntimeConfiguration: (_) => + se_KinesisVideoStreamRecordingSourceRuntimeConfiguration(_, context), + KinesisVideoStreamSourceRuntimeConfiguration: (_) => _json(_), + MediaInsightsPipelineConfigurationArn: [], + MediaInsightsRuntimeMetadata: (_) => _json(_), + S3RecordingSinkRuntimeConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -294,18 +277,16 @@ export const se_CreateMediaInsightsPipelineConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-insights-pipeline-configurations"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Elements != null && { Elements: se_MediaInsightsPipelineConfigurationElements(input.Elements, context) }), - ...(input.MediaInsightsPipelineConfigurationName != null && { - MediaInsightsPipelineConfigurationName: input.MediaInsightsPipelineConfigurationName, - }), - ...(input.RealTimeAlertConfiguration != null && { - RealTimeAlertConfiguration: se_RealTimeAlertConfiguration(input.RealTimeAlertConfiguration, context), - }), - ...(input.ResourceAccessRoleArn != null && { ResourceAccessRoleArn: input.ResourceAccessRoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Elements: (_) => _json(_), + MediaInsightsPipelineConfigurationName: [], + RealTimeAlertConfiguration: (_) => _json(_), + ResourceAccessRoleArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -331,12 +312,14 @@ export const se_CreateMediaLiveConnectorPipelineCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdk-media-live-connector-pipelines"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Sinks != null && { Sinks: se_LiveConnectorSinkList(input.Sinks, context) }), - ...(input.Sources != null && { Sources: se_LiveConnectorSourceList(input.Sources, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Sinks: (_) => _json(_), + Sources: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -649,10 +632,12 @@ export const se_TagResourceCommand = async ( operation: [, "tag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -681,10 +666,12 @@ export const se_UntagResourceCommand = async ( operation: [, "untag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -713,13 +700,13 @@ export const se_UpdateMediaInsightsPipelineConfigurationCommand = async ( "/media-insights-pipeline-configurations/{Identifier}"; resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); let body: any; - body = JSON.stringify({ - ...(input.Elements != null && { Elements: se_MediaInsightsPipelineConfigurationElements(input.Elements, context) }), - ...(input.RealTimeAlertConfiguration != null && { - RealTimeAlertConfiguration: se_RealTimeAlertConfiguration(input.RealTimeAlertConfiguration, context), - }), - ...(input.ResourceAccessRoleArn != null && { ResourceAccessRoleArn: input.ResourceAccessRoleArn }), - }); + body = JSON.stringify( + take(input, { + Elements: (_) => _json(_), + RealTimeAlertConfiguration: (_) => _json(_), + ResourceAccessRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -747,9 +734,11 @@ export const se_UpdateMediaInsightsPipelineStatusCommand = async ( "/media-insights-pipeline-status/{Identifier}"; resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); let body: any; - body = JSON.stringify({ - ...(input.UpdateStatus != null && { UpdateStatus: input.UpdateStatus }), - }); + body = JSON.stringify( + take(input, { + UpdateStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -775,9 +764,10 @@ export const de_CreateMediaCapturePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaCapturePipeline != null) { - contents.MediaCapturePipeline = de_MediaCapturePipeline(data.MediaCapturePipeline, context); - } + const doc = take(data, { + MediaCapturePipeline: (_) => de_MediaCapturePipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -817,10 +807,9 @@ const de_CreateMediaCapturePipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -840,9 +829,10 @@ export const de_CreateMediaConcatenationPipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaConcatenationPipeline != null) { - contents.MediaConcatenationPipeline = de_MediaConcatenationPipeline(data.MediaConcatenationPipeline, context); - } + const doc = take(data, { + MediaConcatenationPipeline: (_) => de_MediaConcatenationPipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -882,10 +872,9 @@ const de_CreateMediaConcatenationPipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -905,9 +894,10 @@ export const de_CreateMediaInsightsPipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaInsightsPipeline != null) { - contents.MediaInsightsPipeline = de_MediaInsightsPipeline(data.MediaInsightsPipeline, context); - } + const doc = take(data, { + MediaInsightsPipeline: (_) => de_MediaInsightsPipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -950,10 +940,9 @@ const de_CreateMediaInsightsPipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -973,12 +962,10 @@ export const de_CreateMediaInsightsPipelineConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaInsightsPipelineConfiguration != null) { - contents.MediaInsightsPipelineConfiguration = de_MediaInsightsPipelineConfiguration( - data.MediaInsightsPipelineConfiguration, - context - ); - } + const doc = take(data, { + MediaInsightsPipelineConfiguration: (_) => de_MediaInsightsPipelineConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1021,10 +1008,9 @@ const de_CreateMediaInsightsPipelineConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1044,9 +1030,10 @@ export const de_CreateMediaLiveConnectorPipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaLiveConnectorPipeline != null) { - contents.MediaLiveConnectorPipeline = de_MediaLiveConnectorPipeline(data.MediaLiveConnectorPipeline, context); - } + const doc = take(data, { + MediaLiveConnectorPipeline: (_) => de_MediaLiveConnectorPipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1086,10 +1073,9 @@ const de_CreateMediaLiveConnectorPipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1148,10 +1134,9 @@ const de_DeleteMediaCapturePipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1213,10 +1198,9 @@ const de_DeleteMediaInsightsPipelineConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1275,10 +1259,9 @@ const de_DeleteMediaPipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,9 +1281,10 @@ export const de_GetMediaCapturePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaCapturePipeline != null) { - contents.MediaCapturePipeline = de_MediaCapturePipeline(data.MediaCapturePipeline, context); - } + const doc = take(data, { + MediaCapturePipeline: (_) => de_MediaCapturePipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1340,10 +1324,9 @@ const de_GetMediaCapturePipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1363,12 +1346,10 @@ export const de_GetMediaInsightsPipelineConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaInsightsPipelineConfiguration != null) { - contents.MediaInsightsPipelineConfiguration = de_MediaInsightsPipelineConfiguration( - data.MediaInsightsPipelineConfiguration, - context - ); - } + const doc = take(data, { + MediaInsightsPipelineConfiguration: (_) => de_MediaInsightsPipelineConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1408,10 +1389,9 @@ const de_GetMediaInsightsPipelineConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1431,9 +1411,10 @@ export const de_GetMediaPipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaPipeline != null) { - contents.MediaPipeline = de_MediaPipeline(data.MediaPipeline, context); - } + const doc = take(data, { + MediaPipeline: (_) => de_MediaPipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1473,10 +1454,9 @@ const de_GetMediaPipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1496,12 +1476,11 @@ export const de_ListMediaCapturePipelinesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaCapturePipelines != null) { - contents.MediaCapturePipelines = de_MediaCapturePipelineSummaryList(data.MediaCapturePipelines, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MediaCapturePipelines: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1541,10 +1520,9 @@ const de_ListMediaCapturePipelinesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1564,15 +1542,11 @@ export const de_ListMediaInsightsPipelineConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaInsightsPipelineConfigurations != null) { - contents.MediaInsightsPipelineConfigurations = de_MediaInsightsPipelineConfigurationSummaryList( - data.MediaInsightsPipelineConfigurations, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MediaInsightsPipelineConfigurations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1612,10 +1586,9 @@ const de_ListMediaInsightsPipelineConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1635,12 +1608,11 @@ export const de_ListMediaPipelinesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaPipelines != null) { - contents.MediaPipelines = de_MediaPipelineList(data.MediaPipelines, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MediaPipelines: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1680,10 +1652,9 @@ const de_ListMediaPipelinesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1703,9 +1674,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1745,10 +1717,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1807,10 +1778,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1869,10 +1839,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1892,12 +1861,10 @@ export const de_UpdateMediaInsightsPipelineConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaInsightsPipelineConfiguration != null) { - contents.MediaInsightsPipelineConfiguration = de_MediaInsightsPipelineConfiguration( - data.MediaInsightsPipelineConfiguration, - context - ); - } + const doc = take(data, { + MediaInsightsPipelineConfiguration: (_) => de_MediaInsightsPipelineConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1940,10 +1907,9 @@ const de_UpdateMediaInsightsPipelineConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2005,31 +1971,27 @@ const de_UpdateMediaInsightsPipelineStatusCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2043,15 +2005,12 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2065,15 +2024,12 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2087,15 +2043,12 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2112,15 +2065,12 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2137,15 +2087,12 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2162,15 +2109,12 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2187,15 +2131,12 @@ const de_ThrottledClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2212,15 +2153,12 @@ const de_UnauthorizedClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2228,2050 +2166,438 @@ const de_UnauthorizedClientExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AmazonTranscribeCallAnalyticsProcessorConfiguration - */ -const se_AmazonTranscribeCallAnalyticsProcessorConfiguration = ( - input: AmazonTranscribeCallAnalyticsProcessorConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CallAnalyticsStreamCategories != null && { - CallAnalyticsStreamCategories: se_CategoryNameList(input.CallAnalyticsStreamCategories, context), - }), - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.ContentRedactionType != null && { ContentRedactionType: input.ContentRedactionType }), - ...(input.EnablePartialResultsStabilization != null && { - EnablePartialResultsStabilization: input.EnablePartialResultsStabilization, - }), - ...(input.FilterPartialResults != null && { FilterPartialResults: input.FilterPartialResults }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - ...(input.PartialResultsStability != null && { PartialResultsStability: input.PartialResultsStability }), - ...(input.PiiEntityTypes != null && { PiiEntityTypes: input.PiiEntityTypes }), - ...(input.PostCallAnalyticsSettings != null && { - PostCallAnalyticsSettings: se_PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context), - }), - ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_AmazonTranscribeCallAnalyticsProcessorConfiguration omitted. + +// se_AmazonTranscribeProcessorConfiguration omitted. + +// se_ArtifactsConcatenationConfiguration omitted. + +// se_ArtifactsConfiguration omitted. + +// se_AttendeeIdList omitted. + +// se_AudioArtifactsConfiguration omitted. + +// se_AudioConcatenationConfiguration omitted. + +// se_CategoryNameList omitted. + +// se_ChannelDefinition omitted. + +// se_ChannelDefinitions omitted. + +// se_ChimeSdkMeetingConcatenationConfiguration omitted. + +// se_ChimeSdkMeetingConfiguration omitted. + +// se_ChimeSdkMeetingLiveConnectorConfiguration omitted. + +// se_CompositedVideoArtifactsConfiguration omitted. + +// se_CompositedVideoConcatenationConfiguration omitted. + +// se_ConcatenationSink omitted. + +// se_ConcatenationSinkList omitted. + +// se_ConcatenationSource omitted. + +// se_ConcatenationSourceList omitted. + +// se_ContentArtifactsConfiguration omitted. + +// se_ContentConcatenationConfiguration omitted. + +// se_DataChannelConcatenationConfiguration omitted. + +// se_ExternalUserIdList omitted. /** - * serializeAws_restJson1AmazonTranscribeProcessorConfiguration + * serializeAws_restJson1FragmentSelector */ -const se_AmazonTranscribeProcessorConfiguration = ( - input: AmazonTranscribeProcessorConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.ContentRedactionType != null && { ContentRedactionType: input.ContentRedactionType }), - ...(input.EnablePartialResultsStabilization != null && { - EnablePartialResultsStabilization: input.EnablePartialResultsStabilization, - }), - ...(input.FilterPartialResults != null && { FilterPartialResults: input.FilterPartialResults }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - ...(input.PartialResultsStability != null && { PartialResultsStability: input.PartialResultsStability }), - ...(input.PiiEntityTypes != null && { PiiEntityTypes: input.PiiEntityTypes }), - ...(input.ShowSpeakerLabel != null && { ShowSpeakerLabel: input.ShowSpeakerLabel }), - ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; +const se_FragmentSelector = (input: FragmentSelector, context: __SerdeContext): any => { + return take(input, { + FragmentSelectorType: [], + TimestampRange: (_) => se_TimestampRange(_, context), + }); }; +// se_GridViewConfiguration omitted. + +// se_IssueDetectionConfiguration omitted. + +// se_KeywordMatchConfiguration omitted. + +// se_KeywordMatchWordList omitted. + +// se_KinesisDataStreamSinkConfiguration omitted. + /** - * serializeAws_restJson1ArtifactsConcatenationConfiguration + * serializeAws_restJson1KinesisVideoStreamRecordingSourceRuntimeConfiguration */ -const se_ArtifactsConcatenationConfiguration = ( - input: ArtifactsConcatenationConfiguration, +const se_KinesisVideoStreamRecordingSourceRuntimeConfiguration = ( + input: KinesisVideoStreamRecordingSourceRuntimeConfiguration, context: __SerdeContext ): any => { - return { - ...(input.Audio != null && { Audio: se_AudioConcatenationConfiguration(input.Audio, context) }), - ...(input.CompositedVideo != null && { - CompositedVideo: se_CompositedVideoConcatenationConfiguration(input.CompositedVideo, context), - }), - ...(input.Content != null && { Content: se_ContentConcatenationConfiguration(input.Content, context) }), - ...(input.DataChannel != null && { - DataChannel: se_DataChannelConcatenationConfiguration(input.DataChannel, context), - }), - ...(input.MeetingEvents != null && { - MeetingEvents: se_MeetingEventsConcatenationConfiguration(input.MeetingEvents, context), - }), - ...(input.TranscriptionMessages != null && { - TranscriptionMessages: se_TranscriptionMessagesConcatenationConfiguration(input.TranscriptionMessages, context), - }), - ...(input.Video != null && { Video: se_VideoConcatenationConfiguration(input.Video, context) }), - }; + return take(input, { + FragmentSelector: (_) => se_FragmentSelector(_, context), + Streams: _json, + }); }; -/** - * serializeAws_restJson1ArtifactsConfiguration - */ -const se_ArtifactsConfiguration = (input: ArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Audio != null && { Audio: se_AudioArtifactsConfiguration(input.Audio, context) }), - ...(input.CompositedVideo != null && { - CompositedVideo: se_CompositedVideoArtifactsConfiguration(input.CompositedVideo, context), - }), - ...(input.Content != null && { Content: se_ContentArtifactsConfiguration(input.Content, context) }), - ...(input.Video != null && { Video: se_VideoArtifactsConfiguration(input.Video, context) }), - }; -}; +// se_KinesisVideoStreamSourceRuntimeConfiguration omitted. -/** - * serializeAws_restJson1AttendeeIdList - */ -const se_AttendeeIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LambdaFunctionSinkConfiguration omitted. -/** - * serializeAws_restJson1AudioArtifactsConfiguration - */ -const se_AudioArtifactsConfiguration = (input: AudioArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MuxType != null && { MuxType: input.MuxType }), - }; -}; +// se_LiveConnectorRTMPConfiguration omitted. -/** - * serializeAws_restJson1AudioConcatenationConfiguration - */ -const se_AudioConcatenationConfiguration = (input: AudioConcatenationConfiguration, context: __SerdeContext): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; +// se_LiveConnectorSinkConfiguration omitted. -/** - * serializeAws_restJson1CategoryNameList - */ -const se_CategoryNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LiveConnectorSinkList omitted. + +// se_LiveConnectorSourceConfiguration omitted. + +// se_LiveConnectorSourceList omitted. + +// se_MediaCapturePipelineSourceConfiguration omitted. + +// se_MediaInsightsPipelineConfigurationElement omitted. + +// se_MediaInsightsPipelineConfigurationElements omitted. + +// se_MediaInsightsRuntimeMetadata omitted. + +// se_MeetingEventsConcatenationConfiguration omitted. + +// se_PostCallAnalyticsSettings omitted. + +// se_PresenterOnlyConfiguration omitted. + +// se_RealTimeAlertConfiguration omitted. + +// se_RealTimeAlertRule omitted. + +// se_RealTimeAlertRuleList omitted. + +// se_RecordingStreamConfiguration omitted. + +// se_RecordingStreamList omitted. + +// se_S3BucketSinkConfiguration omitted. + +// se_S3RecordingSinkConfiguration omitted. + +// se_S3RecordingSinkRuntimeConfiguration omitted. + +// se_SelectedVideoStreams omitted. + +// se_SentimentConfiguration omitted. + +// se_SnsTopicSinkConfiguration omitted. + +// se_SourceConfiguration omitted. + +// se_SqsQueueSinkConfiguration omitted. + +// se_StreamChannelDefinition omitted. + +// se_StreamConfiguration omitted. + +// se_Streams omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. /** - * serializeAws_restJson1ChannelDefinition + * serializeAws_restJson1TimestampRange */ -const se_ChannelDefinition = (input: ChannelDefinition, context: __SerdeContext): any => { - return { - ...(input.ChannelId != null && { ChannelId: input.ChannelId }), - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - }; +const se_TimestampRange = (input: TimestampRange, context: __SerdeContext): any => { + return take(input, { + EndTimestamp: (_) => Math.round(_.getTime() / 1000), + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_TranscriptionMessagesConcatenationConfiguration omitted. + +// se_VideoArtifactsConfiguration omitted. + +// se_VideoConcatenationConfiguration omitted. + +// se_VoiceAnalyticsProcessorConfiguration omitted. + +// de_AmazonTranscribeCallAnalyticsProcessorConfiguration omitted. + +// de_AmazonTranscribeProcessorConfiguration omitted. + +// de_ArtifactsConcatenationConfiguration omitted. + +// de_ArtifactsConfiguration omitted. + +// de_AttendeeIdList omitted. + +// de_AudioArtifactsConfiguration omitted. + +// de_AudioConcatenationConfiguration omitted. + +// de_CategoryNameList omitted. + +// de_ChannelDefinition omitted. + +// de_ChannelDefinitions omitted. + +// de_ChimeSdkMeetingConcatenationConfiguration omitted. + +// de_ChimeSdkMeetingConfiguration omitted. + +// de_ChimeSdkMeetingLiveConnectorConfiguration omitted. + +// de_CompositedVideoArtifactsConfiguration omitted. + +// de_CompositedVideoConcatenationConfiguration omitted. + +// de_ConcatenationSink omitted. + +// de_ConcatenationSinkList omitted. + +// de_ConcatenationSource omitted. + +// de_ConcatenationSourceList omitted. + +// de_ContentArtifactsConfiguration omitted. + +// de_ContentConcatenationConfiguration omitted. + +// de_DataChannelConcatenationConfiguration omitted. + +// de_ExternalUserIdList omitted. + /** - * serializeAws_restJson1ChannelDefinitions + * deserializeAws_restJson1FragmentSelector */ -const se_ChannelDefinitions = (input: ChannelDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ChannelDefinition(entry, context); - }); +const de_FragmentSelector = (output: any, context: __SerdeContext): FragmentSelector => { + return take(output, { + FragmentSelectorType: __expectString, + TimestampRange: (_: any) => de_TimestampRange(_, context), + }) as any; }; +// de_GridViewConfiguration omitted. + +// de_IssueDetectionConfiguration omitted. + +// de_KeywordMatchConfiguration omitted. + +// de_KeywordMatchWordList omitted. + +// de_KinesisDataStreamSinkConfiguration omitted. + /** - * serializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration + * deserializeAws_restJson1KinesisVideoStreamRecordingSourceRuntimeConfiguration */ -const se_ChimeSdkMeetingConcatenationConfiguration = ( - input: ChimeSdkMeetingConcatenationConfiguration, +const de_KinesisVideoStreamRecordingSourceRuntimeConfiguration = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.ArtifactsConfiguration != null && { - ArtifactsConfiguration: se_ArtifactsConcatenationConfiguration(input.ArtifactsConfiguration, context), - }), - }; +): KinesisVideoStreamRecordingSourceRuntimeConfiguration => { + return take(output, { + FragmentSelector: (_: any) => de_FragmentSelector(_, context), + Streams: _json, + }) as any; }; +// de_KinesisVideoStreamSourceRuntimeConfiguration omitted. + +// de_LambdaFunctionSinkConfiguration omitted. + +// de_LiveConnectorRTMPConfiguration omitted. + +// de_LiveConnectorSinkConfiguration omitted. + +// de_LiveConnectorSinkList omitted. + +// de_LiveConnectorSourceConfiguration omitted. + +// de_LiveConnectorSourceList omitted. + /** - * serializeAws_restJson1ChimeSdkMeetingConfiguration + * deserializeAws_restJson1MediaCapturePipeline */ -const se_ChimeSdkMeetingConfiguration = (input: ChimeSdkMeetingConfiguration, context: __SerdeContext): any => { - return { - ...(input.ArtifactsConfiguration != null && { - ArtifactsConfiguration: se_ArtifactsConfiguration(input.ArtifactsConfiguration, context), - }), - ...(input.SourceConfiguration != null && { - SourceConfiguration: se_SourceConfiguration(input.SourceConfiguration, context), - }), - }; +const de_MediaCapturePipeline = (output: any, context: __SerdeContext): MediaCapturePipeline => { + return take(output, { + ChimeSdkMeetingConfiguration: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MediaPipelineArn: __expectString, + MediaPipelineId: __expectString, + SinkArn: __expectString, + SinkType: __expectString, + SourceArn: __expectString, + SourceType: __expectString, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_MediaCapturePipelineSourceConfiguration omitted. + +// de_MediaCapturePipelineSummary omitted. + +// de_MediaCapturePipelineSummaryList omitted. + /** - * serializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration + * deserializeAws_restJson1MediaConcatenationPipeline */ -const se_ChimeSdkMeetingLiveConnectorConfiguration = ( - input: ChimeSdkMeetingLiveConnectorConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.CompositedVideo != null && { - CompositedVideo: se_CompositedVideoArtifactsConfiguration(input.CompositedVideo, context), - }), - ...(input.MuxType != null && { MuxType: input.MuxType }), - ...(input.SourceConfiguration != null && { - SourceConfiguration: se_SourceConfiguration(input.SourceConfiguration, context), - }), - }; +const de_MediaConcatenationPipeline = (output: any, context: __SerdeContext): MediaConcatenationPipeline => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MediaPipelineArn: __expectString, + MediaPipelineId: __expectString, + Sinks: _json, + Sources: _json, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** - * serializeAws_restJson1CompositedVideoArtifactsConfiguration + * deserializeAws_restJson1MediaInsightsPipeline */ -const se_CompositedVideoArtifactsConfiguration = ( - input: CompositedVideoArtifactsConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.GridViewConfiguration != null && { - GridViewConfiguration: se_GridViewConfiguration(input.GridViewConfiguration, context), - }), - ...(input.Layout != null && { Layout: input.Layout }), - ...(input.Resolution != null && { Resolution: input.Resolution }), - }; +const de_MediaInsightsPipeline = (output: any, context: __SerdeContext): MediaInsightsPipeline => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + KinesisVideoStreamRecordingSourceRuntimeConfiguration: (_: any) => + de_KinesisVideoStreamRecordingSourceRuntimeConfiguration(_, context), + KinesisVideoStreamSourceRuntimeConfiguration: _json, + MediaInsightsPipelineConfigurationArn: __expectString, + MediaInsightsRuntimeMetadata: _json, + MediaPipelineArn: __expectString, + MediaPipelineId: __expectString, + S3RecordingSinkRuntimeConfiguration: _json, + Status: __expectString, + }) as any; }; /** - * serializeAws_restJson1CompositedVideoConcatenationConfiguration + * deserializeAws_restJson1MediaInsightsPipelineConfiguration */ -const se_CompositedVideoConcatenationConfiguration = ( - input: CompositedVideoConcatenationConfiguration, +const de_MediaInsightsPipelineConfiguration = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.State != null && { State: input.State }), - }; +): MediaInsightsPipelineConfiguration => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Elements: _json, + MediaInsightsPipelineConfigurationArn: __expectString, + MediaInsightsPipelineConfigurationId: __expectString, + MediaInsightsPipelineConfigurationName: __expectString, + RealTimeAlertConfiguration: _json, + ResourceAccessRoleArn: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_MediaInsightsPipelineConfigurationElement omitted. + +// de_MediaInsightsPipelineConfigurationElements omitted. + +// de_MediaInsightsPipelineConfigurationSummary omitted. + +// de_MediaInsightsPipelineConfigurationSummaryList omitted. + +// de_MediaInsightsRuntimeMetadata omitted. + /** - * serializeAws_restJson1ConcatenationSink + * deserializeAws_restJson1MediaLiveConnectorPipeline */ -const se_ConcatenationSink = (input: ConcatenationSink, context: __SerdeContext): any => { - return { - ...(input.S3BucketSinkConfiguration != null && { - S3BucketSinkConfiguration: se_S3BucketSinkConfiguration(input.S3BucketSinkConfiguration, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; +const de_MediaLiveConnectorPipeline = (output: any, context: __SerdeContext): MediaLiveConnectorPipeline => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MediaPipelineArn: __expectString, + MediaPipelineId: __expectString, + Sinks: _json, + Sources: _json, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** - * serializeAws_restJson1ConcatenationSinkList + * deserializeAws_restJson1MediaPipeline */ -const se_ConcatenationSinkList = (input: ConcatenationSink[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConcatenationSink(entry, context); - }); +const de_MediaPipeline = (output: any, context: __SerdeContext): MediaPipeline => { + return take(output, { + MediaCapturePipeline: (_: any) => de_MediaCapturePipeline(_, context), + MediaConcatenationPipeline: (_: any) => de_MediaConcatenationPipeline(_, context), + MediaInsightsPipeline: (_: any) => de_MediaInsightsPipeline(_, context), + MediaLiveConnectorPipeline: (_: any) => de_MediaLiveConnectorPipeline(_, context), + }) as any; }; -/** - * serializeAws_restJson1ConcatenationSource - */ -const se_ConcatenationSource = (input: ConcatenationSource, context: __SerdeContext): any => { - return { - ...(input.MediaCapturePipelineSourceConfiguration != null && { - MediaCapturePipelineSourceConfiguration: se_MediaCapturePipelineSourceConfiguration( - input.MediaCapturePipelineSourceConfiguration, - context - ), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1ConcatenationSourceList - */ -const se_ConcatenationSourceList = (input: ConcatenationSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConcatenationSource(entry, context); - }); -}; - -/** - * serializeAws_restJson1ContentArtifactsConfiguration - */ -const se_ContentArtifactsConfiguration = (input: ContentArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MuxType != null && { MuxType: input.MuxType }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1ContentConcatenationConfiguration - */ -const se_ContentConcatenationConfiguration = ( - input: ContentConcatenationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1DataChannelConcatenationConfiguration - */ -const se_DataChannelConcatenationConfiguration = ( - input: DataChannelConcatenationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1ExternalUserIdList - */ -const se_ExternalUserIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1FragmentSelector - */ -const se_FragmentSelector = (input: FragmentSelector, context: __SerdeContext): any => { - return { - ...(input.FragmentSelectorType != null && { FragmentSelectorType: input.FragmentSelectorType }), - ...(input.TimestampRange != null && { TimestampRange: se_TimestampRange(input.TimestampRange, context) }), - }; -}; - -/** - * serializeAws_restJson1GridViewConfiguration - */ -const se_GridViewConfiguration = (input: GridViewConfiguration, context: __SerdeContext): any => { - return { - ...(input.ContentShareLayout != null && { ContentShareLayout: input.ContentShareLayout }), - ...(input.PresenterOnlyConfiguration != null && { - PresenterOnlyConfiguration: se_PresenterOnlyConfiguration(input.PresenterOnlyConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1IssueDetectionConfiguration - */ -const se_IssueDetectionConfiguration = (input: IssueDetectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.RuleName != null && { RuleName: input.RuleName }), - }; -}; - -/** - * serializeAws_restJson1KeywordMatchConfiguration - */ -const se_KeywordMatchConfiguration = (input: KeywordMatchConfiguration, context: __SerdeContext): any => { - return { - ...(input.Keywords != null && { Keywords: se_KeywordMatchWordList(input.Keywords, context) }), - ...(input.Negate != null && { Negate: input.Negate }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - }; -}; - -/** - * serializeAws_restJson1KeywordMatchWordList - */ -const se_KeywordMatchWordList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1KinesisDataStreamSinkConfiguration - */ -const se_KinesisDataStreamSinkConfiguration = ( - input: KinesisDataStreamSinkConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InsightsTarget != null && { InsightsTarget: input.InsightsTarget }), - }; -}; - -/** - * serializeAws_restJson1KinesisVideoStreamRecordingSourceRuntimeConfiguration - */ -const se_KinesisVideoStreamRecordingSourceRuntimeConfiguration = ( - input: KinesisVideoStreamRecordingSourceRuntimeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FragmentSelector != null && { FragmentSelector: se_FragmentSelector(input.FragmentSelector, context) }), - ...(input.Streams != null && { Streams: se_RecordingStreamList(input.Streams, context) }), - }; -}; - -/** - * serializeAws_restJson1KinesisVideoStreamSourceRuntimeConfiguration - */ -const se_KinesisVideoStreamSourceRuntimeConfiguration = ( - input: KinesisVideoStreamSourceRuntimeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.MediaEncoding != null && { MediaEncoding: input.MediaEncoding }), - ...(input.MediaSampleRate != null && { MediaSampleRate: input.MediaSampleRate }), - ...(input.Streams != null && { Streams: se_Streams(input.Streams, context) }), - }; -}; - -/** - * serializeAws_restJson1LambdaFunctionSinkConfiguration - */ -const se_LambdaFunctionSinkConfiguration = (input: LambdaFunctionSinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.InsightsTarget != null && { InsightsTarget: input.InsightsTarget }), - }; -}; - -/** - * serializeAws_restJson1LiveConnectorRTMPConfiguration - */ -const se_LiveConnectorRTMPConfiguration = (input: LiveConnectorRTMPConfiguration, context: __SerdeContext): any => { - return { - ...(input.AudioChannels != null && { AudioChannels: input.AudioChannels }), - ...(input.AudioSampleRate != null && { AudioSampleRate: input.AudioSampleRate }), - ...(input.Url != null && { Url: input.Url }), - }; -}; - -/** - * serializeAws_restJson1LiveConnectorSinkConfiguration - */ -const se_LiveConnectorSinkConfiguration = (input: LiveConnectorSinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.RTMPConfiguration != null && { - RTMPConfiguration: se_LiveConnectorRTMPConfiguration(input.RTMPConfiguration, context), - }), - ...(input.SinkType != null && { SinkType: input.SinkType }), - }; -}; - -/** - * serializeAws_restJson1LiveConnectorSinkList - */ -const se_LiveConnectorSinkList = (input: LiveConnectorSinkConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LiveConnectorSinkConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1LiveConnectorSourceConfiguration - */ -const se_LiveConnectorSourceConfiguration = (input: LiveConnectorSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.ChimeSdkMeetingLiveConnectorConfiguration != null && { - ChimeSdkMeetingLiveConnectorConfiguration: se_ChimeSdkMeetingLiveConnectorConfiguration( - input.ChimeSdkMeetingLiveConnectorConfiguration, - context - ), - }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - }; -}; - -/** - * serializeAws_restJson1LiveConnectorSourceList - */ -const se_LiveConnectorSourceList = (input: LiveConnectorSourceConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LiveConnectorSourceConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1MediaCapturePipelineSourceConfiguration - */ -const se_MediaCapturePipelineSourceConfiguration = ( - input: MediaCapturePipelineSourceConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ChimeSdkMeetingConfiguration != null && { - ChimeSdkMeetingConfiguration: se_ChimeSdkMeetingConcatenationConfiguration( - input.ChimeSdkMeetingConfiguration, - context - ), - }), - ...(input.MediaPipelineArn != null && { MediaPipelineArn: input.MediaPipelineArn }), - }; -}; - -/** - * serializeAws_restJson1MediaInsightsPipelineConfigurationElement - */ -const se_MediaInsightsPipelineConfigurationElement = ( - input: MediaInsightsPipelineConfigurationElement, - context: __SerdeContext -): any => { - return { - ...(input.AmazonTranscribeCallAnalyticsProcessorConfiguration != null && { - AmazonTranscribeCallAnalyticsProcessorConfiguration: se_AmazonTranscribeCallAnalyticsProcessorConfiguration( - input.AmazonTranscribeCallAnalyticsProcessorConfiguration, - context - ), - }), - ...(input.AmazonTranscribeProcessorConfiguration != null && { - AmazonTranscribeProcessorConfiguration: se_AmazonTranscribeProcessorConfiguration( - input.AmazonTranscribeProcessorConfiguration, - context - ), - }), - ...(input.KinesisDataStreamSinkConfiguration != null && { - KinesisDataStreamSinkConfiguration: se_KinesisDataStreamSinkConfiguration( - input.KinesisDataStreamSinkConfiguration, - context - ), - }), - ...(input.LambdaFunctionSinkConfiguration != null && { - LambdaFunctionSinkConfiguration: se_LambdaFunctionSinkConfiguration( - input.LambdaFunctionSinkConfiguration, - context - ), - }), - ...(input.S3RecordingSinkConfiguration != null && { - S3RecordingSinkConfiguration: se_S3RecordingSinkConfiguration(input.S3RecordingSinkConfiguration, context), - }), - ...(input.SnsTopicSinkConfiguration != null && { - SnsTopicSinkConfiguration: se_SnsTopicSinkConfiguration(input.SnsTopicSinkConfiguration, context), - }), - ...(input.SqsQueueSinkConfiguration != null && { - SqsQueueSinkConfiguration: se_SqsQueueSinkConfiguration(input.SqsQueueSinkConfiguration, context), - }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VoiceAnalyticsProcessorConfiguration != null && { - VoiceAnalyticsProcessorConfiguration: se_VoiceAnalyticsProcessorConfiguration( - input.VoiceAnalyticsProcessorConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1MediaInsightsPipelineConfigurationElements - */ -const se_MediaInsightsPipelineConfigurationElements = ( - input: MediaInsightsPipelineConfigurationElement[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MediaInsightsPipelineConfigurationElement(entry, context); - }); -}; - -/** - * serializeAws_restJson1MediaInsightsRuntimeMetadata - */ -const se_MediaInsightsRuntimeMetadata = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1MeetingEventsConcatenationConfiguration - */ -const se_MeetingEventsConcatenationConfiguration = ( - input: MeetingEventsConcatenationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1PostCallAnalyticsSettings - */ -const se_PostCallAnalyticsSettings = (input: PostCallAnalyticsSettings, context: __SerdeContext): any => { - return { - ...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }), - ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }), - }; -}; - -/** - * serializeAws_restJson1PresenterOnlyConfiguration - */ -const se_PresenterOnlyConfiguration = (input: PresenterOnlyConfiguration, context: __SerdeContext): any => { - return { - ...(input.PresenterPosition != null && { PresenterPosition: input.PresenterPosition }), - }; -}; - -/** - * serializeAws_restJson1RealTimeAlertConfiguration - */ -const se_RealTimeAlertConfiguration = (input: RealTimeAlertConfiguration, context: __SerdeContext): any => { - return { - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Rules != null && { Rules: se_RealTimeAlertRuleList(input.Rules, context) }), - }; -}; - -/** - * serializeAws_restJson1RealTimeAlertRule - */ -const se_RealTimeAlertRule = (input: RealTimeAlertRule, context: __SerdeContext): any => { - return { - ...(input.IssueDetectionConfiguration != null && { - IssueDetectionConfiguration: se_IssueDetectionConfiguration(input.IssueDetectionConfiguration, context), - }), - ...(input.KeywordMatchConfiguration != null && { - KeywordMatchConfiguration: se_KeywordMatchConfiguration(input.KeywordMatchConfiguration, context), - }), - ...(input.SentimentConfiguration != null && { - SentimentConfiguration: se_SentimentConfiguration(input.SentimentConfiguration, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1RealTimeAlertRuleList - */ -const se_RealTimeAlertRuleList = (input: RealTimeAlertRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RealTimeAlertRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1RecordingStreamConfiguration - */ -const se_RecordingStreamConfiguration = (input: RecordingStreamConfiguration, context: __SerdeContext): any => { - return { - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - }; -}; - -/** - * serializeAws_restJson1RecordingStreamList - */ -const se_RecordingStreamList = (input: RecordingStreamConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecordingStreamConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1S3BucketSinkConfiguration - */ -const se_S3BucketSinkConfiguration = (input: S3BucketSinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - }; -}; - -/** - * serializeAws_restJson1S3RecordingSinkConfiguration - */ -const se_S3RecordingSinkConfiguration = (input: S3RecordingSinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - }; -}; - -/** - * serializeAws_restJson1S3RecordingSinkRuntimeConfiguration - */ -const se_S3RecordingSinkRuntimeConfiguration = ( - input: S3RecordingSinkRuntimeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.RecordingFileFormat != null && { RecordingFileFormat: input.RecordingFileFormat }), - }; -}; - -/** - * serializeAws_restJson1SelectedVideoStreams - */ -const se_SelectedVideoStreams = (input: SelectedVideoStreams, context: __SerdeContext): any => { - return { - ...(input.AttendeeIds != null && { AttendeeIds: se_AttendeeIdList(input.AttendeeIds, context) }), - ...(input.ExternalUserIds != null && { ExternalUserIds: se_ExternalUserIdList(input.ExternalUserIds, context) }), - }; -}; - -/** - * serializeAws_restJson1SentimentConfiguration - */ -const se_SentimentConfiguration = (input: SentimentConfiguration, context: __SerdeContext): any => { - return { - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.SentimentType != null && { SentimentType: input.SentimentType }), - ...(input.TimePeriod != null && { TimePeriod: input.TimePeriod }), - }; -}; - -/** - * serializeAws_restJson1SnsTopicSinkConfiguration - */ -const se_SnsTopicSinkConfiguration = (input: SnsTopicSinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.InsightsTarget != null && { InsightsTarget: input.InsightsTarget }), - }; -}; - -/** - * serializeAws_restJson1SourceConfiguration - */ -const se_SourceConfiguration = (input: SourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.SelectedVideoStreams != null && { - SelectedVideoStreams: se_SelectedVideoStreams(input.SelectedVideoStreams, context), - }), - }; -}; - -/** - * serializeAws_restJson1SqsQueueSinkConfiguration - */ -const se_SqsQueueSinkConfiguration = (input: SqsQueueSinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.InsightsTarget != null && { InsightsTarget: input.InsightsTarget }), - }; -}; - -/** - * serializeAws_restJson1StreamChannelDefinition - */ -const se_StreamChannelDefinition = (input: StreamChannelDefinition, context: __SerdeContext): any => { - return { - ...(input.ChannelDefinitions != null && { - ChannelDefinitions: se_ChannelDefinitions(input.ChannelDefinitions, context), - }), - ...(input.NumberOfChannels != null && { NumberOfChannels: input.NumberOfChannels }), - }; -}; - -/** - * serializeAws_restJson1StreamConfiguration - */ -const se_StreamConfiguration = (input: StreamConfiguration, context: __SerdeContext): any => { - return { - ...(input.FragmentNumber != null && { FragmentNumber: input.FragmentNumber }), - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - ...(input.StreamChannelDefinition != null && { - StreamChannelDefinition: se_StreamChannelDefinition(input.StreamChannelDefinition, context), - }), - }; -}; - -/** - * serializeAws_restJson1Streams - */ -const se_Streams = (input: StreamConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StreamConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1TimestampRange - */ -const se_TimestampRange = (input: TimestampRange, context: __SerdeContext): any => { - return { - ...(input.EndTimestamp != null && { EndTimestamp: Math.round(input.EndTimestamp.getTime() / 1000) }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_restJson1TranscriptionMessagesConcatenationConfiguration - */ -const se_TranscriptionMessagesConcatenationConfiguration = ( - input: TranscriptionMessagesConcatenationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1VideoArtifactsConfiguration - */ -const se_VideoArtifactsConfiguration = (input: VideoArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MuxType != null && { MuxType: input.MuxType }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1VideoConcatenationConfiguration - */ -const se_VideoConcatenationConfiguration = (input: VideoConcatenationConfiguration, context: __SerdeContext): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1VoiceAnalyticsProcessorConfiguration - */ -const se_VoiceAnalyticsProcessorConfiguration = ( - input: VoiceAnalyticsProcessorConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.SpeakerSearchStatus != null && { SpeakerSearchStatus: input.SpeakerSearchStatus }), - ...(input.VoiceToneAnalysisStatus != null && { VoiceToneAnalysisStatus: input.VoiceToneAnalysisStatus }), - }; -}; - -/** - * deserializeAws_restJson1AmazonTranscribeCallAnalyticsProcessorConfiguration - */ -const de_AmazonTranscribeCallAnalyticsProcessorConfiguration = ( - output: any, - context: __SerdeContext -): AmazonTranscribeCallAnalyticsProcessorConfiguration => { - return { - CallAnalyticsStreamCategories: - output.CallAnalyticsStreamCategories != null - ? de_CategoryNameList(output.CallAnalyticsStreamCategories, context) - : undefined, - ContentIdentificationType: __expectString(output.ContentIdentificationType), - ContentRedactionType: __expectString(output.ContentRedactionType), - EnablePartialResultsStabilization: __expectBoolean(output.EnablePartialResultsStabilization), - FilterPartialResults: __expectBoolean(output.FilterPartialResults), - LanguageCode: __expectString(output.LanguageCode), - LanguageModelName: __expectString(output.LanguageModelName), - PartialResultsStability: __expectString(output.PartialResultsStability), - PiiEntityTypes: __expectString(output.PiiEntityTypes), - PostCallAnalyticsSettings: - output.PostCallAnalyticsSettings != null - ? de_PostCallAnalyticsSettings(output.PostCallAnalyticsSettings, context) - : undefined, - VocabularyFilterMethod: __expectString(output.VocabularyFilterMethod), - VocabularyFilterName: __expectString(output.VocabularyFilterName), - VocabularyName: __expectString(output.VocabularyName), - } as any; -}; - -/** - * deserializeAws_restJson1AmazonTranscribeProcessorConfiguration - */ -const de_AmazonTranscribeProcessorConfiguration = ( - output: any, - context: __SerdeContext -): AmazonTranscribeProcessorConfiguration => { - return { - ContentIdentificationType: __expectString(output.ContentIdentificationType), - ContentRedactionType: __expectString(output.ContentRedactionType), - EnablePartialResultsStabilization: __expectBoolean(output.EnablePartialResultsStabilization), - FilterPartialResults: __expectBoolean(output.FilterPartialResults), - LanguageCode: __expectString(output.LanguageCode), - LanguageModelName: __expectString(output.LanguageModelName), - PartialResultsStability: __expectString(output.PartialResultsStability), - PiiEntityTypes: __expectString(output.PiiEntityTypes), - ShowSpeakerLabel: __expectBoolean(output.ShowSpeakerLabel), - VocabularyFilterMethod: __expectString(output.VocabularyFilterMethod), - VocabularyFilterName: __expectString(output.VocabularyFilterName), - VocabularyName: __expectString(output.VocabularyName), - } as any; -}; - -/** - * deserializeAws_restJson1ArtifactsConcatenationConfiguration - */ -const de_ArtifactsConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): ArtifactsConcatenationConfiguration => { - return { - Audio: output.Audio != null ? de_AudioConcatenationConfiguration(output.Audio, context) : undefined, - CompositedVideo: - output.CompositedVideo != null - ? de_CompositedVideoConcatenationConfiguration(output.CompositedVideo, context) - : undefined, - Content: output.Content != null ? de_ContentConcatenationConfiguration(output.Content, context) : undefined, - DataChannel: - output.DataChannel != null ? de_DataChannelConcatenationConfiguration(output.DataChannel, context) : undefined, - MeetingEvents: - output.MeetingEvents != null - ? de_MeetingEventsConcatenationConfiguration(output.MeetingEvents, context) - : undefined, - TranscriptionMessages: - output.TranscriptionMessages != null - ? de_TranscriptionMessagesConcatenationConfiguration(output.TranscriptionMessages, context) - : undefined, - Video: output.Video != null ? de_VideoConcatenationConfiguration(output.Video, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ArtifactsConfiguration - */ -const de_ArtifactsConfiguration = (output: any, context: __SerdeContext): ArtifactsConfiguration => { - return { - Audio: output.Audio != null ? de_AudioArtifactsConfiguration(output.Audio, context) : undefined, - CompositedVideo: - output.CompositedVideo != null - ? de_CompositedVideoArtifactsConfiguration(output.CompositedVideo, context) - : undefined, - Content: output.Content != null ? de_ContentArtifactsConfiguration(output.Content, context) : undefined, - Video: output.Video != null ? de_VideoArtifactsConfiguration(output.Video, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AttendeeIdList - */ -const de_AttendeeIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AudioArtifactsConfiguration - */ -const de_AudioArtifactsConfiguration = (output: any, context: __SerdeContext): AudioArtifactsConfiguration => { - return { - MuxType: __expectString(output.MuxType), - } as any; -}; - -/** - * deserializeAws_restJson1AudioConcatenationConfiguration - */ -const de_AudioConcatenationConfiguration = (output: any, context: __SerdeContext): AudioConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1CategoryNameList - */ -const de_CategoryNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelDefinition - */ -const de_ChannelDefinition = (output: any, context: __SerdeContext): ChannelDefinition => { - return { - ChannelId: __expectInt32(output.ChannelId), - ParticipantRole: __expectString(output.ParticipantRole), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelDefinitions - */ -const de_ChannelDefinitions = (output: any, context: __SerdeContext): ChannelDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelDefinition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChimeSdkMeetingConcatenationConfiguration - */ -const de_ChimeSdkMeetingConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): ChimeSdkMeetingConcatenationConfiguration => { - return { - ArtifactsConfiguration: - output.ArtifactsConfiguration != null - ? de_ArtifactsConcatenationConfiguration(output.ArtifactsConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChimeSdkMeetingConfiguration - */ -const de_ChimeSdkMeetingConfiguration = (output: any, context: __SerdeContext): ChimeSdkMeetingConfiguration => { - return { - ArtifactsConfiguration: - output.ArtifactsConfiguration != null - ? de_ArtifactsConfiguration(output.ArtifactsConfiguration, context) - : undefined, - SourceConfiguration: - output.SourceConfiguration != null ? de_SourceConfiguration(output.SourceConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChimeSdkMeetingLiveConnectorConfiguration - */ -const de_ChimeSdkMeetingLiveConnectorConfiguration = ( - output: any, - context: __SerdeContext -): ChimeSdkMeetingLiveConnectorConfiguration => { - return { - Arn: __expectString(output.Arn), - CompositedVideo: - output.CompositedVideo != null - ? de_CompositedVideoArtifactsConfiguration(output.CompositedVideo, context) - : undefined, - MuxType: __expectString(output.MuxType), - SourceConfiguration: - output.SourceConfiguration != null ? de_SourceConfiguration(output.SourceConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CompositedVideoArtifactsConfiguration - */ -const de_CompositedVideoArtifactsConfiguration = ( - output: any, - context: __SerdeContext -): CompositedVideoArtifactsConfiguration => { - return { - GridViewConfiguration: - output.GridViewConfiguration != null - ? de_GridViewConfiguration(output.GridViewConfiguration, context) - : undefined, - Layout: __expectString(output.Layout), - Resolution: __expectString(output.Resolution), - } as any; -}; - -/** - * deserializeAws_restJson1CompositedVideoConcatenationConfiguration - */ -const de_CompositedVideoConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): CompositedVideoConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1ConcatenationSink - */ -const de_ConcatenationSink = (output: any, context: __SerdeContext): ConcatenationSink => { - return { - S3BucketSinkConfiguration: - output.S3BucketSinkConfiguration != null - ? de_S3BucketSinkConfiguration(output.S3BucketSinkConfiguration, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ConcatenationSinkList - */ -const de_ConcatenationSinkList = (output: any, context: __SerdeContext): ConcatenationSink[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConcatenationSink(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConcatenationSource - */ -const de_ConcatenationSource = (output: any, context: __SerdeContext): ConcatenationSource => { - return { - MediaCapturePipelineSourceConfiguration: - output.MediaCapturePipelineSourceConfiguration != null - ? de_MediaCapturePipelineSourceConfiguration(output.MediaCapturePipelineSourceConfiguration, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ConcatenationSourceList - */ -const de_ConcatenationSourceList = (output: any, context: __SerdeContext): ConcatenationSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConcatenationSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ContentArtifactsConfiguration - */ -const de_ContentArtifactsConfiguration = (output: any, context: __SerdeContext): ContentArtifactsConfiguration => { - return { - MuxType: __expectString(output.MuxType), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1ContentConcatenationConfiguration - */ -const de_ContentConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): ContentConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1DataChannelConcatenationConfiguration - */ -const de_DataChannelConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): DataChannelConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1ExternalUserIdList - */ -const de_ExternalUserIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FragmentSelector - */ -const de_FragmentSelector = (output: any, context: __SerdeContext): FragmentSelector => { - return { - FragmentSelectorType: __expectString(output.FragmentSelectorType), - TimestampRange: output.TimestampRange != null ? de_TimestampRange(output.TimestampRange, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1GridViewConfiguration - */ -const de_GridViewConfiguration = (output: any, context: __SerdeContext): GridViewConfiguration => { - return { - ContentShareLayout: __expectString(output.ContentShareLayout), - PresenterOnlyConfiguration: - output.PresenterOnlyConfiguration != null - ? de_PresenterOnlyConfiguration(output.PresenterOnlyConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1IssueDetectionConfiguration - */ -const de_IssueDetectionConfiguration = (output: any, context: __SerdeContext): IssueDetectionConfiguration => { - return { - RuleName: __expectString(output.RuleName), - } as any; -}; - -/** - * deserializeAws_restJson1KeywordMatchConfiguration - */ -const de_KeywordMatchConfiguration = (output: any, context: __SerdeContext): KeywordMatchConfiguration => { - return { - Keywords: output.Keywords != null ? de_KeywordMatchWordList(output.Keywords, context) : undefined, - Negate: __expectBoolean(output.Negate), - RuleName: __expectString(output.RuleName), - } as any; -}; - -/** - * deserializeAws_restJson1KeywordMatchWordList - */ -const de_KeywordMatchWordList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1KinesisDataStreamSinkConfiguration - */ -const de_KinesisDataStreamSinkConfiguration = ( - output: any, - context: __SerdeContext -): KinesisDataStreamSinkConfiguration => { - return { - InsightsTarget: __expectString(output.InsightsTarget), - } as any; -}; - -/** - * deserializeAws_restJson1KinesisVideoStreamRecordingSourceRuntimeConfiguration - */ -const de_KinesisVideoStreamRecordingSourceRuntimeConfiguration = ( - output: any, - context: __SerdeContext -): KinesisVideoStreamRecordingSourceRuntimeConfiguration => { - return { - FragmentSelector: - output.FragmentSelector != null ? de_FragmentSelector(output.FragmentSelector, context) : undefined, - Streams: output.Streams != null ? de_RecordingStreamList(output.Streams, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1KinesisVideoStreamSourceRuntimeConfiguration - */ -const de_KinesisVideoStreamSourceRuntimeConfiguration = ( - output: any, - context: __SerdeContext -): KinesisVideoStreamSourceRuntimeConfiguration => { - return { - MediaEncoding: __expectString(output.MediaEncoding), - MediaSampleRate: __expectInt32(output.MediaSampleRate), - Streams: output.Streams != null ? de_Streams(output.Streams, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LambdaFunctionSinkConfiguration - */ -const de_LambdaFunctionSinkConfiguration = (output: any, context: __SerdeContext): LambdaFunctionSinkConfiguration => { - return { - InsightsTarget: __expectString(output.InsightsTarget), - } as any; -}; - -/** - * deserializeAws_restJson1LiveConnectorRTMPConfiguration - */ -const de_LiveConnectorRTMPConfiguration = (output: any, context: __SerdeContext): LiveConnectorRTMPConfiguration => { - return { - AudioChannels: __expectString(output.AudioChannels), - AudioSampleRate: __expectString(output.AudioSampleRate), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1LiveConnectorSinkConfiguration - */ -const de_LiveConnectorSinkConfiguration = (output: any, context: __SerdeContext): LiveConnectorSinkConfiguration => { - return { - RTMPConfiguration: - output.RTMPConfiguration != null - ? de_LiveConnectorRTMPConfiguration(output.RTMPConfiguration, context) - : undefined, - SinkType: __expectString(output.SinkType), - } as any; -}; - -/** - * deserializeAws_restJson1LiveConnectorSinkList - */ -const de_LiveConnectorSinkList = (output: any, context: __SerdeContext): LiveConnectorSinkConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LiveConnectorSinkConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LiveConnectorSourceConfiguration - */ -const de_LiveConnectorSourceConfiguration = ( - output: any, - context: __SerdeContext -): LiveConnectorSourceConfiguration => { - return { - ChimeSdkMeetingLiveConnectorConfiguration: - output.ChimeSdkMeetingLiveConnectorConfiguration != null - ? de_ChimeSdkMeetingLiveConnectorConfiguration(output.ChimeSdkMeetingLiveConnectorConfiguration, context) - : undefined, - SourceType: __expectString(output.SourceType), - } as any; -}; - -/** - * deserializeAws_restJson1LiveConnectorSourceList - */ -const de_LiveConnectorSourceList = (output: any, context: __SerdeContext): LiveConnectorSourceConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LiveConnectorSourceConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaCapturePipeline - */ -const de_MediaCapturePipeline = (output: any, context: __SerdeContext): MediaCapturePipeline => { - return { - ChimeSdkMeetingConfiguration: - output.ChimeSdkMeetingConfiguration != null - ? de_ChimeSdkMeetingConfiguration(output.ChimeSdkMeetingConfiguration, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - MediaPipelineArn: __expectString(output.MediaPipelineArn), - MediaPipelineId: __expectString(output.MediaPipelineId), - SinkArn: __expectString(output.SinkArn), - SinkType: __expectString(output.SinkType), - SourceArn: __expectString(output.SourceArn), - SourceType: __expectString(output.SourceType), - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MediaCapturePipelineSourceConfiguration - */ -const de_MediaCapturePipelineSourceConfiguration = ( - output: any, - context: __SerdeContext -): MediaCapturePipelineSourceConfiguration => { - return { - ChimeSdkMeetingConfiguration: - output.ChimeSdkMeetingConfiguration != null - ? de_ChimeSdkMeetingConcatenationConfiguration(output.ChimeSdkMeetingConfiguration, context) - : undefined, - MediaPipelineArn: __expectString(output.MediaPipelineArn), - } as any; -}; - -/** - * deserializeAws_restJson1MediaCapturePipelineSummary - */ -const de_MediaCapturePipelineSummary = (output: any, context: __SerdeContext): MediaCapturePipelineSummary => { - return { - MediaPipelineArn: __expectString(output.MediaPipelineArn), - MediaPipelineId: __expectString(output.MediaPipelineId), - } as any; -}; - -/** - * deserializeAws_restJson1MediaCapturePipelineSummaryList - */ -const de_MediaCapturePipelineSummaryList = (output: any, context: __SerdeContext): MediaCapturePipelineSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MediaCapturePipelineSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaConcatenationPipeline - */ -const de_MediaConcatenationPipeline = (output: any, context: __SerdeContext): MediaConcatenationPipeline => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - MediaPipelineArn: __expectString(output.MediaPipelineArn), - MediaPipelineId: __expectString(output.MediaPipelineId), - Sinks: output.Sinks != null ? de_ConcatenationSinkList(output.Sinks, context) : undefined, - Sources: output.Sources != null ? de_ConcatenationSourceList(output.Sources, context) : undefined, - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MediaInsightsPipeline - */ -const de_MediaInsightsPipeline = (output: any, context: __SerdeContext): MediaInsightsPipeline => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - KinesisVideoStreamRecordingSourceRuntimeConfiguration: - output.KinesisVideoStreamRecordingSourceRuntimeConfiguration != null - ? de_KinesisVideoStreamRecordingSourceRuntimeConfiguration( - output.KinesisVideoStreamRecordingSourceRuntimeConfiguration, - context - ) - : undefined, - KinesisVideoStreamSourceRuntimeConfiguration: - output.KinesisVideoStreamSourceRuntimeConfiguration != null - ? de_KinesisVideoStreamSourceRuntimeConfiguration(output.KinesisVideoStreamSourceRuntimeConfiguration, context) - : undefined, - MediaInsightsPipelineConfigurationArn: __expectString(output.MediaInsightsPipelineConfigurationArn), - MediaInsightsRuntimeMetadata: - output.MediaInsightsRuntimeMetadata != null - ? de_MediaInsightsRuntimeMetadata(output.MediaInsightsRuntimeMetadata, context) - : undefined, - MediaPipelineArn: __expectString(output.MediaPipelineArn), - MediaPipelineId: __expectString(output.MediaPipelineId), - S3RecordingSinkRuntimeConfiguration: - output.S3RecordingSinkRuntimeConfiguration != null - ? de_S3RecordingSinkRuntimeConfiguration(output.S3RecordingSinkRuntimeConfiguration, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1MediaInsightsPipelineConfiguration - */ -const de_MediaInsightsPipelineConfiguration = ( - output: any, - context: __SerdeContext -): MediaInsightsPipelineConfiguration => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Elements: - output.Elements != null ? de_MediaInsightsPipelineConfigurationElements(output.Elements, context) : undefined, - MediaInsightsPipelineConfigurationArn: __expectString(output.MediaInsightsPipelineConfigurationArn), - MediaInsightsPipelineConfigurationId: __expectString(output.MediaInsightsPipelineConfigurationId), - MediaInsightsPipelineConfigurationName: __expectString(output.MediaInsightsPipelineConfigurationName), - RealTimeAlertConfiguration: - output.RealTimeAlertConfiguration != null - ? de_RealTimeAlertConfiguration(output.RealTimeAlertConfiguration, context) - : undefined, - ResourceAccessRoleArn: __expectString(output.ResourceAccessRoleArn), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MediaInsightsPipelineConfigurationElement - */ -const de_MediaInsightsPipelineConfigurationElement = ( - output: any, - context: __SerdeContext -): MediaInsightsPipelineConfigurationElement => { - return { - AmazonTranscribeCallAnalyticsProcessorConfiguration: - output.AmazonTranscribeCallAnalyticsProcessorConfiguration != null - ? de_AmazonTranscribeCallAnalyticsProcessorConfiguration( - output.AmazonTranscribeCallAnalyticsProcessorConfiguration, - context - ) - : undefined, - AmazonTranscribeProcessorConfiguration: - output.AmazonTranscribeProcessorConfiguration != null - ? de_AmazonTranscribeProcessorConfiguration(output.AmazonTranscribeProcessorConfiguration, context) - : undefined, - KinesisDataStreamSinkConfiguration: - output.KinesisDataStreamSinkConfiguration != null - ? de_KinesisDataStreamSinkConfiguration(output.KinesisDataStreamSinkConfiguration, context) - : undefined, - LambdaFunctionSinkConfiguration: - output.LambdaFunctionSinkConfiguration != null - ? de_LambdaFunctionSinkConfiguration(output.LambdaFunctionSinkConfiguration, context) - : undefined, - S3RecordingSinkConfiguration: - output.S3RecordingSinkConfiguration != null - ? de_S3RecordingSinkConfiguration(output.S3RecordingSinkConfiguration, context) - : undefined, - SnsTopicSinkConfiguration: - output.SnsTopicSinkConfiguration != null - ? de_SnsTopicSinkConfiguration(output.SnsTopicSinkConfiguration, context) - : undefined, - SqsQueueSinkConfiguration: - output.SqsQueueSinkConfiguration != null - ? de_SqsQueueSinkConfiguration(output.SqsQueueSinkConfiguration, context) - : undefined, - Type: __expectString(output.Type), - VoiceAnalyticsProcessorConfiguration: - output.VoiceAnalyticsProcessorConfiguration != null - ? de_VoiceAnalyticsProcessorConfiguration(output.VoiceAnalyticsProcessorConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MediaInsightsPipelineConfigurationElements - */ -const de_MediaInsightsPipelineConfigurationElements = ( - output: any, - context: __SerdeContext -): MediaInsightsPipelineConfigurationElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MediaInsightsPipelineConfigurationElement(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaInsightsPipelineConfigurationSummary - */ -const de_MediaInsightsPipelineConfigurationSummary = ( - output: any, - context: __SerdeContext -): MediaInsightsPipelineConfigurationSummary => { - return { - MediaInsightsPipelineConfigurationArn: __expectString(output.MediaInsightsPipelineConfigurationArn), - MediaInsightsPipelineConfigurationId: __expectString(output.MediaInsightsPipelineConfigurationId), - MediaInsightsPipelineConfigurationName: __expectString(output.MediaInsightsPipelineConfigurationName), - } as any; -}; - -/** - * deserializeAws_restJson1MediaInsightsPipelineConfigurationSummaryList - */ -const de_MediaInsightsPipelineConfigurationSummaryList = ( - output: any, - context: __SerdeContext -): MediaInsightsPipelineConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MediaInsightsPipelineConfigurationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaInsightsRuntimeMetadata - */ -const de_MediaInsightsRuntimeMetadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1MediaLiveConnectorPipeline - */ -const de_MediaLiveConnectorPipeline = (output: any, context: __SerdeContext): MediaLiveConnectorPipeline => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - MediaPipelineArn: __expectString(output.MediaPipelineArn), - MediaPipelineId: __expectString(output.MediaPipelineId), - Sinks: output.Sinks != null ? de_LiveConnectorSinkList(output.Sinks, context) : undefined, - Sources: output.Sources != null ? de_LiveConnectorSourceList(output.Sources, context) : undefined, - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; -}; +// de_MediaPipelineList omitted. -/** - * deserializeAws_restJson1MediaPipeline - */ -const de_MediaPipeline = (output: any, context: __SerdeContext): MediaPipeline => { - return { - MediaCapturePipeline: - output.MediaCapturePipeline != null ? de_MediaCapturePipeline(output.MediaCapturePipeline, context) : undefined, - MediaConcatenationPipeline: - output.MediaConcatenationPipeline != null - ? de_MediaConcatenationPipeline(output.MediaConcatenationPipeline, context) - : undefined, - MediaInsightsPipeline: - output.MediaInsightsPipeline != null - ? de_MediaInsightsPipeline(output.MediaInsightsPipeline, context) - : undefined, - MediaLiveConnectorPipeline: - output.MediaLiveConnectorPipeline != null - ? de_MediaLiveConnectorPipeline(output.MediaLiveConnectorPipeline, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MediaPipelineList - */ -const de_MediaPipelineList = (output: any, context: __SerdeContext): MediaPipelineSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MediaPipelineSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaPipelineSummary - */ -const de_MediaPipelineSummary = (output: any, context: __SerdeContext): MediaPipelineSummary => { - return { - MediaPipelineArn: __expectString(output.MediaPipelineArn), - MediaPipelineId: __expectString(output.MediaPipelineId), - } as any; -}; +// de_MediaPipelineSummary omitted. -/** - * deserializeAws_restJson1MeetingEventsConcatenationConfiguration - */ -const de_MeetingEventsConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): MeetingEventsConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; +// de_MeetingEventsConcatenationConfiguration omitted. -/** - * deserializeAws_restJson1PostCallAnalyticsSettings - */ -const de_PostCallAnalyticsSettings = (output: any, context: __SerdeContext): PostCallAnalyticsSettings => { - return { - ContentRedactionOutput: __expectString(output.ContentRedactionOutput), - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - OutputEncryptionKMSKeyId: __expectString(output.OutputEncryptionKMSKeyId), - OutputLocation: __expectString(output.OutputLocation), - } as any; -}; +// de_PostCallAnalyticsSettings omitted. -/** - * deserializeAws_restJson1PresenterOnlyConfiguration - */ -const de_PresenterOnlyConfiguration = (output: any, context: __SerdeContext): PresenterOnlyConfiguration => { - return { - PresenterPosition: __expectString(output.PresenterPosition), - } as any; -}; +// de_PresenterOnlyConfiguration omitted. -/** - * deserializeAws_restJson1RealTimeAlertConfiguration - */ -const de_RealTimeAlertConfiguration = (output: any, context: __SerdeContext): RealTimeAlertConfiguration => { - return { - Disabled: __expectBoolean(output.Disabled), - Rules: output.Rules != null ? de_RealTimeAlertRuleList(output.Rules, context) : undefined, - } as any; -}; +// de_RealTimeAlertConfiguration omitted. -/** - * deserializeAws_restJson1RealTimeAlertRule - */ -const de_RealTimeAlertRule = (output: any, context: __SerdeContext): RealTimeAlertRule => { - return { - IssueDetectionConfiguration: - output.IssueDetectionConfiguration != null - ? de_IssueDetectionConfiguration(output.IssueDetectionConfiguration, context) - : undefined, - KeywordMatchConfiguration: - output.KeywordMatchConfiguration != null - ? de_KeywordMatchConfiguration(output.KeywordMatchConfiguration, context) - : undefined, - SentimentConfiguration: - output.SentimentConfiguration != null - ? de_SentimentConfiguration(output.SentimentConfiguration, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_RealTimeAlertRule omitted. -/** - * deserializeAws_restJson1RealTimeAlertRuleList - */ -const de_RealTimeAlertRuleList = (output: any, context: __SerdeContext): RealTimeAlertRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RealTimeAlertRule(entry, context); - }); - return retVal; -}; +// de_RealTimeAlertRuleList omitted. -/** - * deserializeAws_restJson1RecordingStreamConfiguration - */ -const de_RecordingStreamConfiguration = (output: any, context: __SerdeContext): RecordingStreamConfiguration => { - return { - StreamArn: __expectString(output.StreamArn), - } as any; -}; +// de_RecordingStreamConfiguration omitted. -/** - * deserializeAws_restJson1RecordingStreamList - */ -const de_RecordingStreamList = (output: any, context: __SerdeContext): RecordingStreamConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordingStreamConfiguration(entry, context); - }); - return retVal; -}; +// de_RecordingStreamList omitted. -/** - * deserializeAws_restJson1S3BucketSinkConfiguration - */ -const de_S3BucketSinkConfiguration = (output: any, context: __SerdeContext): S3BucketSinkConfiguration => { - return { - Destination: __expectString(output.Destination), - } as any; -}; +// de_S3BucketSinkConfiguration omitted. -/** - * deserializeAws_restJson1S3RecordingSinkConfiguration - */ -const de_S3RecordingSinkConfiguration = (output: any, context: __SerdeContext): S3RecordingSinkConfiguration => { - return { - Destination: __expectString(output.Destination), - } as any; -}; +// de_S3RecordingSinkConfiguration omitted. -/** - * deserializeAws_restJson1S3RecordingSinkRuntimeConfiguration - */ -const de_S3RecordingSinkRuntimeConfiguration = ( - output: any, - context: __SerdeContext -): S3RecordingSinkRuntimeConfiguration => { - return { - Destination: __expectString(output.Destination), - RecordingFileFormat: __expectString(output.RecordingFileFormat), - } as any; -}; +// de_S3RecordingSinkRuntimeConfiguration omitted. -/** - * deserializeAws_restJson1SelectedVideoStreams - */ -const de_SelectedVideoStreams = (output: any, context: __SerdeContext): SelectedVideoStreams => { - return { - AttendeeIds: output.AttendeeIds != null ? de_AttendeeIdList(output.AttendeeIds, context) : undefined, - ExternalUserIds: - output.ExternalUserIds != null ? de_ExternalUserIdList(output.ExternalUserIds, context) : undefined, - } as any; -}; +// de_SelectedVideoStreams omitted. -/** - * deserializeAws_restJson1SentimentConfiguration - */ -const de_SentimentConfiguration = (output: any, context: __SerdeContext): SentimentConfiguration => { - return { - RuleName: __expectString(output.RuleName), - SentimentType: __expectString(output.SentimentType), - TimePeriod: __expectInt32(output.TimePeriod), - } as any; -}; +// de_SentimentConfiguration omitted. -/** - * deserializeAws_restJson1SnsTopicSinkConfiguration - */ -const de_SnsTopicSinkConfiguration = (output: any, context: __SerdeContext): SnsTopicSinkConfiguration => { - return { - InsightsTarget: __expectString(output.InsightsTarget), - } as any; -}; +// de_SnsTopicSinkConfiguration omitted. -/** - * deserializeAws_restJson1SourceConfiguration - */ -const de_SourceConfiguration = (output: any, context: __SerdeContext): SourceConfiguration => { - return { - SelectedVideoStreams: - output.SelectedVideoStreams != null ? de_SelectedVideoStreams(output.SelectedVideoStreams, context) : undefined, - } as any; -}; +// de_SourceConfiguration omitted. -/** - * deserializeAws_restJson1SqsQueueSinkConfiguration - */ -const de_SqsQueueSinkConfiguration = (output: any, context: __SerdeContext): SqsQueueSinkConfiguration => { - return { - InsightsTarget: __expectString(output.InsightsTarget), - } as any; -}; +// de_SqsQueueSinkConfiguration omitted. -/** - * deserializeAws_restJson1StreamChannelDefinition - */ -const de_StreamChannelDefinition = (output: any, context: __SerdeContext): StreamChannelDefinition => { - return { - ChannelDefinitions: - output.ChannelDefinitions != null ? de_ChannelDefinitions(output.ChannelDefinitions, context) : undefined, - NumberOfChannels: __expectInt32(output.NumberOfChannels), - } as any; -}; +// de_StreamChannelDefinition omitted. -/** - * deserializeAws_restJson1StreamConfiguration - */ -const de_StreamConfiguration = (output: any, context: __SerdeContext): StreamConfiguration => { - return { - FragmentNumber: __expectString(output.FragmentNumber), - StreamArn: __expectString(output.StreamArn), - StreamChannelDefinition: - output.StreamChannelDefinition != null - ? de_StreamChannelDefinition(output.StreamChannelDefinition, context) - : undefined, - } as any; -}; +// de_StreamConfiguration omitted. -/** - * deserializeAws_restJson1Streams - */ -const de_Streams = (output: any, context: __SerdeContext): StreamConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamConfiguration(entry, context); - }); - return retVal; -}; +// de_Streams omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1TimestampRange */ const de_TimestampRange = (output: any, context: __SerdeContext): TimestampRange => { - return { - EndTimestamp: - output.EndTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTimestamp))) - : undefined, - StartTimestamp: - output.StartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp))) - : undefined, - } as any; + return take(output, { + EndTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1TranscriptionMessagesConcatenationConfiguration - */ -const de_TranscriptionMessagesConcatenationConfiguration = ( - output: any, - context: __SerdeContext -): TranscriptionMessagesConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; +// de_TranscriptionMessagesConcatenationConfiguration omitted. -/** - * deserializeAws_restJson1VideoArtifactsConfiguration - */ -const de_VideoArtifactsConfiguration = (output: any, context: __SerdeContext): VideoArtifactsConfiguration => { - return { - MuxType: __expectString(output.MuxType), - State: __expectString(output.State), - } as any; -}; +// de_VideoArtifactsConfiguration omitted. -/** - * deserializeAws_restJson1VideoConcatenationConfiguration - */ -const de_VideoConcatenationConfiguration = (output: any, context: __SerdeContext): VideoConcatenationConfiguration => { - return { - State: __expectString(output.State), - } as any; -}; +// de_VideoConcatenationConfiguration omitted. -/** - * deserializeAws_restJson1VoiceAnalyticsProcessorConfiguration - */ -const de_VoiceAnalyticsProcessorConfiguration = ( - output: any, - context: __SerdeContext -): VoiceAnalyticsProcessorConfiguration => { - return { - SpeakerSearchStatus: __expectString(output.SpeakerSearchStatus), - VoiceToneAnalysisStatus: __expectString(output.VoiceToneAnalysisStatus), - } as any; -}; +// de_VoiceAnalyticsProcessorConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts index 4d3b2c5720ef..1d668122c0ca 100644 --- a/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime-sdk-meetings/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -56,20 +58,16 @@ import { } from "../commands/UpdateAttendeeCapabilitiesCommand"; import { ChimeSDKMeetingsServiceException as __BaseException } from "../models/ChimeSDKMeetingsServiceException"; import { - Attendee, AttendeeCapabilities, AttendeeIdItem, AudioFeatures, BadRequestException, ConflictException, - CreateAttendeeError, CreateAttendeeRequestItem, EngineTranscribeMedicalSettings, EngineTranscribeSettings, ForbiddenException, LimitExceededException, - MediaPlacement, - Meeting, MeetingFeaturesConfiguration, NotFoundException, NotificationsConfiguration, @@ -102,9 +100,11 @@ export const se_BatchCreateAttendeeCommand = async ( operation: [, "batch-create"], }); let body: any; - body = JSON.stringify({ - ...(input.Attendees != null && { Attendees: se_CreateAttendeeRequestItemList(input.Attendees, context) }), - }); + body = JSON.stringify( + take(input, { + Attendees: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -136,12 +136,12 @@ export const se_BatchUpdateAttendeeCapabilitiesExceptCommand = async ( operation: [, "batch-update-except"], }); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }), - ...(input.ExcludedAttendeeIds != null && { - ExcludedAttendeeIds: se_AttendeeIdsList(input.ExcludedAttendeeIds, context), - }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + ExcludedAttendeeIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -169,10 +169,12 @@ export const se_CreateAttendeeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees"; resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", () => input.MeetingId!, "{MeetingId}", false); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }), - ...(input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + ExternalUserId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -197,21 +199,19 @@ export const se_CreateMeetingCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }), - ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }), - ...(input.MeetingFeatures != null && { - MeetingFeatures: se_MeetingFeaturesConfiguration(input.MeetingFeatures, context), - }), - ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }), - ...(input.NotificationsConfiguration != null && { - NotificationsConfiguration: se_NotificationsConfiguration(input.NotificationsConfiguration, context), - }), - ...(input.PrimaryMeetingId != null && { PrimaryMeetingId: input.PrimaryMeetingId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TenantIds != null && { TenantIds: se_TenantIdList(input.TenantIds, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ExternalMeetingId: [], + MediaRegion: [], + MeetingFeatures: (_) => _json(_), + MeetingHostId: [], + NotificationsConfiguration: (_) => _json(_), + PrimaryMeetingId: [], + Tags: (_) => _json(_), + TenantIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -239,24 +239,20 @@ export const se_CreateMeetingWithAttendeesCommand = async ( operation: [, "create-attendees"], }); let body: any; - body = JSON.stringify({ - ...(input.Attendees != null && { - Attendees: se_CreateMeetingWithAttendeesRequestItemList(input.Attendees, context), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }), - ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }), - ...(input.MeetingFeatures != null && { - MeetingFeatures: se_MeetingFeaturesConfiguration(input.MeetingFeatures, context), - }), - ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }), - ...(input.NotificationsConfiguration != null && { - NotificationsConfiguration: se_NotificationsConfiguration(input.NotificationsConfiguration, context), - }), - ...(input.PrimaryMeetingId != null && { PrimaryMeetingId: input.PrimaryMeetingId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TenantIds != null && { TenantIds: se_TenantIdList(input.TenantIds, context) }), - }); + body = JSON.stringify( + take(input, { + Attendees: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ExternalMeetingId: [], + MediaRegion: [], + MeetingFeatures: (_) => _json(_), + MeetingHostId: [], + NotificationsConfiguration: (_) => _json(_), + PrimaryMeetingId: [], + Tags: (_) => _json(_), + TenantIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -440,11 +436,11 @@ export const se_StartMeetingTranscriptionCommand = async ( operation: [, "start"], }); let body: any; - body = JSON.stringify({ - ...(input.TranscriptionConfiguration != null && { - TranscriptionConfiguration: se_TranscriptionConfiguration(input.TranscriptionConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + TranscriptionConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -501,10 +497,12 @@ export const se_TagResourceCommand = async ( operation: [, "tag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -533,10 +531,12 @@ export const se_UntagResourceCommand = async ( operation: [, "untag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -566,9 +566,11 @@ export const se_UpdateAttendeeCapabilitiesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", () => input.MeetingId!, "{MeetingId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "AttendeeId", () => input.AttendeeId!, "{AttendeeId}", false); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -594,12 +596,11 @@ export const de_BatchCreateAttendeeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendees != null) { - contents.Attendees = de_AttendeeList(data.Attendees, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchCreateAttendeeErrorList(data.Errors, context); - } + const doc = take(data, { + Attendees: _json, + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -645,10 +646,9 @@ const de_BatchCreateAttendeeCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -704,10 +704,9 @@ const de_BatchUpdateAttendeeCapabilitiesExceptCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -727,9 +726,10 @@ export const de_CreateAttendeeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendee != null) { - contents.Attendee = de_Attendee(data.Attendee, context); - } + const doc = take(data, { + Attendee: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -775,10 +775,9 @@ const de_CreateAttendeeCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -798,9 +797,10 @@ export const de_CreateMeetingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Meeting != null) { - contents.Meeting = de_Meeting(data.Meeting, context); - } + const doc = take(data, { + Meeting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -840,10 +840,9 @@ const de_CreateMeetingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -863,15 +862,12 @@ export const de_CreateMeetingWithAttendeesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendees != null) { - contents.Attendees = de_AttendeeList(data.Attendees, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchCreateAttendeeErrorList(data.Errors, context); - } - if (data.Meeting != null) { - contents.Meeting = de_Meeting(data.Meeting, context); - } + const doc = take(data, { + Attendees: _json, + Errors: _json, + Meeting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -911,10 +907,9 @@ const de_CreateMeetingWithAttendeesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -973,10 +968,9 @@ const de_DeleteAttendeeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1035,10 +1029,9 @@ const de_DeleteMeetingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1058,9 +1051,10 @@ export const de_GetAttendeeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendee != null) { - contents.Attendee = de_Attendee(data.Attendee, context); - } + const doc = take(data, { + Attendee: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1100,10 +1094,9 @@ const de_GetAttendeeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1123,9 +1116,10 @@ export const de_GetMeetingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Meeting != null) { - contents.Meeting = de_Meeting(data.Meeting, context); - } + const doc = take(data, { + Meeting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1165,10 +1159,9 @@ const de_GetMeetingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1188,12 +1181,11 @@ export const de_ListAttendeesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendees != null) { - contents.Attendees = de_AttendeeList(data.Attendees, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attendees: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1233,10 +1225,9 @@ const de_ListAttendeesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1256,9 +1247,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1280,10 +1272,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1348,10 +1339,9 @@ const de_StartMeetingTranscriptionCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1413,10 +1403,9 @@ const de_StopMeetingTranscriptionCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1463,10 +1452,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1510,10 +1498,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,9 +1520,10 @@ export const de_UpdateAttendeeCapabilitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendee != null) { - contents.Attendee = de_Attendee(data.Attendee, context); - } + const doc = take(data, { + Attendee: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1572,31 +1560,27 @@ const de_UpdateAttendeeCapabilitiesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1610,15 +1594,12 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1632,15 +1613,12 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1657,15 +1635,12 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1679,15 +1654,12 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1704,18 +1676,13 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1732,15 +1699,12 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1759,15 +1723,12 @@ const de_ServiceUnavailableExceptionRes = async ( RetryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1781,15 +1742,12 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1806,18 +1764,13 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1834,15 +1787,12 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1859,15 +1809,12 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1875,354 +1822,61 @@ const de_UnprocessableEntityExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AttendeeCapabilities - */ -const se_AttendeeCapabilities = (input: AttendeeCapabilities, context: __SerdeContext): any => { - return { - ...(input.Audio != null && { Audio: input.Audio }), - ...(input.Content != null && { Content: input.Content }), - ...(input.Video != null && { Video: input.Video }), - }; -}; +// se_AttendeeCapabilities omitted. -/** - * serializeAws_restJson1AttendeeIdItem - */ -const se_AttendeeIdItem = (input: AttendeeIdItem, context: __SerdeContext): any => { - return { - ...(input.AttendeeId != null && { AttendeeId: input.AttendeeId }), - }; -}; +// se_AttendeeIdItem omitted. -/** - * serializeAws_restJson1AttendeeIdsList - */ -const se_AttendeeIdsList = (input: AttendeeIdItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttendeeIdItem(entry, context); - }); -}; +// se_AttendeeIdsList omitted. -/** - * serializeAws_restJson1AudioFeatures - */ -const se_AudioFeatures = (input: AudioFeatures, context: __SerdeContext): any => { - return { - ...(input.EchoReduction != null && { EchoReduction: input.EchoReduction }), - }; -}; +// se_AudioFeatures omitted. -/** - * serializeAws_restJson1CreateAttendeeRequestItem - */ -const se_CreateAttendeeRequestItem = (input: CreateAttendeeRequestItem, context: __SerdeContext): any => { - return { - ...(input.Capabilities != null && { Capabilities: se_AttendeeCapabilities(input.Capabilities, context) }), - ...(input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId }), - }; -}; +// se_CreateAttendeeRequestItem omitted. -/** - * serializeAws_restJson1CreateAttendeeRequestItemList - */ -const se_CreateAttendeeRequestItemList = (input: CreateAttendeeRequestItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAttendeeRequestItem(entry, context); - }); -}; +// se_CreateAttendeeRequestItemList omitted. -/** - * serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList - */ -const se_CreateMeetingWithAttendeesRequestItemList = ( - input: CreateAttendeeRequestItem[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAttendeeRequestItem(entry, context); - }); -}; +// se_CreateMeetingWithAttendeesRequestItemList omitted. -/** - * serializeAws_restJson1EngineTranscribeMedicalSettings - */ -const se_EngineTranscribeMedicalSettings = (input: EngineTranscribeMedicalSettings, context: __SerdeContext): any => { - return { - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Region != null && { Region: input.Region }), - ...(input.Specialty != null && { Specialty: input.Specialty }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_EngineTranscribeMedicalSettings omitted. -/** - * serializeAws_restJson1EngineTranscribeSettings - */ -const se_EngineTranscribeSettings = (input: EngineTranscribeSettings, context: __SerdeContext): any => { - return { - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.ContentRedactionType != null && { ContentRedactionType: input.ContentRedactionType }), - ...(input.EnablePartialResultsStabilization != null && { - EnablePartialResultsStabilization: input.EnablePartialResultsStabilization, - }), - ...(input.IdentifyLanguage != null && { IdentifyLanguage: input.IdentifyLanguage }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - ...(input.LanguageOptions != null && { LanguageOptions: input.LanguageOptions }), - ...(input.PartialResultsStability != null && { PartialResultsStability: input.PartialResultsStability }), - ...(input.PiiEntityTypes != null && { PiiEntityTypes: input.PiiEntityTypes }), - ...(input.PreferredLanguage != null && { PreferredLanguage: input.PreferredLanguage }), - ...(input.Region != null && { Region: input.Region }), - ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_EngineTranscribeSettings omitted. -/** - * serializeAws_restJson1MeetingFeaturesConfiguration - */ -const se_MeetingFeaturesConfiguration = (input: MeetingFeaturesConfiguration, context: __SerdeContext): any => { - return { - ...(input.Audio != null && { Audio: se_AudioFeatures(input.Audio, context) }), - }; -}; +// se_MeetingFeaturesConfiguration omitted. -/** - * serializeAws_restJson1NotificationsConfiguration - */ -const se_NotificationsConfiguration = (input: NotificationsConfiguration, context: __SerdeContext): any => { - return { - ...(input.LambdaFunctionArn != null && { LambdaFunctionArn: input.LambdaFunctionArn }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SqsQueueArn != null && { SqsQueueArn: input.SqsQueueArn }), - }; -}; +// se_NotificationsConfiguration omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1TenantIdList - */ -const se_TenantIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TenantIdList omitted. -/** - * serializeAws_restJson1TranscriptionConfiguration - */ -const se_TranscriptionConfiguration = (input: TranscriptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.EngineTranscribeMedicalSettings != null && { - EngineTranscribeMedicalSettings: se_EngineTranscribeMedicalSettings( - input.EngineTranscribeMedicalSettings, - context - ), - }), - ...(input.EngineTranscribeSettings != null && { - EngineTranscribeSettings: se_EngineTranscribeSettings(input.EngineTranscribeSettings, context), - }), - }; -}; +// se_TranscriptionConfiguration omitted. -/** - * deserializeAws_restJson1Attendee - */ -const de_Attendee = (output: any, context: __SerdeContext): Attendee => { - return { - AttendeeId: __expectString(output.AttendeeId), - Capabilities: output.Capabilities != null ? de_AttendeeCapabilities(output.Capabilities, context) : undefined, - ExternalUserId: __expectString(output.ExternalUserId), - JoinToken: __expectString(output.JoinToken), - } as any; -}; +// de_Attendee omitted. -/** - * deserializeAws_restJson1AttendeeCapabilities - */ -const de_AttendeeCapabilities = (output: any, context: __SerdeContext): AttendeeCapabilities => { - return { - Audio: __expectString(output.Audio), - Content: __expectString(output.Content), - Video: __expectString(output.Video), - } as any; -}; +// de_AttendeeCapabilities omitted. -/** - * deserializeAws_restJson1AttendeeList - */ -const de_AttendeeList = (output: any, context: __SerdeContext): Attendee[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attendee(entry, context); - }); - return retVal; -}; +// de_AttendeeList omitted. -/** - * deserializeAws_restJson1AudioFeatures - */ -const de_AudioFeatures = (output: any, context: __SerdeContext): AudioFeatures => { - return { - EchoReduction: __expectString(output.EchoReduction), - } as any; -}; +// de_AudioFeatures omitted. -/** - * deserializeAws_restJson1BatchCreateAttendeeErrorList - */ -const de_BatchCreateAttendeeErrorList = (output: any, context: __SerdeContext): CreateAttendeeError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CreateAttendeeError(entry, context); - }); - return retVal; -}; +// de_BatchCreateAttendeeErrorList omitted. -/** - * deserializeAws_restJson1CreateAttendeeError - */ -const de_CreateAttendeeError = (output: any, context: __SerdeContext): CreateAttendeeError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ExternalUserId: __expectString(output.ExternalUserId), - } as any; -}; +// de_CreateAttendeeError omitted. -/** - * deserializeAws_restJson1MediaPlacement - */ -const de_MediaPlacement = (output: any, context: __SerdeContext): MediaPlacement => { - return { - AudioFallbackUrl: __expectString(output.AudioFallbackUrl), - AudioHostUrl: __expectString(output.AudioHostUrl), - EventIngestionUrl: __expectString(output.EventIngestionUrl), - ScreenDataUrl: __expectString(output.ScreenDataUrl), - ScreenSharingUrl: __expectString(output.ScreenSharingUrl), - ScreenViewingUrl: __expectString(output.ScreenViewingUrl), - SignalingUrl: __expectString(output.SignalingUrl), - TurnControlUrl: __expectString(output.TurnControlUrl), - } as any; -}; +// de_MediaPlacement omitted. -/** - * deserializeAws_restJson1Meeting - */ -const de_Meeting = (output: any, context: __SerdeContext): Meeting => { - return { - ExternalMeetingId: __expectString(output.ExternalMeetingId), - MediaPlacement: output.MediaPlacement != null ? de_MediaPlacement(output.MediaPlacement, context) : undefined, - MediaRegion: __expectString(output.MediaRegion), - MeetingArn: __expectString(output.MeetingArn), - MeetingFeatures: - output.MeetingFeatures != null ? de_MeetingFeaturesConfiguration(output.MeetingFeatures, context) : undefined, - MeetingHostId: __expectString(output.MeetingHostId), - MeetingId: __expectString(output.MeetingId), - PrimaryMeetingId: __expectString(output.PrimaryMeetingId), - TenantIds: output.TenantIds != null ? de_TenantIdList(output.TenantIds, context) : undefined, - } as any; -}; +// de_Meeting omitted. -/** - * deserializeAws_restJson1MeetingFeaturesConfiguration - */ -const de_MeetingFeaturesConfiguration = (output: any, context: __SerdeContext): MeetingFeaturesConfiguration => { - return { - Audio: output.Audio != null ? de_AudioFeatures(output.Audio, context) : undefined, - } as any; -}; +// de_MeetingFeaturesConfiguration omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TenantIdList - */ -const de_TenantIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TenantIdList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-chime-sdk-messaging/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-messaging/src/protocols/Aws_restJson1.ts index ee7886538e08..a9f4e9f97c36 100644 --- a/clients/client-chime-sdk-messaging/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime-sdk-messaging/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -172,34 +173,24 @@ import { ChimeSDKMessagingServiceException as __BaseException } from "../models/ import { AppInstanceUserMembershipSummary, BadRequestException, - BatchChannelMemberships, - BatchCreateChannelMembershipError, Channel, - ChannelAssociatedWithFlowSummary, ChannelBan, - ChannelBanSummary, ChannelFlow, - ChannelFlowSummary, ChannelMembership, ChannelMembershipForAppInstanceUserSummary, ChannelMembershipPreferences, - ChannelMembershipSummary, ChannelMessage, ChannelMessageCallback, - ChannelMessageStatusStructure, ChannelMessageSummary, ChannelModeratedByAppInstanceUserSummary, ChannelModerator, - ChannelModeratorSummary, ChannelSummary, ConflictException, ElasticChannelConfiguration, ExpirationSettings, ForbiddenException, - Identity, LambdaConfiguration, MessageAttributeValue, - MessagingSessionEndpoint, NotFoundException, Processor, ProcessorConfiguration, @@ -210,7 +201,6 @@ import { ServiceFailureException, ServiceUnavailableException, StreamingConfiguration, - SubChannelSummary, Tag, ThrottledClientException, UnauthorizedClientException, @@ -232,9 +222,11 @@ export const se_AssociateChannelFlowCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/channel-flow"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ChannelFlowArn != null && { ChannelFlowArn: input.ChannelFlowArn }), - }); + body = JSON.stringify( + take(input, { + ChannelFlowArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -265,11 +257,13 @@ export const se_BatchCreateChannelMembershipCommand = async ( operation: [, "batch-create"], }); let body: any; - body = JSON.stringify({ - ...(input.MemberArns != null && { MemberArns: se_MemberArns(input.MemberArns, context) }), - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + MemberArns: (_) => _json(_), + SubChannelId: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -299,11 +293,13 @@ export const se_ChannelFlowCallbackCommand = async ( operation: [, "channel-flow-callback"], }); let body: any; - body = JSON.stringify({ - CallbackId: input.CallbackId ?? generateIdempotencyToken(), - ...(input.ChannelMessage != null && { ChannelMessage: se_ChannelMessageCallback(input.ChannelMessage, context) }), - ...(input.DeleteResource != null && { DeleteResource: input.DeleteResource }), - }); + body = JSON.stringify( + take(input, { + CallbackId: (_) => _ ?? generateIdempotencyToken(), + ChannelMessage: (_) => _json(_), + DeleteResource: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -330,24 +326,22 @@ export const se_CreateChannelCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels"; let body: any; - body = JSON.stringify({ - ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }), - ...(input.ChannelId != null && { ChannelId: input.ChannelId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ElasticChannelConfiguration != null && { - ElasticChannelConfiguration: se_ElasticChannelConfiguration(input.ElasticChannelConfiguration, context), - }), - ...(input.ExpirationSettings != null && { - ExpirationSettings: se_ExpirationSettings(input.ExpirationSettings, context), - }), - ...(input.MemberArns != null && { MemberArns: se_ChannelMemberArns(input.MemberArns, context) }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.ModeratorArns != null && { ModeratorArns: se_ChannelModeratorArns(input.ModeratorArns, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Privacy != null && { Privacy: input.Privacy }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppInstanceArn: [], + ChannelId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ElasticChannelConfiguration: (_) => _json(_), + ExpirationSettings: (_) => _json(_), + MemberArns: (_) => _json(_), + Metadata: [], + Mode: [], + ModeratorArns: (_) => _json(_), + Name: [], + Privacy: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -375,9 +369,11 @@ export const se_CreateChannelBanCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.MemberArn != null && { MemberArn: input.MemberArn }), - }); + body = JSON.stringify( + take(input, { + MemberArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -402,13 +398,15 @@ export const se_CreateChannelFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows"; let body: any; - body = JSON.stringify({ - ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }), - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Processors != null && { Processors: se_ProcessorList(input.Processors, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppInstanceArn: [], + ClientRequestToken: [], + Name: [], + Processors: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -436,11 +434,13 @@ export const se_CreateChannelMembershipCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.MemberArn != null && { MemberArn: input.MemberArn }), - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + MemberArn: [], + SubChannelId: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -468,9 +468,11 @@ export const se_CreateChannelModeratorCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ChannelModeratorArn != null && { ChannelModeratorArn: input.ChannelModeratorArn }), - }); + body = JSON.stringify( + take(input, { + ChannelModeratorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1456,11 +1458,11 @@ export const se_PutChannelExpirationSettingsCommand = async ( "/channels/{ChannelArn}/expiration-settings"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ExpirationSettings != null && { - ExpirationSettings: se_ExpirationSettings(input.ExpirationSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + ExpirationSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1490,9 +1492,11 @@ export const se_PutChannelMembershipPreferencesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "MemberArn", () => input.MemberArn!, "{MemberArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Preferences != null && { Preferences: se_ChannelMembershipPreferences(input.Preferences, context) }), - }); + body = JSON.stringify( + take(input, { + Preferences: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1527,11 +1531,11 @@ export const se_PutMessagingStreamingConfigurationsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.StreamingConfigurations != null && { - StreamingConfigurations: se_StreamingConfigurationList(input.StreamingConfigurations, context), - }), - }); + body = JSON.stringify( + take(input, { + StreamingConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1564,9 +1568,11 @@ export const se_RedactChannelMessageCommand = async ( operation: [, "redact"], }); let body: any; - body = JSON.stringify({ - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - }); + body = JSON.stringify( + take(input, { + SubChannelId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1598,9 +1604,11 @@ export const se_SearchChannelsCommand = async ( "next-token": [, input.NextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.Fields != null && { Fields: se_SearchFields(input.Fields, context) }), - }); + body = JSON.stringify( + take(input, { + Fields: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1629,21 +1637,19 @@ export const se_SendChannelMessageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.MessageAttributes != null && { - MessageAttributes: se_MessageAttributeMap(input.MessageAttributes, context), - }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Persistence != null && { Persistence: input.Persistence }), - ...(input.PushNotification != null && { - PushNotification: se_PushNotificationConfiguration(input.PushNotification, context), - }), - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Content: [], + ContentType: [], + MessageAttributes: (_) => _json(_), + Metadata: [], + Persistence: [], + PushNotification: (_) => _json(_), + SubChannelId: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1671,10 +1677,12 @@ export const se_TagResourceCommand = async ( operation: [, "tag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1703,10 +1711,12 @@ export const se_UntagResourceCommand = async ( operation: [, "untag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1734,11 +1744,13 @@ export const se_UpdateChannelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Mode: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1772,10 +1784,12 @@ export const se_UpdateChannelFlowCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.Processors != null && { Processors: se_ProcessorList(input.Processors, context) }), - }); + body = JSON.stringify( + take(input, { + Name: [], + Processors: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1805,12 +1819,14 @@ export const se_UpdateChannelMessageCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "MessageId", () => input.MessageId!, "{MessageId}", false); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - }); + body = JSON.stringify( + take(input, { + Content: [], + ContentType: [], + Metadata: [], + SubChannelId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1838,9 +1854,11 @@ export const se_UpdateChannelReadMarkerCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/readMarker"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - }); + body = JSON.stringify( + take(input, { + SubChannelId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1908,10 +1926,9 @@ const de_AssociateChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1931,12 +1948,11 @@ export const de_BatchCreateChannelMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BatchChannelMemberships != null) { - contents.BatchChannelMemberships = de_BatchChannelMemberships(data.BatchChannelMemberships, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchCreateChannelMembershipErrors(data.Errors, context); - } + const doc = take(data, { + BatchChannelMemberships: _json, + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1979,10 +1995,9 @@ const de_BatchCreateChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2002,12 +2017,11 @@ export const de_ChannelFlowCallbackCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CallbackId != null) { - contents.CallbackId = __expectString(data.CallbackId); - } - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } + const doc = take(data, { + CallbackId: __expectString, + ChannelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2047,10 +2061,9 @@ const de_ChannelFlowCallbackCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2070,9 +2083,10 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } + const doc = take(data, { + ChannelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2115,10 +2129,9 @@ const de_CreateChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2138,12 +2151,11 @@ export const de_CreateChannelBanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.Member != null) { - contents.Member = de_Identity(data.Member, context); - } + const doc = take(data, { + ChannelArn: __expectString, + Member: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2186,10 +2198,9 @@ const de_CreateChannelBanCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2209,9 +2220,10 @@ export const de_CreateChannelFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelFlowArn != null) { - contents.ChannelFlowArn = __expectString(data.ChannelFlowArn); - } + const doc = take(data, { + ChannelFlowArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2254,10 +2266,9 @@ const de_CreateChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2277,15 +2288,12 @@ export const de_CreateChannelMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.Member != null) { - contents.Member = de_Identity(data.Member, context); - } - if (data.SubChannelId != null) { - contents.SubChannelId = __expectString(data.SubChannelId); - } + const doc = take(data, { + ChannelArn: __expectString, + Member: _json, + SubChannelId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2331,10 +2339,9 @@ const de_CreateChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2354,12 +2361,11 @@ export const de_CreateChannelModeratorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelModerator != null) { - contents.ChannelModerator = de_Identity(data.ChannelModerator, context); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelModerator: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2402,10 +2408,9 @@ const de_CreateChannelModeratorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2461,10 +2466,9 @@ const de_DeleteChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2520,10 +2524,9 @@ const de_DeleteChannelBanCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2582,10 +2585,9 @@ const de_DeleteChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2644,10 +2646,9 @@ const de_DeleteChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2703,10 +2704,9 @@ const de_DeleteChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2762,10 +2762,9 @@ const de_DeleteChannelModeratorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2818,10 +2817,9 @@ const de_DeleteMessagingStreamingConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2841,9 +2839,10 @@ export const de_DescribeChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channel != null) { - contents.Channel = de_Channel(data.Channel, context); - } + const doc = take(data, { + Channel: (_) => de_Channel(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2880,10 +2879,9 @@ const de_DescribeChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2903,9 +2901,10 @@ export const de_DescribeChannelBanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelBan != null) { - contents.ChannelBan = de_ChannelBan(data.ChannelBan, context); - } + const doc = take(data, { + ChannelBan: (_) => de_ChannelBan(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2945,10 +2944,9 @@ const de_DescribeChannelBanCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2968,9 +2966,10 @@ export const de_DescribeChannelFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelFlow != null) { - contents.ChannelFlow = de_ChannelFlow(data.ChannelFlow, context); - } + const doc = take(data, { + ChannelFlow: (_) => de_ChannelFlow(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3007,10 +3006,9 @@ const de_DescribeChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3030,9 +3028,10 @@ export const de_DescribeChannelMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMembership != null) { - contents.ChannelMembership = de_ChannelMembership(data.ChannelMembership, context); - } + const doc = take(data, { + ChannelMembership: (_) => de_ChannelMembership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3072,10 +3071,9 @@ const de_DescribeChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3095,9 +3093,10 @@ export const de_DescribeChannelMembershipForAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMembership != null) { - contents.ChannelMembership = de_ChannelMembershipForAppInstanceUserSummary(data.ChannelMembership, context); - } + const doc = take(data, { + ChannelMembership: (_) => de_ChannelMembershipForAppInstanceUserSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3134,10 +3133,9 @@ const de_DescribeChannelMembershipForAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3157,9 +3155,10 @@ export const de_DescribeChannelModeratedByAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channel != null) { - contents.Channel = de_ChannelModeratedByAppInstanceUserSummary(data.Channel, context); - } + const doc = take(data, { + Channel: (_) => de_ChannelModeratedByAppInstanceUserSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3196,10 +3195,9 @@ const de_DescribeChannelModeratedByAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3219,9 +3217,10 @@ export const de_DescribeChannelModeratorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelModerator != null) { - contents.ChannelModerator = de_ChannelModerator(data.ChannelModerator, context); - } + const doc = take(data, { + ChannelModerator: (_) => de_ChannelModerator(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3261,10 +3260,9 @@ const de_DescribeChannelModeratorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3326,10 +3324,9 @@ const de_DisassociateChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3349,15 +3346,12 @@ export const de_GetChannelMembershipPreferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.Member != null) { - contents.Member = de_Identity(data.Member, context); - } - if (data.Preferences != null) { - contents.Preferences = de_ChannelMembershipPreferences(data.Preferences, context); - } + const doc = take(data, { + ChannelArn: __expectString, + Member: _json, + Preferences: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3394,10 +3388,9 @@ const de_GetChannelMembershipPreferencesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3417,9 +3410,10 @@ export const de_GetChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMessage != null) { - contents.ChannelMessage = de_ChannelMessage(data.ChannelMessage, context); - } + const doc = take(data, { + ChannelMessage: (_) => de_ChannelMessage(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3459,10 +3453,9 @@ const de_GetChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3482,9 +3475,10 @@ export const de_GetChannelMessageStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Status != null) { - contents.Status = de_ChannelMessageStatusStructure(data.Status, context); - } + const doc = take(data, { + Status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3521,10 +3515,9 @@ const de_GetChannelMessageStatusCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3544,9 +3537,10 @@ export const de_GetMessagingSessionEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Endpoint != null) { - contents.Endpoint = de_MessagingSessionEndpoint(data.Endpoint, context); - } + const doc = take(data, { + Endpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3580,10 +3574,9 @@ const de_GetMessagingSessionEndpointCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3603,9 +3596,10 @@ export const de_GetMessagingStreamingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingConfigurations != null) { - contents.StreamingConfigurations = de_StreamingConfigurationList(data.StreamingConfigurations, context); - } + const doc = take(data, { + StreamingConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3645,10 +3639,9 @@ const de_GetMessagingStreamingConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3668,15 +3661,12 @@ export const de_ListChannelBansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelBans != null) { - contents.ChannelBans = de_ChannelBanSummaryList(data.ChannelBans, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelBans: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3713,10 +3703,9 @@ const de_ListChannelBansCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3736,12 +3725,11 @@ export const de_ListChannelFlowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelFlows != null) { - contents.ChannelFlows = de_ChannelFlowSummaryList(data.ChannelFlows, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelFlows: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3778,10 +3766,9 @@ const de_ListChannelFlowsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3801,15 +3788,12 @@ export const de_ListChannelMembershipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelMemberships != null) { - contents.ChannelMemberships = de_ChannelMembershipSummaryList(data.ChannelMemberships, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelMemberships: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3846,10 +3830,9 @@ const de_ListChannelMembershipsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3869,12 +3852,11 @@ export const de_ListChannelMembershipsForAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMemberships != null) { - contents.ChannelMemberships = de_ChannelMembershipForAppInstanceUserSummaryList(data.ChannelMemberships, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelMemberships: (_) => de_ChannelMembershipForAppInstanceUserSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3911,10 +3893,9 @@ const de_ListChannelMembershipsForAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3934,18 +3915,13 @@ export const de_ListChannelMessagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelMessages != null) { - contents.ChannelMessages = de_ChannelMessageSummaryList(data.ChannelMessages, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SubChannelId != null) { - contents.SubChannelId = __expectString(data.SubChannelId); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelMessages: (_) => de_ChannelMessageSummaryList(_, context), + NextToken: __expectString, + SubChannelId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3982,10 +3958,9 @@ const de_ListChannelMessagesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4005,15 +3980,12 @@ export const de_ListChannelModeratorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelModerators != null) { - contents.ChannelModerators = de_ChannelModeratorSummaryList(data.ChannelModerators, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelModerators: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4050,10 +4022,9 @@ const de_ListChannelModeratorsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4073,12 +4044,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_ChannelSummaryList(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: (_) => de_ChannelSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4115,10 +4085,9 @@ const de_ListChannelsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4138,12 +4107,11 @@ export const de_ListChannelsAssociatedWithChannelFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_ChannelAssociatedWithFlowSummaryList(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4180,10 +4148,9 @@ const de_ListChannelsAssociatedWithChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4203,12 +4170,11 @@ export const de_ListChannelsModeratedByAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_ChannelModeratedByAppInstanceUserSummaryList(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: (_) => de_ChannelModeratedByAppInstanceUserSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4245,10 +4211,9 @@ const de_ListChannelsModeratedByAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4268,15 +4233,12 @@ export const de_ListSubChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SubChannels != null) { - contents.SubChannels = de_SubChannelSummaryList(data.SubChannels, context); - } + const doc = take(data, { + ChannelArn: __expectString, + NextToken: __expectString, + SubChannels: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4313,10 +4275,9 @@ const de_ListSubChannelsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4336,9 +4297,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4375,10 +4337,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4398,12 +4359,11 @@ export const de_PutChannelExpirationSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ExpirationSettings != null) { - contents.ExpirationSettings = de_ExpirationSettings(data.ExpirationSettings, context); - } + const doc = take(data, { + ChannelArn: __expectString, + ExpirationSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4443,10 +4403,9 @@ const de_PutChannelExpirationSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4466,15 +4425,12 @@ export const de_PutChannelMembershipPreferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.Member != null) { - contents.Member = de_Identity(data.Member, context); - } - if (data.Preferences != null) { - contents.Preferences = de_ChannelMembershipPreferences(data.Preferences, context); - } + const doc = take(data, { + ChannelArn: __expectString, + Member: _json, + Preferences: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4514,10 +4470,9 @@ const de_PutChannelMembershipPreferencesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4537,9 +4492,10 @@ export const de_PutMessagingStreamingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingConfigurations != null) { - contents.StreamingConfigurations = de_StreamingConfigurationList(data.StreamingConfigurations, context); - } + const doc = take(data, { + StreamingConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4582,10 +4538,9 @@ const de_PutMessagingStreamingConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4605,15 +4560,12 @@ export const de_RedactChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } - if (data.SubChannelId != null) { - contents.SubChannelId = __expectString(data.SubChannelId); - } + const doc = take(data, { + ChannelArn: __expectString, + MessageId: __expectString, + SubChannelId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4653,10 +4605,9 @@ const de_RedactChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4676,12 +4627,11 @@ export const de_SearchChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_ChannelSummaryList(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: (_) => de_ChannelSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4718,10 +4668,9 @@ const de_SearchChannelsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4741,18 +4690,13 @@ export const de_SendChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } - if (data.Status != null) { - contents.Status = de_ChannelMessageStatusStructure(data.Status, context); - } - if (data.SubChannelId != null) { - contents.SubChannelId = __expectString(data.SubChannelId); - } + const doc = take(data, { + ChannelArn: __expectString, + MessageId: __expectString, + Status: _json, + SubChannelId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4792,10 +4736,9 @@ const de_SendChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4854,10 +4797,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4913,10 +4855,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4936,9 +4877,10 @@ export const de_UpdateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } + const doc = take(data, { + ChannelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4978,10 +4920,9 @@ const de_UpdateChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5001,9 +4942,10 @@ export const de_UpdateChannelFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelFlowArn != null) { - contents.ChannelFlowArn = __expectString(data.ChannelFlowArn); - } + const doc = take(data, { + ChannelFlowArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5043,10 +4985,9 @@ const de_UpdateChannelFlowCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5066,18 +5007,13 @@ export const de_UpdateChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } - if (data.Status != null) { - contents.Status = de_ChannelMessageStatusStructure(data.Status, context); - } - if (data.SubChannelId != null) { - contents.SubChannelId = __expectString(data.SubChannelId); - } + const doc = take(data, { + ChannelArn: __expectString, + MessageId: __expectString, + Status: _json, + SubChannelId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5117,10 +5053,9 @@ const de_UpdateChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5140,12 +5075,11 @@ export const de_UpdateChannelReadMarkerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.SubChannelId != null) { - contents.SubChannelId = __expectString(data.SubChannelId); - } + const doc = take(data, { + ChannelArn: __expectString, + SubChannelId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5185,28 +5119,26 @@ const de_UpdateChannelReadMarkerCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5220,12 +5152,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5239,12 +5170,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5258,12 +5188,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5280,12 +5209,11 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5302,12 +5230,11 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5324,12 +5251,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5346,12 +5272,11 @@ const de_ThrottledClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5368,12 +5293,11 @@ const de_UnauthorizedClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5381,275 +5305,53 @@ const de_UnauthorizedClientExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ChannelMemberArns - */ -const se_ChannelMemberArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ChannelMemberArns omitted. -/** - * serializeAws_restJson1ChannelMembershipPreferences - */ -const se_ChannelMembershipPreferences = (input: ChannelMembershipPreferences, context: __SerdeContext): any => { - return { - ...(input.PushNotifications != null && { - PushNotifications: se_PushNotificationPreferences(input.PushNotifications, context), - }), - }; -}; +// se_ChannelMembershipPreferences omitted. -/** - * serializeAws_restJson1ChannelMessageCallback - */ -const se_ChannelMessageCallback = (input: ChannelMessageCallback, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.MessageAttributes != null && { - MessageAttributes: se_MessageAttributeMap(input.MessageAttributes, context), - }), - ...(input.MessageId != null && { MessageId: input.MessageId }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.PushNotification != null && { - PushNotification: se_PushNotificationConfiguration(input.PushNotification, context), - }), - ...(input.SubChannelId != null && { SubChannelId: input.SubChannelId }), - }; -}; +// se_ChannelMessageCallback omitted. -/** - * serializeAws_restJson1ChannelModeratorArns - */ -const se_ChannelModeratorArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ChannelModeratorArns omitted. -/** - * serializeAws_restJson1ElasticChannelConfiguration - */ -const se_ElasticChannelConfiguration = (input: ElasticChannelConfiguration, context: __SerdeContext): any => { - return { - ...(input.MaximumSubChannels != null && { MaximumSubChannels: input.MaximumSubChannels }), - ...(input.MinimumMembershipPercentage != null && { - MinimumMembershipPercentage: input.MinimumMembershipPercentage, - }), - ...(input.TargetMembershipsPerSubChannel != null && { - TargetMembershipsPerSubChannel: input.TargetMembershipsPerSubChannel, - }), - }; -}; +// se_ElasticChannelConfiguration omitted. -/** - * serializeAws_restJson1ExpirationSettings - */ -const se_ExpirationSettings = (input: ExpirationSettings, context: __SerdeContext): any => { - return { - ...(input.ExpirationCriterion != null && { ExpirationCriterion: input.ExpirationCriterion }), - ...(input.ExpirationDays != null && { ExpirationDays: input.ExpirationDays }), - }; -}; +// se_ExpirationSettings omitted. -/** - * serializeAws_restJson1LambdaConfiguration - */ -const se_LambdaConfiguration = (input: LambdaConfiguration, context: __SerdeContext): any => { - return { - ...(input.InvocationType != null && { InvocationType: input.InvocationType }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_LambdaConfiguration omitted. -/** - * serializeAws_restJson1MemberArns - */ -const se_MemberArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MemberArns omitted. -/** - * serializeAws_restJson1MessageAttributeMap - */ -const se_MessageAttributeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MessageAttributeValue(value, context); - return acc; - }, {}); -}; +// se_MessageAttributeMap omitted. -/** - * serializeAws_restJson1MessageAttributeStringValues - */ -const se_MessageAttributeStringValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MessageAttributeStringValues omitted. -/** - * serializeAws_restJson1MessageAttributeValue - */ -const se_MessageAttributeValue = (input: MessageAttributeValue, context: __SerdeContext): any => { - return { - ...(input.StringValues != null && { StringValues: se_MessageAttributeStringValues(input.StringValues, context) }), - }; -}; +// se_MessageAttributeValue omitted. -/** - * serializeAws_restJson1Processor - */ -const se_Processor = (input: Processor, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: se_ProcessorConfiguration(input.Configuration, context) }), - ...(input.ExecutionOrder != null && { ExecutionOrder: input.ExecutionOrder }), - ...(input.FallbackAction != null && { FallbackAction: input.FallbackAction }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_Processor omitted. -/** - * serializeAws_restJson1ProcessorConfiguration - */ -const se_ProcessorConfiguration = (input: ProcessorConfiguration, context: __SerdeContext): any => { - return { - ...(input.Lambda != null && { Lambda: se_LambdaConfiguration(input.Lambda, context) }), - }; -}; +// se_ProcessorConfiguration omitted. -/** - * serializeAws_restJson1ProcessorList - */ -const se_ProcessorList = (input: Processor[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Processor(entry, context); - }); -}; +// se_ProcessorList omitted. -/** - * serializeAws_restJson1PushNotificationConfiguration - */ -const se_PushNotificationConfiguration = (input: PushNotificationConfiguration, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_PushNotificationConfiguration omitted. -/** - * serializeAws_restJson1PushNotificationPreferences - */ -const se_PushNotificationPreferences = (input: PushNotificationPreferences, context: __SerdeContext): any => { - return { - ...(input.AllowNotifications != null && { AllowNotifications: input.AllowNotifications }), - ...(input.FilterRule != null && { FilterRule: input.FilterRule }), - }; -}; +// se_PushNotificationPreferences omitted. -/** - * serializeAws_restJson1SearchField - */ -const se_SearchField = (input: SearchField, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_SearchFieldValues(input.Values, context) }), - }; -}; +// se_SearchField omitted. -/** - * serializeAws_restJson1SearchFields - */ -const se_SearchFields = (input: SearchField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchField(entry, context); - }); -}; +// se_SearchFields omitted. -/** - * serializeAws_restJson1SearchFieldValues - */ -const se_SearchFieldValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchFieldValues omitted. -/** - * serializeAws_restJson1StreamingConfiguration - */ -const se_StreamingConfiguration = (input: StreamingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataType != null && { DataType: input.DataType }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_StreamingConfiguration omitted. -/** - * serializeAws_restJson1StreamingConfigurationList - */ -const se_StreamingConfigurationList = (input: StreamingConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StreamingConfiguration(entry, context); - }); -}; +// se_StreamingConfigurationList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. /** * deserializeAws_restJson1AppInstanceUserMembershipSummary @@ -5658,231 +5360,89 @@ const de_AppInstanceUserMembershipSummary = ( output: any, context: __SerdeContext ): AppInstanceUserMembershipSummary => { - return { - ReadMarkerTimestamp: - output.ReadMarkerTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadMarkerTimestamp))) - : undefined, - SubChannelId: __expectString(output.SubChannelId), - Type: __expectString(output.Type), - } as any; + return take(output, { + ReadMarkerTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SubChannelId: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BatchChannelMemberships - */ -const de_BatchChannelMemberships = (output: any, context: __SerdeContext): BatchChannelMemberships => { - return { - ChannelArn: __expectString(output.ChannelArn), - InvitedBy: output.InvitedBy != null ? de_Identity(output.InvitedBy, context) : undefined, - Members: output.Members != null ? de_Members(output.Members, context) : undefined, - SubChannelId: __expectString(output.SubChannelId), - Type: __expectString(output.Type), - } as any; -}; +// de_BatchChannelMemberships omitted. -/** - * deserializeAws_restJson1BatchCreateChannelMembershipError - */ -const de_BatchCreateChannelMembershipError = ( - output: any, - context: __SerdeContext -): BatchCreateChannelMembershipError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - MemberArn: __expectString(output.MemberArn), - } as any; -}; +// de_BatchCreateChannelMembershipError omitted. -/** - * deserializeAws_restJson1BatchCreateChannelMembershipErrors - */ -const de_BatchCreateChannelMembershipErrors = ( - output: any, - context: __SerdeContext -): BatchCreateChannelMembershipError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchCreateChannelMembershipError(entry, context); - }); - return retVal; -}; +// de_BatchCreateChannelMembershipErrors omitted. /** * deserializeAws_restJson1Channel */ const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - ChannelArn: __expectString(output.ChannelArn), - ChannelFlowArn: __expectString(output.ChannelFlowArn), - CreatedBy: output.CreatedBy != null ? de_Identity(output.CreatedBy, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - ElasticChannelConfiguration: - output.ElasticChannelConfiguration != null - ? de_ElasticChannelConfiguration(output.ElasticChannelConfiguration, context) - : undefined, - ExpirationSettings: - output.ExpirationSettings != null ? de_ExpirationSettings(output.ExpirationSettings, context) : undefined, - LastMessageTimestamp: - output.LastMessageTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastMessageTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Mode: __expectString(output.Mode), - Name: __expectString(output.Name), - Privacy: __expectString(output.Privacy), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelAssociatedWithFlowSummary - */ -const de_ChannelAssociatedWithFlowSummary = ( - output: any, - context: __SerdeContext -): ChannelAssociatedWithFlowSummary => { - return { - ChannelArn: __expectString(output.ChannelArn), - Metadata: __expectString(output.Metadata), - Mode: __expectString(output.Mode), - Name: __expectString(output.Name), - Privacy: __expectString(output.Privacy), - } as any; + return take(output, { + ChannelArn: __expectString, + ChannelFlowArn: __expectString, + CreatedBy: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ElasticChannelConfiguration: _json, + ExpirationSettings: _json, + LastMessageTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Mode: __expectString, + Name: __expectString, + Privacy: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ChannelAssociatedWithFlowSummaryList - */ -const de_ChannelAssociatedWithFlowSummaryList = ( - output: any, - context: __SerdeContext -): ChannelAssociatedWithFlowSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelAssociatedWithFlowSummary(entry, context); - }); - return retVal; -}; +// de_ChannelAssociatedWithFlowSummary omitted. + +// de_ChannelAssociatedWithFlowSummaryList omitted. /** * deserializeAws_restJson1ChannelBan */ const de_ChannelBan = (output: any, context: __SerdeContext): ChannelBan => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedBy: output.CreatedBy != null ? de_Identity(output.CreatedBy, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - } as any; + return take(output, { + ChannelArn: __expectString, + CreatedBy: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Member: _json, + }) as any; }; -/** - * deserializeAws_restJson1ChannelBanSummary - */ -const de_ChannelBanSummary = (output: any, context: __SerdeContext): ChannelBanSummary => { - return { - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - } as any; -}; +// de_ChannelBanSummary omitted. -/** - * deserializeAws_restJson1ChannelBanSummaryList - */ -const de_ChannelBanSummaryList = (output: any, context: __SerdeContext): ChannelBanSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelBanSummary(entry, context); - }); - return retVal; -}; +// de_ChannelBanSummaryList omitted. /** * deserializeAws_restJson1ChannelFlow */ const de_ChannelFlow = (output: any, context: __SerdeContext): ChannelFlow => { - return { - ChannelFlowArn: __expectString(output.ChannelFlowArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Name: __expectString(output.Name), - Processors: output.Processors != null ? de_ProcessorList(output.Processors, context) : undefined, - } as any; + return take(output, { + ChannelFlowArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Processors: _json, + }) as any; }; -/** - * deserializeAws_restJson1ChannelFlowSummary - */ -const de_ChannelFlowSummary = (output: any, context: __SerdeContext): ChannelFlowSummary => { - return { - ChannelFlowArn: __expectString(output.ChannelFlowArn), - Name: __expectString(output.Name), - Processors: output.Processors != null ? de_ProcessorList(output.Processors, context) : undefined, - } as any; -}; +// de_ChannelFlowSummary omitted. -/** - * deserializeAws_restJson1ChannelFlowSummaryList - */ -const de_ChannelFlowSummaryList = (output: any, context: __SerdeContext): ChannelFlowSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelFlowSummary(entry, context); - }); - return retVal; -}; +// de_ChannelFlowSummaryList omitted. /** * deserializeAws_restJson1ChannelMembership */ const de_ChannelMembership = (output: any, context: __SerdeContext): ChannelMembership => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - InvitedBy: output.InvitedBy != null ? de_Identity(output.InvitedBy, context) : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - SubChannelId: __expectString(output.SubChannelId), - Type: __expectString(output.Type), - } as any; + return take(output, { + ChannelArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InvitedBy: _json, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Member: _json, + SubChannelId: __expectString, + Type: __expectString, + }) as any; }; /** @@ -5892,13 +5452,10 @@ const de_ChannelMembershipForAppInstanceUserSummary = ( output: any, context: __SerdeContext ): ChannelMembershipForAppInstanceUserSummary => { - return { - AppInstanceUserMembershipSummary: - output.AppInstanceUserMembershipSummary != null - ? de_AppInstanceUserMembershipSummary(output.AppInstanceUserMembershipSummary, context) - : undefined, - ChannelSummary: output.ChannelSummary != null ? de_ChannelSummary(output.ChannelSummary, context) : undefined, - } as any; + return take(output, { + AppInstanceUserMembershipSummary: (_: any) => de_AppInstanceUserMembershipSummary(_, context), + ChannelSummary: (_: any) => de_ChannelSummary(_, context), + }) as any; }; /** @@ -5911,119 +5468,60 @@ const de_ChannelMembershipForAppInstanceUserSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelMembershipForAppInstanceUserSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ChannelMembershipPreferences - */ -const de_ChannelMembershipPreferences = (output: any, context: __SerdeContext): ChannelMembershipPreferences => { - return { - PushNotifications: - output.PushNotifications != null ? de_PushNotificationPreferences(output.PushNotifications, context) : undefined, - } as any; -}; +// de_ChannelMembershipPreferences omitted. -/** - * deserializeAws_restJson1ChannelMembershipSummary - */ -const de_ChannelMembershipSummary = (output: any, context: __SerdeContext): ChannelMembershipSummary => { - return { - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - } as any; -}; +// de_ChannelMembershipSummary omitted. -/** - * deserializeAws_restJson1ChannelMembershipSummaryList - */ -const de_ChannelMembershipSummaryList = (output: any, context: __SerdeContext): ChannelMembershipSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelMembershipSummary(entry, context); - }); - return retVal; -}; +// de_ChannelMembershipSummaryList omitted. /** * deserializeAws_restJson1ChannelMessage */ const de_ChannelMessage = (output: any, context: __SerdeContext): ChannelMessage => { - return { - ChannelArn: __expectString(output.ChannelArn), - Content: __expectString(output.Content), - ContentType: __expectString(output.ContentType), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastEditedTimestamp: - output.LastEditedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastEditedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - MessageAttributes: - output.MessageAttributes != null ? de_MessageAttributeMap(output.MessageAttributes, context) : undefined, - MessageId: __expectString(output.MessageId), - Metadata: __expectString(output.Metadata), - Persistence: __expectString(output.Persistence), - Redacted: __expectBoolean(output.Redacted), - Sender: output.Sender != null ? de_Identity(output.Sender, context) : undefined, - Status: output.Status != null ? de_ChannelMessageStatusStructure(output.Status, context) : undefined, - SubChannelId: __expectString(output.SubChannelId), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelMessageStatusStructure - */ -const de_ChannelMessageStatusStructure = (output: any, context: __SerdeContext): ChannelMessageStatusStructure => { - return { - Detail: __expectString(output.Detail), - Value: __expectString(output.Value), - } as any; -}; + return take(output, { + ChannelArn: __expectString, + Content: __expectString, + ContentType: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastEditedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MessageAttributes: _json, + MessageId: __expectString, + Metadata: __expectString, + Persistence: __expectString, + Redacted: __expectBoolean, + Sender: _json, + Status: _json, + SubChannelId: __expectString, + Type: __expectString, + }) as any; +}; + +// de_ChannelMessageStatusStructure omitted. /** * deserializeAws_restJson1ChannelMessageSummary */ const de_ChannelMessageSummary = (output: any, context: __SerdeContext): ChannelMessageSummary => { - return { - Content: __expectString(output.Content), - ContentType: __expectString(output.ContentType), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastEditedTimestamp: - output.LastEditedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastEditedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - MessageAttributes: - output.MessageAttributes != null ? de_MessageAttributeMap(output.MessageAttributes, context) : undefined, - MessageId: __expectString(output.MessageId), - Metadata: __expectString(output.Metadata), - Redacted: __expectBoolean(output.Redacted), - Sender: output.Sender != null ? de_Identity(output.Sender, context) : undefined, - Status: output.Status != null ? de_ChannelMessageStatusStructure(output.Status, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Content: __expectString, + ContentType: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastEditedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MessageAttributes: _json, + MessageId: __expectString, + Metadata: __expectString, + Redacted: __expectBoolean, + Sender: _json, + Status: _json, + Type: __expectString, + }) as any; }; /** @@ -6033,9 +5531,6 @@ const de_ChannelMessageSummaryList = (output: any, context: __SerdeContext): Cha const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelMessageSummary(entry, context); }); return retVal; @@ -6048,9 +5543,9 @@ const de_ChannelModeratedByAppInstanceUserSummary = ( output: any, context: __SerdeContext ): ChannelModeratedByAppInstanceUserSummary => { - return { - ChannelSummary: output.ChannelSummary != null ? de_ChannelSummary(output.ChannelSummary, context) : undefined, - } as any; + return take(output, { + ChannelSummary: (_: any) => de_ChannelSummary(_, context), + }) as any; }; /** @@ -6063,9 +5558,6 @@ const de_ChannelModeratedByAppInstanceUserSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelModeratedByAppInstanceUserSummary(entry, context); }); return retVal; @@ -6075,56 +5567,30 @@ const de_ChannelModeratedByAppInstanceUserSummaryList = ( * deserializeAws_restJson1ChannelModerator */ const de_ChannelModerator = (output: any, context: __SerdeContext): ChannelModerator => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedBy: output.CreatedBy != null ? de_Identity(output.CreatedBy, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Moderator: output.Moderator != null ? de_Identity(output.Moderator, context) : undefined, - } as any; + return take(output, { + ChannelArn: __expectString, + CreatedBy: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Moderator: _json, + }) as any; }; -/** - * deserializeAws_restJson1ChannelModeratorSummary - */ -const de_ChannelModeratorSummary = (output: any, context: __SerdeContext): ChannelModeratorSummary => { - return { - Moderator: output.Moderator != null ? de_Identity(output.Moderator, context) : undefined, - } as any; -}; +// de_ChannelModeratorSummary omitted. -/** - * deserializeAws_restJson1ChannelModeratorSummaryList - */ -const de_ChannelModeratorSummaryList = (output: any, context: __SerdeContext): ChannelModeratorSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelModeratorSummary(entry, context); - }); - return retVal; -}; +// de_ChannelModeratorSummaryList omitted. /** * deserializeAws_restJson1ChannelSummary */ const de_ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => { - return { - ChannelArn: __expectString(output.ChannelArn), - LastMessageTimestamp: - output.LastMessageTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastMessageTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Mode: __expectString(output.Mode), - Name: __expectString(output.Name), - Privacy: __expectString(output.Privacy), - } as any; + return take(output, { + ChannelArn: __expectString, + LastMessageTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Mode: __expectString, + Name: __expectString, + Privacy: __expectString, + }) as any; }; /** @@ -6134,237 +5600,48 @@ const de_ChannelSummaryList = (output: any, context: __SerdeContext): ChannelSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ElasticChannelConfiguration - */ -const de_ElasticChannelConfiguration = (output: any, context: __SerdeContext): ElasticChannelConfiguration => { - return { - MaximumSubChannels: __expectInt32(output.MaximumSubChannels), - MinimumMembershipPercentage: __expectInt32(output.MinimumMembershipPercentage), - TargetMembershipsPerSubChannel: __expectInt32(output.TargetMembershipsPerSubChannel), - } as any; -}; +// de_ElasticChannelConfiguration omitted. -/** - * deserializeAws_restJson1ExpirationSettings - */ -const de_ExpirationSettings = (output: any, context: __SerdeContext): ExpirationSettings => { - return { - ExpirationCriterion: __expectString(output.ExpirationCriterion), - ExpirationDays: __expectInt32(output.ExpirationDays), - } as any; -}; +// de_ExpirationSettings omitted. -/** - * deserializeAws_restJson1Identity - */ -const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// de_Identity omitted. -/** - * deserializeAws_restJson1LambdaConfiguration - */ -const de_LambdaConfiguration = (output: any, context: __SerdeContext): LambdaConfiguration => { - return { - InvocationType: __expectString(output.InvocationType), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_LambdaConfiguration omitted. -/** - * deserializeAws_restJson1Members - */ -const de_Members = (output: any, context: __SerdeContext): Identity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Identity(entry, context); - }); - return retVal; -}; +// de_Members omitted. -/** - * deserializeAws_restJson1MessageAttributeMap - */ -const de_MessageAttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MessageAttributeValue(value, context); - return acc; - }, {}); -}; +// de_MessageAttributeMap omitted. -/** - * deserializeAws_restJson1MessageAttributeStringValues - */ -const de_MessageAttributeStringValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MessageAttributeStringValues omitted. -/** - * deserializeAws_restJson1MessageAttributeValue - */ -const de_MessageAttributeValue = (output: any, context: __SerdeContext): MessageAttributeValue => { - return { - StringValues: - output.StringValues != null ? de_MessageAttributeStringValues(output.StringValues, context) : undefined, - } as any; -}; +// de_MessageAttributeValue omitted. -/** - * deserializeAws_restJson1MessagingSessionEndpoint - */ -const de_MessagingSessionEndpoint = (output: any, context: __SerdeContext): MessagingSessionEndpoint => { - return { - Url: __expectString(output.Url), - } as any; -}; +// de_MessagingSessionEndpoint omitted. -/** - * deserializeAws_restJson1Processor - */ -const de_Processor = (output: any, context: __SerdeContext): Processor => { - return { - Configuration: output.Configuration != null ? de_ProcessorConfiguration(output.Configuration, context) : undefined, - ExecutionOrder: __expectInt32(output.ExecutionOrder), - FallbackAction: __expectString(output.FallbackAction), - Name: __expectString(output.Name), - } as any; -}; +// de_Processor omitted. -/** - * deserializeAws_restJson1ProcessorConfiguration - */ -const de_ProcessorConfiguration = (output: any, context: __SerdeContext): ProcessorConfiguration => { - return { - Lambda: output.Lambda != null ? de_LambdaConfiguration(output.Lambda, context) : undefined, - } as any; -}; +// de_ProcessorConfiguration omitted. -/** - * deserializeAws_restJson1ProcessorList - */ -const de_ProcessorList = (output: any, context: __SerdeContext): Processor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Processor(entry, context); - }); - return retVal; -}; +// de_ProcessorList omitted. -/** - * deserializeAws_restJson1PushNotificationPreferences - */ -const de_PushNotificationPreferences = (output: any, context: __SerdeContext): PushNotificationPreferences => { - return { - AllowNotifications: __expectString(output.AllowNotifications), - FilterRule: __expectString(output.FilterRule), - } as any; -}; +// de_PushNotificationPreferences omitted. -/** - * deserializeAws_restJson1StreamingConfiguration - */ -const de_StreamingConfiguration = (output: any, context: __SerdeContext): StreamingConfiguration => { - return { - DataType: __expectString(output.DataType), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_StreamingConfiguration omitted. -/** - * deserializeAws_restJson1StreamingConfigurationList - */ -const de_StreamingConfigurationList = (output: any, context: __SerdeContext): StreamingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamingConfiguration(entry, context); - }); - return retVal; -}; +// de_StreamingConfigurationList omitted. -/** - * deserializeAws_restJson1SubChannelSummary - */ -const de_SubChannelSummary = (output: any, context: __SerdeContext): SubChannelSummary => { - return { - MembershipCount: __expectInt32(output.MembershipCount), - SubChannelId: __expectString(output.SubChannelId), - } as any; -}; +// de_SubChannelSummary omitted. -/** - * deserializeAws_restJson1SubChannelSummaryList - */ -const de_SubChannelSummaryList = (output: any, context: __SerdeContext): SubChannelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubChannelSummary(entry, context); - }); - return retVal; -}; +// de_SubChannelSummaryList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts index 38974988e8ba..c30f05e86fc8 100644 --- a/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -323,10 +325,7 @@ import { import { ChimeSDKVoiceServiceException as __BaseException } from "../models/ChimeSDKVoiceServiceException"; import { AccessDeniedException, - Address, BadRequestException, - CallDetails, - CandidateAddress, Capability, ConflictException, Credential, @@ -338,18 +337,11 @@ import { LoggingConfiguration, MediaInsightsConfiguration, NotFoundException, - OrderedPhoneNumber, Origination, OriginationRoute, - Participant, PhoneNumber, PhoneNumberAssociation, - PhoneNumberCapabilities, - PhoneNumberCountry, - PhoneNumberError, PhoneNumberOrder, - PhoneNumberType, - Proxy, ProxySession, ResourceLimitExceededException, ServerSideEncryptionConfiguration, @@ -357,7 +349,6 @@ import { ServiceUnavailableException, SipMediaApplication, SipMediaApplicationAlexaSkillConfiguration, - SipMediaApplicationCall, SipMediaApplicationEndpoint, SipMediaApplicationLoggingConfiguration, SipRule, @@ -375,7 +366,6 @@ import { UnprocessableEntityException, UpdatePhoneNumberRequestItem, VoiceConnector, - VoiceConnectorAwsRegion, VoiceConnectorGroup, VoiceConnectorItem, VoiceConnectorSettings, @@ -411,12 +401,12 @@ export const se_AssociatePhoneNumbersWithVoiceConnectorCommand = async ( operation: [, "associate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + ForceAssociate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -455,12 +445,12 @@ export const se_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async ( operation: [, "associate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + ForceAssociate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -489,9 +479,11 @@ export const se_BatchDeletePhoneNumberCommand = async ( operation: [, "batch-delete"], }); let body: any; - body = JSON.stringify({ - ...(input.PhoneNumberIds != null && { PhoneNumberIds: se_NonEmptyStringList(input.PhoneNumberIds, context) }), - }); + body = JSON.stringify( + take(input, { + PhoneNumberIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -520,11 +512,11 @@ export const se_BatchUpdatePhoneNumberCommand = async ( operation: [, "batch-update"], }); let body: any; - body = JSON.stringify({ - ...(input.UpdatePhoneNumberRequestItems != null && { - UpdatePhoneNumberRequestItems: se_UpdatePhoneNumberRequestItemList(input.UpdatePhoneNumberRequestItems, context), - }), - }); + body = JSON.stringify( + take(input, { + UpdatePhoneNumberRequestItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -550,12 +542,12 @@ export const se_CreatePhoneNumberOrderCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders"; let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + ProductType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -590,17 +582,17 @@ export const se_CreateProxySessionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }), - ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }), - ...(input.GeoMatchLevel != null && { GeoMatchLevel: input.GeoMatchLevel }), - ...(input.GeoMatchParams != null && { GeoMatchParams: se_GeoMatchParams(input.GeoMatchParams, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NumberSelectionBehavior != null && { NumberSelectionBehavior: input.NumberSelectionBehavior }), - ...(input.ParticipantPhoneNumbers != null && { - ParticipantPhoneNumbers: se_ParticipantPhoneNumberList(input.ParticipantPhoneNumbers, context), - }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + ExpiryMinutes: [], + GeoMatchLevel: [], + GeoMatchParams: (_) => _json(_), + Name: [], + NumberSelectionBehavior: [], + ParticipantPhoneNumbers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -626,12 +618,14 @@ export const se_CreateSipMediaApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications"; let body: any; - body = JSON.stringify({ - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AwsRegion: [], + Endpoints: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -666,12 +660,14 @@ export const se_CreateSipMediaApplicationCallCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ArgumentsMap != null && { ArgumentsMap: se_SMACreateCallArgumentsMap(input.ArgumentsMap, context) }), - ...(input.FromPhoneNumber != null && { FromPhoneNumber: input.FromPhoneNumber }), - ...(input.SipHeaders != null && { SipHeaders: se_SipHeadersMap(input.SipHeaders, context) }), - ...(input.ToPhoneNumber != null && { ToPhoneNumber: input.ToPhoneNumber }), - }); + body = JSON.stringify( + take(input, { + ArgumentsMap: (_) => _json(_), + FromPhoneNumber: [], + SipHeaders: (_) => _json(_), + ToPhoneNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -696,15 +692,15 @@ export const se_CreateSipRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules"; let body: any; - body = JSON.stringify({ - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetApplications != null && { - TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context), - }), - ...(input.TriggerType != null && { TriggerType: input.TriggerType }), - ...(input.TriggerValue != null && { TriggerValue: input.TriggerValue }), - }); + body = JSON.stringify( + take(input, { + Disabled: [], + Name: [], + TargetApplications: (_) => _json(_), + TriggerType: [], + TriggerValue: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -729,12 +725,14 @@ export const se_CreateVoiceConnectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors"; let body: any; - body = JSON.stringify({ - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AwsRegion: [], + Name: [], + RequireEncryption: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -760,12 +758,12 @@ export const se_CreateVoiceConnectorGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.VoiceConnectorItems != null && { - VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context), - }), - }); + body = JSON.stringify( + take(input, { + Name: [], + VoiceConnectorItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -790,9 +788,11 @@ export const se_CreateVoiceProfileCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profiles"; let body: any; - body = JSON.stringify({ - ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }), - }); + body = JSON.stringify( + take(input, { + SpeakerSearchTaskId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -817,18 +817,15 @@ export const se_CreateVoiceProfileDomainCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-profile-domains"; let body: any; - body = JSON.stringify({ - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ServerSideEncryptionConfiguration != null && { - ServerSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration( - input.ServerSideEncryptionConfiguration, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: [], + Description: [], + Name: [], + ServerSideEncryptionConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1215,9 +1212,11 @@ export const se_DeleteVoiceConnectorTerminationCredentialsCommand = async ( operation: [, "delete"], }); let body: any; - body = JSON.stringify({ - ...(input.Usernames != null && { Usernames: se_SensitiveStringList(input.Usernames, context) }), - }); + body = JSON.stringify( + take(input, { + Usernames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1318,11 +1317,11 @@ export const se_DisassociatePhoneNumbersFromVoiceConnectorCommand = async ( operation: [, "disassociate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1361,11 +1360,11 @@ export const se_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async ( operation: [, "disassociate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2479,14 +2478,11 @@ export const se_PutSipMediaApplicationAlexaSkillConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SipMediaApplicationAlexaSkillConfiguration != null && { - SipMediaApplicationAlexaSkillConfiguration: se_SipMediaApplicationAlexaSkillConfiguration( - input.SipMediaApplicationAlexaSkillConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + SipMediaApplicationAlexaSkillConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2521,14 +2517,11 @@ export const se_PutSipMediaApplicationLoggingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SipMediaApplicationLoggingConfiguration != null && { - SipMediaApplicationLoggingConfiguration: se_SipMediaApplicationLoggingConfiguration( - input.SipMediaApplicationLoggingConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + SipMediaApplicationLoggingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2563,11 +2556,11 @@ export const se_PutVoiceConnectorEmergencyCallingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EmergencyCallingConfiguration != null && { - EmergencyCallingConfiguration: se_EmergencyCallingConfiguration(input.EmergencyCallingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + EmergencyCallingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2602,11 +2595,11 @@ export const se_PutVoiceConnectorLoggingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + LoggingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2641,9 +2634,11 @@ export const se_PutVoiceConnectorOriginationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Origination != null && { Origination: se_Origination(input.Origination, context) }), - }); + body = JSON.stringify( + take(input, { + Origination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2678,16 +2673,14 @@ export const se_PutVoiceConnectorProxyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DefaultSessionExpiryMinutes != null && { - DefaultSessionExpiryMinutes: input.DefaultSessionExpiryMinutes, - }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.FallBackPhoneNumber != null && { FallBackPhoneNumber: input.FallBackPhoneNumber }), - ...(input.PhoneNumberPoolCountries != null && { - PhoneNumberPoolCountries: se_CountryList(input.PhoneNumberPoolCountries, context), - }), - }); + body = JSON.stringify( + take(input, { + DefaultSessionExpiryMinutes: [], + Disabled: [], + FallBackPhoneNumber: [], + PhoneNumberPoolCountries: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2722,11 +2715,11 @@ export const se_PutVoiceConnectorStreamingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.StreamingConfiguration != null && { - StreamingConfiguration: se_StreamingConfiguration(input.StreamingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + StreamingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2761,9 +2754,11 @@ export const se_PutVoiceConnectorTerminationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Termination != null && { Termination: se_Termination(input.Termination, context) }), - }); + body = JSON.stringify( + take(input, { + Termination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2801,9 +2796,11 @@ export const se_PutVoiceConnectorTerminationCredentialsCommand = async ( operation: [, "put"], }); let body: any; - body = JSON.stringify({ - ...(input.Credentials != null && { Credentials: se_CredentialList(input.Credentials, context) }), - }); + body = JSON.stringify( + take(input, { + Credentials: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2908,11 +2905,13 @@ export const se_StartSpeakerSearchTaskCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - ...(input.VoiceProfileDomainId != null && { VoiceProfileDomainId: input.VoiceProfileDomainId }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: [], + TransactionId: [], + VoiceProfileDomainId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2947,11 +2946,13 @@ export const se_StartVoiceToneAnalysisTaskCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: [], + LanguageCode: [], + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3067,10 +3068,12 @@ export const se_TagResourceCommand = async ( operation: [, "tag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3099,10 +3102,12 @@ export const se_UntagResourceCommand = async ( operation: [, "untag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3128,9 +3133,11 @@ export const se_UpdateGlobalSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings"; let body: any; - body = JSON.stringify({ - ...(input.VoiceConnector != null && { VoiceConnector: se_VoiceConnectorSettings(input.VoiceConnector, context) }), - }); + body = JSON.stringify( + take(input, { + VoiceConnector: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3164,10 +3171,12 @@ export const se_UpdatePhoneNumberCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CallingName != null && { CallingName: input.CallingName }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - }); + body = JSON.stringify( + take(input, { + CallingName: [], + ProductType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3192,9 +3201,11 @@ export const se_UpdatePhoneNumberSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number"; let body: any; - body = JSON.stringify({ - ...(input.CallingName != null && { CallingName: input.CallingName }), - }); + body = JSON.stringify( + take(input, { + CallingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3237,10 +3248,12 @@ export const se_UpdateProxySessionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }), - ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + ExpiryMinutes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3275,10 +3288,12 @@ export const se_UpdateSipMediaApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Endpoints: (_) => _json(_), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3321,9 +3336,11 @@ export const se_UpdateSipMediaApplicationCallCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Arguments != null && { Arguments: se_SMAUpdateCallArgumentsMap(input.Arguments, context) }), - }); + body = JSON.stringify( + take(input, { + Arguments: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3349,13 +3366,13 @@ export const se_UpdateSipRuleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId!, "{SipRuleId}", false); let body: any; - body = JSON.stringify({ - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetApplications != null && { - TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context), - }), - }); + body = JSON.stringify( + take(input, { + Disabled: [], + Name: [], + TargetApplications: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3389,10 +3406,12 @@ export const se_UpdateVoiceConnectorCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }), - }); + body = JSON.stringify( + take(input, { + Name: [], + RequireEncryption: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3427,12 +3446,12 @@ export const se_UpdateVoiceConnectorGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.VoiceConnectorItems != null && { - VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context), - }), - }); + body = JSON.stringify( + take(input, { + Name: [], + VoiceConnectorItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3466,9 +3485,11 @@ export const se_UpdateVoiceProfileCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SpeakerSearchTaskId != null && { SpeakerSearchTaskId: input.SpeakerSearchTaskId }), - }); + body = JSON.stringify( + take(input, { + SpeakerSearchTaskId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3503,10 +3524,12 @@ export const se_UpdateVoiceProfileDomainCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3532,15 +3555,17 @@ export const se_ValidateE911AddressCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/emergency-calling/address"; let body: any; - body = JSON.stringify({ - ...(input.AwsAccountId != null && { AwsAccountId: input.AwsAccountId }), - ...(input.City != null && { City: input.City }), - ...(input.Country != null && { Country: input.Country }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.State != null && { State: input.State }), - ...(input.StreetInfo != null && { StreetInfo: input.StreetInfo }), - ...(input.StreetNumber != null && { StreetNumber: input.StreetNumber }), - }); + body = JSON.stringify( + take(input, { + AwsAccountId: [], + City: [], + Country: [], + PostalCode: [], + State: [], + StreetInfo: [], + StreetNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3566,9 +3591,10 @@ export const de_AssociatePhoneNumbersWithVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3611,10 +3637,9 @@ const de_AssociatePhoneNumbersWithVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3634,9 +3659,10 @@ export const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3679,10 +3705,9 @@ const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3702,9 +3727,10 @@ export const de_BatchDeletePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3744,10 +3770,9 @@ const de_BatchDeletePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3767,9 +3792,10 @@ export const de_BatchUpdatePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3809,10 +3835,9 @@ const de_BatchUpdatePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3832,9 +3857,10 @@ export const de_CreatePhoneNumberOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberOrder != null) { - contents.PhoneNumberOrder = de_PhoneNumberOrder(data.PhoneNumberOrder, context); - } + const doc = take(data, { + PhoneNumberOrder: (_) => de_PhoneNumberOrder(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3877,10 +3903,9 @@ const de_CreatePhoneNumberOrderCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3900,9 +3925,10 @@ export const de_CreateProxySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProxySession != null) { - contents.ProxySession = de_ProxySession(data.ProxySession, context); - } + const doc = take(data, { + ProxySession: (_) => de_ProxySession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3942,10 +3968,9 @@ const de_CreateProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3965,9 +3990,10 @@ export const de_CreateSipMediaApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplication != null) { - contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context); - } + const doc = take(data, { + SipMediaApplication: (_) => de_SipMediaApplication(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4013,10 +4039,9 @@ const de_CreateSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4036,9 +4061,10 @@ export const de_CreateSipMediaApplicationCallCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationCall != null) { - contents.SipMediaApplicationCall = de_SipMediaApplicationCall(data.SipMediaApplicationCall, context); - } + const doc = take(data, { + SipMediaApplicationCall: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4081,10 +4107,9 @@ const de_CreateSipMediaApplicationCallCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4104,9 +4129,10 @@ export const de_CreateSipRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipRule != null) { - contents.SipRule = de_SipRule(data.SipRule, context); - } + const doc = take(data, { + SipRule: (_) => de_SipRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4152,10 +4178,9 @@ const de_CreateSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4175,9 +4200,10 @@ export const de_CreateVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: (_) => de_VoiceConnector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4220,10 +4246,9 @@ const de_CreateVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4243,9 +4268,10 @@ export const de_CreateVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorGroup != null) { - contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context); - } + const doc = take(data, { + VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4288,10 +4314,9 @@ const de_CreateVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4311,9 +4336,10 @@ export const de_CreateVoiceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceProfile != null) { - contents.VoiceProfile = de_VoiceProfile(data.VoiceProfile, context); - } + const doc = take(data, { + VoiceProfile: (_) => de_VoiceProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4365,10 +4391,9 @@ const de_CreateVoiceProfileCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4388,9 +4413,10 @@ export const de_CreateVoiceProfileDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceProfileDomain != null) { - contents.VoiceProfileDomain = de_VoiceProfileDomain(data.VoiceProfileDomain, context); - } + const doc = take(data, { + VoiceProfileDomain: (_) => de_VoiceProfileDomain(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4436,10 +4462,9 @@ const de_CreateVoiceProfileDomainCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4498,10 +4523,9 @@ const de_DeletePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4560,10 +4584,9 @@ const de_DeleteProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4625,10 +4648,9 @@ const de_DeleteSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4690,10 +4712,9 @@ const de_DeleteSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4755,10 +4776,9 @@ const de_DeleteVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4817,10 +4837,9 @@ const de_DeleteVoiceConnectorEmergencyCallingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4882,10 +4901,9 @@ const de_DeleteVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4944,10 +4962,9 @@ const de_DeleteVoiceConnectorOriginationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5006,10 +5023,9 @@ const de_DeleteVoiceConnectorProxyCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5068,10 +5084,9 @@ const de_DeleteVoiceConnectorStreamingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5130,10 +5145,9 @@ const de_DeleteVoiceConnectorTerminationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5192,10 +5206,9 @@ const de_DeleteVoiceConnectorTerminationCredentialsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5260,10 +5273,9 @@ const de_DeleteVoiceProfileCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5328,10 +5340,9 @@ const de_DeleteVoiceProfileDomainCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5351,9 +5362,10 @@ export const de_DisassociatePhoneNumbersFromVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5393,10 +5405,9 @@ const de_DisassociatePhoneNumbersFromVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5416,9 +5427,10 @@ export const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5458,10 +5470,9 @@ const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5481,9 +5492,10 @@ export const de_GetGlobalSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnectorSettings(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5520,10 +5532,9 @@ const de_GetGlobalSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5543,9 +5554,10 @@ export const de_GetPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumber != null) { - contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context); - } + const doc = take(data, { + PhoneNumber: (_) => de_PhoneNumber(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5585,10 +5597,9 @@ const de_GetPhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5608,9 +5619,10 @@ export const de_GetPhoneNumberOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberOrder != null) { - contents.PhoneNumberOrder = de_PhoneNumberOrder(data.PhoneNumberOrder, context); - } + const doc = take(data, { + PhoneNumberOrder: (_) => de_PhoneNumberOrder(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5650,10 +5662,9 @@ const de_GetPhoneNumberOrderCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5673,14 +5684,11 @@ export const de_GetPhoneNumberSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CallingName != null) { - contents.CallingName = __expectString(data.CallingName); - } - if (data.CallingNameUpdatedTimestamp != null) { - contents.CallingNameUpdatedTimestamp = __expectNonNull( - __parseRfc3339DateTimeWithOffset(data.CallingNameUpdatedTimestamp) - ); - } + const doc = take(data, { + CallingName: __expectString, + CallingNameUpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5717,10 +5725,9 @@ const de_GetPhoneNumberSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5740,9 +5747,10 @@ export const de_GetProxySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProxySession != null) { - contents.ProxySession = de_ProxySession(data.ProxySession, context); - } + const doc = take(data, { + ProxySession: (_) => de_ProxySession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5782,10 +5790,9 @@ const de_GetProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5805,9 +5812,10 @@ export const de_GetSipMediaApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplication != null) { - contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context); - } + const doc = take(data, { + SipMediaApplication: (_) => de_SipMediaApplication(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5847,10 +5855,9 @@ const de_GetSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5870,12 +5877,10 @@ export const de_GetSipMediaApplicationAlexaSkillConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationAlexaSkillConfiguration != null) { - contents.SipMediaApplicationAlexaSkillConfiguration = de_SipMediaApplicationAlexaSkillConfiguration( - data.SipMediaApplicationAlexaSkillConfiguration, - context - ); - } + const doc = take(data, { + SipMediaApplicationAlexaSkillConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5915,10 +5920,9 @@ const de_GetSipMediaApplicationAlexaSkillConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5938,12 +5942,10 @@ export const de_GetSipMediaApplicationLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationLoggingConfiguration != null) { - contents.SipMediaApplicationLoggingConfiguration = de_SipMediaApplicationLoggingConfiguration( - data.SipMediaApplicationLoggingConfiguration, - context - ); - } + const doc = take(data, { + SipMediaApplicationLoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5983,10 +5985,9 @@ const de_GetSipMediaApplicationLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6006,9 +6007,10 @@ export const de_GetSipRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipRule != null) { - contents.SipRule = de_SipRule(data.SipRule, context); - } + const doc = take(data, { + SipRule: (_) => de_SipRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6048,10 +6050,9 @@ const de_GetSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6071,9 +6072,10 @@ export const de_GetSpeakerSearchTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SpeakerSearchTask != null) { - contents.SpeakerSearchTask = de_SpeakerSearchTask(data.SpeakerSearchTask, context); - } + const doc = take(data, { + SpeakerSearchTask: (_) => de_SpeakerSearchTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6119,10 +6121,9 @@ const de_GetSpeakerSearchTaskCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6142,9 +6143,10 @@ export const de_GetVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: (_) => de_VoiceConnector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6184,10 +6186,9 @@ const de_GetVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6207,12 +6208,10 @@ export const de_GetVoiceConnectorEmergencyCallingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmergencyCallingConfiguration != null) { - contents.EmergencyCallingConfiguration = de_EmergencyCallingConfiguration( - data.EmergencyCallingConfiguration, - context - ); - } + const doc = take(data, { + EmergencyCallingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6252,10 +6251,9 @@ const de_GetVoiceConnectorEmergencyCallingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6275,9 +6273,10 @@ export const de_GetVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorGroup != null) { - contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context); - } + const doc = take(data, { + VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6317,10 +6316,9 @@ const de_GetVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6340,9 +6338,10 @@ export const de_GetVoiceConnectorLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoggingConfiguration != null) { - contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context); - } + const doc = take(data, { + LoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6382,10 +6381,9 @@ const de_GetVoiceConnectorLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6405,9 +6403,10 @@ export const de_GetVoiceConnectorOriginationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Origination != null) { - contents.Origination = de_Origination(data.Origination, context); - } + const doc = take(data, { + Origination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6447,10 +6446,9 @@ const de_GetVoiceConnectorOriginationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6470,9 +6468,10 @@ export const de_GetVoiceConnectorProxyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Proxy != null) { - contents.Proxy = de_Proxy(data.Proxy, context); - } + const doc = take(data, { + Proxy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6512,10 +6511,9 @@ const de_GetVoiceConnectorProxyCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6535,9 +6533,10 @@ export const de_GetVoiceConnectorStreamingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingConfiguration != null) { - contents.StreamingConfiguration = de_StreamingConfiguration(data.StreamingConfiguration, context); - } + const doc = take(data, { + StreamingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6577,10 +6576,9 @@ const de_GetVoiceConnectorStreamingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6600,9 +6598,10 @@ export const de_GetVoiceConnectorTerminationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Termination != null) { - contents.Termination = de_Termination(data.Termination, context); - } + const doc = take(data, { + Termination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6642,10 +6641,9 @@ const de_GetVoiceConnectorTerminationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6665,9 +6663,10 @@ export const de_GetVoiceConnectorTerminationHealthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TerminationHealth != null) { - contents.TerminationHealth = de_TerminationHealth(data.TerminationHealth, context); - } + const doc = take(data, { + TerminationHealth: (_) => de_TerminationHealth(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6707,10 +6706,9 @@ const de_GetVoiceConnectorTerminationHealthCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6730,9 +6728,10 @@ export const de_GetVoiceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceProfile != null) { - contents.VoiceProfile = de_VoiceProfile(data.VoiceProfile, context); - } + const doc = take(data, { + VoiceProfile: (_) => de_VoiceProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6775,10 +6774,9 @@ const de_GetVoiceProfileCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6798,9 +6796,10 @@ export const de_GetVoiceProfileDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceProfileDomain != null) { - contents.VoiceProfileDomain = de_VoiceProfileDomain(data.VoiceProfileDomain, context); - } + const doc = take(data, { + VoiceProfileDomain: (_) => de_VoiceProfileDomain(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6843,10 +6842,9 @@ const de_GetVoiceProfileDomainCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6866,9 +6864,10 @@ export const de_GetVoiceToneAnalysisTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceToneAnalysisTask != null) { - contents.VoiceToneAnalysisTask = de_VoiceToneAnalysisTask(data.VoiceToneAnalysisTask, context); - } + const doc = take(data, { + VoiceToneAnalysisTask: (_) => de_VoiceToneAnalysisTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6914,10 +6913,9 @@ const de_GetVoiceToneAnalysisTaskCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6937,9 +6935,10 @@ export const de_ListAvailableVoiceConnectorRegionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorRegions != null) { - contents.VoiceConnectorRegions = de_VoiceConnectorAwsRegionList(data.VoiceConnectorRegions, context); - } + const doc = take(data, { + VoiceConnectorRegions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6976,10 +6975,9 @@ const de_ListAvailableVoiceConnectorRegionsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6999,12 +6997,11 @@ export const de_ListPhoneNumberOrdersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PhoneNumberOrders != null) { - contents.PhoneNumberOrders = de_PhoneNumberOrderList(data.PhoneNumberOrders, context); - } + const doc = take(data, { + NextToken: __expectString, + PhoneNumberOrders: (_) => de_PhoneNumberOrderList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7041,10 +7038,9 @@ const de_ListPhoneNumberOrdersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7064,12 +7060,11 @@ export const de_ListPhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PhoneNumbers != null) { - contents.PhoneNumbers = de_PhoneNumberList(data.PhoneNumbers, context); - } + const doc = take(data, { + NextToken: __expectString, + PhoneNumbers: (_) => de_PhoneNumberList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7109,10 +7104,9 @@ const de_ListPhoneNumbersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7132,12 +7126,11 @@ export const de_ListProxySessionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProxySessions != null) { - contents.ProxySessions = de_ProxySessions(data.ProxySessions, context); - } + const doc = take(data, { + NextToken: __expectString, + ProxySessions: (_) => de_ProxySessions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7177,10 +7170,9 @@ const de_ListProxySessionsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7200,12 +7192,11 @@ export const de_ListSipMediaApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SipMediaApplications != null) { - contents.SipMediaApplications = de_SipMediaApplicationList(data.SipMediaApplications, context); - } + const doc = take(data, { + NextToken: __expectString, + SipMediaApplications: (_) => de_SipMediaApplicationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7242,10 +7233,9 @@ const de_ListSipMediaApplicationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7265,12 +7255,11 @@ export const de_ListSipRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SipRules != null) { - contents.SipRules = de_SipRuleList(data.SipRules, context); - } + const doc = take(data, { + NextToken: __expectString, + SipRules: (_) => de_SipRuleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7307,10 +7296,9 @@ const de_ListSipRulesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7330,9 +7318,10 @@ export const de_ListSupportedPhoneNumberCountriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberCountries != null) { - contents.PhoneNumberCountries = de_PhoneNumberCountriesList(data.PhoneNumberCountries, context); - } + const doc = take(data, { + PhoneNumberCountries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7372,10 +7361,9 @@ const de_ListSupportedPhoneNumberCountriesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7395,9 +7383,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7434,10 +7423,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7457,12 +7445,11 @@ export const de_ListVoiceConnectorGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VoiceConnectorGroups != null) { - contents.VoiceConnectorGroups = de_VoiceConnectorGroupList(data.VoiceConnectorGroups, context); - } + const doc = take(data, { + NextToken: __expectString, + VoiceConnectorGroups: (_) => de_VoiceConnectorGroupList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7499,10 +7486,9 @@ const de_ListVoiceConnectorGroupsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7522,12 +7508,11 @@ export const de_ListVoiceConnectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VoiceConnectors != null) { - contents.VoiceConnectors = de_VoiceConnectorList(data.VoiceConnectors, context); - } + const doc = take(data, { + NextToken: __expectString, + VoiceConnectors: (_) => de_VoiceConnectorList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7564,10 +7549,9 @@ const de_ListVoiceConnectorsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7587,9 +7571,10 @@ export const de_ListVoiceConnectorTerminationCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Usernames != null) { - contents.Usernames = de_SensitiveStringList(data.Usernames, context); - } + const doc = take(data, { + Usernames: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7629,10 +7614,9 @@ const de_ListVoiceConnectorTerminationCredentialsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7652,12 +7636,11 @@ export const de_ListVoiceProfileDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VoiceProfileDomains != null) { - contents.VoiceProfileDomains = de_VoiceProfileDomainSummaryList(data.VoiceProfileDomains, context); - } + const doc = take(data, { + NextToken: __expectString, + VoiceProfileDomains: (_) => de_VoiceProfileDomainSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7697,10 +7680,9 @@ const de_ListVoiceProfileDomainsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7720,12 +7702,11 @@ export const de_ListVoiceProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VoiceProfiles != null) { - contents.VoiceProfiles = de_VoiceProfileSummaryList(data.VoiceProfiles, context); - } + const doc = take(data, { + NextToken: __expectString, + VoiceProfiles: (_) => de_VoiceProfileSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7765,10 +7746,9 @@ const de_ListVoiceProfilesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7788,12 +7768,10 @@ export const de_PutSipMediaApplicationAlexaSkillConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationAlexaSkillConfiguration != null) { - contents.SipMediaApplicationAlexaSkillConfiguration = de_SipMediaApplicationAlexaSkillConfiguration( - data.SipMediaApplicationAlexaSkillConfiguration, - context - ); - } + const doc = take(data, { + SipMediaApplicationAlexaSkillConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7833,10 +7811,9 @@ const de_PutSipMediaApplicationAlexaSkillConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7856,12 +7833,10 @@ export const de_PutSipMediaApplicationLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationLoggingConfiguration != null) { - contents.SipMediaApplicationLoggingConfiguration = de_SipMediaApplicationLoggingConfiguration( - data.SipMediaApplicationLoggingConfiguration, - context - ); - } + const doc = take(data, { + SipMediaApplicationLoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7901,10 +7876,9 @@ const de_PutSipMediaApplicationLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7924,12 +7898,10 @@ export const de_PutVoiceConnectorEmergencyCallingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmergencyCallingConfiguration != null) { - contents.EmergencyCallingConfiguration = de_EmergencyCallingConfiguration( - data.EmergencyCallingConfiguration, - context - ); - } + const doc = take(data, { + EmergencyCallingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7969,10 +7941,9 @@ const de_PutVoiceConnectorEmergencyCallingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7992,9 +7963,10 @@ export const de_PutVoiceConnectorLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoggingConfiguration != null) { - contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context); - } + const doc = take(data, { + LoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8034,10 +8006,9 @@ const de_PutVoiceConnectorLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8057,9 +8028,10 @@ export const de_PutVoiceConnectorOriginationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Origination != null) { - contents.Origination = de_Origination(data.Origination, context); - } + const doc = take(data, { + Origination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8099,10 +8071,9 @@ const de_PutVoiceConnectorOriginationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8122,9 +8093,10 @@ export const de_PutVoiceConnectorProxyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Proxy != null) { - contents.Proxy = de_Proxy(data.Proxy, context); - } + const doc = take(data, { + Proxy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8167,10 +8139,9 @@ const de_PutVoiceConnectorProxyCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8190,9 +8161,10 @@ export const de_PutVoiceConnectorStreamingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingConfiguration != null) { - contents.StreamingConfiguration = de_StreamingConfiguration(data.StreamingConfiguration, context); - } + const doc = take(data, { + StreamingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8232,10 +8204,9 @@ const de_PutVoiceConnectorStreamingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8255,9 +8226,10 @@ export const de_PutVoiceConnectorTerminationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Termination != null) { - contents.Termination = de_Termination(data.Termination, context); - } + const doc = take(data, { + Termination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8300,10 +8272,9 @@ const de_PutVoiceConnectorTerminationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8362,10 +8333,9 @@ const de_PutVoiceConnectorTerminationCredentialsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8385,9 +8355,10 @@ export const de_RestorePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumber != null) { - contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context); - } + const doc = take(data, { + PhoneNumber: (_) => de_PhoneNumber(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8430,10 +8401,9 @@ const de_RestorePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8453,12 +8423,11 @@ export const de_SearchAvailablePhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.E164PhoneNumbers != null) { - contents.E164PhoneNumbers = de_E164PhoneNumberList(data.E164PhoneNumbers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + E164PhoneNumbers: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8498,10 +8467,9 @@ const de_SearchAvailablePhoneNumbersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8521,9 +8489,10 @@ export const de_StartSpeakerSearchTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SpeakerSearchTask != null) { - contents.SpeakerSearchTask = de_SpeakerSearchTask(data.SpeakerSearchTask, context); - } + const doc = take(data, { + SpeakerSearchTask: (_) => de_SpeakerSearchTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8578,10 +8547,9 @@ const de_StartSpeakerSearchTaskCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8601,9 +8569,10 @@ export const de_StartVoiceToneAnalysisTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceToneAnalysisTask != null) { - contents.VoiceToneAnalysisTask = de_VoiceToneAnalysisTask(data.VoiceToneAnalysisTask, context); - } + const doc = take(data, { + VoiceToneAnalysisTask: (_) => de_VoiceToneAnalysisTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8658,10 +8627,9 @@ const de_StartVoiceToneAnalysisTaskCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8729,10 +8697,9 @@ const de_StopSpeakerSearchTaskCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8800,10 +8767,9 @@ const de_StopVoiceToneAnalysisTaskCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8862,10 +8828,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8921,10 +8886,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8980,10 +8944,9 @@ const de_UpdateGlobalSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9003,9 +8966,10 @@ export const de_UpdatePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumber != null) { - contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context); - } + const doc = take(data, { + PhoneNumber: (_) => de_PhoneNumber(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9048,10 +9012,9 @@ const de_UpdatePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9107,10 +9070,9 @@ const de_UpdatePhoneNumberSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9130,9 +9092,10 @@ export const de_UpdateProxySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProxySession != null) { - contents.ProxySession = de_ProxySession(data.ProxySession, context); - } + const doc = take(data, { + ProxySession: (_) => de_ProxySession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9172,10 +9135,9 @@ const de_UpdateProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9195,9 +9157,10 @@ export const de_UpdateSipMediaApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplication != null) { - contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context); - } + const doc = take(data, { + SipMediaApplication: (_) => de_SipMediaApplication(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9240,10 +9203,9 @@ const de_UpdateSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9263,9 +9225,10 @@ export const de_UpdateSipMediaApplicationCallCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationCall != null) { - contents.SipMediaApplicationCall = de_SipMediaApplicationCall(data.SipMediaApplicationCall, context); - } + const doc = take(data, { + SipMediaApplicationCall: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9308,10 +9271,9 @@ const de_UpdateSipMediaApplicationCallCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9331,9 +9293,10 @@ export const de_UpdateSipRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipRule != null) { - contents.SipRule = de_SipRule(data.SipRule, context); - } + const doc = take(data, { + SipRule: (_) => de_SipRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9379,10 +9342,9 @@ const de_UpdateSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9402,9 +9364,10 @@ export const de_UpdateVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: (_) => de_VoiceConnector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9444,10 +9407,9 @@ const de_UpdateVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9467,9 +9429,10 @@ export const de_UpdateVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorGroup != null) { - contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context); - } + const doc = take(data, { + VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9512,10 +9475,9 @@ const de_UpdateVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9535,9 +9497,10 @@ export const de_UpdateVoiceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceProfile != null) { - contents.VoiceProfile = de_VoiceProfile(data.VoiceProfile, context); - } + const doc = take(data, { + VoiceProfile: (_) => de_VoiceProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9586,10 +9549,9 @@ const de_UpdateVoiceProfileCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9609,9 +9571,10 @@ export const de_UpdateVoiceProfileDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceProfileDomain != null) { - contents.VoiceProfileDomain = de_VoiceProfileDomain(data.VoiceProfileDomain, context); - } + const doc = take(data, { + VoiceProfileDomain: (_) => de_VoiceProfileDomain(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9654,10 +9617,9 @@ const de_UpdateVoiceProfileDomainCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9677,18 +9639,13 @@ export const de_ValidateE911AddressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Address != null) { - contents.Address = de_Address(data.Address, context); - } - if (data.AddressExternalId != null) { - contents.AddressExternalId = __expectString(data.AddressExternalId); - } - if (data.CandidateAddressList != null) { - contents.CandidateAddressList = de_CandidateAddressList(data.CandidateAddressList, context); - } - if (data.ValidationResult != null) { - contents.ValidationResult = __expectInt32(data.ValidationResult); - } + const doc = take(data, { + Address: _json, + AddressExternalId: __expectString, + CandidateAddressList: _json, + ValidationResult: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -9728,16 +9685,15 @@ const de_ValidateE911AddressCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -9747,12 +9703,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9766,12 +9721,11 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9785,12 +9739,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9804,12 +9757,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9823,12 +9775,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_GoneExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new GoneException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9842,12 +9793,11 @@ const de_GoneExceptionRes = async (parsedOutput: any, context: __SerdeContext): const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9864,12 +9814,11 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9886,12 +9835,11 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9908,12 +9856,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9930,12 +9877,11 @@ const de_ThrottledClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9952,12 +9898,11 @@ const de_UnauthorizedClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9974,12 +9919,11 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -9987,801 +9931,163 @@ const de_UnprocessableEntityExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AlexaSkillIdList - */ -const se_AlexaSkillIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AlexaSkillIdList omitted. -/** - * serializeAws_restJson1CallingRegionList - */ -const se_CallingRegionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CallingRegionList omitted. -/** - * serializeAws_restJson1CapabilityList - */ -const se_CapabilityList = (input: (Capability | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CapabilityList omitted. -/** - * serializeAws_restJson1CountryList - */ -const se_CountryList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CountryList omitted. -/** - * serializeAws_restJson1Credential - */ -const se_Credential = (input: Credential, context: __SerdeContext): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_Credential omitted. -/** - * serializeAws_restJson1CredentialList - */ -const se_CredentialList = (input: Credential[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Credential(entry, context); - }); -}; +// se_CredentialList omitted. -/** - * serializeAws_restJson1DNISEmergencyCallingConfiguration - */ -const se_DNISEmergencyCallingConfiguration = ( - input: DNISEmergencyCallingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CallingCountry != null && { CallingCountry: input.CallingCountry }), - ...(input.EmergencyPhoneNumber != null && { EmergencyPhoneNumber: input.EmergencyPhoneNumber }), - ...(input.TestPhoneNumber != null && { TestPhoneNumber: input.TestPhoneNumber }), - }; -}; +// se_DNISEmergencyCallingConfiguration omitted. -/** - * serializeAws_restJson1DNISEmergencyCallingConfigurationList - */ -const se_DNISEmergencyCallingConfigurationList = ( - input: DNISEmergencyCallingConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DNISEmergencyCallingConfiguration(entry, context); - }); -}; +// se_DNISEmergencyCallingConfigurationList omitted. -/** - * serializeAws_restJson1E164PhoneNumberList - */ -const se_E164PhoneNumberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_E164PhoneNumberList omitted. -/** - * serializeAws_restJson1EmergencyCallingConfiguration - */ -const se_EmergencyCallingConfiguration = (input: EmergencyCallingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DNIS != null && { DNIS: se_DNISEmergencyCallingConfigurationList(input.DNIS, context) }), - }; -}; +// se_EmergencyCallingConfiguration omitted. -/** - * serializeAws_restJson1GeoMatchParams - */ -const se_GeoMatchParams = (input: GeoMatchParams, context: __SerdeContext): any => { - return { - ...(input.AreaCode != null && { AreaCode: input.AreaCode }), - ...(input.Country != null && { Country: input.Country }), - }; -}; +// se_GeoMatchParams omitted. -/** - * serializeAws_restJson1LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.EnableMediaMetricLogs != null && { EnableMediaMetricLogs: input.EnableMediaMetricLogs }), - ...(input.EnableSIPLogs != null && { EnableSIPLogs: input.EnableSIPLogs }), - }; -}; +// se_LoggingConfiguration omitted. -/** - * serializeAws_restJson1MediaInsightsConfiguration - */ -const se_MediaInsightsConfiguration = (input: MediaInsightsConfiguration, context: __SerdeContext): any => { - return { - ...(input.ConfigurationArn != null && { ConfigurationArn: input.ConfigurationArn }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - }; -}; +// se_MediaInsightsConfiguration omitted. -/** - * serializeAws_restJson1NonEmptyStringList - */ -const se_NonEmptyStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NonEmptyStringList omitted. -/** - * serializeAws_restJson1Origination - */ -const se_Origination = (input: Origination, context: __SerdeContext): any => { - return { - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Routes != null && { Routes: se_OriginationRouteList(input.Routes, context) }), - }; -}; +// se_Origination omitted. -/** - * serializeAws_restJson1OriginationRoute - */ -const se_OriginationRoute = (input: OriginationRoute, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.Weight != null && { Weight: input.Weight }), - }; -}; +// se_OriginationRoute omitted. -/** - * serializeAws_restJson1OriginationRouteList - */ -const se_OriginationRouteList = (input: OriginationRoute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OriginationRoute(entry, context); - }); -}; +// se_OriginationRouteList omitted. -/** - * serializeAws_restJson1ParticipantPhoneNumberList - */ -const se_ParticipantPhoneNumberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ParticipantPhoneNumberList omitted. -/** - * serializeAws_restJson1SensitiveStringList - */ -const se_SensitiveStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SensitiveStringList omitted. -/** - * serializeAws_restJson1ServerSideEncryptionConfiguration - */ -const se_ServerSideEncryptionConfiguration = ( - input: ServerSideEncryptionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }; -}; +// se_ServerSideEncryptionConfiguration omitted. -/** - * serializeAws_restJson1SipHeadersMap - */ -const se_SipHeadersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SipHeadersMap omitted. -/** - * serializeAws_restJson1SipMediaApplicationAlexaSkillConfiguration - */ -const se_SipMediaApplicationAlexaSkillConfiguration = ( - input: SipMediaApplicationAlexaSkillConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AlexaSkillIds != null && { AlexaSkillIds: se_AlexaSkillIdList(input.AlexaSkillIds, context) }), - ...(input.AlexaSkillStatus != null && { AlexaSkillStatus: input.AlexaSkillStatus }), - }; -}; +// se_SipMediaApplicationAlexaSkillConfiguration omitted. -/** - * serializeAws_restJson1SipMediaApplicationEndpoint - */ -const se_SipMediaApplicationEndpoint = (input: SipMediaApplicationEndpoint, context: __SerdeContext): any => { - return { - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - }; -}; +// se_SipMediaApplicationEndpoint omitted. -/** - * serializeAws_restJson1SipMediaApplicationEndpointList - */ -const se_SipMediaApplicationEndpointList = (input: SipMediaApplicationEndpoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SipMediaApplicationEndpoint(entry, context); - }); -}; +// se_SipMediaApplicationEndpointList omitted. -/** - * serializeAws_restJson1SipMediaApplicationLoggingConfiguration - */ -const se_SipMediaApplicationLoggingConfiguration = ( - input: SipMediaApplicationLoggingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.EnableSipMediaApplicationMessageLogs != null && { - EnableSipMediaApplicationMessageLogs: input.EnableSipMediaApplicationMessageLogs, - }), - }; -}; +// se_SipMediaApplicationLoggingConfiguration omitted. -/** - * serializeAws_restJson1SipRuleTargetApplication - */ -const se_SipRuleTargetApplication = (input: SipRuleTargetApplication, context: __SerdeContext): any => { - return { - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.SipMediaApplicationId != null && { SipMediaApplicationId: input.SipMediaApplicationId }), - }; -}; +// se_SipRuleTargetApplication omitted. -/** - * serializeAws_restJson1SipRuleTargetApplicationList - */ -const se_SipRuleTargetApplicationList = (input: SipRuleTargetApplication[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SipRuleTargetApplication(entry, context); - }); -}; +// se_SipRuleTargetApplicationList omitted. -/** - * serializeAws_restJson1SMACreateCallArgumentsMap - */ -const se_SMACreateCallArgumentsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SMACreateCallArgumentsMap omitted. -/** - * serializeAws_restJson1SMAUpdateCallArgumentsMap - */ -const se_SMAUpdateCallArgumentsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SMAUpdateCallArgumentsMap omitted. -/** - * serializeAws_restJson1StreamingConfiguration - */ -const se_StreamingConfiguration = (input: StreamingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataRetentionInHours != null && { DataRetentionInHours: input.DataRetentionInHours }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.MediaInsightsConfiguration != null && { - MediaInsightsConfiguration: se_MediaInsightsConfiguration(input.MediaInsightsConfiguration, context), - }), - ...(input.StreamingNotificationTargets != null && { - StreamingNotificationTargets: se_StreamingNotificationTargetList(input.StreamingNotificationTargets, context), - }), - }; -}; +// se_StreamingConfiguration omitted. -/** - * serializeAws_restJson1StreamingNotificationTarget - */ -const se_StreamingNotificationTarget = (input: StreamingNotificationTarget, context: __SerdeContext): any => { - return { - ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }), - }; -}; +// se_StreamingNotificationTarget omitted. -/** - * serializeAws_restJson1StreamingNotificationTargetList - */ -const se_StreamingNotificationTargetList = (input: StreamingNotificationTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StreamingNotificationTarget(entry, context); - }); -}; +// se_StreamingNotificationTargetList omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1Termination - */ -const se_Termination = (input: Termination, context: __SerdeContext): any => { - return { - ...(input.CallingRegions != null && { CallingRegions: se_CallingRegionList(input.CallingRegions, context) }), - ...(input.CidrAllowedList != null && { CidrAllowedList: se_StringList(input.CidrAllowedList, context) }), - ...(input.CpsLimit != null && { CpsLimit: input.CpsLimit }), - ...(input.DefaultPhoneNumber != null && { DefaultPhoneNumber: input.DefaultPhoneNumber }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - }; -}; +// se_Termination omitted. -/** - * serializeAws_restJson1UpdatePhoneNumberRequestItem - */ -const se_UpdatePhoneNumberRequestItem = (input: UpdatePhoneNumberRequestItem, context: __SerdeContext): any => { - return { - ...(input.CallingName != null && { CallingName: input.CallingName }), - ...(input.PhoneNumberId != null && { PhoneNumberId: input.PhoneNumberId }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - }; -}; +// se_UpdatePhoneNumberRequestItem omitted. -/** - * serializeAws_restJson1UpdatePhoneNumberRequestItemList - */ -const se_UpdatePhoneNumberRequestItemList = (input: UpdatePhoneNumberRequestItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdatePhoneNumberRequestItem(entry, context); - }); -}; +// se_UpdatePhoneNumberRequestItemList omitted. -/** - * serializeAws_restJson1VoiceConnectorItem - */ -const se_VoiceConnectorItem = (input: VoiceConnectorItem, context: __SerdeContext): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.VoiceConnectorId != null && { VoiceConnectorId: input.VoiceConnectorId }), - }; -}; +// se_VoiceConnectorItem omitted. -/** - * serializeAws_restJson1VoiceConnectorItemList - */ -const se_VoiceConnectorItemList = (input: VoiceConnectorItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VoiceConnectorItem(entry, context); - }); -}; +// se_VoiceConnectorItemList omitted. -/** - * serializeAws_restJson1VoiceConnectorSettings - */ -const se_VoiceConnectorSettings = (input: VoiceConnectorSettings, context: __SerdeContext): any => { - return { - ...(input.CdrBucket != null && { CdrBucket: input.CdrBucket }), - }; -}; +// se_VoiceConnectorSettings omitted. -/** - * deserializeAws_restJson1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - city: __expectString(output.city), - country: __expectString(output.country), - postDirectional: __expectString(output.postDirectional), - postalCode: __expectString(output.postalCode), - postalCodePlus4: __expectString(output.postalCodePlus4), - preDirectional: __expectString(output.preDirectional), - state: __expectString(output.state), - streetName: __expectString(output.streetName), - streetNumber: __expectString(output.streetNumber), - streetSuffix: __expectString(output.streetSuffix), - } as any; -}; +// de_Address omitted. -/** - * deserializeAws_restJson1AlexaSkillIdList - */ -const de_AlexaSkillIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AlexaSkillIdList omitted. -/** - * deserializeAws_restJson1CallDetails - */ -const de_CallDetails = (output: any, context: __SerdeContext): CallDetails => { - return { - IsCaller: __expectBoolean(output.IsCaller), - TransactionId: __expectString(output.TransactionId), - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; -}; +// de_CallDetails omitted. -/** - * deserializeAws_restJson1CallingRegionList - */ -const de_CallingRegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CallingRegionList omitted. -/** - * deserializeAws_restJson1CandidateAddress - */ -const de_CandidateAddress = (output: any, context: __SerdeContext): CandidateAddress => { - return { - city: __expectString(output.city), - country: __expectString(output.country), - postalCode: __expectString(output.postalCode), - postalCodePlus4: __expectString(output.postalCodePlus4), - state: __expectString(output.state), - streetInfo: __expectString(output.streetInfo), - streetNumber: __expectString(output.streetNumber), - } as any; -}; +// de_CandidateAddress omitted. -/** - * deserializeAws_restJson1CandidateAddressList - */ -const de_CandidateAddressList = (output: any, context: __SerdeContext): CandidateAddress[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CandidateAddress(entry, context); - }); - return retVal; -}; +// de_CandidateAddressList omitted. -/** - * deserializeAws_restJson1CapabilityList - */ -const de_CapabilityList = (output: any, context: __SerdeContext): (Capability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CapabilityList omitted. -/** - * deserializeAws_restJson1DNISEmergencyCallingConfiguration - */ -const de_DNISEmergencyCallingConfiguration = ( - output: any, - context: __SerdeContext -): DNISEmergencyCallingConfiguration => { - return { - CallingCountry: __expectString(output.CallingCountry), - EmergencyPhoneNumber: __expectString(output.EmergencyPhoneNumber), - TestPhoneNumber: __expectString(output.TestPhoneNumber), - } as any; -}; +// de_DNISEmergencyCallingConfiguration omitted. -/** - * deserializeAws_restJson1DNISEmergencyCallingConfigurationList - */ -const de_DNISEmergencyCallingConfigurationList = ( - output: any, - context: __SerdeContext -): DNISEmergencyCallingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DNISEmergencyCallingConfiguration(entry, context); - }); - return retVal; -}; +// de_DNISEmergencyCallingConfigurationList omitted. -/** - * deserializeAws_restJson1E164PhoneNumberList - */ -const de_E164PhoneNumberList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_E164PhoneNumberList omitted. -/** - * deserializeAws_restJson1EmergencyCallingConfiguration - */ -const de_EmergencyCallingConfiguration = (output: any, context: __SerdeContext): EmergencyCallingConfiguration => { - return { - DNIS: output.DNIS != null ? de_DNISEmergencyCallingConfigurationList(output.DNIS, context) : undefined, - } as any; -}; +// de_EmergencyCallingConfiguration omitted. -/** - * deserializeAws_restJson1GeoMatchParams - */ -const de_GeoMatchParams = (output: any, context: __SerdeContext): GeoMatchParams => { - return { - AreaCode: __expectString(output.AreaCode), - Country: __expectString(output.Country), - } as any; -}; +// de_GeoMatchParams omitted. -/** - * deserializeAws_restJson1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - EnableMediaMetricLogs: __expectBoolean(output.EnableMediaMetricLogs), - EnableSIPLogs: __expectBoolean(output.EnableSIPLogs), - } as any; -}; +// de_LoggingConfiguration omitted. -/** - * deserializeAws_restJson1MediaInsightsConfiguration - */ -const de_MediaInsightsConfiguration = (output: any, context: __SerdeContext): MediaInsightsConfiguration => { - return { - ConfigurationArn: __expectString(output.ConfigurationArn), - Disabled: __expectBoolean(output.Disabled), - } as any; -}; +// de_MediaInsightsConfiguration omitted. -/** - * deserializeAws_restJson1OrderedPhoneNumber - */ -const de_OrderedPhoneNumber = (output: any, context: __SerdeContext): OrderedPhoneNumber => { - return { - E164PhoneNumber: __expectString(output.E164PhoneNumber), - Status: __expectString(output.Status), - } as any; -}; +// de_OrderedPhoneNumber omitted. -/** - * deserializeAws_restJson1OrderedPhoneNumberList - */ -const de_OrderedPhoneNumberList = (output: any, context: __SerdeContext): OrderedPhoneNumber[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrderedPhoneNumber(entry, context); - }); - return retVal; -}; +// de_OrderedPhoneNumberList omitted. -/** - * deserializeAws_restJson1Origination - */ -const de_Origination = (output: any, context: __SerdeContext): Origination => { - return { - Disabled: __expectBoolean(output.Disabled), - Routes: output.Routes != null ? de_OriginationRouteList(output.Routes, context) : undefined, - } as any; -}; +// de_Origination omitted. -/** - * deserializeAws_restJson1OriginationRoute - */ -const de_OriginationRoute = (output: any, context: __SerdeContext): OriginationRoute => { - return { - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - Priority: __expectInt32(output.Priority), - Protocol: __expectString(output.Protocol), - Weight: __expectInt32(output.Weight), - } as any; -}; +// de_OriginationRoute omitted. -/** - * deserializeAws_restJson1OriginationRouteList - */ -const de_OriginationRouteList = (output: any, context: __SerdeContext): OriginationRoute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OriginationRoute(entry, context); - }); - return retVal; -}; +// de_OriginationRouteList omitted. -/** - * deserializeAws_restJson1Participant - */ -const de_Participant = (output: any, context: __SerdeContext): Participant => { - return { - PhoneNumber: __expectString(output.PhoneNumber), - ProxyPhoneNumber: __expectString(output.ProxyPhoneNumber), - } as any; -}; +// de_Participant omitted. -/** - * deserializeAws_restJson1Participants - */ -const de_Participants = (output: any, context: __SerdeContext): Participant[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Participant(entry, context); - }); - return retVal; -}; +// de_Participants omitted. /** * deserializeAws_restJson1PhoneNumber */ const de_PhoneNumber = (output: any, context: __SerdeContext): PhoneNumber => { - return { - Associations: output.Associations != null ? de_PhoneNumberAssociationList(output.Associations, context) : undefined, - CallingName: __expectString(output.CallingName), - CallingNameStatus: __expectString(output.CallingNameStatus), - Capabilities: output.Capabilities != null ? de_PhoneNumberCapabilities(output.Capabilities, context) : undefined, - Country: __expectString(output.Country), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - DeletionTimestamp: - output.DeletionTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.DeletionTimestamp)) - : undefined, - E164PhoneNumber: __expectString(output.E164PhoneNumber), - OrderId: __expectString(output.OrderId), - PhoneNumberId: __expectString(output.PhoneNumberId), - ProductType: __expectString(output.ProductType), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + Associations: (_: any) => de_PhoneNumberAssociationList(_, context), + CallingName: __expectString, + CallingNameStatus: __expectString, + Capabilities: _json, + Country: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DeletionTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + E164PhoneNumber: __expectString, + OrderId: __expectString, + PhoneNumberId: __expectString, + ProductType: __expectString, + Status: __expectString, + Type: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1PhoneNumberAssociation */ const de_PhoneNumberAssociation = (output: any, context: __SerdeContext): PhoneNumberAssociation => { - return { - AssociatedTimestamp: - output.AssociatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.AssociatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; + return take(output, { + AssociatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + Value: __expectString, + }) as any; }; /** @@ -10791,81 +10097,20 @@ const de_PhoneNumberAssociationList = (output: any, context: __SerdeContext): Ph const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumberAssociation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PhoneNumberCapabilities - */ -const de_PhoneNumberCapabilities = (output: any, context: __SerdeContext): PhoneNumberCapabilities => { - return { - InboundCall: __expectBoolean(output.InboundCall), - InboundMMS: __expectBoolean(output.InboundMMS), - InboundSMS: __expectBoolean(output.InboundSMS), - OutboundCall: __expectBoolean(output.OutboundCall), - OutboundMMS: __expectBoolean(output.OutboundMMS), - OutboundSMS: __expectBoolean(output.OutboundSMS), - } as any; -}; +// de_PhoneNumberCapabilities omitted. -/** - * deserializeAws_restJson1PhoneNumberCountriesList - */ -const de_PhoneNumberCountriesList = (output: any, context: __SerdeContext): PhoneNumberCountry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumberCountry(entry, context); - }); - return retVal; -}; +// de_PhoneNumberCountriesList omitted. -/** - * deserializeAws_restJson1PhoneNumberCountry - */ -const de_PhoneNumberCountry = (output: any, context: __SerdeContext): PhoneNumberCountry => { - return { - CountryCode: __expectString(output.CountryCode), - SupportedPhoneNumberTypes: - output.SupportedPhoneNumberTypes != null - ? de_PhoneNumberTypeList(output.SupportedPhoneNumberTypes, context) - : undefined, - } as any; -}; +// de_PhoneNumberCountry omitted. -/** - * deserializeAws_restJson1PhoneNumberError - */ -const de_PhoneNumberError = (output: any, context: __SerdeContext): PhoneNumberError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - PhoneNumberId: __expectString(output.PhoneNumberId), - } as any; -}; +// de_PhoneNumberError omitted. -/** - * deserializeAws_restJson1PhoneNumberErrorList - */ -const de_PhoneNumberErrorList = (output: any, context: __SerdeContext): PhoneNumberError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumberError(entry, context); - }); - return retVal; -}; +// de_PhoneNumberErrorList omitted. /** * deserializeAws_restJson1PhoneNumberList @@ -10874,9 +10119,6 @@ const de_PhoneNumberList = (output: any, context: __SerdeContext): PhoneNumber[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumber(entry, context); }); return retVal; @@ -10886,22 +10128,15 @@ const de_PhoneNumberList = (output: any, context: __SerdeContext): PhoneNumber[] * deserializeAws_restJson1PhoneNumberOrder */ const de_PhoneNumberOrder = (output: any, context: __SerdeContext): PhoneNumberOrder => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - OrderType: __expectString(output.OrderType), - OrderedPhoneNumbers: - output.OrderedPhoneNumbers != null ? de_OrderedPhoneNumberList(output.OrderedPhoneNumbers, context) : undefined, - PhoneNumberOrderId: __expectString(output.PhoneNumberOrderId), - ProductType: __expectString(output.ProductType), - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + OrderType: __expectString, + OrderedPhoneNumbers: _json, + PhoneNumberOrderId: __expectString, + ProductType: __expectString, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -10911,70 +10146,34 @@ const de_PhoneNumberOrderList = (output: any, context: __SerdeContext): PhoneNum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumberOrder(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PhoneNumberTypeList - */ -const de_PhoneNumberTypeList = (output: any, context: __SerdeContext): (PhoneNumberType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PhoneNumberTypeList omitted. -/** - * deserializeAws_restJson1Proxy - */ -const de_Proxy = (output: any, context: __SerdeContext): Proxy => { - return { - DefaultSessionExpiryMinutes: __expectInt32(output.DefaultSessionExpiryMinutes), - Disabled: __expectBoolean(output.Disabled), - FallBackPhoneNumber: __expectString(output.FallBackPhoneNumber), - PhoneNumberCountries: - output.PhoneNumberCountries != null ? de_StringList(output.PhoneNumberCountries, context) : undefined, - } as any; -}; +// de_Proxy omitted. /** * deserializeAws_restJson1ProxySession */ const de_ProxySession = (output: any, context: __SerdeContext): ProxySession => { - return { - Capabilities: output.Capabilities != null ? de_CapabilityList(output.Capabilities, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - EndedTimestamp: - output.EndedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndedTimestamp)) - : undefined, - ExpiryMinutes: __expectInt32(output.ExpiryMinutes), - GeoMatchLevel: __expectString(output.GeoMatchLevel), - GeoMatchParams: output.GeoMatchParams != null ? de_GeoMatchParams(output.GeoMatchParams, context) : undefined, - Name: __expectString(output.Name), - NumberSelectionBehavior: __expectString(output.NumberSelectionBehavior), - Participants: output.Participants != null ? de_Participants(output.Participants, context) : undefined, - ProxySessionId: __expectString(output.ProxySessionId), - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; + return take(output, { + Capabilities: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + EndedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExpiryMinutes: __expectInt32, + GeoMatchLevel: __expectString, + GeoMatchParams: _json, + Name: __expectString, + NumberSelectionBehavior: __expectString, + Participants: _json, + ProxySessionId: __expectString, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceConnectorId: __expectString, + }) as any; }; /** @@ -10984,107 +10183,37 @@ const de_ProxySessions = (output: any, context: __SerdeContext): ProxySession[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProxySession(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SensitiveStringList - */ -const de_SensitiveStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SensitiveStringList omitted. -/** - * deserializeAws_restJson1ServerSideEncryptionConfiguration - */ -const de_ServerSideEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): ServerSideEncryptionConfiguration => { - return { - KmsKeyArn: __expectString(output.KmsKeyArn), - } as any; -}; +// de_ServerSideEncryptionConfiguration omitted. /** * deserializeAws_restJson1SipMediaApplication */ const de_SipMediaApplication = (output: any, context: __SerdeContext): SipMediaApplication => { - return { - AwsRegion: __expectString(output.AwsRegion), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Endpoints: output.Endpoints != null ? de_SipMediaApplicationEndpointList(output.Endpoints, context) : undefined, - Name: __expectString(output.Name), - SipMediaApplicationArn: __expectString(output.SipMediaApplicationArn), - SipMediaApplicationId: __expectString(output.SipMediaApplicationId), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + AwsRegion: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Endpoints: _json, + Name: __expectString, + SipMediaApplicationArn: __expectString, + SipMediaApplicationId: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1SipMediaApplicationAlexaSkillConfiguration - */ -const de_SipMediaApplicationAlexaSkillConfiguration = ( - output: any, - context: __SerdeContext -): SipMediaApplicationAlexaSkillConfiguration => { - return { - AlexaSkillIds: output.AlexaSkillIds != null ? de_AlexaSkillIdList(output.AlexaSkillIds, context) : undefined, - AlexaSkillStatus: __expectString(output.AlexaSkillStatus), - } as any; -}; +// de_SipMediaApplicationAlexaSkillConfiguration omitted. -/** - * deserializeAws_restJson1SipMediaApplicationCall - */ -const de_SipMediaApplicationCall = (output: any, context: __SerdeContext): SipMediaApplicationCall => { - return { - TransactionId: __expectString(output.TransactionId), - } as any; -}; +// de_SipMediaApplicationCall omitted. -/** - * deserializeAws_restJson1SipMediaApplicationEndpoint - */ -const de_SipMediaApplicationEndpoint = (output: any, context: __SerdeContext): SipMediaApplicationEndpoint => { - return { - LambdaArn: __expectString(output.LambdaArn), - } as any; -}; +// de_SipMediaApplicationEndpoint omitted. -/** - * deserializeAws_restJson1SipMediaApplicationEndpointList - */ -const de_SipMediaApplicationEndpointList = (output: any, context: __SerdeContext): SipMediaApplicationEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SipMediaApplicationEndpoint(entry, context); - }); - return retVal; -}; +// de_SipMediaApplicationEndpointList omitted. /** * deserializeAws_restJson1SipMediaApplicationList @@ -11093,49 +10222,27 @@ const de_SipMediaApplicationList = (output: any, context: __SerdeContext): SipMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SipMediaApplication(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SipMediaApplicationLoggingConfiguration - */ -const de_SipMediaApplicationLoggingConfiguration = ( - output: any, - context: __SerdeContext -): SipMediaApplicationLoggingConfiguration => { - return { - EnableSipMediaApplicationMessageLogs: __expectBoolean(output.EnableSipMediaApplicationMessageLogs), - } as any; -}; +// de_SipMediaApplicationLoggingConfiguration omitted. /** * deserializeAws_restJson1SipRule */ const de_SipRule = (output: any, context: __SerdeContext): SipRule => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Disabled: __expectBoolean(output.Disabled), - Name: __expectString(output.Name), - SipRuleId: __expectString(output.SipRuleId), - TargetApplications: - output.TargetApplications != null - ? de_SipRuleTargetApplicationList(output.TargetApplications, context) - : undefined, - TriggerType: __expectString(output.TriggerType), - TriggerValue: __expectString(output.TriggerValue), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Disabled: __expectBoolean, + Name: __expectString, + SipRuleId: __expectString, + TargetApplications: _json, + TriggerType: __expectString, + TriggerValue: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -11145,58 +10252,33 @@ const de_SipRuleList = (output: any, context: __SerdeContext): SipRule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SipRule(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SipRuleTargetApplication - */ -const de_SipRuleTargetApplication = (output: any, context: __SerdeContext): SipRuleTargetApplication => { - return { - AwsRegion: __expectString(output.AwsRegion), - Priority: __expectInt32(output.Priority), - SipMediaApplicationId: __expectString(output.SipMediaApplicationId), - } as any; -}; +// de_SipRuleTargetApplication omitted. -/** - * deserializeAws_restJson1SipRuleTargetApplicationList - */ -const de_SipRuleTargetApplicationList = (output: any, context: __SerdeContext): SipRuleTargetApplication[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SipRuleTargetApplication(entry, context); - }); - return retVal; -}; +// de_SipRuleTargetApplicationList omitted. /** * deserializeAws_restJson1SpeakerSearchDetails */ const de_SpeakerSearchDetails = (output: any, context: __SerdeContext): SpeakerSearchDetails => { - return { - Results: output.Results != null ? de_SpeakerSearchResultList(output.Results, context) : undefined, - VoiceprintGenerationStatus: __expectString(output.VoiceprintGenerationStatus), - } as any; + return take(output, { + Results: (_: any) => de_SpeakerSearchResultList(_, context), + VoiceprintGenerationStatus: __expectString, + }) as any; }; /** * deserializeAws_restJson1SpeakerSearchResult */ const de_SpeakerSearchResult = (output: any, context: __SerdeContext): SpeakerSearchResult => { - return { - ConfidenceScore: __limitedParseFloat32(output.ConfidenceScore), - VoiceProfileId: __expectString(output.VoiceProfileId), - } as any; + return take(output, { + ConfidenceScore: __limitedParseFloat32, + VoiceProfileId: __expectString, + }) as any; }; /** @@ -11206,9 +10288,6 @@ const de_SpeakerSearchResultList = (output: any, context: __SerdeContext): Speak const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SpeakerSearchResult(entry, context); }); return retVal; @@ -11218,190 +10297,72 @@ const de_SpeakerSearchResultList = (output: any, context: __SerdeContext): Speak * deserializeAws_restJson1SpeakerSearchTask */ const de_SpeakerSearchTask = (output: any, context: __SerdeContext): SpeakerSearchTask => { - return { - CallDetails: output.CallDetails != null ? de_CallDetails(output.CallDetails, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - SpeakerSearchDetails: - output.SpeakerSearchDetails != null ? de_SpeakerSearchDetails(output.SpeakerSearchDetails, context) : undefined, - SpeakerSearchTaskId: __expectString(output.SpeakerSearchTaskId), - SpeakerSearchTaskStatus: __expectString(output.SpeakerSearchTaskStatus), - StartedTimestamp: - output.StartedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedTimestamp)) - : undefined, - StatusMessage: __expectString(output.StatusMessage), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1StreamingConfiguration - */ -const de_StreamingConfiguration = (output: any, context: __SerdeContext): StreamingConfiguration => { - return { - DataRetentionInHours: __expectInt32(output.DataRetentionInHours), - Disabled: __expectBoolean(output.Disabled), - MediaInsightsConfiguration: - output.MediaInsightsConfiguration != null - ? de_MediaInsightsConfiguration(output.MediaInsightsConfiguration, context) - : undefined, - StreamingNotificationTargets: - output.StreamingNotificationTargets != null - ? de_StreamingNotificationTargetList(output.StreamingNotificationTargets, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1StreamingNotificationTarget - */ -const de_StreamingNotificationTarget = (output: any, context: __SerdeContext): StreamingNotificationTarget => { - return { - NotificationTarget: __expectString(output.NotificationTarget), - } as any; -}; - -/** - * deserializeAws_restJson1StreamingNotificationTargetList - */ -const de_StreamingNotificationTargetList = (output: any, context: __SerdeContext): StreamingNotificationTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamingNotificationTarget(entry, context); - }); - return retVal; + return take(output, { + CallDetails: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SpeakerSearchDetails: (_: any) => de_SpeakerSearchDetails(_, context), + SpeakerSearchTaskId: __expectString, + SpeakerSearchTaskStatus: __expectString, + StartedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StatusMessage: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StreamingConfiguration omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_StreamingNotificationTarget omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_StreamingNotificationTargetList omitted. -/** - * deserializeAws_restJson1Termination - */ -const de_Termination = (output: any, context: __SerdeContext): Termination => { - return { - CallingRegions: output.CallingRegions != null ? de_CallingRegionList(output.CallingRegions, context) : undefined, - CidrAllowedList: output.CidrAllowedList != null ? de_StringList(output.CidrAllowedList, context) : undefined, - CpsLimit: __expectInt32(output.CpsLimit), - DefaultPhoneNumber: __expectString(output.DefaultPhoneNumber), - Disabled: __expectBoolean(output.Disabled), - } as any; -}; +// de_StringList omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_Termination omitted. /** * deserializeAws_restJson1TerminationHealth */ const de_TerminationHealth = (output: any, context: __SerdeContext): TerminationHealth => { - return { - Source: __expectString(output.Source), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Timestamp)) : undefined, - } as any; + return take(output, { + Source: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1VoiceConnector */ const de_VoiceConnector = (output: any, context: __SerdeContext): VoiceConnector => { - return { - AwsRegion: __expectString(output.AwsRegion), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - OutboundHostName: __expectString(output.OutboundHostName), - RequireEncryption: __expectBoolean(output.RequireEncryption), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceConnectorArn: __expectString(output.VoiceConnectorArn), - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; -}; - -/** - * deserializeAws_restJson1VoiceConnectorAwsRegionList - */ -const de_VoiceConnectorAwsRegionList = (output: any, context: __SerdeContext): (VoiceConnectorAwsRegion | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + AwsRegion: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + OutboundHostName: __expectString, + RequireEncryption: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceConnectorArn: __expectString, + VoiceConnectorId: __expectString, + }) as any; }; +// de_VoiceConnectorAwsRegionList omitted. + /** * deserializeAws_restJson1VoiceConnectorGroup */ const de_VoiceConnectorGroup = (output: any, context: __SerdeContext): VoiceConnectorGroup => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceConnectorGroupArn: __expectString(output.VoiceConnectorGroupArn), - VoiceConnectorGroupId: __expectString(output.VoiceConnectorGroupId), - VoiceConnectorItems: - output.VoiceConnectorItems != null ? de_VoiceConnectorItemList(output.VoiceConnectorItems, context) : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceConnectorGroupArn: __expectString, + VoiceConnectorGroupId: __expectString, + VoiceConnectorItems: _json, + }) as any; }; /** @@ -11411,38 +10372,14 @@ const de_VoiceConnectorGroupList = (output: any, context: __SerdeContext): Voice const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VoiceConnectorGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VoiceConnectorItem - */ -const de_VoiceConnectorItem = (output: any, context: __SerdeContext): VoiceConnectorItem => { - return { - Priority: __expectInt32(output.Priority), - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; -}; +// de_VoiceConnectorItem omitted. -/** - * deserializeAws_restJson1VoiceConnectorItemList - */ -const de_VoiceConnectorItemList = (output: any, context: __SerdeContext): VoiceConnectorItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VoiceConnectorItem(entry, context); - }); - return retVal; -}; +// de_VoiceConnectorItemList omitted. /** * deserializeAws_restJson1VoiceConnectorList @@ -11451,88 +10388,54 @@ const de_VoiceConnectorList = (output: any, context: __SerdeContext): VoiceConne const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VoiceConnector(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VoiceConnectorSettings - */ -const de_VoiceConnectorSettings = (output: any, context: __SerdeContext): VoiceConnectorSettings => { - return { - CdrBucket: __expectString(output.CdrBucket), - } as any; -}; +// de_VoiceConnectorSettings omitted. /** * deserializeAws_restJson1VoiceProfile */ const de_VoiceProfile = (output: any, context: __SerdeContext): VoiceProfile => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - ExpirationTimestamp: - output.ExpirationTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTimestamp)) - : undefined, - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceProfileArn: __expectString(output.VoiceProfileArn), - VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId), - VoiceProfileId: __expectString(output.VoiceProfileId), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExpirationTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceProfileArn: __expectString, + VoiceProfileDomainId: __expectString, + VoiceProfileId: __expectString, + }) as any; }; /** * deserializeAws_restJson1VoiceProfileDomain */ const de_VoiceProfileDomain = (output: any, context: __SerdeContext): VoiceProfileDomain => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - ServerSideEncryptionConfiguration: - output.ServerSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) - : undefined, - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceProfileDomainArn: __expectString(output.VoiceProfileDomainArn), - VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Name: __expectString, + ServerSideEncryptionConfiguration: _json, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceProfileDomainArn: __expectString, + VoiceProfileDomainId: __expectString, + }) as any; }; /** * deserializeAws_restJson1VoiceProfileDomainSummary */ const de_VoiceProfileDomainSummary = (output: any, context: __SerdeContext): VoiceProfileDomainSummary => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceProfileDomainArn: __expectString(output.VoiceProfileDomainArn), - VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Name: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceProfileDomainArn: __expectString, + VoiceProfileDomainId: __expectString, + }) as any; }; /** @@ -11542,9 +10445,6 @@ const de_VoiceProfileDomainSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VoiceProfileDomainSummary(entry, context); }); return retVal; @@ -11554,23 +10454,14 @@ const de_VoiceProfileDomainSummaryList = (output: any, context: __SerdeContext): * deserializeAws_restJson1VoiceProfileSummary */ const de_VoiceProfileSummary = (output: any, context: __SerdeContext): VoiceProfileSummary => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - ExpirationTimestamp: - output.ExpirationTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTimestamp)) - : undefined, - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceProfileArn: __expectString(output.VoiceProfileArn), - VoiceProfileDomainId: __expectString(output.VoiceProfileDomainId), - VoiceProfileId: __expectString(output.VoiceProfileId), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExpirationTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceProfileArn: __expectString, + VoiceProfileDomainId: __expectString, + VoiceProfileId: __expectString, + }) as any; }; /** @@ -11580,9 +10471,6 @@ const de_VoiceProfileSummaryList = (output: any, context: __SerdeContext): Voice const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VoiceProfileSummary(entry, context); }); return retVal; @@ -11592,24 +10480,15 @@ const de_VoiceProfileSummaryList = (output: any, context: __SerdeContext): Voice * deserializeAws_restJson1VoiceToneAnalysisTask */ const de_VoiceToneAnalysisTask = (output: any, context: __SerdeContext): VoiceToneAnalysisTask => { - return { - CallDetails: output.CallDetails != null ? de_CallDetails(output.CallDetails, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - StartedTimestamp: - output.StartedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedTimestamp)) - : undefined, - StatusMessage: __expectString(output.StatusMessage), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceToneAnalysisTaskId: __expectString(output.VoiceToneAnalysisTaskId), - VoiceToneAnalysisTaskStatus: __expectString(output.VoiceToneAnalysisTaskStatus), - } as any; + return take(output, { + CallDetails: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StartedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StatusMessage: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceToneAnalysisTaskId: __expectString, + VoiceToneAnalysisTaskStatus: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-chime/src/protocols/Aws_restJson1.ts b/clients/client-chime/src/protocols/Aws_restJson1.ts index 7ca93f78c62a..ed1eb14d8652 100644 --- a/clients/client-chime/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -13,11 +14,12 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -567,73 +569,48 @@ import { AccessDeniedException, Account, AccountSettings, - Address, AlexaForBusinessMetadata, AppInstance, AppInstanceAdmin, - AppInstanceAdminSummary, AppInstanceRetentionSettings, AppInstanceStreamingConfiguration, - AppInstanceSummary, AppInstanceUser, AppInstanceUserMembershipSummary, - AppInstanceUserSummary, ArtifactsConfiguration, - Attendee, AudioArtifactsConfiguration, BadRequestException, - BatchChannelMemberships, - BatchCreateChannelMembershipError, Bot, BusinessCallingSettings, - CandidateAddress, Capability, Channel, ChannelBan, - ChannelBanSummary, ChannelMembership, ChannelMembershipForAppInstanceUserSummary, - ChannelMembershipSummary, ChannelMessage, ChannelMessageSummary, ChannelModeratedByAppInstanceUserSummary, ChannelModerator, - ChannelModeratorSummary, ChannelRetentionSettings, ChannelSummary, ChimeSdkMeetingConfiguration, ConflictException, ContentArtifactsConfiguration, ConversationRetentionSettings, - CreateAttendeeError, CreateAttendeeRequestItem, Credential, DNISEmergencyCallingConfiguration, EmergencyCallingConfiguration, EngineTranscribeMedicalSettings, EngineTranscribeSettings, - EventsConfiguration, ForbiddenException, GeoMatchParams, - Identity, - License, MediaCapturePipeline, - MediaPlacement, - Meeting, MeetingNotificationConfiguration, - Member, - MemberError, MembershipItem, - MessagingSessionEndpoint, NotFoundException, - OrderedPhoneNumber, - Participant, PhoneNumber, PhoneNumberAssociation, - PhoneNumberCapabilities, - PhoneNumberError, PhoneNumberOrder, - PhoneNumberType, ProxySession, ResourceLimitExceededException, Room, @@ -643,7 +620,6 @@ import { ServiceUnavailableException, SigninDelegateGroup, SipMediaApplication, - SipMediaApplicationCall, SipMediaApplicationEndpoint, SipRule, SipRuleTargetApplication, @@ -655,7 +631,6 @@ import { UpdatePhoneNumberRequestItem, UpdateUserRequestItem, User, - UserError, VideoArtifactsConfiguration, VoiceConnector, VoiceConnectorGroup, @@ -663,12 +638,9 @@ import { VoiceConnectorSettings, } from "../models/models_0"; import { - Invite, LoggingConfiguration, Origination, OriginationRoute, - PhoneNumberCountry, - Proxy, RetentionSettings, RoomRetentionSettings, SipMediaApplicationLoggingConfiguration, @@ -706,12 +678,12 @@ export const se_AssociatePhoneNumbersWithVoiceConnectorCommand = async ( operation: [, "associate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + ForceAssociate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -750,12 +722,12 @@ export const se_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async ( operation: [, "associate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - ...(input.ForceAssociate != null && { ForceAssociate: input.ForceAssociate }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + ForceAssociate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -787,9 +759,11 @@ export const se_AssociatePhoneNumberWithUserCommand = async ( operation: [, "associate-phone-number"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumber != null && { E164PhoneNumber: input.E164PhoneNumber }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -819,11 +793,11 @@ export const se_AssociateSigninDelegateGroupsWithAccountCommand = async ( operation: [, "associate-signin-delegate-groups"], }); let body: any; - body = JSON.stringify({ - ...(input.SigninDelegateGroups != null && { - SigninDelegateGroups: se_SigninDelegateGroupList(input.SigninDelegateGroups, context), - }), - }); + body = JSON.stringify( + take(input, { + SigninDelegateGroups: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -854,9 +828,11 @@ export const se_BatchCreateAttendeeCommand = async ( operation: [, "batch-create"], }); let body: any; - body = JSON.stringify({ - ...(input.Attendees != null && { Attendees: se_CreateAttendeeRequestItemList(input.Attendees, context) }), - }); + body = JSON.stringify( + take(input, { + Attendees: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -888,10 +864,12 @@ export const se_BatchCreateChannelMembershipCommand = async ( operation: [, "batch-create"], }); let body: any; - body = JSON.stringify({ - ...(input.MemberArns != null && { MemberArns: se_MemberArns(input.MemberArns, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + MemberArns: (_) => _json(_), + Type: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -931,11 +909,11 @@ export const se_BatchCreateRoomMembershipCommand = async ( operation: [, "batch-create"], }); let body: any; - body = JSON.stringify({ - ...(input.MembershipItemList != null && { - MembershipItemList: se_MembershipItemList(input.MembershipItemList, context), - }), - }); + body = JSON.stringify( + take(input, { + MembershipItemList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -964,9 +942,11 @@ export const se_BatchDeletePhoneNumberCommand = async ( operation: [, "batch-delete"], }); let body: any; - body = JSON.stringify({ - ...(input.PhoneNumberIds != null && { PhoneNumberIds: se_NonEmptyStringList(input.PhoneNumberIds, context) }), - }); + body = JSON.stringify( + take(input, { + PhoneNumberIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -997,9 +977,11 @@ export const se_BatchSuspendUserCommand = async ( operation: [, "suspend"], }); let body: any; - body = JSON.stringify({ - ...(input.UserIdList != null && { UserIdList: se_UserIdList(input.UserIdList, context) }), - }); + body = JSON.stringify( + take(input, { + UserIdList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1030,9 +1012,11 @@ export const se_BatchUnsuspendUserCommand = async ( operation: [, "unsuspend"], }); let body: any; - body = JSON.stringify({ - ...(input.UserIdList != null && { UserIdList: se_UserIdList(input.UserIdList, context) }), - }); + body = JSON.stringify( + take(input, { + UserIdList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1061,11 +1045,11 @@ export const se_BatchUpdatePhoneNumberCommand = async ( operation: [, "batch-update"], }); let body: any; - body = JSON.stringify({ - ...(input.UpdatePhoneNumberRequestItems != null && { - UpdatePhoneNumberRequestItems: se_UpdatePhoneNumberRequestItemList(input.UpdatePhoneNumberRequestItems, context), - }), - }); + body = JSON.stringify( + take(input, { + UpdatePhoneNumberRequestItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1093,11 +1077,11 @@ export const se_BatchUpdateUserCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/users"; resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); let body: any; - body = JSON.stringify({ - ...(input.UpdateUserRequestItems != null && { - UpdateUserRequestItems: se_UpdateUserRequestItemList(input.UpdateUserRequestItems, context), - }), - }); + body = JSON.stringify( + take(input, { + UpdateUserRequestItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1122,9 +1106,11 @@ export const se_CreateAccountCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1149,12 +1135,14 @@ export const se_CreateAppInstanceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instances"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Metadata: [], + Name: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "identity-" + resolvedHostname; @@ -1195,9 +1183,11 @@ export const se_CreateAppInstanceAdminCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AppInstanceAdminArn != null && { AppInstanceAdminArn: input.AppInstanceAdminArn }), - }); + body = JSON.stringify( + take(input, { + AppInstanceAdminArn: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "identity-" + resolvedHostname; @@ -1229,14 +1219,16 @@ export const se_CreateAppInstanceUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/app-instance-users"; let body: any; - body = JSON.stringify({ - ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }), - ...(input.AppInstanceUserId != null && { AppInstanceUserId: input.AppInstanceUserId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppInstanceArn: [], + AppInstanceUserId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Metadata: [], + Name: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "identity-" + resolvedHostname; @@ -1270,10 +1262,12 @@ export const se_CreateAttendeeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/attendees"; resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", () => input.MeetingId!, "{MeetingId}", false); let body: any; - body = JSON.stringify({ - ...(input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId }), - ...(input.Tags != null && { Tags: se_AttendeeTagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ExternalUserId: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1300,10 +1294,12 @@ export const se_CreateBotCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/bots"; resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); let body: any; - body = JSON.stringify({ - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Domain != null && { Domain: input.Domain }), - }); + body = JSON.stringify( + take(input, { + DisplayName: [], + Domain: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1329,15 +1325,17 @@ export const se_CreateChannelCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels"; let body: any; - body = JSON.stringify({ - ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Privacy != null && { Privacy: input.Privacy }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppInstanceArn: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Metadata: [], + Mode: [], + Name: [], + Privacy: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -1372,9 +1370,11 @@ export const se_CreateChannelBanCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.MemberArn != null && { MemberArn: input.MemberArn }), - }); + body = JSON.stringify( + take(input, { + MemberArn: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -1409,10 +1409,12 @@ export const se_CreateChannelMembershipCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.MemberArn != null && { MemberArn: input.MemberArn }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + MemberArn: [], + Type: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -1447,9 +1449,11 @@ export const se_CreateChannelModeratorCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ChannelModeratorArn != null && { ChannelModeratorArn: input.ChannelModeratorArn }), - }); + body = JSON.stringify( + take(input, { + ChannelModeratorArn: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -1482,16 +1486,16 @@ export const se_CreateMediaCapturePipelineCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/media-capture-pipelines"; let body: any; - body = JSON.stringify({ - ...(input.ChimeSdkMeetingConfiguration != null && { - ChimeSdkMeetingConfiguration: se_ChimeSdkMeetingConfiguration(input.ChimeSdkMeetingConfiguration, context), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.SinkArn != null && { SinkArn: input.SinkArn }), - ...(input.SinkType != null && { SinkType: input.SinkType }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - }); + body = JSON.stringify( + take(input, { + ChimeSdkMeetingConfiguration: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + SinkArn: [], + SinkType: [], + SourceArn: [], + SourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1516,16 +1520,16 @@ export const se_CreateMeetingCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }), - ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }), - ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }), - ...(input.NotificationsConfiguration != null && { - NotificationsConfiguration: se_MeetingNotificationConfiguration(input.NotificationsConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_MeetingTagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ExternalMeetingId: [], + MediaRegion: [], + MeetingHostId: [], + NotificationsConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1552,11 +1556,13 @@ export const se_CreateMeetingDialOutCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/meetings/{MeetingId}/dial-outs"; resolvedPath = __resolvedPath(resolvedPath, input, "MeetingId", () => input.MeetingId!, "{MeetingId}", false); let body: any; - body = JSON.stringify({ - ...(input.FromPhoneNumber != null && { FromPhoneNumber: input.FromPhoneNumber }), - ...(input.JoinToken != null && { JoinToken: input.JoinToken }), - ...(input.ToPhoneNumber != null && { ToPhoneNumber: input.ToPhoneNumber }), - }); + body = JSON.stringify( + take(input, { + FromPhoneNumber: [], + JoinToken: [], + ToPhoneNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1584,19 +1590,17 @@ export const se_CreateMeetingWithAttendeesCommand = async ( operation: [, "create-attendees"], }); let body: any; - body = JSON.stringify({ - ...(input.Attendees != null && { - Attendees: se_CreateMeetingWithAttendeesRequestItemList(input.Attendees, context), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ExternalMeetingId != null && { ExternalMeetingId: input.ExternalMeetingId }), - ...(input.MediaRegion != null && { MediaRegion: input.MediaRegion }), - ...(input.MeetingHostId != null && { MeetingHostId: input.MeetingHostId }), - ...(input.NotificationsConfiguration != null && { - NotificationsConfiguration: se_MeetingNotificationConfiguration(input.NotificationsConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_MeetingTagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Attendees: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ExternalMeetingId: [], + MediaRegion: [], + MeetingHostId: [], + NotificationsConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1622,12 +1626,12 @@ export const se_CreatePhoneNumberOrderCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number-orders"; let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + ProductType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1662,17 +1666,17 @@ export const se_CreateProxySessionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }), - ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }), - ...(input.GeoMatchLevel != null && { GeoMatchLevel: input.GeoMatchLevel }), - ...(input.GeoMatchParams != null && { GeoMatchParams: se_GeoMatchParams(input.GeoMatchParams, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NumberSelectionBehavior != null && { NumberSelectionBehavior: input.NumberSelectionBehavior }), - ...(input.ParticipantPhoneNumbers != null && { - ParticipantPhoneNumbers: se_ParticipantPhoneNumberList(input.ParticipantPhoneNumbers, context), - }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + ExpiryMinutes: [], + GeoMatchLevel: [], + GeoMatchParams: (_) => _json(_), + Name: [], + NumberSelectionBehavior: [], + ParticipantPhoneNumbers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1699,10 +1703,12 @@ export const se_CreateRoomCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/rooms"; resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1731,10 +1737,12 @@ export const se_CreateRoomMembershipCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RoomId", () => input.RoomId!, "{RoomId}", false); let body: any; - body = JSON.stringify({ - ...(input.MemberId != null && { MemberId: input.MemberId }), - ...(input.Role != null && { Role: input.Role }), - }); + body = JSON.stringify( + take(input, { + MemberId: [], + Role: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1760,11 +1768,13 @@ export const se_CreateSipMediaApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-media-applications"; let body: any; - body = JSON.stringify({ - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + AwsRegion: [], + Endpoints: (_) => _json(_), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1799,11 +1809,13 @@ export const se_CreateSipMediaApplicationCallCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.FromPhoneNumber != null && { FromPhoneNumber: input.FromPhoneNumber }), - ...(input.SipHeaders != null && { SipHeaders: se_SipHeadersMap(input.SipHeaders, context) }), - ...(input.ToPhoneNumber != null && { ToPhoneNumber: input.ToPhoneNumber }), - }); + body = JSON.stringify( + take(input, { + FromPhoneNumber: [], + SipHeaders: (_) => _json(_), + ToPhoneNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1828,15 +1840,15 @@ export const se_CreateSipRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules"; let body: any; - body = JSON.stringify({ - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetApplications != null && { - TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context), - }), - ...(input.TriggerType != null && { TriggerType: input.TriggerType }), - ...(input.TriggerValue != null && { TriggerValue: input.TriggerValue }), - }); + body = JSON.stringify( + take(input, { + Disabled: [], + Name: [], + TargetApplications: (_) => _json(_), + TriggerType: [], + TriggerValue: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1866,11 +1878,13 @@ export const se_CreateUserCommand = async ( operation: [, "create"], }); let body: any; - body = JSON.stringify({ - ...(input.Email != null && { Email: input.Email }), - ...(input.UserType != null && { UserType: input.UserType }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + Email: [], + UserType: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1896,11 +1910,13 @@ export const se_CreateVoiceConnectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connectors"; let body: any; - body = JSON.stringify({ - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }), - }); + body = JSON.stringify( + take(input, { + AwsRegion: [], + Name: [], + RequireEncryption: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1926,12 +1942,12 @@ export const se_CreateVoiceConnectorGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/voice-connector-groups"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.VoiceConnectorItems != null && { - VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context), - }), - }); + body = JSON.stringify( + take(input, { + Name: [], + VoiceConnectorItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2833,9 +2849,11 @@ export const se_DeleteVoiceConnectorTerminationCredentialsCommand = async ( operation: [, "delete"], }); let body: any; - body = JSON.stringify({ - ...(input.Usernames != null && { Usernames: se_SensitiveStringList(input.Usernames, context) }), - }); + body = JSON.stringify( + take(input, { + Usernames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3242,11 +3260,11 @@ export const se_DisassociatePhoneNumbersFromVoiceConnectorCommand = async ( operation: [, "disassociate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3285,11 +3303,11 @@ export const se_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async ( operation: [, "disassociate-phone-numbers"], }); let body: any; - body = JSON.stringify({ - ...(input.E164PhoneNumbers != null && { - E164PhoneNumbers: se_E164PhoneNumberList(input.E164PhoneNumbers, context), - }), - }); + body = JSON.stringify( + take(input, { + E164PhoneNumbers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3319,9 +3337,11 @@ export const se_DisassociateSigninDelegateGroupsFromAccountCommand = async ( operation: [, "disassociate-signin-delegate-groups"], }); let body: any; - body = JSON.stringify({ - ...(input.GroupNames != null && { GroupNames: se_NonEmptyStringList(input.GroupNames, context) }), - }); + body = JSON.stringify( + take(input, { + GroupNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4293,10 +4313,12 @@ export const se_InviteUsersCommand = async ( operation: [, "add"], }); let body: any; - body = JSON.stringify({ - ...(input.UserEmailList != null && { UserEmailList: se_UserEmailList(input.UserEmailList, context) }), - ...(input.UserType != null && { UserType: input.UserType }), - }); + body = JSON.stringify( + take(input, { + UserEmailList: (_) => _json(_), + UserType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5325,11 +5347,11 @@ export const se_PutAppInstanceRetentionSettingsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AppInstanceRetentionSettings != null && { - AppInstanceRetentionSettings: se_AppInstanceRetentionSettings(input.AppInstanceRetentionSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + AppInstanceRetentionSettings: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "identity-" + resolvedHostname; @@ -5371,14 +5393,11 @@ export const se_PutAppInstanceStreamingConfigurationsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AppInstanceStreamingConfigurations != null && { - AppInstanceStreamingConfigurations: se_AppInstanceStreamingConfigurationList( - input.AppInstanceStreamingConfigurations, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + AppInstanceStreamingConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5407,12 +5426,12 @@ export const se_PutEventsConfigurationCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "BotId", () => input.BotId!, "{BotId}", false); let body: any; - body = JSON.stringify({ - ...(input.LambdaFunctionArn != null && { LambdaFunctionArn: input.LambdaFunctionArn }), - ...(input.OutboundEventsHTTPSEndpoint != null && { - OutboundEventsHTTPSEndpoint: input.OutboundEventsHTTPSEndpoint, - }), - }); + body = JSON.stringify( + take(input, { + LambdaFunctionArn: [], + OutboundEventsHTTPSEndpoint: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5439,11 +5458,11 @@ export const se_PutRetentionSettingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/retention-settings"; resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); let body: any; - body = JSON.stringify({ - ...(input.RetentionSettings != null && { - RetentionSettings: se_RetentionSettings(input.RetentionSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + RetentionSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5478,14 +5497,11 @@ export const se_PutSipMediaApplicationLoggingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SipMediaApplicationLoggingConfiguration != null && { - SipMediaApplicationLoggingConfiguration: se_SipMediaApplicationLoggingConfiguration( - input.SipMediaApplicationLoggingConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + SipMediaApplicationLoggingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5520,11 +5536,11 @@ export const se_PutVoiceConnectorEmergencyCallingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EmergencyCallingConfiguration != null && { - EmergencyCallingConfiguration: se_EmergencyCallingConfiguration(input.EmergencyCallingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + EmergencyCallingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5559,11 +5575,11 @@ export const se_PutVoiceConnectorLoggingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + LoggingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5598,9 +5614,11 @@ export const se_PutVoiceConnectorOriginationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Origination != null && { Origination: se_Origination(input.Origination, context) }), - }); + body = JSON.stringify( + take(input, { + Origination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5635,16 +5653,14 @@ export const se_PutVoiceConnectorProxyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DefaultSessionExpiryMinutes != null && { - DefaultSessionExpiryMinutes: input.DefaultSessionExpiryMinutes, - }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.FallBackPhoneNumber != null && { FallBackPhoneNumber: input.FallBackPhoneNumber }), - ...(input.PhoneNumberPoolCountries != null && { - PhoneNumberPoolCountries: se_CountryList(input.PhoneNumberPoolCountries, context), - }), - }); + body = JSON.stringify( + take(input, { + DefaultSessionExpiryMinutes: [], + Disabled: [], + FallBackPhoneNumber: [], + PhoneNumberPoolCountries: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5679,11 +5695,11 @@ export const se_PutVoiceConnectorStreamingConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.StreamingConfiguration != null && { - StreamingConfiguration: se_StreamingConfiguration(input.StreamingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + StreamingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5718,9 +5734,11 @@ export const se_PutVoiceConnectorTerminationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Termination != null && { Termination: se_Termination(input.Termination, context) }), - }); + body = JSON.stringify( + take(input, { + Termination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5758,9 +5776,11 @@ export const se_PutVoiceConnectorTerminationCredentialsCommand = async ( operation: [, "put"], }); let body: any; - body = JSON.stringify({ - ...(input.Credentials != null && { Credentials: se_CredentialList(input.Credentials, context) }), - }); + body = JSON.stringify( + take(input, { + Credentials: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6024,13 +6044,15 @@ export const se_SendChannelMessageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Persistence != null && { Persistence: input.Persistence }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Content: [], + Metadata: [], + Persistence: [], + Type: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -6067,11 +6089,11 @@ export const se_StartMeetingTranscriptionCommand = async ( operation: [, "start"], }); let body: any; - body = JSON.stringify({ - ...(input.TranscriptionConfiguration != null && { - TranscriptionConfiguration: se_TranscriptionConfiguration(input.TranscriptionConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + TranscriptionConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6132,9 +6154,11 @@ export const se_TagAttendeeCommand = async ( operation: [, "add"], }); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_AttendeeTagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6165,9 +6189,11 @@ export const se_TagMeetingCommand = async ( operation: [, "add"], }); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_MeetingTagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6196,10 +6222,12 @@ export const se_TagResourceCommand = async ( operation: [, "tag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6232,9 +6260,11 @@ export const se_UntagAttendeeCommand = async ( operation: [, "delete"], }); let body: any; - body = JSON.stringify({ - ...(input.TagKeys != null && { TagKeys: se_AttendeeTagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6265,9 +6295,11 @@ export const se_UntagMeetingCommand = async ( operation: [, "delete"], }); let body: any; - body = JSON.stringify({ - ...(input.TagKeys != null && { TagKeys: se_MeetingTagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6296,10 +6328,12 @@ export const se_UntagResourceCommand = async ( operation: [, "untag-resource"], }); let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6326,10 +6360,12 @@ export const se_UpdateAccountCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}"; resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); let body: any; - body = JSON.stringify({ - ...(input.DefaultLicense != null && { DefaultLicense: input.DefaultLicense }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + DefaultLicense: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6356,9 +6392,11 @@ export const se_UpdateAccountSettingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/{AccountId}/settings"; resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountSettings != null && { AccountSettings: se_AccountSettings(input.AccountSettings, context) }), - }); + body = JSON.stringify( + take(input, { + AccountSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6392,10 +6430,12 @@ export const se_UpdateAppInstanceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Name: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "identity-" + resolvedHostname; @@ -6436,10 +6476,12 @@ export const se_UpdateAppInstanceUserCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Name: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "identity-" + resolvedHostname; @@ -6474,9 +6516,11 @@ export const se_UpdateBotCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "BotId", () => input.BotId!, "{BotId}", false); let body: any; - body = JSON.stringify({ - ...(input.Disabled != null && { Disabled: input.Disabled }), - }); + body = JSON.stringify( + take(input, { + Disabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6503,11 +6547,13 @@ export const se_UpdateChannelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Metadata: [], + Mode: [], + Name: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -6544,10 +6590,12 @@ export const se_UpdateChannelMessageCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ChannelArn", () => input.ChannelArn!, "{ChannelArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "MessageId", () => input.MessageId!, "{MessageId}", false); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - }); + body = JSON.stringify( + take(input, { + Content: [], + Metadata: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "messaging-" + resolvedHostname; @@ -6612,12 +6660,12 @@ export const se_UpdateGlobalSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings"; let body: any; - body = JSON.stringify({ - ...(input.BusinessCalling != null && { - BusinessCalling: se_BusinessCallingSettings(input.BusinessCalling, context), - }), - ...(input.VoiceConnector != null && { VoiceConnector: se_VoiceConnectorSettings(input.VoiceConnector, context) }), - }); + body = JSON.stringify( + take(input, { + BusinessCalling: (_) => _json(_), + VoiceConnector: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6651,10 +6699,12 @@ export const se_UpdatePhoneNumberCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CallingName != null && { CallingName: input.CallingName }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - }); + body = JSON.stringify( + take(input, { + CallingName: [], + ProductType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6679,9 +6729,11 @@ export const se_UpdatePhoneNumberSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/settings/phone-number"; let body: any; - body = JSON.stringify({ - ...(input.CallingName != null && { CallingName: input.CallingName }), - }); + body = JSON.stringify( + take(input, { + CallingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6724,10 +6776,12 @@ export const se_UpdateProxySessionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { Capabilities: se_CapabilityList(input.Capabilities, context) }), - ...(input.ExpiryMinutes != null && { ExpiryMinutes: input.ExpiryMinutes }), - }); + body = JSON.stringify( + take(input, { + Capabilities: (_) => _json(_), + ExpiryMinutes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6755,9 +6809,11 @@ export const se_UpdateRoomCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RoomId", () => input.RoomId!, "{RoomId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6787,9 +6843,11 @@ export const se_UpdateRoomMembershipCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "RoomId", () => input.RoomId!, "{RoomId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "MemberId", () => input.MemberId!, "{MemberId}", false); let body: any; - body = JSON.stringify({ - ...(input.Role != null && { Role: input.Role }), - }); + body = JSON.stringify( + take(input, { + Role: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6824,10 +6882,12 @@ export const se_UpdateSipMediaApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Endpoints != null && { Endpoints: se_SipMediaApplicationEndpointList(input.Endpoints, context) }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Endpoints: (_) => _json(_), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6870,9 +6930,11 @@ export const se_UpdateSipMediaApplicationCallCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Arguments != null && { Arguments: se_SMAUpdateCallArgumentsMap(input.Arguments, context) }), - }); + body = JSON.stringify( + take(input, { + Arguments: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6898,13 +6960,13 @@ export const se_UpdateSipRuleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sip-rules/{SipRuleId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SipRuleId", () => input.SipRuleId!, "{SipRuleId}", false); let body: any; - body = JSON.stringify({ - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetApplications != null && { - TargetApplications: se_SipRuleTargetApplicationList(input.TargetApplications, context), - }), - }); + body = JSON.stringify( + take(input, { + Disabled: [], + Name: [], + TargetApplications: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6932,13 +6994,13 @@ export const se_UpdateUserCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); let body: any; - body = JSON.stringify({ - ...(input.AlexaForBusinessMetadata != null && { - AlexaForBusinessMetadata: se_AlexaForBusinessMetadata(input.AlexaForBusinessMetadata, context), - }), - ...(input.LicenseType != null && { LicenseType: input.LicenseType }), - ...(input.UserType != null && { UserType: input.UserType }), - }); + body = JSON.stringify( + take(input, { + AlexaForBusinessMetadata: (_) => _json(_), + LicenseType: [], + UserType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6967,9 +7029,11 @@ export const se_UpdateUserSettingsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "AccountId", () => input.AccountId!, "{AccountId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); let body: any; - body = JSON.stringify({ - ...(input.UserSettings != null && { UserSettings: se_UserSettings(input.UserSettings, context) }), - }); + body = JSON.stringify( + take(input, { + UserSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7003,10 +7067,12 @@ export const se_UpdateVoiceConnectorCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.RequireEncryption != null && { RequireEncryption: input.RequireEncryption }), - }); + body = JSON.stringify( + take(input, { + Name: [], + RequireEncryption: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7041,12 +7107,12 @@ export const se_UpdateVoiceConnectorGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.VoiceConnectorItems != null && { - VoiceConnectorItems: se_VoiceConnectorItemList(input.VoiceConnectorItems, context), - }), - }); + body = JSON.stringify( + take(input, { + Name: [], + VoiceConnectorItems: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7072,15 +7138,17 @@ export const se_ValidateE911AddressCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/emergency-calling/address"; let body: any; - body = JSON.stringify({ - ...(input.AwsAccountId != null && { AwsAccountId: input.AwsAccountId }), - ...(input.City != null && { City: input.City }), - ...(input.Country != null && { Country: input.Country }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.State != null && { State: input.State }), - ...(input.StreetInfo != null && { StreetInfo: input.StreetInfo }), - ...(input.StreetNumber != null && { StreetNumber: input.StreetNumber }), - }); + body = JSON.stringify( + take(input, { + AwsAccountId: [], + City: [], + Country: [], + PostalCode: [], + State: [], + StreetInfo: [], + StreetNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7106,9 +7174,10 @@ export const de_AssociatePhoneNumbersWithVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7151,10 +7220,9 @@ const de_AssociatePhoneNumbersWithVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7174,9 +7242,10 @@ export const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7219,10 +7288,9 @@ const de_AssociatePhoneNumbersWithVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7284,10 +7352,9 @@ const de_AssociatePhoneNumberWithUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7346,10 +7413,9 @@ const de_AssociateSigninDelegateGroupsWithAccountCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7369,12 +7435,11 @@ export const de_BatchCreateAttendeeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendees != null) { - contents.Attendees = de_AttendeeList(data.Attendees, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchCreateAttendeeErrorList(data.Errors, context); - } + const doc = take(data, { + Attendees: _json, + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7417,10 +7482,9 @@ const de_BatchCreateAttendeeCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7440,12 +7504,11 @@ export const de_BatchCreateChannelMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BatchChannelMemberships != null) { - contents.BatchChannelMemberships = de_BatchChannelMemberships(data.BatchChannelMemberships, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchCreateChannelMembershipErrors(data.Errors, context); - } + const doc = take(data, { + BatchChannelMemberships: _json, + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7482,10 +7545,9 @@ const de_BatchCreateChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7505,9 +7567,10 @@ export const de_BatchCreateRoomMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_MemberErrorList(data.Errors, context); - } + const doc = take(data, { + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7547,10 +7610,9 @@ const de_BatchCreateRoomMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7570,9 +7632,10 @@ export const de_BatchDeletePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7612,10 +7675,9 @@ const de_BatchDeletePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7635,9 +7697,10 @@ export const de_BatchSuspendUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UserErrors != null) { - contents.UserErrors = de_UserErrorList(data.UserErrors, context); - } + const doc = take(data, { + UserErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7677,10 +7740,9 @@ const de_BatchSuspendUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7700,9 +7762,10 @@ export const de_BatchUnsuspendUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UserErrors != null) { - contents.UserErrors = de_UserErrorList(data.UserErrors, context); - } + const doc = take(data, { + UserErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7742,10 +7805,9 @@ const de_BatchUnsuspendUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7765,9 +7827,10 @@ export const de_BatchUpdatePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7807,10 +7870,9 @@ const de_BatchUpdatePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7830,9 +7892,10 @@ export const de_BatchUpdateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UserErrors != null) { - contents.UserErrors = de_UserErrorList(data.UserErrors, context); - } + const doc = take(data, { + UserErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7872,10 +7935,9 @@ const de_BatchUpdateUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7895,9 +7957,10 @@ export const de_CreateAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Account != null) { - contents.Account = de_Account(data.Account, context); - } + const doc = take(data, { + Account: (_) => de_Account(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7937,10 +8000,9 @@ const de_CreateAccountCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7960,9 +8022,10 @@ export const de_CreateAppInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } + const doc = take(data, { + AppInstanceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8005,10 +8068,9 @@ const de_CreateAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8028,12 +8090,11 @@ export const de_CreateAppInstanceAdminCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceAdmin != null) { - contents.AppInstanceAdmin = de_Identity(data.AppInstanceAdmin, context); - } - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } + const doc = take(data, { + AppInstanceAdmin: _json, + AppInstanceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8076,10 +8137,9 @@ const de_CreateAppInstanceAdminCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8099,9 +8159,10 @@ export const de_CreateAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8144,10 +8205,9 @@ const de_CreateAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8167,9 +8227,10 @@ export const de_CreateAttendeeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendee != null) { - contents.Attendee = de_Attendee(data.Attendee, context); - } + const doc = take(data, { + Attendee: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8212,10 +8273,9 @@ const de_CreateAttendeeCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8235,9 +8295,10 @@ export const de_CreateBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Bot != null) { - contents.Bot = de_Bot(data.Bot, context); - } + const doc = take(data, { + Bot: (_) => de_Bot(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8280,10 +8341,9 @@ const de_CreateBotCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8303,9 +8363,10 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } + const doc = take(data, { + ChannelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8348,10 +8409,9 @@ const de_CreateChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8371,12 +8431,11 @@ export const de_CreateChannelBanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.Member != null) { - contents.Member = de_Identity(data.Member, context); - } + const doc = take(data, { + ChannelArn: __expectString, + Member: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8419,10 +8478,9 @@ const de_CreateChannelBanCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8442,12 +8500,11 @@ export const de_CreateChannelMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.Member != null) { - contents.Member = de_Identity(data.Member, context); - } + const doc = take(data, { + ChannelArn: __expectString, + Member: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8490,10 +8547,9 @@ const de_CreateChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8513,12 +8569,11 @@ export const de_CreateChannelModeratorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelModerator != null) { - contents.ChannelModerator = de_Identity(data.ChannelModerator, context); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelModerator: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8561,10 +8616,9 @@ const de_CreateChannelModeratorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8584,9 +8638,10 @@ export const de_CreateMediaCapturePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaCapturePipeline != null) { - contents.MediaCapturePipeline = de_MediaCapturePipeline(data.MediaCapturePipeline, context); - } + const doc = take(data, { + MediaCapturePipeline: (_) => de_MediaCapturePipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8626,10 +8681,9 @@ const de_CreateMediaCapturePipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8649,9 +8703,10 @@ export const de_CreateMeetingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Meeting != null) { - contents.Meeting = de_Meeting(data.Meeting, context); - } + const doc = take(data, { + Meeting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8691,10 +8746,9 @@ const de_CreateMeetingCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8714,9 +8768,10 @@ export const de_CreateMeetingDialOutCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransactionId != null) { - contents.TransactionId = __expectString(data.TransactionId); - } + const doc = take(data, { + TransactionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8759,10 +8814,9 @@ const de_CreateMeetingDialOutCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8782,15 +8836,12 @@ export const de_CreateMeetingWithAttendeesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendees != null) { - contents.Attendees = de_AttendeeList(data.Attendees, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchCreateAttendeeErrorList(data.Errors, context); - } - if (data.Meeting != null) { - contents.Meeting = de_Meeting(data.Meeting, context); - } + const doc = take(data, { + Attendees: _json, + Errors: _json, + Meeting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8830,10 +8881,9 @@ const de_CreateMeetingWithAttendeesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8853,9 +8903,10 @@ export const de_CreatePhoneNumberOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberOrder != null) { - contents.PhoneNumberOrder = de_PhoneNumberOrder(data.PhoneNumberOrder, context); - } + const doc = take(data, { + PhoneNumberOrder: (_) => de_PhoneNumberOrder(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8898,10 +8949,9 @@ const de_CreatePhoneNumberOrderCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8921,9 +8971,10 @@ export const de_CreateProxySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProxySession != null) { - contents.ProxySession = de_ProxySession(data.ProxySession, context); - } + const doc = take(data, { + ProxySession: (_) => de_ProxySession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8963,10 +9014,9 @@ const de_CreateProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8986,9 +9036,10 @@ export const de_CreateRoomCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Room != null) { - contents.Room = de_Room(data.Room, context); - } + const doc = take(data, { + Room: (_) => de_Room(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9031,10 +9082,9 @@ const de_CreateRoomCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9054,9 +9104,10 @@ export const de_CreateRoomMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoomMembership != null) { - contents.RoomMembership = de_RoomMembership(data.RoomMembership, context); - } + const doc = take(data, { + RoomMembership: (_) => de_RoomMembership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9102,10 +9153,9 @@ const de_CreateRoomMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9125,9 +9175,10 @@ export const de_CreateSipMediaApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplication != null) { - contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context); - } + const doc = take(data, { + SipMediaApplication: (_) => de_SipMediaApplication(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9173,10 +9224,9 @@ const de_CreateSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9196,9 +9246,10 @@ export const de_CreateSipMediaApplicationCallCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationCall != null) { - contents.SipMediaApplicationCall = de_SipMediaApplicationCall(data.SipMediaApplicationCall, context); - } + const doc = take(data, { + SipMediaApplicationCall: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9241,10 +9292,9 @@ const de_CreateSipMediaApplicationCallCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9264,9 +9314,10 @@ export const de_CreateSipRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipRule != null) { - contents.SipRule = de_SipRule(data.SipRule, context); - } + const doc = take(data, { + SipRule: (_) => de_SipRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9312,10 +9363,9 @@ const de_CreateSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9335,9 +9385,10 @@ export const de_CreateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9380,10 +9431,9 @@ const de_CreateUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9403,9 +9453,10 @@ export const de_CreateVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: (_) => de_VoiceConnector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9448,10 +9499,9 @@ const de_CreateVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9471,9 +9521,10 @@ export const de_CreateVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorGroup != null) { - contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context); - } + const doc = take(data, { + VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9516,10 +9567,9 @@ const de_CreateVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9581,10 +9631,9 @@ const de_DeleteAccountCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9640,10 +9689,9 @@ const de_DeleteAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9702,10 +9750,9 @@ const de_DeleteAppInstanceAdminCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9764,10 +9811,9 @@ const de_DeleteAppInstanceStreamingConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9823,10 +9869,9 @@ const de_DeleteAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9885,10 +9930,9 @@ const de_DeleteAttendeeCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9944,10 +9988,9 @@ const de_DeleteChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10003,10 +10046,9 @@ const de_DeleteChannelBanCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10065,10 +10107,9 @@ const de_DeleteChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10124,10 +10165,9 @@ const de_DeleteChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10183,10 +10223,9 @@ const de_DeleteChannelModeratorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10242,10 +10281,9 @@ const de_DeleteEventsConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10304,10 +10342,9 @@ const de_DeleteMediaCapturePipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10366,10 +10403,9 @@ const de_DeleteMeetingCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10428,10 +10464,9 @@ const de_DeletePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10490,10 +10525,9 @@ const de_DeleteProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10552,10 +10586,9 @@ const de_DeleteRoomCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10614,10 +10647,9 @@ const de_DeleteRoomMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10679,10 +10711,9 @@ const de_DeleteSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10744,10 +10775,9 @@ const de_DeleteSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10809,10 +10839,9 @@ const de_DeleteVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10871,10 +10900,9 @@ const de_DeleteVoiceConnectorEmergencyCallingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10936,10 +10964,9 @@ const de_DeleteVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10998,10 +11025,9 @@ const de_DeleteVoiceConnectorOriginationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11060,10 +11086,9 @@ const de_DeleteVoiceConnectorProxyCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11122,10 +11147,9 @@ const de_DeleteVoiceConnectorStreamingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11184,10 +11208,9 @@ const de_DeleteVoiceConnectorTerminationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11246,10 +11269,9 @@ const de_DeleteVoiceConnectorTerminationCredentialsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11269,9 +11291,10 @@ export const de_DescribeAppInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstance != null) { - contents.AppInstance = de_AppInstance(data.AppInstance, context); - } + const doc = take(data, { + AppInstance: (_) => de_AppInstance(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11308,10 +11331,9 @@ const de_DescribeAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11331,9 +11353,10 @@ export const de_DescribeAppInstanceAdminCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceAdmin != null) { - contents.AppInstanceAdmin = de_AppInstanceAdmin(data.AppInstanceAdmin, context); - } + const doc = take(data, { + AppInstanceAdmin: (_) => de_AppInstanceAdmin(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11370,10 +11393,9 @@ const de_DescribeAppInstanceAdminCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11393,9 +11415,10 @@ export const de_DescribeAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUser != null) { - contents.AppInstanceUser = de_AppInstanceUser(data.AppInstanceUser, context); - } + const doc = take(data, { + AppInstanceUser: (_) => de_AppInstanceUser(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11432,10 +11455,9 @@ const de_DescribeAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11455,9 +11477,10 @@ export const de_DescribeChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channel != null) { - contents.Channel = de_Channel(data.Channel, context); - } + const doc = take(data, { + Channel: (_) => de_Channel(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11494,10 +11517,9 @@ const de_DescribeChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11517,9 +11539,10 @@ export const de_DescribeChannelBanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelBan != null) { - contents.ChannelBan = de_ChannelBan(data.ChannelBan, context); - } + const doc = take(data, { + ChannelBan: (_) => de_ChannelBan(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11559,10 +11582,9 @@ const de_DescribeChannelBanCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11582,9 +11604,10 @@ export const de_DescribeChannelMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMembership != null) { - contents.ChannelMembership = de_ChannelMembership(data.ChannelMembership, context); - } + const doc = take(data, { + ChannelMembership: (_) => de_ChannelMembership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11624,10 +11647,9 @@ const de_DescribeChannelMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11647,9 +11669,10 @@ export const de_DescribeChannelMembershipForAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMembership != null) { - contents.ChannelMembership = de_ChannelMembershipForAppInstanceUserSummary(data.ChannelMembership, context); - } + const doc = take(data, { + ChannelMembership: (_) => de_ChannelMembershipForAppInstanceUserSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11686,10 +11709,9 @@ const de_DescribeChannelMembershipForAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11709,9 +11731,10 @@ export const de_DescribeChannelModeratedByAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channel != null) { - contents.Channel = de_ChannelModeratedByAppInstanceUserSummary(data.Channel, context); - } + const doc = take(data, { + Channel: (_) => de_ChannelModeratedByAppInstanceUserSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11748,10 +11771,9 @@ const de_DescribeChannelModeratedByAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11771,9 +11793,10 @@ export const de_DescribeChannelModeratorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelModerator != null) { - contents.ChannelModerator = de_ChannelModerator(data.ChannelModerator, context); - } + const doc = take(data, { + ChannelModerator: (_) => de_ChannelModerator(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11813,10 +11836,9 @@ const de_DescribeChannelModeratorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11875,10 +11897,9 @@ const de_DisassociatePhoneNumberFromUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11898,9 +11919,10 @@ export const de_DisassociatePhoneNumbersFromVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11940,10 +11962,9 @@ const de_DisassociatePhoneNumbersFromVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11963,9 +11984,10 @@ export const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberErrors != null) { - contents.PhoneNumberErrors = de_PhoneNumberErrorList(data.PhoneNumberErrors, context); - } + const doc = take(data, { + PhoneNumberErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12005,10 +12027,9 @@ const de_DisassociatePhoneNumbersFromVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12067,10 +12088,9 @@ const de_DisassociateSigninDelegateGroupsFromAccountCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12090,9 +12110,10 @@ export const de_GetAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Account != null) { - contents.Account = de_Account(data.Account, context); - } + const doc = take(data, { + Account: (_) => de_Account(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12132,10 +12153,9 @@ const de_GetAccountCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12155,9 +12175,10 @@ export const de_GetAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountSettings != null) { - contents.AccountSettings = de_AccountSettings(data.AccountSettings, context); - } + const doc = take(data, { + AccountSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12197,10 +12218,9 @@ const de_GetAccountSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12220,14 +12240,11 @@ export const de_GetAppInstanceRetentionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceRetentionSettings != null) { - contents.AppInstanceRetentionSettings = de_AppInstanceRetentionSettings(data.AppInstanceRetentionSettings, context); - } - if (data.InitiateDeletionTimestamp != null) { - contents.InitiateDeletionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.InitiateDeletionTimestamp)) - ); - } + const doc = take(data, { + AppInstanceRetentionSettings: _json, + InitiateDeletionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -12267,10 +12284,9 @@ const de_GetAppInstanceRetentionSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12290,12 +12306,10 @@ export const de_GetAppInstanceStreamingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceStreamingConfigurations != null) { - contents.AppInstanceStreamingConfigurations = de_AppInstanceStreamingConfigurationList( - data.AppInstanceStreamingConfigurations, - context - ); - } + const doc = take(data, { + AppInstanceStreamingConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12335,10 +12349,9 @@ const de_GetAppInstanceStreamingConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12358,9 +12371,10 @@ export const de_GetAttendeeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendee != null) { - contents.Attendee = de_Attendee(data.Attendee, context); - } + const doc = take(data, { + Attendee: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12400,10 +12414,9 @@ const de_GetAttendeeCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12423,9 +12436,10 @@ export const de_GetBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Bot != null) { - contents.Bot = de_Bot(data.Bot, context); - } + const doc = take(data, { + Bot: (_) => de_Bot(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12462,10 +12476,9 @@ const de_GetBotCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12485,9 +12498,10 @@ export const de_GetChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMessage != null) { - contents.ChannelMessage = de_ChannelMessage(data.ChannelMessage, context); - } + const doc = take(data, { + ChannelMessage: (_) => de_ChannelMessage(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12527,10 +12541,9 @@ const de_GetChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12550,9 +12563,10 @@ export const de_GetEventsConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventsConfiguration != null) { - contents.EventsConfiguration = de_EventsConfiguration(data.EventsConfiguration, context); - } + const doc = take(data, { + EventsConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12592,10 +12606,9 @@ const de_GetEventsConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12615,12 +12628,11 @@ export const de_GetGlobalSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BusinessCalling != null) { - contents.BusinessCalling = de_BusinessCallingSettings(data.BusinessCalling, context); - } - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnectorSettings(data.VoiceConnector, context); - } + const doc = take(data, { + BusinessCalling: _json, + VoiceConnector: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12657,10 +12669,9 @@ const de_GetGlobalSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12680,9 +12691,10 @@ export const de_GetMediaCapturePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaCapturePipeline != null) { - contents.MediaCapturePipeline = de_MediaCapturePipeline(data.MediaCapturePipeline, context); - } + const doc = take(data, { + MediaCapturePipeline: (_) => de_MediaCapturePipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12722,10 +12734,9 @@ const de_GetMediaCapturePipelineCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12745,9 +12756,10 @@ export const de_GetMeetingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Meeting != null) { - contents.Meeting = de_Meeting(data.Meeting, context); - } + const doc = take(data, { + Meeting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12787,10 +12799,9 @@ const de_GetMeetingCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12810,9 +12821,10 @@ export const de_GetMessagingSessionEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Endpoint != null) { - contents.Endpoint = de_MessagingSessionEndpoint(data.Endpoint, context); - } + const doc = take(data, { + Endpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12846,10 +12858,9 @@ const de_GetMessagingSessionEndpointCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12869,9 +12880,10 @@ export const de_GetPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumber != null) { - contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context); - } + const doc = take(data, { + PhoneNumber: (_) => de_PhoneNumber(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12911,10 +12923,9 @@ const de_GetPhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12934,9 +12945,10 @@ export const de_GetPhoneNumberOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberOrder != null) { - contents.PhoneNumberOrder = de_PhoneNumberOrder(data.PhoneNumberOrder, context); - } + const doc = take(data, { + PhoneNumberOrder: (_) => de_PhoneNumberOrder(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12976,10 +12988,9 @@ const de_GetPhoneNumberOrderCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12999,14 +13010,11 @@ export const de_GetPhoneNumberSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CallingName != null) { - contents.CallingName = __expectString(data.CallingName); - } - if (data.CallingNameUpdatedTimestamp != null) { - contents.CallingNameUpdatedTimestamp = __expectNonNull( - __parseRfc3339DateTimeWithOffset(data.CallingNameUpdatedTimestamp) - ); - } + const doc = take(data, { + CallingName: __expectString, + CallingNameUpdatedTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -13043,10 +13051,9 @@ const de_GetPhoneNumberSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13066,9 +13073,10 @@ export const de_GetProxySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProxySession != null) { - contents.ProxySession = de_ProxySession(data.ProxySession, context); - } + const doc = take(data, { + ProxySession: (_) => de_ProxySession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13108,10 +13116,9 @@ const de_GetProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13131,14 +13138,11 @@ export const de_GetRetentionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InitiateDeletionTimestamp != null) { - contents.InitiateDeletionTimestamp = __expectNonNull( - __parseRfc3339DateTimeWithOffset(data.InitiateDeletionTimestamp) - ); - } - if (data.RetentionSettings != null) { - contents.RetentionSettings = de_RetentionSettings(data.RetentionSettings, context); - } + const doc = take(data, { + InitiateDeletionTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + RetentionSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13178,10 +13182,9 @@ const de_GetRetentionSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13201,9 +13204,10 @@ export const de_GetRoomCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Room != null) { - contents.Room = de_Room(data.Room, context); - } + const doc = take(data, { + Room: (_) => de_Room(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13243,10 +13247,9 @@ const de_GetRoomCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13266,9 +13269,10 @@ export const de_GetSipMediaApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplication != null) { - contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context); - } + const doc = take(data, { + SipMediaApplication: (_) => de_SipMediaApplication(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13308,10 +13312,9 @@ const de_GetSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13331,12 +13334,10 @@ export const de_GetSipMediaApplicationLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationLoggingConfiguration != null) { - contents.SipMediaApplicationLoggingConfiguration = de_SipMediaApplicationLoggingConfiguration( - data.SipMediaApplicationLoggingConfiguration, - context - ); - } + const doc = take(data, { + SipMediaApplicationLoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13376,10 +13377,9 @@ const de_GetSipMediaApplicationLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13399,9 +13399,10 @@ export const de_GetSipRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipRule != null) { - contents.SipRule = de_SipRule(data.SipRule, context); - } + const doc = take(data, { + SipRule: (_) => de_SipRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13441,10 +13442,9 @@ const de_GetSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13464,9 +13464,10 @@ export const de_GetUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13506,10 +13507,9 @@ const de_GetUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13529,9 +13529,10 @@ export const de_GetUserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UserSettings != null) { - contents.UserSettings = de_UserSettings(data.UserSettings, context); - } + const doc = take(data, { + UserSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13571,10 +13572,9 @@ const de_GetUserSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13594,9 +13594,10 @@ export const de_GetVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: (_) => de_VoiceConnector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13636,10 +13637,9 @@ const de_GetVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13659,12 +13659,10 @@ export const de_GetVoiceConnectorEmergencyCallingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmergencyCallingConfiguration != null) { - contents.EmergencyCallingConfiguration = de_EmergencyCallingConfiguration( - data.EmergencyCallingConfiguration, - context - ); - } + const doc = take(data, { + EmergencyCallingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13704,10 +13702,9 @@ const de_GetVoiceConnectorEmergencyCallingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13727,9 +13724,10 @@ export const de_GetVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorGroup != null) { - contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context); - } + const doc = take(data, { + VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13769,10 +13767,9 @@ const de_GetVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13792,9 +13789,10 @@ export const de_GetVoiceConnectorLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoggingConfiguration != null) { - contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context); - } + const doc = take(data, { + LoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13834,10 +13832,9 @@ const de_GetVoiceConnectorLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13857,9 +13854,10 @@ export const de_GetVoiceConnectorOriginationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Origination != null) { - contents.Origination = de_Origination(data.Origination, context); - } + const doc = take(data, { + Origination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13899,10 +13897,9 @@ const de_GetVoiceConnectorOriginationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13922,9 +13919,10 @@ export const de_GetVoiceConnectorProxyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Proxy != null) { - contents.Proxy = de_Proxy(data.Proxy, context); - } + const doc = take(data, { + Proxy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13964,10 +13962,9 @@ const de_GetVoiceConnectorProxyCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13987,9 +13984,10 @@ export const de_GetVoiceConnectorStreamingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingConfiguration != null) { - contents.StreamingConfiguration = de_StreamingConfiguration(data.StreamingConfiguration, context); - } + const doc = take(data, { + StreamingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -14029,10 +14027,9 @@ const de_GetVoiceConnectorStreamingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14052,9 +14049,10 @@ export const de_GetVoiceConnectorTerminationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Termination != null) { - contents.Termination = de_Termination(data.Termination, context); - } + const doc = take(data, { + Termination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -14094,10 +14092,9 @@ const de_GetVoiceConnectorTerminationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14117,9 +14114,10 @@ export const de_GetVoiceConnectorTerminationHealthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TerminationHealth != null) { - contents.TerminationHealth = de_TerminationHealth(data.TerminationHealth, context); - } + const doc = take(data, { + TerminationHealth: (_) => de_TerminationHealth(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -14159,10 +14157,9 @@ const de_GetVoiceConnectorTerminationHealthCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14182,9 +14179,10 @@ export const de_InviteUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Invites != null) { - contents.Invites = de_InviteList(data.Invites, context); - } + const doc = take(data, { + Invites: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -14224,10 +14222,9 @@ const de_InviteUsersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14247,12 +14244,11 @@ export const de_ListAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Accounts != null) { - contents.Accounts = de_AccountList(data.Accounts, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Accounts: (_) => de_AccountList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14292,10 +14288,9 @@ const de_ListAccountsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14315,15 +14310,12 @@ export const de_ListAppInstanceAdminsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceAdmins != null) { - contents.AppInstanceAdmins = de_AppInstanceAdminList(data.AppInstanceAdmins, context); - } - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstanceAdmins: _json, + AppInstanceArn: __expectString, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14360,10 +14352,9 @@ const de_ListAppInstanceAdminsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14383,12 +14374,11 @@ export const de_ListAppInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstances != null) { - contents.AppInstances = de_AppInstanceList(data.AppInstances, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstances: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14425,10 +14415,9 @@ const de_ListAppInstancesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14448,15 +14437,12 @@ export const de_ListAppInstanceUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } - if (data.AppInstanceUsers != null) { - contents.AppInstanceUsers = de_AppInstanceUserList(data.AppInstanceUsers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppInstanceArn: __expectString, + AppInstanceUsers: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14493,10 +14479,9 @@ const de_ListAppInstanceUsersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14516,12 +14501,11 @@ export const de_ListAttendeesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attendees != null) { - contents.Attendees = de_AttendeeList(data.Attendees, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attendees: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14561,10 +14545,9 @@ const de_ListAttendeesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14584,9 +14567,10 @@ export const de_ListAttendeeTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -14626,10 +14610,9 @@ const de_ListAttendeeTagsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14649,12 +14632,11 @@ export const de_ListBotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Bots != null) { - contents.Bots = de_BotList(data.Bots, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Bots: (_) => de_BotList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14694,10 +14676,9 @@ const de_ListBotsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14717,15 +14698,12 @@ export const de_ListChannelBansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelBans != null) { - contents.ChannelBans = de_ChannelBanSummaryList(data.ChannelBans, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelBans: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14762,10 +14740,9 @@ const de_ListChannelBansCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14785,15 +14762,12 @@ export const de_ListChannelMembershipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelMemberships != null) { - contents.ChannelMemberships = de_ChannelMembershipSummaryList(data.ChannelMemberships, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelMemberships: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14830,10 +14804,9 @@ const de_ListChannelMembershipsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14853,12 +14826,11 @@ export const de_ListChannelMembershipsForAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelMemberships != null) { - contents.ChannelMemberships = de_ChannelMembershipForAppInstanceUserSummaryList(data.ChannelMemberships, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelMemberships: (_) => de_ChannelMembershipForAppInstanceUserSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14895,10 +14867,9 @@ const de_ListChannelMembershipsForAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14918,15 +14889,12 @@ export const de_ListChannelMessagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelMessages != null) { - contents.ChannelMessages = de_ChannelMessageSummaryList(data.ChannelMessages, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelMessages: (_) => de_ChannelMessageSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14963,10 +14931,9 @@ const de_ListChannelMessagesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14986,15 +14953,12 @@ export const de_ListChannelModeratorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.ChannelModerators != null) { - contents.ChannelModerators = de_ChannelModeratorSummaryList(data.ChannelModerators, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelArn: __expectString, + ChannelModerators: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15031,10 +14995,9 @@ const de_ListChannelModeratorsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15054,12 +15017,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_ChannelSummaryList(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: (_) => de_ChannelSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15096,10 +15058,9 @@ const de_ListChannelsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15119,12 +15080,11 @@ export const de_ListChannelsModeratedByAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_ChannelModeratedByAppInstanceUserSummaryList(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: (_) => de_ChannelModeratedByAppInstanceUserSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15161,10 +15121,9 @@ const de_ListChannelsModeratedByAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15184,12 +15143,11 @@ export const de_ListMediaCapturePipelinesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaCapturePipelines != null) { - contents.MediaCapturePipelines = de_MediaCapturePipelineList(data.MediaCapturePipelines, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MediaCapturePipelines: (_) => de_MediaCapturePipelineList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15226,10 +15184,9 @@ const de_ListMediaCapturePipelinesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15249,12 +15206,11 @@ export const de_ListMeetingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Meetings != null) { - contents.Meetings = de_MeetingList(data.Meetings, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Meetings: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15291,10 +15247,9 @@ const de_ListMeetingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15314,9 +15269,10 @@ export const de_ListMeetingTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -15356,10 +15312,9 @@ const de_ListMeetingTagsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15379,12 +15334,11 @@ export const de_ListPhoneNumberOrdersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PhoneNumberOrders != null) { - contents.PhoneNumberOrders = de_PhoneNumberOrderList(data.PhoneNumberOrders, context); - } + const doc = take(data, { + NextToken: __expectString, + PhoneNumberOrders: (_) => de_PhoneNumberOrderList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15421,10 +15375,9 @@ const de_ListPhoneNumberOrdersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15444,12 +15397,11 @@ export const de_ListPhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PhoneNumbers != null) { - contents.PhoneNumbers = de_PhoneNumberList(data.PhoneNumbers, context); - } + const doc = take(data, { + NextToken: __expectString, + PhoneNumbers: (_) => de_PhoneNumberList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15489,10 +15441,9 @@ const de_ListPhoneNumbersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15512,12 +15463,11 @@ export const de_ListProxySessionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProxySessions != null) { - contents.ProxySessions = de_ProxySessions(data.ProxySessions, context); - } + const doc = take(data, { + NextToken: __expectString, + ProxySessions: (_) => de_ProxySessions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15557,10 +15507,9 @@ const de_ListProxySessionsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15580,12 +15529,11 @@ export const de_ListRoomMembershipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RoomMemberships != null) { - contents.RoomMemberships = de_RoomMembershipList(data.RoomMemberships, context); - } + const doc = take(data, { + NextToken: __expectString, + RoomMemberships: (_) => de_RoomMembershipList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15625,10 +15573,9 @@ const de_ListRoomMembershipsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15648,12 +15595,11 @@ export const de_ListRoomsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Rooms != null) { - contents.Rooms = de_RoomList(data.Rooms, context); - } + const doc = take(data, { + NextToken: __expectString, + Rooms: (_) => de_RoomList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15693,10 +15639,9 @@ const de_ListRoomsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15716,12 +15661,11 @@ export const de_ListSipMediaApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SipMediaApplications != null) { - contents.SipMediaApplications = de_SipMediaApplicationList(data.SipMediaApplications, context); - } + const doc = take(data, { + NextToken: __expectString, + SipMediaApplications: (_) => de_SipMediaApplicationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15758,10 +15702,9 @@ const de_ListSipMediaApplicationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15781,12 +15724,11 @@ export const de_ListSipRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SipRules != null) { - contents.SipRules = de_SipRuleList(data.SipRules, context); - } + const doc = take(data, { + NextToken: __expectString, + SipRules: (_) => de_SipRuleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15823,10 +15765,9 @@ const de_ListSipRulesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15846,9 +15787,10 @@ export const de_ListSupportedPhoneNumberCountriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberCountries != null) { - contents.PhoneNumberCountries = de_PhoneNumberCountriesList(data.PhoneNumberCountries, context); - } + const doc = take(data, { + PhoneNumberCountries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -15888,10 +15830,9 @@ const de_ListSupportedPhoneNumberCountriesCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15911,9 +15852,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -15950,10 +15892,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15973,12 +15914,11 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Users != null) { - contents.Users = de_UserList(data.Users, context); - } + const doc = take(data, { + NextToken: __expectString, + Users: (_) => de_UserList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16018,10 +15958,9 @@ const de_ListUsersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16041,12 +15980,11 @@ export const de_ListVoiceConnectorGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VoiceConnectorGroups != null) { - contents.VoiceConnectorGroups = de_VoiceConnectorGroupList(data.VoiceConnectorGroups, context); - } + const doc = take(data, { + NextToken: __expectString, + VoiceConnectorGroups: (_) => de_VoiceConnectorGroupList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16083,10 +16021,9 @@ const de_ListVoiceConnectorGroupsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16106,12 +16043,11 @@ export const de_ListVoiceConnectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VoiceConnectors != null) { - contents.VoiceConnectors = de_VoiceConnectorList(data.VoiceConnectors, context); - } + const doc = take(data, { + NextToken: __expectString, + VoiceConnectors: (_) => de_VoiceConnectorList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16148,10 +16084,9 @@ const de_ListVoiceConnectorsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16171,9 +16106,10 @@ export const de_ListVoiceConnectorTerminationCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Usernames != null) { - contents.Usernames = de_SensitiveStringList(data.Usernames, context); - } + const doc = take(data, { + Usernames: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16213,10 +16149,9 @@ const de_ListVoiceConnectorTerminationCredentialsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16275,10 +16210,9 @@ const de_LogoutUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16298,14 +16232,11 @@ export const de_PutAppInstanceRetentionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceRetentionSettings != null) { - contents.AppInstanceRetentionSettings = de_AppInstanceRetentionSettings(data.AppInstanceRetentionSettings, context); - } - if (data.InitiateDeletionTimestamp != null) { - contents.InitiateDeletionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.InitiateDeletionTimestamp)) - ); - } + const doc = take(data, { + AppInstanceRetentionSettings: _json, + InitiateDeletionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -16348,10 +16279,9 @@ const de_PutAppInstanceRetentionSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16371,12 +16301,10 @@ export const de_PutAppInstanceStreamingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceStreamingConfigurations != null) { - contents.AppInstanceStreamingConfigurations = de_AppInstanceStreamingConfigurationList( - data.AppInstanceStreamingConfigurations, - context - ); - } + const doc = take(data, { + AppInstanceStreamingConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16416,10 +16344,9 @@ const de_PutAppInstanceStreamingConfigurationsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16439,9 +16366,10 @@ export const de_PutEventsConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventsConfiguration != null) { - contents.EventsConfiguration = de_EventsConfiguration(data.EventsConfiguration, context); - } + const doc = take(data, { + EventsConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16481,10 +16409,9 @@ const de_PutEventsConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16504,14 +16431,11 @@ export const de_PutRetentionSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InitiateDeletionTimestamp != null) { - contents.InitiateDeletionTimestamp = __expectNonNull( - __parseRfc3339DateTimeWithOffset(data.InitiateDeletionTimestamp) - ); - } - if (data.RetentionSettings != null) { - contents.RetentionSettings = de_RetentionSettings(data.RetentionSettings, context); - } + const doc = take(data, { + InitiateDeletionTimestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + RetentionSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16554,10 +16478,9 @@ const de_PutRetentionSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16577,12 +16500,10 @@ export const de_PutSipMediaApplicationLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationLoggingConfiguration != null) { - contents.SipMediaApplicationLoggingConfiguration = de_SipMediaApplicationLoggingConfiguration( - data.SipMediaApplicationLoggingConfiguration, - context - ); - } + const doc = take(data, { + SipMediaApplicationLoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16622,10 +16543,9 @@ const de_PutSipMediaApplicationLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16645,12 +16565,10 @@ export const de_PutVoiceConnectorEmergencyCallingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmergencyCallingConfiguration != null) { - contents.EmergencyCallingConfiguration = de_EmergencyCallingConfiguration( - data.EmergencyCallingConfiguration, - context - ); - } + const doc = take(data, { + EmergencyCallingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16690,10 +16608,9 @@ const de_PutVoiceConnectorEmergencyCallingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16713,9 +16630,10 @@ export const de_PutVoiceConnectorLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoggingConfiguration != null) { - contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context); - } + const doc = take(data, { + LoggingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16755,10 +16673,9 @@ const de_PutVoiceConnectorLoggingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16778,9 +16695,10 @@ export const de_PutVoiceConnectorOriginationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Origination != null) { - contents.Origination = de_Origination(data.Origination, context); - } + const doc = take(data, { + Origination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16820,10 +16738,9 @@ const de_PutVoiceConnectorOriginationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16843,9 +16760,10 @@ export const de_PutVoiceConnectorProxyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Proxy != null) { - contents.Proxy = de_Proxy(data.Proxy, context); - } + const doc = take(data, { + Proxy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16888,10 +16806,9 @@ const de_PutVoiceConnectorProxyCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16911,9 +16828,10 @@ export const de_PutVoiceConnectorStreamingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingConfiguration != null) { - contents.StreamingConfiguration = de_StreamingConfiguration(data.StreamingConfiguration, context); - } + const doc = take(data, { + StreamingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16953,10 +16871,9 @@ const de_PutVoiceConnectorStreamingConfigurationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16976,9 +16893,10 @@ export const de_PutVoiceConnectorTerminationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Termination != null) { - contents.Termination = de_Termination(data.Termination, context); - } + const doc = take(data, { + Termination: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -17021,10 +16939,9 @@ const de_PutVoiceConnectorTerminationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17083,10 +17000,9 @@ const de_PutVoiceConnectorTerminationCredentialsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17106,12 +17022,11 @@ export const de_RedactChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + ChannelArn: __expectString, + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17148,10 +17063,9 @@ const de_RedactChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17210,10 +17124,9 @@ const de_RedactConversationMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17272,10 +17185,9 @@ const de_RedactRoomMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17295,9 +17207,10 @@ export const de_RegenerateSecurityTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Bot != null) { - contents.Bot = de_Bot(data.Bot, context); - } + const doc = take(data, { + Bot: (_) => de_Bot(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -17337,10 +17250,9 @@ const de_RegenerateSecurityTokenCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17360,9 +17272,10 @@ export const de_ResetPersonalPINCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -17402,10 +17315,9 @@ const de_ResetPersonalPINCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17425,9 +17337,10 @@ export const de_RestorePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumber != null) { - contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context); - } + const doc = take(data, { + PhoneNumber: (_) => de_PhoneNumber(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -17470,10 +17383,9 @@ const de_RestorePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17493,12 +17405,11 @@ export const de_SearchAvailablePhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.E164PhoneNumbers != null) { - contents.E164PhoneNumbers = de_E164PhoneNumberList(data.E164PhoneNumbers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + E164PhoneNumbers: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17538,10 +17449,9 @@ const de_SearchAvailablePhoneNumbersCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17561,12 +17471,11 @@ export const de_SendChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + ChannelArn: __expectString, + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17606,10 +17515,9 @@ const de_SendChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17674,10 +17582,9 @@ const de_StartMeetingTranscriptionCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17739,10 +17646,9 @@ const de_StopMeetingTranscriptionCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17804,10 +17710,9 @@ const de_TagAttendeeCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17869,10 +17774,9 @@ const de_TagMeetingCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17928,10 +17832,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17990,10 +17893,9 @@ const de_UntagAttendeeCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18052,10 +17954,9 @@ const de_UntagMeetingCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18111,10 +18012,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18134,9 +18034,10 @@ export const de_UpdateAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Account != null) { - contents.Account = de_Account(data.Account, context); - } + const doc = take(data, { + Account: (_) => de_Account(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18176,10 +18077,9 @@ const de_UpdateAccountCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18241,10 +18141,9 @@ const de_UpdateAccountSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18264,9 +18163,10 @@ export const de_UpdateAppInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceArn != null) { - contents.AppInstanceArn = __expectString(data.AppInstanceArn); - } + const doc = take(data, { + AppInstanceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18306,10 +18206,9 @@ const de_UpdateAppInstanceCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18329,9 +18228,10 @@ export const de_UpdateAppInstanceUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppInstanceUserArn != null) { - contents.AppInstanceUserArn = __expectString(data.AppInstanceUserArn); - } + const doc = take(data, { + AppInstanceUserArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18371,10 +18271,9 @@ const de_UpdateAppInstanceUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18394,9 +18293,10 @@ export const de_UpdateBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Bot != null) { - contents.Bot = de_Bot(data.Bot, context); - } + const doc = take(data, { + Bot: (_) => de_Bot(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18436,10 +18336,9 @@ const de_UpdateBotCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18459,9 +18358,10 @@ export const de_UpdateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } + const doc = take(data, { + ChannelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18501,10 +18401,9 @@ const de_UpdateChannelCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18524,12 +18423,11 @@ export const de_UpdateChannelMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + ChannelArn: __expectString, + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18569,10 +18467,9 @@ const de_UpdateChannelMessageCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18592,9 +18489,10 @@ export const de_UpdateChannelReadMarkerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelArn != null) { - contents.ChannelArn = __expectString(data.ChannelArn); - } + const doc = take(data, { + ChannelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18634,10 +18532,9 @@ const de_UpdateChannelReadMarkerCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18693,10 +18590,9 @@ const de_UpdateGlobalSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18716,9 +18612,10 @@ export const de_UpdatePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumber != null) { - contents.PhoneNumber = de_PhoneNumber(data.PhoneNumber, context); - } + const doc = take(data, { + PhoneNumber: (_) => de_PhoneNumber(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18761,10 +18658,9 @@ const de_UpdatePhoneNumberCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18820,10 +18716,9 @@ const de_UpdatePhoneNumberSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18843,9 +18738,10 @@ export const de_UpdateProxySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProxySession != null) { - contents.ProxySession = de_ProxySession(data.ProxySession, context); - } + const doc = take(data, { + ProxySession: (_) => de_ProxySession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18885,10 +18781,9 @@ const de_UpdateProxySessionCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18908,9 +18803,10 @@ export const de_UpdateRoomCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Room != null) { - contents.Room = de_Room(data.Room, context); - } + const doc = take(data, { + Room: (_) => de_Room(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18950,10 +18846,9 @@ const de_UpdateRoomCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18973,9 +18868,10 @@ export const de_UpdateRoomMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoomMembership != null) { - contents.RoomMembership = de_RoomMembership(data.RoomMembership, context); - } + const doc = take(data, { + RoomMembership: (_) => de_RoomMembership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19015,10 +18911,9 @@ const de_UpdateRoomMembershipCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19038,9 +18933,10 @@ export const de_UpdateSipMediaApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplication != null) { - contents.SipMediaApplication = de_SipMediaApplication(data.SipMediaApplication, context); - } + const doc = take(data, { + SipMediaApplication: (_) => de_SipMediaApplication(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19083,10 +18979,9 @@ const de_UpdateSipMediaApplicationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19106,9 +19001,10 @@ export const de_UpdateSipMediaApplicationCallCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipMediaApplicationCall != null) { - contents.SipMediaApplicationCall = de_SipMediaApplicationCall(data.SipMediaApplicationCall, context); - } + const doc = take(data, { + SipMediaApplicationCall: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19151,10 +19047,9 @@ const de_UpdateSipMediaApplicationCallCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19174,9 +19069,10 @@ export const de_UpdateSipRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SipRule != null) { - contents.SipRule = de_SipRule(data.SipRule, context); - } + const doc = take(data, { + SipRule: (_) => de_SipRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19222,10 +19118,9 @@ const de_UpdateSipRuleCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19245,9 +19140,10 @@ export const de_UpdateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19287,10 +19183,9 @@ const de_UpdateUserCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19349,10 +19244,9 @@ const de_UpdateUserSettingsCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19372,9 +19266,10 @@ export const de_UpdateVoiceConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnector != null) { - contents.VoiceConnector = de_VoiceConnector(data.VoiceConnector, context); - } + const doc = take(data, { + VoiceConnector: (_) => de_VoiceConnector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19414,10 +19309,9 @@ const de_UpdateVoiceConnectorCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19437,9 +19331,10 @@ export const de_UpdateVoiceConnectorGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VoiceConnectorGroup != null) { - contents.VoiceConnectorGroup = de_VoiceConnectorGroup(data.VoiceConnectorGroup, context); - } + const doc = take(data, { + VoiceConnectorGroup: (_) => de_VoiceConnectorGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19482,10 +19377,9 @@ const de_UpdateVoiceConnectorGroupCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19505,18 +19399,13 @@ export const de_ValidateE911AddressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Address != null) { - contents.Address = de_Address(data.Address, context); - } - if (data.AddressExternalId != null) { - contents.AddressExternalId = __expectString(data.AddressExternalId); - } - if (data.CandidateAddressList != null) { - contents.CandidateAddressList = de_CandidateAddressList(data.CandidateAddressList, context); - } - if (data.ValidationResult != null) { - contents.ValidationResult = __expectInt32(data.ValidationResult); - } + const doc = take(data, { + Address: _json, + AddressExternalId: __expectString, + CandidateAddressList: _json, + ValidationResult: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -19556,16 +19445,15 @@ const de_ValidateE911AddressCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -19575,12 +19463,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19594,12 +19481,11 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19613,12 +19499,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19632,12 +19517,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19651,12 +19535,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19673,12 +19556,11 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19695,12 +19577,11 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19717,12 +19598,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19739,12 +19619,11 @@ const de_ThrottledClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19761,12 +19640,11 @@ const de_UnauthorizedClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19783,12 +19661,11 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -19796,2170 +19673,641 @@ const de_UnprocessableEntityExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountSettings - */ -const se_AccountSettings = (input: AccountSettings, context: __SerdeContext): any => { - return { - ...(input.DisableRemoteControl != null && { DisableRemoteControl: input.DisableRemoteControl }), - ...(input.EnableDialOut != null && { EnableDialOut: input.EnableDialOut }), - }; -}; +// se_AccountSettings omitted. -/** - * serializeAws_restJson1AlexaForBusinessMetadata - */ -const se_AlexaForBusinessMetadata = (input: AlexaForBusinessMetadata, context: __SerdeContext): any => { - return { - ...(input.AlexaForBusinessRoomArn != null && { AlexaForBusinessRoomArn: input.AlexaForBusinessRoomArn }), - ...(input.IsAlexaForBusinessEnabled != null && { IsAlexaForBusinessEnabled: input.IsAlexaForBusinessEnabled }), - }; -}; +// se_AlexaForBusinessMetadata omitted. -/** - * serializeAws_restJson1AppInstanceRetentionSettings - */ -const se_AppInstanceRetentionSettings = (input: AppInstanceRetentionSettings, context: __SerdeContext): any => { - return { - ...(input.ChannelRetentionSettings != null && { - ChannelRetentionSettings: se_ChannelRetentionSettings(input.ChannelRetentionSettings, context), - }), - }; -}; +// se_AppInstanceRetentionSettings omitted. -/** - * serializeAws_restJson1AppInstanceStreamingConfiguration - */ -const se_AppInstanceStreamingConfiguration = ( - input: AppInstanceStreamingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AppInstanceDataType != null && { AppInstanceDataType: input.AppInstanceDataType }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_AppInstanceStreamingConfiguration omitted. -/** - * serializeAws_restJson1AppInstanceStreamingConfigurationList - */ -const se_AppInstanceStreamingConfigurationList = ( - input: AppInstanceStreamingConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AppInstanceStreamingConfiguration(entry, context); - }); -}; +// se_AppInstanceStreamingConfigurationList omitted. -/** - * serializeAws_restJson1ArtifactsConfiguration - */ -const se_ArtifactsConfiguration = (input: ArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Audio != null && { Audio: se_AudioArtifactsConfiguration(input.Audio, context) }), - ...(input.Content != null && { Content: se_ContentArtifactsConfiguration(input.Content, context) }), - ...(input.Video != null && { Video: se_VideoArtifactsConfiguration(input.Video, context) }), - }; -}; +// se_ArtifactsConfiguration omitted. -/** - * serializeAws_restJson1AttendeeIdList - */ -const se_AttendeeIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttendeeIdList omitted. -/** - * serializeAws_restJson1AttendeeTagKeyList - */ -const se_AttendeeTagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttendeeTagKeyList omitted. -/** - * serializeAws_restJson1AttendeeTagList - */ -const se_AttendeeTagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_AttendeeTagList omitted. -/** - * serializeAws_restJson1AudioArtifactsConfiguration - */ -const se_AudioArtifactsConfiguration = (input: AudioArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MuxType != null && { MuxType: input.MuxType }), - }; -}; +// se_AudioArtifactsConfiguration omitted. -/** - * serializeAws_restJson1BusinessCallingSettings - */ -const se_BusinessCallingSettings = (input: BusinessCallingSettings, context: __SerdeContext): any => { - return { - ...(input.CdrBucket != null && { CdrBucket: input.CdrBucket }), - }; -}; +// se_BusinessCallingSettings omitted. -/** - * serializeAws_restJson1CallingRegionList - */ -const se_CallingRegionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CallingRegionList omitted. -/** - * serializeAws_restJson1CapabilityList - */ -const se_CapabilityList = (input: (Capability | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CapabilityList omitted. -/** - * serializeAws_restJson1ChannelRetentionSettings - */ -const se_ChannelRetentionSettings = (input: ChannelRetentionSettings, context: __SerdeContext): any => { - return { - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; +// se_ChannelRetentionSettings omitted. -/** - * serializeAws_restJson1ChimeSdkMeetingConfiguration - */ -const se_ChimeSdkMeetingConfiguration = (input: ChimeSdkMeetingConfiguration, context: __SerdeContext): any => { - return { - ...(input.ArtifactsConfiguration != null && { - ArtifactsConfiguration: se_ArtifactsConfiguration(input.ArtifactsConfiguration, context), - }), - ...(input.SourceConfiguration != null && { - SourceConfiguration: se_SourceConfiguration(input.SourceConfiguration, context), - }), - }; -}; +// se_ChimeSdkMeetingConfiguration omitted. -/** - * serializeAws_restJson1ContentArtifactsConfiguration - */ -const se_ContentArtifactsConfiguration = (input: ContentArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MuxType != null && { MuxType: input.MuxType }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_ContentArtifactsConfiguration omitted. -/** - * serializeAws_restJson1ConversationRetentionSettings - */ -const se_ConversationRetentionSettings = (input: ConversationRetentionSettings, context: __SerdeContext): any => { - return { - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; +// se_ConversationRetentionSettings omitted. -/** - * serializeAws_restJson1CountryList - */ -const se_CountryList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CountryList omitted. -/** - * serializeAws_restJson1CreateAttendeeRequestItem - */ -const se_CreateAttendeeRequestItem = (input: CreateAttendeeRequestItem, context: __SerdeContext): any => { - return { - ...(input.ExternalUserId != null && { ExternalUserId: input.ExternalUserId }), - ...(input.Tags != null && { Tags: se_AttendeeTagList(input.Tags, context) }), - }; -}; +// se_CreateAttendeeRequestItem omitted. + +// se_CreateAttendeeRequestItemList omitted. + +// se_CreateMeetingWithAttendeesRequestItemList omitted. + +// se_Credential omitted. + +// se_CredentialList omitted. + +// se_DNISEmergencyCallingConfiguration omitted. + +// se_DNISEmergencyCallingConfigurationList omitted. + +// se_E164PhoneNumberList omitted. + +// se_EmergencyCallingConfiguration omitted. + +// se_EngineTranscribeMedicalSettings omitted. + +// se_EngineTranscribeSettings omitted. + +// se_ExternalUserIdList omitted. + +// se_GeoMatchParams omitted. + +// se_LoggingConfiguration omitted. + +// se_MeetingNotificationConfiguration omitted. + +// se_MeetingTagKeyList omitted. + +// se_MeetingTagList omitted. + +// se_MemberArns omitted. + +// se_MembershipItem omitted. + +// se_MembershipItemList omitted. + +// se_NonEmptyStringList omitted. + +// se_Origination omitted. + +// se_OriginationRoute omitted. + +// se_OriginationRouteList omitted. + +// se_ParticipantPhoneNumberList omitted. + +// se_RetentionSettings omitted. + +// se_RoomRetentionSettings omitted. + +// se_SelectedVideoStreams omitted. + +// se_SensitiveStringList omitted. + +// se_SigninDelegateGroup omitted. + +// se_SigninDelegateGroupList omitted. + +// se_SipHeadersMap omitted. + +// se_SipMediaApplicationEndpoint omitted. + +// se_SipMediaApplicationEndpointList omitted. + +// se_SipMediaApplicationLoggingConfiguration omitted. + +// se_SipRuleTargetApplication omitted. + +// se_SipRuleTargetApplicationList omitted. + +// se_SMAUpdateCallArgumentsMap omitted. + +// se_SourceConfiguration omitted. + +// se_StreamingConfiguration omitted. + +// se_StreamingNotificationTarget omitted. + +// se_StreamingNotificationTargetList omitted. + +// se_StringList omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TelephonySettings omitted. + +// se_Termination omitted. + +// se_TranscriptionConfiguration omitted. + +// se_UpdatePhoneNumberRequestItem omitted. + +// se_UpdatePhoneNumberRequestItemList omitted. + +// se_UpdateUserRequestItem omitted. + +// se_UpdateUserRequestItemList omitted. + +// se_UserEmailList omitted. + +// se_UserIdList omitted. + +// se_UserSettings omitted. + +// se_VideoArtifactsConfiguration omitted. + +// se_VoiceConnectorItem omitted. + +// se_VoiceConnectorItemList omitted. + +// se_VoiceConnectorSettings omitted. /** - * serializeAws_restJson1CreateAttendeeRequestItemList + * deserializeAws_restJson1Account */ -const se_CreateAttendeeRequestItemList = (input: CreateAttendeeRequestItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAttendeeRequestItem(entry, context); - }); +const de_Account = (output: any, context: __SerdeContext): Account => { + return take(output, { + AccountId: __expectString, + AccountStatus: __expectString, + AccountType: __expectString, + AwsAccountId: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DefaultLicense: __expectString, + Name: __expectString, + SigninDelegateGroups: _json, + SupportedLicenses: _json, + }) as any; }; /** - * serializeAws_restJson1CreateMeetingWithAttendeesRequestItemList + * deserializeAws_restJson1AccountList */ -const se_CreateMeetingWithAttendeesRequestItemList = ( - input: CreateAttendeeRequestItem[], - context: __SerdeContext -): any => { - return input +const de_AccountList = (output: any, context: __SerdeContext): Account[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAttendeeRequestItem(entry, context); + .map((entry: any) => { + return de_Account(entry, context); }); + return retVal; }; +// de_AccountSettings omitted. + +// de_Address omitted. + +// de_AlexaForBusinessMetadata omitted. + /** - * serializeAws_restJson1Credential + * deserializeAws_restJson1AppInstance */ -const se_Credential = (input: Credential, context: __SerdeContext): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; +const de_AppInstance = (output: any, context: __SerdeContext): AppInstance => { + return take(output, { + AppInstanceArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Name: __expectString, + }) as any; }; /** - * serializeAws_restJson1CredentialList + * deserializeAws_restJson1AppInstanceAdmin */ -const se_CredentialList = (input: Credential[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Credential(entry, context); - }); +const de_AppInstanceAdmin = (output: any, context: __SerdeContext): AppInstanceAdmin => { + return take(output, { + Admin: _json, + AppInstanceArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_AppInstanceAdminList omitted. + +// de_AppInstanceAdminSummary omitted. + +// de_AppInstanceList omitted. + +// de_AppInstanceRetentionSettings omitted. + +// de_AppInstanceStreamingConfiguration omitted. + +// de_AppInstanceStreamingConfigurationList omitted. + +// de_AppInstanceSummary omitted. + /** - * serializeAws_restJson1DNISEmergencyCallingConfiguration + * deserializeAws_restJson1AppInstanceUser */ -const se_DNISEmergencyCallingConfiguration = ( - input: DNISEmergencyCallingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CallingCountry != null && { CallingCountry: input.CallingCountry }), - ...(input.EmergencyPhoneNumber != null && { EmergencyPhoneNumber: input.EmergencyPhoneNumber }), - ...(input.TestPhoneNumber != null && { TestPhoneNumber: input.TestPhoneNumber }), - }; +const de_AppInstanceUser = (output: any, context: __SerdeContext): AppInstanceUser => { + return take(output, { + AppInstanceUserArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Name: __expectString, + }) as any; }; +// de_AppInstanceUserList omitted. + /** - * serializeAws_restJson1DNISEmergencyCallingConfigurationList + * deserializeAws_restJson1AppInstanceUserMembershipSummary */ -const se_DNISEmergencyCallingConfigurationList = ( - input: DNISEmergencyCallingConfiguration[], +const de_AppInstanceUserMembershipSummary = ( + output: any, context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DNISEmergencyCallingConfiguration(entry, context); - }); +): AppInstanceUserMembershipSummary => { + return take(output, { + ReadMarkerTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + }) as any; }; -/** - * serializeAws_restJson1E164PhoneNumberList - */ -const se_E164PhoneNumberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_AppInstanceUserSummary omitted. -/** - * serializeAws_restJson1EmergencyCallingConfiguration - */ -const se_EmergencyCallingConfiguration = (input: EmergencyCallingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DNIS != null && { DNIS: se_DNISEmergencyCallingConfigurationList(input.DNIS, context) }), - }; -}; +// de_ArtifactsConfiguration omitted. -/** - * serializeAws_restJson1EngineTranscribeMedicalSettings - */ -const se_EngineTranscribeMedicalSettings = (input: EngineTranscribeMedicalSettings, context: __SerdeContext): any => { - return { - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Region != null && { Region: input.Region }), - ...(input.Specialty != null && { Specialty: input.Specialty }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// de_Attendee omitted. + +// de_AttendeeIdList omitted. + +// de_AttendeeList omitted. + +// de_AudioArtifactsConfiguration omitted. + +// de_BatchChannelMemberships omitted. + +// de_BatchCreateAttendeeErrorList omitted. + +// de_BatchCreateChannelMembershipError omitted. + +// de_BatchCreateChannelMembershipErrors omitted. /** - * serializeAws_restJson1EngineTranscribeSettings + * deserializeAws_restJson1Bot */ -const se_EngineTranscribeSettings = (input: EngineTranscribeSettings, context: __SerdeContext): any => { - return { - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.ContentRedactionType != null && { ContentRedactionType: input.ContentRedactionType }), - ...(input.EnablePartialResultsStabilization != null && { - EnablePartialResultsStabilization: input.EnablePartialResultsStabilization, - }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - ...(input.PartialResultsStability != null && { PartialResultsStability: input.PartialResultsStability }), - ...(input.PiiEntityTypes != null && { PiiEntityTypes: input.PiiEntityTypes }), - ...(input.Region != null && { Region: input.Region }), - ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; +const de_Bot = (output: any, context: __SerdeContext): Bot => { + return take(output, { + BotEmail: __expectString, + BotId: __expectString, + BotType: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Disabled: __expectBoolean, + DisplayName: __expectString, + SecurityToken: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + UserId: __expectString, + }) as any; }; /** - * serializeAws_restJson1ExternalUserIdList + * deserializeAws_restJson1BotList */ -const se_ExternalUserIdList = (input: string[], context: __SerdeContext): any => { - return input +const de_BotList = (output: any, context: __SerdeContext): Bot[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_Bot(entry, context); }); + return retVal; }; -/** - * serializeAws_restJson1GeoMatchParams - */ -const se_GeoMatchParams = (input: GeoMatchParams, context: __SerdeContext): any => { - return { - ...(input.AreaCode != null && { AreaCode: input.AreaCode }), - ...(input.Country != null && { Country: input.Country }), - }; -}; +// de_BusinessCallingSettings omitted. -/** - * serializeAws_restJson1LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.EnableMediaMetricLogs != null && { EnableMediaMetricLogs: input.EnableMediaMetricLogs }), - ...(input.EnableSIPLogs != null && { EnableSIPLogs: input.EnableSIPLogs }), - }; -}; +// de_CallingRegionList omitted. -/** - * serializeAws_restJson1MeetingNotificationConfiguration - */ -const se_MeetingNotificationConfiguration = (input: MeetingNotificationConfiguration, context: __SerdeContext): any => { - return { - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SqsQueueArn != null && { SqsQueueArn: input.SqsQueueArn }), - }; -}; +// de_CandidateAddress omitted. + +// de_CandidateAddressList omitted. + +// de_CapabilityList omitted. /** - * serializeAws_restJson1MeetingTagKeyList + * deserializeAws_restJson1Channel */ -const se_MeetingTagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_Channel = (output: any, context: __SerdeContext): Channel => { + return take(output, { + ChannelArn: __expectString, + CreatedBy: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastMessageTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Mode: __expectString, + Name: __expectString, + Privacy: __expectString, + }) as any; }; /** - * serializeAws_restJson1MeetingTagList + * deserializeAws_restJson1ChannelBan */ -const se_MeetingTagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1MemberArns - */ -const se_MemberArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1MembershipItem - */ -const se_MembershipItem = (input: MembershipItem, context: __SerdeContext): any => { - return { - ...(input.MemberId != null && { MemberId: input.MemberId }), - ...(input.Role != null && { Role: input.Role }), - }; -}; - -/** - * serializeAws_restJson1MembershipItemList - */ -const se_MembershipItemList = (input: MembershipItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MembershipItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1NonEmptyStringList - */ -const se_NonEmptyStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Origination - */ -const se_Origination = (input: Origination, context: __SerdeContext): any => { - return { - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Routes != null && { Routes: se_OriginationRouteList(input.Routes, context) }), - }; -}; - -/** - * serializeAws_restJson1OriginationRoute - */ -const se_OriginationRoute = (input: OriginationRoute, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.Weight != null && { Weight: input.Weight }), - }; -}; - -/** - * serializeAws_restJson1OriginationRouteList - */ -const se_OriginationRouteList = (input: OriginationRoute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OriginationRoute(entry, context); - }); -}; - -/** - * serializeAws_restJson1ParticipantPhoneNumberList - */ -const se_ParticipantPhoneNumberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RetentionSettings - */ -const se_RetentionSettings = (input: RetentionSettings, context: __SerdeContext): any => { - return { - ...(input.ConversationRetentionSettings != null && { - ConversationRetentionSettings: se_ConversationRetentionSettings(input.ConversationRetentionSettings, context), - }), - ...(input.RoomRetentionSettings != null && { - RoomRetentionSettings: se_RoomRetentionSettings(input.RoomRetentionSettings, context), - }), - }; -}; - -/** - * serializeAws_restJson1RoomRetentionSettings - */ -const se_RoomRetentionSettings = (input: RoomRetentionSettings, context: __SerdeContext): any => { - return { - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; - -/** - * serializeAws_restJson1SelectedVideoStreams - */ -const se_SelectedVideoStreams = (input: SelectedVideoStreams, context: __SerdeContext): any => { - return { - ...(input.AttendeeIds != null && { AttendeeIds: se_AttendeeIdList(input.AttendeeIds, context) }), - ...(input.ExternalUserIds != null && { ExternalUserIds: se_ExternalUserIdList(input.ExternalUserIds, context) }), - }; -}; - -/** - * serializeAws_restJson1SensitiveStringList - */ -const se_SensitiveStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SigninDelegateGroup - */ -const se_SigninDelegateGroup = (input: SigninDelegateGroup, context: __SerdeContext): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - }; -}; - -/** - * serializeAws_restJson1SigninDelegateGroupList - */ -const se_SigninDelegateGroupList = (input: SigninDelegateGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SigninDelegateGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1SipHeadersMap - */ -const se_SipHeadersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SipMediaApplicationEndpoint - */ -const se_SipMediaApplicationEndpoint = (input: SipMediaApplicationEndpoint, context: __SerdeContext): any => { - return { - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - }; -}; - -/** - * serializeAws_restJson1SipMediaApplicationEndpointList - */ -const se_SipMediaApplicationEndpointList = (input: SipMediaApplicationEndpoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SipMediaApplicationEndpoint(entry, context); - }); -}; - -/** - * serializeAws_restJson1SipMediaApplicationLoggingConfiguration - */ -const se_SipMediaApplicationLoggingConfiguration = ( - input: SipMediaApplicationLoggingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.EnableSipMediaApplicationMessageLogs != null && { - EnableSipMediaApplicationMessageLogs: input.EnableSipMediaApplicationMessageLogs, - }), - }; -}; - -/** - * serializeAws_restJson1SipRuleTargetApplication - */ -const se_SipRuleTargetApplication = (input: SipRuleTargetApplication, context: __SerdeContext): any => { - return { - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.SipMediaApplicationId != null && { SipMediaApplicationId: input.SipMediaApplicationId }), - }; -}; - -/** - * serializeAws_restJson1SipRuleTargetApplicationList - */ -const se_SipRuleTargetApplicationList = (input: SipRuleTargetApplication[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SipRuleTargetApplication(entry, context); - }); -}; - -/** - * serializeAws_restJson1SMAUpdateCallArgumentsMap - */ -const se_SMAUpdateCallArgumentsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SourceConfiguration - */ -const se_SourceConfiguration = (input: SourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.SelectedVideoStreams != null && { - SelectedVideoStreams: se_SelectedVideoStreams(input.SelectedVideoStreams, context), - }), - }; -}; - -/** - * serializeAws_restJson1StreamingConfiguration - */ -const se_StreamingConfiguration = (input: StreamingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataRetentionInHours != null && { DataRetentionInHours: input.DataRetentionInHours }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.StreamingNotificationTargets != null && { - StreamingNotificationTargets: se_StreamingNotificationTargetList(input.StreamingNotificationTargets, context), - }), - }; -}; - -/** - * serializeAws_restJson1StreamingNotificationTarget - */ -const se_StreamingNotificationTarget = (input: StreamingNotificationTarget, context: __SerdeContext): any => { - return { - ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }), - }; -}; - -/** - * serializeAws_restJson1StreamingNotificationTargetList - */ -const se_StreamingNotificationTargetList = (input: StreamingNotificationTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StreamingNotificationTarget(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1TelephonySettings - */ -const se_TelephonySettings = (input: TelephonySettings, context: __SerdeContext): any => { - return { - ...(input.InboundCalling != null && { InboundCalling: input.InboundCalling }), - ...(input.OutboundCalling != null && { OutboundCalling: input.OutboundCalling }), - ...(input.SMS != null && { SMS: input.SMS }), - }; -}; - -/** - * serializeAws_restJson1Termination - */ -const se_Termination = (input: Termination, context: __SerdeContext): any => { - return { - ...(input.CallingRegions != null && { CallingRegions: se_CallingRegionList(input.CallingRegions, context) }), - ...(input.CidrAllowedList != null && { CidrAllowedList: se_StringList(input.CidrAllowedList, context) }), - ...(input.CpsLimit != null && { CpsLimit: input.CpsLimit }), - ...(input.DefaultPhoneNumber != null && { DefaultPhoneNumber: input.DefaultPhoneNumber }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - }; -}; - -/** - * serializeAws_restJson1TranscriptionConfiguration - */ -const se_TranscriptionConfiguration = (input: TranscriptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.EngineTranscribeMedicalSettings != null && { - EngineTranscribeMedicalSettings: se_EngineTranscribeMedicalSettings( - input.EngineTranscribeMedicalSettings, - context - ), - }), - ...(input.EngineTranscribeSettings != null && { - EngineTranscribeSettings: se_EngineTranscribeSettings(input.EngineTranscribeSettings, context), - }), - }; -}; - -/** - * serializeAws_restJson1UpdatePhoneNumberRequestItem - */ -const se_UpdatePhoneNumberRequestItem = (input: UpdatePhoneNumberRequestItem, context: __SerdeContext): any => { - return { - ...(input.CallingName != null && { CallingName: input.CallingName }), - ...(input.PhoneNumberId != null && { PhoneNumberId: input.PhoneNumberId }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - }; -}; - -/** - * serializeAws_restJson1UpdatePhoneNumberRequestItemList - */ -const se_UpdatePhoneNumberRequestItemList = (input: UpdatePhoneNumberRequestItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdatePhoneNumberRequestItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1UpdateUserRequestItem - */ -const se_UpdateUserRequestItem = (input: UpdateUserRequestItem, context: __SerdeContext): any => { - return { - ...(input.AlexaForBusinessMetadata != null && { - AlexaForBusinessMetadata: se_AlexaForBusinessMetadata(input.AlexaForBusinessMetadata, context), - }), - ...(input.LicenseType != null && { LicenseType: input.LicenseType }), - ...(input.UserId != null && { UserId: input.UserId }), - ...(input.UserType != null && { UserType: input.UserType }), - }; -}; - -/** - * serializeAws_restJson1UpdateUserRequestItemList - */ -const se_UpdateUserRequestItemList = (input: UpdateUserRequestItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateUserRequestItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1UserEmailList - */ -const se_UserEmailList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1UserIdList - */ -const se_UserIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1UserSettings - */ -const se_UserSettings = (input: UserSettings, context: __SerdeContext): any => { - return { - ...(input.Telephony != null && { Telephony: se_TelephonySettings(input.Telephony, context) }), - }; -}; - -/** - * serializeAws_restJson1VideoArtifactsConfiguration - */ -const se_VideoArtifactsConfiguration = (input: VideoArtifactsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MuxType != null && { MuxType: input.MuxType }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_restJson1VoiceConnectorItem - */ -const se_VoiceConnectorItem = (input: VoiceConnectorItem, context: __SerdeContext): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.VoiceConnectorId != null && { VoiceConnectorId: input.VoiceConnectorId }), - }; -}; - -/** - * serializeAws_restJson1VoiceConnectorItemList - */ -const se_VoiceConnectorItemList = (input: VoiceConnectorItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VoiceConnectorItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1VoiceConnectorSettings - */ -const se_VoiceConnectorSettings = (input: VoiceConnectorSettings, context: __SerdeContext): any => { - return { - ...(input.CdrBucket != null && { CdrBucket: input.CdrBucket }), - }; -}; - -/** - * deserializeAws_restJson1Account - */ -const de_Account = (output: any, context: __SerdeContext): Account => { - return { - AccountId: __expectString(output.AccountId), - AccountStatus: __expectString(output.AccountStatus), - AccountType: __expectString(output.AccountType), - AwsAccountId: __expectString(output.AwsAccountId), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - DefaultLicense: __expectString(output.DefaultLicense), - Name: __expectString(output.Name), - SigninDelegateGroups: - output.SigninDelegateGroups != null - ? de_SigninDelegateGroupList(output.SigninDelegateGroups, context) - : undefined, - SupportedLicenses: output.SupportedLicenses != null ? de_LicenseList(output.SupportedLicenses, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AccountList - */ -const de_AccountList = (output: any, context: __SerdeContext): Account[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Account(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AccountSettings - */ -const de_AccountSettings = (output: any, context: __SerdeContext): AccountSettings => { - return { - DisableRemoteControl: __expectBoolean(output.DisableRemoteControl), - EnableDialOut: __expectBoolean(output.EnableDialOut), - } as any; -}; - -/** - * deserializeAws_restJson1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - city: __expectString(output.city), - country: __expectString(output.country), - postDirectional: __expectString(output.postDirectional), - postalCode: __expectString(output.postalCode), - postalCodePlus4: __expectString(output.postalCodePlus4), - preDirectional: __expectString(output.preDirectional), - state: __expectString(output.state), - streetName: __expectString(output.streetName), - streetNumber: __expectString(output.streetNumber), - streetSuffix: __expectString(output.streetSuffix), - } as any; -}; - -/** - * deserializeAws_restJson1AlexaForBusinessMetadata - */ -const de_AlexaForBusinessMetadata = (output: any, context: __SerdeContext): AlexaForBusinessMetadata => { - return { - AlexaForBusinessRoomArn: __expectString(output.AlexaForBusinessRoomArn), - IsAlexaForBusinessEnabled: __expectBoolean(output.IsAlexaForBusinessEnabled), - } as any; -}; - -/** - * deserializeAws_restJson1AppInstance - */ -const de_AppInstance = (output: any, context: __SerdeContext): AppInstance => { - return { - AppInstanceArn: __expectString(output.AppInstanceArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceAdmin - */ -const de_AppInstanceAdmin = (output: any, context: __SerdeContext): AppInstanceAdmin => { - return { - Admin: output.Admin != null ? de_Identity(output.Admin, context) : undefined, - AppInstanceArn: __expectString(output.AppInstanceArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceAdminList - */ -const de_AppInstanceAdminList = (output: any, context: __SerdeContext): AppInstanceAdminSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceAdminSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AppInstanceAdminSummary - */ -const de_AppInstanceAdminSummary = (output: any, context: __SerdeContext): AppInstanceAdminSummary => { - return { - Admin: output.Admin != null ? de_Identity(output.Admin, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceList - */ -const de_AppInstanceList = (output: any, context: __SerdeContext): AppInstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AppInstanceRetentionSettings - */ -const de_AppInstanceRetentionSettings = (output: any, context: __SerdeContext): AppInstanceRetentionSettings => { - return { - ChannelRetentionSettings: - output.ChannelRetentionSettings != null - ? de_ChannelRetentionSettings(output.ChannelRetentionSettings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceStreamingConfiguration - */ -const de_AppInstanceStreamingConfiguration = ( - output: any, - context: __SerdeContext -): AppInstanceStreamingConfiguration => { - return { - AppInstanceDataType: __expectString(output.AppInstanceDataType), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceStreamingConfigurationList - */ -const de_AppInstanceStreamingConfigurationList = ( - output: any, - context: __SerdeContext -): AppInstanceStreamingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceStreamingConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AppInstanceSummary - */ -const de_AppInstanceSummary = (output: any, context: __SerdeContext): AppInstanceSummary => { - return { - AppInstanceArn: __expectString(output.AppInstanceArn), - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceUser - */ -const de_AppInstanceUser = (output: any, context: __SerdeContext): AppInstanceUser => { - return { - AppInstanceUserArn: __expectString(output.AppInstanceUserArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceUserList - */ -const de_AppInstanceUserList = (output: any, context: __SerdeContext): AppInstanceUserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInstanceUserSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AppInstanceUserMembershipSummary - */ -const de_AppInstanceUserMembershipSummary = ( - output: any, - context: __SerdeContext -): AppInstanceUserMembershipSummary => { - return { - ReadMarkerTimestamp: - output.ReadMarkerTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadMarkerTimestamp))) - : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AppInstanceUserSummary - */ -const de_AppInstanceUserSummary = (output: any, context: __SerdeContext): AppInstanceUserSummary => { - return { - AppInstanceUserArn: __expectString(output.AppInstanceUserArn), - Metadata: __expectString(output.Metadata), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1ArtifactsConfiguration - */ -const de_ArtifactsConfiguration = (output: any, context: __SerdeContext): ArtifactsConfiguration => { - return { - Audio: output.Audio != null ? de_AudioArtifactsConfiguration(output.Audio, context) : undefined, - Content: output.Content != null ? de_ContentArtifactsConfiguration(output.Content, context) : undefined, - Video: output.Video != null ? de_VideoArtifactsConfiguration(output.Video, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Attendee - */ -const de_Attendee = (output: any, context: __SerdeContext): Attendee => { - return { - AttendeeId: __expectString(output.AttendeeId), - ExternalUserId: __expectString(output.ExternalUserId), - JoinToken: __expectString(output.JoinToken), - } as any; -}; - -/** - * deserializeAws_restJson1AttendeeIdList - */ -const de_AttendeeIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AttendeeList - */ -const de_AttendeeList = (output: any, context: __SerdeContext): Attendee[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attendee(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AudioArtifactsConfiguration - */ -const de_AudioArtifactsConfiguration = (output: any, context: __SerdeContext): AudioArtifactsConfiguration => { - return { - MuxType: __expectString(output.MuxType), - } as any; -}; - -/** - * deserializeAws_restJson1BatchChannelMemberships - */ -const de_BatchChannelMemberships = (output: any, context: __SerdeContext): BatchChannelMemberships => { - return { - ChannelArn: __expectString(output.ChannelArn), - InvitedBy: output.InvitedBy != null ? de_Identity(output.InvitedBy, context) : undefined, - Members: output.Members != null ? de_Members(output.Members, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1BatchCreateAttendeeErrorList - */ -const de_BatchCreateAttendeeErrorList = (output: any, context: __SerdeContext): CreateAttendeeError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CreateAttendeeError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchCreateChannelMembershipError - */ -const de_BatchCreateChannelMembershipError = ( - output: any, - context: __SerdeContext -): BatchCreateChannelMembershipError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - MemberArn: __expectString(output.MemberArn), - } as any; -}; - -/** - * deserializeAws_restJson1BatchCreateChannelMembershipErrors - */ -const de_BatchCreateChannelMembershipErrors = ( - output: any, - context: __SerdeContext -): BatchCreateChannelMembershipError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchCreateChannelMembershipError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Bot - */ -const de_Bot = (output: any, context: __SerdeContext): Bot => { - return { - BotEmail: __expectString(output.BotEmail), - BotId: __expectString(output.BotId), - BotType: __expectString(output.BotType), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Disabled: __expectBoolean(output.Disabled), - DisplayName: __expectString(output.DisplayName), - SecurityToken: __expectString(output.SecurityToken), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - UserId: __expectString(output.UserId), - } as any; -}; - -/** - * deserializeAws_restJson1BotList - */ -const de_BotList = (output: any, context: __SerdeContext): Bot[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Bot(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BusinessCallingSettings - */ -const de_BusinessCallingSettings = (output: any, context: __SerdeContext): BusinessCallingSettings => { - return { - CdrBucket: __expectString(output.CdrBucket), - } as any; -}; - -/** - * deserializeAws_restJson1CallingRegionList - */ -const de_CallingRegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CandidateAddress - */ -const de_CandidateAddress = (output: any, context: __SerdeContext): CandidateAddress => { - return { - city: __expectString(output.city), - country: __expectString(output.country), - postalCode: __expectString(output.postalCode), - postalCodePlus4: __expectString(output.postalCodePlus4), - state: __expectString(output.state), - streetInfo: __expectString(output.streetInfo), - streetNumber: __expectString(output.streetNumber), - } as any; -}; - -/** - * deserializeAws_restJson1CandidateAddressList - */ -const de_CandidateAddressList = (output: any, context: __SerdeContext): CandidateAddress[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CandidateAddress(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CapabilityList - */ -const de_CapabilityList = (output: any, context: __SerdeContext): (Capability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Channel - */ -const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedBy: output.CreatedBy != null ? de_Identity(output.CreatedBy, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastMessageTimestamp: - output.LastMessageTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastMessageTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Mode: __expectString(output.Mode), - Name: __expectString(output.Name), - Privacy: __expectString(output.Privacy), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelBan - */ -const de_ChannelBan = (output: any, context: __SerdeContext): ChannelBan => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedBy: output.CreatedBy != null ? de_Identity(output.CreatedBy, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelBanSummary - */ -const de_ChannelBanSummary = (output: any, context: __SerdeContext): ChannelBanSummary => { - return { - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelBanSummaryList - */ -const de_ChannelBanSummaryList = (output: any, context: __SerdeContext): ChannelBanSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelBanSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelMembership - */ -const de_ChannelMembership = (output: any, context: __SerdeContext): ChannelMembership => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - InvitedBy: output.InvitedBy != null ? de_Identity(output.InvitedBy, context) : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummary - */ -const de_ChannelMembershipForAppInstanceUserSummary = ( - output: any, - context: __SerdeContext -): ChannelMembershipForAppInstanceUserSummary => { - return { - AppInstanceUserMembershipSummary: - output.AppInstanceUserMembershipSummary != null - ? de_AppInstanceUserMembershipSummary(output.AppInstanceUserMembershipSummary, context) - : undefined, - ChannelSummary: output.ChannelSummary != null ? de_ChannelSummary(output.ChannelSummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummaryList - */ -const de_ChannelMembershipForAppInstanceUserSummaryList = ( - output: any, - context: __SerdeContext -): ChannelMembershipForAppInstanceUserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelMembershipForAppInstanceUserSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelMembershipSummary - */ -const de_ChannelMembershipSummary = (output: any, context: __SerdeContext): ChannelMembershipSummary => { - return { - Member: output.Member != null ? de_Identity(output.Member, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelMembershipSummaryList - */ -const de_ChannelMembershipSummaryList = (output: any, context: __SerdeContext): ChannelMembershipSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelMembershipSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelMessage - */ -const de_ChannelMessage = (output: any, context: __SerdeContext): ChannelMessage => { - return { - ChannelArn: __expectString(output.ChannelArn), - Content: __expectString(output.Content), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastEditedTimestamp: - output.LastEditedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastEditedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - MessageId: __expectString(output.MessageId), - Metadata: __expectString(output.Metadata), - Persistence: __expectString(output.Persistence), - Redacted: __expectBoolean(output.Redacted), - Sender: output.Sender != null ? de_Identity(output.Sender, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelMessageSummary - */ -const de_ChannelMessageSummary = (output: any, context: __SerdeContext): ChannelMessageSummary => { - return { - Content: __expectString(output.Content), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - LastEditedTimestamp: - output.LastEditedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastEditedTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - MessageId: __expectString(output.MessageId), - Metadata: __expectString(output.Metadata), - Redacted: __expectBoolean(output.Redacted), - Sender: output.Sender != null ? de_Identity(output.Sender, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelMessageSummaryList - */ -const de_ChannelMessageSummaryList = (output: any, context: __SerdeContext): ChannelMessageSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelMessageSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummary - */ -const de_ChannelModeratedByAppInstanceUserSummary = ( - output: any, - context: __SerdeContext -): ChannelModeratedByAppInstanceUserSummary => { - return { - ChannelSummary: output.ChannelSummary != null ? de_ChannelSummary(output.ChannelSummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummaryList - */ -const de_ChannelModeratedByAppInstanceUserSummaryList = ( - output: any, - context: __SerdeContext -): ChannelModeratedByAppInstanceUserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelModeratedByAppInstanceUserSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelModerator - */ -const de_ChannelModerator = (output: any, context: __SerdeContext): ChannelModerator => { - return { - ChannelArn: __expectString(output.ChannelArn), - CreatedBy: output.CreatedBy != null ? de_Identity(output.CreatedBy, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Moderator: output.Moderator != null ? de_Identity(output.Moderator, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelModeratorSummary - */ -const de_ChannelModeratorSummary = (output: any, context: __SerdeContext): ChannelModeratorSummary => { - return { - Moderator: output.Moderator != null ? de_Identity(output.Moderator, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelModeratorSummaryList - */ -const de_ChannelModeratorSummaryList = (output: any, context: __SerdeContext): ChannelModeratorSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelModeratorSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelRetentionSettings - */ -const de_ChannelRetentionSettings = (output: any, context: __SerdeContext): ChannelRetentionSettings => { - return { - RetentionDays: __expectInt32(output.RetentionDays), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelSummary - */ -const de_ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => { - return { - ChannelArn: __expectString(output.ChannelArn), - LastMessageTimestamp: - output.LastMessageTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastMessageTimestamp))) - : undefined, - Metadata: __expectString(output.Metadata), - Mode: __expectString(output.Mode), - Name: __expectString(output.Name), - Privacy: __expectString(output.Privacy), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelSummaryList - */ -const de_ChannelSummaryList = (output: any, context: __SerdeContext): ChannelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChimeSdkMeetingConfiguration - */ -const de_ChimeSdkMeetingConfiguration = (output: any, context: __SerdeContext): ChimeSdkMeetingConfiguration => { - return { - ArtifactsConfiguration: - output.ArtifactsConfiguration != null - ? de_ArtifactsConfiguration(output.ArtifactsConfiguration, context) - : undefined, - SourceConfiguration: - output.SourceConfiguration != null ? de_SourceConfiguration(output.SourceConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ContentArtifactsConfiguration - */ -const de_ContentArtifactsConfiguration = (output: any, context: __SerdeContext): ContentArtifactsConfiguration => { - return { - MuxType: __expectString(output.MuxType), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1ConversationRetentionSettings - */ -const de_ConversationRetentionSettings = (output: any, context: __SerdeContext): ConversationRetentionSettings => { - return { - RetentionDays: __expectInt32(output.RetentionDays), - } as any; -}; - -/** - * deserializeAws_restJson1CreateAttendeeError - */ -const de_CreateAttendeeError = (output: any, context: __SerdeContext): CreateAttendeeError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ExternalUserId: __expectString(output.ExternalUserId), - } as any; -}; - -/** - * deserializeAws_restJson1DNISEmergencyCallingConfiguration - */ -const de_DNISEmergencyCallingConfiguration = ( - output: any, - context: __SerdeContext -): DNISEmergencyCallingConfiguration => { - return { - CallingCountry: __expectString(output.CallingCountry), - EmergencyPhoneNumber: __expectString(output.EmergencyPhoneNumber), - TestPhoneNumber: __expectString(output.TestPhoneNumber), - } as any; -}; - -/** - * deserializeAws_restJson1DNISEmergencyCallingConfigurationList - */ -const de_DNISEmergencyCallingConfigurationList = ( - output: any, - context: __SerdeContext -): DNISEmergencyCallingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DNISEmergencyCallingConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1E164PhoneNumberList - */ -const de_E164PhoneNumberList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EmergencyCallingConfiguration - */ -const de_EmergencyCallingConfiguration = (output: any, context: __SerdeContext): EmergencyCallingConfiguration => { - return { - DNIS: output.DNIS != null ? de_DNISEmergencyCallingConfigurationList(output.DNIS, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EventsConfiguration - */ -const de_EventsConfiguration = (output: any, context: __SerdeContext): EventsConfiguration => { - return { - BotId: __expectString(output.BotId), - LambdaFunctionArn: __expectString(output.LambdaFunctionArn), - OutboundEventsHTTPSEndpoint: __expectString(output.OutboundEventsHTTPSEndpoint), - } as any; -}; - -/** - * deserializeAws_restJson1ExternalUserIdList - */ -const de_ExternalUserIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GeoMatchParams - */ -const de_GeoMatchParams = (output: any, context: __SerdeContext): GeoMatchParams => { - return { - AreaCode: __expectString(output.AreaCode), - Country: __expectString(output.Country), - } as any; -}; - -/** - * deserializeAws_restJson1Identity - */ -const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1Invite - */ -const de_Invite = (output: any, context: __SerdeContext): Invite => { - return { - EmailAddress: __expectString(output.EmailAddress), - EmailStatus: __expectString(output.EmailStatus), - InviteId: __expectString(output.InviteId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1InviteList - */ -const de_InviteList = (output: any, context: __SerdeContext): Invite[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Invite(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LicenseList - */ -const de_LicenseList = (output: any, context: __SerdeContext): (License | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - EnableMediaMetricLogs: __expectBoolean(output.EnableMediaMetricLogs), - EnableSIPLogs: __expectBoolean(output.EnableSIPLogs), - } as any; -}; - -/** - * deserializeAws_restJson1MediaCapturePipeline - */ -const de_MediaCapturePipeline = (output: any, context: __SerdeContext): MediaCapturePipeline => { - return { - ChimeSdkMeetingConfiguration: - output.ChimeSdkMeetingConfiguration != null - ? de_ChimeSdkMeetingConfiguration(output.ChimeSdkMeetingConfiguration, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - MediaPipelineId: __expectString(output.MediaPipelineId), - SinkArn: __expectString(output.SinkArn), - SinkType: __expectString(output.SinkType), - SourceArn: __expectString(output.SourceArn), - SourceType: __expectString(output.SourceType), - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MediaCapturePipelineList - */ -const de_MediaCapturePipelineList = (output: any, context: __SerdeContext): MediaCapturePipeline[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MediaCapturePipeline(entry, context); - }); - return retVal; +const de_ChannelBan = (output: any, context: __SerdeContext): ChannelBan => { + return take(output, { + ChannelArn: __expectString, + CreatedBy: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Member: _json, + }) as any; }; +// de_ChannelBanSummary omitted. + +// de_ChannelBanSummaryList omitted. + /** - * deserializeAws_restJson1MediaPlacement + * deserializeAws_restJson1ChannelMembership */ -const de_MediaPlacement = (output: any, context: __SerdeContext): MediaPlacement => { - return { - AudioFallbackUrl: __expectString(output.AudioFallbackUrl), - AudioHostUrl: __expectString(output.AudioHostUrl), - EventIngestionUrl: __expectString(output.EventIngestionUrl), - ScreenDataUrl: __expectString(output.ScreenDataUrl), - ScreenSharingUrl: __expectString(output.ScreenSharingUrl), - ScreenViewingUrl: __expectString(output.ScreenViewingUrl), - SignalingUrl: __expectString(output.SignalingUrl), - TurnControlUrl: __expectString(output.TurnControlUrl), - } as any; +const de_ChannelMembership = (output: any, context: __SerdeContext): ChannelMembership => { + return take(output, { + ChannelArn: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InvitedBy: _json, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Member: _json, + Type: __expectString, + }) as any; }; /** - * deserializeAws_restJson1Meeting + * deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummary */ -const de_Meeting = (output: any, context: __SerdeContext): Meeting => { - return { - ExternalMeetingId: __expectString(output.ExternalMeetingId), - MediaPlacement: output.MediaPlacement != null ? de_MediaPlacement(output.MediaPlacement, context) : undefined, - MediaRegion: __expectString(output.MediaRegion), - MeetingId: __expectString(output.MeetingId), - } as any; +const de_ChannelMembershipForAppInstanceUserSummary = ( + output: any, + context: __SerdeContext +): ChannelMembershipForAppInstanceUserSummary => { + return take(output, { + AppInstanceUserMembershipSummary: (_: any) => de_AppInstanceUserMembershipSummary(_, context), + ChannelSummary: (_: any) => de_ChannelSummary(_, context), + }) as any; }; /** - * deserializeAws_restJson1MeetingList + * deserializeAws_restJson1ChannelMembershipForAppInstanceUserSummaryList */ -const de_MeetingList = (output: any, context: __SerdeContext): Meeting[] => { +const de_ChannelMembershipForAppInstanceUserSummaryList = ( + output: any, + context: __SerdeContext +): ChannelMembershipForAppInstanceUserSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Meeting(entry, context); + return de_ChannelMembershipForAppInstanceUserSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Member - */ -const de_Member = (output: any, context: __SerdeContext): Member => { - return { - AccountId: __expectString(output.AccountId), - Email: __expectString(output.Email), - FullName: __expectString(output.FullName), - MemberId: __expectString(output.MemberId), - MemberType: __expectString(output.MemberType), - } as any; -}; +// de_ChannelMembershipSummary omitted. + +// de_ChannelMembershipSummaryList omitted. /** - * deserializeAws_restJson1MemberError + * deserializeAws_restJson1ChannelMessage */ -const de_MemberError = (output: any, context: __SerdeContext): MemberError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - MemberId: __expectString(output.MemberId), - } as any; +const de_ChannelMessage = (output: any, context: __SerdeContext): ChannelMessage => { + return take(output, { + ChannelArn: __expectString, + Content: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastEditedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MessageId: __expectString, + Metadata: __expectString, + Persistence: __expectString, + Redacted: __expectBoolean, + Sender: _json, + Type: __expectString, + }) as any; }; /** - * deserializeAws_restJson1MemberErrorList + * deserializeAws_restJson1ChannelMessageSummary */ -const de_MemberErrorList = (output: any, context: __SerdeContext): MemberError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MemberError(entry, context); - }); - return retVal; +const de_ChannelMessageSummary = (output: any, context: __SerdeContext): ChannelMessageSummary => { + return take(output, { + Content: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastEditedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MessageId: __expectString, + Metadata: __expectString, + Redacted: __expectBoolean, + Sender: _json, + Type: __expectString, + }) as any; }; /** - * deserializeAws_restJson1Members + * deserializeAws_restJson1ChannelMessageSummaryList */ -const de_Members = (output: any, context: __SerdeContext): Identity[] => { +const de_ChannelMessageSummaryList = (output: any, context: __SerdeContext): ChannelMessageSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Identity(entry, context); + return de_ChannelMessageSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1MessagingSessionEndpoint - */ -const de_MessagingSessionEndpoint = (output: any, context: __SerdeContext): MessagingSessionEndpoint => { - return { - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1OrderedPhoneNumber + * deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummary */ -const de_OrderedPhoneNumber = (output: any, context: __SerdeContext): OrderedPhoneNumber => { - return { - E164PhoneNumber: __expectString(output.E164PhoneNumber), - Status: __expectString(output.Status), - } as any; +const de_ChannelModeratedByAppInstanceUserSummary = ( + output: any, + context: __SerdeContext +): ChannelModeratedByAppInstanceUserSummary => { + return take(output, { + ChannelSummary: (_: any) => de_ChannelSummary(_, context), + }) as any; }; /** - * deserializeAws_restJson1OrderedPhoneNumberList + * deserializeAws_restJson1ChannelModeratedByAppInstanceUserSummaryList */ -const de_OrderedPhoneNumberList = (output: any, context: __SerdeContext): OrderedPhoneNumber[] => { +const de_ChannelModeratedByAppInstanceUserSummaryList = ( + output: any, + context: __SerdeContext +): ChannelModeratedByAppInstanceUserSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrderedPhoneNumber(entry, context); + return de_ChannelModeratedByAppInstanceUserSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1Origination + * deserializeAws_restJson1ChannelModerator */ -const de_Origination = (output: any, context: __SerdeContext): Origination => { - return { - Disabled: __expectBoolean(output.Disabled), - Routes: output.Routes != null ? de_OriginationRouteList(output.Routes, context) : undefined, - } as any; +const de_ChannelModerator = (output: any, context: __SerdeContext): ChannelModerator => { + return take(output, { + ChannelArn: __expectString, + CreatedBy: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Moderator: _json, + }) as any; }; +// de_ChannelModeratorSummary omitted. + +// de_ChannelModeratorSummaryList omitted. + +// de_ChannelRetentionSettings omitted. + /** - * deserializeAws_restJson1OriginationRoute + * deserializeAws_restJson1ChannelSummary */ -const de_OriginationRoute = (output: any, context: __SerdeContext): OriginationRoute => { - return { - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - Priority: __expectInt32(output.Priority), - Protocol: __expectString(output.Protocol), - Weight: __expectInt32(output.Weight), - } as any; +const de_ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => { + return take(output, { + ChannelArn: __expectString, + LastMessageTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: __expectString, + Mode: __expectString, + Name: __expectString, + Privacy: __expectString, + }) as any; }; /** - * deserializeAws_restJson1OriginationRouteList + * deserializeAws_restJson1ChannelSummaryList */ -const de_OriginationRouteList = (output: any, context: __SerdeContext): OriginationRoute[] => { +const de_ChannelSummaryList = (output: any, context: __SerdeContext): ChannelSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OriginationRoute(entry, context); + return de_ChannelSummary(entry, context); }); return retVal; }; +// de_ChimeSdkMeetingConfiguration omitted. + +// de_ContentArtifactsConfiguration omitted. + +// de_ConversationRetentionSettings omitted. + +// de_CreateAttendeeError omitted. + +// de_DNISEmergencyCallingConfiguration omitted. + +// de_DNISEmergencyCallingConfigurationList omitted. + +// de_E164PhoneNumberList omitted. + +// de_EmergencyCallingConfiguration omitted. + +// de_EventsConfiguration omitted. + +// de_ExternalUserIdList omitted. + +// de_GeoMatchParams omitted. + +// de_Identity omitted. + +// de_Invite omitted. + +// de_InviteList omitted. + +// de_LicenseList omitted. + +// de_LoggingConfiguration omitted. + /** - * deserializeAws_restJson1Participant + * deserializeAws_restJson1MediaCapturePipeline */ -const de_Participant = (output: any, context: __SerdeContext): Participant => { - return { - PhoneNumber: __expectString(output.PhoneNumber), - ProxyPhoneNumber: __expectString(output.ProxyPhoneNumber), - } as any; +const de_MediaCapturePipeline = (output: any, context: __SerdeContext): MediaCapturePipeline => { + return take(output, { + ChimeSdkMeetingConfiguration: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MediaPipelineId: __expectString, + SinkArn: __expectString, + SinkType: __expectString, + SourceArn: __expectString, + SourceType: __expectString, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** - * deserializeAws_restJson1Participants + * deserializeAws_restJson1MediaCapturePipelineList */ -const de_Participants = (output: any, context: __SerdeContext): Participant[] => { +const de_MediaCapturePipelineList = (output: any, context: __SerdeContext): MediaCapturePipeline[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Participant(entry, context); + return de_MediaCapturePipeline(entry, context); }); return retVal; }; +// de_MediaPlacement omitted. + +// de_Meeting omitted. + +// de_MeetingList omitted. + +// de_Member omitted. + +// de_MemberError omitted. + +// de_MemberErrorList omitted. + +// de_Members omitted. + +// de_MessagingSessionEndpoint omitted. + +// de_OrderedPhoneNumber omitted. + +// de_OrderedPhoneNumberList omitted. + +// de_Origination omitted. + +// de_OriginationRoute omitted. + +// de_OriginationRouteList omitted. + +// de_Participant omitted. + +// de_Participants omitted. + /** * deserializeAws_restJson1PhoneNumber */ const de_PhoneNumber = (output: any, context: __SerdeContext): PhoneNumber => { - return { - Associations: output.Associations != null ? de_PhoneNumberAssociationList(output.Associations, context) : undefined, - CallingName: __expectString(output.CallingName), - CallingNameStatus: __expectString(output.CallingNameStatus), - Capabilities: output.Capabilities != null ? de_PhoneNumberCapabilities(output.Capabilities, context) : undefined, - Country: __expectString(output.Country), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - DeletionTimestamp: - output.DeletionTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.DeletionTimestamp)) - : undefined, - E164PhoneNumber: __expectString(output.E164PhoneNumber), - PhoneNumberId: __expectString(output.PhoneNumberId), - ProductType: __expectString(output.ProductType), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + Associations: (_: any) => de_PhoneNumberAssociationList(_, context), + CallingName: __expectString, + CallingNameStatus: __expectString, + Capabilities: _json, + Country: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DeletionTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + E164PhoneNumber: __expectString, + PhoneNumberId: __expectString, + ProductType: __expectString, + Status: __expectString, + Type: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1PhoneNumberAssociation */ const de_PhoneNumberAssociation = (output: any, context: __SerdeContext): PhoneNumberAssociation => { - return { - AssociatedTimestamp: - output.AssociatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.AssociatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; + return take(output, { + AssociatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + Value: __expectString, + }) as any; }; /** @@ -21969,81 +20317,20 @@ const de_PhoneNumberAssociationList = (output: any, context: __SerdeContext): Ph const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumberAssociation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PhoneNumberCapabilities - */ -const de_PhoneNumberCapabilities = (output: any, context: __SerdeContext): PhoneNumberCapabilities => { - return { - InboundCall: __expectBoolean(output.InboundCall), - InboundMMS: __expectBoolean(output.InboundMMS), - InboundSMS: __expectBoolean(output.InboundSMS), - OutboundCall: __expectBoolean(output.OutboundCall), - OutboundMMS: __expectBoolean(output.OutboundMMS), - OutboundSMS: __expectBoolean(output.OutboundSMS), - } as any; -}; +// de_PhoneNumberCapabilities omitted. -/** - * deserializeAws_restJson1PhoneNumberCountriesList - */ -const de_PhoneNumberCountriesList = (output: any, context: __SerdeContext): PhoneNumberCountry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumberCountry(entry, context); - }); - return retVal; -}; +// de_PhoneNumberCountriesList omitted. -/** - * deserializeAws_restJson1PhoneNumberCountry - */ -const de_PhoneNumberCountry = (output: any, context: __SerdeContext): PhoneNumberCountry => { - return { - CountryCode: __expectString(output.CountryCode), - SupportedPhoneNumberTypes: - output.SupportedPhoneNumberTypes != null - ? de_PhoneNumberTypeList(output.SupportedPhoneNumberTypes, context) - : undefined, - } as any; -}; +// de_PhoneNumberCountry omitted. -/** - * deserializeAws_restJson1PhoneNumberError - */ -const de_PhoneNumberError = (output: any, context: __SerdeContext): PhoneNumberError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - PhoneNumberId: __expectString(output.PhoneNumberId), - } as any; -}; +// de_PhoneNumberError omitted. -/** - * deserializeAws_restJson1PhoneNumberErrorList - */ -const de_PhoneNumberErrorList = (output: any, context: __SerdeContext): PhoneNumberError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumberError(entry, context); - }); - return retVal; -}; +// de_PhoneNumberErrorList omitted. /** * deserializeAws_restJson1PhoneNumberList @@ -22052,9 +20339,6 @@ const de_PhoneNumberList = (output: any, context: __SerdeContext): PhoneNumber[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumber(entry, context); }); return retVal; @@ -22064,21 +20348,14 @@ const de_PhoneNumberList = (output: any, context: __SerdeContext): PhoneNumber[] * deserializeAws_restJson1PhoneNumberOrder */ const de_PhoneNumberOrder = (output: any, context: __SerdeContext): PhoneNumberOrder => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - OrderedPhoneNumbers: - output.OrderedPhoneNumbers != null ? de_OrderedPhoneNumberList(output.OrderedPhoneNumbers, context) : undefined, - PhoneNumberOrderId: __expectString(output.PhoneNumberOrderId), - ProductType: __expectString(output.ProductType), - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + OrderedPhoneNumbers: _json, + PhoneNumberOrderId: __expectString, + ProductType: __expectString, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -22088,70 +20365,34 @@ const de_PhoneNumberOrderList = (output: any, context: __SerdeContext): PhoneNum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumberOrder(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PhoneNumberTypeList - */ -const de_PhoneNumberTypeList = (output: any, context: __SerdeContext): (PhoneNumberType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PhoneNumberTypeList omitted. -/** - * deserializeAws_restJson1Proxy - */ -const de_Proxy = (output: any, context: __SerdeContext): Proxy => { - return { - DefaultSessionExpiryMinutes: __expectInt32(output.DefaultSessionExpiryMinutes), - Disabled: __expectBoolean(output.Disabled), - FallBackPhoneNumber: __expectString(output.FallBackPhoneNumber), - PhoneNumberCountries: - output.PhoneNumberCountries != null ? de_StringList(output.PhoneNumberCountries, context) : undefined, - } as any; -}; +// de_Proxy omitted. /** * deserializeAws_restJson1ProxySession */ const de_ProxySession = (output: any, context: __SerdeContext): ProxySession => { - return { - Capabilities: output.Capabilities != null ? de_CapabilityList(output.Capabilities, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - EndedTimestamp: - output.EndedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndedTimestamp)) - : undefined, - ExpiryMinutes: __expectInt32(output.ExpiryMinutes), - GeoMatchLevel: __expectString(output.GeoMatchLevel), - GeoMatchParams: output.GeoMatchParams != null ? de_GeoMatchParams(output.GeoMatchParams, context) : undefined, - Name: __expectString(output.Name), - NumberSelectionBehavior: __expectString(output.NumberSelectionBehavior), - Participants: output.Participants != null ? de_Participants(output.Participants, context) : undefined, - ProxySessionId: __expectString(output.ProxySessionId), - Status: __expectString(output.Status), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; + return take(output, { + Capabilities: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + EndedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExpiryMinutes: __expectInt32, + GeoMatchLevel: __expectString, + GeoMatchParams: _json, + Name: __expectString, + NumberSelectionBehavior: __expectString, + Participants: _json, + ProxySessionId: __expectString, + Status: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceConnectorId: __expectString, + }) as any; }; /** @@ -22161,48 +20402,25 @@ const de_ProxySessions = (output: any, context: __SerdeContext): ProxySession[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProxySession(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RetentionSettings - */ -const de_RetentionSettings = (output: any, context: __SerdeContext): RetentionSettings => { - return { - ConversationRetentionSettings: - output.ConversationRetentionSettings != null - ? de_ConversationRetentionSettings(output.ConversationRetentionSettings, context) - : undefined, - RoomRetentionSettings: - output.RoomRetentionSettings != null - ? de_RoomRetentionSettings(output.RoomRetentionSettings, context) - : undefined, - } as any; -}; +// de_RetentionSettings omitted. /** * deserializeAws_restJson1Room */ const de_Room = (output: any, context: __SerdeContext): Room => { - return { - AccountId: __expectString(output.AccountId), - CreatedBy: __expectString(output.CreatedBy), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - RoomId: __expectString(output.RoomId), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + AccountId: __expectString, + CreatedBy: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + RoomId: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -22212,9 +20430,6 @@ const de_RoomList = (output: any, context: __SerdeContext): Room[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Room(entry, context); }); return retVal; @@ -22224,16 +20439,13 @@ const de_RoomList = (output: any, context: __SerdeContext): Room[] => { * deserializeAws_restJson1RoomMembership */ const de_RoomMembership = (output: any, context: __SerdeContext): RoomMembership => { - return { - InvitedBy: __expectString(output.InvitedBy), - Member: output.Member != null ? de_Member(output.Member, context) : undefined, - Role: __expectString(output.Role), - RoomId: __expectString(output.RoomId), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + InvitedBy: __expectString, + Member: _json, + Role: __expectString, + RoomId: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -22243,125 +20455,40 @@ const de_RoomMembershipList = (output: any, context: __SerdeContext): RoomMember const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RoomMembership(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RoomRetentionSettings - */ -const de_RoomRetentionSettings = (output: any, context: __SerdeContext): RoomRetentionSettings => { - return { - RetentionDays: __expectInt32(output.RetentionDays), - } as any; -}; +// de_RoomRetentionSettings omitted. -/** - * deserializeAws_restJson1SelectedVideoStreams - */ -const de_SelectedVideoStreams = (output: any, context: __SerdeContext): SelectedVideoStreams => { - return { - AttendeeIds: output.AttendeeIds != null ? de_AttendeeIdList(output.AttendeeIds, context) : undefined, - ExternalUserIds: - output.ExternalUserIds != null ? de_ExternalUserIdList(output.ExternalUserIds, context) : undefined, - } as any; -}; +// de_SelectedVideoStreams omitted. -/** - * deserializeAws_restJson1SensitiveStringList - */ -const de_SensitiveStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SensitiveStringList omitted. -/** - * deserializeAws_restJson1SigninDelegateGroup - */ -const de_SigninDelegateGroup = (output: any, context: __SerdeContext): SigninDelegateGroup => { - return { - GroupName: __expectString(output.GroupName), - } as any; -}; +// de_SigninDelegateGroup omitted. -/** - * deserializeAws_restJson1SigninDelegateGroupList - */ -const de_SigninDelegateGroupList = (output: any, context: __SerdeContext): SigninDelegateGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SigninDelegateGroup(entry, context); - }); - return retVal; -}; +// de_SigninDelegateGroupList omitted. /** * deserializeAws_restJson1SipMediaApplication */ const de_SipMediaApplication = (output: any, context: __SerdeContext): SipMediaApplication => { - return { - AwsRegion: __expectString(output.AwsRegion), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Endpoints: output.Endpoints != null ? de_SipMediaApplicationEndpointList(output.Endpoints, context) : undefined, - Name: __expectString(output.Name), - SipMediaApplicationId: __expectString(output.SipMediaApplicationId), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + AwsRegion: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Endpoints: _json, + Name: __expectString, + SipMediaApplicationId: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1SipMediaApplicationCall - */ -const de_SipMediaApplicationCall = (output: any, context: __SerdeContext): SipMediaApplicationCall => { - return { - TransactionId: __expectString(output.TransactionId), - } as any; -}; +// de_SipMediaApplicationCall omitted. -/** - * deserializeAws_restJson1SipMediaApplicationEndpoint - */ -const de_SipMediaApplicationEndpoint = (output: any, context: __SerdeContext): SipMediaApplicationEndpoint => { - return { - LambdaArn: __expectString(output.LambdaArn), - } as any; -}; +// de_SipMediaApplicationEndpoint omitted. -/** - * deserializeAws_restJson1SipMediaApplicationEndpointList - */ -const de_SipMediaApplicationEndpointList = (output: any, context: __SerdeContext): SipMediaApplicationEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SipMediaApplicationEndpoint(entry, context); - }); - return retVal; -}; +// de_SipMediaApplicationEndpointList omitted. /** * deserializeAws_restJson1SipMediaApplicationList @@ -22370,49 +20497,27 @@ const de_SipMediaApplicationList = (output: any, context: __SerdeContext): SipMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SipMediaApplication(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SipMediaApplicationLoggingConfiguration - */ -const de_SipMediaApplicationLoggingConfiguration = ( - output: any, - context: __SerdeContext -): SipMediaApplicationLoggingConfiguration => { - return { - EnableSipMediaApplicationMessageLogs: __expectBoolean(output.EnableSipMediaApplicationMessageLogs), - } as any; -}; +// de_SipMediaApplicationLoggingConfiguration omitted. /** * deserializeAws_restJson1SipRule */ const de_SipRule = (output: any, context: __SerdeContext): SipRule => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Disabled: __expectBoolean(output.Disabled), - Name: __expectString(output.Name), - SipRuleId: __expectString(output.SipRuleId), - TargetApplications: - output.TargetApplications != null - ? de_SipRuleTargetApplicationList(output.TargetApplications, context) - : undefined, - TriggerType: __expectString(output.TriggerType), - TriggerValue: __expectString(output.TriggerValue), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Disabled: __expectBoolean, + Name: __expectString, + SipRuleId: __expectString, + TargetApplications: _json, + TriggerType: __expectString, + TriggerValue: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -22422,215 +20527,68 @@ const de_SipRuleList = (output: any, context: __SerdeContext): SipRule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SipRule(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SipRuleTargetApplication - */ -const de_SipRuleTargetApplication = (output: any, context: __SerdeContext): SipRuleTargetApplication => { - return { - AwsRegion: __expectString(output.AwsRegion), - Priority: __expectInt32(output.Priority), - SipMediaApplicationId: __expectString(output.SipMediaApplicationId), - } as any; -}; +// de_SipRuleTargetApplication omitted. -/** - * deserializeAws_restJson1SipRuleTargetApplicationList - */ -const de_SipRuleTargetApplicationList = (output: any, context: __SerdeContext): SipRuleTargetApplication[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SipRuleTargetApplication(entry, context); - }); - return retVal; -}; +// de_SipRuleTargetApplicationList omitted. -/** - * deserializeAws_restJson1SourceConfiguration - */ -const de_SourceConfiguration = (output: any, context: __SerdeContext): SourceConfiguration => { - return { - SelectedVideoStreams: - output.SelectedVideoStreams != null ? de_SelectedVideoStreams(output.SelectedVideoStreams, context) : undefined, - } as any; -}; +// de_SourceConfiguration omitted. -/** - * deserializeAws_restJson1StreamingConfiguration - */ -const de_StreamingConfiguration = (output: any, context: __SerdeContext): StreamingConfiguration => { - return { - DataRetentionInHours: __expectInt32(output.DataRetentionInHours), - Disabled: __expectBoolean(output.Disabled), - StreamingNotificationTargets: - output.StreamingNotificationTargets != null - ? de_StreamingNotificationTargetList(output.StreamingNotificationTargets, context) - : undefined, - } as any; -}; +// de_StreamingConfiguration omitted. -/** - * deserializeAws_restJson1StreamingNotificationTarget - */ -const de_StreamingNotificationTarget = (output: any, context: __SerdeContext): StreamingNotificationTarget => { - return { - NotificationTarget: __expectString(output.NotificationTarget), - } as any; -}; +// de_StreamingNotificationTarget omitted. -/** - * deserializeAws_restJson1StreamingNotificationTargetList - */ -const de_StreamingNotificationTargetList = (output: any, context: __SerdeContext): StreamingNotificationTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamingNotificationTarget(entry, context); - }); - return retVal; -}; +// de_StreamingNotificationTargetList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TelephonySettings - */ -const de_TelephonySettings = (output: any, context: __SerdeContext): TelephonySettings => { - return { - InboundCalling: __expectBoolean(output.InboundCalling), - OutboundCalling: __expectBoolean(output.OutboundCalling), - SMS: __expectBoolean(output.SMS), - } as any; -}; +// de_TelephonySettings omitted. -/** - * deserializeAws_restJson1Termination - */ -const de_Termination = (output: any, context: __SerdeContext): Termination => { - return { - CallingRegions: output.CallingRegions != null ? de_CallingRegionList(output.CallingRegions, context) : undefined, - CidrAllowedList: output.CidrAllowedList != null ? de_StringList(output.CidrAllowedList, context) : undefined, - CpsLimit: __expectInt32(output.CpsLimit), - DefaultPhoneNumber: __expectString(output.DefaultPhoneNumber), - Disabled: __expectBoolean(output.Disabled), - } as any; -}; +// de_Termination omitted. /** * deserializeAws_restJson1TerminationHealth */ const de_TerminationHealth = (output: any, context: __SerdeContext): TerminationHealth => { - return { - Source: __expectString(output.Source), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Timestamp)) : undefined, - } as any; + return take(output, { + Source: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1User */ const de_User = (output: any, context: __SerdeContext): User => { - return { - AccountId: __expectString(output.AccountId), - AlexaForBusinessMetadata: - output.AlexaForBusinessMetadata != null - ? de_AlexaForBusinessMetadata(output.AlexaForBusinessMetadata, context) - : undefined, - DisplayName: __expectString(output.DisplayName), - InvitedOn: - output.InvitedOn != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.InvitedOn)) : undefined, - LicenseType: __expectString(output.LicenseType), - PersonalPIN: __expectString(output.PersonalPIN), - PrimaryEmail: __expectString(output.PrimaryEmail), - PrimaryProvisionedNumber: __expectString(output.PrimaryProvisionedNumber), - RegisteredOn: - output.RegisteredOn != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.RegisteredOn)) : undefined, - UserId: __expectString(output.UserId), - UserInvitationStatus: __expectString(output.UserInvitationStatus), - UserRegistrationStatus: __expectString(output.UserRegistrationStatus), - UserType: __expectString(output.UserType), - } as any; -}; - -/** - * deserializeAws_restJson1UserError - */ -const de_UserError = (output: any, context: __SerdeContext): UserError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - UserId: __expectString(output.UserId), - } as any; -}; - -/** - * deserializeAws_restJson1UserErrorList - */ -const de_UserErrorList = (output: any, context: __SerdeContext): UserError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserError(entry, context); - }); - return retVal; + return take(output, { + AccountId: __expectString, + AlexaForBusinessMetadata: _json, + DisplayName: __expectString, + InvitedOn: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LicenseType: __expectString, + PersonalPIN: __expectString, + PrimaryEmail: __expectString, + PrimaryProvisionedNumber: __expectString, + RegisteredOn: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + UserId: __expectString, + UserInvitationStatus: __expectString, + UserRegistrationStatus: __expectString, + UserType: __expectString, + }) as any; }; +// de_UserError omitted. + +// de_UserErrorList omitted. + /** * deserializeAws_restJson1UserList */ @@ -22638,74 +20596,43 @@ const de_UserList = (output: any, context: __SerdeContext): User[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_User(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1UserSettings - */ -const de_UserSettings = (output: any, context: __SerdeContext): UserSettings => { - return { - Telephony: output.Telephony != null ? de_TelephonySettings(output.Telephony, context) : undefined, - } as any; -}; +// de_UserSettings omitted. -/** - * deserializeAws_restJson1VideoArtifactsConfiguration - */ -const de_VideoArtifactsConfiguration = (output: any, context: __SerdeContext): VideoArtifactsConfiguration => { - return { - MuxType: __expectString(output.MuxType), - State: __expectString(output.State), - } as any; -}; +// de_VideoArtifactsConfiguration omitted. /** * deserializeAws_restJson1VoiceConnector */ const de_VoiceConnector = (output: any, context: __SerdeContext): VoiceConnector => { - return { - AwsRegion: __expectString(output.AwsRegion), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - OutboundHostName: __expectString(output.OutboundHostName), - RequireEncryption: __expectBoolean(output.RequireEncryption), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceConnectorArn: __expectString(output.VoiceConnectorArn), - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; + return take(output, { + AwsRegion: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + OutboundHostName: __expectString, + RequireEncryption: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceConnectorArn: __expectString, + VoiceConnectorId: __expectString, + }) as any; }; /** * deserializeAws_restJson1VoiceConnectorGroup */ const de_VoiceConnectorGroup = (output: any, context: __SerdeContext): VoiceConnectorGroup => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTimestamp)) - : undefined, - Name: __expectString(output.Name), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTimestamp)) - : undefined, - VoiceConnectorGroupArn: __expectString(output.VoiceConnectorGroupArn), - VoiceConnectorGroupId: __expectString(output.VoiceConnectorGroupId), - VoiceConnectorItems: - output.VoiceConnectorItems != null ? de_VoiceConnectorItemList(output.VoiceConnectorItems, context) : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VoiceConnectorGroupArn: __expectString, + VoiceConnectorGroupId: __expectString, + VoiceConnectorItems: _json, + }) as any; }; /** @@ -22715,38 +20642,14 @@ const de_VoiceConnectorGroupList = (output: any, context: __SerdeContext): Voice const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VoiceConnectorGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VoiceConnectorItem - */ -const de_VoiceConnectorItem = (output: any, context: __SerdeContext): VoiceConnectorItem => { - return { - Priority: __expectInt32(output.Priority), - VoiceConnectorId: __expectString(output.VoiceConnectorId), - } as any; -}; +// de_VoiceConnectorItem omitted. -/** - * deserializeAws_restJson1VoiceConnectorItemList - */ -const de_VoiceConnectorItemList = (output: any, context: __SerdeContext): VoiceConnectorItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VoiceConnectorItem(entry, context); - }); - return retVal; -}; +// de_VoiceConnectorItemList omitted. /** * deserializeAws_restJson1VoiceConnectorList @@ -22755,22 +20658,12 @@ const de_VoiceConnectorList = (output: any, context: __SerdeContext): VoiceConne const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VoiceConnector(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VoiceConnectorSettings - */ -const de_VoiceConnectorSettings = (output: any, context: __SerdeContext): VoiceConnectorSettings => { - return { - CdrBucket: __expectString(output.CdrBucket), - } as any; -}; +// de_VoiceConnectorSettings omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-cleanrooms/src/protocols/Aws_restJson1.ts b/clients/client-cleanrooms/src/protocols/Aws_restJson1.ts index 1116f64425a3..8e3710eecbba 100644 --- a/clients/client-cleanrooms/src/protocols/Aws_restJson1.ts +++ b/clients/client-cleanrooms/src/protocols/Aws_restJson1.ts @@ -1,10 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, @@ -12,10 +10,11 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -131,18 +130,12 @@ import { AnalysisRule, AnalysisRuleAggregation, AnalysisRuleList, - AnalysisRulePolicy, - AnalysisRulePolicyV1, - AnalysisRuleType, - BatchGetSchemaError, Collaboration, CollaborationSummary, - Column, ConfiguredTable, ConfiguredTableAnalysisRule, ConfiguredTableAnalysisRulePolicy, ConfiguredTableAnalysisRulePolicyV1, - ConfiguredTableAnalysisRuleType, ConfiguredTableAssociation, ConfiguredTableAssociationSummary, ConfiguredTableSummary, @@ -156,15 +149,10 @@ import { MemberSpecification, MemberSummary, ProtectedQuery, - ProtectedQueryError, - ProtectedQueryOutput, ProtectedQueryOutputConfiguration, - ProtectedQueryResult, ProtectedQueryResultConfiguration, - ProtectedQueryS3Output, ProtectedQueryS3OutputConfiguration, ProtectedQuerySQLParameters, - ProtectedQueryStatistics, ProtectedQuerySummary, ResourceNotFoundException, ScalarFunctions, @@ -174,7 +162,6 @@ import { TableReference, ThrottlingException, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -200,9 +187,11 @@ export const se_BatchGetSchemaCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.names != null && { names: se_TableAliasList(input.names, context) }), - }); + body = JSON.stringify( + take(input, { + names: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -227,20 +216,18 @@ export const se_CreateCollaborationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/collaborations"; let body: any; - body = JSON.stringify({ - ...(input.creatorDisplayName != null && { creatorDisplayName: input.creatorDisplayName }), - ...(input.creatorMemberAbilities != null && { - creatorMemberAbilities: se_MemberAbilities(input.creatorMemberAbilities, context), - }), - ...(input.dataEncryptionMetadata != null && { - dataEncryptionMetadata: se_DataEncryptionMetadata(input.dataEncryptionMetadata, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.members != null && { members: se_MemberList(input.members, context) }), - ...(input.name != null && { name: input.name }), - ...(input.queryLogStatus != null && { queryLogStatus: input.queryLogStatus }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + creatorDisplayName: [], + creatorMemberAbilities: (_) => _json(_), + dataEncryptionMetadata: (_) => _json(_), + description: [], + members: (_) => _json(_), + name: [], + queryLogStatus: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -265,14 +252,16 @@ export const se_CreateConfiguredTableCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuredTables"; let body: any; - body = JSON.stringify({ - ...(input.allowedColumns != null && { allowedColumns: se_AllowedColumnList(input.allowedColumns, context) }), - ...(input.analysisMethod != null && { analysisMethod: input.analysisMethod }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tableReference != null && { tableReference: se_TableReference(input.tableReference, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + allowedColumns: (_) => _json(_), + analysisMethod: [], + description: [], + name: [], + tableReference: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -307,12 +296,12 @@ export const se_CreateConfiguredTableAnalysisRuleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.analysisRulePolicy != null && { - analysisRulePolicy: se_ConfiguredTableAnalysisRulePolicy(input.analysisRulePolicy, context), - }), - ...(input.analysisRuleType != null && { analysisRuleType: input.analysisRuleType }), - }); + body = JSON.stringify( + take(input, { + analysisRulePolicy: (_) => _json(_), + analysisRuleType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -347,13 +336,15 @@ export const se_CreateConfiguredTableAssociationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.configuredTableIdentifier != null && { configuredTableIdentifier: input.configuredTableIdentifier }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + configuredTableIdentifier: [], + description: [], + name: [], + roleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -378,11 +369,13 @@ export const se_CreateMembershipCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/memberships"; let body: any; - body = JSON.stringify({ - ...(input.collaborationIdentifier != null && { collaborationIdentifier: input.collaborationIdentifier }), - ...(input.queryLogStatus != null && { queryLogStatus: input.queryLogStatus }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + collaborationIdentifier: [], + queryLogStatus: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1161,13 +1154,13 @@ export const se_StartProtectedQueryCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.resultConfiguration != null && { - resultConfiguration: se_ProtectedQueryResultConfiguration(input.resultConfiguration, context), - }), - ...(input.sqlParameters != null && { sqlParameters: se_ProtectedQuerySQLParameters(input.sqlParameters, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + resultConfiguration: (_) => _json(_), + sqlParameters: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1193,9 +1186,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1259,10 +1254,12 @@ export const se_UpdateCollaborationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1297,10 +1294,12 @@ export const se_UpdateConfiguredTableCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1343,11 +1342,11 @@ export const se_UpdateConfiguredTableAnalysisRuleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.analysisRulePolicy != null && { - analysisRulePolicy: se_ConfiguredTableAnalysisRulePolicy(input.analysisRulePolicy, context), - }), - }); + body = JSON.stringify( + take(input, { + analysisRulePolicy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1390,10 +1389,12 @@ export const se_UpdateConfiguredTableAssociationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + description: [], + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1427,9 +1428,11 @@ export const se_UpdateMembershipCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.queryLogStatus != null && { queryLogStatus: input.queryLogStatus }), - }); + body = JSON.stringify( + take(input, { + queryLogStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1472,9 +1475,11 @@ export const se_UpdateProtectedQueryCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.targetStatus != null && { targetStatus: input.targetStatus }), - }); + body = JSON.stringify( + take(input, { + targetStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1500,12 +1505,11 @@ export const de_BatchGetSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchGetSchemaErrorList(data.errors, context); - } - if (data.schemas != null) { - contents.schemas = de_SchemaList(data.schemas, context); - } + const doc = take(data, { + errors: _json, + schemas: (_) => de_SchemaList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1539,10 +1543,9 @@ const de_BatchGetSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1562,9 +1565,10 @@ export const de_CreateCollaborationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.collaboration != null) { - contents.collaboration = de_Collaboration(data.collaboration, context); - } + const doc = take(data, { + collaboration: (_) => de_Collaboration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1598,10 +1602,9 @@ const de_CreateCollaborationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1621,9 +1624,10 @@ export const de_CreateConfiguredTableCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTable != null) { - contents.configuredTable = de_ConfiguredTable(data.configuredTable, context); - } + const doc = take(data, { + configuredTable: (_) => de_ConfiguredTable(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1663,10 +1667,9 @@ const de_CreateConfiguredTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1686,9 +1689,10 @@ export const de_CreateConfiguredTableAnalysisRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analysisRule != null) { - contents.analysisRule = de_ConfiguredTableAnalysisRule(data.analysisRule, context); - } + const doc = take(data, { + analysisRule: (_) => de_ConfiguredTableAnalysisRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1725,10 +1729,9 @@ const de_CreateConfiguredTableAnalysisRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1748,9 +1751,10 @@ export const de_CreateConfiguredTableAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTableAssociation != null) { - contents.configuredTableAssociation = de_ConfiguredTableAssociation(data.configuredTableAssociation, context); - } + const doc = take(data, { + configuredTableAssociation: (_) => de_ConfiguredTableAssociation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1790,10 +1794,9 @@ const de_CreateConfiguredTableAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1813,9 +1816,10 @@ export const de_CreateMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.membership != null) { - contents.membership = de_Membership(data.membership, context); - } + const doc = take(data, { + membership: (_) => de_Membership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1855,10 +1859,9 @@ const de_CreateMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1908,10 +1911,9 @@ const de_DeleteCollaborationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1967,10 +1969,9 @@ const de_DeleteConfiguredTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,10 +2027,9 @@ const de_DeleteConfiguredTableAnalysisRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2085,10 +2085,9 @@ const de_DeleteConfiguredTableAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2144,10 +2143,9 @@ const de_DeleteMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2203,10 +2201,9 @@ const de_DeleteMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2226,9 +2223,10 @@ export const de_GetCollaborationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.collaboration != null) { - contents.collaboration = de_Collaboration(data.collaboration, context); - } + const doc = take(data, { + collaboration: (_) => de_Collaboration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2259,10 +2257,9 @@ const de_GetCollaborationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,9 +2279,10 @@ export const de_GetConfiguredTableCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTable != null) { - contents.configuredTable = de_ConfiguredTable(data.configuredTable, context); - } + const doc = take(data, { + configuredTable: (_) => de_ConfiguredTable(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2318,10 +2316,9 @@ const de_GetConfiguredTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2341,9 +2338,10 @@ export const de_GetConfiguredTableAnalysisRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analysisRule != null) { - contents.analysisRule = de_ConfiguredTableAnalysisRule(data.analysisRule, context); - } + const doc = take(data, { + analysisRule: (_) => de_ConfiguredTableAnalysisRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2377,10 +2375,9 @@ const de_GetConfiguredTableAnalysisRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2400,9 +2397,10 @@ export const de_GetConfiguredTableAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTableAssociation != null) { - contents.configuredTableAssociation = de_ConfiguredTableAssociation(data.configuredTableAssociation, context); - } + const doc = take(data, { + configuredTableAssociation: (_) => de_ConfiguredTableAssociation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2436,10 +2434,9 @@ const de_GetConfiguredTableAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2459,9 +2456,10 @@ export const de_GetMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.membership != null) { - contents.membership = de_Membership(data.membership, context); - } + const doc = take(data, { + membership: (_) => de_Membership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2495,10 +2493,9 @@ const de_GetMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2518,9 +2515,10 @@ export const de_GetProtectedQueryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.protectedQuery != null) { - contents.protectedQuery = de_ProtectedQuery(data.protectedQuery, context); - } + const doc = take(data, { + protectedQuery: (_) => de_ProtectedQuery(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2554,10 +2552,9 @@ const de_GetProtectedQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2577,9 +2574,10 @@ export const de_GetSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.schema != null) { - contents.schema = de_Schema(data.schema, context); - } + const doc = take(data, { + schema: (_) => de_Schema(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2613,10 +2611,9 @@ const de_GetSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2636,9 +2633,10 @@ export const de_GetSchemaAnalysisRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analysisRule != null) { - contents.analysisRule = de_AnalysisRule(data.analysisRule, context); - } + const doc = take(data, { + analysisRule: (_) => de_AnalysisRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2672,10 +2670,9 @@ const de_GetSchemaAnalysisRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2695,12 +2692,11 @@ export const de_ListCollaborationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.collaborationList != null) { - contents.collaborationList = de_CollaborationSummaryList(data.collaborationList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + collaborationList: (_) => de_CollaborationSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2731,10 +2727,9 @@ const de_ListCollaborationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2754,15 +2749,11 @@ export const de_ListConfiguredTableAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTableAssociationSummaries != null) { - contents.configuredTableAssociationSummaries = de_ConfiguredTableAssociationSummaryList( - data.configuredTableAssociationSummaries, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + configuredTableAssociationSummaries: (_) => de_ConfiguredTableAssociationSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2796,10 +2787,9 @@ const de_ListConfiguredTableAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2819,12 +2809,11 @@ export const de_ListConfiguredTablesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTableSummaries != null) { - contents.configuredTableSummaries = de_ConfiguredTableSummaryList(data.configuredTableSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + configuredTableSummaries: (_) => de_ConfiguredTableSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2855,10 +2844,9 @@ const de_ListConfiguredTablesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2878,12 +2866,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.memberSummaries != null) { - contents.memberSummaries = de_MemberSummaryList(data.memberSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + memberSummaries: (_) => de_MemberSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2917,10 +2904,9 @@ const de_ListMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2940,12 +2926,11 @@ export const de_ListMembershipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.membershipSummaries != null) { - contents.membershipSummaries = de_MembershipSummaryList(data.membershipSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + membershipSummaries: (_) => de_MembershipSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2976,10 +2961,9 @@ const de_ListMembershipsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2999,12 +2983,11 @@ export const de_ListProtectedQueriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.protectedQueries != null) { - contents.protectedQueries = de_ProtectedQuerySummaryList(data.protectedQueries, context); - } + const doc = take(data, { + nextToken: __expectString, + protectedQueries: (_) => de_ProtectedQuerySummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3038,10 +3021,9 @@ const de_ListProtectedQueriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3061,12 +3043,11 @@ export const de_ListSchemasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.schemaSummaries != null) { - contents.schemaSummaries = de_SchemaSummaryList(data.schemaSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + schemaSummaries: (_) => de_SchemaSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3100,10 +3081,9 @@ const de_ListSchemasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3123,9 +3103,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3150,10 +3131,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3173,9 +3153,10 @@ export const de_StartProtectedQueryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.protectedQuery != null) { - contents.protectedQuery = de_ProtectedQuery(data.protectedQuery, context); - } + const doc = take(data, { + protectedQuery: (_) => de_ProtectedQuery(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3212,10 +3193,9 @@ const de_StartProtectedQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3259,10 +3239,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3306,10 +3285,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3329,9 +3307,10 @@ export const de_UpdateCollaborationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.collaboration != null) { - contents.collaboration = de_Collaboration(data.collaboration, context); - } + const doc = take(data, { + collaboration: (_) => de_Collaboration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3362,10 +3341,9 @@ const de_UpdateCollaborationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3385,9 +3363,10 @@ export const de_UpdateConfiguredTableCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTable != null) { - contents.configuredTable = de_ConfiguredTable(data.configuredTable, context); - } + const doc = take(data, { + configuredTable: (_) => de_ConfiguredTable(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3424,10 +3403,9 @@ const de_UpdateConfiguredTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3447,9 +3425,10 @@ export const de_UpdateConfiguredTableAnalysisRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analysisRule != null) { - contents.analysisRule = de_ConfiguredTableAnalysisRule(data.analysisRule, context); - } + const doc = take(data, { + analysisRule: (_) => de_ConfiguredTableAnalysisRule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3486,10 +3465,9 @@ const de_UpdateConfiguredTableAnalysisRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3509,9 +3487,10 @@ export const de_UpdateConfiguredTableAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuredTableAssociation != null) { - contents.configuredTableAssociation = de_ConfiguredTableAssociation(data.configuredTableAssociation, context); - } + const doc = take(data, { + configuredTableAssociation: (_) => de_ConfiguredTableAssociation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3548,10 +3527,9 @@ const de_UpdateConfiguredTableAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3571,9 +3549,10 @@ export const de_UpdateMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.membership != null) { - contents.membership = de_Membership(data.membership, context); - } + const doc = take(data, { + membership: (_) => de_Membership(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3610,10 +3589,9 @@ const de_UpdateMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3633,9 +3611,10 @@ export const de_UpdateProtectedQueryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.protectedQuery != null) { - contents.protectedQuery = de_ProtectedQuery(data.protectedQuery, context); - } + const doc = take(data, { + protectedQuery: (_) => de_ProtectedQuery(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3672,16 +3651,15 @@ const de_UpdateProtectedQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3691,12 +3669,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3710,18 +3687,13 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3738,9 +3710,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3757,15 +3730,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3782,15 +3752,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaName != null) { - contents.quotaName = __expectString(data.quotaName); - } - if (data.quotaValue != null) { - contents.quotaValue = __limitedParseDouble(data.quotaValue); - } + const doc = take(data, { + message: __expectString, + quotaName: __expectString, + quotaValue: __limitedParseDouble, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3804,9 +3771,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3820,15 +3788,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3836,545 +3801,133 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AggregateColumn - */ -const se_AggregateColumn = (input: AggregateColumn, context: __SerdeContext): any => { - return { - ...(input.columnNames != null && { columnNames: se_AnalysisRuleColumnNameList(input.columnNames, context) }), - ...(input.function != null && { function: input.function }), - }; -}; +// se_AggregateColumn omitted. -/** - * serializeAws_restJson1AggregateColumnList - */ -const se_AggregateColumnList = (input: AggregateColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AggregateColumn(entry, context); - }); -}; +// se_AggregateColumnList omitted. -/** - * serializeAws_restJson1AggregationConstraint - */ -const se_AggregationConstraint = (input: AggregationConstraint, context: __SerdeContext): any => { - return { - ...(input.columnName != null && { columnName: input.columnName }), - ...(input.minimum != null && { minimum: input.minimum }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_AggregationConstraint omitted. -/** - * serializeAws_restJson1AggregationConstraints - */ -const se_AggregationConstraints = (input: AggregationConstraint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AggregationConstraint(entry, context); - }); -}; +// se_AggregationConstraints omitted. -/** - * serializeAws_restJson1AllowedColumnList - */ -const se_AllowedColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedColumnList omitted. -/** - * serializeAws_restJson1AnalysisRuleAggregation - */ -const se_AnalysisRuleAggregation = (input: AnalysisRuleAggregation, context: __SerdeContext): any => { - return { - ...(input.aggregateColumns != null && { - aggregateColumns: se_AggregateColumnList(input.aggregateColumns, context), - }), - ...(input.dimensionColumns != null && { - dimensionColumns: se_AnalysisRuleColumnList(input.dimensionColumns, context), - }), - ...(input.joinColumns != null && { joinColumns: se_AnalysisRuleColumnList(input.joinColumns, context) }), - ...(input.joinRequired != null && { joinRequired: input.joinRequired }), - ...(input.outputConstraints != null && { - outputConstraints: se_AggregationConstraints(input.outputConstraints, context), - }), - ...(input.scalarFunctions != null && { scalarFunctions: se_ScalarFunctionsList(input.scalarFunctions, context) }), - }; -}; +// se_AnalysisRuleAggregation omitted. -/** - * serializeAws_restJson1AnalysisRuleColumnList - */ -const se_AnalysisRuleColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AnalysisRuleColumnList omitted. -/** - * serializeAws_restJson1AnalysisRuleColumnNameList - */ -const se_AnalysisRuleColumnNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AnalysisRuleColumnNameList omitted. -/** - * serializeAws_restJson1AnalysisRuleList - */ -const se_AnalysisRuleList = (input: AnalysisRuleList, context: __SerdeContext): any => { - return { - ...(input.joinColumns != null && { joinColumns: se_AnalysisRuleColumnList(input.joinColumns, context) }), - ...(input.listColumns != null && { listColumns: se_AnalysisRuleColumnList(input.listColumns, context) }), - }; -}; +// se_AnalysisRuleList omitted. -/** - * serializeAws_restJson1ConfiguredTableAnalysisRulePolicy - */ -const se_ConfiguredTableAnalysisRulePolicy = ( - input: ConfiguredTableAnalysisRulePolicy, - context: __SerdeContext -): any => { - return ConfiguredTableAnalysisRulePolicy.visit(input, { - v1: (value) => ({ v1: se_ConfiguredTableAnalysisRulePolicyV1(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ConfiguredTableAnalysisRulePolicy omitted. -/** - * serializeAws_restJson1ConfiguredTableAnalysisRulePolicyV1 - */ -const se_ConfiguredTableAnalysisRulePolicyV1 = ( - input: ConfiguredTableAnalysisRulePolicyV1, - context: __SerdeContext -): any => { - return ConfiguredTableAnalysisRulePolicyV1.visit(input, { - aggregation: (value) => ({ aggregation: se_AnalysisRuleAggregation(value, context) }), - list: (value) => ({ list: se_AnalysisRuleList(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ConfiguredTableAnalysisRulePolicyV1 omitted. -/** - * serializeAws_restJson1DataEncryptionMetadata - */ -const se_DataEncryptionMetadata = (input: DataEncryptionMetadata, context: __SerdeContext): any => { - return { - ...(input.allowCleartext != null && { allowCleartext: input.allowCleartext }), - ...(input.allowDuplicates != null && { allowDuplicates: input.allowDuplicates }), - ...(input.allowJoinsOnColumnsWithDifferentNames != null && { - allowJoinsOnColumnsWithDifferentNames: input.allowJoinsOnColumnsWithDifferentNames, - }), - ...(input.preserveNulls != null && { preserveNulls: input.preserveNulls }), - }; -}; +// se_DataEncryptionMetadata omitted. -/** - * serializeAws_restJson1GlueTableReference - */ -const se_GlueTableReference = (input: GlueTableReference, context: __SerdeContext): any => { - return { - ...(input.databaseName != null && { databaseName: input.databaseName }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; +// se_GlueTableReference omitted. -/** - * serializeAws_restJson1MemberAbilities - */ -const se_MemberAbilities = (input: (MemberAbility | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MemberAbilities omitted. -/** - * serializeAws_restJson1MemberList - */ -const se_MemberList = (input: MemberSpecification[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MemberSpecification(entry, context); - }); -}; +// se_MemberList omitted. -/** - * serializeAws_restJson1MemberSpecification - */ -const se_MemberSpecification = (input: MemberSpecification, context: __SerdeContext): any => { - return { - ...(input.accountId != null && { accountId: input.accountId }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.memberAbilities != null && { memberAbilities: se_MemberAbilities(input.memberAbilities, context) }), - }; -}; +// se_MemberSpecification omitted. -/** - * serializeAws_restJson1ProtectedQueryOutputConfiguration - */ -const se_ProtectedQueryOutputConfiguration = ( - input: ProtectedQueryOutputConfiguration, - context: __SerdeContext -): any => { - return ProtectedQueryOutputConfiguration.visit(input, { - s3: (value) => ({ s3: se_ProtectedQueryS3OutputConfiguration(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ProtectedQueryOutputConfiguration omitted. -/** - * serializeAws_restJson1ProtectedQueryResultConfiguration - */ -const se_ProtectedQueryResultConfiguration = ( - input: ProtectedQueryResultConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.outputConfiguration != null && { - outputConfiguration: se_ProtectedQueryOutputConfiguration(input.outputConfiguration, context), - }), - }; -}; +// se_ProtectedQueryResultConfiguration omitted. -/** - * serializeAws_restJson1ProtectedQueryS3OutputConfiguration - */ -const se_ProtectedQueryS3OutputConfiguration = ( - input: ProtectedQueryS3OutputConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - ...(input.resultFormat != null && { resultFormat: input.resultFormat }), - }; -}; +// se_ProtectedQueryS3OutputConfiguration omitted. -/** - * serializeAws_restJson1ProtectedQuerySQLParameters - */ -const se_ProtectedQuerySQLParameters = (input: ProtectedQuerySQLParameters, context: __SerdeContext): any => { - return { - ...(input.queryString != null && { queryString: input.queryString }), - }; -}; +// se_ProtectedQuerySQLParameters omitted. -/** - * serializeAws_restJson1ScalarFunctionsList - */ -const se_ScalarFunctionsList = (input: (ScalarFunctions | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ScalarFunctionsList omitted. -/** - * serializeAws_restJson1TableAliasList - */ -const se_TableAliasList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TableAliasList omitted. -/** - * serializeAws_restJson1TableReference - */ -const se_TableReference = (input: TableReference, context: __SerdeContext): any => { - return TableReference.visit(input, { - glue: (value) => ({ glue: se_GlueTableReference(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_TableReference omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1AggregateColumn - */ -const de_AggregateColumn = (output: any, context: __SerdeContext): AggregateColumn => { - return { - columnNames: output.columnNames != null ? de_AnalysisRuleColumnNameList(output.columnNames, context) : undefined, - function: __expectString(output.function), - } as any; -}; +// de_AggregateColumn omitted. -/** - * deserializeAws_restJson1AggregateColumnList - */ -const de_AggregateColumnList = (output: any, context: __SerdeContext): AggregateColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateColumn(entry, context); - }); - return retVal; -}; +// de_AggregateColumnList omitted. -/** - * deserializeAws_restJson1AggregationConstraint - */ -const de_AggregationConstraint = (output: any, context: __SerdeContext): AggregationConstraint => { - return { - columnName: __expectString(output.columnName), - minimum: __expectInt32(output.minimum), - type: __expectString(output.type), - } as any; -}; +// de_AggregationConstraint omitted. -/** - * deserializeAws_restJson1AggregationConstraints - */ -const de_AggregationConstraints = (output: any, context: __SerdeContext): AggregationConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregationConstraint(entry, context); - }); - return retVal; -}; +// de_AggregationConstraints omitted. -/** - * deserializeAws_restJson1AllowedColumnList - */ -const de_AllowedColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AllowedColumnList omitted. /** * deserializeAws_restJson1AnalysisRule */ const de_AnalysisRule = (output: any, context: __SerdeContext): AnalysisRule => { - return { - collaborationId: __expectString(output.collaborationId), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - name: __expectString(output.name), - policy: output.policy != null ? de_AnalysisRulePolicy(__expectUnion(output.policy), context) : undefined, - type: __expectString(output.type), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + collaborationId: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + policy: (_: any) => _json(__expectUnion(_)), + type: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1AnalysisRuleAggregation - */ -const de_AnalysisRuleAggregation = (output: any, context: __SerdeContext): AnalysisRuleAggregation => { - return { - aggregateColumns: - output.aggregateColumns != null ? de_AggregateColumnList(output.aggregateColumns, context) : undefined, - dimensionColumns: - output.dimensionColumns != null ? de_AnalysisRuleColumnList(output.dimensionColumns, context) : undefined, - joinColumns: output.joinColumns != null ? de_AnalysisRuleColumnList(output.joinColumns, context) : undefined, - joinRequired: __expectString(output.joinRequired), - outputConstraints: - output.outputConstraints != null ? de_AggregationConstraints(output.outputConstraints, context) : undefined, - scalarFunctions: - output.scalarFunctions != null ? de_ScalarFunctionsList(output.scalarFunctions, context) : undefined, - } as any; -}; +// de_AnalysisRuleAggregation omitted. -/** - * deserializeAws_restJson1AnalysisRuleColumnList - */ -const de_AnalysisRuleColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AnalysisRuleColumnList omitted. -/** - * deserializeAws_restJson1AnalysisRuleColumnNameList - */ -const de_AnalysisRuleColumnNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AnalysisRuleColumnNameList omitted. -/** - * deserializeAws_restJson1AnalysisRuleList - */ -const de_AnalysisRuleList = (output: any, context: __SerdeContext): AnalysisRuleList => { - return { - joinColumns: output.joinColumns != null ? de_AnalysisRuleColumnList(output.joinColumns, context) : undefined, - listColumns: output.listColumns != null ? de_AnalysisRuleColumnList(output.listColumns, context) : undefined, - } as any; -}; +// de_AnalysisRuleList omitted. -/** - * deserializeAws_restJson1AnalysisRulePolicy - */ -const de_AnalysisRulePolicy = (output: any, context: __SerdeContext): AnalysisRulePolicy => { - if (output.v1 != null) { - return { - v1: de_AnalysisRulePolicyV1(__expectUnion(output.v1), context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AnalysisRulePolicy omitted. -/** - * deserializeAws_restJson1AnalysisRulePolicyV1 - */ -const de_AnalysisRulePolicyV1 = (output: any, context: __SerdeContext): AnalysisRulePolicyV1 => { - if (output.aggregation != null) { - return { - aggregation: de_AnalysisRuleAggregation(output.aggregation, context), - }; - } - if (output.list != null) { - return { - list: de_AnalysisRuleList(output.list, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AnalysisRulePolicyV1 omitted. -/** - * deserializeAws_restJson1AnalysisRuleTypeList - */ -const de_AnalysisRuleTypeList = (output: any, context: __SerdeContext): (AnalysisRuleType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AnalysisRuleTypeList omitted. -/** - * deserializeAws_restJson1BatchGetSchemaError - */ -const de_BatchGetSchemaError = (output: any, context: __SerdeContext): BatchGetSchemaError => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_BatchGetSchemaError omitted. -/** - * deserializeAws_restJson1BatchGetSchemaErrorList - */ -const de_BatchGetSchemaErrorList = (output: any, context: __SerdeContext): BatchGetSchemaError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetSchemaError(entry, context); - }); - return retVal; -}; +// de_BatchGetSchemaErrorList omitted. /** * deserializeAws_restJson1Collaboration */ const de_Collaboration = (output: any, context: __SerdeContext): Collaboration => { - return { - arn: __expectString(output.arn), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - creatorAccountId: __expectString(output.creatorAccountId), - creatorDisplayName: __expectString(output.creatorDisplayName), - dataEncryptionMetadata: - output.dataEncryptionMetadata != null - ? de_DataEncryptionMetadata(output.dataEncryptionMetadata, context) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - memberStatus: __expectString(output.memberStatus), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - name: __expectString(output.name), - queryLogStatus: __expectString(output.queryLogStatus), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + arn: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + creatorAccountId: __expectString, + creatorDisplayName: __expectString, + dataEncryptionMetadata: _json, + description: __expectString, + id: __expectString, + memberStatus: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + name: __expectString, + queryLogStatus: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1CollaborationSummary */ const de_CollaborationSummary = (output: any, context: __SerdeContext): CollaborationSummary => { - return { - arn: __expectString(output.arn), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - creatorAccountId: __expectString(output.creatorAccountId), - creatorDisplayName: __expectString(output.creatorDisplayName), - id: __expectString(output.id), - memberStatus: __expectString(output.memberStatus), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - name: __expectString(output.name), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + arn: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + creatorAccountId: __expectString, + creatorDisplayName: __expectString, + id: __expectString, + memberStatus: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + name: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4384,152 +3937,70 @@ const de_CollaborationSummaryList = (output: any, context: __SerdeContext): Coll const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CollaborationSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Column - */ -const de_Column = (output: any, context: __SerdeContext): Column => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_Column omitted. -/** - * deserializeAws_restJson1ColumnList - */ -const de_ColumnList = (output: any, context: __SerdeContext): Column[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Column(entry, context); - }); - return retVal; -}; +// de_ColumnList omitted. /** * deserializeAws_restJson1ConfiguredTable */ const de_ConfiguredTable = (output: any, context: __SerdeContext): ConfiguredTable => { - return { - allowedColumns: output.allowedColumns != null ? de_AllowedColumnList(output.allowedColumns, context) : undefined, - analysisMethod: __expectString(output.analysisMethod), - analysisRuleTypes: - output.analysisRuleTypes != null - ? de_ConfiguredTableAnalysisRuleTypeList(output.analysisRuleTypes, context) - : undefined, - arn: __expectString(output.arn), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - tableReference: - output.tableReference != null ? de_TableReference(__expectUnion(output.tableReference), context) : undefined, - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + allowedColumns: _json, + analysisMethod: __expectString, + analysisRuleTypes: _json, + arn: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + tableReference: (_: any) => _json(__expectUnion(_)), + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1ConfiguredTableAnalysisRule */ const de_ConfiguredTableAnalysisRule = (output: any, context: __SerdeContext): ConfiguredTableAnalysisRule => { - return { - configuredTableArn: __expectString(output.configuredTableArn), - configuredTableId: __expectString(output.configuredTableId), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - policy: - output.policy != null ? de_ConfiguredTableAnalysisRulePolicy(__expectUnion(output.policy), context) : undefined, - type: __expectString(output.type), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + configuredTableArn: __expectString, + configuredTableId: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + policy: (_: any) => _json(__expectUnion(_)), + type: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1ConfiguredTableAnalysisRulePolicy - */ -const de_ConfiguredTableAnalysisRulePolicy = ( - output: any, - context: __SerdeContext -): ConfiguredTableAnalysisRulePolicy => { - if (output.v1 != null) { - return { - v1: de_ConfiguredTableAnalysisRulePolicyV1(__expectUnion(output.v1), context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ConfiguredTableAnalysisRulePolicy omitted. -/** - * deserializeAws_restJson1ConfiguredTableAnalysisRulePolicyV1 - */ -const de_ConfiguredTableAnalysisRulePolicyV1 = ( - output: any, - context: __SerdeContext -): ConfiguredTableAnalysisRulePolicyV1 => { - if (output.aggregation != null) { - return { - aggregation: de_AnalysisRuleAggregation(output.aggregation, context), - }; - } - if (output.list != null) { - return { - list: de_AnalysisRuleList(output.list, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ConfiguredTableAnalysisRulePolicyV1 omitted. -/** - * deserializeAws_restJson1ConfiguredTableAnalysisRuleTypeList - */ -const de_ConfiguredTableAnalysisRuleTypeList = ( - output: any, - context: __SerdeContext -): (ConfiguredTableAnalysisRuleType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConfiguredTableAnalysisRuleTypeList omitted. /** * deserializeAws_restJson1ConfiguredTableAssociation */ const de_ConfiguredTableAssociation = (output: any, context: __SerdeContext): ConfiguredTableAssociation => { - return { - arn: __expectString(output.arn), - configuredTableArn: __expectString(output.configuredTableArn), - configuredTableId: __expectString(output.configuredTableId), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + arn: __expectString, + configuredTableArn: __expectString, + configuredTableId: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + name: __expectString, + roleArn: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4539,18 +4010,16 @@ const de_ConfiguredTableAssociationSummary = ( output: any, context: __SerdeContext ): ConfiguredTableAssociationSummary => { - return { - arn: __expectString(output.arn), - configuredTableId: __expectString(output.configuredTableId), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - id: __expectString(output.id), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - name: __expectString(output.name), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + arn: __expectString, + configuredTableId: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + name: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4563,9 +4032,6 @@ const de_ConfiguredTableAssociationSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfiguredTableAssociationSummary(entry, context); }); return retVal; @@ -4575,20 +4041,15 @@ const de_ConfiguredTableAssociationSummaryList = ( * deserializeAws_restJson1ConfiguredTableSummary */ const de_ConfiguredTableSummary = (output: any, context: __SerdeContext): ConfiguredTableSummary => { - return { - analysisMethod: __expectString(output.analysisMethod), - analysisRuleTypes: - output.analysisRuleTypes != null - ? de_ConfiguredTableAnalysisRuleTypeList(output.analysisRuleTypes, context) - : undefined, - arn: __expectString(output.arn), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + analysisMethod: __expectString, + analysisRuleTypes: _json, + arn: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4598,92 +4059,54 @@ const de_ConfiguredTableSummaryList = (output: any, context: __SerdeContext): Co const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfiguredTableSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DataEncryptionMetadata - */ -const de_DataEncryptionMetadata = (output: any, context: __SerdeContext): DataEncryptionMetadata => { - return { - allowCleartext: __expectBoolean(output.allowCleartext), - allowDuplicates: __expectBoolean(output.allowDuplicates), - allowJoinsOnColumnsWithDifferentNames: __expectBoolean(output.allowJoinsOnColumnsWithDifferentNames), - preserveNulls: __expectBoolean(output.preserveNulls), - } as any; -}; +// de_DataEncryptionMetadata omitted. -/** - * deserializeAws_restJson1GlueTableReference - */ -const de_GlueTableReference = (output: any, context: __SerdeContext): GlueTableReference => { - return { - databaseName: __expectString(output.databaseName), - tableName: __expectString(output.tableName), - } as any; -}; +// de_GlueTableReference omitted. -/** - * deserializeAws_restJson1MemberAbilities - */ -const de_MemberAbilities = (output: any, context: __SerdeContext): (MemberAbility | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MemberAbilities omitted. /** * deserializeAws_restJson1Membership */ const de_Membership = (output: any, context: __SerdeContext): Membership => { - return { - arn: __expectString(output.arn), - collaborationArn: __expectString(output.collaborationArn), - collaborationCreatorAccountId: __expectString(output.collaborationCreatorAccountId), - collaborationCreatorDisplayName: __expectString(output.collaborationCreatorDisplayName), - collaborationId: __expectString(output.collaborationId), - collaborationName: __expectString(output.collaborationName), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - id: __expectString(output.id), - memberAbilities: output.memberAbilities != null ? de_MemberAbilities(output.memberAbilities, context) : undefined, - queryLogStatus: __expectString(output.queryLogStatus), - status: __expectString(output.status), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + arn: __expectString, + collaborationArn: __expectString, + collaborationCreatorAccountId: __expectString, + collaborationCreatorDisplayName: __expectString, + collaborationId: __expectString, + collaborationName: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + memberAbilities: _json, + queryLogStatus: __expectString, + status: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1MembershipSummary */ const de_MembershipSummary = (output: any, context: __SerdeContext): MembershipSummary => { - return { - arn: __expectString(output.arn), - collaborationArn: __expectString(output.collaborationArn), - collaborationCreatorAccountId: __expectString(output.collaborationCreatorAccountId), - collaborationCreatorDisplayName: __expectString(output.collaborationCreatorDisplayName), - collaborationId: __expectString(output.collaborationId), - collaborationName: __expectString(output.collaborationName), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - id: __expectString(output.id), - memberAbilities: output.memberAbilities != null ? de_MemberAbilities(output.memberAbilities, context) : undefined, - status: __expectString(output.status), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + arn: __expectString, + collaborationArn: __expectString, + collaborationCreatorAccountId: __expectString, + collaborationCreatorDisplayName: __expectString, + collaborationId: __expectString, + collaborationName: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + memberAbilities: _json, + status: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4693,9 +4116,6 @@ const de_MembershipSummaryList = (output: any, context: __SerdeContext): Members const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MembershipSummary(entry, context); }); return retVal; @@ -4705,18 +4125,16 @@ const de_MembershipSummaryList = (output: any, context: __SerdeContext): Members * deserializeAws_restJson1MemberSummary */ const de_MemberSummary = (output: any, context: __SerdeContext): MemberSummary => { - return { - abilities: output.abilities != null ? de_MemberAbilities(output.abilities, context) : undefined, - accountId: __expectString(output.accountId), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - displayName: __expectString(output.displayName), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - status: __expectString(output.status), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + abilities: _json, + accountId: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + status: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4726,9 +4144,6 @@ const de_MemberSummaryList = (output: any, context: __SerdeContext): MemberSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MemberSummary(entry, context); }); return retVal; @@ -4738,139 +4153,49 @@ const de_MemberSummaryList = (output: any, context: __SerdeContext): MemberSumma * deserializeAws_restJson1ProtectedQuery */ const de_ProtectedQuery = (output: any, context: __SerdeContext): ProtectedQuery => { - return { - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - error: output.error != null ? de_ProtectedQueryError(output.error, context) : undefined, - id: __expectString(output.id), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - result: output.result != null ? de_ProtectedQueryResult(output.result, context) : undefined, - resultConfiguration: - output.resultConfiguration != null - ? de_ProtectedQueryResultConfiguration(output.resultConfiguration, context) - : undefined, - sqlParameters: - output.sqlParameters != null ? de_ProtectedQuerySQLParameters(output.sqlParameters, context) : undefined, - statistics: output.statistics != null ? de_ProtectedQueryStatistics(output.statistics, context) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1ProtectedQueryError - */ -const de_ProtectedQueryError = (output: any, context: __SerdeContext): ProtectedQueryError => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_restJson1ProtectedQueryOutput - */ -const de_ProtectedQueryOutput = (output: any, context: __SerdeContext): ProtectedQueryOutput => { - if (output.s3 != null) { - return { - s3: de_ProtectedQueryS3Output(output.s3, context), - }; - } - return { $unknown: Object.entries(output)[0] }; + return take(output, { + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + error: _json, + id: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + result: _json, + resultConfiguration: _json, + sqlParameters: _json, + statistics: _json, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ProtectedQueryOutputConfiguration - */ -const de_ProtectedQueryOutputConfiguration = ( - output: any, - context: __SerdeContext -): ProtectedQueryOutputConfiguration => { - if (output.s3 != null) { - return { - s3: de_ProtectedQueryS3OutputConfiguration(output.s3, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ProtectedQueryError omitted. -/** - * deserializeAws_restJson1ProtectedQueryResult - */ -const de_ProtectedQueryResult = (output: any, context: __SerdeContext): ProtectedQueryResult => { - return { - output: output.output != null ? de_ProtectedQueryOutput(__expectUnion(output.output), context) : undefined, - } as any; -}; +// de_ProtectedQueryOutput omitted. -/** - * deserializeAws_restJson1ProtectedQueryResultConfiguration - */ -const de_ProtectedQueryResultConfiguration = ( - output: any, - context: __SerdeContext -): ProtectedQueryResultConfiguration => { - return { - outputConfiguration: - output.outputConfiguration != null - ? de_ProtectedQueryOutputConfiguration(__expectUnion(output.outputConfiguration), context) - : undefined, - } as any; -}; +// de_ProtectedQueryOutputConfiguration omitted. -/** - * deserializeAws_restJson1ProtectedQueryS3Output - */ -const de_ProtectedQueryS3Output = (output: any, context: __SerdeContext): ProtectedQueryS3Output => { - return { - location: __expectString(output.location), - } as any; -}; +// de_ProtectedQueryResult omitted. -/** - * deserializeAws_restJson1ProtectedQueryS3OutputConfiguration - */ -const de_ProtectedQueryS3OutputConfiguration = ( - output: any, - context: __SerdeContext -): ProtectedQueryS3OutputConfiguration => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - resultFormat: __expectString(output.resultFormat), - } as any; -}; +// de_ProtectedQueryResultConfiguration omitted. -/** - * deserializeAws_restJson1ProtectedQuerySQLParameters - */ -const de_ProtectedQuerySQLParameters = (output: any, context: __SerdeContext): ProtectedQuerySQLParameters => { - return { - queryString: __expectString(output.queryString), - } as any; -}; +// de_ProtectedQueryS3Output omitted. -/** - * deserializeAws_restJson1ProtectedQueryStatistics - */ -const de_ProtectedQueryStatistics = (output: any, context: __SerdeContext): ProtectedQueryStatistics => { - return { - totalDurationInMillis: __expectLong(output.totalDurationInMillis), - } as any; -}; +// de_ProtectedQueryS3OutputConfiguration omitted. + +// de_ProtectedQuerySQLParameters omitted. + +// de_ProtectedQueryStatistics omitted. /** * deserializeAws_restJson1ProtectedQuerySummary */ const de_ProtectedQuerySummary = (output: any, context: __SerdeContext): ProtectedQuerySummary => { - return { - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - id: __expectString(output.id), - membershipArn: __expectString(output.membershipArn), - membershipId: __expectString(output.membershipId), - status: __expectString(output.status), - } as any; + return take(output, { + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + membershipArn: __expectString, + membershipId: __expectString, + status: __expectString, + }) as any; }; /** @@ -4880,50 +4205,31 @@ const de_ProtectedQuerySummaryList = (output: any, context: __SerdeContext): Pro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProtectedQuerySummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ScalarFunctionsList - */ -const de_ScalarFunctionsList = (output: any, context: __SerdeContext): (ScalarFunctions | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ScalarFunctionsList omitted. /** * deserializeAws_restJson1Schema */ const de_Schema = (output: any, context: __SerdeContext): Schema => { - return { - analysisMethod: __expectString(output.analysisMethod), - analysisRuleTypes: - output.analysisRuleTypes != null ? de_AnalysisRuleTypeList(output.analysisRuleTypes, context) : undefined, - collaborationArn: __expectString(output.collaborationArn), - collaborationId: __expectString(output.collaborationId), - columns: output.columns != null ? de_ColumnList(output.columns, context) : undefined, - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - creatorAccountId: __expectString(output.creatorAccountId), - description: __expectString(output.description), - name: __expectString(output.name), - partitionKeys: output.partitionKeys != null ? de_ColumnList(output.partitionKeys, context) : undefined, - type: __expectString(output.type), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + analysisMethod: __expectString, + analysisRuleTypes: _json, + collaborationArn: __expectString, + collaborationId: __expectString, + columns: _json, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + creatorAccountId: __expectString, + description: __expectString, + name: __expectString, + partitionKeys: _json, + type: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4933,9 +4239,6 @@ const de_SchemaList = (output: any, context: __SerdeContext): Schema[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Schema(entry, context); }); return retVal; @@ -4945,20 +4248,17 @@ const de_SchemaList = (output: any, context: __SerdeContext): Schema[] => { * deserializeAws_restJson1SchemaSummary */ const de_SchemaSummary = (output: any, context: __SerdeContext): SchemaSummary => { - return { - analysisMethod: __expectString(output.analysisMethod), - analysisRuleTypes: - output.analysisRuleTypes != null ? de_AnalysisRuleTypeList(output.analysisRuleTypes, context) : undefined, - collaborationArn: __expectString(output.collaborationArn), - collaborationId: __expectString(output.collaborationId), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - creatorAccountId: __expectString(output.creatorAccountId), - name: __expectString(output.name), - type: __expectString(output.type), - updateTime: - output.updateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateTime))) : undefined, - } as any; + return take(output, { + analysisMethod: __expectString, + analysisRuleTypes: _json, + collaborationArn: __expectString, + collaborationId: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + creatorAccountId: __expectString, + name: __expectString, + type: __expectString, + updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4968,63 +4268,18 @@ const de_SchemaSummaryList = (output: any, context: __SerdeContext): SchemaSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SchemaSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TableReference - */ -const de_TableReference = (output: any, context: __SerdeContext): TableReference => { - if (output.glue != null) { - return { - glue: de_GlueTableReference(output.glue, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_TableReference omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-cloud9/src/protocols/Aws_json1_1.ts b/clients/client-cloud9/src/protocols/Aws_json1_1.ts index cf4fe01bed0c..4c4d5d1a3263 100644 --- a/clients/client-cloud9/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloud9/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -59,41 +60,29 @@ import { ConcurrentAccessException, ConflictException, CreateEnvironmentEC2Request, - CreateEnvironmentEC2Result, CreateEnvironmentMembershipRequest, CreateEnvironmentMembershipResult, DeleteEnvironmentMembershipRequest, - DeleteEnvironmentMembershipResult, DeleteEnvironmentRequest, - DeleteEnvironmentResult, DescribeEnvironmentMembershipsRequest, DescribeEnvironmentMembershipsResult, DescribeEnvironmentsRequest, - DescribeEnvironmentsResult, DescribeEnvironmentStatusRequest, - DescribeEnvironmentStatusResult, - Environment, - EnvironmentLifecycle, EnvironmentMember, ForbiddenException, InternalServerErrorException, LimitExceededException, ListEnvironmentsRequest, - ListEnvironmentsResult, ListTagsForResourceRequest, - ListTagsForResourceResponse, NotFoundException, Permissions, Tag, TagResourceRequest, - TagResourceResponse, TooManyRequestsException, UntagResourceRequest, - UntagResourceResponse, UpdateEnvironmentMembershipRequest, UpdateEnvironmentMembershipResult, UpdateEnvironmentRequest, - UpdateEnvironmentResult, } from "../models/models_0"; /** @@ -105,7 +94,7 @@ export const se_CreateEnvironmentEC2Command = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEnvironmentEC2"); let body: any; - body = JSON.stringify(se_CreateEnvironmentEC2Request(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -118,7 +107,7 @@ export const se_CreateEnvironmentMembershipCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEnvironmentMembership"); let body: any; - body = JSON.stringify(se_CreateEnvironmentMembershipRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -131,7 +120,7 @@ export const se_DeleteEnvironmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEnvironment"); let body: any; - body = JSON.stringify(se_DeleteEnvironmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -144,7 +133,7 @@ export const se_DeleteEnvironmentMembershipCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEnvironmentMembership"); let body: any; - body = JSON.stringify(se_DeleteEnvironmentMembershipRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -157,7 +146,7 @@ export const se_DescribeEnvironmentMembershipsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEnvironmentMemberships"); let body: any; - body = JSON.stringify(se_DescribeEnvironmentMembershipsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -170,7 +159,7 @@ export const se_DescribeEnvironmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEnvironments"); let body: any; - body = JSON.stringify(se_DescribeEnvironmentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -183,7 +172,7 @@ export const se_DescribeEnvironmentStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEnvironmentStatus"); let body: any; - body = JSON.stringify(se_DescribeEnvironmentStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -196,7 +185,7 @@ export const se_ListEnvironmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironments"); let body: any; - body = JSON.stringify(se_ListEnvironmentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -209,7 +198,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -222,7 +211,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -235,7 +224,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -248,7 +237,7 @@ export const se_UpdateEnvironmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEnvironment"); let body: any; - body = JSON.stringify(se_UpdateEnvironmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -261,7 +250,7 @@ export const se_UpdateEnvironmentMembershipCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEnvironmentMembership"); let body: any; - body = JSON.stringify(se_UpdateEnvironmentMembershipRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -277,12 +266,12 @@ export const de_CreateEnvironmentEC2Command = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEnvironmentEC2Result(data, context); + contents = _json(data); const response: CreateEnvironmentEC2CommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -321,10 +310,9 @@ const de_CreateEnvironmentEC2CommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -347,7 +335,7 @@ export const de_CreateEnvironmentMembershipCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -386,10 +374,9 @@ const de_CreateEnvironmentMembershipCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -407,12 +394,12 @@ export const de_DeleteEnvironmentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEnvironmentResult(data, context); + contents = _json(data); const response: DeleteEnvironmentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -451,10 +438,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -472,12 +458,12 @@ export const de_DeleteEnvironmentMembershipCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEnvironmentMembershipResult(data, context); + contents = _json(data); const response: DeleteEnvironmentMembershipCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -516,10 +502,9 @@ const de_DeleteEnvironmentMembershipCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -542,7 +527,7 @@ export const de_DescribeEnvironmentMembershipsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -581,10 +566,9 @@ const de_DescribeEnvironmentMembershipsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -602,12 +586,12 @@ export const de_DescribeEnvironmentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEnvironmentsResult(data, context); + contents = _json(data); const response: DescribeEnvironmentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -646,10 +630,9 @@ const de_DescribeEnvironmentsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -667,12 +650,12 @@ export const de_DescribeEnvironmentStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEnvironmentStatusResult(data, context); + contents = _json(data); const response: DescribeEnvironmentStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -711,10 +694,9 @@ const de_DescribeEnvironmentStatusCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -732,12 +714,12 @@ export const de_ListEnvironmentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEnvironmentsResult(data, context); + contents = _json(data); const response: ListEnvironmentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -776,10 +758,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -797,12 +778,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -829,10 +810,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -850,12 +830,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -885,10 +865,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -906,12 +885,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -941,10 +920,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -962,12 +940,12 @@ export const de_UpdateEnvironmentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEnvironmentResult(data, context); + contents = _json(data); const response: UpdateEnvironmentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1006,10 +984,9 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1032,7 +1009,7 @@ export const de_UpdateEnvironmentMembershipCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1071,10 +1048,9 @@ const de_UpdateEnvironmentMembershipCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1085,7 +1061,7 @@ const de_UpdateEnvironmentMembershipCommandError = async ( */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BadRequestException(body, context); + const deserialized: any = _json(body); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1101,7 +1077,7 @@ const de_ConcurrentAccessExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentAccessException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentAccessException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1114,7 +1090,7 @@ const de_ConcurrentAccessExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1127,7 +1103,7 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex */ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ForbiddenException(body, context); + const deserialized: any = _json(body); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1143,7 +1119,7 @@ const de_InternalServerErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1159,7 +1135,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1172,7 +1148,7 @@ const de_LimitExceededExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1188,7 +1164,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1196,255 +1172,49 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1BoundedEnvironmentIdList - */ -const se_BoundedEnvironmentIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BoundedEnvironmentIdList omitted. -/** - * serializeAws_json1_1CreateEnvironmentEC2Request - */ -const se_CreateEnvironmentEC2Request = (input: CreateEnvironmentEC2Request, context: __SerdeContext): any => { - return { - ...(input.automaticStopTimeMinutes != null && { automaticStopTimeMinutes: input.automaticStopTimeMinutes }), - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.connectionType != null && { connectionType: input.connectionType }), - ...(input.description != null && { description: input.description }), - ...(input.dryRun != null && { dryRun: input.dryRun }), - ...(input.imageId != null && { imageId: input.imageId }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.name != null && { name: input.name }), - ...(input.ownerArn != null && { ownerArn: input.ownerArn }), - ...(input.subnetId != null && { subnetId: input.subnetId }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateEnvironmentEC2Request omitted. -/** - * serializeAws_json1_1CreateEnvironmentMembershipRequest - */ -const se_CreateEnvironmentMembershipRequest = ( - input: CreateEnvironmentMembershipRequest, - context: __SerdeContext -): any => { - return { - ...(input.environmentId != null && { environmentId: input.environmentId }), - ...(input.permissions != null && { permissions: input.permissions }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_CreateEnvironmentMembershipRequest omitted. -/** - * serializeAws_json1_1DeleteEnvironmentMembershipRequest - */ -const se_DeleteEnvironmentMembershipRequest = ( - input: DeleteEnvironmentMembershipRequest, - context: __SerdeContext -): any => { - return { - ...(input.environmentId != null && { environmentId: input.environmentId }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_DeleteEnvironmentMembershipRequest omitted. -/** - * serializeAws_json1_1DeleteEnvironmentRequest - */ -const se_DeleteEnvironmentRequest = (input: DeleteEnvironmentRequest, context: __SerdeContext): any => { - return { - ...(input.environmentId != null && { environmentId: input.environmentId }), - }; -}; +// se_DeleteEnvironmentRequest omitted. -/** - * serializeAws_json1_1DescribeEnvironmentMembershipsRequest - */ -const se_DescribeEnvironmentMembershipsRequest = ( - input: DescribeEnvironmentMembershipsRequest, - context: __SerdeContext -): any => { - return { - ...(input.environmentId != null && { environmentId: input.environmentId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.permissions != null && { permissions: se_PermissionsList(input.permissions, context) }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_DescribeEnvironmentMembershipsRequest omitted. -/** - * serializeAws_json1_1DescribeEnvironmentsRequest - */ -const se_DescribeEnvironmentsRequest = (input: DescribeEnvironmentsRequest, context: __SerdeContext): any => { - return { - ...(input.environmentIds != null && { environmentIds: se_BoundedEnvironmentIdList(input.environmentIds, context) }), - }; -}; +// se_DescribeEnvironmentsRequest omitted. -/** - * serializeAws_json1_1DescribeEnvironmentStatusRequest - */ -const se_DescribeEnvironmentStatusRequest = (input: DescribeEnvironmentStatusRequest, context: __SerdeContext): any => { - return { - ...(input.environmentId != null && { environmentId: input.environmentId }), - }; -}; +// se_DescribeEnvironmentStatusRequest omitted. -/** - * serializeAws_json1_1ListEnvironmentsRequest - */ -const se_ListEnvironmentsRequest = (input: ListEnvironmentsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListEnvironmentsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1PermissionsList - */ -const se_PermissionsList = (input: (Permissions | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PermissionsList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateEnvironmentMembershipRequest - */ -const se_UpdateEnvironmentMembershipRequest = ( - input: UpdateEnvironmentMembershipRequest, - context: __SerdeContext -): any => { - return { - ...(input.environmentId != null && { environmentId: input.environmentId }), - ...(input.permissions != null && { permissions: input.permissions }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_UpdateEnvironmentMembershipRequest omitted. -/** - * serializeAws_json1_1UpdateEnvironmentRequest - */ -const se_UpdateEnvironmentRequest = (input: UpdateEnvironmentRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.environmentId != null && { environmentId: input.environmentId }), - ...(input.managedCredentialsAction != null && { managedCredentialsAction: input.managedCredentialsAction }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_UpdateEnvironmentRequest omitted. -/** - * deserializeAws_json1_1BadRequestException - */ -const de_BadRequestException = (output: any, context: __SerdeContext): BadRequestException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_BadRequestException omitted. -/** - * deserializeAws_json1_1ConcurrentAccessException - */ -const de_ConcurrentAccessException = (output: any, context: __SerdeContext): ConcurrentAccessException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ConcurrentAccessException omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1CreateEnvironmentEC2Result - */ -const de_CreateEnvironmentEC2Result = (output: any, context: __SerdeContext): CreateEnvironmentEC2Result => { - return { - environmentId: __expectString(output.environmentId), - } as any; -}; +// de_CreateEnvironmentEC2Result omitted. /** * deserializeAws_json1_1CreateEnvironmentMembershipResult @@ -1453,27 +1223,14 @@ const de_CreateEnvironmentMembershipResult = ( output: any, context: __SerdeContext ): CreateEnvironmentMembershipResult => { - return { - membership: output.membership != null ? de_EnvironmentMember(output.membership, context) : undefined, - } as any; + return take(output, { + membership: (_: any) => de_EnvironmentMember(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteEnvironmentMembershipResult - */ -const de_DeleteEnvironmentMembershipResult = ( - output: any, - context: __SerdeContext -): DeleteEnvironmentMembershipResult => { - return {} as any; -}; +// de_DeleteEnvironmentMembershipResult omitted. -/** - * deserializeAws_json1_1DeleteEnvironmentResult - */ -const de_DeleteEnvironmentResult = (output: any, context: __SerdeContext): DeleteEnvironmentResult => { - return {} as any; -}; +// de_DeleteEnvironmentResult omitted. /** * deserializeAws_json1_1DescribeEnvironmentMembershipsResult @@ -1482,101 +1239,35 @@ const de_DescribeEnvironmentMembershipsResult = ( output: any, context: __SerdeContext ): DescribeEnvironmentMembershipsResult => { - return { - memberships: output.memberships != null ? de_EnvironmentMembersList(output.memberships, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + memberships: (_: any) => de_EnvironmentMembersList(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeEnvironmentsResult - */ -const de_DescribeEnvironmentsResult = (output: any, context: __SerdeContext): DescribeEnvironmentsResult => { - return { - environments: output.environments != null ? de_EnvironmentList(output.environments, context) : undefined, - } as any; -}; +// de_DescribeEnvironmentsResult omitted. -/** - * deserializeAws_json1_1DescribeEnvironmentStatusResult - */ -const de_DescribeEnvironmentStatusResult = (output: any, context: __SerdeContext): DescribeEnvironmentStatusResult => { - return { - message: __expectString(output.message), - status: __expectString(output.status), - } as any; -}; +// de_DescribeEnvironmentStatusResult omitted. -/** - * deserializeAws_json1_1Environment - */ -const de_Environment = (output: any, context: __SerdeContext): Environment => { - return { - arn: __expectString(output.arn), - connectionType: __expectString(output.connectionType), - description: __expectString(output.description), - id: __expectString(output.id), - lifecycle: output.lifecycle != null ? de_EnvironmentLifecycle(output.lifecycle, context) : undefined, - managedCredentialsStatus: __expectString(output.managedCredentialsStatus), - name: __expectString(output.name), - ownerArn: __expectString(output.ownerArn), - type: __expectString(output.type), - } as any; -}; +// de_Environment omitted. -/** - * deserializeAws_json1_1EnvironmentIdList - */ -const de_EnvironmentIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EnvironmentIdList omitted. -/** - * deserializeAws_json1_1EnvironmentLifecycle - */ -const de_EnvironmentLifecycle = (output: any, context: __SerdeContext): EnvironmentLifecycle => { - return { - failureResource: __expectString(output.failureResource), - reason: __expectString(output.reason), - status: __expectString(output.status), - } as any; -}; +// de_EnvironmentLifecycle omitted. -/** - * deserializeAws_json1_1EnvironmentList - */ -const de_EnvironmentList = (output: any, context: __SerdeContext): Environment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Environment(entry, context); - }); - return retVal; -}; +// de_EnvironmentList omitted. /** * deserializeAws_json1_1EnvironmentMember */ const de_EnvironmentMember = (output: any, context: __SerdeContext): EnvironmentMember => { - return { - environmentId: __expectString(output.environmentId), - lastAccess: - output.lastAccess != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAccess))) : undefined, - permissions: __expectString(output.permissions), - userArn: __expectString(output.userArn), - userId: __expectString(output.userId), - } as any; + return take(output, { + environmentId: __expectString, + lastAccess: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + permissions: __expectString, + userArn: __expectString, + userId: __expectString, + }) as any; }; /** @@ -1586,126 +1277,32 @@ const de_EnvironmentMembersList = (output: any, context: __SerdeContext): Enviro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentMember(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ForbiddenException - */ -const de_ForbiddenException = (output: any, context: __SerdeContext): ForbiddenException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ForbiddenException omitted. -/** - * deserializeAws_json1_1InternalServerErrorException - */ -const de_InternalServerErrorException = (output: any, context: __SerdeContext): InternalServerErrorException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_InternalServerErrorException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListEnvironmentsResult - */ -const de_ListEnvironmentsResult = (output: any, context: __SerdeContext): ListEnvironmentsResult => { - return { - environmentIds: output.environmentIds != null ? de_EnvironmentIdList(output.environmentIds, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListEnvironmentsResult omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_NotFoundException omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - className: __expectString(output.className), - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_TooManyRequestsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateEnvironmentMembershipResult @@ -1714,17 +1311,12 @@ const de_UpdateEnvironmentMembershipResult = ( output: any, context: __SerdeContext ): UpdateEnvironmentMembershipResult => { - return { - membership: output.membership != null ? de_EnvironmentMember(output.membership, context) : undefined, - } as any; + return take(output, { + membership: (_: any) => de_EnvironmentMember(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateEnvironmentResult - */ -const de_UpdateEnvironmentResult = (output: any, context: __SerdeContext): UpdateEnvironmentResult => { - return {} as any; -}; +// de_UpdateEnvironmentResult omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1746,6 +1338,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts b/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts index 418639a3f76d..32619b9b4194 100644 --- a/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts +++ b/clients/client-cloudcontrol/src/protocols/Aws_json1_0.ts @@ -1,12 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -47,7 +49,6 @@ import { DeleteResourceOutput, GeneralServiceException, GetResourceInput, - GetResourceOutput, GetResourceRequestStatusInput, GetResourceRequestStatusOutput, HandlerFailureException, @@ -57,7 +58,6 @@ import { ListResourceRequestsInput, ListResourceRequestsOutput, ListResourcesInput, - ListResourcesOutput, NetworkFailureException, NotStabilizedException, NotUpdatableException, @@ -67,7 +67,6 @@ import { ProgressEvent, RequestTokenNotFoundException, ResourceConflictException, - ResourceDescription, ResourceNotFoundException, ResourceRequestStatusFilter, ServiceInternalErrorException, @@ -88,7 +87,7 @@ export const se_CancelResourceRequestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelResourceRequest"); let body: any; - body = JSON.stringify(se_CancelResourceRequestInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -127,7 +126,7 @@ export const se_GetResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResource"); let body: any; - body = JSON.stringify(se_GetResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -140,7 +139,7 @@ export const se_GetResourceRequestStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourceRequestStatus"); let body: any; - body = JSON.stringify(se_GetResourceRequestStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -153,7 +152,7 @@ export const se_ListResourceRequestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceRequests"); let body: any; - body = JSON.stringify(se_ListResourceRequestsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -166,7 +165,7 @@ export const se_ListResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResources"); let body: any; - body = JSON.stringify(se_ListResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -200,7 +199,7 @@ export const de_CancelResourceRequestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -224,10 +223,9 @@ const de_CancelResourceRequestCommandError = async ( throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -250,7 +248,7 @@ export const de_CreateResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -325,10 +323,9 @@ const de_CreateResourceCommandError = async ( throw await de_UnsupportedActionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -351,7 +348,7 @@ export const de_DeleteResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -426,10 +423,9 @@ const de_DeleteResourceCommandError = async ( throw await de_UnsupportedActionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -447,12 +443,12 @@ export const de_GetResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourceOutput(data, context); + contents = _json(data); const response: GetResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -521,10 +517,9 @@ const de_GetResourceCommandError = async ( throw await de_UnsupportedActionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -547,7 +542,7 @@ export const de_GetResourceRequestStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -568,10 +563,9 @@ const de_GetResourceRequestStatusCommandError = async ( throw await de_RequestTokenNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -594,7 +588,7 @@ export const de_ListResourceRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -610,10 +604,9 @@ const de_ListResourceRequestsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -630,12 +623,12 @@ export const de_ListResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourcesOutput(data, context); + contents = _json(data); const response: ListResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -704,10 +697,9 @@ const de_ListResourcesCommandError = async ( throw await de_UnsupportedActionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -730,7 +722,7 @@ export const de_UpdateResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -805,10 +797,9 @@ const de_UpdateResourceCommandError = async ( throw await de_UnsupportedActionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -822,7 +813,7 @@ const de_AlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -838,7 +829,7 @@ const de_ClientTokenConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClientTokenConflictException(body, context); + const deserialized: any = _json(body); const exception = new ClientTokenConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -854,7 +845,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -870,7 +861,7 @@ const de_ConcurrentOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentOperationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -886,7 +877,7 @@ const de_GeneralServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GeneralServiceException(body, context); + const deserialized: any = _json(body); const exception = new GeneralServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -902,7 +893,7 @@ const de_HandlerFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HandlerFailureException(body, context); + const deserialized: any = _json(body); const exception = new HandlerFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -918,7 +909,7 @@ const de_HandlerInternalFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HandlerInternalFailureException(body, context); + const deserialized: any = _json(body); const exception = new HandlerInternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -934,7 +925,7 @@ const de_InvalidCredentialsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCredentialsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCredentialsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -950,7 +941,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -966,7 +957,7 @@ const de_NetworkFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NetworkFailureException(body, context); + const deserialized: any = _json(body); const exception = new NetworkFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -982,7 +973,7 @@ const de_NotStabilizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotStabilizedException(body, context); + const deserialized: any = _json(body); const exception = new NotStabilizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -998,7 +989,7 @@ const de_NotUpdatableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotUpdatableException(body, context); + const deserialized: any = _json(body); const exception = new NotUpdatableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1014,7 +1005,7 @@ const de_PrivateTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PrivateTypeException(body, context); + const deserialized: any = _json(body); const exception = new PrivateTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1030,7 +1021,7 @@ const de_RequestTokenNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestTokenNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RequestTokenNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1046,7 +1037,7 @@ const de_ResourceConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceConflictException(body, context); + const deserialized: any = _json(body); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1062,7 +1053,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1078,7 +1069,7 @@ const de_ServiceInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new ServiceInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1094,7 +1085,7 @@ const de_ServiceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1107,7 +1098,7 @@ const de_ServiceLimitExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1123,7 +1114,7 @@ const de_TypeNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TypeNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TypeNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1139,7 +1130,7 @@ const de_UnsupportedActionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedActionException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedActionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1147,397 +1138,165 @@ const de_UnsupportedActionExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0CancelResourceRequestInput - */ -const se_CancelResourceRequestInput = (input: CancelResourceRequestInput, context: __SerdeContext): any => { - return { - ...(input.RequestToken != null && { RequestToken: input.RequestToken }), - }; -}; +// se_CancelResourceRequestInput omitted. /** * serializeAws_json1_0CreateResourceInput */ const se_CreateResourceInput = (input: CreateResourceInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DesiredState: [], + RoleArn: [], + TypeName: [], + TypeVersionId: [], + }); }; /** * serializeAws_json1_0DeleteResourceInput */ const se_DeleteResourceInput = (input: DeleteResourceInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Identifier: [], + RoleArn: [], + TypeName: [], + TypeVersionId: [], + }); }; -/** - * serializeAws_json1_0GetResourceInput - */ -const se_GetResourceInput = (input: GetResourceInput, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }), - }; -}; +// se_GetResourceInput omitted. -/** - * serializeAws_json1_0GetResourceRequestStatusInput - */ -const se_GetResourceRequestStatusInput = (input: GetResourceRequestStatusInput, context: __SerdeContext): any => { - return { - ...(input.RequestToken != null && { RequestToken: input.RequestToken }), - }; -}; +// se_GetResourceRequestStatusInput omitted. -/** - * serializeAws_json1_0ListResourceRequestsInput - */ -const se_ListResourceRequestsInput = (input: ListResourceRequestsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceRequestStatusFilter != null && { - ResourceRequestStatusFilter: se_ResourceRequestStatusFilter(input.ResourceRequestStatusFilter, context), - }), - }; -}; +// se_ListResourceRequestsInput omitted. -/** - * serializeAws_json1_0ListResourcesInput - */ -const se_ListResourcesInput = (input: ListResourcesInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceModel != null && { ResourceModel: input.ResourceModel }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }), - }; -}; +// se_ListResourcesInput omitted. -/** - * serializeAws_json1_0Operations - */ -const se_Operations = (input: (Operation | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Operations omitted. -/** - * serializeAws_json1_0OperationStatuses - */ -const se_OperationStatuses = (input: (OperationStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OperationStatuses omitted. -/** - * serializeAws_json1_0ResourceRequestStatusFilter - */ -const se_ResourceRequestStatusFilter = (input: ResourceRequestStatusFilter, context: __SerdeContext): any => { - return { - ...(input.OperationStatuses != null && { - OperationStatuses: se_OperationStatuses(input.OperationStatuses, context), - }), - ...(input.Operations != null && { Operations: se_Operations(input.Operations, context) }), - }; -}; +// se_ResourceRequestStatusFilter omitted. /** * serializeAws_json1_0UpdateResourceInput */ const se_UpdateResourceInput = (input: UpdateResourceInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.PatchDocument != null && { PatchDocument: input.PatchDocument }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Identifier: [], + PatchDocument: [], + RoleArn: [], + TypeName: [], + TypeVersionId: [], + }); }; -/** - * deserializeAws_json1_0AlreadyExistsException - */ -const de_AlreadyExistsException = (output: any, context: __SerdeContext): AlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AlreadyExistsException omitted. /** * deserializeAws_json1_0CancelResourceRequestOutput */ const de_CancelResourceRequestOutput = (output: any, context: __SerdeContext): CancelResourceRequestOutput => { - return { - ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined, - } as any; + return take(output, { + ProgressEvent: (_: any) => de_ProgressEvent(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ClientTokenConflictException - */ -const de_ClientTokenConflictException = (output: any, context: __SerdeContext): ClientTokenConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ClientTokenConflictException omitted. -/** - * deserializeAws_json1_0ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_0ConcurrentOperationException - */ -const de_ConcurrentOperationException = (output: any, context: __SerdeContext): ConcurrentOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentOperationException omitted. /** * deserializeAws_json1_0CreateResourceOutput */ const de_CreateResourceOutput = (output: any, context: __SerdeContext): CreateResourceOutput => { - return { - ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined, - } as any; + return take(output, { + ProgressEvent: (_: any) => de_ProgressEvent(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteResourceOutput */ const de_DeleteResourceOutput = (output: any, context: __SerdeContext): DeleteResourceOutput => { - return { - ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined, - } as any; + return take(output, { + ProgressEvent: (_: any) => de_ProgressEvent(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GeneralServiceException - */ -const de_GeneralServiceException = (output: any, context: __SerdeContext): GeneralServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_GeneralServiceException omitted. -/** - * deserializeAws_json1_0GetResourceOutput - */ -const de_GetResourceOutput = (output: any, context: __SerdeContext): GetResourceOutput => { - return { - ResourceDescription: - output.ResourceDescription != null ? de_ResourceDescription(output.ResourceDescription, context) : undefined, - TypeName: __expectString(output.TypeName), - } as any; -}; +// de_GetResourceOutput omitted. /** * deserializeAws_json1_0GetResourceRequestStatusOutput */ const de_GetResourceRequestStatusOutput = (output: any, context: __SerdeContext): GetResourceRequestStatusOutput => { - return { - ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined, - } as any; + return take(output, { + ProgressEvent: (_: any) => de_ProgressEvent(_, context), + }) as any; }; -/** - * deserializeAws_json1_0HandlerFailureException - */ -const de_HandlerFailureException = (output: any, context: __SerdeContext): HandlerFailureException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_HandlerFailureException omitted. -/** - * deserializeAws_json1_0HandlerInternalFailureException - */ -const de_HandlerInternalFailureException = (output: any, context: __SerdeContext): HandlerInternalFailureException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_HandlerInternalFailureException omitted. -/** - * deserializeAws_json1_0InvalidCredentialsException - */ -const de_InvalidCredentialsException = (output: any, context: __SerdeContext): InvalidCredentialsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidCredentialsException omitted. -/** - * deserializeAws_json1_0InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. /** * deserializeAws_json1_0ListResourceRequestsOutput */ const de_ListResourceRequestsOutput = (output: any, context: __SerdeContext): ListResourceRequestsOutput => { - return { - NextToken: __expectString(output.NextToken), - ResourceRequestStatusSummaries: - output.ResourceRequestStatusSummaries != null - ? de_ResourceRequestStatusSummaries(output.ResourceRequestStatusSummaries, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ResourceRequestStatusSummaries: (_: any) => de_ResourceRequestStatusSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListResourcesOutput - */ -const de_ListResourcesOutput = (output: any, context: __SerdeContext): ListResourcesOutput => { - return { - NextToken: __expectString(output.NextToken), - ResourceDescriptions: - output.ResourceDescriptions != null ? de_ResourceDescriptions(output.ResourceDescriptions, context) : undefined, - TypeName: __expectString(output.TypeName), - } as any; -}; +// de_ListResourcesOutput omitted. -/** - * deserializeAws_json1_0NetworkFailureException - */ -const de_NetworkFailureException = (output: any, context: __SerdeContext): NetworkFailureException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NetworkFailureException omitted. -/** - * deserializeAws_json1_0NotStabilizedException - */ -const de_NotStabilizedException = (output: any, context: __SerdeContext): NotStabilizedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotStabilizedException omitted. -/** - * deserializeAws_json1_0NotUpdatableException - */ -const de_NotUpdatableException = (output: any, context: __SerdeContext): NotUpdatableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotUpdatableException omitted. -/** - * deserializeAws_json1_0PrivateTypeException - */ -const de_PrivateTypeException = (output: any, context: __SerdeContext): PrivateTypeException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PrivateTypeException omitted. /** * deserializeAws_json1_0ProgressEvent */ const de_ProgressEvent = (output: any, context: __SerdeContext): ProgressEvent => { - return { - ErrorCode: __expectString(output.ErrorCode), - EventTime: - output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined, - Identifier: __expectString(output.Identifier), - Operation: __expectString(output.Operation), - OperationStatus: __expectString(output.OperationStatus), - RequestToken: __expectString(output.RequestToken), - ResourceModel: __expectString(output.ResourceModel), - RetryAfter: - output.RetryAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RetryAfter))) : undefined, - StatusMessage: __expectString(output.StatusMessage), - TypeName: __expectString(output.TypeName), - } as any; + return take(output, { + ErrorCode: __expectString, + EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Identifier: __expectString, + Operation: __expectString, + OperationStatus: __expectString, + RequestToken: __expectString, + ResourceModel: __expectString, + RetryAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StatusMessage: __expectString, + TypeName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0RequestTokenNotFoundException - */ -const de_RequestTokenNotFoundException = (output: any, context: __SerdeContext): RequestTokenNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_RequestTokenNotFoundException omitted. -/** - * deserializeAws_json1_0ResourceConflictException - */ -const de_ResourceConflictException = (output: any, context: __SerdeContext): ResourceConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceConflictException omitted. -/** - * deserializeAws_json1_0ResourceDescription - */ -const de_ResourceDescription = (output: any, context: __SerdeContext): ResourceDescription => { - return { - Identifier: __expectString(output.Identifier), - Properties: __expectString(output.Properties), - } as any; -}; +// de_ResourceDescription omitted. -/** - * deserializeAws_json1_0ResourceDescriptions - */ -const de_ResourceDescriptions = (output: any, context: __SerdeContext): ResourceDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceDescription(entry, context); - }); - return retVal; -}; +// de_ResourceDescriptions omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_0ResourceRequestStatusSummaries @@ -1546,66 +1305,28 @@ const de_ResourceRequestStatusSummaries = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProgressEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ServiceInternalErrorException - */ -const de_ServiceInternalErrorException = (output: any, context: __SerdeContext): ServiceInternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceInternalErrorException omitted. -/** - * deserializeAws_json1_0ServiceLimitExceededException - */ -const de_ServiceLimitExceededException = (output: any, context: __SerdeContext): ServiceLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceLimitExceededException omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0TypeNotFoundException - */ -const de_TypeNotFoundException = (output: any, context: __SerdeContext): TypeNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TypeNotFoundException omitted. -/** - * deserializeAws_json1_0UnsupportedActionException - */ -const de_UnsupportedActionException = (output: any, context: __SerdeContext): UnsupportedActionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedActionException omitted. /** * deserializeAws_json1_0UpdateResourceOutput */ const de_UpdateResourceOutput = (output: any, context: __SerdeContext): UpdateResourceOutput => { - return { - ProgressEvent: output.ProgressEvent != null ? de_ProgressEvent(output.ProgressEvent, context) : undefined, - } as any; + return take(output, { + ProgressEvent: (_: any) => de_ProgressEvent(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -1628,6 +1349,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-clouddirectory/src/protocols/Aws_restJson1.ts b/clients/client-clouddirectory/src/protocols/Aws_restJson1.ts index 55d9d0bb6025..c0303a23e1c5 100644 --- a/clients/client-clouddirectory/src/protocols/Aws_restJson1.ts +++ b/clients/client-clouddirectory/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,9 +10,10 @@ import { expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -170,35 +172,23 @@ import { AttributeKeyAndValue, AttributeNameAndValue, BatchAddFacetToObject, - BatchAddFacetToObjectResponse, BatchAttachObject, - BatchAttachObjectResponse, BatchAttachPolicy, - BatchAttachPolicyResponse, BatchAttachToIndex, - BatchAttachToIndexResponse, BatchAttachTypedLink, BatchAttachTypedLinkResponse, BatchCreateIndex, - BatchCreateIndexResponse, BatchCreateObject, - BatchCreateObjectResponse, BatchDeleteObject, - BatchDeleteObjectResponse, BatchDetachFromIndex, - BatchDetachFromIndexResponse, BatchDetachObject, - BatchDetachObjectResponse, BatchDetachPolicy, - BatchDetachPolicyResponse, BatchDetachTypedLink, - BatchDetachTypedLinkResponse, BatchGetLinkAttributes, BatchGetLinkAttributesResponse, BatchGetObjectAttributes, BatchGetObjectAttributesResponse, BatchGetObjectInformation, - BatchGetObjectInformationResponse, BatchListAttachedIndices, BatchListAttachedIndicesResponse, BatchListIncomingTypedLinks, @@ -208,29 +198,19 @@ import { BatchListObjectAttributes, BatchListObjectAttributesResponse, BatchListObjectChildren, - BatchListObjectChildrenResponse, BatchListObjectParentPaths, - BatchListObjectParentPathsResponse, BatchListObjectParents, - BatchListObjectParentsResponse, BatchListObjectPolicies, - BatchListObjectPoliciesResponse, BatchListOutgoingTypedLinks, BatchListOutgoingTypedLinksResponse, BatchListPolicyAttachments, - BatchListPolicyAttachmentsResponse, BatchLookupPolicy, - BatchLookupPolicyResponse, - BatchReadException, BatchReadOperation, BatchReadOperationResponse, BatchReadSuccessfulResponse, BatchRemoveFacetFromObject, - BatchRemoveFacetFromObjectResponse, BatchUpdateLinkAttributes, - BatchUpdateLinkAttributesResponse, BatchUpdateObjectAttributes, - BatchUpdateObjectAttributesResponse, BatchWriteException, BatchWriteOperation, BatchWriteOperationResponse, @@ -240,7 +220,6 @@ import { DirectoryDeletedException, DirectoryNotDisabledException, DirectoryNotEnabledException, - Facet, FacetAlreadyExistsException, FacetAttribute, FacetAttributeDefinition, @@ -271,12 +250,8 @@ import { ObjectAttributeAction, ObjectAttributeRange, ObjectAttributeUpdate, - ObjectIdentifierAndLinkNameTuple, ObjectNotDetachedException, ObjectReference, - PathToObjectIdentifiers, - PolicyAttachment, - PolicyToPath, ResourceNotFoundException, RetryableConflictException, Rule, @@ -313,13 +288,13 @@ export const se_AddFacetToObjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/facets"; let body: any; - body = JSON.stringify({ - ...(input.ObjectAttributeList != null && { - ObjectAttributeList: se_AttributeKeyAndValueList(input.ObjectAttributeList, context), - }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacet(input.SchemaFacet, context) }), - }); + body = JSON.stringify( + take(input, { + ObjectAttributeList: (_) => se_AttributeKeyAndValueList(_, context), + ObjectReference: (_) => _json(_), + SchemaFacet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -347,9 +322,11 @@ export const se_ApplySchemaCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/apply"; let body: any; - body = JSON.stringify({ - ...(input.PublishedSchemaArn != null && { PublishedSchemaArn: input.PublishedSchemaArn }), - }); + body = JSON.stringify( + take(input, { + PublishedSchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -377,11 +354,13 @@ export const se_AttachObjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/attach"; let body: any; - body = JSON.stringify({ - ...(input.ChildReference != null && { ChildReference: se_ObjectReference(input.ChildReference, context) }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - }); + body = JSON.stringify( + take(input, { + ChildReference: (_) => _json(_), + LinkName: [], + ParentReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -409,10 +388,12 @@ export const se_AttachPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/policy/attach"; let body: any; - body = JSON.stringify({ - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.PolicyReference != null && { PolicyReference: se_ObjectReference(input.PolicyReference, context) }), - }); + body = JSON.stringify( + take(input, { + ObjectReference: (_) => _json(_), + PolicyReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -440,10 +421,12 @@ export const se_AttachToIndexCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/index/attach"; let body: any; - body = JSON.stringify({ - ...(input.IndexReference != null && { IndexReference: se_ObjectReference(input.IndexReference, context) }), - ...(input.TargetReference != null && { TargetReference: se_ObjectReference(input.TargetReference, context) }), - }); + body = JSON.stringify( + take(input, { + IndexReference: (_) => _json(_), + TargetReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -471,18 +454,14 @@ export const se_AttachTypedLinkCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/attach"; let body: any; - body = JSON.stringify({ - ...(input.Attributes != null && { Attributes: se_AttributeNameAndValueList(input.Attributes, context) }), - ...(input.SourceObjectReference != null && { - SourceObjectReference: se_ObjectReference(input.SourceObjectReference, context), - }), - ...(input.TargetObjectReference != null && { - TargetObjectReference: se_ObjectReference(input.TargetObjectReference, context), - }), - ...(input.TypedLinkFacet != null && { - TypedLinkFacet: se_TypedLinkSchemaAndFacetName(input.TypedLinkFacet, context), - }), - }); + body = JSON.stringify( + take(input, { + Attributes: (_) => se_AttributeNameAndValueList(_, context), + SourceObjectReference: (_) => _json(_), + TargetObjectReference: (_) => _json(_), + TypedLinkFacet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -511,9 +490,11 @@ export const se_BatchReadCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/batchread"; let body: any; - body = JSON.stringify({ - ...(input.Operations != null && { Operations: se_BatchReadOperationList(input.Operations, context) }), - }); + body = JSON.stringify( + take(input, { + Operations: (_) => se_BatchReadOperationList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -541,9 +522,11 @@ export const se_BatchWriteCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/batchwrite"; let body: any; - body = JSON.stringify({ - ...(input.Operations != null && { Operations: se_BatchWriteOperationList(input.Operations, context) }), - }); + body = JSON.stringify( + take(input, { + Operations: (_) => se_BatchWriteOperationList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -571,9 +554,11 @@ export const se_CreateDirectoryCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/directory/create"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -601,12 +586,14 @@ export const se_CreateFacetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet/create"; let body: any; - body = JSON.stringify({ - ...(input.Attributes != null && { Attributes: se_FacetAttributeList(input.Attributes, context) }), - ...(input.FacetStyle != null && { FacetStyle: input.FacetStyle }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ObjectType != null && { ObjectType: input.ObjectType }), - }); + body = JSON.stringify( + take(input, { + Attributes: (_) => se_FacetAttributeList(_, context), + FacetStyle: [], + Name: [], + ObjectType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -633,14 +620,14 @@ export const se_CreateIndexCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/index"; let body: any; - body = JSON.stringify({ - ...(input.IsUnique != null && { IsUnique: input.IsUnique }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.OrderedIndexedAttributeList != null && { - OrderedIndexedAttributeList: se_AttributeKeyList(input.OrderedIndexedAttributeList, context), - }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - }); + body = JSON.stringify( + take(input, { + IsUnique: [], + LinkName: [], + OrderedIndexedAttributeList: (_) => _json(_), + ParentReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -667,14 +654,14 @@ export const se_CreateObjectCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object"; let body: any; - body = JSON.stringify({ - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.ObjectAttributeList != null && { - ObjectAttributeList: se_AttributeKeyAndValueList(input.ObjectAttributeList, context), - }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - ...(input.SchemaFacets != null && { SchemaFacets: se_SchemaFacetList(input.SchemaFacets, context) }), - }); + body = JSON.stringify( + take(input, { + LinkName: [], + ObjectAttributeList: (_) => se_AttributeKeyAndValueList(_, context), + ParentReference: (_) => _json(_), + SchemaFacets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -701,9 +688,11 @@ export const se_CreateSchemaCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/create"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -731,9 +720,11 @@ export const se_CreateTypedLinkFacetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/facet/create"; let body: any; - body = JSON.stringify({ - ...(input.Facet != null && { Facet: se_TypedLinkFacet(input.Facet, context) }), - }); + body = JSON.stringify( + take(input, { + Facet: (_) => se_TypedLinkFacet(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -787,9 +778,11 @@ export const se_DeleteFacetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet/delete"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -817,9 +810,11 @@ export const se_DeleteObjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/delete"; let body: any; - body = JSON.stringify({ - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -872,9 +867,11 @@ export const se_DeleteTypedLinkFacetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/facet/delete"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -902,10 +899,12 @@ export const se_DetachFromIndexCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/index/detach"; let body: any; - body = JSON.stringify({ - ...(input.IndexReference != null && { IndexReference: se_ObjectReference(input.IndexReference, context) }), - ...(input.TargetReference != null && { TargetReference: se_ObjectReference(input.TargetReference, context) }), - }); + body = JSON.stringify( + take(input, { + IndexReference: (_) => _json(_), + TargetReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -933,10 +932,12 @@ export const se_DetachObjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/detach"; let body: any; - body = JSON.stringify({ - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - }); + body = JSON.stringify( + take(input, { + LinkName: [], + ParentReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -964,10 +965,12 @@ export const se_DetachPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/policy/detach"; let body: any; - body = JSON.stringify({ - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.PolicyReference != null && { PolicyReference: se_ObjectReference(input.PolicyReference, context) }), - }); + body = JSON.stringify( + take(input, { + ObjectReference: (_) => _json(_), + PolicyReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -995,11 +998,11 @@ export const se_DetachTypedLinkCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/detach"; let body: any; - body = JSON.stringify({ - ...(input.TypedLinkSpecifier != null && { - TypedLinkSpecifier: se_TypedLinkSpecifier(input.TypedLinkSpecifier, context), - }), - }); + body = JSON.stringify( + take(input, { + TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1078,9 +1081,11 @@ export const se_GetAppliedSchemaVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/getappliedschema"; let body: any; - body = JSON.stringify({ - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - }); + body = JSON.stringify( + take(input, { + SchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1133,9 +1138,11 @@ export const se_GetFacetCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1163,13 +1170,13 @@ export const se_GetLinkAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/attributes/get"; let body: any; - body = JSON.stringify({ - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNameList(input.AttributeNames, context) }), - ...(input.ConsistencyLevel != null && { ConsistencyLevel: input.ConsistencyLevel }), - ...(input.TypedLinkSpecifier != null && { - TypedLinkSpecifier: se_TypedLinkSpecifier(input.TypedLinkSpecifier, context), - }), - }); + body = JSON.stringify( + take(input, { + AttributeNames: (_) => _json(_), + ConsistencyLevel: [], + TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1198,11 +1205,13 @@ export const se_GetObjectAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/attributes/get"; let body: any; - body = JSON.stringify({ - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNameList(input.AttributeNames, context) }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacet(input.SchemaFacet, context) }), - }); + body = JSON.stringify( + take(input, { + AttributeNames: (_) => _json(_), + ObjectReference: (_) => _json(_), + SchemaFacet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1231,9 +1240,11 @@ export const se_GetObjectInformationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/information"; let body: any; - body = JSON.stringify({ - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1287,9 +1298,11 @@ export const se_GetTypedLinkFacetInformationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/facet/get"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1316,12 +1329,14 @@ export const se_ListAppliedSchemaArnsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/applied"; let body: any; - body = JSON.stringify({ - ...(input.DirectoryArn != null && { DirectoryArn: input.DirectoryArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - }); + body = JSON.stringify( + take(input, { + DirectoryArn: [], + MaxResults: [], + NextToken: [], + SchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1350,11 +1365,13 @@ export const se_ListAttachedIndicesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/indices"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TargetReference != null && { TargetReference: se_ObjectReference(input.TargetReference, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + TargetReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1381,10 +1398,12 @@ export const se_ListDevelopmentSchemaArnsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/development"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1411,11 +1430,13 @@ export const se_ListDirectoriesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/directory/list"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.state != null && { state: input.state }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + state: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1443,11 +1464,13 @@ export const se_ListFacetAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet/attributes"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + Name: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1475,10 +1498,12 @@ export const se_ListFacetNamesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet/list"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1506,18 +1531,16 @@ export const se_ListIncomingTypedLinksCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/incoming"; let body: any; - body = JSON.stringify({ - ...(input.ConsistencyLevel != null && { ConsistencyLevel: input.ConsistencyLevel }), - ...(input.FilterAttributeRanges != null && { - FilterAttributeRanges: se_TypedLinkAttributeRangeList(input.FilterAttributeRanges, context), - }), - ...(input.FilterTypedLink != null && { - FilterTypedLink: se_TypedLinkSchemaAndFacetName(input.FilterTypedLink, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + ConsistencyLevel: [], + FilterAttributeRanges: (_) => se_TypedLinkAttributeRangeList(_, context), + FilterTypedLink: (_) => _json(_), + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1546,14 +1569,14 @@ export const se_ListIndexCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/index/targets"; let body: any; - body = JSON.stringify({ - ...(input.IndexReference != null && { IndexReference: se_ObjectReference(input.IndexReference, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RangesOnIndexedValues != null && { - RangesOnIndexedValues: se_ObjectAttributeRangeList(input.RangesOnIndexedValues, context), - }), - }); + body = JSON.stringify( + take(input, { + IndexReference: (_) => _json(_), + MaxResults: [], + NextToken: [], + RangesOnIndexedValues: (_) => se_ObjectAttributeRangeList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1580,11 +1603,13 @@ export const se_ListManagedSchemaArnsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/managed"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + SchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1613,12 +1638,14 @@ export const se_ListObjectAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/attributes"; let body: any; - body = JSON.stringify({ - ...(input.FacetFilter != null && { FacetFilter: se_SchemaFacet(input.FacetFilter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + FacetFilter: (_) => _json(_), + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1647,11 +1674,13 @@ export const se_ListObjectChildrenCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/children"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1679,11 +1708,13 @@ export const se_ListObjectParentPathsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/parentpaths"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1712,14 +1743,14 @@ export const se_ListObjectParentsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/parent"; let body: any; - body = JSON.stringify({ - ...(input.IncludeAllLinksToEachParent != null && { - IncludeAllLinksToEachParent: input.IncludeAllLinksToEachParent, - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + IncludeAllLinksToEachParent: [], + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1748,11 +1779,13 @@ export const se_ListObjectPoliciesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/policy"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1780,18 +1813,16 @@ export const se_ListOutgoingTypedLinksCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/outgoing"; let body: any; - body = JSON.stringify({ - ...(input.ConsistencyLevel != null && { ConsistencyLevel: input.ConsistencyLevel }), - ...(input.FilterAttributeRanges != null && { - FilterAttributeRanges: se_TypedLinkAttributeRangeList(input.FilterAttributeRanges, context), - }), - ...(input.FilterTypedLink != null && { - FilterTypedLink: se_TypedLinkSchemaAndFacetName(input.FilterTypedLink, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + ConsistencyLevel: [], + FilterAttributeRanges: (_) => se_TypedLinkAttributeRangeList(_, context), + FilterTypedLink: (_) => _json(_), + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1820,11 +1851,13 @@ export const se_ListPolicyAttachmentsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/policy/attachment"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyReference != null && { PolicyReference: se_ObjectReference(input.PolicyReference, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + PolicyReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1851,11 +1884,13 @@ export const se_ListPublishedSchemaArnsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/published"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + SchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1881,11 +1916,13 @@ export const se_ListTagsForResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1913,11 +1950,13 @@ export const se_ListTypedLinkFacetAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/facet/attributes"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + Name: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1945,10 +1984,12 @@ export const se_ListTypedLinkFacetNamesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/facet/list"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1976,11 +2017,13 @@ export const se_LookupPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/policy/lookup"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2008,11 +2051,13 @@ export const se_PublishSchemaCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/publish"; let body: any; - body = JSON.stringify({ - ...(input.MinorVersion != null && { MinorVersion: input.MinorVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }); + body = JSON.stringify( + take(input, { + MinorVersion: [], + Name: [], + Version: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2040,9 +2085,11 @@ export const se_PutSchemaFromJsonCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/json"; let body: any; - body = JSON.stringify({ - ...(input.Document != null && { Document: input.Document }), - }); + body = JSON.stringify( + take(input, { + Document: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2070,10 +2117,12 @@ export const se_RemoveFacetFromObjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/facets/delete"; let body: any; - body = JSON.stringify({ - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacet(input.SchemaFacet, context) }), - }); + body = JSON.stringify( + take(input, { + ObjectReference: (_) => _json(_), + SchemaFacet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2099,10 +2148,12 @@ export const se_TagResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags/add"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2129,10 +2180,12 @@ export const se_UntagResourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/tags/remove"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2159,13 +2212,13 @@ export const se_UpdateFacetCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/facet"; let body: any; - body = JSON.stringify({ - ...(input.AttributeUpdates != null && { - AttributeUpdates: se_FacetAttributeUpdateList(input.AttributeUpdates, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ObjectType != null && { ObjectType: input.ObjectType }), - }); + body = JSON.stringify( + take(input, { + AttributeUpdates: (_) => se_FacetAttributeUpdateList(_, context), + Name: [], + ObjectType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2193,14 +2246,12 @@ export const se_UpdateLinkAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/attributes/update"; let body: any; - body = JSON.stringify({ - ...(input.AttributeUpdates != null && { - AttributeUpdates: se_LinkAttributeUpdateList(input.AttributeUpdates, context), - }), - ...(input.TypedLinkSpecifier != null && { - TypedLinkSpecifier: se_TypedLinkSpecifier(input.TypedLinkSpecifier, context), - }), - }); + body = JSON.stringify( + take(input, { + AttributeUpdates: (_) => se_LinkAttributeUpdateList(_, context), + TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2228,12 +2279,12 @@ export const se_UpdateObjectAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/object/update"; let body: any; - body = JSON.stringify({ - ...(input.AttributeUpdates != null && { - AttributeUpdates: se_ObjectAttributeUpdateList(input.AttributeUpdates, context), - }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }); + body = JSON.stringify( + take(input, { + AttributeUpdates: (_) => se_ObjectAttributeUpdateList(_, context), + ObjectReference: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2261,9 +2312,11 @@ export const se_UpdateSchemaCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/update"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2291,15 +2344,13 @@ export const se_UpdateTypedLinkFacetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/typedlink/facet"; let body: any; - body = JSON.stringify({ - ...(input.AttributeUpdates != null && { - AttributeUpdates: se_TypedLinkFacetAttributeUpdateList(input.AttributeUpdates, context), - }), - ...(input.IdentityAttributeOrder != null && { - IdentityAttributeOrder: se_AttributeNameList(input.IdentityAttributeOrder, context), - }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + AttributeUpdates: (_) => se_TypedLinkFacetAttributeUpdateList(_, context), + IdentityAttributeOrder: (_) => _json(_), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2326,11 +2377,13 @@ export const se_UpgradeAppliedSchemaCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/upgradeapplied"; let body: any; - body = JSON.stringify({ - ...(input.DirectoryArn != null && { DirectoryArn: input.DirectoryArn }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.PublishedSchemaArn != null && { PublishedSchemaArn: input.PublishedSchemaArn }), - }); + body = JSON.stringify( + take(input, { + DirectoryArn: [], + DryRun: [], + PublishedSchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2357,12 +2410,14 @@ export const se_UpgradePublishedSchemaCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/amazonclouddirectory/2017-01-11/schema/upgradepublished"; let body: any; - body = JSON.stringify({ - ...(input.DevelopmentSchemaArn != null && { DevelopmentSchemaArn: input.DevelopmentSchemaArn }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MinorVersion != null && { MinorVersion: input.MinorVersion }), - ...(input.PublishedSchemaArn != null && { PublishedSchemaArn: input.PublishedSchemaArn }), - }); + body = JSON.stringify( + take(input, { + DevelopmentSchemaArn: [], + DryRun: [], + MinorVersion: [], + PublishedSchemaArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2433,10 +2488,9 @@ const de_AddFacetToObjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2456,12 +2510,11 @@ export const de_ApplySchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppliedSchemaArn != null) { - contents.AppliedSchemaArn = __expectString(data.AppliedSchemaArn); - } - if (data.DirectoryArn != null) { - contents.DirectoryArn = __expectString(data.DirectoryArn); - } + const doc = take(data, { + AppliedSchemaArn: __expectString, + DirectoryArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2507,10 +2560,9 @@ const de_ApplySchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2530,9 +2582,10 @@ export const de_AttachObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AttachedObjectIdentifier != null) { - contents.AttachedObjectIdentifier = __expectString(data.AttachedObjectIdentifier); - } + const doc = take(data, { + AttachedObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2584,10 +2637,9 @@ const de_AttachObjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2652,10 +2704,9 @@ const de_AttachPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2675,9 +2726,10 @@ export const de_AttachToIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AttachedObjectIdentifier != null) { - contents.AttachedObjectIdentifier = __expectString(data.AttachedObjectIdentifier); - } + const doc = take(data, { + AttachedObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2732,10 +2784,9 @@ const de_AttachToIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,9 +2806,10 @@ export const de_AttachTypedLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TypedLinkSpecifier != null) { - contents.TypedLinkSpecifier = de_TypedLinkSpecifier(data.TypedLinkSpecifier, context); - } + const doc = take(data, { + TypedLinkSpecifier: (_) => de_TypedLinkSpecifier(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2806,10 +2858,9 @@ const de_AttachTypedLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2829,9 +2880,10 @@ export const de_BatchReadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Responses != null) { - contents.Responses = de_BatchReadOperationResponseList(data.Responses, context); - } + const doc = take(data, { + Responses: (_) => de_BatchReadOperationResponseList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2871,10 +2923,9 @@ const de_BatchReadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2894,9 +2945,10 @@ export const de_BatchWriteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Responses != null) { - contents.Responses = de_BatchWriteOperationResponseList(data.Responses, context); - } + const doc = take(data, { + Responses: (_) => de_BatchWriteOperationResponseList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2939,10 +2991,9 @@ const de_BatchWriteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2962,18 +3013,13 @@ export const de_CreateDirectoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppliedSchemaArn != null) { - contents.AppliedSchemaArn = __expectString(data.AppliedSchemaArn); - } - if (data.DirectoryArn != null) { - contents.DirectoryArn = __expectString(data.DirectoryArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ObjectIdentifier != null) { - contents.ObjectIdentifier = __expectString(data.ObjectIdentifier); - } + const doc = take(data, { + AppliedSchemaArn: __expectString, + DirectoryArn: __expectString, + Name: __expectString, + ObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3016,10 +3062,9 @@ const de_CreateDirectoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3087,10 +3132,9 @@ const de_CreateFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3110,9 +3154,10 @@ export const de_CreateIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ObjectIdentifier != null) { - contents.ObjectIdentifier = __expectString(data.ObjectIdentifier); - } + const doc = take(data, { + ObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3164,10 +3209,9 @@ const de_CreateIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3187,9 +3231,10 @@ export const de_CreateObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ObjectIdentifier != null) { - contents.ObjectIdentifier = __expectString(data.ObjectIdentifier); - } + const doc = take(data, { + ObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3241,10 +3286,9 @@ const de_CreateObjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3264,9 +3308,10 @@ export const de_CreateSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } + const doc = take(data, { + SchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3306,10 +3351,9 @@ const de_CreateSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3377,10 +3421,9 @@ const de_CreateTypedLinkFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3400,9 +3443,10 @@ export const de_DeleteDirectoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DirectoryArn != null) { - contents.DirectoryArn = __expectString(data.DirectoryArn); - } + const doc = take(data, { + DirectoryArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3448,10 +3492,9 @@ const de_DeleteDirectoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3516,10 +3559,9 @@ const de_DeleteFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3584,10 +3626,9 @@ const de_DeleteObjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3607,9 +3648,10 @@ export const de_DeleteSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } + const doc = take(data, { + SchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3652,10 +3694,9 @@ const de_DeleteSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3717,10 +3758,9 @@ const de_DeleteTypedLinkFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3740,9 +3780,10 @@ export const de_DetachFromIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DetachedObjectIdentifier != null) { - contents.DetachedObjectIdentifier = __expectString(data.DetachedObjectIdentifier); - } + const doc = take(data, { + DetachedObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3791,10 +3832,9 @@ const de_DetachFromIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3814,9 +3854,10 @@ export const de_DetachObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DetachedObjectIdentifier != null) { - contents.DetachedObjectIdentifier = __expectString(data.DetachedObjectIdentifier); - } + const doc = take(data, { + DetachedObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3862,10 +3903,9 @@ const de_DetachObjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3930,10 +3970,9 @@ const de_DetachPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3998,10 +4037,9 @@ const de_DetachTypedLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4021,9 +4059,10 @@ export const de_DisableDirectoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DirectoryArn != null) { - contents.DirectoryArn = __expectString(data.DirectoryArn); - } + const doc = take(data, { + DirectoryArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4066,10 +4105,9 @@ const de_DisableDirectoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4089,9 +4127,10 @@ export const de_EnableDirectoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DirectoryArn != null) { - contents.DirectoryArn = __expectString(data.DirectoryArn); - } + const doc = take(data, { + DirectoryArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4134,10 +4173,9 @@ const de_EnableDirectoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4157,9 +4195,10 @@ export const de_GetAppliedSchemaVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppliedSchemaArn != null) { - contents.AppliedSchemaArn = __expectString(data.AppliedSchemaArn); - } + const doc = take(data, { + AppliedSchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4199,10 +4238,9 @@ const de_GetAppliedSchemaVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4222,9 +4260,10 @@ export const de_GetDirectoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Directory != null) { - contents.Directory = de_Directory(data.Directory, context); - } + const doc = take(data, { + Directory: (_) => de_Directory(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4261,10 +4300,9 @@ const de_GetDirectoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4284,9 +4322,10 @@ export const de_GetFacetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Facet != null) { - contents.Facet = de_Facet(data.Facet, context); - } + const doc = take(data, { + Facet: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4329,10 +4368,9 @@ const de_GetFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4352,9 +4390,10 @@ export const de_GetLinkAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_AttributeKeyAndValueList(data.Attributes, context); - } + const doc = take(data, { + Attributes: (_) => de_AttributeKeyAndValueList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4400,10 +4439,9 @@ const de_GetLinkAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4423,9 +4461,10 @@ export const de_GetObjectAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_AttributeKeyAndValueList(data.Attributes, context); - } + const doc = take(data, { + Attributes: (_) => de_AttributeKeyAndValueList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4471,10 +4510,9 @@ const de_GetObjectAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4494,12 +4532,11 @@ export const de_GetObjectInformationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ObjectIdentifier != null) { - contents.ObjectIdentifier = __expectString(data.ObjectIdentifier); - } - if (data.SchemaFacets != null) { - contents.SchemaFacets = de_SchemaFacetList(data.SchemaFacets, context); - } + const doc = take(data, { + ObjectIdentifier: __expectString, + SchemaFacets: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4542,10 +4579,9 @@ const de_GetObjectInformationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4565,12 +4601,11 @@ export const de_GetSchemaAsJsonCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Document != null) { - contents.Document = __expectString(data.Document); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Document: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4610,10 +4645,9 @@ const de_GetSchemaAsJsonCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4633,9 +4667,10 @@ export const de_GetTypedLinkFacetInformationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityAttributeOrder != null) { - contents.IdentityAttributeOrder = de_AttributeNameList(data.IdentityAttributeOrder, context); - } + const doc = take(data, { + IdentityAttributeOrder: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4681,10 +4716,9 @@ const de_GetTypedLinkFacetInformationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4704,12 +4738,11 @@ export const de_ListAppliedSchemaArnsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SchemaArns != null) { - contents.SchemaArns = de_Arns(data.SchemaArns, context); - } + const doc = take(data, { + NextToken: __expectString, + SchemaArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4752,10 +4785,9 @@ const de_ListAppliedSchemaArnsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4775,12 +4807,11 @@ export const de_ListAttachedIndicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IndexAttachments != null) { - contents.IndexAttachments = de_IndexAttachmentList(data.IndexAttachments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + IndexAttachments: (_) => de_IndexAttachmentList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4823,10 +4854,9 @@ const de_ListAttachedIndicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4846,12 +4876,11 @@ export const de_ListDevelopmentSchemaArnsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SchemaArns != null) { - contents.SchemaArns = de_Arns(data.SchemaArns, context); - } + const doc = take(data, { + NextToken: __expectString, + SchemaArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4894,10 +4923,9 @@ const de_ListDevelopmentSchemaArnsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4917,12 +4945,11 @@ export const de_ListDirectoriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Directories != null) { - contents.Directories = de_DirectoryList(data.Directories, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Directories: (_) => de_DirectoryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4962,10 +4989,9 @@ const de_ListDirectoriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4985,12 +5011,11 @@ export const de_ListFacetAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_FacetAttributeList(data.Attributes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attributes: (_) => de_FacetAttributeList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5036,10 +5061,9 @@ const de_ListFacetAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5059,12 +5083,11 @@ export const de_ListFacetNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FacetNames != null) { - contents.FacetNames = de_FacetNameList(data.FacetNames, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + FacetNames: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5107,10 +5130,9 @@ const de_ListFacetNamesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5130,12 +5152,11 @@ export const de_ListIncomingTypedLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LinkSpecifiers != null) { - contents.LinkSpecifiers = de_TypedLinkSpecifierList(data.LinkSpecifiers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LinkSpecifiers: (_) => de_TypedLinkSpecifierList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5184,10 +5205,9 @@ const de_ListIncomingTypedLinksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5207,12 +5227,11 @@ export const de_ListIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IndexAttachments != null) { - contents.IndexAttachments = de_IndexAttachmentList(data.IndexAttachments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + IndexAttachments: (_) => de_IndexAttachmentList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5264,10 +5283,9 @@ const de_ListIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5287,12 +5305,11 @@ export const de_ListManagedSchemaArnsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SchemaArns != null) { - contents.SchemaArns = de_Arns(data.SchemaArns, context); - } + const doc = take(data, { + NextToken: __expectString, + SchemaArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5329,10 +5346,9 @@ const de_ListManagedSchemaArnsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5352,12 +5368,11 @@ export const de_ListObjectAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_AttributeKeyAndValueList(data.Attributes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attributes: (_) => de_AttributeKeyAndValueList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5406,10 +5421,9 @@ const de_ListObjectAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5429,12 +5443,11 @@ export const de_ListObjectChildrenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Children != null) { - contents.Children = de_LinkNameToObjectIdentifierMap(data.Children, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Children: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5483,10 +5496,9 @@ const de_ListObjectChildrenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5506,12 +5518,11 @@ export const de_ListObjectParentPathsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PathToObjectIdentifiersList != null) { - contents.PathToObjectIdentifiersList = de_PathToObjectIdentifiersList(data.PathToObjectIdentifiersList, context); - } + const doc = take(data, { + NextToken: __expectString, + PathToObjectIdentifiersList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5557,10 +5568,9 @@ const de_ListObjectParentPathsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5580,15 +5590,12 @@ export const de_ListObjectParentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ParentLinks != null) { - contents.ParentLinks = de_ObjectIdentifierAndLinkNameList(data.ParentLinks, context); - } - if (data.Parents != null) { - contents.Parents = de_ObjectIdentifierToLinkNameMap(data.Parents, context); - } + const doc = take(data, { + NextToken: __expectString, + ParentLinks: _json, + Parents: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5637,10 +5644,9 @@ const de_ListObjectParentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5660,12 +5666,11 @@ export const de_ListObjectPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AttachedPolicyIds != null) { - contents.AttachedPolicyIds = de_ObjectIdentifierList(data.AttachedPolicyIds, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AttachedPolicyIds: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5711,10 +5716,9 @@ const de_ListObjectPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5734,12 +5738,11 @@ export const de_ListOutgoingTypedLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TypedLinkSpecifiers != null) { - contents.TypedLinkSpecifiers = de_TypedLinkSpecifierList(data.TypedLinkSpecifiers, context); - } + const doc = take(data, { + NextToken: __expectString, + TypedLinkSpecifiers: (_) => de_TypedLinkSpecifierList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5788,10 +5791,9 @@ const de_ListOutgoingTypedLinksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5811,12 +5813,11 @@ export const de_ListPolicyAttachmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ObjectIdentifiers != null) { - contents.ObjectIdentifiers = de_ObjectIdentifierList(data.ObjectIdentifiers, context); - } + const doc = take(data, { + NextToken: __expectString, + ObjectIdentifiers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5865,10 +5866,9 @@ const de_ListPolicyAttachmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5888,12 +5888,11 @@ export const de_ListPublishedSchemaArnsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SchemaArns != null) { - contents.SchemaArns = de_Arns(data.SchemaArns, context); - } + const doc = take(data, { + NextToken: __expectString, + SchemaArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5936,10 +5935,9 @@ const de_ListPublishedSchemaArnsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5959,12 +5957,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + NextToken: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6007,10 +6004,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6030,12 +6026,11 @@ export const de_ListTypedLinkFacetAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_TypedLinkAttributeDefinitionList(data.Attributes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attributes: (_) => de_TypedLinkAttributeDefinitionList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6081,10 +6076,9 @@ const de_ListTypedLinkFacetAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6104,12 +6098,11 @@ export const de_ListTypedLinkFacetNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FacetNames != null) { - contents.FacetNames = de_TypedLinkNameList(data.FacetNames, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + FacetNames: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6152,10 +6145,9 @@ const de_ListTypedLinkFacetNamesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6175,12 +6167,11 @@ export const de_LookupPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PolicyToPathList != null) { - contents.PolicyToPathList = de_PolicyToPathList(data.PolicyToPathList, context); - } + const doc = take(data, { + NextToken: __expectString, + PolicyToPathList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6226,10 +6217,9 @@ const de_LookupPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6249,9 +6239,10 @@ export const de_PublishSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PublishedSchemaArn != null) { - contents.PublishedSchemaArn = __expectString(data.PublishedSchemaArn); - } + const doc = take(data, { + PublishedSchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6294,10 +6285,9 @@ const de_PublishSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6317,9 +6307,10 @@ export const de_PutSchemaFromJsonCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6362,10 +6353,9 @@ const de_PutSchemaFromJsonCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6430,10 +6420,9 @@ const de_RemoveFacetFromObjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6495,10 +6484,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6560,10 +6548,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6634,10 +6621,9 @@ const de_UpdateFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6702,10 +6688,9 @@ const de_UpdateLinkAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6725,9 +6710,10 @@ export const de_UpdateObjectAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ObjectIdentifier != null) { - contents.ObjectIdentifier = __expectString(data.ObjectIdentifier); - } + const doc = take(data, { + ObjectIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6776,10 +6762,9 @@ const de_UpdateObjectAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6799,9 +6784,10 @@ export const de_UpdateSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } + const doc = take(data, { + SchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6841,10 +6827,9 @@ const de_UpdateSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6915,10 +6900,9 @@ const de_UpdateTypedLinkFacetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6938,12 +6922,11 @@ export const de_UpgradeAppliedSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DirectoryArn != null) { - contents.DirectoryArn = __expectString(data.DirectoryArn); - } - if (data.UpgradedSchemaArn != null) { - contents.UpgradedSchemaArn = __expectString(data.UpgradedSchemaArn); - } + const doc = take(data, { + DirectoryArn: __expectString, + UpgradedSchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6989,10 +6972,9 @@ const de_UpgradeAppliedSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7012,9 +6994,10 @@ export const de_UpgradePublishedSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UpgradedSchemaArn != null) { - contents.UpgradedSchemaArn = __expectString(data.UpgradedSchemaArn); - } + const doc = take(data, { + UpgradedSchemaArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7060,16 +7043,15 @@ const de_UpgradePublishedSchemaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -7079,9 +7061,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7095,15 +7078,12 @@ const de_AccessDeniedExceptionRes = async ( const de_BatchWriteExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Index != null) { - contents.Index = __expectInt32(data.Index); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Index: __expectInt32, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new BatchWriteException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7120,9 +7100,10 @@ const de_CannotListParentOfRootExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new CannotListParentOfRootException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7139,9 +7120,10 @@ const de_DirectoryAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DirectoryAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7158,9 +7140,10 @@ const de_DirectoryDeletedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DirectoryDeletedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7177,9 +7160,10 @@ const de_DirectoryNotDisabledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DirectoryNotDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7196,9 +7180,10 @@ const de_DirectoryNotEnabledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DirectoryNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7215,9 +7200,10 @@ const de_FacetAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FacetAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7231,9 +7217,10 @@ const de_FacetAlreadyExistsExceptionRes = async ( const de_FacetInUseExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FacetInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7250,9 +7237,10 @@ const de_FacetNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FacetNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7269,9 +7257,10 @@ const de_FacetValidationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FacetValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7288,9 +7277,10 @@ const de_IncompatibleSchemaExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IncompatibleSchemaException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7307,9 +7297,10 @@ const de_IndexedAttributeMissingExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IndexedAttributeMissingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7326,9 +7317,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7342,9 +7334,10 @@ const de_InternalServiceExceptionRes = async ( const de_InvalidArnExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArnException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7361,9 +7354,10 @@ const de_InvalidAttachmentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidAttachmentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7380,9 +7374,10 @@ const de_InvalidFacetUpdateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidFacetUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7399,9 +7394,10 @@ const de_InvalidNextTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7418,9 +7414,10 @@ const de_InvalidRuleExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRuleException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7437,9 +7434,10 @@ const de_InvalidSchemaDocExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidSchemaDocException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7456,9 +7454,10 @@ const de_InvalidTaggingRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidTaggingRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7475,9 +7474,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7494,9 +7494,10 @@ const de_LinkNameAlreadyInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LinkNameAlreadyInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7510,9 +7511,10 @@ const de_LinkNameAlreadyInUseExceptionRes = async ( const de_NotIndexExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotIndexException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7526,9 +7528,10 @@ const de_NotIndexExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_NotNodeExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotNodeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7542,9 +7545,10 @@ const de_NotNodeExceptionRes = async (parsedOutput: any, context: __SerdeContext const de_NotPolicyExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7561,9 +7565,10 @@ const de_ObjectAlreadyDetachedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ObjectAlreadyDetachedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7580,9 +7585,10 @@ const de_ObjectNotDetachedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ObjectNotDetachedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7599,9 +7605,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7618,9 +7625,10 @@ const de_RetryableConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new RetryableConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7637,9 +7645,10 @@ const de_SchemaAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new SchemaAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7656,9 +7665,10 @@ const de_SchemaAlreadyPublishedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new SchemaAlreadyPublishedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7675,9 +7685,10 @@ const de_StillContainsLinksExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new StillContainsLinksException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7694,9 +7705,10 @@ const de_UnsupportedIndexTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedIndexTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7710,9 +7722,10 @@ const de_UnsupportedIndexTypeExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7720,25 +7733,16 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AttributeKey - */ -const se_AttributeKey = (input: AttributeKey, context: __SerdeContext): any => { - return { - ...(input.FacetName != null && { FacetName: input.FacetName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - }; -}; +// se_AttributeKey omitted. /** * serializeAws_restJson1AttributeKeyAndValue */ const se_AttributeKeyAndValue = (input: AttributeKeyAndValue, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: se_AttributeKey(input.Key, context) }), - ...(input.Value != null && { Value: se_TypedAttributeValue(input.Value, context) }), - }; + return take(input, { + Key: _json, + Value: (_) => se_TypedAttributeValue(_, context), + }); }; /** @@ -7752,25 +7756,16 @@ const se_AttributeKeyAndValueList = (input: AttributeKeyAndValue[], context: __S }); }; -/** - * serializeAws_restJson1AttributeKeyList - */ -const se_AttributeKeyList = (input: AttributeKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttributeKey(entry, context); - }); -}; +// se_AttributeKeyList omitted. /** * serializeAws_restJson1AttributeNameAndValue */ const se_AttributeNameAndValue = (input: AttributeNameAndValue, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Value != null && { Value: se_TypedAttributeValue(input.Value, context) }), - }; + return take(input, { + AttributeName: [], + Value: (_) => se_TypedAttributeValue(_, context), + }); }; /** @@ -7784,373 +7779,157 @@ const se_AttributeNameAndValueList = (input: AttributeNameAndValue[], context: _ }); }; -/** - * serializeAws_restJson1AttributeNameList - */ -const se_AttributeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttributeNameList omitted. /** * serializeAws_restJson1BatchAddFacetToObject */ const se_BatchAddFacetToObject = (input: BatchAddFacetToObject, context: __SerdeContext): any => { - return { - ...(input.ObjectAttributeList != null && { - ObjectAttributeList: se_AttributeKeyAndValueList(input.ObjectAttributeList, context), - }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacet(input.SchemaFacet, context) }), - }; + return take(input, { + ObjectAttributeList: (_) => se_AttributeKeyAndValueList(_, context), + ObjectReference: _json, + SchemaFacet: _json, + }); }; -/** - * serializeAws_restJson1BatchAttachObject - */ -const se_BatchAttachObject = (input: BatchAttachObject, context: __SerdeContext): any => { - return { - ...(input.ChildReference != null && { ChildReference: se_ObjectReference(input.ChildReference, context) }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - }; -}; +// se_BatchAttachObject omitted. -/** - * serializeAws_restJson1BatchAttachPolicy - */ -const se_BatchAttachPolicy = (input: BatchAttachPolicy, context: __SerdeContext): any => { - return { - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.PolicyReference != null && { PolicyReference: se_ObjectReference(input.PolicyReference, context) }), - }; -}; +// se_BatchAttachPolicy omitted. -/** - * serializeAws_restJson1BatchAttachToIndex - */ -const se_BatchAttachToIndex = (input: BatchAttachToIndex, context: __SerdeContext): any => { - return { - ...(input.IndexReference != null && { IndexReference: se_ObjectReference(input.IndexReference, context) }), - ...(input.TargetReference != null && { TargetReference: se_ObjectReference(input.TargetReference, context) }), - }; -}; +// se_BatchAttachToIndex omitted. /** * serializeAws_restJson1BatchAttachTypedLink */ const se_BatchAttachTypedLink = (input: BatchAttachTypedLink, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_AttributeNameAndValueList(input.Attributes, context) }), - ...(input.SourceObjectReference != null && { - SourceObjectReference: se_ObjectReference(input.SourceObjectReference, context), - }), - ...(input.TargetObjectReference != null && { - TargetObjectReference: se_ObjectReference(input.TargetObjectReference, context), - }), - ...(input.TypedLinkFacet != null && { - TypedLinkFacet: se_TypedLinkSchemaAndFacetName(input.TypedLinkFacet, context), - }), - }; + return take(input, { + Attributes: (_) => se_AttributeNameAndValueList(_, context), + SourceObjectReference: _json, + TargetObjectReference: _json, + TypedLinkFacet: _json, + }); }; -/** - * serializeAws_restJson1BatchCreateIndex - */ -const se_BatchCreateIndex = (input: BatchCreateIndex, context: __SerdeContext): any => { - return { - ...(input.BatchReferenceName != null && { BatchReferenceName: input.BatchReferenceName }), - ...(input.IsUnique != null && { IsUnique: input.IsUnique }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.OrderedIndexedAttributeList != null && { - OrderedIndexedAttributeList: se_AttributeKeyList(input.OrderedIndexedAttributeList, context), - }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - }; -}; +// se_BatchCreateIndex omitted. /** * serializeAws_restJson1BatchCreateObject */ const se_BatchCreateObject = (input: BatchCreateObject, context: __SerdeContext): any => { - return { - ...(input.BatchReferenceName != null && { BatchReferenceName: input.BatchReferenceName }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.ObjectAttributeList != null && { - ObjectAttributeList: se_AttributeKeyAndValueList(input.ObjectAttributeList, context), - }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacetList(input.SchemaFacet, context) }), - }; + return take(input, { + BatchReferenceName: [], + LinkName: [], + ObjectAttributeList: (_) => se_AttributeKeyAndValueList(_, context), + ParentReference: _json, + SchemaFacet: _json, + }); }; -/** - * serializeAws_restJson1BatchDeleteObject - */ -const se_BatchDeleteObject = (input: BatchDeleteObject, context: __SerdeContext): any => { - return { - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchDeleteObject omitted. -/** - * serializeAws_restJson1BatchDetachFromIndex - */ -const se_BatchDetachFromIndex = (input: BatchDetachFromIndex, context: __SerdeContext): any => { - return { - ...(input.IndexReference != null && { IndexReference: se_ObjectReference(input.IndexReference, context) }), - ...(input.TargetReference != null && { TargetReference: se_ObjectReference(input.TargetReference, context) }), - }; -}; +// se_BatchDetachFromIndex omitted. -/** - * serializeAws_restJson1BatchDetachObject - */ -const se_BatchDetachObject = (input: BatchDetachObject, context: __SerdeContext): any => { - return { - ...(input.BatchReferenceName != null && { BatchReferenceName: input.BatchReferenceName }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - ...(input.ParentReference != null && { ParentReference: se_ObjectReference(input.ParentReference, context) }), - }; -}; +// se_BatchDetachObject omitted. -/** - * serializeAws_restJson1BatchDetachPolicy - */ -const se_BatchDetachPolicy = (input: BatchDetachPolicy, context: __SerdeContext): any => { - return { - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.PolicyReference != null && { PolicyReference: se_ObjectReference(input.PolicyReference, context) }), - }; -}; +// se_BatchDetachPolicy omitted. /** * serializeAws_restJson1BatchDetachTypedLink */ const se_BatchDetachTypedLink = (input: BatchDetachTypedLink, context: __SerdeContext): any => { - return { - ...(input.TypedLinkSpecifier != null && { - TypedLinkSpecifier: se_TypedLinkSpecifier(input.TypedLinkSpecifier, context), - }), - }; + return take(input, { + TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context), + }); }; /** * serializeAws_restJson1BatchGetLinkAttributes */ const se_BatchGetLinkAttributes = (input: BatchGetLinkAttributes, context: __SerdeContext): any => { - return { - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNameList(input.AttributeNames, context) }), - ...(input.TypedLinkSpecifier != null && { - TypedLinkSpecifier: se_TypedLinkSpecifier(input.TypedLinkSpecifier, context), - }), - }; + return take(input, { + AttributeNames: _json, + TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context), + }); }; -/** - * serializeAws_restJson1BatchGetObjectAttributes - */ -const se_BatchGetObjectAttributes = (input: BatchGetObjectAttributes, context: __SerdeContext): any => { - return { - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNameList(input.AttributeNames, context) }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacet(input.SchemaFacet, context) }), - }; -}; +// se_BatchGetObjectAttributes omitted. -/** - * serializeAws_restJson1BatchGetObjectInformation - */ -const se_BatchGetObjectInformation = (input: BatchGetObjectInformation, context: __SerdeContext): any => { - return { - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchGetObjectInformation omitted. -/** - * serializeAws_restJson1BatchListAttachedIndices - */ -const se_BatchListAttachedIndices = (input: BatchListAttachedIndices, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TargetReference != null && { TargetReference: se_ObjectReference(input.TargetReference, context) }), - }; -}; +// se_BatchListAttachedIndices omitted. /** * serializeAws_restJson1BatchListIncomingTypedLinks */ const se_BatchListIncomingTypedLinks = (input: BatchListIncomingTypedLinks, context: __SerdeContext): any => { - return { - ...(input.FilterAttributeRanges != null && { - FilterAttributeRanges: se_TypedLinkAttributeRangeList(input.FilterAttributeRanges, context), - }), - ...(input.FilterTypedLink != null && { - FilterTypedLink: se_TypedLinkSchemaAndFacetName(input.FilterTypedLink, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; + return take(input, { + FilterAttributeRanges: (_) => se_TypedLinkAttributeRangeList(_, context), + FilterTypedLink: _json, + MaxResults: [], + NextToken: [], + ObjectReference: _json, + }); }; /** * serializeAws_restJson1BatchListIndex */ const se_BatchListIndex = (input: BatchListIndex, context: __SerdeContext): any => { - return { - ...(input.IndexReference != null && { IndexReference: se_ObjectReference(input.IndexReference, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RangesOnIndexedValues != null && { - RangesOnIndexedValues: se_ObjectAttributeRangeList(input.RangesOnIndexedValues, context), - }), - }; + return take(input, { + IndexReference: _json, + MaxResults: [], + NextToken: [], + RangesOnIndexedValues: (_) => se_ObjectAttributeRangeList(_, context), + }); }; -/** - * serializeAws_restJson1BatchListObjectAttributes - */ -const se_BatchListObjectAttributes = (input: BatchListObjectAttributes, context: __SerdeContext): any => { - return { - ...(input.FacetFilter != null && { FacetFilter: se_SchemaFacet(input.FacetFilter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchListObjectAttributes omitted. -/** - * serializeAws_restJson1BatchListObjectChildren - */ -const se_BatchListObjectChildren = (input: BatchListObjectChildren, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchListObjectChildren omitted. -/** - * serializeAws_restJson1BatchListObjectParentPaths - */ -const se_BatchListObjectParentPaths = (input: BatchListObjectParentPaths, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchListObjectParentPaths omitted. -/** - * serializeAws_restJson1BatchListObjectParents - */ -const se_BatchListObjectParents = (input: BatchListObjectParents, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchListObjectParents omitted. -/** - * serializeAws_restJson1BatchListObjectPolicies - */ -const se_BatchListObjectPolicies = (input: BatchListObjectPolicies, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchListObjectPolicies omitted. /** * serializeAws_restJson1BatchListOutgoingTypedLinks */ const se_BatchListOutgoingTypedLinks = (input: BatchListOutgoingTypedLinks, context: __SerdeContext): any => { - return { - ...(input.FilterAttributeRanges != null && { - FilterAttributeRanges: se_TypedLinkAttributeRangeList(input.FilterAttributeRanges, context), - }), - ...(input.FilterTypedLink != null && { - FilterTypedLink: se_TypedLinkSchemaAndFacetName(input.FilterTypedLink, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; + return take(input, { + FilterAttributeRanges: (_) => se_TypedLinkAttributeRangeList(_, context), + FilterTypedLink: _json, + MaxResults: [], + NextToken: [], + ObjectReference: _json, + }); }; -/** - * serializeAws_restJson1BatchListPolicyAttachments - */ -const se_BatchListPolicyAttachments = (input: BatchListPolicyAttachments, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyReference != null && { PolicyReference: se_ObjectReference(input.PolicyReference, context) }), - }; -}; +// se_BatchListPolicyAttachments omitted. -/** - * serializeAws_restJson1BatchLookupPolicy - */ -const se_BatchLookupPolicy = (input: BatchLookupPolicy, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; -}; +// se_BatchLookupPolicy omitted. /** * serializeAws_restJson1BatchReadOperation */ const se_BatchReadOperation = (input: BatchReadOperation, context: __SerdeContext): any => { - return { - ...(input.GetLinkAttributes != null && { - GetLinkAttributes: se_BatchGetLinkAttributes(input.GetLinkAttributes, context), - }), - ...(input.GetObjectAttributes != null && { - GetObjectAttributes: se_BatchGetObjectAttributes(input.GetObjectAttributes, context), - }), - ...(input.GetObjectInformation != null && { - GetObjectInformation: se_BatchGetObjectInformation(input.GetObjectInformation, context), - }), - ...(input.ListAttachedIndices != null && { - ListAttachedIndices: se_BatchListAttachedIndices(input.ListAttachedIndices, context), - }), - ...(input.ListIncomingTypedLinks != null && { - ListIncomingTypedLinks: se_BatchListIncomingTypedLinks(input.ListIncomingTypedLinks, context), - }), - ...(input.ListIndex != null && { ListIndex: se_BatchListIndex(input.ListIndex, context) }), - ...(input.ListObjectAttributes != null && { - ListObjectAttributes: se_BatchListObjectAttributes(input.ListObjectAttributes, context), - }), - ...(input.ListObjectChildren != null && { - ListObjectChildren: se_BatchListObjectChildren(input.ListObjectChildren, context), - }), - ...(input.ListObjectParentPaths != null && { - ListObjectParentPaths: se_BatchListObjectParentPaths(input.ListObjectParentPaths, context), - }), - ...(input.ListObjectParents != null && { - ListObjectParents: se_BatchListObjectParents(input.ListObjectParents, context), - }), - ...(input.ListObjectPolicies != null && { - ListObjectPolicies: se_BatchListObjectPolicies(input.ListObjectPolicies, context), - }), - ...(input.ListOutgoingTypedLinks != null && { - ListOutgoingTypedLinks: se_BatchListOutgoingTypedLinks(input.ListOutgoingTypedLinks, context), - }), - ...(input.ListPolicyAttachments != null && { - ListPolicyAttachments: se_BatchListPolicyAttachments(input.ListPolicyAttachments, context), - }), - ...(input.LookupPolicy != null && { LookupPolicy: se_BatchLookupPolicy(input.LookupPolicy, context) }), - }; + return take(input, { + GetLinkAttributes: (_) => se_BatchGetLinkAttributes(_, context), + GetObjectAttributes: _json, + GetObjectInformation: _json, + ListAttachedIndices: _json, + ListIncomingTypedLinks: (_) => se_BatchListIncomingTypedLinks(_, context), + ListIndex: (_) => se_BatchListIndex(_, context), + ListObjectAttributes: _json, + ListObjectChildren: _json, + ListObjectParentPaths: _json, + ListObjectParents: _json, + ListObjectPolicies: _json, + ListOutgoingTypedLinks: (_) => se_BatchListOutgoingTypedLinks(_, context), + ListPolicyAttachments: _json, + LookupPolicy: _json, + }); }; /** @@ -8164,71 +7943,49 @@ const se_BatchReadOperationList = (input: BatchReadOperation[], context: __Serde }); }; -/** - * serializeAws_restJson1BatchRemoveFacetFromObject - */ -const se_BatchRemoveFacetFromObject = (input: BatchRemoveFacetFromObject, context: __SerdeContext): any => { - return { - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - ...(input.SchemaFacet != null && { SchemaFacet: se_SchemaFacet(input.SchemaFacet, context) }), - }; -}; +// se_BatchRemoveFacetFromObject omitted. /** * serializeAws_restJson1BatchUpdateLinkAttributes */ const se_BatchUpdateLinkAttributes = (input: BatchUpdateLinkAttributes, context: __SerdeContext): any => { - return { - ...(input.AttributeUpdates != null && { - AttributeUpdates: se_LinkAttributeUpdateList(input.AttributeUpdates, context), - }), - ...(input.TypedLinkSpecifier != null && { - TypedLinkSpecifier: se_TypedLinkSpecifier(input.TypedLinkSpecifier, context), - }), - }; + return take(input, { + AttributeUpdates: (_) => se_LinkAttributeUpdateList(_, context), + TypedLinkSpecifier: (_) => se_TypedLinkSpecifier(_, context), + }); }; /** * serializeAws_restJson1BatchUpdateObjectAttributes */ const se_BatchUpdateObjectAttributes = (input: BatchUpdateObjectAttributes, context: __SerdeContext): any => { - return { - ...(input.AttributeUpdates != null && { - AttributeUpdates: se_ObjectAttributeUpdateList(input.AttributeUpdates, context), - }), - ...(input.ObjectReference != null && { ObjectReference: se_ObjectReference(input.ObjectReference, context) }), - }; + return take(input, { + AttributeUpdates: (_) => se_ObjectAttributeUpdateList(_, context), + ObjectReference: _json, + }); }; /** * serializeAws_restJson1BatchWriteOperation */ const se_BatchWriteOperation = (input: BatchWriteOperation, context: __SerdeContext): any => { - return { - ...(input.AddFacetToObject != null && { - AddFacetToObject: se_BatchAddFacetToObject(input.AddFacetToObject, context), - }), - ...(input.AttachObject != null && { AttachObject: se_BatchAttachObject(input.AttachObject, context) }), - ...(input.AttachPolicy != null && { AttachPolicy: se_BatchAttachPolicy(input.AttachPolicy, context) }), - ...(input.AttachToIndex != null && { AttachToIndex: se_BatchAttachToIndex(input.AttachToIndex, context) }), - ...(input.AttachTypedLink != null && { AttachTypedLink: se_BatchAttachTypedLink(input.AttachTypedLink, context) }), - ...(input.CreateIndex != null && { CreateIndex: se_BatchCreateIndex(input.CreateIndex, context) }), - ...(input.CreateObject != null && { CreateObject: se_BatchCreateObject(input.CreateObject, context) }), - ...(input.DeleteObject != null && { DeleteObject: se_BatchDeleteObject(input.DeleteObject, context) }), - ...(input.DetachFromIndex != null && { DetachFromIndex: se_BatchDetachFromIndex(input.DetachFromIndex, context) }), - ...(input.DetachObject != null && { DetachObject: se_BatchDetachObject(input.DetachObject, context) }), - ...(input.DetachPolicy != null && { DetachPolicy: se_BatchDetachPolicy(input.DetachPolicy, context) }), - ...(input.DetachTypedLink != null && { DetachTypedLink: se_BatchDetachTypedLink(input.DetachTypedLink, context) }), - ...(input.RemoveFacetFromObject != null && { - RemoveFacetFromObject: se_BatchRemoveFacetFromObject(input.RemoveFacetFromObject, context), - }), - ...(input.UpdateLinkAttributes != null && { - UpdateLinkAttributes: se_BatchUpdateLinkAttributes(input.UpdateLinkAttributes, context), - }), - ...(input.UpdateObjectAttributes != null && { - UpdateObjectAttributes: se_BatchUpdateObjectAttributes(input.UpdateObjectAttributes, context), - }), - }; + return take(input, { + AddFacetToObject: (_) => se_BatchAddFacetToObject(_, context), + AttachObject: _json, + AttachPolicy: _json, + AttachToIndex: _json, + AttachTypedLink: (_) => se_BatchAttachTypedLink(_, context), + CreateIndex: _json, + CreateObject: (_) => se_BatchCreateObject(_, context), + DeleteObject: _json, + DetachFromIndex: _json, + DetachObject: _json, + DetachPolicy: _json, + DetachTypedLink: (_) => se_BatchDetachTypedLink(_, context), + RemoveFacetFromObject: _json, + UpdateLinkAttributes: (_) => se_BatchUpdateLinkAttributes(_, context), + UpdateObjectAttributes: (_) => se_BatchUpdateObjectAttributes(_, context), + }); }; /** @@ -8246,28 +8003,24 @@ const se_BatchWriteOperationList = (input: BatchWriteOperation[], context: __Ser * serializeAws_restJson1FacetAttribute */ const se_FacetAttribute = (input: FacetAttribute, context: __SerdeContext): any => { - return { - ...(input.AttributeDefinition != null && { - AttributeDefinition: se_FacetAttributeDefinition(input.AttributeDefinition, context), - }), - ...(input.AttributeReference != null && { - AttributeReference: se_FacetAttributeReference(input.AttributeReference, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RequiredBehavior != null && { RequiredBehavior: input.RequiredBehavior }), - }; + return take(input, { + AttributeDefinition: (_) => se_FacetAttributeDefinition(_, context), + AttributeReference: _json, + Name: [], + RequiredBehavior: [], + }); }; /** * serializeAws_restJson1FacetAttributeDefinition */ const se_FacetAttributeDefinition = (input: FacetAttributeDefinition, context: __SerdeContext): any => { - return { - ...(input.DefaultValue != null && { DefaultValue: se_TypedAttributeValue(input.DefaultValue, context) }), - ...(input.IsImmutable != null && { IsImmutable: input.IsImmutable }), - ...(input.Rules != null && { Rules: se_RuleMap(input.Rules, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + DefaultValue: (_) => se_TypedAttributeValue(_, context), + IsImmutable: [], + Rules: _json, + Type: [], + }); }; /** @@ -8281,24 +8034,16 @@ const se_FacetAttributeList = (input: FacetAttribute[], context: __SerdeContext) }); }; -/** - * serializeAws_restJson1FacetAttributeReference - */ -const se_FacetAttributeReference = (input: FacetAttributeReference, context: __SerdeContext): any => { - return { - ...(input.TargetAttributeName != null && { TargetAttributeName: input.TargetAttributeName }), - ...(input.TargetFacetName != null && { TargetFacetName: input.TargetFacetName }), - }; -}; +// se_FacetAttributeReference omitted. /** * serializeAws_restJson1FacetAttributeUpdate */ const se_FacetAttributeUpdate = (input: FacetAttributeUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Attribute != null && { Attribute: se_FacetAttribute(input.Attribute, context) }), - }; + return take(input, { + Action: [], + Attribute: (_) => se_FacetAttribute(_, context), + }); }; /** @@ -8316,22 +8061,20 @@ const se_FacetAttributeUpdateList = (input: FacetAttributeUpdate[], context: __S * serializeAws_restJson1LinkAttributeAction */ const se_LinkAttributeAction = (input: LinkAttributeAction, context: __SerdeContext): any => { - return { - ...(input.AttributeActionType != null && { AttributeActionType: input.AttributeActionType }), - ...(input.AttributeUpdateValue != null && { - AttributeUpdateValue: se_TypedAttributeValue(input.AttributeUpdateValue, context), - }), - }; + return take(input, { + AttributeActionType: [], + AttributeUpdateValue: (_) => se_TypedAttributeValue(_, context), + }); }; /** * serializeAws_restJson1LinkAttributeUpdate */ const se_LinkAttributeUpdate = (input: LinkAttributeUpdate, context: __SerdeContext): any => { - return { - ...(input.AttributeAction != null && { AttributeAction: se_LinkAttributeAction(input.AttributeAction, context) }), - ...(input.AttributeKey != null && { AttributeKey: se_AttributeKey(input.AttributeKey, context) }), - }; + return take(input, { + AttributeAction: (_) => se_LinkAttributeAction(_, context), + AttributeKey: _json, + }); }; /** @@ -8349,22 +8092,20 @@ const se_LinkAttributeUpdateList = (input: LinkAttributeUpdate[], context: __Ser * serializeAws_restJson1ObjectAttributeAction */ const se_ObjectAttributeAction = (input: ObjectAttributeAction, context: __SerdeContext): any => { - return { - ...(input.ObjectAttributeActionType != null && { ObjectAttributeActionType: input.ObjectAttributeActionType }), - ...(input.ObjectAttributeUpdateValue != null && { - ObjectAttributeUpdateValue: se_TypedAttributeValue(input.ObjectAttributeUpdateValue, context), - }), - }; + return take(input, { + ObjectAttributeActionType: [], + ObjectAttributeUpdateValue: (_) => se_TypedAttributeValue(_, context), + }); }; /** * serializeAws_restJson1ObjectAttributeRange */ const se_ObjectAttributeRange = (input: ObjectAttributeRange, context: __SerdeContext): any => { - return { - ...(input.AttributeKey != null && { AttributeKey: se_AttributeKey(input.AttributeKey, context) }), - ...(input.Range != null && { Range: se_TypedAttributeValueRange(input.Range, context) }), - }; + return take(input, { + AttributeKey: _json, + Range: (_) => se_TypedAttributeValueRange(_, context), + }); }; /** @@ -8382,12 +8123,10 @@ const se_ObjectAttributeRangeList = (input: ObjectAttributeRange[], context: __S * serializeAws_restJson1ObjectAttributeUpdate */ const se_ObjectAttributeUpdate = (input: ObjectAttributeUpdate, context: __SerdeContext): any => { - return { - ...(input.ObjectAttributeAction != null && { - ObjectAttributeAction: se_ObjectAttributeAction(input.ObjectAttributeAction, context), - }), - ...(input.ObjectAttributeKey != null && { ObjectAttributeKey: se_AttributeKey(input.ObjectAttributeKey, context) }), - }; + return take(input, { + ObjectAttributeAction: (_) => se_ObjectAttributeAction(_, context), + ObjectAttributeKey: _json, + }); }; /** @@ -8401,103 +8140,23 @@ const se_ObjectAttributeUpdateList = (input: ObjectAttributeUpdate[], context: _ }); }; -/** - * serializeAws_restJson1ObjectReference - */ -const se_ObjectReference = (input: ObjectReference, context: __SerdeContext): any => { - return { - ...(input.Selector != null && { Selector: input.Selector }), - }; -}; +// se_ObjectReference omitted. -/** - * serializeAws_restJson1Rule - */ -const se_Rule = (input: Rule, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_RuleParameterMap(input.Parameters, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Rule omitted. -/** - * serializeAws_restJson1RuleMap - */ -const se_RuleMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Rule(value, context); - return acc; - }, {}); -}; +// se_RuleMap omitted. -/** - * serializeAws_restJson1RuleParameterMap - */ -const se_RuleParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_RuleParameterMap omitted. -/** - * serializeAws_restJson1SchemaFacet - */ -const se_SchemaFacet = (input: SchemaFacet, context: __SerdeContext): any => { - return { - ...(input.FacetName != null && { FacetName: input.FacetName }), - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - }; -}; +// se_SchemaFacet omitted. -/** - * serializeAws_restJson1SchemaFacetList - */ -const se_SchemaFacetList = (input: SchemaFacet[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SchemaFacet(entry, context); - }); -}; +// se_SchemaFacetList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. /** * serializeAws_restJson1TypedAttributeValue @@ -8517,26 +8176,26 @@ const se_TypedAttributeValue = (input: TypedAttributeValue, context: __SerdeCont * serializeAws_restJson1TypedAttributeValueRange */ const se_TypedAttributeValueRange = (input: TypedAttributeValueRange, context: __SerdeContext): any => { - return { - ...(input.EndMode != null && { EndMode: input.EndMode }), - ...(input.EndValue != null && { EndValue: se_TypedAttributeValue(input.EndValue, context) }), - ...(input.StartMode != null && { StartMode: input.StartMode }), - ...(input.StartValue != null && { StartValue: se_TypedAttributeValue(input.StartValue, context) }), - }; + return take(input, { + EndMode: [], + EndValue: (_) => se_TypedAttributeValue(_, context), + StartMode: [], + StartValue: (_) => se_TypedAttributeValue(_, context), + }); }; /** * serializeAws_restJson1TypedLinkAttributeDefinition */ const se_TypedLinkAttributeDefinition = (input: TypedLinkAttributeDefinition, context: __SerdeContext): any => { - return { - ...(input.DefaultValue != null && { DefaultValue: se_TypedAttributeValue(input.DefaultValue, context) }), - ...(input.IsImmutable != null && { IsImmutable: input.IsImmutable }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RequiredBehavior != null && { RequiredBehavior: input.RequiredBehavior }), - ...(input.Rules != null && { Rules: se_RuleMap(input.Rules, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + DefaultValue: (_) => se_TypedAttributeValue(_, context), + IsImmutable: [], + Name: [], + RequiredBehavior: [], + Rules: _json, + Type: [], + }); }; /** @@ -8554,10 +8213,10 @@ const se_TypedLinkAttributeDefinitionList = (input: TypedLinkAttributeDefinition * serializeAws_restJson1TypedLinkAttributeRange */ const se_TypedLinkAttributeRange = (input: TypedLinkAttributeRange, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Range != null && { Range: se_TypedAttributeValueRange(input.Range, context) }), - }; + return take(input, { + AttributeName: [], + Range: (_) => se_TypedAttributeValueRange(_, context), + }); }; /** @@ -8575,23 +8234,21 @@ const se_TypedLinkAttributeRangeList = (input: TypedLinkAttributeRange[], contex * serializeAws_restJson1TypedLinkFacet */ const se_TypedLinkFacet = (input: TypedLinkFacet, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_TypedLinkAttributeDefinitionList(input.Attributes, context) }), - ...(input.IdentityAttributeOrder != null && { - IdentityAttributeOrder: se_AttributeNameList(input.IdentityAttributeOrder, context), - }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + Attributes: (_) => se_TypedLinkAttributeDefinitionList(_, context), + IdentityAttributeOrder: _json, + Name: [], + }); }; /** * serializeAws_restJson1TypedLinkFacetAttributeUpdate */ const se_TypedLinkFacetAttributeUpdate = (input: TypedLinkFacetAttributeUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Attribute != null && { Attribute: se_TypedLinkAttributeDefinition(input.Attribute, context) }), - }; + return take(input, { + Action: [], + Attribute: (_) => se_TypedLinkAttributeDefinition(_, context), + }); }; /** @@ -8605,70 +8262,32 @@ const se_TypedLinkFacetAttributeUpdateList = (input: TypedLinkFacetAttributeUpda }); }; -/** - * serializeAws_restJson1TypedLinkSchemaAndFacetName - */ -const se_TypedLinkSchemaAndFacetName = (input: TypedLinkSchemaAndFacetName, context: __SerdeContext): any => { - return { - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - ...(input.TypedLinkName != null && { TypedLinkName: input.TypedLinkName }), - }; -}; +// se_TypedLinkSchemaAndFacetName omitted. /** * serializeAws_restJson1TypedLinkSpecifier */ const se_TypedLinkSpecifier = (input: TypedLinkSpecifier, context: __SerdeContext): any => { - return { - ...(input.IdentityAttributeValues != null && { - IdentityAttributeValues: se_AttributeNameAndValueList(input.IdentityAttributeValues, context), - }), - ...(input.SourceObjectReference != null && { - SourceObjectReference: se_ObjectReference(input.SourceObjectReference, context), - }), - ...(input.TargetObjectReference != null && { - TargetObjectReference: se_ObjectReference(input.TargetObjectReference, context), - }), - ...(input.TypedLinkFacet != null && { - TypedLinkFacet: se_TypedLinkSchemaAndFacetName(input.TypedLinkFacet, context), - }), - }; + return take(input, { + IdentityAttributeValues: (_) => se_AttributeNameAndValueList(_, context), + SourceObjectReference: _json, + TargetObjectReference: _json, + TypedLinkFacet: _json, + }); }; -/** - * deserializeAws_restJson1Arns - */ -const de_Arns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Arns omitted. -/** - * deserializeAws_restJson1AttributeKey - */ -const de_AttributeKey = (output: any, context: __SerdeContext): AttributeKey => { - return { - FacetName: __expectString(output.FacetName), - Name: __expectString(output.Name), - SchemaArn: __expectString(output.SchemaArn), - } as any; -}; +// de_AttributeKey omitted. /** * deserializeAws_restJson1AttributeKeyAndValue */ const de_AttributeKeyAndValue = (output: any, context: __SerdeContext): AttributeKeyAndValue => { - return { - Key: output.Key != null ? de_AttributeKey(output.Key, context) : undefined, - Value: output.Value != null ? de_TypedAttributeValue(__expectUnion(output.Value), context) : undefined, - } as any; + return take(output, { + Key: _json, + Value: (_: any) => de_TypedAttributeValue(__expectUnion(_), context), + }) as any; }; /** @@ -8678,9 +8297,6 @@ const de_AttributeKeyAndValueList = (output: any, context: __SerdeContext): Attr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AttributeKeyAndValue(entry, context); }); return retVal; @@ -8690,10 +8306,10 @@ const de_AttributeKeyAndValueList = (output: any, context: __SerdeContext): Attr * deserializeAws_restJson1AttributeNameAndValue */ const de_AttributeNameAndValue = (output: any, context: __SerdeContext): AttributeNameAndValue => { - return { - AttributeName: __expectString(output.AttributeName), - Value: output.Value != null ? de_TypedAttributeValue(__expectUnion(output.Value), context) : undefined, - } as any; + return take(output, { + AttributeName: __expectString, + Value: (_: any) => de_TypedAttributeValue(__expectUnion(_), context), + }) as any; }; /** @@ -8703,135 +8319,51 @@ const de_AttributeNameAndValueList = (output: any, context: __SerdeContext): Att const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AttributeNameAndValue(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AttributeNameList - */ -const de_AttributeNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AttributeNameList omitted. -/** - * deserializeAws_restJson1BatchAddFacetToObjectResponse - */ -const de_BatchAddFacetToObjectResponse = (output: any, context: __SerdeContext): BatchAddFacetToObjectResponse => { - return {} as any; -}; +// de_BatchAddFacetToObjectResponse omitted. -/** - * deserializeAws_restJson1BatchAttachObjectResponse - */ -const de_BatchAttachObjectResponse = (output: any, context: __SerdeContext): BatchAttachObjectResponse => { - return { - attachedObjectIdentifier: __expectString(output.attachedObjectIdentifier), - } as any; -}; +// de_BatchAttachObjectResponse omitted. -/** - * deserializeAws_restJson1BatchAttachPolicyResponse - */ -const de_BatchAttachPolicyResponse = (output: any, context: __SerdeContext): BatchAttachPolicyResponse => { - return {} as any; -}; +// de_BatchAttachPolicyResponse omitted. -/** - * deserializeAws_restJson1BatchAttachToIndexResponse - */ -const de_BatchAttachToIndexResponse = (output: any, context: __SerdeContext): BatchAttachToIndexResponse => { - return { - AttachedObjectIdentifier: __expectString(output.AttachedObjectIdentifier), - } as any; -}; +// de_BatchAttachToIndexResponse omitted. /** * deserializeAws_restJson1BatchAttachTypedLinkResponse */ const de_BatchAttachTypedLinkResponse = (output: any, context: __SerdeContext): BatchAttachTypedLinkResponse => { - return { - TypedLinkSpecifier: - output.TypedLinkSpecifier != null ? de_TypedLinkSpecifier(output.TypedLinkSpecifier, context) : undefined, - } as any; + return take(output, { + TypedLinkSpecifier: (_: any) => de_TypedLinkSpecifier(_, context), + }) as any; }; -/** - * deserializeAws_restJson1BatchCreateIndexResponse - */ -const de_BatchCreateIndexResponse = (output: any, context: __SerdeContext): BatchCreateIndexResponse => { - return { - ObjectIdentifier: __expectString(output.ObjectIdentifier), - } as any; -}; +// de_BatchCreateIndexResponse omitted. -/** - * deserializeAws_restJson1BatchCreateObjectResponse - */ -const de_BatchCreateObjectResponse = (output: any, context: __SerdeContext): BatchCreateObjectResponse => { - return { - ObjectIdentifier: __expectString(output.ObjectIdentifier), - } as any; -}; +// de_BatchCreateObjectResponse omitted. -/** - * deserializeAws_restJson1BatchDeleteObjectResponse - */ -const de_BatchDeleteObjectResponse = (output: any, context: __SerdeContext): BatchDeleteObjectResponse => { - return {} as any; -}; +// de_BatchDeleteObjectResponse omitted. -/** - * deserializeAws_restJson1BatchDetachFromIndexResponse - */ -const de_BatchDetachFromIndexResponse = (output: any, context: __SerdeContext): BatchDetachFromIndexResponse => { - return { - DetachedObjectIdentifier: __expectString(output.DetachedObjectIdentifier), - } as any; -}; +// de_BatchDetachFromIndexResponse omitted. -/** - * deserializeAws_restJson1BatchDetachObjectResponse - */ -const de_BatchDetachObjectResponse = (output: any, context: __SerdeContext): BatchDetachObjectResponse => { - return { - detachedObjectIdentifier: __expectString(output.detachedObjectIdentifier), - } as any; -}; +// de_BatchDetachObjectResponse omitted. -/** - * deserializeAws_restJson1BatchDetachPolicyResponse - */ -const de_BatchDetachPolicyResponse = (output: any, context: __SerdeContext): BatchDetachPolicyResponse => { - return {} as any; -}; +// de_BatchDetachPolicyResponse omitted. -/** - * deserializeAws_restJson1BatchDetachTypedLinkResponse - */ -const de_BatchDetachTypedLinkResponse = (output: any, context: __SerdeContext): BatchDetachTypedLinkResponse => { - return {} as any; -}; +// de_BatchDetachTypedLinkResponse omitted. /** * deserializeAws_restJson1BatchGetLinkAttributesResponse */ const de_BatchGetLinkAttributesResponse = (output: any, context: __SerdeContext): BatchGetLinkAttributesResponse => { - return { - Attributes: output.Attributes != null ? de_AttributeKeyAndValueList(output.Attributes, context) : undefined, - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeKeyAndValueList(_, context), + }) as any; }; /** @@ -8841,23 +8373,12 @@ const de_BatchGetObjectAttributesResponse = ( output: any, context: __SerdeContext ): BatchGetObjectAttributesResponse => { - return { - Attributes: output.Attributes != null ? de_AttributeKeyAndValueList(output.Attributes, context) : undefined, - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeKeyAndValueList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1BatchGetObjectInformationResponse - */ -const de_BatchGetObjectInformationResponse = ( - output: any, - context: __SerdeContext -): BatchGetObjectInformationResponse => { - return { - ObjectIdentifier: __expectString(output.ObjectIdentifier), - SchemaFacets: output.SchemaFacets != null ? de_SchemaFacetList(output.SchemaFacets, context) : undefined, - } as any; -}; +// de_BatchGetObjectInformationResponse omitted. /** * deserializeAws_restJson1BatchListAttachedIndicesResponse @@ -8866,11 +8387,10 @@ const de_BatchListAttachedIndicesResponse = ( output: any, context: __SerdeContext ): BatchListAttachedIndicesResponse => { - return { - IndexAttachments: - output.IndexAttachments != null ? de_IndexAttachmentList(output.IndexAttachments, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + IndexAttachments: (_: any) => de_IndexAttachmentList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -8880,22 +8400,20 @@ const de_BatchListIncomingTypedLinksResponse = ( output: any, context: __SerdeContext ): BatchListIncomingTypedLinksResponse => { - return { - LinkSpecifiers: - output.LinkSpecifiers != null ? de_TypedLinkSpecifierList(output.LinkSpecifiers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + LinkSpecifiers: (_: any) => de_TypedLinkSpecifierList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_restJson1BatchListIndexResponse */ const de_BatchListIndexResponse = (output: any, context: __SerdeContext): BatchListIndexResponse => { - return { - IndexAttachments: - output.IndexAttachments != null ? de_IndexAttachmentList(output.IndexAttachments, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + IndexAttachments: (_: any) => de_IndexAttachmentList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -8905,59 +8423,19 @@ const de_BatchListObjectAttributesResponse = ( output: any, context: __SerdeContext ): BatchListObjectAttributesResponse => { - return { - Attributes: output.Attributes != null ? de_AttributeKeyAndValueList(output.Attributes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeKeyAndValueList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BatchListObjectChildrenResponse - */ -const de_BatchListObjectChildrenResponse = (output: any, context: __SerdeContext): BatchListObjectChildrenResponse => { - return { - Children: output.Children != null ? de_LinkNameToObjectIdentifierMap(output.Children, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_BatchListObjectChildrenResponse omitted. -/** - * deserializeAws_restJson1BatchListObjectParentPathsResponse - */ -const de_BatchListObjectParentPathsResponse = ( - output: any, - context: __SerdeContext -): BatchListObjectParentPathsResponse => { - return { - NextToken: __expectString(output.NextToken), - PathToObjectIdentifiersList: - output.PathToObjectIdentifiersList != null - ? de_PathToObjectIdentifiersList(output.PathToObjectIdentifiersList, context) - : undefined, - } as any; -}; +// de_BatchListObjectParentPathsResponse omitted. -/** - * deserializeAws_restJson1BatchListObjectParentsResponse - */ -const de_BatchListObjectParentsResponse = (output: any, context: __SerdeContext): BatchListObjectParentsResponse => { - return { - NextToken: __expectString(output.NextToken), - ParentLinks: - output.ParentLinks != null ? de_ObjectIdentifierAndLinkNameList(output.ParentLinks, context) : undefined, - } as any; -}; +// de_BatchListObjectParentsResponse omitted. -/** - * deserializeAws_restJson1BatchListObjectPoliciesResponse - */ -const de_BatchListObjectPoliciesResponse = (output: any, context: __SerdeContext): BatchListObjectPoliciesResponse => { - return { - AttachedPolicyIds: - output.AttachedPolicyIds != null ? de_ObjectIdentifierList(output.AttachedPolicyIds, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_BatchListObjectPoliciesResponse omitted. /** * deserializeAws_restJson1BatchListOutgoingTypedLinksResponse @@ -8966,60 +8444,26 @@ const de_BatchListOutgoingTypedLinksResponse = ( output: any, context: __SerdeContext ): BatchListOutgoingTypedLinksResponse => { - return { - NextToken: __expectString(output.NextToken), - TypedLinkSpecifiers: - output.TypedLinkSpecifiers != null ? de_TypedLinkSpecifierList(output.TypedLinkSpecifiers, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + TypedLinkSpecifiers: (_: any) => de_TypedLinkSpecifierList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1BatchListPolicyAttachmentsResponse - */ -const de_BatchListPolicyAttachmentsResponse = ( - output: any, - context: __SerdeContext -): BatchListPolicyAttachmentsResponse => { - return { - NextToken: __expectString(output.NextToken), - ObjectIdentifiers: - output.ObjectIdentifiers != null ? de_ObjectIdentifierList(output.ObjectIdentifiers, context) : undefined, - } as any; -}; +// de_BatchListPolicyAttachmentsResponse omitted. -/** - * deserializeAws_restJson1BatchLookupPolicyResponse - */ -const de_BatchLookupPolicyResponse = (output: any, context: __SerdeContext): BatchLookupPolicyResponse => { - return { - NextToken: __expectString(output.NextToken), - PolicyToPathList: - output.PolicyToPathList != null ? de_PolicyToPathList(output.PolicyToPathList, context) : undefined, - } as any; -}; +// de_BatchLookupPolicyResponse omitted. -/** - * deserializeAws_restJson1BatchReadException - */ -const de_BatchReadException = (output: any, context: __SerdeContext): BatchReadException => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; +// de_BatchReadException omitted. /** * deserializeAws_restJson1BatchReadOperationResponse */ const de_BatchReadOperationResponse = (output: any, context: __SerdeContext): BatchReadOperationResponse => { - return { - ExceptionResponse: - output.ExceptionResponse != null ? de_BatchReadException(output.ExceptionResponse, context) : undefined, - SuccessfulResponse: - output.SuccessfulResponse != null - ? de_BatchReadSuccessfulResponse(output.SuccessfulResponse, context) - : undefined, - } as any; + return take(output, { + ExceptionResponse: _json, + SuccessfulResponse: (_: any) => de_BatchReadSuccessfulResponse(_, context), + }) as any; }; /** @@ -9029,9 +8473,6 @@ const de_BatchReadOperationResponseList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchReadOperationResponse(entry, context); }); return retVal; @@ -9041,127 +8482,51 @@ const de_BatchReadOperationResponseList = (output: any, context: __SerdeContext) * deserializeAws_restJson1BatchReadSuccessfulResponse */ const de_BatchReadSuccessfulResponse = (output: any, context: __SerdeContext): BatchReadSuccessfulResponse => { - return { - GetLinkAttributes: - output.GetLinkAttributes != null - ? de_BatchGetLinkAttributesResponse(output.GetLinkAttributes, context) - : undefined, - GetObjectAttributes: - output.GetObjectAttributes != null - ? de_BatchGetObjectAttributesResponse(output.GetObjectAttributes, context) - : undefined, - GetObjectInformation: - output.GetObjectInformation != null - ? de_BatchGetObjectInformationResponse(output.GetObjectInformation, context) - : undefined, - ListAttachedIndices: - output.ListAttachedIndices != null - ? de_BatchListAttachedIndicesResponse(output.ListAttachedIndices, context) - : undefined, - ListIncomingTypedLinks: - output.ListIncomingTypedLinks != null - ? de_BatchListIncomingTypedLinksResponse(output.ListIncomingTypedLinks, context) - : undefined, - ListIndex: output.ListIndex != null ? de_BatchListIndexResponse(output.ListIndex, context) : undefined, - ListObjectAttributes: - output.ListObjectAttributes != null - ? de_BatchListObjectAttributesResponse(output.ListObjectAttributes, context) - : undefined, - ListObjectChildren: - output.ListObjectChildren != null - ? de_BatchListObjectChildrenResponse(output.ListObjectChildren, context) - : undefined, - ListObjectParentPaths: - output.ListObjectParentPaths != null - ? de_BatchListObjectParentPathsResponse(output.ListObjectParentPaths, context) - : undefined, - ListObjectParents: - output.ListObjectParents != null - ? de_BatchListObjectParentsResponse(output.ListObjectParents, context) - : undefined, - ListObjectPolicies: - output.ListObjectPolicies != null - ? de_BatchListObjectPoliciesResponse(output.ListObjectPolicies, context) - : undefined, - ListOutgoingTypedLinks: - output.ListOutgoingTypedLinks != null - ? de_BatchListOutgoingTypedLinksResponse(output.ListOutgoingTypedLinks, context) - : undefined, - ListPolicyAttachments: - output.ListPolicyAttachments != null - ? de_BatchListPolicyAttachmentsResponse(output.ListPolicyAttachments, context) - : undefined, - LookupPolicy: output.LookupPolicy != null ? de_BatchLookupPolicyResponse(output.LookupPolicy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BatchRemoveFacetFromObjectResponse - */ -const de_BatchRemoveFacetFromObjectResponse = ( - output: any, - context: __SerdeContext -): BatchRemoveFacetFromObjectResponse => { - return {} as any; + return take(output, { + GetLinkAttributes: (_: any) => de_BatchGetLinkAttributesResponse(_, context), + GetObjectAttributes: (_: any) => de_BatchGetObjectAttributesResponse(_, context), + GetObjectInformation: _json, + ListAttachedIndices: (_: any) => de_BatchListAttachedIndicesResponse(_, context), + ListIncomingTypedLinks: (_: any) => de_BatchListIncomingTypedLinksResponse(_, context), + ListIndex: (_: any) => de_BatchListIndexResponse(_, context), + ListObjectAttributes: (_: any) => de_BatchListObjectAttributesResponse(_, context), + ListObjectChildren: _json, + ListObjectParentPaths: _json, + ListObjectParents: _json, + ListObjectPolicies: _json, + ListOutgoingTypedLinks: (_: any) => de_BatchListOutgoingTypedLinksResponse(_, context), + ListPolicyAttachments: _json, + LookupPolicy: _json, + }) as any; }; -/** - * deserializeAws_restJson1BatchUpdateLinkAttributesResponse - */ -const de_BatchUpdateLinkAttributesResponse = ( - output: any, - context: __SerdeContext -): BatchUpdateLinkAttributesResponse => { - return {} as any; -}; +// de_BatchRemoveFacetFromObjectResponse omitted. -/** - * deserializeAws_restJson1BatchUpdateObjectAttributesResponse - */ -const de_BatchUpdateObjectAttributesResponse = ( - output: any, - context: __SerdeContext -): BatchUpdateObjectAttributesResponse => { - return { - ObjectIdentifier: __expectString(output.ObjectIdentifier), - } as any; -}; +// de_BatchUpdateLinkAttributesResponse omitted. + +// de_BatchUpdateObjectAttributesResponse omitted. /** * deserializeAws_restJson1BatchWriteOperationResponse */ const de_BatchWriteOperationResponse = (output: any, context: __SerdeContext): BatchWriteOperationResponse => { - return { - AddFacetToObject: - output.AddFacetToObject != null ? de_BatchAddFacetToObjectResponse(output.AddFacetToObject, context) : undefined, - AttachObject: output.AttachObject != null ? de_BatchAttachObjectResponse(output.AttachObject, context) : undefined, - AttachPolicy: output.AttachPolicy != null ? de_BatchAttachPolicyResponse(output.AttachPolicy, context) : undefined, - AttachToIndex: - output.AttachToIndex != null ? de_BatchAttachToIndexResponse(output.AttachToIndex, context) : undefined, - AttachTypedLink: - output.AttachTypedLink != null ? de_BatchAttachTypedLinkResponse(output.AttachTypedLink, context) : undefined, - CreateIndex: output.CreateIndex != null ? de_BatchCreateIndexResponse(output.CreateIndex, context) : undefined, - CreateObject: output.CreateObject != null ? de_BatchCreateObjectResponse(output.CreateObject, context) : undefined, - DeleteObject: output.DeleteObject != null ? de_BatchDeleteObjectResponse(output.DeleteObject, context) : undefined, - DetachFromIndex: - output.DetachFromIndex != null ? de_BatchDetachFromIndexResponse(output.DetachFromIndex, context) : undefined, - DetachObject: output.DetachObject != null ? de_BatchDetachObjectResponse(output.DetachObject, context) : undefined, - DetachPolicy: output.DetachPolicy != null ? de_BatchDetachPolicyResponse(output.DetachPolicy, context) : undefined, - DetachTypedLink: - output.DetachTypedLink != null ? de_BatchDetachTypedLinkResponse(output.DetachTypedLink, context) : undefined, - RemoveFacetFromObject: - output.RemoveFacetFromObject != null - ? de_BatchRemoveFacetFromObjectResponse(output.RemoveFacetFromObject, context) - : undefined, - UpdateLinkAttributes: - output.UpdateLinkAttributes != null - ? de_BatchUpdateLinkAttributesResponse(output.UpdateLinkAttributes, context) - : undefined, - UpdateObjectAttributes: - output.UpdateObjectAttributes != null - ? de_BatchUpdateObjectAttributesResponse(output.UpdateObjectAttributes, context) - : undefined, - } as any; + return take(output, { + AddFacetToObject: _json, + AttachObject: _json, + AttachPolicy: _json, + AttachToIndex: _json, + AttachTypedLink: (_: any) => de_BatchAttachTypedLinkResponse(_, context), + CreateIndex: _json, + CreateObject: _json, + DeleteObject: _json, + DetachFromIndex: _json, + DetachObject: _json, + DetachPolicy: _json, + DetachTypedLink: _json, + RemoveFacetFromObject: _json, + UpdateLinkAttributes: _json, + UpdateObjectAttributes: _json, + }) as any; }; /** @@ -9171,9 +8536,6 @@ const de_BatchWriteOperationResponseList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchWriteOperationResponse(entry, context); }); return retVal; @@ -9183,15 +8545,12 @@ const de_BatchWriteOperationResponseList = (output: any, context: __SerdeContext * deserializeAws_restJson1Directory */ const de_Directory = (output: any, context: __SerdeContext): Directory => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - DirectoryArn: __expectString(output.DirectoryArn), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DirectoryArn: __expectString, + Name: __expectString, + State: __expectString, + }) as any; }; /** @@ -9201,50 +8560,35 @@ const de_DirectoryList = (output: any, context: __SerdeContext): Directory[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Directory(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Facet - */ -const de_Facet = (output: any, context: __SerdeContext): Facet => { - return { - FacetStyle: __expectString(output.FacetStyle), - Name: __expectString(output.Name), - ObjectType: __expectString(output.ObjectType), - } as any; -}; +// de_Facet omitted. /** * deserializeAws_restJson1FacetAttribute */ const de_FacetAttribute = (output: any, context: __SerdeContext): FacetAttribute => { - return { - AttributeDefinition: - output.AttributeDefinition != null ? de_FacetAttributeDefinition(output.AttributeDefinition, context) : undefined, - AttributeReference: - output.AttributeReference != null ? de_FacetAttributeReference(output.AttributeReference, context) : undefined, - Name: __expectString(output.Name), - RequiredBehavior: __expectString(output.RequiredBehavior), - } as any; + return take(output, { + AttributeDefinition: (_: any) => de_FacetAttributeDefinition(_, context), + AttributeReference: _json, + Name: __expectString, + RequiredBehavior: __expectString, + }) as any; }; /** * deserializeAws_restJson1FacetAttributeDefinition */ const de_FacetAttributeDefinition = (output: any, context: __SerdeContext): FacetAttributeDefinition => { - return { - DefaultValue: - output.DefaultValue != null ? de_TypedAttributeValue(__expectUnion(output.DefaultValue), context) : undefined, - IsImmutable: __expectBoolean(output.IsImmutable), - Rules: output.Rules != null ? de_RuleMap(output.Rules, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + DefaultValue: (_: any) => de_TypedAttributeValue(__expectUnion(_), context), + IsImmutable: __expectBoolean, + Rules: _json, + Type: __expectString, + }) as any; }; /** @@ -9254,48 +8598,23 @@ const de_FacetAttributeList = (output: any, context: __SerdeContext): FacetAttri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FacetAttribute(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FacetAttributeReference - */ -const de_FacetAttributeReference = (output: any, context: __SerdeContext): FacetAttributeReference => { - return { - TargetAttributeName: __expectString(output.TargetAttributeName), - TargetFacetName: __expectString(output.TargetFacetName), - } as any; -}; +// de_FacetAttributeReference omitted. -/** - * deserializeAws_restJson1FacetNameList - */ -const de_FacetNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FacetNameList omitted. /** * deserializeAws_restJson1IndexAttachment */ const de_IndexAttachment = (output: any, context: __SerdeContext): IndexAttachment => { - return { - IndexedAttributes: - output.IndexedAttributes != null ? de_AttributeKeyAndValueList(output.IndexedAttributes, context) : undefined, - ObjectIdentifier: __expectString(output.ObjectIdentifier), - } as any; + return take(output, { + IndexedAttributes: (_: any) => de_AttributeKeyAndValueList(_, context), + ObjectIdentifier: __expectString, + }) as any; }; /** @@ -9305,257 +8624,48 @@ const de_IndexAttachmentList = (output: any, context: __SerdeContext): IndexAtta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IndexAttachment(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LinkNameToObjectIdentifierMap - */ -const de_LinkNameToObjectIdentifierMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_LinkNameToObjectIdentifierMap omitted. -/** - * deserializeAws_restJson1ObjectIdentifierAndLinkNameList - */ -const de_ObjectIdentifierAndLinkNameList = ( - output: any, - context: __SerdeContext -): ObjectIdentifierAndLinkNameTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ObjectIdentifierAndLinkNameTuple(entry, context); - }); - return retVal; -}; +// de_ObjectIdentifierAndLinkNameList omitted. -/** - * deserializeAws_restJson1ObjectIdentifierAndLinkNameTuple - */ -const de_ObjectIdentifierAndLinkNameTuple = ( - output: any, - context: __SerdeContext -): ObjectIdentifierAndLinkNameTuple => { - return { - LinkName: __expectString(output.LinkName), - ObjectIdentifier: __expectString(output.ObjectIdentifier), - } as any; -}; +// de_ObjectIdentifierAndLinkNameTuple omitted. -/** - * deserializeAws_restJson1ObjectIdentifierList - */ -const de_ObjectIdentifierList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ObjectIdentifierList omitted. -/** - * deserializeAws_restJson1ObjectIdentifierToLinkNameMap - */ -const de_ObjectIdentifierToLinkNameMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ObjectIdentifierToLinkNameMap omitted. -/** - * deserializeAws_restJson1ObjectReference - */ -const de_ObjectReference = (output: any, context: __SerdeContext): ObjectReference => { - return { - Selector: __expectString(output.Selector), - } as any; -}; +// de_ObjectReference omitted. -/** - * deserializeAws_restJson1PathToObjectIdentifiers - */ -const de_PathToObjectIdentifiers = (output: any, context: __SerdeContext): PathToObjectIdentifiers => { - return { - ObjectIdentifiers: - output.ObjectIdentifiers != null ? de_ObjectIdentifierList(output.ObjectIdentifiers, context) : undefined, - Path: __expectString(output.Path), - } as any; -}; +// de_PathToObjectIdentifiers omitted. -/** - * deserializeAws_restJson1PathToObjectIdentifiersList - */ -const de_PathToObjectIdentifiersList = (output: any, context: __SerdeContext): PathToObjectIdentifiers[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PathToObjectIdentifiers(entry, context); - }); - return retVal; -}; +// de_PathToObjectIdentifiersList omitted. -/** - * deserializeAws_restJson1PolicyAttachment - */ -const de_PolicyAttachment = (output: any, context: __SerdeContext): PolicyAttachment => { - return { - ObjectIdentifier: __expectString(output.ObjectIdentifier), - PolicyId: __expectString(output.PolicyId), - PolicyType: __expectString(output.PolicyType), - } as any; -}; +// de_PolicyAttachment omitted. -/** - * deserializeAws_restJson1PolicyAttachmentList - */ -const de_PolicyAttachmentList = (output: any, context: __SerdeContext): PolicyAttachment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyAttachment(entry, context); - }); - return retVal; -}; +// de_PolicyAttachmentList omitted. -/** - * deserializeAws_restJson1PolicyToPath - */ -const de_PolicyToPath = (output: any, context: __SerdeContext): PolicyToPath => { - return { - Path: __expectString(output.Path), - Policies: output.Policies != null ? de_PolicyAttachmentList(output.Policies, context) : undefined, - } as any; -}; +// de_PolicyToPath omitted. -/** - * deserializeAws_restJson1PolicyToPathList - */ -const de_PolicyToPathList = (output: any, context: __SerdeContext): PolicyToPath[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyToPath(entry, context); - }); - return retVal; -}; +// de_PolicyToPathList omitted. -/** - * deserializeAws_restJson1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - Parameters: output.Parameters != null ? de_RuleParameterMap(output.Parameters, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_Rule omitted. -/** - * deserializeAws_restJson1RuleMap - */ -const de_RuleMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Rule(value, context); - return acc; - }, {}); -}; +// de_RuleMap omitted. -/** - * deserializeAws_restJson1RuleParameterMap - */ -const de_RuleParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RuleParameterMap omitted. -/** - * deserializeAws_restJson1SchemaFacet - */ -const de_SchemaFacet = (output: any, context: __SerdeContext): SchemaFacet => { - return { - FacetName: __expectString(output.FacetName), - SchemaArn: __expectString(output.SchemaArn), - } as any; -}; +// de_SchemaFacet omitted. -/** - * deserializeAws_restJson1SchemaFacetList - */ -const de_SchemaFacetList = (output: any, context: __SerdeContext): SchemaFacet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaFacet(entry, context); - }); - return retVal; -}; +// de_SchemaFacetList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1TypedAttributeValue @@ -9587,15 +8697,14 @@ const de_TypedAttributeValue = (output: any, context: __SerdeContext): TypedAttr * deserializeAws_restJson1TypedLinkAttributeDefinition */ const de_TypedLinkAttributeDefinition = (output: any, context: __SerdeContext): TypedLinkAttributeDefinition => { - return { - DefaultValue: - output.DefaultValue != null ? de_TypedAttributeValue(__expectUnion(output.DefaultValue), context) : undefined, - IsImmutable: __expectBoolean(output.IsImmutable), - Name: __expectString(output.Name), - RequiredBehavior: __expectString(output.RequiredBehavior), - Rules: output.Rules != null ? de_RuleMap(output.Rules, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + DefaultValue: (_: any) => de_TypedAttributeValue(__expectUnion(_), context), + IsImmutable: __expectBoolean, + Name: __expectString, + RequiredBehavior: __expectString, + Rules: _json, + Type: __expectString, + }) as any; }; /** @@ -9605,55 +8714,25 @@ const de_TypedLinkAttributeDefinitionList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TypedLinkAttributeDefinition(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TypedLinkNameList - */ -const de_TypedLinkNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TypedLinkNameList omitted. -/** - * deserializeAws_restJson1TypedLinkSchemaAndFacetName - */ -const de_TypedLinkSchemaAndFacetName = (output: any, context: __SerdeContext): TypedLinkSchemaAndFacetName => { - return { - SchemaArn: __expectString(output.SchemaArn), - TypedLinkName: __expectString(output.TypedLinkName), - } as any; -}; +// de_TypedLinkSchemaAndFacetName omitted. /** * deserializeAws_restJson1TypedLinkSpecifier */ const de_TypedLinkSpecifier = (output: any, context: __SerdeContext): TypedLinkSpecifier => { - return { - IdentityAttributeValues: - output.IdentityAttributeValues != null - ? de_AttributeNameAndValueList(output.IdentityAttributeValues, context) - : undefined, - SourceObjectReference: - output.SourceObjectReference != null ? de_ObjectReference(output.SourceObjectReference, context) : undefined, - TargetObjectReference: - output.TargetObjectReference != null ? de_ObjectReference(output.TargetObjectReference, context) : undefined, - TypedLinkFacet: - output.TypedLinkFacet != null ? de_TypedLinkSchemaAndFacetName(output.TypedLinkFacet, context) : undefined, - } as any; + return take(output, { + IdentityAttributeValues: (_: any) => de_AttributeNameAndValueList(_, context), + SourceObjectReference: _json, + TargetObjectReference: _json, + TypedLinkFacet: _json, + }) as any; }; /** @@ -9663,9 +8742,6 @@ const de_TypedLinkSpecifierList = (output: any, context: __SerdeContext): TypedL const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TypedLinkSpecifier(entry, context); }); return retVal; diff --git a/clients/client-cloudformation/src/protocols/Aws_query.ts b/clients/client-cloudformation/src/protocols/Aws_query.ts index ff68a708bb36..7574ee884709 100644 --- a/clients/client-cloudformation/src/protocols/Aws_query.ts +++ b/clients/client-cloudformation/src/protocols/Aws_query.ts @@ -10,7 +10,7 @@ import { parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1525,7 +1525,7 @@ export const de_ActivateTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1549,10 +1549,9 @@ const de_ActivateTypeCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1575,7 +1574,7 @@ export const de_BatchDescribeTypeConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1599,10 +1598,9 @@ const de_BatchDescribeTypeConfigurationsCommandError = async ( throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1622,7 +1620,7 @@ export const de_CancelUpdateStackCommand = async ( const response: CancelUpdateStackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1643,10 +1641,9 @@ const de_CancelUpdateStackCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1669,7 +1666,7 @@ export const de_ContinueUpdateRollbackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1690,10 +1687,9 @@ const de_ContinueUpdateRollbackCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1716,7 +1712,7 @@ export const de_CreateChangeSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1743,10 +1739,9 @@ const de_CreateChangeSetCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1769,7 +1764,7 @@ export const de_CreateStackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1799,10 +1794,9 @@ const de_CreateStackCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1825,7 +1819,7 @@ export const de_CreateStackInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1861,10 +1855,9 @@ const de_CreateStackInstancesCommandError = async ( throw await de_StaleRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1887,7 +1880,7 @@ export const de_CreateStackSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1914,10 +1907,9 @@ const de_CreateStackSetCommandError = async ( throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1940,7 +1932,7 @@ export const de_DeactivateTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1964,10 +1956,9 @@ const de_DeactivateTypeCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1990,7 +1981,7 @@ export const de_DeleteChangeSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2011,10 +2002,9 @@ const de_DeleteChangeSetCommandError = async ( throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2034,7 +2024,7 @@ export const de_DeleteStackCommand = async ( const response: DeleteStackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2055,10 +2045,9 @@ const de_DeleteStackCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2081,7 +2070,7 @@ export const de_DeleteStackInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2114,10 +2103,9 @@ const de_DeleteStackInstancesCommandError = async ( throw await de_StaleRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2140,7 +2128,7 @@ export const de_DeleteStackSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2164,10 +2152,9 @@ const de_DeleteStackSetCommandError = async ( throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2190,7 +2177,7 @@ export const de_DeregisterTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2214,10 +2201,9 @@ const de_DeregisterTypeCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2240,7 +2226,7 @@ export const de_DescribeAccountLimitsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2256,10 +2242,9 @@ const de_DescribeAccountLimitsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2281,7 +2266,7 @@ export const de_DescribeChangeSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2302,10 +2287,9 @@ const de_DescribeChangeSetCommandError = async ( throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2328,7 +2312,7 @@ export const de_DescribeChangeSetHooksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2349,10 +2333,9 @@ const de_DescribeChangeSetHooksCommandError = async ( throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2375,7 +2358,7 @@ export const de_DescribePublisherCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2396,10 +2379,9 @@ const de_DescribePublisherCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2422,7 +2404,7 @@ export const de_DescribeStackDriftDetectionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2438,10 +2420,9 @@ const de_DescribeStackDriftDetectionStatusCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2463,7 +2444,7 @@ export const de_DescribeStackEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2479,10 +2460,9 @@ const de_DescribeStackEventsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2504,7 +2484,7 @@ export const de_DescribeStackInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2528,10 +2508,9 @@ const de_DescribeStackInstanceCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2554,7 +2533,7 @@ export const de_DescribeStackResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2570,10 +2549,9 @@ const de_DescribeStackResourceCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2595,7 +2573,7 @@ export const de_DescribeStackResourceDriftsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2611,10 +2589,9 @@ const de_DescribeStackResourceDriftsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2636,7 +2613,7 @@ export const de_DescribeStackResourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2652,10 +2629,9 @@ const de_DescribeStackResourcesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2677,7 +2653,7 @@ export const de_DescribeStacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2693,10 +2669,9 @@ const de_DescribeStacksCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2718,7 +2693,7 @@ export const de_DescribeStackSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2739,10 +2714,9 @@ const de_DescribeStackSetCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,7 +2739,7 @@ export const de_DescribeStackSetOperationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2789,10 +2763,9 @@ const de_DescribeStackSetOperationCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2815,7 +2788,7 @@ export const de_DescribeTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2839,10 +2812,9 @@ const de_DescribeTypeCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2865,7 +2837,7 @@ export const de_DescribeTypeRegistrationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2886,10 +2858,9 @@ const de_DescribeTypeRegistrationCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2912,7 +2883,7 @@ export const de_DetectStackDriftCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2928,10 +2899,9 @@ const de_DetectStackDriftCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2953,7 +2923,7 @@ export const de_DetectStackResourceDriftCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2969,10 +2939,9 @@ const de_DetectStackResourceDriftCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2994,7 +2963,7 @@ export const de_DetectStackSetDriftCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3021,10 +2990,9 @@ const de_DetectStackSetDriftCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3047,7 +3015,7 @@ export const de_EstimateTemplateCostCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3063,10 +3031,9 @@ const de_EstimateTemplateCostCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3088,7 +3055,7 @@ export const de_ExecuteChangeSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3118,10 +3085,9 @@ const de_ExecuteChangeSetCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3144,7 +3110,7 @@ export const de_GetStackPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3160,10 +3126,9 @@ const de_GetStackPolicyCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3185,7 +3150,7 @@ export const de_GetTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3206,10 +3171,9 @@ const de_GetTemplateCommandError = async ( throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3232,7 +3196,7 @@ export const de_GetTemplateSummaryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3253,10 +3217,9 @@ const de_GetTemplateSummaryCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3279,7 +3242,7 @@ export const de_ImportStacksToStackSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3318,10 +3281,9 @@ const de_ImportStacksToStackSetCommandError = async ( throw await de_StaleRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3344,7 +3306,7 @@ export const de_ListChangeSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3360,10 +3322,9 @@ const de_ListChangeSetsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3385,7 +3346,7 @@ export const de_ListExportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3401,10 +3362,9 @@ const de_ListExportsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3426,7 +3386,7 @@ export const de_ListImportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3442,10 +3402,9 @@ const de_ListImportsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3467,7 +3426,7 @@ export const de_ListStackInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3488,10 +3447,9 @@ const de_ListStackInstancesCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3514,7 +3472,7 @@ export const de_ListStackResourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3530,10 +3488,9 @@ const de_ListStackResourcesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3555,7 +3512,7 @@ export const de_ListStacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3571,10 +3528,9 @@ const de_ListStacksCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3596,7 +3552,7 @@ export const de_ListStackSetOperationResultsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3620,10 +3576,9 @@ const de_ListStackSetOperationResultsCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3646,7 +3601,7 @@ export const de_ListStackSetOperationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3667,10 +3622,9 @@ const de_ListStackSetOperationsCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3693,7 +3647,7 @@ export const de_ListStackSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3709,10 +3663,9 @@ const de_ListStackSetsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3734,7 +3687,7 @@ export const de_ListTypeRegistrationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3755,10 +3708,9 @@ const de_ListTypeRegistrationsCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3781,7 +3733,7 @@ export const de_ListTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3802,10 +3754,9 @@ const de_ListTypesCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3828,7 +3779,7 @@ export const de_ListTypeVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3849,10 +3800,9 @@ const de_ListTypeVersionsCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3875,7 +3825,7 @@ export const de_PublishTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3899,10 +3849,9 @@ const de_PublishTypeCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3925,7 +3874,7 @@ export const de_RecordHandlerProgressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3949,10 +3898,9 @@ const de_RecordHandlerProgressCommandError = async ( throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3975,7 +3923,7 @@ export const de_RegisterPublisherCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3996,10 +3944,9 @@ const de_RegisterPublisherCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4022,7 +3969,7 @@ export const de_RegisterTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4043,10 +3990,9 @@ const de_RegisterTypeCommandError = async ( throw await de_CFNRegistryExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4069,7 +4015,7 @@ export const de_RollbackStackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4090,10 +4036,9 @@ const de_RollbackStackCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4113,7 +4058,7 @@ export const de_SetStackPolicyCommand = async ( const response: SetStackPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4129,10 +4074,9 @@ const de_SetStackPolicyCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4154,7 +4098,7 @@ export const de_SetTypeConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4178,10 +4122,9 @@ const de_SetTypeConfigurationCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4204,7 +4147,7 @@ export const de_SetTypeDefaultVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4228,10 +4171,9 @@ const de_SetTypeDefaultVersionCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4251,7 +4193,7 @@ export const de_SignalResourceCommand = async ( const response: SignalResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4267,10 +4209,9 @@ const de_SignalResourceCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4292,7 +4233,7 @@ export const de_StopStackSetOperationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4319,10 +4260,9 @@ const de_StopStackSetOperationCommandError = async ( throw await de_StackSetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4345,7 +4285,7 @@ export const de_TestTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4369,10 +4309,9 @@ const de_TestTypeCommandError = async ( throw await de_TypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4395,7 +4334,7 @@ export const de_UpdateStackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4419,10 +4358,9 @@ const de_UpdateStackCommandError = async ( throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4445,7 +4383,7 @@ export const de_UpdateStackInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4481,10 +4419,9 @@ const de_UpdateStackInstancesCommandError = async ( throw await de_StaleRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4507,7 +4444,7 @@ export const de_UpdateStackSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4543,10 +4480,9 @@ const de_UpdateStackSetCommandError = async ( throw await de_StaleRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4569,7 +4505,7 @@ export const de_UpdateTerminationProtectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4585,10 +4521,9 @@ const de_UpdateTerminationProtectionCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4610,7 +4545,7 @@ export const de_ValidateTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4626,10 +4561,9 @@ const de_ValidateTemplateCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10862,6 +10796,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudfront/src/protocols/Aws_restXml.ts b/clients/client-cloudfront/src/protocols/Aws_restXml.ts index 3fe4042d1ef2..d3ffa550aeee 100644 --- a/clients/client-cloudfront/src/protocols/Aws_restXml.ts +++ b/clients/client-cloudfront/src/protocols/Aws_restXml.ts @@ -8,14 +8,14 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, - map as __map, + map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -4033,10 +4033,9 @@ const de_AssociateAliasCommandError = async ( throw await de_TooManyDistributionCNAMEsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4266,10 +4265,9 @@ const de_CopyDistributionCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4334,10 +4332,9 @@ const de_CreateCachePolicyCommandError = async ( throw await de_TooManyQueryStringsInCachePolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4393,10 +4390,9 @@ const de_CreateCloudFrontOriginAccessIdentityCommandError = async ( throw await de_TooManyCloudFrontOriginAccessIdentitiesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4455,10 +4451,9 @@ const de_CreateContinuousDeploymentPolicyCommandError = async ( throw await de_TooManyContinuousDeploymentPoliciesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4694,10 +4689,9 @@ const de_CreateDistributionCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4930,10 +4924,9 @@ const de_CreateDistributionWithTagsCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4998,10 +4991,9 @@ const de_CreateFieldLevelEncryptionConfigCommandError = async ( throw await de_TooManyFieldLevelEncryptionQueryArgProfilesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5066,10 +5058,9 @@ const de_CreateFieldLevelEncryptionProfileCommandError = async ( throw await de_TooManyFieldLevelEncryptionProfilesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5125,10 +5116,9 @@ const de_CreateFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5189,10 +5179,9 @@ const de_CreateInvalidationCommandError = async ( throw await de_TooManyInvalidationsInProgressRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5245,10 +5234,9 @@ const de_CreateKeyGroupCommandError = async ( throw await de_TooManyPublicKeysInKeyGroupRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5299,10 +5287,9 @@ const de_CreateMonitoringSubscriptionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5352,10 +5339,9 @@ const de_CreateOriginAccessControlCommandError = async ( throw await de_TooManyOriginAccessControlsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5420,10 +5406,9 @@ const de_CreateOriginRequestPolicyCommandError = async ( throw await de_TooManyQueryStringsInOriginRequestPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5473,10 +5458,9 @@ const de_CreatePublicKeyCommandError = async ( throw await de_TooManyPublicKeysRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5529,10 +5513,9 @@ const de_CreateRealtimeLogConfigCommandError = async ( throw await de_TooManyRealtimeLogConfigsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5597,10 +5580,9 @@ const de_CreateResponseHeadersPolicyCommandError = async ( throw await de_TooManyResponseHeadersPoliciesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5680,10 +5662,9 @@ const de_CreateStreamingDistributionCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5766,10 +5747,9 @@ const de_CreateStreamingDistributionWithTagsCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5825,10 +5805,9 @@ const de_DeleteCachePolicyCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5881,10 +5860,9 @@ const de_DeleteCloudFrontOriginAccessIdentityCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5940,10 +5918,9 @@ const de_DeleteContinuousDeploymentPolicyCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5996,10 +5973,9 @@ const de_DeleteDistributionCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6052,10 +6028,9 @@ const de_DeleteFieldLevelEncryptionConfigCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6108,10 +6083,9 @@ const de_DeleteFieldLevelEncryptionProfileCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6164,10 +6138,9 @@ const de_DeleteFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6217,10 +6190,9 @@ const de_DeleteKeyGroupCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6270,10 +6242,9 @@ const de_DeleteMonitoringSubscriptionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6326,10 +6297,9 @@ const de_DeleteOriginAccessControlCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6385,10 +6355,9 @@ const de_DeleteOriginRequestPolicyCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6441,10 +6410,9 @@ const de_DeletePublicKeyCommandError = async ( throw await de_PublicKeyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6494,10 +6462,9 @@ const de_DeleteRealtimeLogConfigCommandError = async ( throw await de_RealtimeLogConfigInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6553,10 +6520,9 @@ const de_DeleteResponseHeadersPolicyCommandError = async ( throw await de_ResponseHeadersPolicyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6609,10 +6575,9 @@ const de_DeleteStreamingDistributionCommandError = async ( throw await de_StreamingDistributionNotDisabledRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6658,10 +6623,9 @@ const de_DescribeFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6707,10 +6671,9 @@ const de_GetCachePolicyCommandError = async ( throw await de_NoSuchCachePolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6756,10 +6719,9 @@ const de_GetCachePolicyConfigCommandError = async ( throw await de_NoSuchCachePolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6805,10 +6767,9 @@ const de_GetCloudFrontOriginAccessIdentityCommandError = async ( throw await de_NoSuchCloudFrontOriginAccessIdentityRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6854,10 +6815,9 @@ const de_GetCloudFrontOriginAccessIdentityConfigCommandError = async ( throw await de_NoSuchCloudFrontOriginAccessIdentityRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6903,10 +6863,9 @@ const de_GetContinuousDeploymentPolicyCommandError = async ( throw await de_NoSuchContinuousDeploymentPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6952,10 +6911,9 @@ const de_GetContinuousDeploymentPolicyConfigCommandError = async ( throw await de_NoSuchContinuousDeploymentPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7001,10 +6959,9 @@ const de_GetDistributionCommandError = async ( throw await de_NoSuchDistributionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7050,10 +7007,9 @@ const de_GetDistributionConfigCommandError = async ( throw await de_NoSuchDistributionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7099,10 +7055,9 @@ const de_GetFieldLevelEncryptionCommandError = async ( throw await de_NoSuchFieldLevelEncryptionConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7148,10 +7103,9 @@ const de_GetFieldLevelEncryptionConfigCommandError = async ( throw await de_NoSuchFieldLevelEncryptionConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7197,10 +7151,9 @@ const de_GetFieldLevelEncryptionProfileCommandError = async ( throw await de_NoSuchFieldLevelEncryptionProfileRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7246,10 +7199,9 @@ const de_GetFieldLevelEncryptionProfileConfigCommandError = async ( throw await de_NoSuchFieldLevelEncryptionProfileRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7296,10 +7248,9 @@ const de_GetFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7347,10 +7298,9 @@ const de_GetInvalidationCommandError = async ( throw await de_NoSuchInvalidationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7393,10 +7343,9 @@ const de_GetKeyGroupCommandError = async ( throw await de_NoSuchResourceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7439,10 +7388,9 @@ const de_GetKeyGroupConfigCommandError = async ( throw await de_NoSuchResourceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7493,10 +7441,9 @@ const de_GetMonitoringSubscriptionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7542,10 +7489,9 @@ const de_GetOriginAccessControlCommandError = async ( throw await de_NoSuchOriginAccessControlRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7591,10 +7537,9 @@ const de_GetOriginAccessControlConfigCommandError = async ( throw await de_NoSuchOriginAccessControlRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7640,10 +7585,9 @@ const de_GetOriginRequestPolicyCommandError = async ( throw await de_NoSuchOriginRequestPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7689,10 +7633,9 @@ const de_GetOriginRequestPolicyConfigCommandError = async ( throw await de_NoSuchOriginRequestPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7738,10 +7681,9 @@ const de_GetPublicKeyCommandError = async ( throw await de_NoSuchPublicKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7787,10 +7729,9 @@ const de_GetPublicKeyConfigCommandError = async ( throw await de_NoSuchPublicKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7840,10 +7781,9 @@ const de_GetRealtimeLogConfigCommandError = async ( throw await de_NoSuchRealtimeLogConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7889,10 +7829,9 @@ const de_GetResponseHeadersPolicyCommandError = async ( throw await de_NoSuchResponseHeadersPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7938,10 +7877,9 @@ const de_GetResponseHeadersPolicyConfigCommandError = async ( throw await de_NoSuchResponseHeadersPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7987,10 +7925,9 @@ const de_GetStreamingDistributionCommandError = async ( throw await de_NoSuchStreamingDistributionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8036,10 +7973,9 @@ const de_GetStreamingDistributionConfigCommandError = async ( throw await de_NoSuchStreamingDistributionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8087,10 +8023,9 @@ const de_ListCachePoliciesCommandError = async ( throw await de_NoSuchCachePolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8132,10 +8067,9 @@ const de_ListCloudFrontOriginAccessIdentitiesCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8180,10 +8114,9 @@ const de_ListConflictingAliasesCommandError = async ( throw await de_NoSuchDistributionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8231,10 +8164,9 @@ const de_ListContinuousDeploymentPoliciesCommandError = async ( throw await de_NoSuchContinuousDeploymentPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8276,10 +8208,9 @@ const de_ListDistributionsCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8327,10 +8258,9 @@ const de_ListDistributionsByCachePolicyIdCommandError = async ( throw await de_NoSuchCachePolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8375,10 +8305,9 @@ const de_ListDistributionsByKeyGroupCommandError = async ( throw await de_NoSuchResourceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8426,10 +8355,9 @@ const de_ListDistributionsByOriginRequestPolicyIdCommandError = async ( throw await de_NoSuchOriginRequestPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8471,10 +8399,9 @@ const de_ListDistributionsByRealtimeLogConfigCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8522,10 +8449,9 @@ const de_ListDistributionsByResponseHeadersPolicyIdCommandError = async ( throw await de_NoSuchResponseHeadersPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8570,10 +8496,9 @@ const de_ListDistributionsByWebACLIdCommandError = async ( throw await de_InvalidWebACLIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8615,10 +8540,9 @@ const de_ListFieldLevelEncryptionConfigsCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8660,10 +8584,9 @@ const de_ListFieldLevelEncryptionProfilesCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8708,10 +8631,9 @@ const de_ListFunctionsCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8759,10 +8681,9 @@ const de_ListInvalidationsCommandError = async ( throw await de_NoSuchDistributionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8804,10 +8725,9 @@ const de_ListKeyGroupsCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8849,10 +8769,9 @@ const de_ListOriginAccessControlsCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8900,10 +8819,9 @@ const de_ListOriginRequestPoliciesCommandError = async ( throw await de_NoSuchOriginRequestPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8945,10 +8863,9 @@ const de_ListPublicKeysCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8996,10 +8913,9 @@ const de_ListRealtimeLogConfigsCommandError = async ( throw await de_NoSuchRealtimeLogConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9047,10 +8963,9 @@ const de_ListResponseHeadersPoliciesCommandError = async ( throw await de_NoSuchResponseHeadersPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9092,10 +9007,9 @@ const de_ListStreamingDistributionsCommandError = async ( throw await de_InvalidArgumentRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9146,10 +9060,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NoSuchResourceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9203,10 +9116,9 @@ const de_PublishFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9256,10 +9168,9 @@ const de_TagResourceCommandError = async ( throw await de_NoSuchResourceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9313,10 +9224,9 @@ const de_TestFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9366,10 +9276,9 @@ const de_UntagResourceCommandError = async ( throw await de_NoSuchResourceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9442,10 +9351,9 @@ const de_UpdateCachePolicyCommandError = async ( throw await de_TooManyQueryStringsInCachePolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9509,10 +9417,9 @@ const de_UpdateCloudFrontOriginAccessIdentityCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9573,10 +9480,9 @@ const de_UpdateContinuousDeploymentPolicyCommandError = async ( throw await de_StagingDistributionInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9811,10 +9717,9 @@ const de_UpdateDistributionCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10034,10 +9939,9 @@ const de_UpdateDistributionWithStagingConfigCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10110,10 +10014,9 @@ const de_UpdateFieldLevelEncryptionConfigCommandError = async ( throw await de_TooManyFieldLevelEncryptionQueryArgProfilesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10189,10 +10092,9 @@ const de_UpdateFieldLevelEncryptionProfileCommandError = async ( throw await de_TooManyFieldLevelEncryptionFieldPatternsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10250,10 +10152,9 @@ const de_UpdateFunctionCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10311,10 +10212,9 @@ const de_UpdateKeyGroupCommandError = async ( throw await de_TooManyPublicKeysInKeyGroupRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10375,10 +10275,9 @@ const de_UpdateOriginAccessControlCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10451,10 +10350,9 @@ const de_UpdateOriginRequestPolicyCommandError = async ( throw await de_TooManyQueryStringsInOriginRequestPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10515,10 +10413,9 @@ const de_UpdatePublicKeyCommandError = async ( throw await de_PreconditionFailedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10568,10 +10465,9 @@ const de_UpdateRealtimeLogConfigCommandError = async ( throw await de_NoSuchRealtimeLogConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10644,10 +10540,9 @@ const de_UpdateResponseHeadersPolicyCommandError = async ( throw await de_TooManyRemoveHeadersInResponseHeadersPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10729,16 +10624,15 @@ const de_UpdateStreamingDistributionCommandError = async ( throw await de_TrustedSignerDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restXmlAccessDeniedRes */ diff --git a/clients/client-cloudhsm-v2/src/protocols/Aws_json1_1.ts b/clients/client-cloudhsm-v2/src/protocols/Aws_json1_1.ts index b04105979f14..30b8c354216f 100644 --- a/clients/client-cloudhsm-v2/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudhsm-v2/src/protocols/Aws_json1_1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -38,7 +40,6 @@ import { CloudHSMV2ServiceException as __BaseException } from "../models/CloudHS import { Backup, BackupRetentionPolicy, - Certificates, CloudHsmAccessDeniedException, CloudHsmInternalFailureException, CloudHsmInvalidRequestException, @@ -51,23 +52,18 @@ import { CreateClusterRequest, CreateClusterResponse, CreateHsmRequest, - CreateHsmResponse, DeleteBackupRequest, DeleteBackupResponse, DeleteClusterRequest, DeleteClusterResponse, DeleteHsmRequest, - DeleteHsmResponse, DescribeBackupsRequest, DescribeBackupsResponse, DescribeClustersRequest, DescribeClustersResponse, DestinationBackup, - Hsm, InitializeClusterRequest, - InitializeClusterResponse, ListTagsRequest, - ListTagsResponse, ModifyBackupAttributesRequest, ModifyBackupAttributesResponse, ModifyClusterRequest, @@ -76,9 +72,7 @@ import { RestoreBackupResponse, Tag, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, } from "../models/models_0"; /** @@ -90,7 +84,7 @@ export const se_CopyBackupToRegionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CopyBackupToRegion"); let body: any; - body = JSON.stringify(se_CopyBackupToRegionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -103,7 +97,7 @@ export const se_CreateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCluster"); let body: any; - body = JSON.stringify(se_CreateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -116,7 +110,7 @@ export const se_CreateHsmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHsm"); let body: any; - body = JSON.stringify(se_CreateHsmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -129,7 +123,7 @@ export const se_DeleteBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBackup"); let body: any; - body = JSON.stringify(se_DeleteBackupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -142,7 +136,7 @@ export const se_DeleteClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCluster"); let body: any; - body = JSON.stringify(se_DeleteClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -155,7 +149,7 @@ export const se_DeleteHsmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHsm"); let body: any; - body = JSON.stringify(se_DeleteHsmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -168,7 +162,7 @@ export const se_DescribeBackupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBackups"); let body: any; - body = JSON.stringify(se_DescribeBackupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -181,7 +175,7 @@ export const se_DescribeClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClusters"); let body: any; - body = JSON.stringify(se_DescribeClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -194,7 +188,7 @@ export const se_InitializeClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InitializeCluster"); let body: any; - body = JSON.stringify(se_InitializeClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -207,7 +201,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -220,7 +214,7 @@ export const se_ModifyBackupAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyBackupAttributes"); let body: any; - body = JSON.stringify(se_ModifyBackupAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -233,7 +227,7 @@ export const se_ModifyClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyCluster"); let body: any; - body = JSON.stringify(se_ModifyClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -246,7 +240,7 @@ export const se_RestoreBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreBackup"); let body: any; - body = JSON.stringify(se_RestoreBackupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -259,7 +253,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -272,7 +266,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -293,7 +287,7 @@ export const de_CopyBackupToRegionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -329,10 +323,9 @@ const de_CopyBackupToRegionCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -355,7 +348,7 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -391,10 +384,9 @@ const de_CreateClusterCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -412,12 +404,12 @@ export const de_CreateHsmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHsmResponse(data, context); + contents = _json(data); const response: CreateHsmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -450,10 +442,9 @@ const de_CreateHsmCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -476,7 +467,7 @@ export const de_DeleteBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -509,10 +500,9 @@ const de_DeleteBackupCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -535,7 +525,7 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -571,10 +561,9 @@ const de_DeleteClusterCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -592,12 +581,12 @@ export const de_DeleteHsmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHsmResponse(data, context); + contents = _json(data); const response: DeleteHsmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -630,10 +619,9 @@ const de_DeleteHsmCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -656,7 +644,7 @@ export const de_DescribeBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -692,10 +680,9 @@ const de_DescribeBackupsCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -718,7 +705,7 @@ export const de_DescribeClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -751,10 +738,9 @@ const de_DescribeClustersCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -772,12 +758,12 @@ export const de_InitializeClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_InitializeClusterResponse(data, context); + contents = _json(data); const response: InitializeClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -810,10 +796,9 @@ const de_InitializeClusterCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -831,12 +816,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResponse(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -872,10 +857,9 @@ const de_ListTagsCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -898,7 +882,7 @@ export const de_ModifyBackupAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -931,10 +915,9 @@ const de_ModifyBackupAttributesCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -957,7 +940,7 @@ export const de_ModifyClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -990,10 +973,9 @@ const de_ModifyClusterCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1016,7 +998,7 @@ export const de_RestoreBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1049,10 +1031,9 @@ const de_RestoreBackupCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1070,12 +1051,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1111,10 +1092,9 @@ const de_TagResourceCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1132,12 +1112,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1173,10 +1153,9 @@ const de_UntagResourceCommandError = async ( throw await de_CloudHsmTagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1190,7 +1169,7 @@ const de_CloudHsmAccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmAccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1206,7 +1185,7 @@ const de_CloudHsmInternalFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmInternalFailureException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmInternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1222,7 +1201,7 @@ const de_CloudHsmInvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmInvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmInvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1238,7 +1217,7 @@ const de_CloudHsmResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1254,7 +1233,7 @@ const de_CloudHsmServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmServiceException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1270,7 +1249,7 @@ const de_CloudHsmTagExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmTagException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1278,284 +1257,71 @@ const de_CloudHsmTagExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1BackupRetentionPolicy - */ -const se_BackupRetentionPolicy = (input: BackupRetentionPolicy, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_BackupRetentionPolicy omitted. -/** - * serializeAws_json1_1CopyBackupToRegionRequest - */ -const se_CopyBackupToRegionRequest = (input: CopyBackupToRegionRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ...(input.DestinationRegion != null && { DestinationRegion: input.DestinationRegion }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; -}; +// se_CopyBackupToRegionRequest omitted. -/** - * serializeAws_json1_1CreateClusterRequest - */ -const se_CreateClusterRequest = (input: CreateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.BackupRetentionPolicy != null && { - BackupRetentionPolicy: se_BackupRetentionPolicy(input.BackupRetentionPolicy, context), - }), - ...(input.HsmType != null && { HsmType: input.HsmType }), - ...(input.SourceBackupId != null && { SourceBackupId: input.SourceBackupId }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; -}; +// se_CreateClusterRequest omitted. -/** - * serializeAws_json1_1CreateHsmRequest - */ -const se_CreateHsmRequest = (input: CreateHsmRequest, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - }; -}; +// se_CreateHsmRequest omitted. -/** - * serializeAws_json1_1DeleteBackupRequest - */ -const se_DeleteBackupRequest = (input: DeleteBackupRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - }; -}; +// se_DeleteBackupRequest omitted. -/** - * serializeAws_json1_1DeleteClusterRequest - */ -const se_DeleteClusterRequest = (input: DeleteClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_DeleteClusterRequest omitted. -/** - * serializeAws_json1_1DeleteHsmRequest - */ -const se_DeleteHsmRequest = (input: DeleteHsmRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.EniId != null && { EniId: input.EniId }), - ...(input.EniIp != null && { EniIp: input.EniIp }), - ...(input.HsmId != null && { HsmId: input.HsmId }), - }; -}; +// se_DeleteHsmRequest omitted. -/** - * serializeAws_json1_1DescribeBackupsRequest - */ -const se_DescribeBackupsRequest = (input: DescribeBackupsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortAscending != null && { SortAscending: input.SortAscending }), - }; -}; +// se_DescribeBackupsRequest omitted. -/** - * serializeAws_json1_1DescribeClustersRequest - */ -const se_DescribeClustersRequest = (input: DescribeClustersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeClustersRequest omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Strings(value, context); - return acc; - }, {}); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1InitializeClusterRequest - */ -const se_InitializeClusterRequest = (input: InitializeClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.SignedCert != null && { SignedCert: input.SignedCert }), - ...(input.TrustAnchor != null && { TrustAnchor: input.TrustAnchor }), - }; -}; +// se_InitializeClusterRequest omitted. -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_ListTagsRequest omitted. -/** - * serializeAws_json1_1ModifyBackupAttributesRequest - */ -const se_ModifyBackupAttributesRequest = (input: ModifyBackupAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ...(input.NeverExpires != null && { NeverExpires: input.NeverExpires }), - }; -}; +// se_ModifyBackupAttributesRequest omitted. -/** - * serializeAws_json1_1ModifyClusterRequest - */ -const se_ModifyClusterRequest = (input: ModifyClusterRequest, context: __SerdeContext): any => { - return { - ...(input.BackupRetentionPolicy != null && { - BackupRetentionPolicy: se_BackupRetentionPolicy(input.BackupRetentionPolicy, context), - }), - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_ModifyClusterRequest omitted. -/** - * serializeAws_json1_1RestoreBackupRequest - */ -const se_RestoreBackupRequest = (input: RestoreBackupRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - }; -}; +// se_RestoreBackupRequest omitted. -/** - * serializeAws_json1_1Strings - */ -const se_Strings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Strings omitted. -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }), - }; -}; +// se_UntagResourceRequest omitted. /** * deserializeAws_json1_1Backup */ const de_Backup = (output: any, context: __SerdeContext): Backup => { - return { - BackupId: __expectString(output.BackupId), - BackupState: __expectString(output.BackupState), - ClusterId: __expectString(output.ClusterId), - CopyTimestamp: - output.CopyTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CopyTimestamp))) - : undefined, - CreateTimestamp: - output.CreateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp))) - : undefined, - DeleteTimestamp: - output.DeleteTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeleteTimestamp))) - : undefined, - NeverExpires: __expectBoolean(output.NeverExpires), - SourceBackup: __expectString(output.SourceBackup), - SourceCluster: __expectString(output.SourceCluster), - SourceRegion: __expectString(output.SourceRegion), - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BackupRetentionPolicy - */ -const de_BackupRetentionPolicy = (output: any, context: __SerdeContext): BackupRetentionPolicy => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; + return take(output, { + BackupId: __expectString, + BackupState: __expectString, + ClusterId: __expectString, + CopyTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeleteTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NeverExpires: __expectBoolean, + SourceBackup: __expectString, + SourceCluster: __expectString, + SourceRegion: __expectString, + TagList: _json, + }) as any; }; +// de_BackupRetentionPolicy omitted. + /** * deserializeAws_json1_1Backups */ @@ -1563,114 +1329,46 @@ const de_Backups = (output: any, context: __SerdeContext): Backup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Backup(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Certificates - */ -const de_Certificates = (output: any, context: __SerdeContext): Certificates => { - return { - AwsHardwareCertificate: __expectString(output.AwsHardwareCertificate), - ClusterCertificate: __expectString(output.ClusterCertificate), - ClusterCsr: __expectString(output.ClusterCsr), - HsmCertificate: __expectString(output.HsmCertificate), - ManufacturerHardwareCertificate: __expectString(output.ManufacturerHardwareCertificate), - } as any; -}; +// de_Certificates omitted. -/** - * deserializeAws_json1_1CloudHsmAccessDeniedException - */ -const de_CloudHsmAccessDeniedException = (output: any, context: __SerdeContext): CloudHsmAccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudHsmAccessDeniedException omitted. -/** - * deserializeAws_json1_1CloudHsmInternalFailureException - */ -const de_CloudHsmInternalFailureException = ( - output: any, - context: __SerdeContext -): CloudHsmInternalFailureException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudHsmInternalFailureException omitted. -/** - * deserializeAws_json1_1CloudHsmInvalidRequestException - */ -const de_CloudHsmInvalidRequestException = (output: any, context: __SerdeContext): CloudHsmInvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudHsmInvalidRequestException omitted. -/** - * deserializeAws_json1_1CloudHsmResourceNotFoundException - */ -const de_CloudHsmResourceNotFoundException = ( - output: any, - context: __SerdeContext -): CloudHsmResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudHsmResourceNotFoundException omitted. -/** - * deserializeAws_json1_1CloudHsmServiceException - */ -const de_CloudHsmServiceException = (output: any, context: __SerdeContext): CloudHsmServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudHsmServiceException omitted. -/** - * deserializeAws_json1_1CloudHsmTagException - */ -const de_CloudHsmTagException = (output: any, context: __SerdeContext): CloudHsmTagException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudHsmTagException omitted. /** * deserializeAws_json1_1Cluster */ const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - BackupPolicy: __expectString(output.BackupPolicy), - BackupRetentionPolicy: - output.BackupRetentionPolicy != null - ? de_BackupRetentionPolicy(output.BackupRetentionPolicy, context) - : undefined, - Certificates: output.Certificates != null ? de_Certificates(output.Certificates, context) : undefined, - ClusterId: __expectString(output.ClusterId), - CreateTimestamp: - output.CreateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp))) - : undefined, - HsmType: __expectString(output.HsmType), - Hsms: output.Hsms != null ? de_Hsms(output.Hsms, context) : undefined, - PreCoPassword: __expectString(output.PreCoPassword), - SecurityGroup: __expectString(output.SecurityGroup), - SourceBackupId: __expectString(output.SourceBackupId), - State: __expectString(output.State), - StateMessage: __expectString(output.StateMessage), - SubnetMapping: output.SubnetMapping != null ? de_ExternalSubnetMapping(output.SubnetMapping, context) : undefined, - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; + return take(output, { + BackupPolicy: __expectString, + BackupRetentionPolicy: _json, + Certificates: _json, + ClusterId: __expectString, + CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HsmType: __expectString, + Hsms: _json, + PreCoPassword: __expectString, + SecurityGroup: __expectString, + SourceBackupId: __expectString, + State: __expectString, + StateMessage: __expectString, + SubnetMapping: _json, + TagList: _json, + VpcId: __expectString, + }) as any; }; /** @@ -1680,9 +1378,6 @@ const de_Clusters = (output: any, context: __SerdeContext): Cluster[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Cluster(entry, context); }); return retVal; @@ -1692,221 +1387,118 @@ const de_Clusters = (output: any, context: __SerdeContext): Cluster[] => { * deserializeAws_json1_1CopyBackupToRegionResponse */ const de_CopyBackupToRegionResponse = (output: any, context: __SerdeContext): CopyBackupToRegionResponse => { - return { - DestinationBackup: - output.DestinationBackup != null ? de_DestinationBackup(output.DestinationBackup, context) : undefined, - } as any; + return take(output, { + DestinationBackup: (_: any) => de_DestinationBackup(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateClusterResponse */ const de_CreateClusterResponse = (output: any, context: __SerdeContext): CreateClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateHsmResponse - */ -const de_CreateHsmResponse = (output: any, context: __SerdeContext): CreateHsmResponse => { - return { - Hsm: output.Hsm != null ? de_Hsm(output.Hsm, context) : undefined, - } as any; -}; +// de_CreateHsmResponse omitted. /** * deserializeAws_json1_1DeleteBackupResponse */ const de_DeleteBackupResponse = (output: any, context: __SerdeContext): DeleteBackupResponse => { - return { - Backup: output.Backup != null ? de_Backup(output.Backup, context) : undefined, - } as any; + return take(output, { + Backup: (_: any) => de_Backup(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteClusterResponse */ const de_DeleteClusterResponse = (output: any, context: __SerdeContext): DeleteClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteHsmResponse - */ -const de_DeleteHsmResponse = (output: any, context: __SerdeContext): DeleteHsmResponse => { - return { - HsmId: __expectString(output.HsmId), - } as any; -}; +// de_DeleteHsmResponse omitted. /** * deserializeAws_json1_1DescribeBackupsResponse */ const de_DescribeBackupsResponse = (output: any, context: __SerdeContext): DescribeBackupsResponse => { - return { - Backups: output.Backups != null ? de_Backups(output.Backups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Backups: (_: any) => de_Backups(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeClustersResponse */ const de_DescribeClustersResponse = (output: any, context: __SerdeContext): DescribeClustersResponse => { - return { - Clusters: output.Clusters != null ? de_Clusters(output.Clusters, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Clusters: (_: any) => de_Clusters(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DestinationBackup */ const de_DestinationBackup = (output: any, context: __SerdeContext): DestinationBackup => { - return { - CreateTimestamp: - output.CreateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp))) - : undefined, - SourceBackup: __expectString(output.SourceBackup), - SourceCluster: __expectString(output.SourceCluster), - SourceRegion: __expectString(output.SourceRegion), - } as any; + return take(output, { + CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceBackup: __expectString, + SourceCluster: __expectString, + SourceRegion: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ExternalSubnetMapping - */ -const de_ExternalSubnetMapping = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExternalSubnetMapping omitted. -/** - * deserializeAws_json1_1Hsm - */ -const de_Hsm = (output: any, context: __SerdeContext): Hsm => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - ClusterId: __expectString(output.ClusterId), - EniId: __expectString(output.EniId), - EniIp: __expectString(output.EniIp), - HsmId: __expectString(output.HsmId), - State: __expectString(output.State), - StateMessage: __expectString(output.StateMessage), - SubnetId: __expectString(output.SubnetId), - } as any; -}; +// de_Hsm omitted. -/** - * deserializeAws_json1_1Hsms - */ -const de_Hsms = (output: any, context: __SerdeContext): Hsm[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Hsm(entry, context); - }); - return retVal; -}; +// de_Hsms omitted. -/** - * deserializeAws_json1_1InitializeClusterResponse - */ -const de_InitializeClusterResponse = (output: any, context: __SerdeContext): InitializeClusterResponse => { - return { - State: __expectString(output.State), - StateMessage: __expectString(output.StateMessage), - } as any; -}; +// de_InitializeClusterResponse omitted. -/** - * deserializeAws_json1_1ListTagsResponse - */ -const de_ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => { - return { - NextToken: __expectString(output.NextToken), - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_ListTagsResponse omitted. /** * deserializeAws_json1_1ModifyBackupAttributesResponse */ const de_ModifyBackupAttributesResponse = (output: any, context: __SerdeContext): ModifyBackupAttributesResponse => { - return { - Backup: output.Backup != null ? de_Backup(output.Backup, context) : undefined, - } as any; + return take(output, { + Backup: (_: any) => de_Backup(_, context), + }) as any; }; /** * deserializeAws_json1_1ModifyClusterResponse */ const de_ModifyClusterResponse = (output: any, context: __SerdeContext): ModifyClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; /** * deserializeAws_json1_1RestoreBackupResponse */ const de_RestoreBackupResponse = (output: any, context: __SerdeContext): RestoreBackupResponse => { - return { - Backup: output.Backup != null ? de_Backup(output.Backup, context) : undefined, - } as any; + return take(output, { + Backup: (_: any) => de_Backup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1928,6 +1520,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudhsm/src/protocols/Aws_json1_1.ts b/clients/client-cloudhsm/src/protocols/Aws_json1_1.ts index c77f9d9e4f4d..514c23f0357e 100644 --- a/clients/client-cloudhsm/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudhsm/src/protocols/Aws_json1_1.ts @@ -1,10 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -42,48 +41,28 @@ import { import { CloudHSMServiceException as __BaseException } from "../models/CloudHSMServiceException"; import { AddTagsToResourceRequest, - AddTagsToResourceResponse, CloudHsmInternalException, CloudHsmServiceException, CreateHapgRequest, - CreateHapgResponse, CreateHsmRequest, - CreateHsmResponse, CreateLunaClientRequest, - CreateLunaClientResponse, DeleteHapgRequest, - DeleteHapgResponse, DeleteHsmRequest, - DeleteHsmResponse, DeleteLunaClientRequest, - DeleteLunaClientResponse, DescribeHapgRequest, - DescribeHapgResponse, DescribeHsmRequest, - DescribeHsmResponse, DescribeLunaClientRequest, - DescribeLunaClientResponse, GetConfigRequest, - GetConfigResponse, InvalidRequestException, ListAvailableZonesRequest, - ListAvailableZonesResponse, ListHapgsRequest, - ListHapgsResponse, ListHsmsRequest, - ListHsmsResponse, ListLunaClientsRequest, - ListLunaClientsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ModifyHapgRequest, - ModifyHapgResponse, ModifyHsmRequest, - ModifyHsmResponse, ModifyLunaClientRequest, - ModifyLunaClientResponse, RemoveTagsFromResourceRequest, - RemoveTagsFromResourceResponse, Tag, } from "../models/models_0"; @@ -96,7 +75,7 @@ export const se_AddTagsToResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToResource"); let body: any; - body = JSON.stringify(se_AddTagsToResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -109,7 +88,7 @@ export const se_CreateHapgCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHapg"); let body: any; - body = JSON.stringify(se_CreateHapgRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -122,7 +101,7 @@ export const se_CreateHsmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHsm"); let body: any; - body = JSON.stringify(se_CreateHsmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -135,7 +114,7 @@ export const se_CreateLunaClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLunaClient"); let body: any; - body = JSON.stringify(se_CreateLunaClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -148,7 +127,7 @@ export const se_DeleteHapgCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHapg"); let body: any; - body = JSON.stringify(se_DeleteHapgRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -161,7 +140,7 @@ export const se_DeleteHsmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHsm"); let body: any; - body = JSON.stringify(se_DeleteHsmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -174,7 +153,7 @@ export const se_DeleteLunaClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLunaClient"); let body: any; - body = JSON.stringify(se_DeleteLunaClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -187,7 +166,7 @@ export const se_DescribeHapgCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHapg"); let body: any; - body = JSON.stringify(se_DescribeHapgRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -200,7 +179,7 @@ export const se_DescribeHsmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHsm"); let body: any; - body = JSON.stringify(se_DescribeHsmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -213,7 +192,7 @@ export const se_DescribeLunaClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLunaClient"); let body: any; - body = JSON.stringify(se_DescribeLunaClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -226,7 +205,7 @@ export const se_GetConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConfig"); let body: any; - body = JSON.stringify(se_GetConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -239,7 +218,7 @@ export const se_ListAvailableZonesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailableZones"); let body: any; - body = JSON.stringify(se_ListAvailableZonesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -252,7 +231,7 @@ export const se_ListHapgsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHapgs"); let body: any; - body = JSON.stringify(se_ListHapgsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -265,7 +244,7 @@ export const se_ListHsmsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHsms"); let body: any; - body = JSON.stringify(se_ListHsmsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -278,7 +257,7 @@ export const se_ListLunaClientsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLunaClients"); let body: any; - body = JSON.stringify(se_ListLunaClientsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -291,7 +270,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -304,7 +283,7 @@ export const se_ModifyHapgCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyHapg"); let body: any; - body = JSON.stringify(se_ModifyHapgRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -317,7 +296,7 @@ export const se_ModifyHsmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyHsm"); let body: any; - body = JSON.stringify(se_ModifyHsmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -330,7 +309,7 @@ export const se_ModifyLunaClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyLunaClient"); let body: any; - body = JSON.stringify(se_ModifyLunaClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -343,7 +322,7 @@ export const se_RemoveTagsFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromResource"); let body: any; - body = JSON.stringify(se_RemoveTagsFromResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -359,12 +338,12 @@ export const de_AddTagsToResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsToResourceResponse(data, context); + contents = _json(data); const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -391,10 +370,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -412,12 +390,12 @@ export const de_CreateHapgCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHapgResponse(data, context); + contents = _json(data); const response: CreateHapgCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -444,10 +422,9 @@ const de_CreateHapgCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -465,12 +442,12 @@ export const de_CreateHsmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHsmResponse(data, context); + contents = _json(data); const response: CreateHsmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -497,10 +474,9 @@ const de_CreateHsmCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -518,12 +494,12 @@ export const de_CreateLunaClientCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLunaClientResponse(data, context); + contents = _json(data); const response: CreateLunaClientCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -550,10 +526,9 @@ const de_CreateLunaClientCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -571,12 +546,12 @@ export const de_DeleteHapgCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHapgResponse(data, context); + contents = _json(data); const response: DeleteHapgCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -603,10 +578,9 @@ const de_DeleteHapgCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -624,12 +598,12 @@ export const de_DeleteHsmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHsmResponse(data, context); + contents = _json(data); const response: DeleteHsmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -656,10 +630,9 @@ const de_DeleteHsmCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -677,12 +650,12 @@ export const de_DeleteLunaClientCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLunaClientResponse(data, context); + contents = _json(data); const response: DeleteLunaClientCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -709,10 +682,9 @@ const de_DeleteLunaClientCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -730,12 +702,12 @@ export const de_DescribeHapgCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeHapgResponse(data, context); + contents = _json(data); const response: DescribeHapgCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -762,10 +734,9 @@ const de_DescribeHapgCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -783,12 +754,12 @@ export const de_DescribeHsmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeHsmResponse(data, context); + contents = _json(data); const response: DescribeHsmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -815,10 +786,9 @@ const de_DescribeHsmCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -836,12 +806,12 @@ export const de_DescribeLunaClientCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLunaClientResponse(data, context); + contents = _json(data); const response: DescribeLunaClientCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -868,10 +838,9 @@ const de_DescribeLunaClientCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -889,12 +858,12 @@ export const de_GetConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetConfigResponse(data, context); + contents = _json(data); const response: GetConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -921,10 +890,9 @@ const de_GetConfigCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -942,12 +910,12 @@ export const de_ListAvailableZonesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAvailableZonesResponse(data, context); + contents = _json(data); const response: ListAvailableZonesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -974,10 +942,9 @@ const de_ListAvailableZonesCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -995,12 +962,12 @@ export const de_ListHapgsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListHapgsResponse(data, context); + contents = _json(data); const response: ListHapgsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1027,10 +994,9 @@ const de_ListHapgsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1048,12 +1014,12 @@ export const de_ListHsmsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListHsmsResponse(data, context); + contents = _json(data); const response: ListHsmsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1080,10 +1046,9 @@ const de_ListHsmsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1101,12 +1066,12 @@ export const de_ListLunaClientsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLunaClientsResponse(data, context); + contents = _json(data); const response: ListLunaClientsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1133,10 +1098,9 @@ const de_ListLunaClientsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1154,12 +1118,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1186,10 +1150,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1207,12 +1170,12 @@ export const de_ModifyHapgCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyHapgResponse(data, context); + contents = _json(data); const response: ModifyHapgCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1239,10 +1202,9 @@ const de_ModifyHapgCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1260,12 +1222,12 @@ export const de_ModifyHsmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyHsmResponse(data, context); + contents = _json(data); const response: ModifyHsmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1292,10 +1254,9 @@ const de_ModifyHsmCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1313,12 +1274,12 @@ export const de_ModifyLunaClientCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyLunaClientResponse(data, context); + contents = _json(data); const response: ModifyLunaClientCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1339,10 +1300,9 @@ const de_ModifyLunaClientCommandError = async ( throw await de_CloudHsmServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1360,12 +1320,12 @@ export const de_RemoveTagsFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsFromResourceResponse(data, context); + contents = _json(data); const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1392,10 +1352,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1409,7 +1368,7 @@ const de_CloudHsmInternalExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmInternalException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmInternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1425,7 +1384,7 @@ const de_CloudHsmServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmServiceException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1441,7 +1400,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1449,627 +1408,117 @@ const de_InvalidRequestExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsToResourceRequest - */ -const se_AddTagsToResourceRequest = (input: AddTagsToResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; -}; +// se_AddTagsToResourceRequest omitted. -/** - * serializeAws_json1_1CreateHapgRequest - */ -const se_CreateHapgRequest = (input: CreateHapgRequest, context: __SerdeContext): any => { - return { - ...(input.Label != null && { Label: input.Label }), - }; -}; +// se_CreateHapgRequest omitted. -/** - * serializeAws_json1_1CreateHsmRequest - */ -const se_CreateHsmRequest = (input: CreateHsmRequest, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.EniIp != null && { EniIp: input.EniIp }), - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.SshKey != null && { SshKey: input.SshKey }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }), - ...(input.SyslogIp != null && { SyslogIp: input.SyslogIp }), - }; -}; +// se_CreateHsmRequest omitted. -/** - * serializeAws_json1_1CreateLunaClientRequest - */ -const se_CreateLunaClientRequest = (input: CreateLunaClientRequest, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.Label != null && { Label: input.Label }), - }; -}; +// se_CreateLunaClientRequest omitted. -/** - * serializeAws_json1_1DeleteHapgRequest - */ -const se_DeleteHapgRequest = (input: DeleteHapgRequest, context: __SerdeContext): any => { - return { - ...(input.HapgArn != null && { HapgArn: input.HapgArn }), - }; -}; +// se_DeleteHapgRequest omitted. -/** - * serializeAws_json1_1DeleteHsmRequest - */ -const se_DeleteHsmRequest = (input: DeleteHsmRequest, context: __SerdeContext): any => { - return { - ...(input.HsmArn != null && { HsmArn: input.HsmArn }), - }; -}; +// se_DeleteHsmRequest omitted. -/** - * serializeAws_json1_1DeleteLunaClientRequest - */ -const se_DeleteLunaClientRequest = (input: DeleteLunaClientRequest, context: __SerdeContext): any => { - return { - ...(input.ClientArn != null && { ClientArn: input.ClientArn }), - }; -}; +// se_DeleteLunaClientRequest omitted. -/** - * serializeAws_json1_1DescribeHapgRequest - */ -const se_DescribeHapgRequest = (input: DescribeHapgRequest, context: __SerdeContext): any => { - return { - ...(input.HapgArn != null && { HapgArn: input.HapgArn }), - }; -}; +// se_DescribeHapgRequest omitted. -/** - * serializeAws_json1_1DescribeHsmRequest - */ -const se_DescribeHsmRequest = (input: DescribeHsmRequest, context: __SerdeContext): any => { - return { - ...(input.HsmArn != null && { HsmArn: input.HsmArn }), - ...(input.HsmSerialNumber != null && { HsmSerialNumber: input.HsmSerialNumber }), - }; -}; +// se_DescribeHsmRequest omitted. -/** - * serializeAws_json1_1DescribeLunaClientRequest - */ -const se_DescribeLunaClientRequest = (input: DescribeLunaClientRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateFingerprint != null && { CertificateFingerprint: input.CertificateFingerprint }), - ...(input.ClientArn != null && { ClientArn: input.ClientArn }), - }; -}; +// se_DescribeLunaClientRequest omitted. -/** - * serializeAws_json1_1GetConfigRequest - */ -const se_GetConfigRequest = (input: GetConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ClientArn != null && { ClientArn: input.ClientArn }), - ...(input.ClientVersion != null && { ClientVersion: input.ClientVersion }), - ...(input.HapgList != null && { HapgList: se_HapgList(input.HapgList, context) }), - }; -}; +// se_GetConfigRequest omitted. -/** - * serializeAws_json1_1HapgList - */ -const se_HapgList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HapgList omitted. -/** - * serializeAws_json1_1ListAvailableZonesRequest - */ -const se_ListAvailableZonesRequest = (input: ListAvailableZonesRequest, context: __SerdeContext): any => { - return {}; -}; +// se_ListAvailableZonesRequest omitted. -/** - * serializeAws_json1_1ListHapgsRequest - */ -const se_ListHapgsRequest = (input: ListHapgsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHapgsRequest omitted. -/** - * serializeAws_json1_1ListHsmsRequest - */ -const se_ListHsmsRequest = (input: ListHsmsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHsmsRequest omitted. -/** - * serializeAws_json1_1ListLunaClientsRequest - */ -const se_ListLunaClientsRequest = (input: ListLunaClientsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLunaClientsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ModifyHapgRequest - */ -const se_ModifyHapgRequest = (input: ModifyHapgRequest, context: __SerdeContext): any => { - return { - ...(input.HapgArn != null && { HapgArn: input.HapgArn }), - ...(input.Label != null && { Label: input.Label }), - ...(input.PartitionSerialList != null && { - PartitionSerialList: se_PartitionSerialList(input.PartitionSerialList, context), - }), - }; -}; +// se_ModifyHapgRequest omitted. -/** - * serializeAws_json1_1ModifyHsmRequest - */ -const se_ModifyHsmRequest = (input: ModifyHsmRequest, context: __SerdeContext): any => { - return { - ...(input.EniIp != null && { EniIp: input.EniIp }), - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.HsmArn != null && { HsmArn: input.HsmArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.SyslogIp != null && { SyslogIp: input.SyslogIp }), - }; -}; +// se_ModifyHsmRequest omitted. -/** - * serializeAws_json1_1ModifyLunaClientRequest - */ -const se_ModifyLunaClientRequest = (input: ModifyLunaClientRequest, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.ClientArn != null && { ClientArn: input.ClientArn }), - }; -}; +// se_ModifyLunaClientRequest omitted. -/** - * serializeAws_json1_1PartitionSerialList - */ -const se_PartitionSerialList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PartitionSerialList omitted. -/** - * serializeAws_json1_1RemoveTagsFromResourceRequest - */ -const se_RemoveTagsFromResourceRequest = (input: RemoveTagsFromResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }), - }; -}; +// se_RemoveTagsFromResourceRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1AddTagsToResourceResponse - */ -const de_AddTagsToResourceResponse = (output: any, context: __SerdeContext): AddTagsToResourceResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_AddTagsToResourceResponse omitted. -/** - * deserializeAws_json1_1AZList - */ -const de_AZList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AZList omitted. -/** - * deserializeAws_json1_1ClientList - */ -const de_ClientList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ClientList omitted. -/** - * deserializeAws_json1_1CloudHsmInternalException - */ -const de_CloudHsmInternalException = (output: any, context: __SerdeContext): CloudHsmInternalException => { - return { - message: __expectString(output.message), - retryable: __expectBoolean(output.retryable), - } as any; -}; +// de_CloudHsmInternalException omitted. -/** - * deserializeAws_json1_1CloudHsmServiceException - */ -const de_CloudHsmServiceException = (output: any, context: __SerdeContext): CloudHsmServiceException => { - return { - message: __expectString(output.message), - retryable: __expectBoolean(output.retryable), - } as any; -}; +// de_CloudHsmServiceException omitted. -/** - * deserializeAws_json1_1CreateHapgResponse - */ -const de_CreateHapgResponse = (output: any, context: __SerdeContext): CreateHapgResponse => { - return { - HapgArn: __expectString(output.HapgArn), - } as any; -}; +// de_CreateHapgResponse omitted. -/** - * deserializeAws_json1_1CreateHsmResponse - */ -const de_CreateHsmResponse = (output: any, context: __SerdeContext): CreateHsmResponse => { - return { - HsmArn: __expectString(output.HsmArn), - } as any; -}; +// de_CreateHsmResponse omitted. -/** - * deserializeAws_json1_1CreateLunaClientResponse - */ -const de_CreateLunaClientResponse = (output: any, context: __SerdeContext): CreateLunaClientResponse => { - return { - ClientArn: __expectString(output.ClientArn), - } as any; -}; +// de_CreateLunaClientResponse omitted. -/** - * deserializeAws_json1_1DeleteHapgResponse - */ -const de_DeleteHapgResponse = (output: any, context: __SerdeContext): DeleteHapgResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteHapgResponse omitted. -/** - * deserializeAws_json1_1DeleteHsmResponse - */ -const de_DeleteHsmResponse = (output: any, context: __SerdeContext): DeleteHsmResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteHsmResponse omitted. -/** - * deserializeAws_json1_1DeleteLunaClientResponse - */ -const de_DeleteLunaClientResponse = (output: any, context: __SerdeContext): DeleteLunaClientResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteLunaClientResponse omitted. -/** - * deserializeAws_json1_1DescribeHapgResponse - */ -const de_DescribeHapgResponse = (output: any, context: __SerdeContext): DescribeHapgResponse => { - return { - HapgArn: __expectString(output.HapgArn), - HapgSerial: __expectString(output.HapgSerial), - HsmsLastActionFailed: - output.HsmsLastActionFailed != null ? de_HsmList(output.HsmsLastActionFailed, context) : undefined, - HsmsPendingDeletion: - output.HsmsPendingDeletion != null ? de_HsmList(output.HsmsPendingDeletion, context) : undefined, - HsmsPendingRegistration: - output.HsmsPendingRegistration != null ? de_HsmList(output.HsmsPendingRegistration, context) : undefined, - Label: __expectString(output.Label), - LastModifiedTimestamp: __expectString(output.LastModifiedTimestamp), - PartitionSerialList: - output.PartitionSerialList != null ? de_PartitionSerialList(output.PartitionSerialList, context) : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHsmResponse - */ -const de_DescribeHsmResponse = (output: any, context: __SerdeContext): DescribeHsmResponse => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - EniId: __expectString(output.EniId), - EniIp: __expectString(output.EniIp), - HsmArn: __expectString(output.HsmArn), - HsmType: __expectString(output.HsmType), - IamRoleArn: __expectString(output.IamRoleArn), - Partitions: output.Partitions != null ? de_PartitionList(output.Partitions, context) : undefined, - SerialNumber: __expectString(output.SerialNumber), - ServerCertLastUpdated: __expectString(output.ServerCertLastUpdated), - ServerCertUri: __expectString(output.ServerCertUri), - SoftwareVersion: __expectString(output.SoftwareVersion), - SshKeyLastUpdated: __expectString(output.SshKeyLastUpdated), - SshPublicKey: __expectString(output.SshPublicKey), - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - SubnetId: __expectString(output.SubnetId), - SubscriptionEndDate: __expectString(output.SubscriptionEndDate), - SubscriptionStartDate: __expectString(output.SubscriptionStartDate), - SubscriptionType: __expectString(output.SubscriptionType), - VendorName: __expectString(output.VendorName), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeLunaClientResponse - */ -const de_DescribeLunaClientResponse = (output: any, context: __SerdeContext): DescribeLunaClientResponse => { - return { - Certificate: __expectString(output.Certificate), - CertificateFingerprint: __expectString(output.CertificateFingerprint), - ClientArn: __expectString(output.ClientArn), - Label: __expectString(output.Label), - LastModifiedTimestamp: __expectString(output.LastModifiedTimestamp), - } as any; -}; +// de_DescribeHapgResponse omitted. -/** - * deserializeAws_json1_1GetConfigResponse - */ -const de_GetConfigResponse = (output: any, context: __SerdeContext): GetConfigResponse => { - return { - ConfigCred: __expectString(output.ConfigCred), - ConfigFile: __expectString(output.ConfigFile), - ConfigType: __expectString(output.ConfigType), - } as any; -}; +// de_DescribeHsmResponse omitted. -/** - * deserializeAws_json1_1HapgList - */ -const de_HapgList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DescribeLunaClientResponse omitted. -/** - * deserializeAws_json1_1HsmList - */ -const de_HsmList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GetConfigResponse omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - message: __expectString(output.message), - retryable: __expectBoolean(output.retryable), - } as any; -}; +// de_HapgList omitted. -/** - * deserializeAws_json1_1ListAvailableZonesResponse - */ -const de_ListAvailableZonesResponse = (output: any, context: __SerdeContext): ListAvailableZonesResponse => { - return { - AZList: output.AZList != null ? de_AZList(output.AZList, context) : undefined, - } as any; -}; +// de_HsmList omitted. -/** - * deserializeAws_json1_1ListHapgsResponse - */ -const de_ListHapgsResponse = (output: any, context: __SerdeContext): ListHapgsResponse => { - return { - HapgList: output.HapgList != null ? de_HapgList(output.HapgList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1ListHsmsResponse - */ -const de_ListHsmsResponse = (output: any, context: __SerdeContext): ListHsmsResponse => { - return { - HsmList: output.HsmList != null ? de_HsmList(output.HsmList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAvailableZonesResponse omitted. -/** - * deserializeAws_json1_1ListLunaClientsResponse - */ -const de_ListLunaClientsResponse = (output: any, context: __SerdeContext): ListLunaClientsResponse => { - return { - ClientList: output.ClientList != null ? de_ClientList(output.ClientList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListHapgsResponse omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_ListHsmsResponse omitted. -/** - * deserializeAws_json1_1ModifyHapgResponse - */ -const de_ModifyHapgResponse = (output: any, context: __SerdeContext): ModifyHapgResponse => { - return { - HapgArn: __expectString(output.HapgArn), - } as any; -}; +// de_ListLunaClientsResponse omitted. -/** - * deserializeAws_json1_1ModifyHsmResponse - */ -const de_ModifyHsmResponse = (output: any, context: __SerdeContext): ModifyHsmResponse => { - return { - HsmArn: __expectString(output.HsmArn), - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1ModifyLunaClientResponse - */ -const de_ModifyLunaClientResponse = (output: any, context: __SerdeContext): ModifyLunaClientResponse => { - return { - ClientArn: __expectString(output.ClientArn), - } as any; -}; +// de_ModifyHapgResponse omitted. -/** - * deserializeAws_json1_1PartitionList - */ -const de_PartitionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ModifyHsmResponse omitted. -/** - * deserializeAws_json1_1PartitionSerialList - */ -const de_PartitionSerialList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ModifyLunaClientResponse omitted. -/** - * deserializeAws_json1_1RemoveTagsFromResourceResponse - */ -const de_RemoveTagsFromResourceResponse = (output: any, context: __SerdeContext): RemoveTagsFromResourceResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_PartitionList omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_PartitionSerialList omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_RemoveTagsFromResourceResponse omitted. + +// de_Tag omitted. + +// de_TagList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2091,6 +1540,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudsearch-domain/src/protocols/Aws_restJson1.ts b/clients/client-cloudsearch-domain/src/protocols/Aws_restJson1.ts index 49d120e76beb..f86923a71a04 100644 --- a/clients/client-cloudsearch-domain/src/protocols/Aws_restJson1.ts +++ b/clients/client-cloudsearch-domain/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -8,8 +9,9 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -21,20 +23,7 @@ import { SearchCommandInput, SearchCommandOutput } from "../commands/SearchComma import { SuggestCommandInput, SuggestCommandOutput } from "../commands/SuggestCommand"; import { UploadDocumentsCommandInput, UploadDocumentsCommandOutput } from "../commands/UploadDocumentsCommand"; import { CloudSearchDomainServiceException as __BaseException } from "../models/CloudSearchDomainServiceException"; -import { - Bucket, - BucketInfo, - DocumentServiceException, - DocumentServiceWarning, - FieldStats, - Hit, - Hits, - SearchException, - SearchStatus, - SuggestionMatch, - SuggestModel, - SuggestStatus, -} from "../models/models_0"; +import { DocumentServiceException, FieldStats, SearchException } from "../models/models_0"; /** * serializeAws_restJson1SearchCommand @@ -150,18 +139,13 @@ export const de_SearchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.facets != null) { - contents.facets = de_Facets(data.facets, context); - } - if (data.hits != null) { - contents.hits = de_Hits(data.hits, context); - } - if (data.stats != null) { - contents.stats = de_Stats(data.stats, context); - } - if (data.status != null) { - contents.status = de_SearchStatus(data.status, context); - } + const doc = take(data, { + facets: _json, + hits: _json, + stats: (_) => de_Stats(_, context), + status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -180,10 +164,9 @@ const de_SearchCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_SearchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -203,12 +186,11 @@ export const de_SuggestCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = de_SuggestStatus(data.status, context); - } - if (data.suggest != null) { - contents.suggest = de_SuggestModel(data.suggest, context); - } + const doc = take(data, { + status: _json, + suggest: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -230,10 +212,9 @@ const de_SuggestCommandError = async ( throw await de_SearchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -253,18 +234,13 @@ export const de_UploadDocumentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adds != null) { - contents.adds = __expectLong(data.adds); - } - if (data.deletes != null) { - contents.deletes = __expectLong(data.deletes); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.warnings != null) { - contents.warnings = de_DocumentServiceWarnings(data.warnings, context); - } + const doc = take(data, { + adds: __expectLong, + deletes: __expectLong, + status: __expectString, + warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -286,16 +262,15 @@ const de_UploadDocumentsCommandError = async ( throw await de_DocumentServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1DocumentServiceExceptionRes */ @@ -305,12 +280,11 @@ const de_DocumentServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + message: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); const exception = new DocumentServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -324,9 +298,10 @@ const de_DocumentServiceExceptionRes = async ( const de_SearchExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SearchException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -334,195 +309,49 @@ const de_SearchExceptionRes = async (parsedOutput: any, context: __SerdeContext) return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1Bucket - */ -const de_Bucket = (output: any, context: __SerdeContext): Bucket => { - return { - count: __expectLong(output.count), - value: __expectString(output.value), - } as any; -}; +// de_Bucket omitted. -/** - * deserializeAws_restJson1BucketInfo - */ -const de_BucketInfo = (output: any, context: __SerdeContext): BucketInfo => { - return { - buckets: output.buckets != null ? de_BucketList(output.buckets, context) : undefined, - } as any; -}; +// de_BucketInfo omitted. -/** - * deserializeAws_restJson1BucketList - */ -const de_BucketList = (output: any, context: __SerdeContext): Bucket[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Bucket(entry, context); - }); - return retVal; -}; +// de_BucketList omitted. -/** - * deserializeAws_restJson1DocumentServiceWarning - */ -const de_DocumentServiceWarning = (output: any, context: __SerdeContext): DocumentServiceWarning => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DocumentServiceWarning omitted. -/** - * deserializeAws_restJson1DocumentServiceWarnings - */ -const de_DocumentServiceWarnings = (output: any, context: __SerdeContext): DocumentServiceWarning[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentServiceWarning(entry, context); - }); - return retVal; -}; +// de_DocumentServiceWarnings omitted. -/** - * deserializeAws_restJson1Exprs - */ -const de_Exprs = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Exprs omitted. -/** - * deserializeAws_restJson1Facets - */ -const de_Facets = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_BucketInfo(value, context); - return acc; - }, {}); -}; +// de_Facets omitted. -/** - * deserializeAws_restJson1Fields - */ -const de_Fields = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FieldValue(value, context); - return acc; - }, {}); -}; +// de_Fields omitted. /** * deserializeAws_restJson1FieldStats */ const de_FieldStats = (output: any, context: __SerdeContext): FieldStats => { - return { - count: __expectLong(output.count), - max: __expectString(output.max), - mean: __expectString(output.mean), - min: __expectString(output.min), - missing: __expectLong(output.missing), - stddev: __limitedParseDouble(output.stddev), - sum: __limitedParseDouble(output.sum), - sumOfSquares: __limitedParseDouble(output.sumOfSquares), - } as any; + return take(output, { + count: __expectLong, + max: __expectString, + mean: __expectString, + min: __expectString, + missing: __expectLong, + stddev: __limitedParseDouble, + sum: __limitedParseDouble, + sumOfSquares: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1FieldValue - */ -const de_FieldValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FieldValue omitted. -/** - * deserializeAws_restJson1Highlights - */ -const de_Highlights = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Highlights omitted. -/** - * deserializeAws_restJson1Hit - */ -const de_Hit = (output: any, context: __SerdeContext): Hit => { - return { - exprs: output.exprs != null ? de_Exprs(output.exprs, context) : undefined, - fields: output.fields != null ? de_Fields(output.fields, context) : undefined, - highlights: output.highlights != null ? de_Highlights(output.highlights, context) : undefined, - id: __expectString(output.id), - } as any; -}; +// de_Hit omitted. -/** - * deserializeAws_restJson1HitList - */ -const de_HitList = (output: any, context: __SerdeContext): Hit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Hit(entry, context); - }); - return retVal; -}; +// de_HitList omitted. -/** - * deserializeAws_restJson1Hits - */ -const de_Hits = (output: any, context: __SerdeContext): Hits => { - return { - cursor: __expectString(output.cursor), - found: __expectLong(output.found), - hit: output.hit != null ? de_HitList(output.hit, context) : undefined, - start: __expectLong(output.start), - } as any; -}; +// de_Hits omitted. -/** - * deserializeAws_restJson1SearchStatus - */ -const de_SearchStatus = (output: any, context: __SerdeContext): SearchStatus => { - return { - rid: __expectString(output.rid), - timems: __expectLong(output.timems), - } as any; -}; +// de_SearchStatus omitted. /** * deserializeAws_restJson1Stats @@ -537,52 +366,13 @@ const de_Stats = (output: any, context: __SerdeContext): Record { - return { - id: __expectString(output.id), - score: __expectLong(output.score), - suggestion: __expectString(output.suggestion), - } as any; -}; +// de_SuggestionMatch omitted. -/** - * deserializeAws_restJson1Suggestions - */ -const de_Suggestions = (output: any, context: __SerdeContext): SuggestionMatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SuggestionMatch(entry, context); - }); - return retVal; -}; +// de_Suggestions omitted. -/** - * deserializeAws_restJson1SuggestModel - */ -const de_SuggestModel = (output: any, context: __SerdeContext): SuggestModel => { - return { - found: __expectLong(output.found), - query: __expectString(output.query), - suggestions: output.suggestions != null ? de_Suggestions(output.suggestions, context) : undefined, - } as any; -}; +// de_SuggestModel omitted. -/** - * deserializeAws_restJson1SuggestStatus - */ -const de_SuggestStatus = (output: any, context: __SerdeContext): SuggestStatus => { - return { - rid: __expectString(output.rid), - timems: __expectLong(output.timems), - } as any; -}; +// de_SuggestStatus omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-cloudsearch/src/protocols/Aws_query.ts b/clients/client-cloudsearch/src/protocols/Aws_query.ts index eae6bb99559f..81244a30daa5 100644 --- a/clients/client-cloudsearch/src/protocols/Aws_query.ts +++ b/clients/client-cloudsearch/src/protocols/Aws_query.ts @@ -13,7 +13,7 @@ import { strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -639,7 +639,7 @@ export const de_BuildSuggestersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -669,10 +669,9 @@ const de_BuildSuggestersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -695,7 +694,7 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -728,10 +727,9 @@ const de_CreateDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -754,7 +752,7 @@ export const de_DefineAnalysisSchemeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -790,10 +788,9 @@ const de_DefineAnalysisSchemeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -816,7 +813,7 @@ export const de_DefineExpressionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -852,10 +849,9 @@ const de_DefineExpressionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -878,7 +874,7 @@ export const de_DefineIndexFieldCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -914,10 +910,9 @@ const de_DefineIndexFieldCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -940,7 +935,7 @@ export const de_DefineSuggesterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -976,10 +971,9 @@ const de_DefineSuggesterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1002,7 +996,7 @@ export const de_DeleteAnalysisSchemeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1035,10 +1029,9 @@ const de_DeleteAnalysisSchemeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1061,7 +1054,7 @@ export const de_DeleteDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1085,10 +1078,9 @@ const de_DeleteDomainCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1111,7 +1103,7 @@ export const de_DeleteExpressionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1144,10 +1136,9 @@ const de_DeleteExpressionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1170,7 +1161,7 @@ export const de_DeleteIndexFieldCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1203,10 +1194,9 @@ const de_DeleteIndexFieldCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,7 +1219,7 @@ export const de_DeleteSuggesterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1262,10 +1252,9 @@ const de_DeleteSuggesterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1288,7 +1277,7 @@ export const de_DescribeAnalysisSchemesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1315,10 +1304,9 @@ const de_DescribeAnalysisSchemesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1341,7 +1329,7 @@ export const de_DescribeAvailabilityOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1377,10 +1365,9 @@ const de_DescribeAvailabilityOptionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1403,7 +1390,7 @@ export const de_DescribeDomainEndpointOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1436,10 +1423,9 @@ const de_DescribeDomainEndpointOptionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1462,7 +1448,7 @@ export const de_DescribeDomainsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1486,10 +1472,9 @@ const de_DescribeDomainsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1512,7 +1497,7 @@ export const de_DescribeExpressionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1539,10 +1524,9 @@ const de_DescribeExpressionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1565,7 +1549,7 @@ export const de_DescribeIndexFieldsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1592,10 +1576,9 @@ const de_DescribeIndexFieldsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1618,7 +1601,7 @@ export const de_DescribeScalingParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1645,10 +1628,9 @@ const de_DescribeScalingParametersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1671,7 +1653,7 @@ export const de_DescribeServiceAccessPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1698,10 +1680,9 @@ const de_DescribeServiceAccessPoliciesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1724,7 +1705,7 @@ export const de_DescribeSuggestersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1751,10 +1732,9 @@ const de_DescribeSuggestersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1777,7 +1757,7 @@ export const de_IndexDocumentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1807,10 +1787,9 @@ const de_IndexDocumentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1833,7 +1812,7 @@ export const de_ListDomainNamesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1854,10 +1833,9 @@ const de_ListDomainNamesCommandError = async ( throw await de_BaseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1880,7 +1858,7 @@ export const de_UpdateAvailabilityOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1919,10 +1897,9 @@ const de_UpdateAvailabilityOptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1945,7 +1922,7 @@ export const de_UpdateDomainEndpointOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1984,10 +1961,9 @@ const de_UpdateDomainEndpointOptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,7 +1986,7 @@ export const de_UpdateScalingParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2046,10 +2022,9 @@ const de_UpdateScalingParametersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2072,7 +2047,7 @@ export const de_UpdateServiceAccessPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2108,10 +2083,9 @@ const de_UpdateServiceAccessPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4369,6 +4343,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudtrail-data/src/protocols/Aws_restJson1.ts b/clients/client-cloudtrail-data/src/protocols/Aws_restJson1.ts index 4781c39da512..6ee8360f25c8 100644 --- a/clients/client-cloudtrail-data/src/protocols/Aws_restJson1.ts +++ b/clients/client-cloudtrail-data/src/protocols/Aws_restJson1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -19,13 +21,11 @@ import { PutAuditEventsCommandInput, PutAuditEventsCommandOutput } from "../comm import { CloudTrailDataServiceException as __BaseException } from "../models/CloudTrailDataServiceException"; import { AuditEvent, - AuditEventResultEntry, ChannelInsufficientPermission, ChannelNotFound, ChannelUnsupportedSchema, DuplicatedAuditEventId, InvalidChannelARN, - ResultErrorEntry, UnsupportedOperationException, } from "../models/models_0"; @@ -46,9 +46,11 @@ export const se_PutAuditEventsCommand = async ( externalId: [, input.externalId!], }); let body: any; - body = JSON.stringify({ - ...(input.auditEvents != null && { auditEvents: se_AuditEvents(input.auditEvents, context) }), - }); + body = JSON.stringify( + take(input, { + auditEvents: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -75,12 +77,11 @@ export const de_PutAuditEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failed != null) { - contents.failed = de_ResultErrorEntries(data.failed, context); - } - if (data.successful != null) { - contents.successful = de_AuditEventResultEntries(data.successful, context); - } + const doc = take(data, { + failed: _json, + successful: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -117,16 +118,15 @@ const de_PutAuditEventsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ChannelInsufficientPermissionRes */ @@ -136,9 +136,10 @@ const de_ChannelInsufficientPermissionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ChannelInsufficientPermission({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -152,9 +153,10 @@ const de_ChannelInsufficientPermissionRes = async ( const de_ChannelNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ChannelNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -171,9 +173,10 @@ const de_ChannelUnsupportedSchemaRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ChannelUnsupportedSchema({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -190,9 +193,10 @@ const de_DuplicatedAuditEventIdRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DuplicatedAuditEventId({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -206,9 +210,10 @@ const de_DuplicatedAuditEventIdRes = async ( const de_InvalidChannelARNRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidChannelARN({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -225,9 +230,10 @@ const de_UnsupportedOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -235,78 +241,17 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AuditEvent - */ -const se_AuditEvent = (input: AuditEvent, context: __SerdeContext): any => { - return { - ...(input.eventData != null && { eventData: input.eventData }), - ...(input.eventDataChecksum != null && { eventDataChecksum: input.eventDataChecksum }), - ...(input.id != null && { id: input.id }), - }; -}; +// se_AuditEvent omitted. -/** - * serializeAws_restJson1AuditEvents - */ -const se_AuditEvents = (input: AuditEvent[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AuditEvent(entry, context); - }); -}; +// se_AuditEvents omitted. -/** - * deserializeAws_restJson1AuditEventResultEntries - */ -const de_AuditEventResultEntries = (output: any, context: __SerdeContext): AuditEventResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuditEventResultEntry(entry, context); - }); - return retVal; -}; +// de_AuditEventResultEntries omitted. -/** - * deserializeAws_restJson1AuditEventResultEntry - */ -const de_AuditEventResultEntry = (output: any, context: __SerdeContext): AuditEventResultEntry => { - return { - eventID: __expectString(output.eventID), - id: __expectString(output.id), - } as any; -}; +// de_AuditEventResultEntry omitted. -/** - * deserializeAws_restJson1ResultErrorEntries - */ -const de_ResultErrorEntries = (output: any, context: __SerdeContext): ResultErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultErrorEntry(entry, context); - }); - return retVal; -}; +// de_ResultErrorEntries omitted. -/** - * deserializeAws_restJson1ResultErrorEntry - */ -const de_ResultErrorEntry = (output: any, context: __SerdeContext): ResultErrorEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - id: __expectString(output.id), - } as any; -}; +// de_ResultErrorEntry omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-cloudtrail/src/protocols/Aws_json1_1.ts b/clients/client-cloudtrail/src/protocols/Aws_json1_1.ts index 67da0ceaba82..1ff6b2ec4365 100644 --- a/clients/client-cloudtrail/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudtrail/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -99,13 +101,10 @@ import { AccountNotRegisteredException, AccountRegisteredException, AddTagsRequest, - AddTagsResponse, AdvancedEventSelector, AdvancedFieldSelector, CancelQueryRequest, - CancelQueryResponse, CannotDelegateManagementAccountException, - Channel, ChannelAlreadyExistsException, ChannelARNInvalidException, ChannelExistsForEDSException, @@ -117,27 +116,19 @@ import { CloudWatchLogsDeliveryUnavailableException, ConflictException, CreateChannelRequest, - CreateChannelResponse, CreateEventDataStoreRequest, CreateEventDataStoreResponse, CreateTrailRequest, - CreateTrailResponse, DataResource, DelegatedAdminAccountLimitExceededException, DeleteChannelRequest, - DeleteChannelResponse, DeleteEventDataStoreRequest, - DeleteEventDataStoreResponse, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DeleteTrailRequest, - DeleteTrailResponse, DeregisterOrganizationDelegatedAdminRequest, - DeregisterOrganizationDelegatedAdminResponse, DescribeQueryRequest, DescribeQueryResponse, DescribeTrailsRequest, - DescribeTrailsResponse, Destination, Event, EventDataStore, @@ -153,24 +144,18 @@ import { GetEventDataStoreRequest, GetEventDataStoreResponse, GetEventSelectorsRequest, - GetEventSelectorsResponse, GetImportRequest, GetImportResponse, GetInsightSelectorsRequest, - GetInsightSelectorsResponse, GetQueryResultsRequest, - GetQueryResultsResponse, GetResourcePolicyRequest, - GetResourcePolicyResponse, GetTrailRequest, - GetTrailResponse, GetTrailStatusRequest, GetTrailStatusResponse, ImportFailureListItem, ImportNotFoundException, ImportsListItem, ImportSource, - ImportStatistics, InactiveEventDataStoreException, InactiveQueryException, IngestionStatus, @@ -210,7 +195,6 @@ import { KmsKeyDisabledException, KmsKeyNotFoundException, ListChannelsRequest, - ListChannelsResponse, ListEventDataStoresRequest, ListEventDataStoresResponse, ListImportFailuresRequest, @@ -222,9 +206,7 @@ import { ListQueriesRequest, ListQueriesResponse, ListTagsRequest, - ListTagsResponse, ListTrailsRequest, - ListTrailsResponse, LookupAttribute, LookupEventsRequest, LookupEventsResponse, @@ -238,55 +220,39 @@ import { OrganizationsNotInUseException, PublicKey, PutEventSelectorsRequest, - PutEventSelectorsResponse, PutInsightSelectorsRequest, - PutInsightSelectorsResponse, PutResourcePolicyRequest, - PutResourcePolicyResponse, Query, QueryIdNotFoundException, - QueryStatistics, QueryStatisticsForDescribeQuery, RegisterOrganizationDelegatedAdminRequest, - RegisterOrganizationDelegatedAdminResponse, RemoveTagsRequest, - RemoveTagsResponse, - Resource, ResourceARNNotValidException, ResourceNotFoundException, ResourcePolicyNotFoundException, ResourcePolicyNotValidException, - ResourceTag, ResourceTypeNotSupportedException, RestoreEventDataStoreRequest, RestoreEventDataStoreResponse, S3BucketDoesNotExistException, S3ImportSource, - SourceConfig, StartImportRequest, StartImportResponse, StartLoggingRequest, - StartLoggingResponse, StartQueryRequest, - StartQueryResponse, StopImportRequest, StopImportResponse, StopLoggingRequest, - StopLoggingResponse, Tag, TagsLimitExceededException, - Trail, TrailAlreadyExistsException, - TrailInfo, TrailNotFoundException, TrailNotProvidedException, UnsupportedOperationException, UpdateChannelRequest, - UpdateChannelResponse, UpdateEventDataStoreRequest, UpdateEventDataStoreResponse, UpdateTrailRequest, - UpdateTrailResponse, } from "../models/models_0"; /** @@ -298,7 +264,7 @@ export const se_AddTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTags"); let body: any; - body = JSON.stringify(se_AddTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -311,7 +277,7 @@ export const se_CancelQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelQuery"); let body: any; - body = JSON.stringify(se_CancelQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +290,7 @@ export const se_CreateChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateChannel"); let body: any; - body = JSON.stringify(se_CreateChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +303,7 @@ export const se_CreateEventDataStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEventDataStore"); let body: any; - body = JSON.stringify(se_CreateEventDataStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +316,7 @@ export const se_CreateTrailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTrail"); let body: any; - body = JSON.stringify(se_CreateTrailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +329,7 @@ export const se_DeleteChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteChannel"); let body: any; - body = JSON.stringify(se_DeleteChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +342,7 @@ export const se_DeleteEventDataStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventDataStore"); let body: any; - body = JSON.stringify(se_DeleteEventDataStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +355,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +368,7 @@ export const se_DeleteTrailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTrail"); let body: any; - body = JSON.stringify(se_DeleteTrailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +381,7 @@ export const se_DeregisterOrganizationDelegatedAdminCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterOrganizationDelegatedAdmin"); let body: any; - body = JSON.stringify(se_DeregisterOrganizationDelegatedAdminRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -428,7 +394,7 @@ export const se_DescribeQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeQuery"); let body: any; - body = JSON.stringify(se_DescribeQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,7 +407,7 @@ export const se_DescribeTrailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrails"); let body: any; - body = JSON.stringify(se_DescribeTrailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -454,7 +420,7 @@ export const se_GetChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetChannel"); let body: any; - body = JSON.stringify(se_GetChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -467,7 +433,7 @@ export const se_GetEventDataStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEventDataStore"); let body: any; - body = JSON.stringify(se_GetEventDataStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -480,7 +446,7 @@ export const se_GetEventSelectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEventSelectors"); let body: any; - body = JSON.stringify(se_GetEventSelectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -493,7 +459,7 @@ export const se_GetImportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetImport"); let body: any; - body = JSON.stringify(se_GetImportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -506,7 +472,7 @@ export const se_GetInsightSelectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInsightSelectors"); let body: any; - body = JSON.stringify(se_GetInsightSelectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -519,7 +485,7 @@ export const se_GetQueryResultsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueryResults"); let body: any; - body = JSON.stringify(se_GetQueryResultsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -532,7 +498,7 @@ export const se_GetResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); let body: any; - body = JSON.stringify(se_GetResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +511,7 @@ export const se_GetTrailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTrail"); let body: any; - body = JSON.stringify(se_GetTrailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -558,7 +524,7 @@ export const se_GetTrailStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTrailStatus"); let body: any; - body = JSON.stringify(se_GetTrailStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -571,7 +537,7 @@ export const se_ListChannelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListChannels"); let body: any; - body = JSON.stringify(se_ListChannelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +550,7 @@ export const se_ListEventDataStoresCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventDataStores"); let body: any; - body = JSON.stringify(se_ListEventDataStoresRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +563,7 @@ export const se_ListImportFailuresCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListImportFailures"); let body: any; - body = JSON.stringify(se_ListImportFailuresRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +576,7 @@ export const se_ListImportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListImports"); let body: any; - body = JSON.stringify(se_ListImportsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +615,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +628,7 @@ export const se_ListTrailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTrails"); let body: any; - body = JSON.stringify(se_ListTrailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -688,7 +654,7 @@ export const se_PutEventSelectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutEventSelectors"); let body: any; - body = JSON.stringify(se_PutEventSelectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -701,7 +667,7 @@ export const se_PutInsightSelectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutInsightSelectors"); let body: any; - body = JSON.stringify(se_PutInsightSelectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -714,7 +680,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -727,7 +693,7 @@ export const se_RegisterOrganizationDelegatedAdminCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterOrganizationDelegatedAdmin"); let body: any; - body = JSON.stringify(se_RegisterOrganizationDelegatedAdminRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -740,7 +706,7 @@ export const se_RemoveTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTags"); let body: any; - body = JSON.stringify(se_RemoveTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -753,7 +719,7 @@ export const se_RestoreEventDataStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreEventDataStore"); let body: any; - body = JSON.stringify(se_RestoreEventDataStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -779,7 +745,7 @@ export const se_StartLoggingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartLogging"); let body: any; - body = JSON.stringify(se_StartLoggingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -792,7 +758,7 @@ export const se_StartQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartQuery"); let body: any; - body = JSON.stringify(se_StartQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -805,7 +771,7 @@ export const se_StopImportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopImport"); let body: any; - body = JSON.stringify(se_StopImportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -818,7 +784,7 @@ export const se_StopLoggingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopLogging"); let body: any; - body = JSON.stringify(se_StopLoggingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -831,7 +797,7 @@ export const se_UpdateChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateChannel"); let body: any; - body = JSON.stringify(se_UpdateChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -844,7 +810,7 @@ export const se_UpdateEventDataStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEventDataStore"); let body: any; - body = JSON.stringify(se_UpdateEventDataStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -857,7 +823,7 @@ export const se_UpdateTrailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTrail"); let body: any; - body = JSON.stringify(se_UpdateTrailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -873,12 +839,12 @@ export const de_AddTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsResponse(data, context); + contents = _json(data); const response: AddTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -938,10 +904,9 @@ const de_AddTagsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -959,12 +924,12 @@ export const de_CancelQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelQueryResponse(data, context); + contents = _json(data); const response: CancelQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1012,10 +977,9 @@ const de_CancelQueryCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1033,12 +997,12 @@ export const de_CreateChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateChannelResponse(data, context); + contents = _json(data); const response: CreateChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1092,10 +1056,9 @@ const de_CreateChannelCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1118,7 +1081,7 @@ export const de_CreateEventDataStoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1190,10 +1153,9 @@ const de_CreateEventDataStoreCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1211,12 +1173,12 @@ export const de_CreateTrailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTrailResponse(data, context); + contents = _json(data); const response: CreateTrailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1327,10 +1289,9 @@ const de_CreateTrailCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1348,12 +1309,12 @@ export const de_DeleteChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteChannelResponse(data, context); + contents = _json(data); const response: DeleteChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1383,10 +1344,9 @@ const de_DeleteChannelCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1404,12 +1364,12 @@ export const de_DeleteEventDataStoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEventDataStoreResponse(data, context); + contents = _json(data); const response: DeleteEventDataStoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1463,10 +1423,9 @@ const de_DeleteEventDataStoreCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1484,12 +1443,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1525,10 +1484,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,12 +1504,12 @@ export const de_DeleteTrailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTrailResponse(data, context); + contents = _json(data); const response: DeleteTrailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1599,10 +1557,9 @@ const de_DeleteTrailCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1620,12 +1577,12 @@ export const de_DeregisterOrganizationDelegatedAdminCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterOrganizationDelegatedAdminResponse(data, context); + contents = _json(data); const response: DeregisterOrganizationDelegatedAdminCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1676,10 +1633,9 @@ const de_DeregisterOrganizationDelegatedAdminCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1702,7 +1658,7 @@ export const de_DescribeQueryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1744,10 +1700,9 @@ const de_DescribeQueryCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1765,12 +1720,12 @@ export const de_DescribeTrailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTrailsResponse(data, context); + contents = _json(data); const response: DescribeTrailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1800,10 +1755,9 @@ const de_DescribeTrailsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1826,7 +1780,7 @@ export const de_GetChannelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1856,10 +1810,9 @@ const de_GetChannelCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1882,7 +1835,7 @@ export const de_GetEventDataStoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1918,10 +1871,9 @@ const de_GetEventDataStoreCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1939,12 +1891,12 @@ export const de_GetEventSelectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetEventSelectorsResponse(data, context); + contents = _json(data); const response: GetEventSelectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1980,10 +1932,9 @@ const de_GetEventSelectorsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2006,7 +1957,7 @@ export const de_GetImportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2036,10 +1987,9 @@ const de_GetImportCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2057,12 +2007,12 @@ export const de_GetInsightSelectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInsightSelectorsResponse(data, context); + contents = _json(data); const response: GetInsightSelectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2101,10 +2051,9 @@ const de_GetInsightSelectorsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2122,12 +2071,12 @@ export const de_GetQueryResultsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetQueryResultsResponse(data, context); + contents = _json(data); const response: GetQueryResultsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2178,10 +2127,9 @@ const de_GetQueryResultsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2199,12 +2147,12 @@ export const de_GetResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcePolicyResponse(data, context); + contents = _json(data); const response: GetResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2240,10 +2188,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,12 +2208,12 @@ export const de_GetTrailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTrailResponse(data, context); + contents = _json(data); const response: GetTrailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2299,10 +2246,9 @@ const de_GetTrailCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2325,7 +2271,7 @@ export const de_GetTrailStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2358,10 +2304,9 @@ const de_GetTrailStatusCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2379,12 +2324,12 @@ export const de_ListChannelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListChannelsResponse(data, context); + contents = _json(data); const response: ListChannelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2411,10 +2356,9 @@ const de_ListChannelsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2437,7 +2381,7 @@ export const de_ListEventDataStoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2470,10 +2414,9 @@ const de_ListEventDataStoresCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2496,7 +2439,7 @@ export const de_ListImportFailuresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2523,10 +2466,9 @@ const de_ListImportFailuresCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2549,7 +2491,7 @@ export const de_ListImportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2582,10 +2524,9 @@ const de_ListImportsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2608,7 +2549,7 @@ export const de_ListPublicKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2638,10 +2579,9 @@ const de_ListPublicKeysCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2664,7 +2604,7 @@ export const de_ListQueriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2715,10 +2655,9 @@ const de_ListQueriesCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2736,12 +2675,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResponse(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2789,10 +2728,9 @@ const de_ListTagsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2810,12 +2748,12 @@ export const de_ListTrailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTrailsResponse(data, context); + contents = _json(data); const response: ListTrailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2839,10 +2777,9 @@ const de_ListTrailsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2865,7 +2802,7 @@ export const de_LookupEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2904,10 +2841,9 @@ const de_LookupEventsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2925,12 +2861,12 @@ export const de_PutEventSelectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutEventSelectorsResponse(data, context); + contents = _json(data); const response: PutEventSelectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2978,10 +2914,9 @@ const de_PutEventSelectorsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2999,12 +2934,12 @@ export const de_PutInsightSelectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutInsightSelectorsResponse(data, context); + contents = _json(data); const response: PutInsightSelectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3061,10 +2996,9 @@ const de_PutInsightSelectorsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3082,12 +3016,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3123,10 +3057,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3144,12 +3077,12 @@ export const de_RegisterOrganizationDelegatedAdminCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterOrganizationDelegatedAdminResponse(data, context); + contents = _json(data); const response: RegisterOrganizationDelegatedAdminCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3206,10 +3139,9 @@ const de_RegisterOrganizationDelegatedAdminCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3227,12 +3159,12 @@ export const de_RemoveTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsResponse(data, context); + contents = _json(data); const response: RemoveTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3286,10 +3218,9 @@ const de_RemoveTagsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3312,7 +3243,7 @@ export const de_RestoreEventDataStoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3369,10 +3300,9 @@ const de_RestoreEventDataStoreCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3395,7 +3325,7 @@ export const de_StartImportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3449,10 +3379,9 @@ const de_StartImportCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3470,12 +3399,12 @@ export const de_StartLoggingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartLoggingResponse(data, context); + contents = _json(data); const response: StartLoggingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3523,10 +3452,9 @@ const de_StartLoggingCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3544,12 +3472,12 @@ export const de_StartQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartQueryResponse(data, context); + contents = _json(data); const response: StartQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3609,10 +3537,9 @@ const de_StartQueryCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3635,7 +3562,7 @@ export const de_StopImportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3665,10 +3592,9 @@ const de_StopImportCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3686,12 +3612,12 @@ export const de_StopLoggingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopLoggingResponse(data, context); + contents = _json(data); const response: StopLoggingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3739,10 +3665,9 @@ const de_StopLoggingCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3760,12 +3685,12 @@ export const de_UpdateChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateChannelResponse(data, context); + contents = _json(data); const response: UpdateChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3813,10 +3738,9 @@ const de_UpdateChannelCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3839,7 +3763,7 @@ export const de_UpdateEventDataStoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3911,10 +3835,9 @@ const de_UpdateEventDataStoreCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3932,12 +3855,12 @@ export const de_UpdateTrailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTrailResponse(data, context); + contents = _json(data); const response: UpdateTrailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4051,10 +3974,9 @@ const de_UpdateTrailCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4068,7 +3990,7 @@ const de_AccountHasOngoingImportExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountHasOngoingImportException(body, context); + const deserialized: any = _json(body); const exception = new AccountHasOngoingImportException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4084,7 +4006,7 @@ const de_AccountNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AccountNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4100,7 +4022,7 @@ const de_AccountNotRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountNotRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new AccountNotRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4116,7 +4038,7 @@ const de_AccountRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new AccountRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4132,7 +4054,7 @@ const de_CannotDelegateManagementAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CannotDelegateManagementAccountException(body, context); + const deserialized: any = _json(body); const exception = new CannotDelegateManagementAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4148,7 +4070,7 @@ const de_ChannelAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ChannelAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ChannelAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4164,7 +4086,7 @@ const de_ChannelARNInvalidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ChannelARNInvalidException(body, context); + const deserialized: any = _json(body); const exception = new ChannelARNInvalidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4180,7 +4102,7 @@ const de_ChannelExistsForEDSExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ChannelExistsForEDSException(body, context); + const deserialized: any = _json(body); const exception = new ChannelExistsForEDSException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4196,7 +4118,7 @@ const de_ChannelMaxLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ChannelMaxLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ChannelMaxLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4212,7 +4134,7 @@ const de_ChannelNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ChannelNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ChannelNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4228,7 +4150,7 @@ const de_CloudTrailAccessNotEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudTrailAccessNotEnabledException(body, context); + const deserialized: any = _json(body); const exception = new CloudTrailAccessNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4244,7 +4166,7 @@ const de_CloudTrailARNInvalidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudTrailARNInvalidException(body, context); + const deserialized: any = _json(body); const exception = new CloudTrailARNInvalidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4260,7 +4182,7 @@ const de_CloudTrailInvalidClientTokenIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudTrailInvalidClientTokenIdException(body, context); + const deserialized: any = _json(body); const exception = new CloudTrailInvalidClientTokenIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4276,7 +4198,7 @@ const de_CloudWatchLogsDeliveryUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudWatchLogsDeliveryUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new CloudWatchLogsDeliveryUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4289,7 +4211,7 @@ const de_CloudWatchLogsDeliveryUnavailableExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4305,7 +4227,7 @@ const de_DelegatedAdminAccountLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DelegatedAdminAccountLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new DelegatedAdminAccountLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4321,7 +4243,7 @@ const de_EventDataStoreAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EventDataStoreAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new EventDataStoreAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4337,7 +4259,7 @@ const de_EventDataStoreARNInvalidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EventDataStoreARNInvalidException(body, context); + const deserialized: any = _json(body); const exception = new EventDataStoreARNInvalidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4353,7 +4275,7 @@ const de_EventDataStoreHasOngoingImportExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EventDataStoreHasOngoingImportException(body, context); + const deserialized: any = _json(body); const exception = new EventDataStoreHasOngoingImportException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4369,7 +4291,7 @@ const de_EventDataStoreMaxLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EventDataStoreMaxLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new EventDataStoreMaxLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4385,7 +4307,7 @@ const de_EventDataStoreNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EventDataStoreNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EventDataStoreNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4401,7 +4323,7 @@ const de_EventDataStoreTerminationProtectedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EventDataStoreTerminationProtectedException(body, context); + const deserialized: any = _json(body); const exception = new EventDataStoreTerminationProtectedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4417,7 +4339,7 @@ const de_ImportNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImportNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ImportNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4433,7 +4355,7 @@ const de_InactiveEventDataStoreExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InactiveEventDataStoreException(body, context); + const deserialized: any = _json(body); const exception = new InactiveEventDataStoreException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4449,7 +4371,7 @@ const de_InactiveQueryExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InactiveQueryException(body, context); + const deserialized: any = _json(body); const exception = new InactiveQueryException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4465,7 +4387,7 @@ const de_InsightNotEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsightNotEnabledException(body, context); + const deserialized: any = _json(body); const exception = new InsightNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4481,7 +4403,7 @@ const de_InsufficientDependencyServiceAccessPermissionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientDependencyServiceAccessPermissionException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientDependencyServiceAccessPermissionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4497,7 +4419,7 @@ const de_InsufficientEncryptionPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientEncryptionPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientEncryptionPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4513,7 +4435,7 @@ const de_InsufficientS3BucketPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientS3BucketPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientS3BucketPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4529,7 +4451,7 @@ const de_InsufficientSnsTopicPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientSnsTopicPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientSnsTopicPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4545,7 +4467,7 @@ const de_InvalidCloudWatchLogsLogGroupArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCloudWatchLogsLogGroupArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCloudWatchLogsLogGroupArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4561,7 +4483,7 @@ const de_InvalidCloudWatchLogsRoleArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCloudWatchLogsRoleArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCloudWatchLogsRoleArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4577,7 +4499,7 @@ const de_InvalidDateRangeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDateRangeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDateRangeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4593,7 +4515,7 @@ const de_InvalidEventCategoryExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEventCategoryException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEventCategoryException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4609,7 +4531,7 @@ const de_InvalidEventDataStoreCategoryExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEventDataStoreCategoryException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEventDataStoreCategoryException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4625,7 +4547,7 @@ const de_InvalidEventDataStoreStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEventDataStoreStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEventDataStoreStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4641,7 +4563,7 @@ const de_InvalidEventSelectorsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEventSelectorsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEventSelectorsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4657,7 +4579,7 @@ const de_InvalidHomeRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidHomeRegionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidHomeRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4673,7 +4595,7 @@ const de_InvalidImportSourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidImportSourceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidImportSourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4689,7 +4611,7 @@ const de_InvalidInsightSelectorsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInsightSelectorsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInsightSelectorsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4705,7 +4627,7 @@ const de_InvalidKmsKeyIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKmsKeyIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidKmsKeyIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4721,7 +4643,7 @@ const de_InvalidLookupAttributesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLookupAttributesException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLookupAttributesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4737,7 +4659,7 @@ const de_InvalidMaxResultsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMaxResultsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMaxResultsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4753,7 +4675,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4769,7 +4691,7 @@ const de_InvalidParameterCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4785,7 +4707,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4801,7 +4723,7 @@ const de_InvalidQueryStatementExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidQueryStatementException(body, context); + const deserialized: any = _json(body); const exception = new InvalidQueryStatementException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4817,7 +4739,7 @@ const de_InvalidQueryStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidQueryStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidQueryStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4833,7 +4755,7 @@ const de_InvalidS3BucketNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidS3BucketNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidS3BucketNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4849,7 +4771,7 @@ const de_InvalidS3PrefixExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidS3PrefixException(body, context); + const deserialized: any = _json(body); const exception = new InvalidS3PrefixException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4865,7 +4787,7 @@ const de_InvalidSnsTopicNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSnsTopicNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSnsTopicNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4881,7 +4803,7 @@ const de_InvalidSourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSourceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4897,7 +4819,7 @@ const de_InvalidTagParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4913,7 +4835,7 @@ const de_InvalidTimeRangeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTimeRangeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTimeRangeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4929,7 +4851,7 @@ const de_InvalidTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4945,7 +4867,7 @@ const de_InvalidTrailNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTrailNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTrailNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4958,7 +4880,7 @@ const de_InvalidTrailNameExceptionRes = async ( */ const de_KmsExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KmsException(body, context); + const deserialized: any = _json(body); const exception = new KmsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4974,7 +4896,7 @@ const de_KmsKeyDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KmsKeyDisabledException(body, context); + const deserialized: any = _json(body); const exception = new KmsKeyDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4990,7 +4912,7 @@ const de_KmsKeyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KmsKeyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new KmsKeyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5006,7 +4928,7 @@ const de_MaxConcurrentQueriesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxConcurrentQueriesException(body, context); + const deserialized: any = _json(body); const exception = new MaxConcurrentQueriesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5022,7 +4944,7 @@ const de_MaximumNumberOfTrailsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumNumberOfTrailsExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumNumberOfTrailsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5038,7 +4960,7 @@ const de_NoManagementAccountSLRExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoManagementAccountSLRExistsException(body, context); + const deserialized: any = _json(body); const exception = new NoManagementAccountSLRExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5054,7 +4976,7 @@ const de_NotOrganizationManagementAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotOrganizationManagementAccountException(body, context); + const deserialized: any = _json(body); const exception = new NotOrganizationManagementAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5070,7 +4992,7 @@ const de_NotOrganizationMasterAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotOrganizationMasterAccountException(body, context); + const deserialized: any = _json(body); const exception = new NotOrganizationMasterAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5086,7 +5008,7 @@ const de_OperationNotPermittedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotPermittedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotPermittedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5102,7 +5024,7 @@ const de_OrganizationNotInAllFeaturesModeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationNotInAllFeaturesModeException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationNotInAllFeaturesModeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5118,7 +5040,7 @@ const de_OrganizationsNotInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationsNotInUseException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationsNotInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5134,7 +5056,7 @@ const de_QueryIdNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_QueryIdNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new QueryIdNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5150,7 +5072,7 @@ const de_ResourceARNNotValidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceARNNotValidException(body, context); + const deserialized: any = _json(body); const exception = new ResourceARNNotValidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5166,7 +5088,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5182,7 +5104,7 @@ const de_ResourcePolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourcePolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourcePolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5198,7 +5120,7 @@ const de_ResourcePolicyNotValidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourcePolicyNotValidException(body, context); + const deserialized: any = _json(body); const exception = new ResourcePolicyNotValidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5214,7 +5136,7 @@ const de_ResourceTypeNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceTypeNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new ResourceTypeNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5230,7 +5152,7 @@ const de_S3BucketDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_S3BucketDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new S3BucketDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5246,7 +5168,7 @@ const de_TagsLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagsLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TagsLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5262,7 +5184,7 @@ const de_TrailAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TrailAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new TrailAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5278,7 +5200,7 @@ const de_TrailNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TrailNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TrailNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5294,7 +5216,7 @@ const de_TrailNotProvidedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TrailNotProvidedException(body, context); + const deserialized: any = _json(body); const exception = new TrailNotProvidedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5310,7 +5232,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5318,2905 +5240,894 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsRequest - */ -const se_AddTagsRequest = (input: AddTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagsList != null && { TagsList: se_TagsList(input.TagsList, context) }), - }; -}; +// se_AddTagsRequest omitted. -/** - * serializeAws_json1_1AdvancedEventSelector - */ -const se_AdvancedEventSelector = (input: AdvancedEventSelector, context: __SerdeContext): any => { - return { - ...(input.FieldSelectors != null && { FieldSelectors: se_AdvancedFieldSelectors(input.FieldSelectors, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_AdvancedEventSelector omitted. -/** - * serializeAws_json1_1AdvancedEventSelectors - */ -const se_AdvancedEventSelectors = (input: AdvancedEventSelector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdvancedEventSelector(entry, context); - }); -}; +// se_AdvancedEventSelectors omitted. -/** - * serializeAws_json1_1AdvancedFieldSelector - */ -const se_AdvancedFieldSelector = (input: AdvancedFieldSelector, context: __SerdeContext): any => { - return { - ...(input.EndsWith != null && { EndsWith: se_Operator(input.EndsWith, context) }), - ...(input.Equals != null && { Equals: se_Operator(input.Equals, context) }), - ...(input.Field != null && { Field: input.Field }), - ...(input.NotEndsWith != null && { NotEndsWith: se_Operator(input.NotEndsWith, context) }), - ...(input.NotEquals != null && { NotEquals: se_Operator(input.NotEquals, context) }), - ...(input.NotStartsWith != null && { NotStartsWith: se_Operator(input.NotStartsWith, context) }), - ...(input.StartsWith != null && { StartsWith: se_Operator(input.StartsWith, context) }), - }; -}; +// se_AdvancedFieldSelector omitted. -/** - * serializeAws_json1_1AdvancedFieldSelectors - */ -const se_AdvancedFieldSelectors = (input: AdvancedFieldSelector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdvancedFieldSelector(entry, context); - }); -}; +// se_AdvancedFieldSelectors omitted. -/** - * serializeAws_json1_1CancelQueryRequest - */ -const se_CancelQueryRequest = (input: CancelQueryRequest, context: __SerdeContext): any => { - return { - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - ...(input.QueryId != null && { QueryId: input.QueryId }), - }; -}; +// se_CancelQueryRequest omitted. -/** - * serializeAws_json1_1CreateChannelRequest - */ -const se_CreateChannelRequest = (input: CreateChannelRequest, context: __SerdeContext): any => { - return { - ...(input.Destinations != null && { Destinations: se_Destinations(input.Destinations, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - }; -}; +// se_CreateChannelRequest omitted. -/** - * serializeAws_json1_1CreateEventDataStoreRequest - */ -const se_CreateEventDataStoreRequest = (input: CreateEventDataStoreRequest, context: __SerdeContext): any => { - return { - ...(input.AdvancedEventSelectors != null && { - AdvancedEventSelectors: se_AdvancedEventSelectors(input.AdvancedEventSelectors, context), - }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MultiRegionEnabled != null && { MultiRegionEnabled: input.MultiRegionEnabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationEnabled != null && { OrganizationEnabled: input.OrganizationEnabled }), - ...(input.RetentionPeriod != null && { RetentionPeriod: input.RetentionPeriod }), - ...(input.TagsList != null && { TagsList: se_TagsList(input.TagsList, context) }), - ...(input.TerminationProtectionEnabled != null && { - TerminationProtectionEnabled: input.TerminationProtectionEnabled, - }), - }; -}; +// se_CreateEventDataStoreRequest omitted. -/** - * serializeAws_json1_1CreateTrailRequest - */ -const se_CreateTrailRequest = (input: CreateTrailRequest, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.CloudWatchLogsRoleArn != null && { CloudWatchLogsRoleArn: input.CloudWatchLogsRoleArn }), - ...(input.EnableLogFileValidation != null && { EnableLogFileValidation: input.EnableLogFileValidation }), - ...(input.IncludeGlobalServiceEvents != null && { IncludeGlobalServiceEvents: input.IncludeGlobalServiceEvents }), - ...(input.IsMultiRegionTrail != null && { IsMultiRegionTrail: input.IsMultiRegionTrail }), - ...(input.IsOrganizationTrail != null && { IsOrganizationTrail: input.IsOrganizationTrail }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - ...(input.SnsTopicName != null && { SnsTopicName: input.SnsTopicName }), - ...(input.TagsList != null && { TagsList: se_TagsList(input.TagsList, context) }), - }; -}; +// se_CreateTrailRequest omitted. -/** - * serializeAws_json1_1DataResource - */ -const se_DataResource = (input: DataResource, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Values != null && { Values: se_DataResourceValues(input.Values, context) }), - }; -}; +// se_DataResource omitted. -/** - * serializeAws_json1_1DataResources - */ -const se_DataResources = (input: DataResource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataResource(entry, context); - }); -}; +// se_DataResources omitted. -/** - * serializeAws_json1_1DataResourceValues - */ -const se_DataResourceValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataResourceValues omitted. -/** - * serializeAws_json1_1DeleteChannelRequest - */ -const se_DeleteChannelRequest = (input: DeleteChannelRequest, context: __SerdeContext): any => { - return { - ...(input.Channel != null && { Channel: input.Channel }), - }; -}; +// se_DeleteChannelRequest omitted. -/** - * serializeAws_json1_1DeleteEventDataStoreRequest - */ -const se_DeleteEventDataStoreRequest = (input: DeleteEventDataStoreRequest, context: __SerdeContext): any => { - return { - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - }; -}; +// se_DeleteEventDataStoreRequest omitted. -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * serializeAws_json1_1DeleteTrailRequest - */ -const se_DeleteTrailRequest = (input: DeleteTrailRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteTrailRequest omitted. -/** - * serializeAws_json1_1DeregisterOrganizationDelegatedAdminRequest - */ -const se_DeregisterOrganizationDelegatedAdminRequest = ( - input: DeregisterOrganizationDelegatedAdminRequest, - context: __SerdeContext -): any => { - return { - ...(input.DelegatedAdminAccountId != null && { DelegatedAdminAccountId: input.DelegatedAdminAccountId }), - }; -}; +// se_DeregisterOrganizationDelegatedAdminRequest omitted. -/** - * serializeAws_json1_1DescribeQueryRequest - */ -const se_DescribeQueryRequest = (input: DescribeQueryRequest, context: __SerdeContext): any => { - return { - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - ...(input.QueryId != null && { QueryId: input.QueryId }), - }; -}; +// se_DescribeQueryRequest omitted. -/** - * serializeAws_json1_1DescribeTrailsRequest - */ -const se_DescribeTrailsRequest = (input: DescribeTrailsRequest, context: __SerdeContext): any => { - return { - ...(input.includeShadowTrails != null && { includeShadowTrails: input.includeShadowTrails }), - ...(input.trailNameList != null && { trailNameList: se_TrailNameList(input.trailNameList, context) }), - }; -}; +// se_DescribeTrailsRequest omitted. -/** - * serializeAws_json1_1Destination - */ -const se_Destination = (input: Destination, context: __SerdeContext): any => { - return { - ...(input.Location != null && { Location: input.Location }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Destination omitted. -/** - * serializeAws_json1_1Destinations - */ -const se_Destinations = (input: Destination[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Destination(entry, context); - }); -}; +// se_Destinations omitted. -/** - * serializeAws_json1_1EventSelector - */ -const se_EventSelector = (input: EventSelector, context: __SerdeContext): any => { - return { - ...(input.DataResources != null && { DataResources: se_DataResources(input.DataResources, context) }), - ...(input.ExcludeManagementEventSources != null && { - ExcludeManagementEventSources: se_ExcludeManagementEventSources(input.ExcludeManagementEventSources, context), - }), - ...(input.IncludeManagementEvents != null && { IncludeManagementEvents: input.IncludeManagementEvents }), - ...(input.ReadWriteType != null && { ReadWriteType: input.ReadWriteType }), - }; -}; +// se_EventSelector omitted. -/** - * serializeAws_json1_1EventSelectors - */ -const se_EventSelectors = (input: EventSelector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EventSelector(entry, context); - }); -}; +// se_EventSelectors omitted. -/** - * serializeAws_json1_1ExcludeManagementEventSources - */ -const se_ExcludeManagementEventSources = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExcludeManagementEventSources omitted. -/** - * serializeAws_json1_1GetChannelRequest - */ -const se_GetChannelRequest = (input: GetChannelRequest, context: __SerdeContext): any => { - return { - ...(input.Channel != null && { Channel: input.Channel }), - }; -}; +// se_GetChannelRequest omitted. -/** - * serializeAws_json1_1GetEventDataStoreRequest - */ -const se_GetEventDataStoreRequest = (input: GetEventDataStoreRequest, context: __SerdeContext): any => { - return { - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - }; -}; +// se_GetEventDataStoreRequest omitted. -/** - * serializeAws_json1_1GetEventSelectorsRequest - */ -const se_GetEventSelectorsRequest = (input: GetEventSelectorsRequest, context: __SerdeContext): any => { - return { - ...(input.TrailName != null && { TrailName: input.TrailName }), - }; -}; +// se_GetEventSelectorsRequest omitted. -/** - * serializeAws_json1_1GetImportRequest - */ -const se_GetImportRequest = (input: GetImportRequest, context: __SerdeContext): any => { - return { - ...(input.ImportId != null && { ImportId: input.ImportId }), - }; -}; +// se_GetImportRequest omitted. -/** - * serializeAws_json1_1GetInsightSelectorsRequest - */ -const se_GetInsightSelectorsRequest = (input: GetInsightSelectorsRequest, context: __SerdeContext): any => { - return { - ...(input.TrailName != null && { TrailName: input.TrailName }), - }; -}; +// se_GetInsightSelectorsRequest omitted. -/** - * serializeAws_json1_1GetQueryResultsRequest - */ -const se_GetQueryResultsRequest = (input: GetQueryResultsRequest, context: __SerdeContext): any => { - return { - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - ...(input.MaxQueryResults != null && { MaxQueryResults: input.MaxQueryResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryId != null && { QueryId: input.QueryId }), - }; -}; +// se_GetQueryResultsRequest omitted. -/** - * serializeAws_json1_1GetResourcePolicyRequest - */ -const se_GetResourcePolicyRequest = (input: GetResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetResourcePolicyRequest omitted. -/** - * serializeAws_json1_1GetTrailRequest - */ -const se_GetTrailRequest = (input: GetTrailRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_GetTrailRequest omitted. -/** - * serializeAws_json1_1GetTrailStatusRequest - */ -const se_GetTrailStatusRequest = (input: GetTrailStatusRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_GetTrailStatusRequest omitted. -/** - * serializeAws_json1_1ImportDestinations - */ -const se_ImportDestinations = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ImportDestinations omitted. -/** - * serializeAws_json1_1ImportSource - */ -const se_ImportSource = (input: ImportSource, context: __SerdeContext): any => { - return { - ...(input.S3 != null && { S3: se_S3ImportSource(input.S3, context) }), - }; -}; +// se_ImportSource omitted. -/** - * serializeAws_json1_1InsightSelector - */ -const se_InsightSelector = (input: InsightSelector, context: __SerdeContext): any => { - return { - ...(input.InsightType != null && { InsightType: input.InsightType }), - }; -}; +// se_InsightSelector omitted. -/** - * serializeAws_json1_1InsightSelectors - */ -const se_InsightSelectors = (input: InsightSelector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InsightSelector(entry, context); - }); -}; +// se_InsightSelectors omitted. -/** - * serializeAws_json1_1ListChannelsRequest - */ -const se_ListChannelsRequest = (input: ListChannelsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListChannelsRequest omitted. -/** - * serializeAws_json1_1ListEventDataStoresRequest - */ -const se_ListEventDataStoresRequest = (input: ListEventDataStoresRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListEventDataStoresRequest omitted. -/** - * serializeAws_json1_1ListImportFailuresRequest - */ -const se_ListImportFailuresRequest = (input: ListImportFailuresRequest, context: __SerdeContext): any => { - return { - ...(input.ImportId != null && { ImportId: input.ImportId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListImportFailuresRequest omitted. -/** - * serializeAws_json1_1ListImportsRequest - */ -const se_ListImportsRequest = (input: ListImportsRequest, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.ImportStatus != null && { ImportStatus: input.ImportStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListImportsRequest omitted. /** * serializeAws_json1_1ListPublicKeysRequest */ const se_ListPublicKeysRequest = (input: ListPublicKeysRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1ListQueriesRequest */ const se_ListQueriesRequest = (input: ListQueriesRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryStatus != null && { QueryStatus: input.QueryStatus }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + EventDataStore: [], + MaxResults: [], + NextToken: [], + QueryStatus: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceIdList != null && { ResourceIdList: se_ResourceIdList(input.ResourceIdList, context) }), - }; -}; +// se_ListTagsRequest omitted. -/** - * serializeAws_json1_1ListTrailsRequest - */ -const se_ListTrailsRequest = (input: ListTrailsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTrailsRequest omitted. -/** - * serializeAws_json1_1LookupAttribute - */ -const se_LookupAttribute = (input: LookupAttribute, context: __SerdeContext): any => { - return { - ...(input.AttributeKey != null && { AttributeKey: input.AttributeKey }), - ...(input.AttributeValue != null && { AttributeValue: input.AttributeValue }), - }; -}; +// se_LookupAttribute omitted. -/** - * serializeAws_json1_1LookupAttributesList - */ -const se_LookupAttributesList = (input: LookupAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LookupAttribute(entry, context); - }); -}; +// se_LookupAttributesList omitted. /** * serializeAws_json1_1LookupEventsRequest */ const se_LookupEventsRequest = (input: LookupEventsRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.EventCategory != null && { EventCategory: input.EventCategory }), - ...(input.LookupAttributes != null && { - LookupAttributes: se_LookupAttributesList(input.LookupAttributes, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + EventCategory: [], + LookupAttributes: _json, + MaxResults: [], + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1Operator - */ -const se_Operator = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Operator omitted. + +// se_PutEventSelectorsRequest omitted. + +// se_PutInsightSelectorsRequest omitted. + +// se_PutResourcePolicyRequest omitted. + +// se_RegisterOrganizationDelegatedAdminRequest omitted. + +// se_RemoveTagsRequest omitted. + +// se_ResourceIdList omitted. + +// se_RestoreEventDataStoreRequest omitted. + +// se_S3ImportSource omitted. /** - * serializeAws_json1_1PutEventSelectorsRequest + * serializeAws_json1_1StartImportRequest */ -const se_PutEventSelectorsRequest = (input: PutEventSelectorsRequest, context: __SerdeContext): any => { - return { - ...(input.AdvancedEventSelectors != null && { - AdvancedEventSelectors: se_AdvancedEventSelectors(input.AdvancedEventSelectors, context), - }), - ...(input.EventSelectors != null && { EventSelectors: se_EventSelectors(input.EventSelectors, context) }), - ...(input.TrailName != null && { TrailName: input.TrailName }), - }; +const se_StartImportRequest = (input: StartImportRequest, context: __SerdeContext): any => { + return take(input, { + Destinations: _json, + EndEventTime: (_) => Math.round(_.getTime() / 1000), + ImportId: [], + ImportSource: _json, + StartEventTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1PutInsightSelectorsRequest - */ -const se_PutInsightSelectorsRequest = (input: PutInsightSelectorsRequest, context: __SerdeContext): any => { - return { - ...(input.InsightSelectors != null && { InsightSelectors: se_InsightSelectors(input.InsightSelectors, context) }), - ...(input.TrailName != null && { TrailName: input.TrailName }), - }; -}; - -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy }), - }; -}; - -/** - * serializeAws_json1_1RegisterOrganizationDelegatedAdminRequest - */ -const se_RegisterOrganizationDelegatedAdminRequest = ( - input: RegisterOrganizationDelegatedAdminRequest, - context: __SerdeContext -): any => { - return { - ...(input.MemberAccountId != null && { MemberAccountId: input.MemberAccountId }), - }; -}; - -/** - * serializeAws_json1_1RemoveTagsRequest - */ -const se_RemoveTagsRequest = (input: RemoveTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagsList != null && { TagsList: se_TagsList(input.TagsList, context) }), - }; -}; - -/** - * serializeAws_json1_1ResourceIdList - */ -const se_ResourceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RestoreEventDataStoreRequest - */ -const se_RestoreEventDataStoreRequest = (input: RestoreEventDataStoreRequest, context: __SerdeContext): any => { - return { - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - }; -}; - -/** - * serializeAws_json1_1S3ImportSource - */ -const se_S3ImportSource = (input: S3ImportSource, context: __SerdeContext): any => { - return { - ...(input.S3BucketAccessRoleArn != null && { S3BucketAccessRoleArn: input.S3BucketAccessRoleArn }), - ...(input.S3BucketRegion != null && { S3BucketRegion: input.S3BucketRegion }), - ...(input.S3LocationUri != null && { S3LocationUri: input.S3LocationUri }), - }; -}; - -/** - * serializeAws_json1_1StartImportRequest - */ -const se_StartImportRequest = (input: StartImportRequest, context: __SerdeContext): any => { - return { - ...(input.Destinations != null && { Destinations: se_ImportDestinations(input.Destinations, context) }), - ...(input.EndEventTime != null && { EndEventTime: Math.round(input.EndEventTime.getTime() / 1000) }), - ...(input.ImportId != null && { ImportId: input.ImportId }), - ...(input.ImportSource != null && { ImportSource: se_ImportSource(input.ImportSource, context) }), - ...(input.StartEventTime != null && { StartEventTime: Math.round(input.StartEventTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1StartLoggingRequest - */ -const se_StartLoggingRequest = (input: StartLoggingRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StartQueryRequest - */ -const se_StartQueryRequest = (input: StartQueryRequest, context: __SerdeContext): any => { - return { - ...(input.DeliveryS3Uri != null && { DeliveryS3Uri: input.DeliveryS3Uri }), - ...(input.QueryStatement != null && { QueryStatement: input.QueryStatement }), - }; -}; - -/** - * serializeAws_json1_1StopImportRequest - */ -const se_StopImportRequest = (input: StopImportRequest, context: __SerdeContext): any => { - return { - ...(input.ImportId != null && { ImportId: input.ImportId }), - }; -}; - -/** - * serializeAws_json1_1StopLoggingRequest - */ -const se_StopLoggingRequest = (input: StopLoggingRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagsList - */ -const se_TagsList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TrailNameList - */ -const se_TrailNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UpdateChannelRequest - */ -const se_UpdateChannelRequest = (input: UpdateChannelRequest, context: __SerdeContext): any => { - return { - ...(input.Channel != null && { Channel: input.Channel }), - ...(input.Destinations != null && { Destinations: se_Destinations(input.Destinations, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateEventDataStoreRequest - */ -const se_UpdateEventDataStoreRequest = (input: UpdateEventDataStoreRequest, context: __SerdeContext): any => { - return { - ...(input.AdvancedEventSelectors != null && { - AdvancedEventSelectors: se_AdvancedEventSelectors(input.AdvancedEventSelectors, context), - }), - ...(input.EventDataStore != null && { EventDataStore: input.EventDataStore }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MultiRegionEnabled != null && { MultiRegionEnabled: input.MultiRegionEnabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationEnabled != null && { OrganizationEnabled: input.OrganizationEnabled }), - ...(input.RetentionPeriod != null && { RetentionPeriod: input.RetentionPeriod }), - ...(input.TerminationProtectionEnabled != null && { - TerminationProtectionEnabled: input.TerminationProtectionEnabled, - }), - }; -}; - -/** - * serializeAws_json1_1UpdateTrailRequest - */ -const se_UpdateTrailRequest = (input: UpdateTrailRequest, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.CloudWatchLogsRoleArn != null && { CloudWatchLogsRoleArn: input.CloudWatchLogsRoleArn }), - ...(input.EnableLogFileValidation != null && { EnableLogFileValidation: input.EnableLogFileValidation }), - ...(input.IncludeGlobalServiceEvents != null && { IncludeGlobalServiceEvents: input.IncludeGlobalServiceEvents }), - ...(input.IsMultiRegionTrail != null && { IsMultiRegionTrail: input.IsMultiRegionTrail }), - ...(input.IsOrganizationTrail != null && { IsOrganizationTrail: input.IsOrganizationTrail }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - ...(input.SnsTopicName != null && { SnsTopicName: input.SnsTopicName }), - }; -}; - -/** - * deserializeAws_json1_1AccountHasOngoingImportException - */ -const de_AccountHasOngoingImportException = ( - output: any, - context: __SerdeContext -): AccountHasOngoingImportException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountNotFoundException - */ -const de_AccountNotFoundException = (output: any, context: __SerdeContext): AccountNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountNotRegisteredException - */ -const de_AccountNotRegisteredException = (output: any, context: __SerdeContext): AccountNotRegisteredException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountRegisteredException - */ -const de_AccountRegisteredException = (output: any, context: __SerdeContext): AccountRegisteredException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AddTagsResponse - */ -const de_AddTagsResponse = (output: any, context: __SerdeContext): AddTagsResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdvancedEventSelector - */ -const de_AdvancedEventSelector = (output: any, context: __SerdeContext): AdvancedEventSelector => { - return { - FieldSelectors: - output.FieldSelectors != null ? de_AdvancedFieldSelectors(output.FieldSelectors, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AdvancedEventSelectors - */ -const de_AdvancedEventSelectors = (output: any, context: __SerdeContext): AdvancedEventSelector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdvancedEventSelector(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AdvancedFieldSelector - */ -const de_AdvancedFieldSelector = (output: any, context: __SerdeContext): AdvancedFieldSelector => { - return { - EndsWith: output.EndsWith != null ? de_Operator(output.EndsWith, context) : undefined, - Equals: output.Equals != null ? de_Operator(output.Equals, context) : undefined, - Field: __expectString(output.Field), - NotEndsWith: output.NotEndsWith != null ? de_Operator(output.NotEndsWith, context) : undefined, - NotEquals: output.NotEquals != null ? de_Operator(output.NotEquals, context) : undefined, - NotStartsWith: output.NotStartsWith != null ? de_Operator(output.NotStartsWith, context) : undefined, - StartsWith: output.StartsWith != null ? de_Operator(output.StartsWith, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AdvancedFieldSelectors - */ -const de_AdvancedFieldSelectors = (output: any, context: __SerdeContext): AdvancedFieldSelector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdvancedFieldSelector(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelQueryResponse - */ -const de_CancelQueryResponse = (output: any, context: __SerdeContext): CancelQueryResponse => { - return { - QueryId: __expectString(output.QueryId), - QueryStatus: __expectString(output.QueryStatus), - } as any; -}; - -/** - * deserializeAws_json1_1CannotDelegateManagementAccountException - */ -const de_CannotDelegateManagementAccountException = ( - output: any, - context: __SerdeContext -): CannotDelegateManagementAccountException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Channel - */ -const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - ChannelArn: __expectString(output.ChannelArn), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ChannelAlreadyExistsException - */ -const de_ChannelAlreadyExistsException = (output: any, context: __SerdeContext): ChannelAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ChannelARNInvalidException - */ -const de_ChannelARNInvalidException = (output: any, context: __SerdeContext): ChannelARNInvalidException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ChannelExistsForEDSException - */ -const de_ChannelExistsForEDSException = (output: any, context: __SerdeContext): ChannelExistsForEDSException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ChannelMaxLimitExceededException - */ -const de_ChannelMaxLimitExceededException = ( - output: any, - context: __SerdeContext -): ChannelMaxLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ChannelNotFoundException - */ -const de_ChannelNotFoundException = (output: any, context: __SerdeContext): ChannelNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Channels - */ -const de_Channels = (output: any, context: __SerdeContext): Channel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Channel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CloudTrailAccessNotEnabledException - */ -const de_CloudTrailAccessNotEnabledException = ( - output: any, - context: __SerdeContext -): CloudTrailAccessNotEnabledException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudTrailARNInvalidException - */ -const de_CloudTrailARNInvalidException = (output: any, context: __SerdeContext): CloudTrailARNInvalidException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudTrailInvalidClientTokenIdException - */ -const de_CloudTrailInvalidClientTokenIdException = ( - output: any, - context: __SerdeContext -): CloudTrailInvalidClientTokenIdException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchLogsDeliveryUnavailableException - */ -const de_CloudWatchLogsDeliveryUnavailableException = ( - output: any, - context: __SerdeContext -): CloudWatchLogsDeliveryUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CreateChannelResponse - */ -const de_CreateChannelResponse = (output: any, context: __SerdeContext): CreateChannelResponse => { - return { - ChannelArn: __expectString(output.ChannelArn), - Destinations: output.Destinations != null ? de_Destinations(output.Destinations, context) : undefined, - Name: __expectString(output.Name), - Source: __expectString(output.Source), - Tags: output.Tags != null ? de_TagsList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateEventDataStoreResponse - */ -const de_CreateEventDataStoreResponse = (output: any, context: __SerdeContext): CreateEventDataStoreResponse => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EventDataStoreArn: __expectString(output.EventDataStoreArn), - KmsKeyId: __expectString(output.KmsKeyId), - MultiRegionEnabled: __expectBoolean(output.MultiRegionEnabled), - Name: __expectString(output.Name), - OrganizationEnabled: __expectBoolean(output.OrganizationEnabled), - RetentionPeriod: __expectInt32(output.RetentionPeriod), - Status: __expectString(output.Status), - TagsList: output.TagsList != null ? de_TagsList(output.TagsList, context) : undefined, - TerminationProtectionEnabled: __expectBoolean(output.TerminationProtectionEnabled), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTrailResponse - */ -const de_CreateTrailResponse = (output: any, context: __SerdeContext): CreateTrailResponse => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - CloudWatchLogsRoleArn: __expectString(output.CloudWatchLogsRoleArn), - IncludeGlobalServiceEvents: __expectBoolean(output.IncludeGlobalServiceEvents), - IsMultiRegionTrail: __expectBoolean(output.IsMultiRegionTrail), - IsOrganizationTrail: __expectBoolean(output.IsOrganizationTrail), - KmsKeyId: __expectString(output.KmsKeyId), - LogFileValidationEnabled: __expectBoolean(output.LogFileValidationEnabled), - Name: __expectString(output.Name), - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - SnsTopicARN: __expectString(output.SnsTopicARN), - SnsTopicName: __expectString(output.SnsTopicName), - TrailARN: __expectString(output.TrailARN), - } as any; -}; - -/** - * deserializeAws_json1_1DataResource - */ -const de_DataResource = (output: any, context: __SerdeContext): DataResource => { - return { - Type: __expectString(output.Type), - Values: output.Values != null ? de_DataResourceValues(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataResources - */ -const de_DataResources = (output: any, context: __SerdeContext): DataResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataResource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataResourceValues - */ -const de_DataResourceValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DelegatedAdminAccountLimitExceededException - */ -const de_DelegatedAdminAccountLimitExceededException = ( - output: any, - context: __SerdeContext -): DelegatedAdminAccountLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteChannelResponse - */ -const de_DeleteChannelResponse = (output: any, context: __SerdeContext): DeleteChannelResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteEventDataStoreResponse - */ -const de_DeleteEventDataStoreResponse = (output: any, context: __SerdeContext): DeleteEventDataStoreResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteTrailResponse - */ -const de_DeleteTrailResponse = (output: any, context: __SerdeContext): DeleteTrailResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeregisterOrganizationDelegatedAdminResponse - */ -const de_DeregisterOrganizationDelegatedAdminResponse = ( - output: any, - context: __SerdeContext -): DeregisterOrganizationDelegatedAdminResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeQueryResponse - */ -const de_DescribeQueryResponse = (output: any, context: __SerdeContext): DescribeQueryResponse => { - return { - DeliveryS3Uri: __expectString(output.DeliveryS3Uri), - DeliveryStatus: __expectString(output.DeliveryStatus), - ErrorMessage: __expectString(output.ErrorMessage), - QueryId: __expectString(output.QueryId), - QueryStatistics: - output.QueryStatistics != null ? de_QueryStatisticsForDescribeQuery(output.QueryStatistics, context) : undefined, - QueryStatus: __expectString(output.QueryStatus), - QueryString: __expectString(output.QueryString), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTrailsResponse - */ -const de_DescribeTrailsResponse = (output: any, context: __SerdeContext): DescribeTrailsResponse => { - return { - trailList: output.trailList != null ? de_TrailList(output.trailList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Destination - */ -const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - Location: __expectString(output.Location), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1Destinations - */ -const de_Destinations = (output: any, context: __SerdeContext): Destination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Destination(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Event - */ -const de_Event = (output: any, context: __SerdeContext): Event => { - return { - AccessKeyId: __expectString(output.AccessKeyId), - CloudTrailEvent: __expectString(output.CloudTrailEvent), - EventId: __expectString(output.EventId), - EventName: __expectString(output.EventName), - EventSource: __expectString(output.EventSource), - EventTime: - output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined, - ReadOnly: __expectString(output.ReadOnly), - Resources: output.Resources != null ? de_ResourceList(output.Resources, context) : undefined, - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStore - */ -const de_EventDataStore = (output: any, context: __SerdeContext): EventDataStore => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EventDataStoreArn: __expectString(output.EventDataStoreArn), - MultiRegionEnabled: __expectBoolean(output.MultiRegionEnabled), - Name: __expectString(output.Name), - OrganizationEnabled: __expectBoolean(output.OrganizationEnabled), - RetentionPeriod: __expectInt32(output.RetentionPeriod), - Status: __expectString(output.Status), - TerminationProtectionEnabled: __expectBoolean(output.TerminationProtectionEnabled), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStoreAlreadyExistsException - */ -const de_EventDataStoreAlreadyExistsException = ( - output: any, - context: __SerdeContext -): EventDataStoreAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStoreARNInvalidException - */ -const de_EventDataStoreARNInvalidException = ( - output: any, - context: __SerdeContext -): EventDataStoreARNInvalidException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStoreHasOngoingImportException - */ -const de_EventDataStoreHasOngoingImportException = ( - output: any, - context: __SerdeContext -): EventDataStoreHasOngoingImportException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStoreMaxLimitExceededException - */ -const de_EventDataStoreMaxLimitExceededException = ( - output: any, - context: __SerdeContext -): EventDataStoreMaxLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStoreNotFoundException - */ -const de_EventDataStoreNotFoundException = (output: any, context: __SerdeContext): EventDataStoreNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EventDataStores - */ -const de_EventDataStores = (output: any, context: __SerdeContext): EventDataStore[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventDataStore(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventDataStoreTerminationProtectedException - */ -const de_EventDataStoreTerminationProtectedException = ( - output: any, - context: __SerdeContext -): EventDataStoreTerminationProtectedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EventSelector - */ -const de_EventSelector = (output: any, context: __SerdeContext): EventSelector => { - return { - DataResources: output.DataResources != null ? de_DataResources(output.DataResources, context) : undefined, - ExcludeManagementEventSources: - output.ExcludeManagementEventSources != null - ? de_ExcludeManagementEventSources(output.ExcludeManagementEventSources, context) - : undefined, - IncludeManagementEvents: __expectBoolean(output.IncludeManagementEvents), - ReadWriteType: __expectString(output.ReadWriteType), - } as any; -}; - -/** - * deserializeAws_json1_1EventSelectors - */ -const de_EventSelectors = (output: any, context: __SerdeContext): EventSelector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventSelector(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventsList - */ -const de_EventsList = (output: any, context: __SerdeContext): Event[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Event(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExcludeManagementEventSources - */ -const de_ExcludeManagementEventSources = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetChannelResponse - */ -const de_GetChannelResponse = (output: any, context: __SerdeContext): GetChannelResponse => { - return { - ChannelArn: __expectString(output.ChannelArn), - Destinations: output.Destinations != null ? de_Destinations(output.Destinations, context) : undefined, - IngestionStatus: output.IngestionStatus != null ? de_IngestionStatus(output.IngestionStatus, context) : undefined, - Name: __expectString(output.Name), - Source: __expectString(output.Source), - SourceConfig: output.SourceConfig != null ? de_SourceConfig(output.SourceConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetEventDataStoreResponse - */ -const de_GetEventDataStoreResponse = (output: any, context: __SerdeContext): GetEventDataStoreResponse => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EventDataStoreArn: __expectString(output.EventDataStoreArn), - KmsKeyId: __expectString(output.KmsKeyId), - MultiRegionEnabled: __expectBoolean(output.MultiRegionEnabled), - Name: __expectString(output.Name), - OrganizationEnabled: __expectBoolean(output.OrganizationEnabled), - RetentionPeriod: __expectInt32(output.RetentionPeriod), - Status: __expectString(output.Status), - TerminationProtectionEnabled: __expectBoolean(output.TerminationProtectionEnabled), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetEventSelectorsResponse - */ -const de_GetEventSelectorsResponse = (output: any, context: __SerdeContext): GetEventSelectorsResponse => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - EventSelectors: output.EventSelectors != null ? de_EventSelectors(output.EventSelectors, context) : undefined, - TrailARN: __expectString(output.TrailARN), - } as any; -}; - -/** - * deserializeAws_json1_1GetImportResponse - */ -const de_GetImportResponse = (output: any, context: __SerdeContext): GetImportResponse => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Destinations: output.Destinations != null ? de_ImportDestinations(output.Destinations, context) : undefined, - EndEventTime: - output.EndEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndEventTime))) - : undefined, - ImportId: __expectString(output.ImportId), - ImportSource: output.ImportSource != null ? de_ImportSource(output.ImportSource, context) : undefined, - ImportStatistics: - output.ImportStatistics != null ? de_ImportStatistics(output.ImportStatistics, context) : undefined, - ImportStatus: __expectString(output.ImportStatus), - StartEventTime: - output.StartEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartEventTime))) - : undefined, - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetInsightSelectorsResponse - */ -const de_GetInsightSelectorsResponse = (output: any, context: __SerdeContext): GetInsightSelectorsResponse => { - return { - InsightSelectors: - output.InsightSelectors != null ? de_InsightSelectors(output.InsightSelectors, context) : undefined, - TrailARN: __expectString(output.TrailARN), - } as any; -}; - -/** - * deserializeAws_json1_1GetQueryResultsResponse - */ -const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQueryResultsResponse => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - NextToken: __expectString(output.NextToken), - QueryResultRows: output.QueryResultRows != null ? de_QueryResultRows(output.QueryResultRows, context) : undefined, - QueryStatistics: output.QueryStatistics != null ? de_QueryStatistics(output.QueryStatistics, context) : undefined, - QueryStatus: __expectString(output.QueryStatus), - } as any; -}; - -/** - * deserializeAws_json1_1GetResourcePolicyResponse - */ -const de_GetResourcePolicyResponse = (output: any, context: __SerdeContext): GetResourcePolicyResponse => { - return { - ResourceArn: __expectString(output.ResourceArn), - ResourcePolicy: __expectString(output.ResourcePolicy), - } as any; -}; - -/** - * deserializeAws_json1_1GetTrailResponse - */ -const de_GetTrailResponse = (output: any, context: __SerdeContext): GetTrailResponse => { - return { - Trail: output.Trail != null ? de_Trail(output.Trail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTrailStatusResponse - */ -const de_GetTrailStatusResponse = (output: any, context: __SerdeContext): GetTrailStatusResponse => { - return { - IsLogging: __expectBoolean(output.IsLogging), - LatestCloudWatchLogsDeliveryError: __expectString(output.LatestCloudWatchLogsDeliveryError), - LatestCloudWatchLogsDeliveryTime: - output.LatestCloudWatchLogsDeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestCloudWatchLogsDeliveryTime))) - : undefined, - LatestDeliveryAttemptSucceeded: __expectString(output.LatestDeliveryAttemptSucceeded), - LatestDeliveryAttemptTime: __expectString(output.LatestDeliveryAttemptTime), - LatestDeliveryError: __expectString(output.LatestDeliveryError), - LatestDeliveryTime: - output.LatestDeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestDeliveryTime))) - : undefined, - LatestDigestDeliveryError: __expectString(output.LatestDigestDeliveryError), - LatestDigestDeliveryTime: - output.LatestDigestDeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestDigestDeliveryTime))) - : undefined, - LatestNotificationAttemptSucceeded: __expectString(output.LatestNotificationAttemptSucceeded), - LatestNotificationAttemptTime: __expectString(output.LatestNotificationAttemptTime), - LatestNotificationError: __expectString(output.LatestNotificationError), - LatestNotificationTime: - output.LatestNotificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestNotificationTime))) - : undefined, - StartLoggingTime: - output.StartLoggingTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartLoggingTime))) - : undefined, - StopLoggingTime: - output.StopLoggingTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StopLoggingTime))) - : undefined, - TimeLoggingStarted: __expectString(output.TimeLoggingStarted), - TimeLoggingStopped: __expectString(output.TimeLoggingStopped), - } as any; -}; - -/** - * deserializeAws_json1_1ImportDestinations - */ -const de_ImportDestinations = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ImportFailureList - */ -const de_ImportFailureList = (output: any, context: __SerdeContext): ImportFailureListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportFailureListItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ImportFailureListItem - */ -const de_ImportFailureListItem = (output: any, context: __SerdeContext): ImportFailureListItem => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - ErrorType: __expectString(output.ErrorType), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Location: __expectString(output.Location), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ImportNotFoundException - */ -const de_ImportNotFoundException = (output: any, context: __SerdeContext): ImportNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ImportsList - */ -const de_ImportsList = (output: any, context: __SerdeContext): ImportsListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportsListItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ImportsListItem - */ -const de_ImportsListItem = (output: any, context: __SerdeContext): ImportsListItem => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Destinations: output.Destinations != null ? de_ImportDestinations(output.Destinations, context) : undefined, - ImportId: __expectString(output.ImportId), - ImportStatus: __expectString(output.ImportStatus), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ImportSource - */ -const de_ImportSource = (output: any, context: __SerdeContext): ImportSource => { - return { - S3: output.S3 != null ? de_S3ImportSource(output.S3, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ImportStatistics - */ -const de_ImportStatistics = (output: any, context: __SerdeContext): ImportStatistics => { - return { - EventsCompleted: __expectLong(output.EventsCompleted), - FailedEntries: __expectLong(output.FailedEntries), - FilesCompleted: __expectLong(output.FilesCompleted), - PrefixesCompleted: __expectLong(output.PrefixesCompleted), - PrefixesFound: __expectLong(output.PrefixesFound), - } as any; -}; - -/** - * deserializeAws_json1_1InactiveEventDataStoreException - */ -const de_InactiveEventDataStoreException = (output: any, context: __SerdeContext): InactiveEventDataStoreException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InactiveQueryException - */ -const de_InactiveQueryException = (output: any, context: __SerdeContext): InactiveQueryException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1IngestionStatus - */ -const de_IngestionStatus = (output: any, context: __SerdeContext): IngestionStatus => { - return { - LatestIngestionAttemptEventID: __expectString(output.LatestIngestionAttemptEventID), - LatestIngestionAttemptTime: - output.LatestIngestionAttemptTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestIngestionAttemptTime))) - : undefined, - LatestIngestionErrorCode: __expectString(output.LatestIngestionErrorCode), - LatestIngestionSuccessEventID: __expectString(output.LatestIngestionSuccessEventID), - LatestIngestionSuccessTime: - output.LatestIngestionSuccessTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestIngestionSuccessTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InsightNotEnabledException - */ -const de_InsightNotEnabledException = (output: any, context: __SerdeContext): InsightNotEnabledException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InsightSelector - */ -const de_InsightSelector = (output: any, context: __SerdeContext): InsightSelector => { - return { - InsightType: __expectString(output.InsightType), - } as any; -}; - -/** - * deserializeAws_json1_1InsightSelectors - */ -const de_InsightSelectors = (output: any, context: __SerdeContext): InsightSelector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InsightSelector(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InsufficientDependencyServiceAccessPermissionException - */ -const de_InsufficientDependencyServiceAccessPermissionException = ( - output: any, - context: __SerdeContext -): InsufficientDependencyServiceAccessPermissionException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InsufficientEncryptionPolicyException - */ -const de_InsufficientEncryptionPolicyException = ( - output: any, - context: __SerdeContext -): InsufficientEncryptionPolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InsufficientS3BucketPolicyException - */ -const de_InsufficientS3BucketPolicyException = ( - output: any, - context: __SerdeContext -): InsufficientS3BucketPolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InsufficientSnsTopicPolicyException - */ -const de_InsufficientSnsTopicPolicyException = ( - output: any, - context: __SerdeContext -): InsufficientSnsTopicPolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCloudWatchLogsLogGroupArnException - */ -const de_InvalidCloudWatchLogsLogGroupArnException = ( - output: any, - context: __SerdeContext -): InvalidCloudWatchLogsLogGroupArnException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCloudWatchLogsRoleArnException - */ -const de_InvalidCloudWatchLogsRoleArnException = ( - output: any, - context: __SerdeContext -): InvalidCloudWatchLogsRoleArnException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidDateRangeException - */ -const de_InvalidDateRangeException = (output: any, context: __SerdeContext): InvalidDateRangeException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidEventCategoryException - */ -const de_InvalidEventCategoryException = (output: any, context: __SerdeContext): InvalidEventCategoryException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidEventDataStoreCategoryException - */ -const de_InvalidEventDataStoreCategoryException = ( - output: any, - context: __SerdeContext -): InvalidEventDataStoreCategoryException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidEventDataStoreStatusException - */ -const de_InvalidEventDataStoreStatusException = ( - output: any, - context: __SerdeContext -): InvalidEventDataStoreStatusException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidEventSelectorsException - */ -const de_InvalidEventSelectorsException = (output: any, context: __SerdeContext): InvalidEventSelectorsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidHomeRegionException - */ -const de_InvalidHomeRegionException = (output: any, context: __SerdeContext): InvalidHomeRegionException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidImportSourceException - */ -const de_InvalidImportSourceException = (output: any, context: __SerdeContext): InvalidImportSourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidInsightSelectorsException - */ -const de_InvalidInsightSelectorsException = ( - output: any, - context: __SerdeContext -): InvalidInsightSelectorsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidKmsKeyIdException - */ -const de_InvalidKmsKeyIdException = (output: any, context: __SerdeContext): InvalidKmsKeyIdException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidLookupAttributesException - */ -const de_InvalidLookupAttributesException = ( - output: any, - context: __SerdeContext -): InvalidLookupAttributesException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidMaxResultsException - */ -const de_InvalidMaxResultsException = (output: any, context: __SerdeContext): InvalidMaxResultsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParameterCombinationException - */ -const de_InvalidParameterCombinationException = ( - output: any, - context: __SerdeContext -): InvalidParameterCombinationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidQueryStatementException - */ -const de_InvalidQueryStatementException = (output: any, context: __SerdeContext): InvalidQueryStatementException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidQueryStatusException - */ -const de_InvalidQueryStatusException = (output: any, context: __SerdeContext): InvalidQueryStatusException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidS3BucketNameException - */ -const de_InvalidS3BucketNameException = (output: any, context: __SerdeContext): InvalidS3BucketNameException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StartLoggingRequest omitted. -/** - * deserializeAws_json1_1InvalidS3PrefixException - */ -const de_InvalidS3PrefixException = (output: any, context: __SerdeContext): InvalidS3PrefixException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StartQueryRequest omitted. -/** - * deserializeAws_json1_1InvalidSnsTopicNameException - */ -const de_InvalidSnsTopicNameException = (output: any, context: __SerdeContext): InvalidSnsTopicNameException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StopImportRequest omitted. -/** - * deserializeAws_json1_1InvalidSourceException - */ -const de_InvalidSourceException = (output: any, context: __SerdeContext): InvalidSourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StopLoggingRequest omitted. -/** - * deserializeAws_json1_1InvalidTagParameterException - */ -const de_InvalidTagParameterException = (output: any, context: __SerdeContext): InvalidTagParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1InvalidTimeRangeException - */ -const de_InvalidTimeRangeException = (output: any, context: __SerdeContext): InvalidTimeRangeException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TagsList omitted. -/** - * deserializeAws_json1_1InvalidTokenException - */ -const de_InvalidTokenException = (output: any, context: __SerdeContext): InvalidTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TrailNameList omitted. -/** - * deserializeAws_json1_1InvalidTrailNameException - */ -const de_InvalidTrailNameException = (output: any, context: __SerdeContext): InvalidTrailNameException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateChannelRequest omitted. -/** - * deserializeAws_json1_1KmsException - */ -const de_KmsException = (output: any, context: __SerdeContext): KmsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateEventDataStoreRequest omitted. -/** - * deserializeAws_json1_1KmsKeyDisabledException - */ -const de_KmsKeyDisabledException = (output: any, context: __SerdeContext): KmsKeyDisabledException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateTrailRequest omitted. -/** - * deserializeAws_json1_1KmsKeyNotFoundException - */ -const de_KmsKeyNotFoundException = (output: any, context: __SerdeContext): KmsKeyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccountHasOngoingImportException omitted. -/** - * deserializeAws_json1_1ListChannelsResponse - */ -const de_ListChannelsResponse = (output: any, context: __SerdeContext): ListChannelsResponse => { - return { - Channels: output.Channels != null ? de_Channels(output.Channels, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AccountNotFoundException omitted. -/** - * deserializeAws_json1_1ListEventDataStoresResponse - */ -const de_ListEventDataStoresResponse = (output: any, context: __SerdeContext): ListEventDataStoresResponse => { - return { - EventDataStores: output.EventDataStores != null ? de_EventDataStores(output.EventDataStores, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AccountNotRegisteredException omitted. -/** - * deserializeAws_json1_1ListImportFailuresResponse - */ -const de_ListImportFailuresResponse = (output: any, context: __SerdeContext): ListImportFailuresResponse => { - return { - Failures: output.Failures != null ? de_ImportFailureList(output.Failures, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AccountRegisteredException omitted. -/** - * deserializeAws_json1_1ListImportsResponse - */ -const de_ListImportsResponse = (output: any, context: __SerdeContext): ListImportsResponse => { - return { - Imports: output.Imports != null ? de_ImportsList(output.Imports, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AddTagsResponse omitted. -/** - * deserializeAws_json1_1ListPublicKeysResponse - */ -const de_ListPublicKeysResponse = (output: any, context: __SerdeContext): ListPublicKeysResponse => { - return { - NextToken: __expectString(output.NextToken), - PublicKeyList: output.PublicKeyList != null ? de_PublicKeyList(output.PublicKeyList, context) : undefined, - } as any; -}; +// de_AdvancedEventSelector omitted. -/** - * deserializeAws_json1_1ListQueriesResponse - */ -const de_ListQueriesResponse = (output: any, context: __SerdeContext): ListQueriesResponse => { - return { - NextToken: __expectString(output.NextToken), - Queries: output.Queries != null ? de_Queries(output.Queries, context) : undefined, - } as any; -}; +// de_AdvancedEventSelectors omitted. -/** - * deserializeAws_json1_1ListTagsResponse - */ -const de_ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceTagList: output.ResourceTagList != null ? de_ResourceTagList(output.ResourceTagList, context) : undefined, - } as any; -}; +// de_AdvancedFieldSelector omitted. -/** - * deserializeAws_json1_1ListTrailsResponse - */ -const de_ListTrailsResponse = (output: any, context: __SerdeContext): ListTrailsResponse => { - return { - NextToken: __expectString(output.NextToken), - Trails: output.Trails != null ? de_Trails(output.Trails, context) : undefined, - } as any; -}; +// de_AdvancedFieldSelectors omitted. -/** - * deserializeAws_json1_1LookupEventsResponse - */ -const de_LookupEventsResponse = (output: any, context: __SerdeContext): LookupEventsResponse => { - return { - Events: output.Events != null ? de_EventsList(output.Events, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CancelQueryResponse omitted. -/** - * deserializeAws_json1_1MaxConcurrentQueriesException - */ -const de_MaxConcurrentQueriesException = (output: any, context: __SerdeContext): MaxConcurrentQueriesException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CannotDelegateManagementAccountException omitted. -/** - * deserializeAws_json1_1MaximumNumberOfTrailsExceededException - */ -const de_MaximumNumberOfTrailsExceededException = ( - output: any, - context: __SerdeContext -): MaximumNumberOfTrailsExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_Channel omitted. -/** - * deserializeAws_json1_1NoManagementAccountSLRExistsException - */ -const de_NoManagementAccountSLRExistsException = ( - output: any, - context: __SerdeContext -): NoManagementAccountSLRExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ChannelAlreadyExistsException omitted. -/** - * deserializeAws_json1_1NotOrganizationManagementAccountException - */ -const de_NotOrganizationManagementAccountException = ( - output: any, - context: __SerdeContext -): NotOrganizationManagementAccountException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ChannelARNInvalidException omitted. -/** - * deserializeAws_json1_1NotOrganizationMasterAccountException - */ -const de_NotOrganizationMasterAccountException = ( - output: any, - context: __SerdeContext -): NotOrganizationMasterAccountException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ChannelExistsForEDSException omitted. -/** - * deserializeAws_json1_1OperationNotPermittedException - */ -const de_OperationNotPermittedException = (output: any, context: __SerdeContext): OperationNotPermittedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ChannelMaxLimitExceededException omitted. -/** - * deserializeAws_json1_1Operator - */ -const de_Operator = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ChannelNotFoundException omitted. -/** - * deserializeAws_json1_1OrganizationNotInAllFeaturesModeException - */ -const de_OrganizationNotInAllFeaturesModeException = ( - output: any, - context: __SerdeContext -): OrganizationNotInAllFeaturesModeException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_Channels omitted. -/** - * deserializeAws_json1_1OrganizationsNotInUseException - */ -const de_OrganizationsNotInUseException = (output: any, context: __SerdeContext): OrganizationsNotInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CloudTrailAccessNotEnabledException omitted. -/** - * deserializeAws_json1_1PublicKey - */ -const de_PublicKey = (output: any, context: __SerdeContext): PublicKey => { - return { - Fingerprint: __expectString(output.Fingerprint), - ValidityEndTime: - output.ValidityEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ValidityEndTime))) - : undefined, - ValidityStartTime: - output.ValidityStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ValidityStartTime))) - : undefined, - Value: output.Value != null ? context.base64Decoder(output.Value) : undefined, - } as any; -}; +// de_CloudTrailARNInvalidException omitted. -/** - * deserializeAws_json1_1PublicKeyList - */ -const de_PublicKeyList = (output: any, context: __SerdeContext): PublicKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PublicKey(entry, context); - }); - return retVal; -}; +// de_CloudTrailInvalidClientTokenIdException omitted. -/** - * deserializeAws_json1_1PutEventSelectorsResponse - */ -const de_PutEventSelectorsResponse = (output: any, context: __SerdeContext): PutEventSelectorsResponse => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - EventSelectors: output.EventSelectors != null ? de_EventSelectors(output.EventSelectors, context) : undefined, - TrailARN: __expectString(output.TrailARN), - } as any; -}; +// de_CloudWatchLogsDeliveryUnavailableException omitted. -/** - * deserializeAws_json1_1PutInsightSelectorsResponse - */ -const de_PutInsightSelectorsResponse = (output: any, context: __SerdeContext): PutInsightSelectorsResponse => { - return { - InsightSelectors: - output.InsightSelectors != null ? de_InsightSelectors(output.InsightSelectors, context) : undefined, - TrailARN: __expectString(output.TrailARN), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - ResourceArn: __expectString(output.ResourceArn), - ResourcePolicy: __expectString(output.ResourcePolicy), - } as any; -}; +// de_CreateChannelResponse omitted. /** - * deserializeAws_json1_1Queries + * deserializeAws_json1_1CreateEventDataStoreResponse */ -const de_Queries = (output: any, context: __SerdeContext): Query[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Query(entry, context); - }); - return retVal; +const de_CreateEventDataStoreResponse = (output: any, context: __SerdeContext): CreateEventDataStoreResponse => { + return take(output, { + AdvancedEventSelectors: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventDataStoreArn: __expectString, + KmsKeyId: __expectString, + MultiRegionEnabled: __expectBoolean, + Name: __expectString, + OrganizationEnabled: __expectBoolean, + RetentionPeriod: __expectInt32, + Status: __expectString, + TagsList: _json, + TerminationProtectionEnabled: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_CreateTrailResponse omitted. + +// de_DataResource omitted. + +// de_DataResources omitted. + +// de_DataResourceValues omitted. + +// de_DelegatedAdminAccountLimitExceededException omitted. + +// de_DeleteChannelResponse omitted. + +// de_DeleteEventDataStoreResponse omitted. + +// de_DeleteResourcePolicyResponse omitted. + +// de_DeleteTrailResponse omitted. + +// de_DeregisterOrganizationDelegatedAdminResponse omitted. + /** - * deserializeAws_json1_1Query + * deserializeAws_json1_1DescribeQueryResponse */ -const de_Query = (output: any, context: __SerdeContext): Query => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - QueryId: __expectString(output.QueryId), - QueryStatus: __expectString(output.QueryStatus), - } as any; +const de_DescribeQueryResponse = (output: any, context: __SerdeContext): DescribeQueryResponse => { + return take(output, { + DeliveryS3Uri: __expectString, + DeliveryStatus: __expectString, + ErrorMessage: __expectString, + QueryId: __expectString, + QueryStatistics: (_: any) => de_QueryStatisticsForDescribeQuery(_, context), + QueryStatus: __expectString, + QueryString: __expectString, + }) as any; }; +// de_DescribeTrailsResponse omitted. + +// de_Destination omitted. + +// de_Destinations omitted. + /** - * deserializeAws_json1_1QueryIdNotFoundException + * deserializeAws_json1_1Event */ -const de_QueryIdNotFoundException = (output: any, context: __SerdeContext): QueryIdNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_Event = (output: any, context: __SerdeContext): Event => { + return take(output, { + AccessKeyId: __expectString, + CloudTrailEvent: __expectString, + EventId: __expectString, + EventName: __expectString, + EventSource: __expectString, + EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReadOnly: __expectString, + Resources: _json, + Username: __expectString, + }) as any; }; /** - * deserializeAws_json1_1QueryResultColumn + * deserializeAws_json1_1EventDataStore */ -const de_QueryResultColumn = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_EventDataStore = (output: any, context: __SerdeContext): EventDataStore => { + return take(output, { + AdvancedEventSelectors: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventDataStoreArn: __expectString, + MultiRegionEnabled: __expectBoolean, + Name: __expectString, + OrganizationEnabled: __expectBoolean, + RetentionPeriod: __expectInt32, + Status: __expectString, + TerminationProtectionEnabled: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_EventDataStoreAlreadyExistsException omitted. + +// de_EventDataStoreARNInvalidException omitted. + +// de_EventDataStoreHasOngoingImportException omitted. + +// de_EventDataStoreMaxLimitExceededException omitted. + +// de_EventDataStoreNotFoundException omitted. + /** - * deserializeAws_json1_1QueryResultRow + * deserializeAws_json1_1EventDataStores */ -const de_QueryResultRow = (output: any, context: __SerdeContext): Record[] => { +const de_EventDataStores = (output: any, context: __SerdeContext): EventDataStore[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryResultColumn(entry, context); + return de_EventDataStore(entry, context); }); return retVal; }; +// de_EventDataStoreTerminationProtectedException omitted. + +// de_EventSelector omitted. + +// de_EventSelectors omitted. + /** - * deserializeAws_json1_1QueryResultRows + * deserializeAws_json1_1EventsList */ -const de_QueryResultRows = (output: any, context: __SerdeContext): Record[][] => { +const de_EventsList = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryResultRow(entry, context); + return de_Event(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1QueryStatistics - */ -const de_QueryStatistics = (output: any, context: __SerdeContext): QueryStatistics => { - return { - BytesScanned: __expectLong(output.BytesScanned), - ResultsCount: __expectInt32(output.ResultsCount), - TotalResultsCount: __expectInt32(output.TotalResultsCount), - } as any; -}; +// de_ExcludeManagementEventSources omitted. /** - * deserializeAws_json1_1QueryStatisticsForDescribeQuery + * deserializeAws_json1_1GetChannelResponse */ -const de_QueryStatisticsForDescribeQuery = (output: any, context: __SerdeContext): QueryStatisticsForDescribeQuery => { - return { - BytesScanned: __expectLong(output.BytesScanned), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EventsMatched: __expectLong(output.EventsMatched), - EventsScanned: __expectLong(output.EventsScanned), - ExecutionTimeInMillis: __expectInt32(output.ExecutionTimeInMillis), - } as any; +const de_GetChannelResponse = (output: any, context: __SerdeContext): GetChannelResponse => { + return take(output, { + ChannelArn: __expectString, + Destinations: _json, + IngestionStatus: (_: any) => de_IngestionStatus(_, context), + Name: __expectString, + Source: __expectString, + SourceConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1RegisterOrganizationDelegatedAdminResponse + * deserializeAws_json1_1GetEventDataStoreResponse */ -const de_RegisterOrganizationDelegatedAdminResponse = ( - output: any, - context: __SerdeContext -): RegisterOrganizationDelegatedAdminResponse => { - return {} as any; +const de_GetEventDataStoreResponse = (output: any, context: __SerdeContext): GetEventDataStoreResponse => { + return take(output, { + AdvancedEventSelectors: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventDataStoreArn: __expectString, + KmsKeyId: __expectString, + MultiRegionEnabled: __expectBoolean, + Name: __expectString, + OrganizationEnabled: __expectBoolean, + RetentionPeriod: __expectInt32, + Status: __expectString, + TerminationProtectionEnabled: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1RemoveTagsResponse - */ -const de_RemoveTagsResponse = (output: any, context: __SerdeContext): RemoveTagsResponse => { - return {} as any; -}; +// de_GetEventSelectorsResponse omitted. /** - * deserializeAws_json1_1Resource + * deserializeAws_json1_1GetImportResponse */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - ResourceName: __expectString(output.ResourceName), - ResourceType: __expectString(output.ResourceType), - } as any; +const de_GetImportResponse = (output: any, context: __SerdeContext): GetImportResponse => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destinations: _json, + EndEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImportId: __expectString, + ImportSource: _json, + ImportStatistics: _json, + ImportStatus: __expectString, + StartEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_GetInsightSelectorsResponse omitted. + +// de_GetQueryResultsResponse omitted. + +// de_GetResourcePolicyResponse omitted. + +// de_GetTrailResponse omitted. + /** - * deserializeAws_json1_1ResourceARNNotValidException + * deserializeAws_json1_1GetTrailStatusResponse */ -const de_ResourceARNNotValidException = (output: any, context: __SerdeContext): ResourceARNNotValidException => { - return { - Message: __expectString(output.Message), - } as any; -}; +const de_GetTrailStatusResponse = (output: any, context: __SerdeContext): GetTrailStatusResponse => { + return take(output, { + IsLogging: __expectBoolean, + LatestCloudWatchLogsDeliveryError: __expectString, + LatestCloudWatchLogsDeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestDeliveryAttemptSucceeded: __expectString, + LatestDeliveryAttemptTime: __expectString, + LatestDeliveryError: __expectString, + LatestDeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestDigestDeliveryError: __expectString, + LatestDigestDeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestNotificationAttemptSucceeded: __expectString, + LatestNotificationAttemptTime: __expectString, + LatestNotificationError: __expectString, + LatestNotificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartLoggingTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StopLoggingTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TimeLoggingStarted: __expectString, + TimeLoggingStopped: __expectString, + }) as any; +}; + +// de_ImportDestinations omitted. /** - * deserializeAws_json1_1ResourceList + * deserializeAws_json1_1ImportFailureList */ -const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { +const de_ImportFailureList = (output: any, context: __SerdeContext): ImportFailureListItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); + return de_ImportFailureListItem(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ResourcePolicyNotFoundException - */ -const de_ResourcePolicyNotFoundException = (output: any, context: __SerdeContext): ResourcePolicyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ResourcePolicyNotValidException + * deserializeAws_json1_1ImportFailureListItem */ -const de_ResourcePolicyNotValidException = (output: any, context: __SerdeContext): ResourcePolicyNotValidException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ImportFailureListItem = (output: any, context: __SerdeContext): ImportFailureListItem => { + return take(output, { + ErrorMessage: __expectString, + ErrorType: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Location: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceTag - */ -const de_ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { - return { - ResourceId: __expectString(output.ResourceId), - TagsList: output.TagsList != null ? de_TagsList(output.TagsList, context) : undefined, - } as any; -}; +// de_ImportNotFoundException omitted. /** - * deserializeAws_json1_1ResourceTagList + * deserializeAws_json1_1ImportsList */ -const de_ResourceTagList = (output: any, context: __SerdeContext): ResourceTag[] => { +const de_ImportsList = (output: any, context: __SerdeContext): ImportsListItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTag(entry, context); + return de_ImportsListItem(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceTypeNotSupportedException + * deserializeAws_json1_1ImportsListItem */ -const de_ResourceTypeNotSupportedException = ( - output: any, - context: __SerdeContext -): ResourceTypeNotSupportedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ImportsListItem = (output: any, context: __SerdeContext): ImportsListItem => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destinations: _json, + ImportId: __expectString, + ImportStatus: __expectString, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ImportSource omitted. + +// de_ImportStatistics omitted. + +// de_InactiveEventDataStoreException omitted. + +// de_InactiveQueryException omitted. + /** - * deserializeAws_json1_1RestoreEventDataStoreResponse + * deserializeAws_json1_1IngestionStatus */ -const de_RestoreEventDataStoreResponse = (output: any, context: __SerdeContext): RestoreEventDataStoreResponse => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EventDataStoreArn: __expectString(output.EventDataStoreArn), - KmsKeyId: __expectString(output.KmsKeyId), - MultiRegionEnabled: __expectBoolean(output.MultiRegionEnabled), - Name: __expectString(output.Name), - OrganizationEnabled: __expectBoolean(output.OrganizationEnabled), - RetentionPeriod: __expectInt32(output.RetentionPeriod), - Status: __expectString(output.Status), - TerminationProtectionEnabled: __expectBoolean(output.TerminationProtectionEnabled), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1S3BucketDoesNotExistException - */ -const de_S3BucketDoesNotExistException = (output: any, context: __SerdeContext): S3BucketDoesNotExistException => { - return { - Message: __expectString(output.Message), - } as any; +const de_IngestionStatus = (output: any, context: __SerdeContext): IngestionStatus => { + return take(output, { + LatestIngestionAttemptEventID: __expectString, + LatestIngestionAttemptTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestIngestionErrorCode: __expectString, + LatestIngestionSuccessEventID: __expectString, + LatestIngestionSuccessTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_InsightNotEnabledException omitted. + +// de_InsightSelector omitted. + +// de_InsightSelectors omitted. + +// de_InsufficientDependencyServiceAccessPermissionException omitted. + +// de_InsufficientEncryptionPolicyException omitted. + +// de_InsufficientS3BucketPolicyException omitted. + +// de_InsufficientSnsTopicPolicyException omitted. + +// de_InvalidCloudWatchLogsLogGroupArnException omitted. + +// de_InvalidCloudWatchLogsRoleArnException omitted. + +// de_InvalidDateRangeException omitted. + +// de_InvalidEventCategoryException omitted. + +// de_InvalidEventDataStoreCategoryException omitted. + +// de_InvalidEventDataStoreStatusException omitted. + +// de_InvalidEventSelectorsException omitted. + +// de_InvalidHomeRegionException omitted. + +// de_InvalidImportSourceException omitted. + +// de_InvalidInsightSelectorsException omitted. + +// de_InvalidKmsKeyIdException omitted. + +// de_InvalidLookupAttributesException omitted. + +// de_InvalidMaxResultsException omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidParameterCombinationException omitted. + +// de_InvalidParameterException omitted. + +// de_InvalidQueryStatementException omitted. + +// de_InvalidQueryStatusException omitted. + +// de_InvalidS3BucketNameException omitted. + +// de_InvalidS3PrefixException omitted. + +// de_InvalidSnsTopicNameException omitted. + +// de_InvalidSourceException omitted. + +// de_InvalidTagParameterException omitted. + +// de_InvalidTimeRangeException omitted. + +// de_InvalidTokenException omitted. + +// de_InvalidTrailNameException omitted. + +// de_KmsException omitted. + +// de_KmsKeyDisabledException omitted. + +// de_KmsKeyNotFoundException omitted. + +// de_ListChannelsResponse omitted. + /** - * deserializeAws_json1_1S3ImportSource + * deserializeAws_json1_1ListEventDataStoresResponse */ -const de_S3ImportSource = (output: any, context: __SerdeContext): S3ImportSource => { - return { - S3BucketAccessRoleArn: __expectString(output.S3BucketAccessRoleArn), - S3BucketRegion: __expectString(output.S3BucketRegion), - S3LocationUri: __expectString(output.S3LocationUri), - } as any; +const de_ListEventDataStoresResponse = (output: any, context: __SerdeContext): ListEventDataStoresResponse => { + return take(output, { + EventDataStores: (_: any) => de_EventDataStores(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SourceConfig + * deserializeAws_json1_1ListImportFailuresResponse */ -const de_SourceConfig = (output: any, context: __SerdeContext): SourceConfig => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - ApplyToAllRegions: __expectBoolean(output.ApplyToAllRegions), - } as any; +const de_ListImportFailuresResponse = (output: any, context: __SerdeContext): ListImportFailuresResponse => { + return take(output, { + Failures: (_: any) => de_ImportFailureList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StartImportResponse + * deserializeAws_json1_1ListImportsResponse */ -const de_StartImportResponse = (output: any, context: __SerdeContext): StartImportResponse => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Destinations: output.Destinations != null ? de_ImportDestinations(output.Destinations, context) : undefined, - EndEventTime: - output.EndEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndEventTime))) - : undefined, - ImportId: __expectString(output.ImportId), - ImportSource: output.ImportSource != null ? de_ImportSource(output.ImportSource, context) : undefined, - ImportStatus: __expectString(output.ImportStatus), - StartEventTime: - output.StartEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartEventTime))) - : undefined, - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; +const de_ListImportsResponse = (output: any, context: __SerdeContext): ListImportsResponse => { + return take(output, { + Imports: (_: any) => de_ImportsList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StartLoggingResponse + * deserializeAws_json1_1ListPublicKeysResponse */ -const de_StartLoggingResponse = (output: any, context: __SerdeContext): StartLoggingResponse => { - return {} as any; +const de_ListPublicKeysResponse = (output: any, context: __SerdeContext): ListPublicKeysResponse => { + return take(output, { + NextToken: __expectString, + PublicKeyList: (_: any) => de_PublicKeyList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartQueryResponse + * deserializeAws_json1_1ListQueriesResponse */ -const de_StartQueryResponse = (output: any, context: __SerdeContext): StartQueryResponse => { - return { - QueryId: __expectString(output.QueryId), - } as any; +const de_ListQueriesResponse = (output: any, context: __SerdeContext): ListQueriesResponse => { + return take(output, { + NextToken: __expectString, + Queries: (_: any) => de_Queries(_, context), + }) as any; }; +// de_ListTagsResponse omitted. + +// de_ListTrailsResponse omitted. + /** - * deserializeAws_json1_1StopImportResponse + * deserializeAws_json1_1LookupEventsResponse */ -const de_StopImportResponse = (output: any, context: __SerdeContext): StopImportResponse => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Destinations: output.Destinations != null ? de_ImportDestinations(output.Destinations, context) : undefined, - EndEventTime: - output.EndEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndEventTime))) - : undefined, - ImportId: __expectString(output.ImportId), - ImportSource: output.ImportSource != null ? de_ImportSource(output.ImportSource, context) : undefined, - ImportStatistics: - output.ImportStatistics != null ? de_ImportStatistics(output.ImportStatistics, context) : undefined, - ImportStatus: __expectString(output.ImportStatus), - StartEventTime: - output.StartEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartEventTime))) - : undefined, - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1StopLoggingResponse - */ -const de_StopLoggingResponse = (output: any, context: __SerdeContext): StopLoggingResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_LookupEventsResponse = (output: any, context: __SerdeContext): LookupEventsResponse => { + return take(output, { + Events: (_: any) => de_EventsList(_, context), + NextToken: __expectString, + }) as any; }; +// de_MaxConcurrentQueriesException omitted. + +// de_MaximumNumberOfTrailsExceededException omitted. + +// de_NoManagementAccountSLRExistsException omitted. + +// de_NotOrganizationManagementAccountException omitted. + +// de_NotOrganizationMasterAccountException omitted. + +// de_OperationNotPermittedException omitted. + +// de_Operator omitted. + +// de_OrganizationNotInAllFeaturesModeException omitted. + +// de_OrganizationsNotInUseException omitted. + /** - * deserializeAws_json1_1TagsLimitExceededException + * deserializeAws_json1_1PublicKey */ -const de_TagsLimitExceededException = (output: any, context: __SerdeContext): TagsLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_PublicKey = (output: any, context: __SerdeContext): PublicKey => { + return take(output, { + Fingerprint: __expectString, + ValidityEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ValidityStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: context.base64Decoder, + }) as any; }; /** - * deserializeAws_json1_1TagsList + * deserializeAws_json1_1PublicKeyList */ -const de_TagsList = (output: any, context: __SerdeContext): Tag[] => { +const de_PublicKeyList = (output: any, context: __SerdeContext): PublicKey[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_PublicKey(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Trail - */ -const de_Trail = (output: any, context: __SerdeContext): Trail => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - CloudWatchLogsRoleArn: __expectString(output.CloudWatchLogsRoleArn), - HasCustomEventSelectors: __expectBoolean(output.HasCustomEventSelectors), - HasInsightSelectors: __expectBoolean(output.HasInsightSelectors), - HomeRegion: __expectString(output.HomeRegion), - IncludeGlobalServiceEvents: __expectBoolean(output.IncludeGlobalServiceEvents), - IsMultiRegionTrail: __expectBoolean(output.IsMultiRegionTrail), - IsOrganizationTrail: __expectBoolean(output.IsOrganizationTrail), - KmsKeyId: __expectString(output.KmsKeyId), - LogFileValidationEnabled: __expectBoolean(output.LogFileValidationEnabled), - Name: __expectString(output.Name), - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - SnsTopicARN: __expectString(output.SnsTopicARN), - SnsTopicName: __expectString(output.SnsTopicName), - TrailARN: __expectString(output.TrailARN), - } as any; -}; - -/** - * deserializeAws_json1_1TrailAlreadyExistsException - */ -const de_TrailAlreadyExistsException = (output: any, context: __SerdeContext): TrailAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PutEventSelectorsResponse omitted. -/** - * deserializeAws_json1_1TrailInfo - */ -const de_TrailInfo = (output: any, context: __SerdeContext): TrailInfo => { - return { - HomeRegion: __expectString(output.HomeRegion), - Name: __expectString(output.Name), - TrailARN: __expectString(output.TrailARN), - } as any; -}; +// de_PutInsightSelectorsResponse omitted. + +// de_PutResourcePolicyResponse omitted. /** - * deserializeAws_json1_1TrailList + * deserializeAws_json1_1Queries */ -const de_TrailList = (output: any, context: __SerdeContext): Trail[] => { +const de_Queries = (output: any, context: __SerdeContext): Query[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Trail(entry, context); + return de_Query(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1TrailNotFoundException + * deserializeAws_json1_1Query */ -const de_TrailNotFoundException = (output: any, context: __SerdeContext): TrailNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_Query = (output: any, context: __SerdeContext): Query => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + QueryId: __expectString, + QueryStatus: __expectString, + }) as any; }; +// de_QueryIdNotFoundException omitted. + +// de_QueryResultColumn omitted. + +// de_QueryResultRow omitted. + +// de_QueryResultRows omitted. + +// de_QueryStatistics omitted. + /** - * deserializeAws_json1_1TrailNotProvidedException + * deserializeAws_json1_1QueryStatisticsForDescribeQuery */ -const de_TrailNotProvidedException = (output: any, context: __SerdeContext): TrailNotProvidedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_QueryStatisticsForDescribeQuery = (output: any, context: __SerdeContext): QueryStatisticsForDescribeQuery => { + return take(output, { + BytesScanned: __expectLong, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventsMatched: __expectLong, + EventsScanned: __expectLong, + ExecutionTimeInMillis: __expectInt32, + }) as any; }; +// de_RegisterOrganizationDelegatedAdminResponse omitted. + +// de_RemoveTagsResponse omitted. + +// de_Resource omitted. + +// de_ResourceARNNotValidException omitted. + +// de_ResourceList omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourcePolicyNotFoundException omitted. + +// de_ResourcePolicyNotValidException omitted. + +// de_ResourceTag omitted. + +// de_ResourceTagList omitted. + +// de_ResourceTypeNotSupportedException omitted. + /** - * deserializeAws_json1_1Trails + * deserializeAws_json1_1RestoreEventDataStoreResponse */ -const de_Trails = (output: any, context: __SerdeContext): TrailInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrailInfo(entry, context); - }); - return retVal; +const de_RestoreEventDataStoreResponse = (output: any, context: __SerdeContext): RestoreEventDataStoreResponse => { + return take(output, { + AdvancedEventSelectors: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventDataStoreArn: __expectString, + KmsKeyId: __expectString, + MultiRegionEnabled: __expectBoolean, + Name: __expectString, + OrganizationEnabled: __expectBoolean, + RetentionPeriod: __expectInt32, + Status: __expectString, + TerminationProtectionEnabled: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_S3BucketDoesNotExistException omitted. + +// de_S3ImportSource omitted. + +// de_SourceConfig omitted. + /** - * deserializeAws_json1_1UnsupportedOperationException + * deserializeAws_json1_1StartImportResponse */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - Message: __expectString(output.Message), - } as any; +const de_StartImportResponse = (output: any, context: __SerdeContext): StartImportResponse => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destinations: _json, + EndEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImportId: __expectString, + ImportSource: _json, + ImportStatus: __expectString, + StartEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_StartLoggingResponse omitted. + +// de_StartQueryResponse omitted. + /** - * deserializeAws_json1_1UpdateChannelResponse + * deserializeAws_json1_1StopImportResponse */ -const de_UpdateChannelResponse = (output: any, context: __SerdeContext): UpdateChannelResponse => { - return { - ChannelArn: __expectString(output.ChannelArn), - Destinations: output.Destinations != null ? de_Destinations(output.Destinations, context) : undefined, - Name: __expectString(output.Name), - Source: __expectString(output.Source), - } as any; +const de_StopImportResponse = (output: any, context: __SerdeContext): StopImportResponse => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destinations: _json, + EndEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImportId: __expectString, + ImportSource: _json, + ImportStatistics: _json, + ImportStatus: __expectString, + StartEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_StopLoggingResponse omitted. + +// de_Tag omitted. + +// de_TagsLimitExceededException omitted. + +// de_TagsList omitted. + +// de_Trail omitted. + +// de_TrailAlreadyExistsException omitted. + +// de_TrailInfo omitted. + +// de_TrailList omitted. + +// de_TrailNotFoundException omitted. + +// de_TrailNotProvidedException omitted. + +// de_Trails omitted. + +// de_UnsupportedOperationException omitted. + +// de_UpdateChannelResponse omitted. + /** * deserializeAws_json1_1UpdateEventDataStoreResponse */ const de_UpdateEventDataStoreResponse = (output: any, context: __SerdeContext): UpdateEventDataStoreResponse => { - return { - AdvancedEventSelectors: - output.AdvancedEventSelectors != null - ? de_AdvancedEventSelectors(output.AdvancedEventSelectors, context) - : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EventDataStoreArn: __expectString(output.EventDataStoreArn), - KmsKeyId: __expectString(output.KmsKeyId), - MultiRegionEnabled: __expectBoolean(output.MultiRegionEnabled), - Name: __expectString(output.Name), - OrganizationEnabled: __expectBoolean(output.OrganizationEnabled), - RetentionPeriod: __expectInt32(output.RetentionPeriod), - Status: __expectString(output.Status), - TerminationProtectionEnabled: __expectBoolean(output.TerminationProtectionEnabled), - UpdatedTimestamp: - output.UpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1UpdateTrailResponse - */ -const de_UpdateTrailResponse = (output: any, context: __SerdeContext): UpdateTrailResponse => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - CloudWatchLogsRoleArn: __expectString(output.CloudWatchLogsRoleArn), - IncludeGlobalServiceEvents: __expectBoolean(output.IncludeGlobalServiceEvents), - IsMultiRegionTrail: __expectBoolean(output.IsMultiRegionTrail), - IsOrganizationTrail: __expectBoolean(output.IsOrganizationTrail), - KmsKeyId: __expectString(output.KmsKeyId), - LogFileValidationEnabled: __expectBoolean(output.LogFileValidationEnabled), - Name: __expectString(output.Name), - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - SnsTopicARN: __expectString(output.SnsTopicARN), - SnsTopicName: __expectString(output.SnsTopicName), - TrailARN: __expectString(output.TrailARN), - } as any; -}; + return take(output, { + AdvancedEventSelectors: _json, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventDataStoreArn: __expectString, + KmsKeyId: __expectString, + MultiRegionEnabled: __expectBoolean, + Name: __expectString, + OrganizationEnabled: __expectBoolean, + RetentionPeriod: __expectInt32, + Status: __expectString, + TerminationProtectionEnabled: __expectBoolean, + UpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_UpdateTrailResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -8238,6 +6149,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudwatch-events/src/protocols/Aws_json1_1.ts b/clients/client-cloudwatch-events/src/protocols/Aws_json1_1.ts index c7bf623a50df..fe342c78ccaf 100644 --- a/clients/client-cloudwatch-events/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudwatch-events/src/protocols/Aws_json1_1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -127,19 +128,13 @@ import { BatchParameters, BatchRetryStrategy, CancelReplayRequest, - CancelReplayResponse, CapacityProviderStrategyItem, ConcurrentModificationException, Condition, Connection, - ConnectionApiKeyAuthResponseParameters, - ConnectionAuthResponseParameters, - ConnectionBasicAuthResponseParameters, ConnectionBodyParameter, ConnectionHeaderParameter, ConnectionHttpParameters, - ConnectionOAuthClientResponseParameters, - ConnectionOAuthResponseParameters, ConnectionQueryStringParameter, CreateApiDestinationRequest, CreateApiDestinationResponse, @@ -153,17 +148,13 @@ import { CreateConnectionRequest, CreateConnectionResponse, CreateEventBusRequest, - CreateEventBusResponse, CreatePartnerEventSourceRequest, - CreatePartnerEventSourceResponse, DeactivateEventSourceRequest, DeadLetterConfig, DeauthorizeConnectionRequest, DeauthorizeConnectionResponse, DeleteApiDestinationRequest, - DeleteApiDestinationResponse, DeleteArchiveRequest, - DeleteArchiveResponse, DeleteConnectionRequest, DeleteConnectionResponse, DeleteEventBusRequest, @@ -176,19 +167,15 @@ import { DescribeConnectionRequest, DescribeConnectionResponse, DescribeEventBusRequest, - DescribeEventBusResponse, DescribeEventSourceRequest, DescribeEventSourceResponse, DescribePartnerEventSourceRequest, - DescribePartnerEventSourceResponse, DescribeReplayRequest, DescribeReplayResponse, DescribeRuleRequest, - DescribeRuleResponse, DisableRuleRequest, EcsParameters, EnableRuleRequest, - EventBus, EventSource, HttpParameters, IllegalStatusException, @@ -205,56 +192,39 @@ import { ListConnectionsRequest, ListConnectionsResponse, ListEventBusesRequest, - ListEventBusesResponse, ListEventSourcesRequest, ListEventSourcesResponse, ListPartnerEventSourceAccountsRequest, ListPartnerEventSourceAccountsResponse, ListPartnerEventSourcesRequest, - ListPartnerEventSourcesResponse, ListReplaysRequest, ListReplaysResponse, ListRuleNamesByTargetRequest, - ListRuleNamesByTargetResponse, ListRulesRequest, - ListRulesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTargetsByRuleRequest, - ListTargetsByRuleResponse, ManagedRuleException, NetworkConfiguration, OperationDisabledException, - PartnerEventSource, PartnerEventSourceAccount, PlacementConstraint, PlacementStrategy, PolicyLengthExceededException, PutEventsRequest, PutEventsRequestEntry, - PutEventsResponse, - PutEventsResultEntry, PutPartnerEventsRequest, PutPartnerEventsRequestEntry, - PutPartnerEventsResponse, - PutPartnerEventsResultEntry, PutPermissionRequest, PutRuleRequest, - PutRuleResponse, PutTargetsRequest, - PutTargetsResponse, - PutTargetsResultEntry, RedshiftDataParameters, RemovePermissionRequest, RemoveTargetsRequest, - RemoveTargetsResponse, - RemoveTargetsResultEntry, Replay, ReplayDestination, ResourceAlreadyExistsException, ResourceNotFoundException, RetryPolicy, - Rule, RunCommandParameters, RunCommandTarget, SageMakerPipelineParameter, @@ -264,12 +234,9 @@ import { StartReplayResponse, Tag, TagResourceRequest, - TagResourceResponse, Target, TestEventPatternRequest, - TestEventPatternResponse, UntagResourceRequest, - UntagResourceResponse, UpdateApiDestinationRequest, UpdateApiDestinationResponse, UpdateArchiveRequest, @@ -292,7 +259,7 @@ export const se_ActivateEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ActivateEventSource"); let body: any; - body = JSON.stringify(se_ActivateEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -305,7 +272,7 @@ export const se_CancelReplayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelReplay"); let body: any; - body = JSON.stringify(se_CancelReplayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -318,7 +285,7 @@ export const se_CreateApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApiDestination"); let body: any; - body = JSON.stringify(se_CreateApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -331,7 +298,7 @@ export const se_CreateArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateArchive"); let body: any; - body = JSON.stringify(se_CreateArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -344,7 +311,7 @@ export const se_CreateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnection"); let body: any; - body = JSON.stringify(se_CreateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -357,7 +324,7 @@ export const se_CreateEventBusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEventBus"); let body: any; - body = JSON.stringify(se_CreateEventBusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,7 +337,7 @@ export const se_CreatePartnerEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePartnerEventSource"); let body: any; - body = JSON.stringify(se_CreatePartnerEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -383,7 +350,7 @@ export const se_DeactivateEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeactivateEventSource"); let body: any; - body = JSON.stringify(se_DeactivateEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -396,7 +363,7 @@ export const se_DeauthorizeConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeauthorizeConnection"); let body: any; - body = JSON.stringify(se_DeauthorizeConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -409,7 +376,7 @@ export const se_DeleteApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApiDestination"); let body: any; - body = JSON.stringify(se_DeleteApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -422,7 +389,7 @@ export const se_DeleteArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteArchive"); let body: any; - body = JSON.stringify(se_DeleteArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -435,7 +402,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -448,7 +415,7 @@ export const se_DeleteEventBusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventBus"); let body: any; - body = JSON.stringify(se_DeleteEventBusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,7 +428,7 @@ export const se_DeletePartnerEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePartnerEventSource"); let body: any; - body = JSON.stringify(se_DeletePartnerEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -474,7 +441,7 @@ export const se_DeleteRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRule"); let body: any; - body = JSON.stringify(se_DeleteRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -487,7 +454,7 @@ export const se_DescribeApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApiDestination"); let body: any; - body = JSON.stringify(se_DescribeApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -500,7 +467,7 @@ export const se_DescribeArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeArchive"); let body: any; - body = JSON.stringify(se_DescribeArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -513,7 +480,7 @@ export const se_DescribeConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnection"); let body: any; - body = JSON.stringify(se_DescribeConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -526,7 +493,7 @@ export const se_DescribeEventBusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventBus"); let body: any; - body = JSON.stringify(se_DescribeEventBusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -539,7 +506,7 @@ export const se_DescribeEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventSource"); let body: any; - body = JSON.stringify(se_DescribeEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -552,7 +519,7 @@ export const se_DescribePartnerEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePartnerEventSource"); let body: any; - body = JSON.stringify(se_DescribePartnerEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -565,7 +532,7 @@ export const se_DescribeReplayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplay"); let body: any; - body = JSON.stringify(se_DescribeReplayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -578,7 +545,7 @@ export const se_DescribeRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRule"); let body: any; - body = JSON.stringify(se_DescribeRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -591,7 +558,7 @@ export const se_DisableRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableRule"); let body: any; - body = JSON.stringify(se_DisableRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -604,7 +571,7 @@ export const se_EnableRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableRule"); let body: any; - body = JSON.stringify(se_EnableRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -617,7 +584,7 @@ export const se_ListApiDestinationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApiDestinations"); let body: any; - body = JSON.stringify(se_ListApiDestinationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -630,7 +597,7 @@ export const se_ListArchivesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListArchives"); let body: any; - body = JSON.stringify(se_ListArchivesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -643,7 +610,7 @@ export const se_ListConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConnections"); let body: any; - body = JSON.stringify(se_ListConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -656,7 +623,7 @@ export const se_ListEventBusesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventBuses"); let body: any; - body = JSON.stringify(se_ListEventBusesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -669,7 +636,7 @@ export const se_ListEventSourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventSources"); let body: any; - body = JSON.stringify(se_ListEventSourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -682,7 +649,7 @@ export const se_ListPartnerEventSourceAccountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPartnerEventSourceAccounts"); let body: any; - body = JSON.stringify(se_ListPartnerEventSourceAccountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -695,7 +662,7 @@ export const se_ListPartnerEventSourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPartnerEventSources"); let body: any; - body = JSON.stringify(se_ListPartnerEventSourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -708,7 +675,7 @@ export const se_ListReplaysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReplays"); let body: any; - body = JSON.stringify(se_ListReplaysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -721,7 +688,7 @@ export const se_ListRuleNamesByTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuleNamesByTarget"); let body: any; - body = JSON.stringify(se_ListRuleNamesByTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -734,7 +701,7 @@ export const se_ListRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRules"); let body: any; - body = JSON.stringify(se_ListRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -747,7 +714,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -760,7 +727,7 @@ export const se_ListTargetsByRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTargetsByRule"); let body: any; - body = JSON.stringify(se_ListTargetsByRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -799,7 +766,7 @@ export const se_PutPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPermission"); let body: any; - body = JSON.stringify(se_PutPermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -812,7 +779,7 @@ export const se_PutRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRule"); let body: any; - body = JSON.stringify(se_PutRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -825,7 +792,7 @@ export const se_PutTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutTargets"); let body: any; - body = JSON.stringify(se_PutTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -838,7 +805,7 @@ export const se_RemovePermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemovePermission"); let body: any; - body = JSON.stringify(se_RemovePermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -851,7 +818,7 @@ export const se_RemoveTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTargets"); let body: any; - body = JSON.stringify(se_RemoveTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -877,7 +844,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -890,7 +857,7 @@ export const se_TestEventPatternCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestEventPattern"); let body: any; - body = JSON.stringify(se_TestEventPatternRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -903,7 +870,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -916,7 +883,7 @@ export const se_UpdateApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApiDestination"); let body: any; - body = JSON.stringify(se_UpdateApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -929,7 +896,7 @@ export const se_UpdateArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateArchive"); let body: any; - body = JSON.stringify(se_UpdateArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -942,7 +909,7 @@ export const se_UpdateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnection"); let body: any; - body = JSON.stringify(se_UpdateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -960,7 +927,7 @@ export const de_ActivateEventSourceCommand = async ( const response: ActivateEventSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -993,10 +960,9 @@ const de_ActivateEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1014,12 +980,12 @@ export const de_CancelReplayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelReplayResponse(data, context); + contents = _json(data); const response: CancelReplayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1049,10 +1015,9 @@ const de_CancelReplayCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1075,7 +1040,7 @@ export const de_CreateApiDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1105,10 +1070,9 @@ const de_CreateApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1131,7 +1095,7 @@ export const de_CreateArchiveCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1167,10 +1131,9 @@ const de_CreateArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1193,7 +1156,7 @@ export const de_CreateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1220,10 +1183,9 @@ const de_CreateConnectionCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1241,12 +1203,12 @@ export const de_CreateEventBusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEventBusResponse(data, context); + contents = _json(data); const response: CreateEventBusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1285,10 +1247,9 @@ const de_CreateEventBusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1306,12 +1267,12 @@ export const de_CreatePartnerEventSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePartnerEventSourceResponse(data, context); + contents = _json(data); const response: CreatePartnerEventSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1344,10 +1305,9 @@ const de_CreatePartnerEventSourceCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1367,7 +1327,7 @@ export const de_DeactivateEventSourceCommand = async ( const response: DeactivateEventSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1400,10 +1360,9 @@ const de_DeactivateEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1426,7 +1385,7 @@ export const de_DeauthorizeConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1453,10 +1412,9 @@ const de_DeauthorizeConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,12 +1432,12 @@ export const de_DeleteApiDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApiDestinationResponse(data, context); + contents = _json(data); const response: DeleteApiDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1506,10 +1464,9 @@ const de_DeleteApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1527,12 +1484,12 @@ export const de_DeleteArchiveCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteArchiveResponse(data, context); + contents = _json(data); const response: DeleteArchiveCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1559,10 +1516,9 @@ const de_DeleteArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1585,7 +1541,7 @@ export const de_DeleteConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1612,10 +1568,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1635,7 +1590,7 @@ export const de_DeleteEventBusCommand = async ( const response: DeleteEventBusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1659,10 +1614,9 @@ const de_DeleteEventBusCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1682,7 +1636,7 @@ export const de_DeletePartnerEventSourceCommand = async ( const response: DeletePartnerEventSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1709,10 +1663,9 @@ const de_DeletePartnerEventSourceCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1732,7 +1685,7 @@ export const de_DeleteRuleCommand = async ( const response: DeleteRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1762,10 +1715,9 @@ const de_DeleteRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1788,7 +1740,7 @@ export const de_DescribeApiDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1812,10 +1764,9 @@ const de_DescribeApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1838,7 +1789,7 @@ export const de_DescribeArchiveCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1865,10 +1816,9 @@ const de_DescribeArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1891,7 +1841,7 @@ export const de_DescribeConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1915,10 +1865,9 @@ const de_DescribeConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1936,12 +1885,12 @@ export const de_DescribeEventBusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEventBusResponse(data, context); + contents = _json(data); const response: DescribeEventBusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1965,10 +1914,9 @@ const de_DescribeEventBusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1991,7 +1939,7 @@ export const de_DescribeEventSourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2018,10 +1966,9 @@ const de_DescribeEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2039,12 +1986,12 @@ export const de_DescribePartnerEventSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePartnerEventSourceResponse(data, context); + contents = _json(data); const response: DescribePartnerEventSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2071,10 +2018,9 @@ const de_DescribePartnerEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2097,7 +2043,7 @@ export const de_DescribeReplayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2121,10 +2067,9 @@ const de_DescribeReplayCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2142,12 +2087,12 @@ export const de_DescribeRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRuleResponse(data, context); + contents = _json(data); const response: DescribeRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2171,10 +2116,9 @@ const de_DescribeRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2194,7 +2138,7 @@ export const de_DisableRuleCommand = async ( const response: DisableRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2224,10 +2168,9 @@ const de_DisableRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2247,7 +2190,7 @@ export const de_EnableRuleCommand = async ( const response: EnableRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2277,10 +2220,9 @@ const de_EnableRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2303,7 +2245,7 @@ export const de_ListApiDestinationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2324,10 +2266,9 @@ const de_ListApiDestinationsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2350,7 +2291,7 @@ export const de_ListArchivesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2374,10 +2315,9 @@ const de_ListArchivesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2400,7 +2340,7 @@ export const de_ListConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2421,10 +2361,9 @@ const de_ListConnectionsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2442,12 +2381,12 @@ export const de_ListEventBusesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEventBusesResponse(data, context); + contents = _json(data); const response: ListEventBusesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2468,10 +2407,9 @@ const de_ListEventBusesCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2494,7 +2432,7 @@ export const de_ListEventSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2518,10 +2456,9 @@ const de_ListEventSourcesCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2544,7 +2481,7 @@ export const de_ListPartnerEventSourceAccountsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2571,10 +2508,9 @@ const de_ListPartnerEventSourceAccountsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2592,12 +2528,12 @@ export const de_ListPartnerEventSourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPartnerEventSourcesResponse(data, context); + contents = _json(data); const response: ListPartnerEventSourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2621,10 +2557,9 @@ const de_ListPartnerEventSourcesCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2647,7 +2582,7 @@ export const de_ListReplaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2668,10 +2603,9 @@ const de_ListReplaysCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2689,12 +2623,12 @@ export const de_ListRuleNamesByTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRuleNamesByTargetResponse(data, context); + contents = _json(data); const response: ListRuleNamesByTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2718,10 +2652,9 @@ const de_ListRuleNamesByTargetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2739,12 +2672,12 @@ export const de_ListRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRulesResponse(data, context); + contents = _json(data); const response: ListRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2768,10 +2701,9 @@ const de_ListRulesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2789,12 +2721,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2818,10 +2750,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2839,12 +2770,12 @@ export const de_ListTargetsByRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTargetsByRuleResponse(data, context); + contents = _json(data); const response: ListTargetsByRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2868,10 +2799,9 @@ const de_ListTargetsByRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2889,12 +2819,12 @@ export const de_PutEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutEventsResponse(data, context); + contents = _json(data); const response: PutEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2915,10 +2845,9 @@ const de_PutEventsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2936,12 +2865,12 @@ export const de_PutPartnerEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPartnerEventsResponse(data, context); + contents = _json(data); const response: PutPartnerEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2965,10 +2894,9 @@ const de_PutPartnerEventsCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2988,7 +2916,7 @@ export const de_PutPermissionCommand = async ( const response: PutPermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3021,10 +2949,9 @@ const de_PutPermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3042,12 +2969,12 @@ export const de_PutRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRuleResponse(data, context); + contents = _json(data); const response: PutRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3083,10 +3010,9 @@ const de_PutRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3104,12 +3030,12 @@ export const de_PutTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutTargetsResponse(data, context); + contents = _json(data); const response: PutTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3142,10 +3068,9 @@ const de_PutTargetsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3165,7 +3090,7 @@ export const de_RemovePermissionCommand = async ( const response: RemovePermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3195,10 +3120,9 @@ const de_RemovePermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3216,12 +3140,12 @@ export const de_RemoveTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTargetsResponse(data, context); + contents = _json(data); const response: RemoveTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3251,10 +3175,9 @@ const de_RemoveTargetsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3277,7 +3200,7 @@ export const de_StartReplayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3310,10 +3233,9 @@ const de_StartReplayCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3331,12 +3253,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3366,10 +3288,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3387,12 +3308,12 @@ export const de_TestEventPatternCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestEventPatternResponse(data, context); + contents = _json(data); const response: TestEventPatternCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3416,10 +3337,9 @@ const de_TestEventPatternCommandError = async ( throw await de_InvalidEventPatternExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3437,12 +3357,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3472,10 +3392,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3498,7 +3417,7 @@ export const de_UpdateApiDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3528,10 +3447,9 @@ const de_UpdateApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3554,7 +3472,7 @@ export const de_UpdateArchiveCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3587,10 +3505,9 @@ const de_UpdateArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3613,7 +3530,7 @@ export const de_UpdateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3643,10 +3560,9 @@ const de_UpdateConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3660,7 +3576,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3676,7 +3592,7 @@ const de_IllegalStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IllegalStatusException(body, context); + const deserialized: any = _json(body); const exception = new IllegalStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3689,7 +3605,7 @@ const de_IllegalStatusExceptionRes = async ( */ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalException(body, context); + const deserialized: any = _json(body); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3705,7 +3621,7 @@ const de_InvalidEventPatternExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEventPatternException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEventPatternException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3721,7 +3637,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3737,7 +3653,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3753,7 +3669,7 @@ const de_ManagedRuleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ManagedRuleException(body, context); + const deserialized: any = _json(body); const exception = new ManagedRuleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3769,7 +3685,7 @@ const de_OperationDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationDisabledException(body, context); + const deserialized: any = _json(body); const exception = new OperationDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3785,7 +3701,7 @@ const de_PolicyLengthExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyLengthExceededException(body, context); + const deserialized: any = _json(body); const exception = new PolicyLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3801,7 +3717,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3817,7 +3733,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3825,3133 +3741,920 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActivateEventSourceRequest - */ -const se_ActivateEventSourceRequest = (input: ActivateEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_ActivateEventSourceRequest omitted. -/** - * serializeAws_json1_1AwsVpcConfiguration - */ -const se_AwsVpcConfiguration = (input: AwsVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }), - ...(input.SecurityGroups != null && { SecurityGroups: se_StringList(input.SecurityGroups, context) }), - ...(input.Subnets != null && { Subnets: se_StringList(input.Subnets, context) }), - }; -}; +// se_AwsVpcConfiguration omitted. -/** - * serializeAws_json1_1BatchArrayProperties - */ -const se_BatchArrayProperties = (input: BatchArrayProperties, context: __SerdeContext): any => { - return { - ...(input.Size != null && { Size: input.Size }), - }; -}; +// se_BatchArrayProperties omitted. -/** - * serializeAws_json1_1BatchParameters - */ -const se_BatchParameters = (input: BatchParameters, context: __SerdeContext): any => { - return { - ...(input.ArrayProperties != null && { ArrayProperties: se_BatchArrayProperties(input.ArrayProperties, context) }), - ...(input.JobDefinition != null && { JobDefinition: input.JobDefinition }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.RetryStrategy != null && { RetryStrategy: se_BatchRetryStrategy(input.RetryStrategy, context) }), - }; -}; +// se_BatchParameters omitted. -/** - * serializeAws_json1_1BatchRetryStrategy - */ -const se_BatchRetryStrategy = (input: BatchRetryStrategy, context: __SerdeContext): any => { - return { - ...(input.Attempts != null && { Attempts: input.Attempts }), - }; -}; +// se_BatchRetryStrategy omitted. -/** - * serializeAws_json1_1CancelReplayRequest - */ -const se_CancelReplayRequest = (input: CancelReplayRequest, context: __SerdeContext): any => { - return { - ...(input.ReplayName != null && { ReplayName: input.ReplayName }), - }; -}; +// se_CancelReplayRequest omitted. -/** - * serializeAws_json1_1CapacityProviderStrategy - */ -const se_CapacityProviderStrategy = (input: CapacityProviderStrategyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CapacityProviderStrategyItem(entry, context); - }); -}; +// se_CapacityProviderStrategy omitted. -/** - * serializeAws_json1_1CapacityProviderStrategyItem - */ -const se_CapacityProviderStrategyItem = (input: CapacityProviderStrategyItem, context: __SerdeContext): any => { - return { - ...(input.base != null && { base: input.base }), - ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_CapacityProviderStrategyItem omitted. -/** - * serializeAws_json1_1Condition - */ -const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Condition omitted. -/** - * serializeAws_json1_1ConnectionBodyParameter - */ -const se_ConnectionBodyParameter = (input: ConnectionBodyParameter, context: __SerdeContext): any => { - return { - ...(input.IsValueSecret != null && { IsValueSecret: input.IsValueSecret }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConnectionBodyParameter omitted. -/** - * serializeAws_json1_1ConnectionBodyParametersList - */ -const se_ConnectionBodyParametersList = (input: ConnectionBodyParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectionBodyParameter(entry, context); - }); -}; +// se_ConnectionBodyParametersList omitted. -/** - * serializeAws_json1_1ConnectionHeaderParameter - */ -const se_ConnectionHeaderParameter = (input: ConnectionHeaderParameter, context: __SerdeContext): any => { - return { - ...(input.IsValueSecret != null && { IsValueSecret: input.IsValueSecret }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConnectionHeaderParameter omitted. -/** - * serializeAws_json1_1ConnectionHeaderParametersList - */ -const se_ConnectionHeaderParametersList = (input: ConnectionHeaderParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectionHeaderParameter(entry, context); - }); -}; +// se_ConnectionHeaderParametersList omitted. -/** - * serializeAws_json1_1ConnectionHttpParameters - */ -const se_ConnectionHttpParameters = (input: ConnectionHttpParameters, context: __SerdeContext): any => { - return { - ...(input.BodyParameters != null && { - BodyParameters: se_ConnectionBodyParametersList(input.BodyParameters, context), - }), - ...(input.HeaderParameters != null && { - HeaderParameters: se_ConnectionHeaderParametersList(input.HeaderParameters, context), - }), - ...(input.QueryStringParameters != null && { - QueryStringParameters: se_ConnectionQueryStringParametersList(input.QueryStringParameters, context), - }), - }; -}; +// se_ConnectionHttpParameters omitted. -/** - * serializeAws_json1_1ConnectionQueryStringParameter - */ -const se_ConnectionQueryStringParameter = (input: ConnectionQueryStringParameter, context: __SerdeContext): any => { - return { - ...(input.IsValueSecret != null && { IsValueSecret: input.IsValueSecret }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConnectionQueryStringParameter omitted. -/** - * serializeAws_json1_1ConnectionQueryStringParametersList - */ -const se_ConnectionQueryStringParametersList = ( - input: ConnectionQueryStringParameter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectionQueryStringParameter(entry, context); - }); -}; +// se_ConnectionQueryStringParametersList omitted. -/** - * serializeAws_json1_1CreateApiDestinationRequest - */ -const se_CreateApiDestinationRequest = (input: CreateApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.InvocationEndpoint != null && { InvocationEndpoint: input.InvocationEndpoint }), - ...(input.InvocationRateLimitPerSecond != null && { - InvocationRateLimitPerSecond: input.InvocationRateLimitPerSecond, - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateApiDestinationRequest omitted. -/** - * serializeAws_json1_1CreateArchiveRequest - */ -const se_CreateArchiveRequest = (input: CreateArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; +// se_CreateArchiveRequest omitted. -/** - * serializeAws_json1_1CreateConnectionApiKeyAuthRequestParameters - */ -const se_CreateConnectionApiKeyAuthRequestParameters = ( - input: CreateConnectionApiKeyAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyName != null && { ApiKeyName: input.ApiKeyName }), - ...(input.ApiKeyValue != null && { ApiKeyValue: input.ApiKeyValue }), - }; -}; +// se_CreateConnectionApiKeyAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionAuthRequestParameters - */ -const se_CreateConnectionAuthRequestParameters = ( - input: CreateConnectionAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyAuthParameters != null && { - ApiKeyAuthParameters: se_CreateConnectionApiKeyAuthRequestParameters(input.ApiKeyAuthParameters, context), - }), - ...(input.BasicAuthParameters != null && { - BasicAuthParameters: se_CreateConnectionBasicAuthRequestParameters(input.BasicAuthParameters, context), - }), - ...(input.InvocationHttpParameters != null && { - InvocationHttpParameters: se_ConnectionHttpParameters(input.InvocationHttpParameters, context), - }), - ...(input.OAuthParameters != null && { - OAuthParameters: se_CreateConnectionOAuthRequestParameters(input.OAuthParameters, context), - }), - }; -}; +// se_CreateConnectionAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionBasicAuthRequestParameters - */ -const se_CreateConnectionBasicAuthRequestParameters = ( - input: CreateConnectionBasicAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_CreateConnectionBasicAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionOAuthClientRequestParameters - */ -const se_CreateConnectionOAuthClientRequestParameters = ( - input: CreateConnectionOAuthClientRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ClientID != null && { ClientID: input.ClientID }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - }; -}; +// se_CreateConnectionOAuthClientRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionOAuthRequestParameters - */ -const se_CreateConnectionOAuthRequestParameters = ( - input: CreateConnectionOAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizationEndpoint != null && { AuthorizationEndpoint: input.AuthorizationEndpoint }), - ...(input.ClientParameters != null && { - ClientParameters: se_CreateConnectionOAuthClientRequestParameters(input.ClientParameters, context), - }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.OAuthHttpParameters != null && { - OAuthHttpParameters: se_ConnectionHttpParameters(input.OAuthHttpParameters, context), - }), - }; -}; +// se_CreateConnectionOAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionRequest - */ -const se_CreateConnectionRequest = (input: CreateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.AuthParameters != null && { - AuthParameters: se_CreateConnectionAuthRequestParameters(input.AuthParameters, context), - }), - ...(input.AuthorizationType != null && { AuthorizationType: input.AuthorizationType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateConnectionRequest omitted. -/** - * serializeAws_json1_1CreateEventBusRequest - */ -const se_CreateEventBusRequest = (input: CreateEventBusRequest, context: __SerdeContext): any => { - return { - ...(input.EventSourceName != null && { EventSourceName: input.EventSourceName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateEventBusRequest omitted. -/** - * serializeAws_json1_1CreatePartnerEventSourceRequest - */ -const se_CreatePartnerEventSourceRequest = (input: CreatePartnerEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Account != null && { Account: input.Account }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreatePartnerEventSourceRequest omitted. -/** - * serializeAws_json1_1DeactivateEventSourceRequest - */ -const se_DeactivateEventSourceRequest = (input: DeactivateEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeactivateEventSourceRequest omitted. -/** - * serializeAws_json1_1DeadLetterConfig - */ -const se_DeadLetterConfig = (input: DeadLetterConfig, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_DeadLetterConfig omitted. -/** - * serializeAws_json1_1DeauthorizeConnectionRequest - */ -const se_DeauthorizeConnectionRequest = (input: DeauthorizeConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeauthorizeConnectionRequest omitted. -/** - * serializeAws_json1_1DeleteApiDestinationRequest - */ -const se_DeleteApiDestinationRequest = (input: DeleteApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteApiDestinationRequest omitted. -/** - * serializeAws_json1_1DeleteArchiveRequest - */ -const se_DeleteArchiveRequest = (input: DeleteArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - }; -}; +// se_DeleteArchiveRequest omitted. -/** - * serializeAws_json1_1DeleteConnectionRequest - */ -const se_DeleteConnectionRequest = (input: DeleteConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteConnectionRequest omitted. -/** - * serializeAws_json1_1DeleteEventBusRequest - */ -const se_DeleteEventBusRequest = (input: DeleteEventBusRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteEventBusRequest omitted. -/** - * serializeAws_json1_1DeletePartnerEventSourceRequest - */ -const se_DeletePartnerEventSourceRequest = (input: DeletePartnerEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Account != null && { Account: input.Account }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeletePartnerEventSourceRequest omitted. -/** - * serializeAws_json1_1DeleteRuleRequest - */ -const se_DeleteRuleRequest = (input: DeleteRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Force != null && { Force: input.Force }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteRuleRequest omitted. -/** - * serializeAws_json1_1DescribeApiDestinationRequest - */ -const se_DescribeApiDestinationRequest = (input: DescribeApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeApiDestinationRequest omitted. -/** - * serializeAws_json1_1DescribeArchiveRequest - */ -const se_DescribeArchiveRequest = (input: DescribeArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - }; -}; +// se_DescribeArchiveRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionRequest - */ -const se_DescribeConnectionRequest = (input: DescribeConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeConnectionRequest omitted. -/** - * serializeAws_json1_1DescribeEventBusRequest - */ -const se_DescribeEventBusRequest = (input: DescribeEventBusRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeEventBusRequest omitted. -/** - * serializeAws_json1_1DescribeEventSourceRequest - */ -const se_DescribeEventSourceRequest = (input: DescribeEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeEventSourceRequest omitted. -/** - * serializeAws_json1_1DescribePartnerEventSourceRequest - */ -const se_DescribePartnerEventSourceRequest = ( - input: DescribePartnerEventSourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribePartnerEventSourceRequest omitted. -/** - * serializeAws_json1_1DescribeReplayRequest - */ -const se_DescribeReplayRequest = (input: DescribeReplayRequest, context: __SerdeContext): any => { - return { - ...(input.ReplayName != null && { ReplayName: input.ReplayName }), - }; -}; +// se_DescribeReplayRequest omitted. -/** - * serializeAws_json1_1DescribeRuleRequest - */ -const se_DescribeRuleRequest = (input: DescribeRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeRuleRequest omitted. -/** - * serializeAws_json1_1DisableRuleRequest - */ -const se_DisableRuleRequest = (input: DisableRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DisableRuleRequest omitted. -/** - * serializeAws_json1_1EcsParameters - */ -const se_EcsParameters = (input: EcsParameters, context: __SerdeContext): any => { - return { - ...(input.CapacityProviderStrategy != null && { - CapacityProviderStrategy: se_CapacityProviderStrategy(input.CapacityProviderStrategy, context), - }), - ...(input.EnableECSManagedTags != null && { EnableECSManagedTags: input.EnableECSManagedTags }), - ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }), - ...(input.Group != null && { Group: input.Group }), - ...(input.LaunchType != null && { LaunchType: input.LaunchType }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.PlacementConstraints != null && { - PlacementConstraints: se_PlacementConstraints(input.PlacementConstraints, context), - }), - ...(input.PlacementStrategy != null && { - PlacementStrategy: se_PlacementStrategies(input.PlacementStrategy, context), - }), - ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }), - ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TaskCount != null && { TaskCount: input.TaskCount }), - ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }), - }; -}; +// se_EcsParameters omitted. -/** - * serializeAws_json1_1EnableRuleRequest - */ -const se_EnableRuleRequest = (input: EnableRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_EnableRuleRequest omitted. -/** - * serializeAws_json1_1EventResourceList - */ -const se_EventResourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventResourceList omitted. -/** - * serializeAws_json1_1HeaderParametersMap - */ -const se_HeaderParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_HeaderParametersMap omitted. -/** - * serializeAws_json1_1HttpParameters - */ -const se_HttpParameters = (input: HttpParameters, context: __SerdeContext): any => { - return { - ...(input.HeaderParameters != null && { - HeaderParameters: se_HeaderParametersMap(input.HeaderParameters, context), - }), - ...(input.PathParameterValues != null && { - PathParameterValues: se_PathParameterList(input.PathParameterValues, context), - }), - ...(input.QueryStringParameters != null && { - QueryStringParameters: se_QueryStringParametersMap(input.QueryStringParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1InputTransformer - */ -const se_InputTransformer = (input: InputTransformer, context: __SerdeContext): any => { - return { - ...(input.InputPathsMap != null && { InputPathsMap: se_TransformerPaths(input.InputPathsMap, context) }), - ...(input.InputTemplate != null && { InputTemplate: input.InputTemplate }), - }; -}; - -/** - * serializeAws_json1_1KinesisParameters - */ -const se_KinesisParameters = (input: KinesisParameters, context: __SerdeContext): any => { - return { - ...(input.PartitionKeyPath != null && { PartitionKeyPath: input.PartitionKeyPath }), - }; -}; - -/** - * serializeAws_json1_1ListApiDestinationsRequest - */ -const se_ListApiDestinationsRequest = (input: ListApiDestinationsRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListArchivesRequest - */ -const se_ListArchivesRequest = (input: ListArchivesRequest, context: __SerdeContext): any => { - return { - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_json1_1ListConnectionsRequest - */ -const se_ListConnectionsRequest = (input: ListConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionState != null && { ConnectionState: input.ConnectionState }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEventBusesRequest - */ -const se_ListEventBusesRequest = (input: ListEventBusesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEventSourcesRequest - */ -const se_ListEventSourcesRequest = (input: ListEventSourcesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListPartnerEventSourceAccountsRequest - */ -const se_ListPartnerEventSourceAccountsRequest = ( - input: ListPartnerEventSourceAccountsRequest, - context: __SerdeContext -): any => { - return { - ...(input.EventSourceName != null && { EventSourceName: input.EventSourceName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListPartnerEventSourcesRequest - */ -const se_ListPartnerEventSourcesRequest = (input: ListPartnerEventSourcesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListReplaysRequest - */ -const se_ListReplaysRequest = (input: ListReplaysRequest, context: __SerdeContext): any => { - return { - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_json1_1ListRuleNamesByTargetRequest - */ -const se_ListRuleNamesByTargetRequest = (input: ListRuleNamesByTargetRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }; -}; - -/** - * serializeAws_json1_1ListRulesRequest - */ -const se_ListRulesRequest = (input: ListRulesRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; - -/** - * serializeAws_json1_1ListTargetsByRuleRequest - */ -const se_ListTargetsByRuleRequest = (input: ListTargetsByRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Rule != null && { Rule: input.Rule }), - }; -}; - -/** - * serializeAws_json1_1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.awsvpcConfiguration != null && { - awsvpcConfiguration: se_AwsVpcConfiguration(input.awsvpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1PathParameterList - */ -const se_PathParameterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PlacementConstraint - */ -const se_PlacementConstraint = (input: PlacementConstraint, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1PlacementConstraints - */ -const se_PlacementConstraints = (input: PlacementConstraint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementConstraint(entry, context); - }); -}; - -/** - * serializeAws_json1_1PlacementStrategies - */ -const se_PlacementStrategies = (input: PlacementStrategy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementStrategy(entry, context); - }); -}; - -/** - * serializeAws_json1_1PlacementStrategy - */ -const se_PlacementStrategy = (input: PlacementStrategy, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1PutEventsRequest - */ -const se_PutEventsRequest = (input: PutEventsRequest, context: __SerdeContext): any => { - return { - ...(input.Entries != null && { Entries: se_PutEventsRequestEntryList(input.Entries, context) }), - }; -}; - -/** - * serializeAws_json1_1PutEventsRequestEntry - */ -const se_PutEventsRequestEntry = (input: PutEventsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.Detail != null && { Detail: input.Detail }), - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Resources != null && { Resources: se_EventResourceList(input.Resources, context) }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Time != null && { Time: Math.round(input.Time.getTime() / 1000) }), - ...(input.TraceHeader != null && { TraceHeader: input.TraceHeader }), - }; -}; - -/** - * serializeAws_json1_1PutEventsRequestEntryList - */ -const se_PutEventsRequestEntryList = (input: PutEventsRequestEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutEventsRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutPartnerEventsRequest - */ -const se_PutPartnerEventsRequest = (input: PutPartnerEventsRequest, context: __SerdeContext): any => { - return { - ...(input.Entries != null && { Entries: se_PutPartnerEventsRequestEntryList(input.Entries, context) }), - }; -}; - -/** - * serializeAws_json1_1PutPartnerEventsRequestEntry - */ -const se_PutPartnerEventsRequestEntry = (input: PutPartnerEventsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.Detail != null && { Detail: input.Detail }), - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.Resources != null && { Resources: se_EventResourceList(input.Resources, context) }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Time != null && { Time: Math.round(input.Time.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1PutPartnerEventsRequestEntryList - */ -const se_PutPartnerEventsRequestEntryList = (input: PutPartnerEventsRequestEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutPartnerEventsRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutPermissionRequest - */ -const se_PutPermissionRequest = (input: PutPermissionRequest, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Condition != null && { Condition: se_Condition(input.Condition, context) }), - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.Principal != null && { Principal: input.Principal }), - ...(input.StatementId != null && { StatementId: input.StatementId }), - }; -}; - -/** - * serializeAws_json1_1PutRuleRequest - */ -const se_PutRuleRequest = (input: PutRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.State != null && { State: input.State }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutTargetsRequest - */ -const se_PutTargetsRequest = (input: PutTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Rule != null && { Rule: input.Rule }), - ...(input.Targets != null && { Targets: se_TargetList(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1QueryStringParametersMap - */ -const se_QueryStringParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1RedshiftDataParameters - */ -const se_RedshiftDataParameters = (input: RedshiftDataParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }), - ...(input.Sql != null && { Sql: input.Sql }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WithEvent != null && { WithEvent: input.WithEvent }), - }; -}; - -/** - * serializeAws_json1_1RemovePermissionRequest - */ -const se_RemovePermissionRequest = (input: RemovePermissionRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.RemoveAllPermissions != null && { RemoveAllPermissions: input.RemoveAllPermissions }), - ...(input.StatementId != null && { StatementId: input.StatementId }), - }; -}; - -/** - * serializeAws_json1_1RemoveTargetsRequest - */ -const se_RemoveTargetsRequest = (input: RemoveTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Force != null && { Force: input.Force }), - ...(input.Ids != null && { Ids: se_TargetIdList(input.Ids, context) }), - ...(input.Rule != null && { Rule: input.Rule }), - }; -}; - -/** - * serializeAws_json1_1ReplayDestination - */ -const se_ReplayDestination = (input: ReplayDestination, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.FilterArns != null && { FilterArns: se_ReplayDestinationFilters(input.FilterArns, context) }), - }; -}; - -/** - * serializeAws_json1_1ReplayDestinationFilters - */ -const se_ReplayDestinationFilters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RetryPolicy - */ -const se_RetryPolicy = (input: RetryPolicy, context: __SerdeContext): any => { - return { - ...(input.MaximumEventAgeInSeconds != null && { MaximumEventAgeInSeconds: input.MaximumEventAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - }; -}; - -/** - * serializeAws_json1_1RunCommandParameters - */ -const se_RunCommandParameters = (input: RunCommandParameters, context: __SerdeContext): any => { - return { - ...(input.RunCommandTargets != null && { - RunCommandTargets: se_RunCommandTargets(input.RunCommandTargets, context), - }), - }; -}; - -/** - * serializeAws_json1_1RunCommandTarget - */ -const se_RunCommandTarget = (input: RunCommandTarget, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_RunCommandTargetValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1RunCommandTargets - */ -const se_RunCommandTargets = (input: RunCommandTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RunCommandTarget(entry, context); - }); -}; - -/** - * serializeAws_json1_1RunCommandTargetValues - */ -const se_RunCommandTargetValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SageMakerPipelineParameter - */ -const se_SageMakerPipelineParameter = (input: SageMakerPipelineParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1SageMakerPipelineParameterList - */ -const se_SageMakerPipelineParameterList = (input: SageMakerPipelineParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SageMakerPipelineParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1SageMakerPipelineParameters - */ -const se_SageMakerPipelineParameters = (input: SageMakerPipelineParameters, context: __SerdeContext): any => { - return { - ...(input.PipelineParameterList != null && { - PipelineParameterList: se_SageMakerPipelineParameterList(input.PipelineParameterList, context), - }), - }; -}; - -/** - * serializeAws_json1_1SqsParameters - */ -const se_SqsParameters = (input: SqsParameters, context: __SerdeContext): any => { - return { - ...(input.MessageGroupId != null && { MessageGroupId: input.MessageGroupId }), - }; -}; - -/** - * serializeAws_json1_1StartReplayRequest - */ -const se_StartReplayRequest = (input: StartReplayRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Destination != null && { Destination: se_ReplayDestination(input.Destination, context) }), - ...(input.EventEndTime != null && { EventEndTime: Math.round(input.EventEndTime.getTime() / 1000) }), - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.EventStartTime != null && { EventStartTime: Math.round(input.EventStartTime.getTime() / 1000) }), - ...(input.ReplayName != null && { ReplayName: input.ReplayName }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.BatchParameters != null && { BatchParameters: se_BatchParameters(input.BatchParameters, context) }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.EcsParameters != null && { EcsParameters: se_EcsParameters(input.EcsParameters, context) }), - ...(input.HttpParameters != null && { HttpParameters: se_HttpParameters(input.HttpParameters, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Input != null && { Input: input.Input }), - ...(input.InputPath != null && { InputPath: input.InputPath }), - ...(input.InputTransformer != null && { InputTransformer: se_InputTransformer(input.InputTransformer, context) }), - ...(input.KinesisParameters != null && { - KinesisParameters: se_KinesisParameters(input.KinesisParameters, context), - }), - ...(input.RedshiftDataParameters != null && { - RedshiftDataParameters: se_RedshiftDataParameters(input.RedshiftDataParameters, context), - }), - ...(input.RetryPolicy != null && { RetryPolicy: se_RetryPolicy(input.RetryPolicy, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RunCommandParameters != null && { - RunCommandParameters: se_RunCommandParameters(input.RunCommandParameters, context), - }), - ...(input.SageMakerPipelineParameters != null && { - SageMakerPipelineParameters: se_SageMakerPipelineParameters(input.SageMakerPipelineParameters, context), - }), - ...(input.SqsParameters != null && { SqsParameters: se_SqsParameters(input.SqsParameters, context) }), - }; -}; - -/** - * serializeAws_json1_1TargetIdList - */ -const se_TargetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TargetList - */ -const se_TargetList = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; - -/** - * serializeAws_json1_1TestEventPatternRequest - */ -const se_TestEventPatternRequest = (input: TestEventPatternRequest, context: __SerdeContext): any => { - return { - ...(input.Event != null && { Event: input.Event }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - }; -}; - -/** - * serializeAws_json1_1TransformerPaths - */ -const se_TransformerPaths = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateApiDestinationRequest - */ -const se_UpdateApiDestinationRequest = (input: UpdateApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.InvocationEndpoint != null && { InvocationEndpoint: input.InvocationEndpoint }), - ...(input.InvocationRateLimitPerSecond != null && { - InvocationRateLimitPerSecond: input.InvocationRateLimitPerSecond, - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateArchiveRequest - */ -const se_UpdateArchiveRequest = (input: UpdateArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionApiKeyAuthRequestParameters - */ -const se_UpdateConnectionApiKeyAuthRequestParameters = ( - input: UpdateConnectionApiKeyAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyName != null && { ApiKeyName: input.ApiKeyName }), - ...(input.ApiKeyValue != null && { ApiKeyValue: input.ApiKeyValue }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionAuthRequestParameters - */ -const se_UpdateConnectionAuthRequestParameters = ( - input: UpdateConnectionAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyAuthParameters != null && { - ApiKeyAuthParameters: se_UpdateConnectionApiKeyAuthRequestParameters(input.ApiKeyAuthParameters, context), - }), - ...(input.BasicAuthParameters != null && { - BasicAuthParameters: se_UpdateConnectionBasicAuthRequestParameters(input.BasicAuthParameters, context), - }), - ...(input.InvocationHttpParameters != null && { - InvocationHttpParameters: se_ConnectionHttpParameters(input.InvocationHttpParameters, context), - }), - ...(input.OAuthParameters != null && { - OAuthParameters: se_UpdateConnectionOAuthRequestParameters(input.OAuthParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionBasicAuthRequestParameters - */ -const se_UpdateConnectionBasicAuthRequestParameters = ( - input: UpdateConnectionBasicAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_HttpParameters omitted. -/** - * serializeAws_json1_1UpdateConnectionOAuthClientRequestParameters - */ -const se_UpdateConnectionOAuthClientRequestParameters = ( - input: UpdateConnectionOAuthClientRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ClientID != null && { ClientID: input.ClientID }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionOAuthRequestParameters - */ -const se_UpdateConnectionOAuthRequestParameters = ( - input: UpdateConnectionOAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizationEndpoint != null && { AuthorizationEndpoint: input.AuthorizationEndpoint }), - ...(input.ClientParameters != null && { - ClientParameters: se_UpdateConnectionOAuthClientRequestParameters(input.ClientParameters, context), - }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.OAuthHttpParameters != null && { - OAuthHttpParameters: se_ConnectionHttpParameters(input.OAuthHttpParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionRequest - */ -const se_UpdateConnectionRequest = (input: UpdateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.AuthParameters != null && { - AuthParameters: se_UpdateConnectionAuthRequestParameters(input.AuthParameters, context), - }), - ...(input.AuthorizationType != null && { AuthorizationType: input.AuthorizationType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * deserializeAws_json1_1ApiDestination - */ -const de_ApiDestination = (output: any, context: __SerdeContext): ApiDestination => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - ConnectionArn: __expectString(output.ConnectionArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HttpMethod: __expectString(output.HttpMethod), - InvocationEndpoint: __expectString(output.InvocationEndpoint), - InvocationRateLimitPerSecond: __expectInt32(output.InvocationRateLimitPerSecond), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ApiDestinationResponseList - */ -const de_ApiDestinationResponseList = (output: any, context: __SerdeContext): ApiDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApiDestination(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Archive - */ -const de_Archive = (output: any, context: __SerdeContext): Archive => { - return { - ArchiveName: __expectString(output.ArchiveName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EventCount: __expectLong(output.EventCount), - EventSourceArn: __expectString(output.EventSourceArn), - RetentionDays: __expectInt32(output.RetentionDays), - SizeBytes: __expectLong(output.SizeBytes), - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1ArchiveResponseList - */ -const de_ArchiveResponseList = (output: any, context: __SerdeContext): Archive[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Archive(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AwsVpcConfiguration - */ -const de_AwsVpcConfiguration = (output: any, context: __SerdeContext): AwsVpcConfiguration => { - return { - AssignPublicIp: __expectString(output.AssignPublicIp), - SecurityGroups: output.SecurityGroups != null ? de_StringList(output.SecurityGroups, context) : undefined, - Subnets: output.Subnets != null ? de_StringList(output.Subnets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchArrayProperties - */ -const de_BatchArrayProperties = (output: any, context: __SerdeContext): BatchArrayProperties => { - return { - Size: __expectInt32(output.Size), - } as any; -}; - -/** - * deserializeAws_json1_1BatchParameters - */ -const de_BatchParameters = (output: any, context: __SerdeContext): BatchParameters => { - return { - ArrayProperties: - output.ArrayProperties != null ? de_BatchArrayProperties(output.ArrayProperties, context) : undefined, - JobDefinition: __expectString(output.JobDefinition), - JobName: __expectString(output.JobName), - RetryStrategy: output.RetryStrategy != null ? de_BatchRetryStrategy(output.RetryStrategy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchRetryStrategy - */ -const de_BatchRetryStrategy = (output: any, context: __SerdeContext): BatchRetryStrategy => { - return { - Attempts: __expectInt32(output.Attempts), - } as any; -}; - -/** - * deserializeAws_json1_1CancelReplayResponse - */ -const de_CancelReplayResponse = (output: any, context: __SerdeContext): CancelReplayResponse => { - return { - ReplayArn: __expectString(output.ReplayArn), - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1CapacityProviderStrategy - */ -const de_CapacityProviderStrategy = (output: any, context: __SerdeContext): CapacityProviderStrategyItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CapacityProviderStrategyItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CapacityProviderStrategyItem - */ -const de_CapacityProviderStrategyItem = (output: any, context: __SerdeContext): CapacityProviderStrategyItem => { - return { - base: __expectInt32(output.base), - capacityProvider: __expectString(output.capacityProvider), - weight: __expectInt32(output.weight), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Connection - */ -const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - AuthorizationType: __expectString(output.AuthorizationType), - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionApiKeyAuthResponseParameters - */ -const de_ConnectionApiKeyAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionApiKeyAuthResponseParameters => { - return { - ApiKeyName: __expectString(output.ApiKeyName), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionAuthResponseParameters - */ -const de_ConnectionAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionAuthResponseParameters => { - return { - ApiKeyAuthParameters: - output.ApiKeyAuthParameters != null - ? de_ConnectionApiKeyAuthResponseParameters(output.ApiKeyAuthParameters, context) - : undefined, - BasicAuthParameters: - output.BasicAuthParameters != null - ? de_ConnectionBasicAuthResponseParameters(output.BasicAuthParameters, context) - : undefined, - InvocationHttpParameters: - output.InvocationHttpParameters != null - ? de_ConnectionHttpParameters(output.InvocationHttpParameters, context) - : undefined, - OAuthParameters: - output.OAuthParameters != null - ? de_ConnectionOAuthResponseParameters(output.OAuthParameters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionBasicAuthResponseParameters - */ -const de_ConnectionBasicAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionBasicAuthResponseParameters => { - return { - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionBodyParameter - */ -const de_ConnectionBodyParameter = (output: any, context: __SerdeContext): ConnectionBodyParameter => { - return { - IsValueSecret: __expectBoolean(output.IsValueSecret), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionBodyParametersList - */ -const de_ConnectionBodyParametersList = (output: any, context: __SerdeContext): ConnectionBodyParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionBodyParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionHeaderParameter - */ -const de_ConnectionHeaderParameter = (output: any, context: __SerdeContext): ConnectionHeaderParameter => { - return { - IsValueSecret: __expectBoolean(output.IsValueSecret), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionHeaderParametersList - */ -const de_ConnectionHeaderParametersList = (output: any, context: __SerdeContext): ConnectionHeaderParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionHeaderParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionHttpParameters - */ -const de_ConnectionHttpParameters = (output: any, context: __SerdeContext): ConnectionHttpParameters => { - return { - BodyParameters: - output.BodyParameters != null ? de_ConnectionBodyParametersList(output.BodyParameters, context) : undefined, - HeaderParameters: - output.HeaderParameters != null ? de_ConnectionHeaderParametersList(output.HeaderParameters, context) : undefined, - QueryStringParameters: - output.QueryStringParameters != null - ? de_ConnectionQueryStringParametersList(output.QueryStringParameters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionOAuthClientResponseParameters - */ -const de_ConnectionOAuthClientResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionOAuthClientResponseParameters => { - return { - ClientID: __expectString(output.ClientID), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionOAuthResponseParameters - */ -const de_ConnectionOAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionOAuthResponseParameters => { - return { - AuthorizationEndpoint: __expectString(output.AuthorizationEndpoint), - ClientParameters: - output.ClientParameters != null - ? de_ConnectionOAuthClientResponseParameters(output.ClientParameters, context) - : undefined, - HttpMethod: __expectString(output.HttpMethod), - OAuthHttpParameters: - output.OAuthHttpParameters != null ? de_ConnectionHttpParameters(output.OAuthHttpParameters, context) : undefined, - } as any; -}; +// se_InputTransformer omitted. -/** - * deserializeAws_json1_1ConnectionQueryStringParameter - */ -const de_ConnectionQueryStringParameter = (output: any, context: __SerdeContext): ConnectionQueryStringParameter => { - return { - IsValueSecret: __expectBoolean(output.IsValueSecret), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionQueryStringParametersList - */ -const de_ConnectionQueryStringParametersList = ( - output: any, - context: __SerdeContext -): ConnectionQueryStringParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionQueryStringParameter(entry, context); - }); - return retVal; -}; +// se_KinesisParameters omitted. -/** - * deserializeAws_json1_1ConnectionResponseList - */ -const de_ConnectionResponseList = (output: any, context: __SerdeContext): Connection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connection(entry, context); - }); - return retVal; -}; +// se_ListApiDestinationsRequest omitted. -/** - * deserializeAws_json1_1CreateApiDestinationResponse - */ -const de_CreateApiDestinationResponse = (output: any, context: __SerdeContext): CreateApiDestinationResponse => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_ListArchivesRequest omitted. -/** - * deserializeAws_json1_1CreateArchiveResponse - */ -const de_CreateArchiveResponse = (output: any, context: __SerdeContext): CreateArchiveResponse => { - return { - ArchiveArn: __expectString(output.ArchiveArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; +// se_ListConnectionsRequest omitted. -/** - * deserializeAws_json1_1CreateConnectionResponse - */ -const de_CreateConnectionResponse = (output: any, context: __SerdeContext): CreateConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_ListEventBusesRequest omitted. -/** - * deserializeAws_json1_1CreateEventBusResponse - */ -const de_CreateEventBusResponse = (output: any, context: __SerdeContext): CreateEventBusResponse => { - return { - EventBusArn: __expectString(output.EventBusArn), - } as any; -}; +// se_ListEventSourcesRequest omitted. -/** - * deserializeAws_json1_1CreatePartnerEventSourceResponse - */ -const de_CreatePartnerEventSourceResponse = ( - output: any, - context: __SerdeContext -): CreatePartnerEventSourceResponse => { - return { - EventSourceArn: __expectString(output.EventSourceArn), - } as any; -}; +// se_ListPartnerEventSourceAccountsRequest omitted. -/** - * deserializeAws_json1_1DeadLetterConfig - */ -const de_DeadLetterConfig = (output: any, context: __SerdeContext): DeadLetterConfig => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// se_ListPartnerEventSourcesRequest omitted. -/** - * deserializeAws_json1_1DeauthorizeConnectionResponse - */ -const de_DeauthorizeConnectionResponse = (output: any, context: __SerdeContext): DeauthorizeConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_ListReplaysRequest omitted. -/** - * deserializeAws_json1_1DeleteApiDestinationResponse - */ -const de_DeleteApiDestinationResponse = (output: any, context: __SerdeContext): DeleteApiDestinationResponse => { - return {} as any; -}; +// se_ListRuleNamesByTargetRequest omitted. -/** - * deserializeAws_json1_1DeleteArchiveResponse - */ -const de_DeleteArchiveResponse = (output: any, context: __SerdeContext): DeleteArchiveResponse => { - return {} as any; -}; +// se_ListRulesRequest omitted. -/** - * deserializeAws_json1_1DeleteConnectionResponse - */ -const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_ListTagsForResourceRequest omitted. -/** - * deserializeAws_json1_1DescribeApiDestinationResponse - */ -const de_DescribeApiDestinationResponse = (output: any, context: __SerdeContext): DescribeApiDestinationResponse => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - ConnectionArn: __expectString(output.ConnectionArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - HttpMethod: __expectString(output.HttpMethod), - InvocationEndpoint: __expectString(output.InvocationEndpoint), - InvocationRateLimitPerSecond: __expectInt32(output.InvocationRateLimitPerSecond), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; +// se_ListTargetsByRuleRequest omitted. -/** - * deserializeAws_json1_1DescribeArchiveResponse - */ -const de_DescribeArchiveResponse = (output: any, context: __SerdeContext): DescribeArchiveResponse => { - return { - ArchiveArn: __expectString(output.ArchiveArn), - ArchiveName: __expectString(output.ArchiveName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EventCount: __expectLong(output.EventCount), - EventPattern: __expectString(output.EventPattern), - EventSourceArn: __expectString(output.EventSourceArn), - RetentionDays: __expectInt32(output.RetentionDays), - SizeBytes: __expectLong(output.SizeBytes), - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; +// se_NetworkConfiguration omitted. -/** - * deserializeAws_json1_1DescribeConnectionResponse - */ -const de_DescribeConnectionResponse = (output: any, context: __SerdeContext): DescribeConnectionResponse => { - return { - AuthParameters: - output.AuthParameters != null ? de_ConnectionAuthResponseParameters(output.AuthParameters, context) : undefined, - AuthorizationType: __expectString(output.AuthorizationType), - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - SecretArn: __expectString(output.SecretArn), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEventBusResponse - */ -const de_DescribeEventBusResponse = (output: any, context: __SerdeContext): DescribeEventBusResponse => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - Policy: __expectString(output.Policy), - } as any; -}; +// se_PathParameterList omitted. -/** - * deserializeAws_json1_1DescribeEventSourceResponse - */ -const de_DescribeEventSourceResponse = (output: any, context: __SerdeContext): DescribeEventSourceResponse => { - return { - Arn: __expectString(output.Arn), - CreatedBy: __expectString(output.CreatedBy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; +// se_PlacementConstraint omitted. -/** - * deserializeAws_json1_1DescribePartnerEventSourceResponse - */ -const de_DescribePartnerEventSourceResponse = ( - output: any, - context: __SerdeContext -): DescribePartnerEventSourceResponse => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// se_PlacementConstraints omitted. -/** - * deserializeAws_json1_1DescribeReplayResponse - */ -const de_DescribeReplayResponse = (output: any, context: __SerdeContext): DescribeReplayResponse => { - return { - Description: __expectString(output.Description), - Destination: output.Destination != null ? de_ReplayDestination(output.Destination, context) : undefined, - EventEndTime: - output.EventEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventEndTime))) - : undefined, - EventLastReplayedTime: - output.EventLastReplayedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventLastReplayedTime))) - : undefined, - EventSourceArn: __expectString(output.EventSourceArn), - EventStartTime: - output.EventStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventStartTime))) - : undefined, - ReplayArn: __expectString(output.ReplayArn), - ReplayEndTime: - output.ReplayEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayEndTime))) - : undefined, - ReplayName: __expectString(output.ReplayName), - ReplayStartTime: - output.ReplayStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayStartTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRuleResponse - */ -const de_DescribeRuleResponse = (output: any, context: __SerdeContext): DescribeRuleResponse => { - return { - Arn: __expectString(output.Arn), - CreatedBy: __expectString(output.CreatedBy), - Description: __expectString(output.Description), - EventBusName: __expectString(output.EventBusName), - EventPattern: __expectString(output.EventPattern), - ManagedBy: __expectString(output.ManagedBy), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - ScheduleExpression: __expectString(output.ScheduleExpression), - State: __expectString(output.State), - } as any; -}; +// se_PlacementStrategies omitted. -/** - * deserializeAws_json1_1EcsParameters - */ -const de_EcsParameters = (output: any, context: __SerdeContext): EcsParameters => { - return { - CapacityProviderStrategy: - output.CapacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.CapacityProviderStrategy, context) - : undefined, - EnableECSManagedTags: __expectBoolean(output.EnableECSManagedTags), - EnableExecuteCommand: __expectBoolean(output.EnableExecuteCommand), - Group: __expectString(output.Group), - LaunchType: __expectString(output.LaunchType), - NetworkConfiguration: - output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined, - PlacementConstraints: - output.PlacementConstraints != null ? de_PlacementConstraints(output.PlacementConstraints, context) : undefined, - PlacementStrategy: - output.PlacementStrategy != null ? de_PlacementStrategies(output.PlacementStrategy, context) : undefined, - PlatformVersion: __expectString(output.PlatformVersion), - PropagateTags: __expectString(output.PropagateTags), - ReferenceId: __expectString(output.ReferenceId), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TaskCount: __expectInt32(output.TaskCount), - TaskDefinitionArn: __expectString(output.TaskDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1EventBus - */ -const de_EventBus = (output: any, context: __SerdeContext): EventBus => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - Policy: __expectString(output.Policy), - } as any; -}; +// se_PlacementStrategy omitted. /** - * deserializeAws_json1_1EventBusList + * serializeAws_json1_1PutEventsRequest */ -const de_EventBusList = (output: any, context: __SerdeContext): EventBus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventBus(entry, context); - }); - return retVal; +const se_PutEventsRequest = (input: PutEventsRequest, context: __SerdeContext): any => { + return take(input, { + Entries: (_) => se_PutEventsRequestEntryList(_, context), + }); }; /** - * deserializeAws_json1_1EventSource + * serializeAws_json1_1PutEventsRequestEntry */ -const de_EventSource = (output: any, context: __SerdeContext): EventSource => { - return { - Arn: __expectString(output.Arn), - CreatedBy: __expectString(output.CreatedBy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; +const se_PutEventsRequestEntry = (input: PutEventsRequestEntry, context: __SerdeContext): any => { + return take(input, { + Detail: [], + DetailType: [], + EventBusName: [], + Resources: _json, + Source: [], + Time: (_) => Math.round(_.getTime() / 1000), + TraceHeader: [], + }); }; /** - * deserializeAws_json1_1EventSourceList + * serializeAws_json1_1PutEventsRequestEntryList */ -const de_EventSourceList = (output: any, context: __SerdeContext): EventSource[] => { - const retVal = (output || []) +const se_PutEventsRequestEntryList = (input: PutEventsRequestEntry[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventSource(entry, context); + .map((entry) => { + return se_PutEventsRequestEntry(entry, context); }); - return retVal; }; /** - * deserializeAws_json1_1HeaderParametersMap + * serializeAws_json1_1PutPartnerEventsRequest */ -const de_HeaderParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const se_PutPartnerEventsRequest = (input: PutPartnerEventsRequest, context: __SerdeContext): any => { + return take(input, { + Entries: (_) => se_PutPartnerEventsRequestEntryList(_, context), + }); }; /** - * deserializeAws_json1_1HttpParameters + * serializeAws_json1_1PutPartnerEventsRequestEntry */ -const de_HttpParameters = (output: any, context: __SerdeContext): HttpParameters => { - return { - HeaderParameters: - output.HeaderParameters != null ? de_HeaderParametersMap(output.HeaderParameters, context) : undefined, - PathParameterValues: - output.PathParameterValues != null ? de_PathParameterList(output.PathParameterValues, context) : undefined, - QueryStringParameters: - output.QueryStringParameters != null - ? de_QueryStringParametersMap(output.QueryStringParameters, context) - : undefined, - } as any; +const se_PutPartnerEventsRequestEntry = (input: PutPartnerEventsRequestEntry, context: __SerdeContext): any => { + return take(input, { + Detail: [], + DetailType: [], + Resources: _json, + Source: [], + Time: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * deserializeAws_json1_1IllegalStatusException + * serializeAws_json1_1PutPartnerEventsRequestEntryList */ -const de_IllegalStatusException = (output: any, context: __SerdeContext): IllegalStatusException => { - return { - message: __expectString(output.message), - } as any; +const se_PutPartnerEventsRequestEntryList = (input: PutPartnerEventsRequestEntry[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_PutPartnerEventsRequestEntry(entry, context); + }); }; -/** - * deserializeAws_json1_1InputTransformer - */ -const de_InputTransformer = (output: any, context: __SerdeContext): InputTransformer => { - return { - InputPathsMap: output.InputPathsMap != null ? de_TransformerPaths(output.InputPathsMap, context) : undefined, - InputTemplate: __expectString(output.InputTemplate), - } as any; -}; +// se_PutPermissionRequest omitted. -/** - * deserializeAws_json1_1InternalException - */ -const de_InternalException = (output: any, context: __SerdeContext): InternalException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutRuleRequest omitted. -/** - * deserializeAws_json1_1InvalidEventPatternException - */ -const de_InvalidEventPatternException = (output: any, context: __SerdeContext): InvalidEventPatternException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutTargetsRequest omitted. -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_QueryStringParametersMap omitted. -/** - * deserializeAws_json1_1KinesisParameters - */ -const de_KinesisParameters = (output: any, context: __SerdeContext): KinesisParameters => { - return { - PartitionKeyPath: __expectString(output.PartitionKeyPath), - } as any; -}; +// se_RedshiftDataParameters omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RemovePermissionRequest omitted. -/** - * deserializeAws_json1_1ListApiDestinationsResponse - */ -const de_ListApiDestinationsResponse = (output: any, context: __SerdeContext): ListApiDestinationsResponse => { - return { - ApiDestinations: - output.ApiDestinations != null ? de_ApiDestinationResponseList(output.ApiDestinations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RemoveTargetsRequest omitted. -/** - * deserializeAws_json1_1ListArchivesResponse - */ -const de_ListArchivesResponse = (output: any, context: __SerdeContext): ListArchivesResponse => { - return { - Archives: output.Archives != null ? de_ArchiveResponseList(output.Archives, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ReplayDestination omitted. -/** - * deserializeAws_json1_1ListConnectionsResponse - */ -const de_ListConnectionsResponse = (output: any, context: __SerdeContext): ListConnectionsResponse => { - return { - Connections: output.Connections != null ? de_ConnectionResponseList(output.Connections, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ReplayDestinationFilters omitted. -/** - * deserializeAws_json1_1ListEventBusesResponse - */ -const de_ListEventBusesResponse = (output: any, context: __SerdeContext): ListEventBusesResponse => { - return { - EventBuses: output.EventBuses != null ? de_EventBusList(output.EventBuses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RetryPolicy omitted. -/** - * deserializeAws_json1_1ListEventSourcesResponse - */ -const de_ListEventSourcesResponse = (output: any, context: __SerdeContext): ListEventSourcesResponse => { - return { - EventSources: output.EventSources != null ? de_EventSourceList(output.EventSources, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RunCommandParameters omitted. -/** - * deserializeAws_json1_1ListPartnerEventSourceAccountsResponse - */ -const de_ListPartnerEventSourceAccountsResponse = ( - output: any, - context: __SerdeContext -): ListPartnerEventSourceAccountsResponse => { - return { - NextToken: __expectString(output.NextToken), - PartnerEventSourceAccounts: - output.PartnerEventSourceAccounts != null - ? de_PartnerEventSourceAccountList(output.PartnerEventSourceAccounts, context) - : undefined, - } as any; -}; +// se_RunCommandTarget omitted. -/** - * deserializeAws_json1_1ListPartnerEventSourcesResponse - */ -const de_ListPartnerEventSourcesResponse = (output: any, context: __SerdeContext): ListPartnerEventSourcesResponse => { - return { - NextToken: __expectString(output.NextToken), - PartnerEventSources: - output.PartnerEventSources != null ? de_PartnerEventSourceList(output.PartnerEventSources, context) : undefined, - } as any; -}; +// se_RunCommandTargets omitted. -/** - * deserializeAws_json1_1ListReplaysResponse - */ -const de_ListReplaysResponse = (output: any, context: __SerdeContext): ListReplaysResponse => { - return { - NextToken: __expectString(output.NextToken), - Replays: output.Replays != null ? de_ReplayList(output.Replays, context) : undefined, - } as any; -}; +// se_RunCommandTargetValues omitted. -/** - * deserializeAws_json1_1ListRuleNamesByTargetResponse - */ -const de_ListRuleNamesByTargetResponse = (output: any, context: __SerdeContext): ListRuleNamesByTargetResponse => { - return { - NextToken: __expectString(output.NextToken), - RuleNames: output.RuleNames != null ? de_RuleNameList(output.RuleNames, context) : undefined, - } as any; -}; +// se_SageMakerPipelineParameter omitted. -/** - * deserializeAws_json1_1ListRulesResponse - */ -const de_ListRulesResponse = (output: any, context: __SerdeContext): ListRulesResponse => { - return { - NextToken: __expectString(output.NextToken), - Rules: output.Rules != null ? de_RuleResponseList(output.Rules, context) : undefined, - } as any; -}; +// se_SageMakerPipelineParameterList omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// se_SageMakerPipelineParameters omitted. -/** - * deserializeAws_json1_1ListTargetsByRuleResponse - */ -const de_ListTargetsByRuleResponse = (output: any, context: __SerdeContext): ListTargetsByRuleResponse => { - return { - NextToken: __expectString(output.NextToken), - Targets: output.Targets != null ? de_TargetList(output.Targets, context) : undefined, - } as any; -}; +// se_SqsParameters omitted. /** - * deserializeAws_json1_1ManagedRuleException + * serializeAws_json1_1StartReplayRequest */ -const de_ManagedRuleException = (output: any, context: __SerdeContext): ManagedRuleException => { - return { - message: __expectString(output.message), - } as any; +const se_StartReplayRequest = (input: StartReplayRequest, context: __SerdeContext): any => { + return take(input, { + Description: [], + Destination: _json, + EventEndTime: (_) => Math.round(_.getTime() / 1000), + EventSourceArn: [], + EventStartTime: (_) => Math.round(_.getTime() / 1000), + ReplayName: [], + }); }; -/** - * deserializeAws_json1_1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - awsvpcConfiguration: - output.awsvpcConfiguration != null ? de_AwsVpcConfiguration(output.awsvpcConfiguration, context) : undefined, - } as any; -}; +// se_StringList omitted. -/** - * deserializeAws_json1_1OperationDisabledException - */ -const de_OperationDisabledException = (output: any, context: __SerdeContext): OperationDisabledException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1PartnerEventSource - */ -const de_PartnerEventSource = (output: any, context: __SerdeContext): PartnerEventSource => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1PartnerEventSourceAccount - */ -const de_PartnerEventSourceAccount = (output: any, context: __SerdeContext): PartnerEventSourceAccount => { - return { - Account: __expectString(output.Account), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - State: __expectString(output.State), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1PartnerEventSourceAccountList - */ -const de_PartnerEventSourceAccountList = (output: any, context: __SerdeContext): PartnerEventSourceAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartnerEventSourceAccount(entry, context); - }); - return retVal; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1PartnerEventSourceList - */ -const de_PartnerEventSourceList = (output: any, context: __SerdeContext): PartnerEventSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartnerEventSource(entry, context); - }); - return retVal; -}; +// se_Target omitted. -/** - * deserializeAws_json1_1PathParameterList - */ -const de_PathParameterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TargetIdList omitted. -/** - * deserializeAws_json1_1PlacementConstraint - */ -const de_PlacementConstraint = (output: any, context: __SerdeContext): PlacementConstraint => { - return { - expression: __expectString(output.expression), - type: __expectString(output.type), - } as any; -}; +// se_TargetList omitted. -/** - * deserializeAws_json1_1PlacementConstraints - */ -const de_PlacementConstraints = (output: any, context: __SerdeContext): PlacementConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementConstraint(entry, context); - }); - return retVal; -}; +// se_TestEventPatternRequest omitted. -/** - * deserializeAws_json1_1PlacementStrategies - */ -const de_PlacementStrategies = (output: any, context: __SerdeContext): PlacementStrategy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementStrategy(entry, context); - }); - return retVal; -}; +// se_TransformerPaths omitted. -/** - * deserializeAws_json1_1PlacementStrategy - */ -const de_PlacementStrategy = (output: any, context: __SerdeContext): PlacementStrategy => { - return { - field: __expectString(output.field), - type: __expectString(output.type), - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1PolicyLengthExceededException - */ -const de_PolicyLengthExceededException = (output: any, context: __SerdeContext): PolicyLengthExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateApiDestinationRequest omitted. -/** - * deserializeAws_json1_1PutEventsResponse - */ -const de_PutEventsResponse = (output: any, context: __SerdeContext): PutEventsResponse => { - return { - Entries: output.Entries != null ? de_PutEventsResultEntryList(output.Entries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; +// se_UpdateArchiveRequest omitted. -/** - * deserializeAws_json1_1PutEventsResultEntry - */ -const de_PutEventsResultEntry = (output: any, context: __SerdeContext): PutEventsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - EventId: __expectString(output.EventId), - } as any; -}; +// se_UpdateConnectionApiKeyAuthRequestParameters omitted. -/** - * deserializeAws_json1_1PutEventsResultEntryList - */ -const de_PutEventsResultEntryList = (output: any, context: __SerdeContext): PutEventsResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutEventsResultEntry(entry, context); - }); - return retVal; -}; +// se_UpdateConnectionAuthRequestParameters omitted. -/** - * deserializeAws_json1_1PutPartnerEventsResponse - */ -const de_PutPartnerEventsResponse = (output: any, context: __SerdeContext): PutPartnerEventsResponse => { - return { - Entries: output.Entries != null ? de_PutPartnerEventsResultEntryList(output.Entries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; +// se_UpdateConnectionBasicAuthRequestParameters omitted. + +// se_UpdateConnectionOAuthClientRequestParameters omitted. + +// se_UpdateConnectionOAuthRequestParameters omitted. + +// se_UpdateConnectionRequest omitted. /** - * deserializeAws_json1_1PutPartnerEventsResultEntry + * deserializeAws_json1_1ApiDestination */ -const de_PutPartnerEventsResultEntry = (output: any, context: __SerdeContext): PutPartnerEventsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - EventId: __expectString(output.EventId), - } as any; +const de_ApiDestination = (output: any, context: __SerdeContext): ApiDestination => { + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + ConnectionArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpMethod: __expectString, + InvocationEndpoint: __expectString, + InvocationRateLimitPerSecond: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutPartnerEventsResultEntryList + * deserializeAws_json1_1ApiDestinationResponseList */ -const de_PutPartnerEventsResultEntryList = (output: any, context: __SerdeContext): PutPartnerEventsResultEntry[] => { +const de_ApiDestinationResponseList = (output: any, context: __SerdeContext): ApiDestination[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutPartnerEventsResultEntry(entry, context); + return de_ApiDestination(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PutRuleResponse - */ -const de_PutRuleResponse = (output: any, context: __SerdeContext): PutRuleResponse => { - return { - RuleArn: __expectString(output.RuleArn), - } as any; -}; - -/** - * deserializeAws_json1_1PutTargetsResponse - */ -const de_PutTargetsResponse = (output: any, context: __SerdeContext): PutTargetsResponse => { - return { - FailedEntries: - output.FailedEntries != null ? de_PutTargetsResultEntryList(output.FailedEntries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; - -/** - * deserializeAws_json1_1PutTargetsResultEntry + * deserializeAws_json1_1Archive */ -const de_PutTargetsResultEntry = (output: any, context: __SerdeContext): PutTargetsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - TargetId: __expectString(output.TargetId), - } as any; +const de_Archive = (output: any, context: __SerdeContext): Archive => { + return take(output, { + ArchiveName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventCount: __expectLong, + EventSourceArn: __expectString, + RetentionDays: __expectInt32, + SizeBytes: __expectLong, + State: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutTargetsResultEntryList + * deserializeAws_json1_1ArchiveResponseList */ -const de_PutTargetsResultEntryList = (output: any, context: __SerdeContext): PutTargetsResultEntry[] => { +const de_ArchiveResponseList = (output: any, context: __SerdeContext): Archive[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutTargetsResultEntry(entry, context); + return de_Archive(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1QueryStringParametersMap - */ -const de_QueryStringParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AwsVpcConfiguration omitted. -/** - * deserializeAws_json1_1RedshiftDataParameters - */ -const de_RedshiftDataParameters = (output: any, context: __SerdeContext): RedshiftDataParameters => { - return { - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - SecretManagerArn: __expectString(output.SecretManagerArn), - Sql: __expectString(output.Sql), - StatementName: __expectString(output.StatementName), - WithEvent: __expectBoolean(output.WithEvent), - } as any; -}; +// de_BatchArrayProperties omitted. -/** - * deserializeAws_json1_1RemoveTargetsResponse - */ -const de_RemoveTargetsResponse = (output: any, context: __SerdeContext): RemoveTargetsResponse => { - return { - FailedEntries: - output.FailedEntries != null ? de_RemoveTargetsResultEntryList(output.FailedEntries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; +// de_BatchParameters omitted. + +// de_BatchRetryStrategy omitted. + +// de_CancelReplayResponse omitted. + +// de_CapacityProviderStrategy omitted. + +// de_CapacityProviderStrategyItem omitted. + +// de_ConcurrentModificationException omitted. /** - * deserializeAws_json1_1RemoveTargetsResultEntry + * deserializeAws_json1_1Connection */ -const de_RemoveTargetsResultEntry = (output: any, context: __SerdeContext): RemoveTargetsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - TargetId: __expectString(output.TargetId), - } as any; +const de_Connection = (output: any, context: __SerdeContext): Connection => { + return take(output, { + AuthorizationType: __expectString, + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + StateReason: __expectString, + }) as any; }; +// de_ConnectionApiKeyAuthResponseParameters omitted. + +// de_ConnectionAuthResponseParameters omitted. + +// de_ConnectionBasicAuthResponseParameters omitted. + +// de_ConnectionBodyParameter omitted. + +// de_ConnectionBodyParametersList omitted. + +// de_ConnectionHeaderParameter omitted. + +// de_ConnectionHeaderParametersList omitted. + +// de_ConnectionHttpParameters omitted. + +// de_ConnectionOAuthClientResponseParameters omitted. + +// de_ConnectionOAuthResponseParameters omitted. + +// de_ConnectionQueryStringParameter omitted. + +// de_ConnectionQueryStringParametersList omitted. + /** - * deserializeAws_json1_1RemoveTargetsResultEntryList + * deserializeAws_json1_1ConnectionResponseList */ -const de_RemoveTargetsResultEntryList = (output: any, context: __SerdeContext): RemoveTargetsResultEntry[] => { +const de_ConnectionResponseList = (output: any, context: __SerdeContext): Connection[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemoveTargetsResultEntry(entry, context); + return de_Connection(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Replay + * deserializeAws_json1_1CreateApiDestinationResponse */ -const de_Replay = (output: any, context: __SerdeContext): Replay => { - return { - EventEndTime: - output.EventEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventEndTime))) - : undefined, - EventLastReplayedTime: - output.EventLastReplayedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventLastReplayedTime))) - : undefined, - EventSourceArn: __expectString(output.EventSourceArn), - EventStartTime: - output.EventStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventStartTime))) - : undefined, - ReplayEndTime: - output.ReplayEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayEndTime))) - : undefined, - ReplayName: __expectString(output.ReplayName), - ReplayStartTime: - output.ReplayStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayStartTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1ReplayDestination - */ -const de_ReplayDestination = (output: any, context: __SerdeContext): ReplayDestination => { - return { - Arn: __expectString(output.Arn), - FilterArns: output.FilterArns != null ? de_ReplayDestinationFilters(output.FilterArns, context) : undefined, - } as any; +const de_CreateApiDestinationResponse = (output: any, context: __SerdeContext): CreateApiDestinationResponse => { + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ReplayDestinationFilters + * deserializeAws_json1_1CreateArchiveResponse */ -const de_ReplayDestinationFilters = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_CreateArchiveResponse = (output: any, context: __SerdeContext): CreateArchiveResponse => { + return take(output, { + ArchiveArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ReplayList + * deserializeAws_json1_1CreateConnectionResponse */ -const de_ReplayList = (output: any, context: __SerdeContext): Replay[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Replay(entry, context); - }); - return retVal; +const de_CreateConnectionResponse = (output: any, context: __SerdeContext): CreateConnectionResponse => { + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CreateEventBusResponse omitted. + +// de_CreatePartnerEventSourceResponse omitted. + +// de_DeadLetterConfig omitted. /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1DeauthorizeConnectionResponse */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_DeauthorizeConnectionResponse = (output: any, context: __SerdeContext): DeauthorizeConnectionResponse => { + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DeleteApiDestinationResponse omitted. + +// de_DeleteArchiveResponse omitted. + /** - * deserializeAws_json1_1RetryPolicy + * deserializeAws_json1_1DeleteConnectionResponse */ -const de_RetryPolicy = (output: any, context: __SerdeContext): RetryPolicy => { - return { - MaximumEventAgeInSeconds: __expectInt32(output.MaximumEventAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - } as any; +const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1Rule + * deserializeAws_json1_1DescribeApiDestinationResponse */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - EventBusName: __expectString(output.EventBusName), - EventPattern: __expectString(output.EventPattern), - ManagedBy: __expectString(output.ManagedBy), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - ScheduleExpression: __expectString(output.ScheduleExpression), - State: __expectString(output.State), - } as any; +const de_DescribeApiDestinationResponse = (output: any, context: __SerdeContext): DescribeApiDestinationResponse => { + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + ConnectionArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + HttpMethod: __expectString, + InvocationEndpoint: __expectString, + InvocationRateLimitPerSecond: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RuleNameList + * deserializeAws_json1_1DescribeArchiveResponse */ -const de_RuleNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeArchiveResponse = (output: any, context: __SerdeContext): DescribeArchiveResponse => { + return take(output, { + ArchiveArn: __expectString, + ArchiveName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EventCount: __expectLong, + EventPattern: __expectString, + EventSourceArn: __expectString, + RetentionDays: __expectInt32, + SizeBytes: __expectLong, + State: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RuleResponseList + * deserializeAws_json1_1DescribeConnectionResponse */ -const de_RuleResponseList = (output: any, context: __SerdeContext): Rule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Rule(entry, context); - }); - return retVal; +const de_DescribeConnectionResponse = (output: any, context: __SerdeContext): DescribeConnectionResponse => { + return take(output, { + AuthParameters: _json, + AuthorizationType: __expectString, + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretArn: __expectString, + StateReason: __expectString, + }) as any; }; +// de_DescribeEventBusResponse omitted. + /** - * deserializeAws_json1_1RunCommandParameters + * deserializeAws_json1_1DescribeEventSourceResponse */ -const de_RunCommandParameters = (output: any, context: __SerdeContext): RunCommandParameters => { - return { - RunCommandTargets: - output.RunCommandTargets != null ? de_RunCommandTargets(output.RunCommandTargets, context) : undefined, - } as any; +const de_DescribeEventSourceResponse = (output: any, context: __SerdeContext): DescribeEventSourceResponse => { + return take(output, { + Arn: __expectString, + CreatedBy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; +// de_DescribePartnerEventSourceResponse omitted. + /** - * deserializeAws_json1_1RunCommandTarget + * deserializeAws_json1_1DescribeReplayResponse */ -const de_RunCommandTarget = (output: any, context: __SerdeContext): RunCommandTarget => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_RunCommandTargetValues(output.Values, context) : undefined, - } as any; +const de_DescribeReplayResponse = (output: any, context: __SerdeContext): DescribeReplayResponse => { + return take(output, { + Description: __expectString, + Destination: _json, + EventEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventLastReplayedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventSourceArn: __expectString, + EventStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayArn: __expectString, + ReplayEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayName: __expectString, + ReplayStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_DescribeRuleResponse omitted. + +// de_EcsParameters omitted. + +// de_EventBus omitted. + +// de_EventBusList omitted. + /** - * deserializeAws_json1_1RunCommandTargets + * deserializeAws_json1_1EventSource */ -const de_RunCommandTargets = (output: any, context: __SerdeContext): RunCommandTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RunCommandTarget(entry, context); - }); - return retVal; +const de_EventSource = (output: any, context: __SerdeContext): EventSource => { + return take(output, { + Arn: __expectString, + CreatedBy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RunCommandTargetValues + * deserializeAws_json1_1EventSourceList */ -const de_RunCommandTargetValues = (output: any, context: __SerdeContext): string[] => { +const de_EventSourceList = (output: any, context: __SerdeContext): EventSource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_EventSource(entry, context); }); return retVal; }; +// de_HeaderParametersMap omitted. + +// de_HttpParameters omitted. + +// de_IllegalStatusException omitted. + +// de_InputTransformer omitted. + +// de_InternalException omitted. + +// de_InvalidEventPatternException omitted. + +// de_InvalidStateException omitted. + +// de_KinesisParameters omitted. + +// de_LimitExceededException omitted. + /** - * deserializeAws_json1_1SageMakerPipelineParameter + * deserializeAws_json1_1ListApiDestinationsResponse */ -const de_SageMakerPipelineParameter = (output: any, context: __SerdeContext): SageMakerPipelineParameter => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; +const de_ListApiDestinationsResponse = (output: any, context: __SerdeContext): ListApiDestinationsResponse => { + return take(output, { + ApiDestinations: (_: any) => de_ApiDestinationResponseList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SageMakerPipelineParameterList + * deserializeAws_json1_1ListArchivesResponse */ -const de_SageMakerPipelineParameterList = (output: any, context: __SerdeContext): SageMakerPipelineParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SageMakerPipelineParameter(entry, context); - }); - return retVal; +const de_ListArchivesResponse = (output: any, context: __SerdeContext): ListArchivesResponse => { + return take(output, { + Archives: (_: any) => de_ArchiveResponseList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SageMakerPipelineParameters + * deserializeAws_json1_1ListConnectionsResponse */ -const de_SageMakerPipelineParameters = (output: any, context: __SerdeContext): SageMakerPipelineParameters => { - return { - PipelineParameterList: - output.PipelineParameterList != null - ? de_SageMakerPipelineParameterList(output.PipelineParameterList, context) - : undefined, - } as any; +const de_ListConnectionsResponse = (output: any, context: __SerdeContext): ListConnectionsResponse => { + return take(output, { + Connections: (_: any) => de_ConnectionResponseList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListEventBusesResponse omitted. + /** - * deserializeAws_json1_1SqsParameters + * deserializeAws_json1_1ListEventSourcesResponse */ -const de_SqsParameters = (output: any, context: __SerdeContext): SqsParameters => { - return { - MessageGroupId: __expectString(output.MessageGroupId), - } as any; +const de_ListEventSourcesResponse = (output: any, context: __SerdeContext): ListEventSourcesResponse => { + return take(output, { + EventSources: (_: any) => de_EventSourceList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StartReplayResponse + * deserializeAws_json1_1ListPartnerEventSourceAccountsResponse */ -const de_StartReplayResponse = (output: any, context: __SerdeContext): StartReplayResponse => { - return { - ReplayArn: __expectString(output.ReplayArn), - ReplayStartTime: - output.ReplayStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayStartTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; +const de_ListPartnerEventSourceAccountsResponse = ( + output: any, + context: __SerdeContext +): ListPartnerEventSourceAccountsResponse => { + return take(output, { + NextToken: __expectString, + PartnerEventSourceAccounts: (_: any) => de_PartnerEventSourceAccountList(_, context), + }) as any; }; +// de_ListPartnerEventSourcesResponse omitted. + /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1ListReplaysResponse */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListReplaysResponse = (output: any, context: __SerdeContext): ListReplaysResponse => { + return take(output, { + NextToken: __expectString, + Replays: (_: any) => de_ReplayList(_, context), + }) as any; }; +// de_ListRuleNamesByTargetResponse omitted. + +// de_ListRulesResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListTargetsByRuleResponse omitted. + +// de_ManagedRuleException omitted. + +// de_NetworkConfiguration omitted. + +// de_OperationDisabledException omitted. + +// de_PartnerEventSource omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1PartnerEventSourceAccount */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_PartnerEventSourceAccount = (output: any, context: __SerdeContext): PartnerEventSourceAccount => { + return take(output, { + Account: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1PartnerEventSourceAccountList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_PartnerEventSourceAccountList = (output: any, context: __SerdeContext): PartnerEventSourceAccount[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_PartnerEventSourceAccount(entry, context); }); return retVal; }; +// de_PartnerEventSourceList omitted. + +// de_PathParameterList omitted. + +// de_PlacementConstraint omitted. + +// de_PlacementConstraints omitted. + +// de_PlacementStrategies omitted. + +// de_PlacementStrategy omitted. + +// de_PolicyLengthExceededException omitted. + +// de_PutEventsResponse omitted. + +// de_PutEventsResultEntry omitted. + +// de_PutEventsResultEntryList omitted. + +// de_PutPartnerEventsResponse omitted. + +// de_PutPartnerEventsResultEntry omitted. + +// de_PutPartnerEventsResultEntryList omitted. + +// de_PutRuleResponse omitted. + +// de_PutTargetsResponse omitted. + +// de_PutTargetsResultEntry omitted. + +// de_PutTargetsResultEntryList omitted. + +// de_QueryStringParametersMap omitted. + +// de_RedshiftDataParameters omitted. + +// de_RemoveTargetsResponse omitted. + +// de_RemoveTargetsResultEntry omitted. + +// de_RemoveTargetsResultEntryList omitted. + /** - * deserializeAws_json1_1TagResourceResponse + * deserializeAws_json1_1Replay */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; +const de_Replay = (output: any, context: __SerdeContext): Replay => { + return take(output, { + EventEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventLastReplayedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventSourceArn: __expectString, + EventStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayName: __expectString, + ReplayStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_ReplayDestination omitted. + +// de_ReplayDestinationFilters omitted. + /** - * deserializeAws_json1_1Target + * deserializeAws_json1_1ReplayList */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - Arn: __expectString(output.Arn), - BatchParameters: output.BatchParameters != null ? de_BatchParameters(output.BatchParameters, context) : undefined, - DeadLetterConfig: - output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined, - EcsParameters: output.EcsParameters != null ? de_EcsParameters(output.EcsParameters, context) : undefined, - HttpParameters: output.HttpParameters != null ? de_HttpParameters(output.HttpParameters, context) : undefined, - Id: __expectString(output.Id), - Input: __expectString(output.Input), - InputPath: __expectString(output.InputPath), - InputTransformer: - output.InputTransformer != null ? de_InputTransformer(output.InputTransformer, context) : undefined, - KinesisParameters: - output.KinesisParameters != null ? de_KinesisParameters(output.KinesisParameters, context) : undefined, - RedshiftDataParameters: - output.RedshiftDataParameters != null - ? de_RedshiftDataParameters(output.RedshiftDataParameters, context) - : undefined, - RetryPolicy: output.RetryPolicy != null ? de_RetryPolicy(output.RetryPolicy, context) : undefined, - RoleArn: __expectString(output.RoleArn), - RunCommandParameters: - output.RunCommandParameters != null ? de_RunCommandParameters(output.RunCommandParameters, context) : undefined, - SageMakerPipelineParameters: - output.SageMakerPipelineParameters != null - ? de_SageMakerPipelineParameters(output.SageMakerPipelineParameters, context) - : undefined, - SqsParameters: output.SqsParameters != null ? de_SqsParameters(output.SqsParameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TargetList - */ -const de_TargetList = (output: any, context: __SerdeContext): Target[] => { +const de_ReplayList = (output: any, context: __SerdeContext): Replay[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Target(entry, context); + return de_Replay(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TestEventPatternResponse - */ -const de_TestEventPatternResponse = (output: any, context: __SerdeContext): TestEventPatternResponse => { - return { - Result: __expectBoolean(output.Result), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1TransformerPaths - */ -const de_TransformerPaths = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ResourceNotFoundException omitted. + +// de_RetryPolicy omitted. + +// de_Rule omitted. + +// de_RuleNameList omitted. + +// de_RuleResponseList omitted. + +// de_RunCommandParameters omitted. + +// de_RunCommandTarget omitted. + +// de_RunCommandTargets omitted. + +// de_RunCommandTargetValues omitted. + +// de_SageMakerPipelineParameter omitted. + +// de_SageMakerPipelineParameterList omitted. + +// de_SageMakerPipelineParameters omitted. + +// de_SqsParameters omitted. /** - * deserializeAws_json1_1UntagResourceResponse + * deserializeAws_json1_1StartReplayResponse */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; +const de_StartReplayResponse = (output: any, context: __SerdeContext): StartReplayResponse => { + return take(output, { + ReplayArn: __expectString, + ReplayStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_StringList omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_Target omitted. + +// de_TargetList omitted. + +// de_TestEventPatternResponse omitted. + +// de_TransformerPaths omitted. + +// de_UntagResourceResponse omitted. + /** * deserializeAws_json1_1UpdateApiDestinationResponse */ const de_UpdateApiDestinationResponse = (output: any, context: __SerdeContext): UpdateApiDestinationResponse => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1UpdateArchiveResponse */ const de_UpdateArchiveResponse = (output: any, context: __SerdeContext): UpdateArchiveResponse => { - return { - ArchiveArn: __expectString(output.ArchiveArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; + return take(output, { + ArchiveArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; /** * deserializeAws_json1_1UpdateConnectionResponse */ const de_UpdateConnectionResponse = (output: any, context: __SerdeContext): UpdateConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -6974,6 +4677,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts b/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts index 78ecb8edc682..202797fc00a8 100644 --- a/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts +++ b/clients/client-cloudwatch-logs/src/protocols/Aws_json1_1.ts @@ -1,14 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -118,7 +118,6 @@ import { AssociateKmsKeyRequest, CancelExportTaskRequest, CreateExportTaskRequest, - CreateExportTaskResponse, CreateLogGroupRequest, CreateLogStreamRequest, DataAlreadyAcceptedException, @@ -128,44 +127,25 @@ import { DeleteLogStreamRequest, DeleteMetricFilterRequest, DeleteQueryDefinitionRequest, - DeleteQueryDefinitionResponse, DeleteResourcePolicyRequest, DeleteRetentionPolicyRequest, DeleteSubscriptionFilterRequest, DescribeDestinationsRequest, - DescribeDestinationsResponse, DescribeExportTasksRequest, - DescribeExportTasksResponse, DescribeLogGroupsRequest, - DescribeLogGroupsResponse, DescribeLogStreamsRequest, - DescribeLogStreamsResponse, DescribeMetricFiltersRequest, DescribeMetricFiltersResponse, DescribeQueriesRequest, - DescribeQueriesResponse, DescribeQueryDefinitionsRequest, - DescribeQueryDefinitionsResponse, DescribeResourcePoliciesRequest, - DescribeResourcePoliciesResponse, DescribeSubscriptionFiltersRequest, - DescribeSubscriptionFiltersResponse, - Destination, DisassociateKmsKeyRequest, - ExportTask, - ExportTaskExecutionInfo, - ExportTaskStatus, - FilteredLogEvent, FilterLogEventsRequest, - FilterLogEventsResponse, GetDataProtectionPolicyRequest, - GetDataProtectionPolicyResponse, GetLogEventsRequest, - GetLogEventsResponse, GetLogGroupFieldsRequest, - GetLogGroupFieldsResponse, GetLogRecordRequest, - GetLogRecordResponse, GetQueryResultsRequest, GetQueryResultsResponse, InputLogEvent, @@ -174,53 +154,29 @@ import { InvalidSequenceTokenException, LimitExceededException, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTagsLogGroupRequest, - ListTagsLogGroupResponse, - LogGroup, - LogGroupField, - LogStream, MalformedQueryException, MetricFilter, - MetricFilterMatchRecord, MetricTransformation, OperationAbortedException, - OutputLogEvent, PutDataProtectionPolicyRequest, - PutDataProtectionPolicyResponse, PutDestinationPolicyRequest, PutDestinationRequest, - PutDestinationResponse, PutLogEventsRequest, - PutLogEventsResponse, PutMetricFilterRequest, PutQueryDefinitionRequest, - PutQueryDefinitionResponse, PutResourcePolicyRequest, - PutResourcePolicyResponse, PutRetentionPolicyRequest, PutSubscriptionFilterRequest, - QueryCompileError, - QueryCompileErrorLocation, - QueryDefinition, - QueryInfo, QueryStatistics, - RejectedLogEventsInfo, ResourceAlreadyExistsException, ResourceNotFoundException, - ResourcePolicy, - ResultField, - SearchedLogStream, ServiceUnavailableException, StartQueryRequest, - StartQueryResponse, StopQueryRequest, - StopQueryResponse, - SubscriptionFilter, TagLogGroupRequest, TagResourceRequest, TestMetricFilterRequest, - TestMetricFilterResponse, TooManyTagsException, UnrecognizedClientException, UntagLogGroupRequest, @@ -236,7 +192,7 @@ export const se_AssociateKmsKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateKmsKey"); let body: any; - body = JSON.stringify(se_AssociateKmsKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -249,7 +205,7 @@ export const se_CancelExportTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelExportTask"); let body: any; - body = JSON.stringify(se_CancelExportTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -262,7 +218,7 @@ export const se_CreateExportTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateExportTask"); let body: any; - body = JSON.stringify(se_CreateExportTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -275,7 +231,7 @@ export const se_CreateLogGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLogGroup"); let body: any; - body = JSON.stringify(se_CreateLogGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -288,7 +244,7 @@ export const se_CreateLogStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLogStream"); let body: any; - body = JSON.stringify(se_CreateLogStreamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -301,7 +257,7 @@ export const se_DeleteDataProtectionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataProtectionPolicy"); let body: any; - body = JSON.stringify(se_DeleteDataProtectionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -314,7 +270,7 @@ export const se_DeleteDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDestination"); let body: any; - body = JSON.stringify(se_DeleteDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -327,7 +283,7 @@ export const se_DeleteLogGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLogGroup"); let body: any; - body = JSON.stringify(se_DeleteLogGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -340,7 +296,7 @@ export const se_DeleteLogStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLogStream"); let body: any; - body = JSON.stringify(se_DeleteLogStreamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -353,7 +309,7 @@ export const se_DeleteMetricFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMetricFilter"); let body: any; - body = JSON.stringify(se_DeleteMetricFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -366,7 +322,7 @@ export const se_DeleteQueryDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteQueryDefinition"); let body: any; - body = JSON.stringify(se_DeleteQueryDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -379,7 +335,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -392,7 +348,7 @@ export const se_DeleteRetentionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRetentionPolicy"); let body: any; - body = JSON.stringify(se_DeleteRetentionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +361,7 @@ export const se_DeleteSubscriptionFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSubscriptionFilter"); let body: any; - body = JSON.stringify(se_DeleteSubscriptionFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +374,7 @@ export const se_DescribeDestinationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDestinations"); let body: any; - body = JSON.stringify(se_DescribeDestinationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +387,7 @@ export const se_DescribeExportTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExportTasks"); let body: any; - body = JSON.stringify(se_DescribeExportTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +400,7 @@ export const se_DescribeLogGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLogGroups"); let body: any; - body = JSON.stringify(se_DescribeLogGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +413,7 @@ export const se_DescribeLogStreamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLogStreams"); let body: any; - body = JSON.stringify(se_DescribeLogStreamsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -470,7 +426,7 @@ export const se_DescribeMetricFiltersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMetricFilters"); let body: any; - body = JSON.stringify(se_DescribeMetricFiltersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -483,7 +439,7 @@ export const se_DescribeQueriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeQueries"); let body: any; - body = JSON.stringify(se_DescribeQueriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -496,7 +452,7 @@ export const se_DescribeQueryDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeQueryDefinitions"); let body: any; - body = JSON.stringify(se_DescribeQueryDefinitionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -509,7 +465,7 @@ export const se_DescribeResourcePoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeResourcePolicies"); let body: any; - body = JSON.stringify(se_DescribeResourcePoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +478,7 @@ export const se_DescribeSubscriptionFiltersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSubscriptionFilters"); let body: any; - body = JSON.stringify(se_DescribeSubscriptionFiltersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -535,7 +491,7 @@ export const se_DisassociateKmsKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateKmsKey"); let body: any; - body = JSON.stringify(se_DisassociateKmsKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -548,7 +504,7 @@ export const se_FilterLogEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("FilterLogEvents"); let body: any; - body = JSON.stringify(se_FilterLogEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +517,7 @@ export const se_GetDataProtectionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataProtectionPolicy"); let body: any; - body = JSON.stringify(se_GetDataProtectionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -574,7 +530,7 @@ export const se_GetLogEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLogEvents"); let body: any; - body = JSON.stringify(se_GetLogEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -587,7 +543,7 @@ export const se_GetLogGroupFieldsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLogGroupFields"); let body: any; - body = JSON.stringify(se_GetLogGroupFieldsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -600,7 +556,7 @@ export const se_GetLogRecordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLogRecord"); let body: any; - body = JSON.stringify(se_GetLogRecordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -613,7 +569,7 @@ export const se_GetQueryResultsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueryResults"); let body: any; - body = JSON.stringify(se_GetQueryResultsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -626,7 +582,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -639,7 +595,7 @@ export const se_ListTagsLogGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsLogGroup"); let body: any; - body = JSON.stringify(se_ListTagsLogGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -652,7 +608,7 @@ export const se_PutDataProtectionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutDataProtectionPolicy"); let body: any; - body = JSON.stringify(se_PutDataProtectionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -665,7 +621,7 @@ export const se_PutDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutDestination"); let body: any; - body = JSON.stringify(se_PutDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -678,7 +634,7 @@ export const se_PutDestinationPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutDestinationPolicy"); let body: any; - body = JSON.stringify(se_PutDestinationPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -691,7 +647,7 @@ export const se_PutLogEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLogEvents"); let body: any; - body = JSON.stringify(se_PutLogEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -717,7 +673,7 @@ export const se_PutQueryDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutQueryDefinition"); let body: any; - body = JSON.stringify(se_PutQueryDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -730,7 +686,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -743,7 +699,7 @@ export const se_PutRetentionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRetentionPolicy"); let body: any; - body = JSON.stringify(se_PutRetentionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -756,7 +712,7 @@ export const se_PutSubscriptionFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutSubscriptionFilter"); let body: any; - body = JSON.stringify(se_PutSubscriptionFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -769,7 +725,7 @@ export const se_StartQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartQuery"); let body: any; - body = JSON.stringify(se_StartQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -782,7 +738,7 @@ export const se_StopQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopQuery"); let body: any; - body = JSON.stringify(se_StopQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -795,7 +751,7 @@ export const se_TagLogGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagLogGroup"); let body: any; - body = JSON.stringify(se_TagLogGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -808,7 +764,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -821,7 +777,7 @@ export const se_TestMetricFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestMetricFilter"); let body: any; - body = JSON.stringify(se_TestMetricFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -834,7 +790,7 @@ export const se_UntagLogGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagLogGroup"); let body: any; - body = JSON.stringify(se_UntagLogGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -847,7 +803,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -865,7 +821,7 @@ export const de_AssociateKmsKeyCommand = async ( const response: AssociateKmsKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -895,10 +851,9 @@ const de_AssociateKmsKeyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -918,7 +873,7 @@ export const de_CancelExportTaskCommand = async ( const response: CancelExportTaskCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -948,10 +903,9 @@ const de_CancelExportTaskCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -969,12 +923,12 @@ export const de_CreateExportTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateExportTaskResponse(data, context); + contents = _json(data); const response: CreateExportTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1010,10 +964,9 @@ const de_CreateExportTaskCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1033,7 +986,7 @@ export const de_CreateLogGroupCommand = async ( const response: CreateLogGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1066,10 +1019,9 @@ const de_CreateLogGroupCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1089,7 +1041,7 @@ export const de_CreateLogStreamCommand = async ( const response: CreateLogStreamCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1119,10 +1071,9 @@ const de_CreateLogStreamCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1142,7 +1093,7 @@ export const de_DeleteDataProtectionPolicyCommand = async ( const response: DeleteDataProtectionPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1172,10 +1123,9 @@ const de_DeleteDataProtectionPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1195,7 +1145,7 @@ export const de_DeleteDestinationCommand = async ( const response: DeleteDestinationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1225,10 +1175,9 @@ const de_DeleteDestinationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1248,7 +1197,7 @@ export const de_DeleteLogGroupCommand = async ( const response: DeleteLogGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1278,10 +1227,9 @@ const de_DeleteLogGroupCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,7 +1249,7 @@ export const de_DeleteLogStreamCommand = async ( const response: DeleteLogStreamCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1331,10 +1279,9 @@ const de_DeleteLogStreamCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1354,7 +1301,7 @@ export const de_DeleteMetricFilterCommand = async ( const response: DeleteMetricFilterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1384,10 +1331,9 @@ const de_DeleteMetricFilterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1405,12 +1351,12 @@ export const de_DeleteQueryDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteQueryDefinitionResponse(data, context); + contents = _json(data); const response: DeleteQueryDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1437,10 +1383,9 @@ const de_DeleteQueryDefinitionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1460,7 +1405,7 @@ export const de_DeleteResourcePolicyCommand = async ( const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1487,10 +1432,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1510,7 +1454,7 @@ export const de_DeleteRetentionPolicyCommand = async ( const response: DeleteRetentionPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1540,10 +1484,9 @@ const de_DeleteRetentionPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1563,7 +1506,7 @@ export const de_DeleteSubscriptionFilterCommand = async ( const response: DeleteSubscriptionFilterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1593,10 +1536,9 @@ const de_DeleteSubscriptionFilterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1614,12 +1556,12 @@ export const de_DescribeDestinationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDestinationsResponse(data, context); + contents = _json(data); const response: DescribeDestinationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1643,10 +1585,9 @@ const de_DescribeDestinationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1664,12 +1605,12 @@ export const de_DescribeExportTasksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeExportTasksResponse(data, context); + contents = _json(data); const response: DescribeExportTasksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1693,10 +1634,9 @@ const de_DescribeExportTasksCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1714,12 +1654,12 @@ export const de_DescribeLogGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLogGroupsResponse(data, context); + contents = _json(data); const response: DescribeLogGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1743,10 +1683,9 @@ const de_DescribeLogGroupsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1764,12 +1703,12 @@ export const de_DescribeLogStreamsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLogStreamsResponse(data, context); + contents = _json(data); const response: DescribeLogStreamsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1796,10 +1735,9 @@ const de_DescribeLogStreamsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1822,7 +1760,7 @@ export const de_DescribeMetricFiltersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1849,10 +1787,9 @@ const de_DescribeMetricFiltersCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1870,12 +1807,12 @@ export const de_DescribeQueriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeQueriesResponse(data, context); + contents = _json(data); const response: DescribeQueriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1902,10 +1839,9 @@ const de_DescribeQueriesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1923,12 +1859,12 @@ export const de_DescribeQueryDefinitionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeQueryDefinitionsResponse(data, context); + contents = _json(data); const response: DescribeQueryDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1952,10 +1888,9 @@ const de_DescribeQueryDefinitionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1973,12 +1908,12 @@ export const de_DescribeResourcePoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeResourcePoliciesResponse(data, context); + contents = _json(data); const response: DescribeResourcePoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2002,10 +1937,9 @@ const de_DescribeResourcePoliciesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,12 +1957,12 @@ export const de_DescribeSubscriptionFiltersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSubscriptionFiltersResponse(data, context); + contents = _json(data); const response: DescribeSubscriptionFiltersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2055,10 +1989,9 @@ const de_DescribeSubscriptionFiltersCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2078,7 +2011,7 @@ export const de_DisassociateKmsKeyCommand = async ( const response: DisassociateKmsKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2108,10 +2041,9 @@ const de_DisassociateKmsKeyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2129,12 +2061,12 @@ export const de_FilterLogEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_FilterLogEventsResponse(data, context); + contents = _json(data); const response: FilterLogEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2161,10 +2093,9 @@ const de_FilterLogEventsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2182,12 +2113,12 @@ export const de_GetDataProtectionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDataProtectionPolicyResponse(data, context); + contents = _json(data); const response: GetDataProtectionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2217,10 +2148,9 @@ const de_GetDataProtectionPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2238,12 +2168,12 @@ export const de_GetLogEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLogEventsResponse(data, context); + contents = _json(data); const response: GetLogEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2270,10 +2200,9 @@ const de_GetLogEventsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2291,12 +2220,12 @@ export const de_GetLogGroupFieldsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLogGroupFieldsResponse(data, context); + contents = _json(data); const response: GetLogGroupFieldsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2326,10 +2255,9 @@ const de_GetLogGroupFieldsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2347,12 +2275,12 @@ export const de_GetLogRecordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLogRecordResponse(data, context); + contents = _json(data); const response: GetLogRecordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2382,10 +2310,9 @@ const de_GetLogRecordCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2408,7 +2335,7 @@ export const de_GetQueryResultsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2435,10 +2362,9 @@ const de_GetQueryResultsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2456,12 +2382,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2488,10 +2414,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2509,12 +2434,12 @@ export const de_ListTagsLogGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsLogGroupResponse(data, context); + contents = _json(data); const response: ListTagsLogGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2538,10 +2463,9 @@ const de_ListTagsLogGroupCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2559,12 +2483,12 @@ export const de_PutDataProtectionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutDataProtectionPolicyResponse(data, context); + contents = _json(data); const response: PutDataProtectionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2597,10 +2521,9 @@ const de_PutDataProtectionPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,12 +2541,12 @@ export const de_PutDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutDestinationResponse(data, context); + contents = _json(data); const response: PutDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2650,10 +2573,9 @@ const de_PutDestinationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2673,7 +2595,7 @@ export const de_PutDestinationPolicyCommand = async ( const response: PutDestinationPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2700,10 +2622,9 @@ const de_PutDestinationPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2721,12 +2642,12 @@ export const de_PutLogEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLogEventsResponse(data, context); + contents = _json(data); const response: PutLogEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2762,10 +2683,9 @@ const de_PutLogEventsCommandError = async ( throw await de_UnrecognizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2785,7 +2705,7 @@ export const de_PutMetricFilterCommand = async ( const response: PutMetricFilterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2818,10 +2738,9 @@ const de_PutMetricFilterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2839,12 +2758,12 @@ export const de_PutQueryDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutQueryDefinitionResponse(data, context); + contents = _json(data); const response: PutQueryDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2874,10 +2793,9 @@ const de_PutQueryDefinitionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2895,12 +2813,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2927,10 +2845,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2950,7 +2867,7 @@ export const de_PutRetentionPolicyCommand = async ( const response: PutRetentionPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2980,10 +2897,9 @@ const de_PutRetentionPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3003,7 +2919,7 @@ export const de_PutSubscriptionFilterCommand = async ( const response: PutSubscriptionFilterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3036,10 +2952,9 @@ const de_PutSubscriptionFilterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3057,12 +2972,12 @@ export const de_StartQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartQueryResponse(data, context); + contents = _json(data); const response: StartQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3095,10 +3010,9 @@ const de_StartQueryCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3116,12 +3030,12 @@ export const de_StopQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopQueryResponse(data, context); + contents = _json(data); const response: StopQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3148,10 +3062,9 @@ const de_StopQueryCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3171,7 +3084,7 @@ export const de_TagLogGroupCommand = async ( const response: TagLogGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3195,10 +3108,9 @@ const de_TagLogGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3218,7 +3130,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3248,10 +3160,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3269,12 +3180,12 @@ export const de_TestMetricFilterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestMetricFilterResponse(data, context); + contents = _json(data); const response: TestMetricFilterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3298,10 +3209,9 @@ const de_TestMetricFilterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3321,7 +3231,7 @@ export const de_UntagLogGroupCommand = async ( const response: UntagLogGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3342,10 +3252,9 @@ const de_UntagLogGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3365,7 +3274,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3392,10 +3301,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3409,7 +3317,7 @@ const de_DataAlreadyAcceptedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataAlreadyAcceptedException(body, context); + const deserialized: any = _json(body); const exception = new DataAlreadyAcceptedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3425,7 +3333,7 @@ const de_InvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3441,7 +3349,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3457,7 +3365,7 @@ const de_InvalidSequenceTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSequenceTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSequenceTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3473,7 +3381,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3489,7 +3397,7 @@ const de_MalformedQueryExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedQueryException(body, context); + const deserialized: any = _json(body); const exception = new MalformedQueryException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3505,7 +3413,7 @@ const de_OperationAbortedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationAbortedException(body, context); + const deserialized: any = _json(body); const exception = new OperationAbortedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3521,7 +3429,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3537,7 +3445,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3553,7 +3461,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3569,7 +3477,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3585,7 +3493,7 @@ const de_UnrecognizedClientExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnrecognizedClientException(body, context); + const deserialized: any = _json(body); const exception = new UnrecognizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3593,454 +3501,96 @@ const de_UnrecognizedClientExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccountIds - */ -const se_AccountIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIds omitted. -/** - * serializeAws_json1_1AssociateKmsKeyRequest - */ -const se_AssociateKmsKeyRequest = (input: AssociateKmsKeyRequest, context: __SerdeContext): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_AssociateKmsKeyRequest omitted. -/** - * serializeAws_json1_1CancelExportTaskRequest - */ -const se_CancelExportTaskRequest = (input: CancelExportTaskRequest, context: __SerdeContext): any => { - return { - ...(input.taskId != null && { taskId: input.taskId }), - }; -}; +// se_CancelExportTaskRequest omitted. -/** - * serializeAws_json1_1CreateExportTaskRequest - */ -const se_CreateExportTaskRequest = (input: CreateExportTaskRequest, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: input.destination }), - ...(input.destinationPrefix != null && { destinationPrefix: input.destinationPrefix }), - ...(input.from != null && { from: input.from }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }), - ...(input.taskName != null && { taskName: input.taskName }), - ...(input.to != null && { to: input.to }), - }; -}; +// se_CreateExportTaskRequest omitted. -/** - * serializeAws_json1_1CreateLogGroupRequest - */ -const se_CreateLogGroupRequest = (input: CreateLogGroupRequest, context: __SerdeContext): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_CreateLogGroupRequest omitted. -/** - * serializeAws_json1_1CreateLogStreamRequest - */ -const se_CreateLogStreamRequest = (input: CreateLogStreamRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamName != null && { logStreamName: input.logStreamName }), - }; -}; +// se_CreateLogStreamRequest omitted. -/** - * serializeAws_json1_1DeleteDataProtectionPolicyRequest - */ -const se_DeleteDataProtectionPolicyRequest = ( - input: DeleteDataProtectionPolicyRequest, - context: __SerdeContext -): any => { - return { - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - }; -}; +// se_DeleteDataProtectionPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteDestinationRequest - */ -const se_DeleteDestinationRequest = (input: DeleteDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.destinationName != null && { destinationName: input.destinationName }), - }; -}; +// se_DeleteDestinationRequest omitted. -/** - * serializeAws_json1_1DeleteLogGroupRequest - */ -const se_DeleteLogGroupRequest = (input: DeleteLogGroupRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_DeleteLogGroupRequest omitted. -/** - * serializeAws_json1_1DeleteLogStreamRequest - */ -const se_DeleteLogStreamRequest = (input: DeleteLogStreamRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamName != null && { logStreamName: input.logStreamName }), - }; -}; +// se_DeleteLogStreamRequest omitted. -/** - * serializeAws_json1_1DeleteMetricFilterRequest - */ -const se_DeleteMetricFilterRequest = (input: DeleteMetricFilterRequest, context: __SerdeContext): any => { - return { - ...(input.filterName != null && { filterName: input.filterName }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_DeleteMetricFilterRequest omitted. -/** - * serializeAws_json1_1DeleteQueryDefinitionRequest - */ -const se_DeleteQueryDefinitionRequest = (input: DeleteQueryDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.queryDefinitionId != null && { queryDefinitionId: input.queryDefinitionId }), - }; -}; +// se_DeleteQueryDefinitionRequest omitted. -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.policyName != null && { policyName: input.policyName }), - }; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * serializeAws_json1_1DeleteRetentionPolicyRequest - */ -const se_DeleteRetentionPolicyRequest = (input: DeleteRetentionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_DeleteRetentionPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteSubscriptionFilterRequest - */ -const se_DeleteSubscriptionFilterRequest = (input: DeleteSubscriptionFilterRequest, context: __SerdeContext): any => { - return { - ...(input.filterName != null && { filterName: input.filterName }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_DeleteSubscriptionFilterRequest omitted. -/** - * serializeAws_json1_1DescribeDestinationsRequest - */ -const se_DescribeDestinationsRequest = (input: DescribeDestinationsRequest, context: __SerdeContext): any => { - return { - ...(input.DestinationNamePrefix != null && { DestinationNamePrefix: input.DestinationNamePrefix }), - ...(input.limit != null && { limit: input.limit }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeDestinationsRequest omitted. -/** - * serializeAws_json1_1DescribeExportTasksRequest - */ -const se_DescribeExportTasksRequest = (input: DescribeExportTasksRequest, context: __SerdeContext): any => { - return { - ...(input.limit != null && { limit: input.limit }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.statusCode != null && { statusCode: input.statusCode }), - ...(input.taskId != null && { taskId: input.taskId }), - }; -}; +// se_DescribeExportTasksRequest omitted. -/** - * serializeAws_json1_1DescribeLogGroupsRequest - */ -const se_DescribeLogGroupsRequest = (input: DescribeLogGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.accountIdentifiers != null && { accountIdentifiers: se_AccountIds(input.accountIdentifiers, context) }), - ...(input.includeLinkedAccounts != null && { includeLinkedAccounts: input.includeLinkedAccounts }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupNamePattern != null && { logGroupNamePattern: input.logGroupNamePattern }), - ...(input.logGroupNamePrefix != null && { logGroupNamePrefix: input.logGroupNamePrefix }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeLogGroupsRequest omitted. -/** - * serializeAws_json1_1DescribeLogStreamsRequest - */ -const se_DescribeLogStreamsRequest = (input: DescribeLogStreamsRequest, context: __SerdeContext): any => { - return { - ...(input.descending != null && { descending: input.descending }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; -}; +// se_DescribeLogStreamsRequest omitted. -/** - * serializeAws_json1_1DescribeMetricFiltersRequest - */ -const se_DescribeMetricFiltersRequest = (input: DescribeMetricFiltersRequest, context: __SerdeContext): any => { - return { - ...(input.filterNamePrefix != null && { filterNamePrefix: input.filterNamePrefix }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.metricNamespace != null && { metricNamespace: input.metricNamespace }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeMetricFiltersRequest omitted. -/** - * serializeAws_json1_1DescribeQueriesRequest - */ -const se_DescribeQueriesRequest = (input: DescribeQueriesRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_DescribeQueriesRequest omitted. -/** - * serializeAws_json1_1DescribeQueryDefinitionsRequest - */ -const se_DescribeQueryDefinitionsRequest = (input: DescribeQueryDefinitionsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.queryDefinitionNamePrefix != null && { queryDefinitionNamePrefix: input.queryDefinitionNamePrefix }), - }; -}; +// se_DescribeQueryDefinitionsRequest omitted. -/** - * serializeAws_json1_1DescribeResourcePoliciesRequest - */ -const se_DescribeResourcePoliciesRequest = (input: DescribeResourcePoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.limit != null && { limit: input.limit }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeResourcePoliciesRequest omitted. -/** - * serializeAws_json1_1DescribeSubscriptionFiltersRequest - */ -const se_DescribeSubscriptionFiltersRequest = ( - input: DescribeSubscriptionFiltersRequest, - context: __SerdeContext -): any => { - return { - ...(input.filterNamePrefix != null && { filterNamePrefix: input.filterNamePrefix }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeSubscriptionFiltersRequest omitted. -/** - * serializeAws_json1_1Dimensions - */ -const se_Dimensions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Dimensions omitted. -/** - * serializeAws_json1_1DisassociateKmsKeyRequest - */ -const se_DisassociateKmsKeyRequest = (input: DisassociateKmsKeyRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_DisassociateKmsKeyRequest omitted. -/** - * serializeAws_json1_1FilterLogEventsRequest - */ -const se_FilterLogEventsRequest = (input: FilterLogEventsRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.filterPattern != null && { filterPattern: input.filterPattern }), - ...(input.interleaved != null && { interleaved: input.interleaved }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }), - ...(input.logStreamNames != null && { logStreamNames: se_InputLogStreamNames(input.logStreamNames, context) }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.startTime != null && { startTime: input.startTime }), - ...(input.unmask != null && { unmask: input.unmask }), - }; -}; +// se_FilterLogEventsRequest omitted. -/** - * serializeAws_json1_1GetDataProtectionPolicyRequest - */ -const se_GetDataProtectionPolicyRequest = (input: GetDataProtectionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - }; -}; +// se_GetDataProtectionPolicyRequest omitted. -/** - * serializeAws_json1_1GetLogEventsRequest - */ -const se_GetLogEventsRequest = (input: GetLogEventsRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamName != null && { logStreamName: input.logStreamName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.startFromHead != null && { startFromHead: input.startFromHead }), - ...(input.startTime != null && { startTime: input.startTime }), - ...(input.unmask != null && { unmask: input.unmask }), - }; -}; +// se_GetLogEventsRequest omitted. -/** - * serializeAws_json1_1GetLogGroupFieldsRequest - */ -const se_GetLogGroupFieldsRequest = (input: GetLogGroupFieldsRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.time != null && { time: input.time }), - }; -}; +// se_GetLogGroupFieldsRequest omitted. -/** - * serializeAws_json1_1GetLogRecordRequest - */ -const se_GetLogRecordRequest = (input: GetLogRecordRequest, context: __SerdeContext): any => { - return { - ...(input.logRecordPointer != null && { logRecordPointer: input.logRecordPointer }), - ...(input.unmask != null && { unmask: input.unmask }), - }; -}; +// se_GetLogRecordRequest omitted. -/** - * serializeAws_json1_1GetQueryResultsRequest - */ -const se_GetQueryResultsRequest = (input: GetQueryResultsRequest, context: __SerdeContext): any => { - return { - ...(input.queryId != null && { queryId: input.queryId }), - }; -}; +// se_GetQueryResultsRequest omitted. -/** - * serializeAws_json1_1InputLogEvent - */ -const se_InputLogEvent = (input: InputLogEvent, context: __SerdeContext): any => { - return { - ...(input.message != null && { message: input.message }), - ...(input.timestamp != null && { timestamp: input.timestamp }), - }; -}; +// se_InputLogEvent omitted. -/** - * serializeAws_json1_1InputLogEvents - */ -const se_InputLogEvents = (input: InputLogEvent[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputLogEvent(entry, context); - }); -}; +// se_InputLogEvents omitted. -/** - * serializeAws_json1_1InputLogStreamNames - */ -const se_InputLogStreamNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InputLogStreamNames omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListTagsLogGroupRequest - */ -const se_ListTagsLogGroupRequest = (input: ListTagsLogGroupRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_ListTagsLogGroupRequest omitted. -/** - * serializeAws_json1_1LogGroupIdentifiers - */ -const se_LogGroupIdentifiers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LogGroupIdentifiers omitted. -/** - * serializeAws_json1_1LogGroupNames - */ -const se_LogGroupNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LogGroupNames omitted. /** * serializeAws_json1_1MetricTransformation */ const se_MetricTransformation = (input: MetricTransformation, context: __SerdeContext): any => { - return { - ...(input.defaultValue != null && { defaultValue: __serializeFloat(input.defaultValue) }), - ...(input.dimensions != null && { dimensions: se_Dimensions(input.dimensions, context) }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.metricNamespace != null && { metricNamespace: input.metricNamespace }), - ...(input.metricValue != null && { metricValue: input.metricValue }), - ...(input.unit != null && { unit: input.unit }), - }; + return take(input, { + defaultValue: __serializeFloat, + dimensions: _json, + metricName: [], + metricNamespace: [], + metricValue: [], + unit: [], + }); }; /** @@ -4054,783 +3604,175 @@ const se_MetricTransformations = (input: MetricTransformation[], context: __Serd }); }; -/** - * serializeAws_json1_1PutDataProtectionPolicyRequest - */ -const se_PutDataProtectionPolicyRequest = (input: PutDataProtectionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupIdentifier != null && { logGroupIdentifier: input.logGroupIdentifier }), - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - }; -}; +// se_PutDataProtectionPolicyRequest omitted. -/** - * serializeAws_json1_1PutDestinationPolicyRequest - */ -const se_PutDestinationPolicyRequest = (input: PutDestinationPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.accessPolicy != null && { accessPolicy: input.accessPolicy }), - ...(input.destinationName != null && { destinationName: input.destinationName }), - ...(input.forceUpdate != null && { forceUpdate: input.forceUpdate }), - }; -}; +// se_PutDestinationPolicyRequest omitted. -/** - * serializeAws_json1_1PutDestinationRequest - */ -const se_PutDestinationRequest = (input: PutDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.destinationName != null && { destinationName: input.destinationName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }; -}; +// se_PutDestinationRequest omitted. -/** - * serializeAws_json1_1PutLogEventsRequest - */ -const se_PutLogEventsRequest = (input: PutLogEventsRequest, context: __SerdeContext): any => { - return { - ...(input.logEvents != null && { logEvents: se_InputLogEvents(input.logEvents, context) }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamName != null && { logStreamName: input.logStreamName }), - ...(input.sequenceToken != null && { sequenceToken: input.sequenceToken }), - }; -}; +// se_PutLogEventsRequest omitted. /** * serializeAws_json1_1PutMetricFilterRequest */ const se_PutMetricFilterRequest = (input: PutMetricFilterRequest, context: __SerdeContext): any => { - return { - ...(input.filterName != null && { filterName: input.filterName }), - ...(input.filterPattern != null && { filterPattern: input.filterPattern }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.metricTransformations != null && { - metricTransformations: se_MetricTransformations(input.metricTransformations, context), - }), - }; + return take(input, { + filterName: [], + filterPattern: [], + logGroupName: [], + metricTransformations: (_) => se_MetricTransformations(_, context), + }); }; -/** - * serializeAws_json1_1PutQueryDefinitionRequest - */ -const se_PutQueryDefinitionRequest = (input: PutQueryDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupNames != null && { logGroupNames: se_LogGroupNames(input.logGroupNames, context) }), - ...(input.name != null && { name: input.name }), - ...(input.queryDefinitionId != null && { queryDefinitionId: input.queryDefinitionId }), - ...(input.queryString != null && { queryString: input.queryString }), - }; -}; +// se_PutQueryDefinitionRequest omitted. -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - ...(input.policyName != null && { policyName: input.policyName }), - }; -}; +// se_PutResourcePolicyRequest omitted. -/** - * serializeAws_json1_1PutRetentionPolicyRequest - */ -const se_PutRetentionPolicyRequest = (input: PutRetentionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.retentionInDays != null && { retentionInDays: input.retentionInDays }), - }; -}; +// se_PutRetentionPolicyRequest omitted. -/** - * serializeAws_json1_1PutSubscriptionFilterRequest - */ -const se_PutSubscriptionFilterRequest = (input: PutSubscriptionFilterRequest, context: __SerdeContext): any => { - return { - ...(input.destinationArn != null && { destinationArn: input.destinationArn }), - ...(input.distribution != null && { distribution: input.distribution }), - ...(input.filterName != null && { filterName: input.filterName }), - ...(input.filterPattern != null && { filterPattern: input.filterPattern }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_PutSubscriptionFilterRequest omitted. -/** - * serializeAws_json1_1StartQueryRequest - */ -const se_StartQueryRequest = (input: StartQueryRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.limit != null && { limit: input.limit }), - ...(input.logGroupIdentifiers != null && { - logGroupIdentifiers: se_LogGroupIdentifiers(input.logGroupIdentifiers, context), - }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logGroupNames != null && { logGroupNames: se_LogGroupNames(input.logGroupNames, context) }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.startTime != null && { startTime: input.startTime }), - }; -}; +// se_StartQueryRequest omitted. -/** - * serializeAws_json1_1StopQueryRequest - */ -const se_StopQueryRequest = (input: StopQueryRequest, context: __SerdeContext): any => { - return { - ...(input.queryId != null && { queryId: input.queryId }), - }; -}; +// se_StopQueryRequest omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagLogGroupRequest - */ -const se_TagLogGroupRequest = (input: TagLogGroupRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_TagLogGroupRequest omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1TestEventMessages - */ -const se_TestEventMessages = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TestEventMessages omitted. -/** - * serializeAws_json1_1TestMetricFilterRequest - */ -const se_TestMetricFilterRequest = (input: TestMetricFilterRequest, context: __SerdeContext): any => { - return { - ...(input.filterPattern != null && { filterPattern: input.filterPattern }), - ...(input.logEventMessages != null && { logEventMessages: se_TestEventMessages(input.logEventMessages, context) }), - }; -}; +// se_TestMetricFilterRequest omitted. -/** - * serializeAws_json1_1UntagLogGroupRequest - */ -const se_UntagLogGroupRequest = (input: UntagLogGroupRequest, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_UntagLogGroupRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1CreateExportTaskResponse - */ -const de_CreateExportTaskResponse = (output: any, context: __SerdeContext): CreateExportTaskResponse => { - return { - taskId: __expectString(output.taskId), - } as any; -}; +// de_CreateExportTaskResponse omitted. -/** - * deserializeAws_json1_1DataAlreadyAcceptedException - */ -const de_DataAlreadyAcceptedException = (output: any, context: __SerdeContext): DataAlreadyAcceptedException => { - return { - expectedSequenceToken: __expectString(output.expectedSequenceToken), - message: __expectString(output.message), - } as any; -}; +// de_DataAlreadyAcceptedException omitted. -/** - * deserializeAws_json1_1DeleteQueryDefinitionResponse - */ -const de_DeleteQueryDefinitionResponse = (output: any, context: __SerdeContext): DeleteQueryDefinitionResponse => { - return { - success: __expectBoolean(output.success), - } as any; -}; +// de_DeleteQueryDefinitionResponse omitted. -/** - * deserializeAws_json1_1DescribeDestinationsResponse - */ -const de_DescribeDestinationsResponse = (output: any, context: __SerdeContext): DescribeDestinationsResponse => { - return { - destinations: output.destinations != null ? de_Destinations(output.destinations, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeDestinationsResponse omitted. -/** - * deserializeAws_json1_1DescribeExportTasksResponse - */ -const de_DescribeExportTasksResponse = (output: any, context: __SerdeContext): DescribeExportTasksResponse => { - return { - exportTasks: output.exportTasks != null ? de_ExportTasks(output.exportTasks, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeExportTasksResponse omitted. -/** - * deserializeAws_json1_1DescribeLogGroupsResponse - */ -const de_DescribeLogGroupsResponse = (output: any, context: __SerdeContext): DescribeLogGroupsResponse => { - return { - logGroups: output.logGroups != null ? de_LogGroups(output.logGroups, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeLogGroupsResponse omitted. -/** - * deserializeAws_json1_1DescribeLogStreamsResponse - */ -const de_DescribeLogStreamsResponse = (output: any, context: __SerdeContext): DescribeLogStreamsResponse => { - return { - logStreams: output.logStreams != null ? de_LogStreams(output.logStreams, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeLogStreamsResponse omitted. /** * deserializeAws_json1_1DescribeMetricFiltersResponse */ const de_DescribeMetricFiltersResponse = (output: any, context: __SerdeContext): DescribeMetricFiltersResponse => { - return { - metricFilters: output.metricFilters != null ? de_MetricFilters(output.metricFilters, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + metricFilters: (_: any) => de_MetricFilters(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeQueriesResponse - */ -const de_DescribeQueriesResponse = (output: any, context: __SerdeContext): DescribeQueriesResponse => { - return { - nextToken: __expectString(output.nextToken), - queries: output.queries != null ? de_QueryInfoList(output.queries, context) : undefined, - } as any; -}; +// de_DescribeQueriesResponse omitted. -/** - * deserializeAws_json1_1DescribeQueryDefinitionsResponse - */ -const de_DescribeQueryDefinitionsResponse = ( - output: any, - context: __SerdeContext -): DescribeQueryDefinitionsResponse => { - return { - nextToken: __expectString(output.nextToken), - queryDefinitions: - output.queryDefinitions != null ? de_QueryDefinitionList(output.queryDefinitions, context) : undefined, - } as any; -}; +// de_DescribeQueryDefinitionsResponse omitted. -/** - * deserializeAws_json1_1DescribeResourcePoliciesResponse - */ -const de_DescribeResourcePoliciesResponse = ( - output: any, - context: __SerdeContext -): DescribeResourcePoliciesResponse => { - return { - nextToken: __expectString(output.nextToken), - resourcePolicies: - output.resourcePolicies != null ? de_ResourcePolicies(output.resourcePolicies, context) : undefined, - } as any; -}; +// de_DescribeResourcePoliciesResponse omitted. -/** - * deserializeAws_json1_1DescribeSubscriptionFiltersResponse - */ -const de_DescribeSubscriptionFiltersResponse = ( - output: any, - context: __SerdeContext -): DescribeSubscriptionFiltersResponse => { - return { - nextToken: __expectString(output.nextToken), - subscriptionFilters: - output.subscriptionFilters != null ? de_SubscriptionFilters(output.subscriptionFilters, context) : undefined, - } as any; -}; +// de_DescribeSubscriptionFiltersResponse omitted. -/** - * deserializeAws_json1_1Destination - */ -const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - accessPolicy: __expectString(output.accessPolicy), - arn: __expectString(output.arn), - creationTime: __expectLong(output.creationTime), - destinationName: __expectString(output.destinationName), - roleArn: __expectString(output.roleArn), - targetArn: __expectString(output.targetArn), - } as any; -}; +// de_Destination omitted. -/** - * deserializeAws_json1_1Destinations - */ -const de_Destinations = (output: any, context: __SerdeContext): Destination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Destination(entry, context); - }); - return retVal; -}; +// de_Destinations omitted. -/** - * deserializeAws_json1_1Dimensions - */ -const de_Dimensions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Dimensions omitted. -/** - * deserializeAws_json1_1ExportTask - */ -const de_ExportTask = (output: any, context: __SerdeContext): ExportTask => { - return { - destination: __expectString(output.destination), - destinationPrefix: __expectString(output.destinationPrefix), - executionInfo: output.executionInfo != null ? de_ExportTaskExecutionInfo(output.executionInfo, context) : undefined, - from: __expectLong(output.from), - logGroupName: __expectString(output.logGroupName), - status: output.status != null ? de_ExportTaskStatus(output.status, context) : undefined, - taskId: __expectString(output.taskId), - taskName: __expectString(output.taskName), - to: __expectLong(output.to), - } as any; -}; +// de_ExportTask omitted. -/** - * deserializeAws_json1_1ExportTaskExecutionInfo - */ -const de_ExportTaskExecutionInfo = (output: any, context: __SerdeContext): ExportTaskExecutionInfo => { - return { - completionTime: __expectLong(output.completionTime), - creationTime: __expectLong(output.creationTime), - } as any; -}; +// de_ExportTaskExecutionInfo omitted. -/** - * deserializeAws_json1_1ExportTasks - */ -const de_ExportTasks = (output: any, context: __SerdeContext): ExportTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportTask(entry, context); - }); - return retVal; -}; +// de_ExportTasks omitted. -/** - * deserializeAws_json1_1ExportTaskStatus - */ -const de_ExportTaskStatus = (output: any, context: __SerdeContext): ExportTaskStatus => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ExportTaskStatus omitted. -/** - * deserializeAws_json1_1ExtractedValues - */ -const de_ExtractedValues = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExtractedValues omitted. -/** - * deserializeAws_json1_1FilteredLogEvent - */ -const de_FilteredLogEvent = (output: any, context: __SerdeContext): FilteredLogEvent => { - return { - eventId: __expectString(output.eventId), - ingestionTime: __expectLong(output.ingestionTime), - logStreamName: __expectString(output.logStreamName), - message: __expectString(output.message), - timestamp: __expectLong(output.timestamp), - } as any; -}; +// de_FilteredLogEvent omitted. -/** - * deserializeAws_json1_1FilteredLogEvents - */ -const de_FilteredLogEvents = (output: any, context: __SerdeContext): FilteredLogEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilteredLogEvent(entry, context); - }); - return retVal; -}; +// de_FilteredLogEvents omitted. -/** - * deserializeAws_json1_1FilterLogEventsResponse - */ -const de_FilterLogEventsResponse = (output: any, context: __SerdeContext): FilterLogEventsResponse => { - return { - events: output.events != null ? de_FilteredLogEvents(output.events, context) : undefined, - nextToken: __expectString(output.nextToken), - searchedLogStreams: - output.searchedLogStreams != null ? de_SearchedLogStreams(output.searchedLogStreams, context) : undefined, - } as any; -}; +// de_FilterLogEventsResponse omitted. -/** - * deserializeAws_json1_1GetDataProtectionPolicyResponse - */ -const de_GetDataProtectionPolicyResponse = (output: any, context: __SerdeContext): GetDataProtectionPolicyResponse => { - return { - lastUpdatedTime: __expectLong(output.lastUpdatedTime), - logGroupIdentifier: __expectString(output.logGroupIdentifier), - policyDocument: __expectString(output.policyDocument), - } as any; -}; +// de_GetDataProtectionPolicyResponse omitted. -/** - * deserializeAws_json1_1GetLogEventsResponse - */ -const de_GetLogEventsResponse = (output: any, context: __SerdeContext): GetLogEventsResponse => { - return { - events: output.events != null ? de_OutputLogEvents(output.events, context) : undefined, - nextBackwardToken: __expectString(output.nextBackwardToken), - nextForwardToken: __expectString(output.nextForwardToken), - } as any; -}; +// de_GetLogEventsResponse omitted. -/** - * deserializeAws_json1_1GetLogGroupFieldsResponse - */ -const de_GetLogGroupFieldsResponse = (output: any, context: __SerdeContext): GetLogGroupFieldsResponse => { - return { - logGroupFields: output.logGroupFields != null ? de_LogGroupFieldList(output.logGroupFields, context) : undefined, - } as any; -}; +// de_GetLogGroupFieldsResponse omitted. -/** - * deserializeAws_json1_1GetLogRecordResponse - */ -const de_GetLogRecordResponse = (output: any, context: __SerdeContext): GetLogRecordResponse => { - return { - logRecord: output.logRecord != null ? de_LogRecord(output.logRecord, context) : undefined, - } as any; -}; +// de_GetLogRecordResponse omitted. /** * deserializeAws_json1_1GetQueryResultsResponse */ const de_GetQueryResultsResponse = (output: any, context: __SerdeContext): GetQueryResultsResponse => { - return { - results: output.results != null ? de_QueryResults(output.results, context) : undefined, - statistics: output.statistics != null ? de_QueryStatistics(output.statistics, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + results: _json, + statistics: (_: any) => de_QueryStatistics(_, context), + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InvalidOperationException - */ -const de_InvalidOperationException = (output: any, context: __SerdeContext): InvalidOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidOperationException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidSequenceTokenException - */ -const de_InvalidSequenceTokenException = (output: any, context: __SerdeContext): InvalidSequenceTokenException => { - return { - expectedSequenceToken: __expectString(output.expectedSequenceToken), - message: __expectString(output.message), - } as any; -}; +// de_InvalidSequenceTokenException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1ListTagsLogGroupResponse - */ -const de_ListTagsLogGroupResponse = (output: any, context: __SerdeContext): ListTagsLogGroupResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsLogGroupResponse omitted. -/** - * deserializeAws_json1_1LogGroup - */ -const de_LogGroup = (output: any, context: __SerdeContext): LogGroup => { - return { - arn: __expectString(output.arn), - creationTime: __expectLong(output.creationTime), - dataProtectionStatus: __expectString(output.dataProtectionStatus), - kmsKeyId: __expectString(output.kmsKeyId), - logGroupName: __expectString(output.logGroupName), - metricFilterCount: __expectInt32(output.metricFilterCount), - retentionInDays: __expectInt32(output.retentionInDays), - storedBytes: __expectLong(output.storedBytes), - } as any; -}; +// de_LogGroup omitted. -/** - * deserializeAws_json1_1LogGroupField - */ -const de_LogGroupField = (output: any, context: __SerdeContext): LogGroupField => { - return { - name: __expectString(output.name), - percent: __expectInt32(output.percent), - } as any; -}; +// de_LogGroupField omitted. -/** - * deserializeAws_json1_1LogGroupFieldList - */ -const de_LogGroupFieldList = (output: any, context: __SerdeContext): LogGroupField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogGroupField(entry, context); - }); - return retVal; -}; +// de_LogGroupFieldList omitted. -/** - * deserializeAws_json1_1LogGroupNames - */ -const de_LogGroupNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LogGroupNames omitted. -/** - * deserializeAws_json1_1LogGroups - */ -const de_LogGroups = (output: any, context: __SerdeContext): LogGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogGroup(entry, context); - }); - return retVal; -}; +// de_LogGroups omitted. -/** - * deserializeAws_json1_1LogRecord - */ -const de_LogRecord = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_LogRecord omitted. -/** - * deserializeAws_json1_1LogStream - */ -const de_LogStream = (output: any, context: __SerdeContext): LogStream => { - return { - arn: __expectString(output.arn), - creationTime: __expectLong(output.creationTime), - firstEventTimestamp: __expectLong(output.firstEventTimestamp), - lastEventTimestamp: __expectLong(output.lastEventTimestamp), - lastIngestionTime: __expectLong(output.lastIngestionTime), - logStreamName: __expectString(output.logStreamName), - storedBytes: __expectLong(output.storedBytes), - uploadSequenceToken: __expectString(output.uploadSequenceToken), - } as any; -}; +// de_LogStream omitted. -/** - * deserializeAws_json1_1LogStreams - */ -const de_LogStreams = (output: any, context: __SerdeContext): LogStream[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogStream(entry, context); - }); - return retVal; -}; +// de_LogStreams omitted. -/** - * deserializeAws_json1_1MalformedQueryException - */ -const de_MalformedQueryException = (output: any, context: __SerdeContext): MalformedQueryException => { - return { - message: __expectString(output.message), - queryCompileError: - output.queryCompileError != null ? de_QueryCompileError(output.queryCompileError, context) : undefined, - } as any; -}; +// de_MalformedQueryException omitted. /** * deserializeAws_json1_1MetricFilter */ const de_MetricFilter = (output: any, context: __SerdeContext): MetricFilter => { - return { - creationTime: __expectLong(output.creationTime), - filterName: __expectString(output.filterName), - filterPattern: __expectString(output.filterPattern), - logGroupName: __expectString(output.logGroupName), - metricTransformations: - output.metricTransformations != null - ? de_MetricTransformations(output.metricTransformations, context) - : undefined, - } as any; + return take(output, { + creationTime: __expectLong, + filterName: __expectString, + filterPattern: __expectString, + logGroupName: __expectString, + metricTransformations: (_: any) => de_MetricTransformations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1MetricFilterMatches - */ -const de_MetricFilterMatches = (output: any, context: __SerdeContext): MetricFilterMatchRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricFilterMatchRecord(entry, context); - }); - return retVal; -}; +// de_MetricFilterMatches omitted. -/** - * deserializeAws_json1_1MetricFilterMatchRecord - */ -const de_MetricFilterMatchRecord = (output: any, context: __SerdeContext): MetricFilterMatchRecord => { - return { - eventMessage: __expectString(output.eventMessage), - eventNumber: __expectLong(output.eventNumber), - extractedValues: output.extractedValues != null ? de_ExtractedValues(output.extractedValues, context) : undefined, - } as any; -}; +// de_MetricFilterMatchRecord omitted. /** * deserializeAws_json1_1MetricFilters @@ -4839,9 +3781,6 @@ const de_MetricFilters = (output: any, context: __SerdeContext): MetricFilter[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricFilter(entry, context); }); return retVal; @@ -4851,14 +3790,14 @@ const de_MetricFilters = (output: any, context: __SerdeContext): MetricFilter[] * deserializeAws_json1_1MetricTransformation */ const de_MetricTransformation = (output: any, context: __SerdeContext): MetricTransformation => { - return { - defaultValue: __limitedParseDouble(output.defaultValue), - dimensions: output.dimensions != null ? de_Dimensions(output.dimensions, context) : undefined, - metricName: __expectString(output.metricName), - metricNamespace: __expectString(output.metricNamespace), - metricValue: __expectString(output.metricValue), - unit: __expectString(output.unit), - } as any; + return take(output, { + defaultValue: __limitedParseDouble, + dimensions: _json, + metricName: __expectString, + metricNamespace: __expectString, + metricValue: __expectString, + unit: __expectString, + }) as any; }; /** @@ -4868,404 +3807,87 @@ const de_MetricTransformations = (output: any, context: __SerdeContext): MetricT const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricTransformation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OperationAbortedException - */ -const de_OperationAbortedException = (output: any, context: __SerdeContext): OperationAbortedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_OperationAbortedException omitted. -/** - * deserializeAws_json1_1OutputLogEvent - */ -const de_OutputLogEvent = (output: any, context: __SerdeContext): OutputLogEvent => { - return { - ingestionTime: __expectLong(output.ingestionTime), - message: __expectString(output.message), - timestamp: __expectLong(output.timestamp), - } as any; -}; +// de_OutputLogEvent omitted. -/** - * deserializeAws_json1_1OutputLogEvents - */ -const de_OutputLogEvents = (output: any, context: __SerdeContext): OutputLogEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputLogEvent(entry, context); - }); - return retVal; -}; +// de_OutputLogEvents omitted. -/** - * deserializeAws_json1_1PutDataProtectionPolicyResponse - */ -const de_PutDataProtectionPolicyResponse = (output: any, context: __SerdeContext): PutDataProtectionPolicyResponse => { - return { - lastUpdatedTime: __expectLong(output.lastUpdatedTime), - logGroupIdentifier: __expectString(output.logGroupIdentifier), - policyDocument: __expectString(output.policyDocument), - } as any; -}; +// de_PutDataProtectionPolicyResponse omitted. -/** - * deserializeAws_json1_1PutDestinationResponse - */ -const de_PutDestinationResponse = (output: any, context: __SerdeContext): PutDestinationResponse => { - return { - destination: output.destination != null ? de_Destination(output.destination, context) : undefined, - } as any; -}; +// de_PutDestinationResponse omitted. -/** - * deserializeAws_json1_1PutLogEventsResponse - */ -const de_PutLogEventsResponse = (output: any, context: __SerdeContext): PutLogEventsResponse => { - return { - nextSequenceToken: __expectString(output.nextSequenceToken), - rejectedLogEventsInfo: - output.rejectedLogEventsInfo != null - ? de_RejectedLogEventsInfo(output.rejectedLogEventsInfo, context) - : undefined, - } as any; -}; +// de_PutLogEventsResponse omitted. -/** - * deserializeAws_json1_1PutQueryDefinitionResponse - */ -const de_PutQueryDefinitionResponse = (output: any, context: __SerdeContext): PutQueryDefinitionResponse => { - return { - queryDefinitionId: __expectString(output.queryDefinitionId), - } as any; -}; +// de_PutQueryDefinitionResponse omitted. -/** - * deserializeAws_json1_1PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined, - } as any; -}; +// de_PutResourcePolicyResponse omitted. -/** - * deserializeAws_json1_1QueryCompileError - */ -const de_QueryCompileError = (output: any, context: __SerdeContext): QueryCompileError => { - return { - location: output.location != null ? de_QueryCompileErrorLocation(output.location, context) : undefined, - message: __expectString(output.message), - } as any; -}; +// de_QueryCompileError omitted. -/** - * deserializeAws_json1_1QueryCompileErrorLocation - */ -const de_QueryCompileErrorLocation = (output: any, context: __SerdeContext): QueryCompileErrorLocation => { - return { - endCharOffset: __expectInt32(output.endCharOffset), - startCharOffset: __expectInt32(output.startCharOffset), - } as any; -}; +// de_QueryCompileErrorLocation omitted. -/** - * deserializeAws_json1_1QueryDefinition - */ -const de_QueryDefinition = (output: any, context: __SerdeContext): QueryDefinition => { - return { - lastModified: __expectLong(output.lastModified), - logGroupNames: output.logGroupNames != null ? de_LogGroupNames(output.logGroupNames, context) : undefined, - name: __expectString(output.name), - queryDefinitionId: __expectString(output.queryDefinitionId), - queryString: __expectString(output.queryString), - } as any; -}; +// de_QueryDefinition omitted. -/** - * deserializeAws_json1_1QueryDefinitionList - */ -const de_QueryDefinitionList = (output: any, context: __SerdeContext): QueryDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryDefinition(entry, context); - }); - return retVal; -}; +// de_QueryDefinitionList omitted. -/** - * deserializeAws_json1_1QueryInfo - */ -const de_QueryInfo = (output: any, context: __SerdeContext): QueryInfo => { - return { - createTime: __expectLong(output.createTime), - logGroupName: __expectString(output.logGroupName), - queryId: __expectString(output.queryId), - queryString: __expectString(output.queryString), - status: __expectString(output.status), - } as any; -}; +// de_QueryInfo omitted. -/** - * deserializeAws_json1_1QueryInfoList - */ -const de_QueryInfoList = (output: any, context: __SerdeContext): QueryInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryInfo(entry, context); - }); - return retVal; -}; +// de_QueryInfoList omitted. -/** - * deserializeAws_json1_1QueryResults - */ -const de_QueryResults = (output: any, context: __SerdeContext): ResultField[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultRows(entry, context); - }); - return retVal; -}; +// de_QueryResults omitted. /** * deserializeAws_json1_1QueryStatistics */ const de_QueryStatistics = (output: any, context: __SerdeContext): QueryStatistics => { - return { - bytesScanned: __limitedParseDouble(output.bytesScanned), - recordsMatched: __limitedParseDouble(output.recordsMatched), - recordsScanned: __limitedParseDouble(output.recordsScanned), - } as any; + return take(output, { + bytesScanned: __limitedParseDouble, + recordsMatched: __limitedParseDouble, + recordsScanned: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1RejectedLogEventsInfo - */ -const de_RejectedLogEventsInfo = (output: any, context: __SerdeContext): RejectedLogEventsInfo => { - return { - expiredLogEventEndIndex: __expectInt32(output.expiredLogEventEndIndex), - tooNewLogEventStartIndex: __expectInt32(output.tooNewLogEventStartIndex), - tooOldLogEventEndIndex: __expectInt32(output.tooOldLogEventEndIndex), - } as any; -}; +// de_RejectedLogEventsInfo omitted. -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResourcePolicies - */ -const de_ResourcePolicies = (output: any, context: __SerdeContext): ResourcePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourcePolicy(entry, context); - }); - return retVal; -}; +// de_ResourcePolicies omitted. -/** - * deserializeAws_json1_1ResourcePolicy - */ -const de_ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => { - return { - lastUpdatedTime: __expectLong(output.lastUpdatedTime), - policyDocument: __expectString(output.policyDocument), - policyName: __expectString(output.policyName), - } as any; -}; +// de_ResourcePolicy omitted. -/** - * deserializeAws_json1_1ResultField - */ -const de_ResultField = (output: any, context: __SerdeContext): ResultField => { - return { - field: __expectString(output.field), - value: __expectString(output.value), - } as any; -}; +// de_ResultField omitted. -/** - * deserializeAws_json1_1ResultRows - */ -const de_ResultRows = (output: any, context: __SerdeContext): ResultField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultField(entry, context); - }); - return retVal; -}; +// de_ResultRows omitted. -/** - * deserializeAws_json1_1SearchedLogStream - */ -const de_SearchedLogStream = (output: any, context: __SerdeContext): SearchedLogStream => { - return { - logStreamName: __expectString(output.logStreamName), - searchedCompletely: __expectBoolean(output.searchedCompletely), - } as any; -}; +// de_SearchedLogStream omitted. -/** - * deserializeAws_json1_1SearchedLogStreams - */ -const de_SearchedLogStreams = (output: any, context: __SerdeContext): SearchedLogStream[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SearchedLogStream(entry, context); - }); - return retVal; -}; +// de_SearchedLogStreams omitted. -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceUnavailableException omitted. -/** - * deserializeAws_json1_1StartQueryResponse - */ -const de_StartQueryResponse = (output: any, context: __SerdeContext): StartQueryResponse => { - return { - queryId: __expectString(output.queryId), - } as any; -}; +// de_StartQueryResponse omitted. -/** - * deserializeAws_json1_1StopQueryResponse - */ -const de_StopQueryResponse = (output: any, context: __SerdeContext): StopQueryResponse => { - return { - success: __expectBoolean(output.success), - } as any; -}; +// de_StopQueryResponse omitted. -/** - * deserializeAws_json1_1SubscriptionFilter - */ -const de_SubscriptionFilter = (output: any, context: __SerdeContext): SubscriptionFilter => { - return { - creationTime: __expectLong(output.creationTime), - destinationArn: __expectString(output.destinationArn), - distribution: __expectString(output.distribution), - filterName: __expectString(output.filterName), - filterPattern: __expectString(output.filterPattern), - logGroupName: __expectString(output.logGroupName), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_SubscriptionFilter omitted. -/** - * deserializeAws_json1_1SubscriptionFilters - */ -const de_SubscriptionFilters = (output: any, context: __SerdeContext): SubscriptionFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubscriptionFilter(entry, context); - }); - return retVal; -}; +// de_SubscriptionFilters omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TestMetricFilterResponse - */ -const de_TestMetricFilterResponse = (output: any, context: __SerdeContext): TestMetricFilterResponse => { - return { - matches: output.matches != null ? de_MetricFilterMatches(output.matches, context) : undefined, - } as any; -}; +// de_TestMetricFilterResponse omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UnrecognizedClientException - */ -const de_UnrecognizedClientException = (output: any, context: __SerdeContext): UnrecognizedClientException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnrecognizedClientException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -5287,6 +3909,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cloudwatch/src/protocols/Aws_query.ts b/clients/client-cloudwatch/src/protocols/Aws_query.ts index 628f839c8945..d56f1f06fe8f 100644 --- a/clients/client-cloudwatch/src/protocols/Aws_query.ts +++ b/clients/client-cloudwatch/src/protocols/Aws_query.ts @@ -13,7 +13,7 @@ import { strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -883,7 +883,7 @@ export const de_DeleteAlarmsCommand = async ( const response: DeleteAlarmsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -904,10 +904,9 @@ const de_DeleteAlarmsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -930,7 +929,7 @@ export const de_DeleteAnomalyDetectorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -963,10 +962,9 @@ const de_DeleteAnomalyDetectorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -989,7 +987,7 @@ export const de_DeleteDashboardsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1016,10 +1014,9 @@ const de_DeleteDashboardsCommandError = async ( throw await de_DashboardNotFoundErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1042,7 +1039,7 @@ export const de_DeleteInsightRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1066,10 +1063,9 @@ const de_DeleteInsightRulesCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1092,7 +1088,7 @@ export const de_DeleteMetricStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1119,10 +1115,9 @@ const de_DeleteMetricStreamCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1145,7 +1140,7 @@ export const de_DescribeAlarmHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1166,10 +1161,9 @@ const de_DescribeAlarmHistoryCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1192,7 +1186,7 @@ export const de_DescribeAlarmsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1213,10 +1207,9 @@ const de_DescribeAlarmsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1239,7 +1232,7 @@ export const de_DescribeAlarmsForMetricCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1255,10 +1248,9 @@ const de_DescribeAlarmsForMetricCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1280,7 +1272,7 @@ export const de_DescribeAnomalyDetectorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1310,10 +1302,9 @@ const de_DescribeAnomalyDetectorsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1336,7 +1327,7 @@ export const de_DescribeInsightRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1357,10 +1348,9 @@ const de_DescribeInsightRulesCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1380,7 +1370,7 @@ export const de_DisableAlarmActionsCommand = async ( const response: DisableAlarmActionsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1396,10 +1386,9 @@ const de_DisableAlarmActionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1421,7 +1410,7 @@ export const de_DisableInsightRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1445,10 +1434,9 @@ const de_DisableInsightRulesCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1468,7 +1456,7 @@ export const de_EnableAlarmActionsCommand = async ( const response: EnableAlarmActionsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1484,10 +1472,9 @@ const de_EnableAlarmActionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1509,7 +1496,7 @@ export const de_EnableInsightRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1536,10 +1523,9 @@ const de_EnableInsightRulesCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1562,7 +1548,7 @@ export const de_GetDashboardCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1589,10 +1575,9 @@ const de_GetDashboardCommandError = async ( throw await de_DashboardNotFoundErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1615,7 +1600,7 @@ export const de_GetInsightRuleReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1642,10 +1627,9 @@ const de_GetInsightRuleReportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1668,7 +1652,7 @@ export const de_GetMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1689,10 +1673,9 @@ const de_GetMetricDataCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1715,7 +1698,7 @@ export const de_GetMetricStatisticsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1745,10 +1728,9 @@ const de_GetMetricStatisticsCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1771,7 +1753,7 @@ export const de_GetMetricStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1804,10 +1786,9 @@ const de_GetMetricStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1830,7 +1811,7 @@ export const de_GetMetricWidgetImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1846,10 +1827,9 @@ const de_GetMetricWidgetImageCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1871,7 +1851,7 @@ export const de_ListDashboardsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1895,10 +1875,9 @@ const de_ListDashboardsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1921,7 +1900,7 @@ export const de_ListManagedInsightRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1948,10 +1927,9 @@ const de_ListManagedInsightRulesCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1974,7 +1952,7 @@ export const de_ListMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1998,10 +1976,9 @@ const de_ListMetricsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2024,7 +2001,7 @@ export const de_ListMetricStreamsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2054,10 +2031,9 @@ const de_ListMetricStreamsCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2080,7 +2056,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2107,10 +2083,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2133,7 +2108,7 @@ export const de_PutAnomalyDetectorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2166,10 +2141,9 @@ const de_PutAnomalyDetectorCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2189,7 +2163,7 @@ export const de_PutCompositeAlarmCommand = async ( const response: PutCompositeAlarmCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2210,10 +2184,9 @@ const de_PutCompositeAlarmCommandError = async ( throw await de_LimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2236,7 +2209,7 @@ export const de_PutDashboardCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2260,10 +2233,9 @@ const de_PutDashboardCommandError = async ( throw await de_DashboardInvalidInputErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2286,7 +2258,7 @@ export const de_PutInsightRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2313,10 +2285,9 @@ const de_PutInsightRuleCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2339,7 +2310,7 @@ export const de_PutManagedInsightRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2363,10 +2334,9 @@ const de_PutManagedInsightRulesCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2386,7 +2356,7 @@ export const de_PutMetricAlarmCommand = async ( const response: PutMetricAlarmCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2407,10 +2377,9 @@ const de_PutMetricAlarmCommandError = async ( throw await de_LimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2430,7 +2399,7 @@ export const de_PutMetricDataCommand = async ( const response: PutMetricDataCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2460,10 +2429,9 @@ const de_PutMetricDataCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2486,7 +2454,7 @@ export const de_PutMetricStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2519,10 +2487,9 @@ const de_PutMetricStreamCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2542,7 +2509,7 @@ export const de_SetAlarmStateCommand = async ( const response: SetAlarmStateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2566,10 +2533,9 @@ const de_SetAlarmStateCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2592,7 +2558,7 @@ export const de_StartMetricStreamsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2619,10 +2585,9 @@ const de_StartMetricStreamsCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2645,7 +2610,7 @@ export const de_StopMetricStreamsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2672,10 +2637,9 @@ const de_StopMetricStreamsCommandError = async ( throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2698,7 +2662,7 @@ export const de_TagResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2728,10 +2692,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2754,7 +2717,7 @@ export const de_UntagResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2784,10 +2747,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6693,6 +6655,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-codeartifact/src/protocols/Aws_restJson1.ts b/clients/client-codeartifact/src/protocols/Aws_restJson1.ts index 4a5032ae8427..934e14e014ba 100644 --- a/clients/client-codeartifact/src/protocols/Aws_restJson1.ts +++ b/clients/client-codeartifact/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -134,34 +136,19 @@ import { UpdateRepositoryCommandInput, UpdateRepositoryCommandOutput } from "../ import { CodeartifactServiceException as __BaseException } from "../models/CodeartifactServiceException"; import { AccessDeniedException, - AssetSummary, ConflictException, DomainDescription, - DomainEntryPoint, DomainSummary, - HashAlgorithm, InternalServerException, - LicenseInfo, - PackageDependency, - PackageDescription, - PackageOriginConfiguration, PackageOriginRestrictions, - PackageSummary, PackageVersionDescription, - PackageVersionError, - PackageVersionOrigin, - PackageVersionSummary, RepositoryDescription, - RepositoryExternalConnectionInfo, RepositorySummary, ResourceNotFoundException, - ResourcePolicy, ServiceQuotaExceededException, - SuccessfulPackageVersionInfo, Tag, ThrottlingException, UpstreamRepository, - UpstreamRepositoryInfo, ValidationException, } from "../models/models_0"; @@ -218,14 +205,14 @@ export const se_CopyPackageVersionsCommand = async ( package: [, __expectNonNull(input.package!, `package`)], }); let body: any; - body = JSON.stringify({ - ...(input.allowOverwrite != null && { allowOverwrite: input.allowOverwrite }), - ...(input.includeFromUpstream != null && { includeFromUpstream: input.includeFromUpstream }), - ...(input.versionRevisions != null && { - versionRevisions: se_PackageVersionRevisionMap(input.versionRevisions, context), - }), - ...(input.versions != null && { versions: se_PackageVersionList(input.versions, context) }), - }); + body = JSON.stringify( + take(input, { + allowOverwrite: [], + includeFromUpstream: [], + versionRevisions: (_) => _json(_), + versions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -254,10 +241,12 @@ export const se_CreateDomainCommand = async ( domain: [, __expectNonNull(input.domain!, `domain`)], }); let body: any; - body = JSON.stringify({ - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + encryptionKey: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -288,11 +277,13 @@ export const se_CreateRepositoryCommand = async ( repository: [, __expectNonNull(input.repository!, `repository`)], }); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.upstreams != null && { upstreams: se_UpstreamRepositoryList(input.upstreams, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + tags: (_) => _json(_), + upstreams: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -414,10 +405,12 @@ export const se_DeletePackageVersionsCommand = async ( package: [, __expectNonNull(input.package!, `package`)], }); let body: any; - body = JSON.stringify({ - ...(input.expectedStatus != null && { expectedStatus: input.expectedStatus }), - ...(input.versions != null && { versions: se_PackageVersionList(input.versions, context) }), - }); + body = JSON.stringify( + take(input, { + expectedStatus: [], + versions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -658,13 +651,13 @@ export const se_DisposePackageVersionsCommand = async ( package: [, __expectNonNull(input.package!, `package`)], }); let body: any; - body = JSON.stringify({ - ...(input.expectedStatus != null && { expectedStatus: input.expectedStatus }), - ...(input.versionRevisions != null && { - versionRevisions: se_PackageVersionRevisionMap(input.versionRevisions, context), - }), - ...(input.versions != null && { versions: se_PackageVersionList(input.versions, context) }), - }); + body = JSON.stringify( + take(input, { + expectedStatus: [], + versionRevisions: (_) => _json(_), + versions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -874,10 +867,12 @@ export const se_ListDomainsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domains"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1170,12 +1165,14 @@ export const se_PutDomainPermissionsPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/domain/permissions/policy"; let body: any; - body = JSON.stringify({ - ...(input.domain != null && { domain: input.domain }), - ...(input.domainOwner != null && { domainOwner: input.domainOwner }), - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - ...(input.policyRevision != null && { policyRevision: input.policyRevision }), - }); + body = JSON.stringify( + take(input, { + domain: [], + domainOwner: [], + policyDocument: [], + policyRevision: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1208,9 +1205,11 @@ export const se_PutPackageOriginConfigurationCommand = async ( package: [, __expectNonNull(input.package!, `package`)], }); let body: any; - body = JSON.stringify({ - ...(input.restrictions != null && { restrictions: se_PackageOriginRestrictions(input.restrictions, context) }), - }); + body = JSON.stringify( + take(input, { + restrictions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1242,10 +1241,12 @@ export const se_PutRepositoryPermissionsPolicyCommand = async ( repository: [, __expectNonNull(input.repository!, `repository`)], }); let body: any; - body = JSON.stringify({ - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - ...(input.policyRevision != null && { policyRevision: input.policyRevision }), - }); + body = JSON.stringify( + take(input, { + policyDocument: [], + policyRevision: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1274,9 +1275,11 @@ export const se_TagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1305,9 +1308,11 @@ export const se_UntagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + tagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1342,14 +1347,14 @@ export const se_UpdatePackageVersionsStatusCommand = async ( package: [, __expectNonNull(input.package!, `package`)], }); let body: any; - body = JSON.stringify({ - ...(input.expectedStatus != null && { expectedStatus: input.expectedStatus }), - ...(input.targetStatus != null && { targetStatus: input.targetStatus }), - ...(input.versionRevisions != null && { - versionRevisions: se_PackageVersionRevisionMap(input.versionRevisions, context), - }), - ...(input.versions != null && { versions: se_PackageVersionList(input.versions, context) }), - }); + body = JSON.stringify( + take(input, { + expectedStatus: [], + targetStatus: [], + versionRevisions: (_) => _json(_), + versions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1380,10 +1385,12 @@ export const se_UpdateRepositoryCommand = async ( repository: [, __expectNonNull(input.repository!, `repository`)], }); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.upstreams != null && { upstreams: se_UpstreamRepositoryList(input.upstreams, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + upstreams: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1410,9 +1417,10 @@ export const de_AssociateExternalConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repository != null) { - contents.repository = de_RepositoryDescription(data.repository, context); - } + const doc = take(data, { + repository: (_) => de_RepositoryDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1452,10 +1460,9 @@ const de_AssociateExternalConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1475,12 +1482,11 @@ export const de_CopyPackageVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedVersions != null) { - contents.failedVersions = de_PackageVersionErrorMap(data.failedVersions, context); - } - if (data.successfulVersions != null) { - contents.successfulVersions = de_SuccessfulPackageVersionInfoMap(data.successfulVersions, context); - } + const doc = take(data, { + failedVersions: _json, + successfulVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1520,10 +1526,9 @@ const de_CopyPackageVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1543,9 +1548,10 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domain != null) { - contents.domain = de_DomainDescription(data.domain, context); - } + const doc = take(data, { + domain: (_) => de_DomainDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1585,10 +1591,9 @@ const de_CreateDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1608,9 +1613,10 @@ export const de_CreateRepositoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repository != null) { - contents.repository = de_RepositoryDescription(data.repository, context); - } + const doc = take(data, { + repository: (_) => de_RepositoryDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1650,10 +1656,9 @@ const de_CreateRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1673,9 +1678,10 @@ export const de_DeleteDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domain != null) { - contents.domain = de_DomainDescription(data.domain, context); - } + const doc = take(data, { + domain: (_) => de_DomainDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1709,10 +1715,9 @@ const de_DeleteDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1732,9 +1737,10 @@ export const de_DeleteDomainPermissionsPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResourcePolicy(data.policy, context); - } + const doc = take(data, { + policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1771,10 +1777,9 @@ const de_DeleteDomainPermissionsPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1794,9 +1799,10 @@ export const de_DeletePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deletedPackage != null) { - contents.deletedPackage = de_PackageSummary(data.deletedPackage, context); - } + const doc = take(data, { + deletedPackage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1833,10 +1839,9 @@ const de_DeletePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1856,12 +1861,11 @@ export const de_DeletePackageVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedVersions != null) { - contents.failedVersions = de_PackageVersionErrorMap(data.failedVersions, context); - } - if (data.successfulVersions != null) { - contents.successfulVersions = de_SuccessfulPackageVersionInfoMap(data.successfulVersions, context); - } + const doc = take(data, { + failedVersions: _json, + successfulVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1898,10 +1902,9 @@ const de_DeletePackageVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1921,9 +1924,10 @@ export const de_DeleteRepositoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repository != null) { - contents.repository = de_RepositoryDescription(data.repository, context); - } + const doc = take(data, { + repository: (_) => de_RepositoryDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1960,10 +1964,9 @@ const de_DeleteRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1983,9 +1986,10 @@ export const de_DeleteRepositoryPermissionsPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResourcePolicy(data.policy, context); - } + const doc = take(data, { + policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2022,10 +2026,9 @@ const de_DeleteRepositoryPermissionsPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2045,9 +2048,10 @@ export const de_DescribeDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domain != null) { - contents.domain = de_DomainDescription(data.domain, context); - } + const doc = take(data, { + domain: (_) => de_DomainDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2081,10 +2085,9 @@ const de_DescribeDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2104,9 +2107,10 @@ export const de_DescribePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.package != null) { - contents.package = de_PackageDescription(data.package, context); - } + const doc = take(data, { + package: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2140,10 +2144,9 @@ const de_DescribePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2163,9 +2166,10 @@ export const de_DescribePackageVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.packageVersion != null) { - contents.packageVersion = de_PackageVersionDescription(data.packageVersion, context); - } + const doc = take(data, { + packageVersion: (_) => de_PackageVersionDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2202,10 +2206,9 @@ const de_DescribePackageVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2225,9 +2228,10 @@ export const de_DescribeRepositoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repository != null) { - contents.repository = de_RepositoryDescription(data.repository, context); - } + const doc = take(data, { + repository: (_) => de_RepositoryDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2261,10 +2265,9 @@ const de_DescribeRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2284,9 +2287,10 @@ export const de_DisassociateExternalConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repository != null) { - contents.repository = de_RepositoryDescription(data.repository, context); - } + const doc = take(data, { + repository: (_) => de_RepositoryDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2326,10 +2330,9 @@ const de_DisassociateExternalConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2349,12 +2352,11 @@ export const de_DisposePackageVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedVersions != null) { - contents.failedVersions = de_PackageVersionErrorMap(data.failedVersions, context); - } - if (data.successfulVersions != null) { - contents.successfulVersions = de_SuccessfulPackageVersionInfoMap(data.successfulVersions, context); - } + const doc = take(data, { + failedVersions: _json, + successfulVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2391,10 +2393,9 @@ const de_DisposePackageVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2414,12 +2415,11 @@ export const de_GetAuthorizationTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizationToken != null) { - contents.authorizationToken = __expectString(data.authorizationToken); - } - if (data.expiration != null) { - contents.expiration = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expiration))); - } + const doc = take(data, { + authorizationToken: __expectString, + expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2453,10 +2453,9 @@ const de_GetAuthorizationTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2476,9 +2475,10 @@ export const de_GetDomainPermissionsPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResourcePolicy(data.policy, context); - } + const doc = take(data, { + policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2512,10 +2512,9 @@ const de_GetDomainPermissionsPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2576,10 +2575,9 @@ const de_GetPackageVersionAssetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2599,24 +2597,15 @@ export const de_GetPackageVersionReadmeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.format != null) { - contents.format = __expectString(data.format); - } - if (data.namespace != null) { - contents.namespace = __expectString(data.namespace); - } - if (data.package != null) { - contents.package = __expectString(data.package); - } - if (data.readme != null) { - contents.readme = __expectString(data.readme); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.versionRevision != null) { - contents.versionRevision = __expectString(data.versionRevision); - } + const doc = take(data, { + format: __expectString, + namespace: __expectString, + package: __expectString, + readme: __expectString, + version: __expectString, + versionRevision: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2650,10 +2639,9 @@ const de_GetPackageVersionReadmeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2673,9 +2661,10 @@ export const de_GetRepositoryEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repositoryEndpoint != null) { - contents.repositoryEndpoint = __expectString(data.repositoryEndpoint); - } + const doc = take(data, { + repositoryEndpoint: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2709,10 +2698,9 @@ const de_GetRepositoryEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,9 +2720,10 @@ export const de_GetRepositoryPermissionsPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResourcePolicy(data.policy, context); - } + const doc = take(data, { + policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2768,10 +2757,9 @@ const de_GetRepositoryPermissionsPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2791,12 +2779,11 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domains != null) { - contents.domains = de_DomainSummaryList(data.domains, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + domains: (_) => de_DomainSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2827,10 +2814,9 @@ const de_ListDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2850,12 +2836,11 @@ export const de_ListPackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.packages != null) { - contents.packages = de_PackageSummaryList(data.packages, context); - } + const doc = take(data, { + nextToken: __expectString, + packages: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2889,10 +2874,9 @@ const de_ListPackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2912,27 +2896,16 @@ export const de_ListPackageVersionAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assets != null) { - contents.assets = de_AssetSummaryList(data.assets, context); - } - if (data.format != null) { - contents.format = __expectString(data.format); - } - if (data.namespace != null) { - contents.namespace = __expectString(data.namespace); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.package != null) { - contents.package = __expectString(data.package); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.versionRevision != null) { - contents.versionRevision = __expectString(data.versionRevision); - } + const doc = take(data, { + assets: _json, + format: __expectString, + namespace: __expectString, + nextToken: __expectString, + package: __expectString, + version: __expectString, + versionRevision: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2966,10 +2939,9 @@ const de_ListPackageVersionAssetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2989,27 +2961,16 @@ export const de_ListPackageVersionDependenciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dependencies != null) { - contents.dependencies = de_PackageDependencyList(data.dependencies, context); - } - if (data.format != null) { - contents.format = __expectString(data.format); - } - if (data.namespace != null) { - contents.namespace = __expectString(data.namespace); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.package != null) { - contents.package = __expectString(data.package); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.versionRevision != null) { - contents.versionRevision = __expectString(data.versionRevision); - } + const doc = take(data, { + dependencies: _json, + format: __expectString, + namespace: __expectString, + nextToken: __expectString, + package: __expectString, + version: __expectString, + versionRevision: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3043,10 +3004,9 @@ const de_ListPackageVersionDependenciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3066,24 +3026,15 @@ export const de_ListPackageVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.defaultDisplayVersion != null) { - contents.defaultDisplayVersion = __expectString(data.defaultDisplayVersion); - } - if (data.format != null) { - contents.format = __expectString(data.format); - } - if (data.namespace != null) { - contents.namespace = __expectString(data.namespace); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.package != null) { - contents.package = __expectString(data.package); - } - if (data.versions != null) { - contents.versions = de_PackageVersionSummaryList(data.versions, context); - } + const doc = take(data, { + defaultDisplayVersion: __expectString, + format: __expectString, + namespace: __expectString, + nextToken: __expectString, + package: __expectString, + versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3117,10 +3068,9 @@ const de_ListPackageVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3140,12 +3090,11 @@ export const de_ListRepositoriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.repositories != null) { - contents.repositories = de_RepositorySummaryList(data.repositories, context); - } + const doc = take(data, { + nextToken: __expectString, + repositories: (_) => de_RepositorySummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3176,10 +3125,9 @@ const de_ListRepositoriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3199,12 +3147,11 @@ export const de_ListRepositoriesInDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.repositories != null) { - contents.repositories = de_RepositorySummaryList(data.repositories, context); - } + const doc = take(data, { + nextToken: __expectString, + repositories: (_) => de_RepositorySummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3238,10 +3185,9 @@ const de_ListRepositoriesInDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3261,9 +3207,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3294,10 +3241,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3317,27 +3263,16 @@ export const de_PublishPackageVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.asset != null) { - contents.asset = de_AssetSummary(data.asset, context); - } - if (data.format != null) { - contents.format = __expectString(data.format); - } - if (data.namespace != null) { - contents.namespace = __expectString(data.namespace); - } - if (data.package != null) { - contents.package = __expectString(data.package); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.versionRevision != null) { - contents.versionRevision = __expectString(data.versionRevision); - } + const doc = take(data, { + asset: _json, + format: __expectString, + namespace: __expectString, + package: __expectString, + status: __expectString, + version: __expectString, + versionRevision: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3377,10 +3312,9 @@ const de_PublishPackageVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3400,9 +3334,10 @@ export const de_PutDomainPermissionsPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResourcePolicy(data.policy, context); - } + const doc = take(data, { + policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3442,10 +3377,9 @@ const de_PutDomainPermissionsPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3465,9 +3399,10 @@ export const de_PutPackageOriginConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.originConfiguration != null) { - contents.originConfiguration = de_PackageOriginConfiguration(data.originConfiguration, context); - } + const doc = take(data, { + originConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3501,10 +3436,9 @@ const de_PutPackageOriginConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3524,9 +3458,10 @@ export const de_PutRepositoryPermissionsPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResourcePolicy(data.policy, context); - } + const doc = take(data, { + policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3566,10 +3501,9 @@ const de_PutRepositoryPermissionsPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3622,10 +3556,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3675,10 +3608,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3698,12 +3630,11 @@ export const de_UpdatePackageVersionsStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedVersions != null) { - contents.failedVersions = de_PackageVersionErrorMap(data.failedVersions, context); - } - if (data.successfulVersions != null) { - contents.successfulVersions = de_SuccessfulPackageVersionInfoMap(data.successfulVersions, context); - } + const doc = take(data, { + failedVersions: _json, + successfulVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3740,10 +3671,9 @@ const de_UpdatePackageVersionsStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3763,9 +3693,10 @@ export const de_UpdateRepositoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.repository != null) { - contents.repository = de_RepositoryDescription(data.repository, context); - } + const doc = take(data, { + repository: (_) => de_RepositoryDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3805,16 +3736,15 @@ const de_UpdateRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3824,9 +3754,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3840,15 +3771,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3865,9 +3793,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3884,15 +3813,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3909,15 +3835,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3936,9 +3859,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3952,12 +3876,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3965,176 +3888,59 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1PackageOriginRestrictions - */ -const se_PackageOriginRestrictions = (input: PackageOriginRestrictions, context: __SerdeContext): any => { - return { - ...(input.publish != null && { publish: input.publish }), - ...(input.upstream != null && { upstream: input.upstream }), - }; -}; +// se_PackageOriginRestrictions omitted. -/** - * serializeAws_restJson1PackageVersionList - */ -const se_PackageVersionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PackageVersionList omitted. -/** - * serializeAws_restJson1PackageVersionRevisionMap - */ -const se_PackageVersionRevisionMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PackageVersionRevisionMap omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1UpstreamRepository - */ -const se_UpstreamRepository = (input: UpstreamRepository, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_UpstreamRepository omitted. -/** - * serializeAws_restJson1UpstreamRepositoryList - */ -const se_UpstreamRepositoryList = (input: UpstreamRepository[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpstreamRepository(entry, context); - }); -}; +// se_UpstreamRepositoryList omitted. -/** - * deserializeAws_restJson1AssetHashes - */ -const de_AssetHashes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [HashAlgorithm | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AssetHashes omitted. -/** - * deserializeAws_restJson1AssetSummary - */ -const de_AssetSummary = (output: any, context: __SerdeContext): AssetSummary => { - return { - hashes: output.hashes != null ? de_AssetHashes(output.hashes, context) : undefined, - name: __expectString(output.name), - size: __expectLong(output.size), - } as any; -}; +// de_AssetSummary omitted. -/** - * deserializeAws_restJson1AssetSummaryList - */ -const de_AssetSummaryList = (output: any, context: __SerdeContext): AssetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetSummary(entry, context); - }); - return retVal; -}; +// de_AssetSummaryList omitted. /** * deserializeAws_restJson1DomainDescription */ const de_DomainDescription = (output: any, context: __SerdeContext): DomainDescription => { - return { - arn: __expectString(output.arn), - assetSizeBytes: __expectLong(output.assetSizeBytes), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - encryptionKey: __expectString(output.encryptionKey), - name: __expectString(output.name), - owner: __expectString(output.owner), - repositoryCount: __expectInt32(output.repositoryCount), - s3BucketArn: __expectString(output.s3BucketArn), - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + assetSizeBytes: __expectLong, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionKey: __expectString, + name: __expectString, + owner: __expectString, + repositoryCount: __expectInt32, + s3BucketArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DomainEntryPoint - */ -const de_DomainEntryPoint = (output: any, context: __SerdeContext): DomainEntryPoint => { - return { - externalConnectionName: __expectString(output.externalConnectionName), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_DomainEntryPoint omitted. /** * deserializeAws_restJson1DomainSummary */ const de_DomainSummary = (output: any, context: __SerdeContext): DomainSummary => { - return { - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - encryptionKey: __expectString(output.encryptionKey), - name: __expectString(output.name), - owner: __expectString(output.owner), - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionKey: __expectString, + name: __expectString, + owner: __expectString, + status: __expectString, + }) as any; }; /** @@ -4144,286 +3950,94 @@ const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LicenseInfo - */ -const de_LicenseInfo = (output: any, context: __SerdeContext): LicenseInfo => { - return { - name: __expectString(output.name), - url: __expectString(output.url), - } as any; -}; +// de_LicenseInfo omitted. -/** - * deserializeAws_restJson1LicenseInfoList - */ -const de_LicenseInfoList = (output: any, context: __SerdeContext): LicenseInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseInfo(entry, context); - }); - return retVal; -}; +// de_LicenseInfoList omitted. -/** - * deserializeAws_restJson1PackageDependency - */ -const de_PackageDependency = (output: any, context: __SerdeContext): PackageDependency => { - return { - dependencyType: __expectString(output.dependencyType), - namespace: __expectString(output.namespace), - package: __expectString(output.package), - versionRequirement: __expectString(output.versionRequirement), - } as any; -}; +// de_PackageDependency omitted. -/** - * deserializeAws_restJson1PackageDependencyList - */ -const de_PackageDependencyList = (output: any, context: __SerdeContext): PackageDependency[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PackageDependency(entry, context); - }); - return retVal; -}; +// de_PackageDependencyList omitted. -/** - * deserializeAws_restJson1PackageDescription - */ -const de_PackageDescription = (output: any, context: __SerdeContext): PackageDescription => { - return { - format: __expectString(output.format), - name: __expectString(output.name), - namespace: __expectString(output.namespace), - originConfiguration: - output.originConfiguration != null - ? de_PackageOriginConfiguration(output.originConfiguration, context) - : undefined, - } as any; -}; +// de_PackageDescription omitted. -/** - * deserializeAws_restJson1PackageOriginConfiguration - */ -const de_PackageOriginConfiguration = (output: any, context: __SerdeContext): PackageOriginConfiguration => { - return { - restrictions: output.restrictions != null ? de_PackageOriginRestrictions(output.restrictions, context) : undefined, - } as any; -}; +// de_PackageOriginConfiguration omitted. -/** - * deserializeAws_restJson1PackageOriginRestrictions - */ -const de_PackageOriginRestrictions = (output: any, context: __SerdeContext): PackageOriginRestrictions => { - return { - publish: __expectString(output.publish), - upstream: __expectString(output.upstream), - } as any; -}; +// de_PackageOriginRestrictions omitted. -/** - * deserializeAws_restJson1PackageSummary - */ -const de_PackageSummary = (output: any, context: __SerdeContext): PackageSummary => { - return { - format: __expectString(output.format), - namespace: __expectString(output.namespace), - originConfiguration: - output.originConfiguration != null - ? de_PackageOriginConfiguration(output.originConfiguration, context) - : undefined, - package: __expectString(output.package), - } as any; -}; +// de_PackageSummary omitted. -/** - * deserializeAws_restJson1PackageSummaryList - */ -const de_PackageSummaryList = (output: any, context: __SerdeContext): PackageSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PackageSummary(entry, context); - }); - return retVal; -}; +// de_PackageSummaryList omitted. /** * deserializeAws_restJson1PackageVersionDescription */ const de_PackageVersionDescription = (output: any, context: __SerdeContext): PackageVersionDescription => { - return { - displayName: __expectString(output.displayName), - format: __expectString(output.format), - homePage: __expectString(output.homePage), - licenses: output.licenses != null ? de_LicenseInfoList(output.licenses, context) : undefined, - namespace: __expectString(output.namespace), - origin: output.origin != null ? de_PackageVersionOrigin(output.origin, context) : undefined, - packageName: __expectString(output.packageName), - publishedTime: - output.publishedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.publishedTime))) - : undefined, - revision: __expectString(output.revision), - sourceCodeRepository: __expectString(output.sourceCodeRepository), - status: __expectString(output.status), - summary: __expectString(output.summary), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1PackageVersionError - */ -const de_PackageVersionError = (output: any, context: __SerdeContext): PackageVersionError => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; -}; - -/** - * deserializeAws_restJson1PackageVersionErrorMap - */ -const de_PackageVersionErrorMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PackageVersionError(value, context); - return acc; - }, {}); + return take(output, { + displayName: __expectString, + format: __expectString, + homePage: __expectString, + licenses: _json, + namespace: __expectString, + origin: _json, + packageName: __expectString, + publishedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + revision: __expectString, + sourceCodeRepository: __expectString, + status: __expectString, + summary: __expectString, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1PackageVersionOrigin - */ -const de_PackageVersionOrigin = (output: any, context: __SerdeContext): PackageVersionOrigin => { - return { - domainEntryPoint: - output.domainEntryPoint != null ? de_DomainEntryPoint(output.domainEntryPoint, context) : undefined, - originType: __expectString(output.originType), - } as any; -}; +// de_PackageVersionError omitted. -/** - * deserializeAws_restJson1PackageVersionSummary - */ -const de_PackageVersionSummary = (output: any, context: __SerdeContext): PackageVersionSummary => { - return { - origin: output.origin != null ? de_PackageVersionOrigin(output.origin, context) : undefined, - revision: __expectString(output.revision), - status: __expectString(output.status), - version: __expectString(output.version), - } as any; -}; +// de_PackageVersionErrorMap omitted. -/** - * deserializeAws_restJson1PackageVersionSummaryList - */ -const de_PackageVersionSummaryList = (output: any, context: __SerdeContext): PackageVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PackageVersionSummary(entry, context); - }); - return retVal; -}; +// de_PackageVersionOrigin omitted. + +// de_PackageVersionSummary omitted. + +// de_PackageVersionSummaryList omitted. /** * deserializeAws_restJson1RepositoryDescription */ const de_RepositoryDescription = (output: any, context: __SerdeContext): RepositoryDescription => { - return { - administratorAccount: __expectString(output.administratorAccount), - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - description: __expectString(output.description), - domainName: __expectString(output.domainName), - domainOwner: __expectString(output.domainOwner), - externalConnections: - output.externalConnections != null - ? de_RepositoryExternalConnectionInfoList(output.externalConnections, context) - : undefined, - name: __expectString(output.name), - upstreams: output.upstreams != null ? de_UpstreamRepositoryInfoList(output.upstreams, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RepositoryExternalConnectionInfo - */ -const de_RepositoryExternalConnectionInfo = ( - output: any, - context: __SerdeContext -): RepositoryExternalConnectionInfo => { - return { - externalConnectionName: __expectString(output.externalConnectionName), - packageFormat: __expectString(output.packageFormat), - status: __expectString(output.status), - } as any; + return take(output, { + administratorAccount: __expectString, + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + domainName: __expectString, + domainOwner: __expectString, + externalConnections: _json, + name: __expectString, + upstreams: _json, + }) as any; }; -/** - * deserializeAws_restJson1RepositoryExternalConnectionInfoList - */ -const de_RepositoryExternalConnectionInfoList = ( - output: any, - context: __SerdeContext -): RepositoryExternalConnectionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryExternalConnectionInfo(entry, context); - }); - return retVal; -}; +// de_RepositoryExternalConnectionInfo omitted. + +// de_RepositoryExternalConnectionInfoList omitted. /** * deserializeAws_restJson1RepositorySummary */ const de_RepositorySummary = (output: any, context: __SerdeContext): RepositorySummary => { - return { - administratorAccount: __expectString(output.administratorAccount), - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - description: __expectString(output.description), - domainName: __expectString(output.domainName), - domainOwner: __expectString(output.domainOwner), - name: __expectString(output.name), - } as any; + return take(output, { + administratorAccount: __expectString, + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + domainName: __expectString, + domainOwner: __expectString, + name: __expectString, + }) as any; }; /** @@ -4433,102 +4047,24 @@ const de_RepositorySummaryList = (output: any, context: __SerdeContext): Reposit const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RepositorySummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ResourcePolicy - */ -const de_ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => { - return { - document: __expectString(output.document), - resourceArn: __expectString(output.resourceArn), - revision: __expectString(output.revision), - } as any; -}; +// de_ResourcePolicy omitted. -/** - * deserializeAws_restJson1SuccessfulPackageVersionInfo - */ -const de_SuccessfulPackageVersionInfo = (output: any, context: __SerdeContext): SuccessfulPackageVersionInfo => { - return { - revision: __expectString(output.revision), - status: __expectString(output.status), - } as any; -}; +// de_SuccessfulPackageVersionInfo omitted. -/** - * deserializeAws_restJson1SuccessfulPackageVersionInfoMap - */ -const de_SuccessfulPackageVersionInfoMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SuccessfulPackageVersionInfo(value, context); - return acc; - }, - {} - ); -}; +// de_SuccessfulPackageVersionInfoMap omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1UpstreamRepositoryInfo - */ -const de_UpstreamRepositoryInfo = (output: any, context: __SerdeContext): UpstreamRepositoryInfo => { - return { - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_UpstreamRepositoryInfo omitted. -/** - * deserializeAws_restJson1UpstreamRepositoryInfoList - */ -const de_UpstreamRepositoryInfoList = (output: any, context: __SerdeContext): UpstreamRepositoryInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpstreamRepositoryInfo(entry, context); - }); - return retVal; -}; +// de_UpstreamRepositoryInfoList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-codebuild/src/protocols/Aws_json1_1.ts b/clients/client-codebuild/src/protocols/Aws_json1_1.ts index 0740ecd168f0..ee608f54fd3e 100644 --- a/clients/client-codebuild/src/protocols/Aws_json1_1.ts +++ b/clients/client-codebuild/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -114,7 +116,6 @@ import { CodeBuildServiceException as __BaseException } from "../models/CodeBuil import { AccountLimitExceededException, BatchDeleteBuildsInput, - BatchDeleteBuildsOutput, BatchGetBuildBatchesInput, BatchGetBuildBatchesOutput, BatchGetBuildsInput, @@ -127,12 +128,10 @@ import { BatchGetReportsOutput, BatchRestrictions, Build, - BuildArtifacts, BuildBatch, BuildBatchFilter, BuildBatchPhase, BuildGroup, - BuildNotDeleted, BuildPhase, BuildStatusConfig, BuildSummary, @@ -146,72 +145,40 @@ import { CreateReportGroupOutput, CreateWebhookInput, CreateWebhookOutput, - DebugSession, DeleteBuildBatchInput, - DeleteBuildBatchOutput, DeleteProjectInput, - DeleteProjectOutput, DeleteReportGroupInput, - DeleteReportGroupOutput, DeleteReportInput, - DeleteReportOutput, DeleteResourcePolicyInput, - DeleteResourcePolicyOutput, DeleteSourceCredentialsInput, - DeleteSourceCredentialsOutput, DeleteWebhookInput, - DeleteWebhookOutput, DescribeCodeCoveragesInput, DescribeCodeCoveragesOutput, DescribeTestCasesInput, DescribeTestCasesOutput, - EnvironmentImage, - EnvironmentLanguage, - EnvironmentPlatform, EnvironmentVariable, - ExportedEnvironmentVariable, GetReportGroupTrendInput, - GetReportGroupTrendOutput, GetResourcePolicyInput, - GetResourcePolicyOutput, GitSubmodulesConfig, ImportSourceCredentialsInput, - ImportSourceCredentialsOutput, InvalidateProjectCacheInput, - InvalidateProjectCacheOutput, InvalidInputException, ListBuildBatchesForProjectInput, - ListBuildBatchesForProjectOutput, ListBuildBatchesInput, - ListBuildBatchesOutput, ListBuildsForProjectInput, - ListBuildsForProjectOutput, ListBuildsInput, - ListBuildsOutput, ListCuratedEnvironmentImagesInput, - ListCuratedEnvironmentImagesOutput, ListProjectsInput, - ListProjectsOutput, ListReportGroupsInput, - ListReportGroupsOutput, ListReportsForReportGroupInput, - ListReportsForReportGroupOutput, ListReportsInput, - ListReportsOutput, ListSharedProjectsInput, - ListSharedProjectsOutput, ListSharedReportGroupsInput, - ListSharedReportGroupsOutput, ListSourceCredentialsInput, - ListSourceCredentialsOutput, LogsConfig, - LogsLocation, - NetworkInterface, OAuthProviderException, - PhaseContext, Project, ProjectArtifacts, - ProjectBadge, ProjectBuildBatchConfig, ProjectCache, ProjectEnvironment, @@ -219,15 +186,11 @@ import { ProjectSource, ProjectSourceVersion, PutResourcePolicyInput, - PutResourcePolicyOutput, RegistryCredential, Report, ReportExportConfig, ReportFilter, ReportGroup, - ReportGroupTrendStats, - ReportWithRawData, - ResolvedArtifact, ResourceAlreadyExistsException, ResourceNotFoundException, RetryBuildBatchInput, @@ -237,7 +200,6 @@ import { S3LogsConfig, S3ReportExportConfig, SourceAuth, - SourceCredentialsInfo, StartBuildBatchInput, StartBuildBatchOutput, StartBuildInput, @@ -249,11 +211,9 @@ import { Tag, TestCase, TestCaseFilter, - TestReportSummary, UpdateProjectInput, UpdateProjectOutput, UpdateProjectVisibilityInput, - UpdateProjectVisibilityOutput, UpdateReportGroupInput, UpdateReportGroupOutput, UpdateWebhookInput, @@ -272,7 +232,7 @@ export const se_BatchDeleteBuildsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteBuilds"); let body: any; - body = JSON.stringify(se_BatchDeleteBuildsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -285,7 +245,7 @@ export const se_BatchGetBuildBatchesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetBuildBatches"); let body: any; - body = JSON.stringify(se_BatchGetBuildBatchesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -298,7 +258,7 @@ export const se_BatchGetBuildsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetBuilds"); let body: any; - body = JSON.stringify(se_BatchGetBuildsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -311,7 +271,7 @@ export const se_BatchGetProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetProjects"); let body: any; - body = JSON.stringify(se_BatchGetProjectsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +284,7 @@ export const se_BatchGetReportGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetReportGroups"); let body: any; - body = JSON.stringify(se_BatchGetReportGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +297,7 @@ export const se_BatchGetReportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetReports"); let body: any; - body = JSON.stringify(se_BatchGetReportsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +310,7 @@ export const se_CreateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProject"); let body: any; - body = JSON.stringify(se_CreateProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +323,7 @@ export const se_CreateReportGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateReportGroup"); let body: any; - body = JSON.stringify(se_CreateReportGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +336,7 @@ export const se_CreateWebhookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWebhook"); let body: any; - body = JSON.stringify(se_CreateWebhookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +349,7 @@ export const se_DeleteBuildBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBuildBatch"); let body: any; - body = JSON.stringify(se_DeleteBuildBatchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +362,7 @@ export const se_DeleteProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProject"); let body: any; - body = JSON.stringify(se_DeleteProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +375,7 @@ export const se_DeleteReportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReport"); let body: any; - body = JSON.stringify(se_DeleteReportInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -428,7 +388,7 @@ export const se_DeleteReportGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReportGroup"); let body: any; - body = JSON.stringify(se_DeleteReportGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,7 +401,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -454,7 +414,7 @@ export const se_DeleteSourceCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSourceCredentials"); let body: any; - body = JSON.stringify(se_DeleteSourceCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -467,7 +427,7 @@ export const se_DeleteWebhookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWebhook"); let body: any; - body = JSON.stringify(se_DeleteWebhookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -493,7 +453,7 @@ export const se_DescribeTestCasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTestCases"); let body: any; - body = JSON.stringify(se_DescribeTestCasesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -506,7 +466,7 @@ export const se_GetReportGroupTrendCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetReportGroupTrend"); let body: any; - body = JSON.stringify(se_GetReportGroupTrendInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -519,7 +479,7 @@ export const se_GetResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); let body: any; - body = JSON.stringify(se_GetResourcePolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -532,7 +492,7 @@ export const se_ImportSourceCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportSourceCredentials"); let body: any; - body = JSON.stringify(se_ImportSourceCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +505,7 @@ export const se_InvalidateProjectCacheCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InvalidateProjectCache"); let body: any; - body = JSON.stringify(se_InvalidateProjectCacheInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -558,7 +518,7 @@ export const se_ListBuildBatchesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBuildBatches"); let body: any; - body = JSON.stringify(se_ListBuildBatchesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -571,7 +531,7 @@ export const se_ListBuildBatchesForProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBuildBatchesForProject"); let body: any; - body = JSON.stringify(se_ListBuildBatchesForProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +544,7 @@ export const se_ListBuildsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBuilds"); let body: any; - body = JSON.stringify(se_ListBuildsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +557,7 @@ export const se_ListBuildsForProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBuildsForProject"); let body: any; - body = JSON.stringify(se_ListBuildsForProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +570,7 @@ export const se_ListCuratedEnvironmentImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCuratedEnvironmentImages"); let body: any; - body = JSON.stringify(se_ListCuratedEnvironmentImagesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -623,7 +583,7 @@ export const se_ListProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProjects"); let body: any; - body = JSON.stringify(se_ListProjectsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -636,7 +596,7 @@ export const se_ListReportGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReportGroups"); let body: any; - body = JSON.stringify(se_ListReportGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +609,7 @@ export const se_ListReportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReports"); let body: any; - body = JSON.stringify(se_ListReportsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +622,7 @@ export const se_ListReportsForReportGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReportsForReportGroup"); let body: any; - body = JSON.stringify(se_ListReportsForReportGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -675,7 +635,7 @@ export const se_ListSharedProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSharedProjects"); let body: any; - body = JSON.stringify(se_ListSharedProjectsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -688,7 +648,7 @@ export const se_ListSharedReportGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSharedReportGroups"); let body: any; - body = JSON.stringify(se_ListSharedReportGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -701,7 +661,7 @@ export const se_ListSourceCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSourceCredentials"); let body: any; - body = JSON.stringify(se_ListSourceCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -714,7 +674,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -727,7 +687,7 @@ export const se_RetryBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetryBuild"); let body: any; - body = JSON.stringify(se_RetryBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -740,7 +700,7 @@ export const se_RetryBuildBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetryBuildBatch"); let body: any; - body = JSON.stringify(se_RetryBuildBatchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -753,7 +713,7 @@ export const se_StartBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartBuild"); let body: any; - body = JSON.stringify(se_StartBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -766,7 +726,7 @@ export const se_StartBuildBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartBuildBatch"); let body: any; - body = JSON.stringify(se_StartBuildBatchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -779,7 +739,7 @@ export const se_StopBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopBuild"); let body: any; - body = JSON.stringify(se_StopBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -792,7 +752,7 @@ export const se_StopBuildBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopBuildBatch"); let body: any; - body = JSON.stringify(se_StopBuildBatchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -805,7 +765,7 @@ export const se_UpdateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProject"); let body: any; - body = JSON.stringify(se_UpdateProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -818,7 +778,7 @@ export const se_UpdateProjectVisibilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProjectVisibility"); let body: any; - body = JSON.stringify(se_UpdateProjectVisibilityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -831,7 +791,7 @@ export const se_UpdateReportGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateReportGroup"); let body: any; - body = JSON.stringify(se_UpdateReportGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -844,7 +804,7 @@ export const se_UpdateWebhookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWebhook"); let body: any; - body = JSON.stringify(se_UpdateWebhookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -860,12 +820,12 @@ export const de_BatchDeleteBuildsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteBuildsOutput(data, context); + contents = _json(data); const response: BatchDeleteBuildsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -886,10 +846,9 @@ const de_BatchDeleteBuildsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -912,7 +871,7 @@ export const de_BatchGetBuildBatchesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -933,10 +892,9 @@ const de_BatchGetBuildBatchesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -959,7 +917,7 @@ export const de_BatchGetBuildsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -980,10 +938,9 @@ const de_BatchGetBuildsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1006,7 +963,7 @@ export const de_BatchGetProjectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1027,10 +984,9 @@ const de_BatchGetProjectsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1053,7 +1009,7 @@ export const de_BatchGetReportGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1074,10 +1030,9 @@ const de_BatchGetReportGroupsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1100,7 +1055,7 @@ export const de_BatchGetReportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1121,10 +1076,9 @@ const de_BatchGetReportsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,7 +1101,7 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1174,10 +1128,9 @@ const de_CreateProjectCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,7 +1153,7 @@ export const de_CreateReportGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1227,10 +1180,9 @@ const de_CreateReportGroupCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1253,7 +1205,7 @@ export const de_CreateWebhookCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1283,10 +1235,9 @@ const de_CreateWebhookCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1304,12 +1255,12 @@ export const de_DeleteBuildBatchCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBuildBatchOutput(data, context); + contents = _json(data); const response: DeleteBuildBatchCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1330,10 +1281,9 @@ const de_DeleteBuildBatchCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1351,12 +1301,12 @@ export const de_DeleteProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProjectOutput(data, context); + contents = _json(data); const response: DeleteProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1377,10 +1327,9 @@ const de_DeleteProjectCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1398,12 +1347,12 @@ export const de_DeleteReportCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteReportOutput(data, context); + contents = _json(data); const response: DeleteReportCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1424,10 +1373,9 @@ const de_DeleteReportCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1445,12 +1393,12 @@ export const de_DeleteReportGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteReportGroupOutput(data, context); + contents = _json(data); const response: DeleteReportGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1471,10 +1419,9 @@ const de_DeleteReportGroupCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1492,12 +1439,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyOutput(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1518,10 +1465,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1539,12 +1485,12 @@ export const de_DeleteSourceCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSourceCredentialsOutput(data, context); + contents = _json(data); const response: DeleteSourceCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1568,10 +1514,9 @@ const de_DeleteSourceCredentialsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1589,12 +1534,12 @@ export const de_DeleteWebhookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWebhookOutput(data, context); + contents = _json(data); const response: DeleteWebhookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1621,10 +1566,9 @@ const de_DeleteWebhookCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1647,7 +1591,7 @@ export const de_DescribeCodeCoveragesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1668,10 +1612,9 @@ const de_DescribeCodeCoveragesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1694,7 +1637,7 @@ export const de_DescribeTestCasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1718,10 +1661,9 @@ const de_DescribeTestCasesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1739,12 +1681,12 @@ export const de_GetReportGroupTrendCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetReportGroupTrendOutput(data, context); + contents = _json(data); const response: GetReportGroupTrendCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1768,10 +1710,9 @@ const de_GetReportGroupTrendCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1789,12 +1730,12 @@ export const de_GetResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcePolicyOutput(data, context); + contents = _json(data); const response: GetResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1818,10 +1759,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1839,12 +1779,12 @@ export const de_ImportSourceCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportSourceCredentialsOutput(data, context); + contents = _json(data); const response: ImportSourceCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1871,10 +1811,9 @@ const de_ImportSourceCredentialsCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1892,12 +1831,12 @@ export const de_InvalidateProjectCacheCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_InvalidateProjectCacheOutput(data, context); + contents = _json(data); const response: InvalidateProjectCacheCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1921,10 +1860,9 @@ const de_InvalidateProjectCacheCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1942,12 +1880,12 @@ export const de_ListBuildBatchesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBuildBatchesOutput(data, context); + contents = _json(data); const response: ListBuildBatchesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1968,10 +1906,9 @@ const de_ListBuildBatchesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1989,12 +1926,12 @@ export const de_ListBuildBatchesForProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBuildBatchesForProjectOutput(data, context); + contents = _json(data); const response: ListBuildBatchesForProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2018,10 +1955,9 @@ const de_ListBuildBatchesForProjectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2039,12 +1975,12 @@ export const de_ListBuildsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBuildsOutput(data, context); + contents = _json(data); const response: ListBuildsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2065,10 +2001,9 @@ const de_ListBuildsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2086,12 +2021,12 @@ export const de_ListBuildsForProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBuildsForProjectOutput(data, context); + contents = _json(data); const response: ListBuildsForProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2115,10 +2050,9 @@ const de_ListBuildsForProjectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2136,12 +2070,12 @@ export const de_ListCuratedEnvironmentImagesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCuratedEnvironmentImagesOutput(data, context); + contents = _json(data); const response: ListCuratedEnvironmentImagesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2157,10 +2091,9 @@ const de_ListCuratedEnvironmentImagesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2177,12 +2110,12 @@ export const de_ListProjectsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProjectsOutput(data, context); + contents = _json(data); const response: ListProjectsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2203,10 +2136,9 @@ const de_ListProjectsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2224,12 +2156,12 @@ export const de_ListReportGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReportGroupsOutput(data, context); + contents = _json(data); const response: ListReportGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2250,10 +2182,9 @@ const de_ListReportGroupsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2271,12 +2202,12 @@ export const de_ListReportsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReportsOutput(data, context); + contents = _json(data); const response: ListReportsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2297,10 +2228,9 @@ const de_ListReportsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2318,12 +2248,12 @@ export const de_ListReportsForReportGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReportsForReportGroupOutput(data, context); + contents = _json(data); const response: ListReportsForReportGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2347,10 +2277,9 @@ const de_ListReportsForReportGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2368,12 +2297,12 @@ export const de_ListSharedProjectsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSharedProjectsOutput(data, context); + contents = _json(data); const response: ListSharedProjectsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2394,10 +2323,9 @@ const de_ListSharedProjectsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2415,12 +2343,12 @@ export const de_ListSharedReportGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSharedReportGroupsOutput(data, context); + contents = _json(data); const response: ListSharedReportGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2441,10 +2369,9 @@ const de_ListSharedReportGroupsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2462,12 +2389,12 @@ export const de_ListSourceCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSourceCredentialsOutput(data, context); + contents = _json(data); const response: ListSourceCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2488,10 +2415,9 @@ const de_ListSourceCredentialsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2509,12 +2435,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyOutput(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2538,10 +2464,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2564,7 +2489,7 @@ export const de_RetryBuildCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2591,10 +2516,9 @@ const de_RetryBuildCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2617,7 +2541,7 @@ export const de_RetryBuildBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2641,10 +2565,9 @@ const de_RetryBuildBatchCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2667,7 +2590,7 @@ export const de_StartBuildCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2694,10 +2617,9 @@ const de_StartBuildCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2720,7 +2642,7 @@ export const de_StartBuildBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2744,10 +2666,9 @@ const de_StartBuildBatchCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2770,7 +2691,7 @@ export const de_StopBuildCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2794,10 +2715,9 @@ const de_StopBuildCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2820,7 +2740,7 @@ export const de_StopBuildBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2844,10 +2764,9 @@ const de_StopBuildBatchCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2870,7 +2789,7 @@ export const de_UpdateProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2894,10 +2813,9 @@ const de_UpdateProjectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2915,12 +2833,12 @@ export const de_UpdateProjectVisibilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProjectVisibilityOutput(data, context); + contents = _json(data); const response: UpdateProjectVisibilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2944,10 +2862,9 @@ const de_UpdateProjectVisibilityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2970,7 +2887,7 @@ export const de_UpdateReportGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2994,10 +2911,9 @@ const de_UpdateReportGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3020,7 +2936,7 @@ export const de_UpdateWebhookCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3047,10 +2963,9 @@ const de_UpdateWebhookCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3064,7 +2979,7 @@ const de_AccountLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new AccountLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3080,7 +2995,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3096,7 +3011,7 @@ const de_OAuthProviderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OAuthProviderException(body, context); + const deserialized: any = _json(body); const exception = new OAuthProviderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3112,7 +3027,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3128,7 +3043,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3136,2881 +3051,904 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1BatchDeleteBuildsInput - */ -const se_BatchDeleteBuildsInput = (input: BatchDeleteBuildsInput, context: __SerdeContext): any => { - return { - ...(input.ids != null && { ids: se_BuildIds(input.ids, context) }), - }; -}; +// se_BatchDeleteBuildsInput omitted. -/** - * serializeAws_json1_1BatchGetBuildBatchesInput - */ -const se_BatchGetBuildBatchesInput = (input: BatchGetBuildBatchesInput, context: __SerdeContext): any => { - return { - ...(input.ids != null && { ids: se_BuildBatchIds(input.ids, context) }), - }; -}; +// se_BatchGetBuildBatchesInput omitted. -/** - * serializeAws_json1_1BatchGetBuildsInput - */ -const se_BatchGetBuildsInput = (input: BatchGetBuildsInput, context: __SerdeContext): any => { - return { - ...(input.ids != null && { ids: se_BuildIds(input.ids, context) }), - }; -}; +// se_BatchGetBuildsInput omitted. -/** - * serializeAws_json1_1BatchGetProjectsInput - */ -const se_BatchGetProjectsInput = (input: BatchGetProjectsInput, context: __SerdeContext): any => { - return { - ...(input.names != null && { names: se_ProjectNames(input.names, context) }), - }; -}; +// se_BatchGetProjectsInput omitted. -/** - * serializeAws_json1_1BatchGetReportGroupsInput - */ -const se_BatchGetReportGroupsInput = (input: BatchGetReportGroupsInput, context: __SerdeContext): any => { - return { - ...(input.reportGroupArns != null && { reportGroupArns: se_ReportGroupArns(input.reportGroupArns, context) }), - }; -}; +// se_BatchGetReportGroupsInput omitted. -/** - * serializeAws_json1_1BatchGetReportsInput - */ -const se_BatchGetReportsInput = (input: BatchGetReportsInput, context: __SerdeContext): any => { - return { - ...(input.reportArns != null && { reportArns: se_ReportArns(input.reportArns, context) }), - }; -}; +// se_BatchGetReportsInput omitted. -/** - * serializeAws_json1_1BatchRestrictions - */ -const se_BatchRestrictions = (input: BatchRestrictions, context: __SerdeContext): any => { - return { - ...(input.computeTypesAllowed != null && { - computeTypesAllowed: se_ComputeTypesAllowed(input.computeTypesAllowed, context), - }), - ...(input.maximumBuildsAllowed != null && { maximumBuildsAllowed: input.maximumBuildsAllowed }), - }; -}; +// se_BatchRestrictions omitted. -/** - * serializeAws_json1_1BuildBatchFilter - */ -const se_BuildBatchFilter = (input: BuildBatchFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_BuildBatchFilter omitted. -/** - * serializeAws_json1_1BuildBatchIds - */ -const se_BuildBatchIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BuildBatchIds omitted. -/** - * serializeAws_json1_1BuildIds - */ -const se_BuildIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BuildIds omitted. -/** - * serializeAws_json1_1BuildStatusConfig - */ -const se_BuildStatusConfig = (input: BuildStatusConfig, context: __SerdeContext): any => { - return { - ...(input.context != null && { context: input.context }), - ...(input.targetUrl != null && { targetUrl: input.targetUrl }), - }; -}; +// se_BuildStatusConfig omitted. -/** - * serializeAws_json1_1CloudWatchLogsConfig - */ -const se_CloudWatchLogsConfig = (input: CloudWatchLogsConfig, context: __SerdeContext): any => { - return { - ...(input.groupName != null && { groupName: input.groupName }), - ...(input.status != null && { status: input.status }), - ...(input.streamName != null && { streamName: input.streamName }), - }; -}; +// se_CloudWatchLogsConfig omitted. -/** - * serializeAws_json1_1ComputeTypesAllowed - */ -const se_ComputeTypesAllowed = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComputeTypesAllowed omitted. -/** - * serializeAws_json1_1CreateProjectInput - */ -const se_CreateProjectInput = (input: CreateProjectInput, context: __SerdeContext): any => { - return { - ...(input.artifacts != null && { artifacts: se_ProjectArtifacts(input.artifacts, context) }), - ...(input.badgeEnabled != null && { badgeEnabled: input.badgeEnabled }), - ...(input.buildBatchConfig != null && { - buildBatchConfig: se_ProjectBuildBatchConfig(input.buildBatchConfig, context), - }), - ...(input.cache != null && { cache: se_ProjectCache(input.cache, context) }), - ...(input.concurrentBuildLimit != null && { concurrentBuildLimit: input.concurrentBuildLimit }), - ...(input.description != null && { description: input.description }), - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.environment != null && { environment: se_ProjectEnvironment(input.environment, context) }), - ...(input.fileSystemLocations != null && { - fileSystemLocations: se_ProjectFileSystemLocations(input.fileSystemLocations, context), - }), - ...(input.logsConfig != null && { logsConfig: se_LogsConfig(input.logsConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.queuedTimeoutInMinutes != null && { queuedTimeoutInMinutes: input.queuedTimeoutInMinutes }), - ...(input.secondaryArtifacts != null && { - secondaryArtifacts: se_ProjectArtifactsList(input.secondaryArtifacts, context), - }), - ...(input.secondarySourceVersions != null && { - secondarySourceVersions: se_ProjectSecondarySourceVersions(input.secondarySourceVersions, context), - }), - ...(input.secondarySources != null && { secondarySources: se_ProjectSources(input.secondarySources, context) }), - ...(input.serviceRole != null && { serviceRole: input.serviceRole }), - ...(input.source != null && { source: se_ProjectSource(input.source, context) }), - ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.timeoutInMinutes != null && { timeoutInMinutes: input.timeoutInMinutes }), - ...(input.vpcConfig != null && { vpcConfig: se_VpcConfig(input.vpcConfig, context) }), - }; -}; +// se_CreateProjectInput omitted. -/** - * serializeAws_json1_1CreateReportGroupInput - */ -const se_CreateReportGroupInput = (input: CreateReportGroupInput, context: __SerdeContext): any => { - return { - ...(input.exportConfig != null && { exportConfig: se_ReportExportConfig(input.exportConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_CreateReportGroupInput omitted. -/** - * serializeAws_json1_1CreateWebhookInput - */ -const se_CreateWebhookInput = (input: CreateWebhookInput, context: __SerdeContext): any => { - return { - ...(input.branchFilter != null && { branchFilter: input.branchFilter }), - ...(input.buildType != null && { buildType: input.buildType }), - ...(input.filterGroups != null && { filterGroups: se_FilterGroups(input.filterGroups, context) }), - ...(input.projectName != null && { projectName: input.projectName }), - }; -}; +// se_CreateWebhookInput omitted. -/** - * serializeAws_json1_1DeleteBuildBatchInput - */ -const se_DeleteBuildBatchInput = (input: DeleteBuildBatchInput, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeleteBuildBatchInput omitted. -/** - * serializeAws_json1_1DeleteProjectInput - */ -const se_DeleteProjectInput = (input: DeleteProjectInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteProjectInput omitted. -/** - * serializeAws_json1_1DeleteReportGroupInput - */ -const se_DeleteReportGroupInput = (input: DeleteReportGroupInput, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.deleteReports != null && { deleteReports: input.deleteReports }), - }; -}; +// se_DeleteReportGroupInput omitted. -/** - * serializeAws_json1_1DeleteReportInput - */ -const se_DeleteReportInput = (input: DeleteReportInput, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteReportInput omitted. -/** - * serializeAws_json1_1DeleteResourcePolicyInput - */ -const se_DeleteResourcePolicyInput = (input: DeleteResourcePolicyInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_DeleteResourcePolicyInput omitted. -/** - * serializeAws_json1_1DeleteSourceCredentialsInput - */ -const se_DeleteSourceCredentialsInput = (input: DeleteSourceCredentialsInput, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteSourceCredentialsInput omitted. -/** - * serializeAws_json1_1DeleteWebhookInput - */ -const se_DeleteWebhookInput = (input: DeleteWebhookInput, context: __SerdeContext): any => { - return { - ...(input.projectName != null && { projectName: input.projectName }), - }; -}; +// se_DeleteWebhookInput omitted. /** * serializeAws_json1_1DescribeCodeCoveragesInput */ const se_DescribeCodeCoveragesInput = (input: DescribeCodeCoveragesInput, context: __SerdeContext): any => { - return { - ...(input.maxLineCoveragePercentage != null && { - maxLineCoveragePercentage: __serializeFloat(input.maxLineCoveragePercentage), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.minLineCoveragePercentage != null && { - minLineCoveragePercentage: __serializeFloat(input.minLineCoveragePercentage), - }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.reportArn != null && { reportArn: input.reportArn }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; - -/** - * serializeAws_json1_1DescribeTestCasesInput - */ -const se_DescribeTestCasesInput = (input: DescribeTestCasesInput, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_TestCaseFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.reportArn != null && { reportArn: input.reportArn }), - }; -}; - -/** - * serializeAws_json1_1EnvironmentVariable - */ -const se_EnvironmentVariable = (input: EnvironmentVariable, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1EnvironmentVariables - */ -const se_EnvironmentVariables = (input: EnvironmentVariable[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnvironmentVariable(entry, context); - }); -}; - -/** - * serializeAws_json1_1FilterGroup - */ -const se_FilterGroup = (input: WebhookFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WebhookFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1FilterGroups - */ -const se_FilterGroups = (input: WebhookFilter[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterGroup(entry, context); - }); + return take(input, { + maxLineCoveragePercentage: __serializeFloat, + maxResults: [], + minLineCoveragePercentage: __serializeFloat, + nextToken: [], + reportArn: [], + sortBy: [], + sortOrder: [], + }); }; -/** - * serializeAws_json1_1GetReportGroupTrendInput - */ -const se_GetReportGroupTrendInput = (input: GetReportGroupTrendInput, context: __SerdeContext): any => { - return { - ...(input.numOfReports != null && { numOfReports: input.numOfReports }), - ...(input.reportGroupArn != null && { reportGroupArn: input.reportGroupArn }), - ...(input.trendField != null && { trendField: input.trendField }), - }; -}; +// se_DescribeTestCasesInput omitted. -/** - * serializeAws_json1_1GetResourcePolicyInput - */ -const se_GetResourcePolicyInput = (input: GetResourcePolicyInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_EnvironmentVariable omitted. -/** - * serializeAws_json1_1GitSubmodulesConfig - */ -const se_GitSubmodulesConfig = (input: GitSubmodulesConfig, context: __SerdeContext): any => { - return { - ...(input.fetchSubmodules != null && { fetchSubmodules: input.fetchSubmodules }), - }; -}; +// se_EnvironmentVariables omitted. -/** - * serializeAws_json1_1ImportSourceCredentialsInput - */ -const se_ImportSourceCredentialsInput = (input: ImportSourceCredentialsInput, context: __SerdeContext): any => { - return { - ...(input.authType != null && { authType: input.authType }), - ...(input.serverType != null && { serverType: input.serverType }), - ...(input.shouldOverwrite != null && { shouldOverwrite: input.shouldOverwrite }), - ...(input.token != null && { token: input.token }), - ...(input.username != null && { username: input.username }), - }; -}; +// se_FilterGroup omitted. -/** - * serializeAws_json1_1InvalidateProjectCacheInput - */ -const se_InvalidateProjectCacheInput = (input: InvalidateProjectCacheInput, context: __SerdeContext): any => { - return { - ...(input.projectName != null && { projectName: input.projectName }), - }; -}; +// se_FilterGroups omitted. -/** - * serializeAws_json1_1ListBuildBatchesForProjectInput - */ -const se_ListBuildBatchesForProjectInput = (input: ListBuildBatchesForProjectInput, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_BuildBatchFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_GetReportGroupTrendInput omitted. -/** - * serializeAws_json1_1ListBuildBatchesInput - */ -const se_ListBuildBatchesInput = (input: ListBuildBatchesInput, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_BuildBatchFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_GetResourcePolicyInput omitted. -/** - * serializeAws_json1_1ListBuildsForProjectInput - */ -const se_ListBuildsForProjectInput = (input: ListBuildsForProjectInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_GitSubmodulesConfig omitted. -/** - * serializeAws_json1_1ListBuildsInput - */ -const se_ListBuildsInput = (input: ListBuildsInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ImportSourceCredentialsInput omitted. -/** - * serializeAws_json1_1ListCuratedEnvironmentImagesInput - */ -const se_ListCuratedEnvironmentImagesInput = ( - input: ListCuratedEnvironmentImagesInput, - context: __SerdeContext -): any => { - return {}; -}; +// se_InvalidateProjectCacheInput omitted. -/** - * serializeAws_json1_1ListProjectsInput - */ -const se_ListProjectsInput = (input: ListProjectsInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListBuildBatchesForProjectInput omitted. -/** - * serializeAws_json1_1ListReportGroupsInput - */ -const se_ListReportGroupsInput = (input: ListReportGroupsInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListBuildBatchesInput omitted. -/** - * serializeAws_json1_1ListReportsForReportGroupInput - */ -const se_ListReportsForReportGroupInput = (input: ListReportsForReportGroupInput, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_ReportFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.reportGroupArn != null && { reportGroupArn: input.reportGroupArn }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListBuildsForProjectInput omitted. -/** - * serializeAws_json1_1ListReportsInput - */ -const se_ListReportsInput = (input: ListReportsInput, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_ReportFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListBuildsInput omitted. -/** - * serializeAws_json1_1ListSharedProjectsInput - */ -const se_ListSharedProjectsInput = (input: ListSharedProjectsInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListCuratedEnvironmentImagesInput omitted. -/** - * serializeAws_json1_1ListSharedReportGroupsInput - */ -const se_ListSharedReportGroupsInput = (input: ListSharedReportGroupsInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListProjectsInput omitted. -/** - * serializeAws_json1_1ListSourceCredentialsInput - */ -const se_ListSourceCredentialsInput = (input: ListSourceCredentialsInput, context: __SerdeContext): any => { - return {}; -}; +// se_ListReportGroupsInput omitted. -/** - * serializeAws_json1_1LogsConfig - */ -const se_LogsConfig = (input: LogsConfig, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogs != null && { cloudWatchLogs: se_CloudWatchLogsConfig(input.cloudWatchLogs, context) }), - ...(input.s3Logs != null && { s3Logs: se_S3LogsConfig(input.s3Logs, context) }), - }; -}; +// se_ListReportsForReportGroupInput omitted. -/** - * serializeAws_json1_1ProjectArtifacts - */ -const se_ProjectArtifacts = (input: ProjectArtifacts, context: __SerdeContext): any => { - return { - ...(input.artifactIdentifier != null && { artifactIdentifier: input.artifactIdentifier }), - ...(input.bucketOwnerAccess != null && { bucketOwnerAccess: input.bucketOwnerAccess }), - ...(input.encryptionDisabled != null && { encryptionDisabled: input.encryptionDisabled }), - ...(input.location != null && { location: input.location }), - ...(input.name != null && { name: input.name }), - ...(input.namespaceType != null && { namespaceType: input.namespaceType }), - ...(input.overrideArtifactName != null && { overrideArtifactName: input.overrideArtifactName }), - ...(input.packaging != null && { packaging: input.packaging }), - ...(input.path != null && { path: input.path }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListReportsInput omitted. -/** - * serializeAws_json1_1ProjectArtifactsList - */ -const se_ProjectArtifactsList = (input: ProjectArtifacts[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProjectArtifacts(entry, context); - }); -}; +// se_ListSharedProjectsInput omitted. -/** - * serializeAws_json1_1ProjectBuildBatchConfig - */ -const se_ProjectBuildBatchConfig = (input: ProjectBuildBatchConfig, context: __SerdeContext): any => { - return { - ...(input.batchReportMode != null && { batchReportMode: input.batchReportMode }), - ...(input.combineArtifacts != null && { combineArtifacts: input.combineArtifacts }), - ...(input.restrictions != null && { restrictions: se_BatchRestrictions(input.restrictions, context) }), - ...(input.serviceRole != null && { serviceRole: input.serviceRole }), - ...(input.timeoutInMins != null && { timeoutInMins: input.timeoutInMins }), - }; -}; +// se_ListSharedReportGroupsInput omitted. -/** - * serializeAws_json1_1ProjectCache - */ -const se_ProjectCache = (input: ProjectCache, context: __SerdeContext): any => { - return { - ...(input.location != null && { location: input.location }), - ...(input.modes != null && { modes: se_ProjectCacheModes(input.modes, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListSourceCredentialsInput omitted. -/** - * serializeAws_json1_1ProjectCacheModes - */ -const se_ProjectCacheModes = (input: (CacheMode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProjectEnvironment - */ -const se_ProjectEnvironment = (input: ProjectEnvironment, context: __SerdeContext): any => { - return { - ...(input.certificate != null && { certificate: input.certificate }), - ...(input.computeType != null && { computeType: input.computeType }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariables(input.environmentVariables, context), - }), - ...(input.image != null && { image: input.image }), - ...(input.imagePullCredentialsType != null && { imagePullCredentialsType: input.imagePullCredentialsType }), - ...(input.privilegedMode != null && { privilegedMode: input.privilegedMode }), - ...(input.registryCredential != null && { - registryCredential: se_RegistryCredential(input.registryCredential, context), - }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1ProjectFileSystemLocation - */ -const se_ProjectFileSystemLocation = (input: ProjectFileSystemLocation, context: __SerdeContext): any => { - return { - ...(input.identifier != null && { identifier: input.identifier }), - ...(input.location != null && { location: input.location }), - ...(input.mountOptions != null && { mountOptions: input.mountOptions }), - ...(input.mountPoint != null && { mountPoint: input.mountPoint }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1ProjectFileSystemLocations - */ -const se_ProjectFileSystemLocations = (input: ProjectFileSystemLocation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProjectFileSystemLocation(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProjectNames - */ -const se_ProjectNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProjectSecondarySourceVersions - */ -const se_ProjectSecondarySourceVersions = (input: ProjectSourceVersion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProjectSourceVersion(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProjectSource - */ -const se_ProjectSource = (input: ProjectSource, context: __SerdeContext): any => { - return { - ...(input.auth != null && { auth: se_SourceAuth(input.auth, context) }), - ...(input.buildStatusConfig != null && { - buildStatusConfig: se_BuildStatusConfig(input.buildStatusConfig, context), - }), - ...(input.buildspec != null && { buildspec: input.buildspec }), - ...(input.gitCloneDepth != null && { gitCloneDepth: input.gitCloneDepth }), - ...(input.gitSubmodulesConfig != null && { - gitSubmodulesConfig: se_GitSubmodulesConfig(input.gitSubmodulesConfig, context), - }), - ...(input.insecureSsl != null && { insecureSsl: input.insecureSsl }), - ...(input.location != null && { location: input.location }), - ...(input.reportBuildStatus != null && { reportBuildStatus: input.reportBuildStatus }), - ...(input.sourceIdentifier != null && { sourceIdentifier: input.sourceIdentifier }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1ProjectSources - */ -const se_ProjectSources = (input: ProjectSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProjectSource(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProjectSourceVersion - */ -const se_ProjectSourceVersion = (input: ProjectSourceVersion, context: __SerdeContext): any => { - return { - ...(input.sourceIdentifier != null && { sourceIdentifier: input.sourceIdentifier }), - ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }), - }; -}; - -/** - * serializeAws_json1_1PutResourcePolicyInput - */ -const se_PutResourcePolicyInput = (input: PutResourcePolicyInput, context: __SerdeContext): any => { - return { - ...(input.policy != null && { policy: input.policy }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; - -/** - * serializeAws_json1_1RegistryCredential - */ -const se_RegistryCredential = (input: RegistryCredential, context: __SerdeContext): any => { - return { - ...(input.credential != null && { credential: input.credential }), - ...(input.credentialProvider != null && { credentialProvider: input.credentialProvider }), - }; -}; - -/** - * serializeAws_json1_1ReportArns - */ -const se_ReportArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ReportExportConfig - */ -const se_ReportExportConfig = (input: ReportExportConfig, context: __SerdeContext): any => { - return { - ...(input.exportConfigType != null && { exportConfigType: input.exportConfigType }), - ...(input.s3Destination != null && { s3Destination: se_S3ReportExportConfig(input.s3Destination, context) }), - }; -}; - -/** - * serializeAws_json1_1ReportFilter - */ -const se_ReportFilter = (input: ReportFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_1ReportGroupArns - */ -const se_ReportGroupArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RetryBuildBatchInput - */ -const se_RetryBuildBatchInput = (input: RetryBuildBatchInput, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.idempotencyToken != null && { idempotencyToken: input.idempotencyToken }), - ...(input.retryType != null && { retryType: input.retryType }), - }; -}; - -/** - * serializeAws_json1_1RetryBuildInput - */ -const se_RetryBuildInput = (input: RetryBuildInput, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.idempotencyToken != null && { idempotencyToken: input.idempotencyToken }), - }; -}; - -/** - * serializeAws_json1_1S3LogsConfig - */ -const se_S3LogsConfig = (input: S3LogsConfig, context: __SerdeContext): any => { - return { - ...(input.bucketOwnerAccess != null && { bucketOwnerAccess: input.bucketOwnerAccess }), - ...(input.encryptionDisabled != null && { encryptionDisabled: input.encryptionDisabled }), - ...(input.location != null && { location: input.location }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_1S3ReportExportConfig - */ -const se_S3ReportExportConfig = (input: S3ReportExportConfig, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.bucketOwner != null && { bucketOwner: input.bucketOwner }), - ...(input.encryptionDisabled != null && { encryptionDisabled: input.encryptionDisabled }), - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.packaging != null && { packaging: input.packaging }), - ...(input.path != null && { path: input.path }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SourceAuth - */ -const se_SourceAuth = (input: SourceAuth, context: __SerdeContext): any => { - return { - ...(input.resource != null && { resource: input.resource }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1StartBuildBatchInput - */ -const se_StartBuildBatchInput = (input: StartBuildBatchInput, context: __SerdeContext): any => { - return { - ...(input.artifactsOverride != null && { - artifactsOverride: se_ProjectArtifacts(input.artifactsOverride, context), - }), - ...(input.buildBatchConfigOverride != null && { - buildBatchConfigOverride: se_ProjectBuildBatchConfig(input.buildBatchConfigOverride, context), - }), - ...(input.buildTimeoutInMinutesOverride != null && { - buildTimeoutInMinutesOverride: input.buildTimeoutInMinutesOverride, - }), - ...(input.buildspecOverride != null && { buildspecOverride: input.buildspecOverride }), - ...(input.cacheOverride != null && { cacheOverride: se_ProjectCache(input.cacheOverride, context) }), - ...(input.certificateOverride != null && { certificateOverride: input.certificateOverride }), - ...(input.computeTypeOverride != null && { computeTypeOverride: input.computeTypeOverride }), - ...(input.debugSessionEnabled != null && { debugSessionEnabled: input.debugSessionEnabled }), - ...(input.encryptionKeyOverride != null && { encryptionKeyOverride: input.encryptionKeyOverride }), - ...(input.environmentTypeOverride != null && { environmentTypeOverride: input.environmentTypeOverride }), - ...(input.environmentVariablesOverride != null && { - environmentVariablesOverride: se_EnvironmentVariables(input.environmentVariablesOverride, context), - }), - ...(input.gitCloneDepthOverride != null && { gitCloneDepthOverride: input.gitCloneDepthOverride }), - ...(input.gitSubmodulesConfigOverride != null && { - gitSubmodulesConfigOverride: se_GitSubmodulesConfig(input.gitSubmodulesConfigOverride, context), - }), - ...(input.idempotencyToken != null && { idempotencyToken: input.idempotencyToken }), - ...(input.imageOverride != null && { imageOverride: input.imageOverride }), - ...(input.imagePullCredentialsTypeOverride != null && { - imagePullCredentialsTypeOverride: input.imagePullCredentialsTypeOverride, - }), - ...(input.insecureSslOverride != null && { insecureSslOverride: input.insecureSslOverride }), - ...(input.logsConfigOverride != null && { logsConfigOverride: se_LogsConfig(input.logsConfigOverride, context) }), - ...(input.privilegedModeOverride != null && { privilegedModeOverride: input.privilegedModeOverride }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.queuedTimeoutInMinutesOverride != null && { - queuedTimeoutInMinutesOverride: input.queuedTimeoutInMinutesOverride, - }), - ...(input.registryCredentialOverride != null && { - registryCredentialOverride: se_RegistryCredential(input.registryCredentialOverride, context), - }), - ...(input.reportBuildBatchStatusOverride != null && { - reportBuildBatchStatusOverride: input.reportBuildBatchStatusOverride, - }), - ...(input.secondaryArtifactsOverride != null && { - secondaryArtifactsOverride: se_ProjectArtifactsList(input.secondaryArtifactsOverride, context), - }), - ...(input.secondarySourcesOverride != null && { - secondarySourcesOverride: se_ProjectSources(input.secondarySourcesOverride, context), - }), - ...(input.secondarySourcesVersionOverride != null && { - secondarySourcesVersionOverride: se_ProjectSecondarySourceVersions( - input.secondarySourcesVersionOverride, - context - ), - }), - ...(input.serviceRoleOverride != null && { serviceRoleOverride: input.serviceRoleOverride }), - ...(input.sourceAuthOverride != null && { sourceAuthOverride: se_SourceAuth(input.sourceAuthOverride, context) }), - ...(input.sourceLocationOverride != null && { sourceLocationOverride: input.sourceLocationOverride }), - ...(input.sourceTypeOverride != null && { sourceTypeOverride: input.sourceTypeOverride }), - ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }), - }; -}; - -/** - * serializeAws_json1_1StartBuildInput - */ -const se_StartBuildInput = (input: StartBuildInput, context: __SerdeContext): any => { - return { - ...(input.artifactsOverride != null && { - artifactsOverride: se_ProjectArtifacts(input.artifactsOverride, context), - }), - ...(input.buildStatusConfigOverride != null && { - buildStatusConfigOverride: se_BuildStatusConfig(input.buildStatusConfigOverride, context), - }), - ...(input.buildspecOverride != null && { buildspecOverride: input.buildspecOverride }), - ...(input.cacheOverride != null && { cacheOverride: se_ProjectCache(input.cacheOverride, context) }), - ...(input.certificateOverride != null && { certificateOverride: input.certificateOverride }), - ...(input.computeTypeOverride != null && { computeTypeOverride: input.computeTypeOverride }), - ...(input.debugSessionEnabled != null && { debugSessionEnabled: input.debugSessionEnabled }), - ...(input.encryptionKeyOverride != null && { encryptionKeyOverride: input.encryptionKeyOverride }), - ...(input.environmentTypeOverride != null && { environmentTypeOverride: input.environmentTypeOverride }), - ...(input.environmentVariablesOverride != null && { - environmentVariablesOverride: se_EnvironmentVariables(input.environmentVariablesOverride, context), - }), - ...(input.gitCloneDepthOverride != null && { gitCloneDepthOverride: input.gitCloneDepthOverride }), - ...(input.gitSubmodulesConfigOverride != null && { - gitSubmodulesConfigOverride: se_GitSubmodulesConfig(input.gitSubmodulesConfigOverride, context), - }), - ...(input.idempotencyToken != null && { idempotencyToken: input.idempotencyToken }), - ...(input.imageOverride != null && { imageOverride: input.imageOverride }), - ...(input.imagePullCredentialsTypeOverride != null && { - imagePullCredentialsTypeOverride: input.imagePullCredentialsTypeOverride, - }), - ...(input.insecureSslOverride != null && { insecureSslOverride: input.insecureSslOverride }), - ...(input.logsConfigOverride != null && { logsConfigOverride: se_LogsConfig(input.logsConfigOverride, context) }), - ...(input.privilegedModeOverride != null && { privilegedModeOverride: input.privilegedModeOverride }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.queuedTimeoutInMinutesOverride != null && { - queuedTimeoutInMinutesOverride: input.queuedTimeoutInMinutesOverride, - }), - ...(input.registryCredentialOverride != null && { - registryCredentialOverride: se_RegistryCredential(input.registryCredentialOverride, context), - }), - ...(input.reportBuildStatusOverride != null && { reportBuildStatusOverride: input.reportBuildStatusOverride }), - ...(input.secondaryArtifactsOverride != null && { - secondaryArtifactsOverride: se_ProjectArtifactsList(input.secondaryArtifactsOverride, context), - }), - ...(input.secondarySourcesOverride != null && { - secondarySourcesOverride: se_ProjectSources(input.secondarySourcesOverride, context), - }), - ...(input.secondarySourcesVersionOverride != null && { - secondarySourcesVersionOverride: se_ProjectSecondarySourceVersions( - input.secondarySourcesVersionOverride, - context - ), - }), - ...(input.serviceRoleOverride != null && { serviceRoleOverride: input.serviceRoleOverride }), - ...(input.sourceAuthOverride != null && { sourceAuthOverride: se_SourceAuth(input.sourceAuthOverride, context) }), - ...(input.sourceLocationOverride != null && { sourceLocationOverride: input.sourceLocationOverride }), - ...(input.sourceTypeOverride != null && { sourceTypeOverride: input.sourceTypeOverride }), - ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }), - ...(input.timeoutInMinutesOverride != null && { timeoutInMinutesOverride: input.timeoutInMinutesOverride }), - }; -}; - -/** - * serializeAws_json1_1StopBuildBatchInput - */ -const se_StopBuildBatchInput = (input: StopBuildBatchInput, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_json1_1StopBuildInput - */ -const se_StopBuildInput = (input: StopBuildInput, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_json1_1Subnets - */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TestCaseFilter - */ -const se_TestCaseFilter = (input: TestCaseFilter, context: __SerdeContext): any => { - return { - ...(input.keyword != null && { keyword: input.keyword }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_1UpdateProjectInput - */ -const se_UpdateProjectInput = (input: UpdateProjectInput, context: __SerdeContext): any => { - return { - ...(input.artifacts != null && { artifacts: se_ProjectArtifacts(input.artifacts, context) }), - ...(input.badgeEnabled != null && { badgeEnabled: input.badgeEnabled }), - ...(input.buildBatchConfig != null && { - buildBatchConfig: se_ProjectBuildBatchConfig(input.buildBatchConfig, context), - }), - ...(input.cache != null && { cache: se_ProjectCache(input.cache, context) }), - ...(input.concurrentBuildLimit != null && { concurrentBuildLimit: input.concurrentBuildLimit }), - ...(input.description != null && { description: input.description }), - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.environment != null && { environment: se_ProjectEnvironment(input.environment, context) }), - ...(input.fileSystemLocations != null && { - fileSystemLocations: se_ProjectFileSystemLocations(input.fileSystemLocations, context), - }), - ...(input.logsConfig != null && { logsConfig: se_LogsConfig(input.logsConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.queuedTimeoutInMinutes != null && { queuedTimeoutInMinutes: input.queuedTimeoutInMinutes }), - ...(input.secondaryArtifacts != null && { - secondaryArtifacts: se_ProjectArtifactsList(input.secondaryArtifacts, context), - }), - ...(input.secondarySourceVersions != null && { - secondarySourceVersions: se_ProjectSecondarySourceVersions(input.secondarySourceVersions, context), - }), - ...(input.secondarySources != null && { secondarySources: se_ProjectSources(input.secondarySources, context) }), - ...(input.serviceRole != null && { serviceRole: input.serviceRole }), - ...(input.source != null && { source: se_ProjectSource(input.source, context) }), - ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.timeoutInMinutes != null && { timeoutInMinutes: input.timeoutInMinutes }), - ...(input.vpcConfig != null && { vpcConfig: se_VpcConfig(input.vpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateProjectVisibilityInput - */ -const se_UpdateProjectVisibilityInput = (input: UpdateProjectVisibilityInput, context: __SerdeContext): any => { - return { - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.projectVisibility != null && { projectVisibility: input.projectVisibility }), - ...(input.resourceAccessRole != null && { resourceAccessRole: input.resourceAccessRole }), - }; -}; - -/** - * serializeAws_json1_1UpdateReportGroupInput - */ -const se_UpdateReportGroupInput = (input: UpdateReportGroupInput, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.exportConfig != null && { exportConfig: se_ReportExportConfig(input.exportConfig, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateWebhookInput - */ -const se_UpdateWebhookInput = (input: UpdateWebhookInput, context: __SerdeContext): any => { - return { - ...(input.branchFilter != null && { branchFilter: input.branchFilter }), - ...(input.buildType != null && { buildType: input.buildType }), - ...(input.filterGroups != null && { filterGroups: se_FilterGroups(input.filterGroups, context) }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.rotateSecret != null && { rotateSecret: input.rotateSecret }), - }; -}; - -/** - * serializeAws_json1_1VpcConfig - */ -const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.subnets != null && { subnets: se_Subnets(input.subnets, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }; -}; - -/** - * serializeAws_json1_1WebhookFilter - */ -const se_WebhookFilter = (input: WebhookFilter, context: __SerdeContext): any => { - return { - ...(input.excludeMatchedPattern != null && { excludeMatchedPattern: input.excludeMatchedPattern }), - ...(input.pattern != null && { pattern: input.pattern }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * deserializeAws_json1_1AccountLimitExceededException - */ -const de_AccountLimitExceededException = (output: any, context: __SerdeContext): AccountLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteBuildsOutput - */ -const de_BatchDeleteBuildsOutput = (output: any, context: __SerdeContext): BatchDeleteBuildsOutput => { - return { - buildsDeleted: output.buildsDeleted != null ? de_BuildIds(output.buildsDeleted, context) : undefined, - buildsNotDeleted: - output.buildsNotDeleted != null ? de_BuildsNotDeleted(output.buildsNotDeleted, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetBuildBatchesOutput - */ -const de_BatchGetBuildBatchesOutput = (output: any, context: __SerdeContext): BatchGetBuildBatchesOutput => { - return { - buildBatches: output.buildBatches != null ? de_BuildBatches(output.buildBatches, context) : undefined, - buildBatchesNotFound: - output.buildBatchesNotFound != null ? de_BuildBatchIds(output.buildBatchesNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetBuildsOutput - */ -const de_BatchGetBuildsOutput = (output: any, context: __SerdeContext): BatchGetBuildsOutput => { - return { - builds: output.builds != null ? de_Builds(output.builds, context) : undefined, - buildsNotFound: output.buildsNotFound != null ? de_BuildIds(output.buildsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetProjectsOutput - */ -const de_BatchGetProjectsOutput = (output: any, context: __SerdeContext): BatchGetProjectsOutput => { - return { - projects: output.projects != null ? de_Projects(output.projects, context) : undefined, - projectsNotFound: output.projectsNotFound != null ? de_ProjectNames(output.projectsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetReportGroupsOutput - */ -const de_BatchGetReportGroupsOutput = (output: any, context: __SerdeContext): BatchGetReportGroupsOutput => { - return { - reportGroups: output.reportGroups != null ? de_ReportGroups(output.reportGroups, context) : undefined, - reportGroupsNotFound: - output.reportGroupsNotFound != null ? de_ReportGroupArns(output.reportGroupsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetReportsOutput - */ -const de_BatchGetReportsOutput = (output: any, context: __SerdeContext): BatchGetReportsOutput => { - return { - reports: output.reports != null ? de_Reports(output.reports, context) : undefined, - reportsNotFound: output.reportsNotFound != null ? de_ReportArns(output.reportsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchRestrictions - */ -const de_BatchRestrictions = (output: any, context: __SerdeContext): BatchRestrictions => { - return { - computeTypesAllowed: - output.computeTypesAllowed != null ? de_ComputeTypesAllowed(output.computeTypesAllowed, context) : undefined, - maximumBuildsAllowed: __expectInt32(output.maximumBuildsAllowed), - } as any; -}; - -/** - * deserializeAws_json1_1Build - */ -const de_Build = (output: any, context: __SerdeContext): Build => { - return { - arn: __expectString(output.arn), - artifacts: output.artifacts != null ? de_BuildArtifacts(output.artifacts, context) : undefined, - buildBatchArn: __expectString(output.buildBatchArn), - buildComplete: __expectBoolean(output.buildComplete), - buildNumber: __expectLong(output.buildNumber), - buildStatus: __expectString(output.buildStatus), - cache: output.cache != null ? de_ProjectCache(output.cache, context) : undefined, - currentPhase: __expectString(output.currentPhase), - debugSession: output.debugSession != null ? de_DebugSession(output.debugSession, context) : undefined, - encryptionKey: __expectString(output.encryptionKey), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - environment: output.environment != null ? de_ProjectEnvironment(output.environment, context) : undefined, - exportedEnvironmentVariables: - output.exportedEnvironmentVariables != null - ? de_ExportedEnvironmentVariables(output.exportedEnvironmentVariables, context) - : undefined, - fileSystemLocations: - output.fileSystemLocations != null - ? de_ProjectFileSystemLocations(output.fileSystemLocations, context) - : undefined, - id: __expectString(output.id), - initiator: __expectString(output.initiator), - logs: output.logs != null ? de_LogsLocation(output.logs, context) : undefined, - networkInterface: - output.networkInterface != null ? de_NetworkInterface(output.networkInterface, context) : undefined, - phases: output.phases != null ? de_BuildPhases(output.phases, context) : undefined, - projectName: __expectString(output.projectName), - queuedTimeoutInMinutes: __expectInt32(output.queuedTimeoutInMinutes), - reportArns: output.reportArns != null ? de_BuildReportArns(output.reportArns, context) : undefined, - resolvedSourceVersion: __expectString(output.resolvedSourceVersion), - secondaryArtifacts: - output.secondaryArtifacts != null ? de_BuildArtifactsList(output.secondaryArtifacts, context) : undefined, - secondarySourceVersions: - output.secondarySourceVersions != null - ? de_ProjectSecondarySourceVersions(output.secondarySourceVersions, context) - : undefined, - secondarySources: output.secondarySources != null ? de_ProjectSources(output.secondarySources, context) : undefined, - serviceRole: __expectString(output.serviceRole), - source: output.source != null ? de_ProjectSource(output.source, context) : undefined, - sourceVersion: __expectString(output.sourceVersion), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - timeoutInMinutes: __expectInt32(output.timeoutInMinutes), - vpcConfig: output.vpcConfig != null ? de_VpcConfig(output.vpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BuildArtifacts - */ -const de_BuildArtifacts = (output: any, context: __SerdeContext): BuildArtifacts => { - return { - artifactIdentifier: __expectString(output.artifactIdentifier), - bucketOwnerAccess: __expectString(output.bucketOwnerAccess), - encryptionDisabled: __expectBoolean(output.encryptionDisabled), - location: __expectString(output.location), - md5sum: __expectString(output.md5sum), - overrideArtifactName: __expectBoolean(output.overrideArtifactName), - sha256sum: __expectString(output.sha256sum), - } as any; -}; - -/** - * deserializeAws_json1_1BuildArtifactsList - */ -const de_BuildArtifactsList = (output: any, context: __SerdeContext): BuildArtifacts[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildArtifacts(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildBatch - */ -const de_BuildBatch = (output: any, context: __SerdeContext): BuildBatch => { - return { - arn: __expectString(output.arn), - artifacts: output.artifacts != null ? de_BuildArtifacts(output.artifacts, context) : undefined, - buildBatchConfig: - output.buildBatchConfig != null ? de_ProjectBuildBatchConfig(output.buildBatchConfig, context) : undefined, - buildBatchNumber: __expectLong(output.buildBatchNumber), - buildBatchStatus: __expectString(output.buildBatchStatus), - buildGroups: output.buildGroups != null ? de_BuildGroups(output.buildGroups, context) : undefined, - buildTimeoutInMinutes: __expectInt32(output.buildTimeoutInMinutes), - cache: output.cache != null ? de_ProjectCache(output.cache, context) : undefined, - complete: __expectBoolean(output.complete), - currentPhase: __expectString(output.currentPhase), - debugSessionEnabled: __expectBoolean(output.debugSessionEnabled), - encryptionKey: __expectString(output.encryptionKey), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - environment: output.environment != null ? de_ProjectEnvironment(output.environment, context) : undefined, - fileSystemLocations: - output.fileSystemLocations != null - ? de_ProjectFileSystemLocations(output.fileSystemLocations, context) - : undefined, - id: __expectString(output.id), - initiator: __expectString(output.initiator), - logConfig: output.logConfig != null ? de_LogsConfig(output.logConfig, context) : undefined, - phases: output.phases != null ? de_BuildBatchPhases(output.phases, context) : undefined, - projectName: __expectString(output.projectName), - queuedTimeoutInMinutes: __expectInt32(output.queuedTimeoutInMinutes), - resolvedSourceVersion: __expectString(output.resolvedSourceVersion), - secondaryArtifacts: - output.secondaryArtifacts != null ? de_BuildArtifactsList(output.secondaryArtifacts, context) : undefined, - secondarySourceVersions: - output.secondarySourceVersions != null - ? de_ProjectSecondarySourceVersions(output.secondarySourceVersions, context) - : undefined, - secondarySources: output.secondarySources != null ? de_ProjectSources(output.secondarySources, context) : undefined, - serviceRole: __expectString(output.serviceRole), - source: output.source != null ? de_ProjectSource(output.source, context) : undefined, - sourceVersion: __expectString(output.sourceVersion), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - vpcConfig: output.vpcConfig != null ? de_VpcConfig(output.vpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BuildBatches - */ -const de_BuildBatches = (output: any, context: __SerdeContext): BuildBatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildBatch(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildBatchIds - */ -const de_BuildBatchIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildBatchPhase - */ -const de_BuildBatchPhase = (output: any, context: __SerdeContext): BuildBatchPhase => { - return { - contexts: output.contexts != null ? de_PhaseContexts(output.contexts, context) : undefined, - durationInSeconds: __expectLong(output.durationInSeconds), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - phaseStatus: __expectString(output.phaseStatus), - phaseType: __expectString(output.phaseType), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BuildBatchPhases - */ -const de_BuildBatchPhases = (output: any, context: __SerdeContext): BuildBatchPhase[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildBatchPhase(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildGroup - */ -const de_BuildGroup = (output: any, context: __SerdeContext): BuildGroup => { - return { - currentBuildSummary: - output.currentBuildSummary != null ? de_BuildSummary(output.currentBuildSummary, context) : undefined, - dependsOn: output.dependsOn != null ? de_Identifiers(output.dependsOn, context) : undefined, - identifier: __expectString(output.identifier), - ignoreFailure: __expectBoolean(output.ignoreFailure), - priorBuildSummaryList: - output.priorBuildSummaryList != null ? de_BuildSummaries(output.priorBuildSummaryList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BuildGroups - */ -const de_BuildGroups = (output: any, context: __SerdeContext): BuildGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildIds - */ -const de_BuildIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildNotDeleted - */ -const de_BuildNotDeleted = (output: any, context: __SerdeContext): BuildNotDeleted => { - return { - id: __expectString(output.id), - statusCode: __expectString(output.statusCode), - } as any; -}; - -/** - * deserializeAws_json1_1BuildPhase - */ -const de_BuildPhase = (output: any, context: __SerdeContext): BuildPhase => { - return { - contexts: output.contexts != null ? de_PhaseContexts(output.contexts, context) : undefined, - durationInSeconds: __expectLong(output.durationInSeconds), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - phaseStatus: __expectString(output.phaseStatus), - phaseType: __expectString(output.phaseType), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BuildPhases - */ -const de_BuildPhases = (output: any, context: __SerdeContext): BuildPhase[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildPhase(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildReportArns - */ -const de_BuildReportArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Builds - */ -const de_Builds = (output: any, context: __SerdeContext): Build[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Build(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildsNotDeleted - */ -const de_BuildsNotDeleted = (output: any, context: __SerdeContext): BuildNotDeleted[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildNotDeleted(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildStatusConfig - */ -const de_BuildStatusConfig = (output: any, context: __SerdeContext): BuildStatusConfig => { - return { - context: __expectString(output.context), - targetUrl: __expectString(output.targetUrl), - } as any; -}; - -/** - * deserializeAws_json1_1BuildSummaries - */ -const de_BuildSummaries = (output: any, context: __SerdeContext): BuildSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuildSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BuildSummary - */ -const de_BuildSummary = (output: any, context: __SerdeContext): BuildSummary => { - return { - arn: __expectString(output.arn), - buildStatus: __expectString(output.buildStatus), - primaryArtifact: output.primaryArtifact != null ? de_ResolvedArtifact(output.primaryArtifact, context) : undefined, - requestedOn: - output.requestedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestedOn))) - : undefined, - secondaryArtifacts: - output.secondaryArtifacts != null ? de_ResolvedSecondaryArtifacts(output.secondaryArtifacts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchLogsConfig - */ -const de_CloudWatchLogsConfig = (output: any, context: __SerdeContext): CloudWatchLogsConfig => { - return { - groupName: __expectString(output.groupName), - status: __expectString(output.status), - streamName: __expectString(output.streamName), - } as any; -}; - -/** - * deserializeAws_json1_1CodeCoverage - */ -const de_CodeCoverage = (output: any, context: __SerdeContext): CodeCoverage => { - return { - branchCoveragePercentage: __limitedParseDouble(output.branchCoveragePercentage), - branchesCovered: __expectInt32(output.branchesCovered), - branchesMissed: __expectInt32(output.branchesMissed), - expired: - output.expired != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expired))) : undefined, - filePath: __expectString(output.filePath), - id: __expectString(output.id), - lineCoveragePercentage: __limitedParseDouble(output.lineCoveragePercentage), - linesCovered: __expectInt32(output.linesCovered), - linesMissed: __expectInt32(output.linesMissed), - reportARN: __expectString(output.reportARN), - } as any; -}; - -/** - * deserializeAws_json1_1CodeCoverageReportSummary - */ -const de_CodeCoverageReportSummary = (output: any, context: __SerdeContext): CodeCoverageReportSummary => { - return { - branchCoveragePercentage: __limitedParseDouble(output.branchCoveragePercentage), - branchesCovered: __expectInt32(output.branchesCovered), - branchesMissed: __expectInt32(output.branchesMissed), - lineCoveragePercentage: __limitedParseDouble(output.lineCoveragePercentage), - linesCovered: __expectInt32(output.linesCovered), - linesMissed: __expectInt32(output.linesMissed), - } as any; -}; - -/** - * deserializeAws_json1_1CodeCoverages - */ -const de_CodeCoverages = (output: any, context: __SerdeContext): CodeCoverage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeCoverage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComputeTypesAllowed - */ -const de_ComputeTypesAllowed = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateProjectOutput - */ -const de_CreateProjectOutput = (output: any, context: __SerdeContext): CreateProjectOutput => { - return { - project: output.project != null ? de_Project(output.project, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateReportGroupOutput - */ -const de_CreateReportGroupOutput = (output: any, context: __SerdeContext): CreateReportGroupOutput => { - return { - reportGroup: output.reportGroup != null ? de_ReportGroup(output.reportGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateWebhookOutput - */ -const de_CreateWebhookOutput = (output: any, context: __SerdeContext): CreateWebhookOutput => { - return { - webhook: output.webhook != null ? de_Webhook(output.webhook, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DebugSession - */ -const de_DebugSession = (output: any, context: __SerdeContext): DebugSession => { - return { - sessionEnabled: __expectBoolean(output.sessionEnabled), - sessionTarget: __expectString(output.sessionTarget), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBuildBatchOutput - */ -const de_DeleteBuildBatchOutput = (output: any, context: __SerdeContext): DeleteBuildBatchOutput => { - return { - buildsDeleted: output.buildsDeleted != null ? de_BuildIds(output.buildsDeleted, context) : undefined, - buildsNotDeleted: - output.buildsNotDeleted != null ? de_BuildsNotDeleted(output.buildsNotDeleted, context) : undefined, - statusCode: __expectString(output.statusCode), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteProjectOutput - */ -const de_DeleteProjectOutput = (output: any, context: __SerdeContext): DeleteProjectOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteReportGroupOutput - */ -const de_DeleteReportGroupOutput = (output: any, context: __SerdeContext): DeleteReportGroupOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteReportOutput - */ -const de_DeleteReportOutput = (output: any, context: __SerdeContext): DeleteReportOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteResourcePolicyOutput - */ -const de_DeleteResourcePolicyOutput = (output: any, context: __SerdeContext): DeleteResourcePolicyOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteSourceCredentialsOutput - */ -const de_DeleteSourceCredentialsOutput = (output: any, context: __SerdeContext): DeleteSourceCredentialsOutput => { - return { - arn: __expectString(output.arn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteWebhookOutput - */ -const de_DeleteWebhookOutput = (output: any, context: __SerdeContext): DeleteWebhookOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeCodeCoveragesOutput - */ -const de_DescribeCodeCoveragesOutput = (output: any, context: __SerdeContext): DescribeCodeCoveragesOutput => { - return { - codeCoverages: output.codeCoverages != null ? de_CodeCoverages(output.codeCoverages, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTestCasesOutput - */ -const de_DescribeTestCasesOutput = (output: any, context: __SerdeContext): DescribeTestCasesOutput => { - return { - nextToken: __expectString(output.nextToken), - testCases: output.testCases != null ? de_TestCases(output.testCases, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EnvironmentImage - */ -const de_EnvironmentImage = (output: any, context: __SerdeContext): EnvironmentImage => { - return { - description: __expectString(output.description), - name: __expectString(output.name), - versions: output.versions != null ? de_ImageVersions(output.versions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EnvironmentImages - */ -const de_EnvironmentImages = (output: any, context: __SerdeContext): EnvironmentImage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentImage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EnvironmentLanguage - */ -const de_EnvironmentLanguage = (output: any, context: __SerdeContext): EnvironmentLanguage => { - return { - images: output.images != null ? de_EnvironmentImages(output.images, context) : undefined, - language: __expectString(output.language), - } as any; -}; - -/** - * deserializeAws_json1_1EnvironmentLanguages - */ -const de_EnvironmentLanguages = (output: any, context: __SerdeContext): EnvironmentLanguage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentLanguage(entry, context); - }); - return retVal; -}; +// se_LogsConfig omitted. -/** - * deserializeAws_json1_1EnvironmentPlatform - */ -const de_EnvironmentPlatform = (output: any, context: __SerdeContext): EnvironmentPlatform => { - return { - languages: output.languages != null ? de_EnvironmentLanguages(output.languages, context) : undefined, - platform: __expectString(output.platform), - } as any; -}; +// se_ProjectArtifacts omitted. -/** - * deserializeAws_json1_1EnvironmentPlatforms - */ -const de_EnvironmentPlatforms = (output: any, context: __SerdeContext): EnvironmentPlatform[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentPlatform(entry, context); - }); - return retVal; -}; +// se_ProjectArtifactsList omitted. -/** - * deserializeAws_json1_1EnvironmentVariable - */ -const de_EnvironmentVariable = (output: any, context: __SerdeContext): EnvironmentVariable => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// se_ProjectBuildBatchConfig omitted. -/** - * deserializeAws_json1_1EnvironmentVariables - */ -const de_EnvironmentVariables = (output: any, context: __SerdeContext): EnvironmentVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentVariable(entry, context); - }); - return retVal; -}; +// se_ProjectCache omitted. -/** - * deserializeAws_json1_1ExportedEnvironmentVariable - */ -const de_ExportedEnvironmentVariable = (output: any, context: __SerdeContext): ExportedEnvironmentVariable => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// se_ProjectCacheModes omitted. -/** - * deserializeAws_json1_1ExportedEnvironmentVariables - */ -const de_ExportedEnvironmentVariables = (output: any, context: __SerdeContext): ExportedEnvironmentVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportedEnvironmentVariable(entry, context); - }); - return retVal; -}; +// se_ProjectEnvironment omitted. -/** - * deserializeAws_json1_1FilterGroup - */ -const de_FilterGroup = (output: any, context: __SerdeContext): WebhookFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WebhookFilter(entry, context); - }); - return retVal; -}; +// se_ProjectFileSystemLocation omitted. -/** - * deserializeAws_json1_1FilterGroups - */ -const de_FilterGroups = (output: any, context: __SerdeContext): WebhookFilter[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilterGroup(entry, context); - }); - return retVal; -}; +// se_ProjectFileSystemLocations omitted. -/** - * deserializeAws_json1_1GetReportGroupTrendOutput - */ -const de_GetReportGroupTrendOutput = (output: any, context: __SerdeContext): GetReportGroupTrendOutput => { - return { - rawData: output.rawData != null ? de_ReportGroupTrendRawDataList(output.rawData, context) : undefined, - stats: output.stats != null ? de_ReportGroupTrendStats(output.stats, context) : undefined, - } as any; -}; +// se_ProjectNames omitted. -/** - * deserializeAws_json1_1GetResourcePolicyOutput - */ -const de_GetResourcePolicyOutput = (output: any, context: __SerdeContext): GetResourcePolicyOutput => { - return { - policy: __expectString(output.policy), - } as any; -}; +// se_ProjectSecondarySourceVersions omitted. -/** - * deserializeAws_json1_1GitSubmodulesConfig - */ -const de_GitSubmodulesConfig = (output: any, context: __SerdeContext): GitSubmodulesConfig => { - return { - fetchSubmodules: __expectBoolean(output.fetchSubmodules), - } as any; -}; +// se_ProjectSource omitted. -/** - * deserializeAws_json1_1Identifiers - */ -const de_Identifiers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ProjectSources omitted. -/** - * deserializeAws_json1_1ImageVersions - */ -const de_ImageVersions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ProjectSourceVersion omitted. -/** - * deserializeAws_json1_1ImportSourceCredentialsOutput - */ -const de_ImportSourceCredentialsOutput = (output: any, context: __SerdeContext): ImportSourceCredentialsOutput => { - return { - arn: __expectString(output.arn), - } as any; -}; +// se_PutResourcePolicyInput omitted. -/** - * deserializeAws_json1_1InvalidateProjectCacheOutput - */ -const de_InvalidateProjectCacheOutput = (output: any, context: __SerdeContext): InvalidateProjectCacheOutput => { - return {} as any; -}; +// se_RegistryCredential omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ReportArns omitted. -/** - * deserializeAws_json1_1ListBuildBatchesForProjectOutput - */ -const de_ListBuildBatchesForProjectOutput = ( - output: any, - context: __SerdeContext -): ListBuildBatchesForProjectOutput => { - return { - ids: output.ids != null ? de_BuildBatchIds(output.ids, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ReportExportConfig omitted. -/** - * deserializeAws_json1_1ListBuildBatchesOutput - */ -const de_ListBuildBatchesOutput = (output: any, context: __SerdeContext): ListBuildBatchesOutput => { - return { - ids: output.ids != null ? de_BuildBatchIds(output.ids, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ReportFilter omitted. -/** - * deserializeAws_json1_1ListBuildsForProjectOutput - */ -const de_ListBuildsForProjectOutput = (output: any, context: __SerdeContext): ListBuildsForProjectOutput => { - return { - ids: output.ids != null ? de_BuildIds(output.ids, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ReportGroupArns omitted. -/** - * deserializeAws_json1_1ListBuildsOutput - */ -const de_ListBuildsOutput = (output: any, context: __SerdeContext): ListBuildsOutput => { - return { - ids: output.ids != null ? de_BuildIds(output.ids, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_RetryBuildBatchInput omitted. -/** - * deserializeAws_json1_1ListCuratedEnvironmentImagesOutput - */ -const de_ListCuratedEnvironmentImagesOutput = ( - output: any, - context: __SerdeContext -): ListCuratedEnvironmentImagesOutput => { - return { - platforms: output.platforms != null ? de_EnvironmentPlatforms(output.platforms, context) : undefined, - } as any; -}; +// se_RetryBuildInput omitted. -/** - * deserializeAws_json1_1ListProjectsOutput - */ -const de_ListProjectsOutput = (output: any, context: __SerdeContext): ListProjectsOutput => { - return { - nextToken: __expectString(output.nextToken), - projects: output.projects != null ? de_ProjectNames(output.projects, context) : undefined, - } as any; -}; +// se_S3LogsConfig omitted. -/** - * deserializeAws_json1_1ListReportGroupsOutput - */ -const de_ListReportGroupsOutput = (output: any, context: __SerdeContext): ListReportGroupsOutput => { - return { - nextToken: __expectString(output.nextToken), - reportGroups: output.reportGroups != null ? de_ReportGroupArns(output.reportGroups, context) : undefined, - } as any; -}; +// se_S3ReportExportConfig omitted. -/** - * deserializeAws_json1_1ListReportsForReportGroupOutput - */ -const de_ListReportsForReportGroupOutput = (output: any, context: __SerdeContext): ListReportsForReportGroupOutput => { - return { - nextToken: __expectString(output.nextToken), - reports: output.reports != null ? de_ReportArns(output.reports, context) : undefined, - } as any; -}; +// se_SecurityGroupIds omitted. -/** - * deserializeAws_json1_1ListReportsOutput - */ -const de_ListReportsOutput = (output: any, context: __SerdeContext): ListReportsOutput => { - return { - nextToken: __expectString(output.nextToken), - reports: output.reports != null ? de_ReportArns(output.reports, context) : undefined, - } as any; -}; +// se_SourceAuth omitted. -/** - * deserializeAws_json1_1ListSharedProjectsOutput - */ -const de_ListSharedProjectsOutput = (output: any, context: __SerdeContext): ListSharedProjectsOutput => { - return { - nextToken: __expectString(output.nextToken), - projects: output.projects != null ? de_ProjectArns(output.projects, context) : undefined, - } as any; -}; +// se_StartBuildBatchInput omitted. -/** - * deserializeAws_json1_1ListSharedReportGroupsOutput - */ -const de_ListSharedReportGroupsOutput = (output: any, context: __SerdeContext): ListSharedReportGroupsOutput => { - return { - nextToken: __expectString(output.nextToken), - reportGroups: output.reportGroups != null ? de_ReportGroupArns(output.reportGroups, context) : undefined, - } as any; -}; +// se_StartBuildInput omitted. -/** - * deserializeAws_json1_1ListSourceCredentialsOutput - */ -const de_ListSourceCredentialsOutput = (output: any, context: __SerdeContext): ListSourceCredentialsOutput => { - return { - sourceCredentialsInfos: - output.sourceCredentialsInfos != null - ? de_SourceCredentialsInfos(output.sourceCredentialsInfos, context) - : undefined, - } as any; -}; +// se_StopBuildBatchInput omitted. -/** - * deserializeAws_json1_1LogsConfig - */ -const de_LogsConfig = (output: any, context: __SerdeContext): LogsConfig => { - return { - cloudWatchLogs: output.cloudWatchLogs != null ? de_CloudWatchLogsConfig(output.cloudWatchLogs, context) : undefined, - s3Logs: output.s3Logs != null ? de_S3LogsConfig(output.s3Logs, context) : undefined, - } as any; -}; +// se_StopBuildInput omitted. -/** - * deserializeAws_json1_1LogsLocation - */ -const de_LogsLocation = (output: any, context: __SerdeContext): LogsLocation => { - return { - cloudWatchLogs: output.cloudWatchLogs != null ? de_CloudWatchLogsConfig(output.cloudWatchLogs, context) : undefined, - cloudWatchLogsArn: __expectString(output.cloudWatchLogsArn), - deepLink: __expectString(output.deepLink), - groupName: __expectString(output.groupName), - s3DeepLink: __expectString(output.s3DeepLink), - s3Logs: output.s3Logs != null ? de_S3LogsConfig(output.s3Logs, context) : undefined, - s3LogsArn: __expectString(output.s3LogsArn), - streamName: __expectString(output.streamName), - } as any; -}; +// se_Subnets omitted. -/** - * deserializeAws_json1_1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - networkInterfaceId: __expectString(output.networkInterfaceId), - subnetId: __expectString(output.subnetId), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1OAuthProviderException - */ -const de_OAuthProviderException = (output: any, context: __SerdeContext): OAuthProviderException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1PhaseContext - */ -const de_PhaseContext = (output: any, context: __SerdeContext): PhaseContext => { - return { - message: __expectString(output.message), - statusCode: __expectString(output.statusCode), - } as any; -}; +// se_TestCaseFilter omitted. -/** - * deserializeAws_json1_1PhaseContexts - */ -const de_PhaseContexts = (output: any, context: __SerdeContext): PhaseContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhaseContext(entry, context); - }); - return retVal; -}; +// se_UpdateProjectInput omitted. -/** - * deserializeAws_json1_1Project - */ -const de_Project = (output: any, context: __SerdeContext): Project => { - return { - arn: __expectString(output.arn), - artifacts: output.artifacts != null ? de_ProjectArtifacts(output.artifacts, context) : undefined, - badge: output.badge != null ? de_ProjectBadge(output.badge, context) : undefined, - buildBatchConfig: - output.buildBatchConfig != null ? de_ProjectBuildBatchConfig(output.buildBatchConfig, context) : undefined, - cache: output.cache != null ? de_ProjectCache(output.cache, context) : undefined, - concurrentBuildLimit: __expectInt32(output.concurrentBuildLimit), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - description: __expectString(output.description), - encryptionKey: __expectString(output.encryptionKey), - environment: output.environment != null ? de_ProjectEnvironment(output.environment, context) : undefined, - fileSystemLocations: - output.fileSystemLocations != null - ? de_ProjectFileSystemLocations(output.fileSystemLocations, context) - : undefined, - lastModified: - output.lastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModified))) - : undefined, - logsConfig: output.logsConfig != null ? de_LogsConfig(output.logsConfig, context) : undefined, - name: __expectString(output.name), - projectVisibility: __expectString(output.projectVisibility), - publicProjectAlias: __expectString(output.publicProjectAlias), - queuedTimeoutInMinutes: __expectInt32(output.queuedTimeoutInMinutes), - resourceAccessRole: __expectString(output.resourceAccessRole), - secondaryArtifacts: - output.secondaryArtifacts != null ? de_ProjectArtifactsList(output.secondaryArtifacts, context) : undefined, - secondarySourceVersions: - output.secondarySourceVersions != null - ? de_ProjectSecondarySourceVersions(output.secondarySourceVersions, context) - : undefined, - secondarySources: output.secondarySources != null ? de_ProjectSources(output.secondarySources, context) : undefined, - serviceRole: __expectString(output.serviceRole), - source: output.source != null ? de_ProjectSource(output.source, context) : undefined, - sourceVersion: __expectString(output.sourceVersion), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - timeoutInMinutes: __expectInt32(output.timeoutInMinutes), - vpcConfig: output.vpcConfig != null ? de_VpcConfig(output.vpcConfig, context) : undefined, - webhook: output.webhook != null ? de_Webhook(output.webhook, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ProjectArns - */ -const de_ProjectArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UpdateProjectVisibilityInput omitted. -/** - * deserializeAws_json1_1ProjectArtifacts - */ -const de_ProjectArtifacts = (output: any, context: __SerdeContext): ProjectArtifacts => { - return { - artifactIdentifier: __expectString(output.artifactIdentifier), - bucketOwnerAccess: __expectString(output.bucketOwnerAccess), - encryptionDisabled: __expectBoolean(output.encryptionDisabled), - location: __expectString(output.location), - name: __expectString(output.name), - namespaceType: __expectString(output.namespaceType), - overrideArtifactName: __expectBoolean(output.overrideArtifactName), - packaging: __expectString(output.packaging), - path: __expectString(output.path), - type: __expectString(output.type), - } as any; -}; +// se_UpdateReportGroupInput omitted. -/** - * deserializeAws_json1_1ProjectArtifactsList - */ -const de_ProjectArtifactsList = (output: any, context: __SerdeContext): ProjectArtifacts[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectArtifacts(entry, context); - }); - return retVal; -}; +// se_UpdateWebhookInput omitted. -/** - * deserializeAws_json1_1ProjectBadge - */ -const de_ProjectBadge = (output: any, context: __SerdeContext): ProjectBadge => { - return { - badgeEnabled: __expectBoolean(output.badgeEnabled), - badgeRequestUrl: __expectString(output.badgeRequestUrl), - } as any; -}; +// se_VpcConfig omitted. -/** - * deserializeAws_json1_1ProjectBuildBatchConfig - */ -const de_ProjectBuildBatchConfig = (output: any, context: __SerdeContext): ProjectBuildBatchConfig => { - return { - batchReportMode: __expectString(output.batchReportMode), - combineArtifacts: __expectBoolean(output.combineArtifacts), - restrictions: output.restrictions != null ? de_BatchRestrictions(output.restrictions, context) : undefined, - serviceRole: __expectString(output.serviceRole), - timeoutInMins: __expectInt32(output.timeoutInMins), - } as any; -}; +// se_WebhookFilter omitted. -/** - * deserializeAws_json1_1ProjectCache - */ -const de_ProjectCache = (output: any, context: __SerdeContext): ProjectCache => { - return { - location: __expectString(output.location), - modes: output.modes != null ? de_ProjectCacheModes(output.modes, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_AccountLimitExceededException omitted. -/** - * deserializeAws_json1_1ProjectCacheModes - */ -const de_ProjectCacheModes = (output: any, context: __SerdeContext): (CacheMode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_BatchDeleteBuildsOutput omitted. /** - * deserializeAws_json1_1ProjectEnvironment + * deserializeAws_json1_1BatchGetBuildBatchesOutput */ -const de_ProjectEnvironment = (output: any, context: __SerdeContext): ProjectEnvironment => { - return { - certificate: __expectString(output.certificate), - computeType: __expectString(output.computeType), - environmentVariables: - output.environmentVariables != null ? de_EnvironmentVariables(output.environmentVariables, context) : undefined, - image: __expectString(output.image), - imagePullCredentialsType: __expectString(output.imagePullCredentialsType), - privilegedMode: __expectBoolean(output.privilegedMode), - registryCredential: - output.registryCredential != null ? de_RegistryCredential(output.registryCredential, context) : undefined, - type: __expectString(output.type), - } as any; +const de_BatchGetBuildBatchesOutput = (output: any, context: __SerdeContext): BatchGetBuildBatchesOutput => { + return take(output, { + buildBatches: (_: any) => de_BuildBatches(_, context), + buildBatchesNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1ProjectFileSystemLocation + * deserializeAws_json1_1BatchGetBuildsOutput */ -const de_ProjectFileSystemLocation = (output: any, context: __SerdeContext): ProjectFileSystemLocation => { - return { - identifier: __expectString(output.identifier), - location: __expectString(output.location), - mountOptions: __expectString(output.mountOptions), - mountPoint: __expectString(output.mountPoint), - type: __expectString(output.type), - } as any; +const de_BatchGetBuildsOutput = (output: any, context: __SerdeContext): BatchGetBuildsOutput => { + return take(output, { + builds: (_: any) => de_Builds(_, context), + buildsNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1ProjectFileSystemLocations + * deserializeAws_json1_1BatchGetProjectsOutput */ -const de_ProjectFileSystemLocations = (output: any, context: __SerdeContext): ProjectFileSystemLocation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectFileSystemLocation(entry, context); - }); - return retVal; +const de_BatchGetProjectsOutput = (output: any, context: __SerdeContext): BatchGetProjectsOutput => { + return take(output, { + projects: (_: any) => de_Projects(_, context), + projectsNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1ProjectNames + * deserializeAws_json1_1BatchGetReportGroupsOutput */ -const de_ProjectNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_BatchGetReportGroupsOutput = (output: any, context: __SerdeContext): BatchGetReportGroupsOutput => { + return take(output, { + reportGroups: (_: any) => de_ReportGroups(_, context), + reportGroupsNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1Projects + * deserializeAws_json1_1BatchGetReportsOutput */ -const de_Projects = (output: any, context: __SerdeContext): Project[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Project(entry, context); - }); - return retVal; +const de_BatchGetReportsOutput = (output: any, context: __SerdeContext): BatchGetReportsOutput => { + return take(output, { + reports: (_: any) => de_Reports(_, context), + reportsNotFound: _json, + }) as any; }; +// de_BatchRestrictions omitted. + /** - * deserializeAws_json1_1ProjectSecondarySourceVersions + * deserializeAws_json1_1Build */ -const de_ProjectSecondarySourceVersions = (output: any, context: __SerdeContext): ProjectSourceVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectSourceVersion(entry, context); - }); - return retVal; -}; +const de_Build = (output: any, context: __SerdeContext): Build => { + return take(output, { + arn: __expectString, + artifacts: _json, + buildBatchArn: __expectString, + buildComplete: __expectBoolean, + buildNumber: __expectLong, + buildStatus: __expectString, + cache: _json, + currentPhase: __expectString, + debugSession: _json, + encryptionKey: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + environment: _json, + exportedEnvironmentVariables: _json, + fileSystemLocations: _json, + id: __expectString, + initiator: __expectString, + logs: _json, + networkInterface: _json, + phases: (_: any) => de_BuildPhases(_, context), + projectName: __expectString, + queuedTimeoutInMinutes: __expectInt32, + reportArns: _json, + resolvedSourceVersion: __expectString, + secondaryArtifacts: _json, + secondarySourceVersions: _json, + secondarySources: _json, + serviceRole: __expectString, + source: _json, + sourceVersion: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + timeoutInMinutes: __expectInt32, + vpcConfig: _json, + }) as any; +}; + +// de_BuildArtifacts omitted. + +// de_BuildArtifactsList omitted. /** - * deserializeAws_json1_1ProjectSource + * deserializeAws_json1_1BuildBatch */ -const de_ProjectSource = (output: any, context: __SerdeContext): ProjectSource => { - return { - auth: output.auth != null ? de_SourceAuth(output.auth, context) : undefined, - buildStatusConfig: - output.buildStatusConfig != null ? de_BuildStatusConfig(output.buildStatusConfig, context) : undefined, - buildspec: __expectString(output.buildspec), - gitCloneDepth: __expectInt32(output.gitCloneDepth), - gitSubmodulesConfig: - output.gitSubmodulesConfig != null ? de_GitSubmodulesConfig(output.gitSubmodulesConfig, context) : undefined, - insecureSsl: __expectBoolean(output.insecureSsl), - location: __expectString(output.location), - reportBuildStatus: __expectBoolean(output.reportBuildStatus), - sourceIdentifier: __expectString(output.sourceIdentifier), - type: __expectString(output.type), - } as any; +const de_BuildBatch = (output: any, context: __SerdeContext): BuildBatch => { + return take(output, { + arn: __expectString, + artifacts: _json, + buildBatchConfig: _json, + buildBatchNumber: __expectLong, + buildBatchStatus: __expectString, + buildGroups: (_: any) => de_BuildGroups(_, context), + buildTimeoutInMinutes: __expectInt32, + cache: _json, + complete: __expectBoolean, + currentPhase: __expectString, + debugSessionEnabled: __expectBoolean, + encryptionKey: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + environment: _json, + fileSystemLocations: _json, + id: __expectString, + initiator: __expectString, + logConfig: _json, + phases: (_: any) => de_BuildBatchPhases(_, context), + projectName: __expectString, + queuedTimeoutInMinutes: __expectInt32, + resolvedSourceVersion: __expectString, + secondaryArtifacts: _json, + secondarySourceVersions: _json, + secondarySources: _json, + serviceRole: __expectString, + source: _json, + sourceVersion: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vpcConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1ProjectSources + * deserializeAws_json1_1BuildBatches */ -const de_ProjectSources = (output: any, context: __SerdeContext): ProjectSource[] => { +const de_BuildBatches = (output: any, context: __SerdeContext): BuildBatch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectSource(entry, context); + return de_BuildBatch(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ProjectSourceVersion - */ -const de_ProjectSourceVersion = (output: any, context: __SerdeContext): ProjectSourceVersion => { - return { - sourceIdentifier: __expectString(output.sourceIdentifier), - sourceVersion: __expectString(output.sourceVersion), - } as any; -}; - -/** - * deserializeAws_json1_1PutResourcePolicyOutput - */ -const de_PutResourcePolicyOutput = (output: any, context: __SerdeContext): PutResourcePolicyOutput => { - return { - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_BuildBatchIds omitted. /** - * deserializeAws_json1_1RegistryCredential + * deserializeAws_json1_1BuildBatchPhase */ -const de_RegistryCredential = (output: any, context: __SerdeContext): RegistryCredential => { - return { - credential: __expectString(output.credential), - credentialProvider: __expectString(output.credentialProvider), - } as any; +const de_BuildBatchPhase = (output: any, context: __SerdeContext): BuildBatchPhase => { + return take(output, { + contexts: _json, + durationInSeconds: __expectLong, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + phaseStatus: __expectString, + phaseType: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1Report + * deserializeAws_json1_1BuildBatchPhases */ -const de_Report = (output: any, context: __SerdeContext): Report => { - return { - arn: __expectString(output.arn), - codeCoverageSummary: - output.codeCoverageSummary != null - ? de_CodeCoverageReportSummary(output.codeCoverageSummary, context) - : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - executionId: __expectString(output.executionId), - expired: - output.expired != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expired))) : undefined, - exportConfig: output.exportConfig != null ? de_ReportExportConfig(output.exportConfig, context) : undefined, - name: __expectString(output.name), - reportGroupArn: __expectString(output.reportGroupArn), - status: __expectString(output.status), - testSummary: output.testSummary != null ? de_TestReportSummary(output.testSummary, context) : undefined, - truncated: __expectBoolean(output.truncated), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ReportArns - */ -const de_ReportArns = (output: any, context: __SerdeContext): string[] => { +const de_BuildBatchPhases = (output: any, context: __SerdeContext): BuildBatchPhase[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_BuildBatchPhase(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ReportExportConfig - */ -const de_ReportExportConfig = (output: any, context: __SerdeContext): ReportExportConfig => { - return { - exportConfigType: __expectString(output.exportConfigType), - s3Destination: output.s3Destination != null ? de_S3ReportExportConfig(output.s3Destination, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ReportGroup + * deserializeAws_json1_1BuildGroup */ -const de_ReportGroup = (output: any, context: __SerdeContext): ReportGroup => { - return { - arn: __expectString(output.arn), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - exportConfig: output.exportConfig != null ? de_ReportExportConfig(output.exportConfig, context) : undefined, - lastModified: - output.lastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModified))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; +const de_BuildGroup = (output: any, context: __SerdeContext): BuildGroup => { + return take(output, { + currentBuildSummary: (_: any) => de_BuildSummary(_, context), + dependsOn: _json, + identifier: __expectString, + ignoreFailure: __expectBoolean, + priorBuildSummaryList: (_: any) => de_BuildSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ReportGroupArns + * deserializeAws_json1_1BuildGroups */ -const de_ReportGroupArns = (output: any, context: __SerdeContext): string[] => { +const de_BuildGroups = (output: any, context: __SerdeContext): BuildGroup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_BuildGroup(entry, context); }); return retVal; }; +// de_BuildIds omitted. + +// de_BuildNotDeleted omitted. + /** - * deserializeAws_json1_1ReportGroups + * deserializeAws_json1_1BuildPhase */ -const de_ReportGroups = (output: any, context: __SerdeContext): ReportGroup[] => { +const de_BuildPhase = (output: any, context: __SerdeContext): BuildPhase => { + return take(output, { + contexts: _json, + durationInSeconds: __expectLong, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + phaseStatus: __expectString, + phaseType: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +/** + * deserializeAws_json1_1BuildPhases + */ +const de_BuildPhases = (output: any, context: __SerdeContext): BuildPhase[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReportGroup(entry, context); + return de_BuildPhase(entry, context); }); return retVal; }; +// de_BuildReportArns omitted. + /** - * deserializeAws_json1_1ReportGroupTrendRawDataList + * deserializeAws_json1_1Builds */ -const de_ReportGroupTrendRawDataList = (output: any, context: __SerdeContext): ReportWithRawData[] => { +const de_Builds = (output: any, context: __SerdeContext): Build[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReportWithRawData(entry, context); + return de_Build(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReportGroupTrendStats - */ -const de_ReportGroupTrendStats = (output: any, context: __SerdeContext): ReportGroupTrendStats => { - return { - average: __expectString(output.average), - max: __expectString(output.max), - min: __expectString(output.min), - } as any; -}; +// de_BuildsNotDeleted omitted. + +// de_BuildStatusConfig omitted. /** - * deserializeAws_json1_1Reports + * deserializeAws_json1_1BuildSummaries */ -const de_Reports = (output: any, context: __SerdeContext): Report[] => { +const de_BuildSummaries = (output: any, context: __SerdeContext): BuildSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Report(entry, context); + return de_BuildSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ReportStatusCounts + * deserializeAws_json1_1BuildSummary */ -const de_ReportStatusCounts = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); +const de_BuildSummary = (output: any, context: __SerdeContext): BuildSummary => { + return take(output, { + arn: __expectString, + buildStatus: __expectString, + primaryArtifact: _json, + requestedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + secondaryArtifacts: _json, + }) as any; }; +// de_CloudWatchLogsConfig omitted. + /** - * deserializeAws_json1_1ReportWithRawData + * deserializeAws_json1_1CodeCoverage */ -const de_ReportWithRawData = (output: any, context: __SerdeContext): ReportWithRawData => { - return { - data: __expectString(output.data), - reportArn: __expectString(output.reportArn), - } as any; +const de_CodeCoverage = (output: any, context: __SerdeContext): CodeCoverage => { + return take(output, { + branchCoveragePercentage: __limitedParseDouble, + branchesCovered: __expectInt32, + branchesMissed: __expectInt32, + expired: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + filePath: __expectString, + id: __expectString, + lineCoveragePercentage: __limitedParseDouble, + linesCovered: __expectInt32, + linesMissed: __expectInt32, + reportARN: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResolvedArtifact + * deserializeAws_json1_1CodeCoverageReportSummary */ -const de_ResolvedArtifact = (output: any, context: __SerdeContext): ResolvedArtifact => { - return { - identifier: __expectString(output.identifier), - location: __expectString(output.location), - type: __expectString(output.type), - } as any; +const de_CodeCoverageReportSummary = (output: any, context: __SerdeContext): CodeCoverageReportSummary => { + return take(output, { + branchCoveragePercentage: __limitedParseDouble, + branchesCovered: __expectInt32, + branchesMissed: __expectInt32, + lineCoveragePercentage: __limitedParseDouble, + linesCovered: __expectInt32, + linesMissed: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1ResolvedSecondaryArtifacts + * deserializeAws_json1_1CodeCoverages */ -const de_ResolvedSecondaryArtifacts = (output: any, context: __SerdeContext): ResolvedArtifact[] => { +const de_CodeCoverages = (output: any, context: __SerdeContext): CodeCoverage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolvedArtifact(entry, context); + return de_CodeCoverage(entry, context); }); return retVal; }; +// de_ComputeTypesAllowed omitted. + /** - * deserializeAws_json1_1ResourceAlreadyExistsException + * deserializeAws_json1_1CreateProjectOutput */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateProjectOutput = (output: any, context: __SerdeContext): CreateProjectOutput => { + return take(output, { + project: (_: any) => de_Project(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1CreateReportGroupOutput */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateReportGroupOutput = (output: any, context: __SerdeContext): CreateReportGroupOutput => { + return take(output, { + reportGroup: (_: any) => de_ReportGroup(_, context), + }) as any; }; /** - * deserializeAws_json1_1RetryBuildBatchOutput + * deserializeAws_json1_1CreateWebhookOutput */ -const de_RetryBuildBatchOutput = (output: any, context: __SerdeContext): RetryBuildBatchOutput => { - return { - buildBatch: output.buildBatch != null ? de_BuildBatch(output.buildBatch, context) : undefined, - } as any; +const de_CreateWebhookOutput = (output: any, context: __SerdeContext): CreateWebhookOutput => { + return take(output, { + webhook: (_: any) => de_Webhook(_, context), + }) as any; }; +// de_DebugSession omitted. + +// de_DeleteBuildBatchOutput omitted. + +// de_DeleteProjectOutput omitted. + +// de_DeleteReportGroupOutput omitted. + +// de_DeleteReportOutput omitted. + +// de_DeleteResourcePolicyOutput omitted. + +// de_DeleteSourceCredentialsOutput omitted. + +// de_DeleteWebhookOutput omitted. + /** - * deserializeAws_json1_1RetryBuildOutput + * deserializeAws_json1_1DescribeCodeCoveragesOutput */ -const de_RetryBuildOutput = (output: any, context: __SerdeContext): RetryBuildOutput => { - return { - build: output.build != null ? de_Build(output.build, context) : undefined, - } as any; +const de_DescribeCodeCoveragesOutput = (output: any, context: __SerdeContext): DescribeCodeCoveragesOutput => { + return take(output, { + codeCoverages: (_: any) => de_CodeCoverages(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1S3LogsConfig + * deserializeAws_json1_1DescribeTestCasesOutput */ -const de_S3LogsConfig = (output: any, context: __SerdeContext): S3LogsConfig => { - return { - bucketOwnerAccess: __expectString(output.bucketOwnerAccess), - encryptionDisabled: __expectBoolean(output.encryptionDisabled), - location: __expectString(output.location), - status: __expectString(output.status), - } as any; +const de_DescribeTestCasesOutput = (output: any, context: __SerdeContext): DescribeTestCasesOutput => { + return take(output, { + nextToken: __expectString, + testCases: (_: any) => de_TestCases(_, context), + }) as any; }; +// de_EnvironmentImage omitted. + +// de_EnvironmentImages omitted. + +// de_EnvironmentLanguage omitted. + +// de_EnvironmentLanguages omitted. + +// de_EnvironmentPlatform omitted. + +// de_EnvironmentPlatforms omitted. + +// de_EnvironmentVariable omitted. + +// de_EnvironmentVariables omitted. + +// de_ExportedEnvironmentVariable omitted. + +// de_ExportedEnvironmentVariables omitted. + +// de_FilterGroup omitted. + +// de_FilterGroups omitted. + +// de_GetReportGroupTrendOutput omitted. + +// de_GetResourcePolicyOutput omitted. + +// de_GitSubmodulesConfig omitted. + +// de_Identifiers omitted. + +// de_ImageVersions omitted. + +// de_ImportSourceCredentialsOutput omitted. + +// de_InvalidateProjectCacheOutput omitted. + +// de_InvalidInputException omitted. + +// de_ListBuildBatchesForProjectOutput omitted. + +// de_ListBuildBatchesOutput omitted. + +// de_ListBuildsForProjectOutput omitted. + +// de_ListBuildsOutput omitted. + +// de_ListCuratedEnvironmentImagesOutput omitted. + +// de_ListProjectsOutput omitted. + +// de_ListReportGroupsOutput omitted. + +// de_ListReportsForReportGroupOutput omitted. + +// de_ListReportsOutput omitted. + +// de_ListSharedProjectsOutput omitted. + +// de_ListSharedReportGroupsOutput omitted. + +// de_ListSourceCredentialsOutput omitted. + +// de_LogsConfig omitted. + +// de_LogsLocation omitted. + +// de_NetworkInterface omitted. + +// de_OAuthProviderException omitted. + +// de_PhaseContext omitted. + +// de_PhaseContexts omitted. + /** - * deserializeAws_json1_1S3ReportExportConfig + * deserializeAws_json1_1Project */ -const de_S3ReportExportConfig = (output: any, context: __SerdeContext): S3ReportExportConfig => { - return { - bucket: __expectString(output.bucket), - bucketOwner: __expectString(output.bucketOwner), - encryptionDisabled: __expectBoolean(output.encryptionDisabled), - encryptionKey: __expectString(output.encryptionKey), - packaging: __expectString(output.packaging), - path: __expectString(output.path), - } as any; +const de_Project = (output: any, context: __SerdeContext): Project => { + return take(output, { + arn: __expectString, + artifacts: _json, + badge: _json, + buildBatchConfig: _json, + cache: _json, + concurrentBuildLimit: __expectInt32, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + encryptionKey: __expectString, + environment: _json, + fileSystemLocations: _json, + lastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + logsConfig: _json, + name: __expectString, + projectVisibility: __expectString, + publicProjectAlias: __expectString, + queuedTimeoutInMinutes: __expectInt32, + resourceAccessRole: __expectString, + secondaryArtifacts: _json, + secondarySourceVersions: _json, + secondarySources: _json, + serviceRole: __expectString, + source: _json, + sourceVersion: __expectString, + tags: _json, + timeoutInMinutes: __expectInt32, + vpcConfig: _json, + webhook: (_: any) => de_Webhook(_, context), + }) as any; }; +// de_ProjectArns omitted. + +// de_ProjectArtifacts omitted. + +// de_ProjectArtifactsList omitted. + +// de_ProjectBadge omitted. + +// de_ProjectBuildBatchConfig omitted. + +// de_ProjectCache omitted. + +// de_ProjectCacheModes omitted. + +// de_ProjectEnvironment omitted. + +// de_ProjectFileSystemLocation omitted. + +// de_ProjectFileSystemLocations omitted. + +// de_ProjectNames omitted. + /** - * deserializeAws_json1_1SecurityGroupIds + * deserializeAws_json1_1Projects */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { +const de_Projects = (output: any, context: __SerdeContext): Project[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Project(entry, context); }); return retVal; }; +// de_ProjectSecondarySourceVersions omitted. + +// de_ProjectSource omitted. + +// de_ProjectSources omitted. + +// de_ProjectSourceVersion omitted. + +// de_PutResourcePolicyOutput omitted. + +// de_RegistryCredential omitted. + /** - * deserializeAws_json1_1SourceAuth + * deserializeAws_json1_1Report */ -const de_SourceAuth = (output: any, context: __SerdeContext): SourceAuth => { - return { - resource: __expectString(output.resource), - type: __expectString(output.type), - } as any; +const de_Report = (output: any, context: __SerdeContext): Report => { + return take(output, { + arn: __expectString, + codeCoverageSummary: (_: any) => de_CodeCoverageReportSummary(_, context), + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + executionId: __expectString, + expired: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + exportConfig: _json, + name: __expectString, + reportGroupArn: __expectString, + status: __expectString, + testSummary: _json, + truncated: __expectBoolean, + type: __expectString, + }) as any; }; +// de_ReportArns omitted. + +// de_ReportExportConfig omitted. + /** - * deserializeAws_json1_1SourceCredentialsInfo + * deserializeAws_json1_1ReportGroup */ -const de_SourceCredentialsInfo = (output: any, context: __SerdeContext): SourceCredentialsInfo => { - return { - arn: __expectString(output.arn), - authType: __expectString(output.authType), - serverType: __expectString(output.serverType), - } as any; +const de_ReportGroup = (output: any, context: __SerdeContext): ReportGroup => { + return take(output, { + arn: __expectString, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + exportConfig: _json, + lastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + tags: _json, + type: __expectString, + }) as any; }; +// de_ReportGroupArns omitted. + /** - * deserializeAws_json1_1SourceCredentialsInfos + * deserializeAws_json1_1ReportGroups */ -const de_SourceCredentialsInfos = (output: any, context: __SerdeContext): SourceCredentialsInfo[] => { +const de_ReportGroups = (output: any, context: __SerdeContext): ReportGroup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceCredentialsInfo(entry, context); + return de_ReportGroup(entry, context); }); return retVal; }; +// de_ReportGroupTrendRawDataList omitted. + +// de_ReportGroupTrendStats omitted. + /** - * deserializeAws_json1_1StartBuildBatchOutput + * deserializeAws_json1_1Reports */ -const de_StartBuildBatchOutput = (output: any, context: __SerdeContext): StartBuildBatchOutput => { - return { - buildBatch: output.buildBatch != null ? de_BuildBatch(output.buildBatch, context) : undefined, - } as any; +const de_Reports = (output: any, context: __SerdeContext): Report[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Report(entry, context); + }); + return retVal; }; +// de_ReportStatusCounts omitted. + +// de_ReportWithRawData omitted. + +// de_ResolvedArtifact omitted. + +// de_ResolvedSecondaryArtifacts omitted. + +// de_ResourceAlreadyExistsException omitted. + +// de_ResourceNotFoundException omitted. + /** - * deserializeAws_json1_1StartBuildOutput + * deserializeAws_json1_1RetryBuildBatchOutput */ -const de_StartBuildOutput = (output: any, context: __SerdeContext): StartBuildOutput => { - return { - build: output.build != null ? de_Build(output.build, context) : undefined, - } as any; +const de_RetryBuildBatchOutput = (output: any, context: __SerdeContext): RetryBuildBatchOutput => { + return take(output, { + buildBatch: (_: any) => de_BuildBatch(_, context), + }) as any; }; /** - * deserializeAws_json1_1StopBuildBatchOutput + * deserializeAws_json1_1RetryBuildOutput */ -const de_StopBuildBatchOutput = (output: any, context: __SerdeContext): StopBuildBatchOutput => { - return { - buildBatch: output.buildBatch != null ? de_BuildBatch(output.buildBatch, context) : undefined, - } as any; +const de_RetryBuildOutput = (output: any, context: __SerdeContext): RetryBuildOutput => { + return take(output, { + build: (_: any) => de_Build(_, context), + }) as any; }; +// de_S3LogsConfig omitted. + +// de_S3ReportExportConfig omitted. + +// de_SecurityGroupIds omitted. + +// de_SourceAuth omitted. + +// de_SourceCredentialsInfo omitted. + +// de_SourceCredentialsInfos omitted. + /** - * deserializeAws_json1_1StopBuildOutput + * deserializeAws_json1_1StartBuildBatchOutput */ -const de_StopBuildOutput = (output: any, context: __SerdeContext): StopBuildOutput => { - return { - build: output.build != null ? de_Build(output.build, context) : undefined, - } as any; +const de_StartBuildBatchOutput = (output: any, context: __SerdeContext): StartBuildBatchOutput => { + return take(output, { + buildBatch: (_: any) => de_BuildBatch(_, context), + }) as any; }; /** - * deserializeAws_json1_1Subnets + * deserializeAws_json1_1StartBuildOutput */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_StartBuildOutput = (output: any, context: __SerdeContext): StartBuildOutput => { + return take(output, { + build: (_: any) => de_Build(_, context), + }) as any; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1StopBuildBatchOutput */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; +const de_StopBuildBatchOutput = (output: any, context: __SerdeContext): StopBuildBatchOutput => { + return take(output, { + buildBatch: (_: any) => de_BuildBatch(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1StopBuildOutput */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_StopBuildOutput = (output: any, context: __SerdeContext): StopBuildOutput => { + return take(output, { + build: (_: any) => de_Build(_, context), + }) as any; }; +// de_Subnets omitted. + +// de_Tag omitted. + +// de_TagList omitted. + /** * deserializeAws_json1_1TestCase */ const de_TestCase = (output: any, context: __SerdeContext): TestCase => { - return { - durationInNanoSeconds: __expectLong(output.durationInNanoSeconds), - expired: - output.expired != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expired))) : undefined, - message: __expectString(output.message), - name: __expectString(output.name), - prefix: __expectString(output.prefix), - reportArn: __expectString(output.reportArn), - status: __expectString(output.status), - testRawDataPath: __expectString(output.testRawDataPath), - } as any; + return take(output, { + durationInNanoSeconds: __expectLong, + expired: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + name: __expectString, + prefix: __expectString, + reportArn: __expectString, + status: __expectString, + testRawDataPath: __expectString, + }) as any; }; /** @@ -6020,103 +3958,60 @@ const de_TestCases = (output: any, context: __SerdeContext): TestCase[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TestCase(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TestReportSummary - */ -const de_TestReportSummary = (output: any, context: __SerdeContext): TestReportSummary => { - return { - durationInNanoSeconds: __expectLong(output.durationInNanoSeconds), - statusCounts: output.statusCounts != null ? de_ReportStatusCounts(output.statusCounts, context) : undefined, - total: __expectInt32(output.total), - } as any; -}; +// de_TestReportSummary omitted. /** * deserializeAws_json1_1UpdateProjectOutput */ const de_UpdateProjectOutput = (output: any, context: __SerdeContext): UpdateProjectOutput => { - return { - project: output.project != null ? de_Project(output.project, context) : undefined, - } as any; + return take(output, { + project: (_: any) => de_Project(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateProjectVisibilityOutput - */ -const de_UpdateProjectVisibilityOutput = (output: any, context: __SerdeContext): UpdateProjectVisibilityOutput => { - return { - projectArn: __expectString(output.projectArn), - projectVisibility: __expectString(output.projectVisibility), - publicProjectAlias: __expectString(output.publicProjectAlias), - } as any; -}; +// de_UpdateProjectVisibilityOutput omitted. /** * deserializeAws_json1_1UpdateReportGroupOutput */ const de_UpdateReportGroupOutput = (output: any, context: __SerdeContext): UpdateReportGroupOutput => { - return { - reportGroup: output.reportGroup != null ? de_ReportGroup(output.reportGroup, context) : undefined, - } as any; + return take(output, { + reportGroup: (_: any) => de_ReportGroup(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateWebhookOutput */ const de_UpdateWebhookOutput = (output: any, context: __SerdeContext): UpdateWebhookOutput => { - return { - webhook: output.webhook != null ? de_Webhook(output.webhook, context) : undefined, - } as any; + return take(output, { + webhook: (_: any) => de_Webhook(_, context), + }) as any; }; -/** - * deserializeAws_json1_1VpcConfig - */ -const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { - return { - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - subnets: output.subnets != null ? de_Subnets(output.subnets, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcConfig omitted. /** * deserializeAws_json1_1Webhook */ const de_Webhook = (output: any, context: __SerdeContext): Webhook => { - return { - branchFilter: __expectString(output.branchFilter), - buildType: __expectString(output.buildType), - filterGroups: output.filterGroups != null ? de_FilterGroups(output.filterGroups, context) : undefined, - lastModifiedSecret: - output.lastModifiedSecret != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedSecret))) - : undefined, - payloadUrl: __expectString(output.payloadUrl), - secret: __expectString(output.secret), - url: __expectString(output.url), - } as any; + return take(output, { + branchFilter: __expectString, + buildType: __expectString, + filterGroups: _json, + lastModifiedSecret: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + payloadUrl: __expectString, + secret: __expectString, + url: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1WebhookFilter - */ -const de_WebhookFilter = (output: any, context: __SerdeContext): WebhookFilter => { - return { - excludeMatchedPattern: __expectBoolean(output.excludeMatchedPattern), - pattern: __expectString(output.pattern), - type: __expectString(output.type), - } as any; -}; +// de_WebhookFilter omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -6138,6 +4033,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-codecatalyst/src/protocols/Aws_restJson1.ts b/clients/client-codecatalyst/src/protocols/Aws_restJson1.ts index f63d468ef50a..85bce748184d 100644 --- a/clients/client-codecatalyst/src/protocols/Aws_restJson1.ts +++ b/clients/client-codecatalyst/src/protocols/Aws_restJson1.ts @@ -1,17 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -82,30 +83,20 @@ import { AccessDeniedException, AccessTokenSummary, ConflictException, - DevEnvironmentAccessDetails, - DevEnvironmentRepositorySummary, DevEnvironmentSessionConfiguration, DevEnvironmentSummary, - EmailAddress, EventLogEntry, - EventPayload, ExecuteCommandSessionConfiguration, Filter, - Ide, IdeConfiguration, ListSourceRepositoriesItem, ListSourceRepositoryBranchesItem, - PersistentStorage, PersistentStorageConfiguration, - ProjectInformation, ProjectListFilter, - ProjectSummary, RepositoryInput, ResourceNotFoundException, ServiceQuotaExceededException, - SpaceSummary, ThrottlingException, - UserIdentity, ValidationException, } from "../models/models_0"; @@ -122,10 +113,12 @@ export const se_CreateAccessTokenCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/accessTokens"; let body: any; - body = JSON.stringify({ - ...(input.expiresTime != null && { expiresTime: input.expiresTime.toISOString().split(".")[0] + "Z" }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + expiresTime: (_) => _.toISOString().split(".")[0] + "Z", + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -154,17 +147,17 @@ export const se_CreateDevEnvironmentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName!, "{spaceName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); let body: any; - body = JSON.stringify({ - ...(input.alias != null && { alias: input.alias }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }), - ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.persistentStorage != null && { - persistentStorage: se_PersistentStorageConfiguration(input.persistentStorage, context), - }), - ...(input.repositories != null && { repositories: se_RepositoriesInput(input.repositories, context) }), - }); + body = JSON.stringify( + take(input, { + alias: [], + clientToken: [], + ides: (_) => _json(_), + inactivityTimeoutMinutes: [], + instanceType: [], + persistentStorage: (_) => _json(_), + repositories: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -191,10 +184,12 @@ export const se_CreateProjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/projects"; resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName!, "{spaceName}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - }); + body = JSON.stringify( + take(input, { + description: [], + displayName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -232,9 +227,11 @@ export const se_CreateSourceRepositoryBranchCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.headCommitId != null && { headCommitId: input.headCommitId }), - }); + body = JSON.stringify( + take(input, { + headCommitId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -469,10 +466,12 @@ export const se_ListAccessTokensCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/accessTokens"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -501,11 +500,13 @@ export const se_ListDevEnvironmentsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName!, "{spaceName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -532,13 +533,15 @@ export const se_ListEventLogsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/eventLogs"; resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName!, "{spaceName}", false); let body: any; - body = JSON.stringify({ - ...(input.endTime != null && { endTime: input.endTime.toISOString().split(".")[0] + "Z" }), - ...(input.eventName != null && { eventName: input.eventName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.startTime != null && { startTime: input.startTime.toISOString().split(".")[0] + "Z" }), - }); + body = JSON.stringify( + take(input, { + endTime: (_) => _.toISOString().split(".")[0] + "Z", + eventName: [], + maxResults: [], + nextToken: [], + startTime: (_) => _.toISOString().split(".")[0] + "Z", + }) + ); return new __HttpRequest({ protocol, hostname, @@ -565,11 +568,13 @@ export const se_ListProjectsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces/{spaceName}/projects"; resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName!, "{spaceName}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ProjectListFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -598,10 +603,12 @@ export const se_ListSourceRepositoriesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "spaceName", () => input.spaceName!, "{spaceName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -638,10 +645,12 @@ export const se_ListSourceRepositoryBranchesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -666,9 +675,11 @@ export const se_ListSpacesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/spaces"; let body: any; - body = JSON.stringify({ - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -698,11 +709,13 @@ export const se_StartDevEnvironmentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }), - ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - }); + body = JSON.stringify( + take(input, { + ides: (_) => _json(_), + inactivityTimeoutMinutes: [], + instanceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -732,11 +745,11 @@ export const se_StartDevEnvironmentSessionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.sessionConfiguration != null && { - sessionConfiguration: se_DevEnvironmentSessionConfiguration(input.sessionConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + sessionConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -821,13 +834,15 @@ export const se_UpdateDevEnvironmentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.alias != null && { alias: input.alias }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.ides != null && { ides: se_IdeConfigurationList(input.ides, context) }), - ...(input.inactivityTimeoutMinutes != null && { inactivityTimeoutMinutes: input.inactivityTimeoutMinutes }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - }); + body = JSON.stringify( + take(input, { + alias: [], + clientToken: [], + ides: (_) => _json(_), + inactivityTimeoutMinutes: [], + instanceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -878,18 +893,13 @@ export const de_CreateAccessTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessTokenId != null) { - contents.accessTokenId = __expectString(data.accessTokenId); - } - if (data.expiresTime != null) { - contents.expiresTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.expiresTime)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.secret != null) { - contents.secret = __expectString(data.secret); - } + const doc = take(data, { + accessTokenId: __expectString, + expiresTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + secret: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -926,10 +936,9 @@ const de_CreateAccessTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -949,15 +958,12 @@ export const de_CreateDevEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + id: __expectString, + projectName: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -994,10 +1000,9 @@ const de_CreateDevEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1017,18 +1022,13 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + description: __expectString, + displayName: __expectString, + name: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1065,10 +1065,9 @@ const de_CreateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1088,18 +1087,13 @@ export const de_CreateSourceRepositoryBranchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.headCommitId != null) { - contents.headCommitId = __expectString(data.headCommitId); - } - if (data.lastUpdatedTime != null) { - contents.lastUpdatedTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedTime)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.ref != null) { - contents.ref = __expectString(data.ref); - } + const doc = take(data, { + headCommitId: __expectString, + lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + ref: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1136,10 +1130,9 @@ const de_CreateSourceRepositoryBranchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1195,10 +1188,9 @@ const de_DeleteAccessTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1218,15 +1210,12 @@ export const de_DeleteDevEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + id: __expectString, + projectName: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1263,10 +1252,9 @@ const de_DeleteDevEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1286,45 +1274,22 @@ export const de_GetDevEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alias != null) { - contents.alias = __expectString(data.alias); - } - if (data.creatorId != null) { - contents.creatorId = __expectString(data.creatorId); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.ides != null) { - contents.ides = de_Ides(data.ides, context); - } - if (data.inactivityTimeoutMinutes != null) { - contents.inactivityTimeoutMinutes = __expectInt32(data.inactivityTimeoutMinutes); - } - if (data.instanceType != null) { - contents.instanceType = __expectString(data.instanceType); - } - if (data.lastUpdatedTime != null) { - contents.lastUpdatedTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedTime)); - } - if (data.persistentStorage != null) { - contents.persistentStorage = de_PersistentStorage(data.persistentStorage, context); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.repositories != null) { - contents.repositories = de_DevEnvironmentRepositorySummaries(data.repositories, context); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } + const doc = take(data, { + alias: __expectString, + creatorId: __expectString, + id: __expectString, + ides: _json, + inactivityTimeoutMinutes: __expectInt32, + instanceType: __expectString, + lastUpdatedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + persistentStorage: _json, + projectName: __expectString, + repositories: _json, + spaceName: __expectString, + status: __expectString, + statusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1361,10 +1326,9 @@ const de_GetDevEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1384,18 +1348,13 @@ export const de_GetProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + description: __expectString, + displayName: __expectString, + name: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1432,10 +1391,9 @@ const de_GetProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1455,9 +1413,10 @@ export const de_GetSourceRepositoryCloneUrlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.https != null) { - contents.https = __expectString(data.https); - } + const doc = take(data, { + https: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1494,10 +1453,9 @@ const de_GetSourceRepositoryCloneUrlsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1517,18 +1475,13 @@ export const de_GetSpaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.regionName != null) { - contents.regionName = __expectString(data.regionName); - } + const doc = take(data, { + description: __expectString, + displayName: __expectString, + name: __expectString, + regionName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1565,10 +1518,9 @@ const de_GetSpaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1588,12 +1540,11 @@ export const de_GetSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.awsAccountName != null) { - contents.awsAccountName = __expectString(data.awsAccountName); - } - if (data.subscriptionType != null) { - contents.subscriptionType = __expectString(data.subscriptionType); - } + const doc = take(data, { + awsAccountName: __expectString, + subscriptionType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1630,10 +1581,9 @@ const de_GetSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1653,21 +1603,14 @@ export const de_GetUserDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.primaryEmail != null) { - contents.primaryEmail = de_EmailAddress(data.primaryEmail, context); - } - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } - if (data.userName != null) { - contents.userName = __expectString(data.userName); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + displayName: __expectString, + primaryEmail: _json, + userId: __expectString, + userName: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1704,10 +1647,9 @@ const de_GetUserDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1727,12 +1669,11 @@ export const de_ListAccessTokensCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_AccessTokenSummaries(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_AccessTokenSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1769,10 +1710,9 @@ const de_ListAccessTokensCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1792,12 +1732,11 @@ export const de_ListDevEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_DevEnvironmentSummaryList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_DevEnvironmentSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1834,10 +1773,9 @@ const de_ListDevEnvironmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1857,12 +1795,11 @@ export const de_ListEventLogsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_EventLogEntries(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_EventLogEntries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1899,10 +1836,9 @@ const de_ListEventLogsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1922,12 +1858,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ProjectSummaries(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1964,10 +1899,9 @@ const de_ListProjectsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1987,12 +1921,11 @@ export const de_ListSourceRepositoriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ListSourceRepositoriesItems(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ListSourceRepositoriesItems(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2029,10 +1962,9 @@ const de_ListSourceRepositoriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2052,12 +1984,11 @@ export const de_ListSourceRepositoryBranchesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ListSourceRepositoryBranchesItems(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ListSourceRepositoryBranchesItems(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2094,10 +2025,9 @@ const de_ListSourceRepositoryBranchesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2117,12 +2047,11 @@ export const de_ListSpacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_SpaceSummaries(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2159,10 +2088,9 @@ const de_ListSpacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2182,18 +2110,13 @@ export const de_StartDevEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + id: __expectString, + projectName: __expectString, + spaceName: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2230,10 +2153,9 @@ const de_StartDevEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2253,21 +2175,14 @@ export const de_StartDevEnvironmentSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessDetails != null) { - contents.accessDetails = de_DevEnvironmentAccessDetails(data.accessDetails, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + accessDetails: _json, + id: __expectString, + projectName: __expectString, + sessionId: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2304,10 +2219,9 @@ const de_StartDevEnvironmentSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2327,18 +2241,13 @@ export const de_StopDevEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + id: __expectString, + projectName: __expectString, + spaceName: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2375,10 +2284,9 @@ const de_StopDevEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2398,18 +2306,13 @@ export const de_StopDevEnvironmentSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + id: __expectString, + projectName: __expectString, + sessionId: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2446,10 +2349,9 @@ const de_StopDevEnvironmentSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2469,30 +2371,17 @@ export const de_UpdateDevEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alias != null) { - contents.alias = __expectString(data.alias); - } - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.ides != null) { - contents.ides = de_IdeConfigurationList(data.ides, context); - } - if (data.inactivityTimeoutMinutes != null) { - contents.inactivityTimeoutMinutes = __expectInt32(data.inactivityTimeoutMinutes); - } - if (data.instanceType != null) { - contents.instanceType = __expectString(data.instanceType); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } - if (data.spaceName != null) { - contents.spaceName = __expectString(data.spaceName); - } + const doc = take(data, { + alias: __expectString, + clientToken: __expectString, + id: __expectString, + ides: _json, + inactivityTimeoutMinutes: __expectInt32, + instanceType: __expectString, + projectName: __expectString, + spaceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2529,10 +2418,9 @@ const de_UpdateDevEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2552,9 +2440,10 @@ export const de_VerifySessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identity != null) { - contents.identity = __expectString(data.identity); - } + const doc = take(data, { + identity: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2591,16 +2480,15 @@ const de_VerifySessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2610,9 +2498,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2626,9 +2515,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2645,9 +2535,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2664,9 +2555,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2680,9 +2572,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2696,9 +2589,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2706,155 +2600,31 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DevEnvironmentSessionConfiguration - */ -const se_DevEnvironmentSessionConfiguration = ( - input: DevEnvironmentSessionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.executeCommandSessionConfiguration != null && { - executeCommandSessionConfiguration: se_ExecuteCommandSessionConfiguration( - input.executeCommandSessionConfiguration, - context - ), - }), - ...(input.sessionType != null && { sessionType: input.sessionType }), - }; -}; +// se_DevEnvironmentSessionConfiguration omitted. -/** - * serializeAws_restJson1ExecuteCommandSessionConfiguration - */ -const se_ExecuteCommandSessionConfiguration = ( - input: ExecuteCommandSessionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.arguments != null && { - arguments: se_ExecuteCommandSessionConfigurationArguments(input.arguments, context), - }), - ...(input.command != null && { command: input.command }), - }; -}; +// se_ExecuteCommandSessionConfiguration omitted. -/** - * serializeAws_restJson1ExecuteCommandSessionConfigurationArguments - */ -const se_ExecuteCommandSessionConfigurationArguments = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExecuteCommandSessionConfigurationArguments omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se_StringList(input.values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_restJson1IdeConfiguration - */ -const se_IdeConfiguration = (input: IdeConfiguration, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.runtime != null && { runtime: input.runtime }), - }; -}; +// se_IdeConfiguration omitted. -/** - * serializeAws_restJson1IdeConfigurationList - */ -const se_IdeConfigurationList = (input: IdeConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IdeConfiguration(entry, context); - }); -}; +// se_IdeConfigurationList omitted. -/** - * serializeAws_restJson1PersistentStorageConfiguration - */ -const se_PersistentStorageConfiguration = (input: PersistentStorageConfiguration, context: __SerdeContext): any => { - return { - ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }), - }; -}; +// se_PersistentStorageConfiguration omitted. -/** - * serializeAws_restJson1ProjectListFilter - */ -const se_ProjectListFilter = (input: ProjectListFilter, context: __SerdeContext): any => { - return { - ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se_StringList(input.values, context) }), - }; -}; +// se_ProjectListFilter omitted. -/** - * serializeAws_restJson1ProjectListFilters - */ -const se_ProjectListFilters = (input: ProjectListFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProjectListFilter(entry, context); - }); -}; +// se_ProjectListFilters omitted. -/** - * serializeAws_restJson1RepositoriesInput - */ -const se_RepositoriesInput = (input: RepositoryInput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RepositoryInput(entry, context); - }); -}; +// se_RepositoriesInput omitted. -/** - * serializeAws_restJson1RepositoryInput - */ -const se_RepositoryInput = (input: RepositoryInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_RepositoryInput omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. /** * deserializeAws_restJson1AccessTokenSummaries @@ -2863,9 +2633,6 @@ const de_AccessTokenSummaries = (output: any, context: __SerdeContext): AccessTo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccessTokenSummary(entry, context); }); return retVal; @@ -2875,76 +2642,38 @@ const de_AccessTokenSummaries = (output: any, context: __SerdeContext): AccessTo * deserializeAws_restJson1AccessTokenSummary */ const de_AccessTokenSummary = (output: any, context: __SerdeContext): AccessTokenSummary => { - return { - expiresTime: - output.expiresTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.expiresTime)) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - } as any; + return take(output, { + expiresTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DevEnvironmentAccessDetails - */ -const de_DevEnvironmentAccessDetails = (output: any, context: __SerdeContext): DevEnvironmentAccessDetails => { - return { - streamUrl: __expectString(output.streamUrl), - tokenValue: __expectString(output.tokenValue), - } as any; -}; +// de_DevEnvironmentAccessDetails omitted. -/** - * deserializeAws_restJson1DevEnvironmentRepositorySummaries - */ -const de_DevEnvironmentRepositorySummaries = ( - output: any, - context: __SerdeContext -): DevEnvironmentRepositorySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DevEnvironmentRepositorySummary(entry, context); - }); - return retVal; -}; +// de_DevEnvironmentRepositorySummaries omitted. -/** - * deserializeAws_restJson1DevEnvironmentRepositorySummary - */ -const de_DevEnvironmentRepositorySummary = (output: any, context: __SerdeContext): DevEnvironmentRepositorySummary => { - return { - branchName: __expectString(output.branchName), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_DevEnvironmentRepositorySummary omitted. /** * deserializeAws_restJson1DevEnvironmentSummary */ const de_DevEnvironmentSummary = (output: any, context: __SerdeContext): DevEnvironmentSummary => { - return { - alias: __expectString(output.alias), - creatorId: __expectString(output.creatorId), - id: __expectString(output.id), - ides: output.ides != null ? de_Ides(output.ides, context) : undefined, - inactivityTimeoutMinutes: __expectInt32(output.inactivityTimeoutMinutes), - instanceType: __expectString(output.instanceType), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedTime)) - : undefined, - persistentStorage: - output.persistentStorage != null ? de_PersistentStorage(output.persistentStorage, context) : undefined, - projectName: __expectString(output.projectName), - repositories: - output.repositories != null ? de_DevEnvironmentRepositorySummaries(output.repositories, context) : undefined, - spaceName: __expectString(output.spaceName), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + alias: __expectString, + creatorId: __expectString, + id: __expectString, + ides: _json, + inactivityTimeoutMinutes: __expectInt32, + instanceType: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + persistentStorage: _json, + projectName: __expectString, + repositories: _json, + spaceName: __expectString, + status: __expectString, + statusReason: __expectString, + }) as any; }; /** @@ -2954,23 +2683,12 @@ const de_DevEnvironmentSummaryList = (output: any, context: __SerdeContext): Dev const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DevEnvironmentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EmailAddress - */ -const de_EmailAddress = (output: any, context: __SerdeContext): EmailAddress => { - return { - email: __expectString(output.email), - verified: __expectBoolean(output.verified), - } as any; -}; +// de_EmailAddress omitted. /** * deserializeAws_restJson1EventLogEntries @@ -2979,9 +2697,6 @@ const de_EventLogEntries = (output: any, context: __SerdeContext): EventLogEntry const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventLogEntry(entry, context); }); return retVal; @@ -2991,102 +2706,46 @@ const de_EventLogEntries = (output: any, context: __SerdeContext): EventLogEntry * deserializeAws_restJson1EventLogEntry */ const de_EventLogEntry = (output: any, context: __SerdeContext): EventLogEntry => { - return { - errorCode: __expectString(output.errorCode), - eventCategory: __expectString(output.eventCategory), - eventName: __expectString(output.eventName), - eventSource: __expectString(output.eventSource), - eventTime: - output.eventTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.eventTime)) : undefined, - eventType: __expectString(output.eventType), - id: __expectString(output.id), - operationType: __expectString(output.operationType), - projectInformation: - output.projectInformation != null ? de_ProjectInformation(output.projectInformation, context) : undefined, - requestId: __expectString(output.requestId), - requestPayload: output.requestPayload != null ? de_EventPayload(output.requestPayload, context) : undefined, - responsePayload: output.responsePayload != null ? de_EventPayload(output.responsePayload, context) : undefined, - sourceIpAddress: __expectString(output.sourceIpAddress), - userAgent: __expectString(output.userAgent), - userIdentity: output.userIdentity != null ? de_UserIdentity(output.userIdentity, context) : undefined, - } as any; + return take(output, { + errorCode: __expectString, + eventCategory: __expectString, + eventName: __expectString, + eventSource: __expectString, + eventTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + eventType: __expectString, + id: __expectString, + operationType: __expectString, + projectInformation: _json, + requestId: __expectString, + requestPayload: _json, + responsePayload: _json, + sourceIpAddress: __expectString, + userAgent: __expectString, + userIdentity: _json, + }) as any; }; -/** - * deserializeAws_restJson1EventPayload - */ -const de_EventPayload = (output: any, context: __SerdeContext): EventPayload => { - return { - contentType: __expectString(output.contentType), - data: __expectString(output.data), - } as any; -}; +// de_EventPayload omitted. -/** - * deserializeAws_restJson1Ide - */ -const de_Ide = (output: any, context: __SerdeContext): Ide => { - return { - name: __expectString(output.name), - runtime: __expectString(output.runtime), - } as any; -}; +// de_Ide omitted. -/** - * deserializeAws_restJson1IdeConfiguration - */ -const de_IdeConfiguration = (output: any, context: __SerdeContext): IdeConfiguration => { - return { - name: __expectString(output.name), - runtime: __expectString(output.runtime), - } as any; -}; +// de_IdeConfiguration omitted. -/** - * deserializeAws_restJson1IdeConfigurationList - */ -const de_IdeConfigurationList = (output: any, context: __SerdeContext): IdeConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdeConfiguration(entry, context); - }); - return retVal; -}; +// de_IdeConfigurationList omitted. -/** - * deserializeAws_restJson1Ides - */ -const de_Ides = (output: any, context: __SerdeContext): Ide[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ide(entry, context); - }); - return retVal; -}; +// de_Ides omitted. /** * deserializeAws_restJson1ListSourceRepositoriesItem */ const de_ListSourceRepositoriesItem = (output: any, context: __SerdeContext): ListSourceRepositoriesItem => { - return { - createdTime: - output.createdTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedTime)) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + createdTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + }) as any; }; /** @@ -3096,9 +2755,6 @@ const de_ListSourceRepositoriesItems = (output: any, context: __SerdeContext): L const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSourceRepositoriesItem(entry, context); }); return retVal; @@ -3111,15 +2767,12 @@ const de_ListSourceRepositoryBranchesItem = ( output: any, context: __SerdeContext ): ListSourceRepositoryBranchesItem => { - return { - headCommitId: __expectString(output.headCommitId), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedTime)) - : undefined, - name: __expectString(output.name), - ref: __expectString(output.ref), - } as any; + return take(output, { + headCommitId: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + ref: __expectString, + }) as any; }; /** @@ -3132,97 +2785,24 @@ const de_ListSourceRepositoryBranchesItems = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSourceRepositoryBranchesItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PersistentStorage - */ -const de_PersistentStorage = (output: any, context: __SerdeContext): PersistentStorage => { - return { - sizeInGiB: __expectInt32(output.sizeInGiB), - } as any; -}; +// de_PersistentStorage omitted. -/** - * deserializeAws_restJson1ProjectInformation - */ -const de_ProjectInformation = (output: any, context: __SerdeContext): ProjectInformation => { - return { - name: __expectString(output.name), - projectId: __expectString(output.projectId), - } as any; -}; +// de_ProjectInformation omitted. -/** - * deserializeAws_restJson1ProjectSummaries - */ -const de_ProjectSummaries = (output: any, context: __SerdeContext): ProjectSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectSummary(entry, context); - }); - return retVal; -}; +// de_ProjectSummaries omitted. -/** - * deserializeAws_restJson1ProjectSummary - */ -const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - description: __expectString(output.description), - displayName: __expectString(output.displayName), - name: __expectString(output.name), - } as any; -}; +// de_ProjectSummary omitted. -/** - * deserializeAws_restJson1SpaceSummaries - */ -const de_SpaceSummaries = (output: any, context: __SerdeContext): SpaceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SpaceSummary(entry, context); - }); - return retVal; -}; +// de_SpaceSummaries omitted. -/** - * deserializeAws_restJson1SpaceSummary - */ -const de_SpaceSummary = (output: any, context: __SerdeContext): SpaceSummary => { - return { - description: __expectString(output.description), - displayName: __expectString(output.displayName), - name: __expectString(output.name), - regionName: __expectString(output.regionName), - } as any; -}; +// de_SpaceSummary omitted. -/** - * deserializeAws_restJson1UserIdentity - */ -const de_UserIdentity = (output: any, context: __SerdeContext): UserIdentity => { - return { - awsAccountId: __expectString(output.awsAccountId), - principalId: __expectString(output.principalId), - userName: __expectString(output.userName), - userType: __expectString(output.userType), - } as any; -}; +// de_UserIdentity omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-codecommit/src/protocols/Aws_json1_1.ts b/clients/client-codecommit/src/protocols/Aws_json1_1.ts index 2076df5c3d99..189d6e4080b5 100644 --- a/clients/client-codecommit/src/protocols/Aws_json1_1.ts +++ b/clients/client-codecommit/src/protocols/Aws_json1_1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -243,44 +244,30 @@ import { import { CodeCommitServiceException as __BaseException } from "../models/CodeCommitServiceException"; import { ActorDoesNotExistException, - Approval, ApprovalRule, ApprovalRuleContentRequiredException, ApprovalRuleDoesNotExistException, - ApprovalRuleEventMetadata, ApprovalRuleNameAlreadyExistsException, ApprovalRuleNameRequiredException, - ApprovalRuleOverriddenEventMetadata, ApprovalRuleTemplate, ApprovalRuleTemplateContentRequiredException, ApprovalRuleTemplateDoesNotExistException, ApprovalRuleTemplateInUseException, ApprovalRuleTemplateNameAlreadyExistsException, ApprovalRuleTemplateNameRequiredException, - ApprovalStateChangedEventMetadata, ApprovalStateRequiredException, AssociateApprovalRuleTemplateWithRepositoryInput, AuthorDoesNotExistException, - BatchAssociateApprovalRuleTemplateWithRepositoriesError, BatchAssociateApprovalRuleTemplateWithRepositoriesInput, - BatchAssociateApprovalRuleTemplateWithRepositoriesOutput, - BatchDescribeMergeConflictsError, BatchDescribeMergeConflictsInput, - BatchDescribeMergeConflictsOutput, - BatchDisassociateApprovalRuleTemplateFromRepositoriesError, BatchDisassociateApprovalRuleTemplateFromRepositoriesInput, - BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput, - BatchGetCommitsError, BatchGetCommitsInput, - BatchGetCommitsOutput, BatchGetRepositoriesInput, BatchGetRepositoriesOutput, BeforeCommitIdAndAfterCommitIdAreSameException, BlobIdDoesNotExistException, BlobIdRequiredException, - BlobMetadata, BranchDoesNotExistException, - BranchInfo, BranchNameExistsException, BranchNameIsTagNameException, BranchNameRequiredException, @@ -293,7 +280,6 @@ import { CommentIdRequiredException, CommentsForComparedCommit, CommentsForPullRequest, - Commit, CommitDoesNotExistException, CommitIdDoesNotExistException, CommitIdRequiredException, @@ -302,14 +288,11 @@ import { CommitMessageLengthExceededException, CommitRequiredException, ConcurrentReferenceUpdateException, - Conflict, - ConflictMetadata, ConflictResolution, CreateApprovalRuleTemplateInput, CreateApprovalRuleTemplateOutput, CreateBranchInput, CreateCommitInput, - CreateCommitOutput, CreatePullRequestApprovalRuleInput, CreatePullRequestApprovalRuleOutput, CreatePullRequestInput, @@ -317,26 +300,18 @@ import { CreateRepositoryInput, CreateRepositoryOutput, CreateUnreferencedMergeCommitInput, - CreateUnreferencedMergeCommitOutput, DefaultBranchCannotBeDeletedException, DeleteApprovalRuleTemplateInput, - DeleteApprovalRuleTemplateOutput, DeleteBranchInput, - DeleteBranchOutput, DeleteCommentContentInput, DeleteCommentContentOutput, DeleteFileEntry, DeleteFileInput, - DeleteFileOutput, DeletePullRequestApprovalRuleInput, - DeletePullRequestApprovalRuleOutput, DeleteRepositoryInput, - DeleteRepositoryOutput, DescribeMergeConflictsInput, - DescribeMergeConflictsOutput, DescribePullRequestEventsInput, DescribePullRequestEventsOutput, - Difference, DirectoryNameConflictsWithFileNameException, DisassociateApprovalRuleTemplateFromRepositoryInput, EncryptionIntegrityChecksFailedException, @@ -345,21 +320,14 @@ import { EncryptionKeyNotFoundException, EncryptionKeyUnavailableException, EvaluatePullRequestApprovalRulesInput, - EvaluatePullRequestApprovalRulesOutput, - Evaluation, - File, FileContentAndSourceFileSpecifiedException, FileContentSizeLimitExceededException, FileDoesNotExistException, FileEntryRequiredException, - FileMetadata, FileModeRequiredException, - FileModes, FileNameConflictsWithDirectoryNameException, FilePathConflictsWithSubmodulePathException, - FileSizes, FileTooLargeException, - Folder, FolderContentSizeLimitExceededException, FolderDoesNotExistException, GetApprovalRuleTemplateInput, @@ -367,39 +335,28 @@ import { GetBlobInput, GetBlobOutput, GetBranchInput, - GetBranchOutput, GetCommentInput, GetCommentOutput, GetCommentReactionsInput, - GetCommentReactionsOutput, GetCommentsForComparedCommitInput, GetCommentsForComparedCommitOutput, GetCommentsForPullRequestInput, GetCommentsForPullRequestOutput, GetCommitInput, - GetCommitOutput, GetDifferencesInput, - GetDifferencesOutput, GetFileInput, GetFileOutput, GetFolderInput, - GetFolderOutput, GetMergeCommitInput, - GetMergeCommitOutput, GetMergeConflictsInput, - GetMergeConflictsOutput, GetMergeOptionsInput, - GetMergeOptionsOutput, GetPullRequestApprovalStatesInput, - GetPullRequestApprovalStatesOutput, GetPullRequestInput, GetPullRequestOutput, GetPullRequestOverrideStateInput, - GetPullRequestOverrideStateOutput, GetRepositoryInput, GetRepositoryOutput, GetRepositoryTriggersInput, - GetRepositoryTriggersOutput, IdempotencyParameterMismatchException, InvalidActorArnException, InvalidApprovalRuleContentException, @@ -447,15 +404,10 @@ import { InvalidTargetException, InvalidTargetsException, InvalidTitleException, - IsBinaryFile, ListApprovalRuleTemplatesInput, - ListApprovalRuleTemplatesOutput, ListAssociatedApprovalRuleTemplatesForRepositoryInput, - ListAssociatedApprovalRuleTemplatesForRepositoryOutput, ListBranchesInput, - ListBranchesOutput, ListPullRequestsInput, - ListPullRequestsOutput, Location, ManualMergeRequiredException, MaximumConflictResolutionEntriesExceededException, @@ -465,20 +417,13 @@ import { MaximumOpenPullRequestsExceededException, MaximumRepositoryNamesExceededException, MaximumRuleTemplatesAssociatedWithRepositoryException, - MergeHunk, - MergeHunkDetail, - MergeMetadata, - MergeOperations, MergeOptionRequiredException, - MergeOptionTypeEnum, MultipleConflictResolutionEntriesException, MultipleRepositoriesInPullRequestException, NameLengthExceededException, NoChangeException, NumberOfRulesExceededException, NumberOfRuleTemplatesExceededException, - ObjectTypes, - OriginApprovalRuleTemplate, ParentCommitDoesNotExistException, ParentCommitIdOutdatedException, ParentCommitIdRequiredException, @@ -486,18 +431,11 @@ import { PathRequiredException, PullRequest, PullRequestAlreadyClosedException, - PullRequestCreatedEventMetadata, PullRequestDoesNotExistException, PullRequestEvent, PullRequestIdRequiredException, - PullRequestMergedStateChangedEventMetadata, - PullRequestSourceReferenceUpdatedEventMetadata, - PullRequestStatusChangedEventMetadata, - PullRequestTarget, PutFileEntry, PutFileEntryConflictException, - ReactionForComment, - ReactionValueFormats, ReferenceDoesNotExistException, ReferenceNameRequiredException, ReferenceTypeNotSupportedException, @@ -521,8 +459,6 @@ import { SourceAndDestinationAreSameException, SourceFileOrContentRequiredException, SourceFileSpecifier, - SubModule, - SymbolicLink, TagPolicyException, Target, TargetRequiredException, @@ -530,7 +466,6 @@ import { TipsDivergenceExceededException, TitleRequiredException, TooManyTagsException, - UserInfo, } from "../models/models_0"; import { CommentContentRequiredException, @@ -555,20 +490,14 @@ import { InvalidTagKeysListException, InvalidTargetBranchException, ListRepositoriesForApprovalRuleTemplateInput, - ListRepositoriesForApprovalRuleTemplateOutput, ListRepositoriesInput, - ListRepositoriesOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, MaximumBranchesExceededException, MaximumNumberOfApprovalsExceededException, MaximumRepositoryTriggersExceededException, MergeBranchesByFastForwardInput, - MergeBranchesByFastForwardOutput, MergeBranchesBySquashInput, - MergeBranchesBySquashOutput, MergeBranchesByThreeWayInput, - MergeBranchesByThreeWayOutput, MergePullRequestByFastForwardInput, MergePullRequestByFastForwardOutput, MergePullRequestBySquashInput, @@ -589,16 +518,12 @@ import { PullRequestStatusRequiredException, PutCommentReactionInput, PutFileInput, - PutFileOutput, PutRepositoryTriggersInput, - PutRepositoryTriggersOutput, ReactionLimitExceededException, ReactionValueRequiredException, - RepositoryNameIdPair, RepositoryTriggerBranchNameListRequiredException, RepositoryTriggerDestinationArnRequiredException, RepositoryTriggerEventsListRequiredException, - RepositoryTriggerExecutionFailure, RepositoryTriggerNameRequiredException, RepositoryTriggersListRequiredException, ResourceArnRequiredException, @@ -607,7 +532,6 @@ import { TagResourceInput, TagsMapRequiredException, TestRepositoryTriggersInput, - TestRepositoryTriggersOutput, TipOfSourceReferenceIsDifferentException, UntagResourceInput, UpdateApprovalRuleTemplateContentInput, @@ -641,7 +565,7 @@ export const se_AssociateApprovalRuleTemplateWithRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateApprovalRuleTemplateWithRepository"); let body: any; - body = JSON.stringify(se_AssociateApprovalRuleTemplateWithRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -654,7 +578,7 @@ export const se_BatchAssociateApprovalRuleTemplateWithRepositoriesCommand = asyn ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchAssociateApprovalRuleTemplateWithRepositories"); let body: any; - body = JSON.stringify(se_BatchAssociateApprovalRuleTemplateWithRepositoriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -667,7 +591,7 @@ export const se_BatchDescribeMergeConflictsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDescribeMergeConflicts"); let body: any; - body = JSON.stringify(se_BatchDescribeMergeConflictsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -680,7 +604,7 @@ export const se_BatchDisassociateApprovalRuleTemplateFromRepositoriesCommand = a ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDisassociateApprovalRuleTemplateFromRepositories"); let body: any; - body = JSON.stringify(se_BatchDisassociateApprovalRuleTemplateFromRepositoriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -693,7 +617,7 @@ export const se_BatchGetCommitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetCommits"); let body: any; - body = JSON.stringify(se_BatchGetCommitsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -706,7 +630,7 @@ export const se_BatchGetRepositoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetRepositories"); let body: any; - body = JSON.stringify(se_BatchGetRepositoriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -719,7 +643,7 @@ export const se_CreateApprovalRuleTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApprovalRuleTemplate"); let body: any; - body = JSON.stringify(se_CreateApprovalRuleTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -732,7 +656,7 @@ export const se_CreateBranchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBranch"); let body: any; - body = JSON.stringify(se_CreateBranchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -771,7 +695,7 @@ export const se_CreatePullRequestApprovalRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePullRequestApprovalRule"); let body: any; - body = JSON.stringify(se_CreatePullRequestApprovalRuleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -784,7 +708,7 @@ export const se_CreateRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRepository"); let body: any; - body = JSON.stringify(se_CreateRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -810,7 +734,7 @@ export const se_DeleteApprovalRuleTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApprovalRuleTemplate"); let body: any; - body = JSON.stringify(se_DeleteApprovalRuleTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -823,7 +747,7 @@ export const se_DeleteBranchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBranch"); let body: any; - body = JSON.stringify(se_DeleteBranchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -836,7 +760,7 @@ export const se_DeleteCommentContentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCommentContent"); let body: any; - body = JSON.stringify(se_DeleteCommentContentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -849,7 +773,7 @@ export const se_DeleteFileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFile"); let body: any; - body = JSON.stringify(se_DeleteFileInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -862,7 +786,7 @@ export const se_DeletePullRequestApprovalRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePullRequestApprovalRule"); let body: any; - body = JSON.stringify(se_DeletePullRequestApprovalRuleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -875,7 +799,7 @@ export const se_DeleteRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRepository"); let body: any; - body = JSON.stringify(se_DeleteRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -888,7 +812,7 @@ export const se_DescribeMergeConflictsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMergeConflicts"); let body: any; - body = JSON.stringify(se_DescribeMergeConflictsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -901,7 +825,7 @@ export const se_DescribePullRequestEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePullRequestEvents"); let body: any; - body = JSON.stringify(se_DescribePullRequestEventsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -914,7 +838,7 @@ export const se_DisassociateApprovalRuleTemplateFromRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateApprovalRuleTemplateFromRepository"); let body: any; - body = JSON.stringify(se_DisassociateApprovalRuleTemplateFromRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -927,7 +851,7 @@ export const se_EvaluatePullRequestApprovalRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EvaluatePullRequestApprovalRules"); let body: any; - body = JSON.stringify(se_EvaluatePullRequestApprovalRulesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -940,7 +864,7 @@ export const se_GetApprovalRuleTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetApprovalRuleTemplate"); let body: any; - body = JSON.stringify(se_GetApprovalRuleTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -953,7 +877,7 @@ export const se_GetBlobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBlob"); let body: any; - body = JSON.stringify(se_GetBlobInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -966,7 +890,7 @@ export const se_GetBranchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBranch"); let body: any; - body = JSON.stringify(se_GetBranchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -979,7 +903,7 @@ export const se_GetCommentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComment"); let body: any; - body = JSON.stringify(se_GetCommentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -992,7 +916,7 @@ export const se_GetCommentReactionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCommentReactions"); let body: any; - body = JSON.stringify(se_GetCommentReactionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1005,7 +929,7 @@ export const se_GetCommentsForComparedCommitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCommentsForComparedCommit"); let body: any; - body = JSON.stringify(se_GetCommentsForComparedCommitInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1018,7 +942,7 @@ export const se_GetCommentsForPullRequestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCommentsForPullRequest"); let body: any; - body = JSON.stringify(se_GetCommentsForPullRequestInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1031,7 +955,7 @@ export const se_GetCommitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCommit"); let body: any; - body = JSON.stringify(se_GetCommitInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1044,7 +968,7 @@ export const se_GetDifferencesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDifferences"); let body: any; - body = JSON.stringify(se_GetDifferencesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1057,7 +981,7 @@ export const se_GetFileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFile"); let body: any; - body = JSON.stringify(se_GetFileInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1070,7 +994,7 @@ export const se_GetFolderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFolder"); let body: any; - body = JSON.stringify(se_GetFolderInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1083,7 +1007,7 @@ export const se_GetMergeCommitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMergeCommit"); let body: any; - body = JSON.stringify(se_GetMergeCommitInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1096,7 +1020,7 @@ export const se_GetMergeConflictsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMergeConflicts"); let body: any; - body = JSON.stringify(se_GetMergeConflictsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1109,7 +1033,7 @@ export const se_GetMergeOptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMergeOptions"); let body: any; - body = JSON.stringify(se_GetMergeOptionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1122,7 +1046,7 @@ export const se_GetPullRequestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPullRequest"); let body: any; - body = JSON.stringify(se_GetPullRequestInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1135,7 +1059,7 @@ export const se_GetPullRequestApprovalStatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPullRequestApprovalStates"); let body: any; - body = JSON.stringify(se_GetPullRequestApprovalStatesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1148,7 +1072,7 @@ export const se_GetPullRequestOverrideStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPullRequestOverrideState"); let body: any; - body = JSON.stringify(se_GetPullRequestOverrideStateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1161,7 +1085,7 @@ export const se_GetRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepository"); let body: any; - body = JSON.stringify(se_GetRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1174,7 +1098,7 @@ export const se_GetRepositoryTriggersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepositoryTriggers"); let body: any; - body = JSON.stringify(se_GetRepositoryTriggersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1187,7 +1111,7 @@ export const se_ListApprovalRuleTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApprovalRuleTemplates"); let body: any; - body = JSON.stringify(se_ListApprovalRuleTemplatesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1200,7 +1124,7 @@ export const se_ListAssociatedApprovalRuleTemplatesForRepositoryCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssociatedApprovalRuleTemplatesForRepository"); let body: any; - body = JSON.stringify(se_ListAssociatedApprovalRuleTemplatesForRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1213,7 +1137,7 @@ export const se_ListBranchesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBranches"); let body: any; - body = JSON.stringify(se_ListBranchesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1226,7 +1150,7 @@ export const se_ListPullRequestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPullRequests"); let body: any; - body = JSON.stringify(se_ListPullRequestsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1239,7 +1163,7 @@ export const se_ListRepositoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRepositories"); let body: any; - body = JSON.stringify(se_ListRepositoriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1252,7 +1176,7 @@ export const se_ListRepositoriesForApprovalRuleTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRepositoriesForApprovalRuleTemplate"); let body: any; - body = JSON.stringify(se_ListRepositoriesForApprovalRuleTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1265,7 +1189,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1278,7 +1202,7 @@ export const se_MergeBranchesByFastForwardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MergeBranchesByFastForward"); let body: any; - body = JSON.stringify(se_MergeBranchesByFastForwardInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1317,7 +1241,7 @@ export const se_MergePullRequestByFastForwardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MergePullRequestByFastForward"); let body: any; - body = JSON.stringify(se_MergePullRequestByFastForwardInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1356,7 +1280,7 @@ export const se_OverridePullRequestApprovalRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("OverridePullRequestApprovalRules"); let body: any; - body = JSON.stringify(se_OverridePullRequestApprovalRulesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1408,7 +1332,7 @@ export const se_PutCommentReactionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutCommentReaction"); let body: any; - body = JSON.stringify(se_PutCommentReactionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1434,7 +1358,7 @@ export const se_PutRepositoryTriggersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRepositoryTriggers"); let body: any; - body = JSON.stringify(se_PutRepositoryTriggersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1447,7 +1371,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1460,7 +1384,7 @@ export const se_TestRepositoryTriggersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestRepositoryTriggers"); let body: any; - body = JSON.stringify(se_TestRepositoryTriggersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1473,7 +1397,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1486,7 +1410,7 @@ export const se_UpdateApprovalRuleTemplateContentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApprovalRuleTemplateContent"); let body: any; - body = JSON.stringify(se_UpdateApprovalRuleTemplateContentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1499,7 +1423,7 @@ export const se_UpdateApprovalRuleTemplateDescriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApprovalRuleTemplateDescription"); let body: any; - body = JSON.stringify(se_UpdateApprovalRuleTemplateDescriptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1512,7 +1436,7 @@ export const se_UpdateApprovalRuleTemplateNameCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApprovalRuleTemplateName"); let body: any; - body = JSON.stringify(se_UpdateApprovalRuleTemplateNameInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1525,7 +1449,7 @@ export const se_UpdateCommentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateComment"); let body: any; - body = JSON.stringify(se_UpdateCommentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1538,7 +1462,7 @@ export const se_UpdateDefaultBranchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDefaultBranch"); let body: any; - body = JSON.stringify(se_UpdateDefaultBranchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1551,7 +1475,7 @@ export const se_UpdatePullRequestApprovalRuleContentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePullRequestApprovalRuleContent"); let body: any; - body = JSON.stringify(se_UpdatePullRequestApprovalRuleContentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1564,7 +1488,7 @@ export const se_UpdatePullRequestApprovalStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePullRequestApprovalState"); let body: any; - body = JSON.stringify(se_UpdatePullRequestApprovalStateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1577,7 +1501,7 @@ export const se_UpdatePullRequestDescriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePullRequestDescription"); let body: any; - body = JSON.stringify(se_UpdatePullRequestDescriptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1590,7 +1514,7 @@ export const se_UpdatePullRequestStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePullRequestStatus"); let body: any; - body = JSON.stringify(se_UpdatePullRequestStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1603,7 +1527,7 @@ export const se_UpdatePullRequestTitleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePullRequestTitle"); let body: any; - body = JSON.stringify(se_UpdatePullRequestTitleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1616,7 +1540,7 @@ export const se_UpdateRepositoryDescriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRepositoryDescription"); let body: any; - body = JSON.stringify(se_UpdateRepositoryDescriptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1629,7 +1553,7 @@ export const se_UpdateRepositoryNameCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRepositoryName"); let body: any; - body = JSON.stringify(se_UpdateRepositoryNameInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1647,7 +1571,7 @@ export const de_AssociateApprovalRuleTemplateWithRepositoryCommand = async ( const response: AssociateApprovalRuleTemplateWithRepositoryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1701,10 +1625,9 @@ const de_AssociateApprovalRuleTemplateWithRepositoryCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1722,12 +1645,12 @@ export const de_BatchAssociateApprovalRuleTemplateWithRepositoriesCommand = asyn } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchAssociateApprovalRuleTemplateWithRepositoriesOutput(data, context); + contents = _json(data); const response: BatchAssociateApprovalRuleTemplateWithRepositoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1775,10 +1698,9 @@ const de_BatchAssociateApprovalRuleTemplateWithRepositoriesCommandError = async throw await de_RepositoryNamesRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1796,12 +1718,12 @@ export const de_BatchDescribeMergeConflictsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDescribeMergeConflictsOutput(data, context); + contents = _json(data); const response: BatchDescribeMergeConflictsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1882,10 +1804,9 @@ const de_BatchDescribeMergeConflictsCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1903,12 +1824,12 @@ export const de_BatchDisassociateApprovalRuleTemplateFromRepositoriesCommand = a } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput(data, context); + contents = _json(data); const response: BatchDisassociateApprovalRuleTemplateFromRepositoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1956,10 +1877,9 @@ const de_BatchDisassociateApprovalRuleTemplateFromRepositoriesCommandError = asy throw await de_RepositoryNamesRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1977,12 +1897,12 @@ export const de_BatchGetCommitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetCommitsOutput(data, context); + contents = _json(data); const response: BatchGetCommitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2030,10 +1950,9 @@ const de_BatchGetCommitsCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2056,7 +1975,7 @@ export const de_BatchGetRepositoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2098,10 +2017,9 @@ const de_BatchGetRepositoriesCommandError = async ( throw await de_RepositoryNamesRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2124,7 +2042,7 @@ export const de_CreateApprovalRuleTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2163,10 +2081,9 @@ const de_CreateApprovalRuleTemplateCommandError = async ( throw await de_NumberOfRuleTemplatesExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2186,7 +2103,7 @@ export const de_CreateBranchCommand = async ( const response: CreateBranchCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2246,10 +2163,9 @@ const de_CreateBranchCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2267,12 +2183,12 @@ export const de_CreateCommitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCommitOutput(data, context); + contents = _json(data); const response: CreateCommitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2404,10 +2320,9 @@ const de_CreateCommitCommandError = async ( throw await de_SourceFileOrContentRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2430,7 +2345,7 @@ export const de_CreatePullRequestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2523,10 +2438,9 @@ const de_CreatePullRequestCommandError = async ( throw await de_TitleRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2549,7 +2463,7 @@ export const de_CreatePullRequestApprovalRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2612,10 +2526,9 @@ const de_CreatePullRequestApprovalRuleCommandError = async ( throw await de_PullRequestIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2638,7 +2551,7 @@ export const de_CreateRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2698,10 +2611,9 @@ const de_CreateRepositoryCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2719,12 +2631,12 @@ export const de_CreateUnreferencedMergeCommitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUnreferencedMergeCommitOutput(data, context); + contents = _json(data); const response: CreateUnreferencedMergeCommitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2850,10 +2762,9 @@ const de_CreateUnreferencedMergeCommitCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2871,12 +2782,12 @@ export const de_DeleteApprovalRuleTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApprovalRuleTemplateOutput(data, context); + contents = _json(data); const response: DeleteApprovalRuleTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2903,10 +2814,9 @@ const de_DeleteApprovalRuleTemplateCommandError = async ( throw await de_InvalidApprovalRuleTemplateNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2924,12 +2834,12 @@ export const de_DeleteBranchCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBranchOutput(data, context); + contents = _json(data); const response: DeleteBranchCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2980,10 +2890,9 @@ const de_DeleteBranchCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3006,7 +2915,7 @@ export const de_DeleteCommentContentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3036,10 +2945,9 @@ const de_DeleteCommentContentCommandError = async ( throw await de_InvalidCommentIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3057,12 +2965,12 @@ export const de_DeleteFileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFileOutput(data, context); + contents = _json(data); const response: DeleteFileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3146,10 +3054,9 @@ const de_DeleteFileCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3167,12 +3074,12 @@ export const de_DeletePullRequestApprovalRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePullRequestApprovalRuleOutput(data, context); + contents = _json(data); const response: DeletePullRequestApprovalRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3226,10 +3133,9 @@ const de_DeletePullRequestApprovalRuleCommandError = async ( throw await de_PullRequestIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3247,12 +3153,12 @@ export const de_DeleteRepositoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRepositoryOutput(data, context); + contents = _json(data); const response: DeleteRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3291,10 +3197,9 @@ const de_DeleteRepositoryCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3312,12 +3217,12 @@ export const de_DescribeMergeConflictsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMergeConflictsOutput(data, context); + contents = _json(data); const response: DescribeMergeConflictsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3404,10 +3309,9 @@ const de_DescribeMergeConflictsCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3430,7 +3334,7 @@ export const de_DescribePullRequestEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3487,10 +3391,9 @@ const de_DescribePullRequestEventsCommandError = async ( throw await de_PullRequestIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3510,7 +3413,7 @@ export const de_DisassociateApprovalRuleTemplateFromRepositoryCommand = async ( const response: DisassociateApprovalRuleTemplateFromRepositoryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3561,10 +3464,9 @@ const de_DisassociateApprovalRuleTemplateFromRepositoryCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3582,12 +3484,12 @@ export const de_EvaluatePullRequestApprovalRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EvaluatePullRequestApprovalRulesOutput(data, context); + contents = _json(data); const response: EvaluatePullRequestApprovalRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3638,10 +3540,9 @@ const de_EvaluatePullRequestApprovalRulesCommandError = async ( throw await de_RevisionNotCurrentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3664,7 +3565,7 @@ export const de_GetApprovalRuleTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3691,10 +3592,9 @@ const de_GetApprovalRuleTemplateCommandError = async ( throw await de_InvalidApprovalRuleTemplateNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3717,7 +3617,7 @@ export const de_GetBlobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3771,10 +3671,9 @@ const de_GetBlobCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3792,12 +3691,12 @@ export const de_GetBranchCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetBranchOutput(data, context); + contents = _json(data); const response: GetBranchCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3848,10 +3747,9 @@ const de_GetBranchCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3874,7 +3772,7 @@ export const de_GetCommentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3919,10 +3817,9 @@ const de_GetCommentCommandError = async ( throw await de_InvalidCommentIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3940,12 +3837,12 @@ export const de_GetCommentReactionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCommentReactionsOutput(data, context); + contents = _json(data); const response: GetCommentReactionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3984,10 +3881,9 @@ const de_GetCommentReactionsCommandError = async ( throw await de_InvalidReactionUserArnExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4010,7 +3906,7 @@ export const de_GetCommentsForComparedCommitCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4067,10 +3963,9 @@ const de_GetCommentsForComparedCommitCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4093,7 +3988,7 @@ export const de_GetCommentsForPullRequestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4162,10 +4057,9 @@ const de_GetCommentsForPullRequestCommandError = async ( throw await de_RepositoryNotAssociatedWithPullRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4183,12 +4077,12 @@ export const de_GetCommitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCommitOutput(data, context); + contents = _json(data); const response: GetCommitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4239,10 +4133,9 @@ const de_GetCommitCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4260,12 +4153,12 @@ export const de_GetDifferencesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDifferencesOutput(data, context); + contents = _json(data); const response: GetDifferencesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4331,10 +4224,9 @@ const de_GetDifferencesCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4357,7 +4249,7 @@ export const de_GetFileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4417,10 +4309,9 @@ const de_GetFileCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4438,12 +4329,12 @@ export const de_GetFolderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFolderOutput(data, context); + contents = _json(data); const response: GetFolderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4500,10 +4391,9 @@ const de_GetFolderCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4521,12 +4411,12 @@ export const de_GetMergeCommitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMergeCommitOutput(data, context); + contents = _json(data); const response: GetMergeCommitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4583,10 +4473,9 @@ const de_GetMergeCommitCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4604,12 +4493,12 @@ export const de_GetMergeConflictsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMergeConflictsOutput(data, context); + contents = _json(data); const response: GetMergeConflictsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4693,10 +4582,9 @@ const de_GetMergeConflictsCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4714,12 +4602,12 @@ export const de_GetMergeOptionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMergeOptionsOutput(data, context); + contents = _json(data); const response: GetMergeOptionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4785,10 +4673,9 @@ const de_GetMergeOptionsCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4811,7 +4698,7 @@ export const de_GetPullRequestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4853,10 +4740,9 @@ const de_GetPullRequestCommandError = async ( throw await de_PullRequestIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4874,12 +4760,12 @@ export const de_GetPullRequestApprovalStatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPullRequestApprovalStatesOutput(data, context); + contents = _json(data); const response: GetPullRequestApprovalStatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4927,10 +4813,9 @@ const de_GetPullRequestApprovalStatesCommandError = async ( throw await de_RevisionIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4948,12 +4833,12 @@ export const de_GetPullRequestOverrideStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPullRequestOverrideStateOutput(data, context); + contents = _json(data); const response: GetPullRequestOverrideStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5001,10 +4886,9 @@ const de_GetPullRequestOverrideStateCommandError = async ( throw await de_RevisionIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5027,7 +4911,7 @@ export const de_GetRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5069,10 +4953,9 @@ const de_GetRepositoryCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5090,12 +4973,12 @@ export const de_GetRepositoryTriggersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRepositoryTriggersOutput(data, context); + contents = _json(data); const response: GetRepositoryTriggersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5137,10 +5020,9 @@ const de_GetRepositoryTriggersCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5158,12 +5040,12 @@ export const de_ListApprovalRuleTemplatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApprovalRuleTemplatesOutput(data, context); + contents = _json(data); const response: ListApprovalRuleTemplatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5187,10 +5069,9 @@ const de_ListApprovalRuleTemplatesCommandError = async ( throw await de_InvalidMaxResultsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5208,12 +5089,12 @@ export const de_ListAssociatedApprovalRuleTemplatesForRepositoryCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssociatedApprovalRuleTemplatesForRepositoryOutput(data, context); + contents = _json(data); const response: ListAssociatedApprovalRuleTemplatesForRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5261,10 +5142,9 @@ const de_ListAssociatedApprovalRuleTemplatesForRepositoryCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5282,12 +5162,12 @@ export const de_ListBranchesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBranchesOutput(data, context); + contents = _json(data); const response: ListBranchesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5332,10 +5212,9 @@ const de_ListBranchesCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5353,12 +5232,12 @@ export const de_ListPullRequestsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPullRequestsOutput(data, context); + contents = _json(data); const response: ListPullRequestsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5415,10 +5294,9 @@ const de_ListPullRequestsCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5436,12 +5314,12 @@ export const de_ListRepositoriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRepositoriesOutput(data, context); + contents = _json(data); const response: ListRepositoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5468,10 +5346,9 @@ const de_ListRepositoriesCommandError = async ( throw await de_InvalidSortByExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5489,12 +5366,12 @@ export const de_ListRepositoriesForApprovalRuleTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRepositoriesForApprovalRuleTemplateOutput(data, context); + contents = _json(data); const response: ListRepositoriesForApprovalRuleTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5542,10 +5419,9 @@ const de_ListRepositoriesForApprovalRuleTemplateCommandError = async ( throw await de_InvalidMaxResultsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5563,12 +5439,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5598,10 +5474,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceArnRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5619,12 +5494,12 @@ export const de_MergeBranchesByFastForwardCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_MergeBranchesByFastForwardOutput(data, context); + contents = _json(data); const response: MergeBranchesByFastForwardCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5699,10 +5574,9 @@ const de_MergeBranchesByFastForwardCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5720,12 +5594,12 @@ export const de_MergeBranchesBySquashCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_MergeBranchesBySquashOutput(data, context); + contents = _json(data); const response: MergeBranchesBySquashCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5860,10 +5734,9 @@ const de_MergeBranchesBySquashCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5881,12 +5754,12 @@ export const de_MergeBranchesByThreeWayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_MergeBranchesByThreeWayOutput(data, context); + contents = _json(data); const response: MergeBranchesByThreeWayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6021,10 +5894,9 @@ const de_MergeBranchesByThreeWayCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6047,7 +5919,7 @@ export const de_MergePullRequestByFastForwardCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6122,10 +5994,9 @@ const de_MergePullRequestByFastForwardCommandError = async ( throw await de_TipOfSourceReferenceIsDifferentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6148,7 +6019,7 @@ export const de_MergePullRequestBySquashCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6280,10 +6151,9 @@ const de_MergePullRequestBySquashCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6306,7 +6176,7 @@ export const de_MergePullRequestByThreeWayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6438,10 +6308,9 @@ const de_MergePullRequestByThreeWayCommandError = async ( throw await de_TipsDivergenceExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6461,7 +6330,7 @@ export const de_OverridePullRequestApprovalRulesCommand = async ( const response: OverridePullRequestApprovalRulesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6524,10 +6393,9 @@ const de_OverridePullRequestApprovalRulesCommandError = async ( throw await de_RevisionNotCurrentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6550,7 +6418,7 @@ export const de_PostCommentForComparedCommitCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6637,10 +6505,9 @@ const de_PostCommentForComparedCommitCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6663,7 +6530,7 @@ export const de_PostCommentForPullRequestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6762,10 +6629,9 @@ const de_PostCommentForPullRequestCommandError = async ( throw await de_RepositoryNotAssociatedWithPullRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6788,7 +6654,7 @@ export const de_PostCommentReplyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6830,10 +6696,9 @@ const de_PostCommentReplyCommandError = async ( throw await de_InvalidCommentIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6853,7 +6718,7 @@ export const de_PutCommentReactionCommand = async ( const response: PutCommentReactionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6892,10 +6757,9 @@ const de_PutCommentReactionCommandError = async ( throw await de_ReactionValueRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6913,12 +6777,12 @@ export const de_PutFileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutFileOutput(data, context); + contents = _json(data); const response: PutFileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7026,10 +6890,9 @@ const de_PutFileCommandError = async ( throw await de_SameFileContentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7047,12 +6910,12 @@ export const de_PutRepositoryTriggersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRepositoryTriggersOutput(data, context); + contents = _json(data); const response: PutRepositoryTriggersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7133,10 +6996,9 @@ const de_PutRepositoryTriggersCommandError = async ( throw await de_RepositoryTriggersListRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7156,7 +7018,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -7201,10 +7063,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7222,12 +7083,12 @@ export const de_TestRepositoryTriggersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestRepositoryTriggersOutput(data, context); + contents = _json(data); const response: TestRepositoryTriggersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7308,10 +7169,9 @@ const de_TestRepositoryTriggersCommandError = async ( throw await de_RepositoryTriggersListRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7331,7 +7191,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -7376,10 +7236,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7402,7 +7261,7 @@ export const de_UpdateApprovalRuleTemplateContentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7438,10 +7297,9 @@ const de_UpdateApprovalRuleTemplateContentCommandError = async ( throw await de_InvalidRuleContentSha256ExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7464,7 +7322,7 @@ export const de_UpdateApprovalRuleTemplateDescriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7494,10 +7352,9 @@ const de_UpdateApprovalRuleTemplateDescriptionCommandError = async ( throw await de_InvalidApprovalRuleTemplateNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7520,7 +7377,7 @@ export const de_UpdateApprovalRuleTemplateNameCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7550,10 +7407,9 @@ const de_UpdateApprovalRuleTemplateNameCommandError = async ( throw await de_InvalidApprovalRuleTemplateNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7576,7 +7432,7 @@ export const de_UpdateCommentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7615,10 +7471,9 @@ const de_UpdateCommentCommandError = async ( throw await de_InvalidCommentIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7638,7 +7493,7 @@ export const de_UpdateDefaultBranchCommand = async ( const response: UpdateDefaultBranchCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -7689,10 +7544,9 @@ const de_UpdateDefaultBranchCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7715,7 +7569,7 @@ export const de_UpdatePullRequestApprovalRuleContentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7781,10 +7635,9 @@ const de_UpdatePullRequestApprovalRuleContentCommandError = async ( throw await de_PullRequestIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7804,7 +7657,7 @@ export const de_UpdatePullRequestApprovalStateCommand = async ( const response: UpdatePullRequestApprovalStateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -7870,10 +7723,9 @@ const de_UpdatePullRequestApprovalStateCommandError = async ( throw await de_RevisionNotCurrentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7896,7 +7748,7 @@ export const de_UpdatePullRequestDescriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7929,10 +7781,9 @@ const de_UpdatePullRequestDescriptionCommandError = async ( throw await de_PullRequestIdRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7955,7 +7806,7 @@ export const de_UpdatePullRequestStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8006,10 +7857,9 @@ const de_UpdatePullRequestStatusCommandError = async ( throw await de_PullRequestStatusRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8032,7 +7882,7 @@ export const de_UpdatePullRequestTitleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8068,10 +7918,9 @@ const de_UpdatePullRequestTitleCommandError = async ( throw await de_TitleRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8091,7 +7940,7 @@ export const de_UpdateRepositoryDescriptionCommand = async ( const response: UpdateRepositoryDescriptionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8136,10 +7985,9 @@ const de_UpdateRepositoryDescriptionCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8159,7 +8007,7 @@ export const de_UpdateRepositoryNameCommand = async ( const response: UpdateRepositoryNameCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8189,10 +8037,9 @@ const de_UpdateRepositoryNameCommandError = async ( throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8206,7 +8053,7 @@ const de_ActorDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActorDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ActorDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8222,7 +8069,7 @@ const de_ApprovalRuleContentRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleContentRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleContentRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8238,7 +8085,7 @@ const de_ApprovalRuleDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8254,7 +8101,7 @@ const de_ApprovalRuleNameAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleNameAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleNameAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8270,7 +8117,7 @@ const de_ApprovalRuleNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8286,7 +8133,7 @@ const de_ApprovalRuleTemplateContentRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleTemplateContentRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleTemplateContentRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8302,7 +8149,7 @@ const de_ApprovalRuleTemplateDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleTemplateDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleTemplateDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8318,7 +8165,7 @@ const de_ApprovalRuleTemplateInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleTemplateInUseException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleTemplateInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8334,7 +8181,7 @@ const de_ApprovalRuleTemplateNameAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleTemplateNameAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleTemplateNameAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8350,7 +8197,7 @@ const de_ApprovalRuleTemplateNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalRuleTemplateNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalRuleTemplateNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8366,7 +8213,7 @@ const de_ApprovalStateRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalStateRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalStateRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8382,7 +8229,7 @@ const de_AuthorDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AuthorDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new AuthorDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8398,7 +8245,7 @@ const de_BeforeCommitIdAndAfterCommitIdAreSameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BeforeCommitIdAndAfterCommitIdAreSameException(body, context); + const deserialized: any = _json(body); const exception = new BeforeCommitIdAndAfterCommitIdAreSameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8414,7 +8261,7 @@ const de_BlobIdDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BlobIdDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new BlobIdDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8430,7 +8277,7 @@ const de_BlobIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BlobIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new BlobIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8446,7 +8293,7 @@ const de_BranchDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BranchDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new BranchDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8462,7 +8309,7 @@ const de_BranchNameExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BranchNameExistsException(body, context); + const deserialized: any = _json(body); const exception = new BranchNameExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8478,7 +8325,7 @@ const de_BranchNameIsTagNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BranchNameIsTagNameException(body, context); + const deserialized: any = _json(body); const exception = new BranchNameIsTagNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8494,7 +8341,7 @@ const de_BranchNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BranchNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new BranchNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8510,7 +8357,7 @@ const de_CannotDeleteApprovalRuleFromTemplateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CannotDeleteApprovalRuleFromTemplateException(body, context); + const deserialized: any = _json(body); const exception = new CannotDeleteApprovalRuleFromTemplateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8526,7 +8373,7 @@ const de_CannotModifyApprovalRuleFromTemplateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CannotModifyApprovalRuleFromTemplateException(body, context); + const deserialized: any = _json(body); const exception = new CannotModifyApprovalRuleFromTemplateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8542,7 +8389,7 @@ const de_ClientRequestTokenRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClientRequestTokenRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ClientRequestTokenRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8558,7 +8405,7 @@ const de_CommentContentRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommentContentRequiredException(body, context); + const deserialized: any = _json(body); const exception = new CommentContentRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8574,7 +8421,7 @@ const de_CommentContentSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommentContentSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new CommentContentSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8590,7 +8437,7 @@ const de_CommentDeletedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommentDeletedException(body, context); + const deserialized: any = _json(body); const exception = new CommentDeletedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8606,7 +8453,7 @@ const de_CommentDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommentDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new CommentDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8622,7 +8469,7 @@ const de_CommentIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommentIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new CommentIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8638,7 +8485,7 @@ const de_CommentNotCreatedByCallerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommentNotCreatedByCallerException(body, context); + const deserialized: any = _json(body); const exception = new CommentNotCreatedByCallerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8654,7 +8501,7 @@ const de_CommitDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new CommitDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8670,7 +8517,7 @@ const de_CommitIdDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitIdDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new CommitIdDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8686,7 +8533,7 @@ const de_CommitIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new CommitIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8702,7 +8549,7 @@ const de_CommitIdsLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitIdsLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new CommitIdsLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8718,7 +8565,7 @@ const de_CommitIdsListRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitIdsListRequiredException(body, context); + const deserialized: any = _json(body); const exception = new CommitIdsListRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8734,7 +8581,7 @@ const de_CommitMessageLengthExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitMessageLengthExceededException(body, context); + const deserialized: any = _json(body); const exception = new CommitMessageLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8750,7 +8597,7 @@ const de_CommitRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CommitRequiredException(body, context); + const deserialized: any = _json(body); const exception = new CommitRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8766,7 +8613,7 @@ const de_ConcurrentReferenceUpdateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentReferenceUpdateException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentReferenceUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8782,7 +8629,7 @@ const de_DefaultBranchCannotBeDeletedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DefaultBranchCannotBeDeletedException(body, context); + const deserialized: any = _json(body); const exception = new DefaultBranchCannotBeDeletedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8798,7 +8645,7 @@ const de_DirectoryNameConflictsWithFileNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryNameConflictsWithFileNameException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryNameConflictsWithFileNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8814,7 +8661,7 @@ const de_EncryptionIntegrityChecksFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EncryptionIntegrityChecksFailedException(body, context); + const deserialized: any = _json(body); const exception = new EncryptionIntegrityChecksFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8830,7 +8677,7 @@ const de_EncryptionKeyAccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EncryptionKeyAccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new EncryptionKeyAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8846,7 +8693,7 @@ const de_EncryptionKeyDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EncryptionKeyDisabledException(body, context); + const deserialized: any = _json(body); const exception = new EncryptionKeyDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8862,7 +8709,7 @@ const de_EncryptionKeyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EncryptionKeyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EncryptionKeyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8878,7 +8725,7 @@ const de_EncryptionKeyUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EncryptionKeyUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new EncryptionKeyUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8894,7 +8741,7 @@ const de_FileContentAndSourceFileSpecifiedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileContentAndSourceFileSpecifiedException(body, context); + const deserialized: any = _json(body); const exception = new FileContentAndSourceFileSpecifiedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8910,7 +8757,7 @@ const de_FileContentRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileContentRequiredException(body, context); + const deserialized: any = _json(body); const exception = new FileContentRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8926,7 +8773,7 @@ const de_FileContentSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileContentSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new FileContentSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8942,7 +8789,7 @@ const de_FileDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new FileDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8958,7 +8805,7 @@ const de_FileEntryRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileEntryRequiredException(body, context); + const deserialized: any = _json(body); const exception = new FileEntryRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8974,7 +8821,7 @@ const de_FileModeRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileModeRequiredException(body, context); + const deserialized: any = _json(body); const exception = new FileModeRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8990,7 +8837,7 @@ const de_FileNameConflictsWithDirectoryNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileNameConflictsWithDirectoryNameException(body, context); + const deserialized: any = _json(body); const exception = new FileNameConflictsWithDirectoryNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9006,7 +8853,7 @@ const de_FilePathConflictsWithSubmodulePathExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FilePathConflictsWithSubmodulePathException(body, context); + const deserialized: any = _json(body); const exception = new FilePathConflictsWithSubmodulePathException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9022,7 +8869,7 @@ const de_FileTooLargeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileTooLargeException(body, context); + const deserialized: any = _json(body); const exception = new FileTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9038,7 +8885,7 @@ const de_FolderContentSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FolderContentSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new FolderContentSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9054,7 +8901,7 @@ const de_FolderDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FolderDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new FolderDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9070,7 +8917,7 @@ const de_IdempotencyParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotencyParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotencyParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9086,7 +8933,7 @@ const de_InvalidActorArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidActorArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidActorArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9102,7 +8949,7 @@ const de_InvalidApprovalRuleContentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalRuleContentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalRuleContentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9118,7 +8965,7 @@ const de_InvalidApprovalRuleNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalRuleNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalRuleNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9134,7 +8981,7 @@ const de_InvalidApprovalRuleTemplateContentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalRuleTemplateContentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalRuleTemplateContentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9150,7 +8997,7 @@ const de_InvalidApprovalRuleTemplateDescriptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalRuleTemplateDescriptionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalRuleTemplateDescriptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9166,7 +9013,7 @@ const de_InvalidApprovalRuleTemplateNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalRuleTemplateNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalRuleTemplateNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9182,7 +9029,7 @@ const de_InvalidApprovalStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9198,7 +9045,7 @@ const de_InvalidAuthorArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAuthorArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAuthorArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9214,7 +9061,7 @@ const de_InvalidBlobIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidBlobIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidBlobIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9230,7 +9077,7 @@ const de_InvalidBranchNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidBranchNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidBranchNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9246,7 +9093,7 @@ const de_InvalidClientRequestTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidClientRequestTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidClientRequestTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9262,7 +9109,7 @@ const de_InvalidCommentIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCommentIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCommentIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9278,7 +9125,7 @@ const de_InvalidCommitExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCommitException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCommitException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9294,7 +9141,7 @@ const de_InvalidCommitIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCommitIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCommitIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9310,7 +9157,7 @@ const de_InvalidConflictDetailLevelExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidConflictDetailLevelException(body, context); + const deserialized: any = _json(body); const exception = new InvalidConflictDetailLevelException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9326,7 +9173,7 @@ const de_InvalidConflictResolutionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidConflictResolutionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidConflictResolutionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9342,7 +9189,7 @@ const de_InvalidConflictResolutionStrategyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidConflictResolutionStrategyException(body, context); + const deserialized: any = _json(body); const exception = new InvalidConflictResolutionStrategyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9358,7 +9205,7 @@ const de_InvalidContinuationTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidContinuationTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidContinuationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9374,7 +9221,7 @@ const de_InvalidDeletionParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeletionParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeletionParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9390,7 +9237,7 @@ const de_InvalidDescriptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDescriptionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDescriptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9406,7 +9253,7 @@ const de_InvalidDestinationCommitSpecifierExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDestinationCommitSpecifierException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDestinationCommitSpecifierException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9422,7 +9269,7 @@ const de_InvalidEmailExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEmailException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEmailException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9438,7 +9285,7 @@ const de_InvalidFileLocationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFileLocationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFileLocationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9454,7 +9301,7 @@ const de_InvalidFileModeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFileModeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFileModeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9470,7 +9317,7 @@ const de_InvalidFilePositionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilePositionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilePositionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9486,7 +9333,7 @@ const de_InvalidMaxConflictFilesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMaxConflictFilesException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMaxConflictFilesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9502,7 +9349,7 @@ const de_InvalidMaxMergeHunksExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMaxMergeHunksException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMaxMergeHunksException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9518,7 +9365,7 @@ const de_InvalidMaxResultsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMaxResultsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMaxResultsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9534,7 +9381,7 @@ const de_InvalidMergeOptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMergeOptionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMergeOptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9550,7 +9397,7 @@ const de_InvalidOrderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOrderException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOrderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9566,7 +9413,7 @@ const de_InvalidOverrideStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOverrideStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOverrideStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9582,7 +9429,7 @@ const de_InvalidParentCommitIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParentCommitIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParentCommitIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9598,7 +9445,7 @@ const de_InvalidPathExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPathException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPathException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9614,7 +9461,7 @@ const de_InvalidPullRequestEventTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPullRequestEventTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPullRequestEventTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9630,7 +9477,7 @@ const de_InvalidPullRequestIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPullRequestIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPullRequestIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9646,7 +9493,7 @@ const de_InvalidPullRequestStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPullRequestStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPullRequestStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9662,7 +9509,7 @@ const de_InvalidPullRequestStatusUpdateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPullRequestStatusUpdateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPullRequestStatusUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9678,7 +9525,7 @@ const de_InvalidReactionUserArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidReactionUserArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidReactionUserArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9694,7 +9541,7 @@ const de_InvalidReactionValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidReactionValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidReactionValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9710,7 +9557,7 @@ const de_InvalidReferenceNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidReferenceNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidReferenceNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9726,7 +9573,7 @@ const de_InvalidRelativeFileVersionEnumExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRelativeFileVersionEnumException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRelativeFileVersionEnumException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9742,7 +9589,7 @@ const de_InvalidReplacementContentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidReplacementContentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidReplacementContentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9758,7 +9605,7 @@ const de_InvalidReplacementTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidReplacementTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidReplacementTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9774,7 +9621,7 @@ const de_InvalidRepositoryDescriptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryDescriptionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryDescriptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9790,7 +9637,7 @@ const de_InvalidRepositoryNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9806,7 +9653,7 @@ const de_InvalidRepositoryTriggerBranchNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryTriggerBranchNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryTriggerBranchNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9822,7 +9669,7 @@ const de_InvalidRepositoryTriggerCustomDataExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryTriggerCustomDataException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryTriggerCustomDataException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9838,7 +9685,7 @@ const de_InvalidRepositoryTriggerDestinationArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryTriggerDestinationArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryTriggerDestinationArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9854,7 +9701,7 @@ const de_InvalidRepositoryTriggerEventsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryTriggerEventsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryTriggerEventsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9870,7 +9717,7 @@ const de_InvalidRepositoryTriggerNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryTriggerNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryTriggerNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9886,7 +9733,7 @@ const de_InvalidRepositoryTriggerRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRepositoryTriggerRegionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRepositoryTriggerRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9902,7 +9749,7 @@ const de_InvalidResourceArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9918,7 +9765,7 @@ const de_InvalidRevisionIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRevisionIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRevisionIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9934,7 +9781,7 @@ const de_InvalidRuleContentSha256ExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRuleContentSha256Exception(body, context); + const deserialized: any = _json(body); const exception = new InvalidRuleContentSha256Exception({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9950,7 +9797,7 @@ const de_InvalidSortByExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSortByException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSortByException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9966,7 +9813,7 @@ const de_InvalidSourceCommitSpecifierExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSourceCommitSpecifierException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSourceCommitSpecifierException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9982,7 +9829,7 @@ const de_InvalidSystemTagUsageExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSystemTagUsageException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSystemTagUsageException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9998,7 +9845,7 @@ const de_InvalidTagKeysListExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagKeysListException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagKeysListException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10014,7 +9861,7 @@ const de_InvalidTagsMapExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagsMapException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagsMapException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10030,7 +9877,7 @@ const de_InvalidTargetBranchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetBranchException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetBranchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10046,7 +9893,7 @@ const de_InvalidTargetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10062,7 +9909,7 @@ const de_InvalidTargetsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10078,7 +9925,7 @@ const de_InvalidTitleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTitleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTitleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10094,7 +9941,7 @@ const de_ManualMergeRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ManualMergeRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ManualMergeRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10110,7 +9957,7 @@ const de_MaximumBranchesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumBranchesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumBranchesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10126,7 +9973,7 @@ const de_MaximumConflictResolutionEntriesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumConflictResolutionEntriesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumConflictResolutionEntriesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10142,7 +9989,7 @@ const de_MaximumFileContentToLoadExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumFileContentToLoadExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumFileContentToLoadExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10158,7 +10005,7 @@ const de_MaximumFileEntriesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumFileEntriesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumFileEntriesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10174,7 +10021,7 @@ const de_MaximumItemsToCompareExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumItemsToCompareExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumItemsToCompareExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10190,7 +10037,7 @@ const de_MaximumNumberOfApprovalsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumNumberOfApprovalsExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumNumberOfApprovalsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10206,7 +10053,7 @@ const de_MaximumOpenPullRequestsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumOpenPullRequestsExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumOpenPullRequestsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10222,7 +10069,7 @@ const de_MaximumRepositoryNamesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumRepositoryNamesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumRepositoryNamesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10238,7 +10085,7 @@ const de_MaximumRepositoryTriggersExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumRepositoryTriggersExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaximumRepositoryTriggersExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10254,7 +10101,7 @@ const de_MaximumRuleTemplatesAssociatedWithRepositoryExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaximumRuleTemplatesAssociatedWithRepositoryException(body, context); + const deserialized: any = _json(body); const exception = new MaximumRuleTemplatesAssociatedWithRepositoryException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10270,7 +10117,7 @@ const de_MergeOptionRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MergeOptionRequiredException(body, context); + const deserialized: any = _json(body); const exception = new MergeOptionRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10286,7 +10133,7 @@ const de_MultipleConflictResolutionEntriesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MultipleConflictResolutionEntriesException(body, context); + const deserialized: any = _json(body); const exception = new MultipleConflictResolutionEntriesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10302,7 +10149,7 @@ const de_MultipleRepositoriesInPullRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MultipleRepositoriesInPullRequestException(body, context); + const deserialized: any = _json(body); const exception = new MultipleRepositoriesInPullRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10318,7 +10165,7 @@ const de_NameLengthExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NameLengthExceededException(body, context); + const deserialized: any = _json(body); const exception = new NameLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10331,7 +10178,7 @@ const de_NameLengthExceededExceptionRes = async ( */ const de_NoChangeExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoChangeException(body, context); + const deserialized: any = _json(body); const exception = new NoChangeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10347,7 +10194,7 @@ const de_NumberOfRulesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NumberOfRulesExceededException(body, context); + const deserialized: any = _json(body); const exception = new NumberOfRulesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10363,7 +10210,7 @@ const de_NumberOfRuleTemplatesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NumberOfRuleTemplatesExceededException(body, context); + const deserialized: any = _json(body); const exception = new NumberOfRuleTemplatesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10379,7 +10226,7 @@ const de_OverrideAlreadySetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OverrideAlreadySetException(body, context); + const deserialized: any = _json(body); const exception = new OverrideAlreadySetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10395,7 +10242,7 @@ const de_OverrideStatusRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OverrideStatusRequiredException(body, context); + const deserialized: any = _json(body); const exception = new OverrideStatusRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10411,7 +10258,7 @@ const de_ParentCommitDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParentCommitDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ParentCommitDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10427,7 +10274,7 @@ const de_ParentCommitIdOutdatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParentCommitIdOutdatedException(body, context); + const deserialized: any = _json(body); const exception = new ParentCommitIdOutdatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10443,7 +10290,7 @@ const de_ParentCommitIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParentCommitIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ParentCommitIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10459,7 +10306,7 @@ const de_PathDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PathDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new PathDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10475,7 +10322,7 @@ const de_PathRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PathRequiredException(body, context); + const deserialized: any = _json(body); const exception = new PathRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10491,7 +10338,7 @@ const de_PullRequestAlreadyClosedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullRequestAlreadyClosedException(body, context); + const deserialized: any = _json(body); const exception = new PullRequestAlreadyClosedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10507,7 +10354,7 @@ const de_PullRequestApprovalRulesNotSatisfiedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullRequestApprovalRulesNotSatisfiedException(body, context); + const deserialized: any = _json(body); const exception = new PullRequestApprovalRulesNotSatisfiedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10523,7 +10370,7 @@ const de_PullRequestCannotBeApprovedByAuthorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullRequestCannotBeApprovedByAuthorException(body, context); + const deserialized: any = _json(body); const exception = new PullRequestCannotBeApprovedByAuthorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10539,7 +10386,7 @@ const de_PullRequestDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullRequestDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new PullRequestDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10555,7 +10402,7 @@ const de_PullRequestIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullRequestIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new PullRequestIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10571,7 +10418,7 @@ const de_PullRequestStatusRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullRequestStatusRequiredException(body, context); + const deserialized: any = _json(body); const exception = new PullRequestStatusRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10587,7 +10434,7 @@ const de_PutFileEntryConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PutFileEntryConflictException(body, context); + const deserialized: any = _json(body); const exception = new PutFileEntryConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10603,7 +10450,7 @@ const de_ReactionLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReactionLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ReactionLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10619,7 +10466,7 @@ const de_ReactionValueRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReactionValueRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ReactionValueRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10635,7 +10482,7 @@ const de_ReferenceDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReferenceDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ReferenceDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10651,7 +10498,7 @@ const de_ReferenceNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReferenceNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ReferenceNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10667,7 +10514,7 @@ const de_ReferenceTypeNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReferenceTypeNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new ReferenceTypeNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10683,7 +10530,7 @@ const de_ReplacementContentRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplacementContentRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ReplacementContentRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10699,7 +10546,7 @@ const de_ReplacementTypeRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplacementTypeRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ReplacementTypeRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10715,7 +10562,7 @@ const de_RepositoryDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10731,7 +10578,7 @@ const de_RepositoryLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10747,7 +10594,7 @@ const de_RepositoryNameExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNameExistsException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNameExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10763,7 +10610,7 @@ const de_RepositoryNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10779,7 +10626,7 @@ const de_RepositoryNamesRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNamesRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNamesRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10795,7 +10642,7 @@ const de_RepositoryNotAssociatedWithPullRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNotAssociatedWithPullRequestException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNotAssociatedWithPullRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10811,7 +10658,7 @@ const de_RepositoryTriggerBranchNameListRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryTriggerBranchNameListRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryTriggerBranchNameListRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10827,7 +10674,7 @@ const de_RepositoryTriggerDestinationArnRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryTriggerDestinationArnRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryTriggerDestinationArnRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10843,7 +10690,7 @@ const de_RepositoryTriggerEventsListRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryTriggerEventsListRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryTriggerEventsListRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10859,7 +10706,7 @@ const de_RepositoryTriggerNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryTriggerNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryTriggerNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10875,7 +10722,7 @@ const de_RepositoryTriggersListRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryTriggersListRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryTriggersListRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10891,7 +10738,7 @@ const de_ResourceArnRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceArnRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ResourceArnRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10907,7 +10754,7 @@ const de_RestrictedSourceFileExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RestrictedSourceFileException(body, context); + const deserialized: any = _json(body); const exception = new RestrictedSourceFileException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10923,7 +10770,7 @@ const de_RevisionIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RevisionIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RevisionIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10939,7 +10786,7 @@ const de_RevisionNotCurrentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RevisionNotCurrentException(body, context); + const deserialized: any = _json(body); const exception = new RevisionNotCurrentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10955,7 +10802,7 @@ const de_SameFileContentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SameFileContentException(body, context); + const deserialized: any = _json(body); const exception = new SameFileContentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10971,7 +10818,7 @@ const de_SamePathRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SamePathRequestException(body, context); + const deserialized: any = _json(body); const exception = new SamePathRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10987,7 +10834,7 @@ const de_SourceAndDestinationAreSameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SourceAndDestinationAreSameException(body, context); + const deserialized: any = _json(body); const exception = new SourceAndDestinationAreSameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11003,7 +10850,7 @@ const de_SourceFileOrContentRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SourceFileOrContentRequiredException(body, context); + const deserialized: any = _json(body); const exception = new SourceFileOrContentRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11019,7 +10866,7 @@ const de_TagKeysListRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagKeysListRequiredException(body, context); + const deserialized: any = _json(body); const exception = new TagKeysListRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11032,7 +10879,7 @@ const de_TagKeysListRequiredExceptionRes = async ( */ const de_TagPolicyExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagPolicyException(body, context); + const deserialized: any = _json(body); const exception = new TagPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11048,7 +10895,7 @@ const de_TagsMapRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagsMapRequiredException(body, context); + const deserialized: any = _json(body); const exception = new TagsMapRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11064,7 +10911,7 @@ const de_TargetRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetRequiredException(body, context); + const deserialized: any = _json(body); const exception = new TargetRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11080,7 +10927,7 @@ const de_TargetsRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetsRequiredException(body, context); + const deserialized: any = _json(body); const exception = new TargetsRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11096,7 +10943,7 @@ const de_TipOfSourceReferenceIsDifferentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TipOfSourceReferenceIsDifferentException(body, context); + const deserialized: any = _json(body); const exception = new TipOfSourceReferenceIsDifferentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11112,7 +10959,7 @@ const de_TipsDivergenceExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TipsDivergenceExceededException(body, context); + const deserialized: any = _json(body); const exception = new TipsDivergenceExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11128,7 +10975,7 @@ const de_TitleRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TitleRequiredException(body, context); + const deserialized: any = _json(body); const exception = new TitleRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11144,7 +10991,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11152,195 +10999,70 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateApprovalRuleTemplateWithRepositoryInput - */ -const se_AssociateApprovalRuleTemplateWithRepositoryInput = ( - input: AssociateApprovalRuleTemplateWithRepositoryInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_AssociateApprovalRuleTemplateWithRepositoryInput omitted. -/** - * serializeAws_json1_1BatchAssociateApprovalRuleTemplateWithRepositoriesInput - */ -const se_BatchAssociateApprovalRuleTemplateWithRepositoriesInput = ( - input: BatchAssociateApprovalRuleTemplateWithRepositoriesInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - ...(input.repositoryNames != null && { repositoryNames: se_RepositoryNameList(input.repositoryNames, context) }), - }; -}; +// se_BatchAssociateApprovalRuleTemplateWithRepositoriesInput omitted. -/** - * serializeAws_json1_1BatchDescribeMergeConflictsInput - */ -const se_BatchDescribeMergeConflictsInput = (input: BatchDescribeMergeConflictsInput, context: __SerdeContext): any => { - return { - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.filePaths != null && { filePaths: se_FilePaths(input.filePaths, context) }), - ...(input.maxConflictFiles != null && { maxConflictFiles: input.maxConflictFiles }), - ...(input.maxMergeHunks != null && { maxMergeHunks: input.maxMergeHunks }), - ...(input.mergeOption != null && { mergeOption: input.mergeOption }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - }; -}; +// se_BatchDescribeMergeConflictsInput omitted. -/** - * serializeAws_json1_1BatchDisassociateApprovalRuleTemplateFromRepositoriesInput - */ -const se_BatchDisassociateApprovalRuleTemplateFromRepositoriesInput = ( - input: BatchDisassociateApprovalRuleTemplateFromRepositoriesInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - ...(input.repositoryNames != null && { repositoryNames: se_RepositoryNameList(input.repositoryNames, context) }), - }; -}; +// se_BatchDisassociateApprovalRuleTemplateFromRepositoriesInput omitted. -/** - * serializeAws_json1_1BatchGetCommitsInput - */ -const se_BatchGetCommitsInput = (input: BatchGetCommitsInput, context: __SerdeContext): any => { - return { - ...(input.commitIds != null && { commitIds: se_CommitIdsInputList(input.commitIds, context) }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_BatchGetCommitsInput omitted. -/** - * serializeAws_json1_1BatchGetRepositoriesInput - */ -const se_BatchGetRepositoriesInput = (input: BatchGetRepositoriesInput, context: __SerdeContext): any => { - return { - ...(input.repositoryNames != null && { repositoryNames: se_RepositoryNameList(input.repositoryNames, context) }), - }; -}; +// se_BatchGetRepositoriesInput omitted. -/** - * serializeAws_json1_1BranchNameList - */ -const se_BranchNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BranchNameList omitted. -/** - * serializeAws_json1_1CommitIdsInputList - */ -const se_CommitIdsInputList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CommitIdsInputList omitted. /** * serializeAws_json1_1ConflictResolution */ const se_ConflictResolution = (input: ConflictResolution, context: __SerdeContext): any => { - return { - ...(input.deleteFiles != null && { deleteFiles: se_DeleteFileEntries(input.deleteFiles, context) }), - ...(input.replaceContents != null && { replaceContents: se_ReplaceContentEntries(input.replaceContents, context) }), - ...(input.setFileModes != null && { setFileModes: se_SetFileModeEntries(input.setFileModes, context) }), - }; + return take(input, { + deleteFiles: _json, + replaceContents: (_) => se_ReplaceContentEntries(_, context), + setFileModes: _json, + }); }; -/** - * serializeAws_json1_1CreateApprovalRuleTemplateInput - */ -const se_CreateApprovalRuleTemplateInput = (input: CreateApprovalRuleTemplateInput, context: __SerdeContext): any => { - return { - ...(input.approvalRuleTemplateContent != null && { - approvalRuleTemplateContent: input.approvalRuleTemplateContent, - }), - ...(input.approvalRuleTemplateDescription != null && { - approvalRuleTemplateDescription: input.approvalRuleTemplateDescription, - }), - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - }; -}; +// se_CreateApprovalRuleTemplateInput omitted. -/** - * serializeAws_json1_1CreateBranchInput - */ -const se_CreateBranchInput = (input: CreateBranchInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.commitId != null && { commitId: input.commitId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_CreateBranchInput omitted. /** * serializeAws_json1_1CreateCommitInput */ const se_CreateCommitInput = (input: CreateCommitInput, context: __SerdeContext): any => { - return { - ...(input.authorName != null && { authorName: input.authorName }), - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.deleteFiles != null && { deleteFiles: se_DeleteFileEntries(input.deleteFiles, context) }), - ...(input.email != null && { email: input.email }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.parentCommitId != null && { parentCommitId: input.parentCommitId }), - ...(input.putFiles != null && { putFiles: se_PutFileEntries(input.putFiles, context) }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.setFileModes != null && { setFileModes: se_SetFileModeEntries(input.setFileModes, context) }), - }; + return take(input, { + authorName: [], + branchName: [], + commitMessage: [], + deleteFiles: _json, + email: [], + keepEmptyFolders: [], + parentCommitId: [], + putFiles: (_) => se_PutFileEntries(_, context), + repositoryName: [], + setFileModes: _json, + }); }; -/** - * serializeAws_json1_1CreatePullRequestApprovalRuleInput - */ -const se_CreatePullRequestApprovalRuleInput = ( - input: CreatePullRequestApprovalRuleInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleContent != null && { approvalRuleContent: input.approvalRuleContent }), - ...(input.approvalRuleName != null && { approvalRuleName: input.approvalRuleName }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - }; -}; +// se_CreatePullRequestApprovalRuleInput omitted. /** * serializeAws_json1_1CreatePullRequestInput */ const se_CreatePullRequestInput = (input: CreatePullRequestInput, context: __SerdeContext): any => { - return { - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.targets != null && { targets: se_TargetList(input.targets, context) }), - ...(input.title != null && { title: input.title }), - }; + return take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + targets: _json, + title: [], + }); }; -/** - * serializeAws_json1_1CreateRepositoryInput - */ -const se_CreateRepositoryInput = (input: CreateRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.repositoryDescription != null && { repositoryDescription: input.repositoryDescription }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }; -}; +// se_CreateRepositoryInput omitted. /** * serializeAws_json1_1CreateUnreferencedMergeCommitInput @@ -11349,4970 +11071,1374 @@ const se_CreateUnreferencedMergeCommitInput = ( input: CreateUnreferencedMergeCommitInput, context: __SerdeContext ): any => { - return { - ...(input.authorName != null && { authorName: input.authorName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolution != null && { - conflictResolution: se_ConflictResolution(input.conflictResolution, context), - }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.email != null && { email: input.email }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.mergeOption != null && { mergeOption: input.mergeOption }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - }; + return take(input, { + authorName: [], + commitMessage: [], + conflictDetailLevel: [], + conflictResolution: (_) => se_ConflictResolution(_, context), + conflictResolutionStrategy: [], + destinationCommitSpecifier: [], + email: [], + keepEmptyFolders: [], + mergeOption: [], + repositoryName: [], + sourceCommitSpecifier: [], + }); }; -/** - * serializeAws_json1_1DeleteApprovalRuleTemplateInput - */ -const se_DeleteApprovalRuleTemplateInput = (input: DeleteApprovalRuleTemplateInput, context: __SerdeContext): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - }; -}; +// se_DeleteApprovalRuleTemplateInput omitted. -/** - * serializeAws_json1_1DeleteBranchInput - */ -const se_DeleteBranchInput = (input: DeleteBranchInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_DeleteBranchInput omitted. + +// se_DeleteCommentContentInput omitted. + +// se_DeleteFileEntries omitted. + +// se_DeleteFileEntry omitted. + +// se_DeleteFileInput omitted. + +// se_DeletePullRequestApprovalRuleInput omitted. + +// se_DeleteRepositoryInput omitted. + +// se_DescribeMergeConflictsInput omitted. + +// se_DescribePullRequestEventsInput omitted. + +// se_DisassociateApprovalRuleTemplateFromRepositoryInput omitted. + +// se_EvaluatePullRequestApprovalRulesInput omitted. + +// se_FilePaths omitted. + +// se_GetApprovalRuleTemplateInput omitted. + +// se_GetBlobInput omitted. + +// se_GetBranchInput omitted. + +// se_GetCommentInput omitted. + +// se_GetCommentReactionsInput omitted. + +// se_GetCommentsForComparedCommitInput omitted. + +// se_GetCommentsForPullRequestInput omitted. + +// se_GetCommitInput omitted. + +// se_GetDifferencesInput omitted. + +// se_GetFileInput omitted. + +// se_GetFolderInput omitted. + +// se_GetMergeCommitInput omitted. + +// se_GetMergeConflictsInput omitted. + +// se_GetMergeOptionsInput omitted. + +// se_GetPullRequestApprovalStatesInput omitted. + +// se_GetPullRequestInput omitted. + +// se_GetPullRequestOverrideStateInput omitted. + +// se_GetRepositoryInput omitted. + +// se_GetRepositoryTriggersInput omitted. + +// se_ListApprovalRuleTemplatesInput omitted. + +// se_ListAssociatedApprovalRuleTemplatesForRepositoryInput omitted. + +// se_ListBranchesInput omitted. + +// se_ListPullRequestsInput omitted. + +// se_ListRepositoriesForApprovalRuleTemplateInput omitted. + +// se_ListRepositoriesInput omitted. + +// se_ListTagsForResourceInput omitted. + +// se_Location omitted. + +// se_MergeBranchesByFastForwardInput omitted. /** - * serializeAws_json1_1DeleteCommentContentInput + * serializeAws_json1_1MergeBranchesBySquashInput */ -const se_DeleteCommentContentInput = (input: DeleteCommentContentInput, context: __SerdeContext): any => { - return { - ...(input.commentId != null && { commentId: input.commentId }), - }; +const se_MergeBranchesBySquashInput = (input: MergeBranchesBySquashInput, context: __SerdeContext): any => { + return take(input, { + authorName: [], + commitMessage: [], + conflictDetailLevel: [], + conflictResolution: (_) => se_ConflictResolution(_, context), + conflictResolutionStrategy: [], + destinationCommitSpecifier: [], + email: [], + keepEmptyFolders: [], + repositoryName: [], + sourceCommitSpecifier: [], + targetBranch: [], + }); }; /** - * serializeAws_json1_1DeleteFileEntries + * serializeAws_json1_1MergeBranchesByThreeWayInput */ -const se_DeleteFileEntries = (input: DeleteFileEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeleteFileEntry(entry, context); - }); +const se_MergeBranchesByThreeWayInput = (input: MergeBranchesByThreeWayInput, context: __SerdeContext): any => { + return take(input, { + authorName: [], + commitMessage: [], + conflictDetailLevel: [], + conflictResolution: (_) => se_ConflictResolution(_, context), + conflictResolutionStrategy: [], + destinationCommitSpecifier: [], + email: [], + keepEmptyFolders: [], + repositoryName: [], + sourceCommitSpecifier: [], + targetBranch: [], + }); }; +// se_MergePullRequestByFastForwardInput omitted. + /** - * serializeAws_json1_1DeleteFileEntry + * serializeAws_json1_1MergePullRequestBySquashInput */ -const se_DeleteFileEntry = (input: DeleteFileEntry, context: __SerdeContext): any => { - return { - ...(input.filePath != null && { filePath: input.filePath }), - }; +const se_MergePullRequestBySquashInput = (input: MergePullRequestBySquashInput, context: __SerdeContext): any => { + return take(input, { + authorName: [], + commitMessage: [], + conflictDetailLevel: [], + conflictResolution: (_) => se_ConflictResolution(_, context), + conflictResolutionStrategy: [], + email: [], + keepEmptyFolders: [], + pullRequestId: [], + repositoryName: [], + sourceCommitId: [], + }); }; /** - * serializeAws_json1_1DeleteFileInput + * serializeAws_json1_1MergePullRequestByThreeWayInput */ -const se_DeleteFileInput = (input: DeleteFileInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.email != null && { email: input.email }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.name != null && { name: input.name }), - ...(input.parentCommitId != null && { parentCommitId: input.parentCommitId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const se_MergePullRequestByThreeWayInput = (input: MergePullRequestByThreeWayInput, context: __SerdeContext): any => { + return take(input, { + authorName: [], + commitMessage: [], + conflictDetailLevel: [], + conflictResolution: (_) => se_ConflictResolution(_, context), + conflictResolutionStrategy: [], + email: [], + keepEmptyFolders: [], + pullRequestId: [], + repositoryName: [], + sourceCommitId: [], + }); }; +// se_OverridePullRequestApprovalRulesInput omitted. + /** - * serializeAws_json1_1DeletePullRequestApprovalRuleInput + * serializeAws_json1_1PostCommentForComparedCommitInput */ -const se_DeletePullRequestApprovalRuleInput = ( - input: DeletePullRequestApprovalRuleInput, +const se_PostCommentForComparedCommitInput = ( + input: PostCommentForComparedCommitInput, context: __SerdeContext ): any => { - return { - ...(input.approvalRuleName != null && { approvalRuleName: input.approvalRuleName }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - }; + return take(input, { + afterCommitId: [], + beforeCommitId: [], + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + content: [], + location: _json, + repositoryName: [], + }); }; /** - * serializeAws_json1_1DeleteRepositoryInput + * serializeAws_json1_1PostCommentForPullRequestInput */ -const se_DeleteRepositoryInput = (input: DeleteRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const se_PostCommentForPullRequestInput = (input: PostCommentForPullRequestInput, context: __SerdeContext): any => { + return take(input, { + afterCommitId: [], + beforeCommitId: [], + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + content: [], + location: _json, + pullRequestId: [], + repositoryName: [], + }); }; /** - * serializeAws_json1_1DescribeMergeConflictsInput + * serializeAws_json1_1PostCommentReplyInput */ -const se_DescribeMergeConflictsInput = (input: DescribeMergeConflictsInput, context: __SerdeContext): any => { - return { - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.maxMergeHunks != null && { maxMergeHunks: input.maxMergeHunks }), - ...(input.mergeOption != null && { mergeOption: input.mergeOption }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - }; +const se_PostCommentReplyInput = (input: PostCommentReplyInput, context: __SerdeContext): any => { + return take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + content: [], + inReplyTo: [], + }); }; +// se_PutCommentReactionInput omitted. + /** - * serializeAws_json1_1DescribePullRequestEventsInput + * serializeAws_json1_1PutFileEntries */ -const se_DescribePullRequestEventsInput = (input: DescribePullRequestEventsInput, context: __SerdeContext): any => { - return { - ...(input.actorArn != null && { actorArn: input.actorArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.pullRequestEventType != null && { pullRequestEventType: input.pullRequestEventType }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - }; +const se_PutFileEntries = (input: PutFileEntry[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_PutFileEntry(entry, context); + }); }; /** - * serializeAws_json1_1DisassociateApprovalRuleTemplateFromRepositoryInput + * serializeAws_json1_1PutFileEntry */ -const se_DisassociateApprovalRuleTemplateFromRepositoryInput = ( - input: DisassociateApprovalRuleTemplateFromRepositoryInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const se_PutFileEntry = (input: PutFileEntry, context: __SerdeContext): any => { + return take(input, { + fileContent: context.base64Encoder, + fileMode: [], + filePath: [], + sourceFile: _json, + }); }; /** - * serializeAws_json1_1EvaluatePullRequestApprovalRulesInput + * serializeAws_json1_1PutFileInput */ -const se_EvaluatePullRequestApprovalRulesInput = ( - input: EvaluatePullRequestApprovalRulesInput, - context: __SerdeContext -): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }; +const se_PutFileInput = (input: PutFileInput, context: __SerdeContext): any => { + return take(input, { + branchName: [], + commitMessage: [], + email: [], + fileContent: context.base64Encoder, + fileMode: [], + filePath: [], + name: [], + parentCommitId: [], + repositoryName: [], + }); }; +// se_PutRepositoryTriggersInput omitted. + /** - * serializeAws_json1_1FilePaths + * serializeAws_json1_1ReplaceContentEntries */ -const se_FilePaths = (input: string[], context: __SerdeContext): any => { +const se_ReplaceContentEntries = (input: ReplaceContentEntry[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_ReplaceContentEntry(entry, context); }); }; /** - * serializeAws_json1_1GetApprovalRuleTemplateInput + * serializeAws_json1_1ReplaceContentEntry */ -const se_GetApprovalRuleTemplateInput = (input: GetApprovalRuleTemplateInput, context: __SerdeContext): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - }; +const se_ReplaceContentEntry = (input: ReplaceContentEntry, context: __SerdeContext): any => { + return take(input, { + content: context.base64Encoder, + fileMode: [], + filePath: [], + replacementType: [], + }); }; -/** - * serializeAws_json1_1GetBlobInput - */ -const se_GetBlobInput = (input: GetBlobInput, context: __SerdeContext): any => { - return { - ...(input.blobId != null && { blobId: input.blobId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_RepositoryNameList omitted. -/** - * serializeAws_json1_1GetBranchInput - */ -const se_GetBranchInput = (input: GetBranchInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_RepositoryTrigger omitted. -/** - * serializeAws_json1_1GetCommentInput - */ -const se_GetCommentInput = (input: GetCommentInput, context: __SerdeContext): any => { - return { - ...(input.commentId != null && { commentId: input.commentId }), - }; -}; +// se_RepositoryTriggerEventList omitted. -/** - * serializeAws_json1_1GetCommentReactionsInput - */ -const se_GetCommentReactionsInput = (input: GetCommentReactionsInput, context: __SerdeContext): any => { - return { - ...(input.commentId != null && { commentId: input.commentId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.reactionUserArn != null && { reactionUserArn: input.reactionUserArn }), - }; -}; +// se_RepositoryTriggersList omitted. -/** - * serializeAws_json1_1GetCommentsForComparedCommitInput - */ -const se_GetCommentsForComparedCommitInput = ( - input: GetCommentsForComparedCommitInput, - context: __SerdeContext -): any => { - return { - ...(input.afterCommitId != null && { afterCommitId: input.afterCommitId }), - ...(input.beforeCommitId != null && { beforeCommitId: input.beforeCommitId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_SetFileModeEntries omitted. -/** - * serializeAws_json1_1GetCommentsForPullRequestInput - */ -const se_GetCommentsForPullRequestInput = (input: GetCommentsForPullRequestInput, context: __SerdeContext): any => { - return { - ...(input.afterCommitId != null && { afterCommitId: input.afterCommitId }), - ...(input.beforeCommitId != null && { beforeCommitId: input.beforeCommitId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_SetFileModeEntry omitted. -/** - * serializeAws_json1_1GetCommitInput - */ -const se_GetCommitInput = (input: GetCommitInput, context: __SerdeContext): any => { - return { - ...(input.commitId != null && { commitId: input.commitId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_SourceFileSpecifier omitted. -/** - * serializeAws_json1_1GetDifferencesInput - */ -const se_GetDifferencesInput = (input: GetDifferencesInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.afterCommitSpecifier != null && { afterCommitSpecifier: input.afterCommitSpecifier }), - ...(input.afterPath != null && { afterPath: input.afterPath }), - ...(input.beforeCommitSpecifier != null && { beforeCommitSpecifier: input.beforeCommitSpecifier }), - ...(input.beforePath != null && { beforePath: input.beforePath }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_TagKeysList omitted. -/** - * serializeAws_json1_1GetFileInput - */ -const se_GetFileInput = (input: GetFileInput, context: __SerdeContext): any => { - return { - ...(input.commitSpecifier != null && { commitSpecifier: input.commitSpecifier }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_TagResourceInput omitted. -/** - * serializeAws_json1_1GetFolderInput - */ -const se_GetFolderInput = (input: GetFolderInput, context: __SerdeContext): any => { - return { - ...(input.commitSpecifier != null && { commitSpecifier: input.commitSpecifier }), - ...(input.folderPath != null && { folderPath: input.folderPath }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_TagsMap omitted. + +// se_Target omitted. + +// se_TargetList omitted. + +// se_TestRepositoryTriggersInput omitted. + +// se_UntagResourceInput omitted. + +// se_UpdateApprovalRuleTemplateContentInput omitted. + +// se_UpdateApprovalRuleTemplateDescriptionInput omitted. + +// se_UpdateApprovalRuleTemplateNameInput omitted. + +// se_UpdateCommentInput omitted. + +// se_UpdateDefaultBranchInput omitted. + +// se_UpdatePullRequestApprovalRuleContentInput omitted. + +// se_UpdatePullRequestApprovalStateInput omitted. + +// se_UpdatePullRequestDescriptionInput omitted. + +// se_UpdatePullRequestStatusInput omitted. + +// se_UpdatePullRequestTitleInput omitted. + +// se_UpdateRepositoryDescriptionInput omitted. + +// se_UpdateRepositoryNameInput omitted. + +// de_ActorDoesNotExistException omitted. + +// de_Approval omitted. + +// de_ApprovalList omitted. /** - * serializeAws_json1_1GetMergeCommitInput + * deserializeAws_json1_1ApprovalRule */ -const se_GetMergeCommitInput = (input: GetMergeCommitInput, context: __SerdeContext): any => { - return { - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - }; +const de_ApprovalRule = (output: any, context: __SerdeContext): ApprovalRule => { + return take(output, { + approvalRuleContent: __expectString, + approvalRuleId: __expectString, + approvalRuleName: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedUser: __expectString, + originApprovalRuleTemplate: _json, + ruleContentSha256: __expectString, + }) as any; }; +// de_ApprovalRuleContentRequiredException omitted. + +// de_ApprovalRuleDoesNotExistException omitted. + +// de_ApprovalRuleEventMetadata omitted. + +// de_ApprovalRuleNameAlreadyExistsException omitted. + +// de_ApprovalRuleNameRequiredException omitted. + +// de_ApprovalRuleOverriddenEventMetadata omitted. + /** - * serializeAws_json1_1GetMergeConflictsInput + * deserializeAws_json1_1ApprovalRulesList */ -const se_GetMergeConflictsInput = (input: GetMergeConflictsInput, context: __SerdeContext): any => { - return { - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.maxConflictFiles != null && { maxConflictFiles: input.maxConflictFiles }), - ...(input.mergeOption != null && { mergeOption: input.mergeOption }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - }; +const de_ApprovalRulesList = (output: any, context: __SerdeContext): ApprovalRule[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ApprovalRule(entry, context); + }); + return retVal; }; +// de_ApprovalRulesNotSatisfiedList omitted. + +// de_ApprovalRulesSatisfiedList omitted. + /** - * serializeAws_json1_1GetMergeOptionsInput + * deserializeAws_json1_1ApprovalRuleTemplate */ -const se_GetMergeOptionsInput = (input: GetMergeOptionsInput, context: __SerdeContext): any => { - return { - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - }; +const de_ApprovalRuleTemplate = (output: any, context: __SerdeContext): ApprovalRuleTemplate => { + return take(output, { + approvalRuleTemplateContent: __expectString, + approvalRuleTemplateDescription: __expectString, + approvalRuleTemplateId: __expectString, + approvalRuleTemplateName: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedUser: __expectString, + ruleContentSha256: __expectString, + }) as any; }; +// de_ApprovalRuleTemplateContentRequiredException omitted. + +// de_ApprovalRuleTemplateDoesNotExistException omitted. + +// de_ApprovalRuleTemplateInUseException omitted. + +// de_ApprovalRuleTemplateNameAlreadyExistsException omitted. + +// de_ApprovalRuleTemplateNameList omitted. + +// de_ApprovalRuleTemplateNameRequiredException omitted. + +// de_ApprovalStateChangedEventMetadata omitted. + +// de_ApprovalStateRequiredException omitted. + +// de_AuthorDoesNotExistException omitted. + +// de_BatchAssociateApprovalRuleTemplateWithRepositoriesError omitted. + +// de_BatchAssociateApprovalRuleTemplateWithRepositoriesErrorsList omitted. + +// de_BatchAssociateApprovalRuleTemplateWithRepositoriesOutput omitted. + +// de_BatchDescribeMergeConflictsError omitted. + +// de_BatchDescribeMergeConflictsErrors omitted. + +// de_BatchDescribeMergeConflictsOutput omitted. + +// de_BatchDisassociateApprovalRuleTemplateFromRepositoriesError omitted. + +// de_BatchDisassociateApprovalRuleTemplateFromRepositoriesErrorsList omitted. + +// de_BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput omitted. + +// de_BatchGetCommitsError omitted. + +// de_BatchGetCommitsErrorsList omitted. + +// de_BatchGetCommitsOutput omitted. + /** - * serializeAws_json1_1GetPullRequestApprovalStatesInput + * deserializeAws_json1_1BatchGetRepositoriesOutput */ -const se_GetPullRequestApprovalStatesInput = ( - input: GetPullRequestApprovalStatesInput, - context: __SerdeContext -): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }; +const de_BatchGetRepositoriesOutput = (output: any, context: __SerdeContext): BatchGetRepositoriesOutput => { + return take(output, { + repositories: (_: any) => de_RepositoryMetadataList(_, context), + repositoriesNotFound: _json, + }) as any; }; +// de_BeforeCommitIdAndAfterCommitIdAreSameException omitted. + +// de_BlobIdDoesNotExistException omitted. + +// de_BlobIdRequiredException omitted. + +// de_BlobMetadata omitted. + +// de_BranchDoesNotExistException omitted. + +// de_BranchInfo omitted. + +// de_BranchNameExistsException omitted. + +// de_BranchNameIsTagNameException omitted. + +// de_BranchNameList omitted. + +// de_BranchNameRequiredException omitted. + +// de_CallerReactions omitted. + +// de_CannotDeleteApprovalRuleFromTemplateException omitted. + +// de_CannotModifyApprovalRuleFromTemplateException omitted. + +// de_ClientRequestTokenRequiredException omitted. + /** - * serializeAws_json1_1GetPullRequestInput + * deserializeAws_json1_1Comment */ -const se_GetPullRequestInput = (input: GetPullRequestInput, context: __SerdeContext): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - }; +const de_Comment = (output: any, context: __SerdeContext): Comment => { + return take(output, { + authorArn: __expectString, + callerReactions: _json, + clientRequestToken: __expectString, + commentId: __expectString, + content: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deleted: __expectBoolean, + inReplyTo: __expectString, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + reactionCounts: _json, + }) as any; }; +// de_CommentContentRequiredException omitted. + +// de_CommentContentSizeLimitExceededException omitted. + +// de_CommentDeletedException omitted. + +// de_CommentDoesNotExistException omitted. + +// de_CommentIdRequiredException omitted. + +// de_CommentNotCreatedByCallerException omitted. + /** - * serializeAws_json1_1GetPullRequestOverrideStateInput + * deserializeAws_json1_1Comments */ -const se_GetPullRequestOverrideStateInput = (input: GetPullRequestOverrideStateInput, context: __SerdeContext): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }; +const de_Comments = (output: any, context: __SerdeContext): Comment[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Comment(entry, context); + }); + return retVal; }; /** - * serializeAws_json1_1GetRepositoryInput + * deserializeAws_json1_1CommentsForComparedCommit */ -const se_GetRepositoryInput = (input: GetRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const de_CommentsForComparedCommit = (output: any, context: __SerdeContext): CommentsForComparedCommit => { + return take(output, { + afterBlobId: __expectString, + afterCommitId: __expectString, + beforeBlobId: __expectString, + beforeCommitId: __expectString, + comments: (_: any) => de_Comments(_, context), + location: _json, + repositoryName: __expectString, + }) as any; }; /** - * serializeAws_json1_1GetRepositoryTriggersInput + * deserializeAws_json1_1CommentsForComparedCommitData */ -const se_GetRepositoryTriggersInput = (input: GetRepositoryTriggersInput, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const de_CommentsForComparedCommitData = (output: any, context: __SerdeContext): CommentsForComparedCommit[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_CommentsForComparedCommit(entry, context); + }); + return retVal; }; /** - * serializeAws_json1_1ListApprovalRuleTemplatesInput + * deserializeAws_json1_1CommentsForPullRequest */ -const se_ListApprovalRuleTemplatesInput = (input: ListApprovalRuleTemplatesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; +const de_CommentsForPullRequest = (output: any, context: __SerdeContext): CommentsForPullRequest => { + return take(output, { + afterBlobId: __expectString, + afterCommitId: __expectString, + beforeBlobId: __expectString, + beforeCommitId: __expectString, + comments: (_: any) => de_Comments(_, context), + location: _json, + pullRequestId: __expectString, + repositoryName: __expectString, + }) as any; }; /** - * serializeAws_json1_1ListAssociatedApprovalRuleTemplatesForRepositoryInput + * deserializeAws_json1_1CommentsForPullRequestData */ -const se_ListAssociatedApprovalRuleTemplatesForRepositoryInput = ( - input: ListAssociatedApprovalRuleTemplatesForRepositoryInput, - context: __SerdeContext -): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const de_CommentsForPullRequestData = (output: any, context: __SerdeContext): CommentsForPullRequest[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_CommentsForPullRequest(entry, context); + }); + return retVal; }; +// de_Commit omitted. + +// de_CommitDoesNotExistException omitted. + +// de_CommitIdDoesNotExistException omitted. + +// de_CommitIdRequiredException omitted. + +// de_CommitIdsLimitExceededException omitted. + +// de_CommitIdsListRequiredException omitted. + +// de_CommitMessageLengthExceededException omitted. + +// de_CommitObjectsList omitted. + +// de_CommitRequiredException omitted. + +// de_ConcurrentReferenceUpdateException omitted. + +// de_Conflict omitted. + +// de_ConflictMetadata omitted. + +// de_ConflictMetadataList omitted. + +// de_Conflicts omitted. + /** - * serializeAws_json1_1ListBranchesInput + * deserializeAws_json1_1CreateApprovalRuleTemplateOutput */ -const se_ListBranchesInput = (input: ListBranchesInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const de_CreateApprovalRuleTemplateOutput = ( + output: any, + context: __SerdeContext +): CreateApprovalRuleTemplateOutput => { + return take(output, { + approvalRuleTemplate: (_: any) => de_ApprovalRuleTemplate(_, context), + }) as any; }; +// de_CreateCommitOutput omitted. + /** - * serializeAws_json1_1ListPullRequestsInput + * deserializeAws_json1_1CreatePullRequestApprovalRuleOutput */ -const se_ListPullRequestsInput = (input: ListPullRequestsInput, context: __SerdeContext): any => { - return { - ...(input.authorArn != null && { authorArn: input.authorArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.pullRequestStatus != null && { pullRequestStatus: input.pullRequestStatus }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const de_CreatePullRequestApprovalRuleOutput = ( + output: any, + context: __SerdeContext +): CreatePullRequestApprovalRuleOutput => { + return take(output, { + approvalRule: (_: any) => de_ApprovalRule(_, context), + }) as any; }; /** - * serializeAws_json1_1ListRepositoriesForApprovalRuleTemplateInput + * deserializeAws_json1_1CreatePullRequestOutput */ -const se_ListRepositoriesForApprovalRuleTemplateInput = ( - input: ListRepositoriesForApprovalRuleTemplateInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; +const de_CreatePullRequestOutput = (output: any, context: __SerdeContext): CreatePullRequestOutput => { + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; /** - * serializeAws_json1_1ListRepositoriesInput + * deserializeAws_json1_1CreateRepositoryOutput */ -const se_ListRepositoriesInput = (input: ListRepositoriesInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.order != null && { order: input.order }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - }; +const de_CreateRepositoryOutput = (output: any, context: __SerdeContext): CreateRepositoryOutput => { + return take(output, { + repositoryMetadata: (_: any) => de_RepositoryMetadata(_, context), + }) as any; }; +// de_CreateUnreferencedMergeCommitOutput omitted. + +// de_DefaultBranchCannotBeDeletedException omitted. + +// de_DeleteApprovalRuleTemplateOutput omitted. + +// de_DeleteBranchOutput omitted. + /** - * serializeAws_json1_1ListTagsForResourceInput + * deserializeAws_json1_1DeleteCommentContentOutput */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; +const de_DeleteCommentContentOutput = (output: any, context: __SerdeContext): DeleteCommentContentOutput => { + return take(output, { + comment: (_: any) => de_Comment(_, context), + }) as any; }; +// de_DeleteFileOutput omitted. + +// de_DeletePullRequestApprovalRuleOutput omitted. + +// de_DeleteRepositoryOutput omitted. + +// de_DescribeMergeConflictsOutput omitted. + /** - * serializeAws_json1_1Location + * deserializeAws_json1_1DescribePullRequestEventsOutput */ -const se_Location = (input: Location, context: __SerdeContext): any => { - return { - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.filePosition != null && { filePosition: input.filePosition }), - ...(input.relativeFileVersion != null && { relativeFileVersion: input.relativeFileVersion }), - }; +const de_DescribePullRequestEventsOutput = (output: any, context: __SerdeContext): DescribePullRequestEventsOutput => { + return take(output, { + nextToken: __expectString, + pullRequestEvents: (_: any) => de_PullRequestEventList(_, context), + }) as any; }; +// de_Difference omitted. + +// de_DifferenceList omitted. + +// de_DirectoryNameConflictsWithFileNameException omitted. + +// de_EncryptionIntegrityChecksFailedException omitted. + +// de_EncryptionKeyAccessDeniedException omitted. + +// de_EncryptionKeyDisabledException omitted. + +// de_EncryptionKeyNotFoundException omitted. + +// de_EncryptionKeyUnavailableException omitted. + +// de_EvaluatePullRequestApprovalRulesOutput omitted. + +// de_Evaluation omitted. + +// de_File omitted. + +// de_FileContentAndSourceFileSpecifiedException omitted. + +// de_FileContentRequiredException omitted. + +// de_FileContentSizeLimitExceededException omitted. + +// de_FileDoesNotExistException omitted. + +// de_FileEntryRequiredException omitted. + +// de_FileList omitted. + +// de_FileMetadata omitted. + +// de_FileModeRequiredException omitted. + +// de_FileModes omitted. + +// de_FileNameConflictsWithDirectoryNameException omitted. + +// de_FilePathConflictsWithSubmodulePathException omitted. + +// de_FileSizes omitted. + +// de_FilesMetadata omitted. + +// de_FileTooLargeException omitted. + +// de_Folder omitted. + +// de_FolderContentSizeLimitExceededException omitted. + +// de_FolderDoesNotExistException omitted. + +// de_FolderList omitted. + /** - * serializeAws_json1_1MergeBranchesByFastForwardInput + * deserializeAws_json1_1GetApprovalRuleTemplateOutput */ -const se_MergeBranchesByFastForwardInput = (input: MergeBranchesByFastForwardInput, context: __SerdeContext): any => { - return { - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - ...(input.targetBranch != null && { targetBranch: input.targetBranch }), - }; +const de_GetApprovalRuleTemplateOutput = (output: any, context: __SerdeContext): GetApprovalRuleTemplateOutput => { + return take(output, { + approvalRuleTemplate: (_: any) => de_ApprovalRuleTemplate(_, context), + }) as any; }; /** - * serializeAws_json1_1MergeBranchesBySquashInput + * deserializeAws_json1_1GetBlobOutput */ -const se_MergeBranchesBySquashInput = (input: MergeBranchesBySquashInput, context: __SerdeContext): any => { - return { - ...(input.authorName != null && { authorName: input.authorName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolution != null && { - conflictResolution: se_ConflictResolution(input.conflictResolution, context), - }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.email != null && { email: input.email }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - ...(input.targetBranch != null && { targetBranch: input.targetBranch }), - }; +const de_GetBlobOutput = (output: any, context: __SerdeContext): GetBlobOutput => { + return take(output, { + content: context.base64Decoder, + }) as any; }; +// de_GetBranchOutput omitted. + /** - * serializeAws_json1_1MergeBranchesByThreeWayInput + * deserializeAws_json1_1GetCommentOutput */ -const se_MergeBranchesByThreeWayInput = (input: MergeBranchesByThreeWayInput, context: __SerdeContext): any => { - return { - ...(input.authorName != null && { authorName: input.authorName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolution != null && { - conflictResolution: se_ConflictResolution(input.conflictResolution, context), - }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.destinationCommitSpecifier != null && { destinationCommitSpecifier: input.destinationCommitSpecifier }), - ...(input.email != null && { email: input.email }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitSpecifier != null && { sourceCommitSpecifier: input.sourceCommitSpecifier }), - ...(input.targetBranch != null && { targetBranch: input.targetBranch }), - }; +const de_GetCommentOutput = (output: any, context: __SerdeContext): GetCommentOutput => { + return take(output, { + comment: (_: any) => de_Comment(_, context), + }) as any; }; +// de_GetCommentReactionsOutput omitted. + /** - * serializeAws_json1_1MergePullRequestByFastForwardInput + * deserializeAws_json1_1GetCommentsForComparedCommitOutput */ -const se_MergePullRequestByFastForwardInput = ( - input: MergePullRequestByFastForwardInput, +const de_GetCommentsForComparedCommitOutput = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitId != null && { sourceCommitId: input.sourceCommitId }), - }; +): GetCommentsForComparedCommitOutput => { + return take(output, { + commentsForComparedCommitData: (_: any) => de_CommentsForComparedCommitData(_, context), + nextToken: __expectString, + }) as any; }; /** - * serializeAws_json1_1MergePullRequestBySquashInput + * deserializeAws_json1_1GetCommentsForPullRequestOutput */ -const se_MergePullRequestBySquashInput = (input: MergePullRequestBySquashInput, context: __SerdeContext): any => { - return { - ...(input.authorName != null && { authorName: input.authorName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolution != null && { - conflictResolution: se_ConflictResolution(input.conflictResolution, context), - }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.email != null && { email: input.email }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitId != null && { sourceCommitId: input.sourceCommitId }), - }; +const de_GetCommentsForPullRequestOutput = (output: any, context: __SerdeContext): GetCommentsForPullRequestOutput => { + return take(output, { + commentsForPullRequestData: (_: any) => de_CommentsForPullRequestData(_, context), + nextToken: __expectString, + }) as any; }; +// de_GetCommitOutput omitted. + +// de_GetDifferencesOutput omitted. + /** - * serializeAws_json1_1MergePullRequestByThreeWayInput + * deserializeAws_json1_1GetFileOutput */ -const se_MergePullRequestByThreeWayInput = (input: MergePullRequestByThreeWayInput, context: __SerdeContext): any => { - return { - ...(input.authorName != null && { authorName: input.authorName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.conflictDetailLevel != null && { conflictDetailLevel: input.conflictDetailLevel }), - ...(input.conflictResolution != null && { - conflictResolution: se_ConflictResolution(input.conflictResolution, context), - }), - ...(input.conflictResolutionStrategy != null && { conflictResolutionStrategy: input.conflictResolutionStrategy }), - ...(input.email != null && { email: input.email }), - ...(input.keepEmptyFolders != null && { keepEmptyFolders: input.keepEmptyFolders }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceCommitId != null && { sourceCommitId: input.sourceCommitId }), - }; +const de_GetFileOutput = (output: any, context: __SerdeContext): GetFileOutput => { + return take(output, { + blobId: __expectString, + commitId: __expectString, + fileContent: context.base64Decoder, + fileMode: __expectString, + filePath: __expectString, + fileSize: __expectLong, + }) as any; }; -/** - * serializeAws_json1_1OverridePullRequestApprovalRulesInput - */ -const se_OverridePullRequestApprovalRulesInput = ( - input: OverridePullRequestApprovalRulesInput, - context: __SerdeContext -): any => { - return { - ...(input.overrideStatus != null && { overrideStatus: input.overrideStatus }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }; -}; +// de_GetFolderOutput omitted. -/** - * serializeAws_json1_1PostCommentForComparedCommitInput - */ -const se_PostCommentForComparedCommitInput = ( - input: PostCommentForComparedCommitInput, - context: __SerdeContext -): any => { - return { - ...(input.afterCommitId != null && { afterCommitId: input.afterCommitId }), - ...(input.beforeCommitId != null && { beforeCommitId: input.beforeCommitId }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.content != null && { content: input.content }), - ...(input.location != null && { location: se_Location(input.location, context) }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// de_GetMergeCommitOutput omitted. -/** - * serializeAws_json1_1PostCommentForPullRequestInput - */ -const se_PostCommentForPullRequestInput = (input: PostCommentForPullRequestInput, context: __SerdeContext): any => { - return { - ...(input.afterCommitId != null && { afterCommitId: input.afterCommitId }), - ...(input.beforeCommitId != null && { beforeCommitId: input.beforeCommitId }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.content != null && { content: input.content }), - ...(input.location != null && { location: se_Location(input.location, context) }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// de_GetMergeConflictsOutput omitted. -/** - * serializeAws_json1_1PostCommentReplyInput - */ -const se_PostCommentReplyInput = (input: PostCommentReplyInput, context: __SerdeContext): any => { - return { - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.content != null && { content: input.content }), - ...(input.inReplyTo != null && { inReplyTo: input.inReplyTo }), - }; -}; +// de_GetMergeOptionsOutput omitted. -/** - * serializeAws_json1_1PutCommentReactionInput - */ -const se_PutCommentReactionInput = (input: PutCommentReactionInput, context: __SerdeContext): any => { - return { - ...(input.commentId != null && { commentId: input.commentId }), - ...(input.reactionValue != null && { reactionValue: input.reactionValue }), - }; -}; +// de_GetPullRequestApprovalStatesOutput omitted. /** - * serializeAws_json1_1PutFileEntries + * deserializeAws_json1_1GetPullRequestOutput */ -const se_PutFileEntries = (input: PutFileEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutFileEntry(entry, context); - }); +const de_GetPullRequestOutput = (output: any, context: __SerdeContext): GetPullRequestOutput => { + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; -/** - * serializeAws_json1_1PutFileEntry - */ -const se_PutFileEntry = (input: PutFileEntry, context: __SerdeContext): any => { - return { - ...(input.fileContent != null && { fileContent: context.base64Encoder(input.fileContent) }), - ...(input.fileMode != null && { fileMode: input.fileMode }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.sourceFile != null && { sourceFile: se_SourceFileSpecifier(input.sourceFile, context) }), - }; -}; +// de_GetPullRequestOverrideStateOutput omitted. /** - * serializeAws_json1_1PutFileInput + * deserializeAws_json1_1GetRepositoryOutput */ -const se_PutFileInput = (input: PutFileInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.commitMessage != null && { commitMessage: input.commitMessage }), - ...(input.email != null && { email: input.email }), - ...(input.fileContent != null && { fileContent: context.base64Encoder(input.fileContent) }), - ...(input.fileMode != null && { fileMode: input.fileMode }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.name != null && { name: input.name }), - ...(input.parentCommitId != null && { parentCommitId: input.parentCommitId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; +const de_GetRepositoryOutput = (output: any, context: __SerdeContext): GetRepositoryOutput => { + return take(output, { + repositoryMetadata: (_: any) => de_RepositoryMetadata(_, context), + }) as any; }; -/** - * serializeAws_json1_1PutRepositoryTriggersInput - */ -const se_PutRepositoryTriggersInput = (input: PutRepositoryTriggersInput, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.triggers != null && { triggers: se_RepositoryTriggersList(input.triggers, context) }), - }; -}; +// de_GetRepositoryTriggersOutput omitted. -/** - * serializeAws_json1_1ReplaceContentEntries - */ -const se_ReplaceContentEntries = (input: ReplaceContentEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplaceContentEntry(entry, context); - }); -}; +// de_IdempotencyParameterMismatchException omitted. -/** - * serializeAws_json1_1ReplaceContentEntry - */ -const se_ReplaceContentEntry = (input: ReplaceContentEntry, context: __SerdeContext): any => { - return { - ...(input.content != null && { content: context.base64Encoder(input.content) }), - ...(input.fileMode != null && { fileMode: input.fileMode }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.replacementType != null && { replacementType: input.replacementType }), - }; -}; +// de_InvalidActorArnException omitted. -/** - * serializeAws_json1_1RepositoryNameList - */ -const se_RepositoryNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_InvalidApprovalRuleContentException omitted. -/** - * serializeAws_json1_1RepositoryTrigger - */ -const se_RepositoryTrigger = (input: RepositoryTrigger, context: __SerdeContext): any => { - return { - ...(input.branches != null && { branches: se_BranchNameList(input.branches, context) }), - ...(input.customData != null && { customData: input.customData }), - ...(input.destinationArn != null && { destinationArn: input.destinationArn }), - ...(input.events != null && { events: se_RepositoryTriggerEventList(input.events, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// de_InvalidApprovalRuleNameException omitted. -/** - * serializeAws_json1_1RepositoryTriggerEventList - */ -const se_RepositoryTriggerEventList = ( - input: (RepositoryTriggerEventEnum | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_InvalidApprovalRuleTemplateContentException omitted. -/** - * serializeAws_json1_1RepositoryTriggersList - */ -const se_RepositoryTriggersList = (input: RepositoryTrigger[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RepositoryTrigger(entry, context); - }); -}; +// de_InvalidApprovalRuleTemplateDescriptionException omitted. -/** - * serializeAws_json1_1SetFileModeEntries - */ -const se_SetFileModeEntries = (input: SetFileModeEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SetFileModeEntry(entry, context); - }); -}; +// de_InvalidApprovalRuleTemplateNameException omitted. -/** - * serializeAws_json1_1SetFileModeEntry - */ -const se_SetFileModeEntry = (input: SetFileModeEntry, context: __SerdeContext): any => { - return { - ...(input.fileMode != null && { fileMode: input.fileMode }), - ...(input.filePath != null && { filePath: input.filePath }), - }; -}; +// de_InvalidApprovalStateException omitted. -/** - * serializeAws_json1_1SourceFileSpecifier - */ -const se_SourceFileSpecifier = (input: SourceFileSpecifier, context: __SerdeContext): any => { - return { - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.isMove != null && { isMove: input.isMove }), - }; -}; +// de_InvalidAuthorArnException omitted. -/** - * serializeAws_json1_1TagKeysList - */ -const se_TagKeysList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_InvalidBlobIdException omitted. -/** - * serializeAws_json1_1TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }; -}; +// de_InvalidBranchNameException omitted. -/** - * serializeAws_json1_1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// de_InvalidClientRequestTokenException omitted. -/** - * serializeAws_json1_1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.destinationReference != null && { destinationReference: input.destinationReference }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.sourceReference != null && { sourceReference: input.sourceReference }), - }; -}; +// de_InvalidCommentIdException omitted. -/** - * serializeAws_json1_1TargetList - */ -const se_TargetList = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; +// de_InvalidCommitException omitted. -/** - * serializeAws_json1_1TestRepositoryTriggersInput - */ -const se_TestRepositoryTriggersInput = (input: TestRepositoryTriggersInput, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.triggers != null && { triggers: se_RepositoryTriggersList(input.triggers, context) }), - }; -}; +// de_InvalidCommitIdException omitted. -/** - * serializeAws_json1_1UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeysList(input.tagKeys, context) }), - }; -}; +// de_InvalidConflictDetailLevelException omitted. -/** - * serializeAws_json1_1UpdateApprovalRuleTemplateContentInput - */ -const se_UpdateApprovalRuleTemplateContentInput = ( - input: UpdateApprovalRuleTemplateContentInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - ...(input.existingRuleContentSha256 != null && { existingRuleContentSha256: input.existingRuleContentSha256 }), - ...(input.newRuleContent != null && { newRuleContent: input.newRuleContent }), - }; -}; +// de_InvalidConflictResolutionException omitted. -/** - * serializeAws_json1_1UpdateApprovalRuleTemplateDescriptionInput - */ -const se_UpdateApprovalRuleTemplateDescriptionInput = ( - input: UpdateApprovalRuleTemplateDescriptionInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleTemplateDescription != null && { - approvalRuleTemplateDescription: input.approvalRuleTemplateDescription, - }), - ...(input.approvalRuleTemplateName != null && { approvalRuleTemplateName: input.approvalRuleTemplateName }), - }; -}; +// de_InvalidConflictResolutionStrategyException omitted. -/** - * serializeAws_json1_1UpdateApprovalRuleTemplateNameInput - */ -const se_UpdateApprovalRuleTemplateNameInput = ( - input: UpdateApprovalRuleTemplateNameInput, - context: __SerdeContext -): any => { - return { - ...(input.newApprovalRuleTemplateName != null && { - newApprovalRuleTemplateName: input.newApprovalRuleTemplateName, - }), - ...(input.oldApprovalRuleTemplateName != null && { - oldApprovalRuleTemplateName: input.oldApprovalRuleTemplateName, - }), - }; -}; +// de_InvalidContinuationTokenException omitted. -/** - * serializeAws_json1_1UpdateCommentInput - */ -const se_UpdateCommentInput = (input: UpdateCommentInput, context: __SerdeContext): any => { - return { - ...(input.commentId != null && { commentId: input.commentId }), - ...(input.content != null && { content: input.content }), - }; -}; +// de_InvalidDeletionParameterException omitted. -/** - * serializeAws_json1_1UpdateDefaultBranchInput - */ -const se_UpdateDefaultBranchInput = (input: UpdateDefaultBranchInput, context: __SerdeContext): any => { - return { - ...(input.defaultBranchName != null && { defaultBranchName: input.defaultBranchName }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// de_InvalidDescriptionException omitted. -/** - * serializeAws_json1_1UpdatePullRequestApprovalRuleContentInput - */ -const se_UpdatePullRequestApprovalRuleContentInput = ( - input: UpdatePullRequestApprovalRuleContentInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalRuleName != null && { approvalRuleName: input.approvalRuleName }), - ...(input.existingRuleContentSha256 != null && { existingRuleContentSha256: input.existingRuleContentSha256 }), - ...(input.newRuleContent != null && { newRuleContent: input.newRuleContent }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - }; -}; +// de_InvalidDestinationCommitSpecifierException omitted. -/** - * serializeAws_json1_1UpdatePullRequestApprovalStateInput - */ -const se_UpdatePullRequestApprovalStateInput = ( - input: UpdatePullRequestApprovalStateInput, - context: __SerdeContext -): any => { - return { - ...(input.approvalState != null && { approvalState: input.approvalState }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }; -}; +// de_InvalidEmailException omitted. -/** - * serializeAws_json1_1UpdatePullRequestDescriptionInput - */ -const se_UpdatePullRequestDescriptionInput = ( - input: UpdatePullRequestDescriptionInput, - context: __SerdeContext -): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - }; -}; +// de_InvalidFileLocationException omitted. -/** - * serializeAws_json1_1UpdatePullRequestStatusInput - */ -const se_UpdatePullRequestStatusInput = (input: UpdatePullRequestStatusInput, context: __SerdeContext): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.pullRequestStatus != null && { pullRequestStatus: input.pullRequestStatus }), - }; -}; +// de_InvalidFileModeException omitted. -/** - * serializeAws_json1_1UpdatePullRequestTitleInput - */ -const se_UpdatePullRequestTitleInput = (input: UpdatePullRequestTitleInput, context: __SerdeContext): any => { - return { - ...(input.pullRequestId != null && { pullRequestId: input.pullRequestId }), - ...(input.title != null && { title: input.title }), - }; -}; +// de_InvalidFilePositionException omitted. -/** - * serializeAws_json1_1UpdateRepositoryDescriptionInput - */ -const se_UpdateRepositoryDescriptionInput = (input: UpdateRepositoryDescriptionInput, context: __SerdeContext): any => { - return { - ...(input.repositoryDescription != null && { repositoryDescription: input.repositoryDescription }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// de_InvalidMaxConflictFilesException omitted. -/** - * serializeAws_json1_1UpdateRepositoryNameInput - */ -const se_UpdateRepositoryNameInput = (input: UpdateRepositoryNameInput, context: __SerdeContext): any => { - return { - ...(input.newName != null && { newName: input.newName }), - ...(input.oldName != null && { oldName: input.oldName }), - }; -}; +// de_InvalidMaxMergeHunksException omitted. -/** - * deserializeAws_json1_1ActorDoesNotExistException - */ -const de_ActorDoesNotExistException = (output: any, context: __SerdeContext): ActorDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidMaxResultsException omitted. -/** - * deserializeAws_json1_1Approval - */ -const de_Approval = (output: any, context: __SerdeContext): Approval => { - return { - approvalState: __expectString(output.approvalState), - userArn: __expectString(output.userArn), - } as any; -}; +// de_InvalidMergeOptionException omitted. -/** - * deserializeAws_json1_1ApprovalList - */ -const de_ApprovalList = (output: any, context: __SerdeContext): Approval[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Approval(entry, context); - }); - return retVal; -}; +// de_InvalidOrderException omitted. -/** - * deserializeAws_json1_1ApprovalRule - */ -const de_ApprovalRule = (output: any, context: __SerdeContext): ApprovalRule => { - return { - approvalRuleContent: __expectString(output.approvalRuleContent), - approvalRuleId: __expectString(output.approvalRuleId), - approvalRuleName: __expectString(output.approvalRuleName), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - lastModifiedUser: __expectString(output.lastModifiedUser), - originApprovalRuleTemplate: - output.originApprovalRuleTemplate != null - ? de_OriginApprovalRuleTemplate(output.originApprovalRuleTemplate, context) - : undefined, - ruleContentSha256: __expectString(output.ruleContentSha256), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleContentRequiredException - */ -const de_ApprovalRuleContentRequiredException = ( - output: any, - context: __SerdeContext -): ApprovalRuleContentRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleDoesNotExistException - */ -const de_ApprovalRuleDoesNotExistException = ( - output: any, - context: __SerdeContext -): ApprovalRuleDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleEventMetadata - */ -const de_ApprovalRuleEventMetadata = (output: any, context: __SerdeContext): ApprovalRuleEventMetadata => { - return { - approvalRuleContent: __expectString(output.approvalRuleContent), - approvalRuleId: __expectString(output.approvalRuleId), - approvalRuleName: __expectString(output.approvalRuleName), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleNameAlreadyExistsException - */ -const de_ApprovalRuleNameAlreadyExistsException = ( - output: any, - context: __SerdeContext -): ApprovalRuleNameAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleNameRequiredException - */ -const de_ApprovalRuleNameRequiredException = ( - output: any, - context: __SerdeContext -): ApprovalRuleNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleOverriddenEventMetadata - */ -const de_ApprovalRuleOverriddenEventMetadata = ( - output: any, - context: __SerdeContext -): ApprovalRuleOverriddenEventMetadata => { - return { - overrideStatus: __expectString(output.overrideStatus), - revisionId: __expectString(output.revisionId), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRulesList - */ -const de_ApprovalRulesList = (output: any, context: __SerdeContext): ApprovalRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApprovalRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApprovalRulesNotSatisfiedList - */ -const de_ApprovalRulesNotSatisfiedList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApprovalRulesSatisfiedList - */ -const de_ApprovalRulesSatisfiedList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplate - */ -const de_ApprovalRuleTemplate = (output: any, context: __SerdeContext): ApprovalRuleTemplate => { - return { - approvalRuleTemplateContent: __expectString(output.approvalRuleTemplateContent), - approvalRuleTemplateDescription: __expectString(output.approvalRuleTemplateDescription), - approvalRuleTemplateId: __expectString(output.approvalRuleTemplateId), - approvalRuleTemplateName: __expectString(output.approvalRuleTemplateName), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - lastModifiedUser: __expectString(output.lastModifiedUser), - ruleContentSha256: __expectString(output.ruleContentSha256), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplateContentRequiredException - */ -const de_ApprovalRuleTemplateContentRequiredException = ( - output: any, - context: __SerdeContext -): ApprovalRuleTemplateContentRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplateDoesNotExistException - */ -const de_ApprovalRuleTemplateDoesNotExistException = ( - output: any, - context: __SerdeContext -): ApprovalRuleTemplateDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplateInUseException - */ -const de_ApprovalRuleTemplateInUseException = ( - output: any, - context: __SerdeContext -): ApprovalRuleTemplateInUseException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplateNameAlreadyExistsException - */ -const de_ApprovalRuleTemplateNameAlreadyExistsException = ( - output: any, - context: __SerdeContext -): ApprovalRuleTemplateNameAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplateNameList - */ -const de_ApprovalRuleTemplateNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApprovalRuleTemplateNameRequiredException - */ -const de_ApprovalRuleTemplateNameRequiredException = ( - output: any, - context: __SerdeContext -): ApprovalRuleTemplateNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalStateChangedEventMetadata - */ -const de_ApprovalStateChangedEventMetadata = ( - output: any, - context: __SerdeContext -): ApprovalStateChangedEventMetadata => { - return { - approvalStatus: __expectString(output.approvalStatus), - revisionId: __expectString(output.revisionId), - } as any; -}; - -/** - * deserializeAws_json1_1ApprovalStateRequiredException - */ -const de_ApprovalStateRequiredException = (output: any, context: __SerdeContext): ApprovalStateRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AuthorDoesNotExistException - */ -const de_AuthorDoesNotExistException = (output: any, context: __SerdeContext): AuthorDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BatchAssociateApprovalRuleTemplateWithRepositoriesError - */ -const de_BatchAssociateApprovalRuleTemplateWithRepositoriesError = ( - output: any, - context: __SerdeContext -): BatchAssociateApprovalRuleTemplateWithRepositoriesError => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1BatchAssociateApprovalRuleTemplateWithRepositoriesErrorsList - */ -const de_BatchAssociateApprovalRuleTemplateWithRepositoriesErrorsList = ( - output: any, - context: __SerdeContext -): BatchAssociateApprovalRuleTemplateWithRepositoriesError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchAssociateApprovalRuleTemplateWithRepositoriesError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchAssociateApprovalRuleTemplateWithRepositoriesOutput - */ -const de_BatchAssociateApprovalRuleTemplateWithRepositoriesOutput = ( - output: any, - context: __SerdeContext -): BatchAssociateApprovalRuleTemplateWithRepositoriesOutput => { - return { - associatedRepositoryNames: - output.associatedRepositoryNames != null - ? de_RepositoryNameList(output.associatedRepositoryNames, context) - : undefined, - errors: - output.errors != null - ? de_BatchAssociateApprovalRuleTemplateWithRepositoriesErrorsList(output.errors, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDescribeMergeConflictsError - */ -const de_BatchDescribeMergeConflictsError = ( - output: any, - context: __SerdeContext -): BatchDescribeMergeConflictsError => { - return { - exceptionName: __expectString(output.exceptionName), - filePath: __expectString(output.filePath), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDescribeMergeConflictsErrors - */ -const de_BatchDescribeMergeConflictsErrors = ( - output: any, - context: __SerdeContext -): BatchDescribeMergeConflictsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDescribeMergeConflictsError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchDescribeMergeConflictsOutput - */ -const de_BatchDescribeMergeConflictsOutput = ( - output: any, - context: __SerdeContext -): BatchDescribeMergeConflictsOutput => { - return { - baseCommitId: __expectString(output.baseCommitId), - conflicts: output.conflicts != null ? de_Conflicts(output.conflicts, context) : undefined, - destinationCommitId: __expectString(output.destinationCommitId), - errors: output.errors != null ? de_BatchDescribeMergeConflictsErrors(output.errors, context) : undefined, - nextToken: __expectString(output.nextToken), - sourceCommitId: __expectString(output.sourceCommitId), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDisassociateApprovalRuleTemplateFromRepositoriesError - */ -const de_BatchDisassociateApprovalRuleTemplateFromRepositoriesError = ( - output: any, - context: __SerdeContext -): BatchDisassociateApprovalRuleTemplateFromRepositoriesError => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDisassociateApprovalRuleTemplateFromRepositoriesErrorsList - */ -const de_BatchDisassociateApprovalRuleTemplateFromRepositoriesErrorsList = ( - output: any, - context: __SerdeContext -): BatchDisassociateApprovalRuleTemplateFromRepositoriesError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDisassociateApprovalRuleTemplateFromRepositoriesError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput - */ -const de_BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput = ( - output: any, - context: __SerdeContext -): BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput => { - return { - disassociatedRepositoryNames: - output.disassociatedRepositoryNames != null - ? de_RepositoryNameList(output.disassociatedRepositoryNames, context) - : undefined, - errors: - output.errors != null - ? de_BatchDisassociateApprovalRuleTemplateFromRepositoriesErrorsList(output.errors, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetCommitsError - */ -const de_BatchGetCommitsError = (output: any, context: __SerdeContext): BatchGetCommitsError => { - return { - commitId: __expectString(output.commitId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetCommitsErrorsList - */ -const de_BatchGetCommitsErrorsList = (output: any, context: __SerdeContext): BatchGetCommitsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetCommitsError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchGetCommitsOutput - */ -const de_BatchGetCommitsOutput = (output: any, context: __SerdeContext): BatchGetCommitsOutput => { - return { - commits: output.commits != null ? de_CommitObjectsList(output.commits, context) : undefined, - errors: output.errors != null ? de_BatchGetCommitsErrorsList(output.errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetRepositoriesOutput - */ -const de_BatchGetRepositoriesOutput = (output: any, context: __SerdeContext): BatchGetRepositoriesOutput => { - return { - repositories: output.repositories != null ? de_RepositoryMetadataList(output.repositories, context) : undefined, - repositoriesNotFound: - output.repositoriesNotFound != null ? de_RepositoryNotFoundList(output.repositoriesNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BeforeCommitIdAndAfterCommitIdAreSameException - */ -const de_BeforeCommitIdAndAfterCommitIdAreSameException = ( - output: any, - context: __SerdeContext -): BeforeCommitIdAndAfterCommitIdAreSameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BlobIdDoesNotExistException - */ -const de_BlobIdDoesNotExistException = (output: any, context: __SerdeContext): BlobIdDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BlobIdRequiredException - */ -const de_BlobIdRequiredException = (output: any, context: __SerdeContext): BlobIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BlobMetadata - */ -const de_BlobMetadata = (output: any, context: __SerdeContext): BlobMetadata => { - return { - blobId: __expectString(output.blobId), - mode: __expectString(output.mode), - path: __expectString(output.path), - } as any; -}; - -/** - * deserializeAws_json1_1BranchDoesNotExistException - */ -const de_BranchDoesNotExistException = (output: any, context: __SerdeContext): BranchDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BranchInfo - */ -const de_BranchInfo = (output: any, context: __SerdeContext): BranchInfo => { - return { - branchName: __expectString(output.branchName), - commitId: __expectString(output.commitId), - } as any; -}; - -/** - * deserializeAws_json1_1BranchNameExistsException - */ -const de_BranchNameExistsException = (output: any, context: __SerdeContext): BranchNameExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BranchNameIsTagNameException - */ -const de_BranchNameIsTagNameException = (output: any, context: __SerdeContext): BranchNameIsTagNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BranchNameList - */ -const de_BranchNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BranchNameRequiredException - */ -const de_BranchNameRequiredException = (output: any, context: __SerdeContext): BranchNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CallerReactions - */ -const de_CallerReactions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CannotDeleteApprovalRuleFromTemplateException - */ -const de_CannotDeleteApprovalRuleFromTemplateException = ( - output: any, - context: __SerdeContext -): CannotDeleteApprovalRuleFromTemplateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CannotModifyApprovalRuleFromTemplateException - */ -const de_CannotModifyApprovalRuleFromTemplateException = ( - output: any, - context: __SerdeContext -): CannotModifyApprovalRuleFromTemplateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ClientRequestTokenRequiredException - */ -const de_ClientRequestTokenRequiredException = ( - output: any, - context: __SerdeContext -): ClientRequestTokenRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Comment - */ -const de_Comment = (output: any, context: __SerdeContext): Comment => { - return { - authorArn: __expectString(output.authorArn), - callerReactions: output.callerReactions != null ? de_CallerReactions(output.callerReactions, context) : undefined, - clientRequestToken: __expectString(output.clientRequestToken), - commentId: __expectString(output.commentId), - content: __expectString(output.content), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - deleted: __expectBoolean(output.deleted), - inReplyTo: __expectString(output.inReplyTo), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - reactionCounts: output.reactionCounts != null ? de_ReactionCountsMap(output.reactionCounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CommentContentRequiredException - */ -const de_CommentContentRequiredException = (output: any, context: __SerdeContext): CommentContentRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommentContentSizeLimitExceededException - */ -const de_CommentContentSizeLimitExceededException = ( - output: any, - context: __SerdeContext -): CommentContentSizeLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommentDeletedException - */ -const de_CommentDeletedException = (output: any, context: __SerdeContext): CommentDeletedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommentDoesNotExistException - */ -const de_CommentDoesNotExistException = (output: any, context: __SerdeContext): CommentDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommentIdRequiredException - */ -const de_CommentIdRequiredException = (output: any, context: __SerdeContext): CommentIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommentNotCreatedByCallerException - */ -const de_CommentNotCreatedByCallerException = ( - output: any, - context: __SerdeContext -): CommentNotCreatedByCallerException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Comments - */ -const de_Comments = (output: any, context: __SerdeContext): Comment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Comment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CommentsForComparedCommit - */ -const de_CommentsForComparedCommit = (output: any, context: __SerdeContext): CommentsForComparedCommit => { - return { - afterBlobId: __expectString(output.afterBlobId), - afterCommitId: __expectString(output.afterCommitId), - beforeBlobId: __expectString(output.beforeBlobId), - beforeCommitId: __expectString(output.beforeCommitId), - comments: output.comments != null ? de_Comments(output.comments, context) : undefined, - location: output.location != null ? de_Location(output.location, context) : undefined, - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1CommentsForComparedCommitData - */ -const de_CommentsForComparedCommitData = (output: any, context: __SerdeContext): CommentsForComparedCommit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CommentsForComparedCommit(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CommentsForPullRequest - */ -const de_CommentsForPullRequest = (output: any, context: __SerdeContext): CommentsForPullRequest => { - return { - afterBlobId: __expectString(output.afterBlobId), - afterCommitId: __expectString(output.afterCommitId), - beforeBlobId: __expectString(output.beforeBlobId), - beforeCommitId: __expectString(output.beforeCommitId), - comments: output.comments != null ? de_Comments(output.comments, context) : undefined, - location: output.location != null ? de_Location(output.location, context) : undefined, - pullRequestId: __expectString(output.pullRequestId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1CommentsForPullRequestData - */ -const de_CommentsForPullRequestData = (output: any, context: __SerdeContext): CommentsForPullRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CommentsForPullRequest(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Commit - */ -const de_Commit = (output: any, context: __SerdeContext): Commit => { - return { - additionalData: __expectString(output.additionalData), - author: output.author != null ? de_UserInfo(output.author, context) : undefined, - commitId: __expectString(output.commitId), - committer: output.committer != null ? de_UserInfo(output.committer, context) : undefined, - message: __expectString(output.message), - parents: output.parents != null ? de_ParentList(output.parents, context) : undefined, - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1CommitDoesNotExistException - */ -const de_CommitDoesNotExistException = (output: any, context: __SerdeContext): CommitDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommitIdDoesNotExistException - */ -const de_CommitIdDoesNotExistException = (output: any, context: __SerdeContext): CommitIdDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommitIdRequiredException - */ -const de_CommitIdRequiredException = (output: any, context: __SerdeContext): CommitIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommitIdsLimitExceededException - */ -const de_CommitIdsLimitExceededException = (output: any, context: __SerdeContext): CommitIdsLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommitIdsListRequiredException - */ -const de_CommitIdsListRequiredException = (output: any, context: __SerdeContext): CommitIdsListRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommitMessageLengthExceededException - */ -const de_CommitMessageLengthExceededException = ( - output: any, - context: __SerdeContext -): CommitMessageLengthExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CommitObjectsList - */ -const de_CommitObjectsList = (output: any, context: __SerdeContext): Commit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Commit(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CommitRequiredException - */ -const de_CommitRequiredException = (output: any, context: __SerdeContext): CommitRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentReferenceUpdateException - */ -const de_ConcurrentReferenceUpdateException = ( - output: any, - context: __SerdeContext -): ConcurrentReferenceUpdateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Conflict - */ -const de_Conflict = (output: any, context: __SerdeContext): Conflict => { - return { - conflictMetadata: - output.conflictMetadata != null ? de_ConflictMetadata(output.conflictMetadata, context) : undefined, - mergeHunks: output.mergeHunks != null ? de_MergeHunks(output.mergeHunks, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConflictMetadata - */ -const de_ConflictMetadata = (output: any, context: __SerdeContext): ConflictMetadata => { - return { - contentConflict: __expectBoolean(output.contentConflict), - fileModeConflict: __expectBoolean(output.fileModeConflict), - fileModes: output.fileModes != null ? de_FileModes(output.fileModes, context) : undefined, - filePath: __expectString(output.filePath), - fileSizes: output.fileSizes != null ? de_FileSizes(output.fileSizes, context) : undefined, - isBinaryFile: output.isBinaryFile != null ? de_IsBinaryFile(output.isBinaryFile, context) : undefined, - mergeOperations: output.mergeOperations != null ? de_MergeOperations(output.mergeOperations, context) : undefined, - numberOfConflicts: __expectInt32(output.numberOfConflicts), - objectTypeConflict: __expectBoolean(output.objectTypeConflict), - objectTypes: output.objectTypes != null ? de_ObjectTypes(output.objectTypes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConflictMetadataList - */ -const de_ConflictMetadataList = (output: any, context: __SerdeContext): ConflictMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConflictMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Conflicts - */ -const de_Conflicts = (output: any, context: __SerdeContext): Conflict[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Conflict(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateApprovalRuleTemplateOutput - */ -const de_CreateApprovalRuleTemplateOutput = ( - output: any, - context: __SerdeContext -): CreateApprovalRuleTemplateOutput => { - return { - approvalRuleTemplate: - output.approvalRuleTemplate != null ? de_ApprovalRuleTemplate(output.approvalRuleTemplate, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateCommitOutput - */ -const de_CreateCommitOutput = (output: any, context: __SerdeContext): CreateCommitOutput => { - return { - commitId: __expectString(output.commitId), - filesAdded: output.filesAdded != null ? de_FilesMetadata(output.filesAdded, context) : undefined, - filesDeleted: output.filesDeleted != null ? de_FilesMetadata(output.filesDeleted, context) : undefined, - filesUpdated: output.filesUpdated != null ? de_FilesMetadata(output.filesUpdated, context) : undefined, - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePullRequestApprovalRuleOutput - */ -const de_CreatePullRequestApprovalRuleOutput = ( - output: any, - context: __SerdeContext -): CreatePullRequestApprovalRuleOutput => { - return { - approvalRule: output.approvalRule != null ? de_ApprovalRule(output.approvalRule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreatePullRequestOutput - */ -const de_CreatePullRequestOutput = (output: any, context: __SerdeContext): CreatePullRequestOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateRepositoryOutput - */ -const de_CreateRepositoryOutput = (output: any, context: __SerdeContext): CreateRepositoryOutput => { - return { - repositoryMetadata: - output.repositoryMetadata != null ? de_RepositoryMetadata(output.repositoryMetadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateUnreferencedMergeCommitOutput - */ -const de_CreateUnreferencedMergeCommitOutput = ( - output: any, - context: __SerdeContext -): CreateUnreferencedMergeCommitOutput => { - return { - commitId: __expectString(output.commitId), - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1DefaultBranchCannotBeDeletedException - */ -const de_DefaultBranchCannotBeDeletedException = ( - output: any, - context: __SerdeContext -): DefaultBranchCannotBeDeletedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteApprovalRuleTemplateOutput - */ -const de_DeleteApprovalRuleTemplateOutput = ( - output: any, - context: __SerdeContext -): DeleteApprovalRuleTemplateOutput => { - return { - approvalRuleTemplateId: __expectString(output.approvalRuleTemplateId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBranchOutput - */ -const de_DeleteBranchOutput = (output: any, context: __SerdeContext): DeleteBranchOutput => { - return { - deletedBranch: output.deletedBranch != null ? de_BranchInfo(output.deletedBranch, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteCommentContentOutput - */ -const de_DeleteCommentContentOutput = (output: any, context: __SerdeContext): DeleteCommentContentOutput => { - return { - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileOutput - */ -const de_DeleteFileOutput = (output: any, context: __SerdeContext): DeleteFileOutput => { - return { - blobId: __expectString(output.blobId), - commitId: __expectString(output.commitId), - filePath: __expectString(output.filePath), - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1DeletePullRequestApprovalRuleOutput - */ -const de_DeletePullRequestApprovalRuleOutput = ( - output: any, - context: __SerdeContext -): DeletePullRequestApprovalRuleOutput => { - return { - approvalRuleId: __expectString(output.approvalRuleId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRepositoryOutput - */ -const de_DeleteRepositoryOutput = (output: any, context: __SerdeContext): DeleteRepositoryOutput => { - return { - repositoryId: __expectString(output.repositoryId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMergeConflictsOutput - */ -const de_DescribeMergeConflictsOutput = (output: any, context: __SerdeContext): DescribeMergeConflictsOutput => { - return { - baseCommitId: __expectString(output.baseCommitId), - conflictMetadata: - output.conflictMetadata != null ? de_ConflictMetadata(output.conflictMetadata, context) : undefined, - destinationCommitId: __expectString(output.destinationCommitId), - mergeHunks: output.mergeHunks != null ? de_MergeHunks(output.mergeHunks, context) : undefined, - nextToken: __expectString(output.nextToken), - sourceCommitId: __expectString(output.sourceCommitId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePullRequestEventsOutput - */ -const de_DescribePullRequestEventsOutput = (output: any, context: __SerdeContext): DescribePullRequestEventsOutput => { - return { - nextToken: __expectString(output.nextToken), - pullRequestEvents: - output.pullRequestEvents != null ? de_PullRequestEventList(output.pullRequestEvents, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Difference - */ -const de_Difference = (output: any, context: __SerdeContext): Difference => { - return { - afterBlob: output.afterBlob != null ? de_BlobMetadata(output.afterBlob, context) : undefined, - beforeBlob: output.beforeBlob != null ? de_BlobMetadata(output.beforeBlob, context) : undefined, - changeType: __expectString(output.changeType), - } as any; -}; - -/** - * deserializeAws_json1_1DifferenceList - */ -const de_DifferenceList = (output: any, context: __SerdeContext): Difference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Difference(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DirectoryNameConflictsWithFileNameException - */ -const de_DirectoryNameConflictsWithFileNameException = ( - output: any, - context: __SerdeContext -): DirectoryNameConflictsWithFileNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionIntegrityChecksFailedException - */ -const de_EncryptionIntegrityChecksFailedException = ( - output: any, - context: __SerdeContext -): EncryptionIntegrityChecksFailedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionKeyAccessDeniedException - */ -const de_EncryptionKeyAccessDeniedException = ( - output: any, - context: __SerdeContext -): EncryptionKeyAccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionKeyDisabledException - */ -const de_EncryptionKeyDisabledException = (output: any, context: __SerdeContext): EncryptionKeyDisabledException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionKeyNotFoundException - */ -const de_EncryptionKeyNotFoundException = (output: any, context: __SerdeContext): EncryptionKeyNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionKeyUnavailableException - */ -const de_EncryptionKeyUnavailableException = ( - output: any, - context: __SerdeContext -): EncryptionKeyUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EvaluatePullRequestApprovalRulesOutput - */ -const de_EvaluatePullRequestApprovalRulesOutput = ( - output: any, - context: __SerdeContext -): EvaluatePullRequestApprovalRulesOutput => { - return { - evaluation: output.evaluation != null ? de_Evaluation(output.evaluation, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Evaluation - */ -const de_Evaluation = (output: any, context: __SerdeContext): Evaluation => { - return { - approvalRulesNotSatisfied: - output.approvalRulesNotSatisfied != null - ? de_ApprovalRulesNotSatisfiedList(output.approvalRulesNotSatisfied, context) - : undefined, - approvalRulesSatisfied: - output.approvalRulesSatisfied != null - ? de_ApprovalRulesSatisfiedList(output.approvalRulesSatisfied, context) - : undefined, - approved: __expectBoolean(output.approved), - overridden: __expectBoolean(output.overridden), - } as any; -}; - -/** - * deserializeAws_json1_1File - */ -const de_File = (output: any, context: __SerdeContext): File => { - return { - absolutePath: __expectString(output.absolutePath), - blobId: __expectString(output.blobId), - fileMode: __expectString(output.fileMode), - relativePath: __expectString(output.relativePath), - } as any; -}; - -/** - * deserializeAws_json1_1FileContentAndSourceFileSpecifiedException - */ -const de_FileContentAndSourceFileSpecifiedException = ( - output: any, - context: __SerdeContext -): FileContentAndSourceFileSpecifiedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileContentRequiredException - */ -const de_FileContentRequiredException = (output: any, context: __SerdeContext): FileContentRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileContentSizeLimitExceededException - */ -const de_FileContentSizeLimitExceededException = ( - output: any, - context: __SerdeContext -): FileContentSizeLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileDoesNotExistException - */ -const de_FileDoesNotExistException = (output: any, context: __SerdeContext): FileDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileEntryRequiredException - */ -const de_FileEntryRequiredException = (output: any, context: __SerdeContext): FileEntryRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileList - */ -const de_FileList = (output: any, context: __SerdeContext): File[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_File(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FileMetadata - */ -const de_FileMetadata = (output: any, context: __SerdeContext): FileMetadata => { - return { - absolutePath: __expectString(output.absolutePath), - blobId: __expectString(output.blobId), - fileMode: __expectString(output.fileMode), - } as any; -}; - -/** - * deserializeAws_json1_1FileModeRequiredException - */ -const de_FileModeRequiredException = (output: any, context: __SerdeContext): FileModeRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileModes - */ -const de_FileModes = (output: any, context: __SerdeContext): FileModes => { - return { - base: __expectString(output.base), - destination: __expectString(output.destination), - source: __expectString(output.source), - } as any; -}; - -/** - * deserializeAws_json1_1FileNameConflictsWithDirectoryNameException - */ -const de_FileNameConflictsWithDirectoryNameException = ( - output: any, - context: __SerdeContext -): FileNameConflictsWithDirectoryNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FilePathConflictsWithSubmodulePathException - */ -const de_FilePathConflictsWithSubmodulePathException = ( - output: any, - context: __SerdeContext -): FilePathConflictsWithSubmodulePathException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FileSizes - */ -const de_FileSizes = (output: any, context: __SerdeContext): FileSizes => { - return { - base: __expectLong(output.base), - destination: __expectLong(output.destination), - source: __expectLong(output.source), - } as any; -}; - -/** - * deserializeAws_json1_1FilesMetadata - */ -const de_FilesMetadata = (output: any, context: __SerdeContext): FileMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FileTooLargeException - */ -const de_FileTooLargeException = (output: any, context: __SerdeContext): FileTooLargeException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Folder - */ -const de_Folder = (output: any, context: __SerdeContext): Folder => { - return { - absolutePath: __expectString(output.absolutePath), - relativePath: __expectString(output.relativePath), - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1FolderContentSizeLimitExceededException - */ -const de_FolderContentSizeLimitExceededException = ( - output: any, - context: __SerdeContext -): FolderContentSizeLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FolderDoesNotExistException - */ -const de_FolderDoesNotExistException = (output: any, context: __SerdeContext): FolderDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1FolderList - */ -const de_FolderList = (output: any, context: __SerdeContext): Folder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Folder(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetApprovalRuleTemplateOutput - */ -const de_GetApprovalRuleTemplateOutput = (output: any, context: __SerdeContext): GetApprovalRuleTemplateOutput => { - return { - approvalRuleTemplate: - output.approvalRuleTemplate != null ? de_ApprovalRuleTemplate(output.approvalRuleTemplate, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetBlobOutput - */ -const de_GetBlobOutput = (output: any, context: __SerdeContext): GetBlobOutput => { - return { - content: output.content != null ? context.base64Decoder(output.content) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetBranchOutput - */ -const de_GetBranchOutput = (output: any, context: __SerdeContext): GetBranchOutput => { - return { - branch: output.branch != null ? de_BranchInfo(output.branch, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetCommentOutput - */ -const de_GetCommentOutput = (output: any, context: __SerdeContext): GetCommentOutput => { - return { - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetCommentReactionsOutput - */ -const de_GetCommentReactionsOutput = (output: any, context: __SerdeContext): GetCommentReactionsOutput => { - return { - nextToken: __expectString(output.nextToken), - reactionsForComment: - output.reactionsForComment != null ? de_ReactionsForCommentList(output.reactionsForComment, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetCommentsForComparedCommitOutput - */ -const de_GetCommentsForComparedCommitOutput = ( - output: any, - context: __SerdeContext -): GetCommentsForComparedCommitOutput => { - return { - commentsForComparedCommitData: - output.commentsForComparedCommitData != null - ? de_CommentsForComparedCommitData(output.commentsForComparedCommitData, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetCommentsForPullRequestOutput - */ -const de_GetCommentsForPullRequestOutput = (output: any, context: __SerdeContext): GetCommentsForPullRequestOutput => { - return { - commentsForPullRequestData: - output.commentsForPullRequestData != null - ? de_CommentsForPullRequestData(output.commentsForPullRequestData, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetCommitOutput - */ -const de_GetCommitOutput = (output: any, context: __SerdeContext): GetCommitOutput => { - return { - commit: output.commit != null ? de_Commit(output.commit, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDifferencesOutput - */ -const de_GetDifferencesOutput = (output: any, context: __SerdeContext): GetDifferencesOutput => { - return { - NextToken: __expectString(output.NextToken), - differences: output.differences != null ? de_DifferenceList(output.differences, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetFileOutput - */ -const de_GetFileOutput = (output: any, context: __SerdeContext): GetFileOutput => { - return { - blobId: __expectString(output.blobId), - commitId: __expectString(output.commitId), - fileContent: output.fileContent != null ? context.base64Decoder(output.fileContent) : undefined, - fileMode: __expectString(output.fileMode), - filePath: __expectString(output.filePath), - fileSize: __expectLong(output.fileSize), - } as any; -}; - -/** - * deserializeAws_json1_1GetFolderOutput - */ -const de_GetFolderOutput = (output: any, context: __SerdeContext): GetFolderOutput => { - return { - commitId: __expectString(output.commitId), - files: output.files != null ? de_FileList(output.files, context) : undefined, - folderPath: __expectString(output.folderPath), - subFolders: output.subFolders != null ? de_FolderList(output.subFolders, context) : undefined, - subModules: output.subModules != null ? de_SubModuleList(output.subModules, context) : undefined, - symbolicLinks: output.symbolicLinks != null ? de_SymbolicLinkList(output.symbolicLinks, context) : undefined, - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMergeCommitOutput - */ -const de_GetMergeCommitOutput = (output: any, context: __SerdeContext): GetMergeCommitOutput => { - return { - baseCommitId: __expectString(output.baseCommitId), - destinationCommitId: __expectString(output.destinationCommitId), - mergedCommitId: __expectString(output.mergedCommitId), - sourceCommitId: __expectString(output.sourceCommitId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMergeConflictsOutput - */ -const de_GetMergeConflictsOutput = (output: any, context: __SerdeContext): GetMergeConflictsOutput => { - return { - baseCommitId: __expectString(output.baseCommitId), - conflictMetadataList: - output.conflictMetadataList != null ? de_ConflictMetadataList(output.conflictMetadataList, context) : undefined, - destinationCommitId: __expectString(output.destinationCommitId), - mergeable: __expectBoolean(output.mergeable), - nextToken: __expectString(output.nextToken), - sourceCommitId: __expectString(output.sourceCommitId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMergeOptionsOutput - */ -const de_GetMergeOptionsOutput = (output: any, context: __SerdeContext): GetMergeOptionsOutput => { - return { - baseCommitId: __expectString(output.baseCommitId), - destinationCommitId: __expectString(output.destinationCommitId), - mergeOptions: output.mergeOptions != null ? de_MergeOptions(output.mergeOptions, context) : undefined, - sourceCommitId: __expectString(output.sourceCommitId), - } as any; -}; - -/** - * deserializeAws_json1_1GetPullRequestApprovalStatesOutput - */ -const de_GetPullRequestApprovalStatesOutput = ( - output: any, - context: __SerdeContext -): GetPullRequestApprovalStatesOutput => { - return { - approvals: output.approvals != null ? de_ApprovalList(output.approvals, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPullRequestOutput - */ -const de_GetPullRequestOutput = (output: any, context: __SerdeContext): GetPullRequestOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPullRequestOverrideStateOutput - */ -const de_GetPullRequestOverrideStateOutput = ( - output: any, - context: __SerdeContext -): GetPullRequestOverrideStateOutput => { - return { - overridden: __expectBoolean(output.overridden), - overrider: __expectString(output.overrider), - } as any; -}; - -/** - * deserializeAws_json1_1GetRepositoryOutput - */ -const de_GetRepositoryOutput = (output: any, context: __SerdeContext): GetRepositoryOutput => { - return { - repositoryMetadata: - output.repositoryMetadata != null ? de_RepositoryMetadata(output.repositoryMetadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRepositoryTriggersOutput - */ -const de_GetRepositoryTriggersOutput = (output: any, context: __SerdeContext): GetRepositoryTriggersOutput => { - return { - configurationId: __expectString(output.configurationId), - triggers: output.triggers != null ? de_RepositoryTriggersList(output.triggers, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1IdempotencyParameterMismatchException - */ -const de_IdempotencyParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotencyParameterMismatchException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidActorArnException - */ -const de_InvalidActorArnException = (output: any, context: __SerdeContext): InvalidActorArnException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApprovalRuleContentException - */ -const de_InvalidApprovalRuleContentException = ( - output: any, - context: __SerdeContext -): InvalidApprovalRuleContentException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApprovalRuleNameException - */ -const de_InvalidApprovalRuleNameException = ( - output: any, - context: __SerdeContext -): InvalidApprovalRuleNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApprovalRuleTemplateContentException - */ -const de_InvalidApprovalRuleTemplateContentException = ( - output: any, - context: __SerdeContext -): InvalidApprovalRuleTemplateContentException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApprovalRuleTemplateDescriptionException - */ -const de_InvalidApprovalRuleTemplateDescriptionException = ( - output: any, - context: __SerdeContext -): InvalidApprovalRuleTemplateDescriptionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApprovalRuleTemplateNameException - */ -const de_InvalidApprovalRuleTemplateNameException = ( - output: any, - context: __SerdeContext -): InvalidApprovalRuleTemplateNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApprovalStateException - */ -const de_InvalidApprovalStateException = (output: any, context: __SerdeContext): InvalidApprovalStateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidAuthorArnException - */ -const de_InvalidAuthorArnException = (output: any, context: __SerdeContext): InvalidAuthorArnException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidBlobIdException - */ -const de_InvalidBlobIdException = (output: any, context: __SerdeContext): InvalidBlobIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidBranchNameException - */ -const de_InvalidBranchNameException = (output: any, context: __SerdeContext): InvalidBranchNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidClientRequestTokenException - */ -const de_InvalidClientRequestTokenException = ( - output: any, - context: __SerdeContext -): InvalidClientRequestTokenException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCommentIdException - */ -const de_InvalidCommentIdException = (output: any, context: __SerdeContext): InvalidCommentIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCommitException - */ -const de_InvalidCommitException = (output: any, context: __SerdeContext): InvalidCommitException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCommitIdException - */ -const de_InvalidCommitIdException = (output: any, context: __SerdeContext): InvalidCommitIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidConflictDetailLevelException - */ -const de_InvalidConflictDetailLevelException = ( - output: any, - context: __SerdeContext -): InvalidConflictDetailLevelException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidConflictResolutionException - */ -const de_InvalidConflictResolutionException = ( - output: any, - context: __SerdeContext -): InvalidConflictResolutionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidConflictResolutionStrategyException - */ -const de_InvalidConflictResolutionStrategyException = ( - output: any, - context: __SerdeContext -): InvalidConflictResolutionStrategyException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidContinuationTokenException - */ -const de_InvalidContinuationTokenException = ( - output: any, - context: __SerdeContext -): InvalidContinuationTokenException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidDeletionParameterException - */ -const de_InvalidDeletionParameterException = ( - output: any, - context: __SerdeContext -): InvalidDeletionParameterException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidDescriptionException - */ -const de_InvalidDescriptionException = (output: any, context: __SerdeContext): InvalidDescriptionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidDestinationCommitSpecifierException - */ -const de_InvalidDestinationCommitSpecifierException = ( - output: any, - context: __SerdeContext -): InvalidDestinationCommitSpecifierException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidEmailException - */ -const de_InvalidEmailException = (output: any, context: __SerdeContext): InvalidEmailException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidFileLocationException - */ -const de_InvalidFileLocationException = (output: any, context: __SerdeContext): InvalidFileLocationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidFileModeException - */ -const de_InvalidFileModeException = (output: any, context: __SerdeContext): InvalidFileModeException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidFilePositionException - */ -const de_InvalidFilePositionException = (output: any, context: __SerdeContext): InvalidFilePositionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidMaxConflictFilesException - */ -const de_InvalidMaxConflictFilesException = ( - output: any, - context: __SerdeContext -): InvalidMaxConflictFilesException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidMaxMergeHunksException - */ -const de_InvalidMaxMergeHunksException = (output: any, context: __SerdeContext): InvalidMaxMergeHunksException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidMaxResultsException - */ -const de_InvalidMaxResultsException = (output: any, context: __SerdeContext): InvalidMaxResultsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidMergeOptionException - */ -const de_InvalidMergeOptionException = (output: any, context: __SerdeContext): InvalidMergeOptionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidOrderException - */ -const de_InvalidOrderException = (output: any, context: __SerdeContext): InvalidOrderException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidOverrideStatusException - */ -const de_InvalidOverrideStatusException = (output: any, context: __SerdeContext): InvalidOverrideStatusException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParentCommitIdException - */ -const de_InvalidParentCommitIdException = (output: any, context: __SerdeContext): InvalidParentCommitIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidPathException - */ -const de_InvalidPathException = (output: any, context: __SerdeContext): InvalidPathException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidPullRequestEventTypeException - */ -const de_InvalidPullRequestEventTypeException = ( - output: any, - context: __SerdeContext -): InvalidPullRequestEventTypeException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidPullRequestIdException - */ -const de_InvalidPullRequestIdException = (output: any, context: __SerdeContext): InvalidPullRequestIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidPullRequestStatusException - */ -const de_InvalidPullRequestStatusException = ( - output: any, - context: __SerdeContext -): InvalidPullRequestStatusException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidPullRequestStatusUpdateException - */ -const de_InvalidPullRequestStatusUpdateException = ( - output: any, - context: __SerdeContext -): InvalidPullRequestStatusUpdateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidReactionUserArnException - */ -const de_InvalidReactionUserArnException = (output: any, context: __SerdeContext): InvalidReactionUserArnException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidReactionValueException - */ -const de_InvalidReactionValueException = (output: any, context: __SerdeContext): InvalidReactionValueException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidReferenceNameException - */ -const de_InvalidReferenceNameException = (output: any, context: __SerdeContext): InvalidReferenceNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRelativeFileVersionEnumException - */ -const de_InvalidRelativeFileVersionEnumException = ( - output: any, - context: __SerdeContext -): InvalidRelativeFileVersionEnumException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidReplacementContentException - */ -const de_InvalidReplacementContentException = ( - output: any, - context: __SerdeContext -): InvalidReplacementContentException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidReplacementTypeException - */ -const de_InvalidReplacementTypeException = (output: any, context: __SerdeContext): InvalidReplacementTypeException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryDescriptionException - */ -const de_InvalidRepositoryDescriptionException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryDescriptionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryNameException - */ -const de_InvalidRepositoryNameException = (output: any, context: __SerdeContext): InvalidRepositoryNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryTriggerBranchNameException - */ -const de_InvalidRepositoryTriggerBranchNameException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryTriggerBranchNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryTriggerCustomDataException - */ -const de_InvalidRepositoryTriggerCustomDataException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryTriggerCustomDataException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryTriggerDestinationArnException - */ -const de_InvalidRepositoryTriggerDestinationArnException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryTriggerDestinationArnException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryTriggerEventsException - */ -const de_InvalidRepositoryTriggerEventsException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryTriggerEventsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryTriggerNameException - */ -const de_InvalidRepositoryTriggerNameException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryTriggerNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRepositoryTriggerRegionException - */ -const de_InvalidRepositoryTriggerRegionException = ( - output: any, - context: __SerdeContext -): InvalidRepositoryTriggerRegionException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidResourceArnException - */ -const de_InvalidResourceArnException = (output: any, context: __SerdeContext): InvalidResourceArnException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRevisionIdException - */ -const de_InvalidRevisionIdException = (output: any, context: __SerdeContext): InvalidRevisionIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRuleContentSha256Exception - */ -const de_InvalidRuleContentSha256Exception = ( - output: any, - context: __SerdeContext -): InvalidRuleContentSha256Exception => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidSortByException - */ -const de_InvalidSortByException = (output: any, context: __SerdeContext): InvalidSortByException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidSourceCommitSpecifierException - */ -const de_InvalidSourceCommitSpecifierException = ( - output: any, - context: __SerdeContext -): InvalidSourceCommitSpecifierException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidSystemTagUsageException - */ -const de_InvalidSystemTagUsageException = (output: any, context: __SerdeContext): InvalidSystemTagUsageException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTagKeysListException - */ -const de_InvalidTagKeysListException = (output: any, context: __SerdeContext): InvalidTagKeysListException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTagsMapException - */ -const de_InvalidTagsMapException = (output: any, context: __SerdeContext): InvalidTagsMapException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTargetBranchException - */ -const de_InvalidTargetBranchException = (output: any, context: __SerdeContext): InvalidTargetBranchException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTargetException - */ -const de_InvalidTargetException = (output: any, context: __SerdeContext): InvalidTargetException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTargetsException - */ -const de_InvalidTargetsException = (output: any, context: __SerdeContext): InvalidTargetsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTitleException - */ -const de_InvalidTitleException = (output: any, context: __SerdeContext): InvalidTitleException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1IsBinaryFile - */ -const de_IsBinaryFile = (output: any, context: __SerdeContext): IsBinaryFile => { - return { - base: __expectBoolean(output.base), - destination: __expectBoolean(output.destination), - source: __expectBoolean(output.source), - } as any; -}; - -/** - * deserializeAws_json1_1ListApprovalRuleTemplatesOutput - */ -const de_ListApprovalRuleTemplatesOutput = (output: any, context: __SerdeContext): ListApprovalRuleTemplatesOutput => { - return { - approvalRuleTemplateNames: - output.approvalRuleTemplateNames != null - ? de_ApprovalRuleTemplateNameList(output.approvalRuleTemplateNames, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListAssociatedApprovalRuleTemplatesForRepositoryOutput - */ -const de_ListAssociatedApprovalRuleTemplatesForRepositoryOutput = ( - output: any, - context: __SerdeContext -): ListAssociatedApprovalRuleTemplatesForRepositoryOutput => { - return { - approvalRuleTemplateNames: - output.approvalRuleTemplateNames != null - ? de_ApprovalRuleTemplateNameList(output.approvalRuleTemplateNames, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListBranchesOutput - */ -const de_ListBranchesOutput = (output: any, context: __SerdeContext): ListBranchesOutput => { - return { - branches: output.branches != null ? de_BranchNameList(output.branches, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListPullRequestsOutput - */ -const de_ListPullRequestsOutput = (output: any, context: __SerdeContext): ListPullRequestsOutput => { - return { - nextToken: __expectString(output.nextToken), - pullRequestIds: output.pullRequestIds != null ? de_PullRequestIdList(output.pullRequestIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRepositoriesForApprovalRuleTemplateOutput - */ -const de_ListRepositoriesForApprovalRuleTemplateOutput = ( - output: any, - context: __SerdeContext -): ListRepositoriesForApprovalRuleTemplateOutput => { - return { - nextToken: __expectString(output.nextToken), - repositoryNames: - output.repositoryNames != null ? de_RepositoryNameList(output.repositoryNames, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRepositoriesOutput - */ -const de_ListRepositoriesOutput = (output: any, context: __SerdeContext): ListRepositoriesOutput => { - return { - nextToken: __expectString(output.nextToken), - repositories: output.repositories != null ? de_RepositoryNameIdPairList(output.repositories, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Location - */ -const de_Location = (output: any, context: __SerdeContext): Location => { - return { - filePath: __expectString(output.filePath), - filePosition: __expectLong(output.filePosition), - relativeFileVersion: __expectString(output.relativeFileVersion), - } as any; -}; - -/** - * deserializeAws_json1_1ManualMergeRequiredException - */ -const de_ManualMergeRequiredException = (output: any, context: __SerdeContext): ManualMergeRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumBranchesExceededException - */ -const de_MaximumBranchesExceededException = ( - output: any, - context: __SerdeContext -): MaximumBranchesExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumConflictResolutionEntriesExceededException - */ -const de_MaximumConflictResolutionEntriesExceededException = ( - output: any, - context: __SerdeContext -): MaximumConflictResolutionEntriesExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumFileContentToLoadExceededException - */ -const de_MaximumFileContentToLoadExceededException = ( - output: any, - context: __SerdeContext -): MaximumFileContentToLoadExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumFileEntriesExceededException - */ -const de_MaximumFileEntriesExceededException = ( - output: any, - context: __SerdeContext -): MaximumFileEntriesExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumItemsToCompareExceededException - */ -const de_MaximumItemsToCompareExceededException = ( - output: any, - context: __SerdeContext -): MaximumItemsToCompareExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumNumberOfApprovalsExceededException - */ -const de_MaximumNumberOfApprovalsExceededException = ( - output: any, - context: __SerdeContext -): MaximumNumberOfApprovalsExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumOpenPullRequestsExceededException - */ -const de_MaximumOpenPullRequestsExceededException = ( - output: any, - context: __SerdeContext -): MaximumOpenPullRequestsExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumRepositoryNamesExceededException - */ -const de_MaximumRepositoryNamesExceededException = ( - output: any, - context: __SerdeContext -): MaximumRepositoryNamesExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumRepositoryTriggersExceededException - */ -const de_MaximumRepositoryTriggersExceededException = ( - output: any, - context: __SerdeContext -): MaximumRepositoryTriggersExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MaximumRuleTemplatesAssociatedWithRepositoryException - */ -const de_MaximumRuleTemplatesAssociatedWithRepositoryException = ( - output: any, - context: __SerdeContext -): MaximumRuleTemplatesAssociatedWithRepositoryException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MergeBranchesByFastForwardOutput - */ -const de_MergeBranchesByFastForwardOutput = ( - output: any, - context: __SerdeContext -): MergeBranchesByFastForwardOutput => { - return { - commitId: __expectString(output.commitId), - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1MergeBranchesBySquashOutput - */ -const de_MergeBranchesBySquashOutput = (output: any, context: __SerdeContext): MergeBranchesBySquashOutput => { - return { - commitId: __expectString(output.commitId), - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1MergeBranchesByThreeWayOutput - */ -const de_MergeBranchesByThreeWayOutput = (output: any, context: __SerdeContext): MergeBranchesByThreeWayOutput => { - return { - commitId: __expectString(output.commitId), - treeId: __expectString(output.treeId), - } as any; -}; - -/** - * deserializeAws_json1_1MergeHunk - */ -const de_MergeHunk = (output: any, context: __SerdeContext): MergeHunk => { - return { - base: output.base != null ? de_MergeHunkDetail(output.base, context) : undefined, - destination: output.destination != null ? de_MergeHunkDetail(output.destination, context) : undefined, - isConflict: __expectBoolean(output.isConflict), - source: output.source != null ? de_MergeHunkDetail(output.source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MergeHunkDetail - */ -const de_MergeHunkDetail = (output: any, context: __SerdeContext): MergeHunkDetail => { - return { - endLine: __expectInt32(output.endLine), - hunkContent: __expectString(output.hunkContent), - startLine: __expectInt32(output.startLine), - } as any; -}; - -/** - * deserializeAws_json1_1MergeHunks - */ -const de_MergeHunks = (output: any, context: __SerdeContext): MergeHunk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MergeHunk(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1MergeMetadata - */ -const de_MergeMetadata = (output: any, context: __SerdeContext): MergeMetadata => { - return { - isMerged: __expectBoolean(output.isMerged), - mergeCommitId: __expectString(output.mergeCommitId), - mergeOption: __expectString(output.mergeOption), - mergedBy: __expectString(output.mergedBy), - } as any; -}; - -/** - * deserializeAws_json1_1MergeOperations - */ -const de_MergeOperations = (output: any, context: __SerdeContext): MergeOperations => { - return { - destination: __expectString(output.destination), - source: __expectString(output.source), - } as any; -}; - -/** - * deserializeAws_json1_1MergeOptionRequiredException - */ -const de_MergeOptionRequiredException = (output: any, context: __SerdeContext): MergeOptionRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MergeOptions - */ -const de_MergeOptions = (output: any, context: __SerdeContext): (MergeOptionTypeEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1MergePullRequestByFastForwardOutput - */ -const de_MergePullRequestByFastForwardOutput = ( - output: any, - context: __SerdeContext -): MergePullRequestByFastForwardOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MergePullRequestBySquashOutput - */ -const de_MergePullRequestBySquashOutput = (output: any, context: __SerdeContext): MergePullRequestBySquashOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MergePullRequestByThreeWayOutput - */ -const de_MergePullRequestByThreeWayOutput = ( - output: any, - context: __SerdeContext -): MergePullRequestByThreeWayOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MultipleConflictResolutionEntriesException - */ -const de_MultipleConflictResolutionEntriesException = ( - output: any, - context: __SerdeContext -): MultipleConflictResolutionEntriesException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1MultipleRepositoriesInPullRequestException - */ -const de_MultipleRepositoriesInPullRequestException = ( - output: any, - context: __SerdeContext -): MultipleRepositoriesInPullRequestException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1NameLengthExceededException - */ -const de_NameLengthExceededException = (output: any, context: __SerdeContext): NameLengthExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1NoChangeException - */ -const de_NoChangeException = (output: any, context: __SerdeContext): NoChangeException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidOverrideStatusException omitted. -/** - * deserializeAws_json1_1NumberOfRulesExceededException - */ -const de_NumberOfRulesExceededException = (output: any, context: __SerdeContext): NumberOfRulesExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParentCommitIdException omitted. -/** - * deserializeAws_json1_1NumberOfRuleTemplatesExceededException - */ -const de_NumberOfRuleTemplatesExceededException = ( - output: any, - context: __SerdeContext -): NumberOfRuleTemplatesExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPathException omitted. -/** - * deserializeAws_json1_1ObjectTypes - */ -const de_ObjectTypes = (output: any, context: __SerdeContext): ObjectTypes => { - return { - base: __expectString(output.base), - destination: __expectString(output.destination), - source: __expectString(output.source), - } as any; -}; +// de_InvalidPullRequestEventTypeException omitted. -/** - * deserializeAws_json1_1OriginApprovalRuleTemplate - */ -const de_OriginApprovalRuleTemplate = (output: any, context: __SerdeContext): OriginApprovalRuleTemplate => { - return { - approvalRuleTemplateId: __expectString(output.approvalRuleTemplateId), - approvalRuleTemplateName: __expectString(output.approvalRuleTemplateName), - } as any; -}; +// de_InvalidPullRequestIdException omitted. -/** - * deserializeAws_json1_1OverrideAlreadySetException - */ -const de_OverrideAlreadySetException = (output: any, context: __SerdeContext): OverrideAlreadySetException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPullRequestStatusException omitted. -/** - * deserializeAws_json1_1OverrideStatusRequiredException - */ -const de_OverrideStatusRequiredException = (output: any, context: __SerdeContext): OverrideStatusRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPullRequestStatusUpdateException omitted. -/** - * deserializeAws_json1_1ParentCommitDoesNotExistException - */ -const de_ParentCommitDoesNotExistException = ( - output: any, - context: __SerdeContext -): ParentCommitDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidReactionUserArnException omitted. -/** - * deserializeAws_json1_1ParentCommitIdOutdatedException - */ -const de_ParentCommitIdOutdatedException = (output: any, context: __SerdeContext): ParentCommitIdOutdatedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidReactionValueException omitted. -/** - * deserializeAws_json1_1ParentCommitIdRequiredException - */ -const de_ParentCommitIdRequiredException = (output: any, context: __SerdeContext): ParentCommitIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidReferenceNameException omitted. -/** - * deserializeAws_json1_1ParentList - */ -const de_ParentList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InvalidRelativeFileVersionEnumException omitted. -/** - * deserializeAws_json1_1PathDoesNotExistException - */ -const de_PathDoesNotExistException = (output: any, context: __SerdeContext): PathDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidReplacementContentException omitted. -/** - * deserializeAws_json1_1PathRequiredException - */ -const de_PathRequiredException = (output: any, context: __SerdeContext): PathRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidReplacementTypeException omitted. -/** - * deserializeAws_json1_1PostCommentForComparedCommitOutput - */ -const de_PostCommentForComparedCommitOutput = ( - output: any, - context: __SerdeContext -): PostCommentForComparedCommitOutput => { - return { - afterBlobId: __expectString(output.afterBlobId), - afterCommitId: __expectString(output.afterCommitId), - beforeBlobId: __expectString(output.beforeBlobId), - beforeCommitId: __expectString(output.beforeCommitId), - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - location: output.location != null ? de_Location(output.location, context) : undefined, - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_InvalidRepositoryDescriptionException omitted. -/** - * deserializeAws_json1_1PostCommentForPullRequestOutput - */ -const de_PostCommentForPullRequestOutput = (output: any, context: __SerdeContext): PostCommentForPullRequestOutput => { - return { - afterBlobId: __expectString(output.afterBlobId), - afterCommitId: __expectString(output.afterCommitId), - beforeBlobId: __expectString(output.beforeBlobId), - beforeCommitId: __expectString(output.beforeCommitId), - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - location: output.location != null ? de_Location(output.location, context) : undefined, - pullRequestId: __expectString(output.pullRequestId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_InvalidRepositoryNameException omitted. -/** - * deserializeAws_json1_1PostCommentReplyOutput - */ -const de_PostCommentReplyOutput = (output: any, context: __SerdeContext): PostCommentReplyOutput => { - return { - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - } as any; -}; +// de_InvalidRepositoryTriggerBranchNameException omitted. -/** - * deserializeAws_json1_1PullRequest - */ -const de_PullRequest = (output: any, context: __SerdeContext): PullRequest => { - return { - approvalRules: output.approvalRules != null ? de_ApprovalRulesList(output.approvalRules, context) : undefined, - authorArn: __expectString(output.authorArn), - clientRequestToken: __expectString(output.clientRequestToken), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - lastActivityDate: - output.lastActivityDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastActivityDate))) - : undefined, - pullRequestId: __expectString(output.pullRequestId), - pullRequestStatus: __expectString(output.pullRequestStatus), - pullRequestTargets: - output.pullRequestTargets != null ? de_PullRequestTargetList(output.pullRequestTargets, context) : undefined, - revisionId: __expectString(output.revisionId), - title: __expectString(output.title), - } as any; -}; - -/** - * deserializeAws_json1_1PullRequestAlreadyClosedException - */ -const de_PullRequestAlreadyClosedException = ( - output: any, - context: __SerdeContext -): PullRequestAlreadyClosedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRepositoryTriggerCustomDataException omitted. -/** - * deserializeAws_json1_1PullRequestApprovalRulesNotSatisfiedException - */ -const de_PullRequestApprovalRulesNotSatisfiedException = ( - output: any, - context: __SerdeContext -): PullRequestApprovalRulesNotSatisfiedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRepositoryTriggerDestinationArnException omitted. -/** - * deserializeAws_json1_1PullRequestCannotBeApprovedByAuthorException - */ -const de_PullRequestCannotBeApprovedByAuthorException = ( - output: any, - context: __SerdeContext -): PullRequestCannotBeApprovedByAuthorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRepositoryTriggerEventsException omitted. -/** - * deserializeAws_json1_1PullRequestCreatedEventMetadata - */ -const de_PullRequestCreatedEventMetadata = (output: any, context: __SerdeContext): PullRequestCreatedEventMetadata => { - return { - destinationCommitId: __expectString(output.destinationCommitId), - mergeBase: __expectString(output.mergeBase), - repositoryName: __expectString(output.repositoryName), - sourceCommitId: __expectString(output.sourceCommitId), - } as any; -}; +// de_InvalidRepositoryTriggerNameException omitted. -/** - * deserializeAws_json1_1PullRequestDoesNotExistException - */ -const de_PullRequestDoesNotExistException = ( - output: any, - context: __SerdeContext -): PullRequestDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRepositoryTriggerRegionException omitted. -/** - * deserializeAws_json1_1PullRequestEvent - */ -const de_PullRequestEvent = (output: any, context: __SerdeContext): PullRequestEvent => { - return { - actorArn: __expectString(output.actorArn), - approvalRuleEventMetadata: - output.approvalRuleEventMetadata != null - ? de_ApprovalRuleEventMetadata(output.approvalRuleEventMetadata, context) - : undefined, - approvalRuleOverriddenEventMetadata: - output.approvalRuleOverriddenEventMetadata != null - ? de_ApprovalRuleOverriddenEventMetadata(output.approvalRuleOverriddenEventMetadata, context) - : undefined, - approvalStateChangedEventMetadata: - output.approvalStateChangedEventMetadata != null - ? de_ApprovalStateChangedEventMetadata(output.approvalStateChangedEventMetadata, context) - : undefined, - eventDate: - output.eventDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventDate))) : undefined, - pullRequestCreatedEventMetadata: - output.pullRequestCreatedEventMetadata != null - ? de_PullRequestCreatedEventMetadata(output.pullRequestCreatedEventMetadata, context) - : undefined, - pullRequestEventType: __expectString(output.pullRequestEventType), - pullRequestId: __expectString(output.pullRequestId), - pullRequestMergedStateChangedEventMetadata: - output.pullRequestMergedStateChangedEventMetadata != null - ? de_PullRequestMergedStateChangedEventMetadata(output.pullRequestMergedStateChangedEventMetadata, context) - : undefined, - pullRequestSourceReferenceUpdatedEventMetadata: - output.pullRequestSourceReferenceUpdatedEventMetadata != null - ? de_PullRequestSourceReferenceUpdatedEventMetadata( - output.pullRequestSourceReferenceUpdatedEventMetadata, - context - ) - : undefined, - pullRequestStatusChangedEventMetadata: - output.pullRequestStatusChangedEventMetadata != null - ? de_PullRequestStatusChangedEventMetadata(output.pullRequestStatusChangedEventMetadata, context) - : undefined, - } as any; -}; +// de_InvalidResourceArnException omitted. -/** - * deserializeAws_json1_1PullRequestEventList - */ -const de_PullRequestEventList = (output: any, context: __SerdeContext): PullRequestEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PullRequestEvent(entry, context); - }); - return retVal; -}; +// de_InvalidRevisionIdException omitted. -/** - * deserializeAws_json1_1PullRequestIdList - */ -const de_PullRequestIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InvalidRuleContentSha256Exception omitted. -/** - * deserializeAws_json1_1PullRequestIdRequiredException - */ -const de_PullRequestIdRequiredException = (output: any, context: __SerdeContext): PullRequestIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidSortByException omitted. -/** - * deserializeAws_json1_1PullRequestMergedStateChangedEventMetadata - */ -const de_PullRequestMergedStateChangedEventMetadata = ( - output: any, - context: __SerdeContext -): PullRequestMergedStateChangedEventMetadata => { - return { - destinationReference: __expectString(output.destinationReference), - mergeMetadata: output.mergeMetadata != null ? de_MergeMetadata(output.mergeMetadata, context) : undefined, - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_InvalidSourceCommitSpecifierException omitted. -/** - * deserializeAws_json1_1PullRequestSourceReferenceUpdatedEventMetadata - */ -const de_PullRequestSourceReferenceUpdatedEventMetadata = ( - output: any, - context: __SerdeContext -): PullRequestSourceReferenceUpdatedEventMetadata => { - return { - afterCommitId: __expectString(output.afterCommitId), - beforeCommitId: __expectString(output.beforeCommitId), - mergeBase: __expectString(output.mergeBase), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_InvalidSystemTagUsageException omitted. -/** - * deserializeAws_json1_1PullRequestStatusChangedEventMetadata - */ -const de_PullRequestStatusChangedEventMetadata = ( - output: any, - context: __SerdeContext -): PullRequestStatusChangedEventMetadata => { - return { - pullRequestStatus: __expectString(output.pullRequestStatus), - } as any; -}; +// de_InvalidTagKeysListException omitted. -/** - * deserializeAws_json1_1PullRequestStatusRequiredException - */ -const de_PullRequestStatusRequiredException = ( - output: any, - context: __SerdeContext -): PullRequestStatusRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTagsMapException omitted. -/** - * deserializeAws_json1_1PullRequestTarget - */ -const de_PullRequestTarget = (output: any, context: __SerdeContext): PullRequestTarget => { - return { - destinationCommit: __expectString(output.destinationCommit), - destinationReference: __expectString(output.destinationReference), - mergeBase: __expectString(output.mergeBase), - mergeMetadata: output.mergeMetadata != null ? de_MergeMetadata(output.mergeMetadata, context) : undefined, - repositoryName: __expectString(output.repositoryName), - sourceCommit: __expectString(output.sourceCommit), - sourceReference: __expectString(output.sourceReference), - } as any; -}; +// de_InvalidTargetBranchException omitted. -/** - * deserializeAws_json1_1PullRequestTargetList - */ -const de_PullRequestTargetList = (output: any, context: __SerdeContext): PullRequestTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PullRequestTarget(entry, context); - }); - return retVal; -}; +// de_InvalidTargetException omitted. -/** - * deserializeAws_json1_1PutFileEntryConflictException - */ -const de_PutFileEntryConflictException = (output: any, context: __SerdeContext): PutFileEntryConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTargetsException omitted. -/** - * deserializeAws_json1_1PutFileOutput - */ -const de_PutFileOutput = (output: any, context: __SerdeContext): PutFileOutput => { - return { - blobId: __expectString(output.blobId), - commitId: __expectString(output.commitId), - treeId: __expectString(output.treeId), - } as any; -}; +// de_InvalidTitleException omitted. -/** - * deserializeAws_json1_1PutRepositoryTriggersOutput - */ -const de_PutRepositoryTriggersOutput = (output: any, context: __SerdeContext): PutRepositoryTriggersOutput => { - return { - configurationId: __expectString(output.configurationId), - } as any; -}; +// de_IsBinaryFile omitted. -/** - * deserializeAws_json1_1ReactionCountsMap - */ -const de_ReactionCountsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_ListApprovalRuleTemplatesOutput omitted. -/** - * deserializeAws_json1_1ReactionForComment - */ -const de_ReactionForComment = (output: any, context: __SerdeContext): ReactionForComment => { - return { - reaction: output.reaction != null ? de_ReactionValueFormats(output.reaction, context) : undefined, - reactionUsers: output.reactionUsers != null ? de_ReactionUsersList(output.reactionUsers, context) : undefined, - reactionsFromDeletedUsersCount: __expectInt32(output.reactionsFromDeletedUsersCount), - } as any; -}; +// de_ListAssociatedApprovalRuleTemplatesForRepositoryOutput omitted. -/** - * deserializeAws_json1_1ReactionLimitExceededException - */ -const de_ReactionLimitExceededException = (output: any, context: __SerdeContext): ReactionLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ListBranchesOutput omitted. -/** - * deserializeAws_json1_1ReactionsForCommentList - */ -const de_ReactionsForCommentList = (output: any, context: __SerdeContext): ReactionForComment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReactionForComment(entry, context); - }); - return retVal; -}; +// de_ListPullRequestsOutput omitted. -/** - * deserializeAws_json1_1ReactionUsersList - */ -const de_ReactionUsersList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListRepositoriesForApprovalRuleTemplateOutput omitted. -/** - * deserializeAws_json1_1ReactionValueFormats - */ -const de_ReactionValueFormats = (output: any, context: __SerdeContext): ReactionValueFormats => { - return { - emoji: __expectString(output.emoji), - shortCode: __expectString(output.shortCode), - unicode: __expectString(output.unicode), - } as any; -}; +// de_ListRepositoriesOutput omitted. -/** - * deserializeAws_json1_1ReactionValueRequiredException - */ -const de_ReactionValueRequiredException = (output: any, context: __SerdeContext): ReactionValueRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ListTagsForResourceOutput omitted. -/** - * deserializeAws_json1_1ReferenceDoesNotExistException - */ -const de_ReferenceDoesNotExistException = (output: any, context: __SerdeContext): ReferenceDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_Location omitted. -/** - * deserializeAws_json1_1ReferenceNameRequiredException - */ -const de_ReferenceNameRequiredException = (output: any, context: __SerdeContext): ReferenceNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ManualMergeRequiredException omitted. -/** - * deserializeAws_json1_1ReferenceTypeNotSupportedException - */ -const de_ReferenceTypeNotSupportedException = ( - output: any, - context: __SerdeContext -): ReferenceTypeNotSupportedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaximumBranchesExceededException omitted. -/** - * deserializeAws_json1_1ReplacementContentRequiredException - */ -const de_ReplacementContentRequiredException = ( - output: any, - context: __SerdeContext -): ReplacementContentRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaximumConflictResolutionEntriesExceededException omitted. -/** - * deserializeAws_json1_1ReplacementTypeRequiredException - */ -const de_ReplacementTypeRequiredException = ( - output: any, - context: __SerdeContext -): ReplacementTypeRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaximumFileContentToLoadExceededException omitted. -/** - * deserializeAws_json1_1RepositoryDoesNotExistException - */ -const de_RepositoryDoesNotExistException = (output: any, context: __SerdeContext): RepositoryDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaximumFileEntriesExceededException omitted. -/** - * deserializeAws_json1_1RepositoryLimitExceededException - */ -const de_RepositoryLimitExceededException = ( - output: any, - context: __SerdeContext -): RepositoryLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaximumItemsToCompareExceededException omitted. -/** - * deserializeAws_json1_1RepositoryMetadata - */ -const de_RepositoryMetadata = (output: any, context: __SerdeContext): RepositoryMetadata => { - return { - Arn: __expectString(output.Arn), - accountId: __expectString(output.accountId), - cloneUrlHttp: __expectString(output.cloneUrlHttp), - cloneUrlSsh: __expectString(output.cloneUrlSsh), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - defaultBranch: __expectString(output.defaultBranch), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - repositoryDescription: __expectString(output.repositoryDescription), - repositoryId: __expectString(output.repositoryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_MaximumNumberOfApprovalsExceededException omitted. -/** - * deserializeAws_json1_1RepositoryMetadataList - */ -const de_RepositoryMetadataList = (output: any, context: __SerdeContext): RepositoryMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryMetadata(entry, context); - }); - return retVal; -}; +// de_MaximumOpenPullRequestsExceededException omitted. -/** - * deserializeAws_json1_1RepositoryNameExistsException - */ -const de_RepositoryNameExistsException = (output: any, context: __SerdeContext): RepositoryNameExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaximumRepositoryNamesExceededException omitted. -/** - * deserializeAws_json1_1RepositoryNameIdPair - */ -const de_RepositoryNameIdPair = (output: any, context: __SerdeContext): RepositoryNameIdPair => { - return { - repositoryId: __expectString(output.repositoryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_MaximumRepositoryTriggersExceededException omitted. -/** - * deserializeAws_json1_1RepositoryNameIdPairList - */ -const de_RepositoryNameIdPairList = (output: any, context: __SerdeContext): RepositoryNameIdPair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryNameIdPair(entry, context); - }); - return retVal; -}; +// de_MaximumRuleTemplatesAssociatedWithRepositoryException omitted. -/** - * deserializeAws_json1_1RepositoryNameList - */ -const de_RepositoryNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MergeBranchesByFastForwardOutput omitted. -/** - * deserializeAws_json1_1RepositoryNameRequiredException - */ -const de_RepositoryNameRequiredException = (output: any, context: __SerdeContext): RepositoryNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MergeBranchesBySquashOutput omitted. -/** - * deserializeAws_json1_1RepositoryNamesRequiredException - */ -const de_RepositoryNamesRequiredException = ( - output: any, - context: __SerdeContext -): RepositoryNamesRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MergeBranchesByThreeWayOutput omitted. -/** - * deserializeAws_json1_1RepositoryNotAssociatedWithPullRequestException - */ -const de_RepositoryNotAssociatedWithPullRequestException = ( - output: any, - context: __SerdeContext -): RepositoryNotAssociatedWithPullRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MergeHunk omitted. -/** - * deserializeAws_json1_1RepositoryNotFoundList - */ -const de_RepositoryNotFoundList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MergeHunkDetail omitted. -/** - * deserializeAws_json1_1RepositoryTrigger - */ -const de_RepositoryTrigger = (output: any, context: __SerdeContext): RepositoryTrigger => { - return { - branches: output.branches != null ? de_BranchNameList(output.branches, context) : undefined, - customData: __expectString(output.customData), - destinationArn: __expectString(output.destinationArn), - events: output.events != null ? de_RepositoryTriggerEventList(output.events, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_MergeHunks omitted. -/** - * deserializeAws_json1_1RepositoryTriggerBranchNameListRequiredException - */ -const de_RepositoryTriggerBranchNameListRequiredException = ( - output: any, - context: __SerdeContext -): RepositoryTriggerBranchNameListRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MergeMetadata omitted. -/** - * deserializeAws_json1_1RepositoryTriggerDestinationArnRequiredException - */ -const de_RepositoryTriggerDestinationArnRequiredException = ( - output: any, - context: __SerdeContext -): RepositoryTriggerDestinationArnRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MergeOperations omitted. -/** - * deserializeAws_json1_1RepositoryTriggerEventList - */ -const de_RepositoryTriggerEventList = ( - output: any, - context: __SerdeContext -): (RepositoryTriggerEventEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MergeOptionRequiredException omitted. + +// de_MergeOptions omitted. /** - * deserializeAws_json1_1RepositoryTriggerEventsListRequiredException + * deserializeAws_json1_1MergePullRequestByFastForwardOutput */ -const de_RepositoryTriggerEventsListRequiredException = ( +const de_MergePullRequestByFastForwardOutput = ( output: any, context: __SerdeContext -): RepositoryTriggerEventsListRequiredException => { - return { - message: __expectString(output.message), - } as any; +): MergePullRequestByFastForwardOutput => { + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; /** - * deserializeAws_json1_1RepositoryTriggerExecutionFailure + * deserializeAws_json1_1MergePullRequestBySquashOutput */ -const de_RepositoryTriggerExecutionFailure = ( - output: any, - context: __SerdeContext -): RepositoryTriggerExecutionFailure => { - return { - failureMessage: __expectString(output.failureMessage), - trigger: __expectString(output.trigger), - } as any; +const de_MergePullRequestBySquashOutput = (output: any, context: __SerdeContext): MergePullRequestBySquashOutput => { + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; /** - * deserializeAws_json1_1RepositoryTriggerExecutionFailureList + * deserializeAws_json1_1MergePullRequestByThreeWayOutput */ -const de_RepositoryTriggerExecutionFailureList = ( +const de_MergePullRequestByThreeWayOutput = ( output: any, context: __SerdeContext -): RepositoryTriggerExecutionFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryTriggerExecutionFailure(entry, context); - }); - return retVal; +): MergePullRequestByThreeWayOutput => { + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RepositoryTriggerNameList - */ -const de_RepositoryTriggerNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MultipleConflictResolutionEntriesException omitted. -/** - * deserializeAws_json1_1RepositoryTriggerNameRequiredException - */ -const de_RepositoryTriggerNameRequiredException = ( - output: any, - context: __SerdeContext -): RepositoryTriggerNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MultipleRepositoriesInPullRequestException omitted. -/** - * deserializeAws_json1_1RepositoryTriggersList - */ -const de_RepositoryTriggersList = (output: any, context: __SerdeContext): RepositoryTrigger[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryTrigger(entry, context); - }); - return retVal; -}; +// de_NameLengthExceededException omitted. + +// de_NoChangeException omitted. + +// de_NumberOfRulesExceededException omitted. + +// de_NumberOfRuleTemplatesExceededException omitted. + +// de_ObjectTypes omitted. + +// de_OriginApprovalRuleTemplate omitted. + +// de_OverrideAlreadySetException omitted. + +// de_OverrideStatusRequiredException omitted. + +// de_ParentCommitDoesNotExistException omitted. + +// de_ParentCommitIdOutdatedException omitted. + +// de_ParentCommitIdRequiredException omitted. + +// de_ParentList omitted. + +// de_PathDoesNotExistException omitted. + +// de_PathRequiredException omitted. /** - * deserializeAws_json1_1RepositoryTriggersListRequiredException + * deserializeAws_json1_1PostCommentForComparedCommitOutput */ -const de_RepositoryTriggersListRequiredException = ( +const de_PostCommentForComparedCommitOutput = ( output: any, context: __SerdeContext -): RepositoryTriggersListRequiredException => { - return { - message: __expectString(output.message), - } as any; +): PostCommentForComparedCommitOutput => { + return take(output, { + afterBlobId: __expectString, + afterCommitId: __expectString, + beforeBlobId: __expectString, + beforeCommitId: __expectString, + comment: (_: any) => de_Comment(_, context), + location: _json, + repositoryName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceArnRequiredException + * deserializeAws_json1_1PostCommentForPullRequestOutput */ -const de_ResourceArnRequiredException = (output: any, context: __SerdeContext): ResourceArnRequiredException => { - return { - message: __expectString(output.message), - } as any; +const de_PostCommentForPullRequestOutput = (output: any, context: __SerdeContext): PostCommentForPullRequestOutput => { + return take(output, { + afterBlobId: __expectString, + afterCommitId: __expectString, + beforeBlobId: __expectString, + beforeCommitId: __expectString, + comment: (_: any) => de_Comment(_, context), + location: _json, + pullRequestId: __expectString, + repositoryName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RestrictedSourceFileException + * deserializeAws_json1_1PostCommentReplyOutput */ -const de_RestrictedSourceFileException = (output: any, context: __SerdeContext): RestrictedSourceFileException => { - return { - message: __expectString(output.message), - } as any; +const de_PostCommentReplyOutput = (output: any, context: __SerdeContext): PostCommentReplyOutput => { + return take(output, { + comment: (_: any) => de_Comment(_, context), + }) as any; }; /** - * deserializeAws_json1_1RevisionIdRequiredException + * deserializeAws_json1_1PullRequest */ -const de_RevisionIdRequiredException = (output: any, context: __SerdeContext): RevisionIdRequiredException => { - return { - message: __expectString(output.message), - } as any; +const de_PullRequest = (output: any, context: __SerdeContext): PullRequest => { + return take(output, { + approvalRules: (_: any) => de_ApprovalRulesList(_, context), + authorArn: __expectString, + clientRequestToken: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastActivityDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pullRequestId: __expectString, + pullRequestStatus: __expectString, + pullRequestTargets: _json, + revisionId: __expectString, + title: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RevisionNotCurrentException - */ -const de_RevisionNotCurrentException = (output: any, context: __SerdeContext): RevisionNotCurrentException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PullRequestAlreadyClosedException omitted. -/** - * deserializeAws_json1_1SameFileContentException - */ -const de_SameFileContentException = (output: any, context: __SerdeContext): SameFileContentException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PullRequestApprovalRulesNotSatisfiedException omitted. -/** - * deserializeAws_json1_1SamePathRequestException - */ -const de_SamePathRequestException = (output: any, context: __SerdeContext): SamePathRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PullRequestCannotBeApprovedByAuthorException omitted. -/** - * deserializeAws_json1_1SourceAndDestinationAreSameException - */ -const de_SourceAndDestinationAreSameException = ( - output: any, - context: __SerdeContext -): SourceAndDestinationAreSameException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PullRequestCreatedEventMetadata omitted. -/** - * deserializeAws_json1_1SourceFileOrContentRequiredException - */ -const de_SourceFileOrContentRequiredException = ( - output: any, - context: __SerdeContext -): SourceFileOrContentRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PullRequestDoesNotExistException omitted. /** - * deserializeAws_json1_1SubModule + * deserializeAws_json1_1PullRequestEvent */ -const de_SubModule = (output: any, context: __SerdeContext): SubModule => { - return { - absolutePath: __expectString(output.absolutePath), - commitId: __expectString(output.commitId), - relativePath: __expectString(output.relativePath), - } as any; +const de_PullRequestEvent = (output: any, context: __SerdeContext): PullRequestEvent => { + return take(output, { + actorArn: __expectString, + approvalRuleEventMetadata: _json, + approvalRuleOverriddenEventMetadata: _json, + approvalStateChangedEventMetadata: _json, + eventDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pullRequestCreatedEventMetadata: _json, + pullRequestEventType: __expectString, + pullRequestId: __expectString, + pullRequestMergedStateChangedEventMetadata: _json, + pullRequestSourceReferenceUpdatedEventMetadata: _json, + pullRequestStatusChangedEventMetadata: _json, + }) as any; }; /** - * deserializeAws_json1_1SubModuleList + * deserializeAws_json1_1PullRequestEventList */ -const de_SubModuleList = (output: any, context: __SerdeContext): SubModule[] => { +const de_PullRequestEventList = (output: any, context: __SerdeContext): PullRequestEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubModule(entry, context); + return de_PullRequestEvent(entry, context); }); return retVal; }; +// de_PullRequestIdList omitted. + +// de_PullRequestIdRequiredException omitted. + +// de_PullRequestMergedStateChangedEventMetadata omitted. + +// de_PullRequestSourceReferenceUpdatedEventMetadata omitted. + +// de_PullRequestStatusChangedEventMetadata omitted. + +// de_PullRequestStatusRequiredException omitted. + +// de_PullRequestTarget omitted. + +// de_PullRequestTargetList omitted. + +// de_PutFileEntryConflictException omitted. + +// de_PutFileOutput omitted. + +// de_PutRepositoryTriggersOutput omitted. + +// de_ReactionCountsMap omitted. + +// de_ReactionForComment omitted. + +// de_ReactionLimitExceededException omitted. + +// de_ReactionsForCommentList omitted. + +// de_ReactionUsersList omitted. + +// de_ReactionValueFormats omitted. + +// de_ReactionValueRequiredException omitted. + +// de_ReferenceDoesNotExistException omitted. + +// de_ReferenceNameRequiredException omitted. + +// de_ReferenceTypeNotSupportedException omitted. + +// de_ReplacementContentRequiredException omitted. + +// de_ReplacementTypeRequiredException omitted. + +// de_RepositoryDoesNotExistException omitted. + +// de_RepositoryLimitExceededException omitted. + /** - * deserializeAws_json1_1SymbolicLink + * deserializeAws_json1_1RepositoryMetadata */ -const de_SymbolicLink = (output: any, context: __SerdeContext): SymbolicLink => { - return { - absolutePath: __expectString(output.absolutePath), - blobId: __expectString(output.blobId), - fileMode: __expectString(output.fileMode), - relativePath: __expectString(output.relativePath), - } as any; +const de_RepositoryMetadata = (output: any, context: __SerdeContext): RepositoryMetadata => { + return take(output, { + Arn: __expectString, + accountId: __expectString, + cloneUrlHttp: __expectString, + cloneUrlSsh: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultBranch: __expectString, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + repositoryDescription: __expectString, + repositoryId: __expectString, + repositoryName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SymbolicLinkList + * deserializeAws_json1_1RepositoryMetadataList */ -const de_SymbolicLinkList = (output: any, context: __SerdeContext): SymbolicLink[] => { +const de_RepositoryMetadataList = (output: any, context: __SerdeContext): RepositoryMetadata[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SymbolicLink(entry, context); + return de_RepositoryMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TagKeysListRequiredException - */ -const de_TagKeysListRequiredException = (output: any, context: __SerdeContext): TagKeysListRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNameExistsException omitted. -/** - * deserializeAws_json1_1TagPolicyException - */ -const de_TagPolicyException = (output: any, context: __SerdeContext): TagPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNameIdPair omitted. -/** - * deserializeAws_json1_1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RepositoryNameIdPairList omitted. -/** - * deserializeAws_json1_1TagsMapRequiredException - */ -const de_TagsMapRequiredException = (output: any, context: __SerdeContext): TagsMapRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNameList omitted. -/** - * deserializeAws_json1_1TargetRequiredException - */ -const de_TargetRequiredException = (output: any, context: __SerdeContext): TargetRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNameRequiredException omitted. -/** - * deserializeAws_json1_1TargetsRequiredException - */ -const de_TargetsRequiredException = (output: any, context: __SerdeContext): TargetsRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNamesRequiredException omitted. -/** - * deserializeAws_json1_1TestRepositoryTriggersOutput - */ -const de_TestRepositoryTriggersOutput = (output: any, context: __SerdeContext): TestRepositoryTriggersOutput => { - return { - failedExecutions: - output.failedExecutions != null - ? de_RepositoryTriggerExecutionFailureList(output.failedExecutions, context) - : undefined, - successfulExecutions: - output.successfulExecutions != null - ? de_RepositoryTriggerNameList(output.successfulExecutions, context) - : undefined, - } as any; -}; +// de_RepositoryNotAssociatedWithPullRequestException omitted. -/** - * deserializeAws_json1_1TipOfSourceReferenceIsDifferentException - */ -const de_TipOfSourceReferenceIsDifferentException = ( - output: any, - context: __SerdeContext -): TipOfSourceReferenceIsDifferentException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNotFoundList omitted. -/** - * deserializeAws_json1_1TipsDivergenceExceededException - */ -const de_TipsDivergenceExceededException = (output: any, context: __SerdeContext): TipsDivergenceExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryTrigger omitted. -/** - * deserializeAws_json1_1TitleRequiredException - */ -const de_TitleRequiredException = (output: any, context: __SerdeContext): TitleRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryTriggerBranchNameListRequiredException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryTriggerDestinationArnRequiredException omitted. + +// de_RepositoryTriggerEventList omitted. + +// de_RepositoryTriggerEventsListRequiredException omitted. + +// de_RepositoryTriggerExecutionFailure omitted. + +// de_RepositoryTriggerExecutionFailureList omitted. + +// de_RepositoryTriggerNameList omitted. + +// de_RepositoryTriggerNameRequiredException omitted. + +// de_RepositoryTriggersList omitted. + +// de_RepositoryTriggersListRequiredException omitted. + +// de_ResourceArnRequiredException omitted. + +// de_RestrictedSourceFileException omitted. + +// de_RevisionIdRequiredException omitted. + +// de_RevisionNotCurrentException omitted. + +// de_SameFileContentException omitted. + +// de_SamePathRequestException omitted. + +// de_SourceAndDestinationAreSameException omitted. + +// de_SourceFileOrContentRequiredException omitted. + +// de_SubModule omitted. + +// de_SubModuleList omitted. + +// de_SymbolicLink omitted. + +// de_SymbolicLinkList omitted. + +// de_TagKeysListRequiredException omitted. + +// de_TagPolicyException omitted. + +// de_TagsMap omitted. + +// de_TagsMapRequiredException omitted. + +// de_TargetRequiredException omitted. + +// de_TargetsRequiredException omitted. + +// de_TestRepositoryTriggersOutput omitted. + +// de_TipOfSourceReferenceIsDifferentException omitted. + +// de_TipsDivergenceExceededException omitted. + +// de_TitleRequiredException omitted. + +// de_TooManyTagsException omitted. /** * deserializeAws_json1_1UpdateApprovalRuleTemplateContentOutput @@ -16321,10 +12447,9 @@ const de_UpdateApprovalRuleTemplateContentOutput = ( output: any, context: __SerdeContext ): UpdateApprovalRuleTemplateContentOutput => { - return { - approvalRuleTemplate: - output.approvalRuleTemplate != null ? de_ApprovalRuleTemplate(output.approvalRuleTemplate, context) : undefined, - } as any; + return take(output, { + approvalRuleTemplate: (_: any) => de_ApprovalRuleTemplate(_, context), + }) as any; }; /** @@ -16334,10 +12459,9 @@ const de_UpdateApprovalRuleTemplateDescriptionOutput = ( output: any, context: __SerdeContext ): UpdateApprovalRuleTemplateDescriptionOutput => { - return { - approvalRuleTemplate: - output.approvalRuleTemplate != null ? de_ApprovalRuleTemplate(output.approvalRuleTemplate, context) : undefined, - } as any; + return take(output, { + approvalRuleTemplate: (_: any) => de_ApprovalRuleTemplate(_, context), + }) as any; }; /** @@ -16347,19 +12471,18 @@ const de_UpdateApprovalRuleTemplateNameOutput = ( output: any, context: __SerdeContext ): UpdateApprovalRuleTemplateNameOutput => { - return { - approvalRuleTemplate: - output.approvalRuleTemplate != null ? de_ApprovalRuleTemplate(output.approvalRuleTemplate, context) : undefined, - } as any; + return take(output, { + approvalRuleTemplate: (_: any) => de_ApprovalRuleTemplate(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateCommentOutput */ const de_UpdateCommentOutput = (output: any, context: __SerdeContext): UpdateCommentOutput => { - return { - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - } as any; + return take(output, { + comment: (_: any) => de_Comment(_, context), + }) as any; }; /** @@ -16369,9 +12492,9 @@ const de_UpdatePullRequestApprovalRuleContentOutput = ( output: any, context: __SerdeContext ): UpdatePullRequestApprovalRuleContentOutput => { - return { - approvalRule: output.approvalRule != null ? de_ApprovalRule(output.approvalRule, context) : undefined, - } as any; + return take(output, { + approvalRule: (_: any) => de_ApprovalRule(_, context), + }) as any; }; /** @@ -16381,39 +12504,30 @@ const de_UpdatePullRequestDescriptionOutput = ( output: any, context: __SerdeContext ): UpdatePullRequestDescriptionOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdatePullRequestStatusOutput */ const de_UpdatePullRequestStatusOutput = (output: any, context: __SerdeContext): UpdatePullRequestStatusOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdatePullRequestTitleOutput */ const de_UpdatePullRequestTitleOutput = (output: any, context: __SerdeContext): UpdatePullRequestTitleOutput => { - return { - pullRequest: output.pullRequest != null ? de_PullRequest(output.pullRequest, context) : undefined, - } as any; + return take(output, { + pullRequest: (_: any) => de_PullRequest(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UserInfo - */ -const de_UserInfo = (output: any, context: __SerdeContext): UserInfo => { - return { - date: __expectString(output.date), - email: __expectString(output.email), - name: __expectString(output.name), - } as any; -}; +// de_UserInfo omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -16435,6 +12549,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-codedeploy/src/protocols/Aws_json1_1.ts b/clients/client-codedeploy/src/protocols/Aws_json1_1.ts index 963939c453c1..826e1a655c1e 100644 --- a/clients/client-codedeploy/src/protocols/Aws_json1_1.ts +++ b/clients/client-codedeploy/src/protocols/Aws_json1_1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -184,7 +185,6 @@ import { ArnNotSupportedException, AutoRollbackConfiguration, AutoRollbackEvent, - AutoScalingGroup, BatchGetApplicationRevisionsInput, BatchGetApplicationRevisionsOutput, BatchGetApplicationsInput, @@ -206,21 +206,14 @@ import { CloudFormationTarget, ContinueDeploymentInput, CreateApplicationInput, - CreateApplicationOutput, CreateDeploymentConfigInput, - CreateDeploymentConfigOutput, CreateDeploymentGroupInput, - CreateDeploymentGroupOutput, CreateDeploymentInput, - CreateDeploymentOutput, DeleteApplicationInput, DeleteDeploymentConfigInput, DeleteDeploymentGroupInput, - DeleteDeploymentGroupOutput, DeleteGitHubAccountTokenInput, - DeleteGitHubAccountTokenOutput, DeleteResourcesByExternalIdInput, - DeleteResourcesByExternalIdOutput, DeploymentAlreadyCompletedException, DeploymentConfigAlreadyExistsException, DeploymentConfigDoesNotExistException, @@ -239,7 +232,6 @@ import { DeploymentIsNotInReadyStateException, DeploymentLimitExceededException, DeploymentNotStartedException, - DeploymentOverview, DeploymentReadyOption, DeploymentStatus, DeploymentStyle, @@ -249,7 +241,6 @@ import { DeploymentTargetListSizeExceededException, DeregisterOnPremisesInstanceInput, DescriptionTooLongException, - Diagnostics, EC2TagFilter, EC2TagSet, ECSService, @@ -257,7 +248,6 @@ import { ECSTarget, ECSTaskSet, ELBInfo, - ErrorInformation, GenericRevisionInfo, GetApplicationInput, GetApplicationOutput, @@ -354,36 +344,24 @@ import { LifecycleEventAlreadyCompletedException, LifecycleHookLimitExceededException, ListApplicationRevisionsInput, - ListApplicationRevisionsOutput, ListApplicationsInput, - ListApplicationsOutput, ListDeploymentConfigsInput, - ListDeploymentConfigsOutput, ListDeploymentGroupsInput, - ListDeploymentGroupsOutput, ListDeploymentInstancesInput, - ListDeploymentInstancesOutput, ListDeploymentsInput, - ListDeploymentsOutput, ListDeploymentTargetsInput, - ListDeploymentTargetsOutput, ListGitHubAccountTokenNamesInput, - ListGitHubAccountTokenNamesOutput, ListOnPremisesInstancesInput, - ListOnPremisesInstancesOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, LoadBalancerInfo, MinimumHealthyHosts, MultipleIamArnsProvidedException, OnPremisesTagSet, OperationNotSupportedException, PutLifecycleEventHookExecutionStatusInput, - PutLifecycleEventHookExecutionStatusOutput, RawString, RegisterApplicationRevisionInput, RegisterOnPremisesInstanceInput, - RelatedDeployments, RemoveTagsFromOnPremisesInstancesInput, ResourceArnRequiredException, ResourceValidationException, @@ -392,19 +370,15 @@ import { RevisionLocation, RevisionRequiredException, RoleRequiredException, - RollbackInfo, S3Location, SkipWaitTimeForInstanceTerminationInput, StopDeploymentInput, - StopDeploymentOutput, Tag, TagFilter, TagLimitExceededException, TagRequiredException, TagResourceInput, - TagResourceOutput, TagSetListLimitExceededException, - TargetFilterName, TargetGroupInfo, TargetGroupPairInfo, TargetInstances, @@ -419,10 +393,8 @@ import { TriggerTargetsLimitExceededException, UnsupportedActionForDeploymentTypeException, UntagResourceInput, - UntagResourceOutput, UpdateApplicationInput, UpdateDeploymentGroupInput, - UpdateDeploymentGroupOutput, } from "../models/models_0"; /** @@ -434,7 +406,7 @@ export const se_AddTagsToOnPremisesInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToOnPremisesInstances"); let body: any; - body = JSON.stringify(se_AddTagsToOnPremisesInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -447,7 +419,7 @@ export const se_BatchGetApplicationRevisionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetApplicationRevisions"); let body: any; - body = JSON.stringify(se_BatchGetApplicationRevisionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -460,7 +432,7 @@ export const se_BatchGetApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetApplications"); let body: any; - body = JSON.stringify(se_BatchGetApplicationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -473,7 +445,7 @@ export const se_BatchGetDeploymentGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetDeploymentGroups"); let body: any; - body = JSON.stringify(se_BatchGetDeploymentGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -486,7 +458,7 @@ export const se_BatchGetDeploymentInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetDeploymentInstances"); let body: any; - body = JSON.stringify(se_BatchGetDeploymentInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -499,7 +471,7 @@ export const se_BatchGetDeploymentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetDeployments"); let body: any; - body = JSON.stringify(se_BatchGetDeploymentsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -512,7 +484,7 @@ export const se_BatchGetDeploymentTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetDeploymentTargets"); let body: any; - body = JSON.stringify(se_BatchGetDeploymentTargetsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -525,7 +497,7 @@ export const se_BatchGetOnPremisesInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetOnPremisesInstances"); let body: any; - body = JSON.stringify(se_BatchGetOnPremisesInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -538,7 +510,7 @@ export const se_ContinueDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ContinueDeployment"); let body: any; - body = JSON.stringify(se_ContinueDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -551,7 +523,7 @@ export const se_CreateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplication"); let body: any; - body = JSON.stringify(se_CreateApplicationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -564,7 +536,7 @@ export const se_CreateDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDeployment"); let body: any; - body = JSON.stringify(se_CreateDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -577,7 +549,7 @@ export const se_CreateDeploymentConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDeploymentConfig"); let body: any; - body = JSON.stringify(se_CreateDeploymentConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -590,7 +562,7 @@ export const se_CreateDeploymentGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDeploymentGroup"); let body: any; - body = JSON.stringify(se_CreateDeploymentGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -603,7 +575,7 @@ export const se_DeleteApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplication"); let body: any; - body = JSON.stringify(se_DeleteApplicationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -616,7 +588,7 @@ export const se_DeleteDeploymentConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDeploymentConfig"); let body: any; - body = JSON.stringify(se_DeleteDeploymentConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -629,7 +601,7 @@ export const se_DeleteDeploymentGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDeploymentGroup"); let body: any; - body = JSON.stringify(se_DeleteDeploymentGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -642,7 +614,7 @@ export const se_DeleteGitHubAccountTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGitHubAccountToken"); let body: any; - body = JSON.stringify(se_DeleteGitHubAccountTokenInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -655,7 +627,7 @@ export const se_DeleteResourcesByExternalIdCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcesByExternalId"); let body: any; - body = JSON.stringify(se_DeleteResourcesByExternalIdInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -668,7 +640,7 @@ export const se_DeregisterOnPremisesInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterOnPremisesInstance"); let body: any; - body = JSON.stringify(se_DeregisterOnPremisesInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -681,7 +653,7 @@ export const se_GetApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetApplication"); let body: any; - body = JSON.stringify(se_GetApplicationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -694,7 +666,7 @@ export const se_GetApplicationRevisionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetApplicationRevision"); let body: any; - body = JSON.stringify(se_GetApplicationRevisionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -707,7 +679,7 @@ export const se_GetDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeployment"); let body: any; - body = JSON.stringify(se_GetDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -720,7 +692,7 @@ export const se_GetDeploymentConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeploymentConfig"); let body: any; - body = JSON.stringify(se_GetDeploymentConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -733,7 +705,7 @@ export const se_GetDeploymentGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeploymentGroup"); let body: any; - body = JSON.stringify(se_GetDeploymentGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -746,7 +718,7 @@ export const se_GetDeploymentInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeploymentInstance"); let body: any; - body = JSON.stringify(se_GetDeploymentInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -759,7 +731,7 @@ export const se_GetDeploymentTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeploymentTarget"); let body: any; - body = JSON.stringify(se_GetDeploymentTargetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -772,7 +744,7 @@ export const se_GetOnPremisesInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOnPremisesInstance"); let body: any; - body = JSON.stringify(se_GetOnPremisesInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -785,7 +757,7 @@ export const se_ListApplicationRevisionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplicationRevisions"); let body: any; - body = JSON.stringify(se_ListApplicationRevisionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -798,7 +770,7 @@ export const se_ListApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplications"); let body: any; - body = JSON.stringify(se_ListApplicationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -811,7 +783,7 @@ export const se_ListDeploymentConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeploymentConfigs"); let body: any; - body = JSON.stringify(se_ListDeploymentConfigsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -824,7 +796,7 @@ export const se_ListDeploymentGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeploymentGroups"); let body: any; - body = JSON.stringify(se_ListDeploymentGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -837,7 +809,7 @@ export const se_ListDeploymentInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeploymentInstances"); let body: any; - body = JSON.stringify(se_ListDeploymentInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -863,7 +835,7 @@ export const se_ListDeploymentTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeploymentTargets"); let body: any; - body = JSON.stringify(se_ListDeploymentTargetsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -876,7 +848,7 @@ export const se_ListGitHubAccountTokenNamesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGitHubAccountTokenNames"); let body: any; - body = JSON.stringify(se_ListGitHubAccountTokenNamesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -889,7 +861,7 @@ export const se_ListOnPremisesInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOnPremisesInstances"); let body: any; - body = JSON.stringify(se_ListOnPremisesInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -902,7 +874,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -915,7 +887,7 @@ export const se_PutLifecycleEventHookExecutionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLifecycleEventHookExecutionStatus"); let body: any; - body = JSON.stringify(se_PutLifecycleEventHookExecutionStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -928,7 +900,7 @@ export const se_RegisterApplicationRevisionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterApplicationRevision"); let body: any; - body = JSON.stringify(se_RegisterApplicationRevisionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -941,7 +913,7 @@ export const se_RegisterOnPremisesInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterOnPremisesInstance"); let body: any; - body = JSON.stringify(se_RegisterOnPremisesInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -954,7 +926,7 @@ export const se_RemoveTagsFromOnPremisesInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromOnPremisesInstances"); let body: any; - body = JSON.stringify(se_RemoveTagsFromOnPremisesInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -967,7 +939,7 @@ export const se_SkipWaitTimeForInstanceTerminationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SkipWaitTimeForInstanceTermination"); let body: any; - body = JSON.stringify(se_SkipWaitTimeForInstanceTerminationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -980,7 +952,7 @@ export const se_StopDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopDeployment"); let body: any; - body = JSON.stringify(se_StopDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -993,7 +965,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1006,7 +978,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1019,7 +991,7 @@ export const se_UpdateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplication"); let body: any; - body = JSON.stringify(se_UpdateApplicationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1032,7 +1004,7 @@ export const se_UpdateDeploymentGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDeploymentGroup"); let body: any; - body = JSON.stringify(se_UpdateDeploymentGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1050,7 +1022,7 @@ export const de_AddTagsToOnPremisesInstancesCommand = async ( const response: AddTagsToOnPremisesInstancesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1089,10 +1061,9 @@ const de_AddTagsToOnPremisesInstancesCommandError = async ( throw await de_TagRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1115,7 +1086,7 @@ export const de_BatchGetApplicationRevisionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1151,10 +1122,9 @@ const de_BatchGetApplicationRevisionsCommandError = async ( throw await de_RevisionRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1177,7 +1147,7 @@ export const de_BatchGetApplicationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1207,10 +1177,9 @@ const de_BatchGetApplicationsCommandError = async ( throw await de_InvalidApplicationNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1233,7 +1202,7 @@ export const de_BatchGetDeploymentGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1272,10 +1241,9 @@ const de_BatchGetDeploymentGroupsCommandError = async ( throw await de_InvalidDeploymentGroupNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,7 +1266,7 @@ export const de_BatchGetDeploymentInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1337,10 +1305,9 @@ const de_BatchGetDeploymentInstancesCommandError = async ( throw await de_InvalidInstanceNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1363,7 +1330,7 @@ export const de_BatchGetDeploymentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1390,10 +1357,9 @@ const de_BatchGetDeploymentsCommandError = async ( throw await de_InvalidDeploymentIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1416,7 +1382,7 @@ export const de_BatchGetDeploymentTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1461,10 +1427,9 @@ const de_BatchGetDeploymentTargetsCommandError = async ( throw await de_InvalidDeploymentTargetIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1487,7 +1452,7 @@ export const de_BatchGetOnPremisesInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1514,10 +1479,9 @@ const de_BatchGetOnPremisesInstancesCommandError = async ( throw await de_InvalidInstanceNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1537,7 +1501,7 @@ export const de_ContinueDeploymentCommand = async ( const response: ContinueDeploymentCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1579,10 +1543,9 @@ const de_ContinueDeploymentCommandError = async ( throw await de_UnsupportedActionForDeploymentTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1600,12 +1563,12 @@ export const de_CreateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateApplicationOutput(data, context); + contents = _json(data); const response: CreateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1641,10 +1604,9 @@ const de_CreateApplicationCommandError = async ( throw await de_InvalidTagsToAddExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1662,12 +1624,12 @@ export const de_CreateDeploymentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDeploymentOutput(data, context); + contents = _json(data); const response: CreateDeploymentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1763,10 +1725,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,12 +1745,12 @@ export const de_CreateDeploymentConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDeploymentConfigOutput(data, context); + contents = _json(data); const response: CreateDeploymentConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1828,10 +1789,9 @@ const de_CreateDeploymentConfigCommandError = async ( throw await de_InvalidTrafficRoutingConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1849,12 +1809,12 @@ export const de_CreateDeploymentGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDeploymentGroupOutput(data, context); + contents = _json(data); const response: CreateDeploymentGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1971,10 +1931,9 @@ const de_CreateDeploymentGroupCommandError = async ( throw await de_TriggerTargetsLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1994,7 +1953,7 @@ export const de_DeleteApplicationCommand = async ( const response: DeleteApplicationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2021,10 +1980,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_InvalidRoleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2044,7 +2002,7 @@ export const de_DeleteDeploymentConfigCommand = async ( const response: DeleteDeploymentConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2074,10 +2032,9 @@ const de_DeleteDeploymentConfigCommandError = async ( throw await de_InvalidOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2095,12 +2052,12 @@ export const de_DeleteDeploymentGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDeploymentGroupOutput(data, context); + contents = _json(data); const response: DeleteDeploymentGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2133,10 +2090,9 @@ const de_DeleteDeploymentGroupCommandError = async ( throw await de_InvalidRoleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2154,12 +2110,12 @@ export const de_DeleteGitHubAccountTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGitHubAccountTokenOutput(data, context); + contents = _json(data); const response: DeleteGitHubAccountTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2192,10 +2148,9 @@ const de_DeleteGitHubAccountTokenCommandError = async ( throw await de_ResourceValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2213,12 +2168,12 @@ export const de_DeleteResourcesByExternalIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcesByExternalIdOutput(data, context); + contents = _json(data); const response: DeleteResourcesByExternalIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2234,10 +2189,9 @@ const de_DeleteResourcesByExternalIdCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2256,7 +2210,7 @@ export const de_DeregisterOnPremisesInstanceCommand = async ( const response: DeregisterOnPremisesInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2280,10 +2234,9 @@ const de_DeregisterOnPremisesInstanceCommandError = async ( throw await de_InvalidInstanceNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2306,7 +2259,7 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2333,10 +2286,9 @@ const de_GetApplicationCommandError = async ( throw await de_InvalidApplicationNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2359,7 +2311,7 @@ export const de_GetApplicationRevisionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2395,10 +2347,9 @@ const de_GetApplicationRevisionCommandError = async ( throw await de_RevisionRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2421,7 +2372,7 @@ export const de_GetDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2448,10 +2399,9 @@ const de_GetDeploymentCommandError = async ( throw await de_InvalidDeploymentIdExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2474,7 +2424,7 @@ export const de_GetDeploymentConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2504,10 +2454,9 @@ const de_GetDeploymentConfigCommandError = async ( throw await de_InvalidDeploymentConfigNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2530,7 +2479,7 @@ export const de_GetDeploymentGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2569,10 +2518,9 @@ const de_GetDeploymentGroupCommandError = async ( throw await de_InvalidDeploymentGroupNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2595,7 +2543,7 @@ export const de_GetDeploymentInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2634,10 +2582,9 @@ const de_GetDeploymentInstanceCommandError = async ( throw await de_InvalidInstanceNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2660,7 +2607,7 @@ export const de_GetDeploymentTargetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2702,10 +2649,9 @@ const de_GetDeploymentTargetCommandError = async ( throw await de_InvalidInstanceNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2728,7 +2674,7 @@ export const de_GetOnPremisesInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2755,10 +2701,9 @@ const de_GetOnPremisesInstanceCommandError = async ( throw await de_InvalidInstanceNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2776,12 +2721,12 @@ export const de_ListApplicationRevisionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationRevisionsOutput(data, context); + contents = _json(data); const response: ListApplicationRevisionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2829,10 +2774,9 @@ const de_ListApplicationRevisionsCommandError = async ( throw await de_InvalidSortOrderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2850,12 +2794,12 @@ export const de_ListApplicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationsOutput(data, context); + contents = _json(data); const response: ListApplicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2876,10 +2820,9 @@ const de_ListApplicationsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2897,12 +2840,12 @@ export const de_ListDeploymentConfigsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeploymentConfigsOutput(data, context); + contents = _json(data); const response: ListDeploymentConfigsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2923,10 +2866,9 @@ const de_ListDeploymentConfigsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2944,12 +2886,12 @@ export const de_ListDeploymentGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeploymentGroupsOutput(data, context); + contents = _json(data); const response: ListDeploymentGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2979,10 +2921,9 @@ const de_ListDeploymentGroupsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3000,12 +2941,12 @@ export const de_ListDeploymentInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeploymentInstancesOutput(data, context); + contents = _json(data); const response: ListDeploymentInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3053,10 +2994,9 @@ const de_ListDeploymentInstancesCommandError = async ( throw await de_InvalidTargetFilterNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3074,12 +3014,12 @@ export const de_ListDeploymentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeploymentsOutput(data, context); + contents = _json(data); const response: ListDeploymentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3130,10 +3070,9 @@ const de_ListDeploymentsCommandError = async ( throw await de_InvalidTimeRangeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3151,12 +3090,12 @@ export const de_ListDeploymentTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeploymentTargetsOutput(data, context); + contents = _json(data); const response: ListDeploymentTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3198,10 +3137,9 @@ const de_ListDeploymentTargetsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3219,12 +3157,12 @@ export const de_ListGitHubAccountTokenNamesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGitHubAccountTokenNamesOutput(data, context); + contents = _json(data); const response: ListGitHubAccountTokenNamesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3251,10 +3189,9 @@ const de_ListGitHubAccountTokenNamesCommandError = async ( throw await de_ResourceValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3272,12 +3209,12 @@ export const de_ListOnPremisesInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListOnPremisesInstancesOutput(data, context); + contents = _json(data); const response: ListOnPremisesInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3304,10 +3241,9 @@ const de_ListOnPremisesInstancesCommandError = async ( throw await de_InvalidTagFilterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3325,12 +3261,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3357,10 +3293,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceArnRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3378,12 +3313,12 @@ export const de_PutLifecycleEventHookExecutionStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLifecycleEventHookExecutionStatusOutput(data, context); + contents = _json(data); const response: PutLifecycleEventHookExecutionStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3422,10 +3357,9 @@ const de_PutLifecycleEventHookExecutionStatusCommandError = async ( throw await de_UnsupportedActionForDeploymentTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3445,7 +3379,7 @@ export const de_RegisterApplicationRevisionCommand = async ( const response: RegisterApplicationRevisionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3481,10 +3415,9 @@ const de_RegisterApplicationRevisionCommandError = async ( throw await de_RevisionRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3504,7 +3437,7 @@ export const de_RegisterOnPremisesInstanceCommand = async ( const response: RegisterOnPremisesInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3552,10 +3485,9 @@ const de_RegisterOnPremisesInstanceCommandError = async ( throw await de_MultipleIamArnsProvidedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3575,7 +3507,7 @@ export const de_RemoveTagsFromOnPremisesInstancesCommand = async ( const response: RemoveTagsFromOnPremisesInstancesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3614,10 +3546,9 @@ const de_RemoveTagsFromOnPremisesInstancesCommandError = async ( throw await de_TagRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3637,7 +3568,7 @@ export const de_SkipWaitTimeForInstanceTerminationCommand = async ( const response: SkipWaitTimeForInstanceTerminationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3673,10 +3604,9 @@ const de_SkipWaitTimeForInstanceTerminationCommandError = async ( throw await de_UnsupportedActionForDeploymentTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3694,12 +3624,12 @@ export const de_StopDeploymentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopDeploymentOutput(data, context); + contents = _json(data); const response: StopDeploymentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3735,10 +3665,9 @@ const de_StopDeploymentCommandError = async ( throw await de_UnsupportedActionForDeploymentTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3756,12 +3685,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3803,10 +3732,9 @@ const de_TagResourceCommandError = async ( throw await de_TagRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3824,12 +3752,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3871,10 +3799,9 @@ const de_UntagResourceCommandError = async ( throw await de_TagRequiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3894,7 +3821,7 @@ export const de_UpdateApplicationCommand = async ( const response: UpdateApplicationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3924,10 +3851,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_InvalidApplicationNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3945,12 +3871,12 @@ export const de_UpdateDeploymentGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDeploymentGroupOutput(data, context); + contents = _json(data); const response: UpdateDeploymentGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4061,10 +3987,9 @@ const de_UpdateDeploymentGroupCommandError = async ( throw await de_TriggerTargetsLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4078,7 +4003,7 @@ const de_AlarmsLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlarmsLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new AlarmsLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4094,7 +4019,7 @@ const de_ApplicationAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApplicationAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ApplicationAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4110,7 +4035,7 @@ const de_ApplicationDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApplicationDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ApplicationDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4126,7 +4051,7 @@ const de_ApplicationLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApplicationLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ApplicationLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4142,7 +4067,7 @@ const de_ApplicationNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApplicationNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ApplicationNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4158,7 +4083,7 @@ const de_ArnNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ArnNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new ArnNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4174,7 +4099,7 @@ const de_BatchLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BatchLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new BatchLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4190,7 +4115,7 @@ const de_BucketNameFilterRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BucketNameFilterRequiredException(body, context); + const deserialized: any = _json(body); const exception = new BucketNameFilterRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4206,7 +4131,7 @@ const de_DeploymentAlreadyCompletedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentAlreadyCompletedException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentAlreadyCompletedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4222,7 +4147,7 @@ const de_DeploymentConfigAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentConfigAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentConfigAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4238,7 +4163,7 @@ const de_DeploymentConfigDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentConfigDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentConfigDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4254,7 +4179,7 @@ const de_DeploymentConfigInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentConfigInUseException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentConfigInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4270,7 +4195,7 @@ const de_DeploymentConfigLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentConfigLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentConfigLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4286,7 +4211,7 @@ const de_DeploymentConfigNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentConfigNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentConfigNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4302,7 +4227,7 @@ const de_DeploymentDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4318,7 +4243,7 @@ const de_DeploymentGroupAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentGroupAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentGroupAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4334,7 +4259,7 @@ const de_DeploymentGroupDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentGroupDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentGroupDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4350,7 +4275,7 @@ const de_DeploymentGroupLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentGroupLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentGroupLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4366,7 +4291,7 @@ const de_DeploymentGroupNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentGroupNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentGroupNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4382,7 +4307,7 @@ const de_DeploymentIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4398,7 +4323,7 @@ const de_DeploymentIsNotInReadyStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentIsNotInReadyStateException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentIsNotInReadyStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4414,7 +4339,7 @@ const de_DeploymentLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4430,7 +4355,7 @@ const de_DeploymentNotStartedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentNotStartedException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentNotStartedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4446,7 +4371,7 @@ const de_DeploymentTargetDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentTargetDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentTargetDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4462,7 +4387,7 @@ const de_DeploymentTargetIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentTargetIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentTargetIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4478,7 +4403,7 @@ const de_DeploymentTargetListSizeExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeploymentTargetListSizeExceededException(body, context); + const deserialized: any = _json(body); const exception = new DeploymentTargetListSizeExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4494,7 +4419,7 @@ const de_DescriptionTooLongExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DescriptionTooLongException(body, context); + const deserialized: any = _json(body); const exception = new DescriptionTooLongException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4510,7 +4435,7 @@ const de_ECSServiceMappingLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ECSServiceMappingLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ECSServiceMappingLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4526,7 +4451,7 @@ const de_GitHubAccountTokenDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GitHubAccountTokenDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new GitHubAccountTokenDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4542,7 +4467,7 @@ const de_GitHubAccountTokenNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GitHubAccountTokenNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new GitHubAccountTokenNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4558,7 +4483,7 @@ const de_IamArnRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IamArnRequiredException(body, context); + const deserialized: any = _json(body); const exception = new IamArnRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4574,7 +4499,7 @@ const de_IamSessionArnAlreadyRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IamSessionArnAlreadyRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new IamSessionArnAlreadyRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4590,7 +4515,7 @@ const de_IamUserArnAlreadyRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IamUserArnAlreadyRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new IamUserArnAlreadyRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4606,7 +4531,7 @@ const de_IamUserArnRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IamUserArnRequiredException(body, context); + const deserialized: any = _json(body); const exception = new IamUserArnRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4622,7 +4547,7 @@ const de_InstanceDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new InstanceDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4638,7 +4563,7 @@ const de_InstanceIdRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceIdRequiredException(body, context); + const deserialized: any = _json(body); const exception = new InstanceIdRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4654,7 +4579,7 @@ const de_InstanceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new InstanceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4670,7 +4595,7 @@ const de_InstanceNameAlreadyRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceNameAlreadyRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new InstanceNameAlreadyRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4686,7 +4611,7 @@ const de_InstanceNameRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceNameRequiredException(body, context); + const deserialized: any = _json(body); const exception = new InstanceNameRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4702,7 +4627,7 @@ const de_InstanceNotRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceNotRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new InstanceNotRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4718,7 +4643,7 @@ const de_InvalidAlarmConfigExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAlarmConfigException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAlarmConfigException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4734,7 +4659,7 @@ const de_InvalidApplicationNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApplicationNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApplicationNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4747,7 +4672,7 @@ const de_InvalidApplicationNameExceptionRes = async ( */ const de_InvalidArnExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4763,7 +4688,7 @@ const de_InvalidAutoRollbackConfigExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAutoRollbackConfigException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAutoRollbackConfigException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4779,7 +4704,7 @@ const de_InvalidAutoScalingGroupExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAutoScalingGroupException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAutoScalingGroupException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4795,7 +4720,7 @@ const de_InvalidBlueGreenDeploymentConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidBlueGreenDeploymentConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidBlueGreenDeploymentConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4811,7 +4736,7 @@ const de_InvalidBucketNameFilterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidBucketNameFilterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidBucketNameFilterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4827,7 +4752,7 @@ const de_InvalidComputePlatformExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidComputePlatformException(body, context); + const deserialized: any = _json(body); const exception = new InvalidComputePlatformException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4843,7 +4768,7 @@ const de_InvalidDeployedStateFilterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeployedStateFilterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeployedStateFilterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4859,7 +4784,7 @@ const de_InvalidDeploymentConfigNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentConfigNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentConfigNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4875,7 +4800,7 @@ const de_InvalidDeploymentGroupNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentGroupNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentGroupNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4891,7 +4816,7 @@ const de_InvalidDeploymentIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4907,7 +4832,7 @@ const de_InvalidDeploymentInstanceTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentInstanceTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentInstanceTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4923,7 +4848,7 @@ const de_InvalidDeploymentStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4939,7 +4864,7 @@ const de_InvalidDeploymentStyleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentStyleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentStyleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4955,7 +4880,7 @@ const de_InvalidDeploymentTargetIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentTargetIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentTargetIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4971,7 +4896,7 @@ const de_InvalidDeploymentWaitTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeploymentWaitTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeploymentWaitTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4987,7 +4912,7 @@ const de_InvalidEC2TagCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEC2TagCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEC2TagCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5003,7 +4928,7 @@ const de_InvalidEC2TagExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEC2TagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEC2TagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5019,7 +4944,7 @@ const de_InvalidECSServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidECSServiceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidECSServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5035,7 +4960,7 @@ const de_InvalidExternalIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidExternalIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidExternalIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5051,7 +4976,7 @@ const de_InvalidFileExistsBehaviorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFileExistsBehaviorException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFileExistsBehaviorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5067,7 +4992,7 @@ const de_InvalidGitHubAccountTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGitHubAccountTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidGitHubAccountTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5083,7 +5008,7 @@ const de_InvalidGitHubAccountTokenNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGitHubAccountTokenNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidGitHubAccountTokenNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5099,7 +5024,7 @@ const de_InvalidIamSessionArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidIamSessionArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidIamSessionArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5115,7 +5040,7 @@ const de_InvalidIamUserArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidIamUserArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidIamUserArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5131,7 +5056,7 @@ const de_InvalidIgnoreApplicationStopFailuresValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidIgnoreApplicationStopFailuresValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidIgnoreApplicationStopFailuresValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5147,7 +5072,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5163,7 +5088,7 @@ const de_InvalidInstanceNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInstanceNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInstanceNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5179,7 +5104,7 @@ const de_InvalidInstanceStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInstanceStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInstanceStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5195,7 +5120,7 @@ const de_InvalidInstanceTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInstanceTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInstanceTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5211,7 +5136,7 @@ const de_InvalidKeyPrefixFilterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKeyPrefixFilterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidKeyPrefixFilterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5227,7 +5152,7 @@ const de_InvalidLifecycleEventHookExecutionIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLifecycleEventHookExecutionIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLifecycleEventHookExecutionIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5243,7 +5168,7 @@ const de_InvalidLifecycleEventHookExecutionStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLifecycleEventHookExecutionStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLifecycleEventHookExecutionStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5259,7 +5184,7 @@ const de_InvalidLoadBalancerInfoExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLoadBalancerInfoException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLoadBalancerInfoException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5275,7 +5200,7 @@ const de_InvalidMinimumHealthyHostValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMinimumHealthyHostValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMinimumHealthyHostValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5291,7 +5216,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5307,7 +5232,7 @@ const de_InvalidOnPremisesTagCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOnPremisesTagCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOnPremisesTagCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5323,7 +5248,7 @@ const de_InvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5339,7 +5264,7 @@ const de_InvalidRegistrationStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRegistrationStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRegistrationStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5355,7 +5280,7 @@ const de_InvalidRevisionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRevisionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRevisionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5371,7 +5296,7 @@ const de_InvalidRoleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRoleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRoleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5387,7 +5312,7 @@ const de_InvalidSortByExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSortByException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSortByException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5403,7 +5328,7 @@ const de_InvalidSortOrderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSortOrderException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSortOrderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5416,7 +5341,7 @@ const de_InvalidSortOrderExceptionRes = async ( */ const de_InvalidTagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5432,7 +5357,7 @@ const de_InvalidTagFilterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagFilterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagFilterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5448,7 +5373,7 @@ const de_InvalidTagsToAddExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagsToAddException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagsToAddException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5464,7 +5389,7 @@ const de_InvalidTargetFilterNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetFilterNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetFilterNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5480,7 +5405,7 @@ const de_InvalidTargetGroupPairExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetGroupPairException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetGroupPairException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5496,7 +5421,7 @@ const de_InvalidTargetInstancesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetInstancesException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetInstancesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5512,7 +5437,7 @@ const de_InvalidTimeRangeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTimeRangeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTimeRangeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5528,7 +5453,7 @@ const de_InvalidTrafficRoutingConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTrafficRoutingConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTrafficRoutingConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5544,7 +5469,7 @@ const de_InvalidTriggerConfigExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTriggerConfigException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTriggerConfigException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5560,7 +5485,7 @@ const de_InvalidUpdateOutdatedInstancesOnlyValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUpdateOutdatedInstancesOnlyValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidUpdateOutdatedInstancesOnlyValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5576,7 +5501,7 @@ const de_LifecycleEventAlreadyCompletedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LifecycleEventAlreadyCompletedException(body, context); + const deserialized: any = _json(body); const exception = new LifecycleEventAlreadyCompletedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5592,7 +5517,7 @@ const de_LifecycleHookLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LifecycleHookLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LifecycleHookLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5608,7 +5533,7 @@ const de_MultipleIamArnsProvidedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MultipleIamArnsProvidedException(body, context); + const deserialized: any = _json(body); const exception = new MultipleIamArnsProvidedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5624,7 +5549,7 @@ const de_OperationNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5640,7 +5565,7 @@ const de_ResourceArnRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceArnRequiredException(body, context); + const deserialized: any = _json(body); const exception = new ResourceArnRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5656,7 +5581,7 @@ const de_ResourceValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceValidationException(body, context); + const deserialized: any = _json(body); const exception = new ResourceValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5672,7 +5597,7 @@ const de_RevisionDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RevisionDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new RevisionDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5688,7 +5613,7 @@ const de_RevisionRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RevisionRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RevisionRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5704,7 +5629,7 @@ const de_RoleRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RoleRequiredException(body, context); + const deserialized: any = _json(body); const exception = new RoleRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5720,7 +5645,7 @@ const de_TagLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TagLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5736,7 +5661,7 @@ const de_TagRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagRequiredException(body, context); + const deserialized: any = _json(body); const exception = new TagRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5752,7 +5677,7 @@ const de_TagSetListLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagSetListLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TagSetListLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5765,7 +5690,7 @@ const de_TagSetListLimitExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5781,7 +5706,7 @@ const de_TriggerTargetsLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TriggerTargetsLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TriggerTargetsLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5797,7 +5722,7 @@ const de_UnsupportedActionForDeploymentTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedActionForDeploymentTypeException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedActionForDeploymentTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5805,4051 +5730,1156 @@ const de_UnsupportedActionForDeploymentTypeExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsToOnPremisesInstancesInput - */ -const se_AddTagsToOnPremisesInstancesInput = ( - input: AddTagsToOnPremisesInstancesInput, - context: __SerdeContext -): any => { - return { - ...(input.instanceNames != null && { instanceNames: se_InstanceNameList(input.instanceNames, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_AddTagsToOnPremisesInstancesInput omitted. -/** - * serializeAws_json1_1Alarm - */ -const se_Alarm = (input: Alarm, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_Alarm omitted. -/** - * serializeAws_json1_1AlarmConfiguration - */ -const se_AlarmConfiguration = (input: AlarmConfiguration, context: __SerdeContext): any => { - return { - ...(input.alarms != null && { alarms: se_AlarmList(input.alarms, context) }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.ignorePollAlarmFailure != null && { ignorePollAlarmFailure: input.ignorePollAlarmFailure }), - }; -}; +// se_AlarmConfiguration omitted. -/** - * serializeAws_json1_1AlarmList - */ -const se_AlarmList = (input: Alarm[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Alarm(entry, context); - }); -}; +// se_AlarmList omitted. -/** - * serializeAws_json1_1ApplicationsList - */ -const se_ApplicationsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationsList omitted. -/** - * serializeAws_json1_1AppSpecContent - */ -const se_AppSpecContent = (input: AppSpecContent, context: __SerdeContext): any => { - return { - ...(input.content != null && { content: input.content }), - ...(input.sha256 != null && { sha256: input.sha256 }), - }; -}; +// se_AppSpecContent omitted. -/** - * serializeAws_json1_1AutoRollbackConfiguration - */ -const se_AutoRollbackConfiguration = (input: AutoRollbackConfiguration, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.events != null && { events: se_AutoRollbackEventsList(input.events, context) }), - }; -}; +// se_AutoRollbackConfiguration omitted. -/** - * serializeAws_json1_1AutoRollbackEventsList - */ -const se_AutoRollbackEventsList = (input: (AutoRollbackEvent | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutoRollbackEventsList omitted. -/** - * serializeAws_json1_1AutoScalingGroupNameList - */ -const se_AutoScalingGroupNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutoScalingGroupNameList omitted. -/** - * serializeAws_json1_1BatchGetApplicationRevisionsInput - */ -const se_BatchGetApplicationRevisionsInput = ( - input: BatchGetApplicationRevisionsInput, - context: __SerdeContext -): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.revisions != null && { revisions: se_RevisionLocationList(input.revisions, context) }), - }; -}; +// se_BatchGetApplicationRevisionsInput omitted. -/** - * serializeAws_json1_1BatchGetApplicationsInput - */ -const se_BatchGetApplicationsInput = (input: BatchGetApplicationsInput, context: __SerdeContext): any => { - return { - ...(input.applicationNames != null && { applicationNames: se_ApplicationsList(input.applicationNames, context) }), - }; -}; +// se_BatchGetApplicationsInput omitted. -/** - * serializeAws_json1_1BatchGetDeploymentGroupsInput - */ -const se_BatchGetDeploymentGroupsInput = (input: BatchGetDeploymentGroupsInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.deploymentGroupNames != null && { - deploymentGroupNames: se_DeploymentGroupsList(input.deploymentGroupNames, context), - }), - }; -}; +// se_BatchGetDeploymentGroupsInput omitted. -/** - * serializeAws_json1_1BatchGetDeploymentInstancesInput - */ -const se_BatchGetDeploymentInstancesInput = (input: BatchGetDeploymentInstancesInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.instanceIds != null && { instanceIds: se_InstancesList(input.instanceIds, context) }), - }; -}; +// se_BatchGetDeploymentInstancesInput omitted. -/** - * serializeAws_json1_1BatchGetDeploymentsInput - */ -const se_BatchGetDeploymentsInput = (input: BatchGetDeploymentsInput, context: __SerdeContext): any => { - return { - ...(input.deploymentIds != null && { deploymentIds: se_DeploymentsList(input.deploymentIds, context) }), - }; -}; +// se_BatchGetDeploymentsInput omitted. -/** - * serializeAws_json1_1BatchGetDeploymentTargetsInput - */ -const se_BatchGetDeploymentTargetsInput = (input: BatchGetDeploymentTargetsInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.targetIds != null && { targetIds: se_TargetIdList(input.targetIds, context) }), - }; -}; +// se_BatchGetDeploymentTargetsInput omitted. -/** - * serializeAws_json1_1BatchGetOnPremisesInstancesInput - */ -const se_BatchGetOnPremisesInstancesInput = (input: BatchGetOnPremisesInstancesInput, context: __SerdeContext): any => { - return { - ...(input.instanceNames != null && { instanceNames: se_InstanceNameList(input.instanceNames, context) }), - }; -}; +// se_BatchGetOnPremisesInstancesInput omitted. -/** - * serializeAws_json1_1BlueGreenDeploymentConfiguration - */ -const se_BlueGreenDeploymentConfiguration = (input: BlueGreenDeploymentConfiguration, context: __SerdeContext): any => { - return { - ...(input.deploymentReadyOption != null && { - deploymentReadyOption: se_DeploymentReadyOption(input.deploymentReadyOption, context), - }), - ...(input.greenFleetProvisioningOption != null && { - greenFleetProvisioningOption: se_GreenFleetProvisioningOption(input.greenFleetProvisioningOption, context), - }), - ...(input.terminateBlueInstancesOnDeploymentSuccess != null && { - terminateBlueInstancesOnDeploymentSuccess: se_BlueInstanceTerminationOption( - input.terminateBlueInstancesOnDeploymentSuccess, - context - ), - }), - }; -}; +// se_BlueGreenDeploymentConfiguration omitted. -/** - * serializeAws_json1_1BlueInstanceTerminationOption - */ -const se_BlueInstanceTerminationOption = (input: BlueInstanceTerminationOption, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.terminationWaitTimeInMinutes != null && { - terminationWaitTimeInMinutes: input.terminationWaitTimeInMinutes, - }), - }; -}; +// se_BlueInstanceTerminationOption omitted. -/** - * serializeAws_json1_1ContinueDeploymentInput - */ -const se_ContinueDeploymentInput = (input: ContinueDeploymentInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.deploymentWaitType != null && { deploymentWaitType: input.deploymentWaitType }), - }; -}; +// se_ContinueDeploymentInput omitted. -/** - * serializeAws_json1_1CreateApplicationInput - */ -const se_CreateApplicationInput = (input: CreateApplicationInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.computePlatform != null && { computePlatform: input.computePlatform }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateApplicationInput omitted. -/** - * serializeAws_json1_1CreateDeploymentConfigInput - */ -const se_CreateDeploymentConfigInput = (input: CreateDeploymentConfigInput, context: __SerdeContext): any => { - return { - ...(input.computePlatform != null && { computePlatform: input.computePlatform }), - ...(input.deploymentConfigName != null && { deploymentConfigName: input.deploymentConfigName }), - ...(input.minimumHealthyHosts != null && { - minimumHealthyHosts: se_MinimumHealthyHosts(input.minimumHealthyHosts, context), - }), - ...(input.trafficRoutingConfig != null && { - trafficRoutingConfig: se_TrafficRoutingConfig(input.trafficRoutingConfig, context), - }), - }; -}; +// se_CreateDeploymentConfigInput omitted. -/** - * serializeAws_json1_1CreateDeploymentGroupInput - */ -const se_CreateDeploymentGroupInput = (input: CreateDeploymentGroupInput, context: __SerdeContext): any => { - return { - ...(input.alarmConfiguration != null && { - alarmConfiguration: se_AlarmConfiguration(input.alarmConfiguration, context), - }), - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.autoRollbackConfiguration != null && { - autoRollbackConfiguration: se_AutoRollbackConfiguration(input.autoRollbackConfiguration, context), - }), - ...(input.autoScalingGroups != null && { - autoScalingGroups: se_AutoScalingGroupNameList(input.autoScalingGroups, context), - }), - ...(input.blueGreenDeploymentConfiguration != null && { - blueGreenDeploymentConfiguration: se_BlueGreenDeploymentConfiguration( - input.blueGreenDeploymentConfiguration, - context - ), - }), - ...(input.deploymentConfigName != null && { deploymentConfigName: input.deploymentConfigName }), - ...(input.deploymentGroupName != null && { deploymentGroupName: input.deploymentGroupName }), - ...(input.deploymentStyle != null && { deploymentStyle: se_DeploymentStyle(input.deploymentStyle, context) }), - ...(input.ec2TagFilters != null && { ec2TagFilters: se_EC2TagFilterList(input.ec2TagFilters, context) }), - ...(input.ec2TagSet != null && { ec2TagSet: se_EC2TagSet(input.ec2TagSet, context) }), - ...(input.ecsServices != null && { ecsServices: se_ECSServiceList(input.ecsServices, context) }), - ...(input.loadBalancerInfo != null && { loadBalancerInfo: se_LoadBalancerInfo(input.loadBalancerInfo, context) }), - ...(input.onPremisesInstanceTagFilters != null && { - onPremisesInstanceTagFilters: se_TagFilterList(input.onPremisesInstanceTagFilters, context), - }), - ...(input.onPremisesTagSet != null && { onPremisesTagSet: se_OnPremisesTagSet(input.onPremisesTagSet, context) }), - ...(input.outdatedInstancesStrategy != null && { outdatedInstancesStrategy: input.outdatedInstancesStrategy }), - ...(input.serviceRoleArn != null && { serviceRoleArn: input.serviceRoleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.triggerConfigurations != null && { - triggerConfigurations: se_TriggerConfigList(input.triggerConfigurations, context), - }), - }; -}; +// se_CreateDeploymentGroupInput omitted. -/** - * serializeAws_json1_1CreateDeploymentInput - */ -const se_CreateDeploymentInput = (input: CreateDeploymentInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.autoRollbackConfiguration != null && { - autoRollbackConfiguration: se_AutoRollbackConfiguration(input.autoRollbackConfiguration, context), - }), - ...(input.deploymentConfigName != null && { deploymentConfigName: input.deploymentConfigName }), - ...(input.deploymentGroupName != null && { deploymentGroupName: input.deploymentGroupName }), - ...(input.description != null && { description: input.description }), - ...(input.fileExistsBehavior != null && { fileExistsBehavior: input.fileExistsBehavior }), - ...(input.ignoreApplicationStopFailures != null && { - ignoreApplicationStopFailures: input.ignoreApplicationStopFailures, - }), - ...(input.overrideAlarmConfiguration != null && { - overrideAlarmConfiguration: se_AlarmConfiguration(input.overrideAlarmConfiguration, context), - }), - ...(input.revision != null && { revision: se_RevisionLocation(input.revision, context) }), - ...(input.targetInstances != null && { targetInstances: se_TargetInstances(input.targetInstances, context) }), - ...(input.updateOutdatedInstancesOnly != null && { - updateOutdatedInstancesOnly: input.updateOutdatedInstancesOnly, - }), - }; -}; +// se_CreateDeploymentInput omitted. -/** - * serializeAws_json1_1DeleteApplicationInput - */ -const se_DeleteApplicationInput = (input: DeleteApplicationInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - }; -}; +// se_DeleteApplicationInput omitted. -/** - * serializeAws_json1_1DeleteDeploymentConfigInput - */ -const se_DeleteDeploymentConfigInput = (input: DeleteDeploymentConfigInput, context: __SerdeContext): any => { - return { - ...(input.deploymentConfigName != null && { deploymentConfigName: input.deploymentConfigName }), - }; -}; +// se_DeleteDeploymentConfigInput omitted. -/** - * serializeAws_json1_1DeleteDeploymentGroupInput - */ -const se_DeleteDeploymentGroupInput = (input: DeleteDeploymentGroupInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.deploymentGroupName != null && { deploymentGroupName: input.deploymentGroupName }), - }; -}; +// se_DeleteDeploymentGroupInput omitted. -/** - * serializeAws_json1_1DeleteGitHubAccountTokenInput - */ -const se_DeleteGitHubAccountTokenInput = (input: DeleteGitHubAccountTokenInput, context: __SerdeContext): any => { - return { - ...(input.tokenName != null && { tokenName: input.tokenName }), - }; -}; +// se_DeleteGitHubAccountTokenInput omitted. -/** - * serializeAws_json1_1DeleteResourcesByExternalIdInput - */ -const se_DeleteResourcesByExternalIdInput = (input: DeleteResourcesByExternalIdInput, context: __SerdeContext): any => { - return { - ...(input.externalId != null && { externalId: input.externalId }), - }; -}; +// se_DeleteResourcesByExternalIdInput omitted. -/** - * serializeAws_json1_1DeploymentGroupsList - */ -const se_DeploymentGroupsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeploymentGroupsList omitted. -/** - * serializeAws_json1_1DeploymentReadyOption - */ -const se_DeploymentReadyOption = (input: DeploymentReadyOption, context: __SerdeContext): any => { - return { - ...(input.actionOnTimeout != null && { actionOnTimeout: input.actionOnTimeout }), - ...(input.waitTimeInMinutes != null && { waitTimeInMinutes: input.waitTimeInMinutes }), - }; -}; +// se_DeploymentReadyOption omitted. -/** - * serializeAws_json1_1DeploymentsList - */ -const se_DeploymentsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeploymentsList omitted. -/** - * serializeAws_json1_1DeploymentStatusList - */ -const se_DeploymentStatusList = (input: (DeploymentStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeploymentStatusList omitted. -/** - * serializeAws_json1_1DeploymentStyle - */ -const se_DeploymentStyle = (input: DeploymentStyle, context: __SerdeContext): any => { - return { - ...(input.deploymentOption != null && { deploymentOption: input.deploymentOption }), - ...(input.deploymentType != null && { deploymentType: input.deploymentType }), - }; -}; +// se_DeploymentStyle omitted. -/** - * serializeAws_json1_1DeregisterOnPremisesInstanceInput - */ -const se_DeregisterOnPremisesInstanceInput = ( - input: DeregisterOnPremisesInstanceInput, - context: __SerdeContext -): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; +// se_DeregisterOnPremisesInstanceInput omitted. -/** - * serializeAws_json1_1EC2TagFilter - */ -const se_EC2TagFilter = (input: EC2TagFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_EC2TagFilter omitted. -/** - * serializeAws_json1_1EC2TagFilterList - */ -const se_EC2TagFilterList = (input: EC2TagFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EC2TagFilter(entry, context); - }); -}; +// se_EC2TagFilterList omitted. -/** - * serializeAws_json1_1EC2TagSet - */ -const se_EC2TagSet = (input: EC2TagSet, context: __SerdeContext): any => { - return { - ...(input.ec2TagSetList != null && { ec2TagSetList: se_EC2TagSetList(input.ec2TagSetList, context) }), - }; -}; +// se_EC2TagSet omitted. -/** - * serializeAws_json1_1EC2TagSetList - */ -const se_EC2TagSetList = (input: EC2TagFilter[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EC2TagFilterList(entry, context); - }); -}; +// se_EC2TagSetList omitted. -/** - * serializeAws_json1_1ECSService - */ -const se_ECSService = (input: ECSService, context: __SerdeContext): any => { - return { - ...(input.clusterName != null && { clusterName: input.clusterName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_ECSService omitted. -/** - * serializeAws_json1_1ECSServiceList - */ -const se_ECSServiceList = (input: ECSService[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ECSService(entry, context); - }); -}; +// se_ECSServiceList omitted. -/** - * serializeAws_json1_1ELBInfo - */ -const se_ELBInfo = (input: ELBInfo, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_ELBInfo omitted. -/** - * serializeAws_json1_1ELBInfoList - */ -const se_ELBInfoList = (input: ELBInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ELBInfo(entry, context); - }); -}; +// se_ELBInfoList omitted. -/** - * serializeAws_json1_1FilterValueList - */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValueList omitted. -/** - * serializeAws_json1_1GetApplicationInput - */ -const se_GetApplicationInput = (input: GetApplicationInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - }; -}; +// se_GetApplicationInput omitted. -/** - * serializeAws_json1_1GetApplicationRevisionInput - */ -const se_GetApplicationRevisionInput = (input: GetApplicationRevisionInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.revision != null && { revision: se_RevisionLocation(input.revision, context) }), - }; -}; +// se_GetApplicationRevisionInput omitted. -/** - * serializeAws_json1_1GetDeploymentConfigInput - */ -const se_GetDeploymentConfigInput = (input: GetDeploymentConfigInput, context: __SerdeContext): any => { - return { - ...(input.deploymentConfigName != null && { deploymentConfigName: input.deploymentConfigName }), - }; -}; +// se_GetDeploymentConfigInput omitted. -/** - * serializeAws_json1_1GetDeploymentGroupInput - */ -const se_GetDeploymentGroupInput = (input: GetDeploymentGroupInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.deploymentGroupName != null && { deploymentGroupName: input.deploymentGroupName }), - }; -}; +// se_GetDeploymentGroupInput omitted. -/** - * serializeAws_json1_1GetDeploymentInput - */ -const se_GetDeploymentInput = (input: GetDeploymentInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - }; -}; +// se_GetDeploymentInput omitted. -/** - * serializeAws_json1_1GetDeploymentInstanceInput - */ -const se_GetDeploymentInstanceInput = (input: GetDeploymentInstanceInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.instanceId != null && { instanceId: input.instanceId }), - }; -}; +// se_GetDeploymentInstanceInput omitted. -/** - * serializeAws_json1_1GetDeploymentTargetInput - */ -const se_GetDeploymentTargetInput = (input: GetDeploymentTargetInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.targetId != null && { targetId: input.targetId }), - }; -}; +// se_GetDeploymentTargetInput omitted. -/** - * serializeAws_json1_1GetOnPremisesInstanceInput - */ -const se_GetOnPremisesInstanceInput = (input: GetOnPremisesInstanceInput, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1GitHubLocation - */ -const se_GitHubLocation = (input: GitHubLocation, context: __SerdeContext): any => { - return { - ...(input.commitId != null && { commitId: input.commitId }), - ...(input.repository != null && { repository: input.repository }), - }; -}; - -/** - * serializeAws_json1_1GreenFleetProvisioningOption - */ -const se_GreenFleetProvisioningOption = (input: GreenFleetProvisioningOption, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - }; -}; - -/** - * serializeAws_json1_1InstanceNameList - */ -const se_InstanceNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstancesList - */ -const se_InstancesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstanceStatusList - */ -const se_InstanceStatusList = (input: (InstanceStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstanceTypeList - */ -const se_InstanceTypeList = (input: (_InstanceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ListApplicationRevisionsInput - */ -const se_ListApplicationRevisionsInput = (input: ListApplicationRevisionsInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.deployed != null && { deployed: input.deployed }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3KeyPrefix != null && { s3KeyPrefix: input.s3KeyPrefix }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListApplicationsInput - */ -const se_ListApplicationsInput = (input: ListApplicationsInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDeploymentConfigsInput - */ -const se_ListDeploymentConfigsInput = (input: ListDeploymentConfigsInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDeploymentGroupsInput - */ -const se_ListDeploymentGroupsInput = (input: ListDeploymentGroupsInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDeploymentInstancesInput - */ -const se_ListDeploymentInstancesInput = (input: ListDeploymentInstancesInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.instanceStatusFilter != null && { - instanceStatusFilter: se_InstanceStatusList(input.instanceStatusFilter, context), - }), - ...(input.instanceTypeFilter != null && { - instanceTypeFilter: se_InstanceTypeList(input.instanceTypeFilter, context), - }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDeploymentsInput - */ -const se_ListDeploymentsInput = (input: ListDeploymentsInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.createTimeRange != null && { createTimeRange: se_TimeRange(input.createTimeRange, context) }), - ...(input.deploymentGroupName != null && { deploymentGroupName: input.deploymentGroupName }), - ...(input.externalId != null && { externalId: input.externalId }), - ...(input.includeOnlyStatuses != null && { - includeOnlyStatuses: se_DeploymentStatusList(input.includeOnlyStatuses, context), - }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDeploymentTargetsInput - */ -const se_ListDeploymentTargetsInput = (input: ListDeploymentTargetsInput, context: __SerdeContext): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.targetFilters != null && { targetFilters: se_TargetFilters(input.targetFilters, context) }), - }; -}; - -/** - * serializeAws_json1_1ListenerArnList - */ -const se_ListenerArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ListGitHubAccountTokenNamesInput - */ -const se_ListGitHubAccountTokenNamesInput = (input: ListGitHubAccountTokenNamesInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListOnPremisesInstancesInput - */ -const se_ListOnPremisesInstancesInput = (input: ListOnPremisesInstancesInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registrationStatus != null && { registrationStatus: input.registrationStatus }), - ...(input.tagFilters != null && { tagFilters: se_TagFilterList(input.tagFilters, context) }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1LoadBalancerInfo - */ -const se_LoadBalancerInfo = (input: LoadBalancerInfo, context: __SerdeContext): any => { - return { - ...(input.elbInfoList != null && { elbInfoList: se_ELBInfoList(input.elbInfoList, context) }), - ...(input.targetGroupInfoList != null && { - targetGroupInfoList: se_TargetGroupInfoList(input.targetGroupInfoList, context), - }), - ...(input.targetGroupPairInfoList != null && { - targetGroupPairInfoList: se_TargetGroupPairInfoList(input.targetGroupPairInfoList, context), - }), - }; -}; - -/** - * serializeAws_json1_1MinimumHealthyHosts - */ -const se_MinimumHealthyHosts = (input: MinimumHealthyHosts, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1OnPremisesTagSet - */ -const se_OnPremisesTagSet = (input: OnPremisesTagSet, context: __SerdeContext): any => { - return { - ...(input.onPremisesTagSetList != null && { - onPremisesTagSetList: se_OnPremisesTagSetList(input.onPremisesTagSetList, context), - }), - }; -}; - -/** - * serializeAws_json1_1OnPremisesTagSetList - */ -const se_OnPremisesTagSetList = (input: TagFilter[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagFilterList(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutLifecycleEventHookExecutionStatusInput - */ -const se_PutLifecycleEventHookExecutionStatusInput = ( - input: PutLifecycleEventHookExecutionStatusInput, - context: __SerdeContext -): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.lifecycleEventHookExecutionId != null && { - lifecycleEventHookExecutionId: input.lifecycleEventHookExecutionId, - }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_1RawString - */ -const se_RawString = (input: RawString, context: __SerdeContext): any => { - return { - ...(input.content != null && { content: input.content }), - ...(input.sha256 != null && { sha256: input.sha256 }), - }; -}; - -/** - * serializeAws_json1_1RegisterApplicationRevisionInput - */ -const se_RegisterApplicationRevisionInput = (input: RegisterApplicationRevisionInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.description != null && { description: input.description }), - ...(input.revision != null && { revision: se_RevisionLocation(input.revision, context) }), - }; -}; - -/** - * serializeAws_json1_1RegisterOnPremisesInstanceInput - */ -const se_RegisterOnPremisesInstanceInput = (input: RegisterOnPremisesInstanceInput, context: __SerdeContext): any => { - return { - ...(input.iamSessionArn != null && { iamSessionArn: input.iamSessionArn }), - ...(input.iamUserArn != null && { iamUserArn: input.iamUserArn }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1RemoveTagsFromOnPremisesInstancesInput - */ -const se_RemoveTagsFromOnPremisesInstancesInput = ( - input: RemoveTagsFromOnPremisesInstancesInput, - context: __SerdeContext -): any => { - return { - ...(input.instanceNames != null && { instanceNames: se_InstanceNameList(input.instanceNames, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1RevisionLocation - */ -const se_RevisionLocation = (input: RevisionLocation, context: __SerdeContext): any => { - return { - ...(input.appSpecContent != null && { appSpecContent: se_AppSpecContent(input.appSpecContent, context) }), - ...(input.gitHubLocation != null && { gitHubLocation: se_GitHubLocation(input.gitHubLocation, context) }), - ...(input.revisionType != null && { revisionType: input.revisionType }), - ...(input.s3Location != null && { s3Location: se_S3Location(input.s3Location, context) }), - ...(input.string != null && { string: se_RawString(input.string, context) }), - }; -}; - -/** - * serializeAws_json1_1RevisionLocationList - */ -const se_RevisionLocationList = (input: RevisionLocation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RevisionLocation(entry, context); - }); -}; - -/** - * serializeAws_json1_1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.bundleType != null && { bundleType: input.bundleType }), - ...(input.eTag != null && { eTag: input.eTag }), - ...(input.key != null && { key: input.key }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_json1_1SkipWaitTimeForInstanceTerminationInput - */ -const se_SkipWaitTimeForInstanceTerminationInput = ( - input: SkipWaitTimeForInstanceTerminationInput, - context: __SerdeContext -): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - }; -}; - -/** - * serializeAws_json1_1StopDeploymentInput - */ -const se_StopDeploymentInput = (input: StopDeploymentInput, context: __SerdeContext): any => { - return { - ...(input.autoRollbackEnabled != null && { autoRollbackEnabled: input.autoRollbackEnabled }), - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagFilter - */ -const se_TagFilter = (input: TagFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagFilterList - */ -const se_TagFilterList = (input: TagFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1TargetFilters - */ -const se_TargetFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [TargetFilterName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FilterValueList(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TargetGroupInfo - */ -const se_TargetGroupInfo = (input: TargetGroupInfo, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1TargetGroupInfoList - */ -const se_TargetGroupInfoList = (input: TargetGroupInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetGroupInfo(entry, context); - }); -}; - -/** - * serializeAws_json1_1TargetGroupPairInfo - */ -const se_TargetGroupPairInfo = (input: TargetGroupPairInfo, context: __SerdeContext): any => { - return { - ...(input.prodTrafficRoute != null && { prodTrafficRoute: se_TrafficRoute(input.prodTrafficRoute, context) }), - ...(input.targetGroups != null && { targetGroups: se_TargetGroupInfoList(input.targetGroups, context) }), - ...(input.testTrafficRoute != null && { testTrafficRoute: se_TrafficRoute(input.testTrafficRoute, context) }), - }; -}; - -/** - * serializeAws_json1_1TargetGroupPairInfoList - */ -const se_TargetGroupPairInfoList = (input: TargetGroupPairInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetGroupPairInfo(entry, context); - }); -}; - -/** - * serializeAws_json1_1TargetIdList - */ -const se_TargetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TargetInstances - */ -const se_TargetInstances = (input: TargetInstances, context: __SerdeContext): any => { - return { - ...(input.autoScalingGroups != null && { - autoScalingGroups: se_AutoScalingGroupNameList(input.autoScalingGroups, context), - }), - ...(input.ec2TagSet != null && { ec2TagSet: se_EC2TagSet(input.ec2TagSet, context) }), - ...(input.tagFilters != null && { tagFilters: se_EC2TagFilterList(input.tagFilters, context) }), - }; -}; - -/** - * serializeAws_json1_1TimeBasedCanary - */ -const se_TimeBasedCanary = (input: TimeBasedCanary, context: __SerdeContext): any => { - return { - ...(input.canaryInterval != null && { canaryInterval: input.canaryInterval }), - ...(input.canaryPercentage != null && { canaryPercentage: input.canaryPercentage }), - }; -}; - -/** - * serializeAws_json1_1TimeBasedLinear - */ -const se_TimeBasedLinear = (input: TimeBasedLinear, context: __SerdeContext): any => { - return { - ...(input.linearInterval != null && { linearInterval: input.linearInterval }), - ...(input.linearPercentage != null && { linearPercentage: input.linearPercentage }), - }; -}; - -/** - * serializeAws_json1_1TimeRange - */ -const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { - return { - ...(input.end != null && { end: Math.round(input.end.getTime() / 1000) }), - ...(input.start != null && { start: Math.round(input.start.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1TrafficRoute - */ -const se_TrafficRoute = (input: TrafficRoute, context: __SerdeContext): any => { - return { - ...(input.listenerArns != null && { listenerArns: se_ListenerArnList(input.listenerArns, context) }), - }; -}; - -/** - * serializeAws_json1_1TrafficRoutingConfig - */ -const se_TrafficRoutingConfig = (input: TrafficRoutingConfig, context: __SerdeContext): any => { - return { - ...(input.timeBasedCanary != null && { timeBasedCanary: se_TimeBasedCanary(input.timeBasedCanary, context) }), - ...(input.timeBasedLinear != null && { timeBasedLinear: se_TimeBasedLinear(input.timeBasedLinear, context) }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1TriggerConfig - */ -const se_TriggerConfig = (input: TriggerConfig, context: __SerdeContext): any => { - return { - ...(input.triggerEvents != null && { triggerEvents: se_TriggerEventTypeList(input.triggerEvents, context) }), - ...(input.triggerName != null && { triggerName: input.triggerName }), - ...(input.triggerTargetArn != null && { triggerTargetArn: input.triggerTargetArn }), - }; -}; - -/** - * serializeAws_json1_1TriggerConfigList - */ -const se_TriggerConfigList = (input: TriggerConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TriggerConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1TriggerEventTypeList - */ -const se_TriggerEventTypeList = (input: (TriggerEventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateApplicationInput - */ -const se_UpdateApplicationInput = (input: UpdateApplicationInput, context: __SerdeContext): any => { - return { - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.newApplicationName != null && { newApplicationName: input.newApplicationName }), - }; -}; - -/** - * serializeAws_json1_1UpdateDeploymentGroupInput - */ -const se_UpdateDeploymentGroupInput = (input: UpdateDeploymentGroupInput, context: __SerdeContext): any => { - return { - ...(input.alarmConfiguration != null && { - alarmConfiguration: se_AlarmConfiguration(input.alarmConfiguration, context), - }), - ...(input.applicationName != null && { applicationName: input.applicationName }), - ...(input.autoRollbackConfiguration != null && { - autoRollbackConfiguration: se_AutoRollbackConfiguration(input.autoRollbackConfiguration, context), - }), - ...(input.autoScalingGroups != null && { - autoScalingGroups: se_AutoScalingGroupNameList(input.autoScalingGroups, context), - }), - ...(input.blueGreenDeploymentConfiguration != null && { - blueGreenDeploymentConfiguration: se_BlueGreenDeploymentConfiguration( - input.blueGreenDeploymentConfiguration, - context - ), - }), - ...(input.currentDeploymentGroupName != null && { currentDeploymentGroupName: input.currentDeploymentGroupName }), - ...(input.deploymentConfigName != null && { deploymentConfigName: input.deploymentConfigName }), - ...(input.deploymentStyle != null && { deploymentStyle: se_DeploymentStyle(input.deploymentStyle, context) }), - ...(input.ec2TagFilters != null && { ec2TagFilters: se_EC2TagFilterList(input.ec2TagFilters, context) }), - ...(input.ec2TagSet != null && { ec2TagSet: se_EC2TagSet(input.ec2TagSet, context) }), - ...(input.ecsServices != null && { ecsServices: se_ECSServiceList(input.ecsServices, context) }), - ...(input.loadBalancerInfo != null && { loadBalancerInfo: se_LoadBalancerInfo(input.loadBalancerInfo, context) }), - ...(input.newDeploymentGroupName != null && { newDeploymentGroupName: input.newDeploymentGroupName }), - ...(input.onPremisesInstanceTagFilters != null && { - onPremisesInstanceTagFilters: se_TagFilterList(input.onPremisesInstanceTagFilters, context), - }), - ...(input.onPremisesTagSet != null && { onPremisesTagSet: se_OnPremisesTagSet(input.onPremisesTagSet, context) }), - ...(input.outdatedInstancesStrategy != null && { outdatedInstancesStrategy: input.outdatedInstancesStrategy }), - ...(input.serviceRoleArn != null && { serviceRoleArn: input.serviceRoleArn }), - ...(input.triggerConfigurations != null && { - triggerConfigurations: se_TriggerConfigList(input.triggerConfigurations, context), - }), - }; -}; - -/** - * deserializeAws_json1_1Alarm - */ -const de_Alarm = (output: any, context: __SerdeContext): Alarm => { - return { - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1AlarmConfiguration - */ -const de_AlarmConfiguration = (output: any, context: __SerdeContext): AlarmConfiguration => { - return { - alarms: output.alarms != null ? de_AlarmList(output.alarms, context) : undefined, - enabled: __expectBoolean(output.enabled), - ignorePollAlarmFailure: __expectBoolean(output.ignorePollAlarmFailure), - } as any; -}; - -/** - * deserializeAws_json1_1AlarmList - */ -const de_AlarmList = (output: any, context: __SerdeContext): Alarm[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Alarm(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlarmsLimitExceededException - */ -const de_AlarmsLimitExceededException = (output: any, context: __SerdeContext): AlarmsLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationAlreadyExistsException - */ -const de_ApplicationAlreadyExistsException = ( - output: any, - context: __SerdeContext -): ApplicationAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationDoesNotExistException - */ -const de_ApplicationDoesNotExistException = ( - output: any, - context: __SerdeContext -): ApplicationDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationInfo - */ -const de_ApplicationInfo = (output: any, context: __SerdeContext): ApplicationInfo => { - return { - applicationId: __expectString(output.applicationId), - applicationName: __expectString(output.applicationName), - computePlatform: __expectString(output.computePlatform), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - gitHubAccountName: __expectString(output.gitHubAccountName), - linkedToGitHub: __expectBoolean(output.linkedToGitHub), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationLimitExceededException - */ -const de_ApplicationLimitExceededException = ( - output: any, - context: __SerdeContext -): ApplicationLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationNameRequiredException - */ -const de_ApplicationNameRequiredException = ( - output: any, - context: __SerdeContext -): ApplicationNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationsInfoList - */ -const de_ApplicationsInfoList = (output: any, context: __SerdeContext): ApplicationInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApplicationsList - */ -const de_ApplicationsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AppSpecContent - */ -const de_AppSpecContent = (output: any, context: __SerdeContext): AppSpecContent => { - return { - content: __expectString(output.content), - sha256: __expectString(output.sha256), - } as any; -}; - -/** - * deserializeAws_json1_1ArnNotSupportedException - */ -const de_ArnNotSupportedException = (output: any, context: __SerdeContext): ArnNotSupportedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AutoRollbackConfiguration - */ -const de_AutoRollbackConfiguration = (output: any, context: __SerdeContext): AutoRollbackConfiguration => { - return { - enabled: __expectBoolean(output.enabled), - events: output.events != null ? de_AutoRollbackEventsList(output.events, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoRollbackEventsList - */ -const de_AutoRollbackEventsList = (output: any, context: __SerdeContext): (AutoRollbackEvent | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoScalingGroup - */ -const de_AutoScalingGroup = (output: any, context: __SerdeContext): AutoScalingGroup => { - return { - hook: __expectString(output.hook), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1AutoScalingGroupList - */ -const de_AutoScalingGroupList = (output: any, context: __SerdeContext): AutoScalingGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoScalingGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoScalingGroupNameList - */ -const de_AutoScalingGroupNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchGetApplicationRevisionsOutput - */ -const de_BatchGetApplicationRevisionsOutput = ( - output: any, - context: __SerdeContext -): BatchGetApplicationRevisionsOutput => { - return { - applicationName: __expectString(output.applicationName), - errorMessage: __expectString(output.errorMessage), - revisions: output.revisions != null ? de_RevisionInfoList(output.revisions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetApplicationsOutput - */ -const de_BatchGetApplicationsOutput = (output: any, context: __SerdeContext): BatchGetApplicationsOutput => { - return { - applicationsInfo: - output.applicationsInfo != null ? de_ApplicationsInfoList(output.applicationsInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDeploymentGroupsOutput - */ -const de_BatchGetDeploymentGroupsOutput = (output: any, context: __SerdeContext): BatchGetDeploymentGroupsOutput => { - return { - deploymentGroupsInfo: - output.deploymentGroupsInfo != null - ? de_DeploymentGroupInfoList(output.deploymentGroupsInfo, context) - : undefined, - errorMessage: __expectString(output.errorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDeploymentInstancesOutput - */ -const de_BatchGetDeploymentInstancesOutput = ( - output: any, - context: __SerdeContext -): BatchGetDeploymentInstancesOutput => { - return { - errorMessage: __expectString(output.errorMessage), - instancesSummary: - output.instancesSummary != null ? de_InstanceSummaryList(output.instancesSummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDeploymentsOutput - */ -const de_BatchGetDeploymentsOutput = (output: any, context: __SerdeContext): BatchGetDeploymentsOutput => { - return { - deploymentsInfo: - output.deploymentsInfo != null ? de_DeploymentsInfoList(output.deploymentsInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDeploymentTargetsOutput - */ -const de_BatchGetDeploymentTargetsOutput = (output: any, context: __SerdeContext): BatchGetDeploymentTargetsOutput => { - return { - deploymentTargets: - output.deploymentTargets != null ? de_DeploymentTargetList(output.deploymentTargets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetOnPremisesInstancesOutput - */ -const de_BatchGetOnPremisesInstancesOutput = ( - output: any, - context: __SerdeContext -): BatchGetOnPremisesInstancesOutput => { - return { - instanceInfos: output.instanceInfos != null ? de_InstanceInfoList(output.instanceInfos, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchLimitExceededException - */ -const de_BatchLimitExceededException = (output: any, context: __SerdeContext): BatchLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1BlueGreenDeploymentConfiguration - */ -const de_BlueGreenDeploymentConfiguration = ( - output: any, - context: __SerdeContext -): BlueGreenDeploymentConfiguration => { - return { - deploymentReadyOption: - output.deploymentReadyOption != null - ? de_DeploymentReadyOption(output.deploymentReadyOption, context) - : undefined, - greenFleetProvisioningOption: - output.greenFleetProvisioningOption != null - ? de_GreenFleetProvisioningOption(output.greenFleetProvisioningOption, context) - : undefined, - terminateBlueInstancesOnDeploymentSuccess: - output.terminateBlueInstancesOnDeploymentSuccess != null - ? de_BlueInstanceTerminationOption(output.terminateBlueInstancesOnDeploymentSuccess, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BlueInstanceTerminationOption - */ -const de_BlueInstanceTerminationOption = (output: any, context: __SerdeContext): BlueInstanceTerminationOption => { - return { - action: __expectString(output.action), - terminationWaitTimeInMinutes: __expectInt32(output.terminationWaitTimeInMinutes), - } as any; -}; - -/** - * deserializeAws_json1_1BucketNameFilterRequiredException - */ -const de_BucketNameFilterRequiredException = ( - output: any, - context: __SerdeContext -): BucketNameFilterRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudFormationTarget - */ -const de_CloudFormationTarget = (output: any, context: __SerdeContext): CloudFormationTarget => { - return { - deploymentId: __expectString(output.deploymentId), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lifecycleEvents: - output.lifecycleEvents != null ? de_LifecycleEventList(output.lifecycleEvents, context) : undefined, - resourceType: __expectString(output.resourceType), - status: __expectString(output.status), - targetId: __expectString(output.targetId), - targetVersionWeight: __limitedParseDouble(output.targetVersionWeight), - } as any; -}; - -/** - * deserializeAws_json1_1CreateApplicationOutput - */ -const de_CreateApplicationOutput = (output: any, context: __SerdeContext): CreateApplicationOutput => { - return { - applicationId: __expectString(output.applicationId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDeploymentConfigOutput - */ -const de_CreateDeploymentConfigOutput = (output: any, context: __SerdeContext): CreateDeploymentConfigOutput => { - return { - deploymentConfigId: __expectString(output.deploymentConfigId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDeploymentGroupOutput - */ -const de_CreateDeploymentGroupOutput = (output: any, context: __SerdeContext): CreateDeploymentGroupOutput => { - return { - deploymentGroupId: __expectString(output.deploymentGroupId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDeploymentOutput - */ -const de_CreateDeploymentOutput = (output: any, context: __SerdeContext): CreateDeploymentOutput => { - return { - deploymentId: __expectString(output.deploymentId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDeploymentGroupOutput - */ -const de_DeleteDeploymentGroupOutput = (output: any, context: __SerdeContext): DeleteDeploymentGroupOutput => { - return { - hooksNotCleanedUp: - output.hooksNotCleanedUp != null ? de_AutoScalingGroupList(output.hooksNotCleanedUp, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteGitHubAccountTokenOutput - */ -const de_DeleteGitHubAccountTokenOutput = (output: any, context: __SerdeContext): DeleteGitHubAccountTokenOutput => { - return { - tokenName: __expectString(output.tokenName), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteResourcesByExternalIdOutput - */ -const de_DeleteResourcesByExternalIdOutput = ( - output: any, - context: __SerdeContext -): DeleteResourcesByExternalIdOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeploymentAlreadyCompletedException - */ -const de_DeploymentAlreadyCompletedException = ( - output: any, - context: __SerdeContext -): DeploymentAlreadyCompletedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigAlreadyExistsException - */ -const de_DeploymentConfigAlreadyExistsException = ( - output: any, - context: __SerdeContext -): DeploymentConfigAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigDoesNotExistException - */ -const de_DeploymentConfigDoesNotExistException = ( - output: any, - context: __SerdeContext -): DeploymentConfigDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigInfo - */ -const de_DeploymentConfigInfo = (output: any, context: __SerdeContext): DeploymentConfigInfo => { - return { - computePlatform: __expectString(output.computePlatform), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - deploymentConfigId: __expectString(output.deploymentConfigId), - deploymentConfigName: __expectString(output.deploymentConfigName), - minimumHealthyHosts: - output.minimumHealthyHosts != null ? de_MinimumHealthyHosts(output.minimumHealthyHosts, context) : undefined, - trafficRoutingConfig: - output.trafficRoutingConfig != null ? de_TrafficRoutingConfig(output.trafficRoutingConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigInUseException - */ -const de_DeploymentConfigInUseException = (output: any, context: __SerdeContext): DeploymentConfigInUseException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigLimitExceededException - */ -const de_DeploymentConfigLimitExceededException = ( - output: any, - context: __SerdeContext -): DeploymentConfigLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigNameRequiredException - */ -const de_DeploymentConfigNameRequiredException = ( - output: any, - context: __SerdeContext -): DeploymentConfigNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfigsList - */ -const de_DeploymentConfigsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentDoesNotExistException - */ -const de_DeploymentDoesNotExistException = (output: any, context: __SerdeContext): DeploymentDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentGroupAlreadyExistsException - */ -const de_DeploymentGroupAlreadyExistsException = ( - output: any, - context: __SerdeContext -): DeploymentGroupAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentGroupDoesNotExistException - */ -const de_DeploymentGroupDoesNotExistException = ( - output: any, - context: __SerdeContext -): DeploymentGroupDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentGroupInfo - */ -const de_DeploymentGroupInfo = (output: any, context: __SerdeContext): DeploymentGroupInfo => { - return { - alarmConfiguration: - output.alarmConfiguration != null ? de_AlarmConfiguration(output.alarmConfiguration, context) : undefined, - applicationName: __expectString(output.applicationName), - autoRollbackConfiguration: - output.autoRollbackConfiguration != null - ? de_AutoRollbackConfiguration(output.autoRollbackConfiguration, context) - : undefined, - autoScalingGroups: - output.autoScalingGroups != null ? de_AutoScalingGroupList(output.autoScalingGroups, context) : undefined, - blueGreenDeploymentConfiguration: - output.blueGreenDeploymentConfiguration != null - ? de_BlueGreenDeploymentConfiguration(output.blueGreenDeploymentConfiguration, context) - : undefined, - computePlatform: __expectString(output.computePlatform), - deploymentConfigName: __expectString(output.deploymentConfigName), - deploymentGroupId: __expectString(output.deploymentGroupId), - deploymentGroupName: __expectString(output.deploymentGroupName), - deploymentStyle: output.deploymentStyle != null ? de_DeploymentStyle(output.deploymentStyle, context) : undefined, - ec2TagFilters: output.ec2TagFilters != null ? de_EC2TagFilterList(output.ec2TagFilters, context) : undefined, - ec2TagSet: output.ec2TagSet != null ? de_EC2TagSet(output.ec2TagSet, context) : undefined, - ecsServices: output.ecsServices != null ? de_ECSServiceList(output.ecsServices, context) : undefined, - lastAttemptedDeployment: - output.lastAttemptedDeployment != null - ? de_LastDeploymentInfo(output.lastAttemptedDeployment, context) - : undefined, - lastSuccessfulDeployment: - output.lastSuccessfulDeployment != null - ? de_LastDeploymentInfo(output.lastSuccessfulDeployment, context) - : undefined, - loadBalancerInfo: - output.loadBalancerInfo != null ? de_LoadBalancerInfo(output.loadBalancerInfo, context) : undefined, - onPremisesInstanceTagFilters: - output.onPremisesInstanceTagFilters != null - ? de_TagFilterList(output.onPremisesInstanceTagFilters, context) - : undefined, - onPremisesTagSet: - output.onPremisesTagSet != null ? de_OnPremisesTagSet(output.onPremisesTagSet, context) : undefined, - outdatedInstancesStrategy: __expectString(output.outdatedInstancesStrategy), - serviceRoleArn: __expectString(output.serviceRoleArn), - targetRevision: output.targetRevision != null ? de_RevisionLocation(output.targetRevision, context) : undefined, - triggerConfigurations: - output.triggerConfigurations != null ? de_TriggerConfigList(output.triggerConfigurations, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentGroupInfoList - */ -const de_DeploymentGroupInfoList = (output: any, context: __SerdeContext): DeploymentGroupInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeploymentGroupInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentGroupLimitExceededException - */ -const de_DeploymentGroupLimitExceededException = ( - output: any, - context: __SerdeContext -): DeploymentGroupLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentGroupNameRequiredException - */ -const de_DeploymentGroupNameRequiredException = ( - output: any, - context: __SerdeContext -): DeploymentGroupNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentGroupsList - */ -const de_DeploymentGroupsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentIdRequiredException - */ -const de_DeploymentIdRequiredException = (output: any, context: __SerdeContext): DeploymentIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentInfo - */ -const de_DeploymentInfo = (output: any, context: __SerdeContext): DeploymentInfo => { - return { - additionalDeploymentStatusInfo: __expectString(output.additionalDeploymentStatusInfo), - applicationName: __expectString(output.applicationName), - autoRollbackConfiguration: - output.autoRollbackConfiguration != null - ? de_AutoRollbackConfiguration(output.autoRollbackConfiguration, context) - : undefined, - blueGreenDeploymentConfiguration: - output.blueGreenDeploymentConfiguration != null - ? de_BlueGreenDeploymentConfiguration(output.blueGreenDeploymentConfiguration, context) - : undefined, - completeTime: - output.completeTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completeTime))) - : undefined, - computePlatform: __expectString(output.computePlatform), - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - creator: __expectString(output.creator), - deploymentConfigName: __expectString(output.deploymentConfigName), - deploymentGroupName: __expectString(output.deploymentGroupName), - deploymentId: __expectString(output.deploymentId), - deploymentOverview: - output.deploymentOverview != null ? de_DeploymentOverview(output.deploymentOverview, context) : undefined, - deploymentStatusMessages: - output.deploymentStatusMessages != null - ? de_DeploymentStatusMessageList(output.deploymentStatusMessages, context) - : undefined, - deploymentStyle: output.deploymentStyle != null ? de_DeploymentStyle(output.deploymentStyle, context) : undefined, - description: __expectString(output.description), - errorInformation: - output.errorInformation != null ? de_ErrorInformation(output.errorInformation, context) : undefined, - externalId: __expectString(output.externalId), - fileExistsBehavior: __expectString(output.fileExistsBehavior), - ignoreApplicationStopFailures: __expectBoolean(output.ignoreApplicationStopFailures), - instanceTerminationWaitTimeStarted: __expectBoolean(output.instanceTerminationWaitTimeStarted), - loadBalancerInfo: - output.loadBalancerInfo != null ? de_LoadBalancerInfo(output.loadBalancerInfo, context) : undefined, - overrideAlarmConfiguration: - output.overrideAlarmConfiguration != null - ? de_AlarmConfiguration(output.overrideAlarmConfiguration, context) - : undefined, - previousRevision: - output.previousRevision != null ? de_RevisionLocation(output.previousRevision, context) : undefined, - relatedDeployments: - output.relatedDeployments != null ? de_RelatedDeployments(output.relatedDeployments, context) : undefined, - revision: output.revision != null ? de_RevisionLocation(output.revision, context) : undefined, - rollbackInfo: output.rollbackInfo != null ? de_RollbackInfo(output.rollbackInfo, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - targetInstances: output.targetInstances != null ? de_TargetInstances(output.targetInstances, context) : undefined, - updateOutdatedInstancesOnly: __expectBoolean(output.updateOutdatedInstancesOnly), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentIsNotInReadyStateException - */ -const de_DeploymentIsNotInReadyStateException = ( - output: any, - context: __SerdeContext -): DeploymentIsNotInReadyStateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentLimitExceededException - */ -const de_DeploymentLimitExceededException = ( - output: any, - context: __SerdeContext -): DeploymentLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentNotStartedException - */ -const de_DeploymentNotStartedException = (output: any, context: __SerdeContext): DeploymentNotStartedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentOverview - */ -const de_DeploymentOverview = (output: any, context: __SerdeContext): DeploymentOverview => { - return { - Failed: __expectLong(output.Failed), - InProgress: __expectLong(output.InProgress), - Pending: __expectLong(output.Pending), - Ready: __expectLong(output.Ready), - Skipped: __expectLong(output.Skipped), - Succeeded: __expectLong(output.Succeeded), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentReadyOption - */ -const de_DeploymentReadyOption = (output: any, context: __SerdeContext): DeploymentReadyOption => { - return { - actionOnTimeout: __expectString(output.actionOnTimeout), - waitTimeInMinutes: __expectInt32(output.waitTimeInMinutes), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentsInfoList - */ -const de_DeploymentsInfoList = (output: any, context: __SerdeContext): DeploymentInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeploymentInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentsList - */ -const de_DeploymentsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentStatusMessageList - */ -const de_DeploymentStatusMessageList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentStyle - */ -const de_DeploymentStyle = (output: any, context: __SerdeContext): DeploymentStyle => { - return { - deploymentOption: __expectString(output.deploymentOption), - deploymentType: __expectString(output.deploymentType), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentTarget - */ -const de_DeploymentTarget = (output: any, context: __SerdeContext): DeploymentTarget => { - return { - cloudFormationTarget: - output.cloudFormationTarget != null ? de_CloudFormationTarget(output.cloudFormationTarget, context) : undefined, - deploymentTargetType: __expectString(output.deploymentTargetType), - ecsTarget: output.ecsTarget != null ? de_ECSTarget(output.ecsTarget, context) : undefined, - instanceTarget: output.instanceTarget != null ? de_InstanceTarget(output.instanceTarget, context) : undefined, - lambdaTarget: output.lambdaTarget != null ? de_LambdaTarget(output.lambdaTarget, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentTargetDoesNotExistException - */ -const de_DeploymentTargetDoesNotExistException = ( - output: any, - context: __SerdeContext -): DeploymentTargetDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentTargetIdRequiredException - */ -const de_DeploymentTargetIdRequiredException = ( - output: any, - context: __SerdeContext -): DeploymentTargetIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentTargetList - */ -const de_DeploymentTargetList = (output: any, context: __SerdeContext): DeploymentTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeploymentTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentTargetListSizeExceededException - */ -const de_DeploymentTargetListSizeExceededException = ( - output: any, - context: __SerdeContext -): DeploymentTargetListSizeExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DescriptionTooLongException - */ -const de_DescriptionTooLongException = (output: any, context: __SerdeContext): DescriptionTooLongException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Diagnostics - */ -const de_Diagnostics = (output: any, context: __SerdeContext): Diagnostics => { - return { - errorCode: __expectString(output.errorCode), - logTail: __expectString(output.logTail), - message: __expectString(output.message), - scriptName: __expectString(output.scriptName), - } as any; -}; - -/** - * deserializeAws_json1_1EC2TagFilter - */ -const de_EC2TagFilter = (output: any, context: __SerdeContext): EC2TagFilter => { - return { - Key: __expectString(output.Key), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1EC2TagFilterList - */ -const de_EC2TagFilterList = (output: any, context: __SerdeContext): EC2TagFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EC2TagFilter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EC2TagSet - */ -const de_EC2TagSet = (output: any, context: __SerdeContext): EC2TagSet => { - return { - ec2TagSetList: output.ec2TagSetList != null ? de_EC2TagSetList(output.ec2TagSetList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EC2TagSetList - */ -const de_EC2TagSetList = (output: any, context: __SerdeContext): EC2TagFilter[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EC2TagFilterList(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ECSService - */ -const de_ECSService = (output: any, context: __SerdeContext): ECSService => { - return { - clusterName: __expectString(output.clusterName), - serviceName: __expectString(output.serviceName), - } as any; -}; - -/** - * deserializeAws_json1_1ECSServiceList - */ -const de_ECSServiceList = (output: any, context: __SerdeContext): ECSService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ECSService(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ECSServiceMappingLimitExceededException - */ -const de_ECSServiceMappingLimitExceededException = ( - output: any, - context: __SerdeContext -): ECSServiceMappingLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ECSTarget - */ -const de_ECSTarget = (output: any, context: __SerdeContext): ECSTarget => { - return { - deploymentId: __expectString(output.deploymentId), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lifecycleEvents: - output.lifecycleEvents != null ? de_LifecycleEventList(output.lifecycleEvents, context) : undefined, - status: __expectString(output.status), - targetArn: __expectString(output.targetArn), - targetId: __expectString(output.targetId), - taskSetsInfo: output.taskSetsInfo != null ? de_ECSTaskSetList(output.taskSetsInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ECSTaskSet - */ -const de_ECSTaskSet = (output: any, context: __SerdeContext): ECSTaskSet => { - return { - desiredCount: __expectLong(output.desiredCount), - identifer: __expectString(output.identifer), - pendingCount: __expectLong(output.pendingCount), - runningCount: __expectLong(output.runningCount), - status: __expectString(output.status), - targetGroup: output.targetGroup != null ? de_TargetGroupInfo(output.targetGroup, context) : undefined, - taskSetLabel: __expectString(output.taskSetLabel), - trafficWeight: __limitedParseDouble(output.trafficWeight), - } as any; -}; - -/** - * deserializeAws_json1_1ECSTaskSetList - */ -const de_ECSTaskSetList = (output: any, context: __SerdeContext): ECSTaskSet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ECSTaskSet(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ELBInfo - */ -const de_ELBInfo = (output: any, context: __SerdeContext): ELBInfo => { - return { - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1ELBInfoList - */ -const de_ELBInfoList = (output: any, context: __SerdeContext): ELBInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ELBInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ErrorInformation - */ -const de_ErrorInformation = (output: any, context: __SerdeContext): ErrorInformation => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1GenericRevisionInfo - */ -const de_GenericRevisionInfo = (output: any, context: __SerdeContext): GenericRevisionInfo => { - return { - deploymentGroups: - output.deploymentGroups != null ? de_DeploymentGroupsList(output.deploymentGroups, context) : undefined, - description: __expectString(output.description), - firstUsedTime: - output.firstUsedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.firstUsedTime))) - : undefined, - lastUsedTime: - output.lastUsedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUsedTime))) - : undefined, - registerTime: - output.registerTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registerTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetApplicationOutput - */ -const de_GetApplicationOutput = (output: any, context: __SerdeContext): GetApplicationOutput => { - return { - application: output.application != null ? de_ApplicationInfo(output.application, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetApplicationRevisionOutput - */ -const de_GetApplicationRevisionOutput = (output: any, context: __SerdeContext): GetApplicationRevisionOutput => { - return { - applicationName: __expectString(output.applicationName), - revision: output.revision != null ? de_RevisionLocation(output.revision, context) : undefined, - revisionInfo: output.revisionInfo != null ? de_GenericRevisionInfo(output.revisionInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDeploymentConfigOutput - */ -const de_GetDeploymentConfigOutput = (output: any, context: __SerdeContext): GetDeploymentConfigOutput => { - return { - deploymentConfigInfo: - output.deploymentConfigInfo != null ? de_DeploymentConfigInfo(output.deploymentConfigInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDeploymentGroupOutput - */ -const de_GetDeploymentGroupOutput = (output: any, context: __SerdeContext): GetDeploymentGroupOutput => { - return { - deploymentGroupInfo: - output.deploymentGroupInfo != null ? de_DeploymentGroupInfo(output.deploymentGroupInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDeploymentInstanceOutput - */ -const de_GetDeploymentInstanceOutput = (output: any, context: __SerdeContext): GetDeploymentInstanceOutput => { - return { - instanceSummary: output.instanceSummary != null ? de_InstanceSummary(output.instanceSummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDeploymentOutput - */ -const de_GetDeploymentOutput = (output: any, context: __SerdeContext): GetDeploymentOutput => { - return { - deploymentInfo: output.deploymentInfo != null ? de_DeploymentInfo(output.deploymentInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDeploymentTargetOutput - */ -const de_GetDeploymentTargetOutput = (output: any, context: __SerdeContext): GetDeploymentTargetOutput => { - return { - deploymentTarget: - output.deploymentTarget != null ? de_DeploymentTarget(output.deploymentTarget, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetOnPremisesInstanceOutput - */ -const de_GetOnPremisesInstanceOutput = (output: any, context: __SerdeContext): GetOnPremisesInstanceOutput => { - return { - instanceInfo: output.instanceInfo != null ? de_InstanceInfo(output.instanceInfo, context) : undefined, - } as any; -}; +// se_GetOnPremisesInstanceInput omitted. -/** - * deserializeAws_json1_1GitHubAccountTokenDoesNotExistException - */ -const de_GitHubAccountTokenDoesNotExistException = ( - output: any, - context: __SerdeContext -): GitHubAccountTokenDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1GitHubAccountTokenNameList - */ -const de_GitHubAccountTokenNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GitHubAccountTokenNameRequiredException - */ -const de_GitHubAccountTokenNameRequiredException = ( - output: any, - context: __SerdeContext -): GitHubAccountTokenNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_GitHubLocation omitted. -/** - * deserializeAws_json1_1GitHubLocation - */ -const de_GitHubLocation = (output: any, context: __SerdeContext): GitHubLocation => { - return { - commitId: __expectString(output.commitId), - repository: __expectString(output.repository), - } as any; -}; +// se_GreenFleetProvisioningOption omitted. -/** - * deserializeAws_json1_1GreenFleetProvisioningOption - */ -const de_GreenFleetProvisioningOption = (output: any, context: __SerdeContext): GreenFleetProvisioningOption => { - return { - action: __expectString(output.action), - } as any; -}; +// se_InstanceNameList omitted. -/** - * deserializeAws_json1_1IamArnRequiredException - */ -const de_IamArnRequiredException = (output: any, context: __SerdeContext): IamArnRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_InstancesList omitted. -/** - * deserializeAws_json1_1IamSessionArnAlreadyRegisteredException - */ -const de_IamSessionArnAlreadyRegisteredException = ( - output: any, - context: __SerdeContext -): IamSessionArnAlreadyRegisteredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_InstanceStatusList omitted. -/** - * deserializeAws_json1_1IamUserArnAlreadyRegisteredException - */ -const de_IamUserArnAlreadyRegisteredException = ( - output: any, - context: __SerdeContext -): IamUserArnAlreadyRegisteredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_InstanceTypeList omitted. -/** - * deserializeAws_json1_1IamUserArnRequiredException - */ -const de_IamUserArnRequiredException = (output: any, context: __SerdeContext): IamUserArnRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListApplicationRevisionsInput omitted. -/** - * deserializeAws_json1_1InstanceDoesNotExistException - */ -const de_InstanceDoesNotExistException = (output: any, context: __SerdeContext): InstanceDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListApplicationsInput omitted. -/** - * deserializeAws_json1_1InstanceIdRequiredException - */ -const de_InstanceIdRequiredException = (output: any, context: __SerdeContext): InstanceIdRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListDeploymentConfigsInput omitted. -/** - * deserializeAws_json1_1InstanceInfo - */ -const de_InstanceInfo = (output: any, context: __SerdeContext): InstanceInfo => { - return { - deregisterTime: - output.deregisterTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deregisterTime))) - : undefined, - iamSessionArn: __expectString(output.iamSessionArn), - iamUserArn: __expectString(output.iamUserArn), - instanceArn: __expectString(output.instanceArn), - instanceName: __expectString(output.instanceName), - registerTime: - output.registerTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registerTime))) - : undefined, - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// se_ListDeploymentGroupsInput omitted. -/** - * deserializeAws_json1_1InstanceInfoList - */ -const de_InstanceInfoList = (output: any, context: __SerdeContext): InstanceInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceInfo(entry, context); - }); - return retVal; -}; +// se_ListDeploymentInstancesInput omitted. /** - * deserializeAws_json1_1InstanceLimitExceededException + * serializeAws_json1_1ListDeploymentsInput */ -const de_InstanceLimitExceededException = (output: any, context: __SerdeContext): InstanceLimitExceededException => { - return { - message: __expectString(output.message), - } as any; +const se_ListDeploymentsInput = (input: ListDeploymentsInput, context: __SerdeContext): any => { + return take(input, { + applicationName: [], + createTimeRange: (_) => se_TimeRange(_, context), + deploymentGroupName: [], + externalId: [], + includeOnlyStatuses: _json, + nextToken: [], + }); }; -/** - * deserializeAws_json1_1InstanceNameAlreadyRegisteredException - */ -const de_InstanceNameAlreadyRegisteredException = ( - output: any, - context: __SerdeContext -): InstanceNameAlreadyRegisteredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListDeploymentTargetsInput omitted. -/** - * deserializeAws_json1_1InstanceNameList - */ -const de_InstanceNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ListenerArnList omitted. -/** - * deserializeAws_json1_1InstanceNameRequiredException - */ -const de_InstanceNameRequiredException = (output: any, context: __SerdeContext): InstanceNameRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListGitHubAccountTokenNamesInput omitted. -/** - * deserializeAws_json1_1InstanceNotRegisteredException - */ -const de_InstanceNotRegisteredException = (output: any, context: __SerdeContext): InstanceNotRegisteredException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListOnPremisesInstancesInput omitted. -/** - * deserializeAws_json1_1InstancesList - */ -const de_InstancesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ListTagsForResourceInput omitted. -/** - * deserializeAws_json1_1InstanceSummary - */ -const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { - return { - deploymentId: __expectString(output.deploymentId), - instanceId: __expectString(output.instanceId), - instanceType: __expectString(output.instanceType), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lifecycleEvents: - output.lifecycleEvents != null ? de_LifecycleEventList(output.lifecycleEvents, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// se_LoadBalancerInfo omitted. -/** - * deserializeAws_json1_1InstanceSummaryList - */ -const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceSummary(entry, context); - }); - return retVal; -}; +// se_MinimumHealthyHosts omitted. -/** - * deserializeAws_json1_1InstanceTarget - */ -const de_InstanceTarget = (output: any, context: __SerdeContext): InstanceTarget => { - return { - deploymentId: __expectString(output.deploymentId), - instanceLabel: __expectString(output.instanceLabel), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lifecycleEvents: - output.lifecycleEvents != null ? de_LifecycleEventList(output.lifecycleEvents, context) : undefined, - status: __expectString(output.status), - targetArn: __expectString(output.targetArn), - targetId: __expectString(output.targetId), - } as any; -}; +// se_OnPremisesTagSet omitted. -/** - * deserializeAws_json1_1InvalidAlarmConfigException - */ -const de_InvalidAlarmConfigException = (output: any, context: __SerdeContext): InvalidAlarmConfigException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_OnPremisesTagSetList omitted. -/** - * deserializeAws_json1_1InvalidApplicationNameException - */ -const de_InvalidApplicationNameException = (output: any, context: __SerdeContext): InvalidApplicationNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutLifecycleEventHookExecutionStatusInput omitted. -/** - * deserializeAws_json1_1InvalidArnException - */ -const de_InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RawString omitted. -/** - * deserializeAws_json1_1InvalidAutoRollbackConfigException - */ -const de_InvalidAutoRollbackConfigException = ( - output: any, - context: __SerdeContext -): InvalidAutoRollbackConfigException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RegisterApplicationRevisionInput omitted. -/** - * deserializeAws_json1_1InvalidAutoScalingGroupException - */ -const de_InvalidAutoScalingGroupException = ( - output: any, - context: __SerdeContext -): InvalidAutoScalingGroupException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RegisterOnPremisesInstanceInput omitted. -/** - * deserializeAws_json1_1InvalidBlueGreenDeploymentConfigurationException - */ -const de_InvalidBlueGreenDeploymentConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidBlueGreenDeploymentConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RemoveTagsFromOnPremisesInstancesInput omitted. -/** - * deserializeAws_json1_1InvalidBucketNameFilterException - */ -const de_InvalidBucketNameFilterException = ( - output: any, - context: __SerdeContext -): InvalidBucketNameFilterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RevisionLocation omitted. -/** - * deserializeAws_json1_1InvalidComputePlatformException - */ -const de_InvalidComputePlatformException = (output: any, context: __SerdeContext): InvalidComputePlatformException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RevisionLocationList omitted. -/** - * deserializeAws_json1_1InvalidDeployedStateFilterException - */ -const de_InvalidDeployedStateFilterException = ( - output: any, - context: __SerdeContext -): InvalidDeployedStateFilterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_S3Location omitted. -/** - * deserializeAws_json1_1InvalidDeploymentConfigNameException - */ -const de_InvalidDeploymentConfigNameException = ( - output: any, - context: __SerdeContext -): InvalidDeploymentConfigNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_SkipWaitTimeForInstanceTerminationInput omitted. -/** - * deserializeAws_json1_1InvalidDeploymentGroupNameException - */ -const de_InvalidDeploymentGroupNameException = ( - output: any, - context: __SerdeContext -): InvalidDeploymentGroupNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_StopDeploymentInput omitted. -/** - * deserializeAws_json1_1InvalidDeploymentIdException - */ -const de_InvalidDeploymentIdException = (output: any, context: __SerdeContext): InvalidDeploymentIdException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1InvalidDeploymentInstanceTypeException - */ -const de_InvalidDeploymentInstanceTypeException = ( - output: any, - context: __SerdeContext -): InvalidDeploymentInstanceTypeException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagFilter omitted. -/** - * deserializeAws_json1_1InvalidDeploymentStatusException - */ -const de_InvalidDeploymentStatusException = ( - output: any, - context: __SerdeContext -): InvalidDeploymentStatusException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagFilterList omitted. -/** - * deserializeAws_json1_1InvalidDeploymentStyleException - */ -const de_InvalidDeploymentStyleException = (output: any, context: __SerdeContext): InvalidDeploymentStyleException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1InvalidDeploymentTargetIdException - */ -const de_InvalidDeploymentTargetIdException = ( - output: any, - context: __SerdeContext -): InvalidDeploymentTargetIdException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1InvalidDeploymentWaitTypeException - */ -const de_InvalidDeploymentWaitTypeException = ( - output: any, - context: __SerdeContext -): InvalidDeploymentWaitTypeException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagResourceInput omitted. -/** - * deserializeAws_json1_1InvalidEC2TagCombinationException - */ -const de_InvalidEC2TagCombinationException = ( - output: any, - context: __SerdeContext -): InvalidEC2TagCombinationException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetFilters omitted. -/** - * deserializeAws_json1_1InvalidEC2TagException - */ -const de_InvalidEC2TagException = (output: any, context: __SerdeContext): InvalidEC2TagException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetGroupInfo omitted. -/** - * deserializeAws_json1_1InvalidECSServiceException - */ -const de_InvalidECSServiceException = (output: any, context: __SerdeContext): InvalidECSServiceException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetGroupInfoList omitted. -/** - * deserializeAws_json1_1InvalidExternalIdException - */ -const de_InvalidExternalIdException = (output: any, context: __SerdeContext): InvalidExternalIdException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetGroupPairInfo omitted. -/** - * deserializeAws_json1_1InvalidFileExistsBehaviorException - */ -const de_InvalidFileExistsBehaviorException = ( - output: any, - context: __SerdeContext -): InvalidFileExistsBehaviorException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetGroupPairInfoList omitted. -/** - * deserializeAws_json1_1InvalidGitHubAccountTokenException - */ -const de_InvalidGitHubAccountTokenException = ( - output: any, - context: __SerdeContext -): InvalidGitHubAccountTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetIdList omitted. -/** - * deserializeAws_json1_1InvalidGitHubAccountTokenNameException - */ -const de_InvalidGitHubAccountTokenNameException = ( - output: any, - context: __SerdeContext -): InvalidGitHubAccountTokenNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TargetInstances omitted. -/** - * deserializeAws_json1_1InvalidIamSessionArnException - */ -const de_InvalidIamSessionArnException = (output: any, context: __SerdeContext): InvalidIamSessionArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TimeBasedCanary omitted. -/** - * deserializeAws_json1_1InvalidIamUserArnException - */ -const de_InvalidIamUserArnException = (output: any, context: __SerdeContext): InvalidIamUserArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TimeBasedLinear omitted. /** - * deserializeAws_json1_1InvalidIgnoreApplicationStopFailuresValueException + * serializeAws_json1_1TimeRange */ -const de_InvalidIgnoreApplicationStopFailuresValueException = ( - output: any, - context: __SerdeContext -): InvalidIgnoreApplicationStopFailuresValueException => { - return { - message: __expectString(output.message), - } as any; +const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { + return take(input, { + end: (_) => Math.round(_.getTime() / 1000), + start: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TrafficRoute omitted. -/** - * deserializeAws_json1_1InvalidInstanceNameException - */ -const de_InvalidInstanceNameException = (output: any, context: __SerdeContext): InvalidInstanceNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TrafficRoutingConfig omitted. -/** - * deserializeAws_json1_1InvalidInstanceStatusException - */ -const de_InvalidInstanceStatusException = (output: any, context: __SerdeContext): InvalidInstanceStatusException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TriggerConfig omitted. -/** - * deserializeAws_json1_1InvalidInstanceTypeException - */ -const de_InvalidInstanceTypeException = (output: any, context: __SerdeContext): InvalidInstanceTypeException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TriggerConfigList omitted. -/** - * deserializeAws_json1_1InvalidKeyPrefixFilterException - */ -const de_InvalidKeyPrefixFilterException = (output: any, context: __SerdeContext): InvalidKeyPrefixFilterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TriggerEventTypeList omitted. -/** - * deserializeAws_json1_1InvalidLifecycleEventHookExecutionIdException - */ -const de_InvalidLifecycleEventHookExecutionIdException = ( - output: any, - context: __SerdeContext -): InvalidLifecycleEventHookExecutionIdException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UntagResourceInput omitted. -/** - * deserializeAws_json1_1InvalidLifecycleEventHookExecutionStatusException - */ -const de_InvalidLifecycleEventHookExecutionStatusException = ( - output: any, - context: __SerdeContext -): InvalidLifecycleEventHookExecutionStatusException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateApplicationInput omitted. -/** - * deserializeAws_json1_1InvalidLoadBalancerInfoException - */ -const de_InvalidLoadBalancerInfoException = ( - output: any, - context: __SerdeContext -): InvalidLoadBalancerInfoException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateDeploymentGroupInput omitted. -/** - * deserializeAws_json1_1InvalidMinimumHealthyHostValueException - */ -const de_InvalidMinimumHealthyHostValueException = ( - output: any, - context: __SerdeContext -): InvalidMinimumHealthyHostValueException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_Alarm omitted. + +// de_AlarmConfiguration omitted. + +// de_AlarmList omitted. + +// de_AlarmsLimitExceededException omitted. + +// de_ApplicationAlreadyExistsException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ApplicationDoesNotExistException omitted. /** - * deserializeAws_json1_1InvalidOnPremisesTagCombinationException + * deserializeAws_json1_1ApplicationInfo */ -const de_InvalidOnPremisesTagCombinationException = ( - output: any, - context: __SerdeContext -): InvalidOnPremisesTagCombinationException => { - return { - message: __expectString(output.message), - } as any; +const de_ApplicationInfo = (output: any, context: __SerdeContext): ApplicationInfo => { + return take(output, { + applicationId: __expectString, + applicationName: __expectString, + computePlatform: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + gitHubAccountName: __expectString, + linkedToGitHub: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_1InvalidOperationException - */ -const de_InvalidOperationException = (output: any, context: __SerdeContext): InvalidOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ApplicationLimitExceededException omitted. -/** - * deserializeAws_json1_1InvalidRegistrationStatusException - */ -const de_InvalidRegistrationStatusException = ( - output: any, - context: __SerdeContext -): InvalidRegistrationStatusException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ApplicationNameRequiredException omitted. /** - * deserializeAws_json1_1InvalidRevisionException + * deserializeAws_json1_1ApplicationsInfoList */ -const de_InvalidRevisionException = (output: any, context: __SerdeContext): InvalidRevisionException => { - return { - message: __expectString(output.message), - } as any; +const de_ApplicationsInfoList = (output: any, context: __SerdeContext): ApplicationInfo[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ApplicationInfo(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1InvalidRoleException - */ -const de_InvalidRoleException = (output: any, context: __SerdeContext): InvalidRoleException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ApplicationsList omitted. -/** - * deserializeAws_json1_1InvalidSortByException - */ -const de_InvalidSortByException = (output: any, context: __SerdeContext): InvalidSortByException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AppSpecContent omitted. -/** - * deserializeAws_json1_1InvalidSortOrderException - */ -const de_InvalidSortOrderException = (output: any, context: __SerdeContext): InvalidSortOrderException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ArnNotSupportedException omitted. -/** - * deserializeAws_json1_1InvalidTagException - */ -const de_InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AutoRollbackConfiguration omitted. -/** - * deserializeAws_json1_1InvalidTagFilterException - */ -const de_InvalidTagFilterException = (output: any, context: __SerdeContext): InvalidTagFilterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AutoRollbackEventsList omitted. -/** - * deserializeAws_json1_1InvalidTagsToAddException - */ -const de_InvalidTagsToAddException = (output: any, context: __SerdeContext): InvalidTagsToAddException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AutoScalingGroup omitted. + +// de_AutoScalingGroupList omitted. + +// de_AutoScalingGroupNameList omitted. /** - * deserializeAws_json1_1InvalidTargetFilterNameException + * deserializeAws_json1_1BatchGetApplicationRevisionsOutput */ -const de_InvalidTargetFilterNameException = ( +const de_BatchGetApplicationRevisionsOutput = ( output: any, context: __SerdeContext -): InvalidTargetFilterNameException => { - return { - message: __expectString(output.message), - } as any; +): BatchGetApplicationRevisionsOutput => { + return take(output, { + applicationName: __expectString, + errorMessage: __expectString, + revisions: (_: any) => de_RevisionInfoList(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidTargetGroupPairException + * deserializeAws_json1_1BatchGetApplicationsOutput */ -const de_InvalidTargetGroupPairException = (output: any, context: __SerdeContext): InvalidTargetGroupPairException => { - return { - message: __expectString(output.message), - } as any; +const de_BatchGetApplicationsOutput = (output: any, context: __SerdeContext): BatchGetApplicationsOutput => { + return take(output, { + applicationsInfo: (_: any) => de_ApplicationsInfoList(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidTargetInstancesException + * deserializeAws_json1_1BatchGetDeploymentGroupsOutput */ -const de_InvalidTargetInstancesException = (output: any, context: __SerdeContext): InvalidTargetInstancesException => { - return { - message: __expectString(output.message), - } as any; +const de_BatchGetDeploymentGroupsOutput = (output: any, context: __SerdeContext): BatchGetDeploymentGroupsOutput => { + return take(output, { + deploymentGroupsInfo: (_: any) => de_DeploymentGroupInfoList(_, context), + errorMessage: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InvalidTimeRangeException + * deserializeAws_json1_1BatchGetDeploymentInstancesOutput */ -const de_InvalidTimeRangeException = (output: any, context: __SerdeContext): InvalidTimeRangeException => { - return { - message: __expectString(output.message), - } as any; +const de_BatchGetDeploymentInstancesOutput = ( + output: any, + context: __SerdeContext +): BatchGetDeploymentInstancesOutput => { + return take(output, { + errorMessage: __expectString, + instancesSummary: (_: any) => de_InstanceSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidTrafficRoutingConfigurationException + * deserializeAws_json1_1BatchGetDeploymentsOutput */ -const de_InvalidTrafficRoutingConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidTrafficRoutingConfigurationException => { - return { - message: __expectString(output.message), - } as any; +const de_BatchGetDeploymentsOutput = (output: any, context: __SerdeContext): BatchGetDeploymentsOutput => { + return take(output, { + deploymentsInfo: (_: any) => de_DeploymentsInfoList(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidTriggerConfigException + * deserializeAws_json1_1BatchGetDeploymentTargetsOutput */ -const de_InvalidTriggerConfigException = (output: any, context: __SerdeContext): InvalidTriggerConfigException => { - return { - message: __expectString(output.message), - } as any; +const de_BatchGetDeploymentTargetsOutput = (output: any, context: __SerdeContext): BatchGetDeploymentTargetsOutput => { + return take(output, { + deploymentTargets: (_: any) => de_DeploymentTargetList(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidUpdateOutdatedInstancesOnlyValueException + * deserializeAws_json1_1BatchGetOnPremisesInstancesOutput */ -const de_InvalidUpdateOutdatedInstancesOnlyValueException = ( +const de_BatchGetOnPremisesInstancesOutput = ( output: any, context: __SerdeContext -): InvalidUpdateOutdatedInstancesOnlyValueException => { - return { - message: __expectString(output.message), - } as any; +): BatchGetOnPremisesInstancesOutput => { + return take(output, { + instanceInfos: (_: any) => de_InstanceInfoList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1LambdaFunctionInfo - */ -const de_LambdaFunctionInfo = (output: any, context: __SerdeContext): LambdaFunctionInfo => { - return { - currentVersion: __expectString(output.currentVersion), - functionAlias: __expectString(output.functionAlias), - functionName: __expectString(output.functionName), - targetVersion: __expectString(output.targetVersion), - targetVersionWeight: __limitedParseDouble(output.targetVersionWeight), - } as any; -}; +// de_BatchLimitExceededException omitted. -/** - * deserializeAws_json1_1LambdaTarget - */ -const de_LambdaTarget = (output: any, context: __SerdeContext): LambdaTarget => { - return { - deploymentId: __expectString(output.deploymentId), - lambdaFunctionInfo: - output.lambdaFunctionInfo != null ? de_LambdaFunctionInfo(output.lambdaFunctionInfo, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - lifecycleEvents: - output.lifecycleEvents != null ? de_LifecycleEventList(output.lifecycleEvents, context) : undefined, - status: __expectString(output.status), - targetArn: __expectString(output.targetArn), - targetId: __expectString(output.targetId), - } as any; -}; +// de_BlueGreenDeploymentConfiguration omitted. + +// de_BlueInstanceTerminationOption omitted. + +// de_BucketNameFilterRequiredException omitted. /** - * deserializeAws_json1_1LastDeploymentInfo + * deserializeAws_json1_1CloudFormationTarget */ -const de_LastDeploymentInfo = (output: any, context: __SerdeContext): LastDeploymentInfo => { - return { - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - deploymentId: __expectString(output.deploymentId), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - status: __expectString(output.status), - } as any; +const de_CloudFormationTarget = (output: any, context: __SerdeContext): CloudFormationTarget => { + return take(output, { + deploymentId: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleEvents: (_: any) => de_LifecycleEventList(_, context), + resourceType: __expectString, + status: __expectString, + targetId: __expectString, + targetVersionWeight: __limitedParseDouble, + }) as any; }; +// de_CreateApplicationOutput omitted. + +// de_CreateDeploymentConfigOutput omitted. + +// de_CreateDeploymentGroupOutput omitted. + +// de_CreateDeploymentOutput omitted. + +// de_DeleteDeploymentGroupOutput omitted. + +// de_DeleteGitHubAccountTokenOutput omitted. + +// de_DeleteResourcesByExternalIdOutput omitted. + +// de_DeploymentAlreadyCompletedException omitted. + +// de_DeploymentConfigAlreadyExistsException omitted. + +// de_DeploymentConfigDoesNotExistException omitted. + /** - * deserializeAws_json1_1LifecycleEvent + * deserializeAws_json1_1DeploymentConfigInfo */ -const de_LifecycleEvent = (output: any, context: __SerdeContext): LifecycleEvent => { - return { - diagnostics: output.diagnostics != null ? de_Diagnostics(output.diagnostics, context) : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - lifecycleEventName: __expectString(output.lifecycleEventName), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - } as any; +const de_DeploymentConfigInfo = (output: any, context: __SerdeContext): DeploymentConfigInfo => { + return take(output, { + computePlatform: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentConfigId: __expectString, + deploymentConfigName: __expectString, + minimumHealthyHosts: _json, + trafficRoutingConfig: _json, + }) as any; }; +// de_DeploymentConfigInUseException omitted. + +// de_DeploymentConfigLimitExceededException omitted. + +// de_DeploymentConfigNameRequiredException omitted. + +// de_DeploymentConfigsList omitted. + +// de_DeploymentDoesNotExistException omitted. + +// de_DeploymentGroupAlreadyExistsException omitted. + +// de_DeploymentGroupDoesNotExistException omitted. + /** - * deserializeAws_json1_1LifecycleEventAlreadyCompletedException + * deserializeAws_json1_1DeploymentGroupInfo */ -const de_LifecycleEventAlreadyCompletedException = ( - output: any, - context: __SerdeContext -): LifecycleEventAlreadyCompletedException => { - return { - message: __expectString(output.message), - } as any; +const de_DeploymentGroupInfo = (output: any, context: __SerdeContext): DeploymentGroupInfo => { + return take(output, { + alarmConfiguration: _json, + applicationName: __expectString, + autoRollbackConfiguration: _json, + autoScalingGroups: _json, + blueGreenDeploymentConfiguration: _json, + computePlatform: __expectString, + deploymentConfigName: __expectString, + deploymentGroupId: __expectString, + deploymentGroupName: __expectString, + deploymentStyle: _json, + ec2TagFilters: _json, + ec2TagSet: _json, + ecsServices: _json, + lastAttemptedDeployment: (_: any) => de_LastDeploymentInfo(_, context), + lastSuccessfulDeployment: (_: any) => de_LastDeploymentInfo(_, context), + loadBalancerInfo: _json, + onPremisesInstanceTagFilters: _json, + onPremisesTagSet: _json, + outdatedInstancesStrategy: __expectString, + serviceRoleArn: __expectString, + targetRevision: _json, + triggerConfigurations: _json, + }) as any; }; /** - * deserializeAws_json1_1LifecycleEventList + * deserializeAws_json1_1DeploymentGroupInfoList */ -const de_LifecycleEventList = (output: any, context: __SerdeContext): LifecycleEvent[] => { +const de_DeploymentGroupInfoList = (output: any, context: __SerdeContext): DeploymentGroupInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LifecycleEvent(entry, context); + return de_DeploymentGroupInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LifecycleHookLimitExceededException - */ -const de_LifecycleHookLimitExceededException = ( - output: any, - context: __SerdeContext -): LifecycleHookLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ListApplicationRevisionsOutput - */ -const de_ListApplicationRevisionsOutput = (output: any, context: __SerdeContext): ListApplicationRevisionsOutput => { - return { - nextToken: __expectString(output.nextToken), - revisions: output.revisions != null ? de_RevisionLocationList(output.revisions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListApplicationsOutput - */ -const de_ListApplicationsOutput = (output: any, context: __SerdeContext): ListApplicationsOutput => { - return { - applications: output.applications != null ? de_ApplicationsList(output.applications, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListDeploymentConfigsOutput - */ -const de_ListDeploymentConfigsOutput = (output: any, context: __SerdeContext): ListDeploymentConfigsOutput => { - return { - deploymentConfigsList: - output.deploymentConfigsList != null - ? de_DeploymentConfigsList(output.deploymentConfigsList, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DeploymentGroupLimitExceededException omitted. -/** - * deserializeAws_json1_1ListDeploymentGroupsOutput - */ -const de_ListDeploymentGroupsOutput = (output: any, context: __SerdeContext): ListDeploymentGroupsOutput => { - return { - applicationName: __expectString(output.applicationName), - deploymentGroups: - output.deploymentGroups != null ? de_DeploymentGroupsList(output.deploymentGroups, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DeploymentGroupNameRequiredException omitted. -/** - * deserializeAws_json1_1ListDeploymentInstancesOutput - */ -const de_ListDeploymentInstancesOutput = (output: any, context: __SerdeContext): ListDeploymentInstancesOutput => { - return { - instancesList: output.instancesList != null ? de_InstancesList(output.instancesList, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DeploymentGroupsList omitted. -/** - * deserializeAws_json1_1ListDeploymentsOutput - */ -const de_ListDeploymentsOutput = (output: any, context: __SerdeContext): ListDeploymentsOutput => { - return { - deployments: output.deployments != null ? de_DeploymentsList(output.deployments, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DeploymentIdRequiredException omitted. /** - * deserializeAws_json1_1ListDeploymentTargetsOutput + * deserializeAws_json1_1DeploymentInfo */ -const de_ListDeploymentTargetsOutput = (output: any, context: __SerdeContext): ListDeploymentTargetsOutput => { - return { - nextToken: __expectString(output.nextToken), - targetIds: output.targetIds != null ? de_TargetIdList(output.targetIds, context) : undefined, - } as any; -}; +const de_DeploymentInfo = (output: any, context: __SerdeContext): DeploymentInfo => { + return take(output, { + additionalDeploymentStatusInfo: __expectString, + applicationName: __expectString, + autoRollbackConfiguration: _json, + blueGreenDeploymentConfiguration: _json, + completeTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + computePlatform: __expectString, + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + creator: __expectString, + deploymentConfigName: __expectString, + deploymentGroupName: __expectString, + deploymentId: __expectString, + deploymentOverview: _json, + deploymentStatusMessages: _json, + deploymentStyle: _json, + description: __expectString, + errorInformation: _json, + externalId: __expectString, + fileExistsBehavior: __expectString, + ignoreApplicationStopFailures: __expectBoolean, + instanceTerminationWaitTimeStarted: __expectBoolean, + loadBalancerInfo: _json, + overrideAlarmConfiguration: _json, + previousRevision: _json, + relatedDeployments: _json, + revision: _json, + rollbackInfo: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + targetInstances: _json, + updateOutdatedInstancesOnly: __expectBoolean, + }) as any; +}; + +// de_DeploymentIsNotInReadyStateException omitted. + +// de_DeploymentLimitExceededException omitted. + +// de_DeploymentNotStartedException omitted. + +// de_DeploymentOverview omitted. + +// de_DeploymentReadyOption omitted. /** - * deserializeAws_json1_1ListenerArnList + * deserializeAws_json1_1DeploymentsInfoList */ -const de_ListenerArnList = (output: any, context: __SerdeContext): string[] => { +const de_DeploymentsInfoList = (output: any, context: __SerdeContext): DeploymentInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DeploymentInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListGitHubAccountTokenNamesOutput - */ -const de_ListGitHubAccountTokenNamesOutput = ( - output: any, - context: __SerdeContext -): ListGitHubAccountTokenNamesOutput => { - return { - nextToken: __expectString(output.nextToken), - tokenNameList: - output.tokenNameList != null ? de_GitHubAccountTokenNameList(output.tokenNameList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListOnPremisesInstancesOutput - */ -const de_ListOnPremisesInstancesOutput = (output: any, context: __SerdeContext): ListOnPremisesInstancesOutput => { - return { - instanceNames: output.instanceNames != null ? de_InstanceNameList(output.instanceNames, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DeploymentsList omitted. -/** - * deserializeAws_json1_1ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_DeploymentStatusMessageList omitted. -/** - * deserializeAws_json1_1LoadBalancerInfo - */ -const de_LoadBalancerInfo = (output: any, context: __SerdeContext): LoadBalancerInfo => { - return { - elbInfoList: output.elbInfoList != null ? de_ELBInfoList(output.elbInfoList, context) : undefined, - targetGroupInfoList: - output.targetGroupInfoList != null ? de_TargetGroupInfoList(output.targetGroupInfoList, context) : undefined, - targetGroupPairInfoList: - output.targetGroupPairInfoList != null - ? de_TargetGroupPairInfoList(output.targetGroupPairInfoList, context) - : undefined, - } as any; -}; +// de_DeploymentStyle omitted. /** - * deserializeAws_json1_1MinimumHealthyHosts + * deserializeAws_json1_1DeploymentTarget */ -const de_MinimumHealthyHosts = (output: any, context: __SerdeContext): MinimumHealthyHosts => { - return { - type: __expectString(output.type), - value: __expectInt32(output.value), - } as any; +const de_DeploymentTarget = (output: any, context: __SerdeContext): DeploymentTarget => { + return take(output, { + cloudFormationTarget: (_: any) => de_CloudFormationTarget(_, context), + deploymentTargetType: __expectString, + ecsTarget: (_: any) => de_ECSTarget(_, context), + instanceTarget: (_: any) => de_InstanceTarget(_, context), + lambdaTarget: (_: any) => de_LambdaTarget(_, context), + }) as any; }; -/** - * deserializeAws_json1_1MultipleIamArnsProvidedException - */ -const de_MultipleIamArnsProvidedException = ( - output: any, - context: __SerdeContext -): MultipleIamArnsProvidedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DeploymentTargetDoesNotExistException omitted. -/** - * deserializeAws_json1_1OnPremisesTagSet - */ -const de_OnPremisesTagSet = (output: any, context: __SerdeContext): OnPremisesTagSet => { - return { - onPremisesTagSetList: - output.onPremisesTagSetList != null ? de_OnPremisesTagSetList(output.onPremisesTagSetList, context) : undefined, - } as any; -}; +// de_DeploymentTargetIdRequiredException omitted. /** - * deserializeAws_json1_1OnPremisesTagSetList + * deserializeAws_json1_1DeploymentTargetList */ -const de_OnPremisesTagSetList = (output: any, context: __SerdeContext): TagFilter[][] => { +const de_DeploymentTargetList = (output: any, context: __SerdeContext): DeploymentTarget[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagFilterList(entry, context); + return de_DeploymentTarget(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OperationNotSupportedException - */ -const de_OperationNotSupportedException = (output: any, context: __SerdeContext): OperationNotSupportedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DeploymentTargetListSizeExceededException omitted. -/** - * deserializeAws_json1_1PutLifecycleEventHookExecutionStatusOutput - */ -const de_PutLifecycleEventHookExecutionStatusOutput = ( - output: any, - context: __SerdeContext -): PutLifecycleEventHookExecutionStatusOutput => { - return { - lifecycleEventHookExecutionId: __expectString(output.lifecycleEventHookExecutionId), - } as any; -}; +// de_DescriptionTooLongException omitted. -/** - * deserializeAws_json1_1RawString - */ -const de_RawString = (output: any, context: __SerdeContext): RawString => { - return { - content: __expectString(output.content), - sha256: __expectString(output.sha256), - } as any; -}; +// de_Diagnostics omitted. -/** - * deserializeAws_json1_1RelatedDeployments - */ -const de_RelatedDeployments = (output: any, context: __SerdeContext): RelatedDeployments => { - return { - autoUpdateOutdatedInstancesDeploymentIds: - output.autoUpdateOutdatedInstancesDeploymentIds != null - ? de_DeploymentsList(output.autoUpdateOutdatedInstancesDeploymentIds, context) - : undefined, - autoUpdateOutdatedInstancesRootDeploymentId: __expectString(output.autoUpdateOutdatedInstancesRootDeploymentId), - } as any; -}; +// de_EC2TagFilter omitted. -/** - * deserializeAws_json1_1ResourceArnRequiredException - */ -const de_ResourceArnRequiredException = (output: any, context: __SerdeContext): ResourceArnRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_EC2TagFilterList omitted. -/** - * deserializeAws_json1_1ResourceValidationException - */ -const de_ResourceValidationException = (output: any, context: __SerdeContext): ResourceValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_EC2TagSet omitted. -/** - * deserializeAws_json1_1RevisionDoesNotExistException - */ -const de_RevisionDoesNotExistException = (output: any, context: __SerdeContext): RevisionDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_EC2TagSetList omitted. -/** - * deserializeAws_json1_1RevisionInfo - */ -const de_RevisionInfo = (output: any, context: __SerdeContext): RevisionInfo => { - return { - genericRevisionInfo: - output.genericRevisionInfo != null ? de_GenericRevisionInfo(output.genericRevisionInfo, context) : undefined, - revisionLocation: - output.revisionLocation != null ? de_RevisionLocation(output.revisionLocation, context) : undefined, - } as any; -}; +// de_ECSService omitted. + +// de_ECSServiceList omitted. + +// de_ECSServiceMappingLimitExceededException omitted. /** - * deserializeAws_json1_1RevisionInfoList - */ -const de_RevisionInfoList = (output: any, context: __SerdeContext): RevisionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RevisionInfo(entry, context); - }); - return retVal; + * deserializeAws_json1_1ECSTarget + */ +const de_ECSTarget = (output: any, context: __SerdeContext): ECSTarget => { + return take(output, { + deploymentId: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleEvents: (_: any) => de_LifecycleEventList(_, context), + status: __expectString, + targetArn: __expectString, + targetId: __expectString, + taskSetsInfo: (_: any) => de_ECSTaskSetList(_, context), + }) as any; }; /** - * deserializeAws_json1_1RevisionLocation + * deserializeAws_json1_1ECSTaskSet */ -const de_RevisionLocation = (output: any, context: __SerdeContext): RevisionLocation => { - return { - appSpecContent: output.appSpecContent != null ? de_AppSpecContent(output.appSpecContent, context) : undefined, - gitHubLocation: output.gitHubLocation != null ? de_GitHubLocation(output.gitHubLocation, context) : undefined, - revisionType: __expectString(output.revisionType), - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - string: output.string != null ? de_RawString(output.string, context) : undefined, - } as any; +const de_ECSTaskSet = (output: any, context: __SerdeContext): ECSTaskSet => { + return take(output, { + desiredCount: __expectLong, + identifer: __expectString, + pendingCount: __expectLong, + runningCount: __expectLong, + status: __expectString, + targetGroup: _json, + taskSetLabel: __expectString, + trafficWeight: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_json1_1RevisionLocationList + * deserializeAws_json1_1ECSTaskSetList */ -const de_RevisionLocationList = (output: any, context: __SerdeContext): RevisionLocation[] => { +const de_ECSTaskSetList = (output: any, context: __SerdeContext): ECSTaskSet[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RevisionLocation(entry, context); + return de_ECSTaskSet(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RevisionRequiredException - */ -const de_RevisionRequiredException = (output: any, context: __SerdeContext): RevisionRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ELBInfo omitted. -/** - * deserializeAws_json1_1RoleRequiredException - */ -const de_RoleRequiredException = (output: any, context: __SerdeContext): RoleRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ELBInfoList omitted. -/** - * deserializeAws_json1_1RollbackInfo - */ -const de_RollbackInfo = (output: any, context: __SerdeContext): RollbackInfo => { - return { - rollbackDeploymentId: __expectString(output.rollbackDeploymentId), - rollbackMessage: __expectString(output.rollbackMessage), - rollbackTriggeringDeploymentId: __expectString(output.rollbackTriggeringDeploymentId), - } as any; -}; +// de_ErrorInformation omitted. /** - * deserializeAws_json1_1S3Location + * deserializeAws_json1_1GenericRevisionInfo */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - bundleType: __expectString(output.bundleType), - eTag: __expectString(output.eTag), - key: __expectString(output.key), - version: __expectString(output.version), - } as any; +const de_GenericRevisionInfo = (output: any, context: __SerdeContext): GenericRevisionInfo => { + return take(output, { + deploymentGroups: _json, + description: __expectString, + firstUsedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUsedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registerTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1StopDeploymentOutput + * deserializeAws_json1_1GetApplicationOutput */ -const de_StopDeploymentOutput = (output: any, context: __SerdeContext): StopDeploymentOutput => { - return { - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; +const de_GetApplicationOutput = (output: any, context: __SerdeContext): GetApplicationOutput => { + return take(output, { + application: (_: any) => de_ApplicationInfo(_, context), + }) as any; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1GetApplicationRevisionOutput */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_GetApplicationRevisionOutput = (output: any, context: __SerdeContext): GetApplicationRevisionOutput => { + return take(output, { + applicationName: __expectString, + revision: _json, + revisionInfo: (_: any) => de_GenericRevisionInfo(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagFilter + * deserializeAws_json1_1GetDeploymentConfigOutput */ -const de_TagFilter = (output: any, context: __SerdeContext): TagFilter => { - return { - Key: __expectString(output.Key), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; +const de_GetDeploymentConfigOutput = (output: any, context: __SerdeContext): GetDeploymentConfigOutput => { + return take(output, { + deploymentConfigInfo: (_: any) => de_DeploymentConfigInfo(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagFilterList + * deserializeAws_json1_1GetDeploymentGroupOutput */ -const de_TagFilterList = (output: any, context: __SerdeContext): TagFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagFilter(entry, context); - }); - return retVal; +const de_GetDeploymentGroupOutput = (output: any, context: __SerdeContext): GetDeploymentGroupOutput => { + return take(output, { + deploymentGroupInfo: (_: any) => de_DeploymentGroupInfo(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagLimitExceededException + * deserializeAws_json1_1GetDeploymentInstanceOutput */ -const de_TagLimitExceededException = (output: any, context: __SerdeContext): TagLimitExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_GetDeploymentInstanceOutput = (output: any, context: __SerdeContext): GetDeploymentInstanceOutput => { + return take(output, { + instanceSummary: (_: any) => de_InstanceSummary(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1GetDeploymentOutput */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_GetDeploymentOutput = (output: any, context: __SerdeContext): GetDeploymentOutput => { + return take(output, { + deploymentInfo: (_: any) => de_DeploymentInfo(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagRequiredException + * deserializeAws_json1_1GetDeploymentTargetOutput */ -const de_TagRequiredException = (output: any, context: __SerdeContext): TagRequiredException => { - return { - message: __expectString(output.message), - } as any; +const de_GetDeploymentTargetOutput = (output: any, context: __SerdeContext): GetDeploymentTargetOutput => { + return take(output, { + deploymentTarget: (_: any) => de_DeploymentTarget(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagResourceOutput + * deserializeAws_json1_1GetOnPremisesInstanceOutput */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; +const de_GetOnPremisesInstanceOutput = (output: any, context: __SerdeContext): GetOnPremisesInstanceOutput => { + return take(output, { + instanceInfo: (_: any) => de_InstanceInfo(_, context), + }) as any; }; -/** - * deserializeAws_json1_1TagSetListLimitExceededException - */ -const de_TagSetListLimitExceededException = ( - output: any, - context: __SerdeContext -): TagSetListLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_GitHubAccountTokenDoesNotExistException omitted. + +// de_GitHubAccountTokenNameList omitted. + +// de_GitHubAccountTokenNameRequiredException omitted. + +// de_GitHubLocation omitted. + +// de_GreenFleetProvisioningOption omitted. + +// de_IamArnRequiredException omitted. + +// de_IamSessionArnAlreadyRegisteredException omitted. + +// de_IamUserArnAlreadyRegisteredException omitted. + +// de_IamUserArnRequiredException omitted. + +// de_InstanceDoesNotExistException omitted. + +// de_InstanceIdRequiredException omitted. /** - * deserializeAws_json1_1TargetGroupInfo + * deserializeAws_json1_1InstanceInfo */ -const de_TargetGroupInfo = (output: any, context: __SerdeContext): TargetGroupInfo => { - return { - name: __expectString(output.name), - } as any; +const de_InstanceInfo = (output: any, context: __SerdeContext): InstanceInfo => { + return take(output, { + deregisterTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + iamSessionArn: __expectString, + iamUserArn: __expectString, + instanceArn: __expectString, + instanceName: __expectString, + registerTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + }) as any; }; /** - * deserializeAws_json1_1TargetGroupInfoList + * deserializeAws_json1_1InstanceInfoList */ -const de_TargetGroupInfoList = (output: any, context: __SerdeContext): TargetGroupInfo[] => { +const de_InstanceInfoList = (output: any, context: __SerdeContext): InstanceInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetGroupInfo(entry, context); + return de_InstanceInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TargetGroupPairInfo - */ -const de_TargetGroupPairInfo = (output: any, context: __SerdeContext): TargetGroupPairInfo => { - return { - prodTrafficRoute: output.prodTrafficRoute != null ? de_TrafficRoute(output.prodTrafficRoute, context) : undefined, - targetGroups: output.targetGroups != null ? de_TargetGroupInfoList(output.targetGroups, context) : undefined, - testTrafficRoute: output.testTrafficRoute != null ? de_TrafficRoute(output.testTrafficRoute, context) : undefined, - } as any; -}; +// de_InstanceLimitExceededException omitted. + +// de_InstanceNameAlreadyRegisteredException omitted. + +// de_InstanceNameList omitted. + +// de_InstanceNameRequiredException omitted. + +// de_InstanceNotRegisteredException omitted. + +// de_InstancesList omitted. /** - * deserializeAws_json1_1TargetGroupPairInfoList + * deserializeAws_json1_1InstanceSummary */ -const de_TargetGroupPairInfoList = (output: any, context: __SerdeContext): TargetGroupPairInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetGroupPairInfo(entry, context); - }); - return retVal; +const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { + return take(output, { + deploymentId: __expectString, + instanceId: __expectString, + instanceType: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleEvents: (_: any) => de_LifecycleEventList(_, context), + status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TargetIdList + * deserializeAws_json1_1InstanceSummaryList */ -const de_TargetIdList = (output: any, context: __SerdeContext): string[] => { +const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_InstanceSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1TargetInstances + * deserializeAws_json1_1InstanceTarget */ -const de_TargetInstances = (output: any, context: __SerdeContext): TargetInstances => { - return { - autoScalingGroups: - output.autoScalingGroups != null ? de_AutoScalingGroupNameList(output.autoScalingGroups, context) : undefined, - ec2TagSet: output.ec2TagSet != null ? de_EC2TagSet(output.ec2TagSet, context) : undefined, - tagFilters: output.tagFilters != null ? de_EC2TagFilterList(output.tagFilters, context) : undefined, - } as any; +const de_InstanceTarget = (output: any, context: __SerdeContext): InstanceTarget => { + return take(output, { + deploymentId: __expectString, + instanceLabel: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleEvents: (_: any) => de_LifecycleEventList(_, context), + status: __expectString, + targetArn: __expectString, + targetId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidAlarmConfigException omitted. -/** - * deserializeAws_json1_1TimeBasedCanary - */ -const de_TimeBasedCanary = (output: any, context: __SerdeContext): TimeBasedCanary => { - return { - canaryInterval: __expectInt32(output.canaryInterval), - canaryPercentage: __expectInt32(output.canaryPercentage), - } as any; -}; +// de_InvalidApplicationNameException omitted. + +// de_InvalidArnException omitted. + +// de_InvalidAutoRollbackConfigException omitted. + +// de_InvalidAutoScalingGroupException omitted. + +// de_InvalidBlueGreenDeploymentConfigurationException omitted. + +// de_InvalidBucketNameFilterException omitted. + +// de_InvalidComputePlatformException omitted. + +// de_InvalidDeployedStateFilterException omitted. + +// de_InvalidDeploymentConfigNameException omitted. + +// de_InvalidDeploymentGroupNameException omitted. + +// de_InvalidDeploymentIdException omitted. + +// de_InvalidDeploymentInstanceTypeException omitted. + +// de_InvalidDeploymentStatusException omitted. + +// de_InvalidDeploymentStyleException omitted. + +// de_InvalidDeploymentTargetIdException omitted. + +// de_InvalidDeploymentWaitTypeException omitted. + +// de_InvalidEC2TagCombinationException omitted. + +// de_InvalidEC2TagException omitted. + +// de_InvalidECSServiceException omitted. + +// de_InvalidExternalIdException omitted. + +// de_InvalidFileExistsBehaviorException omitted. + +// de_InvalidGitHubAccountTokenException omitted. + +// de_InvalidGitHubAccountTokenNameException omitted. + +// de_InvalidIamSessionArnException omitted. + +// de_InvalidIamUserArnException omitted. + +// de_InvalidIgnoreApplicationStopFailuresValueException omitted. + +// de_InvalidInputException omitted. + +// de_InvalidInstanceNameException omitted. + +// de_InvalidInstanceStatusException omitted. + +// de_InvalidInstanceTypeException omitted. + +// de_InvalidKeyPrefixFilterException omitted. + +// de_InvalidLifecycleEventHookExecutionIdException omitted. + +// de_InvalidLifecycleEventHookExecutionStatusException omitted. + +// de_InvalidLoadBalancerInfoException omitted. + +// de_InvalidMinimumHealthyHostValueException omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidOnPremisesTagCombinationException omitted. + +// de_InvalidOperationException omitted. + +// de_InvalidRegistrationStatusException omitted. + +// de_InvalidRevisionException omitted. + +// de_InvalidRoleException omitted. + +// de_InvalidSortByException omitted. + +// de_InvalidSortOrderException omitted. + +// de_InvalidTagException omitted. + +// de_InvalidTagFilterException omitted. + +// de_InvalidTagsToAddException omitted. + +// de_InvalidTargetFilterNameException omitted. + +// de_InvalidTargetGroupPairException omitted. + +// de_InvalidTargetInstancesException omitted. + +// de_InvalidTimeRangeException omitted. + +// de_InvalidTrafficRoutingConfigurationException omitted. + +// de_InvalidTriggerConfigException omitted. + +// de_InvalidUpdateOutdatedInstancesOnlyValueException omitted. /** - * deserializeAws_json1_1TimeBasedLinear + * deserializeAws_json1_1LambdaFunctionInfo */ -const de_TimeBasedLinear = (output: any, context: __SerdeContext): TimeBasedLinear => { - return { - linearInterval: __expectInt32(output.linearInterval), - linearPercentage: __expectInt32(output.linearPercentage), - } as any; +const de_LambdaFunctionInfo = (output: any, context: __SerdeContext): LambdaFunctionInfo => { + return take(output, { + currentVersion: __expectString, + functionAlias: __expectString, + functionName: __expectString, + targetVersion: __expectString, + targetVersionWeight: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_json1_1TrafficRoute + * deserializeAws_json1_1LambdaTarget */ -const de_TrafficRoute = (output: any, context: __SerdeContext): TrafficRoute => { - return { - listenerArns: output.listenerArns != null ? de_ListenerArnList(output.listenerArns, context) : undefined, - } as any; +const de_LambdaTarget = (output: any, context: __SerdeContext): LambdaTarget => { + return take(output, { + deploymentId: __expectString, + lambdaFunctionInfo: (_: any) => de_LambdaFunctionInfo(_, context), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleEvents: (_: any) => de_LifecycleEventList(_, context), + status: __expectString, + targetArn: __expectString, + targetId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TrafficRoutingConfig + * deserializeAws_json1_1LastDeploymentInfo */ -const de_TrafficRoutingConfig = (output: any, context: __SerdeContext): TrafficRoutingConfig => { - return { - timeBasedCanary: output.timeBasedCanary != null ? de_TimeBasedCanary(output.timeBasedCanary, context) : undefined, - timeBasedLinear: output.timeBasedLinear != null ? de_TimeBasedLinear(output.timeBasedLinear, context) : undefined, - type: __expectString(output.type), - } as any; +const de_LastDeploymentInfo = (output: any, context: __SerdeContext): LastDeploymentInfo => { + return take(output, { + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TriggerConfig + * deserializeAws_json1_1LifecycleEvent */ -const de_TriggerConfig = (output: any, context: __SerdeContext): TriggerConfig => { - return { - triggerEvents: output.triggerEvents != null ? de_TriggerEventTypeList(output.triggerEvents, context) : undefined, - triggerName: __expectString(output.triggerName), - triggerTargetArn: __expectString(output.triggerTargetArn), - } as any; +const de_LifecycleEvent = (output: any, context: __SerdeContext): LifecycleEvent => { + return take(output, { + diagnostics: _json, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleEventName: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; +// de_LifecycleEventAlreadyCompletedException omitted. + /** - * deserializeAws_json1_1TriggerConfigList + * deserializeAws_json1_1LifecycleEventList */ -const de_TriggerConfigList = (output: any, context: __SerdeContext): TriggerConfig[] => { +const de_LifecycleEventList = (output: any, context: __SerdeContext): LifecycleEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TriggerConfig(entry, context); + return de_LifecycleEvent(entry, context); }); return retVal; }; +// de_LifecycleHookLimitExceededException omitted. + +// de_ListApplicationRevisionsOutput omitted. + +// de_ListApplicationsOutput omitted. + +// de_ListDeploymentConfigsOutput omitted. + +// de_ListDeploymentGroupsOutput omitted. + +// de_ListDeploymentInstancesOutput omitted. + +// de_ListDeploymentsOutput omitted. + +// de_ListDeploymentTargetsOutput omitted. + +// de_ListenerArnList omitted. + +// de_ListGitHubAccountTokenNamesOutput omitted. + +// de_ListOnPremisesInstancesOutput omitted. + +// de_ListTagsForResourceOutput omitted. + +// de_LoadBalancerInfo omitted. + +// de_MinimumHealthyHosts omitted. + +// de_MultipleIamArnsProvidedException omitted. + +// de_OnPremisesTagSet omitted. + +// de_OnPremisesTagSetList omitted. + +// de_OperationNotSupportedException omitted. + +// de_PutLifecycleEventHookExecutionStatusOutput omitted. + +// de_RawString omitted. + +// de_RelatedDeployments omitted. + +// de_ResourceArnRequiredException omitted. + +// de_ResourceValidationException omitted. + +// de_RevisionDoesNotExistException omitted. + +/** + * deserializeAws_json1_1RevisionInfo + */ +const de_RevisionInfo = (output: any, context: __SerdeContext): RevisionInfo => { + return take(output, { + genericRevisionInfo: (_: any) => de_GenericRevisionInfo(_, context), + revisionLocation: _json, + }) as any; +}; + /** - * deserializeAws_json1_1TriggerEventTypeList + * deserializeAws_json1_1RevisionInfoList */ -const de_TriggerEventTypeList = (output: any, context: __SerdeContext): (TriggerEventType | string)[] => { +const de_RevisionInfoList = (output: any, context: __SerdeContext): RevisionInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_RevisionInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TriggerTargetsLimitExceededException - */ -const de_TriggerTargetsLimitExceededException = ( - output: any, - context: __SerdeContext -): TriggerTargetsLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RevisionLocation omitted. -/** - * deserializeAws_json1_1UnsupportedActionForDeploymentTypeException - */ -const de_UnsupportedActionForDeploymentTypeException = ( - output: any, - context: __SerdeContext -): UnsupportedActionForDeploymentTypeException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RevisionLocationList omitted. -/** - * deserializeAws_json1_1UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_RevisionRequiredException omitted. -/** - * deserializeAws_json1_1UpdateDeploymentGroupOutput - */ -const de_UpdateDeploymentGroupOutput = (output: any, context: __SerdeContext): UpdateDeploymentGroupOutput => { - return { - hooksNotCleanedUp: - output.hooksNotCleanedUp != null ? de_AutoScalingGroupList(output.hooksNotCleanedUp, context) : undefined, - } as any; -}; +// de_RoleRequiredException omitted. + +// de_RollbackInfo omitted. + +// de_S3Location omitted. + +// de_StopDeploymentOutput omitted. + +// de_Tag omitted. + +// de_TagFilter omitted. + +// de_TagFilterList omitted. + +// de_TagLimitExceededException omitted. + +// de_TagList omitted. + +// de_TagRequiredException omitted. + +// de_TagResourceOutput omitted. + +// de_TagSetListLimitExceededException omitted. + +// de_TargetGroupInfo omitted. + +// de_TargetGroupInfoList omitted. + +// de_TargetGroupPairInfo omitted. + +// de_TargetGroupPairInfoList omitted. + +// de_TargetIdList omitted. + +// de_TargetInstances omitted. + +// de_ThrottlingException omitted. + +// de_TimeBasedCanary omitted. + +// de_TimeBasedLinear omitted. + +// de_TrafficRoute omitted. + +// de_TrafficRoutingConfig omitted. + +// de_TriggerConfig omitted. + +// de_TriggerConfigList omitted. + +// de_TriggerEventTypeList omitted. + +// de_TriggerTargetsLimitExceededException omitted. + +// de_UnsupportedActionForDeploymentTypeException omitted. + +// de_UntagResourceOutput omitted. + +// de_UpdateDeploymentGroupOutput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9871,6 +6901,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-codeguru-reviewer/src/protocols/Aws_restJson1.ts b/clients/client-codeguru-reviewer/src/protocols/Aws_restJson1.ts index 0a4df2054ee1..927ecb8298b6 100644 --- a/clients/client-codeguru-reviewer/src/protocols/Aws_restJson1.ts +++ b/clients/client-codeguru-reviewer/src/protocols/Aws_restJson1.ts @@ -1,18 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -77,13 +77,9 @@ import { EventInfo, InternalServerException, KMSKeyDetails, - Metrics, - MetricsSummary, NotFoundException, Reaction, RecommendationFeedback, - RecommendationFeedbackSummary, - RecommendationSummary, Repository, RepositoryAnalysis, RepositoryAssociation, @@ -91,7 +87,6 @@ import { RepositoryHeadSourceCodeType, RequestMetadata, ResourceNotFoundException, - RuleMetadata, S3BucketRepository, S3Repository, S3RepositoryDetails, @@ -114,12 +109,14 @@ export const se_AssociateRepositoryCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.KMSKeyDetails != null && { KMSKeyDetails: se_KMSKeyDetails(input.KMSKeyDetails, context) }), - ...(input.Repository != null && { Repository: se_Repository(input.Repository, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + KMSKeyDetails: (_) => _json(_), + Repository: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -144,12 +141,14 @@ export const se_CreateCodeReviewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/codereviews"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.RepositoryAssociationArn != null && { RepositoryAssociationArn: input.RepositoryAssociationArn }), - ...(input.Type != null && { Type: se_CodeReviewType(input.Type, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + RepositoryAssociationArn: [], + Type: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -476,11 +475,13 @@ export const se_PutRecommendationFeedbackCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback"; let body: any; - body = JSON.stringify({ - ...(input.CodeReviewArn != null && { CodeReviewArn: input.CodeReviewArn }), - ...(input.Reactions != null && { Reactions: se_Reactions(input.Reactions, context) }), - ...(input.RecommendationId != null && { RecommendationId: input.RecommendationId }), - }); + body = JSON.stringify( + take(input, { + CodeReviewArn: [], + Reactions: (_) => _json(_), + RecommendationId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -506,9 +507,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -564,12 +567,11 @@ export const de_AssociateRepositoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RepositoryAssociation != null) { - contents.RepositoryAssociation = de_RepositoryAssociation(data.RepositoryAssociation, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + RepositoryAssociation: (_) => de_RepositoryAssociation(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -603,10 +605,9 @@ const de_AssociateRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -626,9 +627,10 @@ export const de_CreateCodeReviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeReview != null) { - contents.CodeReview = de_CodeReview(data.CodeReview, context); - } + const doc = take(data, { + CodeReview: (_) => de_CodeReview(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -665,10 +667,9 @@ const de_CreateCodeReviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -688,9 +689,10 @@ export const de_DescribeCodeReviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeReview != null) { - contents.CodeReview = de_CodeReview(data.CodeReview, context); - } + const doc = take(data, { + CodeReview: (_) => de_CodeReview(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -724,10 +726,9 @@ const de_DescribeCodeReviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -747,9 +748,10 @@ export const de_DescribeRecommendationFeedbackCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RecommendationFeedback != null) { - contents.RecommendationFeedback = de_RecommendationFeedback(data.RecommendationFeedback, context); - } + const doc = take(data, { + RecommendationFeedback: (_) => de_RecommendationFeedback(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -783,10 +785,9 @@ const de_DescribeRecommendationFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -806,12 +807,11 @@ export const de_DescribeRepositoryAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RepositoryAssociation != null) { - contents.RepositoryAssociation = de_RepositoryAssociation(data.RepositoryAssociation, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + RepositoryAssociation: (_) => de_RepositoryAssociation(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -845,10 +845,9 @@ const de_DescribeRepositoryAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -868,12 +867,11 @@ export const de_DisassociateRepositoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RepositoryAssociation != null) { - contents.RepositoryAssociation = de_RepositoryAssociation(data.RepositoryAssociation, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + RepositoryAssociation: (_) => de_RepositoryAssociation(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -910,10 +908,9 @@ const de_DisassociateRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -933,12 +930,11 @@ export const de_ListCodeReviewsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeReviewSummaries != null) { - contents.CodeReviewSummaries = de_CodeReviewSummaries(data.CodeReviewSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CodeReviewSummaries: (_) => de_CodeReviewSummaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -969,10 +965,9 @@ const de_ListCodeReviewsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -992,15 +987,11 @@ export const de_ListRecommendationFeedbackCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RecommendationFeedbackSummaries != null) { - contents.RecommendationFeedbackSummaries = de_RecommendationFeedbackSummaries( - data.RecommendationFeedbackSummaries, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + RecommendationFeedbackSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1034,10 +1025,9 @@ const de_ListRecommendationFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1057,12 +1047,11 @@ export const de_ListRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RecommendationSummaries != null) { - contents.RecommendationSummaries = de_RecommendationSummaries(data.RecommendationSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + RecommendationSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1096,10 +1085,9 @@ const de_ListRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1119,15 +1107,11 @@ export const de_ListRepositoryAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RepositoryAssociationSummaries != null) { - contents.RepositoryAssociationSummaries = de_RepositoryAssociationSummaries( - data.RepositoryAssociationSummaries, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + RepositoryAssociationSummaries: (_) => de_RepositoryAssociationSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1155,10 +1139,9 @@ const de_ListRepositoryAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1178,9 +1161,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1208,10 +1192,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1264,10 +1247,9 @@ const de_PutRecommendationFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1314,10 +1296,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1364,16 +1345,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1383,9 +1363,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1399,9 +1380,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1418,9 +1400,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1434,9 +1417,10 @@ const de_InternalServerExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1453,9 +1437,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1469,9 +1454,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1485,9 +1471,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1495,283 +1482,72 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AnalysisTypes - */ -const se_AnalysisTypes = (input: (AnalysisType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AnalysisTypes omitted. -/** - * serializeAws_restJson1BranchDiffSourceCodeType - */ -const se_BranchDiffSourceCodeType = (input: BranchDiffSourceCodeType, context: __SerdeContext): any => { - return { - ...(input.DestinationBranchName != null && { DestinationBranchName: input.DestinationBranchName }), - ...(input.SourceBranchName != null && { SourceBranchName: input.SourceBranchName }), - }; -}; +// se_BranchDiffSourceCodeType omitted. -/** - * serializeAws_restJson1CodeArtifacts - */ -const se_CodeArtifacts = (input: CodeArtifacts, context: __SerdeContext): any => { - return { - ...(input.BuildArtifactsObjectKey != null && { BuildArtifactsObjectKey: input.BuildArtifactsObjectKey }), - ...(input.SourceCodeArtifactsObjectKey != null && { - SourceCodeArtifactsObjectKey: input.SourceCodeArtifactsObjectKey, - }), - }; -}; +// se_CodeArtifacts omitted. -/** - * serializeAws_restJson1CodeCommitRepository - */ -const se_CodeCommitRepository = (input: CodeCommitRepository, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CodeCommitRepository omitted. -/** - * serializeAws_restJson1CodeReviewType - */ -const se_CodeReviewType = (input: CodeReviewType, context: __SerdeContext): any => { - return { - ...(input.AnalysisTypes != null && { AnalysisTypes: se_AnalysisTypes(input.AnalysisTypes, context) }), - ...(input.RepositoryAnalysis != null && { - RepositoryAnalysis: se_RepositoryAnalysis(input.RepositoryAnalysis, context), - }), - }; -}; +// se_CodeReviewType omitted. -/** - * serializeAws_restJson1CommitDiffSourceCodeType - */ -const se_CommitDiffSourceCodeType = (input: CommitDiffSourceCodeType, context: __SerdeContext): any => { - return { - ...(input.DestinationCommit != null && { DestinationCommit: input.DestinationCommit }), - ...(input.MergeBaseCommit != null && { MergeBaseCommit: input.MergeBaseCommit }), - ...(input.SourceCommit != null && { SourceCommit: input.SourceCommit }), - }; -}; +// se_CommitDiffSourceCodeType omitted. -/** - * serializeAws_restJson1EventInfo - */ -const se_EventInfo = (input: EventInfo, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_EventInfo omitted. -/** - * serializeAws_restJson1KMSKeyDetails - */ -const se_KMSKeyDetails = (input: KMSKeyDetails, context: __SerdeContext): any => { - return { - ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }), - ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }), - }; -}; +// se_KMSKeyDetails omitted. -/** - * serializeAws_restJson1Reactions - */ -const se_Reactions = (input: (Reaction | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Reactions omitted. -/** - * serializeAws_restJson1Repository - */ -const se_Repository = (input: Repository, context: __SerdeContext): any => { - return { - ...(input.Bitbucket != null && { Bitbucket: se_ThirdPartySourceRepository(input.Bitbucket, context) }), - ...(input.CodeCommit != null && { CodeCommit: se_CodeCommitRepository(input.CodeCommit, context) }), - ...(input.GitHubEnterpriseServer != null && { - GitHubEnterpriseServer: se_ThirdPartySourceRepository(input.GitHubEnterpriseServer, context), - }), - ...(input.S3Bucket != null && { S3Bucket: se_S3Repository(input.S3Bucket, context) }), - }; -}; +// se_Repository omitted. -/** - * serializeAws_restJson1RepositoryAnalysis - */ -const se_RepositoryAnalysis = (input: RepositoryAnalysis, context: __SerdeContext): any => { - return { - ...(input.RepositoryHead != null && { - RepositoryHead: se_RepositoryHeadSourceCodeType(input.RepositoryHead, context), - }), - ...(input.SourceCodeType != null && { SourceCodeType: se_SourceCodeType(input.SourceCodeType, context) }), - }; -}; +// se_RepositoryAnalysis omitted. -/** - * serializeAws_restJson1RepositoryHeadSourceCodeType - */ -const se_RepositoryHeadSourceCodeType = (input: RepositoryHeadSourceCodeType, context: __SerdeContext): any => { - return { - ...(input.BranchName != null && { BranchName: input.BranchName }), - }; -}; +// se_RepositoryHeadSourceCodeType omitted. -/** - * serializeAws_restJson1RequestMetadata - */ -const se_RequestMetadata = (input: RequestMetadata, context: __SerdeContext): any => { - return { - ...(input.EventInfo != null && { EventInfo: se_EventInfo(input.EventInfo, context) }), - ...(input.RequestId != null && { RequestId: input.RequestId }), - ...(input.Requester != null && { Requester: input.Requester }), - ...(input.VendorName != null && { VendorName: input.VendorName }), - }; -}; +// se_RequestMetadata omitted. -/** - * serializeAws_restJson1S3BucketRepository - */ -const se_S3BucketRepository = (input: S3BucketRepository, context: __SerdeContext): any => { - return { - ...(input.Details != null && { Details: se_S3RepositoryDetails(input.Details, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_S3BucketRepository omitted. -/** - * serializeAws_restJson1S3Repository - */ -const se_S3Repository = (input: S3Repository, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_S3Repository omitted. -/** - * serializeAws_restJson1S3RepositoryDetails - */ -const se_S3RepositoryDetails = (input: S3RepositoryDetails, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.CodeArtifacts != null && { CodeArtifacts: se_CodeArtifacts(input.CodeArtifacts, context) }), - }; -}; +// se_S3RepositoryDetails omitted. -/** - * serializeAws_restJson1SourceCodeType - */ -const se_SourceCodeType = (input: SourceCodeType, context: __SerdeContext): any => { - return { - ...(input.BranchDiff != null && { BranchDiff: se_BranchDiffSourceCodeType(input.BranchDiff, context) }), - ...(input.CommitDiff != null && { CommitDiff: se_CommitDiffSourceCodeType(input.CommitDiff, context) }), - ...(input.RepositoryHead != null && { - RepositoryHead: se_RepositoryHeadSourceCodeType(input.RepositoryHead, context), - }), - ...(input.RequestMetadata != null && { RequestMetadata: se_RequestMetadata(input.RequestMetadata, context) }), - ...(input.S3BucketRepository != null && { - S3BucketRepository: se_S3BucketRepository(input.S3BucketRepository, context), - }), - }; -}; +// se_SourceCodeType omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1ThirdPartySourceRepository - */ -const se_ThirdPartySourceRepository = (input: ThirdPartySourceRepository, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Owner != null && { Owner: input.Owner }), - }; -}; +// se_ThirdPartySourceRepository omitted. -/** - * deserializeAws_restJson1AnalysisTypes - */ -const de_AnalysisTypes = (output: any, context: __SerdeContext): (AnalysisType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AnalysisTypes omitted. -/** - * deserializeAws_restJson1BranchDiffSourceCodeType - */ -const de_BranchDiffSourceCodeType = (output: any, context: __SerdeContext): BranchDiffSourceCodeType => { - return { - DestinationBranchName: __expectString(output.DestinationBranchName), - SourceBranchName: __expectString(output.SourceBranchName), - } as any; -}; +// de_BranchDiffSourceCodeType omitted. -/** - * deserializeAws_restJson1CodeArtifacts - */ -const de_CodeArtifacts = (output: any, context: __SerdeContext): CodeArtifacts => { - return { - BuildArtifactsObjectKey: __expectString(output.BuildArtifactsObjectKey), - SourceCodeArtifactsObjectKey: __expectString(output.SourceCodeArtifactsObjectKey), - } as any; -}; +// de_CodeArtifacts omitted. /** * deserializeAws_restJson1CodeReview */ const de_CodeReview = (output: any, context: __SerdeContext): CodeReview => { - return { - AnalysisTypes: output.AnalysisTypes != null ? de_AnalysisTypes(output.AnalysisTypes, context) : undefined, - AssociationArn: __expectString(output.AssociationArn), - CodeReviewArn: __expectString(output.CodeReviewArn), - ConfigFileState: __expectString(output.ConfigFileState), - CreatedTimeStamp: - output.CreatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp))) - : undefined, - LastUpdatedTimeStamp: - output.LastUpdatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp))) - : undefined, - Metrics: output.Metrics != null ? de_Metrics(output.Metrics, context) : undefined, - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - ProviderType: __expectString(output.ProviderType), - PullRequestId: __expectString(output.PullRequestId), - RepositoryName: __expectString(output.RepositoryName), - SourceCodeType: output.SourceCodeType != null ? de_SourceCodeType(output.SourceCodeType, context) : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - Type: __expectString(output.Type), - } as any; + return take(output, { + AnalysisTypes: _json, + AssociationArn: __expectString, + CodeReviewArn: __expectString, + ConfigFileState: __expectString, + CreatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metrics: _json, + Name: __expectString, + Owner: __expectString, + ProviderType: __expectString, + PullRequestId: __expectString, + RepositoryName: __expectString, + SourceCodeType: _json, + State: __expectString, + StateReason: __expectString, + Type: __expectString, + }) as any; }; /** @@ -1781,9 +1557,6 @@ const de_CodeReviewSummaries = (output: any, context: __SerdeContext): CodeRevie const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CodeReviewSummary(entry, context); }); return retVal; @@ -1793,198 +1566,74 @@ const de_CodeReviewSummaries = (output: any, context: __SerdeContext): CodeRevie * deserializeAws_restJson1CodeReviewSummary */ const de_CodeReviewSummary = (output: any, context: __SerdeContext): CodeReviewSummary => { - return { - CodeReviewArn: __expectString(output.CodeReviewArn), - CreatedTimeStamp: - output.CreatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp))) - : undefined, - LastUpdatedTimeStamp: - output.LastUpdatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp))) - : undefined, - MetricsSummary: output.MetricsSummary != null ? de_MetricsSummary(output.MetricsSummary, context) : undefined, - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - ProviderType: __expectString(output.ProviderType), - PullRequestId: __expectString(output.PullRequestId), - RepositoryName: __expectString(output.RepositoryName), - SourceCodeType: output.SourceCodeType != null ? de_SourceCodeType(output.SourceCodeType, context) : undefined, - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; + return take(output, { + CodeReviewArn: __expectString, + CreatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetricsSummary: _json, + Name: __expectString, + Owner: __expectString, + ProviderType: __expectString, + PullRequestId: __expectString, + RepositoryName: __expectString, + SourceCodeType: _json, + State: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1CommitDiffSourceCodeType - */ -const de_CommitDiffSourceCodeType = (output: any, context: __SerdeContext): CommitDiffSourceCodeType => { - return { - DestinationCommit: __expectString(output.DestinationCommit), - MergeBaseCommit: __expectString(output.MergeBaseCommit), - SourceCommit: __expectString(output.SourceCommit), - } as any; -}; +// de_CommitDiffSourceCodeType omitted. -/** - * deserializeAws_restJson1EventInfo - */ -const de_EventInfo = (output: any, context: __SerdeContext): EventInfo => { - return { - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; +// de_EventInfo omitted. -/** - * deserializeAws_restJson1KMSKeyDetails - */ -const de_KMSKeyDetails = (output: any, context: __SerdeContext): KMSKeyDetails => { - return { - EncryptionOption: __expectString(output.EncryptionOption), - KMSKeyId: __expectString(output.KMSKeyId), - } as any; -}; +// de_KMSKeyDetails omitted. -/** - * deserializeAws_restJson1Metrics - */ -const de_Metrics = (output: any, context: __SerdeContext): Metrics => { - return { - FindingsCount: __expectLong(output.FindingsCount), - MeteredLinesOfCodeCount: __expectLong(output.MeteredLinesOfCodeCount), - SuppressedLinesOfCodeCount: __expectLong(output.SuppressedLinesOfCodeCount), - } as any; -}; +// de_Metrics omitted. -/** - * deserializeAws_restJson1MetricsSummary - */ -const de_MetricsSummary = (output: any, context: __SerdeContext): MetricsSummary => { - return { - FindingsCount: __expectLong(output.FindingsCount), - MeteredLinesOfCodeCount: __expectLong(output.MeteredLinesOfCodeCount), - SuppressedLinesOfCodeCount: __expectLong(output.SuppressedLinesOfCodeCount), - } as any; -}; +// de_MetricsSummary omitted. -/** - * deserializeAws_restJson1Reactions - */ -const de_Reactions = (output: any, context: __SerdeContext): (Reaction | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Reactions omitted. /** * deserializeAws_restJson1RecommendationFeedback */ const de_RecommendationFeedback = (output: any, context: __SerdeContext): RecommendationFeedback => { - return { - CodeReviewArn: __expectString(output.CodeReviewArn), - CreatedTimeStamp: - output.CreatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp))) - : undefined, - LastUpdatedTimeStamp: - output.LastUpdatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp))) - : undefined, - Reactions: output.Reactions != null ? de_Reactions(output.Reactions, context) : undefined, - RecommendationId: __expectString(output.RecommendationId), - UserId: __expectString(output.UserId), - } as any; + return take(output, { + CodeReviewArn: __expectString, + CreatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Reactions: _json, + RecommendationId: __expectString, + UserId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1RecommendationFeedbackSummaries - */ -const de_RecommendationFeedbackSummaries = (output: any, context: __SerdeContext): RecommendationFeedbackSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationFeedbackSummary(entry, context); - }); - return retVal; -}; +// de_RecommendationFeedbackSummaries omitted. -/** - * deserializeAws_restJson1RecommendationFeedbackSummary - */ -const de_RecommendationFeedbackSummary = (output: any, context: __SerdeContext): RecommendationFeedbackSummary => { - return { - Reactions: output.Reactions != null ? de_Reactions(output.Reactions, context) : undefined, - RecommendationId: __expectString(output.RecommendationId), - UserId: __expectString(output.UserId), - } as any; -}; +// de_RecommendationFeedbackSummary omitted. -/** - * deserializeAws_restJson1RecommendationSummaries - */ -const de_RecommendationSummaries = (output: any, context: __SerdeContext): RecommendationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationSummary(entry, context); - }); - return retVal; -}; +// de_RecommendationSummaries omitted. -/** - * deserializeAws_restJson1RecommendationSummary - */ -const de_RecommendationSummary = (output: any, context: __SerdeContext): RecommendationSummary => { - return { - Description: __expectString(output.Description), - EndLine: __expectInt32(output.EndLine), - FilePath: __expectString(output.FilePath), - RecommendationCategory: __expectString(output.RecommendationCategory), - RecommendationId: __expectString(output.RecommendationId), - RuleMetadata: output.RuleMetadata != null ? de_RuleMetadata(output.RuleMetadata, context) : undefined, - Severity: __expectString(output.Severity), - StartLine: __expectInt32(output.StartLine), - } as any; -}; +// de_RecommendationSummary omitted. /** * deserializeAws_restJson1RepositoryAssociation */ const de_RepositoryAssociation = (output: any, context: __SerdeContext): RepositoryAssociation => { - return { - AssociationArn: __expectString(output.AssociationArn), - AssociationId: __expectString(output.AssociationId), - ConnectionArn: __expectString(output.ConnectionArn), - CreatedTimeStamp: - output.CreatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp))) - : undefined, - KMSKeyDetails: output.KMSKeyDetails != null ? de_KMSKeyDetails(output.KMSKeyDetails, context) : undefined, - LastUpdatedTimeStamp: - output.LastUpdatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp))) - : undefined, - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - ProviderType: __expectString(output.ProviderType), - S3RepositoryDetails: - output.S3RepositoryDetails != null ? de_S3RepositoryDetails(output.S3RepositoryDetails, context) : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; + return take(output, { + AssociationArn: __expectString, + AssociationId: __expectString, + ConnectionArn: __expectString, + CreatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KMSKeyDetails: _json, + LastUpdatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Owner: __expectString, + ProviderType: __expectString, + S3RepositoryDetails: _json, + State: __expectString, + StateReason: __expectString, + }) as any; }; /** @@ -1994,9 +1643,6 @@ const de_RepositoryAssociationSummaries = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RepositoryAssociationSummary(entry, context); }); return retVal; @@ -2006,117 +1652,33 @@ const de_RepositoryAssociationSummaries = (output: any, context: __SerdeContext) * deserializeAws_restJson1RepositoryAssociationSummary */ const de_RepositoryAssociationSummary = (output: any, context: __SerdeContext): RepositoryAssociationSummary => { - return { - AssociationArn: __expectString(output.AssociationArn), - AssociationId: __expectString(output.AssociationId), - ConnectionArn: __expectString(output.ConnectionArn), - LastUpdatedTimeStamp: - output.LastUpdatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimeStamp))) - : undefined, - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - ProviderType: __expectString(output.ProviderType), - State: __expectString(output.State), - } as any; + return take(output, { + AssociationArn: __expectString, + AssociationId: __expectString, + ConnectionArn: __expectString, + LastUpdatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Owner: __expectString, + ProviderType: __expectString, + State: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1RepositoryHeadSourceCodeType - */ -const de_RepositoryHeadSourceCodeType = (output: any, context: __SerdeContext): RepositoryHeadSourceCodeType => { - return { - BranchName: __expectString(output.BranchName), - } as any; -}; +// de_RepositoryHeadSourceCodeType omitted. -/** - * deserializeAws_restJson1RequestMetadata - */ -const de_RequestMetadata = (output: any, context: __SerdeContext): RequestMetadata => { - return { - EventInfo: output.EventInfo != null ? de_EventInfo(output.EventInfo, context) : undefined, - RequestId: __expectString(output.RequestId), - Requester: __expectString(output.Requester), - VendorName: __expectString(output.VendorName), - } as any; -}; +// de_RequestMetadata omitted. -/** - * deserializeAws_restJson1RuleMetadata - */ -const de_RuleMetadata = (output: any, context: __SerdeContext): RuleMetadata => { - return { - LongDescription: __expectString(output.LongDescription), - RuleId: __expectString(output.RuleId), - RuleName: __expectString(output.RuleName), - RuleTags: output.RuleTags != null ? de_RuleTags(output.RuleTags, context) : undefined, - ShortDescription: __expectString(output.ShortDescription), - } as any; -}; +// de_RuleMetadata omitted. -/** - * deserializeAws_restJson1RuleTags - */ -const de_RuleTags = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RuleTags omitted. -/** - * deserializeAws_restJson1S3BucketRepository - */ -const de_S3BucketRepository = (output: any, context: __SerdeContext): S3BucketRepository => { - return { - Details: output.Details != null ? de_S3RepositoryDetails(output.Details, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_S3BucketRepository omitted. -/** - * deserializeAws_restJson1S3RepositoryDetails - */ -const de_S3RepositoryDetails = (output: any, context: __SerdeContext): S3RepositoryDetails => { - return { - BucketName: __expectString(output.BucketName), - CodeArtifacts: output.CodeArtifacts != null ? de_CodeArtifacts(output.CodeArtifacts, context) : undefined, - } as any; -}; +// de_S3RepositoryDetails omitted. -/** - * deserializeAws_restJson1SourceCodeType - */ -const de_SourceCodeType = (output: any, context: __SerdeContext): SourceCodeType => { - return { - BranchDiff: output.BranchDiff != null ? de_BranchDiffSourceCodeType(output.BranchDiff, context) : undefined, - CommitDiff: output.CommitDiff != null ? de_CommitDiffSourceCodeType(output.CommitDiff, context) : undefined, - RepositoryHead: - output.RepositoryHead != null ? de_RepositoryHeadSourceCodeType(output.RepositoryHead, context) : undefined, - RequestMetadata: output.RequestMetadata != null ? de_RequestMetadata(output.RequestMetadata, context) : undefined, - S3BucketRepository: - output.S3BucketRepository != null ? de_S3BucketRepository(output.S3BucketRepository, context) : undefined, - } as any; -}; +// de_SourceCodeType omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-codeguruprofiler/src/protocols/Aws_restJson1.ts b/clients/client-codeguruprofiler/src/protocols/Aws_restJson1.ts index d29270e5bac5..524c2b3a0e33 100644 --- a/clients/client-codeguruprofiler/src/protocols/Aws_restJson1.ts +++ b/clients/client-codeguruprofiler/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -82,9 +83,7 @@ import { } from "../commands/UpdateProfilingGroupCommand"; import { CodeGuruProfilerServiceException as __BaseException } from "../models/CodeGuruProfilerServiceException"; import { - AgentConfiguration, AgentOrchestrationConfig, - AgentParameterField, AggregatedProfileTime, Anomaly, AnomalyInstance, @@ -96,9 +95,6 @@ import { FrameMetricDatum, InternalServerException, Match, - MetadataField, - Metric, - NotificationConfiguration, Pattern, ProfileTime, ProfilingGroupDescription, @@ -108,7 +104,6 @@ import { ServiceQuotaExceededException, ThrottlingException, TimestampStructure, - UserFeedback, ValidationException, } from "../models/models_0"; @@ -135,9 +130,11 @@ export const se_AddNotificationChannelsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.channels != null && { channels: se_Channels(input.channels, context) }), - }); + body = JSON.stringify( + take(input, { + channels: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -181,9 +178,11 @@ export const se_BatchGetFrameMetricDataCommand = async ( targetResolution: [, input.targetResolution!], }); let body: any; - body = JSON.stringify({ - ...(input.frameMetrics != null && { frameMetrics: se_FrameMetrics(input.frameMetrics, context) }), - }); + body = JSON.stringify( + take(input, { + frameMetrics: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -219,10 +218,12 @@ export const se_ConfigureAgentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.fleetInstanceId != null && { fleetInstanceId: input.fleetInstanceId }), - ...(input.metadata != null && { metadata: se_Metadata(input.metadata, context) }), - }); + body = JSON.stringify( + take(input, { + fleetInstanceId: [], + metadata: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -250,14 +251,14 @@ export const se_CreateProfilingGroupCommand = async ( clientToken: [, __expectNonNull(input.clientToken!, `clientToken`)], }); let body: any; - body = JSON.stringify({ - ...(input.agentOrchestrationConfig != null && { - agentOrchestrationConfig: se_AgentOrchestrationConfig(input.agentOrchestrationConfig, context), - }), - ...(input.computePlatform != null && { computePlatform: input.computePlatform }), - ...(input.profilingGroupName != null && { profilingGroupName: input.profilingGroupName }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + agentOrchestrationConfig: (_) => _json(_), + computePlatform: [], + profilingGroupName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -722,10 +723,12 @@ export const se_PutPermissionCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "actionGroup", () => input.actionGroup!, "{actionGroup}", false); let body: any; - body = JSON.stringify({ - ...(input.principals != null && { principals: se_Principals(input.principals, context) }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }); + body = JSON.stringify( + take(input, { + principals: (_) => _json(_), + revisionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -838,10 +841,12 @@ export const se_SubmitFeedbackCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.comment != null && { comment: input.comment }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + comment: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -867,9 +872,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -933,11 +940,11 @@ export const se_UpdateProfilingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.agentOrchestrationConfig != null && { - agentOrchestrationConfig: se_AgentOrchestrationConfig(input.agentOrchestrationConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + agentOrchestrationConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -963,9 +970,10 @@ export const de_AddNotificationChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.notificationConfiguration != null) { - contents.notificationConfiguration = de_NotificationConfiguration(data.notificationConfiguration, context); - } + const doc = take(data, { + notificationConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1002,10 +1010,9 @@ const de_AddNotificationChannelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1025,24 +1032,15 @@ export const de_BatchGetFrameMetricDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.endTime)); - } - if (data.endTimes != null) { - contents.endTimes = de_ListOfTimestamps(data.endTimes, context); - } - if (data.frameMetricData != null) { - contents.frameMetricData = de_FrameMetricData(data.frameMetricData, context); - } - if (data.resolution != null) { - contents.resolution = __expectString(data.resolution); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.startTime)); - } - if (data.unprocessedEndTimes != null) { - contents.unprocessedEndTimes = de_UnprocessedEndTimeMap(data.unprocessedEndTimes, context); - } + const doc = take(data, { + endTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + endTimes: (_) => de_ListOfTimestamps(_, context), + frameMetricData: (_) => de_FrameMetricData(_, context), + resolution: __expectString, + startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + unprocessedEndTimes: (_) => de_UnprocessedEndTimeMap(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1073,10 +1071,9 @@ const de_BatchGetFrameMetricDataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,7 +1093,7 @@ export const de_ConfigureAgentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.configuration = de_AgentConfiguration(data, context); + contents.configuration = _json(data); return contents; }; @@ -1127,10 +1124,9 @@ const de_ConfigureAgentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1184,10 +1180,9 @@ const de_CreateProfilingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1240,10 +1235,9 @@ const de_DeleteProfilingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1294,10 +1288,9 @@ const de_DescribeProfilingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1317,12 +1310,11 @@ export const de_GetFindingsReportAccountSummaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.reportSummaries != null) { - contents.reportSummaries = de_FindingsReportSummaries(data.reportSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + reportSummaries: (_) => de_FindingsReportSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1350,10 +1342,9 @@ const de_GetFindingsReportAccountSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1373,9 +1364,10 @@ export const de_GetNotificationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.notificationConfiguration != null) { - contents.notificationConfiguration = de_NotificationConfiguration(data.notificationConfiguration, context); - } + const doc = take(data, { + notificationConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1406,10 +1398,9 @@ const de_GetNotificationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1429,12 +1420,11 @@ export const de_GetPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + policy: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1462,10 +1452,9 @@ const de_GetPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1518,10 +1507,9 @@ const de_GetProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1541,21 +1529,14 @@ export const de_GetRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.anomalies != null) { - contents.anomalies = de_Anomalies(data.anomalies, context); - } - if (data.profileEndTime != null) { - contents.profileEndTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.profileEndTime)); - } - if (data.profileStartTime != null) { - contents.profileStartTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.profileStartTime)); - } - if (data.profilingGroupName != null) { - contents.profilingGroupName = __expectString(data.profilingGroupName); - } - if (data.recommendations != null) { - contents.recommendations = de_Recommendations(data.recommendations, context); - } + const doc = take(data, { + anomalies: (_) => de_Anomalies(_, context), + profileEndTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + profileStartTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + profilingGroupName: __expectString, + recommendations: (_) => de_Recommendations(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1586,10 +1567,9 @@ const de_GetRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1609,12 +1589,11 @@ export const de_ListFindingsReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findingsReportSummaries != null) { - contents.findingsReportSummaries = de_FindingsReportSummaries(data.findingsReportSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findingsReportSummaries: (_) => de_FindingsReportSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1645,10 +1624,9 @@ const de_ListFindingsReportsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1668,12 +1646,11 @@ export const de_ListProfileTimesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.profileTimes != null) { - contents.profileTimes = de_ProfileTimes(data.profileTimes, context); - } + const doc = take(data, { + nextToken: __expectString, + profileTimes: (_) => de_ProfileTimes(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1704,10 +1681,9 @@ const de_ListProfileTimesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1727,15 +1703,12 @@ export const de_ListProfilingGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.profilingGroupNames != null) { - contents.profilingGroupNames = de_ProfilingGroupNames(data.profilingGroupNames, context); - } - if (data.profilingGroups != null) { - contents.profilingGroups = de_ProfilingGroupDescriptions(data.profilingGroups, context); - } + const doc = take(data, { + nextToken: __expectString, + profilingGroupNames: _json, + profilingGroups: (_) => de_ProfilingGroupDescriptions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1760,10 +1733,9 @@ const de_ListProfilingGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1783,9 +1755,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1813,10 +1786,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1866,10 +1838,9 @@ const de_PostAgentProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1889,12 +1860,11 @@ export const de_PutPermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + policy: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1928,10 +1898,9 @@ const de_PutPermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1951,9 +1920,10 @@ export const de_RemoveNotificationChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.notificationConfiguration != null) { - contents.notificationConfiguration = de_NotificationConfiguration(data.notificationConfiguration, context); - } + const doc = take(data, { + notificationConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1984,10 +1954,9 @@ const de_RemoveNotificationChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2007,12 +1976,11 @@ export const de_RemovePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + policy: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2046,10 +2014,9 @@ const de_RemovePermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2099,10 +2066,9 @@ const de_SubmitFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2149,10 +2115,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2199,10 +2164,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2256,25 +2220,25 @@ const de_UpdateProfilingGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2291,9 +2255,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2310,9 +2275,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2329,9 +2295,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2345,9 +2312,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2361,9 +2329,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2371,162 +2340,40 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AgentOrchestrationConfig - */ -const se_AgentOrchestrationConfig = (input: AgentOrchestrationConfig, context: __SerdeContext): any => { - return { - ...(input.profilingEnabled != null && { profilingEnabled: input.profilingEnabled }), - }; -}; +// se_AgentOrchestrationConfig omitted. -/** - * serializeAws_restJson1Channel - */ -const se_Channel = (input: Channel, context: __SerdeContext): any => { - return { - ...(input.eventPublishers != null && { eventPublishers: se_EventPublishers(input.eventPublishers, context) }), - ...(input.id != null && { id: input.id }), - ...(input.uri != null && { uri: input.uri }), - }; -}; +// se_Channel omitted. -/** - * serializeAws_restJson1Channels - */ -const se_Channels = (input: Channel[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Channel(entry, context); - }); -}; +// se_Channels omitted. -/** - * serializeAws_restJson1EventPublishers - */ -const se_EventPublishers = (input: (EventPublisher | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventPublishers omitted. -/** - * serializeAws_restJson1FrameMetric - */ -const se_FrameMetric = (input: FrameMetric, context: __SerdeContext): any => { - return { - ...(input.frameName != null && { frameName: input.frameName }), - ...(input.threadStates != null && { threadStates: se_ThreadStates(input.threadStates, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_FrameMetric omitted. -/** - * serializeAws_restJson1FrameMetrics - */ -const se_FrameMetrics = (input: FrameMetric[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FrameMetric(entry, context); - }); -}; +// se_FrameMetrics omitted. -/** - * serializeAws_restJson1Metadata - */ -const se_Metadata = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [MetadataField | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Metadata omitted. -/** - * serializeAws_restJson1Principals - */ -const se_Principals = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Principals omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. -/** - * serializeAws_restJson1ThreadStates - */ -const se_ThreadStates = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ThreadStates omitted. -/** - * deserializeAws_restJson1AgentConfiguration - */ -const de_AgentConfiguration = (output: any, context: __SerdeContext): AgentConfiguration => { - return { - agentParameters: output.agentParameters != null ? de_AgentParameters(output.agentParameters, context) : undefined, - periodInSeconds: __expectInt32(output.periodInSeconds), - shouldProfile: __expectBoolean(output.shouldProfile), - } as any; -}; +// de_AgentConfiguration omitted. -/** - * deserializeAws_restJson1AgentOrchestrationConfig - */ -const de_AgentOrchestrationConfig = (output: any, context: __SerdeContext): AgentOrchestrationConfig => { - return { - profilingEnabled: __expectBoolean(output.profilingEnabled), - } as any; -}; +// de_AgentOrchestrationConfig omitted. -/** - * deserializeAws_restJson1AgentParameters - */ -const de_AgentParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [AgentParameterField | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_AgentParameters omitted. /** * deserializeAws_restJson1AggregatedProfileTime */ const de_AggregatedProfileTime = (output: any, context: __SerdeContext): AggregatedProfileTime => { - return { - period: __expectString(output.period), - start: output.start != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.start)) : undefined, - } as any; + return take(output, { + period: __expectString, + start: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2536,9 +2383,6 @@ const de_Anomalies = (output: any, context: __SerdeContext): Anomaly[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Anomaly(entry, context); }); return retVal; @@ -2548,24 +2392,23 @@ const de_Anomalies = (output: any, context: __SerdeContext): Anomaly[] => { * deserializeAws_restJson1Anomaly */ const de_Anomaly = (output: any, context: __SerdeContext): Anomaly => { - return { - instances: output.instances != null ? de_AnomalyInstances(output.instances, context) : undefined, - metric: output.metric != null ? de_Metric(output.metric, context) : undefined, - reason: __expectString(output.reason), - } as any; + return take(output, { + instances: (_: any) => de_AnomalyInstances(_, context), + metric: _json, + reason: __expectString, + }) as any; }; /** * deserializeAws_restJson1AnomalyInstance */ const de_AnomalyInstance = (output: any, context: __SerdeContext): AnomalyInstance => { - return { - endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - id: __expectString(output.id), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - userFeedback: output.userFeedback != null ? de_UserFeedback(output.userFeedback, context) : undefined, - } as any; + return take(output, { + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + userFeedback: _json, + }) as any; }; /** @@ -2575,54 +2418,16 @@ const de_AnomalyInstances = (output: any, context: __SerdeContext): AnomalyInsta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AnomalyInstance(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Channel - */ -const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - eventPublishers: output.eventPublishers != null ? de_EventPublishers(output.eventPublishers, context) : undefined, - id: __expectString(output.id), - uri: __expectString(output.uri), - } as any; -}; +// de_Channel omitted. -/** - * deserializeAws_restJson1Channels - */ -const de_Channels = (output: any, context: __SerdeContext): Channel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Channel(entry, context); - }); - return retVal; -}; +// de_Channels omitted. -/** - * deserializeAws_restJson1EventPublishers - */ -const de_EventPublishers = (output: any, context: __SerdeContext): (EventPublisher | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EventPublishers omitted. /** * deserializeAws_restJson1FindingsReportSummaries @@ -2631,9 +2436,6 @@ const de_FindingsReportSummaries = (output: any, context: __SerdeContext): Findi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FindingsReportSummary(entry, context); }); return retVal; @@ -2643,31 +2445,16 @@ const de_FindingsReportSummaries = (output: any, context: __SerdeContext): Findi * deserializeAws_restJson1FindingsReportSummary */ const de_FindingsReportSummary = (output: any, context: __SerdeContext): FindingsReportSummary => { - return { - id: __expectString(output.id), - profileEndTime: - output.profileEndTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.profileEndTime)) - : undefined, - profileStartTime: - output.profileStartTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.profileStartTime)) - : undefined, - profilingGroupName: __expectString(output.profilingGroupName), - totalNumberOfFindings: __expectInt32(output.totalNumberOfFindings), - } as any; + return take(output, { + id: __expectString, + profileEndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + profileStartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + profilingGroupName: __expectString, + totalNumberOfFindings: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1FrameMetric - */ -const de_FrameMetric = (output: any, context: __SerdeContext): FrameMetric => { - return { - frameName: __expectString(output.frameName), - threadStates: output.threadStates != null ? de_ThreadStates(output.threadStates, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_FrameMetric omitted. /** * deserializeAws_restJson1FrameMetricData @@ -2676,9 +2463,6 @@ const de_FrameMetricData = (output: any, context: __SerdeContext): FrameMetricDa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FrameMetricDatum(entry, context); }); return retVal; @@ -2688,10 +2472,10 @@ const de_FrameMetricData = (output: any, context: __SerdeContext): FrameMetricDa * deserializeAws_restJson1FrameMetricDatum */ const de_FrameMetricDatum = (output: any, context: __SerdeContext): FrameMetricDatum => { - return { - frameMetric: output.frameMetric != null ? de_FrameMetric(output.frameMetric, context) : undefined, - values: output.values != null ? de_FrameMetricValues(output.values, context) : undefined, - } as any; + return take(output, { + frameMetric: _json, + values: (_: any) => de_FrameMetricValues(_, context), + }) as any; }; /** @@ -2701,9 +2485,6 @@ const de_FrameMetricValues = (output: any, context: __SerdeContext): number[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; @@ -2716,9 +2497,6 @@ const de_ListOfTimestamps = (output: any, context: __SerdeContext): TimestampStr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimestampStructure(entry, context); }); return retVal; @@ -2728,11 +2506,11 @@ const de_ListOfTimestamps = (output: any, context: __SerdeContext): TimestampStr * deserializeAws_restJson1Match */ const de_Match = (output: any, context: __SerdeContext): Match => { - return { - frameAddress: __expectString(output.frameAddress), - targetFramesIndex: __expectInt32(output.targetFramesIndex), - thresholdBreachValue: __limitedParseDouble(output.thresholdBreachValue), - } as any; + return take(output, { + frameAddress: __expectString, + targetFramesIndex: __expectInt32, + thresholdBreachValue: __limitedParseDouble, + }) as any; }; /** @@ -2742,57 +2520,37 @@ const de_Matches = (output: any, context: __SerdeContext): Match[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Match(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Metric - */ -const de_Metric = (output: any, context: __SerdeContext): Metric => { - return { - frameName: __expectString(output.frameName), - threadStates: output.threadStates != null ? de_Strings(output.threadStates, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_Metric omitted. -/** - * deserializeAws_restJson1NotificationConfiguration - */ -const de_NotificationConfiguration = (output: any, context: __SerdeContext): NotificationConfiguration => { - return { - channels: output.channels != null ? de_Channels(output.channels, context) : undefined, - } as any; -}; +// de_NotificationConfiguration omitted. /** * deserializeAws_restJson1Pattern */ const de_Pattern = (output: any, context: __SerdeContext): Pattern => { - return { - countersToAggregate: - output.countersToAggregate != null ? de_Strings(output.countersToAggregate, context) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - resolutionSteps: __expectString(output.resolutionSteps), - targetFrames: output.targetFrames != null ? de_TargetFrames(output.targetFrames, context) : undefined, - thresholdPercent: __limitedParseDouble(output.thresholdPercent), - } as any; + return take(output, { + countersToAggregate: _json, + description: __expectString, + id: __expectString, + name: __expectString, + resolutionSteps: __expectString, + targetFrames: _json, + thresholdPercent: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1ProfileTime */ const de_ProfileTime = (output: any, context: __SerdeContext): ProfileTime => { - return { - start: output.start != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.start)) : undefined, - } as any; + return take(output, { + start: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2802,9 +2560,6 @@ const de_ProfileTimes = (output: any, context: __SerdeContext): ProfileTime[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProfileTime(entry, context); }); return retVal; @@ -2814,21 +2569,16 @@ const de_ProfileTimes = (output: any, context: __SerdeContext): ProfileTime[] => * deserializeAws_restJson1ProfilingGroupDescription */ const de_ProfilingGroupDescription = (output: any, context: __SerdeContext): ProfilingGroupDescription => { - return { - agentOrchestrationConfig: - output.agentOrchestrationConfig != null - ? de_AgentOrchestrationConfig(output.agentOrchestrationConfig, context) - : undefined, - arn: __expectString(output.arn), - computePlatform: __expectString(output.computePlatform), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - name: __expectString(output.name), - profilingStatus: output.profilingStatus != null ? de_ProfilingStatus(output.profilingStatus, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + agentOrchestrationConfig: _json, + arn: __expectString, + computePlatform: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + profilingStatus: (_: any) => de_ProfilingStatus(_, context), + tags: _json, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2838,62 +2588,36 @@ const de_ProfilingGroupDescriptions = (output: any, context: __SerdeContext): Pr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProfilingGroupDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ProfilingGroupNames - */ -const de_ProfilingGroupNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ProfilingGroupNames omitted. /** * deserializeAws_restJson1ProfilingStatus */ const de_ProfilingStatus = (output: any, context: __SerdeContext): ProfilingStatus => { - return { - latestAgentOrchestratedAt: - output.latestAgentOrchestratedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.latestAgentOrchestratedAt)) - : undefined, - latestAgentProfileReportedAt: - output.latestAgentProfileReportedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.latestAgentProfileReportedAt)) - : undefined, - latestAggregatedProfile: - output.latestAggregatedProfile != null - ? de_AggregatedProfileTime(output.latestAggregatedProfile, context) - : undefined, - } as any; + return take(output, { + latestAgentOrchestratedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + latestAgentProfileReportedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + latestAggregatedProfile: (_: any) => de_AggregatedProfileTime(_, context), + }) as any; }; /** * deserializeAws_restJson1Recommendation */ const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - allMatchesCount: __expectInt32(output.allMatchesCount), - allMatchesSum: __limitedParseDouble(output.allMatchesSum), - endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - pattern: output.pattern != null ? de_Pattern(output.pattern, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - topMatches: output.topMatches != null ? de_Matches(output.topMatches, context) : undefined, - } as any; + return take(output, { + allMatchesCount: __expectInt32, + allMatchesSum: __limitedParseDouble, + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + pattern: (_: any) => de_Pattern(_, context), + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + topMatches: (_: any) => de_Matches(_, context), + }) as any; }; /** @@ -2903,94 +2627,28 @@ const de_Recommendations = (output: any, context: __SerdeContext): Recommendatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Recommendation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Strings - */ -const de_Strings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Strings omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. -/** - * deserializeAws_restJson1TargetFrame - */ -const de_TargetFrame = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetFrame omitted. -/** - * deserializeAws_restJson1TargetFrames - */ -const de_TargetFrames = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetFrame(entry, context); - }); - return retVal; -}; +// de_TargetFrames omitted. -/** - * deserializeAws_restJson1ThreadStates - */ -const de_ThreadStates = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ThreadStates omitted. /** * deserializeAws_restJson1TimestampStructure */ const de_TimestampStructure = (output: any, context: __SerdeContext): TimestampStructure => { - return { - value: output.value != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.value)) : undefined, - } as any; + return take(output, { + value: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3006,14 +2664,7 @@ const de_UnprocessedEndTimeMap = (output: any, context: __SerdeContext): Record< }, {}); }; -/** - * deserializeAws_restJson1UserFeedback - */ -const de_UserFeedback = (output: any, context: __SerdeContext): UserFeedback => { - return { - type: __expectString(output.type), - } as any; -}; +// de_UserFeedback omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-codepipeline/src/protocols/Aws_json1_1.ts b/clients/client-codepipeline/src/protocols/Aws_json1_1.ts index f5f22ed00a8c..d7fbe8d566e6 100644 --- a/clients/client-codepipeline/src/protocols/Aws_json1_1.ts +++ b/clients/client-codepipeline/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -120,23 +122,15 @@ import { UpdatePipelineCommandInput, UpdatePipelineCommandOutput } from "../comm import { CodePipelineServiceException as __BaseException } from "../models/CodePipelineServiceException"; import { AcknowledgeJobInput, - AcknowledgeJobOutput, AcknowledgeThirdPartyJobInput, - AcknowledgeThirdPartyJobOutput, - ActionConfiguration, ActionConfigurationProperty, - ActionContext, ActionDeclaration, ActionExecution, ActionExecutionDetail, ActionExecutionFilter, - ActionExecutionInput, - ActionExecutionOutput, - ActionExecutionResult, ActionNotFoundException, ActionRevision, ActionState, - ActionType, ActionTypeArtifactDetails, ActionTypeDeclaration, ActionTypeExecutor, @@ -149,40 +143,28 @@ import { ActionTypeUrls, ApprovalAlreadyCompletedException, ApprovalResult, - Artifact, - ArtifactDetail, ArtifactDetails, - ArtifactLocation, ArtifactRevision, ArtifactStore, - AWSSessionCredentials, BlockerDeclaration, ConcurrentModificationException, ConflictException, CreateCustomActionTypeInput, - CreateCustomActionTypeOutput, CreatePipelineInput, - CreatePipelineOutput, CurrentRevision, DeleteCustomActionTypeInput, DeletePipelineInput, DeleteWebhookInput, - DeleteWebhookOutput, DeregisterWebhookWithThirdPartyInput, - DeregisterWebhookWithThirdPartyOutput, DisableStageTransitionInput, DuplicatedStopRequestException, EnableStageTransitionInput, EncryptionKey, - ErrorDetails, ExecutionDetails, - ExecutionTrigger, ExecutorConfiguration, FailureDetails, GetActionTypeInput, - GetActionTypeOutput, GetJobDetailsInput, - GetJobDetailsOutput, GetPipelineExecutionInput, GetPipelineExecutionOutput, GetPipelineInput, @@ -190,7 +172,6 @@ import { GetPipelineStateInput, GetPipelineStateOutput, GetThirdPartyJobDetailsInput, - GetThirdPartyJobDetailsOutput, InputArtifact, InvalidActionDeclarationException, InvalidApprovalTokenException, @@ -206,9 +187,6 @@ import { InvalidTagsException, InvalidWebhookAuthenticationParametersException, InvalidWebhookFilterPatternException, - Job, - JobData, - JobDetails, JobNotFoundException, JobWorkerExecutorConfiguration, LambdaExecutorConfiguration, @@ -216,20 +194,17 @@ import { ListActionExecutionsInput, ListActionExecutionsOutput, ListActionTypesInput, - ListActionTypesOutput, ListPipelineExecutionsInput, ListPipelineExecutionsOutput, ListPipelinesInput, ListPipelinesOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, ListWebhookItem, ListWebhooksInput, ListWebhooksOutput, NotLatestPipelineExecutionException, OutputArtifact, OutputVariablesSizeExceededException, - PipelineContext, PipelineDeclaration, PipelineExecution, PipelineExecutionNotFoundException, @@ -241,11 +216,8 @@ import { PipelineSummary, PipelineVersionNotFoundException, PollForJobsInput, - PollForJobsOutput, PollForThirdPartyJobsInput, - PollForThirdPartyJobsOutput, PutActionRevisionInput, - PutActionRevisionOutput, PutApprovalResultInput, PutApprovalResultOutput, PutJobFailureResultInput, @@ -255,38 +227,22 @@ import { PutWebhookInput, PutWebhookOutput, RegisterWebhookWithThirdPartyInput, - RegisterWebhookWithThirdPartyOutput, RequestFailedException, ResourceNotFoundException, RetryStageExecutionInput, - RetryStageExecutionOutput, - S3ArtifactLocation, - S3Location, - SourceRevision, - StageContext, StageDeclaration, - StageExecution, StageNotFoundException, StageNotRetryableException, StageState, StartPipelineExecutionInput, - StartPipelineExecutionOutput, - StopExecutionTrigger, StopPipelineExecutionInput, - StopPipelineExecutionOutput, Tag, TagResourceInput, - TagResourceOutput, - ThirdPartyJob, - ThirdPartyJobData, - ThirdPartyJobDetails, TooManyTagsException, TransitionState, UntagResourceInput, - UntagResourceOutput, UpdateActionTypeInput, UpdatePipelineInput, - UpdatePipelineOutput, ValidationException, WebhookAuthConfiguration, WebhookDefinition, @@ -303,7 +259,7 @@ export const se_AcknowledgeJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcknowledgeJob"); let body: any; - body = JSON.stringify(se_AcknowledgeJobInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -316,7 +272,7 @@ export const se_AcknowledgeThirdPartyJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcknowledgeThirdPartyJob"); let body: any; - body = JSON.stringify(se_AcknowledgeThirdPartyJobInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -329,7 +285,7 @@ export const se_CreateCustomActionTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCustomActionType"); let body: any; - body = JSON.stringify(se_CreateCustomActionTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -342,7 +298,7 @@ export const se_CreatePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePipeline"); let body: any; - body = JSON.stringify(se_CreatePipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -355,7 +311,7 @@ export const se_DeleteCustomActionTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCustomActionType"); let body: any; - body = JSON.stringify(se_DeleteCustomActionTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -368,7 +324,7 @@ export const se_DeletePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePipeline"); let body: any; - body = JSON.stringify(se_DeletePipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -381,7 +337,7 @@ export const se_DeleteWebhookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWebhook"); let body: any; - body = JSON.stringify(se_DeleteWebhookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -394,7 +350,7 @@ export const se_DeregisterWebhookWithThirdPartyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterWebhookWithThirdParty"); let body: any; - body = JSON.stringify(se_DeregisterWebhookWithThirdPartyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -407,7 +363,7 @@ export const se_DisableStageTransitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableStageTransition"); let body: any; - body = JSON.stringify(se_DisableStageTransitionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -420,7 +376,7 @@ export const se_EnableStageTransitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableStageTransition"); let body: any; - body = JSON.stringify(se_EnableStageTransitionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -433,7 +389,7 @@ export const se_GetActionTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetActionType"); let body: any; - body = JSON.stringify(se_GetActionTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -446,7 +402,7 @@ export const se_GetJobDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobDetails"); let body: any; - body = JSON.stringify(se_GetJobDetailsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -459,7 +415,7 @@ export const se_GetPipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPipeline"); let body: any; - body = JSON.stringify(se_GetPipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -472,7 +428,7 @@ export const se_GetPipelineExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPipelineExecution"); let body: any; - body = JSON.stringify(se_GetPipelineExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -485,7 +441,7 @@ export const se_GetPipelineStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPipelineState"); let body: any; - body = JSON.stringify(se_GetPipelineStateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -498,7 +454,7 @@ export const se_GetThirdPartyJobDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetThirdPartyJobDetails"); let body: any; - body = JSON.stringify(se_GetThirdPartyJobDetailsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -511,7 +467,7 @@ export const se_ListActionExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListActionExecutions"); let body: any; - body = JSON.stringify(se_ListActionExecutionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -524,7 +480,7 @@ export const se_ListActionTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListActionTypes"); let body: any; - body = JSON.stringify(se_ListActionTypesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -537,7 +493,7 @@ export const se_ListPipelineExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPipelineExecutions"); let body: any; - body = JSON.stringify(se_ListPipelineExecutionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -550,7 +506,7 @@ export const se_ListPipelinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPipelines"); let body: any; - body = JSON.stringify(se_ListPipelinesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -563,7 +519,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -576,7 +532,7 @@ export const se_ListWebhooksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWebhooks"); let body: any; - body = JSON.stringify(se_ListWebhooksInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -589,7 +545,7 @@ export const se_PollForJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PollForJobs"); let body: any; - body = JSON.stringify(se_PollForJobsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -602,7 +558,7 @@ export const se_PollForThirdPartyJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PollForThirdPartyJobs"); let body: any; - body = JSON.stringify(se_PollForThirdPartyJobsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -628,7 +584,7 @@ export const se_PutApprovalResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutApprovalResult"); let body: any; - body = JSON.stringify(se_PutApprovalResultInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -641,7 +597,7 @@ export const se_PutJobFailureResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutJobFailureResult"); let body: any; - body = JSON.stringify(se_PutJobFailureResultInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -667,7 +623,7 @@ export const se_PutThirdPartyJobFailureResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutThirdPartyJobFailureResult"); let body: any; - body = JSON.stringify(se_PutThirdPartyJobFailureResultInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -693,7 +649,7 @@ export const se_PutWebhookCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutWebhook"); let body: any; - body = JSON.stringify(se_PutWebhookInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -706,7 +662,7 @@ export const se_RegisterWebhookWithThirdPartyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterWebhookWithThirdParty"); let body: any; - body = JSON.stringify(se_RegisterWebhookWithThirdPartyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -719,7 +675,7 @@ export const se_RetryStageExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetryStageExecution"); let body: any; - body = JSON.stringify(se_RetryStageExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -745,7 +701,7 @@ export const se_StopPipelineExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopPipelineExecution"); let body: any; - body = JSON.stringify(se_StopPipelineExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -758,7 +714,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -771,7 +727,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -784,7 +740,7 @@ export const se_UpdateActionTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateActionType"); let body: any; - body = JSON.stringify(se_UpdateActionTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -797,7 +753,7 @@ export const se_UpdatePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePipeline"); let body: any; - body = JSON.stringify(se_UpdatePipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -813,12 +769,12 @@ export const de_AcknowledgeJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcknowledgeJobOutput(data, context); + contents = _json(data); const response: AcknowledgeJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -845,10 +801,9 @@ const de_AcknowledgeJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -866,12 +821,12 @@ export const de_AcknowledgeThirdPartyJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcknowledgeThirdPartyJobOutput(data, context); + contents = _json(data); const response: AcknowledgeThirdPartyJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -901,10 +856,9 @@ const de_AcknowledgeThirdPartyJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -922,12 +876,12 @@ export const de_CreateCustomActionTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCustomActionTypeOutput(data, context); + contents = _json(data); const response: CreateCustomActionTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -960,10 +914,9 @@ const de_CreateCustomActionTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -981,12 +934,12 @@ export const de_CreatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePipelineOutput(data, context); + contents = _json(data); const response: CreatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1034,10 +987,9 @@ const de_CreatePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1057,7 +1009,7 @@ export const de_DeleteCustomActionTypeCommand = async ( const response: DeleteCustomActionTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1081,10 +1033,9 @@ const de_DeleteCustomActionTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1104,7 +1055,7 @@ export const de_DeletePipelineCommand = async ( const response: DeletePipelineCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1128,10 +1079,9 @@ const de_DeletePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1149,12 +1099,12 @@ export const de_DeleteWebhookCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWebhookOutput(data, context); + contents = _json(data); const response: DeleteWebhookCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1178,10 +1128,9 @@ const de_DeleteWebhookCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1199,12 +1148,12 @@ export const de_DeregisterWebhookWithThirdPartyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterWebhookWithThirdPartyOutput(data, context); + contents = _json(data); const response: DeregisterWebhookWithThirdPartyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1228,10 +1177,9 @@ const de_DeregisterWebhookWithThirdPartyCommandError = async ( throw await de_WebhookNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1251,7 +1199,7 @@ export const de_DisableStageTransitionCommand = async ( const response: DisableStageTransitionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1278,10 +1226,9 @@ const de_DisableStageTransitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,7 +1248,7 @@ export const de_EnableStageTransitionCommand = async ( const response: EnableStageTransitionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1328,10 +1275,9 @@ const de_EnableStageTransitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1349,12 +1295,12 @@ export const de_GetActionTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetActionTypeOutput(data, context); + contents = _json(data); const response: GetActionTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1378,10 +1324,9 @@ const de_GetActionTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1399,12 +1344,12 @@ export const de_GetJobDetailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetJobDetailsOutput(data, context); + contents = _json(data); const response: GetJobDetailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1428,10 +1373,9 @@ const de_GetJobDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1454,7 +1398,7 @@ export const de_GetPipelineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1481,10 +1425,9 @@ const de_GetPipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,7 +1450,7 @@ export const de_GetPipelineExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1534,10 +1477,9 @@ const de_GetPipelineExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1560,7 +1502,7 @@ export const de_GetPipelineStateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1584,10 +1526,9 @@ const de_GetPipelineStateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1605,12 +1546,12 @@ export const de_GetThirdPartyJobDetailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetThirdPartyJobDetailsOutput(data, context); + contents = _json(data); const response: GetThirdPartyJobDetailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1640,10 +1581,9 @@ const de_GetThirdPartyJobDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1666,7 +1606,7 @@ export const de_ListActionExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1696,10 +1636,9 @@ const de_ListActionExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1717,12 +1656,12 @@ export const de_ListActionTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListActionTypesOutput(data, context); + contents = _json(data); const response: ListActionTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1746,10 +1685,9 @@ const de_ListActionTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1772,7 +1710,7 @@ export const de_ListPipelineExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1799,10 +1737,9 @@ const de_ListPipelineExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1825,7 +1762,7 @@ export const de_ListPipelinesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1849,10 +1786,9 @@ const de_ListPipelinesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1870,12 +1806,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1905,10 +1841,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1931,7 +1866,7 @@ export const de_ListWebhooksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1955,10 +1890,9 @@ const de_ListWebhooksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1976,12 +1910,12 @@ export const de_PollForJobsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PollForJobsOutput(data, context); + contents = _json(data); const response: PollForJobsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2005,10 +1939,9 @@ const de_PollForJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,12 +1959,12 @@ export const de_PollForThirdPartyJobsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PollForThirdPartyJobsOutput(data, context); + contents = _json(data); const response: PollForThirdPartyJobsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2055,10 +1988,9 @@ const de_PollForThirdPartyJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2076,12 +2008,12 @@ export const de_PutActionRevisionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutActionRevisionOutput(data, context); + contents = _json(data); const response: PutActionRevisionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2111,10 +2043,9 @@ const de_PutActionRevisionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2137,7 +2068,7 @@ export const de_PutApprovalResultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2173,10 +2104,9 @@ const de_PutApprovalResultCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2196,7 +2126,7 @@ export const de_PutJobFailureResultCommand = async ( const response: PutJobFailureResultCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2223,10 +2153,9 @@ const de_PutJobFailureResultCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2246,7 +2175,7 @@ export const de_PutJobSuccessResultCommand = async ( const response: PutJobSuccessResultCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2276,10 +2205,9 @@ const de_PutJobSuccessResultCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2299,7 +2227,7 @@ export const de_PutThirdPartyJobFailureResultCommand = async ( const response: PutThirdPartyJobFailureResultCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2329,10 +2257,9 @@ const de_PutThirdPartyJobFailureResultCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2352,7 +2279,7 @@ export const de_PutThirdPartyJobSuccessResultCommand = async ( const response: PutThirdPartyJobSuccessResultCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2382,10 +2309,9 @@ const de_PutThirdPartyJobSuccessResultCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2408,7 +2334,7 @@ export const de_PutWebhookCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2450,10 +2376,9 @@ const de_PutWebhookCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2471,12 +2396,12 @@ export const de_RegisterWebhookWithThirdPartyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterWebhookWithThirdPartyOutput(data, context); + contents = _json(data); const response: RegisterWebhookWithThirdPartyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2500,10 +2425,9 @@ const de_RegisterWebhookWithThirdPartyCommandError = async ( throw await de_WebhookNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2521,12 +2445,12 @@ export const de_RetryStageExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RetryStageExecutionOutput(data, context); + contents = _json(data); const response: RetryStageExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2562,10 +2486,9 @@ const de_RetryStageExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2583,12 +2506,12 @@ export const de_StartPipelineExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartPipelineExecutionOutput(data, context); + contents = _json(data); const response: StartPipelineExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2615,10 +2538,9 @@ const de_StartPipelineExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2636,12 +2558,12 @@ export const de_StopPipelineExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopPipelineExecutionOutput(data, context); + contents = _json(data); const response: StopPipelineExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2674,10 +2596,9 @@ const de_StopPipelineExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2695,12 +2616,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2736,10 +2657,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2757,12 +2677,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2795,10 +2715,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2818,7 +2737,7 @@ export const de_UpdateActionTypeCommand = async ( const response: UpdateActionTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2845,10 +2764,9 @@ const de_UpdateActionTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2866,12 +2784,12 @@ export const de_UpdatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePipelineOutput(data, context); + contents = _json(data); const response: UpdatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2907,10 +2825,9 @@ const de_UpdatePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2924,7 +2841,7 @@ const de_ActionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ActionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2940,7 +2857,7 @@ const de_ActionTypeNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActionTypeNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ActionTypeNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2956,7 +2873,7 @@ const de_ApprovalAlreadyCompletedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ApprovalAlreadyCompletedException(body, context); + const deserialized: any = _json(body); const exception = new ApprovalAlreadyCompletedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2972,7 +2889,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2985,7 +2902,7 @@ const de_ConcurrentModificationExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3001,7 +2918,7 @@ const de_DuplicatedStopRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicatedStopRequestException(body, context); + const deserialized: any = _json(body); const exception = new DuplicatedStopRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3017,7 +2934,7 @@ const de_InvalidActionDeclarationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidActionDeclarationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidActionDeclarationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3033,7 +2950,7 @@ const de_InvalidApprovalTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApprovalTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApprovalTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3046,7 +2963,7 @@ const de_InvalidApprovalTokenExceptionRes = async ( */ const de_InvalidArnExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3062,7 +2979,7 @@ const de_InvalidBlockerDeclarationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidBlockerDeclarationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidBlockerDeclarationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3078,7 +2995,7 @@ const de_InvalidClientTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidClientTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidClientTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3091,7 +3008,7 @@ const de_InvalidClientTokenExceptionRes = async ( */ const de_InvalidJobExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidJobException(body, context); + const deserialized: any = _json(body); const exception = new InvalidJobException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3107,7 +3024,7 @@ const de_InvalidJobStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidJobStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidJobStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3123,7 +3040,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3139,7 +3056,7 @@ const de_InvalidNonceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNonceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNonceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3155,7 +3072,7 @@ const de_InvalidStageDeclarationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStageDeclarationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStageDeclarationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3171,7 +3088,7 @@ const de_InvalidStructureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStructureException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStructureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3187,7 +3104,7 @@ const de_InvalidTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3203,7 +3120,7 @@ const de_InvalidWebhookAuthenticationParametersExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidWebhookAuthenticationParametersException(body, context); + const deserialized: any = _json(body); const exception = new InvalidWebhookAuthenticationParametersException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3219,7 +3136,7 @@ const de_InvalidWebhookFilterPatternExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidWebhookFilterPatternException(body, context); + const deserialized: any = _json(body); const exception = new InvalidWebhookFilterPatternException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3235,7 +3152,7 @@ const de_JobNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_JobNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new JobNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3251,7 +3168,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3267,7 +3184,7 @@ const de_NotLatestPipelineExecutionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotLatestPipelineExecutionException(body, context); + const deserialized: any = _json(body); const exception = new NotLatestPipelineExecutionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3283,7 +3200,7 @@ const de_OutputVariablesSizeExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OutputVariablesSizeExceededException(body, context); + const deserialized: any = _json(body); const exception = new OutputVariablesSizeExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3299,7 +3216,7 @@ const de_PipelineExecutionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineExecutionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PipelineExecutionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3315,7 +3232,7 @@ const de_PipelineExecutionNotStoppableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineExecutionNotStoppableException(body, context); + const deserialized: any = _json(body); const exception = new PipelineExecutionNotStoppableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3331,7 +3248,7 @@ const de_PipelineNameInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineNameInUseException(body, context); + const deserialized: any = _json(body); const exception = new PipelineNameInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3347,7 +3264,7 @@ const de_PipelineNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PipelineNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3363,7 +3280,7 @@ const de_PipelineVersionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineVersionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PipelineVersionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3379,7 +3296,7 @@ const de_RequestFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestFailedException(body, context); + const deserialized: any = _json(body); const exception = new RequestFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3395,7 +3312,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3411,7 +3328,7 @@ const de_StageNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StageNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new StageNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3427,7 +3344,7 @@ const de_StageNotRetryableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StageNotRetryableException(body, context); + const deserialized: any = _json(body); const exception = new StageNotRetryableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3443,7 +3360,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3456,7 +3373,7 @@ const de_TooManyTagsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3472,7 +3389,7 @@ const de_WebhookNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WebhookNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new WebhookNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3480,2266 +3397,640 @@ const de_WebhookNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcknowledgeJobInput - */ -const se_AcknowledgeJobInput = (input: AcknowledgeJobInput, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.nonce != null && { nonce: input.nonce }), - }; -}; +// se_AcknowledgeJobInput omitted. -/** - * serializeAws_json1_1AcknowledgeThirdPartyJobInput - */ -const se_AcknowledgeThirdPartyJobInput = (input: AcknowledgeThirdPartyJobInput, context: __SerdeContext): any => { - return { - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.nonce != null && { nonce: input.nonce }), - }; -}; +// se_AcknowledgeThirdPartyJobInput omitted. -/** - * serializeAws_json1_1ActionConfigurationMap - */ -const se_ActionConfigurationMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ActionConfigurationMap omitted. -/** - * serializeAws_json1_1ActionConfigurationProperty - */ -const se_ActionConfigurationProperty = (input: ActionConfigurationProperty, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.key != null && { key: input.key }), - ...(input.name != null && { name: input.name }), - ...(input.queryable != null && { queryable: input.queryable }), - ...(input.required != null && { required: input.required }), - ...(input.secret != null && { secret: input.secret }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ActionConfigurationProperty omitted. -/** - * serializeAws_json1_1ActionConfigurationPropertyList - */ -const se_ActionConfigurationPropertyList = (input: ActionConfigurationProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ActionConfigurationProperty(entry, context); - }); -}; +// se_ActionConfigurationPropertyList omitted. -/** - * serializeAws_json1_1ActionDeclaration - */ -const se_ActionDeclaration = (input: ActionDeclaration, context: __SerdeContext): any => { - return { - ...(input.actionTypeId != null && { actionTypeId: se_ActionTypeId(input.actionTypeId, context) }), - ...(input.configuration != null && { configuration: se_ActionConfigurationMap(input.configuration, context) }), - ...(input.inputArtifacts != null && { inputArtifacts: se_InputArtifactList(input.inputArtifacts, context) }), - ...(input.name != null && { name: input.name }), - ...(input.namespace != null && { namespace: input.namespace }), - ...(input.outputArtifacts != null && { outputArtifacts: se_OutputArtifactList(input.outputArtifacts, context) }), - ...(input.region != null && { region: input.region }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.runOrder != null && { runOrder: input.runOrder }), - }; -}; +// se_ActionDeclaration omitted. -/** - * serializeAws_json1_1ActionExecutionFilter - */ -const se_ActionExecutionFilter = (input: ActionExecutionFilter, context: __SerdeContext): any => { - return { - ...(input.pipelineExecutionId != null && { pipelineExecutionId: input.pipelineExecutionId }), - }; -}; +// se_ActionExecutionFilter omitted. /** * serializeAws_json1_1ActionRevision */ const se_ActionRevision = (input: ActionRevision, context: __SerdeContext): any => { - return { - ...(input.created != null && { created: Math.round(input.created.getTime() / 1000) }), - ...(input.revisionChangeId != null && { revisionChangeId: input.revisionChangeId }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - }; + return take(input, { + created: (_) => Math.round(_.getTime() / 1000), + revisionChangeId: [], + revisionId: [], + }); }; -/** - * serializeAws_json1_1ActionTypeArtifactDetails - */ -const se_ActionTypeArtifactDetails = (input: ActionTypeArtifactDetails, context: __SerdeContext): any => { - return { - ...(input.maximumCount != null && { maximumCount: input.maximumCount }), - ...(input.minimumCount != null && { minimumCount: input.minimumCount }), - }; -}; +// se_ActionTypeArtifactDetails omitted. -/** - * serializeAws_json1_1ActionTypeDeclaration - */ -const se_ActionTypeDeclaration = (input: ActionTypeDeclaration, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.executor != null && { executor: se_ActionTypeExecutor(input.executor, context) }), - ...(input.id != null && { id: se_ActionTypeIdentifier(input.id, context) }), - ...(input.inputArtifactDetails != null && { - inputArtifactDetails: se_ActionTypeArtifactDetails(input.inputArtifactDetails, context), - }), - ...(input.outputArtifactDetails != null && { - outputArtifactDetails: se_ActionTypeArtifactDetails(input.outputArtifactDetails, context), - }), - ...(input.permissions != null && { permissions: se_ActionTypePermissions(input.permissions, context) }), - ...(input.properties != null && { properties: se_ActionTypeProperties(input.properties, context) }), - ...(input.urls != null && { urls: se_ActionTypeUrls(input.urls, context) }), - }; -}; +// se_ActionTypeDeclaration omitted. -/** - * serializeAws_json1_1ActionTypeExecutor - */ -const se_ActionTypeExecutor = (input: ActionTypeExecutor, context: __SerdeContext): any => { - return { - ...(input.configuration != null && { configuration: se_ExecutorConfiguration(input.configuration, context) }), - ...(input.jobTimeout != null && { jobTimeout: input.jobTimeout }), - ...(input.policyStatementsTemplate != null && { policyStatementsTemplate: input.policyStatementsTemplate }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ActionTypeExecutor omitted. -/** - * serializeAws_json1_1ActionTypeId - */ -const se_ActionTypeId = (input: ActionTypeId, context: __SerdeContext): any => { - return { - ...(input.category != null && { category: input.category }), - ...(input.owner != null && { owner: input.owner }), - ...(input.provider != null && { provider: input.provider }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_ActionTypeId omitted. -/** - * serializeAws_json1_1ActionTypeIdentifier - */ -const se_ActionTypeIdentifier = (input: ActionTypeIdentifier, context: __SerdeContext): any => { - return { - ...(input.category != null && { category: input.category }), - ...(input.owner != null && { owner: input.owner }), - ...(input.provider != null && { provider: input.provider }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_ActionTypeIdentifier omitted. -/** - * serializeAws_json1_1ActionTypePermissions - */ -const se_ActionTypePermissions = (input: ActionTypePermissions, context: __SerdeContext): any => { - return { - ...(input.allowedAccounts != null && { allowedAccounts: se_AllowedAccounts(input.allowedAccounts, context) }), - }; -}; +// se_ActionTypePermissions omitted. -/** - * serializeAws_json1_1ActionTypeProperties - */ -const se_ActionTypeProperties = (input: ActionTypeProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ActionTypeProperty(entry, context); - }); -}; +// se_ActionTypeProperties omitted. -/** - * serializeAws_json1_1ActionTypeProperty - */ -const se_ActionTypeProperty = (input: ActionTypeProperty, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.key != null && { key: input.key }), - ...(input.name != null && { name: input.name }), - ...(input.noEcho != null && { noEcho: input.noEcho }), - ...(input.optional != null && { optional: input.optional }), - ...(input.queryable != null && { queryable: input.queryable }), - }; -}; +// se_ActionTypeProperty omitted. -/** - * serializeAws_json1_1ActionTypeSettings - */ -const se_ActionTypeSettings = (input: ActionTypeSettings, context: __SerdeContext): any => { - return { - ...(input.entityUrlTemplate != null && { entityUrlTemplate: input.entityUrlTemplate }), - ...(input.executionUrlTemplate != null && { executionUrlTemplate: input.executionUrlTemplate }), - ...(input.revisionUrlTemplate != null && { revisionUrlTemplate: input.revisionUrlTemplate }), - ...(input.thirdPartyConfigurationUrl != null && { thirdPartyConfigurationUrl: input.thirdPartyConfigurationUrl }), - }; -}; +// se_ActionTypeSettings omitted. -/** - * serializeAws_json1_1ActionTypeUrls - */ -const se_ActionTypeUrls = (input: ActionTypeUrls, context: __SerdeContext): any => { - return { - ...(input.configurationUrl != null && { configurationUrl: input.configurationUrl }), - ...(input.entityUrlTemplate != null && { entityUrlTemplate: input.entityUrlTemplate }), - ...(input.executionUrlTemplate != null && { executionUrlTemplate: input.executionUrlTemplate }), - ...(input.revisionUrlTemplate != null && { revisionUrlTemplate: input.revisionUrlTemplate }), - }; -}; +// se_ActionTypeUrls omitted. -/** - * serializeAws_json1_1AllowedAccounts - */ -const se_AllowedAccounts = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedAccounts omitted. -/** - * serializeAws_json1_1ApprovalResult - */ -const se_ApprovalResult = (input: ApprovalResult, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - ...(input.summary != null && { summary: input.summary }), - }; -}; +// se_ApprovalResult omitted. -/** - * serializeAws_json1_1ArtifactDetails - */ -const se_ArtifactDetails = (input: ArtifactDetails, context: __SerdeContext): any => { - return { - ...(input.maximumCount != null && { maximumCount: input.maximumCount }), - ...(input.minimumCount != null && { minimumCount: input.minimumCount }), - }; -}; +// se_ArtifactDetails omitted. -/** - * serializeAws_json1_1ArtifactStore - */ -const se_ArtifactStore = (input: ArtifactStore, context: __SerdeContext): any => { - return { - ...(input.encryptionKey != null && { encryptionKey: se_EncryptionKey(input.encryptionKey, context) }), - ...(input.location != null && { location: input.location }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ArtifactStore omitted. -/** - * serializeAws_json1_1ArtifactStoreMap - */ -const se_ArtifactStoreMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ArtifactStore(value, context); - return acc; - }, {}); -}; +// se_ArtifactStoreMap omitted. -/** - * serializeAws_json1_1BlockerDeclaration - */ -const se_BlockerDeclaration = (input: BlockerDeclaration, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_BlockerDeclaration omitted. -/** - * serializeAws_json1_1CreateCustomActionTypeInput - */ -const se_CreateCustomActionTypeInput = (input: CreateCustomActionTypeInput, context: __SerdeContext): any => { - return { - ...(input.category != null && { category: input.category }), - ...(input.configurationProperties != null && { - configurationProperties: se_ActionConfigurationPropertyList(input.configurationProperties, context), - }), - ...(input.inputArtifactDetails != null && { - inputArtifactDetails: se_ArtifactDetails(input.inputArtifactDetails, context), - }), - ...(input.outputArtifactDetails != null && { - outputArtifactDetails: se_ArtifactDetails(input.outputArtifactDetails, context), - }), - ...(input.provider != null && { provider: input.provider }), - ...(input.settings != null && { settings: se_ActionTypeSettings(input.settings, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_CreateCustomActionTypeInput omitted. -/** - * serializeAws_json1_1CreatePipelineInput - */ -const se_CreatePipelineInput = (input: CreatePipelineInput, context: __SerdeContext): any => { - return { - ...(input.pipeline != null && { pipeline: se_PipelineDeclaration(input.pipeline, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreatePipelineInput omitted. /** * serializeAws_json1_1CurrentRevision */ const se_CurrentRevision = (input: CurrentRevision, context: __SerdeContext): any => { - return { - ...(input.changeIdentifier != null && { changeIdentifier: input.changeIdentifier }), - ...(input.created != null && { created: Math.round(input.created.getTime() / 1000) }), - ...(input.revision != null && { revision: input.revision }), - ...(input.revisionSummary != null && { revisionSummary: input.revisionSummary }), - }; + return take(input, { + changeIdentifier: [], + created: (_) => Math.round(_.getTime() / 1000), + revision: [], + revisionSummary: [], + }); }; -/** - * serializeAws_json1_1DeleteCustomActionTypeInput - */ -const se_DeleteCustomActionTypeInput = (input: DeleteCustomActionTypeInput, context: __SerdeContext): any => { - return { - ...(input.category != null && { category: input.category }), - ...(input.provider != null && { provider: input.provider }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_DeleteCustomActionTypeInput omitted. -/** - * serializeAws_json1_1DeletePipelineInput - */ -const se_DeletePipelineInput = (input: DeletePipelineInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeletePipelineInput omitted. -/** - * serializeAws_json1_1DeleteWebhookInput - */ -const se_DeleteWebhookInput = (input: DeleteWebhookInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteWebhookInput omitted. -/** - * serializeAws_json1_1DeregisterWebhookWithThirdPartyInput - */ -const se_DeregisterWebhookWithThirdPartyInput = ( - input: DeregisterWebhookWithThirdPartyInput, - context: __SerdeContext -): any => { - return { - ...(input.webhookName != null && { webhookName: input.webhookName }), - }; -}; +// se_DeregisterWebhookWithThirdPartyInput omitted. -/** - * serializeAws_json1_1DisableStageTransitionInput - */ -const se_DisableStageTransitionInput = (input: DisableStageTransitionInput, context: __SerdeContext): any => { - return { - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.reason != null && { reason: input.reason }), - ...(input.stageName != null && { stageName: input.stageName }), - ...(input.transitionType != null && { transitionType: input.transitionType }), - }; -}; +// se_DisableStageTransitionInput omitted. -/** - * serializeAws_json1_1EnableStageTransitionInput - */ -const se_EnableStageTransitionInput = (input: EnableStageTransitionInput, context: __SerdeContext): any => { - return { - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.stageName != null && { stageName: input.stageName }), - ...(input.transitionType != null && { transitionType: input.transitionType }), - }; -}; +// se_EnableStageTransitionInput omitted. -/** - * serializeAws_json1_1EncryptionKey - */ -const se_EncryptionKey = (input: EncryptionKey, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_EncryptionKey omitted. -/** - * serializeAws_json1_1ExecutionDetails - */ -const se_ExecutionDetails = (input: ExecutionDetails, context: __SerdeContext): any => { - return { - ...(input.externalExecutionId != null && { externalExecutionId: input.externalExecutionId }), - ...(input.percentComplete != null && { percentComplete: input.percentComplete }), - ...(input.summary != null && { summary: input.summary }), - }; -}; +// se_ExecutionDetails omitted. -/** - * serializeAws_json1_1ExecutorConfiguration - */ -const se_ExecutorConfiguration = (input: ExecutorConfiguration, context: __SerdeContext): any => { - return { - ...(input.jobWorkerExecutorConfiguration != null && { - jobWorkerExecutorConfiguration: se_JobWorkerExecutorConfiguration(input.jobWorkerExecutorConfiguration, context), - }), - ...(input.lambdaExecutorConfiguration != null && { - lambdaExecutorConfiguration: se_LambdaExecutorConfiguration(input.lambdaExecutorConfiguration, context), - }), - }; -}; +// se_ExecutorConfiguration omitted. -/** - * serializeAws_json1_1FailureDetails - */ -const se_FailureDetails = (input: FailureDetails, context: __SerdeContext): any => { - return { - ...(input.externalExecutionId != null && { externalExecutionId: input.externalExecutionId }), - ...(input.message != null && { message: input.message }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_FailureDetails omitted. -/** - * serializeAws_json1_1GetActionTypeInput - */ -const se_GetActionTypeInput = (input: GetActionTypeInput, context: __SerdeContext): any => { - return { - ...(input.category != null && { category: input.category }), - ...(input.owner != null && { owner: input.owner }), - ...(input.provider != null && { provider: input.provider }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_GetActionTypeInput omitted. -/** - * serializeAws_json1_1GetJobDetailsInput - */ -const se_GetJobDetailsInput = (input: GetJobDetailsInput, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; +// se_GetJobDetailsInput omitted. -/** - * serializeAws_json1_1GetPipelineExecutionInput - */ -const se_GetPipelineExecutionInput = (input: GetPipelineExecutionInput, context: __SerdeContext): any => { - return { - ...(input.pipelineExecutionId != null && { pipelineExecutionId: input.pipelineExecutionId }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - }; -}; +// se_GetPipelineExecutionInput omitted. -/** - * serializeAws_json1_1GetPipelineInput - */ -const se_GetPipelineInput = (input: GetPipelineInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_GetPipelineInput omitted. -/** - * serializeAws_json1_1GetPipelineStateInput - */ -const se_GetPipelineStateInput = (input: GetPipelineStateInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_GetPipelineStateInput omitted. -/** - * serializeAws_json1_1GetThirdPartyJobDetailsInput - */ -const se_GetThirdPartyJobDetailsInput = (input: GetThirdPartyJobDetailsInput, context: __SerdeContext): any => { - return { - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; +// se_GetThirdPartyJobDetailsInput omitted. -/** - * serializeAws_json1_1InputArtifact - */ -const se_InputArtifact = (input: InputArtifact, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_InputArtifact omitted. -/** - * serializeAws_json1_1InputArtifactList - */ -const se_InputArtifactList = (input: InputArtifact[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputArtifact(entry, context); - }); -}; +// se_InputArtifactList omitted. -/** - * serializeAws_json1_1JobWorkerExecutorConfiguration - */ -const se_JobWorkerExecutorConfiguration = (input: JobWorkerExecutorConfiguration, context: __SerdeContext): any => { - return { - ...(input.pollingAccounts != null && { pollingAccounts: se_PollingAccountList(input.pollingAccounts, context) }), - ...(input.pollingServicePrincipals != null && { - pollingServicePrincipals: se_PollingServicePrincipalList(input.pollingServicePrincipals, context), - }), - }; -}; +// se_JobWorkerExecutorConfiguration omitted. -/** - * serializeAws_json1_1LambdaExecutorConfiguration - */ -const se_LambdaExecutorConfiguration = (input: LambdaExecutorConfiguration, context: __SerdeContext): any => { - return { - ...(input.lambdaFunctionArn != null && { lambdaFunctionArn: input.lambdaFunctionArn }), - }; -}; +// se_LambdaExecutorConfiguration omitted. -/** - * serializeAws_json1_1ListActionExecutionsInput - */ -const se_ListActionExecutionsInput = (input: ListActionExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_ActionExecutionFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - }; -}; +// se_ListActionExecutionsInput omitted. -/** - * serializeAws_json1_1ListActionTypesInput - */ -const se_ListActionTypesInput = (input: ListActionTypesInput, context: __SerdeContext): any => { - return { - ...(input.actionOwnerFilter != null && { actionOwnerFilter: input.actionOwnerFilter }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.regionFilter != null && { regionFilter: input.regionFilter }), - }; -}; +// se_ListActionTypesInput omitted. -/** - * serializeAws_json1_1ListPipelineExecutionsInput - */ -const se_ListPipelineExecutionsInput = (input: ListPipelineExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - }; -}; +// se_ListPipelineExecutionsInput omitted. -/** - * serializeAws_json1_1ListPipelinesInput - */ -const se_ListPipelinesInput = (input: ListPipelinesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListPipelinesInput omitted. -/** - * serializeAws_json1_1ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_1ListWebhooksInput - */ -const se_ListWebhooksInput = (input: ListWebhooksInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1OutputArtifact - */ -const se_OutputArtifact = (input: OutputArtifact, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1OutputArtifactList - */ -const se_OutputArtifactList = (input: OutputArtifact[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OutputArtifact(entry, context); - }); -}; - -/** - * serializeAws_json1_1OutputVariablesMap - */ -const se_OutputVariablesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1PipelineDeclaration - */ -const se_PipelineDeclaration = (input: PipelineDeclaration, context: __SerdeContext): any => { - return { - ...(input.artifactStore != null && { artifactStore: se_ArtifactStore(input.artifactStore, context) }), - ...(input.artifactStores != null && { artifactStores: se_ArtifactStoreMap(input.artifactStores, context) }), - ...(input.name != null && { name: input.name }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stages != null && { stages: se_PipelineStageDeclarationList(input.stages, context) }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_json1_1PipelineStageDeclarationList - */ -const se_PipelineStageDeclarationList = (input: StageDeclaration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StageDeclaration(entry, context); - }); -}; - -/** - * serializeAws_json1_1PollForJobsInput - */ -const se_PollForJobsInput = (input: PollForJobsInput, context: __SerdeContext): any => { - return { - ...(input.actionTypeId != null && { actionTypeId: se_ActionTypeId(input.actionTypeId, context) }), - ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }), - ...(input.queryParam != null && { queryParam: se_QueryParamMap(input.queryParam, context) }), - }; -}; - -/** - * serializeAws_json1_1PollForThirdPartyJobsInput - */ -const se_PollForThirdPartyJobsInput = (input: PollForThirdPartyJobsInput, context: __SerdeContext): any => { - return { - ...(input.actionTypeId != null && { actionTypeId: se_ActionTypeId(input.actionTypeId, context) }), - ...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }), - }; -}; - -/** - * serializeAws_json1_1PollingAccountList - */ -const se_PollingAccountList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PollingServicePrincipalList - */ -const se_PollingServicePrincipalList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PutActionRevisionInput - */ -const se_PutActionRevisionInput = (input: PutActionRevisionInput, context: __SerdeContext): any => { - return { - ...(input.actionName != null && { actionName: input.actionName }), - ...(input.actionRevision != null && { actionRevision: se_ActionRevision(input.actionRevision, context) }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.stageName != null && { stageName: input.stageName }), - }; -}; - -/** - * serializeAws_json1_1PutApprovalResultInput - */ -const se_PutApprovalResultInput = (input: PutApprovalResultInput, context: __SerdeContext): any => { - return { - ...(input.actionName != null && { actionName: input.actionName }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.result != null && { result: se_ApprovalResult(input.result, context) }), - ...(input.stageName != null && { stageName: input.stageName }), - ...(input.token != null && { token: input.token }), - }; -}; - -/** - * serializeAws_json1_1PutJobFailureResultInput - */ -const se_PutJobFailureResultInput = (input: PutJobFailureResultInput, context: __SerdeContext): any => { - return { - ...(input.failureDetails != null && { failureDetails: se_FailureDetails(input.failureDetails, context) }), - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; - -/** - * serializeAws_json1_1PutJobSuccessResultInput - */ -const se_PutJobSuccessResultInput = (input: PutJobSuccessResultInput, context: __SerdeContext): any => { - return { - ...(input.continuationToken != null && { continuationToken: input.continuationToken }), - ...(input.currentRevision != null && { currentRevision: se_CurrentRevision(input.currentRevision, context) }), - ...(input.executionDetails != null && { executionDetails: se_ExecutionDetails(input.executionDetails, context) }), - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.outputVariables != null && { outputVariables: se_OutputVariablesMap(input.outputVariables, context) }), - }; -}; - -/** - * serializeAws_json1_1PutThirdPartyJobFailureResultInput - */ -const se_PutThirdPartyJobFailureResultInput = ( - input: PutThirdPartyJobFailureResultInput, - context: __SerdeContext -): any => { - return { - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.failureDetails != null && { failureDetails: se_FailureDetails(input.failureDetails, context) }), - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; - -/** - * serializeAws_json1_1PutThirdPartyJobSuccessResultInput - */ -const se_PutThirdPartyJobSuccessResultInput = ( - input: PutThirdPartyJobSuccessResultInput, - context: __SerdeContext -): any => { - return { - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.continuationToken != null && { continuationToken: input.continuationToken }), - ...(input.currentRevision != null && { currentRevision: se_CurrentRevision(input.currentRevision, context) }), - ...(input.executionDetails != null && { executionDetails: se_ExecutionDetails(input.executionDetails, context) }), - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; - -/** - * serializeAws_json1_1PutWebhookInput - */ -const se_PutWebhookInput = (input: PutWebhookInput, context: __SerdeContext): any => { - return { - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.webhook != null && { webhook: se_WebhookDefinition(input.webhook, context) }), - }; -}; - -/** - * serializeAws_json1_1QueryParamMap - */ -const se_QueryParamMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1RegisterWebhookWithThirdPartyInput - */ -const se_RegisterWebhookWithThirdPartyInput = ( - input: RegisterWebhookWithThirdPartyInput, - context: __SerdeContext -): any => { - return { - ...(input.webhookName != null && { webhookName: input.webhookName }), - }; -}; - -/** - * serializeAws_json1_1RetryStageExecutionInput - */ -const se_RetryStageExecutionInput = (input: RetryStageExecutionInput, context: __SerdeContext): any => { - return { - ...(input.pipelineExecutionId != null && { pipelineExecutionId: input.pipelineExecutionId }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.retryMode != null && { retryMode: input.retryMode }), - ...(input.stageName != null && { stageName: input.stageName }), - }; -}; - -/** - * serializeAws_json1_1StageActionDeclarationList - */ -const se_StageActionDeclarationList = (input: ActionDeclaration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ActionDeclaration(entry, context); - }); -}; - -/** - * serializeAws_json1_1StageBlockerDeclarationList - */ -const se_StageBlockerDeclarationList = (input: BlockerDeclaration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BlockerDeclaration(entry, context); - }); -}; - -/** - * serializeAws_json1_1StageDeclaration - */ -const se_StageDeclaration = (input: StageDeclaration, context: __SerdeContext): any => { - return { - ...(input.actions != null && { actions: se_StageActionDeclarationList(input.actions, context) }), - ...(input.blockers != null && { blockers: se_StageBlockerDeclarationList(input.blockers, context) }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1StartPipelineExecutionInput - */ -const se_StartPipelineExecutionInput = (input: StartPipelineExecutionInput, context: __SerdeContext): any => { - return { - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1StopPipelineExecutionInput - */ -const se_StopPipelineExecutionInput = (input: StopPipelineExecutionInput, context: __SerdeContext): any => { - return { - ...(input.abandon != null && { abandon: input.abandon }), - ...(input.pipelineExecutionId != null && { pipelineExecutionId: input.pipelineExecutionId }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.reason != null && { reason: input.reason }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateActionTypeInput - */ -const se_UpdateActionTypeInput = (input: UpdateActionTypeInput, context: __SerdeContext): any => { - return { - ...(input.actionType != null && { actionType: se_ActionTypeDeclaration(input.actionType, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdatePipelineInput - */ -const se_UpdatePipelineInput = (input: UpdatePipelineInput, context: __SerdeContext): any => { - return { - ...(input.pipeline != null && { pipeline: se_PipelineDeclaration(input.pipeline, context) }), - }; -}; - -/** - * serializeAws_json1_1WebhookAuthConfiguration - */ -const se_WebhookAuthConfiguration = (input: WebhookAuthConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowedIPRange != null && { AllowedIPRange: input.AllowedIPRange }), - ...(input.SecretToken != null && { SecretToken: input.SecretToken }), - }; -}; - -/** - * serializeAws_json1_1WebhookDefinition - */ -const se_WebhookDefinition = (input: WebhookDefinition, context: __SerdeContext): any => { - return { - ...(input.authentication != null && { authentication: input.authentication }), - ...(input.authenticationConfiguration != null && { - authenticationConfiguration: se_WebhookAuthConfiguration(input.authenticationConfiguration, context), - }), - ...(input.filters != null && { filters: se_WebhookFilters(input.filters, context) }), - ...(input.name != null && { name: input.name }), - ...(input.targetAction != null && { targetAction: input.targetAction }), - ...(input.targetPipeline != null && { targetPipeline: input.targetPipeline }), - }; -}; - -/** - * serializeAws_json1_1WebhookFilterRule - */ -const se_WebhookFilterRule = (input: WebhookFilterRule, context: __SerdeContext): any => { - return { - ...(input.jsonPath != null && { jsonPath: input.jsonPath }), - ...(input.matchEquals != null && { matchEquals: input.matchEquals }), - }; -}; - -/** - * serializeAws_json1_1WebhookFilters - */ -const se_WebhookFilters = (input: WebhookFilterRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WebhookFilterRule(entry, context); - }); -}; - -/** - * deserializeAws_json1_1AcknowledgeJobOutput - */ -const de_AcknowledgeJobOutput = (output: any, context: __SerdeContext): AcknowledgeJobOutput => { - return { - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1AcknowledgeThirdPartyJobOutput - */ -const de_AcknowledgeThirdPartyJobOutput = (output: any, context: __SerdeContext): AcknowledgeThirdPartyJobOutput => { - return { - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1ActionConfiguration - */ -const de_ActionConfiguration = (output: any, context: __SerdeContext): ActionConfiguration => { - return { - configuration: output.configuration != null ? de_ActionConfigurationMap(output.configuration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ActionConfigurationMap - */ -const de_ActionConfigurationMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ActionConfigurationProperty - */ -const de_ActionConfigurationProperty = (output: any, context: __SerdeContext): ActionConfigurationProperty => { - return { - description: __expectString(output.description), - key: __expectBoolean(output.key), - name: __expectString(output.name), - queryable: __expectBoolean(output.queryable), - required: __expectBoolean(output.required), - secret: __expectBoolean(output.secret), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ActionConfigurationPropertyList - */ -const de_ActionConfigurationPropertyList = (output: any, context: __SerdeContext): ActionConfigurationProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionConfigurationProperty(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionContext - */ -const de_ActionContext = (output: any, context: __SerdeContext): ActionContext => { - return { - actionExecutionId: __expectString(output.actionExecutionId), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1ActionDeclaration - */ -const de_ActionDeclaration = (output: any, context: __SerdeContext): ActionDeclaration => { - return { - actionTypeId: output.actionTypeId != null ? de_ActionTypeId(output.actionTypeId, context) : undefined, - configuration: output.configuration != null ? de_ActionConfigurationMap(output.configuration, context) : undefined, - inputArtifacts: output.inputArtifacts != null ? de_InputArtifactList(output.inputArtifacts, context) : undefined, - name: __expectString(output.name), - namespace: __expectString(output.namespace), - outputArtifacts: - output.outputArtifacts != null ? de_OutputArtifactList(output.outputArtifacts, context) : undefined, - region: __expectString(output.region), - roleArn: __expectString(output.roleArn), - runOrder: __expectInt32(output.runOrder), - } as any; -}; - -/** - * deserializeAws_json1_1ActionExecution - */ -const de_ActionExecution = (output: any, context: __SerdeContext): ActionExecution => { - return { - actionExecutionId: __expectString(output.actionExecutionId), - errorDetails: output.errorDetails != null ? de_ErrorDetails(output.errorDetails, context) : undefined, - externalExecutionId: __expectString(output.externalExecutionId), - externalExecutionUrl: __expectString(output.externalExecutionUrl), - lastStatusChange: - output.lastStatusChange != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusChange))) - : undefined, - lastUpdatedBy: __expectString(output.lastUpdatedBy), - percentComplete: __expectInt32(output.percentComplete), - status: __expectString(output.status), - summary: __expectString(output.summary), - token: __expectString(output.token), - } as any; -}; - -/** - * deserializeAws_json1_1ActionExecutionDetail - */ -const de_ActionExecutionDetail = (output: any, context: __SerdeContext): ActionExecutionDetail => { - return { - actionExecutionId: __expectString(output.actionExecutionId), - actionName: __expectString(output.actionName), - input: output.input != null ? de_ActionExecutionInput(output.input, context) : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - output: output.output != null ? de_ActionExecutionOutput(output.output, context) : undefined, - pipelineExecutionId: __expectString(output.pipelineExecutionId), - pipelineVersion: __expectInt32(output.pipelineVersion), - stageName: __expectString(output.stageName), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1ActionExecutionDetailList - */ -const de_ActionExecutionDetailList = (output: any, context: __SerdeContext): ActionExecutionDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionExecutionDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionExecutionInput - */ -const de_ActionExecutionInput = (output: any, context: __SerdeContext): ActionExecutionInput => { - return { - actionTypeId: output.actionTypeId != null ? de_ActionTypeId(output.actionTypeId, context) : undefined, - configuration: output.configuration != null ? de_ActionConfigurationMap(output.configuration, context) : undefined, - inputArtifacts: output.inputArtifacts != null ? de_ArtifactDetailList(output.inputArtifacts, context) : undefined, - namespace: __expectString(output.namespace), - region: __expectString(output.region), - resolvedConfiguration: - output.resolvedConfiguration != null - ? de_ResolvedActionConfigurationMap(output.resolvedConfiguration, context) - : undefined, - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_json1_1ActionExecutionOutput - */ -const de_ActionExecutionOutput = (output: any, context: __SerdeContext): ActionExecutionOutput => { - return { - executionResult: - output.executionResult != null ? de_ActionExecutionResult(output.executionResult, context) : undefined, - outputArtifacts: - output.outputArtifacts != null ? de_ArtifactDetailList(output.outputArtifacts, context) : undefined, - outputVariables: - output.outputVariables != null ? de_OutputVariablesMap(output.outputVariables, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ActionExecutionResult - */ -const de_ActionExecutionResult = (output: any, context: __SerdeContext): ActionExecutionResult => { - return { - externalExecutionId: __expectString(output.externalExecutionId), - externalExecutionSummary: __expectString(output.externalExecutionSummary), - externalExecutionUrl: __expectString(output.externalExecutionUrl), - } as any; -}; - -/** - * deserializeAws_json1_1ActionNotFoundException - */ -const de_ActionNotFoundException = (output: any, context: __SerdeContext): ActionNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ActionRevision - */ -const de_ActionRevision = (output: any, context: __SerdeContext): ActionRevision => { - return { - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - revisionChangeId: __expectString(output.revisionChangeId), - revisionId: __expectString(output.revisionId), - } as any; -}; - -/** - * deserializeAws_json1_1ActionState - */ -const de_ActionState = (output: any, context: __SerdeContext): ActionState => { - return { - actionName: __expectString(output.actionName), - currentRevision: output.currentRevision != null ? de_ActionRevision(output.currentRevision, context) : undefined, - entityUrl: __expectString(output.entityUrl), - latestExecution: output.latestExecution != null ? de_ActionExecution(output.latestExecution, context) : undefined, - revisionUrl: __expectString(output.revisionUrl), - } as any; -}; - -/** - * deserializeAws_json1_1ActionStateList - */ -const de_ActionStateList = (output: any, context: __SerdeContext): ActionState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionState(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionType - */ -const de_ActionType = (output: any, context: __SerdeContext): ActionType => { - return { - actionConfigurationProperties: - output.actionConfigurationProperties != null - ? de_ActionConfigurationPropertyList(output.actionConfigurationProperties, context) - : undefined, - id: output.id != null ? de_ActionTypeId(output.id, context) : undefined, - inputArtifactDetails: - output.inputArtifactDetails != null ? de_ArtifactDetails(output.inputArtifactDetails, context) : undefined, - outputArtifactDetails: - output.outputArtifactDetails != null ? de_ArtifactDetails(output.outputArtifactDetails, context) : undefined, - settings: output.settings != null ? de_ActionTypeSettings(output.settings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeArtifactDetails - */ -const de_ActionTypeArtifactDetails = (output: any, context: __SerdeContext): ActionTypeArtifactDetails => { - return { - maximumCount: __expectInt32(output.maximumCount), - minimumCount: __expectInt32(output.minimumCount), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeDeclaration - */ -const de_ActionTypeDeclaration = (output: any, context: __SerdeContext): ActionTypeDeclaration => { - return { - description: __expectString(output.description), - executor: output.executor != null ? de_ActionTypeExecutor(output.executor, context) : undefined, - id: output.id != null ? de_ActionTypeIdentifier(output.id, context) : undefined, - inputArtifactDetails: - output.inputArtifactDetails != null - ? de_ActionTypeArtifactDetails(output.inputArtifactDetails, context) - : undefined, - outputArtifactDetails: - output.outputArtifactDetails != null - ? de_ActionTypeArtifactDetails(output.outputArtifactDetails, context) - : undefined, - permissions: output.permissions != null ? de_ActionTypePermissions(output.permissions, context) : undefined, - properties: output.properties != null ? de_ActionTypeProperties(output.properties, context) : undefined, - urls: output.urls != null ? de_ActionTypeUrls(output.urls, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeExecutor - */ -const de_ActionTypeExecutor = (output: any, context: __SerdeContext): ActionTypeExecutor => { - return { - configuration: output.configuration != null ? de_ExecutorConfiguration(output.configuration, context) : undefined, - jobTimeout: __expectInt32(output.jobTimeout), - policyStatementsTemplate: __expectString(output.policyStatementsTemplate), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeId - */ -const de_ActionTypeId = (output: any, context: __SerdeContext): ActionTypeId => { - return { - category: __expectString(output.category), - owner: __expectString(output.owner), - provider: __expectString(output.provider), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeIdentifier - */ -const de_ActionTypeIdentifier = (output: any, context: __SerdeContext): ActionTypeIdentifier => { - return { - category: __expectString(output.category), - owner: __expectString(output.owner), - provider: __expectString(output.provider), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeList - */ -const de_ActionTypeList = (output: any, context: __SerdeContext): ActionType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionTypeNotFoundException - */ -const de_ActionTypeNotFoundException = (output: any, context: __SerdeContext): ActionTypeNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypePermissions - */ -const de_ActionTypePermissions = (output: any, context: __SerdeContext): ActionTypePermissions => { - return { - allowedAccounts: output.allowedAccounts != null ? de_AllowedAccounts(output.allowedAccounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeProperties - */ -const de_ActionTypeProperties = (output: any, context: __SerdeContext): ActionTypeProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionTypeProperty(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionTypeProperty - */ -const de_ActionTypeProperty = (output: any, context: __SerdeContext): ActionTypeProperty => { - return { - description: __expectString(output.description), - key: __expectBoolean(output.key), - name: __expectString(output.name), - noEcho: __expectBoolean(output.noEcho), - optional: __expectBoolean(output.optional), - queryable: __expectBoolean(output.queryable), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeSettings - */ -const de_ActionTypeSettings = (output: any, context: __SerdeContext): ActionTypeSettings => { - return { - entityUrlTemplate: __expectString(output.entityUrlTemplate), - executionUrlTemplate: __expectString(output.executionUrlTemplate), - revisionUrlTemplate: __expectString(output.revisionUrlTemplate), - thirdPartyConfigurationUrl: __expectString(output.thirdPartyConfigurationUrl), - } as any; -}; - -/** - * deserializeAws_json1_1ActionTypeUrls - */ -const de_ActionTypeUrls = (output: any, context: __SerdeContext): ActionTypeUrls => { - return { - configurationUrl: __expectString(output.configurationUrl), - entityUrlTemplate: __expectString(output.entityUrlTemplate), - executionUrlTemplate: __expectString(output.executionUrlTemplate), - revisionUrlTemplate: __expectString(output.revisionUrlTemplate), - } as any; -}; - -/** - * deserializeAws_json1_1AllowedAccounts - */ -const de_AllowedAccounts = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApprovalAlreadyCompletedException - */ -const de_ApprovalAlreadyCompletedException = ( - output: any, - context: __SerdeContext -): ApprovalAlreadyCompletedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Artifact - */ -const de_Artifact = (output: any, context: __SerdeContext): Artifact => { - return { - location: output.location != null ? de_ArtifactLocation(output.location, context) : undefined, - name: __expectString(output.name), - revision: __expectString(output.revision), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactDetail - */ -const de_ArtifactDetail = (output: any, context: __SerdeContext): ArtifactDetail => { - return { - name: __expectString(output.name), - s3location: output.s3location != null ? de_S3Location(output.s3location, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactDetailList - */ -const de_ArtifactDetailList = (output: any, context: __SerdeContext): ArtifactDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ArtifactDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ArtifactDetails - */ -const de_ArtifactDetails = (output: any, context: __SerdeContext): ArtifactDetails => { - return { - maximumCount: __expectInt32(output.maximumCount), - minimumCount: __expectInt32(output.minimumCount), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactList - */ -const de_ArtifactList = (output: any, context: __SerdeContext): Artifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Artifact(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ArtifactLocation - */ -const de_ArtifactLocation = (output: any, context: __SerdeContext): ArtifactLocation => { - return { - s3Location: output.s3Location != null ? de_S3ArtifactLocation(output.s3Location, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactRevision - */ -const de_ArtifactRevision = (output: any, context: __SerdeContext): ArtifactRevision => { - return { - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - name: __expectString(output.name), - revisionChangeIdentifier: __expectString(output.revisionChangeIdentifier), - revisionId: __expectString(output.revisionId), - revisionSummary: __expectString(output.revisionSummary), - revisionUrl: __expectString(output.revisionUrl), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactRevisionList - */ -const de_ArtifactRevisionList = (output: any, context: __SerdeContext): ArtifactRevision[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ArtifactRevision(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ArtifactStore - */ -const de_ArtifactStore = (output: any, context: __SerdeContext): ArtifactStore => { - return { - encryptionKey: output.encryptionKey != null ? de_EncryptionKey(output.encryptionKey, context) : undefined, - location: __expectString(output.location), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactStoreMap - */ -const de_ArtifactStoreMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ArtifactStore(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1AWSSessionCredentials - */ -const de_AWSSessionCredentials = (output: any, context: __SerdeContext): AWSSessionCredentials => { - return { - accessKeyId: __expectString(output.accessKeyId), - secretAccessKey: __expectString(output.secretAccessKey), - sessionToken: __expectString(output.sessionToken), - } as any; -}; +// se_ListWebhooksInput omitted. -/** - * deserializeAws_json1_1BlockerDeclaration - */ -const de_BlockerDeclaration = (output: any, context: __SerdeContext): BlockerDeclaration => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_OutputArtifact omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_OutputArtifactList omitted. -/** - * deserializeAws_json1_1CreateCustomActionTypeOutput - */ -const de_CreateCustomActionTypeOutput = (output: any, context: __SerdeContext): CreateCustomActionTypeOutput => { - return { - actionType: output.actionType != null ? de_ActionType(output.actionType, context) : undefined, - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// se_OutputVariablesMap omitted. -/** - * deserializeAws_json1_1CreatePipelineOutput - */ -const de_CreatePipelineOutput = (output: any, context: __SerdeContext): CreatePipelineOutput => { - return { - pipeline: output.pipeline != null ? de_PipelineDeclaration(output.pipeline, context) : undefined, - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// se_PipelineDeclaration omitted. -/** - * deserializeAws_json1_1DeleteWebhookOutput - */ -const de_DeleteWebhookOutput = (output: any, context: __SerdeContext): DeleteWebhookOutput => { - return {} as any; -}; +// se_PipelineStageDeclarationList omitted. -/** - * deserializeAws_json1_1DeregisterWebhookWithThirdPartyOutput - */ -const de_DeregisterWebhookWithThirdPartyOutput = ( - output: any, - context: __SerdeContext -): DeregisterWebhookWithThirdPartyOutput => { - return {} as any; -}; +// se_PollForJobsInput omitted. -/** - * deserializeAws_json1_1DuplicatedStopRequestException - */ -const de_DuplicatedStopRequestException = (output: any, context: __SerdeContext): DuplicatedStopRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PollForThirdPartyJobsInput omitted. -/** - * deserializeAws_json1_1EncryptionKey - */ -const de_EncryptionKey = (output: any, context: __SerdeContext): EncryptionKey => { - return { - id: __expectString(output.id), - type: __expectString(output.type), - } as any; -}; +// se_PollingAccountList omitted. -/** - * deserializeAws_json1_1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// se_PollingServicePrincipalList omitted. /** - * deserializeAws_json1_1ExecutionTrigger + * serializeAws_json1_1PutActionRevisionInput */ -const de_ExecutionTrigger = (output: any, context: __SerdeContext): ExecutionTrigger => { - return { - triggerDetail: __expectString(output.triggerDetail), - triggerType: __expectString(output.triggerType), - } as any; +const se_PutActionRevisionInput = (input: PutActionRevisionInput, context: __SerdeContext): any => { + return take(input, { + actionName: [], + actionRevision: (_) => se_ActionRevision(_, context), + pipelineName: [], + stageName: [], + }); }; -/** - * deserializeAws_json1_1ExecutorConfiguration - */ -const de_ExecutorConfiguration = (output: any, context: __SerdeContext): ExecutorConfiguration => { - return { - jobWorkerExecutorConfiguration: - output.jobWorkerExecutorConfiguration != null - ? de_JobWorkerExecutorConfiguration(output.jobWorkerExecutorConfiguration, context) - : undefined, - lambdaExecutorConfiguration: - output.lambdaExecutorConfiguration != null - ? de_LambdaExecutorConfiguration(output.lambdaExecutorConfiguration, context) - : undefined, - } as any; -}; +// se_PutApprovalResultInput omitted. -/** - * deserializeAws_json1_1GetActionTypeOutput - */ -const de_GetActionTypeOutput = (output: any, context: __SerdeContext): GetActionTypeOutput => { - return { - actionType: output.actionType != null ? de_ActionTypeDeclaration(output.actionType, context) : undefined, - } as any; -}; +// se_PutJobFailureResultInput omitted. /** - * deserializeAws_json1_1GetJobDetailsOutput + * serializeAws_json1_1PutJobSuccessResultInput */ -const de_GetJobDetailsOutput = (output: any, context: __SerdeContext): GetJobDetailsOutput => { - return { - jobDetails: output.jobDetails != null ? de_JobDetails(output.jobDetails, context) : undefined, - } as any; +const se_PutJobSuccessResultInput = (input: PutJobSuccessResultInput, context: __SerdeContext): any => { + return take(input, { + continuationToken: [], + currentRevision: (_) => se_CurrentRevision(_, context), + executionDetails: _json, + jobId: [], + outputVariables: _json, + }); }; -/** - * deserializeAws_json1_1GetPipelineExecutionOutput - */ -const de_GetPipelineExecutionOutput = (output: any, context: __SerdeContext): GetPipelineExecutionOutput => { - return { - pipelineExecution: - output.pipelineExecution != null ? de_PipelineExecution(output.pipelineExecution, context) : undefined, - } as any; -}; +// se_PutThirdPartyJobFailureResultInput omitted. /** - * deserializeAws_json1_1GetPipelineOutput + * serializeAws_json1_1PutThirdPartyJobSuccessResultInput */ -const de_GetPipelineOutput = (output: any, context: __SerdeContext): GetPipelineOutput => { - return { - metadata: output.metadata != null ? de_PipelineMetadata(output.metadata, context) : undefined, - pipeline: output.pipeline != null ? de_PipelineDeclaration(output.pipeline, context) : undefined, - } as any; +const se_PutThirdPartyJobSuccessResultInput = ( + input: PutThirdPartyJobSuccessResultInput, + context: __SerdeContext +): any => { + return take(input, { + clientToken: [], + continuationToken: [], + currentRevision: (_) => se_CurrentRevision(_, context), + executionDetails: _json, + jobId: [], + }); }; +// se_PutWebhookInput omitted. + +// se_QueryParamMap omitted. + +// se_RegisterWebhookWithThirdPartyInput omitted. + +// se_RetryStageExecutionInput omitted. + +// se_StageActionDeclarationList omitted. + +// se_StageBlockerDeclarationList omitted. + +// se_StageDeclaration omitted. + /** - * deserializeAws_json1_1GetPipelineStateOutput + * serializeAws_json1_1StartPipelineExecutionInput */ -const de_GetPipelineStateOutput = (output: any, context: __SerdeContext): GetPipelineStateOutput => { - return { - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - pipelineName: __expectString(output.pipelineName), - pipelineVersion: __expectInt32(output.pipelineVersion), - stageStates: output.stageStates != null ? de_StageStateList(output.stageStates, context) : undefined, - updated: - output.updated != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updated))) : undefined, - } as any; +const se_StartPipelineExecutionInput = (input: StartPipelineExecutionInput, context: __SerdeContext): any => { + return take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + }); }; +// se_StopPipelineExecutionInput omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceInput omitted. + +// se_UntagResourceInput omitted. + +// se_UpdateActionTypeInput omitted. + +// se_UpdatePipelineInput omitted. + +// se_WebhookAuthConfiguration omitted. + +// se_WebhookDefinition omitted. + +// se_WebhookFilterRule omitted. + +// se_WebhookFilters omitted. + +// de_AcknowledgeJobOutput omitted. + +// de_AcknowledgeThirdPartyJobOutput omitted. + +// de_ActionConfiguration omitted. + +// de_ActionConfigurationMap omitted. + +// de_ActionConfigurationProperty omitted. + +// de_ActionConfigurationPropertyList omitted. + +// de_ActionContext omitted. + +// de_ActionDeclaration omitted. + /** - * deserializeAws_json1_1GetThirdPartyJobDetailsOutput + * deserializeAws_json1_1ActionExecution */ -const de_GetThirdPartyJobDetailsOutput = (output: any, context: __SerdeContext): GetThirdPartyJobDetailsOutput => { - return { - jobDetails: output.jobDetails != null ? de_ThirdPartyJobDetails(output.jobDetails, context) : undefined, - } as any; +const de_ActionExecution = (output: any, context: __SerdeContext): ActionExecution => { + return take(output, { + actionExecutionId: __expectString, + errorDetails: _json, + externalExecutionId: __expectString, + externalExecutionUrl: __expectString, + lastStatusChange: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedBy: __expectString, + percentComplete: __expectInt32, + status: __expectString, + summary: __expectString, + token: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InputArtifact + * deserializeAws_json1_1ActionExecutionDetail */ -const de_InputArtifact = (output: any, context: __SerdeContext): InputArtifact => { - return { - name: __expectString(output.name), - } as any; +const de_ActionExecutionDetail = (output: any, context: __SerdeContext): ActionExecutionDetail => { + return take(output, { + actionExecutionId: __expectString, + actionName: __expectString, + input: _json, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + output: _json, + pipelineExecutionId: __expectString, + pipelineVersion: __expectInt32, + stageName: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InputArtifactList + * deserializeAws_json1_1ActionExecutionDetailList */ -const de_InputArtifactList = (output: any, context: __SerdeContext): InputArtifact[] => { +const de_ActionExecutionDetailList = (output: any, context: __SerdeContext): ActionExecutionDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputArtifact(entry, context); + return de_ActionExecutionDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InvalidActionDeclarationException - */ -const de_InvalidActionDeclarationException = ( - output: any, - context: __SerdeContext -): InvalidActionDeclarationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionExecutionInput omitted. -/** - * deserializeAws_json1_1InvalidApprovalTokenException - */ -const de_InvalidApprovalTokenException = (output: any, context: __SerdeContext): InvalidApprovalTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionExecutionOutput omitted. -/** - * deserializeAws_json1_1InvalidArnException - */ -const de_InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionExecutionResult omitted. -/** - * deserializeAws_json1_1InvalidBlockerDeclarationException - */ -const de_InvalidBlockerDeclarationException = ( - output: any, - context: __SerdeContext -): InvalidBlockerDeclarationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionNotFoundException omitted. /** - * deserializeAws_json1_1InvalidClientTokenException + * deserializeAws_json1_1ActionRevision */ -const de_InvalidClientTokenException = (output: any, context: __SerdeContext): InvalidClientTokenException => { - return { - message: __expectString(output.message), - } as any; +const de_ActionRevision = (output: any, context: __SerdeContext): ActionRevision => { + return take(output, { + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + revisionChangeId: __expectString, + revisionId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InvalidJobException + * deserializeAws_json1_1ActionState */ -const de_InvalidJobException = (output: any, context: __SerdeContext): InvalidJobException => { - return { - message: __expectString(output.message), - } as any; +const de_ActionState = (output: any, context: __SerdeContext): ActionState => { + return take(output, { + actionName: __expectString, + currentRevision: (_: any) => de_ActionRevision(_, context), + entityUrl: __expectString, + latestExecution: (_: any) => de_ActionExecution(_, context), + revisionUrl: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InvalidJobStateException + * deserializeAws_json1_1ActionStateList */ -const de_InvalidJobStateException = (output: any, context: __SerdeContext): InvalidJobStateException => { - return { - message: __expectString(output.message), - } as any; +const de_ActionStateList = (output: any, context: __SerdeContext): ActionState[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ActionState(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionType omitted. -/** - * deserializeAws_json1_1InvalidNonceException - */ -const de_InvalidNonceException = (output: any, context: __SerdeContext): InvalidNonceException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionTypeArtifactDetails omitted. -/** - * deserializeAws_json1_1InvalidStageDeclarationException - */ -const de_InvalidStageDeclarationException = ( - output: any, - context: __SerdeContext -): InvalidStageDeclarationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionTypeDeclaration omitted. -/** - * deserializeAws_json1_1InvalidStructureException - */ -const de_InvalidStructureException = (output: any, context: __SerdeContext): InvalidStructureException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionTypeExecutor omitted. -/** - * deserializeAws_json1_1InvalidTagsException - */ -const de_InvalidTagsException = (output: any, context: __SerdeContext): InvalidTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionTypeId omitted. -/** - * deserializeAws_json1_1InvalidWebhookAuthenticationParametersException - */ -const de_InvalidWebhookAuthenticationParametersException = ( - output: any, - context: __SerdeContext -): InvalidWebhookAuthenticationParametersException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionTypeIdentifier omitted. -/** - * deserializeAws_json1_1InvalidWebhookFilterPatternException - */ -const de_InvalidWebhookFilterPatternException = ( - output: any, - context: __SerdeContext -): InvalidWebhookFilterPatternException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActionTypeList omitted. -/** - * deserializeAws_json1_1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - accountId: __expectString(output.accountId), - data: output.data != null ? de_JobData(output.data, context) : undefined, - id: __expectString(output.id), - nonce: __expectString(output.nonce), - } as any; -}; +// de_ActionTypeNotFoundException omitted. -/** - * deserializeAws_json1_1JobData - */ -const de_JobData = (output: any, context: __SerdeContext): JobData => { - return { - actionConfiguration: - output.actionConfiguration != null ? de_ActionConfiguration(output.actionConfiguration, context) : undefined, - actionTypeId: output.actionTypeId != null ? de_ActionTypeId(output.actionTypeId, context) : undefined, - artifactCredentials: - output.artifactCredentials != null ? de_AWSSessionCredentials(output.artifactCredentials, context) : undefined, - continuationToken: __expectString(output.continuationToken), - encryptionKey: output.encryptionKey != null ? de_EncryptionKey(output.encryptionKey, context) : undefined, - inputArtifacts: output.inputArtifacts != null ? de_ArtifactList(output.inputArtifacts, context) : undefined, - outputArtifacts: output.outputArtifacts != null ? de_ArtifactList(output.outputArtifacts, context) : undefined, - pipelineContext: output.pipelineContext != null ? de_PipelineContext(output.pipelineContext, context) : undefined, - } as any; -}; +// de_ActionTypePermissions omitted. + +// de_ActionTypeProperties omitted. + +// de_ActionTypeProperty omitted. + +// de_ActionTypeSettings omitted. + +// de_ActionTypeUrls omitted. + +// de_AllowedAccounts omitted. + +// de_ApprovalAlreadyCompletedException omitted. + +// de_Artifact omitted. + +// de_ArtifactDetail omitted. + +// de_ArtifactDetailList omitted. + +// de_ArtifactDetails omitted. + +// de_ArtifactList omitted. + +// de_ArtifactLocation omitted. /** - * deserializeAws_json1_1JobDetails + * deserializeAws_json1_1ArtifactRevision */ -const de_JobDetails = (output: any, context: __SerdeContext): JobDetails => { - return { - accountId: __expectString(output.accountId), - data: output.data != null ? de_JobData(output.data, context) : undefined, - id: __expectString(output.id), - } as any; +const de_ArtifactRevision = (output: any, context: __SerdeContext): ArtifactRevision => { + return take(output, { + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + revisionChangeIdentifier: __expectString, + revisionId: __expectString, + revisionSummary: __expectString, + revisionUrl: __expectString, + }) as any; }; /** - * deserializeAws_json1_1JobList + * deserializeAws_json1_1ArtifactRevisionList */ -const de_JobList = (output: any, context: __SerdeContext): Job[] => { +const de_ArtifactRevisionList = (output: any, context: __SerdeContext): ArtifactRevision[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Job(entry, context); + return de_ArtifactRevision(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1JobNotFoundException - */ -const de_JobNotFoundException = (output: any, context: __SerdeContext): JobNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ArtifactStore omitted. -/** - * deserializeAws_json1_1JobWorkerExecutorConfiguration - */ -const de_JobWorkerExecutorConfiguration = (output: any, context: __SerdeContext): JobWorkerExecutorConfiguration => { - return { - pollingAccounts: - output.pollingAccounts != null ? de_PollingAccountList(output.pollingAccounts, context) : undefined, - pollingServicePrincipals: - output.pollingServicePrincipals != null - ? de_PollingServicePrincipalList(output.pollingServicePrincipals, context) - : undefined, - } as any; -}; +// de_ArtifactStoreMap omitted. -/** - * deserializeAws_json1_1LambdaExecutorConfiguration - */ -const de_LambdaExecutorConfiguration = (output: any, context: __SerdeContext): LambdaExecutorConfiguration => { - return { - lambdaFunctionArn: __expectString(output.lambdaFunctionArn), - } as any; -}; +// de_AWSSessionCredentials omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_BlockerDeclaration omitted. -/** - * deserializeAws_json1_1ListActionExecutionsOutput - */ -const de_ListActionExecutionsOutput = (output: any, context: __SerdeContext): ListActionExecutionsOutput => { - return { - actionExecutionDetails: - output.actionExecutionDetails != null - ? de_ActionExecutionDetailList(output.actionExecutionDetails, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1ListActionTypesOutput - */ -const de_ListActionTypesOutput = (output: any, context: __SerdeContext): ListActionTypesOutput => { - return { - actionTypes: output.actionTypes != null ? de_ActionTypeList(output.actionTypes, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1ListPipelineExecutionsOutput - */ -const de_ListPipelineExecutionsOutput = (output: any, context: __SerdeContext): ListPipelineExecutionsOutput => { - return { - nextToken: __expectString(output.nextToken), - pipelineExecutionSummaries: - output.pipelineExecutionSummaries != null - ? de_PipelineExecutionSummaryList(output.pipelineExecutionSummaries, context) - : undefined, - } as any; -}; +// de_CreateCustomActionTypeOutput omitted. -/** - * deserializeAws_json1_1ListPipelinesOutput - */ -const de_ListPipelinesOutput = (output: any, context: __SerdeContext): ListPipelinesOutput => { - return { - nextToken: __expectString(output.nextToken), - pipelines: output.pipelines != null ? de_PipelineList(output.pipelines, context) : undefined, - } as any; -}; +// de_CreatePipelineOutput omitted. -/** - * deserializeAws_json1_1ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_DeleteWebhookOutput omitted. -/** - * deserializeAws_json1_1ListWebhookItem - */ -const de_ListWebhookItem = (output: any, context: __SerdeContext): ListWebhookItem => { - return { - arn: __expectString(output.arn), - definition: output.definition != null ? de_WebhookDefinition(output.definition, context) : undefined, - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - lastTriggered: - output.lastTriggered != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastTriggered))) - : undefined, - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - url: __expectString(output.url), - } as any; -}; +// de_DeregisterWebhookWithThirdPartyOutput omitted. + +// de_DuplicatedStopRequestException omitted. + +// de_EncryptionKey omitted. + +// de_ErrorDetails omitted. + +// de_ExecutionTrigger omitted. + +// de_ExecutorConfiguration omitted. + +// de_GetActionTypeOutput omitted. + +// de_GetJobDetailsOutput omitted. /** - * deserializeAws_json1_1ListWebhooksOutput + * deserializeAws_json1_1GetPipelineExecutionOutput */ -const de_ListWebhooksOutput = (output: any, context: __SerdeContext): ListWebhooksOutput => { - return { - NextToken: __expectString(output.NextToken), - webhooks: output.webhooks != null ? de_WebhookList(output.webhooks, context) : undefined, - } as any; +const de_GetPipelineExecutionOutput = (output: any, context: __SerdeContext): GetPipelineExecutionOutput => { + return take(output, { + pipelineExecution: (_: any) => de_PipelineExecution(_, context), + }) as any; }; /** - * deserializeAws_json1_1NotLatestPipelineExecutionException + * deserializeAws_json1_1GetPipelineOutput */ -const de_NotLatestPipelineExecutionException = ( - output: any, - context: __SerdeContext -): NotLatestPipelineExecutionException => { - return { - message: __expectString(output.message), - } as any; +const de_GetPipelineOutput = (output: any, context: __SerdeContext): GetPipelineOutput => { + return take(output, { + metadata: (_: any) => de_PipelineMetadata(_, context), + pipeline: _json, + }) as any; }; /** - * deserializeAws_json1_1OutputArtifact + * deserializeAws_json1_1GetPipelineStateOutput */ -const de_OutputArtifact = (output: any, context: __SerdeContext): OutputArtifact => { - return { - name: __expectString(output.name), - } as any; +const de_GetPipelineStateOutput = (output: any, context: __SerdeContext): GetPipelineStateOutput => { + return take(output, { + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pipelineName: __expectString, + pipelineVersion: __expectInt32, + stageStates: (_: any) => de_StageStateList(_, context), + updated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_GetThirdPartyJobDetailsOutput omitted. + +// de_InputArtifact omitted. + +// de_InputArtifactList omitted. + +// de_InvalidActionDeclarationException omitted. + +// de_InvalidApprovalTokenException omitted. + +// de_InvalidArnException omitted. + +// de_InvalidBlockerDeclarationException omitted. + +// de_InvalidClientTokenException omitted. + +// de_InvalidJobException omitted. + +// de_InvalidJobStateException omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidNonceException omitted. + +// de_InvalidStageDeclarationException omitted. + +// de_InvalidStructureException omitted. + +// de_InvalidTagsException omitted. + +// de_InvalidWebhookAuthenticationParametersException omitted. + +// de_InvalidWebhookFilterPatternException omitted. + +// de_Job omitted. + +// de_JobData omitted. + +// de_JobDetails omitted. + +// de_JobList omitted. + +// de_JobNotFoundException omitted. + +// de_JobWorkerExecutorConfiguration omitted. + +// de_LambdaExecutorConfiguration omitted. + +// de_LimitExceededException omitted. + /** - * deserializeAws_json1_1OutputArtifactList + * deserializeAws_json1_1ListActionExecutionsOutput */ -const de_OutputArtifactList = (output: any, context: __SerdeContext): OutputArtifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputArtifact(entry, context); - }); - return retVal; +const de_ListActionExecutionsOutput = (output: any, context: __SerdeContext): ListActionExecutionsOutput => { + return take(output, { + actionExecutionDetails: (_: any) => de_ActionExecutionDetailList(_, context), + nextToken: __expectString, + }) as any; }; +// de_ListActionTypesOutput omitted. + /** - * deserializeAws_json1_1OutputVariablesMap + * deserializeAws_json1_1ListPipelineExecutionsOutput */ -const de_OutputVariablesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_ListPipelineExecutionsOutput = (output: any, context: __SerdeContext): ListPipelineExecutionsOutput => { + return take(output, { + nextToken: __expectString, + pipelineExecutionSummaries: (_: any) => de_PipelineExecutionSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1OutputVariablesSizeExceededException + * deserializeAws_json1_1ListPipelinesOutput */ -const de_OutputVariablesSizeExceededException = ( - output: any, - context: __SerdeContext -): OutputVariablesSizeExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ListPipelinesOutput = (output: any, context: __SerdeContext): ListPipelinesOutput => { + return take(output, { + nextToken: __expectString, + pipelines: (_: any) => de_PipelineList(_, context), + }) as any; }; +// de_ListTagsForResourceOutput omitted. + /** - * deserializeAws_json1_1PipelineContext + * deserializeAws_json1_1ListWebhookItem */ -const de_PipelineContext = (output: any, context: __SerdeContext): PipelineContext => { - return { - action: output.action != null ? de_ActionContext(output.action, context) : undefined, - pipelineArn: __expectString(output.pipelineArn), - pipelineExecutionId: __expectString(output.pipelineExecutionId), - pipelineName: __expectString(output.pipelineName), - stage: output.stage != null ? de_StageContext(output.stage, context) : undefined, - } as any; +const de_ListWebhookItem = (output: any, context: __SerdeContext): ListWebhookItem => { + return take(output, { + arn: __expectString, + definition: _json, + errorCode: __expectString, + errorMessage: __expectString, + lastTriggered: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + url: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineDeclaration + * deserializeAws_json1_1ListWebhooksOutput */ -const de_PipelineDeclaration = (output: any, context: __SerdeContext): PipelineDeclaration => { - return { - artifactStore: output.artifactStore != null ? de_ArtifactStore(output.artifactStore, context) : undefined, - artifactStores: output.artifactStores != null ? de_ArtifactStoreMap(output.artifactStores, context) : undefined, - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - stages: output.stages != null ? de_PipelineStageDeclarationList(output.stages, context) : undefined, - version: __expectInt32(output.version), - } as any; +const de_ListWebhooksOutput = (output: any, context: __SerdeContext): ListWebhooksOutput => { + return take(output, { + NextToken: __expectString, + webhooks: (_: any) => de_WebhookList(_, context), + }) as any; }; +// de_NotLatestPipelineExecutionException omitted. + +// de_OutputArtifact omitted. + +// de_OutputArtifactList omitted. + +// de_OutputVariablesMap omitted. + +// de_OutputVariablesSizeExceededException omitted. + +// de_PipelineContext omitted. + +// de_PipelineDeclaration omitted. + /** * deserializeAws_json1_1PipelineExecution */ const de_PipelineExecution = (output: any, context: __SerdeContext): PipelineExecution => { - return { - artifactRevisions: - output.artifactRevisions != null ? de_ArtifactRevisionList(output.artifactRevisions, context) : undefined, - pipelineExecutionId: __expectString(output.pipelineExecutionId), - pipelineName: __expectString(output.pipelineName), - pipelineVersion: __expectInt32(output.pipelineVersion), - status: __expectString(output.status), - statusSummary: __expectString(output.statusSummary), - } as any; + return take(output, { + artifactRevisions: (_: any) => de_ArtifactRevisionList(_, context), + pipelineExecutionId: __expectString, + pipelineName: __expectString, + pipelineVersion: __expectInt32, + status: __expectString, + statusSummary: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PipelineExecutionNotFoundException - */ -const de_PipelineExecutionNotFoundException = ( - output: any, - context: __SerdeContext -): PipelineExecutionNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineExecutionNotFoundException omitted. -/** - * deserializeAws_json1_1PipelineExecutionNotStoppableException - */ -const de_PipelineExecutionNotStoppableException = ( - output: any, - context: __SerdeContext -): PipelineExecutionNotStoppableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineExecutionNotStoppableException omitted. /** * deserializeAws_json1_1PipelineExecutionSummary */ const de_PipelineExecutionSummary = (output: any, context: __SerdeContext): PipelineExecutionSummary => { - return { - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - pipelineExecutionId: __expectString(output.pipelineExecutionId), - sourceRevisions: - output.sourceRevisions != null ? de_SourceRevisionList(output.sourceRevisions, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - stopTrigger: output.stopTrigger != null ? de_StopExecutionTrigger(output.stopTrigger, context) : undefined, - trigger: output.trigger != null ? de_ExecutionTrigger(output.trigger, context) : undefined, - } as any; + return take(output, { + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pipelineExecutionId: __expectString, + sourceRevisions: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopTrigger: _json, + trigger: _json, + }) as any; }; /** @@ -5749,9 +4040,6 @@ const de_PipelineExecutionSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PipelineExecutionSummary(entry, context); }); return retVal; @@ -5764,9 +4052,6 @@ const de_PipelineList = (output: any, context: __SerdeContext): PipelineSummary[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PipelineSummary(entry, context); }); return retVal; @@ -5776,338 +4061,104 @@ const de_PipelineList = (output: any, context: __SerdeContext): PipelineSummary[ * deserializeAws_json1_1PipelineMetadata */ const de_PipelineMetadata = (output: any, context: __SerdeContext): PipelineMetadata => { - return { - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - pipelineArn: __expectString(output.pipelineArn), - updated: - output.updated != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updated))) : undefined, - } as any; + return take(output, { + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pipelineArn: __expectString, + updated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1PipelineNameInUseException - */ -const de_PipelineNameInUseException = (output: any, context: __SerdeContext): PipelineNameInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineNameInUseException omitted. -/** - * deserializeAws_json1_1PipelineNotFoundException - */ -const de_PipelineNotFoundException = (output: any, context: __SerdeContext): PipelineNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineNotFoundException omitted. -/** - * deserializeAws_json1_1PipelineStageDeclarationList - */ -const de_PipelineStageDeclarationList = (output: any, context: __SerdeContext): StageDeclaration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StageDeclaration(entry, context); - }); - return retVal; -}; +// de_PipelineStageDeclarationList omitted. /** * deserializeAws_json1_1PipelineSummary */ const de_PipelineSummary = (output: any, context: __SerdeContext): PipelineSummary => { - return { - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - name: __expectString(output.name), - updated: - output.updated != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updated))) : undefined, - version: __expectInt32(output.version), - } as any; + return take(output, { + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + updated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + version: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_1PipelineVersionNotFoundException - */ -const de_PipelineVersionNotFoundException = ( - output: any, - context: __SerdeContext -): PipelineVersionNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineVersionNotFoundException omitted. -/** - * deserializeAws_json1_1PollForJobsOutput - */ -const de_PollForJobsOutput = (output: any, context: __SerdeContext): PollForJobsOutput => { - return { - jobs: output.jobs != null ? de_JobList(output.jobs, context) : undefined, - } as any; -}; +// de_PollForJobsOutput omitted. -/** - * deserializeAws_json1_1PollForThirdPartyJobsOutput - */ -const de_PollForThirdPartyJobsOutput = (output: any, context: __SerdeContext): PollForThirdPartyJobsOutput => { - return { - jobs: output.jobs != null ? de_ThirdPartyJobList(output.jobs, context) : undefined, - } as any; -}; +// de_PollForThirdPartyJobsOutput omitted. -/** - * deserializeAws_json1_1PollingAccountList - */ -const de_PollingAccountList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PollingAccountList omitted. -/** - * deserializeAws_json1_1PollingServicePrincipalList - */ -const de_PollingServicePrincipalList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PollingServicePrincipalList omitted. -/** - * deserializeAws_json1_1PutActionRevisionOutput - */ -const de_PutActionRevisionOutput = (output: any, context: __SerdeContext): PutActionRevisionOutput => { - return { - newRevision: __expectBoolean(output.newRevision), - pipelineExecutionId: __expectString(output.pipelineExecutionId), - } as any; -}; +// de_PutActionRevisionOutput omitted. /** * deserializeAws_json1_1PutApprovalResultOutput */ const de_PutApprovalResultOutput = (output: any, context: __SerdeContext): PutApprovalResultOutput => { - return { - approvedAt: - output.approvedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.approvedAt))) : undefined, - } as any; + return take(output, { + approvedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1PutWebhookOutput */ const de_PutWebhookOutput = (output: any, context: __SerdeContext): PutWebhookOutput => { - return { - webhook: output.webhook != null ? de_ListWebhookItem(output.webhook, context) : undefined, - } as any; + return take(output, { + webhook: (_: any) => de_ListWebhookItem(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RegisterWebhookWithThirdPartyOutput - */ -const de_RegisterWebhookWithThirdPartyOutput = ( - output: any, - context: __SerdeContext -): RegisterWebhookWithThirdPartyOutput => { - return {} as any; -}; +// de_RegisterWebhookWithThirdPartyOutput omitted. -/** - * deserializeAws_json1_1RequestFailedException - */ -const de_RequestFailedException = (output: any, context: __SerdeContext): RequestFailedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RequestFailedException omitted. -/** - * deserializeAws_json1_1ResolvedActionConfigurationMap - */ -const de_ResolvedActionConfigurationMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ResolvedActionConfigurationMap omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1RetryStageExecutionOutput - */ -const de_RetryStageExecutionOutput = (output: any, context: __SerdeContext): RetryStageExecutionOutput => { - return { - pipelineExecutionId: __expectString(output.pipelineExecutionId), - } as any; -}; +// de_RetryStageExecutionOutput omitted. -/** - * deserializeAws_json1_1S3ArtifactLocation - */ -const de_S3ArtifactLocation = (output: any, context: __SerdeContext): S3ArtifactLocation => { - return { - bucketName: __expectString(output.bucketName), - objectKey: __expectString(output.objectKey), - } as any; -}; +// de_S3ArtifactLocation omitted. -/** - * deserializeAws_json1_1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_json1_1SourceRevision - */ -const de_SourceRevision = (output: any, context: __SerdeContext): SourceRevision => { - return { - actionName: __expectString(output.actionName), - revisionId: __expectString(output.revisionId), - revisionSummary: __expectString(output.revisionSummary), - revisionUrl: __expectString(output.revisionUrl), - } as any; -}; +// de_SourceRevision omitted. -/** - * deserializeAws_json1_1SourceRevisionList - */ -const de_SourceRevisionList = (output: any, context: __SerdeContext): SourceRevision[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceRevision(entry, context); - }); - return retVal; -}; +// de_SourceRevisionList omitted. -/** - * deserializeAws_json1_1StageActionDeclarationList - */ -const de_StageActionDeclarationList = (output: any, context: __SerdeContext): ActionDeclaration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionDeclaration(entry, context); - }); - return retVal; -}; +// de_StageActionDeclarationList omitted. -/** - * deserializeAws_json1_1StageBlockerDeclarationList - */ -const de_StageBlockerDeclarationList = (output: any, context: __SerdeContext): BlockerDeclaration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BlockerDeclaration(entry, context); - }); - return retVal; -}; +// de_StageBlockerDeclarationList omitted. -/** - * deserializeAws_json1_1StageContext - */ -const de_StageContext = (output: any, context: __SerdeContext): StageContext => { - return { - name: __expectString(output.name), - } as any; -}; +// de_StageContext omitted. -/** - * deserializeAws_json1_1StageDeclaration - */ -const de_StageDeclaration = (output: any, context: __SerdeContext): StageDeclaration => { - return { - actions: output.actions != null ? de_StageActionDeclarationList(output.actions, context) : undefined, - blockers: output.blockers != null ? de_StageBlockerDeclarationList(output.blockers, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_StageDeclaration omitted. -/** - * deserializeAws_json1_1StageExecution - */ -const de_StageExecution = (output: any, context: __SerdeContext): StageExecution => { - return { - pipelineExecutionId: __expectString(output.pipelineExecutionId), - status: __expectString(output.status), - } as any; -}; +// de_StageExecution omitted. -/** - * deserializeAws_json1_1StageNotFoundException - */ -const de_StageNotFoundException = (output: any, context: __SerdeContext): StageNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StageNotFoundException omitted. -/** - * deserializeAws_json1_1StageNotRetryableException - */ -const de_StageNotRetryableException = (output: any, context: __SerdeContext): StageNotRetryableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StageNotRetryableException omitted. /** * deserializeAws_json1_1StageState */ const de_StageState = (output: any, context: __SerdeContext): StageState => { - return { - actionStates: output.actionStates != null ? de_ActionStateList(output.actionStates, context) : undefined, - inboundExecution: output.inboundExecution != null ? de_StageExecution(output.inboundExecution, context) : undefined, - inboundTransitionState: - output.inboundTransitionState != null ? de_TransitionState(output.inboundTransitionState, context) : undefined, - latestExecution: output.latestExecution != null ? de_StageExecution(output.latestExecution, context) : undefined, - stageName: __expectString(output.stageName), - } as any; + return take(output, { + actionStates: (_: any) => de_ActionStateList(_, context), + inboundExecution: _json, + inboundTransitionState: (_: any) => de_TransitionState(_, context), + latestExecution: _json, + stageName: __expectString, + }) as any; }; /** @@ -6117,227 +4168,58 @@ const de_StageStateList = (output: any, context: __SerdeContext): StageState[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StageState(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartPipelineExecutionOutput - */ -const de_StartPipelineExecutionOutput = (output: any, context: __SerdeContext): StartPipelineExecutionOutput => { - return { - pipelineExecutionId: __expectString(output.pipelineExecutionId), - } as any; -}; +// de_StartPipelineExecutionOutput omitted. -/** - * deserializeAws_json1_1StopExecutionTrigger - */ -const de_StopExecutionTrigger = (output: any, context: __SerdeContext): StopExecutionTrigger => { - return { - reason: __expectString(output.reason), - } as any; -}; +// de_StopExecutionTrigger omitted. -/** - * deserializeAws_json1_1StopPipelineExecutionOutput - */ -const de_StopPipelineExecutionOutput = (output: any, context: __SerdeContext): StopPipelineExecutionOutput => { - return { - pipelineExecutionId: __expectString(output.pipelineExecutionId), - } as any; -}; +// de_StopPipelineExecutionOutput omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_1ThirdPartyJob - */ -const de_ThirdPartyJob = (output: any, context: __SerdeContext): ThirdPartyJob => { - return { - clientId: __expectString(output.clientId), - jobId: __expectString(output.jobId), - } as any; -}; +// de_ThirdPartyJob omitted. -/** - * deserializeAws_json1_1ThirdPartyJobData - */ -const de_ThirdPartyJobData = (output: any, context: __SerdeContext): ThirdPartyJobData => { - return { - actionConfiguration: - output.actionConfiguration != null ? de_ActionConfiguration(output.actionConfiguration, context) : undefined, - actionTypeId: output.actionTypeId != null ? de_ActionTypeId(output.actionTypeId, context) : undefined, - artifactCredentials: - output.artifactCredentials != null ? de_AWSSessionCredentials(output.artifactCredentials, context) : undefined, - continuationToken: __expectString(output.continuationToken), - encryptionKey: output.encryptionKey != null ? de_EncryptionKey(output.encryptionKey, context) : undefined, - inputArtifacts: output.inputArtifacts != null ? de_ArtifactList(output.inputArtifacts, context) : undefined, - outputArtifacts: output.outputArtifacts != null ? de_ArtifactList(output.outputArtifacts, context) : undefined, - pipelineContext: output.pipelineContext != null ? de_PipelineContext(output.pipelineContext, context) : undefined, - } as any; -}; +// de_ThirdPartyJobData omitted. -/** - * deserializeAws_json1_1ThirdPartyJobDetails - */ -const de_ThirdPartyJobDetails = (output: any, context: __SerdeContext): ThirdPartyJobDetails => { - return { - data: output.data != null ? de_ThirdPartyJobData(output.data, context) : undefined, - id: __expectString(output.id), - nonce: __expectString(output.nonce), - } as any; -}; +// de_ThirdPartyJobDetails omitted. -/** - * deserializeAws_json1_1ThirdPartyJobList - */ -const de_ThirdPartyJobList = (output: any, context: __SerdeContext): ThirdPartyJob[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThirdPartyJob(entry, context); - }); - return retVal; -}; +// de_ThirdPartyJobList omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. /** * deserializeAws_json1_1TransitionState */ const de_TransitionState = (output: any, context: __SerdeContext): TransitionState => { - return { - disabledReason: __expectString(output.disabledReason), - enabled: __expectBoolean(output.enabled), - lastChangedAt: - output.lastChangedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastChangedAt))) - : undefined, - lastChangedBy: __expectString(output.lastChangedBy), - } as any; + return take(output, { + disabledReason: __expectString, + enabled: __expectBoolean, + lastChangedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastChangedBy: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_UntagResourceOutput omitted. -/** - * deserializeAws_json1_1UpdatePipelineOutput - */ -const de_UpdatePipelineOutput = (output: any, context: __SerdeContext): UpdatePipelineOutput => { - return { - pipeline: output.pipeline != null ? de_PipelineDeclaration(output.pipeline, context) : undefined, - } as any; -}; +// de_UpdatePipelineOutput omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1WebhookAuthConfiguration - */ -const de_WebhookAuthConfiguration = (output: any, context: __SerdeContext): WebhookAuthConfiguration => { - return { - AllowedIPRange: __expectString(output.AllowedIPRange), - SecretToken: __expectString(output.SecretToken), - } as any; -}; +// de_WebhookAuthConfiguration omitted. -/** - * deserializeAws_json1_1WebhookDefinition - */ -const de_WebhookDefinition = (output: any, context: __SerdeContext): WebhookDefinition => { - return { - authentication: __expectString(output.authentication), - authenticationConfiguration: - output.authenticationConfiguration != null - ? de_WebhookAuthConfiguration(output.authenticationConfiguration, context) - : undefined, - filters: output.filters != null ? de_WebhookFilters(output.filters, context) : undefined, - name: __expectString(output.name), - targetAction: __expectString(output.targetAction), - targetPipeline: __expectString(output.targetPipeline), - } as any; -}; +// de_WebhookDefinition omitted. -/** - * deserializeAws_json1_1WebhookFilterRule - */ -const de_WebhookFilterRule = (output: any, context: __SerdeContext): WebhookFilterRule => { - return { - jsonPath: __expectString(output.jsonPath), - matchEquals: __expectString(output.matchEquals), - } as any; -}; +// de_WebhookFilterRule omitted. -/** - * deserializeAws_json1_1WebhookFilters - */ -const de_WebhookFilters = (output: any, context: __SerdeContext): WebhookFilterRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WebhookFilterRule(entry, context); - }); - return retVal; -}; +// de_WebhookFilters omitted. /** * deserializeAws_json1_1WebhookList @@ -6346,20 +4228,12 @@ const de_WebhookList = (output: any, context: __SerdeContext): ListWebhookItem[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListWebhookItem(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1WebhookNotFoundException - */ -const de_WebhookNotFoundException = (output: any, context: __SerdeContext): WebhookNotFoundException => { - return {} as any; -}; +// de_WebhookNotFoundException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -6381,6 +4255,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-codestar-connections/src/protocols/Aws_json1_0.ts b/clients/client-codestar-connections/src/protocols/Aws_json1_0.ts index 777f5236f499..636aef39c8a5 100644 --- a/clients/client-codestar-connections/src/protocols/Aws_json1_0.ts +++ b/clients/client-codestar-connections/src/protocols/Aws_json1_0.ts @@ -1,9 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -30,37 +30,23 @@ import { UpdateHostCommandInput, UpdateHostCommandOutput } from "../commands/Upd import { CodeStarConnectionsServiceException as __BaseException } from "../models/CodeStarConnectionsServiceException"; import { ConflictException, - Connection, CreateConnectionInput, - CreateConnectionOutput, CreateHostInput, - CreateHostOutput, DeleteConnectionInput, - DeleteConnectionOutput, DeleteHostInput, - DeleteHostOutput, GetConnectionInput, - GetConnectionOutput, GetHostInput, - GetHostOutput, - Host, LimitExceededException, ListConnectionsInput, - ListConnectionsOutput, ListHostsInput, - ListHostsOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, ResourceNotFoundException, ResourceUnavailableException, Tag, TagResourceInput, - TagResourceOutput, UnsupportedOperationException, UntagResourceInput, - UntagResourceOutput, UpdateHostInput, - UpdateHostOutput, VpcConfiguration, } from "../models/models_0"; @@ -73,7 +59,7 @@ export const se_CreateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnection"); let body: any; - body = JSON.stringify(se_CreateConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -86,7 +72,7 @@ export const se_CreateHostCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHost"); let body: any; - body = JSON.stringify(se_CreateHostInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -99,7 +85,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -112,7 +98,7 @@ export const se_DeleteHostCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHost"); let body: any; - body = JSON.stringify(se_DeleteHostInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -125,7 +111,7 @@ export const se_GetConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConnection"); let body: any; - body = JSON.stringify(se_GetConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -138,7 +124,7 @@ export const se_GetHostCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetHost"); let body: any; - body = JSON.stringify(se_GetHostInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -151,7 +137,7 @@ export const se_ListConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConnections"); let body: any; - body = JSON.stringify(se_ListConnectionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -164,7 +150,7 @@ export const se_ListHostsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHosts"); let body: any; - body = JSON.stringify(se_ListHostsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -177,7 +163,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -190,7 +176,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -203,7 +189,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -216,7 +202,7 @@ export const se_UpdateHostCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateHost"); let body: any; - body = JSON.stringify(se_UpdateHostInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -232,12 +218,12 @@ export const de_CreateConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConnectionOutput(data, context); + contents = _json(data); const response: CreateConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -264,10 +250,9 @@ const de_CreateConnectionCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -285,12 +270,12 @@ export const de_CreateHostCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHostOutput(data, context); + contents = _json(data); const response: CreateHostCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -311,10 +296,9 @@ const de_CreateHostCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -332,12 +316,12 @@ export const de_DeleteConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConnectionOutput(data, context); + contents = _json(data); const response: DeleteConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -358,10 +342,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -379,12 +362,12 @@ export const de_DeleteHostCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHostOutput(data, context); + contents = _json(data); const response: DeleteHostCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -408,10 +391,9 @@ const de_DeleteHostCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -429,12 +411,12 @@ export const de_GetConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetConnectionOutput(data, context); + contents = _json(data); const response: GetConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -458,10 +440,9 @@ const de_GetConnectionCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -479,12 +460,12 @@ export const de_GetHostCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetHostOutput(data, context); + contents = _json(data); const response: GetHostCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -508,10 +489,9 @@ const de_GetHostCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -529,12 +509,12 @@ export const de_ListConnectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListConnectionsOutput(data, context); + contents = _json(data); const response: ListConnectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -550,10 +530,9 @@ const de_ListConnectionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -570,12 +549,12 @@ export const de_ListHostsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListHostsOutput(data, context); + contents = _json(data); const response: ListHostsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -591,10 +570,9 @@ const de_ListHostsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -611,12 +589,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -637,10 +615,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -658,12 +635,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -687,10 +664,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -708,12 +684,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -734,10 +710,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -755,12 +730,12 @@ export const de_UpdateHostCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHostOutput(data, context); + contents = _json(data); const response: UpdateHostCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -790,10 +765,9 @@ const de_UpdateHostCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -804,7 +778,7 @@ const de_UpdateHostCommandError = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -820,7 +794,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -836,7 +810,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -852,7 +826,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -868,7 +842,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -876,474 +850,93 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0CreateConnectionInput - */ -const se_CreateConnectionInput = (input: CreateConnectionInput, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.HostArn != null && { HostArn: input.HostArn }), - ...(input.ProviderType != null && { ProviderType: input.ProviderType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateConnectionInput omitted. -/** - * serializeAws_json1_0CreateHostInput - */ -const se_CreateHostInput = (input: CreateHostInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ProviderEndpoint != null && { ProviderEndpoint: input.ProviderEndpoint }), - ...(input.ProviderType != null && { ProviderType: input.ProviderType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; +// se_CreateHostInput omitted. -/** - * serializeAws_json1_0DeleteConnectionInput - */ -const se_DeleteConnectionInput = (input: DeleteConnectionInput, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - }; -}; +// se_DeleteConnectionInput omitted. -/** - * serializeAws_json1_0DeleteHostInput - */ -const se_DeleteHostInput = (input: DeleteHostInput, context: __SerdeContext): any => { - return { - ...(input.HostArn != null && { HostArn: input.HostArn }), - }; -}; +// se_DeleteHostInput omitted. -/** - * serializeAws_json1_0GetConnectionInput - */ -const se_GetConnectionInput = (input: GetConnectionInput, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - }; -}; +// se_GetConnectionInput omitted. -/** - * serializeAws_json1_0GetHostInput - */ -const se_GetHostInput = (input: GetHostInput, context: __SerdeContext): any => { - return { - ...(input.HostArn != null && { HostArn: input.HostArn }), - }; -}; +// se_GetHostInput omitted. -/** - * serializeAws_json1_0ListConnectionsInput - */ -const se_ListConnectionsInput = (input: ListConnectionsInput, context: __SerdeContext): any => { - return { - ...(input.HostArnFilter != null && { HostArnFilter: input.HostArnFilter }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProviderTypeFilter != null && { ProviderTypeFilter: input.ProviderTypeFilter }), - }; -}; +// se_ListConnectionsInput omitted. -/** - * serializeAws_json1_0ListHostsInput - */ -const se_ListHostsInput = (input: ListHostsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHostsInput omitted. -/** - * serializeAws_json1_0ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_0SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_json1_0SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceInput omitted. -/** - * serializeAws_json1_0UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceInput omitted. -/** - * serializeAws_json1_0UpdateHostInput - */ -const se_UpdateHostInput = (input: UpdateHostInput, context: __SerdeContext): any => { - return { - ...(input.HostArn != null && { HostArn: input.HostArn }), - ...(input.ProviderEndpoint != null && { ProviderEndpoint: input.ProviderEndpoint }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; +// se_UpdateHostInput omitted. -/** - * serializeAws_json1_0VpcConfiguration - */ -const se_VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.TlsCertificate != null && { TlsCertificate: input.TlsCertificate }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_VpcConfiguration omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0Connection - */ -const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionName: __expectString(output.ConnectionName), - ConnectionStatus: __expectString(output.ConnectionStatus), - HostArn: __expectString(output.HostArn), - OwnerAccountId: __expectString(output.OwnerAccountId), - ProviderType: __expectString(output.ProviderType), - } as any; -}; +// de_Connection omitted. -/** - * deserializeAws_json1_0ConnectionList - */ -const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connection(entry, context); - }); - return retVal; -}; +// de_ConnectionList omitted. -/** - * deserializeAws_json1_0CreateConnectionOutput - */ -const de_CreateConnectionOutput = (output: any, context: __SerdeContext): CreateConnectionOutput => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_CreateConnectionOutput omitted. -/** - * deserializeAws_json1_0CreateHostOutput - */ -const de_CreateHostOutput = (output: any, context: __SerdeContext): CreateHostOutput => { - return { - HostArn: __expectString(output.HostArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_CreateHostOutput omitted. -/** - * deserializeAws_json1_0DeleteConnectionOutput - */ -const de_DeleteConnectionOutput = (output: any, context: __SerdeContext): DeleteConnectionOutput => { - return {} as any; -}; +// de_DeleteConnectionOutput omitted. -/** - * deserializeAws_json1_0DeleteHostOutput - */ -const de_DeleteHostOutput = (output: any, context: __SerdeContext): DeleteHostOutput => { - return {} as any; -}; +// de_DeleteHostOutput omitted. -/** - * deserializeAws_json1_0GetConnectionOutput - */ -const de_GetConnectionOutput = (output: any, context: __SerdeContext): GetConnectionOutput => { - return { - Connection: output.Connection != null ? de_Connection(output.Connection, context) : undefined, - } as any; -}; +// de_GetConnectionOutput omitted. -/** - * deserializeAws_json1_0GetHostOutput - */ -const de_GetHostOutput = (output: any, context: __SerdeContext): GetHostOutput => { - return { - Name: __expectString(output.Name), - ProviderEndpoint: __expectString(output.ProviderEndpoint), - ProviderType: __expectString(output.ProviderType), - Status: __expectString(output.Status), - VpcConfiguration: - output.VpcConfiguration != null ? de_VpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; +// de_GetHostOutput omitted. -/** - * deserializeAws_json1_0Host - */ -const de_Host = (output: any, context: __SerdeContext): Host => { - return { - HostArn: __expectString(output.HostArn), - Name: __expectString(output.Name), - ProviderEndpoint: __expectString(output.ProviderEndpoint), - ProviderType: __expectString(output.ProviderType), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - VpcConfiguration: - output.VpcConfiguration != null ? de_VpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; +// de_Host omitted. -/** - * deserializeAws_json1_0HostList - */ -const de_HostList = (output: any, context: __SerdeContext): Host[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Host(entry, context); - }); - return retVal; -}; +// de_HostList omitted. -/** - * deserializeAws_json1_0LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_0ListConnectionsOutput - */ -const de_ListConnectionsOutput = (output: any, context: __SerdeContext): ListConnectionsOutput => { - return { - Connections: output.Connections != null ? de_ConnectionList(output.Connections, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListConnectionsOutput omitted. -/** - * deserializeAws_json1_0ListHostsOutput - */ -const de_ListHostsOutput = (output: any, context: __SerdeContext): ListHostsOutput => { - return { - Hosts: output.Hosts != null ? de_HostList(output.Hosts, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListHostsOutput omitted. -/** - * deserializeAws_json1_0ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceOutput omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceUnavailableException omitted. -/** - * deserializeAws_json1_0SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_json1_0SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_0UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedOperationException omitted. -/** - * deserializeAws_json1_0UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_UntagResourceOutput omitted. -/** - * deserializeAws_json1_0UpdateHostOutput - */ -const de_UpdateHostOutput = (output: any, context: __SerdeContext): UpdateHostOutput => { - return {} as any; -}; +// de_UpdateHostOutput omitted. -/** - * deserializeAws_json1_0VpcConfiguration - */ -const de_VpcConfiguration = (output: any, context: __SerdeContext): VpcConfiguration => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - TlsCertificate: __expectString(output.TlsCertificate), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_VpcConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1365,6 +958,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-codestar-notifications/src/protocols/Aws_restJson1.ts b/clients/client-codestar-notifications/src/protocols/Aws_restJson1.ts index 2ee8869e59eb..c0f0ff7b0e96 100644 --- a/clients/client-codestar-notifications/src/protocols/Aws_restJson1.ts +++ b/clients/client-codestar-notifications/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -55,17 +57,14 @@ import { AccessDeniedException, ConcurrentModificationException, ConfigurationException, - EventTypeSummary, InvalidNextTokenException, LimitExceededException, ListEventTypesFilter, ListNotificationRulesFilter, ListTargetsFilter, - NotificationRuleSummary, ResourceAlreadyExistsException, ResourceNotFoundException, Target, - TargetSummary, ValidationException, } from "../models/models_0"; @@ -83,16 +82,18 @@ export const se_CreateNotificationRuleCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createNotificationRule"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.EventTypeIds != null && { EventTypeIds: se_EventTypeIds(input.EventTypeIds, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Resource != null && { Resource: input.Resource }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DetailType: [], + EventTypeIds: (_) => _json(_), + Name: [], + Resource: [], + Status: [], + Tags: (_) => _json(_), + Targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -118,9 +119,11 @@ export const se_DeleteNotificationRuleCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteNotificationRule"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -145,10 +148,12 @@ export const se_DeleteTargetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteTarget"; let body: any; - body = JSON.stringify({ - ...(input.ForceUnsubscribeAll != null && { ForceUnsubscribeAll: input.ForceUnsubscribeAll }), - ...(input.TargetAddress != null && { TargetAddress: input.TargetAddress }), - }); + body = JSON.stringify( + take(input, { + ForceUnsubscribeAll: [], + TargetAddress: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -174,9 +179,11 @@ export const se_DescribeNotificationRuleCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeNotificationRule"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -201,11 +208,13 @@ export const se_ListEventTypesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listEventTypes"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_ListEventTypesFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -230,11 +239,13 @@ export const se_ListNotificationRulesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listNotificationRules"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_ListNotificationRulesFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -259,9 +270,11 @@ export const se_ListTagsForResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTagsForResource"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -286,11 +299,13 @@ export const se_ListTargetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTargets"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_ListTargetsFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -315,11 +330,13 @@ export const se_SubscribeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscribe"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Target != null && { Target: se_Target(input.Target, context) }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + ClientRequestToken: [], + Target: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -344,10 +361,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagResource"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -372,10 +391,12 @@ export const se_UnsubscribeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/unsubscribe"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.TargetAddress != null && { TargetAddress: input.TargetAddress }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + TargetAddress: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -431,14 +452,16 @@ export const se_UpdateNotificationRuleCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateNotificationRule"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.EventTypeIds != null && { EventTypeIds: se_EventTypeIds(input.EventTypeIds, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + DetailType: [], + EventTypeIds: (_) => _json(_), + Name: [], + Status: [], + Targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -464,9 +487,10 @@ export const de_CreateNotificationRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -503,10 +527,9 @@ const de_CreateNotificationRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -526,9 +549,10 @@ export const de_DeleteNotificationRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -556,10 +580,9 @@ const de_DeleteNotificationRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -600,10 +623,9 @@ const de_DeleteTargetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -623,39 +645,20 @@ export const de_DescribeNotificationRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.CreatedTimestamp != null) { - contents.CreatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTimestamp))); - } - if (data.DetailType != null) { - contents.DetailType = __expectString(data.DetailType); - } - if (data.EventTypes != null) { - contents.EventTypes = de_EventTypeBatch(data.EventTypes, context); - } - if (data.LastModifiedTimestamp != null) { - contents.LastModifiedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTimestamp))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Resource != null) { - contents.Resource = __expectString(data.Resource); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.Targets != null) { - contents.Targets = de_TargetsBatch(data.Targets, context); - } + const doc = take(data, { + Arn: __expectString, + CreatedBy: __expectString, + CreatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DetailType: __expectString, + EventTypes: _json, + LastModifiedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Resource: __expectString, + Status: __expectString, + Tags: _json, + Targets: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -680,10 +683,9 @@ const de_DescribeNotificationRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -703,12 +705,11 @@ export const de_ListEventTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventTypes != null) { - contents.EventTypes = de_EventTypeBatch(data.EventTypes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EventTypes: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -733,10 +734,9 @@ const de_ListEventTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -756,12 +756,11 @@ export const de_ListNotificationRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.NotificationRules != null) { - contents.NotificationRules = de_NotificationRuleBatch(data.NotificationRules, context); - } + const doc = take(data, { + NextToken: __expectString, + NotificationRules: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -786,10 +785,9 @@ const de_ListNotificationRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -809,9 +807,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -836,10 +835,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -859,12 +857,11 @@ export const de_ListTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Targets != null) { - contents.Targets = de_TargetsBatch(data.Targets, context); - } + const doc = take(data, { + NextToken: __expectString, + Targets: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -889,10 +886,9 @@ const de_ListTargetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -912,9 +908,10 @@ export const de_SubscribeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -942,10 +939,9 @@ const de_SubscribeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -965,9 +961,10 @@ export const de_TagResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -998,10 +995,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1021,9 +1017,10 @@ export const de_UnsubscribeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1045,10 +1042,9 @@ const de_UnsubscribeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1098,10 +1094,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1148,16 +1143,15 @@ const de_UpdateNotificationRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1167,9 +1161,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1186,9 +1181,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1205,9 +1201,10 @@ const de_ConfigurationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1224,9 +1221,10 @@ const de_InvalidNextTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1243,9 +1241,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1262,9 +1261,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1281,9 +1281,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1297,9 +1298,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1307,204 +1309,39 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1EventTypeIds - */ -const se_EventTypeIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypeIds omitted. -/** - * serializeAws_restJson1ListEventTypesFilter - */ -const se_ListEventTypesFilter = (input: ListEventTypesFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ListEventTypesFilter omitted. -/** - * serializeAws_restJson1ListEventTypesFilters - */ -const se_ListEventTypesFilters = (input: ListEventTypesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListEventTypesFilter(entry, context); - }); -}; +// se_ListEventTypesFilters omitted. -/** - * serializeAws_restJson1ListNotificationRulesFilter - */ -const se_ListNotificationRulesFilter = (input: ListNotificationRulesFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ListNotificationRulesFilter omitted. -/** - * serializeAws_restJson1ListNotificationRulesFilters - */ -const se_ListNotificationRulesFilters = (input: ListNotificationRulesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListNotificationRulesFilter(entry, context); - }); -}; +// se_ListNotificationRulesFilters omitted. -/** - * serializeAws_restJson1ListTargetsFilter - */ -const se_ListTargetsFilter = (input: ListTargetsFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ListTargetsFilter omitted. -/** - * serializeAws_restJson1ListTargetsFilters - */ -const se_ListTargetsFilters = (input: ListTargetsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListTargetsFilter(entry, context); - }); -}; +// se_ListTargetsFilters omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.TargetAddress != null && { TargetAddress: input.TargetAddress }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - }; -}; +// se_Target omitted. -/** - * serializeAws_restJson1Targets - */ -const se_Targets = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; +// se_Targets omitted. -/** - * deserializeAws_restJson1EventTypeBatch - */ -const de_EventTypeBatch = (output: any, context: __SerdeContext): EventTypeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventTypeSummary(entry, context); - }); - return retVal; -}; +// de_EventTypeBatch omitted. -/** - * deserializeAws_restJson1EventTypeSummary - */ -const de_EventTypeSummary = (output: any, context: __SerdeContext): EventTypeSummary => { - return { - EventTypeId: __expectString(output.EventTypeId), - EventTypeName: __expectString(output.EventTypeName), - ResourceType: __expectString(output.ResourceType), - ServiceName: __expectString(output.ServiceName), - } as any; -}; +// de_EventTypeSummary omitted. -/** - * deserializeAws_restJson1NotificationRuleBatch - */ -const de_NotificationRuleBatch = (output: any, context: __SerdeContext): NotificationRuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotificationRuleSummary(entry, context); - }); - return retVal; -}; +// de_NotificationRuleBatch omitted. -/** - * deserializeAws_restJson1NotificationRuleSummary - */ -const de_NotificationRuleSummary = (output: any, context: __SerdeContext): NotificationRuleSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; -}; +// de_NotificationRuleSummary omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1TargetsBatch - */ -const de_TargetsBatch = (output: any, context: __SerdeContext): TargetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetSummary(entry, context); - }); - return retVal; -}; +// de_TargetsBatch omitted. -/** - * deserializeAws_restJson1TargetSummary - */ -const de_TargetSummary = (output: any, context: __SerdeContext): TargetSummary => { - return { - TargetAddress: __expectString(output.TargetAddress), - TargetStatus: __expectString(output.TargetStatus), - TargetType: __expectString(output.TargetType), - } as any; -}; +// de_TargetSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-codestar/src/protocols/Aws_json1_1.ts b/clients/client-codestar/src/protocols/Aws_json1_1.ts index a775ef9f5816..8b25cd25c398 100644 --- a/clients/client-codestar/src/protocols/Aws_json1_1.ts +++ b/clients/client-codestar/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -46,66 +47,47 @@ import { UpdateUserProfileCommandInput, UpdateUserProfileCommandOutput } from ". import { CodeStarServiceException as __BaseException } from "../models/CodeStarServiceException"; import { AssociateTeamMemberRequest, - AssociateTeamMemberResult, Code, CodeCommitCodeDestination, CodeDestination, CodeSource, ConcurrentModificationException, CreateProjectRequest, - CreateProjectResult, CreateUserProfileRequest, CreateUserProfileResult, DeleteProjectRequest, - DeleteProjectResult, DeleteUserProfileRequest, - DeleteUserProfileResult, DescribeProjectRequest, DescribeProjectResult, DescribeUserProfileRequest, DescribeUserProfileResult, DisassociateTeamMemberRequest, - DisassociateTeamMemberResult, GitHubCodeDestination, InvalidNextTokenException, InvalidServiceRoleException, LimitExceededException, ListProjectsRequest, - ListProjectsResult, ListResourcesRequest, - ListResourcesResult, ListTagsForProjectRequest, - ListTagsForProjectResult, ListTeamMembersRequest, - ListTeamMembersResult, ListUserProfilesRequest, - ListUserProfilesResult, ProjectAlreadyExistsException, ProjectConfigurationException, ProjectCreationFailedException, ProjectNotFoundException, - ProjectStatus, - ProjectSummary, - Resource, S3Location, TagProjectRequest, - TagProjectResult, - TeamMember, TeamMemberAlreadyAssociatedException, TeamMemberNotFoundException, Toolchain, ToolchainSource, UntagProjectRequest, - UntagProjectResult, UpdateProjectRequest, - UpdateProjectResult, UpdateTeamMemberRequest, - UpdateTeamMemberResult, UpdateUserProfileRequest, UpdateUserProfileResult, UserProfileAlreadyExistsException, UserProfileNotFoundException, - UserProfileSummary, ValidationException, } from "../models/models_0"; @@ -118,7 +100,7 @@ export const se_AssociateTeamMemberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateTeamMember"); let body: any; - body = JSON.stringify(se_AssociateTeamMemberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -131,7 +113,7 @@ export const se_CreateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProject"); let body: any; - body = JSON.stringify(se_CreateProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -144,7 +126,7 @@ export const se_CreateUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserProfile"); let body: any; - body = JSON.stringify(se_CreateUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -157,7 +139,7 @@ export const se_DeleteProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProject"); let body: any; - body = JSON.stringify(se_DeleteProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -170,7 +152,7 @@ export const se_DeleteUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserProfile"); let body: any; - body = JSON.stringify(se_DeleteUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -183,7 +165,7 @@ export const se_DescribeProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProject"); let body: any; - body = JSON.stringify(se_DescribeProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -196,7 +178,7 @@ export const se_DescribeUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserProfile"); let body: any; - body = JSON.stringify(se_DescribeUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -209,7 +191,7 @@ export const se_DisassociateTeamMemberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateTeamMember"); let body: any; - body = JSON.stringify(se_DisassociateTeamMemberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -222,7 +204,7 @@ export const se_ListProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProjects"); let body: any; - body = JSON.stringify(se_ListProjectsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -235,7 +217,7 @@ export const se_ListResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResources"); let body: any; - body = JSON.stringify(se_ListResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -248,7 +230,7 @@ export const se_ListTagsForProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForProject"); let body: any; - body = JSON.stringify(se_ListTagsForProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -261,7 +243,7 @@ export const se_ListTeamMembersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTeamMembers"); let body: any; - body = JSON.stringify(se_ListTeamMembersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -274,7 +256,7 @@ export const se_ListUserProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUserProfiles"); let body: any; - body = JSON.stringify(se_ListUserProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -287,7 +269,7 @@ export const se_TagProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagProject"); let body: any; - body = JSON.stringify(se_TagProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -300,7 +282,7 @@ export const se_UntagProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagProject"); let body: any; - body = JSON.stringify(se_UntagProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -313,7 +295,7 @@ export const se_UpdateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProject"); let body: any; - body = JSON.stringify(se_UpdateProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -326,7 +308,7 @@ export const se_UpdateTeamMemberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTeamMember"); let body: any; - body = JSON.stringify(se_UpdateTeamMemberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -339,7 +321,7 @@ export const se_UpdateUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserProfile"); let body: any; - body = JSON.stringify(se_UpdateUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -355,12 +337,12 @@ export const de_AssociateTeamMemberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateTeamMemberResult(data, context); + contents = _json(data); const response: AssociateTeamMemberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -399,10 +381,9 @@ const de_AssociateTeamMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -420,12 +401,12 @@ export const de_CreateProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProjectResult(data, context); + contents = _json(data); const response: CreateProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -464,10 +445,9 @@ const de_CreateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -490,7 +470,7 @@ export const de_CreateUserProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -514,10 +494,9 @@ const de_CreateUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -535,12 +514,12 @@ export const de_DeleteProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProjectResult(data, context); + contents = _json(data); const response: DeleteProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -567,10 +546,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -588,12 +566,12 @@ export const de_DeleteUserProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserProfileResult(data, context); + contents = _json(data); const response: DeleteUserProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -614,10 +592,9 @@ const de_DeleteUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -640,7 +617,7 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -673,10 +650,9 @@ const de_DescribeProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -699,7 +675,7 @@ export const de_DescribeUserProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -723,10 +699,9 @@ const de_DescribeUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -744,12 +719,12 @@ export const de_DisassociateTeamMemberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateTeamMemberResult(data, context); + contents = _json(data); const response: DisassociateTeamMemberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -779,10 +754,9 @@ const de_DisassociateTeamMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -800,12 +774,12 @@ export const de_ListProjectsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProjectsResult(data, context); + contents = _json(data); const response: ListProjectsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -829,10 +803,9 @@ const de_ListProjectsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -850,12 +823,12 @@ export const de_ListResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourcesResult(data, context); + contents = _json(data); const response: ListResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -882,10 +855,9 @@ const de_ListResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -903,12 +875,12 @@ export const de_ListTagsForProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForProjectResult(data, context); + contents = _json(data); const response: ListTagsForProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -935,10 +907,9 @@ const de_ListTagsForProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -956,12 +927,12 @@ export const de_ListTeamMembersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTeamMembersResult(data, context); + contents = _json(data); const response: ListTeamMembersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -988,10 +959,9 @@ const de_ListTeamMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1009,12 +979,12 @@ export const de_ListUserProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListUserProfilesResult(data, context); + contents = _json(data); const response: ListUserProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1038,10 +1008,9 @@ const de_ListUserProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1059,12 +1028,12 @@ export const de_TagProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagProjectResult(data, context); + contents = _json(data); const response: TagProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1094,10 +1063,9 @@ const de_TagProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1115,12 +1083,12 @@ export const de_UntagProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagProjectResult(data, context); + contents = _json(data); const response: UntagProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1150,10 +1118,9 @@ const de_UntagProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1171,12 +1138,12 @@ export const de_UpdateProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProjectResult(data, context); + contents = _json(data); const response: UpdateProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1200,10 +1167,9 @@ const de_UpdateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1221,12 +1187,12 @@ export const de_UpdateTeamMemberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTeamMemberResult(data, context); + contents = _json(data); const response: UpdateTeamMemberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1265,10 +1231,9 @@ const de_UpdateTeamMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1291,7 +1256,7 @@ export const de_UpdateUserProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1315,10 +1280,9 @@ const de_UpdateUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1332,7 +1296,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1348,7 +1312,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1364,7 +1328,7 @@ const de_InvalidServiceRoleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidServiceRoleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidServiceRoleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1380,7 +1344,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1396,7 +1360,7 @@ const de_ProjectAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProjectAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ProjectAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1412,7 +1376,7 @@ const de_ProjectConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProjectConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new ProjectConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1428,7 +1392,7 @@ const de_ProjectCreationFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProjectCreationFailedException(body, context); + const deserialized: any = _json(body); const exception = new ProjectCreationFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1444,7 +1408,7 @@ const de_ProjectNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProjectNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ProjectNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1460,7 +1424,7 @@ const de_TeamMemberAlreadyAssociatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TeamMemberAlreadyAssociatedException(body, context); + const deserialized: any = _json(body); const exception = new TeamMemberAlreadyAssociatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1476,7 +1440,7 @@ const de_TeamMemberNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TeamMemberNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TeamMemberNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1492,7 +1456,7 @@ const de_UserProfileAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserProfileAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new UserProfileAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1508,7 +1472,7 @@ const de_UserProfileNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserProfileNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new UserProfileNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1521,7 +1485,7 @@ const de_UserProfileNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1529,791 +1493,198 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateTeamMemberRequest - */ -const se_AssociateTeamMemberRequest = (input: AssociateTeamMemberRequest, context: __SerdeContext): any => { - return { - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.projectId != null && { projectId: input.projectId }), - ...(input.projectRole != null && { projectRole: input.projectRole }), - ...(input.remoteAccessAllowed != null && { remoteAccessAllowed: input.remoteAccessAllowed }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_AssociateTeamMemberRequest omitted. -/** - * serializeAws_json1_1Code - */ -const se_Code = (input: Code, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: se_CodeDestination(input.destination, context) }), - ...(input.source != null && { source: se_CodeSource(input.source, context) }), - }; -}; +// se_Code omitted. -/** - * serializeAws_json1_1CodeCommitCodeDestination - */ -const se_CodeCommitCodeDestination = (input: CodeCommitCodeDestination, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_CodeCommitCodeDestination omitted. -/** - * serializeAws_json1_1CodeDestination - */ -const se_CodeDestination = (input: CodeDestination, context: __SerdeContext): any => { - return { - ...(input.codeCommit != null && { codeCommit: se_CodeCommitCodeDestination(input.codeCommit, context) }), - ...(input.gitHub != null && { gitHub: se_GitHubCodeDestination(input.gitHub, context) }), - }; -}; +// se_CodeDestination omitted. -/** - * serializeAws_json1_1CodeSource - */ -const se_CodeSource = (input: CodeSource, context: __SerdeContext): any => { - return { - ...(input.s3 != null && { s3: se_S3Location(input.s3, context) }), - }; -}; +// se_CodeSource omitted. -/** - * serializeAws_json1_1CreateProjectRequest - */ -const se_CreateProjectRequest = (input: CreateProjectRequest, context: __SerdeContext): any => { - return { - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.description != null && { description: input.description }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.sourceCode != null && { sourceCode: se_SourceCode(input.sourceCode, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.toolchain != null && { toolchain: se_Toolchain(input.toolchain, context) }), - }; -}; +// se_CreateProjectRequest omitted. -/** - * serializeAws_json1_1CreateUserProfileRequest - */ -const se_CreateUserProfileRequest = (input: CreateUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.emailAddress != null && { emailAddress: input.emailAddress }), - ...(input.sshPublicKey != null && { sshPublicKey: input.sshPublicKey }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_CreateUserProfileRequest omitted. -/** - * serializeAws_json1_1DeleteProjectRequest - */ -const se_DeleteProjectRequest = (input: DeleteProjectRequest, context: __SerdeContext): any => { - return { - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.deleteStack != null && { deleteStack: input.deleteStack }), - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeleteProjectRequest omitted. -/** - * serializeAws_json1_1DeleteUserProfileRequest - */ -const se_DeleteUserProfileRequest = (input: DeleteUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_DeleteUserProfileRequest omitted. -/** - * serializeAws_json1_1DescribeProjectRequest - */ -const se_DescribeProjectRequest = (input: DescribeProjectRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DescribeProjectRequest omitted. -/** - * serializeAws_json1_1DescribeUserProfileRequest - */ -const se_DescribeUserProfileRequest = (input: DescribeUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_DescribeUserProfileRequest omitted. -/** - * serializeAws_json1_1DisassociateTeamMemberRequest - */ -const se_DisassociateTeamMemberRequest = (input: DisassociateTeamMemberRequest, context: __SerdeContext): any => { - return { - ...(input.projectId != null && { projectId: input.projectId }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_DisassociateTeamMemberRequest omitted. -/** - * serializeAws_json1_1GitHubCodeDestination - */ -const se_GitHubCodeDestination = (input: GitHubCodeDestination, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.issuesEnabled != null && { issuesEnabled: input.issuesEnabled }), - ...(input.name != null && { name: input.name }), - ...(input.owner != null && { owner: input.owner }), - ...(input.privateRepository != null && { privateRepository: input.privateRepository }), - ...(input.token != null && { token: input.token }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_GitHubCodeDestination omitted. -/** - * serializeAws_json1_1ListProjectsRequest - */ -const se_ListProjectsRequest = (input: ListProjectsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListProjectsRequest omitted. -/** - * serializeAws_json1_1ListResourcesRequest - */ -const se_ListResourcesRequest = (input: ListResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.projectId != null && { projectId: input.projectId }), - }; -}; +// se_ListResourcesRequest omitted. -/** - * serializeAws_json1_1ListTagsForProjectRequest - */ -const se_ListTagsForProjectRequest = (input: ListTagsForProjectRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListTagsForProjectRequest omitted. -/** - * serializeAws_json1_1ListTeamMembersRequest - */ -const se_ListTeamMembersRequest = (input: ListTeamMembersRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.projectId != null && { projectId: input.projectId }), - }; -}; +// se_ListTeamMembersRequest omitted. -/** - * serializeAws_json1_1ListUserProfilesRequest - */ -const se_ListUserProfilesRequest = (input: ListUserProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListUserProfilesRequest omitted. -/** - * serializeAws_json1_1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.bucketKey != null && { bucketKey: input.bucketKey }), - ...(input.bucketName != null && { bucketName: input.bucketName }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_json1_1SourceCode - */ -const se_SourceCode = (input: Code[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Code(entry, context); - }); -}; +// se_SourceCode omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1TagProjectRequest - */ -const se_TagProjectRequest = (input: TagProjectRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_TagProjectRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1TemplateParameterMap - */ -const se_TemplateParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TemplateParameterMap omitted. -/** - * serializeAws_json1_1Toolchain - */ -const se_Toolchain = (input: Toolchain, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.source != null && { source: se_ToolchainSource(input.source, context) }), - ...(input.stackParameters != null && { stackParameters: se_TemplateParameterMap(input.stackParameters, context) }), - }; -}; +// se_Toolchain omitted. -/** - * serializeAws_json1_1ToolchainSource - */ -const se_ToolchainSource = (input: ToolchainSource, context: __SerdeContext): any => { - return { - ...(input.s3 != null && { s3: se_S3Location(input.s3, context) }), - }; -}; +// se_ToolchainSource omitted. -/** - * serializeAws_json1_1UntagProjectRequest - */ -const se_UntagProjectRequest = (input: UntagProjectRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.tags != null && { tags: se_TagKeys(input.tags, context) }), - }; -}; +// se_UntagProjectRequest omitted. -/** - * serializeAws_json1_1UpdateProjectRequest - */ -const se_UpdateProjectRequest = (input: UpdateProjectRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_UpdateProjectRequest omitted. -/** - * serializeAws_json1_1UpdateTeamMemberRequest - */ -const se_UpdateTeamMemberRequest = (input: UpdateTeamMemberRequest, context: __SerdeContext): any => { - return { - ...(input.projectId != null && { projectId: input.projectId }), - ...(input.projectRole != null && { projectRole: input.projectRole }), - ...(input.remoteAccessAllowed != null && { remoteAccessAllowed: input.remoteAccessAllowed }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_UpdateTeamMemberRequest omitted. -/** - * serializeAws_json1_1UpdateUserProfileRequest - */ -const se_UpdateUserProfileRequest = (input: UpdateUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.emailAddress != null && { emailAddress: input.emailAddress }), - ...(input.sshPublicKey != null && { sshPublicKey: input.sshPublicKey }), - ...(input.userArn != null && { userArn: input.userArn }), - }; -}; +// se_UpdateUserProfileRequest omitted. -/** - * deserializeAws_json1_1AssociateTeamMemberResult - */ -const de_AssociateTeamMemberResult = (output: any, context: __SerdeContext): AssociateTeamMemberResult => { - return { - clientRequestToken: __expectString(output.clientRequestToken), - } as any; -}; +// de_AssociateTeamMemberResult omitted. -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1CreateProjectResult - */ -const de_CreateProjectResult = (output: any, context: __SerdeContext): CreateProjectResult => { - return { - arn: __expectString(output.arn), - clientRequestToken: __expectString(output.clientRequestToken), - id: __expectString(output.id), - projectTemplateId: __expectString(output.projectTemplateId), - } as any; -}; +// de_CreateProjectResult omitted. /** * deserializeAws_json1_1CreateUserProfileResult */ const de_CreateUserProfileResult = (output: any, context: __SerdeContext): CreateUserProfileResult => { - return { - createdTimestamp: - output.createdTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTimestamp))) - : undefined, - displayName: __expectString(output.displayName), - emailAddress: __expectString(output.emailAddress), - lastModifiedTimestamp: - output.lastModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTimestamp))) - : undefined, - sshPublicKey: __expectString(output.sshPublicKey), - userArn: __expectString(output.userArn), - } as any; + return take(output, { + createdTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + emailAddress: __expectString, + lastModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + sshPublicKey: __expectString, + userArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeleteProjectResult - */ -const de_DeleteProjectResult = (output: any, context: __SerdeContext): DeleteProjectResult => { - return { - projectArn: __expectString(output.projectArn), - stackId: __expectString(output.stackId), - } as any; -}; +// de_DeleteProjectResult omitted. -/** - * deserializeAws_json1_1DeleteUserProfileResult - */ -const de_DeleteUserProfileResult = (output: any, context: __SerdeContext): DeleteUserProfileResult => { - return { - userArn: __expectString(output.userArn), - } as any; -}; +// de_DeleteUserProfileResult omitted. /** * deserializeAws_json1_1DescribeProjectResult */ const de_DescribeProjectResult = (output: any, context: __SerdeContext): DescribeProjectResult => { - return { - arn: __expectString(output.arn), - clientRequestToken: __expectString(output.clientRequestToken), - createdTimeStamp: - output.createdTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTimeStamp))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - projectTemplateId: __expectString(output.projectTemplateId), - stackId: __expectString(output.stackId), - status: output.status != null ? de_ProjectStatus(output.status, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + clientRequestToken: __expectString, + createdTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + projectTemplateId: __expectString, + stackId: __expectString, + status: _json, + }) as any; }; /** * deserializeAws_json1_1DescribeUserProfileResult */ const de_DescribeUserProfileResult = (output: any, context: __SerdeContext): DescribeUserProfileResult => { - return { - createdTimestamp: - output.createdTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTimestamp))) - : undefined, - displayName: __expectString(output.displayName), - emailAddress: __expectString(output.emailAddress), - lastModifiedTimestamp: - output.lastModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTimestamp))) - : undefined, - sshPublicKey: __expectString(output.sshPublicKey), - userArn: __expectString(output.userArn), - } as any; + return take(output, { + createdTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + emailAddress: __expectString, + lastModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + sshPublicKey: __expectString, + userArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DisassociateTeamMemberResult - */ -const de_DisassociateTeamMemberResult = (output: any, context: __SerdeContext): DisassociateTeamMemberResult => { - return {} as any; -}; +// de_DisassociateTeamMemberResult omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidServiceRoleException - */ -const de_InvalidServiceRoleException = (output: any, context: __SerdeContext): InvalidServiceRoleException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidServiceRoleException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListProjectsResult - */ -const de_ListProjectsResult = (output: any, context: __SerdeContext): ListProjectsResult => { - return { - nextToken: __expectString(output.nextToken), - projects: output.projects != null ? de_ProjectsList(output.projects, context) : undefined, - } as any; -}; +// de_ListProjectsResult omitted. -/** - * deserializeAws_json1_1ListResourcesResult - */ -const de_ListResourcesResult = (output: any, context: __SerdeContext): ListResourcesResult => { - return { - nextToken: __expectString(output.nextToken), - resources: output.resources != null ? de_ResourcesResult(output.resources, context) : undefined, - } as any; -}; +// de_ListResourcesResult omitted. -/** - * deserializeAws_json1_1ListTagsForProjectResult - */ -const de_ListTagsForProjectResult = (output: any, context: __SerdeContext): ListTagsForProjectResult => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForProjectResult omitted. -/** - * deserializeAws_json1_1ListTeamMembersResult - */ -const de_ListTeamMembersResult = (output: any, context: __SerdeContext): ListTeamMembersResult => { - return { - nextToken: __expectString(output.nextToken), - teamMembers: output.teamMembers != null ? de_TeamMemberResult(output.teamMembers, context) : undefined, - } as any; -}; +// de_ListTeamMembersResult omitted. -/** - * deserializeAws_json1_1ListUserProfilesResult - */ -const de_ListUserProfilesResult = (output: any, context: __SerdeContext): ListUserProfilesResult => { - return { - nextToken: __expectString(output.nextToken), - userProfiles: output.userProfiles != null ? de_UserProfilesList(output.userProfiles, context) : undefined, - } as any; -}; +// de_ListUserProfilesResult omitted. -/** - * deserializeAws_json1_1ProjectAlreadyExistsException - */ -const de_ProjectAlreadyExistsException = (output: any, context: __SerdeContext): ProjectAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ProjectAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ProjectConfigurationException - */ -const de_ProjectConfigurationException = (output: any, context: __SerdeContext): ProjectConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ProjectConfigurationException omitted. -/** - * deserializeAws_json1_1ProjectCreationFailedException - */ -const de_ProjectCreationFailedException = (output: any, context: __SerdeContext): ProjectCreationFailedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ProjectCreationFailedException omitted. -/** - * deserializeAws_json1_1ProjectNotFoundException - */ -const de_ProjectNotFoundException = (output: any, context: __SerdeContext): ProjectNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ProjectNotFoundException omitted. -/** - * deserializeAws_json1_1ProjectsList - */ -const de_ProjectsList = (output: any, context: __SerdeContext): ProjectSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectSummary(entry, context); - }); - return retVal; -}; +// de_ProjectsList omitted. -/** - * deserializeAws_json1_1ProjectStatus - */ -const de_ProjectStatus = (output: any, context: __SerdeContext): ProjectStatus => { - return { - reason: __expectString(output.reason), - state: __expectString(output.state), - } as any; -}; +// de_ProjectStatus omitted. -/** - * deserializeAws_json1_1ProjectSummary - */ -const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - projectArn: __expectString(output.projectArn), - projectId: __expectString(output.projectId), - } as any; -}; +// de_ProjectSummary omitted. -/** - * deserializeAws_json1_1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - id: __expectString(output.id), - } as any; -}; +// de_Resource omitted. -/** - * deserializeAws_json1_1ResourcesResult - */ -const de_ResourcesResult = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_ResourcesResult omitted. -/** - * deserializeAws_json1_1TagProjectResult - */ -const de_TagProjectResult = (output: any, context: __SerdeContext): TagProjectResult => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_TagProjectResult omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TeamMember - */ -const de_TeamMember = (output: any, context: __SerdeContext): TeamMember => { - return { - projectRole: __expectString(output.projectRole), - remoteAccessAllowed: __expectBoolean(output.remoteAccessAllowed), - userArn: __expectString(output.userArn), - } as any; -}; +// de_TeamMember omitted. -/** - * deserializeAws_json1_1TeamMemberAlreadyAssociatedException - */ -const de_TeamMemberAlreadyAssociatedException = ( - output: any, - context: __SerdeContext -): TeamMemberAlreadyAssociatedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TeamMemberAlreadyAssociatedException omitted. -/** - * deserializeAws_json1_1TeamMemberNotFoundException - */ -const de_TeamMemberNotFoundException = (output: any, context: __SerdeContext): TeamMemberNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TeamMemberNotFoundException omitted. -/** - * deserializeAws_json1_1TeamMemberResult - */ -const de_TeamMemberResult = (output: any, context: __SerdeContext): TeamMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TeamMember(entry, context); - }); - return retVal; -}; +// de_TeamMemberResult omitted. -/** - * deserializeAws_json1_1UntagProjectResult - */ -const de_UntagProjectResult = (output: any, context: __SerdeContext): UntagProjectResult => { - return {} as any; -}; +// de_UntagProjectResult omitted. -/** - * deserializeAws_json1_1UpdateProjectResult - */ -const de_UpdateProjectResult = (output: any, context: __SerdeContext): UpdateProjectResult => { - return {} as any; -}; +// de_UpdateProjectResult omitted. -/** - * deserializeAws_json1_1UpdateTeamMemberResult - */ -const de_UpdateTeamMemberResult = (output: any, context: __SerdeContext): UpdateTeamMemberResult => { - return { - projectRole: __expectString(output.projectRole), - remoteAccessAllowed: __expectBoolean(output.remoteAccessAllowed), - userArn: __expectString(output.userArn), - } as any; -}; +// de_UpdateTeamMemberResult omitted. /** * deserializeAws_json1_1UpdateUserProfileResult */ const de_UpdateUserProfileResult = (output: any, context: __SerdeContext): UpdateUserProfileResult => { - return { - createdTimestamp: - output.createdTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTimestamp))) - : undefined, - displayName: __expectString(output.displayName), - emailAddress: __expectString(output.emailAddress), - lastModifiedTimestamp: - output.lastModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTimestamp))) - : undefined, - sshPublicKey: __expectString(output.sshPublicKey), - userArn: __expectString(output.userArn), - } as any; + return take(output, { + createdTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + emailAddress: __expectString, + lastModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + sshPublicKey: __expectString, + userArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UserProfileAlreadyExistsException - */ -const de_UserProfileAlreadyExistsException = ( - output: any, - context: __SerdeContext -): UserProfileAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserProfileAlreadyExistsException omitted. -/** - * deserializeAws_json1_1UserProfileNotFoundException - */ -const de_UserProfileNotFoundException = (output: any, context: __SerdeContext): UserProfileNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserProfileNotFoundException omitted. -/** - * deserializeAws_json1_1UserProfilesList - */ -const de_UserProfilesList = (output: any, context: __SerdeContext): UserProfileSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserProfileSummary(entry, context); - }); - return retVal; -}; +// de_UserProfilesList omitted. -/** - * deserializeAws_json1_1UserProfileSummary - */ -const de_UserProfileSummary = (output: any, context: __SerdeContext): UserProfileSummary => { - return { - displayName: __expectString(output.displayName), - emailAddress: __expectString(output.emailAddress), - sshPublicKey: __expectString(output.sshPublicKey), - userArn: __expectString(output.userArn), - } as any; -}; +// de_UserProfileSummary omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2335,6 +1706,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cognito-identity-provider/src/protocols/Aws_json1_1.ts b/clients/client-cognito-identity-provider/src/protocols/Aws_json1_1.ts index b037af7d7fb1..69cf9dc1b0b8 100644 --- a/clients/client-cognito-identity-provider/src/protocols/Aws_json1_1.ts +++ b/clients/client-cognito-identity-provider/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -294,31 +296,23 @@ import { AccountTakeoverActionType, AccountTakeoverRiskConfigurationType, AddCustomAttributesRequest, - AddCustomAttributesResponse, AdminAddUserToGroupRequest, AdminConfirmSignUpRequest, - AdminConfirmSignUpResponse, AdminCreateUserConfigType, AdminCreateUserRequest, AdminCreateUserResponse, AdminDeleteUserAttributesRequest, - AdminDeleteUserAttributesResponse, AdminDeleteUserRequest, AdminDisableProviderForUserRequest, - AdminDisableProviderForUserResponse, AdminDisableUserRequest, - AdminDisableUserResponse, AdminEnableUserRequest, - AdminEnableUserResponse, AdminForgetDeviceRequest, AdminGetDeviceRequest, AdminGetDeviceResponse, AdminGetUserRequest, AdminGetUserResponse, AdminInitiateAuthRequest, - AdminInitiateAuthResponse, AdminLinkProviderForUserRequest, - AdminLinkProviderForUserResponse, AdminListDevicesRequest, AdminListDevicesResponse, AdminListGroupsForUserRequest, @@ -327,60 +321,41 @@ import { AdminListUserAuthEventsResponse, AdminRemoveUserFromGroupRequest, AdminResetUserPasswordRequest, - AdminResetUserPasswordResponse, AdminRespondToAuthChallengeRequest, - AdminRespondToAuthChallengeResponse, AdminSetUserMFAPreferenceRequest, - AdminSetUserMFAPreferenceResponse, AdminSetUserPasswordRequest, - AdminSetUserPasswordResponse, AdminSetUserSettingsRequest, - AdminSetUserSettingsResponse, AdminUpdateAuthEventFeedbackRequest, - AdminUpdateAuthEventFeedbackResponse, AdminUpdateDeviceStatusRequest, - AdminUpdateDeviceStatusResponse, AdminUpdateUserAttributesRequest, - AdminUpdateUserAttributesResponse, AdminUserGlobalSignOutRequest, - AdminUserGlobalSignOutResponse, AliasAttributeType, AliasExistsException, AnalyticsConfigurationType, AnalyticsMetadataType, AssociateSoftwareTokenRequest, - AssociateSoftwareTokenResponse, AttributeType, - AuthenticationResultType, AuthEventType, - ChallengeResponseType, ChangePasswordRequest, - ChangePasswordResponse, - CodeDeliveryDetailsType, CodeDeliveryFailureException, CodeMismatchException, CompromisedCredentialsActionsType, CompromisedCredentialsRiskConfigurationType, ConcurrentModificationException, ConfirmDeviceRequest, - ConfirmDeviceResponse, ConfirmForgotPasswordRequest, - ConfirmForgotPasswordResponse, ConfirmSignUpRequest, - ConfirmSignUpResponse, ContextDataType, CreateGroupRequest, CreateGroupResponse, CreateIdentityProviderRequest, CreateIdentityProviderResponse, CreateResourceServerRequest, - CreateResourceServerResponse, CreateUserImportJobRequest, CreateUserImportJobResponse, CreateUserPoolClientRequest, CreateUserPoolClientResponse, CreateUserPoolDomainRequest, - CreateUserPoolDomainResponse, CreateUserPoolRequest, CreateUserPoolResponse, CustomDomainConfigType, @@ -390,17 +365,14 @@ import { DeleteIdentityProviderRequest, DeleteResourceServerRequest, DeleteUserAttributesRequest, - DeleteUserAttributesResponse, DeleteUserPoolClientRequest, DeleteUserPoolDomainRequest, - DeleteUserPoolDomainResponse, DeleteUserPoolRequest, DeleteUserRequest, DeliveryMediumType, DescribeIdentityProviderRequest, DescribeIdentityProviderResponse, DescribeResourceServerRequest, - DescribeResourceServerResponse, DescribeRiskConfigurationRequest, DescribeRiskConfigurationResponse, DescribeUserImportJobRequest, @@ -408,27 +380,21 @@ import { DescribeUserPoolClientRequest, DescribeUserPoolClientResponse, DescribeUserPoolDomainRequest, - DescribeUserPoolDomainResponse, DescribeUserPoolRequest, DescribeUserPoolResponse, DeviceConfigurationType, DeviceSecretVerifierConfigType, DeviceType, - DomainDescriptionType, DuplicateProviderException, EmailConfigurationType, - EventContextDataType, EventFeedbackType, EventFilterType, - EventRiskType, ExpiredCodeException, ExplicitAuthFlowsType, ForbiddenException, ForgetDeviceRequest, ForgotPasswordRequest, - ForgotPasswordResponse, GetCSVHeaderRequest, - GetCSVHeaderResponse, GetDeviceRequest, GetDeviceResponse, GetGroupRequest, @@ -436,23 +402,17 @@ import { GetIdentityProviderByIdentifierRequest, GetIdentityProviderByIdentifierResponse, GetSigningCertificateRequest, - GetSigningCertificateResponse, GetUICustomizationRequest, GetUICustomizationResponse, GetUserAttributeVerificationCodeRequest, - GetUserAttributeVerificationCodeResponse, GetUserPoolMfaConfigRequest, - GetUserPoolMfaConfigResponse, GetUserRequest, - GetUserResponse, GlobalSignOutRequest, - GlobalSignOutResponse, GroupExistsException, GroupType, HttpHeader, IdentityProviderType, InitiateAuthRequest, - InitiateAuthResponse, InternalErrorException, InvalidEmailRoleAccessPolicyException, InvalidLambdaResponseException, @@ -471,13 +431,10 @@ import { ListIdentityProvidersRequest, ListIdentityProvidersResponse, ListResourceServersRequest, - ListResourceServersResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListUserImportJobsRequest, ListUserImportJobsResponse, ListUserPoolClientsRequest, - ListUserPoolClientsResponse, ListUserPoolsRequest, ListUserPoolsResponse, ListUsersInGroupRequest, @@ -487,7 +444,6 @@ import { MessageTemplateType, MFAMethodNotFoundException, MFAOptionType, - NewDeviceMetadataType, NotAuthorizedException, NotifyConfigurationType, NotifyEmailType, @@ -500,14 +456,10 @@ import { ProviderUserIdentifierType, RecoveryOptionType, ResendConfirmationCodeRequest, - ResendConfirmationCodeResponse, ResourceNotFoundException, ResourceServerScopeType, - ResourceServerType, RespondToAuthChallengeRequest, - RespondToAuthChallengeResponse, RevokeTokenRequest, - RevokeTokenResponse, RiskConfigurationType, RiskExceptionConfigurationType, SchemaAttributeType, @@ -517,11 +469,8 @@ import { SetUICustomizationRequest, SetUICustomizationResponse, SetUserMFAPreferenceRequest, - SetUserMFAPreferenceResponse, SetUserPoolMfaConfigRequest, - SetUserPoolMfaConfigResponse, SetUserSettingsRequest, - SetUserSettingsResponse, SmsConfigurationType, SmsMfaConfigType, SMSMfaSettingsType, @@ -551,7 +500,6 @@ import { UserNotFoundException, UserPoolAddOnNotEnabledException, UserPoolAddOnsType, - UserPoolClientDescription, UserPoolClientType, UserPoolDescriptionType, UserPoolPolicyType, @@ -564,37 +512,26 @@ import { import { EnableSoftwareTokenMFAException, SignUpRequest, - SignUpResponse, StartUserImportJobRequest, StartUserImportJobResponse, StopUserImportJobRequest, StopUserImportJobResponse, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateAuthEventFeedbackRequest, - UpdateAuthEventFeedbackResponse, UpdateDeviceStatusRequest, - UpdateDeviceStatusResponse, UpdateGroupRequest, UpdateGroupResponse, UpdateIdentityProviderRequest, UpdateIdentityProviderResponse, UpdateResourceServerRequest, - UpdateResourceServerResponse, UpdateUserAttributesRequest, - UpdateUserAttributesResponse, UpdateUserPoolClientRequest, UpdateUserPoolClientResponse, UpdateUserPoolDomainRequest, - UpdateUserPoolDomainResponse, UpdateUserPoolRequest, - UpdateUserPoolResponse, VerifySoftwareTokenRequest, - VerifySoftwareTokenResponse, VerifyUserAttributeRequest, - VerifyUserAttributeResponse, } from "../models/models_1"; /** @@ -606,7 +543,7 @@ export const se_AddCustomAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddCustomAttributes"); let body: any; - body = JSON.stringify(se_AddCustomAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -619,7 +556,7 @@ export const se_AdminAddUserToGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminAddUserToGroup"); let body: any; - body = JSON.stringify(se_AdminAddUserToGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -632,7 +569,7 @@ export const se_AdminConfirmSignUpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminConfirmSignUp"); let body: any; - body = JSON.stringify(se_AdminConfirmSignUpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -645,7 +582,7 @@ export const se_AdminCreateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminCreateUser"); let body: any; - body = JSON.stringify(se_AdminCreateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -658,7 +595,7 @@ export const se_AdminDeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminDeleteUser"); let body: any; - body = JSON.stringify(se_AdminDeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -671,7 +608,7 @@ export const se_AdminDeleteUserAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminDeleteUserAttributes"); let body: any; - body = JSON.stringify(se_AdminDeleteUserAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -684,7 +621,7 @@ export const se_AdminDisableProviderForUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminDisableProviderForUser"); let body: any; - body = JSON.stringify(se_AdminDisableProviderForUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -697,7 +634,7 @@ export const se_AdminDisableUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminDisableUser"); let body: any; - body = JSON.stringify(se_AdminDisableUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -710,7 +647,7 @@ export const se_AdminEnableUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminEnableUser"); let body: any; - body = JSON.stringify(se_AdminEnableUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -723,7 +660,7 @@ export const se_AdminForgetDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminForgetDevice"); let body: any; - body = JSON.stringify(se_AdminForgetDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -736,7 +673,7 @@ export const se_AdminGetDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminGetDevice"); let body: any; - body = JSON.stringify(se_AdminGetDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -749,7 +686,7 @@ export const se_AdminGetUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminGetUser"); let body: any; - body = JSON.stringify(se_AdminGetUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -762,7 +699,7 @@ export const se_AdminInitiateAuthCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminInitiateAuth"); let body: any; - body = JSON.stringify(se_AdminInitiateAuthRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -775,7 +712,7 @@ export const se_AdminLinkProviderForUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminLinkProviderForUser"); let body: any; - body = JSON.stringify(se_AdminLinkProviderForUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -788,7 +725,7 @@ export const se_AdminListDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminListDevices"); let body: any; - body = JSON.stringify(se_AdminListDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -801,7 +738,7 @@ export const se_AdminListGroupsForUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminListGroupsForUser"); let body: any; - body = JSON.stringify(se_AdminListGroupsForUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -814,7 +751,7 @@ export const se_AdminListUserAuthEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminListUserAuthEvents"); let body: any; - body = JSON.stringify(se_AdminListUserAuthEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -827,7 +764,7 @@ export const se_AdminRemoveUserFromGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminRemoveUserFromGroup"); let body: any; - body = JSON.stringify(se_AdminRemoveUserFromGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -840,7 +777,7 @@ export const se_AdminResetUserPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminResetUserPassword"); let body: any; - body = JSON.stringify(se_AdminResetUserPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -853,7 +790,7 @@ export const se_AdminRespondToAuthChallengeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminRespondToAuthChallenge"); let body: any; - body = JSON.stringify(se_AdminRespondToAuthChallengeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -866,7 +803,7 @@ export const se_AdminSetUserMFAPreferenceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminSetUserMFAPreference"); let body: any; - body = JSON.stringify(se_AdminSetUserMFAPreferenceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -879,7 +816,7 @@ export const se_AdminSetUserPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminSetUserPassword"); let body: any; - body = JSON.stringify(se_AdminSetUserPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -892,7 +829,7 @@ export const se_AdminSetUserSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminSetUserSettings"); let body: any; - body = JSON.stringify(se_AdminSetUserSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -905,7 +842,7 @@ export const se_AdminUpdateAuthEventFeedbackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminUpdateAuthEventFeedback"); let body: any; - body = JSON.stringify(se_AdminUpdateAuthEventFeedbackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -918,7 +855,7 @@ export const se_AdminUpdateDeviceStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminUpdateDeviceStatus"); let body: any; - body = JSON.stringify(se_AdminUpdateDeviceStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -931,7 +868,7 @@ export const se_AdminUpdateUserAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminUpdateUserAttributes"); let body: any; - body = JSON.stringify(se_AdminUpdateUserAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -944,7 +881,7 @@ export const se_AdminUserGlobalSignOutCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdminUserGlobalSignOut"); let body: any; - body = JSON.stringify(se_AdminUserGlobalSignOutRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -957,7 +894,7 @@ export const se_AssociateSoftwareTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateSoftwareToken"); let body: any; - body = JSON.stringify(se_AssociateSoftwareTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -970,7 +907,7 @@ export const se_ChangePasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ChangePassword"); let body: any; - body = JSON.stringify(se_ChangePasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -983,7 +920,7 @@ export const se_ConfirmDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmDevice"); let body: any; - body = JSON.stringify(se_ConfirmDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -996,7 +933,7 @@ export const se_ConfirmForgotPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmForgotPassword"); let body: any; - body = JSON.stringify(se_ConfirmForgotPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1009,7 +946,7 @@ export const se_ConfirmSignUpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmSignUp"); let body: any; - body = JSON.stringify(se_ConfirmSignUpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1022,7 +959,7 @@ export const se_CreateGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGroup"); let body: any; - body = JSON.stringify(se_CreateGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1035,7 +972,7 @@ export const se_CreateIdentityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateIdentityProvider"); let body: any; - body = JSON.stringify(se_CreateIdentityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1048,7 +985,7 @@ export const se_CreateResourceServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateResourceServer"); let body: any; - body = JSON.stringify(se_CreateResourceServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1061,7 +998,7 @@ export const se_CreateUserImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserImportJob"); let body: any; - body = JSON.stringify(se_CreateUserImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1074,7 +1011,7 @@ export const se_CreateUserPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserPool"); let body: any; - body = JSON.stringify(se_CreateUserPoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1087,7 +1024,7 @@ export const se_CreateUserPoolClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserPoolClient"); let body: any; - body = JSON.stringify(se_CreateUserPoolClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1100,7 +1037,7 @@ export const se_CreateUserPoolDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserPoolDomain"); let body: any; - body = JSON.stringify(se_CreateUserPoolDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1113,7 +1050,7 @@ export const se_DeleteGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGroup"); let body: any; - body = JSON.stringify(se_DeleteGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1126,7 +1063,7 @@ export const se_DeleteIdentityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIdentityProvider"); let body: any; - body = JSON.stringify(se_DeleteIdentityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1139,7 +1076,7 @@ export const se_DeleteResourceServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourceServer"); let body: any; - body = JSON.stringify(se_DeleteResourceServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1152,7 +1089,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1165,7 +1102,7 @@ export const se_DeleteUserAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserAttributes"); let body: any; - body = JSON.stringify(se_DeleteUserAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1178,7 +1115,7 @@ export const se_DeleteUserPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserPool"); let body: any; - body = JSON.stringify(se_DeleteUserPoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1191,7 +1128,7 @@ export const se_DeleteUserPoolClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserPoolClient"); let body: any; - body = JSON.stringify(se_DeleteUserPoolClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1204,7 +1141,7 @@ export const se_DeleteUserPoolDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserPoolDomain"); let body: any; - body = JSON.stringify(se_DeleteUserPoolDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1217,7 +1154,7 @@ export const se_DescribeIdentityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeIdentityProvider"); let body: any; - body = JSON.stringify(se_DescribeIdentityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1230,7 +1167,7 @@ export const se_DescribeResourceServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeResourceServer"); let body: any; - body = JSON.stringify(se_DescribeResourceServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1243,7 +1180,7 @@ export const se_DescribeRiskConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRiskConfiguration"); let body: any; - body = JSON.stringify(se_DescribeRiskConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1256,7 +1193,7 @@ export const se_DescribeUserImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserImportJob"); let body: any; - body = JSON.stringify(se_DescribeUserImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1269,7 +1206,7 @@ export const se_DescribeUserPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserPool"); let body: any; - body = JSON.stringify(se_DescribeUserPoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1282,7 +1219,7 @@ export const se_DescribeUserPoolClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserPoolClient"); let body: any; - body = JSON.stringify(se_DescribeUserPoolClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1295,7 +1232,7 @@ export const se_DescribeUserPoolDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserPoolDomain"); let body: any; - body = JSON.stringify(se_DescribeUserPoolDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1308,7 +1245,7 @@ export const se_ForgetDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ForgetDevice"); let body: any; - body = JSON.stringify(se_ForgetDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1321,7 +1258,7 @@ export const se_ForgotPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ForgotPassword"); let body: any; - body = JSON.stringify(se_ForgotPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1334,7 +1271,7 @@ export const se_GetCSVHeaderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCSVHeader"); let body: any; - body = JSON.stringify(se_GetCSVHeaderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1347,7 +1284,7 @@ export const se_GetDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDevice"); let body: any; - body = JSON.stringify(se_GetDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1360,7 +1297,7 @@ export const se_GetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGroup"); let body: any; - body = JSON.stringify(se_GetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1373,7 +1310,7 @@ export const se_GetIdentityProviderByIdentifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetIdentityProviderByIdentifier"); let body: any; - body = JSON.stringify(se_GetIdentityProviderByIdentifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1386,7 +1323,7 @@ export const se_GetSigningCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSigningCertificate"); let body: any; - body = JSON.stringify(se_GetSigningCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1399,7 +1336,7 @@ export const se_GetUICustomizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUICustomization"); let body: any; - body = JSON.stringify(se_GetUICustomizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1412,7 +1349,7 @@ export const se_GetUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUser"); let body: any; - body = JSON.stringify(se_GetUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1425,7 +1362,7 @@ export const se_GetUserAttributeVerificationCodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUserAttributeVerificationCode"); let body: any; - body = JSON.stringify(se_GetUserAttributeVerificationCodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1438,7 +1375,7 @@ export const se_GetUserPoolMfaConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUserPoolMfaConfig"); let body: any; - body = JSON.stringify(se_GetUserPoolMfaConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1451,7 +1388,7 @@ export const se_GlobalSignOutCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GlobalSignOut"); let body: any; - body = JSON.stringify(se_GlobalSignOutRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1464,7 +1401,7 @@ export const se_InitiateAuthCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InitiateAuth"); let body: any; - body = JSON.stringify(se_InitiateAuthRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1477,7 +1414,7 @@ export const se_ListDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDevices"); let body: any; - body = JSON.stringify(se_ListDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1490,7 +1427,7 @@ export const se_ListGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroups"); let body: any; - body = JSON.stringify(se_ListGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1503,7 +1440,7 @@ export const se_ListIdentityProvidersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIdentityProviders"); let body: any; - body = JSON.stringify(se_ListIdentityProvidersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1516,7 +1453,7 @@ export const se_ListResourceServersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceServers"); let body: any; - body = JSON.stringify(se_ListResourceServersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1529,7 +1466,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1542,7 +1479,7 @@ export const se_ListUserImportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUserImportJobs"); let body: any; - body = JSON.stringify(se_ListUserImportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1555,7 +1492,7 @@ export const se_ListUserPoolClientsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUserPoolClients"); let body: any; - body = JSON.stringify(se_ListUserPoolClientsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1568,7 +1505,7 @@ export const se_ListUserPoolsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUserPools"); let body: any; - body = JSON.stringify(se_ListUserPoolsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1581,7 +1518,7 @@ export const se_ListUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsers"); let body: any; - body = JSON.stringify(se_ListUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1594,7 +1531,7 @@ export const se_ListUsersInGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsersInGroup"); let body: any; - body = JSON.stringify(se_ListUsersInGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1607,7 +1544,7 @@ export const se_ResendConfirmationCodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResendConfirmationCode"); let body: any; - body = JSON.stringify(se_ResendConfirmationCodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1620,7 +1557,7 @@ export const se_RespondToAuthChallengeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RespondToAuthChallenge"); let body: any; - body = JSON.stringify(se_RespondToAuthChallengeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1633,7 +1570,7 @@ export const se_RevokeTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RevokeToken"); let body: any; - body = JSON.stringify(se_RevokeTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1646,7 +1583,7 @@ export const se_SetRiskConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetRiskConfiguration"); let body: any; - body = JSON.stringify(se_SetRiskConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1672,7 +1609,7 @@ export const se_SetUserMFAPreferenceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetUserMFAPreference"); let body: any; - body = JSON.stringify(se_SetUserMFAPreferenceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1685,7 +1622,7 @@ export const se_SetUserPoolMfaConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetUserPoolMfaConfig"); let body: any; - body = JSON.stringify(se_SetUserPoolMfaConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1698,7 +1635,7 @@ export const se_SetUserSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetUserSettings"); let body: any; - body = JSON.stringify(se_SetUserSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1708,7 +1645,7 @@ export const se_SetUserSettingsCommand = async ( export const se_SignUpCommand = async (input: SignUpCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SignUp"); let body: any; - body = JSON.stringify(se_SignUpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1721,7 +1658,7 @@ export const se_StartUserImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartUserImportJob"); let body: any; - body = JSON.stringify(se_StartUserImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1734,7 +1671,7 @@ export const se_StopUserImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopUserImportJob"); let body: any; - body = JSON.stringify(se_StopUserImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1747,7 +1684,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1760,7 +1697,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1773,7 +1710,7 @@ export const se_UpdateAuthEventFeedbackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAuthEventFeedback"); let body: any; - body = JSON.stringify(se_UpdateAuthEventFeedbackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1786,7 +1723,7 @@ export const se_UpdateDeviceStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDeviceStatus"); let body: any; - body = JSON.stringify(se_UpdateDeviceStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1799,7 +1736,7 @@ export const se_UpdateGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGroup"); let body: any; - body = JSON.stringify(se_UpdateGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1812,7 +1749,7 @@ export const se_UpdateIdentityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateIdentityProvider"); let body: any; - body = JSON.stringify(se_UpdateIdentityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1825,7 +1762,7 @@ export const se_UpdateResourceServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResourceServer"); let body: any; - body = JSON.stringify(se_UpdateResourceServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1838,7 +1775,7 @@ export const se_UpdateUserAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserAttributes"); let body: any; - body = JSON.stringify(se_UpdateUserAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1851,7 +1788,7 @@ export const se_UpdateUserPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserPool"); let body: any; - body = JSON.stringify(se_UpdateUserPoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1864,7 +1801,7 @@ export const se_UpdateUserPoolClientCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserPoolClient"); let body: any; - body = JSON.stringify(se_UpdateUserPoolClientRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1877,7 +1814,7 @@ export const se_UpdateUserPoolDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserPoolDomain"); let body: any; - body = JSON.stringify(se_UpdateUserPoolDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1890,7 +1827,7 @@ export const se_VerifySoftwareTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("VerifySoftwareToken"); let body: any; - body = JSON.stringify(se_VerifySoftwareTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1903,7 +1840,7 @@ export const se_VerifyUserAttributeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("VerifyUserAttribute"); let body: any; - body = JSON.stringify(se_VerifyUserAttributeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1919,12 +1856,12 @@ export const de_AddCustomAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddCustomAttributesResponse(data, context); + contents = _json(data); const response: AddCustomAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1960,10 +1897,9 @@ const de_AddCustomAttributesCommandError = async ( throw await de_UserImportInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1983,7 +1919,7 @@ export const de_AdminAddUserToGroupCommand = async ( const response: AdminAddUserToGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2019,10 +1955,9 @@ const de_AdminAddUserToGroupCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2040,12 +1975,12 @@ export const de_AdminConfirmSignUpCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminConfirmSignUpResponse(data, context); + contents = _json(data); const response: AdminConfirmSignUpCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2096,10 +2031,9 @@ const de_AdminConfirmSignUpCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2122,7 +2056,7 @@ export const de_AdminCreateUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2188,10 +2122,9 @@ const de_AdminCreateUserCommandError = async ( throw await de_UsernameExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2211,7 +2144,7 @@ export const de_AdminDeleteUserCommand = async ( const response: AdminDeleteUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2247,10 +2180,9 @@ const de_AdminDeleteUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2268,12 +2200,12 @@ export const de_AdminDeleteUserAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminDeleteUserAttributesResponse(data, context); + contents = _json(data); const response: AdminDeleteUserAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2309,10 +2241,9 @@ const de_AdminDeleteUserAttributesCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2330,12 +2261,12 @@ export const de_AdminDisableProviderForUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminDisableProviderForUserResponse(data, context); + contents = _json(data); const response: AdminDisableProviderForUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2374,10 +2305,9 @@ const de_AdminDisableProviderForUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2395,12 +2325,12 @@ export const de_AdminDisableUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminDisableUserResponse(data, context); + contents = _json(data); const response: AdminDisableUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2436,10 +2366,9 @@ const de_AdminDisableUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2457,12 +2386,12 @@ export const de_AdminEnableUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminEnableUserResponse(data, context); + contents = _json(data); const response: AdminEnableUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2498,10 +2427,9 @@ const de_AdminEnableUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2521,7 +2449,7 @@ export const de_AdminForgetDeviceCommand = async ( const response: AdminForgetDeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2560,10 +2488,9 @@ const de_AdminForgetDeviceCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2586,7 +2513,7 @@ export const de_AdminGetDeviceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2622,10 +2549,9 @@ const de_AdminGetDeviceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2648,7 +2574,7 @@ export const de_AdminGetUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2684,10 +2610,9 @@ const de_AdminGetUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2705,12 +2630,12 @@ export const de_AdminInitiateAuthCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminInitiateAuthResponse(data, context); + contents = _json(data); const response: AdminInitiateAuthCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2773,10 +2698,9 @@ const de_AdminInitiateAuthCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2794,12 +2718,12 @@ export const de_AdminLinkProviderForUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminLinkProviderForUserResponse(data, context); + contents = _json(data); const response: AdminLinkProviderForUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2841,10 +2765,9 @@ const de_AdminLinkProviderForUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2867,7 +2790,7 @@ export const de_AdminListDevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2903,10 +2826,9 @@ const de_AdminListDevicesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2929,7 +2851,7 @@ export const de_AdminListGroupsForUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2965,10 +2887,9 @@ const de_AdminListGroupsForUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2991,7 +2912,7 @@ export const de_AdminListUserAuthEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3030,10 +2951,9 @@ const de_AdminListUserAuthEventsCommandError = async ( throw await de_UserPoolAddOnNotEnabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3053,7 +2973,7 @@ export const de_AdminRemoveUserFromGroupCommand = async ( const response: AdminRemoveUserFromGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3089,10 +3009,9 @@ const de_AdminRemoveUserFromGroupCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3110,12 +3029,12 @@ export const de_AdminResetUserPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminResetUserPasswordResponse(data, context); + contents = _json(data); const response: AdminResetUserPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3172,10 +3091,9 @@ const de_AdminResetUserPasswordCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3193,12 +3111,12 @@ export const de_AdminRespondToAuthChallengeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminRespondToAuthChallengeResponse(data, context); + contents = _json(data); const response: AdminRespondToAuthChallengeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3276,10 +3194,9 @@ const de_AdminRespondToAuthChallengeCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3297,12 +3214,12 @@ export const de_AdminSetUserMFAPreferenceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminSetUserMFAPreferenceResponse(data, context); + contents = _json(data); const response: AdminSetUserMFAPreferenceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3341,10 +3258,9 @@ const de_AdminSetUserMFAPreferenceCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3362,12 +3278,12 @@ export const de_AdminSetUserPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminSetUserPasswordResponse(data, context); + contents = _json(data); const response: AdminSetUserPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3406,10 +3322,9 @@ const de_AdminSetUserPasswordCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3427,12 +3342,12 @@ export const de_AdminSetUserSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminSetUserSettingsResponse(data, context); + contents = _json(data); const response: AdminSetUserSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3465,10 +3380,9 @@ const de_AdminSetUserSettingsCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3486,12 +3400,12 @@ export const de_AdminUpdateAuthEventFeedbackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminUpdateAuthEventFeedbackResponse(data, context); + contents = _json(data); const response: AdminUpdateAuthEventFeedbackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3530,10 +3444,9 @@ const de_AdminUpdateAuthEventFeedbackCommandError = async ( throw await de_UserPoolAddOnNotEnabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3551,12 +3464,12 @@ export const de_AdminUpdateDeviceStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminUpdateDeviceStatusResponse(data, context); + contents = _json(data); const response: AdminUpdateDeviceStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3595,10 +3508,9 @@ const de_AdminUpdateDeviceStatusCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3616,12 +3528,12 @@ export const de_AdminUpdateUserAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminUpdateUserAttributesResponse(data, context); + contents = _json(data); const response: AdminUpdateUserAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3678,10 +3590,9 @@ const de_AdminUpdateUserAttributesCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3699,12 +3610,12 @@ export const de_AdminUserGlobalSignOutCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AdminUserGlobalSignOutResponse(data, context); + contents = _json(data); const response: AdminUserGlobalSignOutCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3740,10 +3651,9 @@ const de_AdminUserGlobalSignOutCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3761,12 +3671,12 @@ export const de_AssociateSoftwareTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateSoftwareTokenResponse(data, context); + contents = _json(data); const response: AssociateSoftwareTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3805,10 +3715,9 @@ const de_AssociateSoftwareTokenCommandError = async ( throw await de_SoftwareTokenMFANotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3826,12 +3735,12 @@ export const de_ChangePasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ChangePasswordResponse(data, context); + contents = _json(data); const response: ChangePasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3882,10 +3791,9 @@ const de_ChangePasswordCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3903,12 +3811,12 @@ export const de_ConfirmDeviceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmDeviceResponse(data, context); + contents = _json(data); const response: ConfirmDeviceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3965,10 +3873,9 @@ const de_ConfirmDeviceCommandError = async ( throw await de_UsernameExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3986,12 +3893,12 @@ export const de_ConfirmForgotPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmForgotPasswordResponse(data, context); + contents = _json(data); const response: ConfirmForgotPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4057,10 +3964,9 @@ const de_ConfirmForgotPasswordCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4078,12 +3984,12 @@ export const de_ConfirmSignUpCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmSignUpResponse(data, context); + contents = _json(data); const response: ConfirmSignUpCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4146,10 +4052,9 @@ const de_ConfirmSignUpCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4172,7 +4077,7 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4211,10 +4116,9 @@ const de_CreateGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4237,7 +4141,7 @@ export const de_CreateIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4276,10 +4180,9 @@ const de_CreateIdentityProviderCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4297,12 +4200,12 @@ export const de_CreateResourceServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResourceServerResponse(data, context); + contents = _json(data); const response: CreateResourceServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4338,10 +4241,9 @@ const de_CreateResourceServerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4364,7 +4266,7 @@ export const de_CreateUserImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4403,10 +4305,9 @@ const de_CreateUserImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4429,7 +4330,7 @@ export const de_CreateUserPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4474,10 +4375,9 @@ const de_CreateUserPoolCommandError = async ( throw await de_UserPoolTaggingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4500,7 +4400,7 @@ export const de_CreateUserPoolClientCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4542,10 +4442,9 @@ const de_CreateUserPoolClientCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4563,12 +4462,12 @@ export const de_CreateUserPoolDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserPoolDomainResponse(data, context); + contents = _json(data); const response: CreateUserPoolDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4601,10 +4500,9 @@ const de_CreateUserPoolDomainCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4624,7 +4522,7 @@ export const de_DeleteGroupCommand = async ( const response: DeleteGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4657,10 +4555,9 @@ const de_DeleteGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4680,7 +4577,7 @@ export const de_DeleteIdentityProviderCommand = async ( const response: DeleteIdentityProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4719,10 +4616,9 @@ const de_DeleteIdentityProviderCommandError = async ( throw await de_UnsupportedIdentityProviderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4742,7 +4638,7 @@ export const de_DeleteResourceServerCommand = async ( const response: DeleteResourceServerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4775,10 +4671,9 @@ const de_DeleteResourceServerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4798,7 +4693,7 @@ export const de_DeleteUserCommand = async ( const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4843,10 +4738,9 @@ const de_DeleteUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4864,12 +4758,12 @@ export const de_DeleteUserAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserAttributesResponse(data, context); + contents = _json(data); const response: DeleteUserAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4914,10 +4808,9 @@ const de_DeleteUserAttributesCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4937,7 +4830,7 @@ export const de_DeleteUserPoolCommand = async ( const response: DeleteUserPoolCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4973,10 +4866,9 @@ const de_DeleteUserPoolCommandError = async ( throw await de_UserImportInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4996,7 +4888,7 @@ export const de_DeleteUserPoolClientCommand = async ( const response: DeleteUserPoolClientCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5032,10 +4924,9 @@ const de_DeleteUserPoolClientCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5053,12 +4944,12 @@ export const de_DeleteUserPoolDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserPoolDomainResponse(data, context); + contents = _json(data); const response: DeleteUserPoolDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5088,10 +4979,9 @@ const de_DeleteUserPoolDomainCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5114,7 +5004,7 @@ export const de_DescribeIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5147,10 +5037,9 @@ const de_DescribeIdentityProviderCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5168,12 +5057,12 @@ export const de_DescribeResourceServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeResourceServerResponse(data, context); + contents = _json(data); const response: DescribeResourceServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5206,10 +5095,9 @@ const de_DescribeResourceServerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5232,7 +5120,7 @@ export const de_DescribeRiskConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5268,10 +5156,9 @@ const de_DescribeRiskConfigurationCommandError = async ( throw await de_UserPoolAddOnNotEnabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5294,7 +5181,7 @@ export const de_DescribeUserImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5327,10 +5214,9 @@ const de_DescribeUserImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5353,7 +5239,7 @@ export const de_DescribeUserPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5389,10 +5275,9 @@ const de_DescribeUserPoolCommandError = async ( throw await de_UserPoolTaggingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5415,7 +5300,7 @@ export const de_DescribeUserPoolClientCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5448,10 +5333,9 @@ const de_DescribeUserPoolClientCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5469,12 +5353,12 @@ export const de_DescribeUserPoolDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeUserPoolDomainResponse(data, context); + contents = _json(data); const response: DescribeUserPoolDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5504,10 +5388,9 @@ const de_DescribeUserPoolDomainCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5527,7 +5410,7 @@ export const de_ForgetDeviceCommand = async ( const response: ForgetDeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5575,10 +5458,9 @@ const de_ForgetDeviceCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5596,12 +5478,12 @@ export const de_ForgotPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ForgotPasswordResponse(data, context); + contents = _json(data); const response: ForgotPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5664,10 +5546,9 @@ const de_ForgotPasswordCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5685,12 +5566,12 @@ export const de_GetCSVHeaderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCSVHeaderResponse(data, context); + contents = _json(data); const response: GetCSVHeaderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5723,10 +5604,9 @@ const de_GetCSVHeaderCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5749,7 +5629,7 @@ export const de_GetDeviceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5797,10 +5677,9 @@ const de_GetDeviceCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5823,7 +5702,7 @@ export const de_GetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5856,10 +5735,9 @@ const de_GetGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5882,7 +5760,7 @@ export const de_GetIdentityProviderByIdentifierCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5915,10 +5793,9 @@ const de_GetIdentityProviderByIdentifierCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5936,12 +5813,12 @@ export const de_GetSigningCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSigningCertificateResponse(data, context); + contents = _json(data); const response: GetSigningCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5968,10 +5845,9 @@ const de_GetSigningCertificateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5994,7 +5870,7 @@ export const de_GetUICustomizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6027,10 +5903,9 @@ const de_GetUICustomizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6048,12 +5923,12 @@ export const de_GetUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetUserResponse(data, context); + contents = _json(data); const response: GetUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6098,10 +5973,9 @@ const de_GetUserCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6119,12 +5993,12 @@ export const de_GetUserAttributeVerificationCodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetUserAttributeVerificationCodeResponse(data, context); + contents = _json(data); const response: GetUserAttributeVerificationCodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6193,10 +6067,9 @@ const de_GetUserAttributeVerificationCodeCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6214,12 +6087,12 @@ export const de_GetUserPoolMfaConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetUserPoolMfaConfigResponse(data, context); + contents = _json(data); const response: GetUserPoolMfaConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6252,10 +6125,9 @@ const de_GetUserPoolMfaConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6273,12 +6145,12 @@ export const de_GlobalSignOutCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GlobalSignOutResponse(data, context); + contents = _json(data); const response: GlobalSignOutCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6320,10 +6192,9 @@ const de_GlobalSignOutCommandError = async ( throw await de_UserNotConfirmedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6341,12 +6212,12 @@ export const de_InitiateAuthCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_InitiateAuthResponse(data, context); + contents = _json(data); const response: InitiateAuthCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6409,10 +6280,9 @@ const de_InitiateAuthCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6435,7 +6305,7 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6483,10 +6353,9 @@ const de_ListDevicesCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6509,7 +6378,7 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6542,10 +6411,9 @@ const de_ListGroupsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6568,7 +6436,7 @@ export const de_ListIdentityProvidersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6601,10 +6469,9 @@ const de_ListIdentityProvidersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6622,12 +6489,12 @@ export const de_ListResourceServersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourceServersResponse(data, context); + contents = _json(data); const response: ListResourceServersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6660,10 +6527,9 @@ const de_ListResourceServersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6681,12 +6547,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6719,10 +6585,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6745,7 +6610,7 @@ export const de_ListUserImportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6778,10 +6643,9 @@ const de_ListUserImportJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6799,12 +6663,12 @@ export const de_ListUserPoolClientsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListUserPoolClientsResponse(data, context); + contents = _json(data); const response: ListUserPoolClientsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6837,10 +6701,9 @@ const de_ListUserPoolClientsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6863,7 +6726,7 @@ export const de_ListUserPoolsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6893,10 +6756,9 @@ const de_ListUserPoolsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6919,7 +6781,7 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6952,10 +6814,9 @@ const de_ListUsersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6978,7 +6839,7 @@ export const de_ListUsersInGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7011,10 +6872,9 @@ const de_ListUsersInGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7032,12 +6892,12 @@ export const de_ResendConfirmationCodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResendConfirmationCodeResponse(data, context); + contents = _json(data); const response: ResendConfirmationCodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7100,10 +6960,9 @@ const de_ResendConfirmationCodeCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7121,12 +6980,12 @@ export const de_RespondToAuthChallengeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RespondToAuthChallengeResponse(data, context); + contents = _json(data); const response: RespondToAuthChallengeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7207,10 +7066,9 @@ const de_RespondToAuthChallengeCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7228,12 +7086,12 @@ export const de_RevokeTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RevokeTokenResponse(data, context); + contents = _json(data); const response: RevokeTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7272,10 +7130,9 @@ const de_RevokeTokenCommandError = async ( throw await de_UnsupportedTokenTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7298,7 +7155,7 @@ export const de_SetRiskConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7340,10 +7197,9 @@ const de_SetRiskConfigurationCommandError = async ( throw await de_UserPoolAddOnNotEnabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7366,7 +7222,7 @@ export const de_SetUICustomizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7399,10 +7255,9 @@ const de_SetUICustomizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7420,12 +7275,12 @@ export const de_SetUserMFAPreferenceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetUserMFAPreferenceResponse(data, context); + contents = _json(data); const response: SetUserMFAPreferenceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7467,10 +7322,9 @@ const de_SetUserMFAPreferenceCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7488,12 +7342,12 @@ export const de_SetUserPoolMfaConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetUserPoolMfaConfigResponse(data, context); + contents = _json(data); const response: SetUserPoolMfaConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7532,10 +7386,9 @@ const de_SetUserPoolMfaConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7553,12 +7406,12 @@ export const de_SetUserSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetUserSettingsResponse(data, context); + contents = _json(data); const response: SetUserSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7600,10 +7453,9 @@ const de_SetUserSettingsCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7621,12 +7473,12 @@ export const de_SignUpCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SignUpResponse(data, context); + contents = _json(data); const response: SignUpCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7686,10 +7538,9 @@ const de_SignUpCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UsernameExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7712,7 +7563,7 @@ export const de_StartUserImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7748,10 +7599,9 @@ const de_StartUserImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7774,7 +7624,7 @@ export const de_StopUserImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7810,10 +7660,9 @@ const de_StopUserImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7831,12 +7680,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7869,10 +7718,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7890,12 +7738,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7928,10 +7776,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7949,12 +7796,12 @@ export const de_UpdateAuthEventFeedbackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAuthEventFeedbackResponse(data, context); + contents = _json(data); const response: UpdateAuthEventFeedbackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7993,10 +7840,9 @@ const de_UpdateAuthEventFeedbackCommandError = async ( throw await de_UserPoolAddOnNotEnabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8014,12 +7860,12 @@ export const de_UpdateDeviceStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDeviceStatusResponse(data, context); + contents = _json(data); const response: UpdateDeviceStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8067,10 +7913,9 @@ const de_UpdateDeviceStatusCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8093,7 +7938,7 @@ export const de_UpdateGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8126,10 +7971,9 @@ const de_UpdateGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8152,7 +7996,7 @@ export const de_UpdateIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8191,10 +8035,9 @@ const de_UpdateIdentityProviderCommandError = async ( throw await de_UnsupportedIdentityProviderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8212,12 +8055,12 @@ export const de_UpdateResourceServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResourceServerResponse(data, context); + contents = _json(data); const response: UpdateResourceServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8250,10 +8093,9 @@ const de_UpdateResourceServerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8271,12 +8113,12 @@ export const de_UpdateUserAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserAttributesResponse(data, context); + contents = _json(data); const response: UpdateUserAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8351,10 +8193,9 @@ const de_UpdateUserAttributesCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8372,12 +8213,12 @@ export const de_UpdateUserPoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserPoolResponse(data, context); + contents = _json(data); const response: UpdateUserPoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8428,10 +8269,9 @@ const de_UpdateUserPoolCommandError = async ( throw await de_UserPoolTaggingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8454,7 +8294,7 @@ export const de_UpdateUserPoolClientCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8496,10 +8336,9 @@ const de_UpdateUserPoolClientCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8517,12 +8356,12 @@ export const de_UpdateUserPoolDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserPoolDomainResponse(data, context); + contents = _json(data); const response: UpdateUserPoolDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8555,10 +8394,9 @@ const de_UpdateUserPoolDomainCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8576,12 +8414,12 @@ export const de_VerifySoftwareTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VerifySoftwareTokenResponse(data, context); + contents = _json(data); const response: VerifySoftwareTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8638,10 +8476,9 @@ const de_VerifySoftwareTokenCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8659,12 +8496,12 @@ export const de_VerifyUserAttributeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VerifyUserAttributeResponse(data, context); + contents = _json(data); const response: VerifyUserAttributeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8721,10 +8558,9 @@ const de_VerifyUserAttributeCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8738,7 +8574,7 @@ const de_AliasExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AliasExistsException(body, context); + const deserialized: any = _json(body); const exception = new AliasExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8754,7 +8590,7 @@ const de_CodeDeliveryFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CodeDeliveryFailureException(body, context); + const deserialized: any = _json(body); const exception = new CodeDeliveryFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8770,7 +8606,7 @@ const de_CodeMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CodeMismatchException(body, context); + const deserialized: any = _json(body); const exception = new CodeMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8786,7 +8622,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8802,7 +8638,7 @@ const de_DuplicateProviderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateProviderException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateProviderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8818,7 +8654,7 @@ const de_EnableSoftwareTokenMFAExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EnableSoftwareTokenMFAException(body, context); + const deserialized: any = _json(body); const exception = new EnableSoftwareTokenMFAException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8834,7 +8670,7 @@ const de_ExpiredCodeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredCodeException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredCodeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8847,7 +8683,7 @@ const de_ExpiredCodeExceptionRes = async ( */ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ForbiddenException(body, context); + const deserialized: any = _json(body); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8863,7 +8699,7 @@ const de_GroupExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GroupExistsException(body, context); + const deserialized: any = _json(body); const exception = new GroupExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8879,7 +8715,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8895,7 +8731,7 @@ const de_InvalidEmailRoleAccessPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEmailRoleAccessPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEmailRoleAccessPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8911,7 +8747,7 @@ const de_InvalidLambdaResponseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLambdaResponseException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLambdaResponseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8927,7 +8763,7 @@ const de_InvalidOAuthFlowExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOAuthFlowException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOAuthFlowException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8943,7 +8779,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8959,7 +8795,7 @@ const de_InvalidPasswordExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPasswordException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPasswordException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8975,7 +8811,7 @@ const de_InvalidSmsRoleAccessPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSmsRoleAccessPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSmsRoleAccessPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8991,7 +8827,7 @@ const de_InvalidSmsRoleTrustRelationshipExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSmsRoleTrustRelationshipException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSmsRoleTrustRelationshipException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9007,7 +8843,7 @@ const de_InvalidUserPoolConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUserPoolConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidUserPoolConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9023,7 +8859,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9039,7 +8875,7 @@ const de_MFAMethodNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MFAMethodNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new MFAMethodNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9055,7 +8891,7 @@ const de_NotAuthorizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotAuthorizedException(body, context); + const deserialized: any = _json(body); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9071,7 +8907,7 @@ const de_PasswordResetRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PasswordResetRequiredException(body, context); + const deserialized: any = _json(body); const exception = new PasswordResetRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9087,7 +8923,7 @@ const de_PreconditionNotMetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PreconditionNotMetException(body, context); + const deserialized: any = _json(body); const exception = new PreconditionNotMetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9103,7 +8939,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9119,7 +8955,7 @@ const de_ScopeDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ScopeDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new ScopeDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9135,7 +8971,7 @@ const de_SoftwareTokenMFANotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SoftwareTokenMFANotFoundException(body, context); + const deserialized: any = _json(body); const exception = new SoftwareTokenMFANotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9151,7 +8987,7 @@ const de_TooManyFailedAttemptsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyFailedAttemptsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyFailedAttemptsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9167,7 +9003,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9183,7 +9019,7 @@ const de_UnauthorizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnauthorizedException(body, context); + const deserialized: any = _json(body); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9199,7 +9035,7 @@ const de_UnexpectedLambdaExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnexpectedLambdaException(body, context); + const deserialized: any = _json(body); const exception = new UnexpectedLambdaException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9215,7 +9051,7 @@ const de_UnsupportedIdentityProviderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedIdentityProviderException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedIdentityProviderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9231,7 +9067,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9247,7 +9083,7 @@ const de_UnsupportedTokenTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedTokenTypeException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedTokenTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9263,7 +9099,7 @@ const de_UnsupportedUserStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedUserStateException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedUserStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9279,7 +9115,7 @@ const de_UserImportInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserImportInProgressException(body, context); + const deserialized: any = _json(body); const exception = new UserImportInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9295,7 +9131,7 @@ const de_UserLambdaValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserLambdaValidationException(body, context); + const deserialized: any = _json(body); const exception = new UserLambdaValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9311,7 +9147,7 @@ const de_UsernameExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UsernameExistsException(body, context); + const deserialized: any = _json(body); const exception = new UsernameExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9327,7 +9163,7 @@ const de_UserNotConfirmedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserNotConfirmedException(body, context); + const deserialized: any = _json(body); const exception = new UserNotConfirmedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9343,7 +9179,7 @@ const de_UserNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new UserNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9359,7 +9195,7 @@ const de_UserPoolAddOnNotEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserPoolAddOnNotEnabledException(body, context); + const deserialized: any = _json(body); const exception = new UserPoolAddOnNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9375,7 +9211,7 @@ const de_UserPoolTaggingExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserPoolTaggingException(body, context); + const deserialized: any = _json(body); const exception = new UserPoolTaggingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -9383,4510 +9219,1166 @@ const de_UserPoolTaggingExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccountRecoverySettingType - */ -const se_AccountRecoverySettingType = (input: AccountRecoverySettingType, context: __SerdeContext): any => { - return { - ...(input.RecoveryMechanisms != null && { - RecoveryMechanisms: se_RecoveryMechanismsType(input.RecoveryMechanisms, context), - }), - }; -}; +// se_AccountRecoverySettingType omitted. -/** - * serializeAws_json1_1AccountTakeoverActionsType - */ -const se_AccountTakeoverActionsType = (input: AccountTakeoverActionsType, context: __SerdeContext): any => { - return { - ...(input.HighAction != null && { HighAction: se_AccountTakeoverActionType(input.HighAction, context) }), - ...(input.LowAction != null && { LowAction: se_AccountTakeoverActionType(input.LowAction, context) }), - ...(input.MediumAction != null && { MediumAction: se_AccountTakeoverActionType(input.MediumAction, context) }), - }; -}; +// se_AccountTakeoverActionsType omitted. -/** - * serializeAws_json1_1AccountTakeoverActionType - */ -const se_AccountTakeoverActionType = (input: AccountTakeoverActionType, context: __SerdeContext): any => { - return { - ...(input.EventAction != null && { EventAction: input.EventAction }), - ...(input.Notify != null && { Notify: input.Notify }), - }; -}; +// se_AccountTakeoverActionType omitted. -/** - * serializeAws_json1_1AccountTakeoverRiskConfigurationType - */ -const se_AccountTakeoverRiskConfigurationType = ( - input: AccountTakeoverRiskConfigurationType, - context: __SerdeContext -): any => { - return { - ...(input.Actions != null && { Actions: se_AccountTakeoverActionsType(input.Actions, context) }), - ...(input.NotifyConfiguration != null && { - NotifyConfiguration: se_NotifyConfigurationType(input.NotifyConfiguration, context), - }), - }; -}; +// se_AccountTakeoverRiskConfigurationType omitted. -/** - * serializeAws_json1_1AddCustomAttributesRequest - */ -const se_AddCustomAttributesRequest = (input: AddCustomAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.CustomAttributes != null && { - CustomAttributes: se_CustomAttributesListType(input.CustomAttributes, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_AddCustomAttributesRequest omitted. -/** - * serializeAws_json1_1AdminAddUserToGroupRequest - */ -const se_AdminAddUserToGroupRequest = (input: AdminAddUserToGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminAddUserToGroupRequest omitted. -/** - * serializeAws_json1_1AdminConfirmSignUpRequest - */ -const se_AdminConfirmSignUpRequest = (input: AdminConfirmSignUpRequest, context: __SerdeContext): any => { - return { - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminConfirmSignUpRequest omitted. -/** - * serializeAws_json1_1AdminCreateUserConfigType - */ -const se_AdminCreateUserConfigType = (input: AdminCreateUserConfigType, context: __SerdeContext): any => { - return { - ...(input.AllowAdminCreateUserOnly != null && { AllowAdminCreateUserOnly: input.AllowAdminCreateUserOnly }), - ...(input.InviteMessageTemplate != null && { - InviteMessageTemplate: se_MessageTemplateType(input.InviteMessageTemplate, context), - }), - ...(input.UnusedAccountValidityDays != null && { UnusedAccountValidityDays: input.UnusedAccountValidityDays }), - }; -}; +// se_AdminCreateUserConfigType omitted. -/** - * serializeAws_json1_1AdminCreateUserRequest - */ -const se_AdminCreateUserRequest = (input: AdminCreateUserRequest, context: __SerdeContext): any => { - return { - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.DesiredDeliveryMediums != null && { - DesiredDeliveryMediums: se_DeliveryMediumListType(input.DesiredDeliveryMediums, context), - }), - ...(input.ForceAliasCreation != null && { ForceAliasCreation: input.ForceAliasCreation }), - ...(input.MessageAction != null && { MessageAction: input.MessageAction }), - ...(input.TemporaryPassword != null && { TemporaryPassword: input.TemporaryPassword }), - ...(input.UserAttributes != null && { UserAttributes: se_AttributeListType(input.UserAttributes, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - ...(input.ValidationData != null && { ValidationData: se_AttributeListType(input.ValidationData, context) }), - }; -}; +// se_AdminCreateUserRequest omitted. -/** - * serializeAws_json1_1AdminDeleteUserAttributesRequest - */ -const se_AdminDeleteUserAttributesRequest = (input: AdminDeleteUserAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.UserAttributeNames != null && { - UserAttributeNames: se_AttributeNameListType(input.UserAttributeNames, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminDeleteUserAttributesRequest omitted. -/** - * serializeAws_json1_1AdminDeleteUserRequest - */ -const se_AdminDeleteUserRequest = (input: AdminDeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminDeleteUserRequest omitted. -/** - * serializeAws_json1_1AdminDisableProviderForUserRequest - */ -const se_AdminDisableProviderForUserRequest = ( - input: AdminDisableProviderForUserRequest, - context: __SerdeContext -): any => { - return { - ...(input.User != null && { User: se_ProviderUserIdentifierType(input.User, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_AdminDisableProviderForUserRequest omitted. -/** - * serializeAws_json1_1AdminDisableUserRequest - */ -const se_AdminDisableUserRequest = (input: AdminDisableUserRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminDisableUserRequest omitted. -/** - * serializeAws_json1_1AdminEnableUserRequest - */ -const se_AdminEnableUserRequest = (input: AdminEnableUserRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminEnableUserRequest omitted. -/** - * serializeAws_json1_1AdminForgetDeviceRequest - */ -const se_AdminForgetDeviceRequest = (input: AdminForgetDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminForgetDeviceRequest omitted. -/** - * serializeAws_json1_1AdminGetDeviceRequest - */ -const se_AdminGetDeviceRequest = (input: AdminGetDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminGetDeviceRequest omitted. -/** - * serializeAws_json1_1AdminGetUserRequest - */ -const se_AdminGetUserRequest = (input: AdminGetUserRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminGetUserRequest omitted. -/** - * serializeAws_json1_1AdminInitiateAuthRequest - */ -const se_AdminInitiateAuthRequest = (input: AdminInitiateAuthRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.AuthFlow != null && { AuthFlow: input.AuthFlow }), - ...(input.AuthParameters != null && { AuthParameters: se_AuthParametersType(input.AuthParameters, context) }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.ContextData != null && { ContextData: se_ContextDataType(input.ContextData, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_AdminInitiateAuthRequest omitted. -/** - * serializeAws_json1_1AdminLinkProviderForUserRequest - */ -const se_AdminLinkProviderForUserRequest = (input: AdminLinkProviderForUserRequest, context: __SerdeContext): any => { - return { - ...(input.DestinationUser != null && { - DestinationUser: se_ProviderUserIdentifierType(input.DestinationUser, context), - }), - ...(input.SourceUser != null && { SourceUser: se_ProviderUserIdentifierType(input.SourceUser, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_AdminLinkProviderForUserRequest omitted. -/** - * serializeAws_json1_1AdminListDevicesRequest - */ -const se_AdminListDevicesRequest = (input: AdminListDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminListDevicesRequest omitted. -/** - * serializeAws_json1_1AdminListGroupsForUserRequest - */ -const se_AdminListGroupsForUserRequest = (input: AdminListGroupsForUserRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminListGroupsForUserRequest omitted. -/** - * serializeAws_json1_1AdminListUserAuthEventsRequest - */ -const se_AdminListUserAuthEventsRequest = (input: AdminListUserAuthEventsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminListUserAuthEventsRequest omitted. -/** - * serializeAws_json1_1AdminRemoveUserFromGroupRequest - */ -const se_AdminRemoveUserFromGroupRequest = (input: AdminRemoveUserFromGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminRemoveUserFromGroupRequest omitted. -/** - * serializeAws_json1_1AdminResetUserPasswordRequest - */ -const se_AdminResetUserPasswordRequest = (input: AdminResetUserPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminResetUserPasswordRequest omitted. -/** - * serializeAws_json1_1AdminRespondToAuthChallengeRequest - */ -const se_AdminRespondToAuthChallengeRequest = ( - input: AdminRespondToAuthChallengeRequest, - context: __SerdeContext -): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ChallengeName != null && { ChallengeName: input.ChallengeName }), - ...(input.ChallengeResponses != null && { - ChallengeResponses: se_ChallengeResponsesType(input.ChallengeResponses, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.ContextData != null && { ContextData: se_ContextDataType(input.ContextData, context) }), - ...(input.Session != null && { Session: input.Session }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_AdminRespondToAuthChallengeRequest omitted. -/** - * serializeAws_json1_1AdminSetUserMFAPreferenceRequest - */ -const se_AdminSetUserMFAPreferenceRequest = (input: AdminSetUserMFAPreferenceRequest, context: __SerdeContext): any => { - return { - ...(input.SMSMfaSettings != null && { SMSMfaSettings: se_SMSMfaSettingsType(input.SMSMfaSettings, context) }), - ...(input.SoftwareTokenMfaSettings != null && { - SoftwareTokenMfaSettings: se_SoftwareTokenMfaSettingsType(input.SoftwareTokenMfaSettings, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminSetUserMFAPreferenceRequest omitted. -/** - * serializeAws_json1_1AdminSetUserPasswordRequest - */ -const se_AdminSetUserPasswordRequest = (input: AdminSetUserPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Permanent != null && { Permanent: input.Permanent }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminSetUserPasswordRequest omitted. -/** - * serializeAws_json1_1AdminSetUserSettingsRequest - */ -const se_AdminSetUserSettingsRequest = (input: AdminSetUserSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.MFAOptions != null && { MFAOptions: se_MFAOptionListType(input.MFAOptions, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminSetUserSettingsRequest omitted. -/** - * serializeAws_json1_1AdminUpdateAuthEventFeedbackRequest - */ -const se_AdminUpdateAuthEventFeedbackRequest = ( - input: AdminUpdateAuthEventFeedbackRequest, - context: __SerdeContext -): any => { - return { - ...(input.EventId != null && { EventId: input.EventId }), - ...(input.FeedbackValue != null && { FeedbackValue: input.FeedbackValue }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminUpdateAuthEventFeedbackRequest omitted. -/** - * serializeAws_json1_1AdminUpdateDeviceStatusRequest - */ -const se_AdminUpdateDeviceStatusRequest = (input: AdminUpdateDeviceStatusRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - ...(input.DeviceRememberedStatus != null && { DeviceRememberedStatus: input.DeviceRememberedStatus }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminUpdateDeviceStatusRequest omitted. -/** - * serializeAws_json1_1AdminUpdateUserAttributesRequest - */ -const se_AdminUpdateUserAttributesRequest = (input: AdminUpdateUserAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.UserAttributes != null && { UserAttributes: se_AttributeListType(input.UserAttributes, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminUpdateUserAttributesRequest omitted. -/** - * serializeAws_json1_1AdminUserGlobalSignOutRequest - */ -const se_AdminUserGlobalSignOutRequest = (input: AdminUserGlobalSignOutRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_AdminUserGlobalSignOutRequest omitted. -/** - * serializeAws_json1_1AliasAttributesListType - */ -const se_AliasAttributesListType = (input: (AliasAttributeType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AliasAttributesListType omitted. -/** - * serializeAws_json1_1AnalyticsConfigurationType - */ -const se_AnalyticsConfigurationType = (input: AnalyticsConfigurationType, context: __SerdeContext): any => { - return { - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UserDataShared != null && { UserDataShared: input.UserDataShared }), - }; -}; +// se_AnalyticsConfigurationType omitted. -/** - * serializeAws_json1_1AnalyticsMetadataType - */ -const se_AnalyticsMetadataType = (input: AnalyticsMetadataType, context: __SerdeContext): any => { - return { - ...(input.AnalyticsEndpointId != null && { AnalyticsEndpointId: input.AnalyticsEndpointId }), - }; -}; +// se_AnalyticsMetadataType omitted. -/** - * serializeAws_json1_1AssociateSoftwareTokenRequest - */ -const se_AssociateSoftwareTokenRequest = (input: AssociateSoftwareTokenRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.Session != null && { Session: input.Session }), - }; -}; +// se_AssociateSoftwareTokenRequest omitted. -/** - * serializeAws_json1_1AttributeListType - */ -const se_AttributeListType = (input: AttributeType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttributeType(entry, context); - }); -}; +// se_AttributeListType omitted. -/** - * serializeAws_json1_1AttributeMappingType - */ -const se_AttributeMappingType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AttributeMappingType omitted. -/** - * serializeAws_json1_1AttributeNameListType - */ -const se_AttributeNameListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttributeNameListType omitted. -/** - * serializeAws_json1_1AttributesRequireVerificationBeforeUpdateType - */ -const se_AttributesRequireVerificationBeforeUpdateType = ( - input: (VerifiedAttributeType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttributesRequireVerificationBeforeUpdateType omitted. -/** - * serializeAws_json1_1AttributeType - */ -const se_AttributeType = (input: AttributeType, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AttributeType omitted. -/** - * serializeAws_json1_1AuthParametersType - */ -const se_AuthParametersType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AuthParametersType omitted. -/** - * serializeAws_json1_1BlockedIPRangeListType - */ -const se_BlockedIPRangeListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BlockedIPRangeListType omitted. -/** - * serializeAws_json1_1CallbackURLsListType - */ -const se_CallbackURLsListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CallbackURLsListType omitted. -/** - * serializeAws_json1_1ChallengeResponsesType - */ -const se_ChallengeResponsesType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ChallengeResponsesType omitted. -/** - * serializeAws_json1_1ChangePasswordRequest - */ -const se_ChangePasswordRequest = (input: ChangePasswordRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.PreviousPassword != null && { PreviousPassword: input.PreviousPassword }), - ...(input.ProposedPassword != null && { ProposedPassword: input.ProposedPassword }), - }; -}; +// se_ChangePasswordRequest omitted. -/** - * serializeAws_json1_1ClientMetadataType - */ -const se_ClientMetadataType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ClientMetadataType omitted. -/** - * serializeAws_json1_1ClientPermissionListType - */ -const se_ClientPermissionListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ClientPermissionListType omitted. -/** - * serializeAws_json1_1CompromisedCredentialsActionsType - */ -const se_CompromisedCredentialsActionsType = ( - input: CompromisedCredentialsActionsType, - context: __SerdeContext -): any => { - return { - ...(input.EventAction != null && { EventAction: input.EventAction }), - }; -}; +// se_CompromisedCredentialsActionsType omitted. -/** - * serializeAws_json1_1CompromisedCredentialsRiskConfigurationType - */ -const se_CompromisedCredentialsRiskConfigurationType = ( - input: CompromisedCredentialsRiskConfigurationType, - context: __SerdeContext -): any => { - return { - ...(input.Actions != null && { Actions: se_CompromisedCredentialsActionsType(input.Actions, context) }), - ...(input.EventFilter != null && { EventFilter: se_EventFiltersType(input.EventFilter, context) }), - }; -}; +// se_CompromisedCredentialsRiskConfigurationType omitted. -/** - * serializeAws_json1_1ConfirmDeviceRequest - */ -const se_ConfirmDeviceRequest = (input: ConfirmDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.DeviceSecretVerifierConfig != null && { - DeviceSecretVerifierConfig: se_DeviceSecretVerifierConfigType(input.DeviceSecretVerifierConfig, context), - }), - }; -}; +// se_ConfirmDeviceRequest omitted. -/** - * serializeAws_json1_1ConfirmForgotPasswordRequest - */ -const se_ConfirmForgotPasswordRequest = (input: ConfirmForgotPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.ConfirmationCode != null && { ConfirmationCode: input.ConfirmationCode }), - ...(input.Password != null && { Password: input.Password }), - ...(input.SecretHash != null && { SecretHash: input.SecretHash }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_ConfirmForgotPasswordRequest omitted. -/** - * serializeAws_json1_1ConfirmSignUpRequest - */ -const se_ConfirmSignUpRequest = (input: ConfirmSignUpRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.ConfirmationCode != null && { ConfirmationCode: input.ConfirmationCode }), - ...(input.ForceAliasCreation != null && { ForceAliasCreation: input.ForceAliasCreation }), - ...(input.SecretHash != null && { SecretHash: input.SecretHash }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_ConfirmSignUpRequest omitted. -/** - * serializeAws_json1_1ContextDataType - */ -const se_ContextDataType = (input: ContextDataType, context: __SerdeContext): any => { - return { - ...(input.EncodedData != null && { EncodedData: input.EncodedData }), - ...(input.HttpHeaders != null && { HttpHeaders: se_HttpHeaderList(input.HttpHeaders, context) }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServerPath != null && { ServerPath: input.ServerPath }), - }; -}; +// se_ContextDataType omitted. -/** - * serializeAws_json1_1CreateGroupRequest - */ -const se_CreateGroupRequest = (input: CreateGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.Precedence != null && { Precedence: input.Precedence }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CreateGroupRequest omitted. -/** - * serializeAws_json1_1CreateIdentityProviderRequest - */ -const se_CreateIdentityProviderRequest = (input: CreateIdentityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.AttributeMapping != null && { - AttributeMapping: se_AttributeMappingType(input.AttributeMapping, context), - }), - ...(input.IdpIdentifiers != null && { IdpIdentifiers: se_IdpIdentifiersListType(input.IdpIdentifiers, context) }), - ...(input.ProviderDetails != null && { ProviderDetails: se_ProviderDetailsType(input.ProviderDetails, context) }), - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.ProviderType != null && { ProviderType: input.ProviderType }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CreateIdentityProviderRequest omitted. -/** - * serializeAws_json1_1CreateResourceServerRequest - */ -const se_CreateResourceServerRequest = (input: CreateResourceServerRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scopes != null && { Scopes: se_ResourceServerScopeListType(input.Scopes, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CreateResourceServerRequest omitted. -/** - * serializeAws_json1_1CreateUserImportJobRequest - */ -const se_CreateUserImportJobRequest = (input: CreateUserImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsRoleArn != null && { CloudWatchLogsRoleArn: input.CloudWatchLogsRoleArn }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CreateUserImportJobRequest omitted. -/** - * serializeAws_json1_1CreateUserPoolClientRequest - */ -const se_CreateUserPoolClientRequest = (input: CreateUserPoolClientRequest, context: __SerdeContext): any => { - return { - ...(input.AccessTokenValidity != null && { AccessTokenValidity: input.AccessTokenValidity }), - ...(input.AllowedOAuthFlows != null && { AllowedOAuthFlows: se_OAuthFlowsType(input.AllowedOAuthFlows, context) }), - ...(input.AllowedOAuthFlowsUserPoolClient != null && { - AllowedOAuthFlowsUserPoolClient: input.AllowedOAuthFlowsUserPoolClient, - }), - ...(input.AllowedOAuthScopes != null && { - AllowedOAuthScopes: se_ScopeListType(input.AllowedOAuthScopes, context), - }), - ...(input.AnalyticsConfiguration != null && { - AnalyticsConfiguration: se_AnalyticsConfigurationType(input.AnalyticsConfiguration, context), - }), - ...(input.AuthSessionValidity != null && { AuthSessionValidity: input.AuthSessionValidity }), - ...(input.CallbackURLs != null && { CallbackURLs: se_CallbackURLsListType(input.CallbackURLs, context) }), - ...(input.ClientName != null && { ClientName: input.ClientName }), - ...(input.DefaultRedirectURI != null && { DefaultRedirectURI: input.DefaultRedirectURI }), - ...(input.EnablePropagateAdditionalUserContextData != null && { - EnablePropagateAdditionalUserContextData: input.EnablePropagateAdditionalUserContextData, - }), - ...(input.EnableTokenRevocation != null && { EnableTokenRevocation: input.EnableTokenRevocation }), - ...(input.ExplicitAuthFlows != null && { - ExplicitAuthFlows: se_ExplicitAuthFlowsListType(input.ExplicitAuthFlows, context), - }), - ...(input.GenerateSecret != null && { GenerateSecret: input.GenerateSecret }), - ...(input.IdTokenValidity != null && { IdTokenValidity: input.IdTokenValidity }), - ...(input.LogoutURLs != null && { LogoutURLs: se_LogoutURLsListType(input.LogoutURLs, context) }), - ...(input.PreventUserExistenceErrors != null && { PreventUserExistenceErrors: input.PreventUserExistenceErrors }), - ...(input.ReadAttributes != null && { ReadAttributes: se_ClientPermissionListType(input.ReadAttributes, context) }), - ...(input.RefreshTokenValidity != null && { RefreshTokenValidity: input.RefreshTokenValidity }), - ...(input.SupportedIdentityProviders != null && { - SupportedIdentityProviders: se_SupportedIdentityProvidersListType(input.SupportedIdentityProviders, context), - }), - ...(input.TokenValidityUnits != null && { - TokenValidityUnits: se_TokenValidityUnitsType(input.TokenValidityUnits, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.WriteAttributes != null && { - WriteAttributes: se_ClientPermissionListType(input.WriteAttributes, context), - }), - }; -}; - -/** - * serializeAws_json1_1CreateUserPoolDomainRequest - */ -const se_CreateUserPoolDomainRequest = (input: CreateUserPoolDomainRequest, context: __SerdeContext): any => { - return { - ...(input.CustomDomainConfig != null && { - CustomDomainConfig: se_CustomDomainConfigType(input.CustomDomainConfig, context), - }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CreateUserPoolClientRequest omitted. -/** - * serializeAws_json1_1CreateUserPoolRequest - */ -const se_CreateUserPoolRequest = (input: CreateUserPoolRequest, context: __SerdeContext): any => { - return { - ...(input.AccountRecoverySetting != null && { - AccountRecoverySetting: se_AccountRecoverySettingType(input.AccountRecoverySetting, context), - }), - ...(input.AdminCreateUserConfig != null && { - AdminCreateUserConfig: se_AdminCreateUserConfigType(input.AdminCreateUserConfig, context), - }), - ...(input.AliasAttributes != null && { - AliasAttributes: se_AliasAttributesListType(input.AliasAttributes, context), - }), - ...(input.AutoVerifiedAttributes != null && { - AutoVerifiedAttributes: se_VerifiedAttributesListType(input.AutoVerifiedAttributes, context), - }), - ...(input.DeletionProtection != null && { DeletionProtection: input.DeletionProtection }), - ...(input.DeviceConfiguration != null && { - DeviceConfiguration: se_DeviceConfigurationType(input.DeviceConfiguration, context), - }), - ...(input.EmailConfiguration != null && { - EmailConfiguration: se_EmailConfigurationType(input.EmailConfiguration, context), - }), - ...(input.EmailVerificationMessage != null && { EmailVerificationMessage: input.EmailVerificationMessage }), - ...(input.EmailVerificationSubject != null && { EmailVerificationSubject: input.EmailVerificationSubject }), - ...(input.LambdaConfig != null && { LambdaConfig: se_LambdaConfigType(input.LambdaConfig, context) }), - ...(input.MfaConfiguration != null && { MfaConfiguration: input.MfaConfiguration }), - ...(input.Policies != null && { Policies: se_UserPoolPolicyType(input.Policies, context) }), - ...(input.PoolName != null && { PoolName: input.PoolName }), - ...(input.Schema != null && { Schema: se_SchemaAttributesListType(input.Schema, context) }), - ...(input.SmsAuthenticationMessage != null && { SmsAuthenticationMessage: input.SmsAuthenticationMessage }), - ...(input.SmsConfiguration != null && { - SmsConfiguration: se_SmsConfigurationType(input.SmsConfiguration, context), - }), - ...(input.SmsVerificationMessage != null && { SmsVerificationMessage: input.SmsVerificationMessage }), - ...(input.UserAttributeUpdateSettings != null && { - UserAttributeUpdateSettings: se_UserAttributeUpdateSettingsType(input.UserAttributeUpdateSettings, context), - }), - ...(input.UserPoolAddOns != null && { UserPoolAddOns: se_UserPoolAddOnsType(input.UserPoolAddOns, context) }), - ...(input.UserPoolTags != null && { UserPoolTags: se_UserPoolTagsType(input.UserPoolTags, context) }), - ...(input.UsernameAttributes != null && { - UsernameAttributes: se_UsernameAttributesListType(input.UsernameAttributes, context), - }), - ...(input.UsernameConfiguration != null && { - UsernameConfiguration: se_UsernameConfigurationType(input.UsernameConfiguration, context), - }), - ...(input.VerificationMessageTemplate != null && { - VerificationMessageTemplate: se_VerificationMessageTemplateType(input.VerificationMessageTemplate, context), - }), - }; -}; - -/** - * serializeAws_json1_1CustomAttributesListType - */ -const se_CustomAttributesListType = (input: SchemaAttributeType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SchemaAttributeType(entry, context); - }); -}; +// se_CreateUserPoolDomainRequest omitted. -/** - * serializeAws_json1_1CustomDomainConfigType - */ -const se_CustomDomainConfigType = (input: CustomDomainConfigType, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_CreateUserPoolRequest omitted. -/** - * serializeAws_json1_1CustomEmailLambdaVersionConfigType - */ -const se_CustomEmailLambdaVersionConfigType = ( - input: CustomEmailLambdaVersionConfigType, - context: __SerdeContext -): any => { - return { - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - ...(input.LambdaVersion != null && { LambdaVersion: input.LambdaVersion }), - }; -}; +// se_CustomAttributesListType omitted. -/** - * serializeAws_json1_1CustomSMSLambdaVersionConfigType - */ -const se_CustomSMSLambdaVersionConfigType = (input: CustomSMSLambdaVersionConfigType, context: __SerdeContext): any => { - return { - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - ...(input.LambdaVersion != null && { LambdaVersion: input.LambdaVersion }), - }; -}; +// se_CustomDomainConfigType omitted. -/** - * serializeAws_json1_1DeleteGroupRequest - */ -const se_DeleteGroupRequest = (input: DeleteGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CustomEmailLambdaVersionConfigType omitted. -/** - * serializeAws_json1_1DeleteIdentityProviderRequest - */ -const se_DeleteIdentityProviderRequest = (input: DeleteIdentityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CustomSMSLambdaVersionConfigType omitted. -/** - * serializeAws_json1_1DeleteResourceServerRequest - */ -const se_DeleteResourceServerRequest = (input: DeleteResourceServerRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DeleteGroupRequest omitted. -/** - * serializeAws_json1_1DeleteUserAttributesRequest - */ -const se_DeleteUserAttributesRequest = (input: DeleteUserAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.UserAttributeNames != null && { - UserAttributeNames: se_AttributeNameListType(input.UserAttributeNames, context), - }), - }; -}; +// se_DeleteIdentityProviderRequest omitted. -/** - * serializeAws_json1_1DeleteUserPoolClientRequest - */ -const se_DeleteUserPoolClientRequest = (input: DeleteUserPoolClientRequest, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DeleteResourceServerRequest omitted. -/** - * serializeAws_json1_1DeleteUserPoolDomainRequest - */ -const se_DeleteUserPoolDomainRequest = (input: DeleteUserPoolDomainRequest, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DeleteUserAttributesRequest omitted. -/** - * serializeAws_json1_1DeleteUserPoolRequest - */ -const se_DeleteUserPoolRequest = (input: DeleteUserPoolRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DeleteUserPoolClientRequest omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - }; -}; +// se_DeleteUserPoolDomainRequest omitted. -/** - * serializeAws_json1_1DeliveryMediumListType - */ -const se_DeliveryMediumListType = (input: (DeliveryMediumType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteUserPoolRequest omitted. -/** - * serializeAws_json1_1DescribeIdentityProviderRequest - */ -const se_DescribeIdentityProviderRequest = (input: DescribeIdentityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DescribeResourceServerRequest - */ -const se_DescribeResourceServerRequest = (input: DescribeResourceServerRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DeliveryMediumListType omitted. -/** - * serializeAws_json1_1DescribeRiskConfigurationRequest - */ -const se_DescribeRiskConfigurationRequest = (input: DescribeRiskConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DescribeIdentityProviderRequest omitted. -/** - * serializeAws_json1_1DescribeUserImportJobRequest - */ -const se_DescribeUserImportJobRequest = (input: DescribeUserImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DescribeResourceServerRequest omitted. -/** - * serializeAws_json1_1DescribeUserPoolClientRequest - */ -const se_DescribeUserPoolClientRequest = (input: DescribeUserPoolClientRequest, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DescribeRiskConfigurationRequest omitted. -/** - * serializeAws_json1_1DescribeUserPoolDomainRequest - */ -const se_DescribeUserPoolDomainRequest = (input: DescribeUserPoolDomainRequest, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - }; -}; +// se_DescribeUserImportJobRequest omitted. -/** - * serializeAws_json1_1DescribeUserPoolRequest - */ -const se_DescribeUserPoolRequest = (input: DescribeUserPoolRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_DescribeUserPoolClientRequest omitted. -/** - * serializeAws_json1_1DeviceConfigurationType - */ -const se_DeviceConfigurationType = (input: DeviceConfigurationType, context: __SerdeContext): any => { - return { - ...(input.ChallengeRequiredOnNewDevice != null && { - ChallengeRequiredOnNewDevice: input.ChallengeRequiredOnNewDevice, - }), - ...(input.DeviceOnlyRememberedOnUserPrompt != null && { - DeviceOnlyRememberedOnUserPrompt: input.DeviceOnlyRememberedOnUserPrompt, - }), - }; -}; +// se_DescribeUserPoolDomainRequest omitted. -/** - * serializeAws_json1_1DeviceSecretVerifierConfigType - */ -const se_DeviceSecretVerifierConfigType = (input: DeviceSecretVerifierConfigType, context: __SerdeContext): any => { - return { - ...(input.PasswordVerifier != null && { PasswordVerifier: input.PasswordVerifier }), - ...(input.Salt != null && { Salt: input.Salt }), - }; -}; +// se_DescribeUserPoolRequest omitted. -/** - * serializeAws_json1_1EmailConfigurationType - */ -const se_EmailConfigurationType = (input: EmailConfigurationType, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSet != null && { ConfigurationSet: input.ConfigurationSet }), - ...(input.EmailSendingAccount != null && { EmailSendingAccount: input.EmailSendingAccount }), - ...(input.From != null && { From: input.From }), - ...(input.ReplyToEmailAddress != null && { ReplyToEmailAddress: input.ReplyToEmailAddress }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - }; -}; +// se_DeviceConfigurationType omitted. -/** - * serializeAws_json1_1EventFiltersType - */ -const se_EventFiltersType = (input: (EventFilterType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceSecretVerifierConfigType omitted. -/** - * serializeAws_json1_1ExplicitAuthFlowsListType - */ -const se_ExplicitAuthFlowsListType = (input: (ExplicitAuthFlowsType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EmailConfigurationType omitted. -/** - * serializeAws_json1_1ForgetDeviceRequest - */ -const se_ForgetDeviceRequest = (input: ForgetDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - }; -}; +// se_EventFiltersType omitted. -/** - * serializeAws_json1_1ForgotPasswordRequest - */ -const se_ForgotPasswordRequest = (input: ForgotPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.SecretHash != null && { SecretHash: input.SecretHash }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_ExplicitAuthFlowsListType omitted. -/** - * serializeAws_json1_1GetCSVHeaderRequest - */ -const se_GetCSVHeaderRequest = (input: GetCSVHeaderRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_ForgetDeviceRequest omitted. -/** - * serializeAws_json1_1GetDeviceRequest - */ -const se_GetDeviceRequest = (input: GetDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - }; -}; +// se_ForgotPasswordRequest omitted. -/** - * serializeAws_json1_1GetGroupRequest - */ -const se_GetGroupRequest = (input: GetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_GetCSVHeaderRequest omitted. -/** - * serializeAws_json1_1GetIdentityProviderByIdentifierRequest - */ -const se_GetIdentityProviderByIdentifierRequest = ( - input: GetIdentityProviderByIdentifierRequest, - context: __SerdeContext -): any => { - return { - ...(input.IdpIdentifier != null && { IdpIdentifier: input.IdpIdentifier }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_GetDeviceRequest omitted. -/** - * serializeAws_json1_1GetSigningCertificateRequest - */ -const se_GetSigningCertificateRequest = (input: GetSigningCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_GetGroupRequest omitted. -/** - * serializeAws_json1_1GetUICustomizationRequest - */ -const se_GetUICustomizationRequest = (input: GetUICustomizationRequest, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_GetIdentityProviderByIdentifierRequest omitted. -/** - * serializeAws_json1_1GetUserAttributeVerificationCodeRequest - */ -const se_GetUserAttributeVerificationCodeRequest = ( - input: GetUserAttributeVerificationCodeRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - }; -}; +// se_GetSigningCertificateRequest omitted. -/** - * serializeAws_json1_1GetUserPoolMfaConfigRequest - */ -const se_GetUserPoolMfaConfigRequest = (input: GetUserPoolMfaConfigRequest, context: __SerdeContext): any => { - return { - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_GetUICustomizationRequest omitted. -/** - * serializeAws_json1_1GetUserRequest - */ -const se_GetUserRequest = (input: GetUserRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - }; -}; +// se_GetUserAttributeVerificationCodeRequest omitted. -/** - * serializeAws_json1_1GlobalSignOutRequest - */ -const se_GlobalSignOutRequest = (input: GlobalSignOutRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - }; -}; +// se_GetUserPoolMfaConfigRequest omitted. -/** - * serializeAws_json1_1HttpHeader - */ -const se_HttpHeader = (input: HttpHeader, context: __SerdeContext): any => { - return { - ...(input.headerName != null && { headerName: input.headerName }), - ...(input.headerValue != null && { headerValue: input.headerValue }), - }; -}; +// se_GetUserRequest omitted. -/** - * serializeAws_json1_1HttpHeaderList - */ -const se_HttpHeaderList = (input: HttpHeader[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HttpHeader(entry, context); - }); -}; +// se_GlobalSignOutRequest omitted. -/** - * serializeAws_json1_1IdpIdentifiersListType - */ -const se_IdpIdentifiersListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HttpHeader omitted. -/** - * serializeAws_json1_1InitiateAuthRequest - */ -const se_InitiateAuthRequest = (input: InitiateAuthRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.AuthFlow != null && { AuthFlow: input.AuthFlow }), - ...(input.AuthParameters != null && { AuthParameters: se_AuthParametersType(input.AuthParameters, context) }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - }; -}; +// se_HttpHeaderList omitted. -/** - * serializeAws_json1_1LambdaConfigType - */ -const se_LambdaConfigType = (input: LambdaConfigType, context: __SerdeContext): any => { - return { - ...(input.CreateAuthChallenge != null && { CreateAuthChallenge: input.CreateAuthChallenge }), - ...(input.CustomEmailSender != null && { - CustomEmailSender: se_CustomEmailLambdaVersionConfigType(input.CustomEmailSender, context), - }), - ...(input.CustomMessage != null && { CustomMessage: input.CustomMessage }), - ...(input.CustomSMSSender != null && { - CustomSMSSender: se_CustomSMSLambdaVersionConfigType(input.CustomSMSSender, context), - }), - ...(input.DefineAuthChallenge != null && { DefineAuthChallenge: input.DefineAuthChallenge }), - ...(input.KMSKeyID != null && { KMSKeyID: input.KMSKeyID }), - ...(input.PostAuthentication != null && { PostAuthentication: input.PostAuthentication }), - ...(input.PostConfirmation != null && { PostConfirmation: input.PostConfirmation }), - ...(input.PreAuthentication != null && { PreAuthentication: input.PreAuthentication }), - ...(input.PreSignUp != null && { PreSignUp: input.PreSignUp }), - ...(input.PreTokenGeneration != null && { PreTokenGeneration: input.PreTokenGeneration }), - ...(input.UserMigration != null && { UserMigration: input.UserMigration }), - ...(input.VerifyAuthChallengeResponse != null && { - VerifyAuthChallengeResponse: input.VerifyAuthChallengeResponse, - }), - }; -}; - -/** - * serializeAws_json1_1ListDevicesRequest - */ -const se_ListDevicesRequest = (input: ListDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - }; -}; +// se_IdpIdentifiersListType omitted. -/** - * serializeAws_json1_1ListGroupsRequest - */ -const se_ListGroupsRequest = (input: ListGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_InitiateAuthRequest omitted. -/** - * serializeAws_json1_1ListIdentityProvidersRequest - */ -const se_ListIdentityProvidersRequest = (input: ListIdentityProvidersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_LambdaConfigType omitted. -/** - * serializeAws_json1_1ListResourceServersRequest - */ -const se_ListResourceServersRequest = (input: ListResourceServersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_ListDevicesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListGroupsRequest omitted. -/** - * serializeAws_json1_1ListUserImportJobsRequest - */ -const se_ListUserImportJobsRequest = (input: ListUserImportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_ListIdentityProvidersRequest omitted. -/** - * serializeAws_json1_1ListUserPoolClientsRequest - */ -const se_ListUserPoolClientsRequest = (input: ListUserPoolClientsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_ListResourceServersRequest omitted. -/** - * serializeAws_json1_1ListUserPoolsRequest - */ -const se_ListUserPoolsRequest = (input: ListUserPoolsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListUsersInGroupRequest - */ -const se_ListUsersInGroupRequest = (input: ListUsersInGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_ListUserImportJobsRequest omitted. -/** - * serializeAws_json1_1ListUsersRequest - */ -const se_ListUsersRequest = (input: ListUsersRequest, context: __SerdeContext): any => { - return { - ...(input.AttributesToGet != null && { - AttributesToGet: se_SearchedAttributeNamesListType(input.AttributesToGet, context), - }), - ...(input.Filter != null && { Filter: input.Filter }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_ListUserPoolClientsRequest omitted. -/** - * serializeAws_json1_1LogoutURLsListType - */ -const se_LogoutURLsListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListUserPoolsRequest omitted. -/** - * serializeAws_json1_1MessageTemplateType - */ -const se_MessageTemplateType = (input: MessageTemplateType, context: __SerdeContext): any => { - return { - ...(input.EmailMessage != null && { EmailMessage: input.EmailMessage }), - ...(input.EmailSubject != null && { EmailSubject: input.EmailSubject }), - ...(input.SMSMessage != null && { SMSMessage: input.SMSMessage }), - }; -}; +// se_ListUsersInGroupRequest omitted. -/** - * serializeAws_json1_1MFAOptionListType - */ -const se_MFAOptionListType = (input: MFAOptionType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MFAOptionType(entry, context); - }); -}; +// se_ListUsersRequest omitted. -/** - * serializeAws_json1_1MFAOptionType - */ -const se_MFAOptionType = (input: MFAOptionType, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.DeliveryMedium != null && { DeliveryMedium: input.DeliveryMedium }), - }; -}; +// se_LogoutURLsListType omitted. -/** - * serializeAws_json1_1NotifyConfigurationType - */ -const se_NotifyConfigurationType = (input: NotifyConfigurationType, context: __SerdeContext): any => { - return { - ...(input.BlockEmail != null && { BlockEmail: se_NotifyEmailType(input.BlockEmail, context) }), - ...(input.From != null && { From: input.From }), - ...(input.MfaEmail != null && { MfaEmail: se_NotifyEmailType(input.MfaEmail, context) }), - ...(input.NoActionEmail != null && { NoActionEmail: se_NotifyEmailType(input.NoActionEmail, context) }), - ...(input.ReplyTo != null && { ReplyTo: input.ReplyTo }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - }; -}; +// se_MessageTemplateType omitted. -/** - * serializeAws_json1_1NotifyEmailType - */ -const se_NotifyEmailType = (input: NotifyEmailType, context: __SerdeContext): any => { - return { - ...(input.HtmlBody != null && { HtmlBody: input.HtmlBody }), - ...(input.Subject != null && { Subject: input.Subject }), - ...(input.TextBody != null && { TextBody: input.TextBody }), - }; -}; +// se_MFAOptionListType omitted. -/** - * serializeAws_json1_1NumberAttributeConstraintsType - */ -const se_NumberAttributeConstraintsType = (input: NumberAttributeConstraintsType, context: __SerdeContext): any => { - return { - ...(input.MaxValue != null && { MaxValue: input.MaxValue }), - ...(input.MinValue != null && { MinValue: input.MinValue }), - }; -}; +// se_MFAOptionType omitted. -/** - * serializeAws_json1_1OAuthFlowsType - */ -const se_OAuthFlowsType = (input: (OAuthFlowType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NotifyConfigurationType omitted. -/** - * serializeAws_json1_1PasswordPolicyType - */ -const se_PasswordPolicyType = (input: PasswordPolicyType, context: __SerdeContext): any => { - return { - ...(input.MinimumLength != null && { MinimumLength: input.MinimumLength }), - ...(input.RequireLowercase != null && { RequireLowercase: input.RequireLowercase }), - ...(input.RequireNumbers != null && { RequireNumbers: input.RequireNumbers }), - ...(input.RequireSymbols != null && { RequireSymbols: input.RequireSymbols }), - ...(input.RequireUppercase != null && { RequireUppercase: input.RequireUppercase }), - ...(input.TemporaryPasswordValidityDays != null && { - TemporaryPasswordValidityDays: input.TemporaryPasswordValidityDays, - }), - }; -}; +// se_NotifyEmailType omitted. -/** - * serializeAws_json1_1ProviderDetailsType - */ -const se_ProviderDetailsType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_NumberAttributeConstraintsType omitted. -/** - * serializeAws_json1_1ProviderUserIdentifierType - */ -const se_ProviderUserIdentifierType = (input: ProviderUserIdentifierType, context: __SerdeContext): any => { - return { - ...(input.ProviderAttributeName != null && { ProviderAttributeName: input.ProviderAttributeName }), - ...(input.ProviderAttributeValue != null && { ProviderAttributeValue: input.ProviderAttributeValue }), - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - }; -}; +// se_OAuthFlowsType omitted. -/** - * serializeAws_json1_1RecoveryMechanismsType - */ -const se_RecoveryMechanismsType = (input: RecoveryOptionType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecoveryOptionType(entry, context); - }); -}; +// se_PasswordPolicyType omitted. -/** - * serializeAws_json1_1RecoveryOptionType - */ -const se_RecoveryOptionType = (input: RecoveryOptionType, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - }; -}; +// se_ProviderDetailsType omitted. -/** - * serializeAws_json1_1ResendConfirmationCodeRequest - */ -const se_ResendConfirmationCodeRequest = (input: ResendConfirmationCodeRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.SecretHash != null && { SecretHash: input.SecretHash }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_ProviderUserIdentifierType omitted. -/** - * serializeAws_json1_1ResourceServerScopeListType - */ -const se_ResourceServerScopeListType = (input: ResourceServerScopeType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceServerScopeType(entry, context); - }); -}; +// se_RecoveryMechanismsType omitted. -/** - * serializeAws_json1_1ResourceServerScopeType - */ -const se_ResourceServerScopeType = (input: ResourceServerScopeType, context: __SerdeContext): any => { - return { - ...(input.ScopeDescription != null && { ScopeDescription: input.ScopeDescription }), - ...(input.ScopeName != null && { ScopeName: input.ScopeName }), - }; -}; +// se_RecoveryOptionType omitted. -/** - * serializeAws_json1_1RespondToAuthChallengeRequest - */ -const se_RespondToAuthChallengeRequest = (input: RespondToAuthChallengeRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ChallengeName != null && { ChallengeName: input.ChallengeName }), - ...(input.ChallengeResponses != null && { - ChallengeResponses: se_ChallengeResponsesType(input.ChallengeResponses, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.Session != null && { Session: input.Session }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - }; -}; +// se_ResendConfirmationCodeRequest omitted. -/** - * serializeAws_json1_1RevokeTokenRequest - */ -const se_RevokeTokenRequest = (input: RevokeTokenRequest, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - ...(input.Token != null && { Token: input.Token }), - }; -}; +// se_ResourceServerScopeListType omitted. -/** - * serializeAws_json1_1RiskExceptionConfigurationType - */ -const se_RiskExceptionConfigurationType = (input: RiskExceptionConfigurationType, context: __SerdeContext): any => { - return { - ...(input.BlockedIPRangeList != null && { - BlockedIPRangeList: se_BlockedIPRangeListType(input.BlockedIPRangeList, context), - }), - ...(input.SkippedIPRangeList != null && { - SkippedIPRangeList: se_SkippedIPRangeListType(input.SkippedIPRangeList, context), - }), - }; -}; +// se_ResourceServerScopeType omitted. -/** - * serializeAws_json1_1SchemaAttributesListType - */ -const se_SchemaAttributesListType = (input: SchemaAttributeType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SchemaAttributeType(entry, context); - }); -}; +// se_RespondToAuthChallengeRequest omitted. -/** - * serializeAws_json1_1SchemaAttributeType - */ -const se_SchemaAttributeType = (input: SchemaAttributeType, context: __SerdeContext): any => { - return { - ...(input.AttributeDataType != null && { AttributeDataType: input.AttributeDataType }), - ...(input.DeveloperOnlyAttribute != null && { DeveloperOnlyAttribute: input.DeveloperOnlyAttribute }), - ...(input.Mutable != null && { Mutable: input.Mutable }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NumberAttributeConstraints != null && { - NumberAttributeConstraints: se_NumberAttributeConstraintsType(input.NumberAttributeConstraints, context), - }), - ...(input.Required != null && { Required: input.Required }), - ...(input.StringAttributeConstraints != null && { - StringAttributeConstraints: se_StringAttributeConstraintsType(input.StringAttributeConstraints, context), - }), - }; -}; +// se_RevokeTokenRequest omitted. -/** - * serializeAws_json1_1ScopeListType - */ -const se_ScopeListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RiskExceptionConfigurationType omitted. -/** - * serializeAws_json1_1SearchedAttributeNamesListType - */ -const se_SearchedAttributeNamesListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SchemaAttributesListType omitted. -/** - * serializeAws_json1_1SetRiskConfigurationRequest - */ -const se_SetRiskConfigurationRequest = (input: SetRiskConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.AccountTakeoverRiskConfiguration != null && { - AccountTakeoverRiskConfiguration: se_AccountTakeoverRiskConfigurationType( - input.AccountTakeoverRiskConfiguration, - context - ), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.CompromisedCredentialsRiskConfiguration != null && { - CompromisedCredentialsRiskConfiguration: se_CompromisedCredentialsRiskConfigurationType( - input.CompromisedCredentialsRiskConfiguration, - context - ), - }), - ...(input.RiskExceptionConfiguration != null && { - RiskExceptionConfiguration: se_RiskExceptionConfigurationType(input.RiskExceptionConfiguration, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_SchemaAttributeType omitted. + +// se_ScopeListType omitted. + +// se_SearchedAttributeNamesListType omitted. + +// se_SetRiskConfigurationRequest omitted. /** * serializeAws_json1_1SetUICustomizationRequest */ const se_SetUICustomizationRequest = (input: SetUICustomizationRequest, context: __SerdeContext): any => { - return { - ...(input.CSS != null && { CSS: input.CSS }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ImageFile != null && { ImageFile: context.base64Encoder(input.ImageFile) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; + return take(input, { + CSS: [], + ClientId: [], + ImageFile: context.base64Encoder, + UserPoolId: [], + }); }; -/** - * serializeAws_json1_1SetUserMFAPreferenceRequest - */ -const se_SetUserMFAPreferenceRequest = (input: SetUserMFAPreferenceRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.SMSMfaSettings != null && { SMSMfaSettings: se_SMSMfaSettingsType(input.SMSMfaSettings, context) }), - ...(input.SoftwareTokenMfaSettings != null && { - SoftwareTokenMfaSettings: se_SoftwareTokenMfaSettingsType(input.SoftwareTokenMfaSettings, context), - }), - }; -}; +// se_SetUserMFAPreferenceRequest omitted. -/** - * serializeAws_json1_1SetUserPoolMfaConfigRequest - */ -const se_SetUserPoolMfaConfigRequest = (input: SetUserPoolMfaConfigRequest, context: __SerdeContext): any => { - return { - ...(input.MfaConfiguration != null && { MfaConfiguration: input.MfaConfiguration }), - ...(input.SmsMfaConfiguration != null && { - SmsMfaConfiguration: se_SmsMfaConfigType(input.SmsMfaConfiguration, context), - }), - ...(input.SoftwareTokenMfaConfiguration != null && { - SoftwareTokenMfaConfiguration: se_SoftwareTokenMfaConfigType(input.SoftwareTokenMfaConfiguration, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_SetUserPoolMfaConfigRequest omitted. -/** - * serializeAws_json1_1SetUserSettingsRequest - */ -const se_SetUserSettingsRequest = (input: SetUserSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.MFAOptions != null && { MFAOptions: se_MFAOptionListType(input.MFAOptions, context) }), - }; -}; +// se_SetUserSettingsRequest omitted. -/** - * serializeAws_json1_1SignUpRequest - */ -const se_SignUpRequest = (input: SignUpRequest, context: __SerdeContext): any => { - return { - ...(input.AnalyticsMetadata != null && { - AnalyticsMetadata: se_AnalyticsMetadataType(input.AnalyticsMetadata, context), - }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.SecretHash != null && { SecretHash: input.SecretHash }), - ...(input.UserAttributes != null && { UserAttributes: se_AttributeListType(input.UserAttributes, context) }), - ...(input.UserContextData != null && { UserContextData: se_UserContextDataType(input.UserContextData, context) }), - ...(input.Username != null && { Username: input.Username }), - ...(input.ValidationData != null && { ValidationData: se_AttributeListType(input.ValidationData, context) }), - }; -}; +// se_SignUpRequest omitted. -/** - * serializeAws_json1_1SkippedIPRangeListType - */ -const se_SkippedIPRangeListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SkippedIPRangeListType omitted. -/** - * serializeAws_json1_1SmsConfigurationType - */ -const se_SmsConfigurationType = (input: SmsConfigurationType, context: __SerdeContext): any => { - return { - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.SnsCallerArn != null && { SnsCallerArn: input.SnsCallerArn }), - ...(input.SnsRegion != null && { SnsRegion: input.SnsRegion }), - }; -}; +// se_SmsConfigurationType omitted. -/** - * serializeAws_json1_1SmsMfaConfigType - */ -const se_SmsMfaConfigType = (input: SmsMfaConfigType, context: __SerdeContext): any => { - return { - ...(input.SmsAuthenticationMessage != null && { SmsAuthenticationMessage: input.SmsAuthenticationMessage }), - ...(input.SmsConfiguration != null && { - SmsConfiguration: se_SmsConfigurationType(input.SmsConfiguration, context), - }), - }; -}; +// se_SmsMfaConfigType omitted. -/** - * serializeAws_json1_1SMSMfaSettingsType - */ -const se_SMSMfaSettingsType = (input: SMSMfaSettingsType, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.PreferredMfa != null && { PreferredMfa: input.PreferredMfa }), - }; -}; +// se_SMSMfaSettingsType omitted. -/** - * serializeAws_json1_1SoftwareTokenMfaConfigType - */ -const se_SoftwareTokenMfaConfigType = (input: SoftwareTokenMfaConfigType, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_SoftwareTokenMfaConfigType omitted. -/** - * serializeAws_json1_1SoftwareTokenMfaSettingsType - */ -const se_SoftwareTokenMfaSettingsType = (input: SoftwareTokenMfaSettingsType, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.PreferredMfa != null && { PreferredMfa: input.PreferredMfa }), - }; -}; +// se_SoftwareTokenMfaSettingsType omitted. -/** - * serializeAws_json1_1StartUserImportJobRequest - */ -const se_StartUserImportJobRequest = (input: StartUserImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_StartUserImportJobRequest omitted. -/** - * serializeAws_json1_1StopUserImportJobRequest - */ -const se_StopUserImportJobRequest = (input: StopUserImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_StopUserImportJobRequest omitted. -/** - * serializeAws_json1_1StringAttributeConstraintsType - */ -const se_StringAttributeConstraintsType = (input: StringAttributeConstraintsType, context: __SerdeContext): any => { - return { - ...(input.MaxLength != null && { MaxLength: input.MaxLength }), - ...(input.MinLength != null && { MinLength: input.MinLength }), - }; -}; +// se_StringAttributeConstraintsType omitted. -/** - * serializeAws_json1_1SupportedIdentityProvidersListType - */ -const se_SupportedIdentityProvidersListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SupportedIdentityProvidersListType omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_UserPoolTagsType(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1TokenValidityUnitsType - */ -const se_TokenValidityUnitsType = (input: TokenValidityUnitsType, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.IdToken != null && { IdToken: input.IdToken }), - ...(input.RefreshToken != null && { RefreshToken: input.RefreshToken }), - }; -}; +// se_TokenValidityUnitsType omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_UserPoolTagsListType(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAuthEventFeedbackRequest - */ -const se_UpdateAuthEventFeedbackRequest = (input: UpdateAuthEventFeedbackRequest, context: __SerdeContext): any => { - return { - ...(input.EventId != null && { EventId: input.EventId }), - ...(input.FeedbackToken != null && { FeedbackToken: input.FeedbackToken }), - ...(input.FeedbackValue != null && { FeedbackValue: input.FeedbackValue }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1UpdateDeviceStatusRequest - */ -const se_UpdateDeviceStatusRequest = (input: UpdateDeviceStatusRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.DeviceKey != null && { DeviceKey: input.DeviceKey }), - ...(input.DeviceRememberedStatus != null && { DeviceRememberedStatus: input.DeviceRememberedStatus }), - }; -}; - -/** - * serializeAws_json1_1UpdateGroupRequest - */ -const se_UpdateGroupRequest = (input: UpdateGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.Precedence != null && { Precedence: input.Precedence }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; - -/** - * serializeAws_json1_1UpdateIdentityProviderRequest - */ -const se_UpdateIdentityProviderRequest = (input: UpdateIdentityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.AttributeMapping != null && { - AttributeMapping: se_AttributeMappingType(input.AttributeMapping, context), - }), - ...(input.IdpIdentifiers != null && { IdpIdentifiers: se_IdpIdentifiersListType(input.IdpIdentifiers, context) }), - ...(input.ProviderDetails != null && { ProviderDetails: se_ProviderDetailsType(input.ProviderDetails, context) }), - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; - -/** - * serializeAws_json1_1UpdateResourceServerRequest - */ -const se_UpdateResourceServerRequest = (input: UpdateResourceServerRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scopes != null && { Scopes: se_ResourceServerScopeListType(input.Scopes, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserAttributesRequest - */ -const se_UpdateUserAttributesRequest = (input: UpdateUserAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.ClientMetadata != null && { ClientMetadata: se_ClientMetadataType(input.ClientMetadata, context) }), - ...(input.UserAttributes != null && { UserAttributes: se_AttributeListType(input.UserAttributes, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserPoolClientRequest - */ -const se_UpdateUserPoolClientRequest = (input: UpdateUserPoolClientRequest, context: __SerdeContext): any => { - return { - ...(input.AccessTokenValidity != null && { AccessTokenValidity: input.AccessTokenValidity }), - ...(input.AllowedOAuthFlows != null && { AllowedOAuthFlows: se_OAuthFlowsType(input.AllowedOAuthFlows, context) }), - ...(input.AllowedOAuthFlowsUserPoolClient != null && { - AllowedOAuthFlowsUserPoolClient: input.AllowedOAuthFlowsUserPoolClient, - }), - ...(input.AllowedOAuthScopes != null && { - AllowedOAuthScopes: se_ScopeListType(input.AllowedOAuthScopes, context), - }), - ...(input.AnalyticsConfiguration != null && { - AnalyticsConfiguration: se_AnalyticsConfigurationType(input.AnalyticsConfiguration, context), - }), - ...(input.AuthSessionValidity != null && { AuthSessionValidity: input.AuthSessionValidity }), - ...(input.CallbackURLs != null && { CallbackURLs: se_CallbackURLsListType(input.CallbackURLs, context) }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientName != null && { ClientName: input.ClientName }), - ...(input.DefaultRedirectURI != null && { DefaultRedirectURI: input.DefaultRedirectURI }), - ...(input.EnablePropagateAdditionalUserContextData != null && { - EnablePropagateAdditionalUserContextData: input.EnablePropagateAdditionalUserContextData, - }), - ...(input.EnableTokenRevocation != null && { EnableTokenRevocation: input.EnableTokenRevocation }), - ...(input.ExplicitAuthFlows != null && { - ExplicitAuthFlows: se_ExplicitAuthFlowsListType(input.ExplicitAuthFlows, context), - }), - ...(input.IdTokenValidity != null && { IdTokenValidity: input.IdTokenValidity }), - ...(input.LogoutURLs != null && { LogoutURLs: se_LogoutURLsListType(input.LogoutURLs, context) }), - ...(input.PreventUserExistenceErrors != null && { PreventUserExistenceErrors: input.PreventUserExistenceErrors }), - ...(input.ReadAttributes != null && { ReadAttributes: se_ClientPermissionListType(input.ReadAttributes, context) }), - ...(input.RefreshTokenValidity != null && { RefreshTokenValidity: input.RefreshTokenValidity }), - ...(input.SupportedIdentityProviders != null && { - SupportedIdentityProviders: se_SupportedIdentityProvidersListType(input.SupportedIdentityProviders, context), - }), - ...(input.TokenValidityUnits != null && { - TokenValidityUnits: se_TokenValidityUnitsType(input.TokenValidityUnits, context), - }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.WriteAttributes != null && { - WriteAttributes: se_ClientPermissionListType(input.WriteAttributes, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserPoolDomainRequest - */ -const se_UpdateUserPoolDomainRequest = (input: UpdateUserPoolDomainRequest, context: __SerdeContext): any => { - return { - ...(input.CustomDomainConfig != null && { - CustomDomainConfig: se_CustomDomainConfigType(input.CustomDomainConfig, context), - }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserPoolRequest - */ -const se_UpdateUserPoolRequest = (input: UpdateUserPoolRequest, context: __SerdeContext): any => { - return { - ...(input.AccountRecoverySetting != null && { - AccountRecoverySetting: se_AccountRecoverySettingType(input.AccountRecoverySetting, context), - }), - ...(input.AdminCreateUserConfig != null && { - AdminCreateUserConfig: se_AdminCreateUserConfigType(input.AdminCreateUserConfig, context), - }), - ...(input.AutoVerifiedAttributes != null && { - AutoVerifiedAttributes: se_VerifiedAttributesListType(input.AutoVerifiedAttributes, context), - }), - ...(input.DeletionProtection != null && { DeletionProtection: input.DeletionProtection }), - ...(input.DeviceConfiguration != null && { - DeviceConfiguration: se_DeviceConfigurationType(input.DeviceConfiguration, context), - }), - ...(input.EmailConfiguration != null && { - EmailConfiguration: se_EmailConfigurationType(input.EmailConfiguration, context), - }), - ...(input.EmailVerificationMessage != null && { EmailVerificationMessage: input.EmailVerificationMessage }), - ...(input.EmailVerificationSubject != null && { EmailVerificationSubject: input.EmailVerificationSubject }), - ...(input.LambdaConfig != null && { LambdaConfig: se_LambdaConfigType(input.LambdaConfig, context) }), - ...(input.MfaConfiguration != null && { MfaConfiguration: input.MfaConfiguration }), - ...(input.Policies != null && { Policies: se_UserPoolPolicyType(input.Policies, context) }), - ...(input.SmsAuthenticationMessage != null && { SmsAuthenticationMessage: input.SmsAuthenticationMessage }), - ...(input.SmsConfiguration != null && { - SmsConfiguration: se_SmsConfigurationType(input.SmsConfiguration, context), - }), - ...(input.SmsVerificationMessage != null && { SmsVerificationMessage: input.SmsVerificationMessage }), - ...(input.UserAttributeUpdateSettings != null && { - UserAttributeUpdateSettings: se_UserAttributeUpdateSettingsType(input.UserAttributeUpdateSettings, context), - }), - ...(input.UserPoolAddOns != null && { UserPoolAddOns: se_UserPoolAddOnsType(input.UserPoolAddOns, context) }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - ...(input.UserPoolTags != null && { UserPoolTags: se_UserPoolTagsType(input.UserPoolTags, context) }), - ...(input.VerificationMessageTemplate != null && { - VerificationMessageTemplate: se_VerificationMessageTemplateType(input.VerificationMessageTemplate, context), - }), - }; -}; - -/** - * serializeAws_json1_1UserAttributeUpdateSettingsType - */ -const se_UserAttributeUpdateSettingsType = (input: UserAttributeUpdateSettingsType, context: __SerdeContext): any => { - return { - ...(input.AttributesRequireVerificationBeforeUpdate != null && { - AttributesRequireVerificationBeforeUpdate: se_AttributesRequireVerificationBeforeUpdateType( - input.AttributesRequireVerificationBeforeUpdate, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1UserContextDataType - */ -const se_UserContextDataType = (input: UserContextDataType, context: __SerdeContext): any => { - return { - ...(input.EncodedData != null && { EncodedData: input.EncodedData }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - }; -}; - -/** - * serializeAws_json1_1UsernameAttributesListType - */ -const se_UsernameAttributesListType = (input: (UsernameAttributeType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UsernameConfigurationType - */ -const se_UsernameConfigurationType = (input: UsernameConfigurationType, context: __SerdeContext): any => { - return { - ...(input.CaseSensitive != null && { CaseSensitive: input.CaseSensitive }), - }; -}; - -/** - * serializeAws_json1_1UserPoolAddOnsType - */ -const se_UserPoolAddOnsType = (input: UserPoolAddOnsType, context: __SerdeContext): any => { - return { - ...(input.AdvancedSecurityMode != null && { AdvancedSecurityMode: input.AdvancedSecurityMode }), - }; -}; - -/** - * serializeAws_json1_1UserPoolPolicyType - */ -const se_UserPoolPolicyType = (input: UserPoolPolicyType, context: __SerdeContext): any => { - return { - ...(input.PasswordPolicy != null && { PasswordPolicy: se_PasswordPolicyType(input.PasswordPolicy, context) }), - }; -}; - -/** - * serializeAws_json1_1UserPoolTagsListType - */ -const se_UserPoolTagsListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UserPoolTagsType - */ -const se_UserPoolTagsType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1VerificationMessageTemplateType - */ -const se_VerificationMessageTemplateType = (input: VerificationMessageTemplateType, context: __SerdeContext): any => { - return { - ...(input.DefaultEmailOption != null && { DefaultEmailOption: input.DefaultEmailOption }), - ...(input.EmailMessage != null && { EmailMessage: input.EmailMessage }), - ...(input.EmailMessageByLink != null && { EmailMessageByLink: input.EmailMessageByLink }), - ...(input.EmailSubject != null && { EmailSubject: input.EmailSubject }), - ...(input.EmailSubjectByLink != null && { EmailSubjectByLink: input.EmailSubjectByLink }), - ...(input.SmsMessage != null && { SmsMessage: input.SmsMessage }), - }; -}; - -/** - * serializeAws_json1_1VerifiedAttributesListType - */ -const se_VerifiedAttributesListType = (input: (VerifiedAttributeType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1VerifySoftwareTokenRequest - */ -const se_VerifySoftwareTokenRequest = (input: VerifySoftwareTokenRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.FriendlyDeviceName != null && { FriendlyDeviceName: input.FriendlyDeviceName }), - ...(input.Session != null && { Session: input.Session }), - ...(input.UserCode != null && { UserCode: input.UserCode }), - }; -}; - -/** - * serializeAws_json1_1VerifyUserAttributeRequest - */ -const se_VerifyUserAttributeRequest = (input: VerifyUserAttributeRequest, context: __SerdeContext): any => { - return { - ...(input.AccessToken != null && { AccessToken: input.AccessToken }), - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Code != null && { Code: input.Code }), - }; -}; - -/** - * deserializeAws_json1_1AccountRecoverySettingType - */ -const de_AccountRecoverySettingType = (output: any, context: __SerdeContext): AccountRecoverySettingType => { - return { - RecoveryMechanisms: - output.RecoveryMechanisms != null ? de_RecoveryMechanismsType(output.RecoveryMechanisms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AccountTakeoverActionsType - */ -const de_AccountTakeoverActionsType = (output: any, context: __SerdeContext): AccountTakeoverActionsType => { - return { - HighAction: output.HighAction != null ? de_AccountTakeoverActionType(output.HighAction, context) : undefined, - LowAction: output.LowAction != null ? de_AccountTakeoverActionType(output.LowAction, context) : undefined, - MediumAction: output.MediumAction != null ? de_AccountTakeoverActionType(output.MediumAction, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AccountTakeoverActionType - */ -const de_AccountTakeoverActionType = (output: any, context: __SerdeContext): AccountTakeoverActionType => { - return { - EventAction: __expectString(output.EventAction), - Notify: __expectBoolean(output.Notify), - } as any; -}; - -/** - * deserializeAws_json1_1AccountTakeoverRiskConfigurationType - */ -const de_AccountTakeoverRiskConfigurationType = ( - output: any, - context: __SerdeContext -): AccountTakeoverRiskConfigurationType => { - return { - Actions: output.Actions != null ? de_AccountTakeoverActionsType(output.Actions, context) : undefined, - NotifyConfiguration: - output.NotifyConfiguration != null ? de_NotifyConfigurationType(output.NotifyConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AddCustomAttributesResponse - */ -const de_AddCustomAttributesResponse = (output: any, context: __SerdeContext): AddCustomAttributesResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminConfirmSignUpResponse - */ -const de_AdminConfirmSignUpResponse = (output: any, context: __SerdeContext): AdminConfirmSignUpResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminCreateUserConfigType - */ -const de_AdminCreateUserConfigType = (output: any, context: __SerdeContext): AdminCreateUserConfigType => { - return { - AllowAdminCreateUserOnly: __expectBoolean(output.AllowAdminCreateUserOnly), - InviteMessageTemplate: - output.InviteMessageTemplate != null ? de_MessageTemplateType(output.InviteMessageTemplate, context) : undefined, - UnusedAccountValidityDays: __expectInt32(output.UnusedAccountValidityDays), - } as any; -}; - -/** - * deserializeAws_json1_1AdminCreateUserResponse - */ -const de_AdminCreateUserResponse = (output: any, context: __SerdeContext): AdminCreateUserResponse => { - return { - User: output.User != null ? de_UserType(output.User, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AdminDeleteUserAttributesResponse - */ -const de_AdminDeleteUserAttributesResponse = ( - output: any, - context: __SerdeContext -): AdminDeleteUserAttributesResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminDisableProviderForUserResponse - */ -const de_AdminDisableProviderForUserResponse = ( - output: any, - context: __SerdeContext -): AdminDisableProviderForUserResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminDisableUserResponse - */ -const de_AdminDisableUserResponse = (output: any, context: __SerdeContext): AdminDisableUserResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminEnableUserResponse - */ -const de_AdminEnableUserResponse = (output: any, context: __SerdeContext): AdminEnableUserResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminGetDeviceResponse - */ -const de_AdminGetDeviceResponse = (output: any, context: __SerdeContext): AdminGetDeviceResponse => { - return { - Device: output.Device != null ? de_DeviceType(output.Device, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AdminGetUserResponse - */ -const de_AdminGetUserResponse = (output: any, context: __SerdeContext): AdminGetUserResponse => { - return { - Enabled: __expectBoolean(output.Enabled), - MFAOptions: output.MFAOptions != null ? de_MFAOptionListType(output.MFAOptions, context) : undefined, - PreferredMfaSetting: __expectString(output.PreferredMfaSetting), - UserAttributes: output.UserAttributes != null ? de_AttributeListType(output.UserAttributes, context) : undefined, - UserCreateDate: - output.UserCreateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UserCreateDate))) - : undefined, - UserLastModifiedDate: - output.UserLastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UserLastModifiedDate))) - : undefined, - UserMFASettingList: - output.UserMFASettingList != null ? de_UserMFASettingListType(output.UserMFASettingList, context) : undefined, - UserStatus: __expectString(output.UserStatus), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1AdminInitiateAuthResponse - */ -const de_AdminInitiateAuthResponse = (output: any, context: __SerdeContext): AdminInitiateAuthResponse => { - return { - AuthenticationResult: - output.AuthenticationResult != null - ? de_AuthenticationResultType(output.AuthenticationResult, context) - : undefined, - ChallengeName: __expectString(output.ChallengeName), - ChallengeParameters: - output.ChallengeParameters != null ? de_ChallengeParametersType(output.ChallengeParameters, context) : undefined, - Session: __expectString(output.Session), - } as any; -}; - -/** - * deserializeAws_json1_1AdminLinkProviderForUserResponse - */ -const de_AdminLinkProviderForUserResponse = ( - output: any, - context: __SerdeContext -): AdminLinkProviderForUserResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminListDevicesResponse - */ -const de_AdminListDevicesResponse = (output: any, context: __SerdeContext): AdminListDevicesResponse => { - return { - Devices: output.Devices != null ? de_DeviceListType(output.Devices, context) : undefined, - PaginationToken: __expectString(output.PaginationToken), - } as any; -}; - -/** - * deserializeAws_json1_1AdminListGroupsForUserResponse - */ -const de_AdminListGroupsForUserResponse = (output: any, context: __SerdeContext): AdminListGroupsForUserResponse => { - return { - Groups: output.Groups != null ? de_GroupListType(output.Groups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1AdminListUserAuthEventsResponse - */ -const de_AdminListUserAuthEventsResponse = (output: any, context: __SerdeContext): AdminListUserAuthEventsResponse => { - return { - AuthEvents: output.AuthEvents != null ? de_AuthEventsType(output.AuthEvents, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1AdminResetUserPasswordResponse - */ -const de_AdminResetUserPasswordResponse = (output: any, context: __SerdeContext): AdminResetUserPasswordResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminRespondToAuthChallengeResponse - */ -const de_AdminRespondToAuthChallengeResponse = ( - output: any, - context: __SerdeContext -): AdminRespondToAuthChallengeResponse => { - return { - AuthenticationResult: - output.AuthenticationResult != null - ? de_AuthenticationResultType(output.AuthenticationResult, context) - : undefined, - ChallengeName: __expectString(output.ChallengeName), - ChallengeParameters: - output.ChallengeParameters != null ? de_ChallengeParametersType(output.ChallengeParameters, context) : undefined, - Session: __expectString(output.Session), - } as any; -}; - -/** - * deserializeAws_json1_1AdminSetUserMFAPreferenceResponse - */ -const de_AdminSetUserMFAPreferenceResponse = ( - output: any, - context: __SerdeContext -): AdminSetUserMFAPreferenceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminSetUserPasswordResponse - */ -const de_AdminSetUserPasswordResponse = (output: any, context: __SerdeContext): AdminSetUserPasswordResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminSetUserSettingsResponse - */ -const de_AdminSetUserSettingsResponse = (output: any, context: __SerdeContext): AdminSetUserSettingsResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminUpdateAuthEventFeedbackResponse - */ -const de_AdminUpdateAuthEventFeedbackResponse = ( - output: any, - context: __SerdeContext -): AdminUpdateAuthEventFeedbackResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminUpdateDeviceStatusResponse - */ -const de_AdminUpdateDeviceStatusResponse = (output: any, context: __SerdeContext): AdminUpdateDeviceStatusResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminUpdateUserAttributesResponse - */ -const de_AdminUpdateUserAttributesResponse = ( - output: any, - context: __SerdeContext -): AdminUpdateUserAttributesResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AdminUserGlobalSignOutResponse - */ -const de_AdminUserGlobalSignOutResponse = (output: any, context: __SerdeContext): AdminUserGlobalSignOutResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AliasAttributesListType - */ -const de_AliasAttributesListType = (output: any, context: __SerdeContext): (AliasAttributeType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AliasExistsException - */ -const de_AliasExistsException = (output: any, context: __SerdeContext): AliasExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AnalyticsConfigurationType - */ -const de_AnalyticsConfigurationType = (output: any, context: __SerdeContext): AnalyticsConfigurationType => { - return { - ApplicationArn: __expectString(output.ApplicationArn), - ApplicationId: __expectString(output.ApplicationId), - ExternalId: __expectString(output.ExternalId), - RoleArn: __expectString(output.RoleArn), - UserDataShared: __expectBoolean(output.UserDataShared), - } as any; -}; - -/** - * deserializeAws_json1_1AssociateSoftwareTokenResponse - */ -const de_AssociateSoftwareTokenResponse = (output: any, context: __SerdeContext): AssociateSoftwareTokenResponse => { - return { - SecretCode: __expectString(output.SecretCode), - Session: __expectString(output.Session), - } as any; -}; - -/** - * deserializeAws_json1_1AttributeListType - */ -const de_AttributeListType = (output: any, context: __SerdeContext): AttributeType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttributeType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttributeMappingType - */ -const de_AttributeMappingType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1AttributesRequireVerificationBeforeUpdateType - */ -const de_AttributesRequireVerificationBeforeUpdateType = ( - output: any, - context: __SerdeContext -): (VerifiedAttributeType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttributeType - */ -const de_AttributeType = (output: any, context: __SerdeContext): AttributeType => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1AuthenticationResultType - */ -const de_AuthenticationResultType = (output: any, context: __SerdeContext): AuthenticationResultType => { - return { - AccessToken: __expectString(output.AccessToken), - ExpiresIn: __expectInt32(output.ExpiresIn), - IdToken: __expectString(output.IdToken), - NewDeviceMetadata: - output.NewDeviceMetadata != null ? de_NewDeviceMetadataType(output.NewDeviceMetadata, context) : undefined, - RefreshToken: __expectString(output.RefreshToken), - TokenType: __expectString(output.TokenType), - } as any; -}; - -/** - * deserializeAws_json1_1AuthEventsType - */ -const de_AuthEventsType = (output: any, context: __SerdeContext): AuthEventType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthEventType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AuthEventType - */ -const de_AuthEventType = (output: any, context: __SerdeContext): AuthEventType => { - return { - ChallengeResponses: - output.ChallengeResponses != null ? de_ChallengeResponseListType(output.ChallengeResponses, context) : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - EventContextData: - output.EventContextData != null ? de_EventContextDataType(output.EventContextData, context) : undefined, - EventFeedback: output.EventFeedback != null ? de_EventFeedbackType(output.EventFeedback, context) : undefined, - EventId: __expectString(output.EventId), - EventResponse: __expectString(output.EventResponse), - EventRisk: output.EventRisk != null ? de_EventRiskType(output.EventRisk, context) : undefined, - EventType: __expectString(output.EventType), - } as any; -}; - -/** - * deserializeAws_json1_1BlockedIPRangeListType - */ -const de_BlockedIPRangeListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CallbackURLsListType - */ -const de_CallbackURLsListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ChallengeParametersType - */ -const de_ChallengeParametersType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ChallengeResponseListType - */ -const de_ChallengeResponseListType = (output: any, context: __SerdeContext): ChallengeResponseType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChallengeResponseType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ChallengeResponseType - */ -const de_ChallengeResponseType = (output: any, context: __SerdeContext): ChallengeResponseType => { - return { - ChallengeName: __expectString(output.ChallengeName), - ChallengeResponse: __expectString(output.ChallengeResponse), - } as any; -}; - -/** - * deserializeAws_json1_1ChangePasswordResponse - */ -const de_ChangePasswordResponse = (output: any, context: __SerdeContext): ChangePasswordResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ClientPermissionListType - */ -const de_ClientPermissionListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CodeDeliveryDetailsListType - */ -const de_CodeDeliveryDetailsListType = (output: any, context: __SerdeContext): CodeDeliveryDetailsType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeDeliveryDetailsType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CodeDeliveryDetailsType - */ -const de_CodeDeliveryDetailsType = (output: any, context: __SerdeContext): CodeDeliveryDetailsType => { - return { - AttributeName: __expectString(output.AttributeName), - DeliveryMedium: __expectString(output.DeliveryMedium), - Destination: __expectString(output.Destination), - } as any; -}; - -/** - * deserializeAws_json1_1CodeDeliveryFailureException - */ -const de_CodeDeliveryFailureException = (output: any, context: __SerdeContext): CodeDeliveryFailureException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CodeMismatchException - */ -const de_CodeMismatchException = (output: any, context: __SerdeContext): CodeMismatchException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CompromisedCredentialsActionsType - */ -const de_CompromisedCredentialsActionsType = ( - output: any, - context: __SerdeContext -): CompromisedCredentialsActionsType => { - return { - EventAction: __expectString(output.EventAction), - } as any; -}; - -/** - * deserializeAws_json1_1CompromisedCredentialsRiskConfigurationType - */ -const de_CompromisedCredentialsRiskConfigurationType = ( - output: any, - context: __SerdeContext -): CompromisedCredentialsRiskConfigurationType => { - return { - Actions: output.Actions != null ? de_CompromisedCredentialsActionsType(output.Actions, context) : undefined, - EventFilter: output.EventFilter != null ? de_EventFiltersType(output.EventFilter, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ConfirmDeviceResponse - */ -const de_ConfirmDeviceResponse = (output: any, context: __SerdeContext): ConfirmDeviceResponse => { - return { - UserConfirmationNecessary: __expectBoolean(output.UserConfirmationNecessary), - } as any; -}; - -/** - * deserializeAws_json1_1ConfirmForgotPasswordResponse - */ -const de_ConfirmForgotPasswordResponse = (output: any, context: __SerdeContext): ConfirmForgotPasswordResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ConfirmSignUpResponse - */ -const de_ConfirmSignUpResponse = (output: any, context: __SerdeContext): ConfirmSignUpResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateGroupResponse - */ -const de_CreateGroupResponse = (output: any, context: __SerdeContext): CreateGroupResponse => { - return { - Group: output.Group != null ? de_GroupType(output.Group, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateIdentityProviderResponse - */ -const de_CreateIdentityProviderResponse = (output: any, context: __SerdeContext): CreateIdentityProviderResponse => { - return { - IdentityProvider: - output.IdentityProvider != null ? de_IdentityProviderType(output.IdentityProvider, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateResourceServerResponse - */ -const de_CreateResourceServerResponse = (output: any, context: __SerdeContext): CreateResourceServerResponse => { - return { - ResourceServer: output.ResourceServer != null ? de_ResourceServerType(output.ResourceServer, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserImportJobResponse - */ -const de_CreateUserImportJobResponse = (output: any, context: __SerdeContext): CreateUserImportJobResponse => { - return { - UserImportJob: output.UserImportJob != null ? de_UserImportJobType(output.UserImportJob, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserPoolClientResponse - */ -const de_CreateUserPoolClientResponse = (output: any, context: __SerdeContext): CreateUserPoolClientResponse => { - return { - UserPoolClient: output.UserPoolClient != null ? de_UserPoolClientType(output.UserPoolClient, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserPoolDomainResponse - */ -const de_CreateUserPoolDomainResponse = (output: any, context: __SerdeContext): CreateUserPoolDomainResponse => { - return { - CloudFrontDomain: __expectString(output.CloudFrontDomain), - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserPoolResponse - */ -const de_CreateUserPoolResponse = (output: any, context: __SerdeContext): CreateUserPoolResponse => { - return { - UserPool: output.UserPool != null ? de_UserPoolType(output.UserPool, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomDomainConfigType - */ -const de_CustomDomainConfigType = (output: any, context: __SerdeContext): CustomDomainConfigType => { - return { - CertificateArn: __expectString(output.CertificateArn), - } as any; -}; - -/** - * deserializeAws_json1_1CustomEmailLambdaVersionConfigType - */ -const de_CustomEmailLambdaVersionConfigType = ( - output: any, - context: __SerdeContext -): CustomEmailLambdaVersionConfigType => { - return { - LambdaArn: __expectString(output.LambdaArn), - LambdaVersion: __expectString(output.LambdaVersion), - } as any; -}; - -/** - * deserializeAws_json1_1CustomSMSLambdaVersionConfigType - */ -const de_CustomSMSLambdaVersionConfigType = ( - output: any, - context: __SerdeContext -): CustomSMSLambdaVersionConfigType => { - return { - LambdaArn: __expectString(output.LambdaArn), - LambdaVersion: __expectString(output.LambdaVersion), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteUserAttributesResponse - */ -const de_DeleteUserAttributesResponse = (output: any, context: __SerdeContext): DeleteUserAttributesResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteUserPoolDomainResponse - */ -const de_DeleteUserPoolDomainResponse = (output: any, context: __SerdeContext): DeleteUserPoolDomainResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeIdentityProviderResponse - */ -const de_DescribeIdentityProviderResponse = ( - output: any, - context: __SerdeContext -): DescribeIdentityProviderResponse => { - return { - IdentityProvider: - output.IdentityProvider != null ? de_IdentityProviderType(output.IdentityProvider, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeResourceServerResponse - */ -const de_DescribeResourceServerResponse = (output: any, context: __SerdeContext): DescribeResourceServerResponse => { - return { - ResourceServer: output.ResourceServer != null ? de_ResourceServerType(output.ResourceServer, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRiskConfigurationResponse - */ -const de_DescribeRiskConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeRiskConfigurationResponse => { - return { - RiskConfiguration: - output.RiskConfiguration != null ? de_RiskConfigurationType(output.RiskConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeUserImportJobResponse - */ -const de_DescribeUserImportJobResponse = (output: any, context: __SerdeContext): DescribeUserImportJobResponse => { - return { - UserImportJob: output.UserImportJob != null ? de_UserImportJobType(output.UserImportJob, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeUserPoolClientResponse - */ -const de_DescribeUserPoolClientResponse = (output: any, context: __SerdeContext): DescribeUserPoolClientResponse => { - return { - UserPoolClient: output.UserPoolClient != null ? de_UserPoolClientType(output.UserPoolClient, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeUserPoolDomainResponse - */ -const de_DescribeUserPoolDomainResponse = (output: any, context: __SerdeContext): DescribeUserPoolDomainResponse => { - return { - DomainDescription: - output.DomainDescription != null ? de_DomainDescriptionType(output.DomainDescription, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeUserPoolResponse - */ -const de_DescribeUserPoolResponse = (output: any, context: __SerdeContext): DescribeUserPoolResponse => { - return { - UserPool: output.UserPool != null ? de_UserPoolType(output.UserPool, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeviceConfigurationType - */ -const de_DeviceConfigurationType = (output: any, context: __SerdeContext): DeviceConfigurationType => { - return { - ChallengeRequiredOnNewDevice: __expectBoolean(output.ChallengeRequiredOnNewDevice), - DeviceOnlyRememberedOnUserPrompt: __expectBoolean(output.DeviceOnlyRememberedOnUserPrompt), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceListType - */ -const de_DeviceListType = (output: any, context: __SerdeContext): DeviceType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeviceType - */ -const de_DeviceType = (output: any, context: __SerdeContext): DeviceType => { - return { - DeviceAttributes: - output.DeviceAttributes != null ? de_AttributeListType(output.DeviceAttributes, context) : undefined, - DeviceCreateDate: - output.DeviceCreateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceCreateDate))) - : undefined, - DeviceKey: __expectString(output.DeviceKey), - DeviceLastAuthenticatedDate: - output.DeviceLastAuthenticatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceLastAuthenticatedDate))) - : undefined, - DeviceLastModifiedDate: - output.DeviceLastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceLastModifiedDate))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DomainDescriptionType - */ -const de_DomainDescriptionType = (output: any, context: __SerdeContext): DomainDescriptionType => { - return { - AWSAccountId: __expectString(output.AWSAccountId), - CloudFrontDistribution: __expectString(output.CloudFrontDistribution), - CustomDomainConfig: - output.CustomDomainConfig != null ? de_CustomDomainConfigType(output.CustomDomainConfig, context) : undefined, - Domain: __expectString(output.Domain), - S3Bucket: __expectString(output.S3Bucket), - Status: __expectString(output.Status), - UserPoolId: __expectString(output.UserPoolId), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateProviderException - */ -const de_DuplicateProviderException = (output: any, context: __SerdeContext): DuplicateProviderException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EmailConfigurationType - */ -const de_EmailConfigurationType = (output: any, context: __SerdeContext): EmailConfigurationType => { - return { - ConfigurationSet: __expectString(output.ConfigurationSet), - EmailSendingAccount: __expectString(output.EmailSendingAccount), - From: __expectString(output.From), - ReplyToEmailAddress: __expectString(output.ReplyToEmailAddress), - SourceArn: __expectString(output.SourceArn), - } as any; -}; - -/** - * deserializeAws_json1_1EnableSoftwareTokenMFAException - */ -const de_EnableSoftwareTokenMFAException = (output: any, context: __SerdeContext): EnableSoftwareTokenMFAException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EventContextDataType - */ -const de_EventContextDataType = (output: any, context: __SerdeContext): EventContextDataType => { - return { - City: __expectString(output.City), - Country: __expectString(output.Country), - DeviceName: __expectString(output.DeviceName), - IpAddress: __expectString(output.IpAddress), - Timezone: __expectString(output.Timezone), - } as any; -}; - -/** - * deserializeAws_json1_1EventFeedbackType - */ -const de_EventFeedbackType = (output: any, context: __SerdeContext): EventFeedbackType => { - return { - FeedbackDate: - output.FeedbackDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FeedbackDate))) - : undefined, - FeedbackValue: __expectString(output.FeedbackValue), - Provider: __expectString(output.Provider), - } as any; -}; - -/** - * deserializeAws_json1_1EventFiltersType - */ -const de_EventFiltersType = (output: any, context: __SerdeContext): (EventFilterType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventRiskType - */ -const de_EventRiskType = (output: any, context: __SerdeContext): EventRiskType => { - return { - CompromisedCredentialsDetected: __expectBoolean(output.CompromisedCredentialsDetected), - RiskDecision: __expectString(output.RiskDecision), - RiskLevel: __expectString(output.RiskLevel), - } as any; -}; - -/** - * deserializeAws_json1_1ExpiredCodeException - */ -const de_ExpiredCodeException = (output: any, context: __SerdeContext): ExpiredCodeException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ExplicitAuthFlowsListType - */ -const de_ExplicitAuthFlowsListType = (output: any, context: __SerdeContext): (ExplicitAuthFlowsType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ForbiddenException - */ -const de_ForbiddenException = (output: any, context: __SerdeContext): ForbiddenException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ForgotPasswordResponse - */ -const de_ForgotPasswordResponse = (output: any, context: __SerdeContext): ForgotPasswordResponse => { - return { - CodeDeliveryDetails: - output.CodeDeliveryDetails != null ? de_CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetCSVHeaderResponse - */ -const de_GetCSVHeaderResponse = (output: any, context: __SerdeContext): GetCSVHeaderResponse => { - return { - CSVHeader: output.CSVHeader != null ? de_ListOfStringTypes(output.CSVHeader, context) : undefined, - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1GetDeviceResponse - */ -const de_GetDeviceResponse = (output: any, context: __SerdeContext): GetDeviceResponse => { - return { - Device: output.Device != null ? de_DeviceType(output.Device, context) : undefined, - } as any; -}; +// se_UpdateAuthEventFeedbackRequest omitted. -/** - * deserializeAws_json1_1GetGroupResponse - */ -const de_GetGroupResponse = (output: any, context: __SerdeContext): GetGroupResponse => { - return { - Group: output.Group != null ? de_GroupType(output.Group, context) : undefined, - } as any; -}; +// se_UpdateDeviceStatusRequest omitted. -/** - * deserializeAws_json1_1GetIdentityProviderByIdentifierResponse - */ -const de_GetIdentityProviderByIdentifierResponse = ( - output: any, - context: __SerdeContext -): GetIdentityProviderByIdentifierResponse => { - return { - IdentityProvider: - output.IdentityProvider != null ? de_IdentityProviderType(output.IdentityProvider, context) : undefined, - } as any; -}; +// se_UpdateGroupRequest omitted. -/** - * deserializeAws_json1_1GetSigningCertificateResponse - */ -const de_GetSigningCertificateResponse = (output: any, context: __SerdeContext): GetSigningCertificateResponse => { - return { - Certificate: __expectString(output.Certificate), - } as any; -}; +// se_UpdateIdentityProviderRequest omitted. -/** - * deserializeAws_json1_1GetUICustomizationResponse - */ -const de_GetUICustomizationResponse = (output: any, context: __SerdeContext): GetUICustomizationResponse => { - return { - UICustomization: - output.UICustomization != null ? de_UICustomizationType(output.UICustomization, context) : undefined, - } as any; -}; +// se_UpdateResourceServerRequest omitted. -/** - * deserializeAws_json1_1GetUserAttributeVerificationCodeResponse - */ -const de_GetUserAttributeVerificationCodeResponse = ( - output: any, - context: __SerdeContext -): GetUserAttributeVerificationCodeResponse => { - return { - CodeDeliveryDetails: - output.CodeDeliveryDetails != null ? de_CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) : undefined, - } as any; -}; +// se_UpdateUserAttributesRequest omitted. -/** - * deserializeAws_json1_1GetUserPoolMfaConfigResponse - */ -const de_GetUserPoolMfaConfigResponse = (output: any, context: __SerdeContext): GetUserPoolMfaConfigResponse => { - return { - MfaConfiguration: __expectString(output.MfaConfiguration), - SmsMfaConfiguration: - output.SmsMfaConfiguration != null ? de_SmsMfaConfigType(output.SmsMfaConfiguration, context) : undefined, - SoftwareTokenMfaConfiguration: - output.SoftwareTokenMfaConfiguration != null - ? de_SoftwareTokenMfaConfigType(output.SoftwareTokenMfaConfiguration, context) - : undefined, - } as any; -}; +// se_UpdateUserPoolClientRequest omitted. -/** - * deserializeAws_json1_1GetUserResponse - */ -const de_GetUserResponse = (output: any, context: __SerdeContext): GetUserResponse => { - return { - MFAOptions: output.MFAOptions != null ? de_MFAOptionListType(output.MFAOptions, context) : undefined, - PreferredMfaSetting: __expectString(output.PreferredMfaSetting), - UserAttributes: output.UserAttributes != null ? de_AttributeListType(output.UserAttributes, context) : undefined, - UserMFASettingList: - output.UserMFASettingList != null ? de_UserMFASettingListType(output.UserMFASettingList, context) : undefined, - Username: __expectString(output.Username), - } as any; -}; +// se_UpdateUserPoolDomainRequest omitted. -/** - * deserializeAws_json1_1GlobalSignOutResponse - */ -const de_GlobalSignOutResponse = (output: any, context: __SerdeContext): GlobalSignOutResponse => { - return {} as any; -}; +// se_UpdateUserPoolRequest omitted. -/** - * deserializeAws_json1_1GroupExistsException - */ -const de_GroupExistsException = (output: any, context: __SerdeContext): GroupExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UserAttributeUpdateSettingsType omitted. -/** - * deserializeAws_json1_1GroupListType - */ -const de_GroupListType = (output: any, context: __SerdeContext): GroupType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupType(entry, context); - }); - return retVal; -}; +// se_UserContextDataType omitted. -/** - * deserializeAws_json1_1GroupType - */ -const de_GroupType = (output: any, context: __SerdeContext): GroupType => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - Description: __expectString(output.Description), - GroupName: __expectString(output.GroupName), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Precedence: __expectInt32(output.Precedence), - RoleArn: __expectString(output.RoleArn), - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; +// se_UsernameAttributesListType omitted. -/** - * deserializeAws_json1_1IdentityProviderType - */ -const de_IdentityProviderType = (output: any, context: __SerdeContext): IdentityProviderType => { - return { - AttributeMapping: - output.AttributeMapping != null ? de_AttributeMappingType(output.AttributeMapping, context) : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - IdpIdentifiers: - output.IdpIdentifiers != null ? de_IdpIdentifiersListType(output.IdpIdentifiers, context) : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - ProviderDetails: - output.ProviderDetails != null ? de_ProviderDetailsType(output.ProviderDetails, context) : undefined, - ProviderName: __expectString(output.ProviderName), - ProviderType: __expectString(output.ProviderType), - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; - -/** - * deserializeAws_json1_1IdpIdentifiersListType - */ -const de_IdpIdentifiersListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UsernameConfigurationType omitted. -/** - * deserializeAws_json1_1InitiateAuthResponse - */ -const de_InitiateAuthResponse = (output: any, context: __SerdeContext): InitiateAuthResponse => { - return { - AuthenticationResult: - output.AuthenticationResult != null - ? de_AuthenticationResultType(output.AuthenticationResult, context) - : undefined, - ChallengeName: __expectString(output.ChallengeName), - ChallengeParameters: - output.ChallengeParameters != null ? de_ChallengeParametersType(output.ChallengeParameters, context) : undefined, - Session: __expectString(output.Session), - } as any; -}; +// se_UserPoolAddOnsType omitted. -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UserPoolPolicyType omitted. -/** - * deserializeAws_json1_1InvalidEmailRoleAccessPolicyException - */ -const de_InvalidEmailRoleAccessPolicyException = ( - output: any, - context: __SerdeContext -): InvalidEmailRoleAccessPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UserPoolTagsListType omitted. -/** - * deserializeAws_json1_1InvalidLambdaResponseException - */ -const de_InvalidLambdaResponseException = (output: any, context: __SerdeContext): InvalidLambdaResponseException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UserPoolTagsType omitted. -/** - * deserializeAws_json1_1InvalidOAuthFlowException - */ -const de_InvalidOAuthFlowException = (output: any, context: __SerdeContext): InvalidOAuthFlowException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_VerificationMessageTemplateType omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_VerifiedAttributesListType omitted. -/** - * deserializeAws_json1_1InvalidPasswordException - */ -const de_InvalidPasswordException = (output: any, context: __SerdeContext): InvalidPasswordException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_VerifySoftwareTokenRequest omitted. -/** - * deserializeAws_json1_1InvalidSmsRoleAccessPolicyException - */ -const de_InvalidSmsRoleAccessPolicyException = ( - output: any, - context: __SerdeContext -): InvalidSmsRoleAccessPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_VerifyUserAttributeRequest omitted. -/** - * deserializeAws_json1_1InvalidSmsRoleTrustRelationshipException - */ -const de_InvalidSmsRoleTrustRelationshipException = ( - output: any, - context: __SerdeContext -): InvalidSmsRoleTrustRelationshipException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccountRecoverySettingType omitted. -/** - * deserializeAws_json1_1InvalidUserPoolConfigurationException - */ -const de_InvalidUserPoolConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidUserPoolConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccountTakeoverActionsType omitted. -/** - * deserializeAws_json1_1LambdaConfigType - */ -const de_LambdaConfigType = (output: any, context: __SerdeContext): LambdaConfigType => { - return { - CreateAuthChallenge: __expectString(output.CreateAuthChallenge), - CustomEmailSender: - output.CustomEmailSender != null - ? de_CustomEmailLambdaVersionConfigType(output.CustomEmailSender, context) - : undefined, - CustomMessage: __expectString(output.CustomMessage), - CustomSMSSender: - output.CustomSMSSender != null ? de_CustomSMSLambdaVersionConfigType(output.CustomSMSSender, context) : undefined, - DefineAuthChallenge: __expectString(output.DefineAuthChallenge), - KMSKeyID: __expectString(output.KMSKeyID), - PostAuthentication: __expectString(output.PostAuthentication), - PostConfirmation: __expectString(output.PostConfirmation), - PreAuthentication: __expectString(output.PreAuthentication), - PreSignUp: __expectString(output.PreSignUp), - PreTokenGeneration: __expectString(output.PreTokenGeneration), - UserMigration: __expectString(output.UserMigration), - VerifyAuthChallengeResponse: __expectString(output.VerifyAuthChallengeResponse), - } as any; -}; - -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccountTakeoverActionType omitted. -/** - * deserializeAws_json1_1ListDevicesResponse - */ -const de_ListDevicesResponse = (output: any, context: __SerdeContext): ListDevicesResponse => { - return { - Devices: output.Devices != null ? de_DeviceListType(output.Devices, context) : undefined, - PaginationToken: __expectString(output.PaginationToken), - } as any; -}; +// de_AccountTakeoverRiskConfigurationType omitted. -/** - * deserializeAws_json1_1ListGroupsResponse - */ -const de_ListGroupsResponse = (output: any, context: __SerdeContext): ListGroupsResponse => { - return { - Groups: output.Groups != null ? de_GroupListType(output.Groups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AddCustomAttributesResponse omitted. -/** - * deserializeAws_json1_1ListIdentityProvidersResponse - */ -const de_ListIdentityProvidersResponse = (output: any, context: __SerdeContext): ListIdentityProvidersResponse => { - return { - NextToken: __expectString(output.NextToken), - Providers: output.Providers != null ? de_ProvidersListType(output.Providers, context) : undefined, - } as any; -}; +// de_AdminConfirmSignUpResponse omitted. -/** - * deserializeAws_json1_1ListOfStringTypes - */ -const de_ListOfStringTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AdminCreateUserConfigType omitted. /** - * deserializeAws_json1_1ListResourceServersResponse + * deserializeAws_json1_1AdminCreateUserResponse */ -const de_ListResourceServersResponse = (output: any, context: __SerdeContext): ListResourceServersResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceServers: - output.ResourceServers != null ? de_ResourceServersListType(output.ResourceServers, context) : undefined, - } as any; +const de_AdminCreateUserResponse = (output: any, context: __SerdeContext): AdminCreateUserResponse => { + return take(output, { + User: (_: any) => de_UserType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_UserPoolTagsType(output.Tags, context) : undefined, - } as any; -}; +// de_AdminDeleteUserAttributesResponse omitted. -/** - * deserializeAws_json1_1ListUserImportJobsResponse - */ -const de_ListUserImportJobsResponse = (output: any, context: __SerdeContext): ListUserImportJobsResponse => { - return { - PaginationToken: __expectString(output.PaginationToken), - UserImportJobs: - output.UserImportJobs != null ? de_UserImportJobsListType(output.UserImportJobs, context) : undefined, - } as any; -}; +// de_AdminDisableProviderForUserResponse omitted. -/** - * deserializeAws_json1_1ListUserPoolClientsResponse - */ -const de_ListUserPoolClientsResponse = (output: any, context: __SerdeContext): ListUserPoolClientsResponse => { - return { - NextToken: __expectString(output.NextToken), - UserPoolClients: - output.UserPoolClients != null ? de_UserPoolClientListType(output.UserPoolClients, context) : undefined, - } as any; -}; +// de_AdminDisableUserResponse omitted. -/** - * deserializeAws_json1_1ListUserPoolsResponse - */ -const de_ListUserPoolsResponse = (output: any, context: __SerdeContext): ListUserPoolsResponse => { - return { - NextToken: __expectString(output.NextToken), - UserPools: output.UserPools != null ? de_UserPoolListType(output.UserPools, context) : undefined, - } as any; -}; +// de_AdminEnableUserResponse omitted. /** - * deserializeAws_json1_1ListUsersInGroupResponse + * deserializeAws_json1_1AdminGetDeviceResponse */ -const de_ListUsersInGroupResponse = (output: any, context: __SerdeContext): ListUsersInGroupResponse => { - return { - NextToken: __expectString(output.NextToken), - Users: output.Users != null ? de_UsersListType(output.Users, context) : undefined, - } as any; +const de_AdminGetDeviceResponse = (output: any, context: __SerdeContext): AdminGetDeviceResponse => { + return take(output, { + Device: (_: any) => de_DeviceType(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListUsersResponse + * deserializeAws_json1_1AdminGetUserResponse */ -const de_ListUsersResponse = (output: any, context: __SerdeContext): ListUsersResponse => { - return { - PaginationToken: __expectString(output.PaginationToken), - Users: output.Users != null ? de_UsersListType(output.Users, context) : undefined, - } as any; +const de_AdminGetUserResponse = (output: any, context: __SerdeContext): AdminGetUserResponse => { + return take(output, { + Enabled: __expectBoolean, + MFAOptions: _json, + PreferredMfaSetting: __expectString, + UserAttributes: _json, + UserCreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UserLastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UserMFASettingList: _json, + UserStatus: __expectString, + Username: __expectString, + }) as any; }; +// de_AdminInitiateAuthResponse omitted. + +// de_AdminLinkProviderForUserResponse omitted. + /** - * deserializeAws_json1_1LogoutURLsListType + * deserializeAws_json1_1AdminListDevicesResponse */ -const de_LogoutURLsListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_AdminListDevicesResponse = (output: any, context: __SerdeContext): AdminListDevicesResponse => { + return take(output, { + Devices: (_: any) => de_DeviceListType(_, context), + PaginationToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MessageTemplateType + * deserializeAws_json1_1AdminListGroupsForUserResponse */ -const de_MessageTemplateType = (output: any, context: __SerdeContext): MessageTemplateType => { - return { - EmailMessage: __expectString(output.EmailMessage), - EmailSubject: __expectString(output.EmailSubject), - SMSMessage: __expectString(output.SMSMessage), - } as any; +const de_AdminListGroupsForUserResponse = (output: any, context: __SerdeContext): AdminListGroupsForUserResponse => { + return take(output, { + Groups: (_: any) => de_GroupListType(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MFAMethodNotFoundException + * deserializeAws_json1_1AdminListUserAuthEventsResponse */ -const de_MFAMethodNotFoundException = (output: any, context: __SerdeContext): MFAMethodNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_AdminListUserAuthEventsResponse = (output: any, context: __SerdeContext): AdminListUserAuthEventsResponse => { + return take(output, { + AuthEvents: (_: any) => de_AuthEventsType(_, context), + NextToken: __expectString, + }) as any; }; +// de_AdminResetUserPasswordResponse omitted. + +// de_AdminRespondToAuthChallengeResponse omitted. + +// de_AdminSetUserMFAPreferenceResponse omitted. + +// de_AdminSetUserPasswordResponse omitted. + +// de_AdminSetUserSettingsResponse omitted. + +// de_AdminUpdateAuthEventFeedbackResponse omitted. + +// de_AdminUpdateDeviceStatusResponse omitted. + +// de_AdminUpdateUserAttributesResponse omitted. + +// de_AdminUserGlobalSignOutResponse omitted. + +// de_AliasAttributesListType omitted. + +// de_AliasExistsException omitted. + +// de_AnalyticsConfigurationType omitted. + +// de_AssociateSoftwareTokenResponse omitted. + +// de_AttributeListType omitted. + +// de_AttributeMappingType omitted. + +// de_AttributesRequireVerificationBeforeUpdateType omitted. + +// de_AttributeType omitted. + +// de_AuthenticationResultType omitted. + /** - * deserializeAws_json1_1MFAOptionListType + * deserializeAws_json1_1AuthEventsType */ -const de_MFAOptionListType = (output: any, context: __SerdeContext): MFAOptionType[] => { +const de_AuthEventsType = (output: any, context: __SerdeContext): AuthEventType[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MFAOptionType(entry, context); + return de_AuthEventType(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MFAOptionType + * deserializeAws_json1_1AuthEventType */ -const de_MFAOptionType = (output: any, context: __SerdeContext): MFAOptionType => { - return { - AttributeName: __expectString(output.AttributeName), - DeliveryMedium: __expectString(output.DeliveryMedium), - } as any; +const de_AuthEventType = (output: any, context: __SerdeContext): AuthEventType => { + return take(output, { + ChallengeResponses: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventContextData: _json, + EventFeedback: (_: any) => de_EventFeedbackType(_, context), + EventId: __expectString, + EventResponse: __expectString, + EventRisk: _json, + EventType: __expectString, + }) as any; }; +// de_BlockedIPRangeListType omitted. + +// de_CallbackURLsListType omitted. + +// de_ChallengeParametersType omitted. + +// de_ChallengeResponseListType omitted. + +// de_ChallengeResponseType omitted. + +// de_ChangePasswordResponse omitted. + +// de_ClientPermissionListType omitted. + +// de_CodeDeliveryDetailsListType omitted. + +// de_CodeDeliveryDetailsType omitted. + +// de_CodeDeliveryFailureException omitted. + +// de_CodeMismatchException omitted. + +// de_CompromisedCredentialsActionsType omitted. + +// de_CompromisedCredentialsRiskConfigurationType omitted. + +// de_ConcurrentModificationException omitted. + +// de_ConfirmDeviceResponse omitted. + +// de_ConfirmForgotPasswordResponse omitted. + +// de_ConfirmSignUpResponse omitted. + /** - * deserializeAws_json1_1NewDeviceMetadataType + * deserializeAws_json1_1CreateGroupResponse */ -const de_NewDeviceMetadataType = (output: any, context: __SerdeContext): NewDeviceMetadataType => { - return { - DeviceGroupKey: __expectString(output.DeviceGroupKey), - DeviceKey: __expectString(output.DeviceKey), - } as any; +const de_CreateGroupResponse = (output: any, context: __SerdeContext): CreateGroupResponse => { + return take(output, { + Group: (_: any) => de_GroupType(_, context), + }) as any; }; /** - * deserializeAws_json1_1NotAuthorizedException + * deserializeAws_json1_1CreateIdentityProviderResponse */ -const de_NotAuthorizedException = (output: any, context: __SerdeContext): NotAuthorizedException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateIdentityProviderResponse = (output: any, context: __SerdeContext): CreateIdentityProviderResponse => { + return take(output, { + IdentityProvider: (_: any) => de_IdentityProviderType(_, context), + }) as any; }; +// de_CreateResourceServerResponse omitted. + /** - * deserializeAws_json1_1NotifyConfigurationType + * deserializeAws_json1_1CreateUserImportJobResponse */ -const de_NotifyConfigurationType = (output: any, context: __SerdeContext): NotifyConfigurationType => { - return { - BlockEmail: output.BlockEmail != null ? de_NotifyEmailType(output.BlockEmail, context) : undefined, - From: __expectString(output.From), - MfaEmail: output.MfaEmail != null ? de_NotifyEmailType(output.MfaEmail, context) : undefined, - NoActionEmail: output.NoActionEmail != null ? de_NotifyEmailType(output.NoActionEmail, context) : undefined, - ReplyTo: __expectString(output.ReplyTo), - SourceArn: __expectString(output.SourceArn), - } as any; +const de_CreateUserImportJobResponse = (output: any, context: __SerdeContext): CreateUserImportJobResponse => { + return take(output, { + UserImportJob: (_: any) => de_UserImportJobType(_, context), + }) as any; }; /** - * deserializeAws_json1_1NotifyEmailType + * deserializeAws_json1_1CreateUserPoolClientResponse */ -const de_NotifyEmailType = (output: any, context: __SerdeContext): NotifyEmailType => { - return { - HtmlBody: __expectString(output.HtmlBody), - Subject: __expectString(output.Subject), - TextBody: __expectString(output.TextBody), - } as any; +const de_CreateUserPoolClientResponse = (output: any, context: __SerdeContext): CreateUserPoolClientResponse => { + return take(output, { + UserPoolClient: (_: any) => de_UserPoolClientType(_, context), + }) as any; }; +// de_CreateUserPoolDomainResponse omitted. + /** - * deserializeAws_json1_1NumberAttributeConstraintsType + * deserializeAws_json1_1CreateUserPoolResponse */ -const de_NumberAttributeConstraintsType = (output: any, context: __SerdeContext): NumberAttributeConstraintsType => { - return { - MaxValue: __expectString(output.MaxValue), - MinValue: __expectString(output.MinValue), - } as any; +const de_CreateUserPoolResponse = (output: any, context: __SerdeContext): CreateUserPoolResponse => { + return take(output, { + UserPool: (_: any) => de_UserPoolType(_, context), + }) as any; }; +// de_CustomDomainConfigType omitted. + +// de_CustomEmailLambdaVersionConfigType omitted. + +// de_CustomSMSLambdaVersionConfigType omitted. + +// de_DeleteUserAttributesResponse omitted. + +// de_DeleteUserPoolDomainResponse omitted. + /** - * deserializeAws_json1_1OAuthFlowsType + * deserializeAws_json1_1DescribeIdentityProviderResponse */ -const de_OAuthFlowsType = (output: any, context: __SerdeContext): (OAuthFlowType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeIdentityProviderResponse = ( + output: any, + context: __SerdeContext +): DescribeIdentityProviderResponse => { + return take(output, { + IdentityProvider: (_: any) => de_IdentityProviderType(_, context), + }) as any; }; +// de_DescribeResourceServerResponse omitted. + /** - * deserializeAws_json1_1PasswordPolicyType + * deserializeAws_json1_1DescribeRiskConfigurationResponse */ -const de_PasswordPolicyType = (output: any, context: __SerdeContext): PasswordPolicyType => { - return { - MinimumLength: __expectInt32(output.MinimumLength), - RequireLowercase: __expectBoolean(output.RequireLowercase), - RequireNumbers: __expectBoolean(output.RequireNumbers), - RequireSymbols: __expectBoolean(output.RequireSymbols), - RequireUppercase: __expectBoolean(output.RequireUppercase), - TemporaryPasswordValidityDays: __expectInt32(output.TemporaryPasswordValidityDays), - } as any; +const de_DescribeRiskConfigurationResponse = ( + output: any, + context: __SerdeContext +): DescribeRiskConfigurationResponse => { + return take(output, { + RiskConfiguration: (_: any) => de_RiskConfigurationType(_, context), + }) as any; }; /** - * deserializeAws_json1_1PasswordResetRequiredException + * deserializeAws_json1_1DescribeUserImportJobResponse */ -const de_PasswordResetRequiredException = (output: any, context: __SerdeContext): PasswordResetRequiredException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeUserImportJobResponse = (output: any, context: __SerdeContext): DescribeUserImportJobResponse => { + return take(output, { + UserImportJob: (_: any) => de_UserImportJobType(_, context), + }) as any; }; /** - * deserializeAws_json1_1PreconditionNotMetException + * deserializeAws_json1_1DescribeUserPoolClientResponse */ -const de_PreconditionNotMetException = (output: any, context: __SerdeContext): PreconditionNotMetException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeUserPoolClientResponse = (output: any, context: __SerdeContext): DescribeUserPoolClientResponse => { + return take(output, { + UserPoolClient: (_: any) => de_UserPoolClientType(_, context), + }) as any; }; +// de_DescribeUserPoolDomainResponse omitted. + /** - * deserializeAws_json1_1ProviderDescription + * deserializeAws_json1_1DescribeUserPoolResponse */ -const de_ProviderDescription = (output: any, context: __SerdeContext): ProviderDescription => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - ProviderName: __expectString(output.ProviderName), - ProviderType: __expectString(output.ProviderType), - } as any; -}; - -/** - * deserializeAws_json1_1ProviderDetailsType - */ -const de_ProviderDetailsType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_DescribeUserPoolResponse = (output: any, context: __SerdeContext): DescribeUserPoolResponse => { + return take(output, { + UserPool: (_: any) => de_UserPoolType(_, context), + }) as any; }; +// de_DeviceConfigurationType omitted. + /** - * deserializeAws_json1_1ProvidersListType + * deserializeAws_json1_1DeviceListType */ -const de_ProvidersListType = (output: any, context: __SerdeContext): ProviderDescription[] => { +const de_DeviceListType = (output: any, context: __SerdeContext): DeviceType[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProviderDescription(entry, context); + return de_DeviceType(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1RecoveryMechanismsType + * deserializeAws_json1_1DeviceType */ -const de_RecoveryMechanismsType = (output: any, context: __SerdeContext): RecoveryOptionType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoveryOptionType(entry, context); - }); - return retVal; +const de_DeviceType = (output: any, context: __SerdeContext): DeviceType => { + return take(output, { + DeviceAttributes: _json, + DeviceCreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceKey: __expectString, + DeviceLastAuthenticatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceLastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DomainDescriptionType omitted. + +// de_DuplicateProviderException omitted. + +// de_EmailConfigurationType omitted. + +// de_EnableSoftwareTokenMFAException omitted. + +// de_EventContextDataType omitted. + /** - * deserializeAws_json1_1RecoveryOptionType + * deserializeAws_json1_1EventFeedbackType */ -const de_RecoveryOptionType = (output: any, context: __SerdeContext): RecoveryOptionType => { - return { - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - } as any; +const de_EventFeedbackType = (output: any, context: __SerdeContext): EventFeedbackType => { + return take(output, { + FeedbackDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FeedbackValue: __expectString, + Provider: __expectString, + }) as any; }; +// de_EventFiltersType omitted. + +// de_EventRiskType omitted. + +// de_ExpiredCodeException omitted. + +// de_ExplicitAuthFlowsListType omitted. + +// de_ForbiddenException omitted. + +// de_ForgotPasswordResponse omitted. + +// de_GetCSVHeaderResponse omitted. + /** - * deserializeAws_json1_1ResendConfirmationCodeResponse + * deserializeAws_json1_1GetDeviceResponse */ -const de_ResendConfirmationCodeResponse = (output: any, context: __SerdeContext): ResendConfirmationCodeResponse => { - return { - CodeDeliveryDetails: - output.CodeDeliveryDetails != null ? de_CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) : undefined, - } as any; +const de_GetDeviceResponse = (output: any, context: __SerdeContext): GetDeviceResponse => { + return take(output, { + Device: (_: any) => de_DeviceType(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1GetGroupResponse */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_GetGroupResponse = (output: any, context: __SerdeContext): GetGroupResponse => { + return take(output, { + Group: (_: any) => de_GroupType(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceServerScopeListType + * deserializeAws_json1_1GetIdentityProviderByIdentifierResponse */ -const de_ResourceServerScopeListType = (output: any, context: __SerdeContext): ResourceServerScopeType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceServerScopeType(entry, context); - }); - return retVal; +const de_GetIdentityProviderByIdentifierResponse = ( + output: any, + context: __SerdeContext +): GetIdentityProviderByIdentifierResponse => { + return take(output, { + IdentityProvider: (_: any) => de_IdentityProviderType(_, context), + }) as any; }; +// de_GetSigningCertificateResponse omitted. + /** - * deserializeAws_json1_1ResourceServerScopeType + * deserializeAws_json1_1GetUICustomizationResponse */ -const de_ResourceServerScopeType = (output: any, context: __SerdeContext): ResourceServerScopeType => { - return { - ScopeDescription: __expectString(output.ScopeDescription), - ScopeName: __expectString(output.ScopeName), - } as any; +const de_GetUICustomizationResponse = (output: any, context: __SerdeContext): GetUICustomizationResponse => { + return take(output, { + UICustomization: (_: any) => de_UICustomizationType(_, context), + }) as any; }; +// de_GetUserAttributeVerificationCodeResponse omitted. + +// de_GetUserPoolMfaConfigResponse omitted. + +// de_GetUserResponse omitted. + +// de_GlobalSignOutResponse omitted. + +// de_GroupExistsException omitted. + /** - * deserializeAws_json1_1ResourceServersListType + * deserializeAws_json1_1GroupListType */ -const de_ResourceServersListType = (output: any, context: __SerdeContext): ResourceServerType[] => { +const de_GroupListType = (output: any, context: __SerdeContext): GroupType[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceServerType(entry, context); + return de_GroupType(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceServerType + * deserializeAws_json1_1GroupType */ -const de_ResourceServerType = (output: any, context: __SerdeContext): ResourceServerType => { - return { - Identifier: __expectString(output.Identifier), - Name: __expectString(output.Name), - Scopes: output.Scopes != null ? de_ResourceServerScopeListType(output.Scopes, context) : undefined, - UserPoolId: __expectString(output.UserPoolId), - } as any; +const de_GroupType = (output: any, context: __SerdeContext): GroupType => { + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + GroupName: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Precedence: __expectInt32, + RoleArn: __expectString, + UserPoolId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RespondToAuthChallengeResponse + * deserializeAws_json1_1IdentityProviderType */ -const de_RespondToAuthChallengeResponse = (output: any, context: __SerdeContext): RespondToAuthChallengeResponse => { - return { - AuthenticationResult: - output.AuthenticationResult != null - ? de_AuthenticationResultType(output.AuthenticationResult, context) - : undefined, - ChallengeName: __expectString(output.ChallengeName), - ChallengeParameters: - output.ChallengeParameters != null ? de_ChallengeParametersType(output.ChallengeParameters, context) : undefined, - Session: __expectString(output.Session), - } as any; +const de_IdentityProviderType = (output: any, context: __SerdeContext): IdentityProviderType => { + return take(output, { + AttributeMapping: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IdpIdentifiers: _json, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProviderDetails: _json, + ProviderName: __expectString, + ProviderType: __expectString, + UserPoolId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RevokeTokenResponse - */ -const de_RevokeTokenResponse = (output: any, context: __SerdeContext): RevokeTokenResponse => { - return {} as any; -}; +// de_IdpIdentifiersListType omitted. -/** - * deserializeAws_json1_1RiskConfigurationType - */ -const de_RiskConfigurationType = (output: any, context: __SerdeContext): RiskConfigurationType => { - return { - AccountTakeoverRiskConfiguration: - output.AccountTakeoverRiskConfiguration != null - ? de_AccountTakeoverRiskConfigurationType(output.AccountTakeoverRiskConfiguration, context) - : undefined, - ClientId: __expectString(output.ClientId), - CompromisedCredentialsRiskConfiguration: - output.CompromisedCredentialsRiskConfiguration != null - ? de_CompromisedCredentialsRiskConfigurationType(output.CompromisedCredentialsRiskConfiguration, context) - : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - RiskExceptionConfiguration: - output.RiskExceptionConfiguration != null - ? de_RiskExceptionConfigurationType(output.RiskExceptionConfiguration, context) - : undefined, - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; - -/** - * deserializeAws_json1_1RiskExceptionConfigurationType - */ -const de_RiskExceptionConfigurationType = (output: any, context: __SerdeContext): RiskExceptionConfigurationType => { - return { - BlockedIPRangeList: - output.BlockedIPRangeList != null ? de_BlockedIPRangeListType(output.BlockedIPRangeList, context) : undefined, - SkippedIPRangeList: - output.SkippedIPRangeList != null ? de_SkippedIPRangeListType(output.SkippedIPRangeList, context) : undefined, - } as any; -}; +// de_InitiateAuthResponse omitted. -/** - * deserializeAws_json1_1SchemaAttributesListType - */ -const de_SchemaAttributesListType = (output: any, context: __SerdeContext): SchemaAttributeType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaAttributeType(entry, context); - }); - return retVal; -}; +// de_InternalErrorException omitted. + +// de_InvalidEmailRoleAccessPolicyException omitted. + +// de_InvalidLambdaResponseException omitted. + +// de_InvalidOAuthFlowException omitted. + +// de_InvalidParameterException omitted. + +// de_InvalidPasswordException omitted. + +// de_InvalidSmsRoleAccessPolicyException omitted. + +// de_InvalidSmsRoleTrustRelationshipException omitted. + +// de_InvalidUserPoolConfigurationException omitted. + +// de_LambdaConfigType omitted. + +// de_LimitExceededException omitted. /** - * deserializeAws_json1_1SchemaAttributeType + * deserializeAws_json1_1ListDevicesResponse */ -const de_SchemaAttributeType = (output: any, context: __SerdeContext): SchemaAttributeType => { - return { - AttributeDataType: __expectString(output.AttributeDataType), - DeveloperOnlyAttribute: __expectBoolean(output.DeveloperOnlyAttribute), - Mutable: __expectBoolean(output.Mutable), - Name: __expectString(output.Name), - NumberAttributeConstraints: - output.NumberAttributeConstraints != null - ? de_NumberAttributeConstraintsType(output.NumberAttributeConstraints, context) - : undefined, - Required: __expectBoolean(output.Required), - StringAttributeConstraints: - output.StringAttributeConstraints != null - ? de_StringAttributeConstraintsType(output.StringAttributeConstraints, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ScopeDoesNotExistException - */ -const de_ScopeDoesNotExistException = (output: any, context: __SerdeContext): ScopeDoesNotExistException => { - return { - message: __expectString(output.message), - } as any; +const de_ListDevicesResponse = (output: any, context: __SerdeContext): ListDevicesResponse => { + return take(output, { + Devices: (_: any) => de_DeviceListType(_, context), + PaginationToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ScopeListType + * deserializeAws_json1_1ListGroupsResponse */ -const de_ScopeListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListGroupsResponse = (output: any, context: __SerdeContext): ListGroupsResponse => { + return take(output, { + Groups: (_: any) => de_GroupListType(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SetRiskConfigurationResponse - */ -const de_SetRiskConfigurationResponse = (output: any, context: __SerdeContext): SetRiskConfigurationResponse => { - return { - RiskConfiguration: - output.RiskConfiguration != null ? de_RiskConfigurationType(output.RiskConfiguration, context) : undefined, - } as any; + * deserializeAws_json1_1ListIdentityProvidersResponse + */ +const de_ListIdentityProvidersResponse = (output: any, context: __SerdeContext): ListIdentityProvidersResponse => { + return take(output, { + NextToken: __expectString, + Providers: (_: any) => de_ProvidersListType(_, context), + }) as any; }; +// de_ListOfStringTypes omitted. + +// de_ListResourceServersResponse omitted. + +// de_ListTagsForResourceResponse omitted. + /** - * deserializeAws_json1_1SetUICustomizationResponse + * deserializeAws_json1_1ListUserImportJobsResponse */ -const de_SetUICustomizationResponse = (output: any, context: __SerdeContext): SetUICustomizationResponse => { - return { - UICustomization: - output.UICustomization != null ? de_UICustomizationType(output.UICustomization, context) : undefined, - } as any; +const de_ListUserImportJobsResponse = (output: any, context: __SerdeContext): ListUserImportJobsResponse => { + return take(output, { + PaginationToken: __expectString, + UserImportJobs: (_: any) => de_UserImportJobsListType(_, context), + }) as any; }; +// de_ListUserPoolClientsResponse omitted. + /** - * deserializeAws_json1_1SetUserMFAPreferenceResponse + * deserializeAws_json1_1ListUserPoolsResponse */ -const de_SetUserMFAPreferenceResponse = (output: any, context: __SerdeContext): SetUserMFAPreferenceResponse => { - return {} as any; +const de_ListUserPoolsResponse = (output: any, context: __SerdeContext): ListUserPoolsResponse => { + return take(output, { + NextToken: __expectString, + UserPools: (_: any) => de_UserPoolListType(_, context), + }) as any; }; /** - * deserializeAws_json1_1SetUserPoolMfaConfigResponse + * deserializeAws_json1_1ListUsersInGroupResponse */ -const de_SetUserPoolMfaConfigResponse = (output: any, context: __SerdeContext): SetUserPoolMfaConfigResponse => { - return { - MfaConfiguration: __expectString(output.MfaConfiguration), - SmsMfaConfiguration: - output.SmsMfaConfiguration != null ? de_SmsMfaConfigType(output.SmsMfaConfiguration, context) : undefined, - SoftwareTokenMfaConfiguration: - output.SoftwareTokenMfaConfiguration != null - ? de_SoftwareTokenMfaConfigType(output.SoftwareTokenMfaConfiguration, context) - : undefined, - } as any; +const de_ListUsersInGroupResponse = (output: any, context: __SerdeContext): ListUsersInGroupResponse => { + return take(output, { + NextToken: __expectString, + Users: (_: any) => de_UsersListType(_, context), + }) as any; }; /** - * deserializeAws_json1_1SetUserSettingsResponse + * deserializeAws_json1_1ListUsersResponse */ -const de_SetUserSettingsResponse = (output: any, context: __SerdeContext): SetUserSettingsResponse => { - return {} as any; +const de_ListUsersResponse = (output: any, context: __SerdeContext): ListUsersResponse => { + return take(output, { + PaginationToken: __expectString, + Users: (_: any) => de_UsersListType(_, context), + }) as any; }; +// de_LogoutURLsListType omitted. + +// de_MessageTemplateType omitted. + +// de_MFAMethodNotFoundException omitted. + +// de_MFAOptionListType omitted. + +// de_MFAOptionType omitted. + +// de_NewDeviceMetadataType omitted. + +// de_NotAuthorizedException omitted. + +// de_NotifyConfigurationType omitted. + +// de_NotifyEmailType omitted. + +// de_NumberAttributeConstraintsType omitted. + +// de_OAuthFlowsType omitted. + +// de_PasswordPolicyType omitted. + +// de_PasswordResetRequiredException omitted. + +// de_PreconditionNotMetException omitted. + /** - * deserializeAws_json1_1SignUpResponse + * deserializeAws_json1_1ProviderDescription */ -const de_SignUpResponse = (output: any, context: __SerdeContext): SignUpResponse => { - return { - CodeDeliveryDetails: - output.CodeDeliveryDetails != null ? de_CodeDeliveryDetailsType(output.CodeDeliveryDetails, context) : undefined, - UserConfirmed: __expectBoolean(output.UserConfirmed), - UserSub: __expectString(output.UserSub), - } as any; +const de_ProviderDescription = (output: any, context: __SerdeContext): ProviderDescription => { + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProviderName: __expectString, + ProviderType: __expectString, + }) as any; }; +// de_ProviderDetailsType omitted. + /** - * deserializeAws_json1_1SkippedIPRangeListType + * deserializeAws_json1_1ProvidersListType */ -const de_SkippedIPRangeListType = (output: any, context: __SerdeContext): string[] => { +const de_ProvidersListType = (output: any, context: __SerdeContext): ProviderDescription[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ProviderDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SmsConfigurationType - */ -const de_SmsConfigurationType = (output: any, context: __SerdeContext): SmsConfigurationType => { - return { - ExternalId: __expectString(output.ExternalId), - SnsCallerArn: __expectString(output.SnsCallerArn), - SnsRegion: __expectString(output.SnsRegion), - } as any; -}; +// de_RecoveryMechanismsType omitted. + +// de_RecoveryOptionType omitted. + +// de_ResendConfirmationCodeResponse omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceServerScopeListType omitted. + +// de_ResourceServerScopeType omitted. + +// de_ResourceServersListType omitted. + +// de_ResourceServerType omitted. + +// de_RespondToAuthChallengeResponse omitted. + +// de_RevokeTokenResponse omitted. /** - * deserializeAws_json1_1SmsMfaConfigType + * deserializeAws_json1_1RiskConfigurationType */ -const de_SmsMfaConfigType = (output: any, context: __SerdeContext): SmsMfaConfigType => { - return { - SmsAuthenticationMessage: __expectString(output.SmsAuthenticationMessage), - SmsConfiguration: - output.SmsConfiguration != null ? de_SmsConfigurationType(output.SmsConfiguration, context) : undefined, - } as any; +const de_RiskConfigurationType = (output: any, context: __SerdeContext): RiskConfigurationType => { + return take(output, { + AccountTakeoverRiskConfiguration: _json, + ClientId: __expectString, + CompromisedCredentialsRiskConfiguration: _json, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RiskExceptionConfiguration: _json, + UserPoolId: __expectString, + }) as any; }; +// de_RiskExceptionConfigurationType omitted. + +// de_SchemaAttributesListType omitted. + +// de_SchemaAttributeType omitted. + +// de_ScopeDoesNotExistException omitted. + +// de_ScopeListType omitted. + /** - * deserializeAws_json1_1SoftwareTokenMfaConfigType + * deserializeAws_json1_1SetRiskConfigurationResponse */ -const de_SoftwareTokenMfaConfigType = (output: any, context: __SerdeContext): SoftwareTokenMfaConfigType => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; +const de_SetRiskConfigurationResponse = (output: any, context: __SerdeContext): SetRiskConfigurationResponse => { + return take(output, { + RiskConfiguration: (_: any) => de_RiskConfigurationType(_, context), + }) as any; }; /** - * deserializeAws_json1_1SoftwareTokenMFANotFoundException + * deserializeAws_json1_1SetUICustomizationResponse */ -const de_SoftwareTokenMFANotFoundException = ( - output: any, - context: __SerdeContext -): SoftwareTokenMFANotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_SetUICustomizationResponse = (output: any, context: __SerdeContext): SetUICustomizationResponse => { + return take(output, { + UICustomization: (_: any) => de_UICustomizationType(_, context), + }) as any; }; +// de_SetUserMFAPreferenceResponse omitted. + +// de_SetUserPoolMfaConfigResponse omitted. + +// de_SetUserSettingsResponse omitted. + +// de_SignUpResponse omitted. + +// de_SkippedIPRangeListType omitted. + +// de_SmsConfigurationType omitted. + +// de_SmsMfaConfigType omitted. + +// de_SoftwareTokenMfaConfigType omitted. + +// de_SoftwareTokenMFANotFoundException omitted. + /** * deserializeAws_json1_1StartUserImportJobResponse */ const de_StartUserImportJobResponse = (output: any, context: __SerdeContext): StartUserImportJobResponse => { - return { - UserImportJob: output.UserImportJob != null ? de_UserImportJobType(output.UserImportJob, context) : undefined, - } as any; + return take(output, { + UserImportJob: (_: any) => de_UserImportJobType(_, context), + }) as any; }; /** * deserializeAws_json1_1StopUserImportJobResponse */ const de_StopUserImportJobResponse = (output: any, context: __SerdeContext): StopUserImportJobResponse => { - return { - UserImportJob: output.UserImportJob != null ? de_UserImportJobType(output.UserImportJob, context) : undefined, - } as any; + return take(output, { + UserImportJob: (_: any) => de_UserImportJobType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StringAttributeConstraintsType - */ -const de_StringAttributeConstraintsType = (output: any, context: __SerdeContext): StringAttributeConstraintsType => { - return { - MaxLength: __expectString(output.MaxLength), - MinLength: __expectString(output.MinLength), - } as any; -}; +// de_StringAttributeConstraintsType omitted. -/** - * deserializeAws_json1_1SupportedIdentityProvidersListType - */ -const de_SupportedIdentityProvidersListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SupportedIdentityProvidersListType omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TokenValidityUnitsType - */ -const de_TokenValidityUnitsType = (output: any, context: __SerdeContext): TokenValidityUnitsType => { - return { - AccessToken: __expectString(output.AccessToken), - IdToken: __expectString(output.IdToken), - RefreshToken: __expectString(output.RefreshToken), - } as any; -}; +// de_TokenValidityUnitsType omitted. -/** - * deserializeAws_json1_1TooManyFailedAttemptsException - */ -const de_TooManyFailedAttemptsException = (output: any, context: __SerdeContext): TooManyFailedAttemptsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyFailedAttemptsException omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyRequestsException omitted. /** * deserializeAws_json1_1UICustomizationType */ const de_UICustomizationType = (output: any, context: __SerdeContext): UICustomizationType => { - return { - CSS: __expectString(output.CSS), - CSSVersion: __expectString(output.CSSVersion), - ClientId: __expectString(output.ClientId), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - ImageUrl: __expectString(output.ImageUrl), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; - -/** - * deserializeAws_json1_1UnauthorizedException - */ -const de_UnauthorizedException = (output: any, context: __SerdeContext): UnauthorizedException => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + CSS: __expectString, + CSSVersion: __expectString, + ClientId: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImageUrl: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UserPoolId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UnexpectedLambdaException - */ -const de_UnexpectedLambdaException = (output: any, context: __SerdeContext): UnexpectedLambdaException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnauthorizedException omitted. -/** - * deserializeAws_json1_1UnsupportedIdentityProviderException - */ -const de_UnsupportedIdentityProviderException = ( - output: any, - context: __SerdeContext -): UnsupportedIdentityProviderException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnexpectedLambdaException omitted. -/** - * deserializeAws_json1_1UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedIdentityProviderException omitted. -/** - * deserializeAws_json1_1UnsupportedTokenTypeException - */ -const de_UnsupportedTokenTypeException = (output: any, context: __SerdeContext): UnsupportedTokenTypeException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedOperationException omitted. -/** - * deserializeAws_json1_1UnsupportedUserStateException - */ -const de_UnsupportedUserStateException = (output: any, context: __SerdeContext): UnsupportedUserStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedTokenTypeException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UnsupportedUserStateException omitted. -/** - * deserializeAws_json1_1UpdateAuthEventFeedbackResponse - */ -const de_UpdateAuthEventFeedbackResponse = (output: any, context: __SerdeContext): UpdateAuthEventFeedbackResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateDeviceStatusResponse - */ -const de_UpdateDeviceStatusResponse = (output: any, context: __SerdeContext): UpdateDeviceStatusResponse => { - return {} as any; -}; +// de_UpdateAuthEventFeedbackResponse omitted. + +// de_UpdateDeviceStatusResponse omitted. /** * deserializeAws_json1_1UpdateGroupResponse */ const de_UpdateGroupResponse = (output: any, context: __SerdeContext): UpdateGroupResponse => { - return { - Group: output.Group != null ? de_GroupType(output.Group, context) : undefined, - } as any; + return take(output, { + Group: (_: any) => de_GroupType(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateIdentityProviderResponse */ const de_UpdateIdentityProviderResponse = (output: any, context: __SerdeContext): UpdateIdentityProviderResponse => { - return { - IdentityProvider: - output.IdentityProvider != null ? de_IdentityProviderType(output.IdentityProvider, context) : undefined, - } as any; + return take(output, { + IdentityProvider: (_: any) => de_IdentityProviderType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateResourceServerResponse - */ -const de_UpdateResourceServerResponse = (output: any, context: __SerdeContext): UpdateResourceServerResponse => { - return { - ResourceServer: output.ResourceServer != null ? de_ResourceServerType(output.ResourceServer, context) : undefined, - } as any; -}; +// de_UpdateResourceServerResponse omitted. -/** - * deserializeAws_json1_1UpdateUserAttributesResponse - */ -const de_UpdateUserAttributesResponse = (output: any, context: __SerdeContext): UpdateUserAttributesResponse => { - return { - CodeDeliveryDetailsList: - output.CodeDeliveryDetailsList != null - ? de_CodeDeliveryDetailsListType(output.CodeDeliveryDetailsList, context) - : undefined, - } as any; -}; +// de_UpdateUserAttributesResponse omitted. /** * deserializeAws_json1_1UpdateUserPoolClientResponse */ const de_UpdateUserPoolClientResponse = (output: any, context: __SerdeContext): UpdateUserPoolClientResponse => { - return { - UserPoolClient: output.UserPoolClient != null ? de_UserPoolClientType(output.UserPoolClient, context) : undefined, - } as any; + return take(output, { + UserPoolClient: (_: any) => de_UserPoolClientType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateUserPoolDomainResponse - */ -const de_UpdateUserPoolDomainResponse = (output: any, context: __SerdeContext): UpdateUserPoolDomainResponse => { - return { - CloudFrontDomain: __expectString(output.CloudFrontDomain), - } as any; -}; +// de_UpdateUserPoolDomainResponse omitted. -/** - * deserializeAws_json1_1UpdateUserPoolResponse - */ -const de_UpdateUserPoolResponse = (output: any, context: __SerdeContext): UpdateUserPoolResponse => { - return {} as any; -}; +// de_UpdateUserPoolResponse omitted. -/** - * deserializeAws_json1_1UserAttributeUpdateSettingsType - */ -const de_UserAttributeUpdateSettingsType = (output: any, context: __SerdeContext): UserAttributeUpdateSettingsType => { - return { - AttributesRequireVerificationBeforeUpdate: - output.AttributesRequireVerificationBeforeUpdate != null - ? de_AttributesRequireVerificationBeforeUpdateType(output.AttributesRequireVerificationBeforeUpdate, context) - : undefined, - } as any; -}; +// de_UserAttributeUpdateSettingsType omitted. -/** - * deserializeAws_json1_1UserImportInProgressException - */ -const de_UserImportInProgressException = (output: any, context: __SerdeContext): UserImportInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserImportInProgressException omitted. /** * deserializeAws_json1_1UserImportJobsListType @@ -13895,9 +10387,6 @@ const de_UserImportJobsListType = (output: any, context: __SerdeContext): UserIm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserImportJobType(entry, context); }); return retVal; @@ -13907,221 +10396,90 @@ const de_UserImportJobsListType = (output: any, context: __SerdeContext): UserIm * deserializeAws_json1_1UserImportJobType */ const de_UserImportJobType = (output: any, context: __SerdeContext): UserImportJobType => { - return { - CloudWatchLogsRoleArn: __expectString(output.CloudWatchLogsRoleArn), - CompletionDate: - output.CompletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionDate))) - : undefined, - CompletionMessage: __expectString(output.CompletionMessage), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - FailedUsers: __expectLong(output.FailedUsers), - ImportedUsers: __expectLong(output.ImportedUsers), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - PreSignedUrl: __expectString(output.PreSignedUrl), - SkippedUsers: __expectLong(output.SkippedUsers), - StartDate: - output.StartDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDate))) : undefined, - Status: __expectString(output.Status), - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; - -/** - * deserializeAws_json1_1UserLambdaValidationException - */ -const de_UserLambdaValidationException = (output: any, context: __SerdeContext): UserLambdaValidationException => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + CloudWatchLogsRoleArn: __expectString, + CompletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompletionMessage: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailedUsers: __expectLong, + ImportedUsers: __expectLong, + JobId: __expectString, + JobName: __expectString, + PreSignedUrl: __expectString, + SkippedUsers: __expectLong, + StartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + UserPoolId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UserMFASettingListType - */ -const de_UserMFASettingListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UserLambdaValidationException omitted. -/** - * deserializeAws_json1_1UsernameAttributesListType - */ -const de_UsernameAttributesListType = (output: any, context: __SerdeContext): (UsernameAttributeType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UserMFASettingListType omitted. -/** - * deserializeAws_json1_1UsernameConfigurationType - */ -const de_UsernameConfigurationType = (output: any, context: __SerdeContext): UsernameConfigurationType => { - return { - CaseSensitive: __expectBoolean(output.CaseSensitive), - } as any; -}; +// de_UsernameAttributesListType omitted. -/** - * deserializeAws_json1_1UsernameExistsException - */ -const de_UsernameExistsException = (output: any, context: __SerdeContext): UsernameExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UsernameConfigurationType omitted. -/** - * deserializeAws_json1_1UserNotConfirmedException - */ -const de_UserNotConfirmedException = (output: any, context: __SerdeContext): UserNotConfirmedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UsernameExistsException omitted. -/** - * deserializeAws_json1_1UserNotFoundException - */ -const de_UserNotFoundException = (output: any, context: __SerdeContext): UserNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserNotConfirmedException omitted. -/** - * deserializeAws_json1_1UserPoolAddOnNotEnabledException - */ -const de_UserPoolAddOnNotEnabledException = ( - output: any, - context: __SerdeContext -): UserPoolAddOnNotEnabledException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserNotFoundException omitted. -/** - * deserializeAws_json1_1UserPoolAddOnsType - */ -const de_UserPoolAddOnsType = (output: any, context: __SerdeContext): UserPoolAddOnsType => { - return { - AdvancedSecurityMode: __expectString(output.AdvancedSecurityMode), - } as any; -}; +// de_UserPoolAddOnNotEnabledException omitted. -/** - * deserializeAws_json1_1UserPoolClientDescription - */ -const de_UserPoolClientDescription = (output: any, context: __SerdeContext): UserPoolClientDescription => { - return { - ClientId: __expectString(output.ClientId), - ClientName: __expectString(output.ClientName), - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; +// de_UserPoolAddOnsType omitted. -/** - * deserializeAws_json1_1UserPoolClientListType - */ -const de_UserPoolClientListType = (output: any, context: __SerdeContext): UserPoolClientDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserPoolClientDescription(entry, context); - }); - return retVal; -}; +// de_UserPoolClientDescription omitted. + +// de_UserPoolClientListType omitted. /** * deserializeAws_json1_1UserPoolClientType */ const de_UserPoolClientType = (output: any, context: __SerdeContext): UserPoolClientType => { - return { - AccessTokenValidity: __expectInt32(output.AccessTokenValidity), - AllowedOAuthFlows: - output.AllowedOAuthFlows != null ? de_OAuthFlowsType(output.AllowedOAuthFlows, context) : undefined, - AllowedOAuthFlowsUserPoolClient: __expectBoolean(output.AllowedOAuthFlowsUserPoolClient), - AllowedOAuthScopes: - output.AllowedOAuthScopes != null ? de_ScopeListType(output.AllowedOAuthScopes, context) : undefined, - AnalyticsConfiguration: - output.AnalyticsConfiguration != null - ? de_AnalyticsConfigurationType(output.AnalyticsConfiguration, context) - : undefined, - AuthSessionValidity: __expectInt32(output.AuthSessionValidity), - CallbackURLs: output.CallbackURLs != null ? de_CallbackURLsListType(output.CallbackURLs, context) : undefined, - ClientId: __expectString(output.ClientId), - ClientName: __expectString(output.ClientName), - ClientSecret: __expectString(output.ClientSecret), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - DefaultRedirectURI: __expectString(output.DefaultRedirectURI), - EnablePropagateAdditionalUserContextData: __expectBoolean(output.EnablePropagateAdditionalUserContextData), - EnableTokenRevocation: __expectBoolean(output.EnableTokenRevocation), - ExplicitAuthFlows: - output.ExplicitAuthFlows != null ? de_ExplicitAuthFlowsListType(output.ExplicitAuthFlows, context) : undefined, - IdTokenValidity: __expectInt32(output.IdTokenValidity), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - LogoutURLs: output.LogoutURLs != null ? de_LogoutURLsListType(output.LogoutURLs, context) : undefined, - PreventUserExistenceErrors: __expectString(output.PreventUserExistenceErrors), - ReadAttributes: - output.ReadAttributes != null ? de_ClientPermissionListType(output.ReadAttributes, context) : undefined, - RefreshTokenValidity: __expectInt32(output.RefreshTokenValidity), - SupportedIdentityProviders: - output.SupportedIdentityProviders != null - ? de_SupportedIdentityProvidersListType(output.SupportedIdentityProviders, context) - : undefined, - TokenValidityUnits: - output.TokenValidityUnits != null ? de_TokenValidityUnitsType(output.TokenValidityUnits, context) : undefined, - UserPoolId: __expectString(output.UserPoolId), - WriteAttributes: - output.WriteAttributes != null ? de_ClientPermissionListType(output.WriteAttributes, context) : undefined, - } as any; + return take(output, { + AccessTokenValidity: __expectInt32, + AllowedOAuthFlows: _json, + AllowedOAuthFlowsUserPoolClient: __expectBoolean, + AllowedOAuthScopes: _json, + AnalyticsConfiguration: _json, + AuthSessionValidity: __expectInt32, + CallbackURLs: _json, + ClientId: __expectString, + ClientName: __expectString, + ClientSecret: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultRedirectURI: __expectString, + EnablePropagateAdditionalUserContextData: __expectBoolean, + EnableTokenRevocation: __expectBoolean, + ExplicitAuthFlows: _json, + IdTokenValidity: __expectInt32, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogoutURLs: _json, + PreventUserExistenceErrors: __expectString, + ReadAttributes: _json, + RefreshTokenValidity: __expectInt32, + SupportedIdentityProviders: _json, + TokenValidityUnits: _json, + UserPoolId: __expectString, + WriteAttributes: _json, + }) as any; }; /** * deserializeAws_json1_1UserPoolDescriptionType */ const de_UserPoolDescriptionType = (output: any, context: __SerdeContext): UserPoolDescriptionType => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - Id: __expectString(output.Id), - LambdaConfig: output.LambdaConfig != null ? de_LambdaConfigType(output.LambdaConfig, context) : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + LambdaConfig: _json, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; /** @@ -14131,114 +10489,56 @@ const de_UserPoolListType = (output: any, context: __SerdeContext): UserPoolDesc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserPoolDescriptionType(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UserPoolPolicyType - */ -const de_UserPoolPolicyType = (output: any, context: __SerdeContext): UserPoolPolicyType => { - return { - PasswordPolicy: output.PasswordPolicy != null ? de_PasswordPolicyType(output.PasswordPolicy, context) : undefined, - } as any; -}; +// de_UserPoolPolicyType omitted. -/** - * deserializeAws_json1_1UserPoolTaggingException - */ -const de_UserPoolTaggingException = (output: any, context: __SerdeContext): UserPoolTaggingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserPoolTaggingException omitted. -/** - * deserializeAws_json1_1UserPoolTagsType - */ -const de_UserPoolTagsType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_UserPoolTagsType omitted. /** * deserializeAws_json1_1UserPoolType */ const de_UserPoolType = (output: any, context: __SerdeContext): UserPoolType => { - return { - AccountRecoverySetting: - output.AccountRecoverySetting != null - ? de_AccountRecoverySettingType(output.AccountRecoverySetting, context) - : undefined, - AdminCreateUserConfig: - output.AdminCreateUserConfig != null - ? de_AdminCreateUserConfigType(output.AdminCreateUserConfig, context) - : undefined, - AliasAttributes: - output.AliasAttributes != null ? de_AliasAttributesListType(output.AliasAttributes, context) : undefined, - Arn: __expectString(output.Arn), - AutoVerifiedAttributes: - output.AutoVerifiedAttributes != null - ? de_VerifiedAttributesListType(output.AutoVerifiedAttributes, context) - : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - CustomDomain: __expectString(output.CustomDomain), - DeletionProtection: __expectString(output.DeletionProtection), - DeviceConfiguration: - output.DeviceConfiguration != null ? de_DeviceConfigurationType(output.DeviceConfiguration, context) : undefined, - Domain: __expectString(output.Domain), - EmailConfiguration: - output.EmailConfiguration != null ? de_EmailConfigurationType(output.EmailConfiguration, context) : undefined, - EmailConfigurationFailure: __expectString(output.EmailConfigurationFailure), - EmailVerificationMessage: __expectString(output.EmailVerificationMessage), - EmailVerificationSubject: __expectString(output.EmailVerificationSubject), - EstimatedNumberOfUsers: __expectInt32(output.EstimatedNumberOfUsers), - Id: __expectString(output.Id), - LambdaConfig: output.LambdaConfig != null ? de_LambdaConfigType(output.LambdaConfig, context) : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - MfaConfiguration: __expectString(output.MfaConfiguration), - Name: __expectString(output.Name), - Policies: output.Policies != null ? de_UserPoolPolicyType(output.Policies, context) : undefined, - SchemaAttributes: - output.SchemaAttributes != null ? de_SchemaAttributesListType(output.SchemaAttributes, context) : undefined, - SmsAuthenticationMessage: __expectString(output.SmsAuthenticationMessage), - SmsConfiguration: - output.SmsConfiguration != null ? de_SmsConfigurationType(output.SmsConfiguration, context) : undefined, - SmsConfigurationFailure: __expectString(output.SmsConfigurationFailure), - SmsVerificationMessage: __expectString(output.SmsVerificationMessage), - Status: __expectString(output.Status), - UserAttributeUpdateSettings: - output.UserAttributeUpdateSettings != null - ? de_UserAttributeUpdateSettingsType(output.UserAttributeUpdateSettings, context) - : undefined, - UserPoolAddOns: output.UserPoolAddOns != null ? de_UserPoolAddOnsType(output.UserPoolAddOns, context) : undefined, - UserPoolTags: output.UserPoolTags != null ? de_UserPoolTagsType(output.UserPoolTags, context) : undefined, - UsernameAttributes: - output.UsernameAttributes != null ? de_UsernameAttributesListType(output.UsernameAttributes, context) : undefined, - UsernameConfiguration: - output.UsernameConfiguration != null - ? de_UsernameConfigurationType(output.UsernameConfiguration, context) - : undefined, - VerificationMessageTemplate: - output.VerificationMessageTemplate != null - ? de_VerificationMessageTemplateType(output.VerificationMessageTemplate, context) - : undefined, - } as any; + return take(output, { + AccountRecoverySetting: _json, + AdminCreateUserConfig: _json, + AliasAttributes: _json, + Arn: __expectString, + AutoVerifiedAttributes: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomDomain: __expectString, + DeletionProtection: __expectString, + DeviceConfiguration: _json, + Domain: __expectString, + EmailConfiguration: _json, + EmailConfigurationFailure: __expectString, + EmailVerificationMessage: __expectString, + EmailVerificationSubject: __expectString, + EstimatedNumberOfUsers: __expectInt32, + Id: __expectString, + LambdaConfig: _json, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MfaConfiguration: __expectString, + Name: __expectString, + Policies: _json, + SchemaAttributes: _json, + SmsAuthenticationMessage: __expectString, + SmsConfiguration: _json, + SmsConfigurationFailure: __expectString, + SmsVerificationMessage: __expectString, + Status: __expectString, + UserAttributeUpdateSettings: _json, + UserPoolAddOns: _json, + UserPoolTags: _json, + UsernameAttributes: _json, + UsernameConfiguration: _json, + VerificationMessageTemplate: _json, + }) as any; }; /** @@ -14248,9 +10548,6 @@ const de_UsersListType = (output: any, context: __SerdeContext): UserType[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserType(entry, context); }); return retVal; @@ -14260,68 +10557,24 @@ const de_UsersListType = (output: any, context: __SerdeContext): UserType[] => { * deserializeAws_json1_1UserType */ const de_UserType = (output: any, context: __SerdeContext): UserType => { - return { - Attributes: output.Attributes != null ? de_AttributeListType(output.Attributes, context) : undefined, - Enabled: __expectBoolean(output.Enabled), - MFAOptions: output.MFAOptions != null ? de_MFAOptionListType(output.MFAOptions, context) : undefined, - UserCreateDate: - output.UserCreateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UserCreateDate))) - : undefined, - UserLastModifiedDate: - output.UserLastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UserLastModifiedDate))) - : undefined, - UserStatus: __expectString(output.UserStatus), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1VerificationMessageTemplateType - */ -const de_VerificationMessageTemplateType = (output: any, context: __SerdeContext): VerificationMessageTemplateType => { - return { - DefaultEmailOption: __expectString(output.DefaultEmailOption), - EmailMessage: __expectString(output.EmailMessage), - EmailMessageByLink: __expectString(output.EmailMessageByLink), - EmailSubject: __expectString(output.EmailSubject), - EmailSubjectByLink: __expectString(output.EmailSubjectByLink), - SmsMessage: __expectString(output.SmsMessage), - } as any; + return take(output, { + Attributes: _json, + Enabled: __expectBoolean, + MFAOptions: _json, + UserCreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UserLastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UserStatus: __expectString, + Username: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1VerifiedAttributesListType - */ -const de_VerifiedAttributesListType = (output: any, context: __SerdeContext): (VerifiedAttributeType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VerificationMessageTemplateType omitted. -/** - * deserializeAws_json1_1VerifySoftwareTokenResponse - */ -const de_VerifySoftwareTokenResponse = (output: any, context: __SerdeContext): VerifySoftwareTokenResponse => { - return { - Session: __expectString(output.Session), - Status: __expectString(output.Status), - } as any; -}; +// de_VerifiedAttributesListType omitted. -/** - * deserializeAws_json1_1VerifyUserAttributeResponse - */ -const de_VerifyUserAttributeResponse = (output: any, context: __SerdeContext): VerifyUserAttributeResponse => { - return {} as any; -}; +// de_VerifySoftwareTokenResponse omitted. + +// de_VerifyUserAttributeResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -14343,6 +10596,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cognito-identity/src/protocols/Aws_json1_1.ts b/clients/client-cognito-identity/src/protocols/Aws_json1_1.ts index 0d32d2a1a6e8..722e1a54c5a8 100644 --- a/clients/client-cognito-identity/src/protocols/Aws_json1_1.ts +++ b/clients/client-cognito-identity/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -79,7 +80,6 @@ import { CreateIdentityPoolInput, Credentials, DeleteIdentitiesInput, - DeleteIdentitiesResponse, DeleteIdentityPoolInput, DescribeIdentityInput, DescribeIdentityPoolInput, @@ -88,18 +88,12 @@ import { GetCredentialsForIdentityInput, GetCredentialsForIdentityResponse, GetIdentityPoolRolesInput, - GetIdentityPoolRolesResponse, GetIdInput, - GetIdResponse, GetOpenIdTokenForDeveloperIdentityInput, - GetOpenIdTokenForDeveloperIdentityResponse, GetOpenIdTokenInput, - GetOpenIdTokenResponse, GetPrincipalTagAttributeMapInput, - GetPrincipalTagAttributeMapResponse, IdentityDescription, IdentityPool, - IdentityPoolShortDescription, InternalErrorException, InvalidIdentityPoolConfigurationException, InvalidParameterException, @@ -107,14 +101,10 @@ import { ListIdentitiesInput, ListIdentitiesResponse, ListIdentityPoolsInput, - ListIdentityPoolsResponse, ListTagsForResourceInput, - ListTagsForResourceResponse, LookupDeveloperIdentityInput, - LookupDeveloperIdentityResponse, MappingRule, MergeDeveloperIdentitiesInput, - MergeDeveloperIdentitiesResponse, NotAuthorizedException, ResourceConflictException, ResourceNotFoundException, @@ -122,15 +112,11 @@ import { RulesConfigurationType, SetIdentityPoolRolesInput, SetPrincipalTagAttributeMapInput, - SetPrincipalTagAttributeMapResponse, TagResourceInput, - TagResourceResponse, TooManyRequestsException, UnlinkDeveloperIdentityInput, UnlinkIdentityInput, - UnprocessedIdentityId, UntagResourceInput, - UntagResourceResponse, } from "../models/models_0"; /** @@ -142,7 +128,7 @@ export const se_CreateIdentityPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateIdentityPool"); let body: any; - body = JSON.stringify(se_CreateIdentityPoolInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -155,7 +141,7 @@ export const se_DeleteIdentitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIdentities"); let body: any; - body = JSON.stringify(se_DeleteIdentitiesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -168,7 +154,7 @@ export const se_DeleteIdentityPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIdentityPool"); let body: any; - body = JSON.stringify(se_DeleteIdentityPoolInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -181,7 +167,7 @@ export const se_DescribeIdentityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeIdentity"); let body: any; - body = JSON.stringify(se_DescribeIdentityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -194,7 +180,7 @@ export const se_DescribeIdentityPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeIdentityPool"); let body: any; - body = JSON.stringify(se_DescribeIdentityPoolInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -207,7 +193,7 @@ export const se_GetCredentialsForIdentityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCredentialsForIdentity"); let body: any; - body = JSON.stringify(se_GetCredentialsForIdentityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -217,7 +203,7 @@ export const se_GetCredentialsForIdentityCommand = async ( export const se_GetIdCommand = async (input: GetIdCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetId"); let body: any; - body = JSON.stringify(se_GetIdInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -230,7 +216,7 @@ export const se_GetIdentityPoolRolesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetIdentityPoolRoles"); let body: any; - body = JSON.stringify(se_GetIdentityPoolRolesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -243,7 +229,7 @@ export const se_GetOpenIdTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOpenIdToken"); let body: any; - body = JSON.stringify(se_GetOpenIdTokenInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -256,7 +242,7 @@ export const se_GetOpenIdTokenForDeveloperIdentityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOpenIdTokenForDeveloperIdentity"); let body: any; - body = JSON.stringify(se_GetOpenIdTokenForDeveloperIdentityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -269,7 +255,7 @@ export const se_GetPrincipalTagAttributeMapCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPrincipalTagAttributeMap"); let body: any; - body = JSON.stringify(se_GetPrincipalTagAttributeMapInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -282,7 +268,7 @@ export const se_ListIdentitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIdentities"); let body: any; - body = JSON.stringify(se_ListIdentitiesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -295,7 +281,7 @@ export const se_ListIdentityPoolsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIdentityPools"); let body: any; - body = JSON.stringify(se_ListIdentityPoolsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -308,7 +294,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -321,7 +307,7 @@ export const se_LookupDeveloperIdentityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("LookupDeveloperIdentity"); let body: any; - body = JSON.stringify(se_LookupDeveloperIdentityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -334,7 +320,7 @@ export const se_MergeDeveloperIdentitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MergeDeveloperIdentities"); let body: any; - body = JSON.stringify(se_MergeDeveloperIdentitiesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -347,7 +333,7 @@ export const se_SetIdentityPoolRolesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetIdentityPoolRoles"); let body: any; - body = JSON.stringify(se_SetIdentityPoolRolesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -360,7 +346,7 @@ export const se_SetPrincipalTagAttributeMapCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetPrincipalTagAttributeMap"); let body: any; - body = JSON.stringify(se_SetPrincipalTagAttributeMapInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -373,7 +359,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,7 +372,7 @@ export const se_UnlinkDeveloperIdentityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnlinkDeveloperIdentity"); let body: any; - body = JSON.stringify(se_UnlinkDeveloperIdentityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -399,7 +385,7 @@ export const se_UnlinkIdentityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnlinkIdentity"); let body: any; - body = JSON.stringify(se_UnlinkIdentityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -412,7 +398,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,7 +411,7 @@ export const se_UpdateIdentityPoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateIdentityPool"); let body: any; - body = JSON.stringify(se_IdentityPool(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,12 +427,12 @@ export const de_CreateIdentityPoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_IdentityPool(data, context); + contents = _json(data); const response: CreateIdentityPoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -482,10 +468,9 @@ const de_CreateIdentityPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -503,12 +488,12 @@ export const de_DeleteIdentitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteIdentitiesResponse(data, context); + contents = _json(data); const response: DeleteIdentitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -535,10 +520,9 @@ const de_DeleteIdentitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -558,7 +542,7 @@ export const de_DeleteIdentityPoolCommand = async ( const response: DeleteIdentityPoolCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -591,10 +575,9 @@ const de_DeleteIdentityPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -617,7 +600,7 @@ export const de_DescribeIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -650,10 +633,9 @@ const de_DescribeIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -671,12 +653,12 @@ export const de_DescribeIdentityPoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_IdentityPool(data, context); + contents = _json(data); const response: DescribeIdentityPoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -709,10 +691,9 @@ const de_DescribeIdentityPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -735,7 +716,7 @@ export const de_GetCredentialsForIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -777,10 +758,9 @@ const de_GetCredentialsForIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -795,12 +775,12 @@ export const de_GetIdCommand = async (output: __HttpResponse, context: __SerdeCo } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetIdResponse(data, context); + contents = _json(data); const response: GetIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -839,10 +819,9 @@ const de_GetIdCommandError = async (output: __HttpResponse, context: __SerdeCont throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -860,12 +839,12 @@ export const de_GetIdentityPoolRolesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetIdentityPoolRolesResponse(data, context); + contents = _json(data); const response: GetIdentityPoolRolesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -901,10 +880,9 @@ const de_GetIdentityPoolRolesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -922,12 +900,12 @@ export const de_GetOpenIdTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetOpenIdTokenResponse(data, context); + contents = _json(data); const response: GetOpenIdTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -966,10 +944,9 @@ const de_GetOpenIdTokenCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -987,12 +964,12 @@ export const de_GetOpenIdTokenForDeveloperIdentityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetOpenIdTokenForDeveloperIdentityResponse(data, context); + contents = _json(data); const response: GetOpenIdTokenForDeveloperIdentityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1031,10 +1008,9 @@ const de_GetOpenIdTokenForDeveloperIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1052,12 +1028,12 @@ export const de_GetPrincipalTagAttributeMapCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPrincipalTagAttributeMapResponse(data, context); + contents = _json(data); const response: GetPrincipalTagAttributeMapCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1090,10 +1066,9 @@ const de_GetPrincipalTagAttributeMapCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1116,7 +1091,7 @@ export const de_ListIdentitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1149,10 +1124,9 @@ const de_ListIdentitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1170,12 +1144,12 @@ export const de_ListIdentityPoolsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListIdentityPoolsResponse(data, context); + contents = _json(data); const response: ListIdentityPoolsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1208,10 +1182,9 @@ const de_ListIdentityPoolsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,12 +1202,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1267,10 +1240,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1288,12 +1260,12 @@ export const de_LookupDeveloperIdentityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_LookupDeveloperIdentityResponse(data, context); + contents = _json(data); const response: LookupDeveloperIdentityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1329,10 +1301,9 @@ const de_LookupDeveloperIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1350,12 +1321,12 @@ export const de_MergeDeveloperIdentitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_MergeDeveloperIdentitiesResponse(data, context); + contents = _json(data); const response: MergeDeveloperIdentitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1391,10 +1362,9 @@ const de_MergeDeveloperIdentitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1414,7 +1384,7 @@ export const de_SetIdentityPoolRolesCommand = async ( const response: SetIdentityPoolRolesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1453,10 +1423,9 @@ const de_SetIdentityPoolRolesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,12 +1443,12 @@ export const de_SetPrincipalTagAttributeMapCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetPrincipalTagAttributeMapResponse(data, context); + contents = _json(data); const response: SetPrincipalTagAttributeMapCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1512,10 +1481,9 @@ const de_SetPrincipalTagAttributeMapCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,12 +1501,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1571,10 +1539,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1594,7 +1561,7 @@ export const de_UnlinkDeveloperIdentityCommand = async ( const response: UnlinkDeveloperIdentityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1630,10 +1597,9 @@ const de_UnlinkDeveloperIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1653,7 +1619,7 @@ export const de_UnlinkIdentityCommand = async ( const response: UnlinkIdentityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1692,10 +1658,9 @@ const de_UnlinkIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1713,12 +1678,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1751,10 +1716,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1772,12 +1736,12 @@ export const de_UpdateIdentityPoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_IdentityPool(data, context); + contents = _json(data); const response: UpdateIdentityPoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1819,10 +1783,9 @@ const de_UpdateIdentityPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1836,7 +1799,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1852,7 +1815,7 @@ const de_DeveloperUserAlreadyRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DeveloperUserAlreadyRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new DeveloperUserAlreadyRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1868,7 +1831,7 @@ const de_ExternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new ExternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1884,7 +1847,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1900,7 +1863,7 @@ const de_InvalidIdentityPoolConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidIdentityPoolConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidIdentityPoolConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1916,7 +1879,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1932,7 +1895,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1948,7 +1911,7 @@ const de_NotAuthorizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotAuthorizedException(body, context); + const deserialized: any = _json(body); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1964,7 +1927,7 @@ const de_ResourceConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceConflictException(body, context); + const deserialized: any = _json(body); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1980,7 +1943,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1996,7 +1959,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2004,583 +1967,111 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CognitoIdentityProvider - */ -const se_CognitoIdentityProvider = (input: CognitoIdentityProvider, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.ServerSideTokenCheck != null && { ServerSideTokenCheck: input.ServerSideTokenCheck }), - }; -}; +// se_CognitoIdentityProvider omitted. -/** - * serializeAws_json1_1CognitoIdentityProviderList - */ -const se_CognitoIdentityProviderList = (input: CognitoIdentityProvider[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CognitoIdentityProvider(entry, context); - }); -}; +// se_CognitoIdentityProviderList omitted. -/** - * serializeAws_json1_1CreateIdentityPoolInput - */ -const se_CreateIdentityPoolInput = (input: CreateIdentityPoolInput, context: __SerdeContext): any => { - return { - ...(input.AllowClassicFlow != null && { AllowClassicFlow: input.AllowClassicFlow }), - ...(input.AllowUnauthenticatedIdentities != null && { - AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities, - }), - ...(input.CognitoIdentityProviders != null && { - CognitoIdentityProviders: se_CognitoIdentityProviderList(input.CognitoIdentityProviders, context), - }), - ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }), - ...(input.IdentityPoolName != null && { IdentityPoolName: input.IdentityPoolName }), - ...(input.IdentityPoolTags != null && { - IdentityPoolTags: se_IdentityPoolTagsType(input.IdentityPoolTags, context), - }), - ...(input.OpenIdConnectProviderARNs != null && { - OpenIdConnectProviderARNs: se_OIDCProviderList(input.OpenIdConnectProviderARNs, context), - }), - ...(input.SamlProviderARNs != null && { SamlProviderARNs: se_SAMLProviderList(input.SamlProviderARNs, context) }), - ...(input.SupportedLoginProviders != null && { - SupportedLoginProviders: se_IdentityProviders(input.SupportedLoginProviders, context), - }), - }; -}; +// se_CreateIdentityPoolInput omitted. -/** - * serializeAws_json1_1DeleteIdentitiesInput - */ -const se_DeleteIdentitiesInput = (input: DeleteIdentitiesInput, context: __SerdeContext): any => { - return { - ...(input.IdentityIdsToDelete != null && { - IdentityIdsToDelete: se_IdentityIdList(input.IdentityIdsToDelete, context), - }), - }; -}; +// se_DeleteIdentitiesInput omitted. -/** - * serializeAws_json1_1DeleteIdentityPoolInput - */ -const se_DeleteIdentityPoolInput = (input: DeleteIdentityPoolInput, context: __SerdeContext): any => { - return { - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - }; -}; +// se_DeleteIdentityPoolInput omitted. -/** - * serializeAws_json1_1DescribeIdentityInput - */ -const se_DescribeIdentityInput = (input: DescribeIdentityInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - }; -}; +// se_DescribeIdentityInput omitted. -/** - * serializeAws_json1_1DescribeIdentityPoolInput - */ -const se_DescribeIdentityPoolInput = (input: DescribeIdentityPoolInput, context: __SerdeContext): any => { - return { - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - }; -}; +// se_DescribeIdentityPoolInput omitted. -/** - * serializeAws_json1_1GetCredentialsForIdentityInput - */ -const se_GetCredentialsForIdentityInput = (input: GetCredentialsForIdentityInput, context: __SerdeContext): any => { - return { - ...(input.CustomRoleArn != null && { CustomRoleArn: input.CustomRoleArn }), - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }), - }; -}; +// se_GetCredentialsForIdentityInput omitted. -/** - * serializeAws_json1_1GetIdentityPoolRolesInput - */ -const se_GetIdentityPoolRolesInput = (input: GetIdentityPoolRolesInput, context: __SerdeContext): any => { - return { - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - }; -}; +// se_GetIdentityPoolRolesInput omitted. -/** - * serializeAws_json1_1GetIdInput - */ -const se_GetIdInput = (input: GetIdInput, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }), - }; -}; +// se_GetIdInput omitted. -/** - * serializeAws_json1_1GetOpenIdTokenForDeveloperIdentityInput - */ -const se_GetOpenIdTokenForDeveloperIdentityInput = ( - input: GetOpenIdTokenForDeveloperIdentityInput, - context: __SerdeContext -): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }), - ...(input.PrincipalTags != null && { PrincipalTags: se_PrincipalTags(input.PrincipalTags, context) }), - ...(input.TokenDuration != null && { TokenDuration: input.TokenDuration }), - }; -}; +// se_GetOpenIdTokenForDeveloperIdentityInput omitted. -/** - * serializeAws_json1_1GetOpenIdTokenInput - */ -const se_GetOpenIdTokenInput = (input: GetOpenIdTokenInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }), - }; -}; +// se_GetOpenIdTokenInput omitted. -/** - * serializeAws_json1_1GetPrincipalTagAttributeMapInput - */ -const se_GetPrincipalTagAttributeMapInput = (input: GetPrincipalTagAttributeMapInput, context: __SerdeContext): any => { - return { - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.IdentityProviderName != null && { IdentityProviderName: input.IdentityProviderName }), - }; -}; +// se_GetPrincipalTagAttributeMapInput omitted. -/** - * serializeAws_json1_1IdentityIdList - */ -const se_IdentityIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdentityIdList omitted. -/** - * serializeAws_json1_1IdentityPool - */ -const se_IdentityPool = (input: IdentityPool, context: __SerdeContext): any => { - return { - ...(input.AllowClassicFlow != null && { AllowClassicFlow: input.AllowClassicFlow }), - ...(input.AllowUnauthenticatedIdentities != null && { - AllowUnauthenticatedIdentities: input.AllowUnauthenticatedIdentities, - }), - ...(input.CognitoIdentityProviders != null && { - CognitoIdentityProviders: se_CognitoIdentityProviderList(input.CognitoIdentityProviders, context), - }), - ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.IdentityPoolName != null && { IdentityPoolName: input.IdentityPoolName }), - ...(input.IdentityPoolTags != null && { - IdentityPoolTags: se_IdentityPoolTagsType(input.IdentityPoolTags, context), - }), - ...(input.OpenIdConnectProviderARNs != null && { - OpenIdConnectProviderARNs: se_OIDCProviderList(input.OpenIdConnectProviderARNs, context), - }), - ...(input.SamlProviderARNs != null && { SamlProviderARNs: se_SAMLProviderList(input.SamlProviderARNs, context) }), - ...(input.SupportedLoginProviders != null && { - SupportedLoginProviders: se_IdentityProviders(input.SupportedLoginProviders, context), - }), - }; -}; +// se_IdentityPool omitted. -/** - * serializeAws_json1_1IdentityPoolTagsListType - */ -const se_IdentityPoolTagsListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdentityPoolTagsListType omitted. -/** - * serializeAws_json1_1IdentityPoolTagsType - */ -const se_IdentityPoolTagsType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_IdentityPoolTagsType omitted. -/** - * serializeAws_json1_1IdentityProviders - */ -const se_IdentityProviders = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_IdentityProviders omitted. -/** - * serializeAws_json1_1ListIdentitiesInput - */ -const se_ListIdentitiesInput = (input: ListIdentitiesInput, context: __SerdeContext): any => { - return { - ...(input.HideDisabled != null && { HideDisabled: input.HideDisabled }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListIdentitiesInput omitted. -/** - * serializeAws_json1_1ListIdentityPoolsInput - */ -const se_ListIdentityPoolsInput = (input: ListIdentityPoolsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListIdentityPoolsInput omitted. -/** - * serializeAws_json1_1ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_1LoginsList - */ -const se_LoginsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LoginsList omitted. -/** - * serializeAws_json1_1LoginsMap - */ -const se_LoginsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_LoginsMap omitted. -/** - * serializeAws_json1_1LookupDeveloperIdentityInput - */ -const se_LookupDeveloperIdentityInput = (input: LookupDeveloperIdentityInput, context: __SerdeContext): any => { - return { - ...(input.DeveloperUserIdentifier != null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier }), - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_LookupDeveloperIdentityInput omitted. -/** - * serializeAws_json1_1MappingRule - */ -const se_MappingRule = (input: MappingRule, context: __SerdeContext): any => { - return { - ...(input.Claim != null && { Claim: input.Claim }), - ...(input.MatchType != null && { MatchType: input.MatchType }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MappingRule omitted. -/** - * serializeAws_json1_1MappingRulesList - */ -const se_MappingRulesList = (input: MappingRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MappingRule(entry, context); - }); -}; +// se_MappingRulesList omitted. -/** - * serializeAws_json1_1MergeDeveloperIdentitiesInput - */ -const se_MergeDeveloperIdentitiesInput = (input: MergeDeveloperIdentitiesInput, context: __SerdeContext): any => { - return { - ...(input.DestinationUserIdentifier != null && { DestinationUserIdentifier: input.DestinationUserIdentifier }), - ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.SourceUserIdentifier != null && { SourceUserIdentifier: input.SourceUserIdentifier }), - }; -}; +// se_MergeDeveloperIdentitiesInput omitted. -/** - * serializeAws_json1_1OIDCProviderList - */ -const se_OIDCProviderList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OIDCProviderList omitted. -/** - * serializeAws_json1_1PrincipalTags - */ -const se_PrincipalTags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PrincipalTags omitted. -/** - * serializeAws_json1_1RoleMapping - */ -const se_RoleMapping = (input: RoleMapping, context: __SerdeContext): any => { - return { - ...(input.AmbiguousRoleResolution != null && { AmbiguousRoleResolution: input.AmbiguousRoleResolution }), - ...(input.RulesConfiguration != null && { - RulesConfiguration: se_RulesConfigurationType(input.RulesConfiguration, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_RoleMapping omitted. -/** - * serializeAws_json1_1RoleMappingMap - */ -const se_RoleMappingMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_RoleMapping(value, context); - return acc; - }, {}); -}; +// se_RoleMappingMap omitted. -/** - * serializeAws_json1_1RolesMap - */ -const se_RolesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_RolesMap omitted. -/** - * serializeAws_json1_1RulesConfigurationType - */ -const se_RulesConfigurationType = (input: RulesConfigurationType, context: __SerdeContext): any => { - return { - ...(input.Rules != null && { Rules: se_MappingRulesList(input.Rules, context) }), - }; -}; +// se_RulesConfigurationType omitted. -/** - * serializeAws_json1_1SAMLProviderList - */ -const se_SAMLProviderList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SAMLProviderList omitted. -/** - * serializeAws_json1_1SetIdentityPoolRolesInput - */ -const se_SetIdentityPoolRolesInput = (input: SetIdentityPoolRolesInput, context: __SerdeContext): any => { - return { - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.RoleMappings != null && { RoleMappings: se_RoleMappingMap(input.RoleMappings, context) }), - ...(input.Roles != null && { Roles: se_RolesMap(input.Roles, context) }), - }; -}; +// se_SetIdentityPoolRolesInput omitted. -/** - * serializeAws_json1_1SetPrincipalTagAttributeMapInput - */ -const se_SetPrincipalTagAttributeMapInput = (input: SetPrincipalTagAttributeMapInput, context: __SerdeContext): any => { - return { - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.IdentityProviderName != null && { IdentityProviderName: input.IdentityProviderName }), - ...(input.PrincipalTags != null && { PrincipalTags: se_PrincipalTags(input.PrincipalTags, context) }), - ...(input.UseDefaults != null && { UseDefaults: input.UseDefaults }), - }; -}; +// se_SetPrincipalTagAttributeMapInput omitted. -/** - * serializeAws_json1_1TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_IdentityPoolTagsType(input.Tags, context) }), - }; -}; +// se_TagResourceInput omitted. -/** - * serializeAws_json1_1UnlinkDeveloperIdentityInput - */ -const se_UnlinkDeveloperIdentityInput = (input: UnlinkDeveloperIdentityInput, context: __SerdeContext): any => { - return { - ...(input.DeveloperProviderName != null && { DeveloperProviderName: input.DeveloperProviderName }), - ...(input.DeveloperUserIdentifier != null && { DeveloperUserIdentifier: input.DeveloperUserIdentifier }), - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - }; -}; +// se_UnlinkDeveloperIdentityInput omitted. -/** - * serializeAws_json1_1UnlinkIdentityInput - */ -const se_UnlinkIdentityInput = (input: UnlinkIdentityInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.Logins != null && { Logins: se_LoginsMap(input.Logins, context) }), - ...(input.LoginsToRemove != null && { LoginsToRemove: se_LoginsList(input.LoginsToRemove, context) }), - }; -}; +// se_UnlinkIdentityInput omitted. -/** - * serializeAws_json1_1UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_IdentityPoolTagsListType(input.TagKeys, context) }), - }; -}; +// se_UntagResourceInput omitted. -/** - * deserializeAws_json1_1CognitoIdentityProvider - */ -const de_CognitoIdentityProvider = (output: any, context: __SerdeContext): CognitoIdentityProvider => { - return { - ClientId: __expectString(output.ClientId), - ProviderName: __expectString(output.ProviderName), - ServerSideTokenCheck: __expectBoolean(output.ServerSideTokenCheck), - } as any; -}; +// de_CognitoIdentityProvider omitted. -/** - * deserializeAws_json1_1CognitoIdentityProviderList - */ -const de_CognitoIdentityProviderList = (output: any, context: __SerdeContext): CognitoIdentityProvider[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CognitoIdentityProvider(entry, context); - }); - return retVal; -}; +// de_CognitoIdentityProviderList omitted. -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConcurrentModificationException omitted. /** * deserializeAws_json1_1Credentials */ const de_Credentials = (output: any, context: __SerdeContext): Credentials => { - return { - AccessKeyId: __expectString(output.AccessKeyId), - Expiration: - output.Expiration != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Expiration))) : undefined, - SecretKey: __expectString(output.SecretKey), - SessionToken: __expectString(output.SessionToken), - } as any; + return take(output, { + AccessKeyId: __expectString, + Expiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SecretKey: __expectString, + SessionToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeleteIdentitiesResponse - */ -const de_DeleteIdentitiesResponse = (output: any, context: __SerdeContext): DeleteIdentitiesResponse => { - return { - UnprocessedIdentityIds: - output.UnprocessedIdentityIds != null - ? de_UnprocessedIdentityIdList(output.UnprocessedIdentityIds, context) - : undefined, - } as any; -}; +// de_DeleteIdentitiesResponse omitted. -/** - * deserializeAws_json1_1DeveloperUserAlreadyRegisteredException - */ -const de_DeveloperUserAlreadyRegisteredException = ( - output: any, - context: __SerdeContext -): DeveloperUserAlreadyRegisteredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DeveloperUserAlreadyRegisteredException omitted. -/** - * deserializeAws_json1_1DeveloperUserIdentifierList - */ -const de_DeveloperUserIdentifierList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DeveloperUserIdentifierList omitted. -/** - * deserializeAws_json1_1ExternalServiceException - */ -const de_ExternalServiceException = (output: any, context: __SerdeContext): ExternalServiceException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ExternalServiceException omitted. /** * deserializeAws_json1_1GetCredentialsForIdentityResponse @@ -2589,69 +2080,21 @@ const de_GetCredentialsForIdentityResponse = ( output: any, context: __SerdeContext ): GetCredentialsForIdentityResponse => { - return { - Credentials: output.Credentials != null ? de_Credentials(output.Credentials, context) : undefined, - IdentityId: __expectString(output.IdentityId), - } as any; + return take(output, { + Credentials: (_: any) => de_Credentials(_, context), + IdentityId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetIdentityPoolRolesResponse - */ -const de_GetIdentityPoolRolesResponse = (output: any, context: __SerdeContext): GetIdentityPoolRolesResponse => { - return { - IdentityPoolId: __expectString(output.IdentityPoolId), - RoleMappings: output.RoleMappings != null ? de_RoleMappingMap(output.RoleMappings, context) : undefined, - Roles: output.Roles != null ? de_RolesMap(output.Roles, context) : undefined, - } as any; -}; +// de_GetIdentityPoolRolesResponse omitted. -/** - * deserializeAws_json1_1GetIdResponse - */ -const de_GetIdResponse = (output: any, context: __SerdeContext): GetIdResponse => { - return { - IdentityId: __expectString(output.IdentityId), - } as any; -}; +// de_GetIdResponse omitted. -/** - * deserializeAws_json1_1GetOpenIdTokenForDeveloperIdentityResponse - */ -const de_GetOpenIdTokenForDeveloperIdentityResponse = ( - output: any, - context: __SerdeContext -): GetOpenIdTokenForDeveloperIdentityResponse => { - return { - IdentityId: __expectString(output.IdentityId), - Token: __expectString(output.Token), - } as any; -}; +// de_GetOpenIdTokenForDeveloperIdentityResponse omitted. -/** - * deserializeAws_json1_1GetOpenIdTokenResponse - */ -const de_GetOpenIdTokenResponse = (output: any, context: __SerdeContext): GetOpenIdTokenResponse => { - return { - IdentityId: __expectString(output.IdentityId), - Token: __expectString(output.Token), - } as any; -}; +// de_GetOpenIdTokenResponse omitted. -/** - * deserializeAws_json1_1GetPrincipalTagAttributeMapResponse - */ -const de_GetPrincipalTagAttributeMapResponse = ( - output: any, - context: __SerdeContext -): GetPrincipalTagAttributeMapResponse => { - return { - IdentityPoolId: __expectString(output.IdentityPoolId), - IdentityProviderName: __expectString(output.IdentityProviderName), - PrincipalTags: output.PrincipalTags != null ? de_PrincipalTags(output.PrincipalTags, context) : undefined, - UseDefaults: __expectBoolean(output.UseDefaults), - } as any; -}; +// de_GetPrincipalTagAttributeMapResponse omitted. /** * deserializeAws_json1_1IdentitiesList @@ -2660,9 +2103,6 @@ const de_IdentitiesList = (output: any, context: __SerdeContext): IdentityDescri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IdentityDescription(entry, context); }); return retVal; @@ -2672,416 +2112,88 @@ const de_IdentitiesList = (output: any, context: __SerdeContext): IdentityDescri * deserializeAws_json1_1IdentityDescription */ const de_IdentityDescription = (output: any, context: __SerdeContext): IdentityDescription => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - IdentityId: __expectString(output.IdentityId), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Logins: output.Logins != null ? de_LoginsList(output.Logins, context) : undefined, - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IdentityId: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Logins: _json, + }) as any; }; -/** - * deserializeAws_json1_1IdentityPool - */ -const de_IdentityPool = (output: any, context: __SerdeContext): IdentityPool => { - return { - AllowClassicFlow: __expectBoolean(output.AllowClassicFlow), - AllowUnauthenticatedIdentities: __expectBoolean(output.AllowUnauthenticatedIdentities), - CognitoIdentityProviders: - output.CognitoIdentityProviders != null - ? de_CognitoIdentityProviderList(output.CognitoIdentityProviders, context) - : undefined, - DeveloperProviderName: __expectString(output.DeveloperProviderName), - IdentityPoolId: __expectString(output.IdentityPoolId), - IdentityPoolName: __expectString(output.IdentityPoolName), - IdentityPoolTags: - output.IdentityPoolTags != null ? de_IdentityPoolTagsType(output.IdentityPoolTags, context) : undefined, - OpenIdConnectProviderARNs: - output.OpenIdConnectProviderARNs != null - ? de_OIDCProviderList(output.OpenIdConnectProviderARNs, context) - : undefined, - SamlProviderARNs: - output.SamlProviderARNs != null ? de_SAMLProviderList(output.SamlProviderARNs, context) : undefined, - SupportedLoginProviders: - output.SupportedLoginProviders != null - ? de_IdentityProviders(output.SupportedLoginProviders, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1IdentityPoolShortDescription - */ -const de_IdentityPoolShortDescription = (output: any, context: __SerdeContext): IdentityPoolShortDescription => { - return { - IdentityPoolId: __expectString(output.IdentityPoolId), - IdentityPoolName: __expectString(output.IdentityPoolName), - } as any; -}; +// de_IdentityPool omitted. -/** - * deserializeAws_json1_1IdentityPoolsList - */ -const de_IdentityPoolsList = (output: any, context: __SerdeContext): IdentityPoolShortDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdentityPoolShortDescription(entry, context); - }); - return retVal; -}; +// de_IdentityPoolShortDescription omitted. -/** - * deserializeAws_json1_1IdentityPoolTagsType - */ -const de_IdentityPoolTagsType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_IdentityPoolsList omitted. -/** - * deserializeAws_json1_1IdentityProviders - */ -const de_IdentityProviders = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_IdentityPoolTagsType omitted. -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_IdentityProviders omitted. -/** - * deserializeAws_json1_1InvalidIdentityPoolConfigurationException - */ -const de_InvalidIdentityPoolConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidIdentityPoolConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalErrorException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidIdentityPoolConfigurationException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. + +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListIdentitiesResponse */ const de_ListIdentitiesResponse = (output: any, context: __SerdeContext): ListIdentitiesResponse => { - return { - Identities: output.Identities != null ? de_IdentitiesList(output.Identities, context) : undefined, - IdentityPoolId: __expectString(output.IdentityPoolId), - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Identities: (_: any) => de_IdentitiesList(_, context), + IdentityPoolId: __expectString, + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListIdentityPoolsResponse - */ -const de_ListIdentityPoolsResponse = (output: any, context: __SerdeContext): ListIdentityPoolsResponse => { - return { - IdentityPools: output.IdentityPools != null ? de_IdentityPoolsList(output.IdentityPools, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListIdentityPoolsResponse omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_IdentityPoolTagsType(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1LoginsList - */ -const de_LoginsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LoginsList omitted. -/** - * deserializeAws_json1_1LookupDeveloperIdentityResponse - */ -const de_LookupDeveloperIdentityResponse = (output: any, context: __SerdeContext): LookupDeveloperIdentityResponse => { - return { - DeveloperUserIdentifierList: - output.DeveloperUserIdentifierList != null - ? de_DeveloperUserIdentifierList(output.DeveloperUserIdentifierList, context) - : undefined, - IdentityId: __expectString(output.IdentityId), - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_LookupDeveloperIdentityResponse omitted. -/** - * deserializeAws_json1_1MappingRule - */ -const de_MappingRule = (output: any, context: __SerdeContext): MappingRule => { - return { - Claim: __expectString(output.Claim), - MatchType: __expectString(output.MatchType), - RoleARN: __expectString(output.RoleARN), - Value: __expectString(output.Value), - } as any; -}; +// de_MappingRule omitted. -/** - * deserializeAws_json1_1MappingRulesList - */ -const de_MappingRulesList = (output: any, context: __SerdeContext): MappingRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MappingRule(entry, context); - }); - return retVal; -}; +// de_MappingRulesList omitted. -/** - * deserializeAws_json1_1MergeDeveloperIdentitiesResponse - */ -const de_MergeDeveloperIdentitiesResponse = ( - output: any, - context: __SerdeContext -): MergeDeveloperIdentitiesResponse => { - return { - IdentityId: __expectString(output.IdentityId), - } as any; -}; +// de_MergeDeveloperIdentitiesResponse omitted. -/** - * deserializeAws_json1_1NotAuthorizedException - */ -const de_NotAuthorizedException = (output: any, context: __SerdeContext): NotAuthorizedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_NotAuthorizedException omitted. -/** - * deserializeAws_json1_1OIDCProviderList - */ -const de_OIDCProviderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OIDCProviderList omitted. -/** - * deserializeAws_json1_1PrincipalTags - */ -const de_PrincipalTags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PrincipalTags omitted. -/** - * deserializeAws_json1_1ResourceConflictException - */ -const de_ResourceConflictException = (output: any, context: __SerdeContext): ResourceConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceConflictException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1RoleMapping - */ -const de_RoleMapping = (output: any, context: __SerdeContext): RoleMapping => { - return { - AmbiguousRoleResolution: __expectString(output.AmbiguousRoleResolution), - RulesConfiguration: - output.RulesConfiguration != null ? de_RulesConfigurationType(output.RulesConfiguration, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_RoleMapping omitted. -/** - * deserializeAws_json1_1RoleMappingMap - */ -const de_RoleMappingMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_RoleMapping(value, context); - return acc; - }, {}); -}; +// de_RoleMappingMap omitted. -/** - * deserializeAws_json1_1RolesMap - */ -const de_RolesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RolesMap omitted. -/** - * deserializeAws_json1_1RulesConfigurationType - */ -const de_RulesConfigurationType = (output: any, context: __SerdeContext): RulesConfigurationType => { - return { - Rules: output.Rules != null ? de_MappingRulesList(output.Rules, context) : undefined, - } as any; -}; +// de_RulesConfigurationType omitted. -/** - * deserializeAws_json1_1SAMLProviderList - */ -const de_SAMLProviderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SAMLProviderList omitted. -/** - * deserializeAws_json1_1SetPrincipalTagAttributeMapResponse - */ -const de_SetPrincipalTagAttributeMapResponse = ( - output: any, - context: __SerdeContext -): SetPrincipalTagAttributeMapResponse => { - return { - IdentityPoolId: __expectString(output.IdentityPoolId), - IdentityProviderName: __expectString(output.IdentityProviderName), - PrincipalTags: output.PrincipalTags != null ? de_PrincipalTags(output.PrincipalTags, context) : undefined, - UseDefaults: __expectBoolean(output.UseDefaults), - } as any; -}; +// de_SetPrincipalTagAttributeMapResponse omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyRequestsException omitted. -/** - * deserializeAws_json1_1UnprocessedIdentityId - */ -const de_UnprocessedIdentityId = (output: any, context: __SerdeContext): UnprocessedIdentityId => { - return { - ErrorCode: __expectString(output.ErrorCode), - IdentityId: __expectString(output.IdentityId), - } as any; -}; +// de_UnprocessedIdentityId omitted. -/** - * deserializeAws_json1_1UnprocessedIdentityIdList - */ -const de_UnprocessedIdentityIdList = (output: any, context: __SerdeContext): UnprocessedIdentityId[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedIdentityId(entry, context); - }); - return retVal; -}; +// de_UnprocessedIdentityIdList omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3103,6 +2215,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cognito-sync/src/protocols/Aws_restJson1.ts b/clients/client-cognito-sync/src/protocols/Aws_restJson1.ts index 52bb168fa13c..2205942104ab 100644 --- a/clients/client-cognito-sync/src/protocols/Aws_restJson1.ts +++ b/clients/client-cognito-sync/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,10 +11,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -472,10 +474,12 @@ export const se_RegisterDeviceCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId!, "{IdentityId}", false); let body: any; - body = JSON.stringify({ - ...(input.Platform != null && { Platform: input.Platform }), - ...(input.Token != null && { Token: input.Token }), - }); + body = JSON.stringify( + take(input, { + Platform: [], + Token: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -509,9 +513,11 @@ export const se_SetCognitoEventsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Events != null && { Events: se_Events(input.Events, context) }), - }); + body = JSON.stringify( + take(input, { + Events: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -546,10 +552,12 @@ export const se_SetIdentityPoolConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CognitoStreams != null && { CognitoStreams: se_CognitoStreams(input.CognitoStreams, context) }), - ...(input.PushSync != null && { PushSync: se_PushSync(input.PushSync, context) }), - }); + body = JSON.stringify( + take(input, { + CognitoStreams: (_) => _json(_), + PushSync: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -657,11 +665,13 @@ export const se_UpdateRecordsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "IdentityId", () => input.IdentityId!, "{IdentityId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "DatasetName", () => input.DatasetName!, "{DatasetName}", false); let body: any; - body = JSON.stringify({ - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.RecordPatches != null && { RecordPatches: se_RecordPatchList(input.RecordPatches, context) }), - ...(input.SyncSessionToken != null && { SyncSessionToken: input.SyncSessionToken }), - }); + body = JSON.stringify( + take(input, { + DeviceId: [], + RecordPatches: (_) => se_RecordPatchList(_, context), + SyncSessionToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -687,9 +697,10 @@ export const de_BulkPublishCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityPoolId != null) { - contents.IdentityPoolId = __expectString(data.IdentityPoolId); - } + const doc = take(data, { + IdentityPoolId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -726,10 +737,9 @@ const de_BulkPublishCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -749,9 +759,10 @@ export const de_DeleteDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Dataset != null) { - contents.Dataset = de_Dataset(data.Dataset, context); - } + const doc = take(data, { + Dataset: (_) => de_Dataset(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -788,10 +799,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -811,9 +821,10 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Dataset != null) { - contents.Dataset = de_Dataset(data.Dataset, context); - } + const doc = take(data, { + Dataset: (_) => de_Dataset(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -847,10 +858,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -870,9 +880,10 @@ export const de_DescribeIdentityPoolUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityPoolUsage != null) { - contents.IdentityPoolUsage = de_IdentityPoolUsage(data.IdentityPoolUsage, context); - } + const doc = take(data, { + IdentityPoolUsage: (_) => de_IdentityPoolUsage(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -906,10 +917,9 @@ const de_DescribeIdentityPoolUsageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -929,9 +939,10 @@ export const de_DescribeIdentityUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityUsage != null) { - contents.IdentityUsage = de_IdentityUsage(data.IdentityUsage, context); - } + const doc = take(data, { + IdentityUsage: (_) => de_IdentityUsage(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -965,10 +976,9 @@ const de_DescribeIdentityUsageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -988,23 +998,14 @@ export const de_GetBulkPublishDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BulkPublishCompleteTime != null) { - contents.BulkPublishCompleteTime = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.BulkPublishCompleteTime)) - ); - } - if (data.BulkPublishStartTime != null) { - contents.BulkPublishStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.BulkPublishStartTime))); - } - if (data.BulkPublishStatus != null) { - contents.BulkPublishStatus = __expectString(data.BulkPublishStatus); - } - if (data.FailureMessage != null) { - contents.FailureMessage = __expectString(data.FailureMessage); - } - if (data.IdentityPoolId != null) { - contents.IdentityPoolId = __expectString(data.IdentityPoolId); - } + const doc = take(data, { + BulkPublishCompleteTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + BulkPublishStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + BulkPublishStatus: __expectString, + FailureMessage: __expectString, + IdentityPoolId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1035,10 +1036,9 @@ const de_GetBulkPublishDetailsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1058,9 +1058,10 @@ export const de_GetCognitoEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Events != null) { - contents.Events = de_Events(data.Events, context); - } + const doc = take(data, { + Events: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1094,10 +1095,9 @@ const de_GetCognitoEventsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,15 +1117,12 @@ export const de_GetIdentityPoolConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CognitoStreams != null) { - contents.CognitoStreams = de_CognitoStreams(data.CognitoStreams, context); - } - if (data.IdentityPoolId != null) { - contents.IdentityPoolId = __expectString(data.IdentityPoolId); - } - if (data.PushSync != null) { - contents.PushSync = de_PushSync(data.PushSync, context); - } + const doc = take(data, { + CognitoStreams: _json, + IdentityPoolId: __expectString, + PushSync: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1159,10 +1156,9 @@ const de_GetIdentityPoolConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1182,15 +1178,12 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Count != null) { - contents.Count = __expectInt32(data.Count); - } - if (data.Datasets != null) { - contents.Datasets = de_DatasetList(data.Datasets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Count: __expectInt32, + Datasets: (_) => de_DatasetList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1221,10 +1214,9 @@ const de_ListDatasetsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1244,18 +1236,13 @@ export const de_ListIdentityPoolUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Count != null) { - contents.Count = __expectInt32(data.Count); - } - if (data.IdentityPoolUsages != null) { - contents.IdentityPoolUsages = de_IdentityPoolUsageList(data.IdentityPoolUsages, context); - } - if (data.MaxResults != null) { - contents.MaxResults = __expectInt32(data.MaxResults); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Count: __expectInt32, + IdentityPoolUsages: (_) => de_IdentityPoolUsageList(_, context), + MaxResults: __expectInt32, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1286,10 +1273,9 @@ const de_ListIdentityPoolUsageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1309,33 +1295,18 @@ export const de_ListRecordsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Count != null) { - contents.Count = __expectInt32(data.Count); - } - if (data.DatasetDeletedAfterRequestedSyncCount != null) { - contents.DatasetDeletedAfterRequestedSyncCount = __expectBoolean(data.DatasetDeletedAfterRequestedSyncCount); - } - if (data.DatasetExists != null) { - contents.DatasetExists = __expectBoolean(data.DatasetExists); - } - if (data.DatasetSyncCount != null) { - contents.DatasetSyncCount = __expectLong(data.DatasetSyncCount); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.MergedDatasetNames != null) { - contents.MergedDatasetNames = de_MergedDatasetNameList(data.MergedDatasetNames, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Records != null) { - contents.Records = de_RecordList(data.Records, context); - } - if (data.SyncSessionToken != null) { - contents.SyncSessionToken = __expectString(data.SyncSessionToken); - } + const doc = take(data, { + Count: __expectInt32, + DatasetDeletedAfterRequestedSyncCount: __expectBoolean, + DatasetExists: __expectBoolean, + DatasetSyncCount: __expectLong, + LastModifiedBy: __expectString, + MergedDatasetNames: _json, + NextToken: __expectString, + Records: (_) => de_RecordList(_, context), + SyncSessionToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1366,10 +1337,9 @@ const de_ListRecordsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1389,9 +1359,10 @@ export const de_RegisterDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } + const doc = take(data, { + DeviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1428,10 +1399,9 @@ const de_RegisterDeviceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1484,10 +1454,9 @@ const de_SetCognitoEventsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,15 +1476,12 @@ export const de_SetIdentityPoolConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CognitoStreams != null) { - contents.CognitoStreams = de_CognitoStreams(data.CognitoStreams, context); - } - if (data.IdentityPoolId != null) { - contents.IdentityPoolId = __expectString(data.IdentityPoolId); - } - if (data.PushSync != null) { - contents.PushSync = de_PushSync(data.PushSync, context); - } + const doc = take(data, { + CognitoStreams: _json, + IdentityPoolId: __expectString, + PushSync: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1552,10 +1518,9 @@ const de_SetIdentityPoolConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1611,10 +1576,9 @@ const de_SubscribeToDatasetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1670,10 +1634,9 @@ const de_UnsubscribeFromDatasetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1693,9 +1656,10 @@ export const de_UpdateRecordsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Records != null) { - contents.Records = de_RecordList(data.Records, context); - } + const doc = take(data, { + Records: (_) => de_RecordList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1741,16 +1705,15 @@ const de_UpdateRecordsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AlreadyStreamedExceptionRes */ @@ -1760,9 +1723,10 @@ const de_AlreadyStreamedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AlreadyStreamedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1779,9 +1743,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1798,9 +1763,10 @@ const de_DuplicateRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DuplicateRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1817,9 +1783,10 @@ const de_InternalErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1836,9 +1803,10 @@ const de_InvalidConfigurationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1855,9 +1823,10 @@ const de_InvalidLambdaFunctionOutputExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidLambdaFunctionOutputException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1874,9 +1843,10 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1893,9 +1863,10 @@ const de_LambdaThrottledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LambdaThrottledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1912,9 +1883,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1931,9 +1903,10 @@ const de_NotAuthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1950,9 +1923,10 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1969,9 +1943,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1988,9 +1963,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1998,64 +1974,25 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApplicationArnList - */ -const se_ApplicationArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationArnList omitted. -/** - * serializeAws_restJson1CognitoStreams - */ -const se_CognitoStreams = (input: CognitoStreams, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.StreamingStatus != null && { StreamingStatus: input.StreamingStatus }), - }; -}; +// se_CognitoStreams omitted. -/** - * serializeAws_restJson1Events - */ -const se_Events = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Events omitted. -/** - * serializeAws_restJson1PushSync - */ -const se_PushSync = (input: PushSync, context: __SerdeContext): any => { - return { - ...(input.ApplicationArns != null && { ApplicationArns: se_ApplicationArnList(input.ApplicationArns, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_PushSync omitted. /** * serializeAws_restJson1RecordPatch */ const se_RecordPatch = (input: RecordPatch, context: __SerdeContext): any => { - return { - ...(input.DeviceLastModifiedDate != null && { - DeviceLastModifiedDate: Math.round(input.DeviceLastModifiedDate.getTime() / 1000), - }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Op != null && { Op: input.Op }), - ...(input.SyncCount != null && { SyncCount: input.SyncCount }), - ...(input.Value != null && { Value: input.Value }), - }; + return take(input, { + DeviceLastModifiedDate: (_) => Math.round(_.getTime() / 1000), + Key: [], + Op: [], + SyncCount: [], + Value: [], + }); }; /** @@ -2069,51 +2006,23 @@ const se_RecordPatchList = (input: RecordPatch[], context: __SerdeContext): any }); }; -/** - * deserializeAws_restJson1ApplicationArnList - */ -const de_ApplicationArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ApplicationArnList omitted. -/** - * deserializeAws_restJson1CognitoStreams - */ -const de_CognitoStreams = (output: any, context: __SerdeContext): CognitoStreams => { - return { - RoleArn: __expectString(output.RoleArn), - StreamName: __expectString(output.StreamName), - StreamingStatus: __expectString(output.StreamingStatus), - } as any; -}; +// de_CognitoStreams omitted. /** * deserializeAws_restJson1Dataset */ const de_Dataset = (output: any, context: __SerdeContext): Dataset => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - DataStorage: __expectLong(output.DataStorage), - DatasetName: __expectString(output.DatasetName), - IdentityId: __expectString(output.IdentityId), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - NumRecords: __expectLong(output.NumRecords), - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataStorage: __expectLong, + DatasetName: __expectString, + IdentityId: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumRecords: __expectLong, + }) as any; }; /** @@ -2123,40 +2032,23 @@ const de_DatasetList = (output: any, context: __SerdeContext): Dataset[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Dataset(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Events - */ -const de_Events = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Events omitted. /** * deserializeAws_restJson1IdentityPoolUsage */ const de_IdentityPoolUsage = (output: any, context: __SerdeContext): IdentityPoolUsage => { - return { - DataStorage: __expectLong(output.DataStorage), - IdentityPoolId: __expectString(output.IdentityPoolId), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - SyncSessionsCount: __expectLong(output.SyncSessionsCount), - } as any; + return take(output, { + DataStorage: __expectLong, + IdentityPoolId: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SyncSessionsCount: __expectLong, + }) as any; }; /** @@ -2166,9 +2058,6 @@ const de_IdentityPoolUsageList = (output: any, context: __SerdeContext): Identit const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IdentityPoolUsage(entry, context); }); return retVal; @@ -2178,62 +2067,31 @@ const de_IdentityPoolUsageList = (output: any, context: __SerdeContext): Identit * deserializeAws_restJson1IdentityUsage */ const de_IdentityUsage = (output: any, context: __SerdeContext): IdentityUsage => { - return { - DataStorage: __expectLong(output.DataStorage), - DatasetCount: __expectInt32(output.DatasetCount), - IdentityId: __expectString(output.IdentityId), - IdentityPoolId: __expectString(output.IdentityPoolId), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - } as any; + return take(output, { + DataStorage: __expectLong, + DatasetCount: __expectInt32, + IdentityId: __expectString, + IdentityPoolId: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1MergedDatasetNameList - */ -const de_MergedDatasetNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MergedDatasetNameList omitted. -/** - * deserializeAws_restJson1PushSync - */ -const de_PushSync = (output: any, context: __SerdeContext): PushSync => { - return { - ApplicationArns: - output.ApplicationArns != null ? de_ApplicationArnList(output.ApplicationArns, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_PushSync omitted. /** * deserializeAws_restJson1_Record */ const de__Record = (output: any, context: __SerdeContext): _Record => { - return { - DeviceLastModifiedDate: - output.DeviceLastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceLastModifiedDate))) - : undefined, - Key: __expectString(output.Key), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - SyncCount: __expectLong(output.SyncCount), - Value: __expectString(output.Value), - } as any; + return take(output, { + DeviceLastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Key: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SyncCount: __expectLong, + Value: __expectString, + }) as any; }; /** @@ -2243,9 +2101,6 @@ const de_RecordList = (output: any, context: __SerdeContext): _Record[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de__Record(entry, context); }); return retVal; diff --git a/clients/client-comprehend/src/protocols/Aws_json1_1.ts b/clients/client-comprehend/src/protocols/Aws_json1_1.ts index 61099a155522..f6b9ffe23d40 100644 --- a/clients/client-comprehend/src/protocols/Aws_json1_1.ts +++ b/clients/client-comprehend/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -10,7 +11,8 @@ import { limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -305,12 +307,9 @@ import { BatchDetectTargetedSentimentItemResult, BatchDetectTargetedSentimentRequest, BatchDetectTargetedSentimentResponse, - BatchItemError, BatchSizeLimitExceededException, Block, - BlockReference, BoundingBox, - ChildBlock, ClassifierEvaluationMetrics, ClassifierMetadata, ClassifyDocumentRequest, @@ -318,15 +317,10 @@ import { ContainsPiiEntitiesRequest, ContainsPiiEntitiesResponse, CreateDatasetRequest, - CreateDatasetResponse, CreateDocumentClassifierRequest, - CreateDocumentClassifierResponse, CreateEndpointRequest, - CreateEndpointResponse, CreateEntityRecognizerRequest, - CreateEntityRecognizerResponse, CreateFlywheelRequest, - CreateFlywheelResponse, DataSecurityConfig, DatasetAugmentedManifestsListItem, DatasetDocumentClassifierInputDataConfig, @@ -338,15 +332,10 @@ import { DatasetInputDataConfig, DatasetProperties, DeleteDocumentClassifierRequest, - DeleteDocumentClassifierResponse, DeleteEndpointRequest, - DeleteEndpointResponse, DeleteEntityRecognizerRequest, - DeleteEntityRecognizerResponse, DeleteFlywheelRequest, - DeleteFlywheelResponse, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DescribeDatasetRequest, DescribeDatasetResponse, DescribeDocumentClassificationJobRequest, @@ -403,10 +392,8 @@ import { DocumentClassifierProperties, DocumentClassifierSummary, DocumentLabel, - DocumentMetadata, DocumentReaderConfig, DocumentReadFeatureTypes, - DocumentTypeListItem, DominantLanguage, DominantLanguageDetectionJobFilter, DominantLanguageDetectionJobProperties, @@ -425,15 +412,12 @@ import { EntityRecognizerInputDataConfig, EntityRecognizerMetadata, EntityRecognizerMetadataEntityTypesListItem, - EntityRecognizerOutputDataConfig, EntityRecognizerProperties, EntityRecognizerSummary, EntityTypesEvaluationMetrics, EntityTypesListItem, - ErrorsListItem, EventsDetectionJobFilter, EventsDetectionJobProperties, - ExtractedCharactersListItem, FlywheelFilter, FlywheelIterationFilter, FlywheelIterationProperties, @@ -442,11 +426,9 @@ import { FlywheelSummary, Geometry, ImportModelRequest, - ImportModelResponse, InputDataConfig, InternalServerException, InvalidFilterException, - InvalidRequestDetail, InvalidRequestException, JobNotFoundException, KeyPhrase, @@ -484,7 +466,6 @@ import { ListSentimentDetectionJobsRequest, ListSentimentDetectionJobsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTargetedSentimentDetectionJobsRequest, ListTargetedSentimentDetectionJobsResponse, ListTopicsDetectionJobsRequest, @@ -496,12 +477,9 @@ import { PiiEntitiesDetectionJobProperties, PiiEntity, PiiEntityType, - PiiOutputDataConfig, Point, PutResourcePolicyRequest, - PutResourcePolicyResponse, RedactionConfig, - RelationshipsListItem, ResourceInUseException, ResourceLimitExceededException, ResourceNotFoundException, @@ -510,37 +488,21 @@ import { SentimentDetectionJobProperties, SentimentScore, StartDocumentClassificationJobRequest, - StartDocumentClassificationJobResponse, StartDominantLanguageDetectionJobRequest, - StartDominantLanguageDetectionJobResponse, StartEntitiesDetectionJobRequest, - StartEntitiesDetectionJobResponse, StartEventsDetectionJobRequest, - StartEventsDetectionJobResponse, StartFlywheelIterationRequest, - StartFlywheelIterationResponse, StartKeyPhrasesDetectionJobRequest, - StartKeyPhrasesDetectionJobResponse, StartPiiEntitiesDetectionJobRequest, - StartPiiEntitiesDetectionJobResponse, StartSentimentDetectionJobRequest, - StartSentimentDetectionJobResponse, StartTargetedSentimentDetectionJobRequest, - StartTargetedSentimentDetectionJobResponse, StartTopicsDetectionJobRequest, - StartTopicsDetectionJobResponse, StopDominantLanguageDetectionJobRequest, - StopDominantLanguageDetectionJobResponse, StopEntitiesDetectionJobRequest, - StopEntitiesDetectionJobResponse, StopEventsDetectionJobRequest, - StopEventsDetectionJobResponse, StopKeyPhrasesDetectionJobRequest, - StopKeyPhrasesDetectionJobResponse, StopPiiEntitiesDetectionJobRequest, - StopPiiEntitiesDetectionJobResponse, StopSentimentDetectionJobRequest, - StopSentimentDetectionJobResponse, SyntaxToken, Tag, TargetedSentimentDetectionJobFilter, @@ -559,19 +521,13 @@ import { import { ConcurrentModificationException, StopTargetedSentimentDetectionJobRequest, - StopTargetedSentimentDetectionJobResponse, StopTrainingDocumentClassifierRequest, - StopTrainingDocumentClassifierResponse, StopTrainingEntityRecognizerRequest, - StopTrainingEntityRecognizerResponse, TagResourceRequest, - TagResourceResponse, TooManyTagKeysException, UntagResourceRequest, - UntagResourceResponse, UpdateDataSecurityConfig, UpdateEndpointRequest, - UpdateEndpointResponse, UpdateFlywheelRequest, UpdateFlywheelResponse, } from "../models/models_1"; @@ -585,7 +541,7 @@ export const se_BatchDetectDominantLanguageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDetectDominantLanguage"); let body: any; - body = JSON.stringify(se_BatchDetectDominantLanguageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -598,7 +554,7 @@ export const se_BatchDetectEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDetectEntities"); let body: any; - body = JSON.stringify(se_BatchDetectEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -611,7 +567,7 @@ export const se_BatchDetectKeyPhrasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDetectKeyPhrases"); let body: any; - body = JSON.stringify(se_BatchDetectKeyPhrasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -624,7 +580,7 @@ export const se_BatchDetectSentimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDetectSentiment"); let body: any; - body = JSON.stringify(se_BatchDetectSentimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -637,7 +593,7 @@ export const se_BatchDetectSyntaxCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDetectSyntax"); let body: any; - body = JSON.stringify(se_BatchDetectSyntaxRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -650,7 +606,7 @@ export const se_BatchDetectTargetedSentimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDetectTargetedSentiment"); let body: any; - body = JSON.stringify(se_BatchDetectTargetedSentimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -676,7 +632,7 @@ export const se_ContainsPiiEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ContainsPiiEntities"); let body: any; - body = JSON.stringify(se_ContainsPiiEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -754,7 +710,7 @@ export const se_DeleteDocumentClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDocumentClassifier"); let body: any; - body = JSON.stringify(se_DeleteDocumentClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -767,7 +723,7 @@ export const se_DeleteEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpoint"); let body: any; - body = JSON.stringify(se_DeleteEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -780,7 +736,7 @@ export const se_DeleteEntityRecognizerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEntityRecognizer"); let body: any; - body = JSON.stringify(se_DeleteEntityRecognizerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -793,7 +749,7 @@ export const se_DeleteFlywheelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFlywheel"); let body: any; - body = JSON.stringify(se_DeleteFlywheelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -806,7 +762,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -819,7 +775,7 @@ export const se_DescribeDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataset"); let body: any; - body = JSON.stringify(se_DescribeDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -832,7 +788,7 @@ export const se_DescribeDocumentClassificationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDocumentClassificationJob"); let body: any; - body = JSON.stringify(se_DescribeDocumentClassificationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -845,7 +801,7 @@ export const se_DescribeDocumentClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDocumentClassifier"); let body: any; - body = JSON.stringify(se_DescribeDocumentClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -858,7 +814,7 @@ export const se_DescribeDominantLanguageDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDominantLanguageDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeDominantLanguageDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -871,7 +827,7 @@ export const se_DescribeEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoint"); let body: any; - body = JSON.stringify(se_DescribeEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -884,7 +840,7 @@ export const se_DescribeEntitiesDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEntitiesDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeEntitiesDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -897,7 +853,7 @@ export const se_DescribeEntityRecognizerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEntityRecognizer"); let body: any; - body = JSON.stringify(se_DescribeEntityRecognizerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -910,7 +866,7 @@ export const se_DescribeEventsDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventsDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeEventsDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -923,7 +879,7 @@ export const se_DescribeFlywheelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFlywheel"); let body: any; - body = JSON.stringify(se_DescribeFlywheelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -936,7 +892,7 @@ export const se_DescribeFlywheelIterationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFlywheelIteration"); let body: any; - body = JSON.stringify(se_DescribeFlywheelIterationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -949,7 +905,7 @@ export const se_DescribeKeyPhrasesDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeKeyPhrasesDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeKeyPhrasesDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -962,7 +918,7 @@ export const se_DescribePiiEntitiesDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePiiEntitiesDetectionJob"); let body: any; - body = JSON.stringify(se_DescribePiiEntitiesDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -975,7 +931,7 @@ export const se_DescribeResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeResourcePolicy"); let body: any; - body = JSON.stringify(se_DescribeResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -988,7 +944,7 @@ export const se_DescribeSentimentDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSentimentDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeSentimentDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1001,7 +957,7 @@ export const se_DescribeTargetedSentimentDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTargetedSentimentDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeTargetedSentimentDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1014,7 +970,7 @@ export const se_DescribeTopicsDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTopicsDetectionJob"); let body: any; - body = JSON.stringify(se_DescribeTopicsDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1027,7 +983,7 @@ export const se_DetectDominantLanguageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectDominantLanguage"); let body: any; - body = JSON.stringify(se_DetectDominantLanguageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1053,7 +1009,7 @@ export const se_DetectKeyPhrasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectKeyPhrases"); let body: any; - body = JSON.stringify(se_DetectKeyPhrasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1066,7 +1022,7 @@ export const se_DetectPiiEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectPiiEntities"); let body: any; - body = JSON.stringify(se_DetectPiiEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1079,7 +1035,7 @@ export const se_DetectSentimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectSentiment"); let body: any; - body = JSON.stringify(se_DetectSentimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1092,7 +1048,7 @@ export const se_DetectSyntaxCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectSyntax"); let body: any; - body = JSON.stringify(se_DetectSyntaxRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1105,7 +1061,7 @@ export const se_DetectTargetedSentimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectTargetedSentiment"); let body: any; - body = JSON.stringify(se_DetectTargetedSentimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1118,7 +1074,7 @@ export const se_ImportModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportModel"); let body: any; - body = JSON.stringify(se_ImportModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1170,7 +1126,7 @@ export const se_ListDocumentClassifierSummariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDocumentClassifierSummaries"); let body: any; - body = JSON.stringify(se_ListDocumentClassifierSummariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1235,7 +1191,7 @@ export const se_ListEntityRecognizerSummariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEntityRecognizerSummaries"); let body: any; - body = JSON.stringify(se_ListEntityRecognizerSummariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1326,7 +1282,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1365,7 +1321,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1430,7 +1386,7 @@ export const se_StartFlywheelIterationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartFlywheelIteration"); let body: any; - body = JSON.stringify(se_StartFlywheelIterationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1508,7 +1464,7 @@ export const se_StopDominantLanguageDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopDominantLanguageDetectionJob"); let body: any; - body = JSON.stringify(se_StopDominantLanguageDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1521,7 +1477,7 @@ export const se_StopEntitiesDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopEntitiesDetectionJob"); let body: any; - body = JSON.stringify(se_StopEntitiesDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1534,7 +1490,7 @@ export const se_StopEventsDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopEventsDetectionJob"); let body: any; - body = JSON.stringify(se_StopEventsDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1547,7 +1503,7 @@ export const se_StopKeyPhrasesDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopKeyPhrasesDetectionJob"); let body: any; - body = JSON.stringify(se_StopKeyPhrasesDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1560,7 +1516,7 @@ export const se_StopPiiEntitiesDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopPiiEntitiesDetectionJob"); let body: any; - body = JSON.stringify(se_StopPiiEntitiesDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1573,7 +1529,7 @@ export const se_StopSentimentDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopSentimentDetectionJob"); let body: any; - body = JSON.stringify(se_StopSentimentDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1586,7 +1542,7 @@ export const se_StopTargetedSentimentDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTargetedSentimentDetectionJob"); let body: any; - body = JSON.stringify(se_StopTargetedSentimentDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1599,7 +1555,7 @@ export const se_StopTrainingDocumentClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTrainingDocumentClassifier"); let body: any; - body = JSON.stringify(se_StopTrainingDocumentClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1612,7 +1568,7 @@ export const se_StopTrainingEntityRecognizerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTrainingEntityRecognizer"); let body: any; - body = JSON.stringify(se_StopTrainingEntityRecognizerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1625,7 +1581,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1638,7 +1594,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1651,7 +1607,7 @@ export const se_UpdateEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEndpoint"); let body: any; - body = JSON.stringify(se_UpdateEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1664,7 +1620,7 @@ export const se_UpdateFlywheelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFlywheel"); let body: any; - body = JSON.stringify(se_UpdateFlywheelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1685,7 +1641,7 @@ export const de_BatchDetectDominantLanguageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1715,10 +1671,9 @@ const de_BatchDetectDominantLanguageCommandError = async ( throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1741,7 +1696,7 @@ export const de_BatchDetectEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1774,10 +1729,9 @@ const de_BatchDetectEntitiesCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1800,7 +1754,7 @@ export const de_BatchDetectKeyPhrasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1833,10 +1787,9 @@ const de_BatchDetectKeyPhrasesCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1859,7 +1812,7 @@ export const de_BatchDetectSentimentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1892,10 +1845,9 @@ const de_BatchDetectSentimentCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1918,7 +1870,7 @@ export const de_BatchDetectSyntaxCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1951,10 +1903,9 @@ const de_BatchDetectSyntaxCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1977,7 +1928,7 @@ export const de_BatchDetectTargetedSentimentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2010,10 +1961,9 @@ const de_BatchDetectTargetedSentimentCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2036,7 +1986,7 @@ export const de_ClassifyDocumentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2066,10 +2016,9 @@ const de_ClassifyDocumentCommandError = async ( throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2092,7 +2041,7 @@ export const de_ContainsPiiEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2122,10 +2071,9 @@ const de_ContainsPiiEntitiesCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2143,12 +2091,12 @@ export const de_CreateDatasetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetResponse(data, context); + contents = _json(data); const response: CreateDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2187,10 +2135,9 @@ const de_CreateDatasetCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2208,12 +2155,12 @@ export const de_CreateDocumentClassifierCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDocumentClassifierResponse(data, context); + contents = _json(data); const response: CreateDocumentClassifierCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2255,10 +2202,9 @@ const de_CreateDocumentClassifierCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2276,12 +2222,12 @@ export const de_CreateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEndpointResponse(data, context); + contents = _json(data); const response: CreateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2323,10 +2269,9 @@ const de_CreateEndpointCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2344,12 +2289,12 @@ export const de_CreateEntityRecognizerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEntityRecognizerResponse(data, context); + contents = _json(data); const response: CreateEntityRecognizerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2391,10 +2336,9 @@ const de_CreateEntityRecognizerCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2412,12 +2356,12 @@ export const de_CreateFlywheelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFlywheelResponse(data, context); + contents = _json(data); const response: CreateFlywheelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2465,10 +2409,9 @@ const de_CreateFlywheelCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2486,12 +2429,12 @@ export const de_DeleteDocumentClassifierCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDocumentClassifierResponse(data, context); + contents = _json(data); const response: DeleteDocumentClassifierCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2527,10 +2470,9 @@ const de_DeleteDocumentClassifierCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2548,12 +2490,12 @@ export const de_DeleteEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEndpointResponse(data, context); + contents = _json(data); const response: DeleteEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2586,10 +2528,9 @@ const de_DeleteEndpointCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2607,12 +2548,12 @@ export const de_DeleteEntityRecognizerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEntityRecognizerResponse(data, context); + contents = _json(data); const response: DeleteEntityRecognizerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2648,10 +2589,9 @@ const de_DeleteEntityRecognizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2669,12 +2609,12 @@ export const de_DeleteFlywheelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFlywheelResponse(data, context); + contents = _json(data); const response: DeleteFlywheelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2710,10 +2650,9 @@ const de_DeleteFlywheelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2731,12 +2670,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2763,10 +2702,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2789,7 +2727,7 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2819,10 +2757,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2845,7 +2782,7 @@ export const de_DescribeDocumentClassificationJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2875,10 +2812,9 @@ const de_DescribeDocumentClassificationJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2901,7 +2837,7 @@ export const de_DescribeDocumentClassifierCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2931,10 +2867,9 @@ const de_DescribeDocumentClassifierCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2957,7 +2892,7 @@ export const de_DescribeDominantLanguageDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2987,10 +2922,9 @@ const de_DescribeDominantLanguageDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3013,7 +2947,7 @@ export const de_DescribeEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3043,10 +2977,9 @@ const de_DescribeEndpointCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3069,7 +3002,7 @@ export const de_DescribeEntitiesDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3099,10 +3032,9 @@ const de_DescribeEntitiesDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3125,7 +3057,7 @@ export const de_DescribeEntityRecognizerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3155,10 +3087,9 @@ const de_DescribeEntityRecognizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3181,7 +3112,7 @@ export const de_DescribeEventsDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3211,10 +3142,9 @@ const de_DescribeEventsDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3237,7 +3167,7 @@ export const de_DescribeFlywheelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3267,10 +3197,9 @@ const de_DescribeFlywheelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3293,7 +3222,7 @@ export const de_DescribeFlywheelIterationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3323,10 +3252,9 @@ const de_DescribeFlywheelIterationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3349,7 +3277,7 @@ export const de_DescribeKeyPhrasesDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3379,10 +3307,9 @@ const de_DescribeKeyPhrasesDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3405,7 +3332,7 @@ export const de_DescribePiiEntitiesDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3435,10 +3362,9 @@ const de_DescribePiiEntitiesDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3461,7 +3387,7 @@ export const de_DescribeResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3488,10 +3414,9 @@ const de_DescribeResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3514,7 +3439,7 @@ export const de_DescribeSentimentDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3544,10 +3469,9 @@ const de_DescribeSentimentDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3570,7 +3494,7 @@ export const de_DescribeTargetedSentimentDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3600,10 +3524,9 @@ const de_DescribeTargetedSentimentDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,7 +3549,7 @@ export const de_DescribeTopicsDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3656,10 +3579,9 @@ const de_DescribeTopicsDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3682,7 +3604,7 @@ export const de_DetectDominantLanguageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3709,10 +3631,9 @@ const de_DetectDominantLanguageCommandError = async ( throw await de_TextSizeLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3735,7 +3656,7 @@ export const de_DetectEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3768,10 +3689,9 @@ const de_DetectEntitiesCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3794,7 +3714,7 @@ export const de_DetectKeyPhrasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3824,10 +3744,9 @@ const de_DetectKeyPhrasesCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3850,7 +3769,7 @@ export const de_DetectPiiEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3880,10 +3799,9 @@ const de_DetectPiiEntitiesCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3906,7 +3824,7 @@ export const de_DetectSentimentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3936,10 +3854,9 @@ const de_DetectSentimentCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3962,7 +3879,7 @@ export const de_DetectSyntaxCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3992,10 +3909,9 @@ const de_DetectSyntaxCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4018,7 +3934,7 @@ export const de_DetectTargetedSentimentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4048,10 +3964,9 @@ const de_DetectTargetedSentimentCommandError = async ( throw await de_UnsupportedLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4069,12 +3984,12 @@ export const de_ImportModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportModelResponse(data, context); + contents = _json(data); const response: ImportModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4119,10 +4034,9 @@ const de_ImportModelCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4145,7 +4059,7 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4178,10 +4092,9 @@ const de_ListDatasetsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4204,7 +4117,7 @@ export const de_ListDocumentClassificationJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4234,10 +4147,9 @@ const de_ListDocumentClassificationJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4260,7 +4172,7 @@ export const de_ListDocumentClassifiersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4290,10 +4202,9 @@ const de_ListDocumentClassifiersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4316,7 +4227,7 @@ export const de_ListDocumentClassifierSummariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4343,10 +4254,9 @@ const de_ListDocumentClassifierSummariesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4369,7 +4279,7 @@ export const de_ListDominantLanguageDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4399,10 +4309,9 @@ const de_ListDominantLanguageDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4425,7 +4334,7 @@ export const de_ListEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4452,10 +4361,9 @@ const de_ListEndpointsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4478,7 +4386,7 @@ export const de_ListEntitiesDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4508,10 +4416,9 @@ const de_ListEntitiesDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4534,7 +4441,7 @@ export const de_ListEntityRecognizersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4564,10 +4471,9 @@ const de_ListEntityRecognizersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4590,7 +4496,7 @@ export const de_ListEntityRecognizerSummariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4617,10 +4523,9 @@ const de_ListEntityRecognizerSummariesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4643,7 +4548,7 @@ export const de_ListEventsDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4673,10 +4578,9 @@ const de_ListEventsDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4699,7 +4603,7 @@ export const de_ListFlywheelIterationHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4732,10 +4636,9 @@ const de_ListFlywheelIterationHistoryCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4758,7 +4661,7 @@ export const de_ListFlywheelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4788,10 +4691,9 @@ const de_ListFlywheelsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4814,7 +4716,7 @@ export const de_ListKeyPhrasesDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4844,10 +4746,9 @@ const de_ListKeyPhrasesDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4870,7 +4771,7 @@ export const de_ListPiiEntitiesDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4900,10 +4801,9 @@ const de_ListPiiEntitiesDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4926,7 +4826,7 @@ export const de_ListSentimentDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4956,10 +4856,9 @@ const de_ListSentimentDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4977,12 +4876,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5009,10 +4908,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5035,7 +4933,7 @@ export const de_ListTargetedSentimentDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5065,10 +4963,9 @@ const de_ListTargetedSentimentDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5091,7 +4988,7 @@ export const de_ListTopicsDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5121,10 +5018,9 @@ const de_ListTopicsDetectionJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5142,12 +5038,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5174,10 +5070,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5195,12 +5090,12 @@ export const de_StartDocumentClassificationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDocumentClassificationJobResponse(data, context); + contents = _json(data); const response: StartDocumentClassificationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5239,10 +5134,9 @@ const de_StartDocumentClassificationJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5260,12 +5154,12 @@ export const de_StartDominantLanguageDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDominantLanguageDetectionJobResponse(data, context); + contents = _json(data); const response: StartDominantLanguageDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5298,10 +5192,9 @@ const de_StartDominantLanguageDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5319,12 +5212,12 @@ export const de_StartEntitiesDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartEntitiesDetectionJobResponse(data, context); + contents = _json(data); const response: StartEntitiesDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5363,10 +5256,9 @@ const de_StartEntitiesDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5384,12 +5276,12 @@ export const de_StartEventsDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartEventsDetectionJobResponse(data, context); + contents = _json(data); const response: StartEventsDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5422,10 +5314,9 @@ const de_StartEventsDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5443,12 +5334,12 @@ export const de_StartFlywheelIterationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFlywheelIterationResponse(data, context); + contents = _json(data); const response: StartFlywheelIterationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5481,10 +5372,9 @@ const de_StartFlywheelIterationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5502,12 +5392,12 @@ export const de_StartKeyPhrasesDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartKeyPhrasesDetectionJobResponse(data, context); + contents = _json(data); const response: StartKeyPhrasesDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5540,10 +5430,9 @@ const de_StartKeyPhrasesDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5561,12 +5450,12 @@ export const de_StartPiiEntitiesDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartPiiEntitiesDetectionJobResponse(data, context); + contents = _json(data); const response: StartPiiEntitiesDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5599,10 +5488,9 @@ const de_StartPiiEntitiesDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5620,12 +5508,12 @@ export const de_StartSentimentDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSentimentDetectionJobResponse(data, context); + contents = _json(data); const response: StartSentimentDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5658,10 +5546,9 @@ const de_StartSentimentDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5679,12 +5566,12 @@ export const de_StartTargetedSentimentDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartTargetedSentimentDetectionJobResponse(data, context); + contents = _json(data); const response: StartTargetedSentimentDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5717,10 +5604,9 @@ const de_StartTargetedSentimentDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5738,12 +5624,12 @@ export const de_StartTopicsDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartTopicsDetectionJobResponse(data, context); + contents = _json(data); const response: StartTopicsDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5776,10 +5662,9 @@ const de_StartTopicsDetectionJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5797,12 +5682,12 @@ export const de_StopDominantLanguageDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopDominantLanguageDetectionJobResponse(data, context); + contents = _json(data); const response: StopDominantLanguageDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5829,10 +5714,9 @@ const de_StopDominantLanguageDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5850,12 +5734,12 @@ export const de_StopEntitiesDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopEntitiesDetectionJobResponse(data, context); + contents = _json(data); const response: StopEntitiesDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5882,10 +5766,9 @@ const de_StopEntitiesDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5903,12 +5786,12 @@ export const de_StopEventsDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopEventsDetectionJobResponse(data, context); + contents = _json(data); const response: StopEventsDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5935,10 +5818,9 @@ const de_StopEventsDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5956,12 +5838,12 @@ export const de_StopKeyPhrasesDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopKeyPhrasesDetectionJobResponse(data, context); + contents = _json(data); const response: StopKeyPhrasesDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5988,10 +5870,9 @@ const de_StopKeyPhrasesDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6009,12 +5890,12 @@ export const de_StopPiiEntitiesDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopPiiEntitiesDetectionJobResponse(data, context); + contents = _json(data); const response: StopPiiEntitiesDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6041,10 +5922,9 @@ const de_StopPiiEntitiesDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6062,12 +5942,12 @@ export const de_StopSentimentDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopSentimentDetectionJobResponse(data, context); + contents = _json(data); const response: StopSentimentDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6094,10 +5974,9 @@ const de_StopSentimentDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6115,12 +5994,12 @@ export const de_StopTargetedSentimentDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopTargetedSentimentDetectionJobResponse(data, context); + contents = _json(data); const response: StopTargetedSentimentDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6147,10 +6026,9 @@ const de_StopTargetedSentimentDetectionJobCommandError = async ( throw await de_JobNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6168,12 +6046,12 @@ export const de_StopTrainingDocumentClassifierCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopTrainingDocumentClassifierResponse(data, context); + contents = _json(data); const response: StopTrainingDocumentClassifierCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6203,10 +6081,9 @@ const de_StopTrainingDocumentClassifierCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6224,12 +6101,12 @@ export const de_StopTrainingEntityRecognizerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopTrainingEntityRecognizerResponse(data, context); + contents = _json(data); const response: StopTrainingEntityRecognizerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6259,10 +6136,9 @@ const de_StopTrainingEntityRecognizerCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6280,12 +6156,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6318,10 +6194,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6339,12 +6214,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6377,10 +6252,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyTagKeysExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6398,12 +6272,12 @@ export const de_UpdateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEndpointResponse(data, context); + contents = _json(data); const response: UpdateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6442,10 +6316,9 @@ const de_UpdateEndpointCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6468,7 +6341,7 @@ export const de_UpdateFlywheelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6501,10 +6374,9 @@ const de_UpdateFlywheelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6518,7 +6390,7 @@ const de_BatchSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BatchSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new BatchSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6534,7 +6406,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6550,7 +6422,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6566,7 +6438,7 @@ const de_InvalidFilterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6582,7 +6454,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6598,7 +6470,7 @@ const de_JobNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_JobNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new JobNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6614,7 +6486,7 @@ const de_KmsKeyValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KmsKeyValidationException(body, context); + const deserialized: any = _json(body); const exception = new KmsKeyValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6630,7 +6502,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6646,7 +6518,7 @@ const de_ResourceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6662,7 +6534,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6678,7 +6550,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6694,7 +6566,7 @@ const de_TextSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TextSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TextSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6710,7 +6582,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6726,7 +6598,7 @@ const de_TooManyTagKeysExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagKeysException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagKeysException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6742,7 +6614,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6758,7 +6630,7 @@ const de_UnsupportedLanguageExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedLanguageException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedLanguageException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6766,753 +6638,255 @@ const de_UnsupportedLanguageExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AttributeNamesList - */ -const se_AttributeNamesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttributeNamesList omitted. -/** - * serializeAws_json1_1AugmentedManifestsListItem - */ -const se_AugmentedManifestsListItem = (input: AugmentedManifestsListItem, context: __SerdeContext): any => { - return { - ...(input.AnnotationDataS3Uri != null && { AnnotationDataS3Uri: input.AnnotationDataS3Uri }), - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNamesList(input.AttributeNames, context) }), - ...(input.DocumentType != null && { DocumentType: input.DocumentType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - ...(input.SourceDocumentsS3Uri != null && { SourceDocumentsS3Uri: input.SourceDocumentsS3Uri }), - ...(input.Split != null && { Split: input.Split }), - }; -}; +// se_AugmentedManifestsListItem omitted. -/** - * serializeAws_json1_1BatchDetectDominantLanguageRequest - */ -const se_BatchDetectDominantLanguageRequest = ( - input: BatchDetectDominantLanguageRequest, - context: __SerdeContext -): any => { - return { - ...(input.TextList != null && { TextList: se_CustomerInputStringList(input.TextList, context) }), - }; -}; +// se_BatchDetectDominantLanguageRequest omitted. -/** - * serializeAws_json1_1BatchDetectEntitiesRequest - */ -const se_BatchDetectEntitiesRequest = (input: BatchDetectEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TextList != null && { TextList: se_CustomerInputStringList(input.TextList, context) }), - }; -}; +// se_BatchDetectEntitiesRequest omitted. -/** - * serializeAws_json1_1BatchDetectKeyPhrasesRequest - */ -const se_BatchDetectKeyPhrasesRequest = (input: BatchDetectKeyPhrasesRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TextList != null && { TextList: se_CustomerInputStringList(input.TextList, context) }), - }; -}; +// se_BatchDetectKeyPhrasesRequest omitted. -/** - * serializeAws_json1_1BatchDetectSentimentRequest - */ -const se_BatchDetectSentimentRequest = (input: BatchDetectSentimentRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TextList != null && { TextList: se_CustomerInputStringList(input.TextList, context) }), - }; -}; +// se_BatchDetectSentimentRequest omitted. -/** - * serializeAws_json1_1BatchDetectSyntaxRequest - */ -const se_BatchDetectSyntaxRequest = (input: BatchDetectSyntaxRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TextList != null && { TextList: se_CustomerInputStringList(input.TextList, context) }), - }; -}; +// se_BatchDetectSyntaxRequest omitted. -/** - * serializeAws_json1_1BatchDetectTargetedSentimentRequest - */ -const se_BatchDetectTargetedSentimentRequest = ( - input: BatchDetectTargetedSentimentRequest, - context: __SerdeContext -): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TextList != null && { TextList: se_CustomerInputStringList(input.TextList, context) }), - }; -}; +// se_BatchDetectTargetedSentimentRequest omitted. /** * serializeAws_json1_1ClassifyDocumentRequest */ const se_ClassifyDocumentRequest = (input: ClassifyDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }), - ...(input.DocumentReaderConfig != null && { - DocumentReaderConfig: se_DocumentReaderConfig(input.DocumentReaderConfig, context), - }), - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.Text != null && { Text: input.Text }), - }; + return take(input, { + Bytes: context.base64Encoder, + DocumentReaderConfig: _json, + EndpointArn: [], + Text: [], + }); }; -/** - * serializeAws_json1_1ContainsPiiEntitiesRequest - */ -const se_ContainsPiiEntitiesRequest = (input: ContainsPiiEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_ContainsPiiEntitiesRequest omitted. /** * serializeAws_json1_1CreateDatasetRequest */ const se_CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.DatasetType != null && { DatasetType: input.DatasetType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.InputDataConfig != null && { - InputDataConfig: se_DatasetInputDataConfig(input.InputDataConfig, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DatasetName: [], + DatasetType: [], + Description: [], + FlywheelArn: [], + InputDataConfig: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateDocumentClassifierRequest */ const se_CreateDocumentClassifierRequest = (input: CreateDocumentClassifierRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DocumentClassifierName != null && { DocumentClassifierName: input.DocumentClassifierName }), - ...(input.InputDataConfig != null && { - InputDataConfig: se_DocumentClassifierInputDataConfig(input.InputDataConfig, context), - }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId }), - ...(input.ModelPolicy != null && { ModelPolicy: input.ModelPolicy }), - ...(input.OutputDataConfig != null && { - OutputDataConfig: se_DocumentClassifierOutputDataConfig(input.OutputDataConfig, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DocumentClassifierName: [], + InputDataConfig: _json, + LanguageCode: [], + Mode: [], + ModelKmsKeyId: [], + ModelPolicy: [], + OutputDataConfig: _json, + Tags: _json, + VersionName: [], + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** * serializeAws_json1_1CreateEndpointRequest */ const se_CreateEndpointRequest = (input: CreateEndpointRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DesiredInferenceUnits != null && { DesiredInferenceUnits: input.DesiredInferenceUnits }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.ModelArn != null && { ModelArn: input.ModelArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DesiredInferenceUnits: [], + EndpointName: [], + FlywheelArn: [], + ModelArn: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateEntityRecognizerRequest */ const se_CreateEntityRecognizerRequest = (input: CreateEntityRecognizerRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { - InputDataConfig: se_EntityRecognizerInputDataConfig(input.InputDataConfig, context), - }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId }), - ...(input.ModelPolicy != null && { ModelPolicy: input.ModelPolicy }), - ...(input.RecognizerName != null && { RecognizerName: input.RecognizerName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + LanguageCode: [], + ModelKmsKeyId: [], + ModelPolicy: [], + RecognizerName: [], + Tags: _json, + VersionName: [], + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** * serializeAws_json1_1CreateFlywheelRequest */ const se_CreateFlywheelRequest = (input: CreateFlywheelRequest, context: __SerdeContext): any => { - return { - ...(input.ActiveModelArn != null && { ActiveModelArn: input.ActiveModelArn }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DataLakeS3Uri != null && { DataLakeS3Uri: input.DataLakeS3Uri }), - ...(input.DataSecurityConfig != null && { - DataSecurityConfig: se_DataSecurityConfig(input.DataSecurityConfig, context), - }), - ...(input.FlywheelName != null && { FlywheelName: input.FlywheelName }), - ...(input.ModelType != null && { ModelType: input.ModelType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TaskConfig != null && { TaskConfig: se_TaskConfig(input.TaskConfig, context) }), - }; + return take(input, { + ActiveModelArn: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DataLakeS3Uri: [], + DataSecurityConfig: _json, + FlywheelName: [], + ModelType: [], + Tags: _json, + TaskConfig: _json, + }); }; -/** - * serializeAws_json1_1CustomerInputStringList - */ -const se_CustomerInputStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomerInputStringList omitted. -/** - * serializeAws_json1_1DataSecurityConfig - */ -const se_DataSecurityConfig = (input: DataSecurityConfig, context: __SerdeContext): any => { - return { - ...(input.DataLakeKmsKeyId != null && { DataLakeKmsKeyId: input.DataLakeKmsKeyId }), - ...(input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; +// se_DataSecurityConfig omitted. -/** - * serializeAws_json1_1DatasetAugmentedManifestsList - */ -const se_DatasetAugmentedManifestsList = (input: DatasetAugmentedManifestsListItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DatasetAugmentedManifestsListItem(entry, context); - }); -}; +// se_DatasetAugmentedManifestsList omitted. -/** - * serializeAws_json1_1DatasetAugmentedManifestsListItem - */ -const se_DatasetAugmentedManifestsListItem = ( - input: DatasetAugmentedManifestsListItem, - context: __SerdeContext -): any => { - return { - ...(input.AnnotationDataS3Uri != null && { AnnotationDataS3Uri: input.AnnotationDataS3Uri }), - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNamesList(input.AttributeNames, context) }), - ...(input.DocumentType != null && { DocumentType: input.DocumentType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - ...(input.SourceDocumentsS3Uri != null && { SourceDocumentsS3Uri: input.SourceDocumentsS3Uri }), - }; -}; +// se_DatasetAugmentedManifestsListItem omitted. -/** - * serializeAws_json1_1DatasetDocumentClassifierInputDataConfig - */ -const se_DatasetDocumentClassifierInputDataConfig = ( - input: DatasetDocumentClassifierInputDataConfig, - context: __SerdeContext -): any => { - return { - ...(input.LabelDelimiter != null && { LabelDelimiter: input.LabelDelimiter }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_DatasetDocumentClassifierInputDataConfig omitted. -/** - * serializeAws_json1_1DatasetEntityRecognizerAnnotations - */ -const se_DatasetEntityRecognizerAnnotations = ( - input: DatasetEntityRecognizerAnnotations, - context: __SerdeContext -): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_DatasetEntityRecognizerAnnotations omitted. -/** - * serializeAws_json1_1DatasetEntityRecognizerDocuments - */ -const se_DatasetEntityRecognizerDocuments = (input: DatasetEntityRecognizerDocuments, context: __SerdeContext): any => { - return { - ...(input.InputFormat != null && { InputFormat: input.InputFormat }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_DatasetEntityRecognizerDocuments omitted. -/** - * serializeAws_json1_1DatasetEntityRecognizerEntityList - */ -const se_DatasetEntityRecognizerEntityList = ( - input: DatasetEntityRecognizerEntityList, - context: __SerdeContext -): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_DatasetEntityRecognizerEntityList omitted. -/** - * serializeAws_json1_1DatasetEntityRecognizerInputDataConfig - */ -const se_DatasetEntityRecognizerInputDataConfig = ( - input: DatasetEntityRecognizerInputDataConfig, - context: __SerdeContext -): any => { - return { - ...(input.Annotations != null && { - Annotations: se_DatasetEntityRecognizerAnnotations(input.Annotations, context), - }), - ...(input.Documents != null && { Documents: se_DatasetEntityRecognizerDocuments(input.Documents, context) }), - ...(input.EntityList != null && { EntityList: se_DatasetEntityRecognizerEntityList(input.EntityList, context) }), - }; -}; +// se_DatasetEntityRecognizerInputDataConfig omitted. /** * serializeAws_json1_1DatasetFilter */ const se_DatasetFilter = (input: DatasetFilter, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.DatasetType != null && { DatasetType: input.DatasetType }), - ...(input.Status != null && { Status: input.Status }), - }; + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + DatasetType: [], + Status: [], + }); }; -/** - * serializeAws_json1_1DatasetInputDataConfig - */ -const se_DatasetInputDataConfig = (input: DatasetInputDataConfig, context: __SerdeContext): any => { - return { - ...(input.AugmentedManifests != null && { - AugmentedManifests: se_DatasetAugmentedManifestsList(input.AugmentedManifests, context), - }), - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.DocumentClassifierInputDataConfig != null && { - DocumentClassifierInputDataConfig: se_DatasetDocumentClassifierInputDataConfig( - input.DocumentClassifierInputDataConfig, - context - ), - }), - ...(input.EntityRecognizerInputDataConfig != null && { - EntityRecognizerInputDataConfig: se_DatasetEntityRecognizerInputDataConfig( - input.EntityRecognizerInputDataConfig, - context - ), - }), - }; -}; +// se_DatasetInputDataConfig omitted. -/** - * serializeAws_json1_1DeleteDocumentClassifierRequest - */ -const se_DeleteDocumentClassifierRequest = (input: DeleteDocumentClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }), - }; -}; +// se_DeleteDocumentClassifierRequest omitted. -/** - * serializeAws_json1_1DeleteEndpointRequest - */ -const se_DeleteEndpointRequest = (input: DeleteEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - }; -}; +// se_DeleteEndpointRequest omitted. -/** - * serializeAws_json1_1DeleteEntityRecognizerRequest - */ -const se_DeleteEntityRecognizerRequest = (input: DeleteEntityRecognizerRequest, context: __SerdeContext): any => { - return { - ...(input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }), - }; -}; +// se_DeleteEntityRecognizerRequest omitted. -/** - * serializeAws_json1_1DeleteFlywheelRequest - */ -const se_DeleteFlywheelRequest = (input: DeleteFlywheelRequest, context: __SerdeContext): any => { - return { - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - }; -}; +// se_DeleteFlywheelRequest omitted. -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * serializeAws_json1_1DescribeDatasetRequest - */ -const se_DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - }; -}; +// se_DescribeDatasetRequest omitted. -/** - * serializeAws_json1_1DescribeDocumentClassificationJobRequest - */ -const se_DescribeDocumentClassificationJobRequest = ( - input: DescribeDocumentClassificationJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeDocumentClassificationJobRequest omitted. -/** - * serializeAws_json1_1DescribeDocumentClassifierRequest - */ -const se_DescribeDocumentClassifierRequest = ( - input: DescribeDocumentClassifierRequest, - context: __SerdeContext -): any => { - return { - ...(input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }), - }; -}; +// se_DescribeDocumentClassifierRequest omitted. -/** - * serializeAws_json1_1DescribeDominantLanguageDetectionJobRequest - */ -const se_DescribeDominantLanguageDetectionJobRequest = ( - input: DescribeDominantLanguageDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeDominantLanguageDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeEndpointRequest - */ -const se_DescribeEndpointRequest = (input: DescribeEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - }; -}; +// se_DescribeEndpointRequest omitted. -/** - * serializeAws_json1_1DescribeEntitiesDetectionJobRequest - */ -const se_DescribeEntitiesDetectionJobRequest = ( - input: DescribeEntitiesDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeEntitiesDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeEntityRecognizerRequest - */ -const se_DescribeEntityRecognizerRequest = (input: DescribeEntityRecognizerRequest, context: __SerdeContext): any => { - return { - ...(input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }), - }; -}; +// se_DescribeEntityRecognizerRequest omitted. -/** - * serializeAws_json1_1DescribeEventsDetectionJobRequest - */ -const se_DescribeEventsDetectionJobRequest = ( - input: DescribeEventsDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeEventsDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeFlywheelIterationRequest - */ -const se_DescribeFlywheelIterationRequest = (input: DescribeFlywheelIterationRequest, context: __SerdeContext): any => { - return { - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.FlywheelIterationId != null && { FlywheelIterationId: input.FlywheelIterationId }), - }; -}; +// se_DescribeFlywheelIterationRequest omitted. -/** - * serializeAws_json1_1DescribeFlywheelRequest - */ -const se_DescribeFlywheelRequest = (input: DescribeFlywheelRequest, context: __SerdeContext): any => { - return { - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - }; -}; +// se_DescribeFlywheelRequest omitted. -/** - * serializeAws_json1_1DescribeKeyPhrasesDetectionJobRequest - */ -const se_DescribeKeyPhrasesDetectionJobRequest = ( - input: DescribeKeyPhrasesDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeKeyPhrasesDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribePiiEntitiesDetectionJobRequest - */ -const se_DescribePiiEntitiesDetectionJobRequest = ( - input: DescribePiiEntitiesDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribePiiEntitiesDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeResourcePolicyRequest - */ -const se_DescribeResourcePolicyRequest = (input: DescribeResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DescribeResourcePolicyRequest omitted. -/** - * serializeAws_json1_1DescribeSentimentDetectionJobRequest - */ -const se_DescribeSentimentDetectionJobRequest = ( - input: DescribeSentimentDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeSentimentDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeTargetedSentimentDetectionJobRequest - */ -const se_DescribeTargetedSentimentDetectionJobRequest = ( - input: DescribeTargetedSentimentDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeTargetedSentimentDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeTopicsDetectionJobRequest - */ -const se_DescribeTopicsDetectionJobRequest = ( - input: DescribeTopicsDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeTopicsDetectionJobRequest omitted. -/** - * serializeAws_json1_1DetectDominantLanguageRequest - */ -const se_DetectDominantLanguageRequest = (input: DetectDominantLanguageRequest, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectDominantLanguageRequest omitted. /** * serializeAws_json1_1DetectEntitiesRequest */ const se_DetectEntitiesRequest = (input: DetectEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }), - ...(input.DocumentReaderConfig != null && { - DocumentReaderConfig: se_DocumentReaderConfig(input.DocumentReaderConfig, context), - }), - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; + return take(input, { + Bytes: context.base64Encoder, + DocumentReaderConfig: _json, + EndpointArn: [], + LanguageCode: [], + Text: [], + }); }; -/** - * serializeAws_json1_1DetectKeyPhrasesRequest - */ -const se_DetectKeyPhrasesRequest = (input: DetectKeyPhrasesRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectKeyPhrasesRequest omitted. -/** - * serializeAws_json1_1DetectPiiEntitiesRequest - */ -const se_DetectPiiEntitiesRequest = (input: DetectPiiEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectPiiEntitiesRequest omitted. -/** - * serializeAws_json1_1DetectSentimentRequest - */ -const se_DetectSentimentRequest = (input: DetectSentimentRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectSentimentRequest omitted. -/** - * serializeAws_json1_1DetectSyntaxRequest - */ -const se_DetectSyntaxRequest = (input: DetectSyntaxRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectSyntaxRequest omitted. -/** - * serializeAws_json1_1DetectTargetedSentimentRequest - */ -const se_DetectTargetedSentimentRequest = (input: DetectTargetedSentimentRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectTargetedSentimentRequest omitted. -/** - * serializeAws_json1_1DocumentClassificationConfig - */ -const se_DocumentClassificationConfig = (input: DocumentClassificationConfig, context: __SerdeContext): any => { - return { - ...(input.Labels != null && { Labels: se_LabelsList(input.Labels, context) }), - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; +// se_DocumentClassificationConfig omitted. /** * serializeAws_json1_1DocumentClassificationJobFilter */ const se_DocumentClassificationJobFilter = (input: DocumentClassificationJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DocumentClassifierAugmentedManifestsList - */ -const se_DocumentClassifierAugmentedManifestsList = ( - input: AugmentedManifestsListItem[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AugmentedManifestsListItem(entry, context); - }); -}; +// se_DocumentClassifierAugmentedManifestsList omitted. /** * serializeAws_json1_1DocumentClassifierFilter */ const se_DocumentClassifierFilter = (input: DocumentClassifierFilter, context: __SerdeContext): any => { - return { - ...(input.DocumentClassifierName != null && { DocumentClassifierName: input.DocumentClassifierName }), - ...(input.Status != null && { Status: input.Status }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + DocumentClassifierName: [], + Status: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DocumentClassifierInputDataConfig - */ -const se_DocumentClassifierInputDataConfig = ( - input: DocumentClassifierInputDataConfig, - context: __SerdeContext -): any => { - return { - ...(input.AugmentedManifests != null && { - AugmentedManifests: se_DocumentClassifierAugmentedManifestsList(input.AugmentedManifests, context), - }), - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.LabelDelimiter != null && { LabelDelimiter: input.LabelDelimiter }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - ...(input.TestS3Uri != null && { TestS3Uri: input.TestS3Uri }), - }; -}; +// se_DocumentClassifierInputDataConfig omitted. -/** - * serializeAws_json1_1DocumentClassifierOutputDataConfig - */ -const se_DocumentClassifierOutputDataConfig = ( - input: DocumentClassifierOutputDataConfig, - context: __SerdeContext -): any => { - return { - ...(input.FlywheelStatsS3Prefix != null && { FlywheelStatsS3Prefix: input.FlywheelStatsS3Prefix }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_DocumentClassifierOutputDataConfig omitted. -/** - * serializeAws_json1_1DocumentReaderConfig - */ -const se_DocumentReaderConfig = (input: DocumentReaderConfig, context: __SerdeContext): any => { - return { - ...(input.DocumentReadAction != null && { DocumentReadAction: input.DocumentReadAction }), - ...(input.DocumentReadMode != null && { DocumentReadMode: input.DocumentReadMode }), - ...(input.FeatureTypes != null && { FeatureTypes: se_ListOfDocumentReadFeatureTypes(input.FeatureTypes, context) }), - }; -}; +// se_DocumentReaderConfig omitted. /** * serializeAws_json1_1DominantLanguageDetectionJobFilter @@ -7521,238 +6895,127 @@ const se_DominantLanguageDetectionJobFilter = ( input: DominantLanguageDetectionJobFilter, context: __SerdeContext ): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1EndpointFilter */ const se_EndpointFilter = (input: EndpointFilter, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.ModelArn != null && { ModelArn: input.ModelArn }), - ...(input.Status != null && { Status: input.Status }), - }; + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + ModelArn: [], + Status: [], + }); }; /** * serializeAws_json1_1EntitiesDetectionJobFilter */ const se_EntitiesDetectionJobFilter = (input: EntitiesDetectionJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1EntityRecognitionConfig - */ -const se_EntityRecognitionConfig = (input: EntityRecognitionConfig, context: __SerdeContext): any => { - return { - ...(input.EntityTypes != null && { EntityTypes: se_EntityTypesList(input.EntityTypes, context) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1EntityRecognizerAnnotations - */ -const se_EntityRecognizerAnnotations = (input: EntityRecognizerAnnotations, context: __SerdeContext): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - ...(input.TestS3Uri != null && { TestS3Uri: input.TestS3Uri }), - }; -}; +// se_EntityRecognitionConfig omitted. -/** - * serializeAws_json1_1EntityRecognizerAugmentedManifestsList - */ -const se_EntityRecognizerAugmentedManifestsList = ( - input: AugmentedManifestsListItem[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AugmentedManifestsListItem(entry, context); - }); -}; +// se_EntityRecognizerAnnotations omitted. -/** - * serializeAws_json1_1EntityRecognizerDocuments - */ -const se_EntityRecognizerDocuments = (input: EntityRecognizerDocuments, context: __SerdeContext): any => { - return { - ...(input.InputFormat != null && { InputFormat: input.InputFormat }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - ...(input.TestS3Uri != null && { TestS3Uri: input.TestS3Uri }), - }; -}; +// se_EntityRecognizerAugmentedManifestsList omitted. -/** - * serializeAws_json1_1EntityRecognizerEntityList - */ -const se_EntityRecognizerEntityList = (input: EntityRecognizerEntityList, context: __SerdeContext): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1EntityRecognizerFilter - */ -const se_EntityRecognizerFilter = (input: EntityRecognizerFilter, context: __SerdeContext): any => { - return { - ...(input.RecognizerName != null && { RecognizerName: input.RecognizerName }), - ...(input.Status != null && { Status: input.Status }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; -}; +// se_EntityRecognizerDocuments omitted. -/** - * serializeAws_json1_1EntityRecognizerInputDataConfig - */ -const se_EntityRecognizerInputDataConfig = (input: EntityRecognizerInputDataConfig, context: __SerdeContext): any => { - return { - ...(input.Annotations != null && { Annotations: se_EntityRecognizerAnnotations(input.Annotations, context) }), - ...(input.AugmentedManifests != null && { - AugmentedManifests: se_EntityRecognizerAugmentedManifestsList(input.AugmentedManifests, context), - }), - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.Documents != null && { Documents: se_EntityRecognizerDocuments(input.Documents, context) }), - ...(input.EntityList != null && { EntityList: se_EntityRecognizerEntityList(input.EntityList, context) }), - ...(input.EntityTypes != null && { EntityTypes: se_EntityTypesList(input.EntityTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1EntityTypesList - */ -const se_EntityTypesList = (input: EntityTypesListItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntityTypesListItem(entry, context); - }); -}; +// se_EntityRecognizerEntityList omitted. /** - * serializeAws_json1_1EntityTypesListItem + * serializeAws_json1_1EntityRecognizerFilter */ -const se_EntityTypesListItem = (input: EntityTypesListItem, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; +const se_EntityRecognizerFilter = (input: EntityRecognizerFilter, context: __SerdeContext): any => { + return take(input, { + RecognizerName: [], + Status: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_EntityRecognizerInputDataConfig omitted. + +// se_EntityTypesList omitted. + +// se_EntityTypesListItem omitted. + /** * serializeAws_json1_1EventsDetectionJobFilter */ const se_EventsDetectionJobFilter = (input: EventsDetectionJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1FlywheelFilter */ const se_FlywheelFilter = (input: FlywheelFilter, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.Status != null && { Status: input.Status }), - }; + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + Status: [], + }); }; /** * serializeAws_json1_1FlywheelIterationFilter */ const se_FlywheelIterationFilter = (input: FlywheelIterationFilter, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - }; + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ImportModelRequest - */ -const se_ImportModelRequest = (input: ImportModelRequest, context: __SerdeContext): any => { - return { - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.SourceModelArn != null && { SourceModelArn: input.SourceModelArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; +// se_ImportModelRequest omitted. -/** - * serializeAws_json1_1InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return { - ...(input.DocumentReaderConfig != null && { - DocumentReaderConfig: se_DocumentReaderConfig(input.DocumentReaderConfig, context), - }), - ...(input.InputFormat != null && { InputFormat: input.InputFormat }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_InputDataConfig omitted. /** * serializeAws_json1_1KeyPhrasesDetectionJobFilter */ const se_KeyPhrasesDetectionJobFilter = (input: KeyPhrasesDetectionJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1LabelsList - */ -const se_LabelsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LabelsList omitted. /** * serializeAws_json1_1ListDatasetsRequest */ const se_ListDatasetsRequest = (input: ListDatasetsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_DatasetFilter(input.Filter, context) }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_DatasetFilter(_, context), + FlywheelArn: [], + MaxResults: [], + NextToken: [], + }); }; /** @@ -7762,36 +7025,25 @@ const se_ListDocumentClassificationJobsRequest = ( input: ListDocumentClassificationJobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_DocumentClassificationJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_DocumentClassificationJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListDocumentClassifiersRequest */ const se_ListDocumentClassifiersRequest = (input: ListDocumentClassifiersRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_DocumentClassifierFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_DocumentClassifierFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1ListDocumentClassifierSummariesRequest - */ -const se_ListDocumentClassifierSummariesRequest = ( - input: ListDocumentClassifierSummariesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDocumentClassifierSummariesRequest omitted. /** * serializeAws_json1_1ListDominantLanguageDetectionJobsRequest @@ -7800,68 +7052,57 @@ const se_ListDominantLanguageDetectionJobsRequest = ( input: ListDominantLanguageDetectionJobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_DominantLanguageDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_DominantLanguageDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListEndpointsRequest */ const se_ListEndpointsRequest = (input: ListEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_EndpointFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_EndpointFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListEntitiesDetectionJobsRequest */ const se_ListEntitiesDetectionJobsRequest = (input: ListEntitiesDetectionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_EntitiesDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_EntitiesDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListEntityRecognizersRequest */ const se_ListEntityRecognizersRequest = (input: ListEntityRecognizersRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_EntityRecognizerFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_EntityRecognizerFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1ListEntityRecognizerSummariesRequest - */ -const se_ListEntityRecognizerSummariesRequest = ( - input: ListEntityRecognizerSummariesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListEntityRecognizerSummariesRequest omitted. /** * serializeAws_json1_1ListEventsDetectionJobsRequest */ const se_ListEventsDetectionJobsRequest = (input: ListEventsDetectionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_EventsDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_EventsDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** @@ -7871,23 +7112,23 @@ const se_ListFlywheelIterationHistoryRequest = ( input: ListFlywheelIterationHistoryRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_FlywheelIterationFilter(input.Filter, context) }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_FlywheelIterationFilter(_, context), + FlywheelArn: [], + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListFlywheelsRequest */ const se_ListFlywheelsRequest = (input: ListFlywheelsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_FlywheelFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_FlywheelFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** @@ -7897,37 +7138,16 @@ const se_ListKeyPhrasesDetectionJobsRequest = ( input: ListKeyPhrasesDetectionJobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_KeyPhrasesDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_KeyPhrasesDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1ListOfDocumentReadFeatureTypes - */ -const se_ListOfDocumentReadFeatureTypes = ( - input: (DocumentReadFeatureTypes | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfDocumentReadFeatureTypes omitted. -/** - * serializeAws_json1_1ListOfPiiEntityTypes - */ -const se_ListOfPiiEntityTypes = (input: (PiiEntityType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfPiiEntityTypes omitted. /** * serializeAws_json1_1ListPiiEntitiesDetectionJobsRequest @@ -7936,11 +7156,11 @@ const se_ListPiiEntitiesDetectionJobsRequest = ( input: ListPiiEntitiesDetectionJobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_PiiEntitiesDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_PiiEntitiesDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** @@ -7950,21 +7170,14 @@ const se_ListSentimentDetectionJobsRequest = ( input: ListSentimentDetectionJobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_SentimentDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_SentimentDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. /** * serializeAws_json1_1ListTargetedSentimentDetectionJobsRequest @@ -7973,424 +7186,257 @@ const se_ListTargetedSentimentDetectionJobsRequest = ( input: ListTargetedSentimentDetectionJobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_TargetedSentimentDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_TargetedSentimentDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListTopicsDetectionJobsRequest */ const se_ListTopicsDetectionJobsRequest = (input: ListTopicsDetectionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_TopicsDetectionJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_TopicsDetectionJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1OutputDataConfig - */ -const se_OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_OutputDataConfig omitted. /** * serializeAws_json1_1PiiEntitiesDetectionJobFilter - */ -const se_PiiEntitiesDetectionJobFilter = (input: PiiEntitiesDetectionJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy }), - }; -}; - -/** - * serializeAws_json1_1RedactionConfig - */ -const se_RedactionConfig = (input: RedactionConfig, context: __SerdeContext): any => { - return { - ...(input.MaskCharacter != null && { MaskCharacter: input.MaskCharacter }), - ...(input.MaskMode != null && { MaskMode: input.MaskMode }), - ...(input.PiiEntityTypes != null && { PiiEntityTypes: se_ListOfPiiEntityTypes(input.PiiEntityTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SentimentDetectionJobFilter - */ -const se_SentimentDetectionJobFilter = (input: SentimentDetectionJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1StartDocumentClassificationJobRequest - */ -const se_StartDocumentClassificationJobRequest = ( - input: StartDocumentClassificationJobRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StartDominantLanguageDetectionJobRequest - */ -const se_StartDominantLanguageDetectionJobRequest = ( - input: StartDominantLanguageDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StartEntitiesDetectionJobRequest - */ -const se_StartEntitiesDetectionJobRequest = (input: StartEntitiesDetectionJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StartEventsDetectionJobRequest - */ -const se_StartEventsDetectionJobRequest = (input: StartEventsDetectionJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetEventTypes != null && { TargetEventTypes: se_TargetEventTypes(input.TargetEventTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1StartFlywheelIterationRequest - */ -const se_StartFlywheelIterationRequest = (input: StartFlywheelIterationRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - }; -}; - -/** - * serializeAws_json1_1StartKeyPhrasesDetectionJobRequest - */ -const se_StartKeyPhrasesDetectionJobRequest = ( - input: StartKeyPhrasesDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StartPiiEntitiesDetectionJobRequest - */ -const se_StartPiiEntitiesDetectionJobRequest = ( - input: StartPiiEntitiesDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.RedactionConfig != null && { RedactionConfig: se_RedactionConfig(input.RedactionConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1StartSentimentDetectionJobRequest - */ -const se_StartSentimentDetectionJobRequest = ( - input: StartSentimentDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StartTargetedSentimentDetectionJobRequest - */ -const se_StartTargetedSentimentDetectionJobRequest = ( - input: StartTargetedSentimentDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StartTopicsDetectionJobRequest - */ -const se_StartTopicsDetectionJobRequest = (input: StartTopicsDetectionJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.NumberOfTopics != null && { NumberOfTopics: input.NumberOfTopics }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1StopDominantLanguageDetectionJobRequest - */ -const se_StopDominantLanguageDetectionJobRequest = ( - input: StopDominantLanguageDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; - -/** - * serializeAws_json1_1StopEntitiesDetectionJobRequest - */ -const se_StopEntitiesDetectionJobRequest = (input: StopEntitiesDetectionJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; + */ +const se_PiiEntitiesDetectionJobFilter = (input: PiiEntitiesDetectionJobFilter, context: __SerdeContext): any => { + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_PutResourcePolicyRequest omitted. + +// se_RedactionConfig omitted. + +// se_SecurityGroupIds omitted. + /** - * serializeAws_json1_1StopEventsDetectionJobRequest + * serializeAws_json1_1SentimentDetectionJobFilter */ -const se_StopEventsDetectionJobRequest = (input: StopEventsDetectionJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; +const se_SentimentDetectionJobFilter = (input: SentimentDetectionJobFilter, context: __SerdeContext): any => { + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * serializeAws_json1_1StopKeyPhrasesDetectionJobRequest + * serializeAws_json1_1StartDocumentClassificationJobRequest */ -const se_StopKeyPhrasesDetectionJobRequest = ( - input: StopKeyPhrasesDetectionJobRequest, +const se_StartDocumentClassificationJobRequest = ( + input: StartDocumentClassificationJobRequest, context: __SerdeContext ): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DocumentClassifierArn: [], + FlywheelArn: [], + InputDataConfig: _json, + JobName: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** - * serializeAws_json1_1StopPiiEntitiesDetectionJobRequest + * serializeAws_json1_1StartDominantLanguageDetectionJobRequest */ -const se_StopPiiEntitiesDetectionJobRequest = ( - input: StopPiiEntitiesDetectionJobRequest, +const se_StartDominantLanguageDetectionJobRequest = ( + input: StartDominantLanguageDetectionJobRequest, context: __SerdeContext ): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** - * serializeAws_json1_1StopSentimentDetectionJobRequest + * serializeAws_json1_1StartEntitiesDetectionJobRequest */ -const se_StopSentimentDetectionJobRequest = (input: StopSentimentDetectionJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; +const se_StartEntitiesDetectionJobRequest = (input: StartEntitiesDetectionJobRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + EntityRecognizerArn: [], + FlywheelArn: [], + InputDataConfig: _json, + JobName: [], + LanguageCode: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** - * serializeAws_json1_1StopTargetedSentimentDetectionJobRequest + * serializeAws_json1_1StartEventsDetectionJobRequest */ -const se_StopTargetedSentimentDetectionJobRequest = ( - input: StopTargetedSentimentDetectionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; +const se_StartEventsDetectionJobRequest = (input: StartEventsDetectionJobRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + LanguageCode: [], + OutputDataConfig: _json, + Tags: _json, + TargetEventTypes: _json, + }); }; +// se_StartFlywheelIterationRequest omitted. + /** - * serializeAws_json1_1StopTrainingDocumentClassifierRequest + * serializeAws_json1_1StartKeyPhrasesDetectionJobRequest */ -const se_StopTrainingDocumentClassifierRequest = ( - input: StopTrainingDocumentClassifierRequest, +const se_StartKeyPhrasesDetectionJobRequest = ( + input: StartKeyPhrasesDetectionJobRequest, context: __SerdeContext ): any => { - return { - ...(input.DocumentClassifierArn != null && { DocumentClassifierArn: input.DocumentClassifierArn }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + LanguageCode: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** - * serializeAws_json1_1StopTrainingEntityRecognizerRequest + * serializeAws_json1_1StartPiiEntitiesDetectionJobRequest */ -const se_StopTrainingEntityRecognizerRequest = ( - input: StopTrainingEntityRecognizerRequest, +const se_StartPiiEntitiesDetectionJobRequest = ( + input: StartPiiEntitiesDetectionJobRequest, context: __SerdeContext ): any => { - return { - ...(input.EntityRecognizerArn != null && { EntityRecognizerArn: input.EntityRecognizerArn }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + LanguageCode: [], + Mode: [], + OutputDataConfig: _json, + RedactionConfig: _json, + Tags: _json, + }); }; /** - * serializeAws_json1_1Subnets + * serializeAws_json1_1StartSentimentDetectionJobRequest */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_StartSentimentDetectionJobRequest = ( + input: StartSentimentDetectionJobRequest, + context: __SerdeContext +): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + LanguageCode: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** - * serializeAws_json1_1Tag + * serializeAws_json1_1StartTargetedSentimentDetectionJobRequest */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_StartTargetedSentimentDetectionJobRequest = ( + input: StartTargetedSentimentDetectionJobRequest, + context: __SerdeContext +): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + LanguageCode: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; /** - * serializeAws_json1_1TagKeyList + * serializeAws_json1_1StartTopicsDetectionJobRequest */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_StartTopicsDetectionJobRequest = (input: StartTopicsDetectionJobRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + NumberOfTopics: [], + OutputDataConfig: _json, + Tags: _json, + VolumeKmsKeyId: [], + VpcConfig: _json, + }); }; -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_StopDominantLanguageDetectionJobRequest omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_StopEntitiesDetectionJobRequest omitted. + +// se_StopEventsDetectionJobRequest omitted. + +// se_StopKeyPhrasesDetectionJobRequest omitted. + +// se_StopPiiEntitiesDetectionJobRequest omitted. + +// se_StopSentimentDetectionJobRequest omitted. + +// se_StopTargetedSentimentDetectionJobRequest omitted. + +// se_StopTrainingDocumentClassifierRequest omitted. + +// se_StopTrainingEntityRecognizerRequest omitted. + +// se_Subnets omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. /** * serializeAws_json1_1TargetedSentimentDetectionJobFilter @@ -8399,138 +7445,43 @@ const se_TargetedSentimentDetectionJobFilter = ( input: TargetedSentimentDetectionJobFilter, context: __SerdeContext ): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1TargetEventTypes - */ -const se_TargetEventTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetEventTypes omitted. -/** - * serializeAws_json1_1TaskConfig - */ -const se_TaskConfig = (input: TaskConfig, context: __SerdeContext): any => { - return { - ...(input.DocumentClassificationConfig != null && { - DocumentClassificationConfig: se_DocumentClassificationConfig(input.DocumentClassificationConfig, context), - }), - ...(input.EntityRecognitionConfig != null && { - EntityRecognitionConfig: se_EntityRecognitionConfig(input.EntityRecognitionConfig, context), - }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - }; -}; +// se_TaskConfig omitted. /** * serializeAws_json1_1TopicsDetectionJobFilter */ const se_TopicsDetectionJobFilter = (input: TopicsDetectionJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateDataSecurityConfig - */ -const se_UpdateDataSecurityConfig = (input: UpdateDataSecurityConfig, context: __SerdeContext): any => { - return { - ...(input.ModelKmsKeyId != null && { ModelKmsKeyId: input.ModelKmsKeyId }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; +// se_UpdateDataSecurityConfig omitted. -/** - * serializeAws_json1_1UpdateEndpointRequest - */ -const se_UpdateEndpointRequest = (input: UpdateEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.DesiredDataAccessRoleArn != null && { DesiredDataAccessRoleArn: input.DesiredDataAccessRoleArn }), - ...(input.DesiredInferenceUnits != null && { DesiredInferenceUnits: input.DesiredInferenceUnits }), - ...(input.DesiredModelArn != null && { DesiredModelArn: input.DesiredModelArn }), - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - }; -}; +// se_UpdateEndpointRequest omitted. -/** - * serializeAws_json1_1UpdateFlywheelRequest - */ -const se_UpdateFlywheelRequest = (input: UpdateFlywheelRequest, context: __SerdeContext): any => { - return { - ...(input.ActiveModelArn != null && { ActiveModelArn: input.ActiveModelArn }), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DataSecurityConfig != null && { - DataSecurityConfig: se_UpdateDataSecurityConfig(input.DataSecurityConfig, context), - }), - ...(input.FlywheelArn != null && { FlywheelArn: input.FlywheelArn }), - }; -}; +// se_UpdateFlywheelRequest omitted. -/** - * serializeAws_json1_1VpcConfig - */ -const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.Subnets != null && { Subnets: se_Subnets(input.Subnets, context) }), - }; -}; +// se_VpcConfig omitted. -/** - * deserializeAws_json1_1AttributeNamesList - */ -const de_AttributeNamesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AttributeNamesList omitted. -/** - * deserializeAws_json1_1AugmentedManifestsListItem - */ -const de_AugmentedManifestsListItem = (output: any, context: __SerdeContext): AugmentedManifestsListItem => { - return { - AnnotationDataS3Uri: __expectString(output.AnnotationDataS3Uri), - AttributeNames: output.AttributeNames != null ? de_AttributeNamesList(output.AttributeNames, context) : undefined, - DocumentType: __expectString(output.DocumentType), - S3Uri: __expectString(output.S3Uri), - SourceDocumentsS3Uri: __expectString(output.SourceDocumentsS3Uri), - Split: __expectString(output.Split), - } as any; -}; +// de_AugmentedManifestsListItem omitted. /** * deserializeAws_json1_1BatchDetectDominantLanguageItemResult @@ -8539,10 +7490,10 @@ const de_BatchDetectDominantLanguageItemResult = ( output: any, context: __SerdeContext ): BatchDetectDominantLanguageItemResult => { - return { - Index: __expectInt32(output.Index), - Languages: output.Languages != null ? de_ListOfDominantLanguages(output.Languages, context) : undefined, - } as any; + return take(output, { + Index: __expectInt32, + Languages: (_: any) => de_ListOfDominantLanguages(_, context), + }) as any; }; /** @@ -8552,92 +7503,91 @@ const de_BatchDetectDominantLanguageResponse = ( output: any, context: __SerdeContext ): BatchDetectDominantLanguageResponse => { - return { - ErrorList: output.ErrorList != null ? de_BatchItemErrorList(output.ErrorList, context) : undefined, - ResultList: - output.ResultList != null ? de_ListOfDetectDominantLanguageResult(output.ResultList, context) : undefined, - } as any; + return take(output, { + ErrorList: _json, + ResultList: (_: any) => de_ListOfDetectDominantLanguageResult(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectEntitiesItemResult */ const de_BatchDetectEntitiesItemResult = (output: any, context: __SerdeContext): BatchDetectEntitiesItemResult => { - return { - Entities: output.Entities != null ? de_ListOfEntities(output.Entities, context) : undefined, - Index: __expectInt32(output.Index), - } as any; + return take(output, { + Entities: (_: any) => de_ListOfEntities(_, context), + Index: __expectInt32, + }) as any; }; /** * deserializeAws_json1_1BatchDetectEntitiesResponse */ const de_BatchDetectEntitiesResponse = (output: any, context: __SerdeContext): BatchDetectEntitiesResponse => { - return { - ErrorList: output.ErrorList != null ? de_BatchItemErrorList(output.ErrorList, context) : undefined, - ResultList: output.ResultList != null ? de_ListOfDetectEntitiesResult(output.ResultList, context) : undefined, - } as any; + return take(output, { + ErrorList: _json, + ResultList: (_: any) => de_ListOfDetectEntitiesResult(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectKeyPhrasesItemResult */ const de_BatchDetectKeyPhrasesItemResult = (output: any, context: __SerdeContext): BatchDetectKeyPhrasesItemResult => { - return { - Index: __expectInt32(output.Index), - KeyPhrases: output.KeyPhrases != null ? de_ListOfKeyPhrases(output.KeyPhrases, context) : undefined, - } as any; + return take(output, { + Index: __expectInt32, + KeyPhrases: (_: any) => de_ListOfKeyPhrases(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectKeyPhrasesResponse */ const de_BatchDetectKeyPhrasesResponse = (output: any, context: __SerdeContext): BatchDetectKeyPhrasesResponse => { - return { - ErrorList: output.ErrorList != null ? de_BatchItemErrorList(output.ErrorList, context) : undefined, - ResultList: output.ResultList != null ? de_ListOfDetectKeyPhrasesResult(output.ResultList, context) : undefined, - } as any; + return take(output, { + ErrorList: _json, + ResultList: (_: any) => de_ListOfDetectKeyPhrasesResult(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectSentimentItemResult */ const de_BatchDetectSentimentItemResult = (output: any, context: __SerdeContext): BatchDetectSentimentItemResult => { - return { - Index: __expectInt32(output.Index), - Sentiment: __expectString(output.Sentiment), - SentimentScore: output.SentimentScore != null ? de_SentimentScore(output.SentimentScore, context) : undefined, - } as any; + return take(output, { + Index: __expectInt32, + Sentiment: __expectString, + SentimentScore: (_: any) => de_SentimentScore(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectSentimentResponse */ const de_BatchDetectSentimentResponse = (output: any, context: __SerdeContext): BatchDetectSentimentResponse => { - return { - ErrorList: output.ErrorList != null ? de_BatchItemErrorList(output.ErrorList, context) : undefined, - ResultList: output.ResultList != null ? de_ListOfDetectSentimentResult(output.ResultList, context) : undefined, - } as any; + return take(output, { + ErrorList: _json, + ResultList: (_: any) => de_ListOfDetectSentimentResult(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectSyntaxItemResult */ const de_BatchDetectSyntaxItemResult = (output: any, context: __SerdeContext): BatchDetectSyntaxItemResult => { - return { - Index: __expectInt32(output.Index), - SyntaxTokens: output.SyntaxTokens != null ? de_ListOfSyntaxTokens(output.SyntaxTokens, context) : undefined, - } as any; + return take(output, { + Index: __expectInt32, + SyntaxTokens: (_: any) => de_ListOfSyntaxTokens(_, context), + }) as any; }; /** * deserializeAws_json1_1BatchDetectSyntaxResponse */ const de_BatchDetectSyntaxResponse = (output: any, context: __SerdeContext): BatchDetectSyntaxResponse => { - return { - ErrorList: output.ErrorList != null ? de_BatchItemErrorList(output.ErrorList, context) : undefined, - ResultList: output.ResultList != null ? de_ListOfDetectSyntaxResult(output.ResultList, context) : undefined, - } as any; + return take(output, { + ErrorList: _json, + ResultList: (_: any) => de_ListOfDetectSyntaxResult(_, context), + }) as any; }; /** @@ -8647,10 +7597,10 @@ const de_BatchDetectTargetedSentimentItemResult = ( output: any, context: __SerdeContext ): BatchDetectTargetedSentimentItemResult => { - return { - Entities: output.Entities != null ? de_ListOfTargetedSentimentEntities(output.Entities, context) : undefined, - Index: __expectInt32(output.Index), - } as any; + return take(output, { + Entities: (_: any) => de_ListOfTargetedSentimentEntities(_, context), + Index: __expectInt32, + }) as any; }; /** @@ -8660,240 +7610,128 @@ const de_BatchDetectTargetedSentimentResponse = ( output: any, context: __SerdeContext ): BatchDetectTargetedSentimentResponse => { - return { - ErrorList: output.ErrorList != null ? de_BatchItemErrorList(output.ErrorList, context) : undefined, - ResultList: - output.ResultList != null ? de_ListOfDetectTargetedSentimentResult(output.ResultList, context) : undefined, - } as any; + return take(output, { + ErrorList: _json, + ResultList: (_: any) => de_ListOfDetectTargetedSentimentResult(_, context), + }) as any; }; -/** - * deserializeAws_json1_1BatchItemError - */ -const de_BatchItemError = (output: any, context: __SerdeContext): BatchItemError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Index: __expectInt32(output.Index), - } as any; -}; +// de_BatchItemError omitted. -/** - * deserializeAws_json1_1BatchItemErrorList - */ -const de_BatchItemErrorList = (output: any, context: __SerdeContext): BatchItemError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchItemError(entry, context); - }); - return retVal; -}; +// de_BatchItemErrorList omitted. -/** - * deserializeAws_json1_1BatchSizeLimitExceededException - */ -const de_BatchSizeLimitExceededException = (output: any, context: __SerdeContext): BatchSizeLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_BatchSizeLimitExceededException omitted. /** * deserializeAws_json1_1Block */ const de_Block = (output: any, context: __SerdeContext): Block => { - return { - BlockType: __expectString(output.BlockType), - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - Id: __expectString(output.Id), - Page: __expectInt32(output.Page), - Relationships: output.Relationships != null ? de_ListOfRelationships(output.Relationships, context) : undefined, - Text: __expectString(output.Text), - } as any; + return take(output, { + BlockType: __expectString, + Geometry: (_: any) => de_Geometry(_, context), + Id: __expectString, + Page: __expectInt32, + Relationships: _json, + Text: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1BlockReference - */ -const de_BlockReference = (output: any, context: __SerdeContext): BlockReference => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - BlockId: __expectString(output.BlockId), - ChildBlocks: output.ChildBlocks != null ? de_ListOfChildBlocks(output.ChildBlocks, context) : undefined, - EndOffset: __expectInt32(output.EndOffset), - } as any; -}; +// de_BlockReference omitted. /** * deserializeAws_json1_1BoundingBox */ const de_BoundingBox = (output: any, context: __SerdeContext): BoundingBox => { - return { - Height: __limitedParseFloat32(output.Height), - Left: __limitedParseFloat32(output.Left), - Top: __limitedParseFloat32(output.Top), - Width: __limitedParseFloat32(output.Width), - } as any; + return take(output, { + Height: __limitedParseFloat32, + Left: __limitedParseFloat32, + Top: __limitedParseFloat32, + Width: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1ChildBlock - */ -const de_ChildBlock = (output: any, context: __SerdeContext): ChildBlock => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - ChildBlockId: __expectString(output.ChildBlockId), - EndOffset: __expectInt32(output.EndOffset), - } as any; -}; +// de_ChildBlock omitted. /** * deserializeAws_json1_1ClassifierEvaluationMetrics */ const de_ClassifierEvaluationMetrics = (output: any, context: __SerdeContext): ClassifierEvaluationMetrics => { - return { - Accuracy: __limitedParseDouble(output.Accuracy), - F1Score: __limitedParseDouble(output.F1Score), - HammingLoss: __limitedParseDouble(output.HammingLoss), - MicroF1Score: __limitedParseDouble(output.MicroF1Score), - MicroPrecision: __limitedParseDouble(output.MicroPrecision), - MicroRecall: __limitedParseDouble(output.MicroRecall), - Precision: __limitedParseDouble(output.Precision), - Recall: __limitedParseDouble(output.Recall), - } as any; + return take(output, { + Accuracy: __limitedParseDouble, + F1Score: __limitedParseDouble, + HammingLoss: __limitedParseDouble, + MicroF1Score: __limitedParseDouble, + MicroPrecision: __limitedParseDouble, + MicroRecall: __limitedParseDouble, + Precision: __limitedParseDouble, + Recall: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1ClassifierMetadata */ const de_ClassifierMetadata = (output: any, context: __SerdeContext): ClassifierMetadata => { - return { - EvaluationMetrics: - output.EvaluationMetrics != null ? de_ClassifierEvaluationMetrics(output.EvaluationMetrics, context) : undefined, - NumberOfLabels: __expectInt32(output.NumberOfLabels), - NumberOfTestDocuments: __expectInt32(output.NumberOfTestDocuments), - NumberOfTrainedDocuments: __expectInt32(output.NumberOfTrainedDocuments), - } as any; + return take(output, { + EvaluationMetrics: (_: any) => de_ClassifierEvaluationMetrics(_, context), + NumberOfLabels: __expectInt32, + NumberOfTestDocuments: __expectInt32, + NumberOfTrainedDocuments: __expectInt32, + }) as any; }; /** * deserializeAws_json1_1ClassifyDocumentResponse */ const de_ClassifyDocumentResponse = (output: any, context: __SerdeContext): ClassifyDocumentResponse => { - return { - Classes: output.Classes != null ? de_ListOfClasses(output.Classes, context) : undefined, - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - DocumentType: output.DocumentType != null ? de_ListOfDocumentType(output.DocumentType, context) : undefined, - Errors: output.Errors != null ? de_ListOfErrors(output.Errors, context) : undefined, - Labels: output.Labels != null ? de_ListOfLabels(output.Labels, context) : undefined, - } as any; + return take(output, { + Classes: (_: any) => de_ListOfClasses(_, context), + DocumentMetadata: _json, + DocumentType: _json, + Errors: _json, + Labels: (_: any) => de_ListOfLabels(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentModificationException omitted. /** * deserializeAws_json1_1ContainsPiiEntitiesResponse */ const de_ContainsPiiEntitiesResponse = (output: any, context: __SerdeContext): ContainsPiiEntitiesResponse => { - return { - Labels: output.Labels != null ? de_ListOfEntityLabels(output.Labels, context) : undefined, - } as any; + return take(output, { + Labels: (_: any) => de_ListOfEntityLabels(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateDatasetResponse - */ -const de_CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => { - return { - DatasetArn: __expectString(output.DatasetArn), - } as any; -}; +// de_CreateDatasetResponse omitted. -/** - * deserializeAws_json1_1CreateDocumentClassifierResponse - */ -const de_CreateDocumentClassifierResponse = ( - output: any, - context: __SerdeContext -): CreateDocumentClassifierResponse => { - return { - DocumentClassifierArn: __expectString(output.DocumentClassifierArn), - } as any; -}; +// de_CreateDocumentClassifierResponse omitted. -/** - * deserializeAws_json1_1CreateEndpointResponse - */ -const de_CreateEndpointResponse = (output: any, context: __SerdeContext): CreateEndpointResponse => { - return { - EndpointArn: __expectString(output.EndpointArn), - ModelArn: __expectString(output.ModelArn), - } as any; -}; +// de_CreateEndpointResponse omitted. -/** - * deserializeAws_json1_1CreateEntityRecognizerResponse - */ -const de_CreateEntityRecognizerResponse = (output: any, context: __SerdeContext): CreateEntityRecognizerResponse => { - return { - EntityRecognizerArn: __expectString(output.EntityRecognizerArn), - } as any; -}; +// de_CreateEntityRecognizerResponse omitted. -/** - * deserializeAws_json1_1CreateFlywheelResponse - */ -const de_CreateFlywheelResponse = (output: any, context: __SerdeContext): CreateFlywheelResponse => { - return { - ActiveModelArn: __expectString(output.ActiveModelArn), - FlywheelArn: __expectString(output.FlywheelArn), - } as any; -}; +// de_CreateFlywheelResponse omitted. -/** - * deserializeAws_json1_1DataSecurityConfig - */ -const de_DataSecurityConfig = (output: any, context: __SerdeContext): DataSecurityConfig => { - return { - DataLakeKmsKeyId: __expectString(output.DataLakeKmsKeyId), - ModelKmsKeyId: __expectString(output.ModelKmsKeyId), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; +// de_DataSecurityConfig omitted. /** * deserializeAws_json1_1DatasetProperties */ const de_DatasetProperties = (output: any, context: __SerdeContext): DatasetProperties => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - DatasetS3Uri: __expectString(output.DatasetS3Uri), - DatasetType: __expectString(output.DatasetType), - Description: __expectString(output.Description), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Message: __expectString(output.Message), - NumberOfDocuments: __expectLong(output.NumberOfDocuments), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + DatasetName: __expectString, + DatasetS3Uri: __expectString, + DatasetType: __expectString, + Description: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + NumberOfDocuments: __expectLong, + Status: __expectString, + }) as any; }; /** @@ -8903,60 +7741,28 @@ const de_DatasetPropertiesList = (output: any, context: __SerdeContext): Dataset const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DeleteDocumentClassifierResponse - */ -const de_DeleteDocumentClassifierResponse = ( - output: any, - context: __SerdeContext -): DeleteDocumentClassifierResponse => { - return {} as any; -}; +// de_DeleteDocumentClassifierResponse omitted. -/** - * deserializeAws_json1_1DeleteEndpointResponse - */ -const de_DeleteEndpointResponse = (output: any, context: __SerdeContext): DeleteEndpointResponse => { - return {} as any; -}; +// de_DeleteEndpointResponse omitted. -/** - * deserializeAws_json1_1DeleteEntityRecognizerResponse - */ -const de_DeleteEntityRecognizerResponse = (output: any, context: __SerdeContext): DeleteEntityRecognizerResponse => { - return {} as any; -}; +// de_DeleteEntityRecognizerResponse omitted. -/** - * deserializeAws_json1_1DeleteFlywheelResponse - */ -const de_DeleteFlywheelResponse = (output: any, context: __SerdeContext): DeleteFlywheelResponse => { - return {} as any; -}; +// de_DeleteFlywheelResponse omitted. -/** - * deserializeAws_json1_1DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return {} as any; -}; +// de_DeleteResourcePolicyResponse omitted. /** * deserializeAws_json1_1DescribeDatasetResponse */ const de_DescribeDatasetResponse = (output: any, context: __SerdeContext): DescribeDatasetResponse => { - return { - DatasetProperties: - output.DatasetProperties != null ? de_DatasetProperties(output.DatasetProperties, context) : undefined, - } as any; + return take(output, { + DatasetProperties: (_: any) => de_DatasetProperties(_, context), + }) as any; }; /** @@ -8966,12 +7772,9 @@ const de_DescribeDocumentClassificationJobResponse = ( output: any, context: __SerdeContext ): DescribeDocumentClassificationJobResponse => { - return { - DocumentClassificationJobProperties: - output.DocumentClassificationJobProperties != null - ? de_DocumentClassificationJobProperties(output.DocumentClassificationJobProperties, context) - : undefined, - } as any; + return take(output, { + DocumentClassificationJobProperties: (_: any) => de_DocumentClassificationJobProperties(_, context), + }) as any; }; /** @@ -8981,12 +7784,9 @@ const de_DescribeDocumentClassifierResponse = ( output: any, context: __SerdeContext ): DescribeDocumentClassifierResponse => { - return { - DocumentClassifierProperties: - output.DocumentClassifierProperties != null - ? de_DocumentClassifierProperties(output.DocumentClassifierProperties, context) - : undefined, - } as any; + return take(output, { + DocumentClassifierProperties: (_: any) => de_DocumentClassifierProperties(_, context), + }) as any; }; /** @@ -8996,22 +7796,18 @@ const de_DescribeDominantLanguageDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeDominantLanguageDetectionJobResponse => { - return { - DominantLanguageDetectionJobProperties: - output.DominantLanguageDetectionJobProperties != null - ? de_DominantLanguageDetectionJobProperties(output.DominantLanguageDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + DominantLanguageDetectionJobProperties: (_: any) => de_DominantLanguageDetectionJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeEndpointResponse */ const de_DescribeEndpointResponse = (output: any, context: __SerdeContext): DescribeEndpointResponse => { - return { - EndpointProperties: - output.EndpointProperties != null ? de_EndpointProperties(output.EndpointProperties, context) : undefined, - } as any; + return take(output, { + EndpointProperties: (_: any) => de_EndpointProperties(_, context), + }) as any; }; /** @@ -9021,12 +7817,9 @@ const de_DescribeEntitiesDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeEntitiesDetectionJobResponse => { - return { - EntitiesDetectionJobProperties: - output.EntitiesDetectionJobProperties != null - ? de_EntitiesDetectionJobProperties(output.EntitiesDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + EntitiesDetectionJobProperties: (_: any) => de_EntitiesDetectionJobProperties(_, context), + }) as any; }; /** @@ -9036,12 +7829,9 @@ const de_DescribeEntityRecognizerResponse = ( output: any, context: __SerdeContext ): DescribeEntityRecognizerResponse => { - return { - EntityRecognizerProperties: - output.EntityRecognizerProperties != null - ? de_EntityRecognizerProperties(output.EntityRecognizerProperties, context) - : undefined, - } as any; + return take(output, { + EntityRecognizerProperties: (_: any) => de_EntityRecognizerProperties(_, context), + }) as any; }; /** @@ -9051,12 +7841,9 @@ const de_DescribeEventsDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeEventsDetectionJobResponse => { - return { - EventsDetectionJobProperties: - output.EventsDetectionJobProperties != null - ? de_EventsDetectionJobProperties(output.EventsDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + EventsDetectionJobProperties: (_: any) => de_EventsDetectionJobProperties(_, context), + }) as any; }; /** @@ -9066,22 +7853,18 @@ const de_DescribeFlywheelIterationResponse = ( output: any, context: __SerdeContext ): DescribeFlywheelIterationResponse => { - return { - FlywheelIterationProperties: - output.FlywheelIterationProperties != null - ? de_FlywheelIterationProperties(output.FlywheelIterationProperties, context) - : undefined, - } as any; + return take(output, { + FlywheelIterationProperties: (_: any) => de_FlywheelIterationProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeFlywheelResponse */ const de_DescribeFlywheelResponse = (output: any, context: __SerdeContext): DescribeFlywheelResponse => { - return { - FlywheelProperties: - output.FlywheelProperties != null ? de_FlywheelProperties(output.FlywheelProperties, context) : undefined, - } as any; + return take(output, { + FlywheelProperties: (_: any) => de_FlywheelProperties(_, context), + }) as any; }; /** @@ -9091,12 +7874,9 @@ const de_DescribeKeyPhrasesDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeKeyPhrasesDetectionJobResponse => { - return { - KeyPhrasesDetectionJobProperties: - output.KeyPhrasesDetectionJobProperties != null - ? de_KeyPhrasesDetectionJobProperties(output.KeyPhrasesDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + KeyPhrasesDetectionJobProperties: (_: any) => de_KeyPhrasesDetectionJobProperties(_, context), + }) as any; }; /** @@ -9106,30 +7886,21 @@ const de_DescribePiiEntitiesDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribePiiEntitiesDetectionJobResponse => { - return { - PiiEntitiesDetectionJobProperties: - output.PiiEntitiesDetectionJobProperties != null - ? de_PiiEntitiesDetectionJobProperties(output.PiiEntitiesDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + PiiEntitiesDetectionJobProperties: (_: any) => de_PiiEntitiesDetectionJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeResourcePolicyResponse */ const de_DescribeResourcePolicyResponse = (output: any, context: __SerdeContext): DescribeResourcePolicyResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - PolicyRevisionId: __expectString(output.PolicyRevisionId), - ResourcePolicy: __expectString(output.ResourcePolicy), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyRevisionId: __expectString, + ResourcePolicy: __expectString, + }) as any; }; /** @@ -9139,12 +7910,9 @@ const de_DescribeSentimentDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeSentimentDetectionJobResponse => { - return { - SentimentDetectionJobProperties: - output.SentimentDetectionJobProperties != null - ? de_SentimentDetectionJobProperties(output.SentimentDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + SentimentDetectionJobProperties: (_: any) => de_SentimentDetectionJobProperties(_, context), + }) as any; }; /** @@ -9154,12 +7922,9 @@ const de_DescribeTargetedSentimentDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeTargetedSentimentDetectionJobResponse => { - return { - TargetedSentimentDetectionJobProperties: - output.TargetedSentimentDetectionJobProperties != null - ? de_TargetedSentimentDetectionJobProperties(output.TargetedSentimentDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + TargetedSentimentDetectionJobProperties: (_: any) => de_TargetedSentimentDetectionJobProperties(_, context), + }) as any; }; /** @@ -9169,103 +7934,91 @@ const de_DescribeTopicsDetectionJobResponse = ( output: any, context: __SerdeContext ): DescribeTopicsDetectionJobResponse => { - return { - TopicsDetectionJobProperties: - output.TopicsDetectionJobProperties != null - ? de_TopicsDetectionJobProperties(output.TopicsDetectionJobProperties, context) - : undefined, - } as any; + return take(output, { + TopicsDetectionJobProperties: (_: any) => de_TopicsDetectionJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectDominantLanguageResponse */ const de_DetectDominantLanguageResponse = (output: any, context: __SerdeContext): DetectDominantLanguageResponse => { - return { - Languages: output.Languages != null ? de_ListOfDominantLanguages(output.Languages, context) : undefined, - } as any; + return take(output, { + Languages: (_: any) => de_ListOfDominantLanguages(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectEntitiesResponse */ const de_DetectEntitiesResponse = (output: any, context: __SerdeContext): DetectEntitiesResponse => { - return { - Blocks: output.Blocks != null ? de_ListOfBlocks(output.Blocks, context) : undefined, - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - DocumentType: output.DocumentType != null ? de_ListOfDocumentType(output.DocumentType, context) : undefined, - Entities: output.Entities != null ? de_ListOfEntities(output.Entities, context) : undefined, - Errors: output.Errors != null ? de_ListOfErrors(output.Errors, context) : undefined, - } as any; + return take(output, { + Blocks: (_: any) => de_ListOfBlocks(_, context), + DocumentMetadata: _json, + DocumentType: _json, + Entities: (_: any) => de_ListOfEntities(_, context), + Errors: _json, + }) as any; }; /** * deserializeAws_json1_1DetectKeyPhrasesResponse */ const de_DetectKeyPhrasesResponse = (output: any, context: __SerdeContext): DetectKeyPhrasesResponse => { - return { - KeyPhrases: output.KeyPhrases != null ? de_ListOfKeyPhrases(output.KeyPhrases, context) : undefined, - } as any; + return take(output, { + KeyPhrases: (_: any) => de_ListOfKeyPhrases(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectPiiEntitiesResponse */ const de_DetectPiiEntitiesResponse = (output: any, context: __SerdeContext): DetectPiiEntitiesResponse => { - return { - Entities: output.Entities != null ? de_ListOfPiiEntities(output.Entities, context) : undefined, - } as any; + return take(output, { + Entities: (_: any) => de_ListOfPiiEntities(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectSentimentResponse */ const de_DetectSentimentResponse = (output: any, context: __SerdeContext): DetectSentimentResponse => { - return { - Sentiment: __expectString(output.Sentiment), - SentimentScore: output.SentimentScore != null ? de_SentimentScore(output.SentimentScore, context) : undefined, - } as any; + return take(output, { + Sentiment: __expectString, + SentimentScore: (_: any) => de_SentimentScore(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectSyntaxResponse */ const de_DetectSyntaxResponse = (output: any, context: __SerdeContext): DetectSyntaxResponse => { - return { - SyntaxTokens: output.SyntaxTokens != null ? de_ListOfSyntaxTokens(output.SyntaxTokens, context) : undefined, - } as any; + return take(output, { + SyntaxTokens: (_: any) => de_ListOfSyntaxTokens(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectTargetedSentimentResponse */ const de_DetectTargetedSentimentResponse = (output: any, context: __SerdeContext): DetectTargetedSentimentResponse => { - return { - Entities: output.Entities != null ? de_ListOfTargetedSentimentEntities(output.Entities, context) : undefined, - } as any; + return take(output, { + Entities: (_: any) => de_ListOfTargetedSentimentEntities(_, context), + }) as any; }; /** * deserializeAws_json1_1DocumentClass */ const de_DocumentClass = (output: any, context: __SerdeContext): DocumentClass => { - return { - Name: __expectString(output.Name), - Page: __expectInt32(output.Page), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Page: __expectInt32, + Score: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1DocumentClassificationConfig - */ -const de_DocumentClassificationConfig = (output: any, context: __SerdeContext): DocumentClassificationConfig => { - return { - Labels: output.Labels != null ? de_LabelsList(output.Labels, context) : undefined, - Mode: __expectString(output.Mode), - } as any; -}; +// de_DocumentClassificationConfig omitted. /** * deserializeAws_json1_1DocumentClassificationJobProperties @@ -9274,25 +8027,22 @@ const de_DocumentClassificationJobProperties = ( output: any, context: __SerdeContext ): DocumentClassificationJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DocumentClassifierArn: __expectString(output.DocumentClassifierArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FlywheelArn: __expectString(output.FlywheelArn), - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + DocumentClassifierArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FlywheelArn: __expectString, + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -9305,105 +8055,42 @@ const de_DocumentClassificationJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentClassificationJobProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DocumentClassifierAugmentedManifestsList - */ -const de_DocumentClassifierAugmentedManifestsList = ( - output: any, - context: __SerdeContext -): AugmentedManifestsListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AugmentedManifestsListItem(entry, context); - }); - return retVal; -}; +// de_DocumentClassifierAugmentedManifestsList omitted. -/** - * deserializeAws_json1_1DocumentClassifierInputDataConfig - */ -const de_DocumentClassifierInputDataConfig = ( - output: any, - context: __SerdeContext -): DocumentClassifierInputDataConfig => { - return { - AugmentedManifests: - output.AugmentedManifests != null - ? de_DocumentClassifierAugmentedManifestsList(output.AugmentedManifests, context) - : undefined, - DataFormat: __expectString(output.DataFormat), - LabelDelimiter: __expectString(output.LabelDelimiter), - S3Uri: __expectString(output.S3Uri), - TestS3Uri: __expectString(output.TestS3Uri), - } as any; -}; +// de_DocumentClassifierInputDataConfig omitted. -/** - * deserializeAws_json1_1DocumentClassifierOutputDataConfig - */ -const de_DocumentClassifierOutputDataConfig = ( - output: any, - context: __SerdeContext -): DocumentClassifierOutputDataConfig => { - return { - FlywheelStatsS3Prefix: __expectString(output.FlywheelStatsS3Prefix), - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_DocumentClassifierOutputDataConfig omitted. /** * deserializeAws_json1_1DocumentClassifierProperties */ const de_DocumentClassifierProperties = (output: any, context: __SerdeContext): DocumentClassifierProperties => { - return { - ClassifierMetadata: - output.ClassifierMetadata != null ? de_ClassifierMetadata(output.ClassifierMetadata, context) : undefined, - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DocumentClassifierArn: __expectString(output.DocumentClassifierArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FlywheelArn: __expectString(output.FlywheelArn), - InputDataConfig: - output.InputDataConfig != null - ? de_DocumentClassifierInputDataConfig(output.InputDataConfig, context) - : undefined, - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - Mode: __expectString(output.Mode), - ModelKmsKeyId: __expectString(output.ModelKmsKeyId), - OutputDataConfig: - output.OutputDataConfig != null - ? de_DocumentClassifierOutputDataConfig(output.OutputDataConfig, context) - : undefined, - SourceModelArn: __expectString(output.SourceModelArn), - Status: __expectString(output.Status), - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - TrainingEndTime: - output.TrainingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime))) - : undefined, - TrainingStartTime: - output.TrainingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime))) - : undefined, - VersionName: __expectString(output.VersionName), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + ClassifierMetadata: (_: any) => de_ClassifierMetadata(_, context), + DataAccessRoleArn: __expectString, + DocumentClassifierArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FlywheelArn: __expectString, + InputDataConfig: _json, + LanguageCode: __expectString, + Message: __expectString, + Mode: __expectString, + ModelKmsKeyId: __expectString, + OutputDataConfig: _json, + SourceModelArn: __expectString, + Status: __expectString, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionName: __expectString, + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -9413,9 +8100,6 @@ const de_DocumentClassifierPropertiesList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentClassifierProperties(entry, context); }); return retVal; @@ -9428,9 +8112,6 @@ const de_DocumentClassifierSummariesList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentClassifierSummary(entry, context); }); return retVal; @@ -9440,72 +8121,40 @@ const de_DocumentClassifierSummariesList = (output: any, context: __SerdeContext * deserializeAws_json1_1DocumentClassifierSummary */ const de_DocumentClassifierSummary = (output: any, context: __SerdeContext): DocumentClassifierSummary => { - return { - DocumentClassifierName: __expectString(output.DocumentClassifierName), - LatestVersionCreatedAt: - output.LatestVersionCreatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestVersionCreatedAt))) - : undefined, - LatestVersionName: __expectString(output.LatestVersionName), - LatestVersionStatus: __expectString(output.LatestVersionStatus), - NumberOfVersions: __expectInt32(output.NumberOfVersions), - } as any; + return take(output, { + DocumentClassifierName: __expectString, + LatestVersionCreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestVersionName: __expectString, + LatestVersionStatus: __expectString, + NumberOfVersions: __expectInt32, + }) as any; }; /** * deserializeAws_json1_1DocumentLabel */ const de_DocumentLabel = (output: any, context: __SerdeContext): DocumentLabel => { - return { - Name: __expectString(output.Name), - Page: __expectInt32(output.Page), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Page: __expectInt32, + Score: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1DocumentMetadata - */ -const de_DocumentMetadata = (output: any, context: __SerdeContext): DocumentMetadata => { - return { - ExtractedCharacters: - output.ExtractedCharacters != null - ? de_ListOfExtractedCharacters(output.ExtractedCharacters, context) - : undefined, - Pages: __expectInt32(output.Pages), - } as any; -}; +// de_DocumentMetadata omitted. -/** - * deserializeAws_json1_1DocumentReaderConfig - */ -const de_DocumentReaderConfig = (output: any, context: __SerdeContext): DocumentReaderConfig => { - return { - DocumentReadAction: __expectString(output.DocumentReadAction), - DocumentReadMode: __expectString(output.DocumentReadMode), - FeatureTypes: - output.FeatureTypes != null ? de_ListOfDocumentReadFeatureTypes(output.FeatureTypes, context) : undefined, - } as any; -}; +// de_DocumentReaderConfig omitted. -/** - * deserializeAws_json1_1DocumentTypeListItem - */ -const de_DocumentTypeListItem = (output: any, context: __SerdeContext): DocumentTypeListItem => { - return { - Page: __expectInt32(output.Page), - Type: __expectString(output.Type), - } as any; -}; +// de_DocumentTypeListItem omitted. /** * deserializeAws_json1_1DominantLanguage */ const de_DominantLanguage = (output: any, context: __SerdeContext): DominantLanguage => { - return { - LanguageCode: __expectString(output.LanguageCode), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + LanguageCode: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -9515,23 +8164,20 @@ const de_DominantLanguageDetectionJobProperties = ( output: any, context: __SerdeContext ): DominantLanguageDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -9544,9 +8190,6 @@ const de_DominantLanguageDetectionJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DominantLanguageDetectionJobProperties(entry, context); }); return retVal; @@ -9556,26 +8199,20 @@ const de_DominantLanguageDetectionJobPropertiesList = ( * deserializeAws_json1_1EndpointProperties */ const de_EndpointProperties = (output: any, context: __SerdeContext): EndpointProperties => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CurrentInferenceUnits: __expectInt32(output.CurrentInferenceUnits), - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DesiredDataAccessRoleArn: __expectString(output.DesiredDataAccessRoleArn), - DesiredInferenceUnits: __expectInt32(output.DesiredInferenceUnits), - DesiredModelArn: __expectString(output.DesiredModelArn), - EndpointArn: __expectString(output.EndpointArn), - FlywheelArn: __expectString(output.FlywheelArn), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Message: __expectString(output.Message), - ModelArn: __expectString(output.ModelArn), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentInferenceUnits: __expectInt32, + DataAccessRoleArn: __expectString, + DesiredDataAccessRoleArn: __expectString, + DesiredInferenceUnits: __expectInt32, + DesiredModelArn: __expectString, + EndpointArn: __expectString, + FlywheelArn: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + ModelArn: __expectString, + Status: __expectString, + }) as any; }; /** @@ -9585,9 +8222,6 @@ const de_EndpointPropertiesList = (output: any, context: __SerdeContext): Endpoi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EndpointProperties(entry, context); }); return retVal; @@ -9597,26 +8231,23 @@ const de_EndpointPropertiesList = (output: any, context: __SerdeContext): Endpoi * deserializeAws_json1_1EntitiesDetectionJobProperties */ const de_EntitiesDetectionJobProperties = (output: any, context: __SerdeContext): EntitiesDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - EntityRecognizerArn: __expectString(output.EntityRecognizerArn), - FlywheelArn: __expectString(output.FlywheelArn), - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EntityRecognizerArn: __expectString, + FlywheelArn: __expectString, + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + LanguageCode: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -9629,9 +8260,6 @@ const de_EntitiesDetectionJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntitiesDetectionJobProperties(entry, context); }); return retVal; @@ -9641,83 +8269,35 @@ const de_EntitiesDetectionJobPropertiesList = ( * deserializeAws_json1_1Entity */ const de_Entity = (output: any, context: __SerdeContext): Entity => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - BlockReferences: - output.BlockReferences != null ? de_ListOfBlockReferences(output.BlockReferences, context) : undefined, - EndOffset: __expectInt32(output.EndOffset), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + BlockReferences: _json, + EndOffset: __expectInt32, + Score: __limitedParseFloat32, + Text: __expectString, + Type: __expectString, + }) as any; }; /** * deserializeAws_json1_1EntityLabel */ const de_EntityLabel = (output: any, context: __SerdeContext): EntityLabel => { - return { - Name: __expectString(output.Name), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Score: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1EntityRecognitionConfig - */ -const de_EntityRecognitionConfig = (output: any, context: __SerdeContext): EntityRecognitionConfig => { - return { - EntityTypes: output.EntityTypes != null ? de_EntityTypesList(output.EntityTypes, context) : undefined, - } as any; -}; +// de_EntityRecognitionConfig omitted. -/** - * deserializeAws_json1_1EntityRecognizerAnnotations - */ -const de_EntityRecognizerAnnotations = (output: any, context: __SerdeContext): EntityRecognizerAnnotations => { - return { - S3Uri: __expectString(output.S3Uri), - TestS3Uri: __expectString(output.TestS3Uri), - } as any; -}; +// de_EntityRecognizerAnnotations omitted. -/** - * deserializeAws_json1_1EntityRecognizerAugmentedManifestsList - */ -const de_EntityRecognizerAugmentedManifestsList = ( - output: any, - context: __SerdeContext -): AugmentedManifestsListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AugmentedManifestsListItem(entry, context); - }); - return retVal; -}; +// de_EntityRecognizerAugmentedManifestsList omitted. -/** - * deserializeAws_json1_1EntityRecognizerDocuments - */ -const de_EntityRecognizerDocuments = (output: any, context: __SerdeContext): EntityRecognizerDocuments => { - return { - InputFormat: __expectString(output.InputFormat), - S3Uri: __expectString(output.S3Uri), - TestS3Uri: __expectString(output.TestS3Uri), - } as any; -}; +// de_EntityRecognizerDocuments omitted. -/** - * deserializeAws_json1_1EntityRecognizerEntityList - */ -const de_EntityRecognizerEntityList = (output: any, context: __SerdeContext): EntityRecognizerEntityList => { - return { - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_EntityRecognizerEntityList omitted. /** * deserializeAws_json1_1EntityRecognizerEvaluationMetrics @@ -9726,44 +8306,25 @@ const de_EntityRecognizerEvaluationMetrics = ( output: any, context: __SerdeContext ): EntityRecognizerEvaluationMetrics => { - return { - F1Score: __limitedParseDouble(output.F1Score), - Precision: __limitedParseDouble(output.Precision), - Recall: __limitedParseDouble(output.Recall), - } as any; + return take(output, { + F1Score: __limitedParseDouble, + Precision: __limitedParseDouble, + Recall: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1EntityRecognizerInputDataConfig - */ -const de_EntityRecognizerInputDataConfig = (output: any, context: __SerdeContext): EntityRecognizerInputDataConfig => { - return { - Annotations: output.Annotations != null ? de_EntityRecognizerAnnotations(output.Annotations, context) : undefined, - AugmentedManifests: - output.AugmentedManifests != null - ? de_EntityRecognizerAugmentedManifestsList(output.AugmentedManifests, context) - : undefined, - DataFormat: __expectString(output.DataFormat), - Documents: output.Documents != null ? de_EntityRecognizerDocuments(output.Documents, context) : undefined, - EntityList: output.EntityList != null ? de_EntityRecognizerEntityList(output.EntityList, context) : undefined, - EntityTypes: output.EntityTypes != null ? de_EntityTypesList(output.EntityTypes, context) : undefined, - } as any; -}; +// de_EntityRecognizerInputDataConfig omitted. /** * deserializeAws_json1_1EntityRecognizerMetadata */ const de_EntityRecognizerMetadata = (output: any, context: __SerdeContext): EntityRecognizerMetadata => { - return { - EntityTypes: - output.EntityTypes != null ? de_EntityRecognizerMetadataEntityTypesList(output.EntityTypes, context) : undefined, - EvaluationMetrics: - output.EvaluationMetrics != null - ? de_EntityRecognizerEvaluationMetrics(output.EvaluationMetrics, context) - : undefined, - NumberOfTestDocuments: __expectInt32(output.NumberOfTestDocuments), - NumberOfTrainedDocuments: __expectInt32(output.NumberOfTrainedDocuments), - } as any; + return take(output, { + EntityTypes: (_: any) => de_EntityRecognizerMetadataEntityTypesList(_, context), + EvaluationMetrics: (_: any) => de_EntityRecognizerEvaluationMetrics(_, context), + NumberOfTestDocuments: __expectInt32, + NumberOfTrainedDocuments: __expectInt32, + }) as any; }; /** @@ -9776,9 +8337,6 @@ const de_EntityRecognizerMetadataEntityTypesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntityRecognizerMetadataEntityTypesListItem(entry, context); }); return retVal; @@ -9791,63 +8349,39 @@ const de_EntityRecognizerMetadataEntityTypesListItem = ( output: any, context: __SerdeContext ): EntityRecognizerMetadataEntityTypesListItem => { - return { - EvaluationMetrics: - output.EvaluationMetrics != null ? de_EntityTypesEvaluationMetrics(output.EvaluationMetrics, context) : undefined, - NumberOfTrainMentions: __expectInt32(output.NumberOfTrainMentions), - Type: __expectString(output.Type), - } as any; + return take(output, { + EvaluationMetrics: (_: any) => de_EntityTypesEvaluationMetrics(_, context), + NumberOfTrainMentions: __expectInt32, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1EntityRecognizerOutputDataConfig - */ -const de_EntityRecognizerOutputDataConfig = ( - output: any, - context: __SerdeContext -): EntityRecognizerOutputDataConfig => { - return { - FlywheelStatsS3Prefix: __expectString(output.FlywheelStatsS3Prefix), - } as any; -}; +// de_EntityRecognizerOutputDataConfig omitted. /** * deserializeAws_json1_1EntityRecognizerProperties */ const de_EntityRecognizerProperties = (output: any, context: __SerdeContext): EntityRecognizerProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - EntityRecognizerArn: __expectString(output.EntityRecognizerArn), - FlywheelArn: __expectString(output.FlywheelArn), - InputDataConfig: - output.InputDataConfig != null ? de_EntityRecognizerInputDataConfig(output.InputDataConfig, context) : undefined, - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - ModelKmsKeyId: __expectString(output.ModelKmsKeyId), - OutputDataConfig: - output.OutputDataConfig != null - ? de_EntityRecognizerOutputDataConfig(output.OutputDataConfig, context) - : undefined, - RecognizerMetadata: - output.RecognizerMetadata != null ? de_EntityRecognizerMetadata(output.RecognizerMetadata, context) : undefined, - SourceModelArn: __expectString(output.SourceModelArn), - Status: __expectString(output.Status), - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - TrainingEndTime: - output.TrainingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime))) - : undefined, - TrainingStartTime: - output.TrainingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime))) - : undefined, - VersionName: __expectString(output.VersionName), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EntityRecognizerArn: __expectString, + FlywheelArn: __expectString, + InputDataConfig: _json, + LanguageCode: __expectString, + Message: __expectString, + ModelKmsKeyId: __expectString, + OutputDataConfig: _json, + RecognizerMetadata: (_: any) => de_EntityRecognizerMetadata(_, context), + SourceModelArn: __expectString, + Status: __expectString, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionName: __expectString, + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -9857,9 +8391,6 @@ const de_EntityRecognizerPropertiesList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntityRecognizerProperties(entry, context); }); return retVal; @@ -9872,9 +8403,6 @@ const de_EntityRecognizerSummariesList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntityRecognizerSummary(entry, context); }); return retVal; @@ -9884,86 +8412,50 @@ const de_EntityRecognizerSummariesList = (output: any, context: __SerdeContext): * deserializeAws_json1_1EntityRecognizerSummary */ const de_EntityRecognizerSummary = (output: any, context: __SerdeContext): EntityRecognizerSummary => { - return { - LatestVersionCreatedAt: - output.LatestVersionCreatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestVersionCreatedAt))) - : undefined, - LatestVersionName: __expectString(output.LatestVersionName), - LatestVersionStatus: __expectString(output.LatestVersionStatus), - NumberOfVersions: __expectInt32(output.NumberOfVersions), - RecognizerName: __expectString(output.RecognizerName), - } as any; + return take(output, { + LatestVersionCreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestVersionName: __expectString, + LatestVersionStatus: __expectString, + NumberOfVersions: __expectInt32, + RecognizerName: __expectString, + }) as any; }; /** * deserializeAws_json1_1EntityTypesEvaluationMetrics */ const de_EntityTypesEvaluationMetrics = (output: any, context: __SerdeContext): EntityTypesEvaluationMetrics => { - return { - F1Score: __limitedParseDouble(output.F1Score), - Precision: __limitedParseDouble(output.Precision), - Recall: __limitedParseDouble(output.Recall), - } as any; + return take(output, { + F1Score: __limitedParseDouble, + Precision: __limitedParseDouble, + Recall: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1EntityTypesList - */ -const de_EntityTypesList = (output: any, context: __SerdeContext): EntityTypesListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntityTypesListItem(entry, context); - }); - return retVal; -}; +// de_EntityTypesList omitted. -/** - * deserializeAws_json1_1EntityTypesListItem - */ -const de_EntityTypesListItem = (output: any, context: __SerdeContext): EntityTypesListItem => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_EntityTypesListItem omitted. -/** - * deserializeAws_json1_1ErrorsListItem - */ -const de_ErrorsListItem = (output: any, context: __SerdeContext): ErrorsListItem => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Page: __expectInt32(output.Page), - } as any; -}; +// de_ErrorsListItem omitted. /** * deserializeAws_json1_1EventsDetectionJobProperties */ const de_EventsDetectionJobProperties = (output: any, context: __SerdeContext): EventsDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - TargetEventTypes: - output.TargetEventTypes != null ? de_TargetEventTypes(output.TargetEventTypes, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + LanguageCode: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TargetEventTypes: _json, + }) as any; }; /** @@ -9973,51 +8465,30 @@ const de_EventsDetectionJobPropertiesList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventsDetectionJobProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ExtractedCharactersListItem - */ -const de_ExtractedCharactersListItem = (output: any, context: __SerdeContext): ExtractedCharactersListItem => { - return { - Count: __expectInt32(output.Count), - Page: __expectInt32(output.Page), - } as any; -}; +// de_ExtractedCharactersListItem omitted. /** * deserializeAws_json1_1FlywheelIterationProperties */ const de_FlywheelIterationProperties = (output: any, context: __SerdeContext): FlywheelIterationProperties => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - EvaluatedModelArn: __expectString(output.EvaluatedModelArn), - EvaluatedModelMetrics: - output.EvaluatedModelMetrics != null - ? de_FlywheelModelEvaluationMetrics(output.EvaluatedModelMetrics, context) - : undefined, - EvaluationManifestS3Prefix: __expectString(output.EvaluationManifestS3Prefix), - FlywheelArn: __expectString(output.FlywheelArn), - FlywheelIterationId: __expectString(output.FlywheelIterationId), - Message: __expectString(output.Message), - Status: __expectString(output.Status), - TrainedModelArn: __expectString(output.TrainedModelArn), - TrainedModelMetrics: - output.TrainedModelMetrics != null - ? de_FlywheelModelEvaluationMetrics(output.TrainedModelMetrics, context) - : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluatedModelArn: __expectString, + EvaluatedModelMetrics: (_: any) => de_FlywheelModelEvaluationMetrics(_, context), + EvaluationManifestS3Prefix: __expectString, + FlywheelArn: __expectString, + FlywheelIterationId: __expectString, + Message: __expectString, + Status: __expectString, + TrainedModelArn: __expectString, + TrainedModelMetrics: (_: any) => de_FlywheelModelEvaluationMetrics(_, context), + }) as any; }; /** @@ -10027,9 +8498,6 @@ const de_FlywheelIterationPropertiesList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FlywheelIterationProperties(entry, context); }); return retVal; @@ -10039,62 +8507,49 @@ const de_FlywheelIterationPropertiesList = (output: any, context: __SerdeContext * deserializeAws_json1_1FlywheelModelEvaluationMetrics */ const de_FlywheelModelEvaluationMetrics = (output: any, context: __SerdeContext): FlywheelModelEvaluationMetrics => { - return { - AverageAccuracy: __limitedParseDouble(output.AverageAccuracy), - AverageF1Score: __limitedParseDouble(output.AverageF1Score), - AveragePrecision: __limitedParseDouble(output.AveragePrecision), - AverageRecall: __limitedParseDouble(output.AverageRecall), - } as any; + return take(output, { + AverageAccuracy: __limitedParseDouble, + AverageF1Score: __limitedParseDouble, + AveragePrecision: __limitedParseDouble, + AverageRecall: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1FlywheelProperties */ const de_FlywheelProperties = (output: any, context: __SerdeContext): FlywheelProperties => { - return { - ActiveModelArn: __expectString(output.ActiveModelArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DataLakeS3Uri: __expectString(output.DataLakeS3Uri), - DataSecurityConfig: - output.DataSecurityConfig != null ? de_DataSecurityConfig(output.DataSecurityConfig, context) : undefined, - FlywheelArn: __expectString(output.FlywheelArn), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LatestFlywheelIteration: __expectString(output.LatestFlywheelIteration), - Message: __expectString(output.Message), - ModelType: __expectString(output.ModelType), - Status: __expectString(output.Status), - TaskConfig: output.TaskConfig != null ? de_TaskConfig(output.TaskConfig, context) : undefined, - } as any; + return take(output, { + ActiveModelArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataAccessRoleArn: __expectString, + DataLakeS3Uri: __expectString, + DataSecurityConfig: _json, + FlywheelArn: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestFlywheelIteration: __expectString, + Message: __expectString, + ModelType: __expectString, + Status: __expectString, + TaskConfig: _json, + }) as any; }; /** * deserializeAws_json1_1FlywheelSummary */ const de_FlywheelSummary = (output: any, context: __SerdeContext): FlywheelSummary => { - return { - ActiveModelArn: __expectString(output.ActiveModelArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataLakeS3Uri: __expectString(output.DataLakeS3Uri), - FlywheelArn: __expectString(output.FlywheelArn), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LatestFlywheelIteration: __expectString(output.LatestFlywheelIteration), - Message: __expectString(output.Message), - ModelType: __expectString(output.ModelType), - Status: __expectString(output.Status), - } as any; + return take(output, { + ActiveModelArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataLakeS3Uri: __expectString, + FlywheelArn: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestFlywheelIteration: __expectString, + Message: __expectString, + ModelType: __expectString, + Status: __expectString, + }) as any; }; /** @@ -10104,9 +8559,6 @@ const de_FlywheelSummaryList = (output: any, context: __SerdeContext): FlywheelS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FlywheelSummary(entry, context); }); return retVal; @@ -10116,90 +8568,36 @@ const de_FlywheelSummaryList = (output: any, context: __SerdeContext): FlywheelS * deserializeAws_json1_1Geometry */ const de_Geometry = (output: any, context: __SerdeContext): Geometry => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Polygon: output.Polygon != null ? de_Polygon(output.Polygon, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Polygon: (_: any) => de_Polygon(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ImportModelResponse - */ -const de_ImportModelResponse = (output: any, context: __SerdeContext): ImportModelResponse => { - return { - ModelArn: __expectString(output.ModelArn), - } as any; -}; +// de_ImportModelResponse omitted. -/** - * deserializeAws_json1_1InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - return { - DocumentReaderConfig: - output.DocumentReaderConfig != null ? de_DocumentReaderConfig(output.DocumentReaderConfig, context) : undefined, - InputFormat: __expectString(output.InputFormat), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1InvalidFilterException - */ -const de_InvalidFilterException = (output: any, context: __SerdeContext): InvalidFilterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidFilterException omitted. -/** - * deserializeAws_json1_1InvalidRequestDetail - */ -const de_InvalidRequestDetail = (output: any, context: __SerdeContext): InvalidRequestDetail => { - return { - Reason: __expectString(output.Reason), - } as any; -}; +// de_InvalidRequestDetail omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Detail: output.Detail != null ? de_InvalidRequestDetail(output.Detail, context) : undefined, - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1JobNotFoundException - */ -const de_JobNotFoundException = (output: any, context: __SerdeContext): JobNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_JobNotFoundException omitted. /** * deserializeAws_json1_1KeyPhrase */ const de_KeyPhrase = (output: any, context: __SerdeContext): KeyPhrase => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - } as any; + return take(output, { + BeginOffset: __expectInt32, + EndOffset: __expectInt32, + Score: __limitedParseFloat32, + Text: __expectString, + }) as any; }; /** @@ -10209,24 +8607,21 @@ const de_KeyPhrasesDetectionJobProperties = ( output: any, context: __SerdeContext ): KeyPhrasesDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + LanguageCode: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -10239,49 +8634,23 @@ const de_KeyPhrasesDetectionJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_KeyPhrasesDetectionJobProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1KmsKeyValidationException - */ -const de_KmsKeyValidationException = (output: any, context: __SerdeContext): KmsKeyValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_KmsKeyValidationException omitted. -/** - * deserializeAws_json1_1LabelsList - */ -const de_LabelsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LabelsList omitted. /** * deserializeAws_json1_1ListDatasetsResponse */ const de_ListDatasetsResponse = (output: any, context: __SerdeContext): ListDatasetsResponse => { - return { - DatasetPropertiesList: - output.DatasetPropertiesList != null - ? de_DatasetPropertiesList(output.DatasetPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DatasetPropertiesList: (_: any) => de_DatasetPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10291,26 +8660,20 @@ const de_ListDocumentClassificationJobsResponse = ( output: any, context: __SerdeContext ): ListDocumentClassificationJobsResponse => { - return { - DocumentClassificationJobPropertiesList: - output.DocumentClassificationJobPropertiesList != null - ? de_DocumentClassificationJobPropertiesList(output.DocumentClassificationJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DocumentClassificationJobPropertiesList: (_: any) => de_DocumentClassificationJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDocumentClassifiersResponse */ const de_ListDocumentClassifiersResponse = (output: any, context: __SerdeContext): ListDocumentClassifiersResponse => { - return { - DocumentClassifierPropertiesList: - output.DocumentClassifierPropertiesList != null - ? de_DocumentClassifierPropertiesList(output.DocumentClassifierPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DocumentClassifierPropertiesList: (_: any) => de_DocumentClassifierPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10320,13 +8683,10 @@ const de_ListDocumentClassifierSummariesResponse = ( output: any, context: __SerdeContext ): ListDocumentClassifierSummariesResponse => { - return { - DocumentClassifierSummariesList: - output.DocumentClassifierSummariesList != null - ? de_DocumentClassifierSummariesList(output.DocumentClassifierSummariesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DocumentClassifierSummariesList: (_: any) => de_DocumentClassifierSummariesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10336,26 +8696,20 @@ const de_ListDominantLanguageDetectionJobsResponse = ( output: any, context: __SerdeContext ): ListDominantLanguageDetectionJobsResponse => { - return { - DominantLanguageDetectionJobPropertiesList: - output.DominantLanguageDetectionJobPropertiesList != null - ? de_DominantLanguageDetectionJobPropertiesList(output.DominantLanguageDetectionJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DominantLanguageDetectionJobPropertiesList: (_: any) => de_DominantLanguageDetectionJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListEndpointsResponse */ const de_ListEndpointsResponse = (output: any, context: __SerdeContext): ListEndpointsResponse => { - return { - EndpointPropertiesList: - output.EndpointPropertiesList != null - ? de_EndpointPropertiesList(output.EndpointPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + EndpointPropertiesList: (_: any) => de_EndpointPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10365,26 +8719,20 @@ const de_ListEntitiesDetectionJobsResponse = ( output: any, context: __SerdeContext ): ListEntitiesDetectionJobsResponse => { - return { - EntitiesDetectionJobPropertiesList: - output.EntitiesDetectionJobPropertiesList != null - ? de_EntitiesDetectionJobPropertiesList(output.EntitiesDetectionJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + EntitiesDetectionJobPropertiesList: (_: any) => de_EntitiesDetectionJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListEntityRecognizersResponse */ const de_ListEntityRecognizersResponse = (output: any, context: __SerdeContext): ListEntityRecognizersResponse => { - return { - EntityRecognizerPropertiesList: - output.EntityRecognizerPropertiesList != null - ? de_EntityRecognizerPropertiesList(output.EntityRecognizerPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + EntityRecognizerPropertiesList: (_: any) => de_EntityRecognizerPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10394,26 +8742,20 @@ const de_ListEntityRecognizerSummariesResponse = ( output: any, context: __SerdeContext ): ListEntityRecognizerSummariesResponse => { - return { - EntityRecognizerSummariesList: - output.EntityRecognizerSummariesList != null - ? de_EntityRecognizerSummariesList(output.EntityRecognizerSummariesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + EntityRecognizerSummariesList: (_: any) => de_EntityRecognizerSummariesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListEventsDetectionJobsResponse */ const de_ListEventsDetectionJobsResponse = (output: any, context: __SerdeContext): ListEventsDetectionJobsResponse => { - return { - EventsDetectionJobPropertiesList: - output.EventsDetectionJobPropertiesList != null - ? de_EventsDetectionJobPropertiesList(output.EventsDetectionJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + EventsDetectionJobPropertiesList: (_: any) => de_EventsDetectionJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10423,24 +8765,20 @@ const de_ListFlywheelIterationHistoryResponse = ( output: any, context: __SerdeContext ): ListFlywheelIterationHistoryResponse => { - return { - FlywheelIterationPropertiesList: - output.FlywheelIterationPropertiesList != null - ? de_FlywheelIterationPropertiesList(output.FlywheelIterationPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + FlywheelIterationPropertiesList: (_: any) => de_FlywheelIterationPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListFlywheelsResponse */ const de_ListFlywheelsResponse = (output: any, context: __SerdeContext): ListFlywheelsResponse => { - return { - FlywheelSummaryList: - output.FlywheelSummaryList != null ? de_FlywheelSummaryList(output.FlywheelSummaryList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + FlywheelSummaryList: (_: any) => de_FlywheelSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10450,29 +8788,13 @@ const de_ListKeyPhrasesDetectionJobsResponse = ( output: any, context: __SerdeContext ): ListKeyPhrasesDetectionJobsResponse => { - return { - KeyPhrasesDetectionJobPropertiesList: - output.KeyPhrasesDetectionJobPropertiesList != null - ? de_KeyPhrasesDetectionJobPropertiesList(output.KeyPhrasesDetectionJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + KeyPhrasesDetectionJobPropertiesList: (_: any) => de_KeyPhrasesDetectionJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListOfBlockReferences - */ -const de_ListOfBlockReferences = (output: any, context: __SerdeContext): BlockReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BlockReference(entry, context); - }); - return retVal; -}; +// de_ListOfBlockReferences omitted. /** * deserializeAws_json1_1ListOfBlocks @@ -10481,28 +8803,12 @@ const de_ListOfBlocks = (output: any, context: __SerdeContext): Block[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Block(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListOfChildBlocks - */ -const de_ListOfChildBlocks = (output: any, context: __SerdeContext): ChildBlock[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChildBlock(entry, context); - }); - return retVal; -}; +// de_ListOfChildBlocks omitted. /** * deserializeAws_json1_1ListOfClasses @@ -10511,28 +8817,12 @@ const de_ListOfClasses = (output: any, context: __SerdeContext): DocumentClass[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentClass(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListOfDescriptiveMentionIndices - */ -const de_ListOfDescriptiveMentionIndices = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_ListOfDescriptiveMentionIndices omitted. /** * deserializeAws_json1_1ListOfDetectDominantLanguageResult @@ -10544,9 +8834,6 @@ const de_ListOfDetectDominantLanguageResult = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchDetectDominantLanguageItemResult(entry, context); }); return retVal; @@ -10559,9 +8846,6 @@ const de_ListOfDetectEntitiesResult = (output: any, context: __SerdeContext): Ba const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchDetectEntitiesItemResult(entry, context); }); return retVal; @@ -10574,9 +8858,6 @@ const de_ListOfDetectKeyPhrasesResult = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchDetectKeyPhrasesItemResult(entry, context); }); return retVal; @@ -10589,9 +8870,6 @@ const de_ListOfDetectSentimentResult = (output: any, context: __SerdeContext): B const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchDetectSentimentItemResult(entry, context); }); return retVal; @@ -10604,9 +8882,6 @@ const de_ListOfDetectSyntaxResult = (output: any, context: __SerdeContext): Batc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchDetectSyntaxItemResult(entry, context); }); return retVal; @@ -10622,46 +8897,14 @@ const de_ListOfDetectTargetedSentimentResult = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchDetectTargetedSentimentItemResult(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListOfDocumentReadFeatureTypes - */ -const de_ListOfDocumentReadFeatureTypes = ( - output: any, - context: __SerdeContext -): (DocumentReadFeatureTypes | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfDocumentReadFeatureTypes omitted. -/** - * deserializeAws_json1_1ListOfDocumentType - */ -const de_ListOfDocumentType = (output: any, context: __SerdeContext): DocumentTypeListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentTypeListItem(entry, context); - }); - return retVal; -}; +// de_ListOfDocumentType omitted. /** * deserializeAws_json1_1ListOfDominantLanguages @@ -10670,9 +8913,6 @@ const de_ListOfDominantLanguages = (output: any, context: __SerdeContext): Domin const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DominantLanguage(entry, context); }); return retVal; @@ -10685,9 +8925,6 @@ const de_ListOfEntities = (output: any, context: __SerdeContext): Entity[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Entity(entry, context); }); return retVal; @@ -10700,43 +8937,14 @@ const de_ListOfEntityLabels = (output: any, context: __SerdeContext): EntityLabe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntityLabel(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListOfErrors - */ -const de_ListOfErrors = (output: any, context: __SerdeContext): ErrorsListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorsListItem(entry, context); - }); - return retVal; -}; +// de_ListOfErrors omitted. -/** - * deserializeAws_json1_1ListOfExtractedCharacters - */ -const de_ListOfExtractedCharacters = (output: any, context: __SerdeContext): ExtractedCharactersListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtractedCharactersListItem(entry, context); - }); - return retVal; -}; +// de_ListOfExtractedCharacters omitted. /** * deserializeAws_json1_1ListOfKeyPhrases @@ -10745,89 +8953,51 @@ const de_ListOfKeyPhrases = (output: any, context: __SerdeContext): KeyPhrase[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_KeyPhrase(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ListOfLabels - */ -const de_ListOfLabels = (output: any, context: __SerdeContext): DocumentLabel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentLabel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListOfMentions - */ -const de_ListOfMentions = (output: any, context: __SerdeContext): TargetedSentimentMention[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetedSentimentMention(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListOfPiiEntities + * deserializeAws_json1_1ListOfLabels */ -const de_ListOfPiiEntities = (output: any, context: __SerdeContext): PiiEntity[] => { +const de_ListOfLabels = (output: any, context: __SerdeContext): DocumentLabel[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PiiEntity(entry, context); + return de_DocumentLabel(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ListOfPiiEntityTypes + * deserializeAws_json1_1ListOfMentions */ -const de_ListOfPiiEntityTypes = (output: any, context: __SerdeContext): (PiiEntityType | string)[] => { +const de_ListOfMentions = (output: any, context: __SerdeContext): TargetedSentimentMention[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_TargetedSentimentMention(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ListOfRelationships + * deserializeAws_json1_1ListOfPiiEntities */ -const de_ListOfRelationships = (output: any, context: __SerdeContext): RelationshipsListItem[] => { +const de_ListOfPiiEntities = (output: any, context: __SerdeContext): PiiEntity[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelationshipsListItem(entry, context); + return de_PiiEntity(entry, context); }); return retVal; }; +// de_ListOfPiiEntityTypes omitted. + +// de_ListOfRelationships omitted. + /** * deserializeAws_json1_1ListOfSyntaxTokens */ @@ -10835,9 +9005,6 @@ const de_ListOfSyntaxTokens = (output: any, context: __SerdeContext): SyntaxToke const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SyntaxToken(entry, context); }); return retVal; @@ -10850,9 +9017,6 @@ const de_ListOfTargetedSentimentEntities = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TargetedSentimentEntity(entry, context); }); return retVal; @@ -10865,13 +9029,10 @@ const de_ListPiiEntitiesDetectionJobsResponse = ( output: any, context: __SerdeContext ): ListPiiEntitiesDetectionJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - PiiEntitiesDetectionJobPropertiesList: - output.PiiEntitiesDetectionJobPropertiesList != null - ? de_PiiEntitiesDetectionJobPropertiesList(output.PiiEntitiesDetectionJobPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PiiEntitiesDetectionJobPropertiesList: (_: any) => de_PiiEntitiesDetectionJobPropertiesList(_, context), + }) as any; }; /** @@ -10881,24 +9042,13 @@ const de_ListSentimentDetectionJobsResponse = ( output: any, context: __SerdeContext ): ListSentimentDetectionJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - SentimentDetectionJobPropertiesList: - output.SentimentDetectionJobPropertiesList != null - ? de_SentimentDetectionJobPropertiesList(output.SentimentDetectionJobPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SentimentDetectionJobPropertiesList: (_: any) => de_SentimentDetectionJobPropertiesList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - ResourceArn: __expectString(output.ResourceArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListTargetedSentimentDetectionJobsResponse @@ -10907,56 +9057,42 @@ const de_ListTargetedSentimentDetectionJobsResponse = ( output: any, context: __SerdeContext ): ListTargetedSentimentDetectionJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - TargetedSentimentDetectionJobPropertiesList: - output.TargetedSentimentDetectionJobPropertiesList != null - ? de_TargetedSentimentDetectionJobPropertiesList(output.TargetedSentimentDetectionJobPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + TargetedSentimentDetectionJobPropertiesList: (_: any) => de_TargetedSentimentDetectionJobPropertiesList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListTopicsDetectionJobsResponse */ const de_ListTopicsDetectionJobsResponse = (output: any, context: __SerdeContext): ListTopicsDetectionJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - TopicsDetectionJobPropertiesList: - output.TopicsDetectionJobPropertiesList != null - ? de_TopicsDetectionJobPropertiesList(output.TopicsDetectionJobPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + TopicsDetectionJobPropertiesList: (_: any) => de_TopicsDetectionJobPropertiesList(_, context), + }) as any; }; /** * deserializeAws_json1_1MentionSentiment */ const de_MentionSentiment = (output: any, context: __SerdeContext): MentionSentiment => { - return { - Sentiment: __expectString(output.Sentiment), - SentimentScore: output.SentimentScore != null ? de_SentimentScore(output.SentimentScore, context) : undefined, - } as any; + return take(output, { + Sentiment: __expectString, + SentimentScore: (_: any) => de_SentimentScore(_, context), + }) as any; }; -/** - * deserializeAws_json1_1OutputDataConfig - */ -const de_OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_OutputDataConfig omitted. /** * deserializeAws_json1_1PartOfSpeechTag */ const de_PartOfSpeechTag = (output: any, context: __SerdeContext): PartOfSpeechTag => { - return { - Score: __limitedParseFloat32(output.Score), - Tag: __expectString(output.Tag), - } as any; + return take(output, { + Score: __limitedParseFloat32, + Tag: __expectString, + }) as any; }; /** @@ -10966,24 +9102,21 @@ const de_PiiEntitiesDetectionJobProperties = ( output: any, context: __SerdeContext ): PiiEntitiesDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - Mode: __expectString(output.Mode), - OutputDataConfig: - output.OutputDataConfig != null ? de_PiiOutputDataConfig(output.OutputDataConfig, context) : undefined, - RedactionConfig: output.RedactionConfig != null ? de_RedactionConfig(output.RedactionConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + LanguageCode: __expectString, + Message: __expectString, + Mode: __expectString, + OutputDataConfig: _json, + RedactionConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -10996,9 +9129,6 @@ const de_PiiEntitiesDetectionJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PiiEntitiesDetectionJobProperties(entry, context); }); return retVal; @@ -11008,32 +9138,24 @@ const de_PiiEntitiesDetectionJobPropertiesList = ( * deserializeAws_json1_1PiiEntity */ const de_PiiEntity = (output: any, context: __SerdeContext): PiiEntity => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - Score: __limitedParseFloat32(output.Score), - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + EndOffset: __expectInt32, + Score: __limitedParseFloat32, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PiiOutputDataConfig - */ -const de_PiiOutputDataConfig = (output: any, context: __SerdeContext): PiiOutputDataConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_PiiOutputDataConfig omitted. /** * deserializeAws_json1_1Point */ const de_Point = (output: any, context: __SerdeContext): Point => { - return { - X: __limitedParseFloat32(output.X), - Y: __limitedParseFloat32(output.Y), - } as any; + return take(output, { + X: __limitedParseFloat32, + Y: __limitedParseFloat32, + }) as any; }; /** @@ -11043,117 +9165,46 @@ const de_Polygon = (output: any, context: __SerdeContext): Point[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Point(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - PolicyRevisionId: __expectString(output.PolicyRevisionId), - } as any; -}; +// de_PutResourcePolicyResponse omitted. -/** - * deserializeAws_json1_1RedactionConfig - */ -const de_RedactionConfig = (output: any, context: __SerdeContext): RedactionConfig => { - return { - MaskCharacter: __expectString(output.MaskCharacter), - MaskMode: __expectString(output.MaskMode), - PiiEntityTypes: output.PiiEntityTypes != null ? de_ListOfPiiEntityTypes(output.PiiEntityTypes, context) : undefined, - } as any; -}; +// de_RedactionConfig omitted. -/** - * deserializeAws_json1_1RelationshipsListItem - */ -const de_RelationshipsListItem = (output: any, context: __SerdeContext): RelationshipsListItem => { - return { - Ids: output.Ids != null ? de_StringList(output.Ids, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_RelationshipsListItem omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceLimitExceededException - */ -const de_ResourceLimitExceededException = (output: any, context: __SerdeContext): ResourceLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceLimitExceededException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceUnavailableException omitted. -/** - * deserializeAws_json1_1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. /** * deserializeAws_json1_1SentimentDetectionJobProperties */ const de_SentimentDetectionJobProperties = (output: any, context: __SerdeContext): SentimentDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + LanguageCode: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -11166,9 +9217,6 @@ const de_SentimentDetectionJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SentimentDetectionJobProperties(entry, context); }); return retVal; @@ -11178,328 +9226,74 @@ const de_SentimentDetectionJobPropertiesList = ( * deserializeAws_json1_1SentimentScore */ const de_SentimentScore = (output: any, context: __SerdeContext): SentimentScore => { - return { - Mixed: __limitedParseFloat32(output.Mixed), - Negative: __limitedParseFloat32(output.Negative), - Neutral: __limitedParseFloat32(output.Neutral), - Positive: __limitedParseFloat32(output.Positive), - } as any; + return take(output, { + Mixed: __limitedParseFloat32, + Negative: __limitedParseFloat32, + Neutral: __limitedParseFloat32, + Positive: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1StartDocumentClassificationJobResponse - */ -const de_StartDocumentClassificationJobResponse = ( - output: any, - context: __SerdeContext -): StartDocumentClassificationJobResponse => { - return { - DocumentClassifierArn: __expectString(output.DocumentClassifierArn), - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartDocumentClassificationJobResponse omitted. -/** - * deserializeAws_json1_1StartDominantLanguageDetectionJobResponse - */ -const de_StartDominantLanguageDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StartDominantLanguageDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartDominantLanguageDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartEntitiesDetectionJobResponse - */ -const de_StartEntitiesDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StartEntitiesDetectionJobResponse => { - return { - EntityRecognizerArn: __expectString(output.EntityRecognizerArn), - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartEntitiesDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartEventsDetectionJobResponse - */ -const de_StartEventsDetectionJobResponse = (output: any, context: __SerdeContext): StartEventsDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartEventsDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartFlywheelIterationResponse - */ -const de_StartFlywheelIterationResponse = (output: any, context: __SerdeContext): StartFlywheelIterationResponse => { - return { - FlywheelArn: __expectString(output.FlywheelArn), - FlywheelIterationId: __expectString(output.FlywheelIterationId), - } as any; -}; +// de_StartFlywheelIterationResponse omitted. -/** - * deserializeAws_json1_1StartKeyPhrasesDetectionJobResponse - */ -const de_StartKeyPhrasesDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StartKeyPhrasesDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartKeyPhrasesDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartPiiEntitiesDetectionJobResponse - */ -const de_StartPiiEntitiesDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StartPiiEntitiesDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartPiiEntitiesDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartSentimentDetectionJobResponse - */ -const de_StartSentimentDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StartSentimentDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartSentimentDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartTargetedSentimentDetectionJobResponse - */ -const de_StartTargetedSentimentDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StartTargetedSentimentDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartTargetedSentimentDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartTopicsDetectionJobResponse - */ -const de_StartTopicsDetectionJobResponse = (output: any, context: __SerdeContext): StartTopicsDetectionJobResponse => { - return { - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartTopicsDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopDominantLanguageDetectionJobResponse - */ -const de_StopDominantLanguageDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StopDominantLanguageDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopDominantLanguageDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopEntitiesDetectionJobResponse - */ -const de_StopEntitiesDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StopEntitiesDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopEntitiesDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopEventsDetectionJobResponse - */ -const de_StopEventsDetectionJobResponse = (output: any, context: __SerdeContext): StopEventsDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopEventsDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopKeyPhrasesDetectionJobResponse - */ -const de_StopKeyPhrasesDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StopKeyPhrasesDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopKeyPhrasesDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopPiiEntitiesDetectionJobResponse - */ -const de_StopPiiEntitiesDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StopPiiEntitiesDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopPiiEntitiesDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopSentimentDetectionJobResponse - */ -const de_StopSentimentDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StopSentimentDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopSentimentDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopTargetedSentimentDetectionJobResponse - */ -const de_StopTargetedSentimentDetectionJobResponse = ( - output: any, - context: __SerdeContext -): StopTargetedSentimentDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopTargetedSentimentDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopTrainingDocumentClassifierResponse - */ -const de_StopTrainingDocumentClassifierResponse = ( - output: any, - context: __SerdeContext -): StopTrainingDocumentClassifierResponse => { - return {} as any; -}; +// de_StopTrainingDocumentClassifierResponse omitted. -/** - * deserializeAws_json1_1StopTrainingEntityRecognizerResponse - */ -const de_StopTrainingEntityRecognizerResponse = ( - output: any, - context: __SerdeContext -): StopTrainingEntityRecognizerResponse => { - return {} as any; -}; +// de_StopTrainingEntityRecognizerResponse omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1Subnets - */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Subnets omitted. /** * deserializeAws_json1_1SyntaxToken */ const de_SyntaxToken = (output: any, context: __SerdeContext): SyntaxToken => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - PartOfSpeech: output.PartOfSpeech != null ? de_PartOfSpeechTag(output.PartOfSpeech, context) : undefined, - Text: __expectString(output.Text), - TokenId: __expectInt32(output.TokenId), - } as any; + return take(output, { + BeginOffset: __expectInt32, + EndOffset: __expectInt32, + PartOfSpeech: (_: any) => de_PartOfSpeechTag(_, context), + Text: __expectString, + TokenId: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1TargetedSentimentDetectionJobProperties @@ -11508,24 +9302,21 @@ const de_TargetedSentimentDetectionJobProperties = ( output: any, context: __SerdeContext ): TargetedSentimentDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - LanguageCode: __expectString(output.LanguageCode), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + LanguageCode: __expectString, + Message: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -11538,9 +9329,6 @@ const de_TargetedSentimentDetectionJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TargetedSentimentDetectionJobProperties(entry, context); }); return retVal; @@ -11550,121 +9338,58 @@ const de_TargetedSentimentDetectionJobPropertiesList = ( * deserializeAws_json1_1TargetedSentimentEntity */ const de_TargetedSentimentEntity = (output: any, context: __SerdeContext): TargetedSentimentEntity => { - return { - DescriptiveMentionIndex: - output.DescriptiveMentionIndex != null - ? de_ListOfDescriptiveMentionIndices(output.DescriptiveMentionIndex, context) - : undefined, - Mentions: output.Mentions != null ? de_ListOfMentions(output.Mentions, context) : undefined, - } as any; + return take(output, { + DescriptiveMentionIndex: _json, + Mentions: (_: any) => de_ListOfMentions(_, context), + }) as any; }; /** * deserializeAws_json1_1TargetedSentimentMention */ const de_TargetedSentimentMention = (output: any, context: __SerdeContext): TargetedSentimentMention => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - GroupScore: __limitedParseFloat32(output.GroupScore), - MentionSentiment: - output.MentionSentiment != null ? de_MentionSentiment(output.MentionSentiment, context) : undefined, - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + EndOffset: __expectInt32, + GroupScore: __limitedParseFloat32, + MentionSentiment: (_: any) => de_MentionSentiment(_, context), + Score: __limitedParseFloat32, + Text: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1TargetEventTypes - */ -const de_TargetEventTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetEventTypes omitted. -/** - * deserializeAws_json1_1TaskConfig - */ -const de_TaskConfig = (output: any, context: __SerdeContext): TaskConfig => { - return { - DocumentClassificationConfig: - output.DocumentClassificationConfig != null - ? de_DocumentClassificationConfig(output.DocumentClassificationConfig, context) - : undefined, - EntityRecognitionConfig: - output.EntityRecognitionConfig != null - ? de_EntityRecognitionConfig(output.EntityRecognitionConfig, context) - : undefined, - LanguageCode: __expectString(output.LanguageCode), - } as any; -}; +// de_TaskConfig omitted. -/** - * deserializeAws_json1_1TextSizeLimitExceededException - */ -const de_TextSizeLimitExceededException = (output: any, context: __SerdeContext): TextSizeLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TextSizeLimitExceededException omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyRequestsException omitted. -/** - * deserializeAws_json1_1TooManyTagKeysException - */ -const de_TooManyTagKeysException = (output: any, context: __SerdeContext): TooManyTagKeysException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyTagKeysException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyTagsException omitted. /** * deserializeAws_json1_1TopicsDetectionJobProperties */ const de_TopicsDetectionJobProperties = (output: any, context: __SerdeContext): TopicsDetectionJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - Message: __expectString(output.Message), - NumberOfTopics: __expectInt32(output.NumberOfTopics), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobArn: __expectString, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + Message: __expectString, + NumberOfTopics: __expectInt32, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeKmsKeyId: __expectString, + VpcConfig: _json, + }) as any; }; /** @@ -11674,59 +9399,27 @@ const de_TopicsDetectionJobPropertiesList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TopicsDetectionJobProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UnsupportedLanguageException - */ -const de_UnsupportedLanguageException = (output: any, context: __SerdeContext): UnsupportedLanguageException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedLanguageException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateEndpointResponse - */ -const de_UpdateEndpointResponse = (output: any, context: __SerdeContext): UpdateEndpointResponse => { - return { - DesiredModelArn: __expectString(output.DesiredModelArn), - } as any; -}; +// de_UpdateEndpointResponse omitted. /** * deserializeAws_json1_1UpdateFlywheelResponse */ const de_UpdateFlywheelResponse = (output: any, context: __SerdeContext): UpdateFlywheelResponse => { - return { - FlywheelProperties: - output.FlywheelProperties != null ? de_FlywheelProperties(output.FlywheelProperties, context) : undefined, - } as any; + return take(output, { + FlywheelProperties: (_: any) => de_FlywheelProperties(_, context), + }) as any; }; -/** - * deserializeAws_json1_1VpcConfig - */ -const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - Subnets: output.Subnets != null ? de_Subnets(output.Subnets, context) : undefined, - } as any; -}; +// de_VpcConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -11748,6 +9441,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-comprehendmedical/src/protocols/Aws_json1_1.ts b/clients/client-comprehendmedical/src/protocols/Aws_json1_1.ts index 427c96599b72..8179d0a20d54 100644 --- a/clients/client-comprehendmedical/src/protocols/Aws_json1_1.ts +++ b/clients/client-comprehendmedical/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -8,7 +9,8 @@ import { expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -107,7 +109,6 @@ import { import { ComprehendMedicalServiceException as __BaseException } from "../models/ComprehendMedicalServiceException"; import { Attribute, - Characters, ComprehendMedicalAsyncJobFilter, ComprehendMedicalAsyncJobProperties, DescribeEntitiesDetectionV2JobRequest, @@ -160,29 +161,18 @@ import { ServiceUnavailableException, SNOMEDCTAttribute, SNOMEDCTConcept, - SNOMEDCTDetails, SNOMEDCTEntity, SNOMEDCTTrait, StartEntitiesDetectionV2JobRequest, - StartEntitiesDetectionV2JobResponse, StartICD10CMInferenceJobRequest, - StartICD10CMInferenceJobResponse, StartPHIDetectionJobRequest, - StartPHIDetectionJobResponse, StartRxNormInferenceJobRequest, - StartRxNormInferenceJobResponse, StartSNOMEDCTInferenceJobRequest, - StartSNOMEDCTInferenceJobResponse, StopEntitiesDetectionV2JobRequest, - StopEntitiesDetectionV2JobResponse, StopICD10CMInferenceJobRequest, - StopICD10CMInferenceJobResponse, StopPHIDetectionJobRequest, - StopPHIDetectionJobResponse, StopRxNormInferenceJobRequest, - StopRxNormInferenceJobResponse, StopSNOMEDCTInferenceJobRequest, - StopSNOMEDCTInferenceJobResponse, TextSizeLimitExceededException, TooManyRequestsException, Trait, @@ -199,7 +189,7 @@ export const se_DescribeEntitiesDetectionV2JobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEntitiesDetectionV2Job"); let body: any; - body = JSON.stringify(se_DescribeEntitiesDetectionV2JobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -212,7 +202,7 @@ export const se_DescribeICD10CMInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeICD10CMInferenceJob"); let body: any; - body = JSON.stringify(se_DescribeICD10CMInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -225,7 +215,7 @@ export const se_DescribePHIDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePHIDetectionJob"); let body: any; - body = JSON.stringify(se_DescribePHIDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -238,7 +228,7 @@ export const se_DescribeRxNormInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRxNormInferenceJob"); let body: any; - body = JSON.stringify(se_DescribeRxNormInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -251,7 +241,7 @@ export const se_DescribeSNOMEDCTInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSNOMEDCTInferenceJob"); let body: any; - body = JSON.stringify(se_DescribeSNOMEDCTInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -264,7 +254,7 @@ export const se_DetectEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectEntities"); let body: any; - body = JSON.stringify(se_DetectEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -277,7 +267,7 @@ export const se_DetectEntitiesV2Command = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectEntitiesV2"); let body: any; - body = JSON.stringify(se_DetectEntitiesV2Request(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -290,7 +280,7 @@ export const se_DetectPHICommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetectPHI"); let body: any; - body = JSON.stringify(se_DetectPHIRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -303,7 +293,7 @@ export const se_InferICD10CMCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InferICD10CM"); let body: any; - body = JSON.stringify(se_InferICD10CMRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -316,7 +306,7 @@ export const se_InferRxNormCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InferRxNorm"); let body: any; - body = JSON.stringify(se_InferRxNormRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -329,7 +319,7 @@ export const se_InferSNOMEDCTCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InferSNOMEDCT"); let body: any; - body = JSON.stringify(se_InferSNOMEDCTRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -472,7 +462,7 @@ export const se_StopEntitiesDetectionV2JobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopEntitiesDetectionV2Job"); let body: any; - body = JSON.stringify(se_StopEntitiesDetectionV2JobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -485,7 +475,7 @@ export const se_StopICD10CMInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopICD10CMInferenceJob"); let body: any; - body = JSON.stringify(se_StopICD10CMInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -498,7 +488,7 @@ export const se_StopPHIDetectionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopPHIDetectionJob"); let body: any; - body = JSON.stringify(se_StopPHIDetectionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -511,7 +501,7 @@ export const se_StopRxNormInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopRxNormInferenceJob"); let body: any; - body = JSON.stringify(se_StopRxNormInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -524,7 +514,7 @@ export const se_StopSNOMEDCTInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopSNOMEDCTInferenceJob"); let body: any; - body = JSON.stringify(se_StopSNOMEDCTInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +535,7 @@ export const de_DescribeEntitiesDetectionV2JobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -575,10 +565,9 @@ const de_DescribeEntitiesDetectionV2JobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -601,7 +590,7 @@ export const de_DescribeICD10CMInferenceJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -631,10 +620,9 @@ const de_DescribeICD10CMInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -657,7 +645,7 @@ export const de_DescribePHIDetectionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -687,10 +675,9 @@ const de_DescribePHIDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -713,7 +700,7 @@ export const de_DescribeRxNormInferenceJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -743,10 +730,9 @@ const de_DescribeRxNormInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -769,7 +755,7 @@ export const de_DescribeSNOMEDCTInferenceJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -799,10 +785,9 @@ const de_DescribeSNOMEDCTInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -825,7 +810,7 @@ export const de_DetectEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -861,10 +846,9 @@ const de_DetectEntitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -887,7 +871,7 @@ export const de_DetectEntitiesV2Command = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -923,10 +907,9 @@ const de_DetectEntitiesV2CommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -949,7 +932,7 @@ export const de_DetectPHICommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -985,10 +968,9 @@ const de_DetectPHICommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1011,7 +993,7 @@ export const de_InferICD10CMCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1047,10 +1029,9 @@ const de_InferICD10CMCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1073,7 +1054,7 @@ export const de_InferRxNormCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1109,10 +1090,9 @@ const de_InferRxNormCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1135,7 +1115,7 @@ export const de_InferSNOMEDCTCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1171,10 +1151,9 @@ const de_InferSNOMEDCTCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1197,7 +1176,7 @@ export const de_ListEntitiesDetectionV2JobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1227,10 +1206,9 @@ const de_ListEntitiesDetectionV2JobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1253,7 +1231,7 @@ export const de_ListICD10CMInferenceJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1283,10 +1261,9 @@ const de_ListICD10CMInferenceJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1309,7 +1286,7 @@ export const de_ListPHIDetectionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1339,10 +1316,9 @@ const de_ListPHIDetectionJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1365,7 +1341,7 @@ export const de_ListRxNormInferenceJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1395,10 +1371,9 @@ const de_ListRxNormInferenceJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1421,7 +1396,7 @@ export const de_ListSNOMEDCTInferenceJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1451,10 +1426,9 @@ const de_ListSNOMEDCTInferenceJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1472,12 +1446,12 @@ export const de_StartEntitiesDetectionV2JobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartEntitiesDetectionV2JobResponse(data, context); + contents = _json(data); const response: StartEntitiesDetectionV2JobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1507,10 +1481,9 @@ const de_StartEntitiesDetectionV2JobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1528,12 +1501,12 @@ export const de_StartICD10CMInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartICD10CMInferenceJobResponse(data, context); + contents = _json(data); const response: StartICD10CMInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1563,10 +1536,9 @@ const de_StartICD10CMInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1584,12 +1556,12 @@ export const de_StartPHIDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartPHIDetectionJobResponse(data, context); + contents = _json(data); const response: StartPHIDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1619,10 +1591,9 @@ const de_StartPHIDetectionJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1640,12 +1611,12 @@ export const de_StartRxNormInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartRxNormInferenceJobResponse(data, context); + contents = _json(data); const response: StartRxNormInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1675,10 +1646,9 @@ const de_StartRxNormInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1696,12 +1666,12 @@ export const de_StartSNOMEDCTInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSNOMEDCTInferenceJobResponse(data, context); + contents = _json(data); const response: StartSNOMEDCTInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1731,10 +1701,9 @@ const de_StartSNOMEDCTInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1752,12 +1721,12 @@ export const de_StopEntitiesDetectionV2JobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopEntitiesDetectionV2JobResponse(data, context); + contents = _json(data); const response: StopEntitiesDetectionV2JobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1784,10 +1753,9 @@ const de_StopEntitiesDetectionV2JobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1805,12 +1773,12 @@ export const de_StopICD10CMInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopICD10CMInferenceJobResponse(data, context); + contents = _json(data); const response: StopICD10CMInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1837,10 +1805,9 @@ const de_StopICD10CMInferenceJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1858,12 +1825,12 @@ export const de_StopPHIDetectionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopPHIDetectionJobResponse(data, context); + contents = _json(data); const response: StopPHIDetectionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1890,10 +1857,9 @@ const de_StopPHIDetectionJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1911,12 +1877,12 @@ export const de_StopRxNormInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopRxNormInferenceJobResponse(data, context); + contents = _json(data); const response: StopRxNormInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1943,10 +1909,9 @@ const de_StopRxNormInferenceJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1964,12 +1929,12 @@ export const de_StopSNOMEDCTInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopSNOMEDCTInferenceJobResponse(data, context); + contents = _json(data); const response: StopSNOMEDCTInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1999,10 +1964,9 @@ const de_StopSNOMEDCTInferenceJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2016,7 +1980,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2032,7 +1996,7 @@ const de_InvalidEncodingExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEncodingException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEncodingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2048,7 +2012,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2064,7 +2028,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2080,7 +2044,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2096,7 +2060,7 @@ const de_TextSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TextSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TextSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2112,7 +2076,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2125,7 +2089,7 @@ const de_TooManyRequestsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2137,134 +2101,37 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_1ComprehendMedicalAsyncJobFilter */ const se_ComprehendMedicalAsyncJobFilter = (input: ComprehendMedicalAsyncJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }), - ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000), + SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DescribeEntitiesDetectionV2JobRequest - */ -const se_DescribeEntitiesDetectionV2JobRequest = ( - input: DescribeEntitiesDetectionV2JobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeEntitiesDetectionV2JobRequest omitted. -/** - * serializeAws_json1_1DescribeICD10CMInferenceJobRequest - */ -const se_DescribeICD10CMInferenceJobRequest = ( - input: DescribeICD10CMInferenceJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeICD10CMInferenceJobRequest omitted. -/** - * serializeAws_json1_1DescribePHIDetectionJobRequest - */ -const se_DescribePHIDetectionJobRequest = (input: DescribePHIDetectionJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribePHIDetectionJobRequest omitted. -/** - * serializeAws_json1_1DescribeRxNormInferenceJobRequest - */ -const se_DescribeRxNormInferenceJobRequest = ( - input: DescribeRxNormInferenceJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeRxNormInferenceJobRequest omitted. -/** - * serializeAws_json1_1DescribeSNOMEDCTInferenceJobRequest - */ -const se_DescribeSNOMEDCTInferenceJobRequest = ( - input: DescribeSNOMEDCTInferenceJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeSNOMEDCTInferenceJobRequest omitted. -/** - * serializeAws_json1_1DetectEntitiesRequest - */ -const se_DetectEntitiesRequest = (input: DetectEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectEntitiesRequest omitted. -/** - * serializeAws_json1_1DetectEntitiesV2Request - */ -const se_DetectEntitiesV2Request = (input: DetectEntitiesV2Request, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectEntitiesV2Request omitted. -/** - * serializeAws_json1_1DetectPHIRequest - */ -const se_DetectPHIRequest = (input: DetectPHIRequest, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_DetectPHIRequest omitted. -/** - * serializeAws_json1_1InferICD10CMRequest - */ -const se_InferICD10CMRequest = (input: InferICD10CMRequest, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_InferICD10CMRequest omitted. -/** - * serializeAws_json1_1InferRxNormRequest - */ -const se_InferRxNormRequest = (input: InferRxNormRequest, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_InferRxNormRequest omitted. -/** - * serializeAws_json1_1InferSNOMEDCTRequest - */ -const se_InferSNOMEDCTRequest = (input: InferSNOMEDCTRequest, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_InferSNOMEDCTRequest omitted. -/** - * serializeAws_json1_1InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - }; -}; +// se_InputDataConfig omitted. /** * serializeAws_json1_1ListEntitiesDetectionV2JobsRequest @@ -2273,66 +2140,58 @@ const se_ListEntitiesDetectionV2JobsRequest = ( input: ListEntitiesDetectionV2JobsRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListICD10CMInferenceJobsRequest */ const se_ListICD10CMInferenceJobsRequest = (input: ListICD10CMInferenceJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListPHIDetectionJobsRequest */ const se_ListPHIDetectionJobsRequest = (input: ListPHIDetectionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListRxNormInferenceJobsRequest */ const se_ListRxNormInferenceJobsRequest = (input: ListRxNormInferenceJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_1ListSNOMEDCTInferenceJobsRequest */ const se_ListSNOMEDCTInferenceJobsRequest = (input: ListSNOMEDCTInferenceJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1OutputDataConfig - */ -const se_OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - }; -}; +// se_OutputDataConfig omitted. /** * serializeAws_json1_1StartEntitiesDetectionV2JobRequest @@ -2341,141 +2200,103 @@ const se_StartEntitiesDetectionV2JobRequest = ( input: StartEntitiesDetectionV2JobRequest, context: __SerdeContext ): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + KMSKey: [], + LanguageCode: [], + OutputDataConfig: _json, + }); }; /** * serializeAws_json1_1StartICD10CMInferenceJobRequest */ const se_StartICD10CMInferenceJobRequest = (input: StartICD10CMInferenceJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + KMSKey: [], + LanguageCode: [], + OutputDataConfig: _json, + }); }; /** * serializeAws_json1_1StartPHIDetectionJobRequest */ const se_StartPHIDetectionJobRequest = (input: StartPHIDetectionJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + KMSKey: [], + LanguageCode: [], + OutputDataConfig: _json, + }); }; /** * serializeAws_json1_1StartRxNormInferenceJobRequest */ const se_StartRxNormInferenceJobRequest = (input: StartRxNormInferenceJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + KMSKey: [], + LanguageCode: [], + OutputDataConfig: _json, + }); }; /** * serializeAws_json1_1StartSNOMEDCTInferenceJobRequest */ const se_StartSNOMEDCTInferenceJobRequest = (input: StartSNOMEDCTInferenceJobRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + KMSKey: [], + LanguageCode: [], + OutputDataConfig: _json, + }); }; -/** - * serializeAws_json1_1StopEntitiesDetectionV2JobRequest - */ -const se_StopEntitiesDetectionV2JobRequest = ( - input: StopEntitiesDetectionV2JobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_StopEntitiesDetectionV2JobRequest omitted. -/** - * serializeAws_json1_1StopICD10CMInferenceJobRequest - */ -const se_StopICD10CMInferenceJobRequest = (input: StopICD10CMInferenceJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_StopICD10CMInferenceJobRequest omitted. -/** - * serializeAws_json1_1StopPHIDetectionJobRequest - */ -const se_StopPHIDetectionJobRequest = (input: StopPHIDetectionJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_StopPHIDetectionJobRequest omitted. -/** - * serializeAws_json1_1StopRxNormInferenceJobRequest - */ -const se_StopRxNormInferenceJobRequest = (input: StopRxNormInferenceJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_StopRxNormInferenceJobRequest omitted. -/** - * serializeAws_json1_1StopSNOMEDCTInferenceJobRequest - */ -const se_StopSNOMEDCTInferenceJobRequest = (input: StopSNOMEDCTInferenceJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_StopSNOMEDCTInferenceJobRequest omitted. /** * deserializeAws_json1_1Attribute */ const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - RelationshipScore: __limitedParseFloat32(output.RelationshipScore), - RelationshipType: __expectString(output.RelationshipType), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_TraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + Id: __expectInt32, + RelationshipScore: __limitedParseFloat32, + RelationshipType: __expectString, + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_TraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -2485,22 +2306,12 @@ const de_AttributeList = (output: any, context: __SerdeContext): Attribute[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Attribute(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Characters - */ -const de_Characters = (output: any, context: __SerdeContext): Characters => { - return { - OriginalTextCharacters: __expectInt32(output.OriginalTextCharacters), - } as any; -}; +// de_Characters omitted. /** * deserializeAws_json1_1ComprehendMedicalAsyncJobProperties @@ -2509,28 +2320,22 @@ const de_ComprehendMedicalAsyncJobProperties = ( output: any, context: __SerdeContext ): ComprehendMedicalAsyncJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - KMSKey: __expectString(output.KMSKey), - LanguageCode: __expectString(output.LanguageCode), - ManifestFilePath: __expectString(output.ManifestFilePath), - Message: __expectString(output.Message), - ModelVersion: __expectString(output.ModelVersion), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + KMSKey: __expectString, + LanguageCode: __expectString, + ManifestFilePath: __expectString, + Message: __expectString, + ModelVersion: __expectString, + OutputDataConfig: _json, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2543,9 +2348,6 @@ const de_ComprehendMedicalAsyncJobPropertiesList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComprehendMedicalAsyncJobProperties(entry, context); }); return retVal; @@ -2558,12 +2360,9 @@ const de_DescribeEntitiesDetectionV2JobResponse = ( output: any, context: __SerdeContext ): DescribeEntitiesDetectionV2JobResponse => { - return { - ComprehendMedicalAsyncJobProperties: - output.ComprehendMedicalAsyncJobProperties != null - ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context) - : undefined, - } as any; + return take(output, { + ComprehendMedicalAsyncJobProperties: (_: any) => de_ComprehendMedicalAsyncJobProperties(_, context), + }) as any; }; /** @@ -2573,24 +2372,18 @@ const de_DescribeICD10CMInferenceJobResponse = ( output: any, context: __SerdeContext ): DescribeICD10CMInferenceJobResponse => { - return { - ComprehendMedicalAsyncJobProperties: - output.ComprehendMedicalAsyncJobProperties != null - ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context) - : undefined, - } as any; + return take(output, { + ComprehendMedicalAsyncJobProperties: (_: any) => de_ComprehendMedicalAsyncJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribePHIDetectionJobResponse */ const de_DescribePHIDetectionJobResponse = (output: any, context: __SerdeContext): DescribePHIDetectionJobResponse => { - return { - ComprehendMedicalAsyncJobProperties: - output.ComprehendMedicalAsyncJobProperties != null - ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context) - : undefined, - } as any; + return take(output, { + ComprehendMedicalAsyncJobProperties: (_: any) => de_ComprehendMedicalAsyncJobProperties(_, context), + }) as any; }; /** @@ -2600,12 +2393,9 @@ const de_DescribeRxNormInferenceJobResponse = ( output: any, context: __SerdeContext ): DescribeRxNormInferenceJobResponse => { - return { - ComprehendMedicalAsyncJobProperties: - output.ComprehendMedicalAsyncJobProperties != null - ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context) - : undefined, - } as any; + return take(output, { + ComprehendMedicalAsyncJobProperties: (_: any) => de_ComprehendMedicalAsyncJobProperties(_, context), + }) as any; }; /** @@ -2615,66 +2405,61 @@ const de_DescribeSNOMEDCTInferenceJobResponse = ( output: any, context: __SerdeContext ): DescribeSNOMEDCTInferenceJobResponse => { - return { - ComprehendMedicalAsyncJobProperties: - output.ComprehendMedicalAsyncJobProperties != null - ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context) - : undefined, - } as any; + return take(output, { + ComprehendMedicalAsyncJobProperties: (_: any) => de_ComprehendMedicalAsyncJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectEntitiesResponse */ const de_DetectEntitiesResponse = (output: any, context: __SerdeContext): DetectEntitiesResponse => { - return { - Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined, - ModelVersion: __expectString(output.ModelVersion), - PaginationToken: __expectString(output.PaginationToken), - UnmappedAttributes: - output.UnmappedAttributes != null ? de_UnmappedAttributeList(output.UnmappedAttributes, context) : undefined, - } as any; + return take(output, { + Entities: (_: any) => de_EntityList(_, context), + ModelVersion: __expectString, + PaginationToken: __expectString, + UnmappedAttributes: (_: any) => de_UnmappedAttributeList(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectEntitiesV2Response */ const de_DetectEntitiesV2Response = (output: any, context: __SerdeContext): DetectEntitiesV2Response => { - return { - Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined, - ModelVersion: __expectString(output.ModelVersion), - PaginationToken: __expectString(output.PaginationToken), - UnmappedAttributes: - output.UnmappedAttributes != null ? de_UnmappedAttributeList(output.UnmappedAttributes, context) : undefined, - } as any; + return take(output, { + Entities: (_: any) => de_EntityList(_, context), + ModelVersion: __expectString, + PaginationToken: __expectString, + UnmappedAttributes: (_: any) => de_UnmappedAttributeList(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectPHIResponse */ const de_DetectPHIResponse = (output: any, context: __SerdeContext): DetectPHIResponse => { - return { - Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined, - ModelVersion: __expectString(output.ModelVersion), - PaginationToken: __expectString(output.PaginationToken), - } as any; + return take(output, { + Entities: (_: any) => de_EntityList(_, context), + ModelVersion: __expectString, + PaginationToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1Entity */ const de_Entity = (output: any, context: __SerdeContext): Entity => { - return { - Attributes: output.Attributes != null ? de_AttributeList(output.Attributes, context) : undefined, - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_TraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeList(_, context), + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + Id: __expectInt32, + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_TraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -2684,9 +2469,6 @@ const de_EntityList = (output: any, context: __SerdeContext): Entity[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Entity(entry, context); }); return retVal; @@ -2696,18 +2478,18 @@ const de_EntityList = (output: any, context: __SerdeContext): Entity[] => { * deserializeAws_json1_1ICD10CMAttribute */ const de_ICD10CMAttribute = (output: any, context: __SerdeContext): ICD10CMAttribute => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - RelationshipScore: __limitedParseFloat32(output.RelationshipScore), - RelationshipType: __expectString(output.RelationshipType), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_ICD10CMTraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + Id: __expectInt32, + RelationshipScore: __limitedParseFloat32, + RelationshipType: __expectString, + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_ICD10CMTraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -2717,9 +2499,6 @@ const de_ICD10CMAttributeList = (output: any, context: __SerdeContext): ICD10CMA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ICD10CMAttribute(entry, context); }); return retVal; @@ -2729,11 +2508,11 @@ const de_ICD10CMAttributeList = (output: any, context: __SerdeContext): ICD10CMA * deserializeAws_json1_1ICD10CMConcept */ const de_ICD10CMConcept = (output: any, context: __SerdeContext): ICD10CMConcept => { - return { - Code: __expectString(output.Code), - Description: __expectString(output.Description), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Code: __expectString, + Description: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -2743,9 +2522,6 @@ const de_ICD10CMConceptList = (output: any, context: __SerdeContext): ICD10CMCon const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ICD10CMConcept(entry, context); }); return retVal; @@ -2755,19 +2531,18 @@ const de_ICD10CMConceptList = (output: any, context: __SerdeContext): ICD10CMCon * deserializeAws_json1_1ICD10CMEntity */ const de_ICD10CMEntity = (output: any, context: __SerdeContext): ICD10CMEntity => { - return { - Attributes: output.Attributes != null ? de_ICD10CMAttributeList(output.Attributes, context) : undefined, - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - ICD10CMConcepts: - output.ICD10CMConcepts != null ? de_ICD10CMConceptList(output.ICD10CMConcepts, context) : undefined, - Id: __expectInt32(output.Id), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_ICD10CMTraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Attributes: (_: any) => de_ICD10CMAttributeList(_, context), + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + ICD10CMConcepts: (_: any) => de_ICD10CMConceptList(_, context), + Id: __expectInt32, + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_ICD10CMTraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -2777,9 +2552,6 @@ const de_ICD10CMEntityList = (output: any, context: __SerdeContext): ICD10CMEnti const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ICD10CMEntity(entry, context); }); return retVal; @@ -2789,10 +2561,10 @@ const de_ICD10CMEntityList = (output: any, context: __SerdeContext): ICD10CMEnti * deserializeAws_json1_1ICD10CMTrait */ const de_ICD10CMTrait = (output: any, context: __SerdeContext): ICD10CMTrait => { - return { - Name: __expectString(output.Name), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -2802,9 +2574,6 @@ const de_ICD10CMTraitList = (output: any, context: __SerdeContext): ICD10CMTrait const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ICD10CMTrait(entry, context); }); return retVal; @@ -2814,73 +2583,44 @@ const de_ICD10CMTraitList = (output: any, context: __SerdeContext): ICD10CMTrait * deserializeAws_json1_1InferICD10CMResponse */ const de_InferICD10CMResponse = (output: any, context: __SerdeContext): InferICD10CMResponse => { - return { - Entities: output.Entities != null ? de_ICD10CMEntityList(output.Entities, context) : undefined, - ModelVersion: __expectString(output.ModelVersion), - PaginationToken: __expectString(output.PaginationToken), - } as any; + return take(output, { + Entities: (_: any) => de_ICD10CMEntityList(_, context), + ModelVersion: __expectString, + PaginationToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1InferRxNormResponse */ const de_InferRxNormResponse = (output: any, context: __SerdeContext): InferRxNormResponse => { - return { - Entities: output.Entities != null ? de_RxNormEntityList(output.Entities, context) : undefined, - ModelVersion: __expectString(output.ModelVersion), - PaginationToken: __expectString(output.PaginationToken), - } as any; + return take(output, { + Entities: (_: any) => de_RxNormEntityList(_, context), + ModelVersion: __expectString, + PaginationToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1InferSNOMEDCTResponse */ const de_InferSNOMEDCTResponse = (output: any, context: __SerdeContext): InferSNOMEDCTResponse => { - return { - Characters: output.Characters != null ? de_Characters(output.Characters, context) : undefined, - Entities: output.Entities != null ? de_SNOMEDCTEntityList(output.Entities, context) : undefined, - ModelVersion: __expectString(output.ModelVersion), - PaginationToken: __expectString(output.PaginationToken), - SNOMEDCTDetails: output.SNOMEDCTDetails != null ? de_SNOMEDCTDetails(output.SNOMEDCTDetails, context) : undefined, - } as any; + return take(output, { + Characters: _json, + Entities: (_: any) => de_SNOMEDCTEntityList(_, context), + ModelVersion: __expectString, + PaginationToken: __expectString, + SNOMEDCTDetails: _json, + }) as any; }; -/** - * deserializeAws_json1_1InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - return { - S3Bucket: __expectString(output.S3Bucket), - S3Key: __expectString(output.S3Key), - } as any; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1InvalidEncodingException - */ -const de_InvalidEncodingException = (output: any, context: __SerdeContext): InvalidEncodingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidEncodingException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. /** * deserializeAws_json1_1ListEntitiesDetectionV2JobsResponse @@ -2889,13 +2629,10 @@ const de_ListEntitiesDetectionV2JobsResponse = ( output: any, context: __SerdeContext ): ListEntitiesDetectionV2JobsResponse => { - return { - ComprehendMedicalAsyncJobPropertiesList: - output.ComprehendMedicalAsyncJobPropertiesList != null - ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ComprehendMedicalAsyncJobPropertiesList: (_: any) => de_ComprehendMedicalAsyncJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -2905,39 +2642,30 @@ const de_ListICD10CMInferenceJobsResponse = ( output: any, context: __SerdeContext ): ListICD10CMInferenceJobsResponse => { - return { - ComprehendMedicalAsyncJobPropertiesList: - output.ComprehendMedicalAsyncJobPropertiesList != null - ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ComprehendMedicalAsyncJobPropertiesList: (_: any) => de_ComprehendMedicalAsyncJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListPHIDetectionJobsResponse */ const de_ListPHIDetectionJobsResponse = (output: any, context: __SerdeContext): ListPHIDetectionJobsResponse => { - return { - ComprehendMedicalAsyncJobPropertiesList: - output.ComprehendMedicalAsyncJobPropertiesList != null - ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ComprehendMedicalAsyncJobPropertiesList: (_: any) => de_ComprehendMedicalAsyncJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListRxNormInferenceJobsResponse */ const de_ListRxNormInferenceJobsResponse = (output: any, context: __SerdeContext): ListRxNormInferenceJobsResponse => { - return { - ComprehendMedicalAsyncJobPropertiesList: - output.ComprehendMedicalAsyncJobPropertiesList != null - ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ComprehendMedicalAsyncJobPropertiesList: (_: any) => de_ComprehendMedicalAsyncJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -2947,48 +2675,30 @@ const de_ListSNOMEDCTInferenceJobsResponse = ( output: any, context: __SerdeContext ): ListSNOMEDCTInferenceJobsResponse => { - return { - ComprehendMedicalAsyncJobPropertiesList: - output.ComprehendMedicalAsyncJobPropertiesList != null - ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ComprehendMedicalAsyncJobPropertiesList: (_: any) => de_ComprehendMedicalAsyncJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1OutputDataConfig - */ -const de_OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { - return { - S3Bucket: __expectString(output.S3Bucket), - S3Key: __expectString(output.S3Key), - } as any; -}; +// de_OutputDataConfig omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1RxNormAttribute */ const de_RxNormAttribute = (output: any, context: __SerdeContext): RxNormAttribute => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - RelationshipScore: __limitedParseFloat32(output.RelationshipScore), - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_RxNormTraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + EndOffset: __expectInt32, + Id: __expectInt32, + RelationshipScore: __limitedParseFloat32, + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_RxNormTraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -2998,9 +2708,6 @@ const de_RxNormAttributeList = (output: any, context: __SerdeContext): RxNormAtt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RxNormAttribute(entry, context); }); return retVal; @@ -3010,11 +2717,11 @@ const de_RxNormAttributeList = (output: any, context: __SerdeContext): RxNormAtt * deserializeAws_json1_1RxNormConcept */ const de_RxNormConcept = (output: any, context: __SerdeContext): RxNormConcept => { - return { - Code: __expectString(output.Code), - Description: __expectString(output.Description), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Code: __expectString, + Description: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -3024,9 +2731,6 @@ const de_RxNormConceptList = (output: any, context: __SerdeContext): RxNormConce const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RxNormConcept(entry, context); }); return retVal; @@ -3036,18 +2740,18 @@ const de_RxNormConceptList = (output: any, context: __SerdeContext): RxNormConce * deserializeAws_json1_1RxNormEntity */ const de_RxNormEntity = (output: any, context: __SerdeContext): RxNormEntity => { - return { - Attributes: output.Attributes != null ? de_RxNormAttributeList(output.Attributes, context) : undefined, - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - RxNormConcepts: output.RxNormConcepts != null ? de_RxNormConceptList(output.RxNormConcepts, context) : undefined, - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_RxNormTraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Attributes: (_: any) => de_RxNormAttributeList(_, context), + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + Id: __expectInt32, + RxNormConcepts: (_: any) => de_RxNormConceptList(_, context), + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_RxNormTraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -3057,9 +2761,6 @@ const de_RxNormEntityList = (output: any, context: __SerdeContext): RxNormEntity const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RxNormEntity(entry, context); }); return retVal; @@ -3069,10 +2770,10 @@ const de_RxNormEntityList = (output: any, context: __SerdeContext): RxNormEntity * deserializeAws_json1_1RxNormTrait */ const de_RxNormTrait = (output: any, context: __SerdeContext): RxNormTrait => { - return { - Name: __expectString(output.Name), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -3082,41 +2783,30 @@ const de_RxNormTraitList = (output: any, context: __SerdeContext): RxNormTrait[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RxNormTrait(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceUnavailableException omitted. /** * deserializeAws_json1_1SNOMEDCTAttribute */ const de_SNOMEDCTAttribute = (output: any, context: __SerdeContext): SNOMEDCTAttribute => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - RelationshipScore: __limitedParseFloat32(output.RelationshipScore), - RelationshipType: __expectString(output.RelationshipType), - SNOMEDCTConcepts: - output.SNOMEDCTConcepts != null ? de_SNOMEDCTConceptList(output.SNOMEDCTConcepts, context) : undefined, - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_SNOMEDCTTraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + Id: __expectInt32, + RelationshipScore: __limitedParseFloat32, + RelationshipType: __expectString, + SNOMEDCTConcepts: (_: any) => de_SNOMEDCTConceptList(_, context), + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_SNOMEDCTTraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -3126,9 +2816,6 @@ const de_SNOMEDCTAttributeList = (output: any, context: __SerdeContext): SNOMEDC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SNOMEDCTAttribute(entry, context); }); return retVal; @@ -3138,11 +2825,11 @@ const de_SNOMEDCTAttributeList = (output: any, context: __SerdeContext): SNOMEDC * deserializeAws_json1_1SNOMEDCTConcept */ const de_SNOMEDCTConcept = (output: any, context: __SerdeContext): SNOMEDCTConcept => { - return { - Code: __expectString(output.Code), - Description: __expectString(output.Description), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Code: __expectString, + Description: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -3152,42 +2839,29 @@ const de_SNOMEDCTConceptList = (output: any, context: __SerdeContext): SNOMEDCTC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SNOMEDCTConcept(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SNOMEDCTDetails - */ -const de_SNOMEDCTDetails = (output: any, context: __SerdeContext): SNOMEDCTDetails => { - return { - Edition: __expectString(output.Edition), - Language: __expectString(output.Language), - VersionDate: __expectString(output.VersionDate), - } as any; -}; +// de_SNOMEDCTDetails omitted. /** * deserializeAws_json1_1SNOMEDCTEntity */ const de_SNOMEDCTEntity = (output: any, context: __SerdeContext): SNOMEDCTEntity => { - return { - Attributes: output.Attributes != null ? de_SNOMEDCTAttributeList(output.Attributes, context) : undefined, - BeginOffset: __expectInt32(output.BeginOffset), - Category: __expectString(output.Category), - EndOffset: __expectInt32(output.EndOffset), - Id: __expectInt32(output.Id), - SNOMEDCTConcepts: - output.SNOMEDCTConcepts != null ? de_SNOMEDCTConceptList(output.SNOMEDCTConcepts, context) : undefined, - Score: __limitedParseFloat32(output.Score), - Text: __expectString(output.Text), - Traits: output.Traits != null ? de_SNOMEDCTTraitList(output.Traits, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Attributes: (_: any) => de_SNOMEDCTAttributeList(_, context), + BeginOffset: __expectInt32, + Category: __expectString, + EndOffset: __expectInt32, + Id: __expectInt32, + SNOMEDCTConcepts: (_: any) => de_SNOMEDCTConceptList(_, context), + Score: __limitedParseFloat32, + Text: __expectString, + Traits: (_: any) => de_SNOMEDCTTraitList(_, context), + Type: __expectString, + }) as any; }; /** @@ -3197,9 +2871,6 @@ const de_SNOMEDCTEntityList = (output: any, context: __SerdeContext): SNOMEDCTEn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SNOMEDCTEntity(entry, context); }); return retVal; @@ -3209,10 +2880,10 @@ const de_SNOMEDCTEntityList = (output: any, context: __SerdeContext): SNOMEDCTEn * deserializeAws_json1_1SNOMEDCTTrait */ const de_SNOMEDCTTrait = (output: any, context: __SerdeContext): SNOMEDCTTrait => { - return { - Name: __expectString(output.Name), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -3222,145 +2893,43 @@ const de_SNOMEDCTTraitList = (output: any, context: __SerdeContext): SNOMEDCTTra const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SNOMEDCTTrait(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartEntitiesDetectionV2JobResponse - */ -const de_StartEntitiesDetectionV2JobResponse = ( - output: any, - context: __SerdeContext -): StartEntitiesDetectionV2JobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartEntitiesDetectionV2JobResponse omitted. -/** - * deserializeAws_json1_1StartICD10CMInferenceJobResponse - */ -const de_StartICD10CMInferenceJobResponse = ( - output: any, - context: __SerdeContext -): StartICD10CMInferenceJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartICD10CMInferenceJobResponse omitted. -/** - * deserializeAws_json1_1StartPHIDetectionJobResponse - */ -const de_StartPHIDetectionJobResponse = (output: any, context: __SerdeContext): StartPHIDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartPHIDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StartRxNormInferenceJobResponse - */ -const de_StartRxNormInferenceJobResponse = (output: any, context: __SerdeContext): StartRxNormInferenceJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartRxNormInferenceJobResponse omitted. -/** - * deserializeAws_json1_1StartSNOMEDCTInferenceJobResponse - */ -const de_StartSNOMEDCTInferenceJobResponse = ( - output: any, - context: __SerdeContext -): StartSNOMEDCTInferenceJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartSNOMEDCTInferenceJobResponse omitted. -/** - * deserializeAws_json1_1StopEntitiesDetectionV2JobResponse - */ -const de_StopEntitiesDetectionV2JobResponse = ( - output: any, - context: __SerdeContext -): StopEntitiesDetectionV2JobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StopEntitiesDetectionV2JobResponse omitted. -/** - * deserializeAws_json1_1StopICD10CMInferenceJobResponse - */ -const de_StopICD10CMInferenceJobResponse = (output: any, context: __SerdeContext): StopICD10CMInferenceJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StopICD10CMInferenceJobResponse omitted. -/** - * deserializeAws_json1_1StopPHIDetectionJobResponse - */ -const de_StopPHIDetectionJobResponse = (output: any, context: __SerdeContext): StopPHIDetectionJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StopPHIDetectionJobResponse omitted. -/** - * deserializeAws_json1_1StopRxNormInferenceJobResponse - */ -const de_StopRxNormInferenceJobResponse = (output: any, context: __SerdeContext): StopRxNormInferenceJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StopRxNormInferenceJobResponse omitted. -/** - * deserializeAws_json1_1StopSNOMEDCTInferenceJobResponse - */ -const de_StopSNOMEDCTInferenceJobResponse = ( - output: any, - context: __SerdeContext -): StopSNOMEDCTInferenceJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StopSNOMEDCTInferenceJobResponse omitted. -/** - * deserializeAws_json1_1TextSizeLimitExceededException - */ -const de_TextSizeLimitExceededException = (output: any, context: __SerdeContext): TextSizeLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TextSizeLimitExceededException omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyRequestsException omitted. /** * deserializeAws_json1_1Trait */ const de_Trait = (output: any, context: __SerdeContext): Trait => { - return { - Name: __expectString(output.Name), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + Name: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -3370,9 +2939,6 @@ const de_TraitList = (output: any, context: __SerdeContext): Trait[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Trait(entry, context); }); return retVal; @@ -3382,10 +2948,10 @@ const de_TraitList = (output: any, context: __SerdeContext): Trait[] => { * deserializeAws_json1_1UnmappedAttribute */ const de_UnmappedAttribute = (output: any, context: __SerdeContext): UnmappedAttribute => { - return { - Attribute: output.Attribute != null ? de_Attribute(output.Attribute, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Attribute: (_: any) => de_Attribute(_, context), + Type: __expectString, + }) as any; }; /** @@ -3395,22 +2961,12 @@ const de_UnmappedAttributeList = (output: any, context: __SerdeContext): Unmappe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UnmappedAttribute(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3432,6 +2988,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts b/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts index f08cc56eda5e..5a91dba60ccf 100644 --- a/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts +++ b/clients/client-compute-optimizer/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,7 +11,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -107,15 +109,10 @@ import { ComputeOptimizerServiceException as __BaseException } from "../models/C import { AccessDeniedException, AccountEnrollmentStatus, - AutoScalingGroupConfiguration, AutoScalingGroupRecommendation, AutoScalingGroupRecommendationOption, - ContainerConfiguration, - ContainerRecommendation, CpuVendorArchitecture, - CurrentPerformanceRiskRatings, DeleteRecommendationPreferencesRequest, - DeleteRecommendationPreferencesResponse, DescribeRecommendationExportJobsRequest, DescribeRecommendationExportJobsResponse, EBSFilter, @@ -124,11 +121,9 @@ import { ECSServiceProjectedUtilizationMetric, ECSServiceRecommendation, ECSServiceRecommendationFilter, - ECSServiceRecommendationFindingReasonCode, ECSServiceRecommendationOption, ECSServiceRecommendedOptionProjectedMetric, ECSServiceUtilizationMetric, - EffectiveRecommendationPreferences, EnrollmentFilter, EstimatedMonthlySavings, ExportableAutoScalingGroupField, @@ -137,16 +132,10 @@ import { ExportableLambdaFunctionField, ExportableVolumeField, ExportAutoScalingGroupRecommendationsRequest, - ExportAutoScalingGroupRecommendationsResponse, - ExportDestination, ExportEBSVolumeRecommendationsRequest, - ExportEBSVolumeRecommendationsResponse, ExportEC2InstanceRecommendationsRequest, - ExportEC2InstanceRecommendationsResponse, ExportECSServiceRecommendationsRequest, - ExportECSServiceRecommendationsResponse, ExportLambdaFunctionRecommendationsRequest, - ExportLambdaFunctionRecommendationsResponse, ExternalMetricsPreference, Filter, GetAutoScalingGroupRecommendationsRequest, @@ -162,21 +151,16 @@ import { GetECSServiceRecommendationsRequest, GetECSServiceRecommendationsResponse, GetEffectiveRecommendationPreferencesRequest, - GetEffectiveRecommendationPreferencesResponse, GetEnrollmentStatusesForOrganizationRequest, GetEnrollmentStatusesForOrganizationResponse, GetEnrollmentStatusRequest, GetEnrollmentStatusResponse, GetLambdaFunctionRecommendationsRequest, GetLambdaFunctionRecommendationsResponse, - GetRecommendationError, GetRecommendationPreferencesRequest, - GetRecommendationPreferencesResponse, GetRecommendationSummariesRequest, GetRecommendationSummariesResponse, - InferredWorkloadType, InstanceRecommendation, - InstanceRecommendationFindingReasonCode, InstanceRecommendationOption, InternalServerException, InvalidParameterValueException, @@ -185,37 +169,27 @@ import { LambdaFunctionMemoryRecommendationOption, LambdaFunctionRecommendation, LambdaFunctionRecommendationFilter, - LambdaFunctionRecommendationFindingReasonCode, LambdaFunctionUtilizationMetric, LimitExceededException, - MemorySizeConfiguration, MissingAuthenticationToken, OptInRequiredException, - PlatformDifference, ProjectedMetric, PutRecommendationPreferencesRequest, - PutRecommendationPreferencesResponse, ReasonCodeSummary, RecommendationExportJob, RecommendationPreferenceName, RecommendationPreferences, - RecommendationPreferencesDetail, - RecommendationSource, RecommendationSummary, RecommendedOptionProjectedMetric, ResourceNotFoundException, - S3Destination, S3DestinationConfig, SavingsOpportunity, Scope, - ServiceConfiguration, ServiceUnavailableException, Summary, ThrottlingException, UpdateEnrollmentStatusRequest, - UpdateEnrollmentStatusResponse, UtilizationMetric, - VolumeConfiguration, VolumeRecommendation, VolumeRecommendationOption, } from "../models/models_0"; @@ -229,7 +203,7 @@ export const se_DeleteRecommendationPreferencesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRecommendationPreferences"); let body: any; - body = JSON.stringify(se_DeleteRecommendationPreferencesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -242,7 +216,7 @@ export const se_DescribeRecommendationExportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRecommendationExportJobs"); let body: any; - body = JSON.stringify(se_DescribeRecommendationExportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -255,7 +229,7 @@ export const se_ExportAutoScalingGroupRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportAutoScalingGroupRecommendations"); let body: any; - body = JSON.stringify(se_ExportAutoScalingGroupRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -268,7 +242,7 @@ export const se_ExportEBSVolumeRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportEBSVolumeRecommendations"); let body: any; - body = JSON.stringify(se_ExportEBSVolumeRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +255,7 @@ export const se_ExportEC2InstanceRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportEC2InstanceRecommendations"); let body: any; - body = JSON.stringify(se_ExportEC2InstanceRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -294,7 +268,7 @@ export const se_ExportECSServiceRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportECSServiceRecommendations"); let body: any; - body = JSON.stringify(se_ExportECSServiceRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -307,7 +281,7 @@ export const se_ExportLambdaFunctionRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportLambdaFunctionRecommendations"); let body: any; - body = JSON.stringify(se_ExportLambdaFunctionRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -320,7 +294,7 @@ export const se_GetAutoScalingGroupRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAutoScalingGroupRecommendations"); let body: any; - body = JSON.stringify(se_GetAutoScalingGroupRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -333,7 +307,7 @@ export const se_GetEBSVolumeRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEBSVolumeRecommendations"); let body: any; - body = JSON.stringify(se_GetEBSVolumeRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -346,7 +320,7 @@ export const se_GetEC2InstanceRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEC2InstanceRecommendations"); let body: any; - body = JSON.stringify(se_GetEC2InstanceRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -385,7 +359,7 @@ export const se_GetECSServiceRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetECSServiceRecommendations"); let body: any; - body = JSON.stringify(se_GetECSServiceRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -398,7 +372,7 @@ export const se_GetEffectiveRecommendationPreferencesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEffectiveRecommendationPreferences"); let body: any; - body = JSON.stringify(se_GetEffectiveRecommendationPreferencesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -411,7 +385,7 @@ export const se_GetEnrollmentStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEnrollmentStatus"); let body: any; - body = JSON.stringify(se_GetEnrollmentStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -424,7 +398,7 @@ export const se_GetEnrollmentStatusesForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEnrollmentStatusesForOrganization"); let body: any; - body = JSON.stringify(se_GetEnrollmentStatusesForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -437,7 +411,7 @@ export const se_GetLambdaFunctionRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLambdaFunctionRecommendations"); let body: any; - body = JSON.stringify(se_GetLambdaFunctionRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -450,7 +424,7 @@ export const se_GetRecommendationPreferencesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRecommendationPreferences"); let body: any; - body = JSON.stringify(se_GetRecommendationPreferencesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -463,7 +437,7 @@ export const se_GetRecommendationSummariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRecommendationSummaries"); let body: any; - body = JSON.stringify(se_GetRecommendationSummariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -476,7 +450,7 @@ export const se_PutRecommendationPreferencesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRecommendationPreferences"); let body: any; - body = JSON.stringify(se_PutRecommendationPreferencesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -489,7 +463,7 @@ export const se_UpdateEnrollmentStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEnrollmentStatus"); let body: any; - body = JSON.stringify(se_UpdateEnrollmentStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -505,12 +479,12 @@ export const de_DeleteRecommendationPreferencesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRecommendationPreferencesResponse(data, context); + contents = _json(data); const response: DeleteRecommendationPreferencesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -552,10 +526,9 @@ const de_DeleteRecommendationPreferencesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -578,7 +551,7 @@ export const de_DescribeRecommendationExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -620,10 +593,9 @@ const de_DescribeRecommendationExportJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -641,12 +613,12 @@ export const de_ExportAutoScalingGroupRecommendationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportAutoScalingGroupRecommendationsResponse(data, context); + contents = _json(data); const response: ExportAutoScalingGroupRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -688,10 +660,9 @@ const de_ExportAutoScalingGroupRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -709,12 +680,12 @@ export const de_ExportEBSVolumeRecommendationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportEBSVolumeRecommendationsResponse(data, context); + contents = _json(data); const response: ExportEBSVolumeRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -756,10 +727,9 @@ const de_ExportEBSVolumeRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -777,12 +747,12 @@ export const de_ExportEC2InstanceRecommendationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportEC2InstanceRecommendationsResponse(data, context); + contents = _json(data); const response: ExportEC2InstanceRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -824,10 +794,9 @@ const de_ExportEC2InstanceRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -845,12 +814,12 @@ export const de_ExportECSServiceRecommendationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportECSServiceRecommendationsResponse(data, context); + contents = _json(data); const response: ExportECSServiceRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -892,10 +861,9 @@ const de_ExportECSServiceRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -913,12 +881,12 @@ export const de_ExportLambdaFunctionRecommendationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportLambdaFunctionRecommendationsResponse(data, context); + contents = _json(data); const response: ExportLambdaFunctionRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -960,10 +928,9 @@ const de_ExportLambdaFunctionRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -986,7 +953,7 @@ export const de_GetAutoScalingGroupRecommendationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1028,10 +995,9 @@ const de_GetAutoScalingGroupRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1054,7 +1020,7 @@ export const de_GetEBSVolumeRecommendationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1096,10 +1062,9 @@ const de_GetEBSVolumeRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1122,7 +1087,7 @@ export const de_GetEC2InstanceRecommendationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1164,10 +1129,9 @@ const de_GetEC2InstanceRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1190,7 +1154,7 @@ export const de_GetEC2RecommendationProjectedMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1232,10 +1196,9 @@ const de_GetEC2RecommendationProjectedMetricsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1258,7 +1221,7 @@ export const de_GetECSServiceRecommendationProjectedMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1300,10 +1263,9 @@ const de_GetECSServiceRecommendationProjectedMetricsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1326,7 +1288,7 @@ export const de_GetECSServiceRecommendationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1368,10 +1330,9 @@ const de_GetECSServiceRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1389,12 +1350,12 @@ export const de_GetEffectiveRecommendationPreferencesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetEffectiveRecommendationPreferencesResponse(data, context); + contents = _json(data); const response: GetEffectiveRecommendationPreferencesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1436,10 +1397,9 @@ const de_GetEffectiveRecommendationPreferencesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1462,7 +1422,7 @@ export const de_GetEnrollmentStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1498,10 +1458,9 @@ const de_GetEnrollmentStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1524,7 +1483,7 @@ export const de_GetEnrollmentStatusesForOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1560,10 +1519,9 @@ const de_GetEnrollmentStatusesForOrganizationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1586,7 +1544,7 @@ export const de_GetLambdaFunctionRecommendationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1628,10 +1586,9 @@ const de_GetLambdaFunctionRecommendationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1649,12 +1606,12 @@ export const de_GetRecommendationPreferencesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRecommendationPreferencesResponse(data, context); + contents = _json(data); const response: GetRecommendationPreferencesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1696,10 +1653,9 @@ const de_GetRecommendationPreferencesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1722,7 +1678,7 @@ export const de_GetRecommendationSummariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1761,10 +1717,9 @@ const de_GetRecommendationSummariesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1782,12 +1737,12 @@ export const de_PutRecommendationPreferencesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRecommendationPreferencesResponse(data, context); + contents = _json(data); const response: PutRecommendationPreferencesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1829,10 +1784,9 @@ const de_PutRecommendationPreferencesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1850,12 +1804,12 @@ export const de_UpdateEnrollmentStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEnrollmentStatusResponse(data, context); + contents = _json(data); const response: UpdateEnrollmentStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1891,10 +1845,9 @@ const de_UpdateEnrollmentStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1908,7 +1861,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1924,7 +1877,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1940,7 +1893,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1956,7 +1909,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1972,7 +1925,7 @@ const de_MissingAuthenticationTokenRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingAuthenticationToken(body, context); + const deserialized: any = _json(body); const exception = new MissingAuthenticationToken({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1988,7 +1941,7 @@ const de_OptInRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OptInRequiredException(body, context); + const deserialized: any = _json(body); const exception = new OptInRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2004,7 +1957,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2020,7 +1973,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2033,7 +1986,7 @@ const de_ServiceUnavailableExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2041,408 +1994,63 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AccountIds - */ -const se_AccountIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIds omitted. -/** - * serializeAws_json1_0AutoScalingGroupArns - */ -const se_AutoScalingGroupArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutoScalingGroupArns omitted. -/** - * serializeAws_json1_0CpuVendorArchitectures - */ -const se_CpuVendorArchitectures = (input: (CpuVendorArchitecture | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CpuVendorArchitectures omitted. -/** - * serializeAws_json1_0DeleteRecommendationPreferencesRequest - */ -const se_DeleteRecommendationPreferencesRequest = ( - input: DeleteRecommendationPreferencesRequest, - context: __SerdeContext -): any => { - return { - ...(input.recommendationPreferenceNames != null && { - recommendationPreferenceNames: se_RecommendationPreferenceNames(input.recommendationPreferenceNames, context), - }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.scope != null && { scope: se_Scope(input.scope, context) }), - }; -}; +// se_DeleteRecommendationPreferencesRequest omitted. -/** - * serializeAws_json1_0DescribeRecommendationExportJobsRequest - */ -const se_DescribeRecommendationExportJobsRequest = ( - input: DescribeRecommendationExportJobsRequest, - context: __SerdeContext -): any => { - return { - ...(input.filters != null && { filters: se_JobFilters(input.filters, context) }), - ...(input.jobIds != null && { jobIds: se_JobIds(input.jobIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeRecommendationExportJobsRequest omitted. -/** - * serializeAws_json1_0EBSFilter - */ -const se_EBSFilter = (input: EBSFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_EBSFilter omitted. -/** - * serializeAws_json1_0EBSFilters - */ -const se_EBSFilters = (input: EBSFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EBSFilter(entry, context); - }); -}; +// se_EBSFilters omitted. -/** - * serializeAws_json1_0ECSServiceRecommendationFilter - */ -const se_ECSServiceRecommendationFilter = (input: ECSServiceRecommendationFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_ECSServiceRecommendationFilter omitted. -/** - * serializeAws_json1_0ECSServiceRecommendationFilters - */ -const se_ECSServiceRecommendationFilters = (input: ECSServiceRecommendationFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ECSServiceRecommendationFilter(entry, context); - }); -}; +// se_ECSServiceRecommendationFilters omitted. -/** - * serializeAws_json1_0EnrollmentFilter - */ -const se_EnrollmentFilter = (input: EnrollmentFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_EnrollmentFilter omitted. -/** - * serializeAws_json1_0EnrollmentFilters - */ -const se_EnrollmentFilters = (input: EnrollmentFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnrollmentFilter(entry, context); - }); -}; +// se_EnrollmentFilters omitted. -/** - * serializeAws_json1_0ExportableAutoScalingGroupFields - */ -const se_ExportableAutoScalingGroupFields = ( - input: (ExportableAutoScalingGroupField | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportableAutoScalingGroupFields omitted. -/** - * serializeAws_json1_0ExportableECSServiceFields - */ -const se_ExportableECSServiceFields = (input: (ExportableECSServiceField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportableECSServiceFields omitted. -/** - * serializeAws_json1_0ExportableInstanceFields - */ -const se_ExportableInstanceFields = (input: (ExportableInstanceField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportableInstanceFields omitted. -/** - * serializeAws_json1_0ExportableLambdaFunctionFields - */ -const se_ExportableLambdaFunctionFields = ( - input: (ExportableLambdaFunctionField | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportableLambdaFunctionFields omitted. -/** - * serializeAws_json1_0ExportableVolumeFields - */ -const se_ExportableVolumeFields = (input: (ExportableVolumeField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportableVolumeFields omitted. -/** - * serializeAws_json1_0ExportAutoScalingGroupRecommendationsRequest - */ -const se_ExportAutoScalingGroupRecommendationsRequest = ( - input: ExportAutoScalingGroupRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.fieldsToExport != null && { - fieldsToExport: se_ExportableAutoScalingGroupFields(input.fieldsToExport, context), - }), - ...(input.fileFormat != null && { fileFormat: input.fileFormat }), - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }), - ...(input.recommendationPreferences != null && { - recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context), - }), - ...(input.s3DestinationConfig != null && { - s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context), - }), - }; -}; +// se_ExportAutoScalingGroupRecommendationsRequest omitted. -/** - * serializeAws_json1_0ExportEBSVolumeRecommendationsRequest - */ -const se_ExportEBSVolumeRecommendationsRequest = ( - input: ExportEBSVolumeRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.fieldsToExport != null && { fieldsToExport: se_ExportableVolumeFields(input.fieldsToExport, context) }), - ...(input.fileFormat != null && { fileFormat: input.fileFormat }), - ...(input.filters != null && { filters: se_EBSFilters(input.filters, context) }), - ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }), - ...(input.s3DestinationConfig != null && { - s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context), - }), - }; -}; +// se_ExportEBSVolumeRecommendationsRequest omitted. -/** - * serializeAws_json1_0ExportEC2InstanceRecommendationsRequest - */ -const se_ExportEC2InstanceRecommendationsRequest = ( - input: ExportEC2InstanceRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.fieldsToExport != null && { fieldsToExport: se_ExportableInstanceFields(input.fieldsToExport, context) }), - ...(input.fileFormat != null && { fileFormat: input.fileFormat }), - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }), - ...(input.recommendationPreferences != null && { - recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context), - }), - ...(input.s3DestinationConfig != null && { - s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context), - }), - }; -}; +// se_ExportEC2InstanceRecommendationsRequest omitted. -/** - * serializeAws_json1_0ExportECSServiceRecommendationsRequest - */ -const se_ExportECSServiceRecommendationsRequest = ( - input: ExportECSServiceRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.fieldsToExport != null && { - fieldsToExport: se_ExportableECSServiceFields(input.fieldsToExport, context), - }), - ...(input.fileFormat != null && { fileFormat: input.fileFormat }), - ...(input.filters != null && { filters: se_ECSServiceRecommendationFilters(input.filters, context) }), - ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }), - ...(input.s3DestinationConfig != null && { - s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context), - }), - }; -}; +// se_ExportECSServiceRecommendationsRequest omitted. -/** - * serializeAws_json1_0ExportLambdaFunctionRecommendationsRequest - */ -const se_ExportLambdaFunctionRecommendationsRequest = ( - input: ExportLambdaFunctionRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.fieldsToExport != null && { - fieldsToExport: se_ExportableLambdaFunctionFields(input.fieldsToExport, context), - }), - ...(input.fileFormat != null && { fileFormat: input.fileFormat }), - ...(input.filters != null && { filters: se_LambdaFunctionRecommendationFilters(input.filters, context) }), - ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }), - ...(input.s3DestinationConfig != null && { - s3DestinationConfig: se_S3DestinationConfig(input.s3DestinationConfig, context), - }), - }; -}; +// se_ExportLambdaFunctionRecommendationsRequest omitted. -/** - * serializeAws_json1_0ExternalMetricsPreference - */ -const se_ExternalMetricsPreference = (input: ExternalMetricsPreference, context: __SerdeContext): any => { - return { - ...(input.source != null && { source: input.source }), - }; -}; +// se_ExternalMetricsPreference omitted. -/** - * serializeAws_json1_0Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_0Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_json1_0FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_0FunctionArns - */ -const se_FunctionArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FunctionArns omitted. -/** - * serializeAws_json1_0GetAutoScalingGroupRecommendationsRequest - */ -const se_GetAutoScalingGroupRecommendationsRequest = ( - input: GetAutoScalingGroupRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.autoScalingGroupArns != null && { - autoScalingGroupArns: se_AutoScalingGroupArns(input.autoScalingGroupArns, context), - }), - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.recommendationPreferences != null && { - recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context), - }), - }; -}; +// se_GetAutoScalingGroupRecommendationsRequest omitted. -/** - * serializeAws_json1_0GetEBSVolumeRecommendationsRequest - */ -const se_GetEBSVolumeRecommendationsRequest = ( - input: GetEBSVolumeRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.filters != null && { filters: se_EBSFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.volumeArns != null && { volumeArns: se_VolumeArns(input.volumeArns, context) }), - }; -}; +// se_GetEBSVolumeRecommendationsRequest omitted. -/** - * serializeAws_json1_0GetEC2InstanceRecommendationsRequest - */ -const se_GetEC2InstanceRecommendationsRequest = ( - input: GetEC2InstanceRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.instanceArns != null && { instanceArns: se_InstanceArns(input.instanceArns, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.recommendationPreferences != null && { - recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context), - }), - }; -}; +// se_GetEC2InstanceRecommendationsRequest omitted. /** * serializeAws_json1_0GetEC2RecommendationProjectedMetricsRequest @@ -2451,16 +2059,14 @@ const se_GetEC2RecommendationProjectedMetricsRequest = ( input: GetEC2RecommendationProjectedMetricsRequest, context: __SerdeContext ): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.instanceArn != null && { instanceArn: input.instanceArn }), - ...(input.period != null && { period: input.period }), - ...(input.recommendationPreferences != null && { - recommendationPreferences: se_RecommendationPreferences(input.recommendationPreferences, context), - }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.stat != null && { stat: input.stat }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + instanceArn: [], + period: [], + recommendationPreferences: _json, + startTime: (_) => Math.round(_.getTime() / 1000), + stat: [], + }); }; /** @@ -2470,298 +2076,69 @@ const se_GetECSServiceRecommendationProjectedMetricsRequest = ( input: GetECSServiceRecommendationProjectedMetricsRequest, context: __SerdeContext ): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.period != null && { period: input.period }), - ...(input.serviceArn != null && { serviceArn: input.serviceArn }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.stat != null && { stat: input.stat }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + period: [], + serviceArn: [], + startTime: (_) => Math.round(_.getTime() / 1000), + stat: [], + }); }; -/** - * serializeAws_json1_0GetECSServiceRecommendationsRequest - */ -const se_GetECSServiceRecommendationsRequest = ( - input: GetECSServiceRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.filters != null && { filters: se_ECSServiceRecommendationFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceArns != null && { serviceArns: se_ServiceArns(input.serviceArns, context) }), - }; -}; +// se_GetECSServiceRecommendationsRequest omitted. -/** - * serializeAws_json1_0GetEffectiveRecommendationPreferencesRequest - */ -const se_GetEffectiveRecommendationPreferencesRequest = ( - input: GetEffectiveRecommendationPreferencesRequest, - context: __SerdeContext -): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_GetEffectiveRecommendationPreferencesRequest omitted. -/** - * serializeAws_json1_0GetEnrollmentStatusesForOrganizationRequest - */ -const se_GetEnrollmentStatusesForOrganizationRequest = ( - input: GetEnrollmentStatusesForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.filters != null && { filters: se_EnrollmentFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetEnrollmentStatusesForOrganizationRequest omitted. -/** - * serializeAws_json1_0GetEnrollmentStatusRequest - */ -const se_GetEnrollmentStatusRequest = (input: GetEnrollmentStatusRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetEnrollmentStatusRequest omitted. -/** - * serializeAws_json1_0GetLambdaFunctionRecommendationsRequest - */ -const se_GetLambdaFunctionRecommendationsRequest = ( - input: GetLambdaFunctionRecommendationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.filters != null && { filters: se_LambdaFunctionRecommendationFilters(input.filters, context) }), - ...(input.functionArns != null && { functionArns: se_FunctionArns(input.functionArns, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetLambdaFunctionRecommendationsRequest omitted. -/** - * serializeAws_json1_0GetRecommendationPreferencesRequest - */ -const se_GetRecommendationPreferencesRequest = ( - input: GetRecommendationPreferencesRequest, - context: __SerdeContext -): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.scope != null && { scope: se_Scope(input.scope, context) }), - }; -}; +// se_GetRecommendationPreferencesRequest omitted. -/** - * serializeAws_json1_0GetRecommendationSummariesRequest - */ -const se_GetRecommendationSummariesRequest = ( - input: GetRecommendationSummariesRequest, - context: __SerdeContext -): any => { - return { - ...(input.accountIds != null && { accountIds: se_AccountIds(input.accountIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetRecommendationSummariesRequest omitted. -/** - * serializeAws_json1_0InstanceArns - */ -const se_InstanceArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceArns omitted. -/** - * serializeAws_json1_0JobFilter - */ -const se_JobFilter = (input: JobFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_JobFilter omitted. -/** - * serializeAws_json1_0JobFilters - */ -const se_JobFilters = (input: JobFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JobFilter(entry, context); - }); -}; +// se_JobFilters omitted. -/** - * serializeAws_json1_0JobIds - */ -const se_JobIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_JobIds omitted. -/** - * serializeAws_json1_0LambdaFunctionRecommendationFilter - */ -const se_LambdaFunctionRecommendationFilter = ( - input: LambdaFunctionRecommendationFilter, - context: __SerdeContext -): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_LambdaFunctionRecommendationFilter omitted. -/** - * serializeAws_json1_0LambdaFunctionRecommendationFilters - */ -const se_LambdaFunctionRecommendationFilters = ( - input: LambdaFunctionRecommendationFilter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LambdaFunctionRecommendationFilter(entry, context); - }); -}; +// se_LambdaFunctionRecommendationFilters omitted. -/** - * serializeAws_json1_0PutRecommendationPreferencesRequest - */ -const se_PutRecommendationPreferencesRequest = ( - input: PutRecommendationPreferencesRequest, - context: __SerdeContext -): any => { - return { - ...(input.enhancedInfrastructureMetrics != null && { - enhancedInfrastructureMetrics: input.enhancedInfrastructureMetrics, - }), - ...(input.externalMetricsPreference != null && { - externalMetricsPreference: se_ExternalMetricsPreference(input.externalMetricsPreference, context), - }), - ...(input.inferredWorkloadTypes != null && { inferredWorkloadTypes: input.inferredWorkloadTypes }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.scope != null && { scope: se_Scope(input.scope, context) }), - }; -}; +// se_PutRecommendationPreferencesRequest omitted. -/** - * serializeAws_json1_0RecommendationPreferenceNames - */ -const se_RecommendationPreferenceNames = ( - input: (RecommendationPreferenceName | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RecommendationPreferenceNames omitted. -/** - * serializeAws_json1_0RecommendationPreferences - */ -const se_RecommendationPreferences = (input: RecommendationPreferences, context: __SerdeContext): any => { - return { - ...(input.cpuVendorArchitectures != null && { - cpuVendorArchitectures: se_CpuVendorArchitectures(input.cpuVendorArchitectures, context), - }), - }; -}; +// se_RecommendationPreferences omitted. -/** - * serializeAws_json1_0S3DestinationConfig - */ -const se_S3DestinationConfig = (input: S3DestinationConfig, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - }; -}; +// se_S3DestinationConfig omitted. -/** - * serializeAws_json1_0Scope - */ -const se_Scope = (input: Scope, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Scope omitted. -/** - * serializeAws_json1_0ServiceArns - */ -const se_ServiceArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ServiceArns omitted. -/** - * serializeAws_json1_0UpdateEnrollmentStatusRequest - */ -const se_UpdateEnrollmentStatusRequest = (input: UpdateEnrollmentStatusRequest, context: __SerdeContext): any => { - return { - ...(input.includeMemberAccounts != null && { includeMemberAccounts: input.includeMemberAccounts }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_UpdateEnrollmentStatusRequest omitted. -/** - * serializeAws_json1_0VolumeArns - */ -const se_VolumeArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VolumeArns omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_0AccountEnrollmentStatus */ const de_AccountEnrollmentStatus = (output: any, context: __SerdeContext): AccountEnrollmentStatus => { - return { - accountId: __expectString(output.accountId), - lastUpdatedTimestamp: - output.lastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTimestamp))) - : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + accountId: __expectString, + lastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReason: __expectString, + }) as any; }; /** @@ -2771,211 +2148,90 @@ const de_AccountEnrollmentStatuses = (output: any, context: __SerdeContext): Acc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccountEnrollmentStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0AutoScalingGroupConfiguration - */ -const de_AutoScalingGroupConfiguration = (output: any, context: __SerdeContext): AutoScalingGroupConfiguration => { - return { - desiredCapacity: __expectInt32(output.desiredCapacity), - instanceType: __expectString(output.instanceType), - maxSize: __expectInt32(output.maxSize), - minSize: __expectInt32(output.minSize), - } as any; -}; +// de_AutoScalingGroupConfiguration omitted. /** * deserializeAws_json1_0AutoScalingGroupRecommendation */ const de_AutoScalingGroupRecommendation = (output: any, context: __SerdeContext): AutoScalingGroupRecommendation => { - return { - accountId: __expectString(output.accountId), - autoScalingGroupArn: __expectString(output.autoScalingGroupArn), - autoScalingGroupName: __expectString(output.autoScalingGroupName), - currentConfiguration: - output.currentConfiguration != null - ? de_AutoScalingGroupConfiguration(output.currentConfiguration, context) - : undefined, - currentPerformanceRisk: __expectString(output.currentPerformanceRisk), - effectiveRecommendationPreferences: - output.effectiveRecommendationPreferences != null - ? de_EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context) - : undefined, - finding: __expectString(output.finding), - inferredWorkloadTypes: - output.inferredWorkloadTypes != null - ? de_InferredWorkloadTypes(output.inferredWorkloadTypes, context) - : undefined, - lastRefreshTimestamp: - output.lastRefreshTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp))) - : undefined, - lookBackPeriodInDays: __limitedParseDouble(output.lookBackPeriodInDays), - recommendationOptions: - output.recommendationOptions != null - ? de_AutoScalingGroupRecommendationOptions(output.recommendationOptions, context) - : undefined, - utilizationMetrics: - output.utilizationMetrics != null ? de_UtilizationMetrics(output.utilizationMetrics, context) : undefined, - } as any; + return take(output, { + accountId: __expectString, + autoScalingGroupArn: __expectString, + autoScalingGroupName: __expectString, + currentConfiguration: _json, + currentPerformanceRisk: __expectString, + effectiveRecommendationPreferences: _json, + finding: __expectString, + inferredWorkloadTypes: _json, + lastRefreshTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lookBackPeriodInDays: __limitedParseDouble, + recommendationOptions: (_: any) => de_AutoScalingGroupRecommendationOptions(_, context), + utilizationMetrics: (_: any) => de_UtilizationMetrics(_, context), + }) as any; }; /** * deserializeAws_json1_0AutoScalingGroupRecommendationOption */ const de_AutoScalingGroupRecommendationOption = ( - output: any, - context: __SerdeContext -): AutoScalingGroupRecommendationOption => { - return { - configuration: - output.configuration != null ? de_AutoScalingGroupConfiguration(output.configuration, context) : undefined, - migrationEffort: __expectString(output.migrationEffort), - performanceRisk: __limitedParseDouble(output.performanceRisk), - projectedUtilizationMetrics: - output.projectedUtilizationMetrics != null - ? de_ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context) - : undefined, - rank: __expectInt32(output.rank), - savingsOpportunity: - output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0AutoScalingGroupRecommendationOptions - */ -const de_AutoScalingGroupRecommendationOptions = ( - output: any, - context: __SerdeContext -): AutoScalingGroupRecommendationOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoScalingGroupRecommendationOption(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0AutoScalingGroupRecommendations - */ -const de_AutoScalingGroupRecommendations = (output: any, context: __SerdeContext): AutoScalingGroupRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoScalingGroupRecommendation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0ContainerConfiguration - */ -const de_ContainerConfiguration = (output: any, context: __SerdeContext): ContainerConfiguration => { - return { - containerName: __expectString(output.containerName), - cpu: __expectInt32(output.cpu), - memorySizeConfiguration: - output.memorySizeConfiguration != null - ? de_MemorySizeConfiguration(output.memorySizeConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ContainerConfigurations - */ -const de_ContainerConfigurations = (output: any, context: __SerdeContext): ContainerConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0ContainerRecommendation - */ -const de_ContainerRecommendation = (output: any, context: __SerdeContext): ContainerRecommendation => { - return { - containerName: __expectString(output.containerName), - cpu: __expectInt32(output.cpu), - memorySizeConfiguration: - output.memorySizeConfiguration != null - ? de_MemorySizeConfiguration(output.memorySizeConfiguration, context) - : undefined, - } as any; + output: any, + context: __SerdeContext +): AutoScalingGroupRecommendationOption => { + return take(output, { + configuration: _json, + migrationEffort: __expectString, + performanceRisk: __limitedParseDouble, + projectedUtilizationMetrics: (_: any) => de_ProjectedUtilizationMetrics(_, context), + rank: __expectInt32, + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + }) as any; }; /** - * deserializeAws_json1_0ContainerRecommendations + * deserializeAws_json1_0AutoScalingGroupRecommendationOptions */ -const de_ContainerRecommendations = (output: any, context: __SerdeContext): ContainerRecommendation[] => { +const de_AutoScalingGroupRecommendationOptions = ( + output: any, + context: __SerdeContext +): AutoScalingGroupRecommendationOption[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerRecommendation(entry, context); + return de_AutoScalingGroupRecommendationOption(entry, context); }); return retVal; }; /** - * deserializeAws_json1_0CpuVendorArchitectures + * deserializeAws_json1_0AutoScalingGroupRecommendations */ -const de_CpuVendorArchitectures = (output: any, context: __SerdeContext): (CpuVendorArchitecture | string)[] => { +const de_AutoScalingGroupRecommendations = (output: any, context: __SerdeContext): AutoScalingGroupRecommendation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AutoScalingGroupRecommendation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0CurrentPerformanceRiskRatings - */ -const de_CurrentPerformanceRiskRatings = (output: any, context: __SerdeContext): CurrentPerformanceRiskRatings => { - return { - high: __expectLong(output.high), - low: __expectLong(output.low), - medium: __expectLong(output.medium), - veryLow: __expectLong(output.veryLow), - } as any; -}; +// de_ContainerConfiguration omitted. -/** - * deserializeAws_json1_0DeleteRecommendationPreferencesResponse - */ -const de_DeleteRecommendationPreferencesResponse = ( - output: any, - context: __SerdeContext -): DeleteRecommendationPreferencesResponse => { - return {} as any; -}; +// de_ContainerConfigurations omitted. + +// de_ContainerRecommendation omitted. + +// de_ContainerRecommendations omitted. + +// de_CpuVendorArchitectures omitted. + +// de_CurrentPerformanceRiskRatings omitted. + +// de_DeleteRecommendationPreferencesResponse omitted. /** * deserializeAws_json1_0DescribeRecommendationExportJobsResponse @@ -2984,24 +2240,21 @@ const de_DescribeRecommendationExportJobsResponse = ( output: any, context: __SerdeContext ): DescribeRecommendationExportJobsResponse => { - return { - nextToken: __expectString(output.nextToken), - recommendationExportJobs: - output.recommendationExportJobs != null - ? de_RecommendationExportJobs(output.recommendationExportJobs, context) - : undefined, - } as any; + return take(output, { + nextToken: __expectString, + recommendationExportJobs: (_: any) => de_RecommendationExportJobs(_, context), + }) as any; }; /** * deserializeAws_json1_0EBSUtilizationMetric */ const de_EBSUtilizationMetric = (output: any, context: __SerdeContext): EBSUtilizationMetric => { - return { - name: __expectString(output.name), - statistic: __expectString(output.statistic), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + statistic: __expectString, + value: __limitedParseDouble, + }) as any; }; /** @@ -3011,9 +2264,6 @@ const de_EBSUtilizationMetrics = (output: any, context: __SerdeContext): EBSUtil const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EBSUtilizationMetric(entry, context); }); return retVal; @@ -3023,12 +2273,12 @@ const de_EBSUtilizationMetrics = (output: any, context: __SerdeContext): EBSUtil * deserializeAws_json1_0ECSServiceProjectedMetric */ const de_ECSServiceProjectedMetric = (output: any, context: __SerdeContext): ECSServiceProjectedMetric => { - return { - lowerBoundValues: output.lowerBoundValues != null ? de_MetricValues(output.lowerBoundValues, context) : undefined, - name: __expectString(output.name), - timestamps: output.timestamps != null ? de_Timestamps(output.timestamps, context) : undefined, - upperBoundValues: output.upperBoundValues != null ? de_MetricValues(output.upperBoundValues, context) : undefined, - } as any; + return take(output, { + lowerBoundValues: (_: any) => de_MetricValues(_, context), + name: __expectString, + timestamps: (_: any) => de_Timestamps(_, context), + upperBoundValues: (_: any) => de_MetricValues(_, context), + }) as any; }; /** @@ -3038,9 +2288,6 @@ const de_ECSServiceProjectedMetrics = (output: any, context: __SerdeContext): EC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ECSServiceProjectedMetric(entry, context); }); return retVal; @@ -3053,12 +2300,12 @@ const de_ECSServiceProjectedUtilizationMetric = ( output: any, context: __SerdeContext ): ECSServiceProjectedUtilizationMetric => { - return { - lowerBoundValue: __limitedParseDouble(output.lowerBoundValue), - name: __expectString(output.name), - statistic: __expectString(output.statistic), - upperBoundValue: __limitedParseDouble(output.upperBoundValue), - } as any; + return take(output, { + lowerBoundValue: __limitedParseDouble, + name: __expectString, + statistic: __expectString, + upperBoundValue: __limitedParseDouble, + }) as any; }; /** @@ -3071,9 +2318,6 @@ const de_ECSServiceProjectedUtilizationMetrics = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ECSServiceProjectedUtilizationMetric(entry, context); }); return retVal; @@ -3083,72 +2327,34 @@ const de_ECSServiceProjectedUtilizationMetrics = ( * deserializeAws_json1_0ECSServiceRecommendation */ const de_ECSServiceRecommendation = (output: any, context: __SerdeContext): ECSServiceRecommendation => { - return { - accountId: __expectString(output.accountId), - currentPerformanceRisk: __expectString(output.currentPerformanceRisk), - currentServiceConfiguration: - output.currentServiceConfiguration != null - ? de_ServiceConfiguration(output.currentServiceConfiguration, context) - : undefined, - finding: __expectString(output.finding), - findingReasonCodes: - output.findingReasonCodes != null - ? de_ECSServiceRecommendationFindingReasonCodes(output.findingReasonCodes, context) - : undefined, - lastRefreshTimestamp: - output.lastRefreshTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp))) - : undefined, - launchType: __expectString(output.launchType), - lookbackPeriodInDays: __limitedParseDouble(output.lookbackPeriodInDays), - serviceArn: __expectString(output.serviceArn), - serviceRecommendationOptions: - output.serviceRecommendationOptions != null - ? de_ECSServiceRecommendationOptions(output.serviceRecommendationOptions, context) - : undefined, - utilizationMetrics: - output.utilizationMetrics != null - ? de_ECSServiceUtilizationMetrics(output.utilizationMetrics, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ECSServiceRecommendationFindingReasonCodes - */ -const de_ECSServiceRecommendationFindingReasonCodes = ( - output: any, - context: __SerdeContext -): (ECSServiceRecommendationFindingReasonCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + accountId: __expectString, + currentPerformanceRisk: __expectString, + currentServiceConfiguration: _json, + finding: __expectString, + findingReasonCodes: _json, + lastRefreshTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + launchType: __expectString, + lookbackPeriodInDays: __limitedParseDouble, + serviceArn: __expectString, + serviceRecommendationOptions: (_: any) => de_ECSServiceRecommendationOptions(_, context), + utilizationMetrics: (_: any) => de_ECSServiceUtilizationMetrics(_, context), + }) as any; }; +// de_ECSServiceRecommendationFindingReasonCodes omitted. + /** * deserializeAws_json1_0ECSServiceRecommendationOption */ const de_ECSServiceRecommendationOption = (output: any, context: __SerdeContext): ECSServiceRecommendationOption => { - return { - containerRecommendations: - output.containerRecommendations != null - ? de_ContainerRecommendations(output.containerRecommendations, context) - : undefined, - cpu: __expectInt32(output.cpu), - memory: __expectInt32(output.memory), - projectedUtilizationMetrics: - output.projectedUtilizationMetrics != null - ? de_ECSServiceProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context) - : undefined, - savingsOpportunity: - output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined, - } as any; + return take(output, { + containerRecommendations: _json, + cpu: __expectInt32, + memory: __expectInt32, + projectedUtilizationMetrics: (_: any) => de_ECSServiceProjectedUtilizationMetrics(_, context), + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + }) as any; }; /** @@ -3158,9 +2364,6 @@ const de_ECSServiceRecommendationOptions = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ECSServiceRecommendationOption(entry, context); }); return retVal; @@ -3173,9 +2376,6 @@ const de_ECSServiceRecommendations = (output: any, context: __SerdeContext): ECS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ECSServiceRecommendation(entry, context); }); return retVal; @@ -3188,12 +2388,11 @@ const de_ECSServiceRecommendedOptionProjectedMetric = ( output: any, context: __SerdeContext ): ECSServiceRecommendedOptionProjectedMetric => { - return { - projectedMetrics: - output.projectedMetrics != null ? de_ECSServiceProjectedMetrics(output.projectedMetrics, context) : undefined, - recommendedCpuUnits: __expectInt32(output.recommendedCpuUnits), - recommendedMemorySize: __expectInt32(output.recommendedMemorySize), - } as any; + return take(output, { + projectedMetrics: (_: any) => de_ECSServiceProjectedMetrics(_, context), + recommendedCpuUnits: __expectInt32, + recommendedMemorySize: __expectInt32, + }) as any; }; /** @@ -3206,9 +2405,6 @@ const de_ECSServiceRecommendedOptionProjectedMetrics = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ECSServiceRecommendedOptionProjectedMetric(entry, context); }); return retVal; @@ -3218,11 +2414,11 @@ const de_ECSServiceRecommendedOptionProjectedMetrics = ( * deserializeAws_json1_0ECSServiceUtilizationMetric */ const de_ECSServiceUtilizationMetric = (output: any, context: __SerdeContext): ECSServiceUtilizationMetric => { - return { - name: __expectString(output.name), - statistic: __expectString(output.statistic), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + statistic: __expectString, + value: __limitedParseDouble, + }) as any; }; /** @@ -3232,127 +2428,36 @@ const de_ECSServiceUtilizationMetrics = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ECSServiceUtilizationMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0EffectiveRecommendationPreferences - */ -const de_EffectiveRecommendationPreferences = ( - output: any, - context: __SerdeContext -): EffectiveRecommendationPreferences => { - return { - cpuVendorArchitectures: - output.cpuVendorArchitectures != null - ? de_CpuVendorArchitectures(output.cpuVendorArchitectures, context) - : undefined, - enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics), - externalMetricsPreference: - output.externalMetricsPreference != null - ? de_ExternalMetricsPreference(output.externalMetricsPreference, context) - : undefined, - inferredWorkloadTypes: __expectString(output.inferredWorkloadTypes), - } as any; -}; +// de_EffectiveRecommendationPreferences omitted. /** * deserializeAws_json1_0EstimatedMonthlySavings */ const de_EstimatedMonthlySavings = (output: any, context: __SerdeContext): EstimatedMonthlySavings => { - return { - currency: __expectString(output.currency), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + currency: __expectString, + value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_0ExportAutoScalingGroupRecommendationsResponse - */ -const de_ExportAutoScalingGroupRecommendationsResponse = ( - output: any, - context: __SerdeContext -): ExportAutoScalingGroupRecommendationsResponse => { - return { - jobId: __expectString(output.jobId), - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; -}; +// de_ExportAutoScalingGroupRecommendationsResponse omitted. -/** - * deserializeAws_json1_0ExportDestination - */ -const de_ExportDestination = (output: any, context: __SerdeContext): ExportDestination => { - return { - s3: output.s3 != null ? de_S3Destination(output.s3, context) : undefined, - } as any; -}; +// de_ExportDestination omitted. -/** - * deserializeAws_json1_0ExportEBSVolumeRecommendationsResponse - */ -const de_ExportEBSVolumeRecommendationsResponse = ( - output: any, - context: __SerdeContext -): ExportEBSVolumeRecommendationsResponse => { - return { - jobId: __expectString(output.jobId), - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; -}; +// de_ExportEBSVolumeRecommendationsResponse omitted. -/** - * deserializeAws_json1_0ExportEC2InstanceRecommendationsResponse - */ -const de_ExportEC2InstanceRecommendationsResponse = ( - output: any, - context: __SerdeContext -): ExportEC2InstanceRecommendationsResponse => { - return { - jobId: __expectString(output.jobId), - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; -}; +// de_ExportEC2InstanceRecommendationsResponse omitted. -/** - * deserializeAws_json1_0ExportECSServiceRecommendationsResponse - */ -const de_ExportECSServiceRecommendationsResponse = ( - output: any, - context: __SerdeContext -): ExportECSServiceRecommendationsResponse => { - return { - jobId: __expectString(output.jobId), - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; -}; +// de_ExportECSServiceRecommendationsResponse omitted. -/** - * deserializeAws_json1_0ExportLambdaFunctionRecommendationsResponse - */ -const de_ExportLambdaFunctionRecommendationsResponse = ( - output: any, - context: __SerdeContext -): ExportLambdaFunctionRecommendationsResponse => { - return { - jobId: __expectString(output.jobId), - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; -}; +// de_ExportLambdaFunctionRecommendationsResponse omitted. -/** - * deserializeAws_json1_0ExternalMetricsPreference - */ -const de_ExternalMetricsPreference = (output: any, context: __SerdeContext): ExternalMetricsPreference => { - return { - source: __expectString(output.source), - } as any; -}; +// de_ExternalMetricsPreference omitted. /** * deserializeAws_json1_0GetAutoScalingGroupRecommendationsResponse @@ -3361,14 +2466,11 @@ const de_GetAutoScalingGroupRecommendationsResponse = ( output: any, context: __SerdeContext ): GetAutoScalingGroupRecommendationsResponse => { - return { - autoScalingGroupRecommendations: - output.autoScalingGroupRecommendations != null - ? de_AutoScalingGroupRecommendations(output.autoScalingGroupRecommendations, context) - : undefined, - errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + autoScalingGroupRecommendations: (_: any) => de_AutoScalingGroupRecommendations(_, context), + errors: _json, + nextToken: __expectString, + }) as any; }; /** @@ -3378,14 +2480,11 @@ const de_GetEBSVolumeRecommendationsResponse = ( output: any, context: __SerdeContext ): GetEBSVolumeRecommendationsResponse => { - return { - errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined, - nextToken: __expectString(output.nextToken), - volumeRecommendations: - output.volumeRecommendations != null - ? de_VolumeRecommendations(output.volumeRecommendations, context) - : undefined, - } as any; + return take(output, { + errors: _json, + nextToken: __expectString, + volumeRecommendations: (_: any) => de_VolumeRecommendations(_, context), + }) as any; }; /** @@ -3395,14 +2494,11 @@ const de_GetEC2InstanceRecommendationsResponse = ( output: any, context: __SerdeContext ): GetEC2InstanceRecommendationsResponse => { - return { - errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined, - instanceRecommendations: - output.instanceRecommendations != null - ? de_InstanceRecommendations(output.instanceRecommendations, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + errors: _json, + instanceRecommendations: (_: any) => de_InstanceRecommendations(_, context), + nextToken: __expectString, + }) as any; }; /** @@ -3412,12 +2508,9 @@ const de_GetEC2RecommendationProjectedMetricsResponse = ( output: any, context: __SerdeContext ): GetEC2RecommendationProjectedMetricsResponse => { - return { - recommendedOptionProjectedMetrics: - output.recommendedOptionProjectedMetrics != null - ? de_RecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context) - : undefined, - } as any; + return take(output, { + recommendedOptionProjectedMetrics: (_: any) => de_RecommendedOptionProjectedMetrics(_, context), + }) as any; }; /** @@ -3427,12 +2520,9 @@ const de_GetECSServiceRecommendationProjectedMetricsResponse = ( output: any, context: __SerdeContext ): GetECSServiceRecommendationProjectedMetricsResponse => { - return { - recommendedOptionProjectedMetrics: - output.recommendedOptionProjectedMetrics != null - ? de_ECSServiceRecommendedOptionProjectedMetrics(output.recommendedOptionProjectedMetrics, context) - : undefined, - } as any; + return take(output, { + recommendedOptionProjectedMetrics: (_: any) => de_ECSServiceRecommendedOptionProjectedMetrics(_, context), + }) as any; }; /** @@ -3442,31 +2532,14 @@ const de_GetECSServiceRecommendationsResponse = ( output: any, context: __SerdeContext ): GetECSServiceRecommendationsResponse => { - return { - ecsServiceRecommendations: - output.ecsServiceRecommendations != null - ? de_ECSServiceRecommendations(output.ecsServiceRecommendations, context) - : undefined, - errors: output.errors != null ? de_GetRecommendationErrors(output.errors, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + ecsServiceRecommendations: (_: any) => de_ECSServiceRecommendations(_, context), + errors: _json, + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0GetEffectiveRecommendationPreferencesResponse - */ -const de_GetEffectiveRecommendationPreferencesResponse = ( - output: any, - context: __SerdeContext -): GetEffectiveRecommendationPreferencesResponse => { - return { - enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics), - externalMetricsPreference: - output.externalMetricsPreference != null - ? de_ExternalMetricsPreference(output.externalMetricsPreference, context) - : undefined, - } as any; -}; +// de_GetEffectiveRecommendationPreferencesResponse omitted. /** * deserializeAws_json1_0GetEnrollmentStatusesForOrganizationResponse @@ -3475,29 +2548,23 @@ const de_GetEnrollmentStatusesForOrganizationResponse = ( output: any, context: __SerdeContext ): GetEnrollmentStatusesForOrganizationResponse => { - return { - accountEnrollmentStatuses: - output.accountEnrollmentStatuses != null - ? de_AccountEnrollmentStatuses(output.accountEnrollmentStatuses, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + accountEnrollmentStatuses: (_: any) => de_AccountEnrollmentStatuses(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0GetEnrollmentStatusResponse */ const de_GetEnrollmentStatusResponse = (output: any, context: __SerdeContext): GetEnrollmentStatusResponse => { - return { - lastUpdatedTimestamp: - output.lastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTimestamp))) - : undefined, - memberAccountsEnrolled: __expectBoolean(output.memberAccountsEnrolled), - numberOfMemberAccountsOptedIn: __expectInt32(output.numberOfMemberAccountsOptedIn), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + lastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + memberAccountsEnrolled: __expectBoolean, + numberOfMemberAccountsOptedIn: __expectInt32, + status: __expectString, + statusReason: __expectString, + }) as any; }; /** @@ -3507,56 +2574,17 @@ const de_GetLambdaFunctionRecommendationsResponse = ( output: any, context: __SerdeContext ): GetLambdaFunctionRecommendationsResponse => { - return { - lambdaFunctionRecommendations: - output.lambdaFunctionRecommendations != null - ? de_LambdaFunctionRecommendations(output.lambdaFunctionRecommendations, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + lambdaFunctionRecommendations: (_: any) => de_LambdaFunctionRecommendations(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0GetRecommendationError - */ -const de_GetRecommendationError = (output: any, context: __SerdeContext): GetRecommendationError => { - return { - code: __expectString(output.code), - identifier: __expectString(output.identifier), - message: __expectString(output.message), - } as any; -}; +// de_GetRecommendationError omitted. -/** - * deserializeAws_json1_0GetRecommendationErrors - */ -const de_GetRecommendationErrors = (output: any, context: __SerdeContext): GetRecommendationError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GetRecommendationError(entry, context); - }); - return retVal; -}; +// de_GetRecommendationErrors omitted. -/** - * deserializeAws_json1_0GetRecommendationPreferencesResponse - */ -const de_GetRecommendationPreferencesResponse = ( - output: any, - context: __SerdeContext -): GetRecommendationPreferencesResponse => { - return { - nextToken: __expectString(output.nextToken), - recommendationPreferencesDetails: - output.recommendationPreferencesDetails != null - ? de_RecommendationPreferencesDetails(output.recommendationPreferencesDetails, context) - : undefined, - } as any; -}; +// de_GetRecommendationPreferencesResponse omitted. /** * deserializeAws_json1_0GetRecommendationSummariesResponse @@ -3565,108 +2593,52 @@ const de_GetRecommendationSummariesResponse = ( output: any, context: __SerdeContext ): GetRecommendationSummariesResponse => { - return { - nextToken: __expectString(output.nextToken), - recommendationSummaries: - output.recommendationSummaries != null - ? de_RecommendationSummaries(output.recommendationSummaries, context) - : undefined, - } as any; + return take(output, { + nextToken: __expectString, + recommendationSummaries: (_: any) => de_RecommendationSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0InferredWorkloadTypes - */ -const de_InferredWorkloadTypes = (output: any, context: __SerdeContext): (InferredWorkloadType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InferredWorkloadTypes omitted. /** * deserializeAws_json1_0InstanceRecommendation */ const de_InstanceRecommendation = (output: any, context: __SerdeContext): InstanceRecommendation => { - return { - accountId: __expectString(output.accountId), - currentInstanceType: __expectString(output.currentInstanceType), - currentPerformanceRisk: __expectString(output.currentPerformanceRisk), - effectiveRecommendationPreferences: - output.effectiveRecommendationPreferences != null - ? de_EffectiveRecommendationPreferences(output.effectiveRecommendationPreferences, context) - : undefined, - finding: __expectString(output.finding), - findingReasonCodes: - output.findingReasonCodes != null - ? de_InstanceRecommendationFindingReasonCodes(output.findingReasonCodes, context) - : undefined, - inferredWorkloadTypes: - output.inferredWorkloadTypes != null - ? de_InferredWorkloadTypes(output.inferredWorkloadTypes, context) - : undefined, - instanceArn: __expectString(output.instanceArn), - instanceName: __expectString(output.instanceName), - instanceState: __expectString(output.instanceState), - lastRefreshTimestamp: - output.lastRefreshTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp))) - : undefined, - lookBackPeriodInDays: __limitedParseDouble(output.lookBackPeriodInDays), - recommendationOptions: - output.recommendationOptions != null - ? de_RecommendationOptions(output.recommendationOptions, context) - : undefined, - recommendationSources: - output.recommendationSources != null - ? de_RecommendationSources(output.recommendationSources, context) - : undefined, - utilizationMetrics: - output.utilizationMetrics != null ? de_UtilizationMetrics(output.utilizationMetrics, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0InstanceRecommendationFindingReasonCodes - */ -const de_InstanceRecommendationFindingReasonCodes = ( - output: any, - context: __SerdeContext -): (InstanceRecommendationFindingReasonCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + accountId: __expectString, + currentInstanceType: __expectString, + currentPerformanceRisk: __expectString, + effectiveRecommendationPreferences: _json, + finding: __expectString, + findingReasonCodes: _json, + inferredWorkloadTypes: _json, + instanceArn: __expectString, + instanceName: __expectString, + instanceState: __expectString, + lastRefreshTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lookBackPeriodInDays: __limitedParseDouble, + recommendationOptions: (_: any) => de_RecommendationOptions(_, context), + recommendationSources: _json, + utilizationMetrics: (_: any) => de_UtilizationMetrics(_, context), + }) as any; +}; + +// de_InstanceRecommendationFindingReasonCodes omitted. /** * deserializeAws_json1_0InstanceRecommendationOption */ const de_InstanceRecommendationOption = (output: any, context: __SerdeContext): InstanceRecommendationOption => { - return { - instanceType: __expectString(output.instanceType), - migrationEffort: __expectString(output.migrationEffort), - performanceRisk: __limitedParseDouble(output.performanceRisk), - platformDifferences: - output.platformDifferences != null ? de_PlatformDifferences(output.platformDifferences, context) : undefined, - projectedUtilizationMetrics: - output.projectedUtilizationMetrics != null - ? de_ProjectedUtilizationMetrics(output.projectedUtilizationMetrics, context) - : undefined, - rank: __expectInt32(output.rank), - savingsOpportunity: - output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined, - } as any; + return take(output, { + instanceType: __expectString, + migrationEffort: __expectString, + performanceRisk: __limitedParseDouble, + platformDifferences: _json, + projectedUtilizationMetrics: (_: any) => de_ProjectedUtilizationMetrics(_, context), + rank: __expectInt32, + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + }) as any; }; /** @@ -3676,31 +2648,14 @@ const de_InstanceRecommendations = (output: any, context: __SerdeContext): Insta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstanceRecommendation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0InvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterValueException omitted. /** * deserializeAws_json1_0LambdaFunctionMemoryProjectedMetric @@ -3709,11 +2664,11 @@ const de_LambdaFunctionMemoryProjectedMetric = ( output: any, context: __SerdeContext ): LambdaFunctionMemoryProjectedMetric => { - return { - name: __expectString(output.name), - statistic: __expectString(output.statistic), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + statistic: __expectString, + value: __limitedParseDouble, + }) as any; }; /** @@ -3726,9 +2681,6 @@ const de_LambdaFunctionMemoryProjectedMetrics = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LambdaFunctionMemoryProjectedMetric(entry, context); }); return retVal; @@ -3741,16 +2693,12 @@ const de_LambdaFunctionMemoryRecommendationOption = ( output: any, context: __SerdeContext ): LambdaFunctionMemoryRecommendationOption => { - return { - memorySize: __expectInt32(output.memorySize), - projectedUtilizationMetrics: - output.projectedUtilizationMetrics != null - ? de_LambdaFunctionMemoryProjectedMetrics(output.projectedUtilizationMetrics, context) - : undefined, - rank: __expectInt32(output.rank), - savingsOpportunity: - output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined, - } as any; + return take(output, { + memorySize: __expectInt32, + projectedUtilizationMetrics: (_: any) => de_LambdaFunctionMemoryProjectedMetrics(_, context), + rank: __expectInt32, + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + }) as any; }; /** @@ -3763,9 +2711,6 @@ const de_LambdaFunctionMemoryRecommendationOptions = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LambdaFunctionMemoryRecommendationOption(entry, context); }); return retVal; @@ -3775,52 +2720,24 @@ const de_LambdaFunctionMemoryRecommendationOptions = ( * deserializeAws_json1_0LambdaFunctionRecommendation */ const de_LambdaFunctionRecommendation = (output: any, context: __SerdeContext): LambdaFunctionRecommendation => { - return { - accountId: __expectString(output.accountId), - currentMemorySize: __expectInt32(output.currentMemorySize), - currentPerformanceRisk: __expectString(output.currentPerformanceRisk), - finding: __expectString(output.finding), - findingReasonCodes: - output.findingReasonCodes != null - ? de_LambdaFunctionRecommendationFindingReasonCodes(output.findingReasonCodes, context) - : undefined, - functionArn: __expectString(output.functionArn), - functionVersion: __expectString(output.functionVersion), - lastRefreshTimestamp: - output.lastRefreshTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp))) - : undefined, - lookbackPeriodInDays: __limitedParseDouble(output.lookbackPeriodInDays), - memorySizeRecommendationOptions: - output.memorySizeRecommendationOptions != null - ? de_LambdaFunctionMemoryRecommendationOptions(output.memorySizeRecommendationOptions, context) - : undefined, - numberOfInvocations: __expectLong(output.numberOfInvocations), - utilizationMetrics: - output.utilizationMetrics != null - ? de_LambdaFunctionUtilizationMetrics(output.utilizationMetrics, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0LambdaFunctionRecommendationFindingReasonCodes - */ -const de_LambdaFunctionRecommendationFindingReasonCodes = ( - output: any, - context: __SerdeContext -): (LambdaFunctionRecommendationFindingReasonCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + accountId: __expectString, + currentMemorySize: __expectInt32, + currentPerformanceRisk: __expectString, + finding: __expectString, + findingReasonCodes: _json, + functionArn: __expectString, + functionVersion: __expectString, + lastRefreshTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lookbackPeriodInDays: __limitedParseDouble, + memorySizeRecommendationOptions: (_: any) => de_LambdaFunctionMemoryRecommendationOptions(_, context), + numberOfInvocations: __expectLong, + utilizationMetrics: (_: any) => de_LambdaFunctionUtilizationMetrics(_, context), + }) as any; }; +// de_LambdaFunctionRecommendationFindingReasonCodes omitted. + /** * deserializeAws_json1_0LambdaFunctionRecommendations */ @@ -3828,9 +2745,6 @@ const de_LambdaFunctionRecommendations = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LambdaFunctionRecommendation(entry, context); }); return retVal; @@ -3840,11 +2754,11 @@ const de_LambdaFunctionRecommendations = (output: any, context: __SerdeContext): * deserializeAws_json1_0LambdaFunctionUtilizationMetric */ const de_LambdaFunctionUtilizationMetric = (output: any, context: __SerdeContext): LambdaFunctionUtilizationMetric => { - return { - name: __expectString(output.name), - statistic: __expectString(output.statistic), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + statistic: __expectString, + value: __limitedParseDouble, + }) as any; }; /** @@ -3857,32 +2771,14 @@ const de_LambdaFunctionUtilizationMetrics = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LambdaFunctionUtilizationMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_0MemorySizeConfiguration - */ -const de_MemorySizeConfiguration = (output: any, context: __SerdeContext): MemorySizeConfiguration => { - return { - memory: __expectInt32(output.memory), - memoryReservation: __expectInt32(output.memoryReservation), - } as any; -}; +// de_MemorySizeConfiguration omitted. /** * deserializeAws_json1_0MetricValues @@ -3891,56 +2787,26 @@ const de_MetricValues = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_json1_0MissingAuthenticationToken - */ -const de_MissingAuthenticationToken = (output: any, context: __SerdeContext): MissingAuthenticationToken => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MissingAuthenticationToken omitted. -/** - * deserializeAws_json1_0OptInRequiredException - */ -const de_OptInRequiredException = (output: any, context: __SerdeContext): OptInRequiredException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_OptInRequiredException omitted. -/** - * deserializeAws_json1_0PlatformDifferences - */ -const de_PlatformDifferences = (output: any, context: __SerdeContext): (PlatformDifference | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PlatformDifferences omitted. /** * deserializeAws_json1_0ProjectedMetric */ const de_ProjectedMetric = (output: any, context: __SerdeContext): ProjectedMetric => { - return { - name: __expectString(output.name), - timestamps: output.timestamps != null ? de_Timestamps(output.timestamps, context) : undefined, - values: output.values != null ? de_MetricValues(output.values, context) : undefined, - } as any; + return take(output, { + name: __expectString, + timestamps: (_: any) => de_Timestamps(_, context), + values: (_: any) => de_MetricValues(_, context), + }) as any; }; /** @@ -3950,9 +2816,6 @@ const de_ProjectedMetrics = (output: any, context: __SerdeContext): ProjectedMet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectedMetric(entry, context); }); return retVal; @@ -3965,23 +2828,12 @@ const de_ProjectedUtilizationMetrics = (output: any, context: __SerdeContext): U const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UtilizationMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0PutRecommendationPreferencesResponse - */ -const de_PutRecommendationPreferencesResponse = ( - output: any, - context: __SerdeContext -): PutRecommendationPreferencesResponse => { - return {} as any; -}; +// de_PutRecommendationPreferencesResponse omitted. /** * deserializeAws_json1_0ReasonCodeSummaries @@ -3990,9 +2842,6 @@ const de_ReasonCodeSummaries = (output: any, context: __SerdeContext): ReasonCod const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReasonCodeSummary(entry, context); }); return retVal; @@ -4002,31 +2851,25 @@ const de_ReasonCodeSummaries = (output: any, context: __SerdeContext): ReasonCod * deserializeAws_json1_0ReasonCodeSummary */ const de_ReasonCodeSummary = (output: any, context: __SerdeContext): ReasonCodeSummary => { - return { - name: __expectString(output.name), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_0RecommendationExportJob */ const de_RecommendationExportJob = (output: any, context: __SerdeContext): RecommendationExportJob => { - return { - creationTimestamp: - output.creationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp))) - : undefined, - destination: output.destination != null ? de_ExportDestination(output.destination, context) : undefined, - failureReason: __expectString(output.failureReason), - jobId: __expectString(output.jobId), - lastUpdatedTimestamp: - output.lastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTimestamp))) - : undefined, - resourceType: __expectString(output.resourceType), - status: __expectString(output.status), - } as any; + return take(output, { + creationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + destination: _json, + failureReason: __expectString, + jobId: __expectString, + lastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceType: __expectString, + status: __expectString, + }) as any; }; /** @@ -4036,9 +2879,6 @@ const de_RecommendationExportJobs = (output: any, context: __SerdeContext): Reco const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecommendationExportJob(entry, context); }); return retVal; @@ -4051,72 +2891,18 @@ const de_RecommendationOptions = (output: any, context: __SerdeContext): Instanc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstanceRecommendationOption(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0RecommendationPreferencesDetail - */ -const de_RecommendationPreferencesDetail = (output: any, context: __SerdeContext): RecommendationPreferencesDetail => { - return { - enhancedInfrastructureMetrics: __expectString(output.enhancedInfrastructureMetrics), - externalMetricsPreference: - output.externalMetricsPreference != null - ? de_ExternalMetricsPreference(output.externalMetricsPreference, context) - : undefined, - inferredWorkloadTypes: __expectString(output.inferredWorkloadTypes), - resourceType: __expectString(output.resourceType), - scope: output.scope != null ? de_Scope(output.scope, context) : undefined, - } as any; -}; +// de_RecommendationPreferencesDetail omitted. -/** - * deserializeAws_json1_0RecommendationPreferencesDetails - */ -const de_RecommendationPreferencesDetails = ( - output: any, - context: __SerdeContext -): RecommendationPreferencesDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationPreferencesDetail(entry, context); - }); - return retVal; -}; +// de_RecommendationPreferencesDetails omitted. -/** - * deserializeAws_json1_0RecommendationSource - */ -const de_RecommendationSource = (output: any, context: __SerdeContext): RecommendationSource => { - return { - recommendationSourceArn: __expectString(output.recommendationSourceArn), - recommendationSourceType: __expectString(output.recommendationSourceType), - } as any; -}; +// de_RecommendationSource omitted. -/** - * deserializeAws_json1_0RecommendationSources - */ -const de_RecommendationSources = (output: any, context: __SerdeContext): RecommendationSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationSource(entry, context); - }); - return retVal; -}; +// de_RecommendationSources omitted. /** * deserializeAws_json1_0RecommendationSummaries @@ -4125,9 +2911,6 @@ const de_RecommendationSummaries = (output: any, context: __SerdeContext): Recom const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecommendationSummary(entry, context); }); return retVal; @@ -4137,17 +2920,13 @@ const de_RecommendationSummaries = (output: any, context: __SerdeContext): Recom * deserializeAws_json1_0RecommendationSummary */ const de_RecommendationSummary = (output: any, context: __SerdeContext): RecommendationSummary => { - return { - accountId: __expectString(output.accountId), - currentPerformanceRiskRatings: - output.currentPerformanceRiskRatings != null - ? de_CurrentPerformanceRiskRatings(output.currentPerformanceRiskRatings, context) - : undefined, - recommendationResourceType: __expectString(output.recommendationResourceType), - savingsOpportunity: - output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined, - summaries: output.summaries != null ? de_Summaries(output.summaries, context) : undefined, - } as any; + return take(output, { + accountId: __expectString, + currentPerformanceRiskRatings: _json, + recommendationResourceType: __expectString, + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + summaries: (_: any) => de_Summaries(_, context), + }) as any; }; /** @@ -4157,12 +2936,11 @@ const de_RecommendedOptionProjectedMetric = ( output: any, context: __SerdeContext ): RecommendedOptionProjectedMetric => { - return { - projectedMetrics: - output.projectedMetrics != null ? de_ProjectedMetrics(output.projectedMetrics, context) : undefined, - rank: __expectInt32(output.rank), - recommendedInstanceType: __expectString(output.recommendedInstanceType), - } as any; + return take(output, { + projectedMetrics: (_: any) => de_ProjectedMetrics(_, context), + rank: __expectInt32, + recommendedInstanceType: __expectString, + }) as any; }; /** @@ -4175,81 +2953,30 @@ const de_RecommendedOptionProjectedMetrics = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecommendedOptionProjectedMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0S3Destination - */ -const de_S3Destination = (output: any, context: __SerdeContext): S3Destination => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - metadataKey: __expectString(output.metadataKey), - } as any; -}; +// de_S3Destination omitted. /** * deserializeAws_json1_0SavingsOpportunity */ const de_SavingsOpportunity = (output: any, context: __SerdeContext): SavingsOpportunity => { - return { - estimatedMonthlySavings: - output.estimatedMonthlySavings != null - ? de_EstimatedMonthlySavings(output.estimatedMonthlySavings, context) - : undefined, - savingsOpportunityPercentage: __limitedParseDouble(output.savingsOpportunityPercentage), - } as any; + return take(output, { + estimatedMonthlySavings: (_: any) => de_EstimatedMonthlySavings(_, context), + savingsOpportunityPercentage: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_0Scope - */ -const de_Scope = (output: any, context: __SerdeContext): Scope => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_Scope omitted. -/** - * deserializeAws_json1_0ServiceConfiguration - */ -const de_ServiceConfiguration = (output: any, context: __SerdeContext): ServiceConfiguration => { - return { - autoScalingConfiguration: __expectString(output.autoScalingConfiguration), - containerConfigurations: - output.containerConfigurations != null - ? de_ContainerConfigurations(output.containerConfigurations, context) - : undefined, - cpu: __expectInt32(output.cpu), - memory: __expectInt32(output.memory), - taskDefinitionArn: __expectString(output.taskDefinitionArn), - } as any; -}; +// de_ServiceConfiguration omitted. -/** - * deserializeAws_json1_0ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceUnavailableException omitted. /** * deserializeAws_json1_0Summaries @@ -4258,9 +2985,6 @@ const de_Summaries = (output: any, context: __SerdeContext): Summary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Summary(entry, context); }); return retVal; @@ -4270,22 +2994,14 @@ const de_Summaries = (output: any, context: __SerdeContext): Summary[] => { * deserializeAws_json1_0Summary */ const de_Summary = (output: any, context: __SerdeContext): Summary => { - return { - name: __expectString(output.name), - reasonCodeSummaries: - output.reasonCodeSummaries != null ? de_ReasonCodeSummaries(output.reasonCodeSummaries, context) : undefined, - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + reasonCodeSummaries: (_: any) => de_ReasonCodeSummaries(_, context), + value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. /** * deserializeAws_json1_0Timestamps @@ -4294,33 +3010,22 @@ const de_Timestamps = (output: any, context: __SerdeContext): Date[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry))); }); return retVal; }; -/** - * deserializeAws_json1_0UpdateEnrollmentStatusResponse - */ -const de_UpdateEnrollmentStatusResponse = (output: any, context: __SerdeContext): UpdateEnrollmentStatusResponse => { - return { - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; -}; +// de_UpdateEnrollmentStatusResponse omitted. /** * deserializeAws_json1_0UtilizationMetric */ const de_UtilizationMetric = (output: any, context: __SerdeContext): UtilizationMetric => { - return { - name: __expectString(output.name), - statistic: __expectString(output.statistic), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + name: __expectString, + statistic: __expectString, + value: __limitedParseDouble, + }) as any; }; /** @@ -4330,65 +3035,40 @@ const de_UtilizationMetrics = (output: any, context: __SerdeContext): Utilizatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UtilizationMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0VolumeConfiguration - */ -const de_VolumeConfiguration = (output: any, context: __SerdeContext): VolumeConfiguration => { - return { - rootVolume: __expectBoolean(output.rootVolume), - volumeBaselineIOPS: __expectInt32(output.volumeBaselineIOPS), - volumeBaselineThroughput: __expectInt32(output.volumeBaselineThroughput), - volumeBurstIOPS: __expectInt32(output.volumeBurstIOPS), - volumeBurstThroughput: __expectInt32(output.volumeBurstThroughput), - volumeSize: __expectInt32(output.volumeSize), - volumeType: __expectString(output.volumeType), - } as any; -}; +// de_VolumeConfiguration omitted. /** * deserializeAws_json1_0VolumeRecommendation */ const de_VolumeRecommendation = (output: any, context: __SerdeContext): VolumeRecommendation => { - return { - accountId: __expectString(output.accountId), - currentConfiguration: - output.currentConfiguration != null ? de_VolumeConfiguration(output.currentConfiguration, context) : undefined, - currentPerformanceRisk: __expectString(output.currentPerformanceRisk), - finding: __expectString(output.finding), - lastRefreshTimestamp: - output.lastRefreshTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRefreshTimestamp))) - : undefined, - lookBackPeriodInDays: __limitedParseDouble(output.lookBackPeriodInDays), - utilizationMetrics: - output.utilizationMetrics != null ? de_EBSUtilizationMetrics(output.utilizationMetrics, context) : undefined, - volumeArn: __expectString(output.volumeArn), - volumeRecommendationOptions: - output.volumeRecommendationOptions != null - ? de_VolumeRecommendationOptions(output.volumeRecommendationOptions, context) - : undefined, - } as any; + return take(output, { + accountId: __expectString, + currentConfiguration: _json, + currentPerformanceRisk: __expectString, + finding: __expectString, + lastRefreshTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lookBackPeriodInDays: __limitedParseDouble, + utilizationMetrics: (_: any) => de_EBSUtilizationMetrics(_, context), + volumeArn: __expectString, + volumeRecommendationOptions: (_: any) => de_VolumeRecommendationOptions(_, context), + }) as any; }; /** * deserializeAws_json1_0VolumeRecommendationOption */ const de_VolumeRecommendationOption = (output: any, context: __SerdeContext): VolumeRecommendationOption => { - return { - configuration: output.configuration != null ? de_VolumeConfiguration(output.configuration, context) : undefined, - performanceRisk: __limitedParseDouble(output.performanceRisk), - rank: __expectInt32(output.rank), - savingsOpportunity: - output.savingsOpportunity != null ? de_SavingsOpportunity(output.savingsOpportunity, context) : undefined, - } as any; + return take(output, { + configuration: _json, + performanceRisk: __limitedParseDouble, + rank: __expectInt32, + savingsOpportunity: (_: any) => de_SavingsOpportunity(_, context), + }) as any; }; /** @@ -4398,9 +3078,6 @@ const de_VolumeRecommendationOptions = (output: any, context: __SerdeContext): V const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VolumeRecommendationOption(entry, context); }); return retVal; @@ -4413,9 +3090,6 @@ const de_VolumeRecommendations = (output: any, context: __SerdeContext): VolumeR const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VolumeRecommendation(entry, context); }); return retVal; @@ -4441,6 +3115,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-config-service/src/protocols/Aws_json1_1.ts b/clients/client-config-service/src/protocols/Aws_json1_1.ts index 7990f2e73e42..e878e885ae2b 100644 --- a/clients/client-config-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-config-service/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -353,13 +353,8 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { ConfigServiceServiceException as __BaseException } from "../models/ConfigServiceServiceException"; import { AccountAggregationSource, - AggregateComplianceByConfigRule, - AggregateComplianceByConformancePack, AggregateComplianceCount, - AggregateConformancePackCompliance, - AggregateConformancePackComplianceCount, AggregateConformancePackComplianceFilters, - AggregateConformancePackComplianceSummary, AggregateConformancePackComplianceSummaryFilters, AggregatedSourceStatus, AggregatedSourceStatusType, @@ -371,10 +366,6 @@ import { BatchGetAggregateResourceConfigResponse, BatchGetResourceConfigRequest, BatchGetResourceConfigResponse, - Compliance, - ComplianceByConfigRule, - ComplianceByResource, - ComplianceContributorCount, ComplianceSummary, ComplianceSummaryByResourceType, ComplianceType, @@ -392,12 +383,10 @@ import { ConformancePackComplianceFilters, ConformancePackComplianceScore, ConformancePackComplianceScoresFilters, - ConformancePackComplianceSummary, ConformancePackDetail, ConformancePackEvaluationFilters, ConformancePackEvaluationResult, ConformancePackInputParameter, - ConformancePackRuleCompliance, ConformancePackStatusDetail, ConformancePackTemplateValidationException, CustomPolicyDetails, @@ -408,53 +397,40 @@ import { DeleteConformancePackRequest, DeleteDeliveryChannelRequest, DeleteEvaluationResultsRequest, - DeleteEvaluationResultsResponse, DeleteOrganizationConfigRuleRequest, DeleteOrganizationConformancePackRequest, DeletePendingAggregationRequestRequest, DeleteRemediationConfigurationRequest, - DeleteRemediationConfigurationResponse, DeleteRemediationExceptionsRequest, - DeleteRemediationExceptionsResponse, DeleteResourceConfigRequest, DeleteRetentionConfigurationRequest, DeleteStoredQueryRequest, - DeleteStoredQueryResponse, DeliverConfigSnapshotRequest, - DeliverConfigSnapshotResponse, DeliveryChannel, DeliveryChannelStatus, DescribeAggregateComplianceByConfigRulesRequest, - DescribeAggregateComplianceByConfigRulesResponse, DescribeAggregateComplianceByConformancePacksRequest, - DescribeAggregateComplianceByConformancePacksResponse, DescribeAggregationAuthorizationsRequest, DescribeAggregationAuthorizationsResponse, DescribeComplianceByConfigRuleRequest, - DescribeComplianceByConfigRuleResponse, DescribeComplianceByResourceRequest, - DescribeComplianceByResourceResponse, DescribeConfigRuleEvaluationStatusRequest, DescribeConfigRuleEvaluationStatusResponse, DescribeConfigRulesFilters, DescribeConfigRulesRequest, - DescribeConfigRulesResponse, DescribeConfigurationAggregatorSourcesStatusRequest, DescribeConfigurationAggregatorSourcesStatusResponse, DescribeConfigurationAggregatorsRequest, DescribeConfigurationAggregatorsResponse, DescribeConfigurationRecordersRequest, - DescribeConfigurationRecordersResponse, DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResponse, DescribeConformancePackComplianceRequest, - DescribeConformancePackComplianceResponse, DescribeConformancePacksRequest, DescribeConformancePacksResponse, DescribeConformancePackStatusRequest, DescribeConformancePackStatusResponse, DescribeDeliveryChannelsRequest, - DescribeDeliveryChannelsResponse, DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResponse, DescribeOrganizationConfigRulesRequest, @@ -466,36 +442,26 @@ import { DescribeOrganizationConformancePackStatusesRequest, DescribeOrganizationConformancePackStatusesResponse, DescribePendingAggregationRequestsRequest, - DescribePendingAggregationRequestsResponse, DescribeRemediationConfigurationsRequest, - DescribeRemediationConfigurationsResponse, DescribeRemediationExceptionsRequest, DescribeRemediationExceptionsResponse, DescribeRemediationExecutionStatusRequest, DescribeRemediationExecutionStatusResponse, DescribeRetentionConfigurationsRequest, - DescribeRetentionConfigurationsResponse, Evaluation, EvaluationContext, EvaluationModeConfiguration, EvaluationResult, EvaluationResultIdentifier, - EvaluationResultQualifier, - EvaluationStatus, ExecutionControls, ExternalEvaluation, - FailedDeleteRemediationExceptionsBatch, - FailedRemediationBatch, FailedRemediationExceptionBatch, - FieldInfo, GetAggregateComplianceDetailsByConfigRuleRequest, GetAggregateComplianceDetailsByConfigRuleResponse, GetAggregateConfigRuleComplianceSummaryRequest, GetAggregateConfigRuleComplianceSummaryResponse, GetAggregateConformancePackComplianceSummaryRequest, - GetAggregateConformancePackComplianceSummaryResponse, GetAggregateDiscoveredResourceCountsRequest, - GetAggregateDiscoveredResourceCountsResponse, GetAggregateResourceConfigRequest, GetAggregateResourceConfigResponse, GetComplianceDetailsByConfigRuleRequest, @@ -508,24 +474,18 @@ import { GetConformancePackComplianceDetailsRequest, GetConformancePackComplianceDetailsResponse, GetConformancePackComplianceSummaryRequest, - GetConformancePackComplianceSummaryResponse, GetCustomRulePolicyRequest, - GetCustomRulePolicyResponse, GetDiscoveredResourceCountsRequest, - GetDiscoveredResourceCountsResponse, GetOrganizationConfigRuleDetailedStatusRequest, GetOrganizationConfigRuleDetailedStatusResponse, GetOrganizationConformancePackDetailedStatusRequest, GetOrganizationConformancePackDetailedStatusResponse, GetOrganizationCustomRulePolicyRequest, - GetOrganizationCustomRulePolicyResponse, GetResourceConfigHistoryRequest, GetResourceConfigHistoryResponse, GetResourceEvaluationSummaryRequest, GetResourceEvaluationSummaryResponse, GetStoredQueryRequest, - GetStoredQueryResponse, - GroupedResourceCount, IdempotentParameterMismatch, InsufficientDeliveryPolicyException, InsufficientPermissionsException, @@ -545,7 +505,6 @@ import { LastDeliveryChannelDeleteFailedException, LimitExceededException, ListAggregateDiscoveredResourcesRequest, - ListAggregateDiscoveredResourcesResponse, ListConformancePackComplianceScoresRequest, ListConformancePackComplianceScoresResponse, ListDiscoveredResourcesRequest, @@ -553,9 +512,7 @@ import { ListResourceEvaluationsRequest, ListResourceEvaluationsResponse, ListStoredQueriesRequest, - ListStoredQueriesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MaxActiveResourcesExceededException, MaxNumberOfConfigRulesExceededException, MaxNumberOfConfigurationRecordersExceededException, @@ -583,14 +540,11 @@ import { OrganizationConformancePack, OrganizationConformancePackDetailedStatus, OrganizationConformancePackStatus, - OrganizationCustomPolicyRuleMetadataNoPolicy, OrganizationCustomRuleMetadata, OrganizationManagedRuleMetadata, OrganizationResourceDetailedStatusFilters, OversizedConfigurationItemException, - PendingAggregationRequest, RecordingGroup, - Relationship, RemediationConfiguration, RemediationException, RemediationExceptionResourceKey, @@ -598,7 +552,6 @@ import { RemediationExecutionStep, RemediationInProgressException, RemediationParameterValue, - ResourceCount, ResourceCountFilters, ResourceDetails, ResourceEvaluation, @@ -611,7 +564,6 @@ import { ResourceNotFoundException, ResourceType, ResourceValue, - RetentionConfiguration, Scope, Source, SourceDetail, @@ -619,7 +571,6 @@ import { StaticValue, StatusDetailFilters, StoredQuery, - StoredQueryMetadata, Tag, TemplateSSMDocumentDetails, TimeWindow, @@ -643,38 +594,25 @@ import { PutConfigurationAggregatorResponse, PutConfigurationRecorderRequest, PutConformancePackRequest, - PutConformancePackResponse, PutDeliveryChannelRequest, PutEvaluationsRequest, PutEvaluationsResponse, PutExternalEvaluationRequest, - PutExternalEvaluationResponse, PutOrganizationConfigRuleRequest, - PutOrganizationConfigRuleResponse, PutOrganizationConformancePackRequest, - PutOrganizationConformancePackResponse, PutRemediationConfigurationsRequest, - PutRemediationConfigurationsResponse, PutRemediationExceptionsRequest, PutRemediationExceptionsResponse, PutResourceConfigRequest, PutRetentionConfigurationRequest, - PutRetentionConfigurationResponse, PutStoredQueryRequest, - PutStoredQueryResponse, - QueryInfo, ResourceConcurrentModificationException, SelectAggregateResourceConfigRequest, - SelectAggregateResourceConfigResponse, SelectResourceConfigRequest, - SelectResourceConfigResponse, StartConfigRulesEvaluationRequest, - StartConfigRulesEvaluationResponse, StartConfigurationRecorderRequest, StartRemediationExecutionRequest, - StartRemediationExecutionResponse, StartResourceEvaluationRequest, - StartResourceEvaluationResponse, StopConfigurationRecorderRequest, TagResourceRequest, TooManyTagsException, @@ -690,7 +628,7 @@ export const se_BatchGetAggregateResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetAggregateResourceConfig"); let body: any; - body = JSON.stringify(se_BatchGetAggregateResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -703,7 +641,7 @@ export const se_BatchGetResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetResourceConfig"); let body: any; - body = JSON.stringify(se_BatchGetResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -716,7 +654,7 @@ export const se_DeleteAggregationAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAggregationAuthorization"); let body: any; - body = JSON.stringify(se_DeleteAggregationAuthorizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -729,7 +667,7 @@ export const se_DeleteConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConfigRule"); let body: any; - body = JSON.stringify(se_DeleteConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -742,7 +680,7 @@ export const se_DeleteConfigurationAggregatorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConfigurationAggregator"); let body: any; - body = JSON.stringify(se_DeleteConfigurationAggregatorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -755,7 +693,7 @@ export const se_DeleteConfigurationRecorderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConfigurationRecorder"); let body: any; - body = JSON.stringify(se_DeleteConfigurationRecorderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -768,7 +706,7 @@ export const se_DeleteConformancePackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConformancePack"); let body: any; - body = JSON.stringify(se_DeleteConformancePackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -781,7 +719,7 @@ export const se_DeleteDeliveryChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDeliveryChannel"); let body: any; - body = JSON.stringify(se_DeleteDeliveryChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -794,7 +732,7 @@ export const se_DeleteEvaluationResultsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEvaluationResults"); let body: any; - body = JSON.stringify(se_DeleteEvaluationResultsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -807,7 +745,7 @@ export const se_DeleteOrganizationConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOrganizationConfigRule"); let body: any; - body = JSON.stringify(se_DeleteOrganizationConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -820,7 +758,7 @@ export const se_DeleteOrganizationConformancePackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOrganizationConformancePack"); let body: any; - body = JSON.stringify(se_DeleteOrganizationConformancePackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -833,7 +771,7 @@ export const se_DeletePendingAggregationRequestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePendingAggregationRequest"); let body: any; - body = JSON.stringify(se_DeletePendingAggregationRequestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -846,7 +784,7 @@ export const se_DeleteRemediationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRemediationConfiguration"); let body: any; - body = JSON.stringify(se_DeleteRemediationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -859,7 +797,7 @@ export const se_DeleteRemediationExceptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRemediationExceptions"); let body: any; - body = JSON.stringify(se_DeleteRemediationExceptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -872,7 +810,7 @@ export const se_DeleteResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourceConfig"); let body: any; - body = JSON.stringify(se_DeleteResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -885,7 +823,7 @@ export const se_DeleteRetentionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRetentionConfiguration"); let body: any; - body = JSON.stringify(se_DeleteRetentionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -898,7 +836,7 @@ export const se_DeleteStoredQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStoredQuery"); let body: any; - body = JSON.stringify(se_DeleteStoredQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -911,7 +849,7 @@ export const se_DeliverConfigSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeliverConfigSnapshot"); let body: any; - body = JSON.stringify(se_DeliverConfigSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -924,7 +862,7 @@ export const se_DescribeAggregateComplianceByConfigRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAggregateComplianceByConfigRules"); let body: any; - body = JSON.stringify(se_DescribeAggregateComplianceByConfigRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -937,7 +875,7 @@ export const se_DescribeAggregateComplianceByConformancePacksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAggregateComplianceByConformancePacks"); let body: any; - body = JSON.stringify(se_DescribeAggregateComplianceByConformancePacksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -950,7 +888,7 @@ export const se_DescribeAggregationAuthorizationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAggregationAuthorizations"); let body: any; - body = JSON.stringify(se_DescribeAggregationAuthorizationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -963,7 +901,7 @@ export const se_DescribeComplianceByConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeComplianceByConfigRule"); let body: any; - body = JSON.stringify(se_DescribeComplianceByConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -976,7 +914,7 @@ export const se_DescribeComplianceByResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeComplianceByResource"); let body: any; - body = JSON.stringify(se_DescribeComplianceByResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -989,7 +927,7 @@ export const se_DescribeConfigRuleEvaluationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigRuleEvaluationStatus"); let body: any; - body = JSON.stringify(se_DescribeConfigRuleEvaluationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1002,7 +940,7 @@ export const se_DescribeConfigRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigRules"); let body: any; - body = JSON.stringify(se_DescribeConfigRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1015,7 +953,7 @@ export const se_DescribeConfigurationAggregatorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigurationAggregators"); let body: any; - body = JSON.stringify(se_DescribeConfigurationAggregatorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1028,7 +966,7 @@ export const se_DescribeConfigurationAggregatorSourcesStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigurationAggregatorSourcesStatus"); let body: any; - body = JSON.stringify(se_DescribeConfigurationAggregatorSourcesStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1041,7 +979,7 @@ export const se_DescribeConfigurationRecordersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigurationRecorders"); let body: any; - body = JSON.stringify(se_DescribeConfigurationRecordersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1054,7 +992,7 @@ export const se_DescribeConfigurationRecorderStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigurationRecorderStatus"); let body: any; - body = JSON.stringify(se_DescribeConfigurationRecorderStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1067,7 +1005,7 @@ export const se_DescribeConformancePackComplianceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConformancePackCompliance"); let body: any; - body = JSON.stringify(se_DescribeConformancePackComplianceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1080,7 +1018,7 @@ export const se_DescribeConformancePacksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConformancePacks"); let body: any; - body = JSON.stringify(se_DescribeConformancePacksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1093,7 +1031,7 @@ export const se_DescribeConformancePackStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConformancePackStatus"); let body: any; - body = JSON.stringify(se_DescribeConformancePackStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1106,7 +1044,7 @@ export const se_DescribeDeliveryChannelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDeliveryChannels"); let body: any; - body = JSON.stringify(se_DescribeDeliveryChannelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1119,7 +1057,7 @@ export const se_DescribeDeliveryChannelStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDeliveryChannelStatus"); let body: any; - body = JSON.stringify(se_DescribeDeliveryChannelStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1132,7 +1070,7 @@ export const se_DescribeOrganizationConfigRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrganizationConfigRules"); let body: any; - body = JSON.stringify(se_DescribeOrganizationConfigRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1145,7 +1083,7 @@ export const se_DescribeOrganizationConfigRuleStatusesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrganizationConfigRuleStatuses"); let body: any; - body = JSON.stringify(se_DescribeOrganizationConfigRuleStatusesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1158,7 +1096,7 @@ export const se_DescribeOrganizationConformancePacksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrganizationConformancePacks"); let body: any; - body = JSON.stringify(se_DescribeOrganizationConformancePacksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1171,7 +1109,7 @@ export const se_DescribeOrganizationConformancePackStatusesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrganizationConformancePackStatuses"); let body: any; - body = JSON.stringify(se_DescribeOrganizationConformancePackStatusesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1184,7 +1122,7 @@ export const se_DescribePendingAggregationRequestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePendingAggregationRequests"); let body: any; - body = JSON.stringify(se_DescribePendingAggregationRequestsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1197,7 +1135,7 @@ export const se_DescribeRemediationConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRemediationConfigurations"); let body: any; - body = JSON.stringify(se_DescribeRemediationConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1210,7 +1148,7 @@ export const se_DescribeRemediationExceptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRemediationExceptions"); let body: any; - body = JSON.stringify(se_DescribeRemediationExceptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1223,7 +1161,7 @@ export const se_DescribeRemediationExecutionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRemediationExecutionStatus"); let body: any; - body = JSON.stringify(se_DescribeRemediationExecutionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1236,7 +1174,7 @@ export const se_DescribeRetentionConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRetentionConfigurations"); let body: any; - body = JSON.stringify(se_DescribeRetentionConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1249,7 +1187,7 @@ export const se_GetAggregateComplianceDetailsByConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAggregateComplianceDetailsByConfigRule"); let body: any; - body = JSON.stringify(se_GetAggregateComplianceDetailsByConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1262,7 +1200,7 @@ export const se_GetAggregateConfigRuleComplianceSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAggregateConfigRuleComplianceSummary"); let body: any; - body = JSON.stringify(se_GetAggregateConfigRuleComplianceSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1275,7 +1213,7 @@ export const se_GetAggregateConformancePackComplianceSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAggregateConformancePackComplianceSummary"); let body: any; - body = JSON.stringify(se_GetAggregateConformancePackComplianceSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1288,7 +1226,7 @@ export const se_GetAggregateDiscoveredResourceCountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAggregateDiscoveredResourceCounts"); let body: any; - body = JSON.stringify(se_GetAggregateDiscoveredResourceCountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1301,7 +1239,7 @@ export const se_GetAggregateResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAggregateResourceConfig"); let body: any; - body = JSON.stringify(se_GetAggregateResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1314,7 +1252,7 @@ export const se_GetComplianceDetailsByConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComplianceDetailsByConfigRule"); let body: any; - body = JSON.stringify(se_GetComplianceDetailsByConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1327,7 +1265,7 @@ export const se_GetComplianceDetailsByResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComplianceDetailsByResource"); let body: any; - body = JSON.stringify(se_GetComplianceDetailsByResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1352,7 +1290,7 @@ export const se_GetComplianceSummaryByResourceTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComplianceSummaryByResourceType"); let body: any; - body = JSON.stringify(se_GetComplianceSummaryByResourceTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1365,7 +1303,7 @@ export const se_GetConformancePackComplianceDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConformancePackComplianceDetails"); let body: any; - body = JSON.stringify(se_GetConformancePackComplianceDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1378,7 +1316,7 @@ export const se_GetConformancePackComplianceSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConformancePackComplianceSummary"); let body: any; - body = JSON.stringify(se_GetConformancePackComplianceSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1391,7 +1329,7 @@ export const se_GetCustomRulePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCustomRulePolicy"); let body: any; - body = JSON.stringify(se_GetCustomRulePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1404,7 +1342,7 @@ export const se_GetDiscoveredResourceCountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDiscoveredResourceCounts"); let body: any; - body = JSON.stringify(se_GetDiscoveredResourceCountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1417,7 +1355,7 @@ export const se_GetOrganizationConfigRuleDetailedStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOrganizationConfigRuleDetailedStatus"); let body: any; - body = JSON.stringify(se_GetOrganizationConfigRuleDetailedStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1430,7 +1368,7 @@ export const se_GetOrganizationConformancePackDetailedStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOrganizationConformancePackDetailedStatus"); let body: any; - body = JSON.stringify(se_GetOrganizationConformancePackDetailedStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1443,7 +1381,7 @@ export const se_GetOrganizationCustomRulePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOrganizationCustomRulePolicy"); let body: any; - body = JSON.stringify(se_GetOrganizationCustomRulePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1469,7 +1407,7 @@ export const se_GetResourceEvaluationSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourceEvaluationSummary"); let body: any; - body = JSON.stringify(se_GetResourceEvaluationSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1482,7 +1420,7 @@ export const se_GetStoredQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetStoredQuery"); let body: any; - body = JSON.stringify(se_GetStoredQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1495,7 +1433,7 @@ export const se_ListAggregateDiscoveredResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAggregateDiscoveredResources"); let body: any; - body = JSON.stringify(se_ListAggregateDiscoveredResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1508,7 +1446,7 @@ export const se_ListConformancePackComplianceScoresCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConformancePackComplianceScores"); let body: any; - body = JSON.stringify(se_ListConformancePackComplianceScoresRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1521,7 +1459,7 @@ export const se_ListDiscoveredResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDiscoveredResources"); let body: any; - body = JSON.stringify(se_ListDiscoveredResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1547,7 +1485,7 @@ export const se_ListStoredQueriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStoredQueries"); let body: any; - body = JSON.stringify(se_ListStoredQueriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1560,7 +1498,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1573,7 +1511,7 @@ export const se_PutAggregationAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAggregationAuthorization"); let body: any; - body = JSON.stringify(se_PutAggregationAuthorizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1586,7 +1524,7 @@ export const se_PutConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutConfigRule"); let body: any; - body = JSON.stringify(se_PutConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1599,7 +1537,7 @@ export const se_PutConfigurationAggregatorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutConfigurationAggregator"); let body: any; - body = JSON.stringify(se_PutConfigurationAggregatorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1612,7 +1550,7 @@ export const se_PutConfigurationRecorderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutConfigurationRecorder"); let body: any; - body = JSON.stringify(se_PutConfigurationRecorderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1625,7 +1563,7 @@ export const se_PutConformancePackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutConformancePack"); let body: any; - body = JSON.stringify(se_PutConformancePackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1638,7 +1576,7 @@ export const se_PutDeliveryChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutDeliveryChannel"); let body: any; - body = JSON.stringify(se_PutDeliveryChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1677,7 +1615,7 @@ export const se_PutOrganizationConfigRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutOrganizationConfigRule"); let body: any; - body = JSON.stringify(se_PutOrganizationConfigRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1690,7 +1628,7 @@ export const se_PutOrganizationConformancePackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutOrganizationConformancePack"); let body: any; - body = JSON.stringify(se_PutOrganizationConformancePackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1703,7 +1641,7 @@ export const se_PutRemediationConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRemediationConfigurations"); let body: any; - body = JSON.stringify(se_PutRemediationConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1729,7 +1667,7 @@ export const se_PutResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourceConfig"); let body: any; - body = JSON.stringify(se_PutResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1742,7 +1680,7 @@ export const se_PutRetentionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRetentionConfiguration"); let body: any; - body = JSON.stringify(se_PutRetentionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1755,7 +1693,7 @@ export const se_PutStoredQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutStoredQuery"); let body: any; - body = JSON.stringify(se_PutStoredQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1768,7 +1706,7 @@ export const se_SelectAggregateResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SelectAggregateResourceConfig"); let body: any; - body = JSON.stringify(se_SelectAggregateResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1781,7 +1719,7 @@ export const se_SelectResourceConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SelectResourceConfig"); let body: any; - body = JSON.stringify(se_SelectResourceConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1794,7 +1732,7 @@ export const se_StartConfigRulesEvaluationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartConfigRulesEvaluation"); let body: any; - body = JSON.stringify(se_StartConfigRulesEvaluationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1807,7 +1745,7 @@ export const se_StartConfigurationRecorderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartConfigurationRecorder"); let body: any; - body = JSON.stringify(se_StartConfigurationRecorderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1820,7 +1758,7 @@ export const se_StartRemediationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartRemediationExecution"); let body: any; - body = JSON.stringify(se_StartRemediationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1833,7 +1771,7 @@ export const se_StartResourceEvaluationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartResourceEvaluation"); let body: any; - body = JSON.stringify(se_StartResourceEvaluationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1846,7 +1784,7 @@ export const se_StopConfigurationRecorderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopConfigurationRecorder"); let body: any; - body = JSON.stringify(se_StopConfigurationRecorderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1859,7 +1797,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1872,7 +1810,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1893,7 +1831,7 @@ export const de_BatchGetAggregateResourceConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1917,10 +1855,9 @@ const de_BatchGetAggregateResourceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1943,7 +1880,7 @@ export const de_BatchGetResourceConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1967,10 +1904,9 @@ const de_BatchGetResourceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1990,7 +1926,7 @@ export const de_DeleteAggregationAuthorizationCommand = async ( const response: DeleteAggregationAuthorizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2011,10 +1947,9 @@ const de_DeleteAggregationAuthorizationCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2034,7 +1969,7 @@ export const de_DeleteConfigRuleCommand = async ( const response: DeleteConfigRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2058,10 +1993,9 @@ const de_DeleteConfigRuleCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2081,7 +2015,7 @@ export const de_DeleteConfigurationAggregatorCommand = async ( const response: DeleteConfigurationAggregatorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2102,10 +2036,9 @@ const de_DeleteConfigurationAggregatorCommandError = async ( throw await de_NoSuchConfigurationAggregatorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2125,7 +2058,7 @@ export const de_DeleteConfigurationRecorderCommand = async ( const response: DeleteConfigurationRecorderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2146,10 +2079,9 @@ const de_DeleteConfigurationRecorderCommandError = async ( throw await de_NoSuchConfigurationRecorderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2169,7 +2101,7 @@ export const de_DeleteConformancePackCommand = async ( const response: DeleteConformancePackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2193,10 +2125,9 @@ const de_DeleteConformancePackCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2216,7 +2147,7 @@ export const de_DeleteDeliveryChannelCommand = async ( const response: DeleteDeliveryChannelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2240,10 +2171,9 @@ const de_DeleteDeliveryChannelCommandError = async ( throw await de_NoSuchDeliveryChannelExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,12 +2191,12 @@ export const de_DeleteEvaluationResultsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEvaluationResultsResponse(data, context); + contents = _json(data); const response: DeleteEvaluationResultsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2290,10 +2220,9 @@ const de_DeleteEvaluationResultsCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2313,7 +2242,7 @@ export const de_DeleteOrganizationConfigRuleCommand = async ( const response: DeleteOrganizationConfigRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2340,10 +2269,9 @@ const de_DeleteOrganizationConfigRuleCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2363,7 +2291,7 @@ export const de_DeleteOrganizationConformancePackCommand = async ( const response: DeleteOrganizationConformancePackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2390,10 +2318,9 @@ const de_DeleteOrganizationConformancePackCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2413,7 +2340,7 @@ export const de_DeletePendingAggregationRequestCommand = async ( const response: DeletePendingAggregationRequestCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2434,10 +2361,9 @@ const de_DeletePendingAggregationRequestCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2455,12 +2381,12 @@ export const de_DeleteRemediationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRemediationConfigurationResponse(data, context); + contents = _json(data); const response: DeleteRemediationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2490,10 +2416,9 @@ const de_DeleteRemediationConfigurationCommandError = async ( throw await de_RemediationInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2511,12 +2436,12 @@ export const de_DeleteRemediationExceptionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRemediationExceptionsResponse(data, context); + contents = _json(data); const response: DeleteRemediationExceptionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2537,10 +2462,9 @@ const de_DeleteRemediationExceptionsCommandError = async ( throw await de_NoSuchRemediationExceptionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2560,7 +2484,7 @@ export const de_DeleteResourceConfigCommand = async ( const response: DeleteResourceConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2584,10 +2508,9 @@ const de_DeleteResourceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2607,7 +2530,7 @@ export const de_DeleteRetentionConfigurationCommand = async ( const response: DeleteRetentionConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2631,10 +2554,9 @@ const de_DeleteRetentionConfigurationCommandError = async ( throw await de_NoSuchRetentionConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2652,12 +2574,12 @@ export const de_DeleteStoredQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteStoredQueryResponse(data, context); + contents = _json(data); const response: DeleteStoredQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2681,10 +2603,9 @@ const de_DeleteStoredQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2702,12 +2623,12 @@ export const de_DeliverConfigSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeliverConfigSnapshotResponse(data, context); + contents = _json(data); const response: DeliverConfigSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2734,10 +2655,9 @@ const de_DeliverConfigSnapshotCommandError = async ( throw await de_NoSuchDeliveryChannelExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,12 +2675,12 @@ export const de_DescribeAggregateComplianceByConfigRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAggregateComplianceByConfigRulesResponse(data, context); + contents = _json(data); const response: DescribeAggregateComplianceByConfigRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2790,10 +2710,9 @@ const de_DescribeAggregateComplianceByConfigRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2811,12 +2730,12 @@ export const de_DescribeAggregateComplianceByConformancePacksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAggregateComplianceByConformancePacksResponse(data, context); + contents = _json(data); const response: DescribeAggregateComplianceByConformancePacksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2846,10 +2765,9 @@ const de_DescribeAggregateComplianceByConformancePacksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2872,7 +2790,7 @@ export const de_DescribeAggregationAuthorizationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2899,10 +2817,9 @@ const de_DescribeAggregationAuthorizationsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2920,12 +2837,12 @@ export const de_DescribeComplianceByConfigRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeComplianceByConfigRuleResponse(data, context); + contents = _json(data); const response: DescribeComplianceByConfigRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2952,10 +2869,9 @@ const de_DescribeComplianceByConfigRuleCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2973,12 +2889,12 @@ export const de_DescribeComplianceByResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeComplianceByResourceResponse(data, context); + contents = _json(data); const response: DescribeComplianceByResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3002,10 +2918,9 @@ const de_DescribeComplianceByResourceCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3028,7 +2943,7 @@ export const de_DescribeConfigRuleEvaluationStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3055,10 +2970,9 @@ const de_DescribeConfigRuleEvaluationStatusCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3076,12 +2990,12 @@ export const de_DescribeConfigRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConfigRulesResponse(data, context); + contents = _json(data); const response: DescribeConfigRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3108,10 +3022,9 @@ const de_DescribeConfigRulesCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3134,7 +3047,7 @@ export const de_DescribeConfigurationAggregatorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3164,10 +3077,9 @@ const de_DescribeConfigurationAggregatorsCommandError = async ( throw await de_NoSuchConfigurationAggregatorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3190,7 +3102,7 @@ export const de_DescribeConfigurationAggregatorSourcesStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3220,10 +3132,9 @@ const de_DescribeConfigurationAggregatorSourcesStatusCommandError = async ( throw await de_NoSuchConfigurationAggregatorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3241,12 +3152,12 @@ export const de_DescribeConfigurationRecordersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConfigurationRecordersResponse(data, context); + contents = _json(data); const response: DescribeConfigurationRecordersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3267,10 +3178,9 @@ const de_DescribeConfigurationRecordersCommandError = async ( throw await de_NoSuchConfigurationRecorderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3293,7 +3203,7 @@ export const de_DescribeConfigurationRecorderStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3314,10 +3224,9 @@ const de_DescribeConfigurationRecorderStatusCommandError = async ( throw await de_NoSuchConfigurationRecorderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3335,12 +3244,12 @@ export const de_DescribeConformancePackComplianceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConformancePackComplianceResponse(data, context); + contents = _json(data); const response: DescribeConformancePackComplianceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3373,10 +3282,9 @@ const de_DescribeConformancePackComplianceCommandError = async ( throw await de_NoSuchConformancePackExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3399,7 +3307,7 @@ export const de_DescribeConformancePacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3429,10 +3337,9 @@ const de_DescribeConformancePacksCommandError = async ( throw await de_NoSuchConformancePackExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3455,7 +3362,7 @@ export const de_DescribeConformancePackStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3482,10 +3389,9 @@ const de_DescribeConformancePackStatusCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3503,12 +3409,12 @@ export const de_DescribeDeliveryChannelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDeliveryChannelsResponse(data, context); + contents = _json(data); const response: DescribeDeliveryChannelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3529,10 +3435,9 @@ const de_DescribeDeliveryChannelsCommandError = async ( throw await de_NoSuchDeliveryChannelExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3555,7 +3460,7 @@ export const de_DescribeDeliveryChannelStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3576,10 +3481,9 @@ const de_DescribeDeliveryChannelStatusCommandError = async ( throw await de_NoSuchDeliveryChannelExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3602,7 +3506,7 @@ export const de_DescribeOrganizationConfigRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3632,10 +3536,9 @@ const de_DescribeOrganizationConfigRulesCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3658,7 +3561,7 @@ export const de_DescribeOrganizationConfigRuleStatusesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3688,10 +3591,9 @@ const de_DescribeOrganizationConfigRuleStatusesCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3714,7 +3616,7 @@ export const de_DescribeOrganizationConformancePacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3744,10 +3646,9 @@ const de_DescribeOrganizationConformancePacksCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3770,7 +3671,7 @@ export const de_DescribeOrganizationConformancePackStatusesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3800,10 +3701,9 @@ const de_DescribeOrganizationConformancePackStatusesCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3821,12 +3721,12 @@ export const de_DescribePendingAggregationRequestsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePendingAggregationRequestsResponse(data, context); + contents = _json(data); const response: DescribePendingAggregationRequestsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3853,10 +3753,9 @@ const de_DescribePendingAggregationRequestsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3874,12 +3773,12 @@ export const de_DescribeRemediationConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRemediationConfigurationsResponse(data, context); + contents = _json(data); const response: DescribeRemediationConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3895,10 +3794,9 @@ const de_DescribeRemediationConfigurationsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3920,7 +3818,7 @@ export const de_DescribeRemediationExceptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3944,10 +3842,9 @@ const de_DescribeRemediationExceptionsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3970,7 +3867,7 @@ export const de_DescribeRemediationExecutionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3997,10 +3894,9 @@ const de_DescribeRemediationExecutionStatusCommandError = async ( throw await de_NoSuchRemediationConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4018,12 +3914,12 @@ export const de_DescribeRetentionConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRetentionConfigurationsResponse(data, context); + contents = _json(data); const response: DescribeRetentionConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4050,10 +3946,9 @@ const de_DescribeRetentionConfigurationsCommandError = async ( throw await de_NoSuchRetentionConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4076,7 +3971,7 @@ export const de_GetAggregateComplianceDetailsByConfigRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4106,10 +4001,9 @@ const de_GetAggregateComplianceDetailsByConfigRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4132,7 +4026,7 @@ export const de_GetAggregateConfigRuleComplianceSummaryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4162,10 +4056,9 @@ const de_GetAggregateConfigRuleComplianceSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4183,12 +4076,12 @@ export const de_GetAggregateConformancePackComplianceSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAggregateConformancePackComplianceSummaryResponse(data, context); + contents = _json(data); const response: GetAggregateConformancePackComplianceSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4218,10 +4111,9 @@ const de_GetAggregateConformancePackComplianceSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4239,12 +4131,12 @@ export const de_GetAggregateDiscoveredResourceCountsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAggregateDiscoveredResourceCountsResponse(data, context); + contents = _json(data); const response: GetAggregateDiscoveredResourceCountsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4274,10 +4166,9 @@ const de_GetAggregateDiscoveredResourceCountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4300,7 +4191,7 @@ export const de_GetAggregateResourceConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4330,10 +4221,9 @@ const de_GetAggregateResourceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4356,7 +4246,7 @@ export const de_GetComplianceDetailsByConfigRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4383,10 +4273,9 @@ const de_GetComplianceDetailsByConfigRuleCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4409,7 +4298,7 @@ export const de_GetComplianceDetailsByResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4430,10 +4319,9 @@ const de_GetComplianceDetailsByResourceCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4456,7 +4344,7 @@ export const de_GetComplianceSummaryByConfigRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4472,10 +4360,9 @@ const de_GetComplianceSummaryByConfigRuleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4497,7 +4384,7 @@ export const de_GetComplianceSummaryByResourceTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4518,10 +4405,9 @@ const de_GetComplianceSummaryByResourceTypeCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4544,7 +4430,7 @@ export const de_GetConformancePackComplianceDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4577,10 +4463,9 @@ const de_GetConformancePackComplianceDetailsCommandError = async ( throw await de_NoSuchConformancePackExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4598,12 +4483,12 @@ export const de_GetConformancePackComplianceSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetConformancePackComplianceSummaryResponse(data, context); + contents = _json(data); const response: GetConformancePackComplianceSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4630,10 +4515,9 @@ const de_GetConformancePackComplianceSummaryCommandError = async ( throw await de_NoSuchConformancePackExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4651,12 +4535,12 @@ export const de_GetCustomRulePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCustomRulePolicyResponse(data, context); + contents = _json(data); const response: GetCustomRulePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4677,10 +4561,9 @@ const de_GetCustomRulePolicyCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4698,12 +4581,12 @@ export const de_GetDiscoveredResourceCountsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDiscoveredResourceCountsResponse(data, context); + contents = _json(data); const response: GetDiscoveredResourceCountsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4730,10 +4613,9 @@ const de_GetDiscoveredResourceCountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4756,7 +4638,7 @@ export const de_GetOrganizationConfigRuleDetailedStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4786,10 +4668,9 @@ const de_GetOrganizationConfigRuleDetailedStatusCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4812,7 +4693,7 @@ export const de_GetOrganizationConformancePackDetailedStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4842,10 +4723,9 @@ const de_GetOrganizationConformancePackDetailedStatusCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4863,12 +4743,12 @@ export const de_GetOrganizationCustomRulePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetOrganizationCustomRulePolicyResponse(data, context); + contents = _json(data); const response: GetOrganizationCustomRulePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4892,10 +4772,9 @@ const de_GetOrganizationCustomRulePolicyCommandError = async ( throw await de_OrganizationAccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4918,7 +4797,7 @@ export const de_GetResourceConfigHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4954,10 +4833,9 @@ const de_GetResourceConfigHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4980,7 +4858,7 @@ export const de_GetResourceEvaluationSummaryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5001,10 +4879,9 @@ const de_GetResourceEvaluationSummaryCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5022,12 +4899,12 @@ export const de_GetStoredQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetStoredQueryResponse(data, context); + contents = _json(data); const response: GetStoredQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5051,10 +4928,9 @@ const de_GetStoredQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5072,12 +4948,12 @@ export const de_ListAggregateDiscoveredResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAggregateDiscoveredResourcesResponse(data, context); + contents = _json(data); const response: ListAggregateDiscoveredResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5107,10 +4983,9 @@ const de_ListAggregateDiscoveredResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5133,7 +5008,7 @@ export const de_ListConformancePackComplianceScoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5160,10 +5035,9 @@ const de_ListConformancePackComplianceScoresCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5186,7 +5060,7 @@ export const de_ListDiscoveredResourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5216,10 +5090,9 @@ const de_ListDiscoveredResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5242,7 +5115,7 @@ export const de_ListResourceEvaluationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5269,10 +5142,9 @@ const de_ListResourceEvaluationsCommandError = async ( throw await de_InvalidTimeRangeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5290,12 +5162,12 @@ export const de_ListStoredQueriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListStoredQueriesResponse(data, context); + contents = _json(data); const response: ListStoredQueriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5319,10 +5191,9 @@ const de_ListStoredQueriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5340,12 +5211,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5375,10 +5246,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5401,7 +5271,7 @@ export const de_PutAggregationAuthorizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5422,10 +5292,9 @@ const de_PutAggregationAuthorizationCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5445,7 +5314,7 @@ export const de_PutConfigRuleCommand = async ( const response: PutConfigRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5478,10 +5347,9 @@ const de_PutConfigRuleCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5504,7 +5372,7 @@ export const de_PutConfigurationAggregatorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5540,10 +5408,9 @@ const de_PutConfigurationAggregatorCommandError = async ( throw await de_OrganizationAllFeaturesNotEnabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5563,7 +5430,7 @@ export const de_PutConfigurationRecorderCommand = async ( const response: PutConfigurationRecorderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5593,10 +5460,9 @@ const de_PutConfigurationRecorderCommandError = async ( throw await de_MaxNumberOfConfigurationRecordersExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5614,12 +5480,12 @@ export const de_PutConformancePackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutConformancePackResponse(data, context); + contents = _json(data); const response: PutConformancePackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5652,10 +5518,9 @@ const de_PutConformancePackCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5675,7 +5540,7 @@ export const de_PutDeliveryChannelCommand = async ( const response: PutDeliveryChannelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5717,10 +5582,9 @@ const de_PutDeliveryChannelCommandError = async ( throw await de_NoSuchBucketExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5743,7 +5607,7 @@ export const de_PutEvaluationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5770,10 +5634,9 @@ const de_PutEvaluationsCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5791,12 +5654,12 @@ export const de_PutExternalEvaluationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutExternalEvaluationResponse(data, context); + contents = _json(data); const response: PutExternalEvaluationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5820,10 +5683,9 @@ const de_PutExternalEvaluationCommandError = async ( throw await de_NoSuchConfigRuleExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5841,12 +5703,12 @@ export const de_PutOrganizationConfigRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutOrganizationConfigRuleResponse(data, context); + contents = _json(data); const response: PutOrganizationConfigRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5888,10 +5750,9 @@ const de_PutOrganizationConfigRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5909,12 +5770,12 @@ export const de_PutOrganizationConformancePackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutOrganizationConformancePackResponse(data, context); + contents = _json(data); const response: PutOrganizationConformancePackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5956,10 +5817,9 @@ const de_PutOrganizationConformancePackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5977,12 +5837,12 @@ export const de_PutRemediationConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRemediationConfigurationsResponse(data, context); + contents = _json(data); const response: PutRemediationConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6006,10 +5866,9 @@ const de_PutRemediationConfigurationsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6032,7 +5891,7 @@ export const de_PutRemediationExceptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6056,10 +5915,9 @@ const de_PutRemediationExceptionsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6079,7 +5937,7 @@ export const de_PutResourceConfigCommand = async ( const response: PutResourceConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6109,10 +5967,9 @@ const de_PutResourceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6130,12 +5987,12 @@ export const de_PutRetentionConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRetentionConfigurationResponse(data, context); + contents = _json(data); const response: PutRetentionConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6159,10 +6016,9 @@ const de_PutRetentionConfigurationCommandError = async ( throw await de_MaxNumberOfRetentionConfigurationsExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6180,12 +6036,12 @@ export const de_PutStoredQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutStoredQueryResponse(data, context); + contents = _json(data); const response: PutStoredQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6212,10 +6068,9 @@ const de_PutStoredQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6233,12 +6088,12 @@ export const de_SelectAggregateResourceConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SelectAggregateResourceConfigResponse(data, context); + contents = _json(data); const response: SelectAggregateResourceConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6268,10 +6123,9 @@ const de_SelectAggregateResourceConfigCommandError = async ( throw await de_NoSuchConfigurationAggregatorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6289,12 +6143,12 @@ export const de_SelectResourceConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SelectResourceConfigResponse(data, context); + contents = _json(data); const response: SelectResourceConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6321,10 +6175,9 @@ const de_SelectResourceConfigCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6342,12 +6195,12 @@ export const de_StartConfigRulesEvaluationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartConfigRulesEvaluationResponse(data, context); + contents = _json(data); const response: StartConfigRulesEvaluationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6377,10 +6230,9 @@ const de_StartConfigRulesEvaluationCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6400,7 +6252,7 @@ export const de_StartConfigurationRecorderCommand = async ( const response: StartConfigurationRecorderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6424,10 +6276,9 @@ const de_StartConfigurationRecorderCommandError = async ( throw await de_NoSuchConfigurationRecorderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6445,12 +6296,12 @@ export const de_StartRemediationExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartRemediationExecutionResponse(data, context); + contents = _json(data); const response: StartRemediationExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6477,10 +6328,9 @@ const de_StartRemediationExecutionCommandError = async ( throw await de_NoSuchRemediationConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6498,12 +6348,12 @@ export const de_StartResourceEvaluationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartResourceEvaluationResponse(data, context); + contents = _json(data); const response: StartResourceEvaluationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6527,10 +6377,9 @@ const de_StartResourceEvaluationCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6550,7 +6399,7 @@ export const de_StopConfigurationRecorderCommand = async ( const response: StopConfigurationRecorderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6571,10 +6420,9 @@ const de_StopConfigurationRecorderCommandError = async ( throw await de_NoSuchConfigurationRecorderExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6594,7 +6442,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6621,10 +6469,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6644,7 +6491,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6668,10 +6515,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6685,7 +6531,7 @@ const de_ConformancePackTemplateValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConformancePackTemplateValidationException(body, context); + const deserialized: any = _json(body); const exception = new ConformancePackTemplateValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6701,7 +6547,7 @@ const de_IdempotentParameterMismatchRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatch(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatch({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6717,7 +6563,7 @@ const de_InsufficientDeliveryPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientDeliveryPolicyException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientDeliveryPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6733,7 +6579,7 @@ const de_InsufficientPermissionsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientPermissionsException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientPermissionsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6749,7 +6595,7 @@ const de_InvalidConfigurationRecorderNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidConfigurationRecorderNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidConfigurationRecorderNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6765,7 +6611,7 @@ const de_InvalidDeliveryChannelNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeliveryChannelNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeliveryChannelNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6781,7 +6627,7 @@ const de_InvalidExpressionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidExpressionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidExpressionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6797,7 +6643,7 @@ const de_InvalidLimitExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLimitException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLimitException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6813,7 +6659,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6829,7 +6675,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6845,7 +6691,7 @@ const de_InvalidRecordingGroupExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRecordingGroupException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRecordingGroupException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6861,7 +6707,7 @@ const de_InvalidResultTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResultTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResultTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6877,7 +6723,7 @@ const de_InvalidRoleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRoleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRoleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6893,7 +6739,7 @@ const de_InvalidS3KeyPrefixExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidS3KeyPrefixException(body, context); + const deserialized: any = _json(body); const exception = new InvalidS3KeyPrefixException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6909,7 +6755,7 @@ const de_InvalidS3KmsKeyArnExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidS3KmsKeyArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidS3KmsKeyArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6925,7 +6771,7 @@ const de_InvalidSNSTopicARNExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSNSTopicARNException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSNSTopicARNException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6941,7 +6787,7 @@ const de_InvalidTimeRangeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTimeRangeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTimeRangeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6957,7 +6803,7 @@ const de_LastDeliveryChannelDeleteFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LastDeliveryChannelDeleteFailedException(body, context); + const deserialized: any = _json(body); const exception = new LastDeliveryChannelDeleteFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6973,7 +6819,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6989,7 +6835,7 @@ const de_MaxActiveResourcesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxActiveResourcesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxActiveResourcesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7005,7 +6851,7 @@ const de_MaxNumberOfConfigRulesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfConfigRulesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfConfigRulesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7021,7 +6867,7 @@ const de_MaxNumberOfConfigurationRecordersExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfConfigurationRecordersExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfConfigurationRecordersExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7037,7 +6883,7 @@ const de_MaxNumberOfConformancePacksExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfConformancePacksExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfConformancePacksExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7053,7 +6899,7 @@ const de_MaxNumberOfDeliveryChannelsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfDeliveryChannelsExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfDeliveryChannelsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7069,7 +6915,7 @@ const de_MaxNumberOfOrganizationConfigRulesExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfOrganizationConfigRulesExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfOrganizationConfigRulesExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7085,7 +6931,7 @@ const de_MaxNumberOfOrganizationConformancePacksExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfOrganizationConformancePacksExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfOrganizationConformancePacksExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7101,7 +6947,7 @@ const de_MaxNumberOfRetentionConfigurationsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxNumberOfRetentionConfigurationsExceededException(body, context); + const deserialized: any = _json(body); const exception = new MaxNumberOfRetentionConfigurationsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7117,7 +6963,7 @@ const de_NoAvailableConfigurationRecorderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoAvailableConfigurationRecorderException(body, context); + const deserialized: any = _json(body); const exception = new NoAvailableConfigurationRecorderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7133,7 +6979,7 @@ const de_NoAvailableDeliveryChannelExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoAvailableDeliveryChannelException(body, context); + const deserialized: any = _json(body); const exception = new NoAvailableDeliveryChannelException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7149,7 +6995,7 @@ const de_NoAvailableOrganizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoAvailableOrganizationException(body, context); + const deserialized: any = _json(body); const exception = new NoAvailableOrganizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7165,7 +7011,7 @@ const de_NoRunningConfigurationRecorderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoRunningConfigurationRecorderException(body, context); + const deserialized: any = _json(body); const exception = new NoRunningConfigurationRecorderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7181,7 +7027,7 @@ const de_NoSuchBucketExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchBucketException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchBucketException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7197,7 +7043,7 @@ const de_NoSuchConfigRuleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchConfigRuleException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchConfigRuleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7213,7 +7059,7 @@ const de_NoSuchConfigRuleInConformancePackExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchConfigRuleInConformancePackException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchConfigRuleInConformancePackException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7229,7 +7075,7 @@ const de_NoSuchConfigurationAggregatorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchConfigurationAggregatorException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchConfigurationAggregatorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7245,7 +7091,7 @@ const de_NoSuchConfigurationRecorderExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchConfigurationRecorderException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchConfigurationRecorderException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7261,7 +7107,7 @@ const de_NoSuchConformancePackExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchConformancePackException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchConformancePackException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7277,7 +7123,7 @@ const de_NoSuchDeliveryChannelExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchDeliveryChannelException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchDeliveryChannelException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7293,7 +7139,7 @@ const de_NoSuchOrganizationConfigRuleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchOrganizationConfigRuleException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchOrganizationConfigRuleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7309,7 +7155,7 @@ const de_NoSuchOrganizationConformancePackExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchOrganizationConformancePackException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchOrganizationConformancePackException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7325,7 +7171,7 @@ const de_NoSuchRemediationConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchRemediationConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchRemediationConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7341,7 +7187,7 @@ const de_NoSuchRemediationExceptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchRemediationExceptionException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchRemediationExceptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7357,7 +7203,7 @@ const de_NoSuchRetentionConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchRetentionConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchRetentionConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7373,7 +7219,7 @@ const de_OrganizationAccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationAccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7389,7 +7235,7 @@ const de_OrganizationAllFeaturesNotEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationAllFeaturesNotEnabledException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationAllFeaturesNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7405,7 +7251,7 @@ const de_OrganizationConformancePackTemplateValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationConformancePackTemplateValidationException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationConformancePackTemplateValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7421,7 +7267,7 @@ const de_OversizedConfigurationItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OversizedConfigurationItemException(body, context); + const deserialized: any = _json(body); const exception = new OversizedConfigurationItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7437,7 +7283,7 @@ const de_RemediationInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RemediationInProgressException(body, context); + const deserialized: any = _json(body); const exception = new RemediationInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7453,7 +7299,7 @@ const de_ResourceConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ResourceConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7469,7 +7315,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7485,7 +7331,7 @@ const de_ResourceNotDiscoveredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotDiscoveredException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotDiscoveredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7501,7 +7347,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7517,7 +7363,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7530,7 +7376,7 @@ const de_TooManyTagsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7538,6385 +7384,2112 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccountAggregationSource - */ -const se_AccountAggregationSource = (input: AccountAggregationSource, context: __SerdeContext): any => { - return { - ...(input.AccountIds != null && { AccountIds: se_AccountAggregationSourceAccountList(input.AccountIds, context) }), - ...(input.AllAwsRegions != null && { AllAwsRegions: input.AllAwsRegions }), - ...(input.AwsRegions != null && { AwsRegions: se_AggregatorRegionList(input.AwsRegions, context) }), - }; -}; +// se_AccountAggregationSource omitted. -/** - * serializeAws_json1_1AccountAggregationSourceAccountList - */ -const se_AccountAggregationSourceAccountList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountAggregationSourceAccountList omitted. -/** - * serializeAws_json1_1AccountAggregationSourceList - */ -const se_AccountAggregationSourceList = (input: AccountAggregationSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AccountAggregationSource(entry, context); - }); -}; +// se_AccountAggregationSourceList omitted. -/** - * serializeAws_json1_1AggregateConformancePackComplianceFilters - */ -const se_AggregateConformancePackComplianceFilters = ( - input: AggregateConformancePackComplianceFilters, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.ConformancePackName != null && { ConformancePackName: input.ConformancePackName }), - }; -}; +// se_AggregateConformancePackComplianceFilters omitted. -/** - * serializeAws_json1_1AggregateConformancePackComplianceSummaryFilters - */ -const se_AggregateConformancePackComplianceSummaryFilters = ( - input: AggregateConformancePackComplianceSummaryFilters, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - }; -}; +// se_AggregateConformancePackComplianceSummaryFilters omitted. -/** - * serializeAws_json1_1AggregatedSourceStatusTypeList - */ -const se_AggregatedSourceStatusTypeList = ( - input: (AggregatedSourceStatusType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AggregatedSourceStatusTypeList omitted. -/** - * serializeAws_json1_1AggregateResourceIdentifier - */ -const se_AggregateResourceIdentifier = (input: AggregateResourceIdentifier, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.SourceAccountId != null && { SourceAccountId: input.SourceAccountId }), - ...(input.SourceRegion != null && { SourceRegion: input.SourceRegion }), - }; -}; +// se_AggregateResourceIdentifier omitted. -/** - * serializeAws_json1_1AggregatorRegionList - */ -const se_AggregatorRegionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AggregatorRegionList omitted. -/** - * serializeAws_json1_1BatchGetAggregateResourceConfigRequest - */ -const se_BatchGetAggregateResourceConfigRequest = ( - input: BatchGetAggregateResourceConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.ResourceIdentifiers != null && { - ResourceIdentifiers: se_ResourceIdentifiersList(input.ResourceIdentifiers, context), - }), - }; -}; +// se_BatchGetAggregateResourceConfigRequest omitted. -/** - * serializeAws_json1_1BatchGetResourceConfigRequest - */ -const se_BatchGetResourceConfigRequest = (input: BatchGetResourceConfigRequest, context: __SerdeContext): any => { - return { - ...(input.resourceKeys != null && { resourceKeys: se_ResourceKeys(input.resourceKeys, context) }), - }; -}; +// se_BatchGetResourceConfigRequest omitted. -/** - * serializeAws_json1_1ComplianceResourceTypes - */ -const se_ComplianceResourceTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComplianceResourceTypes omitted. -/** - * serializeAws_json1_1ComplianceTypes - */ -const se_ComplianceTypes = (input: (ComplianceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComplianceTypes omitted. -/** - * serializeAws_json1_1ConfigRule - */ -const se_ConfigRule = (input: ConfigRule, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleArn != null && { ConfigRuleArn: input.ConfigRuleArn }), - ...(input.ConfigRuleId != null && { ConfigRuleId: input.ConfigRuleId }), - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ConfigRuleState != null && { ConfigRuleState: input.ConfigRuleState }), - ...(input.CreatedBy != null && { CreatedBy: input.CreatedBy }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EvaluationModes != null && { EvaluationModes: se_EvaluationModes(input.EvaluationModes, context) }), - ...(input.InputParameters != null && { InputParameters: input.InputParameters }), - ...(input.MaximumExecutionFrequency != null && { MaximumExecutionFrequency: input.MaximumExecutionFrequency }), - ...(input.Scope != null && { Scope: se_Scope(input.Scope, context) }), - ...(input.Source != null && { Source: se_Source(input.Source, context) }), - }; -}; +// se_ConfigRule omitted. -/** - * serializeAws_json1_1ConfigRuleComplianceFilters - */ -const se_ConfigRuleComplianceFilters = (input: ConfigRuleComplianceFilters, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - }; -}; +// se_ConfigRuleComplianceFilters omitted. -/** - * serializeAws_json1_1ConfigRuleComplianceSummaryFilters - */ -const se_ConfigRuleComplianceSummaryFilters = ( - input: ConfigRuleComplianceSummaryFilters, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - }; -}; +// se_ConfigRuleComplianceSummaryFilters omitted. -/** - * serializeAws_json1_1ConfigRuleNames - */ -const se_ConfigRuleNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConfigRuleNames omitted. -/** - * serializeAws_json1_1ConfigSnapshotDeliveryProperties - */ -const se_ConfigSnapshotDeliveryProperties = (input: ConfigSnapshotDeliveryProperties, context: __SerdeContext): any => { - return { - ...(input.deliveryFrequency != null && { deliveryFrequency: input.deliveryFrequency }), - }; -}; +// se_ConfigSnapshotDeliveryProperties omitted. -/** - * serializeAws_json1_1ConfigurationAggregatorNameList - */ -const se_ConfigurationAggregatorNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConfigurationAggregatorNameList omitted. -/** - * serializeAws_json1_1ConfigurationRecorder - */ -const se_ConfigurationRecorder = (input: ConfigurationRecorder, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.recordingGroup != null && { recordingGroup: se_RecordingGroup(input.recordingGroup, context) }), - ...(input.roleARN != null && { roleARN: input.roleARN }), - }; -}; +// se_ConfigurationRecorder omitted. -/** - * serializeAws_json1_1ConfigurationRecorderNameList - */ -const se_ConfigurationRecorderNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConfigurationRecorderNameList omitted. -/** - * serializeAws_json1_1ConformancePackComplianceFilters - */ -const se_ConformancePackComplianceFilters = (input: ConformancePackComplianceFilters, context: __SerdeContext): any => { - return { - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.ConfigRuleNames != null && { - ConfigRuleNames: se_ConformancePackConfigRuleNames(input.ConfigRuleNames, context), - }), - }; -}; +// se_ConformancePackComplianceFilters omitted. -/** - * serializeAws_json1_1ConformancePackComplianceResourceIds - */ -const se_ConformancePackComplianceResourceIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConformancePackComplianceResourceIds omitted. -/** - * serializeAws_json1_1ConformancePackComplianceScoresFilters - */ -const se_ConformancePackComplianceScoresFilters = ( - input: ConformancePackComplianceScoresFilters, - context: __SerdeContext -): any => { - return { - ...(input.ConformancePackNames != null && { - ConformancePackNames: se_ConformancePackNameFilter(input.ConformancePackNames, context), - }), - }; -}; +// se_ConformancePackComplianceScoresFilters omitted. -/** - * serializeAws_json1_1ConformancePackConfigRuleNames - */ -const se_ConformancePackConfigRuleNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConformancePackConfigRuleNames omitted. -/** - * serializeAws_json1_1ConformancePackEvaluationFilters - */ -const se_ConformancePackEvaluationFilters = (input: ConformancePackEvaluationFilters, context: __SerdeContext): any => { - return { - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.ConfigRuleNames != null && { - ConfigRuleNames: se_ConformancePackConfigRuleNames(input.ConfigRuleNames, context), - }), - ...(input.ResourceIds != null && { - ResourceIds: se_ConformancePackComplianceResourceIds(input.ResourceIds, context), - }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_ConformancePackEvaluationFilters omitted. -/** - * serializeAws_json1_1ConformancePackInputParameter - */ -const se_ConformancePackInputParameter = (input: ConformancePackInputParameter, context: __SerdeContext): any => { - return { - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.ParameterValue != null && { ParameterValue: input.ParameterValue }), - }; -}; +// se_ConformancePackInputParameter omitted. -/** - * serializeAws_json1_1ConformancePackInputParameters - */ -const se_ConformancePackInputParameters = (input: ConformancePackInputParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConformancePackInputParameter(entry, context); - }); -}; +// se_ConformancePackInputParameters omitted. -/** - * serializeAws_json1_1ConformancePackNameFilter - */ -const se_ConformancePackNameFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConformancePackNameFilter omitted. -/** - * serializeAws_json1_1ConformancePackNamesList - */ -const se_ConformancePackNamesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConformancePackNamesList omitted. -/** - * serializeAws_json1_1ConformancePackNamesToSummarizeList - */ -const se_ConformancePackNamesToSummarizeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConformancePackNamesToSummarizeList omitted. -/** - * serializeAws_json1_1CustomPolicyDetails - */ -const se_CustomPolicyDetails = (input: CustomPolicyDetails, context: __SerdeContext): any => { - return { - ...(input.EnableDebugLogDelivery != null && { EnableDebugLogDelivery: input.EnableDebugLogDelivery }), - ...(input.PolicyRuntime != null && { PolicyRuntime: input.PolicyRuntime }), - ...(input.PolicyText != null && { PolicyText: input.PolicyText }), - }; -}; +// se_CustomPolicyDetails omitted. -/** - * serializeAws_json1_1DebugLogDeliveryAccounts - */ -const se_DebugLogDeliveryAccounts = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DebugLogDeliveryAccounts omitted. -/** - * serializeAws_json1_1DeleteAggregationAuthorizationRequest - */ -const se_DeleteAggregationAuthorizationRequest = ( - input: DeleteAggregationAuthorizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizedAccountId != null && { AuthorizedAccountId: input.AuthorizedAccountId }), - ...(input.AuthorizedAwsRegion != null && { AuthorizedAwsRegion: input.AuthorizedAwsRegion }), - }; -}; +// se_DeleteAggregationAuthorizationRequest omitted. -/** - * serializeAws_json1_1DeleteConfigRuleRequest - */ -const se_DeleteConfigRuleRequest = (input: DeleteConfigRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - }; -}; +// se_DeleteConfigRuleRequest omitted. -/** - * serializeAws_json1_1DeleteConfigurationAggregatorRequest - */ -const se_DeleteConfigurationAggregatorRequest = ( - input: DeleteConfigurationAggregatorRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - }; -}; +// se_DeleteConfigurationAggregatorRequest omitted. -/** - * serializeAws_json1_1DeleteConfigurationRecorderRequest - */ -const se_DeleteConfigurationRecorderRequest = ( - input: DeleteConfigurationRecorderRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationRecorderName != null && { ConfigurationRecorderName: input.ConfigurationRecorderName }), - }; -}; +// se_DeleteConfigurationRecorderRequest omitted. -/** - * serializeAws_json1_1DeleteConformancePackRequest - */ -const se_DeleteConformancePackRequest = (input: DeleteConformancePackRequest, context: __SerdeContext): any => { - return { - ...(input.ConformancePackName != null && { ConformancePackName: input.ConformancePackName }), - }; -}; +// se_DeleteConformancePackRequest omitted. -/** - * serializeAws_json1_1DeleteDeliveryChannelRequest - */ -const se_DeleteDeliveryChannelRequest = (input: DeleteDeliveryChannelRequest, context: __SerdeContext): any => { - return { - ...(input.DeliveryChannelName != null && { DeliveryChannelName: input.DeliveryChannelName }), - }; -}; +// se_DeleteDeliveryChannelRequest omitted. -/** - * serializeAws_json1_1DeleteEvaluationResultsRequest - */ -const se_DeleteEvaluationResultsRequest = (input: DeleteEvaluationResultsRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - }; -}; +// se_DeleteEvaluationResultsRequest omitted. -/** - * serializeAws_json1_1DeleteOrganizationConfigRuleRequest - */ -const se_DeleteOrganizationConfigRuleRequest = ( - input: DeleteOrganizationConfigRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationConfigRuleName != null && { OrganizationConfigRuleName: input.OrganizationConfigRuleName }), - }; -}; +// se_DeleteOrganizationConfigRuleRequest omitted. -/** - * serializeAws_json1_1DeleteOrganizationConformancePackRequest - */ -const se_DeleteOrganizationConformancePackRequest = ( - input: DeleteOrganizationConformancePackRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationConformancePackName != null && { - OrganizationConformancePackName: input.OrganizationConformancePackName, - }), - }; -}; +// se_DeleteOrganizationConformancePackRequest omitted. -/** - * serializeAws_json1_1DeletePendingAggregationRequestRequest - */ -const se_DeletePendingAggregationRequestRequest = ( - input: DeletePendingAggregationRequestRequest, - context: __SerdeContext -): any => { - return { - ...(input.RequesterAccountId != null && { RequesterAccountId: input.RequesterAccountId }), - ...(input.RequesterAwsRegion != null && { RequesterAwsRegion: input.RequesterAwsRegion }), - }; -}; +// se_DeletePendingAggregationRequestRequest omitted. -/** - * serializeAws_json1_1DeleteRemediationConfigurationRequest - */ -const se_DeleteRemediationConfigurationRequest = ( - input: DeleteRemediationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1DeleteRemediationExceptionsRequest - */ -const se_DeleteRemediationExceptionsRequest = ( - input: DeleteRemediationExceptionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ResourceKeys != null && { - ResourceKeys: se_RemediationExceptionResourceKeys(input.ResourceKeys, context), - }), - }; -}; - -/** - * serializeAws_json1_1DeleteResourceConfigRequest - */ -const se_DeleteResourceConfigRequest = (input: DeleteResourceConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1DeleteRetentionConfigurationRequest - */ -const se_DeleteRetentionConfigurationRequest = ( - input: DeleteRetentionConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.RetentionConfigurationName != null && { RetentionConfigurationName: input.RetentionConfigurationName }), - }; -}; - -/** - * serializeAws_json1_1DeleteStoredQueryRequest - */ -const se_DeleteStoredQueryRequest = (input: DeleteStoredQueryRequest, context: __SerdeContext): any => { - return { - ...(input.QueryName != null && { QueryName: input.QueryName }), - }; -}; - -/** - * serializeAws_json1_1DeliverConfigSnapshotRequest - */ -const se_DeliverConfigSnapshotRequest = (input: DeliverConfigSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.deliveryChannelName != null && { deliveryChannelName: input.deliveryChannelName }), - }; -}; - -/** - * serializeAws_json1_1DeliveryChannel - */ -const se_DeliveryChannel = (input: DeliveryChannel, context: __SerdeContext): any => { - return { - ...(input.configSnapshotDeliveryProperties != null && { - configSnapshotDeliveryProperties: se_ConfigSnapshotDeliveryProperties( - input.configSnapshotDeliveryProperties, - context - ), - }), - ...(input.name != null && { name: input.name }), - ...(input.s3BucketName != null && { s3BucketName: input.s3BucketName }), - ...(input.s3KeyPrefix != null && { s3KeyPrefix: input.s3KeyPrefix }), - ...(input.s3KmsKeyArn != null && { s3KmsKeyArn: input.s3KmsKeyArn }), - ...(input.snsTopicARN != null && { snsTopicARN: input.snsTopicARN }), - }; -}; - -/** - * serializeAws_json1_1DeliveryChannelNameList - */ -const se_DeliveryChannelNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1DescribeAggregateComplianceByConfigRulesRequest - */ -const se_DescribeAggregateComplianceByConfigRulesRequest = ( - input: DescribeAggregateComplianceByConfigRulesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Filters != null && { Filters: se_ConfigRuleComplianceFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeAggregateComplianceByConformancePacksRequest - */ -const se_DescribeAggregateComplianceByConformancePacksRequest = ( - input: DescribeAggregateComplianceByConformancePacksRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Filters != null && { Filters: se_AggregateConformancePackComplianceFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeAggregationAuthorizationsRequest - */ -const se_DescribeAggregationAuthorizationsRequest = ( - input: DescribeAggregationAuthorizationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeComplianceByConfigRuleRequest - */ -const se_DescribeComplianceByConfigRuleRequest = ( - input: DescribeComplianceByConfigRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.ComplianceTypes != null && { ComplianceTypes: se_ComplianceTypes(input.ComplianceTypes, context) }), - ...(input.ConfigRuleNames != null && { ConfigRuleNames: se_ConfigRuleNames(input.ConfigRuleNames, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeComplianceByResourceRequest - */ -const se_DescribeComplianceByResourceRequest = ( - input: DescribeComplianceByResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ComplianceTypes != null && { ComplianceTypes: se_ComplianceTypes(input.ComplianceTypes, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigRuleEvaluationStatusRequest - */ -const se_DescribeConfigRuleEvaluationStatusRequest = ( - input: DescribeConfigRuleEvaluationStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleNames != null && { ConfigRuleNames: se_ConfigRuleNames(input.ConfigRuleNames, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigRulesFilters - */ -const se_DescribeConfigRulesFilters = (input: DescribeConfigRulesFilters, context: __SerdeContext): any => { - return { - ...(input.EvaluationMode != null && { EvaluationMode: input.EvaluationMode }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigRulesRequest - */ -const se_DescribeConfigRulesRequest = (input: DescribeConfigRulesRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleNames != null && { ConfigRuleNames: se_ConfigRuleNames(input.ConfigRuleNames, context) }), - ...(input.Filters != null && { Filters: se_DescribeConfigRulesFilters(input.Filters, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusRequest - */ -const se_DescribeConfigurationAggregatorSourcesStatusRequest = ( - input: DescribeConfigurationAggregatorSourcesStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UpdateStatus != null && { UpdateStatus: se_AggregatedSourceStatusTypeList(input.UpdateStatus, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigurationAggregatorsRequest - */ -const se_DescribeConfigurationAggregatorsRequest = ( - input: DescribeConfigurationAggregatorsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorNames != null && { - ConfigurationAggregatorNames: se_ConfigurationAggregatorNameList(input.ConfigurationAggregatorNames, context), - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigurationRecordersRequest - */ -const se_DescribeConfigurationRecordersRequest = ( - input: DescribeConfigurationRecordersRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationRecorderNames != null && { - ConfigurationRecorderNames: se_ConfigurationRecorderNameList(input.ConfigurationRecorderNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeConfigurationRecorderStatusRequest - */ -const se_DescribeConfigurationRecorderStatusRequest = ( - input: DescribeConfigurationRecorderStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationRecorderNames != null && { - ConfigurationRecorderNames: se_ConfigurationRecorderNameList(input.ConfigurationRecorderNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeConformancePackComplianceRequest - */ -const se_DescribeConformancePackComplianceRequest = ( - input: DescribeConformancePackComplianceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConformancePackName != null && { ConformancePackName: input.ConformancePackName }), - ...(input.Filters != null && { Filters: se_ConformancePackComplianceFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeConformancePacksRequest - */ -const se_DescribeConformancePacksRequest = (input: DescribeConformancePacksRequest, context: __SerdeContext): any => { - return { - ...(input.ConformancePackNames != null && { - ConformancePackNames: se_ConformancePackNamesList(input.ConformancePackNames, context), - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeConformancePackStatusRequest - */ -const se_DescribeConformancePackStatusRequest = ( - input: DescribeConformancePackStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConformancePackNames != null && { - ConformancePackNames: se_ConformancePackNamesList(input.ConformancePackNames, context), - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeDeliveryChannelsRequest - */ -const se_DescribeDeliveryChannelsRequest = (input: DescribeDeliveryChannelsRequest, context: __SerdeContext): any => { - return { - ...(input.DeliveryChannelNames != null && { - DeliveryChannelNames: se_DeliveryChannelNameList(input.DeliveryChannelNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeDeliveryChannelStatusRequest - */ -const se_DescribeDeliveryChannelStatusRequest = ( - input: DescribeDeliveryChannelStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeliveryChannelNames != null && { - DeliveryChannelNames: se_DeliveryChannelNameList(input.DeliveryChannelNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeOrganizationConfigRulesRequest - */ -const se_DescribeOrganizationConfigRulesRequest = ( - input: DescribeOrganizationConfigRulesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationConfigRuleNames != null && { - OrganizationConfigRuleNames: se_OrganizationConfigRuleNames(input.OrganizationConfigRuleNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeOrganizationConfigRuleStatusesRequest - */ -const se_DescribeOrganizationConfigRuleStatusesRequest = ( - input: DescribeOrganizationConfigRuleStatusesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationConfigRuleNames != null && { - OrganizationConfigRuleNames: se_OrganizationConfigRuleNames(input.OrganizationConfigRuleNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeOrganizationConformancePacksRequest - */ -const se_DescribeOrganizationConformancePacksRequest = ( - input: DescribeOrganizationConformancePacksRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationConformancePackNames != null && { - OrganizationConformancePackNames: se_OrganizationConformancePackNames( - input.OrganizationConformancePackNames, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeOrganizationConformancePackStatusesRequest - */ -const se_DescribeOrganizationConformancePackStatusesRequest = ( - input: DescribeOrganizationConformancePackStatusesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationConformancePackNames != null && { - OrganizationConformancePackNames: se_OrganizationConformancePackNames( - input.OrganizationConformancePackNames, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1DescribePendingAggregationRequestsRequest - */ -const se_DescribePendingAggregationRequestsRequest = ( - input: DescribePendingAggregationRequestsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeRemediationConfigurationsRequest - */ -const se_DescribeRemediationConfigurationsRequest = ( - input: DescribeRemediationConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleNames != null && { ConfigRuleNames: se_ConfigRuleNames(input.ConfigRuleNames, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeRemediationExceptionsRequest - */ -const se_DescribeRemediationExceptionsRequest = ( - input: DescribeRemediationExceptionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceKeys != null && { - ResourceKeys: se_RemediationExceptionResourceKeys(input.ResourceKeys, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeRemediationExecutionStatusRequest - */ -const se_DescribeRemediationExecutionStatusRequest = ( - input: DescribeRemediationExecutionStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceKeys != null && { ResourceKeys: se_ResourceKeys(input.ResourceKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeRetentionConfigurationsRequest - */ -const se_DescribeRetentionConfigurationsRequest = ( - input: DescribeRetentionConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RetentionConfigurationNames != null && { - RetentionConfigurationNames: se_RetentionConfigurationNameList(input.RetentionConfigurationNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1Evaluation - */ -const se_Evaluation = (input: Evaluation, context: __SerdeContext): any => { - return { - ...(input.Annotation != null && { Annotation: input.Annotation }), - ...(input.ComplianceResourceId != null && { ComplianceResourceId: input.ComplianceResourceId }), - ...(input.ComplianceResourceType != null && { ComplianceResourceType: input.ComplianceResourceType }), - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.OrderingTimestamp != null && { OrderingTimestamp: Math.round(input.OrderingTimestamp.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1EvaluationContext - */ -const se_EvaluationContext = (input: EvaluationContext, context: __SerdeContext): any => { - return { - ...(input.EvaluationContextIdentifier != null && { - EvaluationContextIdentifier: input.EvaluationContextIdentifier, - }), - }; -}; - -/** - * serializeAws_json1_1EvaluationModeConfiguration - */ -const se_EvaluationModeConfiguration = (input: EvaluationModeConfiguration, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; - -/** - * serializeAws_json1_1EvaluationModes - */ -const se_EvaluationModes = (input: EvaluationModeConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EvaluationModeConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1Evaluations - */ -const se_Evaluations = (input: Evaluation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Evaluation(entry, context); - }); -}; - -/** - * serializeAws_json1_1ExcludedAccounts - */ -const se_ExcludedAccounts = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ExecutionControls - */ -const se_ExecutionControls = (input: ExecutionControls, context: __SerdeContext): any => { - return { - ...(input.SsmControls != null && { SsmControls: se_SsmControls(input.SsmControls, context) }), - }; -}; - -/** - * serializeAws_json1_1ExternalEvaluation - */ -const se_ExternalEvaluation = (input: ExternalEvaluation, context: __SerdeContext): any => { - return { - ...(input.Annotation != null && { Annotation: input.Annotation }), - ...(input.ComplianceResourceId != null && { ComplianceResourceId: input.ComplianceResourceId }), - ...(input.ComplianceResourceType != null && { ComplianceResourceType: input.ComplianceResourceType }), - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.OrderingTimestamp != null && { OrderingTimestamp: Math.round(input.OrderingTimestamp.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleRequest - */ -const se_GetAggregateComplianceDetailsByConfigRuleRequest = ( - input: GetAggregateComplianceDetailsByConfigRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetAggregateConfigRuleComplianceSummaryRequest - */ -const se_GetAggregateConfigRuleComplianceSummaryRequest = ( - input: GetAggregateConfigRuleComplianceSummaryRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Filters != null && { Filters: se_ConfigRuleComplianceSummaryFilters(input.Filters, context) }), - ...(input.GroupByKey != null && { GroupByKey: input.GroupByKey }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetAggregateConformancePackComplianceSummaryRequest - */ -const se_GetAggregateConformancePackComplianceSummaryRequest = ( - input: GetAggregateConformancePackComplianceSummaryRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Filters != null && { - Filters: se_AggregateConformancePackComplianceSummaryFilters(input.Filters, context), - }), - ...(input.GroupByKey != null && { GroupByKey: input.GroupByKey }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetAggregateDiscoveredResourceCountsRequest - */ -const se_GetAggregateDiscoveredResourceCountsRequest = ( - input: GetAggregateDiscoveredResourceCountsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Filters != null && { Filters: se_ResourceCountFilters(input.Filters, context) }), - ...(input.GroupByKey != null && { GroupByKey: input.GroupByKey }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetAggregateResourceConfigRequest - */ -const se_GetAggregateResourceConfigRequest = ( - input: GetAggregateResourceConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.ResourceIdentifier != null && { - ResourceIdentifier: se_AggregateResourceIdentifier(input.ResourceIdentifier, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetComplianceDetailsByConfigRuleRequest - */ -const se_GetComplianceDetailsByConfigRuleRequest = ( - input: GetComplianceDetailsByConfigRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.ComplianceTypes != null && { ComplianceTypes: se_ComplianceTypes(input.ComplianceTypes, context) }), - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetComplianceDetailsByResourceRequest - */ -const se_GetComplianceDetailsByResourceRequest = ( - input: GetComplianceDetailsByResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ComplianceTypes != null && { ComplianceTypes: se_ComplianceTypes(input.ComplianceTypes, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceEvaluationId != null && { ResourceEvaluationId: input.ResourceEvaluationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1GetComplianceSummaryByResourceTypeRequest - */ -const se_GetComplianceSummaryByResourceTypeRequest = ( - input: GetComplianceSummaryByResourceTypeRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceTypes != null && { ResourceTypes: se_ResourceTypes(input.ResourceTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1GetConformancePackComplianceDetailsRequest - */ -const se_GetConformancePackComplianceDetailsRequest = ( - input: GetConformancePackComplianceDetailsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConformancePackName != null && { ConformancePackName: input.ConformancePackName }), - ...(input.Filters != null && { Filters: se_ConformancePackEvaluationFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetConformancePackComplianceSummaryRequest - */ -const se_GetConformancePackComplianceSummaryRequest = ( - input: GetConformancePackComplianceSummaryRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConformancePackNames != null && { - ConformancePackNames: se_ConformancePackNamesToSummarizeList(input.ConformancePackNames, context), - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetCustomRulePolicyRequest - */ -const se_GetCustomRulePolicyRequest = (input: GetCustomRulePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - }; -}; - -/** - * serializeAws_json1_1GetDiscoveredResourceCountsRequest - */ -const se_GetDiscoveredResourceCountsRequest = ( - input: GetDiscoveredResourceCountsRequest, - context: __SerdeContext -): any => { - return { - ...(input.limit != null && { limit: input.limit }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceTypes != null && { resourceTypes: se_ResourceTypes(input.resourceTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1GetOrganizationConfigRuleDetailedStatusRequest - */ -const se_GetOrganizationConfigRuleDetailedStatusRequest = ( - input: GetOrganizationConfigRuleDetailedStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_StatusDetailFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationConfigRuleName != null && { OrganizationConfigRuleName: input.OrganizationConfigRuleName }), - }; -}; - -/** - * serializeAws_json1_1GetOrganizationConformancePackDetailedStatusRequest - */ -const se_GetOrganizationConformancePackDetailedStatusRequest = ( - input: GetOrganizationConformancePackDetailedStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_OrganizationResourceDetailedStatusFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationConformancePackName != null && { - OrganizationConformancePackName: input.OrganizationConformancePackName, - }), - }; -}; - -/** - * serializeAws_json1_1GetOrganizationCustomRulePolicyRequest - */ -const se_GetOrganizationCustomRulePolicyRequest = ( - input: GetOrganizationCustomRulePolicyRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationConfigRuleName != null && { OrganizationConfigRuleName: input.OrganizationConfigRuleName }), - }; -}; - -/** - * serializeAws_json1_1GetResourceConfigHistoryRequest - */ -const se_GetResourceConfigHistoryRequest = (input: GetResourceConfigHistoryRequest, context: __SerdeContext): any => { - return { - ...(input.chronologicalOrder != null && { chronologicalOrder: input.chronologicalOrder }), - ...(input.earlierTime != null && { earlierTime: Math.round(input.earlierTime.getTime() / 1000) }), - ...(input.laterTime != null && { laterTime: Math.round(input.laterTime.getTime() / 1000) }), - ...(input.limit != null && { limit: input.limit }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceId != null && { resourceId: input.resourceId }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }; -}; - -/** - * serializeAws_json1_1GetResourceEvaluationSummaryRequest - */ -const se_GetResourceEvaluationSummaryRequest = ( - input: GetResourceEvaluationSummaryRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceEvaluationId != null && { ResourceEvaluationId: input.ResourceEvaluationId }), - }; -}; - -/** - * serializeAws_json1_1GetStoredQueryRequest - */ -const se_GetStoredQueryRequest = (input: GetStoredQueryRequest, context: __SerdeContext): any => { - return { - ...(input.QueryName != null && { QueryName: input.QueryName }), - }; -}; - -/** - * serializeAws_json1_1ListAggregateDiscoveredResourcesRequest - */ -const se_ListAggregateDiscoveredResourcesRequest = ( - input: ListAggregateDiscoveredResourcesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Filters != null && { Filters: se_ResourceFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1ListConformancePackComplianceScoresRequest - */ -const se_ListConformancePackComplianceScoresRequest = ( - input: ListConformancePackComplianceScoresRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_ConformancePackComplianceScoresFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListDiscoveredResourcesRequest - */ -const se_ListDiscoveredResourcesRequest = (input: ListDiscoveredResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.includeDeletedResources != null && { includeDeletedResources: input.includeDeletedResources }), - ...(input.limit != null && { limit: input.limit }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceIds != null && { resourceIds: se_ResourceIdList(input.resourceIds, context) }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }; -}; - -/** - * serializeAws_json1_1ListResourceEvaluationsRequest - */ -const se_ListResourceEvaluationsRequest = (input: ListResourceEvaluationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ResourceEvaluationFilters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListStoredQueriesRequest - */ -const se_ListStoredQueriesRequest = (input: ListStoredQueriesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1OrganizationAggregationSource - */ -const se_OrganizationAggregationSource = (input: OrganizationAggregationSource, context: __SerdeContext): any => { - return { - ...(input.AllAwsRegions != null && { AllAwsRegions: input.AllAwsRegions }), - ...(input.AwsRegions != null && { AwsRegions: se_AggregatorRegionList(input.AwsRegions, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_json1_1OrganizationConfigRuleNames - */ -const se_OrganizationConfigRuleNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OrganizationConfigRuleTriggerTypeNoSNs - */ -const se_OrganizationConfigRuleTriggerTypeNoSNs = ( - input: (OrganizationConfigRuleTriggerTypeNoSN | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OrganizationConfigRuleTriggerTypes - */ -const se_OrganizationConfigRuleTriggerTypes = ( - input: (OrganizationConfigRuleTriggerType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OrganizationConformancePackNames - */ -const se_OrganizationConformancePackNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OrganizationCustomPolicyRuleMetadata - */ -const se_OrganizationCustomPolicyRuleMetadata = ( - input: OrganizationCustomPolicyRuleMetadata, - context: __SerdeContext -): any => { - return { - ...(input.DebugLogDeliveryAccounts != null && { - DebugLogDeliveryAccounts: se_DebugLogDeliveryAccounts(input.DebugLogDeliveryAccounts, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.InputParameters != null && { InputParameters: input.InputParameters }), - ...(input.MaximumExecutionFrequency != null && { MaximumExecutionFrequency: input.MaximumExecutionFrequency }), - ...(input.OrganizationConfigRuleTriggerTypes != null && { - OrganizationConfigRuleTriggerTypes: se_OrganizationConfigRuleTriggerTypeNoSNs( - input.OrganizationConfigRuleTriggerTypes, - context - ), - }), - ...(input.PolicyRuntime != null && { PolicyRuntime: input.PolicyRuntime }), - ...(input.PolicyText != null && { PolicyText: input.PolicyText }), - ...(input.ResourceIdScope != null && { ResourceIdScope: input.ResourceIdScope }), - ...(input.ResourceTypesScope != null && { - ResourceTypesScope: se_ResourceTypesScope(input.ResourceTypesScope, context), - }), - ...(input.TagKeyScope != null && { TagKeyScope: input.TagKeyScope }), - ...(input.TagValueScope != null && { TagValueScope: input.TagValueScope }), - }; -}; - -/** - * serializeAws_json1_1OrganizationCustomRuleMetadata - */ -const se_OrganizationCustomRuleMetadata = (input: OrganizationCustomRuleMetadata, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.InputParameters != null && { InputParameters: input.InputParameters }), - ...(input.LambdaFunctionArn != null && { LambdaFunctionArn: input.LambdaFunctionArn }), - ...(input.MaximumExecutionFrequency != null && { MaximumExecutionFrequency: input.MaximumExecutionFrequency }), - ...(input.OrganizationConfigRuleTriggerTypes != null && { - OrganizationConfigRuleTriggerTypes: se_OrganizationConfigRuleTriggerTypes( - input.OrganizationConfigRuleTriggerTypes, - context - ), - }), - ...(input.ResourceIdScope != null && { ResourceIdScope: input.ResourceIdScope }), - ...(input.ResourceTypesScope != null && { - ResourceTypesScope: se_ResourceTypesScope(input.ResourceTypesScope, context), - }), - ...(input.TagKeyScope != null && { TagKeyScope: input.TagKeyScope }), - ...(input.TagValueScope != null && { TagValueScope: input.TagValueScope }), - }; -}; - -/** - * serializeAws_json1_1OrganizationManagedRuleMetadata - */ -const se_OrganizationManagedRuleMetadata = (input: OrganizationManagedRuleMetadata, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.InputParameters != null && { InputParameters: input.InputParameters }), - ...(input.MaximumExecutionFrequency != null && { MaximumExecutionFrequency: input.MaximumExecutionFrequency }), - ...(input.ResourceIdScope != null && { ResourceIdScope: input.ResourceIdScope }), - ...(input.ResourceTypesScope != null && { - ResourceTypesScope: se_ResourceTypesScope(input.ResourceTypesScope, context), - }), - ...(input.RuleIdentifier != null && { RuleIdentifier: input.RuleIdentifier }), - ...(input.TagKeyScope != null && { TagKeyScope: input.TagKeyScope }), - ...(input.TagValueScope != null && { TagValueScope: input.TagValueScope }), - }; -}; - -/** - * serializeAws_json1_1OrganizationResourceDetailedStatusFilters - */ -const se_OrganizationResourceDetailedStatusFilters = ( - input: OrganizationResourceDetailedStatusFilters, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_json1_1PutAggregationAuthorizationRequest - */ -const se_PutAggregationAuthorizationRequest = ( - input: PutAggregationAuthorizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizedAccountId != null && { AuthorizedAccountId: input.AuthorizedAccountId }), - ...(input.AuthorizedAwsRegion != null && { AuthorizedAwsRegion: input.AuthorizedAwsRegion }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutConfigRuleRequest - */ -const se_PutConfigRuleRequest = (input: PutConfigRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRule != null && { ConfigRule: se_ConfigRule(input.ConfigRule, context) }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutConfigurationAggregatorRequest - */ -const se_PutConfigurationAggregatorRequest = ( - input: PutConfigurationAggregatorRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountAggregationSources != null && { - AccountAggregationSources: se_AccountAggregationSourceList(input.AccountAggregationSources, context), - }), - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.OrganizationAggregationSource != null && { - OrganizationAggregationSource: se_OrganizationAggregationSource(input.OrganizationAggregationSource, context), - }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutConfigurationRecorderRequest - */ -const se_PutConfigurationRecorderRequest = (input: PutConfigurationRecorderRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationRecorder != null && { - ConfigurationRecorder: se_ConfigurationRecorder(input.ConfigurationRecorder, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutConformancePackRequest - */ -const se_PutConformancePackRequest = (input: PutConformancePackRequest, context: __SerdeContext): any => { - return { - ...(input.ConformancePackInputParameters != null && { - ConformancePackInputParameters: se_ConformancePackInputParameters(input.ConformancePackInputParameters, context), - }), - ...(input.ConformancePackName != null && { ConformancePackName: input.ConformancePackName }), - ...(input.DeliveryS3Bucket != null && { DeliveryS3Bucket: input.DeliveryS3Bucket }), - ...(input.DeliveryS3KeyPrefix != null && { DeliveryS3KeyPrefix: input.DeliveryS3KeyPrefix }), - ...(input.TemplateBody != null && { TemplateBody: input.TemplateBody }), - ...(input.TemplateS3Uri != null && { TemplateS3Uri: input.TemplateS3Uri }), - ...(input.TemplateSSMDocumentDetails != null && { - TemplateSSMDocumentDetails: se_TemplateSSMDocumentDetails(input.TemplateSSMDocumentDetails, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutDeliveryChannelRequest - */ -const se_PutDeliveryChannelRequest = (input: PutDeliveryChannelRequest, context: __SerdeContext): any => { - return { - ...(input.DeliveryChannel != null && { DeliveryChannel: se_DeliveryChannel(input.DeliveryChannel, context) }), - }; -}; - -/** - * serializeAws_json1_1PutEvaluationsRequest - */ -const se_PutEvaluationsRequest = (input: PutEvaluationsRequest, context: __SerdeContext): any => { - return { - ...(input.Evaluations != null && { Evaluations: se_Evaluations(input.Evaluations, context) }), - ...(input.ResultToken != null && { ResultToken: input.ResultToken }), - ...(input.TestMode != null && { TestMode: input.TestMode }), - }; -}; - -/** - * serializeAws_json1_1PutExternalEvaluationRequest - */ -const se_PutExternalEvaluationRequest = (input: PutExternalEvaluationRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ExternalEvaluation != null && { - ExternalEvaluation: se_ExternalEvaluation(input.ExternalEvaluation, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutOrganizationConfigRuleRequest - */ -const se_PutOrganizationConfigRuleRequest = (input: PutOrganizationConfigRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ExcludedAccounts != null && { ExcludedAccounts: se_ExcludedAccounts(input.ExcludedAccounts, context) }), - ...(input.OrganizationConfigRuleName != null && { OrganizationConfigRuleName: input.OrganizationConfigRuleName }), - ...(input.OrganizationCustomPolicyRuleMetadata != null && { - OrganizationCustomPolicyRuleMetadata: se_OrganizationCustomPolicyRuleMetadata( - input.OrganizationCustomPolicyRuleMetadata, - context - ), - }), - ...(input.OrganizationCustomRuleMetadata != null && { - OrganizationCustomRuleMetadata: se_OrganizationCustomRuleMetadata(input.OrganizationCustomRuleMetadata, context), - }), - ...(input.OrganizationManagedRuleMetadata != null && { - OrganizationManagedRuleMetadata: se_OrganizationManagedRuleMetadata( - input.OrganizationManagedRuleMetadata, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1PutOrganizationConformancePackRequest - */ -const se_PutOrganizationConformancePackRequest = ( - input: PutOrganizationConformancePackRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConformancePackInputParameters != null && { - ConformancePackInputParameters: se_ConformancePackInputParameters(input.ConformancePackInputParameters, context), - }), - ...(input.DeliveryS3Bucket != null && { DeliveryS3Bucket: input.DeliveryS3Bucket }), - ...(input.DeliveryS3KeyPrefix != null && { DeliveryS3KeyPrefix: input.DeliveryS3KeyPrefix }), - ...(input.ExcludedAccounts != null && { ExcludedAccounts: se_ExcludedAccounts(input.ExcludedAccounts, context) }), - ...(input.OrganizationConformancePackName != null && { - OrganizationConformancePackName: input.OrganizationConformancePackName, - }), - ...(input.TemplateBody != null && { TemplateBody: input.TemplateBody }), - ...(input.TemplateS3Uri != null && { TemplateS3Uri: input.TemplateS3Uri }), - }; -}; - -/** - * serializeAws_json1_1PutRemediationConfigurationsRequest - */ -const se_PutRemediationConfigurationsRequest = ( - input: PutRemediationConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.RemediationConfigurations != null && { - RemediationConfigurations: se_RemediationConfigurations(input.RemediationConfigurations, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutRemediationExceptionsRequest - */ -const se_PutRemediationExceptionsRequest = (input: PutRemediationExceptionsRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ExpirationTime != null && { ExpirationTime: Math.round(input.ExpirationTime.getTime() / 1000) }), - ...(input.Message != null && { Message: input.Message }), - ...(input.ResourceKeys != null && { - ResourceKeys: se_RemediationExceptionResourceKeys(input.ResourceKeys, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutResourceConfigRequest - */ -const se_PutResourceConfigRequest = (input: PutResourceConfigRequest, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: input.Configuration }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.SchemaVersionId != null && { SchemaVersionId: input.SchemaVersionId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutRetentionConfigurationRequest - */ -const se_PutRetentionConfigurationRequest = (input: PutRetentionConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.RetentionPeriodInDays != null && { RetentionPeriodInDays: input.RetentionPeriodInDays }), - }; -}; - -/** - * serializeAws_json1_1PutStoredQueryRequest - */ -const se_PutStoredQueryRequest = (input: PutStoredQueryRequest, context: __SerdeContext): any => { - return { - ...(input.StoredQuery != null && { StoredQuery: se_StoredQuery(input.StoredQuery, context) }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1RecordingGroup - */ -const se_RecordingGroup = (input: RecordingGroup, context: __SerdeContext): any => { - return { - ...(input.allSupported != null && { allSupported: input.allSupported }), - ...(input.includeGlobalResourceTypes != null && { includeGlobalResourceTypes: input.includeGlobalResourceTypes }), - ...(input.resourceTypes != null && { resourceTypes: se_ResourceTypeList(input.resourceTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1ReevaluateConfigRuleNames - */ -const se_ReevaluateConfigRuleNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RemediationConfiguration - */ -const se_RemediationConfiguration = (input: RemediationConfiguration, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Automatic != null && { Automatic: input.Automatic }), - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.CreatedByService != null && { CreatedByService: input.CreatedByService }), - ...(input.ExecutionControls != null && { - ExecutionControls: se_ExecutionControls(input.ExecutionControls, context), - }), - ...(input.MaximumAutomaticAttempts != null && { MaximumAutomaticAttempts: input.MaximumAutomaticAttempts }), - ...(input.Parameters != null && { Parameters: se_RemediationParameters(input.Parameters, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.RetryAttemptSeconds != null && { RetryAttemptSeconds: input.RetryAttemptSeconds }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - ...(input.TargetVersion != null && { TargetVersion: input.TargetVersion }), - }; -}; - -/** - * serializeAws_json1_1RemediationConfigurations - */ -const se_RemediationConfigurations = (input: RemediationConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RemediationConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1RemediationExceptionResourceKey - */ -const se_RemediationExceptionResourceKey = (input: RemediationExceptionResourceKey, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1RemediationExceptionResourceKeys - */ -const se_RemediationExceptionResourceKeys = ( - input: RemediationExceptionResourceKey[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RemediationExceptionResourceKey(entry, context); - }); -}; - -/** - * serializeAws_json1_1RemediationParameters - */ -const se_RemediationParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_RemediationParameterValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1RemediationParameterValue - */ -const se_RemediationParameterValue = (input: RemediationParameterValue, context: __SerdeContext): any => { - return { - ...(input.ResourceValue != null && { ResourceValue: se_ResourceValue(input.ResourceValue, context) }), - ...(input.StaticValue != null && { StaticValue: se_StaticValue(input.StaticValue, context) }), - }; -}; - -/** - * serializeAws_json1_1ResourceCountFilters - */ -const se_ResourceCountFilters = (input: ResourceCountFilters, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Region != null && { Region: input.Region }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1ResourceDetails - */ -const se_ResourceDetails = (input: ResourceDetails, context: __SerdeContext): any => { - return { - ...(input.ResourceConfiguration != null && { ResourceConfiguration: input.ResourceConfiguration }), - ...(input.ResourceConfigurationSchemaType != null && { - ResourceConfigurationSchemaType: input.ResourceConfigurationSchemaType, - }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1ResourceEvaluationFilters - */ -const se_ResourceEvaluationFilters = (input: ResourceEvaluationFilters, context: __SerdeContext): any => { - return { - ...(input.EvaluationContextIdentifier != null && { - EvaluationContextIdentifier: input.EvaluationContextIdentifier, - }), - ...(input.EvaluationMode != null && { EvaluationMode: input.EvaluationMode }), - ...(input.TimeWindow != null && { TimeWindow: se_TimeWindow(input.TimeWindow, context) }), - }; -}; - -/** - * serializeAws_json1_1ResourceFilters - */ -const se_ResourceFilters = (input: ResourceFilters, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Region != null && { Region: input.Region }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - }; -}; - -/** - * serializeAws_json1_1ResourceIdentifiersList - */ -const se_ResourceIdentifiersList = (input: AggregateResourceIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AggregateResourceIdentifier(entry, context); - }); -}; - -/** - * serializeAws_json1_1ResourceIdList - */ -const se_ResourceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResourceKey - */ -const se_ResourceKey = (input: ResourceKey, context: __SerdeContext): any => { - return { - ...(input.resourceId != null && { resourceId: input.resourceId }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }; -}; - -/** - * serializeAws_json1_1ResourceKeys - */ -const se_ResourceKeys = (input: ResourceKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceKey(entry, context); - }); -}; - -/** - * serializeAws_json1_1ResourceTypeList - */ -const se_ResourceTypeList = (input: (ResourceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResourceTypes - */ -const se_ResourceTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResourceTypesScope - */ -const se_ResourceTypesScope = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResourceValue - */ -const se_ResourceValue = (input: ResourceValue, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1RetentionConfigurationNameList - */ -const se_RetentionConfigurationNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Scope - */ -const se_Scope = (input: Scope, context: __SerdeContext): any => { - return { - ...(input.ComplianceResourceId != null && { ComplianceResourceId: input.ComplianceResourceId }), - ...(input.ComplianceResourceTypes != null && { - ComplianceResourceTypes: se_ComplianceResourceTypes(input.ComplianceResourceTypes, context), - }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValue != null && { TagValue: input.TagValue }), - }; -}; - -/** - * serializeAws_json1_1SelectAggregateResourceConfigRequest - */ -const se_SelectAggregateResourceConfigRequest = ( - input: SelectAggregateResourceConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationAggregatorName != null && { - ConfigurationAggregatorName: input.ConfigurationAggregatorName, - }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1SelectResourceConfigRequest - */ -const se_SelectResourceConfigRequest = (input: SelectResourceConfigRequest, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1Source - */ -const se_Source = (input: Source, context: __SerdeContext): any => { - return { - ...(input.CustomPolicyDetails != null && { - CustomPolicyDetails: se_CustomPolicyDetails(input.CustomPolicyDetails, context), - }), - ...(input.Owner != null && { Owner: input.Owner }), - ...(input.SourceDetails != null && { SourceDetails: se_SourceDetails(input.SourceDetails, context) }), - ...(input.SourceIdentifier != null && { SourceIdentifier: input.SourceIdentifier }), - }; -}; - -/** - * serializeAws_json1_1SourceDetail - */ -const se_SourceDetail = (input: SourceDetail, context: __SerdeContext): any => { - return { - ...(input.EventSource != null && { EventSource: input.EventSource }), - ...(input.MaximumExecutionFrequency != null && { MaximumExecutionFrequency: input.MaximumExecutionFrequency }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - }; -}; - -/** - * serializeAws_json1_1SourceDetails - */ -const se_SourceDetails = (input: SourceDetail[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceDetail(entry, context); - }); -}; - -/** - * serializeAws_json1_1SsmControls - */ -const se_SsmControls = (input: SsmControls, context: __SerdeContext): any => { - return { - ...(input.ConcurrentExecutionRatePercentage != null && { - ConcurrentExecutionRatePercentage: input.ConcurrentExecutionRatePercentage, - }), - ...(input.ErrorPercentage != null && { ErrorPercentage: input.ErrorPercentage }), - }; -}; - -/** - * serializeAws_json1_1StartConfigRulesEvaluationRequest - */ -const se_StartConfigRulesEvaluationRequest = ( - input: StartConfigRulesEvaluationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigRuleNames != null && { - ConfigRuleNames: se_ReevaluateConfigRuleNames(input.ConfigRuleNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1StartConfigurationRecorderRequest - */ -const se_StartConfigurationRecorderRequest = ( - input: StartConfigurationRecorderRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationRecorderName != null && { ConfigurationRecorderName: input.ConfigurationRecorderName }), - }; -}; - -/** - * serializeAws_json1_1StartRemediationExecutionRequest - */ -const se_StartRemediationExecutionRequest = (input: StartRemediationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigRuleName != null && { ConfigRuleName: input.ConfigRuleName }), - ...(input.ResourceKeys != null && { ResourceKeys: se_ResourceKeys(input.ResourceKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1StartResourceEvaluationRequest - */ -const se_StartResourceEvaluationRequest = (input: StartResourceEvaluationRequest, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.EvaluationContext != null && { - EvaluationContext: se_EvaluationContext(input.EvaluationContext, context), - }), - ...(input.EvaluationMode != null && { EvaluationMode: input.EvaluationMode }), - ...(input.EvaluationTimeout != null && { EvaluationTimeout: input.EvaluationTimeout }), - ...(input.ResourceDetails != null && { ResourceDetails: se_ResourceDetails(input.ResourceDetails, context) }), - }; -}; - -/** - * serializeAws_json1_1StaticParameterValues - */ -const se_StaticParameterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StaticValue - */ -const se_StaticValue = (input: StaticValue, context: __SerdeContext): any => { - return { - ...(input.Values != null && { Values: se_StaticParameterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1StatusDetailFilters - */ -const se_StatusDetailFilters = (input: StatusDetailFilters, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.MemberAccountRuleStatus != null && { MemberAccountRuleStatus: input.MemberAccountRuleStatus }), - }; -}; - -/** - * serializeAws_json1_1StopConfigurationRecorderRequest - */ -const se_StopConfigurationRecorderRequest = (input: StopConfigurationRecorderRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationRecorderName != null && { ConfigurationRecorderName: input.ConfigurationRecorderName }), - }; -}; - -/** - * serializeAws_json1_1StoredQuery - */ -const se_StoredQuery = (input: StoredQuery, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.QueryArn != null && { QueryArn: input.QueryArn }), - ...(input.QueryId != null && { QueryId: input.QueryId }), - ...(input.QueryName != null && { QueryName: input.QueryName }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TagsList - */ -const se_TagsList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TemplateSSMDocumentDetails - */ -const se_TemplateSSMDocumentDetails = (input: TemplateSSMDocumentDetails, context: __SerdeContext): any => { - return { - ...(input.DocumentName != null && { DocumentName: input.DocumentName }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - }; -}; - -/** - * serializeAws_json1_1TimeWindow - */ -const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * deserializeAws_json1_1AccountAggregationSource - */ -const de_AccountAggregationSource = (output: any, context: __SerdeContext): AccountAggregationSource => { - return { - AccountIds: - output.AccountIds != null ? de_AccountAggregationSourceAccountList(output.AccountIds, context) : undefined, - AllAwsRegions: __expectBoolean(output.AllAwsRegions), - AwsRegions: output.AwsRegions != null ? de_AggregatorRegionList(output.AwsRegions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AccountAggregationSourceAccountList - */ -const de_AccountAggregationSourceAccountList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AccountAggregationSourceList - */ -const de_AccountAggregationSourceList = (output: any, context: __SerdeContext): AccountAggregationSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountAggregationSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregateComplianceByConfigRule - */ -const de_AggregateComplianceByConfigRule = (output: any, context: __SerdeContext): AggregateComplianceByConfigRule => { - return { - AccountId: __expectString(output.AccountId), - AwsRegion: __expectString(output.AwsRegion), - Compliance: output.Compliance != null ? de_Compliance(output.Compliance, context) : undefined, - ConfigRuleName: __expectString(output.ConfigRuleName), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateComplianceByConfigRuleList - */ -const de_AggregateComplianceByConfigRuleList = ( - output: any, - context: __SerdeContext -): AggregateComplianceByConfigRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateComplianceByConfigRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregateComplianceByConformancePack - */ -const de_AggregateComplianceByConformancePack = ( - output: any, - context: __SerdeContext -): AggregateComplianceByConformancePack => { - return { - AccountId: __expectString(output.AccountId), - AwsRegion: __expectString(output.AwsRegion), - Compliance: - output.Compliance != null ? de_AggregateConformancePackCompliance(output.Compliance, context) : undefined, - ConformancePackName: __expectString(output.ConformancePackName), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateComplianceByConformancePackList - */ -const de_AggregateComplianceByConformancePackList = ( - output: any, - context: __SerdeContext -): AggregateComplianceByConformancePack[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateComplianceByConformancePack(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregateComplianceCount - */ -const de_AggregateComplianceCount = (output: any, context: __SerdeContext): AggregateComplianceCount => { - return { - ComplianceSummary: - output.ComplianceSummary != null ? de_ComplianceSummary(output.ComplianceSummary, context) : undefined, - GroupName: __expectString(output.GroupName), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateComplianceCountList - */ -const de_AggregateComplianceCountList = (output: any, context: __SerdeContext): AggregateComplianceCount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateComplianceCount(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregateConformancePackCompliance - */ -const de_AggregateConformancePackCompliance = ( - output: any, - context: __SerdeContext -): AggregateConformancePackCompliance => { - return { - ComplianceType: __expectString(output.ComplianceType), - CompliantRuleCount: __expectInt32(output.CompliantRuleCount), - NonCompliantRuleCount: __expectInt32(output.NonCompliantRuleCount), - TotalRuleCount: __expectInt32(output.TotalRuleCount), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateConformancePackComplianceCount - */ -const de_AggregateConformancePackComplianceCount = ( - output: any, - context: __SerdeContext -): AggregateConformancePackComplianceCount => { - return { - CompliantConformancePackCount: __expectInt32(output.CompliantConformancePackCount), - NonCompliantConformancePackCount: __expectInt32(output.NonCompliantConformancePackCount), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateConformancePackComplianceSummary - */ -const de_AggregateConformancePackComplianceSummary = ( - output: any, - context: __SerdeContext -): AggregateConformancePackComplianceSummary => { - return { - ComplianceSummary: - output.ComplianceSummary != null - ? de_AggregateConformancePackComplianceCount(output.ComplianceSummary, context) - : undefined, - GroupName: __expectString(output.GroupName), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateConformancePackComplianceSummaryList - */ -const de_AggregateConformancePackComplianceSummaryList = ( - output: any, - context: __SerdeContext -): AggregateConformancePackComplianceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateConformancePackComplianceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregatedSourceStatus - */ -const de_AggregatedSourceStatus = (output: any, context: __SerdeContext): AggregatedSourceStatus => { - return { - AwsRegion: __expectString(output.AwsRegion), - LastErrorCode: __expectString(output.LastErrorCode), - LastErrorMessage: __expectString(output.LastErrorMessage), - LastUpdateStatus: __expectString(output.LastUpdateStatus), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - SourceId: __expectString(output.SourceId), - SourceType: __expectString(output.SourceType), - } as any; -}; - -/** - * deserializeAws_json1_1AggregatedSourceStatusList - */ -const de_AggregatedSourceStatusList = (output: any, context: __SerdeContext): AggregatedSourceStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregatedSourceStatus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregateEvaluationResult - */ -const de_AggregateEvaluationResult = (output: any, context: __SerdeContext): AggregateEvaluationResult => { - return { - AccountId: __expectString(output.AccountId), - Annotation: __expectString(output.Annotation), - AwsRegion: __expectString(output.AwsRegion), - ComplianceType: __expectString(output.ComplianceType), - ConfigRuleInvokedTime: - output.ConfigRuleInvokedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConfigRuleInvokedTime))) - : undefined, - EvaluationResultIdentifier: - output.EvaluationResultIdentifier != null - ? de_EvaluationResultIdentifier(output.EvaluationResultIdentifier, context) - : undefined, - ResultRecordedTime: - output.ResultRecordedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResultRecordedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AggregateEvaluationResultList - */ -const de_AggregateEvaluationResultList = (output: any, context: __SerdeContext): AggregateEvaluationResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateEvaluationResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregateResourceIdentifier - */ -const de_AggregateResourceIdentifier = (output: any, context: __SerdeContext): AggregateResourceIdentifier => { - return { - ResourceId: __expectString(output.ResourceId), - ResourceName: __expectString(output.ResourceName), - ResourceType: __expectString(output.ResourceType), - SourceAccountId: __expectString(output.SourceAccountId), - SourceRegion: __expectString(output.SourceRegion), - } as any; -}; - -/** - * deserializeAws_json1_1AggregationAuthorization - */ -const de_AggregationAuthorization = (output: any, context: __SerdeContext): AggregationAuthorization => { - return { - AggregationAuthorizationArn: __expectString(output.AggregationAuthorizationArn), - AuthorizedAccountId: __expectString(output.AuthorizedAccountId), - AuthorizedAwsRegion: __expectString(output.AuthorizedAwsRegion), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AggregationAuthorizationList - */ -const de_AggregationAuthorizationList = (output: any, context: __SerdeContext): AggregationAuthorization[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregationAuthorization(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AggregatorRegionList - */ -const de_AggregatorRegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BaseConfigurationItem - */ -const de_BaseConfigurationItem = (output: any, context: __SerdeContext): BaseConfigurationItem => { - return { - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - availabilityZone: __expectString(output.availabilityZone), - awsRegion: __expectString(output.awsRegion), - configuration: __expectString(output.configuration), - configurationItemCaptureTime: - output.configurationItemCaptureTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.configurationItemCaptureTime))) - : undefined, - configurationItemStatus: __expectString(output.configurationItemStatus), - configurationStateId: __expectString(output.configurationStateId), - resourceCreationTime: - output.resourceCreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resourceCreationTime))) - : undefined, - resourceId: __expectString(output.resourceId), - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - supplementaryConfiguration: - output.supplementaryConfiguration != null - ? de_SupplementaryConfiguration(output.supplementaryConfiguration, context) - : undefined, - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_json1_1BaseConfigurationItems - */ -const de_BaseConfigurationItems = (output: any, context: __SerdeContext): BaseConfigurationItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BaseConfigurationItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchGetAggregateResourceConfigResponse - */ -const de_BatchGetAggregateResourceConfigResponse = ( - output: any, - context: __SerdeContext -): BatchGetAggregateResourceConfigResponse => { - return { - BaseConfigurationItems: - output.BaseConfigurationItems != null - ? de_BaseConfigurationItems(output.BaseConfigurationItems, context) - : undefined, - UnprocessedResourceIdentifiers: - output.UnprocessedResourceIdentifiers != null - ? de_UnprocessedResourceIdentifierList(output.UnprocessedResourceIdentifiers, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetResourceConfigResponse - */ -const de_BatchGetResourceConfigResponse = (output: any, context: __SerdeContext): BatchGetResourceConfigResponse => { - return { - baseConfigurationItems: - output.baseConfigurationItems != null - ? de_BaseConfigurationItems(output.baseConfigurationItems, context) - : undefined, - unprocessedResourceKeys: - output.unprocessedResourceKeys != null ? de_ResourceKeys(output.unprocessedResourceKeys, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Compliance - */ -const de_Compliance = (output: any, context: __SerdeContext): Compliance => { - return { - ComplianceContributorCount: - output.ComplianceContributorCount != null - ? de_ComplianceContributorCount(output.ComplianceContributorCount, context) - : undefined, - ComplianceType: __expectString(output.ComplianceType), - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceByConfigRule - */ -const de_ComplianceByConfigRule = (output: any, context: __SerdeContext): ComplianceByConfigRule => { - return { - Compliance: output.Compliance != null ? de_Compliance(output.Compliance, context) : undefined, - ConfigRuleName: __expectString(output.ConfigRuleName), - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceByConfigRules - */ -const de_ComplianceByConfigRules = (output: any, context: __SerdeContext): ComplianceByConfigRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComplianceByConfigRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceByResource - */ -const de_ComplianceByResource = (output: any, context: __SerdeContext): ComplianceByResource => { - return { - Compliance: output.Compliance != null ? de_Compliance(output.Compliance, context) : undefined, - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceByResources - */ -const de_ComplianceByResources = (output: any, context: __SerdeContext): ComplianceByResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComplianceByResource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceContributorCount - */ -const de_ComplianceContributorCount = (output: any, context: __SerdeContext): ComplianceContributorCount => { - return { - CapExceeded: __expectBoolean(output.CapExceeded), - CappedCount: __expectInt32(output.CappedCount), - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceResourceTypes - */ -const de_ComplianceResourceTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceSummariesByResourceType - */ -const de_ComplianceSummariesByResourceType = ( - output: any, - context: __SerdeContext -): ComplianceSummaryByResourceType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComplianceSummaryByResourceType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceSummary - */ -const de_ComplianceSummary = (output: any, context: __SerdeContext): ComplianceSummary => { - return { - ComplianceSummaryTimestamp: - output.ComplianceSummaryTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ComplianceSummaryTimestamp))) - : undefined, - CompliantResourceCount: - output.CompliantResourceCount != null - ? de_ComplianceContributorCount(output.CompliantResourceCount, context) - : undefined, - NonCompliantResourceCount: - output.NonCompliantResourceCount != null - ? de_ComplianceContributorCount(output.NonCompliantResourceCount, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceSummaryByResourceType - */ -const de_ComplianceSummaryByResourceType = (output: any, context: __SerdeContext): ComplianceSummaryByResourceType => { - return { - ComplianceSummary: - output.ComplianceSummary != null ? de_ComplianceSummary(output.ComplianceSummary, context) : undefined, - ResourceType: __expectString(output.ResourceType), - } as any; -}; - -/** - * deserializeAws_json1_1ConfigExportDeliveryInfo - */ -const de_ConfigExportDeliveryInfo = (output: any, context: __SerdeContext): ConfigExportDeliveryInfo => { - return { - lastAttemptTime: - output.lastAttemptTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAttemptTime))) - : undefined, - lastErrorCode: __expectString(output.lastErrorCode), - lastErrorMessage: __expectString(output.lastErrorMessage), - lastStatus: __expectString(output.lastStatus), - lastSuccessfulTime: - output.lastSuccessfulTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastSuccessfulTime))) - : undefined, - nextDeliveryTime: - output.nextDeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.nextDeliveryTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfigRule - */ -const de_ConfigRule = (output: any, context: __SerdeContext): ConfigRule => { - return { - ConfigRuleArn: __expectString(output.ConfigRuleArn), - ConfigRuleId: __expectString(output.ConfigRuleId), - ConfigRuleName: __expectString(output.ConfigRuleName), - ConfigRuleState: __expectString(output.ConfigRuleState), - CreatedBy: __expectString(output.CreatedBy), - Description: __expectString(output.Description), - EvaluationModes: output.EvaluationModes != null ? de_EvaluationModes(output.EvaluationModes, context) : undefined, - InputParameters: __expectString(output.InputParameters), - MaximumExecutionFrequency: __expectString(output.MaximumExecutionFrequency), - Scope: output.Scope != null ? de_Scope(output.Scope, context) : undefined, - Source: output.Source != null ? de_Source(output.Source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfigRuleEvaluationStatus - */ -const de_ConfigRuleEvaluationStatus = (output: any, context: __SerdeContext): ConfigRuleEvaluationStatus => { - return { - ConfigRuleArn: __expectString(output.ConfigRuleArn), - ConfigRuleId: __expectString(output.ConfigRuleId), - ConfigRuleName: __expectString(output.ConfigRuleName), - FirstActivatedTime: - output.FirstActivatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FirstActivatedTime))) - : undefined, - FirstEvaluationStarted: __expectBoolean(output.FirstEvaluationStarted), - LastDeactivatedTime: - output.LastDeactivatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastDeactivatedTime))) - : undefined, - LastDebugLogDeliveryStatus: __expectString(output.LastDebugLogDeliveryStatus), - LastDebugLogDeliveryStatusReason: __expectString(output.LastDebugLogDeliveryStatusReason), - LastDebugLogDeliveryTime: - output.LastDebugLogDeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastDebugLogDeliveryTime))) - : undefined, - LastErrorCode: __expectString(output.LastErrorCode), - LastErrorMessage: __expectString(output.LastErrorMessage), - LastFailedEvaluationTime: - output.LastFailedEvaluationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastFailedEvaluationTime))) - : undefined, - LastFailedInvocationTime: - output.LastFailedInvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastFailedInvocationTime))) - : undefined, - LastSuccessfulEvaluationTime: - output.LastSuccessfulEvaluationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulEvaluationTime))) - : undefined, - LastSuccessfulInvocationTime: - output.LastSuccessfulInvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulInvocationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfigRuleEvaluationStatusList - */ -const de_ConfigRuleEvaluationStatusList = (output: any, context: __SerdeContext): ConfigRuleEvaluationStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigRuleEvaluationStatus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfigRules - */ -const de_ConfigRules = (output: any, context: __SerdeContext): ConfigRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfigSnapshotDeliveryProperties - */ -const de_ConfigSnapshotDeliveryProperties = ( - output: any, - context: __SerdeContext -): ConfigSnapshotDeliveryProperties => { - return { - deliveryFrequency: __expectString(output.deliveryFrequency), - } as any; -}; - -/** - * deserializeAws_json1_1ConfigStreamDeliveryInfo - */ -const de_ConfigStreamDeliveryInfo = (output: any, context: __SerdeContext): ConfigStreamDeliveryInfo => { - return { - lastErrorCode: __expectString(output.lastErrorCode), - lastErrorMessage: __expectString(output.lastErrorMessage), - lastStatus: __expectString(output.lastStatus), - lastStatusChangeTime: - output.lastStatusChangeTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusChangeTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfigurationAggregator - */ -const de_ConfigurationAggregator = (output: any, context: __SerdeContext): ConfigurationAggregator => { - return { - AccountAggregationSources: - output.AccountAggregationSources != null - ? de_AccountAggregationSourceList(output.AccountAggregationSources, context) - : undefined, - ConfigurationAggregatorArn: __expectString(output.ConfigurationAggregatorArn), - ConfigurationAggregatorName: __expectString(output.ConfigurationAggregatorName), - CreatedBy: __expectString(output.CreatedBy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - OrganizationAggregationSource: - output.OrganizationAggregationSource != null - ? de_OrganizationAggregationSource(output.OrganizationAggregationSource, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfigurationAggregatorList - */ -const de_ConfigurationAggregatorList = (output: any, context: __SerdeContext): ConfigurationAggregator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigurationAggregator(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfigurationItem - */ -const de_ConfigurationItem = (output: any, context: __SerdeContext): ConfigurationItem => { - return { - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - availabilityZone: __expectString(output.availabilityZone), - awsRegion: __expectString(output.awsRegion), - configuration: __expectString(output.configuration), - configurationItemCaptureTime: - output.configurationItemCaptureTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.configurationItemCaptureTime))) - : undefined, - configurationItemMD5Hash: __expectString(output.configurationItemMD5Hash), - configurationItemStatus: __expectString(output.configurationItemStatus), - configurationStateId: __expectString(output.configurationStateId), - relatedEvents: output.relatedEvents != null ? de_RelatedEventList(output.relatedEvents, context) : undefined, - relationships: output.relationships != null ? de_RelationshipList(output.relationships, context) : undefined, - resourceCreationTime: - output.resourceCreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resourceCreationTime))) - : undefined, - resourceId: __expectString(output.resourceId), - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - supplementaryConfiguration: - output.supplementaryConfiguration != null - ? de_SupplementaryConfiguration(output.supplementaryConfiguration, context) - : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_json1_1ConfigurationItemList - */ -const de_ConfigurationItemList = (output: any, context: __SerdeContext): ConfigurationItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigurationItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfigurationRecorder - */ -const de_ConfigurationRecorder = (output: any, context: __SerdeContext): ConfigurationRecorder => { - return { - name: __expectString(output.name), - recordingGroup: output.recordingGroup != null ? de_RecordingGroup(output.recordingGroup, context) : undefined, - roleARN: __expectString(output.roleARN), - } as any; -}; - -/** - * deserializeAws_json1_1ConfigurationRecorderList - */ -const de_ConfigurationRecorderList = (output: any, context: __SerdeContext): ConfigurationRecorder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigurationRecorder(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfigurationRecorderStatus - */ -const de_ConfigurationRecorderStatus = (output: any, context: __SerdeContext): ConfigurationRecorderStatus => { - return { - lastErrorCode: __expectString(output.lastErrorCode), - lastErrorMessage: __expectString(output.lastErrorMessage), - lastStartTime: - output.lastStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStartTime))) - : undefined, - lastStatus: __expectString(output.lastStatus), - lastStatusChangeTime: - output.lastStatusChangeTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusChangeTime))) - : undefined, - lastStopTime: - output.lastStopTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStopTime))) - : undefined, - name: __expectString(output.name), - recording: __expectBoolean(output.recording), - } as any; -}; - -/** - * deserializeAws_json1_1ConfigurationRecorderStatusList - */ -const de_ConfigurationRecorderStatusList = (output: any, context: __SerdeContext): ConfigurationRecorderStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigurationRecorderStatus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackComplianceScore - */ -const de_ConformancePackComplianceScore = (output: any, context: __SerdeContext): ConformancePackComplianceScore => { - return { - ConformancePackName: __expectString(output.ConformancePackName), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Score: __expectString(output.Score), - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackComplianceScores - */ -const de_ConformancePackComplianceScores = (output: any, context: __SerdeContext): ConformancePackComplianceScore[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackComplianceScore(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackComplianceSummary - */ -const de_ConformancePackComplianceSummary = ( - output: any, - context: __SerdeContext -): ConformancePackComplianceSummary => { - return { - ConformancePackComplianceStatus: __expectString(output.ConformancePackComplianceStatus), - ConformancePackName: __expectString(output.ConformancePackName), - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackComplianceSummaryList - */ -const de_ConformancePackComplianceSummaryList = ( - output: any, - context: __SerdeContext -): ConformancePackComplianceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackComplianceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackDetail - */ -const de_ConformancePackDetail = (output: any, context: __SerdeContext): ConformancePackDetail => { - return { - ConformancePackArn: __expectString(output.ConformancePackArn), - ConformancePackId: __expectString(output.ConformancePackId), - ConformancePackInputParameters: - output.ConformancePackInputParameters != null - ? de_ConformancePackInputParameters(output.ConformancePackInputParameters, context) - : undefined, - ConformancePackName: __expectString(output.ConformancePackName), - CreatedBy: __expectString(output.CreatedBy), - DeliveryS3Bucket: __expectString(output.DeliveryS3Bucket), - DeliveryS3KeyPrefix: __expectString(output.DeliveryS3KeyPrefix), - LastUpdateRequestedTime: - output.LastUpdateRequestedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateRequestedTime))) - : undefined, - TemplateSSMDocumentDetails: - output.TemplateSSMDocumentDetails != null - ? de_TemplateSSMDocumentDetails(output.TemplateSSMDocumentDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackDetailList - */ -const de_ConformancePackDetailList = (output: any, context: __SerdeContext): ConformancePackDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackEvaluationResult - */ -const de_ConformancePackEvaluationResult = (output: any, context: __SerdeContext): ConformancePackEvaluationResult => { - return { - Annotation: __expectString(output.Annotation), - ComplianceType: __expectString(output.ComplianceType), - ConfigRuleInvokedTime: - output.ConfigRuleInvokedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConfigRuleInvokedTime))) - : undefined, - EvaluationResultIdentifier: - output.EvaluationResultIdentifier != null - ? de_EvaluationResultIdentifier(output.EvaluationResultIdentifier, context) - : undefined, - ResultRecordedTime: - output.ResultRecordedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResultRecordedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackInputParameter - */ -const de_ConformancePackInputParameter = (output: any, context: __SerdeContext): ConformancePackInputParameter => { - return { - ParameterName: __expectString(output.ParameterName), - ParameterValue: __expectString(output.ParameterValue), - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackInputParameters - */ -const de_ConformancePackInputParameters = (output: any, context: __SerdeContext): ConformancePackInputParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackInputParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackRuleCompliance - */ -const de_ConformancePackRuleCompliance = (output: any, context: __SerdeContext): ConformancePackRuleCompliance => { - return { - ComplianceType: __expectString(output.ComplianceType), - ConfigRuleName: __expectString(output.ConfigRuleName), - Controls: output.Controls != null ? de_ControlsList(output.Controls, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackRuleComplianceList - */ -const de_ConformancePackRuleComplianceList = ( - output: any, - context: __SerdeContext -): ConformancePackRuleCompliance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackRuleCompliance(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackRuleEvaluationResultsList - */ -const de_ConformancePackRuleEvaluationResultsList = ( - output: any, - context: __SerdeContext -): ConformancePackEvaluationResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackEvaluationResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackStatusDetail - */ -const de_ConformancePackStatusDetail = (output: any, context: __SerdeContext): ConformancePackStatusDetail => { - return { - ConformancePackArn: __expectString(output.ConformancePackArn), - ConformancePackId: __expectString(output.ConformancePackId), - ConformancePackName: __expectString(output.ConformancePackName), - ConformancePackState: __expectString(output.ConformancePackState), - ConformancePackStatusReason: __expectString(output.ConformancePackStatusReason), - LastUpdateCompletedTime: - output.LastUpdateCompletedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateCompletedTime))) - : undefined, - LastUpdateRequestedTime: - output.LastUpdateRequestedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateRequestedTime))) - : undefined, - StackArn: __expectString(output.StackArn), - } as any; -}; - -/** - * deserializeAws_json1_1ConformancePackStatusDetailsList - */ -const de_ConformancePackStatusDetailsList = (output: any, context: __SerdeContext): ConformancePackStatusDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConformancePackStatusDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConformancePackTemplateValidationException - */ -const de_ConformancePackTemplateValidationException = ( - output: any, - context: __SerdeContext -): ConformancePackTemplateValidationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ControlsList - */ -const de_ControlsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomPolicyDetails - */ -const de_CustomPolicyDetails = (output: any, context: __SerdeContext): CustomPolicyDetails => { - return { - EnableDebugLogDelivery: __expectBoolean(output.EnableDebugLogDelivery), - PolicyRuntime: __expectString(output.PolicyRuntime), - PolicyText: __expectString(output.PolicyText), - } as any; -}; - -/** - * deserializeAws_json1_1DebugLogDeliveryAccounts - */ -const de_DebugLogDeliveryAccounts = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeleteEvaluationResultsResponse - */ -const de_DeleteEvaluationResultsResponse = (output: any, context: __SerdeContext): DeleteEvaluationResultsResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRemediationConfigurationResponse - */ -const de_DeleteRemediationConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteRemediationConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRemediationExceptionsResponse - */ -const de_DeleteRemediationExceptionsResponse = ( - output: any, - context: __SerdeContext -): DeleteRemediationExceptionsResponse => { - return { - FailedBatches: - output.FailedBatches != null - ? de_FailedDeleteRemediationExceptionsBatches(output.FailedBatches, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteStoredQueryResponse - */ -const de_DeleteStoredQueryResponse = (output: any, context: __SerdeContext): DeleteStoredQueryResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeliverConfigSnapshotResponse - */ -const de_DeliverConfigSnapshotResponse = (output: any, context: __SerdeContext): DeliverConfigSnapshotResponse => { - return { - configSnapshotId: __expectString(output.configSnapshotId), - } as any; -}; - -/** - * deserializeAws_json1_1DeliveryChannel - */ -const de_DeliveryChannel = (output: any, context: __SerdeContext): DeliveryChannel => { - return { - configSnapshotDeliveryProperties: - output.configSnapshotDeliveryProperties != null - ? de_ConfigSnapshotDeliveryProperties(output.configSnapshotDeliveryProperties, context) - : undefined, - name: __expectString(output.name), - s3BucketName: __expectString(output.s3BucketName), - s3KeyPrefix: __expectString(output.s3KeyPrefix), - s3KmsKeyArn: __expectString(output.s3KmsKeyArn), - snsTopicARN: __expectString(output.snsTopicARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeliveryChannelList - */ -const de_DeliveryChannelList = (output: any, context: __SerdeContext): DeliveryChannel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeliveryChannel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeliveryChannelStatus - */ -const de_DeliveryChannelStatus = (output: any, context: __SerdeContext): DeliveryChannelStatus => { - return { - configHistoryDeliveryInfo: - output.configHistoryDeliveryInfo != null - ? de_ConfigExportDeliveryInfo(output.configHistoryDeliveryInfo, context) - : undefined, - configSnapshotDeliveryInfo: - output.configSnapshotDeliveryInfo != null - ? de_ConfigExportDeliveryInfo(output.configSnapshotDeliveryInfo, context) - : undefined, - configStreamDeliveryInfo: - output.configStreamDeliveryInfo != null - ? de_ConfigStreamDeliveryInfo(output.configStreamDeliveryInfo, context) - : undefined, - name: __expectString(output.name), - } as any; -}; +// se_DeleteRemediationConfigurationRequest omitted. -/** - * deserializeAws_json1_1DeliveryChannelStatusList - */ -const de_DeliveryChannelStatusList = (output: any, context: __SerdeContext): DeliveryChannelStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeliveryChannelStatus(entry, context); - }); - return retVal; -}; +// se_DeleteRemediationExceptionsRequest omitted. -/** - * deserializeAws_json1_1DescribeAggregateComplianceByConfigRulesResponse - */ -const de_DescribeAggregateComplianceByConfigRulesResponse = ( - output: any, - context: __SerdeContext -): DescribeAggregateComplianceByConfigRulesResponse => { - return { - AggregateComplianceByConfigRules: - output.AggregateComplianceByConfigRules != null - ? de_AggregateComplianceByConfigRuleList(output.AggregateComplianceByConfigRules, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DeleteResourceConfigRequest omitted. -/** - * deserializeAws_json1_1DescribeAggregateComplianceByConformancePacksResponse - */ -const de_DescribeAggregateComplianceByConformancePacksResponse = ( - output: any, - context: __SerdeContext -): DescribeAggregateComplianceByConformancePacksResponse => { - return { - AggregateComplianceByConformancePacks: - output.AggregateComplianceByConformancePacks != null - ? de_AggregateComplianceByConformancePackList(output.AggregateComplianceByConformancePacks, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DeleteRetentionConfigurationRequest omitted. -/** - * deserializeAws_json1_1DescribeAggregationAuthorizationsResponse - */ -const de_DescribeAggregationAuthorizationsResponse = ( - output: any, - context: __SerdeContext -): DescribeAggregationAuthorizationsResponse => { - return { - AggregationAuthorizations: - output.AggregationAuthorizations != null - ? de_AggregationAuthorizationList(output.AggregationAuthorizations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DeleteStoredQueryRequest omitted. -/** - * deserializeAws_json1_1DescribeComplianceByConfigRuleResponse - */ -const de_DescribeComplianceByConfigRuleResponse = ( - output: any, - context: __SerdeContext -): DescribeComplianceByConfigRuleResponse => { - return { - ComplianceByConfigRules: - output.ComplianceByConfigRules != null - ? de_ComplianceByConfigRules(output.ComplianceByConfigRules, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DeliverConfigSnapshotRequest omitted. -/** - * deserializeAws_json1_1DescribeComplianceByResourceResponse - */ -const de_DescribeComplianceByResourceResponse = ( - output: any, - context: __SerdeContext -): DescribeComplianceByResourceResponse => { - return { - ComplianceByResources: - output.ComplianceByResources != null - ? de_ComplianceByResources(output.ComplianceByResources, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DeliveryChannel omitted. -/** - * deserializeAws_json1_1DescribeConfigRuleEvaluationStatusResponse - */ -const de_DescribeConfigRuleEvaluationStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeConfigRuleEvaluationStatusResponse => { - return { - ConfigRulesEvaluationStatus: - output.ConfigRulesEvaluationStatus != null - ? de_ConfigRuleEvaluationStatusList(output.ConfigRulesEvaluationStatus, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DeliveryChannelNameList omitted. -/** - * deserializeAws_json1_1DescribeConfigRulesResponse - */ -const de_DescribeConfigRulesResponse = (output: any, context: __SerdeContext): DescribeConfigRulesResponse => { - return { - ConfigRules: output.ConfigRules != null ? de_ConfigRules(output.ConfigRules, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DescribeAggregateComplianceByConfigRulesRequest omitted. -/** - * deserializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusResponse - */ -const de_DescribeConfigurationAggregatorSourcesStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeConfigurationAggregatorSourcesStatusResponse => { - return { - AggregatedSourceStatusList: - output.AggregatedSourceStatusList != null - ? de_AggregatedSourceStatusList(output.AggregatedSourceStatusList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DescribeAggregateComplianceByConformancePacksRequest omitted. -/** - * deserializeAws_json1_1DescribeConfigurationAggregatorsResponse - */ -const de_DescribeConfigurationAggregatorsResponse = ( - output: any, - context: __SerdeContext -): DescribeConfigurationAggregatorsResponse => { - return { - ConfigurationAggregators: - output.ConfigurationAggregators != null - ? de_ConfigurationAggregatorList(output.ConfigurationAggregators, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DescribeAggregationAuthorizationsRequest omitted. -/** - * deserializeAws_json1_1DescribeConfigurationRecordersResponse - */ -const de_DescribeConfigurationRecordersResponse = ( - output: any, - context: __SerdeContext -): DescribeConfigurationRecordersResponse => { - return { - ConfigurationRecorders: - output.ConfigurationRecorders != null - ? de_ConfigurationRecorderList(output.ConfigurationRecorders, context) - : undefined, - } as any; -}; +// se_DescribeComplianceByConfigRuleRequest omitted. -/** - * deserializeAws_json1_1DescribeConfigurationRecorderStatusResponse - */ -const de_DescribeConfigurationRecorderStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeConfigurationRecorderStatusResponse => { - return { - ConfigurationRecordersStatus: - output.ConfigurationRecordersStatus != null - ? de_ConfigurationRecorderStatusList(output.ConfigurationRecordersStatus, context) - : undefined, - } as any; -}; +// se_DescribeComplianceByResourceRequest omitted. -/** - * deserializeAws_json1_1DescribeConformancePackComplianceResponse - */ -const de_DescribeConformancePackComplianceResponse = ( - output: any, - context: __SerdeContext -): DescribeConformancePackComplianceResponse => { - return { - ConformancePackName: __expectString(output.ConformancePackName), - ConformancePackRuleComplianceList: - output.ConformancePackRuleComplianceList != null - ? de_ConformancePackRuleComplianceList(output.ConformancePackRuleComplianceList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DescribeConfigRuleEvaluationStatusRequest omitted. -/** - * deserializeAws_json1_1DescribeConformancePacksResponse - */ -const de_DescribeConformancePacksResponse = ( - output: any, - context: __SerdeContext -): DescribeConformancePacksResponse => { - return { - ConformancePackDetails: - output.ConformancePackDetails != null - ? de_ConformancePackDetailList(output.ConformancePackDetails, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DescribeConfigRulesFilters omitted. -/** - * deserializeAws_json1_1DescribeConformancePackStatusResponse - */ -const de_DescribeConformancePackStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeConformancePackStatusResponse => { - return { - ConformancePackStatusDetails: - output.ConformancePackStatusDetails != null - ? de_ConformancePackStatusDetailsList(output.ConformancePackStatusDetails, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_DescribeConfigRulesRequest omitted. -/** - * deserializeAws_json1_1DescribeDeliveryChannelsResponse - */ -const de_DescribeDeliveryChannelsResponse = ( - output: any, - context: __SerdeContext -): DescribeDeliveryChannelsResponse => { - return { - DeliveryChannels: - output.DeliveryChannels != null ? de_DeliveryChannelList(output.DeliveryChannels, context) : undefined, - } as any; -}; +// se_DescribeConfigurationAggregatorSourcesStatusRequest omitted. -/** - * deserializeAws_json1_1DescribeDeliveryChannelStatusResponse - */ -const de_DescribeDeliveryChannelStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeDeliveryChannelStatusResponse => { - return { - DeliveryChannelsStatus: - output.DeliveryChannelsStatus != null - ? de_DeliveryChannelStatusList(output.DeliveryChannelsStatus, context) - : undefined, - } as any; -}; +// se_DescribeConfigurationAggregatorsRequest omitted. -/** - * deserializeAws_json1_1DescribeOrganizationConfigRulesResponse - */ -const de_DescribeOrganizationConfigRulesResponse = ( - output: any, - context: __SerdeContext -): DescribeOrganizationConfigRulesResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationConfigRules: - output.OrganizationConfigRules != null - ? de_OrganizationConfigRules(output.OrganizationConfigRules, context) - : undefined, - } as any; -}; +// se_DescribeConfigurationRecordersRequest omitted. -/** - * deserializeAws_json1_1DescribeOrganizationConfigRuleStatusesResponse - */ -const de_DescribeOrganizationConfigRuleStatusesResponse = ( - output: any, - context: __SerdeContext -): DescribeOrganizationConfigRuleStatusesResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationConfigRuleStatuses: - output.OrganizationConfigRuleStatuses != null - ? de_OrganizationConfigRuleStatuses(output.OrganizationConfigRuleStatuses, context) - : undefined, - } as any; -}; +// se_DescribeConfigurationRecorderStatusRequest omitted. -/** - * deserializeAws_json1_1DescribeOrganizationConformancePacksResponse - */ -const de_DescribeOrganizationConformancePacksResponse = ( - output: any, - context: __SerdeContext -): DescribeOrganizationConformancePacksResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationConformancePacks: - output.OrganizationConformancePacks != null - ? de_OrganizationConformancePacks(output.OrganizationConformancePacks, context) - : undefined, - } as any; -}; +// se_DescribeConformancePackComplianceRequest omitted. -/** - * deserializeAws_json1_1DescribeOrganizationConformancePackStatusesResponse - */ -const de_DescribeOrganizationConformancePackStatusesResponse = ( - output: any, - context: __SerdeContext -): DescribeOrganizationConformancePackStatusesResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationConformancePackStatuses: - output.OrganizationConformancePackStatuses != null - ? de_OrganizationConformancePackStatuses(output.OrganizationConformancePackStatuses, context) - : undefined, - } as any; -}; +// se_DescribeConformancePacksRequest omitted. -/** - * deserializeAws_json1_1DescribePendingAggregationRequestsResponse - */ -const de_DescribePendingAggregationRequestsResponse = ( - output: any, - context: __SerdeContext -): DescribePendingAggregationRequestsResponse => { - return { - NextToken: __expectString(output.NextToken), - PendingAggregationRequests: - output.PendingAggregationRequests != null - ? de_PendingAggregationRequestList(output.PendingAggregationRequests, context) - : undefined, - } as any; -}; +// se_DescribeConformancePackStatusRequest omitted. -/** - * deserializeAws_json1_1DescribeRemediationConfigurationsResponse - */ -const de_DescribeRemediationConfigurationsResponse = ( - output: any, - context: __SerdeContext -): DescribeRemediationConfigurationsResponse => { - return { - RemediationConfigurations: - output.RemediationConfigurations != null - ? de_RemediationConfigurations(output.RemediationConfigurations, context) - : undefined, - } as any; -}; +// se_DescribeDeliveryChannelsRequest omitted. -/** - * deserializeAws_json1_1DescribeRemediationExceptionsResponse - */ -const de_DescribeRemediationExceptionsResponse = ( - output: any, - context: __SerdeContext -): DescribeRemediationExceptionsResponse => { - return { - NextToken: __expectString(output.NextToken), - RemediationExceptions: - output.RemediationExceptions != null - ? de_RemediationExceptions(output.RemediationExceptions, context) - : undefined, - } as any; -}; +// se_DescribeDeliveryChannelStatusRequest omitted. -/** - * deserializeAws_json1_1DescribeRemediationExecutionStatusResponse - */ -const de_DescribeRemediationExecutionStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeRemediationExecutionStatusResponse => { - return { - NextToken: __expectString(output.NextToken), - RemediationExecutionStatuses: - output.RemediationExecutionStatuses != null - ? de_RemediationExecutionStatuses(output.RemediationExecutionStatuses, context) - : undefined, - } as any; -}; +// se_DescribeOrganizationConfigRulesRequest omitted. -/** - * deserializeAws_json1_1DescribeRetentionConfigurationsResponse - */ -const de_DescribeRetentionConfigurationsResponse = ( - output: any, - context: __SerdeContext -): DescribeRetentionConfigurationsResponse => { - return { - NextToken: __expectString(output.NextToken), - RetentionConfigurations: - output.RetentionConfigurations != null - ? de_RetentionConfigurationList(output.RetentionConfigurations, context) - : undefined, - } as any; -}; +// se_DescribeOrganizationConfigRuleStatusesRequest omitted. -/** - * deserializeAws_json1_1DiscoveredResourceIdentifierList - */ -const de_DiscoveredResourceIdentifierList = (output: any, context: __SerdeContext): AggregateResourceIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateResourceIdentifier(entry, context); - }); - return retVal; -}; +// se_DescribeOrganizationConformancePacksRequest omitted. -/** - * deserializeAws_json1_1Evaluation - */ -const de_Evaluation = (output: any, context: __SerdeContext): Evaluation => { - return { - Annotation: __expectString(output.Annotation), - ComplianceResourceId: __expectString(output.ComplianceResourceId), - ComplianceResourceType: __expectString(output.ComplianceResourceType), - ComplianceType: __expectString(output.ComplianceType), - OrderingTimestamp: - output.OrderingTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderingTimestamp))) - : undefined, - } as any; -}; +// se_DescribeOrganizationConformancePackStatusesRequest omitted. -/** - * deserializeAws_json1_1EvaluationContext - */ -const de_EvaluationContext = (output: any, context: __SerdeContext): EvaluationContext => { - return { - EvaluationContextIdentifier: __expectString(output.EvaluationContextIdentifier), - } as any; -}; +// se_DescribePendingAggregationRequestsRequest omitted. -/** - * deserializeAws_json1_1EvaluationModeConfiguration - */ -const de_EvaluationModeConfiguration = (output: any, context: __SerdeContext): EvaluationModeConfiguration => { - return { - Mode: __expectString(output.Mode), - } as any; -}; +// se_DescribeRemediationConfigurationsRequest omitted. -/** - * deserializeAws_json1_1EvaluationModes - */ -const de_EvaluationModes = (output: any, context: __SerdeContext): EvaluationModeConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluationModeConfiguration(entry, context); - }); - return retVal; -}; +// se_DescribeRemediationExceptionsRequest omitted. -/** - * deserializeAws_json1_1EvaluationResult - */ -const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { - return { - Annotation: __expectString(output.Annotation), - ComplianceType: __expectString(output.ComplianceType), - ConfigRuleInvokedTime: - output.ConfigRuleInvokedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConfigRuleInvokedTime))) - : undefined, - EvaluationResultIdentifier: - output.EvaluationResultIdentifier != null - ? de_EvaluationResultIdentifier(output.EvaluationResultIdentifier, context) - : undefined, - ResultRecordedTime: - output.ResultRecordedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResultRecordedTime))) - : undefined, - ResultToken: __expectString(output.ResultToken), - } as any; -}; +// se_DescribeRemediationExecutionStatusRequest omitted. -/** - * deserializeAws_json1_1EvaluationResultIdentifier - */ -const de_EvaluationResultIdentifier = (output: any, context: __SerdeContext): EvaluationResultIdentifier => { - return { - EvaluationResultQualifier: - output.EvaluationResultQualifier != null - ? de_EvaluationResultQualifier(output.EvaluationResultQualifier, context) - : undefined, - OrderingTimestamp: - output.OrderingTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderingTimestamp))) - : undefined, - ResourceEvaluationId: __expectString(output.ResourceEvaluationId), - } as any; -}; +// se_DescribeRetentionConfigurationsRequest omitted. /** - * deserializeAws_json1_1EvaluationResultQualifier + * serializeAws_json1_1Evaluation */ -const de_EvaluationResultQualifier = (output: any, context: __SerdeContext): EvaluationResultQualifier => { - return { - ConfigRuleName: __expectString(output.ConfigRuleName), - EvaluationMode: __expectString(output.EvaluationMode), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; +const se_Evaluation = (input: Evaluation, context: __SerdeContext): any => { + return take(input, { + Annotation: [], + ComplianceResourceId: [], + ComplianceResourceType: [], + ComplianceType: [], + OrderingTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * deserializeAws_json1_1EvaluationResults - */ -const de_EvaluationResults = (output: any, context: __SerdeContext): EvaluationResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluationResult(entry, context); - }); - return retVal; -}; +// se_EvaluationContext omitted. -/** - * deserializeAws_json1_1Evaluations - */ -const de_Evaluations = (output: any, context: __SerdeContext): Evaluation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Evaluation(entry, context); - }); - return retVal; -}; +// se_EvaluationModeConfiguration omitted. -/** - * deserializeAws_json1_1EvaluationStatus - */ -const de_EvaluationStatus = (output: any, context: __SerdeContext): EvaluationStatus => { - return { - FailureReason: __expectString(output.FailureReason), - Status: __expectString(output.Status), - } as any; -}; +// se_EvaluationModes omitted. /** - * deserializeAws_json1_1ExcludedAccounts + * serializeAws_json1_1Evaluations */ -const de_ExcludedAccounts = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) +const se_Evaluations = (input: Evaluation[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + .map((entry) => { + return se_Evaluation(entry, context); }); - return retVal; }; -/** - * deserializeAws_json1_1ExecutionControls - */ -const de_ExecutionControls = (output: any, context: __SerdeContext): ExecutionControls => { - return { - SsmControls: output.SsmControls != null ? de_SsmControls(output.SsmControls, context) : undefined, - } as any; -}; +// se_ExcludedAccounts omitted. -/** - * deserializeAws_json1_1FailedDeleteRemediationExceptionsBatch - */ -const de_FailedDeleteRemediationExceptionsBatch = ( - output: any, - context: __SerdeContext -): FailedDeleteRemediationExceptionsBatch => { - return { - FailedItems: - output.FailedItems != null ? de_RemediationExceptionResourceKeys(output.FailedItems, context) : undefined, - FailureMessage: __expectString(output.FailureMessage), - } as any; -}; +// se_ExecutionControls omitted. /** - * deserializeAws_json1_1FailedDeleteRemediationExceptionsBatches + * serializeAws_json1_1ExternalEvaluation */ -const de_FailedDeleteRemediationExceptionsBatches = ( - output: any, - context: __SerdeContext -): FailedDeleteRemediationExceptionsBatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedDeleteRemediationExceptionsBatch(entry, context); - }); - return retVal; +const se_ExternalEvaluation = (input: ExternalEvaluation, context: __SerdeContext): any => { + return take(input, { + Annotation: [], + ComplianceResourceId: [], + ComplianceResourceType: [], + ComplianceType: [], + OrderingTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * deserializeAws_json1_1FailedRemediationBatch - */ -const de_FailedRemediationBatch = (output: any, context: __SerdeContext): FailedRemediationBatch => { - return { - FailedItems: output.FailedItems != null ? de_RemediationConfigurations(output.FailedItems, context) : undefined, - FailureMessage: __expectString(output.FailureMessage), - } as any; -}; +// se_GetAggregateComplianceDetailsByConfigRuleRequest omitted. -/** - * deserializeAws_json1_1FailedRemediationBatches - */ -const de_FailedRemediationBatches = (output: any, context: __SerdeContext): FailedRemediationBatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedRemediationBatch(entry, context); - }); - return retVal; -}; +// se_GetAggregateConfigRuleComplianceSummaryRequest omitted. -/** - * deserializeAws_json1_1FailedRemediationExceptionBatch - */ -const de_FailedRemediationExceptionBatch = (output: any, context: __SerdeContext): FailedRemediationExceptionBatch => { - return { - FailedItems: output.FailedItems != null ? de_RemediationExceptions(output.FailedItems, context) : undefined, - FailureMessage: __expectString(output.FailureMessage), - } as any; -}; +// se_GetAggregateConformancePackComplianceSummaryRequest omitted. -/** - * deserializeAws_json1_1FailedRemediationExceptionBatches - */ -const de_FailedRemediationExceptionBatches = ( - output: any, - context: __SerdeContext -): FailedRemediationExceptionBatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedRemediationExceptionBatch(entry, context); - }); - return retVal; -}; +// se_GetAggregateDiscoveredResourceCountsRequest omitted. -/** - * deserializeAws_json1_1FieldInfo - */ -const de_FieldInfo = (output: any, context: __SerdeContext): FieldInfo => { - return { - Name: __expectString(output.Name), - } as any; -}; +// se_GetAggregateResourceConfigRequest omitted. -/** - * deserializeAws_json1_1FieldInfoList - */ -const de_FieldInfoList = (output: any, context: __SerdeContext): FieldInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldInfo(entry, context); - }); - return retVal; -}; +// se_GetComplianceDetailsByConfigRuleRequest omitted. -/** - * deserializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleResponse - */ -const de_GetAggregateComplianceDetailsByConfigRuleResponse = ( - output: any, - context: __SerdeContext -): GetAggregateComplianceDetailsByConfigRuleResponse => { - return { - AggregateEvaluationResults: - output.AggregateEvaluationResults != null - ? de_AggregateEvaluationResultList(output.AggregateEvaluationResults, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_GetComplianceDetailsByResourceRequest omitted. -/** - * deserializeAws_json1_1GetAggregateConfigRuleComplianceSummaryResponse - */ -const de_GetAggregateConfigRuleComplianceSummaryResponse = ( - output: any, - context: __SerdeContext -): GetAggregateConfigRuleComplianceSummaryResponse => { - return { - AggregateComplianceCounts: - output.AggregateComplianceCounts != null - ? de_AggregateComplianceCountList(output.AggregateComplianceCounts, context) - : undefined, - GroupByKey: __expectString(output.GroupByKey), - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_GetComplianceSummaryByResourceTypeRequest omitted. -/** - * deserializeAws_json1_1GetAggregateConformancePackComplianceSummaryResponse - */ -const de_GetAggregateConformancePackComplianceSummaryResponse = ( - output: any, - context: __SerdeContext -): GetAggregateConformancePackComplianceSummaryResponse => { - return { - AggregateConformancePackComplianceSummaries: - output.AggregateConformancePackComplianceSummaries != null - ? de_AggregateConformancePackComplianceSummaryList(output.AggregateConformancePackComplianceSummaries, context) - : undefined, - GroupByKey: __expectString(output.GroupByKey), - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_GetConformancePackComplianceDetailsRequest omitted. + +// se_GetConformancePackComplianceSummaryRequest omitted. + +// se_GetCustomRulePolicyRequest omitted. + +// se_GetDiscoveredResourceCountsRequest omitted. + +// se_GetOrganizationConfigRuleDetailedStatusRequest omitted. + +// se_GetOrganizationConformancePackDetailedStatusRequest omitted. + +// se_GetOrganizationCustomRulePolicyRequest omitted. /** - * deserializeAws_json1_1GetAggregateDiscoveredResourceCountsResponse + * serializeAws_json1_1GetResourceConfigHistoryRequest */ -const de_GetAggregateDiscoveredResourceCountsResponse = ( - output: any, - context: __SerdeContext -): GetAggregateDiscoveredResourceCountsResponse => { - return { - GroupByKey: __expectString(output.GroupByKey), - GroupedResourceCounts: - output.GroupedResourceCounts != null - ? de_GroupedResourceCountList(output.GroupedResourceCounts, context) - : undefined, - NextToken: __expectString(output.NextToken), - TotalDiscoveredResources: __expectLong(output.TotalDiscoveredResources), - } as any; +const se_GetResourceConfigHistoryRequest = (input: GetResourceConfigHistoryRequest, context: __SerdeContext): any => { + return take(input, { + chronologicalOrder: [], + earlierTime: (_) => Math.round(_.getTime() / 1000), + laterTime: (_) => Math.round(_.getTime() / 1000), + limit: [], + nextToken: [], + resourceId: [], + resourceType: [], + }); }; +// se_GetResourceEvaluationSummaryRequest omitted. + +// se_GetStoredQueryRequest omitted. + +// se_ListAggregateDiscoveredResourcesRequest omitted. + +// se_ListConformancePackComplianceScoresRequest omitted. + +// se_ListDiscoveredResourcesRequest omitted. + /** - * deserializeAws_json1_1GetAggregateResourceConfigResponse + * serializeAws_json1_1ListResourceEvaluationsRequest */ -const de_GetAggregateResourceConfigResponse = ( - output: any, - context: __SerdeContext -): GetAggregateResourceConfigResponse => { - return { - ConfigurationItem: - output.ConfigurationItem != null ? de_ConfigurationItem(output.ConfigurationItem, context) : undefined, - } as any; +const se_ListResourceEvaluationsRequest = (input: ListResourceEvaluationsRequest, context: __SerdeContext): any => { + return take(input, { + Filters: (_) => se_ResourceEvaluationFilters(_, context), + Limit: [], + NextToken: [], + }); }; +// se_ListStoredQueriesRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_OrganizationAggregationSource omitted. + +// se_OrganizationConfigRuleNames omitted. + +// se_OrganizationConfigRuleTriggerTypeNoSNs omitted. + +// se_OrganizationConfigRuleTriggerTypes omitted. + +// se_OrganizationConformancePackNames omitted. + +// se_OrganizationCustomPolicyRuleMetadata omitted. + +// se_OrganizationCustomRuleMetadata omitted. + +// se_OrganizationManagedRuleMetadata omitted. + +// se_OrganizationResourceDetailedStatusFilters omitted. + +// se_PutAggregationAuthorizationRequest omitted. + +// se_PutConfigRuleRequest omitted. + +// se_PutConfigurationAggregatorRequest omitted. + +// se_PutConfigurationRecorderRequest omitted. + +// se_PutConformancePackRequest omitted. + +// se_PutDeliveryChannelRequest omitted. + /** - * deserializeAws_json1_1GetComplianceDetailsByConfigRuleResponse + * serializeAws_json1_1PutEvaluationsRequest */ -const de_GetComplianceDetailsByConfigRuleResponse = ( - output: any, - context: __SerdeContext -): GetComplianceDetailsByConfigRuleResponse => { - return { - EvaluationResults: - output.EvaluationResults != null ? de_EvaluationResults(output.EvaluationResults, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const se_PutEvaluationsRequest = (input: PutEvaluationsRequest, context: __SerdeContext): any => { + return take(input, { + Evaluations: (_) => se_Evaluations(_, context), + ResultToken: [], + TestMode: [], + }); }; /** - * deserializeAws_json1_1GetComplianceDetailsByResourceResponse + * serializeAws_json1_1PutExternalEvaluationRequest */ -const de_GetComplianceDetailsByResourceResponse = ( - output: any, - context: __SerdeContext -): GetComplianceDetailsByResourceResponse => { - return { - EvaluationResults: - output.EvaluationResults != null ? de_EvaluationResults(output.EvaluationResults, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const se_PutExternalEvaluationRequest = (input: PutExternalEvaluationRequest, context: __SerdeContext): any => { + return take(input, { + ConfigRuleName: [], + ExternalEvaluation: (_) => se_ExternalEvaluation(_, context), + }); }; +// se_PutOrganizationConfigRuleRequest omitted. + +// se_PutOrganizationConformancePackRequest omitted. + +// se_PutRemediationConfigurationsRequest omitted. + /** - * deserializeAws_json1_1GetComplianceSummaryByConfigRuleResponse + * serializeAws_json1_1PutRemediationExceptionsRequest */ -const de_GetComplianceSummaryByConfigRuleResponse = ( - output: any, - context: __SerdeContext -): GetComplianceSummaryByConfigRuleResponse => { - return { - ComplianceSummary: - output.ComplianceSummary != null ? de_ComplianceSummary(output.ComplianceSummary, context) : undefined, - } as any; +const se_PutRemediationExceptionsRequest = (input: PutRemediationExceptionsRequest, context: __SerdeContext): any => { + return take(input, { + ConfigRuleName: [], + ExpirationTime: (_) => Math.round(_.getTime() / 1000), + Message: [], + ResourceKeys: _json, + }); }; +// se_PutResourceConfigRequest omitted. + +// se_PutRetentionConfigurationRequest omitted. + +// se_PutStoredQueryRequest omitted. + +// se_RecordingGroup omitted. + +// se_ReevaluateConfigRuleNames omitted. + +// se_RemediationConfiguration omitted. + +// se_RemediationConfigurations omitted. + +// se_RemediationExceptionResourceKey omitted. + +// se_RemediationExceptionResourceKeys omitted. + +// se_RemediationParameters omitted. + +// se_RemediationParameterValue omitted. + +// se_ResourceCountFilters omitted. + +// se_ResourceDetails omitted. + /** - * deserializeAws_json1_1GetComplianceSummaryByResourceTypeResponse + * serializeAws_json1_1ResourceEvaluationFilters */ -const de_GetComplianceSummaryByResourceTypeResponse = ( - output: any, - context: __SerdeContext -): GetComplianceSummaryByResourceTypeResponse => { - return { - ComplianceSummariesByResourceType: - output.ComplianceSummariesByResourceType != null - ? de_ComplianceSummariesByResourceType(output.ComplianceSummariesByResourceType, context) - : undefined, - } as any; +const se_ResourceEvaluationFilters = (input: ResourceEvaluationFilters, context: __SerdeContext): any => { + return take(input, { + EvaluationContextIdentifier: [], + EvaluationMode: [], + TimeWindow: (_) => se_TimeWindow(_, context), + }); }; -/** - * deserializeAws_json1_1GetConformancePackComplianceDetailsResponse - */ -const de_GetConformancePackComplianceDetailsResponse = ( - output: any, - context: __SerdeContext -): GetConformancePackComplianceDetailsResponse => { - return { - ConformancePackName: __expectString(output.ConformancePackName), - ConformancePackRuleEvaluationResults: - output.ConformancePackRuleEvaluationResults != null - ? de_ConformancePackRuleEvaluationResultsList(output.ConformancePackRuleEvaluationResults, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ResourceFilters omitted. + +// se_ResourceIdentifiersList omitted. + +// se_ResourceIdList omitted. + +// se_ResourceKey omitted. + +// se_ResourceKeys omitted. + +// se_ResourceTypeList omitted. + +// se_ResourceTypes omitted. + +// se_ResourceTypesScope omitted. + +// se_ResourceValue omitted. + +// se_RetentionConfigurationNameList omitted. + +// se_Scope omitted. + +// se_SelectAggregateResourceConfigRequest omitted. + +// se_SelectResourceConfigRequest omitted. + +// se_Source omitted. + +// se_SourceDetail omitted. + +// se_SourceDetails omitted. + +// se_SsmControls omitted. + +// se_StartConfigRulesEvaluationRequest omitted. + +// se_StartConfigurationRecorderRequest omitted. + +// se_StartRemediationExecutionRequest omitted. + +// se_StartResourceEvaluationRequest omitted. + +// se_StaticParameterValues omitted. + +// se_StaticValue omitted. + +// se_StatusDetailFilters omitted. + +// se_StopConfigurationRecorderRequest omitted. + +// se_StoredQuery omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1GetConformancePackComplianceSummaryResponse - */ -const de_GetConformancePackComplianceSummaryResponse = ( - output: any, - context: __SerdeContext -): GetConformancePackComplianceSummaryResponse => { - return { - ConformancePackComplianceSummaryList: - output.ConformancePackComplianceSummaryList != null - ? de_ConformancePackComplianceSummaryList(output.ConformancePackComplianceSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_Tags omitted. -/** - * deserializeAws_json1_1GetCustomRulePolicyResponse - */ -const de_GetCustomRulePolicyResponse = (output: any, context: __SerdeContext): GetCustomRulePolicyResponse => { - return { - PolicyText: __expectString(output.PolicyText), - } as any; -}; +// se_TagsList omitted. + +// se_TemplateSSMDocumentDetails omitted. /** - * deserializeAws_json1_1GetDiscoveredResourceCountsResponse + * serializeAws_json1_1TimeWindow */ -const de_GetDiscoveredResourceCountsResponse = ( - output: any, - context: __SerdeContext -): GetDiscoveredResourceCountsResponse => { - return { - nextToken: __expectString(output.nextToken), - resourceCounts: output.resourceCounts != null ? de_ResourceCounts(output.resourceCounts, context) : undefined, - totalDiscoveredResources: __expectLong(output.totalDiscoveredResources), - } as any; +const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_UntagResourceRequest omitted. + +// de_AccountAggregationSource omitted. + +// de_AccountAggregationSourceAccountList omitted. + +// de_AccountAggregationSourceList omitted. + +// de_AggregateComplianceByConfigRule omitted. + +// de_AggregateComplianceByConfigRuleList omitted. + +// de_AggregateComplianceByConformancePack omitted. + +// de_AggregateComplianceByConformancePackList omitted. + /** - * deserializeAws_json1_1GetOrganizationConfigRuleDetailedStatusResponse + * deserializeAws_json1_1AggregateComplianceCount */ -const de_GetOrganizationConfigRuleDetailedStatusResponse = ( - output: any, - context: __SerdeContext -): GetOrganizationConfigRuleDetailedStatusResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationConfigRuleDetailedStatus: - output.OrganizationConfigRuleDetailedStatus != null - ? de_OrganizationConfigRuleDetailedStatus(output.OrganizationConfigRuleDetailedStatus, context) - : undefined, - } as any; +const de_AggregateComplianceCount = (output: any, context: __SerdeContext): AggregateComplianceCount => { + return take(output, { + ComplianceSummary: (_: any) => de_ComplianceSummary(_, context), + GroupName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1GetOrganizationConformancePackDetailedStatusResponse + * deserializeAws_json1_1AggregateComplianceCountList */ -const de_GetOrganizationConformancePackDetailedStatusResponse = ( - output: any, - context: __SerdeContext -): GetOrganizationConformancePackDetailedStatusResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationConformancePackDetailedStatuses: - output.OrganizationConformancePackDetailedStatuses != null - ? de_OrganizationConformancePackDetailedStatuses(output.OrganizationConformancePackDetailedStatuses, context) - : undefined, - } as any; +const de_AggregateComplianceCountList = (output: any, context: __SerdeContext): AggregateComplianceCount[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AggregateComplianceCount(entry, context); + }); + return retVal; }; +// de_AggregateConformancePackCompliance omitted. + +// de_AggregateConformancePackComplianceCount omitted. + +// de_AggregateConformancePackComplianceSummary omitted. + +// de_AggregateConformancePackComplianceSummaryList omitted. + /** - * deserializeAws_json1_1GetOrganizationCustomRulePolicyResponse + * deserializeAws_json1_1AggregatedSourceStatus */ -const de_GetOrganizationCustomRulePolicyResponse = ( - output: any, - context: __SerdeContext -): GetOrganizationCustomRulePolicyResponse => { - return { - PolicyText: __expectString(output.PolicyText), - } as any; +const de_AggregatedSourceStatus = (output: any, context: __SerdeContext): AggregatedSourceStatus => { + return take(output, { + AwsRegion: __expectString, + LastErrorCode: __expectString, + LastErrorMessage: __expectString, + LastUpdateStatus: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceId: __expectString, + SourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1GetResourceConfigHistoryResponse + * deserializeAws_json1_1AggregatedSourceStatusList */ -const de_GetResourceConfigHistoryResponse = ( - output: any, - context: __SerdeContext -): GetResourceConfigHistoryResponse => { - return { - configurationItems: - output.configurationItems != null ? de_ConfigurationItemList(output.configurationItems, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; +const de_AggregatedSourceStatusList = (output: any, context: __SerdeContext): AggregatedSourceStatus[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AggregatedSourceStatus(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1GetResourceEvaluationSummaryResponse + * deserializeAws_json1_1AggregateEvaluationResult */ -const de_GetResourceEvaluationSummaryResponse = ( - output: any, - context: __SerdeContext -): GetResourceEvaluationSummaryResponse => { - return { - Compliance: __expectString(output.Compliance), - EvaluationContext: - output.EvaluationContext != null ? de_EvaluationContext(output.EvaluationContext, context) : undefined, - EvaluationMode: __expectString(output.EvaluationMode), - EvaluationStartTimestamp: - output.EvaluationStartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationStartTimestamp))) - : undefined, - EvaluationStatus: - output.EvaluationStatus != null ? de_EvaluationStatus(output.EvaluationStatus, context) : undefined, - ResourceDetails: output.ResourceDetails != null ? de_ResourceDetails(output.ResourceDetails, context) : undefined, - ResourceEvaluationId: __expectString(output.ResourceEvaluationId), - } as any; +const de_AggregateEvaluationResult = (output: any, context: __SerdeContext): AggregateEvaluationResult => { + return take(output, { + AccountId: __expectString, + Annotation: __expectString, + AwsRegion: __expectString, + ComplianceType: __expectString, + ConfigRuleInvokedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationResultIdentifier: (_: any) => de_EvaluationResultIdentifier(_, context), + ResultRecordedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1GetStoredQueryResponse + * deserializeAws_json1_1AggregateEvaluationResultList */ -const de_GetStoredQueryResponse = (output: any, context: __SerdeContext): GetStoredQueryResponse => { - return { - StoredQuery: output.StoredQuery != null ? de_StoredQuery(output.StoredQuery, context) : undefined, - } as any; +const de_AggregateEvaluationResultList = (output: any, context: __SerdeContext): AggregateEvaluationResult[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AggregateEvaluationResult(entry, context); + }); + return retVal; }; +// de_AggregateResourceIdentifier omitted. + /** - * deserializeAws_json1_1GroupedResourceCount + * deserializeAws_json1_1AggregationAuthorization */ -const de_GroupedResourceCount = (output: any, context: __SerdeContext): GroupedResourceCount => { - return { - GroupName: __expectString(output.GroupName), - ResourceCount: __expectLong(output.ResourceCount), - } as any; +const de_AggregationAuthorization = (output: any, context: __SerdeContext): AggregationAuthorization => { + return take(output, { + AggregationAuthorizationArn: __expectString, + AuthorizedAccountId: __expectString, + AuthorizedAwsRegion: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1GroupedResourceCountList + * deserializeAws_json1_1AggregationAuthorizationList */ -const de_GroupedResourceCountList = (output: any, context: __SerdeContext): GroupedResourceCount[] => { +const de_AggregationAuthorizationList = (output: any, context: __SerdeContext): AggregationAuthorization[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupedResourceCount(entry, context); + return de_AggregationAuthorization(entry, context); }); return retVal; }; +// de_AggregatorRegionList omitted. + /** - * deserializeAws_json1_1IdempotentParameterMismatch + * deserializeAws_json1_1BaseConfigurationItem */ -const de_IdempotentParameterMismatch = (output: any, context: __SerdeContext): IdempotentParameterMismatch => { - return { - message: __expectString(output.message), - } as any; +const de_BaseConfigurationItem = (output: any, context: __SerdeContext): BaseConfigurationItem => { + return take(output, { + accountId: __expectString, + arn: __expectString, + availabilityZone: __expectString, + awsRegion: __expectString, + configuration: __expectString, + configurationItemCaptureTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + configurationItemStatus: __expectString, + configurationStateId: __expectString, + resourceCreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceId: __expectString, + resourceName: __expectString, + resourceType: __expectString, + supplementaryConfiguration: _json, + version: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InsufficientDeliveryPolicyException + * deserializeAws_json1_1BaseConfigurationItems */ -const de_InsufficientDeliveryPolicyException = ( - output: any, - context: __SerdeContext -): InsufficientDeliveryPolicyException => { - return { - message: __expectString(output.message), - } as any; +const de_BaseConfigurationItems = (output: any, context: __SerdeContext): BaseConfigurationItem[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_BaseConfigurationItem(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1InsufficientPermissionsException + * deserializeAws_json1_1BatchGetAggregateResourceConfigResponse */ -const de_InsufficientPermissionsException = ( +const de_BatchGetAggregateResourceConfigResponse = ( output: any, context: __SerdeContext -): InsufficientPermissionsException => { - return { - message: __expectString(output.message), - } as any; +): BatchGetAggregateResourceConfigResponse => { + return take(output, { + BaseConfigurationItems: (_: any) => de_BaseConfigurationItems(_, context), + UnprocessedResourceIdentifiers: _json, + }) as any; }; /** - * deserializeAws_json1_1InvalidConfigurationRecorderNameException + * deserializeAws_json1_1BatchGetResourceConfigResponse */ -const de_InvalidConfigurationRecorderNameException = ( - output: any, - context: __SerdeContext -): InvalidConfigurationRecorderNameException => { - return { - message: __expectString(output.message), - } as any; +const de_BatchGetResourceConfigResponse = (output: any, context: __SerdeContext): BatchGetResourceConfigResponse => { + return take(output, { + baseConfigurationItems: (_: any) => de_BaseConfigurationItems(_, context), + unprocessedResourceKeys: _json, + }) as any; }; +// de_Compliance omitted. + +// de_ComplianceByConfigRule omitted. + +// de_ComplianceByConfigRules omitted. + +// de_ComplianceByResource omitted. + +// de_ComplianceByResources omitted. + +// de_ComplianceContributorCount omitted. + +// de_ComplianceResourceTypes omitted. + /** - * deserializeAws_json1_1InvalidDeliveryChannelNameException + * deserializeAws_json1_1ComplianceSummariesByResourceType */ -const de_InvalidDeliveryChannelNameException = ( +const de_ComplianceSummariesByResourceType = ( output: any, context: __SerdeContext -): InvalidDeliveryChannelNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidExpressionException - */ -const de_InvalidExpressionException = (output: any, context: __SerdeContext): InvalidExpressionException => { - return { - message: __expectString(output.message), - } as any; +): ComplianceSummaryByResourceType[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ComplianceSummaryByResourceType(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1InvalidLimitException + * deserializeAws_json1_1ComplianceSummary */ -const de_InvalidLimitException = (output: any, context: __SerdeContext): InvalidLimitException => { - return { - message: __expectString(output.message), - } as any; +const de_ComplianceSummary = (output: any, context: __SerdeContext): ComplianceSummary => { + return take(output, { + ComplianceSummaryTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompliantResourceCount: _json, + NonCompliantResourceCount: _json, + }) as any; }; /** - * deserializeAws_json1_1InvalidNextTokenException + * deserializeAws_json1_1ComplianceSummaryByResourceType */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - message: __expectString(output.message), - } as any; +const de_ComplianceSummaryByResourceType = (output: any, context: __SerdeContext): ComplianceSummaryByResourceType => { + return take(output, { + ComplianceSummary: (_: any) => de_ComplianceSummary(_, context), + ResourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InvalidParameterValueException + * deserializeAws_json1_1ConfigExportDeliveryInfo */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigExportDeliveryInfo = (output: any, context: __SerdeContext): ConfigExportDeliveryInfo => { + return take(output, { + lastAttemptTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastErrorCode: __expectString, + lastErrorMessage: __expectString, + lastStatus: __expectString, + lastSuccessfulTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + nextDeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1InvalidRecordingGroupException - */ -const de_InvalidRecordingGroupException = (output: any, context: __SerdeContext): InvalidRecordingGroupException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConfigRule omitted. /** - * deserializeAws_json1_1InvalidResultTokenException + * deserializeAws_json1_1ConfigRuleEvaluationStatus */ -const de_InvalidResultTokenException = (output: any, context: __SerdeContext): InvalidResultTokenException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigRuleEvaluationStatus = (output: any, context: __SerdeContext): ConfigRuleEvaluationStatus => { + return take(output, { + ConfigRuleArn: __expectString, + ConfigRuleId: __expectString, + ConfigRuleName: __expectString, + FirstActivatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FirstEvaluationStarted: __expectBoolean, + LastDeactivatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastDebugLogDeliveryStatus: __expectString, + LastDebugLogDeliveryStatusReason: __expectString, + LastDebugLogDeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastErrorCode: __expectString, + LastErrorMessage: __expectString, + LastFailedEvaluationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastFailedInvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuccessfulEvaluationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuccessfulInvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1InvalidRoleException + * deserializeAws_json1_1ConfigRuleEvaluationStatusList */ -const de_InvalidRoleException = (output: any, context: __SerdeContext): InvalidRoleException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigRuleEvaluationStatusList = (output: any, context: __SerdeContext): ConfigRuleEvaluationStatus[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConfigRuleEvaluationStatus(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1InvalidS3KeyPrefixException - */ -const de_InvalidS3KeyPrefixException = (output: any, context: __SerdeContext): InvalidS3KeyPrefixException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConfigRules omitted. -/** - * deserializeAws_json1_1InvalidS3KmsKeyArnException - */ -const de_InvalidS3KmsKeyArnException = (output: any, context: __SerdeContext): InvalidS3KmsKeyArnException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConfigSnapshotDeliveryProperties omitted. /** - * deserializeAws_json1_1InvalidSNSTopicARNException + * deserializeAws_json1_1ConfigStreamDeliveryInfo */ -const de_InvalidSNSTopicARNException = (output: any, context: __SerdeContext): InvalidSNSTopicARNException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigStreamDeliveryInfo = (output: any, context: __SerdeContext): ConfigStreamDeliveryInfo => { + return take(output, { + lastErrorCode: __expectString, + lastErrorMessage: __expectString, + lastStatus: __expectString, + lastStatusChangeTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1InvalidTimeRangeException + * deserializeAws_json1_1ConfigurationAggregator */ -const de_InvalidTimeRangeException = (output: any, context: __SerdeContext): InvalidTimeRangeException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigurationAggregator = (output: any, context: __SerdeContext): ConfigurationAggregator => { + return take(output, { + AccountAggregationSources: _json, + ConfigurationAggregatorArn: __expectString, + ConfigurationAggregatorName: __expectString, + CreatedBy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrganizationAggregationSource: _json, + }) as any; }; /** - * deserializeAws_json1_1LastDeliveryChannelDeleteFailedException + * deserializeAws_json1_1ConfigurationAggregatorList */ -const de_LastDeliveryChannelDeleteFailedException = ( - output: any, - context: __SerdeContext -): LastDeliveryChannelDeleteFailedException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigurationAggregatorList = (output: any, context: __SerdeContext): ConfigurationAggregator[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConfigurationAggregator(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1LimitExceededException + * deserializeAws_json1_1ConfigurationItem */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConfigurationItem = (output: any, context: __SerdeContext): ConfigurationItem => { + return take(output, { + accountId: __expectString, + arn: __expectString, + availabilityZone: __expectString, + awsRegion: __expectString, + configuration: __expectString, + configurationItemCaptureTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + configurationItemMD5Hash: __expectString, + configurationItemStatus: __expectString, + configurationStateId: __expectString, + relatedEvents: _json, + relationships: _json, + resourceCreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceId: __expectString, + resourceName: __expectString, + resourceType: __expectString, + supplementaryConfiguration: _json, + tags: _json, + version: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListAggregateDiscoveredResourcesResponse + * deserializeAws_json1_1ConfigurationItemList */ -const de_ListAggregateDiscoveredResourcesResponse = ( - output: any, - context: __SerdeContext -): ListAggregateDiscoveredResourcesResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceIdentifiers: - output.ResourceIdentifiers != null - ? de_DiscoveredResourceIdentifierList(output.ResourceIdentifiers, context) - : undefined, - } as any; +const de_ConfigurationItemList = (output: any, context: __SerdeContext): ConfigurationItem[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConfigurationItem(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1ListConformancePackComplianceScoresResponse - */ -const de_ListConformancePackComplianceScoresResponse = ( - output: any, - context: __SerdeContext -): ListConformancePackComplianceScoresResponse => { - return { - ConformancePackComplianceScores: - output.ConformancePackComplianceScores != null - ? de_ConformancePackComplianceScores(output.ConformancePackComplianceScores, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ConfigurationRecorder omitted. -/** - * deserializeAws_json1_1ListDiscoveredResourcesResponse - */ -const de_ListDiscoveredResourcesResponse = (output: any, context: __SerdeContext): ListDiscoveredResourcesResponse => { - return { - nextToken: __expectString(output.nextToken), - resourceIdentifiers: - output.resourceIdentifiers != null ? de_ResourceIdentifierList(output.resourceIdentifiers, context) : undefined, - } as any; -}; +// de_ConfigurationRecorderList omitted. /** - * deserializeAws_json1_1ListResourceEvaluationsResponse + * deserializeAws_json1_1ConfigurationRecorderStatus */ -const de_ListResourceEvaluationsResponse = (output: any, context: __SerdeContext): ListResourceEvaluationsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceEvaluations: - output.ResourceEvaluations != null ? de_ResourceEvaluations(output.ResourceEvaluations, context) : undefined, - } as any; +const de_ConfigurationRecorderStatus = (output: any, context: __SerdeContext): ConfigurationRecorderStatus => { + return take(output, { + lastErrorCode: __expectString, + lastErrorMessage: __expectString, + lastStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStatus: __expectString, + lastStatusChangeTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStopTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + recording: __expectBoolean, + }) as any; }; /** - * deserializeAws_json1_1ListStoredQueriesResponse + * deserializeAws_json1_1ConfigurationRecorderStatusList */ -const de_ListStoredQueriesResponse = (output: any, context: __SerdeContext): ListStoredQueriesResponse => { - return { - NextToken: __expectString(output.NextToken), - StoredQueryMetadata: - output.StoredQueryMetadata != null ? de_StoredQueryMetadataList(output.StoredQueryMetadata, context) : undefined, - } as any; +const de_ConfigurationRecorderStatusList = (output: any, context: __SerdeContext): ConfigurationRecorderStatus[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConfigurationRecorderStatus(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ListTagsForResourceResponse + * deserializeAws_json1_1ConformancePackComplianceScore */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_ConformancePackComplianceScore = (output: any, context: __SerdeContext): ConformancePackComplianceScore => { + return take(output, { + ConformancePackName: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Score: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MaxActiveResourcesExceededException + * deserializeAws_json1_1ConformancePackComplianceScores */ -const de_MaxActiveResourcesExceededException = ( - output: any, - context: __SerdeContext -): MaxActiveResourcesExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConformancePackComplianceScores = (output: any, context: __SerdeContext): ConformancePackComplianceScore[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConformancePackComplianceScore(entry, context); + }); + return retVal; }; +// de_ConformancePackComplianceSummary omitted. + +// de_ConformancePackComplianceSummaryList omitted. + /** - * deserializeAws_json1_1MaxNumberOfConfigRulesExceededException + * deserializeAws_json1_1ConformancePackDetail */ -const de_MaxNumberOfConfigRulesExceededException = ( - output: any, - context: __SerdeContext -): MaxNumberOfConfigRulesExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConformancePackDetail = (output: any, context: __SerdeContext): ConformancePackDetail => { + return take(output, { + ConformancePackArn: __expectString, + ConformancePackId: __expectString, + ConformancePackInputParameters: _json, + ConformancePackName: __expectString, + CreatedBy: __expectString, + DeliveryS3Bucket: __expectString, + DeliveryS3KeyPrefix: __expectString, + LastUpdateRequestedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TemplateSSMDocumentDetails: _json, + }) as any; }; /** - * deserializeAws_json1_1MaxNumberOfConfigurationRecordersExceededException + * deserializeAws_json1_1ConformancePackDetailList */ -const de_MaxNumberOfConfigurationRecordersExceededException = ( - output: any, - context: __SerdeContext -): MaxNumberOfConfigurationRecordersExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConformancePackDetailList = (output: any, context: __SerdeContext): ConformancePackDetail[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConformancePackDetail(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1MaxNumberOfConformancePacksExceededException + * deserializeAws_json1_1ConformancePackEvaluationResult */ -const de_MaxNumberOfConformancePacksExceededException = ( - output: any, - context: __SerdeContext -): MaxNumberOfConformancePacksExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConformancePackEvaluationResult = (output: any, context: __SerdeContext): ConformancePackEvaluationResult => { + return take(output, { + Annotation: __expectString, + ComplianceType: __expectString, + ConfigRuleInvokedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationResultIdentifier: (_: any) => de_EvaluationResultIdentifier(_, context), + ResultRecordedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ConformancePackInputParameter omitted. + +// de_ConformancePackInputParameters omitted. + +// de_ConformancePackRuleCompliance omitted. + +// de_ConformancePackRuleComplianceList omitted. + /** - * deserializeAws_json1_1MaxNumberOfDeliveryChannelsExceededException + * deserializeAws_json1_1ConformancePackRuleEvaluationResultsList */ -const de_MaxNumberOfDeliveryChannelsExceededException = ( +const de_ConformancePackRuleEvaluationResultsList = ( output: any, context: __SerdeContext -): MaxNumberOfDeliveryChannelsExceededException => { - return { - message: __expectString(output.message), - } as any; +): ConformancePackEvaluationResult[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConformancePackEvaluationResult(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1MaxNumberOfOrganizationConfigRulesExceededException + * deserializeAws_json1_1ConformancePackStatusDetail */ -const de_MaxNumberOfOrganizationConfigRulesExceededException = ( - output: any, - context: __SerdeContext -): MaxNumberOfOrganizationConfigRulesExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConformancePackStatusDetail = (output: any, context: __SerdeContext): ConformancePackStatusDetail => { + return take(output, { + ConformancePackArn: __expectString, + ConformancePackId: __expectString, + ConformancePackName: __expectString, + ConformancePackState: __expectString, + ConformancePackStatusReason: __expectString, + LastUpdateCompletedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateRequestedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StackArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MaxNumberOfOrganizationConformancePacksExceededException + * deserializeAws_json1_1ConformancePackStatusDetailsList */ -const de_MaxNumberOfOrganizationConformancePacksExceededException = ( - output: any, - context: __SerdeContext -): MaxNumberOfOrganizationConformancePacksExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_ConformancePackStatusDetailsList = (output: any, context: __SerdeContext): ConformancePackStatusDetail[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ConformancePackStatusDetail(entry, context); + }); + return retVal; }; +// de_ConformancePackTemplateValidationException omitted. + +// de_ControlsList omitted. + +// de_CustomPolicyDetails omitted. + +// de_DebugLogDeliveryAccounts omitted. + +// de_DeleteEvaluationResultsResponse omitted. + +// de_DeleteRemediationConfigurationResponse omitted. + +// de_DeleteRemediationExceptionsResponse omitted. + +// de_DeleteStoredQueryResponse omitted. + +// de_DeliverConfigSnapshotResponse omitted. + +// de_DeliveryChannel omitted. + +// de_DeliveryChannelList omitted. + /** - * deserializeAws_json1_1MaxNumberOfRetentionConfigurationsExceededException + * deserializeAws_json1_1DeliveryChannelStatus */ -const de_MaxNumberOfRetentionConfigurationsExceededException = ( - output: any, - context: __SerdeContext -): MaxNumberOfRetentionConfigurationsExceededException => { - return { - message: __expectString(output.message), - } as any; +const de_DeliveryChannelStatus = (output: any, context: __SerdeContext): DeliveryChannelStatus => { + return take(output, { + configHistoryDeliveryInfo: (_: any) => de_ConfigExportDeliveryInfo(_, context), + configSnapshotDeliveryInfo: (_: any) => de_ConfigExportDeliveryInfo(_, context), + configStreamDeliveryInfo: (_: any) => de_ConfigStreamDeliveryInfo(_, context), + name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MemberAccountStatus + * deserializeAws_json1_1DeliveryChannelStatusList */ -const de_MemberAccountStatus = (output: any, context: __SerdeContext): MemberAccountStatus => { - return { - AccountId: __expectString(output.AccountId), - ConfigRuleName: __expectString(output.ConfigRuleName), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - MemberAccountRuleStatus: __expectString(output.MemberAccountRuleStatus), - } as any; +const de_DeliveryChannelStatusList = (output: any, context: __SerdeContext): DeliveryChannelStatus[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DeliveryChannelStatus(entry, context); + }); + return retVal; }; +// de_DescribeAggregateComplianceByConfigRulesResponse omitted. + +// de_DescribeAggregateComplianceByConformancePacksResponse omitted. + /** - * deserializeAws_json1_1NoAvailableConfigurationRecorderException + * deserializeAws_json1_1DescribeAggregationAuthorizationsResponse */ -const de_NoAvailableConfigurationRecorderException = ( +const de_DescribeAggregationAuthorizationsResponse = ( output: any, context: __SerdeContext -): NoAvailableConfigurationRecorderException => { - return { - message: __expectString(output.message), - } as any; +): DescribeAggregationAuthorizationsResponse => { + return take(output, { + AggregationAuthorizations: (_: any) => de_AggregationAuthorizationList(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeComplianceByConfigRuleResponse omitted. + +// de_DescribeComplianceByResourceResponse omitted. + /** - * deserializeAws_json1_1NoAvailableDeliveryChannelException + * deserializeAws_json1_1DescribeConfigRuleEvaluationStatusResponse */ -const de_NoAvailableDeliveryChannelException = ( +const de_DescribeConfigRuleEvaluationStatusResponse = ( output: any, context: __SerdeContext -): NoAvailableDeliveryChannelException => { - return { - message: __expectString(output.message), - } as any; +): DescribeConfigRuleEvaluationStatusResponse => { + return take(output, { + ConfigRulesEvaluationStatus: (_: any) => de_ConfigRuleEvaluationStatusList(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeConfigRulesResponse omitted. + /** - * deserializeAws_json1_1NoAvailableOrganizationException + * deserializeAws_json1_1DescribeConfigurationAggregatorSourcesStatusResponse */ -const de_NoAvailableOrganizationException = ( +const de_DescribeConfigurationAggregatorSourcesStatusResponse = ( output: any, context: __SerdeContext -): NoAvailableOrganizationException => { - return { - message: __expectString(output.message), - } as any; +): DescribeConfigurationAggregatorSourcesStatusResponse => { + return take(output, { + AggregatedSourceStatusList: (_: any) => de_AggregatedSourceStatusList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NoRunningConfigurationRecorderException + * deserializeAws_json1_1DescribeConfigurationAggregatorsResponse */ -const de_NoRunningConfigurationRecorderException = ( +const de_DescribeConfigurationAggregatorsResponse = ( output: any, context: __SerdeContext -): NoRunningConfigurationRecorderException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1NoSuchBucketException - */ -const de_NoSuchBucketException = (output: any, context: __SerdeContext): NoSuchBucketException => { - return { - message: __expectString(output.message), - } as any; +): DescribeConfigurationAggregatorsResponse => { + return take(output, { + ConfigurationAggregators: (_: any) => de_ConfigurationAggregatorList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1NoSuchConfigRuleException - */ -const de_NoSuchConfigRuleException = (output: any, context: __SerdeContext): NoSuchConfigRuleException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DescribeConfigurationRecordersResponse omitted. /** - * deserializeAws_json1_1NoSuchConfigRuleInConformancePackException + * deserializeAws_json1_1DescribeConfigurationRecorderStatusResponse */ -const de_NoSuchConfigRuleInConformancePackException = ( +const de_DescribeConfigurationRecorderStatusResponse = ( output: any, context: __SerdeContext -): NoSuchConfigRuleInConformancePackException => { - return { - message: __expectString(output.message), - } as any; +): DescribeConfigurationRecorderStatusResponse => { + return take(output, { + ConfigurationRecordersStatus: (_: any) => de_ConfigurationRecorderStatusList(_, context), + }) as any; }; +// de_DescribeConformancePackComplianceResponse omitted. + /** - * deserializeAws_json1_1NoSuchConfigurationAggregatorException + * deserializeAws_json1_1DescribeConformancePacksResponse */ -const de_NoSuchConfigurationAggregatorException = ( +const de_DescribeConformancePacksResponse = ( output: any, context: __SerdeContext -): NoSuchConfigurationAggregatorException => { - return { - message: __expectString(output.message), - } as any; +): DescribeConformancePacksResponse => { + return take(output, { + ConformancePackDetails: (_: any) => de_ConformancePackDetailList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NoSuchConfigurationRecorderException + * deserializeAws_json1_1DescribeConformancePackStatusResponse */ -const de_NoSuchConfigurationRecorderException = ( +const de_DescribeConformancePackStatusResponse = ( output: any, context: __SerdeContext -): NoSuchConfigurationRecorderException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1NoSuchConformancePackException - */ -const de_NoSuchConformancePackException = (output: any, context: __SerdeContext): NoSuchConformancePackException => { - return { - message: __expectString(output.message), - } as any; +): DescribeConformancePackStatusResponse => { + return take(output, { + ConformancePackStatusDetails: (_: any) => de_ConformancePackStatusDetailsList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1NoSuchDeliveryChannelException - */ -const de_NoSuchDeliveryChannelException = (output: any, context: __SerdeContext): NoSuchDeliveryChannelException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DescribeDeliveryChannelsResponse omitted. /** - * deserializeAws_json1_1NoSuchOrganizationConfigRuleException + * deserializeAws_json1_1DescribeDeliveryChannelStatusResponse */ -const de_NoSuchOrganizationConfigRuleException = ( +const de_DescribeDeliveryChannelStatusResponse = ( output: any, context: __SerdeContext -): NoSuchOrganizationConfigRuleException => { - return { - message: __expectString(output.message), - } as any; +): DescribeDeliveryChannelStatusResponse => { + return take(output, { + DeliveryChannelsStatus: (_: any) => de_DeliveryChannelStatusList(_, context), + }) as any; }; /** - * deserializeAws_json1_1NoSuchOrganizationConformancePackException + * deserializeAws_json1_1DescribeOrganizationConfigRulesResponse */ -const de_NoSuchOrganizationConformancePackException = ( +const de_DescribeOrganizationConfigRulesResponse = ( output: any, context: __SerdeContext -): NoSuchOrganizationConformancePackException => { - return { - message: __expectString(output.message), - } as any; +): DescribeOrganizationConfigRulesResponse => { + return take(output, { + NextToken: __expectString, + OrganizationConfigRules: (_: any) => de_OrganizationConfigRules(_, context), + }) as any; }; /** - * deserializeAws_json1_1NoSuchRemediationConfigurationException + * deserializeAws_json1_1DescribeOrganizationConfigRuleStatusesResponse */ -const de_NoSuchRemediationConfigurationException = ( +const de_DescribeOrganizationConfigRuleStatusesResponse = ( output: any, context: __SerdeContext -): NoSuchRemediationConfigurationException => { - return { - message: __expectString(output.message), - } as any; +): DescribeOrganizationConfigRuleStatusesResponse => { + return take(output, { + NextToken: __expectString, + OrganizationConfigRuleStatuses: (_: any) => de_OrganizationConfigRuleStatuses(_, context), + }) as any; }; /** - * deserializeAws_json1_1NoSuchRemediationExceptionException + * deserializeAws_json1_1DescribeOrganizationConformancePacksResponse */ -const de_NoSuchRemediationExceptionException = ( +const de_DescribeOrganizationConformancePacksResponse = ( output: any, context: __SerdeContext -): NoSuchRemediationExceptionException => { - return { - message: __expectString(output.message), - } as any; +): DescribeOrganizationConformancePacksResponse => { + return take(output, { + NextToken: __expectString, + OrganizationConformancePacks: (_: any) => de_OrganizationConformancePacks(_, context), + }) as any; }; /** - * deserializeAws_json1_1NoSuchRetentionConfigurationException + * deserializeAws_json1_1DescribeOrganizationConformancePackStatusesResponse */ -const de_NoSuchRetentionConfigurationException = ( +const de_DescribeOrganizationConformancePackStatusesResponse = ( output: any, context: __SerdeContext -): NoSuchRetentionConfigurationException => { - return { - message: __expectString(output.message), - } as any; +): DescribeOrganizationConformancePackStatusesResponse => { + return take(output, { + NextToken: __expectString, + OrganizationConformancePackStatuses: (_: any) => de_OrganizationConformancePackStatuses(_, context), + }) as any; }; +// de_DescribePendingAggregationRequestsResponse omitted. + +// de_DescribeRemediationConfigurationsResponse omitted. + /** - * deserializeAws_json1_1OrganizationAccessDeniedException + * deserializeAws_json1_1DescribeRemediationExceptionsResponse */ -const de_OrganizationAccessDeniedException = ( +const de_DescribeRemediationExceptionsResponse = ( output: any, context: __SerdeContext -): OrganizationAccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1OrganizationAggregationSource - */ -const de_OrganizationAggregationSource = (output: any, context: __SerdeContext): OrganizationAggregationSource => { - return { - AllAwsRegions: __expectBoolean(output.AllAwsRegions), - AwsRegions: output.AwsRegions != null ? de_AggregatorRegionList(output.AwsRegions, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; +): DescribeRemediationExceptionsResponse => { + return take(output, { + NextToken: __expectString, + RemediationExceptions: (_: any) => de_RemediationExceptions(_, context), + }) as any; }; /** - * deserializeAws_json1_1OrganizationAllFeaturesNotEnabledException + * deserializeAws_json1_1DescribeRemediationExecutionStatusResponse */ -const de_OrganizationAllFeaturesNotEnabledException = ( +const de_DescribeRemediationExecutionStatusResponse = ( output: any, context: __SerdeContext -): OrganizationAllFeaturesNotEnabledException => { - return { - message: __expectString(output.message), - } as any; +): DescribeRemediationExecutionStatusResponse => { + return take(output, { + NextToken: __expectString, + RemediationExecutionStatuses: (_: any) => de_RemediationExecutionStatuses(_, context), + }) as any; }; -/** - * deserializeAws_json1_1OrganizationConfigRule - */ -const de_OrganizationConfigRule = (output: any, context: __SerdeContext): OrganizationConfigRule => { - return { - ExcludedAccounts: - output.ExcludedAccounts != null ? de_ExcludedAccounts(output.ExcludedAccounts, context) : undefined, - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - OrganizationConfigRuleArn: __expectString(output.OrganizationConfigRuleArn), - OrganizationConfigRuleName: __expectString(output.OrganizationConfigRuleName), - OrganizationCustomPolicyRuleMetadata: - output.OrganizationCustomPolicyRuleMetadata != null - ? de_OrganizationCustomPolicyRuleMetadataNoPolicy(output.OrganizationCustomPolicyRuleMetadata, context) - : undefined, - OrganizationCustomRuleMetadata: - output.OrganizationCustomRuleMetadata != null - ? de_OrganizationCustomRuleMetadata(output.OrganizationCustomRuleMetadata, context) - : undefined, - OrganizationManagedRuleMetadata: - output.OrganizationManagedRuleMetadata != null - ? de_OrganizationManagedRuleMetadata(output.OrganizationManagedRuleMetadata, context) - : undefined, - } as any; -}; +// de_DescribeRetentionConfigurationsResponse omitted. -/** - * deserializeAws_json1_1OrganizationConfigRuleDetailedStatus - */ -const de_OrganizationConfigRuleDetailedStatus = (output: any, context: __SerdeContext): MemberAccountStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MemberAccountStatus(entry, context); - }); - return retVal; -}; +// de_DiscoveredResourceIdentifierList omitted. /** - * deserializeAws_json1_1OrganizationConfigRules + * deserializeAws_json1_1Evaluation */ -const de_OrganizationConfigRules = (output: any, context: __SerdeContext): OrganizationConfigRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationConfigRule(entry, context); - }); - return retVal; +const de_Evaluation = (output: any, context: __SerdeContext): Evaluation => { + return take(output, { + Annotation: __expectString, + ComplianceResourceId: __expectString, + ComplianceResourceType: __expectString, + ComplianceType: __expectString, + OrderingTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1OrganizationConfigRuleStatus - */ -const de_OrganizationConfigRuleStatus = (output: any, context: __SerdeContext): OrganizationConfigRuleStatus => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - OrganizationConfigRuleName: __expectString(output.OrganizationConfigRuleName), - OrganizationRuleStatus: __expectString(output.OrganizationRuleStatus), - } as any; -}; +// de_EvaluationContext omitted. -/** - * deserializeAws_json1_1OrganizationConfigRuleStatuses - */ -const de_OrganizationConfigRuleStatuses = (output: any, context: __SerdeContext): OrganizationConfigRuleStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationConfigRuleStatus(entry, context); - }); - return retVal; -}; +// de_EvaluationModeConfiguration omitted. -/** - * deserializeAws_json1_1OrganizationConfigRuleTriggerTypeNoSNs - */ -const de_OrganizationConfigRuleTriggerTypeNoSNs = ( - output: any, - context: __SerdeContext -): (OrganizationConfigRuleTriggerTypeNoSN | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EvaluationModes omitted. /** - * deserializeAws_json1_1OrganizationConfigRuleTriggerTypes + * deserializeAws_json1_1EvaluationResult */ -const de_OrganizationConfigRuleTriggerTypes = ( - output: any, - context: __SerdeContext -): (OrganizationConfigRuleTriggerType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { + return take(output, { + Annotation: __expectString, + ComplianceType: __expectString, + ConfigRuleInvokedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationResultIdentifier: (_: any) => de_EvaluationResultIdentifier(_, context), + ResultRecordedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResultToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OrganizationConformancePack + * deserializeAws_json1_1EvaluationResultIdentifier */ -const de_OrganizationConformancePack = (output: any, context: __SerdeContext): OrganizationConformancePack => { - return { - ConformancePackInputParameters: - output.ConformancePackInputParameters != null - ? de_ConformancePackInputParameters(output.ConformancePackInputParameters, context) - : undefined, - DeliveryS3Bucket: __expectString(output.DeliveryS3Bucket), - DeliveryS3KeyPrefix: __expectString(output.DeliveryS3KeyPrefix), - ExcludedAccounts: - output.ExcludedAccounts != null ? de_ExcludedAccounts(output.ExcludedAccounts, context) : undefined, - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - OrganizationConformancePackArn: __expectString(output.OrganizationConformancePackArn), - OrganizationConformancePackName: __expectString(output.OrganizationConformancePackName), - } as any; +const de_EvaluationResultIdentifier = (output: any, context: __SerdeContext): EvaluationResultIdentifier => { + return take(output, { + EvaluationResultQualifier: _json, + OrderingTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceEvaluationId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1OrganizationConformancePackDetailedStatus - */ -const de_OrganizationConformancePackDetailedStatus = ( - output: any, - context: __SerdeContext -): OrganizationConformancePackDetailedStatus => { - return { - AccountId: __expectString(output.AccountId), - ConformancePackName: __expectString(output.ConformancePackName), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - Status: __expectString(output.Status), - } as any; -}; +// de_EvaluationResultQualifier omitted. /** - * deserializeAws_json1_1OrganizationConformancePackDetailedStatuses + * deserializeAws_json1_1EvaluationResults */ -const de_OrganizationConformancePackDetailedStatuses = ( - output: any, - context: __SerdeContext -): OrganizationConformancePackDetailedStatus[] => { +const de_EvaluationResults = (output: any, context: __SerdeContext): EvaluationResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationConformancePackDetailedStatus(entry, context); + return de_EvaluationResult(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1OrganizationConformancePacks + * deserializeAws_json1_1Evaluations */ -const de_OrganizationConformancePacks = (output: any, context: __SerdeContext): OrganizationConformancePack[] => { +const de_Evaluations = (output: any, context: __SerdeContext): Evaluation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationConformancePack(entry, context); + return de_Evaluation(entry, context); }); return retVal; }; +// de_EvaluationStatus omitted. + +// de_ExcludedAccounts omitted. + +// de_ExecutionControls omitted. + +// de_FailedDeleteRemediationExceptionsBatch omitted. + +// de_FailedDeleteRemediationExceptionsBatches omitted. + +// de_FailedRemediationBatch omitted. + +// de_FailedRemediationBatches omitted. + /** - * deserializeAws_json1_1OrganizationConformancePackStatus + * deserializeAws_json1_1FailedRemediationExceptionBatch */ -const de_OrganizationConformancePackStatus = ( - output: any, - context: __SerdeContext -): OrganizationConformancePackStatus => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - OrganizationConformancePackName: __expectString(output.OrganizationConformancePackName), - Status: __expectString(output.Status), - } as any; +const de_FailedRemediationExceptionBatch = (output: any, context: __SerdeContext): FailedRemediationExceptionBatch => { + return take(output, { + FailedItems: (_: any) => de_RemediationExceptions(_, context), + FailureMessage: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OrganizationConformancePackStatuses + * deserializeAws_json1_1FailedRemediationExceptionBatches */ -const de_OrganizationConformancePackStatuses = ( +const de_FailedRemediationExceptionBatches = ( output: any, context: __SerdeContext -): OrganizationConformancePackStatus[] => { +): FailedRemediationExceptionBatch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationConformancePackStatus(entry, context); + return de_FailedRemediationExceptionBatch(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OrganizationConformancePackTemplateValidationException - */ -const de_OrganizationConformancePackTemplateValidationException = ( - output: any, - context: __SerdeContext -): OrganizationConformancePackTemplateValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_FieldInfo omitted. + +// de_FieldInfoList omitted. /** - * deserializeAws_json1_1OrganizationCustomPolicyRuleMetadataNoPolicy + * deserializeAws_json1_1GetAggregateComplianceDetailsByConfigRuleResponse */ -const de_OrganizationCustomPolicyRuleMetadataNoPolicy = ( +const de_GetAggregateComplianceDetailsByConfigRuleResponse = ( output: any, context: __SerdeContext -): OrganizationCustomPolicyRuleMetadataNoPolicy => { - return { - DebugLogDeliveryAccounts: - output.DebugLogDeliveryAccounts != null - ? de_DebugLogDeliveryAccounts(output.DebugLogDeliveryAccounts, context) - : undefined, - Description: __expectString(output.Description), - InputParameters: __expectString(output.InputParameters), - MaximumExecutionFrequency: __expectString(output.MaximumExecutionFrequency), - OrganizationConfigRuleTriggerTypes: - output.OrganizationConfigRuleTriggerTypes != null - ? de_OrganizationConfigRuleTriggerTypeNoSNs(output.OrganizationConfigRuleTriggerTypes, context) - : undefined, - PolicyRuntime: __expectString(output.PolicyRuntime), - ResourceIdScope: __expectString(output.ResourceIdScope), - ResourceTypesScope: - output.ResourceTypesScope != null ? de_ResourceTypesScope(output.ResourceTypesScope, context) : undefined, - TagKeyScope: __expectString(output.TagKeyScope), - TagValueScope: __expectString(output.TagValueScope), - } as any; -}; - -/** - * deserializeAws_json1_1OrganizationCustomRuleMetadata - */ -const de_OrganizationCustomRuleMetadata = (output: any, context: __SerdeContext): OrganizationCustomRuleMetadata => { - return { - Description: __expectString(output.Description), - InputParameters: __expectString(output.InputParameters), - LambdaFunctionArn: __expectString(output.LambdaFunctionArn), - MaximumExecutionFrequency: __expectString(output.MaximumExecutionFrequency), - OrganizationConfigRuleTriggerTypes: - output.OrganizationConfigRuleTriggerTypes != null - ? de_OrganizationConfigRuleTriggerTypes(output.OrganizationConfigRuleTriggerTypes, context) - : undefined, - ResourceIdScope: __expectString(output.ResourceIdScope), - ResourceTypesScope: - output.ResourceTypesScope != null ? de_ResourceTypesScope(output.ResourceTypesScope, context) : undefined, - TagKeyScope: __expectString(output.TagKeyScope), - TagValueScope: __expectString(output.TagValueScope), - } as any; -}; - -/** - * deserializeAws_json1_1OrganizationManagedRuleMetadata - */ -const de_OrganizationManagedRuleMetadata = (output: any, context: __SerdeContext): OrganizationManagedRuleMetadata => { - return { - Description: __expectString(output.Description), - InputParameters: __expectString(output.InputParameters), - MaximumExecutionFrequency: __expectString(output.MaximumExecutionFrequency), - ResourceIdScope: __expectString(output.ResourceIdScope), - ResourceTypesScope: - output.ResourceTypesScope != null ? de_ResourceTypesScope(output.ResourceTypesScope, context) : undefined, - RuleIdentifier: __expectString(output.RuleIdentifier), - TagKeyScope: __expectString(output.TagKeyScope), - TagValueScope: __expectString(output.TagValueScope), - } as any; +): GetAggregateComplianceDetailsByConfigRuleResponse => { + return take(output, { + AggregateEvaluationResults: (_: any) => de_AggregateEvaluationResultList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OversizedConfigurationItemException + * deserializeAws_json1_1GetAggregateConfigRuleComplianceSummaryResponse */ -const de_OversizedConfigurationItemException = ( +const de_GetAggregateConfigRuleComplianceSummaryResponse = ( output: any, context: __SerdeContext -): OversizedConfigurationItemException => { - return { - message: __expectString(output.message), - } as any; +): GetAggregateConfigRuleComplianceSummaryResponse => { + return take(output, { + AggregateComplianceCounts: (_: any) => de_AggregateComplianceCountList(_, context), + GroupByKey: __expectString, + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PendingAggregationRequest - */ -const de_PendingAggregationRequest = (output: any, context: __SerdeContext): PendingAggregationRequest => { - return { - RequesterAccountId: __expectString(output.RequesterAccountId), - RequesterAwsRegion: __expectString(output.RequesterAwsRegion), - } as any; -}; +// de_GetAggregateConformancePackComplianceSummaryResponse omitted. -/** - * deserializeAws_json1_1PendingAggregationRequestList - */ -const de_PendingAggregationRequestList = (output: any, context: __SerdeContext): PendingAggregationRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PendingAggregationRequest(entry, context); - }); - return retVal; -}; +// de_GetAggregateDiscoveredResourceCountsResponse omitted. /** - * deserializeAws_json1_1PutAggregationAuthorizationResponse + * deserializeAws_json1_1GetAggregateResourceConfigResponse */ -const de_PutAggregationAuthorizationResponse = ( +const de_GetAggregateResourceConfigResponse = ( output: any, context: __SerdeContext -): PutAggregationAuthorizationResponse => { - return { - AggregationAuthorization: - output.AggregationAuthorization != null - ? de_AggregationAuthorization(output.AggregationAuthorization, context) - : undefined, - } as any; +): GetAggregateResourceConfigResponse => { + return take(output, { + ConfigurationItem: (_: any) => de_ConfigurationItem(_, context), + }) as any; }; /** - * deserializeAws_json1_1PutConfigurationAggregatorResponse + * deserializeAws_json1_1GetComplianceDetailsByConfigRuleResponse */ -const de_PutConfigurationAggregatorResponse = ( +const de_GetComplianceDetailsByConfigRuleResponse = ( output: any, context: __SerdeContext -): PutConfigurationAggregatorResponse => { - return { - ConfigurationAggregator: - output.ConfigurationAggregator != null - ? de_ConfigurationAggregator(output.ConfigurationAggregator, context) - : undefined, - } as any; +): GetComplianceDetailsByConfigRuleResponse => { + return take(output, { + EvaluationResults: (_: any) => de_EvaluationResults(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutConformancePackResponse + * deserializeAws_json1_1GetComplianceDetailsByResourceResponse */ -const de_PutConformancePackResponse = (output: any, context: __SerdeContext): PutConformancePackResponse => { - return { - ConformancePackArn: __expectString(output.ConformancePackArn), - } as any; +const de_GetComplianceDetailsByResourceResponse = ( + output: any, + context: __SerdeContext +): GetComplianceDetailsByResourceResponse => { + return take(output, { + EvaluationResults: (_: any) => de_EvaluationResults(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutEvaluationsResponse + * deserializeAws_json1_1GetComplianceSummaryByConfigRuleResponse */ -const de_PutEvaluationsResponse = (output: any, context: __SerdeContext): PutEvaluationsResponse => { - return { - FailedEvaluations: output.FailedEvaluations != null ? de_Evaluations(output.FailedEvaluations, context) : undefined, - } as any; +const de_GetComplianceSummaryByConfigRuleResponse = ( + output: any, + context: __SerdeContext +): GetComplianceSummaryByConfigRuleResponse => { + return take(output, { + ComplianceSummary: (_: any) => de_ComplianceSummary(_, context), + }) as any; }; /** - * deserializeAws_json1_1PutExternalEvaluationResponse + * deserializeAws_json1_1GetComplianceSummaryByResourceTypeResponse */ -const de_PutExternalEvaluationResponse = (output: any, context: __SerdeContext): PutExternalEvaluationResponse => { - return {} as any; +const de_GetComplianceSummaryByResourceTypeResponse = ( + output: any, + context: __SerdeContext +): GetComplianceSummaryByResourceTypeResponse => { + return take(output, { + ComplianceSummariesByResourceType: (_: any) => de_ComplianceSummariesByResourceType(_, context), + }) as any; }; /** - * deserializeAws_json1_1PutOrganizationConfigRuleResponse + * deserializeAws_json1_1GetConformancePackComplianceDetailsResponse */ -const de_PutOrganizationConfigRuleResponse = ( +const de_GetConformancePackComplianceDetailsResponse = ( output: any, context: __SerdeContext -): PutOrganizationConfigRuleResponse => { - return { - OrganizationConfigRuleArn: __expectString(output.OrganizationConfigRuleArn), - } as any; +): GetConformancePackComplianceDetailsResponse => { + return take(output, { + ConformancePackName: __expectString, + ConformancePackRuleEvaluationResults: (_: any) => de_ConformancePackRuleEvaluationResultsList(_, context), + NextToken: __expectString, + }) as any; }; +// de_GetConformancePackComplianceSummaryResponse omitted. + +// de_GetCustomRulePolicyResponse omitted. + +// de_GetDiscoveredResourceCountsResponse omitted. + /** - * deserializeAws_json1_1PutOrganizationConformancePackResponse + * deserializeAws_json1_1GetOrganizationConfigRuleDetailedStatusResponse */ -const de_PutOrganizationConformancePackResponse = ( +const de_GetOrganizationConfigRuleDetailedStatusResponse = ( output: any, context: __SerdeContext -): PutOrganizationConformancePackResponse => { - return { - OrganizationConformancePackArn: __expectString(output.OrganizationConformancePackArn), - } as any; +): GetOrganizationConfigRuleDetailedStatusResponse => { + return take(output, { + NextToken: __expectString, + OrganizationConfigRuleDetailedStatus: (_: any) => de_OrganizationConfigRuleDetailedStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1PutRemediationConfigurationsResponse + * deserializeAws_json1_1GetOrganizationConformancePackDetailedStatusResponse */ -const de_PutRemediationConfigurationsResponse = ( +const de_GetOrganizationConformancePackDetailedStatusResponse = ( output: any, context: __SerdeContext -): PutRemediationConfigurationsResponse => { - return { - FailedBatches: - output.FailedBatches != null ? de_FailedRemediationBatches(output.FailedBatches, context) : undefined, - } as any; +): GetOrganizationConformancePackDetailedStatusResponse => { + return take(output, { + NextToken: __expectString, + OrganizationConformancePackDetailedStatuses: (_: any) => de_OrganizationConformancePackDetailedStatuses(_, context), + }) as any; }; +// de_GetOrganizationCustomRulePolicyResponse omitted. + /** - * deserializeAws_json1_1PutRemediationExceptionsResponse + * deserializeAws_json1_1GetResourceConfigHistoryResponse */ -const de_PutRemediationExceptionsResponse = ( +const de_GetResourceConfigHistoryResponse = ( output: any, context: __SerdeContext -): PutRemediationExceptionsResponse => { - return { - FailedBatches: - output.FailedBatches != null ? de_FailedRemediationExceptionBatches(output.FailedBatches, context) : undefined, - } as any; +): GetResourceConfigHistoryResponse => { + return take(output, { + configurationItems: (_: any) => de_ConfigurationItemList(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutRetentionConfigurationResponse + * deserializeAws_json1_1GetResourceEvaluationSummaryResponse */ -const de_PutRetentionConfigurationResponse = ( +const de_GetResourceEvaluationSummaryResponse = ( output: any, context: __SerdeContext -): PutRetentionConfigurationResponse => { - return { - RetentionConfiguration: - output.RetentionConfiguration != null - ? de_RetentionConfiguration(output.RetentionConfiguration, context) - : undefined, - } as any; +): GetResourceEvaluationSummaryResponse => { + return take(output, { + Compliance: __expectString, + EvaluationContext: _json, + EvaluationMode: __expectString, + EvaluationStartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationStatus: _json, + ResourceDetails: _json, + ResourceEvaluationId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PutStoredQueryResponse - */ -const de_PutStoredQueryResponse = (output: any, context: __SerdeContext): PutStoredQueryResponse => { - return { - QueryArn: __expectString(output.QueryArn), - } as any; -}; +// de_GetStoredQueryResponse omitted. -/** - * deserializeAws_json1_1QueryInfo - */ -const de_QueryInfo = (output: any, context: __SerdeContext): QueryInfo => { - return { - SelectFields: output.SelectFields != null ? de_FieldInfoList(output.SelectFields, context) : undefined, - } as any; -}; +// de_GroupedResourceCount omitted. -/** - * deserializeAws_json1_1RecordingGroup - */ -const de_RecordingGroup = (output: any, context: __SerdeContext): RecordingGroup => { - return { - allSupported: __expectBoolean(output.allSupported), - includeGlobalResourceTypes: __expectBoolean(output.includeGlobalResourceTypes), - resourceTypes: output.resourceTypes != null ? de_ResourceTypeList(output.resourceTypes, context) : undefined, - } as any; -}; +// de_GroupedResourceCountList omitted. -/** - * deserializeAws_json1_1RelatedEventList - */ -const de_RelatedEventList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IdempotentParameterMismatch omitted. -/** - * deserializeAws_json1_1Relationship - */ -const de_Relationship = (output: any, context: __SerdeContext): Relationship => { - return { - relationshipName: __expectString(output.relationshipName), - resourceId: __expectString(output.resourceId), - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_InsufficientDeliveryPolicyException omitted. -/** - * deserializeAws_json1_1RelationshipList - */ -const de_RelationshipList = (output: any, context: __SerdeContext): Relationship[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Relationship(entry, context); - }); - return retVal; -}; +// de_InsufficientPermissionsException omitted. -/** - * deserializeAws_json1_1RemediationConfiguration - */ -const de_RemediationConfiguration = (output: any, context: __SerdeContext): RemediationConfiguration => { - return { - Arn: __expectString(output.Arn), - Automatic: __expectBoolean(output.Automatic), - ConfigRuleName: __expectString(output.ConfigRuleName), - CreatedByService: __expectString(output.CreatedByService), - ExecutionControls: - output.ExecutionControls != null ? de_ExecutionControls(output.ExecutionControls, context) : undefined, - MaximumAutomaticAttempts: __expectInt32(output.MaximumAutomaticAttempts), - Parameters: output.Parameters != null ? de_RemediationParameters(output.Parameters, context) : undefined, - ResourceType: __expectString(output.ResourceType), - RetryAttemptSeconds: __expectLong(output.RetryAttemptSeconds), - TargetId: __expectString(output.TargetId), - TargetType: __expectString(output.TargetType), - TargetVersion: __expectString(output.TargetVersion), - } as any; -}; - -/** - * deserializeAws_json1_1RemediationConfigurations - */ -const de_RemediationConfigurations = (output: any, context: __SerdeContext): RemediationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemediationConfiguration(entry, context); - }); - return retVal; -}; +// de_InvalidConfigurationRecorderNameException omitted. -/** - * deserializeAws_json1_1RemediationException - */ -const de_RemediationException = (output: any, context: __SerdeContext): RemediationException => { - return { - ConfigRuleName: __expectString(output.ConfigRuleName), - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - Message: __expectString(output.Message), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_InvalidDeliveryChannelNameException omitted. -/** - * deserializeAws_json1_1RemediationExceptionResourceKey - */ -const de_RemediationExceptionResourceKey = (output: any, context: __SerdeContext): RemediationExceptionResourceKey => { - return { - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_InvalidExpressionException omitted. + +// de_InvalidLimitException omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidParameterValueException omitted. + +// de_InvalidRecordingGroupException omitted. + +// de_InvalidResultTokenException omitted. + +// de_InvalidRoleException omitted. + +// de_InvalidS3KeyPrefixException omitted. + +// de_InvalidS3KmsKeyArnException omitted. + +// de_InvalidSNSTopicARNException omitted. + +// de_InvalidTimeRangeException omitted. + +// de_LastDeliveryChannelDeleteFailedException omitted. + +// de_LimitExceededException omitted. + +// de_ListAggregateDiscoveredResourcesResponse omitted. /** - * deserializeAws_json1_1RemediationExceptionResourceKeys + * deserializeAws_json1_1ListConformancePackComplianceScoresResponse */ -const de_RemediationExceptionResourceKeys = ( +const de_ListConformancePackComplianceScoresResponse = ( output: any, context: __SerdeContext -): RemediationExceptionResourceKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemediationExceptionResourceKey(entry, context); - }); - return retVal; +): ListConformancePackComplianceScoresResponse => { + return take(output, { + ConformancePackComplianceScores: (_: any) => de_ConformancePackComplianceScores(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RemediationExceptions + * deserializeAws_json1_1ListDiscoveredResourcesResponse */ -const de_RemediationExceptions = (output: any, context: __SerdeContext): RemediationException[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemediationException(entry, context); - }); - return retVal; +const de_ListDiscoveredResourcesResponse = (output: any, context: __SerdeContext): ListDiscoveredResourcesResponse => { + return take(output, { + nextToken: __expectString, + resourceIdentifiers: (_: any) => de_ResourceIdentifierList(_, context), + }) as any; }; /** - * deserializeAws_json1_1RemediationExecutionStatus + * deserializeAws_json1_1ListResourceEvaluationsResponse */ -const de_RemediationExecutionStatus = (output: any, context: __SerdeContext): RemediationExecutionStatus => { - return { - InvocationTime: - output.InvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InvocationTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - ResourceKey: output.ResourceKey != null ? de_ResourceKey(output.ResourceKey, context) : undefined, - State: __expectString(output.State), - StepDetails: output.StepDetails != null ? de_RemediationExecutionSteps(output.StepDetails, context) : undefined, - } as any; +const de_ListResourceEvaluationsResponse = (output: any, context: __SerdeContext): ListResourceEvaluationsResponse => { + return take(output, { + NextToken: __expectString, + ResourceEvaluations: (_: any) => de_ResourceEvaluations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RemediationExecutionStatuses - */ -const de_RemediationExecutionStatuses = (output: any, context: __SerdeContext): RemediationExecutionStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemediationExecutionStatus(entry, context); - }); - return retVal; -}; +// de_ListStoredQueriesResponse omitted. -/** - * deserializeAws_json1_1RemediationExecutionStep - */ -const de_RemediationExecutionStep = (output: any, context: __SerdeContext): RemediationExecutionStep => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - Name: __expectString(output.Name), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - StopTime: - output.StopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StopTime))) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1RemediationExecutionSteps - */ -const de_RemediationExecutionSteps = (output: any, context: __SerdeContext): RemediationExecutionStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemediationExecutionStep(entry, context); - }); - return retVal; -}; +// de_MaxActiveResourcesExceededException omitted. -/** - * deserializeAws_json1_1RemediationInProgressException - */ -const de_RemediationInProgressException = (output: any, context: __SerdeContext): RemediationInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MaxNumberOfConfigRulesExceededException omitted. + +// de_MaxNumberOfConfigurationRecordersExceededException omitted. + +// de_MaxNumberOfConformancePacksExceededException omitted. + +// de_MaxNumberOfDeliveryChannelsExceededException omitted. + +// de_MaxNumberOfOrganizationConfigRulesExceededException omitted. + +// de_MaxNumberOfOrganizationConformancePacksExceededException omitted. + +// de_MaxNumberOfRetentionConfigurationsExceededException omitted. /** - * deserializeAws_json1_1RemediationParameters + * deserializeAws_json1_1MemberAccountStatus */ -const de_RemediationParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_RemediationParameterValue(value, context); - return acc; - }, - {} - ); +const de_MemberAccountStatus = (output: any, context: __SerdeContext): MemberAccountStatus => { + return take(output, { + AccountId: __expectString, + ConfigRuleName: __expectString, + ErrorCode: __expectString, + ErrorMessage: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MemberAccountRuleStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RemediationParameterValue - */ -const de_RemediationParameterValue = (output: any, context: __SerdeContext): RemediationParameterValue => { - return { - ResourceValue: output.ResourceValue != null ? de_ResourceValue(output.ResourceValue, context) : undefined, - StaticValue: output.StaticValue != null ? de_StaticValue(output.StaticValue, context) : undefined, - } as any; -}; +// de_NoAvailableConfigurationRecorderException omitted. + +// de_NoAvailableDeliveryChannelException omitted. + +// de_NoAvailableOrganizationException omitted. + +// de_NoRunningConfigurationRecorderException omitted. + +// de_NoSuchBucketException omitted. + +// de_NoSuchConfigRuleException omitted. + +// de_NoSuchConfigRuleInConformancePackException omitted. + +// de_NoSuchConfigurationAggregatorException omitted. + +// de_NoSuchConfigurationRecorderException omitted. + +// de_NoSuchConformancePackException omitted. + +// de_NoSuchDeliveryChannelException omitted. + +// de_NoSuchOrganizationConfigRuleException omitted. + +// de_NoSuchOrganizationConformancePackException omitted. + +// de_NoSuchRemediationConfigurationException omitted. + +// de_NoSuchRemediationExceptionException omitted. -/** - * deserializeAws_json1_1ResourceConcurrentModificationException - */ -const de_ResourceConcurrentModificationException = ( - output: any, - context: __SerdeContext -): ResourceConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_NoSuchRetentionConfigurationException omitted. -/** - * deserializeAws_json1_1ResourceCount - */ -const de_ResourceCount = (output: any, context: __SerdeContext): ResourceCount => { - return { - count: __expectLong(output.count), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_OrganizationAccessDeniedException omitted. -/** - * deserializeAws_json1_1ResourceCounts - */ -const de_ResourceCounts = (output: any, context: __SerdeContext): ResourceCount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceCount(entry, context); - }); - return retVal; -}; +// de_OrganizationAggregationSource omitted. -/** - * deserializeAws_json1_1ResourceDetails - */ -const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - ResourceConfiguration: __expectString(output.ResourceConfiguration), - ResourceConfigurationSchemaType: __expectString(output.ResourceConfigurationSchemaType), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_OrganizationAllFeaturesNotEnabledException omitted. /** - * deserializeAws_json1_1ResourceEvaluation + * deserializeAws_json1_1OrganizationConfigRule */ -const de_ResourceEvaluation = (output: any, context: __SerdeContext): ResourceEvaluation => { - return { - EvaluationMode: __expectString(output.EvaluationMode), - EvaluationStartTimestamp: - output.EvaluationStartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationStartTimestamp))) - : undefined, - ResourceEvaluationId: __expectString(output.ResourceEvaluationId), - } as any; +const de_OrganizationConfigRule = (output: any, context: __SerdeContext): OrganizationConfigRule => { + return take(output, { + ExcludedAccounts: _json, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrganizationConfigRuleArn: __expectString, + OrganizationConfigRuleName: __expectString, + OrganizationCustomPolicyRuleMetadata: _json, + OrganizationCustomRuleMetadata: _json, + OrganizationManagedRuleMetadata: _json, + }) as any; }; /** - * deserializeAws_json1_1ResourceEvaluations + * deserializeAws_json1_1OrganizationConfigRuleDetailedStatus */ -const de_ResourceEvaluations = (output: any, context: __SerdeContext): ResourceEvaluation[] => { +const de_OrganizationConfigRuleDetailedStatus = (output: any, context: __SerdeContext): MemberAccountStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceEvaluation(entry, context); + return de_MemberAccountStatus(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceIdentifier - */ -const de_ResourceIdentifier = (output: any, context: __SerdeContext): ResourceIdentifier => { - return { - resourceDeletionTime: - output.resourceDeletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resourceDeletionTime))) - : undefined, - resourceId: __expectString(output.resourceId), - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceIdentifierList + * deserializeAws_json1_1OrganizationConfigRules */ -const de_ResourceIdentifierList = (output: any, context: __SerdeContext): ResourceIdentifier[] => { +const de_OrganizationConfigRules = (output: any, context: __SerdeContext): OrganizationConfigRule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceIdentifier(entry, context); + return de_OrganizationConfigRule(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceKey + * deserializeAws_json1_1OrganizationConfigRuleStatus */ -const de_ResourceKey = (output: any, context: __SerdeContext): ResourceKey => { - return { - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - } as any; +const de_OrganizationConfigRuleStatus = (output: any, context: __SerdeContext): OrganizationConfigRuleStatus => { + return take(output, { + ErrorCode: __expectString, + ErrorMessage: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrganizationConfigRuleName: __expectString, + OrganizationRuleStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceKeys + * deserializeAws_json1_1OrganizationConfigRuleStatuses */ -const de_ResourceKeys = (output: any, context: __SerdeContext): ResourceKey[] => { +const de_OrganizationConfigRuleStatuses = (output: any, context: __SerdeContext): OrganizationConfigRuleStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceKey(entry, context); + return de_OrganizationConfigRuleStatus(entry, context); }); return retVal; }; +// de_OrganizationConfigRuleTriggerTypeNoSNs omitted. + +// de_OrganizationConfigRuleTriggerTypes omitted. + /** - * deserializeAws_json1_1ResourceNotDiscoveredException + * deserializeAws_json1_1OrganizationConformancePack */ -const de_ResourceNotDiscoveredException = (output: any, context: __SerdeContext): ResourceNotDiscoveredException => { - return { - message: __expectString(output.message), - } as any; +const de_OrganizationConformancePack = (output: any, context: __SerdeContext): OrganizationConformancePack => { + return take(output, { + ConformancePackInputParameters: _json, + DeliveryS3Bucket: __expectString, + DeliveryS3KeyPrefix: __expectString, + ExcludedAccounts: _json, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrganizationConformancePackArn: __expectString, + OrganizationConformancePackName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1OrganizationConformancePackDetailedStatus */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_OrganizationConformancePackDetailedStatus = ( + output: any, + context: __SerdeContext +): OrganizationConformancePackDetailedStatus => { + return take(output, { + AccountId: __expectString, + ConformancePackName: __expectString, + ErrorCode: __expectString, + ErrorMessage: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceTypeList + * deserializeAws_json1_1OrganizationConformancePackDetailedStatuses */ -const de_ResourceTypeList = (output: any, context: __SerdeContext): (ResourceType | string)[] => { +const de_OrganizationConformancePackDetailedStatuses = ( + output: any, + context: __SerdeContext +): OrganizationConformancePackDetailedStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_OrganizationConformancePackDetailedStatus(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceTypesScope + * deserializeAws_json1_1OrganizationConformancePacks */ -const de_ResourceTypesScope = (output: any, context: __SerdeContext): string[] => { +const de_OrganizationConformancePacks = (output: any, context: __SerdeContext): OrganizationConformancePack[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_OrganizationConformancePack(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceValue + * deserializeAws_json1_1OrganizationConformancePackStatus */ -const de_ResourceValue = (output: any, context: __SerdeContext): ResourceValue => { - return { - Value: __expectString(output.Value), - } as any; +const de_OrganizationConformancePackStatus = ( + output: any, + context: __SerdeContext +): OrganizationConformancePackStatus => { + return take(output, { + ErrorCode: __expectString, + ErrorMessage: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrganizationConformancePackName: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Results + * deserializeAws_json1_1OrganizationConformancePackStatuses */ -const de_Results = (output: any, context: __SerdeContext): string[] => { +const de_OrganizationConformancePackStatuses = ( + output: any, + context: __SerdeContext +): OrganizationConformancePackStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_OrganizationConformancePackStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RetentionConfiguration - */ -const de_RetentionConfiguration = (output: any, context: __SerdeContext): RetentionConfiguration => { - return { - Name: __expectString(output.Name), - RetentionPeriodInDays: __expectInt32(output.RetentionPeriodInDays), - } as any; -}; +// de_OrganizationConformancePackTemplateValidationException omitted. -/** - * deserializeAws_json1_1RetentionConfigurationList - */ -const de_RetentionConfigurationList = (output: any, context: __SerdeContext): RetentionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RetentionConfiguration(entry, context); - }); - return retVal; -}; +// de_OrganizationCustomPolicyRuleMetadataNoPolicy omitted. -/** - * deserializeAws_json1_1Scope - */ -const de_Scope = (output: any, context: __SerdeContext): Scope => { - return { - ComplianceResourceId: __expectString(output.ComplianceResourceId), - ComplianceResourceTypes: - output.ComplianceResourceTypes != null - ? de_ComplianceResourceTypes(output.ComplianceResourceTypes, context) - : undefined, - TagKey: __expectString(output.TagKey), - TagValue: __expectString(output.TagValue), - } as any; -}; +// de_OrganizationCustomRuleMetadata omitted. + +// de_OrganizationManagedRuleMetadata omitted. + +// de_OversizedConfigurationItemException omitted. + +// de_PendingAggregationRequest omitted. + +// de_PendingAggregationRequestList omitted. /** - * deserializeAws_json1_1SelectAggregateResourceConfigResponse + * deserializeAws_json1_1PutAggregationAuthorizationResponse */ -const de_SelectAggregateResourceConfigResponse = ( +const de_PutAggregationAuthorizationResponse = ( output: any, context: __SerdeContext -): SelectAggregateResourceConfigResponse => { - return { - NextToken: __expectString(output.NextToken), - QueryInfo: output.QueryInfo != null ? de_QueryInfo(output.QueryInfo, context) : undefined, - Results: output.Results != null ? de_Results(output.Results, context) : undefined, - } as any; +): PutAggregationAuthorizationResponse => { + return take(output, { + AggregationAuthorization: (_: any) => de_AggregationAuthorization(_, context), + }) as any; }; /** - * deserializeAws_json1_1SelectResourceConfigResponse + * deserializeAws_json1_1PutConfigurationAggregatorResponse */ -const de_SelectResourceConfigResponse = (output: any, context: __SerdeContext): SelectResourceConfigResponse => { - return { - NextToken: __expectString(output.NextToken), - QueryInfo: output.QueryInfo != null ? de_QueryInfo(output.QueryInfo, context) : undefined, - Results: output.Results != null ? de_Results(output.Results, context) : undefined, - } as any; +const de_PutConfigurationAggregatorResponse = ( + output: any, + context: __SerdeContext +): PutConfigurationAggregatorResponse => { + return take(output, { + ConfigurationAggregator: (_: any) => de_ConfigurationAggregator(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - CustomPolicyDetails: - output.CustomPolicyDetails != null ? de_CustomPolicyDetails(output.CustomPolicyDetails, context) : undefined, - Owner: __expectString(output.Owner), - SourceDetails: output.SourceDetails != null ? de_SourceDetails(output.SourceDetails, context) : undefined, - SourceIdentifier: __expectString(output.SourceIdentifier), - } as any; -}; +// de_PutConformancePackResponse omitted. /** - * deserializeAws_json1_1SourceDetail + * deserializeAws_json1_1PutEvaluationsResponse */ -const de_SourceDetail = (output: any, context: __SerdeContext): SourceDetail => { - return { - EventSource: __expectString(output.EventSource), - MaximumExecutionFrequency: __expectString(output.MaximumExecutionFrequency), - MessageType: __expectString(output.MessageType), - } as any; +const de_PutEvaluationsResponse = (output: any, context: __SerdeContext): PutEvaluationsResponse => { + return take(output, { + FailedEvaluations: (_: any) => de_Evaluations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SourceDetails - */ -const de_SourceDetails = (output: any, context: __SerdeContext): SourceDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceDetail(entry, context); - }); - return retVal; -}; +// de_PutExternalEvaluationResponse omitted. -/** - * deserializeAws_json1_1SsmControls - */ -const de_SsmControls = (output: any, context: __SerdeContext): SsmControls => { - return { - ConcurrentExecutionRatePercentage: __expectInt32(output.ConcurrentExecutionRatePercentage), - ErrorPercentage: __expectInt32(output.ErrorPercentage), - } as any; -}; +// de_PutOrganizationConfigRuleResponse omitted. -/** - * deserializeAws_json1_1StartConfigRulesEvaluationResponse - */ -const de_StartConfigRulesEvaluationResponse = ( - output: any, - context: __SerdeContext -): StartConfigRulesEvaluationResponse => { - return {} as any; -}; +// de_PutOrganizationConformancePackResponse omitted. + +// de_PutRemediationConfigurationsResponse omitted. /** - * deserializeAws_json1_1StartRemediationExecutionResponse + * deserializeAws_json1_1PutRemediationExceptionsResponse */ -const de_StartRemediationExecutionResponse = ( +const de_PutRemediationExceptionsResponse = ( output: any, context: __SerdeContext -): StartRemediationExecutionResponse => { - return { - FailedItems: output.FailedItems != null ? de_ResourceKeys(output.FailedItems, context) : undefined, - FailureMessage: __expectString(output.FailureMessage), - } as any; +): PutRemediationExceptionsResponse => { + return take(output, { + FailedBatches: (_: any) => de_FailedRemediationExceptionBatches(_, context), + }) as any; }; +// de_PutRetentionConfigurationResponse omitted. + +// de_PutStoredQueryResponse omitted. + +// de_QueryInfo omitted. + +// de_RecordingGroup omitted. + +// de_RelatedEventList omitted. + +// de_Relationship omitted. + +// de_RelationshipList omitted. + +// de_RemediationConfiguration omitted. + +// de_RemediationConfigurations omitted. + /** - * deserializeAws_json1_1StartResourceEvaluationResponse + * deserializeAws_json1_1RemediationException */ -const de_StartResourceEvaluationResponse = (output: any, context: __SerdeContext): StartResourceEvaluationResponse => { - return { - ResourceEvaluationId: __expectString(output.ResourceEvaluationId), - } as any; +const de_RemediationException = (output: any, context: __SerdeContext): RemediationException => { + return take(output, { + ConfigRuleName: __expectString, + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }) as any; }; +// de_RemediationExceptionResourceKey omitted. + +// de_RemediationExceptionResourceKeys omitted. + /** - * deserializeAws_json1_1StaticParameterValues + * deserializeAws_json1_1RemediationExceptions */ -const de_StaticParameterValues = (output: any, context: __SerdeContext): string[] => { +const de_RemediationExceptions = (output: any, context: __SerdeContext): RemediationException[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_RemediationException(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1StaticValue + * deserializeAws_json1_1RemediationExecutionStatus */ -const de_StaticValue = (output: any, context: __SerdeContext): StaticValue => { - return { - Values: output.Values != null ? de_StaticParameterValues(output.Values, context) : undefined, - } as any; +const de_RemediationExecutionStatus = (output: any, context: __SerdeContext): RemediationExecutionStatus => { + return take(output, { + InvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceKey: _json, + State: __expectString, + StepDetails: (_: any) => de_RemediationExecutionSteps(_, context), + }) as any; }; /** - * deserializeAws_json1_1StoredQuery + * deserializeAws_json1_1RemediationExecutionStatuses */ -const de_StoredQuery = (output: any, context: __SerdeContext): StoredQuery => { - return { - Description: __expectString(output.Description), - Expression: __expectString(output.Expression), - QueryArn: __expectString(output.QueryArn), - QueryId: __expectString(output.QueryId), - QueryName: __expectString(output.QueryName), - } as any; +const de_RemediationExecutionStatuses = (output: any, context: __SerdeContext): RemediationExecutionStatus[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_RemediationExecutionStatus(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1StoredQueryMetadata + * deserializeAws_json1_1RemediationExecutionStep */ -const de_StoredQueryMetadata = (output: any, context: __SerdeContext): StoredQueryMetadata => { - return { - Description: __expectString(output.Description), - QueryArn: __expectString(output.QueryArn), - QueryId: __expectString(output.QueryId), - QueryName: __expectString(output.QueryName), - } as any; +const de_RemediationExecutionStep = (output: any, context: __SerdeContext): RemediationExecutionStep => { + return take(output, { + ErrorMessage: __expectString, + Name: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StopTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1StoredQueryMetadataList + * deserializeAws_json1_1RemediationExecutionSteps */ -const de_StoredQueryMetadataList = (output: any, context: __SerdeContext): StoredQueryMetadata[] => { +const de_RemediationExecutionSteps = (output: any, context: __SerdeContext): RemediationExecutionStep[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StoredQueryMetadata(entry, context); + return de_RemediationExecutionStep(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SupplementaryConfiguration - */ -const de_SupplementaryConfiguration = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RemediationInProgressException omitted. + +// de_RemediationParameters omitted. + +// de_RemediationParameterValue omitted. + +// de_ResourceConcurrentModificationException omitted. + +// de_ResourceCount omitted. + +// de_ResourceCounts omitted. + +// de_ResourceDetails omitted. /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1ResourceEvaluation */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_ResourceEvaluation = (output: any, context: __SerdeContext): ResourceEvaluation => { + return take(output, { + EvaluationMode: __expectString, + EvaluationStartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceEvaluationId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1ResourceEvaluations */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_ResourceEvaluations = (output: any, context: __SerdeContext): ResourceEvaluation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_ResourceEvaluation(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1TemplateSSMDocumentDetails - */ -const de_TemplateSSMDocumentDetails = (output: any, context: __SerdeContext): TemplateSSMDocumentDetails => { - return { - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - } as any; -}; - -/** - * deserializeAws_json1_1TooManyTagsException + * deserializeAws_json1_1ResourceIdentifier */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; +const de_ResourceIdentifier = (output: any, context: __SerdeContext): ResourceIdentifier => { + return take(output, { + resourceDeletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceId: __expectString, + resourceName: __expectString, + resourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UnprocessedResourceIdentifierList + * deserializeAws_json1_1ResourceIdentifierList */ -const de_UnprocessedResourceIdentifierList = (output: any, context: __SerdeContext): AggregateResourceIdentifier[] => { +const de_ResourceIdentifierList = (output: any, context: __SerdeContext): ResourceIdentifier[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateResourceIdentifier(entry, context); + return de_ResourceIdentifier(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. + +// de_ResourceKey omitted. + +// de_ResourceKeys omitted. + +// de_ResourceNotDiscoveredException omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceTypeList omitted. + +// de_ResourceTypesScope omitted. + +// de_ResourceValue omitted. + +// de_Results omitted. + +// de_RetentionConfiguration omitted. + +// de_RetentionConfigurationList omitted. + +// de_Scope omitted. + +// de_SelectAggregateResourceConfigResponse omitted. + +// de_SelectResourceConfigResponse omitted. + +// de_Source omitted. + +// de_SourceDetail omitted. + +// de_SourceDetails omitted. + +// de_SsmControls omitted. + +// de_StartConfigRulesEvaluationResponse omitted. + +// de_StartRemediationExecutionResponse omitted. + +// de_StartResourceEvaluationResponse omitted. + +// de_StaticParameterValues omitted. + +// de_StaticValue omitted. + +// de_StoredQuery omitted. + +// de_StoredQueryMetadata omitted. + +// de_StoredQueryMetadataList omitted. + +// de_SupplementaryConfiguration omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_Tags omitted. + +// de_TemplateSSMDocumentDetails omitted. + +// de_TooManyTagsException omitted. + +// de_UnprocessedResourceIdentifierList omitted. + +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -13938,6 +9511,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-connect-contact-lens/src/protocols/Aws_restJson1.ts b/clients/client-connect-contact-lens/src/protocols/Aws_restJson1.ts index c1dfada21c0a..083c78cc38de 100644 --- a/clients/client-connect-contact-lens/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect-contact-lens/src/protocols/Aws_restJson1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -22,17 +23,10 @@ import { import { ConnectContactLensServiceException as __BaseException } from "../models/ConnectContactLensServiceException"; import { AccessDeniedException, - Categories, - CategoryDetails, - CharacterOffsets, InternalServiceException, InvalidRequestException, - IssueDetected, - PointOfInterest, - RealtimeContactAnalysisSegment, ResourceNotFoundException, ThrottlingException, - Transcript, } from "../models/models_0"; /** @@ -50,12 +44,14 @@ export const se_ListRealtimeContactAnalysisSegmentsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/realtime-contact-analysis/analysis-segments"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InstanceId: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -81,12 +77,11 @@ export const de_ListRealtimeContactAnalysisSegmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Segments != null) { - contents.Segments = de_RealtimeContactAnalysisSegments(data.Segments, context); - } + const doc = take(data, { + NextToken: __expectString, + Segments: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -120,16 +115,15 @@ const de_ListRealtimeContactAnalysisSegmentsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -139,9 +133,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -158,9 +153,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -177,9 +173,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -196,9 +193,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -212,9 +210,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -222,155 +221,29 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1Categories - */ -const de_Categories = (output: any, context: __SerdeContext): Categories => { - return { - MatchedCategories: - output.MatchedCategories != null ? de_MatchedCategories(output.MatchedCategories, context) : undefined, - MatchedDetails: output.MatchedDetails != null ? de_MatchedDetails(output.MatchedDetails, context) : undefined, - } as any; -}; +// de_Categories omitted. -/** - * deserializeAws_restJson1CategoryDetails - */ -const de_CategoryDetails = (output: any, context: __SerdeContext): CategoryDetails => { - return { - PointsOfInterest: - output.PointsOfInterest != null ? de_PointsOfInterest(output.PointsOfInterest, context) : undefined, - } as any; -}; +// de_CategoryDetails omitted. -/** - * deserializeAws_restJson1CharacterOffsets - */ -const de_CharacterOffsets = (output: any, context: __SerdeContext): CharacterOffsets => { - return { - BeginOffsetChar: __expectInt32(output.BeginOffsetChar), - EndOffsetChar: __expectInt32(output.EndOffsetChar), - } as any; -}; +// de_CharacterOffsets omitted. -/** - * deserializeAws_restJson1IssueDetected - */ -const de_IssueDetected = (output: any, context: __SerdeContext): IssueDetected => { - return { - CharacterOffsets: - output.CharacterOffsets != null ? de_CharacterOffsets(output.CharacterOffsets, context) : undefined, - } as any; -}; +// de_IssueDetected omitted. -/** - * deserializeAws_restJson1IssuesDetected - */ -const de_IssuesDetected = (output: any, context: __SerdeContext): IssueDetected[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IssueDetected(entry, context); - }); - return retVal; -}; +// de_IssuesDetected omitted. -/** - * deserializeAws_restJson1MatchedCategories - */ -const de_MatchedCategories = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MatchedCategories omitted. -/** - * deserializeAws_restJson1MatchedDetails - */ -const de_MatchedDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_CategoryDetails(value, context); - return acc; - }, {}); -}; +// de_MatchedDetails omitted. -/** - * deserializeAws_restJson1PointOfInterest - */ -const de_PointOfInterest = (output: any, context: __SerdeContext): PointOfInterest => { - return { - BeginOffsetMillis: __expectInt32(output.BeginOffsetMillis), - EndOffsetMillis: __expectInt32(output.EndOffsetMillis), - } as any; -}; +// de_PointOfInterest omitted. -/** - * deserializeAws_restJson1PointsOfInterest - */ -const de_PointsOfInterest = (output: any, context: __SerdeContext): PointOfInterest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PointOfInterest(entry, context); - }); - return retVal; -}; +// de_PointsOfInterest omitted. -/** - * deserializeAws_restJson1RealtimeContactAnalysisSegment - */ -const de_RealtimeContactAnalysisSegment = (output: any, context: __SerdeContext): RealtimeContactAnalysisSegment => { - return { - Categories: output.Categories != null ? de_Categories(output.Categories, context) : undefined, - Transcript: output.Transcript != null ? de_Transcript(output.Transcript, context) : undefined, - } as any; -}; +// de_RealtimeContactAnalysisSegment omitted. -/** - * deserializeAws_restJson1RealtimeContactAnalysisSegments - */ -const de_RealtimeContactAnalysisSegments = (output: any, context: __SerdeContext): RealtimeContactAnalysisSegment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RealtimeContactAnalysisSegment(entry, context); - }); - return retVal; -}; +// de_RealtimeContactAnalysisSegments omitted. -/** - * deserializeAws_restJson1Transcript - */ -const de_Transcript = (output: any, context: __SerdeContext): Transcript => { - return { - BeginOffsetMillis: __expectInt32(output.BeginOffsetMillis), - Content: __expectString(output.Content), - EndOffsetMillis: __expectInt32(output.EndOffsetMillis), - Id: __expectString(output.Id), - IssuesDetected: output.IssuesDetected != null ? de_IssuesDetected(output.IssuesDetected, context) : undefined, - ParticipantId: __expectString(output.ParticipantId), - ParticipantRole: __expectString(output.ParticipantRole), - Sentiment: __expectString(output.Sentiment), - } as any; -}; +// de_Transcript omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-connect/src/protocols/Aws_restJson1.ts b/clients/client-connect/src/protocols/Aws_restJson1.ts index 30853e9e588d..4e1d955d2345 100644 --- a/clients/client-connect/src/protocols/Aws_restJson1.ts +++ b/clients/client-connect/src/protocols/Aws_restJson1.ts @@ -1,22 +1,22 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -498,20 +498,13 @@ import { import { ConnectServiceException as __BaseException } from "../models/ConnectServiceException"; import { AccessDeniedException, - ActionSummary, AgentContactReference, AgentInfo, - AgentStatus, AgentStatusReference, - AgentStatusSummary, AssignContactCategoryActionDefinition, - Attribute, Channel, - ClaimedPhoneNumberSummary, Contact, ContactFilter, - ContactFlow, - ContactFlowModule, ContactFlowNotPublishedException, ContactState, Credentials, @@ -520,7 +513,6 @@ import { CurrentMetricData, CurrentMetricResult, CurrentMetricSortCriteria, - Dimensions, Distribution, DuplicateResourceException, EncryptionConfig, @@ -528,22 +520,13 @@ import { Filters, FilterV2, Grouping, - HierarchyGroup, - HierarchyGroupSummary, - HierarchyGroupSummaryReference, - HierarchyLevel, - HierarchyPath, - HierarchyPathReference, - HierarchyStructure, HistoricalMetric, HistoricalMetricData, HistoricalMetricResult, - HoursOfOperation, HoursOfOperationConfig, HoursOfOperationTimeSlice, IdempotencyException, Instance, - InstanceStatusReason, InstanceStorageConfig, InternalServiceException, InvalidContactFlowException, @@ -567,16 +550,10 @@ import { OutboundCallerConfig, PhoneNumberCountryCode, PhoneNumberQuickConnectConfig, - PhoneNumberStatus, PhoneNumberType, - ProblemDetail, PropertyValidationException, - PropertyValidationExceptionProperty, - Queue, QueueInfo, QueueQuickConnectConfig, - QueueReference, - QuickConnect, QuickConnectConfig, ReadOnlyFieldInfo, Reference, @@ -585,15 +562,12 @@ import { ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, - RoutingProfile, RoutingProfileQueueConfig, RoutingProfileQueueReference, - RoutingProfileReference, Rule, RuleAction, RuleTriggerEventSource, S3Config, - SecurityProfile, SendNotificationActionDefinition, ServiceQuotaExceededException, TaskActionDefinition, @@ -606,77 +580,45 @@ import { Threshold, ThresholdV2, ThrottlingException, - TrafficDistributionGroup, - User, UserData, UserDataFilters, UserIdentityInfo, UserNotFoundException, UserPhoneConfig, UserQuickConnectConfig, - UserReference, Vocabulary, - WisdomInfo, } from "../models/models_0"; import { AnswerMachineDetectionConfig, - AttachmentReference, - AvailableNumberSummary, ChatMessage, ChatParticipantRoleConfig, ChatStreamingConfiguration, - ContactFlowModuleSummary, - ContactFlowSummary, ContactNotFoundException, ControlPlaneTagFilter, - DateReference, - DefaultVocabulary, DestinationNotAllowedException, - EmailReference, HierarchyGroupCondition, HierarchyLevelUpdate, HierarchyStructureUpdate, - HoursOfOperationSummary, InstanceSummary, - IntegrationAssociationSummary, - LexBotConfig, - ListPhoneNumbersSummary, - NumberReference, OutboundContactNotPermittedException, ParticipantDetails, ParticipantTimerConfiguration, ParticipantTimerValue, PersistentChat, - PhoneNumberSummary, - PromptSummary, QueueSearchCriteria, QueueSearchFilter, - QueueSummary, - QuickConnectSummary, - ReferenceSummary, - RoutingProfileQueueConfigSummary, RoutingProfileSearchCriteria, RoutingProfileSearchFilter, - RoutingProfileSummary, RuleSummary, SecurityKey, SecurityProfileSearchCriteria, - SecurityProfileSearchSummary, SecurityProfilesSearchFilter, - SecurityProfileSummary, StringCondition, - StringReference, TagCondition, TaskTemplateMetadata, - TrafficDistributionGroupSummary, UpdateParticipantRoleConfigChannelInfo, - UrlReference, - UseCase, - UserIdentityInfoLite, UserSearchCriteria, UserSearchFilter, - UserSearchSummary, - UserSummary, VocabularySummary, VoiceRecordingConfiguration, } from "../models/models_1"; @@ -696,9 +638,11 @@ export const se_AssociateApprovedOriginCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/approved-origin"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Origin != null && { Origin: input.Origin }), - }); + body = JSON.stringify( + take(input, { + Origin: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -725,10 +669,12 @@ export const se_AssociateBotCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bot"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.LexBot != null && { LexBot: se_LexBot(input.LexBot, context) }), - ...(input.LexV2Bot != null && { LexV2Bot: se_LexV2Bot(input.LexV2Bot, context) }), - }); + body = JSON.stringify( + take(input, { + LexBot: (_) => _json(_), + LexV2Bot: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -764,9 +710,11 @@ export const se_AssociateDefaultVocabularyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.VocabularyId != null && { VocabularyId: input.VocabularyId }), - }); + body = JSON.stringify( + take(input, { + VocabularyId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -793,10 +741,12 @@ export const se_AssociateInstanceStorageConfigCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/storage-config"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.StorageConfig != null && { StorageConfig: se_InstanceStorageConfig(input.StorageConfig, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceType: [], + StorageConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -823,9 +773,11 @@ export const se_AssociateLambdaFunctionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lambda-function"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.FunctionArn != null && { FunctionArn: input.FunctionArn }), - }); + body = JSON.stringify( + take(input, { + FunctionArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -852,9 +804,11 @@ export const se_AssociateLexBotCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/lex-bot"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.LexBot != null && { LexBot: se_LexBot(input.LexBot, context) }), - }); + body = JSON.stringify( + take(input, { + LexBot: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -889,10 +843,12 @@ export const se_AssociatePhoneNumberContactFlowCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + ContactFlowId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -921,9 +877,11 @@ export const se_AssociateQueueQuickConnectsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.QuickConnectIds != null && { QuickConnectIds: se_QuickConnectsList(input.QuickConnectIds, context) }), - }); + body = JSON.stringify( + take(input, { + QuickConnectIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -959,9 +917,11 @@ export const se_AssociateRoutingProfileQueuesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.QueueConfigs != null && { QueueConfigs: se_RoutingProfileQueueConfigList(input.QueueConfigs, context) }), - }); + body = JSON.stringify( + take(input, { + QueueConfigs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -988,9 +948,11 @@ export const se_AssociateSecurityKeyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/security-key"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Key != null && { Key: input.Key }), - }); + body = JSON.stringify( + take(input, { + Key: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1015,13 +977,15 @@ export const se_ClaimPhoneNumberCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/claim"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.PhoneNumberDescription != null && { PhoneNumberDescription: input.PhoneNumberDescription }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + PhoneNumber: [], + PhoneNumberDescription: [], + Tags: (_) => _json(_), + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1048,13 +1012,15 @@ export const se_CreateAgentStatusCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agent-status/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayOrder != null && { DisplayOrder: input.DisplayOrder }), - ...(input.Name != null && { Name: input.Name }), - ...(input.State != null && { State: input.State }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + DisplayOrder: [], + Name: [], + State: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1081,13 +1047,15 @@ export const se_CreateContactFlowCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flows/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Content: [], + Description: [], + Name: [], + Tags: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1114,13 +1082,15 @@ export const se_CreateContactFlowModuleCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact-flow-modules/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Content: [], + Description: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1147,13 +1117,15 @@ export const se_CreateHoursOfOperationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/hours-of-operations/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Config != null && { Config: se_HoursOfOperationConfigList(input.Config, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TimeZone != null && { TimeZone: input.TimeZone }), - }); + body = JSON.stringify( + take(input, { + Config: (_) => _json(_), + Description: [], + Name: [], + Tags: (_) => _json(_), + TimeZone: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1178,14 +1150,16 @@ export const se_CreateInstanceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance"; let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.IdentityManagementType != null && { IdentityManagementType: input.IdentityManagementType }), - ...(input.InboundCallsEnabled != null && { InboundCallsEnabled: input.InboundCallsEnabled }), - ...(input.InstanceAlias != null && { InstanceAlias: input.InstanceAlias }), - ...(input.OutboundCallsEnabled != null && { OutboundCallsEnabled: input.OutboundCallsEnabled }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + DirectoryId: [], + IdentityManagementType: [], + InboundCallsEnabled: [], + InstanceAlias: [], + OutboundCallsEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1213,14 +1187,16 @@ export const se_CreateIntegrationAssociationCommand = async ( "/instance/{InstanceId}/integration-associations"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.IntegrationArn != null && { IntegrationArn: input.IntegrationArn }), - ...(input.IntegrationType != null && { IntegrationType: input.IntegrationType }), - ...(input.SourceApplicationName != null && { SourceApplicationName: input.SourceApplicationName }), - ...(input.SourceApplicationUrl != null && { SourceApplicationUrl: input.SourceApplicationUrl }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + IntegrationArn: [], + IntegrationType: [], + SourceApplicationName: [], + SourceApplicationUrl: [], + SourceType: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1246,17 +1222,17 @@ export const se_CreateQueueCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queues/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.HoursOfOperationId != null && { HoursOfOperationId: input.HoursOfOperationId }), - ...(input.MaxContacts != null && { MaxContacts: input.MaxContacts }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutboundCallerConfig != null && { - OutboundCallerConfig: se_OutboundCallerConfig(input.OutboundCallerConfig, context), - }), - ...(input.QuickConnectIds != null && { QuickConnectIds: se_QuickConnectsList(input.QuickConnectIds, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + HoursOfOperationId: [], + MaxContacts: [], + Name: [], + OutboundCallerConfig: (_) => _json(_), + QuickConnectIds: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1283,14 +1259,14 @@ export const se_CreateQuickConnectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/quick-connects/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QuickConnectConfig != null && { - QuickConnectConfig: se_QuickConnectConfig(input.QuickConnectConfig, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + QuickConnectConfig: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1317,16 +1293,16 @@ export const se_CreateRoutingProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routing-profiles/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.DefaultOutboundQueueId != null && { DefaultOutboundQueueId: input.DefaultOutboundQueueId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.MediaConcurrencies != null && { - MediaConcurrencies: se_MediaConcurrencies(input.MediaConcurrencies, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QueueConfigs != null && { QueueConfigs: se_RoutingProfileQueueConfigList(input.QueueConfigs, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DefaultOutboundQueueId: [], + Description: [], + MediaConcurrencies: (_) => _json(_), + Name: [], + QueueConfigs: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1352,16 +1328,16 @@ export const se_CreateRuleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Actions != null && { Actions: se_RuleActions(input.Actions, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Function != null && { Function: input.Function }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PublishStatus != null && { PublishStatus: input.PublishStatus }), - ...(input.TriggerEventSource != null && { - TriggerEventSource: se_RuleTriggerEventSource(input.TriggerEventSource, context), - }), - }); + body = JSON.stringify( + take(input, { + Actions: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Function: [], + Name: [], + PublishStatus: [], + TriggerEventSource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1388,18 +1364,16 @@ export const se_CreateSecurityProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/security-profiles/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.AllowedAccessControlTags != null && { - AllowedAccessControlTags: se_AllowedAccessControlTags(input.AllowedAccessControlTags, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Permissions != null && { Permissions: se_PermissionsList(input.Permissions, context) }), - ...(input.SecurityProfileName != null && { SecurityProfileName: input.SecurityProfileName }), - ...(input.TagRestrictedResources != null && { - TagRestrictedResources: se_TagRestrictedResourceList(input.TagRestrictedResources, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AllowedAccessControlTags: (_) => _json(_), + Description: [], + Permissions: (_) => _json(_), + SecurityProfileName: [], + TagRestrictedResources: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1426,16 +1400,18 @@ export const se_CreateTaskTemplateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/task/template"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Constraints != null && { Constraints: se_TaskTemplateConstraints(input.Constraints, context) }), - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.Defaults != null && { Defaults: se_TaskTemplateDefaults(input.Defaults, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Fields != null && { Fields: se_TaskTemplateFields(input.Fields, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Status != null && { Status: input.Status }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Constraints: (_) => _json(_), + ContactFlowId: [], + Defaults: (_) => _json(_), + Description: [], + Fields: (_) => _json(_), + Name: [], + Status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1461,13 +1437,15 @@ export const se_CreateTrafficDistributionGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution-group"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + InstanceId: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1503,10 +1481,12 @@ export const se_CreateUseCaseCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.UseCaseType != null && { UseCaseType: input.UseCaseType }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + UseCaseType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1532,19 +1512,19 @@ export const se_CreateUserCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.DirectoryUserId != null && { DirectoryUserId: input.DirectoryUserId }), - ...(input.HierarchyGroupId != null && { HierarchyGroupId: input.HierarchyGroupId }), - ...(input.IdentityInfo != null && { IdentityInfo: se_UserIdentityInfo(input.IdentityInfo, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.PhoneConfig != null && { PhoneConfig: se_UserPhoneConfig(input.PhoneConfig, context) }), - ...(input.RoutingProfileId != null && { RoutingProfileId: input.RoutingProfileId }), - ...(input.SecurityProfileIds != null && { - SecurityProfileIds: se_SecurityProfileIds(input.SecurityProfileIds, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + DirectoryUserId: [], + HierarchyGroupId: [], + IdentityInfo: (_) => _json(_), + Password: [], + PhoneConfig: (_) => _json(_), + RoutingProfileId: [], + SecurityProfileIds: (_) => _json(_), + Tags: (_) => _json(_), + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1571,11 +1551,13 @@ export const se_CreateUserHierarchyGroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-groups/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentGroupId != null && { ParentGroupId: input.ParentGroupId }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Name: [], + ParentGroupId: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1601,13 +1583,15 @@ export const se_CreateVocabularyCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Content: [], + LanguageCode: [], + Tags: (_) => _json(_), + VocabularyName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2674,10 +2658,12 @@ export const se_DisassociateBotCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/bot"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.LexBot != null && { LexBot: se_LexBot(input.LexBot, context) }), - ...(input.LexV2Bot != null && { LexV2Bot: se_LexV2Bot(input.LexV2Bot, context) }), - }); + body = JSON.stringify( + take(input, { + LexBot: (_) => _json(_), + LexV2Bot: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2836,9 +2822,11 @@ export const se_DisassociateQueueQuickConnectsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.QuickConnectIds != null && { QuickConnectIds: se_QuickConnectsList(input.QuickConnectIds, context) }), - }); + body = JSON.stringify( + take(input, { + QuickConnectIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2874,11 +2862,11 @@ export const se_DisassociateRoutingProfileQueuesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.QueueReferences != null && { - QueueReferences: se_RoutingProfileQueueReferenceList(input.QueueReferences, context), - }), - }); + body = JSON.stringify( + take(input, { + QueueReferences: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2939,9 +2927,11 @@ export const se_DismissUserContactCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3001,16 +2991,16 @@ export const se_GetCurrentMetricDataCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/current/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.CurrentMetrics != null && { CurrentMetrics: se_CurrentMetrics(input.CurrentMetrics, context) }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.Groupings != null && { Groupings: se_Groupings(input.Groupings, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { - SortCriteria: se_CurrentMetricSortCriteriaMaxOne(input.SortCriteria, context), - }), - }); + body = JSON.stringify( + take(input, { + CurrentMetrics: (_) => _json(_), + Filters: (_) => _json(_), + Groupings: (_) => _json(_), + MaxResults: [], + NextToken: [], + SortCriteria: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3037,11 +3027,13 @@ export const se_GetCurrentUserDataCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/userdata/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_UserDataFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3092,17 +3084,17 @@ export const se_GetMetricDataCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/historical/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.Groupings != null && { Groupings: se_Groupings(input.Groupings, context) }), - ...(input.HistoricalMetrics != null && { - HistoricalMetrics: se_HistoricalMetrics(input.HistoricalMetrics, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + Filters: (_) => _json(_), + Groupings: (_) => _json(_), + HistoricalMetrics: (_) => se_HistoricalMetrics(_, context), + MaxResults: [], + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3127,16 +3119,18 @@ export const se_GetMetricDataV2Command = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/data"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.Filters != null && { Filters: se_FiltersV2List(input.Filters, context) }), - ...(input.Groupings != null && { Groupings: se_GroupingsV2(input.Groupings, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Metrics != null && { Metrics: se_MetricsV2(input.Metrics, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + Filters: (_) => _json(_), + Groupings: (_) => _json(_), + MaxResults: [], + Metrics: (_) => se_MetricsV2(_, context), + NextToken: [], + ResourceArn: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3414,11 +3408,13 @@ export const se_ListDefaultVocabulariesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/default-vocabulary-summary/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + LanguageCode: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3684,16 +3680,16 @@ export const se_ListPhoneNumbersV2Command = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/list"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PhoneNumberCountryCodes != null && { - PhoneNumberCountryCodes: se_PhoneNumberCountryCodes(input.PhoneNumberCountryCodes, context), - }), - ...(input.PhoneNumberPrefix != null && { PhoneNumberPrefix: input.PhoneNumberPrefix }), - ...(input.PhoneNumberTypes != null && { PhoneNumberTypes: se_PhoneNumberTypes(input.PhoneNumberTypes, context) }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + PhoneNumberCountryCodes: (_) => _json(_), + PhoneNumberPrefix: [], + PhoneNumberTypes: (_) => _json(_), + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4214,15 +4210,15 @@ export const se_MonitorContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/monitor"; let body: any; - body = JSON.stringify({ - ...(input.AllowedMonitorCapabilities != null && { - AllowedMonitorCapabilities: se_AllowedMonitorCapabilities(input.AllowedMonitorCapabilities, context), - }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.UserId != null && { UserId: input.UserId }), - }); + body = JSON.stringify( + take(input, { + AllowedMonitorCapabilities: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContactId: [], + InstanceId: [], + UserId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4250,9 +4246,11 @@ export const se_PutUserStatusCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.AgentStatusId != null && { AgentStatusId: input.AgentStatusId }), - }); + body = JSON.stringify( + take(input, { + AgentStatusId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4314,11 +4312,13 @@ export const se_ReplicateInstanceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/{InstanceId}/replicate"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ReplicaAlias != null && { ReplicaAlias: input.ReplicaAlias }), - ...(input.ReplicaRegion != null && { ReplicaRegion: input.ReplicaRegion }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ReplicaAlias: [], + ReplicaRegion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4344,11 +4344,13 @@ export const se_ResumeContactRecordingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/resume-recording"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InitialContactId != null && { InitialContactId: input.InitialContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InitialContactId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4374,14 +4376,16 @@ export const se_SearchAvailablePhoneNumbersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/phone-number/search-available"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PhoneNumberCountryCode != null && { PhoneNumberCountryCode: input.PhoneNumberCountryCode }), - ...(input.PhoneNumberPrefix != null && { PhoneNumberPrefix: input.PhoneNumberPrefix }), - ...(input.PhoneNumberType != null && { PhoneNumberType: input.PhoneNumberType }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + PhoneNumberCountryCode: [], + PhoneNumberPrefix: [], + PhoneNumberType: [], + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4406,13 +4410,15 @@ export const se_SearchQueuesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-queues"; let body: any; - body = JSON.stringify({ - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SearchCriteria != null && { SearchCriteria: se_QueueSearchCriteria(input.SearchCriteria, context) }), - ...(input.SearchFilter != null && { SearchFilter: se_QueueSearchFilter(input.SearchFilter, context) }), - }); + body = JSON.stringify( + take(input, { + InstanceId: [], + MaxResults: [], + NextToken: [], + SearchCriteria: (_) => se_QueueSearchCriteria(_, context), + SearchFilter: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4438,15 +4444,15 @@ export const se_SearchRoutingProfilesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-routing-profiles"; let body: any; - body = JSON.stringify({ - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SearchCriteria != null && { - SearchCriteria: se_RoutingProfileSearchCriteria(input.SearchCriteria, context), - }), - ...(input.SearchFilter != null && { SearchFilter: se_RoutingProfileSearchFilter(input.SearchFilter, context) }), - }); + body = JSON.stringify( + take(input, { + InstanceId: [], + MaxResults: [], + NextToken: [], + SearchCriteria: (_) => se_RoutingProfileSearchCriteria(_, context), + SearchFilter: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4472,15 +4478,15 @@ export const se_SearchSecurityProfilesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-security-profiles"; let body: any; - body = JSON.stringify({ - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SearchCriteria != null && { - SearchCriteria: se_SecurityProfileSearchCriteria(input.SearchCriteria, context), - }), - ...(input.SearchFilter != null && { SearchFilter: se_SecurityProfilesSearchFilter(input.SearchFilter, context) }), - }); + body = JSON.stringify( + take(input, { + InstanceId: [], + MaxResults: [], + NextToken: [], + SearchCriteria: (_) => se_SecurityProfileSearchCriteria(_, context), + SearchFilter: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4505,13 +4511,15 @@ export const se_SearchUsersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-users"; let body: any; - body = JSON.stringify({ - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SearchCriteria != null && { SearchCriteria: se_UserSearchCriteria(input.SearchCriteria, context) }), - ...(input.SearchFilter != null && { SearchFilter: se_UserSearchFilter(input.SearchFilter, context) }), - }); + body = JSON.stringify( + take(input, { + InstanceId: [], + MaxResults: [], + NextToken: [], + SearchCriteria: (_) => se_UserSearchCriteria(_, context), + SearchFilter: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4538,13 +4546,15 @@ export const se_SearchVocabulariesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vocabulary-summary/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameStartsWith != null && { NameStartsWith: input.NameStartsWith }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.State != null && { State: input.State }), - }); + body = JSON.stringify( + take(input, { + LanguageCode: [], + MaxResults: [], + NameStartsWith: [], + NextToken: [], + State: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4569,22 +4579,20 @@ export const se_StartChatContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/chat"; let body: any; - body = JSON.stringify({ - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - ...(input.ChatDurationInMinutes != null && { ChatDurationInMinutes: input.ChatDurationInMinutes }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.InitialMessage != null && { InitialMessage: se_ChatMessage(input.InitialMessage, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ParticipantDetails != null && { - ParticipantDetails: se_ParticipantDetails(input.ParticipantDetails, context), - }), - ...(input.PersistentChat != null && { PersistentChat: se_PersistentChat(input.PersistentChat, context) }), - ...(input.RelatedContactId != null && { RelatedContactId: input.RelatedContactId }), - ...(input.SupportedMessagingContentTypes != null && { - SupportedMessagingContentTypes: se_SupportedMessagingContentTypes(input.SupportedMessagingContentTypes, context), - }), - }); + body = JSON.stringify( + take(input, { + Attributes: (_) => _json(_), + ChatDurationInMinutes: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContactFlowId: [], + InitialMessage: (_) => _json(_), + InstanceId: [], + ParticipantDetails: (_) => _json(_), + PersistentChat: (_) => _json(_), + RelatedContactId: [], + SupportedMessagingContentTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4610,14 +4618,14 @@ export const se_StartContactRecordingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-recording"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InitialContactId != null && { InitialContactId: input.InitialContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.VoiceRecordingConfiguration != null && { - VoiceRecordingConfiguration: se_VoiceRecordingConfiguration(input.VoiceRecordingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InitialContactId: [], + InstanceId: [], + VoiceRecordingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4643,14 +4651,14 @@ export const se_StartContactStreamingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/start-streaming"; let body: any; - body = JSON.stringify({ - ...(input.ChatStreamingConfiguration != null && { - ChatStreamingConfiguration: se_ChatStreamingConfiguration(input.ChatStreamingConfiguration, context), - }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + ChatStreamingConfiguration: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContactId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4676,20 +4684,20 @@ export const se_StartOutboundVoiceContactCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/outbound-voice"; let body: any; - body = JSON.stringify({ - ...(input.AnswerMachineDetectionConfig != null && { - AnswerMachineDetectionConfig: se_AnswerMachineDetectionConfig(input.AnswerMachineDetectionConfig, context), - }), - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - ...(input.CampaignId != null && { CampaignId: input.CampaignId }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.QueueId != null && { QueueId: input.QueueId }), - ...(input.SourcePhoneNumber != null && { SourcePhoneNumber: input.SourcePhoneNumber }), - ...(input.TrafficType != null && { TrafficType: input.TrafficType }), - }); + body = JSON.stringify( + take(input, { + AnswerMachineDetectionConfig: (_) => _json(_), + Attributes: (_) => _json(_), + CampaignId: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContactFlowId: [], + DestinationPhoneNumber: [], + InstanceId: [], + QueueId: [], + SourcePhoneNumber: [], + TrafficType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4714,20 +4722,22 @@ export const se_StartTaskContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/task"; let body: any; - body = JSON.stringify({ - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PreviousContactId != null && { PreviousContactId: input.PreviousContactId }), - ...(input.QuickConnectId != null && { QuickConnectId: input.QuickConnectId }), - ...(input.References != null && { References: se_ContactReferences(input.References, context) }), - ...(input.RelatedContactId != null && { RelatedContactId: input.RelatedContactId }), - ...(input.ScheduledTime != null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }), - ...(input.TaskTemplateId != null && { TaskTemplateId: input.TaskTemplateId }), - }); + body = JSON.stringify( + take(input, { + Attributes: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContactFlowId: [], + Description: [], + InstanceId: [], + Name: [], + PreviousContactId: [], + QuickConnectId: [], + References: (_) => _json(_), + RelatedContactId: [], + ScheduledTime: (_) => Math.round(_.getTime() / 1000), + TaskTemplateId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4752,10 +4762,12 @@ export const se_StopContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4781,11 +4793,13 @@ export const se_StopContactRecordingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-recording"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InitialContactId != null && { InitialContactId: input.InitialContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InitialContactId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4811,11 +4825,13 @@ export const se_StopContactStreamingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/stop-streaming"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.StreamingId != null && { StreamingId: input.StreamingId }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InstanceId: [], + StreamingId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4841,11 +4857,13 @@ export const se_SuspendContactRecordingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/suspend-recording"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InitialContactId != null && { InitialContactId: input.InitialContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InitialContactId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4871,9 +4889,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4898,14 +4918,16 @@ export const se_TransferContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/transfer"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.QueueId != null && { QueueId: input.QueueId }), - ...(input.UserId != null && { UserId: input.UserId }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContactFlowId: [], + ContactId: [], + InstanceId: [], + QueueId: [], + UserId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4971,13 +4993,15 @@ export const se_UpdateAgentStatusCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayOrder != null && { DisplayOrder: input.DisplayOrder }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResetOrderNumber != null && { ResetOrderNumber: input.ResetOrderNumber }), - ...(input.State != null && { State: input.State }), - }); + body = JSON.stringify( + take(input, { + Description: [], + DisplayOrder: [], + Name: [], + ResetOrderNumber: [], + State: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5005,11 +5029,13 @@ export const se_UpdateContactCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ContactId", () => input.ContactId!, "{ContactId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.References != null && { References: se_ContactReferences(input.References, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + References: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5034,11 +5060,13 @@ export const se_UpdateContactAttributesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/attributes"; let body: any; - body = JSON.stringify({ - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - ...(input.InitialContactId != null && { InitialContactId: input.InitialContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }); + body = JSON.stringify( + take(input, { + Attributes: (_) => _json(_), + InitialContactId: [], + InstanceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5074,9 +5102,11 @@ export const se_UpdateContactFlowContentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - }); + body = JSON.stringify( + take(input, { + Content: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5112,11 +5142,13 @@ export const se_UpdateContactFlowMetadataCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ContactFlowState != null && { ContactFlowState: input.ContactFlowState }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + ContactFlowState: [], + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5152,9 +5184,11 @@ export const se_UpdateContactFlowModuleContentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - }); + body = JSON.stringify( + take(input, { + Content: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5190,11 +5224,13 @@ export const se_UpdateContactFlowModuleMetadataCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.State != null && { State: input.State }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + State: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5230,10 +5266,12 @@ export const se_UpdateContactFlowNameCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5258,11 +5296,13 @@ export const se_UpdateContactScheduleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact/schedule"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ScheduledTime != null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + InstanceId: [], + ScheduledTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5298,12 +5338,14 @@ export const se_UpdateHoursOfOperationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Config != null && { Config: se_HoursOfOperationConfigList(input.Config, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TimeZone != null && { TimeZone: input.TimeZone }), - }); + body = JSON.stringify( + take(input, { + Config: (_) => _json(_), + Description: [], + Name: [], + TimeZone: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5339,9 +5381,11 @@ export const se_UpdateInstanceAttributeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Value != null && { Value: input.Value }), - }); + body = JSON.stringify( + take(input, { + Value: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5380,9 +5424,11 @@ export const se_UpdateInstanceStorageConfigCommand = async ( resourceType: [, __expectNonNull(input.ResourceType!, `ResourceType`)], }); let body: any; - body = JSON.stringify({ - ...(input.StorageConfig != null && { StorageConfig: se_InstanceStorageConfig(input.StorageConfig, context) }), - }); + body = JSON.stringify( + take(input, { + StorageConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5412,11 +5458,11 @@ export const se_UpdateParticipantRoleConfigCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ContactId", () => input.ContactId!, "{ContactId}", false); let body: any; - body = JSON.stringify({ - ...(input.ChannelConfiguration != null && { - ChannelConfiguration: se_UpdateParticipantRoleConfigChannelInfo(input.ChannelConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + ChannelConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5450,10 +5496,12 @@ export const se_UpdatePhoneNumberCommand = async ( false ); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5482,9 +5530,11 @@ export const se_UpdateQueueHoursOfOperationCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.HoursOfOperationId != null && { HoursOfOperationId: input.HoursOfOperationId }), - }); + body = JSON.stringify( + take(input, { + HoursOfOperationId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5513,9 +5563,11 @@ export const se_UpdateQueueMaxContactsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxContacts != null && { MaxContacts: input.MaxContacts }), - }); + body = JSON.stringify( + take(input, { + MaxContacts: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5543,10 +5595,12 @@ export const se_UpdateQueueNameCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5575,11 +5629,11 @@ export const se_UpdateQueueOutboundCallerConfigCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.OutboundCallerConfig != null && { - OutboundCallerConfig: se_OutboundCallerConfig(input.OutboundCallerConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + OutboundCallerConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5607,9 +5661,11 @@ export const se_UpdateQueueStatusCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QueueId", () => input.QueueId!, "{QueueId}", false); let body: any; - body = JSON.stringify({ - ...(input.Status != null && { Status: input.Status }), - }); + body = JSON.stringify( + take(input, { + Status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5645,11 +5701,11 @@ export const se_UpdateQuickConnectConfigCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.QuickConnectConfig != null && { - QuickConnectConfig: se_QuickConnectConfig(input.QuickConnectConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + QuickConnectConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5685,10 +5741,12 @@ export const se_UpdateQuickConnectNameCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5724,11 +5782,11 @@ export const se_UpdateRoutingProfileConcurrencyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MediaConcurrencies != null && { - MediaConcurrencies: se_MediaConcurrencies(input.MediaConcurrencies, context), - }), - }); + body = JSON.stringify( + take(input, { + MediaConcurrencies: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5764,9 +5822,11 @@ export const se_UpdateRoutingProfileDefaultOutboundQueueCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DefaultOutboundQueueId != null && { DefaultOutboundQueueId: input.DefaultOutboundQueueId }), - }); + body = JSON.stringify( + take(input, { + DefaultOutboundQueueId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5802,10 +5862,12 @@ export const se_UpdateRoutingProfileNameCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5841,9 +5903,11 @@ export const se_UpdateRoutingProfileQueuesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.QueueConfigs != null && { QueueConfigs: se_RoutingProfileQueueConfigList(input.QueueConfigs, context) }), - }); + body = JSON.stringify( + take(input, { + QueueConfigs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5871,12 +5935,14 @@ export const se_UpdateRuleCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "RuleId", () => input.RuleId!, "{RuleId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Actions != null && { Actions: se_RuleActions(input.Actions, context) }), - ...(input.Function != null && { Function: input.Function }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PublishStatus != null && { PublishStatus: input.PublishStatus }), - }); + body = JSON.stringify( + take(input, { + Actions: (_) => _json(_), + Function: [], + Name: [], + PublishStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5912,16 +5978,14 @@ export const se_UpdateSecurityProfileCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.AllowedAccessControlTags != null && { - AllowedAccessControlTags: se_AllowedAccessControlTags(input.AllowedAccessControlTags, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Permissions != null && { Permissions: se_PermissionsList(input.Permissions, context) }), - ...(input.TagRestrictedResources != null && { - TagRestrictedResources: se_TagRestrictedResourceList(input.TagRestrictedResources, context), - }), - }); + body = JSON.stringify( + take(input, { + AllowedAccessControlTags: (_) => _json(_), + Description: [], + Permissions: (_) => _json(_), + TagRestrictedResources: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5957,15 +6021,17 @@ export const se_UpdateTaskTemplateCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Constraints != null && { Constraints: se_TaskTemplateConstraints(input.Constraints, context) }), - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.Defaults != null && { Defaults: se_TaskTemplateDefaults(input.Defaults, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Fields != null && { Fields: se_TaskTemplateFields(input.Fields, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Status != null && { Status: input.Status }), - }); + body = JSON.stringify( + take(input, { + Constraints: (_) => _json(_), + ContactFlowId: [], + Defaults: (_) => _json(_), + Description: [], + Fields: (_) => _json(_), + Name: [], + Status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5992,9 +6058,11 @@ export const se_UpdateTrafficDistributionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/traffic-distribution/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.TelephonyConfig != null && { TelephonyConfig: se_TelephonyConfig(input.TelephonyConfig, context) }), - }); + body = JSON.stringify( + take(input, { + TelephonyConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6022,9 +6090,11 @@ export const se_UpdateUserHierarchyCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.HierarchyGroupId != null && { HierarchyGroupId: input.HierarchyGroupId }), - }); + body = JSON.stringify( + take(input, { + HierarchyGroupId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6060,9 +6130,11 @@ export const se_UpdateUserHierarchyGroupNameCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6089,11 +6161,11 @@ export const se_UpdateUserHierarchyStructureCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user-hierarchy-structure/{InstanceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.HierarchyStructure != null && { - HierarchyStructure: se_HierarchyStructureUpdate(input.HierarchyStructure, context), - }), - }); + body = JSON.stringify( + take(input, { + HierarchyStructure: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6122,9 +6194,11 @@ export const se_UpdateUserIdentityInfoCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.IdentityInfo != null && { IdentityInfo: se_UserIdentityInfo(input.IdentityInfo, context) }), - }); + body = JSON.stringify( + take(input, { + IdentityInfo: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6152,9 +6226,11 @@ export const se_UpdateUserPhoneConfigCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.PhoneConfig != null && { PhoneConfig: se_UserPhoneConfig(input.PhoneConfig, context) }), - }); + body = JSON.stringify( + take(input, { + PhoneConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6183,9 +6259,11 @@ export const se_UpdateUserRoutingProfileCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.RoutingProfileId != null && { RoutingProfileId: input.RoutingProfileId }), - }); + body = JSON.stringify( + take(input, { + RoutingProfileId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6214,11 +6292,11 @@ export const se_UpdateUserSecurityProfilesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "InstanceId", () => input.InstanceId!, "{InstanceId}", false); let body: any; - body = JSON.stringify({ - ...(input.SecurityProfileIds != null && { - SecurityProfileIds: se_SecurityProfileIds(input.SecurityProfileIds, context), - }), - }); + body = JSON.stringify( + take(input, { + SecurityProfileIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6283,10 +6361,9 @@ const de_AssociateApprovedOriginCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6345,10 +6422,9 @@ const de_AssociateBotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6401,10 +6477,9 @@ const de_AssociateDefaultVocabularyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6424,9 +6499,10 @@ export const de_AssociateInstanceStorageConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociationId != null) { - contents.AssociationId = __expectString(data.AssociationId); - } + const doc = take(data, { + AssociationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6463,10 +6539,9 @@ const de_AssociateInstanceStorageConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6525,10 +6600,9 @@ const de_AssociateLambdaFunctionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6587,10 +6661,9 @@ const de_AssociateLexBotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6643,10 +6716,9 @@ const de_AssociatePhoneNumberContactFlowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6702,10 +6774,9 @@ const de_AssociateQueueQuickConnectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6758,10 +6829,9 @@ const de_AssociateRoutingProfileQueuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6781,9 +6851,10 @@ export const de_AssociateSecurityKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociationId != null) { - contents.AssociationId = __expectString(data.AssociationId); - } + const doc = take(data, { + AssociationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6823,10 +6894,9 @@ const de_AssociateSecurityKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6846,12 +6916,11 @@ export const de_ClaimPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberArn != null) { - contents.PhoneNumberArn = __expectString(data.PhoneNumberArn); - } - if (data.PhoneNumberId != null) { - contents.PhoneNumberId = __expectString(data.PhoneNumberId); - } + const doc = take(data, { + PhoneNumberArn: __expectString, + PhoneNumberId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6888,10 +6957,9 @@ const de_ClaimPhoneNumberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6911,12 +6979,11 @@ export const de_CreateAgentStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AgentStatusARN != null) { - contents.AgentStatusARN = __expectString(data.AgentStatusARN); - } - if (data.AgentStatusId != null) { - contents.AgentStatusId = __expectString(data.AgentStatusId); - } + const doc = take(data, { + AgentStatusARN: __expectString, + AgentStatusId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6956,10 +7023,9 @@ const de_CreateAgentStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6979,12 +7045,11 @@ export const de_CreateContactFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactFlowArn != null) { - contents.ContactFlowArn = __expectString(data.ContactFlowArn); - } - if (data.ContactFlowId != null) { - contents.ContactFlowId = __expectString(data.ContactFlowId); - } + const doc = take(data, { + ContactFlowArn: __expectString, + ContactFlowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7027,10 +7092,9 @@ const de_CreateContactFlowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7050,12 +7114,11 @@ export const de_CreateContactFlowModuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7104,10 +7167,9 @@ const de_CreateContactFlowModuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7127,12 +7189,11 @@ export const de_CreateHoursOfOperationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HoursOfOperationArn != null) { - contents.HoursOfOperationArn = __expectString(data.HoursOfOperationArn); - } - if (data.HoursOfOperationId != null) { - contents.HoursOfOperationId = __expectString(data.HoursOfOperationId); - } + const doc = take(data, { + HoursOfOperationArn: __expectString, + HoursOfOperationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7172,10 +7233,9 @@ const de_CreateHoursOfOperationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7195,12 +7255,11 @@ export const de_CreateInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7234,10 +7293,9 @@ const de_CreateInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7257,12 +7315,11 @@ export const de_CreateIntegrationAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IntegrationAssociationArn != null) { - contents.IntegrationAssociationArn = __expectString(data.IntegrationAssociationArn); - } - if (data.IntegrationAssociationId != null) { - contents.IntegrationAssociationId = __expectString(data.IntegrationAssociationId); - } + const doc = take(data, { + IntegrationAssociationArn: __expectString, + IntegrationAssociationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7296,10 +7353,9 @@ const de_CreateIntegrationAssociationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7319,12 +7375,11 @@ export const de_CreateQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.QueueArn != null) { - contents.QueueArn = __expectString(data.QueueArn); - } - if (data.QueueId != null) { - contents.QueueId = __expectString(data.QueueId); - } + const doc = take(data, { + QueueArn: __expectString, + QueueId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7364,10 +7419,9 @@ const de_CreateQueueCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7387,12 +7441,11 @@ export const de_CreateQuickConnectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.QuickConnectARN != null) { - contents.QuickConnectARN = __expectString(data.QuickConnectARN); - } - if (data.QuickConnectId != null) { - contents.QuickConnectId = __expectString(data.QuickConnectId); - } + const doc = take(data, { + QuickConnectARN: __expectString, + QuickConnectId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7432,10 +7485,9 @@ const de_CreateQuickConnectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7455,12 +7507,11 @@ export const de_CreateRoutingProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoutingProfileArn != null) { - contents.RoutingProfileArn = __expectString(data.RoutingProfileArn); - } - if (data.RoutingProfileId != null) { - contents.RoutingProfileId = __expectString(data.RoutingProfileId); - } + const doc = take(data, { + RoutingProfileArn: __expectString, + RoutingProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7500,10 +7551,9 @@ const de_CreateRoutingProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7523,12 +7573,11 @@ export const de_CreateRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RuleArn != null) { - contents.RuleArn = __expectString(data.RuleArn); - } - if (data.RuleId != null) { - contents.RuleId = __expectString(data.RuleId); - } + const doc = take(data, { + RuleArn: __expectString, + RuleId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7568,10 +7617,9 @@ const de_CreateRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7591,12 +7639,11 @@ export const de_CreateSecurityProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SecurityProfileArn != null) { - contents.SecurityProfileArn = __expectString(data.SecurityProfileArn); - } - if (data.SecurityProfileId != null) { - contents.SecurityProfileId = __expectString(data.SecurityProfileId); - } + const doc = take(data, { + SecurityProfileArn: __expectString, + SecurityProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7636,10 +7683,9 @@ const de_CreateSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7659,12 +7705,11 @@ export const de_CreateTaskTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7701,10 +7746,9 @@ const de_CreateTaskTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7724,12 +7768,11 @@ export const de_CreateTrafficDistributionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7772,10 +7815,9 @@ const de_CreateTrafficDistributionGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7795,12 +7837,11 @@ export const de_CreateUseCaseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UseCaseArn != null) { - contents.UseCaseArn = __expectString(data.UseCaseArn); - } - if (data.UseCaseId != null) { - contents.UseCaseId = __expectString(data.UseCaseId); - } + const doc = take(data, { + UseCaseArn: __expectString, + UseCaseId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7834,10 +7875,9 @@ const de_CreateUseCaseCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7857,12 +7897,11 @@ export const de_CreateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UserArn != null) { - contents.UserArn = __expectString(data.UserArn); - } - if (data.UserId != null) { - contents.UserId = __expectString(data.UserId); - } + const doc = take(data, { + UserArn: __expectString, + UserId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7902,10 +7941,9 @@ const de_CreateUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7925,12 +7963,11 @@ export const de_CreateUserHierarchyGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HierarchyGroupArn != null) { - contents.HierarchyGroupArn = __expectString(data.HierarchyGroupArn); - } - if (data.HierarchyGroupId != null) { - contents.HierarchyGroupId = __expectString(data.HierarchyGroupId); - } + const doc = take(data, { + HierarchyGroupArn: __expectString, + HierarchyGroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7970,10 +8007,9 @@ const de_CreateUserHierarchyGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7993,15 +8029,12 @@ export const de_CreateVocabularyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.VocabularyArn != null) { - contents.VocabularyArn = __expectString(data.VocabularyArn); - } - if (data.VocabularyId != null) { - contents.VocabularyId = __expectString(data.VocabularyId); - } + const doc = take(data, { + State: __expectString, + VocabularyArn: __expectString, + VocabularyId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8041,10 +8074,9 @@ const de_CreateVocabularyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8100,10 +8132,9 @@ const de_DeleteContactFlowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8159,10 +8190,9 @@ const de_DeleteContactFlowModuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8215,10 +8245,9 @@ const de_DeleteHoursOfOperationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8265,10 +8294,9 @@ const de_DeleteInstanceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8318,10 +8346,9 @@ const de_DeleteIntegrationAssociationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8374,10 +8401,9 @@ const de_DeleteQuickConnectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8430,10 +8456,9 @@ const de_DeleteRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8492,10 +8517,9 @@ const de_DeleteSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8548,10 +8572,9 @@ const de_DeleteTaskTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8604,10 +8627,9 @@ const de_DeleteTrafficDistributionGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8657,10 +8679,9 @@ const de_DeleteUseCaseCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8713,10 +8734,9 @@ const de_DeleteUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8772,10 +8792,9 @@ const de_DeleteUserHierarchyGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8795,15 +8814,12 @@ export const de_DeleteVocabularyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.VocabularyArn != null) { - contents.VocabularyArn = __expectString(data.VocabularyArn); - } - if (data.VocabularyId != null) { - contents.VocabularyId = __expectString(data.VocabularyId); - } + const doc = take(data, { + State: __expectString, + VocabularyArn: __expectString, + VocabularyId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8840,10 +8856,9 @@ const de_DeleteVocabularyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8863,9 +8878,10 @@ export const de_DescribeAgentStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AgentStatus != null) { - contents.AgentStatus = de_AgentStatus(data.AgentStatus, context); - } + const doc = take(data, { + AgentStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8899,10 +8915,9 @@ const de_DescribeAgentStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8922,9 +8937,10 @@ export const de_DescribeContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Contact != null) { - contents.Contact = de_Contact(data.Contact, context); - } + const doc = take(data, { + Contact: (_) => de_Contact(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8958,10 +8974,9 @@ const de_DescribeContactCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8981,9 +8996,10 @@ export const de_DescribeContactFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactFlow != null) { - contents.ContactFlow = de_ContactFlow(data.ContactFlow, context); - } + const doc = take(data, { + ContactFlow: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9020,10 +9036,9 @@ const de_DescribeContactFlowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9043,9 +9058,10 @@ export const de_DescribeContactFlowModuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactFlowModule != null) { - contents.ContactFlowModule = de_ContactFlowModule(data.ContactFlowModule, context); - } + const doc = take(data, { + ContactFlowModule: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9082,10 +9098,9 @@ const de_DescribeContactFlowModuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9105,9 +9120,10 @@ export const de_DescribeHoursOfOperationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HoursOfOperation != null) { - contents.HoursOfOperation = de_HoursOfOperation(data.HoursOfOperation, context); - } + const doc = take(data, { + HoursOfOperation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9141,10 +9157,9 @@ const de_DescribeHoursOfOperationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9164,9 +9179,10 @@ export const de_DescribeInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Instance != null) { - contents.Instance = de_Instance(data.Instance, context); - } + const doc = take(data, { + Instance: (_) => de_Instance(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9194,10 +9210,9 @@ const de_DescribeInstanceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9217,9 +9232,10 @@ export const de_DescribeInstanceAttributeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attribute != null) { - contents.Attribute = de_Attribute(data.Attribute, context); - } + const doc = take(data, { + Attribute: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9253,10 +9269,9 @@ const de_DescribeInstanceAttributeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9276,9 +9291,10 @@ export const de_DescribeInstanceStorageConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StorageConfig != null) { - contents.StorageConfig = de_InstanceStorageConfig(data.StorageConfig, context); - } + const doc = take(data, { + StorageConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9312,10 +9328,9 @@ const de_DescribeInstanceStorageConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9335,9 +9350,10 @@ export const de_DescribePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ClaimedPhoneNumberSummary != null) { - contents.ClaimedPhoneNumberSummary = de_ClaimedPhoneNumberSummary(data.ClaimedPhoneNumberSummary, context); - } + const doc = take(data, { + ClaimedPhoneNumberSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9371,10 +9387,9 @@ const de_DescribePhoneNumberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9394,9 +9409,10 @@ export const de_DescribeQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Queue != null) { - contents.Queue = de_Queue(data.Queue, context); - } + const doc = take(data, { + Queue: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9430,10 +9446,9 @@ const de_DescribeQueueCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9453,9 +9468,10 @@ export const de_DescribeQuickConnectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.QuickConnect != null) { - contents.QuickConnect = de_QuickConnect(data.QuickConnect, context); - } + const doc = take(data, { + QuickConnect: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9489,10 +9505,9 @@ const de_DescribeQuickConnectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9512,9 +9527,10 @@ export const de_DescribeRoutingProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoutingProfile != null) { - contents.RoutingProfile = de_RoutingProfile(data.RoutingProfile, context); - } + const doc = take(data, { + RoutingProfile: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9548,10 +9564,9 @@ const de_DescribeRoutingProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9571,9 +9586,10 @@ export const de_DescribeRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Rule != null) { - contents.Rule = de_Rule(data.Rule, context); - } + const doc = take(data, { + Rule: (_) => de_Rule(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9607,10 +9623,9 @@ const de_DescribeRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9630,9 +9645,10 @@ export const de_DescribeSecurityProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SecurityProfile != null) { - contents.SecurityProfile = de_SecurityProfile(data.SecurityProfile, context); - } + const doc = take(data, { + SecurityProfile: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9666,10 +9682,9 @@ const de_DescribeSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9689,9 +9704,10 @@ export const de_DescribeTrafficDistributionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TrafficDistributionGroup != null) { - contents.TrafficDistributionGroup = de_TrafficDistributionGroup(data.TrafficDistributionGroup, context); - } + const doc = take(data, { + TrafficDistributionGroup: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9725,10 +9741,9 @@ const de_DescribeTrafficDistributionGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9748,9 +9763,10 @@ export const de_DescribeUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9784,10 +9800,9 @@ const de_DescribeUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9807,9 +9822,10 @@ export const de_DescribeUserHierarchyGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HierarchyGroup != null) { - contents.HierarchyGroup = de_HierarchyGroup(data.HierarchyGroup, context); - } + const doc = take(data, { + HierarchyGroup: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9843,10 +9859,9 @@ const de_DescribeUserHierarchyGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9866,9 +9881,10 @@ export const de_DescribeUserHierarchyStructureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HierarchyStructure != null) { - contents.HierarchyStructure = de_HierarchyStructure(data.HierarchyStructure, context); - } + const doc = take(data, { + HierarchyStructure: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -9902,10 +9918,9 @@ const de_DescribeUserHierarchyStructureCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9925,9 +9940,10 @@ export const de_DescribeVocabularyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Vocabulary != null) { - contents.Vocabulary = de_Vocabulary(data.Vocabulary, context); - } + const doc = take(data, { + Vocabulary: (_) => de_Vocabulary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -9961,10 +9977,9 @@ const de_DescribeVocabularyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10017,10 +10032,9 @@ const de_DisassociateApprovedOriginCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10070,10 +10084,9 @@ const de_DisassociateBotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10126,10 +10139,9 @@ const de_DisassociateInstanceStorageConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10182,10 +10194,9 @@ const de_DisassociateLambdaFunctionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10238,10 +10249,9 @@ const de_DisassociateLexBotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10294,10 +10304,9 @@ const de_DisassociatePhoneNumberContactFlowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10350,10 +10359,9 @@ const de_DisassociateQueueQuickConnectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10406,10 +10414,9 @@ const de_DisassociateRoutingProfileQueuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10462,10 +10469,9 @@ const de_DisassociateSecurityKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10521,10 +10527,9 @@ const de_DismissUserContactCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10544,9 +10549,10 @@ export const de_GetContactAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_Attributes(data.Attributes, context); - } + const doc = take(data, { + Attributes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -10574,10 +10580,9 @@ const de_GetContactAttributesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10597,18 +10602,13 @@ export const de_GetCurrentMetricDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTotalCount != null) { - contents.ApproximateTotalCount = __expectLong(data.ApproximateTotalCount); - } - if (data.DataSnapshotTime != null) { - contents.DataSnapshotTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.DataSnapshotTime))); - } - if (data.MetricResults != null) { - contents.MetricResults = de_CurrentMetricResults(data.MetricResults, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ApproximateTotalCount: __expectLong, + DataSnapshotTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetricResults: (_) => de_CurrentMetricResults(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10642,10 +10642,9 @@ const de_GetCurrentMetricDataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10665,15 +10664,12 @@ export const de_GetCurrentUserDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTotalCount != null) { - contents.ApproximateTotalCount = __expectLong(data.ApproximateTotalCount); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.UserDataList != null) { - contents.UserDataList = de_UserDataList(data.UserDataList, context); - } + const doc = take(data, { + ApproximateTotalCount: __expectLong, + NextToken: __expectString, + UserDataList: (_) => de_UserDataList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -10707,10 +10703,9 @@ const de_GetCurrentUserDataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10730,18 +10725,13 @@ export const de_GetFederationTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Credentials != null) { - contents.Credentials = de_Credentials(data.Credentials, context); - } - if (data.SignInUrl != null) { - contents.SignInUrl = __expectString(data.SignInUrl); - } - if (data.UserArn != null) { - contents.UserArn = __expectString(data.UserArn); - } - if (data.UserId != null) { - contents.UserId = __expectString(data.UserId); - } + const doc = take(data, { + Credentials: (_) => de_Credentials(_, context), + SignInUrl: __expectString, + UserArn: __expectString, + UserId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10778,10 +10768,9 @@ const de_GetFederationTokenCommandError = async ( throw await de_UserNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10801,12 +10790,11 @@ export const de_GetMetricDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricResults != null) { - contents.MetricResults = de_HistoricalMetricResults(data.MetricResults, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MetricResults: (_) => de_HistoricalMetricResults(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10840,10 +10828,9 @@ const de_GetMetricDataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10863,12 +10850,11 @@ export const de_GetMetricDataV2Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricResults != null) { - contents.MetricResults = de_MetricResultsV2(data.MetricResults, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MetricResults: (_) => de_MetricResultsV2(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10902,10 +10888,9 @@ const de_GetMetricDataV2CommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10925,45 +10910,22 @@ export const de_GetTaskTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Constraints != null) { - contents.Constraints = de_TaskTemplateConstraints(data.Constraints, context); - } - if (data.ContactFlowId != null) { - contents.ContactFlowId = __expectString(data.ContactFlowId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Defaults != null) { - contents.Defaults = de_TaskTemplateDefaults(data.Defaults, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Fields != null) { - contents.Fields = de_TaskTemplateFields(data.Fields, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.InstanceId != null) { - contents.InstanceId = __expectString(data.InstanceId); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Constraints: _json, + ContactFlowId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Defaults: _json, + Description: __expectString, + Fields: _json, + Id: __expectString, + InstanceId: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -10997,10 +10959,9 @@ const de_GetTaskTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11020,15 +10981,12 @@ export const de_GetTrafficDistributionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.TelephonyConfig != null) { - contents.TelephonyConfig = de_TelephonyConfig(data.TelephonyConfig, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + TelephonyConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11062,10 +11020,9 @@ const de_GetTrafficDistributionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11085,12 +11042,11 @@ export const de_ListAgentStatusesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AgentStatusSummaryList != null) { - contents.AgentStatusSummaryList = de_AgentStatusSummaryList(data.AgentStatusSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AgentStatusSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11124,10 +11080,9 @@ const de_ListAgentStatusesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11147,12 +11102,11 @@ export const de_ListApprovedOriginsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Origins != null) { - contents.Origins = de_OriginsList(data.Origins, context); - } + const doc = take(data, { + NextToken: __expectString, + Origins: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11186,10 +11140,9 @@ const de_ListApprovedOriginsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11209,12 +11162,11 @@ export const de_ListBotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LexBots != null) { - contents.LexBots = de_LexBotConfigList(data.LexBots, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LexBots: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11245,10 +11197,9 @@ const de_ListBotsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11268,15 +11219,11 @@ export const de_ListContactFlowModulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactFlowModulesSummaryList != null) { - contents.ContactFlowModulesSummaryList = de_ContactFlowModulesSummaryList( - data.ContactFlowModulesSummaryList, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ContactFlowModulesSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11313,10 +11260,9 @@ const de_ListContactFlowModulesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11336,12 +11282,11 @@ export const de_ListContactFlowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactFlowSummaryList != null) { - contents.ContactFlowSummaryList = de_ContactFlowSummaryList(data.ContactFlowSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ContactFlowSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11375,10 +11320,9 @@ const de_ListContactFlowsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11398,12 +11342,11 @@ export const de_ListContactReferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReferenceSummaryList != null) { - contents.ReferenceSummaryList = de_ReferenceSummaryList(data.ReferenceSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + ReferenceSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11437,10 +11380,9 @@ const de_ListContactReferencesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11460,12 +11402,11 @@ export const de_ListDefaultVocabulariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DefaultVocabularyList != null) { - contents.DefaultVocabularyList = de_DefaultVocabularyList(data.DefaultVocabularyList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DefaultVocabularyList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11496,10 +11437,9 @@ const de_ListDefaultVocabulariesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11519,12 +11459,11 @@ export const de_ListHoursOfOperationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HoursOfOperationSummaryList != null) { - contents.HoursOfOperationSummaryList = de_HoursOfOperationSummaryList(data.HoursOfOperationSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + HoursOfOperationSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11558,10 +11497,9 @@ const de_ListHoursOfOperationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11581,12 +11519,11 @@ export const de_ListInstanceAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_AttributesList(data.Attributes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attributes: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11620,10 +11557,9 @@ const de_ListInstanceAttributesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11643,12 +11579,11 @@ export const de_ListInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceSummaryList != null) { - contents.InstanceSummaryList = de_InstanceSummaryList(data.InstanceSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InstanceSummaryList: (_) => de_InstanceSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11673,10 +11608,9 @@ const de_ListInstancesCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11696,12 +11630,11 @@ export const de_ListInstanceStorageConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.StorageConfigs != null) { - contents.StorageConfigs = de_InstanceStorageConfigs(data.StorageConfigs, context); - } + const doc = take(data, { + NextToken: __expectString, + StorageConfigs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11735,10 +11668,9 @@ const de_ListInstanceStorageConfigsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11758,15 +11690,11 @@ export const de_ListIntegrationAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IntegrationAssociationSummaryList != null) { - contents.IntegrationAssociationSummaryList = de_IntegrationAssociationSummaryList( - data.IntegrationAssociationSummaryList, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + IntegrationAssociationSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11797,10 +11725,9 @@ const de_ListIntegrationAssociationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11820,12 +11747,11 @@ export const de_ListLambdaFunctionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LambdaFunctions != null) { - contents.LambdaFunctions = de_FunctionArnsList(data.LambdaFunctions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LambdaFunctions: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11859,10 +11785,9 @@ const de_ListLambdaFunctionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11882,12 +11807,11 @@ export const de_ListLexBotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LexBots != null) { - contents.LexBots = de_LexBotsList(data.LexBots, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LexBots: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11921,10 +11845,9 @@ const de_ListLexBotsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11944,12 +11867,11 @@ export const de_ListPhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PhoneNumberSummaryList != null) { - contents.PhoneNumberSummaryList = de_PhoneNumberSummaryList(data.PhoneNumberSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + PhoneNumberSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -11983,10 +11905,9 @@ const de_ListPhoneNumbersCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12006,12 +11927,11 @@ export const de_ListPhoneNumbersV2Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ListPhoneNumbersSummaryList != null) { - contents.ListPhoneNumbersSummaryList = de_ListPhoneNumbersSummaryList(data.ListPhoneNumbersSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ListPhoneNumbersSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -12045,10 +11965,9 @@ const de_ListPhoneNumbersV2CommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12068,12 +11987,11 @@ export const de_ListPromptsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PromptSummaryList != null) { - contents.PromptSummaryList = de_PromptSummaryList(data.PromptSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + PromptSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12107,10 +12025,9 @@ const de_ListPromptsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12130,12 +12047,11 @@ export const de_ListQueueQuickConnectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.QuickConnectSummaryList != null) { - contents.QuickConnectSummaryList = de_QuickConnectSummaryList(data.QuickConnectSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + QuickConnectSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12169,10 +12085,9 @@ const de_ListQueueQuickConnectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12192,12 +12107,11 @@ export const de_ListQueuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.QueueSummaryList != null) { - contents.QueueSummaryList = de_QueueSummaryList(data.QueueSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + QueueSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12231,10 +12145,9 @@ const de_ListQueuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12254,12 +12167,11 @@ export const de_ListQuickConnectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.QuickConnectSummaryList != null) { - contents.QuickConnectSummaryList = de_QuickConnectSummaryList(data.QuickConnectSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + QuickConnectSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12293,10 +12205,9 @@ const de_ListQuickConnectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12316,15 +12227,11 @@ export const de_ListRoutingProfileQueuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RoutingProfileQueueConfigSummaryList != null) { - contents.RoutingProfileQueueConfigSummaryList = de_RoutingProfileQueueConfigSummaryList( - data.RoutingProfileQueueConfigSummaryList, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + RoutingProfileQueueConfigSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12358,10 +12265,9 @@ const de_ListRoutingProfileQueuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12381,12 +12287,11 @@ export const de_ListRoutingProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RoutingProfileSummaryList != null) { - contents.RoutingProfileSummaryList = de_RoutingProfileSummaryList(data.RoutingProfileSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RoutingProfileSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12420,10 +12325,9 @@ const de_ListRoutingProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12443,12 +12347,11 @@ export const de_ListRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RuleSummaryList != null) { - contents.RuleSummaryList = de_RuleSummaryList(data.RuleSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RuleSummaryList: (_) => de_RuleSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12482,10 +12385,9 @@ const de_ListRulesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12505,12 +12407,11 @@ export const de_ListSecurityKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SecurityKeys != null) { - contents.SecurityKeys = de_SecurityKeysList(data.SecurityKeys, context); - } + const doc = take(data, { + NextToken: __expectString, + SecurityKeys: (_) => de_SecurityKeysList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12544,10 +12445,9 @@ const de_ListSecurityKeysCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12567,12 +12467,11 @@ export const de_ListSecurityProfilePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Permissions != null) { - contents.Permissions = de_PermissionsList(data.Permissions, context); - } + const doc = take(data, { + NextToken: __expectString, + Permissions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12606,10 +12505,9 @@ const de_ListSecurityProfilePermissionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12629,12 +12527,11 @@ export const de_ListSecurityProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SecurityProfileSummaryList != null) { - contents.SecurityProfileSummaryList = de_SecurityProfileSummaryList(data.SecurityProfileSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + SecurityProfileSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12668,10 +12565,9 @@ const de_ListSecurityProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12691,9 +12587,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12727,10 +12624,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12750,12 +12646,11 @@ export const de_ListTaskTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TaskTemplates != null) { - contents.TaskTemplates = de_TaskTemplateList(data.TaskTemplates, context); - } + const doc = take(data, { + NextToken: __expectString, + TaskTemplates: (_) => de_TaskTemplateList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -12789,10 +12684,9 @@ const de_ListTaskTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12812,15 +12706,11 @@ export const de_ListTrafficDistributionGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TrafficDistributionGroupSummaryList != null) { - contents.TrafficDistributionGroupSummaryList = de_TrafficDistributionGroupSummaryList( - data.TrafficDistributionGroupSummaryList, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + TrafficDistributionGroupSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12851,10 +12741,9 @@ const de_ListTrafficDistributionGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12874,12 +12763,11 @@ export const de_ListUseCasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.UseCaseSummaryList != null) { - contents.UseCaseSummaryList = de_UseCaseSummaryList(data.UseCaseSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + UseCaseSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12910,10 +12798,9 @@ const de_ListUseCasesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12933,12 +12820,11 @@ export const de_ListUserHierarchyGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.UserHierarchyGroupSummaryList != null) { - contents.UserHierarchyGroupSummaryList = de_HierarchyGroupSummaryList(data.UserHierarchyGroupSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + UserHierarchyGroupSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -12972,10 +12858,9 @@ const de_ListUserHierarchyGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12995,12 +12880,11 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.UserSummaryList != null) { - contents.UserSummaryList = de_UserSummaryList(data.UserSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + UserSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13034,10 +12918,9 @@ const de_ListUsersCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13057,12 +12940,11 @@ export const de_MonitorContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactArn != null) { - contents.ContactArn = __expectString(data.ContactArn); - } - if (data.ContactId != null) { - contents.ContactId = __expectString(data.ContactId); - } + const doc = take(data, { + ContactArn: __expectString, + ContactId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13102,10 +12984,9 @@ const de_MonitorContactCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13161,10 +13042,9 @@ const de_PutUserStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13223,10 +13103,9 @@ const de_ReleasePhoneNumberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13246,12 +13125,11 @@ export const de_ReplicateInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13294,10 +13172,9 @@ const de_ReplicateInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13344,10 +13221,9 @@ const de_ResumeContactRecordingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13367,12 +13243,11 @@ export const de_SearchAvailablePhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AvailableNumbersList != null) { - contents.AvailableNumbersList = de_AvailableNumbersList(data.AvailableNumbersList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AvailableNumbersList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13403,10 +13278,9 @@ const de_SearchAvailablePhoneNumbersCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13426,15 +13300,12 @@ export const de_SearchQueuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTotalCount != null) { - contents.ApproximateTotalCount = __expectLong(data.ApproximateTotalCount); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Queues != null) { - contents.Queues = de_QueueSearchSummaryList(data.Queues, context); - } + const doc = take(data, { + ApproximateTotalCount: __expectLong, + NextToken: __expectString, + Queues: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13468,10 +13339,9 @@ const de_SearchQueuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13491,15 +13361,12 @@ export const de_SearchRoutingProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTotalCount != null) { - contents.ApproximateTotalCount = __expectLong(data.ApproximateTotalCount); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RoutingProfiles != null) { - contents.RoutingProfiles = de_RoutingProfileList(data.RoutingProfiles, context); - } + const doc = take(data, { + ApproximateTotalCount: __expectLong, + NextToken: __expectString, + RoutingProfiles: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13533,10 +13400,9 @@ const de_SearchRoutingProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13556,15 +13422,12 @@ export const de_SearchSecurityProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTotalCount != null) { - contents.ApproximateTotalCount = __expectLong(data.ApproximateTotalCount); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SecurityProfiles != null) { - contents.SecurityProfiles = de_SecurityProfilesSearchSummaryList(data.SecurityProfiles, context); - } + const doc = take(data, { + ApproximateTotalCount: __expectLong, + NextToken: __expectString, + SecurityProfiles: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13598,10 +13461,9 @@ const de_SearchSecurityProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13621,15 +13483,12 @@ export const de_SearchUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTotalCount != null) { - contents.ApproximateTotalCount = __expectLong(data.ApproximateTotalCount); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Users != null) { - contents.Users = de_UserSearchSummaryList(data.Users, context); - } + const doc = take(data, { + ApproximateTotalCount: __expectLong, + NextToken: __expectString, + Users: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13663,10 +13522,9 @@ const de_SearchUsersCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13686,12 +13544,11 @@ export const de_SearchVocabulariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VocabularySummaryList != null) { - contents.VocabularySummaryList = de_VocabularySummaryList(data.VocabularySummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + VocabularySummaryList: (_) => de_VocabularySummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13722,10 +13579,9 @@ const de_SearchVocabulariesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13745,18 +13601,13 @@ export const de_StartChatContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactId != null) { - contents.ContactId = __expectString(data.ContactId); - } - if (data.ContinuedFromContactId != null) { - contents.ContinuedFromContactId = __expectString(data.ContinuedFromContactId); - } - if (data.ParticipantId != null) { - contents.ParticipantId = __expectString(data.ParticipantId); - } - if (data.ParticipantToken != null) { - contents.ParticipantToken = __expectString(data.ParticipantToken); - } + const doc = take(data, { + ContactId: __expectString, + ContinuedFromContactId: __expectString, + ParticipantId: __expectString, + ParticipantToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13790,10 +13641,9 @@ const de_StartChatContactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13843,10 +13693,9 @@ const de_StartContactRecordingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13866,9 +13715,10 @@ export const de_StartContactStreamingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamingId != null) { - contents.StreamingId = __expectString(data.StreamingId); - } + const doc = take(data, { + StreamingId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13902,10 +13752,9 @@ const de_StartContactStreamingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13925,9 +13774,10 @@ export const de_StartOutboundVoiceContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactId != null) { - contents.ContactId = __expectString(data.ContactId); - } + const doc = take(data, { + ContactId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13967,10 +13817,9 @@ const de_StartOutboundVoiceContactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13990,9 +13839,10 @@ export const de_StartTaskContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactId != null) { - contents.ContactId = __expectString(data.ContactId); - } + const doc = take(data, { + ContactId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14029,10 +13879,9 @@ const de_StartTaskContactCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14085,10 +13934,9 @@ const de_StopContactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14135,10 +13983,9 @@ const de_StopContactRecordingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14188,10 +14035,9 @@ const de_StopContactStreamingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14238,10 +14084,9 @@ const de_SuspendContactRecordingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14294,10 +14139,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14317,12 +14161,11 @@ export const de_TransferContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactArn != null) { - contents.ContactArn = __expectString(data.ContactArn); - } - if (data.ContactId != null) { - contents.ContactId = __expectString(data.ContactId); - } + const doc = take(data, { + ContactArn: __expectString, + ContactId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14362,10 +14205,9 @@ const de_TransferContactCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14418,10 +14260,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14480,10 +14321,9 @@ const de_UpdateAgentStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14536,10 +14376,9 @@ const de_UpdateContactCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14589,10 +14428,9 @@ const de_UpdateContactAttributesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14648,10 +14486,9 @@ const de_UpdateContactFlowContentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14707,10 +14544,9 @@ const de_UpdateContactFlowMetadataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14766,10 +14602,9 @@ const de_UpdateContactFlowModuleContentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14828,10 +14663,9 @@ const de_UpdateContactFlowModuleMetadataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14887,10 +14721,9 @@ const de_UpdateContactFlowNameCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14946,10 +14779,9 @@ const de_UpdateContactScheduleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15005,10 +14837,9 @@ const de_UpdateHoursOfOperationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15061,10 +14892,9 @@ const de_UpdateInstanceAttributeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15117,10 +14947,9 @@ const de_UpdateInstanceStorageConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15176,10 +15005,9 @@ const de_UpdateParticipantRoleConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15199,12 +15027,11 @@ export const de_UpdatePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PhoneNumberArn != null) { - contents.PhoneNumberArn = __expectString(data.PhoneNumberArn); - } - if (data.PhoneNumberId != null) { - contents.PhoneNumberId = __expectString(data.PhoneNumberId); - } + const doc = take(data, { + PhoneNumberArn: __expectString, + PhoneNumberId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15244,10 +15071,9 @@ const de_UpdatePhoneNumberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15300,10 +15126,9 @@ const de_UpdateQueueHoursOfOperationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15356,10 +15181,9 @@ const de_UpdateQueueMaxContactsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15415,10 +15239,9 @@ const de_UpdateQueueNameCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15471,10 +15294,9 @@ const de_UpdateQueueOutboundCallerConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15527,10 +15349,9 @@ const de_UpdateQueueStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15583,10 +15404,9 @@ const de_UpdateQuickConnectConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15639,10 +15459,9 @@ const de_UpdateQuickConnectNameCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15695,10 +15514,9 @@ const de_UpdateRoutingProfileConcurrencyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15751,10 +15569,9 @@ const de_UpdateRoutingProfileDefaultOutboundQueueCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15810,10 +15627,9 @@ const de_UpdateRoutingProfileNameCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15866,10 +15682,9 @@ const de_UpdateRoutingProfileQueuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15925,10 +15740,9 @@ const de_UpdateRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15981,10 +15795,9 @@ const de_UpdateSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16004,42 +15817,21 @@ export const de_UpdateTaskTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Constraints != null) { - contents.Constraints = de_TaskTemplateConstraints(data.Constraints, context); - } - if (data.ContactFlowId != null) { - contents.ContactFlowId = __expectString(data.ContactFlowId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Defaults != null) { - contents.Defaults = de_TaskTemplateDefaults(data.Defaults, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Fields != null) { - contents.Fields = de_TaskTemplateFields(data.Fields, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.InstanceId != null) { - contents.InstanceId = __expectString(data.InstanceId); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Arn: __expectString, + Constraints: _json, + ContactFlowId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Defaults: _json, + Description: __expectString, + Fields: _json, + Id: __expectString, + InstanceId: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16076,10 +15868,9 @@ const de_UpdateTaskTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16135,10 +15926,9 @@ const de_UpdateTrafficDistributionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16191,10 +15981,9 @@ const de_UpdateUserHierarchyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16250,10 +16039,9 @@ const de_UpdateUserHierarchyGroupNameCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16309,10 +16097,9 @@ const de_UpdateUserHierarchyStructureCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16365,10 +16152,9 @@ const de_UpdateUserIdentityInfoCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16421,10 +16207,9 @@ const de_UpdateUserPhoneConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16477,10 +16262,9 @@ const de_UpdateUserRoutingProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16533,16 +16317,15 @@ const de_UpdateUserSecurityProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -16552,9 +16335,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16571,9 +16355,10 @@ const de_ContactFlowNotPublishedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ContactFlowNotPublishedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16590,9 +16375,10 @@ const de_ContactNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ContactNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16609,9 +16395,10 @@ const de_DestinationNotAllowedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DestinationNotAllowedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16628,9 +16415,10 @@ const de_DuplicateResourceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DuplicateResourceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16647,9 +16435,10 @@ const de_IdempotencyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IdempotencyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16666,9 +16455,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16685,9 +16475,10 @@ const de_InvalidContactFlowExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.problems != null) { - contents.problems = de_Problems(data.problems, context); - } + const doc = take(data, { + problems: _json, + }); + Object.assign(contents, doc); const exception = new InvalidContactFlowException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16704,9 +16495,10 @@ const de_InvalidContactFlowModuleExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Problems != null) { - contents.Problems = de_Problems(data.Problems, context); - } + const doc = take(data, { + Problems: _json, + }); + Object.assign(contents, doc); const exception = new InvalidContactFlowModuleException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16723,9 +16515,10 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16742,9 +16535,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16761,9 +16555,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16780,9 +16575,10 @@ const de_OutboundContactNotPermittedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new OutboundContactNotPermittedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16799,12 +16595,11 @@ const de_PropertyValidationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.PropertyList != null) { - contents.PropertyList = de_PropertyValidationExceptionPropertyList(data.PropertyList, context); - } + const doc = take(data, { + Message: __expectString, + PropertyList: _json, + }); + Object.assign(contents, doc); const exception = new PropertyValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16821,9 +16616,10 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16840,15 +16636,12 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16865,9 +16658,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16884,9 +16678,10 @@ const de_ResourceNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16903,9 +16698,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16919,9 +16715,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16938,9 +16735,10 @@ const de_UserNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UserNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16948,3606 +16746,1025 @@ const de_UserNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AgentsMinOneMaxHundred - */ -const se_AgentsMinOneMaxHundred = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentsMinOneMaxHundred omitted. -/** - * serializeAws_restJson1AllowedAccessControlTags - */ -const se_AllowedAccessControlTags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AllowedAccessControlTags omitted. -/** - * serializeAws_restJson1AllowedMonitorCapabilities - */ -const se_AllowedMonitorCapabilities = (input: (MonitorCapability | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedMonitorCapabilities omitted. -/** - * serializeAws_restJson1AnswerMachineDetectionConfig - */ -const se_AnswerMachineDetectionConfig = (input: AnswerMachineDetectionConfig, context: __SerdeContext): any => { - return { - ...(input.AwaitAnswerMachinePrompt != null && { AwaitAnswerMachinePrompt: input.AwaitAnswerMachinePrompt }), - ...(input.EnableAnswerMachineDetection != null && { - EnableAnswerMachineDetection: input.EnableAnswerMachineDetection, - }), - }; -}; +// se_AnswerMachineDetectionConfig omitted. -/** - * serializeAws_restJson1AssignContactCategoryActionDefinition - */ -const se_AssignContactCategoryActionDefinition = ( - input: AssignContactCategoryActionDefinition, - context: __SerdeContext -): any => { - return {}; -}; +// se_AssignContactCategoryActionDefinition omitted. + +// se_Attributes omitted. + +// se_Channels omitted. + +// se_ChatMessage omitted. + +// se_ChatParticipantRoleConfig omitted. + +// se_ChatStreamingConfiguration omitted. + +// se_ContactFilter omitted. + +// se_ContactReferences omitted. + +// se_ContactStates omitted. + +// se_ControlPlaneTagFilter omitted. + +// se_CrossChannelBehavior omitted. + +// se_CurrentMetric omitted. + +// se_CurrentMetrics omitted. + +// se_CurrentMetricSortCriteria omitted. + +// se_CurrentMetricSortCriteriaMaxOne omitted. + +// se_Distribution omitted. + +// se_DistributionList omitted. + +// se_EncryptionConfig omitted. + +// se_EventBridgeActionDefinition omitted. + +// se_Filters omitted. + +// se_FiltersV2List omitted. + +// se_FilterV2 omitted. + +// se_FilterValueList omitted. + +// se_Groupings omitted. + +// se_GroupingsV2 omitted. + +// se_HierarchyGroupCondition omitted. + +// se_HierarchyLevelUpdate omitted. + +// se_HierarchyStructureUpdate omitted. /** - * serializeAws_restJson1Attributes + * serializeAws_restJson1HistoricalMetric */ -const se_Attributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); +const se_HistoricalMetric = (input: HistoricalMetric, context: __SerdeContext): any => { + return take(input, { + Name: [], + Statistic: [], + Threshold: (_) => se_Threshold(_, context), + Unit: [], + }); }; /** - * serializeAws_restJson1Channels + * serializeAws_restJson1HistoricalMetrics */ -const se_Channels = (input: (Channel | string)[], context: __SerdeContext): any => { +const se_HistoricalMetrics = (input: HistoricalMetric[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_HistoricalMetric(entry, context); }); }; -/** - * serializeAws_restJson1ChatMessage - */ -const se_ChatMessage = (input: ChatMessage, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - }; -}; +// se_HoursOfOperationConfig omitted. -/** - * serializeAws_restJson1ChatParticipantRoleConfig - */ -const se_ChatParticipantRoleConfig = (input: ChatParticipantRoleConfig, context: __SerdeContext): any => { - return { - ...(input.ParticipantTimerConfigList != null && { - ParticipantTimerConfigList: se_ParticipantTimerConfigList(input.ParticipantTimerConfigList, context), - }), - }; -}; +// se_HoursOfOperationConfigList omitted. -/** - * serializeAws_restJson1ChatStreamingConfiguration - */ -const se_ChatStreamingConfiguration = (input: ChatStreamingConfiguration, context: __SerdeContext): any => { - return { - ...(input.StreamingEndpointArn != null && { StreamingEndpointArn: input.StreamingEndpointArn }), - }; -}; +// se_HoursOfOperationTimeSlice omitted. -/** - * serializeAws_restJson1ContactFilter - */ -const se_ContactFilter = (input: ContactFilter, context: __SerdeContext): any => { - return { - ...(input.ContactStates != null && { ContactStates: se_ContactStates(input.ContactStates, context) }), - }; -}; +// se_InstanceStorageConfig omitted. -/** - * serializeAws_restJson1ContactReferences - */ -const se_ContactReferences = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Reference(value, context); - return acc; - }, {}); -}; +// se_InvisibleFieldInfo omitted. + +// se_InvisibleTaskTemplateFields omitted. + +// se_KinesisFirehoseConfig omitted. + +// se_KinesisStreamConfig omitted. + +// se_KinesisVideoStreamConfig omitted. + +// se_LexBot omitted. + +// se_LexV2Bot omitted. + +// se_MediaConcurrencies omitted. + +// se_MediaConcurrency omitted. + +// se_MetricFiltersV2List omitted. + +// se_MetricFilterV2 omitted. + +// se_MetricFilterValueList omitted. /** - * serializeAws_restJson1ContactStates + * serializeAws_restJson1MetricsV2 */ -const se_ContactStates = (input: (ContactState | string)[], context: __SerdeContext): any => { +const se_MetricsV2 = (input: MetricV2[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_MetricV2(entry, context); }); }; /** - * serializeAws_restJson1ControlPlaneTagFilter + * serializeAws_restJson1MetricV2 */ -const se_ControlPlaneTagFilter = (input: ControlPlaneTagFilter, context: __SerdeContext): any => { - return { - ...(input.AndConditions != null && { AndConditions: se_TagAndConditionList(input.AndConditions, context) }), - ...(input.OrConditions != null && { OrConditions: se_TagOrConditionList(input.OrConditions, context) }), - ...(input.TagCondition != null && { TagCondition: se_TagCondition(input.TagCondition, context) }), - }; +const se_MetricV2 = (input: MetricV2, context: __SerdeContext): any => { + return take(input, { + MetricFilters: _json, + Name: [], + Threshold: (_) => se_ThresholdCollections(_, context), + }); }; -/** - * serializeAws_restJson1CrossChannelBehavior - */ -const se_CrossChannelBehavior = (input: CrossChannelBehavior, context: __SerdeContext): any => { - return { - ...(input.BehaviorType != null && { BehaviorType: input.BehaviorType }), - }; -}; +// se_NotificationRecipientType omitted. -/** - * serializeAws_restJson1CurrentMetric - */ -const se_CurrentMetric = (input: CurrentMetric, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_OutboundCallerConfig omitted. + +// se_ParticipantDetails omitted. + +// se_ParticipantTimerConfigList omitted. + +// se_ParticipantTimerConfiguration omitted. + +// se_ParticipantTimerValue omitted. + +// se_PermissionsList omitted. + +// se_PersistentChat omitted. + +// se_PhoneNumberCountryCodes omitted. + +// se_PhoneNumberQuickConnectConfig omitted. + +// se_PhoneNumberTypes omitted. + +// se_QueueQuickConnectConfig omitted. + +// se_Queues omitted. /** - * serializeAws_restJson1CurrentMetrics + * serializeAws_restJson1QueueSearchConditionList */ -const se_CurrentMetrics = (input: CurrentMetric[], context: __SerdeContext): any => { +const se_QueueSearchConditionList = (input: QueueSearchCriteria[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_CurrentMetric(entry, context); + return se_QueueSearchCriteria(entry, context); }); }; /** - * serializeAws_restJson1CurrentMetricSortCriteria + * serializeAws_restJson1QueueSearchCriteria */ -const se_CurrentMetricSortCriteria = (input: CurrentMetricSortCriteria, context: __SerdeContext): any => { - return { - ...(input.SortByMetric != null && { SortByMetric: input.SortByMetric }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; +const se_QueueSearchCriteria = (input: QueueSearchCriteria, context: __SerdeContext): any => { + return take(input, { + AndConditions: (_) => se_QueueSearchConditionList(_, context), + OrConditions: (_) => se_QueueSearchConditionList(_, context), + QueueTypeCondition: [], + StringCondition: _json, + }); }; +// se_QueueSearchFilter omitted. + +// se_QuickConnectConfig omitted. + +// se_QuickConnectsList omitted. + +// se_ReadOnlyFieldInfo omitted. + +// se_ReadOnlyTaskTemplateFields omitted. + +// se_Reference omitted. + +// se_RequiredFieldInfo omitted. + +// se_RequiredTaskTemplateFields omitted. + +// se_RoutingProfileQueueConfig omitted. + +// se_RoutingProfileQueueConfigList omitted. + +// se_RoutingProfileQueueReference omitted. + +// se_RoutingProfileQueueReferenceList omitted. + +// se_RoutingProfiles omitted. + /** - * serializeAws_restJson1CurrentMetricSortCriteriaMaxOne + * serializeAws_restJson1RoutingProfileSearchConditionList */ -const se_CurrentMetricSortCriteriaMaxOne = (input: CurrentMetricSortCriteria[], context: __SerdeContext): any => { +const se_RoutingProfileSearchConditionList = (input: RoutingProfileSearchCriteria[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_CurrentMetricSortCriteria(entry, context); + return se_RoutingProfileSearchCriteria(entry, context); }); }; /** - * serializeAws_restJson1Distribution + * serializeAws_restJson1RoutingProfileSearchCriteria */ -const se_Distribution = (input: Distribution, context: __SerdeContext): any => { - return { - ...(input.Percentage != null && { Percentage: input.Percentage }), - ...(input.Region != null && { Region: input.Region }), - }; +const se_RoutingProfileSearchCriteria = (input: RoutingProfileSearchCriteria, context: __SerdeContext): any => { + return take(input, { + AndConditions: (_) => se_RoutingProfileSearchConditionList(_, context), + OrConditions: (_) => se_RoutingProfileSearchConditionList(_, context), + StringCondition: _json, + }); }; +// se_RoutingProfileSearchFilter omitted. + +// se_RuleAction omitted. + +// se_RuleActions omitted. + +// se_RuleTriggerEventSource omitted. + +// se_S3Config omitted. + +// se_SecurityProfileIds omitted. + /** - * serializeAws_restJson1DistributionList + * serializeAws_restJson1SecurityProfileSearchConditionList */ -const se_DistributionList = (input: Distribution[], context: __SerdeContext): any => { +const se_SecurityProfileSearchConditionList = ( + input: SecurityProfileSearchCriteria[], + context: __SerdeContext +): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Distribution(entry, context); + return se_SecurityProfileSearchCriteria(entry, context); }); }; /** - * serializeAws_restJson1EncryptionConfig + * serializeAws_restJson1SecurityProfileSearchCriteria */ -const se_EncryptionConfig = (input: EncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; +const se_SecurityProfileSearchCriteria = (input: SecurityProfileSearchCriteria, context: __SerdeContext): any => { + return take(input, { + AndConditions: (_) => se_SecurityProfileSearchConditionList(_, context), + OrConditions: (_) => se_SecurityProfileSearchConditionList(_, context), + StringCondition: _json, + }); }; -/** - * serializeAws_restJson1EventBridgeActionDefinition - */ -const se_EventBridgeActionDefinition = (input: EventBridgeActionDefinition, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_SecurityProfilesSearchFilter omitted. + +// se_SendNotificationActionDefinition omitted. + +// se_SingleSelectOptions omitted. + +// se_StringCondition omitted. + +// se_SupportedMessagingContentTypes omitted. + +// se_TagAndConditionList omitted. + +// se_TagCondition omitted. + +// se_TagMap omitted. + +// se_TagOrConditionList omitted. + +// se_TagRestrictedResourceList omitted. + +// se_TaskActionDefinition omitted. + +// se_TaskTemplateConstraints omitted. + +// se_TaskTemplateDefaultFieldValue omitted. + +// se_TaskTemplateDefaultFieldValueList omitted. + +// se_TaskTemplateDefaults omitted. + +// se_TaskTemplateField omitted. + +// se_TaskTemplateFieldIdentifier omitted. + +// se_TaskTemplateFields omitted. + +// se_TelephonyConfig omitted. /** - * serializeAws_restJson1Filters + * serializeAws_restJson1Threshold */ -const se_Filters = (input: Filters, context: __SerdeContext): any => { - return { - ...(input.Channels != null && { Channels: se_Channels(input.Channels, context) }), - ...(input.Queues != null && { Queues: se_Queues(input.Queues, context) }), - ...(input.RoutingProfiles != null && { RoutingProfiles: se_RoutingProfiles(input.RoutingProfiles, context) }), - }; +const se_Threshold = (input: Threshold, context: __SerdeContext): any => { + return take(input, { + Comparison: [], + ThresholdValue: __serializeFloat, + }); }; /** - * serializeAws_restJson1FiltersV2List + * serializeAws_restJson1ThresholdCollections */ -const se_FiltersV2List = (input: FilterV2[], context: __SerdeContext): any => { +const se_ThresholdCollections = (input: ThresholdV2[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_FilterV2(entry, context); + return se_ThresholdV2(entry, context); }); }; /** - * serializeAws_restJson1FilterV2 + * serializeAws_restJson1ThresholdV2 */ -const se_FilterV2 = (input: FilterV2, context: __SerdeContext): any => { - return { - ...(input.FilterKey != null && { FilterKey: input.FilterKey }), - ...(input.FilterValues != null && { FilterValues: se_FilterValueList(input.FilterValues, context) }), - }; +const se_ThresholdV2 = (input: ThresholdV2, context: __SerdeContext): any => { + return take(input, { + Comparison: [], + ThresholdValue: __serializeFloat, + }); }; +// se_UpdateParticipantRoleConfigChannelInfo omitted. + +// se_UserDataFilters omitted. + +// se_UserDataHierarchyGroups omitted. + +// se_UserIdentityInfo omitted. + +// se_UserIdList omitted. + +// se_UserPhoneConfig omitted. + +// se_UserQuickConnectConfig omitted. + /** - * serializeAws_restJson1FilterValueList + * serializeAws_restJson1UserSearchConditionList */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { +const se_UserSearchConditionList = (input: UserSearchCriteria[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_UserSearchCriteria(entry, context); }); }; /** - * serializeAws_restJson1Groupings + * serializeAws_restJson1UserSearchCriteria */ -const se_Groupings = (input: (Grouping | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_UserSearchCriteria = (input: UserSearchCriteria, context: __SerdeContext): any => { + return take(input, { + AndConditions: (_) => se_UserSearchConditionList(_, context), + HierarchyGroupCondition: _json, + OrConditions: (_) => se_UserSearchConditionList(_, context), + StringCondition: _json, + }); }; +// se_UserSearchFilter omitted. + +// se_UserTagMap omitted. + +// se_VoiceRecordingConfiguration omitted. + +// de_ActionSummaries omitted. + +// de_ActionSummary omitted. + /** - * serializeAws_restJson1GroupingsV2 + * deserializeAws_restJson1AgentContactReference */ -const se_GroupingsV2 = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_AgentContactReference = (output: any, context: __SerdeContext): AgentContactReference => { + return take(output, { + AgentContactState: __expectString, + Channel: __expectString, + ConnectedToAgentTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContactId: __expectString, + InitiationMethod: __expectString, + Queue: _json, + StateStartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * serializeAws_restJson1HierarchyGroupCondition + * deserializeAws_restJson1AgentContactReferenceList */ -const se_HierarchyGroupCondition = (input: HierarchyGroupCondition, context: __SerdeContext): any => { - return { - ...(input.HierarchyGroupMatchType != null && { HierarchyGroupMatchType: input.HierarchyGroupMatchType }), - ...(input.Value != null && { Value: input.Value }), - }; +const de_AgentContactReferenceList = (output: any, context: __SerdeContext): AgentContactReference[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AgentContactReference(entry, context); + }); + return retVal; }; /** - * serializeAws_restJson1HierarchyLevelUpdate + * deserializeAws_restJson1AgentInfo */ -const se_HierarchyLevelUpdate = (input: HierarchyLevelUpdate, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; +const de_AgentInfo = (output: any, context: __SerdeContext): AgentInfo => { + return take(output, { + ConnectedToAgentTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + }) as any; }; +// de_AgentStatus omitted. + /** - * serializeAws_restJson1HierarchyStructureUpdate + * deserializeAws_restJson1AgentStatusReference */ -const se_HierarchyStructureUpdate = (input: HierarchyStructureUpdate, context: __SerdeContext): any => { - return { - ...(input.LevelFive != null && { LevelFive: se_HierarchyLevelUpdate(input.LevelFive, context) }), - ...(input.LevelFour != null && { LevelFour: se_HierarchyLevelUpdate(input.LevelFour, context) }), - ...(input.LevelOne != null && { LevelOne: se_HierarchyLevelUpdate(input.LevelOne, context) }), - ...(input.LevelThree != null && { LevelThree: se_HierarchyLevelUpdate(input.LevelThree, context) }), - ...(input.LevelTwo != null && { LevelTwo: se_HierarchyLevelUpdate(input.LevelTwo, context) }), - }; +const de_AgentStatusReference = (output: any, context: __SerdeContext): AgentStatusReference => { + return take(output, { + StatusArn: __expectString, + StatusName: __expectString, + StatusStartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * serializeAws_restJson1HistoricalMetric - */ -const se_HistoricalMetric = (input: HistoricalMetric, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - ...(input.Threshold != null && { Threshold: se_Threshold(input.Threshold, context) }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; - -/** - * serializeAws_restJson1HistoricalMetrics - */ -const se_HistoricalMetrics = (input: HistoricalMetric[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HistoricalMetric(entry, context); - }); -}; - -/** - * serializeAws_restJson1HoursOfOperationConfig - */ -const se_HoursOfOperationConfig = (input: HoursOfOperationConfig, context: __SerdeContext): any => { - return { - ...(input.Day != null && { Day: input.Day }), - ...(input.EndTime != null && { EndTime: se_HoursOfOperationTimeSlice(input.EndTime, context) }), - ...(input.StartTime != null && { StartTime: se_HoursOfOperationTimeSlice(input.StartTime, context) }), - }; -}; - -/** - * serializeAws_restJson1HoursOfOperationConfigList - */ -const se_HoursOfOperationConfigList = (input: HoursOfOperationConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HoursOfOperationConfig(entry, context); - }); -}; - -/** - * serializeAws_restJson1HoursOfOperationTimeSlice - */ -const se_HoursOfOperationTimeSlice = (input: HoursOfOperationTimeSlice, context: __SerdeContext): any => { - return { - ...(input.Hours != null && { Hours: input.Hours }), - ...(input.Minutes != null && { Minutes: input.Minutes }), - }; -}; - -/** - * serializeAws_restJson1InstanceStorageConfig - */ -const se_InstanceStorageConfig = (input: InstanceStorageConfig, context: __SerdeContext): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.KinesisFirehoseConfig != null && { - KinesisFirehoseConfig: se_KinesisFirehoseConfig(input.KinesisFirehoseConfig, context), - }), - ...(input.KinesisStreamConfig != null && { - KinesisStreamConfig: se_KinesisStreamConfig(input.KinesisStreamConfig, context), - }), - ...(input.KinesisVideoStreamConfig != null && { - KinesisVideoStreamConfig: se_KinesisVideoStreamConfig(input.KinesisVideoStreamConfig, context), - }), - ...(input.S3Config != null && { S3Config: se_S3Config(input.S3Config, context) }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - }; -}; - -/** - * serializeAws_restJson1InvisibleFieldInfo - */ -const se_InvisibleFieldInfo = (input: InvisibleFieldInfo, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: se_TaskTemplateFieldIdentifier(input.Id, context) }), - }; -}; - -/** - * serializeAws_restJson1InvisibleTaskTemplateFields - */ -const se_InvisibleTaskTemplateFields = (input: InvisibleFieldInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InvisibleFieldInfo(entry, context); - }); -}; - -/** - * serializeAws_restJson1KinesisFirehoseConfig - */ -const se_KinesisFirehoseConfig = (input: KinesisFirehoseConfig, context: __SerdeContext): any => { - return { - ...(input.FirehoseArn != null && { FirehoseArn: input.FirehoseArn }), - }; -}; - -/** - * serializeAws_restJson1KinesisStreamConfig - */ -const se_KinesisStreamConfig = (input: KinesisStreamConfig, context: __SerdeContext): any => { - return { - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - }; -}; - -/** - * serializeAws_restJson1KinesisVideoStreamConfig - */ -const se_KinesisVideoStreamConfig = (input: KinesisVideoStreamConfig, context: __SerdeContext): any => { - return { - ...(input.EncryptionConfig != null && { EncryptionConfig: se_EncryptionConfig(input.EncryptionConfig, context) }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.RetentionPeriodHours != null && { RetentionPeriodHours: input.RetentionPeriodHours }), - }; -}; - -/** - * serializeAws_restJson1LexBot - */ -const se_LexBot = (input: LexBot, context: __SerdeContext): any => { - return { - ...(input.LexRegion != null && { LexRegion: input.LexRegion }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1LexV2Bot - */ -const se_LexV2Bot = (input: LexV2Bot, context: __SerdeContext): any => { - return { - ...(input.AliasArn != null && { AliasArn: input.AliasArn }), - }; -}; - -/** - * serializeAws_restJson1MediaConcurrencies - */ -const se_MediaConcurrencies = (input: MediaConcurrency[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MediaConcurrency(entry, context); - }); -}; - -/** - * serializeAws_restJson1MediaConcurrency - */ -const se_MediaConcurrency = (input: MediaConcurrency, context: __SerdeContext): any => { - return { - ...(input.Channel != null && { Channel: input.Channel }), - ...(input.Concurrency != null && { Concurrency: input.Concurrency }), - ...(input.CrossChannelBehavior != null && { - CrossChannelBehavior: se_CrossChannelBehavior(input.CrossChannelBehavior, context), - }), - }; -}; - -/** - * serializeAws_restJson1MetricFiltersV2List - */ -const se_MetricFiltersV2List = (input: MetricFilterV2[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricFilterV2(entry, context); - }); -}; - -/** - * serializeAws_restJson1MetricFilterV2 - */ -const se_MetricFilterV2 = (input: MetricFilterV2, context: __SerdeContext): any => { - return { - ...(input.MetricFilterKey != null && { MetricFilterKey: input.MetricFilterKey }), - ...(input.MetricFilterValues != null && { - MetricFilterValues: se_MetricFilterValueList(input.MetricFilterValues, context), - }), - }; -}; - -/** - * serializeAws_restJson1MetricFilterValueList - */ -const se_MetricFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1MetricsV2 - */ -const se_MetricsV2 = (input: MetricV2[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricV2(entry, context); - }); -}; - -/** - * serializeAws_restJson1MetricV2 - */ -const se_MetricV2 = (input: MetricV2, context: __SerdeContext): any => { - return { - ...(input.MetricFilters != null && { MetricFilters: se_MetricFiltersV2List(input.MetricFilters, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Threshold != null && { Threshold: se_ThresholdCollections(input.Threshold, context) }), - }; -}; - -/** - * serializeAws_restJson1NotificationRecipientType - */ -const se_NotificationRecipientType = (input: NotificationRecipientType, context: __SerdeContext): any => { - return { - ...(input.UserIds != null && { UserIds: se_UserIdList(input.UserIds, context) }), - ...(input.UserTags != null && { UserTags: se_UserTagMap(input.UserTags, context) }), - }; -}; - -/** - * serializeAws_restJson1OutboundCallerConfig - */ -const se_OutboundCallerConfig = (input: OutboundCallerConfig, context: __SerdeContext): any => { - return { - ...(input.OutboundCallerIdName != null && { OutboundCallerIdName: input.OutboundCallerIdName }), - ...(input.OutboundCallerIdNumberId != null && { OutboundCallerIdNumberId: input.OutboundCallerIdNumberId }), - ...(input.OutboundFlowId != null && { OutboundFlowId: input.OutboundFlowId }), - }; -}; - -/** - * serializeAws_restJson1ParticipantDetails - */ -const se_ParticipantDetails = (input: ParticipantDetails, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - }; -}; - -/** - * serializeAws_restJson1ParticipantTimerConfigList - */ -const se_ParticipantTimerConfigList = (input: ParticipantTimerConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParticipantTimerConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1ParticipantTimerConfiguration - */ -const se_ParticipantTimerConfiguration = (input: ParticipantTimerConfiguration, context: __SerdeContext): any => { - return { - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - ...(input.TimerType != null && { TimerType: input.TimerType }), - ...(input.TimerValue != null && { TimerValue: se_ParticipantTimerValue(input.TimerValue, context) }), - }; -}; - -/** - * serializeAws_restJson1ParticipantTimerValue - */ -const se_ParticipantTimerValue = (input: ParticipantTimerValue, context: __SerdeContext): any => { - return ParticipantTimerValue.visit(input, { - ParticipantTimerAction: (value) => ({ ParticipantTimerAction: value }), - ParticipantTimerDurationInMinutes: (value) => ({ ParticipantTimerDurationInMinutes: value }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1PermissionsList - */ -const se_PermissionsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1PersistentChat - */ -const se_PersistentChat = (input: PersistentChat, context: __SerdeContext): any => { - return { - ...(input.RehydrationType != null && { RehydrationType: input.RehydrationType }), - ...(input.SourceContactId != null && { SourceContactId: input.SourceContactId }), - }; -}; - -/** - * serializeAws_restJson1PhoneNumberCountryCodes - */ -const se_PhoneNumberCountryCodes = (input: (PhoneNumberCountryCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1PhoneNumberQuickConnectConfig - */ -const se_PhoneNumberQuickConnectConfig = (input: PhoneNumberQuickConnectConfig, context: __SerdeContext): any => { - return { - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - }; -}; - -/** - * serializeAws_restJson1PhoneNumberTypes - */ -const se_PhoneNumberTypes = (input: (PhoneNumberType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1QueueQuickConnectConfig - */ -const se_QueueQuickConnectConfig = (input: QueueQuickConnectConfig, context: __SerdeContext): any => { - return { - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.QueueId != null && { QueueId: input.QueueId }), - }; -}; - -/** - * serializeAws_restJson1Queues - */ -const se_Queues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1QueueSearchConditionList - */ -const se_QueueSearchConditionList = (input: QueueSearchCriteria[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_QueueSearchCriteria(entry, context); - }); -}; - -/** - * serializeAws_restJson1QueueSearchCriteria - */ -const se_QueueSearchCriteria = (input: QueueSearchCriteria, context: __SerdeContext): any => { - return { - ...(input.AndConditions != null && { AndConditions: se_QueueSearchConditionList(input.AndConditions, context) }), - ...(input.OrConditions != null && { OrConditions: se_QueueSearchConditionList(input.OrConditions, context) }), - ...(input.QueueTypeCondition != null && { QueueTypeCondition: input.QueueTypeCondition }), - ...(input.StringCondition != null && { StringCondition: se_StringCondition(input.StringCondition, context) }), - }; -}; - -/** - * serializeAws_restJson1QueueSearchFilter - */ -const se_QueueSearchFilter = (input: QueueSearchFilter, context: __SerdeContext): any => { - return { - ...(input.TagFilter != null && { TagFilter: se_ControlPlaneTagFilter(input.TagFilter, context) }), - }; -}; - -/** - * serializeAws_restJson1QuickConnectConfig - */ -const se_QuickConnectConfig = (input: QuickConnectConfig, context: __SerdeContext): any => { - return { - ...(input.PhoneConfig != null && { PhoneConfig: se_PhoneNumberQuickConnectConfig(input.PhoneConfig, context) }), - ...(input.QueueConfig != null && { QueueConfig: se_QueueQuickConnectConfig(input.QueueConfig, context) }), - ...(input.QuickConnectType != null && { QuickConnectType: input.QuickConnectType }), - ...(input.UserConfig != null && { UserConfig: se_UserQuickConnectConfig(input.UserConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1QuickConnectsList - */ -const se_QuickConnectsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ReadOnlyFieldInfo - */ -const se_ReadOnlyFieldInfo = (input: ReadOnlyFieldInfo, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: se_TaskTemplateFieldIdentifier(input.Id, context) }), - }; -}; - -/** - * serializeAws_restJson1ReadOnlyTaskTemplateFields - */ -const se_ReadOnlyTaskTemplateFields = (input: ReadOnlyFieldInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReadOnlyFieldInfo(entry, context); - }); -}; - -/** - * serializeAws_restJson1Reference - */ -const se_Reference = (input: Reference, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1RequiredFieldInfo - */ -const se_RequiredFieldInfo = (input: RequiredFieldInfo, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: se_TaskTemplateFieldIdentifier(input.Id, context) }), - }; -}; - -/** - * serializeAws_restJson1RequiredTaskTemplateFields - */ -const se_RequiredTaskTemplateFields = (input: RequiredFieldInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RequiredFieldInfo(entry, context); - }); -}; - -/** - * serializeAws_restJson1RoutingProfileQueueConfig - */ -const se_RoutingProfileQueueConfig = (input: RoutingProfileQueueConfig, context: __SerdeContext): any => { - return { - ...(input.Delay != null && { Delay: input.Delay }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.QueueReference != null && { - QueueReference: se_RoutingProfileQueueReference(input.QueueReference, context), - }), - }; -}; - -/** - * serializeAws_restJson1RoutingProfileQueueConfigList - */ -const se_RoutingProfileQueueConfigList = (input: RoutingProfileQueueConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RoutingProfileQueueConfig(entry, context); - }); -}; - -/** - * serializeAws_restJson1RoutingProfileQueueReference - */ -const se_RoutingProfileQueueReference = (input: RoutingProfileQueueReference, context: __SerdeContext): any => { - return { - ...(input.Channel != null && { Channel: input.Channel }), - ...(input.QueueId != null && { QueueId: input.QueueId }), - }; -}; - -/** - * serializeAws_restJson1RoutingProfileQueueReferenceList - */ -const se_RoutingProfileQueueReferenceList = (input: RoutingProfileQueueReference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RoutingProfileQueueReference(entry, context); - }); -}; - -/** - * serializeAws_restJson1RoutingProfiles - */ -const se_RoutingProfiles = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RoutingProfileSearchConditionList - */ -const se_RoutingProfileSearchConditionList = (input: RoutingProfileSearchCriteria[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RoutingProfileSearchCriteria(entry, context); - }); -}; - -/** - * serializeAws_restJson1RoutingProfileSearchCriteria - */ -const se_RoutingProfileSearchCriteria = (input: RoutingProfileSearchCriteria, context: __SerdeContext): any => { - return { - ...(input.AndConditions != null && { - AndConditions: se_RoutingProfileSearchConditionList(input.AndConditions, context), - }), - ...(input.OrConditions != null && { - OrConditions: se_RoutingProfileSearchConditionList(input.OrConditions, context), - }), - ...(input.StringCondition != null && { StringCondition: se_StringCondition(input.StringCondition, context) }), - }; -}; - -/** - * serializeAws_restJson1RoutingProfileSearchFilter - */ -const se_RoutingProfileSearchFilter = (input: RoutingProfileSearchFilter, context: __SerdeContext): any => { - return { - ...(input.TagFilter != null && { TagFilter: se_ControlPlaneTagFilter(input.TagFilter, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleAction - */ -const se_RuleAction = (input: RuleAction, context: __SerdeContext): any => { - return { - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.AssignContactCategoryAction != null && { - AssignContactCategoryAction: se_AssignContactCategoryActionDefinition(input.AssignContactCategoryAction, context), - }), - ...(input.EventBridgeAction != null && { - EventBridgeAction: se_EventBridgeActionDefinition(input.EventBridgeAction, context), - }), - ...(input.SendNotificationAction != null && { - SendNotificationAction: se_SendNotificationActionDefinition(input.SendNotificationAction, context), - }), - ...(input.TaskAction != null && { TaskAction: se_TaskActionDefinition(input.TaskAction, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleActions - */ -const se_RuleActions = (input: RuleAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleAction(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleTriggerEventSource - */ -const se_RuleTriggerEventSource = (input: RuleTriggerEventSource, context: __SerdeContext): any => { - return { - ...(input.EventSourceName != null && { EventSourceName: input.EventSourceName }), - ...(input.IntegrationAssociationId != null && { IntegrationAssociationId: input.IntegrationAssociationId }), - }; -}; - -/** - * serializeAws_restJson1S3Config - */ -const se_S3Config = (input: S3Config, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.BucketPrefix != null && { BucketPrefix: input.BucketPrefix }), - ...(input.EncryptionConfig != null && { EncryptionConfig: se_EncryptionConfig(input.EncryptionConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1SecurityProfileIds - */ -const se_SecurityProfileIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SecurityProfileSearchConditionList - */ -const se_SecurityProfileSearchConditionList = ( - input: SecurityProfileSearchCriteria[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SecurityProfileSearchCriteria(entry, context); - }); -}; - -/** - * serializeAws_restJson1SecurityProfileSearchCriteria - */ -const se_SecurityProfileSearchCriteria = (input: SecurityProfileSearchCriteria, context: __SerdeContext): any => { - return { - ...(input.AndConditions != null && { - AndConditions: se_SecurityProfileSearchConditionList(input.AndConditions, context), - }), - ...(input.OrConditions != null && { - OrConditions: se_SecurityProfileSearchConditionList(input.OrConditions, context), - }), - ...(input.StringCondition != null && { StringCondition: se_StringCondition(input.StringCondition, context) }), - }; -}; - -/** - * serializeAws_restJson1SecurityProfilesSearchFilter - */ -const se_SecurityProfilesSearchFilter = (input: SecurityProfilesSearchFilter, context: __SerdeContext): any => { - return { - ...(input.TagFilter != null && { TagFilter: se_ControlPlaneTagFilter(input.TagFilter, context) }), - }; -}; - -/** - * serializeAws_restJson1SendNotificationActionDefinition - */ -const se_SendNotificationActionDefinition = (input: SendNotificationActionDefinition, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.DeliveryMethod != null && { DeliveryMethod: input.DeliveryMethod }), - ...(input.Recipient != null && { Recipient: se_NotificationRecipientType(input.Recipient, context) }), - ...(input.Subject != null && { Subject: input.Subject }), - }; -}; - -/** - * serializeAws_restJson1SingleSelectOptions - */ -const se_SingleSelectOptions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StringCondition - */ -const se_StringCondition = (input: StringCondition, context: __SerdeContext): any => { - return { - ...(input.ComparisonType != null && { ComparisonType: input.ComparisonType }), - ...(input.FieldName != null && { FieldName: input.FieldName }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1SupportedMessagingContentTypes - */ -const se_SupportedMessagingContentTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagAndConditionList - */ -const se_TagAndConditionList = (input: TagCondition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagCondition(entry, context); - }); -}; - -/** - * serializeAws_restJson1TagCondition - */ -const se_TagCondition = (input: TagCondition, context: __SerdeContext): any => { - return { - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValue != null && { TagValue: input.TagValue }), - }; -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TagOrConditionList - */ -const se_TagOrConditionList = (input: TagCondition[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagAndConditionList(entry, context); - }); -}; - -/** - * serializeAws_restJson1TagRestrictedResourceList - */ -const se_TagRestrictedResourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TaskActionDefinition - */ -const se_TaskActionDefinition = (input: TaskActionDefinition, context: __SerdeContext): any => { - return { - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.References != null && { References: se_ContactReferences(input.References, context) }), - }; -}; - -/** - * serializeAws_restJson1TaskTemplateConstraints - */ -const se_TaskTemplateConstraints = (input: TaskTemplateConstraints, context: __SerdeContext): any => { - return { - ...(input.InvisibleFields != null && { - InvisibleFields: se_InvisibleTaskTemplateFields(input.InvisibleFields, context), - }), - ...(input.ReadOnlyFields != null && { - ReadOnlyFields: se_ReadOnlyTaskTemplateFields(input.ReadOnlyFields, context), - }), - ...(input.RequiredFields != null && { - RequiredFields: se_RequiredTaskTemplateFields(input.RequiredFields, context), - }), - }; -}; - -/** - * serializeAws_restJson1TaskTemplateDefaultFieldValue - */ -const se_TaskTemplateDefaultFieldValue = (input: TaskTemplateDefaultFieldValue, context: __SerdeContext): any => { - return { - ...(input.DefaultValue != null && { DefaultValue: input.DefaultValue }), - ...(input.Id != null && { Id: se_TaskTemplateFieldIdentifier(input.Id, context) }), - }; -}; - -/** - * serializeAws_restJson1TaskTemplateDefaultFieldValueList - */ -const se_TaskTemplateDefaultFieldValueList = (input: TaskTemplateDefaultFieldValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TaskTemplateDefaultFieldValue(entry, context); - }); -}; - -/** - * serializeAws_restJson1TaskTemplateDefaults - */ -const se_TaskTemplateDefaults = (input: TaskTemplateDefaults, context: __SerdeContext): any => { - return { - ...(input.DefaultFieldValues != null && { - DefaultFieldValues: se_TaskTemplateDefaultFieldValueList(input.DefaultFieldValues, context), - }), - }; -}; - -/** - * serializeAws_restJson1TaskTemplateField - */ -const se_TaskTemplateField = (input: TaskTemplateField, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: se_TaskTemplateFieldIdentifier(input.Id, context) }), - ...(input.SingleSelectOptions != null && { - SingleSelectOptions: se_SingleSelectOptions(input.SingleSelectOptions, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1TaskTemplateFieldIdentifier - */ -const se_TaskTemplateFieldIdentifier = (input: TaskTemplateFieldIdentifier, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1TaskTemplateFields - */ -const se_TaskTemplateFields = (input: TaskTemplateField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TaskTemplateField(entry, context); - }); -}; - -/** - * serializeAws_restJson1TelephonyConfig - */ -const se_TelephonyConfig = (input: TelephonyConfig, context: __SerdeContext): any => { - return { - ...(input.Distributions != null && { Distributions: se_DistributionList(input.Distributions, context) }), - }; -}; - -/** - * serializeAws_restJson1Threshold - */ -const se_Threshold = (input: Threshold, context: __SerdeContext): any => { - return { - ...(input.Comparison != null && { Comparison: input.Comparison }), - ...(input.ThresholdValue != null && { ThresholdValue: __serializeFloat(input.ThresholdValue) }), - }; -}; - -/** - * serializeAws_restJson1ThresholdCollections - */ -const se_ThresholdCollections = (input: ThresholdV2[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ThresholdV2(entry, context); - }); -}; - -/** - * serializeAws_restJson1ThresholdV2 - */ -const se_ThresholdV2 = (input: ThresholdV2, context: __SerdeContext): any => { - return { - ...(input.Comparison != null && { Comparison: input.Comparison }), - ...(input.ThresholdValue != null && { ThresholdValue: __serializeFloat(input.ThresholdValue) }), - }; -}; - -/** - * serializeAws_restJson1UpdateParticipantRoleConfigChannelInfo - */ -const se_UpdateParticipantRoleConfigChannelInfo = ( - input: UpdateParticipantRoleConfigChannelInfo, - context: __SerdeContext -): any => { - return UpdateParticipantRoleConfigChannelInfo.visit(input, { - Chat: (value) => ({ Chat: se_ChatParticipantRoleConfig(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1UserDataFilters - */ -const se_UserDataFilters = (input: UserDataFilters, context: __SerdeContext): any => { - return { - ...(input.Agents != null && { Agents: se_AgentsMinOneMaxHundred(input.Agents, context) }), - ...(input.ContactFilter != null && { ContactFilter: se_ContactFilter(input.ContactFilter, context) }), - ...(input.Queues != null && { Queues: se_Queues(input.Queues, context) }), - ...(input.RoutingProfiles != null && { RoutingProfiles: se_RoutingProfiles(input.RoutingProfiles, context) }), - ...(input.UserHierarchyGroups != null && { - UserHierarchyGroups: se_UserDataHierarchyGroups(input.UserHierarchyGroups, context), - }), - }; -}; - -/** - * serializeAws_restJson1UserDataHierarchyGroups - */ -const se_UserDataHierarchyGroups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1UserIdentityInfo - */ -const se_UserIdentityInfo = (input: UserIdentityInfo, context: __SerdeContext): any => { - return { - ...(input.Email != null && { Email: input.Email }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.Mobile != null && { Mobile: input.Mobile }), - ...(input.SecondaryEmail != null && { SecondaryEmail: input.SecondaryEmail }), - }; -}; - -/** - * serializeAws_restJson1UserIdList - */ -const se_UserIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1UserPhoneConfig - */ -const se_UserPhoneConfig = (input: UserPhoneConfig, context: __SerdeContext): any => { - return { - ...(input.AfterContactWorkTimeLimit != null && { AfterContactWorkTimeLimit: input.AfterContactWorkTimeLimit }), - ...(input.AutoAccept != null && { AutoAccept: input.AutoAccept }), - ...(input.DeskPhoneNumber != null && { DeskPhoneNumber: input.DeskPhoneNumber }), - ...(input.PhoneType != null && { PhoneType: input.PhoneType }), - }; -}; - -/** - * serializeAws_restJson1UserQuickConnectConfig - */ -const se_UserQuickConnectConfig = (input: UserQuickConnectConfig, context: __SerdeContext): any => { - return { - ...(input.ContactFlowId != null && { ContactFlowId: input.ContactFlowId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; - -/** - * serializeAws_restJson1UserSearchConditionList - */ -const se_UserSearchConditionList = (input: UserSearchCriteria[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UserSearchCriteria(entry, context); - }); -}; - -/** - * serializeAws_restJson1UserSearchCriteria - */ -const se_UserSearchCriteria = (input: UserSearchCriteria, context: __SerdeContext): any => { - return { - ...(input.AndConditions != null && { AndConditions: se_UserSearchConditionList(input.AndConditions, context) }), - ...(input.HierarchyGroupCondition != null && { - HierarchyGroupCondition: se_HierarchyGroupCondition(input.HierarchyGroupCondition, context), - }), - ...(input.OrConditions != null && { OrConditions: se_UserSearchConditionList(input.OrConditions, context) }), - ...(input.StringCondition != null && { StringCondition: se_StringCondition(input.StringCondition, context) }), - }; -}; - -/** - * serializeAws_restJson1UserSearchFilter - */ -const se_UserSearchFilter = (input: UserSearchFilter, context: __SerdeContext): any => { - return { - ...(input.TagFilter != null && { TagFilter: se_ControlPlaneTagFilter(input.TagFilter, context) }), - }; -}; - -/** - * serializeAws_restJson1UserTagMap - */ -const se_UserTagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1VoiceRecordingConfiguration - */ -const se_VoiceRecordingConfiguration = (input: VoiceRecordingConfiguration, context: __SerdeContext): any => { - return { - ...(input.VoiceRecordingTrack != null && { VoiceRecordingTrack: input.VoiceRecordingTrack }), - }; -}; - -/** - * deserializeAws_restJson1ActionSummaries - */ -const de_ActionSummaries = (output: any, context: __SerdeContext): ActionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ActionSummary - */ -const de_ActionSummary = (output: any, context: __SerdeContext): ActionSummary => { - return { - ActionType: __expectString(output.ActionType), - } as any; -}; - -/** - * deserializeAws_restJson1AgentContactReference - */ -const de_AgentContactReference = (output: any, context: __SerdeContext): AgentContactReference => { - return { - AgentContactState: __expectString(output.AgentContactState), - Channel: __expectString(output.Channel), - ConnectedToAgentTimestamp: - output.ConnectedToAgentTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectedToAgentTimestamp))) - : undefined, - ContactId: __expectString(output.ContactId), - InitiationMethod: __expectString(output.InitiationMethod), - Queue: output.Queue != null ? de_QueueReference(output.Queue, context) : undefined, - StateStartTimestamp: - output.StateStartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StateStartTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AgentContactReferenceList - */ -const de_AgentContactReferenceList = (output: any, context: __SerdeContext): AgentContactReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentContactReference(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AgentInfo - */ -const de_AgentInfo = (output: any, context: __SerdeContext): AgentInfo => { - return { - ConnectedToAgentTimestamp: - output.ConnectedToAgentTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectedToAgentTimestamp))) - : undefined, - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_restJson1AgentStatus - */ -const de_AgentStatus = (output: any, context: __SerdeContext): AgentStatus => { - return { - AgentStatusARN: __expectString(output.AgentStatusARN), - AgentStatusId: __expectString(output.AgentStatusId), - Description: __expectString(output.Description), - DisplayOrder: __expectInt32(output.DisplayOrder), - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AgentStatusReference - */ -const de_AgentStatusReference = (output: any, context: __SerdeContext): AgentStatusReference => { - return { - StatusArn: __expectString(output.StatusArn), - StatusName: __expectString(output.StatusName), - StatusStartTimestamp: - output.StatusStartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StatusStartTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AgentStatusSummary - */ -const de_AgentStatusSummary = (output: any, context: __SerdeContext): AgentStatusSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AgentStatusSummaryList - */ -const de_AgentStatusSummaryList = (output: any, context: __SerdeContext): AgentStatusSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentStatusSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AllowedAccessControlTags - */ -const de_AllowedAccessControlTags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AssignContactCategoryActionDefinition - */ -const de_AssignContactCategoryActionDefinition = ( - output: any, - context: __SerdeContext -): AssignContactCategoryActionDefinition => { - return {} as any; -}; - -/** - * deserializeAws_restJson1AttachmentReference - */ -const de_AttachmentReference = (output: any, context: __SerdeContext): AttachmentReference => { - return { - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - AttributeType: __expectString(output.AttributeType), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AttributesList - */ -const de_AttributesList = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AvailableNumbersList - */ -const de_AvailableNumbersList = (output: any, context: __SerdeContext): AvailableNumberSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AvailableNumberSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AvailableNumberSummary - */ -const de_AvailableNumberSummary = (output: any, context: __SerdeContext): AvailableNumberSummary => { - return { - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), - PhoneNumberType: __expectString(output.PhoneNumberType), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelToCountMap - */ -const de_ChannelToCountMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [Channel | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1ClaimedPhoneNumberSummary - */ -const de_ClaimedPhoneNumberSummary = (output: any, context: __SerdeContext): ClaimedPhoneNumberSummary => { - return { - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberArn: __expectString(output.PhoneNumberArn), - PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), - PhoneNumberDescription: __expectString(output.PhoneNumberDescription), - PhoneNumberId: __expectString(output.PhoneNumberId), - PhoneNumberStatus: - output.PhoneNumberStatus != null ? de_PhoneNumberStatus(output.PhoneNumberStatus, context) : undefined, - PhoneNumberType: __expectString(output.PhoneNumberType), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - TargetArn: __expectString(output.TargetArn), - } as any; -}; - -/** - * deserializeAws_restJson1Contact - */ -const de_Contact = (output: any, context: __SerdeContext): Contact => { - return { - AgentInfo: output.AgentInfo != null ? de_AgentInfo(output.AgentInfo, context) : undefined, - Arn: __expectString(output.Arn), - Channel: __expectString(output.Channel), - Description: __expectString(output.Description), - DisconnectTimestamp: - output.DisconnectTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisconnectTimestamp))) - : undefined, - Id: __expectString(output.Id), - InitialContactId: __expectString(output.InitialContactId), - InitiationMethod: __expectString(output.InitiationMethod), - InitiationTimestamp: - output.InitiationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InitiationTimestamp))) - : undefined, - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - Name: __expectString(output.Name), - PreviousContactId: __expectString(output.PreviousContactId), - QueueInfo: output.QueueInfo != null ? de_QueueInfo(output.QueueInfo, context) : undefined, - RelatedContactId: __expectString(output.RelatedContactId), - ScheduledTimestamp: - output.ScheduledTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTimestamp))) - : undefined, - WisdomInfo: output.WisdomInfo != null ? de_WisdomInfo(output.WisdomInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ContactFlow - */ -const de_ContactFlow = (output: any, context: __SerdeContext): ContactFlow => { - return { - Arn: __expectString(output.Arn), - Content: __expectString(output.Content), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ContactFlowModule - */ -const de_ContactFlowModule = (output: any, context: __SerdeContext): ContactFlowModule => { - return { - Arn: __expectString(output.Arn), - Content: __expectString(output.Content), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ContactFlowModulesSummaryList - */ -const de_ContactFlowModulesSummaryList = (output: any, context: __SerdeContext): ContactFlowModuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContactFlowModuleSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ContactFlowModuleSummary - */ -const de_ContactFlowModuleSummary = (output: any, context: __SerdeContext): ContactFlowModuleSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1ContactFlowSummary - */ -const de_ContactFlowSummary = (output: any, context: __SerdeContext): ContactFlowSummary => { - return { - Arn: __expectString(output.Arn), - ContactFlowState: __expectString(output.ContactFlowState), - ContactFlowType: __expectString(output.ContactFlowType), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1ContactFlowSummaryList - */ -const de_ContactFlowSummaryList = (output: any, context: __SerdeContext): ContactFlowSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContactFlowSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ContactReferences - */ -const de_ContactReferences = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Reference(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Credentials - */ -const de_Credentials = (output: any, context: __SerdeContext): Credentials => { - return { - AccessToken: __expectString(output.AccessToken), - AccessTokenExpiration: - output.AccessTokenExpiration != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AccessTokenExpiration))) - : undefined, - RefreshToken: __expectString(output.RefreshToken), - RefreshTokenExpiration: - output.RefreshTokenExpiration != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RefreshTokenExpiration))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CrossChannelBehavior - */ -const de_CrossChannelBehavior = (output: any, context: __SerdeContext): CrossChannelBehavior => { - return { - BehaviorType: __expectString(output.BehaviorType), - } as any; -}; - -/** - * deserializeAws_restJson1CurrentMetric - */ -const de_CurrentMetric = (output: any, context: __SerdeContext): CurrentMetric => { - return { - Name: __expectString(output.Name), - Unit: __expectString(output.Unit), - } as any; -}; - -/** - * deserializeAws_restJson1CurrentMetricData - */ -const de_CurrentMetricData = (output: any, context: __SerdeContext): CurrentMetricData => { - return { - Metric: output.Metric != null ? de_CurrentMetric(output.Metric, context) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1CurrentMetricDataCollections - */ -const de_CurrentMetricDataCollections = (output: any, context: __SerdeContext): CurrentMetricData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CurrentMetricData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CurrentMetricResult - */ -const de_CurrentMetricResult = (output: any, context: __SerdeContext): CurrentMetricResult => { - return { - Collections: output.Collections != null ? de_CurrentMetricDataCollections(output.Collections, context) : undefined, - Dimensions: output.Dimensions != null ? de_Dimensions(output.Dimensions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CurrentMetricResults - */ -const de_CurrentMetricResults = (output: any, context: __SerdeContext): CurrentMetricResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CurrentMetricResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DateReference - */ -const de_DateReference = (output: any, context: __SerdeContext): DateReference => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1DefaultVocabulary - */ -const de_DefaultVocabulary = (output: any, context: __SerdeContext): DefaultVocabulary => { - return { - InstanceId: __expectString(output.InstanceId), - LanguageCode: __expectString(output.LanguageCode), - VocabularyId: __expectString(output.VocabularyId), - VocabularyName: __expectString(output.VocabularyName), - } as any; -}; - -/** - * deserializeAws_restJson1DefaultVocabularyList - */ -const de_DefaultVocabularyList = (output: any, context: __SerdeContext): DefaultVocabulary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DefaultVocabulary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Dimensions - */ -const de_Dimensions = (output: any, context: __SerdeContext): Dimensions => { - return { - Channel: __expectString(output.Channel), - Queue: output.Queue != null ? de_QueueReference(output.Queue, context) : undefined, - RoutingProfile: - output.RoutingProfile != null ? de_RoutingProfileReference(output.RoutingProfile, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DimensionsV2Map - */ -const de_DimensionsV2Map = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Distribution - */ -const de_Distribution = (output: any, context: __SerdeContext): Distribution => { - return { - Percentage: __expectInt32(output.Percentage), - Region: __expectString(output.Region), - } as any; -}; - -/** - * deserializeAws_restJson1DistributionList - */ -const de_DistributionList = (output: any, context: __SerdeContext): Distribution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Distribution(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EmailReference - */ -const de_EmailReference = (output: any, context: __SerdeContext): EmailReference => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1EncryptionConfig - */ -const de_EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => { - return { - EncryptionType: __expectString(output.EncryptionType), - KeyId: __expectString(output.KeyId), - } as any; -}; - -/** - * deserializeAws_restJson1EventBridgeActionDefinition - */ -const de_EventBridgeActionDefinition = (output: any, context: __SerdeContext): EventBridgeActionDefinition => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1FunctionArnsList - */ -const de_FunctionArnsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HierarchyGroup - */ -const de_HierarchyGroup = (output: any, context: __SerdeContext): HierarchyGroup => { - return { - Arn: __expectString(output.Arn), - HierarchyPath: output.HierarchyPath != null ? de_HierarchyPath(output.HierarchyPath, context) : undefined, - Id: __expectString(output.Id), - LevelId: __expectString(output.LevelId), - Name: __expectString(output.Name), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HierarchyGroupSummary - */ -const de_HierarchyGroupSummary = (output: any, context: __SerdeContext): HierarchyGroupSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1HierarchyGroupSummaryList - */ -const de_HierarchyGroupSummaryList = (output: any, context: __SerdeContext): HierarchyGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HierarchyGroupSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HierarchyGroupSummaryReference - */ -const de_HierarchyGroupSummaryReference = (output: any, context: __SerdeContext): HierarchyGroupSummaryReference => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_restJson1HierarchyLevel - */ -const de_HierarchyLevel = (output: any, context: __SerdeContext): HierarchyLevel => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1HierarchyPath - */ -const de_HierarchyPath = (output: any, context: __SerdeContext): HierarchyPath => { - return { - LevelFive: output.LevelFive != null ? de_HierarchyGroupSummary(output.LevelFive, context) : undefined, - LevelFour: output.LevelFour != null ? de_HierarchyGroupSummary(output.LevelFour, context) : undefined, - LevelOne: output.LevelOne != null ? de_HierarchyGroupSummary(output.LevelOne, context) : undefined, - LevelThree: output.LevelThree != null ? de_HierarchyGroupSummary(output.LevelThree, context) : undefined, - LevelTwo: output.LevelTwo != null ? de_HierarchyGroupSummary(output.LevelTwo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HierarchyPathReference - */ -const de_HierarchyPathReference = (output: any, context: __SerdeContext): HierarchyPathReference => { - return { - LevelFive: output.LevelFive != null ? de_HierarchyGroupSummaryReference(output.LevelFive, context) : undefined, - LevelFour: output.LevelFour != null ? de_HierarchyGroupSummaryReference(output.LevelFour, context) : undefined, - LevelOne: output.LevelOne != null ? de_HierarchyGroupSummaryReference(output.LevelOne, context) : undefined, - LevelThree: output.LevelThree != null ? de_HierarchyGroupSummaryReference(output.LevelThree, context) : undefined, - LevelTwo: output.LevelTwo != null ? de_HierarchyGroupSummaryReference(output.LevelTwo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HierarchyStructure - */ -const de_HierarchyStructure = (output: any, context: __SerdeContext): HierarchyStructure => { - return { - LevelFive: output.LevelFive != null ? de_HierarchyLevel(output.LevelFive, context) : undefined, - LevelFour: output.LevelFour != null ? de_HierarchyLevel(output.LevelFour, context) : undefined, - LevelOne: output.LevelOne != null ? de_HierarchyLevel(output.LevelOne, context) : undefined, - LevelThree: output.LevelThree != null ? de_HierarchyLevel(output.LevelThree, context) : undefined, - LevelTwo: output.LevelTwo != null ? de_HierarchyLevel(output.LevelTwo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HistoricalMetric - */ -const de_HistoricalMetric = (output: any, context: __SerdeContext): HistoricalMetric => { - return { - Name: __expectString(output.Name), - Statistic: __expectString(output.Statistic), - Threshold: output.Threshold != null ? de_Threshold(output.Threshold, context) : undefined, - Unit: __expectString(output.Unit), - } as any; -}; - -/** - * deserializeAws_restJson1HistoricalMetricData - */ -const de_HistoricalMetricData = (output: any, context: __SerdeContext): HistoricalMetricData => { - return { - Metric: output.Metric != null ? de_HistoricalMetric(output.Metric, context) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1HistoricalMetricDataCollections - */ -const de_HistoricalMetricDataCollections = (output: any, context: __SerdeContext): HistoricalMetricData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HistoricalMetricData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HistoricalMetricResult - */ -const de_HistoricalMetricResult = (output: any, context: __SerdeContext): HistoricalMetricResult => { - return { - Collections: - output.Collections != null ? de_HistoricalMetricDataCollections(output.Collections, context) : undefined, - Dimensions: output.Dimensions != null ? de_Dimensions(output.Dimensions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HistoricalMetricResults - */ -const de_HistoricalMetricResults = (output: any, context: __SerdeContext): HistoricalMetricResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HistoricalMetricResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HoursOfOperation - */ -const de_HoursOfOperation = (output: any, context: __SerdeContext): HoursOfOperation => { - return { - Config: output.Config != null ? de_HoursOfOperationConfigList(output.Config, context) : undefined, - Description: __expectString(output.Description), - HoursOfOperationArn: __expectString(output.HoursOfOperationArn), - HoursOfOperationId: __expectString(output.HoursOfOperationId), - Name: __expectString(output.Name), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - TimeZone: __expectString(output.TimeZone), - } as any; -}; - -/** - * deserializeAws_restJson1HoursOfOperationConfig - */ -const de_HoursOfOperationConfig = (output: any, context: __SerdeContext): HoursOfOperationConfig => { - return { - Day: __expectString(output.Day), - EndTime: output.EndTime != null ? de_HoursOfOperationTimeSlice(output.EndTime, context) : undefined, - StartTime: output.StartTime != null ? de_HoursOfOperationTimeSlice(output.StartTime, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HoursOfOperationConfigList - */ -const de_HoursOfOperationConfigList = (output: any, context: __SerdeContext): HoursOfOperationConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HoursOfOperationConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HoursOfOperationSummary - */ -const de_HoursOfOperationSummary = (output: any, context: __SerdeContext): HoursOfOperationSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1HoursOfOperationSummaryList - */ -const de_HoursOfOperationSummaryList = (output: any, context: __SerdeContext): HoursOfOperationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HoursOfOperationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HoursOfOperationTimeSlice - */ -const de_HoursOfOperationTimeSlice = (output: any, context: __SerdeContext): HoursOfOperationTimeSlice => { - return { - Hours: __expectInt32(output.Hours), - Minutes: __expectInt32(output.Minutes), - } as any; -}; - -/** - * deserializeAws_restJson1Instance - */ -const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Id: __expectString(output.Id), - IdentityManagementType: __expectString(output.IdentityManagementType), - InboundCallsEnabled: __expectBoolean(output.InboundCallsEnabled), - InstanceAlias: __expectString(output.InstanceAlias), - InstanceStatus: __expectString(output.InstanceStatus), - OutboundCallsEnabled: __expectBoolean(output.OutboundCallsEnabled), - ServiceRole: __expectString(output.ServiceRole), - StatusReason: output.StatusReason != null ? de_InstanceStatusReason(output.StatusReason, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1InstanceStatusReason - */ -const de_InstanceStatusReason = (output: any, context: __SerdeContext): InstanceStatusReason => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_restJson1InstanceStorageConfig - */ -const de_InstanceStorageConfig = (output: any, context: __SerdeContext): InstanceStorageConfig => { - return { - AssociationId: __expectString(output.AssociationId), - KinesisFirehoseConfig: - output.KinesisFirehoseConfig != null - ? de_KinesisFirehoseConfig(output.KinesisFirehoseConfig, context) - : undefined, - KinesisStreamConfig: - output.KinesisStreamConfig != null ? de_KinesisStreamConfig(output.KinesisStreamConfig, context) : undefined, - KinesisVideoStreamConfig: - output.KinesisVideoStreamConfig != null - ? de_KinesisVideoStreamConfig(output.KinesisVideoStreamConfig, context) - : undefined, - S3Config: output.S3Config != null ? de_S3Config(output.S3Config, context) : undefined, - StorageType: __expectString(output.StorageType), - } as any; -}; - -/** - * deserializeAws_restJson1InstanceStorageConfigs - */ -const de_InstanceStorageConfigs = (output: any, context: __SerdeContext): InstanceStorageConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceStorageConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1InstanceSummary - */ -const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Id: __expectString(output.Id), - IdentityManagementType: __expectString(output.IdentityManagementType), - InboundCallsEnabled: __expectBoolean(output.InboundCallsEnabled), - InstanceAlias: __expectString(output.InstanceAlias), - InstanceStatus: __expectString(output.InstanceStatus), - OutboundCallsEnabled: __expectBoolean(output.OutboundCallsEnabled), - ServiceRole: __expectString(output.ServiceRole), - } as any; -}; - -/** - * deserializeAws_restJson1InstanceSummaryList - */ -const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1IntegrationAssociationSummary - */ -const de_IntegrationAssociationSummary = (output: any, context: __SerdeContext): IntegrationAssociationSummary => { - return { - InstanceId: __expectString(output.InstanceId), - IntegrationArn: __expectString(output.IntegrationArn), - IntegrationAssociationArn: __expectString(output.IntegrationAssociationArn), - IntegrationAssociationId: __expectString(output.IntegrationAssociationId), - IntegrationType: __expectString(output.IntegrationType), - SourceApplicationName: __expectString(output.SourceApplicationName), - SourceApplicationUrl: __expectString(output.SourceApplicationUrl), - SourceType: __expectString(output.SourceType), - } as any; -}; - -/** - * deserializeAws_restJson1IntegrationAssociationSummaryList - */ -const de_IntegrationAssociationSummaryList = ( - output: any, - context: __SerdeContext -): IntegrationAssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IntegrationAssociationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1InvisibleFieldInfo - */ -const de_InvisibleFieldInfo = (output: any, context: __SerdeContext): InvisibleFieldInfo => { - return { - Id: output.Id != null ? de_TaskTemplateFieldIdentifier(output.Id, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1InvisibleTaskTemplateFields - */ -const de_InvisibleTaskTemplateFields = (output: any, context: __SerdeContext): InvisibleFieldInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InvisibleFieldInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1KinesisFirehoseConfig - */ -const de_KinesisFirehoseConfig = (output: any, context: __SerdeContext): KinesisFirehoseConfig => { - return { - FirehoseArn: __expectString(output.FirehoseArn), - } as any; -}; - -/** - * deserializeAws_restJson1KinesisStreamConfig - */ -const de_KinesisStreamConfig = (output: any, context: __SerdeContext): KinesisStreamConfig => { - return { - StreamArn: __expectString(output.StreamArn), - } as any; -}; - -/** - * deserializeAws_restJson1KinesisVideoStreamConfig - */ -const de_KinesisVideoStreamConfig = (output: any, context: __SerdeContext): KinesisVideoStreamConfig => { - return { - EncryptionConfig: - output.EncryptionConfig != null ? de_EncryptionConfig(output.EncryptionConfig, context) : undefined, - Prefix: __expectString(output.Prefix), - RetentionPeriodHours: __expectInt32(output.RetentionPeriodHours), - } as any; -}; - -/** - * deserializeAws_restJson1LexBot - */ -const de_LexBot = (output: any, context: __SerdeContext): LexBot => { - return { - LexRegion: __expectString(output.LexRegion), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1LexBotConfig - */ -const de_LexBotConfig = (output: any, context: __SerdeContext): LexBotConfig => { - return { - LexBot: output.LexBot != null ? de_LexBot(output.LexBot, context) : undefined, - LexV2Bot: output.LexV2Bot != null ? de_LexV2Bot(output.LexV2Bot, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LexBotConfigList - */ -const de_LexBotConfigList = (output: any, context: __SerdeContext): LexBotConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LexBotConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LexBotsList - */ -const de_LexBotsList = (output: any, context: __SerdeContext): LexBot[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LexBot(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LexV2Bot - */ -const de_LexV2Bot = (output: any, context: __SerdeContext): LexV2Bot => { - return { - AliasArn: __expectString(output.AliasArn), - } as any; -}; - -/** - * deserializeAws_restJson1ListPhoneNumbersSummary - */ -const de_ListPhoneNumbersSummary = (output: any, context: __SerdeContext): ListPhoneNumbersSummary => { - return { - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberArn: __expectString(output.PhoneNumberArn), - PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), - PhoneNumberId: __expectString(output.PhoneNumberId), - PhoneNumberType: __expectString(output.PhoneNumberType), - TargetArn: __expectString(output.TargetArn), - } as any; -}; - -/** - * deserializeAws_restJson1ListPhoneNumbersSummaryList - */ -const de_ListPhoneNumbersSummaryList = (output: any, context: __SerdeContext): ListPhoneNumbersSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListPhoneNumbersSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaConcurrencies - */ -const de_MediaConcurrencies = (output: any, context: __SerdeContext): MediaConcurrency[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MediaConcurrency(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MediaConcurrency - */ -const de_MediaConcurrency = (output: any, context: __SerdeContext): MediaConcurrency => { - return { - Channel: __expectString(output.Channel), - Concurrency: __expectInt32(output.Concurrency), - CrossChannelBehavior: - output.CrossChannelBehavior != null ? de_CrossChannelBehavior(output.CrossChannelBehavior, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MetricDataCollectionsV2 - */ -const de_MetricDataCollectionsV2 = (output: any, context: __SerdeContext): MetricDataV2[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDataV2(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MetricDataV2 - */ -const de_MetricDataV2 = (output: any, context: __SerdeContext): MetricDataV2 => { - return { - Metric: output.Metric != null ? de_MetricV2(output.Metric, context) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1MetricFiltersV2List - */ -const de_MetricFiltersV2List = (output: any, context: __SerdeContext): MetricFilterV2[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricFilterV2(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MetricFilterV2 - */ -const de_MetricFilterV2 = (output: any, context: __SerdeContext): MetricFilterV2 => { - return { - MetricFilterKey: __expectString(output.MetricFilterKey), - MetricFilterValues: - output.MetricFilterValues != null ? de_MetricFilterValueList(output.MetricFilterValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MetricFilterValueList - */ -const de_MetricFilterValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MetricResultsV2 - */ -const de_MetricResultsV2 = (output: any, context: __SerdeContext): MetricResultV2[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricResultV2(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1MetricResultV2 - */ -const de_MetricResultV2 = (output: any, context: __SerdeContext): MetricResultV2 => { - return { - Collections: output.Collections != null ? de_MetricDataCollectionsV2(output.Collections, context) : undefined, - Dimensions: output.Dimensions != null ? de_DimensionsV2Map(output.Dimensions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MetricV2 - */ -const de_MetricV2 = (output: any, context: __SerdeContext): MetricV2 => { - return { - MetricFilters: output.MetricFilters != null ? de_MetricFiltersV2List(output.MetricFilters, context) : undefined, - Name: __expectString(output.Name), - Threshold: output.Threshold != null ? de_ThresholdCollections(output.Threshold, context) : undefined, - } as any; -}; +// de_AgentStatusSummary omitted. -/** - * deserializeAws_restJson1NotificationRecipientType - */ -const de_NotificationRecipientType = (output: any, context: __SerdeContext): NotificationRecipientType => { - return { - UserIds: output.UserIds != null ? de_UserIdList(output.UserIds, context) : undefined, - UserTags: output.UserTags != null ? de_UserTagMap(output.UserTags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1NumberReference - */ -const de_NumberReference = (output: any, context: __SerdeContext): NumberReference => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1OriginsList - */ -const de_OriginsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AgentStatusSummaryList omitted. -/** - * deserializeAws_restJson1OutboundCallerConfig - */ -const de_OutboundCallerConfig = (output: any, context: __SerdeContext): OutboundCallerConfig => { - return { - OutboundCallerIdName: __expectString(output.OutboundCallerIdName), - OutboundCallerIdNumberId: __expectString(output.OutboundCallerIdNumberId), - OutboundFlowId: __expectString(output.OutboundFlowId), - } as any; -}; - -/** - * deserializeAws_restJson1PermissionsList - */ -const de_PermissionsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1PhoneNumberQuickConnectConfig - */ -const de_PhoneNumberQuickConnectConfig = (output: any, context: __SerdeContext): PhoneNumberQuickConnectConfig => { - return { - PhoneNumber: __expectString(output.PhoneNumber), - } as any; -}; +// de_AllowedAccessControlTags omitted. -/** - * deserializeAws_restJson1PhoneNumberStatus - */ -const de_PhoneNumberStatus = (output: any, context: __SerdeContext): PhoneNumberStatus => { - return { - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; -}; +// de_AssignContactCategoryActionDefinition omitted. -/** - * deserializeAws_restJson1PhoneNumberSummary - */ -const de_PhoneNumberSummary = (output: any, context: __SerdeContext): PhoneNumberSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberCountryCode: __expectString(output.PhoneNumberCountryCode), - PhoneNumberType: __expectString(output.PhoneNumberType), - } as any; -}; +// de_AttachmentReference omitted. -/** - * deserializeAws_restJson1PhoneNumberSummaryList - */ -const de_PhoneNumberSummaryList = (output: any, context: __SerdeContext): PhoneNumberSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumberSummary(entry, context); - }); - return retVal; -}; +// de_Attribute omitted. -/** - * deserializeAws_restJson1ProblemDetail - */ -const de_ProblemDetail = (output: any, context: __SerdeContext): ProblemDetail => { - return { - message: __expectString(output.message), - } as any; -}; +// de_Attributes omitted. -/** - * deserializeAws_restJson1Problems - */ -const de_Problems = (output: any, context: __SerdeContext): ProblemDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProblemDetail(entry, context); - }); - return retVal; -}; +// de_AttributesList omitted. -/** - * deserializeAws_restJson1PromptSummary - */ -const de_PromptSummary = (output: any, context: __SerdeContext): PromptSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_AvailableNumbersList omitted. -/** - * deserializeAws_restJson1PromptSummaryList - */ -const de_PromptSummaryList = (output: any, context: __SerdeContext): PromptSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PromptSummary(entry, context); - }); - return retVal; -}; +// de_AvailableNumberSummary omitted. -/** - * deserializeAws_restJson1PropertyValidationExceptionProperty - */ -const de_PropertyValidationExceptionProperty = ( - output: any, - context: __SerdeContext -): PropertyValidationExceptionProperty => { - return { - Message: __expectString(output.Message), - PropertyPath: __expectString(output.PropertyPath), - Reason: __expectString(output.Reason), - } as any; -}; +// de_ChannelToCountMap omitted. -/** - * deserializeAws_restJson1PropertyValidationExceptionPropertyList - */ -const de_PropertyValidationExceptionPropertyList = ( - output: any, - context: __SerdeContext -): PropertyValidationExceptionProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PropertyValidationExceptionProperty(entry, context); - }); - return retVal; -}; +// de_ClaimedPhoneNumberSummary omitted. /** - * deserializeAws_restJson1Queue + * deserializeAws_restJson1Contact */ -const de_Queue = (output: any, context: __SerdeContext): Queue => { - return { - Description: __expectString(output.Description), - HoursOfOperationId: __expectString(output.HoursOfOperationId), - MaxContacts: __expectInt32(output.MaxContacts), - Name: __expectString(output.Name), - OutboundCallerConfig: - output.OutboundCallerConfig != null ? de_OutboundCallerConfig(output.OutboundCallerConfig, context) : undefined, - QueueArn: __expectString(output.QueueArn), - QueueId: __expectString(output.QueueId), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; +const de_Contact = (output: any, context: __SerdeContext): Contact => { + return take(output, { + AgentInfo: (_: any) => de_AgentInfo(_, context), + Arn: __expectString, + Channel: __expectString, + Description: __expectString, + DisconnectTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + InitialContactId: __expectString, + InitiationMethod: __expectString, + InitiationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PreviousContactId: __expectString, + QueueInfo: (_: any) => de_QueueInfo(_, context), + RelatedContactId: __expectString, + ScheduledTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WisdomInfo: _json, + }) as any; }; -/** - * deserializeAws_restJson1QueueInfo - */ -const de_QueueInfo = (output: any, context: __SerdeContext): QueueInfo => { - return { - EnqueueTimestamp: - output.EnqueueTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnqueueTimestamp))) - : undefined, - Id: __expectString(output.Id), - } as any; -}; +// de_ContactFlow omitted. -/** - * deserializeAws_restJson1QueueQuickConnectConfig - */ -const de_QueueQuickConnectConfig = (output: any, context: __SerdeContext): QueueQuickConnectConfig => { - return { - ContactFlowId: __expectString(output.ContactFlowId), - QueueId: __expectString(output.QueueId), - } as any; -}; +// de_ContactFlowModule omitted. -/** - * deserializeAws_restJson1QueueReference - */ -const de_QueueReference = (output: any, context: __SerdeContext): QueueReference => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; -}; +// de_ContactFlowModulesSummaryList omitted. -/** - * deserializeAws_restJson1QueueSearchSummaryList - */ -const de_QueueSearchSummaryList = (output: any, context: __SerdeContext): Queue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Queue(entry, context); - }); - return retVal; -}; +// de_ContactFlowModuleSummary omitted. -/** - * deserializeAws_restJson1QueueSummary - */ -const de_QueueSummary = (output: any, context: __SerdeContext): QueueSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - QueueType: __expectString(output.QueueType), - } as any; -}; +// de_ContactFlowSummary omitted. -/** - * deserializeAws_restJson1QueueSummaryList - */ -const de_QueueSummaryList = (output: any, context: __SerdeContext): QueueSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueueSummary(entry, context); - }); - return retVal; -}; +// de_ContactFlowSummaryList omitted. -/** - * deserializeAws_restJson1QuickConnect - */ -const de_QuickConnect = (output: any, context: __SerdeContext): QuickConnect => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - QuickConnectARN: __expectString(output.QuickConnectARN), - QuickConnectConfig: - output.QuickConnectConfig != null ? de_QuickConnectConfig(output.QuickConnectConfig, context) : undefined, - QuickConnectId: __expectString(output.QuickConnectId), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_ContactReferences omitted. /** - * deserializeAws_restJson1QuickConnectConfig + * deserializeAws_restJson1Credentials */ -const de_QuickConnectConfig = (output: any, context: __SerdeContext): QuickConnectConfig => { - return { - PhoneConfig: output.PhoneConfig != null ? de_PhoneNumberQuickConnectConfig(output.PhoneConfig, context) : undefined, - QueueConfig: output.QueueConfig != null ? de_QueueQuickConnectConfig(output.QueueConfig, context) : undefined, - QuickConnectType: __expectString(output.QuickConnectType), - UserConfig: output.UserConfig != null ? de_UserQuickConnectConfig(output.UserConfig, context) : undefined, - } as any; +const de_Credentials = (output: any, context: __SerdeContext): Credentials => { + return take(output, { + AccessToken: __expectString, + AccessTokenExpiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RefreshToken: __expectString, + RefreshTokenExpiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1QuickConnectSummary - */ -const de_QuickConnectSummary = (output: any, context: __SerdeContext): QuickConnectSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - QuickConnectType: __expectString(output.QuickConnectType), - } as any; -}; +// de_CrossChannelBehavior omitted. -/** - * deserializeAws_restJson1QuickConnectSummaryList - */ -const de_QuickConnectSummaryList = (output: any, context: __SerdeContext): QuickConnectSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QuickConnectSummary(entry, context); - }); - return retVal; -}; +// de_CurrentMetric omitted. /** - * deserializeAws_restJson1ReadOnlyFieldInfo + * deserializeAws_restJson1CurrentMetricData */ -const de_ReadOnlyFieldInfo = (output: any, context: __SerdeContext): ReadOnlyFieldInfo => { - return { - Id: output.Id != null ? de_TaskTemplateFieldIdentifier(output.Id, context) : undefined, - } as any; +const de_CurrentMetricData = (output: any, context: __SerdeContext): CurrentMetricData => { + return take(output, { + Metric: _json, + Value: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1ReadOnlyTaskTemplateFields + * deserializeAws_restJson1CurrentMetricDataCollections */ -const de_ReadOnlyTaskTemplateFields = (output: any, context: __SerdeContext): ReadOnlyFieldInfo[] => { +const de_CurrentMetricDataCollections = (output: any, context: __SerdeContext): CurrentMetricData[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReadOnlyFieldInfo(entry, context); + return de_CurrentMetricData(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1Reference - */ -const de_Reference = (output: any, context: __SerdeContext): Reference => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1ReferenceSummary + * deserializeAws_restJson1CurrentMetricResult */ -const de_ReferenceSummary = (output: any, context: __SerdeContext): ReferenceSummary => { - if (output.Attachment != null) { - return { - Attachment: de_AttachmentReference(output.Attachment, context), - }; - } - if (output.Date != null) { - return { - Date: de_DateReference(output.Date, context), - }; - } - if (output.Email != null) { - return { - Email: de_EmailReference(output.Email, context), - }; - } - if (output.Number != null) { - return { - Number: de_NumberReference(output.Number, context), - }; - } - if (output.String != null) { - return { - String: de_StringReference(output.String, context), - }; - } - if (output.Url != null) { - return { - Url: de_UrlReference(output.Url, context), - }; - } - return { $unknown: Object.entries(output)[0] }; +const de_CurrentMetricResult = (output: any, context: __SerdeContext): CurrentMetricResult => { + return take(output, { + Collections: (_: any) => de_CurrentMetricDataCollections(_, context), + Dimensions: _json, + }) as any; }; /** - * deserializeAws_restJson1ReferenceSummaryList + * deserializeAws_restJson1CurrentMetricResults */ -const de_ReferenceSummaryList = (output: any, context: __SerdeContext): ReferenceSummary[] => { +const de_CurrentMetricResults = (output: any, context: __SerdeContext): CurrentMetricResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReferenceSummary(__expectUnion(entry), context); + return de_CurrentMetricResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RequiredFieldInfo - */ -const de_RequiredFieldInfo = (output: any, context: __SerdeContext): RequiredFieldInfo => { - return { - Id: output.Id != null ? de_TaskTemplateFieldIdentifier(output.Id, context) : undefined, - } as any; -}; +// de_DateReference omitted. -/** - * deserializeAws_restJson1RequiredTaskTemplateFields - */ -const de_RequiredTaskTemplateFields = (output: any, context: __SerdeContext): RequiredFieldInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RequiredFieldInfo(entry, context); - }); - return retVal; -}; +// de_DefaultVocabulary omitted. -/** - * deserializeAws_restJson1RoutingProfile - */ -const de_RoutingProfile = (output: any, context: __SerdeContext): RoutingProfile => { - return { - DefaultOutboundQueueId: __expectString(output.DefaultOutboundQueueId), - Description: __expectString(output.Description), - InstanceId: __expectString(output.InstanceId), - MediaConcurrencies: - output.MediaConcurrencies != null ? de_MediaConcurrencies(output.MediaConcurrencies, context) : undefined, - Name: __expectString(output.Name), - NumberOfAssociatedQueues: __expectLong(output.NumberOfAssociatedQueues), - NumberOfAssociatedUsers: __expectLong(output.NumberOfAssociatedUsers), - RoutingProfileArn: __expectString(output.RoutingProfileArn), - RoutingProfileId: __expectString(output.RoutingProfileId), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_DefaultVocabularyList omitted. -/** - * deserializeAws_restJson1RoutingProfileList - */ -const de_RoutingProfileList = (output: any, context: __SerdeContext): RoutingProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoutingProfile(entry, context); - }); - return retVal; -}; +// de_Dimensions omitted. -/** - * deserializeAws_restJson1RoutingProfileQueueConfigSummary - */ -const de_RoutingProfileQueueConfigSummary = ( - output: any, - context: __SerdeContext -): RoutingProfileQueueConfigSummary => { - return { - Channel: __expectString(output.Channel), - Delay: __expectInt32(output.Delay), - Priority: __expectInt32(output.Priority), - QueueArn: __expectString(output.QueueArn), - QueueId: __expectString(output.QueueId), - QueueName: __expectString(output.QueueName), - } as any; -}; +// de_DimensionsV2Map omitted. -/** - * deserializeAws_restJson1RoutingProfileQueueConfigSummaryList - */ -const de_RoutingProfileQueueConfigSummaryList = ( - output: any, - context: __SerdeContext -): RoutingProfileQueueConfigSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoutingProfileQueueConfigSummary(entry, context); - }); - return retVal; -}; +// de_Distribution omitted. -/** - * deserializeAws_restJson1RoutingProfileReference - */ -const de_RoutingProfileReference = (output: any, context: __SerdeContext): RoutingProfileReference => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; -}; +// de_DistributionList omitted. -/** - * deserializeAws_restJson1RoutingProfileSummary - */ -const de_RoutingProfileSummary = (output: any, context: __SerdeContext): RoutingProfileSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_EmailReference omitted. -/** - * deserializeAws_restJson1RoutingProfileSummaryList - */ -const de_RoutingProfileSummaryList = (output: any, context: __SerdeContext): RoutingProfileSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoutingProfileSummary(entry, context); - }); - return retVal; -}; +// de_EncryptionConfig omitted. -/** - * deserializeAws_restJson1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - Actions: output.Actions != null ? de_RuleActions(output.Actions, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Function: __expectString(output.Function), - LastUpdatedBy: __expectString(output.LastUpdatedBy), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - PublishStatus: __expectString(output.PublishStatus), - RuleArn: __expectString(output.RuleArn), - RuleId: __expectString(output.RuleId), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - TriggerEventSource: - output.TriggerEventSource != null ? de_RuleTriggerEventSource(output.TriggerEventSource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RuleAction - */ -const de_RuleAction = (output: any, context: __SerdeContext): RuleAction => { - return { - ActionType: __expectString(output.ActionType), - AssignContactCategoryAction: - output.AssignContactCategoryAction != null - ? de_AssignContactCategoryActionDefinition(output.AssignContactCategoryAction, context) - : undefined, - EventBridgeAction: - output.EventBridgeAction != null ? de_EventBridgeActionDefinition(output.EventBridgeAction, context) : undefined, - SendNotificationAction: - output.SendNotificationAction != null - ? de_SendNotificationActionDefinition(output.SendNotificationAction, context) - : undefined, - TaskAction: output.TaskAction != null ? de_TaskActionDefinition(output.TaskAction, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RuleActions - */ -const de_RuleActions = (output: any, context: __SerdeContext): RuleAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleAction(entry, context); - }); - return retVal; -}; +// de_EventBridgeActionDefinition omitted. -/** - * deserializeAws_restJson1RuleSummary - */ -const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { - return { - ActionSummaries: output.ActionSummaries != null ? de_ActionSummaries(output.ActionSummaries, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - EventSourceName: __expectString(output.EventSourceName), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - PublishStatus: __expectString(output.PublishStatus), - RuleArn: __expectString(output.RuleArn), - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_FunctionArnsList omitted. -/** - * deserializeAws_restJson1RuleSummaryList - */ -const de_RuleSummaryList = (output: any, context: __SerdeContext): RuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleSummary(entry, context); - }); - return retVal; -}; +// de_HierarchyGroup omitted. -/** - * deserializeAws_restJson1RuleTriggerEventSource - */ -const de_RuleTriggerEventSource = (output: any, context: __SerdeContext): RuleTriggerEventSource => { - return { - EventSourceName: __expectString(output.EventSourceName), - IntegrationAssociationId: __expectString(output.IntegrationAssociationId), - } as any; -}; +// de_HierarchyGroupSummary omitted. + +// de_HierarchyGroupSummaryList omitted. + +// de_HierarchyGroupSummaryReference omitted. + +// de_HierarchyLevel omitted. + +// de_HierarchyPath omitted. + +// de_HierarchyPathReference omitted. + +// de_HierarchyStructure omitted. /** - * deserializeAws_restJson1S3Config + * deserializeAws_restJson1HistoricalMetric */ -const de_S3Config = (output: any, context: __SerdeContext): S3Config => { - return { - BucketName: __expectString(output.BucketName), - BucketPrefix: __expectString(output.BucketPrefix), - EncryptionConfig: - output.EncryptionConfig != null ? de_EncryptionConfig(output.EncryptionConfig, context) : undefined, - } as any; +const de_HistoricalMetric = (output: any, context: __SerdeContext): HistoricalMetric => { + return take(output, { + Name: __expectString, + Statistic: __expectString, + Threshold: (_: any) => de_Threshold(_, context), + Unit: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SecurityKey + * deserializeAws_restJson1HistoricalMetricData */ -const de_SecurityKey = (output: any, context: __SerdeContext): SecurityKey => { - return { - AssociationId: __expectString(output.AssociationId), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Key: __expectString(output.Key), - } as any; +const de_HistoricalMetricData = (output: any, context: __SerdeContext): HistoricalMetricData => { + return take(output, { + Metric: (_: any) => de_HistoricalMetric(_, context), + Value: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1SecurityKeysList + * deserializeAws_restJson1HistoricalMetricDataCollections */ -const de_SecurityKeysList = (output: any, context: __SerdeContext): SecurityKey[] => { +const de_HistoricalMetricDataCollections = (output: any, context: __SerdeContext): HistoricalMetricData[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityKey(entry, context); + return de_HistoricalMetricData(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1SecurityProfile + * deserializeAws_restJson1HistoricalMetricResult */ -const de_SecurityProfile = (output: any, context: __SerdeContext): SecurityProfile => { - return { - AllowedAccessControlTags: - output.AllowedAccessControlTags != null - ? de_AllowedAccessControlTags(output.AllowedAccessControlTags, context) - : undefined, - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - OrganizationResourceId: __expectString(output.OrganizationResourceId), - SecurityProfileName: __expectString(output.SecurityProfileName), - TagRestrictedResources: - output.TagRestrictedResources != null - ? de_TagRestrictedResourceList(output.TagRestrictedResources, context) - : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; +const de_HistoricalMetricResult = (output: any, context: __SerdeContext): HistoricalMetricResult => { + return take(output, { + Collections: (_: any) => de_HistoricalMetricDataCollections(_, context), + Dimensions: _json, + }) as any; }; /** - * deserializeAws_restJson1SecurityProfileIds + * deserializeAws_restJson1HistoricalMetricResults */ -const de_SecurityProfileIds = (output: any, context: __SerdeContext): string[] => { +const de_HistoricalMetricResults = (output: any, context: __SerdeContext): HistoricalMetricResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_HistoricalMetricResult(entry, context); }); return retVal; }; +// de_HoursOfOperation omitted. + +// de_HoursOfOperationConfig omitted. + +// de_HoursOfOperationConfigList omitted. + +// de_HoursOfOperationSummary omitted. + +// de_HoursOfOperationSummaryList omitted. + +// de_HoursOfOperationTimeSlice omitted. + +/** + * deserializeAws_restJson1Instance + */ +const de_Instance = (output: any, context: __SerdeContext): Instance => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + IdentityManagementType: __expectString, + InboundCallsEnabled: __expectBoolean, + InstanceAlias: __expectString, + InstanceStatus: __expectString, + OutboundCallsEnabled: __expectBoolean, + ServiceRole: __expectString, + StatusReason: _json, + }) as any; +}; + +// de_InstanceStatusReason omitted. + +// de_InstanceStorageConfig omitted. + +// de_InstanceStorageConfigs omitted. + /** - * deserializeAws_restJson1SecurityProfileSearchSummary + * deserializeAws_restJson1InstanceSummary */ -const de_SecurityProfileSearchSummary = (output: any, context: __SerdeContext): SecurityProfileSearchSummary => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - OrganizationResourceId: __expectString(output.OrganizationResourceId), - SecurityProfileName: __expectString(output.SecurityProfileName), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; +const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + IdentityManagementType: __expectString, + InboundCallsEnabled: __expectBoolean, + InstanceAlias: __expectString, + InstanceStatus: __expectString, + OutboundCallsEnabled: __expectBoolean, + ServiceRole: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SecurityProfilesSearchSummaryList + * deserializeAws_restJson1InstanceSummaryList */ -const de_SecurityProfilesSearchSummaryList = (output: any, context: __SerdeContext): SecurityProfileSearchSummary[] => { +const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityProfileSearchSummary(entry, context); + return de_InstanceSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SecurityProfileSummary - */ -const de_SecurityProfileSummary = (output: any, context: __SerdeContext): SecurityProfileSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_IntegrationAssociationSummary omitted. + +// de_IntegrationAssociationSummaryList omitted. + +// de_InvisibleFieldInfo omitted. + +// de_InvisibleTaskTemplateFields omitted. + +// de_KinesisFirehoseConfig omitted. + +// de_KinesisStreamConfig omitted. + +// de_KinesisVideoStreamConfig omitted. + +// de_LexBot omitted. + +// de_LexBotConfig omitted. + +// de_LexBotConfigList omitted. + +// de_LexBotsList omitted. + +// de_LexV2Bot omitted. + +// de_ListPhoneNumbersSummary omitted. + +// de_ListPhoneNumbersSummaryList omitted. + +// de_MediaConcurrencies omitted. + +// de_MediaConcurrency omitted. /** - * deserializeAws_restJson1SecurityProfileSummaryList + * deserializeAws_restJson1MetricDataCollectionsV2 */ -const de_SecurityProfileSummaryList = (output: any, context: __SerdeContext): SecurityProfileSummary[] => { +const de_MetricDataCollectionsV2 = (output: any, context: __SerdeContext): MetricDataV2[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityProfileSummary(entry, context); + return de_MetricDataV2(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1SendNotificationActionDefinition + * deserializeAws_restJson1MetricDataV2 */ -const de_SendNotificationActionDefinition = ( - output: any, - context: __SerdeContext -): SendNotificationActionDefinition => { - return { - Content: __expectString(output.Content), - ContentType: __expectString(output.ContentType), - DeliveryMethod: __expectString(output.DeliveryMethod), - Recipient: output.Recipient != null ? de_NotificationRecipientType(output.Recipient, context) : undefined, - Subject: __expectString(output.Subject), - } as any; +const de_MetricDataV2 = (output: any, context: __SerdeContext): MetricDataV2 => { + return take(output, { + Metric: (_: any) => de_MetricV2(_, context), + Value: __limitedParseDouble, + }) as any; }; +// de_MetricFiltersV2List omitted. + +// de_MetricFilterV2 omitted. + +// de_MetricFilterValueList omitted. + /** - * deserializeAws_restJson1SingleSelectOptions + * deserializeAws_restJson1MetricResultsV2 */ -const de_SingleSelectOptions = (output: any, context: __SerdeContext): string[] => { +const de_MetricResultsV2 = (output: any, context: __SerdeContext): MetricResultV2[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MetricResultV2(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1StringReference + * deserializeAws_restJson1MetricResultV2 */ -const de_StringReference = (output: any, context: __SerdeContext): StringReference => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; +const de_MetricResultV2 = (output: any, context: __SerdeContext): MetricResultV2 => { + return take(output, { + Collections: (_: any) => de_MetricDataCollectionsV2(_, context), + Dimensions: _json, + }) as any; }; /** - * deserializeAws_restJson1TagMap + * deserializeAws_restJson1MetricV2 */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_MetricV2 = (output: any, context: __SerdeContext): MetricV2 => { + return take(output, { + MetricFilters: _json, + Name: __expectString, + Threshold: (_: any) => de_ThresholdCollections(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TagRestrictedResourceList - */ -const de_TagRestrictedResourceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotificationRecipientType omitted. + +// de_NumberReference omitted. + +// de_OriginsList omitted. + +// de_OutboundCallerConfig omitted. + +// de_PermissionsList omitted. + +// de_PhoneNumberQuickConnectConfig omitted. + +// de_PhoneNumberStatus omitted. + +// de_PhoneNumberSummary omitted. + +// de_PhoneNumberSummaryList omitted. + +// de_ProblemDetail omitted. + +// de_Problems omitted. + +// de_PromptSummary omitted. + +// de_PromptSummaryList omitted. + +// de_PropertyValidationExceptionProperty omitted. + +// de_PropertyValidationExceptionPropertyList omitted. + +// de_Queue omitted. /** - * deserializeAws_restJson1TaskActionDefinition + * deserializeAws_restJson1QueueInfo */ -const de_TaskActionDefinition = (output: any, context: __SerdeContext): TaskActionDefinition => { - return { - ContactFlowId: __expectString(output.ContactFlowId), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - References: output.References != null ? de_ContactReferences(output.References, context) : undefined, - } as any; +const de_QueueInfo = (output: any, context: __SerdeContext): QueueInfo => { + return take(output, { + EnqueueTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + }) as any; }; +// de_QueueQuickConnectConfig omitted. + +// de_QueueReference omitted. + +// de_QueueSearchSummaryList omitted. + +// de_QueueSummary omitted. + +// de_QueueSummaryList omitted. + +// de_QuickConnect omitted. + +// de_QuickConnectConfig omitted. + +// de_QuickConnectSummary omitted. + +// de_QuickConnectSummaryList omitted. + +// de_ReadOnlyFieldInfo omitted. + +// de_ReadOnlyTaskTemplateFields omitted. + +// de_Reference omitted. + +// de_ReferenceSummary omitted. + +// de_ReferenceSummaryList omitted. + +// de_RequiredFieldInfo omitted. + +// de_RequiredTaskTemplateFields omitted. + +// de_RoutingProfile omitted. + +// de_RoutingProfileList omitted. + +// de_RoutingProfileQueueConfigSummary omitted. + +// de_RoutingProfileQueueConfigSummaryList omitted. + +// de_RoutingProfileReference omitted. + +// de_RoutingProfileSummary omitted. + +// de_RoutingProfileSummaryList omitted. + /** - * deserializeAws_restJson1TaskTemplateConstraints + * deserializeAws_restJson1Rule */ -const de_TaskTemplateConstraints = (output: any, context: __SerdeContext): TaskTemplateConstraints => { - return { - InvisibleFields: - output.InvisibleFields != null ? de_InvisibleTaskTemplateFields(output.InvisibleFields, context) : undefined, - ReadOnlyFields: - output.ReadOnlyFields != null ? de_ReadOnlyTaskTemplateFields(output.ReadOnlyFields, context) : undefined, - RequiredFields: - output.RequiredFields != null ? de_RequiredTaskTemplateFields(output.RequiredFields, context) : undefined, - } as any; +const de_Rule = (output: any, context: __SerdeContext): Rule => { + return take(output, { + Actions: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Function: __expectString, + LastUpdatedBy: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PublishStatus: __expectString, + RuleArn: __expectString, + RuleId: __expectString, + Tags: _json, + TriggerEventSource: _json, + }) as any; }; +// de_RuleAction omitted. + +// de_RuleActions omitted. + /** - * deserializeAws_restJson1TaskTemplateDefaultFieldValue + * deserializeAws_restJson1RuleSummary */ -const de_TaskTemplateDefaultFieldValue = (output: any, context: __SerdeContext): TaskTemplateDefaultFieldValue => { - return { - DefaultValue: __expectString(output.DefaultValue), - Id: output.Id != null ? de_TaskTemplateFieldIdentifier(output.Id, context) : undefined, - } as any; +const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { + return take(output, { + ActionSummaries: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventSourceName: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PublishStatus: __expectString, + RuleArn: __expectString, + RuleId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1TaskTemplateDefaultFieldValueList + * deserializeAws_restJson1RuleSummaryList */ -const de_TaskTemplateDefaultFieldValueList = ( - output: any, - context: __SerdeContext -): TaskTemplateDefaultFieldValue[] => { +const de_RuleSummaryList = (output: any, context: __SerdeContext): RuleSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaskTemplateDefaultFieldValue(entry, context); + return de_RuleSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TaskTemplateDefaults - */ -const de_TaskTemplateDefaults = (output: any, context: __SerdeContext): TaskTemplateDefaults => { - return { - DefaultFieldValues: - output.DefaultFieldValues != null - ? de_TaskTemplateDefaultFieldValueList(output.DefaultFieldValues, context) - : undefined, - } as any; -}; +// de_RuleTriggerEventSource omitted. -/** - * deserializeAws_restJson1TaskTemplateField - */ -const de_TaskTemplateField = (output: any, context: __SerdeContext): TaskTemplateField => { - return { - Description: __expectString(output.Description), - Id: output.Id != null ? de_TaskTemplateFieldIdentifier(output.Id, context) : undefined, - SingleSelectOptions: - output.SingleSelectOptions != null ? de_SingleSelectOptions(output.SingleSelectOptions, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_S3Config omitted. /** - * deserializeAws_restJson1TaskTemplateFieldIdentifier + * deserializeAws_restJson1SecurityKey */ -const de_TaskTemplateFieldIdentifier = (output: any, context: __SerdeContext): TaskTemplateFieldIdentifier => { - return { - Name: __expectString(output.Name), - } as any; +const de_SecurityKey = (output: any, context: __SerdeContext): SecurityKey => { + return take(output, { + AssociationId: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Key: __expectString, + }) as any; }; /** - * deserializeAws_restJson1TaskTemplateFields + * deserializeAws_restJson1SecurityKeysList */ -const de_TaskTemplateFields = (output: any, context: __SerdeContext): TaskTemplateField[] => { +const de_SecurityKeysList = (output: any, context: __SerdeContext): SecurityKey[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaskTemplateField(entry, context); + return de_SecurityKey(entry, context); }); return retVal; }; +// de_SecurityProfile omitted. + +// de_SecurityProfileIds omitted. + +// de_SecurityProfileSearchSummary omitted. + +// de_SecurityProfilesSearchSummaryList omitted. + +// de_SecurityProfileSummary omitted. + +// de_SecurityProfileSummaryList omitted. + +// de_SendNotificationActionDefinition omitted. + +// de_SingleSelectOptions omitted. + +// de_StringReference omitted. + +// de_TagMap omitted. + +// de_TagRestrictedResourceList omitted. + +// de_TaskActionDefinition omitted. + +// de_TaskTemplateConstraints omitted. + +// de_TaskTemplateDefaultFieldValue omitted. + +// de_TaskTemplateDefaultFieldValueList omitted. + +// de_TaskTemplateDefaults omitted. + +// de_TaskTemplateField omitted. + +// de_TaskTemplateFieldIdentifier omitted. + +// de_TaskTemplateFields omitted. + /** * deserializeAws_restJson1TaskTemplateList */ @@ -20555,9 +17772,6 @@ const de_TaskTemplateList = (output: any, context: __SerdeContext): TaskTemplate const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TaskTemplateMetadata(entry, context); }); return retVal; @@ -20567,40 +17781,27 @@ const de_TaskTemplateList = (output: any, context: __SerdeContext): TaskTemplate * deserializeAws_restJson1TaskTemplateMetadata */ const de_TaskTemplateMetadata = (output: any, context: __SerdeContext): TaskTemplateMetadata => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Id: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TelephonyConfig - */ -const de_TelephonyConfig = (output: any, context: __SerdeContext): TelephonyConfig => { - return { - Distributions: output.Distributions != null ? de_DistributionList(output.Distributions, context) : undefined, - } as any; -}; +// de_TelephonyConfig omitted. /** * deserializeAws_restJson1Threshold */ const de_Threshold = (output: any, context: __SerdeContext): Threshold => { - return { - Comparison: __expectString(output.Comparison), - ThresholdValue: __limitedParseDouble(output.ThresholdValue), - } as any; + return take(output, { + Comparison: __expectString, + ThresholdValue: __limitedParseDouble, + }) as any; }; /** @@ -20610,9 +17811,6 @@ const de_ThresholdCollections = (output: any, context: __SerdeContext): Threshol const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThresholdV2(entry, context); }); return retVal; @@ -20622,134 +17820,41 @@ const de_ThresholdCollections = (output: any, context: __SerdeContext): Threshol * deserializeAws_restJson1ThresholdV2 */ const de_ThresholdV2 = (output: any, context: __SerdeContext): ThresholdV2 => { - return { - Comparison: __expectString(output.Comparison), - ThresholdValue: __limitedParseDouble(output.ThresholdValue), - } as any; + return take(output, { + Comparison: __expectString, + ThresholdValue: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1TrafficDistributionGroup - */ -const de_TrafficDistributionGroup = (output: any, context: __SerdeContext): TrafficDistributionGroup => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - InstanceArn: __expectString(output.InstanceArn), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_TrafficDistributionGroup omitted. -/** - * deserializeAws_restJson1TrafficDistributionGroupSummary - */ -const de_TrafficDistributionGroupSummary = (output: any, context: __SerdeContext): TrafficDistributionGroupSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - InstanceArn: __expectString(output.InstanceArn), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_TrafficDistributionGroupSummary omitted. -/** - * deserializeAws_restJson1TrafficDistributionGroupSummaryList - */ -const de_TrafficDistributionGroupSummaryList = ( - output: any, - context: __SerdeContext -): TrafficDistributionGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrafficDistributionGroupSummary(entry, context); - }); - return retVal; -}; +// de_TrafficDistributionGroupSummaryList omitted. -/** - * deserializeAws_restJson1UrlReference - */ -const de_UrlReference = (output: any, context: __SerdeContext): UrlReference => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_UrlReference omitted. -/** - * deserializeAws_restJson1UseCase - */ -const de_UseCase = (output: any, context: __SerdeContext): UseCase => { - return { - UseCaseArn: __expectString(output.UseCaseArn), - UseCaseId: __expectString(output.UseCaseId), - UseCaseType: __expectString(output.UseCaseType), - } as any; -}; +// de_UseCase omitted. -/** - * deserializeAws_restJson1UseCaseSummaryList - */ -const de_UseCaseSummaryList = (output: any, context: __SerdeContext): UseCase[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UseCase(entry, context); - }); - return retVal; -}; +// de_UseCaseSummaryList omitted. -/** - * deserializeAws_restJson1User - */ -const de_User = (output: any, context: __SerdeContext): User => { - return { - Arn: __expectString(output.Arn), - DirectoryUserId: __expectString(output.DirectoryUserId), - HierarchyGroupId: __expectString(output.HierarchyGroupId), - Id: __expectString(output.Id), - IdentityInfo: output.IdentityInfo != null ? de_UserIdentityInfo(output.IdentityInfo, context) : undefined, - PhoneConfig: output.PhoneConfig != null ? de_UserPhoneConfig(output.PhoneConfig, context) : undefined, - RoutingProfileId: __expectString(output.RoutingProfileId), - SecurityProfileIds: - output.SecurityProfileIds != null ? de_SecurityProfileIds(output.SecurityProfileIds, context) : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Username: __expectString(output.Username), - } as any; -}; +// de_User omitted. /** * deserializeAws_restJson1UserData */ const de_UserData = (output: any, context: __SerdeContext): UserData => { - return { - ActiveSlotsByChannel: - output.ActiveSlotsByChannel != null ? de_ChannelToCountMap(output.ActiveSlotsByChannel, context) : undefined, - AvailableSlotsByChannel: - output.AvailableSlotsByChannel != null - ? de_ChannelToCountMap(output.AvailableSlotsByChannel, context) - : undefined, - Contacts: output.Contacts != null ? de_AgentContactReferenceList(output.Contacts, context) : undefined, - HierarchyPath: output.HierarchyPath != null ? de_HierarchyPathReference(output.HierarchyPath, context) : undefined, - MaxSlotsByChannel: - output.MaxSlotsByChannel != null ? de_ChannelToCountMap(output.MaxSlotsByChannel, context) : undefined, - NextStatus: __expectString(output.NextStatus), - RoutingProfile: - output.RoutingProfile != null ? de_RoutingProfileReference(output.RoutingProfile, context) : undefined, - Status: output.Status != null ? de_AgentStatusReference(output.Status, context) : undefined, - User: output.User != null ? de_UserReference(output.User, context) : undefined, - } as any; + return take(output, { + ActiveSlotsByChannel: _json, + AvailableSlotsByChannel: _json, + Contacts: (_: any) => de_AgentContactReferenceList(_, context), + HierarchyPath: _json, + MaxSlotsByChannel: _json, + NextStatus: __expectString, + RoutingProfile: _json, + Status: (_: any) => de_AgentStatusReference(_, context), + User: _json, + }) as any; }; /** @@ -20759,193 +17864,63 @@ const de_UserDataList = (output: any, context: __SerdeContext): UserData[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserData(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1UserIdentityInfo - */ -const de_UserIdentityInfo = (output: any, context: __SerdeContext): UserIdentityInfo => { - return { - Email: __expectString(output.Email), - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - Mobile: __expectString(output.Mobile), - SecondaryEmail: __expectString(output.SecondaryEmail), - } as any; -}; +// de_UserIdentityInfo omitted. -/** - * deserializeAws_restJson1UserIdentityInfoLite - */ -const de_UserIdentityInfoLite = (output: any, context: __SerdeContext): UserIdentityInfoLite => { - return { - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - } as any; -}; +// de_UserIdentityInfoLite omitted. -/** - * deserializeAws_restJson1UserIdList - */ -const de_UserIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UserIdList omitted. -/** - * deserializeAws_restJson1UserPhoneConfig - */ -const de_UserPhoneConfig = (output: any, context: __SerdeContext): UserPhoneConfig => { - return { - AfterContactWorkTimeLimit: __expectInt32(output.AfterContactWorkTimeLimit), - AutoAccept: __expectBoolean(output.AutoAccept), - DeskPhoneNumber: __expectString(output.DeskPhoneNumber), - PhoneType: __expectString(output.PhoneType), - } as any; -}; +// de_UserPhoneConfig omitted. -/** - * deserializeAws_restJson1UserQuickConnectConfig - */ -const de_UserQuickConnectConfig = (output: any, context: __SerdeContext): UserQuickConnectConfig => { - return { - ContactFlowId: __expectString(output.ContactFlowId), - UserId: __expectString(output.UserId), - } as any; -}; +// de_UserQuickConnectConfig omitted. -/** - * deserializeAws_restJson1UserReference - */ -const de_UserReference = (output: any, context: __SerdeContext): UserReference => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; -}; +// de_UserReference omitted. -/** - * deserializeAws_restJson1UserSearchSummary - */ -const de_UserSearchSummary = (output: any, context: __SerdeContext): UserSearchSummary => { - return { - Arn: __expectString(output.Arn), - DirectoryUserId: __expectString(output.DirectoryUserId), - HierarchyGroupId: __expectString(output.HierarchyGroupId), - Id: __expectString(output.Id), - IdentityInfo: output.IdentityInfo != null ? de_UserIdentityInfoLite(output.IdentityInfo, context) : undefined, - PhoneConfig: output.PhoneConfig != null ? de_UserPhoneConfig(output.PhoneConfig, context) : undefined, - RoutingProfileId: __expectString(output.RoutingProfileId), - SecurityProfileIds: - output.SecurityProfileIds != null ? de_SecurityProfileIds(output.SecurityProfileIds, context) : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Username: __expectString(output.Username), - } as any; -}; +// de_UserSearchSummary omitted. -/** - * deserializeAws_restJson1UserSearchSummaryList - */ -const de_UserSearchSummaryList = (output: any, context: __SerdeContext): UserSearchSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserSearchSummary(entry, context); - }); - return retVal; -}; +// de_UserSearchSummaryList omitted. -/** - * deserializeAws_restJson1UserSummary - */ -const de_UserSummary = (output: any, context: __SerdeContext): UserSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Username: __expectString(output.Username), - } as any; -}; +// de_UserSummary omitted. -/** - * deserializeAws_restJson1UserSummaryList - */ -const de_UserSummaryList = (output: any, context: __SerdeContext): UserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserSummary(entry, context); - }); - return retVal; -}; +// de_UserSummaryList omitted. -/** - * deserializeAws_restJson1UserTagMap - */ -const de_UserTagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_UserTagMap omitted. /** * deserializeAws_restJson1Vocabulary */ const de_Vocabulary = (output: any, context: __SerdeContext): Vocabulary => { - return { - Arn: __expectString(output.Arn), - Content: __expectString(output.Content), - FailureReason: __expectString(output.FailureReason), - Id: __expectString(output.Id), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + Content: __expectString, + FailureReason: __expectString, + Id: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** * deserializeAws_restJson1VocabularySummary */ const de_VocabularySummary = (output: any, context: __SerdeContext): VocabularySummary => { - return { - Arn: __expectString(output.Arn), - FailureReason: __expectString(output.FailureReason), - Id: __expectString(output.Id), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + Arn: __expectString, + FailureReason: __expectString, + Id: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; /** @@ -20955,22 +17930,12 @@ const de_VocabularySummaryList = (output: any, context: __SerdeContext): Vocabul const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VocabularySummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1WisdomInfo - */ -const de_WisdomInfo = (output: any, context: __SerdeContext): WisdomInfo => { - return { - SessionArn: __expectString(output.SessionArn), - } as any; -}; +// de_WisdomInfo omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts b/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts index 321f9df0d29a..b188c3922b59 100644 --- a/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts +++ b/clients/client-connectcampaigns/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -78,16 +79,11 @@ import { AnswerMachineDetectionConfig, Campaign, CampaignFilters, - CampaignSummary, ConflictException, DialerConfig, DialRequest, EncryptionConfig, - FailedCampaignStateResponse, - FailedRequest, - InstanceConfig, InstanceIdFilter, - InstanceOnboardingJobStatus, InternalServerException, InvalidCampaignStateException, InvalidStateException, @@ -96,8 +92,6 @@ import { ProgressiveDialerConfig, ResourceNotFoundException, ServiceQuotaExceededException, - SuccessfulCampaignStateResponse, - SuccessfulRequest, ThrottlingException, ValidationException, } from "../models/models_0"; @@ -115,15 +109,15 @@ export const se_CreateCampaignCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns"; let body: any; - body = JSON.stringify({ - ...(input.connectInstanceId != null && { connectInstanceId: input.connectInstanceId }), - ...(input.dialerConfig != null && { dialerConfig: se_DialerConfig(input.dialerConfig, context) }), - ...(input.name != null && { name: input.name }), - ...(input.outboundCallConfig != null && { - outboundCallConfig: se_OutboundCallConfig(input.outboundCallConfig, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + connectInstanceId: [], + dialerConfig: (_) => se_DialerConfig(_, context), + name: [], + outboundCallConfig: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -281,9 +275,11 @@ export const se_GetCampaignStateBatchCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-state"; let body: any; - body = JSON.stringify({ - ...(input.campaignIds != null && { campaignIds: se_CampaignIdList(input.campaignIds, context) }), - }); + body = JSON.stringify( + take(input, { + campaignIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -372,11 +368,13 @@ export const se_ListCampaignsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-summary"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_CampaignFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -449,9 +447,11 @@ export const se_PutDialRequestBatchCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dial-requests"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.dialRequests != null && { dialRequests: se_DialRequestList(input.dialRequests, context) }), - }); + body = JSON.stringify( + take(input, { + dialRequests: (_) => se_DialRequestList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -532,9 +532,11 @@ export const se_StartInstanceOnboardingJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.encryptionConfig != null && { encryptionConfig: se_EncryptionConfig(input.encryptionConfig, context) }), - }); + body = JSON.stringify( + take(input, { + encryptionConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -583,9 +585,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}"; resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn!, "{arn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -642,9 +646,11 @@ export const se_UpdateCampaignDialerConfigCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dialer-config"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.dialerConfig != null && { dialerConfig: se_DialerConfig(input.dialerConfig, context) }), - }); + body = JSON.stringify( + take(input, { + dialerConfig: (_) => se_DialerConfig(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -670,9 +676,11 @@ export const se_UpdateCampaignNameCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/name"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -699,13 +707,13 @@ export const se_UpdateCampaignOutboundCallConfigCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/outbound-call-config"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.answerMachineDetectionConfig != null && { - answerMachineDetectionConfig: se_AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context), - }), - ...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }), - ...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }), - }); + body = JSON.stringify( + take(input, { + answerMachineDetectionConfig: (_) => _json(_), + connectContactFlowId: [], + connectSourcePhoneNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -731,15 +739,12 @@ export const de_CreateCampaignCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -779,10 +784,9 @@ const de_CreateCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -832,10 +836,9 @@ const de_DeleteCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -891,10 +894,9 @@ const de_DeleteConnectInstanceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -947,10 +949,9 @@ const de_DeleteInstanceOnboardingJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -970,9 +971,10 @@ export const de_DescribeCampaignCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.campaign != null) { - contents.campaign = de_Campaign(data.campaign, context); - } + const doc = take(data, { + campaign: (_) => de_Campaign(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1003,10 +1005,9 @@ const de_DescribeCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1026,9 +1027,10 @@ export const de_GetCampaignStateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1062,10 +1064,9 @@ const de_GetCampaignStateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1085,12 +1086,11 @@ export const de_GetCampaignStateBatchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedRequests != null) { - contents.failedRequests = de_FailedCampaignStateResponseList(data.failedRequests, context); - } - if (data.successfulRequests != null) { - contents.successfulRequests = de_SuccessfulCampaignStateResponseList(data.successfulRequests, context); - } + const doc = take(data, { + failedRequests: _json, + successfulRequests: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1121,10 +1121,9 @@ const de_GetCampaignStateBatchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1144,9 +1143,10 @@ export const de_GetConnectInstanceConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectInstanceConfig != null) { - contents.connectInstanceConfig = de_InstanceConfig(data.connectInstanceConfig, context); - } + const doc = take(data, { + connectInstanceConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1177,10 +1177,9 @@ const de_GetConnectInstanceConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,12 +1199,10 @@ export const de_GetInstanceOnboardingJobStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectInstanceOnboardingJobStatus != null) { - contents.connectInstanceOnboardingJobStatus = de_InstanceOnboardingJobStatus( - data.connectInstanceOnboardingJobStatus, - context - ); - } + const doc = take(data, { + connectInstanceOnboardingJobStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1236,10 +1233,9 @@ const de_GetInstanceOnboardingJobStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1259,12 +1255,11 @@ export const de_ListCampaignsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.campaignSummaryList != null) { - contents.campaignSummaryList = de_CampaignSummaryList(data.campaignSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + campaignSummaryList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1292,10 +1287,9 @@ const de_ListCampaignsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1315,9 +1309,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1351,10 +1346,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1413,10 +1407,9 @@ const de_PauseCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1436,12 +1429,11 @@ export const de_PutDialRequestBatchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedRequests != null) { - contents.failedRequests = de_FailedRequestList(data.failedRequests, context); - } - if (data.successfulRequests != null) { - contents.successfulRequests = de_SuccessfulRequestList(data.successfulRequests, context); - } + const doc = take(data, { + failedRequests: _json, + successfulRequests: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1481,10 +1473,9 @@ const de_PutDialRequestBatchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1543,10 +1534,9 @@ const de_ResumeCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1605,10 +1595,9 @@ const de_StartCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1628,12 +1617,10 @@ export const de_StartInstanceOnboardingJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectInstanceOnboardingJobStatus != null) { - contents.connectInstanceOnboardingJobStatus = de_InstanceOnboardingJobStatus( - data.connectInstanceOnboardingJobStatus, - context - ); - } + const doc = take(data, { + connectInstanceOnboardingJobStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1670,10 +1657,9 @@ const de_StartInstanceOnboardingJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1732,10 +1718,9 @@ const de_StopCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1788,10 +1773,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1844,10 +1828,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1900,10 +1883,9 @@ const de_UpdateCampaignDialerConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1956,10 +1938,9 @@ const de_UpdateCampaignNameCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2015,16 +1996,15 @@ const de_UpdateCampaignOutboundCallConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2036,9 +2016,10 @@ const de_AccessDeniedExceptionRes = async ( xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2054,9 +2035,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2075,9 +2057,10 @@ const de_InternalServerExceptionRes = async ( xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2096,12 +2079,11 @@ const de_InvalidCampaignStateExceptionRes = async ( xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + message: __expectString, + state: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidCampaignStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2120,9 +2102,10 @@ const de_InvalidStateExceptionRes = async ( xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2141,9 +2124,10 @@ const de_ResourceNotFoundExceptionRes = async ( xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2162,9 +2146,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2180,9 +2165,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2198,9 +2184,10 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2208,49 +2195,13 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AnswerMachineDetectionConfig - */ -const se_AnswerMachineDetectionConfig = (input: AnswerMachineDetectionConfig, context: __SerdeContext): any => { - return { - ...(input.enableAnswerMachineDetection != null && { - enableAnswerMachineDetection: input.enableAnswerMachineDetection, - }), - }; -}; +// se_AnswerMachineDetectionConfig omitted. -/** - * serializeAws_restJson1Attributes - */ -const se_Attributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Attributes omitted. -/** - * serializeAws_restJson1CampaignFilters - */ -const se_CampaignFilters = (input: CampaignFilters, context: __SerdeContext): any => { - return { - ...(input.instanceIdFilter != null && { instanceIdFilter: se_InstanceIdFilter(input.instanceIdFilter, context) }), - }; -}; +// se_CampaignFilters omitted. -/** - * serializeAws_restJson1CampaignIdList - */ -const se_CampaignIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CampaignIdList omitted. /** * serializeAws_restJson1DialerConfig @@ -2267,12 +2218,12 @@ const se_DialerConfig = (input: DialerConfig, context: __SerdeContext): any => { * serializeAws_restJson1DialRequest */ const se_DialRequest = (input: DialRequest, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.expirationTime != null && { expirationTime: input.expirationTime.toISOString().split(".")[0] + "Z" }), - ...(input.phoneNumber != null && { phoneNumber: input.phoneNumber }), - }; + return take(input, { + attributes: _json, + clientToken: [], + expirationTime: (_) => _.toISOString().split(".")[0] + "Z", + phoneNumber: [], + }); }; /** @@ -2286,124 +2237,52 @@ const se_DialRequestList = (input: DialRequest[], context: __SerdeContext): any }); }; -/** - * serializeAws_restJson1EncryptionConfig - */ -const se_EncryptionConfig = (input: EncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.encryptionType != null && { encryptionType: input.encryptionType }), - ...(input.keyArn != null && { keyArn: input.keyArn }), - }; -}; +// se_EncryptionConfig omitted. -/** - * serializeAws_restJson1InstanceIdFilter - */ -const se_InstanceIdFilter = (input: InstanceIdFilter, context: __SerdeContext): any => { - return { - ...(input.operator != null && { operator: input.operator }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_InstanceIdFilter omitted. -/** - * serializeAws_restJson1OutboundCallConfig - */ -const se_OutboundCallConfig = (input: OutboundCallConfig, context: __SerdeContext): any => { - return { - ...(input.answerMachineDetectionConfig != null && { - answerMachineDetectionConfig: se_AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context), - }), - ...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }), - ...(input.connectQueueId != null && { connectQueueId: input.connectQueueId }), - ...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }), - }; -}; +// se_OutboundCallConfig omitted. /** * serializeAws_restJson1PredictiveDialerConfig */ const se_PredictiveDialerConfig = (input: PredictiveDialerConfig, context: __SerdeContext): any => { - return { - ...(input.bandwidthAllocation != null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }), - }; + return take(input, { + bandwidthAllocation: __serializeFloat, + }); }; /** * serializeAws_restJson1ProgressiveDialerConfig */ const se_ProgressiveDialerConfig = (input: ProgressiveDialerConfig, context: __SerdeContext): any => { - return { - ...(input.bandwidthAllocation != null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }), - }; + return take(input, { + bandwidthAllocation: __serializeFloat, + }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1AnswerMachineDetectionConfig - */ -const de_AnswerMachineDetectionConfig = (output: any, context: __SerdeContext): AnswerMachineDetectionConfig => { - return { - enableAnswerMachineDetection: __expectBoolean(output.enableAnswerMachineDetection), - } as any; -}; +// de_AnswerMachineDetectionConfig omitted. /** * deserializeAws_restJson1Campaign */ const de_Campaign = (output: any, context: __SerdeContext): Campaign => { - return { - arn: __expectString(output.arn), - connectInstanceId: __expectString(output.connectInstanceId), - dialerConfig: - output.dialerConfig != null ? de_DialerConfig(__expectUnion(output.dialerConfig), context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - outboundCallConfig: - output.outboundCallConfig != null ? de_OutboundCallConfig(output.outboundCallConfig, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + connectInstanceId: __expectString, + dialerConfig: (_: any) => de_DialerConfig(__expectUnion(_), context), + id: __expectString, + name: __expectString, + outboundCallConfig: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1CampaignSummary - */ -const de_CampaignSummary = (output: any, context: __SerdeContext): CampaignSummary => { - return { - arn: __expectString(output.arn), - connectInstanceId: __expectString(output.connectInstanceId), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_CampaignSummary omitted. -/** - * deserializeAws_restJson1CampaignSummaryList - */ -const de_CampaignSummaryList = (output: any, context: __SerdeContext): CampaignSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CampaignSummary(entry, context); - }); - return retVal; -}; +// de_CampaignSummaryList omitted. /** * deserializeAws_restJson1DialerConfig @@ -2422,189 +2301,49 @@ const de_DialerConfig = (output: any, context: __SerdeContext): DialerConfig => return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1EncryptionConfig - */ -const de_EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => { - return { - enabled: __expectBoolean(output.enabled), - encryptionType: __expectString(output.encryptionType), - keyArn: __expectString(output.keyArn), - } as any; -}; +// de_EncryptionConfig omitted. -/** - * deserializeAws_restJson1FailedCampaignStateResponse - */ -const de_FailedCampaignStateResponse = (output: any, context: __SerdeContext): FailedCampaignStateResponse => { - return { - campaignId: __expectString(output.campaignId), - failureCode: __expectString(output.failureCode), - } as any; -}; +// de_FailedCampaignStateResponse omitted. -/** - * deserializeAws_restJson1FailedCampaignStateResponseList - */ -const de_FailedCampaignStateResponseList = (output: any, context: __SerdeContext): FailedCampaignStateResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedCampaignStateResponse(entry, context); - }); - return retVal; -}; +// de_FailedCampaignStateResponseList omitted. -/** - * deserializeAws_restJson1FailedRequest - */ -const de_FailedRequest = (output: any, context: __SerdeContext): FailedRequest => { - return { - clientToken: __expectString(output.clientToken), - failureCode: __expectString(output.failureCode), - id: __expectString(output.id), - } as any; -}; +// de_FailedRequest omitted. -/** - * deserializeAws_restJson1FailedRequestList - */ -const de_FailedRequestList = (output: any, context: __SerdeContext): FailedRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedRequest(entry, context); - }); - return retVal; -}; +// de_FailedRequestList omitted. -/** - * deserializeAws_restJson1InstanceConfig - */ -const de_InstanceConfig = (output: any, context: __SerdeContext): InstanceConfig => { - return { - connectInstanceId: __expectString(output.connectInstanceId), - encryptionConfig: - output.encryptionConfig != null ? de_EncryptionConfig(output.encryptionConfig, context) : undefined, - serviceLinkedRoleArn: __expectString(output.serviceLinkedRoleArn), - } as any; -}; +// de_InstanceConfig omitted. -/** - * deserializeAws_restJson1InstanceOnboardingJobStatus - */ -const de_InstanceOnboardingJobStatus = (output: any, context: __SerdeContext): InstanceOnboardingJobStatus => { - return { - connectInstanceId: __expectString(output.connectInstanceId), - failureCode: __expectString(output.failureCode), - status: __expectString(output.status), - } as any; -}; +// de_InstanceOnboardingJobStatus omitted. -/** - * deserializeAws_restJson1OutboundCallConfig - */ -const de_OutboundCallConfig = (output: any, context: __SerdeContext): OutboundCallConfig => { - return { - answerMachineDetectionConfig: - output.answerMachineDetectionConfig != null - ? de_AnswerMachineDetectionConfig(output.answerMachineDetectionConfig, context) - : undefined, - connectContactFlowId: __expectString(output.connectContactFlowId), - connectQueueId: __expectString(output.connectQueueId), - connectSourcePhoneNumber: __expectString(output.connectSourcePhoneNumber), - } as any; -}; +// de_OutboundCallConfig omitted. /** * deserializeAws_restJson1PredictiveDialerConfig */ const de_PredictiveDialerConfig = (output: any, context: __SerdeContext): PredictiveDialerConfig => { - return { - bandwidthAllocation: __limitedParseDouble(output.bandwidthAllocation), - } as any; + return take(output, { + bandwidthAllocation: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1ProgressiveDialerConfig */ const de_ProgressiveDialerConfig = (output: any, context: __SerdeContext): ProgressiveDialerConfig => { - return { - bandwidthAllocation: __limitedParseDouble(output.bandwidthAllocation), - } as any; + return take(output, { + bandwidthAllocation: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1SuccessfulCampaignStateResponse - */ -const de_SuccessfulCampaignStateResponse = (output: any, context: __SerdeContext): SuccessfulCampaignStateResponse => { - return { - campaignId: __expectString(output.campaignId), - state: __expectString(output.state), - } as any; -}; +// de_SuccessfulCampaignStateResponse omitted. -/** - * deserializeAws_restJson1SuccessfulCampaignStateResponseList - */ -const de_SuccessfulCampaignStateResponseList = ( - output: any, - context: __SerdeContext -): SuccessfulCampaignStateResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SuccessfulCampaignStateResponse(entry, context); - }); - return retVal; -}; +// de_SuccessfulCampaignStateResponseList omitted. -/** - * deserializeAws_restJson1SuccessfulRequest - */ -const de_SuccessfulRequest = (output: any, context: __SerdeContext): SuccessfulRequest => { - return { - clientToken: __expectString(output.clientToken), - id: __expectString(output.id), - } as any; -}; +// de_SuccessfulRequest omitted. -/** - * deserializeAws_restJson1SuccessfulRequestList - */ -const de_SuccessfulRequestList = (output: any, context: __SerdeContext): SuccessfulRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SuccessfulRequest(entry, context); - }); - return retVal; -}; +// de_SuccessfulRequestList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-connectcases/src/protocols/Aws_restJson1.ts b/clients/client-connectcases/src/protocols/Aws_restJson1.ts index 1b8c0a3e4c26..bdc14ab3bd41 100644 --- a/clients/client-connectcases/src/protocols/Aws_restJson1.ts +++ b/clients/client-connectcases/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -9,12 +10,13 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -74,24 +76,19 @@ import { BasicLayout, CaseEventIncludedData, CaseFilter, - CaseSummary, CommentContent, CommentFilter, ConflictException, Contact, ContactContent, ContactFilter, - DomainSummary, EventBridgeConfiguration, EventIncludedData, - FieldError, FieldFilter, FieldGroup, FieldIdentifier, FieldItem, FieldOption, - FieldOptionError, - FieldSummary, FieldValue, FieldValueUnion, GetFieldResponse, @@ -99,7 +96,6 @@ import { LayoutConfiguration, LayoutContent, LayoutSections, - LayoutSummary, RelatedItemContent, RelatedItemEventIncludedData, RelatedItemInputContent, @@ -111,7 +107,6 @@ import { Section, ServiceQuotaExceededException, Sort, - TemplateSummary, ThrottlingException, ValidationException, } from "../models/models_0"; @@ -131,9 +126,11 @@ export const se_BatchGetFieldCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/fields-batch"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.fields != null && { fields: se_BatchGetFieldIdentifierList(input.fields, context) }), - }); + body = JSON.stringify( + take(input, { + fields: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -162,9 +159,11 @@ export const se_BatchPutFieldOptionsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "fieldId", () => input.fieldId!, "{fieldId}", false); let body: any; - body = JSON.stringify({ - ...(input.options != null && { options: se_FieldOptionsList(input.options, context) }), - }); + body = JSON.stringify( + take(input, { + options: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -191,11 +190,13 @@ export const se_CreateCaseCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/cases"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.fields != null && { fields: se_FieldValueList(input.fields, context) }), - ...(input.templateId != null && { templateId: input.templateId }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + fields: (_) => se_FieldValueList(_, context), + templateId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -220,9 +221,11 @@ export const se_CreateDomainCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains"; let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -249,11 +252,13 @@ export const se_CreateFieldCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/fields"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -280,10 +285,12 @@ export const se_CreateLayoutCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/layouts"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.content != null && { content: se_LayoutContent(input.content, context) }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + content: (_) => _json(_), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -312,10 +319,12 @@ export const se_CreateRelatedItemCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "caseId", () => input.caseId!, "{caseId}", false); let body: any; - body = JSON.stringify({ - ...(input.content != null && { content: se_RelatedItemInputContent(input.content, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + content: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -342,15 +351,15 @@ export const se_CreateTemplateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/templates"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.layoutConfiguration != null && { - layoutConfiguration: se_LayoutConfiguration(input.layoutConfiguration, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.requiredFields != null && { requiredFields: se_RequiredFieldList(input.requiredFields, context) }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + description: [], + layoutConfiguration: (_) => _json(_), + name: [], + requiredFields: (_) => _json(_), + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -401,10 +410,12 @@ export const se_GetCaseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "caseId", () => input.caseId!, "{caseId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.fields != null && { fields: se_FieldIdentifierList(input.fields, context) }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + fields: (_) => _json(_), + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -531,11 +542,13 @@ export const se_ListCasesForContactCommand = async ( "/domains/{domainId}/list-cases-for-contact"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.contactArn != null && { contactArn: input.contactArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + contactArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -733,9 +746,11 @@ export const se_PutCaseEventConfigurationCommand = async ( "/domains/{domainId}/case-event-configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.eventBridge != null && { eventBridge: se_EventBridgeConfiguration(input.eventBridge, context) }), - }); + body = JSON.stringify( + take(input, { + eventBridge: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -762,14 +777,16 @@ export const se_SearchCasesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{domainId}/cases-search"; resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); let body: any; - body = JSON.stringify({ - ...(input.fields != null && { fields: se_FieldIdentifierList(input.fields, context) }), - ...(input.filter != null && { filter: se_CaseFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.searchTerm != null && { searchTerm: input.searchTerm }), - ...(input.sorts != null && { sorts: se_SortList(input.sorts, context) }), - }); + body = JSON.stringify( + take(input, { + fields: (_) => _json(_), + filter: (_) => se_CaseFilter(_, context), + maxResults: [], + nextToken: [], + searchTerm: [], + sorts: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -798,11 +815,13 @@ export const se_SearchRelatedItemsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "caseId", () => input.caseId!, "{caseId}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_RelatedItemFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -828,9 +847,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}"; resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn!, "{arn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => se_Tags(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -888,9 +909,11 @@ export const se_UpdateCaseCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "caseId", () => input.caseId!, "{caseId}", false); let body: any; - body = JSON.stringify({ - ...(input.fields != null && { fields: se_FieldValueList(input.fields, context) }), - }); + body = JSON.stringify( + take(input, { + fields: (_) => se_FieldValueList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -918,10 +941,12 @@ export const se_UpdateFieldCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "fieldId", () => input.fieldId!, "{fieldId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -949,10 +974,12 @@ export const se_UpdateLayoutCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "layoutId", () => input.layoutId!, "{layoutId}", false); let body: any; - body = JSON.stringify({ - ...(input.content != null && { content: se_LayoutContent(input.content, context) }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + content: (_) => _json(_), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -981,15 +1008,15 @@ export const se_UpdateTemplateCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "domainId", () => input.domainId!, "{domainId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "templateId", () => input.templateId!, "{templateId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.layoutConfiguration != null && { - layoutConfiguration: se_LayoutConfiguration(input.layoutConfiguration, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.requiredFields != null && { requiredFields: se_RequiredFieldList(input.requiredFields, context) }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + description: [], + layoutConfiguration: (_) => _json(_), + name: [], + requiredFields: (_) => _json(_), + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1015,12 +1042,11 @@ export const de_BatchGetFieldCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchGetFieldErrorList(data.errors, context); - } - if (data.fields != null) { - contents.fields = de_BatchGetFieldList(data.fields, context); - } + const doc = take(data, { + errors: _json, + fields: (_) => de_BatchGetFieldList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1054,10 +1080,9 @@ const de_BatchGetFieldCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1077,9 +1102,10 @@ export const de_BatchPutFieldOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_FieldOptionErrorList(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1116,10 +1142,9 @@ const de_BatchPutFieldOptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1139,12 +1164,11 @@ export const de_CreateCaseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.caseArn != null) { - contents.caseArn = __expectString(data.caseArn); - } - if (data.caseId != null) { - contents.caseId = __expectString(data.caseId); - } + const doc = take(data, { + caseArn: __expectString, + caseId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1181,10 +1205,9 @@ const de_CreateCaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1204,15 +1227,12 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainArn != null) { - contents.domainArn = __expectString(data.domainArn); - } - if (data.domainId != null) { - contents.domainId = __expectString(data.domainId); - } - if (data.domainStatus != null) { - contents.domainStatus = __expectString(data.domainStatus); - } + const doc = take(data, { + domainArn: __expectString, + domainId: __expectString, + domainStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1249,10 +1269,9 @@ const de_CreateDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1272,12 +1291,11 @@ export const de_CreateFieldCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fieldArn != null) { - contents.fieldArn = __expectString(data.fieldArn); - } - if (data.fieldId != null) { - contents.fieldId = __expectString(data.fieldId); - } + const doc = take(data, { + fieldArn: __expectString, + fieldId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1317,10 +1335,9 @@ const de_CreateFieldCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1340,12 +1357,11 @@ export const de_CreateLayoutCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.layoutArn != null) { - contents.layoutArn = __expectString(data.layoutArn); - } - if (data.layoutId != null) { - contents.layoutId = __expectString(data.layoutId); - } + const doc = take(data, { + layoutArn: __expectString, + layoutId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1385,10 +1401,9 @@ const de_CreateLayoutCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1408,12 +1423,11 @@ export const de_CreateRelatedItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.relatedItemArn != null) { - contents.relatedItemArn = __expectString(data.relatedItemArn); - } - if (data.relatedItemId != null) { - contents.relatedItemId = __expectString(data.relatedItemId); - } + const doc = take(data, { + relatedItemArn: __expectString, + relatedItemId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1450,10 +1464,9 @@ const de_CreateRelatedItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1473,12 +1486,11 @@ export const de_CreateTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.templateArn != null) { - contents.templateArn = __expectString(data.templateArn); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } + const doc = take(data, { + templateArn: __expectString, + templateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1518,10 +1530,9 @@ const de_CreateTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1577,10 +1588,9 @@ const de_DeleteDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1600,18 +1610,13 @@ export const de_GetCaseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fields != null) { - contents.fields = de_FieldValueList(data.fields, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } + const doc = take(data, { + fields: (_) => de_FieldValueList(_, context), + nextToken: __expectString, + tags: (_) => de_Tags(_, context), + templateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1645,10 +1650,9 @@ const de_GetCaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1668,9 +1672,10 @@ export const de_GetCaseEventConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eventBridge != null) { - contents.eventBridge = de_EventBridgeConfiguration(data.eventBridge, context); - } + const doc = take(data, { + eventBridge: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1704,10 +1709,9 @@ const de_GetCaseEventConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1727,24 +1731,15 @@ export const de_GetDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdTime != null) { - contents.createdTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdTime)); - } - if (data.domainArn != null) { - contents.domainArn = __expectString(data.domainArn); - } - if (data.domainId != null) { - contents.domainId = __expectString(data.domainId); - } - if (data.domainStatus != null) { - contents.domainStatus = __expectString(data.domainStatus); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + domainArn: __expectString, + domainId: __expectString, + domainStatus: __expectString, + name: __expectString, + tags: (_) => de_Tags(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1778,10 +1773,9 @@ const de_GetDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1801,21 +1795,14 @@ export const de_GetLayoutCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.content != null) { - contents.content = de_LayoutContent(__expectUnion(data.content), context); - } - if (data.layoutArn != null) { - contents.layoutArn = __expectString(data.layoutArn); - } - if (data.layoutId != null) { - contents.layoutId = __expectString(data.layoutId); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + content: (_) => _json(__expectUnion(_)), + layoutArn: __expectString, + layoutId: __expectString, + name: __expectString, + tags: (_) => de_Tags(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1849,10 +1836,9 @@ const de_GetLayoutCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1872,30 +1858,17 @@ export const de_GetTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.layoutConfiguration != null) { - contents.layoutConfiguration = de_LayoutConfiguration(data.layoutConfiguration, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.requiredFields != null) { - contents.requiredFields = de_RequiredFieldList(data.requiredFields, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.templateArn != null) { - contents.templateArn = __expectString(data.templateArn); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } + const doc = take(data, { + description: __expectString, + layoutConfiguration: _json, + name: __expectString, + requiredFields: _json, + status: __expectString, + tags: (_) => de_Tags(_, context), + templateArn: __expectString, + templateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1929,10 +1902,9 @@ const de_GetTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1952,12 +1924,11 @@ export const de_ListCasesForContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cases != null) { - contents.cases = de_CaseSummaryList(data.cases, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + cases: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1991,10 +1962,9 @@ const de_ListCasesForContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2014,12 +1984,11 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domains != null) { - contents.domains = de_DomainSummaryList(data.domains, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + domains: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2050,10 +2019,9 @@ const de_ListDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2073,12 +2041,11 @@ export const de_ListFieldOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.options != null) { - contents.options = de_FieldOptionsList(data.options, context); - } + const doc = take(data, { + nextToken: __expectString, + options: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2112,10 +2079,9 @@ const de_ListFieldOptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2135,12 +2101,11 @@ export const de_ListFieldsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fields != null) { - contents.fields = de_FieldSummaryList(data.fields, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + fields: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2174,10 +2139,9 @@ const de_ListFieldsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2197,12 +2161,11 @@ export const de_ListLayoutsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.layouts != null) { - contents.layouts = de_LayoutSummaryList(data.layouts, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + layouts: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2236,10 +2199,9 @@ const de_ListLayoutsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2259,9 +2221,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: (_) => de_Tags(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2295,10 +2258,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2318,12 +2280,11 @@ export const de_ListTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templates != null) { - contents.templates = de_TemplateSummaryList(data.templates, context); - } + const doc = take(data, { + nextToken: __expectString, + templates: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2357,10 +2318,9 @@ const de_ListTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2413,10 +2373,9 @@ const de_PutCaseEventConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2436,12 +2395,11 @@ export const de_SearchCasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cases != null) { - contents.cases = de_SearchCasesResponseItemList(data.cases, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + cases: (_) => de_SearchCasesResponseItemList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2475,10 +2433,9 @@ const de_SearchCasesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2498,12 +2455,11 @@ export const de_SearchRelatedItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.relatedItems != null) { - contents.relatedItems = de_SearchRelatedItemsResponseItemList(data.relatedItems, context); - } + const doc = take(data, { + nextToken: __expectString, + relatedItems: (_) => de_SearchRelatedItemsResponseItemList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2537,10 +2493,9 @@ const de_SearchRelatedItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2593,10 +2548,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2649,10 +2603,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2705,10 +2658,9 @@ const de_UpdateCaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2764,10 +2716,9 @@ const de_UpdateFieldCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2826,10 +2777,9 @@ const de_UpdateLayoutCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2885,16 +2835,15 @@ const de_UpdateTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2904,9 +2853,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2920,9 +2870,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2944,9 +2895,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2963,15 +2915,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2988,9 +2937,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3004,9 +2954,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3020,9 +2971,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3030,35 +2982,11 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1BasicLayout - */ -const se_BasicLayout = (input: BasicLayout, context: __SerdeContext): any => { - return { - ...(input.moreInfo != null && { moreInfo: se_LayoutSections(input.moreInfo, context) }), - ...(input.topPanel != null && { topPanel: se_LayoutSections(input.topPanel, context) }), - }; -}; +// se_BasicLayout omitted. -/** - * serializeAws_restJson1BatchGetFieldIdentifierList - */ -const se_BatchGetFieldIdentifierList = (input: FieldIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldIdentifier(entry, context); - }); -}; +// se_BatchGetFieldIdentifierList omitted. -/** - * serializeAws_restJson1CaseEventIncludedData - */ -const se_CaseEventIncludedData = (input: CaseEventIncludedData, context: __SerdeContext): any => { - return { - ...(input.fields != null && { fields: se_FieldIdentifierList(input.fields, context) }), - }; -}; +// se_CaseEventIncludedData omitted. /** * serializeAws_restJson1CaseFilter @@ -3083,74 +3011,19 @@ const se_CaseFilterList = (input: CaseFilter[], context: __SerdeContext): any => }); }; -/** - * serializeAws_restJson1ChannelList - */ -const se_ChannelList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ChannelList omitted. -/** - * serializeAws_restJson1CommentContent - */ -const se_CommentContent = (input: CommentContent, context: __SerdeContext): any => { - return { - ...(input.body != null && { body: input.body }), - ...(input.contentType != null && { contentType: input.contentType }), - }; -}; +// se_CommentContent omitted. -/** - * serializeAws_restJson1CommentFilter - */ -const se_CommentFilter = (input: CommentFilter, context: __SerdeContext): any => { - return {}; -}; +// se_CommentFilter omitted. -/** - * serializeAws_restJson1Contact - */ -const se_Contact = (input: Contact, context: __SerdeContext): any => { - return { - ...(input.contactArn != null && { contactArn: input.contactArn }), - }; -}; +// se_Contact omitted. -/** - * serializeAws_restJson1ContactFilter - */ -const se_ContactFilter = (input: ContactFilter, context: __SerdeContext): any => { - return { - ...(input.channel != null && { channel: se_ChannelList(input.channel, context) }), - ...(input.contactArn != null && { contactArn: input.contactArn }), - }; -}; +// se_ContactFilter omitted. -/** - * serializeAws_restJson1EventBridgeConfiguration - */ -const se_EventBridgeConfiguration = (input: EventBridgeConfiguration, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.includedData != null && { includedData: se_EventIncludedData(input.includedData, context) }), - }; -}; +// se_EventBridgeConfiguration omitted. -/** - * serializeAws_restJson1EventIncludedData - */ -const se_EventIncludedData = (input: EventIncludedData, context: __SerdeContext): any => { - return { - ...(input.caseData != null && { caseData: se_CaseEventIncludedData(input.caseData, context) }), - ...(input.relatedItemData != null && { - relatedItemData: se_RelatedItemEventIncludedData(input.relatedItemData, context), - }), - }; -}; +// se_EventIncludedData omitted. /** * serializeAws_restJson1FieldFilter @@ -3167,86 +3040,28 @@ const se_FieldFilter = (input: FieldFilter, context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1FieldGroup - */ -const se_FieldGroup = (input: FieldGroup, context: __SerdeContext): any => { - return { - ...(input.fields != null && { fields: se_FieldList(input.fields, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_FieldGroup omitted. -/** - * serializeAws_restJson1FieldIdentifier - */ -const se_FieldIdentifier = (input: FieldIdentifier, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_FieldIdentifier omitted. -/** - * serializeAws_restJson1FieldIdentifierList - */ -const se_FieldIdentifierList = (input: FieldIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldIdentifier(entry, context); - }); -}; +// se_FieldIdentifierList omitted. -/** - * serializeAws_restJson1FieldItem - */ -const se_FieldItem = (input: FieldItem, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_FieldItem omitted. -/** - * serializeAws_restJson1FieldList - */ -const se_FieldList = (input: FieldItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldItem(entry, context); - }); -}; +// se_FieldList omitted. -/** - * serializeAws_restJson1FieldOption - */ -const se_FieldOption = (input: FieldOption, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_FieldOption omitted. -/** - * serializeAws_restJson1FieldOptionsList - */ -const se_FieldOptionsList = (input: FieldOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldOption(entry, context); - }); -}; +// se_FieldOptionsList omitted. /** * serializeAws_restJson1FieldValue */ const se_FieldValue = (input: FieldValue, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.value != null && { value: se_FieldValueUnion(input.value, context) }), - }; + return take(input, { + id: [], + value: (_) => se_FieldValueUnion(_, context), + }); }; /** @@ -3272,137 +3087,31 @@ const se_FieldValueUnion = (input: FieldValueUnion, context: __SerdeContext): an }); }; -/** - * serializeAws_restJson1LayoutConfiguration - */ -const se_LayoutConfiguration = (input: LayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.defaultLayout != null && { defaultLayout: input.defaultLayout }), - }; -}; +// se_LayoutConfiguration omitted. -/** - * serializeAws_restJson1LayoutContent - */ -const se_LayoutContent = (input: LayoutContent, context: __SerdeContext): any => { - return LayoutContent.visit(input, { - basic: (value) => ({ basic: se_BasicLayout(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_LayoutContent omitted. -/** - * serializeAws_restJson1LayoutSections - */ -const se_LayoutSections = (input: LayoutSections, context: __SerdeContext): any => { - return { - ...(input.sections != null && { sections: se_SectionsList(input.sections, context) }), - }; -}; +// se_LayoutSections omitted. -/** - * serializeAws_restJson1RelatedItemEventIncludedData - */ -const se_RelatedItemEventIncludedData = (input: RelatedItemEventIncludedData, context: __SerdeContext): any => { - return { - ...(input.includeContent != null && { includeContent: input.includeContent }), - }; -}; +// se_RelatedItemEventIncludedData omitted. -/** - * serializeAws_restJson1RelatedItemFilterList - */ -const se_RelatedItemFilterList = (input: RelatedItemTypeFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RelatedItemTypeFilter(entry, context); - }); -}; +// se_RelatedItemFilterList omitted. -/** - * serializeAws_restJson1RelatedItemInputContent - */ -const se_RelatedItemInputContent = (input: RelatedItemInputContent, context: __SerdeContext): any => { - return RelatedItemInputContent.visit(input, { - comment: (value) => ({ comment: se_CommentContent(value, context) }), - contact: (value) => ({ contact: se_Contact(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_RelatedItemInputContent omitted. -/** - * serializeAws_restJson1RelatedItemTypeFilter - */ -const se_RelatedItemTypeFilter = (input: RelatedItemTypeFilter, context: __SerdeContext): any => { - return RelatedItemTypeFilter.visit(input, { - comment: (value) => ({ comment: se_CommentFilter(value, context) }), - contact: (value) => ({ contact: se_ContactFilter(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_RelatedItemTypeFilter omitted. -/** - * serializeAws_restJson1RequiredField - */ -const se_RequiredField = (input: RequiredField, context: __SerdeContext): any => { - return { - ...(input.fieldId != null && { fieldId: input.fieldId }), - }; -}; +// se_RequiredField omitted. -/** - * serializeAws_restJson1RequiredFieldList - */ -const se_RequiredFieldList = (input: RequiredField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RequiredField(entry, context); - }); -}; +// se_RequiredFieldList omitted. -/** - * serializeAws_restJson1Section - */ -const se_Section = (input: Section, context: __SerdeContext): any => { - return Section.visit(input, { - fieldGroup: (value) => ({ fieldGroup: se_FieldGroup(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Section omitted. -/** - * serializeAws_restJson1SectionsList - */ -const se_SectionsList = (input: Section[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Section(entry, context); - }); -}; +// se_SectionsList omitted. -/** - * serializeAws_restJson1Sort - */ -const se_Sort = (input: Sort, context: __SerdeContext): any => { - return { - ...(input.fieldId != null && { fieldId: input.fieldId }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_Sort omitted. -/** - * serializeAws_restJson1SortList - */ -const se_SortList = (input: Sort[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Sort(entry, context); - }); -}; +// se_SortList omitted. /** * serializeAws_restJson1Tags @@ -3418,30 +3127,9 @@ const se_Tags = (input: Record, context: __SerdeContext): any => }, {}); }; -/** - * deserializeAws_restJson1BasicLayout - */ -const de_BasicLayout = (output: any, context: __SerdeContext): BasicLayout => { - return { - moreInfo: output.moreInfo != null ? de_LayoutSections(output.moreInfo, context) : undefined, - topPanel: output.topPanel != null ? de_LayoutSections(output.topPanel, context) : undefined, - } as any; -}; +// de_BasicLayout omitted. -/** - * deserializeAws_restJson1BatchGetFieldErrorList - */ -const de_BatchGetFieldErrorList = (output: any, context: __SerdeContext): FieldError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldError(entry, context); - }); - return retVal; -}; +// de_BatchGetFieldErrorList omitted. /** * deserializeAws_restJson1BatchGetFieldList @@ -3450,276 +3138,70 @@ const de_BatchGetFieldList = (output: any, context: __SerdeContext): GetFieldRes const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GetFieldResponse(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CaseEventIncludedData - */ -const de_CaseEventIncludedData = (output: any, context: __SerdeContext): CaseEventIncludedData => { - return { - fields: output.fields != null ? de_FieldIdentifierList(output.fields, context) : undefined, - } as any; -}; +// de_CaseEventIncludedData omitted. -/** - * deserializeAws_restJson1CaseSummary - */ -const de_CaseSummary = (output: any, context: __SerdeContext): CaseSummary => { - return { - caseId: __expectString(output.caseId), - templateId: __expectString(output.templateId), - } as any; -}; +// de_CaseSummary omitted. -/** - * deserializeAws_restJson1CaseSummaryList - */ -const de_CaseSummaryList = (output: any, context: __SerdeContext): CaseSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CaseSummary(entry, context); - }); - return retVal; -}; +// de_CaseSummaryList omitted. -/** - * deserializeAws_restJson1CommentContent - */ -const de_CommentContent = (output: any, context: __SerdeContext): CommentContent => { - return { - body: __expectString(output.body), - contentType: __expectString(output.contentType), - } as any; -}; +// de_CommentContent omitted. /** * deserializeAws_restJson1ContactContent */ const de_ContactContent = (output: any, context: __SerdeContext): ContactContent => { - return { - channel: __expectString(output.channel), - connectedToSystemTime: - output.connectedToSystemTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.connectedToSystemTime)) - : undefined, - contactArn: __expectString(output.contactArn), - } as any; + return take(output, { + channel: __expectString, + connectedToSystemTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + contactArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DomainSummary - */ -const de_DomainSummary = (output: any, context: __SerdeContext): DomainSummary => { - return { - domainArn: __expectString(output.domainArn), - domainId: __expectString(output.domainId), - name: __expectString(output.name), - } as any; -}; +// de_DomainSummary omitted. -/** - * deserializeAws_restJson1DomainSummaryList - */ -const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainSummary(entry, context); - }); - return retVal; -}; +// de_DomainSummaryList omitted. -/** - * deserializeAws_restJson1EventBridgeConfiguration - */ -const de_EventBridgeConfiguration = (output: any, context: __SerdeContext): EventBridgeConfiguration => { - return { - enabled: __expectBoolean(output.enabled), - includedData: output.includedData != null ? de_EventIncludedData(output.includedData, context) : undefined, - } as any; -}; +// de_EventBridgeConfiguration omitted. -/** - * deserializeAws_restJson1EventIncludedData - */ -const de_EventIncludedData = (output: any, context: __SerdeContext): EventIncludedData => { - return { - caseData: output.caseData != null ? de_CaseEventIncludedData(output.caseData, context) : undefined, - relatedItemData: - output.relatedItemData != null ? de_RelatedItemEventIncludedData(output.relatedItemData, context) : undefined, - } as any; -}; +// de_EventIncludedData omitted. -/** - * deserializeAws_restJson1FieldError - */ -const de_FieldError = (output: any, context: __SerdeContext): FieldError => { - return { - errorCode: __expectString(output.errorCode), - id: __expectString(output.id), - message: __expectString(output.message), - } as any; -}; +// de_FieldError omitted. -/** - * deserializeAws_restJson1FieldGroup - */ -const de_FieldGroup = (output: any, context: __SerdeContext): FieldGroup => { - return { - fields: output.fields != null ? de_FieldList(output.fields, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_FieldGroup omitted. -/** - * deserializeAws_restJson1FieldIdentifier - */ -const de_FieldIdentifier = (output: any, context: __SerdeContext): FieldIdentifier => { - return { - id: __expectString(output.id), - } as any; -}; +// de_FieldIdentifier omitted. -/** - * deserializeAws_restJson1FieldIdentifierList - */ -const de_FieldIdentifierList = (output: any, context: __SerdeContext): FieldIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldIdentifier(entry, context); - }); - return retVal; -}; +// de_FieldIdentifierList omitted. -/** - * deserializeAws_restJson1FieldItem - */ -const de_FieldItem = (output: any, context: __SerdeContext): FieldItem => { - return { - id: __expectString(output.id), - } as any; -}; +// de_FieldItem omitted. -/** - * deserializeAws_restJson1FieldList - */ -const de_FieldList = (output: any, context: __SerdeContext): FieldItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldItem(entry, context); - }); - return retVal; -}; +// de_FieldList omitted. -/** - * deserializeAws_restJson1FieldOption - */ -const de_FieldOption = (output: any, context: __SerdeContext): FieldOption => { - return { - active: __expectBoolean(output.active), - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_FieldOption omitted. -/** - * deserializeAws_restJson1FieldOptionError - */ -const de_FieldOptionError = (output: any, context: __SerdeContext): FieldOptionError => { - return { - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - value: __expectString(output.value), - } as any; -}; +// de_FieldOptionError omitted. -/** - * deserializeAws_restJson1FieldOptionErrorList - */ -const de_FieldOptionErrorList = (output: any, context: __SerdeContext): FieldOptionError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldOptionError(entry, context); - }); - return retVal; -}; +// de_FieldOptionErrorList omitted. -/** - * deserializeAws_restJson1FieldOptionsList - */ -const de_FieldOptionsList = (output: any, context: __SerdeContext): FieldOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldOption(entry, context); - }); - return retVal; -}; +// de_FieldOptionsList omitted. -/** - * deserializeAws_restJson1FieldSummary - */ -const de_FieldSummary = (output: any, context: __SerdeContext): FieldSummary => { - return { - fieldArn: __expectString(output.fieldArn), - fieldId: __expectString(output.fieldId), - name: __expectString(output.name), - namespace: __expectString(output.namespace), - type: __expectString(output.type), - } as any; -}; +// de_FieldSummary omitted. -/** - * deserializeAws_restJson1FieldSummaryList - */ -const de_FieldSummaryList = (output: any, context: __SerdeContext): FieldSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldSummary(entry, context); - }); - return retVal; -}; +// de_FieldSummaryList omitted. /** * deserializeAws_restJson1FieldValue */ const de_FieldValue = (output: any, context: __SerdeContext): FieldValue => { - return { - id: __expectString(output.id), - value: output.value != null ? de_FieldValueUnion(__expectUnion(output.value), context) : undefined, - } as any; + return take(output, { + id: __expectString, + value: (_: any) => de_FieldValueUnion(__expectUnion(_), context), + }) as any; }; /** @@ -3729,9 +3211,6 @@ const de_FieldValueList = (output: any, context: __SerdeContext): FieldValue[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FieldValue(entry, context); }); return retVal; @@ -3757,72 +3236,26 @@ const de_FieldValueUnion = (output: any, context: __SerdeContext): FieldValueUni * deserializeAws_restJson1GetFieldResponse */ const de_GetFieldResponse = (output: any, context: __SerdeContext): GetFieldResponse => { - return { - description: __expectString(output.description), - fieldArn: __expectString(output.fieldArn), - fieldId: __expectString(output.fieldId), - name: __expectString(output.name), - namespace: __expectString(output.namespace), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + description: __expectString, + fieldArn: __expectString, + fieldId: __expectString, + name: __expectString, + namespace: __expectString, + tags: (_: any) => de_Tags(_, context), + type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1LayoutConfiguration - */ -const de_LayoutConfiguration = (output: any, context: __SerdeContext): LayoutConfiguration => { - return { - defaultLayout: __expectString(output.defaultLayout), - } as any; -}; +// de_LayoutConfiguration omitted. -/** - * deserializeAws_restJson1LayoutContent - */ -const de_LayoutContent = (output: any, context: __SerdeContext): LayoutContent => { - if (output.basic != null) { - return { - basic: de_BasicLayout(output.basic, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_LayoutContent omitted. -/** - * deserializeAws_restJson1LayoutSections - */ -const de_LayoutSections = (output: any, context: __SerdeContext): LayoutSections => { - return { - sections: output.sections != null ? de_SectionsList(output.sections, context) : undefined, - } as any; -}; +// de_LayoutSections omitted. -/** - * deserializeAws_restJson1LayoutSummary - */ -const de_LayoutSummary = (output: any, context: __SerdeContext): LayoutSummary => { - return { - layoutArn: __expectString(output.layoutArn), - layoutId: __expectString(output.layoutId), - name: __expectString(output.name), - } as any; -}; +// de_LayoutSummary omitted. -/** - * deserializeAws_restJson1LayoutSummaryList - */ -const de_LayoutSummaryList = (output: any, context: __SerdeContext): LayoutSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LayoutSummary(entry, context); - }); - return retVal; -}; +// de_LayoutSummaryList omitted. /** * deserializeAws_restJson1RelatedItemContent @@ -3830,7 +3263,7 @@ const de_LayoutSummaryList = (output: any, context: __SerdeContext): LayoutSumma const de_RelatedItemContent = (output: any, context: __SerdeContext): RelatedItemContent => { if (output.comment != null) { return { - comment: de_CommentContent(output.comment, context), + comment: _json(output.comment), }; } if (output.contact != null) { @@ -3841,49 +3274,22 @@ const de_RelatedItemContent = (output: any, context: __SerdeContext): RelatedIte return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1RelatedItemEventIncludedData - */ -const de_RelatedItemEventIncludedData = (output: any, context: __SerdeContext): RelatedItemEventIncludedData => { - return { - includeContent: __expectBoolean(output.includeContent), - } as any; -}; +// de_RelatedItemEventIncludedData omitted. -/** - * deserializeAws_restJson1RequiredField - */ -const de_RequiredField = (output: any, context: __SerdeContext): RequiredField => { - return { - fieldId: __expectString(output.fieldId), - } as any; -}; +// de_RequiredField omitted. -/** - * deserializeAws_restJson1RequiredFieldList - */ -const de_RequiredFieldList = (output: any, context: __SerdeContext): RequiredField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RequiredField(entry, context); - }); - return retVal; -}; +// de_RequiredFieldList omitted. /** * deserializeAws_restJson1SearchCasesResponseItem */ const de_SearchCasesResponseItem = (output: any, context: __SerdeContext): SearchCasesResponseItem => { - return { - caseId: __expectString(output.caseId), - fields: output.fields != null ? de_FieldValueList(output.fields, context) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - templateId: __expectString(output.templateId), - } as any; + return take(output, { + caseId: __expectString, + fields: (_: any) => de_FieldValueList(_, context), + tags: (_: any) => de_Tags(_, context), + templateId: __expectString, + }) as any; }; /** @@ -3903,16 +3309,13 @@ const de_SearchCasesResponseItemList = (output: any, context: __SerdeContext): S * deserializeAws_restJson1SearchRelatedItemsResponseItem */ const de_SearchRelatedItemsResponseItem = (output: any, context: __SerdeContext): SearchRelatedItemsResponseItem => { - return { - associationTime: - output.associationTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.associationTime)) - : undefined, - content: output.content != null ? de_RelatedItemContent(__expectUnion(output.content), context) : undefined, - relatedItemId: __expectString(output.relatedItemId), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + associationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + content: (_: any) => de_RelatedItemContent(__expectUnion(_), context), + relatedItemId: __expectString, + tags: (_: any) => de_Tags(_, context), + type: __expectString, + }) as any; }; /** @@ -3931,32 +3334,9 @@ const de_SearchRelatedItemsResponseItemList = ( return retVal; }; -/** - * deserializeAws_restJson1Section - */ -const de_Section = (output: any, context: __SerdeContext): Section => { - if (output.fieldGroup != null) { - return { - fieldGroup: de_FieldGroup(output.fieldGroup, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_Section omitted. -/** - * deserializeAws_restJson1SectionsList - */ -const de_SectionsList = (output: any, context: __SerdeContext): Section[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Section(__expectUnion(entry), context); - }); - return retVal; -}; +// de_SectionsList omitted. /** * deserializeAws_restJson1Tags @@ -3972,32 +3352,9 @@ const de_Tags = (output: any, context: __SerdeContext): Record = }, {}); }; -/** - * deserializeAws_restJson1TemplateSummary - */ -const de_TemplateSummary = (output: any, context: __SerdeContext): TemplateSummary => { - return { - name: __expectString(output.name), - status: __expectString(output.status), - templateArn: __expectString(output.templateArn), - templateId: __expectString(output.templateId), - } as any; -}; +// de_TemplateSummary omitted. -/** - * deserializeAws_restJson1TemplateSummaryList - */ -const de_TemplateSummaryList = (output: any, context: __SerdeContext): TemplateSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateSummary(entry, context); - }); - return retVal; -}; +// de_TemplateSummaryList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-connectparticipant/src/protocols/Aws_restJson1.ts b/clients/client-connectparticipant/src/protocols/Aws_restJson1.ts index 9218d2b0f011..06e965eb7b33 100644 --- a/clients/client-connectparticipant/src/protocols/Aws_restJson1.ts +++ b/clients/client-connectparticipant/src/protocols/Aws_restJson1.ts @@ -1,12 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -38,20 +40,13 @@ import { import { ConnectParticipantServiceException as __BaseException } from "../models/ConnectParticipantServiceException"; import { AccessDeniedException, - AttachmentItem, ConflictException, - ConnectionCredentials, ConnectionType, InternalServerException, - Item, - MessageMetadata, - Receipt, ServiceQuotaExceededException, StartPosition, ThrottlingException, - UploadMetadata, ValidationException, - Websocket, } from "../models/models_0"; /** @@ -69,10 +64,12 @@ export const se_CompleteAttachmentUploadCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/complete-attachment-upload"; let body: any; - body = JSON.stringify({ - ...(input.AttachmentIds != null && { AttachmentIds: se_AttachmentIdList(input.AttachmentIds, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + AttachmentIds: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -99,10 +96,12 @@ export const se_CreateParticipantConnectionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/connection"; let body: any; - body = JSON.stringify({ - ...(input.ConnectParticipant != null && { ConnectParticipant: input.ConnectParticipant }), - ...(input.Type != null && { Type: se_ConnectionTypeList(input.Type, context) }), - }); + body = JSON.stringify( + take(input, { + ConnectParticipant: [], + Type: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -129,9 +128,11 @@ export const se_DisconnectParticipantCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/disconnect"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -158,9 +159,11 @@ export const se_GetAttachmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/attachment"; let body: any; - body = JSON.stringify({ - ...(input.AttachmentId != null && { AttachmentId: input.AttachmentId }), - }); + body = JSON.stringify( + take(input, { + AttachmentId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -187,14 +190,16 @@ export const se_GetTranscriptCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/transcript"; let body: any; - body = JSON.stringify({ - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ScanDirection != null && { ScanDirection: input.ScanDirection }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StartPosition != null && { StartPosition: se_StartPosition(input.StartPosition, context) }), - }); + body = JSON.stringify( + take(input, { + ContactId: [], + MaxResults: [], + NextToken: [], + ScanDirection: [], + SortOrder: [], + StartPosition: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -220,11 +225,13 @@ export const se_SendEventCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/event"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Content: [], + ContentType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -250,11 +257,13 @@ export const se_SendMessageCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/message"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Content: [], + ContentType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -281,12 +290,14 @@ export const se_StartAttachmentUploadCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/start-attachment-upload"; let body: any; - body = JSON.stringify({ - ...(input.AttachmentName != null && { AttachmentName: input.AttachmentName }), - ...(input.AttachmentSizeInBytes != null && { AttachmentSizeInBytes: input.AttachmentSizeInBytes }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ContentType != null && { ContentType: input.ContentType }), - }); + body = JSON.stringify( + take(input, { + AttachmentName: [], + AttachmentSizeInBytes: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ContentType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -348,10 +359,9 @@ const de_CompleteAttachmentUploadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -371,12 +381,11 @@ export const de_CreateParticipantConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionCredentials != null) { - contents.ConnectionCredentials = de_ConnectionCredentials(data.ConnectionCredentials, context); - } - if (data.Websocket != null) { - contents.Websocket = de_Websocket(data.Websocket, context); - } + const doc = take(data, { + ConnectionCredentials: _json, + Websocket: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -407,10 +416,9 @@ const de_CreateParticipantConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -460,10 +468,9 @@ const de_DisconnectParticipantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -483,12 +490,11 @@ export const de_GetAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Url != null) { - contents.Url = __expectString(data.Url); - } - if (data.UrlExpiry != null) { - contents.UrlExpiry = __expectString(data.UrlExpiry); - } + const doc = take(data, { + Url: __expectString, + UrlExpiry: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -519,10 +525,9 @@ const de_GetAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -542,15 +547,12 @@ export const de_GetTranscriptCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InitialContactId != null) { - contents.InitialContactId = __expectString(data.InitialContactId); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Transcript != null) { - contents.Transcript = de_Transcript(data.Transcript, context); - } + const doc = take(data, { + InitialContactId: __expectString, + NextToken: __expectString, + Transcript: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -581,10 +583,9 @@ const de_GetTranscriptCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -604,12 +605,11 @@ export const de_SendEventCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AbsoluteTime != null) { - contents.AbsoluteTime = __expectString(data.AbsoluteTime); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + AbsoluteTime: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -640,10 +640,9 @@ const de_SendEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -663,12 +662,11 @@ export const de_SendMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AbsoluteTime != null) { - contents.AbsoluteTime = __expectString(data.AbsoluteTime); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + AbsoluteTime: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -699,10 +697,9 @@ const de_SendMessageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -722,12 +719,11 @@ export const de_StartAttachmentUploadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AttachmentId != null) { - contents.AttachmentId = __expectString(data.AttachmentId); - } - if (data.UploadMetadata != null) { - contents.UploadMetadata = de_UploadMetadata(data.UploadMetadata, context); - } + const doc = take(data, { + AttachmentId: __expectString, + UploadMetadata: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -761,16 +757,15 @@ const de_StartAttachmentUploadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -780,9 +775,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -796,9 +792,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -815,9 +812,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -834,9 +832,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -850,9 +849,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -866,9 +866,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -876,181 +877,33 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AttachmentIdList - */ -const se_AttachmentIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttachmentIdList omitted. -/** - * serializeAws_restJson1ConnectionTypeList - */ -const se_ConnectionTypeList = (input: (ConnectionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConnectionTypeList omitted. -/** - * serializeAws_restJson1StartPosition - */ -const se_StartPosition = (input: StartPosition, context: __SerdeContext): any => { - return { - ...(input.AbsoluteTime != null && { AbsoluteTime: input.AbsoluteTime }), - ...(input.Id != null && { Id: input.Id }), - ...(input.MostRecent != null && { MostRecent: input.MostRecent }), - }; -}; +// se_StartPosition omitted. -/** - * deserializeAws_restJson1AttachmentItem - */ -const de_AttachmentItem = (output: any, context: __SerdeContext): AttachmentItem => { - return { - AttachmentId: __expectString(output.AttachmentId), - AttachmentName: __expectString(output.AttachmentName), - ContentType: __expectString(output.ContentType), - Status: __expectString(output.Status), - } as any; -}; +// de_AttachmentItem omitted. -/** - * deserializeAws_restJson1Attachments - */ -const de_Attachments = (output: any, context: __SerdeContext): AttachmentItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttachmentItem(entry, context); - }); - return retVal; -}; +// de_Attachments omitted. -/** - * deserializeAws_restJson1ConnectionCredentials - */ -const de_ConnectionCredentials = (output: any, context: __SerdeContext): ConnectionCredentials => { - return { - ConnectionToken: __expectString(output.ConnectionToken), - Expiry: __expectString(output.Expiry), - } as any; -}; +// de_ConnectionCredentials omitted. -/** - * deserializeAws_restJson1Item - */ -const de_Item = (output: any, context: __SerdeContext): Item => { - return { - AbsoluteTime: __expectString(output.AbsoluteTime), - Attachments: output.Attachments != null ? de_Attachments(output.Attachments, context) : undefined, - ContactId: __expectString(output.ContactId), - Content: __expectString(output.Content), - ContentType: __expectString(output.ContentType), - DisplayName: __expectString(output.DisplayName), - Id: __expectString(output.Id), - MessageMetadata: output.MessageMetadata != null ? de_MessageMetadata(output.MessageMetadata, context) : undefined, - ParticipantId: __expectString(output.ParticipantId), - ParticipantRole: __expectString(output.ParticipantRole), - RelatedContactId: __expectString(output.RelatedContactId), - Type: __expectString(output.Type), - } as any; -}; +// de_Item omitted. -/** - * deserializeAws_restJson1MessageMetadata - */ -const de_MessageMetadata = (output: any, context: __SerdeContext): MessageMetadata => { - return { - MessageId: __expectString(output.MessageId), - Receipts: output.Receipts != null ? de_Receipts(output.Receipts, context) : undefined, - } as any; -}; +// de_MessageMetadata omitted. -/** - * deserializeAws_restJson1Receipt - */ -const de_Receipt = (output: any, context: __SerdeContext): Receipt => { - return { - DeliveredTimestamp: __expectString(output.DeliveredTimestamp), - ReadTimestamp: __expectString(output.ReadTimestamp), - RecipientParticipantId: __expectString(output.RecipientParticipantId), - } as any; -}; +// de_Receipt omitted. -/** - * deserializeAws_restJson1Receipts - */ -const de_Receipts = (output: any, context: __SerdeContext): Receipt[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Receipt(entry, context); - }); - return retVal; -}; +// de_Receipts omitted. -/** - * deserializeAws_restJson1Transcript - */ -const de_Transcript = (output: any, context: __SerdeContext): Item[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Item(entry, context); - }); - return retVal; -}; +// de_Transcript omitted. -/** - * deserializeAws_restJson1UploadMetadata - */ -const de_UploadMetadata = (output: any, context: __SerdeContext): UploadMetadata => { - return { - HeadersToInclude: - output.HeadersToInclude != null ? de_UploadMetadataSignedHeaders(output.HeadersToInclude, context) : undefined, - Url: __expectString(output.Url), - UrlExpiry: __expectString(output.UrlExpiry), - } as any; -}; +// de_UploadMetadata omitted. -/** - * deserializeAws_restJson1UploadMetadataSignedHeaders - */ -const de_UploadMetadataSignedHeaders = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_UploadMetadataSignedHeaders omitted. -/** - * deserializeAws_restJson1Websocket - */ -const de_Websocket = (output: any, context: __SerdeContext): Websocket => { - return { - ConnectionExpiry: __expectString(output.ConnectionExpiry), - Url: __expectString(output.Url), - } as any; -}; +// de_Websocket omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-controltower/src/protocols/Aws_restJson1.ts b/clients/client-controltower/src/protocols/Aws_restJson1.ts index 98b9808b9ca1..91e995dbf7dc 100644 --- a/clients/client-controltower/src/protocols/Aws_restJson1.ts +++ b/clients/client-controltower/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -31,7 +33,6 @@ import { AccessDeniedException, ConflictException, ControlOperation, - EnabledControlSummary, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, @@ -52,10 +53,12 @@ export const se_DisableControlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable-control"; let body: any; - body = JSON.stringify({ - ...(input.controlIdentifier != null && { controlIdentifier: input.controlIdentifier }), - ...(input.targetIdentifier != null && { targetIdentifier: input.targetIdentifier }), - }); + body = JSON.stringify( + take(input, { + controlIdentifier: [], + targetIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -80,10 +83,12 @@ export const se_EnableControlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable-control"; let body: any; - body = JSON.stringify({ - ...(input.controlIdentifier != null && { controlIdentifier: input.controlIdentifier }), - ...(input.targetIdentifier != null && { targetIdentifier: input.targetIdentifier }), - }); + body = JSON.stringify( + take(input, { + controlIdentifier: [], + targetIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -108,9 +113,11 @@ export const se_GetControlOperationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-control-operation"; let body: any; - body = JSON.stringify({ - ...(input.operationIdentifier != null && { operationIdentifier: input.operationIdentifier }), - }); + body = JSON.stringify( + take(input, { + operationIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -135,11 +142,13 @@ export const se_ListEnabledControlsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-enabled-controls"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.targetIdentifier != null && { targetIdentifier: input.targetIdentifier }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + targetIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -165,9 +174,10 @@ export const de_DisableControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.operationIdentifier != null) { - contents.operationIdentifier = __expectString(data.operationIdentifier); - } + const doc = take(data, { + operationIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -207,10 +217,9 @@ const de_DisableControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -230,9 +239,10 @@ export const de_EnableControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.operationIdentifier != null) { - contents.operationIdentifier = __expectString(data.operationIdentifier); - } + const doc = take(data, { + operationIdentifier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -272,10 +282,9 @@ const de_EnableControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -295,9 +304,10 @@ export const de_GetControlOperationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.controlOperation != null) { - contents.controlOperation = de_ControlOperation(data.controlOperation, context); - } + const doc = take(data, { + controlOperation: (_) => de_ControlOperation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -331,10 +341,9 @@ const de_GetControlOperationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -354,12 +363,11 @@ export const de_ListEnabledControlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.enabledControls != null) { - contents.enabledControls = de_EnabledControls(data.enabledControls, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + enabledControls: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -393,16 +401,15 @@ const de_ListEnabledControlsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -412,9 +419,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -428,9 +436,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -447,9 +456,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -466,9 +476,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -485,9 +496,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -506,15 +518,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -528,9 +537,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -542,39 +552,18 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * deserializeAws_restJson1ControlOperation */ const de_ControlOperation = (output: any, context: __SerdeContext): ControlOperation => { - return { - endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - operationType: __expectString(output.operationType), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; + return take(output, { + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + operationType: __expectString, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + statusMessage: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1EnabledControls - */ -const de_EnabledControls = (output: any, context: __SerdeContext): EnabledControlSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnabledControlSummary(entry, context); - }); - return retVal; -}; +// de_EnabledControls omitted. -/** - * deserializeAws_restJson1EnabledControlSummary - */ -const de_EnabledControlSummary = (output: any, context: __SerdeContext): EnabledControlSummary => { - return { - controlIdentifier: __expectString(output.controlIdentifier), - } as any; -}; +// de_EnabledControlSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-cost-and-usage-report-service/src/protocols/Aws_json1_1.ts b/clients/client-cost-and-usage-report-service/src/protocols/Aws_json1_1.ts index 48649f66d4ee..7534e0da10bf 100644 --- a/clients/client-cost-and-usage-report-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-cost-and-usage-report-service/src/protocols/Aws_json1_1.ts @@ -1,10 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -33,15 +32,11 @@ import { CostAndUsageReportServiceServiceException as __BaseException } from ".. import { AdditionalArtifact, DeleteReportDefinitionRequest, - DeleteReportDefinitionResponse, DescribeReportDefinitionsRequest, - DescribeReportDefinitionsResponse, DuplicateReportNameException, InternalErrorException, ModifyReportDefinitionRequest, - ModifyReportDefinitionResponse, PutReportDefinitionRequest, - PutReportDefinitionResponse, ReportDefinition, ReportLimitReachedException, SchemaElement, @@ -57,7 +52,7 @@ export const se_DeleteReportDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReportDefinition"); let body: any; - body = JSON.stringify(se_DeleteReportDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -70,7 +65,7 @@ export const se_DescribeReportDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReportDefinitions"); let body: any; - body = JSON.stringify(se_DescribeReportDefinitionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -83,7 +78,7 @@ export const se_ModifyReportDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyReportDefinition"); let body: any; - body = JSON.stringify(se_ModifyReportDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -96,7 +91,7 @@ export const se_PutReportDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutReportDefinition"); let body: any; - body = JSON.stringify(se_PutReportDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -112,12 +107,12 @@ export const de_DeleteReportDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteReportDefinitionResponse(data, context); + contents = _json(data); const response: DeleteReportDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -141,10 +136,9 @@ const de_DeleteReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -162,12 +156,12 @@ export const de_DescribeReportDefinitionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeReportDefinitionsResponse(data, context); + contents = _json(data); const response: DescribeReportDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -188,10 +182,9 @@ const de_DescribeReportDefinitionsCommandError = async ( throw await de_InternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -209,12 +202,12 @@ export const de_ModifyReportDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyReportDefinitionResponse(data, context); + contents = _json(data); const response: ModifyReportDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -238,10 +231,9 @@ const de_ModifyReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -259,12 +251,12 @@ export const de_PutReportDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutReportDefinitionResponse(data, context); + contents = _json(data); const response: PutReportDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -294,10 +286,9 @@ const de_PutReportDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -311,7 +302,7 @@ const de_DuplicateReportNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateReportNameException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateReportNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -327,7 +318,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -343,7 +334,7 @@ const de_ReportLimitReachedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReportLimitReachedException(body, context); + const deserialized: any = _json(body); const exception = new ReportLimitReachedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -356,7 +347,7 @@ const de_ReportLimitReachedExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -364,231 +355,43 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AdditionalArtifactList - */ -const se_AdditionalArtifactList = (input: (AdditionalArtifact | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalArtifactList omitted. -/** - * serializeAws_json1_1DeleteReportDefinitionRequest - */ -const se_DeleteReportDefinitionRequest = (input: DeleteReportDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.ReportName != null && { ReportName: input.ReportName }), - }; -}; +// se_DeleteReportDefinitionRequest omitted. -/** - * serializeAws_json1_1DescribeReportDefinitionsRequest - */ -const se_DescribeReportDefinitionsRequest = (input: DescribeReportDefinitionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeReportDefinitionsRequest omitted. -/** - * serializeAws_json1_1ModifyReportDefinitionRequest - */ -const se_ModifyReportDefinitionRequest = (input: ModifyReportDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.ReportDefinition != null && { ReportDefinition: se_ReportDefinition(input.ReportDefinition, context) }), - ...(input.ReportName != null && { ReportName: input.ReportName }), - }; -}; +// se_ModifyReportDefinitionRequest omitted. -/** - * serializeAws_json1_1PutReportDefinitionRequest - */ -const se_PutReportDefinitionRequest = (input: PutReportDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.ReportDefinition != null && { ReportDefinition: se_ReportDefinition(input.ReportDefinition, context) }), - }; -}; +// se_PutReportDefinitionRequest omitted. -/** - * serializeAws_json1_1ReportDefinition - */ -const se_ReportDefinition = (input: ReportDefinition, context: __SerdeContext): any => { - return { - ...(input.AdditionalArtifacts != null && { - AdditionalArtifacts: se_AdditionalArtifactList(input.AdditionalArtifacts, context), - }), - ...(input.AdditionalSchemaElements != null && { - AdditionalSchemaElements: se_SchemaElementList(input.AdditionalSchemaElements, context), - }), - ...(input.BillingViewArn != null && { BillingViewArn: input.BillingViewArn }), - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.Format != null && { Format: input.Format }), - ...(input.RefreshClosedReports != null && { RefreshClosedReports: input.RefreshClosedReports }), - ...(input.ReportName != null && { ReportName: input.ReportName }), - ...(input.ReportVersioning != null && { ReportVersioning: input.ReportVersioning }), - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }), - ...(input.S3Region != null && { S3Region: input.S3Region }), - ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }), - }; -}; +// se_ReportDefinition omitted. -/** - * serializeAws_json1_1SchemaElementList - */ -const se_SchemaElementList = (input: (SchemaElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SchemaElementList omitted. -/** - * deserializeAws_json1_1AdditionalArtifactList - */ -const de_AdditionalArtifactList = (output: any, context: __SerdeContext): (AdditionalArtifact | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AdditionalArtifactList omitted. -/** - * deserializeAws_json1_1DeleteReportDefinitionResponse - */ -const de_DeleteReportDefinitionResponse = (output: any, context: __SerdeContext): DeleteReportDefinitionResponse => { - return { - ResponseMessage: __expectString(output.ResponseMessage), - } as any; -}; +// de_DeleteReportDefinitionResponse omitted. -/** - * deserializeAws_json1_1DescribeReportDefinitionsResponse - */ -const de_DescribeReportDefinitionsResponse = ( - output: any, - context: __SerdeContext -): DescribeReportDefinitionsResponse => { - return { - NextToken: __expectString(output.NextToken), - ReportDefinitions: - output.ReportDefinitions != null ? de_ReportDefinitionList(output.ReportDefinitions, context) : undefined, - } as any; -}; +// de_DescribeReportDefinitionsResponse omitted. -/** - * deserializeAws_json1_1DuplicateReportNameException - */ -const de_DuplicateReportNameException = (output: any, context: __SerdeContext): DuplicateReportNameException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DuplicateReportNameException omitted. -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalErrorException omitted. -/** - * deserializeAws_json1_1ModifyReportDefinitionResponse - */ -const de_ModifyReportDefinitionResponse = (output: any, context: __SerdeContext): ModifyReportDefinitionResponse => { - return {} as any; -}; +// de_ModifyReportDefinitionResponse omitted. -/** - * deserializeAws_json1_1PutReportDefinitionResponse - */ -const de_PutReportDefinitionResponse = (output: any, context: __SerdeContext): PutReportDefinitionResponse => { - return {} as any; -}; +// de_PutReportDefinitionResponse omitted. -/** - * deserializeAws_json1_1ReportDefinition - */ -const de_ReportDefinition = (output: any, context: __SerdeContext): ReportDefinition => { - return { - AdditionalArtifacts: - output.AdditionalArtifacts != null ? de_AdditionalArtifactList(output.AdditionalArtifacts, context) : undefined, - AdditionalSchemaElements: - output.AdditionalSchemaElements != null - ? de_SchemaElementList(output.AdditionalSchemaElements, context) - : undefined, - BillingViewArn: __expectString(output.BillingViewArn), - Compression: __expectString(output.Compression), - Format: __expectString(output.Format), - RefreshClosedReports: __expectBoolean(output.RefreshClosedReports), - ReportName: __expectString(output.ReportName), - ReportVersioning: __expectString(output.ReportVersioning), - S3Bucket: __expectString(output.S3Bucket), - S3Prefix: __expectString(output.S3Prefix), - S3Region: __expectString(output.S3Region), - TimeUnit: __expectString(output.TimeUnit), - } as any; -}; +// de_ReportDefinition omitted. -/** - * deserializeAws_json1_1ReportDefinitionList - */ -const de_ReportDefinitionList = (output: any, context: __SerdeContext): ReportDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReportDefinition(entry, context); - }); - return retVal; -}; +// de_ReportDefinitionList omitted. -/** - * deserializeAws_json1_1ReportLimitReachedException - */ -const de_ReportLimitReachedException = (output: any, context: __SerdeContext): ReportLimitReachedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ReportLimitReachedException omitted. -/** - * deserializeAws_json1_1SchemaElementList - */ -const de_SchemaElementList = (output: any, context: __SerdeContext): (SchemaElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SchemaElementList omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -610,6 +413,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts b/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts index b1d1261467bb..9718d0024211 100644 --- a/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts +++ b/clients/client-cost-explorer/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -142,53 +143,27 @@ import { AnomalyScore, AnomalySubscription, BillExpirationException, - CostAllocationTag, CostAllocationTagStatusEntry, CostCategory, CostCategoryInheritedValueDimension, - CostCategoryProcessingStatus, - CostCategoryReference, CostCategoryRule, CostCategorySplitChargeRule, CostCategorySplitChargeRuleParameter, CostCategoryValues, - Coverage, - CoverageByTime, - CoverageCost, - CoverageHours, - CoverageNormalizedUnits, CreateAnomalyMonitorRequest, - CreateAnomalyMonitorResponse, CreateAnomalySubscriptionRequest, - CreateAnomalySubscriptionResponse, CreateCostCategoryDefinitionRequest, - CreateCostCategoryDefinitionResponse, - CurrentInstance, DataUnavailableException, DateInterval, DeleteAnomalyMonitorRequest, - DeleteAnomalyMonitorResponse, DeleteAnomalySubscriptionRequest, - DeleteAnomalySubscriptionResponse, DeleteCostCategoryDefinitionRequest, - DeleteCostCategoryDefinitionResponse, DescribeCostCategoryDefinitionRequest, DescribeCostCategoryDefinitionResponse, DimensionValues, - DimensionValuesWithAttributes, - DiskResourceUtilization, - EBSResourceUtilization, - EC2InstanceDetails, - EC2ResourceDetails, - EC2ResourceUtilization, EC2Specification, - ElastiCacheInstanceDetails, - ESInstanceDetails, Expression, - FindingReasonCode, - ForecastResult, GenerationExistsException, - GenerationSummary, GetAnomaliesRequest, GetAnomaliesResponse, GetAnomalyMonitorsRequest, @@ -196,118 +171,52 @@ import { GetAnomalySubscriptionsRequest, GetAnomalySubscriptionsResponse, GetCostAndUsageRequest, - GetCostAndUsageResponse, GetCostAndUsageWithResourcesRequest, - GetCostAndUsageWithResourcesResponse, GetCostCategoriesRequest, - GetCostCategoriesResponse, GetCostForecastRequest, - GetCostForecastResponse, GetDimensionValuesRequest, - GetDimensionValuesResponse, GetReservationCoverageRequest, - GetReservationCoverageResponse, GetReservationPurchaseRecommendationRequest, - GetReservationPurchaseRecommendationResponse, GetReservationUtilizationRequest, - GetReservationUtilizationResponse, GetRightsizingRecommendationRequest, - GetRightsizingRecommendationResponse, GetSavingsPlansCoverageRequest, - GetSavingsPlansCoverageResponse, GetSavingsPlansPurchaseRecommendationRequest, - GetSavingsPlansPurchaseRecommendationResponse, GetSavingsPlansUtilizationDetailsRequest, - GetSavingsPlansUtilizationDetailsResponse, GetSavingsPlansUtilizationRequest, - GetSavingsPlansUtilizationResponse, GetTagsRequest, - GetTagsResponse, GetUsageForecastRequest, - GetUsageForecastResponse, - Group, GroupDefinition, Impact, - InstanceDetails, InvalidNextTokenException, LimitExceededException, ListCostAllocationTagsRequest, - ListCostAllocationTagsResponse, ListCostCategoryDefinitionsRequest, - ListCostCategoryDefinitionsResponse, ListSavingsPlansPurchaseRecommendationGenerationRequest, - ListSavingsPlansPurchaseRecommendationGenerationResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MatchOption, - MetricValue, - ModifyRecommendationDetail, - NetworkResourceUtilization, - PlatformDifference, ProvideAnomalyFeedbackRequest, - ProvideAnomalyFeedbackResponse, - RDSInstanceDetails, - RedshiftInstanceDetails, RequestChangedException, - ReservationAggregates, - ReservationCoverageGroup, - ReservationPurchaseRecommendation, - ReservationPurchaseRecommendationDetail, - ReservationPurchaseRecommendationMetadata, - ReservationPurchaseRecommendationSummary, - ReservationUtilizationGroup, - ResourceDetails, ResourceNotFoundException, ResourceTag, - ResourceUtilization, - ResultByTime, - RightsizingRecommendation, RightsizingRecommendationConfiguration, - RightsizingRecommendationMetadata, - RightsizingRecommendationSummary, - RootCause, - SavingsPlansAmortizedCommitment, - SavingsPlansCoverage, - SavingsPlansCoverageData, SavingsPlansDataType, - SavingsPlansDetails, - SavingsPlansPurchaseRecommendation, - SavingsPlansPurchaseRecommendationDetail, - SavingsPlansPurchaseRecommendationMetadata, - SavingsPlansPurchaseRecommendationSummary, - SavingsPlansSavings, - SavingsPlansUtilization, - SavingsPlansUtilizationAggregates, - SavingsPlansUtilizationByTime, - SavingsPlansUtilizationDetail, ServiceQuotaExceededException, ServiceSpecification, SortDefinition, StartSavingsPlansPurchaseRecommendationGenerationRequest, - StartSavingsPlansPurchaseRecommendationGenerationResponse, Subscriber, TagResourceRequest, - TagResourceResponse, TagValues, - TargetInstance, - TerminateRecommendationDetail, TooManyTagsException, TotalImpactFilter, UnknownMonitorException, UnknownSubscriptionException, UnresolvableUsageUnitException, UntagResourceRequest, - UntagResourceResponse, UpdateAnomalyMonitorRequest, - UpdateAnomalyMonitorResponse, UpdateAnomalySubscriptionRequest, - UpdateAnomalySubscriptionResponse, - UpdateCostAllocationTagsStatusError, UpdateCostAllocationTagsStatusRequest, - UpdateCostAllocationTagsStatusResponse, UpdateCostCategoryDefinitionRequest, - UpdateCostCategoryDefinitionResponse, - UtilizationByTime, } from "../models/models_0"; /** @@ -358,7 +267,7 @@ export const se_DeleteAnomalyMonitorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAnomalyMonitor"); let body: any; - body = JSON.stringify(se_DeleteAnomalyMonitorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -371,7 +280,7 @@ export const se_DeleteAnomalySubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAnomalySubscription"); let body: any; - body = JSON.stringify(se_DeleteAnomalySubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -384,7 +293,7 @@ export const se_DeleteCostCategoryDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCostCategoryDefinition"); let body: any; - body = JSON.stringify(se_DeleteCostCategoryDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -397,7 +306,7 @@ export const se_DescribeCostCategoryDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCostCategoryDefinition"); let body: any; - body = JSON.stringify(se_DescribeCostCategoryDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -423,7 +332,7 @@ export const se_GetAnomalyMonitorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAnomalyMonitors"); let body: any; - body = JSON.stringify(se_GetAnomalyMonitorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -436,7 +345,7 @@ export const se_GetAnomalySubscriptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAnomalySubscriptions"); let body: any; - body = JSON.stringify(se_GetAnomalySubscriptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -644,7 +553,7 @@ export const se_ListCostAllocationTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCostAllocationTags"); let body: any; - body = JSON.stringify(se_ListCostAllocationTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -657,7 +566,7 @@ export const se_ListCostCategoryDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCostCategoryDefinitions"); let body: any; - body = JSON.stringify(se_ListCostCategoryDefinitionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -670,7 +579,7 @@ export const se_ListSavingsPlansPurchaseRecommendationGenerationCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSavingsPlansPurchaseRecommendationGeneration"); let body: any; - body = JSON.stringify(se_ListSavingsPlansPurchaseRecommendationGenerationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -683,7 +592,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -696,7 +605,7 @@ export const se_ProvideAnomalyFeedbackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ProvideAnomalyFeedback"); let body: any; - body = JSON.stringify(se_ProvideAnomalyFeedbackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -709,7 +618,7 @@ export const se_StartSavingsPlansPurchaseRecommendationGenerationCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartSavingsPlansPurchaseRecommendationGeneration"); let body: any; - body = JSON.stringify(se_StartSavingsPlansPurchaseRecommendationGenerationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -722,7 +631,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -735,7 +644,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -748,7 +657,7 @@ export const se_UpdateAnomalyMonitorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAnomalyMonitor"); let body: any; - body = JSON.stringify(se_UpdateAnomalyMonitorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -774,7 +683,7 @@ export const se_UpdateCostAllocationTagsStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCostAllocationTagsStatus"); let body: any; - body = JSON.stringify(se_UpdateCostAllocationTagsStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,12 +712,12 @@ export const de_CreateAnomalyMonitorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAnomalyMonitorResponse(data, context); + contents = _json(data); const response: CreateAnomalyMonitorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -829,10 +738,9 @@ const de_CreateAnomalyMonitorCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -850,12 +758,12 @@ export const de_CreateAnomalySubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAnomalySubscriptionResponse(data, context); + contents = _json(data); const response: CreateAnomalySubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -879,10 +787,9 @@ const de_CreateAnomalySubscriptionCommandError = async ( throw await de_UnknownMonitorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -900,12 +807,12 @@ export const de_CreateCostCategoryDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCostCategoryDefinitionResponse(data, context); + contents = _json(data); const response: CreateCostCategoryDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -929,10 +836,9 @@ const de_CreateCostCategoryDefinitionCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -950,12 +856,12 @@ export const de_DeleteAnomalyMonitorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAnomalyMonitorResponse(data, context); + contents = _json(data); const response: DeleteAnomalyMonitorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -979,10 +885,9 @@ const de_DeleteAnomalyMonitorCommandError = async ( throw await de_UnknownMonitorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1000,12 +905,12 @@ export const de_DeleteAnomalySubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAnomalySubscriptionResponse(data, context); + contents = _json(data); const response: DeleteAnomalySubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1029,10 +934,9 @@ const de_DeleteAnomalySubscriptionCommandError = async ( throw await de_UnknownSubscriptionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1050,12 +954,12 @@ export const de_DeleteCostCategoryDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCostCategoryDefinitionResponse(data, context); + contents = _json(data); const response: DeleteCostCategoryDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1079,10 +983,9 @@ const de_DeleteCostCategoryDefinitionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1105,7 +1008,7 @@ export const de_DescribeCostCategoryDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1129,10 +1032,9 @@ const de_DescribeCostCategoryDefinitionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1155,7 +1057,7 @@ export const de_GetAnomaliesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1179,10 +1081,9 @@ const de_GetAnomaliesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1205,7 +1106,7 @@ export const de_GetAnomalyMonitorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1232,10 +1133,9 @@ const de_GetAnomalyMonitorsCommandError = async ( throw await de_UnknownMonitorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1258,7 +1158,7 @@ export const de_GetAnomalySubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1285,10 +1185,9 @@ const de_GetAnomalySubscriptionsCommandError = async ( throw await de_UnknownSubscriptionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1306,12 +1205,12 @@ export const de_GetCostAndUsageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCostAndUsageResponse(data, context); + contents = _json(data); const response: GetCostAndUsageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1344,10 +1243,9 @@ const de_GetCostAndUsageCommandError = async ( throw await de_RequestChangedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1365,12 +1263,12 @@ export const de_GetCostAndUsageWithResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCostAndUsageWithResourcesResponse(data, context); + contents = _json(data); const response: GetCostAndUsageWithResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1403,10 +1301,9 @@ const de_GetCostAndUsageWithResourcesCommandError = async ( throw await de_RequestChangedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1424,12 +1321,12 @@ export const de_GetCostCategoriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCostCategoriesResponse(data, context); + contents = _json(data); const response: GetCostCategoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1462,10 +1359,9 @@ const de_GetCostCategoriesCommandError = async ( throw await de_RequestChangedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1483,12 +1379,12 @@ export const de_GetCostForecastCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCostForecastResponse(data, context); + contents = _json(data); const response: GetCostForecastCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1512,10 +1408,9 @@ const de_GetCostForecastCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,12 +1428,12 @@ export const de_GetDimensionValuesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDimensionValuesResponse(data, context); + contents = _json(data); const response: GetDimensionValuesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1571,10 +1466,9 @@ const de_GetDimensionValuesCommandError = async ( throw await de_RequestChangedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1592,12 +1486,12 @@ export const de_GetReservationCoverageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetReservationCoverageResponse(data, context); + contents = _json(data); const response: GetReservationCoverageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1624,10 +1518,9 @@ const de_GetReservationCoverageCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1645,12 +1538,12 @@ export const de_GetReservationPurchaseRecommendationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetReservationPurchaseRecommendationResponse(data, context); + contents = _json(data); const response: GetReservationPurchaseRecommendationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1677,10 +1570,9 @@ const de_GetReservationPurchaseRecommendationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1698,12 +1590,12 @@ export const de_GetReservationUtilizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetReservationUtilizationResponse(data, context); + contents = _json(data); const response: GetReservationUtilizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1730,10 +1622,9 @@ const de_GetReservationUtilizationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1751,12 +1642,12 @@ export const de_GetRightsizingRecommendationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRightsizingRecommendationResponse(data, context); + contents = _json(data); const response: GetRightsizingRecommendationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1780,10 +1671,9 @@ const de_GetRightsizingRecommendationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1801,12 +1691,12 @@ export const de_GetSavingsPlansCoverageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSavingsPlansCoverageResponse(data, context); + contents = _json(data); const response: GetSavingsPlansCoverageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1833,10 +1723,9 @@ const de_GetSavingsPlansCoverageCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1854,12 +1743,12 @@ export const de_GetSavingsPlansPurchaseRecommendationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSavingsPlansPurchaseRecommendationResponse(data, context); + contents = _json(data); const response: GetSavingsPlansPurchaseRecommendationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1883,10 +1772,9 @@ const de_GetSavingsPlansPurchaseRecommendationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1904,12 +1792,12 @@ export const de_GetSavingsPlansUtilizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSavingsPlansUtilizationResponse(data, context); + contents = _json(data); const response: GetSavingsPlansUtilizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1933,10 +1821,9 @@ const de_GetSavingsPlansUtilizationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1954,12 +1841,12 @@ export const de_GetSavingsPlansUtilizationDetailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSavingsPlansUtilizationDetailsResponse(data, context); + contents = _json(data); const response: GetSavingsPlansUtilizationDetailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1986,10 +1873,9 @@ const de_GetSavingsPlansUtilizationDetailsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2007,12 +1893,12 @@ export const de_GetTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTagsResponse(data, context); + contents = _json(data); const response: GetTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2045,10 +1931,9 @@ const de_GetTagsCommandError = async ( throw await de_RequestChangedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2066,12 +1951,12 @@ export const de_GetUsageForecastCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetUsageForecastResponse(data, context); + contents = _json(data); const response: GetUsageForecastCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2098,10 +1983,9 @@ const de_GetUsageForecastCommandError = async ( throw await de_UnresolvableUsageUnitExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2119,12 +2003,12 @@ export const de_ListCostAllocationTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCostAllocationTagsResponse(data, context); + contents = _json(data); const response: ListCostAllocationTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2148,10 +2032,9 @@ const de_ListCostAllocationTagsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2169,12 +2052,12 @@ export const de_ListCostCategoryDefinitionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCostCategoryDefinitionsResponse(data, context); + contents = _json(data); const response: ListCostCategoryDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2195,10 +2078,9 @@ const de_ListCostCategoryDefinitionsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2216,12 +2098,12 @@ export const de_ListSavingsPlansPurchaseRecommendationGenerationCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSavingsPlansPurchaseRecommendationGenerationResponse(data, context); + contents = _json(data); const response: ListSavingsPlansPurchaseRecommendationGenerationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2245,10 +2127,9 @@ const de_ListSavingsPlansPurchaseRecommendationGenerationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2266,12 +2147,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2295,10 +2176,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2316,12 +2196,12 @@ export const de_ProvideAnomalyFeedbackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ProvideAnomalyFeedbackResponse(data, context); + contents = _json(data); const response: ProvideAnomalyFeedbackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2342,10 +2222,9 @@ const de_ProvideAnomalyFeedbackCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2363,12 +2242,12 @@ export const de_StartSavingsPlansPurchaseRecommendationGenerationCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSavingsPlansPurchaseRecommendationGenerationResponse(data, context); + contents = _json(data); const response: StartSavingsPlansPurchaseRecommendationGenerationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2395,10 +2274,9 @@ const de_StartSavingsPlansPurchaseRecommendationGenerationCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2416,12 +2294,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2448,10 +2326,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2469,12 +2346,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2498,10 +2375,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,12 +2395,12 @@ export const de_UpdateAnomalyMonitorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAnomalyMonitorResponse(data, context); + contents = _json(data); const response: UpdateAnomalyMonitorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2548,10 +2424,9 @@ const de_UpdateAnomalyMonitorCommandError = async ( throw await de_UnknownMonitorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2569,12 +2444,12 @@ export const de_UpdateAnomalySubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAnomalySubscriptionResponse(data, context); + contents = _json(data); const response: UpdateAnomalySubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2601,10 +2476,9 @@ const de_UpdateAnomalySubscriptionCommandError = async ( throw await de_UnknownSubscriptionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2622,12 +2496,12 @@ export const de_UpdateCostAllocationTagsStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCostAllocationTagsStatusResponse(data, context); + contents = _json(data); const response: UpdateCostAllocationTagsStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2648,10 +2522,9 @@ const de_UpdateCostAllocationTagsStatusCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2669,12 +2542,12 @@ export const de_UpdateCostCategoryDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCostCategoryDefinitionResponse(data, context); + contents = _json(data); const response: UpdateCostCategoryDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2701,10 +2574,9 @@ const de_UpdateCostCategoryDefinitionCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2718,7 +2590,7 @@ const de_BillExpirationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BillExpirationException(body, context); + const deserialized: any = _json(body); const exception = new BillExpirationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2734,7 +2606,7 @@ const de_DataUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new DataUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2750,7 +2622,7 @@ const de_GenerationExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GenerationExistsException(body, context); + const deserialized: any = _json(body); const exception = new GenerationExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2766,7 +2638,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2782,7 +2654,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2798,7 +2670,7 @@ const de_RequestChangedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestChangedException(body, context); + const deserialized: any = _json(body); const exception = new RequestChangedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2814,7 +2686,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2830,7 +2702,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2846,7 +2718,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2862,7 +2734,7 @@ const de_UnknownMonitorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnknownMonitorException(body, context); + const deserialized: any = _json(body); const exception = new UnknownMonitorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2878,7 +2750,7 @@ const de_UnknownSubscriptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnknownSubscriptionException(body, context); + const deserialized: any = _json(body); const exception = new UnknownSubscriptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2894,7 +2766,7 @@ const de_UnresolvableUsageUnitExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnresolvableUsageUnitException(body, context); + const deserialized: any = _json(body); const exception = new UnresolvableUsageUnitException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2902,110 +2774,59 @@ const de_UnresolvableUsageUnitExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AnomalyDateInterval - */ -const se_AnomalyDateInterval = (input: AnomalyDateInterval, context: __SerdeContext): any => { - return { - ...(input.EndDate != null && { EndDate: input.EndDate }), - ...(input.StartDate != null && { StartDate: input.StartDate }), - }; -}; +// se_AnomalyDateInterval omitted. /** * serializeAws_json1_1AnomalyMonitor */ const se_AnomalyMonitor = (input: AnomalyMonitor, context: __SerdeContext): any => { - return { - ...(input.CreationDate != null && { CreationDate: input.CreationDate }), - ...(input.DimensionalValueCount != null && { DimensionalValueCount: input.DimensionalValueCount }), - ...(input.LastEvaluatedDate != null && { LastEvaluatedDate: input.LastEvaluatedDate }), - ...(input.LastUpdatedDate != null && { LastUpdatedDate: input.LastUpdatedDate }), - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - ...(input.MonitorDimension != null && { MonitorDimension: input.MonitorDimension }), - ...(input.MonitorName != null && { MonitorName: input.MonitorName }), - ...(input.MonitorSpecification != null && { - MonitorSpecification: se_Expression(input.MonitorSpecification, context), - }), - ...(input.MonitorType != null && { MonitorType: input.MonitorType }), - }; + return take(input, { + CreationDate: [], + DimensionalValueCount: [], + LastEvaluatedDate: [], + LastUpdatedDate: [], + MonitorArn: [], + MonitorDimension: [], + MonitorName: [], + MonitorSpecification: (_) => se_Expression(_, context), + MonitorType: [], + }); }; /** * serializeAws_json1_1AnomalySubscription */ const se_AnomalySubscription = (input: AnomalySubscription, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Frequency != null && { Frequency: input.Frequency }), - ...(input.MonitorArnList != null && { MonitorArnList: se_MonitorArnList(input.MonitorArnList, context) }), - ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }), - ...(input.SubscriptionArn != null && { SubscriptionArn: input.SubscriptionArn }), - ...(input.SubscriptionName != null && { SubscriptionName: input.SubscriptionName }), - ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }), - ...(input.ThresholdExpression != null && { - ThresholdExpression: se_Expression(input.ThresholdExpression, context), - }), - }; + return take(input, { + AccountId: [], + Frequency: [], + MonitorArnList: _json, + Subscribers: _json, + SubscriptionArn: [], + SubscriptionName: [], + Threshold: __serializeFloat, + ThresholdExpression: (_) => se_Expression(_, context), + }); }; -/** - * serializeAws_json1_1CostAllocationTagKeyList - */ -const se_CostAllocationTagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CostAllocationTagKeyList omitted. -/** - * serializeAws_json1_1CostAllocationTagStatusEntry - */ -const se_CostAllocationTagStatusEntry = (input: CostAllocationTagStatusEntry, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - }; -}; +// se_CostAllocationTagStatusEntry omitted. -/** - * serializeAws_json1_1CostAllocationTagStatusList - */ -const se_CostAllocationTagStatusList = (input: CostAllocationTagStatusEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CostAllocationTagStatusEntry(entry, context); - }); -}; +// se_CostAllocationTagStatusList omitted. -/** - * serializeAws_json1_1CostCategoryInheritedValueDimension - */ -const se_CostCategoryInheritedValueDimension = ( - input: CostCategoryInheritedValueDimension, - context: __SerdeContext -): any => { - return { - ...(input.DimensionKey != null && { DimensionKey: input.DimensionKey }), - ...(input.DimensionName != null && { DimensionName: input.DimensionName }), - }; -}; +// se_CostCategoryInheritedValueDimension omitted. /** * serializeAws_json1_1CostCategoryRule */ const se_CostCategoryRule = (input: CostCategoryRule, context: __SerdeContext): any => { - return { - ...(input.InheritedValue != null && { - InheritedValue: se_CostCategoryInheritedValueDimension(input.InheritedValue, context), - }), - ...(input.Rule != null && { Rule: se_Expression(input.Rule, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; + return take(input, { + InheritedValue: _json, + Rule: (_) => se_Expression(_, context), + Type: [], + Value: [], + }); }; /** @@ -3019,111 +2840,38 @@ const se_CostCategoryRulesList = (input: CostCategoryRule[], context: __SerdeCon }); }; -/** - * serializeAws_json1_1CostCategorySplitChargeRule - */ -const se_CostCategorySplitChargeRule = (input: CostCategorySplitChargeRule, context: __SerdeContext): any => { - return { - ...(input.Method != null && { Method: input.Method }), - ...(input.Parameters != null && { - Parameters: se_CostCategorySplitChargeRuleParametersList(input.Parameters, context), - }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Targets != null && { Targets: se_CostCategorySplitChargeRuleTargetsList(input.Targets, context) }), - }; -}; +// se_CostCategorySplitChargeRule omitted. -/** - * serializeAws_json1_1CostCategorySplitChargeRuleParameter - */ -const se_CostCategorySplitChargeRuleParameter = ( - input: CostCategorySplitChargeRuleParameter, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Values != null && { Values: se_CostCategorySplitChargeRuleParameterValuesList(input.Values, context) }), - }; -}; +// se_CostCategorySplitChargeRuleParameter omitted. -/** - * serializeAws_json1_1CostCategorySplitChargeRuleParametersList - */ -const se_CostCategorySplitChargeRuleParametersList = ( - input: CostCategorySplitChargeRuleParameter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CostCategorySplitChargeRuleParameter(entry, context); - }); -}; +// se_CostCategorySplitChargeRuleParametersList omitted. -/** - * serializeAws_json1_1CostCategorySplitChargeRuleParameterValuesList - */ -const se_CostCategorySplitChargeRuleParameterValuesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CostCategorySplitChargeRuleParameterValuesList omitted. -/** - * serializeAws_json1_1CostCategorySplitChargeRulesList - */ -const se_CostCategorySplitChargeRulesList = (input: CostCategorySplitChargeRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CostCategorySplitChargeRule(entry, context); - }); -}; +// se_CostCategorySplitChargeRulesList omitted. -/** - * serializeAws_json1_1CostCategorySplitChargeRuleTargetsList - */ -const se_CostCategorySplitChargeRuleTargetsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CostCategorySplitChargeRuleTargetsList omitted. -/** - * serializeAws_json1_1CostCategoryValues - */ -const se_CostCategoryValues = (input: CostCategoryValues, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.MatchOptions != null && { MatchOptions: se_MatchOptions(input.MatchOptions, context) }), - ...(input.Values != null && { Values: se_Values(input.Values, context) }), - }; -}; +// se_CostCategoryValues omitted. /** * serializeAws_json1_1CreateAnomalyMonitorRequest */ const se_CreateAnomalyMonitorRequest = (input: CreateAnomalyMonitorRequest, context: __SerdeContext): any => { - return { - ...(input.AnomalyMonitor != null && { AnomalyMonitor: se_AnomalyMonitor(input.AnomalyMonitor, context) }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTagList(input.ResourceTags, context) }), - }; + return take(input, { + AnomalyMonitor: (_) => se_AnomalyMonitor(_, context), + ResourceTags: _json, + }); }; /** * serializeAws_json1_1CreateAnomalySubscriptionRequest */ const se_CreateAnomalySubscriptionRequest = (input: CreateAnomalySubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.AnomalySubscription != null && { - AnomalySubscription: se_AnomalySubscription(input.AnomalySubscription, context), - }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTagList(input.ResourceTags, context) }), - }; + return take(input, { + AnomalySubscription: (_) => se_AnomalySubscription(_, context), + ResourceTags: _json, + }); }; /** @@ -3133,104 +2881,43 @@ const se_CreateCostCategoryDefinitionRequest = ( input: CreateCostCategoryDefinitionRequest, context: __SerdeContext ): any => { - return { - ...(input.DefaultValue != null && { DefaultValue: input.DefaultValue }), - ...(input.EffectiveStart != null && { EffectiveStart: input.EffectiveStart }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTagList(input.ResourceTags, context) }), - ...(input.RuleVersion != null && { RuleVersion: input.RuleVersion }), - ...(input.Rules != null && { Rules: se_CostCategoryRulesList(input.Rules, context) }), - ...(input.SplitChargeRules != null && { - SplitChargeRules: se_CostCategorySplitChargeRulesList(input.SplitChargeRules, context), - }), - }; + return take(input, { + DefaultValue: [], + EffectiveStart: [], + Name: [], + ResourceTags: _json, + RuleVersion: [], + Rules: (_) => se_CostCategoryRulesList(_, context), + SplitChargeRules: _json, + }); }; -/** - * serializeAws_json1_1DateInterval - */ -const se_DateInterval = (input: DateInterval, context: __SerdeContext): any => { - return { - ...(input.End != null && { End: input.End }), - ...(input.Start != null && { Start: input.Start }), - }; -}; +// se_DateInterval omitted. -/** - * serializeAws_json1_1DeleteAnomalyMonitorRequest - */ -const se_DeleteAnomalyMonitorRequest = (input: DeleteAnomalyMonitorRequest, context: __SerdeContext): any => { - return { - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - }; -}; +// se_DeleteAnomalyMonitorRequest omitted. -/** - * serializeAws_json1_1DeleteAnomalySubscriptionRequest - */ -const se_DeleteAnomalySubscriptionRequest = (input: DeleteAnomalySubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.SubscriptionArn != null && { SubscriptionArn: input.SubscriptionArn }), - }; -}; +// se_DeleteAnomalySubscriptionRequest omitted. -/** - * serializeAws_json1_1DeleteCostCategoryDefinitionRequest - */ -const se_DeleteCostCategoryDefinitionRequest = ( - input: DeleteCostCategoryDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.CostCategoryArn != null && { CostCategoryArn: input.CostCategoryArn }), - }; -}; +// se_DeleteCostCategoryDefinitionRequest omitted. -/** - * serializeAws_json1_1DescribeCostCategoryDefinitionRequest - */ -const se_DescribeCostCategoryDefinitionRequest = ( - input: DescribeCostCategoryDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.CostCategoryArn != null && { CostCategoryArn: input.CostCategoryArn }), - ...(input.EffectiveOn != null && { EffectiveOn: input.EffectiveOn }), - }; -}; +// se_DescribeCostCategoryDefinitionRequest omitted. -/** - * serializeAws_json1_1DimensionValues - */ -const se_DimensionValues = (input: DimensionValues, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.MatchOptions != null && { MatchOptions: se_MatchOptions(input.MatchOptions, context) }), - ...(input.Values != null && { Values: se_Values(input.Values, context) }), - }; -}; +// se_DimensionValues omitted. -/** - * serializeAws_json1_1EC2Specification - */ -const se_EC2Specification = (input: EC2Specification, context: __SerdeContext): any => { - return { - ...(input.OfferingClass != null && { OfferingClass: input.OfferingClass }), - }; -}; +// se_EC2Specification omitted. /** * serializeAws_json1_1Expression */ const se_Expression = (input: Expression, context: __SerdeContext): any => { - return { - ...(input.And != null && { And: se_Expressions(input.And, context) }), - ...(input.CostCategories != null && { CostCategories: se_CostCategoryValues(input.CostCategories, context) }), - ...(input.Dimensions != null && { Dimensions: se_DimensionValues(input.Dimensions, context) }), - ...(input.Not != null && { Not: se_Expression(input.Not, context) }), - ...(input.Or != null && { Or: se_Expressions(input.Or, context) }), - ...(input.Tags != null && { Tags: se_TagValues(input.Tags, context) }), - }; + return take(input, { + And: (_) => se_Expressions(_, context), + CostCategories: _json, + Dimensions: _json, + Not: (_) => se_Expression(_, context), + Or: (_) => se_Expressions(_, context), + Tags: _json, + }); }; /** @@ -3248,51 +2935,32 @@ const se_Expressions = (input: Expression[], context: __SerdeContext): any => { * serializeAws_json1_1GetAnomaliesRequest */ const se_GetAnomaliesRequest = (input: GetAnomaliesRequest, context: __SerdeContext): any => { - return { - ...(input.DateInterval != null && { DateInterval: se_AnomalyDateInterval(input.DateInterval, context) }), - ...(input.Feedback != null && { Feedback: input.Feedback }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.TotalImpact != null && { TotalImpact: se_TotalImpactFilter(input.TotalImpact, context) }), - }; + return take(input, { + DateInterval: _json, + Feedback: [], + MaxResults: [], + MonitorArn: [], + NextPageToken: [], + TotalImpact: (_) => se_TotalImpactFilter(_, context), + }); }; -/** - * serializeAws_json1_1GetAnomalyMonitorsRequest - */ -const se_GetAnomalyMonitorsRequest = (input: GetAnomalyMonitorsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitorArnList != null && { MonitorArnList: se_Values(input.MonitorArnList, context) }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - }; -}; +// se_GetAnomalyMonitorsRequest omitted. -/** - * serializeAws_json1_1GetAnomalySubscriptionsRequest - */ -const se_GetAnomalySubscriptionsRequest = (input: GetAnomalySubscriptionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.SubscriptionArnList != null && { SubscriptionArnList: se_Values(input.SubscriptionArnList, context) }), - }; -}; +// se_GetAnomalySubscriptionsRequest omitted. /** * serializeAws_json1_1GetCostAndUsageRequest */ const se_GetCostAndUsageRequest = (input: GetCostAndUsageRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.GroupBy != null && { GroupBy: se_GroupDefinitions(input.GroupBy, context) }), - ...(input.Metrics != null && { Metrics: se_MetricNames(input.Metrics, context) }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + GroupBy: _json, + Metrics: _json, + NextPageToken: [], + TimePeriod: _json, + }); }; /** @@ -3302,74 +2970,74 @@ const se_GetCostAndUsageWithResourcesRequest = ( input: GetCostAndUsageWithResourcesRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.GroupBy != null && { GroupBy: se_GroupDefinitions(input.GroupBy, context) }), - ...(input.Metrics != null && { Metrics: se_MetricNames(input.Metrics, context) }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + GroupBy: _json, + Metrics: _json, + NextPageToken: [], + TimePeriod: _json, + }); }; /** * serializeAws_json1_1GetCostCategoriesRequest */ const se_GetCostCategoriesRequest = (input: GetCostCategoriesRequest, context: __SerdeContext): any => { - return { - ...(input.CostCategoryName != null && { CostCategoryName: input.CostCategoryName }), - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.SearchString != null && { SearchString: input.SearchString }), - ...(input.SortBy != null && { SortBy: se_SortDefinitions(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + CostCategoryName: [], + Filter: (_) => se_Expression(_, context), + MaxResults: [], + NextPageToken: [], + SearchString: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** * serializeAws_json1_1GetCostForecastRequest */ const se_GetCostForecastRequest = (input: GetCostForecastRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.Metric != null && { Metric: input.Metric }), - ...(input.PredictionIntervalLevel != null && { PredictionIntervalLevel: input.PredictionIntervalLevel }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + Metric: [], + PredictionIntervalLevel: [], + TimePeriod: _json, + }); }; /** * serializeAws_json1_1GetDimensionValuesRequest */ const se_GetDimensionValuesRequest = (input: GetDimensionValuesRequest, context: __SerdeContext): any => { - return { - ...(input.Context != null && { Context: input.Context }), - ...(input.Dimension != null && { Dimension: input.Dimension }), - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.SearchString != null && { SearchString: input.SearchString }), - ...(input.SortBy != null && { SortBy: se_SortDefinitions(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Context: [], + Dimension: [], + Filter: (_) => se_Expression(_, context), + MaxResults: [], + NextPageToken: [], + SearchString: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** * serializeAws_json1_1GetReservationCoverageRequest */ const se_GetReservationCoverageRequest = (input: GetReservationCoverageRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.GroupBy != null && { GroupBy: se_GroupDefinitions(input.GroupBy, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Metrics != null && { Metrics: se_MetricNames(input.Metrics, context) }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.SortBy != null && { SortBy: se_SortDefinition(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + GroupBy: _json, + MaxResults: [], + Metrics: _json, + NextPageToken: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** @@ -3379,35 +3047,33 @@ const se_GetReservationPurchaseRecommendationRequest = ( input: GetReservationPurchaseRecommendationRequest, context: __SerdeContext ): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.AccountScope != null && { AccountScope: input.AccountScope }), - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.LookbackPeriodInDays != null && { LookbackPeriodInDays: input.LookbackPeriodInDays }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PaymentOption != null && { PaymentOption: input.PaymentOption }), - ...(input.Service != null && { Service: input.Service }), - ...(input.ServiceSpecification != null && { - ServiceSpecification: se_ServiceSpecification(input.ServiceSpecification, context), - }), - ...(input.TermInYears != null && { TermInYears: input.TermInYears }), - }; + return take(input, { + AccountId: [], + AccountScope: [], + Filter: (_) => se_Expression(_, context), + LookbackPeriodInDays: [], + NextPageToken: [], + PageSize: [], + PaymentOption: [], + Service: [], + ServiceSpecification: _json, + TermInYears: [], + }); }; /** * serializeAws_json1_1GetReservationUtilizationRequest */ const se_GetReservationUtilizationRequest = (input: GetReservationUtilizationRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.GroupBy != null && { GroupBy: se_GroupDefinitions(input.GroupBy, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.SortBy != null && { SortBy: se_SortDefinition(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + GroupBy: _json, + MaxResults: [], + NextPageToken: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** @@ -3417,31 +3083,29 @@ const se_GetRightsizingRecommendationRequest = ( input: GetRightsizingRecommendationRequest, context: __SerdeContext ): any => { - return { - ...(input.Configuration != null && { - Configuration: se_RightsizingRecommendationConfiguration(input.Configuration, context), - }), - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.Service != null && { Service: input.Service }), - }; + return take(input, { + Configuration: _json, + Filter: (_) => se_Expression(_, context), + NextPageToken: [], + PageSize: [], + Service: [], + }); }; /** * serializeAws_json1_1GetSavingsPlansCoverageRequest */ const se_GetSavingsPlansCoverageRequest = (input: GetSavingsPlansCoverageRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.GroupBy != null && { GroupBy: se_GroupDefinitions(input.GroupBy, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Metrics != null && { Metrics: se_MetricNames(input.Metrics, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: se_SortDefinition(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + GroupBy: _json, + MaxResults: [], + Metrics: _json, + NextToken: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** @@ -3451,16 +3115,16 @@ const se_GetSavingsPlansPurchaseRecommendationRequest = ( input: GetSavingsPlansPurchaseRecommendationRequest, context: __SerdeContext ): any => { - return { - ...(input.AccountScope != null && { AccountScope: input.AccountScope }), - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.LookbackPeriodInDays != null && { LookbackPeriodInDays: input.LookbackPeriodInDays }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PaymentOption != null && { PaymentOption: input.PaymentOption }), - ...(input.SavingsPlansType != null && { SavingsPlansType: input.SavingsPlansType }), - ...(input.TermInYears != null && { TermInYears: input.TermInYears }), - }; + return take(input, { + AccountScope: [], + Filter: (_) => se_Expression(_, context), + LookbackPeriodInDays: [], + NextPageToken: [], + PageSize: [], + PaymentOption: [], + SavingsPlansType: [], + TermInYears: [], + }); }; /** @@ -3470,14 +3134,14 @@ const se_GetSavingsPlansUtilizationDetailsRequest = ( input: GetSavingsPlansUtilizationDetailsRequest, context: __SerdeContext ): any => { - return { - ...(input.DataType != null && { DataType: se_SavingsPlansDataTypes(input.DataType, context) }), - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: se_SortDefinition(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + DataType: _json, + Filter: (_) => se_Expression(_, context), + MaxResults: [], + NextToken: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** @@ -3487,2801 +3151,670 @@ const se_GetSavingsPlansUtilizationRequest = ( input: GetSavingsPlansUtilizationRequest, context: __SerdeContext ): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.SortBy != null && { SortBy: se_SortDefinition(input.SortBy, context) }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + SortBy: _json, + TimePeriod: _json, + }); }; /** * serializeAws_json1_1GetTagsRequest */ const se_GetTagsRequest = (input: GetTagsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.SearchString != null && { SearchString: input.SearchString }), - ...(input.SortBy != null && { SortBy: se_SortDefinitions(input.SortBy, context) }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + MaxResults: [], + NextPageToken: [], + SearchString: [], + SortBy: _json, + TagKey: [], + TimePeriod: _json, + }); }; /** * serializeAws_json1_1GetUsageForecastRequest */ const se_GetUsageForecastRequest = (input: GetUsageForecastRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_Expression(input.Filter, context) }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.Metric != null && { Metric: input.Metric }), - ...(input.PredictionIntervalLevel != null && { PredictionIntervalLevel: input.PredictionIntervalLevel }), - ...(input.TimePeriod != null && { TimePeriod: se_DateInterval(input.TimePeriod, context) }), - }; + return take(input, { + Filter: (_) => se_Expression(_, context), + Granularity: [], + Metric: [], + PredictionIntervalLevel: [], + TimePeriod: _json, + }); }; -/** - * serializeAws_json1_1GroupDefinition - */ -const se_GroupDefinition = (input: GroupDefinition, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_GroupDefinition omitted. -/** - * serializeAws_json1_1GroupDefinitions - */ -const se_GroupDefinitions = (input: GroupDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GroupDefinition(entry, context); - }); -}; +// se_GroupDefinitions omitted. + +// se_ListCostAllocationTagsRequest omitted. + +// se_ListCostCategoryDefinitionsRequest omitted. + +// se_ListSavingsPlansPurchaseRecommendationGenerationRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_MatchOptions omitted. + +// se_MetricNames omitted. + +// se_MonitorArnList omitted. + +// se_ProvideAnomalyFeedbackRequest omitted. + +// se_RecommendationIdList omitted. + +// se_ResourceTag omitted. + +// se_ResourceTagKeyList omitted. + +// se_ResourceTagList omitted. + +// se_RightsizingRecommendationConfiguration omitted. + +// se_SavingsPlansDataTypes omitted. + +// se_ServiceSpecification omitted. + +// se_SortDefinition omitted. + +// se_SortDefinitions omitted. + +// se_StartSavingsPlansPurchaseRecommendationGenerationRequest omitted. + +// se_Subscriber omitted. + +// se_Subscribers omitted. + +// se_TagResourceRequest omitted. + +// se_TagValues omitted. /** - * serializeAws_json1_1ListCostAllocationTagsRequest + * serializeAws_json1_1TotalImpactFilter */ -const se_ListCostAllocationTagsRequest = (input: ListCostAllocationTagsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - ...(input.TagKeys != null && { TagKeys: se_CostAllocationTagKeyList(input.TagKeys, context) }), - ...(input.Type != null && { Type: input.Type }), - }; +const se_TotalImpactFilter = (input: TotalImpactFilter, context: __SerdeContext): any => { + return take(input, { + EndValue: __serializeFloat, + NumericOperator: [], + StartValue: __serializeFloat, + }); }; +// se_UntagResourceRequest omitted. + +// se_UpdateAnomalyMonitorRequest omitted. + /** - * serializeAws_json1_1ListCostCategoryDefinitionsRequest + * serializeAws_json1_1UpdateAnomalySubscriptionRequest */ -const se_ListCostCategoryDefinitionsRequest = ( - input: ListCostCategoryDefinitionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.EffectiveOn != null && { EffectiveOn: input.EffectiveOn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; +const se_UpdateAnomalySubscriptionRequest = (input: UpdateAnomalySubscriptionRequest, context: __SerdeContext): any => { + return take(input, { + Frequency: [], + MonitorArnList: _json, + Subscribers: _json, + SubscriptionArn: [], + SubscriptionName: [], + Threshold: __serializeFloat, + ThresholdExpression: (_) => se_Expression(_, context), + }); }; +// se_UpdateCostAllocationTagsStatusRequest omitted. + /** - * serializeAws_json1_1ListSavingsPlansPurchaseRecommendationGenerationRequest + * serializeAws_json1_1UpdateCostCategoryDefinitionRequest */ -const se_ListSavingsPlansPurchaseRecommendationGenerationRequest = ( - input: ListSavingsPlansPurchaseRecommendationGenerationRequest, +const se_UpdateCostCategoryDefinitionRequest = ( + input: UpdateCostCategoryDefinitionRequest, context: __SerdeContext ): any => { - return { - ...(input.GenerationStatus != null && { GenerationStatus: input.GenerationStatus }), - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.RecommendationIds != null && { - RecommendationIds: se_RecommendationIdList(input.RecommendationIds, context), - }), - }; + return take(input, { + CostCategoryArn: [], + DefaultValue: [], + EffectiveStart: [], + RuleVersion: [], + Rules: (_) => se_CostCategoryRulesList(_, context), + SplitChargeRules: _json, + }); }; -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_Values omitted. /** - * serializeAws_json1_1MatchOptions - */ -const se_MatchOptions = (input: (MatchOption | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1MetricNames + * deserializeAws_json1_1Anomalies */ -const se_MetricNames = (input: string[], context: __SerdeContext): any => { - return input +const de_Anomalies = (output: any, context: __SerdeContext): Anomaly[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_Anomaly(entry, context); }); + return retVal; }; /** - * serializeAws_json1_1MonitorArnList + * deserializeAws_json1_1Anomaly */ -const se_MonitorArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_Anomaly = (output: any, context: __SerdeContext): Anomaly => { + return take(output, { + AnomalyEndDate: __expectString, + AnomalyId: __expectString, + AnomalyScore: (_: any) => de_AnomalyScore(_, context), + AnomalyStartDate: __expectString, + DimensionValue: __expectString, + Feedback: __expectString, + Impact: (_: any) => de_Impact(_, context), + MonitorArn: __expectString, + RootCauses: _json, + }) as any; }; /** - * serializeAws_json1_1ProvideAnomalyFeedbackRequest + * deserializeAws_json1_1AnomalyMonitor */ -const se_ProvideAnomalyFeedbackRequest = (input: ProvideAnomalyFeedbackRequest, context: __SerdeContext): any => { - return { - ...(input.AnomalyId != null && { AnomalyId: input.AnomalyId }), - ...(input.Feedback != null && { Feedback: input.Feedback }), - }; +const de_AnomalyMonitor = (output: any, context: __SerdeContext): AnomalyMonitor => { + return take(output, { + CreationDate: __expectString, + DimensionalValueCount: __expectInt32, + LastEvaluatedDate: __expectString, + LastUpdatedDate: __expectString, + MonitorArn: __expectString, + MonitorDimension: __expectString, + MonitorName: __expectString, + MonitorSpecification: (_: any) => de_Expression(_, context), + MonitorType: __expectString, + }) as any; }; /** - * serializeAws_json1_1RecommendationIdList + * deserializeAws_json1_1AnomalyMonitors */ -const se_RecommendationIdList = (input: string[], context: __SerdeContext): any => { - return input +const de_AnomalyMonitors = (output: any, context: __SerdeContext): AnomalyMonitor[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_AnomalyMonitor(entry, context); }); + return retVal; }; /** - * serializeAws_json1_1ResourceTag + * deserializeAws_json1_1AnomalyScore */ -const se_ResourceTag = (input: ResourceTag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; +const de_AnomalyScore = (output: any, context: __SerdeContext): AnomalyScore => { + return take(output, { + CurrentScore: __limitedParseDouble, + MaxScore: __limitedParseDouble, + }) as any; }; /** - * serializeAws_json1_1ResourceTagKeyList + * deserializeAws_json1_1AnomalySubscription */ -const se_ResourceTagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_AnomalySubscription = (output: any, context: __SerdeContext): AnomalySubscription => { + return take(output, { + AccountId: __expectString, + Frequency: __expectString, + MonitorArnList: _json, + Subscribers: _json, + SubscriptionArn: __expectString, + SubscriptionName: __expectString, + Threshold: __limitedParseDouble, + ThresholdExpression: (_: any) => de_Expression(_, context), + }) as any; }; /** - * serializeAws_json1_1ResourceTagList + * deserializeAws_json1_1AnomalySubscriptions */ -const se_ResourceTagList = (input: ResourceTag[], context: __SerdeContext): any => { - return input +const de_AnomalySubscriptions = (output: any, context: __SerdeContext): AnomalySubscription[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceTag(entry, context); + .map((entry: any) => { + return de_AnomalySubscription(entry, context); }); + return retVal; }; -/** - * serializeAws_json1_1RightsizingRecommendationConfiguration - */ -const se_RightsizingRecommendationConfiguration = ( - input: RightsizingRecommendationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.BenefitsConsidered != null && { BenefitsConsidered: input.BenefitsConsidered }), - ...(input.RecommendationTarget != null && { RecommendationTarget: input.RecommendationTarget }), - }; -}; +// de_Attributes omitted. -/** - * serializeAws_json1_1SavingsPlansDataTypes - */ -const se_SavingsPlansDataTypes = (input: (SavingsPlansDataType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_BillExpirationException omitted. -/** - * serializeAws_json1_1ServiceSpecification - */ -const se_ServiceSpecification = (input: ServiceSpecification, context: __SerdeContext): any => { - return { - ...(input.EC2Specification != null && { EC2Specification: se_EC2Specification(input.EC2Specification, context) }), - }; -}; +// de_CostAllocationTag omitted. -/** - * serializeAws_json1_1SortDefinition - */ -const se_SortDefinition = (input: SortDefinition, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// de_CostAllocationTagList omitted. /** - * serializeAws_json1_1SortDefinitions + * deserializeAws_json1_1CostCategory */ -const se_SortDefinitions = (input: SortDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SortDefinition(entry, context); - }); +const de_CostCategory = (output: any, context: __SerdeContext): CostCategory => { + return take(output, { + CostCategoryArn: __expectString, + DefaultValue: __expectString, + EffectiveEnd: __expectString, + EffectiveStart: __expectString, + Name: __expectString, + ProcessingStatus: _json, + RuleVersion: __expectString, + Rules: (_: any) => de_CostCategoryRulesList(_, context), + SplitChargeRules: _json, + }) as any; }; -/** - * serializeAws_json1_1StartSavingsPlansPurchaseRecommendationGenerationRequest - */ -const se_StartSavingsPlansPurchaseRecommendationGenerationRequest = ( - input: StartSavingsPlansPurchaseRecommendationGenerationRequest, - context: __SerdeContext -): any => { - return {}; -}; +// de_CostCategoryInheritedValueDimension omitted. + +// de_CostCategoryNamesList omitted. + +// de_CostCategoryProcessingStatus omitted. + +// de_CostCategoryProcessingStatusList omitted. + +// de_CostCategoryReference omitted. + +// de_CostCategoryReferencesList omitted. /** - * serializeAws_json1_1Subscriber + * deserializeAws_json1_1CostCategoryRule */ -const se_Subscriber = (input: Subscriber, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Type != null && { Type: input.Type }), - }; +const de_CostCategoryRule = (output: any, context: __SerdeContext): CostCategoryRule => { + return take(output, { + InheritedValue: _json, + Rule: (_: any) => de_Expression(_, context), + Type: __expectString, + Value: __expectString, + }) as any; }; /** - * serializeAws_json1_1Subscribers + * deserializeAws_json1_1CostCategoryRulesList */ -const se_Subscribers = (input: Subscriber[], context: __SerdeContext): any => { - return input +const de_CostCategoryRulesList = (output: any, context: __SerdeContext): CostCategoryRule[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_Subscriber(entry, context); + .map((entry: any) => { + return de_CostCategoryRule(entry, context); }); + return retVal; }; -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTagList(input.ResourceTags, context) }), - }; -}; +// de_CostCategorySplitChargeRule omitted. -/** - * serializeAws_json1_1TagValues - */ -const se_TagValues = (input: TagValues, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.MatchOptions != null && { MatchOptions: se_MatchOptions(input.MatchOptions, context) }), - ...(input.Values != null && { Values: se_Values(input.Values, context) }), - }; -}; +// de_CostCategorySplitChargeRuleParameter omitted. -/** - * serializeAws_json1_1TotalImpactFilter - */ -const se_TotalImpactFilter = (input: TotalImpactFilter, context: __SerdeContext): any => { - return { - ...(input.EndValue != null && { EndValue: __serializeFloat(input.EndValue) }), - ...(input.NumericOperator != null && { NumericOperator: input.NumericOperator }), - ...(input.StartValue != null && { StartValue: __serializeFloat(input.StartValue) }), - }; -}; +// de_CostCategorySplitChargeRuleParametersList omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.ResourceTagKeys != null && { ResourceTagKeys: se_ResourceTagKeyList(input.ResourceTagKeys, context) }), - }; -}; +// de_CostCategorySplitChargeRuleParameterValuesList omitted. -/** - * serializeAws_json1_1UpdateAnomalyMonitorRequest - */ -const se_UpdateAnomalyMonitorRequest = (input: UpdateAnomalyMonitorRequest, context: __SerdeContext): any => { - return { - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - ...(input.MonitorName != null && { MonitorName: input.MonitorName }), - }; -}; +// de_CostCategorySplitChargeRulesList omitted. -/** - * serializeAws_json1_1UpdateAnomalySubscriptionRequest - */ -const se_UpdateAnomalySubscriptionRequest = (input: UpdateAnomalySubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.Frequency != null && { Frequency: input.Frequency }), - ...(input.MonitorArnList != null && { MonitorArnList: se_MonitorArnList(input.MonitorArnList, context) }), - ...(input.Subscribers != null && { Subscribers: se_Subscribers(input.Subscribers, context) }), - ...(input.SubscriptionArn != null && { SubscriptionArn: input.SubscriptionArn }), - ...(input.SubscriptionName != null && { SubscriptionName: input.SubscriptionName }), - ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }), - ...(input.ThresholdExpression != null && { - ThresholdExpression: se_Expression(input.ThresholdExpression, context), - }), - }; -}; +// de_CostCategorySplitChargeRuleTargetsList omitted. -/** - * serializeAws_json1_1UpdateCostAllocationTagsStatusRequest - */ -const se_UpdateCostAllocationTagsStatusRequest = ( - input: UpdateCostAllocationTagsStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.CostAllocationTagsStatus != null && { - CostAllocationTagsStatus: se_CostAllocationTagStatusList(input.CostAllocationTagsStatus, context), - }), - }; -}; +// de_CostCategoryValues omitted. + +// de_CostCategoryValuesList omitted. + +// de_Coverage omitted. + +// de_CoverageByTime omitted. + +// de_CoverageCost omitted. + +// de_CoverageHours omitted. + +// de_CoverageNormalizedUnits omitted. + +// de_CoveragesByTime omitted. + +// de_CreateAnomalyMonitorResponse omitted. + +// de_CreateAnomalySubscriptionResponse omitted. + +// de_CreateCostCategoryDefinitionResponse omitted. + +// de_CurrentInstance omitted. + +// de_DataUnavailableException omitted. + +// de_DateInterval omitted. + +// de_DeleteAnomalyMonitorResponse omitted. + +// de_DeleteAnomalySubscriptionResponse omitted. + +// de_DeleteCostCategoryDefinitionResponse omitted. /** - * serializeAws_json1_1UpdateCostCategoryDefinitionRequest + * deserializeAws_json1_1DescribeCostCategoryDefinitionResponse */ -const se_UpdateCostCategoryDefinitionRequest = ( - input: UpdateCostCategoryDefinitionRequest, +const de_DescribeCostCategoryDefinitionResponse = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.CostCategoryArn != null && { CostCategoryArn: input.CostCategoryArn }), - ...(input.DefaultValue != null && { DefaultValue: input.DefaultValue }), - ...(input.EffectiveStart != null && { EffectiveStart: input.EffectiveStart }), - ...(input.RuleVersion != null && { RuleVersion: input.RuleVersion }), - ...(input.Rules != null && { Rules: se_CostCategoryRulesList(input.Rules, context) }), - ...(input.SplitChargeRules != null && { - SplitChargeRules: se_CostCategorySplitChargeRulesList(input.SplitChargeRules, context), - }), - }; +): DescribeCostCategoryDefinitionResponse => { + return take(output, { + CostCategory: (_: any) => de_CostCategory(_, context), + }) as any; }; -/** - * serializeAws_json1_1Values - */ -const se_Values = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_DimensionValues omitted. -/** - * deserializeAws_json1_1Anomalies - */ -const de_Anomalies = (output: any, context: __SerdeContext): Anomaly[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Anomaly(entry, context); - }); - return retVal; -}; +// de_DimensionValuesWithAttributes omitted. -/** - * deserializeAws_json1_1Anomaly - */ -const de_Anomaly = (output: any, context: __SerdeContext): Anomaly => { - return { - AnomalyEndDate: __expectString(output.AnomalyEndDate), - AnomalyId: __expectString(output.AnomalyId), - AnomalyScore: output.AnomalyScore != null ? de_AnomalyScore(output.AnomalyScore, context) : undefined, - AnomalyStartDate: __expectString(output.AnomalyStartDate), - DimensionValue: __expectString(output.DimensionValue), - Feedback: __expectString(output.Feedback), - Impact: output.Impact != null ? de_Impact(output.Impact, context) : undefined, - MonitorArn: __expectString(output.MonitorArn), - RootCauses: output.RootCauses != null ? de_RootCauses(output.RootCauses, context) : undefined, - } as any; -}; +// de_DimensionValuesWithAttributesList omitted. -/** - * deserializeAws_json1_1AnomalyMonitor - */ -const de_AnomalyMonitor = (output: any, context: __SerdeContext): AnomalyMonitor => { - return { - CreationDate: __expectString(output.CreationDate), - DimensionalValueCount: __expectInt32(output.DimensionalValueCount), - LastEvaluatedDate: __expectString(output.LastEvaluatedDate), - LastUpdatedDate: __expectString(output.LastUpdatedDate), - MonitorArn: __expectString(output.MonitorArn), - MonitorDimension: __expectString(output.MonitorDimension), - MonitorName: __expectString(output.MonitorName), - MonitorSpecification: - output.MonitorSpecification != null ? de_Expression(output.MonitorSpecification, context) : undefined, - MonitorType: __expectString(output.MonitorType), - } as any; -}; +// de_DiskResourceUtilization omitted. -/** - * deserializeAws_json1_1AnomalyMonitors - */ -const de_AnomalyMonitors = (output: any, context: __SerdeContext): AnomalyMonitor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalyMonitor(entry, context); - }); - return retVal; -}; +// de_EBSResourceUtilization omitted. -/** - * deserializeAws_json1_1AnomalyScore - */ -const de_AnomalyScore = (output: any, context: __SerdeContext): AnomalyScore => { - return { - CurrentScore: __limitedParseDouble(output.CurrentScore), - MaxScore: __limitedParseDouble(output.MaxScore), - } as any; -}; +// de_EC2InstanceDetails omitted. + +// de_EC2ResourceDetails omitted. + +// de_EC2ResourceUtilization omitted. + +// de_EC2Specification omitted. + +// de_ElastiCacheInstanceDetails omitted. + +// de_ESInstanceDetails omitted. /** - * deserializeAws_json1_1AnomalySubscription + * deserializeAws_json1_1Expression */ -const de_AnomalySubscription = (output: any, context: __SerdeContext): AnomalySubscription => { - return { - AccountId: __expectString(output.AccountId), - Frequency: __expectString(output.Frequency), - MonitorArnList: output.MonitorArnList != null ? de_MonitorArnList(output.MonitorArnList, context) : undefined, - Subscribers: output.Subscribers != null ? de_Subscribers(output.Subscribers, context) : undefined, - SubscriptionArn: __expectString(output.SubscriptionArn), - SubscriptionName: __expectString(output.SubscriptionName), - Threshold: __limitedParseDouble(output.Threshold), - ThresholdExpression: - output.ThresholdExpression != null ? de_Expression(output.ThresholdExpression, context) : undefined, - } as any; +const de_Expression = (output: any, context: __SerdeContext): Expression => { + return take(output, { + And: (_: any) => de_Expressions(_, context), + CostCategories: _json, + Dimensions: _json, + Not: (_: any) => de_Expression(_, context), + Or: (_: any) => de_Expressions(_, context), + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1AnomalySubscriptions + * deserializeAws_json1_1Expressions */ -const de_AnomalySubscriptions = (output: any, context: __SerdeContext): AnomalySubscription[] => { +const de_Expressions = (output: any, context: __SerdeContext): Expression[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalySubscription(entry, context); + return de_Expression(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FindingReasonCodes omitted. + +// de_ForecastResult omitted. + +// de_ForecastResultsByTime omitted. + +// de_GenerationExistsException omitted. + +// de_GenerationSummary omitted. + +// de_GenerationSummaryList omitted. /** - * deserializeAws_json1_1BillExpirationException + * deserializeAws_json1_1GetAnomaliesResponse */ -const de_BillExpirationException = (output: any, context: __SerdeContext): BillExpirationException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetAnomaliesResponse = (output: any, context: __SerdeContext): GetAnomaliesResponse => { + return take(output, { + Anomalies: (_: any) => de_Anomalies(_, context), + NextPageToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1CostAllocationTag + * deserializeAws_json1_1GetAnomalyMonitorsResponse */ -const de_CostAllocationTag = (output: any, context: __SerdeContext): CostAllocationTag => { - return { - Status: __expectString(output.Status), - TagKey: __expectString(output.TagKey), - Type: __expectString(output.Type), - } as any; +const de_GetAnomalyMonitorsResponse = (output: any, context: __SerdeContext): GetAnomalyMonitorsResponse => { + return take(output, { + AnomalyMonitors: (_: any) => de_AnomalyMonitors(_, context), + NextPageToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1CostAllocationTagList + * deserializeAws_json1_1GetAnomalySubscriptionsResponse */ -const de_CostAllocationTagList = (output: any, context: __SerdeContext): CostAllocationTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CostAllocationTag(entry, context); - }); - return retVal; +const de_GetAnomalySubscriptionsResponse = (output: any, context: __SerdeContext): GetAnomalySubscriptionsResponse => { + return take(output, { + AnomalySubscriptions: (_: any) => de_AnomalySubscriptions(_, context), + NextPageToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1CostCategory - */ -const de_CostCategory = (output: any, context: __SerdeContext): CostCategory => { - return { - CostCategoryArn: __expectString(output.CostCategoryArn), - DefaultValue: __expectString(output.DefaultValue), - EffectiveEnd: __expectString(output.EffectiveEnd), - EffectiveStart: __expectString(output.EffectiveStart), - Name: __expectString(output.Name), - ProcessingStatus: - output.ProcessingStatus != null - ? de_CostCategoryProcessingStatusList(output.ProcessingStatus, context) - : undefined, - RuleVersion: __expectString(output.RuleVersion), - Rules: output.Rules != null ? de_CostCategoryRulesList(output.Rules, context) : undefined, - SplitChargeRules: - output.SplitChargeRules != null - ? de_CostCategorySplitChargeRulesList(output.SplitChargeRules, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CostCategoryInheritedValueDimension - */ -const de_CostCategoryInheritedValueDimension = ( - output: any, - context: __SerdeContext -): CostCategoryInheritedValueDimension => { - return { - DimensionKey: __expectString(output.DimensionKey), - DimensionName: __expectString(output.DimensionName), - } as any; -}; +// de_GetCostAndUsageResponse omitted. -/** - * deserializeAws_json1_1CostCategoryNamesList - */ -const de_CostCategoryNamesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GetCostAndUsageWithResourcesResponse omitted. -/** - * deserializeAws_json1_1CostCategoryProcessingStatus - */ -const de_CostCategoryProcessingStatus = (output: any, context: __SerdeContext): CostCategoryProcessingStatus => { - return { - Component: __expectString(output.Component), - Status: __expectString(output.Status), - } as any; -}; +// de_GetCostCategoriesResponse omitted. -/** - * deserializeAws_json1_1CostCategoryProcessingStatusList - */ -const de_CostCategoryProcessingStatusList = (output: any, context: __SerdeContext): CostCategoryProcessingStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CostCategoryProcessingStatus(entry, context); - }); - return retVal; -}; +// de_GetCostForecastResponse omitted. -/** - * deserializeAws_json1_1CostCategoryReference - */ -const de_CostCategoryReference = (output: any, context: __SerdeContext): CostCategoryReference => { - return { - CostCategoryArn: __expectString(output.CostCategoryArn), - DefaultValue: __expectString(output.DefaultValue), - EffectiveEnd: __expectString(output.EffectiveEnd), - EffectiveStart: __expectString(output.EffectiveStart), - Name: __expectString(output.Name), - NumberOfRules: __expectInt32(output.NumberOfRules), - ProcessingStatus: - output.ProcessingStatus != null - ? de_CostCategoryProcessingStatusList(output.ProcessingStatus, context) - : undefined, - Values: output.Values != null ? de_CostCategoryValuesList(output.Values, context) : undefined, - } as any; -}; +// de_GetDimensionValuesResponse omitted. -/** - * deserializeAws_json1_1CostCategoryReferencesList - */ -const de_CostCategoryReferencesList = (output: any, context: __SerdeContext): CostCategoryReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CostCategoryReference(entry, context); - }); - return retVal; -}; +// de_GetReservationCoverageResponse omitted. -/** - * deserializeAws_json1_1CostCategoryRule - */ -const de_CostCategoryRule = (output: any, context: __SerdeContext): CostCategoryRule => { - return { - InheritedValue: - output.InheritedValue != null - ? de_CostCategoryInheritedValueDimension(output.InheritedValue, context) - : undefined, - Rule: output.Rule != null ? de_Expression(output.Rule, context) : undefined, - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_GetReservationPurchaseRecommendationResponse omitted. -/** - * deserializeAws_json1_1CostCategoryRulesList - */ -const de_CostCategoryRulesList = (output: any, context: __SerdeContext): CostCategoryRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CostCategoryRule(entry, context); - }); - return retVal; -}; +// de_GetReservationUtilizationResponse omitted. -/** - * deserializeAws_json1_1CostCategorySplitChargeRule - */ -const de_CostCategorySplitChargeRule = (output: any, context: __SerdeContext): CostCategorySplitChargeRule => { - return { - Method: __expectString(output.Method), - Parameters: - output.Parameters != null ? de_CostCategorySplitChargeRuleParametersList(output.Parameters, context) : undefined, - Source: __expectString(output.Source), - Targets: output.Targets != null ? de_CostCategorySplitChargeRuleTargetsList(output.Targets, context) : undefined, - } as any; -}; +// de_GetRightsizingRecommendationResponse omitted. -/** - * deserializeAws_json1_1CostCategorySplitChargeRuleParameter - */ -const de_CostCategorySplitChargeRuleParameter = ( - output: any, - context: __SerdeContext -): CostCategorySplitChargeRuleParameter => { - return { - Type: __expectString(output.Type), - Values: - output.Values != null ? de_CostCategorySplitChargeRuleParameterValuesList(output.Values, context) : undefined, - } as any; -}; +// de_GetSavingsPlansCoverageResponse omitted. -/** - * deserializeAws_json1_1CostCategorySplitChargeRuleParametersList - */ -const de_CostCategorySplitChargeRuleParametersList = ( - output: any, - context: __SerdeContext -): CostCategorySplitChargeRuleParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CostCategorySplitChargeRuleParameter(entry, context); - }); - return retVal; -}; +// de_GetSavingsPlansPurchaseRecommendationResponse omitted. -/** - * deserializeAws_json1_1CostCategorySplitChargeRuleParameterValuesList - */ -const de_CostCategorySplitChargeRuleParameterValuesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GetSavingsPlansUtilizationDetailsResponse omitted. -/** - * deserializeAws_json1_1CostCategorySplitChargeRulesList - */ -const de_CostCategorySplitChargeRulesList = (output: any, context: __SerdeContext): CostCategorySplitChargeRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CostCategorySplitChargeRule(entry, context); - }); - return retVal; -}; +// de_GetSavingsPlansUtilizationResponse omitted. -/** - * deserializeAws_json1_1CostCategorySplitChargeRuleTargetsList - */ -const de_CostCategorySplitChargeRuleTargetsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GetTagsResponse omitted. -/** - * deserializeAws_json1_1CostCategoryValues - */ -const de_CostCategoryValues = (output: any, context: __SerdeContext): CostCategoryValues => { - return { - Key: __expectString(output.Key), - MatchOptions: output.MatchOptions != null ? de_MatchOptions(output.MatchOptions, context) : undefined, - Values: output.Values != null ? de_Values(output.Values, context) : undefined, - } as any; -}; +// de_GetUsageForecastResponse omitted. -/** - * deserializeAws_json1_1CostCategoryValuesList - */ -const de_CostCategoryValuesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Group omitted. -/** - * deserializeAws_json1_1Coverage - */ -const de_Coverage = (output: any, context: __SerdeContext): Coverage => { - return { - CoverageCost: output.CoverageCost != null ? de_CoverageCost(output.CoverageCost, context) : undefined, - CoverageHours: output.CoverageHours != null ? de_CoverageHours(output.CoverageHours, context) : undefined, - CoverageNormalizedUnits: - output.CoverageNormalizedUnits != null - ? de_CoverageNormalizedUnits(output.CoverageNormalizedUnits, context) - : undefined, - } as any; -}; +// de_GroupDefinition omitted. -/** - * deserializeAws_json1_1CoverageByTime - */ -const de_CoverageByTime = (output: any, context: __SerdeContext): CoverageByTime => { - return { - Groups: output.Groups != null ? de_ReservationCoverageGroups(output.Groups, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - Total: output.Total != null ? de_Coverage(output.Total, context) : undefined, - } as any; -}; +// de_GroupDefinitions omitted. -/** - * deserializeAws_json1_1CoverageCost - */ -const de_CoverageCost = (output: any, context: __SerdeContext): CoverageCost => { - return { - OnDemandCost: __expectString(output.OnDemandCost), - } as any; -}; +// de_Groups omitted. /** - * deserializeAws_json1_1CoverageHours + * deserializeAws_json1_1Impact */ -const de_CoverageHours = (output: any, context: __SerdeContext): CoverageHours => { - return { - CoverageHoursPercentage: __expectString(output.CoverageHoursPercentage), - OnDemandHours: __expectString(output.OnDemandHours), - ReservedHours: __expectString(output.ReservedHours), - TotalRunningHours: __expectString(output.TotalRunningHours), - } as any; +const de_Impact = (output: any, context: __SerdeContext): Impact => { + return take(output, { + MaxImpact: __limitedParseDouble, + TotalActualSpend: __limitedParseDouble, + TotalExpectedSpend: __limitedParseDouble, + TotalImpact: __limitedParseDouble, + TotalImpactPercentage: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1CoverageNormalizedUnits - */ -const de_CoverageNormalizedUnits = (output: any, context: __SerdeContext): CoverageNormalizedUnits => { - return { - CoverageNormalizedUnitsPercentage: __expectString(output.CoverageNormalizedUnitsPercentage), - OnDemandNormalizedUnits: __expectString(output.OnDemandNormalizedUnits), - ReservedNormalizedUnits: __expectString(output.ReservedNormalizedUnits), - TotalRunningNormalizedUnits: __expectString(output.TotalRunningNormalizedUnits), - } as any; -}; +// de_InstanceDetails omitted. -/** - * deserializeAws_json1_1CoveragesByTime - */ -const de_CoveragesByTime = (output: any, context: __SerdeContext): CoverageByTime[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoverageByTime(entry, context); - }); - return retVal; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1CreateAnomalyMonitorResponse - */ -const de_CreateAnomalyMonitorResponse = (output: any, context: __SerdeContext): CreateAnomalyMonitorResponse => { - return { - MonitorArn: __expectString(output.MonitorArn), - } as any; -}; +// de_Keys omitted. -/** - * deserializeAws_json1_1CreateAnomalySubscriptionResponse - */ -const de_CreateAnomalySubscriptionResponse = ( - output: any, - context: __SerdeContext -): CreateAnomalySubscriptionResponse => { - return { - SubscriptionArn: __expectString(output.SubscriptionArn), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1CreateCostCategoryDefinitionResponse - */ -const de_CreateCostCategoryDefinitionResponse = ( - output: any, - context: __SerdeContext -): CreateCostCategoryDefinitionResponse => { - return { - CostCategoryArn: __expectString(output.CostCategoryArn), - EffectiveStart: __expectString(output.EffectiveStart), - } as any; -}; +// de_ListCostAllocationTagsResponse omitted. -/** - * deserializeAws_json1_1CurrentInstance - */ -const de_CurrentInstance = (output: any, context: __SerdeContext): CurrentInstance => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - InstanceName: __expectString(output.InstanceName), - MonthlyCost: __expectString(output.MonthlyCost), - OnDemandHoursInLookbackPeriod: __expectString(output.OnDemandHoursInLookbackPeriod), - ReservationCoveredHoursInLookbackPeriod: __expectString(output.ReservationCoveredHoursInLookbackPeriod), - ResourceDetails: output.ResourceDetails != null ? de_ResourceDetails(output.ResourceDetails, context) : undefined, - ResourceId: __expectString(output.ResourceId), - ResourceUtilization: - output.ResourceUtilization != null ? de_ResourceUtilization(output.ResourceUtilization, context) : undefined, - SavingsPlansCoveredHoursInLookbackPeriod: __expectString(output.SavingsPlansCoveredHoursInLookbackPeriod), - Tags: output.Tags != null ? de_TagValuesList(output.Tags, context) : undefined, - TotalRunningHoursInLookbackPeriod: __expectString(output.TotalRunningHoursInLookbackPeriod), - } as any; -}; +// de_ListCostCategoryDefinitionsResponse omitted. -/** - * deserializeAws_json1_1DataUnavailableException - */ -const de_DataUnavailableException = (output: any, context: __SerdeContext): DataUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ListSavingsPlansPurchaseRecommendationGenerationResponse omitted. -/** - * deserializeAws_json1_1DateInterval - */ -const de_DateInterval = (output: any, context: __SerdeContext): DateInterval => { - return { - End: __expectString(output.End), - Start: __expectString(output.Start), - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1DeleteAnomalyMonitorResponse - */ -const de_DeleteAnomalyMonitorResponse = (output: any, context: __SerdeContext): DeleteAnomalyMonitorResponse => { - return {} as any; -}; +// de_MatchOptions omitted. -/** - * deserializeAws_json1_1DeleteAnomalySubscriptionResponse - */ -const de_DeleteAnomalySubscriptionResponse = ( - output: any, - context: __SerdeContext -): DeleteAnomalySubscriptionResponse => { - return {} as any; -}; +// de_Metrics omitted. -/** - * deserializeAws_json1_1DeleteCostCategoryDefinitionResponse - */ -const de_DeleteCostCategoryDefinitionResponse = ( - output: any, - context: __SerdeContext -): DeleteCostCategoryDefinitionResponse => { - return { - CostCategoryArn: __expectString(output.CostCategoryArn), - EffectiveEnd: __expectString(output.EffectiveEnd), - } as any; -}; +// de_MetricValue omitted. -/** - * deserializeAws_json1_1DescribeCostCategoryDefinitionResponse - */ -const de_DescribeCostCategoryDefinitionResponse = ( - output: any, - context: __SerdeContext -): DescribeCostCategoryDefinitionResponse => { - return { - CostCategory: output.CostCategory != null ? de_CostCategory(output.CostCategory, context) : undefined, - } as any; -}; +// de_ModifyRecommendationDetail omitted. -/** - * deserializeAws_json1_1DimensionValues - */ -const de_DimensionValues = (output: any, context: __SerdeContext): DimensionValues => { - return { - Key: __expectString(output.Key), - MatchOptions: output.MatchOptions != null ? de_MatchOptions(output.MatchOptions, context) : undefined, - Values: output.Values != null ? de_Values(output.Values, context) : undefined, - } as any; -}; +// de_MonitorArnList omitted. -/** - * deserializeAws_json1_1DimensionValuesWithAttributes - */ -const de_DimensionValuesWithAttributes = (output: any, context: __SerdeContext): DimensionValuesWithAttributes => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - Value: __expectString(output.Value), - } as any; -}; +// de_NetworkResourceUtilization omitted. -/** - * deserializeAws_json1_1DimensionValuesWithAttributesList - */ -const de_DimensionValuesWithAttributesList = ( - output: any, - context: __SerdeContext -): DimensionValuesWithAttributes[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionValuesWithAttributes(entry, context); - }); - return retVal; -}; +// de_PlatformDifferences omitted. -/** - * deserializeAws_json1_1DiskResourceUtilization - */ -const de_DiskResourceUtilization = (output: any, context: __SerdeContext): DiskResourceUtilization => { - return { - DiskReadBytesPerSecond: __expectString(output.DiskReadBytesPerSecond), - DiskReadOpsPerSecond: __expectString(output.DiskReadOpsPerSecond), - DiskWriteBytesPerSecond: __expectString(output.DiskWriteBytesPerSecond), - DiskWriteOpsPerSecond: __expectString(output.DiskWriteOpsPerSecond), - } as any; -}; +// de_ProvideAnomalyFeedbackResponse omitted. -/** - * deserializeAws_json1_1EBSResourceUtilization - */ -const de_EBSResourceUtilization = (output: any, context: __SerdeContext): EBSResourceUtilization => { - return { - EbsReadBytesPerSecond: __expectString(output.EbsReadBytesPerSecond), - EbsReadOpsPerSecond: __expectString(output.EbsReadOpsPerSecond), - EbsWriteBytesPerSecond: __expectString(output.EbsWriteBytesPerSecond), - EbsWriteOpsPerSecond: __expectString(output.EbsWriteOpsPerSecond), - } as any; -}; +// de_RDSInstanceDetails omitted. -/** - * deserializeAws_json1_1EC2InstanceDetails - */ -const de_EC2InstanceDetails = (output: any, context: __SerdeContext): EC2InstanceDetails => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - CurrentGeneration: __expectBoolean(output.CurrentGeneration), - Family: __expectString(output.Family), - InstanceType: __expectString(output.InstanceType), - Platform: __expectString(output.Platform), - Region: __expectString(output.Region), - SizeFlexEligible: __expectBoolean(output.SizeFlexEligible), - Tenancy: __expectString(output.Tenancy), - } as any; -}; +// de_RedshiftInstanceDetails omitted. -/** - * deserializeAws_json1_1EC2ResourceDetails - */ -const de_EC2ResourceDetails = (output: any, context: __SerdeContext): EC2ResourceDetails => { - return { - HourlyOnDemandRate: __expectString(output.HourlyOnDemandRate), - InstanceType: __expectString(output.InstanceType), - Memory: __expectString(output.Memory), - NetworkPerformance: __expectString(output.NetworkPerformance), - Platform: __expectString(output.Platform), - Region: __expectString(output.Region), - Sku: __expectString(output.Sku), - Storage: __expectString(output.Storage), - Vcpu: __expectString(output.Vcpu), - } as any; -}; +// de_RequestChangedException omitted. -/** - * deserializeAws_json1_1EC2ResourceUtilization - */ -const de_EC2ResourceUtilization = (output: any, context: __SerdeContext): EC2ResourceUtilization => { - return { - DiskResourceUtilization: - output.DiskResourceUtilization != null - ? de_DiskResourceUtilization(output.DiskResourceUtilization, context) - : undefined, - EBSResourceUtilization: - output.EBSResourceUtilization != null - ? de_EBSResourceUtilization(output.EBSResourceUtilization, context) - : undefined, - MaxCpuUtilizationPercentage: __expectString(output.MaxCpuUtilizationPercentage), - MaxMemoryUtilizationPercentage: __expectString(output.MaxMemoryUtilizationPercentage), - MaxStorageUtilizationPercentage: __expectString(output.MaxStorageUtilizationPercentage), - NetworkResourceUtilization: - output.NetworkResourceUtilization != null - ? de_NetworkResourceUtilization(output.NetworkResourceUtilization, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EC2Specification - */ -const de_EC2Specification = (output: any, context: __SerdeContext): EC2Specification => { - return { - OfferingClass: __expectString(output.OfferingClass), - } as any; -}; +// de_ReservationAggregates omitted. -/** - * deserializeAws_json1_1ElastiCacheInstanceDetails - */ -const de_ElastiCacheInstanceDetails = (output: any, context: __SerdeContext): ElastiCacheInstanceDetails => { - return { - CurrentGeneration: __expectBoolean(output.CurrentGeneration), - Family: __expectString(output.Family), - NodeType: __expectString(output.NodeType), - ProductDescription: __expectString(output.ProductDescription), - Region: __expectString(output.Region), - SizeFlexEligible: __expectBoolean(output.SizeFlexEligible), - } as any; -}; +// de_ReservationCoverageGroup omitted. -/** - * deserializeAws_json1_1ESInstanceDetails - */ -const de_ESInstanceDetails = (output: any, context: __SerdeContext): ESInstanceDetails => { - return { - CurrentGeneration: __expectBoolean(output.CurrentGeneration), - InstanceClass: __expectString(output.InstanceClass), - InstanceSize: __expectString(output.InstanceSize), - Region: __expectString(output.Region), - SizeFlexEligible: __expectBoolean(output.SizeFlexEligible), - } as any; -}; +// de_ReservationCoverageGroups omitted. -/** - * deserializeAws_json1_1Expression - */ -const de_Expression = (output: any, context: __SerdeContext): Expression => { - return { - And: output.And != null ? de_Expressions(output.And, context) : undefined, - CostCategories: output.CostCategories != null ? de_CostCategoryValues(output.CostCategories, context) : undefined, - Dimensions: output.Dimensions != null ? de_DimensionValues(output.Dimensions, context) : undefined, - Not: output.Not != null ? de_Expression(output.Not, context) : undefined, - Or: output.Or != null ? de_Expressions(output.Or, context) : undefined, - Tags: output.Tags != null ? de_TagValues(output.Tags, context) : undefined, - } as any; -}; +// de_ReservationPurchaseRecommendation omitted. -/** - * deserializeAws_json1_1Expressions - */ -const de_Expressions = (output: any, context: __SerdeContext): Expression[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Expression(entry, context); - }); - return retVal; -}; +// de_ReservationPurchaseRecommendationDetail omitted. -/** - * deserializeAws_json1_1FindingReasonCodes - */ -const de_FindingReasonCodes = (output: any, context: __SerdeContext): (FindingReasonCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ReservationPurchaseRecommendationDetails omitted. -/** - * deserializeAws_json1_1ForecastResult - */ -const de_ForecastResult = (output: any, context: __SerdeContext): ForecastResult => { - return { - MeanValue: __expectString(output.MeanValue), - PredictionIntervalLowerBound: __expectString(output.PredictionIntervalLowerBound), - PredictionIntervalUpperBound: __expectString(output.PredictionIntervalUpperBound), - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - } as any; -}; +// de_ReservationPurchaseRecommendationMetadata omitted. -/** - * deserializeAws_json1_1ForecastResultsByTime - */ -const de_ForecastResultsByTime = (output: any, context: __SerdeContext): ForecastResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ForecastResult(entry, context); - }); - return retVal; -}; +// de_ReservationPurchaseRecommendations omitted. -/** - * deserializeAws_json1_1GenerationExistsException - */ -const de_GenerationExistsException = (output: any, context: __SerdeContext): GenerationExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ReservationPurchaseRecommendationSummary omitted. -/** - * deserializeAws_json1_1GenerationSummary - */ -const de_GenerationSummary = (output: any, context: __SerdeContext): GenerationSummary => { - return { - EstimatedCompletionTime: __expectString(output.EstimatedCompletionTime), - GenerationCompletionTime: __expectString(output.GenerationCompletionTime), - GenerationStartedTime: __expectString(output.GenerationStartedTime), - GenerationStatus: __expectString(output.GenerationStatus), - RecommendationId: __expectString(output.RecommendationId), - } as any; -}; +// de_ReservationUtilizationGroup omitted. -/** - * deserializeAws_json1_1GenerationSummaryList - */ -const de_GenerationSummaryList = (output: any, context: __SerdeContext): GenerationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GenerationSummary(entry, context); - }); - return retVal; -}; +// de_ReservationUtilizationGroups omitted. -/** - * deserializeAws_json1_1GetAnomaliesResponse - */ -const de_GetAnomaliesResponse = (output: any, context: __SerdeContext): GetAnomaliesResponse => { - return { - Anomalies: output.Anomalies != null ? de_Anomalies(output.Anomalies, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; +// de_ResourceDetails omitted. -/** - * deserializeAws_json1_1GetAnomalyMonitorsResponse - */ -const de_GetAnomalyMonitorsResponse = (output: any, context: __SerdeContext): GetAnomalyMonitorsResponse => { - return { - AnomalyMonitors: output.AnomalyMonitors != null ? de_AnomalyMonitors(output.AnomalyMonitors, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1GetAnomalySubscriptionsResponse - */ -const de_GetAnomalySubscriptionsResponse = (output: any, context: __SerdeContext): GetAnomalySubscriptionsResponse => { - return { - AnomalySubscriptions: - output.AnomalySubscriptions != null ? de_AnomalySubscriptions(output.AnomalySubscriptions, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; +// de_ResourceTag omitted. -/** - * deserializeAws_json1_1GetCostAndUsageResponse - */ -const de_GetCostAndUsageResponse = (output: any, context: __SerdeContext): GetCostAndUsageResponse => { - return { - DimensionValueAttributes: - output.DimensionValueAttributes != null - ? de_DimensionValuesWithAttributesList(output.DimensionValueAttributes, context) - : undefined, - GroupDefinitions: - output.GroupDefinitions != null ? de_GroupDefinitions(output.GroupDefinitions, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - ResultsByTime: output.ResultsByTime != null ? de_ResultsByTime(output.ResultsByTime, context) : undefined, - } as any; -}; +// de_ResourceTagList omitted. -/** - * deserializeAws_json1_1GetCostAndUsageWithResourcesResponse - */ -const de_GetCostAndUsageWithResourcesResponse = ( - output: any, - context: __SerdeContext -): GetCostAndUsageWithResourcesResponse => { - return { - DimensionValueAttributes: - output.DimensionValueAttributes != null - ? de_DimensionValuesWithAttributesList(output.DimensionValueAttributes, context) - : undefined, - GroupDefinitions: - output.GroupDefinitions != null ? de_GroupDefinitions(output.GroupDefinitions, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - ResultsByTime: output.ResultsByTime != null ? de_ResultsByTime(output.ResultsByTime, context) : undefined, - } as any; -}; +// de_ResourceUtilization omitted. -/** - * deserializeAws_json1_1GetCostCategoriesResponse - */ -const de_GetCostCategoriesResponse = (output: any, context: __SerdeContext): GetCostCategoriesResponse => { - return { - CostCategoryNames: - output.CostCategoryNames != null ? de_CostCategoryNamesList(output.CostCategoryNames, context) : undefined, - CostCategoryValues: - output.CostCategoryValues != null ? de_CostCategoryValuesList(output.CostCategoryValues, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - ReturnSize: __expectInt32(output.ReturnSize), - TotalSize: __expectInt32(output.TotalSize), - } as any; -}; +// de_ResultByTime omitted. -/** - * deserializeAws_json1_1GetCostForecastResponse - */ -const de_GetCostForecastResponse = (output: any, context: __SerdeContext): GetCostForecastResponse => { - return { - ForecastResultsByTime: - output.ForecastResultsByTime != null - ? de_ForecastResultsByTime(output.ForecastResultsByTime, context) - : undefined, - Total: output.Total != null ? de_MetricValue(output.Total, context) : undefined, - } as any; -}; +// de_ResultsByTime omitted. -/** - * deserializeAws_json1_1GetDimensionValuesResponse - */ -const de_GetDimensionValuesResponse = (output: any, context: __SerdeContext): GetDimensionValuesResponse => { - return { - DimensionValues: - output.DimensionValues != null - ? de_DimensionValuesWithAttributesList(output.DimensionValues, context) - : undefined, - NextPageToken: __expectString(output.NextPageToken), - ReturnSize: __expectInt32(output.ReturnSize), - TotalSize: __expectInt32(output.TotalSize), - } as any; -}; +// de_RightsizingRecommendation omitted. -/** - * deserializeAws_json1_1GetReservationCoverageResponse - */ -const de_GetReservationCoverageResponse = (output: any, context: __SerdeContext): GetReservationCoverageResponse => { - return { - CoveragesByTime: output.CoveragesByTime != null ? de_CoveragesByTime(output.CoveragesByTime, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - Total: output.Total != null ? de_Coverage(output.Total, context) : undefined, - } as any; -}; +// de_RightsizingRecommendationConfiguration omitted. -/** - * deserializeAws_json1_1GetReservationPurchaseRecommendationResponse - */ -const de_GetReservationPurchaseRecommendationResponse = ( - output: any, - context: __SerdeContext -): GetReservationPurchaseRecommendationResponse => { - return { - Metadata: - output.Metadata != null ? de_ReservationPurchaseRecommendationMetadata(output.Metadata, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - Recommendations: - output.Recommendations != null - ? de_ReservationPurchaseRecommendations(output.Recommendations, context) - : undefined, - } as any; -}; +// de_RightsizingRecommendationList omitted. -/** - * deserializeAws_json1_1GetReservationUtilizationResponse - */ -const de_GetReservationUtilizationResponse = ( - output: any, - context: __SerdeContext -): GetReservationUtilizationResponse => { - return { - NextPageToken: __expectString(output.NextPageToken), - Total: output.Total != null ? de_ReservationAggregates(output.Total, context) : undefined, - UtilizationsByTime: - output.UtilizationsByTime != null ? de_UtilizationsByTime(output.UtilizationsByTime, context) : undefined, - } as any; -}; +// de_RightsizingRecommendationMetadata omitted. -/** - * deserializeAws_json1_1GetRightsizingRecommendationResponse - */ -const de_GetRightsizingRecommendationResponse = ( - output: any, - context: __SerdeContext -): GetRightsizingRecommendationResponse => { - return { - Configuration: - output.Configuration != null - ? de_RightsizingRecommendationConfiguration(output.Configuration, context) - : undefined, - Metadata: output.Metadata != null ? de_RightsizingRecommendationMetadata(output.Metadata, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - RightsizingRecommendations: - output.RightsizingRecommendations != null - ? de_RightsizingRecommendationList(output.RightsizingRecommendations, context) - : undefined, - Summary: output.Summary != null ? de_RightsizingRecommendationSummary(output.Summary, context) : undefined, - } as any; -}; +// de_RightsizingRecommendationSummary omitted. -/** - * deserializeAws_json1_1GetSavingsPlansCoverageResponse - */ -const de_GetSavingsPlansCoverageResponse = (output: any, context: __SerdeContext): GetSavingsPlansCoverageResponse => { - return { - NextToken: __expectString(output.NextToken), - SavingsPlansCoverages: - output.SavingsPlansCoverages != null - ? de_SavingsPlansCoverages(output.SavingsPlansCoverages, context) - : undefined, - } as any; -}; +// de_RootCause omitted. -/** - * deserializeAws_json1_1GetSavingsPlansPurchaseRecommendationResponse - */ -const de_GetSavingsPlansPurchaseRecommendationResponse = ( - output: any, - context: __SerdeContext -): GetSavingsPlansPurchaseRecommendationResponse => { - return { - Metadata: - output.Metadata != null ? de_SavingsPlansPurchaseRecommendationMetadata(output.Metadata, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - SavingsPlansPurchaseRecommendation: - output.SavingsPlansPurchaseRecommendation != null - ? de_SavingsPlansPurchaseRecommendation(output.SavingsPlansPurchaseRecommendation, context) - : undefined, - } as any; -}; +// de_RootCauses omitted. -/** - * deserializeAws_json1_1GetSavingsPlansUtilizationDetailsResponse - */ -const de_GetSavingsPlansUtilizationDetailsResponse = ( - output: any, - context: __SerdeContext -): GetSavingsPlansUtilizationDetailsResponse => { - return { - NextToken: __expectString(output.NextToken), - SavingsPlansUtilizationDetails: - output.SavingsPlansUtilizationDetails != null - ? de_SavingsPlansUtilizationDetails(output.SavingsPlansUtilizationDetails, context) - : undefined, - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - Total: output.Total != null ? de_SavingsPlansUtilizationAggregates(output.Total, context) : undefined, - } as any; -}; +// de_SavingsPlansAmortizedCommitment omitted. -/** - * deserializeAws_json1_1GetSavingsPlansUtilizationResponse - */ -const de_GetSavingsPlansUtilizationResponse = ( - output: any, - context: __SerdeContext -): GetSavingsPlansUtilizationResponse => { - return { - SavingsPlansUtilizationsByTime: - output.SavingsPlansUtilizationsByTime != null - ? de_SavingsPlansUtilizationsByTime(output.SavingsPlansUtilizationsByTime, context) - : undefined, - Total: output.Total != null ? de_SavingsPlansUtilizationAggregates(output.Total, context) : undefined, - } as any; -}; +// de_SavingsPlansCoverage omitted. -/** - * deserializeAws_json1_1GetTagsResponse - */ -const de_GetTagsResponse = (output: any, context: __SerdeContext): GetTagsResponse => { - return { - NextPageToken: __expectString(output.NextPageToken), - ReturnSize: __expectInt32(output.ReturnSize), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TotalSize: __expectInt32(output.TotalSize), - } as any; -}; +// de_SavingsPlansCoverageData omitted. -/** - * deserializeAws_json1_1GetUsageForecastResponse - */ -const de_GetUsageForecastResponse = (output: any, context: __SerdeContext): GetUsageForecastResponse => { - return { - ForecastResultsByTime: - output.ForecastResultsByTime != null - ? de_ForecastResultsByTime(output.ForecastResultsByTime, context) - : undefined, - Total: output.Total != null ? de_MetricValue(output.Total, context) : undefined, - } as any; -}; +// de_SavingsPlansCoverages omitted. -/** - * deserializeAws_json1_1Group - */ -const de_Group = (output: any, context: __SerdeContext): Group => { - return { - Keys: output.Keys != null ? de_Keys(output.Keys, context) : undefined, - Metrics: output.Metrics != null ? de_Metrics(output.Metrics, context) : undefined, - } as any; -}; +// de_SavingsPlansDetails omitted. -/** - * deserializeAws_json1_1GroupDefinition - */ -const de_GroupDefinition = (output: any, context: __SerdeContext): GroupDefinition => { - return { - Key: __expectString(output.Key), - Type: __expectString(output.Type), - } as any; -}; +// de_SavingsPlansPurchaseRecommendation omitted. -/** - * deserializeAws_json1_1GroupDefinitions - */ -const de_GroupDefinitions = (output: any, context: __SerdeContext): GroupDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupDefinition(entry, context); - }); - return retVal; -}; +// de_SavingsPlansPurchaseRecommendationDetail omitted. -/** - * deserializeAws_json1_1Groups - */ -const de_Groups = (output: any, context: __SerdeContext): Group[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Group(entry, context); - }); - return retVal; -}; +// de_SavingsPlansPurchaseRecommendationDetailList omitted. -/** - * deserializeAws_json1_1Impact - */ -const de_Impact = (output: any, context: __SerdeContext): Impact => { - return { - MaxImpact: __limitedParseDouble(output.MaxImpact), - TotalActualSpend: __limitedParseDouble(output.TotalActualSpend), - TotalExpectedSpend: __limitedParseDouble(output.TotalExpectedSpend), - TotalImpact: __limitedParseDouble(output.TotalImpact), - TotalImpactPercentage: __limitedParseDouble(output.TotalImpactPercentage), - } as any; -}; +// de_SavingsPlansPurchaseRecommendationMetadata omitted. -/** - * deserializeAws_json1_1InstanceDetails - */ -const de_InstanceDetails = (output: any, context: __SerdeContext): InstanceDetails => { - return { - EC2InstanceDetails: - output.EC2InstanceDetails != null ? de_EC2InstanceDetails(output.EC2InstanceDetails, context) : undefined, - ESInstanceDetails: - output.ESInstanceDetails != null ? de_ESInstanceDetails(output.ESInstanceDetails, context) : undefined, - ElastiCacheInstanceDetails: - output.ElastiCacheInstanceDetails != null - ? de_ElastiCacheInstanceDetails(output.ElastiCacheInstanceDetails, context) - : undefined, - RDSInstanceDetails: - output.RDSInstanceDetails != null ? de_RDSInstanceDetails(output.RDSInstanceDetails, context) : undefined, - RedshiftInstanceDetails: - output.RedshiftInstanceDetails != null - ? de_RedshiftInstanceDetails(output.RedshiftInstanceDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SavingsPlansPurchaseRecommendationSummary omitted. -/** - * deserializeAws_json1_1Keys - */ -const de_Keys = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SavingsPlansSavings omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SavingsPlansUtilization omitted. -/** - * deserializeAws_json1_1ListCostAllocationTagsResponse - */ -const de_ListCostAllocationTagsResponse = (output: any, context: __SerdeContext): ListCostAllocationTagsResponse => { - return { - CostAllocationTags: - output.CostAllocationTags != null ? de_CostAllocationTagList(output.CostAllocationTags, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_SavingsPlansUtilizationAggregates omitted. -/** - * deserializeAws_json1_1ListCostCategoryDefinitionsResponse - */ -const de_ListCostCategoryDefinitionsResponse = ( - output: any, - context: __SerdeContext -): ListCostCategoryDefinitionsResponse => { - return { - CostCategoryReferences: - output.CostCategoryReferences != null - ? de_CostCategoryReferencesList(output.CostCategoryReferences, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_SavingsPlansUtilizationByTime omitted. -/** - * deserializeAws_json1_1ListSavingsPlansPurchaseRecommendationGenerationResponse - */ -const de_ListSavingsPlansPurchaseRecommendationGenerationResponse = ( - output: any, - context: __SerdeContext -): ListSavingsPlansPurchaseRecommendationGenerationResponse => { - return { - GenerationSummaryList: - output.GenerationSummaryList != null - ? de_GenerationSummaryList(output.GenerationSummaryList, context) - : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; +// de_SavingsPlansUtilizationDetail omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - ResourceTags: output.ResourceTags != null ? de_ResourceTagList(output.ResourceTags, context) : undefined, - } as any; -}; +// de_SavingsPlansUtilizationDetails omitted. -/** - * deserializeAws_json1_1MatchOptions - */ -const de_MatchOptions = (output: any, context: __SerdeContext): (MatchOption | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SavingsPlansUtilizationsByTime omitted. -/** - * deserializeAws_json1_1Metrics - */ -const de_Metrics = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MetricValue(value, context); - return acc; - }, {}); -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_1MetricValue - */ -const de_MetricValue = (output: any, context: __SerdeContext): MetricValue => { - return { - Amount: __expectString(output.Amount), - Unit: __expectString(output.Unit), - } as any; -}; +// de_ServiceSpecification omitted. -/** - * deserializeAws_json1_1ModifyRecommendationDetail - */ -const de_ModifyRecommendationDetail = (output: any, context: __SerdeContext): ModifyRecommendationDetail => { - return { - TargetInstances: - output.TargetInstances != null ? de_TargetInstancesList(output.TargetInstances, context) : undefined, - } as any; -}; +// de_StartSavingsPlansPurchaseRecommendationGenerationResponse omitted. -/** - * deserializeAws_json1_1MonitorArnList - */ -const de_MonitorArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Subscriber omitted. -/** - * deserializeAws_json1_1NetworkResourceUtilization - */ -const de_NetworkResourceUtilization = (output: any, context: __SerdeContext): NetworkResourceUtilization => { - return { - NetworkInBytesPerSecond: __expectString(output.NetworkInBytesPerSecond), - NetworkOutBytesPerSecond: __expectString(output.NetworkOutBytesPerSecond), - NetworkPacketsInPerSecond: __expectString(output.NetworkPacketsInPerSecond), - NetworkPacketsOutPerSecond: __expectString(output.NetworkPacketsOutPerSecond), - } as any; -}; +// de_Subscribers omitted. -/** - * deserializeAws_json1_1PlatformDifferences - */ -const de_PlatformDifferences = (output: any, context: __SerdeContext): (PlatformDifference | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1ProvideAnomalyFeedbackResponse - */ -const de_ProvideAnomalyFeedbackResponse = (output: any, context: __SerdeContext): ProvideAnomalyFeedbackResponse => { - return { - AnomalyId: __expectString(output.AnomalyId), - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1RDSInstanceDetails - */ -const de_RDSInstanceDetails = (output: any, context: __SerdeContext): RDSInstanceDetails => { - return { - CurrentGeneration: __expectBoolean(output.CurrentGeneration), - DatabaseEdition: __expectString(output.DatabaseEdition), - DatabaseEngine: __expectString(output.DatabaseEngine), - DeploymentOption: __expectString(output.DeploymentOption), - Family: __expectString(output.Family), - InstanceType: __expectString(output.InstanceType), - LicenseModel: __expectString(output.LicenseModel), - Region: __expectString(output.Region), - SizeFlexEligible: __expectBoolean(output.SizeFlexEligible), - } as any; -}; +// de_TagValues omitted. -/** - * deserializeAws_json1_1RedshiftInstanceDetails - */ -const de_RedshiftInstanceDetails = (output: any, context: __SerdeContext): RedshiftInstanceDetails => { - return { - CurrentGeneration: __expectBoolean(output.CurrentGeneration), - Family: __expectString(output.Family), - NodeType: __expectString(output.NodeType), - Region: __expectString(output.Region), - SizeFlexEligible: __expectBoolean(output.SizeFlexEligible), - } as any; -}; +// de_TagValuesList omitted. -/** - * deserializeAws_json1_1RequestChangedException - */ -const de_RequestChangedException = (output: any, context: __SerdeContext): RequestChangedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetInstance omitted. -/** - * deserializeAws_json1_1ReservationAggregates - */ -const de_ReservationAggregates = (output: any, context: __SerdeContext): ReservationAggregates => { - return { - AmortizedRecurringFee: __expectString(output.AmortizedRecurringFee), - AmortizedUpfrontFee: __expectString(output.AmortizedUpfrontFee), - NetRISavings: __expectString(output.NetRISavings), - OnDemandCostOfRIHoursUsed: __expectString(output.OnDemandCostOfRIHoursUsed), - PurchasedHours: __expectString(output.PurchasedHours), - PurchasedUnits: __expectString(output.PurchasedUnits), - RICostForUnusedHours: __expectString(output.RICostForUnusedHours), - RealizedSavings: __expectString(output.RealizedSavings), - TotalActualHours: __expectString(output.TotalActualHours), - TotalActualUnits: __expectString(output.TotalActualUnits), - TotalAmortizedFee: __expectString(output.TotalAmortizedFee), - TotalPotentialRISavings: __expectString(output.TotalPotentialRISavings), - UnrealizedSavings: __expectString(output.UnrealizedSavings), - UnusedHours: __expectString(output.UnusedHours), - UnusedUnits: __expectString(output.UnusedUnits), - UtilizationPercentage: __expectString(output.UtilizationPercentage), - UtilizationPercentageInUnits: __expectString(output.UtilizationPercentageInUnits), - } as any; -}; - -/** - * deserializeAws_json1_1ReservationCoverageGroup - */ -const de_ReservationCoverageGroup = (output: any, context: __SerdeContext): ReservationCoverageGroup => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - Coverage: output.Coverage != null ? de_Coverage(output.Coverage, context) : undefined, - } as any; -}; +// de_TargetInstancesList omitted. -/** - * deserializeAws_json1_1ReservationCoverageGroups - */ -const de_ReservationCoverageGroups = (output: any, context: __SerdeContext): ReservationCoverageGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReservationCoverageGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ReservationPurchaseRecommendation - */ -const de_ReservationPurchaseRecommendation = ( - output: any, - context: __SerdeContext -): ReservationPurchaseRecommendation => { - return { - AccountScope: __expectString(output.AccountScope), - LookbackPeriodInDays: __expectString(output.LookbackPeriodInDays), - PaymentOption: __expectString(output.PaymentOption), - RecommendationDetails: - output.RecommendationDetails != null - ? de_ReservationPurchaseRecommendationDetails(output.RecommendationDetails, context) - : undefined, - RecommendationSummary: - output.RecommendationSummary != null - ? de_ReservationPurchaseRecommendationSummary(output.RecommendationSummary, context) - : undefined, - ServiceSpecification: - output.ServiceSpecification != null ? de_ServiceSpecification(output.ServiceSpecification, context) : undefined, - TermInYears: __expectString(output.TermInYears), - } as any; -}; - -/** - * deserializeAws_json1_1ReservationPurchaseRecommendationDetail - */ -const de_ReservationPurchaseRecommendationDetail = ( - output: any, - context: __SerdeContext -): ReservationPurchaseRecommendationDetail => { - return { - AccountId: __expectString(output.AccountId), - AverageNormalizedUnitsUsedPerHour: __expectString(output.AverageNormalizedUnitsUsedPerHour), - AverageNumberOfInstancesUsedPerHour: __expectString(output.AverageNumberOfInstancesUsedPerHour), - AverageUtilization: __expectString(output.AverageUtilization), - CurrencyCode: __expectString(output.CurrencyCode), - EstimatedBreakEvenInMonths: __expectString(output.EstimatedBreakEvenInMonths), - EstimatedMonthlyOnDemandCost: __expectString(output.EstimatedMonthlyOnDemandCost), - EstimatedMonthlySavingsAmount: __expectString(output.EstimatedMonthlySavingsAmount), - EstimatedMonthlySavingsPercentage: __expectString(output.EstimatedMonthlySavingsPercentage), - EstimatedReservationCostForLookbackPeriod: __expectString(output.EstimatedReservationCostForLookbackPeriod), - InstanceDetails: output.InstanceDetails != null ? de_InstanceDetails(output.InstanceDetails, context) : undefined, - MaximumNormalizedUnitsUsedPerHour: __expectString(output.MaximumNormalizedUnitsUsedPerHour), - MaximumNumberOfInstancesUsedPerHour: __expectString(output.MaximumNumberOfInstancesUsedPerHour), - MinimumNormalizedUnitsUsedPerHour: __expectString(output.MinimumNormalizedUnitsUsedPerHour), - MinimumNumberOfInstancesUsedPerHour: __expectString(output.MinimumNumberOfInstancesUsedPerHour), - RecommendedNormalizedUnitsToPurchase: __expectString(output.RecommendedNormalizedUnitsToPurchase), - RecommendedNumberOfInstancesToPurchase: __expectString(output.RecommendedNumberOfInstancesToPurchase), - RecurringStandardMonthlyCost: __expectString(output.RecurringStandardMonthlyCost), - UpfrontCost: __expectString(output.UpfrontCost), - } as any; -}; - -/** - * deserializeAws_json1_1ReservationPurchaseRecommendationDetails - */ -const de_ReservationPurchaseRecommendationDetails = ( - output: any, - context: __SerdeContext -): ReservationPurchaseRecommendationDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReservationPurchaseRecommendationDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ReservationPurchaseRecommendationMetadata - */ -const de_ReservationPurchaseRecommendationMetadata = ( - output: any, - context: __SerdeContext -): ReservationPurchaseRecommendationMetadata => { - return { - GenerationTimestamp: __expectString(output.GenerationTimestamp), - RecommendationId: __expectString(output.RecommendationId), - } as any; -}; - -/** - * deserializeAws_json1_1ReservationPurchaseRecommendations - */ -const de_ReservationPurchaseRecommendations = ( - output: any, - context: __SerdeContext -): ReservationPurchaseRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReservationPurchaseRecommendation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ReservationPurchaseRecommendationSummary - */ -const de_ReservationPurchaseRecommendationSummary = ( - output: any, - context: __SerdeContext -): ReservationPurchaseRecommendationSummary => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - TotalEstimatedMonthlySavingsAmount: __expectString(output.TotalEstimatedMonthlySavingsAmount), - TotalEstimatedMonthlySavingsPercentage: __expectString(output.TotalEstimatedMonthlySavingsPercentage), - } as any; -}; - -/** - * deserializeAws_json1_1ReservationUtilizationGroup - */ -const de_ReservationUtilizationGroup = (output: any, context: __SerdeContext): ReservationUtilizationGroup => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - Key: __expectString(output.Key), - Utilization: output.Utilization != null ? de_ReservationAggregates(output.Utilization, context) : undefined, - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ReservationUtilizationGroups - */ -const de_ReservationUtilizationGroups = (output: any, context: __SerdeContext): ReservationUtilizationGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReservationUtilizationGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ResourceDetails - */ -const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - EC2ResourceDetails: - output.EC2ResourceDetails != null ? de_EC2ResourceDetails(output.EC2ResourceDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceTag - */ -const de_ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceTagList - */ -const de_ResourceTagList = (output: any, context: __SerdeContext): ResourceTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTag(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ResourceUtilization - */ -const de_ResourceUtilization = (output: any, context: __SerdeContext): ResourceUtilization => { - return { - EC2ResourceUtilization: - output.EC2ResourceUtilization != null - ? de_EC2ResourceUtilization(output.EC2ResourceUtilization, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResultByTime - */ -const de_ResultByTime = (output: any, context: __SerdeContext): ResultByTime => { - return { - Estimated: __expectBoolean(output.Estimated), - Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - Total: output.Total != null ? de_Metrics(output.Total, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResultsByTime - */ -const de_ResultsByTime = (output: any, context: __SerdeContext): ResultByTime[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultByTime(entry, context); - }); - return retVal; -}; +// de_TerminateRecommendationDetail omitted. -/** - * deserializeAws_json1_1RightsizingRecommendation - */ -const de_RightsizingRecommendation = (output: any, context: __SerdeContext): RightsizingRecommendation => { - return { - AccountId: __expectString(output.AccountId), - CurrentInstance: output.CurrentInstance != null ? de_CurrentInstance(output.CurrentInstance, context) : undefined, - FindingReasonCodes: - output.FindingReasonCodes != null ? de_FindingReasonCodes(output.FindingReasonCodes, context) : undefined, - ModifyRecommendationDetail: - output.ModifyRecommendationDetail != null - ? de_ModifyRecommendationDetail(output.ModifyRecommendationDetail, context) - : undefined, - RightsizingType: __expectString(output.RightsizingType), - TerminateRecommendationDetail: - output.TerminateRecommendationDetail != null - ? de_TerminateRecommendationDetail(output.TerminateRecommendationDetail, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RightsizingRecommendationConfiguration - */ -const de_RightsizingRecommendationConfiguration = ( - output: any, - context: __SerdeContext -): RightsizingRecommendationConfiguration => { - return { - BenefitsConsidered: __expectBoolean(output.BenefitsConsidered), - RecommendationTarget: __expectString(output.RecommendationTarget), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1RightsizingRecommendationList - */ -const de_RightsizingRecommendationList = (output: any, context: __SerdeContext): RightsizingRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RightsizingRecommendation(entry, context); - }); - return retVal; -}; +// de_UnknownMonitorException omitted. -/** - * deserializeAws_json1_1RightsizingRecommendationMetadata - */ -const de_RightsizingRecommendationMetadata = ( - output: any, - context: __SerdeContext -): RightsizingRecommendationMetadata => { - return { - AdditionalMetadata: __expectString(output.AdditionalMetadata), - GenerationTimestamp: __expectString(output.GenerationTimestamp), - LookbackPeriodInDays: __expectString(output.LookbackPeriodInDays), - RecommendationId: __expectString(output.RecommendationId), - } as any; -}; +// de_UnknownSubscriptionException omitted. -/** - * deserializeAws_json1_1RightsizingRecommendationSummary - */ -const de_RightsizingRecommendationSummary = ( - output: any, - context: __SerdeContext -): RightsizingRecommendationSummary => { - return { - EstimatedTotalMonthlySavingsAmount: __expectString(output.EstimatedTotalMonthlySavingsAmount), - SavingsCurrencyCode: __expectString(output.SavingsCurrencyCode), - SavingsPercentage: __expectString(output.SavingsPercentage), - TotalRecommendationCount: __expectString(output.TotalRecommendationCount), - } as any; -}; +// de_UnresolvableUsageUnitException omitted. -/** - * deserializeAws_json1_1RootCause - */ -const de_RootCause = (output: any, context: __SerdeContext): RootCause => { - return { - LinkedAccount: __expectString(output.LinkedAccount), - LinkedAccountName: __expectString(output.LinkedAccountName), - Region: __expectString(output.Region), - Service: __expectString(output.Service), - UsageType: __expectString(output.UsageType), - } as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1RootCauses - */ -const de_RootCauses = (output: any, context: __SerdeContext): RootCause[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RootCause(entry, context); - }); - return retVal; -}; +// de_UpdateAnomalyMonitorResponse omitted. -/** - * deserializeAws_json1_1SavingsPlansAmortizedCommitment - */ -const de_SavingsPlansAmortizedCommitment = (output: any, context: __SerdeContext): SavingsPlansAmortizedCommitment => { - return { - AmortizedRecurringCommitment: __expectString(output.AmortizedRecurringCommitment), - AmortizedUpfrontCommitment: __expectString(output.AmortizedUpfrontCommitment), - TotalAmortizedCommitment: __expectString(output.TotalAmortizedCommitment), - } as any; -}; +// de_UpdateAnomalySubscriptionResponse omitted. -/** - * deserializeAws_json1_1SavingsPlansCoverage - */ -const de_SavingsPlansCoverage = (output: any, context: __SerdeContext): SavingsPlansCoverage => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - Coverage: output.Coverage != null ? de_SavingsPlansCoverageData(output.Coverage, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - } as any; -}; +// de_UpdateCostAllocationTagsStatusError omitted. -/** - * deserializeAws_json1_1SavingsPlansCoverageData - */ -const de_SavingsPlansCoverageData = (output: any, context: __SerdeContext): SavingsPlansCoverageData => { - return { - CoveragePercentage: __expectString(output.CoveragePercentage), - OnDemandCost: __expectString(output.OnDemandCost), - SpendCoveredBySavingsPlans: __expectString(output.SpendCoveredBySavingsPlans), - TotalCost: __expectString(output.TotalCost), - } as any; -}; +// de_UpdateCostAllocationTagsStatusErrors omitted. -/** - * deserializeAws_json1_1SavingsPlansCoverages - */ -const de_SavingsPlansCoverages = (output: any, context: __SerdeContext): SavingsPlansCoverage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlansCoverage(entry, context); - }); - return retVal; -}; +// de_UpdateCostAllocationTagsStatusResponse omitted. -/** - * deserializeAws_json1_1SavingsPlansDetails - */ -const de_SavingsPlansDetails = (output: any, context: __SerdeContext): SavingsPlansDetails => { - return { - InstanceFamily: __expectString(output.InstanceFamily), - OfferingId: __expectString(output.OfferingId), - Region: __expectString(output.Region), - } as any; -}; +// de_UpdateCostCategoryDefinitionResponse omitted. -/** - * deserializeAws_json1_1SavingsPlansPurchaseRecommendation - */ -const de_SavingsPlansPurchaseRecommendation = ( - output: any, - context: __SerdeContext -): SavingsPlansPurchaseRecommendation => { - return { - AccountScope: __expectString(output.AccountScope), - LookbackPeriodInDays: __expectString(output.LookbackPeriodInDays), - PaymentOption: __expectString(output.PaymentOption), - SavingsPlansPurchaseRecommendationDetails: - output.SavingsPlansPurchaseRecommendationDetails != null - ? de_SavingsPlansPurchaseRecommendationDetailList(output.SavingsPlansPurchaseRecommendationDetails, context) - : undefined, - SavingsPlansPurchaseRecommendationSummary: - output.SavingsPlansPurchaseRecommendationSummary != null - ? de_SavingsPlansPurchaseRecommendationSummary(output.SavingsPlansPurchaseRecommendationSummary, context) - : undefined, - SavingsPlansType: __expectString(output.SavingsPlansType), - TermInYears: __expectString(output.TermInYears), - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansPurchaseRecommendationDetail - */ -const de_SavingsPlansPurchaseRecommendationDetail = ( - output: any, - context: __SerdeContext -): SavingsPlansPurchaseRecommendationDetail => { - return { - AccountId: __expectString(output.AccountId), - CurrencyCode: __expectString(output.CurrencyCode), - CurrentAverageHourlyOnDemandSpend: __expectString(output.CurrentAverageHourlyOnDemandSpend), - CurrentMaximumHourlyOnDemandSpend: __expectString(output.CurrentMaximumHourlyOnDemandSpend), - CurrentMinimumHourlyOnDemandSpend: __expectString(output.CurrentMinimumHourlyOnDemandSpend), - EstimatedAverageUtilization: __expectString(output.EstimatedAverageUtilization), - EstimatedMonthlySavingsAmount: __expectString(output.EstimatedMonthlySavingsAmount), - EstimatedOnDemandCost: __expectString(output.EstimatedOnDemandCost), - EstimatedOnDemandCostWithCurrentCommitment: __expectString(output.EstimatedOnDemandCostWithCurrentCommitment), - EstimatedROI: __expectString(output.EstimatedROI), - EstimatedSPCost: __expectString(output.EstimatedSPCost), - EstimatedSavingsAmount: __expectString(output.EstimatedSavingsAmount), - EstimatedSavingsPercentage: __expectString(output.EstimatedSavingsPercentage), - HourlyCommitmentToPurchase: __expectString(output.HourlyCommitmentToPurchase), - SavingsPlansDetails: - output.SavingsPlansDetails != null ? de_SavingsPlansDetails(output.SavingsPlansDetails, context) : undefined, - UpfrontCost: __expectString(output.UpfrontCost), - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansPurchaseRecommendationDetailList - */ -const de_SavingsPlansPurchaseRecommendationDetailList = ( - output: any, - context: __SerdeContext -): SavingsPlansPurchaseRecommendationDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlansPurchaseRecommendationDetail(entry, context); - }); - return retVal; -}; +// de_UtilizationByTime omitted. -/** - * deserializeAws_json1_1SavingsPlansPurchaseRecommendationMetadata - */ -const de_SavingsPlansPurchaseRecommendationMetadata = ( - output: any, - context: __SerdeContext -): SavingsPlansPurchaseRecommendationMetadata => { - return { - AdditionalMetadata: __expectString(output.AdditionalMetadata), - GenerationTimestamp: __expectString(output.GenerationTimestamp), - RecommendationId: __expectString(output.RecommendationId), - } as any; -}; +// de_UtilizationsByTime omitted. -/** - * deserializeAws_json1_1SavingsPlansPurchaseRecommendationSummary - */ -const de_SavingsPlansPurchaseRecommendationSummary = ( - output: any, - context: __SerdeContext -): SavingsPlansPurchaseRecommendationSummary => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - CurrentOnDemandSpend: __expectString(output.CurrentOnDemandSpend), - DailyCommitmentToPurchase: __expectString(output.DailyCommitmentToPurchase), - EstimatedMonthlySavingsAmount: __expectString(output.EstimatedMonthlySavingsAmount), - EstimatedOnDemandCostWithCurrentCommitment: __expectString(output.EstimatedOnDemandCostWithCurrentCommitment), - EstimatedROI: __expectString(output.EstimatedROI), - EstimatedSavingsAmount: __expectString(output.EstimatedSavingsAmount), - EstimatedSavingsPercentage: __expectString(output.EstimatedSavingsPercentage), - EstimatedTotalCost: __expectString(output.EstimatedTotalCost), - HourlyCommitmentToPurchase: __expectString(output.HourlyCommitmentToPurchase), - TotalRecommendationCount: __expectString(output.TotalRecommendationCount), - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansSavings - */ -const de_SavingsPlansSavings = (output: any, context: __SerdeContext): SavingsPlansSavings => { - return { - NetSavings: __expectString(output.NetSavings), - OnDemandCostEquivalent: __expectString(output.OnDemandCostEquivalent), - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansUtilization - */ -const de_SavingsPlansUtilization = (output: any, context: __SerdeContext): SavingsPlansUtilization => { - return { - TotalCommitment: __expectString(output.TotalCommitment), - UnusedCommitment: __expectString(output.UnusedCommitment), - UsedCommitment: __expectString(output.UsedCommitment), - UtilizationPercentage: __expectString(output.UtilizationPercentage), - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansUtilizationAggregates - */ -const de_SavingsPlansUtilizationAggregates = ( - output: any, - context: __SerdeContext -): SavingsPlansUtilizationAggregates => { - return { - AmortizedCommitment: - output.AmortizedCommitment != null - ? de_SavingsPlansAmortizedCommitment(output.AmortizedCommitment, context) - : undefined, - Savings: output.Savings != null ? de_SavingsPlansSavings(output.Savings, context) : undefined, - Utilization: output.Utilization != null ? de_SavingsPlansUtilization(output.Utilization, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansUtilizationByTime - */ -const de_SavingsPlansUtilizationByTime = (output: any, context: __SerdeContext): SavingsPlansUtilizationByTime => { - return { - AmortizedCommitment: - output.AmortizedCommitment != null - ? de_SavingsPlansAmortizedCommitment(output.AmortizedCommitment, context) - : undefined, - Savings: output.Savings != null ? de_SavingsPlansSavings(output.Savings, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - Utilization: output.Utilization != null ? de_SavingsPlansUtilization(output.Utilization, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansUtilizationDetail - */ -const de_SavingsPlansUtilizationDetail = (output: any, context: __SerdeContext): SavingsPlansUtilizationDetail => { - return { - AmortizedCommitment: - output.AmortizedCommitment != null - ? de_SavingsPlansAmortizedCommitment(output.AmortizedCommitment, context) - : undefined, - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - Savings: output.Savings != null ? de_SavingsPlansSavings(output.Savings, context) : undefined, - SavingsPlanArn: __expectString(output.SavingsPlanArn), - Utilization: output.Utilization != null ? de_SavingsPlansUtilization(output.Utilization, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SavingsPlansUtilizationDetails - */ -const de_SavingsPlansUtilizationDetails = (output: any, context: __SerdeContext): SavingsPlansUtilizationDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlansUtilizationDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1SavingsPlansUtilizationsByTime - */ -const de_SavingsPlansUtilizationsByTime = (output: any, context: __SerdeContext): SavingsPlansUtilizationByTime[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlansUtilizationByTime(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ServiceSpecification - */ -const de_ServiceSpecification = (output: any, context: __SerdeContext): ServiceSpecification => { - return { - EC2Specification: - output.EC2Specification != null ? de_EC2Specification(output.EC2Specification, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1StartSavingsPlansPurchaseRecommendationGenerationResponse - */ -const de_StartSavingsPlansPurchaseRecommendationGenerationResponse = ( - output: any, - context: __SerdeContext -): StartSavingsPlansPurchaseRecommendationGenerationResponse => { - return { - EstimatedCompletionTime: __expectString(output.EstimatedCompletionTime), - GenerationStartedTime: __expectString(output.GenerationStartedTime), - RecommendationId: __expectString(output.RecommendationId), - } as any; -}; - -/** - * deserializeAws_json1_1Subscriber - */ -const de_Subscriber = (output: any, context: __SerdeContext): Subscriber => { - return { - Address: __expectString(output.Address), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1Subscribers - */ -const de_Subscribers = (output: any, context: __SerdeContext): Subscriber[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subscriber(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1TagValues - */ -const de_TagValues = (output: any, context: __SerdeContext): TagValues => { - return { - Key: __expectString(output.Key), - MatchOptions: output.MatchOptions != null ? de_MatchOptions(output.MatchOptions, context) : undefined, - Values: output.Values != null ? de_Values(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TagValuesList - */ -const de_TagValuesList = (output: any, context: __SerdeContext): TagValues[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagValues(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1TargetInstance - */ -const de_TargetInstance = (output: any, context: __SerdeContext): TargetInstance => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - DefaultTargetInstance: __expectBoolean(output.DefaultTargetInstance), - EstimatedMonthlyCost: __expectString(output.EstimatedMonthlyCost), - EstimatedMonthlySavings: __expectString(output.EstimatedMonthlySavings), - ExpectedResourceUtilization: - output.ExpectedResourceUtilization != null - ? de_ResourceUtilization(output.ExpectedResourceUtilization, context) - : undefined, - PlatformDifferences: - output.PlatformDifferences != null ? de_PlatformDifferences(output.PlatformDifferences, context) : undefined, - ResourceDetails: output.ResourceDetails != null ? de_ResourceDetails(output.ResourceDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TargetInstancesList - */ -const de_TargetInstancesList = (output: any, context: __SerdeContext): TargetInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetInstance(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1TerminateRecommendationDetail - */ -const de_TerminateRecommendationDetail = (output: any, context: __SerdeContext): TerminateRecommendationDetail => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - EstimatedMonthlySavings: __expectString(output.EstimatedMonthlySavings), - } as any; -}; - -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; - -/** - * deserializeAws_json1_1UnknownMonitorException - */ -const de_UnknownMonitorException = (output: any, context: __SerdeContext): UnknownMonitorException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1UnknownSubscriptionException - */ -const de_UnknownSubscriptionException = (output: any, context: __SerdeContext): UnknownSubscriptionException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1UnresolvableUsageUnitException - */ -const de_UnresolvableUsageUnitException = (output: any, context: __SerdeContext): UnresolvableUsageUnitException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1UpdateAnomalyMonitorResponse - */ -const de_UpdateAnomalyMonitorResponse = (output: any, context: __SerdeContext): UpdateAnomalyMonitorResponse => { - return { - MonitorArn: __expectString(output.MonitorArn), - } as any; -}; - -/** - * deserializeAws_json1_1UpdateAnomalySubscriptionResponse - */ -const de_UpdateAnomalySubscriptionResponse = ( - output: any, - context: __SerdeContext -): UpdateAnomalySubscriptionResponse => { - return { - SubscriptionArn: __expectString(output.SubscriptionArn), - } as any; -}; - -/** - * deserializeAws_json1_1UpdateCostAllocationTagsStatusError - */ -const de_UpdateCostAllocationTagsStatusError = ( - output: any, - context: __SerdeContext -): UpdateCostAllocationTagsStatusError => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - TagKey: __expectString(output.TagKey), - } as any; -}; - -/** - * deserializeAws_json1_1UpdateCostAllocationTagsStatusErrors - */ -const de_UpdateCostAllocationTagsStatusErrors = ( - output: any, - context: __SerdeContext -): UpdateCostAllocationTagsStatusError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateCostAllocationTagsStatusError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1UpdateCostAllocationTagsStatusResponse - */ -const de_UpdateCostAllocationTagsStatusResponse = ( - output: any, - context: __SerdeContext -): UpdateCostAllocationTagsStatusResponse => { - return { - Errors: output.Errors != null ? de_UpdateCostAllocationTagsStatusErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1UpdateCostCategoryDefinitionResponse - */ -const de_UpdateCostCategoryDefinitionResponse = ( - output: any, - context: __SerdeContext -): UpdateCostCategoryDefinitionResponse => { - return { - CostCategoryArn: __expectString(output.CostCategoryArn), - EffectiveStart: __expectString(output.EffectiveStart), - } as any; -}; - -/** - * deserializeAws_json1_1UtilizationByTime - */ -const de_UtilizationByTime = (output: any, context: __SerdeContext): UtilizationByTime => { - return { - Groups: output.Groups != null ? de_ReservationUtilizationGroups(output.Groups, context) : undefined, - TimePeriod: output.TimePeriod != null ? de_DateInterval(output.TimePeriod, context) : undefined, - Total: output.Total != null ? de_ReservationAggregates(output.Total, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1UtilizationsByTime - */ -const de_UtilizationsByTime = (output: any, context: __SerdeContext): UtilizationByTime[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UtilizationByTime(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Values - */ -const de_Values = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Values omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -6303,6 +3836,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts b/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts index 3662768b58ca..5f629f1f58d1 100644 --- a/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts +++ b/clients/client-customer-profiles/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,11 +12,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -106,8 +108,6 @@ import { AdditionalSearchKey, Address, AppflowIntegration, - AppflowIntegrationWorkflowAttributes, - AppflowIntegrationWorkflowMetrics, AppflowIntegrationWorkflowStep, AutoMerging, BadRequestException, @@ -115,23 +115,17 @@ import { ConflictResolution, ConnectorOperator, Consolidation, - DomainStats, ExportingConfig, - ExportingLocation, FieldSourceProfileIds, FlowDefinition, - FoundByKeyValue, IdentityResolutionJob, IncrementalPullConfig, IntegrationConfig, InternalServerException, JobSchedule, - JobStats, ListDomainItem, ListIntegrationItem, - ListProfileObjectsItem, ListProfileObjectTypeItem, - ListProfileObjectTypeTemplateItem, ListWorkflowsItem, MarketoSourceProperties, MatchingRequest, @@ -140,11 +134,8 @@ import { ObjectFilter, ObjectTypeField, ObjectTypeKey, - OperatorPropertiesKeys, - Profile, ResourceNotFoundException, S3ExportingConfig, - S3ExportingLocation, S3SourceProperties, SalesforceSourceProperties, ScheduledTriggerProperties, @@ -157,8 +148,6 @@ import { TriggerConfig, TriggerProperties, UpdateAddress, - WorkflowAttributes, - WorkflowMetrics, WorkflowStepItem, ZendeskSourceProperties, } from "../models/models_0"; @@ -178,11 +167,13 @@ export const se_AddProfileKeyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/keys"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }), - }); + body = JSON.stringify( + take(input, { + KeyName: [], + ProfileId: [], + Values: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -208,13 +199,15 @@ export const se_CreateDomainCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.DeadLetterQueueUrl != null && { DeadLetterQueueUrl: input.DeadLetterQueueUrl }), - ...(input.DefaultEncryptionKey != null && { DefaultEncryptionKey: input.DefaultEncryptionKey }), - ...(input.DefaultExpirationDays != null && { DefaultExpirationDays: input.DefaultExpirationDays }), - ...(input.Matching != null && { Matching: se_MatchingRequest(input.Matching, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DeadLetterQueueUrl: [], + DefaultEncryptionKey: [], + DefaultExpirationDays: [], + Matching: (_) => se_MatchingRequest(_, context), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -242,15 +235,15 @@ export const se_CreateIntegrationWorkflowCommand = async ( "/domains/{DomainName}/workflows/integrations"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.IntegrationConfig != null && { - IntegrationConfig: se_IntegrationConfig(input.IntegrationConfig, context), - }), - ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.WorkflowType != null && { WorkflowType: input.WorkflowType }), - }); + body = JSON.stringify( + take(input, { + IntegrationConfig: (_) => se_IntegrationConfig(_, context), + ObjectTypeName: [], + RoleArn: [], + Tags: (_) => _json(_), + WorkflowType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -277,31 +270,33 @@ export const se_CreateProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }), - ...(input.AdditionalInformation != null && { AdditionalInformation: input.AdditionalInformation }), - ...(input.Address != null && { Address: se_Address(input.Address, context) }), - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - ...(input.BillingAddress != null && { BillingAddress: se_Address(input.BillingAddress, context) }), - ...(input.BirthDate != null && { BirthDate: input.BirthDate }), - ...(input.BusinessEmailAddress != null && { BusinessEmailAddress: input.BusinessEmailAddress }), - ...(input.BusinessName != null && { BusinessName: input.BusinessName }), - ...(input.BusinessPhoneNumber != null && { BusinessPhoneNumber: input.BusinessPhoneNumber }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.Gender != null && { Gender: input.Gender }), - ...(input.GenderString != null && { GenderString: input.GenderString }), - ...(input.HomePhoneNumber != null && { HomePhoneNumber: input.HomePhoneNumber }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.MailingAddress != null && { MailingAddress: se_Address(input.MailingAddress, context) }), - ...(input.MiddleName != null && { MiddleName: input.MiddleName }), - ...(input.MobilePhoneNumber != null && { MobilePhoneNumber: input.MobilePhoneNumber }), - ...(input.PartyType != null && { PartyType: input.PartyType }), - ...(input.PartyTypeString != null && { PartyTypeString: input.PartyTypeString }), - ...(input.PersonalEmailAddress != null && { PersonalEmailAddress: input.PersonalEmailAddress }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.ShippingAddress != null && { ShippingAddress: se_Address(input.ShippingAddress, context) }), - }); + body = JSON.stringify( + take(input, { + AccountNumber: [], + AdditionalInformation: [], + Address: (_) => _json(_), + Attributes: (_) => _json(_), + BillingAddress: (_) => _json(_), + BirthDate: [], + BusinessEmailAddress: [], + BusinessName: [], + BusinessPhoneNumber: [], + EmailAddress: [], + FirstName: [], + Gender: [], + GenderString: [], + HomePhoneNumber: [], + LastName: [], + MailingAddress: (_) => _json(_), + MiddleName: [], + MobilePhoneNumber: [], + PartyType: [], + PartyTypeString: [], + PersonalEmailAddress: [], + PhoneNumber: [], + ShippingAddress: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -351,9 +346,11 @@ export const se_DeleteIntegrationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations/delete"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Uri != null && { Uri: input.Uri }), - }); + body = JSON.stringify( + take(input, { + Uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -380,9 +377,11 @@ export const se_DeleteProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/delete"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - }); + body = JSON.stringify( + take(input, { + ProfileId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -410,11 +409,13 @@ export const se_DeleteProfileKeyCommand = async ( "/domains/{DomainName}/profiles/keys/delete"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }), - }); + body = JSON.stringify( + take(input, { + KeyName: [], + ProfileId: [], + Values: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -442,11 +443,13 @@ export const se_DeleteProfileObjectCommand = async ( "/domains/{DomainName}/profiles/objects/delete"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }), - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - ...(input.ProfileObjectUniqueKey != null && { ProfileObjectUniqueKey: input.ProfileObjectUniqueKey }), - }); + body = JSON.stringify( + take(input, { + ObjectTypeName: [], + ProfileId: [], + ProfileObjectUniqueKey: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -533,15 +536,13 @@ export const se_GetAutoMergingPreviewCommand = async ( "/domains/{DomainName}/identity-resolution-jobs/auto-merging-preview"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.ConflictResolution != null && { - ConflictResolution: se_ConflictResolution(input.ConflictResolution, context), - }), - ...(input.Consolidation != null && { Consolidation: se_Consolidation(input.Consolidation, context) }), - ...(input.MinAllowedConfidenceScoreForMerging != null && { - MinAllowedConfidenceScoreForMerging: __serializeFloat(input.MinAllowedConfidenceScoreForMerging), - }), - }); + body = JSON.stringify( + take(input, { + ConflictResolution: (_) => _json(_), + Consolidation: (_) => _json(_), + MinAllowedConfidenceScoreForMerging: (_) => __serializeFloat(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -617,9 +618,11 @@ export const se_GetIntegrationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Uri != null && { Uri: input.Uri }), - }); + body = JSON.stringify( + take(input, { + Uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -791,9 +794,11 @@ export const se_ListAccountIntegrationsCommand = async ( "include-hidden": [() => input.IncludeHidden !== void 0, () => input.IncludeHidden!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.Uri != null && { Uri: input.Uri }), - }); + body = JSON.stringify( + take(input, { + Uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -912,11 +917,13 @@ export const se_ListProfileObjectsCommand = async ( "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.ObjectFilter != null && { ObjectFilter: se_ObjectFilter(input.ObjectFilter, context) }), - ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }), - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - }); + body = JSON.stringify( + take(input, { + ObjectFilter: (_) => _json(_), + ObjectTypeName: [], + ProfileId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1027,12 +1034,14 @@ export const se_ListWorkflowsCommand = async ( "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.QueryEndDate != null && { QueryEndDate: Math.round(input.QueryEndDate.getTime() / 1000) }), - ...(input.QueryStartDate != null && { QueryStartDate: Math.round(input.QueryStartDate.getTime() / 1000) }), - ...(input.Status != null && { Status: input.Status }), - ...(input.WorkflowType != null && { WorkflowType: input.WorkflowType }), - }); + body = JSON.stringify( + take(input, { + QueryEndDate: (_) => Math.round(_.getTime() / 1000), + QueryStartDate: (_) => Math.round(_.getTime() / 1000), + Status: [], + WorkflowType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1061,15 +1070,13 @@ export const se_MergeProfilesCommand = async ( "/domains/{DomainName}/profiles/objects/merge"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.FieldSourceProfileIds != null && { - FieldSourceProfileIds: se_FieldSourceProfileIds(input.FieldSourceProfileIds, context), - }), - ...(input.MainProfileId != null && { MainProfileId: input.MainProfileId }), - ...(input.ProfileIdsToBeMerged != null && { - ProfileIdsToBeMerged: se_ProfileIdToBeMergedList(input.ProfileIdsToBeMerged, context), - }), - }); + body = JSON.stringify( + take(input, { + FieldSourceProfileIds: (_) => _json(_), + MainProfileId: [], + ProfileIdsToBeMerged: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1096,13 +1103,15 @@ export const se_PutIntegrationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/integrations"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.FlowDefinition != null && { FlowDefinition: se_FlowDefinition(input.FlowDefinition, context) }), - ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }), - ...(input.ObjectTypeNames != null && { ObjectTypeNames: se_ObjectTypeNames(input.ObjectTypeNames, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Uri != null && { Uri: input.Uri }), - }); + body = JSON.stringify( + take(input, { + FlowDefinition: (_) => se_FlowDefinition(_, context), + ObjectTypeName: [], + ObjectTypeNames: (_) => _json(_), + Tags: (_) => _json(_), + Uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1129,10 +1138,12 @@ export const se_PutProfileObjectCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles/objects"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Object != null && { Object: input.Object }), - ...(input.ObjectTypeName != null && { ObjectTypeName: input.ObjectTypeName }), - }); + body = JSON.stringify( + take(input, { + Object: [], + ObjectTypeName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1168,19 +1179,19 @@ export const se_PutProfileObjectTypeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AllowProfileCreation != null && { AllowProfileCreation: input.AllowProfileCreation }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EncryptionKey != null && { EncryptionKey: input.EncryptionKey }), - ...(input.ExpirationDays != null && { ExpirationDays: input.ExpirationDays }), - ...(input.Fields != null && { Fields: se_FieldMap(input.Fields, context) }), - ...(input.Keys != null && { Keys: se_KeyMap(input.Keys, context) }), - ...(input.SourceLastUpdatedTimestampFormat != null && { - SourceLastUpdatedTimestampFormat: input.SourceLastUpdatedTimestampFormat, - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TemplateId != null && { TemplateId: input.TemplateId }), - }); + body = JSON.stringify( + take(input, { + AllowProfileCreation: [], + Description: [], + EncryptionKey: [], + ExpirationDays: [], + Fields: (_) => _json(_), + Keys: (_) => _json(_), + SourceLastUpdatedTimestampFormat: [], + Tags: (_) => _json(_), + TemplateId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1211,14 +1222,14 @@ export const se_SearchProfilesCommand = async ( "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.AdditionalSearchKeys != null && { - AdditionalSearchKeys: se_additionalSearchKeysList(input.AdditionalSearchKeys, context), - }), - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.LogicalOperator != null && { LogicalOperator: input.LogicalOperator }), - ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }), - }); + body = JSON.stringify( + take(input, { + AdditionalSearchKeys: (_) => _json(_), + KeyName: [], + LogicalOperator: [], + Values: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1245,9 +1256,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1303,13 +1316,15 @@ export const se_UpdateDomainCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.DeadLetterQueueUrl != null && { DeadLetterQueueUrl: input.DeadLetterQueueUrl }), - ...(input.DefaultEncryptionKey != null && { DefaultEncryptionKey: input.DefaultEncryptionKey }), - ...(input.DefaultExpirationDays != null && { DefaultExpirationDays: input.DefaultExpirationDays }), - ...(input.Matching != null && { Matching: se_MatchingRequest(input.Matching, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DeadLetterQueueUrl: [], + DefaultEncryptionKey: [], + DefaultExpirationDays: [], + Matching: (_) => se_MatchingRequest(_, context), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1336,32 +1351,34 @@ export const se_UpdateProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domains/{DomainName}/profiles"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }), - ...(input.AdditionalInformation != null && { AdditionalInformation: input.AdditionalInformation }), - ...(input.Address != null && { Address: se_UpdateAddress(input.Address, context) }), - ...(input.Attributes != null && { Attributes: se_UpdateAttributes(input.Attributes, context) }), - ...(input.BillingAddress != null && { BillingAddress: se_UpdateAddress(input.BillingAddress, context) }), - ...(input.BirthDate != null && { BirthDate: input.BirthDate }), - ...(input.BusinessEmailAddress != null && { BusinessEmailAddress: input.BusinessEmailAddress }), - ...(input.BusinessName != null && { BusinessName: input.BusinessName }), - ...(input.BusinessPhoneNumber != null && { BusinessPhoneNumber: input.BusinessPhoneNumber }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.Gender != null && { Gender: input.Gender }), - ...(input.GenderString != null && { GenderString: input.GenderString }), - ...(input.HomePhoneNumber != null && { HomePhoneNumber: input.HomePhoneNumber }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.MailingAddress != null && { MailingAddress: se_UpdateAddress(input.MailingAddress, context) }), - ...(input.MiddleName != null && { MiddleName: input.MiddleName }), - ...(input.MobilePhoneNumber != null && { MobilePhoneNumber: input.MobilePhoneNumber }), - ...(input.PartyType != null && { PartyType: input.PartyType }), - ...(input.PartyTypeString != null && { PartyTypeString: input.PartyTypeString }), - ...(input.PersonalEmailAddress != null && { PersonalEmailAddress: input.PersonalEmailAddress }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - ...(input.ShippingAddress != null && { ShippingAddress: se_UpdateAddress(input.ShippingAddress, context) }), - }); + body = JSON.stringify( + take(input, { + AccountNumber: [], + AdditionalInformation: [], + Address: (_) => _json(_), + Attributes: (_) => _json(_), + BillingAddress: (_) => _json(_), + BirthDate: [], + BusinessEmailAddress: [], + BusinessName: [], + BusinessPhoneNumber: [], + EmailAddress: [], + FirstName: [], + Gender: [], + GenderString: [], + HomePhoneNumber: [], + LastName: [], + MailingAddress: (_) => _json(_), + MiddleName: [], + MobilePhoneNumber: [], + PartyType: [], + PartyTypeString: [], + PersonalEmailAddress: [], + PhoneNumber: [], + ProfileId: [], + ShippingAddress: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1387,12 +1404,11 @@ export const de_AddProfileKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.KeyName != null) { - contents.KeyName = __expectString(data.KeyName); - } - if (data.Values != null) { - contents.Values = de_requestValueList(data.Values, context); - } + const doc = take(data, { + KeyName: __expectString, + Values: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1426,10 +1442,9 @@ const de_AddProfileKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,30 +1464,17 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.DeadLetterQueueUrl != null) { - contents.DeadLetterQueueUrl = __expectString(data.DeadLetterQueueUrl); - } - if (data.DefaultEncryptionKey != null) { - contents.DefaultEncryptionKey = __expectString(data.DefaultEncryptionKey); - } - if (data.DefaultExpirationDays != null) { - contents.DefaultExpirationDays = __expectInt32(data.DefaultExpirationDays); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.Matching != null) { - contents.Matching = de_MatchingResponse(data.Matching, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeadLetterQueueUrl: __expectString, + DefaultEncryptionKey: __expectString, + DefaultExpirationDays: __expectInt32, + DomainName: __expectString, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Matching: (_) => de_MatchingResponse(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1506,10 +1508,9 @@ const de_CreateDomainCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1529,12 +1530,11 @@ export const de_CreateIntegrationWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.WorkflowId != null) { - contents.WorkflowId = __expectString(data.WorkflowId); - } + const doc = take(data, { + Message: __expectString, + WorkflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1568,10 +1568,9 @@ const de_CreateIntegrationWorkflowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1591,9 +1590,10 @@ export const de_CreateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProfileId != null) { - contents.ProfileId = __expectString(data.ProfileId); - } + const doc = take(data, { + ProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1627,10 +1627,9 @@ const de_CreateProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1650,9 +1649,10 @@ export const de_DeleteDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1686,10 +1686,9 @@ const de_DeleteDomainCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1709,9 +1708,10 @@ export const de_DeleteIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1745,10 +1745,9 @@ const de_DeleteIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1768,9 +1767,10 @@ export const de_DeleteProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1804,10 +1804,9 @@ const de_DeleteProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1827,9 +1826,10 @@ export const de_DeleteProfileKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1863,10 +1863,9 @@ const de_DeleteProfileKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1886,9 +1885,10 @@ export const de_DeleteProfileObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1922,10 +1922,9 @@ const de_DeleteProfileObjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1945,9 +1944,10 @@ export const de_DeleteProfileObjectTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1981,10 +1981,9 @@ const de_DeleteProfileObjectTypeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2037,10 +2036,9 @@ const de_DeleteWorkflowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2060,18 +2058,13 @@ export const de_GetAutoMergingPreviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.NumberOfMatchesInSample != null) { - contents.NumberOfMatchesInSample = __expectLong(data.NumberOfMatchesInSample); - } - if (data.NumberOfProfilesInSample != null) { - contents.NumberOfProfilesInSample = __expectLong(data.NumberOfProfilesInSample); - } - if (data.NumberOfProfilesWillBeMerged != null) { - contents.NumberOfProfilesWillBeMerged = __expectLong(data.NumberOfProfilesWillBeMerged); - } + const doc = take(data, { + DomainName: __expectString, + NumberOfMatchesInSample: __expectLong, + NumberOfProfilesInSample: __expectLong, + NumberOfProfilesWillBeMerged: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -2105,10 +2098,9 @@ const de_GetAutoMergingPreviewCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2128,33 +2120,18 @@ export const de_GetDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.DeadLetterQueueUrl != null) { - contents.DeadLetterQueueUrl = __expectString(data.DeadLetterQueueUrl); - } - if (data.DefaultEncryptionKey != null) { - contents.DefaultEncryptionKey = __expectString(data.DefaultEncryptionKey); - } - if (data.DefaultExpirationDays != null) { - contents.DefaultExpirationDays = __expectInt32(data.DefaultExpirationDays); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.Matching != null) { - contents.Matching = de_MatchingResponse(data.Matching, context); - } - if (data.Stats != null) { - contents.Stats = de_DomainStats(data.Stats, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeadLetterQueueUrl: __expectString, + DefaultEncryptionKey: __expectString, + DefaultExpirationDays: __expectInt32, + DomainName: __expectString, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Matching: (_) => de_MatchingResponse(_, context), + Stats: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2188,10 +2165,9 @@ const de_GetDomainCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2211,39 +2187,20 @@ export const de_GetIdentityResolutionJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AutoMerging != null) { - contents.AutoMerging = de_AutoMerging(data.AutoMerging, context); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.ExportingLocation != null) { - contents.ExportingLocation = de_ExportingLocation(data.ExportingLocation, context); - } - if (data.JobEndTime != null) { - contents.JobEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.JobEndTime))); - } - if (data.JobExpirationTime != null) { - contents.JobExpirationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.JobExpirationTime))); - } - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } - if (data.JobStartTime != null) { - contents.JobStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.JobStartTime))); - } - if (data.JobStats != null) { - contents.JobStats = de_JobStats(data.JobStats, context); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + AutoMerging: (_) => de_AutoMerging(_, context), + DomainName: __expectString, + ExportingLocation: _json, + JobEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobExpirationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobId: __expectString, + JobStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobStats: _json, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2277,10 +2234,9 @@ const de_GetIdentityResolutionJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2300,33 +2256,18 @@ export const de_GetIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.IsUnstructured != null) { - contents.IsUnstructured = __expectBoolean(data.IsUnstructured); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.ObjectTypeName != null) { - contents.ObjectTypeName = __expectString(data.ObjectTypeName); - } - if (data.ObjectTypeNames != null) { - contents.ObjectTypeNames = de_ObjectTypeNames(data.ObjectTypeNames, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.Uri != null) { - contents.Uri = __expectString(data.Uri); - } - if (data.WorkflowId != null) { - contents.WorkflowId = __expectString(data.WorkflowId); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + IsUnstructured: __expectBoolean, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectTypeName: __expectString, + ObjectTypeNames: _json, + Tags: _json, + Uri: __expectString, + WorkflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2360,10 +2301,9 @@ const de_GetIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2383,18 +2323,13 @@ export const de_GetMatchesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MatchGenerationDate != null) { - contents.MatchGenerationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.MatchGenerationDate))); - } - if (data.Matches != null) { - contents.Matches = de_MatchesList(data.Matches, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PotentialMatches != null) { - contents.PotentialMatches = __expectInt32(data.PotentialMatches); - } + const doc = take(data, { + MatchGenerationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Matches: (_) => de_MatchesList(_, context), + NextToken: __expectString, + PotentialMatches: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2428,10 +2363,9 @@ const de_GetMatchesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2451,42 +2385,21 @@ export const de_GetProfileObjectTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AllowProfileCreation != null) { - contents.AllowProfileCreation = __expectBoolean(data.AllowProfileCreation); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EncryptionKey != null) { - contents.EncryptionKey = __expectString(data.EncryptionKey); - } - if (data.ExpirationDays != null) { - contents.ExpirationDays = __expectInt32(data.ExpirationDays); - } - if (data.Fields != null) { - contents.Fields = de_FieldMap(data.Fields, context); - } - if (data.Keys != null) { - contents.Keys = de_KeyMap(data.Keys, context); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.ObjectTypeName != null) { - contents.ObjectTypeName = __expectString(data.ObjectTypeName); - } - if (data.SourceLastUpdatedTimestampFormat != null) { - contents.SourceLastUpdatedTimestampFormat = __expectString(data.SourceLastUpdatedTimestampFormat); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + AllowProfileCreation: __expectBoolean, + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EncryptionKey: __expectString, + ExpirationDays: __expectInt32, + Fields: _json, + Keys: _json, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectTypeName: __expectString, + SourceLastUpdatedTimestampFormat: __expectString, + Tags: _json, + TemplateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2520,10 +2433,9 @@ const de_GetProfileObjectTypeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2543,27 +2455,16 @@ export const de_GetProfileObjectTypeTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AllowProfileCreation != null) { - contents.AllowProfileCreation = __expectBoolean(data.AllowProfileCreation); - } - if (data.Fields != null) { - contents.Fields = de_FieldMap(data.Fields, context); - } - if (data.Keys != null) { - contents.Keys = de_KeyMap(data.Keys, context); - } - if (data.SourceLastUpdatedTimestampFormat != null) { - contents.SourceLastUpdatedTimestampFormat = __expectString(data.SourceLastUpdatedTimestampFormat); - } - if (data.SourceName != null) { - contents.SourceName = __expectString(data.SourceName); - } - if (data.SourceObject != null) { - contents.SourceObject = __expectString(data.SourceObject); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + AllowProfileCreation: __expectBoolean, + Fields: _json, + Keys: _json, + SourceLastUpdatedTimestampFormat: __expectString, + SourceName: __expectString, + SourceObject: __expectString, + TemplateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2597,10 +2498,9 @@ const de_GetProfileObjectTypeTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2620,30 +2520,17 @@ export const de_GetWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attributes != null) { - contents.Attributes = de_WorkflowAttributes(data.Attributes, context); - } - if (data.ErrorDescription != null) { - contents.ErrorDescription = __expectString(data.ErrorDescription); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.Metrics != null) { - contents.Metrics = de_WorkflowMetrics(data.Metrics, context); - } - if (data.StartDate != null) { - contents.StartDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartDate))); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.WorkflowId != null) { - contents.WorkflowId = __expectString(data.WorkflowId); - } - if (data.WorkflowType != null) { - contents.WorkflowType = __expectString(data.WorkflowType); - } + const doc = take(data, { + Attributes: _json, + ErrorDescription: __expectString, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metrics: _json, + StartDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + WorkflowId: __expectString, + WorkflowType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2677,10 +2564,9 @@ const de_GetWorkflowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2700,18 +2586,13 @@ export const de_GetWorkflowStepsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_WorkflowStepsList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkflowId != null) { - contents.WorkflowId = __expectString(data.WorkflowId); - } - if (data.WorkflowType != null) { - contents.WorkflowType = __expectString(data.WorkflowType); - } + const doc = take(data, { + Items: (_) => de_WorkflowStepsList(_, context), + NextToken: __expectString, + WorkflowId: __expectString, + WorkflowType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2745,10 +2626,9 @@ const de_GetWorkflowStepsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2768,12 +2648,11 @@ export const de_ListAccountIntegrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_IntegrationList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_IntegrationList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2807,10 +2686,9 @@ const de_ListAccountIntegrationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2830,12 +2708,11 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_DomainList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_DomainList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2869,10 +2746,9 @@ const de_ListDomainsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2892,12 +2768,11 @@ export const de_ListIdentityResolutionJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityResolutionJobsList != null) { - contents.IdentityResolutionJobsList = de_IdentityResolutionJobsList(data.IdentityResolutionJobsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + IdentityResolutionJobsList: (_) => de_IdentityResolutionJobsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2931,10 +2806,9 @@ const de_ListIdentityResolutionJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2954,12 +2828,11 @@ export const de_ListIntegrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_IntegrationList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_IntegrationList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2993,10 +2866,9 @@ const de_ListIntegrationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3016,12 +2888,11 @@ export const de_ListProfileObjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ProfileObjectList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3055,10 +2926,9 @@ const de_ListProfileObjectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3078,12 +2948,11 @@ export const de_ListProfileObjectTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ProfileObjectTypeList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_ProfileObjectTypeList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3117,10 +2986,9 @@ const de_ListProfileObjectTypesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3140,12 +3008,11 @@ export const de_ListProfileObjectTypeTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ProfileObjectTypeTemplateList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3179,10 +3046,9 @@ const de_ListProfileObjectTypeTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3202,9 +3068,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3232,10 +3099,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3255,12 +3121,11 @@ export const de_ListWorkflowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_WorkflowList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_WorkflowList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3294,10 +3159,9 @@ const de_ListWorkflowsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3317,9 +3181,10 @@ export const de_MergeProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3350,10 +3215,9 @@ const de_MergeProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3373,33 +3237,18 @@ export const de_PutIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.IsUnstructured != null) { - contents.IsUnstructured = __expectBoolean(data.IsUnstructured); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.ObjectTypeName != null) { - contents.ObjectTypeName = __expectString(data.ObjectTypeName); - } - if (data.ObjectTypeNames != null) { - contents.ObjectTypeNames = de_ObjectTypeNames(data.ObjectTypeNames, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.Uri != null) { - contents.Uri = __expectString(data.Uri); - } - if (data.WorkflowId != null) { - contents.WorkflowId = __expectString(data.WorkflowId); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + IsUnstructured: __expectBoolean, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectTypeName: __expectString, + ObjectTypeNames: _json, + Tags: _json, + Uri: __expectString, + WorkflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3433,10 +3282,9 @@ const de_PutIntegrationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3456,9 +3304,10 @@ export const de_PutProfileObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProfileObjectUniqueKey != null) { - contents.ProfileObjectUniqueKey = __expectString(data.ProfileObjectUniqueKey); - } + const doc = take(data, { + ProfileObjectUniqueKey: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3492,10 +3341,9 @@ const de_PutProfileObjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3515,42 +3363,21 @@ export const de_PutProfileObjectTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AllowProfileCreation != null) { - contents.AllowProfileCreation = __expectBoolean(data.AllowProfileCreation); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EncryptionKey != null) { - contents.EncryptionKey = __expectString(data.EncryptionKey); - } - if (data.ExpirationDays != null) { - contents.ExpirationDays = __expectInt32(data.ExpirationDays); - } - if (data.Fields != null) { - contents.Fields = de_FieldMap(data.Fields, context); - } - if (data.Keys != null) { - contents.Keys = de_KeyMap(data.Keys, context); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.ObjectTypeName != null) { - contents.ObjectTypeName = __expectString(data.ObjectTypeName); - } - if (data.SourceLastUpdatedTimestampFormat != null) { - contents.SourceLastUpdatedTimestampFormat = __expectString(data.SourceLastUpdatedTimestampFormat); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + AllowProfileCreation: __expectBoolean, + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EncryptionKey: __expectString, + ExpirationDays: __expectInt32, + Fields: _json, + Keys: _json, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectTypeName: __expectString, + SourceLastUpdatedTimestampFormat: __expectString, + Tags: _json, + TemplateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3584,10 +3411,9 @@ const de_PutProfileObjectTypeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3607,12 +3433,11 @@ export const de_SearchProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ProfileList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3646,10 +3471,9 @@ const de_SearchProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3696,10 +3520,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3746,10 +3569,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3769,30 +3591,17 @@ export const de_UpdateDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.DeadLetterQueueUrl != null) { - contents.DeadLetterQueueUrl = __expectString(data.DeadLetterQueueUrl); - } - if (data.DefaultEncryptionKey != null) { - contents.DefaultEncryptionKey = __expectString(data.DefaultEncryptionKey); - } - if (data.DefaultExpirationDays != null) { - contents.DefaultExpirationDays = __expectInt32(data.DefaultExpirationDays); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedAt))); - } - if (data.Matching != null) { - contents.Matching = de_MatchingResponse(data.Matching, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeadLetterQueueUrl: __expectString, + DefaultEncryptionKey: __expectString, + DefaultExpirationDays: __expectInt32, + DomainName: __expectString, + LastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Matching: (_) => de_MatchingResponse(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3826,10 +3635,9 @@ const de_UpdateDomainCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3849,9 +3657,10 @@ export const de_UpdateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProfileId != null) { - contents.ProfileId = __expectString(data.ProfileId); - } + const doc = take(data, { + ProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3885,16 +3694,15 @@ const de_UpdateProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3904,9 +3712,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3920,9 +3729,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3939,9 +3749,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3958,9 +3769,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3974,9 +3786,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3984,105 +3797,46 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdditionalSearchKey - */ -const se_AdditionalSearchKey = (input: AdditionalSearchKey, context: __SerdeContext): any => { - return { - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }), - }; -}; +// se_AdditionalSearchKey omitted. -/** - * serializeAws_restJson1additionalSearchKeysList - */ -const se_additionalSearchKeysList = (input: AdditionalSearchKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdditionalSearchKey(entry, context); - }); -}; +// se_additionalSearchKeysList omitted. -/** - * serializeAws_restJson1Address - */ -const se_Address = (input: Address, context: __SerdeContext): any => { - return { - ...(input.Address1 != null && { Address1: input.Address1 }), - ...(input.Address2 != null && { Address2: input.Address2 }), - ...(input.Address3 != null && { Address3: input.Address3 }), - ...(input.Address4 != null && { Address4: input.Address4 }), - ...(input.City != null && { City: input.City }), - ...(input.Country != null && { Country: input.Country }), - ...(input.County != null && { County: input.County }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.Province != null && { Province: input.Province }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_Address omitted. /** * serializeAws_restJson1AppflowIntegration */ const se_AppflowIntegration = (input: AppflowIntegration, context: __SerdeContext): any => { - return { - ...(input.Batches != null && { Batches: se_Batches(input.Batches, context) }), - ...(input.FlowDefinition != null && { FlowDefinition: se_FlowDefinition(input.FlowDefinition, context) }), - }; + return take(input, { + Batches: (_) => se_Batches(_, context), + FlowDefinition: (_) => se_FlowDefinition(_, context), + }); }; -/** - * serializeAws_restJson1Attributes - */ -const se_Attributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Attributes omitted. -/** - * serializeAws_restJson1AttributeSourceIdMap - */ -const se_AttributeSourceIdMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AttributeSourceIdMap omitted. /** * serializeAws_restJson1AutoMerging */ const se_AutoMerging = (input: AutoMerging, context: __SerdeContext): any => { - return { - ...(input.ConflictResolution != null && { - ConflictResolution: se_ConflictResolution(input.ConflictResolution, context), - }), - ...(input.Consolidation != null && { Consolidation: se_Consolidation(input.Consolidation, context) }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.MinAllowedConfidenceScoreForMerging != null && { - MinAllowedConfidenceScoreForMerging: __serializeFloat(input.MinAllowedConfidenceScoreForMerging), - }), - }; + return take(input, { + ConflictResolution: _json, + Consolidation: _json, + Enabled: [], + MinAllowedConfidenceScoreForMerging: __serializeFloat, + }); }; /** * serializeAws_restJson1Batch */ const se_Batch = (input: Batch, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -4096,618 +3850,184 @@ const se_Batches = (input: Batch[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1ConflictResolution - */ -const se_ConflictResolution = (input: ConflictResolution, context: __SerdeContext): any => { - return { - ...(input.ConflictResolvingModel != null && { ConflictResolvingModel: input.ConflictResolvingModel }), - ...(input.SourceName != null && { SourceName: input.SourceName }), - }; -}; +// se_ConflictResolution omitted. -/** - * serializeAws_restJson1ConnectorOperator - */ -const se_ConnectorOperator = (input: ConnectorOperator, context: __SerdeContext): any => { - return { - ...(input.Marketo != null && { Marketo: input.Marketo }), - ...(input.S3 != null && { S3: input.S3 }), - ...(input.Salesforce != null && { Salesforce: input.Salesforce }), - ...(input.ServiceNow != null && { ServiceNow: input.ServiceNow }), - ...(input.Zendesk != null && { Zendesk: input.Zendesk }), - }; -}; +// se_ConnectorOperator omitted. -/** - * serializeAws_restJson1Consolidation - */ -const se_Consolidation = (input: Consolidation, context: __SerdeContext): any => { - return { - ...(input.MatchingAttributesList != null && { - MatchingAttributesList: se_MatchingAttributesList(input.MatchingAttributesList, context), - }), - }; -}; +// se_Consolidation omitted. -/** - * serializeAws_restJson1ExportingConfig - */ -const se_ExportingConfig = (input: ExportingConfig, context: __SerdeContext): any => { - return { - ...(input.S3Exporting != null && { S3Exporting: se_S3ExportingConfig(input.S3Exporting, context) }), - }; -}; +// se_ExportingConfig omitted. -/** - * serializeAws_restJson1FieldMap - */ -const se_FieldMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ObjectTypeField(value, context); - return acc; - }, {}); -}; +// se_FieldMap omitted. -/** - * serializeAws_restJson1FieldNameList - */ -const se_FieldNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FieldNameList omitted. -/** - * serializeAws_restJson1FieldSourceProfileIds - */ -const se_FieldSourceProfileIds = (input: FieldSourceProfileIds, context: __SerdeContext): any => { - return { - ...(input.AccountNumber != null && { AccountNumber: input.AccountNumber }), - ...(input.AdditionalInformation != null && { AdditionalInformation: input.AdditionalInformation }), - ...(input.Address != null && { Address: input.Address }), - ...(input.Attributes != null && { Attributes: se_AttributeSourceIdMap(input.Attributes, context) }), - ...(input.BillingAddress != null && { BillingAddress: input.BillingAddress }), - ...(input.BirthDate != null && { BirthDate: input.BirthDate }), - ...(input.BusinessEmailAddress != null && { BusinessEmailAddress: input.BusinessEmailAddress }), - ...(input.BusinessName != null && { BusinessName: input.BusinessName }), - ...(input.BusinessPhoneNumber != null && { BusinessPhoneNumber: input.BusinessPhoneNumber }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.Gender != null && { Gender: input.Gender }), - ...(input.HomePhoneNumber != null && { HomePhoneNumber: input.HomePhoneNumber }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.MailingAddress != null && { MailingAddress: input.MailingAddress }), - ...(input.MiddleName != null && { MiddleName: input.MiddleName }), - ...(input.MobilePhoneNumber != null && { MobilePhoneNumber: input.MobilePhoneNumber }), - ...(input.PartyType != null && { PartyType: input.PartyType }), - ...(input.PersonalEmailAddress != null && { PersonalEmailAddress: input.PersonalEmailAddress }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.ShippingAddress != null && { ShippingAddress: input.ShippingAddress }), - }; -}; +// se_FieldSourceProfileIds omitted. /** * serializeAws_restJson1FlowDefinition */ const se_FlowDefinition = (input: FlowDefinition, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FlowName != null && { FlowName: input.FlowName }), - ...(input.KmsArn != null && { KmsArn: input.KmsArn }), - ...(input.SourceFlowConfig != null && { SourceFlowConfig: se_SourceFlowConfig(input.SourceFlowConfig, context) }), - ...(input.Tasks != null && { Tasks: se_Tasks(input.Tasks, context) }), - ...(input.TriggerConfig != null && { TriggerConfig: se_TriggerConfig(input.TriggerConfig, context) }), - }; + return take(input, { + Description: [], + FlowName: [], + KmsArn: [], + SourceFlowConfig: _json, + Tasks: _json, + TriggerConfig: (_) => se_TriggerConfig(_, context), + }); }; -/** - * serializeAws_restJson1IncrementalPullConfig - */ -const se_IncrementalPullConfig = (input: IncrementalPullConfig, context: __SerdeContext): any => { - return { - ...(input.DatetimeTypeFieldName != null && { DatetimeTypeFieldName: input.DatetimeTypeFieldName }), - }; -}; +// se_IncrementalPullConfig omitted. /** * serializeAws_restJson1IntegrationConfig */ const se_IntegrationConfig = (input: IntegrationConfig, context: __SerdeContext): any => { - return { - ...(input.AppflowIntegration != null && { - AppflowIntegration: se_AppflowIntegration(input.AppflowIntegration, context), - }), - }; + return take(input, { + AppflowIntegration: (_) => se_AppflowIntegration(_, context), + }); }; -/** - * serializeAws_restJson1JobSchedule - */ -const se_JobSchedule = (input: JobSchedule, context: __SerdeContext): any => { - return { - ...(input.DayOfTheWeek != null && { DayOfTheWeek: input.DayOfTheWeek }), - ...(input.Time != null && { Time: input.Time }), - }; -}; +// se_JobSchedule omitted. -/** - * serializeAws_restJson1KeyMap - */ -const se_KeyMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ObjectTypeKeyList(value, context); - return acc; - }, {}); -}; +// se_KeyMap omitted. -/** - * serializeAws_restJson1MarketoSourceProperties - */ -const se_MarketoSourceProperties = (input: MarketoSourceProperties, context: __SerdeContext): any => { - return { - ...(input.Object != null && { Object: input.Object }), - }; -}; +// se_MarketoSourceProperties omitted. -/** - * serializeAws_restJson1MatchingAttributes - */ -const se_MatchingAttributes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MatchingAttributes omitted. -/** - * serializeAws_restJson1MatchingAttributesList - */ -const se_MatchingAttributesList = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MatchingAttributes(entry, context); - }); -}; +// se_MatchingAttributesList omitted. /** * serializeAws_restJson1MatchingRequest */ const se_MatchingRequest = (input: MatchingRequest, context: __SerdeContext): any => { - return { - ...(input.AutoMerging != null && { AutoMerging: se_AutoMerging(input.AutoMerging, context) }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.ExportingConfig != null && { ExportingConfig: se_ExportingConfig(input.ExportingConfig, context) }), - ...(input.JobSchedule != null && { JobSchedule: se_JobSchedule(input.JobSchedule, context) }), - }; + return take(input, { + AutoMerging: (_) => se_AutoMerging(_, context), + Enabled: [], + ExportingConfig: _json, + JobSchedule: _json, + }); }; -/** - * serializeAws_restJson1ObjectFilter - */ -const se_ObjectFilter = (input: ObjectFilter, context: __SerdeContext): any => { - return { - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.Values != null && { Values: se_requestValueList(input.Values, context) }), - }; -}; +// se_ObjectFilter omitted. -/** - * serializeAws_restJson1ObjectTypeField - */ -const se_ObjectTypeField = (input: ObjectTypeField, context: __SerdeContext): any => { - return { - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Target != null && { Target: input.Target }), - }; -}; +// se_ObjectTypeField omitted. -/** - * serializeAws_restJson1ObjectTypeKey - */ -const se_ObjectTypeKey = (input: ObjectTypeKey, context: __SerdeContext): any => { - return { - ...(input.FieldNames != null && { FieldNames: se_FieldNameList(input.FieldNames, context) }), - ...(input.StandardIdentifiers != null && { - StandardIdentifiers: se_StandardIdentifierList(input.StandardIdentifiers, context), - }), - }; -}; +// se_ObjectTypeKey omitted. -/** - * serializeAws_restJson1ObjectTypeKeyList - */ -const se_ObjectTypeKeyList = (input: ObjectTypeKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ObjectTypeKey(entry, context); - }); -}; +// se_ObjectTypeKeyList omitted. -/** - * serializeAws_restJson1ObjectTypeNames - */ -const se_ObjectTypeNames = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ObjectTypeNames omitted. -/** - * serializeAws_restJson1ProfileIdToBeMergedList - */ -const se_ProfileIdToBeMergedList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ProfileIdToBeMergedList omitted. -/** - * serializeAws_restJson1requestValueList - */ -const se_requestValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_requestValueList omitted. -/** - * serializeAws_restJson1S3ExportingConfig - */ -const se_S3ExportingConfig = (input: S3ExportingConfig, context: __SerdeContext): any => { - return { - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyName != null && { S3KeyName: input.S3KeyName }), - }; -}; +// se_S3ExportingConfig omitted. -/** - * serializeAws_restJson1S3SourceProperties - */ -const se_S3SourceProperties = (input: S3SourceProperties, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.BucketPrefix != null && { BucketPrefix: input.BucketPrefix }), - }; -}; +// se_S3SourceProperties omitted. -/** - * serializeAws_restJson1SalesforceSourceProperties - */ -const se_SalesforceSourceProperties = (input: SalesforceSourceProperties, context: __SerdeContext): any => { - return { - ...(input.EnableDynamicFieldUpdate != null && { EnableDynamicFieldUpdate: input.EnableDynamicFieldUpdate }), - ...(input.IncludeDeletedRecords != null && { IncludeDeletedRecords: input.IncludeDeletedRecords }), - ...(input.Object != null && { Object: input.Object }), - }; -}; +// se_SalesforceSourceProperties omitted. /** * serializeAws_restJson1ScheduledTriggerProperties */ const se_ScheduledTriggerProperties = (input: ScheduledTriggerProperties, context: __SerdeContext): any => { - return { - ...(input.DataPullMode != null && { DataPullMode: input.DataPullMode }), - ...(input.FirstExecutionFrom != null && { - FirstExecutionFrom: Math.round(input.FirstExecutionFrom.getTime() / 1000), - }), - ...(input.ScheduleEndTime != null && { ScheduleEndTime: Math.round(input.ScheduleEndTime.getTime() / 1000) }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }), - ...(input.ScheduleStartTime != null && { ScheduleStartTime: Math.round(input.ScheduleStartTime.getTime() / 1000) }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }; + return take(input, { + DataPullMode: [], + FirstExecutionFrom: (_) => Math.round(_.getTime() / 1000), + ScheduleEndTime: (_) => Math.round(_.getTime() / 1000), + ScheduleExpression: [], + ScheduleOffset: [], + ScheduleStartTime: (_) => Math.round(_.getTime() / 1000), + Timezone: [], + }); }; -/** - * serializeAws_restJson1ServiceNowSourceProperties - */ -const se_ServiceNowSourceProperties = (input: ServiceNowSourceProperties, context: __SerdeContext): any => { - return { - ...(input.Object != null && { Object: input.Object }), - }; -}; +// se_ServiceNowSourceProperties omitted. -/** - * serializeAws_restJson1SourceConnectorProperties - */ -const se_SourceConnectorProperties = (input: SourceConnectorProperties, context: __SerdeContext): any => { - return { - ...(input.Marketo != null && { Marketo: se_MarketoSourceProperties(input.Marketo, context) }), - ...(input.S3 != null && { S3: se_S3SourceProperties(input.S3, context) }), - ...(input.Salesforce != null && { Salesforce: se_SalesforceSourceProperties(input.Salesforce, context) }), - ...(input.ServiceNow != null && { ServiceNow: se_ServiceNowSourceProperties(input.ServiceNow, context) }), - ...(input.Zendesk != null && { Zendesk: se_ZendeskSourceProperties(input.Zendesk, context) }), - }; -}; +// se_SourceConnectorProperties omitted. -/** - * serializeAws_restJson1SourceFields - */ -const se_SourceFields = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SourceFields omitted. -/** - * serializeAws_restJson1SourceFlowConfig - */ -const se_SourceFlowConfig = (input: SourceFlowConfig, context: __SerdeContext): any => { - return { - ...(input.ConnectorProfileName != null && { ConnectorProfileName: input.ConnectorProfileName }), - ...(input.ConnectorType != null && { ConnectorType: input.ConnectorType }), - ...(input.IncrementalPullConfig != null && { - IncrementalPullConfig: se_IncrementalPullConfig(input.IncrementalPullConfig, context), - }), - ...(input.SourceConnectorProperties != null && { - SourceConnectorProperties: se_SourceConnectorProperties(input.SourceConnectorProperties, context), - }), - }; -}; +// se_SourceFlowConfig omitted. -/** - * serializeAws_restJson1StandardIdentifierList - */ -const se_StandardIdentifierList = (input: (StandardIdentifier | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StandardIdentifierList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1Task - */ -const se_Task = (input: Task, context: __SerdeContext): any => { - return { - ...(input.ConnectorOperator != null && { - ConnectorOperator: se_ConnectorOperator(input.ConnectorOperator, context), - }), - ...(input.DestinationField != null && { DestinationField: input.DestinationField }), - ...(input.SourceFields != null && { SourceFields: se_SourceFields(input.SourceFields, context) }), - ...(input.TaskProperties != null && { TaskProperties: se_TaskPropertiesMap(input.TaskProperties, context) }), - ...(input.TaskType != null && { TaskType: input.TaskType }), - }; -}; +// se_Task omitted. -/** - * serializeAws_restJson1TaskPropertiesMap - */ -const se_TaskPropertiesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [OperatorPropertiesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; +// se_TaskPropertiesMap omitted. -/** - * serializeAws_restJson1Tasks - */ -const se_Tasks = (input: Task[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Task(entry, context); - }); -}; +// se_Tasks omitted. /** * serializeAws_restJson1TriggerConfig */ const se_TriggerConfig = (input: TriggerConfig, context: __SerdeContext): any => { - return { - ...(input.TriggerProperties != null && { - TriggerProperties: se_TriggerProperties(input.TriggerProperties, context), - }), - ...(input.TriggerType != null && { TriggerType: input.TriggerType }), - }; + return take(input, { + TriggerProperties: (_) => se_TriggerProperties(_, context), + TriggerType: [], + }); }; /** * serializeAws_restJson1TriggerProperties */ const se_TriggerProperties = (input: TriggerProperties, context: __SerdeContext): any => { - return { - ...(input.Scheduled != null && { Scheduled: se_ScheduledTriggerProperties(input.Scheduled, context) }), - }; + return take(input, { + Scheduled: (_) => se_ScheduledTriggerProperties(_, context), + }); }; -/** - * serializeAws_restJson1UpdateAddress - */ -const se_UpdateAddress = (input: UpdateAddress, context: __SerdeContext): any => { - return { - ...(input.Address1 != null && { Address1: input.Address1 }), - ...(input.Address2 != null && { Address2: input.Address2 }), - ...(input.Address3 != null && { Address3: input.Address3 }), - ...(input.Address4 != null && { Address4: input.Address4 }), - ...(input.City != null && { City: input.City }), - ...(input.Country != null && { Country: input.Country }), - ...(input.County != null && { County: input.County }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.Province != null && { Province: input.Province }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_UpdateAddress omitted. -/** - * serializeAws_restJson1UpdateAttributes - */ -const se_UpdateAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_UpdateAttributes omitted. -/** - * serializeAws_restJson1ZendeskSourceProperties - */ -const se_ZendeskSourceProperties = (input: ZendeskSourceProperties, context: __SerdeContext): any => { - return { - ...(input.Object != null && { Object: input.Object }), - }; -}; +// se_ZendeskSourceProperties omitted. -/** - * deserializeAws_restJson1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - Address1: __expectString(output.Address1), - Address2: __expectString(output.Address2), - Address3: __expectString(output.Address3), - Address4: __expectString(output.Address4), - City: __expectString(output.City), - Country: __expectString(output.Country), - County: __expectString(output.County), - PostalCode: __expectString(output.PostalCode), - Province: __expectString(output.Province), - State: __expectString(output.State), - } as any; -}; +// de_Address omitted. -/** - * deserializeAws_restJson1AppflowIntegrationWorkflowAttributes - */ -const de_AppflowIntegrationWorkflowAttributes = ( - output: any, - context: __SerdeContext -): AppflowIntegrationWorkflowAttributes => { - return { - ConnectorProfileName: __expectString(output.ConnectorProfileName), - RoleArn: __expectString(output.RoleArn), - SourceConnectorType: __expectString(output.SourceConnectorType), - } as any; -}; +// de_AppflowIntegrationWorkflowAttributes omitted. -/** - * deserializeAws_restJson1AppflowIntegrationWorkflowMetrics - */ -const de_AppflowIntegrationWorkflowMetrics = ( - output: any, - context: __SerdeContext -): AppflowIntegrationWorkflowMetrics => { - return { - RecordsProcessed: __expectLong(output.RecordsProcessed), - StepsCompleted: __expectLong(output.StepsCompleted), - TotalSteps: __expectLong(output.TotalSteps), - } as any; -}; +// de_AppflowIntegrationWorkflowMetrics omitted. /** * deserializeAws_restJson1AppflowIntegrationWorkflowStep */ const de_AppflowIntegrationWorkflowStep = (output: any, context: __SerdeContext): AppflowIntegrationWorkflowStep => { - return { - BatchRecordsEndTime: __expectString(output.BatchRecordsEndTime), - BatchRecordsStartTime: __expectString(output.BatchRecordsStartTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ExecutionMessage: __expectString(output.ExecutionMessage), - FlowName: __expectString(output.FlowName), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - RecordsProcessed: __expectLong(output.RecordsProcessed), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + BatchRecordsEndTime: __expectString, + BatchRecordsStartTime: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionMessage: __expectString, + FlowName: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RecordsProcessed: __expectLong, + Status: __expectString, + }) as any; }; +// de_Attributes omitted. + /** * deserializeAws_restJson1AutoMerging */ const de_AutoMerging = (output: any, context: __SerdeContext): AutoMerging => { - return { - ConflictResolution: - output.ConflictResolution != null ? de_ConflictResolution(output.ConflictResolution, context) : undefined, - Consolidation: output.Consolidation != null ? de_Consolidation(output.Consolidation, context) : undefined, - Enabled: __expectBoolean(output.Enabled), - MinAllowedConfidenceScoreForMerging: __limitedParseDouble(output.MinAllowedConfidenceScoreForMerging), - } as any; + return take(output, { + ConflictResolution: _json, + Consolidation: _json, + Enabled: __expectBoolean, + MinAllowedConfidenceScoreForMerging: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1ConflictResolution - */ -const de_ConflictResolution = (output: any, context: __SerdeContext): ConflictResolution => { - return { - ConflictResolvingModel: __expectString(output.ConflictResolvingModel), - SourceName: __expectString(output.SourceName), - } as any; -}; +// de_ConflictResolution omitted. -/** - * deserializeAws_restJson1Consolidation - */ -const de_Consolidation = (output: any, context: __SerdeContext): Consolidation => { - return { - MatchingAttributesList: - output.MatchingAttributesList != null - ? de_MatchingAttributesList(output.MatchingAttributesList, context) - : undefined, - } as any; -}; +// de_Consolidation omitted. /** * deserializeAws_restJson1DomainList @@ -4716,116 +4036,39 @@ const de_DomainList = (output: any, context: __SerdeContext): ListDomainItem[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListDomainItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DomainStats - */ -const de_DomainStats = (output: any, context: __SerdeContext): DomainStats => { - return { - MeteringProfileCount: __expectLong(output.MeteringProfileCount), - ObjectCount: __expectLong(output.ObjectCount), - ProfileCount: __expectLong(output.ProfileCount), - TotalSize: __expectLong(output.TotalSize), - } as any; -}; +// de_DomainStats omitted. -/** - * deserializeAws_restJson1ExportingConfig - */ -const de_ExportingConfig = (output: any, context: __SerdeContext): ExportingConfig => { - return { - S3Exporting: output.S3Exporting != null ? de_S3ExportingConfig(output.S3Exporting, context) : undefined, - } as any; -}; +// de_ExportingConfig omitted. -/** - * deserializeAws_restJson1ExportingLocation - */ -const de_ExportingLocation = (output: any, context: __SerdeContext): ExportingLocation => { - return { - S3Exporting: output.S3Exporting != null ? de_S3ExportingLocation(output.S3Exporting, context) : undefined, - } as any; -}; +// de_ExportingLocation omitted. -/** - * deserializeAws_restJson1FieldMap - */ -const de_FieldMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ObjectTypeField(value, context); - return acc; - }, {}); -}; +// de_FieldMap omitted. -/** - * deserializeAws_restJson1FieldNameList - */ -const de_FieldNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FieldNameList omitted. -/** - * deserializeAws_restJson1FoundByKeyValue - */ -const de_FoundByKeyValue = (output: any, context: __SerdeContext): FoundByKeyValue => { - return { - KeyName: __expectString(output.KeyName), - Values: output.Values != null ? de_requestValueList(output.Values, context) : undefined, - } as any; -}; +// de_FoundByKeyValue omitted. -/** - * deserializeAws_restJson1foundByList - */ -const de_foundByList = (output: any, context: __SerdeContext): FoundByKeyValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FoundByKeyValue(entry, context); - }); - return retVal; -}; +// de_foundByList omitted. /** * deserializeAws_restJson1IdentityResolutionJob */ const de_IdentityResolutionJob = (output: any, context: __SerdeContext): IdentityResolutionJob => { - return { - DomainName: __expectString(output.DomainName), - ExportingLocation: - output.ExportingLocation != null ? de_ExportingLocation(output.ExportingLocation, context) : undefined, - JobEndTime: - output.JobEndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.JobEndTime))) : undefined, - JobId: __expectString(output.JobId), - JobStartTime: - output.JobStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.JobStartTime))) - : undefined, - JobStats: output.JobStats != null ? de_JobStats(output.JobStats, context) : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; + return take(output, { + DomainName: __expectString, + ExportingLocation: _json, + JobEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobId: __expectString, + JobStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobStats: _json, + Message: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4835,9 +4078,6 @@ const de_IdentityResolutionJobsList = (output: any, context: __SerdeContext): Id const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IdentityResolutionJob(entry, context); }); return retVal; @@ -4850,143 +4090,75 @@ const de_IntegrationList = (output: any, context: __SerdeContext): ListIntegrati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListIntegrationItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1JobSchedule - */ -const de_JobSchedule = (output: any, context: __SerdeContext): JobSchedule => { - return { - DayOfTheWeek: __expectString(output.DayOfTheWeek), - Time: __expectString(output.Time), - } as any; -}; +// de_JobSchedule omitted. -/** - * deserializeAws_restJson1JobStats - */ -const de_JobStats = (output: any, context: __SerdeContext): JobStats => { - return { - NumberOfMatchesFound: __expectLong(output.NumberOfMatchesFound), - NumberOfMergesDone: __expectLong(output.NumberOfMergesDone), - NumberOfProfilesReviewed: __expectLong(output.NumberOfProfilesReviewed), - } as any; -}; +// de_JobStats omitted. -/** - * deserializeAws_restJson1KeyMap - */ -const de_KeyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ObjectTypeKeyList(value, context); - return acc; - }, {}); -}; +// de_KeyMap omitted. /** * deserializeAws_restJson1ListDomainItem */ const de_ListDomainItem = (output: any, context: __SerdeContext): ListDomainItem => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainName: __expectString(output.DomainName), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + }) as any; }; /** * deserializeAws_restJson1ListIntegrationItem */ const de_ListIntegrationItem = (output: any, context: __SerdeContext): ListIntegrationItem => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainName: __expectString(output.DomainName), - IsUnstructured: __expectBoolean(output.IsUnstructured), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - ObjectTypeName: __expectString(output.ObjectTypeName), - ObjectTypeNames: output.ObjectTypeNames != null ? de_ObjectTypeNames(output.ObjectTypeNames, context) : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Uri: __expectString(output.Uri), - WorkflowId: __expectString(output.WorkflowId), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + IsUnstructured: __expectBoolean, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectTypeName: __expectString, + ObjectTypeNames: _json, + Tags: _json, + Uri: __expectString, + WorkflowId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ListProfileObjectsItem - */ -const de_ListProfileObjectsItem = (output: any, context: __SerdeContext): ListProfileObjectsItem => { - return { - Object: __expectString(output.Object), - ObjectTypeName: __expectString(output.ObjectTypeName), - ProfileObjectUniqueKey: __expectString(output.ProfileObjectUniqueKey), - } as any; -}; +// de_ListProfileObjectsItem omitted. /** * deserializeAws_restJson1ListProfileObjectTypeItem */ const de_ListProfileObjectTypeItem = (output: any, context: __SerdeContext): ListProfileObjectTypeItem => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - ObjectTypeName: __expectString(output.ObjectTypeName), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectTypeName: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1ListProfileObjectTypeTemplateItem - */ -const de_ListProfileObjectTypeTemplateItem = ( - output: any, - context: __SerdeContext -): ListProfileObjectTypeTemplateItem => { - return { - SourceName: __expectString(output.SourceName), - SourceObject: __expectString(output.SourceObject), - TemplateId: __expectString(output.TemplateId), - } as any; -}; +// de_ListProfileObjectTypeTemplateItem omitted. /** * deserializeAws_restJson1ListWorkflowsItem */ const de_ListWorkflowsItem = (output: any, context: __SerdeContext): ListWorkflowsItem => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - Status: __expectString(output.Status), - StatusDescription: __expectString(output.StatusDescription), - WorkflowId: __expectString(output.WorkflowId), - WorkflowType: __expectString(output.WorkflowType), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDescription: __expectString, + WorkflowId: __expectString, + WorkflowType: __expectString, + }) as any; }; /** @@ -4996,194 +4168,53 @@ const de_MatchesList = (output: any, context: __SerdeContext): MatchItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MatchItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MatchingAttributes - */ -const de_MatchingAttributes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MatchingAttributes omitted. -/** - * deserializeAws_restJson1MatchingAttributesList - */ -const de_MatchingAttributesList = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MatchingAttributes(entry, context); - }); - return retVal; -}; +// de_MatchingAttributesList omitted. /** * deserializeAws_restJson1MatchingResponse */ const de_MatchingResponse = (output: any, context: __SerdeContext): MatchingResponse => { - return { - AutoMerging: output.AutoMerging != null ? de_AutoMerging(output.AutoMerging, context) : undefined, - Enabled: __expectBoolean(output.Enabled), - ExportingConfig: output.ExportingConfig != null ? de_ExportingConfig(output.ExportingConfig, context) : undefined, - JobSchedule: output.JobSchedule != null ? de_JobSchedule(output.JobSchedule, context) : undefined, - } as any; + return take(output, { + AutoMerging: (_: any) => de_AutoMerging(_, context), + Enabled: __expectBoolean, + ExportingConfig: _json, + JobSchedule: _json, + }) as any; }; /** * deserializeAws_restJson1MatchItem */ const de_MatchItem = (output: any, context: __SerdeContext): MatchItem => { - return { - ConfidenceScore: __limitedParseDouble(output.ConfidenceScore), - MatchId: __expectString(output.MatchId), - ProfileIds: output.ProfileIds != null ? de_ProfileIdList(output.ProfileIds, context) : undefined, - } as any; + return take(output, { + ConfidenceScore: __limitedParseDouble, + MatchId: __expectString, + ProfileIds: _json, + }) as any; }; -/** - * deserializeAws_restJson1ObjectTypeField - */ -const de_ObjectTypeField = (output: any, context: __SerdeContext): ObjectTypeField => { - return { - ContentType: __expectString(output.ContentType), - Source: __expectString(output.Source), - Target: __expectString(output.Target), - } as any; -}; +// de_ObjectTypeField omitted. -/** - * deserializeAws_restJson1ObjectTypeKey - */ -const de_ObjectTypeKey = (output: any, context: __SerdeContext): ObjectTypeKey => { - return { - FieldNames: output.FieldNames != null ? de_FieldNameList(output.FieldNames, context) : undefined, - StandardIdentifiers: - output.StandardIdentifiers != null ? de_StandardIdentifierList(output.StandardIdentifiers, context) : undefined, - } as any; -}; +// de_ObjectTypeKey omitted. -/** - * deserializeAws_restJson1ObjectTypeKeyList - */ -const de_ObjectTypeKeyList = (output: any, context: __SerdeContext): ObjectTypeKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ObjectTypeKey(entry, context); - }); - return retVal; -}; +// de_ObjectTypeKeyList omitted. -/** - * deserializeAws_restJson1ObjectTypeNames - */ -const de_ObjectTypeNames = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1Profile - */ -const de_Profile = (output: any, context: __SerdeContext): Profile => { - return { - AccountNumber: __expectString(output.AccountNumber), - AdditionalInformation: __expectString(output.AdditionalInformation), - Address: output.Address != null ? de_Address(output.Address, context) : undefined, - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - BillingAddress: output.BillingAddress != null ? de_Address(output.BillingAddress, context) : undefined, - BirthDate: __expectString(output.BirthDate), - BusinessEmailAddress: __expectString(output.BusinessEmailAddress), - BusinessName: __expectString(output.BusinessName), - BusinessPhoneNumber: __expectString(output.BusinessPhoneNumber), - EmailAddress: __expectString(output.EmailAddress), - FirstName: __expectString(output.FirstName), - FoundByItems: output.FoundByItems != null ? de_foundByList(output.FoundByItems, context) : undefined, - Gender: __expectString(output.Gender), - GenderString: __expectString(output.GenderString), - HomePhoneNumber: __expectString(output.HomePhoneNumber), - LastName: __expectString(output.LastName), - MailingAddress: output.MailingAddress != null ? de_Address(output.MailingAddress, context) : undefined, - MiddleName: __expectString(output.MiddleName), - MobilePhoneNumber: __expectString(output.MobilePhoneNumber), - PartyType: __expectString(output.PartyType), - PartyTypeString: __expectString(output.PartyTypeString), - PersonalEmailAddress: __expectString(output.PersonalEmailAddress), - PhoneNumber: __expectString(output.PhoneNumber), - ProfileId: __expectString(output.ProfileId), - ShippingAddress: output.ShippingAddress != null ? de_Address(output.ShippingAddress, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ProfileIdList - */ -const de_ProfileIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ObjectTypeNames omitted. -/** - * deserializeAws_restJson1ProfileList - */ -const de_ProfileList = (output: any, context: __SerdeContext): Profile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Profile(entry, context); - }); - return retVal; -}; +// de_Profile omitted. -/** - * deserializeAws_restJson1ProfileObjectList - */ -const de_ProfileObjectList = (output: any, context: __SerdeContext): ListProfileObjectsItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListProfileObjectsItem(entry, context); - }); - return retVal; -}; +// de_ProfileIdList omitted. + +// de_ProfileList omitted. + +// de_ProfileObjectList omitted. /** * deserializeAws_restJson1ProfileObjectTypeList @@ -5192,106 +4223,24 @@ const de_ProfileObjectTypeList = (output: any, context: __SerdeContext): ListPro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListProfileObjectTypeItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ProfileObjectTypeTemplateList - */ -const de_ProfileObjectTypeTemplateList = ( - output: any, - context: __SerdeContext -): ListProfileObjectTypeTemplateItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListProfileObjectTypeTemplateItem(entry, context); - }); - return retVal; -}; +// de_ProfileObjectTypeTemplateList omitted. -/** - * deserializeAws_restJson1requestValueList - */ -const de_requestValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_requestValueList omitted. -/** - * deserializeAws_restJson1S3ExportingConfig - */ -const de_S3ExportingConfig = (output: any, context: __SerdeContext): S3ExportingConfig => { - return { - S3BucketName: __expectString(output.S3BucketName), - S3KeyName: __expectString(output.S3KeyName), - } as any; -}; +// de_S3ExportingConfig omitted. -/** - * deserializeAws_restJson1S3ExportingLocation - */ -const de_S3ExportingLocation = (output: any, context: __SerdeContext): S3ExportingLocation => { - return { - S3BucketName: __expectString(output.S3BucketName), - S3KeyName: __expectString(output.S3KeyName), - } as any; -}; +// de_S3ExportingLocation omitted. -/** - * deserializeAws_restJson1StandardIdentifierList - */ -const de_StandardIdentifierList = (output: any, context: __SerdeContext): (StandardIdentifier | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StandardIdentifierList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1WorkflowAttributes - */ -const de_WorkflowAttributes = (output: any, context: __SerdeContext): WorkflowAttributes => { - return { - AppflowIntegration: - output.AppflowIntegration != null - ? de_AppflowIntegrationWorkflowAttributes(output.AppflowIntegration, context) - : undefined, - } as any; -}; +// de_WorkflowAttributes omitted. /** * deserializeAws_restJson1WorkflowList @@ -5300,36 +4249,20 @@ const de_WorkflowList = (output: any, context: __SerdeContext): ListWorkflowsIte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListWorkflowsItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1WorkflowMetrics - */ -const de_WorkflowMetrics = (output: any, context: __SerdeContext): WorkflowMetrics => { - return { - AppflowIntegration: - output.AppflowIntegration != null - ? de_AppflowIntegrationWorkflowMetrics(output.AppflowIntegration, context) - : undefined, - } as any; -}; +// de_WorkflowMetrics omitted. /** * deserializeAws_restJson1WorkflowStepItem */ const de_WorkflowStepItem = (output: any, context: __SerdeContext): WorkflowStepItem => { - return { - AppflowIntegration: - output.AppflowIntegration != null - ? de_AppflowIntegrationWorkflowStep(output.AppflowIntegration, context) - : undefined, - } as any; + return take(output, { + AppflowIntegration: (_: any) => de_AppflowIntegrationWorkflowStep(_, context), + }) as any; }; /** @@ -5339,9 +4272,6 @@ const de_WorkflowStepsList = (output: any, context: __SerdeContext): WorkflowSte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkflowStepItem(entry, context); }); return retVal; diff --git a/clients/client-data-pipeline/src/protocols/Aws_json1_1.ts b/clients/client-data-pipeline/src/protocols/Aws_json1_1.ts index dee645d1a50c..cd541e62fa94 100644 --- a/clients/client-data-pipeline/src/protocols/Aws_json1_1.ts +++ b/clients/client-data-pipeline/src/protocols/Aws_json1_1.ts @@ -1,10 +1,10 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectString as __expectString, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -47,61 +47,39 @@ import { import { DataPipelineServiceException as __BaseException } from "../models/DataPipelineServiceException"; import { ActivatePipelineInput, - ActivatePipelineOutput, AddTagsInput, - AddTagsOutput, CreatePipelineInput, - CreatePipelineOutput, DeactivatePipelineInput, - DeactivatePipelineOutput, DeletePipelineInput, DescribeObjectsInput, - DescribeObjectsOutput, DescribePipelinesInput, - DescribePipelinesOutput, EvaluateExpressionInput, - EvaluateExpressionOutput, Field, GetPipelineDefinitionInput, - GetPipelineDefinitionOutput, InstanceIdentity, InternalServiceError, InvalidRequestException, ListPipelinesInput, - ListPipelinesOutput, Operator, ParameterAttribute, ParameterObject, ParameterValue, PipelineDeletedException, - PipelineDescription, - PipelineIdName, PipelineNotFoundException, PipelineObject, PollForTaskInput, - PollForTaskOutput, PutPipelineDefinitionInput, - PutPipelineDefinitionOutput, Query, QueryObjectsInput, - QueryObjectsOutput, RemoveTagsInput, - RemoveTagsOutput, ReportTaskProgressInput, - ReportTaskProgressOutput, ReportTaskRunnerHeartbeatInput, - ReportTaskRunnerHeartbeatOutput, Selector, SetStatusInput, SetTaskStatusInput, - SetTaskStatusOutput, Tag, TaskNotFoundException, - TaskObject, ValidatePipelineDefinitionInput, - ValidatePipelineDefinitionOutput, - ValidationError, - ValidationWarning, } from "../models/models_0"; /** @@ -126,7 +104,7 @@ export const se_AddTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTags"); let body: any; - body = JSON.stringify(se_AddTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -139,7 +117,7 @@ export const se_CreatePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePipeline"); let body: any; - body = JSON.stringify(se_CreatePipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -152,7 +130,7 @@ export const se_DeactivatePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeactivatePipeline"); let body: any; - body = JSON.stringify(se_DeactivatePipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -165,7 +143,7 @@ export const se_DeletePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePipeline"); let body: any; - body = JSON.stringify(se_DeletePipelineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -178,7 +156,7 @@ export const se_DescribeObjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeObjects"); let body: any; - body = JSON.stringify(se_DescribeObjectsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -191,7 +169,7 @@ export const se_DescribePipelinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePipelines"); let body: any; - body = JSON.stringify(se_DescribePipelinesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -204,7 +182,7 @@ export const se_EvaluateExpressionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EvaluateExpression"); let body: any; - body = JSON.stringify(se_EvaluateExpressionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -217,7 +195,7 @@ export const se_GetPipelineDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPipelineDefinition"); let body: any; - body = JSON.stringify(se_GetPipelineDefinitionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -230,7 +208,7 @@ export const se_ListPipelinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPipelines"); let body: any; - body = JSON.stringify(se_ListPipelinesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -243,7 +221,7 @@ export const se_PollForTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PollForTask"); let body: any; - body = JSON.stringify(se_PollForTaskInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -256,7 +234,7 @@ export const se_PutPipelineDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPipelineDefinition"); let body: any; - body = JSON.stringify(se_PutPipelineDefinitionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -269,7 +247,7 @@ export const se_QueryObjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("QueryObjects"); let body: any; - body = JSON.stringify(se_QueryObjectsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -282,7 +260,7 @@ export const se_RemoveTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTags"); let body: any; - body = JSON.stringify(se_RemoveTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -295,7 +273,7 @@ export const se_ReportTaskProgressCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReportTaskProgress"); let body: any; - body = JSON.stringify(se_ReportTaskProgressInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -308,7 +286,7 @@ export const se_ReportTaskRunnerHeartbeatCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReportTaskRunnerHeartbeat"); let body: any; - body = JSON.stringify(se_ReportTaskRunnerHeartbeatInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -321,7 +299,7 @@ export const se_SetStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetStatus"); let body: any; - body = JSON.stringify(se_SetStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -334,7 +312,7 @@ export const se_SetTaskStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetTaskStatus"); let body: any; - body = JSON.stringify(se_SetTaskStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -347,7 +325,7 @@ export const se_ValidatePipelineDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ValidatePipelineDefinition"); let body: any; - body = JSON.stringify(se_ValidatePipelineDefinitionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,12 +341,12 @@ export const de_ActivatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ActivatePipelineOutput(data, context); + contents = _json(data); const response: ActivatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -398,10 +376,9 @@ const de_ActivatePipelineCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -419,12 +396,12 @@ export const de_AddTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsOutput(data, context); + contents = _json(data); const response: AddTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -454,10 +431,9 @@ const de_AddTagsCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -475,12 +451,12 @@ export const de_CreatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePipelineOutput(data, context); + contents = _json(data); const response: CreatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -504,10 +480,9 @@ const de_CreatePipelineCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -525,12 +500,12 @@ export const de_DeactivatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeactivatePipelineOutput(data, context); + contents = _json(data); const response: DeactivatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -560,10 +535,9 @@ const de_DeactivatePipelineCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -583,7 +557,7 @@ export const de_DeletePipelineCommand = async ( const response: DeletePipelineCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -610,10 +584,9 @@ const de_DeletePipelineCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -631,12 +604,12 @@ export const de_DescribeObjectsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeObjectsOutput(data, context); + contents = _json(data); const response: DescribeObjectsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -666,10 +639,9 @@ const de_DescribeObjectsCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -687,12 +659,12 @@ export const de_DescribePipelinesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePipelinesOutput(data, context); + contents = _json(data); const response: DescribePipelinesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -722,10 +694,9 @@ const de_DescribePipelinesCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -743,12 +714,12 @@ export const de_EvaluateExpressionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EvaluateExpressionOutput(data, context); + contents = _json(data); const response: EvaluateExpressionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -781,10 +752,9 @@ const de_EvaluateExpressionCommandError = async ( throw await de_TaskNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -802,12 +772,12 @@ export const de_GetPipelineDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPipelineDefinitionOutput(data, context); + contents = _json(data); const response: GetPipelineDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -837,10 +807,9 @@ const de_GetPipelineDefinitionCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -858,12 +827,12 @@ export const de_ListPipelinesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPipelinesOutput(data, context); + contents = _json(data); const response: ListPipelinesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -887,10 +856,9 @@ const de_ListPipelinesCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -908,12 +876,12 @@ export const de_PollForTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PollForTaskOutput(data, context); + contents = _json(data); const response: PollForTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -940,10 +908,9 @@ const de_PollForTaskCommandError = async ( throw await de_TaskNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -961,12 +928,12 @@ export const de_PutPipelineDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPipelineDefinitionOutput(data, context); + contents = _json(data); const response: PutPipelineDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -996,10 +963,9 @@ const de_PutPipelineDefinitionCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1017,12 +983,12 @@ export const de_QueryObjectsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_QueryObjectsOutput(data, context); + contents = _json(data); const response: QueryObjectsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1052,10 +1018,9 @@ const de_QueryObjectsCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1073,12 +1038,12 @@ export const de_RemoveTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsOutput(data, context); + contents = _json(data); const response: RemoveTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1108,10 +1073,9 @@ const de_RemoveTagsCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1129,12 +1093,12 @@ export const de_ReportTaskProgressCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ReportTaskProgressOutput(data, context); + contents = _json(data); const response: ReportTaskProgressCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1167,10 +1131,9 @@ const de_ReportTaskProgressCommandError = async ( throw await de_TaskNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1188,12 +1151,12 @@ export const de_ReportTaskRunnerHeartbeatCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ReportTaskRunnerHeartbeatOutput(data, context); + contents = _json(data); const response: ReportTaskRunnerHeartbeatCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1217,10 +1180,9 @@ const de_ReportTaskRunnerHeartbeatCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1240,7 +1202,7 @@ export const de_SetStatusCommand = async ( const response: SetStatusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1270,10 +1232,9 @@ const de_SetStatusCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1291,12 +1252,12 @@ export const de_SetTaskStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetTaskStatusOutput(data, context); + contents = _json(data); const response: SetTaskStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1329,10 +1290,9 @@ const de_SetTaskStatusCommandError = async ( throw await de_TaskNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1350,12 +1310,12 @@ export const de_ValidatePipelineDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ValidatePipelineDefinitionOutput(data, context); + contents = _json(data); const response: ValidatePipelineDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1385,10 +1345,9 @@ const de_ValidatePipelineDefinitionCommandError = async ( throw await de_PipelineNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1402,7 +1361,7 @@ const de_InternalServiceErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceError(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1418,7 +1377,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1434,7 +1393,7 @@ const de_PipelineDeletedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineDeletedException(body, context); + const deserialized: any = _json(body); const exception = new PipelineDeletedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1450,7 +1409,7 @@ const de_PipelineNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PipelineNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PipelineNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1466,7 +1425,7 @@ const de_TaskNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TaskNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TaskNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1478,935 +1437,178 @@ const de_TaskNotFoundExceptionRes = async ( * serializeAws_json1_1ActivatePipelineInput */ const se_ActivatePipelineInput = (input: ActivatePipelineInput, context: __SerdeContext): any => { - return { - ...(input.parameterValues != null && { parameterValues: se_ParameterValueList(input.parameterValues, context) }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.startTimestamp != null && { startTimestamp: Math.round(input.startTimestamp.getTime() / 1000) }), - }; + return take(input, { + parameterValues: _json, + pipelineId: [], + startTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1AddTagsInput - */ -const se_AddTagsInput = (input: AddTagsInput, context: __SerdeContext): any => { - return { - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_AddTagsInput omitted. -/** - * serializeAws_json1_1CreatePipelineInput - */ -const se_CreatePipelineInput = (input: CreatePipelineInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - ...(input.uniqueId != null && { uniqueId: input.uniqueId }), - }; -}; +// se_CreatePipelineInput omitted. -/** - * serializeAws_json1_1DeactivatePipelineInput - */ -const se_DeactivatePipelineInput = (input: DeactivatePipelineInput, context: __SerdeContext): any => { - return { - ...(input.cancelActive != null && { cancelActive: input.cancelActive }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - }; -}; +// se_DeactivatePipelineInput omitted. -/** - * serializeAws_json1_1DeletePipelineInput - */ -const se_DeletePipelineInput = (input: DeletePipelineInput, context: __SerdeContext): any => { - return { - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - }; -}; +// se_DeletePipelineInput omitted. -/** - * serializeAws_json1_1DescribeObjectsInput - */ -const se_DescribeObjectsInput = (input: DescribeObjectsInput, context: __SerdeContext): any => { - return { - ...(input.evaluateExpressions != null && { evaluateExpressions: input.evaluateExpressions }), - ...(input.marker != null && { marker: input.marker }), - ...(input.objectIds != null && { objectIds: se_idList(input.objectIds, context) }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - }; -}; +// se_DescribeObjectsInput omitted. -/** - * serializeAws_json1_1DescribePipelinesInput - */ -const se_DescribePipelinesInput = (input: DescribePipelinesInput, context: __SerdeContext): any => { - return { - ...(input.pipelineIds != null && { pipelineIds: se_idList(input.pipelineIds, context) }), - }; -}; +// se_DescribePipelinesInput omitted. -/** - * serializeAws_json1_1EvaluateExpressionInput - */ -const se_EvaluateExpressionInput = (input: EvaluateExpressionInput, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.objectId != null && { objectId: input.objectId }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - }; -}; +// se_EvaluateExpressionInput omitted. -/** - * serializeAws_json1_1Field - */ -const se_Field = (input: Field, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.refValue != null && { refValue: input.refValue }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; -}; +// se_Field omitted. -/** - * serializeAws_json1_1fieldList - */ -const se_fieldList = (input: Field[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Field(entry, context); - }); -}; +// se_fieldList omitted. -/** - * serializeAws_json1_1GetPipelineDefinitionInput - */ -const se_GetPipelineDefinitionInput = (input: GetPipelineDefinitionInput, context: __SerdeContext): any => { - return { - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_GetPipelineDefinitionInput omitted. -/** - * serializeAws_json1_1idList - */ -const se_idList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_idList omitted. -/** - * serializeAws_json1_1InstanceIdentity - */ -const se_InstanceIdentity = (input: InstanceIdentity, context: __SerdeContext): any => { - return { - ...(input.document != null && { document: input.document }), - ...(input.signature != null && { signature: input.signature }), - }; -}; +// se_InstanceIdentity omitted. -/** - * serializeAws_json1_1ListPipelinesInput - */ -const se_ListPipelinesInput = (input: ListPipelinesInput, context: __SerdeContext): any => { - return { - ...(input.marker != null && { marker: input.marker }), - }; -}; +// se_ListPipelinesInput omitted. -/** - * serializeAws_json1_1Operator - */ -const se_Operator = (input: Operator, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.values != null && { values: se_stringList(input.values, context) }), - }; -}; +// se_Operator omitted. -/** - * serializeAws_json1_1ParameterAttribute - */ -const se_ParameterAttribute = (input: ParameterAttribute, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; -}; +// se_ParameterAttribute omitted. -/** - * serializeAws_json1_1ParameterAttributeList - */ -const se_ParameterAttributeList = (input: ParameterAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterAttribute(entry, context); - }); -}; +// se_ParameterAttributeList omitted. -/** - * serializeAws_json1_1ParameterObject - */ -const se_ParameterObject = (input: ParameterObject, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_ParameterAttributeList(input.attributes, context) }), - ...(input.id != null && { id: input.id }), - }; -}; +// se_ParameterObject omitted. -/** - * serializeAws_json1_1ParameterObjectList - */ -const se_ParameterObjectList = (input: ParameterObject[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterObject(entry, context); - }); -}; +// se_ParameterObjectList omitted. -/** - * serializeAws_json1_1ParameterValue - */ -const se_ParameterValue = (input: ParameterValue, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; -}; +// se_ParameterValue omitted. -/** - * serializeAws_json1_1ParameterValueList - */ -const se_ParameterValueList = (input: ParameterValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterValue(entry, context); - }); -}; +// se_ParameterValueList omitted. -/** - * serializeAws_json1_1PipelineObject - */ -const se_PipelineObject = (input: PipelineObject, context: __SerdeContext): any => { - return { - ...(input.fields != null && { fields: se_fieldList(input.fields, context) }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_PipelineObject omitted. -/** - * serializeAws_json1_1PipelineObjectList - */ -const se_PipelineObjectList = (input: PipelineObject[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PipelineObject(entry, context); - }); -}; +// se_PipelineObjectList omitted. -/** - * serializeAws_json1_1PollForTaskInput - */ -const se_PollForTaskInput = (input: PollForTaskInput, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: input.hostname }), - ...(input.instanceIdentity != null && { instanceIdentity: se_InstanceIdentity(input.instanceIdentity, context) }), - ...(input.workerGroup != null && { workerGroup: input.workerGroup }), - }; -}; +// se_PollForTaskInput omitted. -/** - * serializeAws_json1_1PutPipelineDefinitionInput - */ -const se_PutPipelineDefinitionInput = (input: PutPipelineDefinitionInput, context: __SerdeContext): any => { - return { - ...(input.parameterObjects != null && { - parameterObjects: se_ParameterObjectList(input.parameterObjects, context), - }), - ...(input.parameterValues != null && { parameterValues: se_ParameterValueList(input.parameterValues, context) }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.pipelineObjects != null && { pipelineObjects: se_PipelineObjectList(input.pipelineObjects, context) }), - }; -}; +// se_PutPipelineDefinitionInput omitted. -/** - * serializeAws_json1_1Query - */ -const se_Query = (input: Query, context: __SerdeContext): any => { - return { - ...(input.selectors != null && { selectors: se_SelectorList(input.selectors, context) }), - }; -}; +// se_Query omitted. -/** - * serializeAws_json1_1QueryObjectsInput - */ -const se_QueryObjectsInput = (input: QueryObjectsInput, context: __SerdeContext): any => { - return { - ...(input.limit != null && { limit: input.limit }), - ...(input.marker != null && { marker: input.marker }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.query != null && { query: se_Query(input.query, context) }), - ...(input.sphere != null && { sphere: input.sphere }), - }; -}; +// se_QueryObjectsInput omitted. -/** - * serializeAws_json1_1RemoveTagsInput - */ -const se_RemoveTagsInput = (input: RemoveTagsInput, context: __SerdeContext): any => { - return { - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.tagKeys != null && { tagKeys: se_stringList(input.tagKeys, context) }), - }; -}; +// se_RemoveTagsInput omitted. -/** - * serializeAws_json1_1ReportTaskProgressInput - */ -const se_ReportTaskProgressInput = (input: ReportTaskProgressInput, context: __SerdeContext): any => { - return { - ...(input.fields != null && { fields: se_fieldList(input.fields, context) }), - ...(input.taskId != null && { taskId: input.taskId }), - }; -}; +// se_ReportTaskProgressInput omitted. -/** - * serializeAws_json1_1ReportTaskRunnerHeartbeatInput - */ -const se_ReportTaskRunnerHeartbeatInput = (input: ReportTaskRunnerHeartbeatInput, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: input.hostname }), - ...(input.taskrunnerId != null && { taskrunnerId: input.taskrunnerId }), - ...(input.workerGroup != null && { workerGroup: input.workerGroup }), - }; -}; +// se_ReportTaskRunnerHeartbeatInput omitted. -/** - * serializeAws_json1_1Selector - */ -const se_Selector = (input: Selector, context: __SerdeContext): any => { - return { - ...(input.fieldName != null && { fieldName: input.fieldName }), - ...(input.operator != null && { operator: se_Operator(input.operator, context) }), - }; -}; +// se_Selector omitted. -/** - * serializeAws_json1_1SelectorList - */ -const se_SelectorList = (input: Selector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Selector(entry, context); - }); -}; +// se_SelectorList omitted. -/** - * serializeAws_json1_1SetStatusInput - */ -const se_SetStatusInput = (input: SetStatusInput, context: __SerdeContext): any => { - return { - ...(input.objectIds != null && { objectIds: se_idList(input.objectIds, context) }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_SetStatusInput omitted. -/** - * serializeAws_json1_1SetTaskStatusInput - */ -const se_SetTaskStatusInput = (input: SetTaskStatusInput, context: __SerdeContext): any => { - return { - ...(input.errorId != null && { errorId: input.errorId }), - ...(input.errorMessage != null && { errorMessage: input.errorMessage }), - ...(input.errorStackTrace != null && { errorStackTrace: input.errorStackTrace }), - ...(input.taskId != null && { taskId: input.taskId }), - ...(input.taskStatus != null && { taskStatus: input.taskStatus }), - }; -}; +// se_SetTaskStatusInput omitted. -/** - * serializeAws_json1_1stringList - */ -const se_stringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_stringList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1tagList - */ -const se_tagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_tagList omitted. -/** - * serializeAws_json1_1ValidatePipelineDefinitionInput - */ -const se_ValidatePipelineDefinitionInput = (input: ValidatePipelineDefinitionInput, context: __SerdeContext): any => { - return { - ...(input.parameterObjects != null && { - parameterObjects: se_ParameterObjectList(input.parameterObjects, context), - }), - ...(input.parameterValues != null && { parameterValues: se_ParameterValueList(input.parameterValues, context) }), - ...(input.pipelineId != null && { pipelineId: input.pipelineId }), - ...(input.pipelineObjects != null && { pipelineObjects: se_PipelineObjectList(input.pipelineObjects, context) }), - }; -}; +// se_ValidatePipelineDefinitionInput omitted. -/** - * deserializeAws_json1_1ActivatePipelineOutput - */ -const de_ActivatePipelineOutput = (output: any, context: __SerdeContext): ActivatePipelineOutput => { - return {} as any; -}; +// de_ActivatePipelineOutput omitted. -/** - * deserializeAws_json1_1AddTagsOutput - */ -const de_AddTagsOutput = (output: any, context: __SerdeContext): AddTagsOutput => { - return {} as any; -}; +// de_AddTagsOutput omitted. -/** - * deserializeAws_json1_1CreatePipelineOutput - */ -const de_CreatePipelineOutput = (output: any, context: __SerdeContext): CreatePipelineOutput => { - return { - pipelineId: __expectString(output.pipelineId), - } as any; -}; +// de_CreatePipelineOutput omitted. -/** - * deserializeAws_json1_1DeactivatePipelineOutput - */ -const de_DeactivatePipelineOutput = (output: any, context: __SerdeContext): DeactivatePipelineOutput => { - return {} as any; -}; +// de_DeactivatePipelineOutput omitted. -/** - * deserializeAws_json1_1DescribeObjectsOutput - */ -const de_DescribeObjectsOutput = (output: any, context: __SerdeContext): DescribeObjectsOutput => { - return { - hasMoreResults: __expectBoolean(output.hasMoreResults), - marker: __expectString(output.marker), - pipelineObjects: - output.pipelineObjects != null ? de_PipelineObjectList(output.pipelineObjects, context) : undefined, - } as any; -}; +// de_DescribeObjectsOutput omitted. -/** - * deserializeAws_json1_1DescribePipelinesOutput - */ -const de_DescribePipelinesOutput = (output: any, context: __SerdeContext): DescribePipelinesOutput => { - return { - pipelineDescriptionList: - output.pipelineDescriptionList != null - ? de_PipelineDescriptionList(output.pipelineDescriptionList, context) - : undefined, - } as any; -}; +// de_DescribePipelinesOutput omitted. -/** - * deserializeAws_json1_1EvaluateExpressionOutput - */ -const de_EvaluateExpressionOutput = (output: any, context: __SerdeContext): EvaluateExpressionOutput => { - return { - evaluatedExpression: __expectString(output.evaluatedExpression), - } as any; -}; +// de_EvaluateExpressionOutput omitted. -/** - * deserializeAws_json1_1Field - */ -const de_Field = (output: any, context: __SerdeContext): Field => { - return { - key: __expectString(output.key), - refValue: __expectString(output.refValue), - stringValue: __expectString(output.stringValue), - } as any; -}; +// de_Field omitted. -/** - * deserializeAws_json1_1fieldList - */ -const de_fieldList = (output: any, context: __SerdeContext): Field[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Field(entry, context); - }); - return retVal; -}; +// de_fieldList omitted. -/** - * deserializeAws_json1_1GetPipelineDefinitionOutput - */ -const de_GetPipelineDefinitionOutput = (output: any, context: __SerdeContext): GetPipelineDefinitionOutput => { - return { - parameterObjects: - output.parameterObjects != null ? de_ParameterObjectList(output.parameterObjects, context) : undefined, - parameterValues: - output.parameterValues != null ? de_ParameterValueList(output.parameterValues, context) : undefined, - pipelineObjects: - output.pipelineObjects != null ? de_PipelineObjectList(output.pipelineObjects, context) : undefined, - } as any; -}; +// de_GetPipelineDefinitionOutput omitted. -/** - * deserializeAws_json1_1idList - */ -const de_idList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_idList omitted. -/** - * deserializeAws_json1_1InternalServiceError - */ -const de_InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServiceError omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1ListPipelinesOutput - */ -const de_ListPipelinesOutput = (output: any, context: __SerdeContext): ListPipelinesOutput => { - return { - hasMoreResults: __expectBoolean(output.hasMoreResults), - marker: __expectString(output.marker), - pipelineIdList: output.pipelineIdList != null ? de_pipelineList(output.pipelineIdList, context) : undefined, - } as any; -}; +// de_ListPipelinesOutput omitted. -/** - * deserializeAws_json1_1ParameterAttribute - */ -const de_ParameterAttribute = (output: any, context: __SerdeContext): ParameterAttribute => { - return { - key: __expectString(output.key), - stringValue: __expectString(output.stringValue), - } as any; -}; +// de_ParameterAttribute omitted. -/** - * deserializeAws_json1_1ParameterAttributeList - */ -const de_ParameterAttributeList = (output: any, context: __SerdeContext): ParameterAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterAttribute(entry, context); - }); - return retVal; -}; +// de_ParameterAttributeList omitted. -/** - * deserializeAws_json1_1ParameterObject - */ -const de_ParameterObject = (output: any, context: __SerdeContext): ParameterObject => { - return { - attributes: output.attributes != null ? de_ParameterAttributeList(output.attributes, context) : undefined, - id: __expectString(output.id), - } as any; -}; +// de_ParameterObject omitted. -/** - * deserializeAws_json1_1ParameterObjectList - */ -const de_ParameterObjectList = (output: any, context: __SerdeContext): ParameterObject[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterObject(entry, context); - }); - return retVal; -}; +// de_ParameterObjectList omitted. -/** - * deserializeAws_json1_1ParameterValue - */ -const de_ParameterValue = (output: any, context: __SerdeContext): ParameterValue => { - return { - id: __expectString(output.id), - stringValue: __expectString(output.stringValue), - } as any; -}; +// de_ParameterValue omitted. -/** - * deserializeAws_json1_1ParameterValueList - */ -const de_ParameterValueList = (output: any, context: __SerdeContext): ParameterValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterValue(entry, context); - }); - return retVal; -}; +// de_ParameterValueList omitted. -/** - * deserializeAws_json1_1PipelineDeletedException - */ -const de_PipelineDeletedException = (output: any, context: __SerdeContext): PipelineDeletedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineDeletedException omitted. -/** - * deserializeAws_json1_1PipelineDescription - */ -const de_PipelineDescription = (output: any, context: __SerdeContext): PipelineDescription => { - return { - description: __expectString(output.description), - fields: output.fields != null ? de_fieldList(output.fields, context) : undefined, - name: __expectString(output.name), - pipelineId: __expectString(output.pipelineId), - tags: output.tags != null ? de_tagList(output.tags, context) : undefined, - } as any; -}; +// de_PipelineDescription omitted. -/** - * deserializeAws_json1_1PipelineDescriptionList - */ -const de_PipelineDescriptionList = (output: any, context: __SerdeContext): PipelineDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineDescription(entry, context); - }); - return retVal; -}; +// de_PipelineDescriptionList omitted. -/** - * deserializeAws_json1_1PipelineIdName - */ -const de_PipelineIdName = (output: any, context: __SerdeContext): PipelineIdName => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_PipelineIdName omitted. -/** - * deserializeAws_json1_1pipelineList - */ -const de_pipelineList = (output: any, context: __SerdeContext): PipelineIdName[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineIdName(entry, context); - }); - return retVal; -}; +// de_pipelineList omitted. -/** - * deserializeAws_json1_1PipelineNotFoundException - */ -const de_PipelineNotFoundException = (output: any, context: __SerdeContext): PipelineNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PipelineNotFoundException omitted. -/** - * deserializeAws_json1_1PipelineObject - */ -const de_PipelineObject = (output: any, context: __SerdeContext): PipelineObject => { - return { - fields: output.fields != null ? de_fieldList(output.fields, context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_PipelineObject omitted. -/** - * deserializeAws_json1_1PipelineObjectList - */ -const de_PipelineObjectList = (output: any, context: __SerdeContext): PipelineObject[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineObject(entry, context); - }); - return retVal; -}; +// de_PipelineObjectList omitted. -/** - * deserializeAws_json1_1PipelineObjectMap - */ -const de_PipelineObjectMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PipelineObject(value, context); - return acc; - }, {}); -}; +// de_PipelineObjectMap omitted. -/** - * deserializeAws_json1_1PollForTaskOutput - */ -const de_PollForTaskOutput = (output: any, context: __SerdeContext): PollForTaskOutput => { - return { - taskObject: output.taskObject != null ? de_TaskObject(output.taskObject, context) : undefined, - } as any; -}; +// de_PollForTaskOutput omitted. -/** - * deserializeAws_json1_1PutPipelineDefinitionOutput - */ -const de_PutPipelineDefinitionOutput = (output: any, context: __SerdeContext): PutPipelineDefinitionOutput => { - return { - errored: __expectBoolean(output.errored), - validationErrors: - output.validationErrors != null ? de_ValidationErrors(output.validationErrors, context) : undefined, - validationWarnings: - output.validationWarnings != null ? de_ValidationWarnings(output.validationWarnings, context) : undefined, - } as any; -}; +// de_PutPipelineDefinitionOutput omitted. -/** - * deserializeAws_json1_1QueryObjectsOutput - */ -const de_QueryObjectsOutput = (output: any, context: __SerdeContext): QueryObjectsOutput => { - return { - hasMoreResults: __expectBoolean(output.hasMoreResults), - ids: output.ids != null ? de_idList(output.ids, context) : undefined, - marker: __expectString(output.marker), - } as any; -}; +// de_QueryObjectsOutput omitted. -/** - * deserializeAws_json1_1RemoveTagsOutput - */ -const de_RemoveTagsOutput = (output: any, context: __SerdeContext): RemoveTagsOutput => { - return {} as any; -}; +// de_RemoveTagsOutput omitted. -/** - * deserializeAws_json1_1ReportTaskProgressOutput - */ -const de_ReportTaskProgressOutput = (output: any, context: __SerdeContext): ReportTaskProgressOutput => { - return { - canceled: __expectBoolean(output.canceled), - } as any; -}; +// de_ReportTaskProgressOutput omitted. -/** - * deserializeAws_json1_1ReportTaskRunnerHeartbeatOutput - */ -const de_ReportTaskRunnerHeartbeatOutput = (output: any, context: __SerdeContext): ReportTaskRunnerHeartbeatOutput => { - return { - terminate: __expectBoolean(output.terminate), - } as any; -}; +// de_ReportTaskRunnerHeartbeatOutput omitted. -/** - * deserializeAws_json1_1SetTaskStatusOutput - */ -const de_SetTaskStatusOutput = (output: any, context: __SerdeContext): SetTaskStatusOutput => { - return {} as any; -}; +// de_SetTaskStatusOutput omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1tagList - */ -const de_tagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_tagList omitted. -/** - * deserializeAws_json1_1TaskNotFoundException - */ -const de_TaskNotFoundException = (output: any, context: __SerdeContext): TaskNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TaskNotFoundException omitted. -/** - * deserializeAws_json1_1TaskObject - */ -const de_TaskObject = (output: any, context: __SerdeContext): TaskObject => { - return { - attemptId: __expectString(output.attemptId), - objects: output.objects != null ? de_PipelineObjectMap(output.objects, context) : undefined, - pipelineId: __expectString(output.pipelineId), - taskId: __expectString(output.taskId), - } as any; -}; +// de_TaskObject omitted. -/** - * deserializeAws_json1_1ValidatePipelineDefinitionOutput - */ -const de_ValidatePipelineDefinitionOutput = ( - output: any, - context: __SerdeContext -): ValidatePipelineDefinitionOutput => { - return { - errored: __expectBoolean(output.errored), - validationErrors: - output.validationErrors != null ? de_ValidationErrors(output.validationErrors, context) : undefined, - validationWarnings: - output.validationWarnings != null ? de_ValidationWarnings(output.validationWarnings, context) : undefined, - } as any; -}; +// de_ValidatePipelineDefinitionOutput omitted. -/** - * deserializeAws_json1_1ValidationError - */ -const de_ValidationError = (output: any, context: __SerdeContext): ValidationError => { - return { - errors: output.errors != null ? de_validationMessages(output.errors, context) : undefined, - id: __expectString(output.id), - } as any; -}; +// de_ValidationError omitted. -/** - * deserializeAws_json1_1ValidationErrors - */ -const de_ValidationErrors = (output: any, context: __SerdeContext): ValidationError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationError(entry, context); - }); - return retVal; -}; +// de_ValidationErrors omitted. -/** - * deserializeAws_json1_1validationMessages - */ -const de_validationMessages = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_validationMessages omitted. -/** - * deserializeAws_json1_1ValidationWarning - */ -const de_ValidationWarning = (output: any, context: __SerdeContext): ValidationWarning => { - return { - id: __expectString(output.id), - warnings: output.warnings != null ? de_validationMessages(output.warnings, context) : undefined, - } as any; -}; +// de_ValidationWarning omitted. -/** - * deserializeAws_json1_1ValidationWarnings - */ -const de_ValidationWarnings = (output: any, context: __SerdeContext): ValidationWarning[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationWarning(entry, context); - }); - return retVal; -}; +// de_ValidationWarnings omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2428,6 +1630,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts b/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts index e84d3a482805..24d239960332 100644 --- a/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-database-migration-service/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,7 +11,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -259,93 +261,58 @@ import { import { DatabaseMigrationServiceServiceException as __BaseException } from "../models/DatabaseMigrationServiceServiceException"; import { AccessDeniedFault, - AccountQuota, AddTagsToResourceMessage, - AddTagsToResourceResponse, ApplyPendingMaintenanceActionMessage, ApplyPendingMaintenanceActionResponse, - AvailabilityZone, - BatchStartRecommendationsErrorEntry, BatchStartRecommendationsRequest, - BatchStartRecommendationsResponse, CancelReplicationTaskAssessmentRunMessage, CancelReplicationTaskAssessmentRunResponse, Certificate, - CollectorHealthCheck, CollectorNotFoundFault, - CollectorResponse, - CollectorShortInfoResponse, - Connection, CreateEndpointMessage, - CreateEndpointResponse, CreateEventSubscriptionMessage, - CreateEventSubscriptionResponse, CreateFleetAdvisorCollectorRequest, - CreateFleetAdvisorCollectorResponse, CreateReplicationInstanceMessage, CreateReplicationInstanceResponse, CreateReplicationSubnetGroupMessage, - CreateReplicationSubnetGroupResponse, CreateReplicationTaskMessage, CreateReplicationTaskResponse, - DatabaseInstanceSoftwareDetailsResponse, - DatabaseResponse, - DatabaseShortInfoResponse, DeleteCertificateMessage, DeleteCertificateResponse, DeleteCollectorRequest, DeleteConnectionMessage, - DeleteConnectionResponse, DeleteEndpointMessage, - DeleteEndpointResponse, DeleteEventSubscriptionMessage, - DeleteEventSubscriptionResponse, DeleteFleetAdvisorDatabasesRequest, - DeleteFleetAdvisorDatabasesResponse, DeleteReplicationInstanceMessage, DeleteReplicationInstanceResponse, DeleteReplicationSubnetGroupMessage, - DeleteReplicationSubnetGroupResponse, DeleteReplicationTaskAssessmentRunMessage, DeleteReplicationTaskAssessmentRunResponse, DeleteReplicationTaskMessage, DeleteReplicationTaskResponse, DescribeAccountAttributesMessage, - DescribeAccountAttributesResponse, DescribeApplicableIndividualAssessmentsMessage, - DescribeApplicableIndividualAssessmentsResponse, DescribeCertificatesMessage, DescribeCertificatesResponse, DescribeConnectionsMessage, - DescribeConnectionsResponse, DescribeEndpointSettingsMessage, - DescribeEndpointSettingsResponse, DescribeEndpointsMessage, - DescribeEndpointsResponse, DescribeEndpointTypesMessage, - DescribeEndpointTypesResponse, DescribeEventCategoriesMessage, - DescribeEventCategoriesResponse, DescribeEventsMessage, DescribeEventsResponse, DescribeEventSubscriptionsMessage, - DescribeEventSubscriptionsResponse, DescribeFleetAdvisorCollectorsRequest, - DescribeFleetAdvisorCollectorsResponse, DescribeFleetAdvisorDatabasesRequest, - DescribeFleetAdvisorDatabasesResponse, DescribeFleetAdvisorLsaAnalysisRequest, - DescribeFleetAdvisorLsaAnalysisResponse, DescribeFleetAdvisorSchemaObjectSummaryRequest, - DescribeFleetAdvisorSchemaObjectSummaryResponse, DescribeFleetAdvisorSchemasRequest, DescribeFleetAdvisorSchemasResponse, DescribeOrderableReplicationInstancesMessage, - DescribeOrderableReplicationInstancesResponse, DescribePendingMaintenanceActionsMessage, DescribePendingMaintenanceActionsResponse, DescribeRecommendationLimitationsRequest, - DescribeRecommendationLimitationsResponse, DescribeRecommendationsRequest, DescribeRecommendationsResponse, DescribeRefreshSchemasStatusMessage, @@ -353,9 +320,7 @@ import { DescribeReplicationInstancesMessage, DescribeReplicationInstancesResponse, DescribeReplicationInstanceTaskLogsMessage, - DescribeReplicationInstanceTaskLogsResponse, DescribeReplicationSubnetGroupsMessage, - DescribeReplicationSubnetGroupsResponse, DescribeReplicationTaskAssessmentResultsMessage, DescribeReplicationTaskAssessmentResultsResponse, DescribeReplicationTaskAssessmentRunsMessage, @@ -365,21 +330,14 @@ import { DescribeReplicationTasksMessage, DescribeReplicationTasksResponse, DescribeSchemasMessage, - DescribeSchemasResponse, DescribeTableStatisticsMessage, DescribeTableStatisticsResponse, DmsTransferSettings, DocDbSettings, DynamoDbSettings, ElasticsearchSettings, - Endpoint, - EndpointSetting, Event, - EventCategoryGroup, - EventSubscription, Filter, - FleetAdvisorLsaAnalysisResponse, - FleetAdvisorSchemaObjectResponse, GcpMySQLSettings, IBMDb2Settings, ImportCertificateMessage, @@ -389,7 +347,6 @@ import { InvalidOperationFault, InvalidResourceStateFault, InvalidSubnet, - InventoryData, KafkaSettings, KinesisSettings, KMSAccessDeniedFault, @@ -399,18 +356,13 @@ import { KMSKeyNotAccessibleFault, KMSNotFoundFault, KMSThrottlingFault, - Limitation, ListTagsForResourceMessage, - ListTagsForResourceResponse, MicrosoftSQLServerSettings, ModifyEndpointMessage, - ModifyEndpointResponse, ModifyEventSubscriptionMessage, - ModifyEventSubscriptionResponse, ModifyReplicationInstanceMessage, ModifyReplicationInstanceResponse, ModifyReplicationSubnetGroupMessage, - ModifyReplicationSubnetGroupResponse, ModifyReplicationTaskMessage, ModifyReplicationTaskResponse, MongoDbSettings, @@ -419,7 +371,6 @@ import { MySQLSettings, NeptuneSettings, OracleSettings, - OrderableReplicationInstance, PendingMaintenanceAction, PostgreSQLSettings, RdsConfiguration, @@ -436,31 +387,22 @@ import { RefreshSchemasResponse, RefreshSchemasStatus, ReloadTablesMessage, - ReloadTablesResponse, RemoveTagsFromResourceMessage, - RemoveTagsFromResourceResponse, ReplicationInstance, - ReplicationInstanceTaskLog, - ReplicationPendingModifiedValues, - ReplicationSubnetGroup, ReplicationSubnetGroupDoesNotCoverEnoughAZs, ReplicationTask, ReplicationTaskAssessmentResult, ReplicationTaskAssessmentRun, - ReplicationTaskAssessmentRunProgress, ReplicationTaskIndividualAssessment, ReplicationTaskStats, ResourceAlreadyExistsFault, ResourceNotFoundFault, ResourcePendingMaintenanceActions, ResourceQuotaExceededFault, - RunFleetAdvisorLsaAnalysisResponse, S3AccessDeniedFault, S3ResourceNotFoundFault, S3Settings, SchemaResponse, - SchemaShortInfoResponse, - ServerShortInfoResponse, SNSInvalidTopicFault, SNSNoAuthorizationFault, StartRecommendationsRequest, @@ -474,19 +416,14 @@ import { StopReplicationTaskMessage, StopReplicationTaskResponse, StorageQuotaExceededFault, - Subnet, SubnetAlreadyInUse, - SupportedEndpointType, SybaseSettings, TableStatistics, TableToReload, Tag, TestConnectionMessage, - TestConnectionResponse, UpdateSubscriptionsToEventBridgeMessage, - UpdateSubscriptionsToEventBridgeResponse, UpgradeDependencyFailureFault, - VpcSecurityGroupMembership, } from "../models/models_0"; /** @@ -498,7 +435,7 @@ export const se_AddTagsToResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToResource"); let body: any; - body = JSON.stringify(se_AddTagsToResourceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -511,7 +448,7 @@ export const se_ApplyPendingMaintenanceActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ApplyPendingMaintenanceAction"); let body: any; - body = JSON.stringify(se_ApplyPendingMaintenanceActionMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -524,7 +461,7 @@ export const se_BatchStartRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchStartRecommendations"); let body: any; - body = JSON.stringify(se_BatchStartRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -537,7 +474,7 @@ export const se_CancelReplicationTaskAssessmentRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelReplicationTaskAssessmentRun"); let body: any; - body = JSON.stringify(se_CancelReplicationTaskAssessmentRunMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -550,7 +487,7 @@ export const se_CreateEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEndpoint"); let body: any; - body = JSON.stringify(se_CreateEndpointMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -563,7 +500,7 @@ export const se_CreateEventSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEventSubscription"); let body: any; - body = JSON.stringify(se_CreateEventSubscriptionMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -576,7 +513,7 @@ export const se_CreateFleetAdvisorCollectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFleetAdvisorCollector"); let body: any; - body = JSON.stringify(se_CreateFleetAdvisorCollectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -589,7 +526,7 @@ export const se_CreateReplicationInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateReplicationInstance"); let body: any; - body = JSON.stringify(se_CreateReplicationInstanceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -602,7 +539,7 @@ export const se_CreateReplicationSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateReplicationSubnetGroup"); let body: any; - body = JSON.stringify(se_CreateReplicationSubnetGroupMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -628,7 +565,7 @@ export const se_DeleteCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCertificate"); let body: any; - body = JSON.stringify(se_DeleteCertificateMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -641,7 +578,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -654,7 +591,7 @@ export const se_DeleteEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpoint"); let body: any; - body = JSON.stringify(se_DeleteEndpointMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -667,7 +604,7 @@ export const se_DeleteEventSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventSubscription"); let body: any; - body = JSON.stringify(se_DeleteEventSubscriptionMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -680,7 +617,7 @@ export const se_DeleteFleetAdvisorCollectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFleetAdvisorCollector"); let body: any; - body = JSON.stringify(se_DeleteCollectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -693,7 +630,7 @@ export const se_DeleteFleetAdvisorDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFleetAdvisorDatabases"); let body: any; - body = JSON.stringify(se_DeleteFleetAdvisorDatabasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -706,7 +643,7 @@ export const se_DeleteReplicationInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReplicationInstance"); let body: any; - body = JSON.stringify(se_DeleteReplicationInstanceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -719,7 +656,7 @@ export const se_DeleteReplicationSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReplicationSubnetGroup"); let body: any; - body = JSON.stringify(se_DeleteReplicationSubnetGroupMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -732,7 +669,7 @@ export const se_DeleteReplicationTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReplicationTask"); let body: any; - body = JSON.stringify(se_DeleteReplicationTaskMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -745,7 +682,7 @@ export const se_DeleteReplicationTaskAssessmentRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReplicationTaskAssessmentRun"); let body: any; - body = JSON.stringify(se_DeleteReplicationTaskAssessmentRunMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -758,7 +695,7 @@ export const se_DescribeAccountAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountAttributes"); let body: any; - body = JSON.stringify(se_DescribeAccountAttributesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -771,7 +708,7 @@ export const se_DescribeApplicableIndividualAssessmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplicableIndividualAssessments"); let body: any; - body = JSON.stringify(se_DescribeApplicableIndividualAssessmentsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -784,7 +721,7 @@ export const se_DescribeCertificatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCertificates"); let body: any; - body = JSON.stringify(se_DescribeCertificatesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -797,7 +734,7 @@ export const se_DescribeConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnections"); let body: any; - body = JSON.stringify(se_DescribeConnectionsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -810,7 +747,7 @@ export const se_DescribeEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoints"); let body: any; - body = JSON.stringify(se_DescribeEndpointsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -823,7 +760,7 @@ export const se_DescribeEndpointSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpointSettings"); let body: any; - body = JSON.stringify(se_DescribeEndpointSettingsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -836,7 +773,7 @@ export const se_DescribeEndpointTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpointTypes"); let body: any; - body = JSON.stringify(se_DescribeEndpointTypesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -849,7 +786,7 @@ export const se_DescribeEventCategoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventCategories"); let body: any; - body = JSON.stringify(se_DescribeEventCategoriesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -875,7 +812,7 @@ export const se_DescribeEventSubscriptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventSubscriptions"); let body: any; - body = JSON.stringify(se_DescribeEventSubscriptionsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -888,7 +825,7 @@ export const se_DescribeFleetAdvisorCollectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetAdvisorCollectors"); let body: any; - body = JSON.stringify(se_DescribeFleetAdvisorCollectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -901,7 +838,7 @@ export const se_DescribeFleetAdvisorDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetAdvisorDatabases"); let body: any; - body = JSON.stringify(se_DescribeFleetAdvisorDatabasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -914,7 +851,7 @@ export const se_DescribeFleetAdvisorLsaAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetAdvisorLsaAnalysis"); let body: any; - body = JSON.stringify(se_DescribeFleetAdvisorLsaAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -927,7 +864,7 @@ export const se_DescribeFleetAdvisorSchemaObjectSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetAdvisorSchemaObjectSummary"); let body: any; - body = JSON.stringify(se_DescribeFleetAdvisorSchemaObjectSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -940,7 +877,7 @@ export const se_DescribeFleetAdvisorSchemasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetAdvisorSchemas"); let body: any; - body = JSON.stringify(se_DescribeFleetAdvisorSchemasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -953,7 +890,7 @@ export const se_DescribeOrderableReplicationInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrderableReplicationInstances"); let body: any; - body = JSON.stringify(se_DescribeOrderableReplicationInstancesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -966,7 +903,7 @@ export const se_DescribePendingMaintenanceActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePendingMaintenanceActions"); let body: any; - body = JSON.stringify(se_DescribePendingMaintenanceActionsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -979,7 +916,7 @@ export const se_DescribeRecommendationLimitationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRecommendationLimitations"); let body: any; - body = JSON.stringify(se_DescribeRecommendationLimitationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -992,7 +929,7 @@ export const se_DescribeRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRecommendations"); let body: any; - body = JSON.stringify(se_DescribeRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1005,7 +942,7 @@ export const se_DescribeRefreshSchemasStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRefreshSchemasStatus"); let body: any; - body = JSON.stringify(se_DescribeRefreshSchemasStatusMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1018,7 +955,7 @@ export const se_DescribeReplicationInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationInstances"); let body: any; - body = JSON.stringify(se_DescribeReplicationInstancesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1031,7 +968,7 @@ export const se_DescribeReplicationInstanceTaskLogsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationInstanceTaskLogs"); let body: any; - body = JSON.stringify(se_DescribeReplicationInstanceTaskLogsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1044,7 +981,7 @@ export const se_DescribeReplicationSubnetGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationSubnetGroups"); let body: any; - body = JSON.stringify(se_DescribeReplicationSubnetGroupsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1057,7 +994,7 @@ export const se_DescribeReplicationTaskAssessmentResultsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationTaskAssessmentResults"); let body: any; - body = JSON.stringify(se_DescribeReplicationTaskAssessmentResultsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1070,7 +1007,7 @@ export const se_DescribeReplicationTaskAssessmentRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationTaskAssessmentRuns"); let body: any; - body = JSON.stringify(se_DescribeReplicationTaskAssessmentRunsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1083,7 +1020,7 @@ export const se_DescribeReplicationTaskIndividualAssessmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationTaskIndividualAssessments"); let body: any; - body = JSON.stringify(se_DescribeReplicationTaskIndividualAssessmentsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1096,7 +1033,7 @@ export const se_DescribeReplicationTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplicationTasks"); let body: any; - body = JSON.stringify(se_DescribeReplicationTasksMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1109,7 +1046,7 @@ export const se_DescribeSchemasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSchemas"); let body: any; - body = JSON.stringify(se_DescribeSchemasMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1122,7 +1059,7 @@ export const se_DescribeTableStatisticsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTableStatistics"); let body: any; - body = JSON.stringify(se_DescribeTableStatisticsMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1148,7 +1085,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1161,7 +1098,7 @@ export const se_ModifyEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyEndpoint"); let body: any; - body = JSON.stringify(se_ModifyEndpointMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1174,7 +1111,7 @@ export const se_ModifyEventSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyEventSubscription"); let body: any; - body = JSON.stringify(se_ModifyEventSubscriptionMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1187,7 +1124,7 @@ export const se_ModifyReplicationInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyReplicationInstance"); let body: any; - body = JSON.stringify(se_ModifyReplicationInstanceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1200,7 +1137,7 @@ export const se_ModifyReplicationSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyReplicationSubnetGroup"); let body: any; - body = JSON.stringify(se_ModifyReplicationSubnetGroupMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1226,7 +1163,7 @@ export const se_MoveReplicationTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MoveReplicationTask"); let body: any; - body = JSON.stringify(se_MoveReplicationTaskMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1239,7 +1176,7 @@ export const se_RebootReplicationInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebootReplicationInstance"); let body: any; - body = JSON.stringify(se_RebootReplicationInstanceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1252,7 +1189,7 @@ export const se_RefreshSchemasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RefreshSchemas"); let body: any; - body = JSON.stringify(se_RefreshSchemasMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1265,7 +1202,7 @@ export const se_ReloadTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReloadTables"); let body: any; - body = JSON.stringify(se_ReloadTablesMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1278,7 +1215,7 @@ export const se_RemoveTagsFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromResource"); let body: any; - body = JSON.stringify(se_RemoveTagsFromResourceMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1303,7 +1240,7 @@ export const se_StartRecommendationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartRecommendations"); let body: any; - body = JSON.stringify(se_StartRecommendationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1329,7 +1266,7 @@ export const se_StartReplicationTaskAssessmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartReplicationTaskAssessment"); let body: any; - body = JSON.stringify(se_StartReplicationTaskAssessmentMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1342,7 +1279,7 @@ export const se_StartReplicationTaskAssessmentRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartReplicationTaskAssessmentRun"); let body: any; - body = JSON.stringify(se_StartReplicationTaskAssessmentRunMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1355,7 +1292,7 @@ export const se_StopReplicationTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopReplicationTask"); let body: any; - body = JSON.stringify(se_StopReplicationTaskMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1368,7 +1305,7 @@ export const se_TestConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestConnection"); let body: any; - body = JSON.stringify(se_TestConnectionMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1381,7 +1318,7 @@ export const se_UpdateSubscriptionsToEventBridgeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSubscriptionsToEventBridge"); let body: any; - body = JSON.stringify(se_UpdateSubscriptionsToEventBridgeMessage(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1397,12 +1334,12 @@ export const de_AddTagsToResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsToResourceResponse(data, context); + contents = _json(data); const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1423,10 +1360,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,7 +1385,7 @@ export const de_ApplyPendingMaintenanceActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1470,10 +1406,9 @@ const de_ApplyPendingMaintenanceActionCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1491,12 +1426,12 @@ export const de_BatchStartRecommendationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchStartRecommendationsResponse(data, context); + contents = _json(data); const response: BatchStartRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1523,10 +1458,9 @@ const de_BatchStartRecommendationsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1549,7 +1483,7 @@ export const de_CancelReplicationTaskAssessmentRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1576,10 +1510,9 @@ const de_CancelReplicationTaskAssessmentRunCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1597,12 +1530,12 @@ export const de_CreateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEndpointResponse(data, context); + contents = _json(data); const response: CreateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1641,10 +1574,9 @@ const de_CreateEndpointCommandError = async ( throw await de_S3AccessDeniedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1662,12 +1594,12 @@ export const de_CreateEventSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEventSubscriptionResponse(data, context); + contents = _json(data); const response: CreateEventSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1715,10 +1647,9 @@ const de_CreateEventSubscriptionCommandError = async ( throw await de_SNSNoAuthorizationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1736,12 +1667,12 @@ export const de_CreateFleetAdvisorCollectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFleetAdvisorCollectorResponse(data, context); + contents = _json(data); const response: CreateFleetAdvisorCollectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1774,10 +1705,9 @@ const de_CreateFleetAdvisorCollectorCommandError = async ( throw await de_S3ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1800,7 +1730,7 @@ export const de_CreateReplicationInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1848,10 +1778,9 @@ const de_CreateReplicationInstanceCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1869,12 +1798,12 @@ export const de_CreateReplicationSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateReplicationSubnetGroupResponse(data, context); + contents = _json(data); const response: CreateReplicationSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1910,10 +1839,9 @@ const de_CreateReplicationSubnetGroupCommandError = async ( throw await de_ResourceQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1936,7 +1864,7 @@ export const de_CreateReplicationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1972,10 +1900,9 @@ const de_CreateReplicationTaskCommandError = async ( throw await de_ResourceQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1998,7 +1925,7 @@ export const de_DeleteCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2022,10 +1949,9 @@ const de_DeleteCertificateCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2043,12 +1969,12 @@ export const de_DeleteConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConnectionResponse(data, context); + contents = _json(data); const response: DeleteConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2075,10 +2001,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2096,12 +2021,12 @@ export const de_DeleteEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEndpointResponse(data, context); + contents = _json(data); const response: DeleteEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2125,10 +2050,9 @@ const de_DeleteEndpointCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2146,12 +2070,12 @@ export const de_DeleteEventSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEventSubscriptionResponse(data, context); + contents = _json(data); const response: DeleteEventSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2175,10 +2099,9 @@ const de_DeleteEventSubscriptionCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2198,7 +2121,7 @@ export const de_DeleteFleetAdvisorCollectorCommand = async ( const response: DeleteFleetAdvisorCollectorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2222,10 +2145,9 @@ const de_DeleteFleetAdvisorCollectorCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2243,12 +2165,12 @@ export const de_DeleteFleetAdvisorDatabasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFleetAdvisorDatabasesResponse(data, context); + contents = _json(data); const response: DeleteFleetAdvisorDatabasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2272,10 +2194,9 @@ const de_DeleteFleetAdvisorDatabasesCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2298,7 +2219,7 @@ export const de_DeleteReplicationInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2322,10 +2243,9 @@ const de_DeleteReplicationInstanceCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2343,12 +2263,12 @@ export const de_DeleteReplicationSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteReplicationSubnetGroupResponse(data, context); + contents = _json(data); const response: DeleteReplicationSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2372,10 +2292,9 @@ const de_DeleteReplicationSubnetGroupCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2398,7 +2317,7 @@ export const de_DeleteReplicationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2422,10 +2341,9 @@ const de_DeleteReplicationTaskCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2448,7 +2366,7 @@ export const de_DeleteReplicationTaskAssessmentRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2475,10 +2393,9 @@ const de_DeleteReplicationTaskAssessmentRunCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2496,12 +2413,12 @@ export const de_DescribeAccountAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccountAttributesResponse(data, context); + contents = _json(data); const response: DescribeAccountAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2517,10 +2434,9 @@ const de_DescribeAccountAttributesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2537,12 +2453,12 @@ export const de_DescribeApplicableIndividualAssessmentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeApplicableIndividualAssessmentsResponse(data, context); + contents = _json(data); const response: DescribeApplicableIndividualAssessmentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2569,10 +2485,9 @@ const de_DescribeApplicableIndividualAssessmentsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2595,7 +2510,7 @@ export const de_DescribeCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2616,10 +2531,9 @@ const de_DescribeCertificatesCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2637,12 +2551,12 @@ export const de_DescribeConnectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConnectionsResponse(data, context); + contents = _json(data); const response: DescribeConnectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2663,10 +2577,9 @@ const de_DescribeConnectionsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2684,12 +2597,12 @@ export const de_DescribeEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEndpointsResponse(data, context); + contents = _json(data); const response: DescribeEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2710,10 +2623,9 @@ const de_DescribeEndpointsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2731,12 +2643,12 @@ export const de_DescribeEndpointSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEndpointSettingsResponse(data, context); + contents = _json(data); const response: DescribeEndpointSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2752,10 +2664,9 @@ const de_DescribeEndpointSettingsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2772,12 +2683,12 @@ export const de_DescribeEndpointTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEndpointTypesResponse(data, context); + contents = _json(data); const response: DescribeEndpointTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2793,10 +2704,9 @@ const de_DescribeEndpointTypesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2813,12 +2723,12 @@ export const de_DescribeEventCategoriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEventCategoriesResponse(data, context); + contents = _json(data); const response: DescribeEventCategoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2834,10 +2744,9 @@ const de_DescribeEventCategoriesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2859,7 +2768,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2875,10 +2784,9 @@ const de_DescribeEventsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2895,12 +2803,12 @@ export const de_DescribeEventSubscriptionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEventSubscriptionsResponse(data, context); + contents = _json(data); const response: DescribeEventSubscriptionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2921,10 +2829,9 @@ const de_DescribeEventSubscriptionsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2942,12 +2849,12 @@ export const de_DescribeFleetAdvisorCollectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetAdvisorCollectorsResponse(data, context); + contents = _json(data); const response: DescribeFleetAdvisorCollectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2968,10 +2875,9 @@ const de_DescribeFleetAdvisorCollectorsCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2989,12 +2895,12 @@ export const de_DescribeFleetAdvisorDatabasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetAdvisorDatabasesResponse(data, context); + contents = _json(data); const response: DescribeFleetAdvisorDatabasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3015,10 +2921,9 @@ const de_DescribeFleetAdvisorDatabasesCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3036,12 +2941,12 @@ export const de_DescribeFleetAdvisorLsaAnalysisCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetAdvisorLsaAnalysisResponse(data, context); + contents = _json(data); const response: DescribeFleetAdvisorLsaAnalysisCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3062,10 +2967,9 @@ const de_DescribeFleetAdvisorLsaAnalysisCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3083,12 +2987,12 @@ export const de_DescribeFleetAdvisorSchemaObjectSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetAdvisorSchemaObjectSummaryResponse(data, context); + contents = _json(data); const response: DescribeFleetAdvisorSchemaObjectSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3109,10 +3013,9 @@ const de_DescribeFleetAdvisorSchemaObjectSummaryCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3135,7 +3038,7 @@ export const de_DescribeFleetAdvisorSchemasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3156,10 +3059,9 @@ const de_DescribeFleetAdvisorSchemasCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3177,12 +3079,12 @@ export const de_DescribeOrderableReplicationInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeOrderableReplicationInstancesResponse(data, context); + contents = _json(data); const response: DescribeOrderableReplicationInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3198,10 +3100,9 @@ const de_DescribeOrderableReplicationInstancesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3223,7 +3124,7 @@ export const de_DescribePendingMaintenanceActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3244,10 +3145,9 @@ const de_DescribePendingMaintenanceActionsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3265,12 +3165,12 @@ export const de_DescribeRecommendationLimitationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRecommendationLimitationsResponse(data, context); + contents = _json(data); const response: DescribeRecommendationLimitationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3294,10 +3194,9 @@ const de_DescribeRecommendationLimitationsCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3320,7 +3219,7 @@ export const de_DescribeRecommendationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3344,10 +3243,9 @@ const de_DescribeRecommendationsCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3370,7 +3268,7 @@ export const de_DescribeRefreshSchemasStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3394,10 +3292,9 @@ const de_DescribeRefreshSchemasStatusCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3420,7 +3317,7 @@ export const de_DescribeReplicationInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3441,10 +3338,9 @@ const de_DescribeReplicationInstancesCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3462,12 +3358,12 @@ export const de_DescribeReplicationInstanceTaskLogsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeReplicationInstanceTaskLogsResponse(data, context); + contents = _json(data); const response: DescribeReplicationInstanceTaskLogsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3491,10 +3387,9 @@ const de_DescribeReplicationInstanceTaskLogsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3512,12 +3407,12 @@ export const de_DescribeReplicationSubnetGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeReplicationSubnetGroupsResponse(data, context); + contents = _json(data); const response: DescribeReplicationSubnetGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3538,10 +3433,9 @@ const de_DescribeReplicationSubnetGroupsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3564,7 +3458,7 @@ export const de_DescribeReplicationTaskAssessmentResultsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3585,10 +3479,9 @@ const de_DescribeReplicationTaskAssessmentResultsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3611,7 +3504,7 @@ export const de_DescribeReplicationTaskAssessmentRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3632,10 +3525,9 @@ const de_DescribeReplicationTaskAssessmentRunsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3658,7 +3550,7 @@ export const de_DescribeReplicationTaskIndividualAssessmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3679,10 +3571,9 @@ const de_DescribeReplicationTaskIndividualAssessmentsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3705,7 +3596,7 @@ export const de_DescribeReplicationTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3726,10 +3617,9 @@ const de_DescribeReplicationTasksCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3747,12 +3637,12 @@ export const de_DescribeSchemasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSchemasResponse(data, context); + contents = _json(data); const response: DescribeSchemasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3776,10 +3666,9 @@ const de_DescribeSchemasCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3802,7 +3691,7 @@ export const de_DescribeTableStatisticsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3826,10 +3715,9 @@ const de_DescribeTableStatisticsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3852,7 +3740,7 @@ export const de_ImportCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3879,10 +3767,9 @@ const de_ImportCertificateCommandError = async ( throw await de_ResourceQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3900,12 +3787,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3926,10 +3813,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3947,12 +3833,12 @@ export const de_ModifyEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyEndpointResponse(data, context); + contents = _json(data); const response: ModifyEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3985,10 +3871,9 @@ const de_ModifyEndpointCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4006,12 +3891,12 @@ export const de_ModifyEventSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyEventSubscriptionResponse(data, context); + contents = _json(data); const response: ModifyEventSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4056,10 +3941,9 @@ const de_ModifyEventSubscriptionCommandError = async ( throw await de_SNSNoAuthorizationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4082,7 +3966,7 @@ export const de_ModifyReplicationInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4121,10 +4005,9 @@ const de_ModifyReplicationInstanceCommandError = async ( throw await de_UpgradeDependencyFailureFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4142,12 +4025,12 @@ export const de_ModifyReplicationSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyReplicationSubnetGroupResponse(data, context); + contents = _json(data); const response: ModifyReplicationSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4183,10 +4066,9 @@ const de_ModifyReplicationSubnetGroupCommandError = async ( throw await de_SubnetAlreadyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4209,7 +4091,7 @@ export const de_ModifyReplicationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4239,10 +4121,9 @@ const de_ModifyReplicationTaskCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4265,7 +4146,7 @@ export const de_MoveReplicationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4298,10 +4179,9 @@ const de_MoveReplicationTaskCommandError = async ( throw await de_ResourceQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4324,7 +4204,7 @@ export const de_RebootReplicationInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4348,10 +4228,9 @@ const de_RebootReplicationInstanceCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4374,7 +4253,7 @@ export const de_RefreshSchemasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4404,10 +4283,9 @@ const de_RefreshSchemasCommandError = async ( throw await de_ResourceQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4425,12 +4303,12 @@ export const de_ReloadTablesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ReloadTablesResponse(data, context); + contents = _json(data); const response: ReloadTablesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4454,10 +4332,9 @@ const de_ReloadTablesCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4475,12 +4352,12 @@ export const de_RemoveTagsFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsFromResourceResponse(data, context); + contents = _json(data); const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4501,10 +4378,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4522,12 +4398,12 @@ export const de_RunFleetAdvisorLsaAnalysisCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RunFleetAdvisorLsaAnalysisResponse(data, context); + contents = _json(data); const response: RunFleetAdvisorLsaAnalysisCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4551,10 +4427,9 @@ const de_RunFleetAdvisorLsaAnalysisCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4574,7 +4449,7 @@ export const de_StartRecommendationsCommand = async ( const response: StartRecommendationsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4601,10 +4476,9 @@ const de_StartRecommendationsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4627,7 +4501,7 @@ export const de_StartReplicationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4654,10 +4528,9 @@ const de_StartReplicationTaskCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4680,7 +4553,7 @@ export const de_StartReplicationTaskAssessmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4704,10 +4577,9 @@ const de_StartReplicationTaskAssessmentCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4730,7 +4602,7 @@ export const de_StartReplicationTaskAssessmentRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4784,10 +4656,9 @@ const de_StartReplicationTaskAssessmentRunCommandError = async ( throw await de_S3ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4810,7 +4681,7 @@ export const de_StopReplicationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4834,10 +4705,9 @@ const de_StopReplicationTaskCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4855,12 +4725,12 @@ export const de_TestConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestConnectionResponse(data, context); + contents = _json(data); const response: TestConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4893,10 +4763,9 @@ const de_TestConnectionCommandError = async ( throw await de_ResourceQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4914,12 +4783,12 @@ export const de_UpdateSubscriptionsToEventBridgeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSubscriptionsToEventBridgeResponse(data, context); + contents = _json(data); const response: UpdateSubscriptionsToEventBridgeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4943,10 +4812,9 @@ const de_UpdateSubscriptionsToEventBridgeCommandError = async ( throw await de_InvalidResourceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4957,7 +4825,7 @@ const de_UpdateSubscriptionsToEventBridgeCommandError = async ( */ const de_AccessDeniedFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedFault(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4973,7 +4841,7 @@ const de_CollectorNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CollectorNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new CollectorNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4989,7 +4857,7 @@ const de_InsufficientResourceCapacityFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientResourceCapacityFault(body, context); + const deserialized: any = _json(body); const exception = new InsufficientResourceCapacityFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5005,7 +4873,7 @@ const de_InvalidCertificateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCertificateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidCertificateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5021,7 +4889,7 @@ const de_InvalidOperationFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5037,7 +4905,7 @@ const de_InvalidResourceStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5050,7 +4918,7 @@ const de_InvalidResourceStateFaultRes = async ( */ const de_InvalidSubnetRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSubnet(body, context); + const deserialized: any = _json(body); const exception = new InvalidSubnet({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5066,7 +4934,7 @@ const de_KMSAccessDeniedFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSAccessDeniedFault(body, context); + const deserialized: any = _json(body); const exception = new KMSAccessDeniedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5079,7 +4947,7 @@ const de_KMSAccessDeniedFaultRes = async ( */ const de_KMSDisabledFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSDisabledFault(body, context); + const deserialized: any = _json(body); const exception = new KMSDisabledFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5092,7 +4960,7 @@ const de_KMSDisabledFaultRes = async (parsedOutput: any, context: __SerdeContext */ const de_KMSFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSFault(body, context); + const deserialized: any = _json(body); const exception = new KMSFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5108,7 +4976,7 @@ const de_KMSInvalidStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSInvalidStateFault(body, context); + const deserialized: any = _json(body); const exception = new KMSInvalidStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5124,7 +4992,7 @@ const de_KMSKeyNotAccessibleFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSKeyNotAccessibleFault(body, context); + const deserialized: any = _json(body); const exception = new KMSKeyNotAccessibleFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5137,7 +5005,7 @@ const de_KMSKeyNotAccessibleFaultRes = async ( */ const de_KMSNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new KMSNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5150,7 +5018,7 @@ const de_KMSNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext */ const de_KMSThrottlingFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSThrottlingFault(body, context); + const deserialized: any = _json(body); const exception = new KMSThrottlingFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5166,7 +5034,7 @@ const de_ReplicationSubnetGroupDoesNotCoverEnoughAZsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplicationSubnetGroupDoesNotCoverEnoughAZs(body, context); + const deserialized: any = _json(body); const exception = new ReplicationSubnetGroupDoesNotCoverEnoughAZs({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5182,7 +5050,7 @@ const de_ResourceAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5198,7 +5066,7 @@ const de_ResourceNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5214,7 +5082,7 @@ const de_ResourceQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ResourceQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5227,7 +5095,7 @@ const de_ResourceQuotaExceededFaultRes = async ( */ const de_S3AccessDeniedFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_S3AccessDeniedFault(body, context); + const deserialized: any = _json(body); const exception = new S3AccessDeniedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5243,7 +5111,7 @@ const de_S3ResourceNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_S3ResourceNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new S3ResourceNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5259,7 +5127,7 @@ const de_SNSInvalidTopicFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SNSInvalidTopicFault(body, context); + const deserialized: any = _json(body); const exception = new SNSInvalidTopicFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5275,7 +5143,7 @@ const de_SNSNoAuthorizationFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SNSNoAuthorizationFault(body, context); + const deserialized: any = _json(body); const exception = new SNSNoAuthorizationFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5291,7 +5159,7 @@ const de_StorageQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StorageQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new StorageQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5304,7 +5172,7 @@ const de_StorageQuotaExceededFaultRes = async ( */ const de_SubnetAlreadyInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetAlreadyInUse(body, context); + const deserialized: any = _json(body); const exception = new SubnetAlreadyInUse({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5320,7 +5188,7 @@ const de_UpgradeDependencyFailureFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UpgradeDependencyFailureFault(body, context); + const deserialized: any = _json(body); const exception = new UpgradeDependencyFailureFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5328,1783 +5196,317 @@ const de_UpgradeDependencyFailureFaultRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsToResourceMessage - */ -const se_AddTagsToResourceMessage = (input: AddTagsToResourceMessage, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AddTagsToResourceMessage omitted. -/** - * serializeAws_json1_1ApplyPendingMaintenanceActionMessage - */ -const se_ApplyPendingMaintenanceActionMessage = ( - input: ApplyPendingMaintenanceActionMessage, - context: __SerdeContext -): any => { - return { - ...(input.ApplyAction != null && { ApplyAction: input.ApplyAction }), - ...(input.OptInType != null && { OptInType: input.OptInType }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_ApplyPendingMaintenanceActionMessage omitted. -/** - * serializeAws_json1_1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArnList omitted. -/** - * serializeAws_json1_1BatchStartRecommendationsRequest - */ -const se_BatchStartRecommendationsRequest = (input: BatchStartRecommendationsRequest, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: se_StartRecommendationsRequestEntryList(input.Data, context) }), - }; -}; +// se_BatchStartRecommendationsRequest omitted. -/** - * serializeAws_json1_1CancelReplicationTaskAssessmentRunMessage - */ -const se_CancelReplicationTaskAssessmentRunMessage = ( - input: CancelReplicationTaskAssessmentRunMessage, - context: __SerdeContext -): any => { - return { - ...(input.ReplicationTaskAssessmentRunArn != null && { - ReplicationTaskAssessmentRunArn: input.ReplicationTaskAssessmentRunArn, - }), - }; -}; +// se_CancelReplicationTaskAssessmentRunMessage omitted. -/** - * serializeAws_json1_1CreateEndpointMessage - */ -const se_CreateEndpointMessage = (input: CreateEndpointMessage, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DmsTransferSettings != null && { - DmsTransferSettings: se_DmsTransferSettings(input.DmsTransferSettings, context), - }), - ...(input.DocDbSettings != null && { DocDbSettings: se_DocDbSettings(input.DocDbSettings, context) }), - ...(input.DynamoDbSettings != null && { DynamoDbSettings: se_DynamoDbSettings(input.DynamoDbSettings, context) }), - ...(input.ElasticsearchSettings != null && { - ElasticsearchSettings: se_ElasticsearchSettings(input.ElasticsearchSettings, context), - }), - ...(input.EndpointIdentifier != null && { EndpointIdentifier: input.EndpointIdentifier }), - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.EngineName != null && { EngineName: input.EngineName }), - ...(input.ExternalTableDefinition != null && { ExternalTableDefinition: input.ExternalTableDefinition }), - ...(input.ExtraConnectionAttributes != null && { ExtraConnectionAttributes: input.ExtraConnectionAttributes }), - ...(input.GcpMySQLSettings != null && { GcpMySQLSettings: se_GcpMySQLSettings(input.GcpMySQLSettings, context) }), - ...(input.IBMDb2Settings != null && { IBMDb2Settings: se_IBMDb2Settings(input.IBMDb2Settings, context) }), - ...(input.KafkaSettings != null && { KafkaSettings: se_KafkaSettings(input.KafkaSettings, context) }), - ...(input.KinesisSettings != null && { KinesisSettings: se_KinesisSettings(input.KinesisSettings, context) }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MicrosoftSQLServerSettings != null && { - MicrosoftSQLServerSettings: se_MicrosoftSQLServerSettings(input.MicrosoftSQLServerSettings, context), - }), - ...(input.MongoDbSettings != null && { MongoDbSettings: se_MongoDbSettings(input.MongoDbSettings, context) }), - ...(input.MySQLSettings != null && { MySQLSettings: se_MySQLSettings(input.MySQLSettings, context) }), - ...(input.NeptuneSettings != null && { NeptuneSettings: se_NeptuneSettings(input.NeptuneSettings, context) }), - ...(input.OracleSettings != null && { OracleSettings: se_OracleSettings(input.OracleSettings, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.PostgreSQLSettings != null && { - PostgreSQLSettings: se_PostgreSQLSettings(input.PostgreSQLSettings, context), - }), - ...(input.RedisSettings != null && { RedisSettings: se_RedisSettings(input.RedisSettings, context) }), - ...(input.RedshiftSettings != null && { RedshiftSettings: se_RedshiftSettings(input.RedshiftSettings, context) }), - ...(input.ResourceIdentifier != null && { ResourceIdentifier: input.ResourceIdentifier }), - ...(input.S3Settings != null && { S3Settings: se_S3Settings(input.S3Settings, context) }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - ...(input.SslMode != null && { SslMode: input.SslMode }), - ...(input.SybaseSettings != null && { SybaseSettings: se_SybaseSettings(input.SybaseSettings, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1CreateEventSubscriptionMessage - */ -const se_CreateEventSubscriptionMessage = (input: CreateEventSubscriptionMessage, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.EventCategories != null && { EventCategories: se_EventCategoriesList(input.EventCategories, context) }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SourceIds != null && { SourceIds: se_SourceIdsList(input.SourceIds, context) }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.SubscriptionName != null && { SubscriptionName: input.SubscriptionName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateEndpointMessage omitted. -/** - * serializeAws_json1_1CreateFleetAdvisorCollectorRequest - */ -const se_CreateFleetAdvisorCollectorRequest = ( - input: CreateFleetAdvisorCollectorRequest, - context: __SerdeContext -): any => { - return { - ...(input.CollectorName != null && { CollectorName: input.CollectorName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - }; -}; +// se_CreateEventSubscriptionMessage omitted. -/** - * serializeAws_json1_1CreateReplicationInstanceMessage - */ -const se_CreateReplicationInstanceMessage = (input: CreateReplicationInstanceMessage, context: __SerdeContext): any => { - return { - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.AutoMinorVersionUpgrade != null && { AutoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.DnsNameServers != null && { DnsNameServers: input.DnsNameServers }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MultiAZ != null && { MultiAZ: input.MultiAZ }), - ...(input.NetworkType != null && { NetworkType: input.NetworkType }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.PubliclyAccessible != null && { PubliclyAccessible: input.PubliclyAccessible }), - ...(input.ReplicationInstanceClass != null && { ReplicationInstanceClass: input.ReplicationInstanceClass }), - ...(input.ReplicationInstanceIdentifier != null && { - ReplicationInstanceIdentifier: input.ReplicationInstanceIdentifier, - }), - ...(input.ReplicationSubnetGroupIdentifier != null && { - ReplicationSubnetGroupIdentifier: input.ReplicationSubnetGroupIdentifier, - }), - ...(input.ResourceIdentifier != null && { ResourceIdentifier: input.ResourceIdentifier }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcSecurityGroupIds != null && { - VpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.VpcSecurityGroupIds, context), - }), - }; -}; - -/** - * serializeAws_json1_1CreateReplicationSubnetGroupMessage - */ -const se_CreateReplicationSubnetGroupMessage = ( - input: CreateReplicationSubnetGroupMessage, - context: __SerdeContext -): any => { - return { - ...(input.ReplicationSubnetGroupDescription != null && { - ReplicationSubnetGroupDescription: input.ReplicationSubnetGroupDescription, - }), - ...(input.ReplicationSubnetGroupIdentifier != null && { - ReplicationSubnetGroupIdentifier: input.ReplicationSubnetGroupIdentifier, - }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdentifierList(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateFleetAdvisorCollectorRequest omitted. + +// se_CreateReplicationInstanceMessage omitted. + +// se_CreateReplicationSubnetGroupMessage omitted. /** * serializeAws_json1_1CreateReplicationTaskMessage */ const se_CreateReplicationTaskMessage = (input: CreateReplicationTaskMessage, context: __SerdeContext): any => { - return { - ...(input.CdcStartPosition != null && { CdcStartPosition: input.CdcStartPosition }), - ...(input.CdcStartTime != null && { CdcStartTime: Math.round(input.CdcStartTime.getTime() / 1000) }), - ...(input.CdcStopPosition != null && { CdcStopPosition: input.CdcStopPosition }), - ...(input.MigrationType != null && { MigrationType: input.MigrationType }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - ...(input.ReplicationTaskIdentifier != null && { ReplicationTaskIdentifier: input.ReplicationTaskIdentifier }), - ...(input.ReplicationTaskSettings != null && { ReplicationTaskSettings: input.ReplicationTaskSettings }), - ...(input.ResourceIdentifier != null && { ResourceIdentifier: input.ResourceIdentifier }), - ...(input.SourceEndpointArn != null && { SourceEndpointArn: input.SourceEndpointArn }), - ...(input.TableMappings != null && { TableMappings: input.TableMappings }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetEndpointArn != null && { TargetEndpointArn: input.TargetEndpointArn }), - ...(input.TaskData != null && { TaskData: input.TaskData }), - }; + return take(input, { + CdcStartPosition: [], + CdcStartTime: (_) => Math.round(_.getTime() / 1000), + CdcStopPosition: [], + MigrationType: [], + ReplicationInstanceArn: [], + ReplicationTaskIdentifier: [], + ReplicationTaskSettings: [], + ResourceIdentifier: [], + SourceEndpointArn: [], + TableMappings: [], + Tags: _json, + TargetEndpointArn: [], + TaskData: [], + }); }; -/** - * serializeAws_json1_1DeleteCertificateMessage - */ -const se_DeleteCertificateMessage = (input: DeleteCertificateMessage, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - }; -}; +// se_DeleteCertificateMessage omitted. -/** - * serializeAws_json1_1DeleteCollectorRequest - */ -const se_DeleteCollectorRequest = (input: DeleteCollectorRequest, context: __SerdeContext): any => { - return { - ...(input.CollectorReferencedId != null && { CollectorReferencedId: input.CollectorReferencedId }), - }; -}; +// se_DeleteCollectorRequest omitted. -/** - * serializeAws_json1_1DeleteConnectionMessage - */ -const se_DeleteConnectionMessage = (input: DeleteConnectionMessage, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_DeleteConnectionMessage omitted. -/** - * serializeAws_json1_1DeleteEndpointMessage - */ -const se_DeleteEndpointMessage = (input: DeleteEndpointMessage, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - }; -}; +// se_DeleteEndpointMessage omitted. -/** - * serializeAws_json1_1DeleteEventSubscriptionMessage - */ -const se_DeleteEventSubscriptionMessage = (input: DeleteEventSubscriptionMessage, context: __SerdeContext): any => { - return { - ...(input.SubscriptionName != null && { SubscriptionName: input.SubscriptionName }), - }; -}; +// se_DeleteEventSubscriptionMessage omitted. -/** - * serializeAws_json1_1DeleteFleetAdvisorDatabasesRequest - */ -const se_DeleteFleetAdvisorDatabasesRequest = ( - input: DeleteFleetAdvisorDatabasesRequest, - context: __SerdeContext -): any => { - return { - ...(input.DatabaseIds != null && { DatabaseIds: se_StringList(input.DatabaseIds, context) }), - }; -}; +// se_DeleteFleetAdvisorDatabasesRequest omitted. -/** - * serializeAws_json1_1DeleteReplicationInstanceMessage - */ -const se_DeleteReplicationInstanceMessage = (input: DeleteReplicationInstanceMessage, context: __SerdeContext): any => { - return { - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_DeleteReplicationInstanceMessage omitted. -/** - * serializeAws_json1_1DeleteReplicationSubnetGroupMessage - */ -const se_DeleteReplicationSubnetGroupMessage = ( - input: DeleteReplicationSubnetGroupMessage, - context: __SerdeContext -): any => { - return { - ...(input.ReplicationSubnetGroupIdentifier != null && { - ReplicationSubnetGroupIdentifier: input.ReplicationSubnetGroupIdentifier, - }), - }; -}; +// se_DeleteReplicationSubnetGroupMessage omitted. -/** - * serializeAws_json1_1DeleteReplicationTaskAssessmentRunMessage - */ -const se_DeleteReplicationTaskAssessmentRunMessage = ( - input: DeleteReplicationTaskAssessmentRunMessage, - context: __SerdeContext -): any => { - return { - ...(input.ReplicationTaskAssessmentRunArn != null && { - ReplicationTaskAssessmentRunArn: input.ReplicationTaskAssessmentRunArn, - }), - }; -}; +// se_DeleteReplicationTaskAssessmentRunMessage omitted. -/** - * serializeAws_json1_1DeleteReplicationTaskMessage - */ -const se_DeleteReplicationTaskMessage = (input: DeleteReplicationTaskMessage, context: __SerdeContext): any => { - return { - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - }; -}; +// se_DeleteReplicationTaskMessage omitted. -/** - * serializeAws_json1_1DescribeAccountAttributesMessage - */ -const se_DescribeAccountAttributesMessage = (input: DescribeAccountAttributesMessage, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeAccountAttributesMessage omitted. -/** - * serializeAws_json1_1DescribeApplicableIndividualAssessmentsMessage - */ -const se_DescribeApplicableIndividualAssessmentsMessage = ( - input: DescribeApplicableIndividualAssessmentsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.MigrationType != null && { MigrationType: input.MigrationType }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - ...(input.SourceEngineName != null && { SourceEngineName: input.SourceEngineName }), - ...(input.TargetEngineName != null && { TargetEngineName: input.TargetEngineName }), - }; -}; +// se_DescribeApplicableIndividualAssessmentsMessage omitted. -/** - * serializeAws_json1_1DescribeCertificatesMessage - */ -const se_DescribeCertificatesMessage = (input: DescribeCertificatesMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeCertificatesMessage omitted. -/** - * serializeAws_json1_1DescribeConnectionsMessage - */ -const se_DescribeConnectionsMessage = (input: DescribeConnectionsMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeConnectionsMessage omitted. -/** - * serializeAws_json1_1DescribeEndpointSettingsMessage - */ -const se_DescribeEndpointSettingsMessage = (input: DescribeEndpointSettingsMessage, context: __SerdeContext): any => { - return { - ...(input.EngineName != null && { EngineName: input.EngineName }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeEndpointSettingsMessage omitted. -/** - * serializeAws_json1_1DescribeEndpointsMessage - */ -const se_DescribeEndpointsMessage = (input: DescribeEndpointsMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeEndpointsMessage omitted. -/** - * serializeAws_json1_1DescribeEndpointTypesMessage - */ -const se_DescribeEndpointTypesMessage = (input: DescribeEndpointTypesMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeEndpointTypesMessage omitted. -/** - * serializeAws_json1_1DescribeEventCategoriesMessage - */ -const se_DescribeEventCategoriesMessage = (input: DescribeEventCategoriesMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - }; -}; +// se_DescribeEventCategoriesMessage omitted. /** * serializeAws_json1_1DescribeEventsMessage */ const se_DescribeEventsMessage = (input: DescribeEventsMessage, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.EventCategories != null && { EventCategories: se_EventCategoriesList(input.EventCategories, context) }), - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.SourceIdentifier != null && { SourceIdentifier: input.SourceIdentifier }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + Duration: [], + EndTime: (_) => Math.round(_.getTime() / 1000), + EventCategories: _json, + Filters: _json, + Marker: [], + MaxRecords: [], + SourceIdentifier: [], + SourceType: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DescribeEventSubscriptionsMessage - */ -const se_DescribeEventSubscriptionsMessage = ( - input: DescribeEventSubscriptionsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.SubscriptionName != null && { SubscriptionName: input.SubscriptionName }), - }; -}; +// se_DescribeEventSubscriptionsMessage omitted. -/** - * serializeAws_json1_1DescribeFleetAdvisorCollectorsRequest - */ -const se_DescribeFleetAdvisorCollectorsRequest = ( - input: DescribeFleetAdvisorCollectorsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetAdvisorCollectorsRequest omitted. -/** - * serializeAws_json1_1DescribeFleetAdvisorDatabasesRequest - */ -const se_DescribeFleetAdvisorDatabasesRequest = ( - input: DescribeFleetAdvisorDatabasesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetAdvisorDatabasesRequest omitted. -/** - * serializeAws_json1_1DescribeFleetAdvisorLsaAnalysisRequest - */ -const se_DescribeFleetAdvisorLsaAnalysisRequest = ( - input: DescribeFleetAdvisorLsaAnalysisRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetAdvisorLsaAnalysisRequest omitted. -/** - * serializeAws_json1_1DescribeFleetAdvisorSchemaObjectSummaryRequest - */ -const se_DescribeFleetAdvisorSchemaObjectSummaryRequest = ( - input: DescribeFleetAdvisorSchemaObjectSummaryRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetAdvisorSchemaObjectSummaryRequest omitted. -/** - * serializeAws_json1_1DescribeFleetAdvisorSchemasRequest - */ -const se_DescribeFleetAdvisorSchemasRequest = ( - input: DescribeFleetAdvisorSchemasRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetAdvisorSchemasRequest omitted. -/** - * serializeAws_json1_1DescribeOrderableReplicationInstancesMessage - */ -const se_DescribeOrderableReplicationInstancesMessage = ( - input: DescribeOrderableReplicationInstancesMessage, - context: __SerdeContext -): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeOrderableReplicationInstancesMessage omitted. -/** - * serializeAws_json1_1DescribePendingMaintenanceActionsMessage - */ -const se_DescribePendingMaintenanceActionsMessage = ( - input: DescribePendingMaintenanceActionsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_DescribePendingMaintenanceActionsMessage omitted. -/** - * serializeAws_json1_1DescribeRecommendationLimitationsRequest - */ -const se_DescribeRecommendationLimitationsRequest = ( - input: DescribeRecommendationLimitationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeRecommendationLimitationsRequest omitted. -/** - * serializeAws_json1_1DescribeRecommendationsRequest - */ -const se_DescribeRecommendationsRequest = (input: DescribeRecommendationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeRecommendationsRequest omitted. -/** - * serializeAws_json1_1DescribeRefreshSchemasStatusMessage - */ -const se_DescribeRefreshSchemasStatusMessage = ( - input: DescribeRefreshSchemasStatusMessage, - context: __SerdeContext -): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - }; -}; +// se_DescribeRefreshSchemasStatusMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationInstancesMessage - */ -const se_DescribeReplicationInstancesMessage = ( - input: DescribeReplicationInstancesMessage, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeReplicationInstancesMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationInstanceTaskLogsMessage - */ -const se_DescribeReplicationInstanceTaskLogsMessage = ( - input: DescribeReplicationInstanceTaskLogsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_DescribeReplicationInstanceTaskLogsMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationSubnetGroupsMessage - */ -const se_DescribeReplicationSubnetGroupsMessage = ( - input: DescribeReplicationSubnetGroupsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeReplicationSubnetGroupsMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationTaskAssessmentResultsMessage - */ -const se_DescribeReplicationTaskAssessmentResultsMessage = ( - input: DescribeReplicationTaskAssessmentResultsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - }; -}; +// se_DescribeReplicationTaskAssessmentResultsMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationTaskAssessmentRunsMessage - */ -const se_DescribeReplicationTaskAssessmentRunsMessage = ( - input: DescribeReplicationTaskAssessmentRunsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeReplicationTaskAssessmentRunsMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsMessage - */ -const se_DescribeReplicationTaskIndividualAssessmentsMessage = ( - input: DescribeReplicationTaskIndividualAssessmentsMessage, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeReplicationTaskIndividualAssessmentsMessage omitted. -/** - * serializeAws_json1_1DescribeReplicationTasksMessage - */ -const se_DescribeReplicationTasksMessage = (input: DescribeReplicationTasksMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.WithoutSettings != null && { WithoutSettings: input.WithoutSettings }), - }; -}; +// se_DescribeReplicationTasksMessage omitted. -/** - * serializeAws_json1_1DescribeSchemasMessage - */ -const se_DescribeSchemasMessage = (input: DescribeSchemasMessage, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - }; -}; +// se_DescribeSchemasMessage omitted. -/** - * serializeAws_json1_1DescribeTableStatisticsMessage - */ -const se_DescribeTableStatisticsMessage = (input: DescribeTableStatisticsMessage, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxRecords != null && { MaxRecords: input.MaxRecords }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - }; -}; +// se_DescribeTableStatisticsMessage omitted. -/** - * serializeAws_json1_1DmsTransferSettings - */ -const se_DmsTransferSettings = (input: DmsTransferSettings, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - }; -}; +// se_DmsTransferSettings omitted. -/** - * serializeAws_json1_1DocDbSettings - */ -const se_DocDbSettings = (input: DocDbSettings, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DocsToInvestigate != null && { DocsToInvestigate: input.DocsToInvestigate }), - ...(input.ExtractDocId != null && { ExtractDocId: input.ExtractDocId }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.NestingLevel != null && { NestingLevel: input.NestingLevel }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_DocDbSettings omitted. -/** - * serializeAws_json1_1DynamoDbSettings - */ -const se_DynamoDbSettings = (input: DynamoDbSettings, context: __SerdeContext): any => { - return { - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - }; -}; +// se_DynamoDbSettings omitted. -/** - * serializeAws_json1_1ElasticsearchSettings - */ -const se_ElasticsearchSettings = (input: ElasticsearchSettings, context: __SerdeContext): any => { - return { - ...(input.EndpointUri != null && { EndpointUri: input.EndpointUri }), - ...(input.ErrorRetryDuration != null && { ErrorRetryDuration: input.ErrorRetryDuration }), - ...(input.FullLoadErrorPercentage != null && { FullLoadErrorPercentage: input.FullLoadErrorPercentage }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - ...(input.UseNewMappingType != null && { UseNewMappingType: input.UseNewMappingType }), - }; -}; +// se_ElasticsearchSettings omitted. -/** - * serializeAws_json1_1EventCategoriesList - */ -const se_EventCategoriesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventCategoriesList omitted. -/** - * serializeAws_json1_1ExcludeTestList - */ -const se_ExcludeTestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExcludeTestList omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_json1_1FilterValueList - */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValueList omitted. -/** - * serializeAws_json1_1GcpMySQLSettings - */ -const se_GcpMySQLSettings = (input: GcpMySQLSettings, context: __SerdeContext): any => { - return { - ...(input.AfterConnectScript != null && { AfterConnectScript: input.AfterConnectScript }), - ...(input.CleanSourceMetadataOnMismatch != null && { - CleanSourceMetadataOnMismatch: input.CleanSourceMetadataOnMismatch, - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.EventsPollInterval != null && { EventsPollInterval: input.EventsPollInterval }), - ...(input.MaxFileSize != null && { MaxFileSize: input.MaxFileSize }), - ...(input.ParallelLoadThreads != null && { ParallelLoadThreads: input.ParallelLoadThreads }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServerTimezone != null && { ServerTimezone: input.ServerTimezone }), - ...(input.TargetDbType != null && { TargetDbType: input.TargetDbType }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1IBMDb2Settings - */ -const se_IBMDb2Settings = (input: IBMDb2Settings, context: __SerdeContext): any => { - return { - ...(input.CurrentLsn != null && { CurrentLsn: input.CurrentLsn }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MaxKBytesPerRead != null && { MaxKBytesPerRead: input.MaxKBytesPerRead }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.SetDataCaptureChanges != null && { SetDataCaptureChanges: input.SetDataCaptureChanges }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_GcpMySQLSettings omitted. + +// se_IBMDb2Settings omitted. /** * serializeAws_json1_1ImportCertificateMessage */ const se_ImportCertificateMessage = (input: ImportCertificateMessage, context: __SerdeContext): any => { - return { - ...(input.CertificateIdentifier != null && { CertificateIdentifier: input.CertificateIdentifier }), - ...(input.CertificatePem != null && { CertificatePem: input.CertificatePem }), - ...(input.CertificateWallet != null && { CertificateWallet: context.base64Encoder(input.CertificateWallet) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CertificateIdentifier: [], + CertificatePem: [], + CertificateWallet: context.base64Encoder, + Tags: _json, + }); }; -/** - * serializeAws_json1_1IncludeTestList - */ -const se_IncludeTestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IncludeTestList omitted. -/** - * serializeAws_json1_1IntegerList - */ -const se_IntegerList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IntegerList omitted. -/** - * serializeAws_json1_1KafkaSettings - */ -const se_KafkaSettings = (input: KafkaSettings, context: __SerdeContext): any => { - return { - ...(input.Broker != null && { Broker: input.Broker }), - ...(input.IncludeControlDetails != null && { IncludeControlDetails: input.IncludeControlDetails }), - ...(input.IncludeNullAndEmpty != null && { IncludeNullAndEmpty: input.IncludeNullAndEmpty }), - ...(input.IncludePartitionValue != null && { IncludePartitionValue: input.IncludePartitionValue }), - ...(input.IncludeTableAlterOperations != null && { - IncludeTableAlterOperations: input.IncludeTableAlterOperations, - }), - ...(input.IncludeTransactionDetails != null && { IncludeTransactionDetails: input.IncludeTransactionDetails }), - ...(input.MessageFormat != null && { MessageFormat: input.MessageFormat }), - ...(input.MessageMaxBytes != null && { MessageMaxBytes: input.MessageMaxBytes }), - ...(input.NoHexPrefix != null && { NoHexPrefix: input.NoHexPrefix }), - ...(input.PartitionIncludeSchemaTable != null && { - PartitionIncludeSchemaTable: input.PartitionIncludeSchemaTable, - }), - ...(input.SaslMechanism != null && { SaslMechanism: input.SaslMechanism }), - ...(input.SaslPassword != null && { SaslPassword: input.SaslPassword }), - ...(input.SaslUsername != null && { SaslUsername: input.SaslUsername }), - ...(input.SecurityProtocol != null && { SecurityProtocol: input.SecurityProtocol }), - ...(input.SslCaCertificateArn != null && { SslCaCertificateArn: input.SslCaCertificateArn }), - ...(input.SslClientCertificateArn != null && { SslClientCertificateArn: input.SslClientCertificateArn }), - ...(input.SslClientKeyArn != null && { SslClientKeyArn: input.SslClientKeyArn }), - ...(input.SslClientKeyPassword != null && { SslClientKeyPassword: input.SslClientKeyPassword }), - ...(input.Topic != null && { Topic: input.Topic }), - }; -}; - -/** - * serializeAws_json1_1KeyList - */ -const se_KeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KafkaSettings omitted. -/** - * serializeAws_json1_1KinesisSettings - */ -const se_KinesisSettings = (input: KinesisSettings, context: __SerdeContext): any => { - return { - ...(input.IncludeControlDetails != null && { IncludeControlDetails: input.IncludeControlDetails }), - ...(input.IncludeNullAndEmpty != null && { IncludeNullAndEmpty: input.IncludeNullAndEmpty }), - ...(input.IncludePartitionValue != null && { IncludePartitionValue: input.IncludePartitionValue }), - ...(input.IncludeTableAlterOperations != null && { - IncludeTableAlterOperations: input.IncludeTableAlterOperations, - }), - ...(input.IncludeTransactionDetails != null && { IncludeTransactionDetails: input.IncludeTransactionDetails }), - ...(input.MessageFormat != null && { MessageFormat: input.MessageFormat }), - ...(input.NoHexPrefix != null && { NoHexPrefix: input.NoHexPrefix }), - ...(input.PartitionIncludeSchemaTable != null && { - PartitionIncludeSchemaTable: input.PartitionIncludeSchemaTable, - }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - }; -}; +// se_KeyList omitted. -/** - * serializeAws_json1_1ListTagsForResourceMessage - */ -const se_ListTagsForResourceMessage = (input: ListTagsForResourceMessage, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.ResourceArnList != null && { ResourceArnList: se_ArnList(input.ResourceArnList, context) }), - }; -}; +// se_KinesisSettings omitted. -/** - * serializeAws_json1_1MicrosoftSQLServerSettings - */ -const se_MicrosoftSQLServerSettings = (input: MicrosoftSQLServerSettings, context: __SerdeContext): any => { - return { - ...(input.BcpPacketSize != null && { BcpPacketSize: input.BcpPacketSize }), - ...(input.ControlTablesFileGroup != null && { ControlTablesFileGroup: input.ControlTablesFileGroup }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.ForceLobLookup != null && { ForceLobLookup: input.ForceLobLookup }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.QuerySingleAlwaysOnNode != null && { QuerySingleAlwaysOnNode: input.QuerySingleAlwaysOnNode }), - ...(input.ReadBackupOnly != null && { ReadBackupOnly: input.ReadBackupOnly }), - ...(input.SafeguardPolicy != null && { SafeguardPolicy: input.SafeguardPolicy }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.TlogAccessMode != null && { TlogAccessMode: input.TlogAccessMode }), - ...(input.TrimSpaceInChar != null && { TrimSpaceInChar: input.TrimSpaceInChar }), - ...(input.UseBcpFullLoad != null && { UseBcpFullLoad: input.UseBcpFullLoad }), - ...(input.UseThirdPartyBackupDevice != null && { UseThirdPartyBackupDevice: input.UseThirdPartyBackupDevice }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1ModifyEndpointMessage - */ -const se_ModifyEndpointMessage = (input: ModifyEndpointMessage, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DmsTransferSettings != null && { - DmsTransferSettings: se_DmsTransferSettings(input.DmsTransferSettings, context), - }), - ...(input.DocDbSettings != null && { DocDbSettings: se_DocDbSettings(input.DocDbSettings, context) }), - ...(input.DynamoDbSettings != null && { DynamoDbSettings: se_DynamoDbSettings(input.DynamoDbSettings, context) }), - ...(input.ElasticsearchSettings != null && { - ElasticsearchSettings: se_ElasticsearchSettings(input.ElasticsearchSettings, context), - }), - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.EndpointIdentifier != null && { EndpointIdentifier: input.EndpointIdentifier }), - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.EngineName != null && { EngineName: input.EngineName }), - ...(input.ExactSettings != null && { ExactSettings: input.ExactSettings }), - ...(input.ExternalTableDefinition != null && { ExternalTableDefinition: input.ExternalTableDefinition }), - ...(input.ExtraConnectionAttributes != null && { ExtraConnectionAttributes: input.ExtraConnectionAttributes }), - ...(input.GcpMySQLSettings != null && { GcpMySQLSettings: se_GcpMySQLSettings(input.GcpMySQLSettings, context) }), - ...(input.IBMDb2Settings != null && { IBMDb2Settings: se_IBMDb2Settings(input.IBMDb2Settings, context) }), - ...(input.KafkaSettings != null && { KafkaSettings: se_KafkaSettings(input.KafkaSettings, context) }), - ...(input.KinesisSettings != null && { KinesisSettings: se_KinesisSettings(input.KinesisSettings, context) }), - ...(input.MicrosoftSQLServerSettings != null && { - MicrosoftSQLServerSettings: se_MicrosoftSQLServerSettings(input.MicrosoftSQLServerSettings, context), - }), - ...(input.MongoDbSettings != null && { MongoDbSettings: se_MongoDbSettings(input.MongoDbSettings, context) }), - ...(input.MySQLSettings != null && { MySQLSettings: se_MySQLSettings(input.MySQLSettings, context) }), - ...(input.NeptuneSettings != null && { NeptuneSettings: se_NeptuneSettings(input.NeptuneSettings, context) }), - ...(input.OracleSettings != null && { OracleSettings: se_OracleSettings(input.OracleSettings, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.PostgreSQLSettings != null && { - PostgreSQLSettings: se_PostgreSQLSettings(input.PostgreSQLSettings, context), - }), - ...(input.RedisSettings != null && { RedisSettings: se_RedisSettings(input.RedisSettings, context) }), - ...(input.RedshiftSettings != null && { RedshiftSettings: se_RedshiftSettings(input.RedshiftSettings, context) }), - ...(input.S3Settings != null && { S3Settings: se_S3Settings(input.S3Settings, context) }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - ...(input.SslMode != null && { SslMode: input.SslMode }), - ...(input.SybaseSettings != null && { SybaseSettings: se_SybaseSettings(input.SybaseSettings, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1ModifyEventSubscriptionMessage - */ -const se_ModifyEventSubscriptionMessage = (input: ModifyEventSubscriptionMessage, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.EventCategories != null && { EventCategories: se_EventCategoriesList(input.EventCategories, context) }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.SubscriptionName != null && { SubscriptionName: input.SubscriptionName }), - }; -}; +// se_ListTagsForResourceMessage omitted. -/** - * serializeAws_json1_1ModifyReplicationInstanceMessage - */ -const se_ModifyReplicationInstanceMessage = (input: ModifyReplicationInstanceMessage, context: __SerdeContext): any => { - return { - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.AllowMajorVersionUpgrade != null && { AllowMajorVersionUpgrade: input.AllowMajorVersionUpgrade }), - ...(input.ApplyImmediately != null && { ApplyImmediately: input.ApplyImmediately }), - ...(input.AutoMinorVersionUpgrade != null && { AutoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.MultiAZ != null && { MultiAZ: input.MultiAZ }), - ...(input.NetworkType != null && { NetworkType: input.NetworkType }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - ...(input.ReplicationInstanceClass != null && { ReplicationInstanceClass: input.ReplicationInstanceClass }), - ...(input.ReplicationInstanceIdentifier != null && { - ReplicationInstanceIdentifier: input.ReplicationInstanceIdentifier, - }), - ...(input.VpcSecurityGroupIds != null && { - VpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.VpcSecurityGroupIds, context), - }), - }; -}; +// se_MicrosoftSQLServerSettings omitted. -/** - * serializeAws_json1_1ModifyReplicationSubnetGroupMessage - */ -const se_ModifyReplicationSubnetGroupMessage = ( - input: ModifyReplicationSubnetGroupMessage, - context: __SerdeContext -): any => { - return { - ...(input.ReplicationSubnetGroupDescription != null && { - ReplicationSubnetGroupDescription: input.ReplicationSubnetGroupDescription, - }), - ...(input.ReplicationSubnetGroupIdentifier != null && { - ReplicationSubnetGroupIdentifier: input.ReplicationSubnetGroupIdentifier, - }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdentifierList(input.SubnetIds, context) }), - }; -}; +// se_ModifyEndpointMessage omitted. + +// se_ModifyEventSubscriptionMessage omitted. + +// se_ModifyReplicationInstanceMessage omitted. + +// se_ModifyReplicationSubnetGroupMessage omitted. /** * serializeAws_json1_1ModifyReplicationTaskMessage */ const se_ModifyReplicationTaskMessage = (input: ModifyReplicationTaskMessage, context: __SerdeContext): any => { - return { - ...(input.CdcStartPosition != null && { CdcStartPosition: input.CdcStartPosition }), - ...(input.CdcStartTime != null && { CdcStartTime: Math.round(input.CdcStartTime.getTime() / 1000) }), - ...(input.CdcStopPosition != null && { CdcStopPosition: input.CdcStopPosition }), - ...(input.MigrationType != null && { MigrationType: input.MigrationType }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - ...(input.ReplicationTaskIdentifier != null && { ReplicationTaskIdentifier: input.ReplicationTaskIdentifier }), - ...(input.ReplicationTaskSettings != null && { ReplicationTaskSettings: input.ReplicationTaskSettings }), - ...(input.TableMappings != null && { TableMappings: input.TableMappings }), - ...(input.TaskData != null && { TaskData: input.TaskData }), - }; + return take(input, { + CdcStartPosition: [], + CdcStartTime: (_) => Math.round(_.getTime() / 1000), + CdcStopPosition: [], + MigrationType: [], + ReplicationTaskArn: [], + ReplicationTaskIdentifier: [], + ReplicationTaskSettings: [], + TableMappings: [], + TaskData: [], + }); }; -/** - * serializeAws_json1_1MongoDbSettings - */ -const se_MongoDbSettings = (input: MongoDbSettings, context: __SerdeContext): any => { - return { - ...(input.AuthMechanism != null && { AuthMechanism: input.AuthMechanism }), - ...(input.AuthSource != null && { AuthSource: input.AuthSource }), - ...(input.AuthType != null && { AuthType: input.AuthType }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DocsToInvestigate != null && { DocsToInvestigate: input.DocsToInvestigate }), - ...(input.ExtractDocId != null && { ExtractDocId: input.ExtractDocId }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.NestingLevel != null && { NestingLevel: input.NestingLevel }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_MongoDbSettings omitted. -/** - * serializeAws_json1_1MoveReplicationTaskMessage - */ -const se_MoveReplicationTaskMessage = (input: MoveReplicationTaskMessage, context: __SerdeContext): any => { - return { - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - ...(input.TargetReplicationInstanceArn != null && { - TargetReplicationInstanceArn: input.TargetReplicationInstanceArn, - }), - }; -}; +// se_MoveReplicationTaskMessage omitted. -/** - * serializeAws_json1_1MySQLSettings - */ -const se_MySQLSettings = (input: MySQLSettings, context: __SerdeContext): any => { - return { - ...(input.AfterConnectScript != null && { AfterConnectScript: input.AfterConnectScript }), - ...(input.CleanSourceMetadataOnMismatch != null && { - CleanSourceMetadataOnMismatch: input.CleanSourceMetadataOnMismatch, - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.EventsPollInterval != null && { EventsPollInterval: input.EventsPollInterval }), - ...(input.MaxFileSize != null && { MaxFileSize: input.MaxFileSize }), - ...(input.ParallelLoadThreads != null && { ParallelLoadThreads: input.ParallelLoadThreads }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServerTimezone != null && { ServerTimezone: input.ServerTimezone }), - ...(input.TargetDbType != null && { TargetDbType: input.TargetDbType }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1NeptuneSettings - */ -const se_NeptuneSettings = (input: NeptuneSettings, context: __SerdeContext): any => { - return { - ...(input.ErrorRetryDuration != null && { ErrorRetryDuration: input.ErrorRetryDuration }), - ...(input.IamAuthEnabled != null && { IamAuthEnabled: input.IamAuthEnabled }), - ...(input.MaxFileSize != null && { MaxFileSize: input.MaxFileSize }), - ...(input.MaxRetryCount != null && { MaxRetryCount: input.MaxRetryCount }), - ...(input.S3BucketFolder != null && { S3BucketFolder: input.S3BucketFolder }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - }; -}; +// se_MySQLSettings omitted. -/** - * serializeAws_json1_1OracleSettings - */ -const se_OracleSettings = (input: OracleSettings, context: __SerdeContext): any => { - return { - ...(input.AccessAlternateDirectly != null && { AccessAlternateDirectly: input.AccessAlternateDirectly }), - ...(input.AddSupplementalLogging != null && { AddSupplementalLogging: input.AddSupplementalLogging }), - ...(input.AdditionalArchivedLogDestId != null && { - AdditionalArchivedLogDestId: input.AdditionalArchivedLogDestId, - }), - ...(input.AllowSelectNestedTables != null && { AllowSelectNestedTables: input.AllowSelectNestedTables }), - ...(input.ArchivedLogDestId != null && { ArchivedLogDestId: input.ArchivedLogDestId }), - ...(input.ArchivedLogsOnly != null && { ArchivedLogsOnly: input.ArchivedLogsOnly }), - ...(input.AsmPassword != null && { AsmPassword: input.AsmPassword }), - ...(input.AsmServer != null && { AsmServer: input.AsmServer }), - ...(input.AsmUser != null && { AsmUser: input.AsmUser }), - ...(input.CharLengthSemantics != null && { CharLengthSemantics: input.CharLengthSemantics }), - ...(input.ConvertTimestampWithZoneToUTC != null && { - ConvertTimestampWithZoneToUTC: input.ConvertTimestampWithZoneToUTC, - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DirectPathNoLog != null && { DirectPathNoLog: input.DirectPathNoLog }), - ...(input.DirectPathParallelLoad != null && { DirectPathParallelLoad: input.DirectPathParallelLoad }), - ...(input.EnableHomogenousTablespace != null && { EnableHomogenousTablespace: input.EnableHomogenousTablespace }), - ...(input.ExtraArchivedLogDestIds != null && { - ExtraArchivedLogDestIds: se_IntegerList(input.ExtraArchivedLogDestIds, context), - }), - ...(input.FailTasksOnLobTruncation != null && { FailTasksOnLobTruncation: input.FailTasksOnLobTruncation }), - ...(input.NumberDatatypeScale != null && { NumberDatatypeScale: input.NumberDatatypeScale }), - ...(input.OraclePathPrefix != null && { OraclePathPrefix: input.OraclePathPrefix }), - ...(input.ParallelAsmReadThreads != null && { ParallelAsmReadThreads: input.ParallelAsmReadThreads }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.ReadAheadBlocks != null && { ReadAheadBlocks: input.ReadAheadBlocks }), - ...(input.ReadTableSpaceName != null && { ReadTableSpaceName: input.ReadTableSpaceName }), - ...(input.ReplacePathPrefix != null && { ReplacePathPrefix: input.ReplacePathPrefix }), - ...(input.RetryInterval != null && { RetryInterval: input.RetryInterval }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerOracleAsmAccessRoleArn != null && { - SecretsManagerOracleAsmAccessRoleArn: input.SecretsManagerOracleAsmAccessRoleArn, - }), - ...(input.SecretsManagerOracleAsmSecretId != null && { - SecretsManagerOracleAsmSecretId: input.SecretsManagerOracleAsmSecretId, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.SecurityDbEncryption != null && { SecurityDbEncryption: input.SecurityDbEncryption }), - ...(input.SecurityDbEncryptionName != null && { SecurityDbEncryptionName: input.SecurityDbEncryptionName }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.SpatialDataOptionToGeoJsonFunctionName != null && { - SpatialDataOptionToGeoJsonFunctionName: input.SpatialDataOptionToGeoJsonFunctionName, - }), - ...(input.StandbyDelayTime != null && { StandbyDelayTime: input.StandbyDelayTime }), - ...(input.TrimSpaceInChar != null && { TrimSpaceInChar: input.TrimSpaceInChar }), - ...(input.UseAlternateFolderForOnline != null && { - UseAlternateFolderForOnline: input.UseAlternateFolderForOnline, - }), - ...(input.UseBFile != null && { UseBFile: input.UseBFile }), - ...(input.UseDirectPathFullLoad != null && { UseDirectPathFullLoad: input.UseDirectPathFullLoad }), - ...(input.UseLogminerReader != null && { UseLogminerReader: input.UseLogminerReader }), - ...(input.UsePathPrefix != null && { UsePathPrefix: input.UsePathPrefix }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1PostgreSQLSettings - */ -const se_PostgreSQLSettings = (input: PostgreSQLSettings, context: __SerdeContext): any => { - return { - ...(input.AfterConnectScript != null && { AfterConnectScript: input.AfterConnectScript }), - ...(input.CaptureDdls != null && { CaptureDdls: input.CaptureDdls }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DdlArtifactsSchema != null && { DdlArtifactsSchema: input.DdlArtifactsSchema }), - ...(input.ExecuteTimeout != null && { ExecuteTimeout: input.ExecuteTimeout }), - ...(input.FailTasksOnLobTruncation != null && { FailTasksOnLobTruncation: input.FailTasksOnLobTruncation }), - ...(input.HeartbeatEnable != null && { HeartbeatEnable: input.HeartbeatEnable }), - ...(input.HeartbeatFrequency != null && { HeartbeatFrequency: input.HeartbeatFrequency }), - ...(input.HeartbeatSchema != null && { HeartbeatSchema: input.HeartbeatSchema }), - ...(input.MapBooleanAsBoolean != null && { MapBooleanAsBoolean: input.MapBooleanAsBoolean }), - ...(input.MaxFileSize != null && { MaxFileSize: input.MaxFileSize }), - ...(input.Password != null && { Password: input.Password }), - ...(input.PluginName != null && { PluginName: input.PluginName }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.SlotName != null && { SlotName: input.SlotName }), - ...(input.TrimSpaceInChar != null && { TrimSpaceInChar: input.TrimSpaceInChar }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1RebootReplicationInstanceMessage - */ -const se_RebootReplicationInstanceMessage = (input: RebootReplicationInstanceMessage, context: __SerdeContext): any => { - return { - ...(input.ForceFailover != null && { ForceFailover: input.ForceFailover }), - ...(input.ForcePlannedFailover != null && { ForcePlannedFailover: input.ForcePlannedFailover }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_NeptuneSettings omitted. -/** - * serializeAws_json1_1RecommendationSettings - */ -const se_RecommendationSettings = (input: RecommendationSettings, context: __SerdeContext): any => { - return { - ...(input.InstanceSizingType != null && { InstanceSizingType: input.InstanceSizingType }), - ...(input.WorkloadType != null && { WorkloadType: input.WorkloadType }), - }; -}; +// se_OracleSettings omitted. -/** - * serializeAws_json1_1RedisSettings - */ -const se_RedisSettings = (input: RedisSettings, context: __SerdeContext): any => { - return { - ...(input.AuthPassword != null && { AuthPassword: input.AuthPassword }), - ...(input.AuthType != null && { AuthType: input.AuthType }), - ...(input.AuthUserName != null && { AuthUserName: input.AuthUserName }), - ...(input.Port != null && { Port: input.Port }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.SslCaCertificateArn != null && { SslCaCertificateArn: input.SslCaCertificateArn }), - ...(input.SslSecurityProtocol != null && { SslSecurityProtocol: input.SslSecurityProtocol }), - }; -}; +// se_PostgreSQLSettings omitted. -/** - * serializeAws_json1_1RedshiftSettings - */ -const se_RedshiftSettings = (input: RedshiftSettings, context: __SerdeContext): any => { - return { - ...(input.AcceptAnyDate != null && { AcceptAnyDate: input.AcceptAnyDate }), - ...(input.AfterConnectScript != null && { AfterConnectScript: input.AfterConnectScript }), - ...(input.BucketFolder != null && { BucketFolder: input.BucketFolder }), - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.CaseSensitiveNames != null && { CaseSensitiveNames: input.CaseSensitiveNames }), - ...(input.CompUpdate != null && { CompUpdate: input.CompUpdate }), - ...(input.ConnectionTimeout != null && { ConnectionTimeout: input.ConnectionTimeout }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DateFormat != null && { DateFormat: input.DateFormat }), - ...(input.EmptyAsNull != null && { EmptyAsNull: input.EmptyAsNull }), - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.ExplicitIds != null && { ExplicitIds: input.ExplicitIds }), - ...(input.FileTransferUploadStreams != null && { FileTransferUploadStreams: input.FileTransferUploadStreams }), - ...(input.LoadTimeout != null && { LoadTimeout: input.LoadTimeout }), - ...(input.MapBooleanAsBoolean != null && { MapBooleanAsBoolean: input.MapBooleanAsBoolean }), - ...(input.MaxFileSize != null && { MaxFileSize: input.MaxFileSize }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.RemoveQuotes != null && { RemoveQuotes: input.RemoveQuotes }), - ...(input.ReplaceChars != null && { ReplaceChars: input.ReplaceChars }), - ...(input.ReplaceInvalidChars != null && { ReplaceInvalidChars: input.ReplaceInvalidChars }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServerSideEncryptionKmsKeyId != null && { - ServerSideEncryptionKmsKeyId: input.ServerSideEncryptionKmsKeyId, - }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - ...(input.TimeFormat != null && { TimeFormat: input.TimeFormat }), - ...(input.TrimBlanks != null && { TrimBlanks: input.TrimBlanks }), - ...(input.TruncateColumns != null && { TruncateColumns: input.TruncateColumns }), - ...(input.Username != null && { Username: input.Username }), - ...(input.WriteBufferSize != null && { WriteBufferSize: input.WriteBufferSize }), - }; -}; - -/** - * serializeAws_json1_1RefreshSchemasMessage - */ -const se_RefreshSchemasMessage = (input: RefreshSchemasMessage, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_RebootReplicationInstanceMessage omitted. -/** - * serializeAws_json1_1ReloadTablesMessage - */ -const se_ReloadTablesMessage = (input: ReloadTablesMessage, context: __SerdeContext): any => { - return { - ...(input.ReloadOption != null && { ReloadOption: input.ReloadOption }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - ...(input.TablesToReload != null && { TablesToReload: se_TableListToReload(input.TablesToReload, context) }), - }; -}; +// se_RecommendationSettings omitted. -/** - * serializeAws_json1_1RemoveTagsFromResourceMessage - */ -const se_RemoveTagsFromResourceMessage = (input: RemoveTagsFromResourceMessage, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_KeyList(input.TagKeys, context) }), - }; -}; +// se_RedisSettings omitted. -/** - * serializeAws_json1_1S3Settings - */ -const se_S3Settings = (input: S3Settings, context: __SerdeContext): any => { - return { - ...(input.AddColumnName != null && { AddColumnName: input.AddColumnName }), - ...(input.AddTrailingPaddingCharacter != null && { - AddTrailingPaddingCharacter: input.AddTrailingPaddingCharacter, - }), - ...(input.BucketFolder != null && { BucketFolder: input.BucketFolder }), - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.CannedAclForObjects != null && { CannedAclForObjects: input.CannedAclForObjects }), - ...(input.CdcInsertsAndUpdates != null && { CdcInsertsAndUpdates: input.CdcInsertsAndUpdates }), - ...(input.CdcInsertsOnly != null && { CdcInsertsOnly: input.CdcInsertsOnly }), - ...(input.CdcMaxBatchInterval != null && { CdcMaxBatchInterval: input.CdcMaxBatchInterval }), - ...(input.CdcMinFileSize != null && { CdcMinFileSize: input.CdcMinFileSize }), - ...(input.CdcPath != null && { CdcPath: input.CdcPath }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.CsvDelimiter != null && { CsvDelimiter: input.CsvDelimiter }), - ...(input.CsvNoSupValue != null && { CsvNoSupValue: input.CsvNoSupValue }), - ...(input.CsvNullValue != null && { CsvNullValue: input.CsvNullValue }), - ...(input.CsvRowDelimiter != null && { CsvRowDelimiter: input.CsvRowDelimiter }), - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.DataPageSize != null && { DataPageSize: input.DataPageSize }), - ...(input.DatePartitionDelimiter != null && { DatePartitionDelimiter: input.DatePartitionDelimiter }), - ...(input.DatePartitionEnabled != null && { DatePartitionEnabled: input.DatePartitionEnabled }), - ...(input.DatePartitionSequence != null && { DatePartitionSequence: input.DatePartitionSequence }), - ...(input.DatePartitionTimezone != null && { DatePartitionTimezone: input.DatePartitionTimezone }), - ...(input.DictPageSizeLimit != null && { DictPageSizeLimit: input.DictPageSizeLimit }), - ...(input.EnableStatistics != null && { EnableStatistics: input.EnableStatistics }), - ...(input.EncodingType != null && { EncodingType: input.EncodingType }), - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.ExpectedBucketOwner != null && { ExpectedBucketOwner: input.ExpectedBucketOwner }), - ...(input.ExternalTableDefinition != null && { ExternalTableDefinition: input.ExternalTableDefinition }), - ...(input.GlueCatalogGeneration != null && { GlueCatalogGeneration: input.GlueCatalogGeneration }), - ...(input.IgnoreHeaderRows != null && { IgnoreHeaderRows: input.IgnoreHeaderRows }), - ...(input.IncludeOpForFullLoad != null && { IncludeOpForFullLoad: input.IncludeOpForFullLoad }), - ...(input.MaxFileSize != null && { MaxFileSize: input.MaxFileSize }), - ...(input.ParquetTimestampInMillisecond != null && { - ParquetTimestampInMillisecond: input.ParquetTimestampInMillisecond, - }), - ...(input.ParquetVersion != null && { ParquetVersion: input.ParquetVersion }), - ...(input.PreserveTransactions != null && { PreserveTransactions: input.PreserveTransactions }), - ...(input.Rfc4180 != null && { Rfc4180: input.Rfc4180 }), - ...(input.RowGroupLength != null && { RowGroupLength: input.RowGroupLength }), - ...(input.ServerSideEncryptionKmsKeyId != null && { - ServerSideEncryptionKmsKeyId: input.ServerSideEncryptionKmsKeyId, - }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - ...(input.TimestampColumnName != null && { TimestampColumnName: input.TimestampColumnName }), - ...(input.UseCsvNoSupValue != null && { UseCsvNoSupValue: input.UseCsvNoSupValue }), - ...(input.UseTaskStartTimeForFullLoadTimestamp != null && { - UseTaskStartTimeForFullLoadTimestamp: input.UseTaskStartTimeForFullLoadTimestamp, - }), - }; -}; - -/** - * serializeAws_json1_1SourceIdsList - */ -const se_SourceIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RedshiftSettings omitted. -/** - * serializeAws_json1_1StartRecommendationsRequest - */ -const se_StartRecommendationsRequest = (input: StartRecommendationsRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseId != null && { DatabaseId: input.DatabaseId }), - ...(input.Settings != null && { Settings: se_RecommendationSettings(input.Settings, context) }), - }; -}; +// se_RefreshSchemasMessage omitted. -/** - * serializeAws_json1_1StartRecommendationsRequestEntry - */ -const se_StartRecommendationsRequestEntry = (input: StartRecommendationsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.DatabaseId != null && { DatabaseId: input.DatabaseId }), - ...(input.Settings != null && { Settings: se_RecommendationSettings(input.Settings, context) }), - }; -}; +// se_ReloadTablesMessage omitted. -/** - * serializeAws_json1_1StartRecommendationsRequestEntryList - */ -const se_StartRecommendationsRequestEntryList = ( - input: StartRecommendationsRequestEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StartRecommendationsRequestEntry(entry, context); - }); -}; +// se_RemoveTagsFromResourceMessage omitted. -/** - * serializeAws_json1_1StartReplicationTaskAssessmentMessage - */ -const se_StartReplicationTaskAssessmentMessage = ( - input: StartReplicationTaskAssessmentMessage, - context: __SerdeContext -): any => { - return { - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - }; -}; +// se_S3Settings omitted. -/** - * serializeAws_json1_1StartReplicationTaskAssessmentRunMessage - */ -const se_StartReplicationTaskAssessmentRunMessage = ( - input: StartReplicationTaskAssessmentRunMessage, - context: __SerdeContext -): any => { - return { - ...(input.AssessmentRunName != null && { AssessmentRunName: input.AssessmentRunName }), - ...(input.Exclude != null && { Exclude: se_ExcludeTestList(input.Exclude, context) }), - ...(input.IncludeOnly != null && { IncludeOnly: se_IncludeTestList(input.IncludeOnly, context) }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - ...(input.ResultEncryptionMode != null && { ResultEncryptionMode: input.ResultEncryptionMode }), - ...(input.ResultKmsKeyArn != null && { ResultKmsKeyArn: input.ResultKmsKeyArn }), - ...(input.ResultLocationBucket != null && { ResultLocationBucket: input.ResultLocationBucket }), - ...(input.ResultLocationFolder != null && { ResultLocationFolder: input.ResultLocationFolder }), - ...(input.ServiceAccessRoleArn != null && { ServiceAccessRoleArn: input.ServiceAccessRoleArn }), - }; -}; +// se_SourceIdsList omitted. + +// se_StartRecommendationsRequest omitted. + +// se_StartRecommendationsRequestEntry omitted. + +// se_StartRecommendationsRequestEntryList omitted. + +// se_StartReplicationTaskAssessmentMessage omitted. + +// se_StartReplicationTaskAssessmentRunMessage omitted. /** * serializeAws_json1_1StartReplicationTaskMessage */ const se_StartReplicationTaskMessage = (input: StartReplicationTaskMessage, context: __SerdeContext): any => { - return { - ...(input.CdcStartPosition != null && { CdcStartPosition: input.CdcStartPosition }), - ...(input.CdcStartTime != null && { CdcStartTime: Math.round(input.CdcStartTime.getTime() / 1000) }), - ...(input.CdcStopPosition != null && { CdcStopPosition: input.CdcStopPosition }), - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - ...(input.StartReplicationTaskType != null && { StartReplicationTaskType: input.StartReplicationTaskType }), - }; + return take(input, { + CdcStartPosition: [], + CdcStartTime: (_) => Math.round(_.getTime() / 1000), + CdcStopPosition: [], + ReplicationTaskArn: [], + StartReplicationTaskType: [], + }); }; -/** - * serializeAws_json1_1StopReplicationTaskMessage - */ -const se_StopReplicationTaskMessage = (input: StopReplicationTaskMessage, context: __SerdeContext): any => { - return { - ...(input.ReplicationTaskArn != null && { ReplicationTaskArn: input.ReplicationTaskArn }), - }; -}; +// se_StopReplicationTaskMessage omitted. -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_json1_1SubnetIdentifierList - */ -const se_SubnetIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIdentifierList omitted. -/** - * serializeAws_json1_1SybaseSettings - */ -const se_SybaseSettings = (input: SybaseSettings, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecretsManagerAccessRoleArn != null && { - SecretsManagerAccessRoleArn: input.SecretsManagerAccessRoleArn, - }), - ...(input.SecretsManagerSecretId != null && { SecretsManagerSecretId: input.SecretsManagerSecretId }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_SybaseSettings omitted. -/** - * serializeAws_json1_1TableListToReload - */ -const se_TableListToReload = (input: TableToReload[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TableToReload(entry, context); - }); -}; +// se_TableListToReload omitted. -/** - * serializeAws_json1_1TableToReload - */ -const se_TableToReload = (input: TableToReload, context: __SerdeContext): any => { - return { - ...(input.SchemaName != null && { SchemaName: input.SchemaName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_TableToReload omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TestConnectionMessage - */ -const se_TestConnectionMessage = (input: TestConnectionMessage, context: __SerdeContext): any => { - return { - ...(input.EndpointArn != null && { EndpointArn: input.EndpointArn }), - ...(input.ReplicationInstanceArn != null && { ReplicationInstanceArn: input.ReplicationInstanceArn }), - }; -}; +// se_TestConnectionMessage omitted. + +// se_UpdateSubscriptionsToEventBridgeMessage omitted. + +// se_VpcSecurityGroupIdList omitted. + +// de_AccessDeniedFault omitted. + +// de_AccountQuota omitted. + +// de_AccountQuotaList omitted. + +// de_AddTagsToResourceResponse omitted. /** - * serializeAws_json1_1UpdateSubscriptionsToEventBridgeMessage + * deserializeAws_json1_1ApplyPendingMaintenanceActionResponse */ -const se_UpdateSubscriptionsToEventBridgeMessage = ( - input: UpdateSubscriptionsToEventBridgeMessage, - context: __SerdeContext -): any => { - return { - ...(input.ForceMove != null && { ForceMove: input.ForceMove }), - }; -}; - -/** - * serializeAws_json1_1VpcSecurityGroupIdList - */ -const se_VpcSecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * deserializeAws_json1_1AccessDeniedFault - */ -const de_AccessDeniedFault = (output: any, context: __SerdeContext): AccessDeniedFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountQuota - */ -const de_AccountQuota = (output: any, context: __SerdeContext): AccountQuota => { - return { - AccountQuotaName: __expectString(output.AccountQuotaName), - Max: __expectLong(output.Max), - Used: __expectLong(output.Used), - } as any; -}; - -/** - * deserializeAws_json1_1AccountQuotaList - */ -const de_AccountQuotaList = (output: any, context: __SerdeContext): AccountQuota[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountQuota(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AddTagsToResourceResponse - */ -const de_AddTagsToResourceResponse = (output: any, context: __SerdeContext): AddTagsToResourceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ApplyPendingMaintenanceActionResponse - */ -const de_ApplyPendingMaintenanceActionResponse = ( - output: any, +const de_ApplyPendingMaintenanceActionResponse = ( + output: any, context: __SerdeContext ): ApplyPendingMaintenanceActionResponse => { - return { - ResourcePendingMaintenanceActions: - output.ResourcePendingMaintenanceActions != null - ? de_ResourcePendingMaintenanceActions(output.ResourcePendingMaintenanceActions, context) - : undefined, - } as any; + return take(output, { + ResourcePendingMaintenanceActions: (_: any) => de_ResourcePendingMaintenanceActions(_, context), + }) as any; }; -/** - * deserializeAws_json1_1AvailabilityZone - */ -const de_AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_AvailabilityZone omitted. -/** - * deserializeAws_json1_1AvailabilityZonesList - */ -const de_AvailabilityZonesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AvailabilityZonesList omitted. -/** - * deserializeAws_json1_1BatchStartRecommendationsErrorEntry - */ -const de_BatchStartRecommendationsErrorEntry = ( - output: any, - context: __SerdeContext -): BatchStartRecommendationsErrorEntry => { - return { - Code: __expectString(output.Code), - DatabaseId: __expectString(output.DatabaseId), - Message: __expectString(output.Message), - } as any; -}; +// de_BatchStartRecommendationsErrorEntry omitted. -/** - * deserializeAws_json1_1BatchStartRecommendationsErrorEntryList - */ -const de_BatchStartRecommendationsErrorEntryList = ( - output: any, - context: __SerdeContext -): BatchStartRecommendationsErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchStartRecommendationsErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchStartRecommendationsErrorEntryList omitted. -/** - * deserializeAws_json1_1BatchStartRecommendationsResponse - */ -const de_BatchStartRecommendationsResponse = ( - output: any, - context: __SerdeContext -): BatchStartRecommendationsResponse => { - return { - ErrorEntries: - output.ErrorEntries != null - ? de_BatchStartRecommendationsErrorEntryList(output.ErrorEntries, context) - : undefined, - } as any; -}; +// de_BatchStartRecommendationsResponse omitted. /** * deserializeAws_json1_1CancelReplicationTaskAssessmentRunResponse @@ -7112,1467 +5514,458 @@ const de_BatchStartRecommendationsResponse = ( const de_CancelReplicationTaskAssessmentRunResponse = ( output: any, context: __SerdeContext -): CancelReplicationTaskAssessmentRunResponse => { - return { - ReplicationTaskAssessmentRun: - output.ReplicationTaskAssessmentRun != null - ? de_ReplicationTaskAssessmentRun(output.ReplicationTaskAssessmentRun, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Certificate - */ -const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - CertificateArn: __expectString(output.CertificateArn), - CertificateCreationDate: - output.CertificateCreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CertificateCreationDate))) - : undefined, - CertificateIdentifier: __expectString(output.CertificateIdentifier), - CertificateOwner: __expectString(output.CertificateOwner), - CertificatePem: __expectString(output.CertificatePem), - CertificateWallet: output.CertificateWallet != null ? context.base64Decoder(output.CertificateWallet) : undefined, - KeyLength: __expectInt32(output.KeyLength), - SigningAlgorithm: __expectString(output.SigningAlgorithm), - ValidFromDate: - output.ValidFromDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ValidFromDate))) - : undefined, - ValidToDate: - output.ValidToDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ValidToDate))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CertificateList - */ -const de_CertificateList = (output: any, context: __SerdeContext): Certificate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Certificate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CollectorHealthCheck - */ -const de_CollectorHealthCheck = (output: any, context: __SerdeContext): CollectorHealthCheck => { - return { - CollectorStatus: __expectString(output.CollectorStatus), - LocalCollectorS3Access: __expectBoolean(output.LocalCollectorS3Access), - WebCollectorGrantedRoleBasedAccess: __expectBoolean(output.WebCollectorGrantedRoleBasedAccess), - WebCollectorS3Access: __expectBoolean(output.WebCollectorS3Access), - } as any; -}; - -/** - * deserializeAws_json1_1CollectorNotFoundFault - */ -const de_CollectorNotFoundFault = (output: any, context: __SerdeContext): CollectorNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CollectorResponse - */ -const de_CollectorResponse = (output: any, context: __SerdeContext): CollectorResponse => { - return { - CollectorHealthCheck: - output.CollectorHealthCheck != null ? de_CollectorHealthCheck(output.CollectorHealthCheck, context) : undefined, - CollectorName: __expectString(output.CollectorName), - CollectorReferencedId: __expectString(output.CollectorReferencedId), - CollectorVersion: __expectString(output.CollectorVersion), - CreatedDate: __expectString(output.CreatedDate), - Description: __expectString(output.Description), - InventoryData: output.InventoryData != null ? de_InventoryData(output.InventoryData, context) : undefined, - LastDataReceived: __expectString(output.LastDataReceived), - ModifiedDate: __expectString(output.ModifiedDate), - RegisteredDate: __expectString(output.RegisteredDate), - S3BucketName: __expectString(output.S3BucketName), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - VersionStatus: __expectString(output.VersionStatus), - } as any; -}; - -/** - * deserializeAws_json1_1CollectorResponses - */ -const de_CollectorResponses = (output: any, context: __SerdeContext): CollectorResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CollectorResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CollectorShortInfoResponse - */ -const de_CollectorShortInfoResponse = (output: any, context: __SerdeContext): CollectorShortInfoResponse => { - return { - CollectorName: __expectString(output.CollectorName), - CollectorReferencedId: __expectString(output.CollectorReferencedId), - } as any; -}; - -/** - * deserializeAws_json1_1CollectorsList - */ -const de_CollectorsList = (output: any, context: __SerdeContext): CollectorShortInfoResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CollectorShortInfoResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Connection - */ -const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - EndpointArn: __expectString(output.EndpointArn), - EndpointIdentifier: __expectString(output.EndpointIdentifier), - LastFailureMessage: __expectString(output.LastFailureMessage), - ReplicationInstanceArn: __expectString(output.ReplicationInstanceArn), - ReplicationInstanceIdentifier: __expectString(output.ReplicationInstanceIdentifier), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionList - */ -const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connection(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateEndpointResponse - */ -const de_CreateEndpointResponse = (output: any, context: __SerdeContext): CreateEndpointResponse => { - return { - Endpoint: output.Endpoint != null ? de_Endpoint(output.Endpoint, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateEventSubscriptionResponse - */ -const de_CreateEventSubscriptionResponse = (output: any, context: __SerdeContext): CreateEventSubscriptionResponse => { - return { - EventSubscription: - output.EventSubscription != null ? de_EventSubscription(output.EventSubscription, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateFleetAdvisorCollectorResponse - */ -const de_CreateFleetAdvisorCollectorResponse = ( - output: any, - context: __SerdeContext -): CreateFleetAdvisorCollectorResponse => { - return { - CollectorName: __expectString(output.CollectorName), - CollectorReferencedId: __expectString(output.CollectorReferencedId), - Description: __expectString(output.Description), - S3BucketName: __expectString(output.S3BucketName), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateReplicationInstanceResponse - */ -const de_CreateReplicationInstanceResponse = ( - output: any, - context: __SerdeContext -): CreateReplicationInstanceResponse => { - return { - ReplicationInstance: - output.ReplicationInstance != null ? de_ReplicationInstance(output.ReplicationInstance, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateReplicationSubnetGroupResponse - */ -const de_CreateReplicationSubnetGroupResponse = ( - output: any, - context: __SerdeContext -): CreateReplicationSubnetGroupResponse => { - return { - ReplicationSubnetGroup: - output.ReplicationSubnetGroup != null - ? de_ReplicationSubnetGroup(output.ReplicationSubnetGroup, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateReplicationTaskResponse - */ -const de_CreateReplicationTaskResponse = (output: any, context: __SerdeContext): CreateReplicationTaskResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DatabaseInstanceSoftwareDetailsResponse - */ -const de_DatabaseInstanceSoftwareDetailsResponse = ( - output: any, - context: __SerdeContext -): DatabaseInstanceSoftwareDetailsResponse => { - return { - Engine: __expectString(output.Engine), - EngineEdition: __expectString(output.EngineEdition), - EngineVersion: __expectString(output.EngineVersion), - OsArchitecture: __expectInt32(output.OsArchitecture), - ServicePack: __expectString(output.ServicePack), - SupportLevel: __expectString(output.SupportLevel), - Tooltip: __expectString(output.Tooltip), - } as any; -}; - -/** - * deserializeAws_json1_1DatabaseList - */ -const de_DatabaseList = (output: any, context: __SerdeContext): DatabaseResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatabaseResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DatabaseResponse - */ -const de_DatabaseResponse = (output: any, context: __SerdeContext): DatabaseResponse => { - return { - Collectors: output.Collectors != null ? de_CollectorsList(output.Collectors, context) : undefined, - DatabaseId: __expectString(output.DatabaseId), - DatabaseName: __expectString(output.DatabaseName), - IpAddress: __expectString(output.IpAddress), - NumberOfSchemas: __expectLong(output.NumberOfSchemas), - Server: output.Server != null ? de_ServerShortInfoResponse(output.Server, context) : undefined, - SoftwareDetails: - output.SoftwareDetails != null - ? de_DatabaseInstanceSoftwareDetailsResponse(output.SoftwareDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DatabaseShortInfoResponse - */ -const de_DatabaseShortInfoResponse = (output: any, context: __SerdeContext): DatabaseShortInfoResponse => { - return { - DatabaseEngine: __expectString(output.DatabaseEngine), - DatabaseId: __expectString(output.DatabaseId), - DatabaseIpAddress: __expectString(output.DatabaseIpAddress), - DatabaseName: __expectString(output.DatabaseName), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteCertificateResponse - */ -const de_DeleteCertificateResponse = (output: any, context: __SerdeContext): DeleteCertificateResponse => { - return { - Certificate: output.Certificate != null ? de_Certificate(output.Certificate, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteConnectionResponse - */ -const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { - return { - Connection: output.Connection != null ? de_Connection(output.Connection, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteEndpointResponse - */ -const de_DeleteEndpointResponse = (output: any, context: __SerdeContext): DeleteEndpointResponse => { - return { - Endpoint: output.Endpoint != null ? de_Endpoint(output.Endpoint, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteEventSubscriptionResponse - */ -const de_DeleteEventSubscriptionResponse = (output: any, context: __SerdeContext): DeleteEventSubscriptionResponse => { - return { - EventSubscription: - output.EventSubscription != null ? de_EventSubscription(output.EventSubscription, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFleetAdvisorDatabasesResponse - */ -const de_DeleteFleetAdvisorDatabasesResponse = ( - output: any, - context: __SerdeContext -): DeleteFleetAdvisorDatabasesResponse => { - return { - DatabaseIds: output.DatabaseIds != null ? de_StringList(output.DatabaseIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteReplicationInstanceResponse - */ -const de_DeleteReplicationInstanceResponse = ( - output: any, - context: __SerdeContext -): DeleteReplicationInstanceResponse => { - return { - ReplicationInstance: - output.ReplicationInstance != null ? de_ReplicationInstance(output.ReplicationInstance, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteReplicationSubnetGroupResponse - */ -const de_DeleteReplicationSubnetGroupResponse = ( - output: any, - context: __SerdeContext -): DeleteReplicationSubnetGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteReplicationTaskAssessmentRunResponse - */ -const de_DeleteReplicationTaskAssessmentRunResponse = ( - output: any, - context: __SerdeContext -): DeleteReplicationTaskAssessmentRunResponse => { - return { - ReplicationTaskAssessmentRun: - output.ReplicationTaskAssessmentRun != null - ? de_ReplicationTaskAssessmentRun(output.ReplicationTaskAssessmentRun, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteReplicationTaskResponse - */ -const de_DeleteReplicationTaskResponse = (output: any, context: __SerdeContext): DeleteReplicationTaskResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAccountAttributesResponse - */ -const de_DescribeAccountAttributesResponse = ( - output: any, - context: __SerdeContext -): DescribeAccountAttributesResponse => { - return { - AccountQuotas: output.AccountQuotas != null ? de_AccountQuotaList(output.AccountQuotas, context) : undefined, - UniqueAccountIdentifier: __expectString(output.UniqueAccountIdentifier), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeApplicableIndividualAssessmentsResponse - */ -const de_DescribeApplicableIndividualAssessmentsResponse = ( - output: any, - context: __SerdeContext -): DescribeApplicableIndividualAssessmentsResponse => { - return { - IndividualAssessmentNames: - output.IndividualAssessmentNames != null - ? de_IndividualAssessmentNameList(output.IndividualAssessmentNames, context) - : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCertificatesResponse - */ -const de_DescribeCertificatesResponse = (output: any, context: __SerdeContext): DescribeCertificatesResponse => { - return { - Certificates: output.Certificates != null ? de_CertificateList(output.Certificates, context) : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectionsResponse - */ -const de_DescribeConnectionsResponse = (output: any, context: __SerdeContext): DescribeConnectionsResponse => { - return { - Connections: output.Connections != null ? de_ConnectionList(output.Connections, context) : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEndpointSettingsResponse - */ -const de_DescribeEndpointSettingsResponse = ( - output: any, - context: __SerdeContext -): DescribeEndpointSettingsResponse => { - return { - EndpointSettings: - output.EndpointSettings != null ? de_EndpointSettingsList(output.EndpointSettings, context) : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEndpointsResponse - */ -const de_DescribeEndpointsResponse = (output: any, context: __SerdeContext): DescribeEndpointsResponse => { - return { - Endpoints: output.Endpoints != null ? de_EndpointList(output.Endpoints, context) : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEndpointTypesResponse - */ -const de_DescribeEndpointTypesResponse = (output: any, context: __SerdeContext): DescribeEndpointTypesResponse => { - return { - Marker: __expectString(output.Marker), - SupportedEndpointTypes: - output.SupportedEndpointTypes != null - ? de_SupportedEndpointTypeList(output.SupportedEndpointTypes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEventCategoriesResponse - */ -const de_DescribeEventCategoriesResponse = (output: any, context: __SerdeContext): DescribeEventCategoriesResponse => { - return { - EventCategoryGroupList: - output.EventCategoryGroupList != null - ? de_EventCategoryGroupList(output.EventCategoryGroupList, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEventsResponse - */ -const de_DescribeEventsResponse = (output: any, context: __SerdeContext): DescribeEventsResponse => { - return { - Events: output.Events != null ? de_EventList(output.Events, context) : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEventSubscriptionsResponse - */ -const de_DescribeEventSubscriptionsResponse = ( - output: any, - context: __SerdeContext -): DescribeEventSubscriptionsResponse => { - return { - EventSubscriptionsList: - output.EventSubscriptionsList != null - ? de_EventSubscriptionsList(output.EventSubscriptionsList, context) - : undefined, - Marker: __expectString(output.Marker), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFleetAdvisorCollectorsResponse - */ -const de_DescribeFleetAdvisorCollectorsResponse = ( - output: any, - context: __SerdeContext -): DescribeFleetAdvisorCollectorsResponse => { - return { - Collectors: output.Collectors != null ? de_CollectorResponses(output.Collectors, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFleetAdvisorDatabasesResponse - */ -const de_DescribeFleetAdvisorDatabasesResponse = ( - output: any, - context: __SerdeContext -): DescribeFleetAdvisorDatabasesResponse => { - return { - Databases: output.Databases != null ? de_DatabaseList(output.Databases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFleetAdvisorLsaAnalysisResponse - */ -const de_DescribeFleetAdvisorLsaAnalysisResponse = ( - output: any, - context: __SerdeContext -): DescribeFleetAdvisorLsaAnalysisResponse => { - return { - Analysis: output.Analysis != null ? de_FleetAdvisorLsaAnalysisResponseList(output.Analysis, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFleetAdvisorSchemaObjectSummaryResponse - */ -const de_DescribeFleetAdvisorSchemaObjectSummaryResponse = ( - output: any, - context: __SerdeContext -): DescribeFleetAdvisorSchemaObjectSummaryResponse => { - return { - FleetAdvisorSchemaObjects: - output.FleetAdvisorSchemaObjects != null - ? de_FleetAdvisorSchemaObjectList(output.FleetAdvisorSchemaObjects, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFleetAdvisorSchemasResponse - */ -const de_DescribeFleetAdvisorSchemasResponse = ( - output: any, - context: __SerdeContext -): DescribeFleetAdvisorSchemasResponse => { - return { - FleetAdvisorSchemas: - output.FleetAdvisorSchemas != null ? de_FleetAdvisorSchemaList(output.FleetAdvisorSchemas, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeOrderableReplicationInstancesResponse - */ -const de_DescribeOrderableReplicationInstancesResponse = ( - output: any, - context: __SerdeContext -): DescribeOrderableReplicationInstancesResponse => { - return { - Marker: __expectString(output.Marker), - OrderableReplicationInstances: - output.OrderableReplicationInstances != null - ? de_OrderableReplicationInstanceList(output.OrderableReplicationInstances, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePendingMaintenanceActionsResponse - */ -const de_DescribePendingMaintenanceActionsResponse = ( - output: any, - context: __SerdeContext -): DescribePendingMaintenanceActionsResponse => { - return { - Marker: __expectString(output.Marker), - PendingMaintenanceActions: - output.PendingMaintenanceActions != null - ? de_PendingMaintenanceActions(output.PendingMaintenanceActions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRecommendationLimitationsResponse - */ -const de_DescribeRecommendationLimitationsResponse = ( - output: any, - context: __SerdeContext -): DescribeRecommendationLimitationsResponse => { - return { - Limitations: output.Limitations != null ? de_LimitationList(output.Limitations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRecommendationsResponse - */ -const de_DescribeRecommendationsResponse = (output: any, context: __SerdeContext): DescribeRecommendationsResponse => { - return { - NextToken: __expectString(output.NextToken), - Recommendations: - output.Recommendations != null ? de_RecommendationList(output.Recommendations, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRefreshSchemasStatusResponse - */ -const de_DescribeRefreshSchemasStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeRefreshSchemasStatusResponse => { - return { - RefreshSchemasStatus: - output.RefreshSchemasStatus != null ? de_RefreshSchemasStatus(output.RefreshSchemasStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationInstancesResponse - */ -const de_DescribeReplicationInstancesResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationInstancesResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationInstances: - output.ReplicationInstances != null - ? de_ReplicationInstanceList(output.ReplicationInstances, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationInstanceTaskLogsResponse - */ -const de_DescribeReplicationInstanceTaskLogsResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationInstanceTaskLogsResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationInstanceArn: __expectString(output.ReplicationInstanceArn), - ReplicationInstanceTaskLogs: - output.ReplicationInstanceTaskLogs != null - ? de_ReplicationInstanceTaskLogsList(output.ReplicationInstanceTaskLogs, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationSubnetGroupsResponse - */ -const de_DescribeReplicationSubnetGroupsResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationSubnetGroupsResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationSubnetGroups: - output.ReplicationSubnetGroups != null - ? de_ReplicationSubnetGroups(output.ReplicationSubnetGroups, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationTaskAssessmentResultsResponse - */ -const de_DescribeReplicationTaskAssessmentResultsResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationTaskAssessmentResultsResponse => { - return { - BucketName: __expectString(output.BucketName), - Marker: __expectString(output.Marker), - ReplicationTaskAssessmentResults: - output.ReplicationTaskAssessmentResults != null - ? de_ReplicationTaskAssessmentResultList(output.ReplicationTaskAssessmentResults, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationTaskAssessmentRunsResponse - */ -const de_DescribeReplicationTaskAssessmentRunsResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationTaskAssessmentRunsResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationTaskAssessmentRuns: - output.ReplicationTaskAssessmentRuns != null - ? de_ReplicationTaskAssessmentRunList(output.ReplicationTaskAssessmentRuns, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsResponse - */ -const de_DescribeReplicationTaskIndividualAssessmentsResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationTaskIndividualAssessmentsResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationTaskIndividualAssessments: - output.ReplicationTaskIndividualAssessments != null - ? de_ReplicationTaskIndividualAssessmentList(output.ReplicationTaskIndividualAssessments, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplicationTasksResponse - */ -const de_DescribeReplicationTasksResponse = ( - output: any, - context: __SerdeContext -): DescribeReplicationTasksResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationTasks: - output.ReplicationTasks != null ? de_ReplicationTaskList(output.ReplicationTasks, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSchemasResponse - */ -const de_DescribeSchemasResponse = (output: any, context: __SerdeContext): DescribeSchemasResponse => { - return { - Marker: __expectString(output.Marker), - Schemas: output.Schemas != null ? de_SchemaList(output.Schemas, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTableStatisticsResponse - */ -const de_DescribeTableStatisticsResponse = (output: any, context: __SerdeContext): DescribeTableStatisticsResponse => { - return { - Marker: __expectString(output.Marker), - ReplicationTaskArn: __expectString(output.ReplicationTaskArn), - TableStatistics: - output.TableStatistics != null ? de_TableStatisticsList(output.TableStatistics, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DmsTransferSettings - */ -const de_DmsTransferSettings = (output: any, context: __SerdeContext): DmsTransferSettings => { - return { - BucketName: __expectString(output.BucketName), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DocDbSettings - */ -const de_DocDbSettings = (output: any, context: __SerdeContext): DocDbSettings => { - return { - DatabaseName: __expectString(output.DatabaseName), - DocsToInvestigate: __expectInt32(output.DocsToInvestigate), - ExtractDocId: __expectBoolean(output.ExtractDocId), - KmsKeyId: __expectString(output.KmsKeyId), - NestingLevel: __expectString(output.NestingLevel), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1DynamoDbSettings - */ -const de_DynamoDbSettings = (output: any, context: __SerdeContext): DynamoDbSettings => { - return { - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1ElasticsearchSettings - */ -const de_ElasticsearchSettings = (output: any, context: __SerdeContext): ElasticsearchSettings => { - return { - EndpointUri: __expectString(output.EndpointUri), - ErrorRetryDuration: __expectInt32(output.ErrorRetryDuration), - FullLoadErrorPercentage: __expectInt32(output.FullLoadErrorPercentage), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - UseNewMappingType: __expectBoolean(output.UseNewMappingType), - } as any; -}; - -/** - * deserializeAws_json1_1Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - CertificateArn: __expectString(output.CertificateArn), - DatabaseName: __expectString(output.DatabaseName), - DmsTransferSettings: - output.DmsTransferSettings != null ? de_DmsTransferSettings(output.DmsTransferSettings, context) : undefined, - DocDbSettings: output.DocDbSettings != null ? de_DocDbSettings(output.DocDbSettings, context) : undefined, - DynamoDbSettings: - output.DynamoDbSettings != null ? de_DynamoDbSettings(output.DynamoDbSettings, context) : undefined, - ElasticsearchSettings: - output.ElasticsearchSettings != null - ? de_ElasticsearchSettings(output.ElasticsearchSettings, context) - : undefined, - EndpointArn: __expectString(output.EndpointArn), - EndpointIdentifier: __expectString(output.EndpointIdentifier), - EndpointType: __expectString(output.EndpointType), - EngineDisplayName: __expectString(output.EngineDisplayName), - EngineName: __expectString(output.EngineName), - ExternalId: __expectString(output.ExternalId), - ExternalTableDefinition: __expectString(output.ExternalTableDefinition), - ExtraConnectionAttributes: __expectString(output.ExtraConnectionAttributes), - GcpMySQLSettings: - output.GcpMySQLSettings != null ? de_GcpMySQLSettings(output.GcpMySQLSettings, context) : undefined, - IBMDb2Settings: output.IBMDb2Settings != null ? de_IBMDb2Settings(output.IBMDb2Settings, context) : undefined, - KafkaSettings: output.KafkaSettings != null ? de_KafkaSettings(output.KafkaSettings, context) : undefined, - KinesisSettings: output.KinesisSettings != null ? de_KinesisSettings(output.KinesisSettings, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - MicrosoftSQLServerSettings: - output.MicrosoftSQLServerSettings != null - ? de_MicrosoftSQLServerSettings(output.MicrosoftSQLServerSettings, context) - : undefined, - MongoDbSettings: output.MongoDbSettings != null ? de_MongoDbSettings(output.MongoDbSettings, context) : undefined, - MySQLSettings: output.MySQLSettings != null ? de_MySQLSettings(output.MySQLSettings, context) : undefined, - NeptuneSettings: output.NeptuneSettings != null ? de_NeptuneSettings(output.NeptuneSettings, context) : undefined, - OracleSettings: output.OracleSettings != null ? de_OracleSettings(output.OracleSettings, context) : undefined, - Port: __expectInt32(output.Port), - PostgreSQLSettings: - output.PostgreSQLSettings != null ? de_PostgreSQLSettings(output.PostgreSQLSettings, context) : undefined, - RedisSettings: output.RedisSettings != null ? de_RedisSettings(output.RedisSettings, context) : undefined, - RedshiftSettings: - output.RedshiftSettings != null ? de_RedshiftSettings(output.RedshiftSettings, context) : undefined, - S3Settings: output.S3Settings != null ? de_S3Settings(output.S3Settings, context) : undefined, - ServerName: __expectString(output.ServerName), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - SslMode: __expectString(output.SslMode), - Status: __expectString(output.Status), - SybaseSettings: output.SybaseSettings != null ? de_SybaseSettings(output.SybaseSettings, context) : undefined, - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1EndpointList - */ -const de_EndpointList = (output: any, context: __SerdeContext): Endpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Endpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EndpointSetting - */ -const de_EndpointSetting = (output: any, context: __SerdeContext): EndpointSetting => { - return { - Applicability: __expectString(output.Applicability), - DefaultValue: __expectString(output.DefaultValue), - EnumValues: output.EnumValues != null ? de_EndpointSettingEnumValues(output.EnumValues, context) : undefined, - IntValueMax: __expectInt32(output.IntValueMax), - IntValueMin: __expectInt32(output.IntValueMin), - Name: __expectString(output.Name), - Sensitive: __expectBoolean(output.Sensitive), - Type: __expectString(output.Type), - Units: __expectString(output.Units), - } as any; -}; - -/** - * deserializeAws_json1_1EndpointSettingEnumValues - */ -const de_EndpointSettingEnumValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EndpointSettingsList - */ -const de_EndpointSettingsList = (output: any, context: __SerdeContext): EndpointSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointSetting(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Event - */ -const de_Event = (output: any, context: __SerdeContext): Event => { - return { - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - EventCategories: - output.EventCategories != null ? de_EventCategoriesList(output.EventCategories, context) : undefined, - Message: __expectString(output.Message), - SourceIdentifier: __expectString(output.SourceIdentifier), - SourceType: __expectString(output.SourceType), - } as any; -}; - -/** - * deserializeAws_json1_1EventCategoriesList - */ -const de_EventCategoriesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventCategoryGroup - */ -const de_EventCategoryGroup = (output: any, context: __SerdeContext): EventCategoryGroup => { - return { - EventCategories: - output.EventCategories != null ? de_EventCategoriesList(output.EventCategories, context) : undefined, - SourceType: __expectString(output.SourceType), - } as any; -}; - -/** - * deserializeAws_json1_1EventCategoryGroupList - */ -const de_EventCategoryGroupList = (output: any, context: __SerdeContext): EventCategoryGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventCategoryGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventList - */ -const de_EventList = (output: any, context: __SerdeContext): Event[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Event(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventSubscription - */ -const de_EventSubscription = (output: any, context: __SerdeContext): EventSubscription => { - return { - CustSubscriptionId: __expectString(output.CustSubscriptionId), - CustomerAwsId: __expectString(output.CustomerAwsId), - Enabled: __expectBoolean(output.Enabled), - EventCategoriesList: - output.EventCategoriesList != null ? de_EventCategoriesList(output.EventCategoriesList, context) : undefined, - SnsTopicArn: __expectString(output.SnsTopicArn), - SourceIdsList: output.SourceIdsList != null ? de_SourceIdsList(output.SourceIdsList, context) : undefined, - SourceType: __expectString(output.SourceType), - Status: __expectString(output.Status), - SubscriptionCreationTime: __expectString(output.SubscriptionCreationTime), - } as any; -}; - -/** - * deserializeAws_json1_1EventSubscriptionsList - */ -const de_EventSubscriptionsList = (output: any, context: __SerdeContext): EventSubscription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventSubscription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FleetAdvisorLsaAnalysisResponse - */ -const de_FleetAdvisorLsaAnalysisResponse = (output: any, context: __SerdeContext): FleetAdvisorLsaAnalysisResponse => { - return { - LsaAnalysisId: __expectString(output.LsaAnalysisId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1FleetAdvisorLsaAnalysisResponseList - */ -const de_FleetAdvisorLsaAnalysisResponseList = ( - output: any, - context: __SerdeContext -): FleetAdvisorLsaAnalysisResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetAdvisorLsaAnalysisResponse(entry, context); - }); - return retVal; +): CancelReplicationTaskAssessmentRunResponse => { + return take(output, { + ReplicationTaskAssessmentRun: (_: any) => de_ReplicationTaskAssessmentRun(_, context), + }) as any; }; /** - * deserializeAws_json1_1FleetAdvisorSchemaList + * deserializeAws_json1_1Certificate */ -const de_FleetAdvisorSchemaList = (output: any, context: __SerdeContext): SchemaResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaResponse(entry, context); - }); - return retVal; +const de_Certificate = (output: any, context: __SerdeContext): Certificate => { + return take(output, { + CertificateArn: __expectString, + CertificateCreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CertificateIdentifier: __expectString, + CertificateOwner: __expectString, + CertificatePem: __expectString, + CertificateWallet: context.base64Decoder, + KeyLength: __expectInt32, + SigningAlgorithm: __expectString, + ValidFromDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ValidToDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1FleetAdvisorSchemaObjectList + * deserializeAws_json1_1CertificateList */ -const de_FleetAdvisorSchemaObjectList = (output: any, context: __SerdeContext): FleetAdvisorSchemaObjectResponse[] => { +const de_CertificateList = (output: any, context: __SerdeContext): Certificate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetAdvisorSchemaObjectResponse(entry, context); + return de_Certificate(entry, context); }); return retVal; }; +// de_CollectorHealthCheck omitted. + +// de_CollectorNotFoundFault omitted. + +// de_CollectorResponse omitted. + +// de_CollectorResponses omitted. + +// de_CollectorShortInfoResponse omitted. + +// de_CollectorsList omitted. + +// de_Connection omitted. + +// de_ConnectionList omitted. + +// de_CreateEndpointResponse omitted. + +// de_CreateEventSubscriptionResponse omitted. + +// de_CreateFleetAdvisorCollectorResponse omitted. + /** - * deserializeAws_json1_1FleetAdvisorSchemaObjectResponse + * deserializeAws_json1_1CreateReplicationInstanceResponse */ -const de_FleetAdvisorSchemaObjectResponse = ( +const de_CreateReplicationInstanceResponse = ( output: any, context: __SerdeContext -): FleetAdvisorSchemaObjectResponse => { - return { - CodeLineCount: __expectLong(output.CodeLineCount), - CodeSize: __expectLong(output.CodeSize), - NumberOfObjects: __expectLong(output.NumberOfObjects), - ObjectType: __expectString(output.ObjectType), - SchemaId: __expectString(output.SchemaId), - } as any; +): CreateReplicationInstanceResponse => { + return take(output, { + ReplicationInstance: (_: any) => de_ReplicationInstance(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GcpMySQLSettings - */ -const de_GcpMySQLSettings = (output: any, context: __SerdeContext): GcpMySQLSettings => { - return { - AfterConnectScript: __expectString(output.AfterConnectScript), - CleanSourceMetadataOnMismatch: __expectBoolean(output.CleanSourceMetadataOnMismatch), - DatabaseName: __expectString(output.DatabaseName), - EventsPollInterval: __expectInt32(output.EventsPollInterval), - MaxFileSize: __expectInt32(output.MaxFileSize), - ParallelLoadThreads: __expectInt32(output.ParallelLoadThreads), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - ServerTimezone: __expectString(output.ServerTimezone), - TargetDbType: __expectString(output.TargetDbType), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1IBMDb2Settings - */ -const de_IBMDb2Settings = (output: any, context: __SerdeContext): IBMDb2Settings => { - return { - CurrentLsn: __expectString(output.CurrentLsn), - DatabaseName: __expectString(output.DatabaseName), - MaxKBytesPerRead: __expectInt32(output.MaxKBytesPerRead), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - SetDataCaptureChanges: __expectBoolean(output.SetDataCaptureChanges), - Username: __expectString(output.Username), - } as any; -}; +// de_CreateReplicationSubnetGroupResponse omitted. /** - * deserializeAws_json1_1ImportCertificateResponse + * deserializeAws_json1_1CreateReplicationTaskResponse */ -const de_ImportCertificateResponse = (output: any, context: __SerdeContext): ImportCertificateResponse => { - return { - Certificate: output.Certificate != null ? de_Certificate(output.Certificate, context) : undefined, - } as any; +const de_CreateReplicationTaskResponse = (output: any, context: __SerdeContext): CreateReplicationTaskResponse => { + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; +// de_DatabaseInstanceSoftwareDetailsResponse omitted. + +// de_DatabaseList omitted. + +// de_DatabaseResponse omitted. + +// de_DatabaseShortInfoResponse omitted. + /** - * deserializeAws_json1_1IndividualAssessmentNameList + * deserializeAws_json1_1DeleteCertificateResponse */ -const de_IndividualAssessmentNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DeleteCertificateResponse = (output: any, context: __SerdeContext): DeleteCertificateResponse => { + return take(output, { + Certificate: (_: any) => de_Certificate(_, context), + }) as any; }; +// de_DeleteConnectionResponse omitted. + +// de_DeleteEndpointResponse omitted. + +// de_DeleteEventSubscriptionResponse omitted. + +// de_DeleteFleetAdvisorDatabasesResponse omitted. + /** - * deserializeAws_json1_1InsufficientResourceCapacityFault + * deserializeAws_json1_1DeleteReplicationInstanceResponse */ -const de_InsufficientResourceCapacityFault = ( +const de_DeleteReplicationInstanceResponse = ( output: any, context: __SerdeContext -): InsufficientResourceCapacityFault => { - return { - message: __expectString(output.message), - } as any; +): DeleteReplicationInstanceResponse => { + return take(output, { + ReplicationInstance: (_: any) => de_ReplicationInstance(_, context), + }) as any; }; +// de_DeleteReplicationSubnetGroupResponse omitted. + /** - * deserializeAws_json1_1IntegerList + * deserializeAws_json1_1DeleteReplicationTaskAssessmentRunResponse */ -const de_IntegerList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; +const de_DeleteReplicationTaskAssessmentRunResponse = ( + output: any, + context: __SerdeContext +): DeleteReplicationTaskAssessmentRunResponse => { + return take(output, { + ReplicationTaskAssessmentRun: (_: any) => de_ReplicationTaskAssessmentRun(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidCertificateFault + * deserializeAws_json1_1DeleteReplicationTaskResponse */ -const de_InvalidCertificateFault = (output: any, context: __SerdeContext): InvalidCertificateFault => { - return { - message: __expectString(output.message), - } as any; +const de_DeleteReplicationTaskResponse = (output: any, context: __SerdeContext): DeleteReplicationTaskResponse => { + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; +// de_DescribeAccountAttributesResponse omitted. + +// de_DescribeApplicableIndividualAssessmentsResponse omitted. + /** - * deserializeAws_json1_1InvalidOperationFault + * deserializeAws_json1_1DescribeCertificatesResponse */ -const de_InvalidOperationFault = (output: any, context: __SerdeContext): InvalidOperationFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeCertificatesResponse = (output: any, context: __SerdeContext): DescribeCertificatesResponse => { + return take(output, { + Certificates: (_: any) => de_CertificateList(_, context), + Marker: __expectString, + }) as any; }; +// de_DescribeConnectionsResponse omitted. + +// de_DescribeEndpointSettingsResponse omitted. + +// de_DescribeEndpointsResponse omitted. + +// de_DescribeEndpointTypesResponse omitted. + +// de_DescribeEventCategoriesResponse omitted. + /** - * deserializeAws_json1_1InvalidResourceStateFault + * deserializeAws_json1_1DescribeEventsResponse */ -const de_InvalidResourceStateFault = (output: any, context: __SerdeContext): InvalidResourceStateFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeEventsResponse = (output: any, context: __SerdeContext): DescribeEventsResponse => { + return take(output, { + Events: (_: any) => de_EventList(_, context), + Marker: __expectString, + }) as any; }; +// de_DescribeEventSubscriptionsResponse omitted. + +// de_DescribeFleetAdvisorCollectorsResponse omitted. + +// de_DescribeFleetAdvisorDatabasesResponse omitted. + +// de_DescribeFleetAdvisorLsaAnalysisResponse omitted. + +// de_DescribeFleetAdvisorSchemaObjectSummaryResponse omitted. + /** - * deserializeAws_json1_1InvalidSubnet + * deserializeAws_json1_1DescribeFleetAdvisorSchemasResponse */ -const de_InvalidSubnet = (output: any, context: __SerdeContext): InvalidSubnet => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeFleetAdvisorSchemasResponse = ( + output: any, + context: __SerdeContext +): DescribeFleetAdvisorSchemasResponse => { + return take(output, { + FleetAdvisorSchemas: (_: any) => de_FleetAdvisorSchemaList(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeOrderableReplicationInstancesResponse omitted. + /** - * deserializeAws_json1_1InventoryData + * deserializeAws_json1_1DescribePendingMaintenanceActionsResponse */ -const de_InventoryData = (output: any, context: __SerdeContext): InventoryData => { - return { - NumberOfDatabases: __expectInt32(output.NumberOfDatabases), - NumberOfSchemas: __expectInt32(output.NumberOfSchemas), - } as any; +const de_DescribePendingMaintenanceActionsResponse = ( + output: any, + context: __SerdeContext +): DescribePendingMaintenanceActionsResponse => { + return take(output, { + Marker: __expectString, + PendingMaintenanceActions: (_: any) => de_PendingMaintenanceActions(_, context), + }) as any; }; +// de_DescribeRecommendationLimitationsResponse omitted. + /** - * deserializeAws_json1_1KafkaSettings + * deserializeAws_json1_1DescribeRecommendationsResponse */ -const de_KafkaSettings = (output: any, context: __SerdeContext): KafkaSettings => { - return { - Broker: __expectString(output.Broker), - IncludeControlDetails: __expectBoolean(output.IncludeControlDetails), - IncludeNullAndEmpty: __expectBoolean(output.IncludeNullAndEmpty), - IncludePartitionValue: __expectBoolean(output.IncludePartitionValue), - IncludeTableAlterOperations: __expectBoolean(output.IncludeTableAlterOperations), - IncludeTransactionDetails: __expectBoolean(output.IncludeTransactionDetails), - MessageFormat: __expectString(output.MessageFormat), - MessageMaxBytes: __expectInt32(output.MessageMaxBytes), - NoHexPrefix: __expectBoolean(output.NoHexPrefix), - PartitionIncludeSchemaTable: __expectBoolean(output.PartitionIncludeSchemaTable), - SaslMechanism: __expectString(output.SaslMechanism), - SaslPassword: __expectString(output.SaslPassword), - SaslUsername: __expectString(output.SaslUsername), - SecurityProtocol: __expectString(output.SecurityProtocol), - SslCaCertificateArn: __expectString(output.SslCaCertificateArn), - SslClientCertificateArn: __expectString(output.SslClientCertificateArn), - SslClientKeyArn: __expectString(output.SslClientKeyArn), - SslClientKeyPassword: __expectString(output.SslClientKeyPassword), - Topic: __expectString(output.Topic), - } as any; -}; - -/** - * deserializeAws_json1_1KinesisSettings - */ -const de_KinesisSettings = (output: any, context: __SerdeContext): KinesisSettings => { - return { - IncludeControlDetails: __expectBoolean(output.IncludeControlDetails), - IncludeNullAndEmpty: __expectBoolean(output.IncludeNullAndEmpty), - IncludePartitionValue: __expectBoolean(output.IncludePartitionValue), - IncludeTableAlterOperations: __expectBoolean(output.IncludeTableAlterOperations), - IncludeTransactionDetails: __expectBoolean(output.IncludeTransactionDetails), - MessageFormat: __expectString(output.MessageFormat), - NoHexPrefix: __expectBoolean(output.NoHexPrefix), - PartitionIncludeSchemaTable: __expectBoolean(output.PartitionIncludeSchemaTable), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - StreamArn: __expectString(output.StreamArn), - } as any; +const de_DescribeRecommendationsResponse = (output: any, context: __SerdeContext): DescribeRecommendationsResponse => { + return take(output, { + NextToken: __expectString, + Recommendations: (_: any) => de_RecommendationList(_, context), + }) as any; }; /** - * deserializeAws_json1_1KMSAccessDeniedFault + * deserializeAws_json1_1DescribeRefreshSchemasStatusResponse */ -const de_KMSAccessDeniedFault = (output: any, context: __SerdeContext): KMSAccessDeniedFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeRefreshSchemasStatusResponse = ( + output: any, + context: __SerdeContext +): DescribeRefreshSchemasStatusResponse => { + return take(output, { + RefreshSchemasStatus: (_: any) => de_RefreshSchemasStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1KMSDisabledFault + * deserializeAws_json1_1DescribeReplicationInstancesResponse */ -const de_KMSDisabledFault = (output: any, context: __SerdeContext): KMSDisabledFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeReplicationInstancesResponse = ( + output: any, + context: __SerdeContext +): DescribeReplicationInstancesResponse => { + return take(output, { + Marker: __expectString, + ReplicationInstances: (_: any) => de_ReplicationInstanceList(_, context), + }) as any; }; +// de_DescribeReplicationInstanceTaskLogsResponse omitted. + +// de_DescribeReplicationSubnetGroupsResponse omitted. + /** - * deserializeAws_json1_1KMSFault + * deserializeAws_json1_1DescribeReplicationTaskAssessmentResultsResponse */ -const de_KMSFault = (output: any, context: __SerdeContext): KMSFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeReplicationTaskAssessmentResultsResponse = ( + output: any, + context: __SerdeContext +): DescribeReplicationTaskAssessmentResultsResponse => { + return take(output, { + BucketName: __expectString, + Marker: __expectString, + ReplicationTaskAssessmentResults: (_: any) => de_ReplicationTaskAssessmentResultList(_, context), + }) as any; }; /** - * deserializeAws_json1_1KMSInvalidStateFault + * deserializeAws_json1_1DescribeReplicationTaskAssessmentRunsResponse */ -const de_KMSInvalidStateFault = (output: any, context: __SerdeContext): KMSInvalidStateFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeReplicationTaskAssessmentRunsResponse = ( + output: any, + context: __SerdeContext +): DescribeReplicationTaskAssessmentRunsResponse => { + return take(output, { + Marker: __expectString, + ReplicationTaskAssessmentRuns: (_: any) => de_ReplicationTaskAssessmentRunList(_, context), + }) as any; }; /** - * deserializeAws_json1_1KMSKeyNotAccessibleFault + * deserializeAws_json1_1DescribeReplicationTaskIndividualAssessmentsResponse */ -const de_KMSKeyNotAccessibleFault = (output: any, context: __SerdeContext): KMSKeyNotAccessibleFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeReplicationTaskIndividualAssessmentsResponse = ( + output: any, + context: __SerdeContext +): DescribeReplicationTaskIndividualAssessmentsResponse => { + return take(output, { + Marker: __expectString, + ReplicationTaskIndividualAssessments: (_: any) => de_ReplicationTaskIndividualAssessmentList(_, context), + }) as any; }; /** - * deserializeAws_json1_1KMSNotFoundFault + * deserializeAws_json1_1DescribeReplicationTasksResponse */ -const de_KMSNotFoundFault = (output: any, context: __SerdeContext): KMSNotFoundFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeReplicationTasksResponse = ( + output: any, + context: __SerdeContext +): DescribeReplicationTasksResponse => { + return take(output, { + Marker: __expectString, + ReplicationTasks: (_: any) => de_ReplicationTaskList(_, context), + }) as any; }; +// de_DescribeSchemasResponse omitted. + /** - * deserializeAws_json1_1KMSThrottlingFault + * deserializeAws_json1_1DescribeTableStatisticsResponse */ -const de_KMSThrottlingFault = (output: any, context: __SerdeContext): KMSThrottlingFault => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeTableStatisticsResponse = (output: any, context: __SerdeContext): DescribeTableStatisticsResponse => { + return take(output, { + Marker: __expectString, + ReplicationTaskArn: __expectString, + TableStatistics: (_: any) => de_TableStatisticsList(_, context), + }) as any; }; +// de_DmsTransferSettings omitted. + +// de_DocDbSettings omitted. + +// de_DynamoDbSettings omitted. + +// de_ElasticsearchSettings omitted. + +// de_Endpoint omitted. + +// de_EndpointList omitted. + +// de_EndpointSetting omitted. + +// de_EndpointSettingEnumValues omitted. + +// de_EndpointSettingsList omitted. + /** - * deserializeAws_json1_1Limitation + * deserializeAws_json1_1Event */ -const de_Limitation = (output: any, context: __SerdeContext): Limitation => { - return { - DatabaseId: __expectString(output.DatabaseId), - Description: __expectString(output.Description), - EngineName: __expectString(output.EngineName), - Impact: __expectString(output.Impact), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; +const de_Event = (output: any, context: __SerdeContext): Event => { + return take(output, { + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventCategories: _json, + Message: __expectString, + SourceIdentifier: __expectString, + SourceType: __expectString, + }) as any; }; +// de_EventCategoriesList omitted. + +// de_EventCategoryGroup omitted. + +// de_EventCategoryGroupList omitted. + /** - * deserializeAws_json1_1LimitationList + * deserializeAws_json1_1EventList */ -const de_LimitationList = (output: any, context: __SerdeContext): Limitation[] => { +const de_EventList = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Limitation(entry, context); + return de_Event(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_EventSubscription omitted. + +// de_EventSubscriptionsList omitted. + +// de_FleetAdvisorLsaAnalysisResponse omitted. + +// de_FleetAdvisorLsaAnalysisResponseList omitted. /** - * deserializeAws_json1_1MicrosoftSQLServerSettings + * deserializeAws_json1_1FleetAdvisorSchemaList */ -const de_MicrosoftSQLServerSettings = (output: any, context: __SerdeContext): MicrosoftSQLServerSettings => { - return { - BcpPacketSize: __expectInt32(output.BcpPacketSize), - ControlTablesFileGroup: __expectString(output.ControlTablesFileGroup), - DatabaseName: __expectString(output.DatabaseName), - ForceLobLookup: __expectBoolean(output.ForceLobLookup), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - QuerySingleAlwaysOnNode: __expectBoolean(output.QuerySingleAlwaysOnNode), - ReadBackupOnly: __expectBoolean(output.ReadBackupOnly), - SafeguardPolicy: __expectString(output.SafeguardPolicy), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - TlogAccessMode: __expectString(output.TlogAccessMode), - TrimSpaceInChar: __expectBoolean(output.TrimSpaceInChar), - UseBcpFullLoad: __expectBoolean(output.UseBcpFullLoad), - UseThirdPartyBackupDevice: __expectBoolean(output.UseThirdPartyBackupDevice), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1ModifyEndpointResponse - */ -const de_ModifyEndpointResponse = (output: any, context: __SerdeContext): ModifyEndpointResponse => { - return { - Endpoint: output.Endpoint != null ? de_Endpoint(output.Endpoint, context) : undefined, - } as any; +const de_FleetAdvisorSchemaList = (output: any, context: __SerdeContext): SchemaResponse[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SchemaResponse(entry, context); + }); + return retVal; }; +// de_FleetAdvisorSchemaObjectList omitted. + +// de_FleetAdvisorSchemaObjectResponse omitted. + +// de_GcpMySQLSettings omitted. + +// de_IBMDb2Settings omitted. + /** - * deserializeAws_json1_1ModifyEventSubscriptionResponse + * deserializeAws_json1_1ImportCertificateResponse */ -const de_ModifyEventSubscriptionResponse = (output: any, context: __SerdeContext): ModifyEventSubscriptionResponse => { - return { - EventSubscription: - output.EventSubscription != null ? de_EventSubscription(output.EventSubscription, context) : undefined, - } as any; +const de_ImportCertificateResponse = (output: any, context: __SerdeContext): ImportCertificateResponse => { + return take(output, { + Certificate: (_: any) => de_Certificate(_, context), + }) as any; }; +// de_IndividualAssessmentNameList omitted. + +// de_InsufficientResourceCapacityFault omitted. + +// de_IntegerList omitted. + +// de_InvalidCertificateFault omitted. + +// de_InvalidOperationFault omitted. + +// de_InvalidResourceStateFault omitted. + +// de_InvalidSubnet omitted. + +// de_InventoryData omitted. + +// de_KafkaSettings omitted. + +// de_KinesisSettings omitted. + +// de_KMSAccessDeniedFault omitted. + +// de_KMSDisabledFault omitted. + +// de_KMSFault omitted. + +// de_KMSInvalidStateFault omitted. + +// de_KMSKeyNotAccessibleFault omitted. + +// de_KMSNotFoundFault omitted. + +// de_KMSThrottlingFault omitted. + +// de_Limitation omitted. + +// de_LimitationList omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_MicrosoftSQLServerSettings omitted. + +// de_ModifyEndpointResponse omitted. + +// de_ModifyEventSubscriptionResponse omitted. + /** * deserializeAws_json1_1ModifyReplicationInstanceResponse */ @@ -8580,209 +5973,55 @@ const de_ModifyReplicationInstanceResponse = ( output: any, context: __SerdeContext ): ModifyReplicationInstanceResponse => { - return { - ReplicationInstance: - output.ReplicationInstance != null ? de_ReplicationInstance(output.ReplicationInstance, context) : undefined, - } as any; + return take(output, { + ReplicationInstance: (_: any) => de_ReplicationInstance(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ModifyReplicationSubnetGroupResponse - */ -const de_ModifyReplicationSubnetGroupResponse = ( - output: any, - context: __SerdeContext -): ModifyReplicationSubnetGroupResponse => { - return { - ReplicationSubnetGroup: - output.ReplicationSubnetGroup != null - ? de_ReplicationSubnetGroup(output.ReplicationSubnetGroup, context) - : undefined, - } as any; -}; +// de_ModifyReplicationSubnetGroupResponse omitted. /** * deserializeAws_json1_1ModifyReplicationTaskResponse */ const de_ModifyReplicationTaskResponse = (output: any, context: __SerdeContext): ModifyReplicationTaskResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; -/** - * deserializeAws_json1_1MongoDbSettings - */ -const de_MongoDbSettings = (output: any, context: __SerdeContext): MongoDbSettings => { - return { - AuthMechanism: __expectString(output.AuthMechanism), - AuthSource: __expectString(output.AuthSource), - AuthType: __expectString(output.AuthType), - DatabaseName: __expectString(output.DatabaseName), - DocsToInvestigate: __expectString(output.DocsToInvestigate), - ExtractDocId: __expectString(output.ExtractDocId), - KmsKeyId: __expectString(output.KmsKeyId), - NestingLevel: __expectString(output.NestingLevel), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - Username: __expectString(output.Username), - } as any; -}; +// de_MongoDbSettings omitted. /** * deserializeAws_json1_1MoveReplicationTaskResponse - */ -const de_MoveReplicationTaskResponse = (output: any, context: __SerdeContext): MoveReplicationTaskResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MySQLSettings - */ -const de_MySQLSettings = (output: any, context: __SerdeContext): MySQLSettings => { - return { - AfterConnectScript: __expectString(output.AfterConnectScript), - CleanSourceMetadataOnMismatch: __expectBoolean(output.CleanSourceMetadataOnMismatch), - DatabaseName: __expectString(output.DatabaseName), - EventsPollInterval: __expectInt32(output.EventsPollInterval), - MaxFileSize: __expectInt32(output.MaxFileSize), - ParallelLoadThreads: __expectInt32(output.ParallelLoadThreads), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - ServerTimezone: __expectString(output.ServerTimezone), - TargetDbType: __expectString(output.TargetDbType), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1NeptuneSettings - */ -const de_NeptuneSettings = (output: any, context: __SerdeContext): NeptuneSettings => { - return { - ErrorRetryDuration: __expectInt32(output.ErrorRetryDuration), - IamAuthEnabled: __expectBoolean(output.IamAuthEnabled), - MaxFileSize: __expectInt32(output.MaxFileSize), - MaxRetryCount: __expectInt32(output.MaxRetryCount), - S3BucketFolder: __expectString(output.S3BucketFolder), - S3BucketName: __expectString(output.S3BucketName), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1OracleSettings - */ -const de_OracleSettings = (output: any, context: __SerdeContext): OracleSettings => { - return { - AccessAlternateDirectly: __expectBoolean(output.AccessAlternateDirectly), - AddSupplementalLogging: __expectBoolean(output.AddSupplementalLogging), - AdditionalArchivedLogDestId: __expectInt32(output.AdditionalArchivedLogDestId), - AllowSelectNestedTables: __expectBoolean(output.AllowSelectNestedTables), - ArchivedLogDestId: __expectInt32(output.ArchivedLogDestId), - ArchivedLogsOnly: __expectBoolean(output.ArchivedLogsOnly), - AsmPassword: __expectString(output.AsmPassword), - AsmServer: __expectString(output.AsmServer), - AsmUser: __expectString(output.AsmUser), - CharLengthSemantics: __expectString(output.CharLengthSemantics), - ConvertTimestampWithZoneToUTC: __expectBoolean(output.ConvertTimestampWithZoneToUTC), - DatabaseName: __expectString(output.DatabaseName), - DirectPathNoLog: __expectBoolean(output.DirectPathNoLog), - DirectPathParallelLoad: __expectBoolean(output.DirectPathParallelLoad), - EnableHomogenousTablespace: __expectBoolean(output.EnableHomogenousTablespace), - ExtraArchivedLogDestIds: - output.ExtraArchivedLogDestIds != null ? de_IntegerList(output.ExtraArchivedLogDestIds, context) : undefined, - FailTasksOnLobTruncation: __expectBoolean(output.FailTasksOnLobTruncation), - NumberDatatypeScale: __expectInt32(output.NumberDatatypeScale), - OraclePathPrefix: __expectString(output.OraclePathPrefix), - ParallelAsmReadThreads: __expectInt32(output.ParallelAsmReadThreads), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - ReadAheadBlocks: __expectInt32(output.ReadAheadBlocks), - ReadTableSpaceName: __expectBoolean(output.ReadTableSpaceName), - ReplacePathPrefix: __expectBoolean(output.ReplacePathPrefix), - RetryInterval: __expectInt32(output.RetryInterval), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerOracleAsmAccessRoleArn: __expectString(output.SecretsManagerOracleAsmAccessRoleArn), - SecretsManagerOracleAsmSecretId: __expectString(output.SecretsManagerOracleAsmSecretId), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - SecurityDbEncryption: __expectString(output.SecurityDbEncryption), - SecurityDbEncryptionName: __expectString(output.SecurityDbEncryptionName), - ServerName: __expectString(output.ServerName), - SpatialDataOptionToGeoJsonFunctionName: __expectString(output.SpatialDataOptionToGeoJsonFunctionName), - StandbyDelayTime: __expectInt32(output.StandbyDelayTime), - TrimSpaceInChar: __expectBoolean(output.TrimSpaceInChar), - UseAlternateFolderForOnline: __expectBoolean(output.UseAlternateFolderForOnline), - UseBFile: __expectBoolean(output.UseBFile), - UseDirectPathFullLoad: __expectBoolean(output.UseDirectPathFullLoad), - UseLogminerReader: __expectBoolean(output.UseLogminerReader), - UsePathPrefix: __expectString(output.UsePathPrefix), - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1OrderableReplicationInstance - */ -const de_OrderableReplicationInstance = (output: any, context: __SerdeContext): OrderableReplicationInstance => { - return { - AvailabilityZones: - output.AvailabilityZones != null ? de_AvailabilityZonesList(output.AvailabilityZones, context) : undefined, - DefaultAllocatedStorage: __expectInt32(output.DefaultAllocatedStorage), - EngineVersion: __expectString(output.EngineVersion), - IncludedAllocatedStorage: __expectInt32(output.IncludedAllocatedStorage), - MaxAllocatedStorage: __expectInt32(output.MaxAllocatedStorage), - MinAllocatedStorage: __expectInt32(output.MinAllocatedStorage), - ReleaseStatus: __expectString(output.ReleaseStatus), - ReplicationInstanceClass: __expectString(output.ReplicationInstanceClass), - StorageType: __expectString(output.StorageType), - } as any; -}; - -/** - * deserializeAws_json1_1OrderableReplicationInstanceList - */ -const de_OrderableReplicationInstanceList = (output: any, context: __SerdeContext): OrderableReplicationInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrderableReplicationInstance(entry, context); - }); - return retVal; + */ +const de_MoveReplicationTaskResponse = (output: any, context: __SerdeContext): MoveReplicationTaskResponse => { + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; +// de_MySQLSettings omitted. + +// de_NeptuneSettings omitted. + +// de_OracleSettings omitted. + +// de_OrderableReplicationInstance omitted. + +// de_OrderableReplicationInstanceList omitted. + /** * deserializeAws_json1_1PendingMaintenanceAction */ const de_PendingMaintenanceAction = (output: any, context: __SerdeContext): PendingMaintenanceAction => { - return { - Action: __expectString(output.Action), - AutoAppliedAfterDate: - output.AutoAppliedAfterDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AutoAppliedAfterDate))) - : undefined, - CurrentApplyDate: - output.CurrentApplyDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CurrentApplyDate))) - : undefined, - Description: __expectString(output.Description), - ForcedApplyDate: - output.ForcedApplyDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ForcedApplyDate))) - : undefined, - OptInStatus: __expectString(output.OptInStatus), - } as any; + return take(output, { + Action: __expectString, + AutoAppliedAfterDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentApplyDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ForcedApplyDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OptInStatus: __expectString, + }) as any; }; /** @@ -8792,9 +6031,6 @@ const de_PendingMaintenanceActionDetails = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PendingMaintenanceAction(entry, context); }); return retVal; @@ -8807,82 +6043,51 @@ const de_PendingMaintenanceActions = (output: any, context: __SerdeContext): Res const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourcePendingMaintenanceActions(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PostgreSQLSettings - */ -const de_PostgreSQLSettings = (output: any, context: __SerdeContext): PostgreSQLSettings => { - return { - AfterConnectScript: __expectString(output.AfterConnectScript), - CaptureDdls: __expectBoolean(output.CaptureDdls), - DatabaseName: __expectString(output.DatabaseName), - DdlArtifactsSchema: __expectString(output.DdlArtifactsSchema), - ExecuteTimeout: __expectInt32(output.ExecuteTimeout), - FailTasksOnLobTruncation: __expectBoolean(output.FailTasksOnLobTruncation), - HeartbeatEnable: __expectBoolean(output.HeartbeatEnable), - HeartbeatFrequency: __expectInt32(output.HeartbeatFrequency), - HeartbeatSchema: __expectString(output.HeartbeatSchema), - MapBooleanAsBoolean: __expectBoolean(output.MapBooleanAsBoolean), - MaxFileSize: __expectInt32(output.MaxFileSize), - Password: __expectString(output.Password), - PluginName: __expectString(output.PluginName), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - SlotName: __expectString(output.SlotName), - TrimSpaceInChar: __expectBoolean(output.TrimSpaceInChar), - Username: __expectString(output.Username), - } as any; -}; +// de_PostgreSQLSettings omitted. /** * deserializeAws_json1_1RdsConfiguration */ const de_RdsConfiguration = (output: any, context: __SerdeContext): RdsConfiguration => { - return { - DeploymentOption: __expectString(output.DeploymentOption), - EngineEdition: __expectString(output.EngineEdition), - InstanceMemory: __limitedParseDouble(output.InstanceMemory), - InstanceType: __expectString(output.InstanceType), - InstanceVcpu: __limitedParseDouble(output.InstanceVcpu), - StorageIops: __expectInt32(output.StorageIops), - StorageSize: __expectInt32(output.StorageSize), - StorageType: __expectString(output.StorageType), - } as any; + return take(output, { + DeploymentOption: __expectString, + EngineEdition: __expectString, + InstanceMemory: __limitedParseDouble, + InstanceType: __expectString, + InstanceVcpu: __limitedParseDouble, + StorageIops: __expectInt32, + StorageSize: __expectInt32, + StorageType: __expectString, + }) as any; }; /** * deserializeAws_json1_1RdsRecommendation */ const de_RdsRecommendation = (output: any, context: __SerdeContext): RdsRecommendation => { - return { - RequirementsToTarget: - output.RequirementsToTarget != null ? de_RdsRequirements(output.RequirementsToTarget, context) : undefined, - TargetConfiguration: - output.TargetConfiguration != null ? de_RdsConfiguration(output.TargetConfiguration, context) : undefined, - } as any; + return take(output, { + RequirementsToTarget: (_: any) => de_RdsRequirements(_, context), + TargetConfiguration: (_: any) => de_RdsConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_1RdsRequirements */ const de_RdsRequirements = (output: any, context: __SerdeContext): RdsRequirements => { - return { - DeploymentOption: __expectString(output.DeploymentOption), - EngineEdition: __expectString(output.EngineEdition), - InstanceMemory: __limitedParseDouble(output.InstanceMemory), - InstanceVcpu: __limitedParseDouble(output.InstanceVcpu), - StorageIops: __expectInt32(output.StorageIops), - StorageSize: __expectInt32(output.StorageSize), - } as any; + return take(output, { + DeploymentOption: __expectString, + EngineEdition: __expectString, + InstanceMemory: __limitedParseDouble, + InstanceVcpu: __limitedParseDouble, + StorageIops: __expectInt32, + StorageSize: __expectInt32, + }) as any; }; /** @@ -8892,34 +6097,33 @@ const de_RebootReplicationInstanceResponse = ( output: any, context: __SerdeContext ): RebootReplicationInstanceResponse => { - return { - ReplicationInstance: - output.ReplicationInstance != null ? de_ReplicationInstance(output.ReplicationInstance, context) : undefined, - } as any; + return take(output, { + ReplicationInstance: (_: any) => de_ReplicationInstance(_, context), + }) as any; }; /** * deserializeAws_json1_1Recommendation */ const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - CreatedDate: __expectString(output.CreatedDate), - Data: output.Data != null ? de_RecommendationData(output.Data, context) : undefined, - DatabaseId: __expectString(output.DatabaseId), - EngineName: __expectString(output.EngineName), - Preferred: __expectBoolean(output.Preferred), - Settings: output.Settings != null ? de_RecommendationSettings(output.Settings, context) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedDate: __expectString, + Data: (_: any) => de_RecommendationData(_, context), + DatabaseId: __expectString, + EngineName: __expectString, + Preferred: __expectBoolean, + Settings: _json, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1RecommendationData */ const de_RecommendationData = (output: any, context: __SerdeContext): RecommendationData => { - return { - RdsEngine: output.RdsEngine != null ? de_RdsRecommendation(output.RdsEngine, context) : undefined, - } as any; + return take(output, { + RdsEngine: (_: any) => de_RdsRecommendation(_, context), + }) as any; }; /** @@ -8929,189 +6133,77 @@ const de_RecommendationList = (output: any, context: __SerdeContext): Recommenda const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Recommendation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RecommendationSettings - */ -const de_RecommendationSettings = (output: any, context: __SerdeContext): RecommendationSettings => { - return { - InstanceSizingType: __expectString(output.InstanceSizingType), - WorkloadType: __expectString(output.WorkloadType), - } as any; -}; +// de_RecommendationSettings omitted. -/** - * deserializeAws_json1_1RedisSettings - */ -const de_RedisSettings = (output: any, context: __SerdeContext): RedisSettings => { - return { - AuthPassword: __expectString(output.AuthPassword), - AuthType: __expectString(output.AuthType), - AuthUserName: __expectString(output.AuthUserName), - Port: __expectInt32(output.Port), - ServerName: __expectString(output.ServerName), - SslCaCertificateArn: __expectString(output.SslCaCertificateArn), - SslSecurityProtocol: __expectString(output.SslSecurityProtocol), - } as any; -}; +// de_RedisSettings omitted. -/** - * deserializeAws_json1_1RedshiftSettings - */ -const de_RedshiftSettings = (output: any, context: __SerdeContext): RedshiftSettings => { - return { - AcceptAnyDate: __expectBoolean(output.AcceptAnyDate), - AfterConnectScript: __expectString(output.AfterConnectScript), - BucketFolder: __expectString(output.BucketFolder), - BucketName: __expectString(output.BucketName), - CaseSensitiveNames: __expectBoolean(output.CaseSensitiveNames), - CompUpdate: __expectBoolean(output.CompUpdate), - ConnectionTimeout: __expectInt32(output.ConnectionTimeout), - DatabaseName: __expectString(output.DatabaseName), - DateFormat: __expectString(output.DateFormat), - EmptyAsNull: __expectBoolean(output.EmptyAsNull), - EncryptionMode: __expectString(output.EncryptionMode), - ExplicitIds: __expectBoolean(output.ExplicitIds), - FileTransferUploadStreams: __expectInt32(output.FileTransferUploadStreams), - LoadTimeout: __expectInt32(output.LoadTimeout), - MapBooleanAsBoolean: __expectBoolean(output.MapBooleanAsBoolean), - MaxFileSize: __expectInt32(output.MaxFileSize), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - RemoveQuotes: __expectBoolean(output.RemoveQuotes), - ReplaceChars: __expectString(output.ReplaceChars), - ReplaceInvalidChars: __expectString(output.ReplaceInvalidChars), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - ServerSideEncryptionKmsKeyId: __expectString(output.ServerSideEncryptionKmsKeyId), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - TimeFormat: __expectString(output.TimeFormat), - TrimBlanks: __expectBoolean(output.TrimBlanks), - TruncateColumns: __expectBoolean(output.TruncateColumns), - Username: __expectString(output.Username), - WriteBufferSize: __expectInt32(output.WriteBufferSize), - } as any; -}; +// de_RedshiftSettings omitted. /** * deserializeAws_json1_1RefreshSchemasResponse */ const de_RefreshSchemasResponse = (output: any, context: __SerdeContext): RefreshSchemasResponse => { - return { - RefreshSchemasStatus: - output.RefreshSchemasStatus != null ? de_RefreshSchemasStatus(output.RefreshSchemasStatus, context) : undefined, - } as any; + return take(output, { + RefreshSchemasStatus: (_: any) => de_RefreshSchemasStatus(_, context), + }) as any; }; /** * deserializeAws_json1_1RefreshSchemasStatus */ const de_RefreshSchemasStatus = (output: any, context: __SerdeContext): RefreshSchemasStatus => { - return { - EndpointArn: __expectString(output.EndpointArn), - LastFailureMessage: __expectString(output.LastFailureMessage), - LastRefreshDate: - output.LastRefreshDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRefreshDate))) - : undefined, - ReplicationInstanceArn: __expectString(output.ReplicationInstanceArn), - Status: __expectString(output.Status), - } as any; + return take(output, { + EndpointArn: __expectString, + LastFailureMessage: __expectString, + LastRefreshDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplicationInstanceArn: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ReloadTablesResponse - */ -const de_ReloadTablesResponse = (output: any, context: __SerdeContext): ReloadTablesResponse => { - return { - ReplicationTaskArn: __expectString(output.ReplicationTaskArn), - } as any; -}; +// de_ReloadTablesResponse omitted. -/** - * deserializeAws_json1_1RemoveTagsFromResourceResponse - */ -const de_RemoveTagsFromResourceResponse = (output: any, context: __SerdeContext): RemoveTagsFromResourceResponse => { - return {} as any; -}; +// de_RemoveTagsFromResourceResponse omitted. /** * deserializeAws_json1_1ReplicationInstance */ const de_ReplicationInstance = (output: any, context: __SerdeContext): ReplicationInstance => { - return { - AllocatedStorage: __expectInt32(output.AllocatedStorage), - AutoMinorVersionUpgrade: __expectBoolean(output.AutoMinorVersionUpgrade), - AvailabilityZone: __expectString(output.AvailabilityZone), - DnsNameServers: __expectString(output.DnsNameServers), - EngineVersion: __expectString(output.EngineVersion), - FreeUntil: - output.FreeUntil != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FreeUntil))) : undefined, - InstanceCreateTime: - output.InstanceCreateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InstanceCreateTime))) - : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - MultiAZ: __expectBoolean(output.MultiAZ), - NetworkType: __expectString(output.NetworkType), - PendingModifiedValues: - output.PendingModifiedValues != null - ? de_ReplicationPendingModifiedValues(output.PendingModifiedValues, context) - : undefined, - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - PubliclyAccessible: __expectBoolean(output.PubliclyAccessible), - ReplicationInstanceArn: __expectString(output.ReplicationInstanceArn), - ReplicationInstanceClass: __expectString(output.ReplicationInstanceClass), - ReplicationInstanceIdentifier: __expectString(output.ReplicationInstanceIdentifier), - ReplicationInstanceIpv6Addresses: - output.ReplicationInstanceIpv6Addresses != null - ? de_ReplicationInstanceIpv6AddressList(output.ReplicationInstanceIpv6Addresses, context) - : undefined, - ReplicationInstancePrivateIpAddress: __expectString(output.ReplicationInstancePrivateIpAddress), - ReplicationInstancePrivateIpAddresses: - output.ReplicationInstancePrivateIpAddresses != null - ? de_ReplicationInstancePrivateIpAddressList(output.ReplicationInstancePrivateIpAddresses, context) - : undefined, - ReplicationInstancePublicIpAddress: __expectString(output.ReplicationInstancePublicIpAddress), - ReplicationInstancePublicIpAddresses: - output.ReplicationInstancePublicIpAddresses != null - ? de_ReplicationInstancePublicIpAddressList(output.ReplicationInstancePublicIpAddresses, context) - : undefined, - ReplicationInstanceStatus: __expectString(output.ReplicationInstanceStatus), - ReplicationSubnetGroup: - output.ReplicationSubnetGroup != null - ? de_ReplicationSubnetGroup(output.ReplicationSubnetGroup, context) - : undefined, - SecondaryAvailabilityZone: __expectString(output.SecondaryAvailabilityZone), - VpcSecurityGroups: - output.VpcSecurityGroups != null - ? de_VpcSecurityGroupMembershipList(output.VpcSecurityGroups, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ReplicationInstanceIpv6AddressList - */ -const de_ReplicationInstanceIpv6AddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + AllocatedStorage: __expectInt32, + AutoMinorVersionUpgrade: __expectBoolean, + AvailabilityZone: __expectString, + DnsNameServers: __expectString, + EngineVersion: __expectString, + FreeUntil: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InstanceCreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KmsKeyId: __expectString, + MultiAZ: __expectBoolean, + NetworkType: __expectString, + PendingModifiedValues: _json, + PreferredMaintenanceWindow: __expectString, + PubliclyAccessible: __expectBoolean, + ReplicationInstanceArn: __expectString, + ReplicationInstanceClass: __expectString, + ReplicationInstanceIdentifier: __expectString, + ReplicationInstanceIpv6Addresses: _json, + ReplicationInstancePrivateIpAddress: __expectString, + ReplicationInstancePrivateIpAddresses: _json, + ReplicationInstancePublicIpAddress: __expectString, + ReplicationInstancePublicIpAddresses: _json, + ReplicationInstanceStatus: __expectString, + ReplicationSubnetGroup: _json, + SecondaryAvailabilityZone: __expectString, + VpcSecurityGroups: _json, + }) as any; +}; + +// de_ReplicationInstanceIpv6AddressList omitted. /** * deserializeAws_json1_1ReplicationInstanceList @@ -9120,178 +6212,67 @@ const de_ReplicationInstanceList = (output: any, context: __SerdeContext): Repli const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationInstance(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReplicationInstancePrivateIpAddressList - */ -const de_ReplicationInstancePrivateIpAddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ReplicationInstancePrivateIpAddressList omitted. -/** - * deserializeAws_json1_1ReplicationInstancePublicIpAddressList - */ -const de_ReplicationInstancePublicIpAddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ReplicationInstancePublicIpAddressList omitted. -/** - * deserializeAws_json1_1ReplicationInstanceTaskLog - */ -const de_ReplicationInstanceTaskLog = (output: any, context: __SerdeContext): ReplicationInstanceTaskLog => { - return { - ReplicationInstanceTaskLogSize: __expectLong(output.ReplicationInstanceTaskLogSize), - ReplicationTaskArn: __expectString(output.ReplicationTaskArn), - ReplicationTaskName: __expectString(output.ReplicationTaskName), - } as any; -}; +// de_ReplicationInstanceTaskLog omitted. -/** - * deserializeAws_json1_1ReplicationInstanceTaskLogsList - */ -const de_ReplicationInstanceTaskLogsList = (output: any, context: __SerdeContext): ReplicationInstanceTaskLog[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationInstanceTaskLog(entry, context); - }); - return retVal; -}; +// de_ReplicationInstanceTaskLogsList omitted. -/** - * deserializeAws_json1_1ReplicationPendingModifiedValues - */ -const de_ReplicationPendingModifiedValues = ( - output: any, - context: __SerdeContext -): ReplicationPendingModifiedValues => { - return { - AllocatedStorage: __expectInt32(output.AllocatedStorage), - EngineVersion: __expectString(output.EngineVersion), - MultiAZ: __expectBoolean(output.MultiAZ), - NetworkType: __expectString(output.NetworkType), - ReplicationInstanceClass: __expectString(output.ReplicationInstanceClass), - } as any; -}; +// de_ReplicationPendingModifiedValues omitted. -/** - * deserializeAws_json1_1ReplicationSubnetGroup - */ -const de_ReplicationSubnetGroup = (output: any, context: __SerdeContext): ReplicationSubnetGroup => { - return { - ReplicationSubnetGroupDescription: __expectString(output.ReplicationSubnetGroupDescription), - ReplicationSubnetGroupIdentifier: __expectString(output.ReplicationSubnetGroupIdentifier), - SubnetGroupStatus: __expectString(output.SubnetGroupStatus), - Subnets: output.Subnets != null ? de_SubnetList(output.Subnets, context) : undefined, - SupportedNetworkTypes: - output.SupportedNetworkTypes != null ? de_StringList(output.SupportedNetworkTypes, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_ReplicationSubnetGroup omitted. -/** - * deserializeAws_json1_1ReplicationSubnetGroupDoesNotCoverEnoughAZs - */ -const de_ReplicationSubnetGroupDoesNotCoverEnoughAZs = ( - output: any, - context: __SerdeContext -): ReplicationSubnetGroupDoesNotCoverEnoughAZs => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReplicationSubnetGroupDoesNotCoverEnoughAZs omitted. -/** - * deserializeAws_json1_1ReplicationSubnetGroups - */ -const de_ReplicationSubnetGroups = (output: any, context: __SerdeContext): ReplicationSubnetGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationSubnetGroup(entry, context); - }); - return retVal; -}; +// de_ReplicationSubnetGroups omitted. /** * deserializeAws_json1_1ReplicationTask */ const de_ReplicationTask = (output: any, context: __SerdeContext): ReplicationTask => { - return { - CdcStartPosition: __expectString(output.CdcStartPosition), - CdcStopPosition: __expectString(output.CdcStopPosition), - LastFailureMessage: __expectString(output.LastFailureMessage), - MigrationType: __expectString(output.MigrationType), - RecoveryCheckpoint: __expectString(output.RecoveryCheckpoint), - ReplicationInstanceArn: __expectString(output.ReplicationInstanceArn), - ReplicationTaskArn: __expectString(output.ReplicationTaskArn), - ReplicationTaskCreationDate: - output.ReplicationTaskCreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplicationTaskCreationDate))) - : undefined, - ReplicationTaskIdentifier: __expectString(output.ReplicationTaskIdentifier), - ReplicationTaskSettings: __expectString(output.ReplicationTaskSettings), - ReplicationTaskStartDate: - output.ReplicationTaskStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplicationTaskStartDate))) - : undefined, - ReplicationTaskStats: - output.ReplicationTaskStats != null ? de_ReplicationTaskStats(output.ReplicationTaskStats, context) : undefined, - SourceEndpointArn: __expectString(output.SourceEndpointArn), - Status: __expectString(output.Status), - StopReason: __expectString(output.StopReason), - TableMappings: __expectString(output.TableMappings), - TargetEndpointArn: __expectString(output.TargetEndpointArn), - TargetReplicationInstanceArn: __expectString(output.TargetReplicationInstanceArn), - TaskData: __expectString(output.TaskData), - } as any; + return take(output, { + CdcStartPosition: __expectString, + CdcStopPosition: __expectString, + LastFailureMessage: __expectString, + MigrationType: __expectString, + RecoveryCheckpoint: __expectString, + ReplicationInstanceArn: __expectString, + ReplicationTaskArn: __expectString, + ReplicationTaskCreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplicationTaskIdentifier: __expectString, + ReplicationTaskSettings: __expectString, + ReplicationTaskStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplicationTaskStats: (_: any) => de_ReplicationTaskStats(_, context), + SourceEndpointArn: __expectString, + Status: __expectString, + StopReason: __expectString, + TableMappings: __expectString, + TargetEndpointArn: __expectString, + TargetReplicationInstanceArn: __expectString, + TaskData: __expectString, + }) as any; }; /** * deserializeAws_json1_1ReplicationTaskAssessmentResult */ const de_ReplicationTaskAssessmentResult = (output: any, context: __SerdeContext): ReplicationTaskAssessmentResult => { - return { - AssessmentResults: __expectString(output.AssessmentResults), - AssessmentResultsFile: __expectString(output.AssessmentResultsFile), - AssessmentStatus: __expectString(output.AssessmentStatus), - ReplicationTaskArn: __expectString(output.ReplicationTaskArn), - ReplicationTaskIdentifier: __expectString(output.ReplicationTaskIdentifier), - ReplicationTaskLastAssessmentDate: - output.ReplicationTaskLastAssessmentDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplicationTaskLastAssessmentDate))) - : undefined, - S3ObjectUrl: __expectString(output.S3ObjectUrl), - } as any; + return take(output, { + AssessmentResults: __expectString, + AssessmentResultsFile: __expectString, + AssessmentStatus: __expectString, + ReplicationTaskArn: __expectString, + ReplicationTaskIdentifier: __expectString, + ReplicationTaskLastAssessmentDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + S3ObjectUrl: __expectString, + }) as any; }; /** @@ -9304,9 +6285,6 @@ const de_ReplicationTaskAssessmentResultList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationTaskAssessmentResult(entry, context); }); return retVal; @@ -9316,26 +6294,20 @@ const de_ReplicationTaskAssessmentResultList = ( * deserializeAws_json1_1ReplicationTaskAssessmentRun */ const de_ReplicationTaskAssessmentRun = (output: any, context: __SerdeContext): ReplicationTaskAssessmentRun => { - return { - AssessmentProgress: - output.AssessmentProgress != null - ? de_ReplicationTaskAssessmentRunProgress(output.AssessmentProgress, context) - : undefined, - AssessmentRunName: __expectString(output.AssessmentRunName), - LastFailureMessage: __expectString(output.LastFailureMessage), - ReplicationTaskArn: __expectString(output.ReplicationTaskArn), - ReplicationTaskAssessmentRunArn: __expectString(output.ReplicationTaskAssessmentRunArn), - ReplicationTaskAssessmentRunCreationDate: - output.ReplicationTaskAssessmentRunCreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplicationTaskAssessmentRunCreationDate))) - : undefined, - ResultEncryptionMode: __expectString(output.ResultEncryptionMode), - ResultKmsKeyArn: __expectString(output.ResultKmsKeyArn), - ResultLocationBucket: __expectString(output.ResultLocationBucket), - ResultLocationFolder: __expectString(output.ResultLocationFolder), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - Status: __expectString(output.Status), - } as any; + return take(output, { + AssessmentProgress: _json, + AssessmentRunName: __expectString, + LastFailureMessage: __expectString, + ReplicationTaskArn: __expectString, + ReplicationTaskAssessmentRunArn: __expectString, + ReplicationTaskAssessmentRunCreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResultEncryptionMode: __expectString, + ResultKmsKeyArn: __expectString, + ResultLocationBucket: __expectString, + ResultLocationFolder: __expectString, + ServiceAccessRoleArn: __expectString, + Status: __expectString, + }) as any; }; /** @@ -9345,26 +6317,12 @@ const de_ReplicationTaskAssessmentRunList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationTaskAssessmentRun(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReplicationTaskAssessmentRunProgress - */ -const de_ReplicationTaskAssessmentRunProgress = ( - output: any, - context: __SerdeContext -): ReplicationTaskAssessmentRunProgress => { - return { - IndividualAssessmentCompletedCount: __expectInt32(output.IndividualAssessmentCompletedCount), - IndividualAssessmentCount: __expectInt32(output.IndividualAssessmentCount), - } as any; -}; +// de_ReplicationTaskAssessmentRunProgress omitted. /** * deserializeAws_json1_1ReplicationTaskIndividualAssessment @@ -9373,16 +6331,13 @@ const de_ReplicationTaskIndividualAssessment = ( output: any, context: __SerdeContext ): ReplicationTaskIndividualAssessment => { - return { - IndividualAssessmentName: __expectString(output.IndividualAssessmentName), - ReplicationTaskAssessmentRunArn: __expectString(output.ReplicationTaskAssessmentRunArn), - ReplicationTaskIndividualAssessmentArn: __expectString(output.ReplicationTaskIndividualAssessmentArn), - ReplicationTaskIndividualAssessmentStartDate: - output.ReplicationTaskIndividualAssessmentStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplicationTaskIndividualAssessmentStartDate))) - : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + IndividualAssessmentName: __expectString, + ReplicationTaskAssessmentRunArn: __expectString, + ReplicationTaskIndividualAssessmentArn: __expectString, + ReplicationTaskIndividualAssessmentStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** @@ -9395,9 +6350,6 @@ const de_ReplicationTaskIndividualAssessmentList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationTaskIndividualAssessment(entry, context); }); return retVal; @@ -9410,9 +6362,6 @@ const de_ReplicationTaskList = (output: any, context: __SerdeContext): Replicati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationTask(entry, context); }); return retVal; @@ -9422,50 +6371,24 @@ const de_ReplicationTaskList = (output: any, context: __SerdeContext): Replicati * deserializeAws_json1_1ReplicationTaskStats */ const de_ReplicationTaskStats = (output: any, context: __SerdeContext): ReplicationTaskStats => { - return { - ElapsedTimeMillis: __expectLong(output.ElapsedTimeMillis), - FreshStartDate: - output.FreshStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FreshStartDate))) - : undefined, - FullLoadFinishDate: - output.FullLoadFinishDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FullLoadFinishDate))) - : undefined, - FullLoadProgressPercent: __expectInt32(output.FullLoadProgressPercent), - FullLoadStartDate: - output.FullLoadStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FullLoadStartDate))) - : undefined, - StartDate: - output.StartDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDate))) : undefined, - StopDate: - output.StopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StopDate))) : undefined, - TablesErrored: __expectInt32(output.TablesErrored), - TablesLoaded: __expectInt32(output.TablesLoaded), - TablesLoading: __expectInt32(output.TablesLoading), - TablesQueued: __expectInt32(output.TablesQueued), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceAlreadyExistsFault - */ -const de_ResourceAlreadyExistsFault = (output: any, context: __SerdeContext): ResourceAlreadyExistsFault => { - return { - message: __expectString(output.message), - resourceArn: __expectString(output.resourceArn), - } as any; + return take(output, { + ElapsedTimeMillis: __expectLong, + FreshStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FullLoadFinishDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FullLoadProgressPercent: __expectInt32, + FullLoadStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TablesErrored: __expectInt32, + TablesLoaded: __expectInt32, + TablesLoading: __expectInt32, + TablesQueued: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_1ResourceNotFoundFault - */ -const de_ResourceNotFoundFault = (output: any, context: __SerdeContext): ResourceNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceAlreadyExistsFault omitted. + +// de_ResourceNotFoundFault omitted. /** * deserializeAws_json1_1ResourcePendingMaintenanceActions @@ -9474,194 +6397,50 @@ const de_ResourcePendingMaintenanceActions = ( output: any, context: __SerdeContext ): ResourcePendingMaintenanceActions => { - return { - PendingMaintenanceActionDetails: - output.PendingMaintenanceActionDetails != null - ? de_PendingMaintenanceActionDetails(output.PendingMaintenanceActionDetails, context) - : undefined, - ResourceIdentifier: __expectString(output.ResourceIdentifier), - } as any; + return take(output, { + PendingMaintenanceActionDetails: (_: any) => de_PendingMaintenanceActionDetails(_, context), + ResourceIdentifier: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceQuotaExceededFault - */ -const de_ResourceQuotaExceededFault = (output: any, context: __SerdeContext): ResourceQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceQuotaExceededFault omitted. -/** - * deserializeAws_json1_1RunFleetAdvisorLsaAnalysisResponse - */ -const de_RunFleetAdvisorLsaAnalysisResponse = ( - output: any, - context: __SerdeContext -): RunFleetAdvisorLsaAnalysisResponse => { - return { - LsaAnalysisId: __expectString(output.LsaAnalysisId), - Status: __expectString(output.Status), - } as any; -}; +// de_RunFleetAdvisorLsaAnalysisResponse omitted. -/** - * deserializeAws_json1_1S3AccessDeniedFault - */ -const de_S3AccessDeniedFault = (output: any, context: __SerdeContext): S3AccessDeniedFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_S3AccessDeniedFault omitted. -/** - * deserializeAws_json1_1S3ResourceNotFoundFault - */ -const de_S3ResourceNotFoundFault = (output: any, context: __SerdeContext): S3ResourceNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_S3ResourceNotFoundFault omitted. -/** - * deserializeAws_json1_1S3Settings - */ -const de_S3Settings = (output: any, context: __SerdeContext): S3Settings => { - return { - AddColumnName: __expectBoolean(output.AddColumnName), - AddTrailingPaddingCharacter: __expectBoolean(output.AddTrailingPaddingCharacter), - BucketFolder: __expectString(output.BucketFolder), - BucketName: __expectString(output.BucketName), - CannedAclForObjects: __expectString(output.CannedAclForObjects), - CdcInsertsAndUpdates: __expectBoolean(output.CdcInsertsAndUpdates), - CdcInsertsOnly: __expectBoolean(output.CdcInsertsOnly), - CdcMaxBatchInterval: __expectInt32(output.CdcMaxBatchInterval), - CdcMinFileSize: __expectInt32(output.CdcMinFileSize), - CdcPath: __expectString(output.CdcPath), - CompressionType: __expectString(output.CompressionType), - CsvDelimiter: __expectString(output.CsvDelimiter), - CsvNoSupValue: __expectString(output.CsvNoSupValue), - CsvNullValue: __expectString(output.CsvNullValue), - CsvRowDelimiter: __expectString(output.CsvRowDelimiter), - DataFormat: __expectString(output.DataFormat), - DataPageSize: __expectInt32(output.DataPageSize), - DatePartitionDelimiter: __expectString(output.DatePartitionDelimiter), - DatePartitionEnabled: __expectBoolean(output.DatePartitionEnabled), - DatePartitionSequence: __expectString(output.DatePartitionSequence), - DatePartitionTimezone: __expectString(output.DatePartitionTimezone), - DictPageSizeLimit: __expectInt32(output.DictPageSizeLimit), - EnableStatistics: __expectBoolean(output.EnableStatistics), - EncodingType: __expectString(output.EncodingType), - EncryptionMode: __expectString(output.EncryptionMode), - ExpectedBucketOwner: __expectString(output.ExpectedBucketOwner), - ExternalTableDefinition: __expectString(output.ExternalTableDefinition), - GlueCatalogGeneration: __expectBoolean(output.GlueCatalogGeneration), - IgnoreHeaderRows: __expectInt32(output.IgnoreHeaderRows), - IncludeOpForFullLoad: __expectBoolean(output.IncludeOpForFullLoad), - MaxFileSize: __expectInt32(output.MaxFileSize), - ParquetTimestampInMillisecond: __expectBoolean(output.ParquetTimestampInMillisecond), - ParquetVersion: __expectString(output.ParquetVersion), - PreserveTransactions: __expectBoolean(output.PreserveTransactions), - Rfc4180: __expectBoolean(output.Rfc4180), - RowGroupLength: __expectInt32(output.RowGroupLength), - ServerSideEncryptionKmsKeyId: __expectString(output.ServerSideEncryptionKmsKeyId), - ServiceAccessRoleArn: __expectString(output.ServiceAccessRoleArn), - TimestampColumnName: __expectString(output.TimestampColumnName), - UseCsvNoSupValue: __expectBoolean(output.UseCsvNoSupValue), - UseTaskStartTimeForFullLoadTimestamp: __expectBoolean(output.UseTaskStartTimeForFullLoadTimestamp), - } as any; -}; - -/** - * deserializeAws_json1_1SchemaList - */ -const de_SchemaList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_S3Settings omitted. + +// de_SchemaList omitted. /** * deserializeAws_json1_1SchemaResponse */ const de_SchemaResponse = (output: any, context: __SerdeContext): SchemaResponse => { - return { - CodeLineCount: __expectLong(output.CodeLineCount), - CodeSize: __expectLong(output.CodeSize), - Complexity: __expectString(output.Complexity), - DatabaseInstance: - output.DatabaseInstance != null ? de_DatabaseShortInfoResponse(output.DatabaseInstance, context) : undefined, - OriginalSchema: - output.OriginalSchema != null ? de_SchemaShortInfoResponse(output.OriginalSchema, context) : undefined, - SchemaId: __expectString(output.SchemaId), - SchemaName: __expectString(output.SchemaName), - Server: output.Server != null ? de_ServerShortInfoResponse(output.Server, context) : undefined, - Similarity: __limitedParseDouble(output.Similarity), - } as any; + return take(output, { + CodeLineCount: __expectLong, + CodeSize: __expectLong, + Complexity: __expectString, + DatabaseInstance: _json, + OriginalSchema: _json, + SchemaId: __expectString, + SchemaName: __expectString, + Server: _json, + Similarity: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1SchemaShortInfoResponse - */ -const de_SchemaShortInfoResponse = (output: any, context: __SerdeContext): SchemaShortInfoResponse => { - return { - DatabaseId: __expectString(output.DatabaseId), - DatabaseIpAddress: __expectString(output.DatabaseIpAddress), - DatabaseName: __expectString(output.DatabaseName), - SchemaId: __expectString(output.SchemaId), - SchemaName: __expectString(output.SchemaName), - } as any; -}; +// de_SchemaShortInfoResponse omitted. -/** - * deserializeAws_json1_1ServerShortInfoResponse - */ -const de_ServerShortInfoResponse = (output: any, context: __SerdeContext): ServerShortInfoResponse => { - return { - IpAddress: __expectString(output.IpAddress), - ServerId: __expectString(output.ServerId), - ServerName: __expectString(output.ServerName), - } as any; -}; +// de_ServerShortInfoResponse omitted. -/** - * deserializeAws_json1_1SNSInvalidTopicFault - */ -const de_SNSInvalidTopicFault = (output: any, context: __SerdeContext): SNSInvalidTopicFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SNSInvalidTopicFault omitted. -/** - * deserializeAws_json1_1SNSNoAuthorizationFault - */ -const de_SNSNoAuthorizationFault = (output: any, context: __SerdeContext): SNSNoAuthorizationFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SNSNoAuthorizationFault omitted. -/** - * deserializeAws_json1_1SourceIdsList - */ -const de_SourceIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SourceIdsList omitted. /** * deserializeAws_json1_1StartReplicationTaskAssessmentResponse @@ -9670,9 +6449,9 @@ const de_StartReplicationTaskAssessmentResponse = ( output: any, context: __SerdeContext ): StartReplicationTaskAssessmentResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; /** @@ -9682,173 +6461,74 @@ const de_StartReplicationTaskAssessmentRunResponse = ( output: any, context: __SerdeContext ): StartReplicationTaskAssessmentRunResponse => { - return { - ReplicationTaskAssessmentRun: - output.ReplicationTaskAssessmentRun != null - ? de_ReplicationTaskAssessmentRun(output.ReplicationTaskAssessmentRun, context) - : undefined, - } as any; + return take(output, { + ReplicationTaskAssessmentRun: (_: any) => de_ReplicationTaskAssessmentRun(_, context), + }) as any; }; /** * deserializeAws_json1_1StartReplicationTaskResponse */ const de_StartReplicationTaskResponse = (output: any, context: __SerdeContext): StartReplicationTaskResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; /** * deserializeAws_json1_1StopReplicationTaskResponse */ const de_StopReplicationTaskResponse = (output: any, context: __SerdeContext): StopReplicationTaskResponse => { - return { - ReplicationTask: output.ReplicationTask != null ? de_ReplicationTask(output.ReplicationTask, context) : undefined, - } as any; + return take(output, { + ReplicationTask: (_: any) => de_ReplicationTask(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StorageQuotaExceededFault - */ -const de_StorageQuotaExceededFault = (output: any, context: __SerdeContext): StorageQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StorageQuotaExceededFault omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1Subnet - */ -const de_Subnet = (output: any, context: __SerdeContext): Subnet => { - return { - SubnetAvailabilityZone: - output.SubnetAvailabilityZone != null ? de_AvailabilityZone(output.SubnetAvailabilityZone, context) : undefined, - SubnetIdentifier: __expectString(output.SubnetIdentifier), - SubnetStatus: __expectString(output.SubnetStatus), - } as any; -}; +// de_Subnet omitted. -/** - * deserializeAws_json1_1SubnetAlreadyInUse - */ -const de_SubnetAlreadyInUse = (output: any, context: __SerdeContext): SubnetAlreadyInUse => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetAlreadyInUse omitted. -/** - * deserializeAws_json1_1SubnetList - */ -const de_SubnetList = (output: any, context: __SerdeContext): Subnet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subnet(entry, context); - }); - return retVal; -}; +// de_SubnetList omitted. -/** - * deserializeAws_json1_1SupportedEndpointType - */ -const de_SupportedEndpointType = (output: any, context: __SerdeContext): SupportedEndpointType => { - return { - EndpointType: __expectString(output.EndpointType), - EngineDisplayName: __expectString(output.EngineDisplayName), - EngineName: __expectString(output.EngineName), - ReplicationInstanceEngineMinimumVersion: __expectString(output.ReplicationInstanceEngineMinimumVersion), - SupportsCDC: __expectBoolean(output.SupportsCDC), - } as any; -}; +// de_SupportedEndpointType omitted. -/** - * deserializeAws_json1_1SupportedEndpointTypeList - */ -const de_SupportedEndpointTypeList = (output: any, context: __SerdeContext): SupportedEndpointType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SupportedEndpointType(entry, context); - }); - return retVal; -}; +// de_SupportedEndpointTypeList omitted. -/** - * deserializeAws_json1_1SybaseSettings - */ -const de_SybaseSettings = (output: any, context: __SerdeContext): SybaseSettings => { - return { - DatabaseName: __expectString(output.DatabaseName), - Password: __expectString(output.Password), - Port: __expectInt32(output.Port), - SecretsManagerAccessRoleArn: __expectString(output.SecretsManagerAccessRoleArn), - SecretsManagerSecretId: __expectString(output.SecretsManagerSecretId), - ServerName: __expectString(output.ServerName), - Username: __expectString(output.Username), - } as any; -}; +// de_SybaseSettings omitted. /** * deserializeAws_json1_1TableStatistics */ const de_TableStatistics = (output: any, context: __SerdeContext): TableStatistics => { - return { - AppliedDdls: __expectLong(output.AppliedDdls), - AppliedDeletes: __expectLong(output.AppliedDeletes), - AppliedInserts: __expectLong(output.AppliedInserts), - AppliedUpdates: __expectLong(output.AppliedUpdates), - Ddls: __expectLong(output.Ddls), - Deletes: __expectLong(output.Deletes), - FullLoadCondtnlChkFailedRows: __expectLong(output.FullLoadCondtnlChkFailedRows), - FullLoadEndTime: - output.FullLoadEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FullLoadEndTime))) - : undefined, - FullLoadErrorRows: __expectLong(output.FullLoadErrorRows), - FullLoadReloaded: __expectBoolean(output.FullLoadReloaded), - FullLoadRows: __expectLong(output.FullLoadRows), - FullLoadStartTime: - output.FullLoadStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FullLoadStartTime))) - : undefined, - Inserts: __expectLong(output.Inserts), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - SchemaName: __expectString(output.SchemaName), - TableName: __expectString(output.TableName), - TableState: __expectString(output.TableState), - Updates: __expectLong(output.Updates), - ValidationFailedRecords: __expectLong(output.ValidationFailedRecords), - ValidationPendingRecords: __expectLong(output.ValidationPendingRecords), - ValidationState: __expectString(output.ValidationState), - ValidationStateDetails: __expectString(output.ValidationStateDetails), - ValidationSuspendedRecords: __expectLong(output.ValidationSuspendedRecords), - } as any; + return take(output, { + AppliedDdls: __expectLong, + AppliedDeletes: __expectLong, + AppliedInserts: __expectLong, + AppliedUpdates: __expectLong, + Ddls: __expectLong, + Deletes: __expectLong, + FullLoadCondtnlChkFailedRows: __expectLong, + FullLoadEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FullLoadErrorRows: __expectLong, + FullLoadReloaded: __expectBoolean, + FullLoadRows: __expectLong, + FullLoadStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Inserts: __expectLong, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SchemaName: __expectString, + TableName: __expectString, + TableState: __expectString, + Updates: __expectLong, + ValidationFailedRecords: __expectLong, + ValidationPendingRecords: __expectLong, + ValidationState: __expectString, + ValidationStateDetails: __expectString, + ValidationSuspendedRecords: __expectLong, + }) as any; }; /** @@ -9858,94 +6538,24 @@ const de_TableStatisticsList = (output: any, context: __SerdeContext): TableStat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TableStatistics(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - ResourceArn: __expectString(output.ResourceArn), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TestConnectionResponse - */ -const de_TestConnectionResponse = (output: any, context: __SerdeContext): TestConnectionResponse => { - return { - Connection: output.Connection != null ? de_Connection(output.Connection, context) : undefined, - } as any; -}; +// de_TestConnectionResponse omitted. -/** - * deserializeAws_json1_1UpdateSubscriptionsToEventBridgeResponse - */ -const de_UpdateSubscriptionsToEventBridgeResponse = ( - output: any, - context: __SerdeContext -): UpdateSubscriptionsToEventBridgeResponse => { - return { - Result: __expectString(output.Result), - } as any; -}; +// de_UpdateSubscriptionsToEventBridgeResponse omitted. -/** - * deserializeAws_json1_1UpgradeDependencyFailureFault - */ -const de_UpgradeDependencyFailureFault = (output: any, context: __SerdeContext): UpgradeDependencyFailureFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UpgradeDependencyFailureFault omitted. -/** - * deserializeAws_json1_1VpcSecurityGroupMembership - */ -const de_VpcSecurityGroupMembership = (output: any, context: __SerdeContext): VpcSecurityGroupMembership => { - return { - Status: __expectString(output.Status), - VpcSecurityGroupId: __expectString(output.VpcSecurityGroupId), - } as any; -}; +// de_VpcSecurityGroupMembership omitted. -/** - * deserializeAws_json1_1VpcSecurityGroupMembershipList - */ -const de_VpcSecurityGroupMembershipList = (output: any, context: __SerdeContext): VpcSecurityGroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcSecurityGroupMembership(entry, context); - }); - return retVal; -}; +// de_VpcSecurityGroupMembershipList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9967,6 +6577,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-databrew/src/protocols/Aws_restJson1.ts b/clients/client-databrew/src/protocols/Aws_restJson1.ts index c4efc655200d..de5fedb97be7 100644 --- a/clients/client-databrew/src/protocols/Aws_restJson1.ts +++ b/clients/client-databrew/src/protocols/Aws_restJson1.ts @@ -1,21 +1,22 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -121,7 +122,6 @@ import { RecipeAction, RecipeReference, RecipeStep, - RecipeVersionErrorDetail, ResourceNotFoundException, Rule, RulesetItem, @@ -153,9 +153,11 @@ export const se_BatchDeleteRecipeVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recipes/{Name}/batchDeleteRecipeVersion"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.RecipeVersions != null && { RecipeVersions: se_RecipeVersionList(input.RecipeVersions, context) }), - }); + body = JSON.stringify( + take(input, { + RecipeVersions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -180,14 +182,16 @@ export const se_CreateDatasetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets"; let body: any; - body = JSON.stringify({ - ...(input.Format != null && { Format: input.Format }), - ...(input.FormatOptions != null && { FormatOptions: se_FormatOptions(input.FormatOptions, context) }), - ...(input.Input != null && { Input: se_Input(input.Input, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PathOptions != null && { PathOptions: se_PathOptions(input.PathOptions, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Format: [], + FormatOptions: (_) => _json(_), + Input: (_) => _json(_), + Name: [], + PathOptions: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -212,24 +216,24 @@ export const se_CreateProfileJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profileJobs"; let body: any; - body = JSON.stringify({ - ...(input.Configuration != null && { Configuration: se_ProfileConfiguration(input.Configuration, context) }), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.JobSample != null && { JobSample: se_JobSample(input.JobSample, context) }), - ...(input.LogSubscription != null && { LogSubscription: input.LogSubscription }), - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputLocation != null && { OutputLocation: se_S3Location(input.OutputLocation, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.ValidationConfigurations != null && { - ValidationConfigurations: se_ValidationConfigurationList(input.ValidationConfigurations, context), - }), - }); + body = JSON.stringify( + take(input, { + Configuration: (_) => _json(_), + DatasetName: [], + EncryptionKeyArn: [], + EncryptionMode: [], + JobSample: (_) => _json(_), + LogSubscription: [], + MaxCapacity: [], + MaxRetries: [], + Name: [], + OutputLocation: (_) => _json(_), + RoleArn: [], + Tags: (_) => _json(_), + Timeout: [], + ValidationConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -254,14 +258,16 @@ export const se_CreateProjectCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects"; let body: any; - body = JSON.stringify({ - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RecipeName != null && { RecipeName: input.RecipeName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Sample != null && { Sample: se_Sample(input.Sample, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DatasetName: [], + Name: [], + RecipeName: [], + RoleArn: [], + Sample: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -286,12 +292,14 @@ export const se_CreateRecipeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recipes"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Steps != null && { Steps: se_RecipeStepList(input.Steps, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + Steps: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -316,25 +324,25 @@ export const se_CreateRecipeJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recipeJobs"; let body: any; - body = JSON.stringify({ - ...(input.DataCatalogOutputs != null && { - DataCatalogOutputs: se_DataCatalogOutputList(input.DataCatalogOutputs, context), - }), - ...(input.DatabaseOutputs != null && { DatabaseOutputs: se_DatabaseOutputList(input.DatabaseOutputs, context) }), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.LogSubscription != null && { LogSubscription: input.LogSubscription }), - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Outputs != null && { Outputs: se_OutputList(input.Outputs, context) }), - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - ...(input.RecipeReference != null && { RecipeReference: se_RecipeReference(input.RecipeReference, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }); + body = JSON.stringify( + take(input, { + DataCatalogOutputs: (_) => _json(_), + DatabaseOutputs: (_) => _json(_), + DatasetName: [], + EncryptionKeyArn: [], + EncryptionMode: [], + LogSubscription: [], + MaxCapacity: [], + MaxRetries: [], + Name: [], + Outputs: (_) => _json(_), + ProjectName: [], + RecipeReference: (_) => _json(_), + RoleArn: [], + Tags: (_) => _json(_), + Timeout: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -359,13 +367,15 @@ export const se_CreateRulesetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rulesets"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_RuleList(input.Rules, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + Rules: (_) => se_RuleList(_, context), + Tags: (_) => _json(_), + TargetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -390,12 +400,14 @@ export const se_CreateScheduleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules"; let body: any; - body = JSON.stringify({ - ...(input.CronExpression != null && { CronExpression: input.CronExpression }), - ...(input.JobNames != null && { JobNames: se_JobNameList(input.JobNames, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + CronExpression: [], + JobNames: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -983,9 +995,11 @@ export const se_PublishRecipeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recipes/{Name}/publishRecipe"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1012,13 +1026,15 @@ export const se_SendProjectSessionActionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{Name}/sendProjectSessionAction"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.ClientSessionId != null && { ClientSessionId: input.ClientSessionId }), - ...(input.Preview != null && { Preview: input.Preview }), - ...(input.RecipeStep != null && { RecipeStep: se_RecipeStep(input.RecipeStep, context) }), - ...(input.StepIndex != null && { StepIndex: input.StepIndex }), - ...(input.ViewFrame != null && { ViewFrame: se_ViewFrame(input.ViewFrame, context) }), - }); + body = JSON.stringify( + take(input, { + ClientSessionId: [], + Preview: [], + RecipeStep: (_) => _json(_), + StepIndex: [], + ViewFrame: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1068,9 +1084,11 @@ export const se_StartProjectSessionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{Name}/startProjectSession"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.AssumeControl != null && { AssumeControl: input.AssumeControl }), - }); + body = JSON.stringify( + take(input, { + AssumeControl: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1121,9 +1139,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1179,12 +1199,14 @@ export const se_UpdateDatasetCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Format != null && { Format: input.Format }), - ...(input.FormatOptions != null && { FormatOptions: se_FormatOptions(input.FormatOptions, context) }), - ...(input.Input != null && { Input: se_Input(input.Input, context) }), - ...(input.PathOptions != null && { PathOptions: se_PathOptions(input.PathOptions, context) }), - }); + body = JSON.stringify( + take(input, { + Format: [], + FormatOptions: (_) => _json(_), + Input: (_) => _json(_), + PathOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1210,21 +1232,21 @@ export const se_UpdateProfileJobCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profileJobs/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Configuration != null && { Configuration: se_ProfileConfiguration(input.Configuration, context) }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.JobSample != null && { JobSample: se_JobSample(input.JobSample, context) }), - ...(input.LogSubscription != null && { LogSubscription: input.LogSubscription }), - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.OutputLocation != null && { OutputLocation: se_S3Location(input.OutputLocation, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.ValidationConfigurations != null && { - ValidationConfigurations: se_ValidationConfigurationList(input.ValidationConfigurations, context), - }), - }); + body = JSON.stringify( + take(input, { + Configuration: (_) => _json(_), + EncryptionKeyArn: [], + EncryptionMode: [], + JobSample: (_) => _json(_), + LogSubscription: [], + MaxCapacity: [], + MaxRetries: [], + OutputLocation: (_) => _json(_), + RoleArn: [], + Timeout: [], + ValidationConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1250,10 +1272,12 @@ export const se_UpdateProjectCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Sample != null && { Sample: se_Sample(input.Sample, context) }), - }); + body = JSON.stringify( + take(input, { + RoleArn: [], + Sample: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1279,10 +1303,12 @@ export const se_UpdateRecipeCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recipes/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Steps != null && { Steps: se_RecipeStepList(input.Steps, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Steps: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1308,20 +1334,20 @@ export const se_UpdateRecipeJobCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recipeJobs/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.DataCatalogOutputs != null && { - DataCatalogOutputs: se_DataCatalogOutputList(input.DataCatalogOutputs, context), - }), - ...(input.DatabaseOutputs != null && { DatabaseOutputs: se_DatabaseOutputList(input.DatabaseOutputs, context) }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.LogSubscription != null && { LogSubscription: input.LogSubscription }), - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.Outputs != null && { Outputs: se_OutputList(input.Outputs, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }); + body = JSON.stringify( + take(input, { + DataCatalogOutputs: (_) => _json(_), + DatabaseOutputs: (_) => _json(_), + EncryptionKeyArn: [], + EncryptionMode: [], + LogSubscription: [], + MaxCapacity: [], + MaxRetries: [], + Outputs: (_) => _json(_), + RoleArn: [], + Timeout: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1347,10 +1373,12 @@ export const se_UpdateRulesetCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rulesets/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Rules != null && { Rules: se_RuleList(input.Rules, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Rules: (_) => se_RuleList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1376,10 +1404,12 @@ export const se_UpdateScheduleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.CronExpression != null && { CronExpression: input.CronExpression }), - ...(input.JobNames != null && { JobNames: se_JobNameList(input.JobNames, context) }), - }); + body = JSON.stringify( + take(input, { + CronExpression: [], + JobNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1405,12 +1435,11 @@ export const de_BatchDeleteRecipeVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_RecipeErrorList(data.Errors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Errors: _json, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1438,10 +1467,9 @@ const de_BatchDeleteRecipeVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1461,9 +1489,10 @@ export const de_CreateDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1494,10 +1523,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1517,9 +1545,10 @@ export const de_CreateProfileJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1553,10 +1582,9 @@ const de_CreateProfileJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1576,9 +1604,10 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1609,10 +1638,9 @@ const de_CreateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1632,9 +1660,10 @@ export const de_CreateRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1662,10 +1691,9 @@ const de_CreateRecipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1685,9 +1713,10 @@ export const de_CreateRecipeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1721,10 +1750,9 @@ const de_CreateRecipeJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1744,9 +1772,10 @@ export const de_CreateRulesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1774,10 +1803,9 @@ const de_CreateRulesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1797,9 +1825,10 @@ export const de_CreateScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1827,10 +1856,9 @@ const de_CreateScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1850,9 +1878,10 @@ export const de_DeleteDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1880,10 +1909,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1903,9 +1931,10 @@ export const de_DeleteJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1933,10 +1962,9 @@ const de_DeleteJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1956,9 +1984,10 @@ export const de_DeleteProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1986,10 +2015,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2009,12 +2037,11 @@ export const de_DeleteRecipeVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RecipeVersion != null) { - contents.RecipeVersion = __expectString(data.RecipeVersion); - } + const doc = take(data, { + Name: __expectString, + RecipeVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2042,10 +2069,9 @@ const de_DeleteRecipeVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2065,9 +2091,10 @@ export const de_DeleteRulesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2095,10 +2122,9 @@ const de_DeleteRulesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2118,9 +2144,10 @@ export const de_DeleteScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2145,10 +2172,9 @@ const de_DeleteScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2168,42 +2194,21 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateDate != null) { - contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.Format != null) { - contents.Format = __expectString(data.Format); - } - if (data.FormatOptions != null) { - contents.FormatOptions = de_FormatOptions(data.FormatOptions, context); - } - if (data.Input != null) { - contents.Input = de_Input(data.Input, context); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PathOptions != null) { - contents.PathOptions = de_PathOptions(data.PathOptions, context); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.Source != null) { - contents.Source = __expectString(data.Source); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + Format: __expectString, + FormatOptions: _json, + Input: _json, + LastModifiedBy: __expectString, + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PathOptions: _json, + ResourceArn: __expectString, + Source: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2228,10 +2233,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2251,78 +2255,33 @@ export const de_DescribeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateDate != null) { - contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.DataCatalogOutputs != null) { - contents.DataCatalogOutputs = de_DataCatalogOutputList(data.DataCatalogOutputs, context); - } - if (data.DatabaseOutputs != null) { - contents.DatabaseOutputs = de_DatabaseOutputList(data.DatabaseOutputs, context); - } - if (data.DatasetName != null) { - contents.DatasetName = __expectString(data.DatasetName); - } - if (data.EncryptionKeyArn != null) { - contents.EncryptionKeyArn = __expectString(data.EncryptionKeyArn); - } - if (data.EncryptionMode != null) { - contents.EncryptionMode = __expectString(data.EncryptionMode); - } - if (data.JobSample != null) { - contents.JobSample = de_JobSample(data.JobSample, context); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.LogSubscription != null) { - contents.LogSubscription = __expectString(data.LogSubscription); - } - if (data.MaxCapacity != null) { - contents.MaxCapacity = __expectInt32(data.MaxCapacity); - } - if (data.MaxRetries != null) { - contents.MaxRetries = __expectInt32(data.MaxRetries); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Outputs != null) { - contents.Outputs = de_OutputList(data.Outputs, context); - } - if (data.ProfileConfiguration != null) { - contents.ProfileConfiguration = de_ProfileConfiguration(data.ProfileConfiguration, context); - } - if (data.ProjectName != null) { - contents.ProjectName = __expectString(data.ProjectName); - } - if (data.RecipeReference != null) { - contents.RecipeReference = de_RecipeReference(data.RecipeReference, context); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.Timeout != null) { - contents.Timeout = __expectInt32(data.Timeout); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.ValidationConfigurations != null) { - contents.ValidationConfigurations = de_ValidationConfigurationList(data.ValidationConfigurations, context); - } + const doc = take(data, { + CreateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + DataCatalogOutputs: _json, + DatabaseOutputs: _json, + DatasetName: __expectString, + EncryptionKeyArn: __expectString, + EncryptionMode: __expectString, + JobSample: _json, + LastModifiedBy: __expectString, + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogSubscription: __expectString, + MaxCapacity: __expectInt32, + MaxRetries: __expectInt32, + Name: __expectString, + Outputs: _json, + ProfileConfiguration: _json, + ProjectName: __expectString, + RecipeReference: _json, + ResourceArn: __expectString, + RoleArn: __expectString, + Tags: _json, + Timeout: __expectInt32, + Type: __expectString, + ValidationConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2347,10 +2306,9 @@ const de_DescribeJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2370,63 +2328,28 @@ export const de_DescribeJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attempt != null) { - contents.Attempt = __expectInt32(data.Attempt); - } - if (data.CompletedOn != null) { - contents.CompletedOn = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletedOn))); - } - if (data.DataCatalogOutputs != null) { - contents.DataCatalogOutputs = de_DataCatalogOutputList(data.DataCatalogOutputs, context); - } - if (data.DatabaseOutputs != null) { - contents.DatabaseOutputs = de_DatabaseOutputList(data.DatabaseOutputs, context); - } - if (data.DatasetName != null) { - contents.DatasetName = __expectString(data.DatasetName); - } - if (data.ErrorMessage != null) { - contents.ErrorMessage = __expectString(data.ErrorMessage); - } - if (data.ExecutionTime != null) { - contents.ExecutionTime = __expectInt32(data.ExecutionTime); - } - if (data.JobName != null) { - contents.JobName = __expectString(data.JobName); - } - if (data.JobSample != null) { - contents.JobSample = de_JobSample(data.JobSample, context); - } - if (data.LogGroupName != null) { - contents.LogGroupName = __expectString(data.LogGroupName); - } - if (data.LogSubscription != null) { - contents.LogSubscription = __expectString(data.LogSubscription); - } - if (data.Outputs != null) { - contents.Outputs = de_OutputList(data.Outputs, context); - } - if (data.ProfileConfiguration != null) { - contents.ProfileConfiguration = de_ProfileConfiguration(data.ProfileConfiguration, context); - } - if (data.RecipeReference != null) { - contents.RecipeReference = de_RecipeReference(data.RecipeReference, context); - } - if (data.RunId != null) { - contents.RunId = __expectString(data.RunId); - } - if (data.StartedBy != null) { - contents.StartedBy = __expectString(data.StartedBy); - } - if (data.StartedOn != null) { - contents.StartedOn = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartedOn))); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.ValidationConfigurations != null) { - contents.ValidationConfigurations = de_ValidationConfigurationList(data.ValidationConfigurations, context); - } + const doc = take(data, { + Attempt: __expectInt32, + CompletedOn: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataCatalogOutputs: _json, + DatabaseOutputs: _json, + DatasetName: __expectString, + ErrorMessage: __expectString, + ExecutionTime: __expectInt32, + JobName: __expectString, + JobSample: _json, + LogGroupName: __expectString, + LogSubscription: __expectString, + Outputs: _json, + ProfileConfiguration: _json, + RecipeReference: _json, + RunId: __expectString, + StartedBy: __expectString, + StartedOn: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + ValidationConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2451,10 +2374,9 @@ const de_DescribeJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2474,48 +2396,23 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateDate != null) { - contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.DatasetName != null) { - contents.DatasetName = __expectString(data.DatasetName); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OpenDate != null) { - contents.OpenDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.OpenDate))); - } - if (data.OpenedBy != null) { - contents.OpenedBy = __expectString(data.OpenedBy); - } - if (data.RecipeName != null) { - contents.RecipeName = __expectString(data.RecipeName); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } - if (data.Sample != null) { - contents.Sample = de_Sample(data.Sample, context); - } - if (data.SessionStatus != null) { - contents.SessionStatus = __expectString(data.SessionStatus); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + DatasetName: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OpenDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OpenedBy: __expectString, + RecipeName: __expectString, + ResourceArn: __expectString, + RoleArn: __expectString, + Sample: _json, + SessionStatus: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2540,10 +2437,9 @@ const de_DescribeProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2563,45 +2459,22 @@ export const de_DescribeRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateDate != null) { - contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ProjectName != null) { - contents.ProjectName = __expectString(data.ProjectName); - } - if (data.PublishedBy != null) { - contents.PublishedBy = __expectString(data.PublishedBy); - } - if (data.PublishedDate != null) { - contents.PublishedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.PublishedDate))); - } - if (data.RecipeVersion != null) { - contents.RecipeVersion = __expectString(data.RecipeVersion); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.Steps != null) { - contents.Steps = de_RecipeStepList(data.Steps, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + Description: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ProjectName: __expectString, + PublishedBy: __expectString, + PublishedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RecipeVersion: __expectString, + ResourceArn: __expectString, + Steps: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2626,10 +2499,9 @@ const de_DescribeRecipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2649,36 +2521,19 @@ export const de_DescribeRulesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateDate != null) { - contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.Rules != null) { - contents.Rules = de_RuleList(data.Rules, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.TargetArn != null) { - contents.TargetArn = __expectString(data.TargetArn); - } + const doc = take(data, { + CreateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + Description: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceArn: __expectString, + Rules: (_) => de_RuleList(_, context), + Tags: _json, + TargetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2703,10 +2558,9 @@ const de_DescribeRulesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2726,33 +2580,18 @@ export const de_DescribeScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateDate != null) { - contents.CreateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreateDate))); - } - if (data.CreatedBy != null) { - contents.CreatedBy = __expectString(data.CreatedBy); - } - if (data.CronExpression != null) { - contents.CronExpression = __expectString(data.CronExpression); - } - if (data.JobNames != null) { - contents.JobNames = de_JobNameList(data.JobNames, context); - } - if (data.LastModifiedBy != null) { - contents.LastModifiedBy = __expectString(data.LastModifiedBy); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + CronExpression: __expectString, + JobNames: _json, + LastModifiedBy: __expectString, + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2777,10 +2616,9 @@ const de_DescribeScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2800,12 +2638,11 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Datasets != null) { - contents.Datasets = de_DatasetList(data.Datasets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Datasets: (_) => de_DatasetList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2827,10 +2664,9 @@ const de_ListDatasetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2850,12 +2686,11 @@ export const de_ListJobRunsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JobRuns != null) { - contents.JobRuns = de_JobRunList(data.JobRuns, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + JobRuns: (_) => de_JobRunList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2880,10 +2715,9 @@ const de_ListJobRunsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2903,12 +2737,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Jobs != null) { - contents.Jobs = de_JobList(data.Jobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Jobs: (_) => de_JobList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2930,10 +2763,9 @@ const de_ListJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2953,12 +2785,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Projects != null) { - contents.Projects = de_ProjectList(data.Projects, context); - } + const doc = take(data, { + NextToken: __expectString, + Projects: (_) => de_ProjectList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2980,10 +2811,9 @@ const de_ListProjectsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3003,12 +2833,11 @@ export const de_ListRecipesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Recipes != null) { - contents.Recipes = de_RecipeList(data.Recipes, context); - } + const doc = take(data, { + NextToken: __expectString, + Recipes: (_) => de_RecipeList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3030,10 +2859,9 @@ const de_ListRecipesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3053,12 +2881,11 @@ export const de_ListRecipeVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Recipes != null) { - contents.Recipes = de_RecipeList(data.Recipes, context); - } + const doc = take(data, { + NextToken: __expectString, + Recipes: (_) => de_RecipeList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3080,10 +2907,9 @@ const de_ListRecipeVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3103,12 +2929,11 @@ export const de_ListRulesetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Rulesets != null) { - contents.Rulesets = de_RulesetItemList(data.Rulesets, context); - } + const doc = take(data, { + NextToken: __expectString, + Rulesets: (_) => de_RulesetItemList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3133,10 +2958,9 @@ const de_ListRulesetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3156,12 +2980,11 @@ export const de_ListSchedulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Schedules != null) { - contents.Schedules = de_ScheduleList(data.Schedules, context); - } + const doc = take(data, { + NextToken: __expectString, + Schedules: (_) => de_ScheduleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3183,10 +3006,9 @@ const de_ListSchedulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3206,9 +3028,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3236,10 +3059,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3259,9 +3081,10 @@ export const de_PublishRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3289,10 +3112,9 @@ const de_PublishRecipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3312,15 +3134,12 @@ export const de_SendProjectSessionActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ActionId != null) { - contents.ActionId = __expectInt32(data.ActionId); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Result != null) { - contents.Result = __expectString(data.Result); - } + const doc = take(data, { + ActionId: __expectInt32, + Name: __expectString, + Result: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3348,10 +3167,9 @@ const de_SendProjectSessionActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3371,9 +3189,10 @@ export const de_StartJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RunId != null) { - contents.RunId = __expectString(data.RunId); - } + const doc = take(data, { + RunId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3404,10 +3223,9 @@ const de_StartJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3427,12 +3245,11 @@ export const de_StartProjectSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ClientSessionId != null) { - contents.ClientSessionId = __expectString(data.ClientSessionId); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + ClientSessionId: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3463,10 +3280,9 @@ const de_StartProjectSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3486,9 +3302,10 @@ export const de_StopJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RunId != null) { - contents.RunId = __expectString(data.RunId); - } + const doc = take(data, { + RunId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3513,10 +3330,9 @@ const de_StopJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3563,10 +3379,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3613,10 +3428,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3636,9 +3450,10 @@ export const de_UpdateDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3666,10 +3481,9 @@ const de_UpdateDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3689,9 +3503,10 @@ export const de_UpdateProfileJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3719,10 +3534,9 @@ const de_UpdateProfileJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3742,12 +3556,11 @@ export const de_UpdateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + LastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3772,10 +3585,9 @@ const de_UpdateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3795,9 +3607,10 @@ export const de_UpdateRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3822,10 +3635,9 @@ const de_UpdateRecipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3845,9 +3657,10 @@ export const de_UpdateRecipeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3875,10 +3688,9 @@ const de_UpdateRecipeJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3898,9 +3710,10 @@ export const de_UpdateRulesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3925,10 +3738,9 @@ const de_UpdateRulesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,9 +3760,10 @@ export const de_UpdateScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3978,16 +3791,15 @@ const de_UpdateScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3997,9 +3809,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4013,9 +3826,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4032,9 +3846,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4051,9 +3866,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4070,9 +3886,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4086,9 +3903,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4096,954 +3914,213 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AllowedStatisticList - */ -const se_AllowedStatisticList = (input: AllowedStatistics[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AllowedStatistics(entry, context); - }); -}; +// se_AllowedStatisticList omitted. -/** - * serializeAws_restJson1AllowedStatistics - */ -const se_AllowedStatistics = (input: AllowedStatistics, context: __SerdeContext): any => { - return { - ...(input.Statistics != null && { Statistics: se_StatisticList(input.Statistics, context) }), - }; -}; +// se_AllowedStatistics omitted. -/** - * serializeAws_restJson1ColumnNameList - */ -const se_ColumnNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ColumnNameList omitted. -/** - * serializeAws_restJson1ColumnSelector - */ -const se_ColumnSelector = (input: ColumnSelector, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Regex != null && { Regex: input.Regex }), - }; -}; +// se_ColumnSelector omitted. -/** - * serializeAws_restJson1ColumnSelectorList - */ -const se_ColumnSelectorList = (input: ColumnSelector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnSelector(entry, context); - }); -}; +// se_ColumnSelectorList omitted. -/** - * serializeAws_restJson1ColumnStatisticsConfiguration - */ -const se_ColumnStatisticsConfiguration = (input: ColumnStatisticsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Selectors != null && { Selectors: se_ColumnSelectorList(input.Selectors, context) }), - ...(input.Statistics != null && { Statistics: se_StatisticsConfiguration(input.Statistics, context) }), - }; -}; +// se_ColumnStatisticsConfiguration omitted. -/** - * serializeAws_restJson1ColumnStatisticsConfigurationList - */ -const se_ColumnStatisticsConfigurationList = (input: ColumnStatisticsConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnStatisticsConfiguration(entry, context); - }); -}; +// se_ColumnStatisticsConfigurationList omitted. -/** - * serializeAws_restJson1ConditionExpression - */ -const se_ConditionExpression = (input: ConditionExpression, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.TargetColumn != null && { TargetColumn: input.TargetColumn }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConditionExpression omitted. -/** - * serializeAws_restJson1ConditionExpressionList - */ -const se_ConditionExpressionList = (input: ConditionExpression[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConditionExpression(entry, context); - }); -}; +// se_ConditionExpressionList omitted. -/** - * serializeAws_restJson1CsvOptions - */ -const se_CsvOptions = (input: CsvOptions, context: __SerdeContext): any => { - return { - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.HeaderRow != null && { HeaderRow: input.HeaderRow }), - }; -}; +// se_CsvOptions omitted. -/** - * serializeAws_restJson1CsvOutputOptions - */ -const se_CsvOutputOptions = (input: CsvOutputOptions, context: __SerdeContext): any => { - return { - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - }; -}; +// se_CsvOutputOptions omitted. -/** - * serializeAws_restJson1DatabaseInputDefinition - */ -const se_DatabaseInputDefinition = (input: DatabaseInputDefinition, context: __SerdeContext): any => { - return { - ...(input.DatabaseTableName != null && { DatabaseTableName: input.DatabaseTableName }), - ...(input.GlueConnectionName != null && { GlueConnectionName: input.GlueConnectionName }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.TempDirectory != null && { TempDirectory: se_S3Location(input.TempDirectory, context) }), - }; -}; +// se_DatabaseInputDefinition omitted. -/** - * serializeAws_restJson1DatabaseOutput - */ -const se_DatabaseOutput = (input: DatabaseOutput, context: __SerdeContext): any => { - return { - ...(input.DatabaseOptions != null && { - DatabaseOptions: se_DatabaseTableOutputOptions(input.DatabaseOptions, context), - }), - ...(input.DatabaseOutputMode != null && { DatabaseOutputMode: input.DatabaseOutputMode }), - ...(input.GlueConnectionName != null && { GlueConnectionName: input.GlueConnectionName }), - }; -}; +// se_DatabaseOutput omitted. -/** - * serializeAws_restJson1DatabaseOutputList - */ -const se_DatabaseOutputList = (input: DatabaseOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DatabaseOutput(entry, context); - }); -}; +// se_DatabaseOutputList omitted. -/** - * serializeAws_restJson1DatabaseTableOutputOptions - */ -const se_DatabaseTableOutputOptions = (input: DatabaseTableOutputOptions, context: __SerdeContext): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TempDirectory != null && { TempDirectory: se_S3Location(input.TempDirectory, context) }), - }; -}; +// se_DatabaseTableOutputOptions omitted. -/** - * serializeAws_restJson1DataCatalogInputDefinition - */ -const se_DataCatalogInputDefinition = (input: DataCatalogInputDefinition, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TempDirectory != null && { TempDirectory: se_S3Location(input.TempDirectory, context) }), - }; -}; +// se_DataCatalogInputDefinition omitted. -/** - * serializeAws_restJson1DataCatalogOutput - */ -const se_DataCatalogOutput = (input: DataCatalogOutput, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DatabaseOptions != null && { - DatabaseOptions: se_DatabaseTableOutputOptions(input.DatabaseOptions, context), - }), - ...(input.Overwrite != null && { Overwrite: input.Overwrite }), - ...(input.S3Options != null && { S3Options: se_S3TableOutputOptions(input.S3Options, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DataCatalogOutput omitted. -/** - * serializeAws_restJson1DataCatalogOutputList - */ -const se_DataCatalogOutputList = (input: DataCatalogOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataCatalogOutput(entry, context); - }); -}; +// se_DataCatalogOutputList omitted. -/** - * serializeAws_restJson1DatasetParameter - */ -const se_DatasetParameter = (input: DatasetParameter, context: __SerdeContext): any => { - return { - ...(input.CreateColumn != null && { CreateColumn: input.CreateColumn }), - ...(input.DatetimeOptions != null && { DatetimeOptions: se_DatetimeOptions(input.DatetimeOptions, context) }), - ...(input.Filter != null && { Filter: se_FilterExpression(input.Filter, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DatasetParameter omitted. -/** - * serializeAws_restJson1DatetimeOptions - */ -const se_DatetimeOptions = (input: DatetimeOptions, context: __SerdeContext): any => { - return { - ...(input.Format != null && { Format: input.Format }), - ...(input.LocaleCode != null && { LocaleCode: input.LocaleCode }), - ...(input.TimezoneOffset != null && { TimezoneOffset: input.TimezoneOffset }), - }; -}; +// se_DatetimeOptions omitted. -/** - * serializeAws_restJson1EntityDetectorConfiguration - */ -const se_EntityDetectorConfiguration = (input: EntityDetectorConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowedStatistics != null && { - AllowedStatistics: se_AllowedStatisticList(input.AllowedStatistics, context), - }), - ...(input.EntityTypes != null && { EntityTypes: se_EntityTypeList(input.EntityTypes, context) }), - }; -}; +// se_EntityDetectorConfiguration omitted. -/** - * serializeAws_restJson1EntityTypeList - */ -const se_EntityTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EntityTypeList omitted. -/** - * serializeAws_restJson1ExcelOptions - */ -const se_ExcelOptions = (input: ExcelOptions, context: __SerdeContext): any => { - return { - ...(input.HeaderRow != null && { HeaderRow: input.HeaderRow }), - ...(input.SheetIndexes != null && { SheetIndexes: se_SheetIndexList(input.SheetIndexes, context) }), - ...(input.SheetNames != null && { SheetNames: se_SheetNameList(input.SheetNames, context) }), - }; -}; +// se_ExcelOptions omitted. -/** - * serializeAws_restJson1FilesLimit - */ -const se_FilesLimit = (input: FilesLimit, context: __SerdeContext): any => { - return { - ...(input.MaxFiles != null && { MaxFiles: input.MaxFiles }), - ...(input.Order != null && { Order: input.Order }), - ...(input.OrderedBy != null && { OrderedBy: input.OrderedBy }), - }; -}; +// se_FilesLimit omitted. -/** - * serializeAws_restJson1FilterExpression - */ -const se_FilterExpression = (input: FilterExpression, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.ValuesMap != null && { ValuesMap: se_ValuesMap(input.ValuesMap, context) }), - }; -}; +// se_FilterExpression omitted. -/** - * serializeAws_restJson1FormatOptions - */ -const se_FormatOptions = (input: FormatOptions, context: __SerdeContext): any => { - return { - ...(input.Csv != null && { Csv: se_CsvOptions(input.Csv, context) }), - ...(input.Excel != null && { Excel: se_ExcelOptions(input.Excel, context) }), - ...(input.Json != null && { Json: se_JsonOptions(input.Json, context) }), - }; -}; +// se_FormatOptions omitted. -/** - * serializeAws_restJson1HiddenColumnList - */ -const se_HiddenColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HiddenColumnList omitted. -/** - * serializeAws_restJson1Input - */ -const se_Input = (input: Input, context: __SerdeContext): any => { - return { - ...(input.DataCatalogInputDefinition != null && { - DataCatalogInputDefinition: se_DataCatalogInputDefinition(input.DataCatalogInputDefinition, context), - }), - ...(input.DatabaseInputDefinition != null && { - DatabaseInputDefinition: se_DatabaseInputDefinition(input.DatabaseInputDefinition, context), - }), - ...(input.Metadata != null && { Metadata: se_Metadata(input.Metadata, context) }), - ...(input.S3InputDefinition != null && { S3InputDefinition: se_S3Location(input.S3InputDefinition, context) }), - }; -}; +// se_Input omitted. -/** - * serializeAws_restJson1JobNameList - */ -const se_JobNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_JobNameList omitted. -/** - * serializeAws_restJson1JobSample - */ -const se_JobSample = (input: JobSample, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Size != null && { Size: input.Size }), - }; -}; +// se_JobSample omitted. -/** - * serializeAws_restJson1JsonOptions - */ -const se_JsonOptions = (input: JsonOptions, context: __SerdeContext): any => { - return { - ...(input.MultiLine != null && { MultiLine: input.MultiLine }), - }; -}; +// se_JsonOptions omitted. -/** - * serializeAws_restJson1Metadata - */ -const se_Metadata = (input: Metadata, context: __SerdeContext): any => { - return { - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - }; -}; +// se_Metadata omitted. -/** - * serializeAws_restJson1Output - */ -const se_Output = (input: Output, context: __SerdeContext): any => { - return { - ...(input.CompressionFormat != null && { CompressionFormat: input.CompressionFormat }), - ...(input.Format != null && { Format: input.Format }), - ...(input.FormatOptions != null && { FormatOptions: se_OutputFormatOptions(input.FormatOptions, context) }), - ...(input.Location != null && { Location: se_S3Location(input.Location, context) }), - ...(input.MaxOutputFiles != null && { MaxOutputFiles: input.MaxOutputFiles }), - ...(input.Overwrite != null && { Overwrite: input.Overwrite }), - ...(input.PartitionColumns != null && { PartitionColumns: se_ColumnNameList(input.PartitionColumns, context) }), - }; -}; +// se_Output omitted. -/** - * serializeAws_restJson1OutputFormatOptions - */ -const se_OutputFormatOptions = (input: OutputFormatOptions, context: __SerdeContext): any => { - return { - ...(input.Csv != null && { Csv: se_CsvOutputOptions(input.Csv, context) }), - }; -}; +// se_OutputFormatOptions omitted. -/** - * serializeAws_restJson1OutputList - */ -const se_OutputList = (input: Output[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Output(entry, context); - }); -}; +// se_OutputList omitted. -/** - * serializeAws_restJson1ParameterMap - */ -const se_ParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ParameterMap omitted. -/** - * serializeAws_restJson1PathOptions - */ -const se_PathOptions = (input: PathOptions, context: __SerdeContext): any => { - return { - ...(input.FilesLimit != null && { FilesLimit: se_FilesLimit(input.FilesLimit, context) }), - ...(input.LastModifiedDateCondition != null && { - LastModifiedDateCondition: se_FilterExpression(input.LastModifiedDateCondition, context), - }), - ...(input.Parameters != null && { Parameters: se_PathParametersMap(input.Parameters, context) }), - }; -}; - -/** - * serializeAws_restJson1PathParametersMap - */ -const se_PathParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_DatasetParameter(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1ProfileConfiguration - */ -const se_ProfileConfiguration = (input: ProfileConfiguration, context: __SerdeContext): any => { - return { - ...(input.ColumnStatisticsConfigurations != null && { - ColumnStatisticsConfigurations: se_ColumnStatisticsConfigurationList( - input.ColumnStatisticsConfigurations, - context - ), - }), - ...(input.DatasetStatisticsConfiguration != null && { - DatasetStatisticsConfiguration: se_StatisticsConfiguration(input.DatasetStatisticsConfiguration, context), - }), - ...(input.EntityDetectorConfiguration != null && { - EntityDetectorConfiguration: se_EntityDetectorConfiguration(input.EntityDetectorConfiguration, context), - }), - ...(input.ProfileColumns != null && { ProfileColumns: se_ColumnSelectorList(input.ProfileColumns, context) }), - }; -}; - -/** - * serializeAws_restJson1RecipeAction - */ -const se_RecipeAction = (input: RecipeAction, context: __SerdeContext): any => { - return { - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.Parameters != null && { Parameters: se_ParameterMap(input.Parameters, context) }), - }; -}; - -/** - * serializeAws_restJson1RecipeReference - */ -const se_RecipeReference = (input: RecipeReference, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RecipeVersion != null && { RecipeVersion: input.RecipeVersion }), - }; -}; - -/** - * serializeAws_restJson1RecipeStep - */ -const se_RecipeStep = (input: RecipeStep, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_RecipeAction(input.Action, context) }), - ...(input.ConditionExpressions != null && { - ConditionExpressions: se_ConditionExpressionList(input.ConditionExpressions, context), - }), - }; -}; - -/** - * serializeAws_restJson1RecipeStepList - */ -const se_RecipeStepList = (input: RecipeStep[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecipeStep(entry, context); - }); -}; - -/** - * serializeAws_restJson1RecipeVersionList - */ -const se_RecipeVersionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Rule - */ -const se_Rule = (input: Rule, context: __SerdeContext): any => { - return { - ...(input.CheckExpression != null && { CheckExpression: input.CheckExpression }), - ...(input.ColumnSelectors != null && { ColumnSelectors: se_ColumnSelectorList(input.ColumnSelectors, context) }), - ...(input.Disabled != null && { Disabled: input.Disabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SubstitutionMap != null && { SubstitutionMap: se_ValuesMap(input.SubstitutionMap, context) }), - ...(input.Threshold != null && { Threshold: se_Threshold(input.Threshold, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleList - */ -const se_RuleList = (input: Rule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Rule(entry, context); - }); -}; - -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.BucketOwner != null && { BucketOwner: input.BucketOwner }), - ...(input.Key != null && { Key: input.Key }), - }; -}; - -/** - * serializeAws_restJson1S3TableOutputOptions - */ -const se_S3TableOutputOptions = (input: S3TableOutputOptions, context: __SerdeContext): any => { - return { - ...(input.Location != null && { Location: se_S3Location(input.Location, context) }), - }; -}; - -/** - * serializeAws_restJson1Sample - */ -const se_Sample = (input: Sample, context: __SerdeContext): any => { - return { - ...(input.Size != null && { Size: input.Size }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1SheetIndexList - */ -const se_SheetIndexList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SheetNameList - */ -const se_SheetNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StatisticList - */ -const se_StatisticList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StatisticOverride - */ -const se_StatisticOverride = (input: StatisticOverride, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_ParameterMap(input.Parameters, context) }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - }; -}; - -/** - * serializeAws_restJson1StatisticOverrideList - */ -const se_StatisticOverrideList = (input: StatisticOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatisticOverride(entry, context); - }); -}; - -/** - * serializeAws_restJson1StatisticsConfiguration - */ -const se_StatisticsConfiguration = (input: StatisticsConfiguration, context: __SerdeContext): any => { - return { - ...(input.IncludedStatistics != null && { - IncludedStatistics: se_StatisticList(input.IncludedStatistics, context), - }), - ...(input.Overrides != null && { Overrides: se_StatisticOverrideList(input.Overrides, context) }), - }; -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Threshold - */ -const se_Threshold = (input: Threshold, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1ValidationConfiguration - */ -const se_ValidationConfiguration = (input: ValidationConfiguration, context: __SerdeContext): any => { - return { - ...(input.RulesetArn != null && { RulesetArn: input.RulesetArn }), - ...(input.ValidationMode != null && { ValidationMode: input.ValidationMode }), - }; -}; - -/** - * serializeAws_restJson1ValidationConfigurationList - */ -const se_ValidationConfigurationList = (input: ValidationConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ValidationConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1ValuesMap - */ -const se_ValuesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1ViewFrame - */ -const se_ViewFrame = (input: ViewFrame, context: __SerdeContext): any => { - return { - ...(input.Analytics != null && { Analytics: input.Analytics }), - ...(input.ColumnRange != null && { ColumnRange: input.ColumnRange }), - ...(input.HiddenColumns != null && { HiddenColumns: se_HiddenColumnList(input.HiddenColumns, context) }), - ...(input.RowRange != null && { RowRange: input.RowRange }), - ...(input.StartColumnIndex != null && { StartColumnIndex: input.StartColumnIndex }), - ...(input.StartRowIndex != null && { StartRowIndex: input.StartRowIndex }), - }; -}; - -/** - * deserializeAws_restJson1AllowedStatisticList - */ -const de_AllowedStatisticList = (output: any, context: __SerdeContext): AllowedStatistics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AllowedStatistics(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AllowedStatistics - */ -const de_AllowedStatistics = (output: any, context: __SerdeContext): AllowedStatistics => { - return { - Statistics: output.Statistics != null ? de_StatisticList(output.Statistics, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColumnNameList - */ -const de_ColumnNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnSelector - */ -const de_ColumnSelector = (output: any, context: __SerdeContext): ColumnSelector => { - return { - Name: __expectString(output.Name), - Regex: __expectString(output.Regex), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnSelectorList - */ -const de_ColumnSelectorList = (output: any, context: __SerdeContext): ColumnSelector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnSelector(entry, context); - }); - return retVal; -}; +// se_PathOptions omitted. -/** - * deserializeAws_restJson1ColumnStatisticsConfiguration - */ -const de_ColumnStatisticsConfiguration = (output: any, context: __SerdeContext): ColumnStatisticsConfiguration => { - return { - Selectors: output.Selectors != null ? de_ColumnSelectorList(output.Selectors, context) : undefined, - Statistics: output.Statistics != null ? de_StatisticsConfiguration(output.Statistics, context) : undefined, - } as any; -}; +// se_PathParametersMap omitted. -/** - * deserializeAws_restJson1ColumnStatisticsConfigurationList - */ -const de_ColumnStatisticsConfigurationList = ( - output: any, - context: __SerdeContext -): ColumnStatisticsConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnStatisticsConfiguration(entry, context); - }); - return retVal; -}; +// se_ProfileConfiguration omitted. -/** - * deserializeAws_restJson1ConditionExpression - */ -const de_ConditionExpression = (output: any, context: __SerdeContext): ConditionExpression => { - return { - Condition: __expectString(output.Condition), - TargetColumn: __expectString(output.TargetColumn), - Value: __expectString(output.Value), - } as any; -}; +// se_RecipeAction omitted. -/** - * deserializeAws_restJson1ConditionExpressionList - */ -const de_ConditionExpressionList = (output: any, context: __SerdeContext): ConditionExpression[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConditionExpression(entry, context); - }); - return retVal; -}; +// se_RecipeReference omitted. -/** - * deserializeAws_restJson1CsvOptions - */ -const de_CsvOptions = (output: any, context: __SerdeContext): CsvOptions => { - return { - Delimiter: __expectString(output.Delimiter), - HeaderRow: __expectBoolean(output.HeaderRow), - } as any; -}; +// se_RecipeStep omitted. -/** - * deserializeAws_restJson1CsvOutputOptions - */ -const de_CsvOutputOptions = (output: any, context: __SerdeContext): CsvOutputOptions => { - return { - Delimiter: __expectString(output.Delimiter), - } as any; -}; +// se_RecipeStepList omitted. -/** - * deserializeAws_restJson1DatabaseInputDefinition - */ -const de_DatabaseInputDefinition = (output: any, context: __SerdeContext): DatabaseInputDefinition => { - return { - DatabaseTableName: __expectString(output.DatabaseTableName), - GlueConnectionName: __expectString(output.GlueConnectionName), - QueryString: __expectString(output.QueryString), - TempDirectory: output.TempDirectory != null ? de_S3Location(output.TempDirectory, context) : undefined, - } as any; -}; +// se_RecipeVersionList omitted. /** - * deserializeAws_restJson1DatabaseOutput + * serializeAws_restJson1Rule */ -const de_DatabaseOutput = (output: any, context: __SerdeContext): DatabaseOutput => { - return { - DatabaseOptions: - output.DatabaseOptions != null ? de_DatabaseTableOutputOptions(output.DatabaseOptions, context) : undefined, - DatabaseOutputMode: __expectString(output.DatabaseOutputMode), - GlueConnectionName: __expectString(output.GlueConnectionName), - } as any; +const se_Rule = (input: Rule, context: __SerdeContext): any => { + return take(input, { + CheckExpression: [], + ColumnSelectors: _json, + Disabled: [], + Name: [], + SubstitutionMap: _json, + Threshold: (_) => se_Threshold(_, context), + }); }; /** - * deserializeAws_restJson1DatabaseOutputList + * serializeAws_restJson1RuleList */ -const de_DatabaseOutputList = (output: any, context: __SerdeContext): DatabaseOutput[] => { - const retVal = (output || []) +const se_RuleList = (input: Rule[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatabaseOutput(entry, context); + .map((entry) => { + return se_Rule(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1DatabaseTableOutputOptions - */ -const de_DatabaseTableOutputOptions = (output: any, context: __SerdeContext): DatabaseTableOutputOptions => { - return { - TableName: __expectString(output.TableName), - TempDirectory: output.TempDirectory != null ? de_S3Location(output.TempDirectory, context) : undefined, - } as any; -}; +// se_S3Location omitted. -/** - * deserializeAws_restJson1DataCatalogInputDefinition - */ -const de_DataCatalogInputDefinition = (output: any, context: __SerdeContext): DataCatalogInputDefinition => { - return { - CatalogId: __expectString(output.CatalogId), - DatabaseName: __expectString(output.DatabaseName), - TableName: __expectString(output.TableName), - TempDirectory: output.TempDirectory != null ? de_S3Location(output.TempDirectory, context) : undefined, - } as any; -}; +// se_S3TableOutputOptions omitted. -/** - * deserializeAws_restJson1DataCatalogOutput - */ -const de_DataCatalogOutput = (output: any, context: __SerdeContext): DataCatalogOutput => { - return { - CatalogId: __expectString(output.CatalogId), - DatabaseName: __expectString(output.DatabaseName), - DatabaseOptions: - output.DatabaseOptions != null ? de_DatabaseTableOutputOptions(output.DatabaseOptions, context) : undefined, - Overwrite: __expectBoolean(output.Overwrite), - S3Options: output.S3Options != null ? de_S3TableOutputOptions(output.S3Options, context) : undefined, - TableName: __expectString(output.TableName), - } as any; -}; +// se_Sample omitted. + +// se_SheetIndexList omitted. + +// se_SheetNameList omitted. + +// se_StatisticList omitted. + +// se_StatisticOverride omitted. + +// se_StatisticOverrideList omitted. + +// se_StatisticsConfiguration omitted. + +// se_TagMap omitted. /** - * deserializeAws_restJson1DataCatalogOutputList + * serializeAws_restJson1Threshold */ -const de_DataCatalogOutputList = (output: any, context: __SerdeContext): DataCatalogOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataCatalogOutput(entry, context); - }); - return retVal; +const se_Threshold = (input: Threshold, context: __SerdeContext): any => { + return take(input, { + Type: [], + Unit: [], + Value: __serializeFloat, + }); }; +// se_ValidationConfiguration omitted. + +// se_ValidationConfigurationList omitted. + +// se_ValuesMap omitted. + +// se_ViewFrame omitted. + +// de_AllowedStatisticList omitted. + +// de_AllowedStatistics omitted. + +// de_ColumnNameList omitted. + +// de_ColumnSelector omitted. + +// de_ColumnSelectorList omitted. + +// de_ColumnStatisticsConfiguration omitted. + +// de_ColumnStatisticsConfigurationList omitted. + +// de_ConditionExpression omitted. + +// de_ConditionExpressionList omitted. + +// de_CsvOptions omitted. + +// de_CsvOutputOptions omitted. + +// de_DatabaseInputDefinition omitted. + +// de_DatabaseOutput omitted. + +// de_DatabaseOutputList omitted. + +// de_DatabaseTableOutputOptions omitted. + +// de_DataCatalogInputDefinition omitted. + +// de_DataCatalogOutput omitted. + +// de_DataCatalogOutputList omitted. + /** * deserializeAws_restJson1Dataset */ const de_Dataset = (output: any, context: __SerdeContext): Dataset => { - return { - AccountId: __expectString(output.AccountId), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - Format: __expectString(output.Format), - FormatOptions: output.FormatOptions != null ? de_FormatOptions(output.FormatOptions, context) : undefined, - Input: output.Input != null ? de_Input(output.Input, context) : undefined, - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - PathOptions: output.PathOptions != null ? de_PathOptions(output.PathOptions, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - Source: __expectString(output.Source), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + AccountId: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + Format: __expectString, + FormatOptions: _json, + Input: _json, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PathOptions: _json, + ResourceArn: __expectString, + Source: __expectString, + Tags: _json, + }) as any; }; /** @@ -5053,164 +4130,59 @@ const de_DatasetList = (output: any, context: __SerdeContext): Dataset[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Dataset(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DatasetParameter - */ -const de_DatasetParameter = (output: any, context: __SerdeContext): DatasetParameter => { - return { - CreateColumn: __expectBoolean(output.CreateColumn), - DatetimeOptions: output.DatetimeOptions != null ? de_DatetimeOptions(output.DatetimeOptions, context) : undefined, - Filter: output.Filter != null ? de_FilterExpression(output.Filter, context) : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_DatasetParameter omitted. -/** - * deserializeAws_restJson1DatetimeOptions - */ -const de_DatetimeOptions = (output: any, context: __SerdeContext): DatetimeOptions => { - return { - Format: __expectString(output.Format), - LocaleCode: __expectString(output.LocaleCode), - TimezoneOffset: __expectString(output.TimezoneOffset), - } as any; -}; +// de_DatetimeOptions omitted. -/** - * deserializeAws_restJson1EntityDetectorConfiguration - */ -const de_EntityDetectorConfiguration = (output: any, context: __SerdeContext): EntityDetectorConfiguration => { - return { - AllowedStatistics: - output.AllowedStatistics != null ? de_AllowedStatisticList(output.AllowedStatistics, context) : undefined, - EntityTypes: output.EntityTypes != null ? de_EntityTypeList(output.EntityTypes, context) : undefined, - } as any; -}; +// de_EntityDetectorConfiguration omitted. -/** - * deserializeAws_restJson1EntityTypeList - */ -const de_EntityTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EntityTypeList omitted. -/** - * deserializeAws_restJson1ExcelOptions - */ -const de_ExcelOptions = (output: any, context: __SerdeContext): ExcelOptions => { - return { - HeaderRow: __expectBoolean(output.HeaderRow), - SheetIndexes: output.SheetIndexes != null ? de_SheetIndexList(output.SheetIndexes, context) : undefined, - SheetNames: output.SheetNames != null ? de_SheetNameList(output.SheetNames, context) : undefined, - } as any; -}; +// de_ExcelOptions omitted. -/** - * deserializeAws_restJson1FilesLimit - */ -const de_FilesLimit = (output: any, context: __SerdeContext): FilesLimit => { - return { - MaxFiles: __expectInt32(output.MaxFiles), - Order: __expectString(output.Order), - OrderedBy: __expectString(output.OrderedBy), - } as any; -}; +// de_FilesLimit omitted. -/** - * deserializeAws_restJson1FilterExpression - */ -const de_FilterExpression = (output: any, context: __SerdeContext): FilterExpression => { - return { - Expression: __expectString(output.Expression), - ValuesMap: output.ValuesMap != null ? de_ValuesMap(output.ValuesMap, context) : undefined, - } as any; -}; +// de_FilterExpression omitted. -/** - * deserializeAws_restJson1FormatOptions - */ -const de_FormatOptions = (output: any, context: __SerdeContext): FormatOptions => { - return { - Csv: output.Csv != null ? de_CsvOptions(output.Csv, context) : undefined, - Excel: output.Excel != null ? de_ExcelOptions(output.Excel, context) : undefined, - Json: output.Json != null ? de_JsonOptions(output.Json, context) : undefined, - } as any; -}; +// de_FormatOptions omitted. -/** - * deserializeAws_restJson1Input - */ -const de_Input = (output: any, context: __SerdeContext): Input => { - return { - DataCatalogInputDefinition: - output.DataCatalogInputDefinition != null - ? de_DataCatalogInputDefinition(output.DataCatalogInputDefinition, context) - : undefined, - DatabaseInputDefinition: - output.DatabaseInputDefinition != null - ? de_DatabaseInputDefinition(output.DatabaseInputDefinition, context) - : undefined, - Metadata: output.Metadata != null ? de_Metadata(output.Metadata, context) : undefined, - S3InputDefinition: output.S3InputDefinition != null ? de_S3Location(output.S3InputDefinition, context) : undefined, - } as any; -}; +// de_Input omitted. /** * deserializeAws_restJson1Job */ const de_Job = (output: any, context: __SerdeContext): Job => { - return { - AccountId: __expectString(output.AccountId), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - DataCatalogOutputs: - output.DataCatalogOutputs != null ? de_DataCatalogOutputList(output.DataCatalogOutputs, context) : undefined, - DatabaseOutputs: - output.DatabaseOutputs != null ? de_DatabaseOutputList(output.DatabaseOutputs, context) : undefined, - DatasetName: __expectString(output.DatasetName), - EncryptionKeyArn: __expectString(output.EncryptionKeyArn), - EncryptionMode: __expectString(output.EncryptionMode), - JobSample: output.JobSample != null ? de_JobSample(output.JobSample, context) : undefined, - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - LogSubscription: __expectString(output.LogSubscription), - MaxCapacity: __expectInt32(output.MaxCapacity), - MaxRetries: __expectInt32(output.MaxRetries), - Name: __expectString(output.Name), - Outputs: output.Outputs != null ? de_OutputList(output.Outputs, context) : undefined, - ProjectName: __expectString(output.ProjectName), - RecipeReference: output.RecipeReference != null ? de_RecipeReference(output.RecipeReference, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - RoleArn: __expectString(output.RoleArn), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Timeout: __expectInt32(output.Timeout), - Type: __expectString(output.Type), - ValidationConfigurations: - output.ValidationConfigurations != null - ? de_ValidationConfigurationList(output.ValidationConfigurations, context) - : undefined, - } as any; + return take(output, { + AccountId: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + DataCatalogOutputs: _json, + DatabaseOutputs: _json, + DatasetName: __expectString, + EncryptionKeyArn: __expectString, + EncryptionMode: __expectString, + JobSample: _json, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogSubscription: __expectString, + MaxCapacity: __expectInt32, + MaxRetries: __expectInt32, + Name: __expectString, + Outputs: _json, + ProjectName: __expectString, + RecipeReference: _json, + ResourceArn: __expectString, + RoleArn: __expectString, + Tags: _json, + Timeout: __expectInt32, + Type: __expectString, + ValidationConfigurations: _json, + }) as any; }; /** @@ -5220,62 +4192,37 @@ const de_JobList = (output: any, context: __SerdeContext): Job[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Job(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1JobNameList - */ -const de_JobNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_JobNameList omitted. /** * deserializeAws_restJson1JobRun */ const de_JobRun = (output: any, context: __SerdeContext): JobRun => { - return { - Attempt: __expectInt32(output.Attempt), - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - DataCatalogOutputs: - output.DataCatalogOutputs != null ? de_DataCatalogOutputList(output.DataCatalogOutputs, context) : undefined, - DatabaseOutputs: - output.DatabaseOutputs != null ? de_DatabaseOutputList(output.DatabaseOutputs, context) : undefined, - DatasetName: __expectString(output.DatasetName), - ErrorMessage: __expectString(output.ErrorMessage), - ExecutionTime: __expectInt32(output.ExecutionTime), - JobName: __expectString(output.JobName), - JobSample: output.JobSample != null ? de_JobSample(output.JobSample, context) : undefined, - LogGroupName: __expectString(output.LogGroupName), - LogSubscription: __expectString(output.LogSubscription), - Outputs: output.Outputs != null ? de_OutputList(output.Outputs, context) : undefined, - RecipeReference: output.RecipeReference != null ? de_RecipeReference(output.RecipeReference, context) : undefined, - RunId: __expectString(output.RunId), - StartedBy: __expectString(output.StartedBy), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - State: __expectString(output.State), - ValidationConfigurations: - output.ValidationConfigurations != null - ? de_ValidationConfigurationList(output.ValidationConfigurations, context) - : undefined, - } as any; + return take(output, { + Attempt: __expectInt32, + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataCatalogOutputs: _json, + DatabaseOutputs: _json, + DatasetName: __expectString, + ErrorMessage: __expectString, + ExecutionTime: __expectInt32, + JobName: __expectString, + JobSample: _json, + LogGroupName: __expectString, + LogSubscription: __expectString, + Outputs: _json, + RecipeReference: _json, + RunId: __expectString, + StartedBy: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + ValidationConfigurations: _json, + }) as any; }; /** @@ -5285,167 +4232,51 @@ const de_JobRunList = (output: any, context: __SerdeContext): JobRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobRun(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1JobSample - */ -const de_JobSample = (output: any, context: __SerdeContext): JobSample => { - return { - Mode: __expectString(output.Mode), - Size: __expectLong(output.Size), - } as any; -}; +// de_JobSample omitted. -/** - * deserializeAws_restJson1JsonOptions - */ -const de_JsonOptions = (output: any, context: __SerdeContext): JsonOptions => { - return { - MultiLine: __expectBoolean(output.MultiLine), - } as any; -}; +// de_JsonOptions omitted. -/** - * deserializeAws_restJson1Metadata - */ -const de_Metadata = (output: any, context: __SerdeContext): Metadata => { - return { - SourceArn: __expectString(output.SourceArn), - } as any; -}; +// de_Metadata omitted. -/** - * deserializeAws_restJson1Output - */ -const de_Output = (output: any, context: __SerdeContext): Output => { - return { - CompressionFormat: __expectString(output.CompressionFormat), - Format: __expectString(output.Format), - FormatOptions: output.FormatOptions != null ? de_OutputFormatOptions(output.FormatOptions, context) : undefined, - Location: output.Location != null ? de_S3Location(output.Location, context) : undefined, - MaxOutputFiles: __expectInt32(output.MaxOutputFiles), - Overwrite: __expectBoolean(output.Overwrite), - PartitionColumns: output.PartitionColumns != null ? de_ColumnNameList(output.PartitionColumns, context) : undefined, - } as any; -}; +// de_Output omitted. -/** - * deserializeAws_restJson1OutputFormatOptions - */ -const de_OutputFormatOptions = (output: any, context: __SerdeContext): OutputFormatOptions => { - return { - Csv: output.Csv != null ? de_CsvOutputOptions(output.Csv, context) : undefined, - } as any; -}; +// de_OutputFormatOptions omitted. -/** - * deserializeAws_restJson1OutputList - */ -const de_OutputList = (output: any, context: __SerdeContext): Output[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Output(entry, context); - }); - return retVal; -}; +// de_OutputList omitted. -/** - * deserializeAws_restJson1ParameterMap - */ -const de_ParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ParameterMap omitted. -/** - * deserializeAws_restJson1PathOptions - */ -const de_PathOptions = (output: any, context: __SerdeContext): PathOptions => { - return { - FilesLimit: output.FilesLimit != null ? de_FilesLimit(output.FilesLimit, context) : undefined, - LastModifiedDateCondition: - output.LastModifiedDateCondition != null - ? de_FilterExpression(output.LastModifiedDateCondition, context) - : undefined, - Parameters: output.Parameters != null ? de_PathParametersMap(output.Parameters, context) : undefined, - } as any; -}; +// de_PathOptions omitted. -/** - * deserializeAws_restJson1PathParametersMap - */ -const de_PathParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_DatasetParameter(value, context); - return acc; - }, {}); -}; +// de_PathParametersMap omitted. -/** - * deserializeAws_restJson1ProfileConfiguration - */ -const de_ProfileConfiguration = (output: any, context: __SerdeContext): ProfileConfiguration => { - return { - ColumnStatisticsConfigurations: - output.ColumnStatisticsConfigurations != null - ? de_ColumnStatisticsConfigurationList(output.ColumnStatisticsConfigurations, context) - : undefined, - DatasetStatisticsConfiguration: - output.DatasetStatisticsConfiguration != null - ? de_StatisticsConfiguration(output.DatasetStatisticsConfiguration, context) - : undefined, - EntityDetectorConfiguration: - output.EntityDetectorConfiguration != null - ? de_EntityDetectorConfiguration(output.EntityDetectorConfiguration, context) - : undefined, - ProfileColumns: output.ProfileColumns != null ? de_ColumnSelectorList(output.ProfileColumns, context) : undefined, - } as any; -}; +// de_ProfileConfiguration omitted. /** * deserializeAws_restJson1Project */ const de_Project = (output: any, context: __SerdeContext): Project => { - return { - AccountId: __expectString(output.AccountId), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - DatasetName: __expectString(output.DatasetName), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - OpenDate: - output.OpenDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OpenDate))) : undefined, - OpenedBy: __expectString(output.OpenedBy), - RecipeName: __expectString(output.RecipeName), - ResourceArn: __expectString(output.ResourceArn), - RoleArn: __expectString(output.RoleArn), - Sample: output.Sample != null ? de_Sample(output.Sample, context) : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + AccountId: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + DatasetName: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OpenDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OpenedBy: __expectString, + RecipeName: __expectString, + ResourceArn: __expectString, + RoleArn: __expectString, + Sample: _json, + Tags: _json, + }) as any; }; /** @@ -5455,9 +4286,6 @@ const de_ProjectList = (output: any, context: __SerdeContext): Project[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Project(entry, context); }); return retVal; @@ -5467,55 +4295,27 @@ const de_ProjectList = (output: any, context: __SerdeContext): Project[] => { * deserializeAws_restJson1Recipe */ const de_Recipe = (output: any, context: __SerdeContext): Recipe => { - return { - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - Description: __expectString(output.Description), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - ProjectName: __expectString(output.ProjectName), - PublishedBy: __expectString(output.PublishedBy), - PublishedDate: - output.PublishedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PublishedDate))) - : undefined, - RecipeVersion: __expectString(output.RecipeVersion), - ResourceArn: __expectString(output.ResourceArn), - Steps: output.Steps != null ? de_RecipeStepList(output.Steps, context) : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RecipeAction - */ -const de_RecipeAction = (output: any, context: __SerdeContext): RecipeAction => { - return { - Operation: __expectString(output.Operation), - Parameters: output.Parameters != null ? de_ParameterMap(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RecipeErrorList - */ -const de_RecipeErrorList = (output: any, context: __SerdeContext): RecipeVersionErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecipeVersionErrorDetail(entry, context); - }); - return retVal; + return take(output, { + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + Description: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ProjectName: __expectString, + PublishedBy: __expectString, + PublishedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RecipeVersion: __expectString, + ResourceArn: __expectString, + Steps: _json, + Tags: _json, + }) as any; }; +// de_RecipeAction omitted. + +// de_RecipeErrorList omitted. + /** * deserializeAws_restJson1RecipeList */ @@ -5523,76 +4323,31 @@ const de_RecipeList = (output: any, context: __SerdeContext): Recipe[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Recipe(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RecipeReference - */ -const de_RecipeReference = (output: any, context: __SerdeContext): RecipeReference => { - return { - Name: __expectString(output.Name), - RecipeVersion: __expectString(output.RecipeVersion), - } as any; -}; +// de_RecipeReference omitted. -/** - * deserializeAws_restJson1RecipeStep - */ -const de_RecipeStep = (output: any, context: __SerdeContext): RecipeStep => { - return { - Action: output.Action != null ? de_RecipeAction(output.Action, context) : undefined, - ConditionExpressions: - output.ConditionExpressions != null - ? de_ConditionExpressionList(output.ConditionExpressions, context) - : undefined, - } as any; -}; +// de_RecipeStep omitted. -/** - * deserializeAws_restJson1RecipeStepList - */ -const de_RecipeStepList = (output: any, context: __SerdeContext): RecipeStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecipeStep(entry, context); - }); - return retVal; -}; +// de_RecipeStepList omitted. -/** - * deserializeAws_restJson1RecipeVersionErrorDetail - */ -const de_RecipeVersionErrorDetail = (output: any, context: __SerdeContext): RecipeVersionErrorDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - RecipeVersion: __expectString(output.RecipeVersion), - } as any; -}; +// de_RecipeVersionErrorDetail omitted. /** * deserializeAws_restJson1Rule */ const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - CheckExpression: __expectString(output.CheckExpression), - ColumnSelectors: - output.ColumnSelectors != null ? de_ColumnSelectorList(output.ColumnSelectors, context) : undefined, - Disabled: __expectBoolean(output.Disabled), - Name: __expectString(output.Name), - SubstitutionMap: output.SubstitutionMap != null ? de_ValuesMap(output.SubstitutionMap, context) : undefined, - Threshold: output.Threshold != null ? de_Threshold(output.Threshold, context) : undefined, - } as any; + return take(output, { + CheckExpression: __expectString, + ColumnSelectors: _json, + Disabled: __expectBoolean, + Name: __expectString, + SubstitutionMap: _json, + Threshold: (_: any) => de_Threshold(_, context), + }) as any; }; /** @@ -5602,9 +4357,6 @@ const de_RuleList = (output: any, context: __SerdeContext): Rule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Rule(entry, context); }); return retVal; @@ -5614,23 +4366,19 @@ const de_RuleList = (output: any, context: __SerdeContext): Rule[] => { * deserializeAws_restJson1RulesetItem */ const de_RulesetItem = (output: any, context: __SerdeContext): RulesetItem => { - return { - AccountId: __expectString(output.AccountId), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - Description: __expectString(output.Description), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - ResourceArn: __expectString(output.ResourceArn), - RuleCount: __expectInt32(output.RuleCount), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - TargetArn: __expectString(output.TargetArn), - } as any; + return take(output, { + AccountId: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + Description: __expectString, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceArn: __expectString, + RuleCount: __expectInt32, + Tags: _json, + TargetArn: __expectString, + }) as any; }; /** @@ -5640,64 +4388,33 @@ const de_RulesetItemList = (output: any, context: __SerdeContext): RulesetItem[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RulesetItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - Bucket: __expectString(output.Bucket), - BucketOwner: __expectString(output.BucketOwner), - Key: __expectString(output.Key), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1S3TableOutputOptions - */ -const de_S3TableOutputOptions = (output: any, context: __SerdeContext): S3TableOutputOptions => { - return { - Location: output.Location != null ? de_S3Location(output.Location, context) : undefined, - } as any; -}; +// de_S3TableOutputOptions omitted. -/** - * deserializeAws_restJson1Sample - */ -const de_Sample = (output: any, context: __SerdeContext): Sample => { - return { - Size: __expectInt32(output.Size), - Type: __expectString(output.Type), - } as any; -}; +// de_Sample omitted. /** * deserializeAws_restJson1Schedule */ const de_Schedule = (output: any, context: __SerdeContext): Schedule => { - return { - AccountId: __expectString(output.AccountId), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - CronExpression: __expectString(output.CronExpression), - JobNames: output.JobNames != null ? de_JobNameList(output.JobNames, context) : undefined, - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - ResourceArn: __expectString(output.ResourceArn), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + AccountId: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + CronExpression: __expectString, + JobNames: _json, + LastModifiedBy: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceArn: __expectString, + Tags: _json, + }) as any; }; /** @@ -5707,156 +4424,41 @@ const de_ScheduleList = (output: any, context: __SerdeContext): Schedule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Schedule(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SheetIndexList - */ -const de_SheetIndexList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_SheetIndexList omitted. -/** - * deserializeAws_restJson1SheetNameList - */ -const de_SheetNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SheetNameList omitted. -/** - * deserializeAws_restJson1StatisticList - */ -const de_StatisticList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StatisticList omitted. -/** - * deserializeAws_restJson1StatisticOverride - */ -const de_StatisticOverride = (output: any, context: __SerdeContext): StatisticOverride => { - return { - Parameters: output.Parameters != null ? de_ParameterMap(output.Parameters, context) : undefined, - Statistic: __expectString(output.Statistic), - } as any; -}; +// de_StatisticOverride omitted. -/** - * deserializeAws_restJson1StatisticOverrideList - */ -const de_StatisticOverrideList = (output: any, context: __SerdeContext): StatisticOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatisticOverride(entry, context); - }); - return retVal; -}; +// de_StatisticOverrideList omitted. -/** - * deserializeAws_restJson1StatisticsConfiguration - */ -const de_StatisticsConfiguration = (output: any, context: __SerdeContext): StatisticsConfiguration => { - return { - IncludedStatistics: - output.IncludedStatistics != null ? de_StatisticList(output.IncludedStatistics, context) : undefined, - Overrides: output.Overrides != null ? de_StatisticOverrideList(output.Overrides, context) : undefined, - } as any; -}; +// de_StatisticsConfiguration omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1Threshold */ const de_Threshold = (output: any, context: __SerdeContext): Threshold => { - return { - Type: __expectString(output.Type), - Unit: __expectString(output.Unit), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Type: __expectString, + Unit: __expectString, + Value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1ValidationConfiguration - */ -const de_ValidationConfiguration = (output: any, context: __SerdeContext): ValidationConfiguration => { - return { - RulesetArn: __expectString(output.RulesetArn), - ValidationMode: __expectString(output.ValidationMode), - } as any; -}; +// de_ValidationConfiguration omitted. -/** - * deserializeAws_restJson1ValidationConfigurationList - */ -const de_ValidationConfigurationList = (output: any, context: __SerdeContext): ValidationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationConfiguration(entry, context); - }); - return retVal; -}; +// de_ValidationConfigurationList omitted. -/** - * deserializeAws_restJson1ValuesMap - */ -const de_ValuesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ValuesMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-dataexchange/src/protocols/Aws_restJson1.ts b/clients/client-dataexchange/src/protocols/Aws_restJson1.ts index a1504de2fbe6..ea87bc1f09c6 100644 --- a/clients/client-dataexchange/src/protocols/Aws_restJson1.ts +++ b/clients/client-dataexchange/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, convertMap, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, @@ -13,10 +14,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -72,44 +74,28 @@ import { AutoExportRevisionToS3RequestDetails, ConflictException, CreateS3DataAccessFromS3BucketRequestDetails, - CreateS3DataAccessFromS3BucketResponseDetails, - DatabaseLFTagPolicy, DatabaseLFTagPolicyAndPermissions, DatabaseLFTagPolicyPermission, DataSetEntry, - Details, Event, EventActionEntry, ExportAssetsToS3RequestDetails, - ExportAssetsToS3ResponseDetails, ExportAssetToSignedUrlRequestDetails, ExportAssetToSignedUrlResponseDetails, ExportRevisionsToS3RequestDetails, - ExportRevisionsToS3ResponseDetails, ExportServerSideEncryption, ImportAssetFromApiGatewayApiRequestDetails, ImportAssetFromApiGatewayApiResponseDetails, - ImportAssetFromSignedUrlJobErrorDetails, ImportAssetFromSignedUrlRequestDetails, ImportAssetFromSignedUrlResponseDetails, ImportAssetsFromLakeFormationTagPolicyRequestDetails, - ImportAssetsFromLakeFormationTagPolicyResponseDetails, ImportAssetsFromRedshiftDataSharesRequestDetails, - ImportAssetsFromRedshiftDataSharesResponseDetails, ImportAssetsFromS3RequestDetails, - ImportAssetsFromS3ResponseDetails, InternalServerException, JobEntry, JobError, KmsKeyToGrant, - LakeFormationDataPermissionAsset, - LakeFormationDataPermissionDetails, - LFPermission, - LFResourceDetails, LFTag, - LFTagPolicyDetails, - OriginDetails, - RedshiftDataShareAsset, RedshiftDataShareAssetSourceEntry, RequestDetails, ResourceNotFoundException, @@ -117,11 +103,9 @@ import { RevisionDestinationEntry, RevisionEntry, RevisionPublished, - S3DataAccessAsset, S3DataAccessAssetSourceEntry, S3SnapshotAsset, ServiceLimitExceededException, - TableLFTagPolicy, TableLFTagPolicyAndPermissions, TableTagPolicyLFPermission, ThrottlingException, @@ -164,12 +148,14 @@ export const se_CreateDataSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets"; let body: any; - body = JSON.stringify({ - ...(input.AssetType != null && { AssetType: input.AssetType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_MapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AssetType: [], + Description: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -194,10 +180,12 @@ export const se_CreateEventActionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/event-actions"; let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: se_Action(input.Action, context) }), - ...(input.Event != null && { Event: se_Event(input.Event, context) }), - }); + body = JSON.stringify( + take(input, { + Action: (_) => _json(_), + Event: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -222,10 +210,12 @@ export const se_CreateJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/jobs"; let body: any; - body = JSON.stringify({ - ...(input.Details != null && { Details: se_RequestDetails(input.Details, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Details: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -252,10 +242,12 @@ export const se_CreateRevisionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/revisions"; resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); let body: any; - body = JSON.stringify({ - ...(input.Comment != null && { Comment: input.Comment }), - ...(input.Tags != null && { Tags: se_MapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Comment: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -688,9 +680,11 @@ export const se_RevokeRevisionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RevisionId", () => input.RevisionId!, "{RevisionId}", false); let body: any; - body = JSON.stringify({ - ...(input.RevocationComment != null && { RevocationComment: input.RevocationComment }), - }); + body = JSON.stringify( + take(input, { + RevocationComment: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -787,9 +781,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_MapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -849,9 +845,11 @@ export const se_UpdateAssetCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RevisionId", () => input.RevisionId!, "{RevisionId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -878,10 +876,12 @@ export const se_UpdateDataSetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}"; resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -915,9 +915,11 @@ export const se_UpdateEventActionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: se_Action(input.Action, context) }), - }); + body = JSON.stringify( + take(input, { + Action: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -946,10 +948,12 @@ export const se_UpdateRevisionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "RevisionId", () => input.RevisionId!, "{RevisionId}", false); let body: any; - body = JSON.stringify({ - ...(input.Comment != null && { Comment: input.Comment }), - ...(input.Finalized != null && { Finalized: input.Finalized }), - }); + body = JSON.stringify( + take(input, { + Comment: [], + Finalized: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1008,10 +1012,9 @@ const de_CancelJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1031,39 +1034,20 @@ export const de_CreateDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssetType != null) { - contents.AssetType = __expectString(data.AssetType); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Origin != null) { - contents.Origin = __expectString(data.Origin); - } - if (data.OriginDetails != null) { - contents.OriginDetails = de_OriginDetails(data.OriginDetails, context); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.Tags != null) { - contents.Tags = de_MapOf__string(data.Tags, context); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + AssetType: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + Name: __expectString, + Origin: __expectString, + OriginDetails: _json, + SourceId: __expectString, + Tags: _json, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1097,10 +1081,9 @@ const de_CreateDataSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1120,24 +1103,15 @@ export const de_CreateEventActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Action != null) { - contents.Action = de_Action(data.Action, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Event != null) { - contents.Event = de_Event(data.Event, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Action: _json, + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Event: _json, + Id: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1171,10 +1145,9 @@ const de_CreateEventActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1194,30 +1167,17 @@ export const de_CreateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Details != null) { - contents.Details = de_ResponseDetails(data.Details, context); - } - if (data.Errors != null) { - contents.Errors = de_ListOfJobError(data.Errors, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Details: (_) => de_ResponseDetails(_, context), + Errors: (_) => de_ListOfJobError(_, context), + Id: __expectString, + State: __expectString, + Type: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1254,10 +1214,9 @@ const de_CreateJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1277,42 +1236,21 @@ export const de_CreateRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Comment != null) { - contents.Comment = __expectString(data.Comment); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Finalized != null) { - contents.Finalized = __expectBoolean(data.Finalized); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.RevocationComment != null) { - contents.RevocationComment = __expectString(data.RevocationComment); - } - if (data.Revoked != null) { - contents.Revoked = __expectBoolean(data.Revoked); - } - if (data.RevokedAt != null) { - contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt)); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.Tags != null) { - contents.Tags = de_MapOf__string(data.Tags, context); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + Comment: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Finalized: __expectBoolean, + Id: __expectString, + RevocationComment: __expectString, + Revoked: __expectBoolean, + RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SourceId: __expectString, + Tags: _json, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1346,10 +1284,9 @@ const de_CreateRevisionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1405,10 +1342,9 @@ const de_DeleteAssetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1464,10 +1400,9 @@ const de_DeleteDataSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1517,10 +1452,9 @@ const de_DeleteEventActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1576,10 +1510,9 @@ const de_DeleteRevisionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1599,36 +1532,19 @@ export const de_GetAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssetDetails != null) { - contents.AssetDetails = de_AssetDetails(data.AssetDetails, context); - } - if (data.AssetType != null) { - contents.AssetType = __expectString(data.AssetType); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + AssetDetails: (_) => de_AssetDetails(_, context), + AssetType: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Id: __expectString, + Name: __expectString, + RevisionId: __expectString, + SourceId: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1659,10 +1575,9 @@ const de_GetAssetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1682,39 +1597,20 @@ export const de_GetDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssetType != null) { - contents.AssetType = __expectString(data.AssetType); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Origin != null) { - contents.Origin = __expectString(data.Origin); - } - if (data.OriginDetails != null) { - contents.OriginDetails = de_OriginDetails(data.OriginDetails, context); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.Tags != null) { - contents.Tags = de_MapOf__string(data.Tags, context); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + AssetType: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + Name: __expectString, + Origin: __expectString, + OriginDetails: _json, + SourceId: __expectString, + Tags: _json, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1745,10 +1641,9 @@ const de_GetDataSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1768,24 +1663,15 @@ export const de_GetEventActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Action != null) { - contents.Action = de_Action(data.Action, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Event != null) { - contents.Event = de_Event(data.Event, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Action: _json, + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Event: _json, + Id: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1816,10 +1702,9 @@ const de_GetEventActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1839,30 +1724,17 @@ export const de_GetJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Details != null) { - contents.Details = de_ResponseDetails(data.Details, context); - } - if (data.Errors != null) { - contents.Errors = de_ListOfJobError(data.Errors, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Details: (_) => de_ResponseDetails(_, context), + Errors: (_) => de_ListOfJobError(_, context), + Id: __expectString, + State: __expectString, + Type: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1890,10 +1762,9 @@ const de_GetJobCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1913,42 +1784,21 @@ export const de_GetRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Comment != null) { - contents.Comment = __expectString(data.Comment); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Finalized != null) { - contents.Finalized = __expectBoolean(data.Finalized); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.RevocationComment != null) { - contents.RevocationComment = __expectString(data.RevocationComment); - } - if (data.Revoked != null) { - contents.Revoked = __expectBoolean(data.Revoked); - } - if (data.RevokedAt != null) { - contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt)); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.Tags != null) { - contents.Tags = de_MapOf__string(data.Tags, context); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + Comment: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Finalized: __expectBoolean, + Id: __expectString, + RevocationComment: __expectString, + Revoked: __expectBoolean, + RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SourceId: __expectString, + Tags: _json, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1979,10 +1829,9 @@ const de_GetRevisionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2002,12 +1851,11 @@ export const de_ListDataSetRevisionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Revisions != null) { - contents.Revisions = de_ListOfRevisionEntry(data.Revisions, context); - } + const doc = take(data, { + NextToken: __expectString, + Revisions: (_) => de_ListOfRevisionEntry(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2038,10 +1886,9 @@ const de_ListDataSetRevisionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2061,12 +1908,11 @@ export const de_ListDataSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSets != null) { - contents.DataSets = de_ListOfDataSetEntry(data.DataSets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DataSets: (_) => de_ListOfDataSetEntry(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2097,10 +1943,9 @@ const de_ListDataSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2120,12 +1965,11 @@ export const de_ListEventActionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventActions != null) { - contents.EventActions = de_ListOfEventActionEntry(data.EventActions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EventActions: (_) => de_ListOfEventActionEntry(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2156,10 +2000,9 @@ const de_ListEventActionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2179,12 +2022,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Jobs != null) { - contents.Jobs = de_ListOfJobEntry(data.Jobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Jobs: (_) => de_ListOfJobEntry(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2215,10 +2057,9 @@ const de_ListJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2238,12 +2079,11 @@ export const de_ListRevisionAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Assets != null) { - contents.Assets = de_ListOfAssetEntry(data.Assets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Assets: (_) => de_ListOfAssetEntry(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2274,10 +2114,9 @@ const de_ListRevisionAssetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2297,9 +2136,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de_MapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2316,10 +2156,9 @@ const de_ListTagsForResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2338,39 +2177,20 @@ export const de_RevokeRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Comment != null) { - contents.Comment = __expectString(data.Comment); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Finalized != null) { - contents.Finalized = __expectBoolean(data.Finalized); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.RevocationComment != null) { - contents.RevocationComment = __expectString(data.RevocationComment); - } - if (data.Revoked != null) { - contents.Revoked = __expectBoolean(data.Revoked); - } - if (data.RevokedAt != null) { - contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt)); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + Comment: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Finalized: __expectBoolean, + Id: __expectString, + RevocationComment: __expectString, + Revoked: __expectBoolean, + RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SourceId: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2407,10 +2227,9 @@ const de_RevokeRevisionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2473,10 +2292,9 @@ const de_SendApiAssetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2532,10 +2350,9 @@ const de_StartJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2571,10 +2388,9 @@ const de_TagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2609,10 +2425,9 @@ const de_UntagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2631,36 +2446,19 @@ export const de_UpdateAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssetDetails != null) { - contents.AssetDetails = de_AssetDetails(data.AssetDetails, context); - } - if (data.AssetType != null) { - contents.AssetType = __expectString(data.AssetType); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + AssetDetails: (_) => de_AssetDetails(_, context), + AssetType: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Id: __expectString, + Name: __expectString, + RevisionId: __expectString, + SourceId: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2697,10 +2495,9 @@ const de_UpdateAssetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2720,36 +2517,19 @@ export const de_UpdateDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AssetType != null) { - contents.AssetType = __expectString(data.AssetType); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Origin != null) { - contents.Origin = __expectString(data.Origin); - } - if (data.OriginDetails != null) { - contents.OriginDetails = de_OriginDetails(data.OriginDetails, context); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + AssetType: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + Name: __expectString, + Origin: __expectString, + OriginDetails: _json, + SourceId: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2783,10 +2563,9 @@ const de_UpdateDataSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2806,24 +2585,15 @@ export const de_UpdateEventActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Action != null) { - contents.Action = de_Action(data.Action, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.Event != null) { - contents.Event = de_Event(data.Event, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Action: _json, + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Event: _json, + Id: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2857,10 +2627,9 @@ const de_UpdateEventActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2880,39 +2649,20 @@ export const de_UpdateRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Comment != null) { - contents.Comment = __expectString(data.Comment); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Finalized != null) { - contents.Finalized = __expectBoolean(data.Finalized); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.RevocationComment != null) { - contents.RevocationComment = __expectString(data.RevocationComment); - } - if (data.Revoked != null) { - contents.Revoked = __expectBoolean(data.Revoked); - } - if (data.RevokedAt != null) { - contents.RevokedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.RevokedAt)); - } - if (data.SourceId != null) { - contents.SourceId = __expectString(data.SourceId); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdatedAt)); - } + const doc = take(data, { + Arn: __expectString, + Comment: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Finalized: __expectBoolean, + Id: __expectString, + RevocationComment: __expectString, + Revoked: __expectBoolean, + RevokedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SourceId: __expectString, + UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2949,16 +2699,15 @@ const de_UpdateRevisionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2968,9 +2717,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2984,15 +2734,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3009,9 +2756,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3028,15 +2776,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3053,15 +2798,12 @@ const de_ServiceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.LimitName != null) { - contents.LimitName = __expectString(data.LimitName); - } - if (data.LimitValue != null) { - contents.LimitValue = __limitedParseDouble(data.LimitValue); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + LimitName: __expectString, + LimitValue: __limitedParseDouble, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3075,9 +2817,10 @@ const de_ServiceLimitExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3091,12 +2834,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ExceptionCause != null) { - contents.ExceptionCause = __expectString(data.ExceptionCause); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ExceptionCause: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3104,772 +2846,199 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +// se_Action omitted. + +// se_AssetDestinationEntry omitted. + +// se_AssetSourceEntry omitted. + +// se_AutoExportRevisionDestinationEntry omitted. + +// se_AutoExportRevisionToS3RequestDetails omitted. + +// se_CreateS3DataAccessFromS3BucketRequestDetails omitted. + +// se_DatabaseLFTagPolicyAndPermissions omitted. + +// se_Event omitted. + +// se_ExportAssetsToS3RequestDetails omitted. + +// se_ExportAssetToSignedUrlRequestDetails omitted. + +// se_ExportRevisionsToS3RequestDetails omitted. + +// se_ExportServerSideEncryption omitted. + +// se_ImportAssetFromApiGatewayApiRequestDetails omitted. + +// se_ImportAssetFromSignedUrlRequestDetails omitted. + +// se_ImportAssetsFromLakeFormationTagPolicyRequestDetails omitted. + +// se_ImportAssetsFromRedshiftDataSharesRequestDetails omitted. + +// se_ImportAssetsFromS3RequestDetails omitted. + +// se_KmsKeyToGrant omitted. + +// se_LFTag omitted. + +// se_ListOf__string omitted. + +// se_ListOfAssetDestinationEntry omitted. + +// se_ListOfAssetSourceEntry omitted. + +// se_ListOfDatabaseLFTagPolicyPermissions omitted. + +// se_ListOfKmsKeysToGrant omitted. + +// se_ListOfLFTags omitted. + +// se_ListOfLFTagValues omitted. + +// se_ListOfRedshiftDataShareAssetSourceEntry omitted. + +// se_ListOfRevisionDestinationEntry omitted. + +// se_ListOfTableTagPolicyLFPermissions omitted. + +// se_MapOf__string omitted. + +// se_RedshiftDataShareAssetSourceEntry omitted. + +// se_RequestDetails omitted. + +// se_RevisionDestinationEntry omitted. + +// se_RevisionPublished omitted. + +// se_S3DataAccessAssetSourceEntry omitted. + +// se_TableLFTagPolicyAndPermissions omitted. + +// de_Action omitted. + /** - * serializeAws_restJson1Action + * deserializeAws_restJson1ApiGatewayApiAsset */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.ExportRevisionToS3 != null && { - ExportRevisionToS3: se_AutoExportRevisionToS3RequestDetails(input.ExportRevisionToS3, context), - }), - }; +const de_ApiGatewayApiAsset = (output: any, context: __SerdeContext): ApiGatewayApiAsset => { + return take(output, { + ApiDescription: __expectString, + ApiEndpoint: __expectString, + ApiId: __expectString, + ApiKey: __expectString, + ApiName: __expectString, + ApiSpecificationDownloadUrl: __expectString, + ApiSpecificationDownloadUrlExpiresAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ProtocolType: __expectString, + Stage: __expectString, + }) as any; }; +// de_AssetDestinationEntry omitted. + /** - * serializeAws_restJson1AssetDestinationEntry + * deserializeAws_restJson1AssetDetails */ -const se_AssetDestinationEntry = (input: AssetDestinationEntry, context: __SerdeContext): any => { - return { - ...(input.AssetId != null && { AssetId: input.AssetId }), - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - }; +const de_AssetDetails = (output: any, context: __SerdeContext): AssetDetails => { + return take(output, { + ApiGatewayApiAsset: (_: any) => de_ApiGatewayApiAsset(_, context), + LakeFormationDataPermissionAsset: _json, + RedshiftDataShareAsset: _json, + S3DataAccessAsset: _json, + S3SnapshotAsset: (_: any) => de_S3SnapshotAsset(_, context), + }) as any; }; /** - * serializeAws_restJson1AssetSourceEntry + * deserializeAws_restJson1AssetEntry */ -const se_AssetSourceEntry = (input: AssetSourceEntry, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - }; +const de_AssetEntry = (output: any, context: __SerdeContext): AssetEntry => { + return take(output, { + Arn: __expectString, + AssetDetails: (_: any) => de_AssetDetails(_, context), + AssetType: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Id: __expectString, + Name: __expectString, + RevisionId: __expectString, + SourceId: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_AssetSourceEntry omitted. + +// de_AutoExportRevisionDestinationEntry omitted. + +// de_AutoExportRevisionToS3RequestDetails omitted. + +// de_CreateS3DataAccessFromS3BucketResponseDetails omitted. + +// de_DatabaseLFTagPolicy omitted. + +// de_DatabaseLFTagPolicyAndPermissions omitted. + /** - * serializeAws_restJson1AutoExportRevisionDestinationEntry + * deserializeAws_restJson1DataSetEntry */ -const se_AutoExportRevisionDestinationEntry = ( - input: AutoExportRevisionDestinationEntry, - context: __SerdeContext -): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }), - }; +const de_DataSetEntry = (output: any, context: __SerdeContext): DataSetEntry => { + return take(output, { + Arn: __expectString, + AssetType: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + Name: __expectString, + Origin: __expectString, + OriginDetails: _json, + SourceId: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_Details omitted. + +// de_Event omitted. + /** - * serializeAws_restJson1AutoExportRevisionToS3RequestDetails + * deserializeAws_restJson1EventActionEntry */ -const se_AutoExportRevisionToS3RequestDetails = ( - input: AutoExportRevisionToS3RequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.Encryption != null && { Encryption: se_ExportServerSideEncryption(input.Encryption, context) }), - ...(input.RevisionDestination != null && { - RevisionDestination: se_AutoExportRevisionDestinationEntry(input.RevisionDestination, context), - }), - }; +const de_EventActionEntry = (output: any, context: __SerdeContext): EventActionEntry => { + return take(output, { + Action: _json, + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Event: _json, + Id: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_ExportAssetsToS3ResponseDetails omitted. + /** - * serializeAws_restJson1CreateS3DataAccessFromS3BucketRequestDetails - */ -const se_CreateS3DataAccessFromS3BucketRequestDetails = ( - input: CreateS3DataAccessFromS3BucketRequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssetSource != null && { AssetSource: se_S3DataAccessAssetSourceEntry(input.AssetSource, context) }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1DatabaseLFTagPolicyAndPermissions - */ -const se_DatabaseLFTagPolicyAndPermissions = ( - input: DatabaseLFTagPolicyAndPermissions, - context: __SerdeContext -): any => { - return { - ...(input.Expression != null && { Expression: se_ListOfLFTags(input.Expression, context) }), - ...(input.Permissions != null && { - Permissions: se_ListOfDatabaseLFTagPolicyPermissions(input.Permissions, context), - }), - }; -}; - -/** - * serializeAws_restJson1Event - */ -const se_Event = (input: Event, context: __SerdeContext): any => { - return { - ...(input.RevisionPublished != null && { - RevisionPublished: se_RevisionPublished(input.RevisionPublished, context), - }), - }; -}; - -/** - * serializeAws_restJson1ExportAssetsToS3RequestDetails - */ -const se_ExportAssetsToS3RequestDetails = (input: ExportAssetsToS3RequestDetails, context: __SerdeContext): any => { - return { - ...(input.AssetDestinations != null && { - AssetDestinations: se_ListOfAssetDestinationEntry(input.AssetDestinations, context), - }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.Encryption != null && { Encryption: se_ExportServerSideEncryption(input.Encryption, context) }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1ExportAssetToSignedUrlRequestDetails - */ -const se_ExportAssetToSignedUrlRequestDetails = ( - input: ExportAssetToSignedUrlRequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssetId != null && { AssetId: input.AssetId }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1ExportRevisionsToS3RequestDetails - */ -const se_ExportRevisionsToS3RequestDetails = ( - input: ExportRevisionsToS3RequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.Encryption != null && { Encryption: se_ExportServerSideEncryption(input.Encryption, context) }), - ...(input.RevisionDestinations != null && { - RevisionDestinations: se_ListOfRevisionDestinationEntry(input.RevisionDestinations, context), - }), - }; -}; - -/** - * serializeAws_restJson1ExportServerSideEncryption - */ -const se_ExportServerSideEncryption = (input: ExportServerSideEncryption, context: __SerdeContext): any => { - return { - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1ImportAssetFromApiGatewayApiRequestDetails - */ -const se_ImportAssetFromApiGatewayApiRequestDetails = ( - input: ImportAssetFromApiGatewayApiRequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.ApiDescription != null && { ApiDescription: input.ApiDescription }), - ...(input.ApiId != null && { ApiId: input.ApiId }), - ...(input.ApiKey != null && { ApiKey: input.ApiKey }), - ...(input.ApiName != null && { ApiName: input.ApiName }), - ...(input.ApiSpecificationMd5Hash != null && { ApiSpecificationMd5Hash: input.ApiSpecificationMd5Hash }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.ProtocolType != null && { ProtocolType: input.ProtocolType }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.Stage != null && { Stage: input.Stage }), - }; -}; - -/** - * serializeAws_restJson1ImportAssetFromSignedUrlRequestDetails - */ -const se_ImportAssetFromSignedUrlRequestDetails = ( - input: ImportAssetFromSignedUrlRequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssetName != null && { AssetName: input.AssetName }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.Md5Hash != null && { Md5Hash: input.Md5Hash }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1ImportAssetsFromLakeFormationTagPolicyRequestDetails - */ -const se_ImportAssetsFromLakeFormationTagPolicyRequestDetails = ( - input: ImportAssetsFromLakeFormationTagPolicyRequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.Database != null && { Database: se_DatabaseLFTagPolicyAndPermissions(input.Database, context) }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Table != null && { Table: se_TableLFTagPolicyAndPermissions(input.Table, context) }), - }; -}; - -/** - * serializeAws_restJson1ImportAssetsFromRedshiftDataSharesRequestDetails - */ -const se_ImportAssetsFromRedshiftDataSharesRequestDetails = ( - input: ImportAssetsFromRedshiftDataSharesRequestDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssetSources != null && { - AssetSources: se_ListOfRedshiftDataShareAssetSourceEntry(input.AssetSources, context), - }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1ImportAssetsFromS3RequestDetails - */ -const se_ImportAssetsFromS3RequestDetails = (input: ImportAssetsFromS3RequestDetails, context: __SerdeContext): any => { - return { - ...(input.AssetSources != null && { AssetSources: se_ListOfAssetSourceEntry(input.AssetSources, context) }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1KmsKeyToGrant - */ -const se_KmsKeyToGrant = (input: KmsKeyToGrant, context: __SerdeContext): any => { - return { - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }; -}; - -/** - * serializeAws_restJson1LFTag - */ -const se_LFTag = (input: LFTag, context: __SerdeContext): any => { - return { - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValues != null && { TagValues: se_ListOfLFTagValues(input.TagValues, context) }), - }; -}; - -/** - * serializeAws_restJson1ListOf__string - */ -const se_ListOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ListOfAssetDestinationEntry - */ -const se_ListOfAssetDestinationEntry = (input: AssetDestinationEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetDestinationEntry(entry, context); - }); -}; - -/** - * serializeAws_restJson1ListOfAssetSourceEntry - */ -const se_ListOfAssetSourceEntry = (input: AssetSourceEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetSourceEntry(entry, context); - }); -}; - -/** - * serializeAws_restJson1ListOfDatabaseLFTagPolicyPermissions - */ -const se_ListOfDatabaseLFTagPolicyPermissions = ( - input: (DatabaseLFTagPolicyPermission | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ListOfKmsKeysToGrant - */ -const se_ListOfKmsKeysToGrant = (input: KmsKeyToGrant[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KmsKeyToGrant(entry, context); - }); -}; - -/** - * serializeAws_restJson1ListOfLFTags - */ -const se_ListOfLFTags = (input: LFTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LFTag(entry, context); - }); -}; - -/** - * serializeAws_restJson1ListOfLFTagValues - */ -const se_ListOfLFTagValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ListOfRedshiftDataShareAssetSourceEntry - */ -const se_ListOfRedshiftDataShareAssetSourceEntry = ( - input: RedshiftDataShareAssetSourceEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RedshiftDataShareAssetSourceEntry(entry, context); - }); -}; - -/** - * serializeAws_restJson1ListOfRevisionDestinationEntry - */ -const se_ListOfRevisionDestinationEntry = (input: RevisionDestinationEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RevisionDestinationEntry(entry, context); - }); -}; - -/** - * serializeAws_restJson1ListOfTableTagPolicyLFPermissions - */ -const se_ListOfTableTagPolicyLFPermissions = ( - input: (TableTagPolicyLFPermission | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1MapOf__string - */ -const se_MapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1RedshiftDataShareAssetSourceEntry - */ -const se_RedshiftDataShareAssetSourceEntry = ( - input: RedshiftDataShareAssetSourceEntry, - context: __SerdeContext -): any => { - return { - ...(input.DataShareArn != null && { DataShareArn: input.DataShareArn }), - }; -}; - -/** - * serializeAws_restJson1RequestDetails - */ -const se_RequestDetails = (input: RequestDetails, context: __SerdeContext): any => { - return { - ...(input.CreateS3DataAccessFromS3Bucket != null && { - CreateS3DataAccessFromS3Bucket: se_CreateS3DataAccessFromS3BucketRequestDetails( - input.CreateS3DataAccessFromS3Bucket, - context - ), - }), - ...(input.ExportAssetToSignedUrl != null && { - ExportAssetToSignedUrl: se_ExportAssetToSignedUrlRequestDetails(input.ExportAssetToSignedUrl, context), - }), - ...(input.ExportAssetsToS3 != null && { - ExportAssetsToS3: se_ExportAssetsToS3RequestDetails(input.ExportAssetsToS3, context), - }), - ...(input.ExportRevisionsToS3 != null && { - ExportRevisionsToS3: se_ExportRevisionsToS3RequestDetails(input.ExportRevisionsToS3, context), - }), - ...(input.ImportAssetFromApiGatewayApi != null && { - ImportAssetFromApiGatewayApi: se_ImportAssetFromApiGatewayApiRequestDetails( - input.ImportAssetFromApiGatewayApi, - context - ), - }), - ...(input.ImportAssetFromSignedUrl != null && { - ImportAssetFromSignedUrl: se_ImportAssetFromSignedUrlRequestDetails(input.ImportAssetFromSignedUrl, context), - }), - ...(input.ImportAssetsFromLakeFormationTagPolicy != null && { - ImportAssetsFromLakeFormationTagPolicy: se_ImportAssetsFromLakeFormationTagPolicyRequestDetails( - input.ImportAssetsFromLakeFormationTagPolicy, - context - ), - }), - ...(input.ImportAssetsFromRedshiftDataShares != null && { - ImportAssetsFromRedshiftDataShares: se_ImportAssetsFromRedshiftDataSharesRequestDetails( - input.ImportAssetsFromRedshiftDataShares, - context - ), - }), - ...(input.ImportAssetsFromS3 != null && { - ImportAssetsFromS3: se_ImportAssetsFromS3RequestDetails(input.ImportAssetsFromS3, context), - }), - }; -}; - -/** - * serializeAws_restJson1RevisionDestinationEntry - */ -const se_RevisionDestinationEntry = (input: RevisionDestinationEntry, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }; -}; - -/** - * serializeAws_restJson1RevisionPublished - */ -const se_RevisionPublished = (input: RevisionPublished, context: __SerdeContext): any => { - return { - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - }; -}; - -/** - * serializeAws_restJson1S3DataAccessAssetSourceEntry - */ -const se_S3DataAccessAssetSourceEntry = (input: S3DataAccessAssetSourceEntry, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.KeyPrefixes != null && { KeyPrefixes: se_ListOf__string(input.KeyPrefixes, context) }), - ...(input.Keys != null && { Keys: se_ListOf__string(input.Keys, context) }), - ...(input.KmsKeysToGrant != null && { KmsKeysToGrant: se_ListOfKmsKeysToGrant(input.KmsKeysToGrant, context) }), - }; -}; - -/** - * serializeAws_restJson1TableLFTagPolicyAndPermissions - */ -const se_TableLFTagPolicyAndPermissions = (input: TableLFTagPolicyAndPermissions, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: se_ListOfLFTags(input.Expression, context) }), - ...(input.Permissions != null && { Permissions: se_ListOfTableTagPolicyLFPermissions(input.Permissions, context) }), - }; -}; - -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - ExportRevisionToS3: - output.ExportRevisionToS3 != null - ? de_AutoExportRevisionToS3RequestDetails(output.ExportRevisionToS3, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ApiGatewayApiAsset - */ -const de_ApiGatewayApiAsset = (output: any, context: __SerdeContext): ApiGatewayApiAsset => { - return { - ApiDescription: __expectString(output.ApiDescription), - ApiEndpoint: __expectString(output.ApiEndpoint), - ApiId: __expectString(output.ApiId), - ApiKey: __expectString(output.ApiKey), - ApiName: __expectString(output.ApiName), - ApiSpecificationDownloadUrl: __expectString(output.ApiSpecificationDownloadUrl), - ApiSpecificationDownloadUrlExpiresAt: - output.ApiSpecificationDownloadUrlExpiresAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ApiSpecificationDownloadUrlExpiresAt)) - : undefined, - ProtocolType: __expectString(output.ProtocolType), - Stage: __expectString(output.Stage), - } as any; -}; - -/** - * deserializeAws_restJson1AssetDestinationEntry - */ -const de_AssetDestinationEntry = (output: any, context: __SerdeContext): AssetDestinationEntry => { - return { - AssetId: __expectString(output.AssetId), - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; -}; - -/** - * deserializeAws_restJson1AssetDetails - */ -const de_AssetDetails = (output: any, context: __SerdeContext): AssetDetails => { - return { - ApiGatewayApiAsset: - output.ApiGatewayApiAsset != null ? de_ApiGatewayApiAsset(output.ApiGatewayApiAsset, context) : undefined, - LakeFormationDataPermissionAsset: - output.LakeFormationDataPermissionAsset != null - ? de_LakeFormationDataPermissionAsset(output.LakeFormationDataPermissionAsset, context) - : undefined, - RedshiftDataShareAsset: - output.RedshiftDataShareAsset != null - ? de_RedshiftDataShareAsset(output.RedshiftDataShareAsset, context) - : undefined, - S3DataAccessAsset: - output.S3DataAccessAsset != null ? de_S3DataAccessAsset(output.S3DataAccessAsset, context) : undefined, - S3SnapshotAsset: output.S3SnapshotAsset != null ? de_S3SnapshotAsset(output.S3SnapshotAsset, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssetEntry - */ -const de_AssetEntry = (output: any, context: __SerdeContext): AssetEntry => { - return { - Arn: __expectString(output.Arn), - AssetDetails: output.AssetDetails != null ? de_AssetDetails(output.AssetDetails, context) : undefined, - AssetType: __expectString(output.AssetType), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined, - DataSetId: __expectString(output.DataSetId), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - RevisionId: __expectString(output.RevisionId), - SourceId: __expectString(output.SourceId), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssetSourceEntry - */ -const de_AssetSourceEntry = (output: any, context: __SerdeContext): AssetSourceEntry => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; -}; - -/** - * deserializeAws_restJson1AutoExportRevisionDestinationEntry - */ -const de_AutoExportRevisionDestinationEntry = ( - output: any, - context: __SerdeContext -): AutoExportRevisionDestinationEntry => { - return { - Bucket: __expectString(output.Bucket), - KeyPattern: __expectString(output.KeyPattern), - } as any; -}; - -/** - * deserializeAws_restJson1AutoExportRevisionToS3RequestDetails - */ -const de_AutoExportRevisionToS3RequestDetails = ( - output: any, - context: __SerdeContext -): AutoExportRevisionToS3RequestDetails => { - return { - Encryption: output.Encryption != null ? de_ExportServerSideEncryption(output.Encryption, context) : undefined, - RevisionDestination: - output.RevisionDestination != null - ? de_AutoExportRevisionDestinationEntry(output.RevisionDestination, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CreateS3DataAccessFromS3BucketResponseDetails - */ -const de_CreateS3DataAccessFromS3BucketResponseDetails = ( - output: any, - context: __SerdeContext -): CreateS3DataAccessFromS3BucketResponseDetails => { - return { - AssetSource: output.AssetSource != null ? de_S3DataAccessAssetSourceEntry(output.AssetSource, context) : undefined, - DataSetId: __expectString(output.DataSetId), - RevisionId: __expectString(output.RevisionId), - } as any; -}; - -/** - * deserializeAws_restJson1DatabaseLFTagPolicy - */ -const de_DatabaseLFTagPolicy = (output: any, context: __SerdeContext): DatabaseLFTagPolicy => { - return { - Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DatabaseLFTagPolicyAndPermissions - */ -const de_DatabaseLFTagPolicyAndPermissions = ( - output: any, - context: __SerdeContext -): DatabaseLFTagPolicyAndPermissions => { - return { - Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined, - Permissions: - output.Permissions != null ? de_ListOfDatabaseLFTagPolicyPermissions(output.Permissions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataSetEntry - */ -const de_DataSetEntry = (output: any, context: __SerdeContext): DataSetEntry => { - return { - Arn: __expectString(output.Arn), - AssetType: __expectString(output.AssetType), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Origin: __expectString(output.Origin), - OriginDetails: output.OriginDetails != null ? de_OriginDetails(output.OriginDetails, context) : undefined, - SourceId: __expectString(output.SourceId), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Details - */ -const de_Details = (output: any, context: __SerdeContext): Details => { - return { - ImportAssetFromSignedUrlJobErrorDetails: - output.ImportAssetFromSignedUrlJobErrorDetails != null - ? de_ImportAssetFromSignedUrlJobErrorDetails(output.ImportAssetFromSignedUrlJobErrorDetails, context) - : undefined, - ImportAssetsFromS3JobErrorDetails: - output.ImportAssetsFromS3JobErrorDetails != null - ? de_ListOfAssetSourceEntry(output.ImportAssetsFromS3JobErrorDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Event - */ -const de_Event = (output: any, context: __SerdeContext): Event => { - return { - RevisionPublished: - output.RevisionPublished != null ? de_RevisionPublished(output.RevisionPublished, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EventActionEntry - */ -const de_EventActionEntry = (output: any, context: __SerdeContext): EventActionEntry => { - return { - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined, - Event: output.Event != null ? de_Event(output.Event, context) : undefined, - Id: __expectString(output.Id), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ExportAssetsToS3ResponseDetails - */ -const de_ExportAssetsToS3ResponseDetails = (output: any, context: __SerdeContext): ExportAssetsToS3ResponseDetails => { - return { - AssetDestinations: - output.AssetDestinations != null ? de_ListOfAssetDestinationEntry(output.AssetDestinations, context) : undefined, - DataSetId: __expectString(output.DataSetId), - Encryption: output.Encryption != null ? de_ExportServerSideEncryption(output.Encryption, context) : undefined, - RevisionId: __expectString(output.RevisionId), - } as any; -}; - -/** - * deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails + * deserializeAws_restJson1ExportAssetToSignedUrlResponseDetails */ const de_ExportAssetToSignedUrlResponseDetails = ( output: any, context: __SerdeContext ): ExportAssetToSignedUrlResponseDetails => { - return { - AssetId: __expectString(output.AssetId), - DataSetId: __expectString(output.DataSetId), - RevisionId: __expectString(output.RevisionId), - SignedUrl: __expectString(output.SignedUrl), - SignedUrlExpiresAt: - output.SignedUrlExpiresAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SignedUrlExpiresAt)) - : undefined, - } as any; + return take(output, { + AssetId: __expectString, + DataSetId: __expectString, + RevisionId: __expectString, + SignedUrl: __expectString, + SignedUrlExpiresAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1ExportRevisionsToS3ResponseDetails - */ -const de_ExportRevisionsToS3ResponseDetails = ( - output: any, - context: __SerdeContext -): ExportRevisionsToS3ResponseDetails => { - return { - DataSetId: __expectString(output.DataSetId), - Encryption: output.Encryption != null ? de_ExportServerSideEncryption(output.Encryption, context) : undefined, - EventActionArn: __expectString(output.EventActionArn), - RevisionDestinations: - output.RevisionDestinations != null - ? de_ListOfRevisionDestinationEntry(output.RevisionDestinations, context) - : undefined, - } as any; -}; +// de_ExportRevisionsToS3ResponseDetails omitted. -/** - * deserializeAws_restJson1ExportServerSideEncryption - */ -const de_ExportServerSideEncryption = (output: any, context: __SerdeContext): ExportServerSideEncryption => { - return { - KmsKeyArn: __expectString(output.KmsKeyArn), - Type: __expectString(output.Type), - } as any; -}; +// de_ExportServerSideEncryption omitted. /** * deserializeAws_restJson1ImportAssetFromApiGatewayApiResponseDetails @@ -3878,35 +3047,22 @@ const de_ImportAssetFromApiGatewayApiResponseDetails = ( output: any, context: __SerdeContext ): ImportAssetFromApiGatewayApiResponseDetails => { - return { - ApiDescription: __expectString(output.ApiDescription), - ApiId: __expectString(output.ApiId), - ApiKey: __expectString(output.ApiKey), - ApiName: __expectString(output.ApiName), - ApiSpecificationMd5Hash: __expectString(output.ApiSpecificationMd5Hash), - ApiSpecificationUploadUrl: __expectString(output.ApiSpecificationUploadUrl), - ApiSpecificationUploadUrlExpiresAt: - output.ApiSpecificationUploadUrlExpiresAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ApiSpecificationUploadUrlExpiresAt)) - : undefined, - DataSetId: __expectString(output.DataSetId), - ProtocolType: __expectString(output.ProtocolType), - RevisionId: __expectString(output.RevisionId), - Stage: __expectString(output.Stage), - } as any; + return take(output, { + ApiDescription: __expectString, + ApiId: __expectString, + ApiKey: __expectString, + ApiName: __expectString, + ApiSpecificationMd5Hash: __expectString, + ApiSpecificationUploadUrl: __expectString, + ApiSpecificationUploadUrlExpiresAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + ProtocolType: __expectString, + RevisionId: __expectString, + Stage: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ImportAssetFromSignedUrlJobErrorDetails - */ -const de_ImportAssetFromSignedUrlJobErrorDetails = ( - output: any, - context: __SerdeContext -): ImportAssetFromSignedUrlJobErrorDetails => { - return { - AssetName: __expectString(output.AssetName), - } as any; -}; +// de_ImportAssetFromSignedUrlJobErrorDetails omitted. /** * deserializeAws_restJson1ImportAssetFromSignedUrlResponseDetails @@ -3915,199 +3071,68 @@ const de_ImportAssetFromSignedUrlResponseDetails = ( output: any, context: __SerdeContext ): ImportAssetFromSignedUrlResponseDetails => { - return { - AssetName: __expectString(output.AssetName), - DataSetId: __expectString(output.DataSetId), - Md5Hash: __expectString(output.Md5Hash), - RevisionId: __expectString(output.RevisionId), - SignedUrl: __expectString(output.SignedUrl), - SignedUrlExpiresAt: - output.SignedUrlExpiresAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SignedUrlExpiresAt)) - : undefined, - } as any; + return take(output, { + AssetName: __expectString, + DataSetId: __expectString, + Md5Hash: __expectString, + RevisionId: __expectString, + SignedUrl: __expectString, + SignedUrlExpiresAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1ImportAssetsFromLakeFormationTagPolicyResponseDetails - */ -const de_ImportAssetsFromLakeFormationTagPolicyResponseDetails = ( - output: any, - context: __SerdeContext -): ImportAssetsFromLakeFormationTagPolicyResponseDetails => { - return { - CatalogId: __expectString(output.CatalogId), - DataSetId: __expectString(output.DataSetId), - Database: output.Database != null ? de_DatabaseLFTagPolicyAndPermissions(output.Database, context) : undefined, - RevisionId: __expectString(output.RevisionId), - RoleArn: __expectString(output.RoleArn), - Table: output.Table != null ? de_TableLFTagPolicyAndPermissions(output.Table, context) : undefined, - } as any; -}; +// de_ImportAssetsFromLakeFormationTagPolicyResponseDetails omitted. -/** - * deserializeAws_restJson1ImportAssetsFromRedshiftDataSharesResponseDetails - */ -const de_ImportAssetsFromRedshiftDataSharesResponseDetails = ( - output: any, - context: __SerdeContext -): ImportAssetsFromRedshiftDataSharesResponseDetails => { - return { - AssetSources: - output.AssetSources != null - ? de_ListOfRedshiftDataShareAssetSourceEntry(output.AssetSources, context) - : undefined, - DataSetId: __expectString(output.DataSetId), - RevisionId: __expectString(output.RevisionId), - } as any; -}; +// de_ImportAssetsFromRedshiftDataSharesResponseDetails omitted. -/** - * deserializeAws_restJson1ImportAssetsFromS3ResponseDetails - */ -const de_ImportAssetsFromS3ResponseDetails = ( - output: any, - context: __SerdeContext -): ImportAssetsFromS3ResponseDetails => { - return { - AssetSources: output.AssetSources != null ? de_ListOfAssetSourceEntry(output.AssetSources, context) : undefined, - DataSetId: __expectString(output.DataSetId), - RevisionId: __expectString(output.RevisionId), - } as any; -}; +// de_ImportAssetsFromS3ResponseDetails omitted. /** * deserializeAws_restJson1JobEntry */ const de_JobEntry = (output: any, context: __SerdeContext): JobEntry => { - return { - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined, - Details: output.Details != null ? de_ResponseDetails(output.Details, context) : undefined, - Errors: output.Errors != null ? de_ListOfJobError(output.Errors, context) : undefined, - Id: __expectString(output.Id), - State: __expectString(output.State), - Type: __expectString(output.Type), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Details: (_: any) => de_ResponseDetails(_, context), + Errors: (_: any) => de_ListOfJobError(_, context), + Id: __expectString, + State: __expectString, + Type: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1JobError */ const de_JobError = (output: any, context: __SerdeContext): JobError => { - return { - Code: __expectString(output.Code), - Details: output.Details != null ? de_Details(output.Details, context) : undefined, - LimitName: __expectString(output.LimitName), - LimitValue: __limitedParseDouble(output.LimitValue), - Message: __expectString(output.Message), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; + return take(output, { + Code: __expectString, + Details: _json, + LimitName: __expectString, + LimitValue: __limitedParseDouble, + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1KmsKeyToGrant - */ -const de_KmsKeyToGrant = (output: any, context: __SerdeContext): KmsKeyToGrant => { - return { - KmsKeyArn: __expectString(output.KmsKeyArn), - } as any; -}; +// de_KmsKeyToGrant omitted. -/** - * deserializeAws_restJson1LakeFormationDataPermissionAsset - */ -const de_LakeFormationDataPermissionAsset = ( - output: any, - context: __SerdeContext -): LakeFormationDataPermissionAsset => { - return { - LakeFormationDataPermissionDetails: - output.LakeFormationDataPermissionDetails != null - ? de_LakeFormationDataPermissionDetails(output.LakeFormationDataPermissionDetails, context) - : undefined, - LakeFormationDataPermissionType: __expectString(output.LakeFormationDataPermissionType), - Permissions: output.Permissions != null ? de_ListOfLFPermissions(output.Permissions, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_LakeFormationDataPermissionAsset omitted. -/** - * deserializeAws_restJson1LakeFormationDataPermissionDetails - */ -const de_LakeFormationDataPermissionDetails = ( - output: any, - context: __SerdeContext -): LakeFormationDataPermissionDetails => { - return { - LFTagPolicy: output.LFTagPolicy != null ? de_LFTagPolicyDetails(output.LFTagPolicy, context) : undefined, - } as any; -}; +// de_LakeFormationDataPermissionDetails omitted. -/** - * deserializeAws_restJson1LFResourceDetails - */ -const de_LFResourceDetails = (output: any, context: __SerdeContext): LFResourceDetails => { - return { - Database: output.Database != null ? de_DatabaseLFTagPolicy(output.Database, context) : undefined, - Table: output.Table != null ? de_TableLFTagPolicy(output.Table, context) : undefined, - } as any; -}; +// de_LFResourceDetails omitted. -/** - * deserializeAws_restJson1LFTag - */ -const de_LFTag = (output: any, context: __SerdeContext): LFTag => { - return { - TagKey: __expectString(output.TagKey), - TagValues: output.TagValues != null ? de_ListOfLFTagValues(output.TagValues, context) : undefined, - } as any; -}; +// de_LFTag omitted. -/** - * deserializeAws_restJson1LFTagPolicyDetails - */ -const de_LFTagPolicyDetails = (output: any, context: __SerdeContext): LFTagPolicyDetails => { - return { - CatalogId: __expectString(output.CatalogId), - ResourceDetails: output.ResourceDetails != null ? de_LFResourceDetails(output.ResourceDetails, context) : undefined, - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_LFTagPolicyDetails omitted. -/** - * deserializeAws_restJson1ListOf__string - */ -const de_ListOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOf__string omitted. -/** - * deserializeAws_restJson1ListOfAssetDestinationEntry - */ -const de_ListOfAssetDestinationEntry = (output: any, context: __SerdeContext): AssetDestinationEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetDestinationEntry(entry, context); - }); - return retVal; -}; +// de_ListOfAssetDestinationEntry omitted. /** * deserializeAws_restJson1ListOfAssetEntry @@ -4116,46 +3141,14 @@ const de_ListOfAssetEntry = (output: any, context: __SerdeContext): AssetEntry[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssetEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfAssetSourceEntry - */ -const de_ListOfAssetSourceEntry = (output: any, context: __SerdeContext): AssetSourceEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetSourceEntry(entry, context); - }); - return retVal; -}; +// de_ListOfAssetSourceEntry omitted. -/** - * deserializeAws_restJson1ListOfDatabaseLFTagPolicyPermissions - */ -const de_ListOfDatabaseLFTagPolicyPermissions = ( - output: any, - context: __SerdeContext -): (DatabaseLFTagPolicyPermission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfDatabaseLFTagPolicyPermissions omitted. /** * deserializeAws_restJson1ListOfDataSetEntry @@ -4164,9 +3157,6 @@ const de_ListOfDataSetEntry = (output: any, context: __SerdeContext): DataSetEnt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataSetEntry(entry, context); }); return retVal; @@ -4179,9 +3169,6 @@ const de_ListOfEventActionEntry = (output: any, context: __SerdeContext): EventA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventActionEntry(entry, context); }); return retVal; @@ -4194,9 +3181,6 @@ const de_ListOfJobEntry = (output: any, context: __SerdeContext): JobEntry[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobEntry(entry, context); }); return retVal; @@ -4209,106 +3193,22 @@ const de_ListOfJobError = (output: any, context: __SerdeContext): JobError[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobError(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfKmsKeysToGrant - */ -const de_ListOfKmsKeysToGrant = (output: any, context: __SerdeContext): KmsKeyToGrant[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KmsKeyToGrant(entry, context); - }); - return retVal; -}; +// de_ListOfKmsKeysToGrant omitted. -/** - * deserializeAws_restJson1ListOfLFPermissions - */ -const de_ListOfLFPermissions = (output: any, context: __SerdeContext): (LFPermission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfLFPermissions omitted. -/** - * deserializeAws_restJson1ListOfLFTags - */ -const de_ListOfLFTags = (output: any, context: __SerdeContext): LFTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LFTag(entry, context); - }); - return retVal; -}; +// de_ListOfLFTags omitted. -/** - * deserializeAws_restJson1ListOfLFTagValues - */ -const de_ListOfLFTagValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfLFTagValues omitted. -/** - * deserializeAws_restJson1ListOfRedshiftDataShareAssetSourceEntry - */ -const de_ListOfRedshiftDataShareAssetSourceEntry = ( - output: any, - context: __SerdeContext -): RedshiftDataShareAssetSourceEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RedshiftDataShareAssetSourceEntry(entry, context); - }); - return retVal; -}; +// de_ListOfRedshiftDataShareAssetSourceEntry omitted. -/** - * deserializeAws_restJson1ListOfRevisionDestinationEntry - */ -const de_ListOfRevisionDestinationEntry = (output: any, context: __SerdeContext): RevisionDestinationEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RevisionDestinationEntry(entry, context); - }); - return retVal; -}; +// de_ListOfRevisionDestinationEntry omitted. /** * deserializeAws_restJson1ListOfRevisionEntry @@ -4317,218 +3217,77 @@ const de_ListOfRevisionEntry = (output: any, context: __SerdeContext): RevisionE const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RevisionEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfTableTagPolicyLFPermissions - */ -const de_ListOfTableTagPolicyLFPermissions = ( - output: any, - context: __SerdeContext -): (TableTagPolicyLFPermission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfTableTagPolicyLFPermissions omitted. -/** - * deserializeAws_restJson1MapOf__string - */ -const de_MapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MapOf__string omitted. -/** - * deserializeAws_restJson1OriginDetails - */ -const de_OriginDetails = (output: any, context: __SerdeContext): OriginDetails => { - return { - ProductId: __expectString(output.ProductId), - } as any; -}; +// de_OriginDetails omitted. -/** - * deserializeAws_restJson1RedshiftDataShareAsset - */ -const de_RedshiftDataShareAsset = (output: any, context: __SerdeContext): RedshiftDataShareAsset => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_RedshiftDataShareAsset omitted. -/** - * deserializeAws_restJson1RedshiftDataShareAssetSourceEntry - */ -const de_RedshiftDataShareAssetSourceEntry = ( - output: any, - context: __SerdeContext -): RedshiftDataShareAssetSourceEntry => { - return { - DataShareArn: __expectString(output.DataShareArn), - } as any; -}; +// de_RedshiftDataShareAssetSourceEntry omitted. /** * deserializeAws_restJson1ResponseDetails */ const de_ResponseDetails = (output: any, context: __SerdeContext): ResponseDetails => { - return { - CreateS3DataAccessFromS3Bucket: - output.CreateS3DataAccessFromS3Bucket != null - ? de_CreateS3DataAccessFromS3BucketResponseDetails(output.CreateS3DataAccessFromS3Bucket, context) - : undefined, - ExportAssetToSignedUrl: - output.ExportAssetToSignedUrl != null - ? de_ExportAssetToSignedUrlResponseDetails(output.ExportAssetToSignedUrl, context) - : undefined, - ExportAssetsToS3: - output.ExportAssetsToS3 != null - ? de_ExportAssetsToS3ResponseDetails(output.ExportAssetsToS3, context) - : undefined, - ExportRevisionsToS3: - output.ExportRevisionsToS3 != null - ? de_ExportRevisionsToS3ResponseDetails(output.ExportRevisionsToS3, context) - : undefined, - ImportAssetFromApiGatewayApi: - output.ImportAssetFromApiGatewayApi != null - ? de_ImportAssetFromApiGatewayApiResponseDetails(output.ImportAssetFromApiGatewayApi, context) - : undefined, - ImportAssetFromSignedUrl: - output.ImportAssetFromSignedUrl != null - ? de_ImportAssetFromSignedUrlResponseDetails(output.ImportAssetFromSignedUrl, context) - : undefined, - ImportAssetsFromLakeFormationTagPolicy: - output.ImportAssetsFromLakeFormationTagPolicy != null - ? de_ImportAssetsFromLakeFormationTagPolicyResponseDetails( - output.ImportAssetsFromLakeFormationTagPolicy, - context - ) - : undefined, - ImportAssetsFromRedshiftDataShares: - output.ImportAssetsFromRedshiftDataShares != null - ? de_ImportAssetsFromRedshiftDataSharesResponseDetails(output.ImportAssetsFromRedshiftDataShares, context) - : undefined, - ImportAssetsFromS3: - output.ImportAssetsFromS3 != null - ? de_ImportAssetsFromS3ResponseDetails(output.ImportAssetsFromS3, context) - : undefined, - } as any; + return take(output, { + CreateS3DataAccessFromS3Bucket: _json, + ExportAssetToSignedUrl: (_: any) => de_ExportAssetToSignedUrlResponseDetails(_, context), + ExportAssetsToS3: _json, + ExportRevisionsToS3: _json, + ImportAssetFromApiGatewayApi: (_: any) => de_ImportAssetFromApiGatewayApiResponseDetails(_, context), + ImportAssetFromSignedUrl: (_: any) => de_ImportAssetFromSignedUrlResponseDetails(_, context), + ImportAssetsFromLakeFormationTagPolicy: _json, + ImportAssetsFromRedshiftDataShares: _json, + ImportAssetsFromS3: _json, + }) as any; }; -/** - * deserializeAws_restJson1RevisionDestinationEntry - */ -const de_RevisionDestinationEntry = (output: any, context: __SerdeContext): RevisionDestinationEntry => { - return { - Bucket: __expectString(output.Bucket), - KeyPattern: __expectString(output.KeyPattern), - RevisionId: __expectString(output.RevisionId), - } as any; -}; +// de_RevisionDestinationEntry omitted. /** * deserializeAws_restJson1RevisionEntry */ const de_RevisionEntry = (output: any, context: __SerdeContext): RevisionEntry => { - return { - Arn: __expectString(output.Arn), - Comment: __expectString(output.Comment), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined, - DataSetId: __expectString(output.DataSetId), - Finalized: __expectBoolean(output.Finalized), - Id: __expectString(output.Id), - RevocationComment: __expectString(output.RevocationComment), - Revoked: __expectBoolean(output.Revoked), - RevokedAt: - output.RevokedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.RevokedAt)) : undefined, - SourceId: __expectString(output.SourceId), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - } as any; + return take(output, { + Arn: __expectString, + Comment: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSetId: __expectString, + Finalized: __expectBoolean, + Id: __expectString, + RevocationComment: __expectString, + Revoked: __expectBoolean, + RevokedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SourceId: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1RevisionPublished - */ -const de_RevisionPublished = (output: any, context: __SerdeContext): RevisionPublished => { - return { - DataSetId: __expectString(output.DataSetId), - } as any; -}; +// de_RevisionPublished omitted. -/** - * deserializeAws_restJson1S3DataAccessAsset - */ -const de_S3DataAccessAsset = (output: any, context: __SerdeContext): S3DataAccessAsset => { - return { - Bucket: __expectString(output.Bucket), - KeyPrefixes: output.KeyPrefixes != null ? de_ListOf__string(output.KeyPrefixes, context) : undefined, - Keys: output.Keys != null ? de_ListOf__string(output.Keys, context) : undefined, - KmsKeysToGrant: output.KmsKeysToGrant != null ? de_ListOfKmsKeysToGrant(output.KmsKeysToGrant, context) : undefined, - S3AccessPointAlias: __expectString(output.S3AccessPointAlias), - S3AccessPointArn: __expectString(output.S3AccessPointArn), - } as any; -}; +// de_S3DataAccessAsset omitted. -/** - * deserializeAws_restJson1S3DataAccessAssetSourceEntry - */ -const de_S3DataAccessAssetSourceEntry = (output: any, context: __SerdeContext): S3DataAccessAssetSourceEntry => { - return { - Bucket: __expectString(output.Bucket), - KeyPrefixes: output.KeyPrefixes != null ? de_ListOf__string(output.KeyPrefixes, context) : undefined, - Keys: output.Keys != null ? de_ListOf__string(output.Keys, context) : undefined, - KmsKeysToGrant: output.KmsKeysToGrant != null ? de_ListOfKmsKeysToGrant(output.KmsKeysToGrant, context) : undefined, - } as any; -}; +// de_S3DataAccessAssetSourceEntry omitted. /** * deserializeAws_restJson1S3SnapshotAsset */ const de_S3SnapshotAsset = (output: any, context: __SerdeContext): S3SnapshotAsset => { - return { - Size: __limitedParseDouble(output.Size), - } as any; + return take(output, { + Size: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1TableLFTagPolicy - */ -const de_TableLFTagPolicy = (output: any, context: __SerdeContext): TableLFTagPolicy => { - return { - Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined, - } as any; -}; +// de_TableLFTagPolicy omitted. -/** - * deserializeAws_restJson1TableLFTagPolicyAndPermissions - */ -const de_TableLFTagPolicyAndPermissions = (output: any, context: __SerdeContext): TableLFTagPolicyAndPermissions => { - return { - Expression: output.Expression != null ? de_ListOfLFTags(output.Expression, context) : undefined, - Permissions: - output.Permissions != null ? de_ListOfTableTagPolicyLFPermissions(output.Permissions, context) : undefined, - } as any; -}; +// de_TableLFTagPolicyAndPermissions omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-datasync/src/protocols/Aws_json1_1.ts b/clients/client-datasync/src/protocols/Aws_json1_1.ts index 05fdc751571b..28440028f616 100644 --- a/clients/client-datasync/src/protocols/Aws_json1_1.ts +++ b/clients/client-datasync/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -120,39 +122,22 @@ import { } from "../commands/UpdateTaskExecutionCommand"; import { DataSyncServiceException as __BaseException } from "../models/DataSyncServiceException"; import { - AgentListEntry, CancelTaskExecutionRequest, - CancelTaskExecutionResponse, CreateAgentRequest, - CreateAgentResponse, CreateLocationEfsRequest, - CreateLocationEfsResponse, CreateLocationFsxLustreRequest, - CreateLocationFsxLustreResponse, CreateLocationFsxOntapRequest, - CreateLocationFsxOntapResponse, CreateLocationFsxOpenZfsRequest, - CreateLocationFsxOpenZfsResponse, CreateLocationFsxWindowsRequest, - CreateLocationFsxWindowsResponse, CreateLocationHdfsRequest, - CreateLocationHdfsResponse, CreateLocationNfsRequest, - CreateLocationNfsResponse, CreateLocationObjectStorageRequest, - CreateLocationObjectStorageResponse, CreateLocationS3Request, - CreateLocationS3Response, CreateLocationSmbRequest, - CreateLocationSmbResponse, CreateTaskRequest, - CreateTaskResponse, DeleteAgentRequest, - DeleteAgentResponse, DeleteLocationRequest, - DeleteLocationResponse, DeleteTaskRequest, - DeleteTaskResponse, DescribeAgentRequest, DescribeAgentResponse, DescribeLocationEfsRequest, @@ -188,50 +173,30 @@ import { InternalException, InvalidRequestException, ListAgentsRequest, - ListAgentsResponse, ListLocationsRequest, - ListLocationsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTaskExecutionsRequest, - ListTaskExecutionsResponse, ListTasksRequest, - ListTasksResponse, LocationFilter, - LocationListEntry, NfsMountOptions, OnPremConfig, Options, - PrivateLinkConfig, QopConfiguration, S3Config, SmbMountOptions, StartTaskExecutionRequest, - StartTaskExecutionResponse, TagListEntry, TagResourceRequest, - TagResourceResponse, - TaskExecutionListEntry, - TaskExecutionResultDetail, TaskFilter, - TaskListEntry, TaskSchedule, UntagResourceRequest, - UntagResourceResponse, UpdateAgentRequest, - UpdateAgentResponse, UpdateLocationHdfsRequest, - UpdateLocationHdfsResponse, UpdateLocationNfsRequest, - UpdateLocationNfsResponse, UpdateLocationObjectStorageRequest, - UpdateLocationObjectStorageResponse, UpdateLocationSmbRequest, - UpdateLocationSmbResponse, UpdateTaskExecutionRequest, - UpdateTaskExecutionResponse, UpdateTaskRequest, - UpdateTaskResponse, } from "../models/models_0"; /** @@ -243,7 +208,7 @@ export const se_CancelTaskExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelTaskExecution"); let body: any; - body = JSON.stringify(se_CancelTaskExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -256,7 +221,7 @@ export const se_CreateAgentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAgent"); let body: any; - body = JSON.stringify(se_CreateAgentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -269,7 +234,7 @@ export const se_CreateLocationEfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationEfs"); let body: any; - body = JSON.stringify(se_CreateLocationEfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -282,7 +247,7 @@ export const se_CreateLocationFsxLustreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationFsxLustre"); let body: any; - body = JSON.stringify(se_CreateLocationFsxLustreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -295,7 +260,7 @@ export const se_CreateLocationFsxOntapCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationFsxOntap"); let body: any; - body = JSON.stringify(se_CreateLocationFsxOntapRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -308,7 +273,7 @@ export const se_CreateLocationFsxOpenZfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationFsxOpenZfs"); let body: any; - body = JSON.stringify(se_CreateLocationFsxOpenZfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -321,7 +286,7 @@ export const se_CreateLocationFsxWindowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationFsxWindows"); let body: any; - body = JSON.stringify(se_CreateLocationFsxWindowsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -347,7 +312,7 @@ export const se_CreateLocationNfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationNfs"); let body: any; - body = JSON.stringify(se_CreateLocationNfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -373,7 +338,7 @@ export const se_CreateLocationS3Command = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationS3"); let body: any; - body = JSON.stringify(se_CreateLocationS3Request(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,7 +351,7 @@ export const se_CreateLocationSmbCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocationSmb"); let body: any; - body = JSON.stringify(se_CreateLocationSmbRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -399,7 +364,7 @@ export const se_CreateTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTask"); let body: any; - body = JSON.stringify(se_CreateTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -412,7 +377,7 @@ export const se_DeleteAgentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAgent"); let body: any; - body = JSON.stringify(se_DeleteAgentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,7 +390,7 @@ export const se_DeleteLocationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLocation"); let body: any; - body = JSON.stringify(se_DeleteLocationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -438,7 +403,7 @@ export const se_DeleteTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTask"); let body: any; - body = JSON.stringify(se_DeleteTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -451,7 +416,7 @@ export const se_DescribeAgentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAgent"); let body: any; - body = JSON.stringify(se_DescribeAgentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -464,7 +429,7 @@ export const se_DescribeLocationEfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationEfs"); let body: any; - body = JSON.stringify(se_DescribeLocationEfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -477,7 +442,7 @@ export const se_DescribeLocationFsxLustreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationFsxLustre"); let body: any; - body = JSON.stringify(se_DescribeLocationFsxLustreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -490,7 +455,7 @@ export const se_DescribeLocationFsxOntapCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationFsxOntap"); let body: any; - body = JSON.stringify(se_DescribeLocationFsxOntapRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -503,7 +468,7 @@ export const se_DescribeLocationFsxOpenZfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationFsxOpenZfs"); let body: any; - body = JSON.stringify(se_DescribeLocationFsxOpenZfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,7 +481,7 @@ export const se_DescribeLocationFsxWindowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationFsxWindows"); let body: any; - body = JSON.stringify(se_DescribeLocationFsxWindowsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -529,7 +494,7 @@ export const se_DescribeLocationHdfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationHdfs"); let body: any; - body = JSON.stringify(se_DescribeLocationHdfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -542,7 +507,7 @@ export const se_DescribeLocationNfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationNfs"); let body: any; - body = JSON.stringify(se_DescribeLocationNfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -555,7 +520,7 @@ export const se_DescribeLocationObjectStorageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationObjectStorage"); let body: any; - body = JSON.stringify(se_DescribeLocationObjectStorageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -568,7 +533,7 @@ export const se_DescribeLocationS3Command = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationS3"); let body: any; - body = JSON.stringify(se_DescribeLocationS3Request(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +546,7 @@ export const se_DescribeLocationSmbCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLocationSmb"); let body: any; - body = JSON.stringify(se_DescribeLocationSmbRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +559,7 @@ export const se_DescribeTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTask"); let body: any; - body = JSON.stringify(se_DescribeTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +572,7 @@ export const se_DescribeTaskExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTaskExecution"); let body: any; - body = JSON.stringify(se_DescribeTaskExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +585,7 @@ export const se_ListAgentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAgents"); let body: any; - body = JSON.stringify(se_ListAgentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -633,7 +598,7 @@ export const se_ListLocationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLocations"); let body: any; - body = JSON.stringify(se_ListLocationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +611,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +624,7 @@ export const se_ListTaskExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTaskExecutions"); let body: any; - body = JSON.stringify(se_ListTaskExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -672,7 +637,7 @@ export const se_ListTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTasks"); let body: any; - body = JSON.stringify(se_ListTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +650,7 @@ export const se_StartTaskExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartTaskExecution"); let body: any; - body = JSON.stringify(se_StartTaskExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +663,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +676,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +689,7 @@ export const se_UpdateAgentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAgent"); let body: any; - body = JSON.stringify(se_UpdateAgentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +715,7 @@ export const se_UpdateLocationNfsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLocationNfs"); let body: any; - body = JSON.stringify(se_UpdateLocationNfsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -776,7 +741,7 @@ export const se_UpdateLocationSmbCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLocationSmb"); let body: any; - body = JSON.stringify(se_UpdateLocationSmbRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +754,7 @@ export const se_UpdateTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTask"); let body: any; - body = JSON.stringify(se_UpdateTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +767,7 @@ export const se_UpdateTaskExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTaskExecution"); let body: any; - body = JSON.stringify(se_UpdateTaskExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -818,12 +783,12 @@ export const de_CancelTaskExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelTaskExecutionResponse(data, context); + contents = _json(data); const response: CancelTaskExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -847,10 +812,9 @@ const de_CancelTaskExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -868,12 +832,12 @@ export const de_CreateAgentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAgentResponse(data, context); + contents = _json(data); const response: CreateAgentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -897,10 +861,9 @@ const de_CreateAgentCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -918,12 +881,12 @@ export const de_CreateLocationEfsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationEfsResponse(data, context); + contents = _json(data); const response: CreateLocationEfsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -947,10 +910,9 @@ const de_CreateLocationEfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -968,12 +930,12 @@ export const de_CreateLocationFsxLustreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationFsxLustreResponse(data, context); + contents = _json(data); const response: CreateLocationFsxLustreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -997,10 +959,9 @@ const de_CreateLocationFsxLustreCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1018,12 +979,12 @@ export const de_CreateLocationFsxOntapCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationFsxOntapResponse(data, context); + contents = _json(data); const response: CreateLocationFsxOntapCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1047,10 +1008,9 @@ const de_CreateLocationFsxOntapCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1068,12 +1028,12 @@ export const de_CreateLocationFsxOpenZfsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationFsxOpenZfsResponse(data, context); + contents = _json(data); const response: CreateLocationFsxOpenZfsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1097,10 +1057,9 @@ const de_CreateLocationFsxOpenZfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1118,12 +1077,12 @@ export const de_CreateLocationFsxWindowsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationFsxWindowsResponse(data, context); + contents = _json(data); const response: CreateLocationFsxWindowsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1147,10 +1106,9 @@ const de_CreateLocationFsxWindowsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1168,12 +1126,12 @@ export const de_CreateLocationHdfsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationHdfsResponse(data, context); + contents = _json(data); const response: CreateLocationHdfsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1197,10 +1155,9 @@ const de_CreateLocationHdfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1218,12 +1175,12 @@ export const de_CreateLocationNfsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationNfsResponse(data, context); + contents = _json(data); const response: CreateLocationNfsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1247,10 +1204,9 @@ const de_CreateLocationNfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1268,12 +1224,12 @@ export const de_CreateLocationObjectStorageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationObjectStorageResponse(data, context); + contents = _json(data); const response: CreateLocationObjectStorageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1297,10 +1253,9 @@ const de_CreateLocationObjectStorageCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1318,12 +1273,12 @@ export const de_CreateLocationS3Command = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationS3Response(data, context); + contents = _json(data); const response: CreateLocationS3CommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1347,10 +1302,9 @@ const de_CreateLocationS3CommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1368,12 +1322,12 @@ export const de_CreateLocationSmbCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationSmbResponse(data, context); + contents = _json(data); const response: CreateLocationSmbCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1397,10 +1351,9 @@ const de_CreateLocationSmbCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1418,12 +1371,12 @@ export const de_CreateTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTaskResponse(data, context); + contents = _json(data); const response: CreateTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1447,10 +1400,9 @@ const de_CreateTaskCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1468,12 +1420,12 @@ export const de_DeleteAgentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAgentResponse(data, context); + contents = _json(data); const response: DeleteAgentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1497,10 +1449,9 @@ const de_DeleteAgentCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1518,12 +1469,12 @@ export const de_DeleteLocationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLocationResponse(data, context); + contents = _json(data); const response: DeleteLocationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1547,10 +1498,9 @@ const de_DeleteLocationCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1568,12 +1518,12 @@ export const de_DeleteTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTaskResponse(data, context); + contents = _json(data); const response: DeleteTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1597,10 +1547,9 @@ const de_DeleteTaskCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1623,7 +1572,7 @@ export const de_DescribeAgentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1647,10 +1596,9 @@ const de_DescribeAgentCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1673,7 +1621,7 @@ export const de_DescribeLocationEfsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1697,10 +1645,9 @@ const de_DescribeLocationEfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1723,7 +1670,7 @@ export const de_DescribeLocationFsxLustreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1747,10 +1694,9 @@ const de_DescribeLocationFsxLustreCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1773,7 +1719,7 @@ export const de_DescribeLocationFsxOntapCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1797,10 +1743,9 @@ const de_DescribeLocationFsxOntapCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1823,7 +1768,7 @@ export const de_DescribeLocationFsxOpenZfsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1847,10 +1792,9 @@ const de_DescribeLocationFsxOpenZfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1873,7 +1817,7 @@ export const de_DescribeLocationFsxWindowsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1897,10 +1841,9 @@ const de_DescribeLocationFsxWindowsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1923,7 +1866,7 @@ export const de_DescribeLocationHdfsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1947,10 +1890,9 @@ const de_DescribeLocationHdfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1973,7 +1915,7 @@ export const de_DescribeLocationNfsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1997,10 +1939,9 @@ const de_DescribeLocationNfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,7 +1964,7 @@ export const de_DescribeLocationObjectStorageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2047,10 +1988,9 @@ const de_DescribeLocationObjectStorageCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2073,7 +2013,7 @@ export const de_DescribeLocationS3Command = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2097,10 +2037,9 @@ const de_DescribeLocationS3CommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2123,7 +2062,7 @@ export const de_DescribeLocationSmbCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2147,10 +2086,9 @@ const de_DescribeLocationSmbCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2173,7 +2111,7 @@ export const de_DescribeTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2197,10 +2135,9 @@ const de_DescribeTaskCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2223,7 +2160,7 @@ export const de_DescribeTaskExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2247,10 +2184,9 @@ const de_DescribeTaskExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2268,12 +2204,12 @@ export const de_ListAgentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAgentsResponse(data, context); + contents = _json(data); const response: ListAgentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2297,10 +2233,9 @@ const de_ListAgentsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2318,12 +2253,12 @@ export const de_ListLocationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLocationsResponse(data, context); + contents = _json(data); const response: ListLocationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2347,10 +2282,9 @@ const de_ListLocationsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2368,12 +2302,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2397,10 +2331,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2418,12 +2351,12 @@ export const de_ListTaskExecutionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTaskExecutionsResponse(data, context); + contents = _json(data); const response: ListTaskExecutionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2447,10 +2380,9 @@ const de_ListTaskExecutionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2468,12 +2400,12 @@ export const de_ListTasksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTasksResponse(data, context); + contents = _json(data); const response: ListTasksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2497,10 +2429,9 @@ const de_ListTasksCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2518,12 +2449,12 @@ export const de_StartTaskExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartTaskExecutionResponse(data, context); + contents = _json(data); const response: StartTaskExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2547,10 +2478,9 @@ const de_StartTaskExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2568,12 +2498,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2597,10 +2527,9 @@ const de_TagResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,12 +2547,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2647,10 +2576,9 @@ const de_UntagResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2668,12 +2596,12 @@ export const de_UpdateAgentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAgentResponse(data, context); + contents = _json(data); const response: UpdateAgentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2697,10 +2625,9 @@ const de_UpdateAgentCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2718,12 +2645,12 @@ export const de_UpdateLocationHdfsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLocationHdfsResponse(data, context); + contents = _json(data); const response: UpdateLocationHdfsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2747,10 +2674,9 @@ const de_UpdateLocationHdfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2768,12 +2694,12 @@ export const de_UpdateLocationNfsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLocationNfsResponse(data, context); + contents = _json(data); const response: UpdateLocationNfsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2797,10 +2723,9 @@ const de_UpdateLocationNfsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2818,12 +2743,12 @@ export const de_UpdateLocationObjectStorageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLocationObjectStorageResponse(data, context); + contents = _json(data); const response: UpdateLocationObjectStorageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2847,10 +2772,9 @@ const de_UpdateLocationObjectStorageCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2868,12 +2792,12 @@ export const de_UpdateLocationSmbCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLocationSmbResponse(data, context); + contents = _json(data); const response: UpdateLocationSmbCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2897,10 +2821,9 @@ const de_UpdateLocationSmbCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2918,12 +2841,12 @@ export const de_UpdateTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTaskResponse(data, context); + contents = _json(data); const response: UpdateTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2947,10 +2870,9 @@ const de_UpdateTaskCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2968,12 +2890,12 @@ export const de_UpdateTaskExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTaskExecutionResponse(data, context); + contents = _json(data); const response: UpdateTaskExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2997,10 +2919,9 @@ const de_UpdateTaskExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3011,7 +2932,7 @@ const de_UpdateTaskExecutionCommandError = async ( */ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalException(body, context); + const deserialized: any = _json(body); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3027,7 +2948,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3035,151 +2956,44 @@ const de_InvalidRequestExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AgentArnList - */ -const se_AgentArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentArnList omitted. -/** - * serializeAws_json1_1CancelTaskExecutionRequest - */ -const se_CancelTaskExecutionRequest = (input: CancelTaskExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.TaskExecutionArn != null && { TaskExecutionArn: input.TaskExecutionArn }), - }; -}; +// se_CancelTaskExecutionRequest omitted. -/** - * serializeAws_json1_1CreateAgentRequest - */ -const se_CreateAgentRequest = (input: CreateAgentRequest, context: __SerdeContext): any => { - return { - ...(input.ActivationKey != null && { ActivationKey: input.ActivationKey }), - ...(input.AgentName != null && { AgentName: input.AgentName }), - ...(input.SecurityGroupArns != null && { - SecurityGroupArns: se_PLSecurityGroupArnList(input.SecurityGroupArns, context), - }), - ...(input.SubnetArns != null && { SubnetArns: se_PLSubnetArnList(input.SubnetArns, context) }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }), - }; -}; +// se_CreateAgentRequest omitted. -/** - * serializeAws_json1_1CreateLocationEfsRequest - */ -const se_CreateLocationEfsRequest = (input: CreateLocationEfsRequest, context: __SerdeContext): any => { - return { - ...(input.AccessPointArn != null && { AccessPointArn: input.AccessPointArn }), - ...(input.Ec2Config != null && { Ec2Config: se_Ec2Config(input.Ec2Config, context) }), - ...(input.EfsFilesystemArn != null && { EfsFilesystemArn: input.EfsFilesystemArn }), - ...(input.FileSystemAccessRoleArn != null && { FileSystemAccessRoleArn: input.FileSystemAccessRoleArn }), - ...(input.InTransitEncryption != null && { InTransitEncryption: input.InTransitEncryption }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; +// se_CreateLocationEfsRequest omitted. -/** - * serializeAws_json1_1CreateLocationFsxLustreRequest - */ -const se_CreateLocationFsxLustreRequest = (input: CreateLocationFsxLustreRequest, context: __SerdeContext): any => { - return { - ...(input.FsxFilesystemArn != null && { FsxFilesystemArn: input.FsxFilesystemArn }), - ...(input.SecurityGroupArns != null && { - SecurityGroupArns: se_Ec2SecurityGroupArnList(input.SecurityGroupArns, context), - }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; +// se_CreateLocationFsxLustreRequest omitted. -/** - * serializeAws_json1_1CreateLocationFsxOntapRequest - */ -const se_CreateLocationFsxOntapRequest = (input: CreateLocationFsxOntapRequest, context: __SerdeContext): any => { - return { - ...(input.Protocol != null && { Protocol: se_FsxProtocol(input.Protocol, context) }), - ...(input.SecurityGroupArns != null && { - SecurityGroupArns: se_Ec2SecurityGroupArnList(input.SecurityGroupArns, context), - }), - ...(input.StorageVirtualMachineArn != null && { StorageVirtualMachineArn: input.StorageVirtualMachineArn }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; +// se_CreateLocationFsxOntapRequest omitted. -/** - * serializeAws_json1_1CreateLocationFsxOpenZfsRequest - */ -const se_CreateLocationFsxOpenZfsRequest = (input: CreateLocationFsxOpenZfsRequest, context: __SerdeContext): any => { - return { - ...(input.FsxFilesystemArn != null && { FsxFilesystemArn: input.FsxFilesystemArn }), - ...(input.Protocol != null && { Protocol: se_FsxProtocol(input.Protocol, context) }), - ...(input.SecurityGroupArns != null && { - SecurityGroupArns: se_Ec2SecurityGroupArnList(input.SecurityGroupArns, context), - }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; +// se_CreateLocationFsxOpenZfsRequest omitted. -/** - * serializeAws_json1_1CreateLocationFsxWindowsRequest - */ -const se_CreateLocationFsxWindowsRequest = (input: CreateLocationFsxWindowsRequest, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.FsxFilesystemArn != null && { FsxFilesystemArn: input.FsxFilesystemArn }), - ...(input.Password != null && { Password: input.Password }), - ...(input.SecurityGroupArns != null && { - SecurityGroupArns: se_Ec2SecurityGroupArnList(input.SecurityGroupArns, context), - }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - ...(input.User != null && { User: input.User }), - }; -}; +// se_CreateLocationFsxWindowsRequest omitted. /** * serializeAws_json1_1CreateLocationHdfsRequest */ const se_CreateLocationHdfsRequest = (input: CreateLocationHdfsRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.BlockSize != null && { BlockSize: input.BlockSize }), - ...(input.KerberosKeytab != null && { KerberosKeytab: context.base64Encoder(input.KerberosKeytab) }), - ...(input.KerberosKrb5Conf != null && { KerberosKrb5Conf: context.base64Encoder(input.KerberosKrb5Conf) }), - ...(input.KerberosPrincipal != null && { KerberosPrincipal: input.KerberosPrincipal }), - ...(input.KmsKeyProviderUri != null && { KmsKeyProviderUri: input.KmsKeyProviderUri }), - ...(input.NameNodes != null && { NameNodes: se_HdfsNameNodeList(input.NameNodes, context) }), - ...(input.QopConfiguration != null && { QopConfiguration: se_QopConfiguration(input.QopConfiguration, context) }), - ...(input.ReplicationFactor != null && { ReplicationFactor: input.ReplicationFactor }), - ...(input.SimpleUser != null && { SimpleUser: input.SimpleUser }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; + return take(input, { + AgentArns: _json, + AuthenticationType: [], + BlockSize: [], + KerberosKeytab: context.base64Encoder, + KerberosKrb5Conf: context.base64Encoder, + KerberosPrincipal: [], + KmsKeyProviderUri: [], + NameNodes: _json, + QopConfiguration: _json, + ReplicationFactor: [], + SimpleUser: [], + Subdirectory: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateLocationNfsRequest - */ -const se_CreateLocationNfsRequest = (input: CreateLocationNfsRequest, context: __SerdeContext): any => { - return { - ...(input.MountOptions != null && { MountOptions: se_NfsMountOptions(input.MountOptions, context) }), - ...(input.OnPremConfig != null && { OnPremConfig: se_OnPremConfig(input.OnPremConfig, context) }), - ...(input.ServerHostname != null && { ServerHostname: input.ServerHostname }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; +// se_CreateLocationNfsRequest omitted. /** * serializeAws_json1_1CreateLocationObjectStorageRequest @@ -3188,918 +3002,242 @@ const se_CreateLocationObjectStorageRequest = ( input: CreateLocationObjectStorageRequest, context: __SerdeContext ): any => { - return { - ...(input.AccessKey != null && { AccessKey: input.AccessKey }), - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.SecretKey != null && { SecretKey: input.SecretKey }), - ...(input.ServerCertificate != null && { ServerCertificate: context.base64Encoder(input.ServerCertificate) }), - ...(input.ServerHostname != null && { ServerHostname: input.ServerHostname }), - ...(input.ServerPort != null && { ServerPort: input.ServerPort }), - ...(input.ServerProtocol != null && { ServerProtocol: input.ServerProtocol }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateLocationS3Request - */ -const se_CreateLocationS3Request = (input: CreateLocationS3Request, context: __SerdeContext): any => { - return { - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.S3BucketArn != null && { S3BucketArn: input.S3BucketArn }), - ...(input.S3Config != null && { S3Config: se_S3Config(input.S3Config, context) }), - ...(input.S3StorageClass != null && { S3StorageClass: input.S3StorageClass }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateLocationSmbRequest - */ -const se_CreateLocationSmbRequest = (input: CreateLocationSmbRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.MountOptions != null && { MountOptions: se_SmbMountOptions(input.MountOptions, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.ServerHostname != null && { ServerHostname: input.ServerHostname }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - ...(input.User != null && { User: input.User }), - }; -}; - -/** - * serializeAws_json1_1CreateTaskRequest - */ -const se_CreateTaskRequest = (input: CreateTaskRequest, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogGroupArn != null && { CloudWatchLogGroupArn: input.CloudWatchLogGroupArn }), - ...(input.DestinationLocationArn != null && { DestinationLocationArn: input.DestinationLocationArn }), - ...(input.Excludes != null && { Excludes: se_FilterList(input.Excludes, context) }), - ...(input.Includes != null && { Includes: se_FilterList(input.Includes, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Options != null && { Options: se_Options(input.Options, context) }), - ...(input.Schedule != null && { Schedule: se_TaskSchedule(input.Schedule, context) }), - ...(input.SourceLocationArn != null && { SourceLocationArn: input.SourceLocationArn }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteAgentRequest - */ -const se_DeleteAgentRequest = (input: DeleteAgentRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArn != null && { AgentArn: input.AgentArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteLocationRequest - */ -const se_DeleteLocationRequest = (input: DeleteLocationRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteTaskRequest - */ -const se_DeleteTaskRequest = (input: DeleteTaskRequest, context: __SerdeContext): any => { - return { - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeAgentRequest - */ -const se_DescribeAgentRequest = (input: DescribeAgentRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArn != null && { AgentArn: input.AgentArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeLocationEfsRequest - */ -const se_DescribeLocationEfsRequest = (input: DescribeLocationEfsRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeLocationFsxLustreRequest - */ -const se_DescribeLocationFsxLustreRequest = (input: DescribeLocationFsxLustreRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeLocationFsxOntapRequest - */ -const se_DescribeLocationFsxOntapRequest = (input: DescribeLocationFsxOntapRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeLocationFsxOpenZfsRequest - */ -const se_DescribeLocationFsxOpenZfsRequest = ( - input: DescribeLocationFsxOpenZfsRequest, - context: __SerdeContext -): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeLocationFsxWindowsRequest - */ -const se_DescribeLocationFsxWindowsRequest = ( - input: DescribeLocationFsxWindowsRequest, - context: __SerdeContext -): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeLocationHdfsRequest - */ -const se_DescribeLocationHdfsRequest = (input: DescribeLocationHdfsRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; + return take(input, { + AccessKey: [], + AgentArns: _json, + BucketName: [], + SecretKey: [], + ServerCertificate: context.base64Encoder, + ServerHostname: [], + ServerPort: [], + ServerProtocol: [], + Subdirectory: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1DescribeLocationNfsRequest - */ -const se_DescribeLocationNfsRequest = (input: DescribeLocationNfsRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; +// se_CreateLocationS3Request omitted. -/** - * serializeAws_json1_1DescribeLocationObjectStorageRequest - */ -const se_DescribeLocationObjectStorageRequest = ( - input: DescribeLocationObjectStorageRequest, - context: __SerdeContext -): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; +// se_CreateLocationSmbRequest omitted. -/** - * serializeAws_json1_1DescribeLocationS3Request - */ -const se_DescribeLocationS3Request = (input: DescribeLocationS3Request, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; +// se_CreateTaskRequest omitted. -/** - * serializeAws_json1_1DescribeLocationSmbRequest - */ -const se_DescribeLocationSmbRequest = (input: DescribeLocationSmbRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - }; -}; +// se_DeleteAgentRequest omitted. -/** - * serializeAws_json1_1DescribeTaskExecutionRequest - */ -const se_DescribeTaskExecutionRequest = (input: DescribeTaskExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.TaskExecutionArn != null && { TaskExecutionArn: input.TaskExecutionArn }), - }; -}; +// se_DeleteLocationRequest omitted. -/** - * serializeAws_json1_1DescribeTaskRequest - */ -const se_DescribeTaskRequest = (input: DescribeTaskRequest, context: __SerdeContext): any => { - return { - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - }; -}; +// se_DeleteTaskRequest omitted. -/** - * serializeAws_json1_1Ec2Config - */ -const se_Ec2Config = (input: Ec2Config, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupArns != null && { - SecurityGroupArns: se_Ec2SecurityGroupArnList(input.SecurityGroupArns, context), - }), - ...(input.SubnetArn != null && { SubnetArn: input.SubnetArn }), - }; -}; +// se_DescribeAgentRequest omitted. -/** - * serializeAws_json1_1Ec2SecurityGroupArnList - */ -const se_Ec2SecurityGroupArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeLocationEfsRequest omitted. -/** - * serializeAws_json1_1FilterList - */ -const se_FilterList = (input: FilterRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterRule(entry, context); - }); -}; +// se_DescribeLocationFsxLustreRequest omitted. -/** - * serializeAws_json1_1FilterRule - */ -const se_FilterRule = (input: FilterRule, context: __SerdeContext): any => { - return { - ...(input.FilterType != null && { FilterType: input.FilterType }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_DescribeLocationFsxOntapRequest omitted. -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeLocationFsxOpenZfsRequest omitted. -/** - * serializeAws_json1_1FsxProtocol - */ -const se_FsxProtocol = (input: FsxProtocol, context: __SerdeContext): any => { - return { - ...(input.NFS != null && { NFS: se_FsxProtocolNfs(input.NFS, context) }), - ...(input.SMB != null && { SMB: se_FsxProtocolSmb(input.SMB, context) }), - }; -}; +// se_DescribeLocationFsxWindowsRequest omitted. -/** - * serializeAws_json1_1FsxProtocolNfs - */ -const se_FsxProtocolNfs = (input: FsxProtocolNfs, context: __SerdeContext): any => { - return { - ...(input.MountOptions != null && { MountOptions: se_NfsMountOptions(input.MountOptions, context) }), - }; -}; +// se_DescribeLocationHdfsRequest omitted. -/** - * serializeAws_json1_1FsxProtocolSmb - */ -const se_FsxProtocolSmb = (input: FsxProtocolSmb, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.MountOptions != null && { MountOptions: se_SmbMountOptions(input.MountOptions, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.User != null && { User: input.User }), - }; -}; +// se_DescribeLocationNfsRequest omitted. -/** - * serializeAws_json1_1HdfsNameNode - */ -const se_HdfsNameNode = (input: HdfsNameNode, context: __SerdeContext): any => { - return { - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.Port != null && { Port: input.Port }), - }; -}; +// se_DescribeLocationObjectStorageRequest omitted. -/** - * serializeAws_json1_1HdfsNameNodeList - */ -const se_HdfsNameNodeList = (input: HdfsNameNode[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HdfsNameNode(entry, context); - }); -}; +// se_DescribeLocationS3Request omitted. -/** - * serializeAws_json1_1InputTagList - */ -const se_InputTagList = (input: TagListEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagListEntry(entry, context); - }); -}; +// se_DescribeLocationSmbRequest omitted. -/** - * serializeAws_json1_1ListAgentsRequest - */ -const se_ListAgentsRequest = (input: ListAgentsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeTaskExecutionRequest omitted. -/** - * serializeAws_json1_1ListLocationsRequest - */ -const se_ListLocationsRequest = (input: ListLocationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_LocationFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeTaskRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_Ec2Config omitted. -/** - * serializeAws_json1_1ListTaskExecutionsRequest - */ -const se_ListTaskExecutionsRequest = (input: ListTaskExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - }; -}; +// se_Ec2SecurityGroupArnList omitted. -/** - * serializeAws_json1_1ListTasksRequest - */ -const se_ListTasksRequest = (input: ListTasksRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_TaskFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_FilterList omitted. -/** - * serializeAws_json1_1LocationFilter - */ -const se_LocationFilter = (input: LocationFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_FilterRule omitted. -/** - * serializeAws_json1_1LocationFilters - */ -const se_LocationFilters = (input: LocationFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LocationFilter(entry, context); - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_1NfsMountOptions - */ -const se_NfsMountOptions = (input: NfsMountOptions, context: __SerdeContext): any => { - return { - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_FsxProtocol omitted. -/** - * serializeAws_json1_1OnPremConfig - */ -const se_OnPremConfig = (input: OnPremConfig, context: __SerdeContext): any => { - return { - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - }; -}; +// se_FsxProtocolNfs omitted. -/** - * serializeAws_json1_1Options - */ -const se_Options = (input: Options, context: __SerdeContext): any => { - return { - ...(input.Atime != null && { Atime: input.Atime }), - ...(input.BytesPerSecond != null && { BytesPerSecond: input.BytesPerSecond }), - ...(input.Gid != null && { Gid: input.Gid }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - ...(input.Mtime != null && { Mtime: input.Mtime }), - ...(input.ObjectTags != null && { ObjectTags: input.ObjectTags }), - ...(input.OverwriteMode != null && { OverwriteMode: input.OverwriteMode }), - ...(input.PosixPermissions != null && { PosixPermissions: input.PosixPermissions }), - ...(input.PreserveDeletedFiles != null && { PreserveDeletedFiles: input.PreserveDeletedFiles }), - ...(input.PreserveDevices != null && { PreserveDevices: input.PreserveDevices }), - ...(input.SecurityDescriptorCopyFlags != null && { - SecurityDescriptorCopyFlags: input.SecurityDescriptorCopyFlags, - }), - ...(input.TaskQueueing != null && { TaskQueueing: input.TaskQueueing }), - ...(input.TransferMode != null && { TransferMode: input.TransferMode }), - ...(input.Uid != null && { Uid: input.Uid }), - ...(input.VerifyMode != null && { VerifyMode: input.VerifyMode }), - }; -}; +// se_FsxProtocolSmb omitted. -/** - * serializeAws_json1_1PLSecurityGroupArnList - */ -const se_PLSecurityGroupArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HdfsNameNode omitted. -/** - * serializeAws_json1_1PLSubnetArnList - */ -const se_PLSubnetArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HdfsNameNodeList omitted. -/** - * serializeAws_json1_1QopConfiguration - */ -const se_QopConfiguration = (input: QopConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataTransferProtection != null && { DataTransferProtection: input.DataTransferProtection }), - ...(input.RpcProtection != null && { RpcProtection: input.RpcProtection }), - }; -}; +// se_InputTagList omitted. -/** - * serializeAws_json1_1S3Config - */ -const se_S3Config = (input: S3Config, context: __SerdeContext): any => { - return { - ...(input.BucketAccessRoleArn != null && { BucketAccessRoleArn: input.BucketAccessRoleArn }), - }; -}; +// se_ListAgentsRequest omitted. -/** - * serializeAws_json1_1SmbMountOptions - */ -const se_SmbMountOptions = (input: SmbMountOptions, context: __SerdeContext): any => { - return { - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_ListLocationsRequest omitted. -/** - * serializeAws_json1_1StartTaskExecutionRequest - */ -const se_StartTaskExecutionRequest = (input: StartTaskExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.Excludes != null && { Excludes: se_FilterList(input.Excludes, context) }), - ...(input.Includes != null && { Includes: se_FilterList(input.Includes, context) }), - ...(input.OverrideOptions != null && { OverrideOptions: se_Options(input.OverrideOptions, context) }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListTaskExecutionsRequest omitted. -/** - * serializeAws_json1_1TagListEntry - */ -const se_TagListEntry = (input: TagListEntry, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ListTasksRequest omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_InputTagList(input.Tags, context) }), - }; -}; +// se_LocationFilter omitted. -/** - * serializeAws_json1_1TaskFilter - */ -const se_TaskFilter = (input: TaskFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_LocationFilters omitted. -/** - * serializeAws_json1_1TaskFilters - */ -const se_TaskFilters = (input: TaskFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TaskFilter(entry, context); - }); -}; +// se_NfsMountOptions omitted. -/** - * serializeAws_json1_1TaskSchedule - */ -const se_TaskSchedule = (input: TaskSchedule, context: __SerdeContext): any => { - return { - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - }; -}; +// se_OnPremConfig omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Keys != null && { Keys: se_TagKeyList(input.Keys, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_Options omitted. -/** - * serializeAws_json1_1UpdateAgentRequest - */ -const se_UpdateAgentRequest = (input: UpdateAgentRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArn != null && { AgentArn: input.AgentArn }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_PLSecurityGroupArnList omitted. -/** - * serializeAws_json1_1UpdateLocationHdfsRequest - */ -const se_UpdateLocationHdfsRequest = (input: UpdateLocationHdfsRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.BlockSize != null && { BlockSize: input.BlockSize }), - ...(input.KerberosKeytab != null && { KerberosKeytab: context.base64Encoder(input.KerberosKeytab) }), - ...(input.KerberosKrb5Conf != null && { KerberosKrb5Conf: context.base64Encoder(input.KerberosKrb5Conf) }), - ...(input.KerberosPrincipal != null && { KerberosPrincipal: input.KerberosPrincipal }), - ...(input.KmsKeyProviderUri != null && { KmsKeyProviderUri: input.KmsKeyProviderUri }), - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - ...(input.NameNodes != null && { NameNodes: se_HdfsNameNodeList(input.NameNodes, context) }), - ...(input.QopConfiguration != null && { QopConfiguration: se_QopConfiguration(input.QopConfiguration, context) }), - ...(input.ReplicationFactor != null && { ReplicationFactor: input.ReplicationFactor }), - ...(input.SimpleUser != null && { SimpleUser: input.SimpleUser }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - }; -}; +// se_PLSubnetArnList omitted. -/** - * serializeAws_json1_1UpdateLocationNfsRequest - */ -const se_UpdateLocationNfsRequest = (input: UpdateLocationNfsRequest, context: __SerdeContext): any => { - return { - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - ...(input.MountOptions != null && { MountOptions: se_NfsMountOptions(input.MountOptions, context) }), - ...(input.OnPremConfig != null && { OnPremConfig: se_OnPremConfig(input.OnPremConfig, context) }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - }; -}; +// se_QopConfiguration omitted. -/** - * serializeAws_json1_1UpdateLocationObjectStorageRequest - */ -const se_UpdateLocationObjectStorageRequest = ( - input: UpdateLocationObjectStorageRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccessKey != null && { AccessKey: input.AccessKey }), - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - ...(input.SecretKey != null && { SecretKey: input.SecretKey }), - ...(input.ServerCertificate != null && { ServerCertificate: context.base64Encoder(input.ServerCertificate) }), - ...(input.ServerPort != null && { ServerPort: input.ServerPort }), - ...(input.ServerProtocol != null && { ServerProtocol: input.ServerProtocol }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - }; -}; +// se_S3Config omitted. -/** - * serializeAws_json1_1UpdateLocationSmbRequest - */ -const se_UpdateLocationSmbRequest = (input: UpdateLocationSmbRequest, context: __SerdeContext): any => { - return { - ...(input.AgentArns != null && { AgentArns: se_AgentArnList(input.AgentArns, context) }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.LocationArn != null && { LocationArn: input.LocationArn }), - ...(input.MountOptions != null && { MountOptions: se_SmbMountOptions(input.MountOptions, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Subdirectory != null && { Subdirectory: input.Subdirectory }), - ...(input.User != null && { User: input.User }), - }; -}; +// se_SmbMountOptions omitted. -/** - * serializeAws_json1_1UpdateTaskExecutionRequest - */ -const se_UpdateTaskExecutionRequest = (input: UpdateTaskExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.Options != null && { Options: se_Options(input.Options, context) }), - ...(input.TaskExecutionArn != null && { TaskExecutionArn: input.TaskExecutionArn }), - }; -}; +// se_StartTaskExecutionRequest omitted. -/** - * serializeAws_json1_1UpdateTaskRequest - */ -const se_UpdateTaskRequest = (input: UpdateTaskRequest, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogGroupArn != null && { CloudWatchLogGroupArn: input.CloudWatchLogGroupArn }), - ...(input.Excludes != null && { Excludes: se_FilterList(input.Excludes, context) }), - ...(input.Includes != null && { Includes: se_FilterList(input.Includes, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Options != null && { Options: se_Options(input.Options, context) }), - ...(input.Schedule != null && { Schedule: se_TaskSchedule(input.Schedule, context) }), - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - }; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1AgentArnList - */ -const de_AgentArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TagListEntry omitted. -/** - * deserializeAws_json1_1AgentList - */ -const de_AgentList = (output: any, context: __SerdeContext): AgentListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentListEntry(entry, context); - }); - return retVal; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1AgentListEntry - */ -const de_AgentListEntry = (output: any, context: __SerdeContext): AgentListEntry => { - return { - AgentArn: __expectString(output.AgentArn), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// se_TaskFilter omitted. -/** - * deserializeAws_json1_1CancelTaskExecutionResponse - */ -const de_CancelTaskExecutionResponse = (output: any, context: __SerdeContext): CancelTaskExecutionResponse => { - return {} as any; -}; +// se_TaskFilters omitted. -/** - * deserializeAws_json1_1CreateAgentResponse - */ -const de_CreateAgentResponse = (output: any, context: __SerdeContext): CreateAgentResponse => { - return { - AgentArn: __expectString(output.AgentArn), - } as any; -}; +// se_TaskSchedule omitted. -/** - * deserializeAws_json1_1CreateLocationEfsResponse - */ -const de_CreateLocationEfsResponse = (output: any, context: __SerdeContext): CreateLocationEfsResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1CreateLocationFsxLustreResponse - */ -const de_CreateLocationFsxLustreResponse = (output: any, context: __SerdeContext): CreateLocationFsxLustreResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// se_UpdateAgentRequest omitted. /** - * deserializeAws_json1_1CreateLocationFsxOntapResponse + * serializeAws_json1_1UpdateLocationHdfsRequest */ -const de_CreateLocationFsxOntapResponse = (output: any, context: __SerdeContext): CreateLocationFsxOntapResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; +const se_UpdateLocationHdfsRequest = (input: UpdateLocationHdfsRequest, context: __SerdeContext): any => { + return take(input, { + AgentArns: _json, + AuthenticationType: [], + BlockSize: [], + KerberosKeytab: context.base64Encoder, + KerberosKrb5Conf: context.base64Encoder, + KerberosPrincipal: [], + KmsKeyProviderUri: [], + LocationArn: [], + NameNodes: _json, + QopConfiguration: _json, + ReplicationFactor: [], + SimpleUser: [], + Subdirectory: [], + }); }; -/** - * deserializeAws_json1_1CreateLocationFsxOpenZfsResponse - */ -const de_CreateLocationFsxOpenZfsResponse = ( - output: any, - context: __SerdeContext -): CreateLocationFsxOpenZfsResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// se_UpdateLocationNfsRequest omitted. /** - * deserializeAws_json1_1CreateLocationFsxWindowsResponse + * serializeAws_json1_1UpdateLocationObjectStorageRequest */ -const de_CreateLocationFsxWindowsResponse = ( - output: any, +const se_UpdateLocationObjectStorageRequest = ( + input: UpdateLocationObjectStorageRequest, context: __SerdeContext -): CreateLocationFsxWindowsResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; +): any => { + return take(input, { + AccessKey: [], + AgentArns: _json, + LocationArn: [], + SecretKey: [], + ServerCertificate: context.base64Encoder, + ServerPort: [], + ServerProtocol: [], + Subdirectory: [], + }); }; -/** - * deserializeAws_json1_1CreateLocationHdfsResponse - */ -const de_CreateLocationHdfsResponse = (output: any, context: __SerdeContext): CreateLocationHdfsResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// se_UpdateLocationSmbRequest omitted. -/** - * deserializeAws_json1_1CreateLocationNfsResponse - */ -const de_CreateLocationNfsResponse = (output: any, context: __SerdeContext): CreateLocationNfsResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// se_UpdateTaskExecutionRequest omitted. -/** - * deserializeAws_json1_1CreateLocationObjectStorageResponse - */ -const de_CreateLocationObjectStorageResponse = ( - output: any, - context: __SerdeContext -): CreateLocationObjectStorageResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// se_UpdateTaskRequest omitted. -/** - * deserializeAws_json1_1CreateLocationS3Response - */ -const de_CreateLocationS3Response = (output: any, context: __SerdeContext): CreateLocationS3Response => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// de_AgentArnList omitted. -/** - * deserializeAws_json1_1CreateLocationSmbResponse - */ -const de_CreateLocationSmbResponse = (output: any, context: __SerdeContext): CreateLocationSmbResponse => { - return { - LocationArn: __expectString(output.LocationArn), - } as any; -}; +// de_AgentList omitted. -/** - * deserializeAws_json1_1CreateTaskResponse - */ -const de_CreateTaskResponse = (output: any, context: __SerdeContext): CreateTaskResponse => { - return { - TaskArn: __expectString(output.TaskArn), - } as any; -}; +// de_AgentListEntry omitted. -/** - * deserializeAws_json1_1DeleteAgentResponse - */ -const de_DeleteAgentResponse = (output: any, context: __SerdeContext): DeleteAgentResponse => { - return {} as any; -}; +// de_CancelTaskExecutionResponse omitted. -/** - * deserializeAws_json1_1DeleteLocationResponse - */ -const de_DeleteLocationResponse = (output: any, context: __SerdeContext): DeleteLocationResponse => { - return {} as any; -}; +// de_CreateAgentResponse omitted. -/** - * deserializeAws_json1_1DeleteTaskResponse - */ -const de_DeleteTaskResponse = (output: any, context: __SerdeContext): DeleteTaskResponse => { - return {} as any; -}; +// de_CreateLocationEfsResponse omitted. + +// de_CreateLocationFsxLustreResponse omitted. + +// de_CreateLocationFsxOntapResponse omitted. + +// de_CreateLocationFsxOpenZfsResponse omitted. + +// de_CreateLocationFsxWindowsResponse omitted. + +// de_CreateLocationHdfsResponse omitted. + +// de_CreateLocationNfsResponse omitted. + +// de_CreateLocationObjectStorageResponse omitted. + +// de_CreateLocationS3Response omitted. + +// de_CreateLocationSmbResponse omitted. + +// de_CreateTaskResponse omitted. + +// de_DeleteAgentResponse omitted. + +// de_DeleteLocationResponse omitted. + +// de_DeleteTaskResponse omitted. /** * deserializeAws_json1_1DescribeAgentResponse */ const de_DescribeAgentResponse = (output: any, context: __SerdeContext): DescribeAgentResponse => { - return { - AgentArn: __expectString(output.AgentArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointType: __expectString(output.EndpointType), - LastConnectionTime: - output.LastConnectionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastConnectionTime))) - : undefined, - Name: __expectString(output.Name), - PrivateLinkConfig: - output.PrivateLinkConfig != null ? de_PrivateLinkConfig(output.PrivateLinkConfig, context) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + AgentArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointType: __expectString, + LastConnectionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PrivateLinkConfig: _json, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeLocationEfsResponse */ const de_DescribeLocationEfsResponse = (output: any, context: __SerdeContext): DescribeLocationEfsResponse => { - return { - AccessPointArn: __expectString(output.AccessPointArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Ec2Config: output.Ec2Config != null ? de_Ec2Config(output.Ec2Config, context) : undefined, - FileSystemAccessRoleArn: __expectString(output.FileSystemAccessRoleArn), - InTransitEncryption: __expectString(output.InTransitEncryption), - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - } as any; + return take(output, { + AccessPointArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Ec2Config: _json, + FileSystemAccessRoleArn: __expectString, + InTransitEncryption: __expectString, + LocationArn: __expectString, + LocationUri: __expectString, + }) as any; }; /** @@ -4109,16 +3247,12 @@ const de_DescribeLocationFsxLustreResponse = ( output: any, context: __SerdeContext ): DescribeLocationFsxLustreResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - SecurityGroupArns: - output.SecurityGroupArns != null ? de_Ec2SecurityGroupArnList(output.SecurityGroupArns, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LocationArn: __expectString, + LocationUri: __expectString, + SecurityGroupArns: _json, + }) as any; }; /** @@ -4128,19 +3262,15 @@ const de_DescribeLocationFsxOntapResponse = ( output: any, context: __SerdeContext ): DescribeLocationFsxOntapResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FsxFilesystemArn: __expectString(output.FsxFilesystemArn), - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - Protocol: output.Protocol != null ? de_FsxProtocol(output.Protocol, context) : undefined, - SecurityGroupArns: - output.SecurityGroupArns != null ? de_Ec2SecurityGroupArnList(output.SecurityGroupArns, context) : undefined, - StorageVirtualMachineArn: __expectString(output.StorageVirtualMachineArn), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FsxFilesystemArn: __expectString, + LocationArn: __expectString, + LocationUri: __expectString, + Protocol: _json, + SecurityGroupArns: _json, + StorageVirtualMachineArn: __expectString, + }) as any; }; /** @@ -4150,17 +3280,13 @@ const de_DescribeLocationFsxOpenZfsResponse = ( output: any, context: __SerdeContext ): DescribeLocationFsxOpenZfsResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - Protocol: output.Protocol != null ? de_FsxProtocol(output.Protocol, context) : undefined, - SecurityGroupArns: - output.SecurityGroupArns != null ? de_Ec2SecurityGroupArnList(output.SecurityGroupArns, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LocationArn: __expectString, + LocationUri: __expectString, + Protocol: _json, + SecurityGroupArns: _json, + }) as any; }; /** @@ -4170,58 +3296,47 @@ const de_DescribeLocationFsxWindowsResponse = ( output: any, context: __SerdeContext ): DescribeLocationFsxWindowsResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Domain: __expectString(output.Domain), - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - SecurityGroupArns: - output.SecurityGroupArns != null ? de_Ec2SecurityGroupArnList(output.SecurityGroupArns, context) : undefined, - User: __expectString(output.User), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Domain: __expectString, + LocationArn: __expectString, + LocationUri: __expectString, + SecurityGroupArns: _json, + User: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeLocationHdfsResponse */ const de_DescribeLocationHdfsResponse = (output: any, context: __SerdeContext): DescribeLocationHdfsResponse => { - return { - AgentArns: output.AgentArns != null ? de_AgentArnList(output.AgentArns, context) : undefined, - AuthenticationType: __expectString(output.AuthenticationType), - BlockSize: __expectInt32(output.BlockSize), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - KerberosPrincipal: __expectString(output.KerberosPrincipal), - KmsKeyProviderUri: __expectString(output.KmsKeyProviderUri), - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - NameNodes: output.NameNodes != null ? de_HdfsNameNodeList(output.NameNodes, context) : undefined, - QopConfiguration: - output.QopConfiguration != null ? de_QopConfiguration(output.QopConfiguration, context) : undefined, - ReplicationFactor: __expectInt32(output.ReplicationFactor), - SimpleUser: __expectString(output.SimpleUser), - } as any; + return take(output, { + AgentArns: _json, + AuthenticationType: __expectString, + BlockSize: __expectInt32, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KerberosPrincipal: __expectString, + KmsKeyProviderUri: __expectString, + LocationArn: __expectString, + LocationUri: __expectString, + NameNodes: _json, + QopConfiguration: _json, + ReplicationFactor: __expectInt32, + SimpleUser: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeLocationNfsResponse */ const de_DescribeLocationNfsResponse = (output: any, context: __SerdeContext): DescribeLocationNfsResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - MountOptions: output.MountOptions != null ? de_NfsMountOptions(output.MountOptions, context) : undefined, - OnPremConfig: output.OnPremConfig != null ? de_OnPremConfig(output.OnPremConfig, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LocationArn: __expectString, + LocationUri: __expectString, + MountOptions: _json, + OnPremConfig: _json, + }) as any; }; /** @@ -4231,632 +3346,185 @@ const de_DescribeLocationObjectStorageResponse = ( output: any, context: __SerdeContext ): DescribeLocationObjectStorageResponse => { - return { - AccessKey: __expectString(output.AccessKey), - AgentArns: output.AgentArns != null ? de_AgentArnList(output.AgentArns, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - ServerCertificate: output.ServerCertificate != null ? context.base64Decoder(output.ServerCertificate) : undefined, - ServerPort: __expectInt32(output.ServerPort), - ServerProtocol: __expectString(output.ServerProtocol), - } as any; + return take(output, { + AccessKey: __expectString, + AgentArns: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LocationArn: __expectString, + LocationUri: __expectString, + ServerCertificate: context.base64Decoder, + ServerPort: __expectInt32, + ServerProtocol: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeLocationS3Response */ const de_DescribeLocationS3Response = (output: any, context: __SerdeContext): DescribeLocationS3Response => { - return { - AgentArns: output.AgentArns != null ? de_AgentArnList(output.AgentArns, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - S3Config: output.S3Config != null ? de_S3Config(output.S3Config, context) : undefined, - S3StorageClass: __expectString(output.S3StorageClass), - } as any; + return take(output, { + AgentArns: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LocationArn: __expectString, + LocationUri: __expectString, + S3Config: _json, + S3StorageClass: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeLocationSmbResponse */ const de_DescribeLocationSmbResponse = (output: any, context: __SerdeContext): DescribeLocationSmbResponse => { - return { - AgentArns: output.AgentArns != null ? de_AgentArnList(output.AgentArns, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Domain: __expectString(output.Domain), - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - MountOptions: output.MountOptions != null ? de_SmbMountOptions(output.MountOptions, context) : undefined, - User: __expectString(output.User), - } as any; + return take(output, { + AgentArns: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Domain: __expectString, + LocationArn: __expectString, + LocationUri: __expectString, + MountOptions: _json, + User: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeTaskExecutionResponse */ const de_DescribeTaskExecutionResponse = (output: any, context: __SerdeContext): DescribeTaskExecutionResponse => { - return { - BytesCompressed: __expectLong(output.BytesCompressed), - BytesTransferred: __expectLong(output.BytesTransferred), - BytesWritten: __expectLong(output.BytesWritten), - EstimatedBytesToTransfer: __expectLong(output.EstimatedBytesToTransfer), - EstimatedFilesToTransfer: __expectLong(output.EstimatedFilesToTransfer), - Excludes: output.Excludes != null ? de_FilterList(output.Excludes, context) : undefined, - FilesTransferred: __expectLong(output.FilesTransferred), - Includes: output.Includes != null ? de_FilterList(output.Includes, context) : undefined, - Options: output.Options != null ? de_Options(output.Options, context) : undefined, - Result: output.Result != null ? de_TaskExecutionResultDetail(output.Result, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - TaskExecutionArn: __expectString(output.TaskExecutionArn), - } as any; + return take(output, { + BytesCompressed: __expectLong, + BytesTransferred: __expectLong, + BytesWritten: __expectLong, + EstimatedBytesToTransfer: __expectLong, + EstimatedFilesToTransfer: __expectLong, + Excludes: _json, + FilesTransferred: __expectLong, + Includes: _json, + Options: _json, + Result: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TaskExecutionArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeTaskResponse */ const de_DescribeTaskResponse = (output: any, context: __SerdeContext): DescribeTaskResponse => { - return { - CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CurrentTaskExecutionArn: __expectString(output.CurrentTaskExecutionArn), - DestinationLocationArn: __expectString(output.DestinationLocationArn), - DestinationNetworkInterfaceArns: - output.DestinationNetworkInterfaceArns != null - ? de_DestinationNetworkInterfaceArns(output.DestinationNetworkInterfaceArns, context) - : undefined, - ErrorCode: __expectString(output.ErrorCode), - ErrorDetail: __expectString(output.ErrorDetail), - Excludes: output.Excludes != null ? de_FilterList(output.Excludes, context) : undefined, - Includes: output.Includes != null ? de_FilterList(output.Includes, context) : undefined, - Name: __expectString(output.Name), - Options: output.Options != null ? de_Options(output.Options, context) : undefined, - Schedule: output.Schedule != null ? de_TaskSchedule(output.Schedule, context) : undefined, - SourceLocationArn: __expectString(output.SourceLocationArn), - SourceNetworkInterfaceArns: - output.SourceNetworkInterfaceArns != null - ? de_SourceNetworkInterfaceArns(output.SourceNetworkInterfaceArns, context) - : undefined, - Status: __expectString(output.Status), - TaskArn: __expectString(output.TaskArn), - } as any; -}; - -/** - * deserializeAws_json1_1DestinationNetworkInterfaceArns - */ -const de_DestinationNetworkInterfaceArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Ec2Config - */ -const de_Ec2Config = (output: any, context: __SerdeContext): Ec2Config => { - return { - SecurityGroupArns: - output.SecurityGroupArns != null ? de_Ec2SecurityGroupArnList(output.SecurityGroupArns, context) : undefined, - SubnetArn: __expectString(output.SubnetArn), - } as any; + return take(output, { + CloudWatchLogGroupArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentTaskExecutionArn: __expectString, + DestinationLocationArn: __expectString, + DestinationNetworkInterfaceArns: _json, + ErrorCode: __expectString, + ErrorDetail: __expectString, + Excludes: _json, + Includes: _json, + Name: __expectString, + Options: _json, + Schedule: _json, + SourceLocationArn: __expectString, + SourceNetworkInterfaceArns: _json, + Status: __expectString, + TaskArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1Ec2SecurityGroupArnList - */ -const de_Ec2SecurityGroupArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DestinationNetworkInterfaceArns omitted. -/** - * deserializeAws_json1_1FilterList - */ -const de_FilterList = (output: any, context: __SerdeContext): FilterRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilterRule(entry, context); - }); - return retVal; -}; +// de_Ec2Config omitted. -/** - * deserializeAws_json1_1FilterRule - */ -const de_FilterRule = (output: any, context: __SerdeContext): FilterRule => { - return { - FilterType: __expectString(output.FilterType), - Value: __expectString(output.Value), - } as any; -}; +// de_Ec2SecurityGroupArnList omitted. -/** - * deserializeAws_json1_1FsxProtocol - */ -const de_FsxProtocol = (output: any, context: __SerdeContext): FsxProtocol => { - return { - NFS: output.NFS != null ? de_FsxProtocolNfs(output.NFS, context) : undefined, - SMB: output.SMB != null ? de_FsxProtocolSmb(output.SMB, context) : undefined, - } as any; -}; +// de_FilterList omitted. -/** - * deserializeAws_json1_1FsxProtocolNfs - */ -const de_FsxProtocolNfs = (output: any, context: __SerdeContext): FsxProtocolNfs => { - return { - MountOptions: output.MountOptions != null ? de_NfsMountOptions(output.MountOptions, context) : undefined, - } as any; -}; +// de_FilterRule omitted. -/** - * deserializeAws_json1_1FsxProtocolSmb - */ -const de_FsxProtocolSmb = (output: any, context: __SerdeContext): FsxProtocolSmb => { - return { - Domain: __expectString(output.Domain), - MountOptions: output.MountOptions != null ? de_SmbMountOptions(output.MountOptions, context) : undefined, - Password: __expectString(output.Password), - User: __expectString(output.User), - } as any; -}; +// de_FsxProtocol omitted. -/** - * deserializeAws_json1_1HdfsNameNode - */ -const de_HdfsNameNode = (output: any, context: __SerdeContext): HdfsNameNode => { - return { - Hostname: __expectString(output.Hostname), - Port: __expectInt32(output.Port), - } as any; -}; +// de_FsxProtocolNfs omitted. -/** - * deserializeAws_json1_1HdfsNameNodeList - */ -const de_HdfsNameNodeList = (output: any, context: __SerdeContext): HdfsNameNode[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HdfsNameNode(entry, context); - }); - return retVal; -}; +// de_FsxProtocolSmb omitted. -/** - * deserializeAws_json1_1InternalException - */ -const de_InternalException = (output: any, context: __SerdeContext): InternalException => { - return { - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; +// de_HdfsNameNode omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - datasyncErrorCode: __expectString(output.datasyncErrorCode), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; +// de_HdfsNameNodeList omitted. -/** - * deserializeAws_json1_1ListAgentsResponse - */ -const de_ListAgentsResponse = (output: any, context: __SerdeContext): ListAgentsResponse => { - return { - Agents: output.Agents != null ? de_AgentList(output.Agents, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_InternalException omitted. -/** - * deserializeAws_json1_1ListLocationsResponse - */ -const de_ListLocationsResponse = (output: any, context: __SerdeContext): ListLocationsResponse => { - return { - Locations: output.Locations != null ? de_LocationList(output.Locations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_OutputTagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListAgentsResponse omitted. -/** - * deserializeAws_json1_1ListTaskExecutionsResponse - */ -const de_ListTaskExecutionsResponse = (output: any, context: __SerdeContext): ListTaskExecutionsResponse => { - return { - NextToken: __expectString(output.NextToken), - TaskExecutions: output.TaskExecutions != null ? de_TaskExecutionList(output.TaskExecutions, context) : undefined, - } as any; -}; +// de_ListLocationsResponse omitted. -/** - * deserializeAws_json1_1ListTasksResponse - */ -const de_ListTasksResponse = (output: any, context: __SerdeContext): ListTasksResponse => { - return { - NextToken: __expectString(output.NextToken), - Tasks: output.Tasks != null ? de_TaskList(output.Tasks, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1LocationList - */ -const de_LocationList = (output: any, context: __SerdeContext): LocationListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LocationListEntry(entry, context); - }); - return retVal; -}; +// de_ListTaskExecutionsResponse omitted. -/** - * deserializeAws_json1_1LocationListEntry - */ -const de_LocationListEntry = (output: any, context: __SerdeContext): LocationListEntry => { - return { - LocationArn: __expectString(output.LocationArn), - LocationUri: __expectString(output.LocationUri), - } as any; -}; +// de_ListTasksResponse omitted. -/** - * deserializeAws_json1_1NfsMountOptions - */ -const de_NfsMountOptions = (output: any, context: __SerdeContext): NfsMountOptions => { - return { - Version: __expectString(output.Version), - } as any; -}; +// de_LocationList omitted. -/** - * deserializeAws_json1_1OnPremConfig - */ -const de_OnPremConfig = (output: any, context: __SerdeContext): OnPremConfig => { - return { - AgentArns: output.AgentArns != null ? de_AgentArnList(output.AgentArns, context) : undefined, - } as any; -}; +// de_LocationListEntry omitted. -/** - * deserializeAws_json1_1Options - */ -const de_Options = (output: any, context: __SerdeContext): Options => { - return { - Atime: __expectString(output.Atime), - BytesPerSecond: __expectLong(output.BytesPerSecond), - Gid: __expectString(output.Gid), - LogLevel: __expectString(output.LogLevel), - Mtime: __expectString(output.Mtime), - ObjectTags: __expectString(output.ObjectTags), - OverwriteMode: __expectString(output.OverwriteMode), - PosixPermissions: __expectString(output.PosixPermissions), - PreserveDeletedFiles: __expectString(output.PreserveDeletedFiles), - PreserveDevices: __expectString(output.PreserveDevices), - SecurityDescriptorCopyFlags: __expectString(output.SecurityDescriptorCopyFlags), - TaskQueueing: __expectString(output.TaskQueueing), - TransferMode: __expectString(output.TransferMode), - Uid: __expectString(output.Uid), - VerifyMode: __expectString(output.VerifyMode), - } as any; -}; +// de_NfsMountOptions omitted. -/** - * deserializeAws_json1_1OutputTagList - */ -const de_OutputTagList = (output: any, context: __SerdeContext): TagListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagListEntry(entry, context); - }); - return retVal; -}; +// de_OnPremConfig omitted. -/** - * deserializeAws_json1_1PLSecurityGroupArnList - */ -const de_PLSecurityGroupArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Options omitted. -/** - * deserializeAws_json1_1PLSubnetArnList - */ -const de_PLSubnetArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OutputTagList omitted. -/** - * deserializeAws_json1_1PrivateLinkConfig - */ -const de_PrivateLinkConfig = (output: any, context: __SerdeContext): PrivateLinkConfig => { - return { - PrivateLinkEndpoint: __expectString(output.PrivateLinkEndpoint), - SecurityGroupArns: - output.SecurityGroupArns != null ? de_PLSecurityGroupArnList(output.SecurityGroupArns, context) : undefined, - SubnetArns: output.SubnetArns != null ? de_PLSubnetArnList(output.SubnetArns, context) : undefined, - VpcEndpointId: __expectString(output.VpcEndpointId), - } as any; -}; +// de_PLSecurityGroupArnList omitted. -/** - * deserializeAws_json1_1QopConfiguration - */ -const de_QopConfiguration = (output: any, context: __SerdeContext): QopConfiguration => { - return { - DataTransferProtection: __expectString(output.DataTransferProtection), - RpcProtection: __expectString(output.RpcProtection), - } as any; -}; +// de_PLSubnetArnList omitted. -/** - * deserializeAws_json1_1S3Config - */ -const de_S3Config = (output: any, context: __SerdeContext): S3Config => { - return { - BucketAccessRoleArn: __expectString(output.BucketAccessRoleArn), - } as any; -}; +// de_PrivateLinkConfig omitted. -/** - * deserializeAws_json1_1SmbMountOptions - */ -const de_SmbMountOptions = (output: any, context: __SerdeContext): SmbMountOptions => { - return { - Version: __expectString(output.Version), - } as any; -}; +// de_QopConfiguration omitted. -/** - * deserializeAws_json1_1SourceNetworkInterfaceArns - */ -const de_SourceNetworkInterfaceArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_S3Config omitted. -/** - * deserializeAws_json1_1StartTaskExecutionResponse - */ -const de_StartTaskExecutionResponse = (output: any, context: __SerdeContext): StartTaskExecutionResponse => { - return { - TaskExecutionArn: __expectString(output.TaskExecutionArn), - } as any; -}; +// de_SmbMountOptions omitted. -/** - * deserializeAws_json1_1TagListEntry - */ -const de_TagListEntry = (output: any, context: __SerdeContext): TagListEntry => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SourceNetworkInterfaceArns omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_StartTaskExecutionResponse omitted. -/** - * deserializeAws_json1_1TaskExecutionList - */ -const de_TaskExecutionList = (output: any, context: __SerdeContext): TaskExecutionListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaskExecutionListEntry(entry, context); - }); - return retVal; -}; +// de_TagListEntry omitted. -/** - * deserializeAws_json1_1TaskExecutionListEntry - */ -const de_TaskExecutionListEntry = (output: any, context: __SerdeContext): TaskExecutionListEntry => { - return { - Status: __expectString(output.Status), - TaskExecutionArn: __expectString(output.TaskExecutionArn), - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TaskExecutionResultDetail - */ -const de_TaskExecutionResultDetail = (output: any, context: __SerdeContext): TaskExecutionResultDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorDetail: __expectString(output.ErrorDetail), - PrepareDuration: __expectLong(output.PrepareDuration), - PrepareStatus: __expectString(output.PrepareStatus), - TotalDuration: __expectLong(output.TotalDuration), - TransferDuration: __expectLong(output.TransferDuration), - TransferStatus: __expectString(output.TransferStatus), - VerifyDuration: __expectLong(output.VerifyDuration), - VerifyStatus: __expectString(output.VerifyStatus), - } as any; -}; +// de_TaskExecutionList omitted. -/** - * deserializeAws_json1_1TaskList - */ -const de_TaskList = (output: any, context: __SerdeContext): TaskListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaskListEntry(entry, context); - }); - return retVal; -}; +// de_TaskExecutionListEntry omitted. -/** - * deserializeAws_json1_1TaskListEntry - */ -const de_TaskListEntry = (output: any, context: __SerdeContext): TaskListEntry => { - return { - Name: __expectString(output.Name), - Status: __expectString(output.Status), - TaskArn: __expectString(output.TaskArn), - } as any; -}; +// de_TaskExecutionResultDetail omitted. -/** - * deserializeAws_json1_1TaskSchedule - */ -const de_TaskSchedule = (output: any, context: __SerdeContext): TaskSchedule => { - return { - ScheduleExpression: __expectString(output.ScheduleExpression), - } as any; -}; +// de_TaskList omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_TaskListEntry omitted. -/** - * deserializeAws_json1_1UpdateAgentResponse - */ -const de_UpdateAgentResponse = (output: any, context: __SerdeContext): UpdateAgentResponse => { - return {} as any; -}; +// de_TaskSchedule omitted. -/** - * deserializeAws_json1_1UpdateLocationHdfsResponse - */ -const de_UpdateLocationHdfsResponse = (output: any, context: __SerdeContext): UpdateLocationHdfsResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateLocationNfsResponse - */ -const de_UpdateLocationNfsResponse = (output: any, context: __SerdeContext): UpdateLocationNfsResponse => { - return {} as any; -}; +// de_UpdateAgentResponse omitted. -/** - * deserializeAws_json1_1UpdateLocationObjectStorageResponse - */ -const de_UpdateLocationObjectStorageResponse = ( - output: any, - context: __SerdeContext -): UpdateLocationObjectStorageResponse => { - return {} as any; -}; +// de_UpdateLocationHdfsResponse omitted. -/** - * deserializeAws_json1_1UpdateLocationSmbResponse - */ -const de_UpdateLocationSmbResponse = (output: any, context: __SerdeContext): UpdateLocationSmbResponse => { - return {} as any; -}; +// de_UpdateLocationNfsResponse omitted. -/** - * deserializeAws_json1_1UpdateTaskExecutionResponse - */ -const de_UpdateTaskExecutionResponse = (output: any, context: __SerdeContext): UpdateTaskExecutionResponse => { - return {} as any; -}; +// de_UpdateLocationObjectStorageResponse omitted. -/** - * deserializeAws_json1_1UpdateTaskResponse - */ -const de_UpdateTaskResponse = (output: any, context: __SerdeContext): UpdateTaskResponse => { - return {} as any; -}; +// de_UpdateLocationSmbResponse omitted. + +// de_UpdateTaskExecutionResponse omitted. + +// de_UpdateTaskResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4878,6 +3546,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-dax/src/protocols/Aws_json1_1.ts b/clients/client-dax/src/protocols/Aws_json1_1.ts index 07f7a3e60cfa..8df0d378c932 100644 --- a/clients/client-dax/src/protocols/Aws_json1_1.ts +++ b/clients/client-dax/src/protocols/Aws_json1_1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -70,30 +72,21 @@ import { CreateClusterRequest, CreateClusterResponse, CreateParameterGroupRequest, - CreateParameterGroupResponse, CreateSubnetGroupRequest, - CreateSubnetGroupResponse, DecreaseReplicationFactorRequest, DecreaseReplicationFactorResponse, DeleteClusterRequest, DeleteClusterResponse, DeleteParameterGroupRequest, - DeleteParameterGroupResponse, DeleteSubnetGroupRequest, - DeleteSubnetGroupResponse, DescribeClustersRequest, DescribeClustersResponse, DescribeDefaultParametersRequest, - DescribeDefaultParametersResponse, DescribeEventsRequest, DescribeEventsResponse, DescribeParameterGroupsRequest, - DescribeParameterGroupsResponse, DescribeParametersRequest, - DescribeParametersResponse, DescribeSubnetGroupsRequest, - DescribeSubnetGroupsResponse, - Endpoint, Event, IncreaseReplicationFactorRequest, IncreaseReplicationFactorResponse, @@ -106,29 +99,19 @@ import { InvalidSubnet, InvalidVPCNetworkStateFault, ListTagsRequest, - ListTagsResponse, Node, NodeNotFoundFault, NodeQuotaForClusterExceededFault, NodeQuotaForCustomerExceededFault, - NodeTypeSpecificValue, - NotificationConfiguration, - Parameter, - ParameterGroup, ParameterGroupAlreadyExistsFault, ParameterGroupNotFoundFault, ParameterGroupQuotaExceededFault, - ParameterGroupStatus, ParameterNameValue, RebootNodeRequest, RebootNodeResponse, - SecurityGroupMembership, ServiceLinkedRoleNotFoundFault, ServiceQuotaExceededException, - SSEDescription, SSESpecification, - Subnet, - SubnetGroup, SubnetGroupAlreadyExistsFault, SubnetGroupInUseFault, SubnetGroupNotFoundFault, @@ -139,15 +122,11 @@ import { TagNotFoundFault, TagQuotaPerResourceExceeded, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateClusterRequest, UpdateClusterResponse, UpdateParameterGroupRequest, - UpdateParameterGroupResponse, UpdateSubnetGroupRequest, - UpdateSubnetGroupResponse, } from "../models/models_0"; /** @@ -159,7 +138,7 @@ export const se_CreateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCluster"); let body: any; - body = JSON.stringify(se_CreateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -172,7 +151,7 @@ export const se_CreateParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateParameterGroup"); let body: any; - body = JSON.stringify(se_CreateParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -185,7 +164,7 @@ export const se_CreateSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSubnetGroup"); let body: any; - body = JSON.stringify(se_CreateSubnetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -198,7 +177,7 @@ export const se_DecreaseReplicationFactorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DecreaseReplicationFactor"); let body: any; - body = JSON.stringify(se_DecreaseReplicationFactorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -211,7 +190,7 @@ export const se_DeleteClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCluster"); let body: any; - body = JSON.stringify(se_DeleteClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -224,7 +203,7 @@ export const se_DeleteParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteParameterGroup"); let body: any; - body = JSON.stringify(se_DeleteParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -237,7 +216,7 @@ export const se_DeleteSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSubnetGroup"); let body: any; - body = JSON.stringify(se_DeleteSubnetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -250,7 +229,7 @@ export const se_DescribeClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClusters"); let body: any; - body = JSON.stringify(se_DescribeClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -263,7 +242,7 @@ export const se_DescribeDefaultParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDefaultParameters"); let body: any; - body = JSON.stringify(se_DescribeDefaultParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,7 +268,7 @@ export const se_DescribeParameterGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeParameterGroups"); let body: any; - body = JSON.stringify(se_DescribeParameterGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +281,7 @@ export const se_DescribeParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeParameters"); let body: any; - body = JSON.stringify(se_DescribeParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +294,7 @@ export const se_DescribeSubnetGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSubnetGroups"); let body: any; - body = JSON.stringify(se_DescribeSubnetGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +307,7 @@ export const se_IncreaseReplicationFactorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("IncreaseReplicationFactor"); let body: any; - body = JSON.stringify(se_IncreaseReplicationFactorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -341,7 +320,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +333,7 @@ export const se_RebootNodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebootNode"); let body: any; - body = JSON.stringify(se_RebootNodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +346,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -380,7 +359,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -393,7 +372,7 @@ export const se_UpdateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCluster"); let body: any; - body = JSON.stringify(se_UpdateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -406,7 +385,7 @@ export const se_UpdateParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateParameterGroup"); let body: any; - body = JSON.stringify(se_UpdateParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -419,7 +398,7 @@ export const se_UpdateSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSubnetGroup"); let body: any; - body = JSON.stringify(se_UpdateSubnetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -440,7 +419,7 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -503,10 +482,9 @@ const de_CreateClusterCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -524,12 +502,12 @@ export const de_CreateParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateParameterGroupResponse(data, context); + contents = _json(data); const response: CreateParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -565,10 +543,9 @@ const de_CreateParameterGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -586,12 +563,12 @@ export const de_CreateSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSubnetGroupResponse(data, context); + contents = _json(data); const response: CreateSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -624,10 +601,9 @@ const de_CreateSubnetGroupCommandError = async ( throw await de_SubnetQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -650,7 +626,7 @@ export const de_DecreaseReplicationFactorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -686,10 +662,9 @@ const de_DecreaseReplicationFactorCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -712,7 +687,7 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -745,10 +720,9 @@ const de_DeleteClusterCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -766,12 +740,12 @@ export const de_DeleteParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteParameterGroupResponse(data, context); + contents = _json(data); const response: DeleteParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -804,10 +778,9 @@ const de_DeleteParameterGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -825,12 +798,12 @@ export const de_DeleteSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSubnetGroupResponse(data, context); + contents = _json(data); const response: DeleteSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -857,10 +830,9 @@ const de_DeleteSubnetGroupCommandError = async ( throw await de_SubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -883,7 +855,7 @@ export const de_DescribeClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -913,10 +885,9 @@ const de_DescribeClustersCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -934,12 +905,12 @@ export const de_DescribeDefaultParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDefaultParametersResponse(data, context); + contents = _json(data); const response: DescribeDefaultParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -966,10 +937,9 @@ const de_DescribeDefaultParametersCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -992,7 +962,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1019,10 +989,9 @@ const de_DescribeEventsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1040,12 +1009,12 @@ export const de_DescribeParameterGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeParameterGroupsResponse(data, context); + contents = _json(data); const response: DescribeParameterGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1075,10 +1044,9 @@ const de_DescribeParameterGroupsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,12 +1064,12 @@ export const de_DescribeParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeParametersResponse(data, context); + contents = _json(data); const response: DescribeParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1131,10 +1099,9 @@ const de_DescribeParametersCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1152,12 +1119,12 @@ export const de_DescribeSubnetGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSubnetGroupsResponse(data, context); + contents = _json(data); const response: DescribeSubnetGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1181,10 +1148,9 @@ const de_DescribeSubnetGroupsCommandError = async ( throw await de_SubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1207,7 +1173,7 @@ export const de_IncreaseReplicationFactorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1252,10 +1218,9 @@ const de_IncreaseReplicationFactorCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,12 +1238,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResponse(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1314,10 +1279,9 @@ const de_ListTagsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1340,7 +1304,7 @@ export const de_RebootNodeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1376,10 +1340,9 @@ const de_RebootNodeCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1397,12 +1360,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1441,10 +1404,9 @@ const de_TagResourceCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1462,12 +1424,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1506,10 +1468,9 @@ const de_UntagResourceCommandError = async ( throw await de_TagNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1532,7 +1493,7 @@ export const de_UpdateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1571,10 +1532,9 @@ const de_UpdateClusterCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1592,12 +1552,12 @@ export const de_UpdateParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateParameterGroupResponse(data, context); + contents = _json(data); const response: UpdateParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1630,10 +1590,9 @@ const de_UpdateParameterGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1651,12 +1610,12 @@ export const de_UpdateSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSubnetGroupResponse(data, context); + contents = _json(data); const response: UpdateSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1689,10 +1648,9 @@ const de_UpdateSubnetGroupCommandError = async ( throw await de_SubnetQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1706,7 +1664,7 @@ const de_ClusterAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ClusterAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1722,7 +1680,7 @@ const de_ClusterNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ClusterNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1738,7 +1696,7 @@ const de_ClusterQuotaForCustomerExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterQuotaForCustomerExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ClusterQuotaForCustomerExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1754,7 +1712,7 @@ const de_InsufficientClusterCapacityFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientClusterCapacityFault(body, context); + const deserialized: any = _json(body); const exception = new InsufficientClusterCapacityFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1767,7 +1725,7 @@ const de_InsufficientClusterCapacityFaultRes = async ( */ const de_InvalidARNFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidARNFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidARNFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1783,7 +1741,7 @@ const de_InvalidClusterStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidClusterStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidClusterStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1799,7 +1757,7 @@ const de_InvalidParameterCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1815,7 +1773,7 @@ const de_InvalidParameterGroupStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterGroupStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterGroupStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1831,7 +1789,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1844,7 +1802,7 @@ const de_InvalidParameterValueExceptionRes = async ( */ const de_InvalidSubnetRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSubnet(body, context); + const deserialized: any = _json(body); const exception = new InvalidSubnet({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1860,7 +1818,7 @@ const de_InvalidVPCNetworkStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidVPCNetworkStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidVPCNetworkStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1873,7 +1831,7 @@ const de_InvalidVPCNetworkStateFaultRes = async ( */ const de_NodeNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NodeNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new NodeNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1889,7 +1847,7 @@ const de_NodeQuotaForClusterExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NodeQuotaForClusterExceededFault(body, context); + const deserialized: any = _json(body); const exception = new NodeQuotaForClusterExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1905,7 +1863,7 @@ const de_NodeQuotaForCustomerExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NodeQuotaForCustomerExceededFault(body, context); + const deserialized: any = _json(body); const exception = new NodeQuotaForCustomerExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1921,7 +1879,7 @@ const de_ParameterGroupAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterGroupAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ParameterGroupAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1937,7 +1895,7 @@ const de_ParameterGroupNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterGroupNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ParameterGroupNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1953,7 +1911,7 @@ const de_ParameterGroupQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterGroupQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ParameterGroupQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1969,7 +1927,7 @@ const de_ServiceLinkedRoleNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceLinkedRoleNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ServiceLinkedRoleNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1985,7 +1943,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2001,7 +1959,7 @@ const de_SubnetGroupAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2017,7 +1975,7 @@ const de_SubnetGroupInUseFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupInUseFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupInUseFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2033,7 +1991,7 @@ const de_SubnetGroupNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2049,7 +2007,7 @@ const de_SubnetGroupQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2062,7 +2020,7 @@ const de_SubnetGroupQuotaExceededFaultRes = async ( */ const de_SubnetInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetInUse(body, context); + const deserialized: any = _json(body); const exception = new SubnetInUse({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2078,7 +2036,7 @@ const de_SubnetQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2091,7 +2049,7 @@ const de_SubnetQuotaExceededFaultRes = async ( */ const de_TagNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new TagNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2107,7 +2065,7 @@ const de_TagQuotaPerResourceExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagQuotaPerResourceExceeded(body, context); + const deserialized: any = _json(body); const exception = new TagQuotaPerResourceExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2115,442 +2073,114 @@ const de_TagQuotaPerResourceExceededRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AvailabilityZoneList - */ -const se_AvailabilityZoneList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AvailabilityZoneList omitted. -/** - * serializeAws_json1_1ClusterNameList - */ -const se_ClusterNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ClusterNameList omitted. -/** - * serializeAws_json1_1CreateClusterRequest - */ -const se_CreateClusterRequest = (input: CreateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_AvailabilityZoneList(input.AvailabilityZones, context), - }), - ...(input.ClusterEndpointEncryptionType != null && { - ClusterEndpointEncryptionType: input.ClusterEndpointEncryptionType, - }), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.NotificationTopicArn != null && { NotificationTopicArn: input.NotificationTopicArn }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.ReplicationFactor != null && { ReplicationFactor: input.ReplicationFactor }), - ...(input.SSESpecification != null && { SSESpecification: se_SSESpecification(input.SSESpecification, context) }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdentifierList(input.SecurityGroupIds, context), - }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateClusterRequest omitted. -/** - * serializeAws_json1_1CreateParameterGroupRequest - */ -const se_CreateParameterGroupRequest = (input: CreateParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - }; -}; +// se_CreateParameterGroupRequest omitted. -/** - * serializeAws_json1_1CreateSubnetGroupRequest - */ -const se_CreateSubnetGroupRequest = (input: CreateSubnetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdentifierList(input.SubnetIds, context) }), - }; -}; +// se_CreateSubnetGroupRequest omitted. -/** - * serializeAws_json1_1DecreaseReplicationFactorRequest - */ -const se_DecreaseReplicationFactorRequest = (input: DecreaseReplicationFactorRequest, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_AvailabilityZoneList(input.AvailabilityZones, context), - }), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.NewReplicationFactor != null && { NewReplicationFactor: input.NewReplicationFactor }), - ...(input.NodeIdsToRemove != null && { NodeIdsToRemove: se_NodeIdentifierList(input.NodeIdsToRemove, context) }), - }; -}; +// se_DecreaseReplicationFactorRequest omitted. -/** - * serializeAws_json1_1DeleteClusterRequest - */ -const se_DeleteClusterRequest = (input: DeleteClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - }; -}; +// se_DeleteClusterRequest omitted. -/** - * serializeAws_json1_1DeleteParameterGroupRequest - */ -const se_DeleteParameterGroupRequest = (input: DeleteParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - }; -}; +// se_DeleteParameterGroupRequest omitted. -/** - * serializeAws_json1_1DeleteSubnetGroupRequest - */ -const se_DeleteSubnetGroupRequest = (input: DeleteSubnetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - }; -}; +// se_DeleteSubnetGroupRequest omitted. -/** - * serializeAws_json1_1DescribeClustersRequest - */ -const se_DescribeClustersRequest = (input: DescribeClustersRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterNames != null && { ClusterNames: se_ClusterNameList(input.ClusterNames, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeClustersRequest omitted. -/** - * serializeAws_json1_1DescribeDefaultParametersRequest - */ -const se_DescribeDefaultParametersRequest = (input: DescribeDefaultParametersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeDefaultParametersRequest omitted. /** * serializeAws_json1_1DescribeEventsRequest */ const se_DescribeEventsRequest = (input: DescribeEventsRequest, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SourceName != null && { SourceName: input.SourceName }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + Duration: [], + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SourceName: [], + SourceType: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DescribeParameterGroupsRequest - */ -const se_DescribeParameterGroupsRequest = (input: DescribeParameterGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterGroupNames != null && { - ParameterGroupNames: se_ParameterGroupNameList(input.ParameterGroupNames, context), - }), - }; -}; +// se_DescribeParameterGroupsRequest omitted. -/** - * serializeAws_json1_1DescribeParametersRequest - */ -const se_DescribeParametersRequest = (input: DescribeParametersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.Source != null && { Source: input.Source }), - }; -}; +// se_DescribeParametersRequest omitted. -/** - * serializeAws_json1_1DescribeSubnetGroupsRequest - */ -const se_DescribeSubnetGroupsRequest = (input: DescribeSubnetGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SubnetGroupNames != null && { - SubnetGroupNames: se_SubnetGroupNameList(input.SubnetGroupNames, context), - }), - }; -}; +// se_DescribeSubnetGroupsRequest omitted. -/** - * serializeAws_json1_1IncreaseReplicationFactorRequest - */ -const se_IncreaseReplicationFactorRequest = (input: IncreaseReplicationFactorRequest, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_AvailabilityZoneList(input.AvailabilityZones, context), - }), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.NewReplicationFactor != null && { NewReplicationFactor: input.NewReplicationFactor }), - }; -}; +// se_IncreaseReplicationFactorRequest omitted. -/** - * serializeAws_json1_1KeyList - */ -const se_KeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KeyList omitted. -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - }; -}; +// se_ListTagsRequest omitted. -/** - * serializeAws_json1_1NodeIdentifierList - */ -const se_NodeIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NodeIdentifierList omitted. -/** - * serializeAws_json1_1ParameterGroupNameList - */ -const se_ParameterGroupNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ParameterGroupNameList omitted. -/** - * serializeAws_json1_1ParameterNameValue - */ -const se_ParameterNameValue = (input: ParameterNameValue, context: __SerdeContext): any => { - return { - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.ParameterValue != null && { ParameterValue: input.ParameterValue }), - }; -}; +// se_ParameterNameValue omitted. -/** - * serializeAws_json1_1ParameterNameValueList - */ -const se_ParameterNameValueList = (input: ParameterNameValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterNameValue(entry, context); - }); -}; +// se_ParameterNameValueList omitted. -/** - * serializeAws_json1_1RebootNodeRequest - */ -const se_RebootNodeRequest = (input: RebootNodeRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.NodeId != null && { NodeId: input.NodeId }), - }; -}; +// se_RebootNodeRequest omitted. -/** - * serializeAws_json1_1SecurityGroupIdentifierList - */ -const se_SecurityGroupIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIdentifierList omitted. -/** - * serializeAws_json1_1SSESpecification - */ -const se_SSESpecification = (input: SSESpecification, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_SSESpecification omitted. -/** - * serializeAws_json1_1SubnetGroupNameList - */ -const se_SubnetGroupNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetGroupNameList omitted. -/** - * serializeAws_json1_1SubnetIdentifierList - */ -const se_SubnetIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIdentifierList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - ...(input.TagKeys != null && { TagKeys: se_KeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateClusterRequest - */ -const se_UpdateClusterRequest = (input: UpdateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.NotificationTopicArn != null && { NotificationTopicArn: input.NotificationTopicArn }), - ...(input.NotificationTopicStatus != null && { NotificationTopicStatus: input.NotificationTopicStatus }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdentifierList(input.SecurityGroupIds, context), - }), - }; -}; +// se_UpdateClusterRequest omitted. -/** - * serializeAws_json1_1UpdateParameterGroupRequest - */ -const se_UpdateParameterGroupRequest = (input: UpdateParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.ParameterNameValues != null && { - ParameterNameValues: se_ParameterNameValueList(input.ParameterNameValues, context), - }), - }; -}; +// se_UpdateParameterGroupRequest omitted. -/** - * serializeAws_json1_1UpdateSubnetGroupRequest - */ -const se_UpdateSubnetGroupRequest = (input: UpdateSubnetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdentifierList(input.SubnetIds, context) }), - }; -}; +// se_UpdateSubnetGroupRequest omitted. /** * deserializeAws_json1_1Cluster */ const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - ActiveNodes: __expectInt32(output.ActiveNodes), - ClusterArn: __expectString(output.ClusterArn), - ClusterDiscoveryEndpoint: - output.ClusterDiscoveryEndpoint != null ? de_Endpoint(output.ClusterDiscoveryEndpoint, context) : undefined, - ClusterEndpointEncryptionType: __expectString(output.ClusterEndpointEncryptionType), - ClusterName: __expectString(output.ClusterName), - Description: __expectString(output.Description), - IamRoleArn: __expectString(output.IamRoleArn), - NodeIdsToRemove: - output.NodeIdsToRemove != null ? de_NodeIdentifierList(output.NodeIdsToRemove, context) : undefined, - NodeType: __expectString(output.NodeType), - Nodes: output.Nodes != null ? de_NodeList(output.Nodes, context) : undefined, - NotificationConfiguration: - output.NotificationConfiguration != null - ? de_NotificationConfiguration(output.NotificationConfiguration, context) - : undefined, - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroupStatus(output.ParameterGroup, context) : undefined, - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - SSEDescription: output.SSEDescription != null ? de_SSEDescription(output.SSEDescription, context) : undefined, - SecurityGroups: - output.SecurityGroups != null ? de_SecurityGroupMembershipList(output.SecurityGroups, context) : undefined, - Status: __expectString(output.Status), - SubnetGroup: __expectString(output.SubnetGroup), - TotalNodes: __expectInt32(output.TotalNodes), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterAlreadyExistsFault - */ -const de_ClusterAlreadyExistsFault = (output: any, context: __SerdeContext): ClusterAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; + return take(output, { + ActiveNodes: __expectInt32, + ClusterArn: __expectString, + ClusterDiscoveryEndpoint: _json, + ClusterEndpointEncryptionType: __expectString, + ClusterName: __expectString, + Description: __expectString, + IamRoleArn: __expectString, + NodeIdsToRemove: _json, + NodeType: __expectString, + Nodes: (_: any) => de_NodeList(_, context), + NotificationConfiguration: _json, + ParameterGroup: _json, + PreferredMaintenanceWindow: __expectString, + SSEDescription: _json, + SecurityGroups: _json, + Status: __expectString, + SubnetGroup: __expectString, + TotalNodes: __expectInt32, + }) as any; +}; + +// de_ClusterAlreadyExistsFault omitted. /** * deserializeAws_json1_1ClusterList @@ -2559,61 +2189,27 @@ const de_ClusterList = (output: any, context: __SerdeContext): Cluster[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Cluster(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ClusterNotFoundFault - */ -const de_ClusterNotFoundFault = (output: any, context: __SerdeContext): ClusterNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ClusterNotFoundFault omitted. -/** - * deserializeAws_json1_1ClusterQuotaForCustomerExceededFault - */ -const de_ClusterQuotaForCustomerExceededFault = ( - output: any, - context: __SerdeContext -): ClusterQuotaForCustomerExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ClusterQuotaForCustomerExceededFault omitted. /** * deserializeAws_json1_1CreateClusterResponse */ const de_CreateClusterResponse = (output: any, context: __SerdeContext): CreateClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateParameterGroupResponse - */ -const de_CreateParameterGroupResponse = (output: any, context: __SerdeContext): CreateParameterGroupResponse => { - return { - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroup(output.ParameterGroup, context) : undefined, - } as any; -}; +// de_CreateParameterGroupResponse omitted. -/** - * deserializeAws_json1_1CreateSubnetGroupResponse - */ -const de_CreateSubnetGroupResponse = (output: any, context: __SerdeContext): CreateSubnetGroupResponse => { - return { - SubnetGroup: output.SubnetGroup != null ? de_SubnetGroup(output.SubnetGroup, context) : undefined, - } as any; -}; +// de_CreateSubnetGroupResponse omitted. /** * deserializeAws_json1_1DecreaseReplicationFactorResponse @@ -2622,123 +2218,64 @@ const de_DecreaseReplicationFactorResponse = ( output: any, context: __SerdeContext ): DecreaseReplicationFactorResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteClusterResponse */ const de_DeleteClusterResponse = (output: any, context: __SerdeContext): DeleteClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteParameterGroupResponse - */ -const de_DeleteParameterGroupResponse = (output: any, context: __SerdeContext): DeleteParameterGroupResponse => { - return { - DeletionMessage: __expectString(output.DeletionMessage), - } as any; -}; +// de_DeleteParameterGroupResponse omitted. -/** - * deserializeAws_json1_1DeleteSubnetGroupResponse - */ -const de_DeleteSubnetGroupResponse = (output: any, context: __SerdeContext): DeleteSubnetGroupResponse => { - return { - DeletionMessage: __expectString(output.DeletionMessage), - } as any; -}; +// de_DeleteSubnetGroupResponse omitted. /** * deserializeAws_json1_1DescribeClustersResponse */ const de_DescribeClustersResponse = (output: any, context: __SerdeContext): DescribeClustersResponse => { - return { - Clusters: output.Clusters != null ? de_ClusterList(output.Clusters, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Clusters: (_: any) => de_ClusterList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeDefaultParametersResponse - */ -const de_DescribeDefaultParametersResponse = ( - output: any, - context: __SerdeContext -): DescribeDefaultParametersResponse => { - return { - NextToken: __expectString(output.NextToken), - Parameters: output.Parameters != null ? de_ParameterList(output.Parameters, context) : undefined, - } as any; -}; +// de_DescribeDefaultParametersResponse omitted. /** * deserializeAws_json1_1DescribeEventsResponse */ const de_DescribeEventsResponse = (output: any, context: __SerdeContext): DescribeEventsResponse => { - return { - Events: output.Events != null ? de_EventList(output.Events, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Events: (_: any) => de_EventList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeParameterGroupsResponse - */ -const de_DescribeParameterGroupsResponse = (output: any, context: __SerdeContext): DescribeParameterGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - ParameterGroups: - output.ParameterGroups != null ? de_ParameterGroupList(output.ParameterGroups, context) : undefined, - } as any; -}; +// de_DescribeParameterGroupsResponse omitted. -/** - * deserializeAws_json1_1DescribeParametersResponse - */ -const de_DescribeParametersResponse = (output: any, context: __SerdeContext): DescribeParametersResponse => { - return { - NextToken: __expectString(output.NextToken), - Parameters: output.Parameters != null ? de_ParameterList(output.Parameters, context) : undefined, - } as any; -}; +// de_DescribeParametersResponse omitted. -/** - * deserializeAws_json1_1DescribeSubnetGroupsResponse - */ -const de_DescribeSubnetGroupsResponse = (output: any, context: __SerdeContext): DescribeSubnetGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - SubnetGroups: output.SubnetGroups != null ? de_SubnetGroupList(output.SubnetGroups, context) : undefined, - } as any; -}; +// de_DescribeSubnetGroupsResponse omitted. -/** - * deserializeAws_json1_1Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Address: __expectString(output.Address), - Port: __expectInt32(output.Port), - URL: __expectString(output.URL), - } as any; -}; +// de_Endpoint omitted. /** * deserializeAws_json1_1Event */ const de_Event = (output: any, context: __SerdeContext): Event => { - return { - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - Message: __expectString(output.Message), - SourceName: __expectString(output.SourceName), - SourceType: __expectString(output.SourceType), - } as any; + return take(output, { + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + SourceName: __expectString, + SourceType: __expectString, + }) as any; }; /** @@ -2748,9 +2285,6 @@ const de_EventList = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Event(entry, context); }); return retVal; @@ -2763,130 +2297,44 @@ const de_IncreaseReplicationFactorResponse = ( output: any, context: __SerdeContext ): IncreaseReplicationFactorResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InsufficientClusterCapacityFault - */ -const de_InsufficientClusterCapacityFault = ( - output: any, - context: __SerdeContext -): InsufficientClusterCapacityFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InsufficientClusterCapacityFault omitted. -/** - * deserializeAws_json1_1InvalidARNFault - */ -const de_InvalidARNFault = (output: any, context: __SerdeContext): InvalidARNFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidARNFault omitted. -/** - * deserializeAws_json1_1InvalidClusterStateFault - */ -const de_InvalidClusterStateFault = (output: any, context: __SerdeContext): InvalidClusterStateFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidClusterStateFault omitted. -/** - * deserializeAws_json1_1InvalidParameterCombinationException - */ -const de_InvalidParameterCombinationException = ( - output: any, - context: __SerdeContext -): InvalidParameterCombinationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterCombinationException omitted. -/** - * deserializeAws_json1_1InvalidParameterGroupStateFault - */ -const de_InvalidParameterGroupStateFault = (output: any, context: __SerdeContext): InvalidParameterGroupStateFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterGroupStateFault omitted. -/** - * deserializeAws_json1_1InvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterValueException omitted. -/** - * deserializeAws_json1_1InvalidSubnet - */ -const de_InvalidSubnet = (output: any, context: __SerdeContext): InvalidSubnet => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidSubnet omitted. -/** - * deserializeAws_json1_1InvalidVPCNetworkStateFault - */ -const de_InvalidVPCNetworkStateFault = (output: any, context: __SerdeContext): InvalidVPCNetworkStateFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidVPCNetworkStateFault omitted. -/** - * deserializeAws_json1_1ListTagsResponse - */ -const de_ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsResponse omitted. /** * deserializeAws_json1_1Node */ const de_Node = (output: any, context: __SerdeContext): Node => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - Endpoint: output.Endpoint != null ? de_Endpoint(output.Endpoint, context) : undefined, - NodeCreateTime: - output.NodeCreateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NodeCreateTime))) - : undefined, - NodeId: __expectString(output.NodeId), - NodeStatus: __expectString(output.NodeStatus), - ParameterGroupStatus: __expectString(output.ParameterGroupStatus), - } as any; + return take(output, { + AvailabilityZone: __expectString, + Endpoint: _json, + NodeCreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NodeId: __expectString, + NodeStatus: __expectString, + ParameterGroupStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1NodeIdentifierList - */ -const de_NodeIdentifierList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NodeIdentifierList omitted. /** * deserializeAws_json1_1NodeList @@ -2895,440 +2343,102 @@ const de_NodeList = (output: any, context: __SerdeContext): Node[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Node(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NodeNotFoundFault - */ -const de_NodeNotFoundFault = (output: any, context: __SerdeContext): NodeNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_NodeNotFoundFault omitted. -/** - * deserializeAws_json1_1NodeQuotaForClusterExceededFault - */ -const de_NodeQuotaForClusterExceededFault = ( - output: any, - context: __SerdeContext -): NodeQuotaForClusterExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_NodeQuotaForClusterExceededFault omitted. -/** - * deserializeAws_json1_1NodeQuotaForCustomerExceededFault - */ -const de_NodeQuotaForCustomerExceededFault = ( - output: any, - context: __SerdeContext -): NodeQuotaForCustomerExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_NodeQuotaForCustomerExceededFault omitted. -/** - * deserializeAws_json1_1NodeTypeSpecificValue - */ -const de_NodeTypeSpecificValue = (output: any, context: __SerdeContext): NodeTypeSpecificValue => { - return { - NodeType: __expectString(output.NodeType), - Value: __expectString(output.Value), - } as any; -}; +// de_NodeTypeSpecificValue omitted. -/** - * deserializeAws_json1_1NodeTypeSpecificValueList - */ -const de_NodeTypeSpecificValueList = (output: any, context: __SerdeContext): NodeTypeSpecificValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NodeTypeSpecificValue(entry, context); - }); - return retVal; -}; +// de_NodeTypeSpecificValueList omitted. -/** - * deserializeAws_json1_1NotificationConfiguration - */ -const de_NotificationConfiguration = (output: any, context: __SerdeContext): NotificationConfiguration => { - return { - TopicArn: __expectString(output.TopicArn), - TopicStatus: __expectString(output.TopicStatus), - } as any; -}; +// de_NotificationConfiguration omitted. -/** - * deserializeAws_json1_1Parameter - */ -const de_Parameter = (output: any, context: __SerdeContext): Parameter => { - return { - AllowedValues: __expectString(output.AllowedValues), - ChangeType: __expectString(output.ChangeType), - DataType: __expectString(output.DataType), - Description: __expectString(output.Description), - IsModifiable: __expectString(output.IsModifiable), - NodeTypeSpecificValues: - output.NodeTypeSpecificValues != null - ? de_NodeTypeSpecificValueList(output.NodeTypeSpecificValues, context) - : undefined, - ParameterName: __expectString(output.ParameterName), - ParameterType: __expectString(output.ParameterType), - ParameterValue: __expectString(output.ParameterValue), - Source: __expectString(output.Source), - } as any; -}; - -/** - * deserializeAws_json1_1ParameterGroup - */ -const de_ParameterGroup = (output: any, context: __SerdeContext): ParameterGroup => { - return { - Description: __expectString(output.Description), - ParameterGroupName: __expectString(output.ParameterGroupName), - } as any; -}; +// de_Parameter omitted. -/** - * deserializeAws_json1_1ParameterGroupAlreadyExistsFault - */ -const de_ParameterGroupAlreadyExistsFault = ( - output: any, - context: __SerdeContext -): ParameterGroupAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ParameterGroup omitted. -/** - * deserializeAws_json1_1ParameterGroupList - */ -const de_ParameterGroupList = (output: any, context: __SerdeContext): ParameterGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterGroup(entry, context); - }); - return retVal; -}; +// de_ParameterGroupAlreadyExistsFault omitted. -/** - * deserializeAws_json1_1ParameterGroupNotFoundFault - */ -const de_ParameterGroupNotFoundFault = (output: any, context: __SerdeContext): ParameterGroupNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ParameterGroupList omitted. -/** - * deserializeAws_json1_1ParameterGroupQuotaExceededFault - */ -const de_ParameterGroupQuotaExceededFault = ( - output: any, - context: __SerdeContext -): ParameterGroupQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ParameterGroupNotFoundFault omitted. -/** - * deserializeAws_json1_1ParameterGroupStatus - */ -const de_ParameterGroupStatus = (output: any, context: __SerdeContext): ParameterGroupStatus => { - return { - NodeIdsToReboot: - output.NodeIdsToReboot != null ? de_NodeIdentifierList(output.NodeIdsToReboot, context) : undefined, - ParameterApplyStatus: __expectString(output.ParameterApplyStatus), - ParameterGroupName: __expectString(output.ParameterGroupName), - } as any; -}; +// de_ParameterGroupQuotaExceededFault omitted. -/** - * deserializeAws_json1_1ParameterList - */ -const de_ParameterList = (output: any, context: __SerdeContext): Parameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parameter(entry, context); - }); - return retVal; -}; +// de_ParameterGroupStatus omitted. + +// de_ParameterList omitted. /** * deserializeAws_json1_1RebootNodeResponse */ const de_RebootNodeResponse = (output: any, context: __SerdeContext): RebootNodeResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SecurityGroupMembership - */ -const de_SecurityGroupMembership = (output: any, context: __SerdeContext): SecurityGroupMembership => { - return { - SecurityGroupIdentifier: __expectString(output.SecurityGroupIdentifier), - Status: __expectString(output.Status), - } as any; -}; +// de_SecurityGroupMembership omitted. -/** - * deserializeAws_json1_1SecurityGroupMembershipList - */ -const de_SecurityGroupMembershipList = (output: any, context: __SerdeContext): SecurityGroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityGroupMembership(entry, context); - }); - return retVal; -}; +// de_SecurityGroupMembershipList omitted. -/** - * deserializeAws_json1_1ServiceLinkedRoleNotFoundFault - */ -const de_ServiceLinkedRoleNotFoundFault = (output: any, context: __SerdeContext): ServiceLinkedRoleNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceLinkedRoleNotFoundFault omitted. -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return {} as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_1SSEDescription - */ -const de_SSEDescription = (output: any, context: __SerdeContext): SSEDescription => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_SSEDescription omitted. -/** - * deserializeAws_json1_1Subnet - */ -const de_Subnet = (output: any, context: __SerdeContext): Subnet => { - return { - SubnetAvailabilityZone: __expectString(output.SubnetAvailabilityZone), - SubnetIdentifier: __expectString(output.SubnetIdentifier), - } as any; -}; +// de_Subnet omitted. -/** - * deserializeAws_json1_1SubnetGroup - */ -const de_SubnetGroup = (output: any, context: __SerdeContext): SubnetGroup => { - return { - Description: __expectString(output.Description), - SubnetGroupName: __expectString(output.SubnetGroupName), - Subnets: output.Subnets != null ? de_SubnetList(output.Subnets, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_SubnetGroup omitted. -/** - * deserializeAws_json1_1SubnetGroupAlreadyExistsFault - */ -const de_SubnetGroupAlreadyExistsFault = (output: any, context: __SerdeContext): SubnetGroupAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupAlreadyExistsFault omitted. -/** - * deserializeAws_json1_1SubnetGroupInUseFault - */ -const de_SubnetGroupInUseFault = (output: any, context: __SerdeContext): SubnetGroupInUseFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupInUseFault omitted. -/** - * deserializeAws_json1_1SubnetGroupList - */ -const de_SubnetGroupList = (output: any, context: __SerdeContext): SubnetGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubnetGroup(entry, context); - }); - return retVal; -}; +// de_SubnetGroupList omitted. -/** - * deserializeAws_json1_1SubnetGroupNotFoundFault - */ -const de_SubnetGroupNotFoundFault = (output: any, context: __SerdeContext): SubnetGroupNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupNotFoundFault omitted. -/** - * deserializeAws_json1_1SubnetGroupQuotaExceededFault - */ -const de_SubnetGroupQuotaExceededFault = (output: any, context: __SerdeContext): SubnetGroupQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupQuotaExceededFault omitted. -/** - * deserializeAws_json1_1SubnetInUse - */ -const de_SubnetInUse = (output: any, context: __SerdeContext): SubnetInUse => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetInUse omitted. -/** - * deserializeAws_json1_1SubnetList - */ -const de_SubnetList = (output: any, context: __SerdeContext): Subnet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subnet(entry, context); - }); - return retVal; -}; +// de_SubnetList omitted. -/** - * deserializeAws_json1_1SubnetQuotaExceededFault - */ -const de_SubnetQuotaExceededFault = (output: any, context: __SerdeContext): SubnetQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetQuotaExceededFault omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagNotFoundFault - */ -const de_TagNotFoundFault = (output: any, context: __SerdeContext): TagNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagNotFoundFault omitted. -/** - * deserializeAws_json1_1TagQuotaPerResourceExceeded - */ -const de_TagQuotaPerResourceExceeded = (output: any, context: __SerdeContext): TagQuotaPerResourceExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagQuotaPerResourceExceeded omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateClusterResponse */ const de_UpdateClusterResponse = (output: any, context: __SerdeContext): UpdateClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateParameterGroupResponse - */ -const de_UpdateParameterGroupResponse = (output: any, context: __SerdeContext): UpdateParameterGroupResponse => { - return { - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroup(output.ParameterGroup, context) : undefined, - } as any; -}; +// de_UpdateParameterGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateSubnetGroupResponse - */ -const de_UpdateSubnetGroupResponse = (output: any, context: __SerdeContext): UpdateSubnetGroupResponse => { - return { - SubnetGroup: output.SubnetGroup != null ? de_SubnetGroup(output.SubnetGroup, context) : undefined, - } as any; -}; +// de_UpdateSubnetGroupResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3350,6 +2460,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-detective/src/protocols/Aws_restJson1.ts b/clients/client-detective/src/protocols/Aws_restJson1.ts index 19ee154b8178..16df11c07dca 100644 --- a/clients/client-detective/src/protocols/Aws_restJson1.ts +++ b/clients/client-detective/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -9,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -98,8 +100,6 @@ import { ServiceQuotaExceededException, TimestampForCollection, TooManyRequestsException, - UnprocessedAccount, - UnprocessedGraph, ValidationException, } from "../models/models_0"; @@ -116,9 +116,11 @@ export const se_AcceptInvitationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitation"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -143,10 +145,12 @@ export const se_BatchGetGraphMemberDatasourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/datasources/get"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdExtendedList(input.AccountIds, context) }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -172,9 +176,11 @@ export const se_BatchGetMembershipDatasourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/membership/datasources/get"; let body: any; - body = JSON.stringify({ - ...(input.GraphArns != null && { GraphArns: se_GraphArnList(input.GraphArns, context) }), - }); + body = JSON.stringify( + take(input, { + GraphArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -199,9 +205,11 @@ export const se_CreateGraphCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph"; let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -226,12 +234,14 @@ export const se_CreateMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members"; let body: any; - body = JSON.stringify({ - ...(input.Accounts != null && { Accounts: se_AccountList(input.Accounts, context) }), - ...(input.DisableEmailNotification != null && { DisableEmailNotification: input.DisableEmailNotification }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - ...(input.Message != null && { Message: input.Message }), - }); + body = JSON.stringify( + take(input, { + Accounts: (_) => _json(_), + DisableEmailNotification: [], + GraphArn: [], + Message: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -256,9 +266,11 @@ export const se_DeleteGraphCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/removal"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -283,10 +295,12 @@ export const se_DeleteMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members/removal"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -312,9 +326,11 @@ export const se_DescribeOrganizationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/describeOrganizationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -365,9 +381,11 @@ export const se_DisassociateMembershipCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/membership/removal"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -393,9 +411,11 @@ export const se_EnableOrganizationAdminAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/enableAdminAccount"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -420,10 +440,12 @@ export const se_GetMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members/get"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -449,11 +471,13 @@ export const se_ListDatasourcePackagesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/datasources/list"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -478,10 +502,12 @@ export const se_ListGraphsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graphs/list"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -506,10 +532,12 @@ export const se_ListInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/list"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -534,11 +562,13 @@ export const se_ListMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/members/list"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -564,10 +594,12 @@ export const se_ListOrganizationAdminAccountsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/adminAccountslist"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -615,9 +647,11 @@ export const se_RejectInvitationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitation/removal"; let body: any; - body = JSON.stringify({ - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -643,10 +677,12 @@ export const se_StartMonitoringMemberCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/member/monitoringstate"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -672,9 +708,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -730,12 +768,12 @@ export const se_UpdateDatasourcePackagesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/graph/datasources/update"; let body: any; - body = JSON.stringify({ - ...(input.DatasourcePackages != null && { - DatasourcePackages: se_DatasourcePackageList(input.DatasourcePackages, context), - }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + DatasourcePackages: (_) => _json(_), + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -761,10 +799,12 @@ export const se_UpdateOrganizationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orgs/updateOrganizationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.AutoEnable != null && { AutoEnable: input.AutoEnable }), - ...(input.GraphArn != null && { GraphArn: input.GraphArn }), - }); + body = JSON.stringify( + take(input, { + AutoEnable: [], + GraphArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -823,10 +863,9 @@ const de_AcceptInvitationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -846,12 +885,11 @@ export const de_BatchGetGraphMemberDatasourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MemberDatasources != null) { - contents.MemberDatasources = de_MembershipDatasourcesList(data.MemberDatasources, context); - } - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccountList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + MemberDatasources: (_) => de_MembershipDatasourcesList(_, context), + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -882,10 +920,9 @@ const de_BatchGetGraphMemberDatasourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -905,12 +942,11 @@ export const de_BatchGetMembershipDatasourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MembershipDatasources != null) { - contents.MembershipDatasources = de_MembershipDatasourcesList(data.MembershipDatasources, context); - } - if (data.UnprocessedGraphs != null) { - contents.UnprocessedGraphs = de_UnprocessedGraphList(data.UnprocessedGraphs, context); - } + const doc = take(data, { + MembershipDatasources: (_) => de_MembershipDatasourcesList(_, context), + UnprocessedGraphs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -941,10 +977,9 @@ const de_BatchGetMembershipDatasourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -964,9 +999,10 @@ export const de_CreateGraphCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GraphArn != null) { - contents.GraphArn = __expectString(data.GraphArn); - } + const doc = take(data, { + GraphArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -997,10 +1033,9 @@ const de_CreateGraphCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1020,12 +1055,11 @@ export const de_CreateMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Members != null) { - contents.Members = de_MemberDetailList(data.Members, context); - } - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccountList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + Members: (_) => de_MemberDetailList(_, context), + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1059,10 +1093,9 @@ const de_CreateMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1112,10 +1145,9 @@ const de_DeleteGraphCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1135,12 +1167,11 @@ export const de_DeleteMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountIds != null) { - contents.AccountIds = de_AccountIdList(data.AccountIds, context); - } - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccountList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + AccountIds: _json, + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1174,10 +1205,9 @@ const de_DeleteMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1197,9 +1227,10 @@ export const de_DescribeOrganizationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AutoEnable != null) { - contents.AutoEnable = __expectBoolean(data.AutoEnable); - } + const doc = take(data, { + AutoEnable: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1230,10 +1261,9 @@ const de_DescribeOrganizationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1283,10 +1313,9 @@ const de_DisableOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1339,10 +1368,9 @@ const de_DisassociateMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1392,10 +1420,9 @@ const de_EnableOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1415,12 +1442,11 @@ export const de_GetMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MemberDetails != null) { - contents.MemberDetails = de_MemberDetailList(data.MemberDetails, context); - } - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccountList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + MemberDetails: (_) => de_MemberDetailList(_, context), + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1451,10 +1477,9 @@ const de_GetMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,12 +1499,11 @@ export const de_ListDatasourcePackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DatasourcePackages != null) { - contents.DatasourcePackages = de_DatasourcePackageIngestDetails(data.DatasourcePackages, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DatasourcePackages: (_) => de_DatasourcePackageIngestDetails(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1510,10 +1534,9 @@ const de_ListDatasourcePackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,12 +1556,11 @@ export const de_ListGraphsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GraphList != null) { - contents.GraphList = de_GraphList(data.GraphList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + GraphList: (_) => de_GraphList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1566,10 +1588,9 @@ const de_ListGraphsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1589,12 +1610,11 @@ export const de_ListInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Invitations != null) { - contents.Invitations = de_MemberDetailList(data.Invitations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Invitations: (_) => de_MemberDetailList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1622,10 +1642,9 @@ const de_ListInvitationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1645,12 +1664,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MemberDetails != null) { - contents.MemberDetails = de_MemberDetailList(data.MemberDetails, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MemberDetails: (_) => de_MemberDetailList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1681,10 +1699,9 @@ const de_ListMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1704,12 +1721,11 @@ export const de_ListOrganizationAdminAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Administrators != null) { - contents.Administrators = de_AdministratorList(data.Administrators, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Administrators: (_) => de_AdministratorList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1740,10 +1756,9 @@ const de_ListOrganizationAdminAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1763,9 +1778,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1796,10 +1812,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1852,10 +1867,9 @@ const de_RejectInvitationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1911,10 +1925,9 @@ const de_StartMonitoringMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1964,10 +1977,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2017,10 +2029,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2073,10 +2084,9 @@ const de_UpdateDatasourcePackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2126,16 +2136,15 @@ const de_UpdateOrganizationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2145,21 +2154,14 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.ErrorCodeReason != null) { - contents.ErrorCodeReason = __expectString(data.ErrorCodeReason); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.SubErrorCode != null) { - contents.SubErrorCode = __expectString(data.SubErrorCode); - } - if (data.SubErrorCodeReason != null) { - contents.SubErrorCodeReason = __expectString(data.SubErrorCodeReason); - } + const doc = take(data, { + ErrorCode: __expectString, + ErrorCodeReason: __expectString, + Message: __expectString, + SubErrorCode: __expectString, + SubErrorCodeReason: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2173,9 +2175,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2192,9 +2195,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2211,9 +2215,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2230,12 +2235,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Resources != null) { - contents.Resources = de_ResourceList(data.Resources, context); - } + const doc = take(data, { + Message: __expectString, + Resources: _json, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2252,9 +2256,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2268,15 +2273,12 @@ const de_TooManyRequestsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.ErrorCodeReason != null) { - contents.ErrorCodeReason = __expectString(data.ErrorCodeReason); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + ErrorCodeReason: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2284,111 +2286,31 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Account - */ -const se_Account = (input: Account, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - }; -}; +// se_Account omitted. -/** - * serializeAws_restJson1AccountIdExtendedList - */ -const se_AccountIdExtendedList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdExtendedList omitted. -/** - * serializeAws_restJson1AccountIdList - */ -const se_AccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdList omitted. -/** - * serializeAws_restJson1AccountList - */ -const se_AccountList = (input: Account[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Account(entry, context); - }); -}; +// se_AccountList omitted. -/** - * serializeAws_restJson1DatasourcePackageList - */ -const se_DatasourcePackageList = (input: (DatasourcePackage | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DatasourcePackageList omitted. -/** - * serializeAws_restJson1GraphArnList - */ -const se_GraphArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GraphArnList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1AccountIdList - */ -const de_AccountIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccountIdList omitted. /** * deserializeAws_restJson1Administrator */ const de_Administrator = (output: any, context: __SerdeContext): Administrator => { - return { - AccountId: __expectString(output.AccountId), - DelegationTime: - output.DelegationTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.DelegationTime)) - : undefined, - GraphArn: __expectString(output.GraphArn), - } as any; + return take(output, { + AccountId: __expectString, + DelegationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + GraphArn: __expectString, + }) as any; }; /** @@ -2398,9 +2320,6 @@ const de_AdministratorList = (output: any, context: __SerdeContext): Administrat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Administrator(entry, context); }); return retVal; @@ -2410,13 +2329,10 @@ const de_AdministratorList = (output: any, context: __SerdeContext): Administrat * deserializeAws_restJson1DatasourcePackageIngestDetail */ const de_DatasourcePackageIngestDetail = (output: any, context: __SerdeContext): DatasourcePackageIngestDetail => { - return { - DatasourcePackageIngestState: __expectString(output.DatasourcePackageIngestState), - LastIngestStateChange: - output.LastIngestStateChange != null - ? de_LastIngestStateChangeDates(output.LastIngestStateChange, context) - : undefined, - } as any; + return take(output, { + DatasourcePackageIngestState: __expectString, + LastIngestStateChange: (_: any) => de_LastIngestStateChangeDates(_, context), + }) as any; }; /** @@ -2457,47 +2373,26 @@ const de_DatasourcePackageIngestHistory = ( ); }; -/** - * deserializeAws_restJson1DatasourcePackageIngestStates - */ -const de_DatasourcePackageIngestStates = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DatasourcePackage | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_DatasourcePackageIngestStates omitted. /** * deserializeAws_restJson1DatasourcePackageUsageInfo */ const de_DatasourcePackageUsageInfo = (output: any, context: __SerdeContext): DatasourcePackageUsageInfo => { - return { - VolumeUsageInBytes: __expectLong(output.VolumeUsageInBytes), - VolumeUsageUpdateTime: - output.VolumeUsageUpdateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.VolumeUsageUpdateTime)) - : undefined, - } as any; + return take(output, { + VolumeUsageInBytes: __expectLong, + VolumeUsageUpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1Graph */ const de_Graph = (output: any, context: __SerdeContext): Graph => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedTime)) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2507,9 +2402,6 @@ const de_GraphList = (output: any, context: __SerdeContext): Graph[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Graph(entry, context); }); return retVal; @@ -2538,38 +2430,24 @@ const de_LastIngestStateChangeDates = ( * deserializeAws_restJson1MemberDetail */ const de_MemberDetail = (output: any, context: __SerdeContext): MemberDetail => { - return { - AccountId: __expectString(output.AccountId), - AdministratorId: __expectString(output.AdministratorId), - DatasourcePackageIngestStates: - output.DatasourcePackageIngestStates != null - ? de_DatasourcePackageIngestStates(output.DatasourcePackageIngestStates, context) - : undefined, - DisabledReason: __expectString(output.DisabledReason), - EmailAddress: __expectString(output.EmailAddress), - GraphArn: __expectString(output.GraphArn), - InvitationType: __expectString(output.InvitationType), - InvitedTime: - output.InvitedTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.InvitedTime)) : undefined, - MasterId: __expectString(output.MasterId), - PercentOfGraphUtilization: __limitedParseDouble(output.PercentOfGraphUtilization), - PercentOfGraphUtilizationUpdatedTime: - output.PercentOfGraphUtilizationUpdatedTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.PercentOfGraphUtilizationUpdatedTime)) - : undefined, - Status: __expectString(output.Status), - UpdatedTime: - output.UpdatedTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedTime)) : undefined, - VolumeUsageByDatasourcePackage: - output.VolumeUsageByDatasourcePackage != null - ? de_VolumeUsageByDatasourcePackage(output.VolumeUsageByDatasourcePackage, context) - : undefined, - VolumeUsageInBytes: __expectLong(output.VolumeUsageInBytes), - VolumeUsageUpdatedTime: - output.VolumeUsageUpdatedTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.VolumeUsageUpdatedTime)) - : undefined, - } as any; + return take(output, { + AccountId: __expectString, + AdministratorId: __expectString, + DatasourcePackageIngestStates: _json, + DisabledReason: __expectString, + EmailAddress: __expectString, + GraphArn: __expectString, + InvitationType: __expectString, + InvitedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MasterId: __expectString, + PercentOfGraphUtilization: __limitedParseDouble, + PercentOfGraphUtilizationUpdatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Status: __expectString, + UpdatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + VolumeUsageByDatasourcePackage: (_: any) => de_VolumeUsageByDatasourcePackage(_, context), + VolumeUsageInBytes: __expectLong, + VolumeUsageUpdatedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2579,9 +2457,6 @@ const de_MemberDetailList = (output: any, context: __SerdeContext): MemberDetail const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MemberDetail(entry, context); }); return retVal; @@ -2591,14 +2466,11 @@ const de_MemberDetailList = (output: any, context: __SerdeContext): MemberDetail * deserializeAws_restJson1MembershipDatasources */ const de_MembershipDatasources = (output: any, context: __SerdeContext): MembershipDatasources => { - return { - AccountId: __expectString(output.AccountId), - DatasourcePackageIngestHistory: - output.DatasourcePackageIngestHistory != null - ? de_DatasourcePackageIngestHistory(output.DatasourcePackageIngestHistory, context) - : undefined, - GraphArn: __expectString(output.GraphArn), - } as any; + return take(output, { + AccountId: __expectString, + DatasourcePackageIngestHistory: (_: any) => de_DatasourcePackageIngestHistory(_, context), + GraphArn: __expectString, + }) as any; }; /** @@ -2608,101 +2480,31 @@ const de_MembershipDatasourcesList = (output: any, context: __SerdeContext): Mem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MembershipDatasources(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ResourceList - */ -const de_ResourceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1TimestampForCollection */ const de_TimestampForCollection = (output: any, context: __SerdeContext): TimestampForCollection => { - return { - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Timestamp)) : undefined, - } as any; + return take(output, { + Timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1UnprocessedAccount - */ -const de_UnprocessedAccount = (output: any, context: __SerdeContext): UnprocessedAccount => { - return { - AccountId: __expectString(output.AccountId), - Reason: __expectString(output.Reason), - } as any; -}; +// de_UnprocessedAccount omitted. -/** - * deserializeAws_restJson1UnprocessedAccountList - */ -const de_UnprocessedAccountList = (output: any, context: __SerdeContext): UnprocessedAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedAccount(entry, context); - }); - return retVal; -}; +// de_UnprocessedAccountList omitted. -/** - * deserializeAws_restJson1UnprocessedGraph - */ -const de_UnprocessedGraph = (output: any, context: __SerdeContext): UnprocessedGraph => { - return { - GraphArn: __expectString(output.GraphArn), - Reason: __expectString(output.Reason), - } as any; -}; +// de_UnprocessedGraph omitted. -/** - * deserializeAws_restJson1UnprocessedGraphList - */ -const de_UnprocessedGraphList = (output: any, context: __SerdeContext): UnprocessedGraph[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedGraph(entry, context); - }); - return retVal; -}; +// de_UnprocessedGraphList omitted. /** * deserializeAws_restJson1VolumeUsageByDatasourcePackage diff --git a/clients/client-device-farm/src/protocols/Aws_json1_1.ts b/clients/client-device-farm/src/protocols/Aws_json1_1.ts index 3ecca986eddd..b1a472443c83 100644 --- a/clients/client-device-farm/src/protocols/Aws_json1_1.ts +++ b/clients/client-device-farm/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -197,16 +199,11 @@ import { DeviceFarmServiceException as __BaseException } from "../models/DeviceF import { AccountSettings, ArgumentException, - Artifact, CannotDeleteException, - Counters, CPU, CreateDevicePoolRequest, - CreateDevicePoolResult, CreateInstanceProfileRequest, - CreateInstanceProfileResult, CreateNetworkProfileRequest, - CreateNetworkProfileResult, CreateProjectRequest, CreateProjectResult, CreateRemoteAccessSessionConfiguration, @@ -219,53 +216,35 @@ import { CreateUploadRequest, CreateUploadResult, CreateVPCEConfigurationRequest, - CreateVPCEConfigurationResult, CustomerArtifactPaths, DeleteDevicePoolRequest, - DeleteDevicePoolResult, DeleteInstanceProfileRequest, - DeleteInstanceProfileResult, DeleteNetworkProfileRequest, - DeleteNetworkProfileResult, DeleteProjectRequest, - DeleteProjectResult, DeleteRemoteAccessSessionRequest, - DeleteRemoteAccessSessionResult, DeleteRunRequest, - DeleteRunResult, DeleteTestGridProjectRequest, - DeleteTestGridProjectResult, DeleteUploadRequest, - DeleteUploadResult, DeleteVPCEConfigurationRequest, - DeleteVPCEConfigurationResult, Device, DeviceFilter, - DeviceInstance, DeviceMinutes, - DevicePlatform, - DevicePool, DevicePoolCompatibilityResult, DeviceSelectionConfiguration, - DeviceSelectionResult, ExecutionConfiguration, ExecutionResult, GetAccountSettingsRequest, GetAccountSettingsResult, GetDeviceInstanceRequest, - GetDeviceInstanceResult, GetDevicePoolCompatibilityRequest, GetDevicePoolCompatibilityResult, GetDevicePoolRequest, - GetDevicePoolResult, GetDeviceRequest, GetDeviceResult, GetInstanceProfileRequest, - GetInstanceProfileResult, GetJobRequest, GetJobResult, GetNetworkProfileRequest, - GetNetworkProfileResult, GetOfferingStatusRequest, GetOfferingStatusResult, GetProjectRequest, @@ -285,32 +264,23 @@ import { GetUploadRequest, GetUploadResult, GetVPCEConfigurationRequest, - GetVPCEConfigurationResult, IdempotencyException, - IncompatibilityMessage, InstallToRemoteAccessSessionRequest, InstallToRemoteAccessSessionResult, - InstanceProfile, InternalServiceException, InvalidOperationException, Job, LimitExceededException, ListArtifactsRequest, - ListArtifactsResult, ListDeviceInstancesRequest, - ListDeviceInstancesResult, ListDevicePoolsRequest, - ListDevicePoolsResult, ListDevicesRequest, ListDevicesResult, ListInstanceProfilesRequest, - ListInstanceProfilesResult, ListJobsRequest, ListJobsResult, ListNetworkProfilesRequest, - ListNetworkProfilesResult, ListOfferingPromotionsRequest, - ListOfferingPromotionsResult, ListOfferingsRequest, ListOfferingsResult, ListOfferingTransactionsRequest, @@ -322,17 +292,14 @@ import { ListRunsRequest, ListRunsResult, ListSamplesRequest, - ListSamplesResult, ListSuitesRequest, ListSuitesResult, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTestGridProjectsRequest, ListTestGridProjectsResult, ListTestGridSessionActionsRequest, ListTestGridSessionActionsResult, ListTestGridSessionArtifactsRequest, - ListTestGridSessionArtifactsResult, ListTestGridSessionsRequest, ListTestGridSessionsResult, ListTestsRequest, @@ -342,18 +309,14 @@ import { ListUploadsRequest, ListUploadsResult, ListVPCEConfigurationsRequest, - ListVPCEConfigurationsResult, Location, MonetaryAmount, - NetworkProfile, NotEligibleException, NotFoundException, Offering, - OfferingPromotion, OfferingStatus, OfferingTransaction, Problem, - ProblemDetail, Project, PurchaseOfferingRequest, PurchaseOfferingResult, @@ -362,10 +325,8 @@ import { RemoteAccessSession, RenewOfferingRequest, RenewOfferingResult, - Resolution, Rule, Run, - Sample, ScheduleRunConfiguration, ScheduleRunRequest, ScheduleRunResult, @@ -382,26 +343,19 @@ import { TagOperationException, TagPolicyException, TagResourceRequest, - TagResourceResponse, Test, TestGridProject, TestGridSession, TestGridSessionAction, - TestGridSessionArtifact, TestGridVpcConfig, TooManyTagsException, TrialMinutes, UniqueProblem, UntagResourceRequest, - UntagResourceResponse, UpdateDeviceInstanceRequest, - UpdateDeviceInstanceResult, UpdateDevicePoolRequest, - UpdateDevicePoolResult, UpdateInstanceProfileRequest, - UpdateInstanceProfileResult, UpdateNetworkProfileRequest, - UpdateNetworkProfileResult, UpdateProjectRequest, UpdateProjectResult, UpdateTestGridProjectRequest, @@ -409,10 +363,8 @@ import { UpdateUploadRequest, UpdateUploadResult, UpdateVPCEConfigurationRequest, - UpdateVPCEConfigurationResult, Upload, VpcConfig, - VPCEConfiguration, } from "../models/models_0"; /** @@ -424,7 +376,7 @@ export const se_CreateDevicePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDevicePool"); let body: any; - body = JSON.stringify(se_CreateDevicePoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -437,7 +389,7 @@ export const se_CreateInstanceProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInstanceProfile"); let body: any; - body = JSON.stringify(se_CreateInstanceProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -450,7 +402,7 @@ export const se_CreateNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateNetworkProfile"); let body: any; - body = JSON.stringify(se_CreateNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -463,7 +415,7 @@ export const se_CreateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProject"); let body: any; - body = JSON.stringify(se_CreateProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -476,7 +428,7 @@ export const se_CreateRemoteAccessSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRemoteAccessSession"); let body: any; - body = JSON.stringify(se_CreateRemoteAccessSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -489,7 +441,7 @@ export const se_CreateTestGridProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTestGridProject"); let body: any; - body = JSON.stringify(se_CreateTestGridProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -502,7 +454,7 @@ export const se_CreateTestGridUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTestGridUrl"); let body: any; - body = JSON.stringify(se_CreateTestGridUrlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -515,7 +467,7 @@ export const se_CreateUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUpload"); let body: any; - body = JSON.stringify(se_CreateUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -528,7 +480,7 @@ export const se_CreateVPCEConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVPCEConfiguration"); let body: any; - body = JSON.stringify(se_CreateVPCEConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -541,7 +493,7 @@ export const se_DeleteDevicePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDevicePool"); let body: any; - body = JSON.stringify(se_DeleteDevicePoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -554,7 +506,7 @@ export const se_DeleteInstanceProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInstanceProfile"); let body: any; - body = JSON.stringify(se_DeleteInstanceProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -567,7 +519,7 @@ export const se_DeleteNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNetworkProfile"); let body: any; - body = JSON.stringify(se_DeleteNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -580,7 +532,7 @@ export const se_DeleteProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProject"); let body: any; - body = JSON.stringify(se_DeleteProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -593,7 +545,7 @@ export const se_DeleteRemoteAccessSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRemoteAccessSession"); let body: any; - body = JSON.stringify(se_DeleteRemoteAccessSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -606,7 +558,7 @@ export const se_DeleteRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRun"); let body: any; - body = JSON.stringify(se_DeleteRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -619,7 +571,7 @@ export const se_DeleteTestGridProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTestGridProject"); let body: any; - body = JSON.stringify(se_DeleteTestGridProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -632,7 +584,7 @@ export const se_DeleteUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUpload"); let body: any; - body = JSON.stringify(se_DeleteUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -645,7 +597,7 @@ export const se_DeleteVPCEConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVPCEConfiguration"); let body: any; - body = JSON.stringify(se_DeleteVPCEConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -658,7 +610,7 @@ export const se_GetAccountSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccountSettings"); let body: any; - body = JSON.stringify(se_GetAccountSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -671,7 +623,7 @@ export const se_GetDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDevice"); let body: any; - body = JSON.stringify(se_GetDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -684,7 +636,7 @@ export const se_GetDeviceInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeviceInstance"); let body: any; - body = JSON.stringify(se_GetDeviceInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -697,7 +649,7 @@ export const se_GetDevicePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDevicePool"); let body: any; - body = JSON.stringify(se_GetDevicePoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -723,7 +675,7 @@ export const se_GetInstanceProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstanceProfile"); let body: any; - body = JSON.stringify(se_GetInstanceProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -733,7 +685,7 @@ export const se_GetInstanceProfileCommand = async ( export const se_GetJobCommand = async (input: GetJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJob"); let body: any; - body = JSON.stringify(se_GetJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -746,7 +698,7 @@ export const se_GetNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNetworkProfile"); let body: any; - body = JSON.stringify(se_GetNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -759,7 +711,7 @@ export const se_GetOfferingStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOfferingStatus"); let body: any; - body = JSON.stringify(se_GetOfferingStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -772,7 +724,7 @@ export const se_GetProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetProject"); let body: any; - body = JSON.stringify(se_GetProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -785,7 +737,7 @@ export const se_GetRemoteAccessSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRemoteAccessSession"); let body: any; - body = JSON.stringify(se_GetRemoteAccessSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -795,7 +747,7 @@ export const se_GetRemoteAccessSessionCommand = async ( export const se_GetRunCommand = async (input: GetRunCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRun"); let body: any; - body = JSON.stringify(se_GetRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -808,7 +760,7 @@ export const se_GetSuiteCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSuite"); let body: any; - body = JSON.stringify(se_GetSuiteRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -821,7 +773,7 @@ export const se_GetTestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTest"); let body: any; - body = JSON.stringify(se_GetTestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -834,7 +786,7 @@ export const se_GetTestGridProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTestGridProject"); let body: any; - body = JSON.stringify(se_GetTestGridProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -847,7 +799,7 @@ export const se_GetTestGridSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTestGridSession"); let body: any; - body = JSON.stringify(se_GetTestGridSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -860,7 +812,7 @@ export const se_GetUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUpload"); let body: any; - body = JSON.stringify(se_GetUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -873,7 +825,7 @@ export const se_GetVPCEConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVPCEConfiguration"); let body: any; - body = JSON.stringify(se_GetVPCEConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -886,7 +838,7 @@ export const se_InstallToRemoteAccessSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InstallToRemoteAccessSession"); let body: any; - body = JSON.stringify(se_InstallToRemoteAccessSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -899,7 +851,7 @@ export const se_ListArtifactsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListArtifacts"); let body: any; - body = JSON.stringify(se_ListArtifactsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -912,7 +864,7 @@ export const se_ListDeviceInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeviceInstances"); let body: any; - body = JSON.stringify(se_ListDeviceInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -925,7 +877,7 @@ export const se_ListDevicePoolsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDevicePools"); let body: any; - body = JSON.stringify(se_ListDevicePoolsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -938,7 +890,7 @@ export const se_ListDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDevices"); let body: any; - body = JSON.stringify(se_ListDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -951,7 +903,7 @@ export const se_ListInstanceProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInstanceProfiles"); let body: any; - body = JSON.stringify(se_ListInstanceProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -964,7 +916,7 @@ export const se_ListJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListJobs"); let body: any; - body = JSON.stringify(se_ListJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -977,7 +929,7 @@ export const se_ListNetworkProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListNetworkProfiles"); let body: any; - body = JSON.stringify(se_ListNetworkProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -990,7 +942,7 @@ export const se_ListOfferingPromotionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOfferingPromotions"); let body: any; - body = JSON.stringify(se_ListOfferingPromotionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1003,7 +955,7 @@ export const se_ListOfferingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOfferings"); let body: any; - body = JSON.stringify(se_ListOfferingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1016,7 +968,7 @@ export const se_ListOfferingTransactionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOfferingTransactions"); let body: any; - body = JSON.stringify(se_ListOfferingTransactionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1029,7 +981,7 @@ export const se_ListProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProjects"); let body: any; - body = JSON.stringify(se_ListProjectsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1042,7 +994,7 @@ export const se_ListRemoteAccessSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRemoteAccessSessions"); let body: any; - body = JSON.stringify(se_ListRemoteAccessSessionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1055,7 +1007,7 @@ export const se_ListRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuns"); let body: any; - body = JSON.stringify(se_ListRunsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1068,7 +1020,7 @@ export const se_ListSamplesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSamples"); let body: any; - body = JSON.stringify(se_ListSamplesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1081,7 +1033,7 @@ export const se_ListSuitesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSuites"); let body: any; - body = JSON.stringify(se_ListSuitesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1094,7 +1046,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1107,7 +1059,7 @@ export const se_ListTestGridProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTestGridProjects"); let body: any; - body = JSON.stringify(se_ListTestGridProjectsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1120,7 +1072,7 @@ export const se_ListTestGridSessionActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTestGridSessionActions"); let body: any; - body = JSON.stringify(se_ListTestGridSessionActionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1133,7 +1085,7 @@ export const se_ListTestGridSessionArtifactsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTestGridSessionArtifacts"); let body: any; - body = JSON.stringify(se_ListTestGridSessionArtifactsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1159,7 +1111,7 @@ export const se_ListTestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTests"); let body: any; - body = JSON.stringify(se_ListTestsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1172,7 +1124,7 @@ export const se_ListUniqueProblemsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUniqueProblems"); let body: any; - body = JSON.stringify(se_ListUniqueProblemsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1185,7 +1137,7 @@ export const se_ListUploadsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUploads"); let body: any; - body = JSON.stringify(se_ListUploadsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1198,7 +1150,7 @@ export const se_ListVPCEConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVPCEConfigurations"); let body: any; - body = JSON.stringify(se_ListVPCEConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1211,7 +1163,7 @@ export const se_PurchaseOfferingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PurchaseOffering"); let body: any; - body = JSON.stringify(se_PurchaseOfferingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1224,7 +1176,7 @@ export const se_RenewOfferingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RenewOffering"); let body: any; - body = JSON.stringify(se_RenewOfferingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1250,7 +1202,7 @@ export const se_StopJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopJob"); let body: any; - body = JSON.stringify(se_StopJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1263,7 +1215,7 @@ export const se_StopRemoteAccessSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopRemoteAccessSession"); let body: any; - body = JSON.stringify(se_StopRemoteAccessSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1276,7 +1228,7 @@ export const se_StopRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopRun"); let body: any; - body = JSON.stringify(se_StopRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1289,7 +1241,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1302,7 +1254,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1315,7 +1267,7 @@ export const se_UpdateDeviceInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDeviceInstance"); let body: any; - body = JSON.stringify(se_UpdateDeviceInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1328,7 +1280,7 @@ export const se_UpdateDevicePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDevicePool"); let body: any; - body = JSON.stringify(se_UpdateDevicePoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1341,7 +1293,7 @@ export const se_UpdateInstanceProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateInstanceProfile"); let body: any; - body = JSON.stringify(se_UpdateInstanceProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1354,7 +1306,7 @@ export const se_UpdateNetworkProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNetworkProfile"); let body: any; - body = JSON.stringify(se_UpdateNetworkProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1367,7 +1319,7 @@ export const se_UpdateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProject"); let body: any; - body = JSON.stringify(se_UpdateProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1380,7 +1332,7 @@ export const se_UpdateTestGridProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTestGridProject"); let body: any; - body = JSON.stringify(se_UpdateTestGridProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1393,7 +1345,7 @@ export const se_UpdateUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUpload"); let body: any; - body = JSON.stringify(se_UpdateUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1406,7 +1358,7 @@ export const se_UpdateVPCEConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVPCEConfiguration"); let body: any; - body = JSON.stringify(se_UpdateVPCEConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1422,12 +1374,12 @@ export const de_CreateDevicePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDevicePoolResult(data, context); + contents = _json(data); const response: CreateDevicePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1457,10 +1409,9 @@ const de_CreateDevicePoolCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,12 +1429,12 @@ export const de_CreateInstanceProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateInstanceProfileResult(data, context); + contents = _json(data); const response: CreateInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1513,10 +1464,9 @@ const de_CreateInstanceProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,12 +1484,12 @@ export const de_CreateNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNetworkProfileResult(data, context); + contents = _json(data); const response: CreateNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1569,10 +1519,9 @@ const de_CreateNetworkProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1595,7 +1544,7 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1628,10 +1577,9 @@ const de_CreateProjectCommandError = async ( throw await de_TagOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1654,7 +1602,7 @@ export const de_CreateRemoteAccessSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1684,10 +1632,9 @@ const de_CreateRemoteAccessSessionCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1710,7 +1657,7 @@ export const de_CreateTestGridProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1737,10 +1684,9 @@ const de_CreateTestGridProjectCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1763,7 +1709,7 @@ export const de_CreateTestGridUrlCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1790,10 +1736,9 @@ const de_CreateTestGridUrlCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1816,7 +1761,7 @@ export const de_CreateUploadCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1846,10 +1791,9 @@ const de_CreateUploadCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1867,12 +1811,12 @@ export const de_CreateVPCEConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateVPCEConfigurationResult(data, context); + contents = _json(data); const response: CreateVPCEConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1899,10 +1843,9 @@ const de_CreateVPCEConfigurationCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1920,12 +1863,12 @@ export const de_DeleteDevicePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDevicePoolResult(data, context); + contents = _json(data); const response: DeleteDevicePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1955,10 +1898,9 @@ const de_DeleteDevicePoolCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1976,12 +1918,12 @@ export const de_DeleteInstanceProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteInstanceProfileResult(data, context); + contents = _json(data); const response: DeleteInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2011,10 +1953,9 @@ const de_DeleteInstanceProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2032,12 +1973,12 @@ export const de_DeleteNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNetworkProfileResult(data, context); + contents = _json(data); const response: DeleteNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2067,10 +2008,9 @@ const de_DeleteNetworkProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2088,12 +2028,12 @@ export const de_DeleteProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProjectResult(data, context); + contents = _json(data); const response: DeleteProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2123,10 +2063,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2144,12 +2083,12 @@ export const de_DeleteRemoteAccessSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRemoteAccessSessionResult(data, context); + contents = _json(data); const response: DeleteRemoteAccessSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2179,10 +2118,9 @@ const de_DeleteRemoteAccessSessionCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2200,12 +2138,12 @@ export const de_DeleteRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRunResult(data, context); + contents = _json(data); const response: DeleteRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2235,10 +2173,9 @@ const de_DeleteRunCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2256,12 +2193,12 @@ export const de_DeleteTestGridProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTestGridProjectResult(data, context); + contents = _json(data); const response: DeleteTestGridProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2291,10 +2228,9 @@ const de_DeleteTestGridProjectCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2312,12 +2248,12 @@ export const de_DeleteUploadCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUploadResult(data, context); + contents = _json(data); const response: DeleteUploadCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2347,10 +2283,9 @@ const de_DeleteUploadCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2368,12 +2303,12 @@ export const de_DeleteVPCEConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVPCEConfigurationResult(data, context); + contents = _json(data); const response: DeleteVPCEConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2403,10 +2338,9 @@ const de_DeleteVPCEConfigurationCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2429,7 +2363,7 @@ export const de_GetAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2459,10 +2393,9 @@ const de_GetAccountSettingsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2485,7 +2418,7 @@ export const de_GetDeviceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2515,10 +2448,9 @@ const de_GetDeviceCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2536,12 +2468,12 @@ export const de_GetDeviceInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDeviceInstanceResult(data, context); + contents = _json(data); const response: GetDeviceInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2571,10 +2503,9 @@ const de_GetDeviceInstanceCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2592,12 +2523,12 @@ export const de_GetDevicePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDevicePoolResult(data, context); + contents = _json(data); const response: GetDevicePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2627,10 +2558,9 @@ const de_GetDevicePoolCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2653,7 +2583,7 @@ export const de_GetDevicePoolCompatibilityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2683,10 +2613,9 @@ const de_GetDevicePoolCompatibilityCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2704,12 +2633,12 @@ export const de_GetInstanceProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInstanceProfileResult(data, context); + contents = _json(data); const response: GetInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2739,10 +2668,9 @@ const de_GetInstanceProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,7 +2693,7 @@ export const de_GetJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2792,10 +2720,9 @@ const de_GetJobCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2813,12 +2740,12 @@ export const de_GetNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetNetworkProfileResult(data, context); + contents = _json(data); const response: GetNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2848,10 +2775,9 @@ const de_GetNetworkProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2874,7 +2800,7 @@ export const de_GetOfferingStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2907,10 +2833,9 @@ const de_GetOfferingStatusCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2933,7 +2858,7 @@ export const de_GetProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2963,10 +2888,9 @@ const de_GetProjectCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2989,7 +2913,7 @@ export const de_GetRemoteAccessSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3019,10 +2943,9 @@ const de_GetRemoteAccessSessionCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3045,7 +2968,7 @@ export const de_GetRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3072,10 +2995,9 @@ const de_GetRunCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3098,7 +3020,7 @@ export const de_GetSuiteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3128,10 +3050,9 @@ const de_GetSuiteCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3154,7 +3075,7 @@ export const de_GetTestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3184,10 +3105,9 @@ const de_GetTestCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3210,7 +3130,7 @@ export const de_GetTestGridProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3237,10 +3157,9 @@ const de_GetTestGridProjectCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3263,7 +3182,7 @@ export const de_GetTestGridSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3290,10 +3209,9 @@ const de_GetTestGridSessionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3316,7 +3234,7 @@ export const de_GetUploadCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3346,10 +3264,9 @@ const de_GetUploadCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3367,12 +3284,12 @@ export const de_GetVPCEConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetVPCEConfigurationResult(data, context); + contents = _json(data); const response: GetVPCEConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3399,10 +3316,9 @@ const de_GetVPCEConfigurationCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3425,7 +3341,7 @@ export const de_InstallToRemoteAccessSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3455,10 +3371,9 @@ const de_InstallToRemoteAccessSessionCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3476,12 +3391,12 @@ export const de_ListArtifactsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListArtifactsResult(data, context); + contents = _json(data); const response: ListArtifactsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3511,10 +3426,9 @@ const de_ListArtifactsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3532,12 +3446,12 @@ export const de_ListDeviceInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeviceInstancesResult(data, context); + contents = _json(data); const response: ListDeviceInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3567,10 +3481,9 @@ const de_ListDeviceInstancesCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3588,12 +3501,12 @@ export const de_ListDevicePoolsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDevicePoolsResult(data, context); + contents = _json(data); const response: ListDevicePoolsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3623,10 +3536,9 @@ const de_ListDevicePoolsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3649,7 +3561,7 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3679,10 +3591,9 @@ const de_ListDevicesCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3700,12 +3611,12 @@ export const de_ListInstanceProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListInstanceProfilesResult(data, context); + contents = _json(data); const response: ListInstanceProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3735,10 +3646,9 @@ const de_ListInstanceProfilesCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3761,7 +3671,7 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3791,10 +3701,9 @@ const de_ListJobsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3812,12 +3721,12 @@ export const de_ListNetworkProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListNetworkProfilesResult(data, context); + contents = _json(data); const response: ListNetworkProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3847,10 +3756,9 @@ const de_ListNetworkProfilesCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3868,12 +3776,12 @@ export const de_ListOfferingPromotionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListOfferingPromotionsResult(data, context); + contents = _json(data); const response: ListOfferingPromotionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3906,10 +3814,9 @@ const de_ListOfferingPromotionsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3932,7 +3839,7 @@ export const de_ListOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3965,10 +3872,9 @@ const de_ListOfferingsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3991,7 +3897,7 @@ export const de_ListOfferingTransactionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4024,10 +3930,9 @@ const de_ListOfferingTransactionsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4050,7 +3955,7 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4080,10 +3985,9 @@ const de_ListProjectsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4106,7 +4010,7 @@ export const de_ListRemoteAccessSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4136,10 +4040,9 @@ const de_ListRemoteAccessSessionsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4162,7 +4065,7 @@ export const de_ListRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4192,10 +4095,9 @@ const de_ListRunsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4213,12 +4115,12 @@ export const de_ListSamplesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSamplesResult(data, context); + contents = _json(data); const response: ListSamplesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4248,10 +4150,9 @@ const de_ListSamplesCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4274,7 +4175,7 @@ export const de_ListSuitesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4304,10 +4205,9 @@ const de_ListSuitesCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4325,12 +4225,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4357,10 +4257,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TagOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4383,7 +4282,7 @@ export const de_ListTestGridProjectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4407,10 +4306,9 @@ const de_ListTestGridProjectsCommandError = async ( throw await de_InternalServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4433,7 +4331,7 @@ export const de_ListTestGridSessionActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4460,10 +4358,9 @@ const de_ListTestGridSessionActionsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4481,12 +4378,12 @@ export const de_ListTestGridSessionArtifactsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTestGridSessionArtifactsResult(data, context); + contents = _json(data); const response: ListTestGridSessionArtifactsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4513,10 +4410,9 @@ const de_ListTestGridSessionArtifactsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4539,7 +4435,7 @@ export const de_ListTestGridSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4566,10 +4462,9 @@ const de_ListTestGridSessionsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4592,7 +4487,7 @@ export const de_ListTestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4622,10 +4517,9 @@ const de_ListTestsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4648,7 +4542,7 @@ export const de_ListUniqueProblemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4678,10 +4572,9 @@ const de_ListUniqueProblemsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4704,7 +4597,7 @@ export const de_ListUploadsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4734,10 +4627,9 @@ const de_ListUploadsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4755,12 +4647,12 @@ export const de_ListVPCEConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVPCEConfigurationsResult(data, context); + contents = _json(data); const response: ListVPCEConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4784,10 +4676,9 @@ const de_ListVPCEConfigurationsCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4810,7 +4701,7 @@ export const de_PurchaseOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4843,10 +4734,9 @@ const de_PurchaseOfferingCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4869,7 +4759,7 @@ export const de_RenewOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4902,10 +4792,9 @@ const de_RenewOfferingCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4928,7 +4817,7 @@ export const de_ScheduleRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4961,10 +4850,9 @@ const de_ScheduleRunCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4987,7 +4875,7 @@ export const de_StopJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5017,10 +4905,9 @@ const de_StopJobCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5043,7 +4930,7 @@ export const de_StopRemoteAccessSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5073,10 +4960,9 @@ const de_StopRemoteAccessSessionCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5099,7 +4985,7 @@ export const de_StopRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5129,10 +5015,9 @@ const de_StopRunCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5150,12 +5035,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5188,10 +5073,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5209,12 +5093,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5241,10 +5125,9 @@ const de_UntagResourceCommandError = async ( throw await de_TagOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5262,12 +5145,12 @@ export const de_UpdateDeviceInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDeviceInstanceResult(data, context); + contents = _json(data); const response: UpdateDeviceInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5297,10 +5180,9 @@ const de_UpdateDeviceInstanceCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5318,12 +5200,12 @@ export const de_UpdateDevicePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDevicePoolResult(data, context); + contents = _json(data); const response: UpdateDevicePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5353,10 +5235,9 @@ const de_UpdateDevicePoolCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5374,12 +5255,12 @@ export const de_UpdateInstanceProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateInstanceProfileResult(data, context); + contents = _json(data); const response: UpdateInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5409,10 +5290,9 @@ const de_UpdateInstanceProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5430,12 +5310,12 @@ export const de_UpdateNetworkProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNetworkProfileResult(data, context); + contents = _json(data); const response: UpdateNetworkProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5465,10 +5345,9 @@ const de_UpdateNetworkProfileCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5491,7 +5370,7 @@ export const de_UpdateProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5521,10 +5400,9 @@ const de_UpdateProjectCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5547,7 +5425,7 @@ export const de_UpdateTestGridProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5577,10 +5455,9 @@ const de_UpdateTestGridProjectCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5603,7 +5480,7 @@ export const de_UpdateUploadCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5633,10 +5510,9 @@ const de_UpdateUploadCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5654,12 +5530,12 @@ export const de_UpdateVPCEConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateVPCEConfigurationResult(data, context); + contents = _json(data); const response: UpdateVPCEConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5689,10 +5565,9 @@ const de_UpdateVPCEConfigurationCommandError = async ( throw await de_ServiceAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5703,7 +5578,7 @@ const de_UpdateVPCEConfigurationCommandError = async ( */ const de_ArgumentExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ArgumentException(body, context); + const deserialized: any = _json(body); const exception = new ArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5719,7 +5594,7 @@ const de_CannotDeleteExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CannotDeleteException(body, context); + const deserialized: any = _json(body); const exception = new CannotDeleteException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5735,7 +5610,7 @@ const de_IdempotencyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotencyException(body, context); + const deserialized: any = _json(body); const exception = new IdempotencyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5751,7 +5626,7 @@ const de_InternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5767,7 +5642,7 @@ const de_InvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5783,7 +5658,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5799,7 +5674,7 @@ const de_NotEligibleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotEligibleException(body, context); + const deserialized: any = _json(body); const exception = new NotEligibleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5812,7 +5687,7 @@ const de_NotEligibleExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5828,7 +5703,7 @@ const de_ServiceAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceAccountException(body, context); + const deserialized: any = _json(body); const exception = new ServiceAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5844,7 +5719,7 @@ const de_TagOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagOperationException(body, context); + const deserialized: any = _json(body); const exception = new TagOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5857,7 +5732,7 @@ const de_TagOperationExceptionRes = async ( */ const de_TagPolicyExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagPolicyException(body, context); + const deserialized: any = _json(body); const exception = new TagPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5873,7 +5748,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5881,345 +5756,65 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AmazonResourceNames - */ -const se_AmazonResourceNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AmazonResourceNames omitted. -/** - * serializeAws_json1_1AndroidPaths - */ -const se_AndroidPaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AndroidPaths omitted. -/** - * serializeAws_json1_1CreateDevicePoolRequest - */ -const se_CreateDevicePoolRequest = (input: CreateDevicePoolRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.maxDevices != null && { maxDevices: input.maxDevices }), - ...(input.name != null && { name: input.name }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.rules != null && { rules: se_Rules(input.rules, context) }), - }; -}; +// se_CreateDevicePoolRequest omitted. -/** - * serializeAws_json1_1CreateInstanceProfileRequest - */ -const se_CreateInstanceProfileRequest = (input: CreateInstanceProfileRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.excludeAppPackagesFromCleanup != null && { - excludeAppPackagesFromCleanup: se_PackageIds(input.excludeAppPackagesFromCleanup, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.packageCleanup != null && { packageCleanup: input.packageCleanup }), - ...(input.rebootAfterUse != null && { rebootAfterUse: input.rebootAfterUse }), - }; -}; +// se_CreateInstanceProfileRequest omitted. -/** - * serializeAws_json1_1CreateNetworkProfileRequest - */ -const se_CreateNetworkProfileRequest = (input: CreateNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.downlinkBandwidthBits != null && { downlinkBandwidthBits: input.downlinkBandwidthBits }), - ...(input.downlinkDelayMs != null && { downlinkDelayMs: input.downlinkDelayMs }), - ...(input.downlinkJitterMs != null && { downlinkJitterMs: input.downlinkJitterMs }), - ...(input.downlinkLossPercent != null && { downlinkLossPercent: input.downlinkLossPercent }), - ...(input.name != null && { name: input.name }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.type != null && { type: input.type }), - ...(input.uplinkBandwidthBits != null && { uplinkBandwidthBits: input.uplinkBandwidthBits }), - ...(input.uplinkDelayMs != null && { uplinkDelayMs: input.uplinkDelayMs }), - ...(input.uplinkJitterMs != null && { uplinkJitterMs: input.uplinkJitterMs }), - ...(input.uplinkLossPercent != null && { uplinkLossPercent: input.uplinkLossPercent }), - }; -}; +// se_CreateNetworkProfileRequest omitted. -/** - * serializeAws_json1_1CreateProjectRequest - */ -const se_CreateProjectRequest = (input: CreateProjectRequest, context: __SerdeContext): any => { - return { - ...(input.defaultJobTimeoutMinutes != null && { defaultJobTimeoutMinutes: input.defaultJobTimeoutMinutes }), - ...(input.name != null && { name: input.name }), - ...(input.vpcConfig != null && { vpcConfig: se_VpcConfig(input.vpcConfig, context) }), - }; -}; +// se_CreateProjectRequest omitted. -/** - * serializeAws_json1_1CreateRemoteAccessSessionConfiguration - */ -const se_CreateRemoteAccessSessionConfiguration = ( - input: CreateRemoteAccessSessionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.billingMethod != null && { billingMethod: input.billingMethod }), - ...(input.vpceConfigurationArns != null && { - vpceConfigurationArns: se_AmazonResourceNames(input.vpceConfigurationArns, context), - }), - }; -}; +// se_CreateRemoteAccessSessionConfiguration omitted. -/** - * serializeAws_json1_1CreateRemoteAccessSessionRequest - */ -const se_CreateRemoteAccessSessionRequest = (input: CreateRemoteAccessSessionRequest, context: __SerdeContext): any => { - return { - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.configuration != null && { - configuration: se_CreateRemoteAccessSessionConfiguration(input.configuration, context), - }), - ...(input.deviceArn != null && { deviceArn: input.deviceArn }), - ...(input.instanceArn != null && { instanceArn: input.instanceArn }), - ...(input.interactionMode != null && { interactionMode: input.interactionMode }), - ...(input.name != null && { name: input.name }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.remoteDebugEnabled != null && { remoteDebugEnabled: input.remoteDebugEnabled }), - ...(input.remoteRecordAppArn != null && { remoteRecordAppArn: input.remoteRecordAppArn }), - ...(input.remoteRecordEnabled != null && { remoteRecordEnabled: input.remoteRecordEnabled }), - ...(input.skipAppResign != null && { skipAppResign: input.skipAppResign }), - ...(input.sshPublicKey != null && { sshPublicKey: input.sshPublicKey }), - }; -}; +// se_CreateRemoteAccessSessionRequest omitted. -/** - * serializeAws_json1_1CreateTestGridProjectRequest - */ -const se_CreateTestGridProjectRequest = (input: CreateTestGridProjectRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.vpcConfig != null && { vpcConfig: se_TestGridVpcConfig(input.vpcConfig, context) }), - }; -}; +// se_CreateTestGridProjectRequest omitted. -/** - * serializeAws_json1_1CreateTestGridUrlRequest - */ -const se_CreateTestGridUrlRequest = (input: CreateTestGridUrlRequest, context: __SerdeContext): any => { - return { - ...(input.expiresInSeconds != null && { expiresInSeconds: input.expiresInSeconds }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - }; -}; +// se_CreateTestGridUrlRequest omitted. -/** - * serializeAws_json1_1CreateUploadRequest - */ -const se_CreateUploadRequest = (input: CreateUploadRequest, context: __SerdeContext): any => { - return { - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.name != null && { name: input.name }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_CreateUploadRequest omitted. -/** - * serializeAws_json1_1CreateVPCEConfigurationRequest - */ -const se_CreateVPCEConfigurationRequest = (input: CreateVPCEConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.serviceDnsName != null && { serviceDnsName: input.serviceDnsName }), - ...(input.vpceConfigurationDescription != null && { - vpceConfigurationDescription: input.vpceConfigurationDescription, - }), - ...(input.vpceConfigurationName != null && { vpceConfigurationName: input.vpceConfigurationName }), - ...(input.vpceServiceName != null && { vpceServiceName: input.vpceServiceName }), - }; -}; +// se_CreateVPCEConfigurationRequest omitted. -/** - * serializeAws_json1_1CustomerArtifactPaths - */ -const se_CustomerArtifactPaths = (input: CustomerArtifactPaths, context: __SerdeContext): any => { - return { - ...(input.androidPaths != null && { androidPaths: se_AndroidPaths(input.androidPaths, context) }), - ...(input.deviceHostPaths != null && { deviceHostPaths: se_DeviceHostPaths(input.deviceHostPaths, context) }), - ...(input.iosPaths != null && { iosPaths: se_IosPaths(input.iosPaths, context) }), - }; -}; +// se_CustomerArtifactPaths omitted. -/** - * serializeAws_json1_1DeleteDevicePoolRequest - */ -const se_DeleteDevicePoolRequest = (input: DeleteDevicePoolRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteDevicePoolRequest omitted. -/** - * serializeAws_json1_1DeleteInstanceProfileRequest - */ -const se_DeleteInstanceProfileRequest = (input: DeleteInstanceProfileRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteInstanceProfileRequest omitted. -/** - * serializeAws_json1_1DeleteNetworkProfileRequest - */ -const se_DeleteNetworkProfileRequest = (input: DeleteNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteNetworkProfileRequest omitted. -/** - * serializeAws_json1_1DeleteProjectRequest - */ -const se_DeleteProjectRequest = (input: DeleteProjectRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteProjectRequest omitted. -/** - * serializeAws_json1_1DeleteRemoteAccessSessionRequest - */ -const se_DeleteRemoteAccessSessionRequest = (input: DeleteRemoteAccessSessionRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteRemoteAccessSessionRequest omitted. -/** - * serializeAws_json1_1DeleteRunRequest - */ -const se_DeleteRunRequest = (input: DeleteRunRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteRunRequest omitted. -/** - * serializeAws_json1_1DeleteTestGridProjectRequest - */ -const se_DeleteTestGridProjectRequest = (input: DeleteTestGridProjectRequest, context: __SerdeContext): any => { - return { - ...(input.projectArn != null && { projectArn: input.projectArn }), - }; -}; +// se_DeleteTestGridProjectRequest omitted. -/** - * serializeAws_json1_1DeleteUploadRequest - */ -const se_DeleteUploadRequest = (input: DeleteUploadRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteUploadRequest omitted. -/** - * serializeAws_json1_1DeleteVPCEConfigurationRequest - */ -const se_DeleteVPCEConfigurationRequest = (input: DeleteVPCEConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_DeleteVPCEConfigurationRequest omitted. -/** - * serializeAws_json1_1DeviceFilter - */ -const se_DeviceFilter = (input: DeviceFilter, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_DeviceFilterValues(input.values, context) }), - }; -}; +// se_DeviceFilter omitted. -/** - * serializeAws_json1_1DeviceFilters - */ -const se_DeviceFilters = (input: DeviceFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeviceFilter(entry, context); - }); -}; +// se_DeviceFilters omitted. -/** - * serializeAws_json1_1DeviceFilterValues - */ -const se_DeviceFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceFilterValues omitted. -/** - * serializeAws_json1_1DeviceHostPaths - */ -const se_DeviceHostPaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceHostPaths omitted. -/** - * serializeAws_json1_1DeviceSelectionConfiguration - */ -const se_DeviceSelectionConfiguration = (input: DeviceSelectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_DeviceFilters(input.filters, context) }), - ...(input.maxDevices != null && { maxDevices: input.maxDevices }), - }; -}; +// se_DeviceSelectionConfiguration omitted. -/** - * serializeAws_json1_1ExecutionConfiguration - */ -const se_ExecutionConfiguration = (input: ExecutionConfiguration, context: __SerdeContext): any => { - return { - ...(input.accountsCleanup != null && { accountsCleanup: input.accountsCleanup }), - ...(input.appPackagesCleanup != null && { appPackagesCleanup: input.appPackagesCleanup }), - ...(input.jobTimeoutMinutes != null && { jobTimeoutMinutes: input.jobTimeoutMinutes }), - ...(input.skipAppResign != null && { skipAppResign: input.skipAppResign }), - ...(input.videoCapture != null && { videoCapture: input.videoCapture }), - }; -}; +// se_ExecutionConfiguration omitted. -/** - * serializeAws_json1_1GetAccountSettingsRequest - */ -const se_GetAccountSettingsRequest = (input: GetAccountSettingsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetAccountSettingsRequest omitted. -/** - * serializeAws_json1_1GetDeviceInstanceRequest - */ -const se_GetDeviceInstanceRequest = (input: GetDeviceInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_GetDeviceInstanceRequest omitted. /** * serializeAws_json1_1GetDevicePoolCompatibilityRequest @@ -6228,1264 +5823,392 @@ const se_GetDevicePoolCompatibilityRequest = ( input: GetDevicePoolCompatibilityRequest, context: __SerdeContext ): any => { - return { - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.configuration != null && { configuration: se_ScheduleRunConfiguration(input.configuration, context) }), - ...(input.devicePoolArn != null && { devicePoolArn: input.devicePoolArn }), - ...(input.test != null && { test: se_ScheduleRunTest(input.test, context) }), - ...(input.testType != null && { testType: input.testType }), - }; -}; - -/** - * serializeAws_json1_1GetDevicePoolRequest - */ -const se_GetDevicePoolRequest = (input: GetDevicePoolRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetDeviceRequest - */ -const se_GetDeviceRequest = (input: GetDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceProfileRequest - */ -const se_GetInstanceProfileRequest = (input: GetInstanceProfileRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetJobRequest - */ -const se_GetJobRequest = (input: GetJobRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetNetworkProfileRequest - */ -const se_GetNetworkProfileRequest = (input: GetNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetOfferingStatusRequest - */ -const se_GetOfferingStatusRequest = (input: GetOfferingStatusRequest, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1GetProjectRequest - */ -const se_GetProjectRequest = (input: GetProjectRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetRemoteAccessSessionRequest - */ -const se_GetRemoteAccessSessionRequest = (input: GetRemoteAccessSessionRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetRunRequest - */ -const se_GetRunRequest = (input: GetRunRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetSuiteRequest - */ -const se_GetSuiteRequest = (input: GetSuiteRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetTestGridProjectRequest - */ -const se_GetTestGridProjectRequest = (input: GetTestGridProjectRequest, context: __SerdeContext): any => { - return { - ...(input.projectArn != null && { projectArn: input.projectArn }), - }; -}; - -/** - * serializeAws_json1_1GetTestGridSessionRequest - */ -const se_GetTestGridSessionRequest = (input: GetTestGridSessionRequest, context: __SerdeContext): any => { - return { - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.sessionArn != null && { sessionArn: input.sessionArn }), - ...(input.sessionId != null && { sessionId: input.sessionId }), - }; -}; - -/** - * serializeAws_json1_1GetTestRequest - */ -const se_GetTestRequest = (input: GetTestRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetUploadRequest - */ -const se_GetUploadRequest = (input: GetUploadRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1GetVPCEConfigurationRequest - */ -const se_GetVPCEConfigurationRequest = (input: GetVPCEConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_json1_1InstallToRemoteAccessSessionRequest - */ -const se_InstallToRemoteAccessSessionRequest = ( - input: InstallToRemoteAccessSessionRequest, - context: __SerdeContext -): any => { - return { - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.remoteAccessSessionArn != null && { remoteAccessSessionArn: input.remoteAccessSessionArn }), - }; + return take(input, { + appArn: [], + configuration: (_) => se_ScheduleRunConfiguration(_, context), + devicePoolArn: [], + test: _json, + testType: [], + }); }; -/** - * serializeAws_json1_1InstanceLabels - */ -const se_InstanceLabels = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GetDevicePoolRequest omitted. -/** - * serializeAws_json1_1IosPaths - */ -const se_IosPaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GetDeviceRequest omitted. -/** - * serializeAws_json1_1ListArtifactsRequest - */ -const se_ListArtifactsRequest = (input: ListArtifactsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_GetInstanceProfileRequest omitted. -/** - * serializeAws_json1_1ListDeviceInstancesRequest - */ -const se_ListDeviceInstancesRequest = (input: ListDeviceInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetJobRequest omitted. -/** - * serializeAws_json1_1ListDevicePoolsRequest - */ -const se_ListDevicePoolsRequest = (input: ListDevicePoolsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_GetNetworkProfileRequest omitted. -/** - * serializeAws_json1_1ListDevicesRequest - */ -const se_ListDevicesRequest = (input: ListDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.filters != null && { filters: se_DeviceFilters(input.filters, context) }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetOfferingStatusRequest omitted. -/** - * serializeAws_json1_1ListInstanceProfilesRequest - */ -const se_ListInstanceProfilesRequest = (input: ListInstanceProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetProjectRequest omitted. -/** - * serializeAws_json1_1ListJobsRequest - */ -const se_ListJobsRequest = (input: ListJobsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetRemoteAccessSessionRequest omitted. -/** - * serializeAws_json1_1ListNetworkProfilesRequest - */ -const se_ListNetworkProfilesRequest = (input: ListNetworkProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_GetRunRequest omitted. -/** - * serializeAws_json1_1ListOfferingPromotionsRequest - */ -const se_ListOfferingPromotionsRequest = (input: ListOfferingPromotionsRequest, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetSuiteRequest omitted. -/** - * serializeAws_json1_1ListOfferingsRequest - */ -const se_ListOfferingsRequest = (input: ListOfferingsRequest, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetTestGridProjectRequest omitted. -/** - * serializeAws_json1_1ListOfferingTransactionsRequest - */ -const se_ListOfferingTransactionsRequest = (input: ListOfferingTransactionsRequest, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetTestGridSessionRequest omitted. -/** - * serializeAws_json1_1ListProjectsRequest - */ -const se_ListProjectsRequest = (input: ListProjectsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetTestRequest omitted. -/** - * serializeAws_json1_1ListRemoteAccessSessionsRequest - */ -const se_ListRemoteAccessSessionsRequest = (input: ListRemoteAccessSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetUploadRequest omitted. -/** - * serializeAws_json1_1ListRunsRequest - */ -const se_ListRunsRequest = (input: ListRunsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetVPCEConfigurationRequest omitted. -/** - * serializeAws_json1_1ListSamplesRequest - */ -const se_ListSamplesRequest = (input: ListSamplesRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_InstallToRemoteAccessSessionRequest omitted. -/** - * serializeAws_json1_1ListSuitesRequest - */ -const se_ListSuitesRequest = (input: ListSuitesRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_InstanceLabels omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_IosPaths omitted. -/** - * serializeAws_json1_1ListTestGridProjectsRequest - */ -const se_ListTestGridProjectsRequest = (input: ListTestGridProjectsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResult != null && { maxResult: input.maxResult }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListArtifactsRequest omitted. -/** - * serializeAws_json1_1ListTestGridSessionActionsRequest - */ -const se_ListTestGridSessionActionsRequest = ( - input: ListTestGridSessionActionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.maxResult != null && { maxResult: input.maxResult }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sessionArn != null && { sessionArn: input.sessionArn }), - }; -}; +// se_ListDeviceInstancesRequest omitted. -/** - * serializeAws_json1_1ListTestGridSessionArtifactsRequest - */ -const se_ListTestGridSessionArtifactsRequest = ( - input: ListTestGridSessionArtifactsRequest, - context: __SerdeContext -): any => { - return { - ...(input.maxResult != null && { maxResult: input.maxResult }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sessionArn != null && { sessionArn: input.sessionArn }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListDevicePoolsRequest omitted. -/** - * serializeAws_json1_1ListTestGridSessionsRequest - */ -const se_ListTestGridSessionsRequest = (input: ListTestGridSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.creationTimeAfter != null && { creationTimeAfter: Math.round(input.creationTimeAfter.getTime() / 1000) }), - ...(input.creationTimeBefore != null && { - creationTimeBefore: Math.round(input.creationTimeBefore.getTime() / 1000), - }), - ...(input.endTimeAfter != null && { endTimeAfter: Math.round(input.endTimeAfter.getTime() / 1000) }), - ...(input.endTimeBefore != null && { endTimeBefore: Math.round(input.endTimeBefore.getTime() / 1000) }), - ...(input.maxResult != null && { maxResult: input.maxResult }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_ListDevicesRequest omitted. -/** - * serializeAws_json1_1ListTestsRequest - */ -const se_ListTestsRequest = (input: ListTestsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListInstanceProfilesRequest omitted. -/** - * serializeAws_json1_1ListUniqueProblemsRequest - */ -const se_ListUniqueProblemsRequest = (input: ListUniqueProblemsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListJobsRequest omitted. -/** - * serializeAws_json1_1ListUploadsRequest - */ -const se_ListUploadsRequest = (input: ListUploadsRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListNetworkProfilesRequest omitted. -/** - * serializeAws_json1_1ListVPCEConfigurationsRequest - */ -const se_ListVPCEConfigurationsRequest = (input: ListVPCEConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListOfferingPromotionsRequest omitted. -/** - * serializeAws_json1_1Location - */ -const se_Location = (input: Location, context: __SerdeContext): any => { - return { - ...(input.latitude != null && { latitude: __serializeFloat(input.latitude) }), - ...(input.longitude != null && { longitude: __serializeFloat(input.longitude) }), - }; -}; +// se_ListOfferingsRequest omitted. -/** - * serializeAws_json1_1PackageIds - */ -const se_PackageIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfferingTransactionsRequest omitted. -/** - * serializeAws_json1_1PurchaseOfferingRequest - */ -const se_PurchaseOfferingRequest = (input: PurchaseOfferingRequest, context: __SerdeContext): any => { - return { - ...(input.offeringId != null && { offeringId: input.offeringId }), - ...(input.offeringPromotionId != null && { offeringPromotionId: input.offeringPromotionId }), - ...(input.quantity != null && { quantity: input.quantity }), - }; -}; +// se_ListProjectsRequest omitted. -/** - * serializeAws_json1_1Radios - */ -const se_Radios = (input: Radios, context: __SerdeContext): any => { - return { - ...(input.bluetooth != null && { bluetooth: input.bluetooth }), - ...(input.gps != null && { gps: input.gps }), - ...(input.nfc != null && { nfc: input.nfc }), - ...(input.wifi != null && { wifi: input.wifi }), - }; -}; +// se_ListRemoteAccessSessionsRequest omitted. -/** - * serializeAws_json1_1RenewOfferingRequest - */ -const se_RenewOfferingRequest = (input: RenewOfferingRequest, context: __SerdeContext): any => { - return { - ...(input.offeringId != null && { offeringId: input.offeringId }), - ...(input.quantity != null && { quantity: input.quantity }), - }; -}; +// se_ListRunsRequest omitted. -/** - * serializeAws_json1_1Rule - */ -const se_Rule = (input: Rule, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.operator != null && { operator: input.operator }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ListSamplesRequest omitted. -/** - * serializeAws_json1_1Rules - */ -const se_Rules = (input: Rule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Rule(entry, context); - }); -}; +// se_ListSuitesRequest omitted. -/** - * serializeAws_json1_1ScheduleRunConfiguration - */ -const se_ScheduleRunConfiguration = (input: ScheduleRunConfiguration, context: __SerdeContext): any => { - return { - ...(input.auxiliaryApps != null && { auxiliaryApps: se_AmazonResourceNames(input.auxiliaryApps, context) }), - ...(input.billingMethod != null && { billingMethod: input.billingMethod }), - ...(input.customerArtifactPaths != null && { - customerArtifactPaths: se_CustomerArtifactPaths(input.customerArtifactPaths, context), - }), - ...(input.extraDataPackageArn != null && { extraDataPackageArn: input.extraDataPackageArn }), - ...(input.locale != null && { locale: input.locale }), - ...(input.location != null && { location: se_Location(input.location, context) }), - ...(input.networkProfileArn != null && { networkProfileArn: input.networkProfileArn }), - ...(input.radios != null && { radios: se_Radios(input.radios, context) }), - ...(input.vpceConfigurationArns != null && { - vpceConfigurationArns: se_AmazonResourceNames(input.vpceConfigurationArns, context), - }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ScheduleRunRequest - */ -const se_ScheduleRunRequest = (input: ScheduleRunRequest, context: __SerdeContext): any => { - return { - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.configuration != null && { configuration: se_ScheduleRunConfiguration(input.configuration, context) }), - ...(input.devicePoolArn != null && { devicePoolArn: input.devicePoolArn }), - ...(input.deviceSelectionConfiguration != null && { - deviceSelectionConfiguration: se_DeviceSelectionConfiguration(input.deviceSelectionConfiguration, context), - }), - ...(input.executionConfiguration != null && { - executionConfiguration: se_ExecutionConfiguration(input.executionConfiguration, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.test != null && { test: se_ScheduleRunTest(input.test, context) }), - }; -}; +// se_ListTestGridProjectsRequest omitted. -/** - * serializeAws_json1_1ScheduleRunTest - */ -const se_ScheduleRunTest = (input: ScheduleRunTest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: input.filter }), - ...(input.parameters != null && { parameters: se_TestParameters(input.parameters, context) }), - ...(input.testPackageArn != null && { testPackageArn: input.testPackageArn }), - ...(input.testSpecArn != null && { testSpecArn: input.testSpecArn }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListTestGridSessionActionsRequest omitted. -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListTestGridSessionArtifactsRequest omitted. /** - * serializeAws_json1_1StopJobRequest + * serializeAws_json1_1ListTestGridSessionsRequest */ -const se_StopJobRequest = (input: StopJobRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; +const se_ListTestGridSessionsRequest = (input: ListTestGridSessionsRequest, context: __SerdeContext): any => { + return take(input, { + creationTimeAfter: (_) => Math.round(_.getTime() / 1000), + creationTimeBefore: (_) => Math.round(_.getTime() / 1000), + endTimeAfter: (_) => Math.round(_.getTime() / 1000), + endTimeBefore: (_) => Math.round(_.getTime() / 1000), + maxResult: [], + nextToken: [], + projectArn: [], + status: [], + }); }; -/** - * serializeAws_json1_1StopRemoteAccessSessionRequest - */ -const se_StopRemoteAccessSessionRequest = (input: StopRemoteAccessSessionRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_ListTestsRequest omitted. -/** - * serializeAws_json1_1StopRunRequest - */ -const se_StopRunRequest = (input: StopRunRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_ListUniqueProblemsRequest omitted. -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListUploadsRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ListVPCEConfigurationsRequest omitted. /** - * serializeAws_json1_1TagKeyList + * serializeAws_json1_1Location */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_Location = (input: Location, context: __SerdeContext): any => { + return take(input, { + latitude: __serializeFloat, + longitude: __serializeFloat, + }); }; -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_PackageIds omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_PurchaseOfferingRequest omitted. -/** - * serializeAws_json1_1TestGridVpcConfig - */ -const se_TestGridVpcConfig = (input: TestGridVpcConfig, context: __SerdeContext): any => { - return { - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }; -}; +// se_Radios omitted. -/** - * serializeAws_json1_1TestParameters - */ -const se_TestParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_RenewOfferingRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_Rule omitted. -/** - * serializeAws_json1_1UpdateDeviceInstanceRequest - */ -const se_UpdateDeviceInstanceRequest = (input: UpdateDeviceInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.labels != null && { labels: se_InstanceLabels(input.labels, context) }), - ...(input.profileArn != null && { profileArn: input.profileArn }), - }; -}; +// se_Rules omitted. /** - * serializeAws_json1_1UpdateDevicePoolRequest + * serializeAws_json1_1ScheduleRunConfiguration */ -const se_UpdateDevicePoolRequest = (input: UpdateDevicePoolRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.clearMaxDevices != null && { clearMaxDevices: input.clearMaxDevices }), - ...(input.description != null && { description: input.description }), - ...(input.maxDevices != null && { maxDevices: input.maxDevices }), - ...(input.name != null && { name: input.name }), - ...(input.rules != null && { rules: se_Rules(input.rules, context) }), - }; +const se_ScheduleRunConfiguration = (input: ScheduleRunConfiguration, context: __SerdeContext): any => { + return take(input, { + auxiliaryApps: _json, + billingMethod: [], + customerArtifactPaths: _json, + extraDataPackageArn: [], + locale: [], + location: (_) => se_Location(_, context), + networkProfileArn: [], + radios: _json, + vpceConfigurationArns: _json, + }); }; /** - * serializeAws_json1_1UpdateInstanceProfileRequest + * serializeAws_json1_1ScheduleRunRequest */ -const se_UpdateInstanceProfileRequest = (input: UpdateInstanceProfileRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.description != null && { description: input.description }), - ...(input.excludeAppPackagesFromCleanup != null && { - excludeAppPackagesFromCleanup: se_PackageIds(input.excludeAppPackagesFromCleanup, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.packageCleanup != null && { packageCleanup: input.packageCleanup }), - ...(input.rebootAfterUse != null && { rebootAfterUse: input.rebootAfterUse }), - }; +const se_ScheduleRunRequest = (input: ScheduleRunRequest, context: __SerdeContext): any => { + return take(input, { + appArn: [], + configuration: (_) => se_ScheduleRunConfiguration(_, context), + devicePoolArn: [], + deviceSelectionConfiguration: _json, + executionConfiguration: _json, + name: [], + projectArn: [], + test: _json, + }); }; -/** - * serializeAws_json1_1UpdateNetworkProfileRequest - */ -const se_UpdateNetworkProfileRequest = (input: UpdateNetworkProfileRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.description != null && { description: input.description }), - ...(input.downlinkBandwidthBits != null && { downlinkBandwidthBits: input.downlinkBandwidthBits }), - ...(input.downlinkDelayMs != null && { downlinkDelayMs: input.downlinkDelayMs }), - ...(input.downlinkJitterMs != null && { downlinkJitterMs: input.downlinkJitterMs }), - ...(input.downlinkLossPercent != null && { downlinkLossPercent: input.downlinkLossPercent }), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - ...(input.uplinkBandwidthBits != null && { uplinkBandwidthBits: input.uplinkBandwidthBits }), - ...(input.uplinkDelayMs != null && { uplinkDelayMs: input.uplinkDelayMs }), - ...(input.uplinkJitterMs != null && { uplinkJitterMs: input.uplinkJitterMs }), - ...(input.uplinkLossPercent != null && { uplinkLossPercent: input.uplinkLossPercent }), - }; -}; +// se_ScheduleRunTest omitted. -/** - * serializeAws_json1_1UpdateProjectRequest - */ -const se_UpdateProjectRequest = (input: UpdateProjectRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.defaultJobTimeoutMinutes != null && { defaultJobTimeoutMinutes: input.defaultJobTimeoutMinutes }), - ...(input.name != null && { name: input.name }), - ...(input.vpcConfig != null && { vpcConfig: se_VpcConfig(input.vpcConfig, context) }), - }; -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_json1_1UpdateTestGridProjectRequest - */ -const se_UpdateTestGridProjectRequest = (input: UpdateTestGridProjectRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.projectArn != null && { projectArn: input.projectArn }), - ...(input.vpcConfig != null && { vpcConfig: se_TestGridVpcConfig(input.vpcConfig, context) }), - }; -}; +// se_StopJobRequest omitted. -/** - * serializeAws_json1_1UpdateUploadRequest - */ -const se_UpdateUploadRequest = (input: UpdateUploadRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.editContent != null && { editContent: input.editContent }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_StopRemoteAccessSessionRequest omitted. -/** - * serializeAws_json1_1UpdateVPCEConfigurationRequest - */ -const se_UpdateVPCEConfigurationRequest = (input: UpdateVPCEConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.serviceDnsName != null && { serviceDnsName: input.serviceDnsName }), - ...(input.vpceConfigurationDescription != null && { - vpceConfigurationDescription: input.vpceConfigurationDescription, - }), - ...(input.vpceConfigurationName != null && { vpceConfigurationName: input.vpceConfigurationName }), - ...(input.vpceServiceName != null && { vpceServiceName: input.vpceServiceName }), - }; -}; +// se_StopRunRequest omitted. -/** - * serializeAws_json1_1VpcConfig - */ -const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.securityGroupIds != null && { - securityGroupIds: se_VpcSecurityGroupIds(input.securityGroupIds, context), - }), - ...(input.subnetIds != null && { subnetIds: se_VpcSubnetIds(input.subnetIds, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }; -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_1VpcSecurityGroupIds - */ -const se_VpcSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Tag omitted. -/** - * serializeAws_json1_1VpcSubnetIds - */ -const se_VpcSubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1AccountSettings - */ -const de_AccountSettings = (output: any, context: __SerdeContext): AccountSettings => { - return { - awsAccountNumber: __expectString(output.awsAccountNumber), - defaultJobTimeoutMinutes: __expectInt32(output.defaultJobTimeoutMinutes), - maxJobTimeoutMinutes: __expectInt32(output.maxJobTimeoutMinutes), - maxSlots: output.maxSlots != null ? de_MaxSlotMap(output.maxSlots, context) : undefined, - skipAppResign: __expectBoolean(output.skipAppResign), - trialMinutes: output.trialMinutes != null ? de_TrialMinutes(output.trialMinutes, context) : undefined, - unmeteredDevices: - output.unmeteredDevices != null ? de_PurchasedDevicesMap(output.unmeteredDevices, context) : undefined, - unmeteredRemoteAccessDevices: - output.unmeteredRemoteAccessDevices != null - ? de_PurchasedDevicesMap(output.unmeteredRemoteAccessDevices, context) - : undefined, - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1AndroidPaths - */ -const de_AndroidPaths = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1ArgumentException - */ -const de_ArgumentException = (output: any, context: __SerdeContext): ArgumentException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TestGridVpcConfig omitted. -/** - * deserializeAws_json1_1Artifact - */ -const de_Artifact = (output: any, context: __SerdeContext): Artifact => { - return { - arn: __expectString(output.arn), - extension: __expectString(output.extension), - name: __expectString(output.name), - type: __expectString(output.type), - url: __expectString(output.url), - } as any; -}; +// se_TestParameters omitted. -/** - * deserializeAws_json1_1Artifacts - */ -const de_Artifacts = (output: any, context: __SerdeContext): Artifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Artifact(entry, context); - }); - return retVal; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1CannotDeleteException - */ -const de_CannotDeleteException = (output: any, context: __SerdeContext): CannotDeleteException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateDeviceInstanceRequest omitted. -/** - * deserializeAws_json1_1Counters - */ -const de_Counters = (output: any, context: __SerdeContext): Counters => { - return { - errored: __expectInt32(output.errored), - failed: __expectInt32(output.failed), - passed: __expectInt32(output.passed), - skipped: __expectInt32(output.skipped), - stopped: __expectInt32(output.stopped), - total: __expectInt32(output.total), - warned: __expectInt32(output.warned), - } as any; -}; +// se_UpdateDevicePoolRequest omitted. -/** - * deserializeAws_json1_1CPU - */ -const de_CPU = (output: any, context: __SerdeContext): CPU => { - return { - architecture: __expectString(output.architecture), - clock: __limitedParseDouble(output.clock), - frequency: __expectString(output.frequency), - } as any; -}; +// se_UpdateInstanceProfileRequest omitted. -/** - * deserializeAws_json1_1CreateDevicePoolResult - */ -const de_CreateDevicePoolResult = (output: any, context: __SerdeContext): CreateDevicePoolResult => { - return { - devicePool: output.devicePool != null ? de_DevicePool(output.devicePool, context) : undefined, - } as any; -}; +// se_UpdateNetworkProfileRequest omitted. -/** - * deserializeAws_json1_1CreateInstanceProfileResult - */ -const de_CreateInstanceProfileResult = (output: any, context: __SerdeContext): CreateInstanceProfileResult => { - return { - instanceProfile: output.instanceProfile != null ? de_InstanceProfile(output.instanceProfile, context) : undefined, - } as any; -}; +// se_UpdateProjectRequest omitted. -/** - * deserializeAws_json1_1CreateNetworkProfileResult - */ -const de_CreateNetworkProfileResult = (output: any, context: __SerdeContext): CreateNetworkProfileResult => { - return { - networkProfile: output.networkProfile != null ? de_NetworkProfile(output.networkProfile, context) : undefined, - } as any; -}; +// se_UpdateTestGridProjectRequest omitted. -/** - * deserializeAws_json1_1CreateProjectResult - */ -const de_CreateProjectResult = (output: any, context: __SerdeContext): CreateProjectResult => { - return { - project: output.project != null ? de_Project(output.project, context) : undefined, - } as any; -}; +// se_UpdateUploadRequest omitted. -/** - * deserializeAws_json1_1CreateRemoteAccessSessionResult - */ -const de_CreateRemoteAccessSessionResult = (output: any, context: __SerdeContext): CreateRemoteAccessSessionResult => { - return { - remoteAccessSession: - output.remoteAccessSession != null ? de_RemoteAccessSession(output.remoteAccessSession, context) : undefined, - } as any; -}; +// se_UpdateVPCEConfigurationRequest omitted. -/** - * deserializeAws_json1_1CreateTestGridProjectResult - */ -const de_CreateTestGridProjectResult = (output: any, context: __SerdeContext): CreateTestGridProjectResult => { - return { - testGridProject: output.testGridProject != null ? de_TestGridProject(output.testGridProject, context) : undefined, - } as any; -}; +// se_VpcConfig omitted. -/** - * deserializeAws_json1_1CreateTestGridUrlResult - */ -const de_CreateTestGridUrlResult = (output: any, context: __SerdeContext): CreateTestGridUrlResult => { - return { - expires: - output.expires != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expires))) : undefined, - url: __expectString(output.url), - } as any; -}; +// se_VpcSecurityGroupIds omitted. -/** - * deserializeAws_json1_1CreateUploadResult - */ -const de_CreateUploadResult = (output: any, context: __SerdeContext): CreateUploadResult => { - return { - upload: output.upload != null ? de_Upload(output.upload, context) : undefined, - } as any; -}; +// se_VpcSubnetIds omitted. /** - * deserializeAws_json1_1CreateVPCEConfigurationResult + * deserializeAws_json1_1AccountSettings */ -const de_CreateVPCEConfigurationResult = (output: any, context: __SerdeContext): CreateVPCEConfigurationResult => { - return { - vpceConfiguration: - output.vpceConfiguration != null ? de_VPCEConfiguration(output.vpceConfiguration, context) : undefined, - } as any; +const de_AccountSettings = (output: any, context: __SerdeContext): AccountSettings => { + return take(output, { + awsAccountNumber: __expectString, + defaultJobTimeoutMinutes: __expectInt32, + maxJobTimeoutMinutes: __expectInt32, + maxSlots: _json, + skipAppResign: __expectBoolean, + trialMinutes: (_: any) => de_TrialMinutes(_, context), + unmeteredDevices: _json, + unmeteredRemoteAccessDevices: _json, + }) as any; }; -/** - * deserializeAws_json1_1CustomerArtifactPaths - */ -const de_CustomerArtifactPaths = (output: any, context: __SerdeContext): CustomerArtifactPaths => { - return { - androidPaths: output.androidPaths != null ? de_AndroidPaths(output.androidPaths, context) : undefined, - deviceHostPaths: output.deviceHostPaths != null ? de_DeviceHostPaths(output.deviceHostPaths, context) : undefined, - iosPaths: output.iosPaths != null ? de_IosPaths(output.iosPaths, context) : undefined, - } as any; -}; +// de_AndroidPaths omitted. -/** - * deserializeAws_json1_1DeleteDevicePoolResult - */ -const de_DeleteDevicePoolResult = (output: any, context: __SerdeContext): DeleteDevicePoolResult => { - return {} as any; -}; +// de_ArgumentException omitted. -/** - * deserializeAws_json1_1DeleteInstanceProfileResult - */ -const de_DeleteInstanceProfileResult = (output: any, context: __SerdeContext): DeleteInstanceProfileResult => { - return {} as any; -}; +// de_Artifact omitted. -/** - * deserializeAws_json1_1DeleteNetworkProfileResult - */ -const de_DeleteNetworkProfileResult = (output: any, context: __SerdeContext): DeleteNetworkProfileResult => { - return {} as any; -}; +// de_Artifacts omitted. -/** - * deserializeAws_json1_1DeleteProjectResult - */ -const de_DeleteProjectResult = (output: any, context: __SerdeContext): DeleteProjectResult => { - return {} as any; -}; +// de_CannotDeleteException omitted. -/** - * deserializeAws_json1_1DeleteRemoteAccessSessionResult - */ -const de_DeleteRemoteAccessSessionResult = (output: any, context: __SerdeContext): DeleteRemoteAccessSessionResult => { - return {} as any; -}; +// de_Counters omitted. /** - * deserializeAws_json1_1DeleteRunResult + * deserializeAws_json1_1CPU */ -const de_DeleteRunResult = (output: any, context: __SerdeContext): DeleteRunResult => { - return {} as any; +const de_CPU = (output: any, context: __SerdeContext): CPU => { + return take(output, { + architecture: __expectString, + clock: __limitedParseDouble, + frequency: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeleteTestGridProjectResult - */ -const de_DeleteTestGridProjectResult = (output: any, context: __SerdeContext): DeleteTestGridProjectResult => { - return {} as any; -}; +// de_CreateDevicePoolResult omitted. -/** - * deserializeAws_json1_1DeleteUploadResult - */ -const de_DeleteUploadResult = (output: any, context: __SerdeContext): DeleteUploadResult => { - return {} as any; -}; +// de_CreateInstanceProfileResult omitted. -/** - * deserializeAws_json1_1DeleteVPCEConfigurationResult - */ -const de_DeleteVPCEConfigurationResult = (output: any, context: __SerdeContext): DeleteVPCEConfigurationResult => { - return {} as any; -}; +// de_CreateNetworkProfileResult omitted. /** - * deserializeAws_json1_1Device + * deserializeAws_json1_1CreateProjectResult */ -const de_Device = (output: any, context: __SerdeContext): Device => { - return { - arn: __expectString(output.arn), - availability: __expectString(output.availability), - carrier: __expectString(output.carrier), - cpu: output.cpu != null ? de_CPU(output.cpu, context) : undefined, - fleetName: __expectString(output.fleetName), - fleetType: __expectString(output.fleetType), - formFactor: __expectString(output.formFactor), - heapSize: __expectLong(output.heapSize), - image: __expectString(output.image), - instances: output.instances != null ? de_DeviceInstances(output.instances, context) : undefined, - manufacturer: __expectString(output.manufacturer), - memory: __expectLong(output.memory), - model: __expectString(output.model), - modelId: __expectString(output.modelId), - name: __expectString(output.name), - os: __expectString(output.os), - platform: __expectString(output.platform), - radio: __expectString(output.radio), - remoteAccessEnabled: __expectBoolean(output.remoteAccessEnabled), - remoteDebugEnabled: __expectBoolean(output.remoteDebugEnabled), - resolution: output.resolution != null ? de_Resolution(output.resolution, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeviceFilter - */ -const de_DeviceFilter = (output: any, context: __SerdeContext): DeviceFilter => { - return { - attribute: __expectString(output.attribute), - operator: __expectString(output.operator), - values: output.values != null ? de_DeviceFilterValues(output.values, context) : undefined, - } as any; +const de_CreateProjectResult = (output: any, context: __SerdeContext): CreateProjectResult => { + return take(output, { + project: (_: any) => de_Project(_, context), + }) as any; }; /** - * deserializeAws_json1_1DeviceFilters + * deserializeAws_json1_1CreateRemoteAccessSessionResult */ -const de_DeviceFilters = (output: any, context: __SerdeContext): DeviceFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceFilter(entry, context); - }); - return retVal; +const de_CreateRemoteAccessSessionResult = (output: any, context: __SerdeContext): CreateRemoteAccessSessionResult => { + return take(output, { + remoteAccessSession: (_: any) => de_RemoteAccessSession(_, context), + }) as any; }; /** - * deserializeAws_json1_1DeviceFilterValues + * deserializeAws_json1_1CreateTestGridProjectResult */ -const de_DeviceFilterValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_CreateTestGridProjectResult = (output: any, context: __SerdeContext): CreateTestGridProjectResult => { + return take(output, { + testGridProject: (_: any) => de_TestGridProject(_, context), + }) as any; }; /** - * deserializeAws_json1_1DeviceHostPaths + * deserializeAws_json1_1CreateTestGridUrlResult */ -const de_DeviceHostPaths = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_CreateTestGridUrlResult = (output: any, context: __SerdeContext): CreateTestGridUrlResult => { + return take(output, { + expires: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + url: __expectString, + }) as any; }; /** - * deserializeAws_json1_1DeviceInstance + * deserializeAws_json1_1CreateUploadResult */ -const de_DeviceInstance = (output: any, context: __SerdeContext): DeviceInstance => { - return { - arn: __expectString(output.arn), - deviceArn: __expectString(output.deviceArn), - instanceProfile: output.instanceProfile != null ? de_InstanceProfile(output.instanceProfile, context) : undefined, - labels: output.labels != null ? de_InstanceLabels(output.labels, context) : undefined, - status: __expectString(output.status), - udid: __expectString(output.udid), - } as any; +const de_CreateUploadResult = (output: any, context: __SerdeContext): CreateUploadResult => { + return take(output, { + upload: (_: any) => de_Upload(_, context), + }) as any; }; +// de_CreateVPCEConfigurationResult omitted. + +// de_CustomerArtifactPaths omitted. + +// de_DeleteDevicePoolResult omitted. + +// de_DeleteInstanceProfileResult omitted. + +// de_DeleteNetworkProfileResult omitted. + +// de_DeleteProjectResult omitted. + +// de_DeleteRemoteAccessSessionResult omitted. + +// de_DeleteRunResult omitted. + +// de_DeleteTestGridProjectResult omitted. + +// de_DeleteUploadResult omitted. + +// de_DeleteVPCEConfigurationResult omitted. + /** - * deserializeAws_json1_1DeviceInstances + * deserializeAws_json1_1Device */ -const de_DeviceInstances = (output: any, context: __SerdeContext): DeviceInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceInstance(entry, context); - }); - return retVal; +const de_Device = (output: any, context: __SerdeContext): Device => { + return take(output, { + arn: __expectString, + availability: __expectString, + carrier: __expectString, + cpu: (_: any) => de_CPU(_, context), + fleetName: __expectString, + fleetType: __expectString, + formFactor: __expectString, + heapSize: __expectLong, + image: __expectString, + instances: _json, + manufacturer: __expectString, + memory: __expectLong, + model: __expectString, + modelId: __expectString, + name: __expectString, + os: __expectString, + platform: __expectString, + radio: __expectString, + remoteAccessEnabled: __expectBoolean, + remoteDebugEnabled: __expectBoolean, + resolution: _json, + }) as any; }; +// de_DeviceFilter omitted. + +// de_DeviceFilters omitted. + +// de_DeviceFilterValues omitted. + +// de_DeviceHostPaths omitted. + +// de_DeviceInstance omitted. + +// de_DeviceInstances omitted. + /** * deserializeAws_json1_1DeviceMinutes */ const de_DeviceMinutes = (output: any, context: __SerdeContext): DeviceMinutes => { - return { - metered: __limitedParseDouble(output.metered), - total: __limitedParseDouble(output.total), - unmetered: __limitedParseDouble(output.unmetered), - } as any; + return take(output, { + metered: __limitedParseDouble, + total: __limitedParseDouble, + unmetered: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1DevicePool - */ -const de_DevicePool = (output: any, context: __SerdeContext): DevicePool => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - maxDevices: __expectInt32(output.maxDevices), - name: __expectString(output.name), - rules: output.rules != null ? de_Rules(output.rules, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_DevicePool omitted. /** * deserializeAws_json1_1DevicePoolCompatibilityResult */ const de_DevicePoolCompatibilityResult = (output: any, context: __SerdeContext): DevicePoolCompatibilityResult => { - return { - compatible: __expectBoolean(output.compatible), - device: output.device != null ? de_Device(output.device, context) : undefined, - incompatibilityMessages: - output.incompatibilityMessages != null - ? de_IncompatibilityMessages(output.incompatibilityMessages, context) - : undefined, - } as any; + return take(output, { + compatible: __expectBoolean, + device: (_: any) => de_Device(_, context), + incompatibilityMessages: _json, + }) as any; }; /** @@ -7495,28 +6218,12 @@ const de_DevicePoolCompatibilityResults = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DevicePoolCompatibilityResult(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DevicePools - */ -const de_DevicePools = (output: any, context: __SerdeContext): DevicePool[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DevicePool(entry, context); - }); - return retVal; -}; +// de_DevicePools omitted. /** * deserializeAws_json1_1Devices @@ -7525,42 +6232,23 @@ const de_Devices = (output: any, context: __SerdeContext): Device[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Device(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DeviceSelectionResult - */ -const de_DeviceSelectionResult = (output: any, context: __SerdeContext): DeviceSelectionResult => { - return { - filters: output.filters != null ? de_DeviceFilters(output.filters, context) : undefined, - matchedDevicesCount: __expectInt32(output.matchedDevicesCount), - maxDevices: __expectInt32(output.maxDevices), - } as any; -}; +// de_DeviceSelectionResult omitted. /** * deserializeAws_json1_1GetAccountSettingsResult */ const de_GetAccountSettingsResult = (output: any, context: __SerdeContext): GetAccountSettingsResult => { - return { - accountSettings: output.accountSettings != null ? de_AccountSettings(output.accountSettings, context) : undefined, - } as any; + return take(output, { + accountSettings: (_: any) => de_AccountSettings(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetDeviceInstanceResult - */ -const de_GetDeviceInstanceResult = (output: any, context: __SerdeContext): GetDeviceInstanceResult => { - return { - deviceInstance: output.deviceInstance != null ? de_DeviceInstance(output.deviceInstance, context) : undefined, - } as any; -}; +// de_GetDeviceInstanceResult omitted. /** * deserializeAws_json1_1GetDevicePoolCompatibilityResult @@ -7569,190 +6257,126 @@ const de_GetDevicePoolCompatibilityResult = ( output: any, context: __SerdeContext ): GetDevicePoolCompatibilityResult => { - return { - compatibleDevices: - output.compatibleDevices != null - ? de_DevicePoolCompatibilityResults(output.compatibleDevices, context) - : undefined, - incompatibleDevices: - output.incompatibleDevices != null - ? de_DevicePoolCompatibilityResults(output.incompatibleDevices, context) - : undefined, - } as any; + return take(output, { + compatibleDevices: (_: any) => de_DevicePoolCompatibilityResults(_, context), + incompatibleDevices: (_: any) => de_DevicePoolCompatibilityResults(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetDevicePoolResult - */ -const de_GetDevicePoolResult = (output: any, context: __SerdeContext): GetDevicePoolResult => { - return { - devicePool: output.devicePool != null ? de_DevicePool(output.devicePool, context) : undefined, - } as any; -}; +// de_GetDevicePoolResult omitted. /** * deserializeAws_json1_1GetDeviceResult */ const de_GetDeviceResult = (output: any, context: __SerdeContext): GetDeviceResult => { - return { - device: output.device != null ? de_Device(output.device, context) : undefined, - } as any; + return take(output, { + device: (_: any) => de_Device(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetInstanceProfileResult - */ -const de_GetInstanceProfileResult = (output: any, context: __SerdeContext): GetInstanceProfileResult => { - return { - instanceProfile: output.instanceProfile != null ? de_InstanceProfile(output.instanceProfile, context) : undefined, - } as any; -}; +// de_GetInstanceProfileResult omitted. /** * deserializeAws_json1_1GetJobResult */ const de_GetJobResult = (output: any, context: __SerdeContext): GetJobResult => { - return { - job: output.job != null ? de_Job(output.job, context) : undefined, - } as any; + return take(output, { + job: (_: any) => de_Job(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetNetworkProfileResult - */ -const de_GetNetworkProfileResult = (output: any, context: __SerdeContext): GetNetworkProfileResult => { - return { - networkProfile: output.networkProfile != null ? de_NetworkProfile(output.networkProfile, context) : undefined, - } as any; -}; +// de_GetNetworkProfileResult omitted. /** * deserializeAws_json1_1GetOfferingStatusResult */ const de_GetOfferingStatusResult = (output: any, context: __SerdeContext): GetOfferingStatusResult => { - return { - current: output.current != null ? de_OfferingStatusMap(output.current, context) : undefined, - nextPeriod: output.nextPeriod != null ? de_OfferingStatusMap(output.nextPeriod, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + current: (_: any) => de_OfferingStatusMap(_, context), + nextPeriod: (_: any) => de_OfferingStatusMap(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetProjectResult */ const de_GetProjectResult = (output: any, context: __SerdeContext): GetProjectResult => { - return { - project: output.project != null ? de_Project(output.project, context) : undefined, - } as any; + return take(output, { + project: (_: any) => de_Project(_, context), + }) as any; }; /** * deserializeAws_json1_1GetRemoteAccessSessionResult */ const de_GetRemoteAccessSessionResult = (output: any, context: __SerdeContext): GetRemoteAccessSessionResult => { - return { - remoteAccessSession: - output.remoteAccessSession != null ? de_RemoteAccessSession(output.remoteAccessSession, context) : undefined, - } as any; + return take(output, { + remoteAccessSession: (_: any) => de_RemoteAccessSession(_, context), + }) as any; }; /** * deserializeAws_json1_1GetRunResult */ const de_GetRunResult = (output: any, context: __SerdeContext): GetRunResult => { - return { - run: output.run != null ? de_Run(output.run, context) : undefined, - } as any; + return take(output, { + run: (_: any) => de_Run(_, context), + }) as any; }; /** * deserializeAws_json1_1GetSuiteResult */ const de_GetSuiteResult = (output: any, context: __SerdeContext): GetSuiteResult => { - return { - suite: output.suite != null ? de_Suite(output.suite, context) : undefined, - } as any; + return take(output, { + suite: (_: any) => de_Suite(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTestGridProjectResult */ const de_GetTestGridProjectResult = (output: any, context: __SerdeContext): GetTestGridProjectResult => { - return { - testGridProject: output.testGridProject != null ? de_TestGridProject(output.testGridProject, context) : undefined, - } as any; + return take(output, { + testGridProject: (_: any) => de_TestGridProject(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTestGridSessionResult */ const de_GetTestGridSessionResult = (output: any, context: __SerdeContext): GetTestGridSessionResult => { - return { - testGridSession: output.testGridSession != null ? de_TestGridSession(output.testGridSession, context) : undefined, - } as any; + return take(output, { + testGridSession: (_: any) => de_TestGridSession(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTestResult */ const de_GetTestResult = (output: any, context: __SerdeContext): GetTestResult => { - return { - test: output.test != null ? de_Test(output.test, context) : undefined, - } as any; + return take(output, { + test: (_: any) => de_Test(_, context), + }) as any; }; /** * deserializeAws_json1_1GetUploadResult */ const de_GetUploadResult = (output: any, context: __SerdeContext): GetUploadResult => { - return { - upload: output.upload != null ? de_Upload(output.upload, context) : undefined, - } as any; + return take(output, { + upload: (_: any) => de_Upload(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetVPCEConfigurationResult - */ -const de_GetVPCEConfigurationResult = (output: any, context: __SerdeContext): GetVPCEConfigurationResult => { - return { - vpceConfiguration: - output.vpceConfiguration != null ? de_VPCEConfiguration(output.vpceConfiguration, context) : undefined, - } as any; -}; +// de_GetVPCEConfigurationResult omitted. -/** - * deserializeAws_json1_1IdempotencyException - */ -const de_IdempotencyException = (output: any, context: __SerdeContext): IdempotencyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_IdempotencyException omitted. -/** - * deserializeAws_json1_1IncompatibilityMessage - */ -const de_IncompatibilityMessage = (output: any, context: __SerdeContext): IncompatibilityMessage => { - return { - message: __expectString(output.message), - type: __expectString(output.type), - } as any; -}; +// de_IncompatibilityMessage omitted. -/** - * deserializeAws_json1_1IncompatibilityMessages - */ -const de_IncompatibilityMessages = (output: any, context: __SerdeContext): IncompatibilityMessage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IncompatibilityMessage(entry, context); - }); - return retVal; -}; +// de_IncompatibilityMessages omitted. /** * deserializeAws_json1_1InstallToRemoteAccessSessionResult @@ -7761,115 +6385,44 @@ const de_InstallToRemoteAccessSessionResult = ( output: any, context: __SerdeContext ): InstallToRemoteAccessSessionResult => { - return { - appUpload: output.appUpload != null ? de_Upload(output.appUpload, context) : undefined, - } as any; + return take(output, { + appUpload: (_: any) => de_Upload(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InstanceLabels - */ -const de_InstanceLabels = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InstanceLabels omitted. -/** - * deserializeAws_json1_1InstanceProfile - */ -const de_InstanceProfile = (output: any, context: __SerdeContext): InstanceProfile => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - excludeAppPackagesFromCleanup: - output.excludeAppPackagesFromCleanup != null - ? de_PackageIds(output.excludeAppPackagesFromCleanup, context) - : undefined, - name: __expectString(output.name), - packageCleanup: __expectBoolean(output.packageCleanup), - rebootAfterUse: __expectBoolean(output.rebootAfterUse), - } as any; -}; +// de_InstanceProfile omitted. -/** - * deserializeAws_json1_1InstanceProfiles - */ -const de_InstanceProfiles = (output: any, context: __SerdeContext): InstanceProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceProfile(entry, context); - }); - return retVal; -}; +// de_InstanceProfiles omitted. -/** - * deserializeAws_json1_1InternalServiceException - */ -const de_InternalServiceException = (output: any, context: __SerdeContext): InternalServiceException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServiceException omitted. -/** - * deserializeAws_json1_1InvalidOperationException - */ -const de_InvalidOperationException = (output: any, context: __SerdeContext): InvalidOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidOperationException omitted. -/** - * deserializeAws_json1_1IosPaths - */ -const de_IosPaths = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IosPaths omitted. /** * deserializeAws_json1_1Job */ const de_Job = (output: any, context: __SerdeContext): Job => { - return { - arn: __expectString(output.arn), - counters: output.counters != null ? de_Counters(output.counters, context) : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - device: output.device != null ? de_Device(output.device, context) : undefined, - deviceMinutes: output.deviceMinutes != null ? de_DeviceMinutes(output.deviceMinutes, context) : undefined, - instanceArn: __expectString(output.instanceArn), - message: __expectString(output.message), - name: __expectString(output.name), - result: __expectString(output.result), - started: - output.started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.started))) : undefined, - status: __expectString(output.status), - stopped: - output.stopped != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopped))) : undefined, - type: __expectString(output.type), - videoCapture: __expectBoolean(output.videoCapture), - videoEndpoint: __expectString(output.videoEndpoint), - } as any; + return take(output, { + arn: __expectString, + counters: _json, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + device: (_: any) => de_Device(_, context), + deviceMinutes: (_: any) => de_DeviceMinutes(_, context), + instanceArn: __expectString, + message: __expectString, + name: __expectString, + result: __expectString, + started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopped: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + videoCapture: __expectBoolean, + videoEndpoint: __expectString, + }) as any; }; /** @@ -7879,195 +6432,117 @@ const de_Jobs = (output: any, context: __SerdeContext): Job[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Job(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListArtifactsResult - */ -const de_ListArtifactsResult = (output: any, context: __SerdeContext): ListArtifactsResult => { - return { - artifacts: output.artifacts != null ? de_Artifacts(output.artifacts, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListArtifactsResult omitted. -/** - * deserializeAws_json1_1ListDeviceInstancesResult - */ -const de_ListDeviceInstancesResult = (output: any, context: __SerdeContext): ListDeviceInstancesResult => { - return { - deviceInstances: output.deviceInstances != null ? de_DeviceInstances(output.deviceInstances, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListDeviceInstancesResult omitted. -/** - * deserializeAws_json1_1ListDevicePoolsResult - */ -const de_ListDevicePoolsResult = (output: any, context: __SerdeContext): ListDevicePoolsResult => { - return { - devicePools: output.devicePools != null ? de_DevicePools(output.devicePools, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListDevicePoolsResult omitted. /** * deserializeAws_json1_1ListDevicesResult */ const de_ListDevicesResult = (output: any, context: __SerdeContext): ListDevicesResult => { - return { - devices: output.devices != null ? de_Devices(output.devices, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + devices: (_: any) => de_Devices(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListInstanceProfilesResult - */ -const de_ListInstanceProfilesResult = (output: any, context: __SerdeContext): ListInstanceProfilesResult => { - return { - instanceProfiles: - output.instanceProfiles != null ? de_InstanceProfiles(output.instanceProfiles, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListInstanceProfilesResult omitted. /** * deserializeAws_json1_1ListJobsResult */ const de_ListJobsResult = (output: any, context: __SerdeContext): ListJobsResult => { - return { - jobs: output.jobs != null ? de_Jobs(output.jobs, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + jobs: (_: any) => de_Jobs(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListNetworkProfilesResult - */ -const de_ListNetworkProfilesResult = (output: any, context: __SerdeContext): ListNetworkProfilesResult => { - return { - networkProfiles: output.networkProfiles != null ? de_NetworkProfiles(output.networkProfiles, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListNetworkProfilesResult omitted. -/** - * deserializeAws_json1_1ListOfferingPromotionsResult - */ -const de_ListOfferingPromotionsResult = (output: any, context: __SerdeContext): ListOfferingPromotionsResult => { - return { - nextToken: __expectString(output.nextToken), - offeringPromotions: - output.offeringPromotions != null ? de_OfferingPromotions(output.offeringPromotions, context) : undefined, - } as any; -}; +// de_ListOfferingPromotionsResult omitted. /** * deserializeAws_json1_1ListOfferingsResult */ const de_ListOfferingsResult = (output: any, context: __SerdeContext): ListOfferingsResult => { - return { - nextToken: __expectString(output.nextToken), - offerings: output.offerings != null ? de_Offerings(output.offerings, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + offerings: (_: any) => de_Offerings(_, context), + }) as any; }; /** * deserializeAws_json1_1ListOfferingTransactionsResult */ const de_ListOfferingTransactionsResult = (output: any, context: __SerdeContext): ListOfferingTransactionsResult => { - return { - nextToken: __expectString(output.nextToken), - offeringTransactions: - output.offeringTransactions != null ? de_OfferingTransactions(output.offeringTransactions, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + offeringTransactions: (_: any) => de_OfferingTransactions(_, context), + }) as any; }; /** * deserializeAws_json1_1ListProjectsResult */ const de_ListProjectsResult = (output: any, context: __SerdeContext): ListProjectsResult => { - return { - nextToken: __expectString(output.nextToken), - projects: output.projects != null ? de_Projects(output.projects, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + projects: (_: any) => de_Projects(_, context), + }) as any; }; /** * deserializeAws_json1_1ListRemoteAccessSessionsResult */ const de_ListRemoteAccessSessionsResult = (output: any, context: __SerdeContext): ListRemoteAccessSessionsResult => { - return { - nextToken: __expectString(output.nextToken), - remoteAccessSessions: - output.remoteAccessSessions != null ? de_RemoteAccessSessions(output.remoteAccessSessions, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + remoteAccessSessions: (_: any) => de_RemoteAccessSessions(_, context), + }) as any; }; /** * deserializeAws_json1_1ListRunsResult */ const de_ListRunsResult = (output: any, context: __SerdeContext): ListRunsResult => { - return { - nextToken: __expectString(output.nextToken), - runs: output.runs != null ? de_Runs(output.runs, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + runs: (_: any) => de_Runs(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListSamplesResult - */ -const de_ListSamplesResult = (output: any, context: __SerdeContext): ListSamplesResult => { - return { - nextToken: __expectString(output.nextToken), - samples: output.samples != null ? de_Samples(output.samples, context) : undefined, - } as any; -}; +// de_ListSamplesResult omitted. /** * deserializeAws_json1_1ListSuitesResult */ const de_ListSuitesResult = (output: any, context: __SerdeContext): ListSuitesResult => { - return { - nextToken: __expectString(output.nextToken), - suites: output.suites != null ? de_Suites(output.suites, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + suites: (_: any) => de_Suites(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListTestGridProjectsResult */ const de_ListTestGridProjectsResult = (output: any, context: __SerdeContext): ListTestGridProjectsResult => { - return { - nextToken: __expectString(output.nextToken), - testGridProjects: - output.testGridProjects != null ? de_TestGridProjects(output.testGridProjects, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + testGridProjects: (_: any) => de_TestGridProjects(_, context), + }) as any; }; /** @@ -8077,203 +6552,103 @@ const de_ListTestGridSessionActionsResult = ( output: any, context: __SerdeContext ): ListTestGridSessionActionsResult => { - return { - actions: output.actions != null ? de_TestGridSessionActions(output.actions, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + actions: (_: any) => de_TestGridSessionActions(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListTestGridSessionArtifactsResult - */ -const de_ListTestGridSessionArtifactsResult = ( - output: any, - context: __SerdeContext -): ListTestGridSessionArtifactsResult => { - return { - artifacts: output.artifacts != null ? de_TestGridSessionArtifacts(output.artifacts, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListTestGridSessionArtifactsResult omitted. /** * deserializeAws_json1_1ListTestGridSessionsResult */ const de_ListTestGridSessionsResult = (output: any, context: __SerdeContext): ListTestGridSessionsResult => { - return { - nextToken: __expectString(output.nextToken), - testGridSessions: - output.testGridSessions != null ? de_TestGridSessions(output.testGridSessions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTestsResult - */ -const de_ListTestsResult = (output: any, context: __SerdeContext): ListTestsResult => { - return { - nextToken: __expectString(output.nextToken), - tests: output.tests != null ? de_Tests(output.tests, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListUniqueProblemsResult - */ -const de_ListUniqueProblemsResult = (output: any, context: __SerdeContext): ListUniqueProblemsResult => { - return { - nextToken: __expectString(output.nextToken), - uniqueProblems: - output.uniqueProblems != null ? de_UniqueProblemsByExecutionResultMap(output.uniqueProblems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListUploadsResult - */ -const de_ListUploadsResult = (output: any, context: __SerdeContext): ListUploadsResult => { - return { - nextToken: __expectString(output.nextToken), - uploads: output.uploads != null ? de_Uploads(output.uploads, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListVPCEConfigurationsResult - */ -const de_ListVPCEConfigurationsResult = (output: any, context: __SerdeContext): ListVPCEConfigurationsResult => { - return { - nextToken: __expectString(output.nextToken), - vpceConfigurations: - output.vpceConfigurations != null ? de_VPCEConfigurations(output.vpceConfigurations, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Location - */ -const de_Location = (output: any, context: __SerdeContext): Location => { - return { - latitude: __limitedParseDouble(output.latitude), - longitude: __limitedParseDouble(output.longitude), - } as any; -}; - -/** - * deserializeAws_json1_1MaxSlotMap - */ -const de_MaxSlotMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1MonetaryAmount - */ -const de_MonetaryAmount = (output: any, context: __SerdeContext): MonetaryAmount => { - return { - amount: __limitedParseDouble(output.amount), - currencyCode: __expectString(output.currencyCode), - } as any; -}; - -/** - * deserializeAws_json1_1NetworkProfile - */ -const de_NetworkProfile = (output: any, context: __SerdeContext): NetworkProfile => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - downlinkBandwidthBits: __expectLong(output.downlinkBandwidthBits), - downlinkDelayMs: __expectLong(output.downlinkDelayMs), - downlinkJitterMs: __expectLong(output.downlinkJitterMs), - downlinkLossPercent: __expectInt32(output.downlinkLossPercent), - name: __expectString(output.name), - type: __expectString(output.type), - uplinkBandwidthBits: __expectLong(output.uplinkBandwidthBits), - uplinkDelayMs: __expectLong(output.uplinkDelayMs), - uplinkJitterMs: __expectLong(output.uplinkJitterMs), - uplinkLossPercent: __expectInt32(output.uplinkLossPercent), - } as any; + return take(output, { + nextToken: __expectString, + testGridSessions: (_: any) => de_TestGridSessions(_, context), + }) as any; }; /** - * deserializeAws_json1_1NetworkProfiles + * deserializeAws_json1_1ListTestsResult */ -const de_NetworkProfiles = (output: any, context: __SerdeContext): NetworkProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkProfile(entry, context); - }); - return retVal; +const de_ListTestsResult = (output: any, context: __SerdeContext): ListTestsResult => { + return take(output, { + nextToken: __expectString, + tests: (_: any) => de_Tests(_, context), + }) as any; }; /** - * deserializeAws_json1_1NotEligibleException + * deserializeAws_json1_1ListUniqueProblemsResult */ -const de_NotEligibleException = (output: any, context: __SerdeContext): NotEligibleException => { - return { - message: __expectString(output.message), - } as any; +const de_ListUniqueProblemsResult = (output: any, context: __SerdeContext): ListUniqueProblemsResult => { + return take(output, { + nextToken: __expectString, + uniqueProblems: (_: any) => de_UniqueProblemsByExecutionResultMap(_, context), + }) as any; }; /** - * deserializeAws_json1_1NotFoundException + * deserializeAws_json1_1ListUploadsResult */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_ListUploadsResult = (output: any, context: __SerdeContext): ListUploadsResult => { + return take(output, { + nextToken: __expectString, + uploads: (_: any) => de_Uploads(_, context), + }) as any; }; +// de_ListVPCEConfigurationsResult omitted. + /** - * deserializeAws_json1_1Offering + * deserializeAws_json1_1Location */ -const de_Offering = (output: any, context: __SerdeContext): Offering => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - platform: __expectString(output.platform), - recurringCharges: - output.recurringCharges != null ? de_RecurringCharges(output.recurringCharges, context) : undefined, - type: __expectString(output.type), - } as any; +const de_Location = (output: any, context: __SerdeContext): Location => { + return take(output, { + latitude: __limitedParseDouble, + longitude: __limitedParseDouble, + }) as any; }; +// de_MaxSlotMap omitted. + /** - * deserializeAws_json1_1OfferingPromotion + * deserializeAws_json1_1MonetaryAmount */ -const de_OfferingPromotion = (output: any, context: __SerdeContext): OfferingPromotion => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - } as any; +const de_MonetaryAmount = (output: any, context: __SerdeContext): MonetaryAmount => { + return take(output, { + amount: __limitedParseDouble, + currencyCode: __expectString, + }) as any; }; +// de_NetworkProfile omitted. + +// de_NetworkProfiles omitted. + +// de_NotEligibleException omitted. + +// de_NotFoundException omitted. + /** - * deserializeAws_json1_1OfferingPromotions + * deserializeAws_json1_1Offering */ -const de_OfferingPromotions = (output: any, context: __SerdeContext): OfferingPromotion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OfferingPromotion(entry, context); - }); - return retVal; +const de_Offering = (output: any, context: __SerdeContext): Offering => { + return take(output, { + description: __expectString, + id: __expectString, + platform: __expectString, + recurringCharges: (_: any) => de_RecurringCharges(_, context), + type: __expectString, + }) as any; }; +// de_OfferingPromotion omitted. + +// de_OfferingPromotions omitted. + /** * deserializeAws_json1_1Offerings */ @@ -8281,9 +6656,6 @@ const de_Offerings = (output: any, context: __SerdeContext): Offering[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Offering(entry, context); }); return retVal; @@ -8293,15 +6665,12 @@ const de_Offerings = (output: any, context: __SerdeContext): Offering[] => { * deserializeAws_json1_1OfferingStatus */ const de_OfferingStatus = (output: any, context: __SerdeContext): OfferingStatus => { - return { - effectiveOn: - output.effectiveOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.effectiveOn))) - : undefined, - offering: output.offering != null ? de_Offering(output.offering, context) : undefined, - quantity: __expectInt32(output.quantity), - type: __expectString(output.type), - } as any; + return take(output, { + effectiveOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + offering: (_: any) => de_Offering(_, context), + quantity: __expectInt32, + type: __expectString, + }) as any; }; /** @@ -8321,14 +6690,13 @@ const de_OfferingStatusMap = (output: any, context: __SerdeContext): Record { - return { - cost: output.cost != null ? de_MonetaryAmount(output.cost, context) : undefined, - createdOn: - output.createdOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdOn))) : undefined, - offeringPromotionId: __expectString(output.offeringPromotionId), - offeringStatus: output.offeringStatus != null ? de_OfferingStatus(output.offeringStatus, context) : undefined, - transactionId: __expectString(output.transactionId), - } as any; + return take(output, { + cost: (_: any) => de_MonetaryAmount(_, context), + createdOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + offeringPromotionId: __expectString, + offeringStatus: (_: any) => de_OfferingStatus(_, context), + transactionId: __expectString, + }) as any; }; /** @@ -8338,53 +6706,29 @@ const de_OfferingTransactions = (output: any, context: __SerdeContext): Offering const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OfferingTransaction(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PackageIds - */ -const de_PackageIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PackageIds omitted. /** * deserializeAws_json1_1Problem */ const de_Problem = (output: any, context: __SerdeContext): Problem => { - return { - device: output.device != null ? de_Device(output.device, context) : undefined, - job: output.job != null ? de_ProblemDetail(output.job, context) : undefined, - message: __expectString(output.message), - result: __expectString(output.result), - run: output.run != null ? de_ProblemDetail(output.run, context) : undefined, - suite: output.suite != null ? de_ProblemDetail(output.suite, context) : undefined, - test: output.test != null ? de_ProblemDetail(output.test, context) : undefined, - } as any; + return take(output, { + device: (_: any) => de_Device(_, context), + job: _json, + message: __expectString, + result: __expectString, + run: _json, + suite: _json, + test: _json, + }) as any; }; -/** - * deserializeAws_json1_1ProblemDetail - */ -const de_ProblemDetail = (output: any, context: __SerdeContext): ProblemDetail => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_ProblemDetail omitted. /** * deserializeAws_json1_1Problems @@ -8393,9 +6737,6 @@ const de_Problems = (output: any, context: __SerdeContext): Problem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Problem(entry, context); }); return retVal; @@ -8405,14 +6746,13 @@ const de_Problems = (output: any, context: __SerdeContext): Problem[] => { * deserializeAws_json1_1Project */ const de_Project = (output: any, context: __SerdeContext): Project => { - return { - arn: __expectString(output.arn), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - defaultJobTimeoutMinutes: __expectInt32(output.defaultJobTimeoutMinutes), - name: __expectString(output.name), - vpcConfig: output.vpcConfig != null ? de_VpcConfig(output.vpcConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultJobTimeoutMinutes: __expectInt32, + name: __expectString, + vpcConfig: _json, + }) as any; }; /** @@ -8422,57 +6762,32 @@ const de_Projects = (output: any, context: __SerdeContext): Project[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Project(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PurchasedDevicesMap - */ -const de_PurchasedDevicesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [DevicePlatform | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_PurchasedDevicesMap omitted. /** * deserializeAws_json1_1PurchaseOfferingResult */ const de_PurchaseOfferingResult = (output: any, context: __SerdeContext): PurchaseOfferingResult => { - return { - offeringTransaction: - output.offeringTransaction != null ? de_OfferingTransaction(output.offeringTransaction, context) : undefined, - } as any; + return take(output, { + offeringTransaction: (_: any) => de_OfferingTransaction(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Radios - */ -const de_Radios = (output: any, context: __SerdeContext): Radios => { - return { - bluetooth: __expectBoolean(output.bluetooth), - gps: __expectBoolean(output.gps), - nfc: __expectBoolean(output.nfc), - wifi: __expectBoolean(output.wifi), - } as any; -}; +// de_Radios omitted. /** * deserializeAws_json1_1RecurringCharge */ const de_RecurringCharge = (output: any, context: __SerdeContext): RecurringCharge => { - return { - cost: output.cost != null ? de_MonetaryAmount(output.cost, context) : undefined, - frequency: __expectString(output.frequency), - } as any; + return take(output, { + cost: (_: any) => de_MonetaryAmount(_, context), + frequency: __expectString, + }) as any; }; /** @@ -8482,9 +6797,6 @@ const de_RecurringCharges = (output: any, context: __SerdeContext): RecurringCha const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecurringCharge(entry, context); }); return retVal; @@ -8494,33 +6806,30 @@ const de_RecurringCharges = (output: any, context: __SerdeContext): RecurringCha * deserializeAws_json1_1RemoteAccessSession */ const de_RemoteAccessSession = (output: any, context: __SerdeContext): RemoteAccessSession => { - return { - arn: __expectString(output.arn), - billingMethod: __expectString(output.billingMethod), - clientId: __expectString(output.clientId), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - device: output.device != null ? de_Device(output.device, context) : undefined, - deviceMinutes: output.deviceMinutes != null ? de_DeviceMinutes(output.deviceMinutes, context) : undefined, - deviceUdid: __expectString(output.deviceUdid), - endpoint: __expectString(output.endpoint), - hostAddress: __expectString(output.hostAddress), - instanceArn: __expectString(output.instanceArn), - interactionMode: __expectString(output.interactionMode), - message: __expectString(output.message), - name: __expectString(output.name), - remoteDebugEnabled: __expectBoolean(output.remoteDebugEnabled), - remoteRecordAppArn: __expectString(output.remoteRecordAppArn), - remoteRecordEnabled: __expectBoolean(output.remoteRecordEnabled), - result: __expectString(output.result), - skipAppResign: __expectBoolean(output.skipAppResign), - started: - output.started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.started))) : undefined, - status: __expectString(output.status), - stopped: - output.stopped != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopped))) : undefined, - vpcConfig: output.vpcConfig != null ? de_VpcConfig(output.vpcConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + billingMethod: __expectString, + clientId: __expectString, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + device: (_: any) => de_Device(_, context), + deviceMinutes: (_: any) => de_DeviceMinutes(_, context), + deviceUdid: __expectString, + endpoint: __expectString, + hostAddress: __expectString, + instanceArn: __expectString, + interactionMode: __expectString, + message: __expectString, + name: __expectString, + remoteDebugEnabled: __expectBoolean, + remoteRecordAppArn: __expectString, + remoteRecordEnabled: __expectBoolean, + result: __expectString, + skipAppResign: __expectBoolean, + started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopped: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vpcConfig: _json, + }) as any; }; /** @@ -8530,9 +6839,6 @@ const de_RemoteAccessSessions = (output: any, context: __SerdeContext): RemoteAc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RemoteAccessSession(entry, context); }); return retVal; @@ -8542,95 +6848,55 @@ const de_RemoteAccessSessions = (output: any, context: __SerdeContext): RemoteAc * deserializeAws_json1_1RenewOfferingResult */ const de_RenewOfferingResult = (output: any, context: __SerdeContext): RenewOfferingResult => { - return { - offeringTransaction: - output.offeringTransaction != null ? de_OfferingTransaction(output.offeringTransaction, context) : undefined, - } as any; + return take(output, { + offeringTransaction: (_: any) => de_OfferingTransaction(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Resolution - */ -const de_Resolution = (output: any, context: __SerdeContext): Resolution => { - return { - height: __expectInt32(output.height), - width: __expectInt32(output.width), - } as any; -}; +// de_Resolution omitted. -/** - * deserializeAws_json1_1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - attribute: __expectString(output.attribute), - operator: __expectString(output.operator), - value: __expectString(output.value), - } as any; -}; +// de_Rule omitted. -/** - * deserializeAws_json1_1Rules - */ -const de_Rules = (output: any, context: __SerdeContext): Rule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Rule(entry, context); - }); - return retVal; -}; +// de_Rules omitted. /** * deserializeAws_json1_1Run */ const de_Run = (output: any, context: __SerdeContext): Run => { - return { - appUpload: __expectString(output.appUpload), - arn: __expectString(output.arn), - billingMethod: __expectString(output.billingMethod), - completedJobs: __expectInt32(output.completedJobs), - counters: output.counters != null ? de_Counters(output.counters, context) : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - customerArtifactPaths: - output.customerArtifactPaths != null - ? de_CustomerArtifactPaths(output.customerArtifactPaths, context) - : undefined, - deviceMinutes: output.deviceMinutes != null ? de_DeviceMinutes(output.deviceMinutes, context) : undefined, - devicePoolArn: __expectString(output.devicePoolArn), - deviceSelectionResult: - output.deviceSelectionResult != null - ? de_DeviceSelectionResult(output.deviceSelectionResult, context) - : undefined, - eventCount: __expectInt32(output.eventCount), - jobTimeoutMinutes: __expectInt32(output.jobTimeoutMinutes), - locale: __expectString(output.locale), - location: output.location != null ? de_Location(output.location, context) : undefined, - message: __expectString(output.message), - name: __expectString(output.name), - networkProfile: output.networkProfile != null ? de_NetworkProfile(output.networkProfile, context) : undefined, - parsingResultUrl: __expectString(output.parsingResultUrl), - platform: __expectString(output.platform), - radios: output.radios != null ? de_Radios(output.radios, context) : undefined, - result: __expectString(output.result), - resultCode: __expectString(output.resultCode), - seed: __expectInt32(output.seed), - skipAppResign: __expectBoolean(output.skipAppResign), - started: - output.started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.started))) : undefined, - status: __expectString(output.status), - stopped: - output.stopped != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopped))) : undefined, - testSpecArn: __expectString(output.testSpecArn), - totalJobs: __expectInt32(output.totalJobs), - type: __expectString(output.type), - vpcConfig: output.vpcConfig != null ? de_VpcConfig(output.vpcConfig, context) : undefined, - webUrl: __expectString(output.webUrl), - } as any; + return take(output, { + appUpload: __expectString, + arn: __expectString, + billingMethod: __expectString, + completedJobs: __expectInt32, + counters: _json, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerArtifactPaths: _json, + deviceMinutes: (_: any) => de_DeviceMinutes(_, context), + devicePoolArn: __expectString, + deviceSelectionResult: _json, + eventCount: __expectInt32, + jobTimeoutMinutes: __expectInt32, + locale: __expectString, + location: (_: any) => de_Location(_, context), + message: __expectString, + name: __expectString, + networkProfile: _json, + parsingResultUrl: __expectString, + platform: __expectString, + radios: _json, + result: __expectString, + resultCode: __expectString, + seed: __expectInt32, + skipAppResign: __expectBoolean, + started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopped: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + testSpecArn: __expectString, + totalJobs: __expectInt32, + type: __expectString, + vpcConfig: _json, + webUrl: __expectString, + }) as any; }; /** @@ -8640,136 +6906,74 @@ const de_Runs = (output: any, context: __SerdeContext): Run[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Run(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Sample - */ -const de_Sample = (output: any, context: __SerdeContext): Sample => { - return { - arn: __expectString(output.arn), - type: __expectString(output.type), - url: __expectString(output.url), - } as any; -}; +// de_Sample omitted. -/** - * deserializeAws_json1_1Samples - */ -const de_Samples = (output: any, context: __SerdeContext): Sample[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Sample(entry, context); - }); - return retVal; -}; +// de_Samples omitted. /** * deserializeAws_json1_1ScheduleRunResult */ const de_ScheduleRunResult = (output: any, context: __SerdeContext): ScheduleRunResult => { - return { - run: output.run != null ? de_Run(output.run, context) : undefined, - } as any; + return take(output, { + run: (_: any) => de_Run(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_json1_1ServiceAccountException - */ -const de_ServiceAccountException = (output: any, context: __SerdeContext): ServiceAccountException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceAccountException omitted. /** * deserializeAws_json1_1StopJobResult */ const de_StopJobResult = (output: any, context: __SerdeContext): StopJobResult => { - return { - job: output.job != null ? de_Job(output.job, context) : undefined, - } as any; + return take(output, { + job: (_: any) => de_Job(_, context), + }) as any; }; /** * deserializeAws_json1_1StopRemoteAccessSessionResult */ const de_StopRemoteAccessSessionResult = (output: any, context: __SerdeContext): StopRemoteAccessSessionResult => { - return { - remoteAccessSession: - output.remoteAccessSession != null ? de_RemoteAccessSession(output.remoteAccessSession, context) : undefined, - } as any; + return take(output, { + remoteAccessSession: (_: any) => de_RemoteAccessSession(_, context), + }) as any; }; /** * deserializeAws_json1_1StopRunResult */ const de_StopRunResult = (output: any, context: __SerdeContext): StopRunResult => { - return { - run: output.run != null ? de_Run(output.run, context) : undefined, - } as any; + return take(output, { + run: (_: any) => de_Run(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. /** * deserializeAws_json1_1Suite */ const de_Suite = (output: any, context: __SerdeContext): Suite => { - return { - arn: __expectString(output.arn), - counters: output.counters != null ? de_Counters(output.counters, context) : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - deviceMinutes: output.deviceMinutes != null ? de_DeviceMinutes(output.deviceMinutes, context) : undefined, - message: __expectString(output.message), - name: __expectString(output.name), - result: __expectString(output.result), - started: - output.started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.started))) : undefined, - status: __expectString(output.status), - stopped: - output.stopped != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopped))) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + counters: _json, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deviceMinutes: (_: any) => de_DeviceMinutes(_, context), + message: __expectString, + name: __expectString, + result: __expectString, + started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopped: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; }; /** @@ -8779,100 +6983,51 @@ const de_Suites = (output: any, context: __SerdeContext): Suite[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Suite(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagOperationException - */ -const de_TagOperationException = (output: any, context: __SerdeContext): TagOperationException => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_TagOperationException omitted. -/** - * deserializeAws_json1_1TagPolicyException - */ -const de_TagPolicyException = (output: any, context: __SerdeContext): TagPolicyException => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_TagPolicyException omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1Test */ const de_Test = (output: any, context: __SerdeContext): Test => { - return { - arn: __expectString(output.arn), - counters: output.counters != null ? de_Counters(output.counters, context) : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - deviceMinutes: output.deviceMinutes != null ? de_DeviceMinutes(output.deviceMinutes, context) : undefined, - message: __expectString(output.message), - name: __expectString(output.name), - result: __expectString(output.result), - started: - output.started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.started))) : undefined, - status: __expectString(output.status), - stopped: - output.stopped != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopped))) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + counters: _json, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deviceMinutes: (_: any) => de_DeviceMinutes(_, context), + message: __expectString, + name: __expectString, + result: __expectString, + started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopped: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; }; /** * deserializeAws_json1_1TestGridProject */ const de_TestGridProject = (output: any, context: __SerdeContext): TestGridProject => { - return { - arn: __expectString(output.arn), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - description: __expectString(output.description), - name: __expectString(output.name), - vpcConfig: output.vpcConfig != null ? de_TestGridVpcConfig(output.vpcConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + name: __expectString, + vpcConfig: _json, + }) as any; }; /** @@ -8882,9 +7037,6 @@ const de_TestGridProjects = (output: any, context: __SerdeContext): TestGridProj const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TestGridProject(entry, context); }); return retVal; @@ -8894,29 +7046,27 @@ const de_TestGridProjects = (output: any, context: __SerdeContext): TestGridProj * deserializeAws_json1_1TestGridSession */ const de_TestGridSession = (output: any, context: __SerdeContext): TestGridSession => { - return { - arn: __expectString(output.arn), - billingMinutes: __limitedParseDouble(output.billingMinutes), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - ended: output.ended != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ended))) : undefined, - seleniumProperties: __expectString(output.seleniumProperties), - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + billingMinutes: __limitedParseDouble, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ended: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + seleniumProperties: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1TestGridSessionAction */ const de_TestGridSessionAction = (output: any, context: __SerdeContext): TestGridSessionAction => { - return { - action: __expectString(output.action), - duration: __expectLong(output.duration), - requestMethod: __expectString(output.requestMethod), - started: - output.started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.started))) : undefined, - statusCode: __expectString(output.statusCode), - } as any; + return take(output, { + action: __expectString, + duration: __expectLong, + requestMethod: __expectString, + started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + statusCode: __expectString, + }) as any; }; /** @@ -8926,39 +7076,14 @@ const de_TestGridSessionActions = (output: any, context: __SerdeContext): TestGr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TestGridSessionAction(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TestGridSessionArtifact - */ -const de_TestGridSessionArtifact = (output: any, context: __SerdeContext): TestGridSessionArtifact => { - return { - filename: __expectString(output.filename), - type: __expectString(output.type), - url: __expectString(output.url), - } as any; -}; +// de_TestGridSessionArtifact omitted. -/** - * deserializeAws_json1_1TestGridSessionArtifacts - */ -const de_TestGridSessionArtifacts = (output: any, context: __SerdeContext): TestGridSessionArtifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TestGridSessionArtifact(entry, context); - }); - return retVal; -}; +// de_TestGridSessionArtifacts omitted. /** * deserializeAws_json1_1TestGridSessions @@ -8967,25 +7092,12 @@ const de_TestGridSessions = (output: any, context: __SerdeContext): TestGridSess const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TestGridSession(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TestGridVpcConfig - */ -const de_TestGridVpcConfig = (output: any, context: __SerdeContext): TestGridVpcConfig => { - return { - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_TestGridVpcConfig omitted. /** * deserializeAws_json1_1Tests @@ -8994,42 +7106,31 @@ const de_Tests = (output: any, context: __SerdeContext): Test[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Test(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_TooManyTagsException omitted. /** * deserializeAws_json1_1TrialMinutes */ const de_TrialMinutes = (output: any, context: __SerdeContext): TrialMinutes => { - return { - remaining: __limitedParseDouble(output.remaining), - total: __limitedParseDouble(output.total), - } as any; + return take(output, { + remaining: __limitedParseDouble, + total: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1UniqueProblem */ const de_UniqueProblem = (output: any, context: __SerdeContext): UniqueProblem => { - return { - message: __expectString(output.message), - problems: output.problems != null ? de_Problems(output.problems, context) : undefined, - } as any; + return take(output, { + message: __expectString, + problems: (_: any) => de_Problems(_, context), + }) as any; }; /** @@ -9039,9 +7140,6 @@ const de_UniqueProblems = (output: any, context: __SerdeContext): UniqueProblem[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UniqueProblem(entry, context); }); return retVal; @@ -9066,103 +7164,61 @@ const de_UniqueProblemsByExecutionResultMap = ( ); }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateDeviceInstanceResult - */ -const de_UpdateDeviceInstanceResult = (output: any, context: __SerdeContext): UpdateDeviceInstanceResult => { - return { - deviceInstance: output.deviceInstance != null ? de_DeviceInstance(output.deviceInstance, context) : undefined, - } as any; -}; +// de_UpdateDeviceInstanceResult omitted. -/** - * deserializeAws_json1_1UpdateDevicePoolResult - */ -const de_UpdateDevicePoolResult = (output: any, context: __SerdeContext): UpdateDevicePoolResult => { - return { - devicePool: output.devicePool != null ? de_DevicePool(output.devicePool, context) : undefined, - } as any; -}; +// de_UpdateDevicePoolResult omitted. -/** - * deserializeAws_json1_1UpdateInstanceProfileResult - */ -const de_UpdateInstanceProfileResult = (output: any, context: __SerdeContext): UpdateInstanceProfileResult => { - return { - instanceProfile: output.instanceProfile != null ? de_InstanceProfile(output.instanceProfile, context) : undefined, - } as any; -}; +// de_UpdateInstanceProfileResult omitted. -/** - * deserializeAws_json1_1UpdateNetworkProfileResult - */ -const de_UpdateNetworkProfileResult = (output: any, context: __SerdeContext): UpdateNetworkProfileResult => { - return { - networkProfile: output.networkProfile != null ? de_NetworkProfile(output.networkProfile, context) : undefined, - } as any; -}; +// de_UpdateNetworkProfileResult omitted. /** * deserializeAws_json1_1UpdateProjectResult */ const de_UpdateProjectResult = (output: any, context: __SerdeContext): UpdateProjectResult => { - return { - project: output.project != null ? de_Project(output.project, context) : undefined, - } as any; + return take(output, { + project: (_: any) => de_Project(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateTestGridProjectResult */ const de_UpdateTestGridProjectResult = (output: any, context: __SerdeContext): UpdateTestGridProjectResult => { - return { - testGridProject: output.testGridProject != null ? de_TestGridProject(output.testGridProject, context) : undefined, - } as any; + return take(output, { + testGridProject: (_: any) => de_TestGridProject(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateUploadResult */ const de_UpdateUploadResult = (output: any, context: __SerdeContext): UpdateUploadResult => { - return { - upload: output.upload != null ? de_Upload(output.upload, context) : undefined, - } as any; + return take(output, { + upload: (_: any) => de_Upload(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateVPCEConfigurationResult - */ -const de_UpdateVPCEConfigurationResult = (output: any, context: __SerdeContext): UpdateVPCEConfigurationResult => { - return { - vpceConfiguration: - output.vpceConfiguration != null ? de_VPCEConfiguration(output.vpceConfiguration, context) : undefined, - } as any; -}; +// de_UpdateVPCEConfigurationResult omitted. /** * deserializeAws_json1_1Upload */ const de_Upload = (output: any, context: __SerdeContext): Upload => { - return { - arn: __expectString(output.arn), - category: __expectString(output.category), - contentType: __expectString(output.contentType), - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - message: __expectString(output.message), - metadata: __expectString(output.metadata), - name: __expectString(output.name), - status: __expectString(output.status), - type: __expectString(output.type), - url: __expectString(output.url), - } as any; + return take(output, { + arn: __expectString, + category: __expectString, + contentType: __expectString, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + metadata: __expectString, + name: __expectString, + status: __expectString, + type: __expectString, + url: __expectString, + }) as any; }; /** @@ -9172,83 +7228,20 @@ const de_Uploads = (output: any, context: __SerdeContext): Upload[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Upload(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1VpcConfig - */ -const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { - return { - securityGroupIds: - output.securityGroupIds != null ? de_VpcSecurityGroupIds(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_VpcSubnetIds(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcConfig omitted. -/** - * deserializeAws_json1_1VPCEConfiguration - */ -const de_VPCEConfiguration = (output: any, context: __SerdeContext): VPCEConfiguration => { - return { - arn: __expectString(output.arn), - serviceDnsName: __expectString(output.serviceDnsName), - vpceConfigurationDescription: __expectString(output.vpceConfigurationDescription), - vpceConfigurationName: __expectString(output.vpceConfigurationName), - vpceServiceName: __expectString(output.vpceServiceName), - } as any; -}; +// de_VPCEConfiguration omitted. -/** - * deserializeAws_json1_1VPCEConfigurations - */ -const de_VPCEConfigurations = (output: any, context: __SerdeContext): VPCEConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VPCEConfiguration(entry, context); - }); - return retVal; -}; +// de_VPCEConfigurations omitted. -/** - * deserializeAws_json1_1VpcSecurityGroupIds - */ -const de_VpcSecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VpcSecurityGroupIds omitted. -/** - * deserializeAws_json1_1VpcSubnetIds - */ -const de_VpcSubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VpcSubnetIds omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9270,6 +7263,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-devops-guru/src/protocols/Aws_restJson1.ts b/clients/client-devops-guru/src/protocols/Aws_restJson1.ts index 4b37984eb322..1b56f31b9655 100644 --- a/clients/client-devops-guru/src/protocols/Aws_restJson1.ts +++ b/clients/client-devops-guru/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -10,11 +11,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -123,32 +125,23 @@ import { import { DevOpsGuruServiceException as __BaseException } from "../models/DevOpsGuruServiceException"; import { AccessDeniedException, - AccountHealth, - AccountInsightHealth, AmazonCodeGuruProfilerIntegration, AnomalousLogGroup, AnomalyReportedTimeRange, - AnomalyResource, AnomalySourceDetails, - AnomalySourceMetadata, AnomalyTimeRange, CloudFormationCollection, - CloudFormationCollectionFilter, CloudFormationCostEstimationResourceCollectionFilter, - CloudFormationHealth, CloudWatchMetricsDataSummary, CloudWatchMetricsDetail, - CloudWatchMetricsDimension, ConflictException, CostEstimationResourceCollectionFilter, CostEstimationTimeRange, EndTimeRange, Event, - EventResource, EventSourcesConfig, EventTimeRange, InsightFeedback, - InsightHealth, InsightSeverity, InsightStatus, InsightTimeRange, @@ -162,21 +155,15 @@ import { ListMonitoredResourcesFilters, LogAnomalyClass, LogAnomalyShowcase, - LogsAnomalyDetectionIntegration, LogsAnomalyDetectionIntegrationConfig, MonitoredResourceIdentifier, - NotificationChannel, NotificationChannelConfig, NotificationFilterConfig, NotificationMessageType, - OpsCenterIntegration, OpsCenterIntegrationConfig, - PerformanceInsightsMetricDimensionGroup, - PerformanceInsightsMetricQuery, PerformanceInsightsMetricsDetail, PerformanceInsightsReferenceComparisonValues, PerformanceInsightsReferenceData, - PerformanceInsightsReferenceMetric, PerformanceInsightsReferenceScalar, PerformanceInsightsStat, PredictionTimeRange, @@ -190,32 +177,19 @@ import { ReactiveInsight, ReactiveInsightSummary, ReactiveOrganizationInsightSummary, - Recommendation, - RecommendationRelatedAnomaly, - RecommendationRelatedAnomalyResource, - RecommendationRelatedAnomalySourceDetail, - RecommendationRelatedCloudWatchMetricsSourceDetail, - RecommendationRelatedEvent, - RecommendationRelatedEventResource, ResourceCollection, - ResourceCollectionFilter, ResourceNotFoundException, ResourceTypeFilter, SearchInsightsFilters, SearchOrganizationInsightsFilters, ServiceCollection, - ServiceHealth, - ServiceInsightHealth, - ServiceIntegrationConfig, ServiceName, ServiceQuotaExceededException, ServiceResourceCost, SnsChannelConfig, StartTimeRange, TagCollection, - TagCollectionFilter, TagCostEstimationResourceCollectionFilter, - TagHealth, ThrottlingException, TimestampMetricValuePair, UpdateCloudFormationCollectionFilter, @@ -223,7 +197,6 @@ import { UpdateServiceIntegrationConfig, UpdateTagCollectionFilter, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -239,9 +212,11 @@ export const se_AddNotificationChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels"; let body: any; - body = JSON.stringify({ - ...(input.Config != null && { Config: se_NotificationChannelConfig(input.Config, context) }), - }); + body = JSON.stringify( + take(input, { + Config: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -314,10 +289,12 @@ export const se_DescribeAccountOverviewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts/overview"; let body: any; - body = JSON.stringify({ - ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }), - ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + FromTime: (_) => Math.round(_.getTime() / 1000), + ToTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -394,9 +371,11 @@ export const se_DescribeFeedbackCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback"; let body: any; - body = JSON.stringify({ - ...(input.InsightId != null && { InsightId: input.InsightId }), - }); + body = JSON.stringify( + take(input, { + InsightId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -448,12 +427,12 @@ export const se_DescribeOrganizationHealthCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.OrganizationalUnitIds != null && { - OrganizationalUnitIds: se_OrganizationalUnitIdList(input.OrganizationalUnitIds, context), - }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + OrganizationalUnitIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -478,14 +457,14 @@ export const se_DescribeOrganizationOverviewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/overview"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }), - ...(input.OrganizationalUnitIds != null && { - OrganizationalUnitIds: se_OrganizationalUnitIdList(input.OrganizationalUnitIds, context), - }), - ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + FromTime: (_) => Math.round(_.getTime() / 1000), + OrganizationalUnitIds: (_) => _json(_), + ToTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -511,17 +490,15 @@ export const se_DescribeOrganizationResourceCollectionHealthCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/health/resource-collection"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationResourceCollectionType != null && { - OrganizationResourceCollectionType: input.OrganizationResourceCollectionType, - }), - ...(input.OrganizationalUnitIds != null && { - OrganizationalUnitIds: se_OrganizationalUnitIdList(input.OrganizationalUnitIds, context), - }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + MaxResults: [], + NextToken: [], + OrganizationResourceCollectionType: [], + OrganizationalUnitIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -671,13 +648,15 @@ export const se_ListAnomaliesForInsightCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/anomalies/insight/{InsightId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InsightId", () => input.InsightId!, "{InsightId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Filters != null && { Filters: se_ListAnomaliesForInsightFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + StartTimeRange: (_) => se_StartTimeRange(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -702,11 +681,13 @@ export const se_ListAnomalousLogGroupsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-log-anomalies"; let body: any; - body = JSON.stringify({ - ...(input.InsightId != null && { InsightId: input.InsightId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + InsightId: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -731,12 +712,14 @@ export const se_ListEventsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Filters != null && { Filters: se_ListEventsFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + Filters: (_) => se_ListEventsFilters(_, context), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -761,11 +744,13 @@ export const se_ListInsightsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StatusFilter != null && { StatusFilter: se_ListInsightsStatusFilter(input.StatusFilter, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + StatusFilter: (_) => se_ListInsightsStatusFilter(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -790,11 +775,13 @@ export const se_ListMonitoredResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/monitoredResources"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_ListMonitoredResourcesFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -819,9 +806,11 @@ export const se_ListNotificationChannelsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -846,15 +835,15 @@ export const se_ListOrganizationInsightsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_ListInsightsAccountIdList(input.AccountIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationalUnitIds != null && { - OrganizationalUnitIds: se_ListInsightsOrganizationalUnitIdList(input.OrganizationalUnitIds, context), - }), - ...(input.StatusFilter != null && { StatusFilter: se_ListInsightsStatusFilter(input.StatusFilter, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + MaxResults: [], + NextToken: [], + OrganizationalUnitIds: (_) => _json(_), + StatusFilter: (_) => se_ListInsightsStatusFilter(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -879,12 +868,14 @@ export const se_ListRecommendationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recommendations"; let body: any; - body = JSON.stringify({ - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.InsightId != null && { InsightId: input.InsightId }), - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + AccountId: [], + InsightId: [], + Locale: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -909,9 +900,11 @@ export const se_PutFeedbackCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/feedback"; let body: any; - body = JSON.stringify({ - ...(input.InsightFeedback != null && { InsightFeedback: se_InsightFeedback(input.InsightFeedback, context) }), - }); + body = JSON.stringify( + take(input, { + InsightFeedback: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -959,13 +952,15 @@ export const se_SearchInsightsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/search"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_SearchInsightsFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + StartTimeRange: (_) => se_StartTimeRange(_, context), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -991,14 +986,16 @@ export const se_SearchOrganizationInsightsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/insights/search"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_SearchInsightsAccountIdList(input.AccountIds, context) }), - ...(input.Filters != null && { Filters: se_SearchOrganizationInsightsFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + StartTimeRange: (_) => se_StartTimeRange(_, context), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1023,12 +1020,12 @@ export const se_StartCostEstimationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cost-estimation"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ResourceCollection != null && { - ResourceCollection: se_CostEstimationResourceCollectionFilter(input.ResourceCollection, context), - }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ResourceCollection: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1053,9 +1050,11 @@ export const se_UpdateEventSourcesConfigCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-sources"; let body: any; - body = JSON.stringify({ - ...(input.EventSources != null && { EventSources: se_EventSourcesConfig(input.EventSources, context) }), - }); + body = JSON.stringify( + take(input, { + EventSources: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1080,12 +1079,12 @@ export const se_UpdateResourceCollectionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource-collections"; let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: input.Action }), - ...(input.ResourceCollection != null && { - ResourceCollection: se_UpdateResourceCollectionFilter(input.ResourceCollection, context), - }), - }); + body = JSON.stringify( + take(input, { + Action: [], + ResourceCollection: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1110,11 +1109,11 @@ export const se_UpdateServiceIntegrationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-integrations"; let body: any; - body = JSON.stringify({ - ...(input.ServiceIntegration != null && { - ServiceIntegration: se_UpdateServiceIntegrationConfig(input.ServiceIntegration, context), - }), - }); + body = JSON.stringify( + take(input, { + ServiceIntegration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1140,9 +1139,10 @@ export const de_AddNotificationChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1182,10 +1182,9 @@ const de_AddNotificationChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1241,10 +1240,9 @@ const de_DeleteInsightCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1264,21 +1262,14 @@ export const de_DescribeAccountHealthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalyzedResourceCount != null) { - contents.AnalyzedResourceCount = __expectLong(data.AnalyzedResourceCount); - } - if (data.MetricsAnalyzed != null) { - contents.MetricsAnalyzed = __expectInt32(data.MetricsAnalyzed); - } - if (data.OpenProactiveInsights != null) { - contents.OpenProactiveInsights = __expectInt32(data.OpenProactiveInsights); - } - if (data.OpenReactiveInsights != null) { - contents.OpenReactiveInsights = __expectInt32(data.OpenReactiveInsights); - } - if (data.ResourceHours != null) { - contents.ResourceHours = __expectLong(data.ResourceHours); - } + const doc = take(data, { + AnalyzedResourceCount: __expectLong, + MetricsAnalyzed: __expectInt32, + OpenProactiveInsights: __expectInt32, + OpenReactiveInsights: __expectInt32, + ResourceHours: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1309,10 +1300,9 @@ const de_DescribeAccountHealthCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1332,15 +1322,12 @@ export const de_DescribeAccountOverviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MeanTimeToRecoverInMilliseconds != null) { - contents.MeanTimeToRecoverInMilliseconds = __expectLong(data.MeanTimeToRecoverInMilliseconds); - } - if (data.ProactiveInsights != null) { - contents.ProactiveInsights = __expectInt32(data.ProactiveInsights); - } - if (data.ReactiveInsights != null) { - contents.ReactiveInsights = __expectInt32(data.ReactiveInsights); - } + const doc = take(data, { + MeanTimeToRecoverInMilliseconds: __expectLong, + ProactiveInsights: __expectInt32, + ReactiveInsights: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -1371,10 +1358,9 @@ const de_DescribeAccountOverviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1394,12 +1380,11 @@ export const de_DescribeAnomalyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProactiveAnomaly != null) { - contents.ProactiveAnomaly = de_ProactiveAnomaly(data.ProactiveAnomaly, context); - } - if (data.ReactiveAnomaly != null) { - contents.ReactiveAnomaly = de_ReactiveAnomaly(data.ReactiveAnomaly, context); - } + const doc = take(data, { + ProactiveAnomaly: (_) => de_ProactiveAnomaly(_, context), + ReactiveAnomaly: (_) => de_ReactiveAnomaly(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1433,10 +1418,9 @@ const de_DescribeAnomalyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1456,9 +1440,10 @@ export const de_DescribeEventSourcesConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventSources != null) { - contents.EventSources = de_EventSourcesConfig(data.EventSources, context); - } + const doc = take(data, { + EventSources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1489,10 +1474,9 @@ const de_DescribeEventSourcesConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1512,9 +1496,10 @@ export const de_DescribeFeedbackCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InsightFeedback != null) { - contents.InsightFeedback = de_InsightFeedback(data.InsightFeedback, context); - } + const doc = take(data, { + InsightFeedback: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1548,10 +1533,9 @@ const de_DescribeFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1571,12 +1555,11 @@ export const de_DescribeInsightCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProactiveInsight != null) { - contents.ProactiveInsight = de_ProactiveInsight(data.ProactiveInsight, context); - } - if (data.ReactiveInsight != null) { - contents.ReactiveInsight = de_ReactiveInsight(data.ReactiveInsight, context); - } + const doc = take(data, { + ProactiveInsight: (_) => de_ProactiveInsight(_, context), + ReactiveInsight: (_) => de_ReactiveInsight(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1610,10 +1593,9 @@ const de_DescribeInsightCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1633,18 +1615,13 @@ export const de_DescribeOrganizationHealthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricsAnalyzed != null) { - contents.MetricsAnalyzed = __expectInt32(data.MetricsAnalyzed); - } - if (data.OpenProactiveInsights != null) { - contents.OpenProactiveInsights = __expectInt32(data.OpenProactiveInsights); - } - if (data.OpenReactiveInsights != null) { - contents.OpenReactiveInsights = __expectInt32(data.OpenReactiveInsights); - } - if (data.ResourceHours != null) { - contents.ResourceHours = __expectLong(data.ResourceHours); - } + const doc = take(data, { + MetricsAnalyzed: __expectInt32, + OpenProactiveInsights: __expectInt32, + OpenReactiveInsights: __expectInt32, + ResourceHours: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1675,10 +1652,9 @@ const de_DescribeOrganizationHealthCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1698,12 +1674,11 @@ export const de_DescribeOrganizationOverviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProactiveInsights != null) { - contents.ProactiveInsights = __expectInt32(data.ProactiveInsights); - } - if (data.ReactiveInsights != null) { - contents.ReactiveInsights = __expectInt32(data.ReactiveInsights); - } + const doc = take(data, { + ProactiveInsights: __expectInt32, + ReactiveInsights: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -1734,10 +1709,9 @@ const de_DescribeOrganizationOverviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1757,21 +1731,14 @@ export const de_DescribeOrganizationResourceCollectionHealthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Account != null) { - contents.Account = de_AccountHealths(data.Account, context); - } - if (data.CloudFormation != null) { - contents.CloudFormation = de_CloudFormationHealths(data.CloudFormation, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Service != null) { - contents.Service = de_ServiceHealths(data.Service, context); - } - if (data.Tags != null) { - contents.Tags = de_TagHealths(data.Tags, context); - } + const doc = take(data, { + Account: _json, + CloudFormation: _json, + NextToken: __expectString, + Service: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1802,10 +1769,9 @@ const de_DescribeOrganizationResourceCollectionHealthCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1825,18 +1791,13 @@ export const de_DescribeResourceCollectionHealthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CloudFormation != null) { - contents.CloudFormation = de_CloudFormationHealths(data.CloudFormation, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Service != null) { - contents.Service = de_ServiceHealths(data.Service, context); - } - if (data.Tags != null) { - contents.Tags = de_TagHealths(data.Tags, context); - } + const doc = take(data, { + CloudFormation: _json, + NextToken: __expectString, + Service: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1867,10 +1828,9 @@ const de_DescribeResourceCollectionHealthCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1890,9 +1850,10 @@ export const de_DescribeServiceIntegrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServiceIntegration != null) { - contents.ServiceIntegration = de_ServiceIntegrationConfig(data.ServiceIntegration, context); - } + const doc = take(data, { + ServiceIntegration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1926,10 +1887,9 @@ const de_DescribeServiceIntegrationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1949,24 +1909,15 @@ export const de_GetCostEstimationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Costs != null) { - contents.Costs = de_ServiceResourceCosts(data.Costs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ResourceCollection != null) { - contents.ResourceCollection = de_CostEstimationResourceCollectionFilter(data.ResourceCollection, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.TimeRange != null) { - contents.TimeRange = de_CostEstimationTimeRange(data.TimeRange, context); - } - if (data.TotalCost != null) { - contents.TotalCost = __limitedParseDouble(data.TotalCost); - } + const doc = take(data, { + Costs: (_) => de_ServiceResourceCosts(_, context), + NextToken: __expectString, + ResourceCollection: _json, + Status: __expectString, + TimeRange: (_) => de_CostEstimationTimeRange(_, context), + TotalCost: __limitedParseDouble, + }); + Object.assign(contents, doc); return contents; }; @@ -2000,10 +1951,9 @@ const de_GetCostEstimationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,12 +1973,11 @@ export const de_GetResourceCollectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ResourceCollection != null) { - contents.ResourceCollection = de_ResourceCollectionFilter(data.ResourceCollection, context); - } + const doc = take(data, { + NextToken: __expectString, + ResourceCollection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2062,10 +2011,9 @@ const de_GetResourceCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2085,15 +2033,12 @@ export const de_ListAnomaliesForInsightCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProactiveAnomalies != null) { - contents.ProactiveAnomalies = de_ProactiveAnomalies(data.ProactiveAnomalies, context); - } - if (data.ReactiveAnomalies != null) { - contents.ReactiveAnomalies = de_ReactiveAnomalies(data.ReactiveAnomalies, context); - } + const doc = take(data, { + NextToken: __expectString, + ProactiveAnomalies: (_) => de_ProactiveAnomalies(_, context), + ReactiveAnomalies: (_) => de_ReactiveAnomalies(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2127,10 +2072,9 @@ const de_ListAnomaliesForInsightCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2150,15 +2094,12 @@ export const de_ListAnomalousLogGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalousLogGroups != null) { - contents.AnomalousLogGroups = de_AnomalousLogGroups(data.AnomalousLogGroups, context); - } - if (data.InsightId != null) { - contents.InsightId = __expectString(data.InsightId); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AnomalousLogGroups: (_) => de_AnomalousLogGroups(_, context), + InsightId: __expectString, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2192,10 +2133,9 @@ const de_ListAnomalousLogGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2215,12 +2155,11 @@ export const de_ListEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Events != null) { - contents.Events = de_Events(data.Events, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Events: (_) => de_Events(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2254,10 +2193,9 @@ const de_ListEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2277,15 +2215,12 @@ export const de_ListInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProactiveInsights != null) { - contents.ProactiveInsights = de_ProactiveInsights(data.ProactiveInsights, context); - } - if (data.ReactiveInsights != null) { - contents.ReactiveInsights = de_ReactiveInsights(data.ReactiveInsights, context); - } + const doc = take(data, { + NextToken: __expectString, + ProactiveInsights: (_) => de_ProactiveInsights(_, context), + ReactiveInsights: (_) => de_ReactiveInsights(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2316,10 +2251,9 @@ const de_ListInsightsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2339,12 +2273,11 @@ export const de_ListMonitoredResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MonitoredResourceIdentifiers != null) { - contents.MonitoredResourceIdentifiers = de_MonitoredResourceIdentifiers(data.MonitoredResourceIdentifiers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MonitoredResourceIdentifiers: (_) => de_MonitoredResourceIdentifiers(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2375,10 +2308,9 @@ const de_ListMonitoredResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2398,12 +2330,11 @@ export const de_ListNotificationChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Channels != null) { - contents.Channels = de_Channels(data.Channels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Channels: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2434,10 +2365,9 @@ const de_ListNotificationChannelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2457,15 +2387,12 @@ export const de_ListOrganizationInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProactiveInsights != null) { - contents.ProactiveInsights = de_ProactiveOrganizationInsights(data.ProactiveInsights, context); - } - if (data.ReactiveInsights != null) { - contents.ReactiveInsights = de_ReactiveOrganizationInsights(data.ReactiveInsights, context); - } + const doc = take(data, { + NextToken: __expectString, + ProactiveInsights: (_) => de_ProactiveOrganizationInsights(_, context), + ReactiveInsights: (_) => de_ReactiveOrganizationInsights(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2496,10 +2423,9 @@ const de_ListOrganizationInsightsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,12 +2445,11 @@ export const de_ListRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Recommendations != null) { - contents.Recommendations = de_Recommendations(data.Recommendations, context); - } + const doc = take(data, { + NextToken: __expectString, + Recommendations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2558,10 +2483,9 @@ const de_ListRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2617,10 +2541,9 @@ const de_PutFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,10 +2599,9 @@ const de_RemoveNotificationChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2699,15 +2621,12 @@ export const de_SearchInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProactiveInsights != null) { - contents.ProactiveInsights = de_ProactiveInsights(data.ProactiveInsights, context); - } - if (data.ReactiveInsights != null) { - contents.ReactiveInsights = de_ReactiveInsights(data.ReactiveInsights, context); - } + const doc = take(data, { + NextToken: __expectString, + ProactiveInsights: (_) => de_ProactiveInsights(_, context), + ReactiveInsights: (_) => de_ReactiveInsights(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2738,10 +2657,9 @@ const de_SearchInsightsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2761,15 +2679,12 @@ export const de_SearchOrganizationInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProactiveInsights != null) { - contents.ProactiveInsights = de_ProactiveInsights(data.ProactiveInsights, context); - } - if (data.ReactiveInsights != null) { - contents.ReactiveInsights = de_ReactiveInsights(data.ReactiveInsights, context); - } + const doc = take(data, { + NextToken: __expectString, + ProactiveInsights: (_) => de_ProactiveInsights(_, context), + ReactiveInsights: (_) => de_ReactiveInsights(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2800,10 +2715,9 @@ const de_SearchOrganizationInsightsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2859,10 +2773,9 @@ const de_StartCostEstimationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2912,10 +2825,9 @@ const de_UpdateEventSourcesConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2968,10 +2880,9 @@ const de_UpdateResourceCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3024,16 +2935,15 @@ const de_UpdateServiceIntegrationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3043,9 +2953,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3059,15 +2970,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3089,9 +2997,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3108,15 +3017,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3133,9 +3039,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3154,15 +3061,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3176,15 +3080,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Fields != null) { - contents.Fields = de_ValidationExceptionFields(data.Fields, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Fields: _json, + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3192,634 +3093,186 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountIdList - */ -const se_AccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdList omitted. -/** - * serializeAws_restJson1AmazonCodeGuruProfilerIntegration - */ -const se_AmazonCodeGuruProfilerIntegration = ( - input: AmazonCodeGuruProfilerIntegration, - context: __SerdeContext -): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_AmazonCodeGuruProfilerIntegration omitted. -/** - * serializeAws_restJson1CloudFormationCollection - */ -const se_CloudFormationCollection = (input: CloudFormationCollection, context: __SerdeContext): any => { - return { - ...(input.StackNames != null && { StackNames: se_StackNames(input.StackNames, context) }), - }; -}; +// se_CloudFormationCollection omitted. -/** - * serializeAws_restJson1CloudFormationCostEstimationResourceCollectionFilter - */ -const se_CloudFormationCostEstimationResourceCollectionFilter = ( - input: CloudFormationCostEstimationResourceCollectionFilter, - context: __SerdeContext -): any => { - return { - ...(input.StackNames != null && { StackNames: se_CostEstimationStackNames(input.StackNames, context) }), - }; -}; +// se_CloudFormationCostEstimationResourceCollectionFilter omitted. -/** - * serializeAws_restJson1CostEstimationResourceCollectionFilter - */ -const se_CostEstimationResourceCollectionFilter = ( - input: CostEstimationResourceCollectionFilter, - context: __SerdeContext -): any => { - return { - ...(input.CloudFormation != null && { - CloudFormation: se_CloudFormationCostEstimationResourceCollectionFilter(input.CloudFormation, context), - }), - ...(input.Tags != null && { Tags: se_TagCostEstimationResourceCollectionFilters(input.Tags, context) }), - }; -}; +// se_CostEstimationResourceCollectionFilter omitted. -/** - * serializeAws_restJson1CostEstimationStackNames - */ -const se_CostEstimationStackNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CostEstimationStackNames omitted. -/** - * serializeAws_restJson1CostEstimationTagValues - */ -const se_CostEstimationTagValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CostEstimationTagValues omitted. /** * serializeAws_restJson1EndTimeRange */ const se_EndTimeRange = (input: EndTimeRange, context: __SerdeContext): any => { - return { - ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }), - ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }), - }; + return take(input, { + FromTime: (_) => Math.round(_.getTime() / 1000), + ToTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1EventSourcesConfig - */ -const se_EventSourcesConfig = (input: EventSourcesConfig, context: __SerdeContext): any => { - return { - ...(input.AmazonCodeGuruProfiler != null && { - AmazonCodeGuruProfiler: se_AmazonCodeGuruProfilerIntegration(input.AmazonCodeGuruProfiler, context), - }), - }; -}; +// se_EventSourcesConfig omitted. /** * serializeAws_restJson1EventTimeRange */ const se_EventTimeRange = (input: EventTimeRange, context: __SerdeContext): any => { - return { - ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }), - ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }), - }; + return take(input, { + FromTime: (_) => Math.round(_.getTime() / 1000), + ToTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1InsightFeedback - */ -const se_InsightFeedback = (input: InsightFeedback, context: __SerdeContext): any => { - return { - ...(input.Feedback != null && { Feedback: input.Feedback }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_InsightFeedback omitted. -/** - * serializeAws_restJson1InsightSeverities - */ -const se_InsightSeverities = (input: (InsightSeverity | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InsightSeverities omitted. -/** - * serializeAws_restJson1InsightStatuses - */ -const se_InsightStatuses = (input: (InsightStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InsightStatuses omitted. -/** - * serializeAws_restJson1ListAnomaliesForInsightFilters - */ -const se_ListAnomaliesForInsightFilters = (input: ListAnomaliesForInsightFilters, context: __SerdeContext): any => { - return { - ...(input.ServiceCollection != null && { - ServiceCollection: se_ServiceCollection(input.ServiceCollection, context), - }), - }; -}; +// se_ListAnomaliesForInsightFilters omitted. /** * serializeAws_restJson1ListEventsFilters */ const se_ListEventsFilters = (input: ListEventsFilters, context: __SerdeContext): any => { - return { - ...(input.DataSource != null && { DataSource: input.DataSource }), - ...(input.EventClass != null && { EventClass: input.EventClass }), - ...(input.EventSource != null && { EventSource: input.EventSource }), - ...(input.EventTimeRange != null && { EventTimeRange: se_EventTimeRange(input.EventTimeRange, context) }), - ...(input.InsightId != null && { InsightId: input.InsightId }), - ...(input.ResourceCollection != null && { - ResourceCollection: se_ResourceCollection(input.ResourceCollection, context), - }), - }; + return take(input, { + DataSource: [], + EventClass: [], + EventSource: [], + EventTimeRange: (_) => se_EventTimeRange(_, context), + InsightId: [], + ResourceCollection: _json, + }); }; -/** - * serializeAws_restJson1ListInsightsAccountIdList - */ -const se_ListInsightsAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListInsightsAccountIdList omitted. /** * serializeAws_restJson1ListInsightsAnyStatusFilter */ const se_ListInsightsAnyStatusFilter = (input: ListInsightsAnyStatusFilter, context: __SerdeContext): any => { - return { - ...(input.StartTimeRange != null && { StartTimeRange: se_StartTimeRange(input.StartTimeRange, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + StartTimeRange: (_) => se_StartTimeRange(_, context), + Type: [], + }); }; /** * serializeAws_restJson1ListInsightsClosedStatusFilter */ const se_ListInsightsClosedStatusFilter = (input: ListInsightsClosedStatusFilter, context: __SerdeContext): any => { - return { - ...(input.EndTimeRange != null && { EndTimeRange: se_EndTimeRange(input.EndTimeRange, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + EndTimeRange: (_) => se_EndTimeRange(_, context), + Type: [], + }); }; -/** - * serializeAws_restJson1ListInsightsOngoingStatusFilter - */ -const se_ListInsightsOngoingStatusFilter = (input: ListInsightsOngoingStatusFilter, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ListInsightsOngoingStatusFilter omitted. -/** - * serializeAws_restJson1ListInsightsOrganizationalUnitIdList - */ -const se_ListInsightsOrganizationalUnitIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListInsightsOrganizationalUnitIdList omitted. /** * serializeAws_restJson1ListInsightsStatusFilter */ const se_ListInsightsStatusFilter = (input: ListInsightsStatusFilter, context: __SerdeContext): any => { - return { - ...(input.Any != null && { Any: se_ListInsightsAnyStatusFilter(input.Any, context) }), - ...(input.Closed != null && { Closed: se_ListInsightsClosedStatusFilter(input.Closed, context) }), - ...(input.Ongoing != null && { Ongoing: se_ListInsightsOngoingStatusFilter(input.Ongoing, context) }), - }; + return take(input, { + Any: (_) => se_ListInsightsAnyStatusFilter(_, context), + Closed: (_) => se_ListInsightsClosedStatusFilter(_, context), + Ongoing: _json, + }); }; -/** - * serializeAws_restJson1ListMonitoredResourcesFilters - */ -const se_ListMonitoredResourcesFilters = (input: ListMonitoredResourcesFilters, context: __SerdeContext): any => { - return { - ...(input.ResourcePermission != null && { ResourcePermission: input.ResourcePermission }), - ...(input.ResourceTypeFilters != null && { - ResourceTypeFilters: se_ResourceTypeFilters(input.ResourceTypeFilters, context), - }), - }; -}; +// se_ListMonitoredResourcesFilters omitted. -/** - * serializeAws_restJson1LogsAnomalyDetectionIntegrationConfig - */ -const se_LogsAnomalyDetectionIntegrationConfig = ( - input: LogsAnomalyDetectionIntegrationConfig, - context: __SerdeContext -): any => { - return { - ...(input.OptInStatus != null && { OptInStatus: input.OptInStatus }), - }; -}; +// se_LogsAnomalyDetectionIntegrationConfig omitted. -/** - * serializeAws_restJson1NotificationChannelConfig - */ -const se_NotificationChannelConfig = (input: NotificationChannelConfig, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_NotificationFilterConfig(input.Filters, context) }), - ...(input.Sns != null && { Sns: se_SnsChannelConfig(input.Sns, context) }), - }; -}; +// se_NotificationChannelConfig omitted. -/** - * serializeAws_restJson1NotificationFilterConfig - */ -const se_NotificationFilterConfig = (input: NotificationFilterConfig, context: __SerdeContext): any => { - return { - ...(input.MessageTypes != null && { MessageTypes: se_NotificationMessageTypes(input.MessageTypes, context) }), - ...(input.Severities != null && { Severities: se_InsightSeverities(input.Severities, context) }), - }; -}; +// se_NotificationFilterConfig omitted. -/** - * serializeAws_restJson1NotificationMessageTypes - */ -const se_NotificationMessageTypes = (input: (NotificationMessageType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NotificationMessageTypes omitted. -/** - * serializeAws_restJson1OpsCenterIntegrationConfig - */ -const se_OpsCenterIntegrationConfig = (input: OpsCenterIntegrationConfig, context: __SerdeContext): any => { - return { - ...(input.OptInStatus != null && { OptInStatus: input.OptInStatus }), - }; -}; +// se_OpsCenterIntegrationConfig omitted. -/** - * serializeAws_restJson1OrganizationalUnitIdList - */ -const se_OrganizationalUnitIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OrganizationalUnitIdList omitted. -/** - * serializeAws_restJson1ResourceCollection - */ -const se_ResourceCollection = (input: ResourceCollection, context: __SerdeContext): any => { - return { - ...(input.CloudFormation != null && { CloudFormation: se_CloudFormationCollection(input.CloudFormation, context) }), - ...(input.Tags != null && { Tags: se_TagCollections(input.Tags, context) }), - }; -}; +// se_ResourceCollection omitted. -/** - * serializeAws_restJson1ResourceTypeFilters - */ -const se_ResourceTypeFilters = (input: (ResourceTypeFilter | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceTypeFilters omitted. -/** - * serializeAws_restJson1SearchInsightsAccountIdList - */ -const se_SearchInsightsAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchInsightsAccountIdList omitted. -/** - * serializeAws_restJson1SearchInsightsFilters - */ -const se_SearchInsightsFilters = (input: SearchInsightsFilters, context: __SerdeContext): any => { - return { - ...(input.ResourceCollection != null && { - ResourceCollection: se_ResourceCollection(input.ResourceCollection, context), - }), - ...(input.ServiceCollection != null && { - ServiceCollection: se_ServiceCollection(input.ServiceCollection, context), - }), - ...(input.Severities != null && { Severities: se_InsightSeverities(input.Severities, context) }), - ...(input.Statuses != null && { Statuses: se_InsightStatuses(input.Statuses, context) }), - }; -}; +// se_SearchInsightsFilters omitted. -/** - * serializeAws_restJson1SearchOrganizationInsightsFilters - */ -const se_SearchOrganizationInsightsFilters = ( - input: SearchOrganizationInsightsFilters, - context: __SerdeContext -): any => { - return { - ...(input.ResourceCollection != null && { - ResourceCollection: se_ResourceCollection(input.ResourceCollection, context), - }), - ...(input.ServiceCollection != null && { - ServiceCollection: se_ServiceCollection(input.ServiceCollection, context), - }), - ...(input.Severities != null && { Severities: se_InsightSeverities(input.Severities, context) }), - ...(input.Statuses != null && { Statuses: se_InsightStatuses(input.Statuses, context) }), - }; -}; +// se_SearchOrganizationInsightsFilters omitted. -/** - * serializeAws_restJson1ServiceCollection - */ -const se_ServiceCollection = (input: ServiceCollection, context: __SerdeContext): any => { - return { - ...(input.ServiceNames != null && { ServiceNames: se_ServiceNames(input.ServiceNames, context) }), - }; -}; +// se_ServiceCollection omitted. -/** - * serializeAws_restJson1ServiceNames - */ -const se_ServiceNames = (input: (ServiceName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ServiceNames omitted. -/** - * serializeAws_restJson1SnsChannelConfig - */ -const se_SnsChannelConfig = (input: SnsChannelConfig, context: __SerdeContext): any => { - return { - ...(input.TopicArn != null && { TopicArn: input.TopicArn }), - }; -}; +// se_SnsChannelConfig omitted. -/** - * serializeAws_restJson1StackNames - */ -const se_StackNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StackNames omitted. /** * serializeAws_restJson1StartTimeRange */ const se_StartTimeRange = (input: StartTimeRange, context: __SerdeContext): any => { - return { - ...(input.FromTime != null && { FromTime: Math.round(input.FromTime.getTime() / 1000) }), - ...(input.ToTime != null && { ToTime: Math.round(input.ToTime.getTime() / 1000) }), - }; + return take(input, { + FromTime: (_) => Math.round(_.getTime() / 1000), + ToTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1TagCollection - */ -const se_TagCollection = (input: TagCollection, context: __SerdeContext): any => { - return { - ...(input.AppBoundaryKey != null && { AppBoundaryKey: input.AppBoundaryKey }), - ...(input.TagValues != null && { TagValues: se_TagValues(input.TagValues, context) }), - }; -}; +// se_TagCollection omitted. -/** - * serializeAws_restJson1TagCollections - */ -const se_TagCollections = (input: TagCollection[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagCollection(entry, context); - }); -}; +// se_TagCollections omitted. -/** - * serializeAws_restJson1TagCostEstimationResourceCollectionFilter - */ -const se_TagCostEstimationResourceCollectionFilter = ( - input: TagCostEstimationResourceCollectionFilter, - context: __SerdeContext -): any => { - return { - ...(input.AppBoundaryKey != null && { AppBoundaryKey: input.AppBoundaryKey }), - ...(input.TagValues != null && { TagValues: se_CostEstimationTagValues(input.TagValues, context) }), - }; -}; +// se_TagCostEstimationResourceCollectionFilter omitted. -/** - * serializeAws_restJson1TagCostEstimationResourceCollectionFilters - */ -const se_TagCostEstimationResourceCollectionFilters = ( - input: TagCostEstimationResourceCollectionFilter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagCostEstimationResourceCollectionFilter(entry, context); - }); -}; +// se_TagCostEstimationResourceCollectionFilters omitted. -/** - * serializeAws_restJson1TagValues - */ -const se_TagValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagValues omitted. -/** - * serializeAws_restJson1UpdateCloudFormationCollectionFilter - */ -const se_UpdateCloudFormationCollectionFilter = ( - input: UpdateCloudFormationCollectionFilter, - context: __SerdeContext -): any => { - return { - ...(input.StackNames != null && { StackNames: se_UpdateStackNames(input.StackNames, context) }), - }; -}; +// se_UpdateCloudFormationCollectionFilter omitted. -/** - * serializeAws_restJson1UpdateResourceCollectionFilter - */ -const se_UpdateResourceCollectionFilter = (input: UpdateResourceCollectionFilter, context: __SerdeContext): any => { - return { - ...(input.CloudFormation != null && { - CloudFormation: se_UpdateCloudFormationCollectionFilter(input.CloudFormation, context), - }), - ...(input.Tags != null && { Tags: se_UpdateTagCollectionFilters(input.Tags, context) }), - }; -}; +// se_UpdateResourceCollectionFilter omitted. -/** - * serializeAws_restJson1UpdateServiceIntegrationConfig - */ -const se_UpdateServiceIntegrationConfig = (input: UpdateServiceIntegrationConfig, context: __SerdeContext): any => { - return { - ...(input.LogsAnomalyDetection != null && { - LogsAnomalyDetection: se_LogsAnomalyDetectionIntegrationConfig(input.LogsAnomalyDetection, context), - }), - ...(input.OpsCenter != null && { OpsCenter: se_OpsCenterIntegrationConfig(input.OpsCenter, context) }), - }; -}; +// se_UpdateServiceIntegrationConfig omitted. -/** - * serializeAws_restJson1UpdateStackNames - */ -const se_UpdateStackNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdateStackNames omitted. -/** - * serializeAws_restJson1UpdateTagCollectionFilter - */ -const se_UpdateTagCollectionFilter = (input: UpdateTagCollectionFilter, context: __SerdeContext): any => { - return { - ...(input.AppBoundaryKey != null && { AppBoundaryKey: input.AppBoundaryKey }), - ...(input.TagValues != null && { TagValues: se_UpdateTagValues(input.TagValues, context) }), - }; -}; +// se_UpdateTagCollectionFilter omitted. -/** - * serializeAws_restJson1UpdateTagCollectionFilters - */ -const se_UpdateTagCollectionFilters = (input: UpdateTagCollectionFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateTagCollectionFilter(entry, context); - }); -}; +// se_UpdateTagCollectionFilters omitted. -/** - * serializeAws_restJson1UpdateTagValues - */ -const se_UpdateTagValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdateTagValues omitted. -/** - * deserializeAws_restJson1AccountHealth - */ -const de_AccountHealth = (output: any, context: __SerdeContext): AccountHealth => { - return { - AccountId: __expectString(output.AccountId), - Insight: output.Insight != null ? de_AccountInsightHealth(output.Insight, context) : undefined, - } as any; -}; +// de_AccountHealth omitted. -/** - * deserializeAws_restJson1AccountHealths - */ -const de_AccountHealths = (output: any, context: __SerdeContext): AccountHealth[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountHealth(entry, context); - }); - return retVal; -}; +// de_AccountHealths omitted. -/** - * deserializeAws_restJson1AccountInsightHealth - */ -const de_AccountInsightHealth = (output: any, context: __SerdeContext): AccountInsightHealth => { - return { - OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights), - OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights), - } as any; -}; +// de_AccountInsightHealth omitted. -/** - * deserializeAws_restJson1AmazonCodeGuruProfilerIntegration - */ -const de_AmazonCodeGuruProfilerIntegration = ( - output: any, - context: __SerdeContext -): AmazonCodeGuruProfilerIntegration => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_AmazonCodeGuruProfilerIntegration omitted. /** * deserializeAws_restJson1AnomalousLogGroup */ const de_AnomalousLogGroup = (output: any, context: __SerdeContext): AnomalousLogGroup => { - return { - ImpactEndTime: - output.ImpactEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImpactEndTime))) - : undefined, - ImpactStartTime: - output.ImpactStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImpactStartTime))) - : undefined, - LogAnomalyShowcases: - output.LogAnomalyShowcases != null ? de_LogAnomalyShowcases(output.LogAnomalyShowcases, context) : undefined, - LogGroupName: __expectString(output.LogGroupName), - NumberOfLogLinesScanned: __expectInt32(output.NumberOfLogLinesScanned), - } as any; + return take(output, { + ImpactEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImpactStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogAnomalyShowcases: (_: any) => de_LogAnomalyShowcases(_, context), + LogGroupName: __expectString, + NumberOfLogLinesScanned: __expectInt32, + }) as any; }; /** @@ -3829,9 +3282,6 @@ const de_AnomalousLogGroups = (output: any, context: __SerdeContext): AnomalousL const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AnomalousLogGroup(entry, context); }); return retVal; @@ -3841,189 +3291,75 @@ const de_AnomalousLogGroups = (output: any, context: __SerdeContext): AnomalousL * deserializeAws_restJson1AnomalyReportedTimeRange */ const de_AnomalyReportedTimeRange = (output: any, context: __SerdeContext): AnomalyReportedTimeRange => { - return { - CloseTime: - output.CloseTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CloseTime))) : undefined, - OpenTime: - output.OpenTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OpenTime))) : undefined, - } as any; + return take(output, { + CloseTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OpenTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1AnomalyResource - */ -const de_AnomalyResource = (output: any, context: __SerdeContext): AnomalyResource => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_AnomalyResource omitted. -/** - * deserializeAws_restJson1AnomalyResources - */ -const de_AnomalyResources = (output: any, context: __SerdeContext): AnomalyResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalyResource(entry, context); - }); - return retVal; -}; +// de_AnomalyResources omitted. /** * deserializeAws_restJson1AnomalySourceDetails */ const de_AnomalySourceDetails = (output: any, context: __SerdeContext): AnomalySourceDetails => { - return { - CloudWatchMetrics: - output.CloudWatchMetrics != null ? de_CloudWatchMetricsDetails(output.CloudWatchMetrics, context) : undefined, - PerformanceInsightsMetrics: - output.PerformanceInsightsMetrics != null - ? de_PerformanceInsightsMetricsDetails(output.PerformanceInsightsMetrics, context) - : undefined, - } as any; + return take(output, { + CloudWatchMetrics: (_: any) => de_CloudWatchMetricsDetails(_, context), + PerformanceInsightsMetrics: (_: any) => de_PerformanceInsightsMetricsDetails(_, context), + }) as any; }; -/** - * deserializeAws_restJson1AnomalySourceMetadata - */ -const de_AnomalySourceMetadata = (output: any, context: __SerdeContext): AnomalySourceMetadata => { - return { - Source: __expectString(output.Source), - SourceResourceName: __expectString(output.SourceResourceName), - SourceResourceType: __expectString(output.SourceResourceType), - } as any; -}; +// de_AnomalySourceMetadata omitted. /** * deserializeAws_restJson1AnomalyTimeRange */ const de_AnomalyTimeRange = (output: any, context: __SerdeContext): AnomalyTimeRange => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1AssociatedResourceArns - */ -const de_AssociatedResourceArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AssociatedResourceArns omitted. -/** - * deserializeAws_restJson1Channels - */ -const de_Channels = (output: any, context: __SerdeContext): NotificationChannel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotificationChannel(entry, context); - }); - return retVal; -}; +// de_Channels omitted. -/** - * deserializeAws_restJson1CloudFormationCollection - */ -const de_CloudFormationCollection = (output: any, context: __SerdeContext): CloudFormationCollection => { - return { - StackNames: output.StackNames != null ? de_StackNames(output.StackNames, context) : undefined, - } as any; -}; +// de_CloudFormationCollection omitted. -/** - * deserializeAws_restJson1CloudFormationCollectionFilter - */ -const de_CloudFormationCollectionFilter = (output: any, context: __SerdeContext): CloudFormationCollectionFilter => { - return { - StackNames: output.StackNames != null ? de_StackNames(output.StackNames, context) : undefined, - } as any; -}; +// de_CloudFormationCollectionFilter omitted. -/** - * deserializeAws_restJson1CloudFormationCostEstimationResourceCollectionFilter - */ -const de_CloudFormationCostEstimationResourceCollectionFilter = ( - output: any, - context: __SerdeContext -): CloudFormationCostEstimationResourceCollectionFilter => { - return { - StackNames: output.StackNames != null ? de_CostEstimationStackNames(output.StackNames, context) : undefined, - } as any; -}; +// de_CloudFormationCostEstimationResourceCollectionFilter omitted. -/** - * deserializeAws_restJson1CloudFormationHealth - */ -const de_CloudFormationHealth = (output: any, context: __SerdeContext): CloudFormationHealth => { - return { - AnalyzedResourceCount: __expectLong(output.AnalyzedResourceCount), - Insight: output.Insight != null ? de_InsightHealth(output.Insight, context) : undefined, - StackName: __expectString(output.StackName), - } as any; -}; +// de_CloudFormationHealth omitted. -/** - * deserializeAws_restJson1CloudFormationHealths - */ -const de_CloudFormationHealths = (output: any, context: __SerdeContext): CloudFormationHealth[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudFormationHealth(entry, context); - }); - return retVal; -}; +// de_CloudFormationHealths omitted. /** * deserializeAws_restJson1CloudWatchMetricsDataSummary */ const de_CloudWatchMetricsDataSummary = (output: any, context: __SerdeContext): CloudWatchMetricsDataSummary => { - return { - StatusCode: __expectString(output.StatusCode), - TimestampMetricValuePairList: - output.TimestampMetricValuePairList != null - ? de_TimestampMetricValuePairList(output.TimestampMetricValuePairList, context) - : undefined, - } as any; + return take(output, { + StatusCode: __expectString, + TimestampMetricValuePairList: (_: any) => de_TimestampMetricValuePairList(_, context), + }) as any; }; /** * deserializeAws_restJson1CloudWatchMetricsDetail */ const de_CloudWatchMetricsDetail = (output: any, context: __SerdeContext): CloudWatchMetricsDetail => { - return { - Dimensions: output.Dimensions != null ? de_CloudWatchMetricsDimensions(output.Dimensions, context) : undefined, - MetricDataSummary: - output.MetricDataSummary != null ? de_CloudWatchMetricsDataSummary(output.MetricDataSummary, context) : undefined, - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - Period: __expectInt32(output.Period), - Stat: __expectString(output.Stat), - Unit: __expectString(output.Unit), - } as any; + return take(output, { + Dimensions: _json, + MetricDataSummary: (_: any) => de_CloudWatchMetricsDataSummary(_, context), + MetricName: __expectString, + Namespace: __expectString, + Period: __expectInt32, + Stat: __expectString, + Unit: __expectString, + }) as any; }; /** @@ -4033,139 +3369,50 @@ const de_CloudWatchMetricsDetails = (output: any, context: __SerdeContext): Clou const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CloudWatchMetricsDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CloudWatchMetricsDimension - */ -const de_CloudWatchMetricsDimension = (output: any, context: __SerdeContext): CloudWatchMetricsDimension => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_CloudWatchMetricsDimension omitted. -/** - * deserializeAws_restJson1CloudWatchMetricsDimensions - */ -const de_CloudWatchMetricsDimensions = (output: any, context: __SerdeContext): CloudWatchMetricsDimension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchMetricsDimension(entry, context); - }); - return retVal; -}; +// de_CloudWatchMetricsDimensions omitted. -/** - * deserializeAws_restJson1CostEstimationResourceCollectionFilter - */ -const de_CostEstimationResourceCollectionFilter = ( - output: any, - context: __SerdeContext -): CostEstimationResourceCollectionFilter => { - return { - CloudFormation: - output.CloudFormation != null - ? de_CloudFormationCostEstimationResourceCollectionFilter(output.CloudFormation, context) - : undefined, - Tags: output.Tags != null ? de_TagCostEstimationResourceCollectionFilters(output.Tags, context) : undefined, - } as any; -}; +// de_CostEstimationResourceCollectionFilter omitted. -/** - * deserializeAws_restJson1CostEstimationStackNames - */ -const de_CostEstimationStackNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CostEstimationStackNames omitted. -/** - * deserializeAws_restJson1CostEstimationTagValues - */ -const de_CostEstimationTagValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CostEstimationTagValues omitted. /** * deserializeAws_restJson1CostEstimationTimeRange */ const de_CostEstimationTimeRange = (output: any, context: __SerdeContext): CostEstimationTimeRange => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1Event */ const de_Event = (output: any, context: __SerdeContext): Event => { - return { - DataSource: __expectString(output.DataSource), - EventClass: __expectString(output.EventClass), - EventSource: __expectString(output.EventSource), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Resources: output.Resources != null ? de_EventResources(output.Resources, context) : undefined, - Time: output.Time != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Time))) : undefined, - } as any; + return take(output, { + DataSource: __expectString, + EventClass: __expectString, + EventSource: __expectString, + Id: __expectString, + Name: __expectString, + ResourceCollection: _json, + Resources: _json, + Time: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1EventResource - */ -const de_EventResource = (output: any, context: __SerdeContext): EventResource => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_EventResource omitted. -/** - * deserializeAws_restJson1EventResources - */ -const de_EventResources = (output: any, context: __SerdeContext): EventResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventResource(entry, context); - }); - return retVal; -}; +// de_EventResources omitted. /** * deserializeAws_restJson1Events @@ -4174,90 +3421,42 @@ const de_Events = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Event(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EventSourcesConfig - */ -const de_EventSourcesConfig = (output: any, context: __SerdeContext): EventSourcesConfig => { - return { - AmazonCodeGuruProfiler: - output.AmazonCodeGuruProfiler != null - ? de_AmazonCodeGuruProfilerIntegration(output.AmazonCodeGuruProfiler, context) - : undefined, - } as any; -}; +// de_EventSourcesConfig omitted. -/** - * deserializeAws_restJson1InsightFeedback - */ -const de_InsightFeedback = (output: any, context: __SerdeContext): InsightFeedback => { - return { - Feedback: __expectString(output.Feedback), - Id: __expectString(output.Id), - } as any; -}; +// de_InsightFeedback omitted. -/** - * deserializeAws_restJson1InsightHealth - */ -const de_InsightHealth = (output: any, context: __SerdeContext): InsightHealth => { - return { - MeanTimeToRecoverInMilliseconds: __expectLong(output.MeanTimeToRecoverInMilliseconds), - OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights), - OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights), - } as any; -}; +// de_InsightHealth omitted. -/** - * deserializeAws_restJson1InsightSeverities - */ -const de_InsightSeverities = (output: any, context: __SerdeContext): (InsightSeverity | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InsightSeverities omitted. /** * deserializeAws_restJson1InsightTimeRange */ const de_InsightTimeRange = (output: any, context: __SerdeContext): InsightTimeRange => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1LogAnomalyClass */ const de_LogAnomalyClass = (output: any, context: __SerdeContext): LogAnomalyClass => { - return { - Explanation: __expectString(output.Explanation), - LogAnomalyToken: __expectString(output.LogAnomalyToken), - LogAnomalyType: __expectString(output.LogAnomalyType), - LogEventId: __expectString(output.LogEventId), - LogEventTimestamp: - output.LogEventTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LogEventTimestamp))) - : undefined, - LogStreamName: __expectString(output.LogStreamName), - NumberOfLogLinesOccurrences: __expectInt32(output.NumberOfLogLinesOccurrences), - } as any; + return take(output, { + Explanation: __expectString, + LogAnomalyToken: __expectString, + LogAnomalyType: __expectString, + LogEventId: __expectString, + LogEventTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogStreamName: __expectString, + NumberOfLogLinesOccurrences: __expectInt32, + }) as any; }; /** @@ -4267,9 +3466,6 @@ const de_LogAnomalyClasses = (output: any, context: __SerdeContext): LogAnomalyC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LogAnomalyClass(entry, context); }); return retVal; @@ -4279,10 +3475,9 @@ const de_LogAnomalyClasses = (output: any, context: __SerdeContext): LogAnomalyC * deserializeAws_restJson1LogAnomalyShowcase */ const de_LogAnomalyShowcase = (output: any, context: __SerdeContext): LogAnomalyShowcase => { - return { - LogAnomalyClasses: - output.LogAnomalyClasses != null ? de_LogAnomalyClasses(output.LogAnomalyClasses, context) : undefined, - } as any; + return take(output, { + LogAnomalyClasses: (_: any) => de_LogAnomalyClasses(_, context), + }) as any; }; /** @@ -4292,38 +3487,24 @@ const de_LogAnomalyShowcases = (output: any, context: __SerdeContext): LogAnomal const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LogAnomalyShowcase(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LogsAnomalyDetectionIntegration - */ -const de_LogsAnomalyDetectionIntegration = (output: any, context: __SerdeContext): LogsAnomalyDetectionIntegration => { - return { - OptInStatus: __expectString(output.OptInStatus), - } as any; -}; +// de_LogsAnomalyDetectionIntegration omitted. /** * deserializeAws_restJson1MonitoredResourceIdentifier */ const de_MonitoredResourceIdentifier = (output: any, context: __SerdeContext): MonitoredResourceIdentifier => { - return { - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - MonitoredResourceName: __expectString(output.MonitoredResourceName), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - ResourcePermission: __expectString(output.ResourcePermission), - Type: __expectString(output.Type), - } as any; + return take(output, { + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoredResourceName: __expectString, + ResourceCollection: _json, + ResourcePermission: __expectString, + Type: __expectString, + }) as any; }; /** @@ -4333,121 +3514,28 @@ const de_MonitoredResourceIdentifiers = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MonitoredResourceIdentifier(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NotificationChannel - */ -const de_NotificationChannel = (output: any, context: __SerdeContext): NotificationChannel => { - return { - Config: output.Config != null ? de_NotificationChannelConfig(output.Config, context) : undefined, - Id: __expectString(output.Id), - } as any; -}; +// de_NotificationChannel omitted. -/** - * deserializeAws_restJson1NotificationChannelConfig - */ -const de_NotificationChannelConfig = (output: any, context: __SerdeContext): NotificationChannelConfig => { - return { - Filters: output.Filters != null ? de_NotificationFilterConfig(output.Filters, context) : undefined, - Sns: output.Sns != null ? de_SnsChannelConfig(output.Sns, context) : undefined, - } as any; -}; +// de_NotificationChannelConfig omitted. -/** - * deserializeAws_restJson1NotificationFilterConfig - */ -const de_NotificationFilterConfig = (output: any, context: __SerdeContext): NotificationFilterConfig => { - return { - MessageTypes: output.MessageTypes != null ? de_NotificationMessageTypes(output.MessageTypes, context) : undefined, - Severities: output.Severities != null ? de_InsightSeverities(output.Severities, context) : undefined, - } as any; -}; +// de_NotificationFilterConfig omitted. -/** - * deserializeAws_restJson1NotificationMessageTypes - */ -const de_NotificationMessageTypes = (output: any, context: __SerdeContext): (NotificationMessageType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotificationMessageTypes omitted. -/** - * deserializeAws_restJson1OpsCenterIntegration - */ -const de_OpsCenterIntegration = (output: any, context: __SerdeContext): OpsCenterIntegration => { - return { - OptInStatus: __expectString(output.OptInStatus), - } as any; -}; +// de_OpsCenterIntegration omitted. -/** - * deserializeAws_restJson1PerformanceInsightsMetricDimensionGroup - */ -const de_PerformanceInsightsMetricDimensionGroup = ( - output: any, - context: __SerdeContext -): PerformanceInsightsMetricDimensionGroup => { - return { - Dimensions: - output.Dimensions != null ? de_PerformanceInsightsMetricDimensions(output.Dimensions, context) : undefined, - Group: __expectString(output.Group), - Limit: __expectInt32(output.Limit), - } as any; -}; +// de_PerformanceInsightsMetricDimensionGroup omitted. -/** - * deserializeAws_restJson1PerformanceInsightsMetricDimensions - */ -const de_PerformanceInsightsMetricDimensions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PerformanceInsightsMetricDimensions omitted. -/** - * deserializeAws_restJson1PerformanceInsightsMetricFilterMap - */ -const de_PerformanceInsightsMetricFilterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PerformanceInsightsMetricFilterMap omitted. -/** - * deserializeAws_restJson1PerformanceInsightsMetricQuery - */ -const de_PerformanceInsightsMetricQuery = (output: any, context: __SerdeContext): PerformanceInsightsMetricQuery => { - return { - Filter: output.Filter != null ? de_PerformanceInsightsMetricFilterMap(output.Filter, context) : undefined, - GroupBy: output.GroupBy != null ? de_PerformanceInsightsMetricDimensionGroup(output.GroupBy, context) : undefined, - Metric: __expectString(output.Metric), - } as any; -}; +// de_PerformanceInsightsMetricQuery omitted. /** * deserializeAws_restJson1PerformanceInsightsMetricsDetail @@ -4456,18 +3544,14 @@ const de_PerformanceInsightsMetricsDetail = ( output: any, context: __SerdeContext ): PerformanceInsightsMetricsDetail => { - return { - MetricDisplayName: __expectString(output.MetricDisplayName), - MetricQuery: - output.MetricQuery != null ? de_PerformanceInsightsMetricQuery(output.MetricQuery, context) : undefined, - ReferenceData: - output.ReferenceData != null ? de_PerformanceInsightsReferenceDataList(output.ReferenceData, context) : undefined, - StatsAtAnomaly: - output.StatsAtAnomaly != null ? de_PerformanceInsightsStats(output.StatsAtAnomaly, context) : undefined, - StatsAtBaseline: - output.StatsAtBaseline != null ? de_PerformanceInsightsStats(output.StatsAtBaseline, context) : undefined, - Unit: __expectString(output.Unit), - } as any; + return take(output, { + MetricDisplayName: __expectString, + MetricQuery: _json, + ReferenceData: (_: any) => de_PerformanceInsightsReferenceDataList(_, context), + StatsAtAnomaly: (_: any) => de_PerformanceInsightsStats(_, context), + StatsAtBaseline: (_: any) => de_PerformanceInsightsStats(_, context), + Unit: __expectString, + }) as any; }; /** @@ -4480,9 +3564,6 @@ const de_PerformanceInsightsMetricsDetails = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PerformanceInsightsMetricsDetail(entry, context); }); return retVal; @@ -4495,16 +3576,10 @@ const de_PerformanceInsightsReferenceComparisonValues = ( output: any, context: __SerdeContext ): PerformanceInsightsReferenceComparisonValues => { - return { - ReferenceMetric: - output.ReferenceMetric != null - ? de_PerformanceInsightsReferenceMetric(output.ReferenceMetric, context) - : undefined, - ReferenceScalar: - output.ReferenceScalar != null - ? de_PerformanceInsightsReferenceScalar(output.ReferenceScalar, context) - : undefined, - } as any; + return take(output, { + ReferenceMetric: _json, + ReferenceScalar: (_: any) => de_PerformanceInsightsReferenceScalar(_, context), + }) as any; }; /** @@ -4514,13 +3589,10 @@ const de_PerformanceInsightsReferenceData = ( output: any, context: __SerdeContext ): PerformanceInsightsReferenceData => { - return { - ComparisonValues: - output.ComparisonValues != null - ? de_PerformanceInsightsReferenceComparisonValues(output.ComparisonValues, context) - : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + ComparisonValues: (_: any) => de_PerformanceInsightsReferenceComparisonValues(_, context), + Name: __expectString, + }) as any; }; /** @@ -4533,26 +3605,12 @@ const de_PerformanceInsightsReferenceDataList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PerformanceInsightsReferenceData(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PerformanceInsightsReferenceMetric - */ -const de_PerformanceInsightsReferenceMetric = ( - output: any, - context: __SerdeContext -): PerformanceInsightsReferenceMetric => { - return { - MetricQuery: - output.MetricQuery != null ? de_PerformanceInsightsMetricQuery(output.MetricQuery, context) : undefined, - } as any; -}; +// de_PerformanceInsightsReferenceMetric omitted. /** * deserializeAws_restJson1PerformanceInsightsReferenceScalar @@ -4561,19 +3619,19 @@ const de_PerformanceInsightsReferenceScalar = ( output: any, context: __SerdeContext ): PerformanceInsightsReferenceScalar => { - return { - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1PerformanceInsightsStat */ const de_PerformanceInsightsStat = (output: any, context: __SerdeContext): PerformanceInsightsStat => { - return { - Type: __expectString(output.Type), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Type: __expectString, + Value: __limitedParseDouble, + }) as any; }; /** @@ -4583,9 +3641,6 @@ const de_PerformanceInsightsStats = (output: any, context: __SerdeContext): Perf const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PerformanceInsightsStat(entry, context); }); return retVal; @@ -4595,12 +3650,10 @@ const de_PerformanceInsightsStats = (output: any, context: __SerdeContext): Perf * deserializeAws_restJson1PredictionTimeRange */ const de_PredictionTimeRange = (output: any, context: __SerdeContext): PredictionTimeRange => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4610,9 +3663,6 @@ const de_ProactiveAnomalies = (output: any, context: __SerdeContext): ProactiveA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProactiveAnomalySummary(entry, context); }); return retVal; @@ -4622,82 +3672,61 @@ const de_ProactiveAnomalies = (output: any, context: __SerdeContext): ProactiveA * deserializeAws_restJson1ProactiveAnomaly */ const de_ProactiveAnomaly = (output: any, context: __SerdeContext): ProactiveAnomaly => { - return { - AnomalyReportedTimeRange: - output.AnomalyReportedTimeRange != null - ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context) - : undefined, - AnomalyResources: - output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined, - AnomalyTimeRange: - output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined, - AssociatedInsightId: __expectString(output.AssociatedInsightId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Limit: __limitedParseDouble(output.Limit), - PredictionTimeRange: - output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined, - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Severity: __expectString(output.Severity), - SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined, - SourceMetadata: - output.SourceMetadata != null ? de_AnomalySourceMetadata(output.SourceMetadata, context) : undefined, - Status: __expectString(output.Status), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined, - } as any; + return take(output, { + AnomalyReportedTimeRange: (_: any) => de_AnomalyReportedTimeRange(_, context), + AnomalyResources: _json, + AnomalyTimeRange: (_: any) => de_AnomalyTimeRange(_, context), + AssociatedInsightId: __expectString, + Description: __expectString, + Id: __expectString, + Limit: __limitedParseDouble, + PredictionTimeRange: (_: any) => de_PredictionTimeRange(_, context), + ResourceCollection: _json, + Severity: __expectString, + SourceDetails: (_: any) => de_AnomalySourceDetails(_, context), + SourceMetadata: _json, + Status: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1ProactiveAnomalySummary */ const de_ProactiveAnomalySummary = (output: any, context: __SerdeContext): ProactiveAnomalySummary => { - return { - AnomalyReportedTimeRange: - output.AnomalyReportedTimeRange != null - ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context) - : undefined, - AnomalyResources: - output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined, - AnomalyTimeRange: - output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined, - AssociatedInsightId: __expectString(output.AssociatedInsightId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Limit: __limitedParseDouble(output.Limit), - PredictionTimeRange: - output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined, - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Severity: __expectString(output.Severity), - SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined, - SourceMetadata: - output.SourceMetadata != null ? de_AnomalySourceMetadata(output.SourceMetadata, context) : undefined, - Status: __expectString(output.Status), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined, - } as any; + return take(output, { + AnomalyReportedTimeRange: (_: any) => de_AnomalyReportedTimeRange(_, context), + AnomalyResources: _json, + AnomalyTimeRange: (_: any) => de_AnomalyTimeRange(_, context), + AssociatedInsightId: __expectString, + Description: __expectString, + Id: __expectString, + Limit: __limitedParseDouble, + PredictionTimeRange: (_: any) => de_PredictionTimeRange(_, context), + ResourceCollection: _json, + Severity: __expectString, + SourceDetails: (_: any) => de_AnomalySourceDetails(_, context), + SourceMetadata: _json, + Status: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1ProactiveInsight */ const de_ProactiveInsight = (output: any, context: __SerdeContext): ProactiveInsight => { - return { - Description: __expectString(output.Description), - Id: __expectString(output.Id), - InsightTimeRange: - output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined, - Name: __expectString(output.Name), - PredictionTimeRange: - output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined, - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Severity: __expectString(output.Severity), - SsmOpsItemId: __expectString(output.SsmOpsItemId), - Status: __expectString(output.Status), - } as any; + return take(output, { + Description: __expectString, + Id: __expectString, + InsightTimeRange: (_: any) => de_InsightTimeRange(_, context), + Name: __expectString, + PredictionTimeRange: (_: any) => de_PredictionTimeRange(_, context), + ResourceCollection: _json, + Severity: __expectString, + SsmOpsItemId: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4707,9 +3736,6 @@ const de_ProactiveInsights = (output: any, context: __SerdeContext): ProactiveIn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProactiveInsightSummary(entry, context); }); return retVal; @@ -4719,24 +3745,17 @@ const de_ProactiveInsights = (output: any, context: __SerdeContext): ProactiveIn * deserializeAws_restJson1ProactiveInsightSummary */ const de_ProactiveInsightSummary = (output: any, context: __SerdeContext): ProactiveInsightSummary => { - return { - AssociatedResourceArns: - output.AssociatedResourceArns != null - ? de_AssociatedResourceArns(output.AssociatedResourceArns, context) - : undefined, - Id: __expectString(output.Id), - InsightTimeRange: - output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined, - Name: __expectString(output.Name), - PredictionTimeRange: - output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined, - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - ServiceCollection: - output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined, - Severity: __expectString(output.Severity), - Status: __expectString(output.Status), - } as any; + return take(output, { + AssociatedResourceArns: _json, + Id: __expectString, + InsightTimeRange: (_: any) => de_InsightTimeRange(_, context), + Name: __expectString, + PredictionTimeRange: (_: any) => de_PredictionTimeRange(_, context), + ResourceCollection: _json, + ServiceCollection: _json, + Severity: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4749,9 +3768,6 @@ const de_ProactiveOrganizationInsights = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProactiveOrganizationInsightSummary(entry, context); }); return retVal; @@ -4764,22 +3780,18 @@ const de_ProactiveOrganizationInsightSummary = ( output: any, context: __SerdeContext ): ProactiveOrganizationInsightSummary => { - return { - AccountId: __expectString(output.AccountId), - Id: __expectString(output.Id), - InsightTimeRange: - output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined, - Name: __expectString(output.Name), - OrganizationalUnitId: __expectString(output.OrganizationalUnitId), - PredictionTimeRange: - output.PredictionTimeRange != null ? de_PredictionTimeRange(output.PredictionTimeRange, context) : undefined, - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - ServiceCollection: - output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined, - Severity: __expectString(output.Severity), - Status: __expectString(output.Status), - } as any; + return take(output, { + AccountId: __expectString, + Id: __expectString, + InsightTimeRange: (_: any) => de_InsightTimeRange(_, context), + Name: __expectString, + OrganizationalUnitId: __expectString, + PredictionTimeRange: (_: any) => de_PredictionTimeRange(_, context), + ResourceCollection: _json, + ServiceCollection: _json, + Severity: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4789,9 +3801,6 @@ const de_ReactiveAnomalies = (output: any, context: __SerdeContext): ReactiveAno const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReactiveAnomalySummary(entry, context); }); return retVal; @@ -4801,72 +3810,58 @@ const de_ReactiveAnomalies = (output: any, context: __SerdeContext): ReactiveAno * deserializeAws_restJson1ReactiveAnomaly */ const de_ReactiveAnomaly = (output: any, context: __SerdeContext): ReactiveAnomaly => { - return { - AnomalyReportedTimeRange: - output.AnomalyReportedTimeRange != null - ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context) - : undefined, - AnomalyResources: - output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined, - AnomalyTimeRange: - output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined, - AssociatedInsightId: __expectString(output.AssociatedInsightId), - CausalAnomalyId: __expectString(output.CausalAnomalyId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Severity: __expectString(output.Severity), - SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined, - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + AnomalyReportedTimeRange: (_: any) => de_AnomalyReportedTimeRange(_, context), + AnomalyResources: _json, + AnomalyTimeRange: (_: any) => de_AnomalyTimeRange(_, context), + AssociatedInsightId: __expectString, + CausalAnomalyId: __expectString, + Description: __expectString, + Id: __expectString, + Name: __expectString, + ResourceCollection: _json, + Severity: __expectString, + SourceDetails: (_: any) => de_AnomalySourceDetails(_, context), + Status: __expectString, + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1ReactiveAnomalySummary */ const de_ReactiveAnomalySummary = (output: any, context: __SerdeContext): ReactiveAnomalySummary => { - return { - AnomalyReportedTimeRange: - output.AnomalyReportedTimeRange != null - ? de_AnomalyReportedTimeRange(output.AnomalyReportedTimeRange, context) - : undefined, - AnomalyResources: - output.AnomalyResources != null ? de_AnomalyResources(output.AnomalyResources, context) : undefined, - AnomalyTimeRange: - output.AnomalyTimeRange != null ? de_AnomalyTimeRange(output.AnomalyTimeRange, context) : undefined, - AssociatedInsightId: __expectString(output.AssociatedInsightId), - CausalAnomalyId: __expectString(output.CausalAnomalyId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Severity: __expectString(output.Severity), - SourceDetails: output.SourceDetails != null ? de_AnomalySourceDetails(output.SourceDetails, context) : undefined, - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + AnomalyReportedTimeRange: (_: any) => de_AnomalyReportedTimeRange(_, context), + AnomalyResources: _json, + AnomalyTimeRange: (_: any) => de_AnomalyTimeRange(_, context), + AssociatedInsightId: __expectString, + CausalAnomalyId: __expectString, + Description: __expectString, + Id: __expectString, + Name: __expectString, + ResourceCollection: _json, + Severity: __expectString, + SourceDetails: (_: any) => de_AnomalySourceDetails(_, context), + Status: __expectString, + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1ReactiveInsight */ const de_ReactiveInsight = (output: any, context: __SerdeContext): ReactiveInsight => { - return { - Description: __expectString(output.Description), - Id: __expectString(output.Id), - InsightTimeRange: - output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined, - Name: __expectString(output.Name), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - Severity: __expectString(output.Severity), - SsmOpsItemId: __expectString(output.SsmOpsItemId), - Status: __expectString(output.Status), - } as any; + return take(output, { + Description: __expectString, + Id: __expectString, + InsightTimeRange: (_: any) => de_InsightTimeRange(_, context), + Name: __expectString, + ResourceCollection: _json, + Severity: __expectString, + SsmOpsItemId: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4876,9 +3871,6 @@ const de_ReactiveInsights = (output: any, context: __SerdeContext): ReactiveInsi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReactiveInsightSummary(entry, context); }); return retVal; @@ -4888,22 +3880,16 @@ const de_ReactiveInsights = (output: any, context: __SerdeContext): ReactiveInsi * deserializeAws_restJson1ReactiveInsightSummary */ const de_ReactiveInsightSummary = (output: any, context: __SerdeContext): ReactiveInsightSummary => { - return { - AssociatedResourceArns: - output.AssociatedResourceArns != null - ? de_AssociatedResourceArns(output.AssociatedResourceArns, context) - : undefined, - Id: __expectString(output.Id), - InsightTimeRange: - output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined, - Name: __expectString(output.Name), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - ServiceCollection: - output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined, - Severity: __expectString(output.Severity), - Status: __expectString(output.Status), - } as any; + return take(output, { + AssociatedResourceArns: _json, + Id: __expectString, + InsightTimeRange: (_: any) => de_InsightTimeRange(_, context), + Name: __expectString, + ResourceCollection: _json, + ServiceCollection: _json, + Severity: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4916,9 +3902,6 @@ const de_ReactiveOrganizationInsights = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReactiveOrganizationInsightSummary(entry, context); }); return retVal; @@ -4931,339 +3914,74 @@ const de_ReactiveOrganizationInsightSummary = ( output: any, context: __SerdeContext ): ReactiveOrganizationInsightSummary => { - return { - AccountId: __expectString(output.AccountId), - Id: __expectString(output.Id), - InsightTimeRange: - output.InsightTimeRange != null ? de_InsightTimeRange(output.InsightTimeRange, context) : undefined, - Name: __expectString(output.Name), - OrganizationalUnitId: __expectString(output.OrganizationalUnitId), - ResourceCollection: - output.ResourceCollection != null ? de_ResourceCollection(output.ResourceCollection, context) : undefined, - ServiceCollection: - output.ServiceCollection != null ? de_ServiceCollection(output.ServiceCollection, context) : undefined, - Severity: __expectString(output.Severity), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1Recommendation - */ -const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - Category: __expectString(output.Category), - Description: __expectString(output.Description), - Link: __expectString(output.Link), - Name: __expectString(output.Name), - Reason: __expectString(output.Reason), - RelatedAnomalies: - output.RelatedAnomalies != null ? de_RecommendationRelatedAnomalies(output.RelatedAnomalies, context) : undefined, - RelatedEvents: - output.RelatedEvents != null ? de_RecommendationRelatedEvents(output.RelatedEvents, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RecommendationRelatedAnomalies - */ -const de_RecommendationRelatedAnomalies = (output: any, context: __SerdeContext): RecommendationRelatedAnomaly[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationRelatedAnomaly(entry, context); - }); - return retVal; + return take(output, { + AccountId: __expectString, + Id: __expectString, + InsightTimeRange: (_: any) => de_InsightTimeRange(_, context), + Name: __expectString, + OrganizationalUnitId: __expectString, + ResourceCollection: _json, + ServiceCollection: _json, + Severity: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1RecommendationRelatedAnomaly - */ -const de_RecommendationRelatedAnomaly = (output: any, context: __SerdeContext): RecommendationRelatedAnomaly => { - return { - AnomalyId: __expectString(output.AnomalyId), - Resources: - output.Resources != null ? de_RecommendationRelatedAnomalyResources(output.Resources, context) : undefined, - SourceDetails: - output.SourceDetails != null ? de_RelatedAnomalySourceDetails(output.SourceDetails, context) : undefined, - } as any; -}; +// de_Recommendation omitted. -/** - * deserializeAws_restJson1RecommendationRelatedAnomalyResource - */ -const de_RecommendationRelatedAnomalyResource = ( - output: any, - context: __SerdeContext -): RecommendationRelatedAnomalyResource => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_RecommendationRelatedAnomalies omitted. -/** - * deserializeAws_restJson1RecommendationRelatedAnomalyResources - */ -const de_RecommendationRelatedAnomalyResources = ( - output: any, - context: __SerdeContext -): RecommendationRelatedAnomalyResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationRelatedAnomalyResource(entry, context); - }); - return retVal; -}; +// de_RecommendationRelatedAnomaly omitted. -/** - * deserializeAws_restJson1RecommendationRelatedAnomalySourceDetail - */ -const de_RecommendationRelatedAnomalySourceDetail = ( - output: any, - context: __SerdeContext -): RecommendationRelatedAnomalySourceDetail => { - return { - CloudWatchMetrics: - output.CloudWatchMetrics != null - ? de_RecommendationRelatedCloudWatchMetricsSourceDetails(output.CloudWatchMetrics, context) - : undefined, - } as any; -}; +// de_RecommendationRelatedAnomalyResource omitted. -/** - * deserializeAws_restJson1RecommendationRelatedCloudWatchMetricsSourceDetail - */ -const de_RecommendationRelatedCloudWatchMetricsSourceDetail = ( - output: any, - context: __SerdeContext -): RecommendationRelatedCloudWatchMetricsSourceDetail => { - return { - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - } as any; -}; +// de_RecommendationRelatedAnomalyResources omitted. -/** - * deserializeAws_restJson1RecommendationRelatedCloudWatchMetricsSourceDetails - */ -const de_RecommendationRelatedCloudWatchMetricsSourceDetails = ( - output: any, - context: __SerdeContext -): RecommendationRelatedCloudWatchMetricsSourceDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationRelatedCloudWatchMetricsSourceDetail(entry, context); - }); - return retVal; -}; +// de_RecommendationRelatedAnomalySourceDetail omitted. -/** - * deserializeAws_restJson1RecommendationRelatedEvent - */ -const de_RecommendationRelatedEvent = (output: any, context: __SerdeContext): RecommendationRelatedEvent => { - return { - Name: __expectString(output.Name), - Resources: output.Resources != null ? de_RecommendationRelatedEventResources(output.Resources, context) : undefined, - } as any; -}; +// de_RecommendationRelatedCloudWatchMetricsSourceDetail omitted. -/** - * deserializeAws_restJson1RecommendationRelatedEventResource - */ -const de_RecommendationRelatedEventResource = ( - output: any, - context: __SerdeContext -): RecommendationRelatedEventResource => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_RecommendationRelatedCloudWatchMetricsSourceDetails omitted. -/** - * deserializeAws_restJson1RecommendationRelatedEventResources - */ -const de_RecommendationRelatedEventResources = ( - output: any, - context: __SerdeContext -): RecommendationRelatedEventResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationRelatedEventResource(entry, context); - }); - return retVal; -}; +// de_RecommendationRelatedEvent omitted. -/** - * deserializeAws_restJson1RecommendationRelatedEvents - */ -const de_RecommendationRelatedEvents = (output: any, context: __SerdeContext): RecommendationRelatedEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationRelatedEvent(entry, context); - }); - return retVal; -}; +// de_RecommendationRelatedEventResource omitted. -/** - * deserializeAws_restJson1Recommendations - */ -const de_Recommendations = (output: any, context: __SerdeContext): Recommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Recommendation(entry, context); - }); - return retVal; -}; +// de_RecommendationRelatedEventResources omitted. -/** - * deserializeAws_restJson1RelatedAnomalySourceDetails - */ -const de_RelatedAnomalySourceDetails = ( - output: any, - context: __SerdeContext -): RecommendationRelatedAnomalySourceDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationRelatedAnomalySourceDetail(entry, context); - }); - return retVal; -}; +// de_RecommendationRelatedEvents omitted. -/** - * deserializeAws_restJson1ResourceCollection - */ -const de_ResourceCollection = (output: any, context: __SerdeContext): ResourceCollection => { - return { - CloudFormation: - output.CloudFormation != null ? de_CloudFormationCollection(output.CloudFormation, context) : undefined, - Tags: output.Tags != null ? de_TagCollections(output.Tags, context) : undefined, - } as any; -}; +// de_Recommendations omitted. -/** - * deserializeAws_restJson1ResourceCollectionFilter - */ -const de_ResourceCollectionFilter = (output: any, context: __SerdeContext): ResourceCollectionFilter => { - return { - CloudFormation: - output.CloudFormation != null ? de_CloudFormationCollectionFilter(output.CloudFormation, context) : undefined, - Tags: output.Tags != null ? de_TagCollectionFilters(output.Tags, context) : undefined, - } as any; -}; +// de_RelatedAnomalySourceDetails omitted. -/** - * deserializeAws_restJson1ServiceCollection - */ -const de_ServiceCollection = (output: any, context: __SerdeContext): ServiceCollection => { - return { - ServiceNames: output.ServiceNames != null ? de_ServiceNames(output.ServiceNames, context) : undefined, - } as any; -}; +// de_ResourceCollection omitted. -/** - * deserializeAws_restJson1ServiceHealth - */ -const de_ServiceHealth = (output: any, context: __SerdeContext): ServiceHealth => { - return { - AnalyzedResourceCount: __expectLong(output.AnalyzedResourceCount), - Insight: output.Insight != null ? de_ServiceInsightHealth(output.Insight, context) : undefined, - ServiceName: __expectString(output.ServiceName), - } as any; -}; +// de_ResourceCollectionFilter omitted. -/** - * deserializeAws_restJson1ServiceHealths - */ -const de_ServiceHealths = (output: any, context: __SerdeContext): ServiceHealth[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceHealth(entry, context); - }); - return retVal; -}; +// de_ServiceCollection omitted. -/** - * deserializeAws_restJson1ServiceInsightHealth - */ -const de_ServiceInsightHealth = (output: any, context: __SerdeContext): ServiceInsightHealth => { - return { - OpenProactiveInsights: __expectInt32(output.OpenProactiveInsights), - OpenReactiveInsights: __expectInt32(output.OpenReactiveInsights), - } as any; -}; +// de_ServiceHealth omitted. -/** - * deserializeAws_restJson1ServiceIntegrationConfig - */ -const de_ServiceIntegrationConfig = (output: any, context: __SerdeContext): ServiceIntegrationConfig => { - return { - LogsAnomalyDetection: - output.LogsAnomalyDetection != null - ? de_LogsAnomalyDetectionIntegration(output.LogsAnomalyDetection, context) - : undefined, - OpsCenter: output.OpsCenter != null ? de_OpsCenterIntegration(output.OpsCenter, context) : undefined, - } as any; -}; +// de_ServiceHealths omitted. -/** - * deserializeAws_restJson1ServiceNames - */ -const de_ServiceNames = (output: any, context: __SerdeContext): (ServiceName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ServiceInsightHealth omitted. + +// de_ServiceIntegrationConfig omitted. + +// de_ServiceNames omitted. /** * deserializeAws_restJson1ServiceResourceCost */ const de_ServiceResourceCost = (output: any, context: __SerdeContext): ServiceResourceCost => { - return { - Cost: __limitedParseDouble(output.Cost), - Count: __expectInt32(output.Count), - State: __expectString(output.State), - Type: __expectString(output.Type), - UnitCost: __limitedParseDouble(output.UnitCost), - } as any; + return take(output, { + Cost: __limitedParseDouble, + Count: __expectInt32, + State: __expectString, + Type: __expectString, + UnitCost: __limitedParseDouble, + }) as any; }; /** @@ -5273,170 +3991,41 @@ const de_ServiceResourceCosts = (output: any, context: __SerdeContext): ServiceR const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceResourceCost(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SnsChannelConfig - */ -const de_SnsChannelConfig = (output: any, context: __SerdeContext): SnsChannelConfig => { - return { - TopicArn: __expectString(output.TopicArn), - } as any; -}; +// de_SnsChannelConfig omitted. -/** - * deserializeAws_restJson1StackNames - */ -const de_StackNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StackNames omitted. -/** - * deserializeAws_restJson1TagCollection - */ -const de_TagCollection = (output: any, context: __SerdeContext): TagCollection => { - return { - AppBoundaryKey: __expectString(output.AppBoundaryKey), - TagValues: output.TagValues != null ? de_TagValues(output.TagValues, context) : undefined, - } as any; -}; +// de_TagCollection omitted. -/** - * deserializeAws_restJson1TagCollectionFilter - */ -const de_TagCollectionFilter = (output: any, context: __SerdeContext): TagCollectionFilter => { - return { - AppBoundaryKey: __expectString(output.AppBoundaryKey), - TagValues: output.TagValues != null ? de_TagValues(output.TagValues, context) : undefined, - } as any; -}; +// de_TagCollectionFilter omitted. -/** - * deserializeAws_restJson1TagCollectionFilters - */ -const de_TagCollectionFilters = (output: any, context: __SerdeContext): TagCollectionFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagCollectionFilter(entry, context); - }); - return retVal; -}; +// de_TagCollectionFilters omitted. -/** - * deserializeAws_restJson1TagCollections - */ -const de_TagCollections = (output: any, context: __SerdeContext): TagCollection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagCollection(entry, context); - }); - return retVal; -}; +// de_TagCollections omitted. -/** - * deserializeAws_restJson1TagCostEstimationResourceCollectionFilter - */ -const de_TagCostEstimationResourceCollectionFilter = ( - output: any, - context: __SerdeContext -): TagCostEstimationResourceCollectionFilter => { - return { - AppBoundaryKey: __expectString(output.AppBoundaryKey), - TagValues: output.TagValues != null ? de_CostEstimationTagValues(output.TagValues, context) : undefined, - } as any; -}; +// de_TagCostEstimationResourceCollectionFilter omitted. -/** - * deserializeAws_restJson1TagCostEstimationResourceCollectionFilters - */ -const de_TagCostEstimationResourceCollectionFilters = ( - output: any, - context: __SerdeContext -): TagCostEstimationResourceCollectionFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagCostEstimationResourceCollectionFilter(entry, context); - }); - return retVal; -}; +// de_TagCostEstimationResourceCollectionFilters omitted. -/** - * deserializeAws_restJson1TagHealth - */ -const de_TagHealth = (output: any, context: __SerdeContext): TagHealth => { - return { - AnalyzedResourceCount: __expectLong(output.AnalyzedResourceCount), - AppBoundaryKey: __expectString(output.AppBoundaryKey), - Insight: output.Insight != null ? de_InsightHealth(output.Insight, context) : undefined, - TagValue: __expectString(output.TagValue), - } as any; -}; +// de_TagHealth omitted. -/** - * deserializeAws_restJson1TagHealths - */ -const de_TagHealths = (output: any, context: __SerdeContext): TagHealth[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagHealth(entry, context); - }); - return retVal; -}; +// de_TagHealths omitted. -/** - * deserializeAws_restJson1TagValues - */ -const de_TagValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagValues omitted. /** * deserializeAws_restJson1TimestampMetricValuePair */ const de_TimestampMetricValuePair = (output: any, context: __SerdeContext): TimestampMetricValuePair => { - return { - MetricValue: __limitedParseDouble(output.MetricValue), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; + return take(output, { + MetricValue: __limitedParseDouble, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5446,38 +4035,14 @@ const de_TimestampMetricValuePairList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimestampMetricValuePair(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFields - */ -const de_ValidationExceptionFields = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFields omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-direct-connect/src/protocols/Aws_json1_1.ts b/clients/client-direct-connect/src/protocols/Aws_json1_1.ts index 8b4e7f21c797..2c9c74af2be9 100644 --- a/clients/client-direct-connect/src/protocols/Aws_json1_1.ts +++ b/clients/client-direct-connect/src/protocols/Aws_json1_1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -219,75 +220,48 @@ import { import { DirectConnectServiceException as __BaseException } from "../models/DirectConnectServiceException"; import { AcceptDirectConnectGatewayAssociationProposalRequest, - AcceptDirectConnectGatewayAssociationProposalResult, AllocateConnectionOnInterconnectRequest, AllocateHostedConnectionRequest, AllocatePrivateVirtualInterfaceRequest, AllocatePublicVirtualInterfaceRequest, AllocateTransitVirtualInterfaceRequest, - AllocateTransitVirtualInterfaceResult, AssociateConnectionWithLagRequest, - AssociatedGateway, AssociateHostedConnectionRequest, AssociateMacSecKeyRequest, - AssociateMacSecKeyResponse, AssociateVirtualInterfaceRequest, - BGPPeer, ConfirmConnectionRequest, - ConfirmConnectionResponse, ConfirmCustomerAgreementRequest, - ConfirmCustomerAgreementResponse, ConfirmPrivateVirtualInterfaceRequest, - ConfirmPrivateVirtualInterfaceResponse, ConfirmPublicVirtualInterfaceRequest, - ConfirmPublicVirtualInterfaceResponse, ConfirmTransitVirtualInterfaceRequest, - ConfirmTransitVirtualInterfaceResponse, Connection, Connections, CreateBGPPeerRequest, - CreateBGPPeerResponse, CreateConnectionRequest, CreateDirectConnectGatewayAssociationProposalRequest, - CreateDirectConnectGatewayAssociationProposalResult, CreateDirectConnectGatewayAssociationRequest, - CreateDirectConnectGatewayAssociationResult, CreateDirectConnectGatewayRequest, - CreateDirectConnectGatewayResult, CreateInterconnectRequest, CreateLagRequest, CreatePrivateVirtualInterfaceRequest, CreatePublicVirtualInterfaceRequest, CreateTransitVirtualInterfaceRequest, - CreateTransitVirtualInterfaceResult, - CustomerAgreement, DeleteBGPPeerRequest, - DeleteBGPPeerResponse, DeleteConnectionRequest, DeleteDirectConnectGatewayAssociationProposalRequest, - DeleteDirectConnectGatewayAssociationProposalResult, DeleteDirectConnectGatewayAssociationRequest, - DeleteDirectConnectGatewayAssociationResult, DeleteDirectConnectGatewayRequest, - DeleteDirectConnectGatewayResult, DeleteInterconnectRequest, - DeleteInterconnectResponse, DeleteLagRequest, DeleteVirtualInterfaceRequest, - DeleteVirtualInterfaceResponse, DescribeConnectionLoaRequest, DescribeConnectionLoaResponse, DescribeConnectionsOnInterconnectRequest, DescribeConnectionsRequest, - DescribeCustomerMetadataResponse, DescribeDirectConnectGatewayAssociationProposalsRequest, - DescribeDirectConnectGatewayAssociationProposalsResult, DescribeDirectConnectGatewayAssociationsRequest, - DescribeDirectConnectGatewayAssociationsResult, DescribeDirectConnectGatewayAttachmentsRequest, - DescribeDirectConnectGatewayAttachmentsResult, DescribeDirectConnectGatewaysRequest, - DescribeDirectConnectGatewaysResult, DescribeHostedConnectionsRequest, DescribeInterconnectLoaRequest, DescribeInterconnectLoaResponse, @@ -295,19 +269,12 @@ import { DescribeLagsRequest, DescribeLoaRequest, DescribeRouterConfigurationRequest, - DescribeRouterConfigurationResponse, DescribeTagsRequest, - DescribeTagsResponse, DescribeVirtualInterfacesRequest, DirectConnectClientException, - DirectConnectGateway, - DirectConnectGatewayAssociation, - DirectConnectGatewayAssociationProposal, - DirectConnectGatewayAttachment, DirectConnectServerException, DisassociateConnectionFromLagRequest, DisassociateMacSecKeyRequest, - DisassociateMacSecKeyResponse, DuplicateTagKeysException, Interconnect, Interconnects, @@ -316,9 +283,6 @@ import { ListVirtualInterfaceTestHistoryRequest, ListVirtualInterfaceTestHistoryResponse, Loa, - Location, - Locations, - MacSecKey, NewBGPPeer, NewPrivateVirtualInterface, NewPrivateVirtualInterfaceAllocation, @@ -326,30 +290,20 @@ import { NewPublicVirtualInterfaceAllocation, NewTransitVirtualInterface, NewTransitVirtualInterfaceAllocation, - ResourceTag, RouteFilterPrefix, - RouterType, StartBgpFailoverTestRequest, StartBgpFailoverTestResponse, StopBgpFailoverTestRequest, StopBgpFailoverTestResponse, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagsException, UntagResourceRequest, - UntagResourceResponse, UpdateConnectionRequest, UpdateDirectConnectGatewayAssociationRequest, - UpdateDirectConnectGatewayAssociationResult, UpdateDirectConnectGatewayRequest, - UpdateDirectConnectGatewayResponse, UpdateLagRequest, UpdateVirtualInterfaceAttributesRequest, - VirtualGateway, - VirtualGateways, - VirtualInterface, - VirtualInterfaces, VirtualInterfaceTestHistory, } from "../models/models_0"; @@ -362,7 +316,7 @@ export const se_AcceptDirectConnectGatewayAssociationProposalCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptDirectConnectGatewayAssociationProposal"); let body: any; - body = JSON.stringify(se_AcceptDirectConnectGatewayAssociationProposalRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -375,7 +329,7 @@ export const se_AllocateConnectionOnInterconnectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllocateConnectionOnInterconnect"); let body: any; - body = JSON.stringify(se_AllocateConnectionOnInterconnectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -388,7 +342,7 @@ export const se_AllocateHostedConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllocateHostedConnection"); let body: any; - body = JSON.stringify(se_AllocateHostedConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -401,7 +355,7 @@ export const se_AllocatePrivateVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllocatePrivateVirtualInterface"); let body: any; - body = JSON.stringify(se_AllocatePrivateVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -414,7 +368,7 @@ export const se_AllocatePublicVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllocatePublicVirtualInterface"); let body: any; - body = JSON.stringify(se_AllocatePublicVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -427,7 +381,7 @@ export const se_AllocateTransitVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllocateTransitVirtualInterface"); let body: any; - body = JSON.stringify(se_AllocateTransitVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -440,7 +394,7 @@ export const se_AssociateConnectionWithLagCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateConnectionWithLag"); let body: any; - body = JSON.stringify(se_AssociateConnectionWithLagRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -453,7 +407,7 @@ export const se_AssociateHostedConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateHostedConnection"); let body: any; - body = JSON.stringify(se_AssociateHostedConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -466,7 +420,7 @@ export const se_AssociateMacSecKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateMacSecKey"); let body: any; - body = JSON.stringify(se_AssociateMacSecKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -479,7 +433,7 @@ export const se_AssociateVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateVirtualInterface"); let body: any; - body = JSON.stringify(se_AssociateVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -492,7 +446,7 @@ export const se_ConfirmConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmConnection"); let body: any; - body = JSON.stringify(se_ConfirmConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -505,7 +459,7 @@ export const se_ConfirmCustomerAgreementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmCustomerAgreement"); let body: any; - body = JSON.stringify(se_ConfirmCustomerAgreementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -518,7 +472,7 @@ export const se_ConfirmPrivateVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmPrivateVirtualInterface"); let body: any; - body = JSON.stringify(se_ConfirmPrivateVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -531,7 +485,7 @@ export const se_ConfirmPublicVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmPublicVirtualInterface"); let body: any; - body = JSON.stringify(se_ConfirmPublicVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -544,7 +498,7 @@ export const se_ConfirmTransitVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConfirmTransitVirtualInterface"); let body: any; - body = JSON.stringify(se_ConfirmTransitVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -557,7 +511,7 @@ export const se_CreateBGPPeerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBGPPeer"); let body: any; - body = JSON.stringify(se_CreateBGPPeerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -570,7 +524,7 @@ export const se_CreateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnection"); let body: any; - body = JSON.stringify(se_CreateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -583,7 +537,7 @@ export const se_CreateDirectConnectGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDirectConnectGateway"); let body: any; - body = JSON.stringify(se_CreateDirectConnectGatewayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -596,7 +550,7 @@ export const se_CreateDirectConnectGatewayAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDirectConnectGatewayAssociation"); let body: any; - body = JSON.stringify(se_CreateDirectConnectGatewayAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -609,7 +563,7 @@ export const se_CreateDirectConnectGatewayAssociationProposalCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDirectConnectGatewayAssociationProposal"); let body: any; - body = JSON.stringify(se_CreateDirectConnectGatewayAssociationProposalRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -622,7 +576,7 @@ export const se_CreateInterconnectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInterconnect"); let body: any; - body = JSON.stringify(se_CreateInterconnectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -635,7 +589,7 @@ export const se_CreateLagCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLag"); let body: any; - body = JSON.stringify(se_CreateLagRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -648,7 +602,7 @@ export const se_CreatePrivateVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePrivateVirtualInterface"); let body: any; - body = JSON.stringify(se_CreatePrivateVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -661,7 +615,7 @@ export const se_CreatePublicVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePublicVirtualInterface"); let body: any; - body = JSON.stringify(se_CreatePublicVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -674,7 +628,7 @@ export const se_CreateTransitVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTransitVirtualInterface"); let body: any; - body = JSON.stringify(se_CreateTransitVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -687,7 +641,7 @@ export const se_DeleteBGPPeerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBGPPeer"); let body: any; - body = JSON.stringify(se_DeleteBGPPeerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -700,7 +654,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -713,7 +667,7 @@ export const se_DeleteDirectConnectGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDirectConnectGateway"); let body: any; - body = JSON.stringify(se_DeleteDirectConnectGatewayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -726,7 +680,7 @@ export const se_DeleteDirectConnectGatewayAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDirectConnectGatewayAssociation"); let body: any; - body = JSON.stringify(se_DeleteDirectConnectGatewayAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -739,7 +693,7 @@ export const se_DeleteDirectConnectGatewayAssociationProposalCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDirectConnectGatewayAssociationProposal"); let body: any; - body = JSON.stringify(se_DeleteDirectConnectGatewayAssociationProposalRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -752,7 +706,7 @@ export const se_DeleteInterconnectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInterconnect"); let body: any; - body = JSON.stringify(se_DeleteInterconnectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -765,7 +719,7 @@ export const se_DeleteLagCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLag"); let body: any; - body = JSON.stringify(se_DeleteLagRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -778,7 +732,7 @@ export const se_DeleteVirtualInterfaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVirtualInterface"); let body: any; - body = JSON.stringify(se_DeleteVirtualInterfaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -791,7 +745,7 @@ export const se_DescribeConnectionLoaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnectionLoa"); let body: any; - body = JSON.stringify(se_DescribeConnectionLoaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -804,7 +758,7 @@ export const se_DescribeConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnections"); let body: any; - body = JSON.stringify(se_DescribeConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -817,7 +771,7 @@ export const se_DescribeConnectionsOnInterconnectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnectionsOnInterconnect"); let body: any; - body = JSON.stringify(se_DescribeConnectionsOnInterconnectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -842,7 +796,7 @@ export const se_DescribeDirectConnectGatewayAssociationProposalsCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDirectConnectGatewayAssociationProposals"); let body: any; - body = JSON.stringify(se_DescribeDirectConnectGatewayAssociationProposalsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -855,7 +809,7 @@ export const se_DescribeDirectConnectGatewayAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDirectConnectGatewayAssociations"); let body: any; - body = JSON.stringify(se_DescribeDirectConnectGatewayAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -868,7 +822,7 @@ export const se_DescribeDirectConnectGatewayAttachmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDirectConnectGatewayAttachments"); let body: any; - body = JSON.stringify(se_DescribeDirectConnectGatewayAttachmentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -881,7 +835,7 @@ export const se_DescribeDirectConnectGatewaysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDirectConnectGateways"); let body: any; - body = JSON.stringify(se_DescribeDirectConnectGatewaysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -894,7 +848,7 @@ export const se_DescribeHostedConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHostedConnections"); let body: any; - body = JSON.stringify(se_DescribeHostedConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -907,7 +861,7 @@ export const se_DescribeInterconnectLoaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInterconnectLoa"); let body: any; - body = JSON.stringify(se_DescribeInterconnectLoaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -920,7 +874,7 @@ export const se_DescribeInterconnectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInterconnects"); let body: any; - body = JSON.stringify(se_DescribeInterconnectsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -933,7 +887,7 @@ export const se_DescribeLagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLags"); let body: any; - body = JSON.stringify(se_DescribeLagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -946,7 +900,7 @@ export const se_DescribeLoaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLoa"); let body: any; - body = JSON.stringify(se_DescribeLoaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +925,7 @@ export const se_DescribeRouterConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRouterConfiguration"); let body: any; - body = JSON.stringify(se_DescribeRouterConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +938,7 @@ export const se_DescribeTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTags"); let body: any; - body = JSON.stringify(se_DescribeTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1009,7 +963,7 @@ export const se_DescribeVirtualInterfacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVirtualInterfaces"); let body: any; - body = JSON.stringify(se_DescribeVirtualInterfacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1022,7 +976,7 @@ export const se_DisassociateConnectionFromLagCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateConnectionFromLag"); let body: any; - body = JSON.stringify(se_DisassociateConnectionFromLagRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1035,7 +989,7 @@ export const se_DisassociateMacSecKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateMacSecKey"); let body: any; - body = JSON.stringify(se_DisassociateMacSecKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1048,7 +1002,7 @@ export const se_ListVirtualInterfaceTestHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVirtualInterfaceTestHistory"); let body: any; - body = JSON.stringify(se_ListVirtualInterfaceTestHistoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1061,7 +1015,7 @@ export const se_StartBgpFailoverTestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartBgpFailoverTest"); let body: any; - body = JSON.stringify(se_StartBgpFailoverTestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1074,7 +1028,7 @@ export const se_StopBgpFailoverTestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopBgpFailoverTest"); let body: any; - body = JSON.stringify(se_StopBgpFailoverTestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1087,7 +1041,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1100,7 +1054,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1113,7 +1067,7 @@ export const se_UpdateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnection"); let body: any; - body = JSON.stringify(se_UpdateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1126,7 +1080,7 @@ export const se_UpdateDirectConnectGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDirectConnectGateway"); let body: any; - body = JSON.stringify(se_UpdateDirectConnectGatewayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1139,7 +1093,7 @@ export const se_UpdateDirectConnectGatewayAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDirectConnectGatewayAssociation"); let body: any; - body = JSON.stringify(se_UpdateDirectConnectGatewayAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1152,7 +1106,7 @@ export const se_UpdateLagCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLag"); let body: any; - body = JSON.stringify(se_UpdateLagRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1165,7 +1119,7 @@ export const se_UpdateVirtualInterfaceAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVirtualInterfaceAttributes"); let body: any; - body = JSON.stringify(se_UpdateVirtualInterfaceAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1181,12 +1135,12 @@ export const de_AcceptDirectConnectGatewayAssociationProposalCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptDirectConnectGatewayAssociationProposalResult(data, context); + contents = _json(data); const response: AcceptDirectConnectGatewayAssociationProposalCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1210,10 +1164,9 @@ const de_AcceptDirectConnectGatewayAssociationProposalCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1236,7 +1189,7 @@ export const de_AllocateConnectionOnInterconnectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1260,10 +1213,9 @@ const de_AllocateConnectionOnInterconnectCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1286,7 +1238,7 @@ export const de_AllocateHostedConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1316,10 +1268,9 @@ const de_AllocateHostedConnectionCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1337,12 +1288,12 @@ export const de_AllocatePrivateVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterface(data, context); + contents = _json(data); const response: AllocatePrivateVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1372,10 +1323,9 @@ const de_AllocatePrivateVirtualInterfaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1393,12 +1343,12 @@ export const de_AllocatePublicVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterface(data, context); + contents = _json(data); const response: AllocatePublicVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1428,10 +1378,9 @@ const de_AllocatePublicVirtualInterfaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,12 +1398,12 @@ export const de_AllocateTransitVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AllocateTransitVirtualInterfaceResult(data, context); + contents = _json(data); const response: AllocateTransitVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1484,10 +1433,9 @@ const de_AllocateTransitVirtualInterfaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1510,7 +1458,7 @@ export const de_AssociateConnectionWithLagCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1534,10 +1482,9 @@ const de_AssociateConnectionWithLagCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1560,7 +1507,7 @@ export const de_AssociateHostedConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1584,10 +1531,9 @@ const de_AssociateHostedConnectionCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1605,12 +1551,12 @@ export const de_AssociateMacSecKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateMacSecKeyResponse(data, context); + contents = _json(data); const response: AssociateMacSecKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1634,10 +1580,9 @@ const de_AssociateMacSecKeyCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1655,12 +1600,12 @@ export const de_AssociateVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterface(data, context); + contents = _json(data); const response: AssociateVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1684,10 +1629,9 @@ const de_AssociateVirtualInterfaceCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1705,12 +1649,12 @@ export const de_ConfirmConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmConnectionResponse(data, context); + contents = _json(data); const response: ConfirmConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1734,10 +1678,9 @@ const de_ConfirmConnectionCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1755,12 +1698,12 @@ export const de_ConfirmCustomerAgreementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmCustomerAgreementResponse(data, context); + contents = _json(data); const response: ConfirmCustomerAgreementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1784,10 +1727,9 @@ const de_ConfirmCustomerAgreementCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1805,12 +1747,12 @@ export const de_ConfirmPrivateVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmPrivateVirtualInterfaceResponse(data, context); + contents = _json(data); const response: ConfirmPrivateVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1834,10 +1776,9 @@ const de_ConfirmPrivateVirtualInterfaceCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1855,12 +1796,12 @@ export const de_ConfirmPublicVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmPublicVirtualInterfaceResponse(data, context); + contents = _json(data); const response: ConfirmPublicVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1884,10 +1825,9 @@ const de_ConfirmPublicVirtualInterfaceCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1905,12 +1845,12 @@ export const de_ConfirmTransitVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConfirmTransitVirtualInterfaceResponse(data, context); + contents = _json(data); const response: ConfirmTransitVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1934,10 +1874,9 @@ const de_ConfirmTransitVirtualInterfaceCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1955,12 +1894,12 @@ export const de_CreateBGPPeerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBGPPeerResponse(data, context); + contents = _json(data); const response: CreateBGPPeerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1984,10 +1923,9 @@ const de_CreateBGPPeerCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,7 +1948,7 @@ export const de_CreateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2040,10 +1978,9 @@ const de_CreateConnectionCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2061,12 +1998,12 @@ export const de_CreateDirectConnectGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDirectConnectGatewayResult(data, context); + contents = _json(data); const response: CreateDirectConnectGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2090,10 +2027,9 @@ const de_CreateDirectConnectGatewayCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2111,12 +2047,12 @@ export const de_CreateDirectConnectGatewayAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDirectConnectGatewayAssociationResult(data, context); + contents = _json(data); const response: CreateDirectConnectGatewayAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2140,10 +2076,9 @@ const de_CreateDirectConnectGatewayAssociationCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2161,12 +2096,12 @@ export const de_CreateDirectConnectGatewayAssociationProposalCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDirectConnectGatewayAssociationProposalResult(data, context); + contents = _json(data); const response: CreateDirectConnectGatewayAssociationProposalCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2190,10 +2125,9 @@ const de_CreateDirectConnectGatewayAssociationProposalCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2216,7 +2150,7 @@ export const de_CreateInterconnectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2246,10 +2180,9 @@ const de_CreateInterconnectCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2272,7 +2205,7 @@ export const de_CreateLagCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2302,10 +2235,9 @@ const de_CreateLagCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2323,12 +2255,12 @@ export const de_CreatePrivateVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterface(data, context); + contents = _json(data); const response: CreatePrivateVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2358,10 +2290,9 @@ const de_CreatePrivateVirtualInterfaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2379,12 +2310,12 @@ export const de_CreatePublicVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterface(data, context); + contents = _json(data); const response: CreatePublicVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2414,10 +2345,9 @@ const de_CreatePublicVirtualInterfaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2435,12 +2365,12 @@ export const de_CreateTransitVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTransitVirtualInterfaceResult(data, context); + contents = _json(data); const response: CreateTransitVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2470,10 +2400,9 @@ const de_CreateTransitVirtualInterfaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2491,12 +2420,12 @@ export const de_DeleteBGPPeerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBGPPeerResponse(data, context); + contents = _json(data); const response: DeleteBGPPeerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2520,10 +2449,9 @@ const de_DeleteBGPPeerCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2546,7 +2474,7 @@ export const de_DeleteConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2570,10 +2498,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2591,12 +2518,12 @@ export const de_DeleteDirectConnectGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDirectConnectGatewayResult(data, context); + contents = _json(data); const response: DeleteDirectConnectGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2620,10 +2547,9 @@ const de_DeleteDirectConnectGatewayCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2641,12 +2567,12 @@ export const de_DeleteDirectConnectGatewayAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDirectConnectGatewayAssociationResult(data, context); + contents = _json(data); const response: DeleteDirectConnectGatewayAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2670,10 +2596,9 @@ const de_DeleteDirectConnectGatewayAssociationCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2691,12 +2616,12 @@ export const de_DeleteDirectConnectGatewayAssociationProposalCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDirectConnectGatewayAssociationProposalResult(data, context); + contents = _json(data); const response: DeleteDirectConnectGatewayAssociationProposalCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2720,10 +2645,9 @@ const de_DeleteDirectConnectGatewayAssociationProposalCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2741,12 +2665,12 @@ export const de_DeleteInterconnectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteInterconnectResponse(data, context); + contents = _json(data); const response: DeleteInterconnectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2770,10 +2694,9 @@ const de_DeleteInterconnectCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2796,7 +2719,7 @@ export const de_DeleteLagCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2820,10 +2743,9 @@ const de_DeleteLagCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2841,12 +2763,12 @@ export const de_DeleteVirtualInterfaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVirtualInterfaceResponse(data, context); + contents = _json(data); const response: DeleteVirtualInterfaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2870,10 +2792,9 @@ const de_DeleteVirtualInterfaceCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2896,7 +2817,7 @@ export const de_DescribeConnectionLoaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2920,10 +2841,9 @@ const de_DescribeConnectionLoaCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2946,7 +2866,7 @@ export const de_DescribeConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2970,10 +2890,9 @@ const de_DescribeConnectionsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2996,7 +2915,7 @@ export const de_DescribeConnectionsOnInterconnectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3020,10 +2939,9 @@ const de_DescribeConnectionsOnInterconnectCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3041,12 +2959,12 @@ export const de_DescribeCustomerMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCustomerMetadataResponse(data, context); + contents = _json(data); const response: DescribeCustomerMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3070,10 +2988,9 @@ const de_DescribeCustomerMetadataCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3091,12 +3008,12 @@ export const de_DescribeDirectConnectGatewayAssociationProposalsCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDirectConnectGatewayAssociationProposalsResult(data, context); + contents = _json(data); const response: DescribeDirectConnectGatewayAssociationProposalsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3120,10 +3037,9 @@ const de_DescribeDirectConnectGatewayAssociationProposalsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3141,12 +3057,12 @@ export const de_DescribeDirectConnectGatewayAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDirectConnectGatewayAssociationsResult(data, context); + contents = _json(data); const response: DescribeDirectConnectGatewayAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3170,10 +3086,9 @@ const de_DescribeDirectConnectGatewayAssociationsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3191,12 +3106,12 @@ export const de_DescribeDirectConnectGatewayAttachmentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDirectConnectGatewayAttachmentsResult(data, context); + contents = _json(data); const response: DescribeDirectConnectGatewayAttachmentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3220,10 +3135,9 @@ const de_DescribeDirectConnectGatewayAttachmentsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3241,12 +3155,12 @@ export const de_DescribeDirectConnectGatewaysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDirectConnectGatewaysResult(data, context); + contents = _json(data); const response: DescribeDirectConnectGatewaysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3270,10 +3184,9 @@ const de_DescribeDirectConnectGatewaysCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3296,7 +3209,7 @@ export const de_DescribeHostedConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3320,10 +3233,9 @@ const de_DescribeHostedConnectionsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3346,7 +3258,7 @@ export const de_DescribeInterconnectLoaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3370,10 +3282,9 @@ const de_DescribeInterconnectLoaCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3396,7 +3307,7 @@ export const de_DescribeInterconnectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3420,10 +3331,9 @@ const de_DescribeInterconnectsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3446,7 +3356,7 @@ export const de_DescribeLagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3470,10 +3380,9 @@ const de_DescribeLagsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3496,7 +3405,7 @@ export const de_DescribeLoaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3520,10 +3429,9 @@ const de_DescribeLoaCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3541,12 +3449,12 @@ export const de_DescribeLocationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_Locations(data, context); + contents = _json(data); const response: DescribeLocationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3570,10 +3478,9 @@ const de_DescribeLocationsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3591,12 +3498,12 @@ export const de_DescribeRouterConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRouterConfigurationResponse(data, context); + contents = _json(data); const response: DescribeRouterConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3620,10 +3527,9 @@ const de_DescribeRouterConfigurationCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3641,12 +3547,12 @@ export const de_DescribeTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTagsResponse(data, context); + contents = _json(data); const response: DescribeTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3670,10 +3576,9 @@ const de_DescribeTagsCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3691,12 +3596,12 @@ export const de_DescribeVirtualGatewaysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualGateways(data, context); + contents = _json(data); const response: DescribeVirtualGatewaysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3720,10 +3625,9 @@ const de_DescribeVirtualGatewaysCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3741,12 +3645,12 @@ export const de_DescribeVirtualInterfacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterfaces(data, context); + contents = _json(data); const response: DescribeVirtualInterfacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3770,10 +3674,9 @@ const de_DescribeVirtualInterfacesCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3796,7 +3699,7 @@ export const de_DisassociateConnectionFromLagCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3820,10 +3723,9 @@ const de_DisassociateConnectionFromLagCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3841,12 +3743,12 @@ export const de_DisassociateMacSecKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateMacSecKeyResponse(data, context); + contents = _json(data); const response: DisassociateMacSecKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3870,10 +3772,9 @@ const de_DisassociateMacSecKeyCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3896,7 +3797,7 @@ export const de_ListVirtualInterfaceTestHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3920,10 +3821,9 @@ const de_ListVirtualInterfaceTestHistoryCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3946,7 +3846,7 @@ export const de_StartBgpFailoverTestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3970,10 +3870,9 @@ const de_StartBgpFailoverTestCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3996,7 +3895,7 @@ export const de_StopBgpFailoverTestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4020,10 +3919,9 @@ const de_StopBgpFailoverTestCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4041,12 +3939,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4076,10 +3974,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4097,12 +3994,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4126,10 +4023,9 @@ const de_UntagResourceCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4152,7 +4048,7 @@ export const de_UpdateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4176,10 +4072,9 @@ const de_UpdateConnectionCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4197,12 +4092,12 @@ export const de_UpdateDirectConnectGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDirectConnectGatewayResponse(data, context); + contents = _json(data); const response: UpdateDirectConnectGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4226,10 +4121,9 @@ const de_UpdateDirectConnectGatewayCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4247,12 +4141,12 @@ export const de_UpdateDirectConnectGatewayAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDirectConnectGatewayAssociationResult(data, context); + contents = _json(data); const response: UpdateDirectConnectGatewayAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4276,10 +4170,9 @@ const de_UpdateDirectConnectGatewayAssociationCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4302,7 +4195,7 @@ export const de_UpdateLagCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4326,10 +4219,9 @@ const de_UpdateLagCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4347,12 +4239,12 @@ export const de_UpdateVirtualInterfaceAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VirtualInterface(data, context); + contents = _json(data); const response: UpdateVirtualInterfaceAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4376,10 +4268,9 @@ const de_UpdateVirtualInterfaceAttributesCommandError = async ( throw await de_DirectConnectServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4393,7 +4284,7 @@ const de_DirectConnectClientExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectConnectClientException(body, context); + const deserialized: any = _json(body); const exception = new DirectConnectClientException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4409,7 +4300,7 @@ const de_DirectConnectServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectConnectServerException(body, context); + const deserialized: any = _json(body); const exception = new DirectConnectServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4425,7 +4316,7 @@ const de_DuplicateTagKeysExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateTagKeysException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateTagKeysException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4441,7 +4332,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4449,1733 +4340,336 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptDirectConnectGatewayAssociationProposalRequest - */ -const se_AcceptDirectConnectGatewayAssociationProposalRequest = ( - input: AcceptDirectConnectGatewayAssociationProposalRequest, - context: __SerdeContext -): any => { - return { - ...(input.associatedGatewayOwnerAccount != null && { - associatedGatewayOwnerAccount: input.associatedGatewayOwnerAccount, - }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.overrideAllowedPrefixesToDirectConnectGateway != null && { - overrideAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList( - input.overrideAllowedPrefixesToDirectConnectGateway, - context - ), - }), - ...(input.proposalId != null && { proposalId: input.proposalId }), - }; -}; +// se_AcceptDirectConnectGatewayAssociationProposalRequest omitted. -/** - * serializeAws_json1_1AllocateConnectionOnInterconnectRequest - */ -const se_AllocateConnectionOnInterconnectRequest = ( - input: AllocateConnectionOnInterconnectRequest, - context: __SerdeContext -): any => { - return { - ...(input.bandwidth != null && { bandwidth: input.bandwidth }), - ...(input.connectionName != null && { connectionName: input.connectionName }), - ...(input.interconnectId != null && { interconnectId: input.interconnectId }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_AllocateConnectionOnInterconnectRequest omitted. -/** - * serializeAws_json1_1AllocateHostedConnectionRequest - */ -const se_AllocateHostedConnectionRequest = (input: AllocateHostedConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.bandwidth != null && { bandwidth: input.bandwidth }), - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.connectionName != null && { connectionName: input.connectionName }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_AllocateHostedConnectionRequest omitted. -/** - * serializeAws_json1_1AllocatePrivateVirtualInterfaceRequest - */ -const se_AllocatePrivateVirtualInterfaceRequest = ( - input: AllocatePrivateVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.newPrivateVirtualInterfaceAllocation != null && { - newPrivateVirtualInterfaceAllocation: se_NewPrivateVirtualInterfaceAllocation( - input.newPrivateVirtualInterfaceAllocation, - context - ), - }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - }; -}; +// se_AllocatePrivateVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1AllocatePublicVirtualInterfaceRequest - */ -const se_AllocatePublicVirtualInterfaceRequest = ( - input: AllocatePublicVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.newPublicVirtualInterfaceAllocation != null && { - newPublicVirtualInterfaceAllocation: se_NewPublicVirtualInterfaceAllocation( - input.newPublicVirtualInterfaceAllocation, - context - ), - }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - }; -}; +// se_AllocatePublicVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1AllocateTransitVirtualInterfaceRequest - */ -const se_AllocateTransitVirtualInterfaceRequest = ( - input: AllocateTransitVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.newTransitVirtualInterfaceAllocation != null && { - newTransitVirtualInterfaceAllocation: se_NewTransitVirtualInterfaceAllocation( - input.newTransitVirtualInterfaceAllocation, - context - ), - }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - }; -}; +// se_AllocateTransitVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1AssociateConnectionWithLagRequest - */ -const se_AssociateConnectionWithLagRequest = ( - input: AssociateConnectionWithLagRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.lagId != null && { lagId: input.lagId }), - }; -}; +// se_AssociateConnectionWithLagRequest omitted. -/** - * serializeAws_json1_1AssociateHostedConnectionRequest - */ -const se_AssociateHostedConnectionRequest = (input: AssociateHostedConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.parentConnectionId != null && { parentConnectionId: input.parentConnectionId }), - }; -}; +// se_AssociateHostedConnectionRequest omitted. -/** - * serializeAws_json1_1AssociateMacSecKeyRequest - */ -const se_AssociateMacSecKeyRequest = (input: AssociateMacSecKeyRequest, context: __SerdeContext): any => { - return { - ...(input.cak != null && { cak: input.cak }), - ...(input.ckn != null && { ckn: input.ckn }), - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.secretARN != null && { secretARN: input.secretARN }), - }; -}; +// se_AssociateMacSecKeyRequest omitted. -/** - * serializeAws_json1_1AssociateVirtualInterfaceRequest - */ -const se_AssociateVirtualInterfaceRequest = (input: AssociateVirtualInterfaceRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_AssociateVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1BGPPeerIdList - */ -const se_BGPPeerIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BGPPeerIdList omitted. -/** - * serializeAws_json1_1ConfirmConnectionRequest - */ -const se_ConfirmConnectionRequest = (input: ConfirmConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - }; -}; +// se_ConfirmConnectionRequest omitted. -/** - * serializeAws_json1_1ConfirmCustomerAgreementRequest - */ -const se_ConfirmCustomerAgreementRequest = (input: ConfirmCustomerAgreementRequest, context: __SerdeContext): any => { - return { - ...(input.agreementName != null && { agreementName: input.agreementName }), - }; -}; +// se_ConfirmCustomerAgreementRequest omitted. -/** - * serializeAws_json1_1ConfirmPrivateVirtualInterfaceRequest - */ -const se_ConfirmPrivateVirtualInterfaceRequest = ( - input: ConfirmPrivateVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_ConfirmPrivateVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1ConfirmPublicVirtualInterfaceRequest - */ -const se_ConfirmPublicVirtualInterfaceRequest = ( - input: ConfirmPublicVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_ConfirmPublicVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1ConfirmTransitVirtualInterfaceRequest - */ -const se_ConfirmTransitVirtualInterfaceRequest = ( - input: ConfirmTransitVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_ConfirmTransitVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1CreateBGPPeerRequest - */ -const se_CreateBGPPeerRequest = (input: CreateBGPPeerRequest, context: __SerdeContext): any => { - return { - ...(input.newBGPPeer != null && { newBGPPeer: se_NewBGPPeer(input.newBGPPeer, context) }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_CreateBGPPeerRequest omitted. -/** - * serializeAws_json1_1CreateConnectionRequest - */ -const se_CreateConnectionRequest = (input: CreateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.bandwidth != null && { bandwidth: input.bandwidth }), - ...(input.connectionName != null && { connectionName: input.connectionName }), - ...(input.lagId != null && { lagId: input.lagId }), - ...(input.location != null && { location: input.location }), - ...(input.providerName != null && { providerName: input.providerName }), - ...(input.requestMACSec != null && { requestMACSec: input.requestMACSec }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateConnectionRequest omitted. -/** - * serializeAws_json1_1CreateDirectConnectGatewayAssociationProposalRequest - */ -const se_CreateDirectConnectGatewayAssociationProposalRequest = ( - input: CreateDirectConnectGatewayAssociationProposalRequest, - context: __SerdeContext -): any => { - return { - ...(input.addAllowedPrefixesToDirectConnectGateway != null && { - addAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList( - input.addAllowedPrefixesToDirectConnectGateway, - context - ), - }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.directConnectGatewayOwnerAccount != null && { - directConnectGatewayOwnerAccount: input.directConnectGatewayOwnerAccount, - }), - ...(input.gatewayId != null && { gatewayId: input.gatewayId }), - ...(input.removeAllowedPrefixesToDirectConnectGateway != null && { - removeAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList( - input.removeAllowedPrefixesToDirectConnectGateway, - context - ), - }), - }; -}; +// se_CreateDirectConnectGatewayAssociationProposalRequest omitted. -/** - * serializeAws_json1_1CreateDirectConnectGatewayAssociationRequest - */ -const se_CreateDirectConnectGatewayAssociationRequest = ( - input: CreateDirectConnectGatewayAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.addAllowedPrefixesToDirectConnectGateway != null && { - addAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList( - input.addAllowedPrefixesToDirectConnectGateway, - context - ), - }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.gatewayId != null && { gatewayId: input.gatewayId }), - ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }), - }; -}; +// se_CreateDirectConnectGatewayAssociationRequest omitted. -/** - * serializeAws_json1_1CreateDirectConnectGatewayRequest - */ -const se_CreateDirectConnectGatewayRequest = ( - input: CreateDirectConnectGatewayRequest, - context: __SerdeContext -): any => { - return { - ...(input.amazonSideAsn != null && { amazonSideAsn: input.amazonSideAsn }), - ...(input.directConnectGatewayName != null && { directConnectGatewayName: input.directConnectGatewayName }), - }; -}; +// se_CreateDirectConnectGatewayRequest omitted. -/** - * serializeAws_json1_1CreateInterconnectRequest - */ -const se_CreateInterconnectRequest = (input: CreateInterconnectRequest, context: __SerdeContext): any => { - return { - ...(input.bandwidth != null && { bandwidth: input.bandwidth }), - ...(input.interconnectName != null && { interconnectName: input.interconnectName }), - ...(input.lagId != null && { lagId: input.lagId }), - ...(input.location != null && { location: input.location }), - ...(input.providerName != null && { providerName: input.providerName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateInterconnectRequest omitted. -/** - * serializeAws_json1_1CreateLagRequest - */ -const se_CreateLagRequest = (input: CreateLagRequest, context: __SerdeContext): any => { - return { - ...(input.childConnectionTags != null && { childConnectionTags: se_TagList(input.childConnectionTags, context) }), - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.connectionsBandwidth != null && { connectionsBandwidth: input.connectionsBandwidth }), - ...(input.lagName != null && { lagName: input.lagName }), - ...(input.location != null && { location: input.location }), - ...(input.numberOfConnections != null && { numberOfConnections: input.numberOfConnections }), - ...(input.providerName != null && { providerName: input.providerName }), - ...(input.requestMACSec != null && { requestMACSec: input.requestMACSec }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateLagRequest omitted. -/** - * serializeAws_json1_1CreatePrivateVirtualInterfaceRequest - */ -const se_CreatePrivateVirtualInterfaceRequest = ( - input: CreatePrivateVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.newPrivateVirtualInterface != null && { - newPrivateVirtualInterface: se_NewPrivateVirtualInterface(input.newPrivateVirtualInterface, context), - }), - }; -}; +// se_CreatePrivateVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1CreatePublicVirtualInterfaceRequest - */ -const se_CreatePublicVirtualInterfaceRequest = ( - input: CreatePublicVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.newPublicVirtualInterface != null && { - newPublicVirtualInterface: se_NewPublicVirtualInterface(input.newPublicVirtualInterface, context), - }), - }; -}; +// se_CreatePublicVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1CreateTransitVirtualInterfaceRequest - */ -const se_CreateTransitVirtualInterfaceRequest = ( - input: CreateTransitVirtualInterfaceRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.newTransitVirtualInterface != null && { - newTransitVirtualInterface: se_NewTransitVirtualInterface(input.newTransitVirtualInterface, context), - }), - }; -}; +// se_CreateTransitVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1DeleteBGPPeerRequest - */ -const se_DeleteBGPPeerRequest = (input: DeleteBGPPeerRequest, context: __SerdeContext): any => { - return { - ...(input.asn != null && { asn: input.asn }), - ...(input.bgpPeerId != null && { bgpPeerId: input.bgpPeerId }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_DeleteBGPPeerRequest omitted. -/** - * serializeAws_json1_1DeleteConnectionRequest - */ -const se_DeleteConnectionRequest = (input: DeleteConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - }; -}; +// se_DeleteConnectionRequest omitted. -/** - * serializeAws_json1_1DeleteDirectConnectGatewayAssociationProposalRequest - */ -const se_DeleteDirectConnectGatewayAssociationProposalRequest = ( - input: DeleteDirectConnectGatewayAssociationProposalRequest, - context: __SerdeContext -): any => { - return { - ...(input.proposalId != null && { proposalId: input.proposalId }), - }; -}; +// se_DeleteDirectConnectGatewayAssociationProposalRequest omitted. -/** - * serializeAws_json1_1DeleteDirectConnectGatewayAssociationRequest - */ -const se_DeleteDirectConnectGatewayAssociationRequest = ( - input: DeleteDirectConnectGatewayAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.associationId != null && { associationId: input.associationId }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }), - }; -}; +// se_DeleteDirectConnectGatewayAssociationRequest omitted. -/** - * serializeAws_json1_1DeleteDirectConnectGatewayRequest - */ -const se_DeleteDirectConnectGatewayRequest = ( - input: DeleteDirectConnectGatewayRequest, - context: __SerdeContext -): any => { - return { - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - }; -}; +// se_DeleteDirectConnectGatewayRequest omitted. -/** - * serializeAws_json1_1DeleteInterconnectRequest - */ -const se_DeleteInterconnectRequest = (input: DeleteInterconnectRequest, context: __SerdeContext): any => { - return { - ...(input.interconnectId != null && { interconnectId: input.interconnectId }), - }; -}; +// se_DeleteInterconnectRequest omitted. -/** - * serializeAws_json1_1DeleteLagRequest - */ -const se_DeleteLagRequest = (input: DeleteLagRequest, context: __SerdeContext): any => { - return { - ...(input.lagId != null && { lagId: input.lagId }), - }; -}; +// se_DeleteLagRequest omitted. -/** - * serializeAws_json1_1DeleteVirtualInterfaceRequest - */ -const se_DeleteVirtualInterfaceRequest = (input: DeleteVirtualInterfaceRequest, context: __SerdeContext): any => { - return { - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_DeleteVirtualInterfaceRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionLoaRequest - */ -const se_DescribeConnectionLoaRequest = (input: DescribeConnectionLoaRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.loaContentType != null && { loaContentType: input.loaContentType }), - ...(input.providerName != null && { providerName: input.providerName }), - }; -}; +// se_DescribeConnectionLoaRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionsOnInterconnectRequest - */ -const se_DescribeConnectionsOnInterconnectRequest = ( - input: DescribeConnectionsOnInterconnectRequest, - context: __SerdeContext -): any => { - return { - ...(input.interconnectId != null && { interconnectId: input.interconnectId }), - }; -}; +// se_DescribeConnectionsOnInterconnectRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionsRequest - */ -const se_DescribeConnectionsRequest = (input: DescribeConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - }; -}; +// se_DescribeConnectionsRequest omitted. -/** - * serializeAws_json1_1DescribeDirectConnectGatewayAssociationProposalsRequest - */ -const se_DescribeDirectConnectGatewayAssociationProposalsRequest = ( - input: DescribeDirectConnectGatewayAssociationProposalsRequest, - context: __SerdeContext -): any => { - return { - ...(input.associatedGatewayId != null && { associatedGatewayId: input.associatedGatewayId }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.proposalId != null && { proposalId: input.proposalId }), - }; -}; +// se_DescribeDirectConnectGatewayAssociationProposalsRequest omitted. -/** - * serializeAws_json1_1DescribeDirectConnectGatewayAssociationsRequest - */ -const se_DescribeDirectConnectGatewayAssociationsRequest = ( - input: DescribeDirectConnectGatewayAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.associatedGatewayId != null && { associatedGatewayId: input.associatedGatewayId }), - ...(input.associationId != null && { associationId: input.associationId }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }), - }; -}; +// se_DescribeDirectConnectGatewayAssociationsRequest omitted. -/** - * serializeAws_json1_1DescribeDirectConnectGatewayAttachmentsRequest - */ -const se_DescribeDirectConnectGatewayAttachmentsRequest = ( - input: DescribeDirectConnectGatewayAttachmentsRequest, - context: __SerdeContext -): any => { - return { - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_DescribeDirectConnectGatewayAttachmentsRequest omitted. -/** - * serializeAws_json1_1DescribeDirectConnectGatewaysRequest - */ -const se_DescribeDirectConnectGatewaysRequest = ( - input: DescribeDirectConnectGatewaysRequest, - context: __SerdeContext -): any => { - return { - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeDirectConnectGatewaysRequest omitted. -/** - * serializeAws_json1_1DescribeHostedConnectionsRequest - */ -const se_DescribeHostedConnectionsRequest = (input: DescribeHostedConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - }; -}; +// se_DescribeHostedConnectionsRequest omitted. -/** - * serializeAws_json1_1DescribeInterconnectLoaRequest - */ -const se_DescribeInterconnectLoaRequest = (input: DescribeInterconnectLoaRequest, context: __SerdeContext): any => { - return { - ...(input.interconnectId != null && { interconnectId: input.interconnectId }), - ...(input.loaContentType != null && { loaContentType: input.loaContentType }), - ...(input.providerName != null && { providerName: input.providerName }), - }; -}; +// se_DescribeInterconnectLoaRequest omitted. -/** - * serializeAws_json1_1DescribeInterconnectsRequest - */ -const se_DescribeInterconnectsRequest = (input: DescribeInterconnectsRequest, context: __SerdeContext): any => { - return { - ...(input.interconnectId != null && { interconnectId: input.interconnectId }), - }; -}; +// se_DescribeInterconnectsRequest omitted. -/** - * serializeAws_json1_1DescribeLagsRequest - */ -const se_DescribeLagsRequest = (input: DescribeLagsRequest, context: __SerdeContext): any => { - return { - ...(input.lagId != null && { lagId: input.lagId }), - }; -}; +// se_DescribeLagsRequest omitted. -/** - * serializeAws_json1_1DescribeLoaRequest - */ -const se_DescribeLoaRequest = (input: DescribeLoaRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.loaContentType != null && { loaContentType: input.loaContentType }), - ...(input.providerName != null && { providerName: input.providerName }), - }; -}; +// se_DescribeLoaRequest omitted. -/** - * serializeAws_json1_1DescribeRouterConfigurationRequest - */ -const se_DescribeRouterConfigurationRequest = ( - input: DescribeRouterConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.routerTypeIdentifier != null && { routerTypeIdentifier: input.routerTypeIdentifier }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_DescribeRouterConfigurationRequest omitted. -/** - * serializeAws_json1_1DescribeTagsRequest - */ -const se_DescribeTagsRequest = (input: DescribeTagsRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - }; -}; +// se_DescribeTagsRequest omitted. -/** - * serializeAws_json1_1DescribeVirtualInterfacesRequest - */ -const se_DescribeVirtualInterfacesRequest = (input: DescribeVirtualInterfacesRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_DescribeVirtualInterfacesRequest omitted. -/** - * serializeAws_json1_1DisassociateConnectionFromLagRequest - */ -const se_DisassociateConnectionFromLagRequest = ( - input: DisassociateConnectionFromLagRequest, - context: __SerdeContext -): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.lagId != null && { lagId: input.lagId }), - }; -}; +// se_DisassociateConnectionFromLagRequest omitted. -/** - * serializeAws_json1_1DisassociateMacSecKeyRequest - */ -const se_DisassociateMacSecKeyRequest = (input: DisassociateMacSecKeyRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.secretARN != null && { secretARN: input.secretARN }), - }; -}; +// se_DisassociateMacSecKeyRequest omitted. -/** - * serializeAws_json1_1ListVirtualInterfaceTestHistoryRequest - */ -const se_ListVirtualInterfaceTestHistoryRequest = ( - input: ListVirtualInterfaceTestHistoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.bgpPeers != null && { bgpPeers: se_BGPPeerIdList(input.bgpPeers, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.status != null && { status: input.status }), - ...(input.testId != null && { testId: input.testId }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_ListVirtualInterfaceTestHistoryRequest omitted. -/** - * serializeAws_json1_1NewBGPPeer - */ -const se_NewBGPPeer = (input: NewBGPPeer, context: __SerdeContext): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - }; -}; +// se_NewBGPPeer omitted. -/** - * serializeAws_json1_1NewPrivateVirtualInterface - */ -const se_NewPrivateVirtualInterface = (input: NewPrivateVirtualInterface, context: __SerdeContext): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.enableSiteLink != null && { enableSiteLink: input.enableSiteLink }), - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualGatewayId != null && { virtualGatewayId: input.virtualGatewayId }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_NewPrivateVirtualInterface omitted. -/** - * serializeAws_json1_1NewPrivateVirtualInterfaceAllocation - */ -const se_NewPrivateVirtualInterfaceAllocation = ( - input: NewPrivateVirtualInterfaceAllocation, - context: __SerdeContext -): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_NewPrivateVirtualInterfaceAllocation omitted. -/** - * serializeAws_json1_1NewPublicVirtualInterface - */ -const se_NewPublicVirtualInterface = (input: NewPublicVirtualInterface, context: __SerdeContext): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.routeFilterPrefixes != null && { - routeFilterPrefixes: se_RouteFilterPrefixList(input.routeFilterPrefixes, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_NewPublicVirtualInterface omitted. -/** - * serializeAws_json1_1NewPublicVirtualInterfaceAllocation - */ -const se_NewPublicVirtualInterfaceAllocation = ( - input: NewPublicVirtualInterfaceAllocation, - context: __SerdeContext -): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.routeFilterPrefixes != null && { - routeFilterPrefixes: se_RouteFilterPrefixList(input.routeFilterPrefixes, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_NewPublicVirtualInterfaceAllocation omitted. -/** - * serializeAws_json1_1NewTransitVirtualInterface - */ -const se_NewTransitVirtualInterface = (input: NewTransitVirtualInterface, context: __SerdeContext): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.enableSiteLink != null && { enableSiteLink: input.enableSiteLink }), - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_NewTransitVirtualInterface omitted. -/** - * serializeAws_json1_1NewTransitVirtualInterfaceAllocation - */ -const se_NewTransitVirtualInterfaceAllocation = ( - input: NewTransitVirtualInterfaceAllocation, - context: __SerdeContext -): any => { - return { - ...(input.addressFamily != null && { addressFamily: input.addressFamily }), - ...(input.amazonAddress != null && { amazonAddress: input.amazonAddress }), - ...(input.asn != null && { asn: input.asn }), - ...(input.authKey != null && { authKey: input.authKey }), - ...(input.customerAddress != null && { customerAddress: input.customerAddress }), - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - ...(input.vlan != null && { vlan: input.vlan }), - }; -}; +// se_NewTransitVirtualInterfaceAllocation omitted. -/** - * serializeAws_json1_1ResourceArnList - */ -const se_ResourceArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceArnList omitted. -/** - * serializeAws_json1_1RouteFilterPrefix - */ -const se_RouteFilterPrefix = (input: RouteFilterPrefix, context: __SerdeContext): any => { - return { - ...(input.cidr != null && { cidr: input.cidr }), - }; -}; +// se_RouteFilterPrefix omitted. -/** - * serializeAws_json1_1RouteFilterPrefixList - */ -const se_RouteFilterPrefixList = (input: RouteFilterPrefix[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RouteFilterPrefix(entry, context); - }); -}; +// se_RouteFilterPrefixList omitted. -/** - * serializeAws_json1_1StartBgpFailoverTestRequest - */ -const se_StartBgpFailoverTestRequest = (input: StartBgpFailoverTestRequest, context: __SerdeContext): any => { - return { - ...(input.bgpPeers != null && { bgpPeers: se_BGPPeerIdList(input.bgpPeers, context) }), - ...(input.testDurationInMinutes != null && { testDurationInMinutes: input.testDurationInMinutes }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_StartBgpFailoverTestRequest omitted. -/** - * serializeAws_json1_1StopBgpFailoverTestRequest - */ -const se_StopBgpFailoverTestRequest = (input: StopBgpFailoverTestRequest, context: __SerdeContext): any => { - return { - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - }; -}; +// se_StopBgpFailoverTestRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateConnectionRequest - */ -const se_UpdateConnectionRequest = (input: UpdateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.connectionId != null && { connectionId: input.connectionId }), - ...(input.connectionName != null && { connectionName: input.connectionName }), - ...(input.encryptionMode != null && { encryptionMode: input.encryptionMode }), - }; -}; +// se_UpdateConnectionRequest omitted. -/** - * serializeAws_json1_1UpdateDirectConnectGatewayAssociationRequest - */ -const se_UpdateDirectConnectGatewayAssociationRequest = ( - input: UpdateDirectConnectGatewayAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.addAllowedPrefixesToDirectConnectGateway != null && { - addAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList( - input.addAllowedPrefixesToDirectConnectGateway, - context - ), - }), - ...(input.associationId != null && { associationId: input.associationId }), - ...(input.removeAllowedPrefixesToDirectConnectGateway != null && { - removeAllowedPrefixesToDirectConnectGateway: se_RouteFilterPrefixList( - input.removeAllowedPrefixesToDirectConnectGateway, - context - ), - }), - }; -}; +// se_UpdateDirectConnectGatewayAssociationRequest omitted. -/** - * serializeAws_json1_1UpdateDirectConnectGatewayRequest - */ -const se_UpdateDirectConnectGatewayRequest = ( - input: UpdateDirectConnectGatewayRequest, - context: __SerdeContext -): any => { - return { - ...(input.directConnectGatewayId != null && { directConnectGatewayId: input.directConnectGatewayId }), - ...(input.newDirectConnectGatewayName != null && { - newDirectConnectGatewayName: input.newDirectConnectGatewayName, - }), - }; -}; +// se_UpdateDirectConnectGatewayRequest omitted. -/** - * serializeAws_json1_1UpdateLagRequest - */ -const se_UpdateLagRequest = (input: UpdateLagRequest, context: __SerdeContext): any => { - return { - ...(input.encryptionMode != null && { encryptionMode: input.encryptionMode }), - ...(input.lagId != null && { lagId: input.lagId }), - ...(input.lagName != null && { lagName: input.lagName }), - ...(input.minimumLinks != null && { minimumLinks: input.minimumLinks }), - }; -}; +// se_UpdateLagRequest omitted. -/** - * serializeAws_json1_1UpdateVirtualInterfaceAttributesRequest - */ -const se_UpdateVirtualInterfaceAttributesRequest = ( - input: UpdateVirtualInterfaceAttributesRequest, - context: __SerdeContext -): any => { - return { - ...(input.enableSiteLink != null && { enableSiteLink: input.enableSiteLink }), - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.virtualInterfaceId != null && { virtualInterfaceId: input.virtualInterfaceId }), - ...(input.virtualInterfaceName != null && { virtualInterfaceName: input.virtualInterfaceName }), - }; -}; +// se_UpdateVirtualInterfaceAttributesRequest omitted. -/** - * deserializeAws_json1_1AcceptDirectConnectGatewayAssociationProposalResult - */ -const de_AcceptDirectConnectGatewayAssociationProposalResult = ( - output: any, - context: __SerdeContext -): AcceptDirectConnectGatewayAssociationProposalResult => { - return { - directConnectGatewayAssociation: - output.directConnectGatewayAssociation != null - ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context) - : undefined, - } as any; -}; +// de_AcceptDirectConnectGatewayAssociationProposalResult omitted. -/** - * deserializeAws_json1_1AgreementList - */ -const de_AgreementList = (output: any, context: __SerdeContext): CustomerAgreement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomerAgreement(entry, context); - }); - return retVal; -}; +// de_AgreementList omitted. -/** - * deserializeAws_json1_1AllocateTransitVirtualInterfaceResult - */ -const de_AllocateTransitVirtualInterfaceResult = ( - output: any, - context: __SerdeContext -): AllocateTransitVirtualInterfaceResult => { - return { - virtualInterface: - output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined, - } as any; -}; +// de_AllocateTransitVirtualInterfaceResult omitted. -/** - * deserializeAws_json1_1AssociatedGateway - */ -const de_AssociatedGateway = (output: any, context: __SerdeContext): AssociatedGateway => { - return { - id: __expectString(output.id), - ownerAccount: __expectString(output.ownerAccount), - region: __expectString(output.region), - type: __expectString(output.type), - } as any; -}; +// de_AssociatedGateway omitted. -/** - * deserializeAws_json1_1AssociateMacSecKeyResponse - */ -const de_AssociateMacSecKeyResponse = (output: any, context: __SerdeContext): AssociateMacSecKeyResponse => { - return { - connectionId: __expectString(output.connectionId), - macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined, - } as any; -}; +// de_AssociateMacSecKeyResponse omitted. -/** - * deserializeAws_json1_1AvailableMacSecPortSpeeds - */ -const de_AvailableMacSecPortSpeeds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AvailableMacSecPortSpeeds omitted. -/** - * deserializeAws_json1_1AvailablePortSpeeds - */ -const de_AvailablePortSpeeds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BGPPeer - */ -const de_BGPPeer = (output: any, context: __SerdeContext): BGPPeer => { - return { - addressFamily: __expectString(output.addressFamily), - amazonAddress: __expectString(output.amazonAddress), - asn: __expectInt32(output.asn), - authKey: __expectString(output.authKey), - awsDeviceV2: __expectString(output.awsDeviceV2), - awsLogicalDeviceId: __expectString(output.awsLogicalDeviceId), - bgpPeerId: __expectString(output.bgpPeerId), - bgpPeerState: __expectString(output.bgpPeerState), - bgpStatus: __expectString(output.bgpStatus), - customerAddress: __expectString(output.customerAddress), - } as any; -}; - -/** - * deserializeAws_json1_1BGPPeerIdList - */ -const de_BGPPeerIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BGPPeerList - */ -const de_BGPPeerList = (output: any, context: __SerdeContext): BGPPeer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BGPPeer(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfirmConnectionResponse - */ -const de_ConfirmConnectionResponse = (output: any, context: __SerdeContext): ConfirmConnectionResponse => { - return { - connectionState: __expectString(output.connectionState), - } as any; -}; - -/** - * deserializeAws_json1_1ConfirmCustomerAgreementResponse - */ -const de_ConfirmCustomerAgreementResponse = ( - output: any, - context: __SerdeContext -): ConfirmCustomerAgreementResponse => { - return { - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1ConfirmPrivateVirtualInterfaceResponse - */ -const de_ConfirmPrivateVirtualInterfaceResponse = ( - output: any, - context: __SerdeContext -): ConfirmPrivateVirtualInterfaceResponse => { - return { - virtualInterfaceState: __expectString(output.virtualInterfaceState), - } as any; -}; - -/** - * deserializeAws_json1_1ConfirmPublicVirtualInterfaceResponse - */ -const de_ConfirmPublicVirtualInterfaceResponse = ( - output: any, - context: __SerdeContext -): ConfirmPublicVirtualInterfaceResponse => { - return { - virtualInterfaceState: __expectString(output.virtualInterfaceState), - } as any; -}; - -/** - * deserializeAws_json1_1ConfirmTransitVirtualInterfaceResponse - */ -const de_ConfirmTransitVirtualInterfaceResponse = ( - output: any, - context: __SerdeContext -): ConfirmTransitVirtualInterfaceResponse => { - return { - virtualInterfaceState: __expectString(output.virtualInterfaceState), - } as any; -}; - -/** - * deserializeAws_json1_1Connection - */ -const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - awsDevice: __expectString(output.awsDevice), - awsDeviceV2: __expectString(output.awsDeviceV2), - awsLogicalDeviceId: __expectString(output.awsLogicalDeviceId), - bandwidth: __expectString(output.bandwidth), - connectionId: __expectString(output.connectionId), - connectionName: __expectString(output.connectionName), - connectionState: __expectString(output.connectionState), - encryptionMode: __expectString(output.encryptionMode), - hasLogicalRedundancy: __expectString(output.hasLogicalRedundancy), - jumboFrameCapable: __expectBoolean(output.jumboFrameCapable), - lagId: __expectString(output.lagId), - loaIssueTime: - output.loaIssueTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.loaIssueTime))) - : undefined, - location: __expectString(output.location), - macSecCapable: __expectBoolean(output.macSecCapable), - macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined, - ownerAccount: __expectString(output.ownerAccount), - partnerName: __expectString(output.partnerName), - portEncryptionStatus: __expectString(output.portEncryptionStatus), - providerName: __expectString(output.providerName), - region: __expectString(output.region), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - vlan: __expectInt32(output.vlan), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionList - */ -const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connection(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Connections - */ -const de_Connections = (output: any, context: __SerdeContext): Connections => { - return { - connections: output.connections != null ? de_ConnectionList(output.connections, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateBGPPeerResponse - */ -const de_CreateBGPPeerResponse = (output: any, context: __SerdeContext): CreateBGPPeerResponse => { - return { - virtualInterface: - output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDirectConnectGatewayAssociationProposalResult - */ -const de_CreateDirectConnectGatewayAssociationProposalResult = ( - output: any, - context: __SerdeContext -): CreateDirectConnectGatewayAssociationProposalResult => { - return { - directConnectGatewayAssociationProposal: - output.directConnectGatewayAssociationProposal != null - ? de_DirectConnectGatewayAssociationProposal(output.directConnectGatewayAssociationProposal, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDirectConnectGatewayAssociationResult - */ -const de_CreateDirectConnectGatewayAssociationResult = ( - output: any, - context: __SerdeContext -): CreateDirectConnectGatewayAssociationResult => { - return { - directConnectGatewayAssociation: - output.directConnectGatewayAssociation != null - ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDirectConnectGatewayResult - */ -const de_CreateDirectConnectGatewayResult = ( - output: any, - context: __SerdeContext -): CreateDirectConnectGatewayResult => { - return { - directConnectGateway: - output.directConnectGateway != null ? de_DirectConnectGateway(output.directConnectGateway, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTransitVirtualInterfaceResult - */ -const de_CreateTransitVirtualInterfaceResult = ( - output: any, - context: __SerdeContext -): CreateTransitVirtualInterfaceResult => { - return { - virtualInterface: - output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomerAgreement - */ -const de_CustomerAgreement = (output: any, context: __SerdeContext): CustomerAgreement => { - return { - agreementName: __expectString(output.agreementName), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBGPPeerResponse - */ -const de_DeleteBGPPeerResponse = (output: any, context: __SerdeContext): DeleteBGPPeerResponse => { - return { - virtualInterface: - output.virtualInterface != null ? de_VirtualInterface(output.virtualInterface, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDirectConnectGatewayAssociationProposalResult - */ -const de_DeleteDirectConnectGatewayAssociationProposalResult = ( - output: any, - context: __SerdeContext -): DeleteDirectConnectGatewayAssociationProposalResult => { - return { - directConnectGatewayAssociationProposal: - output.directConnectGatewayAssociationProposal != null - ? de_DirectConnectGatewayAssociationProposal(output.directConnectGatewayAssociationProposal, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDirectConnectGatewayAssociationResult - */ -const de_DeleteDirectConnectGatewayAssociationResult = ( - output: any, - context: __SerdeContext -): DeleteDirectConnectGatewayAssociationResult => { - return { - directConnectGatewayAssociation: - output.directConnectGatewayAssociation != null - ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDirectConnectGatewayResult - */ -const de_DeleteDirectConnectGatewayResult = ( - output: any, - context: __SerdeContext -): DeleteDirectConnectGatewayResult => { - return { - directConnectGateway: - output.directConnectGateway != null ? de_DirectConnectGateway(output.directConnectGateway, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteInterconnectResponse - */ -const de_DeleteInterconnectResponse = (output: any, context: __SerdeContext): DeleteInterconnectResponse => { - return { - interconnectState: __expectString(output.interconnectState), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteVirtualInterfaceResponse - */ -const de_DeleteVirtualInterfaceResponse = (output: any, context: __SerdeContext): DeleteVirtualInterfaceResponse => { - return { - virtualInterfaceState: __expectString(output.virtualInterfaceState), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectionLoaResponse - */ -const de_DescribeConnectionLoaResponse = (output: any, context: __SerdeContext): DescribeConnectionLoaResponse => { - return { - loa: output.loa != null ? de_Loa(output.loa, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCustomerMetadataResponse - */ -const de_DescribeCustomerMetadataResponse = ( - output: any, - context: __SerdeContext -): DescribeCustomerMetadataResponse => { - return { - agreements: output.agreements != null ? de_AgreementList(output.agreements, context) : undefined, - nniPartnerType: __expectString(output.nniPartnerType), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDirectConnectGatewayAssociationProposalsResult - */ -const de_DescribeDirectConnectGatewayAssociationProposalsResult = ( - output: any, - context: __SerdeContext -): DescribeDirectConnectGatewayAssociationProposalsResult => { - return { - directConnectGatewayAssociationProposals: - output.directConnectGatewayAssociationProposals != null - ? de_DirectConnectGatewayAssociationProposalList(output.directConnectGatewayAssociationProposals, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_AvailablePortSpeeds omitted. -/** - * deserializeAws_json1_1DescribeDirectConnectGatewayAssociationsResult - */ -const de_DescribeDirectConnectGatewayAssociationsResult = ( - output: any, - context: __SerdeContext -): DescribeDirectConnectGatewayAssociationsResult => { - return { - directConnectGatewayAssociations: - output.directConnectGatewayAssociations != null - ? de_DirectConnectGatewayAssociationList(output.directConnectGatewayAssociations, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_BGPPeer omitted. -/** - * deserializeAws_json1_1DescribeDirectConnectGatewayAttachmentsResult - */ -const de_DescribeDirectConnectGatewayAttachmentsResult = ( - output: any, - context: __SerdeContext -): DescribeDirectConnectGatewayAttachmentsResult => { - return { - directConnectGatewayAttachments: - output.directConnectGatewayAttachments != null - ? de_DirectConnectGatewayAttachmentList(output.directConnectGatewayAttachments, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_BGPPeerIdList omitted. -/** - * deserializeAws_json1_1DescribeDirectConnectGatewaysResult - */ -const de_DescribeDirectConnectGatewaysResult = ( - output: any, - context: __SerdeContext -): DescribeDirectConnectGatewaysResult => { - return { - directConnectGateways: - output.directConnectGateways != null - ? de_DirectConnectGatewayList(output.directConnectGateways, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_BGPPeerList omitted. -/** - * deserializeAws_json1_1DescribeInterconnectLoaResponse - */ -const de_DescribeInterconnectLoaResponse = (output: any, context: __SerdeContext): DescribeInterconnectLoaResponse => { - return { - loa: output.loa != null ? de_Loa(output.loa, context) : undefined, - } as any; -}; +// de_ConfirmConnectionResponse omitted. -/** - * deserializeAws_json1_1DescribeRouterConfigurationResponse - */ -const de_DescribeRouterConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeRouterConfigurationResponse => { - return { - customerRouterConfig: __expectString(output.customerRouterConfig), - router: output.router != null ? de_RouterType(output.router, context) : undefined, - virtualInterfaceId: __expectString(output.virtualInterfaceId), - virtualInterfaceName: __expectString(output.virtualInterfaceName), - } as any; -}; +// de_ConfirmCustomerAgreementResponse omitted. -/** - * deserializeAws_json1_1DescribeTagsResponse - */ -const de_DescribeTagsResponse = (output: any, context: __SerdeContext): DescribeTagsResponse => { - return { - resourceTags: output.resourceTags != null ? de_ResourceTagList(output.resourceTags, context) : undefined, - } as any; -}; +// de_ConfirmPrivateVirtualInterfaceResponse omitted. -/** - * deserializeAws_json1_1DirectConnectClientException - */ -const de_DirectConnectClientException = (output: any, context: __SerdeContext): DirectConnectClientException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConfirmPublicVirtualInterfaceResponse omitted. -/** - * deserializeAws_json1_1DirectConnectGateway - */ -const de_DirectConnectGateway = (output: any, context: __SerdeContext): DirectConnectGateway => { - return { - amazonSideAsn: __expectLong(output.amazonSideAsn), - directConnectGatewayId: __expectString(output.directConnectGatewayId), - directConnectGatewayName: __expectString(output.directConnectGatewayName), - directConnectGatewayState: __expectString(output.directConnectGatewayState), - ownerAccount: __expectString(output.ownerAccount), - stateChangeError: __expectString(output.stateChangeError), - } as any; -}; +// de_ConfirmTransitVirtualInterfaceResponse omitted. /** - * deserializeAws_json1_1DirectConnectGatewayAssociation + * deserializeAws_json1_1Connection */ -const de_DirectConnectGatewayAssociation = (output: any, context: __SerdeContext): DirectConnectGatewayAssociation => { - return { - allowedPrefixesToDirectConnectGateway: - output.allowedPrefixesToDirectConnectGateway != null - ? de_RouteFilterPrefixList(output.allowedPrefixesToDirectConnectGateway, context) - : undefined, - associatedGateway: - output.associatedGateway != null ? de_AssociatedGateway(output.associatedGateway, context) : undefined, - associationId: __expectString(output.associationId), - associationState: __expectString(output.associationState), - directConnectGatewayId: __expectString(output.directConnectGatewayId), - directConnectGatewayOwnerAccount: __expectString(output.directConnectGatewayOwnerAccount), - stateChangeError: __expectString(output.stateChangeError), - virtualGatewayId: __expectString(output.virtualGatewayId), - virtualGatewayOwnerAccount: __expectString(output.virtualGatewayOwnerAccount), - virtualGatewayRegion: __expectString(output.virtualGatewayRegion), - } as any; -}; - -/** - * deserializeAws_json1_1DirectConnectGatewayAssociationList - */ -const de_DirectConnectGatewayAssociationList = ( - output: any, - context: __SerdeContext -): DirectConnectGatewayAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DirectConnectGatewayAssociation(entry, context); - }); - return retVal; +const de_Connection = (output: any, context: __SerdeContext): Connection => { + return take(output, { + awsDevice: __expectString, + awsDeviceV2: __expectString, + awsLogicalDeviceId: __expectString, + bandwidth: __expectString, + connectionId: __expectString, + connectionName: __expectString, + connectionState: __expectString, + encryptionMode: __expectString, + hasLogicalRedundancy: __expectString, + jumboFrameCapable: __expectBoolean, + lagId: __expectString, + loaIssueTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + location: __expectString, + macSecCapable: __expectBoolean, + macSecKeys: _json, + ownerAccount: __expectString, + partnerName: __expectString, + portEncryptionStatus: __expectString, + providerName: __expectString, + region: __expectString, + tags: _json, + vlan: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1DirectConnectGatewayAssociationProposal + * deserializeAws_json1_1ConnectionList */ -const de_DirectConnectGatewayAssociationProposal = ( - output: any, - context: __SerdeContext -): DirectConnectGatewayAssociationProposal => { - return { - associatedGateway: - output.associatedGateway != null ? de_AssociatedGateway(output.associatedGateway, context) : undefined, - directConnectGatewayId: __expectString(output.directConnectGatewayId), - directConnectGatewayOwnerAccount: __expectString(output.directConnectGatewayOwnerAccount), - existingAllowedPrefixesToDirectConnectGateway: - output.existingAllowedPrefixesToDirectConnectGateway != null - ? de_RouteFilterPrefixList(output.existingAllowedPrefixesToDirectConnectGateway, context) - : undefined, - proposalId: __expectString(output.proposalId), - proposalState: __expectString(output.proposalState), - requestedAllowedPrefixesToDirectConnectGateway: - output.requestedAllowedPrefixesToDirectConnectGateway != null - ? de_RouteFilterPrefixList(output.requestedAllowedPrefixesToDirectConnectGateway, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DirectConnectGatewayAssociationProposalList - */ -const de_DirectConnectGatewayAssociationProposalList = ( - output: any, - context: __SerdeContext -): DirectConnectGatewayAssociationProposal[] => { +const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DirectConnectGatewayAssociationProposal(entry, context); + return de_Connection(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1DirectConnectGatewayAttachment + * deserializeAws_json1_1Connections */ -const de_DirectConnectGatewayAttachment = (output: any, context: __SerdeContext): DirectConnectGatewayAttachment => { - return { - attachmentState: __expectString(output.attachmentState), - attachmentType: __expectString(output.attachmentType), - directConnectGatewayId: __expectString(output.directConnectGatewayId), - stateChangeError: __expectString(output.stateChangeError), - virtualInterfaceId: __expectString(output.virtualInterfaceId), - virtualInterfaceOwnerAccount: __expectString(output.virtualInterfaceOwnerAccount), - virtualInterfaceRegion: __expectString(output.virtualInterfaceRegion), - } as any; +const de_Connections = (output: any, context: __SerdeContext): Connections => { + return take(output, { + connections: (_: any) => de_ConnectionList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DirectConnectGatewayAttachmentList - */ -const de_DirectConnectGatewayAttachmentList = ( - output: any, - context: __SerdeContext -): DirectConnectGatewayAttachment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DirectConnectGatewayAttachment(entry, context); - }); - return retVal; -}; +// de_CreateBGPPeerResponse omitted. -/** - * deserializeAws_json1_1DirectConnectGatewayList - */ -const de_DirectConnectGatewayList = (output: any, context: __SerdeContext): DirectConnectGateway[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DirectConnectGateway(entry, context); - }); - return retVal; -}; +// de_CreateDirectConnectGatewayAssociationProposalResult omitted. -/** - * deserializeAws_json1_1DirectConnectServerException - */ -const de_DirectConnectServerException = (output: any, context: __SerdeContext): DirectConnectServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CreateDirectConnectGatewayAssociationResult omitted. + +// de_CreateDirectConnectGatewayResult omitted. + +// de_CreateTransitVirtualInterfaceResult omitted. + +// de_CustomerAgreement omitted. + +// de_DeleteBGPPeerResponse omitted. + +// de_DeleteDirectConnectGatewayAssociationProposalResult omitted. + +// de_DeleteDirectConnectGatewayAssociationResult omitted. + +// de_DeleteDirectConnectGatewayResult omitted. + +// de_DeleteInterconnectResponse omitted. + +// de_DeleteVirtualInterfaceResponse omitted. /** - * deserializeAws_json1_1DisassociateMacSecKeyResponse + * deserializeAws_json1_1DescribeConnectionLoaResponse */ -const de_DisassociateMacSecKeyResponse = (output: any, context: __SerdeContext): DisassociateMacSecKeyResponse => { - return { - connectionId: __expectString(output.connectionId), - macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined, - } as any; +const de_DescribeConnectionLoaResponse = (output: any, context: __SerdeContext): DescribeConnectionLoaResponse => { + return take(output, { + loa: (_: any) => de_Loa(_, context), + }) as any; }; +// de_DescribeCustomerMetadataResponse omitted. + +// de_DescribeDirectConnectGatewayAssociationProposalsResult omitted. + +// de_DescribeDirectConnectGatewayAssociationsResult omitted. + +// de_DescribeDirectConnectGatewayAttachmentsResult omitted. + +// de_DescribeDirectConnectGatewaysResult omitted. + /** - * deserializeAws_json1_1DuplicateTagKeysException + * deserializeAws_json1_1DescribeInterconnectLoaResponse */ -const de_DuplicateTagKeysException = (output: any, context: __SerdeContext): DuplicateTagKeysException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeInterconnectLoaResponse = (output: any, context: __SerdeContext): DescribeInterconnectLoaResponse => { + return take(output, { + loa: (_: any) => de_Loa(_, context), + }) as any; }; +// de_DescribeRouterConfigurationResponse omitted. + +// de_DescribeTagsResponse omitted. + +// de_DirectConnectClientException omitted. + +// de_DirectConnectGateway omitted. + +// de_DirectConnectGatewayAssociation omitted. + +// de_DirectConnectGatewayAssociationList omitted. + +// de_DirectConnectGatewayAssociationProposal omitted. + +// de_DirectConnectGatewayAssociationProposalList omitted. + +// de_DirectConnectGatewayAttachment omitted. + +// de_DirectConnectGatewayAttachmentList omitted. + +// de_DirectConnectGatewayList omitted. + +// de_DirectConnectServerException omitted. + +// de_DisassociateMacSecKeyResponse omitted. + +// de_DuplicateTagKeysException omitted. + /** * deserializeAws_json1_1Interconnect */ const de_Interconnect = (output: any, context: __SerdeContext): Interconnect => { - return { - awsDevice: __expectString(output.awsDevice), - awsDeviceV2: __expectString(output.awsDeviceV2), - awsLogicalDeviceId: __expectString(output.awsLogicalDeviceId), - bandwidth: __expectString(output.bandwidth), - hasLogicalRedundancy: __expectString(output.hasLogicalRedundancy), - interconnectId: __expectString(output.interconnectId), - interconnectName: __expectString(output.interconnectName), - interconnectState: __expectString(output.interconnectState), - jumboFrameCapable: __expectBoolean(output.jumboFrameCapable), - lagId: __expectString(output.lagId), - loaIssueTime: - output.loaIssueTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.loaIssueTime))) - : undefined, - location: __expectString(output.location), - providerName: __expectString(output.providerName), - region: __expectString(output.region), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; + return take(output, { + awsDevice: __expectString, + awsDeviceV2: __expectString, + awsLogicalDeviceId: __expectString, + bandwidth: __expectString, + hasLogicalRedundancy: __expectString, + interconnectId: __expectString, + interconnectName: __expectString, + interconnectState: __expectString, + jumboFrameCapable: __expectBoolean, + lagId: __expectString, + loaIssueTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + location: __expectString, + providerName: __expectString, + region: __expectString, + tags: _json, + }) as any; }; /** @@ -6185,9 +4679,6 @@ const de_InterconnectList = (output: any, context: __SerdeContext): Interconnect const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Interconnect(entry, context); }); return retVal; @@ -6197,38 +4688,38 @@ const de_InterconnectList = (output: any, context: __SerdeContext): Interconnect * deserializeAws_json1_1Interconnects */ const de_Interconnects = (output: any, context: __SerdeContext): Interconnects => { - return { - interconnects: output.interconnects != null ? de_InterconnectList(output.interconnects, context) : undefined, - } as any; + return take(output, { + interconnects: (_: any) => de_InterconnectList(_, context), + }) as any; }; /** * deserializeAws_json1_1Lag */ const de_Lag = (output: any, context: __SerdeContext): Lag => { - return { - allowsHostedConnections: __expectBoolean(output.allowsHostedConnections), - awsDevice: __expectString(output.awsDevice), - awsDeviceV2: __expectString(output.awsDeviceV2), - awsLogicalDeviceId: __expectString(output.awsLogicalDeviceId), - connections: output.connections != null ? de_ConnectionList(output.connections, context) : undefined, - connectionsBandwidth: __expectString(output.connectionsBandwidth), - encryptionMode: __expectString(output.encryptionMode), - hasLogicalRedundancy: __expectString(output.hasLogicalRedundancy), - jumboFrameCapable: __expectBoolean(output.jumboFrameCapable), - lagId: __expectString(output.lagId), - lagName: __expectString(output.lagName), - lagState: __expectString(output.lagState), - location: __expectString(output.location), - macSecCapable: __expectBoolean(output.macSecCapable), - macSecKeys: output.macSecKeys != null ? de_MacSecKeyList(output.macSecKeys, context) : undefined, - minimumLinks: __expectInt32(output.minimumLinks), - numberOfConnections: __expectInt32(output.numberOfConnections), - ownerAccount: __expectString(output.ownerAccount), - providerName: __expectString(output.providerName), - region: __expectString(output.region), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; + return take(output, { + allowsHostedConnections: __expectBoolean, + awsDevice: __expectString, + awsDeviceV2: __expectString, + awsLogicalDeviceId: __expectString, + connections: (_: any) => de_ConnectionList(_, context), + connectionsBandwidth: __expectString, + encryptionMode: __expectString, + hasLogicalRedundancy: __expectString, + jumboFrameCapable: __expectBoolean, + lagId: __expectString, + lagName: __expectString, + lagState: __expectString, + location: __expectString, + macSecCapable: __expectBoolean, + macSecKeys: _json, + minimumLinks: __expectInt32, + numberOfConnections: __expectInt32, + ownerAccount: __expectString, + providerName: __expectString, + region: __expectString, + tags: _json, + }) as any; }; /** @@ -6238,9 +4729,6 @@ const de_LagList = (output: any, context: __SerdeContext): Lag[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Lag(entry, context); }); return retVal; @@ -6250,9 +4738,9 @@ const de_LagList = (output: any, context: __SerdeContext): Lag[] => { * deserializeAws_json1_1Lags */ const de_Lags = (output: any, context: __SerdeContext): Lags => { - return { - lags: output.lags != null ? de_LagList(output.lags, context) : undefined, - } as any; + return take(output, { + lags: (_: any) => de_LagList(_, context), + }) as any; }; /** @@ -6262,384 +4750,102 @@ const de_ListVirtualInterfaceTestHistoryResponse = ( output: any, context: __SerdeContext ): ListVirtualInterfaceTestHistoryResponse => { - return { - nextToken: __expectString(output.nextToken), - virtualInterfaceTestHistory: - output.virtualInterfaceTestHistory != null - ? de_VirtualInterfaceTestHistoryList(output.virtualInterfaceTestHistory, context) - : undefined, - } as any; + return take(output, { + nextToken: __expectString, + virtualInterfaceTestHistory: (_: any) => de_VirtualInterfaceTestHistoryList(_, context), + }) as any; }; /** * deserializeAws_json1_1Loa */ const de_Loa = (output: any, context: __SerdeContext): Loa => { - return { - loaContent: output.loaContent != null ? context.base64Decoder(output.loaContent) : undefined, - loaContentType: __expectString(output.loaContentType), - } as any; + return take(output, { + loaContent: context.base64Decoder, + loaContentType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1Location - */ -const de_Location = (output: any, context: __SerdeContext): Location => { - return { - availableMacSecPortSpeeds: - output.availableMacSecPortSpeeds != null - ? de_AvailableMacSecPortSpeeds(output.availableMacSecPortSpeeds, context) - : undefined, - availablePortSpeeds: - output.availablePortSpeeds != null ? de_AvailablePortSpeeds(output.availablePortSpeeds, context) : undefined, - availableProviders: - output.availableProviders != null ? de_ProviderList(output.availableProviders, context) : undefined, - locationCode: __expectString(output.locationCode), - locationName: __expectString(output.locationName), - region: __expectString(output.region), - } as any; -}; +// de_Location omitted. -/** - * deserializeAws_json1_1LocationList - */ -const de_LocationList = (output: any, context: __SerdeContext): Location[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Location(entry, context); - }); - return retVal; -}; +// de_LocationList omitted. -/** - * deserializeAws_json1_1Locations - */ -const de_Locations = (output: any, context: __SerdeContext): Locations => { - return { - locations: output.locations != null ? de_LocationList(output.locations, context) : undefined, - } as any; -}; +// de_Locations omitted. -/** - * deserializeAws_json1_1MacSecKey - */ -const de_MacSecKey = (output: any, context: __SerdeContext): MacSecKey => { - return { - ckn: __expectString(output.ckn), - secretARN: __expectString(output.secretARN), - startOn: __expectString(output.startOn), - state: __expectString(output.state), - } as any; -}; +// de_MacSecKey omitted. -/** - * deserializeAws_json1_1MacSecKeyList - */ -const de_MacSecKeyList = (output: any, context: __SerdeContext): MacSecKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MacSecKey(entry, context); - }); - return retVal; -}; +// de_MacSecKeyList omitted. -/** - * deserializeAws_json1_1ProviderList - */ -const de_ProviderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ProviderList omitted. -/** - * deserializeAws_json1_1ResourceTag - */ -const de_ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { - return { - resourceArn: __expectString(output.resourceArn), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ResourceTag omitted. -/** - * deserializeAws_json1_1ResourceTagList - */ -const de_ResourceTagList = (output: any, context: __SerdeContext): ResourceTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTag(entry, context); - }); - return retVal; -}; +// de_ResourceTagList omitted. -/** - * deserializeAws_json1_1RouteFilterPrefix - */ -const de_RouteFilterPrefix = (output: any, context: __SerdeContext): RouteFilterPrefix => { - return { - cidr: __expectString(output.cidr), - } as any; -}; +// de_RouteFilterPrefix omitted. -/** - * deserializeAws_json1_1RouteFilterPrefixList - */ -const de_RouteFilterPrefixList = (output: any, context: __SerdeContext): RouteFilterPrefix[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RouteFilterPrefix(entry, context); - }); - return retVal; -}; +// de_RouteFilterPrefixList omitted. -/** - * deserializeAws_json1_1RouterType - */ -const de_RouterType = (output: any, context: __SerdeContext): RouterType => { - return { - platform: __expectString(output.platform), - routerTypeIdentifier: __expectString(output.routerTypeIdentifier), - software: __expectString(output.software), - vendor: __expectString(output.vendor), - xsltTemplateName: __expectString(output.xsltTemplateName), - xsltTemplateNameForMacSec: __expectString(output.xsltTemplateNameForMacSec), - } as any; -}; +// de_RouterType omitted. /** * deserializeAws_json1_1StartBgpFailoverTestResponse */ const de_StartBgpFailoverTestResponse = (output: any, context: __SerdeContext): StartBgpFailoverTestResponse => { - return { - virtualInterfaceTest: - output.virtualInterfaceTest != null - ? de_VirtualInterfaceTestHistory(output.virtualInterfaceTest, context) - : undefined, - } as any; + return take(output, { + virtualInterfaceTest: (_: any) => de_VirtualInterfaceTestHistory(_, context), + }) as any; }; /** * deserializeAws_json1_1StopBgpFailoverTestResponse */ const de_StopBgpFailoverTestResponse = (output: any, context: __SerdeContext): StopBgpFailoverTestResponse => { - return { - virtualInterfaceTest: - output.virtualInterfaceTest != null - ? de_VirtualInterfaceTestHistory(output.virtualInterfaceTest, context) - : undefined, - } as any; + return take(output, { + virtualInterfaceTest: (_: any) => de_VirtualInterfaceTestHistory(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateDirectConnectGatewayAssociationResult - */ -const de_UpdateDirectConnectGatewayAssociationResult = ( - output: any, - context: __SerdeContext -): UpdateDirectConnectGatewayAssociationResult => { - return { - directConnectGatewayAssociation: - output.directConnectGatewayAssociation != null - ? de_DirectConnectGatewayAssociation(output.directConnectGatewayAssociation, context) - : undefined, - } as any; -}; +// de_UpdateDirectConnectGatewayAssociationResult omitted. -/** - * deserializeAws_json1_1UpdateDirectConnectGatewayResponse - */ -const de_UpdateDirectConnectGatewayResponse = ( - output: any, - context: __SerdeContext -): UpdateDirectConnectGatewayResponse => { - return { - directConnectGateway: - output.directConnectGateway != null ? de_DirectConnectGateway(output.directConnectGateway, context) : undefined, - } as any; -}; +// de_UpdateDirectConnectGatewayResponse omitted. -/** - * deserializeAws_json1_1VirtualGateway - */ -const de_VirtualGateway = (output: any, context: __SerdeContext): VirtualGateway => { - return { - virtualGatewayId: __expectString(output.virtualGatewayId), - virtualGatewayState: __expectString(output.virtualGatewayState), - } as any; -}; +// de_VirtualGateway omitted. -/** - * deserializeAws_json1_1VirtualGatewayList - */ -const de_VirtualGatewayList = (output: any, context: __SerdeContext): VirtualGateway[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VirtualGateway(entry, context); - }); - return retVal; -}; +// de_VirtualGatewayList omitted. -/** - * deserializeAws_json1_1VirtualGateways - */ -const de_VirtualGateways = (output: any, context: __SerdeContext): VirtualGateways => { - return { - virtualGateways: - output.virtualGateways != null ? de_VirtualGatewayList(output.virtualGateways, context) : undefined, - } as any; -}; +// de_VirtualGateways omitted. -/** - * deserializeAws_json1_1VirtualInterface - */ -const de_VirtualInterface = (output: any, context: __SerdeContext): VirtualInterface => { - return { - addressFamily: __expectString(output.addressFamily), - amazonAddress: __expectString(output.amazonAddress), - amazonSideAsn: __expectLong(output.amazonSideAsn), - asn: __expectInt32(output.asn), - authKey: __expectString(output.authKey), - awsDeviceV2: __expectString(output.awsDeviceV2), - awsLogicalDeviceId: __expectString(output.awsLogicalDeviceId), - bgpPeers: output.bgpPeers != null ? de_BGPPeerList(output.bgpPeers, context) : undefined, - connectionId: __expectString(output.connectionId), - customerAddress: __expectString(output.customerAddress), - customerRouterConfig: __expectString(output.customerRouterConfig), - directConnectGatewayId: __expectString(output.directConnectGatewayId), - jumboFrameCapable: __expectBoolean(output.jumboFrameCapable), - location: __expectString(output.location), - mtu: __expectInt32(output.mtu), - ownerAccount: __expectString(output.ownerAccount), - region: __expectString(output.region), - routeFilterPrefixes: - output.routeFilterPrefixes != null ? de_RouteFilterPrefixList(output.routeFilterPrefixes, context) : undefined, - siteLinkEnabled: __expectBoolean(output.siteLinkEnabled), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - virtualGatewayId: __expectString(output.virtualGatewayId), - virtualInterfaceId: __expectString(output.virtualInterfaceId), - virtualInterfaceName: __expectString(output.virtualInterfaceName), - virtualInterfaceState: __expectString(output.virtualInterfaceState), - virtualInterfaceType: __expectString(output.virtualInterfaceType), - vlan: __expectInt32(output.vlan), - } as any; -}; - -/** - * deserializeAws_json1_1VirtualInterfaceList - */ -const de_VirtualInterfaceList = (output: any, context: __SerdeContext): VirtualInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VirtualInterface(entry, context); - }); - return retVal; -}; +// de_VirtualInterface omitted. -/** - * deserializeAws_json1_1VirtualInterfaces - */ -const de_VirtualInterfaces = (output: any, context: __SerdeContext): VirtualInterfaces => { - return { - virtualInterfaces: - output.virtualInterfaces != null ? de_VirtualInterfaceList(output.virtualInterfaces, context) : undefined, - } as any; -}; +// de_VirtualInterfaceList omitted. + +// de_VirtualInterfaces omitted. /** * deserializeAws_json1_1VirtualInterfaceTestHistory */ const de_VirtualInterfaceTestHistory = (output: any, context: __SerdeContext): VirtualInterfaceTestHistory => { - return { - bgpPeers: output.bgpPeers != null ? de_BGPPeerIdList(output.bgpPeers, context) : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - ownerAccount: __expectString(output.ownerAccount), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - testDurationInMinutes: __expectInt32(output.testDurationInMinutes), - testId: __expectString(output.testId), - virtualInterfaceId: __expectString(output.virtualInterfaceId), - } as any; + return take(output, { + bgpPeers: _json, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ownerAccount: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + testDurationInMinutes: __expectInt32, + testId: __expectString, + virtualInterfaceId: __expectString, + }) as any; }; /** @@ -6649,9 +4855,6 @@ const de_VirtualInterfaceTestHistoryList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualInterfaceTestHistory(entry, context); }); return retVal; @@ -6677,6 +4880,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-directory-service/src/protocols/Aws_json1_1.ts b/clients/client-directory-service/src/protocols/Aws_json1_1.ts index 56911fada4e6..367de242b41a 100644 --- a/clients/client-directory-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-directory-service/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -180,15 +182,11 @@ import { AcceptSharedDirectoryResult, AccessDeniedException, AddIpRoutesRequest, - AddIpRoutesResult, AddRegionRequest, - AddRegionResult, AddTagsToResourceRequest, - AddTagsToResourceResult, Attribute, AuthenticationFailedException, CancelSchemaExtensionRequest, - CancelSchemaExtensionResult, Certificate, CertificateAlreadyExistsException, CertificateDoesNotExistException, @@ -198,46 +196,27 @@ import { ClientAuthenticationSettingInfo, ClientCertAuthSettings, ClientException, - Computer, - ConditionalForwarder, ConnectDirectoryRequest, - ConnectDirectoryResult, CreateAliasRequest, - CreateAliasResult, CreateComputerRequest, - CreateComputerResult, CreateConditionalForwarderRequest, - CreateConditionalForwarderResult, CreateDirectoryRequest, - CreateDirectoryResult, CreateLogSubscriptionRequest, - CreateLogSubscriptionResult, CreateMicrosoftADRequest, - CreateMicrosoftADResult, CreateSnapshotRequest, - CreateSnapshotResult, CreateTrustRequest, - CreateTrustResult, DeleteConditionalForwarderRequest, - DeleteConditionalForwarderResult, DeleteDirectoryRequest, - DeleteDirectoryResult, DeleteLogSubscriptionRequest, - DeleteLogSubscriptionResult, DeleteSnapshotRequest, - DeleteSnapshotResult, DeleteTrustRequest, - DeleteTrustResult, DeregisterCertificateRequest, - DeregisterCertificateResult, DeregisterEventTopicRequest, - DeregisterEventTopicResult, DescribeCertificateRequest, DescribeCertificateResult, DescribeClientAuthenticationSettingsRequest, DescribeClientAuthenticationSettingsResult, DescribeConditionalForwardersRequest, - DescribeConditionalForwardersResult, DescribeDirectoriesRequest, DescribeDirectoriesResult, DescribeDomainControllersRequest, @@ -260,43 +239,29 @@ import { DescribeUpdateDirectoryResult, DirectoryAlreadyInRegionException, DirectoryAlreadySharedException, - DirectoryConfigurationStatus, DirectoryConnectSettings, - DirectoryConnectSettingsDescription, DirectoryDescription, DirectoryDoesNotExistException, DirectoryInDesiredStateException, DirectoryLimitExceededException, - DirectoryLimits, DirectoryNotSharedException, DirectoryUnavailableException, DirectoryVpcSettings, - DirectoryVpcSettingsDescription, DisableClientAuthenticationRequest, - DisableClientAuthenticationResult, DisableLDAPSRequest, - DisableLDAPSResult, DisableRadiusRequest, - DisableRadiusResult, DisableSsoRequest, - DisableSsoResult, DomainController, DomainControllerLimitExceededException, EnableClientAuthenticationRequest, - EnableClientAuthenticationResult, EnableLDAPSRequest, - EnableLDAPSResult, EnableRadiusRequest, - EnableRadiusResult, EnableSsoRequest, - EnableSsoResult, EntityAlreadyExistsException, EntityDoesNotExistException, EventTopic, GetDirectoryLimitsRequest, - GetDirectoryLimitsResult, GetSnapshotLimitsRequest, - GetSnapshotLimitsResult, IncompatibleSettingsException, InsufficientPermissionsException, InvalidCertificateException, @@ -319,71 +284,48 @@ import { ListSchemaExtensionsRequest, ListSchemaExtensionsResult, ListTagsForResourceRequest, - ListTagsForResourceResult, LogSubscription, NoAvailableCertificateException, OrganizationsException, OSUpdateSettings, - OwnerDirectoryDescription, RadiusSettings, RegionDescription, RegionLimitExceededException, - RegionsInfo, RegisterCertificateRequest, - RegisterCertificateResult, RegisterEventTopicRequest, - RegisterEventTopicResult, RejectSharedDirectoryRequest, - RejectSharedDirectoryResult, RemoveIpRoutesRequest, - RemoveIpRoutesResult, RemoveRegionRequest, - RemoveRegionResult, RemoveTagsFromResourceRequest, - RemoveTagsFromResourceResult, ResetUserPasswordRequest, - ResetUserPasswordResult, RestoreFromSnapshotRequest, - RestoreFromSnapshotResult, SchemaExtensionInfo, ServiceException, Setting, SettingEntry, SharedDirectory, ShareDirectoryRequest, - ShareDirectoryResult, ShareLimitExceededException, ShareTarget, Snapshot, SnapshotLimitExceededException, - SnapshotLimits, StartSchemaExtensionRequest, - StartSchemaExtensionResult, Tag, TagLimitExceededException, Trust, UnshareDirectoryRequest, - UnshareDirectoryResult, UnshareTarget, UnsupportedOperationException, UnsupportedSettingsException, UpdateConditionalForwarderRequest, - UpdateConditionalForwarderResult, UpdateDirectorySetupRequest, - UpdateDirectorySetupResult, UpdateInfoEntry, UpdateNumberOfDomainControllersRequest, - UpdateNumberOfDomainControllersResult, UpdateRadiusRequest, - UpdateRadiusResult, UpdateSettingsRequest, - UpdateSettingsResult, UpdateTrustRequest, - UpdateTrustResult, - UpdateValue, UserDoesNotExistException, VerifyTrustRequest, - VerifyTrustResult, } from "../models/models_0"; /** @@ -395,7 +337,7 @@ export const se_AcceptSharedDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptSharedDirectory"); let body: any; - body = JSON.stringify(se_AcceptSharedDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -408,7 +350,7 @@ export const se_AddIpRoutesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddIpRoutes"); let body: any; - body = JSON.stringify(se_AddIpRoutesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -421,7 +363,7 @@ export const se_AddRegionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddRegion"); let body: any; - body = JSON.stringify(se_AddRegionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -434,7 +376,7 @@ export const se_AddTagsToResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToResource"); let body: any; - body = JSON.stringify(se_AddTagsToResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -447,7 +389,7 @@ export const se_CancelSchemaExtensionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelSchemaExtension"); let body: any; - body = JSON.stringify(se_CancelSchemaExtensionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -460,7 +402,7 @@ export const se_ConnectDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConnectDirectory"); let body: any; - body = JSON.stringify(se_ConnectDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -473,7 +415,7 @@ export const se_CreateAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAlias"); let body: any; - body = JSON.stringify(se_CreateAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -486,7 +428,7 @@ export const se_CreateComputerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateComputer"); let body: any; - body = JSON.stringify(se_CreateComputerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -499,7 +441,7 @@ export const se_CreateConditionalForwarderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConditionalForwarder"); let body: any; - body = JSON.stringify(se_CreateConditionalForwarderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -512,7 +454,7 @@ export const se_CreateDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDirectory"); let body: any; - body = JSON.stringify(se_CreateDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -525,7 +467,7 @@ export const se_CreateLogSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLogSubscription"); let body: any; - body = JSON.stringify(se_CreateLogSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -538,7 +480,7 @@ export const se_CreateMicrosoftADCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMicrosoftAD"); let body: any; - body = JSON.stringify(se_CreateMicrosoftADRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -551,7 +493,7 @@ export const se_CreateSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSnapshot"); let body: any; - body = JSON.stringify(se_CreateSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -564,7 +506,7 @@ export const se_CreateTrustCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTrust"); let body: any; - body = JSON.stringify(se_CreateTrustRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -577,7 +519,7 @@ export const se_DeleteConditionalForwarderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConditionalForwarder"); let body: any; - body = JSON.stringify(se_DeleteConditionalForwarderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -590,7 +532,7 @@ export const se_DeleteDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDirectory"); let body: any; - body = JSON.stringify(se_DeleteDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -603,7 +545,7 @@ export const se_DeleteLogSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLogSubscription"); let body: any; - body = JSON.stringify(se_DeleteLogSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -616,7 +558,7 @@ export const se_DeleteSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSnapshot"); let body: any; - body = JSON.stringify(se_DeleteSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -629,7 +571,7 @@ export const se_DeleteTrustCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTrust"); let body: any; - body = JSON.stringify(se_DeleteTrustRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -642,7 +584,7 @@ export const se_DeregisterCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterCertificate"); let body: any; - body = JSON.stringify(se_DeregisterCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -655,7 +597,7 @@ export const se_DeregisterEventTopicCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterEventTopic"); let body: any; - body = JSON.stringify(se_DeregisterEventTopicRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -668,7 +610,7 @@ export const se_DescribeCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCertificate"); let body: any; - body = JSON.stringify(se_DescribeCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -681,7 +623,7 @@ export const se_DescribeClientAuthenticationSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClientAuthenticationSettings"); let body: any; - body = JSON.stringify(se_DescribeClientAuthenticationSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -694,7 +636,7 @@ export const se_DescribeConditionalForwardersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConditionalForwarders"); let body: any; - body = JSON.stringify(se_DescribeConditionalForwardersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -707,7 +649,7 @@ export const se_DescribeDirectoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDirectories"); let body: any; - body = JSON.stringify(se_DescribeDirectoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -720,7 +662,7 @@ export const se_DescribeDomainControllersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDomainControllers"); let body: any; - body = JSON.stringify(se_DescribeDomainControllersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -733,7 +675,7 @@ export const se_DescribeEventTopicsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventTopics"); let body: any; - body = JSON.stringify(se_DescribeEventTopicsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -746,7 +688,7 @@ export const se_DescribeLDAPSSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLDAPSSettings"); let body: any; - body = JSON.stringify(se_DescribeLDAPSSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -759,7 +701,7 @@ export const se_DescribeRegionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRegions"); let body: any; - body = JSON.stringify(se_DescribeRegionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -772,7 +714,7 @@ export const se_DescribeSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSettings"); let body: any; - body = JSON.stringify(se_DescribeSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -785,7 +727,7 @@ export const se_DescribeSharedDirectoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSharedDirectories"); let body: any; - body = JSON.stringify(se_DescribeSharedDirectoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -798,7 +740,7 @@ export const se_DescribeSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSnapshots"); let body: any; - body = JSON.stringify(se_DescribeSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -811,7 +753,7 @@ export const se_DescribeTrustsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrusts"); let body: any; - body = JSON.stringify(se_DescribeTrustsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -824,7 +766,7 @@ export const se_DescribeUpdateDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUpdateDirectory"); let body: any; - body = JSON.stringify(se_DescribeUpdateDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -837,7 +779,7 @@ export const se_DisableClientAuthenticationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableClientAuthentication"); let body: any; - body = JSON.stringify(se_DisableClientAuthenticationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -850,7 +792,7 @@ export const se_DisableLDAPSCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableLDAPS"); let body: any; - body = JSON.stringify(se_DisableLDAPSRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -863,7 +805,7 @@ export const se_DisableRadiusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableRadius"); let body: any; - body = JSON.stringify(se_DisableRadiusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -876,7 +818,7 @@ export const se_DisableSsoCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableSso"); let body: any; - body = JSON.stringify(se_DisableSsoRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -889,7 +831,7 @@ export const se_EnableClientAuthenticationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableClientAuthentication"); let body: any; - body = JSON.stringify(se_EnableClientAuthenticationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -902,7 +844,7 @@ export const se_EnableLDAPSCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableLDAPS"); let body: any; - body = JSON.stringify(se_EnableLDAPSRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -915,7 +857,7 @@ export const se_EnableRadiusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableRadius"); let body: any; - body = JSON.stringify(se_EnableRadiusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -928,7 +870,7 @@ export const se_EnableSsoCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableSso"); let body: any; - body = JSON.stringify(se_EnableSsoRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -941,7 +883,7 @@ export const se_GetDirectoryLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDirectoryLimits"); let body: any; - body = JSON.stringify(se_GetDirectoryLimitsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -954,7 +896,7 @@ export const se_GetSnapshotLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSnapshotLimits"); let body: any; - body = JSON.stringify(se_GetSnapshotLimitsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -967,7 +909,7 @@ export const se_ListCertificatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCertificates"); let body: any; - body = JSON.stringify(se_ListCertificatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -980,7 +922,7 @@ export const se_ListIpRoutesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIpRoutes"); let body: any; - body = JSON.stringify(se_ListIpRoutesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -993,7 +935,7 @@ export const se_ListLogSubscriptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLogSubscriptions"); let body: any; - body = JSON.stringify(se_ListLogSubscriptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1006,7 +948,7 @@ export const se_ListSchemaExtensionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSchemaExtensions"); let body: any; - body = JSON.stringify(se_ListSchemaExtensionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1019,7 +961,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1032,7 +974,7 @@ export const se_RegisterCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterCertificate"); let body: any; - body = JSON.stringify(se_RegisterCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1045,7 +987,7 @@ export const se_RegisterEventTopicCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterEventTopic"); let body: any; - body = JSON.stringify(se_RegisterEventTopicRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1058,7 +1000,7 @@ export const se_RejectSharedDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectSharedDirectory"); let body: any; - body = JSON.stringify(se_RejectSharedDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1071,7 +1013,7 @@ export const se_RemoveIpRoutesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveIpRoutes"); let body: any; - body = JSON.stringify(se_RemoveIpRoutesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1084,7 +1026,7 @@ export const se_RemoveRegionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveRegion"); let body: any; - body = JSON.stringify(se_RemoveRegionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1097,7 +1039,7 @@ export const se_RemoveTagsFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromResource"); let body: any; - body = JSON.stringify(se_RemoveTagsFromResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1110,7 +1052,7 @@ export const se_ResetUserPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetUserPassword"); let body: any; - body = JSON.stringify(se_ResetUserPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1123,7 +1065,7 @@ export const se_RestoreFromSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreFromSnapshot"); let body: any; - body = JSON.stringify(se_RestoreFromSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1136,7 +1078,7 @@ export const se_ShareDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ShareDirectory"); let body: any; - body = JSON.stringify(se_ShareDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1149,7 +1091,7 @@ export const se_StartSchemaExtensionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartSchemaExtension"); let body: any; - body = JSON.stringify(se_StartSchemaExtensionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1162,7 +1104,7 @@ export const se_UnshareDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnshareDirectory"); let body: any; - body = JSON.stringify(se_UnshareDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1175,7 +1117,7 @@ export const se_UpdateConditionalForwarderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConditionalForwarder"); let body: any; - body = JSON.stringify(se_UpdateConditionalForwarderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1188,7 +1130,7 @@ export const se_UpdateDirectorySetupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDirectorySetup"); let body: any; - body = JSON.stringify(se_UpdateDirectorySetupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1201,7 +1143,7 @@ export const se_UpdateNumberOfDomainControllersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNumberOfDomainControllers"); let body: any; - body = JSON.stringify(se_UpdateNumberOfDomainControllersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1214,7 +1156,7 @@ export const se_UpdateRadiusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRadius"); let body: any; - body = JSON.stringify(se_UpdateRadiusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1227,7 +1169,7 @@ export const se_UpdateSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSettings"); let body: any; - body = JSON.stringify(se_UpdateSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1240,7 +1182,7 @@ export const se_UpdateTrustCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTrust"); let body: any; - body = JSON.stringify(se_UpdateTrustRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1253,7 +1195,7 @@ export const se_VerifyTrustCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("VerifyTrust"); let body: any; - body = JSON.stringify(se_VerifyTrustRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1274,7 +1216,7 @@ export const de_AcceptSharedDirectoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1307,10 +1249,9 @@ const de_AcceptSharedDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1328,12 +1269,12 @@ export const de_AddIpRoutesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddIpRoutesResult(data, context); + contents = _json(data); const response: AddIpRoutesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1372,10 +1313,9 @@ const de_AddIpRoutesCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1393,12 +1333,12 @@ export const de_AddRegionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddRegionResult(data, context); + contents = _json(data); const response: AddRegionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1446,10 +1386,9 @@ const de_AddRegionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1467,12 +1406,12 @@ export const de_AddTagsToResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsToResourceResult(data, context); + contents = _json(data); const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1505,10 +1444,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_TagLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1526,12 +1464,12 @@ export const de_CancelSchemaExtensionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelSchemaExtensionResult(data, context); + contents = _json(data); const response: CancelSchemaExtensionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1558,10 +1496,9 @@ const de_CancelSchemaExtensionCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1579,12 +1516,12 @@ export const de_ConnectDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConnectDirectoryResult(data, context); + contents = _json(data); const response: ConnectDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1614,10 +1551,9 @@ const de_ConnectDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1635,12 +1571,12 @@ export const de_CreateAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAliasResult(data, context); + contents = _json(data); const response: CreateAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1673,10 +1609,9 @@ const de_CreateAliasCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1694,12 +1629,12 @@ export const de_CreateComputerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateComputerResult(data, context); + contents = _json(data); const response: CreateComputerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1741,10 +1676,9 @@ const de_CreateComputerCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1762,12 +1696,12 @@ export const de_CreateConditionalForwarderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConditionalForwarderResult(data, context); + contents = _json(data); const response: CreateConditionalForwarderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1806,10 +1740,9 @@ const de_CreateConditionalForwarderCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1827,12 +1760,12 @@ export const de_CreateDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDirectoryResult(data, context); + contents = _json(data); const response: CreateDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1862,10 +1795,9 @@ const de_CreateDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1883,12 +1815,12 @@ export const de_CreateLogSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLogSubscriptionResult(data, context); + contents = _json(data); const response: CreateLogSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1924,10 +1856,9 @@ const de_CreateLogSubscriptionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1945,12 +1876,12 @@ export const de_CreateMicrosoftADCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMicrosoftADResult(data, context); + contents = _json(data); const response: CreateMicrosoftADCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1983,10 +1914,9 @@ const de_CreateMicrosoftADCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2004,12 +1934,12 @@ export const de_CreateSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSnapshotResult(data, context); + contents = _json(data); const response: CreateSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2042,10 +1972,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_SnapshotLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2063,12 +1992,12 @@ export const de_CreateTrustCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTrustResult(data, context); + contents = _json(data); const response: CreateTrustCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2104,10 +2033,9 @@ const de_CreateTrustCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2125,12 +2053,12 @@ export const de_DeleteConditionalForwarderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConditionalForwarderResult(data, context); + contents = _json(data); const response: DeleteConditionalForwarderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2166,10 +2094,9 @@ const de_DeleteConditionalForwarderCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2187,12 +2114,12 @@ export const de_DeleteDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDirectoryResult(data, context); + contents = _json(data); const response: DeleteDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2219,10 +2146,9 @@ const de_DeleteDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2240,12 +2166,12 @@ export const de_DeleteLogSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLogSubscriptionResult(data, context); + contents = _json(data); const response: DeleteLogSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2275,10 +2201,9 @@ const de_DeleteLogSubscriptionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2296,12 +2221,12 @@ export const de_DeleteSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSnapshotResult(data, context); + contents = _json(data); const response: DeleteSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2331,10 +2256,9 @@ const de_DeleteSnapshotCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2352,12 +2276,12 @@ export const de_DeleteTrustCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTrustResult(data, context); + contents = _json(data); const response: DeleteTrustCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2390,10 +2314,9 @@ const de_DeleteTrustCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2411,12 +2334,12 @@ export const de_DeregisterCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterCertificateResult(data, context); + contents = _json(data); const response: DeregisterCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2458,10 +2381,9 @@ const de_DeregisterCertificateCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2479,12 +2401,12 @@ export const de_DeregisterEventTopicCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterEventTopicResult(data, context); + contents = _json(data); const response: DeregisterEventTopicCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2514,10 +2436,9 @@ const de_DeregisterEventTopicCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2540,7 +2461,7 @@ export const de_DescribeCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2576,10 +2497,9 @@ const de_DescribeCertificateCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2602,7 +2522,7 @@ export const de_DescribeClientAuthenticationSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2638,10 +2558,9 @@ const de_DescribeClientAuthenticationSettingsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2659,12 +2578,12 @@ export const de_DescribeConditionalForwardersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConditionalForwardersResult(data, context); + contents = _json(data); const response: DescribeConditionalForwardersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2700,10 +2619,9 @@ const de_DescribeConditionalForwardersCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2726,7 +2644,7 @@ export const de_DescribeDirectoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2759,10 +2677,9 @@ const de_DescribeDirectoriesCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2785,7 +2702,7 @@ export const de_DescribeDomainControllersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2821,10 +2738,9 @@ const de_DescribeDomainControllersCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2847,7 +2763,7 @@ export const de_DescribeEventTopicsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2877,10 +2793,9 @@ const de_DescribeEventTopicsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2903,7 +2818,7 @@ export const de_DescribeLDAPSSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2939,10 +2854,9 @@ const de_DescribeLDAPSSettingsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2965,7 +2879,7 @@ export const de_DescribeRegionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3004,10 +2918,9 @@ const de_DescribeRegionsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3030,7 +2943,7 @@ export const de_DescribeSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3066,10 +2979,9 @@ const de_DescribeSettingsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3092,7 +3004,7 @@ export const de_DescribeSharedDirectoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3128,10 +3040,9 @@ const de_DescribeSharedDirectoriesCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3154,7 +3065,7 @@ export const de_DescribeSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3187,10 +3098,9 @@ const de_DescribeSnapshotsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3213,7 +3123,7 @@ export const de_DescribeTrustsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3249,10 +3159,9 @@ const de_DescribeTrustsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3275,7 +3184,7 @@ export const de_DescribeUpdateDirectoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3311,10 +3220,9 @@ const de_DescribeUpdateDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3332,12 +3240,12 @@ export const de_DisableClientAuthenticationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableClientAuthenticationResult(data, context); + contents = _json(data); const response: DisableClientAuthenticationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3373,10 +3281,9 @@ const de_DisableClientAuthenticationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3394,12 +3301,12 @@ export const de_DisableLDAPSCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableLDAPSResult(data, context); + contents = _json(data); const response: DisableLDAPSCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3438,10 +3345,9 @@ const de_DisableLDAPSCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3459,12 +3365,12 @@ export const de_DisableRadiusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableRadiusResult(data, context); + contents = _json(data); const response: DisableRadiusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3491,10 +3397,9 @@ const de_DisableRadiusCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3512,12 +3417,12 @@ export const de_DisableSsoCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableSsoResult(data, context); + contents = _json(data); const response: DisableSsoCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3550,10 +3455,9 @@ const de_DisableSsoCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3571,12 +3475,12 @@ export const de_EnableClientAuthenticationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableClientAuthenticationResult(data, context); + contents = _json(data); const response: EnableClientAuthenticationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3615,10 +3519,9 @@ const de_EnableClientAuthenticationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3636,12 +3539,12 @@ export const de_EnableLDAPSCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableLDAPSResult(data, context); + contents = _json(data); const response: EnableLDAPSCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3683,10 +3586,9 @@ const de_EnableLDAPSCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3704,12 +3606,12 @@ export const de_EnableRadiusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableRadiusResult(data, context); + contents = _json(data); const response: EnableRadiusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3742,10 +3644,9 @@ const de_EnableRadiusCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3763,12 +3664,12 @@ export const de_EnableSsoCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableSsoResult(data, context); + contents = _json(data); const response: EnableSsoCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3801,10 +3702,9 @@ const de_EnableSsoCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3822,12 +3722,12 @@ export const de_GetDirectoryLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDirectoryLimitsResult(data, context); + contents = _json(data); const response: GetDirectoryLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3854,10 +3754,9 @@ const de_GetDirectoryLimitsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3875,12 +3774,12 @@ export const de_GetSnapshotLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSnapshotLimitsResult(data, context); + contents = _json(data); const response: GetSnapshotLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3907,10 +3806,9 @@ const de_GetSnapshotLimitsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3933,7 +3831,7 @@ export const de_ListCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3969,10 +3867,9 @@ const de_ListCertificatesCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3995,7 +3892,7 @@ export const de_ListIpRoutesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4028,10 +3925,9 @@ const de_ListIpRoutesCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4054,7 +3950,7 @@ export const de_ListLogSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4084,10 +3980,9 @@ const de_ListLogSubscriptionsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4110,7 +4005,7 @@ export const de_ListSchemaExtensionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4140,10 +4035,9 @@ const de_ListSchemaExtensionsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4161,12 +4055,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResult(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4199,10 +4093,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4220,12 +4113,12 @@ export const de_RegisterCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterCertificateResult(data, context); + contents = _json(data); const response: RegisterCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4270,10 +4163,9 @@ const de_RegisterCertificateCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4291,12 +4183,12 @@ export const de_RegisterEventTopicCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterEventTopicResult(data, context); + contents = _json(data); const response: RegisterEventTopicCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4326,10 +4218,9 @@ const de_RegisterEventTopicCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4347,12 +4238,12 @@ export const de_RejectSharedDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectSharedDirectoryResult(data, context); + contents = _json(data); const response: RejectSharedDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4385,10 +4276,9 @@ const de_RejectSharedDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4406,12 +4296,12 @@ export const de_RemoveIpRoutesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveIpRoutesResult(data, context); + contents = _json(data); const response: RemoveIpRoutesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4444,10 +4334,9 @@ const de_RemoveIpRoutesCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4465,12 +4354,12 @@ export const de_RemoveRegionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveRegionResult(data, context); + contents = _json(data); const response: RemoveRegionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4506,10 +4395,9 @@ const de_RemoveRegionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4527,12 +4415,12 @@ export const de_RemoveTagsFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsFromResourceResult(data, context); + contents = _json(data); const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4562,10 +4450,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4583,12 +4470,12 @@ export const de_ResetUserPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResetUserPasswordResult(data, context); + contents = _json(data); const response: ResetUserPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4627,10 +4514,9 @@ const de_ResetUserPasswordCommandError = async ( throw await de_UserDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4648,12 +4534,12 @@ export const de_RestoreFromSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RestoreFromSnapshotResult(data, context); + contents = _json(data); const response: RestoreFromSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4683,10 +4569,9 @@ const de_RestoreFromSnapshotCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4704,12 +4589,12 @@ export const de_ShareDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ShareDirectoryResult(data, context); + contents = _json(data); const response: ShareDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4757,10 +4642,9 @@ const de_ShareDirectoryCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4778,12 +4662,12 @@ export const de_StartSchemaExtensionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSchemaExtensionResult(data, context); + contents = _json(data); const response: StartSchemaExtensionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4819,10 +4703,9 @@ const de_StartSchemaExtensionCommandError = async ( throw await de_SnapshotLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4840,12 +4723,12 @@ export const de_UnshareDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UnshareDirectoryResult(data, context); + contents = _json(data); const response: UnshareDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4878,10 +4761,9 @@ const de_UnshareDirectoryCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4899,12 +4781,12 @@ export const de_UpdateConditionalForwarderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConditionalForwarderResult(data, context); + contents = _json(data); const response: UpdateConditionalForwarderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4940,10 +4822,9 @@ const de_UpdateConditionalForwarderCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4961,12 +4842,12 @@ export const de_UpdateDirectorySetupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDirectorySetupResult(data, context); + contents = _json(data); const response: UpdateDirectorySetupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5011,10 +4892,9 @@ const de_UpdateDirectorySetupCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5032,12 +4912,12 @@ export const de_UpdateNumberOfDomainControllersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNumberOfDomainControllersResult(data, context); + contents = _json(data); const response: UpdateNumberOfDomainControllersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5076,10 +4956,9 @@ const de_UpdateNumberOfDomainControllersCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5097,12 +4976,12 @@ export const de_UpdateRadiusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRadiusResult(data, context); + contents = _json(data); const response: UpdateRadiusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5132,10 +5011,9 @@ const de_UpdateRadiusCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5153,12 +5031,12 @@ export const de_UpdateSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSettingsResult(data, context); + contents = _json(data); const response: UpdateSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5200,10 +5078,9 @@ const de_UpdateSettingsCommandError = async ( throw await de_UnsupportedSettingsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5221,12 +5098,12 @@ export const de_UpdateTrustCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTrustResult(data, context); + contents = _json(data); const response: UpdateTrustCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5256,10 +5133,9 @@ const de_UpdateTrustCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5277,12 +5153,12 @@ export const de_VerifyTrustCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VerifyTrustResult(data, context); + contents = _json(data); const response: VerifyTrustCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5315,10 +5191,9 @@ const de_VerifyTrustCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5332,7 +5207,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5348,7 +5223,7 @@ const de_AuthenticationFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AuthenticationFailedException(body, context); + const deserialized: any = _json(body); const exception = new AuthenticationFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5364,7 +5239,7 @@ const de_CertificateAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CertificateAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new CertificateAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5380,7 +5255,7 @@ const de_CertificateDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CertificateDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new CertificateDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5396,7 +5271,7 @@ const de_CertificateInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CertificateInUseException(body, context); + const deserialized: any = _json(body); const exception = new CertificateInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5412,7 +5287,7 @@ const de_CertificateLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CertificateLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new CertificateLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5425,7 +5300,7 @@ const de_CertificateLimitExceededExceptionRes = async ( */ const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClientException(body, context); + const deserialized: any = _json(body); const exception = new ClientException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5441,7 +5316,7 @@ const de_DirectoryAlreadyInRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryAlreadyInRegionException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryAlreadyInRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5457,7 +5332,7 @@ const de_DirectoryAlreadySharedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryAlreadySharedException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryAlreadySharedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5473,7 +5348,7 @@ const de_DirectoryDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5489,7 +5364,7 @@ const de_DirectoryInDesiredStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryInDesiredStateException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryInDesiredStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5505,7 +5380,7 @@ const de_DirectoryLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5521,7 +5396,7 @@ const de_DirectoryNotSharedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryNotSharedException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryNotSharedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5537,7 +5412,7 @@ const de_DirectoryUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5553,7 +5428,7 @@ const de_DomainControllerLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DomainControllerLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new DomainControllerLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5569,7 +5444,7 @@ const de_EntityAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntityAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new EntityAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5585,7 +5460,7 @@ const de_EntityDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntityDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new EntityDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5601,7 +5476,7 @@ const de_IncompatibleSettingsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncompatibleSettingsException(body, context); + const deserialized: any = _json(body); const exception = new IncompatibleSettingsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5617,7 +5492,7 @@ const de_InsufficientPermissionsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientPermissionsException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientPermissionsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5633,7 +5508,7 @@ const de_InvalidCertificateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCertificateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCertificateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5649,7 +5524,7 @@ const de_InvalidClientAuthStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidClientAuthStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidClientAuthStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5665,7 +5540,7 @@ const de_InvalidLDAPSStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLDAPSStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLDAPSStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5681,7 +5556,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5697,7 +5572,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5713,7 +5588,7 @@ const de_InvalidPasswordExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPasswordException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPasswordException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5729,7 +5604,7 @@ const de_InvalidTargetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5745,7 +5620,7 @@ const de_IpRouteLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IpRouteLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new IpRouteLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5761,7 +5636,7 @@ const de_NoAvailableCertificateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoAvailableCertificateException(body, context); + const deserialized: any = _json(body); const exception = new NoAvailableCertificateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5777,7 +5652,7 @@ const de_OrganizationsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationsException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5793,7 +5668,7 @@ const de_RegionLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RegionLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new RegionLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5806,7 +5681,7 @@ const de_RegionLimitExceededExceptionRes = async ( */ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceException(body, context); + const deserialized: any = _json(body); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5822,7 +5697,7 @@ const de_ShareLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ShareLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ShareLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5838,7 +5713,7 @@ const de_SnapshotLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SnapshotLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new SnapshotLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5854,7 +5729,7 @@ const de_TagLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TagLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5870,7 +5745,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5886,7 +5761,7 @@ const de_UnsupportedSettingsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedSettingsException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedSettingsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5902,7 +5777,7 @@ const de_UserDoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserDoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new UserDoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5910,1247 +5785,257 @@ const de_UserDoesNotExistExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptSharedDirectoryRequest - */ -const se_AcceptSharedDirectoryRequest = (input: AcceptSharedDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.SharedDirectoryId != null && { SharedDirectoryId: input.SharedDirectoryId }), - }; -}; +// se_AcceptSharedDirectoryRequest omitted. -/** - * serializeAws_json1_1AddIpRoutesRequest - */ -const se_AddIpRoutesRequest = (input: AddIpRoutesRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.IpRoutes != null && { IpRoutes: se_IpRoutes(input.IpRoutes, context) }), - ...(input.UpdateSecurityGroupForDirectoryControllers != null && { - UpdateSecurityGroupForDirectoryControllers: input.UpdateSecurityGroupForDirectoryControllers, - }), - }; -}; +// se_AddIpRoutesRequest omitted. -/** - * serializeAws_json1_1AddRegionRequest - */ -const se_AddRegionRequest = (input: AddRegionRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.VPCSettings != null && { VPCSettings: se_DirectoryVpcSettings(input.VPCSettings, context) }), - }; -}; +// se_AddRegionRequest omitted. -/** - * serializeAws_json1_1AddTagsToResourceRequest - */ -const se_AddTagsToResourceRequest = (input: AddTagsToResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_AddTagsToResourceRequest omitted. -/** - * serializeAws_json1_1Attribute - */ -const se_Attribute = (input: Attribute, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Attribute omitted. -/** - * serializeAws_json1_1Attributes - */ -const se_Attributes = (input: Attribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Attribute(entry, context); - }); -}; +// se_Attributes omitted. -/** - * serializeAws_json1_1CancelSchemaExtensionRequest - */ -const se_CancelSchemaExtensionRequest = (input: CancelSchemaExtensionRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.SchemaExtensionId != null && { SchemaExtensionId: input.SchemaExtensionId }), - }; -}; +// se_CancelSchemaExtensionRequest omitted. -/** - * serializeAws_json1_1CidrIps - */ -const se_CidrIps = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CidrIps omitted. -/** - * serializeAws_json1_1ClientCertAuthSettings - */ -const se_ClientCertAuthSettings = (input: ClientCertAuthSettings, context: __SerdeContext): any => { - return { - ...(input.OCSPUrl != null && { OCSPUrl: input.OCSPUrl }), - }; -}; +// se_ClientCertAuthSettings omitted. -/** - * serializeAws_json1_1ConnectDirectoryRequest - */ -const se_ConnectDirectoryRequest = (input: ConnectDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectSettings != null && { - ConnectSettings: se_DirectoryConnectSettings(input.ConnectSettings, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Password != null && { Password: input.Password }), - ...(input.ShortName != null && { ShortName: input.ShortName }), - ...(input.Size != null && { Size: input.Size }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_ConnectDirectoryRequest omitted. -/** - * serializeAws_json1_1CreateAliasRequest - */ -const se_CreateAliasRequest = (input: CreateAliasRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_CreateAliasRequest omitted. -/** - * serializeAws_json1_1CreateComputerRequest - */ -const se_CreateComputerRequest = (input: CreateComputerRequest, context: __SerdeContext): any => { - return { - ...(input.ComputerAttributes != null && { ComputerAttributes: se_Attributes(input.ComputerAttributes, context) }), - ...(input.ComputerName != null && { ComputerName: input.ComputerName }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.OrganizationalUnitDistinguishedName != null && { - OrganizationalUnitDistinguishedName: input.OrganizationalUnitDistinguishedName, - }), - ...(input.Password != null && { Password: input.Password }), - }; -}; +// se_CreateComputerRequest omitted. -/** - * serializeAws_json1_1CreateConditionalForwarderRequest - */ -const se_CreateConditionalForwarderRequest = ( - input: CreateConditionalForwarderRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.DnsIpAddrs != null && { DnsIpAddrs: se_DnsIpAddrs(input.DnsIpAddrs, context) }), - ...(input.RemoteDomainName != null && { RemoteDomainName: input.RemoteDomainName }), - }; -}; +// se_CreateConditionalForwarderRequest omitted. -/** - * serializeAws_json1_1CreateDirectoryRequest - */ -const se_CreateDirectoryRequest = (input: CreateDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Password != null && { Password: input.Password }), - ...(input.ShortName != null && { ShortName: input.ShortName }), - ...(input.Size != null && { Size: input.Size }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VpcSettings != null && { VpcSettings: se_DirectoryVpcSettings(input.VpcSettings, context) }), - }; -}; +// se_CreateDirectoryRequest omitted. -/** - * serializeAws_json1_1CreateLogSubscriptionRequest - */ -const se_CreateLogSubscriptionRequest = (input: CreateLogSubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.LogGroupName != null && { LogGroupName: input.LogGroupName }), - }; -}; +// se_CreateLogSubscriptionRequest omitted. -/** - * serializeAws_json1_1CreateMicrosoftADRequest - */ -const se_CreateMicrosoftADRequest = (input: CreateMicrosoftADRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Edition != null && { Edition: input.Edition }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Password != null && { Password: input.Password }), - ...(input.ShortName != null && { ShortName: input.ShortName }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VpcSettings != null && { VpcSettings: se_DirectoryVpcSettings(input.VpcSettings, context) }), - }; -}; +// se_CreateMicrosoftADRequest omitted. -/** - * serializeAws_json1_1CreateSnapshotRequest - */ -const se_CreateSnapshotRequest = (input: CreateSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateTrustRequest - */ -const se_CreateTrustRequest = (input: CreateTrustRequest, context: __SerdeContext): any => { - return { - ...(input.ConditionalForwarderIpAddrs != null && { - ConditionalForwarderIpAddrs: se_DnsIpAddrs(input.ConditionalForwarderIpAddrs, context), - }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RemoteDomainName != null && { RemoteDomainName: input.RemoteDomainName }), - ...(input.SelectiveAuth != null && { SelectiveAuth: input.SelectiveAuth }), - ...(input.TrustDirection != null && { TrustDirection: input.TrustDirection }), - ...(input.TrustPassword != null && { TrustPassword: input.TrustPassword }), - ...(input.TrustType != null && { TrustType: input.TrustType }), - }; -}; +// se_CreateTrustRequest omitted. -/** - * serializeAws_json1_1DeleteConditionalForwarderRequest - */ -const se_DeleteConditionalForwarderRequest = ( - input: DeleteConditionalForwarderRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RemoteDomainName != null && { RemoteDomainName: input.RemoteDomainName }), - }; -}; +// se_DeleteConditionalForwarderRequest omitted. -/** - * serializeAws_json1_1DeleteDirectoryRequest - */ -const se_DeleteDirectoryRequest = (input: DeleteDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_DeleteDirectoryRequest omitted. -/** - * serializeAws_json1_1DeleteLogSubscriptionRequest - */ -const se_DeleteLogSubscriptionRequest = (input: DeleteLogSubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_DeleteLogSubscriptionRequest omitted. -/** - * serializeAws_json1_1DeleteSnapshotRequest - */ -const se_DeleteSnapshotRequest = (input: DeleteSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - }; -}; +// se_DeleteSnapshotRequest omitted. -/** - * serializeAws_json1_1DeleteTrustRequest - */ -const se_DeleteTrustRequest = (input: DeleteTrustRequest, context: __SerdeContext): any => { - return { - ...(input.DeleteAssociatedConditionalForwarder != null && { - DeleteAssociatedConditionalForwarder: input.DeleteAssociatedConditionalForwarder, - }), - ...(input.TrustId != null && { TrustId: input.TrustId }), - }; -}; +// se_DeleteTrustRequest omitted. -/** - * serializeAws_json1_1DeregisterCertificateRequest - */ -const se_DeregisterCertificateRequest = (input: DeregisterCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateId != null && { CertificateId: input.CertificateId }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_DeregisterCertificateRequest omitted. -/** - * serializeAws_json1_1DeregisterEventTopicRequest - */ -const se_DeregisterEventTopicRequest = (input: DeregisterEventTopicRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; +// se_DeregisterEventTopicRequest omitted. -/** - * serializeAws_json1_1DescribeCertificateRequest - */ -const se_DescribeCertificateRequest = (input: DescribeCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateId != null && { CertificateId: input.CertificateId }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_DescribeCertificateRequest omitted. -/** - * serializeAws_json1_1DescribeClientAuthenticationSettingsRequest - */ -const se_DescribeClientAuthenticationSettingsRequest = ( - input: DescribeClientAuthenticationSettingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribeClientAuthenticationSettingsRequest omitted. -/** - * serializeAws_json1_1DescribeConditionalForwardersRequest - */ -const se_DescribeConditionalForwardersRequest = ( - input: DescribeConditionalForwardersRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RemoteDomainNames != null && { - RemoteDomainNames: se_RemoteDomainNames(input.RemoteDomainNames, context), - }), - }; -}; +// se_DescribeConditionalForwardersRequest omitted. -/** - * serializeAws_json1_1DescribeDirectoriesRequest - */ -const se_DescribeDirectoriesRequest = (input: DescribeDirectoriesRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryIds != null && { DirectoryIds: se_DirectoryIds(input.DirectoryIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeDirectoriesRequest omitted. -/** - * serializeAws_json1_1DescribeDomainControllersRequest - */ -const se_DescribeDomainControllersRequest = (input: DescribeDomainControllersRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.DomainControllerIds != null && { - DomainControllerIds: se_DomainControllerIds(input.DomainControllerIds, context), - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeDomainControllersRequest omitted. -/** - * serializeAws_json1_1DescribeEventTopicsRequest - */ -const se_DescribeEventTopicsRequest = (input: DescribeEventTopicsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.TopicNames != null && { TopicNames: se_TopicNames(input.TopicNames, context) }), - }; -}; +// se_DescribeEventTopicsRequest omitted. -/** - * serializeAws_json1_1DescribeLDAPSSettingsRequest - */ -const se_DescribeLDAPSSettingsRequest = (input: DescribeLDAPSSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribeLDAPSSettingsRequest omitted. -/** - * serializeAws_json1_1DescribeRegionsRequest - */ -const se_DescribeRegionsRequest = (input: DescribeRegionsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - }; -}; +// se_DescribeRegionsRequest omitted. -/** - * serializeAws_json1_1DescribeSettingsRequest - */ -const se_DescribeSettingsRequest = (input: DescribeSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_DescribeSettingsRequest omitted. -/** - * serializeAws_json1_1DescribeSharedDirectoriesRequest - */ -const se_DescribeSharedDirectoriesRequest = (input: DescribeSharedDirectoriesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OwnerDirectoryId != null && { OwnerDirectoryId: input.OwnerDirectoryId }), - ...(input.SharedDirectoryIds != null && { SharedDirectoryIds: se_DirectoryIds(input.SharedDirectoryIds, context) }), - }; -}; +// se_DescribeSharedDirectoriesRequest omitted. -/** - * serializeAws_json1_1DescribeSnapshotsRequest - */ -const se_DescribeSnapshotsRequest = (input: DescribeSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SnapshotIds != null && { SnapshotIds: se_SnapshotIds(input.SnapshotIds, context) }), - }; -}; +// se_DescribeSnapshotsRequest omitted. -/** - * serializeAws_json1_1DescribeTrustsRequest - */ -const se_DescribeTrustsRequest = (input: DescribeTrustsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TrustIds != null && { TrustIds: se_TrustIds(input.TrustIds, context) }), - }; -}; +// se_DescribeTrustsRequest omitted. -/** - * serializeAws_json1_1DescribeUpdateDirectoryRequest - */ -const se_DescribeUpdateDirectoryRequest = (input: DescribeUpdateDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.UpdateType != null && { UpdateType: input.UpdateType }), - }; -}; +// se_DescribeUpdateDirectoryRequest omitted. -/** - * serializeAws_json1_1DirectoryConnectSettings - */ -const se_DirectoryConnectSettings = (input: DirectoryConnectSettings, context: __SerdeContext): any => { - return { - ...(input.CustomerDnsIps != null && { CustomerDnsIps: se_DnsIpAddrs(input.CustomerDnsIps, context) }), - ...(input.CustomerUserName != null && { CustomerUserName: input.CustomerUserName }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_DirectoryConnectSettings omitted. -/** - * serializeAws_json1_1DirectoryIds - */ -const se_DirectoryIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DirectoryIds omitted. -/** - * serializeAws_json1_1DirectoryVpcSettings - */ -const se_DirectoryVpcSettings = (input: DirectoryVpcSettings, context: __SerdeContext): any => { - return { - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_DirectoryVpcSettings omitted. -/** - * serializeAws_json1_1DisableClientAuthenticationRequest - */ -const se_DisableClientAuthenticationRequest = ( - input: DisableClientAuthenticationRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DisableClientAuthenticationRequest omitted. -/** - * serializeAws_json1_1DisableLDAPSRequest - */ -const se_DisableLDAPSRequest = (input: DisableLDAPSRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DisableLDAPSRequest omitted. -/** - * serializeAws_json1_1DisableRadiusRequest - */ -const se_DisableRadiusRequest = (input: DisableRadiusRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_DisableRadiusRequest omitted. -/** - * serializeAws_json1_1DisableSsoRequest - */ -const se_DisableSsoRequest = (input: DisableSsoRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Password != null && { Password: input.Password }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DisableSsoRequest omitted. -/** - * serializeAws_json1_1DnsIpAddrs - */ -const se_DnsIpAddrs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DnsIpAddrs omitted. -/** - * serializeAws_json1_1DomainControllerIds - */ -const se_DomainControllerIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DomainControllerIds omitted. -/** - * serializeAws_json1_1EnableClientAuthenticationRequest - */ -const se_EnableClientAuthenticationRequest = ( - input: EnableClientAuthenticationRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_EnableClientAuthenticationRequest omitted. -/** - * serializeAws_json1_1EnableLDAPSRequest - */ -const se_EnableLDAPSRequest = (input: EnableLDAPSRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_EnableLDAPSRequest omitted. -/** - * serializeAws_json1_1EnableRadiusRequest - */ -const se_EnableRadiusRequest = (input: EnableRadiusRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RadiusSettings != null && { RadiusSettings: se_RadiusSettings(input.RadiusSettings, context) }), - }; -}; +// se_EnableRadiusRequest omitted. -/** - * serializeAws_json1_1EnableSsoRequest - */ -const se_EnableSsoRequest = (input: EnableSsoRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Password != null && { Password: input.Password }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_EnableSsoRequest omitted. -/** - * serializeAws_json1_1GetDirectoryLimitsRequest - */ -const se_GetDirectoryLimitsRequest = (input: GetDirectoryLimitsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetDirectoryLimitsRequest omitted. -/** - * serializeAws_json1_1GetSnapshotLimitsRequest - */ -const se_GetSnapshotLimitsRequest = (input: GetSnapshotLimitsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_GetSnapshotLimitsRequest omitted. -/** - * serializeAws_json1_1IpRoute - */ -const se_IpRoute = (input: IpRoute, context: __SerdeContext): any => { - return { - ...(input.CidrIp != null && { CidrIp: input.CidrIp }), - ...(input.Description != null && { Description: input.Description }), - }; -}; +// se_IpRoute omitted. -/** - * serializeAws_json1_1IpRoutes - */ -const se_IpRoutes = (input: IpRoute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IpRoute(entry, context); - }); -}; +// se_IpRoutes omitted. -/** - * serializeAws_json1_1ListCertificatesRequest - */ -const se_ListCertificatesRequest = (input: ListCertificatesRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCertificatesRequest omitted. -/** - * serializeAws_json1_1ListIpRoutesRequest - */ -const se_ListIpRoutesRequest = (input: ListIpRoutesRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListIpRoutesRequest omitted. -/** - * serializeAws_json1_1ListLogSubscriptionsRequest - */ -const se_ListLogSubscriptionsRequest = (input: ListLogSubscriptionsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLogSubscriptionsRequest omitted. -/** - * serializeAws_json1_1ListSchemaExtensionsRequest - */ -const se_ListSchemaExtensionsRequest = (input: ListSchemaExtensionsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListSchemaExtensionsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1OSUpdateSettings - */ -const se_OSUpdateSettings = (input: OSUpdateSettings, context: __SerdeContext): any => { - return { - ...(input.OSVersion != null && { OSVersion: input.OSVersion }), - }; -}; - -/** - * serializeAws_json1_1RadiusSettings - */ -const se_RadiusSettings = (input: RadiusSettings, context: __SerdeContext): any => { - return { - ...(input.AuthenticationProtocol != null && { AuthenticationProtocol: input.AuthenticationProtocol }), - ...(input.DisplayLabel != null && { DisplayLabel: input.DisplayLabel }), - ...(input.RadiusPort != null && { RadiusPort: input.RadiusPort }), - ...(input.RadiusRetries != null && { RadiusRetries: input.RadiusRetries }), - ...(input.RadiusServers != null && { RadiusServers: se_Servers(input.RadiusServers, context) }), - ...(input.RadiusTimeout != null && { RadiusTimeout: input.RadiusTimeout }), - ...(input.SharedSecret != null && { SharedSecret: input.SharedSecret }), - ...(input.UseSameUsername != null && { UseSameUsername: input.UseSameUsername }), - }; -}; - -/** - * serializeAws_json1_1RegisterCertificateRequest - */ -const se_RegisterCertificateRequest = (input: RegisterCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateData != null && { CertificateData: input.CertificateData }), - ...(input.ClientCertAuthSettings != null && { - ClientCertAuthSettings: se_ClientCertAuthSettings(input.ClientCertAuthSettings, context), - }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1RegisterEventTopicRequest - */ -const se_RegisterEventTopicRequest = (input: RegisterEventTopicRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; +// se_OSUpdateSettings omitted. -/** - * serializeAws_json1_1RejectSharedDirectoryRequest - */ -const se_RejectSharedDirectoryRequest = (input: RejectSharedDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.SharedDirectoryId != null && { SharedDirectoryId: input.SharedDirectoryId }), - }; -}; - -/** - * serializeAws_json1_1RemoteDomainNames - */ -const se_RemoteDomainNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RadiusSettings omitted. -/** - * serializeAws_json1_1RemoveIpRoutesRequest - */ -const se_RemoveIpRoutesRequest = (input: RemoveIpRoutesRequest, context: __SerdeContext): any => { - return { - ...(input.CidrIps != null && { CidrIps: se_CidrIps(input.CidrIps, context) }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_RegisterCertificateRequest omitted. -/** - * serializeAws_json1_1RemoveRegionRequest - */ -const se_RemoveRegionRequest = (input: RemoveRegionRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_RegisterEventTopicRequest omitted. -/** - * serializeAws_json1_1RemoveTagsFromResourceRequest - */ -const se_RemoveTagsFromResourceRequest = (input: RemoveTagsFromResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_RejectSharedDirectoryRequest omitted. -/** - * serializeAws_json1_1ResetUserPasswordRequest - */ -const se_ResetUserPasswordRequest = (input: ResetUserPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.NewPassword != null && { NewPassword: input.NewPassword }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_RemoteDomainNames omitted. -/** - * serializeAws_json1_1RestoreFromSnapshotRequest - */ -const se_RestoreFromSnapshotRequest = (input: RestoreFromSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - }; -}; +// se_RemoveIpRoutesRequest omitted. -/** - * serializeAws_json1_1Servers - */ -const se_Servers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RemoveRegionRequest omitted. -/** - * serializeAws_json1_1Setting - */ -const se_Setting = (input: Setting, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_RemoveTagsFromResourceRequest omitted. -/** - * serializeAws_json1_1Settings - */ -const se_Settings = (input: Setting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Setting(entry, context); - }); -}; +// se_ResetUserPasswordRequest omitted. -/** - * serializeAws_json1_1ShareDirectoryRequest - */ -const se_ShareDirectoryRequest = (input: ShareDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.ShareMethod != null && { ShareMethod: input.ShareMethod }), - ...(input.ShareNotes != null && { ShareNotes: input.ShareNotes }), - ...(input.ShareTarget != null && { ShareTarget: se_ShareTarget(input.ShareTarget, context) }), - }; -}; +// se_RestoreFromSnapshotRequest omitted. -/** - * serializeAws_json1_1ShareTarget - */ -const se_ShareTarget = (input: ShareTarget, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Servers omitted. -/** - * serializeAws_json1_1SnapshotIds - */ -const se_SnapshotIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Setting omitted. -/** - * serializeAws_json1_1StartSchemaExtensionRequest - */ -const se_StartSchemaExtensionRequest = (input: StartSchemaExtensionRequest, context: __SerdeContext): any => { - return { - ...(input.CreateSnapshotBeforeSchemaExtension != null && { - CreateSnapshotBeforeSchemaExtension: input.CreateSnapshotBeforeSchemaExtension, - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.LdifContent != null && { LdifContent: input.LdifContent }), - }; -}; +// se_Settings omitted. -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ShareDirectoryRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ShareTarget omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SnapshotIds omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_StartSchemaExtensionRequest omitted. -/** - * serializeAws_json1_1TopicNames - */ -const se_TopicNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_1TrustIds - */ -const se_TrustIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Tag omitted. -/** - * serializeAws_json1_1UnshareDirectoryRequest - */ -const se_UnshareDirectoryRequest = (input: UnshareDirectoryRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.UnshareTarget != null && { UnshareTarget: se_UnshareTarget(input.UnshareTarget, context) }), - }; -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1UnshareTarget - */ -const se_UnshareTarget = (input: UnshareTarget, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Tags omitted. -/** - * serializeAws_json1_1UpdateConditionalForwarderRequest - */ -const se_UpdateConditionalForwarderRequest = ( - input: UpdateConditionalForwarderRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.DnsIpAddrs != null && { DnsIpAddrs: se_DnsIpAddrs(input.DnsIpAddrs, context) }), - ...(input.RemoteDomainName != null && { RemoteDomainName: input.RemoteDomainName }), - }; -}; +// se_TopicNames omitted. -/** - * serializeAws_json1_1UpdateDirectorySetupRequest - */ -const se_UpdateDirectorySetupRequest = (input: UpdateDirectorySetupRequest, context: __SerdeContext): any => { - return { - ...(input.CreateSnapshotBeforeUpdate != null && { CreateSnapshotBeforeUpdate: input.CreateSnapshotBeforeUpdate }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.OSUpdateSettings != null && { OSUpdateSettings: se_OSUpdateSettings(input.OSUpdateSettings, context) }), - ...(input.UpdateType != null && { UpdateType: input.UpdateType }), - }; -}; +// se_TrustIds omitted. -/** - * serializeAws_json1_1UpdateNumberOfDomainControllersRequest - */ -const se_UpdateNumberOfDomainControllersRequest = ( - input: UpdateNumberOfDomainControllersRequest, - context: __SerdeContext -): any => { - return { - ...(input.DesiredNumber != null && { DesiredNumber: input.DesiredNumber }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_UnshareDirectoryRequest omitted. -/** - * serializeAws_json1_1UpdateRadiusRequest - */ -const se_UpdateRadiusRequest = (input: UpdateRadiusRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RadiusSettings != null && { RadiusSettings: se_RadiusSettings(input.RadiusSettings, context) }), - }; -}; +// se_UnshareTarget omitted. -/** - * serializeAws_json1_1UpdateSettingsRequest - */ -const se_UpdateSettingsRequest = (input: UpdateSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Settings != null && { Settings: se_Settings(input.Settings, context) }), - }; -}; +// se_UpdateConditionalForwarderRequest omitted. -/** - * serializeAws_json1_1UpdateTrustRequest - */ -const se_UpdateTrustRequest = (input: UpdateTrustRequest, context: __SerdeContext): any => { - return { - ...(input.SelectiveAuth != null && { SelectiveAuth: input.SelectiveAuth }), - ...(input.TrustId != null && { TrustId: input.TrustId }), - }; -}; +// se_UpdateDirectorySetupRequest omitted. -/** - * serializeAws_json1_1VerifyTrustRequest - */ -const se_VerifyTrustRequest = (input: VerifyTrustRequest, context: __SerdeContext): any => { - return { - ...(input.TrustId != null && { TrustId: input.TrustId }), - }; -}; +// se_UpdateNumberOfDomainControllersRequest omitted. -/** - * deserializeAws_json1_1AcceptSharedDirectoryResult - */ -const de_AcceptSharedDirectoryResult = (output: any, context: __SerdeContext): AcceptSharedDirectoryResult => { - return { - SharedDirectory: output.SharedDirectory != null ? de_SharedDirectory(output.SharedDirectory, context) : undefined, - } as any; -}; +// se_UpdateRadiusRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// se_UpdateSettingsRequest omitted. -/** - * deserializeAws_json1_1AddIpRoutesResult - */ -const de_AddIpRoutesResult = (output: any, context: __SerdeContext): AddIpRoutesResult => { - return {} as any; -}; +// se_UpdateTrustRequest omitted. -/** - * deserializeAws_json1_1AdditionalRegions - */ -const de_AdditionalRegions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_VerifyTrustRequest omitted. /** - * deserializeAws_json1_1AddRegionResult + * deserializeAws_json1_1AcceptSharedDirectoryResult */ -const de_AddRegionResult = (output: any, context: __SerdeContext): AddRegionResult => { - return {} as any; +const de_AcceptSharedDirectoryResult = (output: any, context: __SerdeContext): AcceptSharedDirectoryResult => { + return take(output, { + SharedDirectory: (_: any) => de_SharedDirectory(_, context), + }) as any; }; -/** - * deserializeAws_json1_1AddTagsToResourceResult - */ -const de_AddTagsToResourceResult = (output: any, context: __SerdeContext): AddTagsToResourceResult => { - return {} as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_AddIpRoutesResult omitted. -/** - * deserializeAws_json1_1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; -}; +// de_AdditionalRegions omitted. -/** - * deserializeAws_json1_1AuthenticationFailedException - */ -const de_AuthenticationFailedException = (output: any, context: __SerdeContext): AuthenticationFailedException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_AddRegionResult omitted. -/** - * deserializeAws_json1_1AvailabilityZones - */ -const de_AvailabilityZones = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AddTagsToResourceResult omitted. -/** - * deserializeAws_json1_1CancelSchemaExtensionResult - */ -const de_CancelSchemaExtensionResult = (output: any, context: __SerdeContext): CancelSchemaExtensionResult => { - return {} as any; -}; +// de_Attribute omitted. + +// de_Attributes omitted. + +// de_AuthenticationFailedException omitted. + +// de_AvailabilityZones omitted. + +// de_CancelSchemaExtensionResult omitted. /** * deserializeAws_json1_1Certificate */ const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - CertificateId: __expectString(output.CertificateId), - ClientCertAuthSettings: - output.ClientCertAuthSettings != null - ? de_ClientCertAuthSettings(output.ClientCertAuthSettings, context) - : undefined, - CommonName: __expectString(output.CommonName), - ExpiryDateTime: - output.ExpiryDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiryDateTime))) - : undefined, - RegisteredDateTime: - output.RegisteredDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RegisteredDateTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1CertificateAlreadyExistsException - */ -const de_CertificateAlreadyExistsException = ( - output: any, - context: __SerdeContext -): CertificateAlreadyExistsException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; + return take(output, { + CertificateId: __expectString, + ClientCertAuthSettings: _json, + CommonName: __expectString, + ExpiryDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RegisteredDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1CertificateDoesNotExistException - */ -const de_CertificateDoesNotExistException = ( - output: any, - context: __SerdeContext -): CertificateDoesNotExistException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_CertificateAlreadyExistsException omitted. + +// de_CertificateDoesNotExistException omitted. /** * deserializeAws_json1_1CertificateInfo */ const de_CertificateInfo = (output: any, context: __SerdeContext): CertificateInfo => { - return { - CertificateId: __expectString(output.CertificateId), - CommonName: __expectString(output.CommonName), - ExpiryDateTime: - output.ExpiryDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiryDateTime))) - : undefined, - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; + return take(output, { + CertificateId: __expectString, + CommonName: __expectString, + ExpiryDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1CertificateInUseException - */ -const de_CertificateInUseException = (output: any, context: __SerdeContext): CertificateInUseException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_CertificateInUseException omitted. -/** - * deserializeAws_json1_1CertificateLimitExceededException - */ -const de_CertificateLimitExceededException = ( - output: any, - context: __SerdeContext -): CertificateLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_CertificateLimitExceededException omitted. /** * deserializeAws_json1_1CertificatesInfo @@ -7159,9 +6044,6 @@ const de_CertificatesInfo = (output: any, context: __SerdeContext): CertificateI const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CertificateInfo(entry, context); }); return retVal; @@ -7171,14 +6053,11 @@ const de_CertificatesInfo = (output: any, context: __SerdeContext): CertificateI * deserializeAws_json1_1ClientAuthenticationSettingInfo */ const de_ClientAuthenticationSettingInfo = (output: any, context: __SerdeContext): ClientAuthenticationSettingInfo => { - return { - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Type: __expectString, + }) as any; }; /** @@ -7191,217 +6070,60 @@ const de_ClientAuthenticationSettingsInfo = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ClientAuthenticationSettingInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ClientCertAuthSettings - */ -const de_ClientCertAuthSettings = (output: any, context: __SerdeContext): ClientCertAuthSettings => { - return { - OCSPUrl: __expectString(output.OCSPUrl), - } as any; -}; +// de_ClientCertAuthSettings omitted. -/** - * deserializeAws_json1_1ClientException - */ -const de_ClientException = (output: any, context: __SerdeContext): ClientException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_ClientException omitted. -/** - * deserializeAws_json1_1Computer - */ -const de_Computer = (output: any, context: __SerdeContext): Computer => { - return { - ComputerAttributes: - output.ComputerAttributes != null ? de_Attributes(output.ComputerAttributes, context) : undefined, - ComputerId: __expectString(output.ComputerId), - ComputerName: __expectString(output.ComputerName), - } as any; -}; +// de_Computer omitted. -/** - * deserializeAws_json1_1ConditionalForwarder - */ -const de_ConditionalForwarder = (output: any, context: __SerdeContext): ConditionalForwarder => { - return { - DnsIpAddrs: output.DnsIpAddrs != null ? de_DnsIpAddrs(output.DnsIpAddrs, context) : undefined, - RemoteDomainName: __expectString(output.RemoteDomainName), - ReplicationScope: __expectString(output.ReplicationScope), - } as any; -}; +// de_ConditionalForwarder omitted. -/** - * deserializeAws_json1_1ConditionalForwarders - */ -const de_ConditionalForwarders = (output: any, context: __SerdeContext): ConditionalForwarder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConditionalForwarder(entry, context); - }); - return retVal; -}; +// de_ConditionalForwarders omitted. -/** - * deserializeAws_json1_1ConnectDirectoryResult - */ -const de_ConnectDirectoryResult = (output: any, context: __SerdeContext): ConnectDirectoryResult => { - return { - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_ConnectDirectoryResult omitted. -/** - * deserializeAws_json1_1CreateAliasResult - */ -const de_CreateAliasResult = (output: any, context: __SerdeContext): CreateAliasResult => { - return { - Alias: __expectString(output.Alias), - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_CreateAliasResult omitted. -/** - * deserializeAws_json1_1CreateComputerResult - */ -const de_CreateComputerResult = (output: any, context: __SerdeContext): CreateComputerResult => { - return { - Computer: output.Computer != null ? de_Computer(output.Computer, context) : undefined, - } as any; -}; +// de_CreateComputerResult omitted. -/** - * deserializeAws_json1_1CreateConditionalForwarderResult - */ -const de_CreateConditionalForwarderResult = ( - output: any, - context: __SerdeContext -): CreateConditionalForwarderResult => { - return {} as any; -}; +// de_CreateConditionalForwarderResult omitted. -/** - * deserializeAws_json1_1CreateDirectoryResult - */ -const de_CreateDirectoryResult = (output: any, context: __SerdeContext): CreateDirectoryResult => { - return { - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_CreateDirectoryResult omitted. -/** - * deserializeAws_json1_1CreateLogSubscriptionResult - */ -const de_CreateLogSubscriptionResult = (output: any, context: __SerdeContext): CreateLogSubscriptionResult => { - return {} as any; -}; +// de_CreateLogSubscriptionResult omitted. -/** - * deserializeAws_json1_1CreateMicrosoftADResult - */ -const de_CreateMicrosoftADResult = (output: any, context: __SerdeContext): CreateMicrosoftADResult => { - return { - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_CreateMicrosoftADResult omitted. -/** - * deserializeAws_json1_1CreateSnapshotResult - */ -const de_CreateSnapshotResult = (output: any, context: __SerdeContext): CreateSnapshotResult => { - return { - SnapshotId: __expectString(output.SnapshotId), - } as any; -}; +// de_CreateSnapshotResult omitted. -/** - * deserializeAws_json1_1CreateTrustResult - */ -const de_CreateTrustResult = (output: any, context: __SerdeContext): CreateTrustResult => { - return { - TrustId: __expectString(output.TrustId), - } as any; -}; +// de_CreateTrustResult omitted. -/** - * deserializeAws_json1_1DeleteConditionalForwarderResult - */ -const de_DeleteConditionalForwarderResult = ( - output: any, - context: __SerdeContext -): DeleteConditionalForwarderResult => { - return {} as any; -}; +// de_DeleteConditionalForwarderResult omitted. -/** - * deserializeAws_json1_1DeleteDirectoryResult - */ -const de_DeleteDirectoryResult = (output: any, context: __SerdeContext): DeleteDirectoryResult => { - return { - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_DeleteDirectoryResult omitted. -/** - * deserializeAws_json1_1DeleteLogSubscriptionResult - */ -const de_DeleteLogSubscriptionResult = (output: any, context: __SerdeContext): DeleteLogSubscriptionResult => { - return {} as any; -}; +// de_DeleteLogSubscriptionResult omitted. -/** - * deserializeAws_json1_1DeleteSnapshotResult - */ -const de_DeleteSnapshotResult = (output: any, context: __SerdeContext): DeleteSnapshotResult => { - return { - SnapshotId: __expectString(output.SnapshotId), - } as any; -}; +// de_DeleteSnapshotResult omitted. -/** - * deserializeAws_json1_1DeleteTrustResult - */ -const de_DeleteTrustResult = (output: any, context: __SerdeContext): DeleteTrustResult => { - return { - TrustId: __expectString(output.TrustId), - } as any; -}; +// de_DeleteTrustResult omitted. -/** - * deserializeAws_json1_1DeregisterCertificateResult - */ -const de_DeregisterCertificateResult = (output: any, context: __SerdeContext): DeregisterCertificateResult => { - return {} as any; -}; +// de_DeregisterCertificateResult omitted. -/** - * deserializeAws_json1_1DeregisterEventTopicResult - */ -const de_DeregisterEventTopicResult = (output: any, context: __SerdeContext): DeregisterEventTopicResult => { - return {} as any; -}; +// de_DeregisterEventTopicResult omitted. /** * deserializeAws_json1_1DescribeCertificateResult */ const de_DescribeCertificateResult = (output: any, context: __SerdeContext): DescribeCertificateResult => { - return { - Certificate: output.Certificate != null ? de_Certificate(output.Certificate, context) : undefined, - } as any; + return take(output, { + Certificate: (_: any) => de_Certificate(_, context), + }) as any; }; /** @@ -7411,241 +6133,154 @@ const de_DescribeClientAuthenticationSettingsResult = ( output: any, context: __SerdeContext ): DescribeClientAuthenticationSettingsResult => { - return { - ClientAuthenticationSettingsInfo: - output.ClientAuthenticationSettingsInfo != null - ? de_ClientAuthenticationSettingsInfo(output.ClientAuthenticationSettingsInfo, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ClientAuthenticationSettingsInfo: (_: any) => de_ClientAuthenticationSettingsInfo(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeConditionalForwardersResult - */ -const de_DescribeConditionalForwardersResult = ( - output: any, - context: __SerdeContext -): DescribeConditionalForwardersResult => { - return { - ConditionalForwarders: - output.ConditionalForwarders != null - ? de_ConditionalForwarders(output.ConditionalForwarders, context) - : undefined, - } as any; -}; +// de_DescribeConditionalForwardersResult omitted. /** * deserializeAws_json1_1DescribeDirectoriesResult */ const de_DescribeDirectoriesResult = (output: any, context: __SerdeContext): DescribeDirectoriesResult => { - return { - DirectoryDescriptions: - output.DirectoryDescriptions != null - ? de_DirectoryDescriptions(output.DirectoryDescriptions, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DirectoryDescriptions: (_: any) => de_DirectoryDescriptions(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeDomainControllersResult */ const de_DescribeDomainControllersResult = (output: any, context: __SerdeContext): DescribeDomainControllersResult => { - return { - DomainControllers: - output.DomainControllers != null ? de_DomainControllers(output.DomainControllers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DomainControllers: (_: any) => de_DomainControllers(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeEventTopicsResult */ const de_DescribeEventTopicsResult = (output: any, context: __SerdeContext): DescribeEventTopicsResult => { - return { - EventTopics: output.EventTopics != null ? de_EventTopics(output.EventTopics, context) : undefined, - } as any; + return take(output, { + EventTopics: (_: any) => de_EventTopics(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeLDAPSSettingsResult */ const de_DescribeLDAPSSettingsResult = (output: any, context: __SerdeContext): DescribeLDAPSSettingsResult => { - return { - LDAPSSettingsInfo: - output.LDAPSSettingsInfo != null ? de_LDAPSSettingsInfo(output.LDAPSSettingsInfo, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + LDAPSSettingsInfo: (_: any) => de_LDAPSSettingsInfo(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeRegionsResult */ const de_DescribeRegionsResult = (output: any, context: __SerdeContext): DescribeRegionsResult => { - return { - NextToken: __expectString(output.NextToken), - RegionsDescription: - output.RegionsDescription != null ? de_RegionsDescription(output.RegionsDescription, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RegionsDescription: (_: any) => de_RegionsDescription(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSettingsResult */ const de_DescribeSettingsResult = (output: any, context: __SerdeContext): DescribeSettingsResult => { - return { - DirectoryId: __expectString(output.DirectoryId), - NextToken: __expectString(output.NextToken), - SettingEntries: output.SettingEntries != null ? de_SettingEntries(output.SettingEntries, context) : undefined, - } as any; + return take(output, { + DirectoryId: __expectString, + NextToken: __expectString, + SettingEntries: (_: any) => de_SettingEntries(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSharedDirectoriesResult */ const de_DescribeSharedDirectoriesResult = (output: any, context: __SerdeContext): DescribeSharedDirectoriesResult => { - return { - NextToken: __expectString(output.NextToken), - SharedDirectories: - output.SharedDirectories != null ? de_SharedDirectories(output.SharedDirectories, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SharedDirectories: (_: any) => de_SharedDirectories(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSnapshotsResult */ const de_DescribeSnapshotsResult = (output: any, context: __SerdeContext): DescribeSnapshotsResult => { - return { - NextToken: __expectString(output.NextToken), - Snapshots: output.Snapshots != null ? de_Snapshots(output.Snapshots, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Snapshots: (_: any) => de_Snapshots(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeTrustsResult */ const de_DescribeTrustsResult = (output: any, context: __SerdeContext): DescribeTrustsResult => { - return { - NextToken: __expectString(output.NextToken), - Trusts: output.Trusts != null ? de_Trusts(output.Trusts, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Trusts: (_: any) => de_Trusts(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeUpdateDirectoryResult */ const de_DescribeUpdateDirectoryResult = (output: any, context: __SerdeContext): DescribeUpdateDirectoryResult => { - return { - NextToken: __expectString(output.NextToken), - UpdateActivities: - output.UpdateActivities != null ? de_UpdateActivities(output.UpdateActivities, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + UpdateActivities: (_: any) => de_UpdateActivities(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DirectoryAlreadyInRegionException - */ -const de_DirectoryAlreadyInRegionException = ( - output: any, - context: __SerdeContext -): DirectoryAlreadyInRegionException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryAlreadyInRegionException omitted. -/** - * deserializeAws_json1_1DirectoryAlreadySharedException - */ -const de_DirectoryAlreadySharedException = (output: any, context: __SerdeContext): DirectoryAlreadySharedException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryAlreadySharedException omitted. -/** - * deserializeAws_json1_1DirectoryConfigurationSettingRequestDetailedStatus - */ -const de_DirectoryConfigurationSettingRequestDetailedStatus = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_DirectoryConfigurationSettingRequestDetailedStatus omitted. -/** - * deserializeAws_json1_1DirectoryConnectSettingsDescription - */ -const de_DirectoryConnectSettingsDescription = ( - output: any, - context: __SerdeContext -): DirectoryConnectSettingsDescription => { - return { - AvailabilityZones: - output.AvailabilityZones != null ? de_AvailabilityZones(output.AvailabilityZones, context) : undefined, - ConnectIps: output.ConnectIps != null ? de_IpAddrs(output.ConnectIps, context) : undefined, - CustomerUserName: __expectString(output.CustomerUserName), - SecurityGroupId: __expectString(output.SecurityGroupId), - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_DirectoryConnectSettingsDescription omitted. /** * deserializeAws_json1_1DirectoryDescription */ const de_DirectoryDescription = (output: any, context: __SerdeContext): DirectoryDescription => { - return { - AccessUrl: __expectString(output.AccessUrl), - Alias: __expectString(output.Alias), - ConnectSettings: - output.ConnectSettings != null - ? de_DirectoryConnectSettingsDescription(output.ConnectSettings, context) - : undefined, - Description: __expectString(output.Description), - DesiredNumberOfDomainControllers: __expectInt32(output.DesiredNumberOfDomainControllers), - DirectoryId: __expectString(output.DirectoryId), - DnsIpAddrs: output.DnsIpAddrs != null ? de_DnsIpAddrs(output.DnsIpAddrs, context) : undefined, - Edition: __expectString(output.Edition), - LaunchTime: - output.LaunchTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LaunchTime))) : undefined, - Name: __expectString(output.Name), - OsVersion: __expectString(output.OsVersion), - OwnerDirectoryDescription: - output.OwnerDirectoryDescription != null - ? de_OwnerDirectoryDescription(output.OwnerDirectoryDescription, context) - : undefined, - RadiusSettings: output.RadiusSettings != null ? de_RadiusSettings(output.RadiusSettings, context) : undefined, - RadiusStatus: __expectString(output.RadiusStatus), - RegionsInfo: output.RegionsInfo != null ? de_RegionsInfo(output.RegionsInfo, context) : undefined, - ShareMethod: __expectString(output.ShareMethod), - ShareNotes: __expectString(output.ShareNotes), - ShareStatus: __expectString(output.ShareStatus), - ShortName: __expectString(output.ShortName), - Size: __expectString(output.Size), - SsoEnabled: __expectBoolean(output.SsoEnabled), - Stage: __expectString(output.Stage), - StageLastUpdatedDateTime: - output.StageLastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StageLastUpdatedDateTime))) - : undefined, - StageReason: __expectString(output.StageReason), - Type: __expectString(output.Type), - VpcSettings: - output.VpcSettings != null ? de_DirectoryVpcSettingsDescription(output.VpcSettings, context) : undefined, - } as any; + return take(output, { + AccessUrl: __expectString, + Alias: __expectString, + ConnectSettings: _json, + Description: __expectString, + DesiredNumberOfDomainControllers: __expectInt32, + DirectoryId: __expectString, + DnsIpAddrs: _json, + Edition: __expectString, + LaunchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OsVersion: __expectString, + OwnerDirectoryDescription: _json, + RadiusSettings: _json, + RadiusStatus: __expectString, + RegionsInfo: _json, + ShareMethod: __expectString, + ShareNotes: __expectString, + ShareStatus: __expectString, + ShortName: __expectString, + Size: __expectString, + SsoEnabled: __expectBoolean, + Stage: __expectString, + StageLastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StageReason: __expectString, + Type: __expectString, + VpcSettings: _json, + }) as any; }; /** @@ -7655,188 +6290,57 @@ const de_DirectoryDescriptions = (output: any, context: __SerdeContext): Directo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DirectoryDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DirectoryDoesNotExistException - */ -const de_DirectoryDoesNotExistException = (output: any, context: __SerdeContext): DirectoryDoesNotExistException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryDoesNotExistException omitted. -/** - * deserializeAws_json1_1DirectoryInDesiredStateException - */ -const de_DirectoryInDesiredStateException = ( - output: any, - context: __SerdeContext -): DirectoryInDesiredStateException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryInDesiredStateException omitted. -/** - * deserializeAws_json1_1DirectoryLimitExceededException - */ -const de_DirectoryLimitExceededException = (output: any, context: __SerdeContext): DirectoryLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryLimitExceededException omitted. -/** - * deserializeAws_json1_1DirectoryLimits - */ -const de_DirectoryLimits = (output: any, context: __SerdeContext): DirectoryLimits => { - return { - CloudOnlyDirectoriesCurrentCount: __expectInt32(output.CloudOnlyDirectoriesCurrentCount), - CloudOnlyDirectoriesLimit: __expectInt32(output.CloudOnlyDirectoriesLimit), - CloudOnlyDirectoriesLimitReached: __expectBoolean(output.CloudOnlyDirectoriesLimitReached), - CloudOnlyMicrosoftADCurrentCount: __expectInt32(output.CloudOnlyMicrosoftADCurrentCount), - CloudOnlyMicrosoftADLimit: __expectInt32(output.CloudOnlyMicrosoftADLimit), - CloudOnlyMicrosoftADLimitReached: __expectBoolean(output.CloudOnlyMicrosoftADLimitReached), - ConnectedDirectoriesCurrentCount: __expectInt32(output.ConnectedDirectoriesCurrentCount), - ConnectedDirectoriesLimit: __expectInt32(output.ConnectedDirectoriesLimit), - ConnectedDirectoriesLimitReached: __expectBoolean(output.ConnectedDirectoriesLimitReached), - } as any; -}; +// de_DirectoryLimits omitted. -/** - * deserializeAws_json1_1DirectoryNotSharedException - */ -const de_DirectoryNotSharedException = (output: any, context: __SerdeContext): DirectoryNotSharedException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryNotSharedException omitted. -/** - * deserializeAws_json1_1DirectoryUnavailableException - */ -const de_DirectoryUnavailableException = (output: any, context: __SerdeContext): DirectoryUnavailableException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_DirectoryUnavailableException omitted. -/** - * deserializeAws_json1_1DirectoryVpcSettings - */ -const de_DirectoryVpcSettings = (output: any, context: __SerdeContext): DirectoryVpcSettings => { - return { - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_DirectoryVpcSettings omitted. -/** - * deserializeAws_json1_1DirectoryVpcSettingsDescription - */ -const de_DirectoryVpcSettingsDescription = (output: any, context: __SerdeContext): DirectoryVpcSettingsDescription => { - return { - AvailabilityZones: - output.AvailabilityZones != null ? de_AvailabilityZones(output.AvailabilityZones, context) : undefined, - SecurityGroupId: __expectString(output.SecurityGroupId), - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_DirectoryVpcSettingsDescription omitted. -/** - * deserializeAws_json1_1DisableClientAuthenticationResult - */ -const de_DisableClientAuthenticationResult = ( - output: any, - context: __SerdeContext -): DisableClientAuthenticationResult => { - return {} as any; -}; +// de_DisableClientAuthenticationResult omitted. -/** - * deserializeAws_json1_1DisableLDAPSResult - */ -const de_DisableLDAPSResult = (output: any, context: __SerdeContext): DisableLDAPSResult => { - return {} as any; -}; +// de_DisableLDAPSResult omitted. -/** - * deserializeAws_json1_1DisableRadiusResult - */ -const de_DisableRadiusResult = (output: any, context: __SerdeContext): DisableRadiusResult => { - return {} as any; -}; +// de_DisableRadiusResult omitted. -/** - * deserializeAws_json1_1DisableSsoResult - */ -const de_DisableSsoResult = (output: any, context: __SerdeContext): DisableSsoResult => { - return {} as any; -}; +// de_DisableSsoResult omitted. -/** - * deserializeAws_json1_1DnsIpAddrs - */ -const de_DnsIpAddrs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DnsIpAddrs omitted. /** * deserializeAws_json1_1DomainController */ const de_DomainController = (output: any, context: __SerdeContext): DomainController => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - DirectoryId: __expectString(output.DirectoryId), - DnsIpAddr: __expectString(output.DnsIpAddr), - DomainControllerId: __expectString(output.DomainControllerId), - LaunchTime: - output.LaunchTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LaunchTime))) : undefined, - Status: __expectString(output.Status), - StatusLastUpdatedDateTime: - output.StatusLastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StatusLastUpdatedDateTime))) - : undefined, - StatusReason: __expectString(output.StatusReason), - SubnetId: __expectString(output.SubnetId), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1DomainControllerLimitExceededException - */ -const de_DomainControllerLimitExceededException = ( - output: any, - context: __SerdeContext -): DomainControllerLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; + return take(output, { + AvailabilityZone: __expectString, + DirectoryId: __expectString, + DnsIpAddr: __expectString, + DomainControllerId: __expectString, + LaunchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusLastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StatusReason: __expectString, + SubnetId: __expectString, + VpcId: __expectString, + }) as any; }; +// de_DomainControllerLimitExceededException omitted. + /** * deserializeAws_json1_1DomainControllers */ @@ -7844,79 +6348,34 @@ const de_DomainControllers = (output: any, context: __SerdeContext): DomainContr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainController(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1EnableClientAuthenticationResult - */ -const de_EnableClientAuthenticationResult = ( - output: any, - context: __SerdeContext -): EnableClientAuthenticationResult => { - return {} as any; -}; +// de_EnableClientAuthenticationResult omitted. -/** - * deserializeAws_json1_1EnableLDAPSResult - */ -const de_EnableLDAPSResult = (output: any, context: __SerdeContext): EnableLDAPSResult => { - return {} as any; -}; +// de_EnableLDAPSResult omitted. -/** - * deserializeAws_json1_1EnableRadiusResult - */ -const de_EnableRadiusResult = (output: any, context: __SerdeContext): EnableRadiusResult => { - return {} as any; -}; +// de_EnableRadiusResult omitted. -/** - * deserializeAws_json1_1EnableSsoResult - */ -const de_EnableSsoResult = (output: any, context: __SerdeContext): EnableSsoResult => { - return {} as any; -}; +// de_EnableSsoResult omitted. -/** - * deserializeAws_json1_1EntityAlreadyExistsException - */ -const de_EntityAlreadyExistsException = (output: any, context: __SerdeContext): EntityAlreadyExistsException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_EntityAlreadyExistsException omitted. -/** - * deserializeAws_json1_1EntityDoesNotExistException - */ -const de_EntityDoesNotExistException = (output: any, context: __SerdeContext): EntityDoesNotExistException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_EntityDoesNotExistException omitted. /** * deserializeAws_json1_1EventTopic */ const de_EventTopic = (output: any, context: __SerdeContext): EventTopic => { - return { - CreatedDateTime: - output.CreatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDateTime))) - : undefined, - DirectoryId: __expectString(output.DirectoryId), - Status: __expectString(output.Status), - TopicArn: __expectString(output.TopicArn), - TopicName: __expectString(output.TopicName), - } as any; + return take(output, { + CreatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DirectoryId: __expectString, + Status: __expectString, + TopicArn: __expectString, + TopicName: __expectString, + }) as any; }; /** @@ -7926,169 +6385,50 @@ const de_EventTopics = (output: any, context: __SerdeContext): EventTopic[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventTopic(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1GetDirectoryLimitsResult - */ -const de_GetDirectoryLimitsResult = (output: any, context: __SerdeContext): GetDirectoryLimitsResult => { - return { - DirectoryLimits: output.DirectoryLimits != null ? de_DirectoryLimits(output.DirectoryLimits, context) : undefined, - } as any; -}; +// de_GetDirectoryLimitsResult omitted. -/** - * deserializeAws_json1_1GetSnapshotLimitsResult - */ -const de_GetSnapshotLimitsResult = (output: any, context: __SerdeContext): GetSnapshotLimitsResult => { - return { - SnapshotLimits: output.SnapshotLimits != null ? de_SnapshotLimits(output.SnapshotLimits, context) : undefined, - } as any; -}; +// de_GetSnapshotLimitsResult omitted. -/** - * deserializeAws_json1_1IncompatibleSettingsException - */ -const de_IncompatibleSettingsException = (output: any, context: __SerdeContext): IncompatibleSettingsException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_IncompatibleSettingsException omitted. -/** - * deserializeAws_json1_1InsufficientPermissionsException - */ -const de_InsufficientPermissionsException = ( - output: any, - context: __SerdeContext -): InsufficientPermissionsException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InsufficientPermissionsException omitted. -/** - * deserializeAws_json1_1InvalidCertificateException - */ -const de_InvalidCertificateException = (output: any, context: __SerdeContext): InvalidCertificateException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidCertificateException omitted. -/** - * deserializeAws_json1_1InvalidClientAuthStatusException - */ -const de_InvalidClientAuthStatusException = ( - output: any, - context: __SerdeContext -): InvalidClientAuthStatusException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidClientAuthStatusException omitted. -/** - * deserializeAws_json1_1InvalidLDAPSStatusException - */ -const de_InvalidLDAPSStatusException = (output: any, context: __SerdeContext): InvalidLDAPSStatusException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidLDAPSStatusException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidPasswordException - */ -const de_InvalidPasswordException = (output: any, context: __SerdeContext): InvalidPasswordException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidPasswordException omitted. -/** - * deserializeAws_json1_1InvalidTargetException - */ -const de_InvalidTargetException = (output: any, context: __SerdeContext): InvalidTargetException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_InvalidTargetException omitted. -/** - * deserializeAws_json1_1IpAddrs - */ -const de_IpAddrs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpAddrs omitted. /** * deserializeAws_json1_1IpRouteInfo */ const de_IpRouteInfo = (output: any, context: __SerdeContext): IpRouteInfo => { - return { - AddedDateTime: - output.AddedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AddedDateTime))) - : undefined, - CidrIp: __expectString(output.CidrIp), - Description: __expectString(output.Description), - DirectoryId: __expectString(output.DirectoryId), - IpRouteStatusMsg: __expectString(output.IpRouteStatusMsg), - IpRouteStatusReason: __expectString(output.IpRouteStatusReason), - } as any; + return take(output, { + AddedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CidrIp: __expectString, + Description: __expectString, + DirectoryId: __expectString, + IpRouteStatusMsg: __expectString, + IpRouteStatusReason: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1IpRouteLimitExceededException - */ -const de_IpRouteLimitExceededException = (output: any, context: __SerdeContext): IpRouteLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_IpRouteLimitExceededException omitted. /** * deserializeAws_json1_1IpRoutesInfo @@ -8097,9 +6437,6 @@ const de_IpRoutesInfo = (output: any, context: __SerdeContext): IpRouteInfo[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IpRouteInfo(entry, context); }); return retVal; @@ -8109,14 +6446,11 @@ const de_IpRoutesInfo = (output: any, context: __SerdeContext): IpRouteInfo[] => * deserializeAws_json1_1LDAPSSettingInfo */ const de_LDAPSSettingInfo = (output: any, context: __SerdeContext): LDAPSSettingInfo => { - return { - LDAPSStatus: __expectString(output.LDAPSStatus), - LDAPSStatusReason: __expectString(output.LDAPSStatusReason), - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - } as any; + return take(output, { + LDAPSStatus: __expectString, + LDAPSStatusReason: __expectString, + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -8126,9 +6460,6 @@ const de_LDAPSSettingsInfo = (output: any, context: __SerdeContext): LDAPSSettin const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LDAPSSettingInfo(entry, context); }); return retVal; @@ -8138,67 +6469,53 @@ const de_LDAPSSettingsInfo = (output: any, context: __SerdeContext): LDAPSSettin * deserializeAws_json1_1ListCertificatesResult */ const de_ListCertificatesResult = (output: any, context: __SerdeContext): ListCertificatesResult => { - return { - CertificatesInfo: - output.CertificatesInfo != null ? de_CertificatesInfo(output.CertificatesInfo, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + CertificatesInfo: (_: any) => de_CertificatesInfo(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListIpRoutesResult */ const de_ListIpRoutesResult = (output: any, context: __SerdeContext): ListIpRoutesResult => { - return { - IpRoutesInfo: output.IpRoutesInfo != null ? de_IpRoutesInfo(output.IpRoutesInfo, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + IpRoutesInfo: (_: any) => de_IpRoutesInfo(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListLogSubscriptionsResult */ const de_ListLogSubscriptionsResult = (output: any, context: __SerdeContext): ListLogSubscriptionsResult => { - return { - LogSubscriptions: - output.LogSubscriptions != null ? de_LogSubscriptions(output.LogSubscriptions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + LogSubscriptions: (_: any) => de_LogSubscriptions(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListSchemaExtensionsResult */ const de_ListSchemaExtensionsResult = (output: any, context: __SerdeContext): ListSchemaExtensionsResult => { - return { - NextToken: __expectString(output.NextToken), - SchemaExtensionsInfo: - output.SchemaExtensionsInfo != null ? de_SchemaExtensionsInfo(output.SchemaExtensionsInfo, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SchemaExtensionsInfo: (_: any) => de_SchemaExtensionsInfo(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResult - */ -const de_ListTagsForResourceResult = (output: any, context: __SerdeContext): ListTagsForResourceResult => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResult omitted. /** * deserializeAws_json1_1LogSubscription */ const de_LogSubscription = (output: any, context: __SerdeContext): LogSubscription => { - return { - DirectoryId: __expectString(output.DirectoryId), - LogGroupName: __expectString(output.LogGroupName), - SubscriptionCreatedDateTime: - output.SubscriptionCreatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubscriptionCreatedDateTime))) - : undefined, - } as any; + return take(output, { + DirectoryId: __expectString, + LogGroupName: __expectString, + SubscriptionCreatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -8208,108 +6525,40 @@ const de_LogSubscriptions = (output: any, context: __SerdeContext): LogSubscript const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LogSubscription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NoAvailableCertificateException - */ -const de_NoAvailableCertificateException = (output: any, context: __SerdeContext): NoAvailableCertificateException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_NoAvailableCertificateException omitted. -/** - * deserializeAws_json1_1OrganizationsException - */ -const de_OrganizationsException = (output: any, context: __SerdeContext): OrganizationsException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_OrganizationsException omitted. -/** - * deserializeAws_json1_1OSUpdateSettings - */ -const de_OSUpdateSettings = (output: any, context: __SerdeContext): OSUpdateSettings => { - return { - OSVersion: __expectString(output.OSVersion), - } as any; -}; +// de_OSUpdateSettings omitted. -/** - * deserializeAws_json1_1OwnerDirectoryDescription - */ -const de_OwnerDirectoryDescription = (output: any, context: __SerdeContext): OwnerDirectoryDescription => { - return { - AccountId: __expectString(output.AccountId), - DirectoryId: __expectString(output.DirectoryId), - DnsIpAddrs: output.DnsIpAddrs != null ? de_DnsIpAddrs(output.DnsIpAddrs, context) : undefined, - RadiusSettings: output.RadiusSettings != null ? de_RadiusSettings(output.RadiusSettings, context) : undefined, - RadiusStatus: __expectString(output.RadiusStatus), - VpcSettings: - output.VpcSettings != null ? de_DirectoryVpcSettingsDescription(output.VpcSettings, context) : undefined, - } as any; -}; +// de_OwnerDirectoryDescription omitted. -/** - * deserializeAws_json1_1RadiusSettings - */ -const de_RadiusSettings = (output: any, context: __SerdeContext): RadiusSettings => { - return { - AuthenticationProtocol: __expectString(output.AuthenticationProtocol), - DisplayLabel: __expectString(output.DisplayLabel), - RadiusPort: __expectInt32(output.RadiusPort), - RadiusRetries: __expectInt32(output.RadiusRetries), - RadiusServers: output.RadiusServers != null ? de_Servers(output.RadiusServers, context) : undefined, - RadiusTimeout: __expectInt32(output.RadiusTimeout), - SharedSecret: __expectString(output.SharedSecret), - UseSameUsername: __expectBoolean(output.UseSameUsername), - } as any; -}; +// de_RadiusSettings omitted. /** * deserializeAws_json1_1RegionDescription */ const de_RegionDescription = (output: any, context: __SerdeContext): RegionDescription => { - return { - DesiredNumberOfDomainControllers: __expectInt32(output.DesiredNumberOfDomainControllers), - DirectoryId: __expectString(output.DirectoryId), - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - LaunchTime: - output.LaunchTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LaunchTime))) : undefined, - RegionName: __expectString(output.RegionName), - RegionType: __expectString(output.RegionType), - Status: __expectString(output.Status), - StatusLastUpdatedDateTime: - output.StatusLastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StatusLastUpdatedDateTime))) - : undefined, - VpcSettings: output.VpcSettings != null ? de_DirectoryVpcSettings(output.VpcSettings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RegionLimitExceededException - */ -const de_RegionLimitExceededException = (output: any, context: __SerdeContext): RegionLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; + return take(output, { + DesiredNumberOfDomainControllers: __expectInt32, + DirectoryId: __expectString, + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LaunchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RegionName: __expectString, + RegionType: __expectString, + Status: __expectString, + StatusLastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VpcSettings: _json, + }) as any; }; +// de_RegionLimitExceededException omitted. + /** * deserializeAws_json1_1RegionsDescription */ @@ -8317,104 +6566,42 @@ const de_RegionsDescription = (output: any, context: __SerdeContext): RegionDesc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RegionDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RegionsInfo - */ -const de_RegionsInfo = (output: any, context: __SerdeContext): RegionsInfo => { - return { - AdditionalRegions: - output.AdditionalRegions != null ? de_AdditionalRegions(output.AdditionalRegions, context) : undefined, - PrimaryRegion: __expectString(output.PrimaryRegion), - } as any; -}; +// de_RegionsInfo omitted. -/** - * deserializeAws_json1_1RegisterCertificateResult - */ -const de_RegisterCertificateResult = (output: any, context: __SerdeContext): RegisterCertificateResult => { - return { - CertificateId: __expectString(output.CertificateId), - } as any; -}; +// de_RegisterCertificateResult omitted. -/** - * deserializeAws_json1_1RegisterEventTopicResult - */ -const de_RegisterEventTopicResult = (output: any, context: __SerdeContext): RegisterEventTopicResult => { - return {} as any; -}; +// de_RegisterEventTopicResult omitted. -/** - * deserializeAws_json1_1RejectSharedDirectoryResult - */ -const de_RejectSharedDirectoryResult = (output: any, context: __SerdeContext): RejectSharedDirectoryResult => { - return { - SharedDirectoryId: __expectString(output.SharedDirectoryId), - } as any; -}; +// de_RejectSharedDirectoryResult omitted. -/** - * deserializeAws_json1_1RemoveIpRoutesResult - */ -const de_RemoveIpRoutesResult = (output: any, context: __SerdeContext): RemoveIpRoutesResult => { - return {} as any; -}; +// de_RemoveIpRoutesResult omitted. -/** - * deserializeAws_json1_1RemoveRegionResult - */ -const de_RemoveRegionResult = (output: any, context: __SerdeContext): RemoveRegionResult => { - return {} as any; -}; +// de_RemoveRegionResult omitted. -/** - * deserializeAws_json1_1RemoveTagsFromResourceResult - */ -const de_RemoveTagsFromResourceResult = (output: any, context: __SerdeContext): RemoveTagsFromResourceResult => { - return {} as any; -}; +// de_RemoveTagsFromResourceResult omitted. -/** - * deserializeAws_json1_1ResetUserPasswordResult - */ -const de_ResetUserPasswordResult = (output: any, context: __SerdeContext): ResetUserPasswordResult => { - return {} as any; -}; +// de_ResetUserPasswordResult omitted. -/** - * deserializeAws_json1_1RestoreFromSnapshotResult - */ -const de_RestoreFromSnapshotResult = (output: any, context: __SerdeContext): RestoreFromSnapshotResult => { - return {} as any; -}; +// de_RestoreFromSnapshotResult omitted. /** * deserializeAws_json1_1SchemaExtensionInfo */ const de_SchemaExtensionInfo = (output: any, context: __SerdeContext): SchemaExtensionInfo => { - return { - Description: __expectString(output.Description), - DirectoryId: __expectString(output.DirectoryId), - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - SchemaExtensionId: __expectString(output.SchemaExtensionId), - SchemaExtensionStatus: __expectString(output.SchemaExtensionStatus), - SchemaExtensionStatusReason: __expectString(output.SchemaExtensionStatusReason), - StartDateTime: - output.StartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDateTime))) - : undefined, - } as any; + return take(output, { + Description: __expectString, + DirectoryId: __expectString, + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SchemaExtensionId: __expectString, + SchemaExtensionStatus: __expectString, + SchemaExtensionStatusReason: __expectString, + StartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -8424,38 +6611,14 @@ const de_SchemaExtensionsInfo = (output: any, context: __SerdeContext): SchemaEx const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SchemaExtensionInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Servers - */ -const de_Servers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Servers omitted. -/** - * deserializeAws_json1_1ServiceException - */ -const de_ServiceException = (output: any, context: __SerdeContext): ServiceException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_ServiceException omitted. /** * deserializeAws_json1_1SettingEntries @@ -8464,9 +6627,6 @@ const de_SettingEntries = (output: any, context: __SerdeContext): SettingEntry[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SettingEntry(entry, context); }); return retVal; @@ -8476,27 +6636,18 @@ const de_SettingEntries = (output: any, context: __SerdeContext): SettingEntry[] * deserializeAws_json1_1SettingEntry */ const de_SettingEntry = (output: any, context: __SerdeContext): SettingEntry => { - return { - AllowedValues: __expectString(output.AllowedValues), - AppliedValue: __expectString(output.AppliedValue), - LastRequestedDateTime: - output.LastRequestedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRequestedDateTime))) - : undefined, - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - Name: __expectString(output.Name), - RequestDetailedStatus: - output.RequestDetailedStatus != null - ? de_DirectoryConfigurationSettingRequestDetailedStatus(output.RequestDetailedStatus, context) - : undefined, - RequestStatus: __expectString(output.RequestStatus), - RequestStatusMessage: __expectString(output.RequestStatusMessage), - RequestedValue: __expectString(output.RequestedValue), - Type: __expectString(output.Type), - } as any; + return take(output, { + AllowedValues: __expectString, + AppliedValue: __expectString, + LastRequestedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RequestDetailedStatus: _json, + RequestStatus: __expectString, + RequestStatusMessage: __expectString, + RequestedValue: __expectString, + Type: __expectString, + }) as any; }; /** @@ -8506,9 +6657,6 @@ const de_SharedDirectories = (output: any, context: __SerdeContext): SharedDirec const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SharedDirectory(entry, context); }); return retVal; @@ -8518,79 +6666,40 @@ const de_SharedDirectories = (output: any, context: __SerdeContext): SharedDirec * deserializeAws_json1_1SharedDirectory */ const de_SharedDirectory = (output: any, context: __SerdeContext): SharedDirectory => { - return { - CreatedDateTime: - output.CreatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDateTime))) - : undefined, - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - OwnerAccountId: __expectString(output.OwnerAccountId), - OwnerDirectoryId: __expectString(output.OwnerDirectoryId), - ShareMethod: __expectString(output.ShareMethod), - ShareNotes: __expectString(output.ShareNotes), - ShareStatus: __expectString(output.ShareStatus), - SharedAccountId: __expectString(output.SharedAccountId), - SharedDirectoryId: __expectString(output.SharedDirectoryId), - } as any; -}; - -/** - * deserializeAws_json1_1ShareDirectoryResult - */ -const de_ShareDirectoryResult = (output: any, context: __SerdeContext): ShareDirectoryResult => { - return { - SharedDirectoryId: __expectString(output.SharedDirectoryId), - } as any; + return take(output, { + CreatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwnerAccountId: __expectString, + OwnerDirectoryId: __expectString, + ShareMethod: __expectString, + ShareNotes: __expectString, + ShareStatus: __expectString, + SharedAccountId: __expectString, + SharedDirectoryId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ShareLimitExceededException - */ -const de_ShareLimitExceededException = (output: any, context: __SerdeContext): ShareLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_ShareDirectoryResult omitted. + +// de_ShareLimitExceededException omitted. /** * deserializeAws_json1_1Snapshot */ const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => { - return { - DirectoryId: __expectString(output.DirectoryId), - Name: __expectString(output.Name), - SnapshotId: __expectString(output.SnapshotId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + DirectoryId: __expectString, + Name: __expectString, + SnapshotId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1SnapshotLimitExceededException - */ -const de_SnapshotLimitExceededException = (output: any, context: __SerdeContext): SnapshotLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_SnapshotLimitExceededException omitted. -/** - * deserializeAws_json1_1SnapshotLimits - */ -const de_SnapshotLimits = (output: any, context: __SerdeContext): SnapshotLimits => { - return { - ManualSnapshotsCurrentCount: __expectInt32(output.ManualSnapshotsCurrentCount), - ManualSnapshotsLimit: __expectInt32(output.ManualSnapshotsLimit), - ManualSnapshotsLimitReached: __expectBoolean(output.ManualSnapshotsLimitReached), - } as any; -}; +// de_SnapshotLimits omitted. /** * deserializeAws_json1_1Snapshots @@ -8599,99 +6708,38 @@ const de_Snapshots = (output: any, context: __SerdeContext): Snapshot[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Snapshot(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartSchemaExtensionResult - */ -const de_StartSchemaExtensionResult = (output: any, context: __SerdeContext): StartSchemaExtensionResult => { - return { - SchemaExtensionId: __expectString(output.SchemaExtensionId), - } as any; -}; +// de_StartSchemaExtensionResult omitted. -/** - * deserializeAws_json1_1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagLimitExceededException - */ -const de_TagLimitExceededException = (output: any, context: __SerdeContext): TagLimitExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_TagLimitExceededException omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. /** * deserializeAws_json1_1Trust */ const de_Trust = (output: any, context: __SerdeContext): Trust => { - return { - CreatedDateTime: - output.CreatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDateTime))) - : undefined, - DirectoryId: __expectString(output.DirectoryId), - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - RemoteDomainName: __expectString(output.RemoteDomainName), - SelectiveAuth: __expectString(output.SelectiveAuth), - StateLastUpdatedDateTime: - output.StateLastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StateLastUpdatedDateTime))) - : undefined, - TrustDirection: __expectString(output.TrustDirection), - TrustId: __expectString(output.TrustId), - TrustState: __expectString(output.TrustState), - TrustStateReason: __expectString(output.TrustStateReason), - TrustType: __expectString(output.TrustType), - } as any; + return take(output, { + CreatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DirectoryId: __expectString, + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RemoteDomainName: __expectString, + SelectiveAuth: __expectString, + StateLastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrustDirection: __expectString, + TrustId: __expectString, + TrustState: __expectString, + TrustStateReason: __expectString, + TrustType: __expectString, + }) as any; }; /** @@ -8701,42 +6749,16 @@ const de_Trusts = (output: any, context: __SerdeContext): Trust[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Trust(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UnshareDirectoryResult - */ -const de_UnshareDirectoryResult = (output: any, context: __SerdeContext): UnshareDirectoryResult => { - return { - SharedDirectoryId: __expectString(output.SharedDirectoryId), - } as any; -}; +// de_UnshareDirectoryResult omitted. -/** - * deserializeAws_json1_1UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_UnsupportedOperationException omitted. -/** - * deserializeAws_json1_1UnsupportedSettingsException - */ -const de_UnsupportedSettingsException = (output: any, context: __SerdeContext): UnsupportedSettingsException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_UnsupportedSettingsException omitted. /** * deserializeAws_json1_1UpdateActivities @@ -8745,115 +6767,44 @@ const de_UpdateActivities = (output: any, context: __SerdeContext): UpdateInfoEn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UpdateInfoEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UpdateConditionalForwarderResult - */ -const de_UpdateConditionalForwarderResult = ( - output: any, - context: __SerdeContext -): UpdateConditionalForwarderResult => { - return {} as any; -}; +// de_UpdateConditionalForwarderResult omitted. -/** - * deserializeAws_json1_1UpdateDirectorySetupResult - */ -const de_UpdateDirectorySetupResult = (output: any, context: __SerdeContext): UpdateDirectorySetupResult => { - return {} as any; -}; +// de_UpdateDirectorySetupResult omitted. /** * deserializeAws_json1_1UpdateInfoEntry */ const de_UpdateInfoEntry = (output: any, context: __SerdeContext): UpdateInfoEntry => { - return { - InitiatedBy: __expectString(output.InitiatedBy), - LastUpdatedDateTime: - output.LastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDateTime))) - : undefined, - NewValue: output.NewValue != null ? de_UpdateValue(output.NewValue, context) : undefined, - PreviousValue: output.PreviousValue != null ? de_UpdateValue(output.PreviousValue, context) : undefined, - Region: __expectString(output.Region), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - } as any; + return take(output, { + InitiatedBy: __expectString, + LastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NewValue: _json, + PreviousValue: _json, + Region: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusReason: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateNumberOfDomainControllersResult - */ -const de_UpdateNumberOfDomainControllersResult = ( - output: any, - context: __SerdeContext -): UpdateNumberOfDomainControllersResult => { - return {} as any; -}; +// de_UpdateNumberOfDomainControllersResult omitted. -/** - * deserializeAws_json1_1UpdateRadiusResult - */ -const de_UpdateRadiusResult = (output: any, context: __SerdeContext): UpdateRadiusResult => { - return {} as any; -}; +// de_UpdateRadiusResult omitted. -/** - * deserializeAws_json1_1UpdateSettingsResult - */ -const de_UpdateSettingsResult = (output: any, context: __SerdeContext): UpdateSettingsResult => { - return { - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_UpdateSettingsResult omitted. -/** - * deserializeAws_json1_1UpdateTrustResult - */ -const de_UpdateTrustResult = (output: any, context: __SerdeContext): UpdateTrustResult => { - return { - RequestId: __expectString(output.RequestId), - TrustId: __expectString(output.TrustId), - } as any; -}; +// de_UpdateTrustResult omitted. -/** - * deserializeAws_json1_1UpdateValue - */ -const de_UpdateValue = (output: any, context: __SerdeContext): UpdateValue => { - return { - OSUpdateSettings: - output.OSUpdateSettings != null ? de_OSUpdateSettings(output.OSUpdateSettings, context) : undefined, - } as any; -}; +// de_UpdateValue omitted. -/** - * deserializeAws_json1_1UserDoesNotExistException - */ -const de_UserDoesNotExistException = (output: any, context: __SerdeContext): UserDoesNotExistException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_UserDoesNotExistException omitted. -/** - * deserializeAws_json1_1VerifyTrustResult - */ -const de_VerifyTrustResult = (output: any, context: __SerdeContext): VerifyTrustResult => { - return { - TrustId: __expectString(output.TrustId), - } as any; -}; +// de_VerifyTrustResult omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -8875,6 +6826,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-dlm/src/protocols/Aws_restJson1.ts b/clients/client-dlm/src/protocols/Aws_restJson1.ts index 7d00681eb307..4b126bec960e 100644 --- a/clients/client-dlm/src/protocols/Aws_restJson1.ts +++ b/clients/client-dlm/src/protocols/Aws_restJson1.ts @@ -1,17 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -61,7 +61,6 @@ import { InternalServerException, InvalidRequestException, LifecyclePolicy, - LifecyclePolicySummary, LimitExceededException, PolicyDetails, ResourceLocationValues, @@ -87,13 +86,15 @@ export const se_CreateLifecyclePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.PolicyDetails != null && { PolicyDetails: se_PolicyDetails(input.PolicyDetails, context) }), - ...(input.State != null && { State: input.State }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + ExecutionRoleArn: [], + PolicyDetails: (_) => _json(_), + State: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -221,9 +222,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -279,12 +282,14 @@ export const se_UpdateLifecyclePolicyCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{PolicyId}"; resolvedPath = __resolvedPath(resolvedPath, input, "PolicyId", () => input.PolicyId!, "{PolicyId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.PolicyDetails != null && { PolicyDetails: se_PolicyDetails(input.PolicyDetails, context) }), - ...(input.State != null && { State: input.State }), - }); + body = JSON.stringify( + take(input, { + Description: [], + ExecutionRoleArn: [], + PolicyDetails: (_) => _json(_), + State: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -310,9 +315,10 @@ export const de_CreateLifecyclePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PolicyId != null) { - contents.PolicyId = __expectString(data.PolicyId); - } + const doc = take(data, { + PolicyId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -340,10 +346,9 @@ const de_CreateLifecyclePolicyCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -390,10 +395,9 @@ const de_DeleteLifecyclePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -413,9 +417,10 @@ export const de_GetLifecyclePoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policies != null) { - contents.Policies = de_LifecyclePolicySummaryList(data.Policies, context); - } + const doc = take(data, { + Policies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -446,10 +451,9 @@ const de_GetLifecyclePoliciesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -469,9 +473,10 @@ export const de_GetLifecyclePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = de_LifecyclePolicy(data.Policy, context); - } + const doc = take(data, { + Policy: (_) => de_LifecyclePolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -499,10 +504,9 @@ const de_GetLifecyclePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -522,9 +526,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -552,10 +557,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -602,10 +606,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -652,10 +655,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -705,16 +707,15 @@ const de_UpdateLifecyclePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServerExceptionRes */ @@ -724,12 +725,11 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -746,18 +746,13 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.MutuallyExclusiveParameters != null) { - contents.MutuallyExclusiveParameters = de_ParameterList(data.MutuallyExclusiveParameters, context); - } - if (data.RequiredParameters != null) { - contents.RequiredParameters = de_ParameterList(data.RequiredParameters, context); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + MutuallyExclusiveParameters: _json, + RequiredParameters: _json, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -774,15 +769,12 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -799,18 +791,13 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceIds != null) { - contents.ResourceIds = de_PolicyIdList(data.ResourceIds, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + ResourceIds: _json, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -818,988 +805,175 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Action - */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.CrossRegionCopy != null && { - CrossRegionCopy: se_CrossRegionCopyActionList(input.CrossRegionCopy, context), - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_Action omitted. -/** - * serializeAws_restJson1ActionList - */ -const se_ActionList = (input: Action[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Action(entry, context); - }); -}; +// se_ActionList omitted. -/** - * serializeAws_restJson1ArchiveRetainRule - */ -const se_ArchiveRetainRule = (input: ArchiveRetainRule, context: __SerdeContext): any => { - return { - ...(input.RetentionArchiveTier != null && { - RetentionArchiveTier: se_RetentionArchiveTier(input.RetentionArchiveTier, context), - }), - }; -}; +// se_ArchiveRetainRule omitted. -/** - * serializeAws_restJson1ArchiveRule - */ -const se_ArchiveRule = (input: ArchiveRule, context: __SerdeContext): any => { - return { - ...(input.RetainRule != null && { RetainRule: se_ArchiveRetainRule(input.RetainRule, context) }), - }; -}; +// se_ArchiveRule omitted. -/** - * serializeAws_restJson1AvailabilityZoneList - */ -const se_AvailabilityZoneList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AvailabilityZoneList omitted. -/** - * serializeAws_restJson1CreateRule - */ -const se_CreateRule = (input: CreateRule, context: __SerdeContext): any => { - return { - ...(input.CronExpression != null && { CronExpression: input.CronExpression }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.Times != null && { Times: se_TimesList(input.Times, context) }), - }; -}; +// se_CreateRule omitted. -/** - * serializeAws_restJson1CrossRegionCopyAction - */ -const se_CrossRegionCopyAction = (input: CrossRegionCopyAction, context: __SerdeContext): any => { - return { - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.RetainRule != null && { RetainRule: se_CrossRegionCopyRetainRule(input.RetainRule, context) }), - ...(input.Target != null && { Target: input.Target }), - }; -}; +// se_CrossRegionCopyAction omitted. -/** - * serializeAws_restJson1CrossRegionCopyActionList - */ -const se_CrossRegionCopyActionList = (input: CrossRegionCopyAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CrossRegionCopyAction(entry, context); - }); -}; +// se_CrossRegionCopyActionList omitted. -/** - * serializeAws_restJson1CrossRegionCopyDeprecateRule - */ -const se_CrossRegionCopyDeprecateRule = (input: CrossRegionCopyDeprecateRule, context: __SerdeContext): any => { - return { - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - }; -}; +// se_CrossRegionCopyDeprecateRule omitted. -/** - * serializeAws_restJson1CrossRegionCopyRetainRule - */ -const se_CrossRegionCopyRetainRule = (input: CrossRegionCopyRetainRule, context: __SerdeContext): any => { - return { - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - }; -}; +// se_CrossRegionCopyRetainRule omitted. -/** - * serializeAws_restJson1CrossRegionCopyRule - */ -const se_CrossRegionCopyRule = (input: CrossRegionCopyRule, context: __SerdeContext): any => { - return { - ...(input.CmkArn != null && { CmkArn: input.CmkArn }), - ...(input.CopyTags != null && { CopyTags: input.CopyTags }), - ...(input.DeprecateRule != null && { - DeprecateRule: se_CrossRegionCopyDeprecateRule(input.DeprecateRule, context), - }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.RetainRule != null && { RetainRule: se_CrossRegionCopyRetainRule(input.RetainRule, context) }), - ...(input.Target != null && { Target: input.Target }), - ...(input.TargetRegion != null && { TargetRegion: input.TargetRegion }), - }; -}; +// se_CrossRegionCopyRule omitted. -/** - * serializeAws_restJson1CrossRegionCopyRules - */ -const se_CrossRegionCopyRules = (input: CrossRegionCopyRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CrossRegionCopyRule(entry, context); - }); -}; +// se_CrossRegionCopyRules omitted. -/** - * serializeAws_restJson1DeprecateRule - */ -const se_DeprecateRule = (input: DeprecateRule, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: input.Count }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - }; -}; +// se_DeprecateRule omitted. -/** - * serializeAws_restJson1EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.CmkArn != null && { CmkArn: input.CmkArn }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - }; -}; +// se_EncryptionConfiguration omitted. -/** - * serializeAws_restJson1EventParameters - */ -const se_EventParameters = (input: EventParameters, context: __SerdeContext): any => { - return { - ...(input.DescriptionRegex != null && { DescriptionRegex: input.DescriptionRegex }), - ...(input.EventType != null && { EventType: input.EventType }), - ...(input.SnapshotOwner != null && { SnapshotOwner: se_SnapshotOwnerList(input.SnapshotOwner, context) }), - }; -}; +// se_EventParameters omitted. -/** - * serializeAws_restJson1EventSource - */ -const se_EventSource = (input: EventSource, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_EventParameters(input.Parameters, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_EventSource omitted. -/** - * serializeAws_restJson1ExcludeDataVolumeTagList - */ -const se_ExcludeDataVolumeTagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_ExcludeDataVolumeTagList omitted. -/** - * serializeAws_restJson1FastRestoreRule - */ -const se_FastRestoreRule = (input: FastRestoreRule, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_AvailabilityZoneList(input.AvailabilityZones, context), - }), - ...(input.Count != null && { Count: input.Count }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - }; -}; +// se_FastRestoreRule omitted. -/** - * serializeAws_restJson1_Parameters - */ -const se__Parameters = (input: _Parameters, context: __SerdeContext): any => { - return { - ...(input.ExcludeBootVolume != null && { ExcludeBootVolume: input.ExcludeBootVolume }), - ...(input.ExcludeDataVolumeTags != null && { - ExcludeDataVolumeTags: se_ExcludeDataVolumeTagList(input.ExcludeDataVolumeTags, context), - }), - ...(input.NoReboot != null && { NoReboot: input.NoReboot }), - }; -}; +// se__Parameters omitted. -/** - * serializeAws_restJson1PolicyDetails - */ -const se_PolicyDetails = (input: PolicyDetails, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_ActionList(input.Actions, context) }), - ...(input.EventSource != null && { EventSource: se_EventSource(input.EventSource, context) }), - ...(input.Parameters != null && { Parameters: se__Parameters(input.Parameters, context) }), - ...(input.PolicyType != null && { PolicyType: input.PolicyType }), - ...(input.ResourceLocations != null && { - ResourceLocations: se_ResourceLocationList(input.ResourceLocations, context), - }), - ...(input.ResourceTypes != null && { ResourceTypes: se_ResourceTypeValuesList(input.ResourceTypes, context) }), - ...(input.Schedules != null && { Schedules: se_ScheduleList(input.Schedules, context) }), - ...(input.TargetTags != null && { TargetTags: se_TargetTagList(input.TargetTags, context) }), - }; -}; +// se_PolicyDetails omitted. -/** - * serializeAws_restJson1ResourceLocationList - */ -const se_ResourceLocationList = (input: (ResourceLocationValues | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceLocationList omitted. -/** - * serializeAws_restJson1ResourceTypeValuesList - */ -const se_ResourceTypeValuesList = (input: (ResourceTypeValues | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceTypeValuesList omitted. -/** - * serializeAws_restJson1RetainRule - */ -const se_RetainRule = (input: RetainRule, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: input.Count }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - }; -}; +// se_RetainRule omitted. -/** - * serializeAws_restJson1RetentionArchiveTier - */ -const se_RetentionArchiveTier = (input: RetentionArchiveTier, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: input.Count }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.IntervalUnit != null && { IntervalUnit: input.IntervalUnit }), - }; -}; +// se_RetentionArchiveTier omitted. -/** - * serializeAws_restJson1Schedule - */ -const se_Schedule = (input: Schedule, context: __SerdeContext): any => { - return { - ...(input.ArchiveRule != null && { ArchiveRule: se_ArchiveRule(input.ArchiveRule, context) }), - ...(input.CopyTags != null && { CopyTags: input.CopyTags }), - ...(input.CreateRule != null && { CreateRule: se_CreateRule(input.CreateRule, context) }), - ...(input.CrossRegionCopyRules != null && { - CrossRegionCopyRules: se_CrossRegionCopyRules(input.CrossRegionCopyRules, context), - }), - ...(input.DeprecateRule != null && { DeprecateRule: se_DeprecateRule(input.DeprecateRule, context) }), - ...(input.FastRestoreRule != null && { FastRestoreRule: se_FastRestoreRule(input.FastRestoreRule, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RetainRule != null && { RetainRule: se_RetainRule(input.RetainRule, context) }), - ...(input.ShareRules != null && { ShareRules: se_ShareRules(input.ShareRules, context) }), - ...(input.TagsToAdd != null && { TagsToAdd: se_TagsToAddList(input.TagsToAdd, context) }), - ...(input.VariableTags != null && { VariableTags: se_VariableTagsList(input.VariableTags, context) }), - }; -}; +// se_Schedule omitted. -/** - * serializeAws_restJson1ScheduleList - */ -const se_ScheduleList = (input: Schedule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Schedule(entry, context); - }); -}; +// se_ScheduleList omitted. -/** - * serializeAws_restJson1ShareRule - */ -const se_ShareRule = (input: ShareRule, context: __SerdeContext): any => { - return { - ...(input.TargetAccounts != null && { TargetAccounts: se_ShareTargetAccountList(input.TargetAccounts, context) }), - ...(input.UnshareInterval != null && { UnshareInterval: input.UnshareInterval }), - ...(input.UnshareIntervalUnit != null && { UnshareIntervalUnit: input.UnshareIntervalUnit }), - }; -}; +// se_ShareRule omitted. -/** - * serializeAws_restJson1ShareRules - */ -const se_ShareRules = (input: ShareRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ShareRule(entry, context); - }); -}; +// se_ShareRules omitted. -/** - * serializeAws_restJson1ShareTargetAccountList - */ -const se_ShareTargetAccountList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ShareTargetAccountList omitted. -/** - * serializeAws_restJson1SnapshotOwnerList - */ -const se_SnapshotOwnerList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SnapshotOwnerList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TagsToAddList - */ -const se_TagsToAddList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagsToAddList omitted. -/** - * serializeAws_restJson1TargetTagList - */ -const se_TargetTagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TargetTagList omitted. -/** - * serializeAws_restJson1TimesList - */ -const se_TimesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TimesList omitted. -/** - * serializeAws_restJson1VariableTagsList - */ -const se_VariableTagsList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_VariableTagsList omitted. -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - CrossRegionCopy: - output.CrossRegionCopy != null ? de_CrossRegionCopyActionList(output.CrossRegionCopy, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_Action omitted. -/** - * deserializeAws_restJson1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): Action[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Action(entry, context); - }); - return retVal; -}; +// de_ActionList omitted. -/** - * deserializeAws_restJson1ArchiveRetainRule - */ -const de_ArchiveRetainRule = (output: any, context: __SerdeContext): ArchiveRetainRule => { - return { - RetentionArchiveTier: - output.RetentionArchiveTier != null ? de_RetentionArchiveTier(output.RetentionArchiveTier, context) : undefined, - } as any; -}; +// de_ArchiveRetainRule omitted. -/** - * deserializeAws_restJson1ArchiveRule - */ -const de_ArchiveRule = (output: any, context: __SerdeContext): ArchiveRule => { - return { - RetainRule: output.RetainRule != null ? de_ArchiveRetainRule(output.RetainRule, context) : undefined, - } as any; -}; +// de_ArchiveRule omitted. -/** - * deserializeAws_restJson1AvailabilityZoneList - */ -const de_AvailabilityZoneList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AvailabilityZoneList omitted. -/** - * deserializeAws_restJson1CreateRule - */ -const de_CreateRule = (output: any, context: __SerdeContext): CreateRule => { - return { - CronExpression: __expectString(output.CronExpression), - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - Location: __expectString(output.Location), - Times: output.Times != null ? de_TimesList(output.Times, context) : undefined, - } as any; -}; +// de_CreateRule omitted. -/** - * deserializeAws_restJson1CrossRegionCopyAction - */ -const de_CrossRegionCopyAction = (output: any, context: __SerdeContext): CrossRegionCopyAction => { - return { - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - RetainRule: output.RetainRule != null ? de_CrossRegionCopyRetainRule(output.RetainRule, context) : undefined, - Target: __expectString(output.Target), - } as any; -}; +// de_CrossRegionCopyAction omitted. -/** - * deserializeAws_restJson1CrossRegionCopyActionList - */ -const de_CrossRegionCopyActionList = (output: any, context: __SerdeContext): CrossRegionCopyAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CrossRegionCopyAction(entry, context); - }); - return retVal; -}; +// de_CrossRegionCopyActionList omitted. -/** - * deserializeAws_restJson1CrossRegionCopyDeprecateRule - */ -const de_CrossRegionCopyDeprecateRule = (output: any, context: __SerdeContext): CrossRegionCopyDeprecateRule => { - return { - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - } as any; -}; +// de_CrossRegionCopyDeprecateRule omitted. -/** - * deserializeAws_restJson1CrossRegionCopyRetainRule - */ -const de_CrossRegionCopyRetainRule = (output: any, context: __SerdeContext): CrossRegionCopyRetainRule => { - return { - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - } as any; -}; +// de_CrossRegionCopyRetainRule omitted. -/** - * deserializeAws_restJson1CrossRegionCopyRule - */ -const de_CrossRegionCopyRule = (output: any, context: __SerdeContext): CrossRegionCopyRule => { - return { - CmkArn: __expectString(output.CmkArn), - CopyTags: __expectBoolean(output.CopyTags), - DeprecateRule: - output.DeprecateRule != null ? de_CrossRegionCopyDeprecateRule(output.DeprecateRule, context) : undefined, - Encrypted: __expectBoolean(output.Encrypted), - RetainRule: output.RetainRule != null ? de_CrossRegionCopyRetainRule(output.RetainRule, context) : undefined, - Target: __expectString(output.Target), - TargetRegion: __expectString(output.TargetRegion), - } as any; -}; +// de_CrossRegionCopyRule omitted. -/** - * deserializeAws_restJson1CrossRegionCopyRules - */ -const de_CrossRegionCopyRules = (output: any, context: __SerdeContext): CrossRegionCopyRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CrossRegionCopyRule(entry, context); - }); - return retVal; -}; +// de_CrossRegionCopyRules omitted. -/** - * deserializeAws_restJson1DeprecateRule - */ -const de_DeprecateRule = (output: any, context: __SerdeContext): DeprecateRule => { - return { - Count: __expectInt32(output.Count), - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - } as any; -}; +// de_DeprecateRule omitted. -/** - * deserializeAws_restJson1EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - CmkArn: __expectString(output.CmkArn), - Encrypted: __expectBoolean(output.Encrypted), - } as any; -}; +// de_EncryptionConfiguration omitted. -/** - * deserializeAws_restJson1EventParameters - */ -const de_EventParameters = (output: any, context: __SerdeContext): EventParameters => { - return { - DescriptionRegex: __expectString(output.DescriptionRegex), - EventType: __expectString(output.EventType), - SnapshotOwner: output.SnapshotOwner != null ? de_SnapshotOwnerList(output.SnapshotOwner, context) : undefined, - } as any; -}; +// de_EventParameters omitted. -/** - * deserializeAws_restJson1EventSource - */ -const de_EventSource = (output: any, context: __SerdeContext): EventSource => { - return { - Parameters: output.Parameters != null ? de_EventParameters(output.Parameters, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_EventSource omitted. -/** - * deserializeAws_restJson1ExcludeDataVolumeTagList - */ -const de_ExcludeDataVolumeTagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_ExcludeDataVolumeTagList omitted. -/** - * deserializeAws_restJson1FastRestoreRule - */ -const de_FastRestoreRule = (output: any, context: __SerdeContext): FastRestoreRule => { - return { - AvailabilityZones: - output.AvailabilityZones != null ? de_AvailabilityZoneList(output.AvailabilityZones, context) : undefined, - Count: __expectInt32(output.Count), - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - } as any; -}; +// de_FastRestoreRule omitted. /** * deserializeAws_restJson1LifecyclePolicy */ const de_LifecyclePolicy = (output: any, context: __SerdeContext): LifecyclePolicy => { - return { - DateCreated: - output.DateCreated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.DateCreated)) : undefined, - DateModified: - output.DateModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.DateModified)) : undefined, - Description: __expectString(output.Description), - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - PolicyArn: __expectString(output.PolicyArn), - PolicyDetails: output.PolicyDetails != null ? de_PolicyDetails(output.PolicyDetails, context) : undefined, - PolicyId: __expectString(output.PolicyId), - State: __expectString(output.State), - StatusMessage: __expectString(output.StatusMessage), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DateModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + ExecutionRoleArn: __expectString, + PolicyArn: __expectString, + PolicyDetails: _json, + PolicyId: __expectString, + State: __expectString, + StatusMessage: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1LifecyclePolicySummary - */ -const de_LifecyclePolicySummary = (output: any, context: __SerdeContext): LifecyclePolicySummary => { - return { - Description: __expectString(output.Description), - PolicyId: __expectString(output.PolicyId), - PolicyType: __expectString(output.PolicyType), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_LifecyclePolicySummary omitted. -/** - * deserializeAws_restJson1LifecyclePolicySummaryList - */ -const de_LifecyclePolicySummaryList = (output: any, context: __SerdeContext): LifecyclePolicySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LifecyclePolicySummary(entry, context); - }); - return retVal; -}; +// de_LifecyclePolicySummaryList omitted. -/** - * deserializeAws_restJson1ParameterList - */ -const de_ParameterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ParameterList omitted. -/** - * deserializeAws_restJson1_Parameters - */ -const de__Parameters = (output: any, context: __SerdeContext): _Parameters => { - return { - ExcludeBootVolume: __expectBoolean(output.ExcludeBootVolume), - ExcludeDataVolumeTags: - output.ExcludeDataVolumeTags != null - ? de_ExcludeDataVolumeTagList(output.ExcludeDataVolumeTags, context) - : undefined, - NoReboot: __expectBoolean(output.NoReboot), - } as any; -}; +// de__Parameters omitted. -/** - * deserializeAws_restJson1PolicyDetails - */ -const de_PolicyDetails = (output: any, context: __SerdeContext): PolicyDetails => { - return { - Actions: output.Actions != null ? de_ActionList(output.Actions, context) : undefined, - EventSource: output.EventSource != null ? de_EventSource(output.EventSource, context) : undefined, - Parameters: output.Parameters != null ? de__Parameters(output.Parameters, context) : undefined, - PolicyType: __expectString(output.PolicyType), - ResourceLocations: - output.ResourceLocations != null ? de_ResourceLocationList(output.ResourceLocations, context) : undefined, - ResourceTypes: output.ResourceTypes != null ? de_ResourceTypeValuesList(output.ResourceTypes, context) : undefined, - Schedules: output.Schedules != null ? de_ScheduleList(output.Schedules, context) : undefined, - TargetTags: output.TargetTags != null ? de_TargetTagList(output.TargetTags, context) : undefined, - } as any; -}; +// de_PolicyDetails omitted. -/** - * deserializeAws_restJson1PolicyIdList - */ -const de_PolicyIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PolicyIdList omitted. -/** - * deserializeAws_restJson1ResourceLocationList - */ -const de_ResourceLocationList = (output: any, context: __SerdeContext): (ResourceLocationValues | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceLocationList omitted. -/** - * deserializeAws_restJson1ResourceTypeValuesList - */ -const de_ResourceTypeValuesList = (output: any, context: __SerdeContext): (ResourceTypeValues | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceTypeValuesList omitted. -/** - * deserializeAws_restJson1RetainRule - */ -const de_RetainRule = (output: any, context: __SerdeContext): RetainRule => { - return { - Count: __expectInt32(output.Count), - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - } as any; -}; +// de_RetainRule omitted. -/** - * deserializeAws_restJson1RetentionArchiveTier - */ -const de_RetentionArchiveTier = (output: any, context: __SerdeContext): RetentionArchiveTier => { - return { - Count: __expectInt32(output.Count), - Interval: __expectInt32(output.Interval), - IntervalUnit: __expectString(output.IntervalUnit), - } as any; -}; +// de_RetentionArchiveTier omitted. -/** - * deserializeAws_restJson1Schedule - */ -const de_Schedule = (output: any, context: __SerdeContext): Schedule => { - return { - ArchiveRule: output.ArchiveRule != null ? de_ArchiveRule(output.ArchiveRule, context) : undefined, - CopyTags: __expectBoolean(output.CopyTags), - CreateRule: output.CreateRule != null ? de_CreateRule(output.CreateRule, context) : undefined, - CrossRegionCopyRules: - output.CrossRegionCopyRules != null ? de_CrossRegionCopyRules(output.CrossRegionCopyRules, context) : undefined, - DeprecateRule: output.DeprecateRule != null ? de_DeprecateRule(output.DeprecateRule, context) : undefined, - FastRestoreRule: output.FastRestoreRule != null ? de_FastRestoreRule(output.FastRestoreRule, context) : undefined, - Name: __expectString(output.Name), - RetainRule: output.RetainRule != null ? de_RetainRule(output.RetainRule, context) : undefined, - ShareRules: output.ShareRules != null ? de_ShareRules(output.ShareRules, context) : undefined, - TagsToAdd: output.TagsToAdd != null ? de_TagsToAddList(output.TagsToAdd, context) : undefined, - VariableTags: output.VariableTags != null ? de_VariableTagsList(output.VariableTags, context) : undefined, - } as any; -}; +// de_Schedule omitted. -/** - * deserializeAws_restJson1ScheduleList - */ -const de_ScheduleList = (output: any, context: __SerdeContext): Schedule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Schedule(entry, context); - }); - return retVal; -}; +// de_ScheduleList omitted. -/** - * deserializeAws_restJson1ShareRule - */ -const de_ShareRule = (output: any, context: __SerdeContext): ShareRule => { - return { - TargetAccounts: - output.TargetAccounts != null ? de_ShareTargetAccountList(output.TargetAccounts, context) : undefined, - UnshareInterval: __expectInt32(output.UnshareInterval), - UnshareIntervalUnit: __expectString(output.UnshareIntervalUnit), - } as any; -}; +// de_ShareRule omitted. -/** - * deserializeAws_restJson1ShareRules - */ -const de_ShareRules = (output: any, context: __SerdeContext): ShareRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ShareRule(entry, context); - }); - return retVal; -}; +// de_ShareRules omitted. -/** - * deserializeAws_restJson1ShareTargetAccountList - */ -const de_ShareTargetAccountList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ShareTargetAccountList omitted. -/** - * deserializeAws_restJson1SnapshotOwnerList - */ -const de_SnapshotOwnerList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SnapshotOwnerList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TagsToAddList - */ -const de_TagsToAddList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagsToAddList omitted. -/** - * deserializeAws_restJson1TargetTagList - */ -const de_TargetTagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TargetTagList omitted. -/** - * deserializeAws_restJson1TimesList - */ -const de_TimesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TimesList omitted. -/** - * deserializeAws_restJson1VariableTagsList - */ -const de_VariableTagsList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_VariableTagsList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-docdb-elastic/src/protocols/Aws_restJson1.ts b/clients/client-docdb-elastic/src/protocols/Aws_restJson1.ts index ea48bcaa699e..8e35c536157b 100644 --- a/clients/client-docdb-elastic/src/protocols/Aws_restJson1.ts +++ b/clients/client-docdb-elastic/src/protocols/Aws_restJson1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -50,17 +51,12 @@ import { UpdateClusterCommandInput, UpdateClusterCommandOutput } from "../comman import { DocDBElasticServiceException as __BaseException } from "../models/DocDBElasticServiceException"; import { AccessDeniedException, - Cluster, - ClusterInList, - ClusterSnapshot, - ClusterSnapshotInList, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -76,22 +72,22 @@ export const se_CreateClusterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster"; let body: any; - body = JSON.stringify({ - ...(input.adminUserName != null && { adminUserName: input.adminUserName }), - ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }), - ...(input.authType != null && { authType: input.authType }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.clusterName != null && { clusterName: input.clusterName }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }), - ...(input.shardCapacity != null && { shardCapacity: input.shardCapacity }), - ...(input.shardCount != null && { shardCount: input.shardCount }), - ...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.vpcSecurityGroupIds != null && { - vpcSecurityGroupIds: se_StringList(input.vpcSecurityGroupIds, context), - }), - }); + body = JSON.stringify( + take(input, { + adminUserName: [], + adminUserPassword: [], + authType: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + clusterName: [], + kmsKeyId: [], + preferredMaintenanceWindow: [], + shardCapacity: [], + shardCount: [], + subnetIds: (_) => _json(_), + tags: (_) => _json(_), + vpcSecurityGroupIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -116,11 +112,13 @@ export const se_CreateClusterSnapshotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot"; let body: any; - body = JSON.stringify({ - ...(input.clusterArn != null && { clusterArn: input.clusterArn }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clusterArn: [], + snapshotName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -319,15 +317,15 @@ export const se_RestoreClusterFromSnapshotCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-snapshot/{snapshotArn}/restore"; resolvedPath = __resolvedPath(resolvedPath, input, "snapshotArn", () => input.snapshotArn!, "{snapshotArn}", false); let body: any; - body = JSON.stringify({ - ...(input.clusterName != null && { clusterName: input.clusterName }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.vpcSecurityGroupIds != null && { - vpcSecurityGroupIds: se_StringList(input.vpcSecurityGroupIds, context), - }), - }); + body = JSON.stringify( + take(input, { + clusterName: [], + kmsKeyId: [], + subnetIds: (_) => _json(_), + tags: (_) => _json(_), + vpcSecurityGroupIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -353,9 +351,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -411,18 +411,18 @@ export const se_UpdateClusterCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster/{clusterArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterArn", () => input.clusterArn!, "{clusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }), - ...(input.authType != null && { authType: input.authType }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }), - ...(input.shardCapacity != null && { shardCapacity: input.shardCapacity }), - ...(input.shardCount != null && { shardCount: input.shardCount }), - ...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }), - ...(input.vpcSecurityGroupIds != null && { - vpcSecurityGroupIds: se_StringList(input.vpcSecurityGroupIds, context), - }), - }); + body = JSON.stringify( + take(input, { + adminUserPassword: [], + authType: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + preferredMaintenanceWindow: [], + shardCapacity: [], + shardCount: [], + subnetIds: (_) => _json(_), + vpcSecurityGroupIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -448,9 +448,10 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -487,10 +488,9 @@ const de_CreateClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -510,9 +510,10 @@ export const de_CreateClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.snapshot != null) { - contents.snapshot = de_ClusterSnapshot(data.snapshot, context); - } + const doc = take(data, { + snapshot: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -552,10 +553,9 @@ const de_CreateClusterSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -575,9 +575,10 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -614,10 +615,9 @@ const de_DeleteClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -637,9 +637,10 @@ export const de_DeleteClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.snapshot != null) { - contents.snapshot = de_ClusterSnapshot(data.snapshot, context); - } + const doc = take(data, { + snapshot: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -676,10 +677,9 @@ const de_DeleteClusterSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -699,9 +699,10 @@ export const de_GetClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -735,10 +736,9 @@ const de_GetClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -758,9 +758,10 @@ export const de_GetClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.snapshot != null) { - contents.snapshot = de_ClusterSnapshot(data.snapshot, context); - } + const doc = take(data, { + snapshot: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -794,10 +795,9 @@ const de_GetClusterSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -817,12 +817,11 @@ export const de_ListClustersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusters != null) { - contents.clusters = de_ClusterList(data.clusters, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + clusters: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -853,10 +852,9 @@ const de_ListClustersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -876,12 +874,11 @@ export const de_ListClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.snapshots != null) { - contents.snapshots = de_ClusterSnapshotList(data.snapshots, context); - } + const doc = take(data, { + nextToken: __expectString, + snapshots: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -912,10 +909,9 @@ const de_ListClusterSnapshotsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -935,9 +931,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -968,10 +965,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -991,9 +987,10 @@ export const de_RestoreClusterFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1033,10 +1030,9 @@ const de_RestoreClusterFromSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1086,10 +1082,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1139,10 +1134,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1162,9 +1156,10 @@ export const de_UpdateClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1201,16 +1196,15 @@ const de_UpdateClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1220,9 +1214,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1236,15 +1231,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1261,9 +1253,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1280,15 +1273,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1305,9 +1295,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1326,9 +1317,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1342,15 +1334,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1358,177 +1347,29 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1Cluster - */ -const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - adminUserName: __expectString(output.adminUserName), - authType: __expectString(output.authType), - clusterArn: __expectString(output.clusterArn), - clusterEndpoint: __expectString(output.clusterEndpoint), - clusterName: __expectString(output.clusterName), - createTime: __expectString(output.createTime), - kmsKeyId: __expectString(output.kmsKeyId), - preferredMaintenanceWindow: __expectString(output.preferredMaintenanceWindow), - shardCapacity: __expectInt32(output.shardCapacity), - shardCount: __expectInt32(output.shardCount), - status: __expectString(output.status), - subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined, - vpcSecurityGroupIds: - output.vpcSecurityGroupIds != null ? de_StringList(output.vpcSecurityGroupIds, context) : undefined, - } as any; -}; +// de_Cluster omitted. -/** - * deserializeAws_restJson1ClusterInList - */ -const de_ClusterInList = (output: any, context: __SerdeContext): ClusterInList => { - return { - clusterArn: __expectString(output.clusterArn), - clusterName: __expectString(output.clusterName), - status: __expectString(output.status), - } as any; -}; +// de_ClusterInList omitted. -/** - * deserializeAws_restJson1ClusterList - */ -const de_ClusterList = (output: any, context: __SerdeContext): ClusterInList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterInList(entry, context); - }); - return retVal; -}; +// de_ClusterList omitted. -/** - * deserializeAws_restJson1ClusterSnapshot - */ -const de_ClusterSnapshot = (output: any, context: __SerdeContext): ClusterSnapshot => { - return { - adminUserName: __expectString(output.adminUserName), - clusterArn: __expectString(output.clusterArn), - clusterCreationTime: __expectString(output.clusterCreationTime), - kmsKeyId: __expectString(output.kmsKeyId), - snapshotArn: __expectString(output.snapshotArn), - snapshotCreationTime: __expectString(output.snapshotCreationTime), - snapshotName: __expectString(output.snapshotName), - status: __expectString(output.status), - subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined, - vpcSecurityGroupIds: - output.vpcSecurityGroupIds != null ? de_StringList(output.vpcSecurityGroupIds, context) : undefined, - } as any; -}; +// de_ClusterSnapshot omitted. -/** - * deserializeAws_restJson1ClusterSnapshotInList - */ -const de_ClusterSnapshotInList = (output: any, context: __SerdeContext): ClusterSnapshotInList => { - return { - clusterArn: __expectString(output.clusterArn), - snapshotArn: __expectString(output.snapshotArn), - snapshotCreationTime: __expectString(output.snapshotCreationTime), - snapshotName: __expectString(output.snapshotName), - status: __expectString(output.status), - } as any; -}; +// de_ClusterSnapshotInList omitted. -/** - * deserializeAws_restJson1ClusterSnapshotList - */ -const de_ClusterSnapshotList = (output: any, context: __SerdeContext): ClusterSnapshotInList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterSnapshotInList(entry, context); - }); - return retVal; -}; +// de_ClusterSnapshotList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-docdb/src/protocols/Aws_query.ts b/clients/client-docdb/src/protocols/Aws_query.ts index e78a8c4a3538..7602a436a75c 100644 --- a/clients/client-docdb/src/protocols/Aws_query.ts +++ b/clients/client-docdb/src/protocols/Aws_query.ts @@ -10,7 +10,7 @@ import { parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1305,7 +1305,7 @@ export const de_AddSourceIdentifierToSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1329,10 +1329,9 @@ const de_AddSourceIdentifierToSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1352,7 +1351,7 @@ export const de_AddTagsToResourceCommand = async ( const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1379,10 +1378,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1405,7 +1403,7 @@ export const de_ApplyPendingMaintenanceActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1432,10 +1430,9 @@ const de_ApplyPendingMaintenanceActionCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1458,7 +1455,7 @@ export const de_CopyDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1485,10 +1482,9 @@ const de_CopyDBClusterParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1511,7 +1507,7 @@ export const de_CopyDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1547,10 +1543,9 @@ const de_CopyDBClusterSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,7 +1568,7 @@ export const de_CreateDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1642,10 +1637,9 @@ const de_CreateDBClusterCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1668,7 +1662,7 @@ export const de_CreateDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1692,10 +1686,9 @@ const de_CreateDBClusterParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1718,7 +1711,7 @@ export const de_CreateDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1751,10 +1744,9 @@ const de_CreateDBClusterSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1777,7 +1769,7 @@ export const de_CreateDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1840,10 +1832,9 @@ const de_CreateDBInstanceCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1866,7 +1857,7 @@ export const de_CreateDBSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1899,10 +1890,9 @@ const de_CreateDBSubnetGroupCommandError = async ( throw await de_InvalidSubnetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1925,7 +1915,7 @@ export const de_CreateEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1964,10 +1954,9 @@ const de_CreateEventSubscriptionCommandError = async ( throw await de_SubscriptionCategoryNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1990,7 +1979,7 @@ export const de_CreateGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2020,10 +2009,9 @@ const de_CreateGlobalClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2046,7 +2034,7 @@ export const de_DeleteDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2079,10 +2067,9 @@ const de_DeleteDBClusterCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2102,7 +2089,7 @@ export const de_DeleteDBClusterParameterGroupCommand = async ( const response: DeleteDBClusterParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2126,10 +2113,9 @@ const de_DeleteDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2152,7 +2138,7 @@ export const de_DeleteDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2176,10 +2162,9 @@ const de_DeleteDBClusterSnapshotCommandError = async ( throw await de_InvalidDBClusterSnapshotStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2202,7 +2187,7 @@ export const de_DeleteDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2235,10 +2220,9 @@ const de_DeleteDBInstanceCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2258,7 +2242,7 @@ export const de_DeleteDBSubnetGroupCommand = async ( const response: DeleteDBSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2285,10 +2269,9 @@ const de_DeleteDBSubnetGroupCommandError = async ( throw await de_InvalidDBSubnetStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2311,7 +2294,7 @@ export const de_DeleteEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2335,10 +2318,9 @@ const de_DeleteEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2361,7 +2343,7 @@ export const de_DeleteGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2385,10 +2367,9 @@ const de_DeleteGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2411,7 +2392,7 @@ export const de_DescribeCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2432,10 +2413,9 @@ const de_DescribeCertificatesCommandError = async ( throw await de_CertificateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2458,7 +2438,7 @@ export const de_DescribeDBClusterParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2479,10 +2459,9 @@ const de_DescribeDBClusterParameterGroupsCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,7 +2484,7 @@ export const de_DescribeDBClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2526,10 +2505,9 @@ const de_DescribeDBClusterParametersCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2552,7 +2530,7 @@ export const de_DescribeDBClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2573,10 +2551,9 @@ const de_DescribeDBClustersCommandError = async ( throw await de_DBClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2599,7 +2576,7 @@ export const de_DescribeDBClusterSnapshotAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2620,10 +2597,9 @@ const de_DescribeDBClusterSnapshotAttributesCommandError = async ( throw await de_DBClusterSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2646,7 +2622,7 @@ export const de_DescribeDBClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2667,10 +2643,9 @@ const de_DescribeDBClusterSnapshotsCommandError = async ( throw await de_DBClusterSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2693,7 +2668,7 @@ export const de_DescribeDBEngineVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2709,10 +2684,9 @@ const de_DescribeDBEngineVersionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2734,7 +2708,7 @@ export const de_DescribeDBInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2755,10 +2729,9 @@ const de_DescribeDBInstancesCommandError = async ( throw await de_DBInstanceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2781,7 +2754,7 @@ export const de_DescribeDBSubnetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2802,10 +2775,9 @@ const de_DescribeDBSubnetGroupsCommandError = async ( throw await de_DBSubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2831,7 +2803,7 @@ export const de_DescribeEngineDefaultClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2847,10 +2819,9 @@ const de_DescribeEngineDefaultClusterParametersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2872,7 +2843,7 @@ export const de_DescribeEventCategoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2888,10 +2859,9 @@ const de_DescribeEventCategoriesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2913,7 +2883,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2929,10 +2899,9 @@ const de_DescribeEventsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2954,7 +2923,7 @@ export const de_DescribeEventSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2975,10 +2944,9 @@ const de_DescribeEventSubscriptionsCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3001,7 +2969,7 @@ export const de_DescribeGlobalClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3022,10 +2990,9 @@ const de_DescribeGlobalClustersCommandError = async ( throw await de_GlobalClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3048,7 +3015,7 @@ export const de_DescribeOrderableDBInstanceOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3064,10 +3031,9 @@ const de_DescribeOrderableDBInstanceOptionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3089,7 +3055,7 @@ export const de_DescribePendingMaintenanceActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3110,10 +3076,9 @@ const de_DescribePendingMaintenanceActionsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3136,7 +3101,7 @@ export const de_FailoverDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3163,10 +3128,9 @@ const de_FailoverDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3189,7 +3153,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3216,10 +3180,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3242,7 +3205,7 @@ export const de_ModifyDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3293,10 +3256,9 @@ const de_ModifyDBClusterCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3319,7 +3281,7 @@ export const de_ModifyDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3343,10 +3305,9 @@ const de_ModifyDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3369,7 +3330,7 @@ export const de_ModifyDBClusterSnapshotAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3396,10 +3357,9 @@ const de_ModifyDBClusterSnapshotAttributeCommandError = async ( throw await de_SharedSnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3422,7 +3382,7 @@ export const de_ModifyDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3479,10 +3439,9 @@ const de_ModifyDBInstanceCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3505,7 +3464,7 @@ export const de_ModifyDBSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3538,10 +3497,9 @@ const de_ModifyDBSubnetGroupCommandError = async ( throw await de_SubnetAlreadyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3564,7 +3522,7 @@ export const de_ModifyEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3600,10 +3558,9 @@ const de_ModifyEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,7 +3583,7 @@ export const de_ModifyGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3650,10 +3607,9 @@ const de_ModifyGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3676,7 +3632,7 @@ export const de_RebootDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3700,10 +3656,9 @@ const de_RebootDBInstanceCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3726,7 +3681,7 @@ export const de_RemoveFromGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3753,10 +3708,9 @@ const de_RemoveFromGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3782,7 +3736,7 @@ export const de_RemoveSourceIdentifierFromSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3806,10 +3760,9 @@ const de_RemoveSourceIdentifierFromSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3829,7 +3782,7 @@ export const de_RemoveTagsFromResourceCommand = async ( const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3856,10 +3809,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3882,7 +3834,7 @@ export const de_ResetDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3906,10 +3858,9 @@ const de_ResetDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3932,7 +3883,7 @@ export const de_RestoreDBClusterFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3992,10 +3943,9 @@ const de_RestoreDBClusterFromSnapshotCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4018,7 +3968,7 @@ export const de_RestoreDBClusterToPointInTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4081,10 +4031,9 @@ const de_RestoreDBClusterToPointInTimeCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4107,7 +4056,7 @@ export const de_StartDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4134,10 +4083,9 @@ const de_StartDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4160,7 +4108,7 @@ export const de_StopDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4187,10 +4135,9 @@ const de_StopDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9695,6 +9642,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-drs/src/protocols/Aws_restJson1.ts b/clients/client-drs/src/protocols/Aws_restJson1.ts index db9172b7c356..eafc4806f119 100644 --- a/clients/client-drs/src/protocols/Aws_restJson1.ts +++ b/clients/client-drs/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -130,57 +131,21 @@ import { import { DrsServiceException as __BaseException } from "../models/DrsServiceException"; import { AccessDeniedException, - Account, ConflictException, - ConversionProperties, - CPU, - DataReplicationError, - DataReplicationInfo, - DataReplicationInfoReplicatedDisk, - DataReplicationInitiation, - DataReplicationInitiationStep, DescribeJobsRequestFilters, DescribeRecoveryInstancesRequestFilters, DescribeRecoverySnapshotsRequestFilters, DescribeSourceServersRequestFilters, - Disk, - IdentificationHints, InternalServerException, - Job, - JobLog, - JobLogEventData, Licensing, - LifeCycle, - LifeCycleLastLaunch, - LifeCycleLastLaunchInitiated, - NetworkInterface, - OS, - ParticipatingServer, PITPolicyRule, - RecoveryInstance, - RecoveryInstanceDataReplicationError, - RecoveryInstanceDataReplicationInfo, - RecoveryInstanceDataReplicationInfoReplicatedDisk, - RecoveryInstanceDataReplicationInitiation, - RecoveryInstanceDataReplicationInitiationStep, - RecoveryInstanceDisk, - RecoveryInstanceFailback, - RecoveryInstanceProperties, - RecoverySnapshot, ReplicationConfigurationReplicatedDisk, - ReplicationConfigurationTemplate, ResourceNotFoundException, ServiceQuotaExceededException, - SourceCloudProperties, - SourceProperties, - SourceServer, - StagingArea, - StagingSourceServer, StartRecoveryRequestSourceServer, ThrottlingException, UninitializedAccountException, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -197,10 +162,12 @@ export const se_CreateExtendedSourceServerCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateExtendedSourceServer"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerArn != null && { sourceServerArn: input.sourceServerArn }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + sourceServerArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -226,36 +193,25 @@ export const se_CreateReplicationConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateReplicationConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.associateDefaultSecurityGroup != null && { - associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, - }), - ...(input.autoReplicateNewDisks != null && { autoReplicateNewDisks: input.autoReplicateNewDisks }), - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }), - ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }), - ...(input.defaultLargeStagingDiskType != null && { - defaultLargeStagingDiskType: input.defaultLargeStagingDiskType, - }), - ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }), - ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), - ...(input.pitPolicy != null && { pitPolicy: se_PITPolicy(input.pitPolicy, context) }), - ...(input.replicationServerInstanceType != null && { - replicationServerInstanceType: input.replicationServerInstanceType, - }), - ...(input.replicationServersSecurityGroupsIDs != null && { - replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs( - input.replicationServersSecurityGroupsIDs, - context - ), - }), - ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), - ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.useDedicatedReplicationServer != null && { - useDedicatedReplicationServer: input.useDedicatedReplicationServer, - }), - }); + body = JSON.stringify( + take(input, { + associateDefaultSecurityGroup: [], + autoReplicateNewDisks: [], + bandwidthThrottling: [], + createPublicIP: [], + dataPlaneRouting: [], + defaultLargeStagingDiskType: [], + ebsEncryption: [], + ebsEncryptionKeyArn: [], + pitPolicy: (_) => _json(_), + replicationServerInstanceType: [], + replicationServersSecurityGroupsIDs: (_) => _json(_), + stagingAreaSubnetId: [], + stagingAreaTags: (_) => _json(_), + tags: (_) => _json(_), + useDedicatedReplicationServer: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -280,9 +236,11 @@ export const se_DeleteJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteJob"; let body: any; - body = JSON.stringify({ - ...(input.jobID != null && { jobID: input.jobID }), - }); + body = JSON.stringify( + take(input, { + jobID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -308,9 +266,11 @@ export const se_DeleteRecoveryInstanceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRecoveryInstance"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -336,11 +296,11 @@ export const se_DeleteReplicationConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteReplicationConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.replicationConfigurationTemplateID != null && { - replicationConfigurationTemplateID: input.replicationConfigurationTemplateID, - }), - }); + body = JSON.stringify( + take(input, { + replicationConfigurationTemplateID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -365,9 +325,11 @@ export const se_DeleteSourceServerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSourceServer"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -392,11 +354,13 @@ export const se_DescribeJobLogItemsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobLogItems"; let body: any; - body = JSON.stringify({ - ...(input.jobID != null && { jobID: input.jobID }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + jobID: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -421,11 +385,13 @@ export const se_DescribeJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DescribeJobsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -451,11 +417,13 @@ export const se_DescribeRecoveryInstancesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeRecoveryInstances"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DescribeRecoveryInstancesRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -481,13 +449,15 @@ export const se_DescribeRecoverySnapshotsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeRecoverySnapshots"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DescribeRecoverySnapshotsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.order != null && { order: input.order }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + order: [], + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -514,16 +484,13 @@ export const se_DescribeReplicationConfigurationTemplatesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeReplicationConfigurationTemplates"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.replicationConfigurationTemplateIDs != null && { - replicationConfigurationTemplateIDs: se_ReplicationConfigurationTemplateIDs( - input.replicationConfigurationTemplateIDs, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + replicationConfigurationTemplateIDs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -548,11 +515,13 @@ export const se_DescribeSourceServersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSourceServers"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DescribeSourceServersRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -578,9 +547,11 @@ export const se_DisconnectRecoveryInstanceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectRecoveryInstance"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -606,9 +577,11 @@ export const se_DisconnectSourceServerCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectSourceServer"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -634,9 +607,11 @@ export const se_GetFailbackReplicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetFailbackReplicationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -662,9 +637,11 @@ export const se_GetLaunchConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLaunchConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -690,9 +667,11 @@ export const se_GetReplicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetReplicationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -743,11 +722,13 @@ export const se_ListExtensibleSourceServersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListExtensibleSourceServers"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.stagingAccountID != null && { stagingAccountID: input.stagingAccountID }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + stagingAccountID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -822,9 +803,11 @@ export const se_RetryDataReplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RetryDataReplication"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -849,9 +832,11 @@ export const se_ReverseReplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ReverseReplication"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -876,12 +861,12 @@ export const se_StartFailbackLaunchCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartFailbackLaunch"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceIDs != null && { - recoveryInstanceIDs: se_StartFailbackRequestRecoveryInstanceIDs(input.recoveryInstanceIDs, context), - }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceIDs: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -906,13 +891,13 @@ export const se_StartRecoveryCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartRecovery"; let body: any; - body = JSON.stringify({ - ...(input.isDrill != null && { isDrill: input.isDrill }), - ...(input.sourceServers != null && { - sourceServers: se_StartRecoveryRequestSourceServers(input.sourceServers, context), - }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + isDrill: [], + sourceServers: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -937,9 +922,11 @@ export const se_StartReplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartReplication"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -964,9 +951,11 @@ export const se_StopFailbackCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopFailback"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -991,9 +980,11 @@ export const se_StopReplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopReplication"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1019,9 +1010,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1047,11 +1040,11 @@ export const se_TerminateRecoveryInstancesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TerminateRecoveryInstances"; let body: any; - body = JSON.stringify({ - ...(input.recoveryInstanceIDs != null && { - recoveryInstanceIDs: se_RecoveryInstancesForTerminationRequest(input.recoveryInstanceIDs, context), - }), - }); + body = JSON.stringify( + take(input, { + recoveryInstanceIDs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1107,12 +1100,14 @@ export const se_UpdateFailbackReplicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateFailbackReplicationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.name != null && { name: input.name }), - ...(input.recoveryInstanceID != null && { recoveryInstanceID: input.recoveryInstanceID }), - ...(input.usePrivateIP != null && { usePrivateIP: input.usePrivateIP }), - }); + body = JSON.stringify( + take(input, { + bandwidthThrottling: [], + name: [], + recoveryInstanceID: [], + usePrivateIP: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1138,17 +1133,17 @@ export const se_UpdateLaunchConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.copyPrivateIp != null && { copyPrivateIp: input.copyPrivateIp }), - ...(input.copyTags != null && { copyTags: input.copyTags }), - ...(input.launchDisposition != null && { launchDisposition: input.launchDisposition }), - ...(input.licensing != null && { licensing: se_Licensing(input.licensing, context) }), - ...(input.name != null && { name: input.name }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - ...(input.targetInstanceTypeRightSizingMethod != null && { - targetInstanceTypeRightSizingMethod: input.targetInstanceTypeRightSizingMethod, - }), - }); + body = JSON.stringify( + take(input, { + copyPrivateIp: [], + copyTags: [], + launchDisposition: [], + licensing: (_) => _json(_), + name: [], + sourceServerID: [], + targetInstanceTypeRightSizingMethod: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1174,40 +1169,27 @@ export const se_UpdateReplicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.associateDefaultSecurityGroup != null && { - associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, - }), - ...(input.autoReplicateNewDisks != null && { autoReplicateNewDisks: input.autoReplicateNewDisks }), - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }), - ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }), - ...(input.defaultLargeStagingDiskType != null && { - defaultLargeStagingDiskType: input.defaultLargeStagingDiskType, - }), - ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }), - ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), - ...(input.name != null && { name: input.name }), - ...(input.pitPolicy != null && { pitPolicy: se_PITPolicy(input.pitPolicy, context) }), - ...(input.replicatedDisks != null && { - replicatedDisks: se_ReplicationConfigurationReplicatedDisks(input.replicatedDisks, context), - }), - ...(input.replicationServerInstanceType != null && { - replicationServerInstanceType: input.replicationServerInstanceType, - }), - ...(input.replicationServersSecurityGroupsIDs != null && { - replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs( - input.replicationServersSecurityGroupsIDs, - context - ), - }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), - ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }), - ...(input.useDedicatedReplicationServer != null && { - useDedicatedReplicationServer: input.useDedicatedReplicationServer, - }), - }); + body = JSON.stringify( + take(input, { + associateDefaultSecurityGroup: [], + autoReplicateNewDisks: [], + bandwidthThrottling: [], + createPublicIP: [], + dataPlaneRouting: [], + defaultLargeStagingDiskType: [], + ebsEncryption: [], + ebsEncryptionKeyArn: [], + name: [], + pitPolicy: (_) => _json(_), + replicatedDisks: (_) => _json(_), + replicationServerInstanceType: [], + replicationServersSecurityGroupsIDs: (_) => _json(_), + sourceServerID: [], + stagingAreaSubnetId: [], + stagingAreaTags: (_) => _json(_), + useDedicatedReplicationServer: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1233,39 +1215,26 @@ export const se_UpdateReplicationConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.associateDefaultSecurityGroup != null && { - associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, - }), - ...(input.autoReplicateNewDisks != null && { autoReplicateNewDisks: input.autoReplicateNewDisks }), - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }), - ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }), - ...(input.defaultLargeStagingDiskType != null && { - defaultLargeStagingDiskType: input.defaultLargeStagingDiskType, - }), - ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }), - ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), - ...(input.pitPolicy != null && { pitPolicy: se_PITPolicy(input.pitPolicy, context) }), - ...(input.replicationConfigurationTemplateID != null && { - replicationConfigurationTemplateID: input.replicationConfigurationTemplateID, - }), - ...(input.replicationServerInstanceType != null && { - replicationServerInstanceType: input.replicationServerInstanceType, - }), - ...(input.replicationServersSecurityGroupsIDs != null && { - replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs( - input.replicationServersSecurityGroupsIDs, - context - ), - }), - ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), - ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }), - ...(input.useDedicatedReplicationServer != null && { - useDedicatedReplicationServer: input.useDedicatedReplicationServer, - }), - }); + body = JSON.stringify( + take(input, { + arn: [], + associateDefaultSecurityGroup: [], + autoReplicateNewDisks: [], + bandwidthThrottling: [], + createPublicIP: [], + dataPlaneRouting: [], + defaultLargeStagingDiskType: [], + ebsEncryption: [], + ebsEncryptionKeyArn: [], + pitPolicy: (_) => _json(_), + replicationConfigurationTemplateID: [], + replicationServerInstanceType: [], + replicationServersSecurityGroupsIDs: (_) => _json(_), + stagingAreaSubnetId: [], + stagingAreaTags: (_) => _json(_), + useDedicatedReplicationServer: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1291,9 +1260,10 @@ export const de_CreateExtendedSourceServerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.sourceServer != null) { - contents.sourceServer = de_SourceServer(data.sourceServer, context); - } + const doc = take(data, { + sourceServer: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1333,10 +1303,9 @@ const de_CreateExtendedSourceServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1356,60 +1325,26 @@ export const de_CreateReplicationConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.autoReplicateNewDisks != null) { - contents.autoReplicateNewDisks = __expectBoolean(data.autoReplicateNewDisks); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.pitPolicy != null) { - contents.pitPolicy = de_PITPolicy(data.pitPolicy, context); - } - if (data.replicationConfigurationTemplateID != null) { - contents.replicationConfigurationTemplateID = __expectString(data.replicationConfigurationTemplateID); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + arn: __expectString, + associateDefaultSecurityGroup: __expectBoolean, + autoReplicateNewDisks: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + pitPolicy: _json, + replicationConfigurationTemplateID: __expectString, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + tags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1446,10 +1381,9 @@ const de_CreateReplicationConfigurationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1502,10 +1436,9 @@ const de_DeleteJobCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1558,10 +1491,9 @@ const de_DeleteRecoveryInstanceCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1614,10 +1546,9 @@ const de_DeleteReplicationConfigurationTemplateCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1670,10 +1601,9 @@ const de_DeleteSourceServerCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1693,12 +1623,11 @@ export const de_DescribeJobLogItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_JobLogs(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1729,10 +1658,9 @@ const de_DescribeJobLogItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1752,12 +1680,11 @@ export const de_DescribeJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_JobsList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1788,10 +1715,9 @@ const de_DescribeJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1811,12 +1737,11 @@ export const de_DescribeRecoveryInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_DescribeRecoveryInstancesItems(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1847,10 +1772,9 @@ const de_DescribeRecoveryInstancesCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1870,12 +1794,11 @@ export const de_DescribeRecoverySnapshotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_RecoverySnapshotsList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1909,10 +1832,9 @@ const de_DescribeRecoverySnapshotsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1932,12 +1854,11 @@ export const de_DescribeReplicationConfigurationTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ReplicationConfigurationTemplates(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1971,10 +1892,9 @@ const de_DescribeReplicationConfigurationTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1994,12 +1914,11 @@ export const de_DescribeSourceServersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_SourceServersList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2030,10 +1949,9 @@ const de_DescribeSourceServersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2089,10 +2007,9 @@ const de_DisconnectRecoveryInstanceCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2112,42 +2029,21 @@ export const de_DisconnectSourceServerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.lastLaunchResult != null) { - contents.lastLaunchResult = __expectString(data.lastLaunchResult); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.recoveryInstanceId != null) { - contents.recoveryInstanceId = __expectString(data.recoveryInstanceId); - } - if (data.replicationDirection != null) { - contents.replicationDirection = __expectString(data.replicationDirection); - } - if (data.reversedDirectionSourceServerArn != null) { - contents.reversedDirectionSourceServerArn = __expectString(data.reversedDirectionSourceServerArn); - } - if (data.sourceCloudProperties != null) { - contents.sourceCloudProperties = de_SourceCloudProperties(data.sourceCloudProperties, context); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.stagingArea != null) { - contents.stagingArea = de_StagingArea(data.stagingArea, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + dataReplicationInfo: _json, + lastLaunchResult: __expectString, + lifeCycle: _json, + recoveryInstanceId: __expectString, + replicationDirection: __expectString, + reversedDirectionSourceServerArn: __expectString, + sourceCloudProperties: _json, + sourceProperties: _json, + sourceServerID: __expectString, + stagingArea: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2181,10 +2077,9 @@ const de_DisconnectSourceServerCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2204,18 +2099,13 @@ export const de_GetFailbackReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.recoveryInstanceID != null) { - contents.recoveryInstanceID = __expectString(data.recoveryInstanceID); - } - if (data.usePrivateIP != null) { - contents.usePrivateIP = __expectBoolean(data.usePrivateIP); - } + const doc = take(data, { + bandwidthThrottling: __expectLong, + name: __expectString, + recoveryInstanceID: __expectString, + usePrivateIP: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -2246,10 +2136,9 @@ const de_GetFailbackReplicationConfigurationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2269,30 +2158,17 @@ export const de_GetLaunchConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.copyPrivateIp != null) { - contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); - } - if (data.copyTags != null) { - contents.copyTags = __expectBoolean(data.copyTags); - } - if (data.ec2LaunchTemplateID != null) { - contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); - } - if (data.launchDisposition != null) { - contents.launchDisposition = __expectString(data.launchDisposition); - } - if (data.licensing != null) { - contents.licensing = de_Licensing(data.licensing, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.targetInstanceTypeRightSizingMethod != null) { - contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); - } + const doc = take(data, { + copyPrivateIp: __expectBoolean, + copyTags: __expectBoolean, + ec2LaunchTemplateID: __expectString, + launchDisposition: __expectString, + licensing: _json, + name: __expectString, + sourceServerID: __expectString, + targetInstanceTypeRightSizingMethod: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2323,10 +2199,9 @@ const de_GetLaunchConfigurationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2346,60 +2221,26 @@ export const de_GetReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.autoReplicateNewDisks != null) { - contents.autoReplicateNewDisks = __expectBoolean(data.autoReplicateNewDisks); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.pitPolicy != null) { - contents.pitPolicy = de_PITPolicy(data.pitPolicy, context); - } - if (data.replicatedDisks != null) { - contents.replicatedDisks = de_ReplicationConfigurationReplicatedDisks(data.replicatedDisks, context); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + associateDefaultSecurityGroup: __expectBoolean, + autoReplicateNewDisks: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + name: __expectString, + pitPolicy: _json, + replicatedDisks: _json, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + sourceServerID: __expectString, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -2433,10 +2274,9 @@ const de_GetReplicationConfigurationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2486,10 +2326,9 @@ const de_InitializeServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2509,12 +2348,11 @@ export const de_ListExtensibleSourceServersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_StagingSourceServersList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2548,10 +2386,9 @@ const de_ListExtensibleSourceServersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2571,12 +2408,11 @@ export const de_ListStagingAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accounts != null) { - contents.accounts = de_Accounts(data.accounts, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + accounts: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2610,10 +2446,9 @@ const de_ListStagingAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2633,9 +2468,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2669,10 +2505,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2692,42 +2527,21 @@ export const de_RetryDataReplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.lastLaunchResult != null) { - contents.lastLaunchResult = __expectString(data.lastLaunchResult); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.recoveryInstanceId != null) { - contents.recoveryInstanceId = __expectString(data.recoveryInstanceId); - } - if (data.replicationDirection != null) { - contents.replicationDirection = __expectString(data.replicationDirection); - } - if (data.reversedDirectionSourceServerArn != null) { - contents.reversedDirectionSourceServerArn = __expectString(data.reversedDirectionSourceServerArn); - } - if (data.sourceCloudProperties != null) { - contents.sourceCloudProperties = de_SourceCloudProperties(data.sourceCloudProperties, context); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.stagingArea != null) { - contents.stagingArea = de_StagingArea(data.stagingArea, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + dataReplicationInfo: _json, + lastLaunchResult: __expectString, + lifeCycle: _json, + recoveryInstanceId: __expectString, + replicationDirection: __expectString, + reversedDirectionSourceServerArn: __expectString, + sourceCloudProperties: _json, + sourceProperties: _json, + sourceServerID: __expectString, + stagingArea: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2761,10 +2575,9 @@ const de_RetryDataReplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2784,9 +2597,10 @@ export const de_ReverseReplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reversedDirectionSourceServerArn != null) { - contents.reversedDirectionSourceServerArn = __expectString(data.reversedDirectionSourceServerArn); - } + const doc = take(data, { + reversedDirectionSourceServerArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2826,10 +2640,9 @@ const de_ReverseReplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2849,9 +2662,10 @@ export const de_StartFailbackLaunchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2888,10 +2702,9 @@ const de_StartFailbackLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2911,9 +2724,10 @@ export const de_StartRecoveryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2947,10 +2761,9 @@ const de_StartRecoveryCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2970,9 +2783,10 @@ export const de_StartReplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.sourceServer != null) { - contents.sourceServer = de_SourceServer(data.sourceServer, context); - } + const doc = take(data, { + sourceServer: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3006,10 +2820,9 @@ const de_StartReplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3059,10 +2872,9 @@ const de_StopFailbackCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3082,9 +2894,10 @@ export const de_StopReplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.sourceServer != null) { - contents.sourceServer = de_SourceServer(data.sourceServer, context); - } + const doc = take(data, { + sourceServer: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3118,10 +2931,9 @@ const de_StopReplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3174,10 +2986,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3197,9 +3008,10 @@ export const de_TerminateRecoveryInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3233,10 +3045,9 @@ const de_TerminateRecoveryInstancesCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3289,10 +3100,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3345,10 +3155,9 @@ const de_UpdateFailbackReplicationConfigurationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3368,30 +3177,17 @@ export const de_UpdateLaunchConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.copyPrivateIp != null) { - contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); - } - if (data.copyTags != null) { - contents.copyTags = __expectBoolean(data.copyTags); - } - if (data.ec2LaunchTemplateID != null) { - contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); - } - if (data.launchDisposition != null) { - contents.launchDisposition = __expectString(data.launchDisposition); - } - if (data.licensing != null) { - contents.licensing = de_Licensing(data.licensing, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.targetInstanceTypeRightSizingMethod != null) { - contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); - } + const doc = take(data, { + copyPrivateIp: __expectBoolean, + copyTags: __expectBoolean, + ec2LaunchTemplateID: __expectString, + launchDisposition: __expectString, + licensing: _json, + name: __expectString, + sourceServerID: __expectString, + targetInstanceTypeRightSizingMethod: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3428,10 +3224,9 @@ const de_UpdateLaunchConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3451,60 +3246,26 @@ export const de_UpdateReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.autoReplicateNewDisks != null) { - contents.autoReplicateNewDisks = __expectBoolean(data.autoReplicateNewDisks); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.pitPolicy != null) { - contents.pitPolicy = de_PITPolicy(data.pitPolicy, context); - } - if (data.replicatedDisks != null) { - contents.replicatedDisks = de_ReplicationConfigurationReplicatedDisks(data.replicatedDisks, context); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + associateDefaultSecurityGroup: __expectBoolean, + autoReplicateNewDisks: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + name: __expectString, + pitPolicy: _json, + replicatedDisks: _json, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + sourceServerID: __expectString, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -3544,10 +3305,9 @@ const de_UpdateReplicationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3567,60 +3327,26 @@ export const de_UpdateReplicationConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.autoReplicateNewDisks != null) { - contents.autoReplicateNewDisks = __expectBoolean(data.autoReplicateNewDisks); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.pitPolicy != null) { - contents.pitPolicy = de_PITPolicy(data.pitPolicy, context); - } - if (data.replicationConfigurationTemplateID != null) { - contents.replicationConfigurationTemplateID = __expectString(data.replicationConfigurationTemplateID); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + arn: __expectString, + associateDefaultSecurityGroup: __expectBoolean, + autoReplicateNewDisks: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + pitPolicy: _json, + replicationConfigurationTemplateID: __expectString, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + tags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -3657,16 +3383,15 @@ const de_UpdateReplicationConfigurationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3676,12 +3401,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3695,18 +3419,13 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3728,9 +3447,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3747,18 +3467,13 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3775,24 +3490,15 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3808,15 +3514,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3833,12 +3536,11 @@ const de_UninitializedAccountExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UninitializedAccountException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3852,18 +3554,13 @@ const de_UninitializedAccountExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + code: __expectString, + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3871,1233 +3568,179 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountIDs - */ -const se_AccountIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIDs omitted. -/** - * serializeAws_restJson1DescribeJobsRequestFilters - */ -const se_DescribeJobsRequestFilters = (input: DescribeJobsRequestFilters, context: __SerdeContext): any => { - return { - ...(input.fromDate != null && { fromDate: input.fromDate }), - ...(input.jobIDs != null && { jobIDs: se_DescribeJobsRequestFiltersJobIDs(input.jobIDs, context) }), - ...(input.toDate != null && { toDate: input.toDate }), - }; -}; +// se_DescribeJobsRequestFilters omitted. -/** - * serializeAws_restJson1DescribeJobsRequestFiltersJobIDs - */ -const se_DescribeJobsRequestFiltersJobIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeJobsRequestFiltersJobIDs omitted. -/** - * serializeAws_restJson1DescribeRecoveryInstancesRequestFilters - */ -const se_DescribeRecoveryInstancesRequestFilters = ( - input: DescribeRecoveryInstancesRequestFilters, - context: __SerdeContext -): any => { - return { - ...(input.recoveryInstanceIDs != null && { - recoveryInstanceIDs: se_RecoveryInstanceIDs(input.recoveryInstanceIDs, context), - }), - ...(input.sourceServerIDs != null && { sourceServerIDs: se_SourceServerIDs(input.sourceServerIDs, context) }), - }; -}; +// se_DescribeRecoveryInstancesRequestFilters omitted. -/** - * serializeAws_restJson1DescribeRecoverySnapshotsRequestFilters - */ -const se_DescribeRecoverySnapshotsRequestFilters = ( - input: DescribeRecoverySnapshotsRequestFilters, - context: __SerdeContext -): any => { - return { - ...(input.fromDateTime != null && { fromDateTime: input.fromDateTime }), - ...(input.toDateTime != null && { toDateTime: input.toDateTime }), - }; -}; +// se_DescribeRecoverySnapshotsRequestFilters omitted. -/** - * serializeAws_restJson1DescribeSourceServersRequestFilters - */ -const se_DescribeSourceServersRequestFilters = ( - input: DescribeSourceServersRequestFilters, - context: __SerdeContext -): any => { - return { - ...(input.hardwareId != null && { hardwareId: input.hardwareId }), - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_DescribeSourceServersRequestFiltersIDs(input.sourceServerIDs, context), - }), - ...(input.stagingAccountIDs != null && { stagingAccountIDs: se_AccountIDs(input.stagingAccountIDs, context) }), - }; -}; +// se_DescribeSourceServersRequestFilters omitted. -/** - * serializeAws_restJson1DescribeSourceServersRequestFiltersIDs - */ -const se_DescribeSourceServersRequestFiltersIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeSourceServersRequestFiltersIDs omitted. -/** - * serializeAws_restJson1Licensing - */ -const se_Licensing = (input: Licensing, context: __SerdeContext): any => { - return { - ...(input.osByol != null && { osByol: input.osByol }), - }; -}; +// se_Licensing omitted. -/** - * serializeAws_restJson1PITPolicy - */ -const se_PITPolicy = (input: PITPolicyRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PITPolicyRule(entry, context); - }); -}; +// se_PITPolicy omitted. -/** - * serializeAws_restJson1PITPolicyRule - */ -const se_PITPolicyRule = (input: PITPolicyRule, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.interval != null && { interval: input.interval }), - ...(input.retentionDuration != null && { retentionDuration: input.retentionDuration }), - ...(input.ruleID != null && { ruleID: input.ruleID }), - ...(input.units != null && { units: input.units }), - }; -}; +// se_PITPolicyRule omitted. -/** - * serializeAws_restJson1RecoveryInstanceIDs - */ -const se_RecoveryInstanceIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RecoveryInstanceIDs omitted. -/** - * serializeAws_restJson1RecoveryInstancesForTerminationRequest - */ -const se_RecoveryInstancesForTerminationRequest = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RecoveryInstancesForTerminationRequest omitted. -/** - * serializeAws_restJson1ReplicationConfigurationReplicatedDisk - */ -const se_ReplicationConfigurationReplicatedDisk = ( - input: ReplicationConfigurationReplicatedDisk, - context: __SerdeContext -): any => { - return { - ...(input.deviceName != null && { deviceName: input.deviceName }), - ...(input.iops != null && { iops: input.iops }), - ...(input.isBootDisk != null && { isBootDisk: input.isBootDisk }), - ...(input.optimizedStagingDiskType != null && { optimizedStagingDiskType: input.optimizedStagingDiskType }), - ...(input.stagingDiskType != null && { stagingDiskType: input.stagingDiskType }), - ...(input.throughput != null && { throughput: input.throughput }), - }; -}; +// se_ReplicationConfigurationReplicatedDisk omitted. -/** - * serializeAws_restJson1ReplicationConfigurationReplicatedDisks - */ -const se_ReplicationConfigurationReplicatedDisks = ( - input: ReplicationConfigurationReplicatedDisk[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicationConfigurationReplicatedDisk(entry, context); - }); -}; +// se_ReplicationConfigurationReplicatedDisks omitted. -/** - * serializeAws_restJson1ReplicationConfigurationTemplateIDs - */ -const se_ReplicationConfigurationTemplateIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ReplicationConfigurationTemplateIDs omitted. -/** - * serializeAws_restJson1ReplicationServersSecurityGroupsIDs - */ -const se_ReplicationServersSecurityGroupsIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ReplicationServersSecurityGroupsIDs omitted. -/** - * serializeAws_restJson1SourceServerIDs - */ -const se_SourceServerIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SourceServerIDs omitted. -/** - * serializeAws_restJson1StartFailbackRequestRecoveryInstanceIDs - */ -const se_StartFailbackRequestRecoveryInstanceIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StartFailbackRequestRecoveryInstanceIDs omitted. -/** - * serializeAws_restJson1StartRecoveryRequestSourceServer - */ -const se_StartRecoveryRequestSourceServer = (input: StartRecoveryRequestSourceServer, context: __SerdeContext): any => { - return { - ...(input.recoverySnapshotID != null && { recoverySnapshotID: input.recoverySnapshotID }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }; -}; +// se_StartRecoveryRequestSourceServer omitted. -/** - * serializeAws_restJson1StartRecoveryRequestSourceServers - */ -const se_StartRecoveryRequestSourceServers = ( - input: StartRecoveryRequestSourceServer[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StartRecoveryRequestSourceServer(entry, context); - }); -}; +// se_StartRecoveryRequestSourceServers omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. -/** - * deserializeAws_restJson1Account - */ -const de_Account = (output: any, context: __SerdeContext): Account => { - return { - accountID: __expectString(output.accountID), - } as any; -}; +// de_Account omitted. -/** - * deserializeAws_restJson1Accounts - */ -const de_Accounts = (output: any, context: __SerdeContext): Account[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Account(entry, context); - }); - return retVal; -}; +// de_Accounts omitted. -/** - * deserializeAws_restJson1ConversionMap - */ -const de_ConversionMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ConversionMap omitted. -/** - * deserializeAws_restJson1ConversionProperties - */ -const de_ConversionProperties = (output: any, context: __SerdeContext): ConversionProperties => { - return { - dataTimestamp: __expectString(output.dataTimestamp), - forceUefi: __expectBoolean(output.forceUefi), - rootVolumeName: __expectString(output.rootVolumeName), - volumeToConversionMap: - output.volumeToConversionMap != null - ? de_VolumeToConversionMap(output.volumeToConversionMap, context) - : undefined, - volumeToVolumeSize: - output.volumeToVolumeSize != null ? de_VolumeToSizeMap(output.volumeToVolumeSize, context) : undefined, - } as any; -}; +// de_ConversionProperties omitted. -/** - * deserializeAws_restJson1CPU - */ -const de_CPU = (output: any, context: __SerdeContext): CPU => { - return { - cores: __expectLong(output.cores), - modelName: __expectString(output.modelName), - } as any; -}; +// de_CPU omitted. -/** - * deserializeAws_restJson1Cpus - */ -const de_Cpus = (output: any, context: __SerdeContext): CPU[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CPU(entry, context); - }); - return retVal; -}; +// de_Cpus omitted. -/** - * deserializeAws_restJson1DataReplicationError - */ -const de_DataReplicationError = (output: any, context: __SerdeContext): DataReplicationError => { - return { - error: __expectString(output.error), - rawError: __expectString(output.rawError), - } as any; -}; +// de_DataReplicationError omitted. -/** - * deserializeAws_restJson1DataReplicationInfo - */ -const de_DataReplicationInfo = (output: any, context: __SerdeContext): DataReplicationInfo => { - return { - dataReplicationError: - output.dataReplicationError != null ? de_DataReplicationError(output.dataReplicationError, context) : undefined, - dataReplicationInitiation: - output.dataReplicationInitiation != null - ? de_DataReplicationInitiation(output.dataReplicationInitiation, context) - : undefined, - dataReplicationState: __expectString(output.dataReplicationState), - etaDateTime: __expectString(output.etaDateTime), - lagDuration: __expectString(output.lagDuration), - replicatedDisks: - output.replicatedDisks != null - ? de_DataReplicationInfoReplicatedDisks(output.replicatedDisks, context) - : undefined, - stagingAvailabilityZone: __expectString(output.stagingAvailabilityZone), - } as any; -}; +// de_DataReplicationInfo omitted. -/** - * deserializeAws_restJson1DataReplicationInfoReplicatedDisk - */ -const de_DataReplicationInfoReplicatedDisk = ( - output: any, - context: __SerdeContext -): DataReplicationInfoReplicatedDisk => { - return { - backloggedStorageBytes: __expectLong(output.backloggedStorageBytes), - deviceName: __expectString(output.deviceName), - replicatedStorageBytes: __expectLong(output.replicatedStorageBytes), - rescannedStorageBytes: __expectLong(output.rescannedStorageBytes), - totalStorageBytes: __expectLong(output.totalStorageBytes), - } as any; -}; +// de_DataReplicationInfoReplicatedDisk omitted. -/** - * deserializeAws_restJson1DataReplicationInfoReplicatedDisks - */ -const de_DataReplicationInfoReplicatedDisks = ( - output: any, - context: __SerdeContext -): DataReplicationInfoReplicatedDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataReplicationInfoReplicatedDisk(entry, context); - }); - return retVal; -}; +// de_DataReplicationInfoReplicatedDisks omitted. -/** - * deserializeAws_restJson1DataReplicationInitiation - */ -const de_DataReplicationInitiation = (output: any, context: __SerdeContext): DataReplicationInitiation => { - return { - nextAttemptDateTime: __expectString(output.nextAttemptDateTime), - startDateTime: __expectString(output.startDateTime), - steps: output.steps != null ? de_DataReplicationInitiationSteps(output.steps, context) : undefined, - } as any; -}; +// de_DataReplicationInitiation omitted. -/** - * deserializeAws_restJson1DataReplicationInitiationStep - */ -const de_DataReplicationInitiationStep = (output: any, context: __SerdeContext): DataReplicationInitiationStep => { - return { - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_DataReplicationInitiationStep omitted. -/** - * deserializeAws_restJson1DataReplicationInitiationSteps - */ -const de_DataReplicationInitiationSteps = (output: any, context: __SerdeContext): DataReplicationInitiationStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataReplicationInitiationStep(entry, context); - }); - return retVal; -}; +// de_DataReplicationInitiationSteps omitted. -/** - * deserializeAws_restJson1DescribeRecoveryInstancesItems - */ -const de_DescribeRecoveryInstancesItems = (output: any, context: __SerdeContext): RecoveryInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoveryInstance(entry, context); - }); - return retVal; -}; +// de_DescribeRecoveryInstancesItems omitted. -/** - * deserializeAws_restJson1Disk - */ -const de_Disk = (output: any, context: __SerdeContext): Disk => { - return { - bytes: __expectLong(output.bytes), - deviceName: __expectString(output.deviceName), - } as any; -}; +// de_Disk omitted. -/** - * deserializeAws_restJson1Disks - */ -const de_Disks = (output: any, context: __SerdeContext): Disk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Disk(entry, context); - }); - return retVal; -}; +// de_Disks omitted. -/** - * deserializeAws_restJson1EbsSnapshotsList - */ -const de_EbsSnapshotsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EbsSnapshotsList omitted. -/** - * deserializeAws_restJson1IdentificationHints - */ -const de_IdentificationHints = (output: any, context: __SerdeContext): IdentificationHints => { - return { - awsInstanceID: __expectString(output.awsInstanceID), - fqdn: __expectString(output.fqdn), - hostname: __expectString(output.hostname), - vmWareUuid: __expectString(output.vmWareUuid), - } as any; -}; +// de_IdentificationHints omitted. -/** - * deserializeAws_restJson1IPsList - */ -const de_IPsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IPsList omitted. -/** - * deserializeAws_restJson1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - arn: __expectString(output.arn), - creationDateTime: __expectString(output.creationDateTime), - endDateTime: __expectString(output.endDateTime), - initiatedBy: __expectString(output.initiatedBy), - jobID: __expectString(output.jobID), - participatingServers: - output.participatingServers != null ? de_ParticipatingServers(output.participatingServers, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_Job omitted. -/** - * deserializeAws_restJson1JobLog - */ -const de_JobLog = (output: any, context: __SerdeContext): JobLog => { - return { - event: __expectString(output.event), - eventData: output.eventData != null ? de_JobLogEventData(output.eventData, context) : undefined, - logDateTime: __expectString(output.logDateTime), - } as any; -}; +// de_JobLog omitted. -/** - * deserializeAws_restJson1JobLogEventData - */ -const de_JobLogEventData = (output: any, context: __SerdeContext): JobLogEventData => { - return { - conversionProperties: - output.conversionProperties != null ? de_ConversionProperties(output.conversionProperties, context) : undefined, - conversionServerID: __expectString(output.conversionServerID), - rawError: __expectString(output.rawError), - sourceServerID: __expectString(output.sourceServerID), - targetInstanceID: __expectString(output.targetInstanceID), - } as any; -}; +// de_JobLogEventData omitted. -/** - * deserializeAws_restJson1JobLogs - */ -const de_JobLogs = (output: any, context: __SerdeContext): JobLog[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobLog(entry, context); - }); - return retVal; -}; +// de_JobLogs omitted. -/** - * deserializeAws_restJson1JobsList - */ -const de_JobsList = (output: any, context: __SerdeContext): Job[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Job(entry, context); - }); - return retVal; -}; +// de_JobsList omitted. -/** - * deserializeAws_restJson1Licensing - */ -const de_Licensing = (output: any, context: __SerdeContext): Licensing => { - return { - osByol: __expectBoolean(output.osByol), - } as any; -}; +// de_Licensing omitted. -/** - * deserializeAws_restJson1LifeCycle - */ -const de_LifeCycle = (output: any, context: __SerdeContext): LifeCycle => { - return { - addedToServiceDateTime: __expectString(output.addedToServiceDateTime), - elapsedReplicationDuration: __expectString(output.elapsedReplicationDuration), - firstByteDateTime: __expectString(output.firstByteDateTime), - lastLaunch: output.lastLaunch != null ? de_LifeCycleLastLaunch(output.lastLaunch, context) : undefined, - lastSeenByServiceDateTime: __expectString(output.lastSeenByServiceDateTime), - } as any; -}; +// de_LifeCycle omitted. -/** - * deserializeAws_restJson1LifeCycleLastLaunch - */ -const de_LifeCycleLastLaunch = (output: any, context: __SerdeContext): LifeCycleLastLaunch => { - return { - initiated: output.initiated != null ? de_LifeCycleLastLaunchInitiated(output.initiated, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_LifeCycleLastLaunch omitted. -/** - * deserializeAws_restJson1LifeCycleLastLaunchInitiated - */ -const de_LifeCycleLastLaunchInitiated = (output: any, context: __SerdeContext): LifeCycleLastLaunchInitiated => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - jobID: __expectString(output.jobID), - type: __expectString(output.type), - } as any; -}; +// de_LifeCycleLastLaunchInitiated omitted. -/** - * deserializeAws_restJson1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - ips: output.ips != null ? de_IPsList(output.ips, context) : undefined, - isPrimary: __expectBoolean(output.isPrimary), - macAddress: __expectString(output.macAddress), - } as any; -}; +// de_NetworkInterface omitted. -/** - * deserializeAws_restJson1NetworkInterfaces - */ -const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; -}; +// de_NetworkInterfaces omitted. -/** - * deserializeAws_restJson1OS - */ -const de_OS = (output: any, context: __SerdeContext): OS => { - return { - fullString: __expectString(output.fullString), - } as any; -}; +// de_OS omitted. -/** - * deserializeAws_restJson1ParticipatingServer - */ -const de_ParticipatingServer = (output: any, context: __SerdeContext): ParticipatingServer => { - return { - launchStatus: __expectString(output.launchStatus), - recoveryInstanceID: __expectString(output.recoveryInstanceID), - sourceServerID: __expectString(output.sourceServerID), - } as any; -}; +// de_ParticipatingServer omitted. -/** - * deserializeAws_restJson1ParticipatingServers - */ -const de_ParticipatingServers = (output: any, context: __SerdeContext): ParticipatingServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParticipatingServer(entry, context); - }); - return retVal; -}; +// de_ParticipatingServers omitted. -/** - * deserializeAws_restJson1PITPolicy - */ -const de_PITPolicy = (output: any, context: __SerdeContext): PITPolicyRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PITPolicyRule(entry, context); - }); - return retVal; -}; +// de_PITPolicy omitted. -/** - * deserializeAws_restJson1PITPolicyRule - */ -const de_PITPolicyRule = (output: any, context: __SerdeContext): PITPolicyRule => { - return { - enabled: __expectBoolean(output.enabled), - interval: __expectInt32(output.interval), - retentionDuration: __expectInt32(output.retentionDuration), - ruleID: __expectLong(output.ruleID), - units: __expectString(output.units), - } as any; -}; +// de_PITPolicyRule omitted. -/** - * deserializeAws_restJson1RecoveryInstance - */ -const de_RecoveryInstance = (output: any, context: __SerdeContext): RecoveryInstance => { - return { - arn: __expectString(output.arn), - dataReplicationInfo: - output.dataReplicationInfo != null - ? de_RecoveryInstanceDataReplicationInfo(output.dataReplicationInfo, context) - : undefined, - ec2InstanceID: __expectString(output.ec2InstanceID), - ec2InstanceState: __expectString(output.ec2InstanceState), - failback: output.failback != null ? de_RecoveryInstanceFailback(output.failback, context) : undefined, - isDrill: __expectBoolean(output.isDrill), - jobID: __expectString(output.jobID), - originAvailabilityZone: __expectString(output.originAvailabilityZone), - originEnvironment: __expectString(output.originEnvironment), - pointInTimeSnapshotDateTime: __expectString(output.pointInTimeSnapshotDateTime), - recoveryInstanceID: __expectString(output.recoveryInstanceID), - recoveryInstanceProperties: - output.recoveryInstanceProperties != null - ? de_RecoveryInstanceProperties(output.recoveryInstanceProperties, context) - : undefined, - sourceServerID: __expectString(output.sourceServerID), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; -}; +// de_RecoveryInstance omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationError - */ -const de_RecoveryInstanceDataReplicationError = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationError => { - return { - error: __expectString(output.error), - rawError: __expectString(output.rawError), - } as any; -}; +// de_RecoveryInstanceDataReplicationError omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationInfo - */ -const de_RecoveryInstanceDataReplicationInfo = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationInfo => { - return { - dataReplicationError: - output.dataReplicationError != null - ? de_RecoveryInstanceDataReplicationError(output.dataReplicationError, context) - : undefined, - dataReplicationInitiation: - output.dataReplicationInitiation != null - ? de_RecoveryInstanceDataReplicationInitiation(output.dataReplicationInitiation, context) - : undefined, - dataReplicationState: __expectString(output.dataReplicationState), - etaDateTime: __expectString(output.etaDateTime), - lagDuration: __expectString(output.lagDuration), - replicatedDisks: - output.replicatedDisks != null - ? de_RecoveryInstanceDataReplicationInfoReplicatedDisks(output.replicatedDisks, context) - : undefined, - stagingAvailabilityZone: __expectString(output.stagingAvailabilityZone), - } as any; -}; +// de_RecoveryInstanceDataReplicationInfo omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationInfoReplicatedDisk - */ -const de_RecoveryInstanceDataReplicationInfoReplicatedDisk = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationInfoReplicatedDisk => { - return { - backloggedStorageBytes: __expectLong(output.backloggedStorageBytes), - deviceName: __expectString(output.deviceName), - replicatedStorageBytes: __expectLong(output.replicatedStorageBytes), - rescannedStorageBytes: __expectLong(output.rescannedStorageBytes), - totalStorageBytes: __expectLong(output.totalStorageBytes), - } as any; -}; +// de_RecoveryInstanceDataReplicationInfoReplicatedDisk omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationInfoReplicatedDisks - */ -const de_RecoveryInstanceDataReplicationInfoReplicatedDisks = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationInfoReplicatedDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoveryInstanceDataReplicationInfoReplicatedDisk(entry, context); - }); - return retVal; -}; +// de_RecoveryInstanceDataReplicationInfoReplicatedDisks omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationInitiation - */ -const de_RecoveryInstanceDataReplicationInitiation = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationInitiation => { - return { - startDateTime: __expectString(output.startDateTime), - steps: output.steps != null ? de_RecoveryInstanceDataReplicationInitiationSteps(output.steps, context) : undefined, - } as any; -}; +// de_RecoveryInstanceDataReplicationInitiation omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationInitiationStep - */ -const de_RecoveryInstanceDataReplicationInitiationStep = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationInitiationStep => { - return { - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_RecoveryInstanceDataReplicationInitiationStep omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDataReplicationInitiationSteps - */ -const de_RecoveryInstanceDataReplicationInitiationSteps = ( - output: any, - context: __SerdeContext -): RecoveryInstanceDataReplicationInitiationStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoveryInstanceDataReplicationInitiationStep(entry, context); - }); - return retVal; -}; +// de_RecoveryInstanceDataReplicationInitiationSteps omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDisk - */ -const de_RecoveryInstanceDisk = (output: any, context: __SerdeContext): RecoveryInstanceDisk => { - return { - bytes: __expectLong(output.bytes), - ebsVolumeID: __expectString(output.ebsVolumeID), - internalDeviceName: __expectString(output.internalDeviceName), - } as any; -}; +// de_RecoveryInstanceDisk omitted. -/** - * deserializeAws_restJson1RecoveryInstanceDisks - */ -const de_RecoveryInstanceDisks = (output: any, context: __SerdeContext): RecoveryInstanceDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoveryInstanceDisk(entry, context); - }); - return retVal; -}; +// de_RecoveryInstanceDisks omitted. -/** - * deserializeAws_restJson1RecoveryInstanceFailback - */ -const de_RecoveryInstanceFailback = (output: any, context: __SerdeContext): RecoveryInstanceFailback => { - return { - agentLastSeenByServiceDateTime: __expectString(output.agentLastSeenByServiceDateTime), - elapsedReplicationDuration: __expectString(output.elapsedReplicationDuration), - failbackClientID: __expectString(output.failbackClientID), - failbackClientLastSeenByServiceDateTime: __expectString(output.failbackClientLastSeenByServiceDateTime), - failbackInitiationTime: __expectString(output.failbackInitiationTime), - failbackJobID: __expectString(output.failbackJobID), - failbackLaunchType: __expectString(output.failbackLaunchType), - failbackToOriginalServer: __expectBoolean(output.failbackToOriginalServer), - firstByteDateTime: __expectString(output.firstByteDateTime), - state: __expectString(output.state), - } as any; -}; +// de_RecoveryInstanceFailback omitted. -/** - * deserializeAws_restJson1RecoveryInstanceProperties - */ -const de_RecoveryInstanceProperties = (output: any, context: __SerdeContext): RecoveryInstanceProperties => { - return { - cpus: output.cpus != null ? de_Cpus(output.cpus, context) : undefined, - disks: output.disks != null ? de_RecoveryInstanceDisks(output.disks, context) : undefined, - identificationHints: - output.identificationHints != null ? de_IdentificationHints(output.identificationHints, context) : undefined, - lastUpdatedDateTime: __expectString(output.lastUpdatedDateTime), - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - os: output.os != null ? de_OS(output.os, context) : undefined, - ramBytes: __expectLong(output.ramBytes), - } as any; -}; +// de_RecoveryInstanceProperties omitted. -/** - * deserializeAws_restJson1RecoverySnapshot - */ -const de_RecoverySnapshot = (output: any, context: __SerdeContext): RecoverySnapshot => { - return { - ebsSnapshots: output.ebsSnapshots != null ? de_EbsSnapshotsList(output.ebsSnapshots, context) : undefined, - expectedTimestamp: __expectString(output.expectedTimestamp), - snapshotID: __expectString(output.snapshotID), - sourceServerID: __expectString(output.sourceServerID), - timestamp: __expectString(output.timestamp), - } as any; -}; +// de_RecoverySnapshot omitted. -/** - * deserializeAws_restJson1RecoverySnapshotsList - */ -const de_RecoverySnapshotsList = (output: any, context: __SerdeContext): RecoverySnapshot[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecoverySnapshot(entry, context); - }); - return retVal; -}; +// de_RecoverySnapshotsList omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationReplicatedDisk - */ -const de_ReplicationConfigurationReplicatedDisk = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationReplicatedDisk => { - return { - deviceName: __expectString(output.deviceName), - iops: __expectLong(output.iops), - isBootDisk: __expectBoolean(output.isBootDisk), - optimizedStagingDiskType: __expectString(output.optimizedStagingDiskType), - stagingDiskType: __expectString(output.stagingDiskType), - throughput: __expectLong(output.throughput), - } as any; -}; +// de_ReplicationConfigurationReplicatedDisk omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationReplicatedDisks - */ -const de_ReplicationConfigurationReplicatedDisks = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationReplicatedDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationConfigurationReplicatedDisk(entry, context); - }); - return retVal; -}; +// de_ReplicationConfigurationReplicatedDisks omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationTemplate - */ -const de_ReplicationConfigurationTemplate = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationTemplate => { - return { - arn: __expectString(output.arn), - associateDefaultSecurityGroup: __expectBoolean(output.associateDefaultSecurityGroup), - autoReplicateNewDisks: __expectBoolean(output.autoReplicateNewDisks), - bandwidthThrottling: __expectLong(output.bandwidthThrottling), - createPublicIP: __expectBoolean(output.createPublicIP), - dataPlaneRouting: __expectString(output.dataPlaneRouting), - defaultLargeStagingDiskType: __expectString(output.defaultLargeStagingDiskType), - ebsEncryption: __expectString(output.ebsEncryption), - ebsEncryptionKeyArn: __expectString(output.ebsEncryptionKeyArn), - pitPolicy: output.pitPolicy != null ? de_PITPolicy(output.pitPolicy, context) : undefined, - replicationConfigurationTemplateID: __expectString(output.replicationConfigurationTemplateID), - replicationServerInstanceType: __expectString(output.replicationServerInstanceType), - replicationServersSecurityGroupsIDs: - output.replicationServersSecurityGroupsIDs != null - ? de_ReplicationServersSecurityGroupsIDs(output.replicationServersSecurityGroupsIDs, context) - : undefined, - stagingAreaSubnetId: __expectString(output.stagingAreaSubnetId), - stagingAreaTags: output.stagingAreaTags != null ? de_TagsMap(output.stagingAreaTags, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - useDedicatedReplicationServer: __expectBoolean(output.useDedicatedReplicationServer), - } as any; -}; +// de_ReplicationConfigurationTemplate omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationTemplates - */ -const de_ReplicationConfigurationTemplates = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationTemplate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationConfigurationTemplate(entry, context); - }); - return retVal; -}; +// de_ReplicationConfigurationTemplates omitted. -/** - * deserializeAws_restJson1ReplicationServersSecurityGroupsIDs - */ -const de_ReplicationServersSecurityGroupsIDs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ReplicationServersSecurityGroupsIDs omitted. -/** - * deserializeAws_restJson1SourceCloudProperties - */ -const de_SourceCloudProperties = (output: any, context: __SerdeContext): SourceCloudProperties => { - return { - originAccountID: __expectString(output.originAccountID), - originAvailabilityZone: __expectString(output.originAvailabilityZone), - originRegion: __expectString(output.originRegion), - } as any; -}; +// de_SourceCloudProperties omitted. -/** - * deserializeAws_restJson1SourceProperties - */ -const de_SourceProperties = (output: any, context: __SerdeContext): SourceProperties => { - return { - cpus: output.cpus != null ? de_Cpus(output.cpus, context) : undefined, - disks: output.disks != null ? de_Disks(output.disks, context) : undefined, - identificationHints: - output.identificationHints != null ? de_IdentificationHints(output.identificationHints, context) : undefined, - lastUpdatedDateTime: __expectString(output.lastUpdatedDateTime), - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - os: output.os != null ? de_OS(output.os, context) : undefined, - ramBytes: __expectLong(output.ramBytes), - recommendedInstanceType: __expectString(output.recommendedInstanceType), - } as any; -}; +// de_SourceProperties omitted. -/** - * deserializeAws_restJson1SourceServer - */ -const de_SourceServer = (output: any, context: __SerdeContext): SourceServer => { - return { - arn: __expectString(output.arn), - dataReplicationInfo: - output.dataReplicationInfo != null ? de_DataReplicationInfo(output.dataReplicationInfo, context) : undefined, - lastLaunchResult: __expectString(output.lastLaunchResult), - lifeCycle: output.lifeCycle != null ? de_LifeCycle(output.lifeCycle, context) : undefined, - recoveryInstanceId: __expectString(output.recoveryInstanceId), - replicationDirection: __expectString(output.replicationDirection), - reversedDirectionSourceServerArn: __expectString(output.reversedDirectionSourceServerArn), - sourceCloudProperties: - output.sourceCloudProperties != null - ? de_SourceCloudProperties(output.sourceCloudProperties, context) - : undefined, - sourceProperties: - output.sourceProperties != null ? de_SourceProperties(output.sourceProperties, context) : undefined, - sourceServerID: __expectString(output.sourceServerID), - stagingArea: output.stagingArea != null ? de_StagingArea(output.stagingArea, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; -}; +// de_SourceServer omitted. -/** - * deserializeAws_restJson1SourceServersList - */ -const de_SourceServersList = (output: any, context: __SerdeContext): SourceServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceServer(entry, context); - }); - return retVal; -}; +// de_SourceServersList omitted. -/** - * deserializeAws_restJson1StagingArea - */ -const de_StagingArea = (output: any, context: __SerdeContext): StagingArea => { - return { - errorMessage: __expectString(output.errorMessage), - stagingAccountID: __expectString(output.stagingAccountID), - stagingSourceServerArn: __expectString(output.stagingSourceServerArn), - status: __expectString(output.status), - } as any; -}; +// de_StagingArea omitted. -/** - * deserializeAws_restJson1StagingSourceServer - */ -const de_StagingSourceServer = (output: any, context: __SerdeContext): StagingSourceServer => { - return { - arn: __expectString(output.arn), - hostname: __expectString(output.hostname), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; -}; +// de_StagingSourceServer omitted. -/** - * deserializeAws_restJson1StagingSourceServersList - */ -const de_StagingSourceServersList = (output: any, context: __SerdeContext): StagingSourceServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StagingSourceServer(entry, context); - }); - return retVal; -}; +// de_StagingSourceServersList omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1VolumeToConversionMap - */ -const de_VolumeToConversionMap = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ConversionMap(value, context); - return acc; - }, {}); -}; +// de_VolumeToConversionMap omitted. -/** - * deserializeAws_restJson1VolumeToSizeMap - */ -const de_VolumeToSizeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; +// de_VolumeToSizeMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-dynamodb-streams/src/protocols/Aws_json1_0.ts b/clients/client-dynamodb-streams/src/protocols/Aws_json1_0.ts index ac2ea9e64889..740110dc135c 100644 --- a/clients/client-dynamodb-streams/src/protocols/Aws_json1_0.ts +++ b/clients/client-dynamodb-streams/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -9,7 +10,8 @@ import { expectString as __expectString, expectUnion as __expectUnion, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -25,7 +27,6 @@ import { ListStreamsCommandInput, ListStreamsCommandOutput } from "../commands/L import { DynamoDBStreamsServiceException as __BaseException } from "../models/DynamoDBStreamsServiceException"; import { _Record, - _Stream, AttributeValue, DescribeStreamInput, DescribeStreamOutput, @@ -33,16 +34,10 @@ import { GetRecordsInput, GetRecordsOutput, GetShardIteratorInput, - GetShardIteratorOutput, - Identity, InternalServerError, - KeySchemaElement, LimitExceededException, ListStreamsInput, - ListStreamsOutput, ResourceNotFoundException, - SequenceNumberRange, - Shard, StreamDescription, StreamRecord, TrimmedDataAccessException, @@ -57,7 +52,7 @@ export const se_DescribeStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStream"); let body: any; - body = JSON.stringify(se_DescribeStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -70,7 +65,7 @@ export const se_GetRecordsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRecords"); let body: any; - body = JSON.stringify(se_GetRecordsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -83,7 +78,7 @@ export const se_GetShardIteratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetShardIterator"); let body: any; - body = JSON.stringify(se_GetShardIteratorInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -96,7 +91,7 @@ export const se_ListStreamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStreams"); let body: any; - body = JSON.stringify(se_ListStreamsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -117,7 +112,7 @@ export const de_DescribeStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -141,10 +136,9 @@ const de_DescribeStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -167,7 +161,7 @@ export const de_GetRecordsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -200,10 +194,9 @@ const de_GetRecordsCommandError = async ( throw await de_TrimmedDataAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -221,12 +214,12 @@ export const de_GetShardIteratorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetShardIteratorOutput(data, context); + contents = _json(data); const response: GetShardIteratorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -253,10 +246,9 @@ const de_GetShardIteratorCommandError = async ( throw await de_TrimmedDataAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -274,12 +266,12 @@ export const de_ListStreamsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListStreamsOutput(data, context); + contents = _json(data); const response: ListStreamsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -303,10 +295,9 @@ const de_ListStreamsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -320,7 +311,7 @@ const de_ExpiredIteratorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredIteratorException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredIteratorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -333,7 +324,7 @@ const de_ExpiredIteratorExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -349,7 +340,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -365,7 +356,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -381,7 +372,7 @@ const de_TrimmedDataAccessExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TrimmedDataAccessException(body, context); + const deserialized: any = _json(body); const exception = new TrimmedDataAccessException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -389,49 +380,13 @@ const de_TrimmedDataAccessExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0DescribeStreamInput - */ -const se_DescribeStreamInput = (input: DescribeStreamInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - }; -}; +// se_DescribeStreamInput omitted. -/** - * serializeAws_json1_0GetRecordsInput - */ -const se_GetRecordsInput = (input: GetRecordsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.ShardIterator != null && { ShardIterator: input.ShardIterator }), - }; -}; +// se_GetRecordsInput omitted. -/** - * serializeAws_json1_0GetShardIteratorInput - */ -const se_GetShardIteratorInput = (input: GetShardIteratorInput, context: __SerdeContext): any => { - return { - ...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }), - ...(input.ShardId != null && { ShardId: input.ShardId }), - ...(input.ShardIteratorType != null && { ShardIteratorType: input.ShardIteratorType }), - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - }; -}; +// se_GetShardIteratorInput omitted. -/** - * serializeAws_json1_0ListStreamsInput - */ -const se_ListStreamsInput = (input: ListStreamsInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartStreamArn != null && { ExclusiveStartStreamArn: input.ExclusiveStartStreamArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_ListStreamsInput omitted. /** * deserializeAws_json1_0AttributeMap @@ -478,7 +433,7 @@ const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue } if (output.NS != null) { return { - NS: de_NumberSetAttributeValue(output.NS, context), + NS: _json(output.NS), }; } if (__expectBoolean(output.NULL) !== undefined) { @@ -489,7 +444,7 @@ const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue } if (output.SS != null) { return { - SS: de_StringSetAttributeValue(output.SS, context), + SS: _json(output.SS), }; } return { $unknown: Object.entries(output)[0] }; @@ -502,9 +457,6 @@ const de_BinarySetAttributeValue = (output: any, context: __SerdeContext): Uint8 const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return context.base64Decoder(entry); }); return retVal; @@ -514,92 +466,34 @@ const de_BinarySetAttributeValue = (output: any, context: __SerdeContext): Uint8 * deserializeAws_json1_0DescribeStreamOutput */ const de_DescribeStreamOutput = (output: any, context: __SerdeContext): DescribeStreamOutput => { - return { - StreamDescription: - output.StreamDescription != null ? de_StreamDescription(output.StreamDescription, context) : undefined, - } as any; + return take(output, { + StreamDescription: (_: any) => de_StreamDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ExpiredIteratorException - */ -const de_ExpiredIteratorException = (output: any, context: __SerdeContext): ExpiredIteratorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ExpiredIteratorException omitted. /** * deserializeAws_json1_0GetRecordsOutput */ const de_GetRecordsOutput = (output: any, context: __SerdeContext): GetRecordsOutput => { - return { - NextShardIterator: __expectString(output.NextShardIterator), - Records: output.Records != null ? de_RecordList(output.Records, context) : undefined, - } as any; + return take(output, { + NextShardIterator: __expectString, + Records: (_: any) => de_RecordList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetShardIteratorOutput - */ -const de_GetShardIteratorOutput = (output: any, context: __SerdeContext): GetShardIteratorOutput => { - return { - ShardIterator: __expectString(output.ShardIterator), - } as any; -}; +// de_GetShardIteratorOutput omitted. -/** - * deserializeAws_json1_0Identity - */ -const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - PrincipalId: __expectString(output.PrincipalId), - Type: __expectString(output.Type), - } as any; -}; +// de_Identity omitted. -/** - * deserializeAws_json1_0InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_0KeySchema - */ -const de_KeySchema = (output: any, context: __SerdeContext): KeySchemaElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeySchemaElement(entry, context); - }); - return retVal; -}; +// de_KeySchema omitted. -/** - * deserializeAws_json1_0KeySchemaElement - */ -const de_KeySchemaElement = (output: any, context: __SerdeContext): KeySchemaElement => { - return { - AttributeName: __expectString(output.AttributeName), - KeyType: __expectString(output.KeyType), - } as any; -}; +// de_KeySchemaElement omitted. -/** - * deserializeAws_json1_0LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_0ListAttributeValue @@ -608,23 +502,12 @@ const de_ListAttributeValue = (output: any, context: __SerdeContext): AttributeV const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AttributeValue(__expectUnion(entry), context); }); return retVal; }; -/** - * deserializeAws_json1_0ListStreamsOutput - */ -const de_ListStreamsOutput = (output: any, context: __SerdeContext): ListStreamsOutput => { - return { - LastEvaluatedStreamArn: __expectString(output.LastEvaluatedStreamArn), - Streams: output.Streams != null ? de_StreamList(output.Streams, context) : undefined, - } as any; -}; +// de_ListStreamsOutput omitted. /** * deserializeAws_json1_0MapAttributeValue @@ -639,34 +522,21 @@ const de_MapAttributeValue = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NumberSetAttributeValue omitted. /** * deserializeAws_json1_0_Record */ const de__Record = (output: any, context: __SerdeContext): _Record => { - return { - awsRegion: __expectString(output.awsRegion), - dynamodb: output.dynamodb != null ? de_StreamRecord(output.dynamodb, context) : undefined, - eventID: __expectString(output.eventID), - eventName: __expectString(output.eventName), - eventSource: __expectString(output.eventSource), - eventVersion: __expectString(output.eventVersion), - userIdentity: output.userIdentity != null ? de_Identity(output.userIdentity, context) : undefined, - } as any; + return take(output, { + awsRegion: __expectString, + dynamodb: (_: any) => de_StreamRecord(_, context), + eventID: __expectString, + eventName: __expectString, + eventSource: __expectString, + eventVersion: __expectString, + userIdentity: _json, + }) as any; }; /** @@ -676,147 +546,58 @@ const de_RecordList = (output: any, context: __SerdeContext): _Record[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de__Record(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0SequenceNumberRange - */ -const de_SequenceNumberRange = (output: any, context: __SerdeContext): SequenceNumberRange => { - return { - EndingSequenceNumber: __expectString(output.EndingSequenceNumber), - StartingSequenceNumber: __expectString(output.StartingSequenceNumber), - } as any; -}; +// de_SequenceNumberRange omitted. -/** - * deserializeAws_json1_0Shard - */ -const de_Shard = (output: any, context: __SerdeContext): Shard => { - return { - ParentShardId: __expectString(output.ParentShardId), - SequenceNumberRange: - output.SequenceNumberRange != null ? de_SequenceNumberRange(output.SequenceNumberRange, context) : undefined, - ShardId: __expectString(output.ShardId), - } as any; -}; +// de_Shard omitted. -/** - * deserializeAws_json1_0ShardDescriptionList - */ -const de_ShardDescriptionList = (output: any, context: __SerdeContext): Shard[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Shard(entry, context); - }); - return retVal; -}; +// de_ShardDescriptionList omitted. -/** - * deserializeAws_json1_0_Stream - */ -const de__Stream = (output: any, context: __SerdeContext): _Stream => { - return { - StreamArn: __expectString(output.StreamArn), - StreamLabel: __expectString(output.StreamLabel), - TableName: __expectString(output.TableName), - } as any; -}; +// de__Stream omitted. /** * deserializeAws_json1_0StreamDescription */ const de_StreamDescription = (output: any, context: __SerdeContext): StreamDescription => { - return { - CreationRequestDateTime: - output.CreationRequestDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationRequestDateTime))) - : undefined, - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - LastEvaluatedShardId: __expectString(output.LastEvaluatedShardId), - Shards: output.Shards != null ? de_ShardDescriptionList(output.Shards, context) : undefined, - StreamArn: __expectString(output.StreamArn), - StreamLabel: __expectString(output.StreamLabel), - StreamStatus: __expectString(output.StreamStatus), - StreamViewType: __expectString(output.StreamViewType), - TableName: __expectString(output.TableName), - } as any; + return take(output, { + CreationRequestDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KeySchema: _json, + LastEvaluatedShardId: __expectString, + Shards: _json, + StreamArn: __expectString, + StreamLabel: __expectString, + StreamStatus: __expectString, + StreamViewType: __expectString, + TableName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0StreamList - */ -const de_StreamList = (output: any, context: __SerdeContext): _Stream[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de__Stream(entry, context); - }); - return retVal; -}; +// de_StreamList omitted. /** * deserializeAws_json1_0StreamRecord */ const de_StreamRecord = (output: any, context: __SerdeContext): StreamRecord => { - return { - ApproximateCreationDateTime: - output.ApproximateCreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApproximateCreationDateTime))) - : undefined, - Keys: output.Keys != null ? de_AttributeMap(output.Keys, context) : undefined, - NewImage: output.NewImage != null ? de_AttributeMap(output.NewImage, context) : undefined, - OldImage: output.OldImage != null ? de_AttributeMap(output.OldImage, context) : undefined, - SequenceNumber: __expectString(output.SequenceNumber), - SizeBytes: __expectLong(output.SizeBytes), - StreamViewType: __expectString(output.StreamViewType), - } as any; + return take(output, { + ApproximateCreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Keys: (_: any) => de_AttributeMap(_, context), + NewImage: (_: any) => de_AttributeMap(_, context), + OldImage: (_: any) => de_AttributeMap(_, context), + SequenceNumber: __expectString, + SizeBytes: __expectLong, + StreamViewType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0StringSetAttributeValue - */ -const de_StringSetAttributeValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringSetAttributeValue omitted. -/** - * deserializeAws_json1_0TrimmedDataAccessException - */ -const de_TrimmedDataAccessException = (output: any, context: __SerdeContext): TrimmedDataAccessException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TrimmedDataAccessException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -838,6 +619,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-dynamodb/src/protocols/Aws_json1_0.ts b/clients/client-dynamodb/src/protocols/Aws_json1_0.ts index 8dc5787039e8..2819fab23657 100644 --- a/clients/client-dynamodb/src/protocols/Aws_json1_0.ts +++ b/clients/client-dynamodb/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,7 +13,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -147,7 +149,6 @@ import { BatchExecuteStatementOutput, BatchGetItemInput, BatchGetItemOutput, - BatchStatementError, BatchStatementRequest, BatchStatementResponse, BatchWriteItemInput, @@ -161,7 +162,6 @@ import { ConsumedCapacity, ContinuousBackupsDescription, ContinuousBackupsUnavailableException, - ContributorInsightsSummary, CreateBackupInput, CreateBackupOutput, CreateGlobalSecondaryIndexAction, @@ -190,7 +190,6 @@ import { DescribeContributorInsightsInput, DescribeContributorInsightsOutput, DescribeEndpointsRequest, - DescribeEndpointsResponse, DescribeExportInput, DescribeExportOutput, DescribeGlobalTableInput, @@ -200,17 +199,13 @@ import { DescribeImportInput, DescribeImportOutput, DescribeKinesisStreamingDestinationInput, - DescribeKinesisStreamingDestinationOutput, DescribeLimitsInput, - DescribeLimitsOutput, DescribeTableInput, DescribeTableOutput, DescribeTableReplicaAutoScalingInput, DescribeTableReplicaAutoScalingOutput, DescribeTimeToLiveInput, - DescribeTimeToLiveOutput, DuplicateItemException, - Endpoint, ExecuteStatementInput, ExecuteStatementOutput, ExecuteTransactionInput, @@ -219,19 +214,15 @@ import { ExportConflictException, ExportDescription, ExportNotFoundException, - ExportSummary, ExportTableToPointInTimeInput, ExportTableToPointInTimeOutput, - FailureException, Get, GetItemInput, GetItemOutput, GlobalSecondaryIndex, GlobalSecondaryIndexAutoScalingUpdate, GlobalSecondaryIndexDescription, - GlobalSecondaryIndexInfo, GlobalSecondaryIndexUpdate, - GlobalTable, GlobalTableAlreadyExistsException, GlobalTableDescription, GlobalTableGlobalSecondaryIndexSettingsUpdate, @@ -254,27 +245,18 @@ import { ItemResponse, KeysAndAttributes, KeySchemaElement, - KinesisDataStreamDestination, KinesisStreamingDestinationInput, - KinesisStreamingDestinationOutput, LimitExceededException, ListBackupsInput, ListBackupsOutput, ListContributorInsightsInput, - ListContributorInsightsOutput, ListExportsInput, - ListExportsOutput, ListGlobalTablesInput, - ListGlobalTablesOutput, ListImportsInput, ListImportsOutput, ListTablesInput, - ListTablesOutput, ListTagsOfResourceInput, - ListTagsOfResourceOutput, LocalSecondaryIndex, - LocalSecondaryIndexDescription, - LocalSecondaryIndexInfo, ParameterizedStatement, PointInTimeRecoveryDescription, PointInTimeRecoverySpecification, @@ -298,7 +280,6 @@ import { ReplicaGlobalSecondaryIndex, ReplicaGlobalSecondaryIndexAutoScalingDescription, ReplicaGlobalSecondaryIndexAutoScalingUpdate, - ReplicaGlobalSecondaryIndexDescription, ReplicaGlobalSecondaryIndexSettingsDescription, ReplicaGlobalSecondaryIndexSettingsUpdate, ReplicaNotFoundException, @@ -331,7 +312,6 @@ import { TableNotFoundException, Tag, TagResourceInput, - TimeToLiveDescription, TimeToLiveSpecification, TransactGetItem, TransactGetItemsInput, @@ -347,7 +327,6 @@ import { UpdateContinuousBackupsInput, UpdateContinuousBackupsOutput, UpdateContributorInsightsInput, - UpdateContributorInsightsOutput, UpdateGlobalSecondaryIndexAction, UpdateGlobalTableInput, UpdateGlobalTableOutput, @@ -361,7 +340,6 @@ import { UpdateTableReplicaAutoScalingInput, UpdateTableReplicaAutoScalingOutput, UpdateTimeToLiveInput, - UpdateTimeToLiveOutput, WriteRequest, } from "../models/models_0"; @@ -413,7 +391,7 @@ export const se_CreateBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBackup"); let body: any; - body = JSON.stringify(se_CreateBackupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -426,7 +404,7 @@ export const se_CreateGlobalTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGlobalTable"); let body: any; - body = JSON.stringify(se_CreateGlobalTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -439,7 +417,7 @@ export const se_CreateTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTable"); let body: any; - body = JSON.stringify(se_CreateTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -452,7 +430,7 @@ export const se_DeleteBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBackup"); let body: any; - body = JSON.stringify(se_DeleteBackupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -478,7 +456,7 @@ export const se_DeleteTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTable"); let body: any; - body = JSON.stringify(se_DeleteTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -491,7 +469,7 @@ export const se_DescribeBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBackup"); let body: any; - body = JSON.stringify(se_DescribeBackupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -504,7 +482,7 @@ export const se_DescribeContinuousBackupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeContinuousBackups"); let body: any; - body = JSON.stringify(se_DescribeContinuousBackupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -517,7 +495,7 @@ export const se_DescribeContributorInsightsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeContributorInsights"); let body: any; - body = JSON.stringify(se_DescribeContributorInsightsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -530,7 +508,7 @@ export const se_DescribeEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoints"); let body: any; - body = JSON.stringify(se_DescribeEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,7 +521,7 @@ export const se_DescribeExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExport"); let body: any; - body = JSON.stringify(se_DescribeExportInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +534,7 @@ export const se_DescribeGlobalTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGlobalTable"); let body: any; - body = JSON.stringify(se_DescribeGlobalTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -569,7 +547,7 @@ export const se_DescribeGlobalTableSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGlobalTableSettings"); let body: any; - body = JSON.stringify(se_DescribeGlobalTableSettingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -582,7 +560,7 @@ export const se_DescribeImportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImport"); let body: any; - body = JSON.stringify(se_DescribeImportInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -595,7 +573,7 @@ export const se_DescribeKinesisStreamingDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeKinesisStreamingDestination"); let body: any; - body = JSON.stringify(se_DescribeKinesisStreamingDestinationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -608,7 +586,7 @@ export const se_DescribeLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLimits"); let body: any; - body = JSON.stringify(se_DescribeLimitsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -621,7 +599,7 @@ export const se_DescribeTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTable"); let body: any; - body = JSON.stringify(se_DescribeTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -634,7 +612,7 @@ export const se_DescribeTableReplicaAutoScalingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTableReplicaAutoScaling"); let body: any; - body = JSON.stringify(se_DescribeTableReplicaAutoScalingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -647,7 +625,7 @@ export const se_DescribeTimeToLiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTimeToLive"); let body: any; - body = JSON.stringify(se_DescribeTimeToLiveInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -660,7 +638,7 @@ export const se_DisableKinesisStreamingDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableKinesisStreamingDestination"); let body: any; - body = JSON.stringify(se_KinesisStreamingDestinationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -673,7 +651,7 @@ export const se_EnableKinesisStreamingDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableKinesisStreamingDestination"); let body: any; - body = JSON.stringify(se_KinesisStreamingDestinationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -764,7 +742,7 @@ export const se_ListContributorInsightsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListContributorInsights"); let body: any; - body = JSON.stringify(se_ListContributorInsightsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -777,7 +755,7 @@ export const se_ListExportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExports"); let body: any; - body = JSON.stringify(se_ListExportsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -790,7 +768,7 @@ export const se_ListGlobalTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGlobalTables"); let body: any; - body = JSON.stringify(se_ListGlobalTablesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,7 +781,7 @@ export const se_ListImportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListImports"); let body: any; - body = JSON.stringify(se_ListImportsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -816,7 +794,7 @@ export const se_ListTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTables"); let body: any; - body = JSON.stringify(se_ListTablesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -829,7 +807,7 @@ export const se_ListTagsOfResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsOfResource"); let body: any; - body = JSON.stringify(se_ListTagsOfResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -865,7 +843,7 @@ export const se_RestoreTableFromBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreTableFromBackup"); let body: any; - body = JSON.stringify(se_RestoreTableFromBackupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -901,7 +879,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -940,7 +918,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -953,7 +931,7 @@ export const se_UpdateContinuousBackupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContinuousBackups"); let body: any; - body = JSON.stringify(se_UpdateContinuousBackupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -966,7 +944,7 @@ export const se_UpdateContributorInsightsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContributorInsights"); let body: any; - body = JSON.stringify(se_UpdateContributorInsightsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -979,7 +957,7 @@ export const se_UpdateGlobalTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGlobalTable"); let body: any; - body = JSON.stringify(se_UpdateGlobalTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1018,7 +996,7 @@ export const se_UpdateTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTable"); let body: any; - body = JSON.stringify(se_UpdateTableInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1044,7 +1022,7 @@ export const se_UpdateTimeToLiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTimeToLive"); let body: any; - body = JSON.stringify(se_UpdateTimeToLiveInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1065,7 +1043,7 @@ export const de_BatchExecuteStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1089,10 +1067,9 @@ const de_BatchExecuteStatementCommandError = async ( throw await de_RequestLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1115,7 +1092,7 @@ export const de_BatchGetItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1148,10 +1125,9 @@ const de_BatchGetItemCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1174,7 +1150,7 @@ export const de_BatchWriteItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1210,10 +1186,9 @@ const de_BatchWriteItemCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1236,7 +1211,7 @@ export const de_CreateBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1275,10 +1250,9 @@ const de_CreateBackupCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,7 +1275,7 @@ export const de_CreateGlobalTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1334,10 +1308,9 @@ const de_CreateGlobalTableCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1360,7 +1333,7 @@ export const de_CreateTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1390,10 +1363,9 @@ const de_CreateTableCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1416,7 +1388,7 @@ export const de_DeleteBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1449,10 +1421,9 @@ const de_DeleteBackupCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1475,7 +1446,7 @@ export const de_DeleteItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1517,10 +1488,9 @@ const de_DeleteItemCommandError = async ( throw await de_TransactionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1543,7 +1513,7 @@ export const de_DeleteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1576,10 +1546,9 @@ const de_DeleteTableCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1602,7 +1571,7 @@ export const de_DescribeBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1629,10 +1598,9 @@ const de_DescribeBackupCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1655,7 +1623,7 @@ export const de_DescribeContinuousBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1682,10 +1650,9 @@ const de_DescribeContinuousBackupsCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1708,7 +1675,7 @@ export const de_DescribeContributorInsightsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1732,10 +1699,9 @@ const de_DescribeContributorInsightsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1753,12 +1719,12 @@ export const de_DescribeEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEndpointsResponse(data, context); + contents = _json(data); const response: DescribeEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1774,10 +1740,9 @@ const de_DescribeEndpointsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1799,7 +1764,7 @@ export const de_DescribeExportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1826,10 +1791,9 @@ const de_DescribeExportCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1852,7 +1816,7 @@ export const de_DescribeGlobalTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1879,10 +1843,9 @@ const de_DescribeGlobalTableCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1905,7 +1868,7 @@ export const de_DescribeGlobalTableSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1932,10 +1895,9 @@ const de_DescribeGlobalTableSettingsCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,7 +1920,7 @@ export const de_DescribeImportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1979,10 +1941,9 @@ const de_DescribeImportCommandError = async ( throw await de_ImportNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2000,12 +1961,12 @@ export const de_DescribeKinesisStreamingDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeKinesisStreamingDestinationOutput(data, context); + contents = _json(data); const response: DescribeKinesisStreamingDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2032,10 +1993,9 @@ const de_DescribeKinesisStreamingDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2053,12 +2013,12 @@ export const de_DescribeLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLimitsOutput(data, context); + contents = _json(data); const response: DescribeLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2082,10 +2042,9 @@ const de_DescribeLimitsCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2108,7 +2067,7 @@ export const de_DescribeTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2135,10 +2094,9 @@ const de_DescribeTableCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2161,7 +2119,7 @@ export const de_DescribeTableReplicaAutoScalingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2185,10 +2143,9 @@ const de_DescribeTableReplicaAutoScalingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2206,12 +2163,12 @@ export const de_DescribeTimeToLiveCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTimeToLiveOutput(data, context); + contents = _json(data); const response: DescribeTimeToLiveCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2238,10 +2195,9 @@ const de_DescribeTimeToLiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2259,12 +2215,12 @@ export const de_DisableKinesisStreamingDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_KinesisStreamingDestinationOutput(data, context); + contents = _json(data); const response: DisableKinesisStreamingDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2297,10 +2253,9 @@ const de_DisableKinesisStreamingDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2318,12 +2273,12 @@ export const de_EnableKinesisStreamingDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_KinesisStreamingDestinationOutput(data, context); + contents = _json(data); const response: EnableKinesisStreamingDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2356,10 +2311,9 @@ const de_EnableKinesisStreamingDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2382,7 +2336,7 @@ export const de_ExecuteStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2424,10 +2378,9 @@ const de_ExecuteStatementCommandError = async ( throw await de_TransactionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2450,7 +2403,7 @@ export const de_ExecuteTransactionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2489,10 +2442,9 @@ const de_ExecuteTransactionCommandError = async ( throw await de_TransactionInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2515,7 +2467,7 @@ export const de_ExportTableToPointInTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2551,10 +2503,9 @@ const de_ExportTableToPointInTimeCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2577,7 +2528,7 @@ export const de_GetItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2610,10 +2561,9 @@ const de_GetItemCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2636,7 +2586,7 @@ export const de_ImportTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2663,10 +2613,9 @@ const de_ImportTableCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2689,7 +2638,7 @@ export const de_ListBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2713,10 +2662,9 @@ const de_ListBackupsCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2734,12 +2682,12 @@ export const de_ListContributorInsightsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListContributorInsightsOutput(data, context); + contents = _json(data); const response: ListContributorInsightsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2763,10 +2711,9 @@ const de_ListContributorInsightsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2784,12 +2731,12 @@ export const de_ListExportsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListExportsOutput(data, context); + contents = _json(data); const response: ListExportsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2813,10 +2760,9 @@ const de_ListExportsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2834,12 +2780,12 @@ export const de_ListGlobalTablesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGlobalTablesOutput(data, context); + contents = _json(data); const response: ListGlobalTablesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2863,10 +2809,9 @@ const de_ListGlobalTablesCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2889,7 +2834,7 @@ export const de_ListImportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2910,10 +2855,9 @@ const de_ListImportsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2931,12 +2875,12 @@ export const de_ListTablesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTablesOutput(data, context); + contents = _json(data); const response: ListTablesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2960,10 +2904,9 @@ const de_ListTablesCommandError = async ( throw await de_InvalidEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,12 +2924,12 @@ export const de_ListTagsOfResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsOfResourceOutput(data, context); + contents = _json(data); const response: ListTagsOfResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3013,10 +2956,9 @@ const de_ListTagsOfResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3039,7 +2981,7 @@ export const de_PutItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3081,10 +3023,9 @@ const de_PutItemCommandError = async ( throw await de_TransactionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3104,7 +3045,7 @@ export const de_QueryCommand = async (output: __HttpResponse, context: __SerdeCo $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3134,10 +3075,9 @@ const de_QueryCommandError = async (output: __HttpResponse, context: __SerdeCont throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3160,7 +3100,7 @@ export const de_RestoreTableFromBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3199,10 +3139,9 @@ const de_RestoreTableFromBackupCommandError = async ( throw await de_TableInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3225,7 +3164,7 @@ export const de_RestoreTableToPointInTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3267,10 +3206,9 @@ const de_RestoreTableToPointInTimeCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3290,7 +3228,7 @@ export const de_ScanCommand = async (output: __HttpResponse, context: __SerdeCon $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3320,10 +3258,9 @@ const de_ScanCommandError = async (output: __HttpResponse, context: __SerdeConte throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3343,7 +3280,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3376,10 +3313,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3402,7 +3338,7 @@ export const de_TransactGetItemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3438,10 +3374,9 @@ const de_TransactGetItemsCommandError = async ( throw await de_TransactionCanceledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3464,7 +3399,7 @@ export const de_TransactWriteItemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3506,10 +3441,9 @@ const de_TransactWriteItemsCommandError = async ( throw await de_TransactionInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3529,7 +3463,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3562,10 +3496,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3588,7 +3521,7 @@ export const de_UpdateContinuousBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3618,10 +3551,9 @@ const de_UpdateContinuousBackupsCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3639,12 +3571,12 @@ export const de_UpdateContributorInsightsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateContributorInsightsOutput(data, context); + contents = _json(data); const response: UpdateContributorInsightsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3668,10 +3600,9 @@ const de_UpdateContributorInsightsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3694,7 +3625,7 @@ export const de_UpdateGlobalTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3730,10 +3661,9 @@ const de_UpdateGlobalTableCommandError = async ( throw await de_TableNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3756,7 +3686,7 @@ export const de_UpdateGlobalTableSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3795,10 +3725,9 @@ const de_UpdateGlobalTableSettingsCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3821,7 +3750,7 @@ export const de_UpdateItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3863,10 +3792,9 @@ const de_UpdateItemCommandError = async ( throw await de_TransactionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3889,7 +3817,7 @@ export const de_UpdateTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3922,10 +3850,9 @@ const de_UpdateTableCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,7 +3875,7 @@ export const de_UpdateTableReplicaAutoScalingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3978,10 +3905,9 @@ const de_UpdateTableReplicaAutoScalingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3999,12 +3925,12 @@ export const de_UpdateTimeToLiveCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTimeToLiveOutput(data, context); + contents = _json(data); const response: UpdateTimeToLiveCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4037,10 +3963,9 @@ const de_UpdateTimeToLiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4054,7 +3979,7 @@ const de_BackupInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BackupInUseException(body, context); + const deserialized: any = _json(body); const exception = new BackupInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4070,7 +3995,7 @@ const de_BackupNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BackupNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new BackupNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4086,7 +4011,7 @@ const de_ConditionalCheckFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConditionalCheckFailedException(body, context); + const deserialized: any = _json(body); const exception = new ConditionalCheckFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4102,7 +4027,7 @@ const de_ContinuousBackupsUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ContinuousBackupsUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ContinuousBackupsUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4118,7 +4043,7 @@ const de_DuplicateItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateItemException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4134,7 +4059,7 @@ const de_ExportConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExportConflictException(body, context); + const deserialized: any = _json(body); const exception = new ExportConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4150,7 +4075,7 @@ const de_ExportNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExportNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ExportNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4166,7 +4091,7 @@ const de_GlobalTableAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GlobalTableAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new GlobalTableAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4182,7 +4107,7 @@ const de_GlobalTableNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GlobalTableNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new GlobalTableNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4198,7 +4123,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4214,7 +4139,7 @@ const de_ImportConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImportConflictException(body, context); + const deserialized: any = _json(body); const exception = new ImportConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4230,7 +4155,7 @@ const de_ImportNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImportNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ImportNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4246,7 +4171,7 @@ const de_IndexNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IndexNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new IndexNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4259,7 +4184,7 @@ const de_IndexNotFoundExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4275,7 +4200,7 @@ const de_InvalidEndpointExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEndpointException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEndpointException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4291,7 +4216,7 @@ const de_InvalidExportTimeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidExportTimeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidExportTimeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4307,7 +4232,7 @@ const de_InvalidRestoreTimeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRestoreTimeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRestoreTimeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4323,7 +4248,7 @@ const de_ItemCollectionSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ItemCollectionSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ItemCollectionSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4339,7 +4264,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4355,7 +4280,7 @@ const de_PointInTimeRecoveryUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PointInTimeRecoveryUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new PointInTimeRecoveryUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4371,7 +4296,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProvisionedThroughputExceededException(body, context); + const deserialized: any = _json(body); const exception = new ProvisionedThroughputExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4387,7 +4312,7 @@ const de_ReplicaAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplicaAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ReplicaAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4403,7 +4328,7 @@ const de_ReplicaNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplicaNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ReplicaNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4419,7 +4344,7 @@ const de_RequestLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new RequestLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4435,7 +4360,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4451,7 +4376,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4467,7 +4392,7 @@ const de_TableAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TableAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new TableAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4480,7 +4405,7 @@ const de_TableAlreadyExistsExceptionRes = async ( */ const de_TableInUseExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TableInUseException(body, context); + const deserialized: any = _json(body); const exception = new TableInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4496,7 +4421,7 @@ const de_TableNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TableNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TableNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4528,7 +4453,7 @@ const de_TransactionConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TransactionConflictException(body, context); + const deserialized: any = _json(body); const exception = new TransactionConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4544,7 +4469,7 @@ const de_TransactionInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TransactionInProgressException(body, context); + const deserialized: any = _json(body); const exception = new TransactionInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4552,37 +4477,11 @@ const de_TransactionInProgressExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AttributeDefinition - */ -const se_AttributeDefinition = (input: AttributeDefinition, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.AttributeType != null && { AttributeType: input.AttributeType }), - }; -}; +// se_AttributeDefinition omitted. -/** - * serializeAws_json1_0AttributeDefinitions - */ -const se_AttributeDefinitions = (input: AttributeDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttributeDefinition(entry, context); - }); -}; +// se_AttributeDefinitions omitted. -/** - * serializeAws_json1_0AttributeNameList - */ -const se_AttributeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttributeNameList omitted. /** * serializeAws_json1_0AttributeUpdates @@ -4608,10 +4507,10 @@ const se_AttributeValue = (input: AttributeValue, context: __SerdeContext): any L: (value) => ({ L: se_ListAttributeValue(value, context) }), M: (value) => ({ M: se_MapAttributeValue(value, context) }), N: (value) => ({ N: value }), - NS: (value) => ({ NS: se_NumberSetAttributeValue(value, context) }), + NS: (value) => ({ NS: _json(value) }), NULL: (value) => ({ NULL: value }), S: (value) => ({ S: value }), - SS: (value) => ({ SS: se_StringSetAttributeValue(value, context) }), + SS: (value) => ({ SS: _json(value) }), _: (name, value) => ({ name: value } as any), }); }; @@ -4631,40 +4530,34 @@ const se_AttributeValueList = (input: AttributeValue[], context: __SerdeContext) * serializeAws_json1_0AttributeValueUpdate */ const se_AttributeValueUpdate = (input: AttributeValueUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Value != null && { Value: se_AttributeValue(input.Value, context) }), - }; + return take(input, { + Action: [], + Value: (_) => se_AttributeValue(_, context), + }); }; /** * serializeAws_json1_0AutoScalingPolicyUpdate */ const se_AutoScalingPolicyUpdate = (input: AutoScalingPolicyUpdate, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.TargetTrackingScalingPolicyConfiguration != null && { - TargetTrackingScalingPolicyConfiguration: se_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( - input.TargetTrackingScalingPolicyConfiguration, - context - ), - }), - }; + return take(input, { + PolicyName: [], + TargetTrackingScalingPolicyConfiguration: (_) => + se_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(_, context), + }); }; /** * serializeAws_json1_0AutoScalingSettingsUpdate */ const se_AutoScalingSettingsUpdate = (input: AutoScalingSettingsUpdate, context: __SerdeContext): any => { - return { - ...(input.AutoScalingDisabled != null && { AutoScalingDisabled: input.AutoScalingDisabled }), - ...(input.AutoScalingRoleArn != null && { AutoScalingRoleArn: input.AutoScalingRoleArn }), - ...(input.MaximumUnits != null && { MaximumUnits: input.MaximumUnits }), - ...(input.MinimumUnits != null && { MinimumUnits: input.MinimumUnits }), - ...(input.ScalingPolicyUpdate != null && { - ScalingPolicyUpdate: se_AutoScalingPolicyUpdate(input.ScalingPolicyUpdate, context), - }), - }; + return take(input, { + AutoScalingDisabled: [], + AutoScalingRoleArn: [], + MaximumUnits: [], + MinimumUnits: [], + ScalingPolicyUpdate: (_) => se_AutoScalingPolicyUpdate(_, context), + }); }; /** @@ -4674,32 +4567,32 @@ const se_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate = ( input: AutoScalingTargetTrackingScalingPolicyConfigurationUpdate, context: __SerdeContext ): any => { - return { - ...(input.DisableScaleIn != null && { DisableScaleIn: input.DisableScaleIn }), - ...(input.ScaleInCooldown != null && { ScaleInCooldown: input.ScaleInCooldown }), - ...(input.ScaleOutCooldown != null && { ScaleOutCooldown: input.ScaleOutCooldown }), - ...(input.TargetValue != null && { TargetValue: __serializeFloat(input.TargetValue) }), - }; + return take(input, { + DisableScaleIn: [], + ScaleInCooldown: [], + ScaleOutCooldown: [], + TargetValue: __serializeFloat, + }); }; /** * serializeAws_json1_0BatchExecuteStatementInput */ const se_BatchExecuteStatementInput = (input: BatchExecuteStatementInput, context: __SerdeContext): any => { - return { - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.Statements != null && { Statements: se_PartiQLBatchRequest(input.Statements, context) }), - }; + return take(input, { + ReturnConsumedCapacity: [], + Statements: (_) => se_PartiQLBatchRequest(_, context), + }); }; /** * serializeAws_json1_0BatchGetItemInput */ const se_BatchGetItemInput = (input: BatchGetItemInput, context: __SerdeContext): any => { - return { - ...(input.RequestItems != null && { RequestItems: se_BatchGetRequestMap(input.RequestItems, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - }; + return take(input, { + RequestItems: (_) => se_BatchGetRequestMap(_, context), + ReturnConsumedCapacity: [], + }); }; /** @@ -4719,24 +4612,22 @@ const se_BatchGetRequestMap = (input: Record, context * serializeAws_json1_0BatchStatementRequest */ const se_BatchStatementRequest = (input: BatchStatementRequest, context: __SerdeContext): any => { - return { - ...(input.ConsistentRead != null && { ConsistentRead: input.ConsistentRead }), - ...(input.Parameters != null && { Parameters: se_PreparedStatementParameters(input.Parameters, context) }), - ...(input.Statement != null && { Statement: input.Statement }), - }; + return take(input, { + ConsistentRead: [], + Parameters: (_) => se_PreparedStatementParameters(_, context), + Statement: [], + }); }; /** * serializeAws_json1_0BatchWriteItemInput */ const se_BatchWriteItemInput = (input: BatchWriteItemInput, context: __SerdeContext): any => { - return { - ...(input.RequestItems != null && { RequestItems: se_BatchWriteItemRequestMap(input.RequestItems, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ReturnItemCollectionMetrics != null && { - ReturnItemCollectionMetrics: input.ReturnItemCollectionMetrics, - }), - }; + return take(input, { + RequestItems: (_) => se_BatchWriteItemRequestMap(_, context), + ReturnConsumedCapacity: [], + ReturnItemCollectionMetrics: [], + }); }; /** @@ -4767,394 +4658,142 @@ const se_BinarySetAttributeValue = (input: Uint8Array[], context: __SerdeContext * serializeAws_json1_0Condition */ const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.AttributeValueList != null && { - AttributeValueList: se_AttributeValueList(input.AttributeValueList, context), - }), - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - }; + return take(input, { + AttributeValueList: (_) => se_AttributeValueList(_, context), + ComparisonOperator: [], + }); }; /** * serializeAws_json1_0ConditionCheck */ const se_ConditionCheck = (input: ConditionCheck, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ReturnValuesOnConditionCheckFailure != null && { - ReturnValuesOnConditionCheckFailure: input.ReturnValuesOnConditionCheckFailure, - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + ConditionExpression: [], + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Key: (_) => se_Key(_, context), + ReturnValuesOnConditionCheckFailure: [], + TableName: [], + }); }; -/** - * serializeAws_json1_0CreateBackupInput - */ -const se_CreateBackupInput = (input: CreateBackupInput, context: __SerdeContext): any => { - return { - ...(input.BackupName != null && { BackupName: input.BackupName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_CreateBackupInput omitted. -/** - * serializeAws_json1_0CreateGlobalSecondaryIndexAction - */ -const se_CreateGlobalSecondaryIndexAction = (input: CreateGlobalSecondaryIndexAction, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.KeySchema != null && { KeySchema: se_KeySchema(input.KeySchema, context) }), - ...(input.Projection != null && { Projection: se_Projection(input.Projection, context) }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - }; -}; +// se_CreateGlobalSecondaryIndexAction omitted. -/** - * serializeAws_json1_0CreateGlobalTableInput - */ -const se_CreateGlobalTableInput = (input: CreateGlobalTableInput, context: __SerdeContext): any => { - return { - ...(input.GlobalTableName != null && { GlobalTableName: input.GlobalTableName }), - ...(input.ReplicationGroup != null && { ReplicationGroup: se_ReplicaList(input.ReplicationGroup, context) }), - }; -}; +// se_CreateGlobalTableInput omitted. -/** - * serializeAws_json1_0CreateReplicaAction - */ -const se_CreateReplicaAction = (input: CreateReplicaAction, context: __SerdeContext): any => { - return { - ...(input.RegionName != null && { RegionName: input.RegionName }), - }; -}; +// se_CreateReplicaAction omitted. -/** - * serializeAws_json1_0CreateReplicationGroupMemberAction - */ -const se_CreateReplicationGroupMemberAction = ( - input: CreateReplicationGroupMemberAction, - context: __SerdeContext -): any => { - return { - ...(input.GlobalSecondaryIndexes != null && { - GlobalSecondaryIndexes: se_ReplicaGlobalSecondaryIndexList(input.GlobalSecondaryIndexes, context), - }), - ...(input.KMSMasterKeyId != null && { KMSMasterKeyId: input.KMSMasterKeyId }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_ProvisionedThroughputOverride(input.ProvisionedThroughputOverride, context), - }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.TableClassOverride != null && { TableClassOverride: input.TableClassOverride }), - }; -}; +// se_CreateReplicationGroupMemberAction omitted. -/** - * serializeAws_json1_0CreateTableInput - */ -const se_CreateTableInput = (input: CreateTableInput, context: __SerdeContext): any => { - return { - ...(input.AttributeDefinitions != null && { - AttributeDefinitions: se_AttributeDefinitions(input.AttributeDefinitions, context), - }), - ...(input.BillingMode != null && { BillingMode: input.BillingMode }), - ...(input.DeletionProtectionEnabled != null && { DeletionProtectionEnabled: input.DeletionProtectionEnabled }), - ...(input.GlobalSecondaryIndexes != null && { - GlobalSecondaryIndexes: se_GlobalSecondaryIndexList(input.GlobalSecondaryIndexes, context), - }), - ...(input.KeySchema != null && { KeySchema: se_KeySchema(input.KeySchema, context) }), - ...(input.LocalSecondaryIndexes != null && { - LocalSecondaryIndexes: se_LocalSecondaryIndexList(input.LocalSecondaryIndexes, context), - }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.SSESpecification != null && { SSESpecification: se_SSESpecification(input.SSESpecification, context) }), - ...(input.StreamSpecification != null && { - StreamSpecification: se_StreamSpecification(input.StreamSpecification, context), - }), - ...(input.TableClass != null && { TableClass: input.TableClass }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateTableInput omitted. -/** - * serializeAws_json1_0CsvHeaderList - */ -const se_CsvHeaderList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CsvHeaderList omitted. -/** - * serializeAws_json1_0CsvOptions - */ -const se_CsvOptions = (input: CsvOptions, context: __SerdeContext): any => { - return { - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.HeaderList != null && { HeaderList: se_CsvHeaderList(input.HeaderList, context) }), - }; -}; +// se_CsvOptions omitted. /** * serializeAws_json1_0Delete */ const se_Delete = (input: Delete, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ReturnValuesOnConditionCheckFailure != null && { - ReturnValuesOnConditionCheckFailure: input.ReturnValuesOnConditionCheckFailure, - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + ConditionExpression: [], + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Key: (_) => se_Key(_, context), + ReturnValuesOnConditionCheckFailure: [], + TableName: [], + }); }; -/** - * serializeAws_json1_0DeleteBackupInput - */ -const se_DeleteBackupInput = (input: DeleteBackupInput, context: __SerdeContext): any => { - return { - ...(input.BackupArn != null && { BackupArn: input.BackupArn }), - }; -}; +// se_DeleteBackupInput omitted. -/** - * serializeAws_json1_0DeleteGlobalSecondaryIndexAction - */ -const se_DeleteGlobalSecondaryIndexAction = (input: DeleteGlobalSecondaryIndexAction, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - }; -}; +// se_DeleteGlobalSecondaryIndexAction omitted. /** * serializeAws_json1_0DeleteItemInput */ const se_DeleteItemInput = (input: DeleteItemInput, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ConditionalOperator != null && { ConditionalOperator: input.ConditionalOperator }), - ...(input.Expected != null && { Expected: se_ExpectedAttributeMap(input.Expected, context) }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ReturnItemCollectionMetrics != null && { - ReturnItemCollectionMetrics: input.ReturnItemCollectionMetrics, - }), - ...(input.ReturnValues != null && { ReturnValues: input.ReturnValues }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + ConditionExpression: [], + ConditionalOperator: [], + Expected: (_) => se_ExpectedAttributeMap(_, context), + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Key: (_) => se_Key(_, context), + ReturnConsumedCapacity: [], + ReturnItemCollectionMetrics: [], + ReturnValues: [], + TableName: [], + }); }; -/** - * serializeAws_json1_0DeleteReplicaAction - */ -const se_DeleteReplicaAction = (input: DeleteReplicaAction, context: __SerdeContext): any => { - return { - ...(input.RegionName != null && { RegionName: input.RegionName }), - }; -}; +// se_DeleteReplicaAction omitted. -/** - * serializeAws_json1_0DeleteReplicationGroupMemberAction - */ -const se_DeleteReplicationGroupMemberAction = ( - input: DeleteReplicationGroupMemberAction, - context: __SerdeContext -): any => { - return { - ...(input.RegionName != null && { RegionName: input.RegionName }), - }; -}; +// se_DeleteReplicationGroupMemberAction omitted. /** * serializeAws_json1_0DeleteRequest */ const se_DeleteRequest = (input: DeleteRequest, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - }; + return take(input, { + Key: (_) => se_Key(_, context), + }); }; -/** - * serializeAws_json1_0DeleteTableInput - */ -const se_DeleteTableInput = (input: DeleteTableInput, context: __SerdeContext): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DeleteTableInput omitted. -/** - * serializeAws_json1_0DescribeBackupInput - */ -const se_DescribeBackupInput = (input: DescribeBackupInput, context: __SerdeContext): any => { - return { - ...(input.BackupArn != null && { BackupArn: input.BackupArn }), - }; -}; +// se_DescribeBackupInput omitted. -/** - * serializeAws_json1_0DescribeContinuousBackupsInput - */ -const se_DescribeContinuousBackupsInput = (input: DescribeContinuousBackupsInput, context: __SerdeContext): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeContinuousBackupsInput omitted. -/** - * serializeAws_json1_0DescribeContributorInsightsInput - */ -const se_DescribeContributorInsightsInput = (input: DescribeContributorInsightsInput, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeContributorInsightsInput omitted. -/** - * serializeAws_json1_0DescribeEndpointsRequest - */ -const se_DescribeEndpointsRequest = (input: DescribeEndpointsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeEndpointsRequest omitted. -/** - * serializeAws_json1_0DescribeExportInput - */ -const se_DescribeExportInput = (input: DescribeExportInput, context: __SerdeContext): any => { - return { - ...(input.ExportArn != null && { ExportArn: input.ExportArn }), - }; -}; +// se_DescribeExportInput omitted. -/** - * serializeAws_json1_0DescribeGlobalTableInput - */ -const se_DescribeGlobalTableInput = (input: DescribeGlobalTableInput, context: __SerdeContext): any => { - return { - ...(input.GlobalTableName != null && { GlobalTableName: input.GlobalTableName }), - }; -}; +// se_DescribeGlobalTableInput omitted. -/** - * serializeAws_json1_0DescribeGlobalTableSettingsInput - */ -const se_DescribeGlobalTableSettingsInput = (input: DescribeGlobalTableSettingsInput, context: __SerdeContext): any => { - return { - ...(input.GlobalTableName != null && { GlobalTableName: input.GlobalTableName }), - }; -}; +// se_DescribeGlobalTableSettingsInput omitted. -/** - * serializeAws_json1_0DescribeImportInput - */ -const se_DescribeImportInput = (input: DescribeImportInput, context: __SerdeContext): any => { - return { - ...(input.ImportArn != null && { ImportArn: input.ImportArn }), - }; -}; +// se_DescribeImportInput omitted. -/** - * serializeAws_json1_0DescribeKinesisStreamingDestinationInput - */ -const se_DescribeKinesisStreamingDestinationInput = ( - input: DescribeKinesisStreamingDestinationInput, - context: __SerdeContext -): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeKinesisStreamingDestinationInput omitted. -/** - * serializeAws_json1_0DescribeLimitsInput - */ -const se_DescribeLimitsInput = (input: DescribeLimitsInput, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeLimitsInput omitted. -/** - * serializeAws_json1_0DescribeTableInput - */ -const se_DescribeTableInput = (input: DescribeTableInput, context: __SerdeContext): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeTableInput omitted. -/** - * serializeAws_json1_0DescribeTableReplicaAutoScalingInput - */ -const se_DescribeTableReplicaAutoScalingInput = ( - input: DescribeTableReplicaAutoScalingInput, - context: __SerdeContext -): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeTableReplicaAutoScalingInput omitted. -/** - * serializeAws_json1_0DescribeTimeToLiveInput - */ -const se_DescribeTimeToLiveInput = (input: DescribeTimeToLiveInput, context: __SerdeContext): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeTimeToLiveInput omitted. /** * serializeAws_json1_0ExecuteStatementInput */ const se_ExecuteStatementInput = (input: ExecuteStatementInput, context: __SerdeContext): any => { - return { - ...(input.ConsistentRead != null && { ConsistentRead: input.ConsistentRead }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Parameters != null && { Parameters: se_PreparedStatementParameters(input.Parameters, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.Statement != null && { Statement: input.Statement }), - }; + return take(input, { + ConsistentRead: [], + Limit: [], + NextToken: [], + Parameters: (_) => se_PreparedStatementParameters(_, context), + ReturnConsumedCapacity: [], + Statement: [], + }); }; /** * serializeAws_json1_0ExecuteTransactionInput */ const se_ExecuteTransactionInput = (input: ExecuteTransactionInput, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.TransactStatements != null && { - TransactStatements: se_ParameterizedStatements(input.TransactStatements, context), - }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ReturnConsumedCapacity: [], + TransactStatements: (_) => se_ParameterizedStatements(_, context), + }); }; /** @@ -5174,45 +4813,32 @@ const se_ExpectedAttributeMap = (input: Record, * serializeAws_json1_0ExpectedAttributeValue */ const se_ExpectedAttributeValue = (input: ExpectedAttributeValue, context: __SerdeContext): any => { - return { - ...(input.AttributeValueList != null && { - AttributeValueList: se_AttributeValueList(input.AttributeValueList, context), - }), - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.Exists != null && { Exists: input.Exists }), - ...(input.Value != null && { Value: se_AttributeValue(input.Value, context) }), - }; + return take(input, { + AttributeValueList: (_) => se_AttributeValueList(_, context), + ComparisonOperator: [], + Exists: [], + Value: (_) => se_AttributeValue(_, context), + }); }; /** * serializeAws_json1_0ExportTableToPointInTimeInput */ const se_ExportTableToPointInTimeInput = (input: ExportTableToPointInTimeInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ExportFormat != null && { ExportFormat: input.ExportFormat }), - ...(input.ExportTime != null && { ExportTime: Math.round(input.ExportTime.getTime() / 1000) }), - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3BucketOwner != null && { S3BucketOwner: input.S3BucketOwner }), - ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }), - ...(input.S3SseAlgorithm != null && { S3SseAlgorithm: input.S3SseAlgorithm }), - ...(input.S3SseKmsKeyId != null && { S3SseKmsKeyId: input.S3SseKmsKeyId }), - ...(input.TableArn != null && { TableArn: input.TableArn }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ExportFormat: [], + ExportTime: (_) => Math.round(_.getTime() / 1000), + S3Bucket: [], + S3BucketOwner: [], + S3Prefix: [], + S3SseAlgorithm: [], + S3SseKmsKeyId: [], + TableArn: [], + }); }; -/** - * serializeAws_json1_0ExpressionAttributeNameMap - */ -const se_ExpressionAttributeNameMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ExpressionAttributeNameMap omitted. /** * serializeAws_json1_0ExpressionAttributeValueMap @@ -5244,46 +4870,30 @@ const se_FilterConditionMap = (input: Record, context: __Serd * serializeAws_json1_0Get */ const se_Get = (input: Get, context: __SerdeContext): any => { - return { - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ProjectionExpression != null && { ProjectionExpression: input.ProjectionExpression }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + ExpressionAttributeNames: _json, + Key: (_) => se_Key(_, context), + ProjectionExpression: [], + TableName: [], + }); }; /** * serializeAws_json1_0GetItemInput */ const se_GetItemInput = (input: GetItemInput, context: __SerdeContext): any => { - return { - ...(input.AttributesToGet != null && { AttributesToGet: se_AttributeNameList(input.AttributesToGet, context) }), - ...(input.ConsistentRead != null && { ConsistentRead: input.ConsistentRead }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ProjectionExpression != null && { ProjectionExpression: input.ProjectionExpression }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + AttributesToGet: _json, + ConsistentRead: [], + ExpressionAttributeNames: _json, + Key: (_) => se_Key(_, context), + ProjectionExpression: [], + ReturnConsumedCapacity: [], + TableName: [], + }); }; -/** - * serializeAws_json1_0GlobalSecondaryIndex - */ -const se_GlobalSecondaryIndex = (input: GlobalSecondaryIndex, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.KeySchema != null && { KeySchema: se_KeySchema(input.KeySchema, context) }), - ...(input.Projection != null && { Projection: se_Projection(input.Projection, context) }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - }; -}; +// se_GlobalSecondaryIndex omitted. /** * serializeAws_json1_0GlobalSecondaryIndexAutoScalingUpdate @@ -5292,15 +4902,10 @@ const se_GlobalSecondaryIndexAutoScalingUpdate = ( input: GlobalSecondaryIndexAutoScalingUpdate, context: __SerdeContext ): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedWriteCapacityAutoScalingUpdate != null && { - ProvisionedWriteCapacityAutoScalingUpdate: se_AutoScalingSettingsUpdate( - input.ProvisionedWriteCapacityAutoScalingUpdate, - context - ), - }), - }; + return take(input, { + IndexName: [], + ProvisionedWriteCapacityAutoScalingUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + }); }; /** @@ -5317,38 +4922,11 @@ const se_GlobalSecondaryIndexAutoScalingUpdateList = ( }); }; -/** - * serializeAws_json1_0GlobalSecondaryIndexList - */ -const se_GlobalSecondaryIndexList = (input: GlobalSecondaryIndex[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GlobalSecondaryIndex(entry, context); - }); -}; +// se_GlobalSecondaryIndexList omitted. -/** - * serializeAws_json1_0GlobalSecondaryIndexUpdate - */ -const se_GlobalSecondaryIndexUpdate = (input: GlobalSecondaryIndexUpdate, context: __SerdeContext): any => { - return { - ...(input.Create != null && { Create: se_CreateGlobalSecondaryIndexAction(input.Create, context) }), - ...(input.Delete != null && { Delete: se_DeleteGlobalSecondaryIndexAction(input.Delete, context) }), - ...(input.Update != null && { Update: se_UpdateGlobalSecondaryIndexAction(input.Update, context) }), - }; -}; +// se_GlobalSecondaryIndexUpdate omitted. -/** - * serializeAws_json1_0GlobalSecondaryIndexUpdateList - */ -const se_GlobalSecondaryIndexUpdateList = (input: GlobalSecondaryIndexUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GlobalSecondaryIndexUpdate(entry, context); - }); -}; +// se_GlobalSecondaryIndexUpdateList omitted. /** * serializeAws_json1_0GlobalTableGlobalSecondaryIndexSettingsUpdate @@ -5357,18 +4935,11 @@ const se_GlobalTableGlobalSecondaryIndexSettingsUpdate = ( input: GlobalTableGlobalSecondaryIndexSettingsUpdate, context: __SerdeContext ): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedWriteCapacityAutoScalingSettingsUpdate != null && { - ProvisionedWriteCapacityAutoScalingSettingsUpdate: se_AutoScalingSettingsUpdate( - input.ProvisionedWriteCapacityAutoScalingSettingsUpdate, - context - ), - }), - ...(input.ProvisionedWriteCapacityUnits != null && { - ProvisionedWriteCapacityUnits: input.ProvisionedWriteCapacityUnits, - }), - }; + return take(input, { + IndexName: [], + ProvisionedWriteCapacityAutoScalingSettingsUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + ProvisionedWriteCapacityUnits: [], + }); }; /** @@ -5389,31 +4960,20 @@ const se_GlobalTableGlobalSecondaryIndexSettingsUpdateList = ( * serializeAws_json1_0ImportTableInput */ const se_ImportTableInput = (input: ImportTableInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.InputCompressionType != null && { InputCompressionType: input.InputCompressionType }), - ...(input.InputFormat != null && { InputFormat: input.InputFormat }), - ...(input.InputFormatOptions != null && { - InputFormatOptions: se_InputFormatOptions(input.InputFormatOptions, context), - }), - ...(input.S3BucketSource != null && { S3BucketSource: se_S3BucketSource(input.S3BucketSource, context) }), - ...(input.TableCreationParameters != null && { - TableCreationParameters: se_TableCreationParameters(input.TableCreationParameters, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + InputCompressionType: [], + InputFormat: [], + InputFormatOptions: _json, + S3BucketSource: _json, + TableCreationParameters: _json, + }); }; +// se_InputFormatOptions omitted. + /** - * serializeAws_json1_0InputFormatOptions - */ -const se_InputFormatOptions = (input: InputFormatOptions, context: __SerdeContext): any => { - return { - ...(input.Csv != null && { Csv: se_CsvOptions(input.Csv, context) }), - }; -}; - -/** - * serializeAws_json1_0Key + * serializeAws_json1_0Key */ const se_Key = (input: Record, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { @@ -5453,47 +5013,20 @@ const se_KeyList = (input: Record[], context: __SerdeCon * serializeAws_json1_0KeysAndAttributes */ const se_KeysAndAttributes = (input: KeysAndAttributes, context: __SerdeContext): any => { - return { - ...(input.AttributesToGet != null && { AttributesToGet: se_AttributeNameList(input.AttributesToGet, context) }), - ...(input.ConsistentRead != null && { ConsistentRead: input.ConsistentRead }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.Keys != null && { Keys: se_KeyList(input.Keys, context) }), - ...(input.ProjectionExpression != null && { ProjectionExpression: input.ProjectionExpression }), - }; + return take(input, { + AttributesToGet: _json, + ConsistentRead: [], + ExpressionAttributeNames: _json, + Keys: (_) => se_KeyList(_, context), + ProjectionExpression: [], + }); }; -/** - * serializeAws_json1_0KeySchema - */ -const se_KeySchema = (input: KeySchemaElement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeySchemaElement(entry, context); - }); -}; +// se_KeySchema omitted. -/** - * serializeAws_json1_0KeySchemaElement - */ -const se_KeySchemaElement = (input: KeySchemaElement, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.KeyType != null && { KeyType: input.KeyType }), - }; -}; +// se_KeySchemaElement omitted. -/** - * serializeAws_json1_0KinesisStreamingDestinationInput - */ -const se_KinesisStreamingDestinationInput = (input: KinesisStreamingDestinationInput, context: __SerdeContext): any => { - return { - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_KinesisStreamingDestinationInput omitted. /** * serializeAws_json1_0ListAttributeValue @@ -5510,107 +5043,31 @@ const se_ListAttributeValue = (input: AttributeValue[], context: __SerdeContext) * serializeAws_json1_0ListBackupsInput */ const se_ListBackupsInput = (input: ListBackupsInput, context: __SerdeContext): any => { - return { - ...(input.BackupType != null && { BackupType: input.BackupType }), - ...(input.ExclusiveStartBackupArn != null && { ExclusiveStartBackupArn: input.ExclusiveStartBackupArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TimeRangeLowerBound != null && { - TimeRangeLowerBound: Math.round(input.TimeRangeLowerBound.getTime() / 1000), - }), - ...(input.TimeRangeUpperBound != null && { - TimeRangeUpperBound: Math.round(input.TimeRangeUpperBound.getTime() / 1000), - }), - }; + return take(input, { + BackupType: [], + ExclusiveStartBackupArn: [], + Limit: [], + TableName: [], + TimeRangeLowerBound: (_) => Math.round(_.getTime() / 1000), + TimeRangeUpperBound: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_0ListContributorInsightsInput - */ -const se_ListContributorInsightsInput = (input: ListContributorInsightsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_ListContributorInsightsInput omitted. -/** - * serializeAws_json1_0ListExportsInput - */ -const se_ListExportsInput = (input: ListExportsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TableArn != null && { TableArn: input.TableArn }), - }; -}; +// se_ListExportsInput omitted. -/** - * serializeAws_json1_0ListGlobalTablesInput - */ -const se_ListGlobalTablesInput = (input: ListGlobalTablesInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartGlobalTableName != null && { - ExclusiveStartGlobalTableName: input.ExclusiveStartGlobalTableName, - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - }; -}; +// se_ListGlobalTablesInput omitted. -/** - * serializeAws_json1_0ListImportsInput - */ -const se_ListImportsInput = (input: ListImportsInput, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.TableArn != null && { TableArn: input.TableArn }), - }; -}; +// se_ListImportsInput omitted. -/** - * serializeAws_json1_0ListTablesInput - */ -const se_ListTablesInput = (input: ListTablesInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartTableName != null && { ExclusiveStartTableName: input.ExclusiveStartTableName }), - ...(input.Limit != null && { Limit: input.Limit }), - }; -}; +// se_ListTablesInput omitted. -/** - * serializeAws_json1_0ListTagsOfResourceInput - */ -const se_ListTagsOfResourceInput = (input: ListTagsOfResourceInput, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsOfResourceInput omitted. -/** - * serializeAws_json1_0LocalSecondaryIndex - */ -const se_LocalSecondaryIndex = (input: LocalSecondaryIndex, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.KeySchema != null && { KeySchema: se_KeySchema(input.KeySchema, context) }), - ...(input.Projection != null && { Projection: se_Projection(input.Projection, context) }), - }; -}; +// se_LocalSecondaryIndex omitted. -/** - * serializeAws_json1_0LocalSecondaryIndexList - */ -const se_LocalSecondaryIndexList = (input: LocalSecondaryIndex[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LocalSecondaryIndex(entry, context); - }); -}; +// se_LocalSecondaryIndexList omitted. /** * serializeAws_json1_0MapAttributeValue @@ -5625,36 +5082,18 @@ const se_MapAttributeValue = (input: Record, context: __ }, {}); }; -/** - * serializeAws_json1_0NonKeyAttributeNameList - */ -const se_NonKeyAttributeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NonKeyAttributeNameList omitted. -/** - * serializeAws_json1_0NumberSetAttributeValue - */ -const se_NumberSetAttributeValue = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NumberSetAttributeValue omitted. /** * serializeAws_json1_0ParameterizedStatement */ const se_ParameterizedStatement = (input: ParameterizedStatement, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_PreparedStatementParameters(input.Parameters, context) }), - ...(input.Statement != null && { Statement: input.Statement }), - }; + return take(input, { + Parameters: (_) => se_PreparedStatementParameters(_, context), + Statement: [], + }); }; /** @@ -5679,14 +5118,7 @@ const se_PartiQLBatchRequest = (input: BatchStatementRequest[], context: __Serde }); }; -/** - * serializeAws_json1_0PointInTimeRecoverySpecification - */ -const se_PointInTimeRecoverySpecification = (input: PointInTimeRecoverySpecification, context: __SerdeContext): any => { - return { - ...(input.PointInTimeRecoveryEnabled != null && { PointInTimeRecoveryEnabled: input.PointInTimeRecoveryEnabled }), - }; -}; +// se_PointInTimeRecoverySpecification omitted. /** * serializeAws_json1_0PreparedStatementParameters @@ -5699,79 +5131,42 @@ const se_PreparedStatementParameters = (input: AttributeValue[], context: __Serd }); }; -/** - * serializeAws_json1_0Projection - */ -const se_Projection = (input: Projection, context: __SerdeContext): any => { - return { - ...(input.NonKeyAttributes != null && { - NonKeyAttributes: se_NonKeyAttributeNameList(input.NonKeyAttributes, context), - }), - ...(input.ProjectionType != null && { ProjectionType: input.ProjectionType }), - }; -}; +// se_Projection omitted. -/** - * serializeAws_json1_0ProvisionedThroughput - */ -const se_ProvisionedThroughput = (input: ProvisionedThroughput, context: __SerdeContext): any => { - return { - ...(input.ReadCapacityUnits != null && { ReadCapacityUnits: input.ReadCapacityUnits }), - ...(input.WriteCapacityUnits != null && { WriteCapacityUnits: input.WriteCapacityUnits }), - }; -}; +// se_ProvisionedThroughput omitted. -/** - * serializeAws_json1_0ProvisionedThroughputOverride - */ -const se_ProvisionedThroughputOverride = (input: ProvisionedThroughputOverride, context: __SerdeContext): any => { - return { - ...(input.ReadCapacityUnits != null && { ReadCapacityUnits: input.ReadCapacityUnits }), - }; -}; +// se_ProvisionedThroughputOverride omitted. /** * serializeAws_json1_0Put */ const se_Put = (input: Put, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Item != null && { Item: se_PutItemInputAttributeMap(input.Item, context) }), - ...(input.ReturnValuesOnConditionCheckFailure != null && { - ReturnValuesOnConditionCheckFailure: input.ReturnValuesOnConditionCheckFailure, - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + ConditionExpression: [], + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Item: (_) => se_PutItemInputAttributeMap(_, context), + ReturnValuesOnConditionCheckFailure: [], + TableName: [], + }); }; /** * serializeAws_json1_0PutItemInput */ const se_PutItemInput = (input: PutItemInput, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ConditionalOperator != null && { ConditionalOperator: input.ConditionalOperator }), - ...(input.Expected != null && { Expected: se_ExpectedAttributeMap(input.Expected, context) }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Item != null && { Item: se_PutItemInputAttributeMap(input.Item, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ReturnItemCollectionMetrics != null && { - ReturnItemCollectionMetrics: input.ReturnItemCollectionMetrics, - }), - ...(input.ReturnValues != null && { ReturnValues: input.ReturnValues }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + ConditionExpression: [], + ConditionalOperator: [], + Expected: (_) => se_ExpectedAttributeMap(_, context), + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Item: (_) => se_PutItemInputAttributeMap(_, context), + ReturnConsumedCapacity: [], + ReturnItemCollectionMetrics: [], + ReturnValues: [], + TableName: [], + }); }; /** @@ -5791,68 +5186,47 @@ const se_PutItemInputAttributeMap = (input: Record, cont * serializeAws_json1_0PutRequest */ const se_PutRequest = (input: PutRequest, context: __SerdeContext): any => { - return { - ...(input.Item != null && { Item: se_PutItemInputAttributeMap(input.Item, context) }), - }; + return take(input, { + Item: (_) => se_PutItemInputAttributeMap(_, context), + }); }; /** * serializeAws_json1_0QueryInput */ const se_QueryInput = (input: QueryInput, context: __SerdeContext): any => { - return { - ...(input.AttributesToGet != null && { AttributesToGet: se_AttributeNameList(input.AttributesToGet, context) }), - ...(input.ConditionalOperator != null && { ConditionalOperator: input.ConditionalOperator }), - ...(input.ConsistentRead != null && { ConsistentRead: input.ConsistentRead }), - ...(input.ExclusiveStartKey != null && { ExclusiveStartKey: se_Key(input.ExclusiveStartKey, context) }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.KeyConditionExpression != null && { KeyConditionExpression: input.KeyConditionExpression }), - ...(input.KeyConditions != null && { KeyConditions: se_KeyConditions(input.KeyConditions, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.ProjectionExpression != null && { ProjectionExpression: input.ProjectionExpression }), - ...(input.QueryFilter != null && { QueryFilter: se_FilterConditionMap(input.QueryFilter, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ScanIndexForward != null && { ScanIndexForward: input.ScanIndexForward }), - ...(input.Select != null && { Select: input.Select }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + AttributesToGet: _json, + ConditionalOperator: [], + ConsistentRead: [], + ExclusiveStartKey: (_) => se_Key(_, context), + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + FilterExpression: [], + IndexName: [], + KeyConditionExpression: [], + KeyConditions: (_) => se_KeyConditions(_, context), + Limit: [], + ProjectionExpression: [], + QueryFilter: (_) => se_FilterConditionMap(_, context), + ReturnConsumedCapacity: [], + ScanIndexForward: [], + Select: [], + TableName: [], + }); }; -/** - * serializeAws_json1_0Replica - */ -const se_Replica = (input: Replica, context: __SerdeContext): any => { - return { - ...(input.RegionName != null && { RegionName: input.RegionName }), - }; -}; +// se_Replica omitted. /** * serializeAws_json1_0ReplicaAutoScalingUpdate */ const se_ReplicaAutoScalingUpdate = (input: ReplicaAutoScalingUpdate, context: __SerdeContext): any => { - return { - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.ReplicaGlobalSecondaryIndexUpdates != null && { - ReplicaGlobalSecondaryIndexUpdates: se_ReplicaGlobalSecondaryIndexAutoScalingUpdateList( - input.ReplicaGlobalSecondaryIndexUpdates, - context - ), - }), - ...(input.ReplicaProvisionedReadCapacityAutoScalingUpdate != null && { - ReplicaProvisionedReadCapacityAutoScalingUpdate: se_AutoScalingSettingsUpdate( - input.ReplicaProvisionedReadCapacityAutoScalingUpdate, - context - ), - }), - }; + return take(input, { + RegionName: [], + ReplicaGlobalSecondaryIndexUpdates: (_) => se_ReplicaGlobalSecondaryIndexAutoScalingUpdateList(_, context), + ReplicaProvisionedReadCapacityAutoScalingUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + }); }; /** @@ -5866,17 +5240,7 @@ const se_ReplicaAutoScalingUpdateList = (input: ReplicaAutoScalingUpdate[], cont }); }; -/** - * serializeAws_json1_0ReplicaGlobalSecondaryIndex - */ -const se_ReplicaGlobalSecondaryIndex = (input: ReplicaGlobalSecondaryIndex, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_ProvisionedThroughputOverride(input.ProvisionedThroughputOverride, context), - }), - }; -}; +// se_ReplicaGlobalSecondaryIndex omitted. /** * serializeAws_json1_0ReplicaGlobalSecondaryIndexAutoScalingUpdate @@ -5885,15 +5249,10 @@ const se_ReplicaGlobalSecondaryIndexAutoScalingUpdate = ( input: ReplicaGlobalSecondaryIndexAutoScalingUpdate, context: __SerdeContext ): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedReadCapacityAutoScalingUpdate != null && { - ProvisionedReadCapacityAutoScalingUpdate: se_AutoScalingSettingsUpdate( - input.ProvisionedReadCapacityAutoScalingUpdate, - context - ), - }), - }; + return take(input, { + IndexName: [], + ProvisionedReadCapacityAutoScalingUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + }); }; /** @@ -5910,16 +5269,7 @@ const se_ReplicaGlobalSecondaryIndexAutoScalingUpdateList = ( }); }; -/** - * serializeAws_json1_0ReplicaGlobalSecondaryIndexList - */ -const se_ReplicaGlobalSecondaryIndexList = (input: ReplicaGlobalSecondaryIndex[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicaGlobalSecondaryIndex(entry, context); - }); -}; +// se_ReplicaGlobalSecondaryIndexList omitted. /** * serializeAws_json1_0ReplicaGlobalSecondaryIndexSettingsUpdate @@ -5928,18 +5278,11 @@ const se_ReplicaGlobalSecondaryIndexSettingsUpdate = ( input: ReplicaGlobalSecondaryIndexSettingsUpdate, context: __SerdeContext ): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedReadCapacityAutoScalingSettingsUpdate != null && { - ProvisionedReadCapacityAutoScalingSettingsUpdate: se_AutoScalingSettingsUpdate( - input.ProvisionedReadCapacityAutoScalingSettingsUpdate, - context - ), - }), - ...(input.ProvisionedReadCapacityUnits != null && { - ProvisionedReadCapacityUnits: input.ProvisionedReadCapacityUnits, - }), - }; + return take(input, { + IndexName: [], + ProvisionedReadCapacityAutoScalingSettingsUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + ProvisionedReadCapacityUnits: [], + }); }; /** @@ -5956,40 +5299,19 @@ const se_ReplicaGlobalSecondaryIndexSettingsUpdateList = ( }); }; -/** - * serializeAws_json1_0ReplicaList - */ -const se_ReplicaList = (input: Replica[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Replica(entry, context); - }); -}; +// se_ReplicaList omitted. /** * serializeAws_json1_0ReplicaSettingsUpdate */ const se_ReplicaSettingsUpdate = (input: ReplicaSettingsUpdate, context: __SerdeContext): any => { - return { - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.ReplicaGlobalSecondaryIndexSettingsUpdate != null && { - ReplicaGlobalSecondaryIndexSettingsUpdate: se_ReplicaGlobalSecondaryIndexSettingsUpdateList( - input.ReplicaGlobalSecondaryIndexSettingsUpdate, - context - ), - }), - ...(input.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate != null && { - ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: se_AutoScalingSettingsUpdate( - input.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate, - context - ), - }), - ...(input.ReplicaProvisionedReadCapacityUnits != null && { - ReplicaProvisionedReadCapacityUnits: input.ReplicaProvisionedReadCapacityUnits, - }), - ...(input.ReplicaTableClass != null && { ReplicaTableClass: input.ReplicaTableClass }), - }; + return take(input, { + RegionName: [], + ReplicaGlobalSecondaryIndexSettingsUpdate: (_) => se_ReplicaGlobalSecondaryIndexSettingsUpdateList(_, context), + ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + ReplicaProvisionedReadCapacityUnits: [], + ReplicaTableClass: [], + }); }; /** @@ -6003,489 +5325,206 @@ const se_ReplicaSettingsUpdateList = (input: ReplicaSettingsUpdate[], context: _ }); }; -/** - * serializeAws_json1_0ReplicationGroupUpdate - */ -const se_ReplicationGroupUpdate = (input: ReplicationGroupUpdate, context: __SerdeContext): any => { - return { - ...(input.Create != null && { Create: se_CreateReplicationGroupMemberAction(input.Create, context) }), - ...(input.Delete != null && { Delete: se_DeleteReplicationGroupMemberAction(input.Delete, context) }), - ...(input.Update != null && { Update: se_UpdateReplicationGroupMemberAction(input.Update, context) }), - }; -}; +// se_ReplicationGroupUpdate omitted. -/** - * serializeAws_json1_0ReplicationGroupUpdateList - */ -const se_ReplicationGroupUpdateList = (input: ReplicationGroupUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicationGroupUpdate(entry, context); - }); -}; +// se_ReplicationGroupUpdateList omitted. -/** - * serializeAws_json1_0ReplicaUpdate - */ -const se_ReplicaUpdate = (input: ReplicaUpdate, context: __SerdeContext): any => { - return { - ...(input.Create != null && { Create: se_CreateReplicaAction(input.Create, context) }), - ...(input.Delete != null && { Delete: se_DeleteReplicaAction(input.Delete, context) }), - }; -}; +// se_ReplicaUpdate omitted. -/** - * serializeAws_json1_0ReplicaUpdateList - */ -const se_ReplicaUpdateList = (input: ReplicaUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicaUpdate(entry, context); - }); -}; +// se_ReplicaUpdateList omitted. -/** - * serializeAws_json1_0RestoreTableFromBackupInput - */ -const se_RestoreTableFromBackupInput = (input: RestoreTableFromBackupInput, context: __SerdeContext): any => { - return { - ...(input.BackupArn != null && { BackupArn: input.BackupArn }), - ...(input.BillingModeOverride != null && { BillingModeOverride: input.BillingModeOverride }), - ...(input.GlobalSecondaryIndexOverride != null && { - GlobalSecondaryIndexOverride: se_GlobalSecondaryIndexList(input.GlobalSecondaryIndexOverride, context), - }), - ...(input.LocalSecondaryIndexOverride != null && { - LocalSecondaryIndexOverride: se_LocalSecondaryIndexList(input.LocalSecondaryIndexOverride, context), - }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_ProvisionedThroughput(input.ProvisionedThroughputOverride, context), - }), - ...(input.SSESpecificationOverride != null && { - SSESpecificationOverride: se_SSESpecification(input.SSESpecificationOverride, context), - }), - ...(input.TargetTableName != null && { TargetTableName: input.TargetTableName }), - }; -}; +// se_RestoreTableFromBackupInput omitted. /** * serializeAws_json1_0RestoreTableToPointInTimeInput */ const se_RestoreTableToPointInTimeInput = (input: RestoreTableToPointInTimeInput, context: __SerdeContext): any => { - return { - ...(input.BillingModeOverride != null && { BillingModeOverride: input.BillingModeOverride }), - ...(input.GlobalSecondaryIndexOverride != null && { - GlobalSecondaryIndexOverride: se_GlobalSecondaryIndexList(input.GlobalSecondaryIndexOverride, context), - }), - ...(input.LocalSecondaryIndexOverride != null && { - LocalSecondaryIndexOverride: se_LocalSecondaryIndexList(input.LocalSecondaryIndexOverride, context), - }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_ProvisionedThroughput(input.ProvisionedThroughputOverride, context), - }), - ...(input.RestoreDateTime != null && { RestoreDateTime: Math.round(input.RestoreDateTime.getTime() / 1000) }), - ...(input.SSESpecificationOverride != null && { - SSESpecificationOverride: se_SSESpecification(input.SSESpecificationOverride, context), - }), - ...(input.SourceTableArn != null && { SourceTableArn: input.SourceTableArn }), - ...(input.SourceTableName != null && { SourceTableName: input.SourceTableName }), - ...(input.TargetTableName != null && { TargetTableName: input.TargetTableName }), - ...(input.UseLatestRestorableTime != null && { UseLatestRestorableTime: input.UseLatestRestorableTime }), - }; + return take(input, { + BillingModeOverride: [], + GlobalSecondaryIndexOverride: _json, + LocalSecondaryIndexOverride: _json, + ProvisionedThroughputOverride: _json, + RestoreDateTime: (_) => Math.round(_.getTime() / 1000), + SSESpecificationOverride: _json, + SourceTableArn: [], + SourceTableName: [], + TargetTableName: [], + UseLatestRestorableTime: [], + }); }; -/** - * serializeAws_json1_0S3BucketSource - */ -const se_S3BucketSource = (input: S3BucketSource, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3BucketOwner != null && { S3BucketOwner: input.S3BucketOwner }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - }; -}; +// se_S3BucketSource omitted. /** * serializeAws_json1_0ScanInput */ const se_ScanInput = (input: ScanInput, context: __SerdeContext): any => { - return { - ...(input.AttributesToGet != null && { AttributesToGet: se_AttributeNameList(input.AttributesToGet, context) }), - ...(input.ConditionalOperator != null && { ConditionalOperator: input.ConditionalOperator }), - ...(input.ConsistentRead != null && { ConsistentRead: input.ConsistentRead }), - ...(input.ExclusiveStartKey != null && { ExclusiveStartKey: se_Key(input.ExclusiveStartKey, context) }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.ProjectionExpression != null && { ProjectionExpression: input.ProjectionExpression }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ScanFilter != null && { ScanFilter: se_FilterConditionMap(input.ScanFilter, context) }), - ...(input.Segment != null && { Segment: input.Segment }), - ...(input.Select != null && { Select: input.Select }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TotalSegments != null && { TotalSegments: input.TotalSegments }), - }; + return take(input, { + AttributesToGet: _json, + ConditionalOperator: [], + ConsistentRead: [], + ExclusiveStartKey: (_) => se_Key(_, context), + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + FilterExpression: [], + IndexName: [], + Limit: [], + ProjectionExpression: [], + ReturnConsumedCapacity: [], + ScanFilter: (_) => se_FilterConditionMap(_, context), + Segment: [], + Select: [], + TableName: [], + TotalSegments: [], + }); }; -/** - * serializeAws_json1_0SSESpecification - */ -const se_SSESpecification = (input: SSESpecification, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KMSMasterKeyId != null && { KMSMasterKeyId: input.KMSMasterKeyId }), - ...(input.SSEType != null && { SSEType: input.SSEType }), - }; -}; +// se_SSESpecification omitted. + +// se_StreamSpecification omitted. + +// se_StringSetAttributeValue omitted. + +// se_TableCreationParameters omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceInput omitted. + +// se_TimeToLiveSpecification omitted. /** - * serializeAws_json1_0StreamSpecification + * serializeAws_json1_0TransactGetItem */ -const se_StreamSpecification = (input: StreamSpecification, context: __SerdeContext): any => { - return { - ...(input.StreamEnabled != null && { StreamEnabled: input.StreamEnabled }), - ...(input.StreamViewType != null && { StreamViewType: input.StreamViewType }), - }; +const se_TransactGetItem = (input: TransactGetItem, context: __SerdeContext): any => { + return take(input, { + Get: (_) => se_Get(_, context), + }); }; /** - * serializeAws_json1_0StringSetAttributeValue + * serializeAws_json1_0TransactGetItemList */ -const se_StringSetAttributeValue = (input: string[], context: __SerdeContext): any => { +const se_TransactGetItemList = (input: TransactGetItem[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_TransactGetItem(entry, context); }); }; /** - * serializeAws_json1_0TableCreationParameters + * serializeAws_json1_0TransactGetItemsInput */ -const se_TableCreationParameters = (input: TableCreationParameters, context: __SerdeContext): any => { - return { - ...(input.AttributeDefinitions != null && { - AttributeDefinitions: se_AttributeDefinitions(input.AttributeDefinitions, context), - }), - ...(input.BillingMode != null && { BillingMode: input.BillingMode }), - ...(input.GlobalSecondaryIndexes != null && { - GlobalSecondaryIndexes: se_GlobalSecondaryIndexList(input.GlobalSecondaryIndexes, context), - }), - ...(input.KeySchema != null && { KeySchema: se_KeySchema(input.KeySchema, context) }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.SSESpecification != null && { SSESpecification: se_SSESpecification(input.SSESpecification, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; +const se_TransactGetItemsInput = (input: TransactGetItemsInput, context: __SerdeContext): any => { + return take(input, { + ReturnConsumedCapacity: [], + TransactItems: (_) => se_TransactGetItemList(_, context), + }); }; /** - * serializeAws_json1_0Tag + * serializeAws_json1_0TransactWriteItem */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_TransactWriteItem = (input: TransactWriteItem, context: __SerdeContext): any => { + return take(input, { + ConditionCheck: (_) => se_ConditionCheck(_, context), + Delete: (_) => se_Delete(_, context), + Put: (_) => se_Put(_, context), + Update: (_) => se_Update(_, context), + }); }; /** - * serializeAws_json1_0TagKeyList + * serializeAws_json1_0TransactWriteItemList */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { +const se_TransactWriteItemList = (input: TransactWriteItem[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_TransactWriteItem(entry, context); }); }; /** - * serializeAws_json1_0TagList + * serializeAws_json1_0TransactWriteItemsInput */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); +const se_TransactWriteItemsInput = (input: TransactWriteItemsInput, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ReturnConsumedCapacity: [], + ReturnItemCollectionMetrics: [], + TransactItems: (_) => se_TransactWriteItemList(_, context), + }); }; +// se_UntagResourceInput omitted. + /** - * serializeAws_json1_0TagResourceInput + * serializeAws_json1_0Update */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; +const se_Update = (input: Update, context: __SerdeContext): any => { + return take(input, { + ConditionExpression: [], + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Key: (_) => se_Key(_, context), + ReturnValuesOnConditionCheckFailure: [], + TableName: [], + UpdateExpression: [], + }); }; +// se_UpdateContinuousBackupsInput omitted. + +// se_UpdateContributorInsightsInput omitted. + +// se_UpdateGlobalSecondaryIndexAction omitted. + +// se_UpdateGlobalTableInput omitted. + /** - * serializeAws_json1_0TimeToLiveSpecification + * serializeAws_json1_0UpdateGlobalTableSettingsInput */ -const se_TimeToLiveSpecification = (input: TimeToLiveSpecification, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; +const se_UpdateGlobalTableSettingsInput = (input: UpdateGlobalTableSettingsInput, context: __SerdeContext): any => { + return take(input, { + GlobalTableBillingMode: [], + GlobalTableGlobalSecondaryIndexSettingsUpdate: (_) => + se_GlobalTableGlobalSecondaryIndexSettingsUpdateList(_, context), + GlobalTableName: [], + GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + GlobalTableProvisionedWriteCapacityUnits: [], + ReplicaSettingsUpdate: (_) => se_ReplicaSettingsUpdateList(_, context), + }); }; /** - * serializeAws_json1_0TransactGetItem - */ -const se_TransactGetItem = (input: TransactGetItem, context: __SerdeContext): any => { - return { - ...(input.Get != null && { Get: se_Get(input.Get, context) }), - }; -}; - -/** - * serializeAws_json1_0TransactGetItemList - */ -const se_TransactGetItemList = (input: TransactGetItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TransactGetItem(entry, context); - }); -}; - -/** - * serializeAws_json1_0TransactGetItemsInput - */ -const se_TransactGetItemsInput = (input: TransactGetItemsInput, context: __SerdeContext): any => { - return { - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.TransactItems != null && { TransactItems: se_TransactGetItemList(input.TransactItems, context) }), - }; -}; - -/** - * serializeAws_json1_0TransactWriteItem - */ -const se_TransactWriteItem = (input: TransactWriteItem, context: __SerdeContext): any => { - return { - ...(input.ConditionCheck != null && { ConditionCheck: se_ConditionCheck(input.ConditionCheck, context) }), - ...(input.Delete != null && { Delete: se_Delete(input.Delete, context) }), - ...(input.Put != null && { Put: se_Put(input.Put, context) }), - ...(input.Update != null && { Update: se_Update(input.Update, context) }), - }; -}; - -/** - * serializeAws_json1_0TransactWriteItemList - */ -const se_TransactWriteItemList = (input: TransactWriteItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TransactWriteItem(entry, context); - }); -}; - -/** - * serializeAws_json1_0TransactWriteItemsInput - */ -const se_TransactWriteItemsInput = (input: TransactWriteItemsInput, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ReturnItemCollectionMetrics != null && { - ReturnItemCollectionMetrics: input.ReturnItemCollectionMetrics, - }), - ...(input.TransactItems != null && { TransactItems: se_TransactWriteItemList(input.TransactItems, context) }), - }; -}; - -/** - * serializeAws_json1_0UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_0Update - */ -const se_Update = (input: Update, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ReturnValuesOnConditionCheckFailure != null && { - ReturnValuesOnConditionCheckFailure: input.ReturnValuesOnConditionCheckFailure, - }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.UpdateExpression != null && { UpdateExpression: input.UpdateExpression }), - }; -}; - -/** - * serializeAws_json1_0UpdateContinuousBackupsInput - */ -const se_UpdateContinuousBackupsInput = (input: UpdateContinuousBackupsInput, context: __SerdeContext): any => { - return { - ...(input.PointInTimeRecoverySpecification != null && { - PointInTimeRecoverySpecification: se_PointInTimeRecoverySpecification( - input.PointInTimeRecoverySpecification, - context - ), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_0UpdateContributorInsightsInput - */ -const se_UpdateContributorInsightsInput = (input: UpdateContributorInsightsInput, context: __SerdeContext): any => { - return { - ...(input.ContributorInsightsAction != null && { ContributorInsightsAction: input.ContributorInsightsAction }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_0UpdateGlobalSecondaryIndexAction - */ -const se_UpdateGlobalSecondaryIndexAction = (input: UpdateGlobalSecondaryIndexAction, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - }; -}; - -/** - * serializeAws_json1_0UpdateGlobalTableInput - */ -const se_UpdateGlobalTableInput = (input: UpdateGlobalTableInput, context: __SerdeContext): any => { - return { - ...(input.GlobalTableName != null && { GlobalTableName: input.GlobalTableName }), - ...(input.ReplicaUpdates != null && { ReplicaUpdates: se_ReplicaUpdateList(input.ReplicaUpdates, context) }), - }; -}; - -/** - * serializeAws_json1_0UpdateGlobalTableSettingsInput - */ -const se_UpdateGlobalTableSettingsInput = (input: UpdateGlobalTableSettingsInput, context: __SerdeContext): any => { - return { - ...(input.GlobalTableBillingMode != null && { GlobalTableBillingMode: input.GlobalTableBillingMode }), - ...(input.GlobalTableGlobalSecondaryIndexSettingsUpdate != null && { - GlobalTableGlobalSecondaryIndexSettingsUpdate: se_GlobalTableGlobalSecondaryIndexSettingsUpdateList( - input.GlobalTableGlobalSecondaryIndexSettingsUpdate, - context - ), - }), - ...(input.GlobalTableName != null && { GlobalTableName: input.GlobalTableName }), - ...(input.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate != null && { - GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate: se_AutoScalingSettingsUpdate( - input.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate, - context - ), - }), - ...(input.GlobalTableProvisionedWriteCapacityUnits != null && { - GlobalTableProvisionedWriteCapacityUnits: input.GlobalTableProvisionedWriteCapacityUnits, - }), - ...(input.ReplicaSettingsUpdate != null && { - ReplicaSettingsUpdate: se_ReplicaSettingsUpdateList(input.ReplicaSettingsUpdate, context), - }), - }; -}; - -/** - * serializeAws_json1_0UpdateItemInput + * serializeAws_json1_0UpdateItemInput */ const se_UpdateItemInput = (input: UpdateItemInput, context: __SerdeContext): any => { - return { - ...(input.AttributeUpdates != null && { AttributeUpdates: se_AttributeUpdates(input.AttributeUpdates, context) }), - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - ...(input.ConditionalOperator != null && { ConditionalOperator: input.ConditionalOperator }), - ...(input.Expected != null && { Expected: se_ExpectedAttributeMap(input.Expected, context) }), - ...(input.ExpressionAttributeNames != null && { - ExpressionAttributeNames: se_ExpressionAttributeNameMap(input.ExpressionAttributeNames, context), - }), - ...(input.ExpressionAttributeValues != null && { - ExpressionAttributeValues: se_ExpressionAttributeValueMap(input.ExpressionAttributeValues, context), - }), - ...(input.Key != null && { Key: se_Key(input.Key, context) }), - ...(input.ReturnConsumedCapacity != null && { ReturnConsumedCapacity: input.ReturnConsumedCapacity }), - ...(input.ReturnItemCollectionMetrics != null && { - ReturnItemCollectionMetrics: input.ReturnItemCollectionMetrics, - }), - ...(input.ReturnValues != null && { ReturnValues: input.ReturnValues }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.UpdateExpression != null && { UpdateExpression: input.UpdateExpression }), - }; + return take(input, { + AttributeUpdates: (_) => se_AttributeUpdates(_, context), + ConditionExpression: [], + ConditionalOperator: [], + Expected: (_) => se_ExpectedAttributeMap(_, context), + ExpressionAttributeNames: _json, + ExpressionAttributeValues: (_) => se_ExpressionAttributeValueMap(_, context), + Key: (_) => se_Key(_, context), + ReturnConsumedCapacity: [], + ReturnItemCollectionMetrics: [], + ReturnValues: [], + TableName: [], + UpdateExpression: [], + }); }; -/** - * serializeAws_json1_0UpdateReplicationGroupMemberAction - */ -const se_UpdateReplicationGroupMemberAction = ( - input: UpdateReplicationGroupMemberAction, - context: __SerdeContext -): any => { - return { - ...(input.GlobalSecondaryIndexes != null && { - GlobalSecondaryIndexes: se_ReplicaGlobalSecondaryIndexList(input.GlobalSecondaryIndexes, context), - }), - ...(input.KMSMasterKeyId != null && { KMSMasterKeyId: input.KMSMasterKeyId }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_ProvisionedThroughputOverride(input.ProvisionedThroughputOverride, context), - }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.TableClassOverride != null && { TableClassOverride: input.TableClassOverride }), - }; -}; +// se_UpdateReplicationGroupMemberAction omitted. -/** - * serializeAws_json1_0UpdateTableInput - */ -const se_UpdateTableInput = (input: UpdateTableInput, context: __SerdeContext): any => { - return { - ...(input.AttributeDefinitions != null && { - AttributeDefinitions: se_AttributeDefinitions(input.AttributeDefinitions, context), - }), - ...(input.BillingMode != null && { BillingMode: input.BillingMode }), - ...(input.DeletionProtectionEnabled != null && { DeletionProtectionEnabled: input.DeletionProtectionEnabled }), - ...(input.GlobalSecondaryIndexUpdates != null && { - GlobalSecondaryIndexUpdates: se_GlobalSecondaryIndexUpdateList(input.GlobalSecondaryIndexUpdates, context), - }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.ReplicaUpdates != null && { - ReplicaUpdates: se_ReplicationGroupUpdateList(input.ReplicaUpdates, context), - }), - ...(input.SSESpecification != null && { SSESpecification: se_SSESpecification(input.SSESpecification, context) }), - ...(input.StreamSpecification != null && { - StreamSpecification: se_StreamSpecification(input.StreamSpecification, context), - }), - ...(input.TableClass != null && { TableClass: input.TableClass }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_UpdateTableInput omitted. /** * serializeAws_json1_0UpdateTableReplicaAutoScalingInput @@ -6494,46 +5533,24 @@ const se_UpdateTableReplicaAutoScalingInput = ( input: UpdateTableReplicaAutoScalingInput, context: __SerdeContext ): any => { - return { - ...(input.GlobalSecondaryIndexUpdates != null && { - GlobalSecondaryIndexUpdates: se_GlobalSecondaryIndexAutoScalingUpdateList( - input.GlobalSecondaryIndexUpdates, - context - ), - }), - ...(input.ProvisionedWriteCapacityAutoScalingUpdate != null && { - ProvisionedWriteCapacityAutoScalingUpdate: se_AutoScalingSettingsUpdate( - input.ProvisionedWriteCapacityAutoScalingUpdate, - context - ), - }), - ...(input.ReplicaUpdates != null && { - ReplicaUpdates: se_ReplicaAutoScalingUpdateList(input.ReplicaUpdates, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + GlobalSecondaryIndexUpdates: (_) => se_GlobalSecondaryIndexAutoScalingUpdateList(_, context), + ProvisionedWriteCapacityAutoScalingUpdate: (_) => se_AutoScalingSettingsUpdate(_, context), + ReplicaUpdates: (_) => se_ReplicaAutoScalingUpdateList(_, context), + TableName: [], + }); }; -/** - * serializeAws_json1_0UpdateTimeToLiveInput - */ -const se_UpdateTimeToLiveInput = (input: UpdateTimeToLiveInput, context: __SerdeContext): any => { - return { - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TimeToLiveSpecification != null && { - TimeToLiveSpecification: se_TimeToLiveSpecification(input.TimeToLiveSpecification, context), - }), - }; -}; +// se_UpdateTimeToLiveInput omitted. /** * serializeAws_json1_0WriteRequest */ const se_WriteRequest = (input: WriteRequest, context: __SerdeContext): any => { - return { - ...(input.DeleteRequest != null && { DeleteRequest: se_DeleteRequest(input.DeleteRequest, context) }), - ...(input.PutRequest != null && { PutRequest: se_PutRequest(input.PutRequest, context) }), - }; + return take(input, { + DeleteRequest: (_) => se_DeleteRequest(_, context), + PutRequest: (_) => se_PutRequest(_, context), + }); }; /** @@ -6551,40 +5568,16 @@ const se_WriteRequests = (input: WriteRequest[], context: __SerdeContext): any = * deserializeAws_json1_0ArchivalSummary */ const de_ArchivalSummary = (output: any, context: __SerdeContext): ArchivalSummary => { - return { - ArchivalBackupArn: __expectString(output.ArchivalBackupArn), - ArchivalDateTime: - output.ArchivalDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ArchivalDateTime))) - : undefined, - ArchivalReason: __expectString(output.ArchivalReason), - } as any; + return take(output, { + ArchivalBackupArn: __expectString, + ArchivalDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ArchivalReason: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0AttributeDefinition - */ -const de_AttributeDefinition = (output: any, context: __SerdeContext): AttributeDefinition => { - return { - AttributeName: __expectString(output.AttributeName), - AttributeType: __expectString(output.AttributeType), - } as any; -}; +// de_AttributeDefinition omitted. -/** - * deserializeAws_json1_0AttributeDefinitions - */ -const de_AttributeDefinitions = (output: any, context: __SerdeContext): AttributeDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttributeDefinition(entry, context); - }); - return retVal; -}; +// de_AttributeDefinitions omitted. /** * deserializeAws_json1_0AttributeMap @@ -6599,20 +5592,7 @@ const de_AttributeMap = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AttributeNameList omitted. /** * deserializeAws_json1_0AttributeValue @@ -6646,7 +5626,7 @@ const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue } if (output.NS != null) { return { - NS: de_NumberSetAttributeValue(output.NS, context), + NS: _json(output.NS), }; } if (__expectBoolean(output.NULL) !== undefined) { @@ -6657,7 +5637,7 @@ const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue } if (output.SS != null) { return { - SS: de_StringSetAttributeValue(output.SS, context), + SS: _json(output.SS), }; } return { $unknown: Object.entries(output)[0] }; @@ -6667,16 +5647,11 @@ const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue * deserializeAws_json1_0AutoScalingPolicyDescription */ const de_AutoScalingPolicyDescription = (output: any, context: __SerdeContext): AutoScalingPolicyDescription => { - return { - PolicyName: __expectString(output.PolicyName), - TargetTrackingScalingPolicyConfiguration: - output.TargetTrackingScalingPolicyConfiguration != null - ? de_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( - output.TargetTrackingScalingPolicyConfiguration, - context - ) - : undefined, - } as any; + return take(output, { + PolicyName: __expectString, + TargetTrackingScalingPolicyConfiguration: (_: any) => + de_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(_, context), + }) as any; }; /** @@ -6686,9 +5661,6 @@ const de_AutoScalingPolicyDescriptionList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutoScalingPolicyDescription(entry, context); }); return retVal; @@ -6698,14 +5670,13 @@ const de_AutoScalingPolicyDescriptionList = (output: any, context: __SerdeContex * deserializeAws_json1_0AutoScalingSettingsDescription */ const de_AutoScalingSettingsDescription = (output: any, context: __SerdeContext): AutoScalingSettingsDescription => { - return { - AutoScalingDisabled: __expectBoolean(output.AutoScalingDisabled), - AutoScalingRoleArn: __expectString(output.AutoScalingRoleArn), - MaximumUnits: __expectLong(output.MaximumUnits), - MinimumUnits: __expectLong(output.MinimumUnits), - ScalingPolicies: - output.ScalingPolicies != null ? de_AutoScalingPolicyDescriptionList(output.ScalingPolicies, context) : undefined, - } as any; + return take(output, { + AutoScalingDisabled: __expectBoolean, + AutoScalingRoleArn: __expectString, + MaximumUnits: __expectLong, + MinimumUnits: __expectLong, + ScalingPolicies: (_: any) => de_AutoScalingPolicyDescriptionList(_, context), + }) as any; }; /** @@ -6715,67 +5686,43 @@ const de_AutoScalingTargetTrackingScalingPolicyConfigurationDescription = ( output: any, context: __SerdeContext ): AutoScalingTargetTrackingScalingPolicyConfigurationDescription => { - return { - DisableScaleIn: __expectBoolean(output.DisableScaleIn), - ScaleInCooldown: __expectInt32(output.ScaleInCooldown), - ScaleOutCooldown: __expectInt32(output.ScaleOutCooldown), - TargetValue: __limitedParseDouble(output.TargetValue), - } as any; + return take(output, { + DisableScaleIn: __expectBoolean, + ScaleInCooldown: __expectInt32, + ScaleOutCooldown: __expectInt32, + TargetValue: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_0BackupDescription */ const de_BackupDescription = (output: any, context: __SerdeContext): BackupDescription => { - return { - BackupDetails: output.BackupDetails != null ? de_BackupDetails(output.BackupDetails, context) : undefined, - SourceTableDetails: - output.SourceTableDetails != null ? de_SourceTableDetails(output.SourceTableDetails, context) : undefined, - SourceTableFeatureDetails: - output.SourceTableFeatureDetails != null - ? de_SourceTableFeatureDetails(output.SourceTableFeatureDetails, context) - : undefined, - } as any; + return take(output, { + BackupDetails: (_: any) => de_BackupDetails(_, context), + SourceTableDetails: (_: any) => de_SourceTableDetails(_, context), + SourceTableFeatureDetails: (_: any) => de_SourceTableFeatureDetails(_, context), + }) as any; }; /** * deserializeAws_json1_0BackupDetails */ const de_BackupDetails = (output: any, context: __SerdeContext): BackupDetails => { - return { - BackupArn: __expectString(output.BackupArn), - BackupCreationDateTime: - output.BackupCreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.BackupCreationDateTime))) - : undefined, - BackupExpiryDateTime: - output.BackupExpiryDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.BackupExpiryDateTime))) - : undefined, - BackupName: __expectString(output.BackupName), - BackupSizeBytes: __expectLong(output.BackupSizeBytes), - BackupStatus: __expectString(output.BackupStatus), - BackupType: __expectString(output.BackupType), - } as any; -}; - -/** - * deserializeAws_json1_0BackupInUseException - */ -const de_BackupInUseException = (output: any, context: __SerdeContext): BackupInUseException => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + BackupArn: __expectString, + BackupCreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + BackupExpiryDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + BackupName: __expectString, + BackupSizeBytes: __expectLong, + BackupStatus: __expectString, + BackupType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0BackupNotFoundException - */ -const de_BackupNotFoundException = (output: any, context: __SerdeContext): BackupNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_BackupInUseException omitted. + +// de_BackupNotFoundException omitted. /** * deserializeAws_json1_0BackupSummaries @@ -6784,9 +5731,6 @@ const de_BackupSummaries = (output: any, context: __SerdeContext): BackupSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BackupSummary(entry, context); }); return retVal; @@ -6796,48 +5740,39 @@ const de_BackupSummaries = (output: any, context: __SerdeContext): BackupSummary * deserializeAws_json1_0BackupSummary */ const de_BackupSummary = (output: any, context: __SerdeContext): BackupSummary => { - return { - BackupArn: __expectString(output.BackupArn), - BackupCreationDateTime: - output.BackupCreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.BackupCreationDateTime))) - : undefined, - BackupExpiryDateTime: - output.BackupExpiryDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.BackupExpiryDateTime))) - : undefined, - BackupName: __expectString(output.BackupName), - BackupSizeBytes: __expectLong(output.BackupSizeBytes), - BackupStatus: __expectString(output.BackupStatus), - BackupType: __expectString(output.BackupType), - TableArn: __expectString(output.TableArn), - TableId: __expectString(output.TableId), - TableName: __expectString(output.TableName), - } as any; + return take(output, { + BackupArn: __expectString, + BackupCreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + BackupExpiryDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + BackupName: __expectString, + BackupSizeBytes: __expectLong, + BackupStatus: __expectString, + BackupType: __expectString, + TableArn: __expectString, + TableId: __expectString, + TableName: __expectString, + }) as any; }; /** * deserializeAws_json1_0BatchExecuteStatementOutput */ const de_BatchExecuteStatementOutput = (output: any, context: __SerdeContext): BatchExecuteStatementOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacityMultiple(output.ConsumedCapacity, context) : undefined, - Responses: output.Responses != null ? de_PartiQLBatchResponse(output.Responses, context) : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacityMultiple(_, context), + Responses: (_: any) => de_PartiQLBatchResponse(_, context), + }) as any; }; /** * deserializeAws_json1_0BatchGetItemOutput */ const de_BatchGetItemOutput = (output: any, context: __SerdeContext): BatchGetItemOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacityMultiple(output.ConsumedCapacity, context) : undefined, - Responses: output.Responses != null ? de_BatchGetResponseMap(output.Responses, context) : undefined, - UnprocessedKeys: - output.UnprocessedKeys != null ? de_BatchGetRequestMap(output.UnprocessedKeys, context) : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacityMultiple(_, context), + Responses: (_: any) => de_BatchGetResponseMap(_, context), + UnprocessedKeys: (_: any) => de_BatchGetRequestMap(_, context), + }) as any; }; /** @@ -6872,41 +5807,28 @@ const de_BatchGetResponseMap = ( ); }; -/** - * deserializeAws_json1_0BatchStatementError - */ -const de_BatchStatementError = (output: any, context: __SerdeContext): BatchStatementError => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_BatchStatementError omitted. /** * deserializeAws_json1_0BatchStatementResponse */ const de_BatchStatementResponse = (output: any, context: __SerdeContext): BatchStatementResponse => { - return { - Error: output.Error != null ? de_BatchStatementError(output.Error, context) : undefined, - Item: output.Item != null ? de_AttributeMap(output.Item, context) : undefined, - TableName: __expectString(output.TableName), - } as any; + return take(output, { + Error: _json, + Item: (_: any) => de_AttributeMap(_, context), + TableName: __expectString, + }) as any; }; /** * deserializeAws_json1_0BatchWriteItemOutput */ const de_BatchWriteItemOutput = (output: any, context: __SerdeContext): BatchWriteItemOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacityMultiple(output.ConsumedCapacity, context) : undefined, - ItemCollectionMetrics: - output.ItemCollectionMetrics != null - ? de_ItemCollectionMetricsPerTable(output.ItemCollectionMetrics, context) - : undefined, - UnprocessedItems: - output.UnprocessedItems != null ? de_BatchWriteItemRequestMap(output.UnprocessedItems, context) : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacityMultiple(_, context), + ItemCollectionMetrics: (_: any) => de_ItemCollectionMetricsPerTable(_, context), + UnprocessedItems: (_: any) => de_BatchWriteItemRequestMap(_, context), + }) as any; }; /** @@ -6926,13 +5848,10 @@ const de_BatchWriteItemRequestMap = (output: any, context: __SerdeContext): Reco * deserializeAws_json1_0BillingModeSummary */ const de_BillingModeSummary = (output: any, context: __SerdeContext): BillingModeSummary => { - return { - BillingMode: __expectString(output.BillingMode), - LastUpdateToPayPerRequestDateTime: - output.LastUpdateToPayPerRequestDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateToPayPerRequestDateTime))) - : undefined, - } as any; + return take(output, { + BillingMode: __expectString, + LastUpdateToPayPerRequestDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -6942,9 +5861,6 @@ const de_BinarySetAttributeValue = (output: any, context: __SerdeContext): Uint8 const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return context.base64Decoder(entry); }); return retVal; @@ -6954,11 +5870,11 @@ const de_BinarySetAttributeValue = (output: any, context: __SerdeContext): Uint8 * deserializeAws_json1_0CancellationReason */ const de_CancellationReason = (output: any, context: __SerdeContext): CancellationReason => { - return { - Code: __expectString(output.Code), - Item: output.Item != null ? de_AttributeMap(output.Item, context) : undefined, - Message: __expectString(output.Message), - } as any; + return take(output, { + Code: __expectString, + Item: (_: any) => de_AttributeMap(_, context), + Message: __expectString, + }) as any; }; /** @@ -6968,9 +5884,6 @@ const de_CancellationReasonList = (output: any, context: __SerdeContext): Cancel const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CancellationReason(entry, context); }); return retVal; @@ -6980,41 +5893,28 @@ const de_CancellationReasonList = (output: any, context: __SerdeContext): Cancel * deserializeAws_json1_0Capacity */ const de_Capacity = (output: any, context: __SerdeContext): Capacity => { - return { - CapacityUnits: __limitedParseDouble(output.CapacityUnits), - ReadCapacityUnits: __limitedParseDouble(output.ReadCapacityUnits), - WriteCapacityUnits: __limitedParseDouble(output.WriteCapacityUnits), - } as any; + return take(output, { + CapacityUnits: __limitedParseDouble, + ReadCapacityUnits: __limitedParseDouble, + WriteCapacityUnits: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_0ConditionalCheckFailedException - */ -const de_ConditionalCheckFailedException = (output: any, context: __SerdeContext): ConditionalCheckFailedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConditionalCheckFailedException omitted. /** * deserializeAws_json1_0ConsumedCapacity */ const de_ConsumedCapacity = (output: any, context: __SerdeContext): ConsumedCapacity => { - return { - CapacityUnits: __limitedParseDouble(output.CapacityUnits), - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_SecondaryIndexesCapacityMap(output.GlobalSecondaryIndexes, context) - : undefined, - LocalSecondaryIndexes: - output.LocalSecondaryIndexes != null - ? de_SecondaryIndexesCapacityMap(output.LocalSecondaryIndexes, context) - : undefined, - ReadCapacityUnits: __limitedParseDouble(output.ReadCapacityUnits), - Table: output.Table != null ? de_Capacity(output.Table, context) : undefined, - TableName: __expectString(output.TableName), - WriteCapacityUnits: __limitedParseDouble(output.WriteCapacityUnits), - } as any; + return take(output, { + CapacityUnits: __limitedParseDouble, + GlobalSecondaryIndexes: (_: any) => de_SecondaryIndexesCapacityMap(_, context), + LocalSecondaryIndexes: (_: any) => de_SecondaryIndexesCapacityMap(_, context), + ReadCapacityUnits: __limitedParseDouble, + Table: (_: any) => de_Capacity(_, context), + TableName: __expectString, + WriteCapacityUnits: __limitedParseDouble, + }) as any; }; /** @@ -7024,9 +5924,6 @@ const de_ConsumedCapacityMultiple = (output: any, context: __SerdeContext): Cons const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConsumedCapacity(entry, context); }); return retVal; @@ -7036,188 +5933,105 @@ const de_ConsumedCapacityMultiple = (output: any, context: __SerdeContext): Cons * deserializeAws_json1_0ContinuousBackupsDescription */ const de_ContinuousBackupsDescription = (output: any, context: __SerdeContext): ContinuousBackupsDescription => { - return { - ContinuousBackupsStatus: __expectString(output.ContinuousBackupsStatus), - PointInTimeRecoveryDescription: - output.PointInTimeRecoveryDescription != null - ? de_PointInTimeRecoveryDescription(output.PointInTimeRecoveryDescription, context) - : undefined, - } as any; + return take(output, { + ContinuousBackupsStatus: __expectString, + PointInTimeRecoveryDescription: (_: any) => de_PointInTimeRecoveryDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ContinuousBackupsUnavailableException - */ -const de_ContinuousBackupsUnavailableException = ( - output: any, - context: __SerdeContext -): ContinuousBackupsUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ContinuousBackupsUnavailableException omitted. -/** - * deserializeAws_json1_0ContributorInsightsRuleList - */ -const de_ContributorInsightsRuleList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ContributorInsightsRuleList omitted. -/** - * deserializeAws_json1_0ContributorInsightsSummaries - */ -const de_ContributorInsightsSummaries = (output: any, context: __SerdeContext): ContributorInsightsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContributorInsightsSummary(entry, context); - }); - return retVal; -}; +// de_ContributorInsightsSummaries omitted. -/** - * deserializeAws_json1_0ContributorInsightsSummary - */ -const de_ContributorInsightsSummary = (output: any, context: __SerdeContext): ContributorInsightsSummary => { - return { - ContributorInsightsStatus: __expectString(output.ContributorInsightsStatus), - IndexName: __expectString(output.IndexName), - TableName: __expectString(output.TableName), - } as any; -}; +// de_ContributorInsightsSummary omitted. /** * deserializeAws_json1_0CreateBackupOutput */ const de_CreateBackupOutput = (output: any, context: __SerdeContext): CreateBackupOutput => { - return { - BackupDetails: output.BackupDetails != null ? de_BackupDetails(output.BackupDetails, context) : undefined, - } as any; + return take(output, { + BackupDetails: (_: any) => de_BackupDetails(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateGlobalTableOutput */ const de_CreateGlobalTableOutput = (output: any, context: __SerdeContext): CreateGlobalTableOutput => { - return { - GlobalTableDescription: - output.GlobalTableDescription != null - ? de_GlobalTableDescription(output.GlobalTableDescription, context) - : undefined, - } as any; + return take(output, { + GlobalTableDescription: (_: any) => de_GlobalTableDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateTableOutput */ const de_CreateTableOutput = (output: any, context: __SerdeContext): CreateTableOutput => { - return { - TableDescription: - output.TableDescription != null ? de_TableDescription(output.TableDescription, context) : undefined, - } as any; + return take(output, { + TableDescription: (_: any) => de_TableDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CsvHeaderList - */ -const de_CsvHeaderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CsvHeaderList omitted. -/** - * deserializeAws_json1_0CsvOptions - */ -const de_CsvOptions = (output: any, context: __SerdeContext): CsvOptions => { - return { - Delimiter: __expectString(output.Delimiter), - HeaderList: output.HeaderList != null ? de_CsvHeaderList(output.HeaderList, context) : undefined, - } as any; -}; +// de_CsvOptions omitted. /** * deserializeAws_json1_0DeleteBackupOutput */ const de_DeleteBackupOutput = (output: any, context: __SerdeContext): DeleteBackupOutput => { - return { - BackupDescription: - output.BackupDescription != null ? de_BackupDescription(output.BackupDescription, context) : undefined, - } as any; + return take(output, { + BackupDescription: (_: any) => de_BackupDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteItemOutput */ const de_DeleteItemOutput = (output: any, context: __SerdeContext): DeleteItemOutput => { - return { - Attributes: output.Attributes != null ? de_AttributeMap(output.Attributes, context) : undefined, - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - ItemCollectionMetrics: - output.ItemCollectionMetrics != null - ? de_ItemCollectionMetrics(output.ItemCollectionMetrics, context) - : undefined, - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeMap(_, context), + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + ItemCollectionMetrics: (_: any) => de_ItemCollectionMetrics(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteRequest */ const de_DeleteRequest = (output: any, context: __SerdeContext): DeleteRequest => { - return { - Key: output.Key != null ? de_Key(output.Key, context) : undefined, - } as any; + return take(output, { + Key: (_: any) => de_Key(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteTableOutput */ const de_DeleteTableOutput = (output: any, context: __SerdeContext): DeleteTableOutput => { - return { - TableDescription: - output.TableDescription != null ? de_TableDescription(output.TableDescription, context) : undefined, - } as any; + return take(output, { + TableDescription: (_: any) => de_TableDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeBackupOutput */ const de_DescribeBackupOutput = (output: any, context: __SerdeContext): DescribeBackupOutput => { - return { - BackupDescription: - output.BackupDescription != null ? de_BackupDescription(output.BackupDescription, context) : undefined, - } as any; + return take(output, { + BackupDescription: (_: any) => de_BackupDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeContinuousBackupsOutput */ const de_DescribeContinuousBackupsOutput = (output: any, context: __SerdeContext): DescribeContinuousBackupsOutput => { - return { - ContinuousBackupsDescription: - output.ContinuousBackupsDescription != null - ? de_ContinuousBackupsDescription(output.ContinuousBackupsDescription, context) - : undefined, - } as any; + return take(output, { + ContinuousBackupsDescription: (_: any) => de_ContinuousBackupsDescription(_, context), + }) as any; }; /** @@ -7227,52 +6041,34 @@ const de_DescribeContributorInsightsOutput = ( output: any, context: __SerdeContext ): DescribeContributorInsightsOutput => { - return { - ContributorInsightsRuleList: - output.ContributorInsightsRuleList != null - ? de_ContributorInsightsRuleList(output.ContributorInsightsRuleList, context) - : undefined, - ContributorInsightsStatus: __expectString(output.ContributorInsightsStatus), - FailureException: - output.FailureException != null ? de_FailureException(output.FailureException, context) : undefined, - IndexName: __expectString(output.IndexName), - LastUpdateDateTime: - output.LastUpdateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateDateTime))) - : undefined, - TableName: __expectString(output.TableName), - } as any; -}; - -/** - * deserializeAws_json1_0DescribeEndpointsResponse - */ -const de_DescribeEndpointsResponse = (output: any, context: __SerdeContext): DescribeEndpointsResponse => { - return { - Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined, - } as any; + return take(output, { + ContributorInsightsRuleList: _json, + ContributorInsightsStatus: __expectString, + FailureException: _json, + IndexName: __expectString, + LastUpdateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableName: __expectString, + }) as any; }; +// de_DescribeEndpointsResponse omitted. + /** * deserializeAws_json1_0DescribeExportOutput */ const de_DescribeExportOutput = (output: any, context: __SerdeContext): DescribeExportOutput => { - return { - ExportDescription: - output.ExportDescription != null ? de_ExportDescription(output.ExportDescription, context) : undefined, - } as any; + return take(output, { + ExportDescription: (_: any) => de_ExportDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeGlobalTableOutput */ const de_DescribeGlobalTableOutput = (output: any, context: __SerdeContext): DescribeGlobalTableOutput => { - return { - GlobalTableDescription: - output.GlobalTableDescription != null - ? de_GlobalTableDescription(output.GlobalTableDescription, context) - : undefined, - } as any; + return take(output, { + GlobalTableDescription: (_: any) => de_GlobalTableDescription(_, context), + }) as any; }; /** @@ -7282,60 +6078,32 @@ const de_DescribeGlobalTableSettingsOutput = ( output: any, context: __SerdeContext ): DescribeGlobalTableSettingsOutput => { - return { - GlobalTableName: __expectString(output.GlobalTableName), - ReplicaSettings: - output.ReplicaSettings != null ? de_ReplicaSettingsDescriptionList(output.ReplicaSettings, context) : undefined, - } as any; + return take(output, { + GlobalTableName: __expectString, + ReplicaSettings: (_: any) => de_ReplicaSettingsDescriptionList(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeImportOutput */ const de_DescribeImportOutput = (output: any, context: __SerdeContext): DescribeImportOutput => { - return { - ImportTableDescription: - output.ImportTableDescription != null - ? de_ImportTableDescription(output.ImportTableDescription, context) - : undefined, - } as any; + return take(output, { + ImportTableDescription: (_: any) => de_ImportTableDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DescribeKinesisStreamingDestinationOutput - */ -const de_DescribeKinesisStreamingDestinationOutput = ( - output: any, - context: __SerdeContext -): DescribeKinesisStreamingDestinationOutput => { - return { - KinesisDataStreamDestinations: - output.KinesisDataStreamDestinations != null - ? de_KinesisDataStreamDestinations(output.KinesisDataStreamDestinations, context) - : undefined, - TableName: __expectString(output.TableName), - } as any; -}; +// de_DescribeKinesisStreamingDestinationOutput omitted. -/** - * deserializeAws_json1_0DescribeLimitsOutput - */ -const de_DescribeLimitsOutput = (output: any, context: __SerdeContext): DescribeLimitsOutput => { - return { - AccountMaxReadCapacityUnits: __expectLong(output.AccountMaxReadCapacityUnits), - AccountMaxWriteCapacityUnits: __expectLong(output.AccountMaxWriteCapacityUnits), - TableMaxReadCapacityUnits: __expectLong(output.TableMaxReadCapacityUnits), - TableMaxWriteCapacityUnits: __expectLong(output.TableMaxWriteCapacityUnits), - } as any; -}; +// de_DescribeLimitsOutput omitted. /** * deserializeAws_json1_0DescribeTableOutput */ const de_DescribeTableOutput = (output: any, context: __SerdeContext): DescribeTableOutput => { - return { - Table: output.Table != null ? de_TableDescription(output.Table, context) : undefined, - } as any; + return take(output, { + Table: (_: any) => de_TableDescription(_, context), + }) as any; }; /** @@ -7345,234 +6113,116 @@ const de_DescribeTableReplicaAutoScalingOutput = ( output: any, context: __SerdeContext ): DescribeTableReplicaAutoScalingOutput => { - return { - TableAutoScalingDescription: - output.TableAutoScalingDescription != null - ? de_TableAutoScalingDescription(output.TableAutoScalingDescription, context) - : undefined, - } as any; + return take(output, { + TableAutoScalingDescription: (_: any) => de_TableAutoScalingDescription(_, context), + }) as any; }; +// de_DescribeTimeToLiveOutput omitted. + +// de_DuplicateItemException omitted. + +// de_Endpoint omitted. + +// de_Endpoints omitted. + /** - * deserializeAws_json1_0DescribeTimeToLiveOutput - */ -const de_DescribeTimeToLiveOutput = (output: any, context: __SerdeContext): DescribeTimeToLiveOutput => { - return { - TimeToLiveDescription: - output.TimeToLiveDescription != null - ? de_TimeToLiveDescription(output.TimeToLiveDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DuplicateItemException - */ -const de_DuplicateItemException = (output: any, context: __SerdeContext): DuplicateItemException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Address: __expectString(output.Address), - CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes), - } as any; -}; - -/** - * deserializeAws_json1_0Endpoints - */ -const de_Endpoints = (output: any, context: __SerdeContext): Endpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Endpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0ExecuteStatementOutput + * deserializeAws_json1_0ExecuteStatementOutput */ const de_ExecuteStatementOutput = (output: any, context: __SerdeContext): ExecuteStatementOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - Items: output.Items != null ? de_ItemList(output.Items, context) : undefined, - LastEvaluatedKey: output.LastEvaluatedKey != null ? de_Key(output.LastEvaluatedKey, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + Items: (_: any) => de_ItemList(_, context), + LastEvaluatedKey: (_: any) => de_Key(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ExecuteTransactionOutput */ const de_ExecuteTransactionOutput = (output: any, context: __SerdeContext): ExecuteTransactionOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacityMultiple(output.ConsumedCapacity, context) : undefined, - Responses: output.Responses != null ? de_ItemResponseList(output.Responses, context) : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacityMultiple(_, context), + Responses: (_: any) => de_ItemResponseList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ExportConflictException - */ -const de_ExportConflictException = (output: any, context: __SerdeContext): ExportConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ExportConflictException omitted. /** * deserializeAws_json1_0ExportDescription */ const de_ExportDescription = (output: any, context: __SerdeContext): ExportDescription => { - return { - BilledSizeBytes: __expectLong(output.BilledSizeBytes), - ClientToken: __expectString(output.ClientToken), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ExportArn: __expectString(output.ExportArn), - ExportFormat: __expectString(output.ExportFormat), - ExportManifest: __expectString(output.ExportManifest), - ExportStatus: __expectString(output.ExportStatus), - ExportTime: - output.ExportTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExportTime))) : undefined, - FailureCode: __expectString(output.FailureCode), - FailureMessage: __expectString(output.FailureMessage), - ItemCount: __expectLong(output.ItemCount), - S3Bucket: __expectString(output.S3Bucket), - S3BucketOwner: __expectString(output.S3BucketOwner), - S3Prefix: __expectString(output.S3Prefix), - S3SseAlgorithm: __expectString(output.S3SseAlgorithm), - S3SseKmsKeyId: __expectString(output.S3SseKmsKeyId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TableArn: __expectString(output.TableArn), - TableId: __expectString(output.TableId), - } as any; -}; - -/** - * deserializeAws_json1_0ExportNotFoundException - */ -const de_ExportNotFoundException = (output: any, context: __SerdeContext): ExportNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0ExportSummaries - */ -const de_ExportSummaries = (output: any, context: __SerdeContext): ExportSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0ExportSummary - */ -const de_ExportSummary = (output: any, context: __SerdeContext): ExportSummary => { - return { - ExportArn: __expectString(output.ExportArn), - ExportStatus: __expectString(output.ExportStatus), - } as any; -}; + return take(output, { + BilledSizeBytes: __expectLong, + ClientToken: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExportArn: __expectString, + ExportFormat: __expectString, + ExportManifest: __expectString, + ExportStatus: __expectString, + ExportTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureCode: __expectString, + FailureMessage: __expectString, + ItemCount: __expectLong, + S3Bucket: __expectString, + S3BucketOwner: __expectString, + S3Prefix: __expectString, + S3SseAlgorithm: __expectString, + S3SseKmsKeyId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableArn: __expectString, + TableId: __expectString, + }) as any; +}; + +// de_ExportNotFoundException omitted. + +// de_ExportSummaries omitted. + +// de_ExportSummary omitted. /** * deserializeAws_json1_0ExportTableToPointInTimeOutput */ const de_ExportTableToPointInTimeOutput = (output: any, context: __SerdeContext): ExportTableToPointInTimeOutput => { - return { - ExportDescription: - output.ExportDescription != null ? de_ExportDescription(output.ExportDescription, context) : undefined, - } as any; + return take(output, { + ExportDescription: (_: any) => de_ExportDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ExpressionAttributeNameMap - */ -const de_ExpressionAttributeNameMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExpressionAttributeNameMap omitted. -/** - * deserializeAws_json1_0FailureException - */ -const de_FailureException = (output: any, context: __SerdeContext): FailureException => { - return { - ExceptionDescription: __expectString(output.ExceptionDescription), - ExceptionName: __expectString(output.ExceptionName), - } as any; -}; +// de_FailureException omitted. /** * deserializeAws_json1_0GetItemOutput */ const de_GetItemOutput = (output: any, context: __SerdeContext): GetItemOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - Item: output.Item != null ? de_AttributeMap(output.Item, context) : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + Item: (_: any) => de_AttributeMap(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GlobalSecondaryIndex - */ -const de_GlobalSecondaryIndex = (output: any, context: __SerdeContext): GlobalSecondaryIndex => { - return { - IndexName: __expectString(output.IndexName), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_Projection(output.Projection, context) : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_ProvisionedThroughput(output.ProvisionedThroughput, context) - : undefined, - } as any; -}; +// de_GlobalSecondaryIndex omitted. /** * deserializeAws_json1_0GlobalSecondaryIndexDescription */ const de_GlobalSecondaryIndexDescription = (output: any, context: __SerdeContext): GlobalSecondaryIndexDescription => { - return { - Backfilling: __expectBoolean(output.Backfilling), - IndexArn: __expectString(output.IndexArn), - IndexName: __expectString(output.IndexName), - IndexSizeBytes: __expectLong(output.IndexSizeBytes), - IndexStatus: __expectString(output.IndexStatus), - ItemCount: __expectLong(output.ItemCount), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_Projection(output.Projection, context) : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_ProvisionedThroughputDescription(output.ProvisionedThroughput, context) - : undefined, - } as any; + return take(output, { + Backfilling: __expectBoolean, + IndexArn: __expectString, + IndexName: __expectString, + IndexSizeBytes: __expectLong, + IndexStatus: __expectString, + ItemCount: __expectLong, + KeySchema: _json, + Projection: _json, + ProvisionedThroughput: (_: any) => de_ProvisionedThroughputDescription(_, context), + }) as any; }; /** @@ -7585,168 +6235,58 @@ const de_GlobalSecondaryIndexDescriptionList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GlobalSecondaryIndexDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0GlobalSecondaryIndexes - */ -const de_GlobalSecondaryIndexes = (output: any, context: __SerdeContext): GlobalSecondaryIndexInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlobalSecondaryIndexInfo(entry, context); - }); - return retVal; -}; +// de_GlobalSecondaryIndexes omitted. -/** - * deserializeAws_json1_0GlobalSecondaryIndexInfo - */ -const de_GlobalSecondaryIndexInfo = (output: any, context: __SerdeContext): GlobalSecondaryIndexInfo => { - return { - IndexName: __expectString(output.IndexName), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_Projection(output.Projection, context) : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_ProvisionedThroughput(output.ProvisionedThroughput, context) - : undefined, - } as any; -}; +// de_GlobalSecondaryIndexInfo omitted. -/** - * deserializeAws_json1_0GlobalSecondaryIndexList - */ -const de_GlobalSecondaryIndexList = (output: any, context: __SerdeContext): GlobalSecondaryIndex[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlobalSecondaryIndex(entry, context); - }); - return retVal; -}; +// de_GlobalSecondaryIndexList omitted. -/** - * deserializeAws_json1_0GlobalTable - */ -const de_GlobalTable = (output: any, context: __SerdeContext): GlobalTable => { - return { - GlobalTableName: __expectString(output.GlobalTableName), - ReplicationGroup: output.ReplicationGroup != null ? de_ReplicaList(output.ReplicationGroup, context) : undefined, - } as any; -}; +// de_GlobalTable omitted. -/** - * deserializeAws_json1_0GlobalTableAlreadyExistsException - */ -const de_GlobalTableAlreadyExistsException = ( - output: any, - context: __SerdeContext -): GlobalTableAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_GlobalTableAlreadyExistsException omitted. /** * deserializeAws_json1_0GlobalTableDescription */ const de_GlobalTableDescription = (output: any, context: __SerdeContext): GlobalTableDescription => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - GlobalTableArn: __expectString(output.GlobalTableArn), - GlobalTableName: __expectString(output.GlobalTableName), - GlobalTableStatus: __expectString(output.GlobalTableStatus), - ReplicationGroup: - output.ReplicationGroup != null ? de_ReplicaDescriptionList(output.ReplicationGroup, context) : undefined, - } as any; + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GlobalTableArn: __expectString, + GlobalTableName: __expectString, + GlobalTableStatus: __expectString, + ReplicationGroup: (_: any) => de_ReplicaDescriptionList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GlobalTableList - */ -const de_GlobalTableList = (output: any, context: __SerdeContext): GlobalTable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlobalTable(entry, context); - }); - return retVal; -}; +// de_GlobalTableList omitted. -/** - * deserializeAws_json1_0GlobalTableNotFoundException - */ -const de_GlobalTableNotFoundException = (output: any, context: __SerdeContext): GlobalTableNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_GlobalTableNotFoundException omitted. -/** - * deserializeAws_json1_0IdempotentParameterMismatchException - */ -const de_IdempotentParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotentParameterMismatchException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_IdempotentParameterMismatchException omitted. -/** - * deserializeAws_json1_0ImportConflictException - */ -const de_ImportConflictException = (output: any, context: __SerdeContext): ImportConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ImportConflictException omitted. -/** - * deserializeAws_json1_0ImportNotFoundException - */ -const de_ImportNotFoundException = (output: any, context: __SerdeContext): ImportNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ImportNotFoundException omitted. /** * deserializeAws_json1_0ImportSummary */ const de_ImportSummary = (output: any, context: __SerdeContext): ImportSummary => { - return { - CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ImportArn: __expectString(output.ImportArn), - ImportStatus: __expectString(output.ImportStatus), - InputFormat: __expectString(output.InputFormat), - S3BucketSource: output.S3BucketSource != null ? de_S3BucketSource(output.S3BucketSource, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TableArn: __expectString(output.TableArn), - } as any; + return take(output, { + CloudWatchLogGroupArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImportArn: __expectString, + ImportStatus: __expectString, + InputFormat: __expectString, + S3BucketSource: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableArn: __expectString, + }) as any; }; /** @@ -7756,9 +6296,6 @@ const de_ImportSummaryList = (output: any, context: __SerdeContext): ImportSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportSummary(entry, context); }); return retVal; @@ -7768,100 +6305,49 @@ const de_ImportSummaryList = (output: any, context: __SerdeContext): ImportSumma * deserializeAws_json1_0ImportTableDescription */ const de_ImportTableDescription = (output: any, context: __SerdeContext): ImportTableDescription => { - return { - ClientToken: __expectString(output.ClientToken), - CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ErrorCount: __expectLong(output.ErrorCount), - FailureCode: __expectString(output.FailureCode), - FailureMessage: __expectString(output.FailureMessage), - ImportArn: __expectString(output.ImportArn), - ImportStatus: __expectString(output.ImportStatus), - ImportedItemCount: __expectLong(output.ImportedItemCount), - InputCompressionType: __expectString(output.InputCompressionType), - InputFormat: __expectString(output.InputFormat), - InputFormatOptions: - output.InputFormatOptions != null ? de_InputFormatOptions(output.InputFormatOptions, context) : undefined, - ProcessedItemCount: __expectLong(output.ProcessedItemCount), - ProcessedSizeBytes: __expectLong(output.ProcessedSizeBytes), - S3BucketSource: output.S3BucketSource != null ? de_S3BucketSource(output.S3BucketSource, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TableArn: __expectString(output.TableArn), - TableCreationParameters: - output.TableCreationParameters != null - ? de_TableCreationParameters(output.TableCreationParameters, context) - : undefined, - TableId: __expectString(output.TableId), - } as any; + return take(output, { + ClientToken: __expectString, + CloudWatchLogGroupArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorCount: __expectLong, + FailureCode: __expectString, + FailureMessage: __expectString, + ImportArn: __expectString, + ImportStatus: __expectString, + ImportedItemCount: __expectLong, + InputCompressionType: __expectString, + InputFormat: __expectString, + InputFormatOptions: _json, + ProcessedItemCount: __expectLong, + ProcessedSizeBytes: __expectLong, + S3BucketSource: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableArn: __expectString, + TableCreationParameters: _json, + TableId: __expectString, + }) as any; }; /** * deserializeAws_json1_0ImportTableOutput */ const de_ImportTableOutput = (output: any, context: __SerdeContext): ImportTableOutput => { - return { - ImportTableDescription: - output.ImportTableDescription != null - ? de_ImportTableDescription(output.ImportTableDescription, context) - : undefined, - } as any; + return take(output, { + ImportTableDescription: (_: any) => de_ImportTableDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0IndexNotFoundException - */ -const de_IndexNotFoundException = (output: any, context: __SerdeContext): IndexNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_IndexNotFoundException omitted. -/** - * deserializeAws_json1_0InputFormatOptions - */ -const de_InputFormatOptions = (output: any, context: __SerdeContext): InputFormatOptions => { - return { - Csv: output.Csv != null ? de_CsvOptions(output.Csv, context) : undefined, - } as any; -}; +// de_InputFormatOptions omitted. -/** - * deserializeAws_json1_0InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_0InvalidEndpointException - */ -const de_InvalidEndpointException = (output: any, context: __SerdeContext): InvalidEndpointException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidEndpointException omitted. -/** - * deserializeAws_json1_0InvalidExportTimeException - */ -const de_InvalidExportTimeException = (output: any, context: __SerdeContext): InvalidExportTimeException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidExportTimeException omitted. -/** - * deserializeAws_json1_0InvalidRestoreTimeException - */ -const de_InvalidRestoreTimeException = (output: any, context: __SerdeContext): InvalidRestoreTimeException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRestoreTimeException omitted. /** * deserializeAws_json1_0ItemCollectionKeyAttributeMap @@ -7880,16 +6366,10 @@ const de_ItemCollectionKeyAttributeMap = (output: any, context: __SerdeContext): * deserializeAws_json1_0ItemCollectionMetrics */ const de_ItemCollectionMetrics = (output: any, context: __SerdeContext): ItemCollectionMetrics => { - return { - ItemCollectionKey: - output.ItemCollectionKey != null - ? de_ItemCollectionKeyAttributeMap(output.ItemCollectionKey, context) - : undefined, - SizeEstimateRangeGB: - output.SizeEstimateRangeGB != null - ? de_ItemCollectionSizeEstimateRange(output.SizeEstimateRangeGB, context) - : undefined, - } as any; + return take(output, { + ItemCollectionKey: (_: any) => de_ItemCollectionKeyAttributeMap(_, context), + SizeEstimateRangeGB: (_: any) => de_ItemCollectionSizeEstimateRange(_, context), + }) as any; }; /** @@ -7899,9 +6379,6 @@ const de_ItemCollectionMetricsMultiple = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ItemCollectionMetrics(entry, context); }); return retVal; @@ -7930,25 +6407,12 @@ const de_ItemCollectionSizeEstimateRange = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_json1_0ItemCollectionSizeLimitExceededException - */ -const de_ItemCollectionSizeLimitExceededException = ( - output: any, - context: __SerdeContext -): ItemCollectionSizeLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ItemCollectionSizeLimitExceededException omitted. /** * deserializeAws_json1_0ItemList @@ -7957,9 +6421,6 @@ const de_ItemList = (output: any, context: __SerdeContext): Record e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AttributeMap(entry, context); }); return retVal; @@ -7969,9 +6430,9 @@ const de_ItemList = (output: any, context: __SerdeContext): Record { - return { - Item: output.Item != null ? de_AttributeMap(output.Item, context) : undefined, - } as any; + return take(output, { + Item: (_: any) => de_AttributeMap(_, context), + }) as any; }; /** @@ -7981,9 +6442,6 @@ const de_ItemResponseList = (output: any, context: __SerdeContext): ItemResponse const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ItemResponse(entry, context); }); return retVal; @@ -7998,262 +6456,97 @@ const de_Key = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Key(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0KeysAndAttributes - */ -const de_KeysAndAttributes = (output: any, context: __SerdeContext): KeysAndAttributes => { - return { - AttributesToGet: output.AttributesToGet != null ? de_AttributeNameList(output.AttributesToGet, context) : undefined, - ConsistentRead: __expectBoolean(output.ConsistentRead), - ExpressionAttributeNames: - output.ExpressionAttributeNames != null - ? de_ExpressionAttributeNameMap(output.ExpressionAttributeNames, context) - : undefined, - Keys: output.Keys != null ? de_KeyList(output.Keys, context) : undefined, - ProjectionExpression: __expectString(output.ProjectionExpression), - } as any; -}; - -/** - * deserializeAws_json1_0KeySchema - */ -const de_KeySchema = (output: any, context: __SerdeContext): KeySchemaElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeySchemaElement(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0KeySchemaElement - */ -const de_KeySchemaElement = (output: any, context: __SerdeContext): KeySchemaElement => { - return { - AttributeName: __expectString(output.AttributeName), - KeyType: __expectString(output.KeyType), - } as any; -}; - -/** - * deserializeAws_json1_0KinesisDataStreamDestination - */ -const de_KinesisDataStreamDestination = (output: any, context: __SerdeContext): KinesisDataStreamDestination => { - return { - DestinationStatus: __expectString(output.DestinationStatus), - DestinationStatusDescription: __expectString(output.DestinationStatusDescription), - StreamArn: __expectString(output.StreamArn), - } as any; -}; - -/** - * deserializeAws_json1_0KinesisDataStreamDestinations - */ -const de_KinesisDataStreamDestinations = (output: any, context: __SerdeContext): KinesisDataStreamDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KinesisDataStreamDestination(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0KinesisStreamingDestinationOutput - */ -const de_KinesisStreamingDestinationOutput = ( - output: any, - context: __SerdeContext -): KinesisStreamingDestinationOutput => { - return { - DestinationStatus: __expectString(output.DestinationStatus), - StreamArn: __expectString(output.StreamArn), - TableName: __expectString(output.TableName), - } as any; -}; - -/** - * deserializeAws_json1_0LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0ListAttributeValue - */ -const de_ListAttributeValue = (output: any, context: __SerdeContext): AttributeValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttributeValue(__expectUnion(entry), context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0ListBackupsOutput - */ -const de_ListBackupsOutput = (output: any, context: __SerdeContext): ListBackupsOutput => { - return { - BackupSummaries: output.BackupSummaries != null ? de_BackupSummaries(output.BackupSummaries, context) : undefined, - LastEvaluatedBackupArn: __expectString(output.LastEvaluatedBackupArn), - } as any; -}; - -/** - * deserializeAws_json1_0ListContributorInsightsOutput - */ -const de_ListContributorInsightsOutput = (output: any, context: __SerdeContext): ListContributorInsightsOutput => { - return { - ContributorInsightsSummaries: - output.ContributorInsightsSummaries != null - ? de_ContributorInsightsSummaries(output.ContributorInsightsSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_0ListExportsOutput - */ -const de_ListExportsOutput = (output: any, context: __SerdeContext): ListExportsOutput => { - return { - ExportSummaries: output.ExportSummaries != null ? de_ExportSummaries(output.ExportSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_0ListGlobalTablesOutput - */ -const de_ListGlobalTablesOutput = (output: any, context: __SerdeContext): ListGlobalTablesOutput => { - return { - GlobalTables: output.GlobalTables != null ? de_GlobalTableList(output.GlobalTables, context) : undefined, - LastEvaluatedGlobalTableName: __expectString(output.LastEvaluatedGlobalTableName), - } as any; -}; - -/** - * deserializeAws_json1_0ListImportsOutput - */ -const de_ListImportsOutput = (output: any, context: __SerdeContext): ListImportsOutput => { - return { - ImportSummaryList: - output.ImportSummaryList != null ? de_ImportSummaryList(output.ImportSummaryList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_0ListTablesOutput - */ -const de_ListTablesOutput = (output: any, context: __SerdeContext): ListTablesOutput => { - return { - LastEvaluatedTableName: __expectString(output.LastEvaluatedTableName), - TableNames: output.TableNames != null ? de_TableNameList(output.TableNames, context) : undefined, - } as any; + return acc; + }, {}); }; /** - * deserializeAws_json1_0ListTagsOfResourceOutput + * deserializeAws_json1_0KeyList */ -const de_ListTagsOfResourceOutput = (output: any, context: __SerdeContext): ListTagsOfResourceOutput => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_KeyList = (output: any, context: __SerdeContext): Record[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Key(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_0LocalSecondaryIndexDescription + * deserializeAws_json1_0KeysAndAttributes */ -const de_LocalSecondaryIndexDescription = (output: any, context: __SerdeContext): LocalSecondaryIndexDescription => { - return { - IndexArn: __expectString(output.IndexArn), - IndexName: __expectString(output.IndexName), - IndexSizeBytes: __expectLong(output.IndexSizeBytes), - ItemCount: __expectLong(output.ItemCount), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_Projection(output.Projection, context) : undefined, - } as any; +const de_KeysAndAttributes = (output: any, context: __SerdeContext): KeysAndAttributes => { + return take(output, { + AttributesToGet: _json, + ConsistentRead: __expectBoolean, + ExpressionAttributeNames: _json, + Keys: (_: any) => de_KeyList(_, context), + ProjectionExpression: __expectString, + }) as any; }; +// de_KeySchema omitted. + +// de_KeySchemaElement omitted. + +// de_KinesisDataStreamDestination omitted. + +// de_KinesisDataStreamDestinations omitted. + +// de_KinesisStreamingDestinationOutput omitted. + +// de_LimitExceededException omitted. + /** - * deserializeAws_json1_0LocalSecondaryIndexDescriptionList + * deserializeAws_json1_0ListAttributeValue */ -const de_LocalSecondaryIndexDescriptionList = ( - output: any, - context: __SerdeContext -): LocalSecondaryIndexDescription[] => { +const de_ListAttributeValue = (output: any, context: __SerdeContext): AttributeValue[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LocalSecondaryIndexDescription(entry, context); + return de_AttributeValue(__expectUnion(entry), context); }); return retVal; }; /** - * deserializeAws_json1_0LocalSecondaryIndexes + * deserializeAws_json1_0ListBackupsOutput */ -const de_LocalSecondaryIndexes = (output: any, context: __SerdeContext): LocalSecondaryIndexInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LocalSecondaryIndexInfo(entry, context); - }); - return retVal; +const de_ListBackupsOutput = (output: any, context: __SerdeContext): ListBackupsOutput => { + return take(output, { + BackupSummaries: (_: any) => de_BackupSummaries(_, context), + LastEvaluatedBackupArn: __expectString, + }) as any; }; +// de_ListContributorInsightsOutput omitted. + +// de_ListExportsOutput omitted. + +// de_ListGlobalTablesOutput omitted. + /** - * deserializeAws_json1_0LocalSecondaryIndexInfo + * deserializeAws_json1_0ListImportsOutput */ -const de_LocalSecondaryIndexInfo = (output: any, context: __SerdeContext): LocalSecondaryIndexInfo => { - return { - IndexName: __expectString(output.IndexName), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_Projection(output.Projection, context) : undefined, - } as any; +const de_ListImportsOutput = (output: any, context: __SerdeContext): ListImportsOutput => { + return take(output, { + ImportSummaryList: (_: any) => de_ImportSummaryList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListTablesOutput omitted. + +// de_ListTagsOfResourceOutput omitted. + +// de_LocalSecondaryIndexDescription omitted. + +// de_LocalSecondaryIndexDescriptionList omitted. + +// de_LocalSecondaryIndexes omitted. + +// de_LocalSecondaryIndexInfo omitted. + /** * deserializeAws_json1_0MapAttributeValue */ @@ -8267,35 +6560,9 @@ const de_MapAttributeValue = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NonKeyAttributeNameList omitted. -/** - * deserializeAws_json1_0NumberSetAttributeValue - */ -const de_NumberSetAttributeValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NumberSetAttributeValue omitted. /** * deserializeAws_json1_0PartiQLBatchResponse @@ -8304,9 +6571,6 @@ const de_PartiQLBatchResponse = (output: any, context: __SerdeContext): BatchSta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchStatementResponse(entry, context); }); return retVal; @@ -8316,51 +6580,18 @@ const de_PartiQLBatchResponse = (output: any, context: __SerdeContext): BatchSta * deserializeAws_json1_0PointInTimeRecoveryDescription */ const de_PointInTimeRecoveryDescription = (output: any, context: __SerdeContext): PointInTimeRecoveryDescription => { - return { - EarliestRestorableDateTime: - output.EarliestRestorableDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EarliestRestorableDateTime))) - : undefined, - LatestRestorableDateTime: - output.LatestRestorableDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestRestorableDateTime))) - : undefined, - PointInTimeRecoveryStatus: __expectString(output.PointInTimeRecoveryStatus), - } as any; + return take(output, { + EarliestRestorableDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestRestorableDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PointInTimeRecoveryStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0PointInTimeRecoveryUnavailableException - */ -const de_PointInTimeRecoveryUnavailableException = ( - output: any, - context: __SerdeContext -): PointInTimeRecoveryUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PointInTimeRecoveryUnavailableException omitted. -/** - * deserializeAws_json1_0Projection - */ -const de_Projection = (output: any, context: __SerdeContext): Projection => { - return { - NonKeyAttributes: - output.NonKeyAttributes != null ? de_NonKeyAttributeNameList(output.NonKeyAttributes, context) : undefined, - ProjectionType: __expectString(output.ProjectionType), - } as any; -}; +// de_Projection omitted. -/** - * deserializeAws_json1_0ProvisionedThroughput - */ -const de_ProvisionedThroughput = (output: any, context: __SerdeContext): ProvisionedThroughput => { - return { - ReadCapacityUnits: __expectLong(output.ReadCapacityUnits), - WriteCapacityUnits: __expectLong(output.WriteCapacityUnits), - } as any; -}; +// de_ProvisionedThroughput omitted. /** * deserializeAws_json1_0ProvisionedThroughputDescription @@ -8369,41 +6600,18 @@ const de_ProvisionedThroughputDescription = ( output: any, context: __SerdeContext ): ProvisionedThroughputDescription => { - return { - LastDecreaseDateTime: - output.LastDecreaseDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastDecreaseDateTime))) - : undefined, - LastIncreaseDateTime: - output.LastIncreaseDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastIncreaseDateTime))) - : undefined, - NumberOfDecreasesToday: __expectLong(output.NumberOfDecreasesToday), - ReadCapacityUnits: __expectLong(output.ReadCapacityUnits), - WriteCapacityUnits: __expectLong(output.WriteCapacityUnits), - } as any; + return take(output, { + LastDecreaseDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastIncreaseDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfDecreasesToday: __expectLong, + ReadCapacityUnits: __expectLong, + WriteCapacityUnits: __expectLong, + }) as any; }; -/** - * deserializeAws_json1_0ProvisionedThroughputExceededException - */ -const de_ProvisionedThroughputExceededException = ( - output: any, - context: __SerdeContext -): ProvisionedThroughputExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ProvisionedThroughputExceededException omitted. -/** - * deserializeAws_json1_0ProvisionedThroughputOverride - */ -const de_ProvisionedThroughputOverride = (output: any, context: __SerdeContext): ProvisionedThroughputOverride => { - return { - ReadCapacityUnits: __expectLong(output.ReadCapacityUnits), - } as any; -}; +// de_ProvisionedThroughputOverride omitted. /** * deserializeAws_json1_0PutItemInputAttributeMap @@ -8422,78 +6630,50 @@ const de_PutItemInputAttributeMap = (output: any, context: __SerdeContext): Reco * deserializeAws_json1_0PutItemOutput */ const de_PutItemOutput = (output: any, context: __SerdeContext): PutItemOutput => { - return { - Attributes: output.Attributes != null ? de_AttributeMap(output.Attributes, context) : undefined, - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - ItemCollectionMetrics: - output.ItemCollectionMetrics != null - ? de_ItemCollectionMetrics(output.ItemCollectionMetrics, context) - : undefined, - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeMap(_, context), + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + ItemCollectionMetrics: (_: any) => de_ItemCollectionMetrics(_, context), + }) as any; }; /** * deserializeAws_json1_0PutRequest */ const de_PutRequest = (output: any, context: __SerdeContext): PutRequest => { - return { - Item: output.Item != null ? de_PutItemInputAttributeMap(output.Item, context) : undefined, - } as any; + return take(output, { + Item: (_: any) => de_PutItemInputAttributeMap(_, context), + }) as any; }; /** * deserializeAws_json1_0QueryOutput */ const de_QueryOutput = (output: any, context: __SerdeContext): QueryOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - Count: __expectInt32(output.Count), - Items: output.Items != null ? de_ItemList(output.Items, context) : undefined, - LastEvaluatedKey: output.LastEvaluatedKey != null ? de_Key(output.LastEvaluatedKey, context) : undefined, - ScannedCount: __expectInt32(output.ScannedCount), - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + Count: __expectInt32, + Items: (_: any) => de_ItemList(_, context), + LastEvaluatedKey: (_: any) => de_Key(_, context), + ScannedCount: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_0Replica - */ -const de_Replica = (output: any, context: __SerdeContext): Replica => { - return { - RegionName: __expectString(output.RegionName), - } as any; -}; +// de_Replica omitted. -/** - * deserializeAws_json1_0ReplicaAlreadyExistsException - */ -const de_ReplicaAlreadyExistsException = (output: any, context: __SerdeContext): ReplicaAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReplicaAlreadyExistsException omitted. /** * deserializeAws_json1_0ReplicaAutoScalingDescription */ const de_ReplicaAutoScalingDescription = (output: any, context: __SerdeContext): ReplicaAutoScalingDescription => { - return { - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList(output.GlobalSecondaryIndexes, context) - : undefined, - RegionName: __expectString(output.RegionName), - ReplicaProvisionedReadCapacityAutoScalingSettings: - output.ReplicaProvisionedReadCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ReplicaProvisionedReadCapacityAutoScalingSettings, context) - : undefined, - ReplicaProvisionedWriteCapacityAutoScalingSettings: - output.ReplicaProvisionedWriteCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ReplicaProvisionedWriteCapacityAutoScalingSettings, context) - : undefined, - ReplicaStatus: __expectString(output.ReplicaStatus), - } as any; + return take(output, { + GlobalSecondaryIndexes: (_: any) => de_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList(_, context), + RegionName: __expectString, + ReplicaProvisionedReadCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ReplicaProvisionedWriteCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ReplicaStatus: __expectString, + }) as any; }; /** @@ -8506,9 +6686,6 @@ const de_ReplicaAutoScalingDescriptionList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicaAutoScalingDescription(entry, context); }); return retVal; @@ -8518,29 +6695,17 @@ const de_ReplicaAutoScalingDescriptionList = ( * deserializeAws_json1_0ReplicaDescription */ const de_ReplicaDescription = (output: any, context: __SerdeContext): ReplicaDescription => { - return { - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_ReplicaGlobalSecondaryIndexDescriptionList(output.GlobalSecondaryIndexes, context) - : undefined, - KMSMasterKeyId: __expectString(output.KMSMasterKeyId), - ProvisionedThroughputOverride: - output.ProvisionedThroughputOverride != null - ? de_ProvisionedThroughputOverride(output.ProvisionedThroughputOverride, context) - : undefined, - RegionName: __expectString(output.RegionName), - ReplicaInaccessibleDateTime: - output.ReplicaInaccessibleDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplicaInaccessibleDateTime))) - : undefined, - ReplicaStatus: __expectString(output.ReplicaStatus), - ReplicaStatusDescription: __expectString(output.ReplicaStatusDescription), - ReplicaStatusPercentProgress: __expectString(output.ReplicaStatusPercentProgress), - ReplicaTableClassSummary: - output.ReplicaTableClassSummary != null - ? de_TableClassSummary(output.ReplicaTableClassSummary, context) - : undefined, - } as any; + return take(output, { + GlobalSecondaryIndexes: _json, + KMSMasterKeyId: __expectString, + ProvisionedThroughputOverride: _json, + RegionName: __expectString, + ReplicaInaccessibleDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplicaStatus: __expectString, + ReplicaStatusDescription: __expectString, + ReplicaStatusPercentProgress: __expectString, + ReplicaTableClassSummary: (_: any) => de_TableClassSummary(_, context), + }) as any; }; /** @@ -8550,9 +6715,6 @@ const de_ReplicaDescriptionList = (output: any, context: __SerdeContext): Replic const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicaDescription(entry, context); }); return retVal; @@ -8565,18 +6727,12 @@ const de_ReplicaGlobalSecondaryIndexAutoScalingDescription = ( output: any, context: __SerdeContext ): ReplicaGlobalSecondaryIndexAutoScalingDescription => { - return { - IndexName: __expectString(output.IndexName), - IndexStatus: __expectString(output.IndexStatus), - ProvisionedReadCapacityAutoScalingSettings: - output.ProvisionedReadCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ProvisionedReadCapacityAutoScalingSettings, context) - : undefined, - ProvisionedWriteCapacityAutoScalingSettings: - output.ProvisionedWriteCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ProvisionedWriteCapacityAutoScalingSettings, context) - : undefined, - } as any; + return take(output, { + IndexName: __expectString, + IndexStatus: __expectString, + ProvisionedReadCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ProvisionedWriteCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + }) as any; }; /** @@ -8589,47 +6745,14 @@ const de_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicaGlobalSecondaryIndexAutoScalingDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ReplicaGlobalSecondaryIndexDescription - */ -const de_ReplicaGlobalSecondaryIndexDescription = ( - output: any, - context: __SerdeContext -): ReplicaGlobalSecondaryIndexDescription => { - return { - IndexName: __expectString(output.IndexName), - ProvisionedThroughputOverride: - output.ProvisionedThroughputOverride != null - ? de_ProvisionedThroughputOverride(output.ProvisionedThroughputOverride, context) - : undefined, - } as any; -}; +// de_ReplicaGlobalSecondaryIndexDescription omitted. -/** - * deserializeAws_json1_0ReplicaGlobalSecondaryIndexDescriptionList - */ -const de_ReplicaGlobalSecondaryIndexDescriptionList = ( - output: any, - context: __SerdeContext -): ReplicaGlobalSecondaryIndexDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicaGlobalSecondaryIndexDescription(entry, context); - }); - return retVal; -}; +// de_ReplicaGlobalSecondaryIndexDescriptionList omitted. /** * deserializeAws_json1_0ReplicaGlobalSecondaryIndexSettingsDescription @@ -8638,20 +6761,14 @@ const de_ReplicaGlobalSecondaryIndexSettingsDescription = ( output: any, context: __SerdeContext ): ReplicaGlobalSecondaryIndexSettingsDescription => { - return { - IndexName: __expectString(output.IndexName), - IndexStatus: __expectString(output.IndexStatus), - ProvisionedReadCapacityAutoScalingSettings: - output.ProvisionedReadCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ProvisionedReadCapacityAutoScalingSettings, context) - : undefined, - ProvisionedReadCapacityUnits: __expectLong(output.ProvisionedReadCapacityUnits), - ProvisionedWriteCapacityAutoScalingSettings: - output.ProvisionedWriteCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ProvisionedWriteCapacityAutoScalingSettings, context) - : undefined, - ProvisionedWriteCapacityUnits: __expectLong(output.ProvisionedWriteCapacityUnits), - } as any; + return take(output, { + IndexName: __expectString, + IndexStatus: __expectString, + ProvisionedReadCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ProvisionedReadCapacityUnits: __expectLong, + ProvisionedWriteCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ProvisionedWriteCapacityUnits: __expectLong, + }) as any; }; /** @@ -8664,68 +6781,30 @@ const de_ReplicaGlobalSecondaryIndexSettingsDescriptionList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicaGlobalSecondaryIndexSettingsDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ReplicaList - */ -const de_ReplicaList = (output: any, context: __SerdeContext): Replica[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Replica(entry, context); - }); - return retVal; -}; +// de_ReplicaList omitted. -/** - * deserializeAws_json1_0ReplicaNotFoundException - */ -const de_ReplicaNotFoundException = (output: any, context: __SerdeContext): ReplicaNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReplicaNotFoundException omitted. /** * deserializeAws_json1_0ReplicaSettingsDescription */ const de_ReplicaSettingsDescription = (output: any, context: __SerdeContext): ReplicaSettingsDescription => { - return { - RegionName: __expectString(output.RegionName), - ReplicaBillingModeSummary: - output.ReplicaBillingModeSummary != null - ? de_BillingModeSummary(output.ReplicaBillingModeSummary, context) - : undefined, - ReplicaGlobalSecondaryIndexSettings: - output.ReplicaGlobalSecondaryIndexSettings != null - ? de_ReplicaGlobalSecondaryIndexSettingsDescriptionList(output.ReplicaGlobalSecondaryIndexSettings, context) - : undefined, - ReplicaProvisionedReadCapacityAutoScalingSettings: - output.ReplicaProvisionedReadCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ReplicaProvisionedReadCapacityAutoScalingSettings, context) - : undefined, - ReplicaProvisionedReadCapacityUnits: __expectLong(output.ReplicaProvisionedReadCapacityUnits), - ReplicaProvisionedWriteCapacityAutoScalingSettings: - output.ReplicaProvisionedWriteCapacityAutoScalingSettings != null - ? de_AutoScalingSettingsDescription(output.ReplicaProvisionedWriteCapacityAutoScalingSettings, context) - : undefined, - ReplicaProvisionedWriteCapacityUnits: __expectLong(output.ReplicaProvisionedWriteCapacityUnits), - ReplicaStatus: __expectString(output.ReplicaStatus), - ReplicaTableClassSummary: - output.ReplicaTableClassSummary != null - ? de_TableClassSummary(output.ReplicaTableClassSummary, context) - : undefined, - } as any; + return take(output, { + RegionName: __expectString, + ReplicaBillingModeSummary: (_: any) => de_BillingModeSummary(_, context), + ReplicaGlobalSecondaryIndexSettings: (_: any) => de_ReplicaGlobalSecondaryIndexSettingsDescriptionList(_, context), + ReplicaProvisionedReadCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ReplicaProvisionedReadCapacityUnits: __expectLong, + ReplicaProvisionedWriteCapacityAutoScalingSettings: (_: any) => de_AutoScalingSettingsDescription(_, context), + ReplicaProvisionedWriteCapacityUnits: __expectLong, + ReplicaStatus: __expectString, + ReplicaTableClassSummary: (_: any) => de_TableClassSummary(_, context), + }) as any; }; /** @@ -8735,99 +6814,60 @@ const de_ReplicaSettingsDescriptionList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicaSettingsDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0RequestLimitExceeded - */ -const de_RequestLimitExceeded = (output: any, context: __SerdeContext): RequestLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RequestLimitExceeded omitted. -/** - * deserializeAws_json1_0ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_0RestoreSummary */ const de_RestoreSummary = (output: any, context: __SerdeContext): RestoreSummary => { - return { - RestoreDateTime: - output.RestoreDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RestoreDateTime))) - : undefined, - RestoreInProgress: __expectBoolean(output.RestoreInProgress), - SourceBackupArn: __expectString(output.SourceBackupArn), - SourceTableArn: __expectString(output.SourceTableArn), - } as any; + return take(output, { + RestoreDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RestoreInProgress: __expectBoolean, + SourceBackupArn: __expectString, + SourceTableArn: __expectString, + }) as any; }; /** * deserializeAws_json1_0RestoreTableFromBackupOutput */ const de_RestoreTableFromBackupOutput = (output: any, context: __SerdeContext): RestoreTableFromBackupOutput => { - return { - TableDescription: - output.TableDescription != null ? de_TableDescription(output.TableDescription, context) : undefined, - } as any; + return take(output, { + TableDescription: (_: any) => de_TableDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0RestoreTableToPointInTimeOutput */ const de_RestoreTableToPointInTimeOutput = (output: any, context: __SerdeContext): RestoreTableToPointInTimeOutput => { - return { - TableDescription: - output.TableDescription != null ? de_TableDescription(output.TableDescription, context) : undefined, - } as any; + return take(output, { + TableDescription: (_: any) => de_TableDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0S3BucketSource - */ -const de_S3BucketSource = (output: any, context: __SerdeContext): S3BucketSource => { - return { - S3Bucket: __expectString(output.S3Bucket), - S3BucketOwner: __expectString(output.S3BucketOwner), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - } as any; -}; +// de_S3BucketSource omitted. /** * deserializeAws_json1_0ScanOutput */ const de_ScanOutput = (output: any, context: __SerdeContext): ScanOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - Count: __expectInt32(output.Count), - Items: output.Items != null ? de_ItemList(output.Items, context) : undefined, - LastEvaluatedKey: output.LastEvaluatedKey != null ? de_Key(output.LastEvaluatedKey, context) : undefined, - ScannedCount: __expectInt32(output.ScannedCount), - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + Count: __expectInt32, + Items: (_: any) => de_ItemList(_, context), + LastEvaluatedKey: (_: any) => de_Key(_, context), + ScannedCount: __expectInt32, + }) as any; }; /** @@ -8847,403 +6887,202 @@ const de_SecondaryIndexesCapacityMap = (output: any, context: __SerdeContext): R * deserializeAws_json1_0SourceTableDetails */ const de_SourceTableDetails = (output: any, context: __SerdeContext): SourceTableDetails => { - return { - BillingMode: __expectString(output.BillingMode), - ItemCount: __expectLong(output.ItemCount), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_ProvisionedThroughput(output.ProvisionedThroughput, context) - : undefined, - TableArn: __expectString(output.TableArn), - TableCreationDateTime: - output.TableCreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TableCreationDateTime))) - : undefined, - TableId: __expectString(output.TableId), - TableName: __expectString(output.TableName), - TableSizeBytes: __expectLong(output.TableSizeBytes), - } as any; + return take(output, { + BillingMode: __expectString, + ItemCount: __expectLong, + KeySchema: _json, + ProvisionedThroughput: _json, + TableArn: __expectString, + TableCreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableId: __expectString, + TableName: __expectString, + TableSizeBytes: __expectLong, + }) as any; }; /** * deserializeAws_json1_0SourceTableFeatureDetails */ const de_SourceTableFeatureDetails = (output: any, context: __SerdeContext): SourceTableFeatureDetails => { - return { - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_GlobalSecondaryIndexes(output.GlobalSecondaryIndexes, context) - : undefined, - LocalSecondaryIndexes: - output.LocalSecondaryIndexes != null - ? de_LocalSecondaryIndexes(output.LocalSecondaryIndexes, context) - : undefined, - SSEDescription: output.SSEDescription != null ? de_SSEDescription(output.SSEDescription, context) : undefined, - StreamDescription: - output.StreamDescription != null ? de_StreamSpecification(output.StreamDescription, context) : undefined, - TimeToLiveDescription: - output.TimeToLiveDescription != null - ? de_TimeToLiveDescription(output.TimeToLiveDescription, context) - : undefined, - } as any; + return take(output, { + GlobalSecondaryIndexes: _json, + LocalSecondaryIndexes: _json, + SSEDescription: (_: any) => de_SSEDescription(_, context), + StreamDescription: _json, + TimeToLiveDescription: _json, + }) as any; }; /** * deserializeAws_json1_0SSEDescription */ const de_SSEDescription = (output: any, context: __SerdeContext): SSEDescription => { - return { - InaccessibleEncryptionDateTime: - output.InaccessibleEncryptionDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InaccessibleEncryptionDateTime))) - : undefined, - KMSMasterKeyArn: __expectString(output.KMSMasterKeyArn), - SSEType: __expectString(output.SSEType), - Status: __expectString(output.Status), - } as any; + return take(output, { + InaccessibleEncryptionDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KMSMasterKeyArn: __expectString, + SSEType: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0SSESpecification - */ -const de_SSESpecification = (output: any, context: __SerdeContext): SSESpecification => { - return { - Enabled: __expectBoolean(output.Enabled), - KMSMasterKeyId: __expectString(output.KMSMasterKeyId), - SSEType: __expectString(output.SSEType), - } as any; -}; +// de_SSESpecification omitted. -/** - * deserializeAws_json1_0StreamSpecification - */ -const de_StreamSpecification = (output: any, context: __SerdeContext): StreamSpecification => { - return { - StreamEnabled: __expectBoolean(output.StreamEnabled), - StreamViewType: __expectString(output.StreamViewType), - } as any; -}; +// de_StreamSpecification omitted. -/** - * deserializeAws_json1_0StringSetAttributeValue - */ -const de_StringSetAttributeValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringSetAttributeValue omitted. -/** - * deserializeAws_json1_0TableAlreadyExistsException - */ -const de_TableAlreadyExistsException = (output: any, context: __SerdeContext): TableAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TableAlreadyExistsException omitted. /** * deserializeAws_json1_0TableAutoScalingDescription */ const de_TableAutoScalingDescription = (output: any, context: __SerdeContext): TableAutoScalingDescription => { - return { - Replicas: output.Replicas != null ? de_ReplicaAutoScalingDescriptionList(output.Replicas, context) : undefined, - TableName: __expectString(output.TableName), - TableStatus: __expectString(output.TableStatus), - } as any; + return take(output, { + Replicas: (_: any) => de_ReplicaAutoScalingDescriptionList(_, context), + TableName: __expectString, + TableStatus: __expectString, + }) as any; }; /** * deserializeAws_json1_0TableClassSummary */ const de_TableClassSummary = (output: any, context: __SerdeContext): TableClassSummary => { - return { - LastUpdateDateTime: - output.LastUpdateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateDateTime))) - : undefined, - TableClass: __expectString(output.TableClass), - } as any; + return take(output, { + LastUpdateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableClass: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0TableCreationParameters - */ -const de_TableCreationParameters = (output: any, context: __SerdeContext): TableCreationParameters => { - return { - AttributeDefinitions: - output.AttributeDefinitions != null ? de_AttributeDefinitions(output.AttributeDefinitions, context) : undefined, - BillingMode: __expectString(output.BillingMode), - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_GlobalSecondaryIndexList(output.GlobalSecondaryIndexes, context) - : undefined, - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_ProvisionedThroughput(output.ProvisionedThroughput, context) - : undefined, - SSESpecification: - output.SSESpecification != null ? de_SSESpecification(output.SSESpecification, context) : undefined, - TableName: __expectString(output.TableName), - } as any; -}; +// de_TableCreationParameters omitted. /** * deserializeAws_json1_0TableDescription */ const de_TableDescription = (output: any, context: __SerdeContext): TableDescription => { - return { - ArchivalSummary: output.ArchivalSummary != null ? de_ArchivalSummary(output.ArchivalSummary, context) : undefined, - AttributeDefinitions: - output.AttributeDefinitions != null ? de_AttributeDefinitions(output.AttributeDefinitions, context) : undefined, - BillingModeSummary: - output.BillingModeSummary != null ? de_BillingModeSummary(output.BillingModeSummary, context) : undefined, - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_GlobalSecondaryIndexDescriptionList(output.GlobalSecondaryIndexes, context) - : undefined, - GlobalTableVersion: __expectString(output.GlobalTableVersion), - ItemCount: __expectLong(output.ItemCount), - KeySchema: output.KeySchema != null ? de_KeySchema(output.KeySchema, context) : undefined, - LatestStreamArn: __expectString(output.LatestStreamArn), - LatestStreamLabel: __expectString(output.LatestStreamLabel), - LocalSecondaryIndexes: - output.LocalSecondaryIndexes != null - ? de_LocalSecondaryIndexDescriptionList(output.LocalSecondaryIndexes, context) - : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_ProvisionedThroughputDescription(output.ProvisionedThroughput, context) - : undefined, - Replicas: output.Replicas != null ? de_ReplicaDescriptionList(output.Replicas, context) : undefined, - RestoreSummary: output.RestoreSummary != null ? de_RestoreSummary(output.RestoreSummary, context) : undefined, - SSEDescription: output.SSEDescription != null ? de_SSEDescription(output.SSEDescription, context) : undefined, - StreamSpecification: - output.StreamSpecification != null ? de_StreamSpecification(output.StreamSpecification, context) : undefined, - TableArn: __expectString(output.TableArn), - TableClassSummary: - output.TableClassSummary != null ? de_TableClassSummary(output.TableClassSummary, context) : undefined, - TableId: __expectString(output.TableId), - TableName: __expectString(output.TableName), - TableSizeBytes: __expectLong(output.TableSizeBytes), - TableStatus: __expectString(output.TableStatus), - } as any; -}; - -/** - * deserializeAws_json1_0TableInUseException - */ -const de_TableInUseException = (output: any, context: __SerdeContext): TableInUseException => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + ArchivalSummary: (_: any) => de_ArchivalSummary(_, context), + AttributeDefinitions: _json, + BillingModeSummary: (_: any) => de_BillingModeSummary(_, context), + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + GlobalSecondaryIndexes: (_: any) => de_GlobalSecondaryIndexDescriptionList(_, context), + GlobalTableVersion: __expectString, + ItemCount: __expectLong, + KeySchema: _json, + LatestStreamArn: __expectString, + LatestStreamLabel: __expectString, + LocalSecondaryIndexes: _json, + ProvisionedThroughput: (_: any) => de_ProvisionedThroughputDescription(_, context), + Replicas: (_: any) => de_ReplicaDescriptionList(_, context), + RestoreSummary: (_: any) => de_RestoreSummary(_, context), + SSEDescription: (_: any) => de_SSEDescription(_, context), + StreamSpecification: _json, + TableArn: __expectString, + TableClassSummary: (_: any) => de_TableClassSummary(_, context), + TableId: __expectString, + TableName: __expectString, + TableSizeBytes: __expectLong, + TableStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0TableNameList - */ -const de_TableNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TableInUseException omitted. -/** - * deserializeAws_json1_0TableNotFoundException - */ -const de_TableNotFoundException = (output: any, context: __SerdeContext): TableNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TableNameList omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_TableNotFoundException omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TimeToLiveDescription - */ -const de_TimeToLiveDescription = (output: any, context: __SerdeContext): TimeToLiveDescription => { - return { - AttributeName: __expectString(output.AttributeName), - TimeToLiveStatus: __expectString(output.TimeToLiveStatus), - } as any; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TimeToLiveSpecification - */ -const de_TimeToLiveSpecification = (output: any, context: __SerdeContext): TimeToLiveSpecification => { - return { - AttributeName: __expectString(output.AttributeName), - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_TimeToLiveDescription omitted. + +// de_TimeToLiveSpecification omitted. /** * deserializeAws_json1_0TransactGetItemsOutput */ const de_TransactGetItemsOutput = (output: any, context: __SerdeContext): TransactGetItemsOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacityMultiple(output.ConsumedCapacity, context) : undefined, - Responses: output.Responses != null ? de_ItemResponseList(output.Responses, context) : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacityMultiple(_, context), + Responses: (_: any) => de_ItemResponseList(_, context), + }) as any; }; /** * deserializeAws_json1_0TransactionCanceledException */ const de_TransactionCanceledException = (output: any, context: __SerdeContext): TransactionCanceledException => { - return { - CancellationReasons: - output.CancellationReasons != null ? de_CancellationReasonList(output.CancellationReasons, context) : undefined, - Message: __expectString(output.Message), - } as any; + return take(output, { + CancellationReasons: (_: any) => de_CancellationReasonList(_, context), + Message: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0TransactionConflictException - */ -const de_TransactionConflictException = (output: any, context: __SerdeContext): TransactionConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TransactionConflictException omitted. -/** - * deserializeAws_json1_0TransactionInProgressException - */ -const de_TransactionInProgressException = (output: any, context: __SerdeContext): TransactionInProgressException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TransactionInProgressException omitted. /** * deserializeAws_json1_0TransactWriteItemsOutput */ const de_TransactWriteItemsOutput = (output: any, context: __SerdeContext): TransactWriteItemsOutput => { - return { - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacityMultiple(output.ConsumedCapacity, context) : undefined, - ItemCollectionMetrics: - output.ItemCollectionMetrics != null - ? de_ItemCollectionMetricsPerTable(output.ItemCollectionMetrics, context) - : undefined, - } as any; + return take(output, { + ConsumedCapacity: (_: any) => de_ConsumedCapacityMultiple(_, context), + ItemCollectionMetrics: (_: any) => de_ItemCollectionMetricsPerTable(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateContinuousBackupsOutput */ const de_UpdateContinuousBackupsOutput = (output: any, context: __SerdeContext): UpdateContinuousBackupsOutput => { - return { - ContinuousBackupsDescription: - output.ContinuousBackupsDescription != null - ? de_ContinuousBackupsDescription(output.ContinuousBackupsDescription, context) - : undefined, - } as any; + return take(output, { + ContinuousBackupsDescription: (_: any) => de_ContinuousBackupsDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UpdateContributorInsightsOutput - */ -const de_UpdateContributorInsightsOutput = (output: any, context: __SerdeContext): UpdateContributorInsightsOutput => { - return { - ContributorInsightsStatus: __expectString(output.ContributorInsightsStatus), - IndexName: __expectString(output.IndexName), - TableName: __expectString(output.TableName), - } as any; -}; +// de_UpdateContributorInsightsOutput omitted. /** * deserializeAws_json1_0UpdateGlobalTableOutput */ const de_UpdateGlobalTableOutput = (output: any, context: __SerdeContext): UpdateGlobalTableOutput => { - return { - GlobalTableDescription: - output.GlobalTableDescription != null - ? de_GlobalTableDescription(output.GlobalTableDescription, context) - : undefined, - } as any; + return take(output, { + GlobalTableDescription: (_: any) => de_GlobalTableDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateGlobalTableSettingsOutput */ const de_UpdateGlobalTableSettingsOutput = (output: any, context: __SerdeContext): UpdateGlobalTableSettingsOutput => { - return { - GlobalTableName: __expectString(output.GlobalTableName), - ReplicaSettings: - output.ReplicaSettings != null ? de_ReplicaSettingsDescriptionList(output.ReplicaSettings, context) : undefined, - } as any; + return take(output, { + GlobalTableName: __expectString, + ReplicaSettings: (_: any) => de_ReplicaSettingsDescriptionList(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateItemOutput */ const de_UpdateItemOutput = (output: any, context: __SerdeContext): UpdateItemOutput => { - return { - Attributes: output.Attributes != null ? de_AttributeMap(output.Attributes, context) : undefined, - ConsumedCapacity: - output.ConsumedCapacity != null ? de_ConsumedCapacity(output.ConsumedCapacity, context) : undefined, - ItemCollectionMetrics: - output.ItemCollectionMetrics != null - ? de_ItemCollectionMetrics(output.ItemCollectionMetrics, context) - : undefined, - } as any; + return take(output, { + Attributes: (_: any) => de_AttributeMap(_, context), + ConsumedCapacity: (_: any) => de_ConsumedCapacity(_, context), + ItemCollectionMetrics: (_: any) => de_ItemCollectionMetrics(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateTableOutput */ const de_UpdateTableOutput = (output: any, context: __SerdeContext): UpdateTableOutput => { - return { - TableDescription: - output.TableDescription != null ? de_TableDescription(output.TableDescription, context) : undefined, - } as any; + return take(output, { + TableDescription: (_: any) => de_TableDescription(_, context), + }) as any; }; /** @@ -9253,34 +7092,21 @@ const de_UpdateTableReplicaAutoScalingOutput = ( output: any, context: __SerdeContext ): UpdateTableReplicaAutoScalingOutput => { - return { - TableAutoScalingDescription: - output.TableAutoScalingDescription != null - ? de_TableAutoScalingDescription(output.TableAutoScalingDescription, context) - : undefined, - } as any; + return take(output, { + TableAutoScalingDescription: (_: any) => de_TableAutoScalingDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UpdateTimeToLiveOutput - */ -const de_UpdateTimeToLiveOutput = (output: any, context: __SerdeContext): UpdateTimeToLiveOutput => { - return { - TimeToLiveSpecification: - output.TimeToLiveSpecification != null - ? de_TimeToLiveSpecification(output.TimeToLiveSpecification, context) - : undefined, - } as any; -}; +// de_UpdateTimeToLiveOutput omitted. /** * deserializeAws_json1_0WriteRequest */ const de_WriteRequest = (output: any, context: __SerdeContext): WriteRequest => { - return { - DeleteRequest: output.DeleteRequest != null ? de_DeleteRequest(output.DeleteRequest, context) : undefined, - PutRequest: output.PutRequest != null ? de_PutRequest(output.PutRequest, context) : undefined, - } as any; + return take(output, { + DeleteRequest: (_: any) => de_DeleteRequest(_, context), + PutRequest: (_: any) => de_PutRequest(_, context), + }) as any; }; /** @@ -9290,9 +7116,6 @@ const de_WriteRequests = (output: any, context: __SerdeContext): WriteRequest[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WriteRequest(entry, context); }); return retVal; @@ -9318,6 +7141,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ebs/src/protocols/Aws_restJson1.ts b/clients/client-ebs/src/protocols/Aws_restJson1.ts index 2b8092f0a672..1a8b159dc31f 100644 --- a/clients/client-ebs/src/protocols/Aws_restJson1.ts +++ b/clients/client-ebs/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,11 +10,12 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -32,8 +34,6 @@ import { StartSnapshotCommandInput, StartSnapshotCommandOutput } from "../comman import { EBSServiceException as __BaseException } from "../models/EBSServiceException"; import { AccessDeniedException, - Block, - ChangedBlock, ConcurrentLimitExceededException, ConflictException, InternalServerException, @@ -238,16 +238,18 @@ export const se_StartSnapshotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/snapshots"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.ParentSnapshotId != null && { ParentSnapshotId: input.ParentSnapshotId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Encrypted: [], + KmsKeyArn: [], + ParentSnapshotId: [], + Tags: (_) => _json(_), + Timeout: [], + VolumeSize: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -273,9 +275,10 @@ export const de_CompleteSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -312,10 +315,9 @@ const de_CompleteSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -379,10 +381,9 @@ const de_GetSnapshotBlockCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -402,21 +403,14 @@ export const de_ListChangedBlocksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BlockSize != null) { - contents.BlockSize = __expectInt32(data.BlockSize); - } - if (data.ChangedBlocks != null) { - contents.ChangedBlocks = de_ChangedBlocks(data.ChangedBlocks, context); - } - if (data.ExpiryTime != null) { - contents.ExpiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ExpiryTime))); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VolumeSize != null) { - contents.VolumeSize = __expectLong(data.VolumeSize); - } + const doc = take(data, { + BlockSize: __expectInt32, + ChangedBlocks: _json, + ExpiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextToken: __expectString, + VolumeSize: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -453,10 +447,9 @@ const de_ListChangedBlocksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -476,21 +469,14 @@ export const de_ListSnapshotBlocksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BlockSize != null) { - contents.BlockSize = __expectInt32(data.BlockSize); - } - if (data.Blocks != null) { - contents.Blocks = de_Blocks(data.Blocks, context); - } - if (data.ExpiryTime != null) { - contents.ExpiryTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ExpiryTime))); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VolumeSize != null) { - contents.VolumeSize = __expectLong(data.VolumeSize); - } + const doc = take(data, { + BlockSize: __expectInt32, + Blocks: _json, + ExpiryTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextToken: __expectString, + VolumeSize: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -527,10 +513,9 @@ const de_ListSnapshotBlocksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -588,10 +573,9 @@ const de_PutSnapshotBlockCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -611,36 +595,19 @@ export const de_StartSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BlockSize != null) { - contents.BlockSize = __expectInt32(data.BlockSize); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.OwnerId != null) { - contents.OwnerId = __expectString(data.OwnerId); - } - if (data.ParentSnapshotId != null) { - contents.ParentSnapshotId = __expectString(data.ParentSnapshotId); - } - if (data.SnapshotId != null) { - contents.SnapshotId = __expectString(data.SnapshotId); - } - if (data.StartTime != null) { - contents.StartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartTime))); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.VolumeSize != null) { - contents.VolumeSize = __expectLong(data.VolumeSize); - } + const doc = take(data, { + BlockSize: __expectInt32, + Description: __expectString, + KmsKeyArn: __expectString, + OwnerId: __expectString, + ParentSnapshotId: __expectString, + SnapshotId: __expectString, + StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Tags: _json, + VolumeSize: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -683,16 +650,15 @@ const de_StartSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -702,12 +668,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -724,9 +689,10 @@ const de_ConcurrentLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -740,9 +706,10 @@ const de_ConcurrentLimitExceededExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -759,9 +726,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -778,12 +746,11 @@ const de_RequestThrottledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestThrottledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -800,12 +767,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -822,12 +788,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -841,12 +806,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -854,102 +818,21 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1Block - */ -const de_Block = (output: any, context: __SerdeContext): Block => { - return { - BlockIndex: __expectInt32(output.BlockIndex), - BlockToken: __expectString(output.BlockToken), - } as any; -}; +// de_Block omitted. -/** - * deserializeAws_restJson1Blocks - */ -const de_Blocks = (output: any, context: __SerdeContext): Block[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Block(entry, context); - }); - return retVal; -}; +// de_Blocks omitted. -/** - * deserializeAws_restJson1ChangedBlock - */ -const de_ChangedBlock = (output: any, context: __SerdeContext): ChangedBlock => { - return { - BlockIndex: __expectInt32(output.BlockIndex), - FirstBlockToken: __expectString(output.FirstBlockToken), - SecondBlockToken: __expectString(output.SecondBlockToken), - } as any; -}; +// de_ChangedBlock omitted. -/** - * deserializeAws_restJson1ChangedBlocks - */ -const de_ChangedBlocks = (output: any, context: __SerdeContext): ChangedBlock[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChangedBlock(entry, context); - }); - return retVal; -}; +// de_ChangedBlocks omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts b/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts index c45c159a7046..7f531cf93b59 100644 --- a/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts +++ b/clients/client-ec2-instance-connect/src/protocols/Aws_json1_1.ts @@ -1,10 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -27,9 +26,7 @@ import { EC2InstanceUnavailableException, InvalidArgsException, SendSerialConsoleSSHPublicKeyRequest, - SendSerialConsoleSSHPublicKeyResponse, SendSSHPublicKeyRequest, - SendSSHPublicKeyResponse, SerialConsoleAccessDisabledException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, @@ -46,7 +43,7 @@ export const se_SendSerialConsoleSSHPublicKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendSerialConsoleSSHPublicKey"); let body: any; - body = JSON.stringify(se_SendSerialConsoleSSHPublicKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -59,7 +56,7 @@ export const se_SendSSHPublicKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendSSHPublicKey"); let body: any; - body = JSON.stringify(se_SendSSHPublicKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -75,12 +72,12 @@ export const de_SendSerialConsoleSSHPublicKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendSerialConsoleSSHPublicKeyResponse(data, context); + contents = _json(data); const response: SendSerialConsoleSSHPublicKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -131,10 +128,9 @@ const de_SendSerialConsoleSSHPublicKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -152,12 +148,12 @@ export const de_SendSSHPublicKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendSSHPublicKeyResponse(data, context); + contents = _json(data); const response: SendSSHPublicKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -196,10 +192,9 @@ const de_SendSSHPublicKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -210,7 +205,7 @@ const de_SendSSHPublicKeyCommandError = async ( */ const de_AuthExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AuthException(body, context); + const deserialized: any = _json(body); const exception = new AuthException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -226,7 +221,7 @@ const de_EC2InstanceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EC2InstanceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EC2InstanceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -242,7 +237,7 @@ const de_EC2InstanceStateInvalidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EC2InstanceStateInvalidException(body, context); + const deserialized: any = _json(body); const exception = new EC2InstanceStateInvalidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -258,7 +253,7 @@ const de_EC2InstanceTypeInvalidExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EC2InstanceTypeInvalidException(body, context); + const deserialized: any = _json(body); const exception = new EC2InstanceTypeInvalidException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -274,7 +269,7 @@ const de_EC2InstanceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EC2InstanceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new EC2InstanceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -290,7 +285,7 @@ const de_InvalidArgsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -306,7 +301,7 @@ const de_SerialConsoleAccessDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SerialConsoleAccessDisabledException(body, context); + const deserialized: any = _json(body); const exception = new SerialConsoleAccessDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -322,7 +317,7 @@ const de_SerialConsoleSessionLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SerialConsoleSessionLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new SerialConsoleSessionLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -338,7 +333,7 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SerialConsoleSessionUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new SerialConsoleSessionUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -351,7 +346,7 @@ const de_SerialConsoleSessionUnavailableExceptionRes = async ( */ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceException(body, context); + const deserialized: any = _json(body); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -364,7 +359,7 @@ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -372,165 +367,35 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1SendSerialConsoleSSHPublicKeyRequest - */ -const se_SendSerialConsoleSSHPublicKeyRequest = ( - input: SendSerialConsoleSSHPublicKeyRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.SSHPublicKey != null && { SSHPublicKey: input.SSHPublicKey }), - ...(input.SerialPort != null && { SerialPort: input.SerialPort }), - }; -}; +// se_SendSerialConsoleSSHPublicKeyRequest omitted. -/** - * serializeAws_json1_1SendSSHPublicKeyRequest - */ -const se_SendSSHPublicKeyRequest = (input: SendSSHPublicKeyRequest, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.InstanceOSUser != null && { InstanceOSUser: input.InstanceOSUser }), - ...(input.SSHPublicKey != null && { SSHPublicKey: input.SSHPublicKey }), - }; -}; +// se_SendSSHPublicKeyRequest omitted. -/** - * deserializeAws_json1_1AuthException - */ -const de_AuthException = (output: any, context: __SerdeContext): AuthException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AuthException omitted. -/** - * deserializeAws_json1_1EC2InstanceNotFoundException - */ -const de_EC2InstanceNotFoundException = (output: any, context: __SerdeContext): EC2InstanceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EC2InstanceNotFoundException omitted. -/** - * deserializeAws_json1_1EC2InstanceStateInvalidException - */ -const de_EC2InstanceStateInvalidException = ( - output: any, - context: __SerdeContext -): EC2InstanceStateInvalidException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EC2InstanceStateInvalidException omitted. -/** - * deserializeAws_json1_1EC2InstanceTypeInvalidException - */ -const de_EC2InstanceTypeInvalidException = (output: any, context: __SerdeContext): EC2InstanceTypeInvalidException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EC2InstanceTypeInvalidException omitted. -/** - * deserializeAws_json1_1EC2InstanceUnavailableException - */ -const de_EC2InstanceUnavailableException = (output: any, context: __SerdeContext): EC2InstanceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EC2InstanceUnavailableException omitted. -/** - * deserializeAws_json1_1InvalidArgsException - */ -const de_InvalidArgsException = (output: any, context: __SerdeContext): InvalidArgsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidArgsException omitted. -/** - * deserializeAws_json1_1SendSerialConsoleSSHPublicKeyResponse - */ -const de_SendSerialConsoleSSHPublicKeyResponse = ( - output: any, - context: __SerdeContext -): SendSerialConsoleSSHPublicKeyResponse => { - return { - RequestId: __expectString(output.RequestId), - Success: __expectBoolean(output.Success), - } as any; -}; +// de_SendSerialConsoleSSHPublicKeyResponse omitted. -/** - * deserializeAws_json1_1SendSSHPublicKeyResponse - */ -const de_SendSSHPublicKeyResponse = (output: any, context: __SerdeContext): SendSSHPublicKeyResponse => { - return { - RequestId: __expectString(output.RequestId), - Success: __expectBoolean(output.Success), - } as any; -}; +// de_SendSSHPublicKeyResponse omitted. -/** - * deserializeAws_json1_1SerialConsoleAccessDisabledException - */ -const de_SerialConsoleAccessDisabledException = ( - output: any, - context: __SerdeContext -): SerialConsoleAccessDisabledException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SerialConsoleAccessDisabledException omitted. -/** - * deserializeAws_json1_1SerialConsoleSessionLimitExceededException - */ -const de_SerialConsoleSessionLimitExceededException = ( - output: any, - context: __SerdeContext -): SerialConsoleSessionLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SerialConsoleSessionLimitExceededException omitted. -/** - * deserializeAws_json1_1SerialConsoleSessionUnavailableException - */ -const de_SerialConsoleSessionUnavailableException = ( - output: any, - context: __SerdeContext -): SerialConsoleSessionUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SerialConsoleSessionUnavailableException omitted. -/** - * deserializeAws_json1_1ServiceException - */ -const de_ServiceException = (output: any, context: __SerdeContext): ServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceException omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -552,6 +417,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index 5650962d80c4..9969dbbd2134 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -12,7 +12,7 @@ import { strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -13947,7 +13947,7 @@ export const de_AcceptAddressTransferCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13963,10 +13963,9 @@ const de_AcceptAddressTransferCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13988,7 +13987,7 @@ export const de_AcceptReservedInstancesExchangeQuoteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14004,10 +14003,9 @@ const de_AcceptReservedInstancesExchangeQuoteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14029,7 +14027,7 @@ export const de_AcceptTransitGatewayMulticastDomainAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14045,10 +14043,9 @@ const de_AcceptTransitGatewayMulticastDomainAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14070,7 +14067,7 @@ export const de_AcceptTransitGatewayPeeringAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14086,10 +14083,9 @@ const de_AcceptTransitGatewayPeeringAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14111,7 +14107,7 @@ export const de_AcceptTransitGatewayVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14127,10 +14123,9 @@ const de_AcceptTransitGatewayVpcAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14152,7 +14147,7 @@ export const de_AcceptVpcEndpointConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14168,10 +14163,9 @@ const de_AcceptVpcEndpointConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14193,7 +14187,7 @@ export const de_AcceptVpcPeeringConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14209,10 +14203,9 @@ const de_AcceptVpcPeeringConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14234,7 +14227,7 @@ export const de_AdvertiseByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14250,10 +14243,9 @@ const de_AdvertiseByoipCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14275,7 +14267,7 @@ export const de_AllocateAddressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14291,10 +14283,9 @@ const de_AllocateAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14316,7 +14307,7 @@ export const de_AllocateHostsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14332,10 +14323,9 @@ const de_AllocateHostsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14357,7 +14347,7 @@ export const de_AllocateIpamPoolCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14373,10 +14363,9 @@ const de_AllocateIpamPoolCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14398,7 +14387,7 @@ export const de_ApplySecurityGroupsToClientVpnTargetNetworkCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14414,10 +14403,9 @@ const de_ApplySecurityGroupsToClientVpnTargetNetworkCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14439,7 +14427,7 @@ export const de_AssignIpv6AddressesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14455,10 +14443,9 @@ const de_AssignIpv6AddressesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14480,7 +14467,7 @@ export const de_AssignPrivateIpAddressesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14496,10 +14483,9 @@ const de_AssignPrivateIpAddressesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14521,7 +14507,7 @@ export const de_AssignPrivateNatGatewayAddressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14537,10 +14523,9 @@ const de_AssignPrivateNatGatewayAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14562,7 +14547,7 @@ export const de_AssociateAddressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14578,10 +14563,9 @@ const de_AssociateAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14603,7 +14587,7 @@ export const de_AssociateClientVpnTargetNetworkCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14619,10 +14603,9 @@ const de_AssociateClientVpnTargetNetworkCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14641,7 +14624,7 @@ export const de_AssociateDhcpOptionsCommand = async ( const response: AssociateDhcpOptionsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -14657,10 +14640,9 @@ const de_AssociateDhcpOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14682,7 +14664,7 @@ export const de_AssociateEnclaveCertificateIamRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14698,10 +14680,9 @@ const de_AssociateEnclaveCertificateIamRoleCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14723,7 +14704,7 @@ export const de_AssociateIamInstanceProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14739,10 +14720,9 @@ const de_AssociateIamInstanceProfileCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14764,7 +14744,7 @@ export const de_AssociateInstanceEventWindowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14780,10 +14760,9 @@ const de_AssociateInstanceEventWindowCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14805,7 +14784,7 @@ export const de_AssociateIpamResourceDiscoveryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14821,10 +14800,9 @@ const de_AssociateIpamResourceDiscoveryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14846,7 +14824,7 @@ export const de_AssociateNatGatewayAddressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14862,10 +14840,9 @@ const de_AssociateNatGatewayAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14887,7 +14864,7 @@ export const de_AssociateRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14903,10 +14880,9 @@ const de_AssociateRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14928,7 +14904,7 @@ export const de_AssociateSubnetCidrBlockCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14944,10 +14920,9 @@ const de_AssociateSubnetCidrBlockCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14969,7 +14944,7 @@ export const de_AssociateTransitGatewayMulticastDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14985,10 +14960,9 @@ const de_AssociateTransitGatewayMulticastDomainCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15010,7 +14984,7 @@ export const de_AssociateTransitGatewayPolicyTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15026,10 +15000,9 @@ const de_AssociateTransitGatewayPolicyTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15051,7 +15024,7 @@ export const de_AssociateTransitGatewayRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15067,10 +15040,9 @@ const de_AssociateTransitGatewayRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15092,7 +15064,7 @@ export const de_AssociateTrunkInterfaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15108,10 +15080,9 @@ const de_AssociateTrunkInterfaceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15133,7 +15104,7 @@ export const de_AssociateVpcCidrBlockCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15149,10 +15120,9 @@ const de_AssociateVpcCidrBlockCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15174,7 +15144,7 @@ export const de_AttachClassicLinkVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15190,10 +15160,9 @@ const de_AttachClassicLinkVpcCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15212,7 +15181,7 @@ export const de_AttachInternetGatewayCommand = async ( const response: AttachInternetGatewayCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -15228,10 +15197,9 @@ const de_AttachInternetGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15253,7 +15221,7 @@ export const de_AttachNetworkInterfaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15269,10 +15237,9 @@ const de_AttachNetworkInterfaceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15294,7 +15261,7 @@ export const de_AttachVerifiedAccessTrustProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15310,10 +15277,9 @@ const de_AttachVerifiedAccessTrustProviderCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15335,7 +15301,7 @@ export const de_AttachVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15351,10 +15317,9 @@ const de_AttachVolumeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15376,7 +15341,7 @@ export const de_AttachVpnGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15392,10 +15357,9 @@ const de_AttachVpnGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15417,7 +15381,7 @@ export const de_AuthorizeClientVpnIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15433,10 +15397,9 @@ const de_AuthorizeClientVpnIngressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15458,7 +15421,7 @@ export const de_AuthorizeSecurityGroupEgressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15474,10 +15437,9 @@ const de_AuthorizeSecurityGroupEgressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15499,7 +15461,7 @@ export const de_AuthorizeSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15515,10 +15477,9 @@ const de_AuthorizeSecurityGroupIngressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15540,7 +15501,7 @@ export const de_BundleInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15556,10 +15517,9 @@ const de_BundleInstanceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15581,7 +15541,7 @@ export const de_CancelBundleTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15597,10 +15557,9 @@ const de_CancelBundleTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15622,7 +15581,7 @@ export const de_CancelCapacityReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15638,10 +15597,9 @@ const de_CancelCapacityReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15663,7 +15621,7 @@ export const de_CancelCapacityReservationFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15679,10 +15637,9 @@ const de_CancelCapacityReservationFleetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15701,7 +15658,7 @@ export const de_CancelConversionTaskCommand = async ( const response: CancelConversionTaskCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -15717,10 +15674,9 @@ const de_CancelConversionTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15739,7 +15695,7 @@ export const de_CancelExportTaskCommand = async ( const response: CancelExportTaskCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -15755,10 +15711,9 @@ const de_CancelExportTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15780,7 +15735,7 @@ export const de_CancelImageLaunchPermissionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15796,10 +15751,9 @@ const de_CancelImageLaunchPermissionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15821,7 +15775,7 @@ export const de_CancelImportTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15837,10 +15791,9 @@ const de_CancelImportTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15862,7 +15815,7 @@ export const de_CancelReservedInstancesListingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15878,10 +15831,9 @@ const de_CancelReservedInstancesListingCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15903,7 +15855,7 @@ export const de_CancelSpotFleetRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15919,10 +15871,9 @@ const de_CancelSpotFleetRequestsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15944,7 +15895,7 @@ export const de_CancelSpotInstanceRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15960,10 +15911,9 @@ const de_CancelSpotInstanceRequestsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15985,7 +15935,7 @@ export const de_ConfirmProductInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16001,10 +15951,9 @@ const de_ConfirmProductInstanceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16026,7 +15975,7 @@ export const de_CopyFpgaImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16042,10 +15991,9 @@ const de_CopyFpgaImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16067,7 +16015,7 @@ export const de_CopyImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16083,10 +16031,9 @@ const de_CopyImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16108,7 +16055,7 @@ export const de_CopySnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16124,10 +16071,9 @@ const de_CopySnapshotCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16149,7 +16095,7 @@ export const de_CreateCapacityReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16165,10 +16111,9 @@ const de_CreateCapacityReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16190,7 +16135,7 @@ export const de_CreateCapacityReservationFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16206,10 +16151,9 @@ const de_CreateCapacityReservationFleetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16231,7 +16175,7 @@ export const de_CreateCarrierGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16247,10 +16191,9 @@ const de_CreateCarrierGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16272,7 +16215,7 @@ export const de_CreateClientVpnEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16288,10 +16231,9 @@ const de_CreateClientVpnEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16313,7 +16255,7 @@ export const de_CreateClientVpnRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16329,10 +16271,9 @@ const de_CreateClientVpnRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16354,7 +16295,7 @@ export const de_CreateCoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16370,10 +16311,9 @@ const de_CreateCoipCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16395,7 +16335,7 @@ export const de_CreateCoipPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16411,10 +16351,9 @@ const de_CreateCoipPoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16436,7 +16375,7 @@ export const de_CreateCustomerGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16452,10 +16391,9 @@ const de_CreateCustomerGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16477,7 +16415,7 @@ export const de_CreateDefaultSubnetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16493,10 +16431,9 @@ const de_CreateDefaultSubnetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16518,7 +16455,7 @@ export const de_CreateDefaultVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16534,10 +16471,9 @@ const de_CreateDefaultVpcCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16559,7 +16495,7 @@ export const de_CreateDhcpOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16575,10 +16511,9 @@ const de_CreateDhcpOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16600,7 +16535,7 @@ export const de_CreateEgressOnlyInternetGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16616,10 +16551,9 @@ const de_CreateEgressOnlyInternetGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16641,7 +16575,7 @@ export const de_CreateFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16657,10 +16591,9 @@ const de_CreateFleetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16682,7 +16615,7 @@ export const de_CreateFlowLogsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16698,10 +16631,9 @@ const de_CreateFlowLogsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16723,7 +16655,7 @@ export const de_CreateFpgaImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16739,10 +16671,9 @@ const de_CreateFpgaImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16764,7 +16695,7 @@ export const de_CreateImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16780,10 +16711,9 @@ const de_CreateImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16805,7 +16735,7 @@ export const de_CreateInstanceEventWindowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16821,10 +16751,9 @@ const de_CreateInstanceEventWindowCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16846,7 +16775,7 @@ export const de_CreateInstanceExportTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16862,10 +16791,9 @@ const de_CreateInstanceExportTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16887,7 +16815,7 @@ export const de_CreateInternetGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16903,10 +16831,9 @@ const de_CreateInternetGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16928,7 +16855,7 @@ export const de_CreateIpamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16944,10 +16871,9 @@ const de_CreateIpamCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16969,7 +16895,7 @@ export const de_CreateIpamPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16985,10 +16911,9 @@ const de_CreateIpamPoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17010,7 +16935,7 @@ export const de_CreateIpamResourceDiscoveryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17026,10 +16951,9 @@ const de_CreateIpamResourceDiscoveryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17051,7 +16975,7 @@ export const de_CreateIpamScopeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17067,10 +16991,9 @@ const de_CreateIpamScopeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17092,7 +17015,7 @@ export const de_CreateKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17108,10 +17031,9 @@ const de_CreateKeyPairCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17133,7 +17055,7 @@ export const de_CreateLaunchTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17149,10 +17071,9 @@ const de_CreateLaunchTemplateCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17174,7 +17095,7 @@ export const de_CreateLaunchTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17190,10 +17111,9 @@ const de_CreateLaunchTemplateVersionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17215,7 +17135,7 @@ export const de_CreateLocalGatewayRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17231,10 +17151,9 @@ const de_CreateLocalGatewayRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17256,7 +17175,7 @@ export const de_CreateLocalGatewayRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17272,10 +17191,9 @@ const de_CreateLocalGatewayRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17297,7 +17215,7 @@ export const de_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationComm $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17313,10 +17231,9 @@ const de_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationCommandErro }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17338,7 +17255,7 @@ export const de_CreateLocalGatewayRouteTableVpcAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17354,10 +17271,9 @@ const de_CreateLocalGatewayRouteTableVpcAssociationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17379,7 +17295,7 @@ export const de_CreateManagedPrefixListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17395,10 +17311,9 @@ const de_CreateManagedPrefixListCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17420,7 +17335,7 @@ export const de_CreateNatGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17436,10 +17351,9 @@ const de_CreateNatGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17461,7 +17375,7 @@ export const de_CreateNetworkAclCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17477,10 +17391,9 @@ const de_CreateNetworkAclCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17499,7 +17412,7 @@ export const de_CreateNetworkAclEntryCommand = async ( const response: CreateNetworkAclEntryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17515,10 +17428,9 @@ const de_CreateNetworkAclEntryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17540,7 +17452,7 @@ export const de_CreateNetworkInsightsAccessScopeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17556,10 +17468,9 @@ const de_CreateNetworkInsightsAccessScopeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17581,7 +17492,7 @@ export const de_CreateNetworkInsightsPathCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17597,10 +17508,9 @@ const de_CreateNetworkInsightsPathCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17622,7 +17532,7 @@ export const de_CreateNetworkInterfaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17638,10 +17548,9 @@ const de_CreateNetworkInterfaceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17663,7 +17572,7 @@ export const de_CreateNetworkInterfacePermissionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17679,10 +17588,9 @@ const de_CreateNetworkInterfacePermissionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17704,7 +17612,7 @@ export const de_CreatePlacementGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17720,10 +17628,9 @@ const de_CreatePlacementGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17745,7 +17652,7 @@ export const de_CreatePublicIpv4PoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17761,10 +17668,9 @@ const de_CreatePublicIpv4PoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17786,7 +17692,7 @@ export const de_CreateReplaceRootVolumeTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17802,10 +17708,9 @@ const de_CreateReplaceRootVolumeTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17827,7 +17732,7 @@ export const de_CreateReservedInstancesListingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17843,10 +17748,9 @@ const de_CreateReservedInstancesListingCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17868,7 +17772,7 @@ export const de_CreateRestoreImageTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17884,10 +17788,9 @@ const de_CreateRestoreImageTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17909,7 +17812,7 @@ export const de_CreateRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17925,10 +17828,9 @@ const de_CreateRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17950,7 +17852,7 @@ export const de_CreateRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17966,10 +17868,9 @@ const de_CreateRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17991,7 +17892,7 @@ export const de_CreateSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18007,10 +17908,9 @@ const de_CreateSecurityGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18032,7 +17932,7 @@ export const de_CreateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18048,10 +17948,9 @@ const de_CreateSnapshotCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18073,7 +17972,7 @@ export const de_CreateSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18089,10 +17988,9 @@ const de_CreateSnapshotsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18114,7 +18012,7 @@ export const de_CreateSpotDatafeedSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18130,10 +18028,9 @@ const de_CreateSpotDatafeedSubscriptionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18155,7 +18052,7 @@ export const de_CreateStoreImageTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18171,10 +18068,9 @@ const de_CreateStoreImageTaskCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18196,7 +18092,7 @@ export const de_CreateSubnetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18212,10 +18108,9 @@ const de_CreateSubnetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18237,7 +18132,7 @@ export const de_CreateSubnetCidrReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18253,10 +18148,9 @@ const de_CreateSubnetCidrReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18275,7 +18169,7 @@ export const de_CreateTagsCommand = async ( const response: CreateTagsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -18291,10 +18185,9 @@ const de_CreateTagsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18316,7 +18209,7 @@ export const de_CreateTrafficMirrorFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18332,10 +18225,9 @@ const de_CreateTrafficMirrorFilterCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18357,7 +18249,7 @@ export const de_CreateTrafficMirrorFilterRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18373,10 +18265,9 @@ const de_CreateTrafficMirrorFilterRuleCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18398,7 +18289,7 @@ export const de_CreateTrafficMirrorSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18414,10 +18305,9 @@ const de_CreateTrafficMirrorSessionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18439,7 +18329,7 @@ export const de_CreateTrafficMirrorTargetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18455,10 +18345,9 @@ const de_CreateTrafficMirrorTargetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18480,7 +18369,7 @@ export const de_CreateTransitGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18496,10 +18385,9 @@ const de_CreateTransitGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18521,7 +18409,7 @@ export const de_CreateTransitGatewayConnectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18537,10 +18425,9 @@ const de_CreateTransitGatewayConnectCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18562,7 +18449,7 @@ export const de_CreateTransitGatewayConnectPeerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18578,10 +18465,9 @@ const de_CreateTransitGatewayConnectPeerCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18603,7 +18489,7 @@ export const de_CreateTransitGatewayMulticastDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18619,10 +18505,9 @@ const de_CreateTransitGatewayMulticastDomainCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18644,7 +18529,7 @@ export const de_CreateTransitGatewayPeeringAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18660,10 +18545,9 @@ const de_CreateTransitGatewayPeeringAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18685,7 +18569,7 @@ export const de_CreateTransitGatewayPolicyTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18701,10 +18585,9 @@ const de_CreateTransitGatewayPolicyTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18726,7 +18609,7 @@ export const de_CreateTransitGatewayPrefixListReferenceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18742,10 +18625,9 @@ const de_CreateTransitGatewayPrefixListReferenceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18767,7 +18649,7 @@ export const de_CreateTransitGatewayRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18783,10 +18665,9 @@ const de_CreateTransitGatewayRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18808,7 +18689,7 @@ export const de_CreateTransitGatewayRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18824,10 +18705,9 @@ const de_CreateTransitGatewayRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18849,7 +18729,7 @@ export const de_CreateTransitGatewayRouteTableAnnouncementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18865,10 +18745,9 @@ const de_CreateTransitGatewayRouteTableAnnouncementCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18890,7 +18769,7 @@ export const de_CreateTransitGatewayVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18906,10 +18785,9 @@ const de_CreateTransitGatewayVpcAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18931,7 +18809,7 @@ export const de_CreateVerifiedAccessEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18947,10 +18825,9 @@ const de_CreateVerifiedAccessEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18972,7 +18849,7 @@ export const de_CreateVerifiedAccessGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18988,10 +18865,9 @@ const de_CreateVerifiedAccessGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19013,7 +18889,7 @@ export const de_CreateVerifiedAccessInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19029,10 +18905,9 @@ const de_CreateVerifiedAccessInstanceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19054,7 +18929,7 @@ export const de_CreateVerifiedAccessTrustProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19070,10 +18945,9 @@ const de_CreateVerifiedAccessTrustProviderCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19095,7 +18969,7 @@ export const de_CreateVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19111,10 +18985,9 @@ const de_CreateVolumeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19136,7 +19009,7 @@ export const de_CreateVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19152,10 +19025,9 @@ const de_CreateVpcCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19177,7 +19049,7 @@ export const de_CreateVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19193,10 +19065,9 @@ const de_CreateVpcEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19218,7 +19089,7 @@ export const de_CreateVpcEndpointConnectionNotificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19234,10 +19105,9 @@ const de_CreateVpcEndpointConnectionNotificationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19259,7 +19129,7 @@ export const de_CreateVpcEndpointServiceConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19275,10 +19145,9 @@ const de_CreateVpcEndpointServiceConfigurationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19300,7 +19169,7 @@ export const de_CreateVpcPeeringConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19316,10 +19185,9 @@ const de_CreateVpcPeeringConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19341,7 +19209,7 @@ export const de_CreateVpnConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19357,10 +19225,9 @@ const de_CreateVpnConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19379,7 +19246,7 @@ export const de_CreateVpnConnectionRouteCommand = async ( const response: CreateVpnConnectionRouteCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -19395,10 +19262,9 @@ const de_CreateVpnConnectionRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19420,7 +19286,7 @@ export const de_CreateVpnGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19436,10 +19302,9 @@ const de_CreateVpnGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19461,7 +19326,7 @@ export const de_DeleteCarrierGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19477,10 +19342,9 @@ const de_DeleteCarrierGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19502,7 +19366,7 @@ export const de_DeleteClientVpnEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19518,10 +19382,9 @@ const de_DeleteClientVpnEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19543,7 +19406,7 @@ export const de_DeleteClientVpnRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19559,10 +19422,9 @@ const de_DeleteClientVpnRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19584,7 +19446,7 @@ export const de_DeleteCoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19600,10 +19462,9 @@ const de_DeleteCoipCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19625,7 +19486,7 @@ export const de_DeleteCoipPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19641,10 +19502,9 @@ const de_DeleteCoipPoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19663,7 +19523,7 @@ export const de_DeleteCustomerGatewayCommand = async ( const response: DeleteCustomerGatewayCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -19679,10 +19539,9 @@ const de_DeleteCustomerGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19701,7 +19560,7 @@ export const de_DeleteDhcpOptionsCommand = async ( const response: DeleteDhcpOptionsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -19717,10 +19576,9 @@ const de_DeleteDhcpOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19742,7 +19600,7 @@ export const de_DeleteEgressOnlyInternetGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19758,10 +19616,9 @@ const de_DeleteEgressOnlyInternetGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19783,7 +19640,7 @@ export const de_DeleteFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19799,10 +19656,9 @@ const de_DeleteFleetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19824,7 +19680,7 @@ export const de_DeleteFlowLogsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19840,10 +19696,9 @@ const de_DeleteFlowLogsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19865,7 +19720,7 @@ export const de_DeleteFpgaImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19881,10 +19736,9 @@ const de_DeleteFpgaImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19906,7 +19760,7 @@ export const de_DeleteInstanceEventWindowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19922,10 +19776,9 @@ const de_DeleteInstanceEventWindowCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19944,7 +19797,7 @@ export const de_DeleteInternetGatewayCommand = async ( const response: DeleteInternetGatewayCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -19960,10 +19813,9 @@ const de_DeleteInternetGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19985,7 +19837,7 @@ export const de_DeleteIpamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20001,10 +19853,9 @@ const de_DeleteIpamCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20026,7 +19877,7 @@ export const de_DeleteIpamPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20042,10 +19893,9 @@ const de_DeleteIpamPoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20067,7 +19917,7 @@ export const de_DeleteIpamResourceDiscoveryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20083,10 +19933,9 @@ const de_DeleteIpamResourceDiscoveryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20108,7 +19957,7 @@ export const de_DeleteIpamScopeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20124,10 +19973,9 @@ const de_DeleteIpamScopeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20146,7 +19994,7 @@ export const de_DeleteKeyPairCommand = async ( const response: DeleteKeyPairCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -20162,10 +20010,9 @@ const de_DeleteKeyPairCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20187,7 +20034,7 @@ export const de_DeleteLaunchTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20203,10 +20050,9 @@ const de_DeleteLaunchTemplateCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20228,7 +20074,7 @@ export const de_DeleteLaunchTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20244,10 +20090,9 @@ const de_DeleteLaunchTemplateVersionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20269,7 +20114,7 @@ export const de_DeleteLocalGatewayRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20285,10 +20130,9 @@ const de_DeleteLocalGatewayRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20310,7 +20154,7 @@ export const de_DeleteLocalGatewayRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20326,10 +20170,9 @@ const de_DeleteLocalGatewayRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20351,7 +20194,7 @@ export const de_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationComm $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20367,10 +20210,9 @@ const de_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationCommandErro }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20392,7 +20234,7 @@ export const de_DeleteLocalGatewayRouteTableVpcAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20408,10 +20250,9 @@ const de_DeleteLocalGatewayRouteTableVpcAssociationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20433,7 +20274,7 @@ export const de_DeleteManagedPrefixListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20449,10 +20290,9 @@ const de_DeleteManagedPrefixListCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20474,7 +20314,7 @@ export const de_DeleteNatGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20490,10 +20330,9 @@ const de_DeleteNatGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20512,7 +20351,7 @@ export const de_DeleteNetworkAclCommand = async ( const response: DeleteNetworkAclCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -20528,10 +20367,9 @@ const de_DeleteNetworkAclCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20550,7 +20388,7 @@ export const de_DeleteNetworkAclEntryCommand = async ( const response: DeleteNetworkAclEntryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -20566,10 +20404,9 @@ const de_DeleteNetworkAclEntryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20591,7 +20428,7 @@ export const de_DeleteNetworkInsightsAccessScopeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20607,10 +20444,9 @@ const de_DeleteNetworkInsightsAccessScopeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20632,7 +20468,7 @@ export const de_DeleteNetworkInsightsAccessScopeAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20648,10 +20484,9 @@ const de_DeleteNetworkInsightsAccessScopeAnalysisCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20673,7 +20508,7 @@ export const de_DeleteNetworkInsightsAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20689,10 +20524,9 @@ const de_DeleteNetworkInsightsAnalysisCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20714,7 +20548,7 @@ export const de_DeleteNetworkInsightsPathCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20730,10 +20564,9 @@ const de_DeleteNetworkInsightsPathCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20752,7 +20585,7 @@ export const de_DeleteNetworkInterfaceCommand = async ( const response: DeleteNetworkInterfaceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -20768,10 +20601,9 @@ const de_DeleteNetworkInterfaceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20793,7 +20625,7 @@ export const de_DeleteNetworkInterfacePermissionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20809,10 +20641,9 @@ const de_DeleteNetworkInterfacePermissionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20831,7 +20662,7 @@ export const de_DeletePlacementGroupCommand = async ( const response: DeletePlacementGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -20847,10 +20678,9 @@ const de_DeletePlacementGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20872,7 +20702,7 @@ export const de_DeletePublicIpv4PoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20888,10 +20718,9 @@ const de_DeletePublicIpv4PoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20913,7 +20742,7 @@ export const de_DeleteQueuedReservedInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -20929,10 +20758,9 @@ const de_DeleteQueuedReservedInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20951,7 +20779,7 @@ export const de_DeleteRouteCommand = async ( const response: DeleteRouteCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -20967,10 +20795,9 @@ const de_DeleteRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -20989,7 +20816,7 @@ export const de_DeleteRouteTableCommand = async ( const response: DeleteRouteTableCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -21005,10 +20832,9 @@ const de_DeleteRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21027,7 +20853,7 @@ export const de_DeleteSecurityGroupCommand = async ( const response: DeleteSecurityGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -21043,10 +20869,9 @@ const de_DeleteSecurityGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21065,7 +20890,7 @@ export const de_DeleteSnapshotCommand = async ( const response: DeleteSnapshotCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -21081,10 +20906,9 @@ const de_DeleteSnapshotCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21103,7 +20927,7 @@ export const de_DeleteSpotDatafeedSubscriptionCommand = async ( const response: DeleteSpotDatafeedSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -21119,10 +20943,9 @@ const de_DeleteSpotDatafeedSubscriptionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21141,7 +20964,7 @@ export const de_DeleteSubnetCommand = async ( const response: DeleteSubnetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -21157,10 +20980,9 @@ const de_DeleteSubnetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21182,7 +21004,7 @@ export const de_DeleteSubnetCidrReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21198,10 +21020,9 @@ const de_DeleteSubnetCidrReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21220,7 +21041,7 @@ export const de_DeleteTagsCommand = async ( const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -21236,10 +21057,9 @@ const de_DeleteTagsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21261,7 +21081,7 @@ export const de_DeleteTrafficMirrorFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21277,10 +21097,9 @@ const de_DeleteTrafficMirrorFilterCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21302,7 +21121,7 @@ export const de_DeleteTrafficMirrorFilterRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21318,10 +21137,9 @@ const de_DeleteTrafficMirrorFilterRuleCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21343,7 +21161,7 @@ export const de_DeleteTrafficMirrorSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21359,10 +21177,9 @@ const de_DeleteTrafficMirrorSessionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21384,7 +21201,7 @@ export const de_DeleteTrafficMirrorTargetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21400,10 +21217,9 @@ const de_DeleteTrafficMirrorTargetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21425,7 +21241,7 @@ export const de_DeleteTransitGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21441,10 +21257,9 @@ const de_DeleteTransitGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21466,7 +21281,7 @@ export const de_DeleteTransitGatewayConnectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21482,10 +21297,9 @@ const de_DeleteTransitGatewayConnectCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21507,7 +21321,7 @@ export const de_DeleteTransitGatewayConnectPeerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21523,10 +21337,9 @@ const de_DeleteTransitGatewayConnectPeerCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21548,7 +21361,7 @@ export const de_DeleteTransitGatewayMulticastDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21564,10 +21377,9 @@ const de_DeleteTransitGatewayMulticastDomainCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21589,7 +21401,7 @@ export const de_DeleteTransitGatewayPeeringAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21605,10 +21417,9 @@ const de_DeleteTransitGatewayPeeringAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21630,7 +21441,7 @@ export const de_DeleteTransitGatewayPolicyTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21646,10 +21457,9 @@ const de_DeleteTransitGatewayPolicyTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21671,7 +21481,7 @@ export const de_DeleteTransitGatewayPrefixListReferenceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21687,10 +21497,9 @@ const de_DeleteTransitGatewayPrefixListReferenceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21712,7 +21521,7 @@ export const de_DeleteTransitGatewayRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21728,10 +21537,9 @@ const de_DeleteTransitGatewayRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21753,7 +21561,7 @@ export const de_DeleteTransitGatewayRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21769,10 +21577,9 @@ const de_DeleteTransitGatewayRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21794,7 +21601,7 @@ export const de_DeleteTransitGatewayRouteTableAnnouncementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21810,10 +21617,9 @@ const de_DeleteTransitGatewayRouteTableAnnouncementCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21835,7 +21641,7 @@ export const de_DeleteTransitGatewayVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21851,10 +21657,9 @@ const de_DeleteTransitGatewayVpcAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21876,7 +21681,7 @@ export const de_DeleteVerifiedAccessEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21892,10 +21697,9 @@ const de_DeleteVerifiedAccessEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21917,7 +21721,7 @@ export const de_DeleteVerifiedAccessGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21933,10 +21737,9 @@ const de_DeleteVerifiedAccessGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21958,7 +21761,7 @@ export const de_DeleteVerifiedAccessInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -21974,10 +21777,9 @@ const de_DeleteVerifiedAccessInstanceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -21999,7 +21801,7 @@ export const de_DeleteVerifiedAccessTrustProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22015,10 +21817,9 @@ const de_DeleteVerifiedAccessTrustProviderCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22037,7 +21838,7 @@ export const de_DeleteVolumeCommand = async ( const response: DeleteVolumeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -22053,10 +21854,9 @@ const de_DeleteVolumeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22075,7 +21875,7 @@ export const de_DeleteVpcCommand = async ( const response: DeleteVpcCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -22091,10 +21891,9 @@ const de_DeleteVpcCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22116,7 +21915,7 @@ export const de_DeleteVpcEndpointConnectionNotificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22132,10 +21931,9 @@ const de_DeleteVpcEndpointConnectionNotificationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22157,7 +21955,7 @@ export const de_DeleteVpcEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22173,10 +21971,9 @@ const de_DeleteVpcEndpointsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22198,7 +21995,7 @@ export const de_DeleteVpcEndpointServiceConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22214,10 +22011,9 @@ const de_DeleteVpcEndpointServiceConfigurationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22239,7 +22035,7 @@ export const de_DeleteVpcPeeringConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22255,10 +22051,9 @@ const de_DeleteVpcPeeringConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22277,7 +22072,7 @@ export const de_DeleteVpnConnectionCommand = async ( const response: DeleteVpnConnectionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -22293,10 +22088,9 @@ const de_DeleteVpnConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22315,7 +22109,7 @@ export const de_DeleteVpnConnectionRouteCommand = async ( const response: DeleteVpnConnectionRouteCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -22331,10 +22125,9 @@ const de_DeleteVpnConnectionRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22353,7 +22146,7 @@ export const de_DeleteVpnGatewayCommand = async ( const response: DeleteVpnGatewayCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -22369,10 +22162,9 @@ const de_DeleteVpnGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22394,7 +22186,7 @@ export const de_DeprovisionByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22410,10 +22202,9 @@ const de_DeprovisionByoipCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22435,7 +22226,7 @@ export const de_DeprovisionIpamPoolCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22451,10 +22242,9 @@ const de_DeprovisionIpamPoolCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22476,7 +22266,7 @@ export const de_DeprovisionPublicIpv4PoolCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22492,10 +22282,9 @@ const de_DeprovisionPublicIpv4PoolCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22514,7 +22303,7 @@ export const de_DeregisterImageCommand = async ( const response: DeregisterImageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -22530,10 +22319,9 @@ const de_DeregisterImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22555,7 +22343,7 @@ export const de_DeregisterInstanceEventNotificationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22571,10 +22359,9 @@ const de_DeregisterInstanceEventNotificationAttributesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22596,7 +22383,7 @@ export const de_DeregisterTransitGatewayMulticastGroupMembersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22612,10 +22399,9 @@ const de_DeregisterTransitGatewayMulticastGroupMembersCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22637,7 +22423,7 @@ export const de_DeregisterTransitGatewayMulticastGroupSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22653,10 +22439,9 @@ const de_DeregisterTransitGatewayMulticastGroupSourcesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22678,7 +22463,7 @@ export const de_DescribeAccountAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22694,10 +22479,9 @@ const de_DescribeAccountAttributesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22719,7 +22503,7 @@ export const de_DescribeAddressesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22735,10 +22519,9 @@ const de_DescribeAddressesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22760,7 +22543,7 @@ export const de_DescribeAddressesAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22776,10 +22559,9 @@ const de_DescribeAddressesAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22801,7 +22583,7 @@ export const de_DescribeAddressTransfersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22817,10 +22599,9 @@ const de_DescribeAddressTransfersCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22842,7 +22623,7 @@ export const de_DescribeAggregateIdFormatCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22858,10 +22639,9 @@ const de_DescribeAggregateIdFormatCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22883,7 +22663,7 @@ export const de_DescribeAvailabilityZonesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22899,10 +22679,9 @@ const de_DescribeAvailabilityZonesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22924,7 +22703,7 @@ export const de_DescribeAwsNetworkPerformanceMetricSubscriptionsCommand = async $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22940,10 +22719,9 @@ const de_DescribeAwsNetworkPerformanceMetricSubscriptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -22965,7 +22743,7 @@ export const de_DescribeBundleTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -22981,10 +22759,9 @@ const de_DescribeBundleTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23006,7 +22783,7 @@ export const de_DescribeByoipCidrsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23022,10 +22799,9 @@ const de_DescribeByoipCidrsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23047,7 +22823,7 @@ export const de_DescribeCapacityReservationFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23063,10 +22839,9 @@ const de_DescribeCapacityReservationFleetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23088,7 +22863,7 @@ export const de_DescribeCapacityReservationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23104,10 +22879,9 @@ const de_DescribeCapacityReservationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23129,7 +22903,7 @@ export const de_DescribeCarrierGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23145,10 +22919,9 @@ const de_DescribeCarrierGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23170,7 +22943,7 @@ export const de_DescribeClassicLinkInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23186,10 +22959,9 @@ const de_DescribeClassicLinkInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23211,7 +22983,7 @@ export const de_DescribeClientVpnAuthorizationRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23227,10 +22999,9 @@ const de_DescribeClientVpnAuthorizationRulesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23252,7 +23023,7 @@ export const de_DescribeClientVpnConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23268,10 +23039,9 @@ const de_DescribeClientVpnConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23293,7 +23063,7 @@ export const de_DescribeClientVpnEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23309,10 +23079,9 @@ const de_DescribeClientVpnEndpointsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23334,7 +23103,7 @@ export const de_DescribeClientVpnRoutesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23350,10 +23119,9 @@ const de_DescribeClientVpnRoutesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23375,7 +23143,7 @@ export const de_DescribeClientVpnTargetNetworksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23391,10 +23159,9 @@ const de_DescribeClientVpnTargetNetworksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23416,7 +23183,7 @@ export const de_DescribeCoipPoolsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23432,10 +23199,9 @@ const de_DescribeCoipPoolsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23457,7 +23223,7 @@ export const de_DescribeConversionTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23473,10 +23239,9 @@ const de_DescribeConversionTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23498,7 +23263,7 @@ export const de_DescribeCustomerGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23514,10 +23279,9 @@ const de_DescribeCustomerGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23539,7 +23303,7 @@ export const de_DescribeDhcpOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23555,10 +23319,9 @@ const de_DescribeDhcpOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23580,7 +23343,7 @@ export const de_DescribeEgressOnlyInternetGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23596,10 +23359,9 @@ const de_DescribeEgressOnlyInternetGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23621,7 +23383,7 @@ export const de_DescribeElasticGpusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23637,10 +23399,9 @@ const de_DescribeElasticGpusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23662,7 +23423,7 @@ export const de_DescribeExportImageTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23678,10 +23439,9 @@ const de_DescribeExportImageTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23703,7 +23463,7 @@ export const de_DescribeExportTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23719,10 +23479,9 @@ const de_DescribeExportTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23744,7 +23503,7 @@ export const de_DescribeFastLaunchImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23760,10 +23519,9 @@ const de_DescribeFastLaunchImagesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23785,7 +23543,7 @@ export const de_DescribeFastSnapshotRestoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23801,10 +23559,9 @@ const de_DescribeFastSnapshotRestoresCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23826,7 +23583,7 @@ export const de_DescribeFleetHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23842,10 +23599,9 @@ const de_DescribeFleetHistoryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23867,7 +23623,7 @@ export const de_DescribeFleetInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23883,10 +23639,9 @@ const de_DescribeFleetInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23908,7 +23663,7 @@ export const de_DescribeFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23924,10 +23679,9 @@ const de_DescribeFleetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23949,7 +23703,7 @@ export const de_DescribeFlowLogsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -23965,10 +23719,9 @@ const de_DescribeFlowLogsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -23990,7 +23743,7 @@ export const de_DescribeFpgaImageAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24006,10 +23759,9 @@ const de_DescribeFpgaImageAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24031,7 +23783,7 @@ export const de_DescribeFpgaImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24047,10 +23799,9 @@ const de_DescribeFpgaImagesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24072,7 +23823,7 @@ export const de_DescribeHostReservationOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24088,10 +23839,9 @@ const de_DescribeHostReservationOfferingsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24113,7 +23863,7 @@ export const de_DescribeHostReservationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24129,10 +23879,9 @@ const de_DescribeHostReservationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24154,7 +23903,7 @@ export const de_DescribeHostsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24170,10 +23919,9 @@ const de_DescribeHostsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24195,7 +23943,7 @@ export const de_DescribeIamInstanceProfileAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24211,10 +23959,9 @@ const de_DescribeIamInstanceProfileAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24236,7 +23983,7 @@ export const de_DescribeIdentityIdFormatCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24252,10 +23999,9 @@ const de_DescribeIdentityIdFormatCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24277,7 +24023,7 @@ export const de_DescribeIdFormatCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24293,10 +24039,9 @@ const de_DescribeIdFormatCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24318,7 +24063,7 @@ export const de_DescribeImageAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24334,10 +24079,9 @@ const de_DescribeImageAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24359,7 +24103,7 @@ export const de_DescribeImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24375,10 +24119,9 @@ const de_DescribeImagesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24400,7 +24143,7 @@ export const de_DescribeImportImageTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24416,10 +24159,9 @@ const de_DescribeImportImageTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24441,7 +24183,7 @@ export const de_DescribeImportSnapshotTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24457,10 +24199,9 @@ const de_DescribeImportSnapshotTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24482,7 +24223,7 @@ export const de_DescribeInstanceAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24498,10 +24239,9 @@ const de_DescribeInstanceAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24523,7 +24263,7 @@ export const de_DescribeInstanceCreditSpecificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24539,10 +24279,9 @@ const de_DescribeInstanceCreditSpecificationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24564,7 +24303,7 @@ export const de_DescribeInstanceEventNotificationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24580,10 +24319,9 @@ const de_DescribeInstanceEventNotificationAttributesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24605,7 +24343,7 @@ export const de_DescribeInstanceEventWindowsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24621,10 +24359,9 @@ const de_DescribeInstanceEventWindowsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24646,7 +24383,7 @@ export const de_DescribeInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24662,10 +24399,9 @@ const de_DescribeInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24687,7 +24423,7 @@ export const de_DescribeInstanceStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24703,10 +24439,9 @@ const de_DescribeInstanceStatusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24728,7 +24463,7 @@ export const de_DescribeInstanceTypeOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24744,10 +24479,9 @@ const de_DescribeInstanceTypeOfferingsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24769,7 +24503,7 @@ export const de_DescribeInstanceTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24785,10 +24519,9 @@ const de_DescribeInstanceTypesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24810,7 +24543,7 @@ export const de_DescribeInternetGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24826,10 +24559,9 @@ const de_DescribeInternetGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24851,7 +24583,7 @@ export const de_DescribeIpamPoolsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24867,10 +24599,9 @@ const de_DescribeIpamPoolsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24892,7 +24623,7 @@ export const de_DescribeIpamResourceDiscoveriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24908,10 +24639,9 @@ const de_DescribeIpamResourceDiscoveriesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24933,7 +24663,7 @@ export const de_DescribeIpamResourceDiscoveryAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24949,10 +24679,9 @@ const de_DescribeIpamResourceDiscoveryAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -24974,7 +24703,7 @@ export const de_DescribeIpamsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -24990,10 +24719,9 @@ const de_DescribeIpamsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25015,7 +24743,7 @@ export const de_DescribeIpamScopesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25031,10 +24759,9 @@ const de_DescribeIpamScopesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25056,7 +24783,7 @@ export const de_DescribeIpv6PoolsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25072,10 +24799,9 @@ const de_DescribeIpv6PoolsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25097,7 +24823,7 @@ export const de_DescribeKeyPairsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25113,10 +24839,9 @@ const de_DescribeKeyPairsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25138,7 +24863,7 @@ export const de_DescribeLaunchTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25154,10 +24879,9 @@ const de_DescribeLaunchTemplatesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25179,7 +24903,7 @@ export const de_DescribeLaunchTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25195,10 +24919,9 @@ const de_DescribeLaunchTemplateVersionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25220,7 +24943,7 @@ export const de_DescribeLocalGatewayRouteTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25236,10 +24959,9 @@ const de_DescribeLocalGatewayRouteTablesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25261,7 +24983,7 @@ export const de_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsC $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25277,10 +24999,9 @@ const de_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsCommandE }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25302,7 +25023,7 @@ export const de_DescribeLocalGatewayRouteTableVpcAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25318,10 +25039,9 @@ const de_DescribeLocalGatewayRouteTableVpcAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25343,7 +25063,7 @@ export const de_DescribeLocalGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25359,10 +25079,9 @@ const de_DescribeLocalGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25384,7 +25103,7 @@ export const de_DescribeLocalGatewayVirtualInterfaceGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25400,10 +25119,9 @@ const de_DescribeLocalGatewayVirtualInterfaceGroupsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25425,7 +25143,7 @@ export const de_DescribeLocalGatewayVirtualInterfacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25441,10 +25159,9 @@ const de_DescribeLocalGatewayVirtualInterfacesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25466,7 +25183,7 @@ export const de_DescribeManagedPrefixListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25482,10 +25199,9 @@ const de_DescribeManagedPrefixListsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25507,7 +25223,7 @@ export const de_DescribeMovingAddressesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25523,10 +25239,9 @@ const de_DescribeMovingAddressesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25548,7 +25263,7 @@ export const de_DescribeNatGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25564,10 +25279,9 @@ const de_DescribeNatGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25589,7 +25303,7 @@ export const de_DescribeNetworkAclsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25605,10 +25319,9 @@ const de_DescribeNetworkAclsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25630,7 +25343,7 @@ export const de_DescribeNetworkInsightsAccessScopeAnalysesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25646,10 +25359,9 @@ const de_DescribeNetworkInsightsAccessScopeAnalysesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25671,7 +25383,7 @@ export const de_DescribeNetworkInsightsAccessScopesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25687,10 +25399,9 @@ const de_DescribeNetworkInsightsAccessScopesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25712,7 +25423,7 @@ export const de_DescribeNetworkInsightsAnalysesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25728,10 +25439,9 @@ const de_DescribeNetworkInsightsAnalysesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25753,7 +25463,7 @@ export const de_DescribeNetworkInsightsPathsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25769,10 +25479,9 @@ const de_DescribeNetworkInsightsPathsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25794,7 +25503,7 @@ export const de_DescribeNetworkInterfaceAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25810,10 +25519,9 @@ const de_DescribeNetworkInterfaceAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25835,7 +25543,7 @@ export const de_DescribeNetworkInterfacePermissionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25851,10 +25559,9 @@ const de_DescribeNetworkInterfacePermissionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25876,7 +25583,7 @@ export const de_DescribeNetworkInterfacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25892,10 +25599,9 @@ const de_DescribeNetworkInterfacesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25917,7 +25623,7 @@ export const de_DescribePlacementGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25933,10 +25639,9 @@ const de_DescribePlacementGroupsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25958,7 +25663,7 @@ export const de_DescribePrefixListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -25974,10 +25679,9 @@ const de_DescribePrefixListsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -25999,7 +25703,7 @@ export const de_DescribePrincipalIdFormatCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26015,10 +25719,9 @@ const de_DescribePrincipalIdFormatCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26040,7 +25743,7 @@ export const de_DescribePublicIpv4PoolsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26056,10 +25759,9 @@ const de_DescribePublicIpv4PoolsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26081,7 +25783,7 @@ export const de_DescribeRegionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26097,10 +25799,9 @@ const de_DescribeRegionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26122,7 +25823,7 @@ export const de_DescribeReplaceRootVolumeTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26138,10 +25839,9 @@ const de_DescribeReplaceRootVolumeTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26163,7 +25863,7 @@ export const de_DescribeReservedInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26179,10 +25879,9 @@ const de_DescribeReservedInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26204,7 +25903,7 @@ export const de_DescribeReservedInstancesListingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26220,10 +25919,9 @@ const de_DescribeReservedInstancesListingsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26245,7 +25943,7 @@ export const de_DescribeReservedInstancesModificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26261,10 +25959,9 @@ const de_DescribeReservedInstancesModificationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26286,7 +25983,7 @@ export const de_DescribeReservedInstancesOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26302,10 +25999,9 @@ const de_DescribeReservedInstancesOfferingsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26327,7 +26023,7 @@ export const de_DescribeRouteTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26343,10 +26039,9 @@ const de_DescribeRouteTablesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26368,7 +26063,7 @@ export const de_DescribeScheduledInstanceAvailabilityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26384,10 +26079,9 @@ const de_DescribeScheduledInstanceAvailabilityCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26409,7 +26103,7 @@ export const de_DescribeScheduledInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26425,10 +26119,9 @@ const de_DescribeScheduledInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26450,7 +26143,7 @@ export const de_DescribeSecurityGroupReferencesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26466,10 +26159,9 @@ const de_DescribeSecurityGroupReferencesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26491,7 +26183,7 @@ export const de_DescribeSecurityGroupRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26507,10 +26199,9 @@ const de_DescribeSecurityGroupRulesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26532,7 +26223,7 @@ export const de_DescribeSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26548,10 +26239,9 @@ const de_DescribeSecurityGroupsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26573,7 +26263,7 @@ export const de_DescribeSnapshotAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26589,10 +26279,9 @@ const de_DescribeSnapshotAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26614,7 +26303,7 @@ export const de_DescribeSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26630,10 +26319,9 @@ const de_DescribeSnapshotsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26655,7 +26343,7 @@ export const de_DescribeSnapshotTierStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26671,10 +26359,9 @@ const de_DescribeSnapshotTierStatusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26696,7 +26383,7 @@ export const de_DescribeSpotDatafeedSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26712,10 +26399,9 @@ const de_DescribeSpotDatafeedSubscriptionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26737,7 +26423,7 @@ export const de_DescribeSpotFleetInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26753,10 +26439,9 @@ const de_DescribeSpotFleetInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26778,7 +26463,7 @@ export const de_DescribeSpotFleetRequestHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26794,10 +26479,9 @@ const de_DescribeSpotFleetRequestHistoryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26819,7 +26503,7 @@ export const de_DescribeSpotFleetRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26835,10 +26519,9 @@ const de_DescribeSpotFleetRequestsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26860,7 +26543,7 @@ export const de_DescribeSpotInstanceRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26876,10 +26559,9 @@ const de_DescribeSpotInstanceRequestsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26901,7 +26583,7 @@ export const de_DescribeSpotPriceHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26917,10 +26599,9 @@ const de_DescribeSpotPriceHistoryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26942,7 +26623,7 @@ export const de_DescribeStaleSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26958,10 +26639,9 @@ const de_DescribeStaleSecurityGroupsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -26983,7 +26663,7 @@ export const de_DescribeStoreImageTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -26999,10 +26679,9 @@ const de_DescribeStoreImageTasksCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27024,7 +26703,7 @@ export const de_DescribeSubnetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27040,10 +26719,9 @@ const de_DescribeSubnetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27065,7 +26743,7 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27081,10 +26759,9 @@ const de_DescribeTagsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27106,7 +26783,7 @@ export const de_DescribeTrafficMirrorFiltersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27122,10 +26799,9 @@ const de_DescribeTrafficMirrorFiltersCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27147,7 +26823,7 @@ export const de_DescribeTrafficMirrorSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27163,10 +26839,9 @@ const de_DescribeTrafficMirrorSessionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27188,7 +26863,7 @@ export const de_DescribeTrafficMirrorTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27204,10 +26879,9 @@ const de_DescribeTrafficMirrorTargetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27229,7 +26903,7 @@ export const de_DescribeTransitGatewayAttachmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27245,10 +26919,9 @@ const de_DescribeTransitGatewayAttachmentsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27270,7 +26943,7 @@ export const de_DescribeTransitGatewayConnectPeersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27286,10 +26959,9 @@ const de_DescribeTransitGatewayConnectPeersCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27311,7 +26983,7 @@ export const de_DescribeTransitGatewayConnectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27327,10 +26999,9 @@ const de_DescribeTransitGatewayConnectsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27352,7 +27023,7 @@ export const de_DescribeTransitGatewayMulticastDomainsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27368,10 +27039,9 @@ const de_DescribeTransitGatewayMulticastDomainsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27393,7 +27063,7 @@ export const de_DescribeTransitGatewayPeeringAttachmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27409,10 +27079,9 @@ const de_DescribeTransitGatewayPeeringAttachmentsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27434,7 +27103,7 @@ export const de_DescribeTransitGatewayPolicyTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27450,10 +27119,9 @@ const de_DescribeTransitGatewayPolicyTablesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27475,7 +27143,7 @@ export const de_DescribeTransitGatewayRouteTableAnnouncementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27491,10 +27159,9 @@ const de_DescribeTransitGatewayRouteTableAnnouncementsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27516,7 +27183,7 @@ export const de_DescribeTransitGatewayRouteTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27532,10 +27199,9 @@ const de_DescribeTransitGatewayRouteTablesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27557,7 +27223,7 @@ export const de_DescribeTransitGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27573,10 +27239,9 @@ const de_DescribeTransitGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27598,7 +27263,7 @@ export const de_DescribeTransitGatewayVpcAttachmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27614,10 +27279,9 @@ const de_DescribeTransitGatewayVpcAttachmentsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27639,7 +27303,7 @@ export const de_DescribeTrunkInterfaceAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27655,10 +27319,9 @@ const de_DescribeTrunkInterfaceAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27680,7 +27343,7 @@ export const de_DescribeVerifiedAccessEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27696,10 +27359,9 @@ const de_DescribeVerifiedAccessEndpointsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27721,7 +27383,7 @@ export const de_DescribeVerifiedAccessGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27737,10 +27399,9 @@ const de_DescribeVerifiedAccessGroupsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27762,7 +27423,7 @@ export const de_DescribeVerifiedAccessInstanceLoggingConfigurationsCommand = asy $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27778,10 +27439,9 @@ const de_DescribeVerifiedAccessInstanceLoggingConfigurationsCommandError = async }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27803,7 +27463,7 @@ export const de_DescribeVerifiedAccessInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27819,10 +27479,9 @@ const de_DescribeVerifiedAccessInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27844,7 +27503,7 @@ export const de_DescribeVerifiedAccessTrustProvidersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27860,10 +27519,9 @@ const de_DescribeVerifiedAccessTrustProvidersCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27885,7 +27543,7 @@ export const de_DescribeVolumeAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27901,10 +27559,9 @@ const de_DescribeVolumeAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27926,7 +27583,7 @@ export const de_DescribeVolumesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27942,10 +27599,9 @@ const de_DescribeVolumesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -27967,7 +27623,7 @@ export const de_DescribeVolumesModificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -27983,10 +27639,9 @@ const de_DescribeVolumesModificationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28008,7 +27663,7 @@ export const de_DescribeVolumeStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28024,10 +27679,9 @@ const de_DescribeVolumeStatusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28049,7 +27703,7 @@ export const de_DescribeVpcAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28065,10 +27719,9 @@ const de_DescribeVpcAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28090,7 +27743,7 @@ export const de_DescribeVpcClassicLinkCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28106,10 +27759,9 @@ const de_DescribeVpcClassicLinkCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28131,7 +27783,7 @@ export const de_DescribeVpcClassicLinkDnsSupportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28147,10 +27799,9 @@ const de_DescribeVpcClassicLinkDnsSupportCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28172,7 +27823,7 @@ export const de_DescribeVpcEndpointConnectionNotificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28188,10 +27839,9 @@ const de_DescribeVpcEndpointConnectionNotificationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28213,7 +27863,7 @@ export const de_DescribeVpcEndpointConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28229,10 +27879,9 @@ const de_DescribeVpcEndpointConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28254,7 +27903,7 @@ export const de_DescribeVpcEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28270,10 +27919,9 @@ const de_DescribeVpcEndpointsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28295,7 +27943,7 @@ export const de_DescribeVpcEndpointServiceConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28311,10 +27959,9 @@ const de_DescribeVpcEndpointServiceConfigurationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28336,7 +27983,7 @@ export const de_DescribeVpcEndpointServicePermissionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28352,10 +27999,9 @@ const de_DescribeVpcEndpointServicePermissionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28377,7 +28023,7 @@ export const de_DescribeVpcEndpointServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28393,10 +28039,9 @@ const de_DescribeVpcEndpointServicesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28418,7 +28063,7 @@ export const de_DescribeVpcPeeringConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28434,10 +28079,9 @@ const de_DescribeVpcPeeringConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28459,7 +28103,7 @@ export const de_DescribeVpcsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28475,10 +28119,9 @@ const de_DescribeVpcsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28500,7 +28143,7 @@ export const de_DescribeVpnConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28516,10 +28159,9 @@ const de_DescribeVpnConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28541,7 +28183,7 @@ export const de_DescribeVpnGatewaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28557,10 +28199,9 @@ const de_DescribeVpnGatewaysCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28582,7 +28223,7 @@ export const de_DetachClassicLinkVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28598,10 +28239,9 @@ const de_DetachClassicLinkVpcCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28620,7 +28260,7 @@ export const de_DetachInternetGatewayCommand = async ( const response: DetachInternetGatewayCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -28636,10 +28276,9 @@ const de_DetachInternetGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28658,7 +28297,7 @@ export const de_DetachNetworkInterfaceCommand = async ( const response: DetachNetworkInterfaceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -28674,10 +28313,9 @@ const de_DetachNetworkInterfaceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28699,7 +28337,7 @@ export const de_DetachVerifiedAccessTrustProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28715,10 +28353,9 @@ const de_DetachVerifiedAccessTrustProviderCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28740,7 +28377,7 @@ export const de_DetachVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28756,10 +28393,9 @@ const de_DetachVolumeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28778,7 +28414,7 @@ export const de_DetachVpnGatewayCommand = async ( const response: DetachVpnGatewayCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -28794,10 +28430,9 @@ const de_DetachVpnGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28819,7 +28454,7 @@ export const de_DisableAddressTransferCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28835,10 +28470,9 @@ const de_DisableAddressTransferCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28860,7 +28494,7 @@ export const de_DisableAwsNetworkPerformanceMetricSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28876,10 +28510,9 @@ const de_DisableAwsNetworkPerformanceMetricSubscriptionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28901,7 +28534,7 @@ export const de_DisableEbsEncryptionByDefaultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28917,10 +28550,9 @@ const de_DisableEbsEncryptionByDefaultCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28942,7 +28574,7 @@ export const de_DisableFastLaunchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28958,10 +28590,9 @@ const de_DisableFastLaunchCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -28983,7 +28614,7 @@ export const de_DisableFastSnapshotRestoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -28999,10 +28630,9 @@ const de_DisableFastSnapshotRestoresCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29024,7 +28654,7 @@ export const de_DisableImageDeprecationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29040,10 +28670,9 @@ const de_DisableImageDeprecationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29065,7 +28694,7 @@ export const de_DisableIpamOrganizationAdminAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29081,10 +28710,9 @@ const de_DisableIpamOrganizationAdminAccountCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29106,7 +28734,7 @@ export const de_DisableSerialConsoleAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29122,10 +28750,9 @@ const de_DisableSerialConsoleAccessCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29147,7 +28774,7 @@ export const de_DisableTransitGatewayRouteTablePropagationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29163,10 +28790,9 @@ const de_DisableTransitGatewayRouteTablePropagationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29185,7 +28811,7 @@ export const de_DisableVgwRoutePropagationCommand = async ( const response: DisableVgwRoutePropagationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -29201,10 +28827,9 @@ const de_DisableVgwRoutePropagationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29226,7 +28851,7 @@ export const de_DisableVpcClassicLinkCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29242,10 +28867,9 @@ const de_DisableVpcClassicLinkCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29267,7 +28891,7 @@ export const de_DisableVpcClassicLinkDnsSupportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29283,10 +28907,9 @@ const de_DisableVpcClassicLinkDnsSupportCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29305,7 +28928,7 @@ export const de_DisassociateAddressCommand = async ( const response: DisassociateAddressCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -29321,10 +28944,9 @@ const de_DisassociateAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29346,7 +28968,7 @@ export const de_DisassociateClientVpnTargetNetworkCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29362,10 +28984,9 @@ const de_DisassociateClientVpnTargetNetworkCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29387,7 +29008,7 @@ export const de_DisassociateEnclaveCertificateIamRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29403,10 +29024,9 @@ const de_DisassociateEnclaveCertificateIamRoleCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29428,7 +29048,7 @@ export const de_DisassociateIamInstanceProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29444,10 +29064,9 @@ const de_DisassociateIamInstanceProfileCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29469,7 +29088,7 @@ export const de_DisassociateInstanceEventWindowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29485,10 +29104,9 @@ const de_DisassociateInstanceEventWindowCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29510,7 +29128,7 @@ export const de_DisassociateIpamResourceDiscoveryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29526,10 +29144,9 @@ const de_DisassociateIpamResourceDiscoveryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29551,7 +29168,7 @@ export const de_DisassociateNatGatewayAddressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29567,10 +29184,9 @@ const de_DisassociateNatGatewayAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29589,7 +29205,7 @@ export const de_DisassociateRouteTableCommand = async ( const response: DisassociateRouteTableCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -29605,10 +29221,9 @@ const de_DisassociateRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29630,7 +29245,7 @@ export const de_DisassociateSubnetCidrBlockCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29646,10 +29261,9 @@ const de_DisassociateSubnetCidrBlockCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29671,7 +29285,7 @@ export const de_DisassociateTransitGatewayMulticastDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29687,10 +29301,9 @@ const de_DisassociateTransitGatewayMulticastDomainCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29712,7 +29325,7 @@ export const de_DisassociateTransitGatewayPolicyTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29728,10 +29341,9 @@ const de_DisassociateTransitGatewayPolicyTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29753,7 +29365,7 @@ export const de_DisassociateTransitGatewayRouteTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29769,10 +29381,9 @@ const de_DisassociateTransitGatewayRouteTableCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29794,7 +29405,7 @@ export const de_DisassociateTrunkInterfaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29810,10 +29421,9 @@ const de_DisassociateTrunkInterfaceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29835,7 +29445,7 @@ export const de_DisassociateVpcCidrBlockCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29851,10 +29461,9 @@ const de_DisassociateVpcCidrBlockCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29876,7 +29485,7 @@ export const de_EnableAddressTransferCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29892,10 +29501,9 @@ const de_EnableAddressTransferCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29917,7 +29525,7 @@ export const de_EnableAwsNetworkPerformanceMetricSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29933,10 +29541,9 @@ const de_EnableAwsNetworkPerformanceMetricSubscriptionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29958,7 +29565,7 @@ export const de_EnableEbsEncryptionByDefaultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -29974,10 +29581,9 @@ const de_EnableEbsEncryptionByDefaultCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -29999,7 +29605,7 @@ export const de_EnableFastLaunchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30015,10 +29621,9 @@ const de_EnableFastLaunchCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30040,7 +29645,7 @@ export const de_EnableFastSnapshotRestoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30056,10 +29661,9 @@ const de_EnableFastSnapshotRestoresCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30081,7 +29685,7 @@ export const de_EnableImageDeprecationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30097,10 +29701,9 @@ const de_EnableImageDeprecationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30122,7 +29725,7 @@ export const de_EnableIpamOrganizationAdminAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30138,10 +29741,9 @@ const de_EnableIpamOrganizationAdminAccountCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30163,7 +29765,7 @@ export const de_EnableReachabilityAnalyzerOrganizationSharingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30179,10 +29781,9 @@ const de_EnableReachabilityAnalyzerOrganizationSharingCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30204,7 +29805,7 @@ export const de_EnableSerialConsoleAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30220,10 +29821,9 @@ const de_EnableSerialConsoleAccessCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30245,7 +29845,7 @@ export const de_EnableTransitGatewayRouteTablePropagationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30261,10 +29861,9 @@ const de_EnableTransitGatewayRouteTablePropagationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30283,7 +29882,7 @@ export const de_EnableVgwRoutePropagationCommand = async ( const response: EnableVgwRoutePropagationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -30299,10 +29898,9 @@ const de_EnableVgwRoutePropagationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30321,7 +29919,7 @@ export const de_EnableVolumeIOCommand = async ( const response: EnableVolumeIOCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -30337,10 +29935,9 @@ const de_EnableVolumeIOCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30362,7 +29959,7 @@ export const de_EnableVpcClassicLinkCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30378,10 +29975,9 @@ const de_EnableVpcClassicLinkCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30403,7 +29999,7 @@ export const de_EnableVpcClassicLinkDnsSupportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30419,10 +30015,9 @@ const de_EnableVpcClassicLinkDnsSupportCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30444,7 +30039,7 @@ export const de_ExportClientVpnClientCertificateRevocationListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30460,10 +30055,9 @@ const de_ExportClientVpnClientCertificateRevocationListCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30485,7 +30079,7 @@ export const de_ExportClientVpnClientConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30501,10 +30095,9 @@ const de_ExportClientVpnClientConfigurationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30526,7 +30119,7 @@ export const de_ExportImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30542,10 +30135,9 @@ const de_ExportImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30567,7 +30159,7 @@ export const de_ExportTransitGatewayRoutesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30583,10 +30175,9 @@ const de_ExportTransitGatewayRoutesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30608,7 +30199,7 @@ export const de_GetAssociatedEnclaveCertificateIamRolesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30624,10 +30215,9 @@ const de_GetAssociatedEnclaveCertificateIamRolesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30649,7 +30239,7 @@ export const de_GetAssociatedIpv6PoolCidrsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30665,10 +30255,9 @@ const de_GetAssociatedIpv6PoolCidrsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30690,7 +30279,7 @@ export const de_GetAwsNetworkPerformanceDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30706,10 +30295,9 @@ const de_GetAwsNetworkPerformanceDataCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30731,7 +30319,7 @@ export const de_GetCapacityReservationUsageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30747,10 +30335,9 @@ const de_GetCapacityReservationUsageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30772,7 +30359,7 @@ export const de_GetCoipPoolUsageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30788,10 +30375,9 @@ const de_GetCoipPoolUsageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30813,7 +30399,7 @@ export const de_GetConsoleOutputCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30829,10 +30415,9 @@ const de_GetConsoleOutputCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30854,7 +30439,7 @@ export const de_GetConsoleScreenshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30870,10 +30455,9 @@ const de_GetConsoleScreenshotCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30895,7 +30479,7 @@ export const de_GetDefaultCreditSpecificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30911,10 +30495,9 @@ const de_GetDefaultCreditSpecificationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30936,7 +30519,7 @@ export const de_GetEbsDefaultKmsKeyIdCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30952,10 +30535,9 @@ const de_GetEbsDefaultKmsKeyIdCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -30977,7 +30559,7 @@ export const de_GetEbsEncryptionByDefaultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -30993,10 +30575,9 @@ const de_GetEbsEncryptionByDefaultCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31018,7 +30599,7 @@ export const de_GetFlowLogsIntegrationTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31034,10 +30615,9 @@ const de_GetFlowLogsIntegrationTemplateCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31059,7 +30639,7 @@ export const de_GetGroupsForCapacityReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31075,10 +30655,9 @@ const de_GetGroupsForCapacityReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31100,7 +30679,7 @@ export const de_GetHostReservationPurchasePreviewCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31116,10 +30695,9 @@ const de_GetHostReservationPurchasePreviewCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31141,7 +30719,7 @@ export const de_GetInstanceTypesFromInstanceRequirementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31157,10 +30735,9 @@ const de_GetInstanceTypesFromInstanceRequirementsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31182,7 +30759,7 @@ export const de_GetInstanceUefiDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31198,10 +30775,9 @@ const de_GetInstanceUefiDataCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31223,7 +30799,7 @@ export const de_GetIpamAddressHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31239,10 +30815,9 @@ const de_GetIpamAddressHistoryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31264,7 +30839,7 @@ export const de_GetIpamDiscoveredAccountsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31280,10 +30855,9 @@ const de_GetIpamDiscoveredAccountsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31305,7 +30879,7 @@ export const de_GetIpamDiscoveredResourceCidrsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31321,10 +30895,9 @@ const de_GetIpamDiscoveredResourceCidrsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31346,7 +30919,7 @@ export const de_GetIpamPoolAllocationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31362,10 +30935,9 @@ const de_GetIpamPoolAllocationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31387,7 +30959,7 @@ export const de_GetIpamPoolCidrsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31403,10 +30975,9 @@ const de_GetIpamPoolCidrsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31428,7 +30999,7 @@ export const de_GetIpamResourceCidrsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31444,10 +31015,9 @@ const de_GetIpamResourceCidrsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31469,7 +31039,7 @@ export const de_GetLaunchTemplateDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31485,10 +31055,9 @@ const de_GetLaunchTemplateDataCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31510,7 +31079,7 @@ export const de_GetManagedPrefixListAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31526,10 +31095,9 @@ const de_GetManagedPrefixListAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31551,7 +31119,7 @@ export const de_GetManagedPrefixListEntriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31567,10 +31135,9 @@ const de_GetManagedPrefixListEntriesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31592,7 +31159,7 @@ export const de_GetNetworkInsightsAccessScopeAnalysisFindingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31608,10 +31175,9 @@ const de_GetNetworkInsightsAccessScopeAnalysisFindingsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31633,7 +31199,7 @@ export const de_GetNetworkInsightsAccessScopeContentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31649,10 +31215,9 @@ const de_GetNetworkInsightsAccessScopeContentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31674,7 +31239,7 @@ export const de_GetPasswordDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31690,10 +31255,9 @@ const de_GetPasswordDataCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31715,7 +31279,7 @@ export const de_GetReservedInstancesExchangeQuoteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31731,10 +31295,9 @@ const de_GetReservedInstancesExchangeQuoteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31756,7 +31319,7 @@ export const de_GetSerialConsoleAccessStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31772,10 +31335,9 @@ const de_GetSerialConsoleAccessStatusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31797,7 +31359,7 @@ export const de_GetSpotPlacementScoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31813,10 +31375,9 @@ const de_GetSpotPlacementScoresCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31838,7 +31399,7 @@ export const de_GetSubnetCidrReservationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31854,10 +31415,9 @@ const de_GetSubnetCidrReservationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31879,7 +31439,7 @@ export const de_GetTransitGatewayAttachmentPropagationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31895,10 +31455,9 @@ const de_GetTransitGatewayAttachmentPropagationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31920,7 +31479,7 @@ export const de_GetTransitGatewayMulticastDomainAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31936,10 +31495,9 @@ const de_GetTransitGatewayMulticastDomainAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -31961,7 +31519,7 @@ export const de_GetTransitGatewayPolicyTableAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -31977,10 +31535,9 @@ const de_GetTransitGatewayPolicyTableAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32002,7 +31559,7 @@ export const de_GetTransitGatewayPolicyTableEntriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32018,10 +31575,9 @@ const de_GetTransitGatewayPolicyTableEntriesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32043,7 +31599,7 @@ export const de_GetTransitGatewayPrefixListReferencesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32059,10 +31615,9 @@ const de_GetTransitGatewayPrefixListReferencesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32084,7 +31639,7 @@ export const de_GetTransitGatewayRouteTableAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32100,10 +31655,9 @@ const de_GetTransitGatewayRouteTableAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32125,7 +31679,7 @@ export const de_GetTransitGatewayRouteTablePropagationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32141,10 +31695,9 @@ const de_GetTransitGatewayRouteTablePropagationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32166,7 +31719,7 @@ export const de_GetVerifiedAccessEndpointPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32182,10 +31735,9 @@ const de_GetVerifiedAccessEndpointPolicyCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32207,7 +31759,7 @@ export const de_GetVerifiedAccessGroupPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32223,10 +31775,9 @@ const de_GetVerifiedAccessGroupPolicyCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32248,7 +31799,7 @@ export const de_GetVpnConnectionDeviceSampleConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32264,10 +31815,9 @@ const de_GetVpnConnectionDeviceSampleConfigurationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32289,7 +31839,7 @@ export const de_GetVpnConnectionDeviceTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32305,10 +31855,9 @@ const de_GetVpnConnectionDeviceTypesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32330,7 +31879,7 @@ export const de_GetVpnTunnelReplacementStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32346,10 +31895,9 @@ const de_GetVpnTunnelReplacementStatusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32371,7 +31919,7 @@ export const de_ImportClientVpnClientCertificateRevocationListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32387,10 +31935,9 @@ const de_ImportClientVpnClientCertificateRevocationListCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32412,7 +31959,7 @@ export const de_ImportImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32428,10 +31975,9 @@ const de_ImportImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32453,7 +31999,7 @@ export const de_ImportInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32469,10 +32015,9 @@ const de_ImportInstanceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32494,7 +32039,7 @@ export const de_ImportKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32510,10 +32055,9 @@ const de_ImportKeyPairCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32535,7 +32079,7 @@ export const de_ImportSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32551,10 +32095,9 @@ const de_ImportSnapshotCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32576,7 +32119,7 @@ export const de_ImportVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32592,10 +32135,9 @@ const de_ImportVolumeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32617,7 +32159,7 @@ export const de_ListImagesInRecycleBinCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32633,10 +32175,9 @@ const de_ListImagesInRecycleBinCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32658,7 +32199,7 @@ export const de_ListSnapshotsInRecycleBinCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32674,10 +32215,9 @@ const de_ListSnapshotsInRecycleBinCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32699,7 +32239,7 @@ export const de_ModifyAddressAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32715,10 +32255,9 @@ const de_ModifyAddressAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32740,7 +32279,7 @@ export const de_ModifyAvailabilityZoneGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32756,10 +32295,9 @@ const de_ModifyAvailabilityZoneGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32781,7 +32319,7 @@ export const de_ModifyCapacityReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32797,10 +32335,9 @@ const de_ModifyCapacityReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32822,7 +32359,7 @@ export const de_ModifyCapacityReservationFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32838,10 +32375,9 @@ const de_ModifyCapacityReservationFleetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32863,7 +32399,7 @@ export const de_ModifyClientVpnEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32879,10 +32415,9 @@ const de_ModifyClientVpnEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32904,7 +32439,7 @@ export const de_ModifyDefaultCreditSpecificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32920,10 +32455,9 @@ const de_ModifyDefaultCreditSpecificationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32945,7 +32479,7 @@ export const de_ModifyEbsDefaultKmsKeyIdCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -32961,10 +32495,9 @@ const de_ModifyEbsDefaultKmsKeyIdCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -32986,7 +32519,7 @@ export const de_ModifyFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33002,10 +32535,9 @@ const de_ModifyFleetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33027,7 +32559,7 @@ export const de_ModifyFpgaImageAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33043,10 +32575,9 @@ const de_ModifyFpgaImageAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33068,7 +32599,7 @@ export const de_ModifyHostsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33084,10 +32615,9 @@ const de_ModifyHostsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33106,7 +32636,7 @@ export const de_ModifyIdentityIdFormatCommand = async ( const response: ModifyIdentityIdFormatCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -33122,10 +32652,9 @@ const de_ModifyIdentityIdFormatCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33144,7 +32673,7 @@ export const de_ModifyIdFormatCommand = async ( const response: ModifyIdFormatCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -33160,10 +32689,9 @@ const de_ModifyIdFormatCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33182,7 +32710,7 @@ export const de_ModifyImageAttributeCommand = async ( const response: ModifyImageAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -33198,10 +32726,9 @@ const de_ModifyImageAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33220,7 +32747,7 @@ export const de_ModifyInstanceAttributeCommand = async ( const response: ModifyInstanceAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -33236,10 +32763,9 @@ const de_ModifyInstanceAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33261,7 +32787,7 @@ export const de_ModifyInstanceCapacityReservationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33277,10 +32803,9 @@ const de_ModifyInstanceCapacityReservationAttributesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33302,7 +32827,7 @@ export const de_ModifyInstanceCreditSpecificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33318,10 +32843,9 @@ const de_ModifyInstanceCreditSpecificationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33343,7 +32867,7 @@ export const de_ModifyInstanceEventStartTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33359,10 +32883,9 @@ const de_ModifyInstanceEventStartTimeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33384,7 +32907,7 @@ export const de_ModifyInstanceEventWindowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33400,10 +32923,9 @@ const de_ModifyInstanceEventWindowCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33425,7 +32947,7 @@ export const de_ModifyInstanceMaintenanceOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33441,10 +32963,9 @@ const de_ModifyInstanceMaintenanceOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33466,7 +32987,7 @@ export const de_ModifyInstanceMetadataOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33482,10 +33003,9 @@ const de_ModifyInstanceMetadataOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33507,7 +33027,7 @@ export const de_ModifyInstancePlacementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33523,10 +33043,9 @@ const de_ModifyInstancePlacementCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33548,7 +33067,7 @@ export const de_ModifyIpamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33564,10 +33083,9 @@ const de_ModifyIpamCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33589,7 +33107,7 @@ export const de_ModifyIpamPoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33605,10 +33123,9 @@ const de_ModifyIpamPoolCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33630,7 +33147,7 @@ export const de_ModifyIpamResourceCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33646,10 +33163,9 @@ const de_ModifyIpamResourceCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33671,7 +33187,7 @@ export const de_ModifyIpamResourceDiscoveryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33687,10 +33203,9 @@ const de_ModifyIpamResourceDiscoveryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33712,7 +33227,7 @@ export const de_ModifyIpamScopeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33728,10 +33243,9 @@ const de_ModifyIpamScopeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33753,7 +33267,7 @@ export const de_ModifyLaunchTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33769,10 +33283,9 @@ const de_ModifyLaunchTemplateCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33794,7 +33307,7 @@ export const de_ModifyLocalGatewayRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33810,10 +33323,9 @@ const de_ModifyLocalGatewayRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33835,7 +33347,7 @@ export const de_ModifyManagedPrefixListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33851,10 +33363,9 @@ const de_ModifyManagedPrefixListCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33873,7 +33384,7 @@ export const de_ModifyNetworkInterfaceAttributeCommand = async ( const response: ModifyNetworkInterfaceAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -33889,10 +33400,9 @@ const de_ModifyNetworkInterfaceAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33914,7 +33424,7 @@ export const de_ModifyPrivateDnsNameOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33930,10 +33440,9 @@ const de_ModifyPrivateDnsNameOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33955,7 +33464,7 @@ export const de_ModifyReservedInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -33971,10 +33480,9 @@ const de_ModifyReservedInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -33996,7 +33504,7 @@ export const de_ModifySecurityGroupRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34012,10 +33520,9 @@ const de_ModifySecurityGroupRulesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34034,7 +33541,7 @@ export const de_ModifySnapshotAttributeCommand = async ( const response: ModifySnapshotAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -34050,10 +33557,9 @@ const de_ModifySnapshotAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34075,7 +33581,7 @@ export const de_ModifySnapshotTierCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34091,10 +33597,9 @@ const de_ModifySnapshotTierCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34116,7 +33621,7 @@ export const de_ModifySpotFleetRequestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34132,10 +33637,9 @@ const de_ModifySpotFleetRequestCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34154,7 +33658,7 @@ export const de_ModifySubnetAttributeCommand = async ( const response: ModifySubnetAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -34170,10 +33674,9 @@ const de_ModifySubnetAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34195,7 +33698,7 @@ export const de_ModifyTrafficMirrorFilterNetworkServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34211,10 +33714,9 @@ const de_ModifyTrafficMirrorFilterNetworkServicesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34236,7 +33738,7 @@ export const de_ModifyTrafficMirrorFilterRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34252,10 +33754,9 @@ const de_ModifyTrafficMirrorFilterRuleCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34277,7 +33778,7 @@ export const de_ModifyTrafficMirrorSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34293,10 +33794,9 @@ const de_ModifyTrafficMirrorSessionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34318,7 +33818,7 @@ export const de_ModifyTransitGatewayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34334,10 +33834,9 @@ const de_ModifyTransitGatewayCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34359,7 +33858,7 @@ export const de_ModifyTransitGatewayPrefixListReferenceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34375,10 +33874,9 @@ const de_ModifyTransitGatewayPrefixListReferenceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34400,7 +33898,7 @@ export const de_ModifyTransitGatewayVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34416,10 +33914,9 @@ const de_ModifyTransitGatewayVpcAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34441,7 +33938,7 @@ export const de_ModifyVerifiedAccessEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34457,10 +33954,9 @@ const de_ModifyVerifiedAccessEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34482,7 +33978,7 @@ export const de_ModifyVerifiedAccessEndpointPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34498,10 +33994,9 @@ const de_ModifyVerifiedAccessEndpointPolicyCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34523,7 +34018,7 @@ export const de_ModifyVerifiedAccessGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34539,10 +34034,9 @@ const de_ModifyVerifiedAccessGroupCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34564,7 +34058,7 @@ export const de_ModifyVerifiedAccessGroupPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34580,10 +34074,9 @@ const de_ModifyVerifiedAccessGroupPolicyCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34605,7 +34098,7 @@ export const de_ModifyVerifiedAccessInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34621,10 +34114,9 @@ const de_ModifyVerifiedAccessInstanceCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34646,7 +34138,7 @@ export const de_ModifyVerifiedAccessInstanceLoggingConfigurationCommand = async $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34662,10 +34154,9 @@ const de_ModifyVerifiedAccessInstanceLoggingConfigurationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34687,7 +34178,7 @@ export const de_ModifyVerifiedAccessTrustProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34703,10 +34194,9 @@ const de_ModifyVerifiedAccessTrustProviderCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34728,7 +34218,7 @@ export const de_ModifyVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34744,10 +34234,9 @@ const de_ModifyVolumeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34766,7 +34255,7 @@ export const de_ModifyVolumeAttributeCommand = async ( const response: ModifyVolumeAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -34782,10 +34271,9 @@ const de_ModifyVolumeAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34804,7 +34292,7 @@ export const de_ModifyVpcAttributeCommand = async ( const response: ModifyVpcAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -34820,10 +34308,9 @@ const de_ModifyVpcAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34845,7 +34332,7 @@ export const de_ModifyVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34861,10 +34348,9 @@ const de_ModifyVpcEndpointCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34886,7 +34372,7 @@ export const de_ModifyVpcEndpointConnectionNotificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34902,10 +34388,9 @@ const de_ModifyVpcEndpointConnectionNotificationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34927,7 +34412,7 @@ export const de_ModifyVpcEndpointServiceConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34943,10 +34428,9 @@ const de_ModifyVpcEndpointServiceConfigurationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -34968,7 +34452,7 @@ export const de_ModifyVpcEndpointServicePayerResponsibilityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -34984,10 +34468,9 @@ const de_ModifyVpcEndpointServicePayerResponsibilityCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35009,7 +34492,7 @@ export const de_ModifyVpcEndpointServicePermissionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35025,10 +34508,9 @@ const de_ModifyVpcEndpointServicePermissionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35050,7 +34532,7 @@ export const de_ModifyVpcPeeringConnectionOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35066,10 +34548,9 @@ const de_ModifyVpcPeeringConnectionOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35091,7 +34572,7 @@ export const de_ModifyVpcTenancyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35107,10 +34588,9 @@ const de_ModifyVpcTenancyCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35132,7 +34612,7 @@ export const de_ModifyVpnConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35148,10 +34628,9 @@ const de_ModifyVpnConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35173,7 +34652,7 @@ export const de_ModifyVpnConnectionOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35189,10 +34668,9 @@ const de_ModifyVpnConnectionOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35214,7 +34692,7 @@ export const de_ModifyVpnTunnelCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35230,10 +34708,9 @@ const de_ModifyVpnTunnelCertificateCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35255,7 +34732,7 @@ export const de_ModifyVpnTunnelOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35271,10 +34748,9 @@ const de_ModifyVpnTunnelOptionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35296,7 +34772,7 @@ export const de_MonitorInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35312,10 +34788,9 @@ const de_MonitorInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35337,7 +34812,7 @@ export const de_MoveAddressToVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35353,10 +34828,9 @@ const de_MoveAddressToVpcCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35378,7 +34852,7 @@ export const de_MoveByoipCidrToIpamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35394,10 +34868,9 @@ const de_MoveByoipCidrToIpamCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35419,7 +34892,7 @@ export const de_ProvisionByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35435,10 +34908,9 @@ const de_ProvisionByoipCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35460,7 +34932,7 @@ export const de_ProvisionIpamPoolCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35476,10 +34948,9 @@ const de_ProvisionIpamPoolCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35501,7 +34972,7 @@ export const de_ProvisionPublicIpv4PoolCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35517,10 +34988,9 @@ const de_ProvisionPublicIpv4PoolCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35542,7 +35012,7 @@ export const de_PurchaseHostReservationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35558,10 +35028,9 @@ const de_PurchaseHostReservationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35583,7 +35052,7 @@ export const de_PurchaseReservedInstancesOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35599,10 +35068,9 @@ const de_PurchaseReservedInstancesOfferingCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35624,7 +35092,7 @@ export const de_PurchaseScheduledInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35640,10 +35108,9 @@ const de_PurchaseScheduledInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35662,7 +35129,7 @@ export const de_RebootInstancesCommand = async ( const response: RebootInstancesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -35678,10 +35145,9 @@ const de_RebootInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35703,7 +35169,7 @@ export const de_RegisterImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35719,10 +35185,9 @@ const de_RegisterImageCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35744,7 +35209,7 @@ export const de_RegisterInstanceEventNotificationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35760,10 +35225,9 @@ const de_RegisterInstanceEventNotificationAttributesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35785,7 +35249,7 @@ export const de_RegisterTransitGatewayMulticastGroupMembersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35801,10 +35265,9 @@ const de_RegisterTransitGatewayMulticastGroupMembersCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35826,7 +35289,7 @@ export const de_RegisterTransitGatewayMulticastGroupSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35842,10 +35305,9 @@ const de_RegisterTransitGatewayMulticastGroupSourcesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35867,7 +35329,7 @@ export const de_RejectTransitGatewayMulticastDomainAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35883,10 +35345,9 @@ const de_RejectTransitGatewayMulticastDomainAssociationsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35908,7 +35369,7 @@ export const de_RejectTransitGatewayPeeringAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35924,10 +35385,9 @@ const de_RejectTransitGatewayPeeringAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35949,7 +35409,7 @@ export const de_RejectTransitGatewayVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -35965,10 +35425,9 @@ const de_RejectTransitGatewayVpcAttachmentCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -35990,7 +35449,7 @@ export const de_RejectVpcEndpointConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36006,10 +35465,9 @@ const de_RejectVpcEndpointConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36031,7 +35489,7 @@ export const de_RejectVpcPeeringConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36047,10 +35505,9 @@ const de_RejectVpcPeeringConnectionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36069,7 +35526,7 @@ export const de_ReleaseAddressCommand = async ( const response: ReleaseAddressCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36085,10 +35542,9 @@ const de_ReleaseAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36110,7 +35566,7 @@ export const de_ReleaseHostsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36126,10 +35582,9 @@ const de_ReleaseHostsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36151,7 +35606,7 @@ export const de_ReleaseIpamPoolAllocationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36167,10 +35622,9 @@ const de_ReleaseIpamPoolAllocationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36192,7 +35646,7 @@ export const de_ReplaceIamInstanceProfileAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36208,10 +35662,9 @@ const de_ReplaceIamInstanceProfileAssociationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36233,7 +35686,7 @@ export const de_ReplaceNetworkAclAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36249,10 +35702,9 @@ const de_ReplaceNetworkAclAssociationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36271,7 +35723,7 @@ export const de_ReplaceNetworkAclEntryCommand = async ( const response: ReplaceNetworkAclEntryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36287,10 +35739,9 @@ const de_ReplaceNetworkAclEntryCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36309,7 +35760,7 @@ export const de_ReplaceRouteCommand = async ( const response: ReplaceRouteCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36325,10 +35776,9 @@ const de_ReplaceRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36350,7 +35800,7 @@ export const de_ReplaceRouteTableAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36366,10 +35816,9 @@ const de_ReplaceRouteTableAssociationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36391,7 +35840,7 @@ export const de_ReplaceTransitGatewayRouteCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36407,10 +35856,9 @@ const de_ReplaceTransitGatewayRouteCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36432,7 +35880,7 @@ export const de_ReplaceVpnTunnelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36448,10 +35896,9 @@ const de_ReplaceVpnTunnelCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36470,7 +35917,7 @@ export const de_ReportInstanceStatusCommand = async ( const response: ReportInstanceStatusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36486,10 +35933,9 @@ const de_ReportInstanceStatusCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36511,7 +35957,7 @@ export const de_RequestSpotFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36527,10 +35973,9 @@ const de_RequestSpotFleetCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36552,7 +35997,7 @@ export const de_RequestSpotInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36568,10 +36013,9 @@ const de_RequestSpotInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36593,7 +36037,7 @@ export const de_ResetAddressAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36609,10 +36053,9 @@ const de_ResetAddressAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36634,7 +36077,7 @@ export const de_ResetEbsDefaultKmsKeyIdCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36650,10 +36093,9 @@ const de_ResetEbsDefaultKmsKeyIdCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36675,7 +36117,7 @@ export const de_ResetFpgaImageAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36691,10 +36133,9 @@ const de_ResetFpgaImageAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36713,7 +36154,7 @@ export const de_ResetImageAttributeCommand = async ( const response: ResetImageAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36729,10 +36170,9 @@ const de_ResetImageAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36751,7 +36191,7 @@ export const de_ResetInstanceAttributeCommand = async ( const response: ResetInstanceAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36767,10 +36207,9 @@ const de_ResetInstanceAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36789,7 +36228,7 @@ export const de_ResetNetworkInterfaceAttributeCommand = async ( const response: ResetNetworkInterfaceAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36805,10 +36244,9 @@ const de_ResetNetworkInterfaceAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36827,7 +36265,7 @@ export const de_ResetSnapshotAttributeCommand = async ( const response: ResetSnapshotAttributeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -36843,10 +36281,9 @@ const de_ResetSnapshotAttributeCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36868,7 +36305,7 @@ export const de_RestoreAddressToClassicCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36884,10 +36321,9 @@ const de_RestoreAddressToClassicCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36909,7 +36345,7 @@ export const de_RestoreImageFromRecycleBinCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36925,10 +36361,9 @@ const de_RestoreImageFromRecycleBinCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36950,7 +36385,7 @@ export const de_RestoreManagedPrefixListVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -36966,10 +36401,9 @@ const de_RestoreManagedPrefixListVersionCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -36991,7 +36425,7 @@ export const de_RestoreSnapshotFromRecycleBinCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37007,10 +36441,9 @@ const de_RestoreSnapshotFromRecycleBinCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37032,7 +36465,7 @@ export const de_RestoreSnapshotTierCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37048,10 +36481,9 @@ const de_RestoreSnapshotTierCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37073,7 +36505,7 @@ export const de_RevokeClientVpnIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37089,10 +36521,9 @@ const de_RevokeClientVpnIngressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37114,7 +36545,7 @@ export const de_RevokeSecurityGroupEgressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37130,10 +36561,9 @@ const de_RevokeSecurityGroupEgressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37155,7 +36585,7 @@ export const de_RevokeSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37171,10 +36601,9 @@ const de_RevokeSecurityGroupIngressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37196,7 +36625,7 @@ export const de_RunInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37212,10 +36641,9 @@ const de_RunInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37237,7 +36665,7 @@ export const de_RunScheduledInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37253,10 +36681,9 @@ const de_RunScheduledInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37278,7 +36705,7 @@ export const de_SearchLocalGatewayRoutesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37294,10 +36721,9 @@ const de_SearchLocalGatewayRoutesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37319,7 +36745,7 @@ export const de_SearchTransitGatewayMulticastGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37335,10 +36761,9 @@ const de_SearchTransitGatewayMulticastGroupsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37360,7 +36785,7 @@ export const de_SearchTransitGatewayRoutesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37376,10 +36801,9 @@ const de_SearchTransitGatewayRoutesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37398,7 +36822,7 @@ export const de_SendDiagnosticInterruptCommand = async ( const response: SendDiagnosticInterruptCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -37414,10 +36838,9 @@ const de_SendDiagnosticInterruptCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37439,7 +36862,7 @@ export const de_StartInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37455,10 +36878,9 @@ const de_StartInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37480,7 +36902,7 @@ export const de_StartNetworkInsightsAccessScopeAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37496,10 +36918,9 @@ const de_StartNetworkInsightsAccessScopeAnalysisCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37521,7 +36942,7 @@ export const de_StartNetworkInsightsAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37537,10 +36958,9 @@ const de_StartNetworkInsightsAnalysisCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37562,7 +36982,7 @@ export const de_StartVpcEndpointServicePrivateDnsVerificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37578,10 +36998,9 @@ const de_StartVpcEndpointServicePrivateDnsVerificationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37603,7 +37022,7 @@ export const de_StopInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37619,10 +37038,9 @@ const de_StopInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37644,7 +37062,7 @@ export const de_TerminateClientVpnConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37660,10 +37078,9 @@ const de_TerminateClientVpnConnectionsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37685,7 +37102,7 @@ export const de_TerminateInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37701,10 +37118,9 @@ const de_TerminateInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37726,7 +37142,7 @@ export const de_UnassignIpv6AddressesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37742,10 +37158,9 @@ const de_UnassignIpv6AddressesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37764,7 +37179,7 @@ export const de_UnassignPrivateIpAddressesCommand = async ( const response: UnassignPrivateIpAddressesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -37780,10 +37195,9 @@ const de_UnassignPrivateIpAddressesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37805,7 +37219,7 @@ export const de_UnassignPrivateNatGatewayAddressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37821,10 +37235,9 @@ const de_UnassignPrivateNatGatewayAddressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37846,7 +37259,7 @@ export const de_UnmonitorInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37862,10 +37275,9 @@ const de_UnmonitorInstancesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37887,7 +37299,7 @@ export const de_UpdateSecurityGroupRuleDescriptionsEgressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37903,10 +37315,9 @@ const de_UpdateSecurityGroupRuleDescriptionsEgressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37928,7 +37339,7 @@ export const de_UpdateSecurityGroupRuleDescriptionsIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37944,10 +37355,9 @@ const de_UpdateSecurityGroupRuleDescriptionsIngressCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -37969,7 +37379,7 @@ export const de_WithdrawByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -37985,10 +37395,9 @@ const de_WithdrawByoipCidrCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -93563,6 +92972,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ecr-public/src/protocols/Aws_json1_1.ts b/clients/client-ecr-public/src/protocols/Aws_json1_1.ts index c02a0fa29454..6ecfd4df6dc6 100644 --- a/clients/client-ecr-public/src/protocols/Aws_json1_1.ts +++ b/clients/client-ecr-public/src/protocols/Aws_json1_1.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -83,15 +84,11 @@ import { ECRPUBLICServiceException as __BaseException } from "../models/ECRPUBLI import { AuthorizationData, BatchCheckLayerAvailabilityRequest, - BatchCheckLayerAvailabilityResponse, BatchDeleteImageRequest, - BatchDeleteImageResponse, CompleteLayerUploadRequest, - CompleteLayerUploadResponse, CreateRepositoryRequest, CreateRepositoryResponse, DeleteRepositoryPolicyRequest, - DeleteRepositoryPolicyResponse, DeleteRepositoryRequest, DeleteRepositoryResponse, DescribeImagesRequest, @@ -99,56 +96,39 @@ import { DescribeImageTagsRequest, DescribeImageTagsResponse, DescribeRegistriesRequest, - DescribeRegistriesResponse, DescribeRepositoriesRequest, DescribeRepositoriesResponse, EmptyUploadException, GetAuthorizationTokenRequest, GetAuthorizationTokenResponse, GetRegistryCatalogDataRequest, - GetRegistryCatalogDataResponse, GetRepositoryCatalogDataRequest, - GetRepositoryCatalogDataResponse, GetRepositoryPolicyRequest, - GetRepositoryPolicyResponse, - Image, ImageAlreadyExistsException, ImageDetail, ImageDigestDoesNotMatchException, - ImageFailure, ImageIdentifier, ImageNotFoundException, ImageTagAlreadyExistsException, ImageTagDetail, InitiateLayerUploadRequest, - InitiateLayerUploadResponse, InvalidLayerException, InvalidLayerPartException, InvalidParameterException, InvalidTagParameterException, - Layer, LayerAlreadyExistsException, - LayerFailure, LayerPartTooSmallException, LayersNotFoundException, LimitExceededException, ListTagsForResourceRequest, - ListTagsForResourceResponse, PutImageRequest, - PutImageResponse, PutRegistryCatalogDataRequest, - PutRegistryCatalogDataResponse, PutRepositoryCatalogDataRequest, - PutRepositoryCatalogDataResponse, ReferencedImageDetail, ReferencedImagesNotFoundException, - Registry, - RegistryAlias, - RegistryCatalogData, RegistryNotFoundException, Repository, RepositoryAlreadyExistsException, - RepositoryCatalogData, RepositoryCatalogDataInput, RepositoryCatalogDataNotFoundException, RepositoryNotEmptyException, @@ -156,16 +136,12 @@ import { RepositoryPolicyNotFoundException, ServerException, SetRepositoryPolicyRequest, - SetRepositoryPolicyResponse, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagsException, UnsupportedCommandException, UntagResourceRequest, - UntagResourceResponse, UploadLayerPartRequest, - UploadLayerPartResponse, UploadNotFoundException, } from "../models/models_0"; @@ -178,7 +154,7 @@ export const se_BatchCheckLayerAvailabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchCheckLayerAvailability"); let body: any; - body = JSON.stringify(se_BatchCheckLayerAvailabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -191,7 +167,7 @@ export const se_BatchDeleteImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteImage"); let body: any; - body = JSON.stringify(se_BatchDeleteImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -204,7 +180,7 @@ export const se_CompleteLayerUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CompleteLayerUpload"); let body: any; - body = JSON.stringify(se_CompleteLayerUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -230,7 +206,7 @@ export const se_DeleteRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRepository"); let body: any; - body = JSON.stringify(se_DeleteRepositoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -243,7 +219,7 @@ export const se_DeleteRepositoryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRepositoryPolicy"); let body: any; - body = JSON.stringify(se_DeleteRepositoryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -256,7 +232,7 @@ export const se_DescribeImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImages"); let body: any; - body = JSON.stringify(se_DescribeImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -269,7 +245,7 @@ export const se_DescribeImageTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImageTags"); let body: any; - body = JSON.stringify(se_DescribeImageTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -282,7 +258,7 @@ export const se_DescribeRegistriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRegistries"); let body: any; - body = JSON.stringify(se_DescribeRegistriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -295,7 +271,7 @@ export const se_DescribeRepositoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRepositories"); let body: any; - body = JSON.stringify(se_DescribeRepositoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -308,7 +284,7 @@ export const se_GetAuthorizationTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAuthorizationToken"); let body: any; - body = JSON.stringify(se_GetAuthorizationTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -321,7 +297,7 @@ export const se_GetRegistryCatalogDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegistryCatalogData"); let body: any; - body = JSON.stringify(se_GetRegistryCatalogDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -334,7 +310,7 @@ export const se_GetRepositoryCatalogDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepositoryCatalogData"); let body: any; - body = JSON.stringify(se_GetRepositoryCatalogDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -347,7 +323,7 @@ export const se_GetRepositoryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepositoryPolicy"); let body: any; - body = JSON.stringify(se_GetRepositoryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -360,7 +336,7 @@ export const se_InitiateLayerUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InitiateLayerUpload"); let body: any; - body = JSON.stringify(se_InitiateLayerUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -373,7 +349,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,7 +362,7 @@ export const se_PutImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutImage"); let body: any; - body = JSON.stringify(se_PutImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -399,7 +375,7 @@ export const se_PutRegistryCatalogDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRegistryCatalogData"); let body: any; - body = JSON.stringify(se_PutRegistryCatalogDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,7 +401,7 @@ export const se_SetRepositoryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetRepositoryPolicy"); let body: any; - body = JSON.stringify(se_SetRepositoryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -438,7 +414,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -451,7 +427,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -480,12 +456,12 @@ export const de_BatchCheckLayerAvailabilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchCheckLayerAvailabilityResponse(data, context); + contents = _json(data); const response: BatchCheckLayerAvailabilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -518,10 +494,9 @@ const de_BatchCheckLayerAvailabilityCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -539,12 +514,12 @@ export const de_BatchDeleteImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteImageResponse(data, context); + contents = _json(data); const response: BatchDeleteImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -574,10 +549,9 @@ const de_BatchDeleteImageCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -595,12 +569,12 @@ export const de_CompleteLayerUploadCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CompleteLayerUploadResponse(data, context); + contents = _json(data); const response: CompleteLayerUploadCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -648,10 +622,9 @@ const de_CompleteLayerUploadCommandError = async ( throw await de_UploadNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -674,7 +647,7 @@ export const de_CreateRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -713,10 +686,9 @@ const de_CreateRepositoryCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -739,7 +711,7 @@ export const de_DeleteRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -772,10 +744,9 @@ const de_DeleteRepositoryCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -793,12 +764,12 @@ export const de_DeleteRepositoryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRepositoryPolicyResponse(data, context); + contents = _json(data); const response: DeleteRepositoryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -831,10 +802,9 @@ const de_DeleteRepositoryPolicyCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -857,7 +827,7 @@ export const de_DescribeImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -890,10 +860,9 @@ const de_DescribeImagesCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -916,7 +885,7 @@ export const de_DescribeImageTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -946,10 +915,9 @@ const de_DescribeImageTagsCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -967,12 +935,12 @@ export const de_DescribeRegistriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRegistriesResponse(data, context); + contents = _json(data); const response: DescribeRegistriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -999,10 +967,9 @@ const de_DescribeRegistriesCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1025,7 +992,7 @@ export const de_DescribeRepositoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1055,10 +1022,9 @@ const de_DescribeRepositoriesCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1081,7 +1047,7 @@ export const de_GetAuthorizationTokenCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1108,10 +1074,9 @@ const de_GetAuthorizationTokenCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1129,12 +1094,12 @@ export const de_GetRegistryCatalogDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegistryCatalogDataResponse(data, context); + contents = _json(data); const response: GetRegistryCatalogDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1158,10 +1123,9 @@ const de_GetRegistryCatalogDataCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1179,12 +1143,12 @@ export const de_GetRepositoryCatalogDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRepositoryCatalogDataResponse(data, context); + contents = _json(data); const response: GetRepositoryCatalogDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1217,10 +1181,9 @@ const de_GetRepositoryCatalogDataCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1238,12 +1201,12 @@ export const de_GetRepositoryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRepositoryPolicyResponse(data, context); + contents = _json(data); const response: GetRepositoryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1276,10 +1239,9 @@ const de_GetRepositoryPolicyCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1297,12 +1259,12 @@ export const de_InitiateLayerUploadCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_InitiateLayerUploadResponse(data, context); + contents = _json(data); const response: InitiateLayerUploadCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1335,10 +1297,9 @@ const de_InitiateLayerUploadCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1356,12 +1317,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1391,10 +1352,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1412,12 +1372,12 @@ export const de_PutImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutImageResponse(data, context); + contents = _json(data); const response: PutImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1468,10 +1428,9 @@ const de_PutImageCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1489,12 +1448,12 @@ export const de_PutRegistryCatalogDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRegistryCatalogDataResponse(data, context); + contents = _json(data); const response: PutRegistryCatalogDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1521,10 +1480,9 @@ const de_PutRegistryCatalogDataCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1542,12 +1500,12 @@ export const de_PutRepositoryCatalogDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRepositoryCatalogDataResponse(data, context); + contents = _json(data); const response: PutRepositoryCatalogDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1577,10 +1535,9 @@ const de_PutRepositoryCatalogDataCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1598,12 +1555,12 @@ export const de_SetRepositoryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetRepositoryPolicyResponse(data, context); + contents = _json(data); const response: SetRepositoryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1633,10 +1590,9 @@ const de_SetRepositoryPolicyCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1654,12 +1610,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1695,10 +1651,9 @@ const de_TagResourceCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1716,12 +1671,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1757,10 +1712,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnsupportedCommandExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1778,12 +1732,12 @@ export const de_UploadLayerPartCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UploadLayerPartResponse(data, context); + contents = _json(data); const response: UploadLayerPartCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1825,10 +1779,9 @@ const de_UploadLayerPartCommandError = async ( throw await de_UploadNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1842,7 +1795,7 @@ const de_EmptyUploadExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EmptyUploadException(body, context); + const deserialized: any = _json(body); const exception = new EmptyUploadException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1858,7 +1811,7 @@ const de_ImageAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ImageAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1874,7 +1827,7 @@ const de_ImageDigestDoesNotMatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageDigestDoesNotMatchException(body, context); + const deserialized: any = _json(body); const exception = new ImageDigestDoesNotMatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1890,7 +1843,7 @@ const de_ImageNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ImageNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1906,7 +1859,7 @@ const de_ImageTagAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageTagAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ImageTagAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1922,7 +1875,7 @@ const de_InvalidLayerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLayerException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLayerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1938,7 +1891,7 @@ const de_InvalidLayerPartExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLayerPartException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLayerPartException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1954,7 +1907,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1970,7 +1923,7 @@ const de_InvalidTagParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1986,7 +1939,7 @@ const de_LayerAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayerAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new LayerAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2002,7 +1955,7 @@ const de_LayerPartTooSmallExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayerPartTooSmallException(body, context); + const deserialized: any = _json(body); const exception = new LayerPartTooSmallException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2018,7 +1971,7 @@ const de_LayersNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayersNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new LayersNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2034,7 +1987,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2050,7 +2003,7 @@ const de_ReferencedImagesNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReferencedImagesNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ReferencedImagesNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2066,7 +2019,7 @@ const de_RegistryNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RegistryNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RegistryNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2082,7 +2035,7 @@ const de_RepositoryAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2098,7 +2051,7 @@ const de_RepositoryCatalogDataNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryCatalogDataNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryCatalogDataNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2114,7 +2067,7 @@ const de_RepositoryNotEmptyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNotEmptyException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNotEmptyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2130,7 +2083,7 @@ const de_RepositoryNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2146,7 +2099,7 @@ const de_RepositoryPolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryPolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryPolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2159,7 +2112,7 @@ const de_RepositoryPolicyNotFoundExceptionRes = async ( */ const de_ServerExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServerException(body, context); + const deserialized: any = _json(body); const exception = new ServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2175,7 +2128,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2191,7 +2144,7 @@ const de_UnsupportedCommandExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedCommandException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedCommandException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2207,7 +2160,7 @@ const de_UploadNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UploadNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new UploadNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2215,604 +2168,222 @@ const de_UploadNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ArchitectureList - */ -const se_ArchitectureList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArchitectureList omitted. -/** - * serializeAws_json1_1BatchCheckLayerAvailabilityRequest - */ -const se_BatchCheckLayerAvailabilityRequest = ( - input: BatchCheckLayerAvailabilityRequest, - context: __SerdeContext -): any => { - return { - ...(input.layerDigests != null && { - layerDigests: se_BatchedOperationLayerDigestList(input.layerDigests, context), - }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_BatchCheckLayerAvailabilityRequest omitted. -/** - * serializeAws_json1_1BatchDeleteImageRequest - */ -const se_BatchDeleteImageRequest = (input: BatchDeleteImageRequest, context: __SerdeContext): any => { - return { - ...(input.imageIds != null && { imageIds: se_ImageIdentifierList(input.imageIds, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_BatchDeleteImageRequest omitted. -/** - * serializeAws_json1_1BatchedOperationLayerDigestList - */ -const se_BatchedOperationLayerDigestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BatchedOperationLayerDigestList omitted. -/** - * serializeAws_json1_1CompleteLayerUploadRequest - */ -const se_CompleteLayerUploadRequest = (input: CompleteLayerUploadRequest, context: __SerdeContext): any => { - return { - ...(input.layerDigests != null && { layerDigests: se_LayerDigestList(input.layerDigests, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.uploadId != null && { uploadId: input.uploadId }), - }; -}; +// se_CompleteLayerUploadRequest omitted. /** * serializeAws_json1_1CreateRepositoryRequest */ const se_CreateRepositoryRequest = (input: CreateRepositoryRequest, context: __SerdeContext): any => { - return { - ...(input.catalogData != null && { catalogData: se_RepositoryCatalogDataInput(input.catalogData, context) }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; + return take(input, { + catalogData: (_) => se_RepositoryCatalogDataInput(_, context), + repositoryName: [], + tags: _json, + }); }; -/** - * serializeAws_json1_1DeleteRepositoryPolicyRequest - */ -const se_DeleteRepositoryPolicyRequest = (input: DeleteRepositoryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_DeleteRepositoryPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteRepositoryRequest - */ -const se_DeleteRepositoryRequest = (input: DeleteRepositoryRequest, context: __SerdeContext): any => { - return { - ...(input.force != null && { force: input.force }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_DeleteRepositoryRequest omitted. -/** - * serializeAws_json1_1DescribeImagesRequest - */ -const se_DescribeImagesRequest = (input: DescribeImagesRequest, context: __SerdeContext): any => { - return { - ...(input.imageIds != null && { imageIds: se_ImageIdentifierList(input.imageIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_DescribeImagesRequest omitted. -/** - * serializeAws_json1_1DescribeImageTagsRequest - */ -const se_DescribeImageTagsRequest = (input: DescribeImageTagsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_DescribeImageTagsRequest omitted. -/** - * serializeAws_json1_1DescribeRegistriesRequest - */ -const se_DescribeRegistriesRequest = (input: DescribeRegistriesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeRegistriesRequest omitted. -/** - * serializeAws_json1_1DescribeRepositoriesRequest - */ -const se_DescribeRepositoriesRequest = (input: DescribeRepositoriesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryNames != null && { repositoryNames: se_RepositoryNameList(input.repositoryNames, context) }), - }; -}; +// se_DescribeRepositoriesRequest omitted. -/** - * serializeAws_json1_1GetAuthorizationTokenRequest - */ -const se_GetAuthorizationTokenRequest = (input: GetAuthorizationTokenRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetAuthorizationTokenRequest omitted. -/** - * serializeAws_json1_1GetRegistryCatalogDataRequest - */ -const se_GetRegistryCatalogDataRequest = (input: GetRegistryCatalogDataRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetRegistryCatalogDataRequest omitted. -/** - * serializeAws_json1_1GetRepositoryCatalogDataRequest - */ -const se_GetRepositoryCatalogDataRequest = (input: GetRepositoryCatalogDataRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_GetRepositoryCatalogDataRequest omitted. -/** - * serializeAws_json1_1GetRepositoryPolicyRequest - */ -const se_GetRepositoryPolicyRequest = (input: GetRepositoryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_GetRepositoryPolicyRequest omitted. -/** - * serializeAws_json1_1ImageIdentifier - */ -const se_ImageIdentifier = (input: ImageIdentifier, context: __SerdeContext): any => { - return { - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.imageTag != null && { imageTag: input.imageTag }), - }; -}; +// se_ImageIdentifier omitted. -/** - * serializeAws_json1_1ImageIdentifierList - */ -const se_ImageIdentifierList = (input: ImageIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ImageIdentifier(entry, context); - }); -}; +// se_ImageIdentifierList omitted. -/** - * serializeAws_json1_1InitiateLayerUploadRequest - */ -const se_InitiateLayerUploadRequest = (input: InitiateLayerUploadRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_InitiateLayerUploadRequest omitted. -/** - * serializeAws_json1_1LayerDigestList - */ -const se_LayerDigestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LayerDigestList omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1OperatingSystemList - */ -const se_OperatingSystemList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OperatingSystemList omitted. -/** - * serializeAws_json1_1PutImageRequest - */ -const se_PutImageRequest = (input: PutImageRequest, context: __SerdeContext): any => { - return { - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.imageManifest != null && { imageManifest: input.imageManifest }), - ...(input.imageManifestMediaType != null && { imageManifestMediaType: input.imageManifestMediaType }), - ...(input.imageTag != null && { imageTag: input.imageTag }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_PutImageRequest omitted. -/** - * serializeAws_json1_1PutRegistryCatalogDataRequest - */ -const se_PutRegistryCatalogDataRequest = (input: PutRegistryCatalogDataRequest, context: __SerdeContext): any => { - return { - ...(input.displayName != null && { displayName: input.displayName }), - }; -}; +// se_PutRegistryCatalogDataRequest omitted. /** * serializeAws_json1_1PutRepositoryCatalogDataRequest */ const se_PutRepositoryCatalogDataRequest = (input: PutRepositoryCatalogDataRequest, context: __SerdeContext): any => { - return { - ...(input.catalogData != null && { catalogData: se_RepositoryCatalogDataInput(input.catalogData, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; + return take(input, { + catalogData: (_) => se_RepositoryCatalogDataInput(_, context), + registryId: [], + repositoryName: [], + }); }; /** * serializeAws_json1_1RepositoryCatalogDataInput */ const se_RepositoryCatalogDataInput = (input: RepositoryCatalogDataInput, context: __SerdeContext): any => { - return { - ...(input.aboutText != null && { aboutText: input.aboutText }), - ...(input.architectures != null && { architectures: se_ArchitectureList(input.architectures, context) }), - ...(input.description != null && { description: input.description }), - ...(input.logoImageBlob != null && { logoImageBlob: context.base64Encoder(input.logoImageBlob) }), - ...(input.operatingSystems != null && { - operatingSystems: se_OperatingSystemList(input.operatingSystems, context), - }), - ...(input.usageText != null && { usageText: input.usageText }), - }; + return take(input, { + aboutText: [], + architectures: _json, + description: [], + logoImageBlob: context.base64Encoder, + operatingSystems: _json, + usageText: [], + }); }; -/** - * serializeAws_json1_1RepositoryNameList - */ -const se_RepositoryNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RepositoryNameList omitted. -/** - * serializeAws_json1_1SetRepositoryPolicyRequest - */ -const se_SetRepositoryPolicyRequest = (input: SetRepositoryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.force != null && { force: input.force }), - ...(input.policyText != null && { policyText: input.policyText }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_SetRepositoryPolicyRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. /** * serializeAws_json1_1UploadLayerPartRequest */ const se_UploadLayerPartRequest = (input: UploadLayerPartRequest, context: __SerdeContext): any => { - return { - ...(input.layerPartBlob != null && { layerPartBlob: context.base64Encoder(input.layerPartBlob) }), - ...(input.partFirstByte != null && { partFirstByte: input.partFirstByte }), - ...(input.partLastByte != null && { partLastByte: input.partLastByte }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.uploadId != null && { uploadId: input.uploadId }), - }; + return take(input, { + layerPartBlob: context.base64Encoder, + partFirstByte: [], + partLastByte: [], + registryId: [], + repositoryName: [], + uploadId: [], + }); }; -/** - * deserializeAws_json1_1ArchitectureList - */ -const de_ArchitectureList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArchitectureList omitted. /** * deserializeAws_json1_1AuthorizationData */ const de_AuthorizationData = (output: any, context: __SerdeContext): AuthorizationData => { - return { - authorizationToken: __expectString(output.authorizationToken), - expiresAt: - output.expiresAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiresAt))) : undefined, - } as any; + return take(output, { + authorizationToken: __expectString, + expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1BatchCheckLayerAvailabilityResponse - */ -const de_BatchCheckLayerAvailabilityResponse = ( - output: any, - context: __SerdeContext -): BatchCheckLayerAvailabilityResponse => { - return { - failures: output.failures != null ? de_LayerFailureList(output.failures, context) : undefined, - layers: output.layers != null ? de_LayerList(output.layers, context) : undefined, - } as any; -}; +// de_BatchCheckLayerAvailabilityResponse omitted. -/** - * deserializeAws_json1_1BatchDeleteImageResponse - */ -const de_BatchDeleteImageResponse = (output: any, context: __SerdeContext): BatchDeleteImageResponse => { - return { - failures: output.failures != null ? de_ImageFailureList(output.failures, context) : undefined, - imageIds: output.imageIds != null ? de_ImageIdentifierList(output.imageIds, context) : undefined, - } as any; -}; +// de_BatchDeleteImageResponse omitted. -/** - * deserializeAws_json1_1CompleteLayerUploadResponse - */ -const de_CompleteLayerUploadResponse = (output: any, context: __SerdeContext): CompleteLayerUploadResponse => { - return { - layerDigest: __expectString(output.layerDigest), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - uploadId: __expectString(output.uploadId), - } as any; -}; +// de_CompleteLayerUploadResponse omitted. /** * deserializeAws_json1_1CreateRepositoryResponse */ const de_CreateRepositoryResponse = (output: any, context: __SerdeContext): CreateRepositoryResponse => { - return { - catalogData: output.catalogData != null ? de_RepositoryCatalogData(output.catalogData, context) : undefined, - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; + return take(output, { + catalogData: _json, + repository: (_: any) => de_Repository(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteRepositoryPolicyResponse - */ -const de_DeleteRepositoryPolicyResponse = (output: any, context: __SerdeContext): DeleteRepositoryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_DeleteRepositoryPolicyResponse omitted. /** * deserializeAws_json1_1DeleteRepositoryResponse */ const de_DeleteRepositoryResponse = (output: any, context: __SerdeContext): DeleteRepositoryResponse => { - return { - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; + return take(output, { + repository: (_: any) => de_Repository(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeImagesResponse */ const de_DescribeImagesResponse = (output: any, context: __SerdeContext): DescribeImagesResponse => { - return { - imageDetails: output.imageDetails != null ? de_ImageDetailList(output.imageDetails, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + imageDetails: (_: any) => de_ImageDetailList(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeImageTagsResponse */ const de_DescribeImageTagsResponse = (output: any, context: __SerdeContext): DescribeImageTagsResponse => { - return { - imageTagDetails: - output.imageTagDetails != null ? de_ImageTagDetailList(output.imageTagDetails, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + imageTagDetails: (_: any) => de_ImageTagDetailList(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeRegistriesResponse - */ -const de_DescribeRegistriesResponse = (output: any, context: __SerdeContext): DescribeRegistriesResponse => { - return { - nextToken: __expectString(output.nextToken), - registries: output.registries != null ? de_RegistryList(output.registries, context) : undefined, - } as any; -}; +// de_DescribeRegistriesResponse omitted. /** * deserializeAws_json1_1DescribeRepositoriesResponse */ const de_DescribeRepositoriesResponse = (output: any, context: __SerdeContext): DescribeRepositoriesResponse => { - return { - nextToken: __expectString(output.nextToken), - repositories: output.repositories != null ? de_RepositoryList(output.repositories, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + repositories: (_: any) => de_RepositoryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1EmptyUploadException - */ -const de_EmptyUploadException = (output: any, context: __SerdeContext): EmptyUploadException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_EmptyUploadException omitted. /** * deserializeAws_json1_1GetAuthorizationTokenResponse */ const de_GetAuthorizationTokenResponse = (output: any, context: __SerdeContext): GetAuthorizationTokenResponse => { - return { - authorizationData: - output.authorizationData != null ? de_AuthorizationData(output.authorizationData, context) : undefined, - } as any; + return take(output, { + authorizationData: (_: any) => de_AuthorizationData(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetRegistryCatalogDataResponse - */ -const de_GetRegistryCatalogDataResponse = (output: any, context: __SerdeContext): GetRegistryCatalogDataResponse => { - return { - registryCatalogData: - output.registryCatalogData != null ? de_RegistryCatalogData(output.registryCatalogData, context) : undefined, - } as any; -}; +// de_GetRegistryCatalogDataResponse omitted. -/** - * deserializeAws_json1_1GetRepositoryCatalogDataResponse - */ -const de_GetRepositoryCatalogDataResponse = ( - output: any, - context: __SerdeContext -): GetRepositoryCatalogDataResponse => { - return { - catalogData: output.catalogData != null ? de_RepositoryCatalogData(output.catalogData, context) : undefined, - } as any; -}; +// de_GetRepositoryCatalogDataResponse omitted. -/** - * deserializeAws_json1_1GetRepositoryPolicyResponse - */ -const de_GetRepositoryPolicyResponse = (output: any, context: __SerdeContext): GetRepositoryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_GetRepositoryPolicyResponse omitted. -/** - * deserializeAws_json1_1Image - */ -const de_Image = (output: any, context: __SerdeContext): Image => { - return { - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - imageManifest: __expectString(output.imageManifest), - imageManifestMediaType: __expectString(output.imageManifestMediaType), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_Image omitted. -/** - * deserializeAws_json1_1ImageAlreadyExistsException - */ -const de_ImageAlreadyExistsException = (output: any, context: __SerdeContext): ImageAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ImageAlreadyExistsException omitted. /** * deserializeAws_json1_1ImageDetail */ const de_ImageDetail = (output: any, context: __SerdeContext): ImageDetail => { - return { - artifactMediaType: __expectString(output.artifactMediaType), - imageDigest: __expectString(output.imageDigest), - imageManifestMediaType: __expectString(output.imageManifestMediaType), - imagePushedAt: - output.imagePushedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.imagePushedAt))) - : undefined, - imageSizeInBytes: __expectLong(output.imageSizeInBytes), - imageTags: output.imageTags != null ? de_ImageTagList(output.imageTags, context) : undefined, - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; + return take(output, { + artifactMediaType: __expectString, + imageDigest: __expectString, + imageManifestMediaType: __expectString, + imagePushedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageSizeInBytes: __expectLong, + imageTags: _json, + registryId: __expectString, + repositoryName: __expectString, + }) as any; }; /** @@ -2822,105 +2393,34 @@ const de_ImageDetailList = (output: any, context: __SerdeContext): ImageDetail[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImageDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ImageDigestDoesNotMatchException - */ -const de_ImageDigestDoesNotMatchException = ( - output: any, - context: __SerdeContext -): ImageDigestDoesNotMatchException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ImageDigestDoesNotMatchException omitted. -/** - * deserializeAws_json1_1ImageFailure - */ -const de_ImageFailure = (output: any, context: __SerdeContext): ImageFailure => { - return { - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - } as any; -}; +// de_ImageFailure omitted. -/** - * deserializeAws_json1_1ImageFailureList - */ -const de_ImageFailureList = (output: any, context: __SerdeContext): ImageFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageFailure(entry, context); - }); - return retVal; -}; +// de_ImageFailureList omitted. -/** - * deserializeAws_json1_1ImageIdentifier - */ -const de_ImageIdentifier = (output: any, context: __SerdeContext): ImageIdentifier => { - return { - imageDigest: __expectString(output.imageDigest), - imageTag: __expectString(output.imageTag), - } as any; -}; +// de_ImageIdentifier omitted. -/** - * deserializeAws_json1_1ImageIdentifierList - */ -const de_ImageIdentifierList = (output: any, context: __SerdeContext): ImageIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageIdentifier(entry, context); - }); - return retVal; -}; +// de_ImageIdentifierList omitted. -/** - * deserializeAws_json1_1ImageNotFoundException - */ -const de_ImageNotFoundException = (output: any, context: __SerdeContext): ImageNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ImageNotFoundException omitted. -/** - * deserializeAws_json1_1ImageTagAlreadyExistsException - */ -const de_ImageTagAlreadyExistsException = (output: any, context: __SerdeContext): ImageTagAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ImageTagAlreadyExistsException omitted. /** * deserializeAws_json1_1ImageTagDetail */ const de_ImageTagDetail = (output: any, context: __SerdeContext): ImageTagDetail => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - imageDetail: output.imageDetail != null ? de_ReferencedImageDetail(output.imageDetail, context) : undefined, - imageTag: __expectString(output.imageTag), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageDetail: (_: any) => de_ReferencedImageDetail(_, context), + imageTag: __expectString, + }) as any; }; /** @@ -2930,377 +2430,94 @@ const de_ImageTagDetailList = (output: any, context: __SerdeContext): ImageTagDe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImageTagDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ImageTagList - */ -const de_ImageTagList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ImageTagList omitted. -/** - * deserializeAws_json1_1InitiateLayerUploadResponse - */ -const de_InitiateLayerUploadResponse = (output: any, context: __SerdeContext): InitiateLayerUploadResponse => { - return { - partSize: __expectLong(output.partSize), - uploadId: __expectString(output.uploadId), - } as any; -}; +// de_InitiateLayerUploadResponse omitted. -/** - * deserializeAws_json1_1InvalidLayerException - */ -const de_InvalidLayerException = (output: any, context: __SerdeContext): InvalidLayerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidLayerException omitted. -/** - * deserializeAws_json1_1InvalidLayerPartException - */ -const de_InvalidLayerPartException = (output: any, context: __SerdeContext): InvalidLayerPartException => { - return { - lastValidByteReceived: __expectLong(output.lastValidByteReceived), - message: __expectString(output.message), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - uploadId: __expectString(output.uploadId), - } as any; -}; +// de_InvalidLayerPartException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidTagParameterException - */ -const de_InvalidTagParameterException = (output: any, context: __SerdeContext): InvalidTagParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTagParameterException omitted. -/** - * deserializeAws_json1_1Layer - */ -const de_Layer = (output: any, context: __SerdeContext): Layer => { - return { - layerAvailability: __expectString(output.layerAvailability), - layerDigest: __expectString(output.layerDigest), - layerSize: __expectLong(output.layerSize), - mediaType: __expectString(output.mediaType), - } as any; -}; +// de_Layer omitted. -/** - * deserializeAws_json1_1LayerAlreadyExistsException - */ -const de_LayerAlreadyExistsException = (output: any, context: __SerdeContext): LayerAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LayerAlreadyExistsException omitted. -/** - * deserializeAws_json1_1LayerFailure - */ -const de_LayerFailure = (output: any, context: __SerdeContext): LayerFailure => { - return { - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - layerDigest: __expectString(output.layerDigest), - } as any; -}; +// de_LayerFailure omitted. -/** - * deserializeAws_json1_1LayerFailureList - */ -const de_LayerFailureList = (output: any, context: __SerdeContext): LayerFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LayerFailure(entry, context); - }); - return retVal; -}; +// de_LayerFailureList omitted. -/** - * deserializeAws_json1_1LayerList - */ -const de_LayerList = (output: any, context: __SerdeContext): Layer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Layer(entry, context); - }); - return retVal; -}; +// de_LayerList omitted. -/** - * deserializeAws_json1_1LayerPartTooSmallException - */ -const de_LayerPartTooSmallException = (output: any, context: __SerdeContext): LayerPartTooSmallException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LayerPartTooSmallException omitted. -/** - * deserializeAws_json1_1LayersNotFoundException - */ -const de_LayersNotFoundException = (output: any, context: __SerdeContext): LayersNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LayersNotFoundException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1OperatingSystemList - */ -const de_OperatingSystemList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OperatingSystemList omitted. -/** - * deserializeAws_json1_1PutImageResponse - */ -const de_PutImageResponse = (output: any, context: __SerdeContext): PutImageResponse => { - return { - image: output.image != null ? de_Image(output.image, context) : undefined, - } as any; -}; +// de_PutImageResponse omitted. -/** - * deserializeAws_json1_1PutRegistryCatalogDataResponse - */ -const de_PutRegistryCatalogDataResponse = (output: any, context: __SerdeContext): PutRegistryCatalogDataResponse => { - return { - registryCatalogData: - output.registryCatalogData != null ? de_RegistryCatalogData(output.registryCatalogData, context) : undefined, - } as any; -}; +// de_PutRegistryCatalogDataResponse omitted. -/** - * deserializeAws_json1_1PutRepositoryCatalogDataResponse - */ -const de_PutRepositoryCatalogDataResponse = ( - output: any, - context: __SerdeContext -): PutRepositoryCatalogDataResponse => { - return { - catalogData: output.catalogData != null ? de_RepositoryCatalogData(output.catalogData, context) : undefined, - } as any; -}; +// de_PutRepositoryCatalogDataResponse omitted. /** * deserializeAws_json1_1ReferencedImageDetail */ const de_ReferencedImageDetail = (output: any, context: __SerdeContext): ReferencedImageDetail => { - return { - artifactMediaType: __expectString(output.artifactMediaType), - imageDigest: __expectString(output.imageDigest), - imageManifestMediaType: __expectString(output.imageManifestMediaType), - imagePushedAt: - output.imagePushedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.imagePushedAt))) - : undefined, - imageSizeInBytes: __expectLong(output.imageSizeInBytes), - } as any; + return take(output, { + artifactMediaType: __expectString, + imageDigest: __expectString, + imageManifestMediaType: __expectString, + imagePushedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageSizeInBytes: __expectLong, + }) as any; }; -/** - * deserializeAws_json1_1ReferencedImagesNotFoundException - */ -const de_ReferencedImagesNotFoundException = ( - output: any, - context: __SerdeContext -): ReferencedImagesNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReferencedImagesNotFoundException omitted. -/** - * deserializeAws_json1_1Registry - */ -const de_Registry = (output: any, context: __SerdeContext): Registry => { - return { - aliases: output.aliases != null ? de_RegistryAliasList(output.aliases, context) : undefined, - registryArn: __expectString(output.registryArn), - registryId: __expectString(output.registryId), - registryUri: __expectString(output.registryUri), - verified: __expectBoolean(output.verified), - } as any; -}; +// de_Registry omitted. -/** - * deserializeAws_json1_1RegistryAlias - */ -const de_RegistryAlias = (output: any, context: __SerdeContext): RegistryAlias => { - return { - defaultRegistryAlias: __expectBoolean(output.defaultRegistryAlias), - name: __expectString(output.name), - primaryRegistryAlias: __expectBoolean(output.primaryRegistryAlias), - status: __expectString(output.status), - } as any; -}; +// de_RegistryAlias omitted. -/** - * deserializeAws_json1_1RegistryAliasList - */ -const de_RegistryAliasList = (output: any, context: __SerdeContext): RegistryAlias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegistryAlias(entry, context); - }); - return retVal; -}; +// de_RegistryAliasList omitted. -/** - * deserializeAws_json1_1RegistryCatalogData - */ -const de_RegistryCatalogData = (output: any, context: __SerdeContext): RegistryCatalogData => { - return { - displayName: __expectString(output.displayName), - } as any; -}; +// de_RegistryCatalogData omitted. -/** - * deserializeAws_json1_1RegistryList - */ -const de_RegistryList = (output: any, context: __SerdeContext): Registry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Registry(entry, context); - }); - return retVal; -}; +// de_RegistryList omitted. -/** - * deserializeAws_json1_1RegistryNotFoundException - */ -const de_RegistryNotFoundException = (output: any, context: __SerdeContext): RegistryNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RegistryNotFoundException omitted. /** * deserializeAws_json1_1Repository */ const de_Repository = (output: any, context: __SerdeContext): Repository => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - registryId: __expectString(output.registryId), - repositoryArn: __expectString(output.repositoryArn), - repositoryName: __expectString(output.repositoryName), - repositoryUri: __expectString(output.repositoryUri), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registryId: __expectString, + repositoryArn: __expectString, + repositoryName: __expectString, + repositoryUri: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RepositoryAlreadyExistsException - */ -const de_RepositoryAlreadyExistsException = ( - output: any, - context: __SerdeContext -): RepositoryAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryAlreadyExistsException omitted. -/** - * deserializeAws_json1_1RepositoryCatalogData - */ -const de_RepositoryCatalogData = (output: any, context: __SerdeContext): RepositoryCatalogData => { - return { - aboutText: __expectString(output.aboutText), - architectures: output.architectures != null ? de_ArchitectureList(output.architectures, context) : undefined, - description: __expectString(output.description), - logoUrl: __expectString(output.logoUrl), - marketplaceCertified: __expectBoolean(output.marketplaceCertified), - operatingSystems: - output.operatingSystems != null ? de_OperatingSystemList(output.operatingSystems, context) : undefined, - usageText: __expectString(output.usageText), - } as any; -}; +// de_RepositoryCatalogData omitted. -/** - * deserializeAws_json1_1RepositoryCatalogDataNotFoundException - */ -const de_RepositoryCatalogDataNotFoundException = ( - output: any, - context: __SerdeContext -): RepositoryCatalogDataNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryCatalogDataNotFoundException omitted. /** * deserializeAws_json1_1RepositoryList @@ -3309,141 +2526,36 @@ const de_RepositoryList = (output: any, context: __SerdeContext): Repository[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Repository(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RepositoryNotEmptyException - */ -const de_RepositoryNotEmptyException = (output: any, context: __SerdeContext): RepositoryNotEmptyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNotEmptyException omitted. -/** - * deserializeAws_json1_1RepositoryNotFoundException - */ -const de_RepositoryNotFoundException = (output: any, context: __SerdeContext): RepositoryNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryNotFoundException omitted. -/** - * deserializeAws_json1_1RepositoryPolicyNotFoundException - */ -const de_RepositoryPolicyNotFoundException = ( - output: any, - context: __SerdeContext -): RepositoryPolicyNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_RepositoryPolicyNotFoundException omitted. -/** - * deserializeAws_json1_1ServerException - */ -const de_ServerException = (output: any, context: __SerdeContext): ServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServerException omitted. -/** - * deserializeAws_json1_1SetRepositoryPolicyResponse - */ -const de_SetRepositoryPolicyResponse = (output: any, context: __SerdeContext): SetRepositoryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// de_SetRepositoryPolicyResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UnsupportedCommandException - */ -const de_UnsupportedCommandException = (output: any, context: __SerdeContext): UnsupportedCommandException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedCommandException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UploadLayerPartResponse - */ -const de_UploadLayerPartResponse = (output: any, context: __SerdeContext): UploadLayerPartResponse => { - return { - lastByteReceived: __expectLong(output.lastByteReceived), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - uploadId: __expectString(output.uploadId), - } as any; -}; +// de_UploadLayerPartResponse omitted. -/** - * deserializeAws_json1_1UploadNotFoundException - */ -const de_UploadNotFoundException = (output: any, context: __SerdeContext): UploadNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UploadNotFoundException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3465,6 +2577,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ecr/src/protocols/Aws_json1_1.ts b/clients/client-ecr/src/protocols/Aws_json1_1.ts index d07d66dad22c..86da82f5d123 100644 --- a/clients/client-ecr/src/protocols/Aws_json1_1.ts +++ b/clients/client-ecr/src/protocols/Aws_json1_1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -10,7 +10,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -137,38 +138,28 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { UploadLayerPartCommandInput, UploadLayerPartCommandOutput } from "../commands/UploadLayerPartCommand"; import { ECRServiceException as __BaseException } from "../models/ECRServiceException"; import { - Attribute, AuthorizationData, AwsEcrContainerImageDetails, BatchCheckLayerAvailabilityRequest, - BatchCheckLayerAvailabilityResponse, BatchDeleteImageRequest, - BatchDeleteImageResponse, BatchGetImageRequest, - BatchGetImageResponse, BatchGetRepositoryScanningConfigurationRequest, - BatchGetRepositoryScanningConfigurationResponse, CompleteLayerUploadRequest, - CompleteLayerUploadResponse, CreatePullThroughCacheRuleRequest, CreatePullThroughCacheRuleResponse, CreateRepositoryRequest, CreateRepositoryResponse, CvssScore, - CvssScoreAdjustment, CvssScoreDetails, DeleteLifecyclePolicyRequest, DeleteLifecyclePolicyResponse, DeletePullThroughCacheRuleRequest, DeletePullThroughCacheRuleResponse, DeleteRegistryPolicyRequest, - DeleteRegistryPolicyResponse, DeleteRepositoryPolicyRequest, - DeleteRepositoryPolicyResponse, DeleteRepositoryRequest, DeleteRepositoryResponse, DescribeImageReplicationStatusRequest, - DescribeImageReplicationStatusResponse, DescribeImageScanFindingsRequest, DescribeImageScanFindingsResponse, DescribeImagesFilter, @@ -177,51 +168,37 @@ import { DescribePullThroughCacheRulesRequest, DescribePullThroughCacheRulesResponse, DescribeRegistryRequest, - DescribeRegistryResponse, DescribeRepositoriesRequest, DescribeRepositoriesResponse, EmptyUploadException, EncryptionConfiguration, EnhancedImageScanFinding, - FindingSeverity, GetAuthorizationTokenRequest, GetAuthorizationTokenResponse, GetDownloadUrlForLayerRequest, - GetDownloadUrlForLayerResponse, GetLifecyclePolicyPreviewRequest, GetLifecyclePolicyPreviewResponse, GetLifecyclePolicyRequest, GetLifecyclePolicyResponse, GetRegistryPolicyRequest, - GetRegistryPolicyResponse, GetRegistryScanningConfigurationRequest, - GetRegistryScanningConfigurationResponse, GetRepositoryPolicyRequest, - GetRepositoryPolicyResponse, - Image, ImageAlreadyExistsException, ImageDetail, ImageDigestDoesNotMatchException, - ImageFailure, ImageIdentifier, ImageNotFoundException, - ImageReplicationStatus, - ImageScanFinding, ImageScanFindings, ImageScanFindingsSummary, ImageScanningConfiguration, - ImageScanStatus, ImageTagAlreadyExistsException, InitiateLayerUploadRequest, - InitiateLayerUploadResponse, InvalidLayerException, InvalidLayerPartException, InvalidParameterException, InvalidTagParameterException, KmsException, - Layer, LayerAlreadyExistsException, - LayerFailure, LayerInaccessibleException, LayerPartTooSmallException, LayersNotFoundException, @@ -230,38 +207,24 @@ import { LifecyclePolicyPreviewInProgressException, LifecyclePolicyPreviewNotFoundException, LifecyclePolicyPreviewResult, - LifecyclePolicyPreviewSummary, - LifecyclePolicyRuleAction, LimitExceededException, ListImagesFilter, ListImagesRequest, - ListImagesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, PackageVulnerabilityDetails, PullThroughCacheRule, PullThroughCacheRuleAlreadyExistsException, PullThroughCacheRuleNotFoundException, PutImageRequest, - PutImageResponse, PutImageScanningConfigurationRequest, - PutImageScanningConfigurationResponse, PutImageTagMutabilityRequest, - PutImageTagMutabilityResponse, PutLifecyclePolicyRequest, - PutLifecyclePolicyResponse, PutRegistryPolicyRequest, - PutRegistryPolicyResponse, PutRegistryScanningConfigurationRequest, - PutRegistryScanningConfigurationResponse, PutReplicationConfigurationRequest, - PutReplicationConfigurationResponse, - Recommendation, ReferencedImagesNotFoundException, RegistryPolicyNotFoundException, - RegistryScanningConfiguration, RegistryScanningRule, - Remediation, ReplicationConfiguration, ReplicationDestination, ReplicationRule, @@ -271,8 +234,6 @@ import { RepositoryNotEmptyException, RepositoryNotFoundException, RepositoryPolicyNotFoundException, - RepositoryScanningConfiguration, - RepositoryScanningConfigurationFailure, Resource, ResourceDetails, ScanningRepositoryFilter, @@ -280,24 +241,17 @@ import { ScoreDetails, ServerException, SetRepositoryPolicyRequest, - SetRepositoryPolicyResponse, StartImageScanRequest, - StartImageScanResponse, StartLifecyclePolicyPreviewRequest, - StartLifecyclePolicyPreviewResponse, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagsException, UnsupportedImageTypeException, UnsupportedUpstreamRegistryException, UntagResourceRequest, - UntagResourceResponse, UploadLayerPartRequest, - UploadLayerPartResponse, UploadNotFoundException, ValidationException, - VulnerablePackage, } from "../models/models_0"; /** @@ -309,7 +263,7 @@ export const se_BatchCheckLayerAvailabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchCheckLayerAvailability"); let body: any; - body = JSON.stringify(se_BatchCheckLayerAvailabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -322,7 +276,7 @@ export const se_BatchDeleteImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteImage"); let body: any; - body = JSON.stringify(se_BatchDeleteImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -335,7 +289,7 @@ export const se_BatchGetImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetImage"); let body: any; - body = JSON.stringify(se_BatchGetImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -348,7 +302,7 @@ export const se_BatchGetRepositoryScanningConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetRepositoryScanningConfiguration"); let body: any; - body = JSON.stringify(se_BatchGetRepositoryScanningConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -361,7 +315,7 @@ export const se_CompleteLayerUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CompleteLayerUpload"); let body: any; - body = JSON.stringify(se_CompleteLayerUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -374,7 +328,7 @@ export const se_CreatePullThroughCacheRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePullThroughCacheRule"); let body: any; - body = JSON.stringify(se_CreatePullThroughCacheRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -387,7 +341,7 @@ export const se_CreateRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRepository"); let body: any; - body = JSON.stringify(se_CreateRepositoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -400,7 +354,7 @@ export const se_DeleteLifecyclePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLifecyclePolicy"); let body: any; - body = JSON.stringify(se_DeleteLifecyclePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -413,7 +367,7 @@ export const se_DeletePullThroughCacheRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePullThroughCacheRule"); let body: any; - body = JSON.stringify(se_DeletePullThroughCacheRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -426,7 +380,7 @@ export const se_DeleteRegistryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegistryPolicy"); let body: any; - body = JSON.stringify(se_DeleteRegistryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -439,7 +393,7 @@ export const se_DeleteRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRepository"); let body: any; - body = JSON.stringify(se_DeleteRepositoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -452,7 +406,7 @@ export const se_DeleteRepositoryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRepositoryPolicy"); let body: any; - body = JSON.stringify(se_DeleteRepositoryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -465,7 +419,7 @@ export const se_DescribeImageReplicationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImageReplicationStatus"); let body: any; - body = JSON.stringify(se_DescribeImageReplicationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -478,7 +432,7 @@ export const se_DescribeImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImages"); let body: any; - body = JSON.stringify(se_DescribeImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -491,7 +445,7 @@ export const se_DescribeImageScanFindingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImageScanFindings"); let body: any; - body = JSON.stringify(se_DescribeImageScanFindingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -504,7 +458,7 @@ export const se_DescribePullThroughCacheRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePullThroughCacheRules"); let body: any; - body = JSON.stringify(se_DescribePullThroughCacheRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -517,7 +471,7 @@ export const se_DescribeRegistryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRegistry"); let body: any; - body = JSON.stringify(se_DescribeRegistryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -530,7 +484,7 @@ export const se_DescribeRepositoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRepositories"); let body: any; - body = JSON.stringify(se_DescribeRepositoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,7 +497,7 @@ export const se_GetAuthorizationTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAuthorizationToken"); let body: any; - body = JSON.stringify(se_GetAuthorizationTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +510,7 @@ export const se_GetDownloadUrlForLayerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDownloadUrlForLayer"); let body: any; - body = JSON.stringify(se_GetDownloadUrlForLayerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -569,7 +523,7 @@ export const se_GetLifecyclePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLifecyclePolicy"); let body: any; - body = JSON.stringify(se_GetLifecyclePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -582,7 +536,7 @@ export const se_GetLifecyclePolicyPreviewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLifecyclePolicyPreview"); let body: any; - body = JSON.stringify(se_GetLifecyclePolicyPreviewRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -595,7 +549,7 @@ export const se_GetRegistryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegistryPolicy"); let body: any; - body = JSON.stringify(se_GetRegistryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -608,7 +562,7 @@ export const se_GetRegistryScanningConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegistryScanningConfiguration"); let body: any; - body = JSON.stringify(se_GetRegistryScanningConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -621,7 +575,7 @@ export const se_GetRepositoryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepositoryPolicy"); let body: any; - body = JSON.stringify(se_GetRepositoryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -634,7 +588,7 @@ export const se_InitiateLayerUploadCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InitiateLayerUpload"); let body: any; - body = JSON.stringify(se_InitiateLayerUploadRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -647,7 +601,7 @@ export const se_ListImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListImages"); let body: any; - body = JSON.stringify(se_ListImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -660,7 +614,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -673,7 +627,7 @@ export const se_PutImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutImage"); let body: any; - body = JSON.stringify(se_PutImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -686,7 +640,7 @@ export const se_PutImageScanningConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutImageScanningConfiguration"); let body: any; - body = JSON.stringify(se_PutImageScanningConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -699,7 +653,7 @@ export const se_PutImageTagMutabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutImageTagMutability"); let body: any; - body = JSON.stringify(se_PutImageTagMutabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -712,7 +666,7 @@ export const se_PutLifecyclePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLifecyclePolicy"); let body: any; - body = JSON.stringify(se_PutLifecyclePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -725,7 +679,7 @@ export const se_PutRegistryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRegistryPolicy"); let body: any; - body = JSON.stringify(se_PutRegistryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -738,7 +692,7 @@ export const se_PutRegistryScanningConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRegistryScanningConfiguration"); let body: any; - body = JSON.stringify(se_PutRegistryScanningConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -751,7 +705,7 @@ export const se_PutReplicationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutReplicationConfiguration"); let body: any; - body = JSON.stringify(se_PutReplicationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -764,7 +718,7 @@ export const se_SetRepositoryPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetRepositoryPolicy"); let body: any; - body = JSON.stringify(se_SetRepositoryPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -777,7 +731,7 @@ export const se_StartImageScanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartImageScan"); let body: any; - body = JSON.stringify(se_StartImageScanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -790,7 +744,7 @@ export const se_StartLifecyclePolicyPreviewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartLifecyclePolicyPreview"); let body: any; - body = JSON.stringify(se_StartLifecyclePolicyPreviewRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,7 +757,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -816,7 +770,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -845,12 +799,12 @@ export const de_BatchCheckLayerAvailabilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchCheckLayerAvailabilityResponse(data, context); + contents = _json(data); const response: BatchCheckLayerAvailabilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -877,10 +831,9 @@ const de_BatchCheckLayerAvailabilityCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -898,12 +851,12 @@ export const de_BatchDeleteImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteImageResponse(data, context); + contents = _json(data); const response: BatchDeleteImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -930,10 +883,9 @@ const de_BatchDeleteImageCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -951,12 +903,12 @@ export const de_BatchGetImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetImageResponse(data, context); + contents = _json(data); const response: BatchGetImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -983,10 +935,9 @@ const de_BatchGetImageCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1004,12 +955,12 @@ export const de_BatchGetRepositoryScanningConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetRepositoryScanningConfigurationResponse(data, context); + contents = _json(data); const response: BatchGetRepositoryScanningConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1039,10 +990,9 @@ const de_BatchGetRepositoryScanningConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1060,12 +1010,12 @@ export const de_CompleteLayerUploadCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CompleteLayerUploadResponse(data, context); + contents = _json(data); const response: CompleteLayerUploadCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1110,10 +1060,9 @@ const de_CompleteLayerUploadCommandError = async ( throw await de_UploadNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1136,7 +1085,7 @@ export const de_CreatePullThroughCacheRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1172,10 +1121,9 @@ const de_CreatePullThroughCacheRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1198,7 +1146,7 @@ export const de_CreateRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1237,10 +1185,9 @@ const de_CreateRepositoryCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1263,7 +1210,7 @@ export const de_DeleteLifecyclePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1293,10 +1240,9 @@ const de_DeleteLifecyclePolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1319,7 +1265,7 @@ export const de_DeletePullThroughCacheRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1349,10 +1295,9 @@ const de_DeletePullThroughCacheRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1370,12 +1315,12 @@ export const de_DeleteRegistryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegistryPolicyResponse(data, context); + contents = _json(data); const response: DeleteRegistryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1405,10 +1350,9 @@ const de_DeleteRegistryPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1431,7 +1375,7 @@ export const de_DeleteRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1464,10 +1408,9 @@ const de_DeleteRepositoryCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1485,12 +1428,12 @@ export const de_DeleteRepositoryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRepositoryPolicyResponse(data, context); + contents = _json(data); const response: DeleteRepositoryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1520,10 +1463,9 @@ const de_DeleteRepositoryPolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1541,12 +1483,12 @@ export const de_DescribeImageReplicationStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeImageReplicationStatusResponse(data, context); + contents = _json(data); const response: DescribeImageReplicationStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1579,10 +1521,9 @@ const de_DescribeImageReplicationStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1605,7 +1546,7 @@ export const de_DescribeImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1635,10 +1576,9 @@ const de_DescribeImagesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1661,7 +1601,7 @@ export const de_DescribeImageScanFindingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1697,10 +1637,9 @@ const de_DescribeImageScanFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1723,7 +1662,7 @@ export const de_DescribePullThroughCacheRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1753,10 +1692,9 @@ const de_DescribePullThroughCacheRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1774,12 +1712,12 @@ export const de_DescribeRegistryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRegistryResponse(data, context); + contents = _json(data); const response: DescribeRegistryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1806,10 +1744,9 @@ const de_DescribeRegistryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1832,7 +1769,7 @@ export const de_DescribeRepositoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1859,10 +1796,9 @@ const de_DescribeRepositoriesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1885,7 +1821,7 @@ export const de_GetAuthorizationTokenCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1909,10 +1845,9 @@ const de_GetAuthorizationTokenCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1930,12 +1865,12 @@ export const de_GetDownloadUrlForLayerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDownloadUrlForLayerResponse(data, context); + contents = _json(data); const response: GetDownloadUrlForLayerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1968,10 +1903,9 @@ const de_GetDownloadUrlForLayerCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1994,7 +1928,7 @@ export const de_GetLifecyclePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2024,10 +1958,9 @@ const de_GetLifecyclePolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2050,7 +1983,7 @@ export const de_GetLifecyclePolicyPreviewCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2080,10 +2013,9 @@ const de_GetLifecyclePolicyPreviewCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2101,12 +2033,12 @@ export const de_GetRegistryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegistryPolicyResponse(data, context); + contents = _json(data); const response: GetRegistryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2136,10 +2068,9 @@ const de_GetRegistryPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2157,12 +2088,12 @@ export const de_GetRegistryScanningConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegistryScanningConfigurationResponse(data, context); + contents = _json(data); const response: GetRegistryScanningConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2189,10 +2120,9 @@ const de_GetRegistryScanningConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2210,12 +2140,12 @@ export const de_GetRepositoryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRepositoryPolicyResponse(data, context); + contents = _json(data); const response: GetRepositoryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2245,10 +2175,9 @@ const de_GetRepositoryPolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2266,12 +2195,12 @@ export const de_InitiateLayerUploadCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_InitiateLayerUploadResponse(data, context); + contents = _json(data); const response: InitiateLayerUploadCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2301,10 +2230,9 @@ const de_InitiateLayerUploadCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2322,12 +2250,12 @@ export const de_ListImagesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListImagesResponse(data, context); + contents = _json(data); const response: ListImagesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2354,10 +2282,9 @@ const de_ListImagesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2375,12 +2302,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2407,10 +2334,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2428,12 +2354,12 @@ export const de_PutImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutImageResponse(data, context); + contents = _json(data); const response: PutImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2481,10 +2407,9 @@ const de_PutImageCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2502,12 +2427,12 @@ export const de_PutImageScanningConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutImageScanningConfigurationResponse(data, context); + contents = _json(data); const response: PutImageScanningConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2537,10 +2462,9 @@ const de_PutImageScanningConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2558,12 +2482,12 @@ export const de_PutImageTagMutabilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutImageTagMutabilityResponse(data, context); + contents = _json(data); const response: PutImageTagMutabilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2590,10 +2514,9 @@ const de_PutImageTagMutabilityCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2611,12 +2534,12 @@ export const de_PutLifecyclePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLifecyclePolicyResponse(data, context); + contents = _json(data); const response: PutLifecyclePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2643,10 +2566,9 @@ const de_PutLifecyclePolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2664,12 +2586,12 @@ export const de_PutRegistryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRegistryPolicyResponse(data, context); + contents = _json(data); const response: PutRegistryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2696,10 +2618,9 @@ const de_PutRegistryPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2717,12 +2638,12 @@ export const de_PutRegistryScanningConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRegistryScanningConfigurationResponse(data, context); + contents = _json(data); const response: PutRegistryScanningConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2749,10 +2670,9 @@ const de_PutRegistryScanningConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2770,12 +2690,12 @@ export const de_PutReplicationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutReplicationConfigurationResponse(data, context); + contents = _json(data); const response: PutReplicationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2802,10 +2722,9 @@ const de_PutReplicationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2823,12 +2742,12 @@ export const de_SetRepositoryPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetRepositoryPolicyResponse(data, context); + contents = _json(data); const response: SetRepositoryPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2855,10 +2774,9 @@ const de_SetRepositoryPolicyCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2876,12 +2794,12 @@ export const de_StartImageScanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartImageScanResponse(data, context); + contents = _json(data); const response: StartImageScanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2920,10 +2838,9 @@ const de_StartImageScanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2941,12 +2858,12 @@ export const de_StartLifecyclePolicyPreviewCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartLifecyclePolicyPreviewResponse(data, context); + contents = _json(data); const response: StartLifecyclePolicyPreviewCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2979,10 +2896,9 @@ const de_StartLifecyclePolicyPreviewCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3000,12 +2916,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3038,10 +2954,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3059,12 +2974,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3097,10 +3012,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3118,12 +3032,12 @@ export const de_UploadLayerPartCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UploadLayerPartResponse(data, context); + contents = _json(data); const response: UploadLayerPartCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3162,10 +3076,9 @@ const de_UploadLayerPartCommandError = async ( throw await de_UploadNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3179,7 +3092,7 @@ const de_EmptyUploadExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EmptyUploadException(body, context); + const deserialized: any = _json(body); const exception = new EmptyUploadException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3195,7 +3108,7 @@ const de_ImageAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ImageAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3211,7 +3124,7 @@ const de_ImageDigestDoesNotMatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageDigestDoesNotMatchException(body, context); + const deserialized: any = _json(body); const exception = new ImageDigestDoesNotMatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3227,7 +3140,7 @@ const de_ImageNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ImageNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3243,7 +3156,7 @@ const de_ImageTagAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageTagAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ImageTagAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3259,7 +3172,7 @@ const de_InvalidLayerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLayerException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLayerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3275,7 +3188,7 @@ const de_InvalidLayerPartExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLayerPartException(body, context); + const deserialized: any = _json(body); const exception = new InvalidLayerPartException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3291,7 +3204,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3307,7 +3220,7 @@ const de_InvalidTagParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3320,7 +3233,7 @@ const de_InvalidTagParameterExceptionRes = async ( */ const de_KmsExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KmsException(body, context); + const deserialized: any = _json(body); const exception = new KmsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3336,7 +3249,7 @@ const de_LayerAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayerAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new LayerAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3352,7 +3265,7 @@ const de_LayerInaccessibleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayerInaccessibleException(body, context); + const deserialized: any = _json(body); const exception = new LayerInaccessibleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3368,7 +3281,7 @@ const de_LayerPartTooSmallExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayerPartTooSmallException(body, context); + const deserialized: any = _json(body); const exception = new LayerPartTooSmallException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3384,7 +3297,7 @@ const de_LayersNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LayersNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new LayersNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3400,7 +3313,7 @@ const de_LifecyclePolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LifecyclePolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new LifecyclePolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3416,7 +3329,7 @@ const de_LifecyclePolicyPreviewInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LifecyclePolicyPreviewInProgressException(body, context); + const deserialized: any = _json(body); const exception = new LifecyclePolicyPreviewInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3432,7 +3345,7 @@ const de_LifecyclePolicyPreviewNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LifecyclePolicyPreviewNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new LifecyclePolicyPreviewNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3448,7 +3361,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3464,7 +3377,7 @@ const de_PullThroughCacheRuleAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullThroughCacheRuleAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new PullThroughCacheRuleAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3480,7 +3393,7 @@ const de_PullThroughCacheRuleNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PullThroughCacheRuleNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PullThroughCacheRuleNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3496,7 +3409,7 @@ const de_ReferencedImagesNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReferencedImagesNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ReferencedImagesNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3512,7 +3425,7 @@ const de_RegistryPolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RegistryPolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RegistryPolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3528,7 +3441,7 @@ const de_RepositoryAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3544,7 +3457,7 @@ const de_RepositoryNotEmptyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNotEmptyException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNotEmptyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3560,7 +3473,7 @@ const de_RepositoryNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3576,7 +3489,7 @@ const de_RepositoryPolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RepositoryPolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RepositoryPolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3592,7 +3505,7 @@ const de_ScanNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ScanNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ScanNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3605,7 +3518,7 @@ const de_ScanNotFoundExceptionRes = async ( */ const de_ServerExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServerException(body, context); + const deserialized: any = _json(body); const exception = new ServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3621,7 +3534,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3637,7 +3550,7 @@ const de_UnsupportedImageTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedImageTypeException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedImageTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3653,7 +3566,7 @@ const de_UnsupportedUpstreamRegistryExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedUpstreamRegistryException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedUpstreamRegistryException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3669,7 +3582,7 @@ const de_UploadNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UploadNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new UploadNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3682,7 +3595,7 @@ const de_UploadNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3690,2675 +3603,834 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1BatchCheckLayerAvailabilityRequest - */ -const se_BatchCheckLayerAvailabilityRequest = ( - input: BatchCheckLayerAvailabilityRequest, - context: __SerdeContext -): any => { - return { - ...(input.layerDigests != null && { - layerDigests: se_BatchedOperationLayerDigestList(input.layerDigests, context), - }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1BatchDeleteImageRequest - */ -const se_BatchDeleteImageRequest = (input: BatchDeleteImageRequest, context: __SerdeContext): any => { - return { - ...(input.imageIds != null && { imageIds: se_ImageIdentifierList(input.imageIds, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1BatchedOperationLayerDigestList - */ -const se_BatchedOperationLayerDigestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1BatchGetImageRequest - */ -const se_BatchGetImageRequest = (input: BatchGetImageRequest, context: __SerdeContext): any => { - return { - ...(input.acceptedMediaTypes != null && { - acceptedMediaTypes: se_MediaTypeList(input.acceptedMediaTypes, context), - }), - ...(input.imageIds != null && { imageIds: se_ImageIdentifierList(input.imageIds, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1BatchGetRepositoryScanningConfigurationRequest - */ -const se_BatchGetRepositoryScanningConfigurationRequest = ( - input: BatchGetRepositoryScanningConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.repositoryNames != null && { - repositoryNames: se_ScanningConfigurationRepositoryNameList(input.repositoryNames, context), - }), - }; -}; - -/** - * serializeAws_json1_1CompleteLayerUploadRequest - */ -const se_CompleteLayerUploadRequest = (input: CompleteLayerUploadRequest, context: __SerdeContext): any => { - return { - ...(input.layerDigests != null && { layerDigests: se_LayerDigestList(input.layerDigests, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.uploadId != null && { uploadId: input.uploadId }), - }; -}; - -/** - * serializeAws_json1_1CreatePullThroughCacheRuleRequest - */ -const se_CreatePullThroughCacheRuleRequest = ( - input: CreatePullThroughCacheRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.ecrRepositoryPrefix != null && { ecrRepositoryPrefix: input.ecrRepositoryPrefix }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.upstreamRegistryUrl != null && { upstreamRegistryUrl: input.upstreamRegistryUrl }), - }; -}; - -/** - * serializeAws_json1_1CreateRepositoryRequest - */ -const se_CreateRepositoryRequest = (input: CreateRepositoryRequest, context: __SerdeContext): any => { - return { - ...(input.encryptionConfiguration != null && { - encryptionConfiguration: se_EncryptionConfiguration(input.encryptionConfiguration, context), - }), - ...(input.imageScanningConfiguration != null && { - imageScanningConfiguration: se_ImageScanningConfiguration(input.imageScanningConfiguration, context), - }), - ...(input.imageTagMutability != null && { imageTagMutability: input.imageTagMutability }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteLifecyclePolicyRequest - */ -const se_DeleteLifecyclePolicyRequest = (input: DeleteLifecyclePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1DeletePullThroughCacheRuleRequest - */ -const se_DeletePullThroughCacheRuleRequest = ( - input: DeletePullThroughCacheRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.ecrRepositoryPrefix != null && { ecrRepositoryPrefix: input.ecrRepositoryPrefix }), - ...(input.registryId != null && { registryId: input.registryId }), - }; -}; - -/** - * serializeAws_json1_1DeleteRegistryPolicyRequest - */ -const se_DeleteRegistryPolicyRequest = (input: DeleteRegistryPolicyRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1DeleteRepositoryPolicyRequest - */ -const se_DeleteRepositoryPolicyRequest = (input: DeleteRepositoryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1DeleteRepositoryRequest - */ -const se_DeleteRepositoryRequest = (input: DeleteRepositoryRequest, context: __SerdeContext): any => { - return { - ...(input.force != null && { force: input.force }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1DescribeImageReplicationStatusRequest - */ -const se_DescribeImageReplicationStatusRequest = ( - input: DescribeImageReplicationStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.imageId != null && { imageId: se_ImageIdentifier(input.imageId, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1DescribeImageScanFindingsRequest - */ -const se_DescribeImageScanFindingsRequest = (input: DescribeImageScanFindingsRequest, context: __SerdeContext): any => { - return { - ...(input.imageId != null && { imageId: se_ImageIdentifier(input.imageId, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1DescribeImagesFilter - */ -const se_DescribeImagesFilter = (input: DescribeImagesFilter, context: __SerdeContext): any => { - return { - ...(input.tagStatus != null && { tagStatus: input.tagStatus }), - }; -}; - -/** - * serializeAws_json1_1DescribeImagesRequest - */ -const se_DescribeImagesRequest = (input: DescribeImagesRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_DescribeImagesFilter(input.filter, context) }), - ...(input.imageIds != null && { imageIds: se_ImageIdentifierList(input.imageIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1DescribePullThroughCacheRulesRequest - */ -const se_DescribePullThroughCacheRulesRequest = ( - input: DescribePullThroughCacheRulesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ecrRepositoryPrefixes != null && { - ecrRepositoryPrefixes: se_PullThroughCacheRuleRepositoryPrefixList(input.ecrRepositoryPrefixes, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - }; -}; - -/** - * serializeAws_json1_1DescribeRegistryRequest - */ -const se_DescribeRegistryRequest = (input: DescribeRegistryRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1DescribeRepositoriesRequest - */ -const se_DescribeRepositoriesRequest = (input: DescribeRepositoriesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryNames != null && { repositoryNames: se_RepositoryNameList(input.repositoryNames, context) }), - }; -}; - -/** - * serializeAws_json1_1EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.encryptionType != null && { encryptionType: input.encryptionType }), - ...(input.kmsKey != null && { kmsKey: input.kmsKey }), - }; -}; - -/** - * serializeAws_json1_1GetAuthorizationTokenRegistryIdList - */ -const se_GetAuthorizationTokenRegistryIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1GetAuthorizationTokenRequest - */ -const se_GetAuthorizationTokenRequest = (input: GetAuthorizationTokenRequest, context: __SerdeContext): any => { - return { - ...(input.registryIds != null && { - registryIds: se_GetAuthorizationTokenRegistryIdList(input.registryIds, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetDownloadUrlForLayerRequest - */ -const se_GetDownloadUrlForLayerRequest = (input: GetDownloadUrlForLayerRequest, context: __SerdeContext): any => { - return { - ...(input.layerDigest != null && { layerDigest: input.layerDigest }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1GetLifecyclePolicyPreviewRequest - */ -const se_GetLifecyclePolicyPreviewRequest = (input: GetLifecyclePolicyPreviewRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_LifecyclePolicyPreviewFilter(input.filter, context) }), - ...(input.imageIds != null && { imageIds: se_ImageIdentifierList(input.imageIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1GetLifecyclePolicyRequest - */ -const se_GetLifecyclePolicyRequest = (input: GetLifecyclePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1GetRegistryPolicyRequest - */ -const se_GetRegistryPolicyRequest = (input: GetRegistryPolicyRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetRegistryScanningConfigurationRequest - */ -const se_GetRegistryScanningConfigurationRequest = ( - input: GetRegistryScanningConfigurationRequest, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetRepositoryPolicyRequest - */ -const se_GetRepositoryPolicyRequest = (input: GetRepositoryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1ImageIdentifier - */ -const se_ImageIdentifier = (input: ImageIdentifier, context: __SerdeContext): any => { - return { - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.imageTag != null && { imageTag: input.imageTag }), - }; -}; - -/** - * serializeAws_json1_1ImageIdentifierList - */ -const se_ImageIdentifierList = (input: ImageIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ImageIdentifier(entry, context); - }); -}; - -/** - * serializeAws_json1_1ImageScanningConfiguration - */ -const se_ImageScanningConfiguration = (input: ImageScanningConfiguration, context: __SerdeContext): any => { - return { - ...(input.scanOnPush != null && { scanOnPush: input.scanOnPush }), - }; -}; - -/** - * serializeAws_json1_1InitiateLayerUploadRequest - */ -const se_InitiateLayerUploadRequest = (input: InitiateLayerUploadRequest, context: __SerdeContext): any => { - return { - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1LayerDigestList - */ -const se_LayerDigestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LifecyclePolicyPreviewFilter - */ -const se_LifecyclePolicyPreviewFilter = (input: LifecyclePolicyPreviewFilter, context: __SerdeContext): any => { - return { - ...(input.tagStatus != null && { tagStatus: input.tagStatus }), - }; -}; - -/** - * serializeAws_json1_1ListImagesFilter - */ -const se_ListImagesFilter = (input: ListImagesFilter, context: __SerdeContext): any => { - return { - ...(input.tagStatus != null && { tagStatus: input.tagStatus }), - }; -}; - -/** - * serializeAws_json1_1ListImagesRequest - */ -const se_ListImagesRequest = (input: ListImagesRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_ListImagesFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; - -/** - * serializeAws_json1_1MediaTypeList - */ -const se_MediaTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PullThroughCacheRuleRepositoryPrefixList - */ -const se_PullThroughCacheRuleRepositoryPrefixList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PutImageRequest - */ -const se_PutImageRequest = (input: PutImageRequest, context: __SerdeContext): any => { - return { - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.imageManifest != null && { imageManifest: input.imageManifest }), - ...(input.imageManifestMediaType != null && { imageManifestMediaType: input.imageManifestMediaType }), - ...(input.imageTag != null && { imageTag: input.imageTag }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1PutImageScanningConfigurationRequest - */ -const se_PutImageScanningConfigurationRequest = ( - input: PutImageScanningConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.imageScanningConfiguration != null && { - imageScanningConfiguration: se_ImageScanningConfiguration(input.imageScanningConfiguration, context), - }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1PutImageTagMutabilityRequest - */ -const se_PutImageTagMutabilityRequest = (input: PutImageTagMutabilityRequest, context: __SerdeContext): any => { - return { - ...(input.imageTagMutability != null && { imageTagMutability: input.imageTagMutability }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1PutLifecyclePolicyRequest - */ -const se_PutLifecyclePolicyRequest = (input: PutLifecyclePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.lifecyclePolicyText != null && { lifecyclePolicyText: input.lifecyclePolicyText }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1PutRegistryPolicyRequest - */ -const se_PutRegistryPolicyRequest = (input: PutRegistryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.policyText != null && { policyText: input.policyText }), - }; -}; - -/** - * serializeAws_json1_1PutRegistryScanningConfigurationRequest - */ -const se_PutRegistryScanningConfigurationRequest = ( - input: PutRegistryScanningConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.rules != null && { rules: se_RegistryScanningRuleList(input.rules, context) }), - ...(input.scanType != null && { scanType: input.scanType }), - }; -}; - -/** - * serializeAws_json1_1PutReplicationConfigurationRequest - */ -const se_PutReplicationConfigurationRequest = ( - input: PutReplicationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.replicationConfiguration != null && { - replicationConfiguration: se_ReplicationConfiguration(input.replicationConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1RegistryScanningRule - */ -const se_RegistryScanningRule = (input: RegistryScanningRule, context: __SerdeContext): any => { - return { - ...(input.repositoryFilters != null && { - repositoryFilters: se_ScanningRepositoryFilterList(input.repositoryFilters, context), - }), - ...(input.scanFrequency != null && { scanFrequency: input.scanFrequency }), - }; -}; - -/** - * serializeAws_json1_1RegistryScanningRuleList - */ -const se_RegistryScanningRuleList = (input: RegistryScanningRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegistryScanningRule(entry, context); - }); -}; - -/** - * serializeAws_json1_1ReplicationConfiguration - */ -const se_ReplicationConfiguration = (input: ReplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.rules != null && { rules: se_ReplicationRuleList(input.rules, context) }), - }; -}; - -/** - * serializeAws_json1_1ReplicationDestination - */ -const se_ReplicationDestination = (input: ReplicationDestination, context: __SerdeContext): any => { - return { - ...(input.region != null && { region: input.region }), - ...(input.registryId != null && { registryId: input.registryId }), - }; -}; - -/** - * serializeAws_json1_1ReplicationDestinationList - */ -const se_ReplicationDestinationList = (input: ReplicationDestination[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicationDestination(entry, context); - }); -}; - -/** - * serializeAws_json1_1ReplicationRule - */ -const se_ReplicationRule = (input: ReplicationRule, context: __SerdeContext): any => { - return { - ...(input.destinations != null && { destinations: se_ReplicationDestinationList(input.destinations, context) }), - ...(input.repositoryFilters != null && { - repositoryFilters: se_RepositoryFilterList(input.repositoryFilters, context), - }), - }; -}; - -/** - * serializeAws_json1_1ReplicationRuleList - */ -const se_ReplicationRuleList = (input: ReplicationRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicationRule(entry, context); - }); -}; - -/** - * serializeAws_json1_1RepositoryFilter - */ -const se_RepositoryFilter = (input: RepositoryFilter, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: input.filter }), - ...(input.filterType != null && { filterType: input.filterType }), - }; -}; - -/** - * serializeAws_json1_1RepositoryFilterList - */ -const se_RepositoryFilterList = (input: RepositoryFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RepositoryFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1RepositoryNameList - */ -const se_RepositoryNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ScanningConfigurationRepositoryNameList - */ -const se_ScanningConfigurationRepositoryNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ScanningRepositoryFilter - */ -const se_ScanningRepositoryFilter = (input: ScanningRepositoryFilter, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: input.filter }), - ...(input.filterType != null && { filterType: input.filterType }), - }; -}; - -/** - * serializeAws_json1_1ScanningRepositoryFilterList - */ -const se_ScanningRepositoryFilterList = (input: ScanningRepositoryFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ScanningRepositoryFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1SetRepositoryPolicyRequest - */ -const se_SetRepositoryPolicyRequest = (input: SetRepositoryPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.force != null && { force: input.force }), - ...(input.policyText != null && { policyText: input.policyText }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1StartImageScanRequest - */ -const se_StartImageScanRequest = (input: StartImageScanRequest, context: __SerdeContext): any => { - return { - ...(input.imageId != null && { imageId: se_ImageIdentifier(input.imageId, context) }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1StartLifecyclePolicyPreviewRequest - */ -const se_StartLifecyclePolicyPreviewRequest = ( - input: StartLifecyclePolicyPreviewRequest, - context: __SerdeContext -): any => { - return { - ...(input.lifecyclePolicyText != null && { lifecyclePolicyText: input.lifecyclePolicyText }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UploadLayerPartRequest - */ -const se_UploadLayerPartRequest = (input: UploadLayerPartRequest, context: __SerdeContext): any => { - return { - ...(input.layerPartBlob != null && { layerPartBlob: context.base64Encoder(input.layerPartBlob) }), - ...(input.partFirstByte != null && { partFirstByte: input.partFirstByte }), - ...(input.partLastByte != null && { partLastByte: input.partLastByte }), - ...(input.registryId != null && { registryId: input.registryId }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.uploadId != null && { uploadId: input.uploadId }), - }; -}; - -/** - * deserializeAws_json1_1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_json1_1AttributeList - */ -const de_AttributeList = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AuthorizationData - */ -const de_AuthorizationData = (output: any, context: __SerdeContext): AuthorizationData => { - return { - authorizationToken: __expectString(output.authorizationToken), - expiresAt: - output.expiresAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiresAt))) : undefined, - proxyEndpoint: __expectString(output.proxyEndpoint), - } as any; -}; - -/** - * deserializeAws_json1_1AuthorizationDataList - */ -const de_AuthorizationDataList = (output: any, context: __SerdeContext): AuthorizationData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthorizationData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AwsEcrContainerImageDetails - */ -const de_AwsEcrContainerImageDetails = (output: any, context: __SerdeContext): AwsEcrContainerImageDetails => { - return { - architecture: __expectString(output.architecture), - author: __expectString(output.author), - imageHash: __expectString(output.imageHash), - imageTags: output.imageTags != null ? de_ImageTagsList(output.imageTags, context) : undefined, - platform: __expectString(output.platform), - pushedAt: - output.pushedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.pushedAt))) : undefined, - registry: __expectString(output.registry), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1BatchCheckLayerAvailabilityResponse - */ -const de_BatchCheckLayerAvailabilityResponse = ( - output: any, - context: __SerdeContext -): BatchCheckLayerAvailabilityResponse => { - return { - failures: output.failures != null ? de_LayerFailureList(output.failures, context) : undefined, - layers: output.layers != null ? de_LayerList(output.layers, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteImageResponse - */ -const de_BatchDeleteImageResponse = (output: any, context: __SerdeContext): BatchDeleteImageResponse => { - return { - failures: output.failures != null ? de_ImageFailureList(output.failures, context) : undefined, - imageIds: output.imageIds != null ? de_ImageIdentifierList(output.imageIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetImageResponse - */ -const de_BatchGetImageResponse = (output: any, context: __SerdeContext): BatchGetImageResponse => { - return { - failures: output.failures != null ? de_ImageFailureList(output.failures, context) : undefined, - images: output.images != null ? de_ImageList(output.images, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetRepositoryScanningConfigurationResponse - */ -const de_BatchGetRepositoryScanningConfigurationResponse = ( - output: any, - context: __SerdeContext -): BatchGetRepositoryScanningConfigurationResponse => { - return { - failures: - output.failures != null ? de_RepositoryScanningConfigurationFailureList(output.failures, context) : undefined, - scanningConfigurations: - output.scanningConfigurations != null - ? de_RepositoryScanningConfigurationList(output.scanningConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CompleteLayerUploadResponse - */ -const de_CompleteLayerUploadResponse = (output: any, context: __SerdeContext): CompleteLayerUploadResponse => { - return { - layerDigest: __expectString(output.layerDigest), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - uploadId: __expectString(output.uploadId), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePullThroughCacheRuleResponse - */ -const de_CreatePullThroughCacheRuleResponse = ( - output: any, - context: __SerdeContext -): CreatePullThroughCacheRuleResponse => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - ecrRepositoryPrefix: __expectString(output.ecrRepositoryPrefix), - registryId: __expectString(output.registryId), - upstreamRegistryUrl: __expectString(output.upstreamRegistryUrl), - } as any; -}; - -/** - * deserializeAws_json1_1CreateRepositoryResponse - */ -const de_CreateRepositoryResponse = (output: any, context: __SerdeContext): CreateRepositoryResponse => { - return { - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CvssScore - */ -const de_CvssScore = (output: any, context: __SerdeContext): CvssScore => { - return { - baseScore: __limitedParseDouble(output.baseScore), - scoringVector: __expectString(output.scoringVector), - source: __expectString(output.source), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_json1_1CvssScoreAdjustment - */ -const de_CvssScoreAdjustment = (output: any, context: __SerdeContext): CvssScoreAdjustment => { - return { - metric: __expectString(output.metric), - reason: __expectString(output.reason), - } as any; -}; - -/** - * deserializeAws_json1_1CvssScoreAdjustmentList - */ -const de_CvssScoreAdjustmentList = (output: any, context: __SerdeContext): CvssScoreAdjustment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CvssScoreAdjustment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CvssScoreDetails - */ -const de_CvssScoreDetails = (output: any, context: __SerdeContext): CvssScoreDetails => { - return { - adjustments: output.adjustments != null ? de_CvssScoreAdjustmentList(output.adjustments, context) : undefined, - score: __limitedParseDouble(output.score), - scoreSource: __expectString(output.scoreSource), - scoringVector: __expectString(output.scoringVector), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_json1_1CvssScoreList - */ -const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CvssScore(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeleteLifecyclePolicyResponse - */ -const de_DeleteLifecyclePolicyResponse = (output: any, context: __SerdeContext): DeleteLifecyclePolicyResponse => { - return { - lastEvaluatedAt: - output.lastEvaluatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastEvaluatedAt))) - : undefined, - lifecyclePolicyText: __expectString(output.lifecyclePolicyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1DeletePullThroughCacheRuleResponse - */ -const de_DeletePullThroughCacheRuleResponse = ( - output: any, - context: __SerdeContext -): DeletePullThroughCacheRuleResponse => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - ecrRepositoryPrefix: __expectString(output.ecrRepositoryPrefix), - registryId: __expectString(output.registryId), - upstreamRegistryUrl: __expectString(output.upstreamRegistryUrl), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRegistryPolicyResponse - */ -const de_DeleteRegistryPolicyResponse = (output: any, context: __SerdeContext): DeleteRegistryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRepositoryPolicyResponse - */ -const de_DeleteRepositoryPolicyResponse = (output: any, context: __SerdeContext): DeleteRepositoryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRepositoryResponse - */ -const de_DeleteRepositoryResponse = (output: any, context: __SerdeContext): DeleteRepositoryResponse => { - return { - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeImageReplicationStatusResponse - */ -const de_DescribeImageReplicationStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeImageReplicationStatusResponse => { - return { - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - replicationStatuses: - output.replicationStatuses != null - ? de_ImageReplicationStatusList(output.replicationStatuses, context) - : undefined, - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeImageScanFindingsResponse - */ -const de_DescribeImageScanFindingsResponse = ( - output: any, - context: __SerdeContext -): DescribeImageScanFindingsResponse => { - return { - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - imageScanFindings: - output.imageScanFindings != null ? de_ImageScanFindings(output.imageScanFindings, context) : undefined, - imageScanStatus: output.imageScanStatus != null ? de_ImageScanStatus(output.imageScanStatus, context) : undefined, - nextToken: __expectString(output.nextToken), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeImagesResponse - */ -const de_DescribeImagesResponse = (output: any, context: __SerdeContext): DescribeImagesResponse => { - return { - imageDetails: output.imageDetails != null ? de_ImageDetailList(output.imageDetails, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePullThroughCacheRulesResponse - */ -const de_DescribePullThroughCacheRulesResponse = ( - output: any, - context: __SerdeContext -): DescribePullThroughCacheRulesResponse => { - return { - nextToken: __expectString(output.nextToken), - pullThroughCacheRules: - output.pullThroughCacheRules != null - ? de_PullThroughCacheRuleList(output.pullThroughCacheRules, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRegistryResponse - */ -const de_DescribeRegistryResponse = (output: any, context: __SerdeContext): DescribeRegistryResponse => { - return { - registryId: __expectString(output.registryId), - replicationConfiguration: - output.replicationConfiguration != null - ? de_ReplicationConfiguration(output.replicationConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRepositoriesResponse - */ -const de_DescribeRepositoriesResponse = (output: any, context: __SerdeContext): DescribeRepositoriesResponse => { - return { - nextToken: __expectString(output.nextToken), - repositories: output.repositories != null ? de_RepositoryList(output.repositories, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EmptyUploadException - */ -const de_EmptyUploadException = (output: any, context: __SerdeContext): EmptyUploadException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - encryptionType: __expectString(output.encryptionType), - kmsKey: __expectString(output.kmsKey), - } as any; -}; - -/** - * deserializeAws_json1_1EnhancedImageScanFinding - */ -const de_EnhancedImageScanFinding = (output: any, context: __SerdeContext): EnhancedImageScanFinding => { - return { - awsAccountId: __expectString(output.awsAccountId), - description: __expectString(output.description), - findingArn: __expectString(output.findingArn), - firstObservedAt: - output.firstObservedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.firstObservedAt))) - : undefined, - lastObservedAt: - output.lastObservedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastObservedAt))) - : undefined, - packageVulnerabilityDetails: - output.packageVulnerabilityDetails != null - ? de_PackageVulnerabilityDetails(output.packageVulnerabilityDetails, context) - : undefined, - remediation: output.remediation != null ? de_Remediation(output.remediation, context) : undefined, - resources: output.resources != null ? de_ResourceList(output.resources, context) : undefined, - score: __limitedParseDouble(output.score), - scoreDetails: output.scoreDetails != null ? de_ScoreDetails(output.scoreDetails, context) : undefined, - severity: __expectString(output.severity), - status: __expectString(output.status), - title: __expectString(output.title), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EnhancedImageScanFindingList - */ -const de_EnhancedImageScanFindingList = (output: any, context: __SerdeContext): EnhancedImageScanFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnhancedImageScanFinding(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FindingSeverityCounts - */ -const de_FindingSeverityCounts = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [FindingSeverity | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1GetAuthorizationTokenResponse - */ -const de_GetAuthorizationTokenResponse = (output: any, context: __SerdeContext): GetAuthorizationTokenResponse => { - return { - authorizationData: - output.authorizationData != null ? de_AuthorizationDataList(output.authorizationData, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDownloadUrlForLayerResponse - */ -const de_GetDownloadUrlForLayerResponse = (output: any, context: __SerdeContext): GetDownloadUrlForLayerResponse => { - return { - downloadUrl: __expectString(output.downloadUrl), - layerDigest: __expectString(output.layerDigest), - } as any; -}; - -/** - * deserializeAws_json1_1GetLifecyclePolicyPreviewResponse - */ -const de_GetLifecyclePolicyPreviewResponse = ( - output: any, - context: __SerdeContext -): GetLifecyclePolicyPreviewResponse => { - return { - lifecyclePolicyText: __expectString(output.lifecyclePolicyText), - nextToken: __expectString(output.nextToken), - previewResults: - output.previewResults != null ? de_LifecyclePolicyPreviewResultList(output.previewResults, context) : undefined, - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - status: __expectString(output.status), - summary: output.summary != null ? de_LifecyclePolicyPreviewSummary(output.summary, context) : undefined, - } as any; -}; +// se_BatchCheckLayerAvailabilityRequest omitted. -/** - * deserializeAws_json1_1GetLifecyclePolicyResponse - */ -const de_GetLifecyclePolicyResponse = (output: any, context: __SerdeContext): GetLifecyclePolicyResponse => { - return { - lastEvaluatedAt: - output.lastEvaluatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastEvaluatedAt))) - : undefined, - lifecyclePolicyText: __expectString(output.lifecyclePolicyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_BatchDeleteImageRequest omitted. -/** - * deserializeAws_json1_1GetRegistryPolicyResponse - */ -const de_GetRegistryPolicyResponse = (output: any, context: __SerdeContext): GetRegistryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - } as any; -}; +// se_BatchedOperationLayerDigestList omitted. -/** - * deserializeAws_json1_1GetRegistryScanningConfigurationResponse - */ -const de_GetRegistryScanningConfigurationResponse = ( - output: any, - context: __SerdeContext -): GetRegistryScanningConfigurationResponse => { - return { - registryId: __expectString(output.registryId), - scanningConfiguration: - output.scanningConfiguration != null - ? de_RegistryScanningConfiguration(output.scanningConfiguration, context) - : undefined, - } as any; -}; +// se_BatchGetImageRequest omitted. -/** - * deserializeAws_json1_1GetRepositoryPolicyResponse - */ -const de_GetRepositoryPolicyResponse = (output: any, context: __SerdeContext): GetRepositoryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_BatchGetRepositoryScanningConfigurationRequest omitted. -/** - * deserializeAws_json1_1Image - */ -const de_Image = (output: any, context: __SerdeContext): Image => { - return { - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - imageManifest: __expectString(output.imageManifest), - imageManifestMediaType: __expectString(output.imageManifestMediaType), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_CompleteLayerUploadRequest omitted. -/** - * deserializeAws_json1_1ImageAlreadyExistsException - */ -const de_ImageAlreadyExistsException = (output: any, context: __SerdeContext): ImageAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_CreatePullThroughCacheRuleRequest omitted. -/** - * deserializeAws_json1_1ImageDetail - */ -const de_ImageDetail = (output: any, context: __SerdeContext): ImageDetail => { - return { - artifactMediaType: __expectString(output.artifactMediaType), - imageDigest: __expectString(output.imageDigest), - imageManifestMediaType: __expectString(output.imageManifestMediaType), - imagePushedAt: - output.imagePushedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.imagePushedAt))) - : undefined, - imageScanFindingsSummary: - output.imageScanFindingsSummary != null - ? de_ImageScanFindingsSummary(output.imageScanFindingsSummary, context) - : undefined, - imageScanStatus: output.imageScanStatus != null ? de_ImageScanStatus(output.imageScanStatus, context) : undefined, - imageSizeInBytes: __expectLong(output.imageSizeInBytes), - imageTags: output.imageTags != null ? de_ImageTagList(output.imageTags, context) : undefined, - lastRecordedPullTime: - output.lastRecordedPullTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastRecordedPullTime))) - : undefined, - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_CreateRepositoryRequest omitted. -/** - * deserializeAws_json1_1ImageDetailList - */ -const de_ImageDetailList = (output: any, context: __SerdeContext): ImageDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageDetail(entry, context); - }); - return retVal; -}; +// se_DeleteLifecyclePolicyRequest omitted. -/** - * deserializeAws_json1_1ImageDigestDoesNotMatchException - */ -const de_ImageDigestDoesNotMatchException = ( - output: any, - context: __SerdeContext -): ImageDigestDoesNotMatchException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DeletePullThroughCacheRuleRequest omitted. -/** - * deserializeAws_json1_1ImageFailure - */ -const de_ImageFailure = (output: any, context: __SerdeContext): ImageFailure => { - return { - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - } as any; -}; +// se_DeleteRegistryPolicyRequest omitted. -/** - * deserializeAws_json1_1ImageFailureList - */ -const de_ImageFailureList = (output: any, context: __SerdeContext): ImageFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageFailure(entry, context); - }); - return retVal; -}; +// se_DeleteRepositoryPolicyRequest omitted. -/** - * deserializeAws_json1_1ImageIdentifier - */ -const de_ImageIdentifier = (output: any, context: __SerdeContext): ImageIdentifier => { - return { - imageDigest: __expectString(output.imageDigest), - imageTag: __expectString(output.imageTag), - } as any; -}; +// se_DeleteRepositoryRequest omitted. -/** - * deserializeAws_json1_1ImageIdentifierList - */ -const de_ImageIdentifierList = (output: any, context: __SerdeContext): ImageIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageIdentifier(entry, context); - }); - return retVal; -}; +// se_DescribeImageReplicationStatusRequest omitted. -/** - * deserializeAws_json1_1ImageList - */ -const de_ImageList = (output: any, context: __SerdeContext): Image[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Image(entry, context); - }); - return retVal; -}; +// se_DescribeImageScanFindingsRequest omitted. -/** - * deserializeAws_json1_1ImageNotFoundException - */ -const de_ImageNotFoundException = (output: any, context: __SerdeContext): ImageNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DescribeImagesFilter omitted. -/** - * deserializeAws_json1_1ImageReplicationStatus - */ -const de_ImageReplicationStatus = (output: any, context: __SerdeContext): ImageReplicationStatus => { - return { - failureCode: __expectString(output.failureCode), - region: __expectString(output.region), - registryId: __expectString(output.registryId), - status: __expectString(output.status), - } as any; -}; +// se_DescribeImagesRequest omitted. -/** - * deserializeAws_json1_1ImageReplicationStatusList - */ -const de_ImageReplicationStatusList = (output: any, context: __SerdeContext): ImageReplicationStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageReplicationStatus(entry, context); - }); - return retVal; -}; +// se_DescribePullThroughCacheRulesRequest omitted. -/** - * deserializeAws_json1_1ImageScanFinding - */ -const de_ImageScanFinding = (output: any, context: __SerdeContext): ImageScanFinding => { - return { - attributes: output.attributes != null ? de_AttributeList(output.attributes, context) : undefined, - description: __expectString(output.description), - name: __expectString(output.name), - severity: __expectString(output.severity), - uri: __expectString(output.uri), - } as any; -}; +// se_DescribeRegistryRequest omitted. -/** - * deserializeAws_json1_1ImageScanFindingList - */ -const de_ImageScanFindingList = (output: any, context: __SerdeContext): ImageScanFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageScanFinding(entry, context); - }); - return retVal; -}; +// se_DescribeRepositoriesRequest omitted. -/** - * deserializeAws_json1_1ImageScanFindings - */ -const de_ImageScanFindings = (output: any, context: __SerdeContext): ImageScanFindings => { - return { - enhancedFindings: - output.enhancedFindings != null ? de_EnhancedImageScanFindingList(output.enhancedFindings, context) : undefined, - findingSeverityCounts: - output.findingSeverityCounts != null - ? de_FindingSeverityCounts(output.findingSeverityCounts, context) - : undefined, - findings: output.findings != null ? de_ImageScanFindingList(output.findings, context) : undefined, - imageScanCompletedAt: - output.imageScanCompletedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.imageScanCompletedAt))) - : undefined, - vulnerabilitySourceUpdatedAt: - output.vulnerabilitySourceUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vulnerabilitySourceUpdatedAt))) - : undefined, - } as any; -}; +// se_EncryptionConfiguration omitted. -/** - * deserializeAws_json1_1ImageScanFindingsSummary - */ -const de_ImageScanFindingsSummary = (output: any, context: __SerdeContext): ImageScanFindingsSummary => { - return { - findingSeverityCounts: - output.findingSeverityCounts != null - ? de_FindingSeverityCounts(output.findingSeverityCounts, context) - : undefined, - imageScanCompletedAt: - output.imageScanCompletedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.imageScanCompletedAt))) - : undefined, - vulnerabilitySourceUpdatedAt: - output.vulnerabilitySourceUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vulnerabilitySourceUpdatedAt))) - : undefined, - } as any; -}; +// se_GetAuthorizationTokenRegistryIdList omitted. -/** - * deserializeAws_json1_1ImageScanningConfiguration - */ -const de_ImageScanningConfiguration = (output: any, context: __SerdeContext): ImageScanningConfiguration => { - return { - scanOnPush: __expectBoolean(output.scanOnPush), - } as any; -}; +// se_GetAuthorizationTokenRequest omitted. -/** - * deserializeAws_json1_1ImageScanStatus - */ -const de_ImageScanStatus = (output: any, context: __SerdeContext): ImageScanStatus => { - return { - description: __expectString(output.description), - status: __expectString(output.status), - } as any; -}; +// se_GetDownloadUrlForLayerRequest omitted. -/** - * deserializeAws_json1_1ImageTagAlreadyExistsException - */ -const de_ImageTagAlreadyExistsException = (output: any, context: __SerdeContext): ImageTagAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_GetLifecyclePolicyPreviewRequest omitted. -/** - * deserializeAws_json1_1ImageTagList - */ -const de_ImageTagList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_GetLifecyclePolicyRequest omitted. -/** - * deserializeAws_json1_1ImageTagsList - */ -const de_ImageTagsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_GetRegistryPolicyRequest omitted. -/** - * deserializeAws_json1_1InitiateLayerUploadResponse - */ -const de_InitiateLayerUploadResponse = (output: any, context: __SerdeContext): InitiateLayerUploadResponse => { - return { - partSize: __expectLong(output.partSize), - uploadId: __expectString(output.uploadId), - } as any; -}; +// se_GetRegistryScanningConfigurationRequest omitted. -/** - * deserializeAws_json1_1InvalidLayerException - */ -const de_InvalidLayerException = (output: any, context: __SerdeContext): InvalidLayerException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_GetRepositoryPolicyRequest omitted. -/** - * deserializeAws_json1_1InvalidLayerPartException - */ -const de_InvalidLayerPartException = (output: any, context: __SerdeContext): InvalidLayerPartException => { - return { - lastValidByteReceived: __expectLong(output.lastValidByteReceived), - message: __expectString(output.message), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - uploadId: __expectString(output.uploadId), - } as any; -}; +// se_ImageIdentifier omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ImageIdentifierList omitted. -/** - * deserializeAws_json1_1InvalidTagParameterException - */ -const de_InvalidTagParameterException = (output: any, context: __SerdeContext): InvalidTagParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ImageScanningConfiguration omitted. -/** - * deserializeAws_json1_1KmsException - */ -const de_KmsException = (output: any, context: __SerdeContext): KmsException => { - return { - kmsError: __expectString(output.kmsError), - message: __expectString(output.message), - } as any; -}; +// se_InitiateLayerUploadRequest omitted. -/** - * deserializeAws_json1_1Layer - */ -const de_Layer = (output: any, context: __SerdeContext): Layer => { - return { - layerAvailability: __expectString(output.layerAvailability), - layerDigest: __expectString(output.layerDigest), - layerSize: __expectLong(output.layerSize), - mediaType: __expectString(output.mediaType), - } as any; -}; +// se_LayerDigestList omitted. -/** - * deserializeAws_json1_1LayerAlreadyExistsException - */ -const de_LayerAlreadyExistsException = (output: any, context: __SerdeContext): LayerAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_LifecyclePolicyPreviewFilter omitted. -/** - * deserializeAws_json1_1LayerFailure - */ -const de_LayerFailure = (output: any, context: __SerdeContext): LayerFailure => { - return { - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - layerDigest: __expectString(output.layerDigest), - } as any; -}; +// se_ListImagesFilter omitted. -/** - * deserializeAws_json1_1LayerFailureList - */ -const de_LayerFailureList = (output: any, context: __SerdeContext): LayerFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LayerFailure(entry, context); - }); - return retVal; -}; +// se_ListImagesRequest omitted. -/** - * deserializeAws_json1_1LayerInaccessibleException - */ -const de_LayerInaccessibleException = (output: any, context: __SerdeContext): LayerInaccessibleException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListTagsForResourceRequest omitted. -/** - * deserializeAws_json1_1LayerList - */ -const de_LayerList = (output: any, context: __SerdeContext): Layer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Layer(entry, context); - }); - return retVal; -}; +// se_MediaTypeList omitted. -/** - * deserializeAws_json1_1LayerPartTooSmallException - */ -const de_LayerPartTooSmallException = (output: any, context: __SerdeContext): LayerPartTooSmallException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PullThroughCacheRuleRepositoryPrefixList omitted. -/** - * deserializeAws_json1_1LayersNotFoundException - */ -const de_LayersNotFoundException = (output: any, context: __SerdeContext): LayersNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutImageRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyNotFoundException - */ -const de_LifecyclePolicyNotFoundException = ( - output: any, - context: __SerdeContext -): LifecyclePolicyNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutImageScanningConfigurationRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyPreviewInProgressException - */ -const de_LifecyclePolicyPreviewInProgressException = ( - output: any, - context: __SerdeContext -): LifecyclePolicyPreviewInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutImageTagMutabilityRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyPreviewNotFoundException - */ -const de_LifecyclePolicyPreviewNotFoundException = ( - output: any, - context: __SerdeContext -): LifecyclePolicyPreviewNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutLifecyclePolicyRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyPreviewResult - */ -const de_LifecyclePolicyPreviewResult = (output: any, context: __SerdeContext): LifecyclePolicyPreviewResult => { - return { - action: output.action != null ? de_LifecyclePolicyRuleAction(output.action, context) : undefined, - appliedRulePriority: __expectInt32(output.appliedRulePriority), - imageDigest: __expectString(output.imageDigest), - imagePushedAt: - output.imagePushedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.imagePushedAt))) - : undefined, - imageTags: output.imageTags != null ? de_ImageTagList(output.imageTags, context) : undefined, - } as any; -}; +// se_PutRegistryPolicyRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyPreviewResultList - */ -const de_LifecyclePolicyPreviewResultList = (output: any, context: __SerdeContext): LifecyclePolicyPreviewResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LifecyclePolicyPreviewResult(entry, context); - }); - return retVal; -}; +// se_PutRegistryScanningConfigurationRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyPreviewSummary - */ -const de_LifecyclePolicyPreviewSummary = (output: any, context: __SerdeContext): LifecyclePolicyPreviewSummary => { - return { - expiringImageTotalCount: __expectInt32(output.expiringImageTotalCount), - } as any; -}; +// se_PutReplicationConfigurationRequest omitted. -/** - * deserializeAws_json1_1LifecyclePolicyRuleAction - */ -const de_LifecyclePolicyRuleAction = (output: any, context: __SerdeContext): LifecyclePolicyRuleAction => { - return { - type: __expectString(output.type), - } as any; -}; +// se_RegistryScanningRule omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RegistryScanningRuleList omitted. -/** - * deserializeAws_json1_1ListImagesResponse - */ -const de_ListImagesResponse = (output: any, context: __SerdeContext): ListImagesResponse => { - return { - imageIds: output.imageIds != null ? de_ImageIdentifierList(output.imageIds, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ReplicationConfiguration omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// se_ReplicationDestination omitted. -/** - * deserializeAws_json1_1PackageVulnerabilityDetails - */ -const de_PackageVulnerabilityDetails = (output: any, context: __SerdeContext): PackageVulnerabilityDetails => { - return { - cvss: output.cvss != null ? de_CvssScoreList(output.cvss, context) : undefined, - referenceUrls: output.referenceUrls != null ? de_ReferenceUrlsList(output.referenceUrls, context) : undefined, - relatedVulnerabilities: - output.relatedVulnerabilities != null - ? de_RelatedVulnerabilitiesList(output.relatedVulnerabilities, context) - : undefined, - source: __expectString(output.source), - sourceUrl: __expectString(output.sourceUrl), - vendorCreatedAt: - output.vendorCreatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vendorCreatedAt))) - : undefined, - vendorSeverity: __expectString(output.vendorSeverity), - vendorUpdatedAt: - output.vendorUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vendorUpdatedAt))) - : undefined, - vulnerabilityId: __expectString(output.vulnerabilityId), - vulnerablePackages: - output.vulnerablePackages != null ? de_VulnerablePackagesList(output.vulnerablePackages, context) : undefined, - } as any; -}; +// se_ReplicationDestinationList omitted. -/** - * deserializeAws_json1_1PullThroughCacheRule - */ -const de_PullThroughCacheRule = (output: any, context: __SerdeContext): PullThroughCacheRule => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - ecrRepositoryPrefix: __expectString(output.ecrRepositoryPrefix), - registryId: __expectString(output.registryId), - upstreamRegistryUrl: __expectString(output.upstreamRegistryUrl), - } as any; -}; +// se_ReplicationRule omitted. -/** - * deserializeAws_json1_1PullThroughCacheRuleAlreadyExistsException - */ -const de_PullThroughCacheRuleAlreadyExistsException = ( - output: any, - context: __SerdeContext -): PullThroughCacheRuleAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ReplicationRuleList omitted. -/** - * deserializeAws_json1_1PullThroughCacheRuleList - */ -const de_PullThroughCacheRuleList = (output: any, context: __SerdeContext): PullThroughCacheRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PullThroughCacheRule(entry, context); - }); - return retVal; -}; +// se_RepositoryFilter omitted. -/** - * deserializeAws_json1_1PullThroughCacheRuleNotFoundException - */ -const de_PullThroughCacheRuleNotFoundException = ( - output: any, - context: __SerdeContext -): PullThroughCacheRuleNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RepositoryFilterList omitted. -/** - * deserializeAws_json1_1PutImageResponse - */ -const de_PutImageResponse = (output: any, context: __SerdeContext): PutImageResponse => { - return { - image: output.image != null ? de_Image(output.image, context) : undefined, - } as any; -}; +// se_RepositoryNameList omitted. -/** - * deserializeAws_json1_1PutImageScanningConfigurationResponse - */ -const de_PutImageScanningConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutImageScanningConfigurationResponse => { - return { - imageScanningConfiguration: - output.imageScanningConfiguration != null - ? de_ImageScanningConfiguration(output.imageScanningConfiguration, context) - : undefined, - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_ScanningConfigurationRepositoryNameList omitted. -/** - * deserializeAws_json1_1PutImageTagMutabilityResponse - */ -const de_PutImageTagMutabilityResponse = (output: any, context: __SerdeContext): PutImageTagMutabilityResponse => { - return { - imageTagMutability: __expectString(output.imageTagMutability), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_ScanningRepositoryFilter omitted. -/** - * deserializeAws_json1_1PutLifecyclePolicyResponse - */ -const de_PutLifecyclePolicyResponse = (output: any, context: __SerdeContext): PutLifecyclePolicyResponse => { - return { - lifecyclePolicyText: __expectString(output.lifecyclePolicyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; -}; +// se_ScanningRepositoryFilterList omitted. -/** - * deserializeAws_json1_1PutRegistryPolicyResponse - */ -const de_PutRegistryPolicyResponse = (output: any, context: __SerdeContext): PutRegistryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - } as any; -}; +// se_SetRepositoryPolicyRequest omitted. -/** - * deserializeAws_json1_1PutRegistryScanningConfigurationResponse - */ -const de_PutRegistryScanningConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutRegistryScanningConfigurationResponse => { - return { - registryScanningConfiguration: - output.registryScanningConfiguration != null - ? de_RegistryScanningConfiguration(output.registryScanningConfiguration, context) - : undefined, - } as any; -}; +// se_StartImageScanRequest omitted. -/** - * deserializeAws_json1_1PutReplicationConfigurationResponse - */ -const de_PutReplicationConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutReplicationConfigurationResponse => { - return { - replicationConfiguration: - output.replicationConfiguration != null - ? de_ReplicationConfiguration(output.replicationConfiguration, context) - : undefined, - } as any; -}; +// se_StartLifecyclePolicyPreviewRequest omitted. -/** - * deserializeAws_json1_1Recommendation - */ -const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - text: __expectString(output.text), - url: __expectString(output.url), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1ReferencedImagesNotFoundException - */ -const de_ReferencedImagesNotFoundException = ( - output: any, - context: __SerdeContext -): ReferencedImagesNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1ReferenceUrlsList - */ -const de_ReferenceUrlsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1RegistryPolicyNotFoundException - */ -const de_RegistryPolicyNotFoundException = (output: any, context: __SerdeContext): RegistryPolicyNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1RegistryScanningConfiguration - */ -const de_RegistryScanningConfiguration = (output: any, context: __SerdeContext): RegistryScanningConfiguration => { - return { - rules: output.rules != null ? de_RegistryScanningRuleList(output.rules, context) : undefined, - scanType: __expectString(output.scanType), - } as any; -}; +// se_UntagResourceRequest omitted. /** - * deserializeAws_json1_1RegistryScanningRule + * serializeAws_json1_1UploadLayerPartRequest */ -const de_RegistryScanningRule = (output: any, context: __SerdeContext): RegistryScanningRule => { - return { - repositoryFilters: - output.repositoryFilters != null ? de_ScanningRepositoryFilterList(output.repositoryFilters, context) : undefined, - scanFrequency: __expectString(output.scanFrequency), - } as any; +const se_UploadLayerPartRequest = (input: UploadLayerPartRequest, context: __SerdeContext): any => { + return take(input, { + layerPartBlob: context.base64Encoder, + partFirstByte: [], + partLastByte: [], + registryId: [], + repositoryName: [], + uploadId: [], + }); }; +// de_Attribute omitted. + +// de_AttributeList omitted. + /** - * deserializeAws_json1_1RegistryScanningRuleList + * deserializeAws_json1_1AuthorizationData */ -const de_RegistryScanningRuleList = (output: any, context: __SerdeContext): RegistryScanningRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegistryScanningRule(entry, context); - }); - return retVal; +const de_AuthorizationData = (output: any, context: __SerdeContext): AuthorizationData => { + return take(output, { + authorizationToken: __expectString, + expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + proxyEndpoint: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RelatedVulnerabilitiesList + * deserializeAws_json1_1AuthorizationDataList */ -const de_RelatedVulnerabilitiesList = (output: any, context: __SerdeContext): string[] => { +const de_AuthorizationDataList = (output: any, context: __SerdeContext): AuthorizationData[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AuthorizationData(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Remediation + * deserializeAws_json1_1AwsEcrContainerImageDetails */ -const de_Remediation = (output: any, context: __SerdeContext): Remediation => { - return { - recommendation: output.recommendation != null ? de_Recommendation(output.recommendation, context) : undefined, - } as any; +const de_AwsEcrContainerImageDetails = (output: any, context: __SerdeContext): AwsEcrContainerImageDetails => { + return take(output, { + architecture: __expectString, + author: __expectString, + imageHash: __expectString, + imageTags: _json, + platform: __expectString, + pushedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registry: __expectString, + repositoryName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ReplicationConfiguration - */ -const de_ReplicationConfiguration = (output: any, context: __SerdeContext): ReplicationConfiguration => { - return { - rules: output.rules != null ? de_ReplicationRuleList(output.rules, context) : undefined, - } as any; -}; +// de_BatchCheckLayerAvailabilityResponse omitted. -/** - * deserializeAws_json1_1ReplicationDestination - */ -const de_ReplicationDestination = (output: any, context: __SerdeContext): ReplicationDestination => { - return { - region: __expectString(output.region), - registryId: __expectString(output.registryId), - } as any; -}; +// de_BatchDeleteImageResponse omitted. -/** - * deserializeAws_json1_1ReplicationDestinationList - */ -const de_ReplicationDestinationList = (output: any, context: __SerdeContext): ReplicationDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationDestination(entry, context); - }); - return retVal; -}; +// de_BatchGetImageResponse omitted. -/** - * deserializeAws_json1_1ReplicationRule - */ -const de_ReplicationRule = (output: any, context: __SerdeContext): ReplicationRule => { - return { - destinations: output.destinations != null ? de_ReplicationDestinationList(output.destinations, context) : undefined, - repositoryFilters: - output.repositoryFilters != null ? de_RepositoryFilterList(output.repositoryFilters, context) : undefined, - } as any; -}; +// de_BatchGetRepositoryScanningConfigurationResponse omitted. + +// de_CompleteLayerUploadResponse omitted. /** - * deserializeAws_json1_1ReplicationRuleList + * deserializeAws_json1_1CreatePullThroughCacheRuleResponse */ -const de_ReplicationRuleList = (output: any, context: __SerdeContext): ReplicationRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationRule(entry, context); - }); - return retVal; +const de_CreatePullThroughCacheRuleResponse = ( + output: any, + context: __SerdeContext +): CreatePullThroughCacheRuleResponse => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ecrRepositoryPrefix: __expectString, + registryId: __expectString, + upstreamRegistryUrl: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Repository + * deserializeAws_json1_1CreateRepositoryResponse */ -const de_Repository = (output: any, context: __SerdeContext): Repository => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - encryptionConfiguration: - output.encryptionConfiguration != null - ? de_EncryptionConfiguration(output.encryptionConfiguration, context) - : undefined, - imageScanningConfiguration: - output.imageScanningConfiguration != null - ? de_ImageScanningConfiguration(output.imageScanningConfiguration, context) - : undefined, - imageTagMutability: __expectString(output.imageTagMutability), - registryId: __expectString(output.registryId), - repositoryArn: __expectString(output.repositoryArn), - repositoryName: __expectString(output.repositoryName), - repositoryUri: __expectString(output.repositoryUri), - } as any; -}; - -/** - * deserializeAws_json1_1RepositoryAlreadyExistsException - */ -const de_RepositoryAlreadyExistsException = ( - output: any, - context: __SerdeContext -): RepositoryAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateRepositoryResponse = (output: any, context: __SerdeContext): CreateRepositoryResponse => { + return take(output, { + repository: (_: any) => de_Repository(_, context), + }) as any; }; /** - * deserializeAws_json1_1RepositoryFilter + * deserializeAws_json1_1CvssScore */ -const de_RepositoryFilter = (output: any, context: __SerdeContext): RepositoryFilter => { - return { - filter: __expectString(output.filter), - filterType: __expectString(output.filterType), - } as any; +const de_CvssScore = (output: any, context: __SerdeContext): CvssScore => { + return take(output, { + baseScore: __limitedParseDouble, + scoringVector: __expectString, + source: __expectString, + version: __expectString, + }) as any; }; +// de_CvssScoreAdjustment omitted. + +// de_CvssScoreAdjustmentList omitted. + /** - * deserializeAws_json1_1RepositoryFilterList + * deserializeAws_json1_1CvssScoreDetails */ -const de_RepositoryFilterList = (output: any, context: __SerdeContext): RepositoryFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryFilter(entry, context); - }); - return retVal; +const de_CvssScoreDetails = (output: any, context: __SerdeContext): CvssScoreDetails => { + return take(output, { + adjustments: _json, + score: __limitedParseDouble, + scoreSource: __expectString, + scoringVector: __expectString, + version: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RepositoryList + * deserializeAws_json1_1CvssScoreList */ -const de_RepositoryList = (output: any, context: __SerdeContext): Repository[] => { +const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Repository(entry, context); + return de_CvssScore(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1RepositoryNotEmptyException - */ -const de_RepositoryNotEmptyException = (output: any, context: __SerdeContext): RepositoryNotEmptyException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1RepositoryNotFoundException + * deserializeAws_json1_1DeleteLifecyclePolicyResponse */ -const de_RepositoryNotFoundException = (output: any, context: __SerdeContext): RepositoryNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_DeleteLifecyclePolicyResponse = (output: any, context: __SerdeContext): DeleteLifecyclePolicyResponse => { + return take(output, { + lastEvaluatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecyclePolicyText: __expectString, + registryId: __expectString, + repositoryName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RepositoryPolicyNotFoundException + * deserializeAws_json1_1DeletePullThroughCacheRuleResponse */ -const de_RepositoryPolicyNotFoundException = ( +const de_DeletePullThroughCacheRuleResponse = ( output: any, context: __SerdeContext -): RepositoryPolicyNotFoundException => { - return { - message: __expectString(output.message), - } as any; +): DeletePullThroughCacheRuleResponse => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ecrRepositoryPrefix: __expectString, + registryId: __expectString, + upstreamRegistryUrl: __expectString, + }) as any; }; +// de_DeleteRegistryPolicyResponse omitted. + +// de_DeleteRepositoryPolicyResponse omitted. + /** - * deserializeAws_json1_1RepositoryScanningConfiguration + * deserializeAws_json1_1DeleteRepositoryResponse */ -const de_RepositoryScanningConfiguration = (output: any, context: __SerdeContext): RepositoryScanningConfiguration => { - return { - appliedScanFilters: - output.appliedScanFilters != null - ? de_ScanningRepositoryFilterList(output.appliedScanFilters, context) - : undefined, - repositoryArn: __expectString(output.repositoryArn), - repositoryName: __expectString(output.repositoryName), - scanFrequency: __expectString(output.scanFrequency), - scanOnPush: __expectBoolean(output.scanOnPush), - } as any; +const de_DeleteRepositoryResponse = (output: any, context: __SerdeContext): DeleteRepositoryResponse => { + return take(output, { + repository: (_: any) => de_Repository(_, context), + }) as any; }; +// de_DescribeImageReplicationStatusResponse omitted. + /** - * deserializeAws_json1_1RepositoryScanningConfigurationFailure + * deserializeAws_json1_1DescribeImageScanFindingsResponse */ -const de_RepositoryScanningConfigurationFailure = ( +const de_DescribeImageScanFindingsResponse = ( output: any, context: __SerdeContext -): RepositoryScanningConfigurationFailure => { - return { - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - repositoryName: __expectString(output.repositoryName), - } as any; +): DescribeImageScanFindingsResponse => { + return take(output, { + imageId: _json, + imageScanFindings: (_: any) => de_ImageScanFindings(_, context), + imageScanStatus: _json, + nextToken: __expectString, + registryId: __expectString, + repositoryName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RepositoryScanningConfigurationFailureList + * deserializeAws_json1_1DescribeImagesResponse */ -const de_RepositoryScanningConfigurationFailureList = ( - output: any, - context: __SerdeContext -): RepositoryScanningConfigurationFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryScanningConfigurationFailure(entry, context); - }); - return retVal; +const de_DescribeImagesResponse = (output: any, context: __SerdeContext): DescribeImagesResponse => { + return take(output, { + imageDetails: (_: any) => de_ImageDetailList(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RepositoryScanningConfigurationList + * deserializeAws_json1_1DescribePullThroughCacheRulesResponse */ -const de_RepositoryScanningConfigurationList = ( +const de_DescribePullThroughCacheRulesResponse = ( output: any, context: __SerdeContext -): RepositoryScanningConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositoryScanningConfiguration(entry, context); - }); - return retVal; +): DescribePullThroughCacheRulesResponse => { + return take(output, { + nextToken: __expectString, + pullThroughCacheRules: (_: any) => de_PullThroughCacheRuleList(_, context), + }) as any; }; +// de_DescribeRegistryResponse omitted. + /** - * deserializeAws_json1_1Resource + * deserializeAws_json1_1DescribeRepositoriesResponse */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - details: output.details != null ? de_ResourceDetails(output.details, context) : undefined, - id: __expectString(output.id), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; +const de_DescribeRepositoriesResponse = (output: any, context: __SerdeContext): DescribeRepositoriesResponse => { + return take(output, { + nextToken: __expectString, + repositories: (_: any) => de_RepositoryList(_, context), + }) as any; }; +// de_EmptyUploadException omitted. + +// de_EncryptionConfiguration omitted. + /** - * deserializeAws_json1_1ResourceDetails + * deserializeAws_json1_1EnhancedImageScanFinding */ -const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - awsEcrContainerImage: - output.awsEcrContainerImage != null - ? de_AwsEcrContainerImageDetails(output.awsEcrContainerImage, context) - : undefined, - } as any; +const de_EnhancedImageScanFinding = (output: any, context: __SerdeContext): EnhancedImageScanFinding => { + return take(output, { + awsAccountId: __expectString, + description: __expectString, + findingArn: __expectString, + firstObservedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastObservedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + packageVulnerabilityDetails: (_: any) => de_PackageVulnerabilityDetails(_, context), + remediation: _json, + resources: (_: any) => de_ResourceList(_, context), + score: __limitedParseDouble, + scoreDetails: (_: any) => de_ScoreDetails(_, context), + severity: __expectString, + status: __expectString, + title: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ResourceList + * deserializeAws_json1_1EnhancedImageScanFindingList */ -const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { +const de_EnhancedImageScanFindingList = (output: any, context: __SerdeContext): EnhancedImageScanFinding[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); + return de_EnhancedImageScanFinding(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ScanningRepositoryFilter - */ -const de_ScanningRepositoryFilter = (output: any, context: __SerdeContext): ScanningRepositoryFilter => { - return { - filter: __expectString(output.filter), - filterType: __expectString(output.filterType), - } as any; -}; +// de_FindingSeverityCounts omitted. /** - * deserializeAws_json1_1ScanningRepositoryFilterList + * deserializeAws_json1_1GetAuthorizationTokenResponse */ -const de_ScanningRepositoryFilterList = (output: any, context: __SerdeContext): ScanningRepositoryFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ScanningRepositoryFilter(entry, context); - }); - return retVal; +const de_GetAuthorizationTokenResponse = (output: any, context: __SerdeContext): GetAuthorizationTokenResponse => { + return take(output, { + authorizationData: (_: any) => de_AuthorizationDataList(_, context), + }) as any; }; +// de_GetDownloadUrlForLayerResponse omitted. + /** - * deserializeAws_json1_1ScanNotFoundException + * deserializeAws_json1_1GetLifecyclePolicyPreviewResponse */ -const de_ScanNotFoundException = (output: any, context: __SerdeContext): ScanNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_GetLifecyclePolicyPreviewResponse = ( + output: any, + context: __SerdeContext +): GetLifecyclePolicyPreviewResponse => { + return take(output, { + lifecyclePolicyText: __expectString, + nextToken: __expectString, + previewResults: (_: any) => de_LifecyclePolicyPreviewResultList(_, context), + registryId: __expectString, + repositoryName: __expectString, + status: __expectString, + summary: _json, + }) as any; }; /** - * deserializeAws_json1_1ScoreDetails + * deserializeAws_json1_1GetLifecyclePolicyResponse */ -const de_ScoreDetails = (output: any, context: __SerdeContext): ScoreDetails => { - return { - cvss: output.cvss != null ? de_CvssScoreDetails(output.cvss, context) : undefined, - } as any; +const de_GetLifecyclePolicyResponse = (output: any, context: __SerdeContext): GetLifecyclePolicyResponse => { + return take(output, { + lastEvaluatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecyclePolicyText: __expectString, + registryId: __expectString, + repositoryName: __expectString, + }) as any; }; +// de_GetRegistryPolicyResponse omitted. + +// de_GetRegistryScanningConfigurationResponse omitted. + +// de_GetRepositoryPolicyResponse omitted. + +// de_Image omitted. + +// de_ImageAlreadyExistsException omitted. + /** - * deserializeAws_json1_1ServerException + * deserializeAws_json1_1ImageDetail */ -const de_ServerException = (output: any, context: __SerdeContext): ServerException => { - return { - message: __expectString(output.message), - } as any; +const de_ImageDetail = (output: any, context: __SerdeContext): ImageDetail => { + return take(output, { + artifactMediaType: __expectString, + imageDigest: __expectString, + imageManifestMediaType: __expectString, + imagePushedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageScanFindingsSummary: (_: any) => de_ImageScanFindingsSummary(_, context), + imageScanStatus: _json, + imageSizeInBytes: __expectLong, + imageTags: _json, + lastRecordedPullTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registryId: __expectString, + repositoryName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SetRepositoryPolicyResponse + * deserializeAws_json1_1ImageDetailList */ -const de_SetRepositoryPolicyResponse = (output: any, context: __SerdeContext): SetRepositoryPolicyResponse => { - return { - policyText: __expectString(output.policyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; +const de_ImageDetailList = (output: any, context: __SerdeContext): ImageDetail[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ImageDetail(entry, context); + }); + return retVal; }; +// de_ImageDigestDoesNotMatchException omitted. + +// de_ImageFailure omitted. + +// de_ImageFailureList omitted. + +// de_ImageIdentifier omitted. + +// de_ImageIdentifierList omitted. + +// de_ImageList omitted. + +// de_ImageNotFoundException omitted. + +// de_ImageReplicationStatus omitted. + +// de_ImageReplicationStatusList omitted. + +// de_ImageScanFinding omitted. + +// de_ImageScanFindingList omitted. + /** - * deserializeAws_json1_1StartImageScanResponse + * deserializeAws_json1_1ImageScanFindings */ -const de_StartImageScanResponse = (output: any, context: __SerdeContext): StartImageScanResponse => { - return { - imageId: output.imageId != null ? de_ImageIdentifier(output.imageId, context) : undefined, - imageScanStatus: output.imageScanStatus != null ? de_ImageScanStatus(output.imageScanStatus, context) : undefined, - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - } as any; +const de_ImageScanFindings = (output: any, context: __SerdeContext): ImageScanFindings => { + return take(output, { + enhancedFindings: (_: any) => de_EnhancedImageScanFindingList(_, context), + findingSeverityCounts: _json, + findings: _json, + imageScanCompletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vulnerabilitySourceUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1StartLifecyclePolicyPreviewResponse + * deserializeAws_json1_1ImageScanFindingsSummary */ -const de_StartLifecyclePolicyPreviewResponse = ( - output: any, - context: __SerdeContext -): StartLifecyclePolicyPreviewResponse => { - return { - lifecyclePolicyText: __expectString(output.lifecyclePolicyText), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - status: __expectString(output.status), - } as any; +const de_ImageScanFindingsSummary = (output: any, context: __SerdeContext): ImageScanFindingsSummary => { + return take(output, { + findingSeverityCounts: _json, + imageScanCompletedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vulnerabilitySourceUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ImageScanningConfiguration omitted. + +// de_ImageScanStatus omitted. + +// de_ImageTagAlreadyExistsException omitted. + +// de_ImageTagList omitted. + +// de_ImageTagsList omitted. + +// de_InitiateLayerUploadResponse omitted. + +// de_InvalidLayerException omitted. + +// de_InvalidLayerPartException omitted. + +// de_InvalidParameterException omitted. + +// de_InvalidTagParameterException omitted. + +// de_KmsException omitted. + +// de_Layer omitted. + +// de_LayerAlreadyExistsException omitted. + +// de_LayerFailure omitted. + +// de_LayerFailureList omitted. + +// de_LayerInaccessibleException omitted. + +// de_LayerList omitted. + +// de_LayerPartTooSmallException omitted. + +// de_LayersNotFoundException omitted. + +// de_LifecyclePolicyNotFoundException omitted. + +// de_LifecyclePolicyPreviewInProgressException omitted. + +// de_LifecyclePolicyPreviewNotFoundException omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1LifecyclePolicyPreviewResult */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_LifecyclePolicyPreviewResult = (output: any, context: __SerdeContext): LifecyclePolicyPreviewResult => { + return take(output, { + action: _json, + appliedRulePriority: __expectInt32, + imageDigest: __expectString, + imagePushedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageTags: _json, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1LifecyclePolicyPreviewResultList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_LifecyclePolicyPreviewResultList = (output: any, context: __SerdeContext): LifecyclePolicyPreviewResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_LifecyclePolicyPreviewResult(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_LifecyclePolicyPreviewSummary omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_LifecyclePolicyRuleAction omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. + +// de_ListImagesResponse omitted. + +// de_ListTagsForResourceResponse omitted. /** - * deserializeAws_json1_1UnsupportedImageTypeException + * deserializeAws_json1_1PackageVulnerabilityDetails */ -const de_UnsupportedImageTypeException = (output: any, context: __SerdeContext): UnsupportedImageTypeException => { - return { - message: __expectString(output.message), - } as any; +const de_PackageVulnerabilityDetails = (output: any, context: __SerdeContext): PackageVulnerabilityDetails => { + return take(output, { + cvss: (_: any) => de_CvssScoreList(_, context), + referenceUrls: _json, + relatedVulnerabilities: _json, + source: __expectString, + sourceUrl: __expectString, + vendorCreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorSeverity: __expectString, + vendorUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vulnerabilityId: __expectString, + vulnerablePackages: _json, + }) as any; }; /** - * deserializeAws_json1_1UnsupportedUpstreamRegistryException + * deserializeAws_json1_1PullThroughCacheRule */ -const de_UnsupportedUpstreamRegistryException = ( - output: any, - context: __SerdeContext -): UnsupportedUpstreamRegistryException => { - return { - message: __expectString(output.message), - } as any; +const de_PullThroughCacheRule = (output: any, context: __SerdeContext): PullThroughCacheRule => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ecrRepositoryPrefix: __expectString, + registryId: __expectString, + upstreamRegistryUrl: __expectString, + }) as any; }; +// de_PullThroughCacheRuleAlreadyExistsException omitted. + /** - * deserializeAws_json1_1UntagResourceResponse + * deserializeAws_json1_1PullThroughCacheRuleList */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; +const de_PullThroughCacheRuleList = (output: any, context: __SerdeContext): PullThroughCacheRule[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_PullThroughCacheRule(entry, context); + }); + return retVal; }; +// de_PullThroughCacheRuleNotFoundException omitted. + +// de_PutImageResponse omitted. + +// de_PutImageScanningConfigurationResponse omitted. + +// de_PutImageTagMutabilityResponse omitted. + +// de_PutLifecyclePolicyResponse omitted. + +// de_PutRegistryPolicyResponse omitted. + +// de_PutRegistryScanningConfigurationResponse omitted. + +// de_PutReplicationConfigurationResponse omitted. + +// de_Recommendation omitted. + +// de_ReferencedImagesNotFoundException omitted. + +// de_ReferenceUrlsList omitted. + +// de_RegistryPolicyNotFoundException omitted. + +// de_RegistryScanningConfiguration omitted. + +// de_RegistryScanningRule omitted. + +// de_RegistryScanningRuleList omitted. + +// de_RelatedVulnerabilitiesList omitted. + +// de_Remediation omitted. + +// de_ReplicationConfiguration omitted. + +// de_ReplicationDestination omitted. + +// de_ReplicationDestinationList omitted. + +// de_ReplicationRule omitted. + +// de_ReplicationRuleList omitted. + /** - * deserializeAws_json1_1UploadLayerPartResponse + * deserializeAws_json1_1Repository */ -const de_UploadLayerPartResponse = (output: any, context: __SerdeContext): UploadLayerPartResponse => { - return { - lastByteReceived: __expectLong(output.lastByteReceived), - registryId: __expectString(output.registryId), - repositoryName: __expectString(output.repositoryName), - uploadId: __expectString(output.uploadId), - } as any; +const de_Repository = (output: any, context: __SerdeContext): Repository => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionConfiguration: _json, + imageScanningConfiguration: _json, + imageTagMutability: __expectString, + registryId: __expectString, + repositoryArn: __expectString, + repositoryName: __expectString, + repositoryUri: __expectString, + }) as any; }; +// de_RepositoryAlreadyExistsException omitted. + +// de_RepositoryFilter omitted. + +// de_RepositoryFilterList omitted. + /** - * deserializeAws_json1_1UploadNotFoundException + * deserializeAws_json1_1RepositoryList */ -const de_UploadNotFoundException = (output: any, context: __SerdeContext): UploadNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_RepositoryList = (output: any, context: __SerdeContext): Repository[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Repository(entry, context); + }); + return retVal; }; +// de_RepositoryNotEmptyException omitted. + +// de_RepositoryNotFoundException omitted. + +// de_RepositoryPolicyNotFoundException omitted. + +// de_RepositoryScanningConfiguration omitted. + +// de_RepositoryScanningConfigurationFailure omitted. + +// de_RepositoryScanningConfigurationFailureList omitted. + +// de_RepositoryScanningConfigurationList omitted. + /** - * deserializeAws_json1_1ValidationException + * deserializeAws_json1_1Resource */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; +const de_Resource = (output: any, context: __SerdeContext): Resource => { + return take(output, { + details: (_: any) => de_ResourceDetails(_, context), + id: __expectString, + tags: _json, + type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1VulnerablePackage + * deserializeAws_json1_1ResourceDetails */ -const de_VulnerablePackage = (output: any, context: __SerdeContext): VulnerablePackage => { - return { - arch: __expectString(output.arch), - epoch: __expectInt32(output.epoch), - filePath: __expectString(output.filePath), - name: __expectString(output.name), - packageManager: __expectString(output.packageManager), - release: __expectString(output.release), - sourceLayerHash: __expectString(output.sourceLayerHash), - version: __expectString(output.version), - } as any; +const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { + return take(output, { + awsEcrContainerImage: (_: any) => de_AwsEcrContainerImageDetails(_, context), + }) as any; }; /** - * deserializeAws_json1_1VulnerablePackagesList + * deserializeAws_json1_1ResourceList */ -const de_VulnerablePackagesList = (output: any, context: __SerdeContext): VulnerablePackage[] => { +const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VulnerablePackage(entry, context); + return de_Resource(entry, context); }); return retVal; }; +// de_ScanningRepositoryFilter omitted. + +// de_ScanningRepositoryFilterList omitted. + +// de_ScanNotFoundException omitted. + +/** + * deserializeAws_json1_1ScoreDetails + */ +const de_ScoreDetails = (output: any, context: __SerdeContext): ScoreDetails => { + return take(output, { + cvss: (_: any) => de_CvssScoreDetails(_, context), + }) as any; +}; + +// de_ServerException omitted. + +// de_SetRepositoryPolicyResponse omitted. + +// de_StartImageScanResponse omitted. + +// de_StartLifecyclePolicyPreviewResponse omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_Tags omitted. + +// de_TooManyTagsException omitted. + +// de_UnsupportedImageTypeException omitted. + +// de_UnsupportedUpstreamRegistryException omitted. + +// de_UntagResourceResponse omitted. + +// de_UploadLayerPartResponse omitted. + +// de_UploadNotFoundException omitted. + +// de_ValidationException omitted. + +// de_VulnerablePackage omitted. + +// de_VulnerablePackagesList omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -6379,6 +4451,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ecs/src/protocols/Aws_json1_1.ts b/clients/client-ecs/src/protocols/Aws_json1_1.ts index 69c80150713a..fa3448cbb7e0 100644 --- a/clients/client-ecs/src/protocols/Aws_json1_1.ts +++ b/clients/client-ecs/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -166,7 +168,6 @@ import { UpdateTaskSetCommandInput, UpdateTaskSetCommandOutput } from "../comman import { ECSServiceException as __BaseException } from "../models/ECSServiceException"; import { AccessDeniedException, - Attachment, AttachmentStateChange, Attribute, AttributeLimitExceededException, @@ -174,18 +175,15 @@ import { AutoScalingGroupProviderUpdate, AwsVpcConfiguration, BlockedException, - CapacityProvider, CapacityProviderField, CapacityProviderStrategyItem, ClientException, - Cluster, ClusterConfiguration, ClusterContainsContainerInstancesException, ClusterContainsServicesException, ClusterContainsTasksException, ClusterField, ClusterNotFoundException, - ClusterServiceConnectDefaults, ClusterServiceConnectDefaultsRequest, ClusterSetting, Compatibility, @@ -198,21 +196,15 @@ import { ContainerOverride, ContainerStateChange, CreateCapacityProviderRequest, - CreateCapacityProviderResponse, CreateClusterRequest, - CreateClusterResponse, CreateServiceRequest, CreateServiceResponse, CreateTaskSetRequest, CreateTaskSetResponse, DeleteAccountSettingRequest, - DeleteAccountSettingResponse, DeleteAttributesRequest, - DeleteAttributesResponse, DeleteCapacityProviderRequest, - DeleteCapacityProviderResponse, DeleteClusterRequest, - DeleteClusterResponse, DeleteServiceRequest, DeleteServiceResponse, DeleteTaskDefinitionsRequest, @@ -229,9 +221,7 @@ import { DeregisterTaskDefinitionRequest, DeregisterTaskDefinitionResponse, DescribeCapacityProvidersRequest, - DescribeCapacityProvidersResponse, DescribeClustersRequest, - DescribeClustersResponse, DescribeContainerInstancesRequest, DescribeContainerInstancesResponse, DescribeServicesRequest, @@ -245,7 +235,6 @@ import { Device, DeviceCgroupPermission, DiscoverPollEndpointRequest, - DiscoverPollEndpointResponse, DockerVolumeConfiguration, EFSAuthorizationConfig, EFSVolumeConfiguration, @@ -254,8 +243,6 @@ import { ExecuteCommandConfiguration, ExecuteCommandLogConfiguration, ExecuteCommandRequest, - ExecuteCommandResponse, - Failure, FirelensConfiguration, FSxWindowsFileServerAuthorizationConfig, FSxWindowsFileServerVolumeConfiguration, @@ -273,25 +260,15 @@ import { LimitExceededException, LinuxParameters, ListAccountSettingsRequest, - ListAccountSettingsResponse, ListAttributesRequest, - ListAttributesResponse, ListClustersRequest, - ListClustersResponse, ListContainerInstancesRequest, - ListContainerInstancesResponse, ListServicesByNamespaceRequest, - ListServicesByNamespaceResponse, ListServicesRequest, - ListServicesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTaskDefinitionFamiliesRequest, - ListTaskDefinitionFamiliesResponse, ListTaskDefinitionsRequest, - ListTaskDefinitionsResponse, ListTasksRequest, - ListTasksResponse, LoadBalancer, LogConfiguration, ManagedAgent, @@ -302,7 +279,6 @@ import { NamespaceNotFoundException, NetworkBinding, NetworkConfiguration, - NetworkInterface, NoUpdateAvailableException, PlacementConstraint, PlacementStrategy, @@ -313,13 +289,9 @@ import { ProtectedTask, ProxyConfiguration, PutAccountSettingDefaultRequest, - PutAccountSettingDefaultResponse, PutAccountSettingRequest, - PutAccountSettingResponse, PutAttributesRequest, - PutAttributesResponse, PutClusterCapacityProvidersRequest, - PutClusterCapacityProvidersResponse, RegisterContainerInstanceRequest, RegisterContainerInstanceResponse, RegisterTaskDefinitionRequest, @@ -339,28 +311,21 @@ import { ServiceConnectClientAlias, ServiceConnectConfiguration, ServiceConnectService, - ServiceConnectServiceResource, ServiceEvent, ServiceField, ServiceNotActiveException, ServiceNotFoundException, ServiceRegistry, - Session, - Setting, StartTaskRequest, StartTaskResponse, StopTaskRequest, StopTaskResponse, SubmitAttachmentStateChangesRequest, - SubmitAttachmentStateChangesResponse, SubmitContainerStateChangeRequest, - SubmitContainerStateChangeResponse, SubmitTaskStateChangeRequest, - SubmitTaskStateChangeResponse, SystemControl, Tag, TagResourceRequest, - TagResourceResponse, TargetNotConnectedException, TargetNotFoundException, Task, @@ -376,13 +341,9 @@ import { Ulimit, UnsupportedFeatureException, UntagResourceRequest, - UntagResourceResponse, UpdateCapacityProviderRequest, - UpdateCapacityProviderResponse, UpdateClusterRequest, - UpdateClusterResponse, UpdateClusterSettingsRequest, - UpdateClusterSettingsResponse, UpdateContainerAgentRequest, UpdateContainerAgentResponse, UpdateContainerInstancesStateRequest, @@ -410,7 +371,7 @@ export const se_CreateCapacityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCapacityProvider"); let body: any; - body = JSON.stringify(se_CreateCapacityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -423,7 +384,7 @@ export const se_CreateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCluster"); let body: any; - body = JSON.stringify(se_CreateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -436,7 +397,7 @@ export const se_CreateServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateService"); let body: any; - body = JSON.stringify(se_CreateServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -462,7 +423,7 @@ export const se_DeleteAccountSettingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAccountSetting"); let body: any; - body = JSON.stringify(se_DeleteAccountSettingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -475,7 +436,7 @@ export const se_DeleteAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAttributes"); let body: any; - body = JSON.stringify(se_DeleteAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -488,7 +449,7 @@ export const se_DeleteCapacityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCapacityProvider"); let body: any; - body = JSON.stringify(se_DeleteCapacityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -501,7 +462,7 @@ export const se_DeleteClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCluster"); let body: any; - body = JSON.stringify(se_DeleteClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -514,7 +475,7 @@ export const se_DeleteServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteService"); let body: any; - body = JSON.stringify(se_DeleteServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -527,7 +488,7 @@ export const se_DeleteTaskDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTaskDefinitions"); let body: any; - body = JSON.stringify(se_DeleteTaskDefinitionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -540,7 +501,7 @@ export const se_DeleteTaskSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTaskSet"); let body: any; - body = JSON.stringify(se_DeleteTaskSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -553,7 +514,7 @@ export const se_DeregisterContainerInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterContainerInstance"); let body: any; - body = JSON.stringify(se_DeregisterContainerInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -566,7 +527,7 @@ export const se_DeregisterTaskDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterTaskDefinition"); let body: any; - body = JSON.stringify(se_DeregisterTaskDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -579,7 +540,7 @@ export const se_DescribeCapacityProvidersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCapacityProviders"); let body: any; - body = JSON.stringify(se_DescribeCapacityProvidersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -592,7 +553,7 @@ export const se_DescribeClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClusters"); let body: any; - body = JSON.stringify(se_DescribeClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -605,7 +566,7 @@ export const se_DescribeContainerInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeContainerInstances"); let body: any; - body = JSON.stringify(se_DescribeContainerInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -618,7 +579,7 @@ export const se_DescribeServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServices"); let body: any; - body = JSON.stringify(se_DescribeServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -631,7 +592,7 @@ export const se_DescribeTaskDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTaskDefinition"); let body: any; - body = JSON.stringify(se_DescribeTaskDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -644,7 +605,7 @@ export const se_DescribeTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTasks"); let body: any; - body = JSON.stringify(se_DescribeTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -657,7 +618,7 @@ export const se_DescribeTaskSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTaskSets"); let body: any; - body = JSON.stringify(se_DescribeTaskSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -670,7 +631,7 @@ export const se_DiscoverPollEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DiscoverPollEndpoint"); let body: any; - body = JSON.stringify(se_DiscoverPollEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -683,7 +644,7 @@ export const se_ExecuteCommandCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExecuteCommand"); let body: any; - body = JSON.stringify(se_ExecuteCommandRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -696,7 +657,7 @@ export const se_GetTaskProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTaskProtection"); let body: any; - body = JSON.stringify(se_GetTaskProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -709,7 +670,7 @@ export const se_ListAccountSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccountSettings"); let body: any; - body = JSON.stringify(se_ListAccountSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -722,7 +683,7 @@ export const se_ListAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAttributes"); let body: any; - body = JSON.stringify(se_ListAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -735,7 +696,7 @@ export const se_ListClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListClusters"); let body: any; - body = JSON.stringify(se_ListClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -748,7 +709,7 @@ export const se_ListContainerInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListContainerInstances"); let body: any; - body = JSON.stringify(se_ListContainerInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -761,7 +722,7 @@ export const se_ListServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServices"); let body: any; - body = JSON.stringify(se_ListServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -774,7 +735,7 @@ export const se_ListServicesByNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServicesByNamespace"); let body: any; - body = JSON.stringify(se_ListServicesByNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -787,7 +748,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -800,7 +761,7 @@ export const se_ListTaskDefinitionFamiliesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTaskDefinitionFamilies"); let body: any; - body = JSON.stringify(se_ListTaskDefinitionFamiliesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -813,7 +774,7 @@ export const se_ListTaskDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTaskDefinitions"); let body: any; - body = JSON.stringify(se_ListTaskDefinitionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -826,7 +787,7 @@ export const se_ListTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTasks"); let body: any; - body = JSON.stringify(se_ListTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -839,7 +800,7 @@ export const se_PutAccountSettingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAccountSetting"); let body: any; - body = JSON.stringify(se_PutAccountSettingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -852,7 +813,7 @@ export const se_PutAccountSettingDefaultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAccountSettingDefault"); let body: any; - body = JSON.stringify(se_PutAccountSettingDefaultRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -865,7 +826,7 @@ export const se_PutAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAttributes"); let body: any; - body = JSON.stringify(se_PutAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -878,7 +839,7 @@ export const se_PutClusterCapacityProvidersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutClusterCapacityProviders"); let body: any; - body = JSON.stringify(se_PutClusterCapacityProvidersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -904,7 +865,7 @@ export const se_RegisterTaskDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterTaskDefinition"); let body: any; - body = JSON.stringify(se_RegisterTaskDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -917,7 +878,7 @@ export const se_RunTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RunTask"); let body: any; - body = JSON.stringify(se_RunTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -930,7 +891,7 @@ export const se_StartTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartTask"); let body: any; - body = JSON.stringify(se_StartTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -943,7 +904,7 @@ export const se_StopTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTask"); let body: any; - body = JSON.stringify(se_StopTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -956,7 +917,7 @@ export const se_SubmitAttachmentStateChangesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SubmitAttachmentStateChanges"); let body: any; - body = JSON.stringify(se_SubmitAttachmentStateChangesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -969,7 +930,7 @@ export const se_SubmitContainerStateChangeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SubmitContainerStateChange"); let body: any; - body = JSON.stringify(se_SubmitContainerStateChangeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -995,7 +956,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1008,7 +969,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1021,7 +982,7 @@ export const se_UpdateCapacityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCapacityProvider"); let body: any; - body = JSON.stringify(se_UpdateCapacityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1034,7 +995,7 @@ export const se_UpdateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCluster"); let body: any; - body = JSON.stringify(se_UpdateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1047,7 +1008,7 @@ export const se_UpdateClusterSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateClusterSettings"); let body: any; - body = JSON.stringify(se_UpdateClusterSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1060,7 +1021,7 @@ export const se_UpdateContainerAgentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContainerAgent"); let body: any; - body = JSON.stringify(se_UpdateContainerAgentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1073,7 +1034,7 @@ export const se_UpdateContainerInstancesStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContainerInstancesState"); let body: any; - body = JSON.stringify(se_UpdateContainerInstancesStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1086,7 +1047,7 @@ export const se_UpdateServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateService"); let body: any; - body = JSON.stringify(se_UpdateServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1099,7 +1060,7 @@ export const se_UpdateServicePrimaryTaskSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServicePrimaryTaskSet"); let body: any; - body = JSON.stringify(se_UpdateServicePrimaryTaskSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1112,7 +1073,7 @@ export const se_UpdateTaskProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTaskProtection"); let body: any; - body = JSON.stringify(se_UpdateTaskProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1141,12 +1102,12 @@ export const de_CreateCapacityProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCapacityProviderResponse(data, context); + contents = _json(data); const response: CreateCapacityProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1179,10 +1140,9 @@ const de_CreateCapacityProviderCommandError = async ( throw await de_UpdateInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,12 +1160,12 @@ export const de_CreateClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateClusterResponse(data, context); + contents = _json(data); const response: CreateClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1232,10 +1192,9 @@ const de_CreateClusterCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1258,7 +1217,7 @@ export const de_CreateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1303,10 +1262,9 @@ const de_CreateServiceCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1329,7 +1287,7 @@ export const de_CreateTaskSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1380,10 +1338,9 @@ const de_CreateTaskSetCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1401,12 +1358,12 @@ export const de_DeleteAccountSettingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAccountSettingResponse(data, context); + contents = _json(data); const response: DeleteAccountSettingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1433,10 +1390,9 @@ const de_DeleteAccountSettingCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1454,12 +1410,12 @@ export const de_DeleteAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAttributesResponse(data, context); + contents = _json(data); const response: DeleteAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1486,10 +1442,9 @@ const de_DeleteAttributesCommandError = async ( throw await de_TargetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,12 +1462,12 @@ export const de_DeleteCapacityProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCapacityProviderResponse(data, context); + contents = _json(data); const response: DeleteCapacityProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1539,10 +1494,9 @@ const de_DeleteCapacityProviderCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1560,12 +1514,12 @@ export const de_DeleteClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteClusterResponse(data, context); + contents = _json(data); const response: DeleteClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1607,10 +1561,9 @@ const de_DeleteClusterCommandError = async ( throw await de_UpdateInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1633,7 +1586,7 @@ export const de_DeleteServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1666,10 +1619,9 @@ const de_DeleteServiceCommandError = async ( throw await de_ServiceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1692,7 +1644,7 @@ export const de_DeleteTaskDefinitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1722,10 +1674,9 @@ const de_DeleteTaskDefinitionsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1748,7 +1699,7 @@ export const de_DeleteTaskSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1793,10 +1744,9 @@ const de_DeleteTaskSetCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1819,7 +1769,7 @@ export const de_DeregisterContainerInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1849,10 +1799,9 @@ const de_DeregisterContainerInstanceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1875,7 +1824,7 @@ export const de_DeregisterTaskDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1902,10 +1851,9 @@ const de_DeregisterTaskDefinitionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1923,12 +1871,12 @@ export const de_DescribeCapacityProvidersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCapacityProvidersResponse(data, context); + contents = _json(data); const response: DescribeCapacityProvidersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1955,10 +1903,9 @@ const de_DescribeCapacityProvidersCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1976,12 +1923,12 @@ export const de_DescribeClustersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeClustersResponse(data, context); + contents = _json(data); const response: DescribeClustersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2008,10 +1955,9 @@ const de_DescribeClustersCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2034,7 +1980,7 @@ export const de_DescribeContainerInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2064,10 +2010,9 @@ const de_DescribeContainerInstancesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2090,7 +2035,7 @@ export const de_DescribeServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2120,10 +2065,9 @@ const de_DescribeServicesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2146,7 +2090,7 @@ export const de_DescribeTaskDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2173,10 +2117,9 @@ const de_DescribeTaskDefinitionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2199,7 +2142,7 @@ export const de_DescribeTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2229,10 +2172,9 @@ const de_DescribeTasksCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2255,7 +2197,7 @@ export const de_DescribeTaskSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2297,10 +2239,9 @@ const de_DescribeTaskSetsCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2318,12 +2259,12 @@ export const de_DiscoverPollEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DiscoverPollEndpointResponse(data, context); + contents = _json(data); const response: DiscoverPollEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2347,10 +2288,9 @@ const de_DiscoverPollEndpointCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2368,12 +2308,12 @@ export const de_ExecuteCommandCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExecuteCommandResponse(data, context); + contents = _json(data); const response: ExecuteCommandCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2409,10 +2349,9 @@ const de_ExecuteCommandCommandError = async ( throw await de_TargetNotConnectedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2435,7 +2374,7 @@ export const de_GetTaskProtectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2474,10 +2413,9 @@ const de_GetTaskProtectionCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2495,12 +2433,12 @@ export const de_ListAccountSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAccountSettingsResponse(data, context); + contents = _json(data); const response: ListAccountSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2527,10 +2465,9 @@ const de_ListAccountSettingsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2548,12 +2485,12 @@ export const de_ListAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAttributesResponse(data, context); + contents = _json(data); const response: ListAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2577,10 +2514,9 @@ const de_ListAttributesCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2598,12 +2534,12 @@ export const de_ListClustersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListClustersResponse(data, context); + contents = _json(data); const response: ListClustersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2630,10 +2566,9 @@ const de_ListClustersCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2651,12 +2586,12 @@ export const de_ListContainerInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListContainerInstancesResponse(data, context); + contents = _json(data); const response: ListContainerInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2686,10 +2621,9 @@ const de_ListContainerInstancesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2707,12 +2641,12 @@ export const de_ListServicesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServicesResponse(data, context); + contents = _json(data); const response: ListServicesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2742,10 +2676,9 @@ const de_ListServicesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2763,12 +2696,12 @@ export const de_ListServicesByNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServicesByNamespaceResponse(data, context); + contents = _json(data); const response: ListServicesByNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2798,10 +2731,9 @@ const de_ListServicesByNamespaceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2819,12 +2751,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2854,10 +2786,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2875,12 +2806,12 @@ export const de_ListTaskDefinitionFamiliesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTaskDefinitionFamiliesResponse(data, context); + contents = _json(data); const response: ListTaskDefinitionFamiliesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2907,10 +2838,9 @@ const de_ListTaskDefinitionFamiliesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2928,12 +2858,12 @@ export const de_ListTaskDefinitionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTaskDefinitionsResponse(data, context); + contents = _json(data); const response: ListTaskDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2960,10 +2890,9 @@ const de_ListTaskDefinitionsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,12 +2910,12 @@ export const de_ListTasksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTasksResponse(data, context); + contents = _json(data); const response: ListTasksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3019,10 +2948,9 @@ const de_ListTasksCommandError = async ( throw await de_ServiceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3040,12 +2968,12 @@ export const de_PutAccountSettingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAccountSettingResponse(data, context); + contents = _json(data); const response: PutAccountSettingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3072,10 +3000,9 @@ const de_PutAccountSettingCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3093,12 +3020,12 @@ export const de_PutAccountSettingDefaultCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAccountSettingDefaultResponse(data, context); + contents = _json(data); const response: PutAccountSettingDefaultCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3125,10 +3052,9 @@ const de_PutAccountSettingDefaultCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3146,12 +3072,12 @@ export const de_PutAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAttributesResponse(data, context); + contents = _json(data); const response: PutAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3181,10 +3107,9 @@ const de_PutAttributesCommandError = async ( throw await de_TargetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3202,12 +3127,12 @@ export const de_PutClusterCapacityProvidersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutClusterCapacityProvidersResponse(data, context); + contents = _json(data); const response: PutClusterCapacityProvidersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3243,10 +3168,9 @@ const de_PutClusterCapacityProvidersCommandError = async ( throw await de_UpdateInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3269,7 +3193,7 @@ export const de_RegisterContainerInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3296,10 +3220,9 @@ const de_RegisterContainerInstanceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3322,7 +3245,7 @@ export const de_RegisterTaskDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3349,10 +3272,9 @@ const de_RegisterTaskDefinitionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3375,7 +3297,7 @@ export const de_RunTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3420,10 +3342,9 @@ const de_RunTaskCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3446,7 +3367,7 @@ export const de_StartTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3476,10 +3397,9 @@ const de_StartTaskCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3502,7 +3422,7 @@ export const de_StopTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3532,10 +3452,9 @@ const de_StopTaskCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3553,12 +3472,12 @@ export const de_SubmitAttachmentStateChangesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SubmitAttachmentStateChangesResponse(data, context); + contents = _json(data); const response: SubmitAttachmentStateChangesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3588,10 +3507,9 @@ const de_SubmitAttachmentStateChangesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3609,12 +3527,12 @@ export const de_SubmitContainerStateChangeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SubmitContainerStateChangeResponse(data, context); + contents = _json(data); const response: SubmitContainerStateChangeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3641,10 +3559,9 @@ const de_SubmitContainerStateChangeCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3662,12 +3579,12 @@ export const de_SubmitTaskStateChangeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SubmitTaskStateChangeResponse(data, context); + contents = _json(data); const response: SubmitTaskStateChangeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3697,10 +3614,9 @@ const de_SubmitTaskStateChangeCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3718,12 +3634,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3756,10 +3672,9 @@ const de_TagResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3777,12 +3692,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3815,10 +3730,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3836,12 +3750,12 @@ export const de_UpdateCapacityProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCapacityProviderResponse(data, context); + contents = _json(data); const response: UpdateCapacityProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3868,10 +3782,9 @@ const de_UpdateCapacityProviderCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3889,12 +3802,12 @@ export const de_UpdateClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateClusterResponse(data, context); + contents = _json(data); const response: UpdateClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3924,10 +3837,9 @@ const de_UpdateClusterCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3945,12 +3857,12 @@ export const de_UpdateClusterSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateClusterSettingsResponse(data, context); + contents = _json(data); const response: UpdateClusterSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3980,10 +3892,9 @@ const de_UpdateClusterSettingsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4006,7 +3917,7 @@ export const de_UpdateContainerAgentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4045,10 +3956,9 @@ const de_UpdateContainerAgentCommandError = async ( throw await de_UpdateInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4071,7 +3981,7 @@ export const de_UpdateContainerInstancesStateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4101,10 +4011,9 @@ const de_UpdateContainerInstancesStateCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4127,7 +4036,7 @@ export const de_UpdateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4175,10 +4084,9 @@ const de_UpdateServiceCommandError = async ( throw await de_ServiceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4201,7 +4109,7 @@ export const de_UpdateServicePrimaryTaskSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4246,10 +4154,9 @@ const de_UpdateServicePrimaryTaskSetCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4272,7 +4179,7 @@ export const de_UpdateTaskProtectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4311,10 +4218,9 @@ const de_UpdateTaskProtectionCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4337,7 +4243,7 @@ export const de_UpdateTaskSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4382,10 +4288,9 @@ const de_UpdateTaskSetCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4399,7 +4304,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4415,7 +4320,7 @@ const de_AttributeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AttributeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new AttributeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4428,7 +4333,7 @@ const de_AttributeLimitExceededExceptionRes = async ( */ const de_BlockedExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BlockedException(body, context); + const deserialized: any = _json(body); const exception = new BlockedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4441,7 +4346,7 @@ const de_BlockedExceptionRes = async (parsedOutput: any, context: __SerdeContext */ const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClientException(body, context); + const deserialized: any = _json(body); const exception = new ClientException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4457,7 +4362,7 @@ const de_ClusterContainsContainerInstancesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterContainsContainerInstancesException(body, context); + const deserialized: any = _json(body); const exception = new ClusterContainsContainerInstancesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4473,7 +4378,7 @@ const de_ClusterContainsServicesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterContainsServicesException(body, context); + const deserialized: any = _json(body); const exception = new ClusterContainsServicesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4489,7 +4394,7 @@ const de_ClusterContainsTasksExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterContainsTasksException(body, context); + const deserialized: any = _json(body); const exception = new ClusterContainsTasksException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4505,7 +4410,7 @@ const de_ClusterNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ClusterNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4521,7 +4426,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4537,7 +4442,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4553,7 +4458,7 @@ const de_MissingVersionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingVersionException(body, context); + const deserialized: any = _json(body); const exception = new MissingVersionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4569,7 +4474,7 @@ const de_NamespaceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NamespaceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NamespaceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4585,7 +4490,7 @@ const de_NoUpdateAvailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoUpdateAvailableException(body, context); + const deserialized: any = _json(body); const exception = new NoUpdateAvailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4601,7 +4506,7 @@ const de_PlatformTaskDefinitionIncompatibilityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PlatformTaskDefinitionIncompatibilityException(body, context); + const deserialized: any = _json(body); const exception = new PlatformTaskDefinitionIncompatibilityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4617,7 +4522,7 @@ const de_PlatformUnknownExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PlatformUnknownException(body, context); + const deserialized: any = _json(body); const exception = new PlatformUnknownException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4633,7 +4538,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4649,7 +4554,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4662,7 +4567,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ServerExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServerException(body, context); + const deserialized: any = _json(body); const exception = new ServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4678,7 +4583,7 @@ const de_ServiceNotActiveExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceNotActiveException(body, context); + const deserialized: any = _json(body); const exception = new ServiceNotActiveException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4694,7 +4599,7 @@ const de_ServiceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ServiceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4710,7 +4615,7 @@ const de_TargetNotConnectedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetNotConnectedException(body, context); + const deserialized: any = _json(body); const exception = new TargetNotConnectedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4726,7 +4631,7 @@ const de_TargetNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TargetNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4742,7 +4647,7 @@ const de_TaskSetNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TaskSetNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TaskSetNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4758,7 +4663,7 @@ const de_UnsupportedFeatureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedFeatureException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedFeatureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4774,7 +4679,7 @@ const de_UpdateInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UpdateInProgressException(body, context); + const deserialized: any = _json(body); const exception = new UpdateInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4782,4825 +4687,1315 @@ const de_UpdateInProgressExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AttachmentStateChange - */ -const se_AttachmentStateChange = (input: AttachmentStateChange, context: __SerdeContext): any => { - return { - ...(input.attachmentArn != null && { attachmentArn: input.attachmentArn }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_AttachmentStateChange omitted. -/** - * serializeAws_json1_1AttachmentStateChanges - */ -const se_AttachmentStateChanges = (input: AttachmentStateChange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttachmentStateChange(entry, context); - }); -}; +// se_AttachmentStateChanges omitted. -/** - * serializeAws_json1_1Attribute - */ -const se_Attribute = (input: Attribute, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.targetId != null && { targetId: input.targetId }), - ...(input.targetType != null && { targetType: input.targetType }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Attribute omitted. -/** - * serializeAws_json1_1Attributes - */ -const se_Attributes = (input: Attribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Attribute(entry, context); - }); -}; +// se_Attributes omitted. -/** - * serializeAws_json1_1AutoScalingGroupProvider - */ -const se_AutoScalingGroupProvider = (input: AutoScalingGroupProvider, context: __SerdeContext): any => { - return { - ...(input.autoScalingGroupArn != null && { autoScalingGroupArn: input.autoScalingGroupArn }), - ...(input.managedScaling != null && { managedScaling: se_ManagedScaling(input.managedScaling, context) }), - ...(input.managedTerminationProtection != null && { - managedTerminationProtection: input.managedTerminationProtection, - }), - }; -}; +// se_AutoScalingGroupProvider omitted. -/** - * serializeAws_json1_1AutoScalingGroupProviderUpdate - */ -const se_AutoScalingGroupProviderUpdate = (input: AutoScalingGroupProviderUpdate, context: __SerdeContext): any => { - return { - ...(input.managedScaling != null && { managedScaling: se_ManagedScaling(input.managedScaling, context) }), - ...(input.managedTerminationProtection != null && { - managedTerminationProtection: input.managedTerminationProtection, - }), - }; -}; +// se_AutoScalingGroupProviderUpdate omitted. -/** - * serializeAws_json1_1AwsVpcConfiguration - */ -const se_AwsVpcConfiguration = (input: AwsVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.assignPublicIp != null && { assignPublicIp: input.assignPublicIp }), - ...(input.securityGroups != null && { securityGroups: se_StringList(input.securityGroups, context) }), - ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }), - }; -}; +// se_AwsVpcConfiguration omitted. -/** - * serializeAws_json1_1CapacityProviderFieldList - */ -const se_CapacityProviderFieldList = (input: (CapacityProviderField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CapacityProviderFieldList omitted. -/** - * serializeAws_json1_1CapacityProviderStrategy - */ -const se_CapacityProviderStrategy = (input: CapacityProviderStrategyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CapacityProviderStrategyItem(entry, context); - }); -}; +// se_CapacityProviderStrategy omitted. -/** - * serializeAws_json1_1CapacityProviderStrategyItem - */ -const se_CapacityProviderStrategyItem = (input: CapacityProviderStrategyItem, context: __SerdeContext): any => { - return { - ...(input.base != null && { base: input.base }), - ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_CapacityProviderStrategyItem omitted. -/** - * serializeAws_json1_1ClusterConfiguration - */ -const se_ClusterConfiguration = (input: ClusterConfiguration, context: __SerdeContext): any => { - return { - ...(input.executeCommandConfiguration != null && { - executeCommandConfiguration: se_ExecuteCommandConfiguration(input.executeCommandConfiguration, context), - }), - }; -}; +// se_ClusterConfiguration omitted. -/** - * serializeAws_json1_1ClusterFieldList - */ -const se_ClusterFieldList = (input: (ClusterField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ClusterFieldList omitted. -/** - * serializeAws_json1_1ClusterServiceConnectDefaultsRequest - */ -const se_ClusterServiceConnectDefaultsRequest = ( - input: ClusterServiceConnectDefaultsRequest, - context: __SerdeContext -): any => { - return { - ...(input.namespace != null && { namespace: input.namespace }), - }; -}; +// se_ClusterServiceConnectDefaultsRequest omitted. -/** - * serializeAws_json1_1ClusterSetting - */ -const se_ClusterSetting = (input: ClusterSetting, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ClusterSetting omitted. -/** - * serializeAws_json1_1ClusterSettings - */ -const se_ClusterSettings = (input: ClusterSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ClusterSetting(entry, context); - }); -}; +// se_ClusterSettings omitted. -/** - * serializeAws_json1_1CompatibilityList - */ -const se_CompatibilityList = (input: (Compatibility | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CompatibilityList omitted. -/** - * serializeAws_json1_1ContainerDefinition - */ -const se_ContainerDefinition = (input: ContainerDefinition, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.cpu != null && { cpu: input.cpu }), - ...(input.dependsOn != null && { dependsOn: se_ContainerDependencies(input.dependsOn, context) }), - ...(input.disableNetworking != null && { disableNetworking: input.disableNetworking }), - ...(input.dnsSearchDomains != null && { dnsSearchDomains: se_StringList(input.dnsSearchDomains, context) }), - ...(input.dnsServers != null && { dnsServers: se_StringList(input.dnsServers, context) }), - ...(input.dockerLabels != null && { dockerLabels: se_DockerLabelsMap(input.dockerLabels, context) }), - ...(input.dockerSecurityOptions != null && { - dockerSecurityOptions: se_StringList(input.dockerSecurityOptions, context), - }), - ...(input.entryPoint != null && { entryPoint: se_StringList(input.entryPoint, context) }), - ...(input.environment != null && { environment: se_EnvironmentVariables(input.environment, context) }), - ...(input.environmentFiles != null && { environmentFiles: se_EnvironmentFiles(input.environmentFiles, context) }), - ...(input.essential != null && { essential: input.essential }), - ...(input.extraHosts != null && { extraHosts: se_HostEntryList(input.extraHosts, context) }), - ...(input.firelensConfiguration != null && { - firelensConfiguration: se_FirelensConfiguration(input.firelensConfiguration, context), - }), - ...(input.healthCheck != null && { healthCheck: se_HealthCheck(input.healthCheck, context) }), - ...(input.hostname != null && { hostname: input.hostname }), - ...(input.image != null && { image: input.image }), - ...(input.interactive != null && { interactive: input.interactive }), - ...(input.links != null && { links: se_StringList(input.links, context) }), - ...(input.linuxParameters != null && { linuxParameters: se_LinuxParameters(input.linuxParameters, context) }), - ...(input.logConfiguration != null && { logConfiguration: se_LogConfiguration(input.logConfiguration, context) }), - ...(input.memory != null && { memory: input.memory }), - ...(input.memoryReservation != null && { memoryReservation: input.memoryReservation }), - ...(input.mountPoints != null && { mountPoints: se_MountPointList(input.mountPoints, context) }), - ...(input.name != null && { name: input.name }), - ...(input.portMappings != null && { portMappings: se_PortMappingList(input.portMappings, context) }), - ...(input.privileged != null && { privileged: input.privileged }), - ...(input.pseudoTerminal != null && { pseudoTerminal: input.pseudoTerminal }), - ...(input.readonlyRootFilesystem != null && { readonlyRootFilesystem: input.readonlyRootFilesystem }), - ...(input.repositoryCredentials != null && { - repositoryCredentials: se_RepositoryCredentials(input.repositoryCredentials, context), - }), - ...(input.resourceRequirements != null && { - resourceRequirements: se_ResourceRequirements(input.resourceRequirements, context), - }), - ...(input.secrets != null && { secrets: se_SecretList(input.secrets, context) }), - ...(input.startTimeout != null && { startTimeout: input.startTimeout }), - ...(input.stopTimeout != null && { stopTimeout: input.stopTimeout }), - ...(input.systemControls != null && { systemControls: se_SystemControls(input.systemControls, context) }), - ...(input.ulimits != null && { ulimits: se_UlimitList(input.ulimits, context) }), - ...(input.user != null && { user: input.user }), - ...(input.volumesFrom != null && { volumesFrom: se_VolumeFromList(input.volumesFrom, context) }), - ...(input.workingDirectory != null && { workingDirectory: input.workingDirectory }), - }; -}; +// se_ContainerDefinition omitted. -/** - * serializeAws_json1_1ContainerDefinitions - */ -const se_ContainerDefinitions = (input: ContainerDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContainerDefinition(entry, context); - }); -}; +// se_ContainerDefinitions omitted. -/** - * serializeAws_json1_1ContainerDependencies - */ -const se_ContainerDependencies = (input: ContainerDependency[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContainerDependency(entry, context); - }); -}; +// se_ContainerDependencies omitted. -/** - * serializeAws_json1_1ContainerDependency - */ -const se_ContainerDependency = (input: ContainerDependency, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: input.condition }), - ...(input.containerName != null && { containerName: input.containerName }), - }; -}; +// se_ContainerDependency omitted. -/** - * serializeAws_json1_1ContainerInstanceFieldList - */ -const se_ContainerInstanceFieldList = (input: (ContainerInstanceField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ContainerInstanceFieldList omitted. -/** - * serializeAws_json1_1ContainerOverride - */ -const se_ContainerOverride = (input: ContainerOverride, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.cpu != null && { cpu: input.cpu }), - ...(input.environment != null && { environment: se_EnvironmentVariables(input.environment, context) }), - ...(input.environmentFiles != null && { environmentFiles: se_EnvironmentFiles(input.environmentFiles, context) }), - ...(input.memory != null && { memory: input.memory }), - ...(input.memoryReservation != null && { memoryReservation: input.memoryReservation }), - ...(input.name != null && { name: input.name }), - ...(input.resourceRequirements != null && { - resourceRequirements: se_ResourceRequirements(input.resourceRequirements, context), - }), - }; -}; +// se_ContainerOverride omitted. -/** - * serializeAws_json1_1ContainerOverrides - */ -const se_ContainerOverrides = (input: ContainerOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContainerOverride(entry, context); - }); -}; +// se_ContainerOverrides omitted. -/** - * serializeAws_json1_1ContainerStateChange - */ -const se_ContainerStateChange = (input: ContainerStateChange, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.exitCode != null && { exitCode: input.exitCode }), - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.networkBindings != null && { networkBindings: se_NetworkBindings(input.networkBindings, context) }), - ...(input.reason != null && { reason: input.reason }), - ...(input.runtimeId != null && { runtimeId: input.runtimeId }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_ContainerStateChange omitted. -/** - * serializeAws_json1_1ContainerStateChanges - */ -const se_ContainerStateChanges = (input: ContainerStateChange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContainerStateChange(entry, context); - }); -}; +// se_ContainerStateChanges omitted. -/** - * serializeAws_json1_1CreateCapacityProviderRequest - */ -const se_CreateCapacityProviderRequest = (input: CreateCapacityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.autoScalingGroupProvider != null && { - autoScalingGroupProvider: se_AutoScalingGroupProvider(input.autoScalingGroupProvider, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_CreateCapacityProviderRequest omitted. -/** - * serializeAws_json1_1CreateClusterRequest - */ -const se_CreateClusterRequest = (input: CreateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProviders != null && { capacityProviders: se_StringList(input.capacityProviders, context) }), - ...(input.clusterName != null && { clusterName: input.clusterName }), - ...(input.configuration != null && { configuration: se_ClusterConfiguration(input.configuration, context) }), - ...(input.defaultCapacityProviderStrategy != null && { - defaultCapacityProviderStrategy: se_CapacityProviderStrategy(input.defaultCapacityProviderStrategy, context), - }), - ...(input.serviceConnectDefaults != null && { - serviceConnectDefaults: se_ClusterServiceConnectDefaultsRequest(input.serviceConnectDefaults, context), - }), - ...(input.settings != null && { settings: se_ClusterSettings(input.settings, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_CreateClusterRequest omitted. -/** - * serializeAws_json1_1CreateServiceRequest - */ -const se_CreateServiceRequest = (input: CreateServiceRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProviderStrategy != null && { - capacityProviderStrategy: se_CapacityProviderStrategy(input.capacityProviderStrategy, context), - }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.deploymentConfiguration != null && { - deploymentConfiguration: se_DeploymentConfiguration(input.deploymentConfiguration, context), - }), - ...(input.deploymentController != null && { - deploymentController: se_DeploymentController(input.deploymentController, context), - }), - ...(input.desiredCount != null && { desiredCount: input.desiredCount }), - ...(input.enableECSManagedTags != null && { enableECSManagedTags: input.enableECSManagedTags }), - ...(input.enableExecuteCommand != null && { enableExecuteCommand: input.enableExecuteCommand }), - ...(input.healthCheckGracePeriodSeconds != null && { - healthCheckGracePeriodSeconds: input.healthCheckGracePeriodSeconds, - }), - ...(input.launchType != null && { launchType: input.launchType }), - ...(input.loadBalancers != null && { loadBalancers: se_LoadBalancers(input.loadBalancers, context) }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.placementConstraints != null && { - placementConstraints: se_PlacementConstraints(input.placementConstraints, context), - }), - ...(input.placementStrategy != null && { - placementStrategy: se_PlacementStrategies(input.placementStrategy, context), - }), - ...(input.platformVersion != null && { platformVersion: input.platformVersion }), - ...(input.propagateTags != null && { propagateTags: input.propagateTags }), - ...(input.role != null && { role: input.role }), - ...(input.schedulingStrategy != null && { schedulingStrategy: input.schedulingStrategy }), - ...(input.serviceConnectConfiguration != null && { - serviceConnectConfiguration: se_ServiceConnectConfiguration(input.serviceConnectConfiguration, context), - }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.serviceRegistries != null && { - serviceRegistries: se_ServiceRegistries(input.serviceRegistries, context), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; -}; +// se_CreateServiceRequest omitted. /** * serializeAws_json1_1CreateTaskSetRequest */ const se_CreateTaskSetRequest = (input: CreateTaskSetRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProviderStrategy != null && { - capacityProviderStrategy: se_CapacityProviderStrategy(input.capacityProviderStrategy, context), - }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.externalId != null && { externalId: input.externalId }), - ...(input.launchType != null && { launchType: input.launchType }), - ...(input.loadBalancers != null && { loadBalancers: se_LoadBalancers(input.loadBalancers, context) }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.platformVersion != null && { platformVersion: input.platformVersion }), - ...(input.scale != null && { scale: se_Scale(input.scale, context) }), - ...(input.service != null && { service: input.service }), - ...(input.serviceRegistries != null && { - serviceRegistries: se_ServiceRegistries(input.serviceRegistries, context), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; + return take(input, { + capacityProviderStrategy: _json, + clientToken: [], + cluster: [], + externalId: [], + launchType: [], + loadBalancers: _json, + networkConfiguration: _json, + platformVersion: [], + scale: (_) => se_Scale(_, context), + service: [], + serviceRegistries: _json, + tags: _json, + taskDefinition: [], + }); }; -/** - * serializeAws_json1_1DeleteAccountSettingRequest - */ -const se_DeleteAccountSettingRequest = (input: DeleteAccountSettingRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.principalArn != null && { principalArn: input.principalArn }), - }; -}; +// se_DeleteAccountSettingRequest omitted. -/** - * serializeAws_json1_1DeleteAttributesRequest - */ -const se_DeleteAttributesRequest = (input: DeleteAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }), - ...(input.cluster != null && { cluster: input.cluster }), - }; -}; +// se_DeleteAttributesRequest omitted. -/** - * serializeAws_json1_1DeleteCapacityProviderRequest - */ -const se_DeleteCapacityProviderRequest = (input: DeleteCapacityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }), - }; -}; +// se_DeleteCapacityProviderRequest omitted. -/** - * serializeAws_json1_1DeleteClusterRequest - */ -const se_DeleteClusterRequest = (input: DeleteClusterRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - }; -}; +// se_DeleteClusterRequest omitted. -/** - * serializeAws_json1_1DeleteServiceRequest - */ -const se_DeleteServiceRequest = (input: DeleteServiceRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.force != null && { force: input.force }), - ...(input.service != null && { service: input.service }), - }; -}; +// se_DeleteServiceRequest omitted. -/** - * serializeAws_json1_1DeleteTaskDefinitionsRequest - */ -const se_DeleteTaskDefinitionsRequest = (input: DeleteTaskDefinitionsRequest, context: __SerdeContext): any => { - return { - ...(input.taskDefinitions != null && { taskDefinitions: se_StringList(input.taskDefinitions, context) }), - }; -}; +// se_DeleteTaskDefinitionsRequest omitted. -/** - * serializeAws_json1_1DeleteTaskSetRequest - */ -const se_DeleteTaskSetRequest = (input: DeleteTaskSetRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.force != null && { force: input.force }), - ...(input.service != null && { service: input.service }), - ...(input.taskSet != null && { taskSet: input.taskSet }), - }; -}; +// se_DeleteTaskSetRequest omitted. -/** - * serializeAws_json1_1DeploymentAlarms - */ -const se_DeploymentAlarms = (input: DeploymentAlarms, context: __SerdeContext): any => { - return { - ...(input.alarmNames != null && { alarmNames: se_StringList(input.alarmNames, context) }), - ...(input.enable != null && { enable: input.enable }), - ...(input.rollback != null && { rollback: input.rollback }), - }; -}; +// se_DeploymentAlarms omitted. -/** - * serializeAws_json1_1DeploymentCircuitBreaker - */ -const se_DeploymentCircuitBreaker = (input: DeploymentCircuitBreaker, context: __SerdeContext): any => { - return { - ...(input.enable != null && { enable: input.enable }), - ...(input.rollback != null && { rollback: input.rollback }), - }; -}; +// se_DeploymentCircuitBreaker omitted. -/** - * serializeAws_json1_1DeploymentConfiguration - */ -const se_DeploymentConfiguration = (input: DeploymentConfiguration, context: __SerdeContext): any => { - return { - ...(input.alarms != null && { alarms: se_DeploymentAlarms(input.alarms, context) }), - ...(input.deploymentCircuitBreaker != null && { - deploymentCircuitBreaker: se_DeploymentCircuitBreaker(input.deploymentCircuitBreaker, context), - }), - ...(input.maximumPercent != null && { maximumPercent: input.maximumPercent }), - ...(input.minimumHealthyPercent != null && { minimumHealthyPercent: input.minimumHealthyPercent }), - }; -}; +// se_DeploymentConfiguration omitted. -/** - * serializeAws_json1_1DeploymentController - */ -const se_DeploymentController = (input: DeploymentController, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - }; -}; +// se_DeploymentController omitted. -/** - * serializeAws_json1_1DeregisterContainerInstanceRequest - */ -const se_DeregisterContainerInstanceRequest = ( - input: DeregisterContainerInstanceRequest, - context: __SerdeContext -): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstance != null && { containerInstance: input.containerInstance }), - ...(input.force != null && { force: input.force }), - }; -}; +// se_DeregisterContainerInstanceRequest omitted. -/** - * serializeAws_json1_1DeregisterTaskDefinitionRequest - */ -const se_DeregisterTaskDefinitionRequest = (input: DeregisterTaskDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; -}; +// se_DeregisterTaskDefinitionRequest omitted. -/** - * serializeAws_json1_1DescribeCapacityProvidersRequest - */ -const se_DescribeCapacityProvidersRequest = (input: DescribeCapacityProvidersRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProviders != null && { capacityProviders: se_StringList(input.capacityProviders, context) }), - ...(input.include != null && { include: se_CapacityProviderFieldList(input.include, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeCapacityProvidersRequest omitted. -/** - * serializeAws_json1_1DescribeClustersRequest - */ -const se_DescribeClustersRequest = (input: DescribeClustersRequest, context: __SerdeContext): any => { - return { - ...(input.clusters != null && { clusters: se_StringList(input.clusters, context) }), - ...(input.include != null && { include: se_ClusterFieldList(input.include, context) }), - }; -}; +// se_DescribeClustersRequest omitted. -/** - * serializeAws_json1_1DescribeContainerInstancesRequest - */ -const se_DescribeContainerInstancesRequest = ( - input: DescribeContainerInstancesRequest, - context: __SerdeContext -): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstances != null && { containerInstances: se_StringList(input.containerInstances, context) }), - ...(input.include != null && { include: se_ContainerInstanceFieldList(input.include, context) }), - }; -}; +// se_DescribeContainerInstancesRequest omitted. -/** - * serializeAws_json1_1DescribeServicesRequest - */ -const se_DescribeServicesRequest = (input: DescribeServicesRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.include != null && { include: se_ServiceFieldList(input.include, context) }), - ...(input.services != null && { services: se_StringList(input.services, context) }), - }; -}; +// se_DescribeServicesRequest omitted. -/** - * serializeAws_json1_1DescribeTaskDefinitionRequest - */ -const se_DescribeTaskDefinitionRequest = (input: DescribeTaskDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.include != null && { include: se_TaskDefinitionFieldList(input.include, context) }), - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; -}; +// se_DescribeTaskDefinitionRequest omitted. -/** - * serializeAws_json1_1DescribeTaskSetsRequest - */ -const se_DescribeTaskSetsRequest = (input: DescribeTaskSetsRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.include != null && { include: se_TaskSetFieldList(input.include, context) }), - ...(input.service != null && { service: input.service }), - ...(input.taskSets != null && { taskSets: se_StringList(input.taskSets, context) }), - }; -}; +// se_DescribeTaskSetsRequest omitted. -/** - * serializeAws_json1_1DescribeTasksRequest - */ -const se_DescribeTasksRequest = (input: DescribeTasksRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.include != null && { include: se_TaskFieldList(input.include, context) }), - ...(input.tasks != null && { tasks: se_StringList(input.tasks, context) }), - }; -}; +// se_DescribeTasksRequest omitted. -/** - * serializeAws_json1_1Device - */ -const se_Device = (input: Device, context: __SerdeContext): any => { - return { - ...(input.containerPath != null && { containerPath: input.containerPath }), - ...(input.hostPath != null && { hostPath: input.hostPath }), - ...(input.permissions != null && { permissions: se_DeviceCgroupPermissions(input.permissions, context) }), - }; -}; +// se_Device omitted. -/** - * serializeAws_json1_1DeviceCgroupPermissions - */ -const se_DeviceCgroupPermissions = (input: (DeviceCgroupPermission | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceCgroupPermissions omitted. -/** - * serializeAws_json1_1DevicesList - */ -const se_DevicesList = (input: Device[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Device(entry, context); - }); -}; +// se_DevicesList omitted. -/** - * serializeAws_json1_1DiscoverPollEndpointRequest - */ -const se_DiscoverPollEndpointRequest = (input: DiscoverPollEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstance != null && { containerInstance: input.containerInstance }), - }; -}; +// se_DiscoverPollEndpointRequest omitted. -/** - * serializeAws_json1_1DockerLabelsMap - */ -const se_DockerLabelsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DockerLabelsMap omitted. -/** - * serializeAws_json1_1DockerVolumeConfiguration - */ -const se_DockerVolumeConfiguration = (input: DockerVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.autoprovision != null && { autoprovision: input.autoprovision }), - ...(input.driver != null && { driver: input.driver }), - ...(input.driverOpts != null && { driverOpts: se_StringMap(input.driverOpts, context) }), - ...(input.labels != null && { labels: se_StringMap(input.labels, context) }), - ...(input.scope != null && { scope: input.scope }), - }; -}; +// se_DockerVolumeConfiguration omitted. -/** - * serializeAws_json1_1EFSAuthorizationConfig - */ -const se_EFSAuthorizationConfig = (input: EFSAuthorizationConfig, context: __SerdeContext): any => { - return { - ...(input.accessPointId != null && { accessPointId: input.accessPointId }), - ...(input.iam != null && { iam: input.iam }), - }; -}; +// se_EFSAuthorizationConfig omitted. -/** - * serializeAws_json1_1EFSVolumeConfiguration - */ -const se_EFSVolumeConfiguration = (input: EFSVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.authorizationConfig != null && { - authorizationConfig: se_EFSAuthorizationConfig(input.authorizationConfig, context), - }), - ...(input.fileSystemId != null && { fileSystemId: input.fileSystemId }), - ...(input.rootDirectory != null && { rootDirectory: input.rootDirectory }), - ...(input.transitEncryption != null && { transitEncryption: input.transitEncryption }), - ...(input.transitEncryptionPort != null && { transitEncryptionPort: input.transitEncryptionPort }), - }; -}; +// se_EFSVolumeConfiguration omitted. -/** - * serializeAws_json1_1EnvironmentFile - */ -const se_EnvironmentFile = (input: EnvironmentFile, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_EnvironmentFile omitted. -/** - * serializeAws_json1_1EnvironmentFiles - */ -const se_EnvironmentFiles = (input: EnvironmentFile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnvironmentFile(entry, context); - }); -}; +// se_EnvironmentFiles omitted. -/** - * serializeAws_json1_1EnvironmentVariables - */ -const se_EnvironmentVariables = (input: KeyValuePair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeyValuePair(entry, context); - }); -}; +// se_EnvironmentVariables omitted. -/** - * serializeAws_json1_1EphemeralStorage - */ -const se_EphemeralStorage = (input: EphemeralStorage, context: __SerdeContext): any => { - return { - ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }), - }; -}; +// se_EphemeralStorage omitted. -/** - * serializeAws_json1_1ExecuteCommandConfiguration - */ -const se_ExecuteCommandConfiguration = (input: ExecuteCommandConfiguration, context: __SerdeContext): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.logConfiguration != null && { - logConfiguration: se_ExecuteCommandLogConfiguration(input.logConfiguration, context), - }), - ...(input.logging != null && { logging: input.logging }), - }; -}; +// se_ExecuteCommandConfiguration omitted. -/** - * serializeAws_json1_1ExecuteCommandLogConfiguration - */ -const se_ExecuteCommandLogConfiguration = (input: ExecuteCommandLogConfiguration, context: __SerdeContext): any => { - return { - ...(input.cloudWatchEncryptionEnabled != null && { - cloudWatchEncryptionEnabled: input.cloudWatchEncryptionEnabled, - }), - ...(input.cloudWatchLogGroupName != null && { cloudWatchLogGroupName: input.cloudWatchLogGroupName }), - ...(input.s3BucketName != null && { s3BucketName: input.s3BucketName }), - ...(input.s3EncryptionEnabled != null && { s3EncryptionEnabled: input.s3EncryptionEnabled }), - ...(input.s3KeyPrefix != null && { s3KeyPrefix: input.s3KeyPrefix }), - }; -}; +// se_ExecuteCommandLogConfiguration omitted. -/** - * serializeAws_json1_1ExecuteCommandRequest - */ -const se_ExecuteCommandRequest = (input: ExecuteCommandRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.command != null && { command: input.command }), - ...(input.container != null && { container: input.container }), - ...(input.interactive != null && { interactive: input.interactive }), - ...(input.task != null && { task: input.task }), - }; -}; +// se_ExecuteCommandRequest omitted. -/** - * serializeAws_json1_1FirelensConfiguration - */ -const se_FirelensConfiguration = (input: FirelensConfiguration, context: __SerdeContext): any => { - return { - ...(input.options != null && { options: se_FirelensConfigurationOptionsMap(input.options, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_FirelensConfiguration omitted. -/** - * serializeAws_json1_1FirelensConfigurationOptionsMap - */ -const se_FirelensConfigurationOptionsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FirelensConfigurationOptionsMap omitted. -/** - * serializeAws_json1_1FSxWindowsFileServerAuthorizationConfig - */ -const se_FSxWindowsFileServerAuthorizationConfig = ( - input: FSxWindowsFileServerAuthorizationConfig, - context: __SerdeContext -): any => { - return { - ...(input.credentialsParameter != null && { credentialsParameter: input.credentialsParameter }), - ...(input.domain != null && { domain: input.domain }), - }; -}; +// se_FSxWindowsFileServerAuthorizationConfig omitted. -/** - * serializeAws_json1_1FSxWindowsFileServerVolumeConfiguration - */ -const se_FSxWindowsFileServerVolumeConfiguration = ( - input: FSxWindowsFileServerVolumeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.authorizationConfig != null && { - authorizationConfig: se_FSxWindowsFileServerAuthorizationConfig(input.authorizationConfig, context), - }), - ...(input.fileSystemId != null && { fileSystemId: input.fileSystemId }), - ...(input.rootDirectory != null && { rootDirectory: input.rootDirectory }), - }; -}; +// se_FSxWindowsFileServerVolumeConfiguration omitted. -/** - * serializeAws_json1_1GetTaskProtectionRequest - */ -const se_GetTaskProtectionRequest = (input: GetTaskProtectionRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.tasks != null && { tasks: se_StringList(input.tasks, context) }), - }; -}; +// se_GetTaskProtectionRequest omitted. -/** - * serializeAws_json1_1HealthCheck - */ -const se_HealthCheck = (input: HealthCheck, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.interval != null && { interval: input.interval }), - ...(input.retries != null && { retries: input.retries }), - ...(input.startPeriod != null && { startPeriod: input.startPeriod }), - ...(input.timeout != null && { timeout: input.timeout }), - }; -}; +// se_HealthCheck omitted. -/** - * serializeAws_json1_1HostEntry - */ -const se_HostEntry = (input: HostEntry, context: __SerdeContext): any => { - return { - ...(input.hostname != null && { hostname: input.hostname }), - ...(input.ipAddress != null && { ipAddress: input.ipAddress }), - }; -}; +// se_HostEntry omitted. -/** - * serializeAws_json1_1HostEntryList - */ -const se_HostEntryList = (input: HostEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HostEntry(entry, context); - }); -}; +// se_HostEntryList omitted. -/** - * serializeAws_json1_1HostVolumeProperties - */ -const se_HostVolumeProperties = (input: HostVolumeProperties, context: __SerdeContext): any => { - return { - ...(input.sourcePath != null && { sourcePath: input.sourcePath }), - }; -}; +// se_HostVolumeProperties omitted. -/** - * serializeAws_json1_1InferenceAccelerator - */ -const se_InferenceAccelerator = (input: InferenceAccelerator, context: __SerdeContext): any => { - return { - ...(input.deviceName != null && { deviceName: input.deviceName }), - ...(input.deviceType != null && { deviceType: input.deviceType }), - }; -}; +// se_InferenceAccelerator omitted. -/** - * serializeAws_json1_1InferenceAcceleratorOverride - */ -const se_InferenceAcceleratorOverride = (input: InferenceAcceleratorOverride, context: __SerdeContext): any => { - return { - ...(input.deviceName != null && { deviceName: input.deviceName }), - ...(input.deviceType != null && { deviceType: input.deviceType }), - }; -}; +// se_InferenceAcceleratorOverride omitted. -/** - * serializeAws_json1_1InferenceAcceleratorOverrides - */ -const se_InferenceAcceleratorOverrides = (input: InferenceAcceleratorOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InferenceAcceleratorOverride(entry, context); - }); -}; +// se_InferenceAcceleratorOverrides omitted. -/** - * serializeAws_json1_1InferenceAccelerators - */ -const se_InferenceAccelerators = (input: InferenceAccelerator[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InferenceAccelerator(entry, context); - }); -}; +// se_InferenceAccelerators omitted. -/** - * serializeAws_json1_1KernelCapabilities - */ -const se_KernelCapabilities = (input: KernelCapabilities, context: __SerdeContext): any => { - return { - ...(input.add != null && { add: se_StringList(input.add, context) }), - ...(input.drop != null && { drop: se_StringList(input.drop, context) }), - }; -}; +// se_KernelCapabilities omitted. -/** - * serializeAws_json1_1KeyValuePair - */ -const se_KeyValuePair = (input: KeyValuePair, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_KeyValuePair omitted. -/** - * serializeAws_json1_1LinuxParameters - */ -const se_LinuxParameters = (input: LinuxParameters, context: __SerdeContext): any => { - return { - ...(input.capabilities != null && { capabilities: se_KernelCapabilities(input.capabilities, context) }), - ...(input.devices != null && { devices: se_DevicesList(input.devices, context) }), - ...(input.initProcessEnabled != null && { initProcessEnabled: input.initProcessEnabled }), - ...(input.maxSwap != null && { maxSwap: input.maxSwap }), - ...(input.sharedMemorySize != null && { sharedMemorySize: input.sharedMemorySize }), - ...(input.swappiness != null && { swappiness: input.swappiness }), - ...(input.tmpfs != null && { tmpfs: se_TmpfsList(input.tmpfs, context) }), - }; -}; +// se_LinuxParameters omitted. -/** - * serializeAws_json1_1ListAccountSettingsRequest - */ -const se_ListAccountSettingsRequest = (input: ListAccountSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.effectiveSettings != null && { effectiveSettings: input.effectiveSettings }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.principalArn != null && { principalArn: input.principalArn }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ListAccountSettingsRequest omitted. -/** - * serializeAws_json1_1ListAttributesRequest - */ -const se_ListAttributesRequest = (input: ListAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.attributeValue != null && { attributeValue: input.attributeValue }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.targetType != null && { targetType: input.targetType }), - }; -}; +// se_ListAttributesRequest omitted. -/** - * serializeAws_json1_1ListClustersRequest - */ -const se_ListClustersRequest = (input: ListClustersRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListClustersRequest omitted. -/** - * serializeAws_json1_1ListContainerInstancesRequest - */ -const se_ListContainerInstancesRequest = (input: ListContainerInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.filter != null && { filter: input.filter }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_ListContainerInstancesRequest omitted. -/** - * serializeAws_json1_1ListServicesByNamespaceRequest - */ -const se_ListServicesByNamespaceRequest = (input: ListServicesByNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.namespace != null && { namespace: input.namespace }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListServicesByNamespaceRequest omitted. -/** - * serializeAws_json1_1ListServicesRequest - */ -const se_ListServicesRequest = (input: ListServicesRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.launchType != null && { launchType: input.launchType }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.schedulingStrategy != null && { schedulingStrategy: input.schedulingStrategy }), - }; -}; +// se_ListServicesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListTaskDefinitionFamiliesRequest - */ -const se_ListTaskDefinitionFamiliesRequest = ( - input: ListTaskDefinitionFamiliesRequest, - context: __SerdeContext -): any => { - return { - ...(input.familyPrefix != null && { familyPrefix: input.familyPrefix }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_ListTaskDefinitionFamiliesRequest omitted. -/** - * serializeAws_json1_1ListTaskDefinitionsRequest - */ -const se_ListTaskDefinitionsRequest = (input: ListTaskDefinitionsRequest, context: __SerdeContext): any => { - return { - ...(input.familyPrefix != null && { familyPrefix: input.familyPrefix }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sort != null && { sort: input.sort }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_ListTaskDefinitionsRequest omitted. -/** - * serializeAws_json1_1ListTasksRequest - */ -const se_ListTasksRequest = (input: ListTasksRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstance != null && { containerInstance: input.containerInstance }), - ...(input.desiredStatus != null && { desiredStatus: input.desiredStatus }), - ...(input.family != null && { family: input.family }), - ...(input.launchType != null && { launchType: input.launchType }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.startedBy != null && { startedBy: input.startedBy }), - }; -}; +// se_ListTasksRequest omitted. -/** - * serializeAws_json1_1LoadBalancer - */ -const se_LoadBalancer = (input: LoadBalancer, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.containerPort != null && { containerPort: input.containerPort }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - ...(input.targetGroupArn != null && { targetGroupArn: input.targetGroupArn }), - }; -}; +// se_LoadBalancer omitted. -/** - * serializeAws_json1_1LoadBalancers - */ -const se_LoadBalancers = (input: LoadBalancer[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LoadBalancer(entry, context); - }); -}; +// se_LoadBalancers omitted. -/** - * serializeAws_json1_1LogConfiguration - */ -const se_LogConfiguration = (input: LogConfiguration, context: __SerdeContext): any => { - return { - ...(input.logDriver != null && { logDriver: input.logDriver }), - ...(input.options != null && { options: se_LogConfigurationOptionsMap(input.options, context) }), - ...(input.secretOptions != null && { secretOptions: se_SecretList(input.secretOptions, context) }), - }; -}; +// se_LogConfiguration omitted. -/** - * serializeAws_json1_1LogConfigurationOptionsMap - */ -const se_LogConfigurationOptionsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_LogConfigurationOptionsMap omitted. -/** - * serializeAws_json1_1ManagedAgentStateChange - */ -const se_ManagedAgentStateChange = (input: ManagedAgentStateChange, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.managedAgentName != null && { managedAgentName: input.managedAgentName }), - ...(input.reason != null && { reason: input.reason }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_1ManagedAgentStateChanges - */ -const se_ManagedAgentStateChanges = (input: ManagedAgentStateChange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ManagedAgentStateChange(entry, context); - }); -}; - -/** - * serializeAws_json1_1ManagedScaling - */ -const se_ManagedScaling = (input: ManagedScaling, context: __SerdeContext): any => { - return { - ...(input.instanceWarmupPeriod != null && { instanceWarmupPeriod: input.instanceWarmupPeriod }), - ...(input.maximumScalingStepSize != null && { maximumScalingStepSize: input.maximumScalingStepSize }), - ...(input.minimumScalingStepSize != null && { minimumScalingStepSize: input.minimumScalingStepSize }), - ...(input.status != null && { status: input.status }), - ...(input.targetCapacity != null && { targetCapacity: input.targetCapacity }), - }; -}; - -/** - * serializeAws_json1_1MountPoint - */ -const se_MountPoint = (input: MountPoint, context: __SerdeContext): any => { - return { - ...(input.containerPath != null && { containerPath: input.containerPath }), - ...(input.readOnly != null && { readOnly: input.readOnly }), - ...(input.sourceVolume != null && { sourceVolume: input.sourceVolume }), - }; -}; - -/** - * serializeAws_json1_1MountPointList - */ -const se_MountPointList = (input: MountPoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MountPoint(entry, context); - }); -}; - -/** - * serializeAws_json1_1NetworkBinding - */ -const se_NetworkBinding = (input: NetworkBinding, context: __SerdeContext): any => { - return { - ...(input.bindIP != null && { bindIP: input.bindIP }), - ...(input.containerPort != null && { containerPort: input.containerPort }), - ...(input.containerPortRange != null && { containerPortRange: input.containerPortRange }), - ...(input.hostPort != null && { hostPort: input.hostPort }), - ...(input.hostPortRange != null && { hostPortRange: input.hostPortRange }), - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; - -/** - * serializeAws_json1_1NetworkBindings - */ -const se_NetworkBindings = (input: NetworkBinding[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NetworkBinding(entry, context); - }); -}; - -/** - * serializeAws_json1_1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.awsvpcConfiguration != null && { - awsvpcConfiguration: se_AwsVpcConfiguration(input.awsvpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1PlacementConstraint - */ -const se_PlacementConstraint = (input: PlacementConstraint, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1PlacementConstraints - */ -const se_PlacementConstraints = (input: PlacementConstraint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementConstraint(entry, context); - }); -}; - -/** - * serializeAws_json1_1PlacementStrategies - */ -const se_PlacementStrategies = (input: PlacementStrategy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementStrategy(entry, context); - }); -}; - -/** - * serializeAws_json1_1PlacementStrategy - */ -const se_PlacementStrategy = (input: PlacementStrategy, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1PlatformDevice - */ -const se_PlatformDevice = (input: PlatformDevice, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1PlatformDevices - */ -const se_PlatformDevices = (input: PlatformDevice[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlatformDevice(entry, context); - }); -}; - -/** - * serializeAws_json1_1PortMapping - */ -const se_PortMapping = (input: PortMapping, context: __SerdeContext): any => { - return { - ...(input.appProtocol != null && { appProtocol: input.appProtocol }), - ...(input.containerPort != null && { containerPort: input.containerPort }), - ...(input.containerPortRange != null && { containerPortRange: input.containerPortRange }), - ...(input.hostPort != null && { hostPort: input.hostPort }), - ...(input.name != null && { name: input.name }), - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; - -/** - * serializeAws_json1_1PortMappingList - */ -const se_PortMappingList = (input: PortMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortMapping(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProxyConfiguration - */ -const se_ProxyConfiguration = (input: ProxyConfiguration, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.properties != null && { properties: se_ProxyConfigurationProperties(input.properties, context) }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1ProxyConfigurationProperties - */ -const se_ProxyConfigurationProperties = (input: KeyValuePair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeyValuePair(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutAccountSettingDefaultRequest - */ -const se_PutAccountSettingDefaultRequest = (input: PutAccountSettingDefaultRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1PutAccountSettingRequest - */ -const se_PutAccountSettingRequest = (input: PutAccountSettingRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.principalArn != null && { principalArn: input.principalArn }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1PutAttributesRequest - */ -const se_PutAttributesRequest = (input: PutAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }), - ...(input.cluster != null && { cluster: input.cluster }), - }; -}; - -/** - * serializeAws_json1_1PutClusterCapacityProvidersRequest - */ -const se_PutClusterCapacityProvidersRequest = ( - input: PutClusterCapacityProvidersRequest, - context: __SerdeContext -): any => { - return { - ...(input.capacityProviders != null && { capacityProviders: se_StringList(input.capacityProviders, context) }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.defaultCapacityProviderStrategy != null && { - defaultCapacityProviderStrategy: se_CapacityProviderStrategy(input.defaultCapacityProviderStrategy, context), - }), - }; -}; - -/** - * serializeAws_json1_1RegisterContainerInstanceRequest - */ -const se_RegisterContainerInstanceRequest = (input: RegisterContainerInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstanceArn != null && { containerInstanceArn: input.containerInstanceArn }), - ...(input.instanceIdentityDocument != null && { instanceIdentityDocument: input.instanceIdentityDocument }), - ...(input.instanceIdentityDocumentSignature != null && { - instanceIdentityDocumentSignature: input.instanceIdentityDocumentSignature, - }), - ...(input.platformDevices != null && { platformDevices: se_PlatformDevices(input.platformDevices, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.totalResources != null && { totalResources: se_Resources(input.totalResources, context) }), - ...(input.versionInfo != null && { versionInfo: se_VersionInfo(input.versionInfo, context) }), - }; -}; - -/** - * serializeAws_json1_1RegisterTaskDefinitionRequest - */ -const se_RegisterTaskDefinitionRequest = (input: RegisterTaskDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.containerDefinitions != null && { - containerDefinitions: se_ContainerDefinitions(input.containerDefinitions, context), - }), - ...(input.cpu != null && { cpu: input.cpu }), - ...(input.ephemeralStorage != null && { ephemeralStorage: se_EphemeralStorage(input.ephemeralStorage, context) }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.family != null && { family: input.family }), - ...(input.inferenceAccelerators != null && { - inferenceAccelerators: se_InferenceAccelerators(input.inferenceAccelerators, context), - }), - ...(input.ipcMode != null && { ipcMode: input.ipcMode }), - ...(input.memory != null && { memory: input.memory }), - ...(input.networkMode != null && { networkMode: input.networkMode }), - ...(input.pidMode != null && { pidMode: input.pidMode }), - ...(input.placementConstraints != null && { - placementConstraints: se_TaskDefinitionPlacementConstraints(input.placementConstraints, context), - }), - ...(input.proxyConfiguration != null && { - proxyConfiguration: se_ProxyConfiguration(input.proxyConfiguration, context), - }), - ...(input.requiresCompatibilities != null && { - requiresCompatibilities: se_CompatibilityList(input.requiresCompatibilities, context), - }), - ...(input.runtimePlatform != null && { runtimePlatform: se_RuntimePlatform(input.runtimePlatform, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.taskRoleArn != null && { taskRoleArn: input.taskRoleArn }), - ...(input.volumes != null && { volumes: se_VolumeList(input.volumes, context) }), - }; -}; - -/** - * serializeAws_json1_1RepositoryCredentials - */ -const se_RepositoryCredentials = (input: RepositoryCredentials, context: __SerdeContext): any => { - return { - ...(input.credentialsParameter != null && { credentialsParameter: input.credentialsParameter }), - }; -}; - -/** - * serializeAws_json1_1Resource - */ -const se_Resource = (input: Resource, context: __SerdeContext): any => { - return { - ...(input.doubleValue != null && { doubleValue: __serializeFloat(input.doubleValue) }), - ...(input.integerValue != null && { integerValue: input.integerValue }), - ...(input.longValue != null && { longValue: input.longValue }), - ...(input.name != null && { name: input.name }), - ...(input.stringSetValue != null && { stringSetValue: se_StringList(input.stringSetValue, context) }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1ResourceRequirement - */ -const se_ResourceRequirement = (input: ResourceRequirement, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1ResourceRequirements - */ -const se_ResourceRequirements = (input: ResourceRequirement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceRequirement(entry, context); - }); -}; - -/** - * serializeAws_json1_1Resources - */ -const se_Resources = (input: Resource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Resource(entry, context); - }); -}; - -/** - * serializeAws_json1_1RunTaskRequest - */ -const se_RunTaskRequest = (input: RunTaskRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProviderStrategy != null && { - capacityProviderStrategy: se_CapacityProviderStrategy(input.capacityProviderStrategy, context), - }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.count != null && { count: input.count }), - ...(input.enableECSManagedTags != null && { enableECSManagedTags: input.enableECSManagedTags }), - ...(input.enableExecuteCommand != null && { enableExecuteCommand: input.enableExecuteCommand }), - ...(input.group != null && { group: input.group }), - ...(input.launchType != null && { launchType: input.launchType }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.overrides != null && { overrides: se_TaskOverride(input.overrides, context) }), - ...(input.placementConstraints != null && { - placementConstraints: se_PlacementConstraints(input.placementConstraints, context), - }), - ...(input.placementStrategy != null && { - placementStrategy: se_PlacementStrategies(input.placementStrategy, context), - }), - ...(input.platformVersion != null && { platformVersion: input.platformVersion }), - ...(input.propagateTags != null && { propagateTags: input.propagateTags }), - ...(input.referenceId != null && { referenceId: input.referenceId }), - ...(input.startedBy != null && { startedBy: input.startedBy }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; -}; - -/** - * serializeAws_json1_1RuntimePlatform - */ -const se_RuntimePlatform = (input: RuntimePlatform, context: __SerdeContext): any => { - return { - ...(input.cpuArchitecture != null && { cpuArchitecture: input.cpuArchitecture }), - ...(input.operatingSystemFamily != null && { operatingSystemFamily: input.operatingSystemFamily }), - }; -}; - -/** - * serializeAws_json1_1Scale - */ -const se_Scale = (input: Scale, context: __SerdeContext): any => { - return { - ...(input.unit != null && { unit: input.unit }), - ...(input.value != null && { value: __serializeFloat(input.value) }), - }; -}; - -/** - * serializeAws_json1_1Secret - */ -const se_Secret = (input: Secret, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.valueFrom != null && { valueFrom: input.valueFrom }), - }; -}; - -/** - * serializeAws_json1_1SecretList - */ -const se_SecretList = (input: Secret[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Secret(entry, context); - }); -}; - -/** - * serializeAws_json1_1ServiceConnectClientAlias - */ -const se_ServiceConnectClientAlias = (input: ServiceConnectClientAlias, context: __SerdeContext): any => { - return { - ...(input.dnsName != null && { dnsName: input.dnsName }), - ...(input.port != null && { port: input.port }), - }; -}; - -/** - * serializeAws_json1_1ServiceConnectClientAliasList - */ -const se_ServiceConnectClientAliasList = (input: ServiceConnectClientAlias[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServiceConnectClientAlias(entry, context); - }); -}; - -/** - * serializeAws_json1_1ServiceConnectConfiguration - */ -const se_ServiceConnectConfiguration = (input: ServiceConnectConfiguration, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.logConfiguration != null && { logConfiguration: se_LogConfiguration(input.logConfiguration, context) }), - ...(input.namespace != null && { namespace: input.namespace }), - ...(input.services != null && { services: se_ServiceConnectServiceList(input.services, context) }), - }; -}; - -/** - * serializeAws_json1_1ServiceConnectService - */ -const se_ServiceConnectService = (input: ServiceConnectService, context: __SerdeContext): any => { - return { - ...(input.clientAliases != null && { - clientAliases: se_ServiceConnectClientAliasList(input.clientAliases, context), - }), - ...(input.discoveryName != null && { discoveryName: input.discoveryName }), - ...(input.ingressPortOverride != null && { ingressPortOverride: input.ingressPortOverride }), - ...(input.portName != null && { portName: input.portName }), - }; -}; - -/** - * serializeAws_json1_1ServiceConnectServiceList - */ -const se_ServiceConnectServiceList = (input: ServiceConnectService[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServiceConnectService(entry, context); - }); -}; - -/** - * serializeAws_json1_1ServiceFieldList - */ -const se_ServiceFieldList = (input: (ServiceField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ServiceRegistries - */ -const se_ServiceRegistries = (input: ServiceRegistry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServiceRegistry(entry, context); - }); -}; - -/** - * serializeAws_json1_1ServiceRegistry - */ -const se_ServiceRegistry = (input: ServiceRegistry, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.containerPort != null && { containerPort: input.containerPort }), - ...(input.port != null && { port: input.port }), - ...(input.registryArn != null && { registryArn: input.registryArn }), - }; -}; - -/** - * serializeAws_json1_1StartTaskRequest - */ -const se_StartTaskRequest = (input: StartTaskRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstances != null && { containerInstances: se_StringList(input.containerInstances, context) }), - ...(input.enableECSManagedTags != null && { enableECSManagedTags: input.enableECSManagedTags }), - ...(input.enableExecuteCommand != null && { enableExecuteCommand: input.enableExecuteCommand }), - ...(input.group != null && { group: input.group }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.overrides != null && { overrides: se_TaskOverride(input.overrides, context) }), - ...(input.propagateTags != null && { propagateTags: input.propagateTags }), - ...(input.referenceId != null && { referenceId: input.referenceId }), - ...(input.startedBy != null && { startedBy: input.startedBy }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; -}; - -/** - * serializeAws_json1_1StopTaskRequest - */ -const se_StopTaskRequest = (input: StopTaskRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.reason != null && { reason: input.reason }), - ...(input.task != null && { task: input.task }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1SubmitAttachmentStateChangesRequest - */ -const se_SubmitAttachmentStateChangesRequest = ( - input: SubmitAttachmentStateChangesRequest, - context: __SerdeContext -): any => { - return { - ...(input.attachments != null && { attachments: se_AttachmentStateChanges(input.attachments, context) }), - ...(input.cluster != null && { cluster: input.cluster }), - }; -}; - -/** - * serializeAws_json1_1SubmitContainerStateChangeRequest - */ -const se_SubmitContainerStateChangeRequest = ( - input: SubmitContainerStateChangeRequest, - context: __SerdeContext -): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.exitCode != null && { exitCode: input.exitCode }), - ...(input.networkBindings != null && { networkBindings: se_NetworkBindings(input.networkBindings, context) }), - ...(input.reason != null && { reason: input.reason }), - ...(input.runtimeId != null && { runtimeId: input.runtimeId }), - ...(input.status != null && { status: input.status }), - ...(input.task != null && { task: input.task }), - }; -}; - -/** - * serializeAws_json1_1SubmitTaskStateChangeRequest - */ -const se_SubmitTaskStateChangeRequest = (input: SubmitTaskStateChangeRequest, context: __SerdeContext): any => { - return { - ...(input.attachments != null && { attachments: se_AttachmentStateChanges(input.attachments, context) }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containers != null && { containers: se_ContainerStateChanges(input.containers, context) }), - ...(input.executionStoppedAt != null && { - executionStoppedAt: Math.round(input.executionStoppedAt.getTime() / 1000), - }), - ...(input.managedAgents != null && { managedAgents: se_ManagedAgentStateChanges(input.managedAgents, context) }), - ...(input.pullStartedAt != null && { pullStartedAt: Math.round(input.pullStartedAt.getTime() / 1000) }), - ...(input.pullStoppedAt != null && { pullStoppedAt: Math.round(input.pullStoppedAt.getTime() / 1000) }), - ...(input.reason != null && { reason: input.reason }), - ...(input.status != null && { status: input.status }), - ...(input.task != null && { task: input.task }), - }; -}; - -/** - * serializeAws_json1_1SystemControl - */ -const se_SystemControl = (input: SystemControl, context: __SerdeContext): any => { - return { - ...(input.namespace != null && { namespace: input.namespace }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1SystemControls - */ -const se_SystemControls = (input: SystemControl[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SystemControl(entry, context); - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TaskDefinitionFieldList - */ -const se_TaskDefinitionFieldList = (input: (TaskDefinitionField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TaskDefinitionPlacementConstraint - */ -const se_TaskDefinitionPlacementConstraint = ( - input: TaskDefinitionPlacementConstraint, - context: __SerdeContext -): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1TaskDefinitionPlacementConstraints - */ -const se_TaskDefinitionPlacementConstraints = ( - input: TaskDefinitionPlacementConstraint[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TaskDefinitionPlacementConstraint(entry, context); - }); -}; - -/** - * serializeAws_json1_1TaskFieldList - */ -const se_TaskFieldList = (input: (TaskField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TaskOverride - */ -const se_TaskOverride = (input: TaskOverride, context: __SerdeContext): any => { - return { - ...(input.containerOverrides != null && { - containerOverrides: se_ContainerOverrides(input.containerOverrides, context), - }), - ...(input.cpu != null && { cpu: input.cpu }), - ...(input.ephemeralStorage != null && { ephemeralStorage: se_EphemeralStorage(input.ephemeralStorage, context) }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.inferenceAcceleratorOverrides != null && { - inferenceAcceleratorOverrides: se_InferenceAcceleratorOverrides(input.inferenceAcceleratorOverrides, context), - }), - ...(input.memory != null && { memory: input.memory }), - ...(input.taskRoleArn != null && { taskRoleArn: input.taskRoleArn }), - }; -}; - -/** - * serializeAws_json1_1TaskSetFieldList - */ -const se_TaskSetFieldList = (input: (TaskSetField | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tmpfs - */ -const se_Tmpfs = (input: Tmpfs, context: __SerdeContext): any => { - return { - ...(input.containerPath != null && { containerPath: input.containerPath }), - ...(input.mountOptions != null && { mountOptions: se_StringList(input.mountOptions, context) }), - ...(input.size != null && { size: input.size }), - }; -}; - -/** - * serializeAws_json1_1TmpfsList - */ -const se_TmpfsList = (input: Tmpfs[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tmpfs(entry, context); - }); -}; - -/** - * serializeAws_json1_1Ulimit - */ -const se_Ulimit = (input: Ulimit, context: __SerdeContext): any => { - return { - ...(input.hardLimit != null && { hardLimit: input.hardLimit }), - ...(input.name != null && { name: input.name }), - ...(input.softLimit != null && { softLimit: input.softLimit }), - }; -}; - -/** - * serializeAws_json1_1UlimitList - */ -const se_UlimitList = (input: Ulimit[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Ulimit(entry, context); - }); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeys(input.tagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateCapacityProviderRequest - */ -const se_UpdateCapacityProviderRequest = (input: UpdateCapacityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.autoScalingGroupProvider != null && { - autoScalingGroupProvider: se_AutoScalingGroupProviderUpdate(input.autoScalingGroupProvider, context), - }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1UpdateClusterRequest - */ -const se_UpdateClusterRequest = (input: UpdateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.configuration != null && { configuration: se_ClusterConfiguration(input.configuration, context) }), - ...(input.serviceConnectDefaults != null && { - serviceConnectDefaults: se_ClusterServiceConnectDefaultsRequest(input.serviceConnectDefaults, context), - }), - ...(input.settings != null && { settings: se_ClusterSettings(input.settings, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateClusterSettingsRequest - */ -const se_UpdateClusterSettingsRequest = (input: UpdateClusterSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.settings != null && { settings: se_ClusterSettings(input.settings, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateContainerAgentRequest - */ -const se_UpdateContainerAgentRequest = (input: UpdateContainerAgentRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstance != null && { containerInstance: input.containerInstance }), - }; -}; - -/** - * serializeAws_json1_1UpdateContainerInstancesStateRequest - */ -const se_UpdateContainerInstancesStateRequest = ( - input: UpdateContainerInstancesStateRequest, - context: __SerdeContext -): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.containerInstances != null && { containerInstances: se_StringList(input.containerInstances, context) }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_1UpdateServicePrimaryTaskSetRequest - */ -const se_UpdateServicePrimaryTaskSetRequest = ( - input: UpdateServicePrimaryTaskSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.primaryTaskSet != null && { primaryTaskSet: input.primaryTaskSet }), - ...(input.service != null && { service: input.service }), - }; -}; - -/** - * serializeAws_json1_1UpdateServiceRequest - */ -const se_UpdateServiceRequest = (input: UpdateServiceRequest, context: __SerdeContext): any => { - return { - ...(input.capacityProviderStrategy != null && { - capacityProviderStrategy: se_CapacityProviderStrategy(input.capacityProviderStrategy, context), - }), - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.deploymentConfiguration != null && { - deploymentConfiguration: se_DeploymentConfiguration(input.deploymentConfiguration, context), - }), - ...(input.desiredCount != null && { desiredCount: input.desiredCount }), - ...(input.enableECSManagedTags != null && { enableECSManagedTags: input.enableECSManagedTags }), - ...(input.enableExecuteCommand != null && { enableExecuteCommand: input.enableExecuteCommand }), - ...(input.forceNewDeployment != null && { forceNewDeployment: input.forceNewDeployment }), - ...(input.healthCheckGracePeriodSeconds != null && { - healthCheckGracePeriodSeconds: input.healthCheckGracePeriodSeconds, - }), - ...(input.loadBalancers != null && { loadBalancers: se_LoadBalancers(input.loadBalancers, context) }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.placementConstraints != null && { - placementConstraints: se_PlacementConstraints(input.placementConstraints, context), - }), - ...(input.placementStrategy != null && { - placementStrategy: se_PlacementStrategies(input.placementStrategy, context), - }), - ...(input.platformVersion != null && { platformVersion: input.platformVersion }), - ...(input.propagateTags != null && { propagateTags: input.propagateTags }), - ...(input.service != null && { service: input.service }), - ...(input.serviceConnectConfiguration != null && { - serviceConnectConfiguration: se_ServiceConnectConfiguration(input.serviceConnectConfiguration, context), - }), - ...(input.serviceRegistries != null && { - serviceRegistries: se_ServiceRegistries(input.serviceRegistries, context), - }), - ...(input.taskDefinition != null && { taskDefinition: input.taskDefinition }), - }; -}; - -/** - * serializeAws_json1_1UpdateTaskProtectionRequest - */ -const se_UpdateTaskProtectionRequest = (input: UpdateTaskProtectionRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.expiresInMinutes != null && { expiresInMinutes: input.expiresInMinutes }), - ...(input.protectionEnabled != null && { protectionEnabled: input.protectionEnabled }), - ...(input.tasks != null && { tasks: se_StringList(input.tasks, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateTaskSetRequest - */ -const se_UpdateTaskSetRequest = (input: UpdateTaskSetRequest, context: __SerdeContext): any => { - return { - ...(input.cluster != null && { cluster: input.cluster }), - ...(input.scale != null && { scale: se_Scale(input.scale, context) }), - ...(input.service != null && { service: input.service }), - ...(input.taskSet != null && { taskSet: input.taskSet }), - }; -}; - -/** - * serializeAws_json1_1VersionInfo - */ -const se_VersionInfo = (input: VersionInfo, context: __SerdeContext): any => { - return { - ...(input.agentHash != null && { agentHash: input.agentHash }), - ...(input.agentVersion != null && { agentVersion: input.agentVersion }), - ...(input.dockerVersion != null && { dockerVersion: input.dockerVersion }), - }; -}; - -/** - * serializeAws_json1_1Volume - */ -const se_Volume = (input: Volume, context: __SerdeContext): any => { - return { - ...(input.dockerVolumeConfiguration != null && { - dockerVolumeConfiguration: se_DockerVolumeConfiguration(input.dockerVolumeConfiguration, context), - }), - ...(input.efsVolumeConfiguration != null && { - efsVolumeConfiguration: se_EFSVolumeConfiguration(input.efsVolumeConfiguration, context), - }), - ...(input.fsxWindowsFileServerVolumeConfiguration != null && { - fsxWindowsFileServerVolumeConfiguration: se_FSxWindowsFileServerVolumeConfiguration( - input.fsxWindowsFileServerVolumeConfiguration, - context - ), - }), - ...(input.host != null && { host: se_HostVolumeProperties(input.host, context) }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1VolumeFrom - */ -const se_VolumeFrom = (input: VolumeFrom, context: __SerdeContext): any => { - return { - ...(input.readOnly != null && { readOnly: input.readOnly }), - ...(input.sourceContainer != null && { sourceContainer: input.sourceContainer }), - }; -}; - -/** - * serializeAws_json1_1VolumeFromList - */ -const se_VolumeFromList = (input: VolumeFrom[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VolumeFrom(entry, context); - }); -}; - -/** - * serializeAws_json1_1VolumeList - */ -const se_VolumeList = (input: Volume[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Volume(entry, context); - }); -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Attachment - */ -const de_Attachment = (output: any, context: __SerdeContext): Attachment => { - return { - details: output.details != null ? de_AttachmentDetails(output.details, context) : undefined, - id: __expectString(output.id), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1AttachmentDetails - */ -const de_AttachmentDetails = (output: any, context: __SerdeContext): KeyValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValuePair(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Attachments - */ -const de_Attachments = (output: any, context: __SerdeContext): Attachment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attachment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - name: __expectString(output.name), - targetId: __expectString(output.targetId), - targetType: __expectString(output.targetType), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_json1_1AttributeLimitExceededException - */ -const de_AttributeLimitExceededException = (output: any, context: __SerdeContext): AttributeLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoScalingGroupProvider - */ -const de_AutoScalingGroupProvider = (output: any, context: __SerdeContext): AutoScalingGroupProvider => { - return { - autoScalingGroupArn: __expectString(output.autoScalingGroupArn), - managedScaling: output.managedScaling != null ? de_ManagedScaling(output.managedScaling, context) : undefined, - managedTerminationProtection: __expectString(output.managedTerminationProtection), - } as any; -}; - -/** - * deserializeAws_json1_1AwsVpcConfiguration - */ -const de_AwsVpcConfiguration = (output: any, context: __SerdeContext): AwsVpcConfiguration => { - return { - assignPublicIp: __expectString(output.assignPublicIp), - securityGroups: output.securityGroups != null ? de_StringList(output.securityGroups, context) : undefined, - subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BlockedException - */ -const de_BlockedException = (output: any, context: __SerdeContext): BlockedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CapacityProvider - */ -const de_CapacityProvider = (output: any, context: __SerdeContext): CapacityProvider => { - return { - autoScalingGroupProvider: - output.autoScalingGroupProvider != null - ? de_AutoScalingGroupProvider(output.autoScalingGroupProvider, context) - : undefined, - capacityProviderArn: __expectString(output.capacityProviderArn), - name: __expectString(output.name), - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - updateStatus: __expectString(output.updateStatus), - updateStatusReason: __expectString(output.updateStatusReason), - } as any; -}; - -/** - * deserializeAws_json1_1CapacityProviders - */ -const de_CapacityProviders = (output: any, context: __SerdeContext): CapacityProvider[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CapacityProvider(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CapacityProviderStrategy - */ -const de_CapacityProviderStrategy = (output: any, context: __SerdeContext): CapacityProviderStrategyItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CapacityProviderStrategyItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CapacityProviderStrategyItem - */ -const de_CapacityProviderStrategyItem = (output: any, context: __SerdeContext): CapacityProviderStrategyItem => { - return { - base: __expectInt32(output.base), - capacityProvider: __expectString(output.capacityProvider), - weight: __expectInt32(output.weight), - } as any; -}; - -/** - * deserializeAws_json1_1ClientException - */ -const de_ClientException = (output: any, context: __SerdeContext): ClientException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Cluster - */ -const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - activeServicesCount: __expectInt32(output.activeServicesCount), - attachments: output.attachments != null ? de_Attachments(output.attachments, context) : undefined, - attachmentsStatus: __expectString(output.attachmentsStatus), - capacityProviders: output.capacityProviders != null ? de_StringList(output.capacityProviders, context) : undefined, - clusterArn: __expectString(output.clusterArn), - clusterName: __expectString(output.clusterName), - configuration: output.configuration != null ? de_ClusterConfiguration(output.configuration, context) : undefined, - defaultCapacityProviderStrategy: - output.defaultCapacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.defaultCapacityProviderStrategy, context) - : undefined, - pendingTasksCount: __expectInt32(output.pendingTasksCount), - registeredContainerInstancesCount: __expectInt32(output.registeredContainerInstancesCount), - runningTasksCount: __expectInt32(output.runningTasksCount), - serviceConnectDefaults: - output.serviceConnectDefaults != null - ? de_ClusterServiceConnectDefaults(output.serviceConnectDefaults, context) - : undefined, - settings: output.settings != null ? de_ClusterSettings(output.settings, context) : undefined, - statistics: output.statistics != null ? de_Statistics(output.statistics, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ClusterConfiguration - */ -const de_ClusterConfiguration = (output: any, context: __SerdeContext): ClusterConfiguration => { - return { - executeCommandConfiguration: - output.executeCommandConfiguration != null - ? de_ExecuteCommandConfiguration(output.executeCommandConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ClusterContainsContainerInstancesException - */ -const de_ClusterContainsContainerInstancesException = ( - output: any, - context: __SerdeContext -): ClusterContainsContainerInstancesException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterContainsServicesException - */ -const de_ClusterContainsServicesException = ( - output: any, - context: __SerdeContext -): ClusterContainsServicesException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterContainsTasksException - */ -const de_ClusterContainsTasksException = (output: any, context: __SerdeContext): ClusterContainsTasksException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterNotFoundException - */ -const de_ClusterNotFoundException = (output: any, context: __SerdeContext): ClusterNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Clusters - */ -const de_Clusters = (output: any, context: __SerdeContext): Cluster[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Cluster(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClusterServiceConnectDefaults - */ -const de_ClusterServiceConnectDefaults = (output: any, context: __SerdeContext): ClusterServiceConnectDefaults => { - return { - namespace: __expectString(output.namespace), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterSetting - */ -const de_ClusterSetting = (output: any, context: __SerdeContext): ClusterSetting => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterSettings - */ -const de_ClusterSettings = (output: any, context: __SerdeContext): ClusterSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterSetting(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CompatibilityList - */ -const de_CompatibilityList = (output: any, context: __SerdeContext): (Compatibility | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Container - */ -const de_Container = (output: any, context: __SerdeContext): Container => { - return { - containerArn: __expectString(output.containerArn), - cpu: __expectString(output.cpu), - exitCode: __expectInt32(output.exitCode), - gpuIds: output.gpuIds != null ? de_GpuIds(output.gpuIds, context) : undefined, - healthStatus: __expectString(output.healthStatus), - image: __expectString(output.image), - imageDigest: __expectString(output.imageDigest), - lastStatus: __expectString(output.lastStatus), - managedAgents: output.managedAgents != null ? de_ManagedAgents(output.managedAgents, context) : undefined, - memory: __expectString(output.memory), - memoryReservation: __expectString(output.memoryReservation), - name: __expectString(output.name), - networkBindings: output.networkBindings != null ? de_NetworkBindings(output.networkBindings, context) : undefined, - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - reason: __expectString(output.reason), - runtimeId: __expectString(output.runtimeId), - taskArn: __expectString(output.taskArn), - } as any; -}; - -/** - * deserializeAws_json1_1ContainerDefinition - */ -const de_ContainerDefinition = (output: any, context: __SerdeContext): ContainerDefinition => { - return { - command: output.command != null ? de_StringList(output.command, context) : undefined, - cpu: __expectInt32(output.cpu), - dependsOn: output.dependsOn != null ? de_ContainerDependencies(output.dependsOn, context) : undefined, - disableNetworking: __expectBoolean(output.disableNetworking), - dnsSearchDomains: output.dnsSearchDomains != null ? de_StringList(output.dnsSearchDomains, context) : undefined, - dnsServers: output.dnsServers != null ? de_StringList(output.dnsServers, context) : undefined, - dockerLabels: output.dockerLabels != null ? de_DockerLabelsMap(output.dockerLabels, context) : undefined, - dockerSecurityOptions: - output.dockerSecurityOptions != null ? de_StringList(output.dockerSecurityOptions, context) : undefined, - entryPoint: output.entryPoint != null ? de_StringList(output.entryPoint, context) : undefined, - environment: output.environment != null ? de_EnvironmentVariables(output.environment, context) : undefined, - environmentFiles: - output.environmentFiles != null ? de_EnvironmentFiles(output.environmentFiles, context) : undefined, - essential: __expectBoolean(output.essential), - extraHosts: output.extraHosts != null ? de_HostEntryList(output.extraHosts, context) : undefined, - firelensConfiguration: - output.firelensConfiguration != null - ? de_FirelensConfiguration(output.firelensConfiguration, context) - : undefined, - healthCheck: output.healthCheck != null ? de_HealthCheck(output.healthCheck, context) : undefined, - hostname: __expectString(output.hostname), - image: __expectString(output.image), - interactive: __expectBoolean(output.interactive), - links: output.links != null ? de_StringList(output.links, context) : undefined, - linuxParameters: output.linuxParameters != null ? de_LinuxParameters(output.linuxParameters, context) : undefined, - logConfiguration: - output.logConfiguration != null ? de_LogConfiguration(output.logConfiguration, context) : undefined, - memory: __expectInt32(output.memory), - memoryReservation: __expectInt32(output.memoryReservation), - mountPoints: output.mountPoints != null ? de_MountPointList(output.mountPoints, context) : undefined, - name: __expectString(output.name), - portMappings: output.portMappings != null ? de_PortMappingList(output.portMappings, context) : undefined, - privileged: __expectBoolean(output.privileged), - pseudoTerminal: __expectBoolean(output.pseudoTerminal), - readonlyRootFilesystem: __expectBoolean(output.readonlyRootFilesystem), - repositoryCredentials: - output.repositoryCredentials != null - ? de_RepositoryCredentials(output.repositoryCredentials, context) - : undefined, - resourceRequirements: - output.resourceRequirements != null ? de_ResourceRequirements(output.resourceRequirements, context) : undefined, - secrets: output.secrets != null ? de_SecretList(output.secrets, context) : undefined, - startTimeout: __expectInt32(output.startTimeout), - stopTimeout: __expectInt32(output.stopTimeout), - systemControls: output.systemControls != null ? de_SystemControls(output.systemControls, context) : undefined, - ulimits: output.ulimits != null ? de_UlimitList(output.ulimits, context) : undefined, - user: __expectString(output.user), - volumesFrom: output.volumesFrom != null ? de_VolumeFromList(output.volumesFrom, context) : undefined, - workingDirectory: __expectString(output.workingDirectory), - } as any; -}; - -/** - * deserializeAws_json1_1ContainerDefinitions - */ -const de_ContainerDefinitions = (output: any, context: __SerdeContext): ContainerDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerDefinition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContainerDependencies - */ -const de_ContainerDependencies = (output: any, context: __SerdeContext): ContainerDependency[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerDependency(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContainerDependency - */ -const de_ContainerDependency = (output: any, context: __SerdeContext): ContainerDependency => { - return { - condition: __expectString(output.condition), - containerName: __expectString(output.containerName), - } as any; -}; - -/** - * deserializeAws_json1_1ContainerInstance - */ -const de_ContainerInstance = (output: any, context: __SerdeContext): ContainerInstance => { - return { - agentConnected: __expectBoolean(output.agentConnected), - agentUpdateStatus: __expectString(output.agentUpdateStatus), - attachments: output.attachments != null ? de_Attachments(output.attachments, context) : undefined, - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - capacityProviderName: __expectString(output.capacityProviderName), - containerInstanceArn: __expectString(output.containerInstanceArn), - ec2InstanceId: __expectString(output.ec2InstanceId), - healthStatus: - output.healthStatus != null ? de_ContainerInstanceHealthStatus(output.healthStatus, context) : undefined, - pendingTasksCount: __expectInt32(output.pendingTasksCount), - registeredAt: - output.registeredAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registeredAt))) - : undefined, - registeredResources: - output.registeredResources != null ? de_Resources(output.registeredResources, context) : undefined, - remainingResources: - output.remainingResources != null ? de_Resources(output.remainingResources, context) : undefined, - runningTasksCount: __expectInt32(output.runningTasksCount), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - version: __expectLong(output.version), - versionInfo: output.versionInfo != null ? de_VersionInfo(output.versionInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContainerInstanceHealthStatus - */ -const de_ContainerInstanceHealthStatus = (output: any, context: __SerdeContext): ContainerInstanceHealthStatus => { - return { - details: output.details != null ? de_InstanceHealthCheckResultList(output.details, context) : undefined, - overallStatus: __expectString(output.overallStatus), - } as any; -}; - -/** - * deserializeAws_json1_1ContainerInstances - */ -const de_ContainerInstances = (output: any, context: __SerdeContext): ContainerInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerInstance(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContainerOverride - */ -const de_ContainerOverride = (output: any, context: __SerdeContext): ContainerOverride => { - return { - command: output.command != null ? de_StringList(output.command, context) : undefined, - cpu: __expectInt32(output.cpu), - environment: output.environment != null ? de_EnvironmentVariables(output.environment, context) : undefined, - environmentFiles: - output.environmentFiles != null ? de_EnvironmentFiles(output.environmentFiles, context) : undefined, - memory: __expectInt32(output.memory), - memoryReservation: __expectInt32(output.memoryReservation), - name: __expectString(output.name), - resourceRequirements: - output.resourceRequirements != null ? de_ResourceRequirements(output.resourceRequirements, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContainerOverrides - */ -const de_ContainerOverrides = (output: any, context: __SerdeContext): ContainerOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerOverride(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Containers - */ -const de_Containers = (output: any, context: __SerdeContext): Container[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Container(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateCapacityProviderResponse - */ -const de_CreateCapacityProviderResponse = (output: any, context: __SerdeContext): CreateCapacityProviderResponse => { - return { - capacityProvider: - output.capacityProvider != null ? de_CapacityProvider(output.capacityProvider, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateClusterResponse - */ -const de_CreateClusterResponse = (output: any, context: __SerdeContext): CreateClusterResponse => { - return { - cluster: output.cluster != null ? de_Cluster(output.cluster, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateServiceResponse - */ -const de_CreateServiceResponse = (output: any, context: __SerdeContext): CreateServiceResponse => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTaskSetResponse - */ -const de_CreateTaskSetResponse = (output: any, context: __SerdeContext): CreateTaskSetResponse => { - return { - taskSet: output.taskSet != null ? de_TaskSet(output.taskSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteAccountSettingResponse - */ -const de_DeleteAccountSettingResponse = (output: any, context: __SerdeContext): DeleteAccountSettingResponse => { - return { - setting: output.setting != null ? de_Setting(output.setting, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteAttributesResponse - */ -const de_DeleteAttributesResponse = (output: any, context: __SerdeContext): DeleteAttributesResponse => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteCapacityProviderResponse - */ -const de_DeleteCapacityProviderResponse = (output: any, context: __SerdeContext): DeleteCapacityProviderResponse => { - return { - capacityProvider: - output.capacityProvider != null ? de_CapacityProvider(output.capacityProvider, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteClusterResponse - */ -const de_DeleteClusterResponse = (output: any, context: __SerdeContext): DeleteClusterResponse => { - return { - cluster: output.cluster != null ? de_Cluster(output.cluster, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteServiceResponse - */ -const de_DeleteServiceResponse = (output: any, context: __SerdeContext): DeleteServiceResponse => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTaskDefinitionsResponse - */ -const de_DeleteTaskDefinitionsResponse = (output: any, context: __SerdeContext): DeleteTaskDefinitionsResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - taskDefinitions: - output.taskDefinitions != null ? de_TaskDefinitionList(output.taskDefinitions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTaskSetResponse - */ -const de_DeleteTaskSetResponse = (output: any, context: __SerdeContext): DeleteTaskSetResponse => { - return { - taskSet: output.taskSet != null ? de_TaskSet(output.taskSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Deployment - */ -const de_Deployment = (output: any, context: __SerdeContext): Deployment => { - return { - capacityProviderStrategy: - output.capacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.capacityProviderStrategy, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - desiredCount: __expectInt32(output.desiredCount), - failedTasks: __expectInt32(output.failedTasks), - id: __expectString(output.id), - launchType: __expectString(output.launchType), - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - pendingCount: __expectInt32(output.pendingCount), - platformFamily: __expectString(output.platformFamily), - platformVersion: __expectString(output.platformVersion), - rolloutState: __expectString(output.rolloutState), - rolloutStateReason: __expectString(output.rolloutStateReason), - runningCount: __expectInt32(output.runningCount), - serviceConnectConfiguration: - output.serviceConnectConfiguration != null - ? de_ServiceConnectConfiguration(output.serviceConnectConfiguration, context) - : undefined, - serviceConnectResources: - output.serviceConnectResources != null - ? de_ServiceConnectServiceResourceList(output.serviceConnectResources, context) - : undefined, - status: __expectString(output.status), - taskDefinition: __expectString(output.taskDefinition), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentAlarms - */ -const de_DeploymentAlarms = (output: any, context: __SerdeContext): DeploymentAlarms => { - return { - alarmNames: output.alarmNames != null ? de_StringList(output.alarmNames, context) : undefined, - enable: __expectBoolean(output.enable), - rollback: __expectBoolean(output.rollback), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentCircuitBreaker - */ -const de_DeploymentCircuitBreaker = (output: any, context: __SerdeContext): DeploymentCircuitBreaker => { - return { - enable: __expectBoolean(output.enable), - rollback: __expectBoolean(output.rollback), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentConfiguration - */ -const de_DeploymentConfiguration = (output: any, context: __SerdeContext): DeploymentConfiguration => { - return { - alarms: output.alarms != null ? de_DeploymentAlarms(output.alarms, context) : undefined, - deploymentCircuitBreaker: - output.deploymentCircuitBreaker != null - ? de_DeploymentCircuitBreaker(output.deploymentCircuitBreaker, context) - : undefined, - maximumPercent: __expectInt32(output.maximumPercent), - minimumHealthyPercent: __expectInt32(output.minimumHealthyPercent), - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentController - */ -const de_DeploymentController = (output: any, context: __SerdeContext): DeploymentController => { - return { - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1Deployments - */ -const de_Deployments = (output: any, context: __SerdeContext): Deployment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Deployment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeregisterContainerInstanceResponse - */ -const de_DeregisterContainerInstanceResponse = ( - output: any, - context: __SerdeContext -): DeregisterContainerInstanceResponse => { - return { - containerInstance: - output.containerInstance != null ? de_ContainerInstance(output.containerInstance, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeregisterTaskDefinitionResponse - */ -const de_DeregisterTaskDefinitionResponse = ( - output: any, - context: __SerdeContext -): DeregisterTaskDefinitionResponse => { - return { - taskDefinition: output.taskDefinition != null ? de_TaskDefinition(output.taskDefinition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCapacityProvidersResponse - */ -const de_DescribeCapacityProvidersResponse = ( - output: any, - context: __SerdeContext -): DescribeCapacityProvidersResponse => { - return { - capacityProviders: - output.capacityProviders != null ? de_CapacityProviders(output.capacityProviders, context) : undefined, - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeClustersResponse - */ -const de_DescribeClustersResponse = (output: any, context: __SerdeContext): DescribeClustersResponse => { - return { - clusters: output.clusters != null ? de_Clusters(output.clusters, context) : undefined, - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeContainerInstancesResponse - */ -const de_DescribeContainerInstancesResponse = ( - output: any, - context: __SerdeContext -): DescribeContainerInstancesResponse => { - return { - containerInstances: - output.containerInstances != null ? de_ContainerInstances(output.containerInstances, context) : undefined, - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeServicesResponse - */ -const de_DescribeServicesResponse = (output: any, context: __SerdeContext): DescribeServicesResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - services: output.services != null ? de_Services(output.services, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTaskDefinitionResponse - */ -const de_DescribeTaskDefinitionResponse = (output: any, context: __SerdeContext): DescribeTaskDefinitionResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - taskDefinition: output.taskDefinition != null ? de_TaskDefinition(output.taskDefinition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTaskSetsResponse - */ -const de_DescribeTaskSetsResponse = (output: any, context: __SerdeContext): DescribeTaskSetsResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - taskSets: output.taskSets != null ? de_TaskSets(output.taskSets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTasksResponse - */ -const de_DescribeTasksResponse = (output: any, context: __SerdeContext): DescribeTasksResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - tasks: output.tasks != null ? de_Tasks(output.tasks, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Device - */ -const de_Device = (output: any, context: __SerdeContext): Device => { - return { - containerPath: __expectString(output.containerPath), - hostPath: __expectString(output.hostPath), - permissions: output.permissions != null ? de_DeviceCgroupPermissions(output.permissions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeviceCgroupPermissions - */ -const de_DeviceCgroupPermissions = (output: any, context: __SerdeContext): (DeviceCgroupPermission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DevicesList - */ -const de_DevicesList = (output: any, context: __SerdeContext): Device[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Device(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DiscoverPollEndpointResponse - */ -const de_DiscoverPollEndpointResponse = (output: any, context: __SerdeContext): DiscoverPollEndpointResponse => { - return { - endpoint: __expectString(output.endpoint), - serviceConnectEndpoint: __expectString(output.serviceConnectEndpoint), - telemetryEndpoint: __expectString(output.telemetryEndpoint), - } as any; -}; - -/** - * deserializeAws_json1_1DockerLabelsMap - */ -const de_DockerLabelsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1DockerVolumeConfiguration - */ -const de_DockerVolumeConfiguration = (output: any, context: __SerdeContext): DockerVolumeConfiguration => { - return { - autoprovision: __expectBoolean(output.autoprovision), - driver: __expectString(output.driver), - driverOpts: output.driverOpts != null ? de_StringMap(output.driverOpts, context) : undefined, - labels: output.labels != null ? de_StringMap(output.labels, context) : undefined, - scope: __expectString(output.scope), - } as any; -}; +// se_ManagedAgentStateChange omitted. -/** - * deserializeAws_json1_1EFSAuthorizationConfig - */ -const de_EFSAuthorizationConfig = (output: any, context: __SerdeContext): EFSAuthorizationConfig => { - return { - accessPointId: __expectString(output.accessPointId), - iam: __expectString(output.iam), - } as any; -}; +// se_ManagedAgentStateChanges omitted. -/** - * deserializeAws_json1_1EFSVolumeConfiguration - */ -const de_EFSVolumeConfiguration = (output: any, context: __SerdeContext): EFSVolumeConfiguration => { - return { - authorizationConfig: - output.authorizationConfig != null ? de_EFSAuthorizationConfig(output.authorizationConfig, context) : undefined, - fileSystemId: __expectString(output.fileSystemId), - rootDirectory: __expectString(output.rootDirectory), - transitEncryption: __expectString(output.transitEncryption), - transitEncryptionPort: __expectInt32(output.transitEncryptionPort), - } as any; -}; +// se_ManagedScaling omitted. -/** - * deserializeAws_json1_1EnvironmentFile - */ -const de_EnvironmentFile = (output: any, context: __SerdeContext): EnvironmentFile => { - return { - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// se_MountPoint omitted. -/** - * deserializeAws_json1_1EnvironmentFiles - */ -const de_EnvironmentFiles = (output: any, context: __SerdeContext): EnvironmentFile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentFile(entry, context); - }); - return retVal; -}; +// se_MountPointList omitted. -/** - * deserializeAws_json1_1EnvironmentVariables - */ -const de_EnvironmentVariables = (output: any, context: __SerdeContext): KeyValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValuePair(entry, context); - }); - return retVal; -}; +// se_NetworkBinding omitted. -/** - * deserializeAws_json1_1EphemeralStorage - */ -const de_EphemeralStorage = (output: any, context: __SerdeContext): EphemeralStorage => { - return { - sizeInGiB: __expectInt32(output.sizeInGiB), - } as any; -}; +// se_NetworkBindings omitted. -/** - * deserializeAws_json1_1ExecuteCommandConfiguration - */ -const de_ExecuteCommandConfiguration = (output: any, context: __SerdeContext): ExecuteCommandConfiguration => { - return { - kmsKeyId: __expectString(output.kmsKeyId), - logConfiguration: - output.logConfiguration != null ? de_ExecuteCommandLogConfiguration(output.logConfiguration, context) : undefined, - logging: __expectString(output.logging), - } as any; -}; +// se_NetworkConfiguration omitted. -/** - * deserializeAws_json1_1ExecuteCommandLogConfiguration - */ -const de_ExecuteCommandLogConfiguration = (output: any, context: __SerdeContext): ExecuteCommandLogConfiguration => { - return { - cloudWatchEncryptionEnabled: __expectBoolean(output.cloudWatchEncryptionEnabled), - cloudWatchLogGroupName: __expectString(output.cloudWatchLogGroupName), - s3BucketName: __expectString(output.s3BucketName), - s3EncryptionEnabled: __expectBoolean(output.s3EncryptionEnabled), - s3KeyPrefix: __expectString(output.s3KeyPrefix), - } as any; -}; +// se_PlacementConstraint omitted. -/** - * deserializeAws_json1_1ExecuteCommandResponse - */ -const de_ExecuteCommandResponse = (output: any, context: __SerdeContext): ExecuteCommandResponse => { - return { - clusterArn: __expectString(output.clusterArn), - containerArn: __expectString(output.containerArn), - containerName: __expectString(output.containerName), - interactive: __expectBoolean(output.interactive), - session: output.session != null ? de_Session(output.session, context) : undefined, - taskArn: __expectString(output.taskArn), - } as any; -}; +// se_PlacementConstraints omitted. -/** - * deserializeAws_json1_1Failure - */ -const de_Failure = (output: any, context: __SerdeContext): Failure => { - return { - arn: __expectString(output.arn), - detail: __expectString(output.detail), - reason: __expectString(output.reason), - } as any; -}; +// se_PlacementStrategies omitted. -/** - * deserializeAws_json1_1Failures - */ -const de_Failures = (output: any, context: __SerdeContext): Failure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Failure(entry, context); - }); - return retVal; -}; +// se_PlacementStrategy omitted. -/** - * deserializeAws_json1_1FirelensConfiguration - */ -const de_FirelensConfiguration = (output: any, context: __SerdeContext): FirelensConfiguration => { - return { - options: output.options != null ? de_FirelensConfigurationOptionsMap(output.options, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// se_PlatformDevice omitted. -/** - * deserializeAws_json1_1FirelensConfigurationOptionsMap - */ -const de_FirelensConfigurationOptionsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_PlatformDevices omitted. -/** - * deserializeAws_json1_1FSxWindowsFileServerAuthorizationConfig - */ -const de_FSxWindowsFileServerAuthorizationConfig = ( - output: any, - context: __SerdeContext -): FSxWindowsFileServerAuthorizationConfig => { - return { - credentialsParameter: __expectString(output.credentialsParameter), - domain: __expectString(output.domain), - } as any; -}; +// se_PortMapping omitted. -/** - * deserializeAws_json1_1FSxWindowsFileServerVolumeConfiguration - */ -const de_FSxWindowsFileServerVolumeConfiguration = ( - output: any, - context: __SerdeContext -): FSxWindowsFileServerVolumeConfiguration => { - return { - authorizationConfig: - output.authorizationConfig != null - ? de_FSxWindowsFileServerAuthorizationConfig(output.authorizationConfig, context) - : undefined, - fileSystemId: __expectString(output.fileSystemId), - rootDirectory: __expectString(output.rootDirectory), - } as any; -}; +// se_PortMappingList omitted. -/** - * deserializeAws_json1_1GetTaskProtectionResponse - */ -const de_GetTaskProtectionResponse = (output: any, context: __SerdeContext): GetTaskProtectionResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - protectedTasks: output.protectedTasks != null ? de_ProtectedTasks(output.protectedTasks, context) : undefined, - } as any; -}; +// se_ProxyConfiguration omitted. -/** - * deserializeAws_json1_1GpuIds - */ -const de_GpuIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ProxyConfigurationProperties omitted. -/** - * deserializeAws_json1_1HealthCheck - */ -const de_HealthCheck = (output: any, context: __SerdeContext): HealthCheck => { - return { - command: output.command != null ? de_StringList(output.command, context) : undefined, - interval: __expectInt32(output.interval), - retries: __expectInt32(output.retries), - startPeriod: __expectInt32(output.startPeriod), - timeout: __expectInt32(output.timeout), - } as any; -}; +// se_PutAccountSettingDefaultRequest omitted. -/** - * deserializeAws_json1_1HostEntry - */ -const de_HostEntry = (output: any, context: __SerdeContext): HostEntry => { - return { - hostname: __expectString(output.hostname), - ipAddress: __expectString(output.ipAddress), - } as any; -}; +// se_PutAccountSettingRequest omitted. -/** - * deserializeAws_json1_1HostEntryList - */ -const de_HostEntryList = (output: any, context: __SerdeContext): HostEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HostEntry(entry, context); - }); - return retVal; -}; +// se_PutAttributesRequest omitted. -/** - * deserializeAws_json1_1HostVolumeProperties - */ -const de_HostVolumeProperties = (output: any, context: __SerdeContext): HostVolumeProperties => { - return { - sourcePath: __expectString(output.sourcePath), - } as any; -}; +// se_PutClusterCapacityProvidersRequest omitted. /** - * deserializeAws_json1_1InferenceAccelerator + * serializeAws_json1_1RegisterContainerInstanceRequest */ -const de_InferenceAccelerator = (output: any, context: __SerdeContext): InferenceAccelerator => { - return { - deviceName: __expectString(output.deviceName), - deviceType: __expectString(output.deviceType), - } as any; +const se_RegisterContainerInstanceRequest = (input: RegisterContainerInstanceRequest, context: __SerdeContext): any => { + return take(input, { + attributes: _json, + cluster: [], + containerInstanceArn: [], + instanceIdentityDocument: [], + instanceIdentityDocumentSignature: [], + platformDevices: _json, + tags: _json, + totalResources: (_) => se_Resources(_, context), + versionInfo: _json, + }); }; -/** - * deserializeAws_json1_1InferenceAcceleratorOverride - */ -const de_InferenceAcceleratorOverride = (output: any, context: __SerdeContext): InferenceAcceleratorOverride => { - return { - deviceName: __expectString(output.deviceName), - deviceType: __expectString(output.deviceType), - } as any; -}; +// se_RegisterTaskDefinitionRequest omitted. -/** - * deserializeAws_json1_1InferenceAcceleratorOverrides - */ -const de_InferenceAcceleratorOverrides = (output: any, context: __SerdeContext): InferenceAcceleratorOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceAcceleratorOverride(entry, context); - }); - return retVal; -}; +// se_RepositoryCredentials omitted. /** - * deserializeAws_json1_1InferenceAccelerators + * serializeAws_json1_1Resource */ -const de_InferenceAccelerators = (output: any, context: __SerdeContext): InferenceAccelerator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceAccelerator(entry, context); - }); - return retVal; +const se_Resource = (input: Resource, context: __SerdeContext): any => { + return take(input, { + doubleValue: __serializeFloat, + integerValue: [], + longValue: [], + name: [], + stringSetValue: _json, + type: [], + }); }; -/** - * deserializeAws_json1_1InstanceHealthCheckResult - */ -const de_InstanceHealthCheckResult = (output: any, context: __SerdeContext): InstanceHealthCheckResult => { - return { - lastStatusChange: - output.lastStatusChange != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusChange))) - : undefined, - lastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - status: __expectString(output.status), - type: __expectString(output.type), - } as any; -}; +// se_ResourceRequirement omitted. + +// se_ResourceRequirements omitted. /** - * deserializeAws_json1_1InstanceHealthCheckResultList + * serializeAws_json1_1Resources */ -const de_InstanceHealthCheckResultList = (output: any, context: __SerdeContext): InstanceHealthCheckResult[] => { - const retVal = (output || []) +const se_Resources = (input: Resource[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceHealthCheckResult(entry, context); + .map((entry) => { + return se_Resource(entry, context); }); - return retVal; }; -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_RunTaskRequest omitted. -/** - * deserializeAws_json1_1KernelCapabilities - */ -const de_KernelCapabilities = (output: any, context: __SerdeContext): KernelCapabilities => { - return { - add: output.add != null ? de_StringList(output.add, context) : undefined, - drop: output.drop != null ? de_StringList(output.drop, context) : undefined, - } as any; -}; +// se_RuntimePlatform omitted. /** - * deserializeAws_json1_1KeyValuePair + * serializeAws_json1_1Scale */ -const de_KeyValuePair = (output: any, context: __SerdeContext): KeyValuePair => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; +const se_Scale = (input: Scale, context: __SerdeContext): any => { + return take(input, { + unit: [], + value: __serializeFloat, + }); }; -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_Secret omitted. -/** - * deserializeAws_json1_1LinuxParameters - */ -const de_LinuxParameters = (output: any, context: __SerdeContext): LinuxParameters => { - return { - capabilities: output.capabilities != null ? de_KernelCapabilities(output.capabilities, context) : undefined, - devices: output.devices != null ? de_DevicesList(output.devices, context) : undefined, - initProcessEnabled: __expectBoolean(output.initProcessEnabled), - maxSwap: __expectInt32(output.maxSwap), - sharedMemorySize: __expectInt32(output.sharedMemorySize), - swappiness: __expectInt32(output.swappiness), - tmpfs: output.tmpfs != null ? de_TmpfsList(output.tmpfs, context) : undefined, - } as any; -}; +// se_SecretList omitted. -/** - * deserializeAws_json1_1ListAccountSettingsResponse - */ -const de_ListAccountSettingsResponse = (output: any, context: __SerdeContext): ListAccountSettingsResponse => { - return { - nextToken: __expectString(output.nextToken), - settings: output.settings != null ? de_Settings(output.settings, context) : undefined, - } as any; -}; +// se_ServiceConnectClientAlias omitted. -/** - * deserializeAws_json1_1ListAttributesResponse - */ -const de_ListAttributesResponse = (output: any, context: __SerdeContext): ListAttributesResponse => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ServiceConnectClientAliasList omitted. -/** - * deserializeAws_json1_1ListClustersResponse - */ -const de_ListClustersResponse = (output: any, context: __SerdeContext): ListClustersResponse => { - return { - clusterArns: output.clusterArns != null ? de_StringList(output.clusterArns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ServiceConnectConfiguration omitted. -/** - * deserializeAws_json1_1ListContainerInstancesResponse - */ -const de_ListContainerInstancesResponse = (output: any, context: __SerdeContext): ListContainerInstancesResponse => { - return { - containerInstanceArns: - output.containerInstanceArns != null ? de_StringList(output.containerInstanceArns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ServiceConnectService omitted. -/** - * deserializeAws_json1_1ListServicesByNamespaceResponse - */ -const de_ListServicesByNamespaceResponse = (output: any, context: __SerdeContext): ListServicesByNamespaceResponse => { - return { - nextToken: __expectString(output.nextToken), - serviceArns: output.serviceArns != null ? de_StringList(output.serviceArns, context) : undefined, - } as any; -}; +// se_ServiceConnectServiceList omitted. -/** - * deserializeAws_json1_1ListServicesResponse - */ -const de_ListServicesResponse = (output: any, context: __SerdeContext): ListServicesResponse => { - return { - nextToken: __expectString(output.nextToken), - serviceArns: output.serviceArns != null ? de_StringList(output.serviceArns, context) : undefined, - } as any; -}; +// se_ServiceFieldList omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// se_ServiceRegistries omitted. -/** - * deserializeAws_json1_1ListTaskDefinitionFamiliesResponse - */ -const de_ListTaskDefinitionFamiliesResponse = ( - output: any, - context: __SerdeContext -): ListTaskDefinitionFamiliesResponse => { - return { - families: output.families != null ? de_StringList(output.families, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_ServiceRegistry omitted. -/** - * deserializeAws_json1_1ListTaskDefinitionsResponse - */ -const de_ListTaskDefinitionsResponse = (output: any, context: __SerdeContext): ListTaskDefinitionsResponse => { - return { - nextToken: __expectString(output.nextToken), - taskDefinitionArns: - output.taskDefinitionArns != null ? de_StringList(output.taskDefinitionArns, context) : undefined, - } as any; -}; +// se_StartTaskRequest omitted. -/** - * deserializeAws_json1_1ListTasksResponse - */ -const de_ListTasksResponse = (output: any, context: __SerdeContext): ListTasksResponse => { - return { - nextToken: __expectString(output.nextToken), - taskArns: output.taskArns != null ? de_StringList(output.taskArns, context) : undefined, - } as any; -}; +// se_StopTaskRequest omitted. -/** - * deserializeAws_json1_1LoadBalancer - */ -const de_LoadBalancer = (output: any, context: __SerdeContext): LoadBalancer => { - return { - containerName: __expectString(output.containerName), - containerPort: __expectInt32(output.containerPort), - loadBalancerName: __expectString(output.loadBalancerName), - targetGroupArn: __expectString(output.targetGroupArn), - } as any; -}; +// se_StringList omitted. -/** - * deserializeAws_json1_1LoadBalancers - */ -const de_LoadBalancers = (output: any, context: __SerdeContext): LoadBalancer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancer(entry, context); - }); - return retVal; -}; +// se_StringMap omitted. -/** - * deserializeAws_json1_1LogConfiguration - */ -const de_LogConfiguration = (output: any, context: __SerdeContext): LogConfiguration => { - return { - logDriver: __expectString(output.logDriver), - options: output.options != null ? de_LogConfigurationOptionsMap(output.options, context) : undefined, - secretOptions: output.secretOptions != null ? de_SecretList(output.secretOptions, context) : undefined, - } as any; -}; +// se_SubmitAttachmentStateChangesRequest omitted. -/** - * deserializeAws_json1_1LogConfigurationOptionsMap - */ -const de_LogConfigurationOptionsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_SubmitContainerStateChangeRequest omitted. /** - * deserializeAws_json1_1ManagedAgent + * serializeAws_json1_1SubmitTaskStateChangeRequest */ -const de_ManagedAgent = (output: any, context: __SerdeContext): ManagedAgent => { - return { - lastStartedAt: - output.lastStartedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStartedAt))) - : undefined, - lastStatus: __expectString(output.lastStatus), - name: __expectString(output.name), - reason: __expectString(output.reason), - } as any; +const se_SubmitTaskStateChangeRequest = (input: SubmitTaskStateChangeRequest, context: __SerdeContext): any => { + return take(input, { + attachments: _json, + cluster: [], + containers: _json, + executionStoppedAt: (_) => Math.round(_.getTime() / 1000), + managedAgents: _json, + pullStartedAt: (_) => Math.round(_.getTime() / 1000), + pullStoppedAt: (_) => Math.round(_.getTime() / 1000), + reason: [], + status: [], + task: [], + }); }; -/** - * deserializeAws_json1_1ManagedAgents - */ -const de_ManagedAgents = (output: any, context: __SerdeContext): ManagedAgent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedAgent(entry, context); - }); - return retVal; -}; +// se_SystemControl omitted. -/** - * deserializeAws_json1_1ManagedScaling - */ -const de_ManagedScaling = (output: any, context: __SerdeContext): ManagedScaling => { - return { - instanceWarmupPeriod: __expectInt32(output.instanceWarmupPeriod), - maximumScalingStepSize: __expectInt32(output.maximumScalingStepSize), - minimumScalingStepSize: __expectInt32(output.minimumScalingStepSize), - status: __expectString(output.status), - targetCapacity: __expectInt32(output.targetCapacity), - } as any; -}; +// se_SystemControls omitted. -/** - * deserializeAws_json1_1MissingVersionException - */ -const de_MissingVersionException = (output: any, context: __SerdeContext): MissingVersionException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1MountPoint - */ -const de_MountPoint = (output: any, context: __SerdeContext): MountPoint => { - return { - containerPath: __expectString(output.containerPath), - readOnly: __expectBoolean(output.readOnly), - sourceVolume: __expectString(output.sourceVolume), - } as any; -}; +// se_TagKeys omitted. -/** - * deserializeAws_json1_1MountPointList - */ -const de_MountPointList = (output: any, context: __SerdeContext): MountPoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MountPoint(entry, context); - }); - return retVal; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1NamespaceNotFoundException - */ -const de_NamespaceNotFoundException = (output: any, context: __SerdeContext): NamespaceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_Tags omitted. -/** - * deserializeAws_json1_1NetworkBinding - */ -const de_NetworkBinding = (output: any, context: __SerdeContext): NetworkBinding => { - return { - bindIP: __expectString(output.bindIP), - containerPort: __expectInt32(output.containerPort), - containerPortRange: __expectString(output.containerPortRange), - hostPort: __expectInt32(output.hostPort), - hostPortRange: __expectString(output.hostPortRange), - protocol: __expectString(output.protocol), - } as any; -}; +// se_TaskDefinitionFieldList omitted. -/** - * deserializeAws_json1_1NetworkBindings - */ -const de_NetworkBindings = (output: any, context: __SerdeContext): NetworkBinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkBinding(entry, context); - }); - return retVal; -}; +// se_TaskDefinitionPlacementConstraint omitted. -/** - * deserializeAws_json1_1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - awsvpcConfiguration: - output.awsvpcConfiguration != null ? de_AwsVpcConfiguration(output.awsvpcConfiguration, context) : undefined, - } as any; -}; +// se_TaskDefinitionPlacementConstraints omitted. + +// se_TaskFieldList omitted. + +// se_TaskOverride omitted. + +// se_TaskSetFieldList omitted. + +// se_Tmpfs omitted. + +// se_TmpfsList omitted. + +// se_Ulimit omitted. + +// se_UlimitList omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateCapacityProviderRequest omitted. + +// se_UpdateClusterRequest omitted. + +// se_UpdateClusterSettingsRequest omitted. + +// se_UpdateContainerAgentRequest omitted. + +// se_UpdateContainerInstancesStateRequest omitted. + +// se_UpdateServicePrimaryTaskSetRequest omitted. + +// se_UpdateServiceRequest omitted. + +// se_UpdateTaskProtectionRequest omitted. /** - * deserializeAws_json1_1NetworkInterface + * serializeAws_json1_1UpdateTaskSetRequest */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - attachmentId: __expectString(output.attachmentId), - ipv6Address: __expectString(output.ipv6Address), - privateIpv4Address: __expectString(output.privateIpv4Address), - } as any; +const se_UpdateTaskSetRequest = (input: UpdateTaskSetRequest, context: __SerdeContext): any => { + return take(input, { + cluster: [], + scale: (_) => se_Scale(_, context), + service: [], + taskSet: [], + }); }; +// se_VersionInfo omitted. + +// se_Volume omitted. + +// se_VolumeFrom omitted. + +// se_VolumeFromList omitted. + +// se_VolumeList omitted. + +// de_AccessDeniedException omitted. + +// de_Attachment omitted. + +// de_AttachmentDetails omitted. + +// de_Attachments omitted. + +// de_Attribute omitted. + +// de_AttributeLimitExceededException omitted. + +// de_Attributes omitted. + +// de_AutoScalingGroupProvider omitted. + +// de_AwsVpcConfiguration omitted. + +// de_BlockedException omitted. + +// de_CapacityProvider omitted. + +// de_CapacityProviders omitted. + +// de_CapacityProviderStrategy omitted. + +// de_CapacityProviderStrategyItem omitted. + +// de_ClientException omitted. + +// de_Cluster omitted. + +// de_ClusterConfiguration omitted. + +// de_ClusterContainsContainerInstancesException omitted. + +// de_ClusterContainsServicesException omitted. + +// de_ClusterContainsTasksException omitted. + +// de_ClusterNotFoundException omitted. + +// de_Clusters omitted. + +// de_ClusterServiceConnectDefaults omitted. + +// de_ClusterSetting omitted. + +// de_ClusterSettings omitted. + +// de_CompatibilityList omitted. + /** - * deserializeAws_json1_1NetworkInterfaces + * deserializeAws_json1_1Container */ -const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; +const de_Container = (output: any, context: __SerdeContext): Container => { + return take(output, { + containerArn: __expectString, + cpu: __expectString, + exitCode: __expectInt32, + gpuIds: _json, + healthStatus: __expectString, + image: __expectString, + imageDigest: __expectString, + lastStatus: __expectString, + managedAgents: (_: any) => de_ManagedAgents(_, context), + memory: __expectString, + memoryReservation: __expectString, + name: __expectString, + networkBindings: _json, + networkInterfaces: _json, + reason: __expectString, + runtimeId: __expectString, + taskArn: __expectString, + }) as any; }; +// de_ContainerDefinition omitted. + +// de_ContainerDefinitions omitted. + +// de_ContainerDependencies omitted. + +// de_ContainerDependency omitted. + /** - * deserializeAws_json1_1NoUpdateAvailableException + * deserializeAws_json1_1ContainerInstance */ -const de_NoUpdateAvailableException = (output: any, context: __SerdeContext): NoUpdateAvailableException => { - return { - message: __expectString(output.message), - } as any; +const de_ContainerInstance = (output: any, context: __SerdeContext): ContainerInstance => { + return take(output, { + agentConnected: __expectBoolean, + agentUpdateStatus: __expectString, + attachments: _json, + attributes: _json, + capacityProviderName: __expectString, + containerInstanceArn: __expectString, + ec2InstanceId: __expectString, + healthStatus: (_: any) => de_ContainerInstanceHealthStatus(_, context), + pendingTasksCount: __expectInt32, + registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registeredResources: (_: any) => de_Resources(_, context), + remainingResources: (_: any) => de_Resources(_, context), + runningTasksCount: __expectInt32, + status: __expectString, + statusReason: __expectString, + tags: _json, + version: __expectLong, + versionInfo: _json, + }) as any; }; /** - * deserializeAws_json1_1PlacementConstraint + * deserializeAws_json1_1ContainerInstanceHealthStatus */ -const de_PlacementConstraint = (output: any, context: __SerdeContext): PlacementConstraint => { - return { - expression: __expectString(output.expression), - type: __expectString(output.type), - } as any; +const de_ContainerInstanceHealthStatus = (output: any, context: __SerdeContext): ContainerInstanceHealthStatus => { + return take(output, { + details: (_: any) => de_InstanceHealthCheckResultList(_, context), + overallStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PlacementConstraints + * deserializeAws_json1_1ContainerInstances */ -const de_PlacementConstraints = (output: any, context: __SerdeContext): PlacementConstraint[] => { +const de_ContainerInstances = (output: any, context: __SerdeContext): ContainerInstance[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementConstraint(entry, context); + return de_ContainerInstance(entry, context); }); return retVal; }; +// de_ContainerOverride omitted. + +// de_ContainerOverrides omitted. + /** - * deserializeAws_json1_1PlacementStrategies + * deserializeAws_json1_1Containers */ -const de_PlacementStrategies = (output: any, context: __SerdeContext): PlacementStrategy[] => { +const de_Containers = (output: any, context: __SerdeContext): Container[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementStrategy(entry, context); + return de_Container(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PlacementStrategy - */ -const de_PlacementStrategy = (output: any, context: __SerdeContext): PlacementStrategy => { - return { - field: __expectString(output.field), - type: __expectString(output.type), - } as any; -}; +// de_CreateCapacityProviderResponse omitted. -/** - * deserializeAws_json1_1PlatformTaskDefinitionIncompatibilityException - */ -const de_PlatformTaskDefinitionIncompatibilityException = ( - output: any, - context: __SerdeContext -): PlatformTaskDefinitionIncompatibilityException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CreateClusterResponse omitted. /** - * deserializeAws_json1_1PlatformUnknownException + * deserializeAws_json1_1CreateServiceResponse */ -const de_PlatformUnknownException = (output: any, context: __SerdeContext): PlatformUnknownException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateServiceResponse = (output: any, context: __SerdeContext): CreateServiceResponse => { + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; /** - * deserializeAws_json1_1PortMapping + * deserializeAws_json1_1CreateTaskSetResponse */ -const de_PortMapping = (output: any, context: __SerdeContext): PortMapping => { - return { - appProtocol: __expectString(output.appProtocol), - containerPort: __expectInt32(output.containerPort), - containerPortRange: __expectString(output.containerPortRange), - hostPort: __expectInt32(output.hostPort), - name: __expectString(output.name), - protocol: __expectString(output.protocol), - } as any; +const de_CreateTaskSetResponse = (output: any, context: __SerdeContext): CreateTaskSetResponse => { + return take(output, { + taskSet: (_: any) => de_TaskSet(_, context), + }) as any; }; +// de_DeleteAccountSettingResponse omitted. + +// de_DeleteAttributesResponse omitted. + +// de_DeleteCapacityProviderResponse omitted. + +// de_DeleteClusterResponse omitted. + /** - * deserializeAws_json1_1PortMappingList + * deserializeAws_json1_1DeleteServiceResponse */ -const de_PortMappingList = (output: any, context: __SerdeContext): PortMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortMapping(entry, context); - }); - return retVal; +const de_DeleteServiceResponse = (output: any, context: __SerdeContext): DeleteServiceResponse => { + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProtectedTask + * deserializeAws_json1_1DeleteTaskDefinitionsResponse */ -const de_ProtectedTask = (output: any, context: __SerdeContext): ProtectedTask => { - return { - expirationDate: - output.expirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expirationDate))) - : undefined, - protectionEnabled: __expectBoolean(output.protectionEnabled), - taskArn: __expectString(output.taskArn), - } as any; +const de_DeleteTaskDefinitionsResponse = (output: any, context: __SerdeContext): DeleteTaskDefinitionsResponse => { + return take(output, { + failures: _json, + taskDefinitions: (_: any) => de_TaskDefinitionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProtectedTasks + * deserializeAws_json1_1DeleteTaskSetResponse */ -const de_ProtectedTasks = (output: any, context: __SerdeContext): ProtectedTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProtectedTask(entry, context); - }); - return retVal; +const de_DeleteTaskSetResponse = (output: any, context: __SerdeContext): DeleteTaskSetResponse => { + return take(output, { + taskSet: (_: any) => de_TaskSet(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProxyConfiguration + * deserializeAws_json1_1Deployment */ -const de_ProxyConfiguration = (output: any, context: __SerdeContext): ProxyConfiguration => { - return { - containerName: __expectString(output.containerName), - properties: output.properties != null ? de_ProxyConfigurationProperties(output.properties, context) : undefined, - type: __expectString(output.type), - } as any; +const de_Deployment = (output: any, context: __SerdeContext): Deployment => { + return take(output, { + capacityProviderStrategy: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + desiredCount: __expectInt32, + failedTasks: __expectInt32, + id: __expectString, + launchType: __expectString, + networkConfiguration: _json, + pendingCount: __expectInt32, + platformFamily: __expectString, + platformVersion: __expectString, + rolloutState: __expectString, + rolloutStateReason: __expectString, + runningCount: __expectInt32, + serviceConnectConfiguration: _json, + serviceConnectResources: _json, + status: __expectString, + taskDefinition: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DeploymentAlarms omitted. + +// de_DeploymentCircuitBreaker omitted. + +// de_DeploymentConfiguration omitted. + +// de_DeploymentController omitted. + /** - * deserializeAws_json1_1ProxyConfigurationProperties + * deserializeAws_json1_1Deployments */ -const de_ProxyConfigurationProperties = (output: any, context: __SerdeContext): KeyValuePair[] => { +const de_Deployments = (output: any, context: __SerdeContext): Deployment[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValuePair(entry, context); + return de_Deployment(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PutAccountSettingDefaultResponse + * deserializeAws_json1_1DeregisterContainerInstanceResponse */ -const de_PutAccountSettingDefaultResponse = ( +const de_DeregisterContainerInstanceResponse = ( output: any, context: __SerdeContext -): PutAccountSettingDefaultResponse => { - return { - setting: output.setting != null ? de_Setting(output.setting, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1PutAccountSettingResponse - */ -const de_PutAccountSettingResponse = (output: any, context: __SerdeContext): PutAccountSettingResponse => { - return { - setting: output.setting != null ? de_Setting(output.setting, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1PutAttributesResponse - */ -const de_PutAttributesResponse = (output: any, context: __SerdeContext): PutAttributesResponse => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - } as any; +): DeregisterContainerInstanceResponse => { + return take(output, { + containerInstance: (_: any) => de_ContainerInstance(_, context), + }) as any; }; /** - * deserializeAws_json1_1PutClusterCapacityProvidersResponse + * deserializeAws_json1_1DeregisterTaskDefinitionResponse */ -const de_PutClusterCapacityProvidersResponse = ( +const de_DeregisterTaskDefinitionResponse = ( output: any, context: __SerdeContext -): PutClusterCapacityProvidersResponse => { - return { - cluster: output.cluster != null ? de_Cluster(output.cluster, context) : undefined, - } as any; +): DeregisterTaskDefinitionResponse => { + return take(output, { + taskDefinition: (_: any) => de_TaskDefinition(_, context), + }) as any; }; +// de_DescribeCapacityProvidersResponse omitted. + +// de_DescribeClustersResponse omitted. + /** - * deserializeAws_json1_1RegisterContainerInstanceResponse + * deserializeAws_json1_1DescribeContainerInstancesResponse */ -const de_RegisterContainerInstanceResponse = ( +const de_DescribeContainerInstancesResponse = ( output: any, context: __SerdeContext -): RegisterContainerInstanceResponse => { - return { - containerInstance: - output.containerInstance != null ? de_ContainerInstance(output.containerInstance, context) : undefined, - } as any; +): DescribeContainerInstancesResponse => { + return take(output, { + containerInstances: (_: any) => de_ContainerInstances(_, context), + failures: _json, + }) as any; }; /** - * deserializeAws_json1_1RegisterTaskDefinitionResponse + * deserializeAws_json1_1DescribeServicesResponse */ -const de_RegisterTaskDefinitionResponse = (output: any, context: __SerdeContext): RegisterTaskDefinitionResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - taskDefinition: output.taskDefinition != null ? de_TaskDefinition(output.taskDefinition, context) : undefined, - } as any; +const de_DescribeServicesResponse = (output: any, context: __SerdeContext): DescribeServicesResponse => { + return take(output, { + failures: _json, + services: (_: any) => de_Services(_, context), + }) as any; }; /** - * deserializeAws_json1_1RepositoryCredentials + * deserializeAws_json1_1DescribeTaskDefinitionResponse */ -const de_RepositoryCredentials = (output: any, context: __SerdeContext): RepositoryCredentials => { - return { - credentialsParameter: __expectString(output.credentialsParameter), - } as any; +const de_DescribeTaskDefinitionResponse = (output: any, context: __SerdeContext): DescribeTaskDefinitionResponse => { + return take(output, { + tags: _json, + taskDefinition: (_: any) => de_TaskDefinition(_, context), + }) as any; }; /** - * deserializeAws_json1_1RequiresAttributes + * deserializeAws_json1_1DescribeTaskSetsResponse */ -const de_RequiresAttributes = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; +const de_DescribeTaskSetsResponse = (output: any, context: __SerdeContext): DescribeTaskSetsResponse => { + return take(output, { + failures: _json, + taskSets: (_: any) => de_TaskSets(_, context), + }) as any; }; /** - * deserializeAws_json1_1Resource + * deserializeAws_json1_1DescribeTasksResponse */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - doubleValue: __limitedParseDouble(output.doubleValue), - integerValue: __expectInt32(output.integerValue), - longValue: __expectLong(output.longValue), - name: __expectString(output.name), - stringSetValue: output.stringSetValue != null ? de_StringList(output.stringSetValue, context) : undefined, - type: __expectString(output.type), - } as any; +const de_DescribeTasksResponse = (output: any, context: __SerdeContext): DescribeTasksResponse => { + return take(output, { + failures: _json, + tasks: (_: any) => de_Tasks(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_Device omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DeviceCgroupPermissions omitted. -/** - * deserializeAws_json1_1ResourceRequirement - */ -const de_ResourceRequirement = (output: any, context: __SerdeContext): ResourceRequirement => { - return { - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// de_DevicesList omitted. -/** - * deserializeAws_json1_1ResourceRequirements - */ -const de_ResourceRequirements = (output: any, context: __SerdeContext): ResourceRequirement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceRequirement(entry, context); - }); - return retVal; -}; +// de_DiscoverPollEndpointResponse omitted. -/** - * deserializeAws_json1_1Resources - */ -const de_Resources = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_DockerLabelsMap omitted. -/** - * deserializeAws_json1_1RunTaskResponse - */ -const de_RunTaskResponse = (output: any, context: __SerdeContext): RunTaskResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - tasks: output.tasks != null ? de_Tasks(output.tasks, context) : undefined, - } as any; -}; +// de_DockerVolumeConfiguration omitted. -/** - * deserializeAws_json1_1RuntimePlatform - */ -const de_RuntimePlatform = (output: any, context: __SerdeContext): RuntimePlatform => { - return { - cpuArchitecture: __expectString(output.cpuArchitecture), - operatingSystemFamily: __expectString(output.operatingSystemFamily), - } as any; -}; +// de_EFSAuthorizationConfig omitted. -/** - * deserializeAws_json1_1Scale - */ -const de_Scale = (output: any, context: __SerdeContext): Scale => { - return { - unit: __expectString(output.unit), - value: __limitedParseDouble(output.value), - } as any; -}; +// de_EFSVolumeConfiguration omitted. -/** - * deserializeAws_json1_1Secret - */ -const de_Secret = (output: any, context: __SerdeContext): Secret => { - return { - name: __expectString(output.name), - valueFrom: __expectString(output.valueFrom), - } as any; -}; +// de_EnvironmentFile omitted. -/** - * deserializeAws_json1_1SecretList - */ -const de_SecretList = (output: any, context: __SerdeContext): Secret[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Secret(entry, context); - }); - return retVal; -}; +// de_EnvironmentFiles omitted. -/** - * deserializeAws_json1_1ServerException - */ -const de_ServerException = (output: any, context: __SerdeContext): ServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_EnvironmentVariables omitted. -/** - * deserializeAws_json1_1Service - */ -const de_Service = (output: any, context: __SerdeContext): Service => { - return { - capacityProviderStrategy: - output.capacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.capacityProviderStrategy, context) - : undefined, - clusterArn: __expectString(output.clusterArn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - deploymentConfiguration: - output.deploymentConfiguration != null - ? de_DeploymentConfiguration(output.deploymentConfiguration, context) - : undefined, - deploymentController: - output.deploymentController != null ? de_DeploymentController(output.deploymentController, context) : undefined, - deployments: output.deployments != null ? de_Deployments(output.deployments, context) : undefined, - desiredCount: __expectInt32(output.desiredCount), - enableECSManagedTags: __expectBoolean(output.enableECSManagedTags), - enableExecuteCommand: __expectBoolean(output.enableExecuteCommand), - events: output.events != null ? de_ServiceEvents(output.events, context) : undefined, - healthCheckGracePeriodSeconds: __expectInt32(output.healthCheckGracePeriodSeconds), - launchType: __expectString(output.launchType), - loadBalancers: output.loadBalancers != null ? de_LoadBalancers(output.loadBalancers, context) : undefined, - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - pendingCount: __expectInt32(output.pendingCount), - placementConstraints: - output.placementConstraints != null ? de_PlacementConstraints(output.placementConstraints, context) : undefined, - placementStrategy: - output.placementStrategy != null ? de_PlacementStrategies(output.placementStrategy, context) : undefined, - platformFamily: __expectString(output.platformFamily), - platformVersion: __expectString(output.platformVersion), - propagateTags: __expectString(output.propagateTags), - roleArn: __expectString(output.roleArn), - runningCount: __expectInt32(output.runningCount), - schedulingStrategy: __expectString(output.schedulingStrategy), - serviceArn: __expectString(output.serviceArn), - serviceName: __expectString(output.serviceName), - serviceRegistries: - output.serviceRegistries != null ? de_ServiceRegistries(output.serviceRegistries, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - taskDefinition: __expectString(output.taskDefinition), - taskSets: output.taskSets != null ? de_TaskSets(output.taskSets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ServiceConnectClientAlias - */ -const de_ServiceConnectClientAlias = (output: any, context: __SerdeContext): ServiceConnectClientAlias => { - return { - dnsName: __expectString(output.dnsName), - port: __expectInt32(output.port), - } as any; -}; +// de_EphemeralStorage omitted. -/** - * deserializeAws_json1_1ServiceConnectClientAliasList - */ -const de_ServiceConnectClientAliasList = (output: any, context: __SerdeContext): ServiceConnectClientAlias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceConnectClientAlias(entry, context); - }); - return retVal; -}; +// de_ExecuteCommandConfiguration omitted. -/** - * deserializeAws_json1_1ServiceConnectConfiguration - */ -const de_ServiceConnectConfiguration = (output: any, context: __SerdeContext): ServiceConnectConfiguration => { - return { - enabled: __expectBoolean(output.enabled), - logConfiguration: - output.logConfiguration != null ? de_LogConfiguration(output.logConfiguration, context) : undefined, - namespace: __expectString(output.namespace), - services: output.services != null ? de_ServiceConnectServiceList(output.services, context) : undefined, - } as any; -}; +// de_ExecuteCommandLogConfiguration omitted. -/** - * deserializeAws_json1_1ServiceConnectService - */ -const de_ServiceConnectService = (output: any, context: __SerdeContext): ServiceConnectService => { - return { - clientAliases: - output.clientAliases != null ? de_ServiceConnectClientAliasList(output.clientAliases, context) : undefined, - discoveryName: __expectString(output.discoveryName), - ingressPortOverride: __expectInt32(output.ingressPortOverride), - portName: __expectString(output.portName), - } as any; -}; +// de_ExecuteCommandResponse omitted. -/** - * deserializeAws_json1_1ServiceConnectServiceList - */ -const de_ServiceConnectServiceList = (output: any, context: __SerdeContext): ServiceConnectService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceConnectService(entry, context); - }); - return retVal; -}; +// de_Failure omitted. -/** - * deserializeAws_json1_1ServiceConnectServiceResource - */ -const de_ServiceConnectServiceResource = (output: any, context: __SerdeContext): ServiceConnectServiceResource => { - return { - discoveryArn: __expectString(output.discoveryArn), - discoveryName: __expectString(output.discoveryName), - } as any; -}; +// de_Failures omitted. -/** - * deserializeAws_json1_1ServiceConnectServiceResourceList - */ -const de_ServiceConnectServiceResourceList = ( - output: any, - context: __SerdeContext -): ServiceConnectServiceResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceConnectServiceResource(entry, context); - }); - return retVal; -}; +// de_FirelensConfiguration omitted. -/** - * deserializeAws_json1_1ServiceEvent - */ -const de_ServiceEvent = (output: any, context: __SerdeContext): ServiceEvent => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - message: __expectString(output.message), - } as any; -}; +// de_FirelensConfigurationOptionsMap omitted. -/** - * deserializeAws_json1_1ServiceEvents - */ -const de_ServiceEvents = (output: any, context: __SerdeContext): ServiceEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceEvent(entry, context); - }); - return retVal; -}; +// de_FSxWindowsFileServerAuthorizationConfig omitted. + +// de_FSxWindowsFileServerVolumeConfiguration omitted. /** - * deserializeAws_json1_1ServiceNotActiveException + * deserializeAws_json1_1GetTaskProtectionResponse */ -const de_ServiceNotActiveException = (output: any, context: __SerdeContext): ServiceNotActiveException => { - return { - message: __expectString(output.message), - } as any; +const de_GetTaskProtectionResponse = (output: any, context: __SerdeContext): GetTaskProtectionResponse => { + return take(output, { + failures: _json, + protectedTasks: (_: any) => de_ProtectedTasks(_, context), + }) as any; }; +// de_GpuIds omitted. + +// de_HealthCheck omitted. + +// de_HostEntry omitted. + +// de_HostEntryList omitted. + +// de_HostVolumeProperties omitted. + +// de_InferenceAccelerator omitted. + +// de_InferenceAcceleratorOverride omitted. + +// de_InferenceAcceleratorOverrides omitted. + +// de_InferenceAccelerators omitted. + /** - * deserializeAws_json1_1ServiceNotFoundException + * deserializeAws_json1_1InstanceHealthCheckResult */ -const de_ServiceNotFoundException = (output: any, context: __SerdeContext): ServiceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_InstanceHealthCheckResult = (output: any, context: __SerdeContext): InstanceHealthCheckResult => { + return take(output, { + lastStatusChange: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ServiceRegistries + * deserializeAws_json1_1InstanceHealthCheckResultList */ -const de_ServiceRegistries = (output: any, context: __SerdeContext): ServiceRegistry[] => { +const de_InstanceHealthCheckResultList = (output: any, context: __SerdeContext): InstanceHealthCheckResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceRegistry(entry, context); + return de_InstanceHealthCheckResult(entry, context); }); return retVal; }; +// de_InvalidParameterException omitted. + +// de_KernelCapabilities omitted. + +// de_KeyValuePair omitted. + +// de_LimitExceededException omitted. + +// de_LinuxParameters omitted. + +// de_ListAccountSettingsResponse omitted. + +// de_ListAttributesResponse omitted. + +// de_ListClustersResponse omitted. + +// de_ListContainerInstancesResponse omitted. + +// de_ListServicesByNamespaceResponse omitted. + +// de_ListServicesResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListTaskDefinitionFamiliesResponse omitted. + +// de_ListTaskDefinitionsResponse omitted. + +// de_ListTasksResponse omitted. + +// de_LoadBalancer omitted. + +// de_LoadBalancers omitted. + +// de_LogConfiguration omitted. + +// de_LogConfigurationOptionsMap omitted. + /** - * deserializeAws_json1_1ServiceRegistry + * deserializeAws_json1_1ManagedAgent */ -const de_ServiceRegistry = (output: any, context: __SerdeContext): ServiceRegistry => { - return { - containerName: __expectString(output.containerName), - containerPort: __expectInt32(output.containerPort), - port: __expectInt32(output.port), - registryArn: __expectString(output.registryArn), - } as any; +const de_ManagedAgent = (output: any, context: __SerdeContext): ManagedAgent => { + return take(output, { + lastStartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStatus: __expectString, + name: __expectString, + reason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Services + * deserializeAws_json1_1ManagedAgents */ -const de_Services = (output: any, context: __SerdeContext): Service[] => { +const de_ManagedAgents = (output: any, context: __SerdeContext): ManagedAgent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Service(entry, context); + return de_ManagedAgent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Session - */ -const de_Session = (output: any, context: __SerdeContext): Session => { - return { - sessionId: __expectString(output.sessionId), - streamUrl: __expectString(output.streamUrl), - tokenValue: __expectString(output.tokenValue), - } as any; -}; +// de_ManagedScaling omitted. + +// de_MissingVersionException omitted. + +// de_MountPoint omitted. + +// de_MountPointList omitted. + +// de_NamespaceNotFoundException omitted. + +// de_NetworkBinding omitted. + +// de_NetworkBindings omitted. + +// de_NetworkConfiguration omitted. + +// de_NetworkInterface omitted. + +// de_NetworkInterfaces omitted. + +// de_NoUpdateAvailableException omitted. + +// de_PlacementConstraint omitted. + +// de_PlacementConstraints omitted. + +// de_PlacementStrategies omitted. + +// de_PlacementStrategy omitted. + +// de_PlatformTaskDefinitionIncompatibilityException omitted. + +// de_PlatformUnknownException omitted. + +// de_PortMapping omitted. + +// de_PortMappingList omitted. /** - * deserializeAws_json1_1Setting + * deserializeAws_json1_1ProtectedTask */ -const de_Setting = (output: any, context: __SerdeContext): Setting => { - return { - name: __expectString(output.name), - principalArn: __expectString(output.principalArn), - value: __expectString(output.value), - } as any; +const de_ProtectedTask = (output: any, context: __SerdeContext): ProtectedTask => { + return take(output, { + expirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + protectionEnabled: __expectBoolean, + taskArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Settings + * deserializeAws_json1_1ProtectedTasks */ -const de_Settings = (output: any, context: __SerdeContext): Setting[] => { +const de_ProtectedTasks = (output: any, context: __SerdeContext): ProtectedTask[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Setting(entry, context); + return de_ProtectedTask(entry, context); }); return retVal; }; +// de_ProxyConfiguration omitted. + +// de_ProxyConfigurationProperties omitted. + +// de_PutAccountSettingDefaultResponse omitted. + +// de_PutAccountSettingResponse omitted. + +// de_PutAttributesResponse omitted. + +// de_PutClusterCapacityProvidersResponse omitted. + /** - * deserializeAws_json1_1StartTaskResponse + * deserializeAws_json1_1RegisterContainerInstanceResponse */ -const de_StartTaskResponse = (output: any, context: __SerdeContext): StartTaskResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - tasks: output.tasks != null ? de_Tasks(output.tasks, context) : undefined, - } as any; +const de_RegisterContainerInstanceResponse = ( + output: any, + context: __SerdeContext +): RegisterContainerInstanceResponse => { + return take(output, { + containerInstance: (_: any) => de_ContainerInstance(_, context), + }) as any; }; /** - * deserializeAws_json1_1Statistics + * deserializeAws_json1_1RegisterTaskDefinitionResponse */ -const de_Statistics = (output: any, context: __SerdeContext): KeyValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValuePair(entry, context); - }); - return retVal; +const de_RegisterTaskDefinitionResponse = (output: any, context: __SerdeContext): RegisterTaskDefinitionResponse => { + return take(output, { + tags: _json, + taskDefinition: (_: any) => de_TaskDefinition(_, context), + }) as any; }; +// de_RepositoryCredentials omitted. + +// de_RequiresAttributes omitted. + /** - * deserializeAws_json1_1StopTaskResponse + * deserializeAws_json1_1Resource */ -const de_StopTaskResponse = (output: any, context: __SerdeContext): StopTaskResponse => { - return { - task: output.task != null ? de_Task(output.task, context) : undefined, - } as any; +const de_Resource = (output: any, context: __SerdeContext): Resource => { + return take(output, { + doubleValue: __limitedParseDouble, + integerValue: __expectInt32, + longValue: __expectLong, + name: __expectString, + stringSetValue: _json, + type: __expectString, + }) as any; }; +// de_ResourceInUseException omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceRequirement omitted. + +// de_ResourceRequirements omitted. + /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1Resources */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { +const de_Resources = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Resource(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1StringMap + * deserializeAws_json1_1RunTaskResponse */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_RunTaskResponse = (output: any, context: __SerdeContext): RunTaskResponse => { + return take(output, { + failures: _json, + tasks: (_: any) => de_Tasks(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SubmitAttachmentStateChangesResponse - */ -const de_SubmitAttachmentStateChangesResponse = ( - output: any, - context: __SerdeContext -): SubmitAttachmentStateChangesResponse => { - return { - acknowledgment: __expectString(output.acknowledgment), - } as any; -}; +// de_RuntimePlatform omitted. /** - * deserializeAws_json1_1SubmitContainerStateChangeResponse + * deserializeAws_json1_1Scale */ -const de_SubmitContainerStateChangeResponse = ( - output: any, - context: __SerdeContext -): SubmitContainerStateChangeResponse => { - return { - acknowledgment: __expectString(output.acknowledgment), - } as any; +const de_Scale = (output: any, context: __SerdeContext): Scale => { + return take(output, { + unit: __expectString, + value: __limitedParseDouble, + }) as any; }; +// de_Secret omitted. + +// de_SecretList omitted. + +// de_ServerException omitted. + /** - * deserializeAws_json1_1SubmitTaskStateChangeResponse + * deserializeAws_json1_1Service */ -const de_SubmitTaskStateChangeResponse = (output: any, context: __SerdeContext): SubmitTaskStateChangeResponse => { - return { - acknowledgment: __expectString(output.acknowledgment), - } as any; -}; +const de_Service = (output: any, context: __SerdeContext): Service => { + return take(output, { + capacityProviderStrategy: _json, + clusterArn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + deploymentConfiguration: _json, + deploymentController: _json, + deployments: (_: any) => de_Deployments(_, context), + desiredCount: __expectInt32, + enableECSManagedTags: __expectBoolean, + enableExecuteCommand: __expectBoolean, + events: (_: any) => de_ServiceEvents(_, context), + healthCheckGracePeriodSeconds: __expectInt32, + launchType: __expectString, + loadBalancers: _json, + networkConfiguration: _json, + pendingCount: __expectInt32, + placementConstraints: _json, + placementStrategy: _json, + platformFamily: __expectString, + platformVersion: __expectString, + propagateTags: __expectString, + roleArn: __expectString, + runningCount: __expectInt32, + schedulingStrategy: __expectString, + serviceArn: __expectString, + serviceName: __expectString, + serviceRegistries: _json, + status: __expectString, + tags: _json, + taskDefinition: __expectString, + taskSets: (_: any) => de_TaskSets(_, context), + }) as any; +}; + +// de_ServiceConnectClientAlias omitted. + +// de_ServiceConnectClientAliasList omitted. + +// de_ServiceConnectConfiguration omitted. + +// de_ServiceConnectService omitted. + +// de_ServiceConnectServiceList omitted. + +// de_ServiceConnectServiceResource omitted. + +// de_ServiceConnectServiceResourceList omitted. /** - * deserializeAws_json1_1SystemControl + * deserializeAws_json1_1ServiceEvent */ -const de_SystemControl = (output: any, context: __SerdeContext): SystemControl => { - return { - namespace: __expectString(output.namespace), - value: __expectString(output.value), - } as any; +const de_ServiceEvent = (output: any, context: __SerdeContext): ServiceEvent => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + message: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SystemControls + * deserializeAws_json1_1ServiceEvents */ -const de_SystemControls = (output: any, context: __SerdeContext): SystemControl[] => { +const de_ServiceEvents = (output: any, context: __SerdeContext): ServiceEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SystemControl(entry, context); + return de_ServiceEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_ServiceNotActiveException omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_ServiceNotFoundException omitted. + +// de_ServiceRegistries omitted. + +// de_ServiceRegistry omitted. /** - * deserializeAws_json1_1Tags + * deserializeAws_json1_1Services */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { +const de_Services = (output: any, context: __SerdeContext): Service[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_Service(entry, context); }); return retVal; }; +// de_Session omitted. + +// de_Setting omitted. + +// de_Settings omitted. + /** - * deserializeAws_json1_1TargetNotConnectedException + * deserializeAws_json1_1StartTaskResponse */ -const de_TargetNotConnectedException = (output: any, context: __SerdeContext): TargetNotConnectedException => { - return { - message: __expectString(output.message), - } as any; +const de_StartTaskResponse = (output: any, context: __SerdeContext): StartTaskResponse => { + return take(output, { + failures: _json, + tasks: (_: any) => de_Tasks(_, context), + }) as any; }; +// de_Statistics omitted. + /** - * deserializeAws_json1_1TargetNotFoundException + * deserializeAws_json1_1StopTaskResponse */ -const de_TargetNotFoundException = (output: any, context: __SerdeContext): TargetNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_StopTaskResponse = (output: any, context: __SerdeContext): StopTaskResponse => { + return take(output, { + task: (_: any) => de_Task(_, context), + }) as any; }; +// de_StringList omitted. + +// de_StringMap omitted. + +// de_SubmitAttachmentStateChangesResponse omitted. + +// de_SubmitContainerStateChangeResponse omitted. + +// de_SubmitTaskStateChangeResponse omitted. + +// de_SystemControl omitted. + +// de_SystemControls omitted. + +// de_Tag omitted. + +// de_TagResourceResponse omitted. + +// de_Tags omitted. + +// de_TargetNotConnectedException omitted. + +// de_TargetNotFoundException omitted. + /** * deserializeAws_json1_1Task */ const de_Task = (output: any, context: __SerdeContext): Task => { - return { - attachments: output.attachments != null ? de_Attachments(output.attachments, context) : undefined, - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - availabilityZone: __expectString(output.availabilityZone), - capacityProviderName: __expectString(output.capacityProviderName), - clusterArn: __expectString(output.clusterArn), - connectivity: __expectString(output.connectivity), - connectivityAt: - output.connectivityAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.connectivityAt))) - : undefined, - containerInstanceArn: __expectString(output.containerInstanceArn), - containers: output.containers != null ? de_Containers(output.containers, context) : undefined, - cpu: __expectString(output.cpu), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - desiredStatus: __expectString(output.desiredStatus), - enableExecuteCommand: __expectBoolean(output.enableExecuteCommand), - ephemeralStorage: - output.ephemeralStorage != null ? de_EphemeralStorage(output.ephemeralStorage, context) : undefined, - executionStoppedAt: - output.executionStoppedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.executionStoppedAt))) - : undefined, - group: __expectString(output.group), - healthStatus: __expectString(output.healthStatus), - inferenceAccelerators: - output.inferenceAccelerators != null - ? de_InferenceAccelerators(output.inferenceAccelerators, context) - : undefined, - lastStatus: __expectString(output.lastStatus), - launchType: __expectString(output.launchType), - memory: __expectString(output.memory), - overrides: output.overrides != null ? de_TaskOverride(output.overrides, context) : undefined, - platformFamily: __expectString(output.platformFamily), - platformVersion: __expectString(output.platformVersion), - pullStartedAt: - output.pullStartedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.pullStartedAt))) - : undefined, - pullStoppedAt: - output.pullStoppedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.pullStoppedAt))) - : undefined, - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - startedBy: __expectString(output.startedBy), - stopCode: __expectString(output.stopCode), - stoppedAt: - output.stoppedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stoppedAt))) : undefined, - stoppedReason: __expectString(output.stoppedReason), - stoppingAt: - output.stoppingAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stoppingAt))) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - taskArn: __expectString(output.taskArn), - taskDefinitionArn: __expectString(output.taskDefinitionArn), - version: __expectLong(output.version), - } as any; + return take(output, { + attachments: _json, + attributes: _json, + availabilityZone: __expectString, + capacityProviderName: __expectString, + clusterArn: __expectString, + connectivity: __expectString, + connectivityAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + containerInstanceArn: __expectString, + containers: (_: any) => de_Containers(_, context), + cpu: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + desiredStatus: __expectString, + enableExecuteCommand: __expectBoolean, + ephemeralStorage: _json, + executionStoppedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + group: __expectString, + healthStatus: __expectString, + inferenceAccelerators: _json, + lastStatus: __expectString, + launchType: __expectString, + memory: __expectString, + overrides: _json, + platformFamily: __expectString, + platformVersion: __expectString, + pullStartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pullStoppedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startedBy: __expectString, + stopCode: __expectString, + stoppedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stoppedReason: __expectString, + stoppingAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + taskArn: __expectString, + taskDefinitionArn: __expectString, + version: __expectLong, + }) as any; }; /** * deserializeAws_json1_1TaskDefinition */ const de_TaskDefinition = (output: any, context: __SerdeContext): TaskDefinition => { - return { - compatibilities: output.compatibilities != null ? de_CompatibilityList(output.compatibilities, context) : undefined, - containerDefinitions: - output.containerDefinitions != null ? de_ContainerDefinitions(output.containerDefinitions, context) : undefined, - cpu: __expectString(output.cpu), - deregisteredAt: - output.deregisteredAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deregisteredAt))) - : undefined, - ephemeralStorage: - output.ephemeralStorage != null ? de_EphemeralStorage(output.ephemeralStorage, context) : undefined, - executionRoleArn: __expectString(output.executionRoleArn), - family: __expectString(output.family), - inferenceAccelerators: - output.inferenceAccelerators != null - ? de_InferenceAccelerators(output.inferenceAccelerators, context) - : undefined, - ipcMode: __expectString(output.ipcMode), - memory: __expectString(output.memory), - networkMode: __expectString(output.networkMode), - pidMode: __expectString(output.pidMode), - placementConstraints: - output.placementConstraints != null - ? de_TaskDefinitionPlacementConstraints(output.placementConstraints, context) - : undefined, - proxyConfiguration: - output.proxyConfiguration != null ? de_ProxyConfiguration(output.proxyConfiguration, context) : undefined, - registeredAt: - output.registeredAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registeredAt))) - : undefined, - registeredBy: __expectString(output.registeredBy), - requiresAttributes: - output.requiresAttributes != null ? de_RequiresAttributes(output.requiresAttributes, context) : undefined, - requiresCompatibilities: - output.requiresCompatibilities != null - ? de_CompatibilityList(output.requiresCompatibilities, context) - : undefined, - revision: __expectInt32(output.revision), - runtimePlatform: output.runtimePlatform != null ? de_RuntimePlatform(output.runtimePlatform, context) : undefined, - status: __expectString(output.status), - taskDefinitionArn: __expectString(output.taskDefinitionArn), - taskRoleArn: __expectString(output.taskRoleArn), - volumes: output.volumes != null ? de_VolumeList(output.volumes, context) : undefined, - } as any; + return take(output, { + compatibilities: _json, + containerDefinitions: _json, + cpu: __expectString, + deregisteredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ephemeralStorage: _json, + executionRoleArn: __expectString, + family: __expectString, + inferenceAccelerators: _json, + ipcMode: __expectString, + memory: __expectString, + networkMode: __expectString, + pidMode: __expectString, + placementConstraints: _json, + proxyConfiguration: _json, + registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registeredBy: __expectString, + requiresAttributes: _json, + requiresCompatibilities: _json, + revision: __expectInt32, + runtimePlatform: _json, + status: __expectString, + taskDefinitionArn: __expectString, + taskRoleArn: __expectString, + volumes: _json, + }) as any; }; /** @@ -9610,64 +6005,16 @@ const de_TaskDefinitionList = (output: any, context: __SerdeContext): TaskDefini const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TaskDefinition(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TaskDefinitionPlacementConstraint - */ -const de_TaskDefinitionPlacementConstraint = ( - output: any, - context: __SerdeContext -): TaskDefinitionPlacementConstraint => { - return { - expression: __expectString(output.expression), - type: __expectString(output.type), - } as any; -}; +// de_TaskDefinitionPlacementConstraint omitted. -/** - * deserializeAws_json1_1TaskDefinitionPlacementConstraints - */ -const de_TaskDefinitionPlacementConstraints = ( - output: any, - context: __SerdeContext -): TaskDefinitionPlacementConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaskDefinitionPlacementConstraint(entry, context); - }); - return retVal; -}; +// de_TaskDefinitionPlacementConstraints omitted. -/** - * deserializeAws_json1_1TaskOverride - */ -const de_TaskOverride = (output: any, context: __SerdeContext): TaskOverride => { - return { - containerOverrides: - output.containerOverrides != null ? de_ContainerOverrides(output.containerOverrides, context) : undefined, - cpu: __expectString(output.cpu), - ephemeralStorage: - output.ephemeralStorage != null ? de_EphemeralStorage(output.ephemeralStorage, context) : undefined, - executionRoleArn: __expectString(output.executionRoleArn), - inferenceAcceleratorOverrides: - output.inferenceAcceleratorOverrides != null - ? de_InferenceAcceleratorOverrides(output.inferenceAcceleratorOverrides, context) - : undefined, - memory: __expectString(output.memory), - taskRoleArn: __expectString(output.taskRoleArn), - } as any; -}; +// de_TaskOverride omitted. /** * deserializeAws_json1_1Tasks @@ -9676,9 +6023,6 @@ const de_Tasks = (output: any, context: __SerdeContext): Task[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Task(entry, context); }); return retVal; @@ -9688,52 +6032,35 @@ const de_Tasks = (output: any, context: __SerdeContext): Task[] => { * deserializeAws_json1_1TaskSet */ const de_TaskSet = (output: any, context: __SerdeContext): TaskSet => { - return { - capacityProviderStrategy: - output.capacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.capacityProviderStrategy, context) - : undefined, - clusterArn: __expectString(output.clusterArn), - computedDesiredCount: __expectInt32(output.computedDesiredCount), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - externalId: __expectString(output.externalId), - id: __expectString(output.id), - launchType: __expectString(output.launchType), - loadBalancers: output.loadBalancers != null ? de_LoadBalancers(output.loadBalancers, context) : undefined, - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - pendingCount: __expectInt32(output.pendingCount), - platformFamily: __expectString(output.platformFamily), - platformVersion: __expectString(output.platformVersion), - runningCount: __expectInt32(output.runningCount), - scale: output.scale != null ? de_Scale(output.scale, context) : undefined, - serviceArn: __expectString(output.serviceArn), - serviceRegistries: - output.serviceRegistries != null ? de_ServiceRegistries(output.serviceRegistries, context) : undefined, - stabilityStatus: __expectString(output.stabilityStatus), - stabilityStatusAt: - output.stabilityStatusAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stabilityStatusAt))) - : undefined, - startedBy: __expectString(output.startedBy), - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - taskDefinition: __expectString(output.taskDefinition), - taskSetArn: __expectString(output.taskSetArn), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TaskSetNotFoundException - */ -const de_TaskSetNotFoundException = (output: any, context: __SerdeContext): TaskSetNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; + return take(output, { + capacityProviderStrategy: _json, + clusterArn: __expectString, + computedDesiredCount: __expectInt32, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + externalId: __expectString, + id: __expectString, + launchType: __expectString, + loadBalancers: _json, + networkConfiguration: _json, + pendingCount: __expectInt32, + platformFamily: __expectString, + platformVersion: __expectString, + runningCount: __expectInt32, + scale: (_: any) => de_Scale(_, context), + serviceArn: __expectString, + serviceRegistries: _json, + stabilityStatus: __expectString, + stabilityStatusAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startedBy: __expectString, + status: __expectString, + tags: _json, + taskDefinition: __expectString, + taskSetArn: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_TaskSetNotFoundException omitted. /** * deserializeAws_json1_1TaskSets @@ -9742,118 +6069,36 @@ const de_TaskSets = (output: any, context: __SerdeContext): TaskSet[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TaskSet(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tmpfs - */ -const de_Tmpfs = (output: any, context: __SerdeContext): Tmpfs => { - return { - containerPath: __expectString(output.containerPath), - mountOptions: output.mountOptions != null ? de_StringList(output.mountOptions, context) : undefined, - size: __expectInt32(output.size), - } as any; -}; +// de_Tmpfs omitted. -/** - * deserializeAws_json1_1TmpfsList - */ -const de_TmpfsList = (output: any, context: __SerdeContext): Tmpfs[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tmpfs(entry, context); - }); - return retVal; -}; +// de_TmpfsList omitted. -/** - * deserializeAws_json1_1Ulimit - */ -const de_Ulimit = (output: any, context: __SerdeContext): Ulimit => { - return { - hardLimit: __expectInt32(output.hardLimit), - name: __expectString(output.name), - softLimit: __expectInt32(output.softLimit), - } as any; -}; +// de_Ulimit omitted. -/** - * deserializeAws_json1_1UlimitList - */ -const de_UlimitList = (output: any, context: __SerdeContext): Ulimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ulimit(entry, context); - }); - return retVal; -}; +// de_UlimitList omitted. -/** - * deserializeAws_json1_1UnsupportedFeatureException - */ -const de_UnsupportedFeatureException = (output: any, context: __SerdeContext): UnsupportedFeatureException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedFeatureException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateCapacityProviderResponse - */ -const de_UpdateCapacityProviderResponse = (output: any, context: __SerdeContext): UpdateCapacityProviderResponse => { - return { - capacityProvider: - output.capacityProvider != null ? de_CapacityProvider(output.capacityProvider, context) : undefined, - } as any; -}; +// de_UpdateCapacityProviderResponse omitted. -/** - * deserializeAws_json1_1UpdateClusterResponse - */ -const de_UpdateClusterResponse = (output: any, context: __SerdeContext): UpdateClusterResponse => { - return { - cluster: output.cluster != null ? de_Cluster(output.cluster, context) : undefined, - } as any; -}; +// de_UpdateClusterResponse omitted. -/** - * deserializeAws_json1_1UpdateClusterSettingsResponse - */ -const de_UpdateClusterSettingsResponse = (output: any, context: __SerdeContext): UpdateClusterSettingsResponse => { - return { - cluster: output.cluster != null ? de_Cluster(output.cluster, context) : undefined, - } as any; -}; +// de_UpdateClusterSettingsResponse omitted. /** * deserializeAws_json1_1UpdateContainerAgentResponse */ const de_UpdateContainerAgentResponse = (output: any, context: __SerdeContext): UpdateContainerAgentResponse => { - return { - containerInstance: - output.containerInstance != null ? de_ContainerInstance(output.containerInstance, context) : undefined, - } as any; + return take(output, { + containerInstance: (_: any) => de_ContainerInstance(_, context), + }) as any; }; /** @@ -9863,21 +6108,13 @@ const de_UpdateContainerInstancesStateResponse = ( output: any, context: __SerdeContext ): UpdateContainerInstancesStateResponse => { - return { - containerInstances: - output.containerInstances != null ? de_ContainerInstances(output.containerInstances, context) : undefined, - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - } as any; + return take(output, { + containerInstances: (_: any) => de_ContainerInstances(_, context), + failures: _json, + }) as any; }; -/** - * deserializeAws_json1_1UpdateInProgressException - */ -const de_UpdateInProgressException = (output: any, context: __SerdeContext): UpdateInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UpdateInProgressException omitted. /** * deserializeAws_json1_1UpdateServicePrimaryTaskSetResponse @@ -9886,111 +6123,48 @@ const de_UpdateServicePrimaryTaskSetResponse = ( output: any, context: __SerdeContext ): UpdateServicePrimaryTaskSetResponse => { - return { - taskSet: output.taskSet != null ? de_TaskSet(output.taskSet, context) : undefined, - } as any; + return take(output, { + taskSet: (_: any) => de_TaskSet(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateServiceResponse */ const de_UpdateServiceResponse = (output: any, context: __SerdeContext): UpdateServiceResponse => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateTaskProtectionResponse */ const de_UpdateTaskProtectionResponse = (output: any, context: __SerdeContext): UpdateTaskProtectionResponse => { - return { - failures: output.failures != null ? de_Failures(output.failures, context) : undefined, - protectedTasks: output.protectedTasks != null ? de_ProtectedTasks(output.protectedTasks, context) : undefined, - } as any; + return take(output, { + failures: _json, + protectedTasks: (_: any) => de_ProtectedTasks(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateTaskSetResponse */ const de_UpdateTaskSetResponse = (output: any, context: __SerdeContext): UpdateTaskSetResponse => { - return { - taskSet: output.taskSet != null ? de_TaskSet(output.taskSet, context) : undefined, - } as any; + return take(output, { + taskSet: (_: any) => de_TaskSet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1VersionInfo - */ -const de_VersionInfo = (output: any, context: __SerdeContext): VersionInfo => { - return { - agentHash: __expectString(output.agentHash), - agentVersion: __expectString(output.agentVersion), - dockerVersion: __expectString(output.dockerVersion), - } as any; -}; +// de_VersionInfo omitted. -/** - * deserializeAws_json1_1Volume - */ -const de_Volume = (output: any, context: __SerdeContext): Volume => { - return { - dockerVolumeConfiguration: - output.dockerVolumeConfiguration != null - ? de_DockerVolumeConfiguration(output.dockerVolumeConfiguration, context) - : undefined, - efsVolumeConfiguration: - output.efsVolumeConfiguration != null - ? de_EFSVolumeConfiguration(output.efsVolumeConfiguration, context) - : undefined, - fsxWindowsFileServerVolumeConfiguration: - output.fsxWindowsFileServerVolumeConfiguration != null - ? de_FSxWindowsFileServerVolumeConfiguration(output.fsxWindowsFileServerVolumeConfiguration, context) - : undefined, - host: output.host != null ? de_HostVolumeProperties(output.host, context) : undefined, - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1VolumeFrom - */ -const de_VolumeFrom = (output: any, context: __SerdeContext): VolumeFrom => { - return { - readOnly: __expectBoolean(output.readOnly), - sourceContainer: __expectString(output.sourceContainer), - } as any; -}; +// de_Volume omitted. -/** - * deserializeAws_json1_1VolumeFromList - */ -const de_VolumeFromList = (output: any, context: __SerdeContext): VolumeFrom[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VolumeFrom(entry, context); - }); - return retVal; -}; +// de_VolumeFrom omitted. -/** - * deserializeAws_json1_1VolumeList - */ -const de_VolumeList = (output: any, context: __SerdeContext): Volume[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Volume(entry, context); - }); - return retVal; -}; +// de_VolumeFromList omitted. + +// de_VolumeList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -10012,6 +6186,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-efs/src/protocols/Aws_restJson1.ts b/clients/client-efs/src/protocols/Aws_restJson1.ts index 2937ba779c31..09990c2259c1 100644 --- a/clients/client-efs/src/protocols/Aws_restJson1.ts +++ b/clients/client-efs/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,11 +12,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -108,7 +110,6 @@ import { UpdateFileSystemCommandInput, UpdateFileSystemCommandOutput } from "../ import { EFSServiceException as __BaseException } from "../models/EFSServiceException"; import { AccessPointAlreadyExists, - AccessPointDescription, AccessPointLimitExceeded, AccessPointNotFound, AvailabilityZonesMismatch, @@ -132,7 +133,6 @@ import { IpAddressInUse, LifecyclePolicy, MountTargetConflict, - MountTargetDescription, MountTargetNotFound, NetworkInterfaceLimitExceeded, NoFreeAddressesInSubnet, @@ -140,8 +140,6 @@ import { PosixUser, ReplicationConfigurationDescription, ReplicationNotFound, - Resource, - ResourceIdPreference, RootDirectory, SecurityGroupLimitExceeded, SecurityGroupNotFound, @@ -168,13 +166,15 @@ export const se_CreateAccessPointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/access-points"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.PosixUser != null && { PosixUser: se_PosixUser(input.PosixUser, context) }), - ...(input.RootDirectory != null && { RootDirectory: se_RootDirectory(input.RootDirectory, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + PosixUser: (_) => _json(_), + RootDirectory: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -200,19 +200,19 @@ export const se_CreateFileSystemCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/file-systems"; let body: any; - body = JSON.stringify({ - ...(input.AvailabilityZoneName != null && { AvailabilityZoneName: input.AvailabilityZoneName }), - ...(input.Backup != null && { Backup: input.Backup }), - CreationToken: input.CreationToken ?? generateIdempotencyToken(), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.PerformanceMode != null && { PerformanceMode: input.PerformanceMode }), - ...(input.ProvisionedThroughputInMibps != null && { - ProvisionedThroughputInMibps: __serializeFloat(input.ProvisionedThroughputInMibps), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode }), - }); + body = JSON.stringify( + take(input, { + AvailabilityZoneName: [], + Backup: [], + CreationToken: (_) => _ ?? generateIdempotencyToken(), + Encrypted: [], + KmsKeyId: [], + PerformanceMode: [], + ProvisionedThroughputInMibps: (_) => __serializeFloat(_), + Tags: (_) => _json(_), + ThroughputMode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -238,12 +238,14 @@ export const se_CreateMountTargetCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/mount-targets"; let body: any; - body = JSON.stringify({ - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }); + body = JSON.stringify( + take(input, { + FileSystemId: [], + IpAddress: [], + SecurityGroups: (_) => _json(_), + SubnetId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -278,9 +280,11 @@ export const se_CreateReplicationConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Destinations != null && { Destinations: se_DestinationsToCreate(input.Destinations, context) }), - }); + body = JSON.stringify( + take(input, { + Destinations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -314,9 +318,11 @@ export const se_CreateTagsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -507,9 +513,11 @@ export const se_DeleteTagsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -565,10 +573,12 @@ export const se_DescribeAccountPreferencesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -887,9 +897,11 @@ export const se_ModifyMountTargetSecurityGroupsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }), - }); + body = JSON.stringify( + take(input, { + SecurityGroups: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -915,9 +927,11 @@ export const se_PutAccountPreferencesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/account-preferences"; let body: any; - body = JSON.stringify({ - ...(input.ResourceIdType != null && { ResourceIdType: input.ResourceIdType }), - }); + body = JSON.stringify( + take(input, { + ResourceIdType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -952,9 +966,11 @@ export const se_PutBackupPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BackupPolicy != null && { BackupPolicy: se_BackupPolicy(input.BackupPolicy, context) }), - }); + body = JSON.stringify( + take(input, { + BackupPolicy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -989,12 +1005,12 @@ export const se_PutFileSystemPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BypassPolicyLockoutSafetyCheck != null && { - BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck, - }), - ...(input.Policy != null && { Policy: input.Policy }), - }); + body = JSON.stringify( + take(input, { + BypassPolicyLockoutSafetyCheck: [], + Policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1029,11 +1045,11 @@ export const se_PutLifecycleConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.LifecyclePolicies != null && { - LifecyclePolicies: se_LifecyclePolicies(input.LifecyclePolicies, context), - }), - }); + body = JSON.stringify( + take(input, { + LifecyclePolicies: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1060,9 +1076,11 @@ export const se_TagResourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-02-01/resource-tags/{ResourceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId!, "{ResourceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1127,12 +1145,12 @@ export const se_UpdateFileSystemCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ProvisionedThroughputInMibps != null && { - ProvisionedThroughputInMibps: __serializeFloat(input.ProvisionedThroughputInMibps), - }), - ...(input.ThroughputMode != null && { ThroughputMode: input.ThroughputMode }), - }); + body = JSON.stringify( + take(input, { + ProvisionedThroughputInMibps: (_) => __serializeFloat(_), + ThroughputMode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1158,36 +1176,19 @@ export const de_CreateAccessPointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessPointArn != null) { - contents.AccessPointArn = __expectString(data.AccessPointArn); - } - if (data.AccessPointId != null) { - contents.AccessPointId = __expectString(data.AccessPointId); - } - if (data.ClientToken != null) { - contents.ClientToken = __expectString(data.ClientToken); - } - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.LifeCycleState != null) { - contents.LifeCycleState = __expectString(data.LifeCycleState); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OwnerId != null) { - contents.OwnerId = __expectString(data.OwnerId); - } - if (data.PosixUser != null) { - contents.PosixUser = de_PosixUser(data.PosixUser, context); - } - if (data.RootDirectory != null) { - contents.RootDirectory = de_RootDirectory(data.RootDirectory, context); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + AccessPointArn: __expectString, + AccessPointId: __expectString, + ClientToken: __expectString, + FileSystemId: __expectString, + LifeCycleState: __expectString, + Name: __expectString, + OwnerId: __expectString, + PosixUser: _json, + RootDirectory: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1227,10 +1228,9 @@ const de_CreateAccessPointCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1250,57 +1250,26 @@ export const de_CreateFileSystemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AvailabilityZoneId != null) { - contents.AvailabilityZoneId = __expectString(data.AvailabilityZoneId); - } - if (data.AvailabilityZoneName != null) { - contents.AvailabilityZoneName = __expectString(data.AvailabilityZoneName); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CreationToken != null) { - contents.CreationToken = __expectString(data.CreationToken); - } - if (data.Encrypted != null) { - contents.Encrypted = __expectBoolean(data.Encrypted); - } - if (data.FileSystemArn != null) { - contents.FileSystemArn = __expectString(data.FileSystemArn); - } - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.LifeCycleState != null) { - contents.LifeCycleState = __expectString(data.LifeCycleState); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.NumberOfMountTargets != null) { - contents.NumberOfMountTargets = __expectInt32(data.NumberOfMountTargets); - } - if (data.OwnerId != null) { - contents.OwnerId = __expectString(data.OwnerId); - } - if (data.PerformanceMode != null) { - contents.PerformanceMode = __expectString(data.PerformanceMode); - } - if (data.ProvisionedThroughputInMibps != null) { - contents.ProvisionedThroughputInMibps = __limitedParseDouble(data.ProvisionedThroughputInMibps); - } - if (data.SizeInBytes != null) { - contents.SizeInBytes = de_FileSystemSize(data.SizeInBytes, context); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.ThroughputMode != null) { - contents.ThroughputMode = __expectString(data.ThroughputMode); - } + const doc = take(data, { + AvailabilityZoneId: __expectString, + AvailabilityZoneName: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationToken: __expectString, + Encrypted: __expectBoolean, + FileSystemArn: __expectString, + FileSystemId: __expectString, + KmsKeyId: __expectString, + LifeCycleState: __expectString, + Name: __expectString, + NumberOfMountTargets: __expectInt32, + OwnerId: __expectString, + PerformanceMode: __expectString, + ProvisionedThroughputInMibps: __limitedParseDouble, + SizeInBytes: (_) => de_FileSystemSize(_, context), + Tags: _json, + ThroughputMode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1340,10 +1309,9 @@ const de_CreateFileSystemCommandError = async ( throw await de_UnsupportedAvailabilityZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1363,36 +1331,19 @@ export const de_CreateMountTargetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AvailabilityZoneId != null) { - contents.AvailabilityZoneId = __expectString(data.AvailabilityZoneId); - } - if (data.AvailabilityZoneName != null) { - contents.AvailabilityZoneName = __expectString(data.AvailabilityZoneName); - } - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.IpAddress != null) { - contents.IpAddress = __expectString(data.IpAddress); - } - if (data.LifeCycleState != null) { - contents.LifeCycleState = __expectString(data.LifeCycleState); - } - if (data.MountTargetId != null) { - contents.MountTargetId = __expectString(data.MountTargetId); - } - if (data.NetworkInterfaceId != null) { - contents.NetworkInterfaceId = __expectString(data.NetworkInterfaceId); - } - if (data.OwnerId != null) { - contents.OwnerId = __expectString(data.OwnerId); - } - if (data.SubnetId != null) { - contents.SubnetId = __expectString(data.SubnetId); - } - if (data.VpcId != null) { - contents.VpcId = __expectString(data.VpcId); - } + const doc = take(data, { + AvailabilityZoneId: __expectString, + AvailabilityZoneName: __expectString, + FileSystemId: __expectString, + IpAddress: __expectString, + LifeCycleState: __expectString, + MountTargetId: __expectString, + NetworkInterfaceId: __expectString, + OwnerId: __expectString, + SubnetId: __expectString, + VpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1450,10 +1401,9 @@ const de_CreateMountTargetCommandError = async ( throw await de_UnsupportedAvailabilityZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1473,24 +1423,15 @@ export const de_CreateReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.Destinations != null) { - contents.Destinations = de_Destinations(data.Destinations, context); - } - if (data.OriginalSourceFileSystemArn != null) { - contents.OriginalSourceFileSystemArn = __expectString(data.OriginalSourceFileSystemArn); - } - if (data.SourceFileSystemArn != null) { - contents.SourceFileSystemArn = __expectString(data.SourceFileSystemArn); - } - if (data.SourceFileSystemId != null) { - contents.SourceFileSystemId = __expectString(data.SourceFileSystemId); - } - if (data.SourceFileSystemRegion != null) { - contents.SourceFileSystemRegion = __expectString(data.SourceFileSystemRegion); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destinations: (_) => de_Destinations(_, context), + OriginalSourceFileSystemArn: __expectString, + SourceFileSystemArn: __expectString, + SourceFileSystemId: __expectString, + SourceFileSystemRegion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1539,10 +1480,9 @@ const de_CreateReplicationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1589,10 +1529,9 @@ const de_CreateTagsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1639,10 +1578,9 @@ const de_DeleteAccessPointCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1692,10 +1630,9 @@ const de_DeleteFileSystemCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1745,10 +1682,9 @@ const de_DeleteFileSystemPolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1798,10 +1734,9 @@ const de_DeleteMountTargetCommandError = async ( throw await de_MountTargetNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1851,10 +1786,9 @@ const de_DeleteReplicationConfigurationCommandError = async ( throw await de_ReplicationNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1901,10 +1835,9 @@ const de_DeleteTagsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1924,12 +1857,11 @@ export const de_DescribeAccessPointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessPoints != null) { - contents.AccessPoints = de_AccessPointDescriptions(data.AccessPoints, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AccessPoints: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1960,10 +1892,9 @@ const de_DescribeAccessPointsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1983,12 +1914,11 @@ export const de_DescribeAccountPreferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ResourceIdPreference != null) { - contents.ResourceIdPreference = de_ResourceIdPreference(data.ResourceIdPreference, context); - } + const doc = take(data, { + NextToken: __expectString, + ResourceIdPreference: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2010,10 +1940,9 @@ const de_DescribeAccountPreferencesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2033,9 +1962,10 @@ export const de_DescribeBackupPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPolicy != null) { - contents.BackupPolicy = de_BackupPolicy(data.BackupPolicy, context); - } + const doc = take(data, { + BackupPolicy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2069,10 +1999,9 @@ const de_DescribeBackupPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2092,12 +2021,11 @@ export const de_DescribeFileSystemPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + FileSystemId: __expectString, + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2128,10 +2056,9 @@ const de_DescribeFileSystemPolicyCommandError = async ( throw await de_PolicyNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2151,15 +2078,12 @@ export const de_DescribeFileSystemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FileSystems != null) { - contents.FileSystems = de_FileSystemDescriptions(data.FileSystems, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + FileSystems: (_) => de_FileSystemDescriptions(_, context), + Marker: __expectString, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2187,10 +2111,9 @@ const de_DescribeFileSystemsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2210,9 +2133,10 @@ export const de_DescribeLifecycleConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LifecyclePolicies != null) { - contents.LifecyclePolicies = de_LifecyclePolicies(data.LifecyclePolicies, context); - } + const doc = take(data, { + LifecyclePolicies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2240,10 +2164,9 @@ const de_DescribeLifecycleConfigurationCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2263,15 +2186,12 @@ export const de_DescribeMountTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.MountTargets != null) { - contents.MountTargets = de_MountTargetDescriptions(data.MountTargets, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + Marker: __expectString, + MountTargets: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2305,10 +2225,9 @@ const de_DescribeMountTargetsCommandError = async ( throw await de_MountTargetNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2328,9 +2247,10 @@ export const de_DescribeMountTargetSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SecurityGroups != null) { - contents.SecurityGroups = de_SecurityGroups(data.SecurityGroups, context); - } + const doc = take(data, { + SecurityGroups: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2361,10 +2281,9 @@ const de_DescribeMountTargetSecurityGroupsCommandError = async ( throw await de_MountTargetNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2384,12 +2303,11 @@ export const de_DescribeReplicationConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Replications != null) { - contents.Replications = de_ReplicationConfigurationDescriptions(data.Replications, context); - } + const doc = take(data, { + NextToken: __expectString, + Replications: (_) => de_ReplicationConfigurationDescriptions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2423,10 +2341,9 @@ const de_DescribeReplicationConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2446,15 +2363,12 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Marker: __expectString, + NextMarker: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2482,10 +2396,9 @@ const de_DescribeTagsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,12 +2418,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + NextToken: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2541,10 +2453,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2600,10 +2511,9 @@ const de_ModifyMountTargetSecurityGroupsCommandError = async ( throw await de_SecurityGroupNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2623,9 +2533,10 @@ export const de_PutAccountPreferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceIdPreference != null) { - contents.ResourceIdPreference = de_ResourceIdPreference(data.ResourceIdPreference, context); - } + const doc = take(data, { + ResourceIdPreference: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2650,10 +2561,9 @@ const de_PutAccountPreferencesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2673,9 +2583,10 @@ export const de_PutBackupPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BackupPolicy != null) { - contents.BackupPolicy = de_BackupPolicy(data.BackupPolicy, context); - } + const doc = take(data, { + BackupPolicy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2709,10 +2620,9 @@ const de_PutBackupPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,12 +2642,11 @@ export const de_PutFileSystemPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + FileSystemId: __expectString, + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2771,10 +2680,9 @@ const de_PutFileSystemPolicyCommandError = async ( throw await de_InvalidPolicyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2794,9 +2702,10 @@ export const de_PutLifecycleConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LifecyclePolicies != null) { - contents.LifecyclePolicies = de_LifecyclePolicies(data.LifecyclePolicies, context); - } + const doc = take(data, { + LifecyclePolicies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2827,10 +2736,9 @@ const de_PutLifecycleConfigurationCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2880,10 +2788,9 @@ const de_TagResourceCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2933,10 +2840,9 @@ const de_UntagResourceCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2956,57 +2862,26 @@ export const de_UpdateFileSystemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AvailabilityZoneId != null) { - contents.AvailabilityZoneId = __expectString(data.AvailabilityZoneId); - } - if (data.AvailabilityZoneName != null) { - contents.AvailabilityZoneName = __expectString(data.AvailabilityZoneName); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CreationToken != null) { - contents.CreationToken = __expectString(data.CreationToken); - } - if (data.Encrypted != null) { - contents.Encrypted = __expectBoolean(data.Encrypted); - } - if (data.FileSystemArn != null) { - contents.FileSystemArn = __expectString(data.FileSystemArn); - } - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.LifeCycleState != null) { - contents.LifeCycleState = __expectString(data.LifeCycleState); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.NumberOfMountTargets != null) { - contents.NumberOfMountTargets = __expectInt32(data.NumberOfMountTargets); - } - if (data.OwnerId != null) { - contents.OwnerId = __expectString(data.OwnerId); - } - if (data.PerformanceMode != null) { - contents.PerformanceMode = __expectString(data.PerformanceMode); - } - if (data.ProvisionedThroughputInMibps != null) { - contents.ProvisionedThroughputInMibps = __limitedParseDouble(data.ProvisionedThroughputInMibps); - } - if (data.SizeInBytes != null) { - contents.SizeInBytes = de_FileSystemSize(data.SizeInBytes, context); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.ThroughputMode != null) { - contents.ThroughputMode = __expectString(data.ThroughputMode); - } + const doc = take(data, { + AvailabilityZoneId: __expectString, + AvailabilityZoneName: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationToken: __expectString, + Encrypted: __expectBoolean, + FileSystemArn: __expectString, + FileSystemId: __expectString, + KmsKeyId: __expectString, + LifeCycleState: __expectString, + Name: __expectString, + NumberOfMountTargets: __expectInt32, + OwnerId: __expectString, + PerformanceMode: __expectString, + ProvisionedThroughputInMibps: __limitedParseDouble, + SizeInBytes: (_) => de_FileSystemSize(_, context), + Tags: _json, + ThroughputMode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3046,16 +2921,15 @@ const de_UpdateFileSystemCommandError = async ( throw await de_TooManyRequestsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessPointAlreadyExistsRes */ @@ -3065,15 +2939,12 @@ const de_AccessPointAlreadyExistsRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.AccessPointId != null) { - contents.AccessPointId = __expectString(data.AccessPointId); - } - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + AccessPointId: __expectString, + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessPointAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3090,12 +2961,11 @@ const de_AccessPointLimitExceededRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessPointLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3109,12 +2979,11 @@ const de_AccessPointLimitExceededRes = async ( const de_AccessPointNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessPointNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3131,12 +3000,11 @@ const de_AvailabilityZonesMismatchRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AvailabilityZonesMismatch({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3150,12 +3018,11 @@ const de_AvailabilityZonesMismatchRes = async ( const de_BadRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequest({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3169,12 +3036,11 @@ const de_BadRequestRes = async (parsedOutput: any, context: __SerdeContext): Pro const de_DependencyTimeoutRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DependencyTimeout({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3191,15 +3057,12 @@ const de_FileSystemAlreadyExistsRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.FileSystemId != null) { - contents.FileSystemId = __expectString(data.FileSystemId); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + FileSystemId: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FileSystemAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3213,12 +3076,11 @@ const de_FileSystemAlreadyExistsRes = async ( const de_FileSystemInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FileSystemInUse({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3235,12 +3097,11 @@ const de_FileSystemLimitExceededRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FileSystemLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3254,12 +3115,11 @@ const de_FileSystemLimitExceededRes = async ( const de_FileSystemNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FileSystemNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3276,12 +3136,11 @@ const de_IncorrectFileSystemLifeCycleStateRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IncorrectFileSystemLifeCycleState({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3298,12 +3157,11 @@ const de_IncorrectMountTargetStateRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IncorrectMountTargetState({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3320,12 +3178,11 @@ const de_InsufficientThroughputCapacityRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InsufficientThroughputCapacity({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3339,12 +3196,11 @@ const de_InsufficientThroughputCapacityRes = async ( const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3361,12 +3217,11 @@ const de_InvalidPolicyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3380,12 +3235,11 @@ const de_InvalidPolicyExceptionRes = async ( const de_IpAddressInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IpAddressInUse({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3399,12 +3253,11 @@ const de_IpAddressInUseRes = async (parsedOutput: any, context: __SerdeContext): const de_MountTargetConflictRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new MountTargetConflict({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3418,12 +3271,11 @@ const de_MountTargetConflictRes = async (parsedOutput: any, context: __SerdeCont const de_MountTargetNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new MountTargetNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3440,12 +3292,11 @@ const de_NetworkInterfaceLimitExceededRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NetworkInterfaceLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3462,12 +3313,11 @@ const de_NoFreeAddressesInSubnetRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NoFreeAddressesInSubnet({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3481,12 +3331,11 @@ const de_NoFreeAddressesInSubnetRes = async ( const de_PolicyNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new PolicyNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3500,12 +3349,11 @@ const de_PolicyNotFoundRes = async (parsedOutput: any, context: __SerdeContext): const de_ReplicationNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ReplicationNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3522,12 +3370,11 @@ const de_SecurityGroupLimitExceededRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new SecurityGroupLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3544,12 +3391,11 @@ const de_SecurityGroupNotFoundRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new SecurityGroupNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3563,12 +3409,11 @@ const de_SecurityGroupNotFoundRes = async ( const de_SubnetNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new SubnetNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3582,12 +3427,11 @@ const de_SubnetNotFoundRes = async (parsedOutput: any, context: __SerdeContext): const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3604,12 +3448,11 @@ const de_ThroughputLimitExceededRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThroughputLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3623,12 +3466,11 @@ const de_ThroughputLimitExceededRes = async ( const de_TooManyRequestsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequests({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3645,12 +3487,11 @@ const de_UnsupportedAvailabilityZoneRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedAvailabilityZone({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3664,12 +3505,11 @@ const de_UnsupportedAvailabilityZoneRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorCode != null) { - contents.ErrorCode = __expectString(data.ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorCode: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3677,212 +3517,50 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1BackupPolicy - */ -const se_BackupPolicy = (input: BackupPolicy, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_BackupPolicy omitted. -/** - * serializeAws_restJson1CreationInfo - */ -const se_CreationInfo = (input: CreationInfo, context: __SerdeContext): any => { - return { - ...(input.OwnerGid != null && { OwnerGid: input.OwnerGid }), - ...(input.OwnerUid != null && { OwnerUid: input.OwnerUid }), - ...(input.Permissions != null && { Permissions: input.Permissions }), - }; -}; +// se_CreationInfo omitted. -/** - * serializeAws_restJson1DestinationsToCreate - */ -const se_DestinationsToCreate = (input: DestinationToCreate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DestinationToCreate(entry, context); - }); -}; +// se_DestinationsToCreate omitted. -/** - * serializeAws_restJson1DestinationToCreate - */ -const se_DestinationToCreate = (input: DestinationToCreate, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZoneName != null && { AvailabilityZoneName: input.AvailabilityZoneName }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Region != null && { Region: input.Region }), - }; -}; +// se_DestinationToCreate omitted. -/** - * serializeAws_restJson1LifecyclePolicies - */ -const se_LifecyclePolicies = (input: LifecyclePolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LifecyclePolicy(entry, context); - }); -}; +// se_LifecyclePolicies omitted. -/** - * serializeAws_restJson1LifecyclePolicy - */ -const se_LifecyclePolicy = (input: LifecyclePolicy, context: __SerdeContext): any => { - return { - ...(input.TransitionToIA != null && { TransitionToIA: input.TransitionToIA }), - ...(input.TransitionToPrimaryStorageClass != null && { - TransitionToPrimaryStorageClass: input.TransitionToPrimaryStorageClass, - }), - }; -}; +// se_LifecyclePolicy omitted. -/** - * serializeAws_restJson1PosixUser - */ -const se_PosixUser = (input: PosixUser, context: __SerdeContext): any => { - return { - ...(input.Gid != null && { Gid: input.Gid }), - ...(input.SecondaryGids != null && { SecondaryGids: se_SecondaryGids(input.SecondaryGids, context) }), - ...(input.Uid != null && { Uid: input.Uid }), - }; -}; +// se_PosixUser omitted. -/** - * serializeAws_restJson1RootDirectory - */ -const se_RootDirectory = (input: RootDirectory, context: __SerdeContext): any => { - return { - ...(input.CreationInfo != null && { CreationInfo: se_CreationInfo(input.CreationInfo, context) }), - ...(input.Path != null && { Path: input.Path }), - }; -}; +// se_RootDirectory omitted. -/** - * serializeAws_restJson1SecondaryGids - */ -const se_SecondaryGids = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecondaryGids omitted. -/** - * serializeAws_restJson1SecurityGroups - */ -const se_SecurityGroups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroups omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1AccessPointDescription - */ -const de_AccessPointDescription = (output: any, context: __SerdeContext): AccessPointDescription => { - return { - AccessPointArn: __expectString(output.AccessPointArn), - AccessPointId: __expectString(output.AccessPointId), - ClientToken: __expectString(output.ClientToken), - FileSystemId: __expectString(output.FileSystemId), - LifeCycleState: __expectString(output.LifeCycleState), - Name: __expectString(output.Name), - OwnerId: __expectString(output.OwnerId), - PosixUser: output.PosixUser != null ? de_PosixUser(output.PosixUser, context) : undefined, - RootDirectory: output.RootDirectory != null ? de_RootDirectory(output.RootDirectory, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_AccessPointDescription omitted. -/** - * deserializeAws_restJson1AccessPointDescriptions - */ -const de_AccessPointDescriptions = (output: any, context: __SerdeContext): AccessPointDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessPointDescription(entry, context); - }); - return retVal; -}; +// de_AccessPointDescriptions omitted. -/** - * deserializeAws_restJson1BackupPolicy - */ -const de_BackupPolicy = (output: any, context: __SerdeContext): BackupPolicy => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_BackupPolicy omitted. -/** - * deserializeAws_restJson1CreationInfo - */ -const de_CreationInfo = (output: any, context: __SerdeContext): CreationInfo => { - return { - OwnerGid: __expectLong(output.OwnerGid), - OwnerUid: __expectLong(output.OwnerUid), - Permissions: __expectString(output.Permissions), - } as any; -}; +// de_CreationInfo omitted. /** * deserializeAws_restJson1Destination */ const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - FileSystemId: __expectString(output.FileSystemId), - LastReplicatedTimestamp: - output.LastReplicatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastReplicatedTimestamp))) - : undefined, - Region: __expectString(output.Region), - Status: __expectString(output.Status), - } as any; + return take(output, { + FileSystemId: __expectString, + LastReplicatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Region: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3892,9 +3570,6 @@ const de_Destinations = (output: any, context: __SerdeContext): Destination[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Destination(entry, context); }); return retVal; @@ -3904,28 +3579,25 @@ const de_Destinations = (output: any, context: __SerdeContext): Destination[] => * deserializeAws_restJson1FileSystemDescription */ const de_FileSystemDescription = (output: any, context: __SerdeContext): FileSystemDescription => { - return { - AvailabilityZoneId: __expectString(output.AvailabilityZoneId), - AvailabilityZoneName: __expectString(output.AvailabilityZoneName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CreationToken: __expectString(output.CreationToken), - Encrypted: __expectBoolean(output.Encrypted), - FileSystemArn: __expectString(output.FileSystemArn), - FileSystemId: __expectString(output.FileSystemId), - KmsKeyId: __expectString(output.KmsKeyId), - LifeCycleState: __expectString(output.LifeCycleState), - Name: __expectString(output.Name), - NumberOfMountTargets: __expectInt32(output.NumberOfMountTargets), - OwnerId: __expectString(output.OwnerId), - PerformanceMode: __expectString(output.PerformanceMode), - ProvisionedThroughputInMibps: __limitedParseDouble(output.ProvisionedThroughputInMibps), - SizeInBytes: output.SizeInBytes != null ? de_FileSystemSize(output.SizeInBytes, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - ThroughputMode: __expectString(output.ThroughputMode), - } as any; + return take(output, { + AvailabilityZoneId: __expectString, + AvailabilityZoneName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationToken: __expectString, + Encrypted: __expectBoolean, + FileSystemArn: __expectString, + FileSystemId: __expectString, + KmsKeyId: __expectString, + LifeCycleState: __expectString, + Name: __expectString, + NumberOfMountTargets: __expectInt32, + OwnerId: __expectString, + PerformanceMode: __expectString, + ProvisionedThroughputInMibps: __limitedParseDouble, + SizeInBytes: (_: any) => de_FileSystemSize(_, context), + Tags: _json, + ThroughputMode: __expectString, + }) as any; }; /** @@ -3935,9 +3607,6 @@ const de_FileSystemDescriptions = (output: any, context: __SerdeContext): FileSy const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FileSystemDescription(entry, context); }); return retVal; @@ -3947,83 +3616,23 @@ const de_FileSystemDescriptions = (output: any, context: __SerdeContext): FileSy * deserializeAws_restJson1FileSystemSize */ const de_FileSystemSize = (output: any, context: __SerdeContext): FileSystemSize => { - return { - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Value: __expectLong(output.Value), - ValueInIA: __expectLong(output.ValueInIA), - ValueInStandard: __expectLong(output.ValueInStandard), - } as any; + return take(output, { + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: __expectLong, + ValueInIA: __expectLong, + ValueInStandard: __expectLong, + }) as any; }; -/** - * deserializeAws_restJson1LifecyclePolicies - */ -const de_LifecyclePolicies = (output: any, context: __SerdeContext): LifecyclePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LifecyclePolicy(entry, context); - }); - return retVal; -}; +// de_LifecyclePolicies omitted. -/** - * deserializeAws_restJson1LifecyclePolicy - */ -const de_LifecyclePolicy = (output: any, context: __SerdeContext): LifecyclePolicy => { - return { - TransitionToIA: __expectString(output.TransitionToIA), - TransitionToPrimaryStorageClass: __expectString(output.TransitionToPrimaryStorageClass), - } as any; -}; +// de_LifecyclePolicy omitted. -/** - * deserializeAws_restJson1MountTargetDescription - */ -const de_MountTargetDescription = (output: any, context: __SerdeContext): MountTargetDescription => { - return { - AvailabilityZoneId: __expectString(output.AvailabilityZoneId), - AvailabilityZoneName: __expectString(output.AvailabilityZoneName), - FileSystemId: __expectString(output.FileSystemId), - IpAddress: __expectString(output.IpAddress), - LifeCycleState: __expectString(output.LifeCycleState), - MountTargetId: __expectString(output.MountTargetId), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - OwnerId: __expectString(output.OwnerId), - SubnetId: __expectString(output.SubnetId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_MountTargetDescription omitted. -/** - * deserializeAws_restJson1MountTargetDescriptions - */ -const de_MountTargetDescriptions = (output: any, context: __SerdeContext): MountTargetDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MountTargetDescription(entry, context); - }); - return retVal; -}; +// de_MountTargetDescriptions omitted. -/** - * deserializeAws_restJson1PosixUser - */ -const de_PosixUser = (output: any, context: __SerdeContext): PosixUser => { - return { - Gid: __expectLong(output.Gid), - SecondaryGids: output.SecondaryGids != null ? de_SecondaryGids(output.SecondaryGids, context) : undefined, - Uid: __expectLong(output.Uid), - } as any; -}; +// de_PosixUser omitted. /** * deserializeAws_restJson1ReplicationConfigurationDescription @@ -4032,17 +3641,14 @@ const de_ReplicationConfigurationDescription = ( output: any, context: __SerdeContext ): ReplicationConfigurationDescription => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destinations: output.Destinations != null ? de_Destinations(output.Destinations, context) : undefined, - OriginalSourceFileSystemArn: __expectString(output.OriginalSourceFileSystemArn), - SourceFileSystemArn: __expectString(output.SourceFileSystemArn), - SourceFileSystemId: __expectString(output.SourceFileSystemId), - SourceFileSystemRegion: __expectString(output.SourceFileSystemRegion), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destinations: (_: any) => de_Destinations(_, context), + OriginalSourceFileSystemArn: __expectString, + SourceFileSystemArn: __expectString, + SourceFileSystemId: __expectString, + SourceFileSystemRegion: __expectString, + }) as any; }; /** @@ -4055,103 +3661,24 @@ const de_ReplicationConfigurationDescriptions = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationConfigurationDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ResourceIdPreference - */ -const de_ResourceIdPreference = (output: any, context: __SerdeContext): ResourceIdPreference => { - return { - ResourceIdType: __expectString(output.ResourceIdType), - Resources: output.Resources != null ? de_Resources(output.Resources, context) : undefined, - } as any; -}; +// de_ResourceIdPreference omitted. -/** - * deserializeAws_restJson1Resources - */ -const de_Resources = (output: any, context: __SerdeContext): (Resource | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Resources omitted. -/** - * deserializeAws_restJson1RootDirectory - */ -const de_RootDirectory = (output: any, context: __SerdeContext): RootDirectory => { - return { - CreationInfo: output.CreationInfo != null ? de_CreationInfo(output.CreationInfo, context) : undefined, - Path: __expectString(output.Path), - } as any; -}; +// de_RootDirectory omitted. -/** - * deserializeAws_restJson1SecondaryGids - */ -const de_SecondaryGids = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; - }); - return retVal; -}; +// de_SecondaryGids omitted. -/** - * deserializeAws_restJson1SecurityGroups - */ -const de_SecurityGroups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroups omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-eks/src/protocols/Aws_restJson1.ts b/clients/client-eks/src/protocols/Aws_restJson1.ts index 9160eec6335c..b3d64af51512 100644 --- a/clients/client-eks/src/protocols/Aws_restJson1.ts +++ b/clients/client-eks/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -108,50 +109,29 @@ import { EKSServiceException as __BaseException } from "../models/EKSServiceExce import { AccessDeniedException, Addon, - AddonHealth, - AddonInfo, - AddonIssue, - AddonVersionInfo, - AutoScalingGroup, BadRequestException, - Certificate, ClientException, Cluster, - ClusterHealth, - ClusterIssue, - Compatibility, ConnectorConfigRequest, ConnectorConfigResponse, ControlPlanePlacementRequest, - ControlPlanePlacementResponse, EncryptionConfig, - ErrorDetail, FargateProfile, FargateProfileSelector, - Identity, IdentityProviderConfig, - IdentityProviderConfigResponse, InvalidParameterException, InvalidRequestException, - Issue, KubernetesNetworkConfigRequest, - KubernetesNetworkConfigResponse, LaunchTemplateSpecification, Logging, LogSetup, LogType, - MarketplaceInformation, Nodegroup, - NodegroupHealth, - NodegroupResources, NodegroupScalingConfig, NodegroupUpdateConfig, NotFoundException, - OIDC, - OidcIdentityProviderConfig, OidcIdentityProviderConfigRequest, OutpostConfigRequest, - OutpostConfigResponse, Provider, RemoteAccessConfig, ResourceInUseException, @@ -164,10 +144,8 @@ import { UnsupportedAvailabilityZoneException, Update, UpdateLabelsPayload, - UpdateParam, UpdateTaintsPayload, VpcConfigRequest, - VpcConfigResponse, } from "../models/models_0"; /** @@ -186,12 +164,12 @@ export const se_AssociateEncryptionConfigCommand = async ( "/clusters/{clusterName}/encryption-config/associate"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.encryptionConfig != null && { - encryptionConfig: se_EncryptionConfigList(input.encryptionConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + encryptionConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -219,11 +197,13 @@ export const se_AssociateIdentityProviderConfigCommand = async ( "/clusters/{clusterName}/identity-provider-configs/associate"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.oidc != null && { oidc: se_OidcIdentityProviderConfigRequest(input.oidc, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + oidc: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -250,15 +230,17 @@ export const se_CreateAddonCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/addons"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - ...(input.addonName != null && { addonName: input.addonName }), - ...(input.addonVersion != null && { addonVersion: input.addonVersion }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.configurationValues != null && { configurationValues: input.configurationValues }), - ...(input.resolveConflicts != null && { resolveConflicts: input.resolveConflicts }), - ...(input.serviceAccountRoleArn != null && { serviceAccountRoleArn: input.serviceAccountRoleArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + addonName: [], + addonVersion: [], + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + configurationValues: [], + resolveConflicts: [], + serviceAccountRoleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -283,24 +265,20 @@ export const se_CreateClusterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.encryptionConfig != null && { - encryptionConfig: se_EncryptionConfigList(input.encryptionConfig, context), - }), - ...(input.kubernetesNetworkConfig != null && { - kubernetesNetworkConfig: se_KubernetesNetworkConfigRequest(input.kubernetesNetworkConfig, context), - }), - ...(input.logging != null && { logging: se_Logging(input.logging, context) }), - ...(input.name != null && { name: input.name }), - ...(input.outpostConfig != null && { outpostConfig: se_OutpostConfigRequest(input.outpostConfig, context) }), - ...(input.resourcesVpcConfig != null && { - resourcesVpcConfig: se_VpcConfigRequest(input.resourcesVpcConfig, context), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.version != null && { version: input.version }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + encryptionConfig: (_) => _json(_), + kubernetesNetworkConfig: (_) => _json(_), + logging: (_) => _json(_), + name: [], + outpostConfig: (_) => _json(_), + resourcesVpcConfig: (_) => _json(_), + roleArn: [], + tags: (_) => _json(_), + version: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -327,14 +305,16 @@ export const se_CreateFargateProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/fargate-profiles"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.fargateProfileName != null && { fargateProfileName: input.fargateProfileName }), - ...(input.podExecutionRoleArn != null && { podExecutionRoleArn: input.podExecutionRoleArn }), - ...(input.selectors != null && { selectors: se_FargateProfileSelectors(input.selectors, context) }), - ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + fargateProfileName: [], + podExecutionRoleArn: [], + selectors: (_) => _json(_), + subnets: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -361,27 +341,27 @@ export const se_CreateNodegroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{clusterName}/node-groups"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - ...(input.amiType != null && { amiType: input.amiType }), - ...(input.capacityType != null && { capacityType: input.capacityType }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.diskSize != null && { diskSize: input.diskSize }), - ...(input.instanceTypes != null && { instanceTypes: se_StringList(input.instanceTypes, context) }), - ...(input.labels != null && { labels: se_labelsMap(input.labels, context) }), - ...(input.launchTemplate != null && { - launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context), - }), - ...(input.nodeRole != null && { nodeRole: input.nodeRole }), - ...(input.nodegroupName != null && { nodegroupName: input.nodegroupName }), - ...(input.releaseVersion != null && { releaseVersion: input.releaseVersion }), - ...(input.remoteAccess != null && { remoteAccess: se_RemoteAccessConfig(input.remoteAccess, context) }), - ...(input.scalingConfig != null && { scalingConfig: se_NodegroupScalingConfig(input.scalingConfig, context) }), - ...(input.subnets != null && { subnets: se_StringList(input.subnets, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.taints != null && { taints: se_taintsList(input.taints, context) }), - ...(input.updateConfig != null && { updateConfig: se_NodegroupUpdateConfig(input.updateConfig, context) }), - ...(input.version != null && { version: input.version }), - }); + body = JSON.stringify( + take(input, { + amiType: [], + capacityType: [], + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + diskSize: [], + instanceTypes: (_) => _json(_), + labels: (_) => _json(_), + launchTemplate: (_) => _json(_), + nodeRole: [], + nodegroupName: [], + releaseVersion: [], + remoteAccess: (_) => _json(_), + scalingConfig: (_) => _json(_), + subnets: (_) => _json(_), + tags: (_) => _json(_), + taints: (_) => _json(_), + updateConfig: (_) => _json(_), + version: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -695,11 +675,11 @@ export const se_DescribeIdentityProviderConfigCommand = async ( "/clusters/{clusterName}/identity-provider-configs/describe"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - ...(input.identityProviderConfig != null && { - identityProviderConfig: se_IdentityProviderConfig(input.identityProviderConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + identityProviderConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -790,12 +770,12 @@ export const se_DisassociateIdentityProviderConfigCommand = async ( "/clusters/{clusterName}/identity-provider-configs/disassociate"; resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.identityProviderConfig != null && { - identityProviderConfig: se_IdentityProviderConfig(input.identityProviderConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + identityProviderConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1018,14 +998,14 @@ export const se_RegisterClusterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-registrations"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.connectorConfig != null && { - connectorConfig: se_ConnectorConfigRequest(input.connectorConfig, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + connectorConfig: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1051,9 +1031,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1112,13 +1094,15 @@ export const se_UpdateAddonCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "clusterName", () => input.clusterName!, "{clusterName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "addonName", () => input.addonName!, "{addonName}", false); let body: any; - body = JSON.stringify({ - ...(input.addonVersion != null && { addonVersion: input.addonVersion }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.configurationValues != null && { configurationValues: input.configurationValues }), - ...(input.resolveConflicts != null && { resolveConflicts: input.resolveConflicts }), - ...(input.serviceAccountRoleArn != null && { serviceAccountRoleArn: input.serviceAccountRoleArn }), - }); + body = JSON.stringify( + take(input, { + addonVersion: [], + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + configurationValues: [], + resolveConflicts: [], + serviceAccountRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1145,13 +1129,13 @@ export const se_UpdateClusterConfigCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/update-config"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.logging != null && { logging: se_Logging(input.logging, context) }), - ...(input.resourcesVpcConfig != null && { - resourcesVpcConfig: se_VpcConfigRequest(input.resourcesVpcConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + logging: (_) => _json(_), + resourcesVpcConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1177,10 +1161,12 @@ export const se_UpdateClusterVersionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clusters/{name}/updates"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.version != null && { version: input.version }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + version: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1216,13 +1202,15 @@ export const se_UpdateNodegroupConfigCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.labels != null && { labels: se_UpdateLabelsPayload(input.labels, context) }), - ...(input.scalingConfig != null && { scalingConfig: se_NodegroupScalingConfig(input.scalingConfig, context) }), - ...(input.taints != null && { taints: se_UpdateTaintsPayload(input.taints, context) }), - ...(input.updateConfig != null && { updateConfig: se_NodegroupUpdateConfig(input.updateConfig, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + labels: (_) => _json(_), + scalingConfig: (_) => _json(_), + taints: (_) => _json(_), + updateConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1258,15 +1246,15 @@ export const se_UpdateNodegroupVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.force != null && { force: input.force }), - ...(input.launchTemplate != null && { - launchTemplate: se_LaunchTemplateSpecification(input.launchTemplate, context), - }), - ...(input.releaseVersion != null && { releaseVersion: input.releaseVersion }), - ...(input.version != null && { version: input.version }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + force: [], + launchTemplate: (_) => _json(_), + releaseVersion: [], + version: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1292,9 +1280,10 @@ export const de_AssociateEncryptionConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1331,10 +1320,9 @@ const de_AssociateEncryptionConfigCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1354,12 +1342,11 @@ export const de_AssociateIdentityProviderConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + tags: _json, + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1396,10 +1383,9 @@ const de_AssociateIdentityProviderConfigCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1419,9 +1405,10 @@ export const de_CreateAddonCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.addon != null) { - contents.addon = de_Addon(data.addon, context); - } + const doc = take(data, { + addon: (_) => de_Addon(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1458,10 +1445,9 @@ const de_CreateAddonCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1481,9 +1467,10 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: (_) => de_Cluster(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1523,10 +1510,9 @@ const de_CreateClusterCommandError = async ( throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,9 +1532,10 @@ export const de_CreateFargateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fargateProfile != null) { - contents.fargateProfile = de_FargateProfile(data.fargateProfile, context); - } + const doc = take(data, { + fargateProfile: (_) => de_FargateProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1585,10 +1572,9 @@ const de_CreateFargateProfileCommandError = async ( throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1608,9 +1594,10 @@ export const de_CreateNodegroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nodegroup != null) { - contents.nodegroup = de_Nodegroup(data.nodegroup, context); - } + const doc = take(data, { + nodegroup: (_) => de_Nodegroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1650,10 +1637,9 @@ const de_CreateNodegroupCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1673,9 +1659,10 @@ export const de_DeleteAddonCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.addon != null) { - contents.addon = de_Addon(data.addon, context); - } + const doc = take(data, { + addon: (_) => de_Addon(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1709,10 +1696,9 @@ const de_DeleteAddonCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1732,9 +1718,10 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: (_) => de_Cluster(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1768,10 +1755,9 @@ const de_DeleteClusterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1791,9 +1777,10 @@ export const de_DeleteFargateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fargateProfile != null) { - contents.fargateProfile = de_FargateProfile(data.fargateProfile, context); - } + const doc = take(data, { + fargateProfile: (_) => de_FargateProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1824,10 +1811,9 @@ const de_DeleteFargateProfileCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1847,9 +1833,10 @@ export const de_DeleteNodegroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nodegroup != null) { - contents.nodegroup = de_Nodegroup(data.nodegroup, context); - } + const doc = take(data, { + nodegroup: (_) => de_Nodegroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1886,10 +1873,9 @@ const de_DeleteNodegroupCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1909,9 +1895,10 @@ export const de_DeregisterClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: (_) => de_Cluster(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1948,10 +1935,9 @@ const de_DeregisterClusterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1971,9 +1957,10 @@ export const de_DescribeAddonCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.addon != null) { - contents.addon = de_Addon(data.addon, context); - } + const doc = take(data, { + addon: (_) => de_Addon(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2007,10 +1994,9 @@ const de_DescribeAddonCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2030,15 +2016,12 @@ export const de_DescribeAddonConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.addonVersion != null) { - contents.addonVersion = __expectString(data.addonVersion); - } - if (data.configurationSchema != null) { - contents.configurationSchema = __expectString(data.configurationSchema); - } + const doc = take(data, { + addonName: __expectString, + addonVersion: __expectString, + configurationSchema: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2066,10 +2049,9 @@ const de_DescribeAddonConfigurationCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2089,12 +2071,11 @@ export const de_DescribeAddonVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.addons != null) { - contents.addons = de_Addons(data.addons, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + addons: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2122,10 +2103,9 @@ const de_DescribeAddonVersionsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2145,9 +2125,10 @@ export const de_DescribeClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: (_) => de_Cluster(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2178,10 +2159,9 @@ const de_DescribeClusterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2201,9 +2181,10 @@ export const de_DescribeFargateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fargateProfile != null) { - contents.fargateProfile = de_FargateProfile(data.fargateProfile, context); - } + const doc = take(data, { + fargateProfile: (_) => de_FargateProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2234,10 +2215,9 @@ const de_DescribeFargateProfileCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2257,9 +2237,10 @@ export const de_DescribeIdentityProviderConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identityProviderConfig != null) { - contents.identityProviderConfig = de_IdentityProviderConfigResponse(data.identityProviderConfig, context); - } + const doc = take(data, { + identityProviderConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2293,10 +2274,9 @@ const de_DescribeIdentityProviderConfigCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2316,9 +2296,10 @@ export const de_DescribeNodegroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nodegroup != null) { - contents.nodegroup = de_Nodegroup(data.nodegroup, context); - } + const doc = take(data, { + nodegroup: (_) => de_Nodegroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2352,10 +2333,9 @@ const de_DescribeNodegroupCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2375,9 +2355,10 @@ export const de_DescribeUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2408,10 +2389,9 @@ const de_DescribeUpdateCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2431,9 +2411,10 @@ export const de_DisassociateIdentityProviderConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2470,10 +2451,9 @@ const de_DisassociateIdentityProviderConfigCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2493,12 +2473,11 @@ export const de_ListAddonsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.addons != null) { - contents.addons = de_StringList(data.addons, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + addons: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2532,10 +2511,9 @@ const de_ListAddonsCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2555,12 +2533,11 @@ export const de_ListClustersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusters != null) { - contents.clusters = de_StringList(data.clusters, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + clusters: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2591,10 +2568,9 @@ const de_ListClustersCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2614,12 +2590,11 @@ export const de_ListFargateProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fargateProfileNames != null) { - contents.fargateProfileNames = de_StringList(data.fargateProfileNames, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + fargateProfileNames: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2650,10 +2625,9 @@ const de_ListFargateProfilesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2673,12 +2647,11 @@ export const de_ListIdentityProviderConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identityProviderConfigs != null) { - contents.identityProviderConfigs = de_IdentityProviderConfigs(data.identityProviderConfigs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + identityProviderConfigs: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2712,10 +2685,9 @@ const de_ListIdentityProviderConfigsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2735,12 +2707,11 @@ export const de_ListNodegroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.nodegroups != null) { - contents.nodegroups = de_StringList(data.nodegroups, context); - } + const doc = take(data, { + nextToken: __expectString, + nodegroups: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2774,10 +2745,9 @@ const de_ListNodegroupsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2797,9 +2767,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2824,10 +2795,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2847,12 +2817,11 @@ export const de_ListUpdatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.updateIds != null) { - contents.updateIds = de_StringList(data.updateIds, context); - } + const doc = take(data, { + nextToken: __expectString, + updateIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2883,10 +2852,9 @@ const de_ListUpdatesCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2906,9 +2874,10 @@ export const de_RegisterClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cluster != null) { - contents.cluster = de_Cluster(data.cluster, context); - } + const doc = take(data, { + cluster: (_) => de_Cluster(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2951,10 +2920,9 @@ const de_RegisterClusterCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2998,10 +2966,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3045,10 +3012,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3068,9 +3034,10 @@ export const de_UpdateAddonCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3107,10 +3074,9 @@ const de_UpdateAddonCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3130,9 +3096,10 @@ export const de_UpdateClusterConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3169,10 +3136,9 @@ const de_UpdateClusterConfigCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3192,9 +3158,10 @@ export const de_UpdateClusterVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3231,10 +3198,9 @@ const de_UpdateClusterVersionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3254,9 +3220,10 @@ export const de_UpdateNodegroupConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3293,10 +3260,9 @@ const de_UpdateNodegroupConfigCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3316,9 +3282,10 @@ export const de_UpdateNodegroupVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.update != null) { - contents.update = de_Update(data.update, context); - } + const doc = take(data, { + update: (_) => de_Update(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3355,16 +3322,15 @@ const de_UpdateNodegroupVersionCommandError = async ( throw await de_ServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3374,9 +3340,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3390,9 +3357,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3406,18 +3374,13 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + addonName: __expectString, + clusterName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3434,21 +3397,14 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.fargateProfileName != null) { - contents.fargateProfileName = __expectString(data.fargateProfileName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + addonName: __expectString, + clusterName: __expectString, + fargateProfileName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3465,18 +3421,13 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + addonName: __expectString, + clusterName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3490,9 +3441,10 @@ const de_InvalidRequestExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3509,18 +3461,13 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + addonName: __expectString, + clusterName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3537,15 +3484,12 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + clusterName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3562,21 +3506,14 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.fargateProfileName != null) { - contents.fargateProfileName = __expectString(data.fargateProfileName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + addonName: __expectString, + clusterName: __expectString, + fargateProfileName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3593,9 +3530,10 @@ const de_ResourcePropagationDelayExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourcePropagationDelayException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3609,18 +3547,13 @@ const de_ResourcePropagationDelayExceptionRes = async ( const de_ServerExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.addonName != null) { - contents.addonName = __expectString(data.addonName); - } - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } + const doc = take(data, { + addonName: __expectString, + clusterName: __expectString, + message: __expectString, + nodegroupName: __expectString, + }); + Object.assign(contents, doc); const exception = new ServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3637,9 +3570,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3656,18 +3590,13 @@ const de_UnsupportedAvailabilityZoneExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.clusterName != null) { - contents.clusterName = __expectString(data.clusterName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nodegroupName != null) { - contents.nodegroupName = __expectString(data.nodegroupName); - } - if (data.validZones != null) { - contents.validZones = de_StringList(data.validZones, context); - } + const doc = take(data, { + clusterName: __expectString, + message: __expectString, + nodegroupName: __expectString, + validZones: _json, + }); + Object.assign(contents, doc); const exception = new UnsupportedAvailabilityZoneException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3675,1147 +3604,298 @@ const de_UnsupportedAvailabilityZoneExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ConnectorConfigRequest - */ -const se_ConnectorConfigRequest = (input: ConnectorConfigRequest, context: __SerdeContext): any => { - return { - ...(input.provider != null && { provider: input.provider }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_ConnectorConfigRequest omitted. -/** - * serializeAws_restJson1ControlPlanePlacementRequest - */ -const se_ControlPlanePlacementRequest = (input: ControlPlanePlacementRequest, context: __SerdeContext): any => { - return { - ...(input.groupName != null && { groupName: input.groupName }), - }; -}; +// se_ControlPlanePlacementRequest omitted. -/** - * serializeAws_restJson1EncryptionConfig - */ -const se_EncryptionConfig = (input: EncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.provider != null && { provider: se_Provider(input.provider, context) }), - ...(input.resources != null && { resources: se_StringList(input.resources, context) }), - }; -}; +// se_EncryptionConfig omitted. -/** - * serializeAws_restJson1EncryptionConfigList - */ -const se_EncryptionConfigList = (input: EncryptionConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EncryptionConfig(entry, context); - }); -}; +// se_EncryptionConfigList omitted. -/** - * serializeAws_restJson1FargateProfileLabel - */ -const se_FargateProfileLabel = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FargateProfileLabel omitted. -/** - * serializeAws_restJson1FargateProfileSelector - */ -const se_FargateProfileSelector = (input: FargateProfileSelector, context: __SerdeContext): any => { - return { - ...(input.labels != null && { labels: se_FargateProfileLabel(input.labels, context) }), - ...(input.namespace != null && { namespace: input.namespace }), - }; -}; +// se_FargateProfileSelector omitted. -/** - * serializeAws_restJson1FargateProfileSelectors - */ -const se_FargateProfileSelectors = (input: FargateProfileSelector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FargateProfileSelector(entry, context); - }); -}; +// se_FargateProfileSelectors omitted. -/** - * serializeAws_restJson1IdentityProviderConfig - */ -const se_IdentityProviderConfig = (input: IdentityProviderConfig, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_IdentityProviderConfig omitted. -/** - * serializeAws_restJson1KubernetesNetworkConfigRequest - */ -const se_KubernetesNetworkConfigRequest = (input: KubernetesNetworkConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ipFamily != null && { ipFamily: input.ipFamily }), - ...(input.serviceIpv4Cidr != null && { serviceIpv4Cidr: input.serviceIpv4Cidr }), - }; -}; +// se_KubernetesNetworkConfigRequest omitted. -/** - * serializeAws_restJson1labelsKeyList - */ -const se_labelsKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_labelsKeyList omitted. -/** - * serializeAws_restJson1labelsMap - */ -const se_labelsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_labelsMap omitted. -/** - * serializeAws_restJson1LaunchTemplateSpecification - */ -const se_LaunchTemplateSpecification = (input: LaunchTemplateSpecification, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_LaunchTemplateSpecification omitted. -/** - * serializeAws_restJson1Logging - */ -const se_Logging = (input: Logging, context: __SerdeContext): any => { - return { - ...(input.clusterLogging != null && { clusterLogging: se_LogSetups(input.clusterLogging, context) }), - }; -}; +// se_Logging omitted. -/** - * serializeAws_restJson1LogSetup - */ -const se_LogSetup = (input: LogSetup, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.types != null && { types: se_LogTypes(input.types, context) }), - }; -}; +// se_LogSetup omitted. -/** - * serializeAws_restJson1LogSetups - */ -const se_LogSetups = (input: LogSetup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LogSetup(entry, context); - }); -}; +// se_LogSetups omitted. -/** - * serializeAws_restJson1LogTypes - */ -const se_LogTypes = (input: (LogType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LogTypes omitted. -/** - * serializeAws_restJson1NodegroupScalingConfig - */ -const se_NodegroupScalingConfig = (input: NodegroupScalingConfig, context: __SerdeContext): any => { - return { - ...(input.desiredSize != null && { desiredSize: input.desiredSize }), - ...(input.maxSize != null && { maxSize: input.maxSize }), - ...(input.minSize != null && { minSize: input.minSize }), - }; -}; +// se_NodegroupScalingConfig omitted. -/** - * serializeAws_restJson1NodegroupUpdateConfig - */ -const se_NodegroupUpdateConfig = (input: NodegroupUpdateConfig, context: __SerdeContext): any => { - return { - ...(input.maxUnavailable != null && { maxUnavailable: input.maxUnavailable }), - ...(input.maxUnavailablePercentage != null && { maxUnavailablePercentage: input.maxUnavailablePercentage }), - }; -}; +// se_NodegroupUpdateConfig omitted. -/** - * serializeAws_restJson1OidcIdentityProviderConfigRequest - */ -const se_OidcIdentityProviderConfigRequest = ( - input: OidcIdentityProviderConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.groupsClaim != null && { groupsClaim: input.groupsClaim }), - ...(input.groupsPrefix != null && { groupsPrefix: input.groupsPrefix }), - ...(input.identityProviderConfigName != null && { identityProviderConfigName: input.identityProviderConfigName }), - ...(input.issuerUrl != null && { issuerUrl: input.issuerUrl }), - ...(input.requiredClaims != null && { requiredClaims: se_requiredClaimsMap(input.requiredClaims, context) }), - ...(input.usernameClaim != null && { usernameClaim: input.usernameClaim }), - ...(input.usernamePrefix != null && { usernamePrefix: input.usernamePrefix }), - }; -}; +// se_OidcIdentityProviderConfigRequest omitted. -/** - * serializeAws_restJson1OutpostConfigRequest - */ -const se_OutpostConfigRequest = (input: OutpostConfigRequest, context: __SerdeContext): any => { - return { - ...(input.controlPlaneInstanceType != null && { controlPlaneInstanceType: input.controlPlaneInstanceType }), - ...(input.controlPlanePlacement != null && { - controlPlanePlacement: se_ControlPlanePlacementRequest(input.controlPlanePlacement, context), - }), - ...(input.outpostArns != null && { outpostArns: se_StringList(input.outpostArns, context) }), - }; -}; +// se_OutpostConfigRequest omitted. -/** - * serializeAws_restJson1Provider - */ -const se_Provider = (input: Provider, context: __SerdeContext): any => { - return { - ...(input.keyArn != null && { keyArn: input.keyArn }), - }; -}; +// se_Provider omitted. -/** - * serializeAws_restJson1RemoteAccessConfig - */ -const se_RemoteAccessConfig = (input: RemoteAccessConfig, context: __SerdeContext): any => { - return { - ...(input.ec2SshKey != null && { ec2SshKey: input.ec2SshKey }), - ...(input.sourceSecurityGroups != null && { - sourceSecurityGroups: se_StringList(input.sourceSecurityGroups, context), - }), - }; -}; +// se_RemoteAccessConfig omitted. -/** - * serializeAws_restJson1requiredClaimsMap - */ -const se_requiredClaimsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_requiredClaimsMap omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1Taint - */ -const se_Taint = (input: Taint, context: __SerdeContext): any => { - return { - ...(input.effect != null && { effect: input.effect }), - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Taint omitted. -/** - * serializeAws_restJson1taintsList - */ -const se_taintsList = (input: Taint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Taint(entry, context); - }); -}; +// se_taintsList omitted. -/** - * serializeAws_restJson1UpdateLabelsPayload - */ -const se_UpdateLabelsPayload = (input: UpdateLabelsPayload, context: __SerdeContext): any => { - return { - ...(input.addOrUpdateLabels != null && { addOrUpdateLabels: se_labelsMap(input.addOrUpdateLabels, context) }), - ...(input.removeLabels != null && { removeLabels: se_labelsKeyList(input.removeLabels, context) }), - }; -}; +// se_UpdateLabelsPayload omitted. -/** - * serializeAws_restJson1UpdateTaintsPayload - */ -const se_UpdateTaintsPayload = (input: UpdateTaintsPayload, context: __SerdeContext): any => { - return { - ...(input.addOrUpdateTaints != null && { addOrUpdateTaints: se_taintsList(input.addOrUpdateTaints, context) }), - ...(input.removeTaints != null && { removeTaints: se_taintsList(input.removeTaints, context) }), - }; -}; +// se_UpdateTaintsPayload omitted. -/** - * serializeAws_restJson1VpcConfigRequest - */ -const se_VpcConfigRequest = (input: VpcConfigRequest, context: __SerdeContext): any => { - return { - ...(input.endpointPrivateAccess != null && { endpointPrivateAccess: input.endpointPrivateAccess }), - ...(input.endpointPublicAccess != null && { endpointPublicAccess: input.endpointPublicAccess }), - ...(input.publicAccessCidrs != null && { publicAccessCidrs: se_StringList(input.publicAccessCidrs, context) }), - ...(input.securityGroupIds != null && { securityGroupIds: se_StringList(input.securityGroupIds, context) }), - ...(input.subnetIds != null && { subnetIds: se_StringList(input.subnetIds, context) }), - }; -}; +// se_VpcConfigRequest omitted. /** * deserializeAws_restJson1Addon */ const de_Addon = (output: any, context: __SerdeContext): Addon => { - return { - addonArn: __expectString(output.addonArn), - addonName: __expectString(output.addonName), - addonVersion: __expectString(output.addonVersion), - clusterName: __expectString(output.clusterName), - configurationValues: __expectString(output.configurationValues), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - health: output.health != null ? de_AddonHealth(output.health, context) : undefined, - marketplaceInformation: - output.marketplaceInformation != null - ? de_MarketplaceInformation(output.marketplaceInformation, context) - : undefined, - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - owner: __expectString(output.owner), - publisher: __expectString(output.publisher), - serviceAccountRoleArn: __expectString(output.serviceAccountRoleArn), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + addonArn: __expectString, + addonName: __expectString, + addonVersion: __expectString, + clusterName: __expectString, + configurationValues: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + health: _json, + marketplaceInformation: _json, + modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + owner: __expectString, + publisher: __expectString, + serviceAccountRoleArn: __expectString, + status: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1AddonHealth - */ -const de_AddonHealth = (output: any, context: __SerdeContext): AddonHealth => { - return { - issues: output.issues != null ? de_AddonIssueList(output.issues, context) : undefined, - } as any; -}; +// de_AddonHealth omitted. -/** - * deserializeAws_restJson1AddonInfo - */ -const de_AddonInfo = (output: any, context: __SerdeContext): AddonInfo => { - return { - addonName: __expectString(output.addonName), - addonVersions: output.addonVersions != null ? de_AddonVersionInfoList(output.addonVersions, context) : undefined, - marketplaceInformation: - output.marketplaceInformation != null - ? de_MarketplaceInformation(output.marketplaceInformation, context) - : undefined, - owner: __expectString(output.owner), - publisher: __expectString(output.publisher), - type: __expectString(output.type), - } as any; -}; +// de_AddonInfo omitted. -/** - * deserializeAws_restJson1AddonIssue - */ -const de_AddonIssue = (output: any, context: __SerdeContext): AddonIssue => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined, - } as any; -}; +// de_AddonIssue omitted. -/** - * deserializeAws_restJson1AddonIssueList - */ -const de_AddonIssueList = (output: any, context: __SerdeContext): AddonIssue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AddonIssue(entry, context); - }); - return retVal; -}; +// de_AddonIssueList omitted. -/** - * deserializeAws_restJson1Addons - */ -const de_Addons = (output: any, context: __SerdeContext): AddonInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AddonInfo(entry, context); - }); - return retVal; -}; +// de_Addons omitted. -/** - * deserializeAws_restJson1AddonVersionInfo - */ -const de_AddonVersionInfo = (output: any, context: __SerdeContext): AddonVersionInfo => { - return { - addonVersion: __expectString(output.addonVersion), - architecture: output.architecture != null ? de_StringList(output.architecture, context) : undefined, - compatibilities: output.compatibilities != null ? de_Compatibilities(output.compatibilities, context) : undefined, - requiresConfiguration: __expectBoolean(output.requiresConfiguration), - } as any; -}; +// de_AddonVersionInfo omitted. -/** - * deserializeAws_restJson1AddonVersionInfoList - */ -const de_AddonVersionInfoList = (output: any, context: __SerdeContext): AddonVersionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AddonVersionInfo(entry, context); - }); - return retVal; -}; +// de_AddonVersionInfoList omitted. -/** - * deserializeAws_restJson1AutoScalingGroup - */ -const de_AutoScalingGroup = (output: any, context: __SerdeContext): AutoScalingGroup => { - return { - name: __expectString(output.name), - } as any; -}; +// de_AutoScalingGroup omitted. -/** - * deserializeAws_restJson1AutoScalingGroupList - */ -const de_AutoScalingGroupList = (output: any, context: __SerdeContext): AutoScalingGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoScalingGroup(entry, context); - }); - return retVal; -}; +// de_AutoScalingGroupList omitted. -/** - * deserializeAws_restJson1Certificate - */ -const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - data: __expectString(output.data), - } as any; -}; +// de_Certificate omitted. /** * deserializeAws_restJson1Cluster */ const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - arn: __expectString(output.arn), - certificateAuthority: - output.certificateAuthority != null ? de_Certificate(output.certificateAuthority, context) : undefined, - clientRequestToken: __expectString(output.clientRequestToken), - connectorConfig: - output.connectorConfig != null ? de_ConnectorConfigResponse(output.connectorConfig, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - encryptionConfig: - output.encryptionConfig != null ? de_EncryptionConfigList(output.encryptionConfig, context) : undefined, - endpoint: __expectString(output.endpoint), - health: output.health != null ? de_ClusterHealth(output.health, context) : undefined, - id: __expectString(output.id), - identity: output.identity != null ? de_Identity(output.identity, context) : undefined, - kubernetesNetworkConfig: - output.kubernetesNetworkConfig != null - ? de_KubernetesNetworkConfigResponse(output.kubernetesNetworkConfig, context) - : undefined, - logging: output.logging != null ? de_Logging(output.logging, context) : undefined, - name: __expectString(output.name), - outpostConfig: output.outpostConfig != null ? de_OutpostConfigResponse(output.outpostConfig, context) : undefined, - platformVersion: __expectString(output.platformVersion), - resourcesVpcConfig: - output.resourcesVpcConfig != null ? de_VpcConfigResponse(output.resourcesVpcConfig, context) : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - version: __expectString(output.version), - } as any; + return take(output, { + arn: __expectString, + certificateAuthority: _json, + clientRequestToken: __expectString, + connectorConfig: (_: any) => de_ConnectorConfigResponse(_, context), + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionConfig: _json, + endpoint: __expectString, + health: _json, + id: __expectString, + identity: _json, + kubernetesNetworkConfig: _json, + logging: _json, + name: __expectString, + outpostConfig: _json, + platformVersion: __expectString, + resourcesVpcConfig: _json, + roleArn: __expectString, + status: __expectString, + tags: _json, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ClusterHealth - */ -const de_ClusterHealth = (output: any, context: __SerdeContext): ClusterHealth => { - return { - issues: output.issues != null ? de_ClusterIssueList(output.issues, context) : undefined, - } as any; -}; +// de_ClusterHealth omitted. -/** - * deserializeAws_restJson1ClusterIssue - */ -const de_ClusterIssue = (output: any, context: __SerdeContext): ClusterIssue => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined, - } as any; -}; +// de_ClusterIssue omitted. -/** - * deserializeAws_restJson1ClusterIssueList - */ -const de_ClusterIssueList = (output: any, context: __SerdeContext): ClusterIssue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterIssue(entry, context); - }); - return retVal; -}; +// de_ClusterIssueList omitted. -/** - * deserializeAws_restJson1Compatibilities - */ -const de_Compatibilities = (output: any, context: __SerdeContext): Compatibility[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Compatibility(entry, context); - }); - return retVal; -}; +// de_Compatibilities omitted. -/** - * deserializeAws_restJson1Compatibility - */ -const de_Compatibility = (output: any, context: __SerdeContext): Compatibility => { - return { - clusterVersion: __expectString(output.clusterVersion), - defaultVersion: __expectBoolean(output.defaultVersion), - platformVersions: output.platformVersions != null ? de_StringList(output.platformVersions, context) : undefined, - } as any; -}; +// de_Compatibility omitted. /** * deserializeAws_restJson1ConnectorConfigResponse */ const de_ConnectorConfigResponse = (output: any, context: __SerdeContext): ConnectorConfigResponse => { - return { - activationCode: __expectString(output.activationCode), - activationExpiry: - output.activationExpiry != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.activationExpiry))) - : undefined, - activationId: __expectString(output.activationId), - provider: __expectString(output.provider), - roleArn: __expectString(output.roleArn), - } as any; + return take(output, { + activationCode: __expectString, + activationExpiry: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + activationId: __expectString, + provider: __expectString, + roleArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ControlPlanePlacementResponse - */ -const de_ControlPlanePlacementResponse = (output: any, context: __SerdeContext): ControlPlanePlacementResponse => { - return { - groupName: __expectString(output.groupName), - } as any; -}; +// de_ControlPlanePlacementResponse omitted. -/** - * deserializeAws_restJson1EncryptionConfig - */ -const de_EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => { - return { - provider: output.provider != null ? de_Provider(output.provider, context) : undefined, - resources: output.resources != null ? de_StringList(output.resources, context) : undefined, - } as any; -}; +// de_EncryptionConfig omitted. -/** - * deserializeAws_restJson1EncryptionConfigList - */ -const de_EncryptionConfigList = (output: any, context: __SerdeContext): EncryptionConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EncryptionConfig(entry, context); - }); - return retVal; -}; +// de_EncryptionConfigList omitted. -/** - * deserializeAws_restJson1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined, - } as any; -}; +// de_ErrorDetail omitted. -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorDetail(entry, context); - }); - return retVal; -}; +// de_ErrorDetails omitted. /** * deserializeAws_restJson1FargateProfile */ const de_FargateProfile = (output: any, context: __SerdeContext): FargateProfile => { - return { - clusterName: __expectString(output.clusterName), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - fargateProfileArn: __expectString(output.fargateProfileArn), - fargateProfileName: __expectString(output.fargateProfileName), - podExecutionRoleArn: __expectString(output.podExecutionRoleArn), - selectors: output.selectors != null ? de_FargateProfileSelectors(output.selectors, context) : undefined, - status: __expectString(output.status), - subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + clusterName: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fargateProfileArn: __expectString, + fargateProfileName: __expectString, + podExecutionRoleArn: __expectString, + selectors: _json, + status: __expectString, + subnets: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1FargateProfileLabel - */ -const de_FargateProfileLabel = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FargateProfileLabel omitted. -/** - * deserializeAws_restJson1FargateProfileSelector - */ -const de_FargateProfileSelector = (output: any, context: __SerdeContext): FargateProfileSelector => { - return { - labels: output.labels != null ? de_FargateProfileLabel(output.labels, context) : undefined, - namespace: __expectString(output.namespace), - } as any; -}; +// de_FargateProfileSelector omitted. -/** - * deserializeAws_restJson1FargateProfileSelectors - */ -const de_FargateProfileSelectors = (output: any, context: __SerdeContext): FargateProfileSelector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FargateProfileSelector(entry, context); - }); - return retVal; -}; +// de_FargateProfileSelectors omitted. -/** - * deserializeAws_restJson1Identity - */ -const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - oidc: output.oidc != null ? de_OIDC(output.oidc, context) : undefined, - } as any; -}; +// de_Identity omitted. -/** - * deserializeAws_restJson1IdentityProviderConfig - */ -const de_IdentityProviderConfig = (output: any, context: __SerdeContext): IdentityProviderConfig => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_IdentityProviderConfig omitted. -/** - * deserializeAws_restJson1IdentityProviderConfigResponse - */ -const de_IdentityProviderConfigResponse = (output: any, context: __SerdeContext): IdentityProviderConfigResponse => { - return { - oidc: output.oidc != null ? de_OidcIdentityProviderConfig(output.oidc, context) : undefined, - } as any; -}; +// de_IdentityProviderConfigResponse omitted. -/** - * deserializeAws_restJson1IdentityProviderConfigs - */ -const de_IdentityProviderConfigs = (output: any, context: __SerdeContext): IdentityProviderConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdentityProviderConfig(entry, context); - }); - return retVal; -}; +// de_IdentityProviderConfigs omitted. -/** - * deserializeAws_restJson1Issue - */ -const de_Issue = (output: any, context: __SerdeContext): Issue => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - resourceIds: output.resourceIds != null ? de_StringList(output.resourceIds, context) : undefined, - } as any; -}; +// de_Issue omitted. -/** - * deserializeAws_restJson1IssueList - */ -const de_IssueList = (output: any, context: __SerdeContext): Issue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Issue(entry, context); - }); - return retVal; -}; +// de_IssueList omitted. -/** - * deserializeAws_restJson1KubernetesNetworkConfigResponse - */ -const de_KubernetesNetworkConfigResponse = (output: any, context: __SerdeContext): KubernetesNetworkConfigResponse => { - return { - ipFamily: __expectString(output.ipFamily), - serviceIpv4Cidr: __expectString(output.serviceIpv4Cidr), - serviceIpv6Cidr: __expectString(output.serviceIpv6Cidr), - } as any; -}; +// de_KubernetesNetworkConfigResponse omitted. -/** - * deserializeAws_restJson1labelsMap - */ -const de_labelsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_labelsMap omitted. -/** - * deserializeAws_restJson1LaunchTemplateSpecification - */ -const de_LaunchTemplateSpecification = (output: any, context: __SerdeContext): LaunchTemplateSpecification => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; +// de_LaunchTemplateSpecification omitted. -/** - * deserializeAws_restJson1Logging - */ -const de_Logging = (output: any, context: __SerdeContext): Logging => { - return { - clusterLogging: output.clusterLogging != null ? de_LogSetups(output.clusterLogging, context) : undefined, - } as any; -}; +// de_Logging omitted. -/** - * deserializeAws_restJson1LogSetup - */ -const de_LogSetup = (output: any, context: __SerdeContext): LogSetup => { - return { - enabled: __expectBoolean(output.enabled), - types: output.types != null ? de_LogTypes(output.types, context) : undefined, - } as any; -}; +// de_LogSetup omitted. -/** - * deserializeAws_restJson1LogSetups - */ -const de_LogSetups = (output: any, context: __SerdeContext): LogSetup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogSetup(entry, context); - }); - return retVal; -}; +// de_LogSetups omitted. -/** - * deserializeAws_restJson1LogTypes - */ -const de_LogTypes = (output: any, context: __SerdeContext): (LogType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LogTypes omitted. -/** - * deserializeAws_restJson1MarketplaceInformation - */ -const de_MarketplaceInformation = (output: any, context: __SerdeContext): MarketplaceInformation => { - return { - productId: __expectString(output.productId), - productUrl: __expectString(output.productUrl), - } as any; -}; +// de_MarketplaceInformation omitted. /** * deserializeAws_restJson1Nodegroup */ const de_Nodegroup = (output: any, context: __SerdeContext): Nodegroup => { - return { - amiType: __expectString(output.amiType), - capacityType: __expectString(output.capacityType), - clusterName: __expectString(output.clusterName), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - diskSize: __expectInt32(output.diskSize), - health: output.health != null ? de_NodegroupHealth(output.health, context) : undefined, - instanceTypes: output.instanceTypes != null ? de_StringList(output.instanceTypes, context) : undefined, - labels: output.labels != null ? de_labelsMap(output.labels, context) : undefined, - launchTemplate: - output.launchTemplate != null ? de_LaunchTemplateSpecification(output.launchTemplate, context) : undefined, - modifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - nodeRole: __expectString(output.nodeRole), - nodegroupArn: __expectString(output.nodegroupArn), - nodegroupName: __expectString(output.nodegroupName), - releaseVersion: __expectString(output.releaseVersion), - remoteAccess: output.remoteAccess != null ? de_RemoteAccessConfig(output.remoteAccess, context) : undefined, - resources: output.resources != null ? de_NodegroupResources(output.resources, context) : undefined, - scalingConfig: output.scalingConfig != null ? de_NodegroupScalingConfig(output.scalingConfig, context) : undefined, - status: __expectString(output.status), - subnets: output.subnets != null ? de_StringList(output.subnets, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - taints: output.taints != null ? de_taintsList(output.taints, context) : undefined, - updateConfig: output.updateConfig != null ? de_NodegroupUpdateConfig(output.updateConfig, context) : undefined, - version: __expectString(output.version), - } as any; + return take(output, { + amiType: __expectString, + capacityType: __expectString, + clusterName: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + diskSize: __expectInt32, + health: _json, + instanceTypes: _json, + labels: _json, + launchTemplate: _json, + modifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + nodeRole: __expectString, + nodegroupArn: __expectString, + nodegroupName: __expectString, + releaseVersion: __expectString, + remoteAccess: _json, + resources: _json, + scalingConfig: _json, + status: __expectString, + subnets: _json, + tags: _json, + taints: _json, + updateConfig: _json, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1NodegroupHealth - */ -const de_NodegroupHealth = (output: any, context: __SerdeContext): NodegroupHealth => { - return { - issues: output.issues != null ? de_IssueList(output.issues, context) : undefined, - } as any; -}; +// de_NodegroupHealth omitted. -/** - * deserializeAws_restJson1NodegroupResources - */ -const de_NodegroupResources = (output: any, context: __SerdeContext): NodegroupResources => { - return { - autoScalingGroups: - output.autoScalingGroups != null ? de_AutoScalingGroupList(output.autoScalingGroups, context) : undefined, - remoteAccessSecurityGroup: __expectString(output.remoteAccessSecurityGroup), - } as any; -}; +// de_NodegroupResources omitted. -/** - * deserializeAws_restJson1NodegroupScalingConfig - */ -const de_NodegroupScalingConfig = (output: any, context: __SerdeContext): NodegroupScalingConfig => { - return { - desiredSize: __expectInt32(output.desiredSize), - maxSize: __expectInt32(output.maxSize), - minSize: __expectInt32(output.minSize), - } as any; -}; +// de_NodegroupScalingConfig omitted. -/** - * deserializeAws_restJson1NodegroupUpdateConfig - */ -const de_NodegroupUpdateConfig = (output: any, context: __SerdeContext): NodegroupUpdateConfig => { - return { - maxUnavailable: __expectInt32(output.maxUnavailable), - maxUnavailablePercentage: __expectInt32(output.maxUnavailablePercentage), - } as any; -}; +// de_NodegroupUpdateConfig omitted. -/** - * deserializeAws_restJson1OIDC - */ -const de_OIDC = (output: any, context: __SerdeContext): OIDC => { - return { - issuer: __expectString(output.issuer), - } as any; -}; +// de_OIDC omitted. -/** - * deserializeAws_restJson1OidcIdentityProviderConfig - */ -const de_OidcIdentityProviderConfig = (output: any, context: __SerdeContext): OidcIdentityProviderConfig => { - return { - clientId: __expectString(output.clientId), - clusterName: __expectString(output.clusterName), - groupsClaim: __expectString(output.groupsClaim), - groupsPrefix: __expectString(output.groupsPrefix), - identityProviderConfigArn: __expectString(output.identityProviderConfigArn), - identityProviderConfigName: __expectString(output.identityProviderConfigName), - issuerUrl: __expectString(output.issuerUrl), - requiredClaims: output.requiredClaims != null ? de_requiredClaimsMap(output.requiredClaims, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - usernameClaim: __expectString(output.usernameClaim), - usernamePrefix: __expectString(output.usernamePrefix), - } as any; -}; +// de_OidcIdentityProviderConfig omitted. -/** - * deserializeAws_restJson1OutpostConfigResponse - */ -const de_OutpostConfigResponse = (output: any, context: __SerdeContext): OutpostConfigResponse => { - return { - controlPlaneInstanceType: __expectString(output.controlPlaneInstanceType), - controlPlanePlacement: - output.controlPlanePlacement != null - ? de_ControlPlanePlacementResponse(output.controlPlanePlacement, context) - : undefined, - outpostArns: output.outpostArns != null ? de_StringList(output.outpostArns, context) : undefined, - } as any; -}; +// de_OutpostConfigResponse omitted. -/** - * deserializeAws_restJson1Provider - */ -const de_Provider = (output: any, context: __SerdeContext): Provider => { - return { - keyArn: __expectString(output.keyArn), - } as any; -}; +// de_Provider omitted. -/** - * deserializeAws_restJson1RemoteAccessConfig - */ -const de_RemoteAccessConfig = (output: any, context: __SerdeContext): RemoteAccessConfig => { - return { - ec2SshKey: __expectString(output.ec2SshKey), - sourceSecurityGroups: - output.sourceSecurityGroups != null ? de_StringList(output.sourceSecurityGroups, context) : undefined, - } as any; -}; +// de_RemoteAccessConfig omitted. -/** - * deserializeAws_restJson1requiredClaimsMap - */ -const de_requiredClaimsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_requiredClaimsMap omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Taint - */ -const de_Taint = (output: any, context: __SerdeContext): Taint => { - return { - effect: __expectString(output.effect), - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Taint omitted. -/** - * deserializeAws_restJson1taintsList - */ -const de_taintsList = (output: any, context: __SerdeContext): Taint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Taint(entry, context); - }); - return retVal; -}; +// de_taintsList omitted. /** * deserializeAws_restJson1Update */ const de_Update = (output: any, context: __SerdeContext): Update => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - errors: output.errors != null ? de_ErrorDetails(output.errors, context) : undefined, - id: __expectString(output.id), - params: output.params != null ? de_UpdateParams(output.params, context) : undefined, - status: __expectString(output.status), - type: __expectString(output.type), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errors: _json, + id: __expectString, + params: _json, + status: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1UpdateParam - */ -const de_UpdateParam = (output: any, context: __SerdeContext): UpdateParam => { - return { - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// de_UpdateParam omitted. -/** - * deserializeAws_restJson1UpdateParams - */ -const de_UpdateParams = (output: any, context: __SerdeContext): UpdateParam[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateParam(entry, context); - }); - return retVal; -}; +// de_UpdateParams omitted. -/** - * deserializeAws_restJson1VpcConfigResponse - */ -const de_VpcConfigResponse = (output: any, context: __SerdeContext): VpcConfigResponse => { - return { - clusterSecurityGroupId: __expectString(output.clusterSecurityGroupId), - endpointPrivateAccess: __expectBoolean(output.endpointPrivateAccess), - endpointPublicAccess: __expectBoolean(output.endpointPublicAccess), - publicAccessCidrs: output.publicAccessCidrs != null ? de_StringList(output.publicAccessCidrs, context) : undefined, - securityGroupIds: output.securityGroupIds != null ? de_StringList(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_StringList(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcConfigResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-elastic-beanstalk/src/protocols/Aws_query.ts b/clients/client-elastic-beanstalk/src/protocols/Aws_query.ts index a77a9cf5d454..0a24fb7a19b7 100644 --- a/clients/client-elastic-beanstalk/src/protocols/Aws_query.ts +++ b/clients/client-elastic-beanstalk/src/protocols/Aws_query.ts @@ -12,7 +12,7 @@ import { strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1144,7 +1144,7 @@ export const de_AbortEnvironmentUpdateCommand = async ( const response: AbortEnvironmentUpdateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1165,10 +1165,9 @@ const de_AbortEnvironmentUpdateCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1191,7 +1190,7 @@ export const de_ApplyEnvironmentManagedActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1215,10 +1214,9 @@ const de_ApplyEnvironmentManagedActionCommandError = async ( throw await de_ManagedActionInvalidStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1238,7 +1236,7 @@ export const de_AssociateEnvironmentOperationsRoleCommand = async ( const response: AssociateEnvironmentOperationsRoleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1259,10 +1257,9 @@ const de_AssociateEnvironmentOperationsRoleCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1285,7 +1282,7 @@ export const de_CheckDNSAvailabilityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1301,10 +1298,9 @@ const de_CheckDNSAvailabilityCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1326,7 +1322,7 @@ export const de_ComposeEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1350,10 +1346,9 @@ const de_ComposeEnvironmentsCommandError = async ( throw await de_TooManyEnvironmentsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1376,7 +1371,7 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1397,10 +1392,9 @@ const de_CreateApplicationCommandError = async ( throw await de_TooManyApplicationsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1423,7 +1417,7 @@ export const de_CreateApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1456,10 +1450,9 @@ const de_CreateApplicationVersionCommandError = async ( throw await de_TooManyApplicationsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1482,7 +1475,7 @@ export const de_CreateConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1509,10 +1502,9 @@ const de_CreateConfigurationTemplateCommandError = async ( throw await de_TooManyConfigurationTemplatesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1535,7 +1527,7 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1559,10 +1551,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_TooManyEnvironmentsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1585,7 +1576,7 @@ export const de_CreatePlatformVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1612,10 +1603,9 @@ const de_CreatePlatformVersionCommandError = async ( throw await de_TooManyPlatformsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1638,7 +1628,7 @@ export const de_CreateStorageLocationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1665,10 +1655,9 @@ const de_CreateStorageLocationCommandError = async ( throw await de_TooManyBucketsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1688,7 +1677,7 @@ export const de_DeleteApplicationCommand = async ( const response: DeleteApplicationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1709,10 +1698,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_OperationInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1732,7 +1720,7 @@ export const de_DeleteApplicationVersionCommand = async ( const response: DeleteApplicationVersionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1762,10 +1750,9 @@ const de_DeleteApplicationVersionCommandError = async ( throw await de_SourceBundleDeletionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1785,7 +1772,7 @@ export const de_DeleteConfigurationTemplateCommand = async ( const response: DeleteConfigurationTemplateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1806,10 +1793,9 @@ const de_DeleteConfigurationTemplateCommandError = async ( throw await de_OperationInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1829,7 +1815,7 @@ export const de_DeleteEnvironmentConfigurationCommand = async ( const response: DeleteEnvironmentConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1845,10 +1831,9 @@ const de_DeleteEnvironmentConfigurationCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1870,7 +1855,7 @@ export const de_DeletePlatformVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1900,10 +1885,9 @@ const de_DeletePlatformVersionCommandError = async ( throw await de_PlatformVersionStillReferencedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1926,7 +1910,7 @@ export const de_DescribeAccountAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1947,10 +1931,9 @@ const de_DescribeAccountAttributesCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1973,7 +1956,7 @@ export const de_DescribeApplicationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1989,10 +1972,9 @@ const de_DescribeApplicationsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2014,7 +1996,7 @@ export const de_DescribeApplicationVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2030,10 +2012,9 @@ const de_DescribeApplicationVersionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2055,7 +2036,7 @@ export const de_DescribeConfigurationOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2076,10 +2057,9 @@ const de_DescribeConfigurationOptionsCommandError = async ( throw await de_TooManyBucketsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2102,7 +2082,7 @@ export const de_DescribeConfigurationSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2123,10 +2103,9 @@ const de_DescribeConfigurationSettingsCommandError = async ( throw await de_TooManyBucketsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2149,7 +2128,7 @@ export const de_DescribeEnvironmentHealthCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2173,10 +2152,9 @@ const de_DescribeEnvironmentHealthCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2202,7 +2180,7 @@ export const de_DescribeEnvironmentManagedActionHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2223,10 +2201,9 @@ const de_DescribeEnvironmentManagedActionHistoryCommandError = async ( throw await de_ElasticBeanstalkServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2249,7 +2226,7 @@ export const de_DescribeEnvironmentManagedActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2270,10 +2247,9 @@ const de_DescribeEnvironmentManagedActionsCommandError = async ( throw await de_ElasticBeanstalkServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2296,7 +2272,7 @@ export const de_DescribeEnvironmentResourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2317,10 +2293,9 @@ const de_DescribeEnvironmentResourcesCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2343,7 +2318,7 @@ export const de_DescribeEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2359,10 +2334,9 @@ const de_DescribeEnvironmentsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2384,7 +2358,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2400,10 +2374,9 @@ const de_DescribeEventsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2425,7 +2398,7 @@ export const de_DescribeInstancesHealthCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2449,10 +2422,9 @@ const de_DescribeInstancesHealthCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2475,7 +2447,7 @@ export const de_DescribePlatformVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2499,10 +2471,9 @@ const de_DescribePlatformVersionCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2522,7 +2493,7 @@ export const de_DisassociateEnvironmentOperationsRoleCommand = async ( const response: DisassociateEnvironmentOperationsRoleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2543,10 +2514,9 @@ const de_DisassociateEnvironmentOperationsRoleCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2569,7 +2539,7 @@ export const de_ListAvailableSolutionStacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2585,10 +2555,9 @@ const de_ListAvailableSolutionStacksCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2610,7 +2579,7 @@ export const de_ListPlatformBranchesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2626,10 +2595,9 @@ const de_ListPlatformBranchesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2651,7 +2619,7 @@ export const de_ListPlatformVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2675,10 +2643,9 @@ const de_ListPlatformVersionsCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2701,7 +2668,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2728,10 +2695,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceTypeNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2751,7 +2717,7 @@ export const de_RebuildEnvironmentCommand = async ( const response: RebuildEnvironmentCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2772,10 +2738,9 @@ const de_RebuildEnvironmentCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2795,7 +2760,7 @@ export const de_RequestEnvironmentInfoCommand = async ( const response: RequestEnvironmentInfoCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2811,10 +2776,9 @@ const de_RequestEnvironmentInfoCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2833,7 +2797,7 @@ export const de_RestartAppServerCommand = async ( const response: RestartAppServerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2849,10 +2813,9 @@ const de_RestartAppServerCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2874,7 +2837,7 @@ export const de_RetrieveEnvironmentInfoCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2890,10 +2853,9 @@ const de_RetrieveEnvironmentInfoCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2912,7 +2874,7 @@ export const de_SwapEnvironmentCNAMEsCommand = async ( const response: SwapEnvironmentCNAMEsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2928,10 +2890,9 @@ const de_SwapEnvironmentCNAMEsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2953,7 +2914,7 @@ export const de_TerminateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2974,10 +2935,9 @@ const de_TerminateEnvironmentCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3000,7 +2960,7 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3016,10 +2976,9 @@ const de_UpdateApplicationCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3041,7 +3000,7 @@ export const de_UpdateApplicationResourceLifecycleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3062,10 +3021,9 @@ const de_UpdateApplicationResourceLifecycleCommandError = async ( throw await de_InsufficientPrivilegesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3088,7 +3046,7 @@ export const de_UpdateApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3104,10 +3062,9 @@ const de_UpdateApplicationVersionCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3129,7 +3086,7 @@ export const de_UpdateConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3153,10 +3110,9 @@ const de_UpdateConfigurationTemplateCommandError = async ( throw await de_TooManyBucketsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3179,7 +3135,7 @@ export const de_UpdateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3203,10 +3159,9 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_TooManyBucketsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3226,7 +3181,7 @@ export const de_UpdateTagsForResourceCommand = async ( const response: UpdateTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3259,10 +3214,9 @@ const de_UpdateTagsForResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3285,7 +3239,7 @@ export const de_ValidateConfigurationSettingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3309,10 +3263,9 @@ const de_ValidateConfigurationSettingsCommandError = async ( throw await de_TooManyBucketsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7681,6 +7634,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-elastic-inference/src/protocols/Aws_restJson1.ts b/clients/client-elastic-inference/src/protocols/Aws_restJson1.ts index e3ca94246c07..c46fc2d1d85f 100644 --- a/clients/client-elastic-inference/src/protocols/Aws_restJson1.ts +++ b/clients/client-elastic-inference/src/protocols/Aws_restJson1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -36,18 +37,7 @@ import { import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { ElasticInferenceServiceException as __BaseException } from "../models/ElasticInferenceServiceException"; -import { - AcceleratorType, - AcceleratorTypeOffering, - BadRequestException, - ElasticInferenceAccelerator, - ElasticInferenceAcceleratorHealth, - Filter, - InternalServerException, - KeyValuePair, - MemoryInfo, - ResourceNotFoundException, -} from "../models/models_0"; +import { BadRequestException, Filter, InternalServerException, ResourceNotFoundException } from "../models/models_0"; /** * serializeAws_restJson1DescribeAcceleratorOfferingsCommand @@ -63,12 +53,12 @@ export const se_DescribeAcceleratorOfferingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-accelerator-offerings"; let body: any; - body = JSON.stringify({ - ...(input.acceleratorTypes != null && { - acceleratorTypes: se_AcceleratorTypeNameList(input.acceleratorTypes, context), - }), - ...(input.locationType != null && { locationType: input.locationType }), - }); + body = JSON.stringify( + take(input, { + acceleratorTypes: (_) => _json(_), + locationType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -93,12 +83,14 @@ export const se_DescribeAcceleratorsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-accelerators"; let body: any; - body = JSON.stringify({ - ...(input.acceleratorIds != null && { acceleratorIds: se_AcceleratorIdList(input.acceleratorIds, context) }), - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + acceleratorIds: (_) => _json(_), + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -173,9 +165,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -231,9 +225,10 @@ export const de_DescribeAcceleratorOfferingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.acceleratorTypeOfferings != null) { - contents.acceleratorTypeOfferings = de_AcceleratorTypeOfferingList(data.acceleratorTypeOfferings, context); - } + const doc = take(data, { + acceleratorTypeOfferings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -261,10 +256,9 @@ const de_DescribeAcceleratorOfferingsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -284,12 +278,11 @@ export const de_DescribeAcceleratorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.acceleratorSet != null) { - contents.acceleratorSet = de_ElasticInferenceAcceleratorSet(data.acceleratorSet, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + acceleratorSet: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -317,10 +310,9 @@ const de_DescribeAcceleratorsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -340,9 +332,10 @@ export const de_DescribeAcceleratorTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.acceleratorTypes != null) { - contents.acceleratorTypes = de_AcceleratorTypeList(data.acceleratorTypes, context); - } + const doc = take(data, { + acceleratorTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -364,10 +357,9 @@ const de_DescribeAcceleratorTypesCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -387,9 +379,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -417,10 +410,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -467,10 +459,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -517,25 +508,25 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -552,9 +543,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -571,9 +563,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -581,214 +574,39 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AcceleratorIdList - */ -const se_AcceleratorIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AcceleratorIdList omitted. -/** - * serializeAws_restJson1AcceleratorTypeNameList - */ -const se_AcceleratorTypeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AcceleratorTypeNameList omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_ValueStringList(input.values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1ValueStringList - */ -const se_ValueStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ValueStringList omitted. -/** - * deserializeAws_restJson1AcceleratorType - */ -const de_AcceleratorType = (output: any, context: __SerdeContext): AcceleratorType => { - return { - acceleratorTypeName: __expectString(output.acceleratorTypeName), - memoryInfo: output.memoryInfo != null ? de_MemoryInfo(output.memoryInfo, context) : undefined, - throughputInfo: output.throughputInfo != null ? de_ThroughputInfoList(output.throughputInfo, context) : undefined, - } as any; -}; +// de_AcceleratorType omitted. -/** - * deserializeAws_restJson1AcceleratorTypeList - */ -const de_AcceleratorTypeList = (output: any, context: __SerdeContext): AcceleratorType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AcceleratorType(entry, context); - }); - return retVal; -}; +// de_AcceleratorTypeList omitted. -/** - * deserializeAws_restJson1AcceleratorTypeOffering - */ -const de_AcceleratorTypeOffering = (output: any, context: __SerdeContext): AcceleratorTypeOffering => { - return { - acceleratorType: __expectString(output.acceleratorType), - location: __expectString(output.location), - locationType: __expectString(output.locationType), - } as any; -}; +// de_AcceleratorTypeOffering omitted. -/** - * deserializeAws_restJson1AcceleratorTypeOfferingList - */ -const de_AcceleratorTypeOfferingList = (output: any, context: __SerdeContext): AcceleratorTypeOffering[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AcceleratorTypeOffering(entry, context); - }); - return retVal; -}; +// de_AcceleratorTypeOfferingList omitted. -/** - * deserializeAws_restJson1ElasticInferenceAccelerator - */ -const de_ElasticInferenceAccelerator = (output: any, context: __SerdeContext): ElasticInferenceAccelerator => { - return { - acceleratorHealth: - output.acceleratorHealth != null - ? de_ElasticInferenceAcceleratorHealth(output.acceleratorHealth, context) - : undefined, - acceleratorId: __expectString(output.acceleratorId), - acceleratorType: __expectString(output.acceleratorType), - attachedResource: __expectString(output.attachedResource), - availabilityZone: __expectString(output.availabilityZone), - } as any; -}; +// de_ElasticInferenceAccelerator omitted. -/** - * deserializeAws_restJson1ElasticInferenceAcceleratorHealth - */ -const de_ElasticInferenceAcceleratorHealth = ( - output: any, - context: __SerdeContext -): ElasticInferenceAcceleratorHealth => { - return { - status: __expectString(output.status), - } as any; -}; +// de_ElasticInferenceAcceleratorHealth omitted. -/** - * deserializeAws_restJson1ElasticInferenceAcceleratorSet - */ -const de_ElasticInferenceAcceleratorSet = (output: any, context: __SerdeContext): ElasticInferenceAccelerator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ElasticInferenceAccelerator(entry, context); - }); - return retVal; -}; +// de_ElasticInferenceAcceleratorSet omitted. -/** - * deserializeAws_restJson1KeyValuePair - */ -const de_KeyValuePair = (output: any, context: __SerdeContext): KeyValuePair => { - return { - key: __expectString(output.key), - value: __expectInt32(output.value), - } as any; -}; +// de_KeyValuePair omitted. -/** - * deserializeAws_restJson1MemoryInfo - */ -const de_MemoryInfo = (output: any, context: __SerdeContext): MemoryInfo => { - return { - sizeInMiB: __expectInt32(output.sizeInMiB), - } as any; -}; +// de_MemoryInfo omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ThroughputInfoList - */ -const de_ThroughputInfoList = (output: any, context: __SerdeContext): KeyValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValuePair(entry, context); - }); - return retVal; -}; +// de_ThroughputInfoList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts b/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts index 9c0f97b416f2..72ecba2833fd 100644 --- a/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts +++ b/clients/client-elastic-load-balancing-v2/src/protocols/Aws_query.ts @@ -11,7 +11,7 @@ import { parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -832,7 +832,7 @@ export const de_AddListenerCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -859,10 +859,9 @@ const de_AddListenerCertificatesCommandError = async ( throw await de_TooManyCertificatesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -885,7 +884,7 @@ export const de_AddTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -921,10 +920,9 @@ const de_AddTagsCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -947,7 +945,7 @@ export const de_CreateListenerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1019,10 +1017,9 @@ const de_CreateListenerCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1045,7 +1042,7 @@ export const de_CreateLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1102,10 +1099,9 @@ const de_CreateLoadBalancerCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1128,7 +1124,7 @@ export const de_CreateRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1191,10 +1187,9 @@ const de_CreateRuleCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1217,7 +1212,7 @@ export const de_CreateTargetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1247,10 +1242,9 @@ const de_CreateTargetGroupCommandError = async ( throw await de_TooManyTargetGroupsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,7 +1267,7 @@ export const de_DeleteListenerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1297,10 +1291,9 @@ const de_DeleteListenerCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1323,7 +1316,7 @@ export const de_DeleteLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1350,10 +1343,9 @@ const de_DeleteLoadBalancerCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1376,7 +1368,7 @@ export const de_DeleteRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1400,10 +1392,9 @@ const de_DeleteRuleCommandError = async ( throw await de_RuleNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1426,7 +1417,7 @@ export const de_DeleteTargetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1447,10 +1438,9 @@ const de_DeleteTargetGroupCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1473,7 +1463,7 @@ export const de_DeregisterTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1497,10 +1487,9 @@ const de_DeregisterTargetsCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1523,7 +1512,7 @@ export const de_DescribeAccountLimitsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1539,10 +1528,9 @@ const de_DescribeAccountLimitsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1564,7 +1552,7 @@ export const de_DescribeListenerCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1585,10 +1573,9 @@ const de_DescribeListenerCertificatesCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1611,7 +1598,7 @@ export const de_DescribeListenersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1638,10 +1625,9 @@ const de_DescribeListenersCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1664,7 +1650,7 @@ export const de_DescribeLoadBalancerAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1685,10 +1671,9 @@ const de_DescribeLoadBalancerAttributesCommandError = async ( throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1711,7 +1696,7 @@ export const de_DescribeLoadBalancersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1732,10 +1717,9 @@ const de_DescribeLoadBalancersCommandError = async ( throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1758,7 +1742,7 @@ export const de_DescribeRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1785,10 +1769,9 @@ const de_DescribeRulesCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1811,7 +1794,7 @@ export const de_DescribeSSLPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1832,10 +1815,9 @@ const de_DescribeSSLPoliciesCommandError = async ( throw await de_SSLPolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1858,7 +1840,7 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1888,10 +1870,9 @@ const de_DescribeTagsCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1914,7 +1895,7 @@ export const de_DescribeTargetGroupAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1935,10 +1916,9 @@ const de_DescribeTargetGroupAttributesCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1961,7 +1941,7 @@ export const de_DescribeTargetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1985,10 +1965,9 @@ const de_DescribeTargetGroupsCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2011,7 +1990,7 @@ export const de_DescribeTargetHealthCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2038,10 +2017,9 @@ const de_DescribeTargetHealthCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2064,7 +2042,7 @@ export const de_ModifyListenerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2133,10 +2111,9 @@ const de_ModifyListenerCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2159,7 +2136,7 @@ export const de_ModifyLoadBalancerAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2183,10 +2160,9 @@ const de_ModifyLoadBalancerAttributesCommandError = async ( throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2209,7 +2185,7 @@ export const de_ModifyRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2260,10 +2236,9 @@ const de_ModifyRuleCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2286,7 +2261,7 @@ export const de_ModifyTargetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2310,10 +2285,9 @@ const de_ModifyTargetGroupCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2336,7 +2310,7 @@ export const de_ModifyTargetGroupAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2360,10 +2334,9 @@ const de_ModifyTargetGroupAttributesCommandError = async ( throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2386,7 +2359,7 @@ export const de_RegisterTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2416,10 +2389,9 @@ const de_RegisterTargetsCommandError = async ( throw await de_TooManyTargetsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2442,7 +2414,7 @@ export const de_RemoveListenerCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2466,10 +2438,9 @@ const de_RemoveListenerCertificatesCommandError = async ( throw await de_OperationNotPermittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2492,7 +2463,7 @@ export const de_RemoveTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2525,10 +2496,9 @@ const de_RemoveTagsCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2551,7 +2521,7 @@ export const de_SetIpAddressTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2578,10 +2548,9 @@ const de_SetIpAddressTypeCommandError = async ( throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2604,7 +2573,7 @@ export const de_SetRulePrioritiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2631,10 +2600,9 @@ const de_SetRulePrioritiesCommandError = async ( throw await de_RuleNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2657,7 +2625,7 @@ export const de_SetSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2684,10 +2652,9 @@ const de_SetSecurityGroupsCommandError = async ( throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2710,7 +2677,7 @@ export const de_SetSubnetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2746,10 +2713,9 @@ const de_SetSubnetsCommandError = async ( throw await de_SubnetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7265,6 +7231,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-elastic-load-balancing/src/protocols/Aws_query.ts b/clients/client-elastic-load-balancing/src/protocols/Aws_query.ts index b22befb5cdc8..a13377f23d8c 100644 --- a/clients/client-elastic-load-balancing/src/protocols/Aws_query.ts +++ b/clients/client-elastic-load-balancing/src/protocols/Aws_query.ts @@ -11,7 +11,7 @@ import { parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -742,7 +742,7 @@ export const de_AddTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -769,10 +769,9 @@ const de_AddTagsCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -795,7 +794,7 @@ export const de_ApplySecurityGroupsToLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -822,10 +821,9 @@ const de_ApplySecurityGroupsToLoadBalancerCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -848,7 +846,7 @@ export const de_AttachLoadBalancerToSubnetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -878,10 +876,9 @@ const de_AttachLoadBalancerToSubnetsCommandError = async ( throw await de_SubnetNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -904,7 +901,7 @@ export const de_ConfigureHealthCheckCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -925,10 +922,9 @@ const de_ConfigureHealthCheckCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -951,7 +947,7 @@ export const de_CreateAppCookieStickinessPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -981,10 +977,9 @@ const de_CreateAppCookieStickinessPolicyCommandError = async ( throw await de_TooManyPoliciesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1007,7 +1002,7 @@ export const de_CreateLBCookieStickinessPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1037,10 +1032,9 @@ const de_CreateLBCookieStickinessPolicyCommandError = async ( throw await de_TooManyPoliciesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1063,7 +1057,7 @@ export const de_CreateLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1117,10 +1111,9 @@ const de_CreateLoadBalancerCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1143,7 +1136,7 @@ export const de_CreateLoadBalancerListenersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1176,10 +1169,9 @@ const de_CreateLoadBalancerListenersCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1202,7 +1194,7 @@ export const de_CreateLoadBalancerPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1235,10 +1227,9 @@ const de_CreateLoadBalancerPolicyCommandError = async ( throw await de_TooManyPoliciesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1261,7 +1252,7 @@ export const de_DeleteLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1277,10 +1268,9 @@ const de_DeleteLoadBalancerCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1302,7 +1292,7 @@ export const de_DeleteLoadBalancerListenersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1323,10 +1313,9 @@ const de_DeleteLoadBalancerListenersCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1349,7 +1338,7 @@ export const de_DeleteLoadBalancerPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1373,10 +1362,9 @@ const de_DeleteLoadBalancerPolicyCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1399,7 +1387,7 @@ export const de_DeregisterInstancesFromLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1423,10 +1411,9 @@ const de_DeregisterInstancesFromLoadBalancerCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,7 +1436,7 @@ export const de_DescribeAccountLimitsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1465,10 +1452,9 @@ const de_DescribeAccountLimitsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1490,7 +1476,7 @@ export const de_DescribeInstanceHealthCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1514,10 +1500,9 @@ const de_DescribeInstanceHealthCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1540,7 +1525,7 @@ export const de_DescribeLoadBalancerAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1564,10 +1549,9 @@ const de_DescribeLoadBalancerAttributesCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1590,7 +1574,7 @@ export const de_DescribeLoadBalancerPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1614,10 +1598,9 @@ const de_DescribeLoadBalancerPoliciesCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1640,7 +1623,7 @@ export const de_DescribeLoadBalancerPolicyTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1661,10 +1644,9 @@ const de_DescribeLoadBalancerPolicyTypesCommandError = async ( throw await de_PolicyTypeNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1687,7 +1669,7 @@ export const de_DescribeLoadBalancersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1711,10 +1693,9 @@ const de_DescribeLoadBalancersCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1737,7 +1718,7 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1758,10 +1739,9 @@ const de_DescribeTagsCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,7 +1764,7 @@ export const de_DetachLoadBalancerFromSubnetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1808,10 +1788,9 @@ const de_DetachLoadBalancerFromSubnetsCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1834,7 +1813,7 @@ export const de_DisableAvailabilityZonesForLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1858,10 +1837,9 @@ const de_DisableAvailabilityZonesForLoadBalancerCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1884,7 +1862,7 @@ export const de_EnableAvailabilityZonesForLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1905,10 +1883,9 @@ const de_EnableAvailabilityZonesForLoadBalancerCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1931,7 +1908,7 @@ export const de_ModifyLoadBalancerAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1958,10 +1935,9 @@ const de_ModifyLoadBalancerAttributesCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1984,7 +1960,7 @@ export const de_RegisterInstancesWithLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2008,10 +1984,9 @@ const de_RegisterInstancesWithLoadBalancerCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2034,7 +2009,7 @@ export const de_RemoveTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2055,10 +2030,9 @@ const de_RemoveTagsCommandError = async ( throw await de_AccessPointNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2081,7 +2055,7 @@ export const de_SetLoadBalancerListenerSSLCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2114,10 +2088,9 @@ const de_SetLoadBalancerListenerSSLCertificateCommandError = async ( throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2143,7 +2116,7 @@ export const de_SetLoadBalancerPoliciesForBackendServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2170,10 +2143,9 @@ const de_SetLoadBalancerPoliciesForBackendServerCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2196,7 +2168,7 @@ export const de_SetLoadBalancerPoliciesOfListenerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2226,10 +2198,9 @@ const de_SetLoadBalancerPoliciesOfListenerCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5053,6 +5024,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-elastic-transcoder/src/protocols/Aws_restJson1.ts b/clients/client-elastic-transcoder/src/protocols/Aws_restJson1.ts index 2779c83e1203..779e4aa26753 100644 --- a/clients/client-elastic-transcoder/src/protocols/Aws_restJson1.ts +++ b/clients/client-elastic-transcoder/src/protocols/Aws_restJson1.ts @@ -1,16 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -59,28 +59,21 @@ import { IncompatibleVersionException, InputCaptions, InternalServiceException, - Job, JobAlbumArt, JobInput, - JobOutput, JobWatermark, LimitExceededException, Notifications, Permission, - Pipeline, PipelineOutputConfig, - Playlist, PlayReadyDrm, - Preset, PresetWatermark, ResourceInUseException, ResourceNotFoundException, Thumbnails, TimeSpan, - Timing, ValidationException, VideoParameters, - Warning, } from "../models/models_0"; /** @@ -119,16 +112,18 @@ export const se_CreateJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/jobs"; let body: any; - body = JSON.stringify({ - ...(input.Input != null && { Input: se_JobInput(input.Input, context) }), - ...(input.Inputs != null && { Inputs: se_JobInputs(input.Inputs, context) }), - ...(input.Output != null && { Output: se_CreateJobOutput(input.Output, context) }), - ...(input.OutputKeyPrefix != null && { OutputKeyPrefix: input.OutputKeyPrefix }), - ...(input.Outputs != null && { Outputs: se_CreateJobOutputs(input.Outputs, context) }), - ...(input.PipelineId != null && { PipelineId: input.PipelineId }), - ...(input.Playlists != null && { Playlists: se_CreateJobPlaylists(input.Playlists, context) }), - ...(input.UserMetadata != null && { UserMetadata: se_UserMetadata(input.UserMetadata, context) }), - }); + body = JSON.stringify( + take(input, { + Input: (_) => _json(_), + Inputs: (_) => _json(_), + Output: (_) => _json(_), + OutputKeyPrefix: [], + Outputs: (_) => _json(_), + PipelineId: [], + Playlists: (_) => _json(_), + UserMetadata: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -153,16 +148,18 @@ export const se_CreatePipelineCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/pipelines"; let body: any; - body = JSON.stringify({ - ...(input.AwsKmsKeyArn != null && { AwsKmsKeyArn: input.AwsKmsKeyArn }), - ...(input.ContentConfig != null && { ContentConfig: se_PipelineOutputConfig(input.ContentConfig, context) }), - ...(input.InputBucket != null && { InputBucket: input.InputBucket }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Notifications != null && { Notifications: se_Notifications(input.Notifications, context) }), - ...(input.OutputBucket != null && { OutputBucket: input.OutputBucket }), - ...(input.Role != null && { Role: input.Role }), - ...(input.ThumbnailConfig != null && { ThumbnailConfig: se_PipelineOutputConfig(input.ThumbnailConfig, context) }), - }); + body = JSON.stringify( + take(input, { + AwsKmsKeyArn: [], + ContentConfig: (_) => _json(_), + InputBucket: [], + Name: [], + Notifications: (_) => _json(_), + OutputBucket: [], + Role: [], + ThumbnailConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -187,14 +184,16 @@ export const se_CreatePresetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/presets"; let body: any; - body = JSON.stringify({ - ...(input.Audio != null && { Audio: se_AudioParameters(input.Audio, context) }), - ...(input.Container != null && { Container: input.Container }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Thumbnails != null && { Thumbnails: se_Thumbnails(input.Thumbnails, context) }), - ...(input.Video != null && { Video: se_VideoParameters(input.Video, context) }), - }); + body = JSON.stringify( + take(input, { + Audio: (_) => _json(_), + Container: [], + Description: [], + Name: [], + Thumbnails: (_) => _json(_), + Video: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -448,12 +447,14 @@ export const se_TestRoleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/roleTests"; let body: any; - body = JSON.stringify({ - ...(input.InputBucket != null && { InputBucket: input.InputBucket }), - ...(input.OutputBucket != null && { OutputBucket: input.OutputBucket }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Topics != null && { Topics: se_SnsTopics(input.Topics, context) }), - }); + body = JSON.stringify( + take(input, { + InputBucket: [], + OutputBucket: [], + Role: [], + Topics: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -480,15 +481,17 @@ export const se_UpdatePipelineCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/pipelines/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.AwsKmsKeyArn != null && { AwsKmsKeyArn: input.AwsKmsKeyArn }), - ...(input.ContentConfig != null && { ContentConfig: se_PipelineOutputConfig(input.ContentConfig, context) }), - ...(input.InputBucket != null && { InputBucket: input.InputBucket }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Notifications != null && { Notifications: se_Notifications(input.Notifications, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.ThumbnailConfig != null && { ThumbnailConfig: se_PipelineOutputConfig(input.ThumbnailConfig, context) }), - }); + body = JSON.stringify( + take(input, { + AwsKmsKeyArn: [], + ContentConfig: (_) => _json(_), + InputBucket: [], + Name: [], + Notifications: (_) => _json(_), + Role: [], + ThumbnailConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -515,9 +518,11 @@ export const se_UpdatePipelineNotificationsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/pipelines/{Id}/notifications"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Notifications != null && { Notifications: se_Notifications(input.Notifications, context) }), - }); + body = JSON.stringify( + take(input, { + Notifications: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -544,9 +549,11 @@ export const se_UpdatePipelineStatusCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2012-09-25/pipelines/{Id}/status"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Status != null && { Status: input.Status }), - }); + body = JSON.stringify( + take(input, { + Status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -608,10 +615,9 @@ const de_CancelJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -631,9 +637,10 @@ export const de_CreateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Job != null) { - contents.Job = de_Job(data.Job, context); - } + const doc = take(data, { + Job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -670,10 +677,9 @@ const de_CreateJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -693,12 +699,11 @@ export const de_CreatePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Pipeline != null) { - contents.Pipeline = de_Pipeline(data.Pipeline, context); - } - if (data.Warnings != null) { - contents.Warnings = de_Warnings(data.Warnings, context); - } + const doc = take(data, { + Pipeline: _json, + Warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -735,10 +740,9 @@ const de_CreatePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -758,12 +762,11 @@ export const de_CreatePresetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Preset != null) { - contents.Preset = de_Preset(data.Preset, context); - } - if (data.Warning != null) { - contents.Warning = __expectString(data.Warning); - } + const doc = take(data, { + Preset: _json, + Warning: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -797,10 +800,9 @@ const de_CreatePresetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -856,10 +858,9 @@ const de_DeletePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -912,10 +913,9 @@ const de_DeletePresetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -935,12 +935,11 @@ export const de_ListJobsByPipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Jobs != null) { - contents.Jobs = de_Jobs(data.Jobs, context); - } - if (data.NextPageToken != null) { - contents.NextPageToken = __expectString(data.NextPageToken); - } + const doc = take(data, { + Jobs: _json, + NextPageToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -974,10 +973,9 @@ const de_ListJobsByPipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -997,12 +995,11 @@ export const de_ListJobsByStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Jobs != null) { - contents.Jobs = de_Jobs(data.Jobs, context); - } - if (data.NextPageToken != null) { - contents.NextPageToken = __expectString(data.NextPageToken); - } + const doc = take(data, { + Jobs: _json, + NextPageToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1036,10 +1033,9 @@ const de_ListJobsByStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1059,12 +1055,11 @@ export const de_ListPipelinesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextPageToken != null) { - contents.NextPageToken = __expectString(data.NextPageToken); - } - if (data.Pipelines != null) { - contents.Pipelines = de_Pipelines(data.Pipelines, context); - } + const doc = take(data, { + NextPageToken: __expectString, + Pipelines: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1095,10 +1090,9 @@ const de_ListPipelinesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1118,12 +1112,11 @@ export const de_ListPresetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextPageToken != null) { - contents.NextPageToken = __expectString(data.NextPageToken); - } - if (data.Presets != null) { - contents.Presets = de_Presets(data.Presets, context); - } + const doc = take(data, { + NextPageToken: __expectString, + Presets: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1154,10 +1147,9 @@ const de_ListPresetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1177,9 +1169,10 @@ export const de_ReadJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Job != null) { - contents.Job = de_Job(data.Job, context); - } + const doc = take(data, { + Job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1213,10 +1206,9 @@ const de_ReadJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1236,12 +1228,11 @@ export const de_ReadPipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Pipeline != null) { - contents.Pipeline = de_Pipeline(data.Pipeline, context); - } - if (data.Warnings != null) { - contents.Warnings = de_Warnings(data.Warnings, context); - } + const doc = take(data, { + Pipeline: _json, + Warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1275,10 +1266,9 @@ const de_ReadPipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,9 +1288,10 @@ export const de_ReadPresetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Preset != null) { - contents.Preset = de_Preset(data.Preset, context); - } + const doc = take(data, { + Preset: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1334,10 +1325,9 @@ const de_ReadPresetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1357,12 +1347,11 @@ export const de_TestRoleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Messages != null) { - contents.Messages = de_ExceptionMessages(data.Messages, context); - } - if (data.Success != null) { - contents.Success = __expectString(data.Success); - } + const doc = take(data, { + Messages: _json, + Success: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1396,10 +1385,9 @@ const de_TestRoleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1419,12 +1407,11 @@ export const de_UpdatePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Pipeline != null) { - contents.Pipeline = de_Pipeline(data.Pipeline, context); - } - if (data.Warnings != null) { - contents.Warnings = de_Warnings(data.Warnings, context); - } + const doc = take(data, { + Pipeline: _json, + Warnings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1461,10 +1448,9 @@ const de_UpdatePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1484,9 +1470,10 @@ export const de_UpdatePipelineNotificationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Pipeline != null) { - contents.Pipeline = de_Pipeline(data.Pipeline, context); - } + const doc = take(data, { + Pipeline: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1523,10 +1510,9 @@ const de_UpdatePipelineNotificationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,9 +1532,10 @@ export const de_UpdatePipelineStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Pipeline != null) { - contents.Pipeline = de_Pipeline(data.Pipeline, context); - } + const doc = take(data, { + Pipeline: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1585,16 +1572,15 @@ const de_UpdatePipelineStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1604,9 +1590,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1623,9 +1610,10 @@ const de_IncompatibleVersionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new IncompatibleVersionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1642,9 +1630,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1661,9 +1650,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1680,9 +1670,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1699,9 +1690,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1715,9 +1707,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1725,1194 +1718,179 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccessControls - */ -const se_AccessControls = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccessControls omitted. -/** - * serializeAws_restJson1Artwork - */ -const se_Artwork = (input: Artwork, context: __SerdeContext): any => { - return { - ...(input.AlbumArtFormat != null && { AlbumArtFormat: input.AlbumArtFormat }), - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.InputKey != null && { InputKey: input.InputKey }), - ...(input.MaxHeight != null && { MaxHeight: input.MaxHeight }), - ...(input.MaxWidth != null && { MaxWidth: input.MaxWidth }), - ...(input.PaddingPolicy != null && { PaddingPolicy: input.PaddingPolicy }), - ...(input.SizingPolicy != null && { SizingPolicy: input.SizingPolicy }), - }; -}; +// se_Artwork omitted. -/** - * serializeAws_restJson1Artworks - */ -const se_Artworks = (input: Artwork[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Artwork(entry, context); - }); -}; +// se_Artworks omitted. -/** - * serializeAws_restJson1AudioCodecOptions - */ -const se_AudioCodecOptions = (input: AudioCodecOptions, context: __SerdeContext): any => { - return { - ...(input.BitDepth != null && { BitDepth: input.BitDepth }), - ...(input.BitOrder != null && { BitOrder: input.BitOrder }), - ...(input.Profile != null && { Profile: input.Profile }), - ...(input.Signed != null && { Signed: input.Signed }), - }; -}; +// se_AudioCodecOptions omitted. -/** - * serializeAws_restJson1AudioParameters - */ -const se_AudioParameters = (input: AudioParameters, context: __SerdeContext): any => { - return { - ...(input.AudioPackingMode != null && { AudioPackingMode: input.AudioPackingMode }), - ...(input.BitRate != null && { BitRate: input.BitRate }), - ...(input.Channels != null && { Channels: input.Channels }), - ...(input.Codec != null && { Codec: input.Codec }), - ...(input.CodecOptions != null && { CodecOptions: se_AudioCodecOptions(input.CodecOptions, context) }), - ...(input.SampleRate != null && { SampleRate: input.SampleRate }), - }; -}; +// se_AudioParameters omitted. -/** - * serializeAws_restJson1CaptionFormat - */ -const se_CaptionFormat = (input: CaptionFormat, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Pattern != null && { Pattern: input.Pattern }), - }; -}; +// se_CaptionFormat omitted. -/** - * serializeAws_restJson1CaptionFormats - */ -const se_CaptionFormats = (input: CaptionFormat[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CaptionFormat(entry, context); - }); -}; +// se_CaptionFormats omitted. -/** - * serializeAws_restJson1Captions - */ -const se_Captions = (input: Captions, context: __SerdeContext): any => { - return { - ...(input.CaptionFormats != null && { CaptionFormats: se_CaptionFormats(input.CaptionFormats, context) }), - ...(input.CaptionSources != null && { CaptionSources: se_CaptionSources(input.CaptionSources, context) }), - ...(input.MergePolicy != null && { MergePolicy: input.MergePolicy }), - }; -}; +// se_Captions omitted. -/** - * serializeAws_restJson1CaptionSource - */ -const se_CaptionSource = (input: CaptionSource, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Label != null && { Label: input.Label }), - ...(input.Language != null && { Language: input.Language }), - ...(input.TimeOffset != null && { TimeOffset: input.TimeOffset }), - }; -}; +// se_CaptionSource omitted. -/** - * serializeAws_restJson1CaptionSources - */ -const se_CaptionSources = (input: CaptionSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CaptionSource(entry, context); - }); -}; +// se_CaptionSources omitted. -/** - * serializeAws_restJson1Clip - */ -const se_Clip = (input: Clip, context: __SerdeContext): any => { - return { - ...(input.TimeSpan != null && { TimeSpan: se_TimeSpan(input.TimeSpan, context) }), - }; -}; +// se_Clip omitted. -/** - * serializeAws_restJson1CodecOptions - */ -const se_CodecOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CodecOptions omitted. -/** - * serializeAws_restJson1Composition - */ -const se_Composition = (input: Clip[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Clip(entry, context); - }); -}; +// se_Composition omitted. -/** - * serializeAws_restJson1CreateJobOutput - */ -const se_CreateJobOutput = (input: CreateJobOutput, context: __SerdeContext): any => { - return { - ...(input.AlbumArt != null && { AlbumArt: se_JobAlbumArt(input.AlbumArt, context) }), - ...(input.Captions != null && { Captions: se_Captions(input.Captions, context) }), - ...(input.Composition != null && { Composition: se_Composition(input.Composition, context) }), - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.Key != null && { Key: input.Key }), - ...(input.PresetId != null && { PresetId: input.PresetId }), - ...(input.Rotate != null && { Rotate: input.Rotate }), - ...(input.SegmentDuration != null && { SegmentDuration: input.SegmentDuration }), - ...(input.ThumbnailEncryption != null && { - ThumbnailEncryption: se_Encryption(input.ThumbnailEncryption, context), - }), - ...(input.ThumbnailPattern != null && { ThumbnailPattern: input.ThumbnailPattern }), - ...(input.Watermarks != null && { Watermarks: se_JobWatermarks(input.Watermarks, context) }), - }; -}; +// se_CreateJobOutput omitted. -/** - * serializeAws_restJson1CreateJobOutputs - */ -const se_CreateJobOutputs = (input: CreateJobOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateJobOutput(entry, context); - }); -}; +// se_CreateJobOutputs omitted. -/** - * serializeAws_restJson1CreateJobPlaylist - */ -const se_CreateJobPlaylist = (input: CreateJobPlaylist, context: __SerdeContext): any => { - return { - ...(input.Format != null && { Format: input.Format }), - ...(input.HlsContentProtection != null && { - HlsContentProtection: se_HlsContentProtection(input.HlsContentProtection, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputKeys != null && { OutputKeys: se_OutputKeys(input.OutputKeys, context) }), - ...(input.PlayReadyDrm != null && { PlayReadyDrm: se_PlayReadyDrm(input.PlayReadyDrm, context) }), - }; -}; +// se_CreateJobPlaylist omitted. -/** - * serializeAws_restJson1CreateJobPlaylists - */ -const se_CreateJobPlaylists = (input: CreateJobPlaylist[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateJobPlaylist(entry, context); - }); -}; +// se_CreateJobPlaylists omitted. -/** - * serializeAws_restJson1DetectedProperties - */ -const se_DetectedProperties = (input: DetectedProperties, context: __SerdeContext): any => { - return { - ...(input.DurationMillis != null && { DurationMillis: input.DurationMillis }), - ...(input.FileSize != null && { FileSize: input.FileSize }), - ...(input.FrameRate != null && { FrameRate: input.FrameRate }), - ...(input.Height != null && { Height: input.Height }), - ...(input.Width != null && { Width: input.Width }), - }; -}; +// se_DetectedProperties omitted. -/** - * serializeAws_restJson1Encryption - */ -const se_Encryption = (input: Encryption, context: __SerdeContext): any => { - return { - ...(input.InitializationVector != null && { InitializationVector: input.InitializationVector }), - ...(input.Key != null && { Key: input.Key }), - ...(input.KeyMd5 != null && { KeyMd5: input.KeyMd5 }), - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; +// se_Encryption omitted. -/** - * serializeAws_restJson1HlsContentProtection - */ -const se_HlsContentProtection = (input: HlsContentProtection, context: __SerdeContext): any => { - return { - ...(input.InitializationVector != null && { InitializationVector: input.InitializationVector }), - ...(input.Key != null && { Key: input.Key }), - ...(input.KeyMd5 != null && { KeyMd5: input.KeyMd5 }), - ...(input.KeyStoragePolicy != null && { KeyStoragePolicy: input.KeyStoragePolicy }), - ...(input.LicenseAcquisitionUrl != null && { LicenseAcquisitionUrl: input.LicenseAcquisitionUrl }), - ...(input.Method != null && { Method: input.Method }), - }; -}; +// se_HlsContentProtection omitted. -/** - * serializeAws_restJson1InputCaptions - */ -const se_InputCaptions = (input: InputCaptions, context: __SerdeContext): any => { - return { - ...(input.CaptionSources != null && { CaptionSources: se_CaptionSources(input.CaptionSources, context) }), - ...(input.MergePolicy != null && { MergePolicy: input.MergePolicy }), - }; -}; +// se_InputCaptions omitted. -/** - * serializeAws_restJson1JobAlbumArt - */ -const se_JobAlbumArt = (input: JobAlbumArt, context: __SerdeContext): any => { - return { - ...(input.Artwork != null && { Artwork: se_Artworks(input.Artwork, context) }), - ...(input.MergePolicy != null && { MergePolicy: input.MergePolicy }), - }; -}; +// se_JobAlbumArt omitted. -/** - * serializeAws_restJson1JobInput - */ -const se_JobInput = (input: JobInput, context: __SerdeContext): any => { - return { - ...(input.AspectRatio != null && { AspectRatio: input.AspectRatio }), - ...(input.Container != null && { Container: input.Container }), - ...(input.DetectedProperties != null && { - DetectedProperties: se_DetectedProperties(input.DetectedProperties, context), - }), - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.FrameRate != null && { FrameRate: input.FrameRate }), - ...(input.InputCaptions != null && { InputCaptions: se_InputCaptions(input.InputCaptions, context) }), - ...(input.Interlaced != null && { Interlaced: input.Interlaced }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Resolution != null && { Resolution: input.Resolution }), - ...(input.TimeSpan != null && { TimeSpan: se_TimeSpan(input.TimeSpan, context) }), - }; -}; +// se_JobInput omitted. -/** - * serializeAws_restJson1JobInputs - */ -const se_JobInputs = (input: JobInput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JobInput(entry, context); - }); -}; +// se_JobInputs omitted. -/** - * serializeAws_restJson1JobWatermark - */ -const se_JobWatermark = (input: JobWatermark, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.InputKey != null && { InputKey: input.InputKey }), - ...(input.PresetWatermarkId != null && { PresetWatermarkId: input.PresetWatermarkId }), - }; -}; +// se_JobWatermark omitted. -/** - * serializeAws_restJson1JobWatermarks - */ -const se_JobWatermarks = (input: JobWatermark[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JobWatermark(entry, context); - }); -}; +// se_JobWatermarks omitted. -/** - * serializeAws_restJson1Notifications - */ -const se_Notifications = (input: Notifications, context: __SerdeContext): any => { - return { - ...(input.Completed != null && { Completed: input.Completed }), - ...(input.Error != null && { Error: input.Error }), - ...(input.Progressing != null && { Progressing: input.Progressing }), - ...(input.Warning != null && { Warning: input.Warning }), - }; -}; +// se_Notifications omitted. -/** - * serializeAws_restJson1OutputKeys - */ -const se_OutputKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OutputKeys omitted. -/** - * serializeAws_restJson1Permission - */ -const se_Permission = (input: Permission, context: __SerdeContext): any => { - return { - ...(input.Access != null && { Access: se_AccessControls(input.Access, context) }), - ...(input.Grantee != null && { Grantee: input.Grantee }), - ...(input.GranteeType != null && { GranteeType: input.GranteeType }), - }; -}; +// se_Permission omitted. -/** - * serializeAws_restJson1Permissions - */ -const se_Permissions = (input: Permission[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Permission(entry, context); - }); -}; +// se_Permissions omitted. -/** - * serializeAws_restJson1PipelineOutputConfig - */ -const se_PipelineOutputConfig = (input: PipelineOutputConfig, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Permissions != null && { Permissions: se_Permissions(input.Permissions, context) }), - ...(input.StorageClass != null && { StorageClass: input.StorageClass }), - }; -}; +// se_PipelineOutputConfig omitted. -/** - * serializeAws_restJson1PlayReadyDrm - */ -const se_PlayReadyDrm = (input: PlayReadyDrm, context: __SerdeContext): any => { - return { - ...(input.Format != null && { Format: input.Format }), - ...(input.InitializationVector != null && { InitializationVector: input.InitializationVector }), - ...(input.Key != null && { Key: input.Key }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.KeyMd5 != null && { KeyMd5: input.KeyMd5 }), - ...(input.LicenseAcquisitionUrl != null && { LicenseAcquisitionUrl: input.LicenseAcquisitionUrl }), - }; -}; +// se_PlayReadyDrm omitted. -/** - * serializeAws_restJson1PresetWatermark - */ -const se_PresetWatermark = (input: PresetWatermark, context: __SerdeContext): any => { - return { - ...(input.HorizontalAlign != null && { HorizontalAlign: input.HorizontalAlign }), - ...(input.HorizontalOffset != null && { HorizontalOffset: input.HorizontalOffset }), - ...(input.Id != null && { Id: input.Id }), - ...(input.MaxHeight != null && { MaxHeight: input.MaxHeight }), - ...(input.MaxWidth != null && { MaxWidth: input.MaxWidth }), - ...(input.Opacity != null && { Opacity: input.Opacity }), - ...(input.SizingPolicy != null && { SizingPolicy: input.SizingPolicy }), - ...(input.Target != null && { Target: input.Target }), - ...(input.VerticalAlign != null && { VerticalAlign: input.VerticalAlign }), - ...(input.VerticalOffset != null && { VerticalOffset: input.VerticalOffset }), - }; -}; +// se_PresetWatermark omitted. -/** - * serializeAws_restJson1PresetWatermarks - */ -const se_PresetWatermarks = (input: PresetWatermark[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PresetWatermark(entry, context); - }); -}; +// se_PresetWatermarks omitted. -/** - * serializeAws_restJson1SnsTopics - */ -const se_SnsTopics = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SnsTopics omitted. -/** - * serializeAws_restJson1Thumbnails - */ -const se_Thumbnails = (input: Thumbnails, context: __SerdeContext): any => { - return { - ...(input.AspectRatio != null && { AspectRatio: input.AspectRatio }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.MaxHeight != null && { MaxHeight: input.MaxHeight }), - ...(input.MaxWidth != null && { MaxWidth: input.MaxWidth }), - ...(input.PaddingPolicy != null && { PaddingPolicy: input.PaddingPolicy }), - ...(input.Resolution != null && { Resolution: input.Resolution }), - ...(input.SizingPolicy != null && { SizingPolicy: input.SizingPolicy }), - }; -}; +// se_Thumbnails omitted. -/** - * serializeAws_restJson1TimeSpan - */ -const se_TimeSpan = (input: TimeSpan, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.StartTime != null && { StartTime: input.StartTime }), - }; -}; +// se_TimeSpan omitted. -/** - * serializeAws_restJson1UserMetadata - */ -const se_UserMetadata = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_UserMetadata omitted. -/** - * serializeAws_restJson1VideoParameters - */ -const se_VideoParameters = (input: VideoParameters, context: __SerdeContext): any => { - return { - ...(input.AspectRatio != null && { AspectRatio: input.AspectRatio }), - ...(input.BitRate != null && { BitRate: input.BitRate }), - ...(input.Codec != null && { Codec: input.Codec }), - ...(input.CodecOptions != null && { CodecOptions: se_CodecOptions(input.CodecOptions, context) }), - ...(input.DisplayAspectRatio != null && { DisplayAspectRatio: input.DisplayAspectRatio }), - ...(input.FixedGOP != null && { FixedGOP: input.FixedGOP }), - ...(input.FrameRate != null && { FrameRate: input.FrameRate }), - ...(input.KeyframesMaxDist != null && { KeyframesMaxDist: input.KeyframesMaxDist }), - ...(input.MaxFrameRate != null && { MaxFrameRate: input.MaxFrameRate }), - ...(input.MaxHeight != null && { MaxHeight: input.MaxHeight }), - ...(input.MaxWidth != null && { MaxWidth: input.MaxWidth }), - ...(input.PaddingPolicy != null && { PaddingPolicy: input.PaddingPolicy }), - ...(input.Resolution != null && { Resolution: input.Resolution }), - ...(input.SizingPolicy != null && { SizingPolicy: input.SizingPolicy }), - ...(input.Watermarks != null && { Watermarks: se_PresetWatermarks(input.Watermarks, context) }), - }; -}; +// se_VideoParameters omitted. -/** - * deserializeAws_restJson1AccessControls - */ -const de_AccessControls = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccessControls omitted. -/** - * deserializeAws_restJson1Artwork - */ -const de_Artwork = (output: any, context: __SerdeContext): Artwork => { - return { - AlbumArtFormat: __expectString(output.AlbumArtFormat), - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - InputKey: __expectString(output.InputKey), - MaxHeight: __expectString(output.MaxHeight), - MaxWidth: __expectString(output.MaxWidth), - PaddingPolicy: __expectString(output.PaddingPolicy), - SizingPolicy: __expectString(output.SizingPolicy), - } as any; -}; +// de_Artwork omitted. -/** - * deserializeAws_restJson1Artworks - */ -const de_Artworks = (output: any, context: __SerdeContext): Artwork[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Artwork(entry, context); - }); - return retVal; -}; +// de_Artworks omitted. -/** - * deserializeAws_restJson1AudioCodecOptions - */ -const de_AudioCodecOptions = (output: any, context: __SerdeContext): AudioCodecOptions => { - return { - BitDepth: __expectString(output.BitDepth), - BitOrder: __expectString(output.BitOrder), - Profile: __expectString(output.Profile), - Signed: __expectString(output.Signed), - } as any; -}; +// de_AudioCodecOptions omitted. -/** - * deserializeAws_restJson1AudioParameters - */ -const de_AudioParameters = (output: any, context: __SerdeContext): AudioParameters => { - return { - AudioPackingMode: __expectString(output.AudioPackingMode), - BitRate: __expectString(output.BitRate), - Channels: __expectString(output.Channels), - Codec: __expectString(output.Codec), - CodecOptions: output.CodecOptions != null ? de_AudioCodecOptions(output.CodecOptions, context) : undefined, - SampleRate: __expectString(output.SampleRate), - } as any; -}; +// de_AudioParameters omitted. -/** - * deserializeAws_restJson1CaptionFormat - */ -const de_CaptionFormat = (output: any, context: __SerdeContext): CaptionFormat => { - return { - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - Format: __expectString(output.Format), - Pattern: __expectString(output.Pattern), - } as any; -}; +// de_CaptionFormat omitted. -/** - * deserializeAws_restJson1CaptionFormats - */ -const de_CaptionFormats = (output: any, context: __SerdeContext): CaptionFormat[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CaptionFormat(entry, context); - }); - return retVal; -}; +// de_CaptionFormats omitted. -/** - * deserializeAws_restJson1Captions - */ -const de_Captions = (output: any, context: __SerdeContext): Captions => { - return { - CaptionFormats: output.CaptionFormats != null ? de_CaptionFormats(output.CaptionFormats, context) : undefined, - CaptionSources: output.CaptionSources != null ? de_CaptionSources(output.CaptionSources, context) : undefined, - MergePolicy: __expectString(output.MergePolicy), - } as any; -}; +// de_Captions omitted. -/** - * deserializeAws_restJson1CaptionSource - */ -const de_CaptionSource = (output: any, context: __SerdeContext): CaptionSource => { - return { - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - Key: __expectString(output.Key), - Label: __expectString(output.Label), - Language: __expectString(output.Language), - TimeOffset: __expectString(output.TimeOffset), - } as any; -}; +// de_CaptionSource omitted. -/** - * deserializeAws_restJson1CaptionSources - */ -const de_CaptionSources = (output: any, context: __SerdeContext): CaptionSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CaptionSource(entry, context); - }); - return retVal; -}; +// de_CaptionSources omitted. -/** - * deserializeAws_restJson1Clip - */ -const de_Clip = (output: any, context: __SerdeContext): Clip => { - return { - TimeSpan: output.TimeSpan != null ? de_TimeSpan(output.TimeSpan, context) : undefined, - } as any; -}; +// de_Clip omitted. -/** - * deserializeAws_restJson1CodecOptions - */ -const de_CodecOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_CodecOptions omitted. -/** - * deserializeAws_restJson1Composition - */ -const de_Composition = (output: any, context: __SerdeContext): Clip[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Clip(entry, context); - }); - return retVal; -}; +// de_Composition omitted. -/** - * deserializeAws_restJson1DetectedProperties - */ -const de_DetectedProperties = (output: any, context: __SerdeContext): DetectedProperties => { - return { - DurationMillis: __expectLong(output.DurationMillis), - FileSize: __expectLong(output.FileSize), - FrameRate: __expectString(output.FrameRate), - Height: __expectInt32(output.Height), - Width: __expectInt32(output.Width), - } as any; -}; +// de_DetectedProperties omitted. -/** - * deserializeAws_restJson1Encryption - */ -const de_Encryption = (output: any, context: __SerdeContext): Encryption => { - return { - InitializationVector: __expectString(output.InitializationVector), - Key: __expectString(output.Key), - KeyMd5: __expectString(output.KeyMd5), - Mode: __expectString(output.Mode), - } as any; -}; +// de_Encryption omitted. -/** - * deserializeAws_restJson1ExceptionMessages - */ -const de_ExceptionMessages = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExceptionMessages omitted. -/** - * deserializeAws_restJson1HlsContentProtection - */ -const de_HlsContentProtection = (output: any, context: __SerdeContext): HlsContentProtection => { - return { - InitializationVector: __expectString(output.InitializationVector), - Key: __expectString(output.Key), - KeyMd5: __expectString(output.KeyMd5), - KeyStoragePolicy: __expectString(output.KeyStoragePolicy), - LicenseAcquisitionUrl: __expectString(output.LicenseAcquisitionUrl), - Method: __expectString(output.Method), - } as any; -}; +// de_HlsContentProtection omitted. -/** - * deserializeAws_restJson1InputCaptions - */ -const de_InputCaptions = (output: any, context: __SerdeContext): InputCaptions => { - return { - CaptionSources: output.CaptionSources != null ? de_CaptionSources(output.CaptionSources, context) : undefined, - MergePolicy: __expectString(output.MergePolicy), - } as any; -}; +// de_InputCaptions omitted. -/** - * deserializeAws_restJson1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Input: output.Input != null ? de_JobInput(output.Input, context) : undefined, - Inputs: output.Inputs != null ? de_JobInputs(output.Inputs, context) : undefined, - Output: output.Output != null ? de_JobOutput(output.Output, context) : undefined, - OutputKeyPrefix: __expectString(output.OutputKeyPrefix), - Outputs: output.Outputs != null ? de_JobOutputs(output.Outputs, context) : undefined, - PipelineId: __expectString(output.PipelineId), - Playlists: output.Playlists != null ? de_Playlists(output.Playlists, context) : undefined, - Status: __expectString(output.Status), - Timing: output.Timing != null ? de_Timing(output.Timing, context) : undefined, - UserMetadata: output.UserMetadata != null ? de_UserMetadata(output.UserMetadata, context) : undefined, - } as any; -}; +// de_Job omitted. -/** - * deserializeAws_restJson1JobAlbumArt - */ -const de_JobAlbumArt = (output: any, context: __SerdeContext): JobAlbumArt => { - return { - Artwork: output.Artwork != null ? de_Artworks(output.Artwork, context) : undefined, - MergePolicy: __expectString(output.MergePolicy), - } as any; -}; +// de_JobAlbumArt omitted. -/** - * deserializeAws_restJson1JobInput - */ -const de_JobInput = (output: any, context: __SerdeContext): JobInput => { - return { - AspectRatio: __expectString(output.AspectRatio), - Container: __expectString(output.Container), - DetectedProperties: - output.DetectedProperties != null ? de_DetectedProperties(output.DetectedProperties, context) : undefined, - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - FrameRate: __expectString(output.FrameRate), - InputCaptions: output.InputCaptions != null ? de_InputCaptions(output.InputCaptions, context) : undefined, - Interlaced: __expectString(output.Interlaced), - Key: __expectString(output.Key), - Resolution: __expectString(output.Resolution), - TimeSpan: output.TimeSpan != null ? de_TimeSpan(output.TimeSpan, context) : undefined, - } as any; -}; +// de_JobInput omitted. -/** - * deserializeAws_restJson1JobInputs - */ -const de_JobInputs = (output: any, context: __SerdeContext): JobInput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobInput(entry, context); - }); - return retVal; -}; +// de_JobInputs omitted. -/** - * deserializeAws_restJson1JobOutput - */ -const de_JobOutput = (output: any, context: __SerdeContext): JobOutput => { - return { - AlbumArt: output.AlbumArt != null ? de_JobAlbumArt(output.AlbumArt, context) : undefined, - AppliedColorSpaceConversion: __expectString(output.AppliedColorSpaceConversion), - Captions: output.Captions != null ? de_Captions(output.Captions, context) : undefined, - Composition: output.Composition != null ? de_Composition(output.Composition, context) : undefined, - Duration: __expectLong(output.Duration), - DurationMillis: __expectLong(output.DurationMillis), - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - FileSize: __expectLong(output.FileSize), - FrameRate: __expectString(output.FrameRate), - Height: __expectInt32(output.Height), - Id: __expectString(output.Id), - Key: __expectString(output.Key), - PresetId: __expectString(output.PresetId), - Rotate: __expectString(output.Rotate), - SegmentDuration: __expectString(output.SegmentDuration), - Status: __expectString(output.Status), - StatusDetail: __expectString(output.StatusDetail), - ThumbnailEncryption: - output.ThumbnailEncryption != null ? de_Encryption(output.ThumbnailEncryption, context) : undefined, - ThumbnailPattern: __expectString(output.ThumbnailPattern), - Watermarks: output.Watermarks != null ? de_JobWatermarks(output.Watermarks, context) : undefined, - Width: __expectInt32(output.Width), - } as any; -}; +// de_JobOutput omitted. -/** - * deserializeAws_restJson1JobOutputs - */ -const de_JobOutputs = (output: any, context: __SerdeContext): JobOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobOutput(entry, context); - }); - return retVal; -}; +// de_JobOutputs omitted. -/** - * deserializeAws_restJson1Jobs - */ -const de_Jobs = (output: any, context: __SerdeContext): Job[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Job(entry, context); - }); - return retVal; -}; +// de_Jobs omitted. -/** - * deserializeAws_restJson1JobWatermark - */ -const de_JobWatermark = (output: any, context: __SerdeContext): JobWatermark => { - return { - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - InputKey: __expectString(output.InputKey), - PresetWatermarkId: __expectString(output.PresetWatermarkId), - } as any; -}; +// de_JobWatermark omitted. -/** - * deserializeAws_restJson1JobWatermarks - */ -const de_JobWatermarks = (output: any, context: __SerdeContext): JobWatermark[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobWatermark(entry, context); - }); - return retVal; -}; +// de_JobWatermarks omitted. -/** - * deserializeAws_restJson1Notifications - */ -const de_Notifications = (output: any, context: __SerdeContext): Notifications => { - return { - Completed: __expectString(output.Completed), - Error: __expectString(output.Error), - Progressing: __expectString(output.Progressing), - Warning: __expectString(output.Warning), - } as any; -}; +// de_Notifications omitted. -/** - * deserializeAws_restJson1OutputKeys - */ -const de_OutputKeys = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OutputKeys omitted. -/** - * deserializeAws_restJson1Permission - */ -const de_Permission = (output: any, context: __SerdeContext): Permission => { - return { - Access: output.Access != null ? de_AccessControls(output.Access, context) : undefined, - Grantee: __expectString(output.Grantee), - GranteeType: __expectString(output.GranteeType), - } as any; -}; +// de_Permission omitted. -/** - * deserializeAws_restJson1Permissions - */ -const de_Permissions = (output: any, context: __SerdeContext): Permission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Permission(entry, context); - }); - return retVal; -}; +// de_Permissions omitted. -/** - * deserializeAws_restJson1Pipeline - */ -const de_Pipeline = (output: any, context: __SerdeContext): Pipeline => { - return { - Arn: __expectString(output.Arn), - AwsKmsKeyArn: __expectString(output.AwsKmsKeyArn), - ContentConfig: output.ContentConfig != null ? de_PipelineOutputConfig(output.ContentConfig, context) : undefined, - Id: __expectString(output.Id), - InputBucket: __expectString(output.InputBucket), - Name: __expectString(output.Name), - Notifications: output.Notifications != null ? de_Notifications(output.Notifications, context) : undefined, - OutputBucket: __expectString(output.OutputBucket), - Role: __expectString(output.Role), - Status: __expectString(output.Status), - ThumbnailConfig: - output.ThumbnailConfig != null ? de_PipelineOutputConfig(output.ThumbnailConfig, context) : undefined, - } as any; -}; +// de_Pipeline omitted. -/** - * deserializeAws_restJson1PipelineOutputConfig - */ -const de_PipelineOutputConfig = (output: any, context: __SerdeContext): PipelineOutputConfig => { - return { - Bucket: __expectString(output.Bucket), - Permissions: output.Permissions != null ? de_Permissions(output.Permissions, context) : undefined, - StorageClass: __expectString(output.StorageClass), - } as any; -}; +// de_PipelineOutputConfig omitted. -/** - * deserializeAws_restJson1Pipelines - */ -const de_Pipelines = (output: any, context: __SerdeContext): Pipeline[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Pipeline(entry, context); - }); - return retVal; -}; +// de_Pipelines omitted. -/** - * deserializeAws_restJson1Playlist - */ -const de_Playlist = (output: any, context: __SerdeContext): Playlist => { - return { - Format: __expectString(output.Format), - HlsContentProtection: - output.HlsContentProtection != null ? de_HlsContentProtection(output.HlsContentProtection, context) : undefined, - Name: __expectString(output.Name), - OutputKeys: output.OutputKeys != null ? de_OutputKeys(output.OutputKeys, context) : undefined, - PlayReadyDrm: output.PlayReadyDrm != null ? de_PlayReadyDrm(output.PlayReadyDrm, context) : undefined, - Status: __expectString(output.Status), - StatusDetail: __expectString(output.StatusDetail), - } as any; -}; +// de_Playlist omitted. -/** - * deserializeAws_restJson1Playlists - */ -const de_Playlists = (output: any, context: __SerdeContext): Playlist[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Playlist(entry, context); - }); - return retVal; -}; +// de_Playlists omitted. -/** - * deserializeAws_restJson1PlayReadyDrm - */ -const de_PlayReadyDrm = (output: any, context: __SerdeContext): PlayReadyDrm => { - return { - Format: __expectString(output.Format), - InitializationVector: __expectString(output.InitializationVector), - Key: __expectString(output.Key), - KeyId: __expectString(output.KeyId), - KeyMd5: __expectString(output.KeyMd5), - LicenseAcquisitionUrl: __expectString(output.LicenseAcquisitionUrl), - } as any; -}; +// de_PlayReadyDrm omitted. -/** - * deserializeAws_restJson1Preset - */ -const de_Preset = (output: any, context: __SerdeContext): Preset => { - return { - Arn: __expectString(output.Arn), - Audio: output.Audio != null ? de_AudioParameters(output.Audio, context) : undefined, - Container: __expectString(output.Container), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Thumbnails: output.Thumbnails != null ? de_Thumbnails(output.Thumbnails, context) : undefined, - Type: __expectString(output.Type), - Video: output.Video != null ? de_VideoParameters(output.Video, context) : undefined, - } as any; -}; +// de_Preset omitted. -/** - * deserializeAws_restJson1Presets - */ -const de_Presets = (output: any, context: __SerdeContext): Preset[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Preset(entry, context); - }); - return retVal; -}; +// de_Presets omitted. -/** - * deserializeAws_restJson1PresetWatermark - */ -const de_PresetWatermark = (output: any, context: __SerdeContext): PresetWatermark => { - return { - HorizontalAlign: __expectString(output.HorizontalAlign), - HorizontalOffset: __expectString(output.HorizontalOffset), - Id: __expectString(output.Id), - MaxHeight: __expectString(output.MaxHeight), - MaxWidth: __expectString(output.MaxWidth), - Opacity: __expectString(output.Opacity), - SizingPolicy: __expectString(output.SizingPolicy), - Target: __expectString(output.Target), - VerticalAlign: __expectString(output.VerticalAlign), - VerticalOffset: __expectString(output.VerticalOffset), - } as any; -}; +// de_PresetWatermark omitted. -/** - * deserializeAws_restJson1PresetWatermarks - */ -const de_PresetWatermarks = (output: any, context: __SerdeContext): PresetWatermark[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PresetWatermark(entry, context); - }); - return retVal; -}; +// de_PresetWatermarks omitted. -/** - * deserializeAws_restJson1Thumbnails - */ -const de_Thumbnails = (output: any, context: __SerdeContext): Thumbnails => { - return { - AspectRatio: __expectString(output.AspectRatio), - Format: __expectString(output.Format), - Interval: __expectString(output.Interval), - MaxHeight: __expectString(output.MaxHeight), - MaxWidth: __expectString(output.MaxWidth), - PaddingPolicy: __expectString(output.PaddingPolicy), - Resolution: __expectString(output.Resolution), - SizingPolicy: __expectString(output.SizingPolicy), - } as any; -}; +// de_Thumbnails omitted. -/** - * deserializeAws_restJson1TimeSpan - */ -const de_TimeSpan = (output: any, context: __SerdeContext): TimeSpan => { - return { - Duration: __expectString(output.Duration), - StartTime: __expectString(output.StartTime), - } as any; -}; +// de_TimeSpan omitted. -/** - * deserializeAws_restJson1Timing - */ -const de_Timing = (output: any, context: __SerdeContext): Timing => { - return { - FinishTimeMillis: __expectLong(output.FinishTimeMillis), - StartTimeMillis: __expectLong(output.StartTimeMillis), - SubmitTimeMillis: __expectLong(output.SubmitTimeMillis), - } as any; -}; +// de_Timing omitted. -/** - * deserializeAws_restJson1UserMetadata - */ -const de_UserMetadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_UserMetadata omitted. -/** - * deserializeAws_restJson1VideoParameters - */ -const de_VideoParameters = (output: any, context: __SerdeContext): VideoParameters => { - return { - AspectRatio: __expectString(output.AspectRatio), - BitRate: __expectString(output.BitRate), - Codec: __expectString(output.Codec), - CodecOptions: output.CodecOptions != null ? de_CodecOptions(output.CodecOptions, context) : undefined, - DisplayAspectRatio: __expectString(output.DisplayAspectRatio), - FixedGOP: __expectString(output.FixedGOP), - FrameRate: __expectString(output.FrameRate), - KeyframesMaxDist: __expectString(output.KeyframesMaxDist), - MaxFrameRate: __expectString(output.MaxFrameRate), - MaxHeight: __expectString(output.MaxHeight), - MaxWidth: __expectString(output.MaxWidth), - PaddingPolicy: __expectString(output.PaddingPolicy), - Resolution: __expectString(output.Resolution), - SizingPolicy: __expectString(output.SizingPolicy), - Watermarks: output.Watermarks != null ? de_PresetWatermarks(output.Watermarks, context) : undefined, - } as any; -}; +// de_VideoParameters omitted. -/** - * deserializeAws_restJson1Warning - */ -const de_Warning = (output: any, context: __SerdeContext): Warning => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_Warning omitted. -/** - * deserializeAws_restJson1Warnings - */ -const de_Warnings = (output: any, context: __SerdeContext): Warning[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Warning(entry, context); - }); - return retVal; -}; +// de_Warnings omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-elasticache/src/protocols/Aws_query.ts b/clients/client-elasticache/src/protocols/Aws_query.ts index 4352b20d560d..d1db0cd0863b 100644 --- a/clients/client-elasticache/src/protocols/Aws_query.ts +++ b/clients/client-elasticache/src/protocols/Aws_query.ts @@ -11,7 +11,7 @@ import { parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1595,7 +1595,7 @@ export const de_AddTagsToResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1649,10 +1649,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1675,7 +1674,7 @@ export const de_AuthorizeCacheSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1708,10 +1707,9 @@ const de_AuthorizeCacheSecurityGroupIngressCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1734,7 +1732,7 @@ export const de_BatchApplyUpdateActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1758,10 +1756,9 @@ const de_BatchApplyUpdateActionCommandError = async ( throw await de_ServiceUpdateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,7 +1781,7 @@ export const de_BatchStopUpdateActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1808,10 +1805,9 @@ const de_BatchStopUpdateActionCommandError = async ( throw await de_ServiceUpdateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1834,7 +1830,7 @@ export const de_CompleteMigrationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1861,10 +1857,9 @@ const de_CompleteMigrationCommandError = async ( throw await de_ReplicationGroupNotUnderMigrationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1887,7 +1882,7 @@ export const de_CopySnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1926,10 +1921,9 @@ const de_CopySnapshotCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1952,7 +1946,7 @@ export const de_CreateCacheClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2012,10 +2006,9 @@ const de_CreateCacheClusterCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2038,7 +2031,7 @@ export const de_CreateCacheParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2074,10 +2067,9 @@ const de_CreateCacheParameterGroupCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2100,7 +2092,7 @@ export const de_CreateCacheSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2133,10 +2125,9 @@ const de_CreateCacheSecurityGroupCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2159,7 +2150,7 @@ export const de_CreateCacheSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2195,10 +2186,9 @@ const de_CreateCacheSubnetGroupCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2221,7 +2211,7 @@ export const de_CreateGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2254,10 +2244,9 @@ const de_CreateGlobalReplicationGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2280,7 +2269,7 @@ export const de_CreateReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2355,10 +2344,9 @@ const de_CreateReplicationGroupCommandError = async ( throw await de_UserGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2381,7 +2369,7 @@ export const de_CreateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2429,10 +2417,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2455,7 +2442,7 @@ export const de_CreateUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2494,10 +2481,9 @@ const de_CreateUserCommandError = async ( throw await de_UserQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2520,7 +2506,7 @@ export const de_CreateUserGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2562,10 +2548,9 @@ const de_CreateUserGroupCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2591,7 +2576,7 @@ export const de_DecreaseNodeGroupsInGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2621,10 +2606,9 @@ const de_DecreaseNodeGroupsInGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2647,7 +2631,7 @@ export const de_DecreaseReplicaCountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2701,10 +2685,9 @@ const de_DecreaseReplicaCountCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2727,7 +2710,7 @@ export const de_DeleteCacheClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2766,10 +2749,9 @@ const de_DeleteCacheClusterCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2789,7 +2771,7 @@ export const de_DeleteCacheParameterGroupCommand = async ( const response: DeleteCacheParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2819,10 +2801,9 @@ const de_DeleteCacheParameterGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2842,7 +2823,7 @@ export const de_DeleteCacheSecurityGroupCommand = async ( const response: DeleteCacheSecurityGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2872,10 +2853,9 @@ const de_DeleteCacheSecurityGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2895,7 +2875,7 @@ export const de_DeleteCacheSubnetGroupCommand = async ( const response: DeleteCacheSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2919,10 +2899,9 @@ const de_DeleteCacheSubnetGroupCommandError = async ( throw await de_CacheSubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2945,7 +2924,7 @@ export const de_DeleteGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2972,10 +2951,9 @@ const de_DeleteGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2998,7 +2976,7 @@ export const de_DeleteReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3037,10 +3015,9 @@ const de_DeleteReplicationGroupCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3063,7 +3040,7 @@ export const de_DeleteSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3093,10 +3070,9 @@ const de_DeleteSnapshotCommandError = async ( throw await de_SnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3119,7 +3095,7 @@ export const de_DeleteUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3152,10 +3128,9 @@ const de_DeleteUserCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3178,7 +3153,7 @@ export const de_DeleteUserGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3208,10 +3183,9 @@ const de_DeleteUserGroupCommandError = async ( throw await de_UserGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3234,7 +3208,7 @@ export const de_DescribeCacheClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3261,10 +3235,9 @@ const de_DescribeCacheClustersCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3287,7 +3260,7 @@ export const de_DescribeCacheEngineVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3303,10 +3276,9 @@ const de_DescribeCacheEngineVersionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3328,7 +3300,7 @@ export const de_DescribeCacheParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3355,10 +3327,9 @@ const de_DescribeCacheParameterGroupsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3381,7 +3352,7 @@ export const de_DescribeCacheParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3408,10 +3379,9 @@ const de_DescribeCacheParametersCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3434,7 +3404,7 @@ export const de_DescribeCacheSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3461,10 +3431,9 @@ const de_DescribeCacheSecurityGroupsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3487,7 +3456,7 @@ export const de_DescribeCacheSubnetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3508,10 +3477,9 @@ const de_DescribeCacheSubnetGroupsCommandError = async ( throw await de_CacheSubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3534,7 +3502,7 @@ export const de_DescribeEngineDefaultParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3558,10 +3526,9 @@ const de_DescribeEngineDefaultParametersCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3584,7 +3551,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3608,10 +3575,9 @@ const de_DescribeEventsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3634,7 +3600,7 @@ export const de_DescribeGlobalReplicationGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3661,10 +3627,9 @@ const de_DescribeGlobalReplicationGroupsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3687,7 +3652,7 @@ export const de_DescribeReplicationGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3714,10 +3679,9 @@ const de_DescribeReplicationGroupsCommandError = async ( throw await de_ReplicationGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3740,7 +3704,7 @@ export const de_DescribeReservedCacheNodesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3767,10 +3731,9 @@ const de_DescribeReservedCacheNodesCommandError = async ( throw await de_ReservedCacheNodeNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3793,7 +3756,7 @@ export const de_DescribeReservedCacheNodesOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3820,10 +3783,9 @@ const de_DescribeReservedCacheNodesOfferingsCommandError = async ( throw await de_ReservedCacheNodesOfferingNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3846,7 +3808,7 @@ export const de_DescribeServiceUpdatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3873,10 +3835,9 @@ const de_DescribeServiceUpdatesCommandError = async ( throw await de_ServiceUpdateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3899,7 +3860,7 @@ export const de_DescribeSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3929,10 +3890,9 @@ const de_DescribeSnapshotsCommandError = async ( throw await de_SnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3955,7 +3915,7 @@ export const de_DescribeUpdateActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3979,10 +3939,9 @@ const de_DescribeUpdateActionsCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4005,7 +3964,7 @@ export const de_DescribeUserGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4032,10 +3991,9 @@ const de_DescribeUserGroupsCommandError = async ( throw await de_UserGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4058,7 +4016,7 @@ export const de_DescribeUsersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4085,10 +4043,9 @@ const de_DescribeUsersCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4111,7 +4068,7 @@ export const de_DisassociateGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4141,10 +4098,9 @@ const de_DisassociateGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4167,7 +4123,7 @@ export const de_FailoverGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4197,10 +4153,9 @@ const de_FailoverGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4226,7 +4181,7 @@ export const de_IncreaseNodeGroupsInGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4253,10 +4208,9 @@ const de_IncreaseNodeGroupsInGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4279,7 +4233,7 @@ export const de_IncreaseReplicaCountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4333,10 +4287,9 @@ const de_IncreaseReplicaCountCommandError = async ( throw await de_ReplicationGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4359,7 +4312,7 @@ export const de_ListAllowedNodeTypeModificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4389,10 +4342,9 @@ const de_ListAllowedNodeTypeModificationsCommandError = async ( throw await de_ReplicationGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4415,7 +4367,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4466,10 +4418,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4492,7 +4443,7 @@ export const de_ModifyCacheClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4543,10 +4494,9 @@ const de_ModifyCacheClusterCommandError = async ( throw await de_NodeQuotaForCustomerExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4569,7 +4519,7 @@ export const de_ModifyCacheParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4602,10 +4552,9 @@ const de_ModifyCacheParameterGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4628,7 +4577,7 @@ export const de_ModifyCacheSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4661,10 +4610,9 @@ const de_ModifyCacheSubnetGroupCommandError = async ( throw await de_SubnetNotAllowedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4687,7 +4635,7 @@ export const de_ModifyGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4714,10 +4662,9 @@ const de_ModifyGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4740,7 +4687,7 @@ export const de_ModifyReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4806,10 +4753,9 @@ const de_ModifyReplicationGroupCommandError = async ( throw await de_UserGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4835,7 +4781,7 @@ export const de_ModifyReplicationGroupShardConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4883,10 +4829,9 @@ const de_ModifyReplicationGroupShardConfigurationCommandError = async ( throw await de_ReplicationGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4909,7 +4854,7 @@ export const de_ModifyUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4942,10 +4887,9 @@ const de_ModifyUserCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4968,7 +4912,7 @@ export const de_ModifyUserGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5010,10 +4954,9 @@ const de_ModifyUserGroupCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5036,7 +4979,7 @@ export const de_PurchaseReservedCacheNodesOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5072,10 +5015,9 @@ const de_PurchaseReservedCacheNodesOfferingCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5101,7 +5043,7 @@ export const de_RebalanceSlotsInGlobalReplicationGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5128,10 +5070,9 @@ const de_RebalanceSlotsInGlobalReplicationGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5154,7 +5095,7 @@ export const de_RebootCacheClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5178,10 +5119,9 @@ const de_RebootCacheClusterCommandError = async ( throw await de_InvalidCacheClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5204,7 +5144,7 @@ export const de_RemoveTagsFromResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5258,10 +5198,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5284,7 +5223,7 @@ export const de_ResetCacheParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5317,10 +5256,9 @@ const de_ResetCacheParameterGroupCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5343,7 +5281,7 @@ export const de_RevokeCacheSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5376,10 +5314,9 @@ const de_RevokeCacheSecurityGroupIngressCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5402,7 +5339,7 @@ export const de_StartMigrationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5432,10 +5369,9 @@ const de_StartMigrationCommandError = async ( throw await de_ReplicationGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5458,7 +5394,7 @@ export const de_TestFailoverCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5503,10 +5439,9 @@ const de_TestFailoverCommandError = async ( throw await de_TestFailoverNotAvailableFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -13366,6 +13301,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-elasticsearch-service/src/protocols/Aws_restJson1.ts b/clients/client-elasticsearch-service/src/protocols/Aws_restJson1.ts index 09eb0b90ccf0..a4e181fd40fd 100644 --- a/clients/client-elasticsearch-service/src/protocols/Aws_restJson1.ts +++ b/clients/client-elasticsearch-service/src/protocols/Aws_restJson1.ts @@ -1,20 +1,21 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -178,37 +179,30 @@ import { ElasticsearchServiceServiceException as __BaseException } from "../mode import { AccessDeniedException, AccessPoliciesStatus, - AdditionalLimit, AdvancedOptionsStatus, AdvancedSecurityOptions, AdvancedSecurityOptionsInput, AdvancedSecurityOptionsStatus, - AuthorizedPrincipal, AutoTune, AutoTuneDetails, AutoTuneMaintenanceSchedule, AutoTuneOptions, AutoTuneOptionsInput, - AutoTuneOptionsOutput, AutoTuneOptionsStatus, AutoTuneStatus, BaseException, - ChangeProgressDetails, ChangeProgressStage, ChangeProgressStatusDetails, CognitoOptions, CognitoOptionsStatus, ColdStorageOptions, - CompatibleVersionsMap, ConflictException, DescribePackagesFilter, DisabledOperationException, DomainEndpointOptions, DomainEndpointOptionsStatus, - DomainInfo, DomainInformation, DomainPackageDetails, - DryRunResults, Duration, EBSOptions, EBSOptionsStatus, @@ -219,27 +213,17 @@ import { ElasticsearchVersionStatus, EncryptionAtRestOptions, EncryptionAtRestOptionsStatus, - ErrorDetails, - ESPartitionInstanceType, Filter, - InboundCrossClusterSearchConnection, - InboundCrossClusterSearchConnectionStatus, - InstanceCountLimits, - InstanceLimits, InternalException, InvalidPaginationTokenException, InvalidTypeException, LimitExceededException, - Limits, LogPublishingOption, LogPublishingOptionsStatus, - LogType, MasterUserOptions, NodeToNodeEncryptionOptions, NodeToNodeEncryptionOptionsStatus, OptionStatus, - OutboundCrossClusterSearchConnection, - OutboundCrossClusterSearchConnectionStatus, PackageDetails, PackageSource, PackageVersionHistory, @@ -250,22 +234,15 @@ import { ResourceNotFoundException, SAMLIdp, SAMLOptionsInput, - SAMLOptionsOutput, ScheduledAutoTuneDetails, ServiceSoftwareOptions, SnapshotOptions, SnapshotOptionsStatus, - StorageType, - StorageTypeLimit, Tag, UpgradeHistory, UpgradeStepItem, ValidationException, - VPCDerivedInfo, VPCDerivedInfoStatus, - VpcEndpoint, - VpcEndpointError, - VpcEndpointSummary, VPCOptions, ZoneAwarenessConfig, } from "../models/models_0"; @@ -315,10 +292,12 @@ export const se_AddTagsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/tags"; let body: any; - body = JSON.stringify({ - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }); + body = JSON.stringify( + take(input, { + ARN: [], + TagList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -372,9 +351,11 @@ export const se_AuthorizeVpcEndpointAccessCommand = async ( "/2015-01-01/es/domain/{DomainName}/authorizeVpcEndpointAccess"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Account != null && { Account: input.Account }), - }); + body = JSON.stringify( + take(input, { + Account: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -401,9 +382,11 @@ export const se_CancelElasticsearchServiceSoftwareUpdateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/serviceSoftwareUpdate/cancel"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -428,36 +411,26 @@ export const se_CreateElasticsearchDomainCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/domain"; let body: any; - body = JSON.stringify({ - ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }), - ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }), - ...(input.AdvancedSecurityOptions != null && { - AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context), - }), - ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptionsInput(input.AutoTuneOptions, context) }), - ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }), - ...(input.DomainEndpointOptions != null && { - DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context), - }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }), - ...(input.ElasticsearchClusterConfig != null && { - ElasticsearchClusterConfig: se_ElasticsearchClusterConfig(input.ElasticsearchClusterConfig, context), - }), - ...(input.ElasticsearchVersion != null && { ElasticsearchVersion: input.ElasticsearchVersion }), - ...(input.EncryptionAtRestOptions != null && { - EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context), - }), - ...(input.LogPublishingOptions != null && { - LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context), - }), - ...(input.NodeToNodeEncryptionOptions != null && { - NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context), - }), - ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }), - }); + body = JSON.stringify( + take(input, { + AccessPolicies: [], + AdvancedOptions: (_) => _json(_), + AdvancedSecurityOptions: (_) => _json(_), + AutoTuneOptions: (_) => se_AutoTuneOptionsInput(_, context), + CognitoOptions: (_) => _json(_), + DomainEndpointOptions: (_) => _json(_), + DomainName: [], + EBSOptions: (_) => _json(_), + ElasticsearchClusterConfig: (_) => _json(_), + ElasticsearchVersion: [], + EncryptionAtRestOptions: (_) => _json(_), + LogPublishingOptions: (_) => _json(_), + NodeToNodeEncryptionOptions: (_) => _json(_), + SnapshotOptions: (_) => _json(_), + TagList: (_) => _json(_), + VPCOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -483,13 +456,13 @@ export const se_CreateOutboundCrossClusterSearchConnectionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/ccs/outboundConnection"; let body: any; - body = JSON.stringify({ - ...(input.ConnectionAlias != null && { ConnectionAlias: input.ConnectionAlias }), - ...(input.DestinationDomainInfo != null && { - DestinationDomainInfo: se_DomainInformation(input.DestinationDomainInfo, context), - }), - ...(input.SourceDomainInfo != null && { SourceDomainInfo: se_DomainInformation(input.SourceDomainInfo, context) }), - }); + body = JSON.stringify( + take(input, { + ConnectionAlias: [], + DestinationDomainInfo: (_) => _json(_), + SourceDomainInfo: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -514,12 +487,14 @@ export const se_CreatePackageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages"; let body: any; - body = JSON.stringify({ - ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }), - ...(input.PackageName != null && { PackageName: input.PackageName }), - ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }), - ...(input.PackageType != null && { PackageType: input.PackageType }), - }); + body = JSON.stringify( + take(input, { + PackageDescription: [], + PackageName: [], + PackageSource: (_) => _json(_), + PackageType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -545,11 +520,13 @@ export const se_CreateVpcEndpointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints"; let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DomainArn != null && { DomainArn: input.DomainArn }), - ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + DomainArn: [], + VpcOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -746,10 +723,12 @@ export const se_DescribeDomainAutoTunesCommand = async ( "/2015-01-01/es/domain/{DomainName}/autoTunes"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -852,9 +831,11 @@ export const se_DescribeElasticsearchDomainsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/domain-info"; let body: any; - body = JSON.stringify({ - ...(input.DomainNames != null && { DomainNames: se_DomainNameList(input.DomainNames, context) }), - }); + body = JSON.stringify( + take(input, { + DomainNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -925,11 +906,13 @@ export const se_DescribeInboundCrossClusterSearchConnectionsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/ccs/inboundConnection/search"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -956,11 +939,13 @@ export const se_DescribeOutboundCrossClusterSearchConnectionsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/ccs/outboundConnection/search"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -986,11 +971,13 @@ export const se_DescribePackagesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages/describe"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_DescribePackagesFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1074,9 +1061,11 @@ export const se_DescribeVpcEndpointsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints/describe"; let body: any; - body = JSON.stringify({ - ...(input.VpcEndpointIds != null && { VpcEndpointIds: se_VpcEndpointIdList(input.VpcEndpointIds, context) }), - }); + body = JSON.stringify( + take(input, { + VpcEndpointIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1501,13 +1490,13 @@ export const se_PurchaseReservedElasticsearchInstanceOfferingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/purchaseReservedInstanceOffering"; let body: any; - body = JSON.stringify({ - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.ReservationName != null && { ReservationName: input.ReservationName }), - ...(input.ReservedElasticsearchInstanceOfferingId != null && { - ReservedElasticsearchInstanceOfferingId: input.ReservedElasticsearchInstanceOfferingId, - }), - }); + body = JSON.stringify( + take(input, { + InstanceCount: [], + ReservationName: [], + ReservedElasticsearchInstanceOfferingId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1565,10 +1554,12 @@ export const se_RemoveTagsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/tags-removal"; let body: any; - body = JSON.stringify({ - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.TagKeys != null && { TagKeys: se_StringList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1596,9 +1587,11 @@ export const se_RevokeVpcEndpointAccessCommand = async ( "/2015-01-01/es/domain/{DomainName}/revokeVpcEndpointAccess"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Account != null && { Account: input.Account }), - }); + body = JSON.stringify( + take(input, { + Account: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1625,9 +1618,11 @@ export const se_StartElasticsearchServiceSoftwareUpdateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/serviceSoftwareUpdate/start"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1654,34 +1649,24 @@ export const se_UpdateElasticsearchDomainConfigCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/domain/{DomainName}/config"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }), - ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }), - ...(input.AdvancedSecurityOptions != null && { - AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context), - }), - ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptions(input.AutoTuneOptions, context) }), - ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }), - ...(input.DomainEndpointOptions != null && { - DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context), - }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }), - ...(input.ElasticsearchClusterConfig != null && { - ElasticsearchClusterConfig: se_ElasticsearchClusterConfig(input.ElasticsearchClusterConfig, context), - }), - ...(input.EncryptionAtRestOptions != null && { - EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context), - }), - ...(input.LogPublishingOptions != null && { - LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context), - }), - ...(input.NodeToNodeEncryptionOptions != null && { - NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context), - }), - ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }), - ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }), - }); + body = JSON.stringify( + take(input, { + AccessPolicies: [], + AdvancedOptions: (_) => _json(_), + AdvancedSecurityOptions: (_) => _json(_), + AutoTuneOptions: (_) => se_AutoTuneOptions(_, context), + CognitoOptions: (_) => _json(_), + DomainEndpointOptions: (_) => _json(_), + DryRun: [], + EBSOptions: (_) => _json(_), + ElasticsearchClusterConfig: (_) => _json(_), + EncryptionAtRestOptions: (_) => _json(_), + LogPublishingOptions: (_) => _json(_), + NodeToNodeEncryptionOptions: (_) => _json(_), + SnapshotOptions: (_) => _json(_), + VPCOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1707,12 +1692,14 @@ export const se_UpdatePackageCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/packages/update"; let body: any; - body = JSON.stringify({ - ...(input.CommitMessage != null && { CommitMessage: input.CommitMessage }), - ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }), - ...(input.PackageID != null && { PackageID: input.PackageID }), - ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }), - }); + body = JSON.stringify( + take(input, { + CommitMessage: [], + PackageDescription: [], + PackageID: [], + PackageSource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1738,10 +1725,12 @@ export const se_UpdateVpcEndpointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/vpcEndpoints/update"; let body: any; - body = JSON.stringify({ - ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }), - ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }), - }); + body = JSON.stringify( + take(input, { + VpcEndpointId: [], + VpcOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1767,11 +1756,13 @@ export const se_UpgradeElasticsearchDomainCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-01-01/es/upgradeDomain"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.PerformCheckOnly != null && { PerformCheckOnly: input.PerformCheckOnly }), - ...(input.TargetVersion != null && { TargetVersion: input.TargetVersion }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + PerformCheckOnly: [], + TargetVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1797,12 +1788,10 @@ export const de_AcceptInboundCrossClusterSearchConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossClusterSearchConnection != null) { - contents.CrossClusterSearchConnection = de_InboundCrossClusterSearchConnection( - data.CrossClusterSearchConnection, - context - ); - } + const doc = take(data, { + CrossClusterSearchConnection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1830,10 +1819,9 @@ const de_AcceptInboundCrossClusterSearchConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1883,10 +1871,9 @@ const de_AddTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1906,9 +1893,10 @@ export const de_AssociatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetails != null) { - contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context); - } + const doc = take(data, { + DomainPackageDetails: (_) => de_DomainPackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1945,10 +1933,9 @@ const de_AssociatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1968,9 +1955,10 @@ export const de_AuthorizeVpcEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthorizedPrincipal != null) { - contents.AuthorizedPrincipal = de_AuthorizedPrincipal(data.AuthorizedPrincipal, context); - } + const doc = take(data, { + AuthorizedPrincipal: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2007,10 +1995,9 @@ const de_AuthorizeVpcEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2030,9 +2017,10 @@ export const de_CancelElasticsearchServiceSoftwareUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServiceSoftwareOptions != null) { - contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context); - } + const doc = take(data, { + ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2063,10 +2051,9 @@ const de_CancelElasticsearchServiceSoftwareUpdateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2086,9 +2073,10 @@ export const de_CreateElasticsearchDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatus != null) { - contents.DomainStatus = de_ElasticsearchDomainStatus(data.DomainStatus, context); - } + const doc = take(data, { + DomainStatus: (_) => de_ElasticsearchDomainStatus(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2128,10 +2116,9 @@ const de_CreateElasticsearchDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2151,21 +2138,14 @@ export const de_CreateOutboundCrossClusterSearchConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionAlias != null) { - contents.ConnectionAlias = __expectString(data.ConnectionAlias); - } - if (data.ConnectionStatus != null) { - contents.ConnectionStatus = de_OutboundCrossClusterSearchConnectionStatus(data.ConnectionStatus, context); - } - if (data.CrossClusterSearchConnectionId != null) { - contents.CrossClusterSearchConnectionId = __expectString(data.CrossClusterSearchConnectionId); - } - if (data.DestinationDomainInfo != null) { - contents.DestinationDomainInfo = de_DomainInformation(data.DestinationDomainInfo, context); - } - if (data.SourceDomainInfo != null) { - contents.SourceDomainInfo = de_DomainInformation(data.SourceDomainInfo, context); - } + const doc = take(data, { + ConnectionAlias: __expectString, + ConnectionStatus: _json, + CrossClusterSearchConnectionId: __expectString, + DestinationDomainInfo: _json, + SourceDomainInfo: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2196,10 +2176,9 @@ const de_CreateOutboundCrossClusterSearchConnectionCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2219,9 +2198,10 @@ export const de_CreatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PackageDetails != null) { - contents.PackageDetails = de_PackageDetails(data.PackageDetails, context); - } + const doc = take(data, { + PackageDetails: (_) => de_PackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2261,10 +2241,9 @@ const de_CreatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2284,9 +2263,10 @@ export const de_CreateVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpoint != null) { - contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context); - } + const doc = take(data, { + VpcEndpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2323,10 +2303,9 @@ const de_CreateVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2346,9 +2325,10 @@ export const de_DeleteElasticsearchDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatus != null) { - contents.DomainStatus = de_ElasticsearchDomainStatus(data.DomainStatus, context); - } + const doc = take(data, { + DomainStatus: (_) => de_ElasticsearchDomainStatus(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2379,10 +2359,9 @@ const de_DeleteElasticsearchDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2429,10 +2408,9 @@ const de_DeleteElasticsearchServiceRoleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2452,12 +2430,10 @@ export const de_DeleteInboundCrossClusterSearchConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossClusterSearchConnection != null) { - contents.CrossClusterSearchConnection = de_InboundCrossClusterSearchConnection( - data.CrossClusterSearchConnection, - context - ); - } + const doc = take(data, { + CrossClusterSearchConnection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2482,10 +2458,9 @@ const de_DeleteInboundCrossClusterSearchConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,12 +2480,10 @@ export const de_DeleteOutboundCrossClusterSearchConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossClusterSearchConnection != null) { - contents.CrossClusterSearchConnection = de_OutboundCrossClusterSearchConnection( - data.CrossClusterSearchConnection, - context - ); - } + const doc = take(data, { + CrossClusterSearchConnection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2535,10 +2508,9 @@ const de_DeleteOutboundCrossClusterSearchConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2558,9 +2530,10 @@ export const de_DeletePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PackageDetails != null) { - contents.PackageDetails = de_PackageDetails(data.PackageDetails, context); - } + const doc = take(data, { + PackageDetails: (_) => de_PackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2597,10 +2570,9 @@ const de_DeletePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2620,9 +2592,10 @@ export const de_DeleteVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpointSummary != null) { - contents.VpcEndpointSummary = de_VpcEndpointSummary(data.VpcEndpointSummary, context); - } + const doc = take(data, { + VpcEndpointSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2653,10 +2626,9 @@ const de_DeleteVpcEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,12 +2648,11 @@ export const de_DescribeDomainAutoTunesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AutoTunes != null) { - contents.AutoTunes = de_AutoTuneList(data.AutoTunes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AutoTunes: (_) => de_AutoTuneList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2712,10 +2683,9 @@ const de_DescribeDomainAutoTunesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2735,9 +2705,10 @@ export const de_DescribeDomainChangeProgressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeProgressStatus != null) { - contents.ChangeProgressStatus = de_ChangeProgressStatusDetails(data.ChangeProgressStatus, context); - } + const doc = take(data, { + ChangeProgressStatus: (_) => de_ChangeProgressStatusDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2768,10 +2739,9 @@ const de_DescribeDomainChangeProgressCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2791,9 +2761,10 @@ export const de_DescribeElasticsearchDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatus != null) { - contents.DomainStatus = de_ElasticsearchDomainStatus(data.DomainStatus, context); - } + const doc = take(data, { + DomainStatus: (_) => de_ElasticsearchDomainStatus(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2824,10 +2795,9 @@ const de_DescribeElasticsearchDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2847,9 +2817,10 @@ export const de_DescribeElasticsearchDomainConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainConfig != null) { - contents.DomainConfig = de_ElasticsearchDomainConfig(data.DomainConfig, context); - } + const doc = take(data, { + DomainConfig: (_) => de_ElasticsearchDomainConfig(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2880,10 +2851,9 @@ const de_DescribeElasticsearchDomainConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2903,9 +2873,10 @@ export const de_DescribeElasticsearchDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatusList != null) { - contents.DomainStatusList = de_ElasticsearchDomainStatusList(data.DomainStatusList, context); - } + const doc = take(data, { + DomainStatusList: (_) => de_ElasticsearchDomainStatusList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2933,10 +2904,9 @@ const de_DescribeElasticsearchDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2956,9 +2926,10 @@ export const de_DescribeElasticsearchInstanceTypeLimitsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LimitsByRole != null) { - contents.LimitsByRole = de_LimitsByRole(data.LimitsByRole, context); - } + const doc = take(data, { + LimitsByRole: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2995,10 +2966,9 @@ const de_DescribeElasticsearchInstanceTypeLimitsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3018,15 +2988,11 @@ export const de_DescribeInboundCrossClusterSearchConnectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossClusterSearchConnections != null) { - contents.CrossClusterSearchConnections = de_InboundCrossClusterSearchConnections( - data.CrossClusterSearchConnections, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CrossClusterSearchConnections: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3051,10 +3017,9 @@ const de_DescribeInboundCrossClusterSearchConnectionsCommandError = async ( throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3074,15 +3039,11 @@ export const de_DescribeOutboundCrossClusterSearchConnectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossClusterSearchConnections != null) { - contents.CrossClusterSearchConnections = de_OutboundCrossClusterSearchConnections( - data.CrossClusterSearchConnections, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CrossClusterSearchConnections: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3107,10 +3068,9 @@ const de_DescribeOutboundCrossClusterSearchConnectionsCommandError = async ( throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3130,12 +3090,11 @@ export const de_DescribePackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PackageDetailsList != null) { - contents.PackageDetailsList = de_PackageDetailsList(data.PackageDetailsList, context); - } + const doc = take(data, { + NextToken: __expectString, + PackageDetailsList: (_) => de_PackageDetailsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3169,10 +3128,9 @@ const de_DescribePackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3192,15 +3150,11 @@ export const de_DescribeReservedElasticsearchInstanceOfferingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReservedElasticsearchInstanceOfferings != null) { - contents.ReservedElasticsearchInstanceOfferings = de_ReservedElasticsearchInstanceOfferingList( - data.ReservedElasticsearchInstanceOfferings, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + ReservedElasticsearchInstanceOfferings: (_) => de_ReservedElasticsearchInstanceOfferingList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3231,10 +3185,9 @@ const de_DescribeReservedElasticsearchInstanceOfferingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3254,15 +3207,11 @@ export const de_DescribeReservedElasticsearchInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReservedElasticsearchInstances != null) { - contents.ReservedElasticsearchInstances = de_ReservedElasticsearchInstanceList( - data.ReservedElasticsearchInstances, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + ReservedElasticsearchInstances: (_) => de_ReservedElasticsearchInstanceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3293,10 +3242,9 @@ const de_DescribeReservedElasticsearchInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3316,12 +3264,11 @@ export const de_DescribeVpcEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpointErrors != null) { - contents.VpcEndpointErrors = de_VpcEndpointErrorList(data.VpcEndpointErrors, context); - } - if (data.VpcEndpoints != null) { - contents.VpcEndpoints = de_VpcEndpoints(data.VpcEndpoints, context); - } + const doc = take(data, { + VpcEndpointErrors: _json, + VpcEndpoints: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3352,10 +3299,9 @@ const de_DescribeVpcEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3375,9 +3321,10 @@ export const de_DissociatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetails != null) { - contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context); - } + const doc = take(data, { + DomainPackageDetails: (_) => de_DomainPackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3414,10 +3361,9 @@ const de_DissociatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3437,12 +3383,10 @@ export const de_GetCompatibleElasticsearchVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompatibleElasticsearchVersions != null) { - contents.CompatibleElasticsearchVersions = de_CompatibleElasticsearchVersionsList( - data.CompatibleElasticsearchVersions, - context - ); - } + const doc = take(data, { + CompatibleElasticsearchVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3476,10 +3420,9 @@ const de_GetCompatibleElasticsearchVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3499,15 +3442,12 @@ export const de_GetPackageVersionHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PackageID != null) { - contents.PackageID = __expectString(data.PackageID); - } - if (data.PackageVersionHistoryList != null) { - contents.PackageVersionHistoryList = de_PackageVersionHistoryList(data.PackageVersionHistoryList, context); - } + const doc = take(data, { + NextToken: __expectString, + PackageID: __expectString, + PackageVersionHistoryList: (_) => de_PackageVersionHistoryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3541,10 +3481,9 @@ const de_GetPackageVersionHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3564,12 +3503,11 @@ export const de_GetUpgradeHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.UpgradeHistories != null) { - contents.UpgradeHistories = de_UpgradeHistoryList(data.UpgradeHistories, context); - } + const doc = take(data, { + NextToken: __expectString, + UpgradeHistories: (_) => de_UpgradeHistoryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3603,10 +3541,9 @@ const de_GetUpgradeHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,15 +3563,12 @@ export const de_GetUpgradeStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StepStatus != null) { - contents.StepStatus = __expectString(data.StepStatus); - } - if (data.UpgradeName != null) { - contents.UpgradeName = __expectString(data.UpgradeName); - } - if (data.UpgradeStep != null) { - contents.UpgradeStep = __expectString(data.UpgradeStep); - } + const doc = take(data, { + StepStatus: __expectString, + UpgradeName: __expectString, + UpgradeStep: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3668,10 +3602,9 @@ const de_GetUpgradeStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3691,9 +3624,10 @@ export const de_ListDomainNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainNames != null) { - contents.DomainNames = de_DomainInfoList(data.DomainNames, context); - } + const doc = take(data, { + DomainNames: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3718,10 +3652,9 @@ const de_ListDomainNamesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3741,12 +3674,11 @@ export const de_ListDomainsForPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetailsList != null) { - contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3780,10 +3712,9 @@ const de_ListDomainsForPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3803,12 +3734,11 @@ export const de_ListElasticsearchInstanceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ElasticsearchInstanceTypes != null) { - contents.ElasticsearchInstanceTypes = de_ElasticsearchInstanceTypeList(data.ElasticsearchInstanceTypes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ElasticsearchInstanceTypes: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3839,10 +3769,9 @@ const de_ListElasticsearchInstanceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3862,12 +3791,11 @@ export const de_ListElasticsearchVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ElasticsearchVersions != null) { - contents.ElasticsearchVersions = de_ElasticsearchVersionList(data.ElasticsearchVersions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ElasticsearchVersions: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3898,10 +3826,9 @@ const de_ListElasticsearchVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3921,12 +3848,11 @@ export const de_ListPackagesForDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetailsList != null) { - contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3960,10 +3886,9 @@ const de_ListPackagesForDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3983,9 +3908,10 @@ export const de_ListTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TagList != null) { - contents.TagList = de_TagList(data.TagList, context); - } + const doc = take(data, { + TagList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4016,10 +3942,9 @@ const de_ListTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4039,12 +3964,11 @@ export const de_ListVpcEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthorizedPrincipalList != null) { - contents.AuthorizedPrincipalList = de_AuthorizedPrincipalList(data.AuthorizedPrincipalList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AuthorizedPrincipalList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4075,10 +3999,9 @@ const de_ListVpcEndpointAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4098,12 +4021,11 @@ export const de_ListVpcEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VpcEndpointSummaryList != null) { - contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + VpcEndpointSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4131,10 +4053,9 @@ const de_ListVpcEndpointsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4154,12 +4075,11 @@ export const de_ListVpcEndpointsForDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VpcEndpointSummaryList != null) { - contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + VpcEndpointSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4190,10 +4110,9 @@ const de_ListVpcEndpointsForDomainCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4213,12 +4132,11 @@ export const de_PurchaseReservedElasticsearchInstanceOfferingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReservationName != null) { - contents.ReservationName = __expectString(data.ReservationName); - } - if (data.ReservedElasticsearchInstanceId != null) { - contents.ReservedElasticsearchInstanceId = __expectString(data.ReservedElasticsearchInstanceId); - } + const doc = take(data, { + ReservationName: __expectString, + ReservedElasticsearchInstanceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4255,10 +4173,9 @@ const de_PurchaseReservedElasticsearchInstanceOfferingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4278,12 +4195,10 @@ export const de_RejectInboundCrossClusterSearchConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossClusterSearchConnection != null) { - contents.CrossClusterSearchConnection = de_InboundCrossClusterSearchConnection( - data.CrossClusterSearchConnection, - context - ); - } + const doc = take(data, { + CrossClusterSearchConnection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4308,10 +4223,9 @@ const de_RejectInboundCrossClusterSearchConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4358,10 +4272,9 @@ const de_RemoveTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4414,10 +4327,9 @@ const de_RevokeVpcEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4437,9 +4349,10 @@ export const de_StartElasticsearchServiceSoftwareUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServiceSoftwareOptions != null) { - contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context); - } + const doc = take(data, { + ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4470,10 +4383,9 @@ const de_StartElasticsearchServiceSoftwareUpdateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4493,12 +4405,11 @@ export const de_UpdateElasticsearchDomainConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainConfig != null) { - contents.DomainConfig = de_ElasticsearchDomainConfig(data.DomainConfig, context); - } - if (data.DryRunResults != null) { - contents.DryRunResults = de_DryRunResults(data.DryRunResults, context); - } + const doc = take(data, { + DomainConfig: (_) => de_ElasticsearchDomainConfig(_, context), + DryRunResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4535,10 +4446,9 @@ const de_UpdateElasticsearchDomainConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4558,9 +4468,10 @@ export const de_UpdatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PackageDetails != null) { - contents.PackageDetails = de_PackageDetails(data.PackageDetails, context); - } + const doc = take(data, { + PackageDetails: (_) => de_PackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4597,10 +4508,9 @@ const de_UpdatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4620,9 +4530,10 @@ export const de_UpdateVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpoint != null) { - contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context); - } + const doc = take(data, { + VpcEndpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4659,10 +4570,9 @@ const de_UpdateVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4682,18 +4592,13 @@ export const de_UpgradeElasticsearchDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeProgressDetails != null) { - contents.ChangeProgressDetails = de_ChangeProgressDetails(data.ChangeProgressDetails, context); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.PerformCheckOnly != null) { - contents.PerformCheckOnly = __expectBoolean(data.PerformCheckOnly); - } - if (data.TargetVersion != null) { - contents.TargetVersion = __expectString(data.TargetVersion); - } + const doc = take(data, { + ChangeProgressDetails: _json, + DomainName: __expectString, + PerformCheckOnly: __expectBoolean, + TargetVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4730,16 +4635,15 @@ const de_UpgradeElasticsearchDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4749,9 +4653,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4765,9 +4670,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BaseExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BaseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4781,9 +4687,10 @@ const de_BaseExceptionRes = async (parsedOutput: any, context: __SerdeContext): const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4800,9 +4707,10 @@ const de_DisabledOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DisabledOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4816,9 +4724,10 @@ const de_DisabledOperationExceptionRes = async ( const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4835,9 +4744,10 @@ const de_InvalidPaginationTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidPaginationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4854,9 +4764,10 @@ const de_InvalidTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4873,9 +4784,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4892,9 +4804,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4911,9 +4824,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4927,9 +4841,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4937,47 +4852,19 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdvancedOptions - */ -const se_AdvancedOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AdvancedOptions omitted. -/** - * serializeAws_restJson1AdvancedSecurityOptionsInput - */ -const se_AdvancedSecurityOptionsInput = (input: AdvancedSecurityOptionsInput, context: __SerdeContext): any => { - return { - ...(input.AnonymousAuthEnabled != null && { AnonymousAuthEnabled: input.AnonymousAuthEnabled }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.InternalUserDatabaseEnabled != null && { - InternalUserDatabaseEnabled: input.InternalUserDatabaseEnabled, - }), - ...(input.MasterUserOptions != null && { - MasterUserOptions: se_MasterUserOptions(input.MasterUserOptions, context), - }), - ...(input.SAMLOptions != null && { SAMLOptions: se_SAMLOptionsInput(input.SAMLOptions, context) }), - }; -}; +// se_AdvancedSecurityOptionsInput omitted. /** * serializeAws_restJson1AutoTuneMaintenanceSchedule */ const se_AutoTuneMaintenanceSchedule = (input: AutoTuneMaintenanceSchedule, context: __SerdeContext): any => { - return { - ...(input.CronExpressionForRecurrence != null && { - CronExpressionForRecurrence: input.CronExpressionForRecurrence, - }), - ...(input.Duration != null && { Duration: se_Duration(input.Duration, context) }), - ...(input.StartAt != null && { StartAt: Math.round(input.StartAt.getTime() / 1000) }), - }; + return take(input, { + CronExpressionForRecurrence: [], + Duration: _json, + StartAt: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -4995,495 +4882,160 @@ const se_AutoTuneMaintenanceScheduleList = (input: AutoTuneMaintenanceSchedule[] * serializeAws_restJson1AutoTuneOptions */ const se_AutoTuneOptions = (input: AutoTuneOptions, context: __SerdeContext): any => { - return { - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.MaintenanceSchedules != null && { - MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context), - }), - ...(input.RollbackOnDisable != null && { RollbackOnDisable: input.RollbackOnDisable }), - }; + return take(input, { + DesiredState: [], + MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context), + RollbackOnDisable: [], + }); }; /** * serializeAws_restJson1AutoTuneOptionsInput */ const se_AutoTuneOptionsInput = (input: AutoTuneOptionsInput, context: __SerdeContext): any => { - return { - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.MaintenanceSchedules != null && { - MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context), - }), - }; + return take(input, { + DesiredState: [], + MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context), + }); }; +// se_CognitoOptions omitted. + +// se_ColdStorageOptions omitted. + +// se_DescribePackagesFilter omitted. + +// se_DescribePackagesFilterList omitted. + +// se_DescribePackagesFilterValues omitted. + +// se_DomainEndpointOptions omitted. + +// se_DomainInformation omitted. + +// se_DomainNameList omitted. + +// se_Duration omitted. + +// se_EBSOptions omitted. + +// se_ElasticsearchClusterConfig omitted. + +// se_EncryptionAtRestOptions omitted. + +// se_Filter omitted. + +// se_FilterList omitted. + +// se_LogPublishingOption omitted. + +// se_LogPublishingOptions omitted. + +// se_MasterUserOptions omitted. + +// se_NodeToNodeEncryptionOptions omitted. + +// se_PackageSource omitted. + +// se_SAMLIdp omitted. + +// se_SAMLOptionsInput omitted. + +// se_SnapshotOptions omitted. + +// se_StringList omitted. + +// se_Tag omitted. + +// se_TagList omitted. + +// se_ValueStringList omitted. + +// se_VpcEndpointIdList omitted. + +// se_VPCOptions omitted. + +// se_ZoneAwarenessConfig omitted. + /** - * serializeAws_restJson1CognitoOptions + * deserializeAws_restJson1AccessPoliciesStatus */ -const se_CognitoOptions = (input: CognitoOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; +const de_AccessPoliciesStatus = (output: any, context: __SerdeContext): AccessPoliciesStatus => { + return take(output, { + Options: __expectString, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; +// de_AdditionalLimit omitted. + +// de_AdditionalLimitList omitted. + +// de_AdvancedOptions omitted. + /** - * serializeAws_restJson1ColdStorageOptions + * deserializeAws_restJson1AdvancedOptionsStatus */ -const se_ColdStorageOptions = (input: ColdStorageOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; +const de_AdvancedOptionsStatus = (output: any, context: __SerdeContext): AdvancedOptionsStatus => { + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; /** - * serializeAws_restJson1DescribePackagesFilter + * deserializeAws_restJson1AdvancedSecurityOptions */ -const se_DescribePackagesFilter = (input: DescribePackagesFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: se_DescribePackagesFilterValues(input.Value, context) }), - }; +const de_AdvancedSecurityOptions = (output: any, context: __SerdeContext): AdvancedSecurityOptions => { + return take(output, { + AnonymousAuthDisableDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AnonymousAuthEnabled: __expectBoolean, + Enabled: __expectBoolean, + InternalUserDatabaseEnabled: __expectBoolean, + SAMLOptions: _json, + }) as any; }; /** - * serializeAws_restJson1DescribePackagesFilterList + * deserializeAws_restJson1AdvancedSecurityOptionsStatus */ -const se_DescribePackagesFilterList = (input: DescribePackagesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DescribePackagesFilter(entry, context); - }); +const de_AdvancedSecurityOptionsStatus = (output: any, context: __SerdeContext): AdvancedSecurityOptionsStatus => { + return take(output, { + Options: (_: any) => de_AdvancedSecurityOptions(_, context), + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; +// de_AuthorizedPrincipal omitted. + +// de_AuthorizedPrincipalList omitted. + /** - * serializeAws_restJson1DescribePackagesFilterValues + * deserializeAws_restJson1AutoTune */ -const se_DescribePackagesFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_AutoTune = (output: any, context: __SerdeContext): AutoTune => { + return take(output, { + AutoTuneDetails: (_: any) => de_AutoTuneDetails(_, context), + AutoTuneType: __expectString, + }) as any; }; /** - * serializeAws_restJson1DomainEndpointOptions + * deserializeAws_restJson1AutoTuneDetails */ -const se_DomainEndpointOptions = (input: DomainEndpointOptions, context: __SerdeContext): any => { - return { - ...(input.CustomEndpoint != null && { CustomEndpoint: input.CustomEndpoint }), - ...(input.CustomEndpointCertificateArn != null && { - CustomEndpointCertificateArn: input.CustomEndpointCertificateArn, - }), - ...(input.CustomEndpointEnabled != null && { CustomEndpointEnabled: input.CustomEndpointEnabled }), - ...(input.EnforceHTTPS != null && { EnforceHTTPS: input.EnforceHTTPS }), - ...(input.TLSSecurityPolicy != null && { TLSSecurityPolicy: input.TLSSecurityPolicy }), - }; +const de_AutoTuneDetails = (output: any, context: __SerdeContext): AutoTuneDetails => { + return take(output, { + ScheduledAutoTuneDetails: (_: any) => de_ScheduledAutoTuneDetails(_, context), + }) as any; }; /** - * serializeAws_restJson1DomainInformation - */ -const se_DomainInformation = (input: DomainInformation, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.Region != null && { Region: input.Region }), - }; -}; - -/** - * serializeAws_restJson1DomainNameList - */ -const se_DomainNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Duration - */ -const se_Duration = (input: Duration, context: __SerdeContext): any => { - return { - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1EBSOptions - */ -const se_EBSOptions = (input: EBSOptions, context: __SerdeContext): any => { - return { - ...(input.EBSEnabled != null && { EBSEnabled: input.EBSEnabled }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.Throughput != null && { Throughput: input.Throughput }), - ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; - -/** - * serializeAws_restJson1ElasticsearchClusterConfig - */ -const se_ElasticsearchClusterConfig = (input: ElasticsearchClusterConfig, context: __SerdeContext): any => { - return { - ...(input.ColdStorageOptions != null && { - ColdStorageOptions: se_ColdStorageOptions(input.ColdStorageOptions, context), - }), - ...(input.DedicatedMasterCount != null && { DedicatedMasterCount: input.DedicatedMasterCount }), - ...(input.DedicatedMasterEnabled != null && { DedicatedMasterEnabled: input.DedicatedMasterEnabled }), - ...(input.DedicatedMasterType != null && { DedicatedMasterType: input.DedicatedMasterType }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.WarmCount != null && { WarmCount: input.WarmCount }), - ...(input.WarmEnabled != null && { WarmEnabled: input.WarmEnabled }), - ...(input.WarmType != null && { WarmType: input.WarmType }), - ...(input.ZoneAwarenessConfig != null && { - ZoneAwarenessConfig: se_ZoneAwarenessConfig(input.ZoneAwarenessConfig, context), - }), - ...(input.ZoneAwarenessEnabled != null && { ZoneAwarenessEnabled: input.ZoneAwarenessEnabled }), - }; -}; - -/** - * serializeAws_restJson1EncryptionAtRestOptions - */ -const se_EncryptionAtRestOptions = (input: EncryptionAtRestOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; - -/** - * serializeAws_restJson1LogPublishingOption - */ -const se_LogPublishingOption = (input: LogPublishingOption, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1LogPublishingOptions - */ -const se_LogPublishingOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [LogType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_LogPublishingOption(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1MasterUserOptions - */ -const se_MasterUserOptions = (input: MasterUserOptions, context: __SerdeContext): any => { - return { - ...(input.MasterUserARN != null && { MasterUserARN: input.MasterUserARN }), - ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }), - ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }), - }; -}; - -/** - * serializeAws_restJson1NodeToNodeEncryptionOptions - */ -const se_NodeToNodeEncryptionOptions = (input: NodeToNodeEncryptionOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1PackageSource - */ -const se_PackageSource = (input: PackageSource, context: __SerdeContext): any => { - return { - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - }; -}; - -/** - * serializeAws_restJson1SAMLIdp - */ -const se_SAMLIdp = (input: SAMLIdp, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.MetadataContent != null && { MetadataContent: input.MetadataContent }), - }; -}; - -/** - * serializeAws_restJson1SAMLOptionsInput - */ -const se_SAMLOptionsInput = (input: SAMLOptionsInput, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.Idp != null && { Idp: se_SAMLIdp(input.Idp, context) }), - ...(input.MasterBackendRole != null && { MasterBackendRole: input.MasterBackendRole }), - ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }), - ...(input.RolesKey != null && { RolesKey: input.RolesKey }), - ...(input.SessionTimeoutMinutes != null && { SessionTimeoutMinutes: input.SessionTimeoutMinutes }), - ...(input.SubjectKey != null && { SubjectKey: input.SubjectKey }), - }; -}; - -/** - * serializeAws_restJson1SnapshotOptions - */ -const se_SnapshotOptions = (input: SnapshotOptions, context: __SerdeContext): any => { - return { - ...(input.AutomatedSnapshotStartHour != null && { AutomatedSnapshotStartHour: input.AutomatedSnapshotStartHour }), - }; -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1ValueStringList - */ -const se_ValueStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1VpcEndpointIdList - */ -const se_VpcEndpointIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1VPCOptions - */ -const se_VPCOptions = (input: VPCOptions, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_StringList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_StringList(input.SubnetIds, context) }), - }; -}; - -/** - * serializeAws_restJson1ZoneAwarenessConfig - */ -const se_ZoneAwarenessConfig = (input: ZoneAwarenessConfig, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }), - }; -}; - -/** - * deserializeAws_restJson1AccessPoliciesStatus - */ -const de_AccessPoliciesStatus = (output: any, context: __SerdeContext): AccessPoliciesStatus => { - return { - Options: __expectString(output.Options), - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AdditionalLimit - */ -const de_AdditionalLimit = (output: any, context: __SerdeContext): AdditionalLimit => { - return { - LimitName: __expectString(output.LimitName), - LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AdditionalLimitList - */ -const de_AdditionalLimitList = (output: any, context: __SerdeContext): AdditionalLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalLimit(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdvancedOptions - */ -const de_AdvancedOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AdvancedOptionsStatus - */ -const de_AdvancedOptionsStatus = (output: any, context: __SerdeContext): AdvancedOptionsStatus => { - return { - Options: output.Options != null ? de_AdvancedOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AdvancedSecurityOptions - */ -const de_AdvancedSecurityOptions = (output: any, context: __SerdeContext): AdvancedSecurityOptions => { - return { - AnonymousAuthDisableDate: - output.AnonymousAuthDisableDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AnonymousAuthDisableDate))) - : undefined, - AnonymousAuthEnabled: __expectBoolean(output.AnonymousAuthEnabled), - Enabled: __expectBoolean(output.Enabled), - InternalUserDatabaseEnabled: __expectBoolean(output.InternalUserDatabaseEnabled), - SAMLOptions: output.SAMLOptions != null ? de_SAMLOptionsOutput(output.SAMLOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AdvancedSecurityOptionsStatus - */ -const de_AdvancedSecurityOptionsStatus = (output: any, context: __SerdeContext): AdvancedSecurityOptionsStatus => { - return { - Options: output.Options != null ? de_AdvancedSecurityOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AuthorizedPrincipal - */ -const de_AuthorizedPrincipal = (output: any, context: __SerdeContext): AuthorizedPrincipal => { - return { - Principal: __expectString(output.Principal), - PrincipalType: __expectString(output.PrincipalType), - } as any; -}; - -/** - * deserializeAws_restJson1AuthorizedPrincipalList - */ -const de_AuthorizedPrincipalList = (output: any, context: __SerdeContext): AuthorizedPrincipal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthorizedPrincipal(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AutoTune - */ -const de_AutoTune = (output: any, context: __SerdeContext): AutoTune => { - return { - AutoTuneDetails: output.AutoTuneDetails != null ? de_AutoTuneDetails(output.AutoTuneDetails, context) : undefined, - AutoTuneType: __expectString(output.AutoTuneType), - } as any; -}; - -/** - * deserializeAws_restJson1AutoTuneDetails - */ -const de_AutoTuneDetails = (output: any, context: __SerdeContext): AutoTuneDetails => { - return { - ScheduledAutoTuneDetails: - output.ScheduledAutoTuneDetails != null - ? de_ScheduledAutoTuneDetails(output.ScheduledAutoTuneDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AutoTuneList + * deserializeAws_restJson1AutoTuneList */ const de_AutoTuneList = (output: any, context: __SerdeContext): AutoTune[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutoTune(entry, context); }); return retVal; @@ -5493,12 +5045,11 @@ const de_AutoTuneList = (output: any, context: __SerdeContext): AutoTune[] => { * deserializeAws_restJson1AutoTuneMaintenanceSchedule */ const de_AutoTuneMaintenanceSchedule = (output: any, context: __SerdeContext): AutoTuneMaintenanceSchedule => { - return { - CronExpressionForRecurrence: __expectString(output.CronExpressionForRecurrence), - Duration: output.Duration != null ? de_Duration(output.Duration, context) : undefined, - StartAt: - output.StartAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartAt))) : undefined, - } as any; + return take(output, { + CronExpressionForRecurrence: __expectString, + Duration: _json, + StartAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5508,9 +5059,6 @@ const de_AutoTuneMaintenanceScheduleList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutoTuneMaintenanceSchedule(entry, context); }); return retVal; @@ -5520,77 +5068,51 @@ const de_AutoTuneMaintenanceScheduleList = (output: any, context: __SerdeContext * deserializeAws_restJson1AutoTuneOptions */ const de_AutoTuneOptions = (output: any, context: __SerdeContext): AutoTuneOptions => { - return { - DesiredState: __expectString(output.DesiredState), - MaintenanceSchedules: - output.MaintenanceSchedules != null - ? de_AutoTuneMaintenanceScheduleList(output.MaintenanceSchedules, context) - : undefined, - RollbackOnDisable: __expectString(output.RollbackOnDisable), - } as any; + return take(output, { + DesiredState: __expectString, + MaintenanceSchedules: (_: any) => de_AutoTuneMaintenanceScheduleList(_, context), + RollbackOnDisable: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AutoTuneOptionsOutput - */ -const de_AutoTuneOptionsOutput = (output: any, context: __SerdeContext): AutoTuneOptionsOutput => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - State: __expectString(output.State), - } as any; -}; +// de_AutoTuneOptionsOutput omitted. /** * deserializeAws_restJson1AutoTuneOptionsStatus */ const de_AutoTuneOptionsStatus = (output: any, context: __SerdeContext): AutoTuneOptionsStatus => { - return { - Options: output.Options != null ? de_AutoTuneOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_AutoTuneStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: (_: any) => de_AutoTuneOptions(_, context), + Status: (_: any) => de_AutoTuneStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1AutoTuneStatus */ const de_AutoTuneStatus = (output: any, context: __SerdeContext): AutoTuneStatus => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - PendingDeletion: __expectBoolean(output.PendingDeletion), - State: __expectString(output.State), - UpdateDate: - output.UpdateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDate))) : undefined, - UpdateVersion: __expectInt32(output.UpdateVersion), - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + PendingDeletion: __expectBoolean, + State: __expectString, + UpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdateVersion: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1ChangeProgressDetails - */ -const de_ChangeProgressDetails = (output: any, context: __SerdeContext): ChangeProgressDetails => { - return { - ChangeId: __expectString(output.ChangeId), - Message: __expectString(output.Message), - } as any; -}; +// de_ChangeProgressDetails omitted. /** * deserializeAws_restJson1ChangeProgressStage */ const de_ChangeProgressStage = (output: any, context: __SerdeContext): ChangeProgressStage => { - return { - Description: __expectString(output.Description), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + Description: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; /** @@ -5600,9 +5122,6 @@ const de_ChangeProgressStageList = (output: any, context: __SerdeContext): Chang const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChangeProgressStage(entry, context); }); return retVal; @@ -5612,156 +5131,68 @@ const de_ChangeProgressStageList = (output: any, context: __SerdeContext): Chang * deserializeAws_restJson1ChangeProgressStatusDetails */ const de_ChangeProgressStatusDetails = (output: any, context: __SerdeContext): ChangeProgressStatusDetails => { - return { - ChangeId: __expectString(output.ChangeId), - ChangeProgressStages: - output.ChangeProgressStages != null - ? de_ChangeProgressStageList(output.ChangeProgressStages, context) - : undefined, - CompletedProperties: - output.CompletedProperties != null ? de_StringList(output.CompletedProperties, context) : undefined, - PendingProperties: output.PendingProperties != null ? de_StringList(output.PendingProperties, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - TotalNumberOfStages: __expectInt32(output.TotalNumberOfStages), - } as any; + return take(output, { + ChangeId: __expectString, + ChangeProgressStages: (_: any) => de_ChangeProgressStageList(_, context), + CompletedProperties: _json, + PendingProperties: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TotalNumberOfStages: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1CognitoOptions - */ -const de_CognitoOptions = (output: any, context: __SerdeContext): CognitoOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - IdentityPoolId: __expectString(output.IdentityPoolId), - RoleArn: __expectString(output.RoleArn), - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; +// de_CognitoOptions omitted. /** * deserializeAws_restJson1CognitoOptionsStatus */ const de_CognitoOptionsStatus = (output: any, context: __SerdeContext): CognitoOptionsStatus => { - return { - Options: output.Options != null ? de_CognitoOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1ColdStorageOptions - */ -const de_ColdStorageOptions = (output: any, context: __SerdeContext): ColdStorageOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_ColdStorageOptions omitted. -/** - * deserializeAws_restJson1CompatibleElasticsearchVersionsList - */ -const de_CompatibleElasticsearchVersionsList = (output: any, context: __SerdeContext): CompatibleVersionsMap[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CompatibleVersionsMap(entry, context); - }); - return retVal; -}; +// de_CompatibleElasticsearchVersionsList omitted. -/** - * deserializeAws_restJson1CompatibleVersionsMap - */ -const de_CompatibleVersionsMap = (output: any, context: __SerdeContext): CompatibleVersionsMap => { - return { - SourceVersion: __expectString(output.SourceVersion), - TargetVersions: - output.TargetVersions != null ? de_ElasticsearchVersionList(output.TargetVersions, context) : undefined, - } as any; -}; +// de_CompatibleVersionsMap omitted. -/** - * deserializeAws_restJson1DomainEndpointOptions - */ -const de_DomainEndpointOptions = (output: any, context: __SerdeContext): DomainEndpointOptions => { - return { - CustomEndpoint: __expectString(output.CustomEndpoint), - CustomEndpointCertificateArn: __expectString(output.CustomEndpointCertificateArn), - CustomEndpointEnabled: __expectBoolean(output.CustomEndpointEnabled), - EnforceHTTPS: __expectBoolean(output.EnforceHTTPS), - TLSSecurityPolicy: __expectString(output.TLSSecurityPolicy), - } as any; -}; +// de_DomainEndpointOptions omitted. /** * deserializeAws_restJson1DomainEndpointOptionsStatus */ const de_DomainEndpointOptionsStatus = (output: any, context: __SerdeContext): DomainEndpointOptionsStatus => { - return { - Options: output.Options != null ? de_DomainEndpointOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1DomainInfo - */ -const de_DomainInfo = (output: any, context: __SerdeContext): DomainInfo => { - return { - DomainName: __expectString(output.DomainName), - EngineType: __expectString(output.EngineType), - } as any; -}; +// de_DomainInfo omitted. -/** - * deserializeAws_restJson1DomainInfoList - */ -const de_DomainInfoList = (output: any, context: __SerdeContext): DomainInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainInfo(entry, context); - }); - return retVal; -}; +// de_DomainInfoList omitted. -/** - * deserializeAws_restJson1DomainInformation - */ -const de_DomainInformation = (output: any, context: __SerdeContext): DomainInformation => { - return { - DomainName: __expectString(output.DomainName), - OwnerId: __expectString(output.OwnerId), - Region: __expectString(output.Region), - } as any; -}; +// de_DomainInformation omitted. /** * deserializeAws_restJson1DomainPackageDetails */ const de_DomainPackageDetails = (output: any, context: __SerdeContext): DomainPackageDetails => { - return { - DomainName: __expectString(output.DomainName), - DomainPackageStatus: __expectString(output.DomainPackageStatus), - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - PackageID: __expectString(output.PackageID), - PackageName: __expectString(output.PackageName), - PackageType: __expectString(output.PackageType), - PackageVersion: __expectString(output.PackageVersion), - ReferencePath: __expectString(output.ReferencePath), - } as any; + return take(output, { + DomainName: __expectString, + DomainPackageStatus: __expectString, + ErrorDetails: _json, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageID: __expectString, + PackageName: __expectString, + PackageType: __expectString, + PackageVersion: __expectString, + ReferencePath: __expectString, + }) as any; }; /** @@ -5771,77 +5202,28 @@ const de_DomainPackageDetailsList = (output: any, context: __SerdeContext): Doma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainPackageDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DryRunResults - */ -const de_DryRunResults = (output: any, context: __SerdeContext): DryRunResults => { - return { - DeploymentType: __expectString(output.DeploymentType), - Message: __expectString(output.Message), - } as any; -}; +// de_DryRunResults omitted. -/** - * deserializeAws_restJson1Duration - */ -const de_Duration = (output: any, context: __SerdeContext): Duration => { - return { - Unit: __expectString(output.Unit), - Value: __expectLong(output.Value), - } as any; -}; +// de_Duration omitted. -/** - * deserializeAws_restJson1EBSOptions - */ -const de_EBSOptions = (output: any, context: __SerdeContext): EBSOptions => { - return { - EBSEnabled: __expectBoolean(output.EBSEnabled), - Iops: __expectInt32(output.Iops), - Throughput: __expectInt32(output.Throughput), - VolumeSize: __expectInt32(output.VolumeSize), - VolumeType: __expectString(output.VolumeType), - } as any; -}; +// de_EBSOptions omitted. /** * deserializeAws_restJson1EBSOptionsStatus */ const de_EBSOptionsStatus = (output: any, context: __SerdeContext): EBSOptionsStatus => { - return { - Options: output.Options != null ? de_EBSOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1ElasticsearchClusterConfig - */ -const de_ElasticsearchClusterConfig = (output: any, context: __SerdeContext): ElasticsearchClusterConfig => { - return { - ColdStorageOptions: - output.ColdStorageOptions != null ? de_ColdStorageOptions(output.ColdStorageOptions, context) : undefined, - DedicatedMasterCount: __expectInt32(output.DedicatedMasterCount), - DedicatedMasterEnabled: __expectBoolean(output.DedicatedMasterEnabled), - DedicatedMasterType: __expectString(output.DedicatedMasterType), - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - WarmCount: __expectInt32(output.WarmCount), - WarmEnabled: __expectBoolean(output.WarmEnabled), - WarmType: __expectString(output.WarmType), - ZoneAwarenessConfig: - output.ZoneAwarenessConfig != null ? de_ZoneAwarenessConfig(output.ZoneAwarenessConfig, context) : undefined, - ZoneAwarenessEnabled: __expectBoolean(output.ZoneAwarenessEnabled), - } as any; -}; +// de_ElasticsearchClusterConfig omitted. /** * deserializeAws_restJson1ElasticsearchClusterConfigStatus @@ -5850,116 +5232,66 @@ const de_ElasticsearchClusterConfigStatus = ( output: any, context: __SerdeContext ): ElasticsearchClusterConfigStatus => { - return { - Options: output.Options != null ? de_ElasticsearchClusterConfig(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1ElasticsearchDomainConfig */ const de_ElasticsearchDomainConfig = (output: any, context: __SerdeContext): ElasticsearchDomainConfig => { - return { - AccessPolicies: output.AccessPolicies != null ? de_AccessPoliciesStatus(output.AccessPolicies, context) : undefined, - AdvancedOptions: - output.AdvancedOptions != null ? de_AdvancedOptionsStatus(output.AdvancedOptions, context) : undefined, - AdvancedSecurityOptions: - output.AdvancedSecurityOptions != null - ? de_AdvancedSecurityOptionsStatus(output.AdvancedSecurityOptions, context) - : undefined, - AutoTuneOptions: - output.AutoTuneOptions != null ? de_AutoTuneOptionsStatus(output.AutoTuneOptions, context) : undefined, - ChangeProgressDetails: - output.ChangeProgressDetails != null - ? de_ChangeProgressDetails(output.ChangeProgressDetails, context) - : undefined, - CognitoOptions: output.CognitoOptions != null ? de_CognitoOptionsStatus(output.CognitoOptions, context) : undefined, - DomainEndpointOptions: - output.DomainEndpointOptions != null - ? de_DomainEndpointOptionsStatus(output.DomainEndpointOptions, context) - : undefined, - EBSOptions: output.EBSOptions != null ? de_EBSOptionsStatus(output.EBSOptions, context) : undefined, - ElasticsearchClusterConfig: - output.ElasticsearchClusterConfig != null - ? de_ElasticsearchClusterConfigStatus(output.ElasticsearchClusterConfig, context) - : undefined, - ElasticsearchVersion: - output.ElasticsearchVersion != null - ? de_ElasticsearchVersionStatus(output.ElasticsearchVersion, context) - : undefined, - EncryptionAtRestOptions: - output.EncryptionAtRestOptions != null - ? de_EncryptionAtRestOptionsStatus(output.EncryptionAtRestOptions, context) - : undefined, - LogPublishingOptions: - output.LogPublishingOptions != null - ? de_LogPublishingOptionsStatus(output.LogPublishingOptions, context) - : undefined, - NodeToNodeEncryptionOptions: - output.NodeToNodeEncryptionOptions != null - ? de_NodeToNodeEncryptionOptionsStatus(output.NodeToNodeEncryptionOptions, context) - : undefined, - SnapshotOptions: - output.SnapshotOptions != null ? de_SnapshotOptionsStatus(output.SnapshotOptions, context) : undefined, - VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfoStatus(output.VPCOptions, context) : undefined, - } as any; + return take(output, { + AccessPolicies: (_: any) => de_AccessPoliciesStatus(_, context), + AdvancedOptions: (_: any) => de_AdvancedOptionsStatus(_, context), + AdvancedSecurityOptions: (_: any) => de_AdvancedSecurityOptionsStatus(_, context), + AutoTuneOptions: (_: any) => de_AutoTuneOptionsStatus(_, context), + ChangeProgressDetails: _json, + CognitoOptions: (_: any) => de_CognitoOptionsStatus(_, context), + DomainEndpointOptions: (_: any) => de_DomainEndpointOptionsStatus(_, context), + EBSOptions: (_: any) => de_EBSOptionsStatus(_, context), + ElasticsearchClusterConfig: (_: any) => de_ElasticsearchClusterConfigStatus(_, context), + ElasticsearchVersion: (_: any) => de_ElasticsearchVersionStatus(_, context), + EncryptionAtRestOptions: (_: any) => de_EncryptionAtRestOptionsStatus(_, context), + LogPublishingOptions: (_: any) => de_LogPublishingOptionsStatus(_, context), + NodeToNodeEncryptionOptions: (_: any) => de_NodeToNodeEncryptionOptionsStatus(_, context), + SnapshotOptions: (_: any) => de_SnapshotOptionsStatus(_, context), + VPCOptions: (_: any) => de_VPCDerivedInfoStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1ElasticsearchDomainStatus */ const de_ElasticsearchDomainStatus = (output: any, context: __SerdeContext): ElasticsearchDomainStatus => { - return { - ARN: __expectString(output.ARN), - AccessPolicies: __expectString(output.AccessPolicies), - AdvancedOptions: output.AdvancedOptions != null ? de_AdvancedOptions(output.AdvancedOptions, context) : undefined, - AdvancedSecurityOptions: - output.AdvancedSecurityOptions != null - ? de_AdvancedSecurityOptions(output.AdvancedSecurityOptions, context) - : undefined, - AutoTuneOptions: - output.AutoTuneOptions != null ? de_AutoTuneOptionsOutput(output.AutoTuneOptions, context) : undefined, - ChangeProgressDetails: - output.ChangeProgressDetails != null - ? de_ChangeProgressDetails(output.ChangeProgressDetails, context) - : undefined, - CognitoOptions: output.CognitoOptions != null ? de_CognitoOptions(output.CognitoOptions, context) : undefined, - Created: __expectBoolean(output.Created), - Deleted: __expectBoolean(output.Deleted), - DomainEndpointOptions: - output.DomainEndpointOptions != null - ? de_DomainEndpointOptions(output.DomainEndpointOptions, context) - : undefined, - DomainId: __expectString(output.DomainId), - DomainName: __expectString(output.DomainName), - EBSOptions: output.EBSOptions != null ? de_EBSOptions(output.EBSOptions, context) : undefined, - ElasticsearchClusterConfig: - output.ElasticsearchClusterConfig != null - ? de_ElasticsearchClusterConfig(output.ElasticsearchClusterConfig, context) - : undefined, - ElasticsearchVersion: __expectString(output.ElasticsearchVersion), - EncryptionAtRestOptions: - output.EncryptionAtRestOptions != null - ? de_EncryptionAtRestOptions(output.EncryptionAtRestOptions, context) - : undefined, - Endpoint: __expectString(output.Endpoint), - Endpoints: output.Endpoints != null ? de_EndpointsMap(output.Endpoints, context) : undefined, - LogPublishingOptions: - output.LogPublishingOptions != null ? de_LogPublishingOptions(output.LogPublishingOptions, context) : undefined, - NodeToNodeEncryptionOptions: - output.NodeToNodeEncryptionOptions != null - ? de_NodeToNodeEncryptionOptions(output.NodeToNodeEncryptionOptions, context) - : undefined, - Processing: __expectBoolean(output.Processing), - ServiceSoftwareOptions: - output.ServiceSoftwareOptions != null - ? de_ServiceSoftwareOptions(output.ServiceSoftwareOptions, context) - : undefined, - SnapshotOptions: output.SnapshotOptions != null ? de_SnapshotOptions(output.SnapshotOptions, context) : undefined, - UpgradeProcessing: __expectBoolean(output.UpgradeProcessing), - VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfo(output.VPCOptions, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + AccessPolicies: __expectString, + AdvancedOptions: _json, + AdvancedSecurityOptions: (_: any) => de_AdvancedSecurityOptions(_, context), + AutoTuneOptions: _json, + ChangeProgressDetails: _json, + CognitoOptions: _json, + Created: __expectBoolean, + Deleted: __expectBoolean, + DomainEndpointOptions: _json, + DomainId: __expectString, + DomainName: __expectString, + EBSOptions: _json, + ElasticsearchClusterConfig: _json, + ElasticsearchVersion: __expectString, + EncryptionAtRestOptions: _json, + Endpoint: __expectString, + Endpoints: _json, + LogPublishingOptions: _json, + NodeToNodeEncryptionOptions: _json, + Processing: __expectBoolean, + ServiceSoftwareOptions: (_: any) => de_ServiceSoftwareOptions(_, context), + SnapshotOptions: _json, + UpgradeProcessing: __expectBoolean, + VPCOptions: _json, + }) as any; }; /** @@ -5969,270 +5301,74 @@ const de_ElasticsearchDomainStatusList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ElasticsearchDomainStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ElasticsearchInstanceTypeList - */ -const de_ElasticsearchInstanceTypeList = ( - output: any, - context: __SerdeContext -): (ESPartitionInstanceType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ElasticsearchInstanceTypeList omitted. -/** - * deserializeAws_restJson1ElasticsearchVersionList - */ -const de_ElasticsearchVersionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ElasticsearchVersionList omitted. /** * deserializeAws_restJson1ElasticsearchVersionStatus */ const de_ElasticsearchVersionStatus = (output: any, context: __SerdeContext): ElasticsearchVersionStatus => { - return { - Options: __expectString(output.Options), - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: __expectString, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1EncryptionAtRestOptions - */ -const de_EncryptionAtRestOptions = (output: any, context: __SerdeContext): EncryptionAtRestOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// de_EncryptionAtRestOptions omitted. /** * deserializeAws_restJson1EncryptionAtRestOptionsStatus */ const de_EncryptionAtRestOptionsStatus = (output: any, context: __SerdeContext): EncryptionAtRestOptionsStatus => { - return { - Options: output.Options != null ? de_EncryptionAtRestOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1EndpointsMap - */ -const de_EndpointsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EndpointsMap omitted. -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - ErrorType: __expectString(output.ErrorType), - } as any; -}; +// de_ErrorDetails omitted. -/** - * deserializeAws_restJson1InboundCrossClusterSearchConnection - */ -const de_InboundCrossClusterSearchConnection = ( - output: any, - context: __SerdeContext -): InboundCrossClusterSearchConnection => { - return { - ConnectionStatus: - output.ConnectionStatus != null - ? de_InboundCrossClusterSearchConnectionStatus(output.ConnectionStatus, context) - : undefined, - CrossClusterSearchConnectionId: __expectString(output.CrossClusterSearchConnectionId), - DestinationDomainInfo: - output.DestinationDomainInfo != null ? de_DomainInformation(output.DestinationDomainInfo, context) : undefined, - SourceDomainInfo: - output.SourceDomainInfo != null ? de_DomainInformation(output.SourceDomainInfo, context) : undefined, - } as any; -}; +// de_InboundCrossClusterSearchConnection omitted. -/** - * deserializeAws_restJson1InboundCrossClusterSearchConnections - */ -const de_InboundCrossClusterSearchConnections = ( - output: any, - context: __SerdeContext -): InboundCrossClusterSearchConnection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InboundCrossClusterSearchConnection(entry, context); - }); - return retVal; -}; +// de_InboundCrossClusterSearchConnections omitted. -/** - * deserializeAws_restJson1InboundCrossClusterSearchConnectionStatus - */ -const de_InboundCrossClusterSearchConnectionStatus = ( - output: any, - context: __SerdeContext -): InboundCrossClusterSearchConnectionStatus => { - return { - Message: __expectString(output.Message), - StatusCode: __expectString(output.StatusCode), - } as any; -}; +// de_InboundCrossClusterSearchConnectionStatus omitted. -/** - * deserializeAws_restJson1InstanceCountLimits - */ -const de_InstanceCountLimits = (output: any, context: __SerdeContext): InstanceCountLimits => { - return { - MaximumInstanceCount: __expectInt32(output.MaximumInstanceCount), - MinimumInstanceCount: __expectInt32(output.MinimumInstanceCount), - } as any; -}; +// de_InstanceCountLimits omitted. -/** - * deserializeAws_restJson1InstanceLimits - */ -const de_InstanceLimits = (output: any, context: __SerdeContext): InstanceLimits => { - return { - InstanceCountLimits: - output.InstanceCountLimits != null ? de_InstanceCountLimits(output.InstanceCountLimits, context) : undefined, - } as any; -}; +// de_InstanceLimits omitted. -/** - * deserializeAws_restJson1Issues - */ -const de_Issues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Issues omitted. -/** - * deserializeAws_restJson1Limits - */ -const de_Limits = (output: any, context: __SerdeContext): Limits => { - return { - AdditionalLimits: - output.AdditionalLimits != null ? de_AdditionalLimitList(output.AdditionalLimits, context) : undefined, - InstanceLimits: output.InstanceLimits != null ? de_InstanceLimits(output.InstanceLimits, context) : undefined, - StorageTypes: output.StorageTypes != null ? de_StorageTypeList(output.StorageTypes, context) : undefined, - } as any; -}; +// de_Limits omitted. -/** - * deserializeAws_restJson1LimitsByRole - */ -const de_LimitsByRole = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Limits(value, context); - return acc; - }, {}); -}; +// de_LimitsByRole omitted. -/** - * deserializeAws_restJson1LimitValueList - */ -const de_LimitValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LimitValueList omitted. -/** - * deserializeAws_restJson1LogPublishingOption - */ -const de_LogPublishingOption = (output: any, context: __SerdeContext): LogPublishingOption => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_LogPublishingOption omitted. -/** - * deserializeAws_restJson1LogPublishingOptions - */ -const de_LogPublishingOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [LogType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_LogPublishingOption(value, context); - return acc; - }, - {} - ); -}; +// de_LogPublishingOptions omitted. /** * deserializeAws_restJson1LogPublishingOptionsStatus */ const de_LogPublishingOptionsStatus = (output: any, context: __SerdeContext): LogPublishingOptionsStatus => { - return { - Options: output.Options != null ? de_LogPublishingOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1NodeToNodeEncryptionOptions - */ -const de_NodeToNodeEncryptionOptions = (output: any, context: __SerdeContext): NodeToNodeEncryptionOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_NodeToNodeEncryptionOptions omitted. /** * deserializeAws_restJson1NodeToNodeEncryptionOptionsStatus @@ -6241,100 +5377,46 @@ const de_NodeToNodeEncryptionOptionsStatus = ( output: any, context: __SerdeContext ): NodeToNodeEncryptionOptionsStatus => { - return { - Options: output.Options != null ? de_NodeToNodeEncryptionOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1OptionStatus */ const de_OptionStatus = (output: any, context: __SerdeContext): OptionStatus => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - PendingDeletion: __expectBoolean(output.PendingDeletion), - State: __expectString(output.State), - UpdateDate: - output.UpdateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDate))) : undefined, - UpdateVersion: __expectInt32(output.UpdateVersion), - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PendingDeletion: __expectBoolean, + State: __expectString, + UpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdateVersion: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1OutboundCrossClusterSearchConnection - */ -const de_OutboundCrossClusterSearchConnection = ( - output: any, - context: __SerdeContext -): OutboundCrossClusterSearchConnection => { - return { - ConnectionAlias: __expectString(output.ConnectionAlias), - ConnectionStatus: - output.ConnectionStatus != null - ? de_OutboundCrossClusterSearchConnectionStatus(output.ConnectionStatus, context) - : undefined, - CrossClusterSearchConnectionId: __expectString(output.CrossClusterSearchConnectionId), - DestinationDomainInfo: - output.DestinationDomainInfo != null ? de_DomainInformation(output.DestinationDomainInfo, context) : undefined, - SourceDomainInfo: - output.SourceDomainInfo != null ? de_DomainInformation(output.SourceDomainInfo, context) : undefined, - } as any; -}; +// de_OutboundCrossClusterSearchConnection omitted. -/** - * deserializeAws_restJson1OutboundCrossClusterSearchConnections - */ -const de_OutboundCrossClusterSearchConnections = ( - output: any, - context: __SerdeContext -): OutboundCrossClusterSearchConnection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutboundCrossClusterSearchConnection(entry, context); - }); - return retVal; -}; +// de_OutboundCrossClusterSearchConnections omitted. -/** - * deserializeAws_restJson1OutboundCrossClusterSearchConnectionStatus - */ -const de_OutboundCrossClusterSearchConnectionStatus = ( - output: any, - context: __SerdeContext -): OutboundCrossClusterSearchConnectionStatus => { - return { - Message: __expectString(output.Message), - StatusCode: __expectString(output.StatusCode), - } as any; -}; +// de_OutboundCrossClusterSearchConnectionStatus omitted. /** * deserializeAws_restJson1PackageDetails */ const de_PackageDetails = (output: any, context: __SerdeContext): PackageDetails => { - return { - AvailablePackageVersion: __expectString(output.AvailablePackageVersion), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - PackageDescription: __expectString(output.PackageDescription), - PackageID: __expectString(output.PackageID), - PackageName: __expectString(output.PackageName), - PackageStatus: __expectString(output.PackageStatus), - PackageType: __expectString(output.PackageType), - } as any; + return take(output, { + AvailablePackageVersion: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorDetails: _json, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageDescription: __expectString, + PackageID: __expectString, + PackageName: __expectString, + PackageStatus: __expectString, + PackageType: __expectString, + }) as any; }; /** @@ -6344,9 +5426,6 @@ const de_PackageDetailsList = (output: any, context: __SerdeContext): PackageDet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageDetails(entry, context); }); return retVal; @@ -6356,12 +5435,11 @@ const de_PackageDetailsList = (output: any, context: __SerdeContext): PackageDet * deserializeAws_restJson1PackageVersionHistory */ const de_PackageVersionHistory = (output: any, context: __SerdeContext): PackageVersionHistory => { - return { - CommitMessage: __expectString(output.CommitMessage), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - PackageVersion: __expectString(output.PackageVersion), - } as any; + return take(output, { + CommitMessage: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageVersion: __expectString, + }) as any; }; /** @@ -6371,9 +5449,6 @@ const de_PackageVersionHistoryList = (output: any, context: __SerdeContext): Pac const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageVersionHistory(entry, context); }); return retVal; @@ -6383,10 +5458,10 @@ const de_PackageVersionHistoryList = (output: any, context: __SerdeContext): Pac * deserializeAws_restJson1RecurringCharge */ const de_RecurringCharge = (output: any, context: __SerdeContext): RecurringCharge => { - return { - RecurringChargeAmount: __limitedParseDouble(output.RecurringChargeAmount), - RecurringChargeFrequency: __expectString(output.RecurringChargeFrequency), - } as any; + return take(output, { + RecurringChargeAmount: __limitedParseDouble, + RecurringChargeFrequency: __expectString, + }) as any; }; /** @@ -6396,9 +5471,6 @@ const de_RecurringChargeList = (output: any, context: __SerdeContext): Recurring const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecurringCharge(entry, context); }); return retVal; @@ -6408,23 +5480,21 @@ const de_RecurringChargeList = (output: any, context: __SerdeContext): Recurring * deserializeAws_restJson1ReservedElasticsearchInstance */ const de_ReservedElasticsearchInstance = (output: any, context: __SerdeContext): ReservedElasticsearchInstance => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - Duration: __expectInt32(output.Duration), - ElasticsearchInstanceCount: __expectInt32(output.ElasticsearchInstanceCount), - ElasticsearchInstanceType: __expectString(output.ElasticsearchInstanceType), - FixedPrice: __limitedParseDouble(output.FixedPrice), - PaymentOption: __expectString(output.PaymentOption), - RecurringCharges: - output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined, - ReservationName: __expectString(output.ReservationName), - ReservedElasticsearchInstanceId: __expectString(output.ReservedElasticsearchInstanceId), - ReservedElasticsearchInstanceOfferingId: __expectString(output.ReservedElasticsearchInstanceOfferingId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - UsagePrice: __limitedParseDouble(output.UsagePrice), - } as any; + return take(output, { + CurrencyCode: __expectString, + Duration: __expectInt32, + ElasticsearchInstanceCount: __expectInt32, + ElasticsearchInstanceType: __expectString, + FixedPrice: __limitedParseDouble, + PaymentOption: __expectString, + RecurringCharges: (_: any) => de_RecurringChargeList(_, context), + ReservationName: __expectString, + ReservedElasticsearchInstanceId: __expectString, + ReservedElasticsearchInstanceOfferingId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + UsagePrice: __limitedParseDouble, + }) as any; }; /** @@ -6437,9 +5507,6 @@ const de_ReservedElasticsearchInstanceList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReservedElasticsearchInstance(entry, context); }); return retVal; @@ -6452,17 +5519,16 @@ const de_ReservedElasticsearchInstanceOffering = ( output: any, context: __SerdeContext ): ReservedElasticsearchInstanceOffering => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - Duration: __expectInt32(output.Duration), - ElasticsearchInstanceType: __expectString(output.ElasticsearchInstanceType), - FixedPrice: __limitedParseDouble(output.FixedPrice), - PaymentOption: __expectString(output.PaymentOption), - RecurringCharges: - output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined, - ReservedElasticsearchInstanceOfferingId: __expectString(output.ReservedElasticsearchInstanceOfferingId), - UsagePrice: __limitedParseDouble(output.UsagePrice), - } as any; + return take(output, { + CurrencyCode: __expectString, + Duration: __expectInt32, + ElasticsearchInstanceType: __expectString, + FixedPrice: __limitedParseDouble, + PaymentOption: __expectString, + RecurringCharges: (_: any) => de_RecurringChargeList(_, context), + ReservedElasticsearchInstanceOfferingId: __expectString, + UsagePrice: __limitedParseDouble, + }) as any; }; /** @@ -6475,192 +5541,79 @@ const de_ReservedElasticsearchInstanceOfferingList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReservedElasticsearchInstanceOffering(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SAMLIdp - */ -const de_SAMLIdp = (output: any, context: __SerdeContext): SAMLIdp => { - return { - EntityId: __expectString(output.EntityId), - MetadataContent: __expectString(output.MetadataContent), - } as any; -}; +// de_SAMLIdp omitted. -/** - * deserializeAws_restJson1SAMLOptionsOutput - */ -const de_SAMLOptionsOutput = (output: any, context: __SerdeContext): SAMLOptionsOutput => { - return { - Enabled: __expectBoolean(output.Enabled), - Idp: output.Idp != null ? de_SAMLIdp(output.Idp, context) : undefined, - RolesKey: __expectString(output.RolesKey), - SessionTimeoutMinutes: __expectInt32(output.SessionTimeoutMinutes), - SubjectKey: __expectString(output.SubjectKey), - } as any; -}; +// de_SAMLOptionsOutput omitted. /** * deserializeAws_restJson1ScheduledAutoTuneDetails */ const de_ScheduledAutoTuneDetails = (output: any, context: __SerdeContext): ScheduledAutoTuneDetails => { - return { - Action: __expectString(output.Action), - ActionType: __expectString(output.ActionType), - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - Severity: __expectString(output.Severity), - } as any; + return take(output, { + Action: __expectString, + ActionType: __expectString, + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Severity: __expectString, + }) as any; }; /** * deserializeAws_restJson1ServiceSoftwareOptions */ const de_ServiceSoftwareOptions = (output: any, context: __SerdeContext): ServiceSoftwareOptions => { - return { - AutomatedUpdateDate: - output.AutomatedUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AutomatedUpdateDate))) - : undefined, - Cancellable: __expectBoolean(output.Cancellable), - CurrentVersion: __expectString(output.CurrentVersion), - Description: __expectString(output.Description), - NewVersion: __expectString(output.NewVersion), - OptionalDeployment: __expectBoolean(output.OptionalDeployment), - UpdateAvailable: __expectBoolean(output.UpdateAvailable), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; + return take(output, { + AutomatedUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Cancellable: __expectBoolean, + CurrentVersion: __expectString, + Description: __expectString, + NewVersion: __expectString, + OptionalDeployment: __expectBoolean, + UpdateAvailable: __expectBoolean, + UpdateStatus: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SnapshotOptions - */ -const de_SnapshotOptions = (output: any, context: __SerdeContext): SnapshotOptions => { - return { - AutomatedSnapshotStartHour: __expectInt32(output.AutomatedSnapshotStartHour), - } as any; -}; +// de_SnapshotOptions omitted. /** * deserializeAws_restJson1SnapshotOptionsStatus */ const de_SnapshotOptionsStatus = (output: any, context: __SerdeContext): SnapshotOptionsStatus => { - return { - Options: output.Options != null ? de_SnapshotOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1StorageType - */ -const de_StorageType = (output: any, context: __SerdeContext): StorageType => { - return { - StorageSubTypeName: __expectString(output.StorageSubTypeName), - StorageTypeLimits: - output.StorageTypeLimits != null ? de_StorageTypeLimitList(output.StorageTypeLimits, context) : undefined, - StorageTypeName: __expectString(output.StorageTypeName), - } as any; -}; +// de_StorageType omitted. -/** - * deserializeAws_restJson1StorageTypeLimit - */ -const de_StorageTypeLimit = (output: any, context: __SerdeContext): StorageTypeLimit => { - return { - LimitName: __expectString(output.LimitName), - LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined, - } as any; -}; +// de_StorageTypeLimit omitted. -/** - * deserializeAws_restJson1StorageTypeLimitList - */ -const de_StorageTypeLimitList = (output: any, context: __SerdeContext): StorageTypeLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StorageTypeLimit(entry, context); - }); - return retVal; -}; +// de_StorageTypeLimitList omitted. -/** - * deserializeAws_restJson1StorageTypeList - */ -const de_StorageTypeList = (output: any, context: __SerdeContext): StorageType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StorageType(entry, context); - }); - return retVal; -}; +// de_StorageTypeList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1UpgradeHistory */ const de_UpgradeHistory = (output: any, context: __SerdeContext): UpgradeHistory => { - return { - StartTimestamp: - output.StartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp))) - : undefined, - StepsList: output.StepsList != null ? de_UpgradeStepsList(output.StepsList, context) : undefined, - UpgradeName: __expectString(output.UpgradeName), - UpgradeStatus: __expectString(output.UpgradeStatus), - } as any; + return take(output, { + StartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StepsList: (_: any) => de_UpgradeStepsList(_, context), + UpgradeName: __expectString, + UpgradeStatus: __expectString, + }) as any; }; /** @@ -6670,9 +5623,6 @@ const de_UpgradeHistoryList = (output: any, context: __SerdeContext): UpgradeHis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UpgradeHistory(entry, context); }); return retVal; @@ -6682,12 +5632,12 @@ const de_UpgradeHistoryList = (output: any, context: __SerdeContext): UpgradeHis * deserializeAws_restJson1UpgradeStepItem */ const de_UpgradeStepItem = (output: any, context: __SerdeContext): UpgradeStepItem => { - return { - Issues: output.Issues != null ? de_Issues(output.Issues, context) : undefined, - ProgressPercent: __limitedParseDouble(output.ProgressPercent), - UpgradeStep: __expectString(output.UpgradeStep), - UpgradeStepStatus: __expectString(output.UpgradeStepStatus), - } as any; + return take(output, { + Issues: _json, + ProgressPercent: __limitedParseDouble, + UpgradeStep: __expectString, + UpgradeStepStatus: __expectString, + }) as any; }; /** @@ -6697,126 +5647,36 @@ const de_UpgradeStepsList = (output: any, context: __SerdeContext): UpgradeStepI const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UpgradeStepItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VPCDerivedInfo - */ -const de_VPCDerivedInfo = (output: any, context: __SerdeContext): VPCDerivedInfo => { - return { - AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined, - SecurityGroupIds: output.SecurityGroupIds != null ? de_StringList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_StringList(output.SubnetIds, context) : undefined, - VPCId: __expectString(output.VPCId), - } as any; -}; +// de_VPCDerivedInfo omitted. /** * deserializeAws_restJson1VPCDerivedInfoStatus */ const de_VPCDerivedInfoStatus = (output: any, context: __SerdeContext): VPCDerivedInfoStatus => { - return { - Options: output.Options != null ? de_VPCDerivedInfo(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1VpcEndpoint - */ -const de_VpcEndpoint = (output: any, context: __SerdeContext): VpcEndpoint => { - return { - DomainArn: __expectString(output.DomainArn), - Endpoint: __expectString(output.Endpoint), - Status: __expectString(output.Status), - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcEndpointOwner: __expectString(output.VpcEndpointOwner), - VpcOptions: output.VpcOptions != null ? de_VPCDerivedInfo(output.VpcOptions, context) : undefined, - } as any; -}; +// de_VpcEndpoint omitted. -/** - * deserializeAws_restJson1VpcEndpointError - */ -const de_VpcEndpointError = (output: any, context: __SerdeContext): VpcEndpointError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - VpcEndpointId: __expectString(output.VpcEndpointId), - } as any; -}; +// de_VpcEndpointError omitted. -/** - * deserializeAws_restJson1VpcEndpointErrorList - */ -const de_VpcEndpointErrorList = (output: any, context: __SerdeContext): VpcEndpointError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointError(entry, context); - }); - return retVal; -}; +// de_VpcEndpointErrorList omitted. -/** - * deserializeAws_restJson1VpcEndpoints - */ -const de_VpcEndpoints = (output: any, context: __SerdeContext): VpcEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpoint(entry, context); - }); - return retVal; -}; +// de_VpcEndpoints omitted. -/** - * deserializeAws_restJson1VpcEndpointSummary - */ -const de_VpcEndpointSummary = (output: any, context: __SerdeContext): VpcEndpointSummary => { - return { - DomainArn: __expectString(output.DomainArn), - Status: __expectString(output.Status), - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcEndpointOwner: __expectString(output.VpcEndpointOwner), - } as any; -}; +// de_VpcEndpointSummary omitted. -/** - * deserializeAws_restJson1VpcEndpointSummaryList - */ -const de_VpcEndpointSummaryList = (output: any, context: __SerdeContext): VpcEndpointSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointSummary(entry, context); - }); - return retVal; -}; +// de_VpcEndpointSummaryList omitted. -/** - * deserializeAws_restJson1ZoneAwarenessConfig - */ -const de_ZoneAwarenessConfig = (output: any, context: __SerdeContext): ZoneAwarenessConfig => { - return { - AvailabilityZoneCount: __expectInt32(output.AvailabilityZoneCount), - } as any; -}; +// de_ZoneAwarenessConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-emr-containers/src/protocols/Aws_restJson1.ts b/clients/client-emr-containers/src/protocols/Aws_restJson1.ts index ad109d1a6884..3300e6cda7e9 100644 --- a/clients/client-emr-containers/src/protocols/Aws_restJson1.ts +++ b/clients/client-emr-containers/src/protocols/Aws_restJson1.ts @@ -1,17 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -71,7 +71,6 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { EMRContainersServiceException as __BaseException } from "../models/EMRContainersServiceException"; import { - Certificate, CloudWatchMonitoringConfiguration, Configuration, ConfigurationOverrides, @@ -91,7 +90,6 @@ import { ParametricS3MonitoringConfiguration, ResourceNotFoundException, RetryPolicyConfiguration, - RetryPolicyExecution, S3MonitoringConfiguration, SparkSqlJobDriver, SparkSubmitJobDriver, @@ -146,13 +144,15 @@ export const se_CreateJobTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.jobTemplateData != null && { jobTemplateData: se_JobTemplateData(input.jobTemplateData, context) }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + jobTemplateData: (_) => se_JobTemplateData(_, context), + kmsKeyArn: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -187,18 +187,18 @@ export const se_CreateManagedEndpointCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.configurationOverrides != null && { - configurationOverrides: se_ConfigurationOverrides(input.configurationOverrides, context), - }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.name != null && { name: input.name }), - ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + certificateArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + configurationOverrides: (_) => se_ConfigurationOverrides(_, context), + executionRoleArn: [], + name: [], + releaseLabel: [], + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -223,14 +223,14 @@ export const se_CreateVirtualClusterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/virtualclusters"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.containerProvider != null && { - containerProvider: se_ContainerProvider(input.containerProvider, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + containerProvider: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -646,24 +646,20 @@ export const se_StartJobRunCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.configurationOverrides != null && { - configurationOverrides: se_ConfigurationOverrides(input.configurationOverrides, context), - }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.jobDriver != null && { jobDriver: se_JobDriver(input.jobDriver, context) }), - ...(input.jobTemplateId != null && { jobTemplateId: input.jobTemplateId }), - ...(input.jobTemplateParameters != null && { - jobTemplateParameters: se_TemplateParameterInputMap(input.jobTemplateParameters, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }), - ...(input.retryPolicyConfiguration != null && { - retryPolicyConfiguration: se_RetryPolicyConfiguration(input.retryPolicyConfiguration, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + configurationOverrides: (_) => se_ConfigurationOverrides(_, context), + executionRoleArn: [], + jobDriver: (_) => _json(_), + jobTemplateId: [], + jobTemplateParameters: (_) => _json(_), + name: [], + releaseLabel: [], + retryPolicyConfiguration: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -689,9 +685,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -747,12 +745,11 @@ export const de_CancelJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.virtualClusterId != null) { - contents.virtualClusterId = __expectString(data.virtualClusterId); - } + const doc = take(data, { + id: __expectString, + virtualClusterId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -777,10 +774,9 @@ const de_CancelJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -800,18 +796,13 @@ export const de_CreateJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -839,10 +830,9 @@ const de_CreateJobTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -862,18 +852,13 @@ export const de_CreateManagedEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.virtualClusterId != null) { - contents.virtualClusterId = __expectString(data.virtualClusterId); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + name: __expectString, + virtualClusterId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -901,10 +886,9 @@ const de_CreateManagedEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -924,15 +908,12 @@ export const de_CreateVirtualClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -960,10 +941,9 @@ const de_CreateVirtualClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -983,9 +963,10 @@ export const de_DeleteJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1010,10 +991,9 @@ const de_DeleteJobTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1033,12 +1013,11 @@ export const de_DeleteManagedEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.virtualClusterId != null) { - contents.virtualClusterId = __expectString(data.virtualClusterId); - } + const doc = take(data, { + id: __expectString, + virtualClusterId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1063,10 +1042,9 @@ const de_DeleteManagedEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1086,9 +1064,10 @@ export const de_DeleteVirtualClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1113,10 +1092,9 @@ const de_DeleteVirtualClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1136,9 +1114,10 @@ export const de_DescribeJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobRun != null) { - contents.jobRun = de_JobRun(data.jobRun, context); - } + const doc = take(data, { + jobRun: (_) => de_JobRun(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1166,10 +1145,9 @@ const de_DescribeJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1189,9 +1167,10 @@ export const de_DescribeJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplate != null) { - contents.jobTemplate = de_JobTemplate(data.jobTemplate, context); - } + const doc = take(data, { + jobTemplate: (_) => de_JobTemplate(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1219,10 +1198,9 @@ const de_DescribeJobTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1242,9 +1220,10 @@ export const de_DescribeManagedEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endpoint != null) { - contents.endpoint = de_Endpoint(data.endpoint, context); - } + const doc = take(data, { + endpoint: (_) => de_Endpoint(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1272,10 +1251,9 @@ const de_DescribeManagedEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1295,9 +1273,10 @@ export const de_DescribeVirtualClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.virtualCluster != null) { - contents.virtualCluster = de_VirtualCluster(data.virtualCluster, context); - } + const doc = take(data, { + virtualCluster: (_) => de_VirtualCluster(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1325,10 +1304,9 @@ const de_DescribeVirtualClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1348,12 +1326,11 @@ export const de_ListJobRunsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobRuns != null) { - contents.jobRuns = de_JobRuns(data.jobRuns, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobRuns: (_) => de_JobRuns(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1378,10 +1355,9 @@ const de_ListJobRunsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1401,12 +1377,11 @@ export const de_ListJobTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templates != null) { - contents.templates = de_JobTemplates(data.templates, context); - } + const doc = take(data, { + nextToken: __expectString, + templates: (_) => de_JobTemplates(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1431,10 +1406,9 @@ const de_ListJobTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1454,12 +1428,11 @@ export const de_ListManagedEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endpoints != null) { - contents.endpoints = de_Endpoints(data.endpoints, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + endpoints: (_) => de_Endpoints(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1484,10 +1457,9 @@ const de_ListManagedEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,9 +1479,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1537,10 +1510,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1560,12 +1532,11 @@ export const de_ListVirtualClustersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.virtualClusters != null) { - contents.virtualClusters = de_VirtualClusters(data.virtualClusters, context); - } + const doc = take(data, { + nextToken: __expectString, + virtualClusters: (_) => de_VirtualClusters(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1590,10 +1561,9 @@ const de_ListVirtualClustersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1613,18 +1583,13 @@ export const de_StartJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.virtualClusterId != null) { - contents.virtualClusterId = __expectString(data.virtualClusterId); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + name: __expectString, + virtualClusterId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1652,10 +1617,9 @@ const de_StartJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1702,10 +1666,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1752,16 +1715,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServerExceptionRes */ @@ -1771,9 +1733,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1790,9 +1753,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1806,9 +1770,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1816,28 +1781,17 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CloudWatchMonitoringConfiguration - */ -const se_CloudWatchMonitoringConfiguration = ( - input: CloudWatchMonitoringConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }), - }; -}; +// se_CloudWatchMonitoringConfiguration omitted. /** * serializeAws_restJson1Configuration */ const se_Configuration = (input: Configuration, context: __SerdeContext): any => { - return { - ...(input.classification != null && { classification: input.classification }), - ...(input.configurations != null && { configurations: se_ConfigurationList(input.configurations, context) }), - ...(input.properties != null && { properties: se_SensitivePropertiesMap(input.properties, context) }), - }; + return take(input, { + classification: [], + configurations: (_) => se_ConfigurationList(_, context), + properties: _json, + }); }; /** @@ -1855,305 +1809,85 @@ const se_ConfigurationList = (input: Configuration[], context: __SerdeContext): * serializeAws_restJson1ConfigurationOverrides */ const se_ConfigurationOverrides = (input: ConfigurationOverrides, context: __SerdeContext): any => { - return { - ...(input.applicationConfiguration != null && { - applicationConfiguration: se_ConfigurationList(input.applicationConfiguration, context), - }), - ...(input.monitoringConfiguration != null && { - monitoringConfiguration: se_MonitoringConfiguration(input.monitoringConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1ContainerInfo - */ -const se_ContainerInfo = (input: ContainerInfo, context: __SerdeContext): any => { - return ContainerInfo.visit(input, { - eksInfo: (value) => ({ eksInfo: se_EksInfo(value, context) }), - _: (name, value) => ({ name: value } as any), + return take(input, { + applicationConfiguration: (_) => se_ConfigurationList(_, context), + monitoringConfiguration: _json, }); }; -/** - * serializeAws_restJson1ContainerProvider - */ -const se_ContainerProvider = (input: ContainerProvider, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.info != null && { info: se_ContainerInfo(input.info, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ContainerInfo omitted. -/** - * serializeAws_restJson1EksInfo - */ -const se_EksInfo = (input: EksInfo, context: __SerdeContext): any => { - return { - ...(input.namespace != null && { namespace: input.namespace }), - }; -}; +// se_ContainerProvider omitted. -/** - * serializeAws_restJson1EntryPointArguments - */ -const se_EntryPointArguments = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EksInfo omitted. -/** - * serializeAws_restJson1JobDriver - */ -const se_JobDriver = (input: JobDriver, context: __SerdeContext): any => { - return { - ...(input.sparkSqlJobDriver != null && { - sparkSqlJobDriver: se_SparkSqlJobDriver(input.sparkSqlJobDriver, context), - }), - ...(input.sparkSubmitJobDriver != null && { - sparkSubmitJobDriver: se_SparkSubmitJobDriver(input.sparkSubmitJobDriver, context), - }), - }; -}; +// se_EntryPointArguments omitted. + +// se_JobDriver omitted. /** * serializeAws_restJson1JobTemplateData */ const se_JobTemplateData = (input: JobTemplateData, context: __SerdeContext): any => { - return { - ...(input.configurationOverrides != null && { - configurationOverrides: se_ParametricConfigurationOverrides(input.configurationOverrides, context), - }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.jobDriver != null && { jobDriver: se_JobDriver(input.jobDriver, context) }), - ...(input.jobTags != null && { jobTags: se_TagMap(input.jobTags, context) }), - ...(input.parameterConfiguration != null && { - parameterConfiguration: se_TemplateParameterConfigurationMap(input.parameterConfiguration, context), - }), - ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }), - }; + return take(input, { + configurationOverrides: (_) => se_ParametricConfigurationOverrides(_, context), + executionRoleArn: [], + jobDriver: _json, + jobTags: _json, + parameterConfiguration: _json, + releaseLabel: [], + }); }; -/** - * serializeAws_restJson1MonitoringConfiguration - */ -const se_MonitoringConfiguration = (input: MonitoringConfiguration, context: __SerdeContext): any => { - return { - ...(input.cloudWatchMonitoringConfiguration != null && { - cloudWatchMonitoringConfiguration: se_CloudWatchMonitoringConfiguration( - input.cloudWatchMonitoringConfiguration, - context - ), - }), - ...(input.persistentAppUI != null && { persistentAppUI: input.persistentAppUI }), - ...(input.s3MonitoringConfiguration != null && { - s3MonitoringConfiguration: se_S3MonitoringConfiguration(input.s3MonitoringConfiguration, context), - }), - }; -}; +// se_MonitoringConfiguration omitted. -/** - * serializeAws_restJson1ParametricCloudWatchMonitoringConfiguration - */ -const se_ParametricCloudWatchMonitoringConfiguration = ( - input: ParametricCloudWatchMonitoringConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }), - }; -}; +// se_ParametricCloudWatchMonitoringConfiguration omitted. /** * serializeAws_restJson1ParametricConfigurationOverrides */ const se_ParametricConfigurationOverrides = (input: ParametricConfigurationOverrides, context: __SerdeContext): any => { - return { - ...(input.applicationConfiguration != null && { - applicationConfiguration: se_ConfigurationList(input.applicationConfiguration, context), - }), - ...(input.monitoringConfiguration != null && { - monitoringConfiguration: se_ParametricMonitoringConfiguration(input.monitoringConfiguration, context), - }), - }; + return take(input, { + applicationConfiguration: (_) => se_ConfigurationList(_, context), + monitoringConfiguration: _json, + }); }; -/** - * serializeAws_restJson1ParametricMonitoringConfiguration - */ -const se_ParametricMonitoringConfiguration = ( - input: ParametricMonitoringConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.cloudWatchMonitoringConfiguration != null && { - cloudWatchMonitoringConfiguration: se_ParametricCloudWatchMonitoringConfiguration( - input.cloudWatchMonitoringConfiguration, - context - ), - }), - ...(input.persistentAppUI != null && { persistentAppUI: input.persistentAppUI }), - ...(input.s3MonitoringConfiguration != null && { - s3MonitoringConfiguration: se_ParametricS3MonitoringConfiguration(input.s3MonitoringConfiguration, context), - }), - }; -}; +// se_ParametricMonitoringConfiguration omitted. -/** - * serializeAws_restJson1ParametricS3MonitoringConfiguration - */ -const se_ParametricS3MonitoringConfiguration = ( - input: ParametricS3MonitoringConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.logUri != null && { logUri: input.logUri }), - }; -}; +// se_ParametricS3MonitoringConfiguration omitted. -/** - * serializeAws_restJson1RetryPolicyConfiguration - */ -const se_RetryPolicyConfiguration = (input: RetryPolicyConfiguration, context: __SerdeContext): any => { - return { - ...(input.maxAttempts != null && { maxAttempts: input.maxAttempts }), - }; -}; +// se_RetryPolicyConfiguration omitted. -/** - * serializeAws_restJson1S3MonitoringConfiguration - */ -const se_S3MonitoringConfiguration = (input: S3MonitoringConfiguration, context: __SerdeContext): any => { - return { - ...(input.logUri != null && { logUri: input.logUri }), - }; -}; +// se_S3MonitoringConfiguration omitted. -/** - * serializeAws_restJson1SensitivePropertiesMap - */ -const se_SensitivePropertiesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SensitivePropertiesMap omitted. -/** - * serializeAws_restJson1SparkSqlJobDriver - */ -const se_SparkSqlJobDriver = (input: SparkSqlJobDriver, context: __SerdeContext): any => { - return { - ...(input.entryPoint != null && { entryPoint: input.entryPoint }), - ...(input.sparkSqlParameters != null && { sparkSqlParameters: input.sparkSqlParameters }), - }; -}; +// se_SparkSqlJobDriver omitted. -/** - * serializeAws_restJson1SparkSubmitJobDriver - */ -const se_SparkSubmitJobDriver = (input: SparkSubmitJobDriver, context: __SerdeContext): any => { - return { - ...(input.entryPoint != null && { entryPoint: input.entryPoint }), - ...(input.entryPointArguments != null && { - entryPointArguments: se_EntryPointArguments(input.entryPointArguments, context), - }), - ...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }), - }; -}; +// se_SparkSubmitJobDriver omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TemplateParameterConfiguration - */ -const se_TemplateParameterConfiguration = (input: TemplateParameterConfiguration, context: __SerdeContext): any => { - return { - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_TemplateParameterConfiguration omitted. -/** - * serializeAws_restJson1TemplateParameterConfigurationMap - */ -const se_TemplateParameterConfigurationMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_TemplateParameterConfiguration(value, context); - return acc; - }, {}); -}; +// se_TemplateParameterConfigurationMap omitted. -/** - * serializeAws_restJson1TemplateParameterInputMap - */ -const se_TemplateParameterInputMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TemplateParameterInputMap omitted. -/** - * deserializeAws_restJson1Certificate - */ -const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - certificateArn: __expectString(output.certificateArn), - certificateData: __expectString(output.certificateData), - } as any; -}; +// de_Certificate omitted. -/** - * deserializeAws_restJson1CloudWatchMonitoringConfiguration - */ -const de_CloudWatchMonitoringConfiguration = ( - output: any, - context: __SerdeContext -): CloudWatchMonitoringConfiguration => { - return { - logGroupName: __expectString(output.logGroupName), - logStreamNamePrefix: __expectString(output.logStreamNamePrefix), - } as any; -}; +// de_CloudWatchMonitoringConfiguration omitted. /** * deserializeAws_restJson1Configuration */ const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - classification: __expectString(output.classification), - configurations: output.configurations != null ? de_ConfigurationList(output.configurations, context) : undefined, - properties: output.properties != null ? de_SensitivePropertiesMap(output.properties, context) : undefined, - } as any; + return take(output, { + classification: __expectString, + configurations: (_: any) => de_ConfigurationList(_, context), + properties: _json, + }) as any; }; /** @@ -2163,9 +1897,6 @@ const de_ConfigurationList = (output: any, context: __SerdeContext): Configurati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Configuration(entry, context); }); return retVal; @@ -2175,79 +1906,42 @@ const de_ConfigurationList = (output: any, context: __SerdeContext): Configurati * deserializeAws_restJson1ConfigurationOverrides */ const de_ConfigurationOverrides = (output: any, context: __SerdeContext): ConfigurationOverrides => { - return { - applicationConfiguration: - output.applicationConfiguration != null - ? de_ConfigurationList(output.applicationConfiguration, context) - : undefined, - monitoringConfiguration: - output.monitoringConfiguration != null - ? de_MonitoringConfiguration(output.monitoringConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ContainerInfo - */ -const de_ContainerInfo = (output: any, context: __SerdeContext): ContainerInfo => { - if (output.eksInfo != null) { - return { - eksInfo: de_EksInfo(output.eksInfo, context), - }; - } - return { $unknown: Object.entries(output)[0] }; + return take(output, { + applicationConfiguration: (_: any) => de_ConfigurationList(_, context), + monitoringConfiguration: _json, + }) as any; }; -/** - * deserializeAws_restJson1ContainerProvider - */ -const de_ContainerProvider = (output: any, context: __SerdeContext): ContainerProvider => { - return { - id: __expectString(output.id), - info: output.info != null ? de_ContainerInfo(__expectUnion(output.info), context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_ContainerInfo omitted. -/** - * deserializeAws_restJson1EksInfo - */ -const de_EksInfo = (output: any, context: __SerdeContext): EksInfo => { - return { - namespace: __expectString(output.namespace), - } as any; -}; +// de_ContainerProvider omitted. + +// de_EksInfo omitted. /** * deserializeAws_restJson1Endpoint */ const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - arn: __expectString(output.arn), - certificateArn: __expectString(output.certificateArn), - certificateAuthority: - output.certificateAuthority != null ? de_Certificate(output.certificateAuthority, context) : undefined, - configurationOverrides: - output.configurationOverrides != null - ? de_ConfigurationOverrides(output.configurationOverrides, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - executionRoleArn: __expectString(output.executionRoleArn), - failureReason: __expectString(output.failureReason), - id: __expectString(output.id), - name: __expectString(output.name), - releaseLabel: __expectString(output.releaseLabel), - securityGroup: __expectString(output.securityGroup), - serverUrl: __expectString(output.serverUrl), - state: __expectString(output.state), - stateDetails: __expectString(output.stateDetails), - subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - virtualClusterId: __expectString(output.virtualClusterId), - } as any; + return take(output, { + arn: __expectString, + certificateArn: __expectString, + certificateAuthority: _json, + configurationOverrides: (_: any) => de_ConfigurationOverrides(_, context), + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + executionRoleArn: __expectString, + failureReason: __expectString, + id: __expectString, + name: __expectString, + releaseLabel: __expectString, + securityGroup: __expectString, + serverUrl: __expectString, + state: __expectString, + stateDetails: __expectString, + subnetIds: _json, + tags: _json, + type: __expectString, + virtualClusterId: __expectString, + }) as any; }; /** @@ -2257,74 +1951,39 @@ const de_Endpoints = (output: any, context: __SerdeContext): Endpoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Endpoint(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EntryPointArguments - */ -const de_EntryPointArguments = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EntryPointArguments omitted. -/** - * deserializeAws_restJson1JobDriver - */ -const de_JobDriver = (output: any, context: __SerdeContext): JobDriver => { - return { - sparkSqlJobDriver: - output.sparkSqlJobDriver != null ? de_SparkSqlJobDriver(output.sparkSqlJobDriver, context) : undefined, - sparkSubmitJobDriver: - output.sparkSubmitJobDriver != null ? de_SparkSubmitJobDriver(output.sparkSubmitJobDriver, context) : undefined, - } as any; -}; +// de_JobDriver omitted. /** * deserializeAws_restJson1JobRun */ const de_JobRun = (output: any, context: __SerdeContext): JobRun => { - return { - arn: __expectString(output.arn), - clientToken: __expectString(output.clientToken), - configurationOverrides: - output.configurationOverrides != null - ? de_ConfigurationOverrides(output.configurationOverrides, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - executionRoleArn: __expectString(output.executionRoleArn), - failureReason: __expectString(output.failureReason), - finishedAt: - output.finishedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.finishedAt)) : undefined, - id: __expectString(output.id), - jobDriver: output.jobDriver != null ? de_JobDriver(output.jobDriver, context) : undefined, - name: __expectString(output.name), - releaseLabel: __expectString(output.releaseLabel), - retryPolicyConfiguration: - output.retryPolicyConfiguration != null - ? de_RetryPolicyConfiguration(output.retryPolicyConfiguration, context) - : undefined, - retryPolicyExecution: - output.retryPolicyExecution != null ? de_RetryPolicyExecution(output.retryPolicyExecution, context) : undefined, - state: __expectString(output.state), - stateDetails: __expectString(output.stateDetails), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - virtualClusterId: __expectString(output.virtualClusterId), - } as any; + return take(output, { + arn: __expectString, + clientToken: __expectString, + configurationOverrides: (_: any) => de_ConfigurationOverrides(_, context), + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + executionRoleArn: __expectString, + failureReason: __expectString, + finishedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + jobDriver: _json, + name: __expectString, + releaseLabel: __expectString, + retryPolicyConfiguration: _json, + retryPolicyExecution: _json, + state: __expectString, + stateDetails: __expectString, + tags: _json, + virtualClusterId: __expectString, + }) as any; }; /** @@ -2334,9 +1993,6 @@ const de_JobRuns = (output: any, context: __SerdeContext): JobRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobRun(entry, context); }); return retVal; @@ -2346,38 +2002,31 @@ const de_JobRuns = (output: any, context: __SerdeContext): JobRun[] => { * deserializeAws_restJson1JobTemplate */ const de_JobTemplate = (output: any, context: __SerdeContext): JobTemplate => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - decryptionError: __expectString(output.decryptionError), - id: __expectString(output.id), - jobTemplateData: output.jobTemplateData != null ? de_JobTemplateData(output.jobTemplateData, context) : undefined, - kmsKeyArn: __expectString(output.kmsKeyArn), - name: __expectString(output.name), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + decryptionError: __expectString, + id: __expectString, + jobTemplateData: (_: any) => de_JobTemplateData(_, context), + kmsKeyArn: __expectString, + name: __expectString, + tags: _json, + }) as any; }; /** * deserializeAws_restJson1JobTemplateData */ const de_JobTemplateData = (output: any, context: __SerdeContext): JobTemplateData => { - return { - configurationOverrides: - output.configurationOverrides != null - ? de_ParametricConfigurationOverrides(output.configurationOverrides, context) - : undefined, - executionRoleArn: __expectString(output.executionRoleArn), - jobDriver: output.jobDriver != null ? de_JobDriver(output.jobDriver, context) : undefined, - jobTags: output.jobTags != null ? de_TagMap(output.jobTags, context) : undefined, - parameterConfiguration: - output.parameterConfiguration != null - ? de_TemplateParameterConfigurationMap(output.parameterConfiguration, context) - : undefined, - releaseLabel: __expectString(output.releaseLabel), - } as any; + return take(output, { + configurationOverrides: (_: any) => de_ParametricConfigurationOverrides(_, context), + executionRoleArn: __expectString, + jobDriver: _json, + jobTags: _json, + parameterConfiguration: _json, + releaseLabel: __expectString, + }) as any; }; /** @@ -2387,43 +2036,14 @@ const de_JobTemplates = (output: any, context: __SerdeContext): JobTemplate[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobTemplate(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MonitoringConfiguration - */ -const de_MonitoringConfiguration = (output: any, context: __SerdeContext): MonitoringConfiguration => { - return { - cloudWatchMonitoringConfiguration: - output.cloudWatchMonitoringConfiguration != null - ? de_CloudWatchMonitoringConfiguration(output.cloudWatchMonitoringConfiguration, context) - : undefined, - persistentAppUI: __expectString(output.persistentAppUI), - s3MonitoringConfiguration: - output.s3MonitoringConfiguration != null - ? de_S3MonitoringConfiguration(output.s3MonitoringConfiguration, context) - : undefined, - } as any; -}; +// de_MonitoringConfiguration omitted. -/** - * deserializeAws_restJson1ParametricCloudWatchMonitoringConfiguration - */ -const de_ParametricCloudWatchMonitoringConfiguration = ( - output: any, - context: __SerdeContext -): ParametricCloudWatchMonitoringConfiguration => { - return { - logGroupName: __expectString(output.logGroupName), - logStreamNamePrefix: __expectString(output.logStreamNamePrefix), - } as any; -}; +// de_ParametricCloudWatchMonitoringConfiguration omitted. /** * deserializeAws_restJson1ParametricConfigurationOverrides @@ -2432,184 +2052,49 @@ const de_ParametricConfigurationOverrides = ( output: any, context: __SerdeContext ): ParametricConfigurationOverrides => { - return { - applicationConfiguration: - output.applicationConfiguration != null - ? de_ConfigurationList(output.applicationConfiguration, context) - : undefined, - monitoringConfiguration: - output.monitoringConfiguration != null - ? de_ParametricMonitoringConfiguration(output.monitoringConfiguration, context) - : undefined, - } as any; + return take(output, { + applicationConfiguration: (_: any) => de_ConfigurationList(_, context), + monitoringConfiguration: _json, + }) as any; }; -/** - * deserializeAws_restJson1ParametricMonitoringConfiguration - */ -const de_ParametricMonitoringConfiguration = ( - output: any, - context: __SerdeContext -): ParametricMonitoringConfiguration => { - return { - cloudWatchMonitoringConfiguration: - output.cloudWatchMonitoringConfiguration != null - ? de_ParametricCloudWatchMonitoringConfiguration(output.cloudWatchMonitoringConfiguration, context) - : undefined, - persistentAppUI: __expectString(output.persistentAppUI), - s3MonitoringConfiguration: - output.s3MonitoringConfiguration != null - ? de_ParametricS3MonitoringConfiguration(output.s3MonitoringConfiguration, context) - : undefined, - } as any; -}; +// de_ParametricMonitoringConfiguration omitted. -/** - * deserializeAws_restJson1ParametricS3MonitoringConfiguration - */ -const de_ParametricS3MonitoringConfiguration = ( - output: any, - context: __SerdeContext -): ParametricS3MonitoringConfiguration => { - return { - logUri: __expectString(output.logUri), - } as any; -}; +// de_ParametricS3MonitoringConfiguration omitted. -/** - * deserializeAws_restJson1RetryPolicyConfiguration - */ -const de_RetryPolicyConfiguration = (output: any, context: __SerdeContext): RetryPolicyConfiguration => { - return { - maxAttempts: __expectInt32(output.maxAttempts), - } as any; -}; +// de_RetryPolicyConfiguration omitted. -/** - * deserializeAws_restJson1RetryPolicyExecution - */ -const de_RetryPolicyExecution = (output: any, context: __SerdeContext): RetryPolicyExecution => { - return { - currentAttemptCount: __expectInt32(output.currentAttemptCount), - } as any; -}; +// de_RetryPolicyExecution omitted. -/** - * deserializeAws_restJson1S3MonitoringConfiguration - */ -const de_S3MonitoringConfiguration = (output: any, context: __SerdeContext): S3MonitoringConfiguration => { - return { - logUri: __expectString(output.logUri), - } as any; -}; +// de_S3MonitoringConfiguration omitted. -/** - * deserializeAws_restJson1SensitivePropertiesMap - */ -const de_SensitivePropertiesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SensitivePropertiesMap omitted. -/** - * deserializeAws_restJson1SparkSqlJobDriver - */ -const de_SparkSqlJobDriver = (output: any, context: __SerdeContext): SparkSqlJobDriver => { - return { - entryPoint: __expectString(output.entryPoint), - sparkSqlParameters: __expectString(output.sparkSqlParameters), - } as any; -}; +// de_SparkSqlJobDriver omitted. -/** - * deserializeAws_restJson1SparkSubmitJobDriver - */ -const de_SparkSubmitJobDriver = (output: any, context: __SerdeContext): SparkSubmitJobDriver => { - return { - entryPoint: __expectString(output.entryPoint), - entryPointArguments: - output.entryPointArguments != null ? de_EntryPointArguments(output.entryPointArguments, context) : undefined, - sparkSubmitParameters: __expectString(output.sparkSubmitParameters), - } as any; -}; +// de_SparkSubmitJobDriver omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TemplateParameterConfiguration - */ -const de_TemplateParameterConfiguration = (output: any, context: __SerdeContext): TemplateParameterConfiguration => { - return { - defaultValue: __expectString(output.defaultValue), - type: __expectString(output.type), - } as any; -}; +// de_TemplateParameterConfiguration omitted. -/** - * deserializeAws_restJson1TemplateParameterConfigurationMap - */ -const de_TemplateParameterConfigurationMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_TemplateParameterConfiguration(value, context); - return acc; - }, - {} - ); -}; +// de_TemplateParameterConfigurationMap omitted. /** * deserializeAws_restJson1VirtualCluster */ const de_VirtualCluster = (output: any, context: __SerdeContext): VirtualCluster => { - return { - arn: __expectString(output.arn), - containerProvider: - output.containerProvider != null ? de_ContainerProvider(output.containerProvider, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - state: __expectString(output.state), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + containerProvider: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + name: __expectString, + state: __expectString, + tags: _json, + }) as any; }; /** @@ -2619,9 +2104,6 @@ const de_VirtualClusters = (output: any, context: __SerdeContext): VirtualCluste const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VirtualCluster(entry, context); }); return retVal; diff --git a/clients/client-emr-serverless/src/protocols/Aws_restJson1.ts b/clients/client-emr-serverless/src/protocols/Aws_restJson1.ts index 8bfc6ff3fb11..cca3049774d6 100644 --- a/clients/client-emr-serverless/src/protocols/Aws_restJson1.ts +++ b/clients/client-emr-serverless/src/protocols/Aws_restJson1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -12,10 +12,11 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -55,7 +56,6 @@ import { ConfigurationOverrides, ConflictException, Hive, - ImageConfiguration, ImageConfigurationInput, InitialCapacityConfig, InternalServerException, @@ -73,7 +73,6 @@ import { TotalResourceUtilization, ValidationException, WorkerResourceConfig, - WorkerTypeSpecification, WorkerTypeSpecificationInput, } from "../models/models_0"; @@ -123,35 +122,23 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; let body: any; - body = JSON.stringify({ - ...(input.architecture != null && { architecture: input.architecture }), - ...(input.autoStartConfiguration != null && { - autoStartConfiguration: se_AutoStartConfig(input.autoStartConfiguration, context), - }), - ...(input.autoStopConfiguration != null && { - autoStopConfiguration: se_AutoStopConfig(input.autoStopConfiguration, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.imageConfiguration != null && { - imageConfiguration: se_ImageConfigurationInput(input.imageConfiguration, context), - }), - ...(input.initialCapacity != null && { - initialCapacity: se_InitialCapacityConfigMap(input.initialCapacity, context), - }), - ...(input.maximumCapacity != null && { - maximumCapacity: se_MaximumAllowedResources(input.maximumCapacity, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - ...(input.workerTypeSpecifications != null && { - workerTypeSpecifications: se_WorkerTypeSpecificationInputMap(input.workerTypeSpecifications, context), - }), - }); + body = JSON.stringify( + take(input, { + architecture: [], + autoStartConfiguration: (_) => _json(_), + autoStopConfiguration: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + imageConfiguration: (_) => _json(_), + initialCapacity: (_) => _json(_), + maximumCapacity: (_) => _json(_), + name: [], + networkConfiguration: (_) => _json(_), + releaseLabel: [], + tags: (_) => _json(_), + type: [], + workerTypeSpecifications: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -440,17 +427,17 @@ export const se_StartJobRunCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.configurationOverrides != null && { - configurationOverrides: se_ConfigurationOverrides(input.configurationOverrides, context), - }), - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.executionTimeoutMinutes != null && { executionTimeoutMinutes: input.executionTimeoutMinutes }), - ...(input.jobDriver != null && { jobDriver: se_JobDriver(input.jobDriver, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + configurationOverrides: (_) => se_ConfigurationOverrides(_, context), + executionRoleArn: [], + executionTimeoutMinutes: [], + jobDriver: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -507,9 +494,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -573,31 +562,19 @@ export const se_UpdateApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.architecture != null && { architecture: input.architecture }), - ...(input.autoStartConfiguration != null && { - autoStartConfiguration: se_AutoStartConfig(input.autoStartConfiguration, context), - }), - ...(input.autoStopConfiguration != null && { - autoStopConfiguration: se_AutoStopConfig(input.autoStopConfiguration, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.imageConfiguration != null && { - imageConfiguration: se_ImageConfigurationInput(input.imageConfiguration, context), - }), - ...(input.initialCapacity != null && { - initialCapacity: se_InitialCapacityConfigMap(input.initialCapacity, context), - }), - ...(input.maximumCapacity != null && { - maximumCapacity: se_MaximumAllowedResources(input.maximumCapacity, context), - }), - ...(input.networkConfiguration != null && { - networkConfiguration: se_NetworkConfiguration(input.networkConfiguration, context), - }), - ...(input.workerTypeSpecifications != null && { - workerTypeSpecifications: se_WorkerTypeSpecificationInputMap(input.workerTypeSpecifications, context), - }), - }); + body = JSON.stringify( + take(input, { + architecture: [], + autoStartConfiguration: (_) => _json(_), + autoStopConfiguration: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + imageConfiguration: (_) => _json(_), + initialCapacity: (_) => _json(_), + maximumCapacity: (_) => _json(_), + networkConfiguration: (_) => _json(_), + workerTypeSpecifications: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -623,12 +600,11 @@ export const de_CancelJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.jobRunId != null) { - contents.jobRunId = __expectString(data.jobRunId); - } + const doc = take(data, { + applicationId: __expectString, + jobRunId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -656,10 +632,9 @@ const de_CancelJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -679,15 +654,12 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + applicationId: __expectString, + arn: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -718,10 +690,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -768,10 +739,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -791,9 +761,10 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.application != null) { - contents.application = de_Application(data.application, context); - } + const doc = take(data, { + application: (_) => de_Application(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -821,10 +792,9 @@ const de_GetApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -844,9 +814,10 @@ export const de_GetDashboardForJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.url != null) { - contents.url = __expectString(data.url); - } + const doc = take(data, { + url: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -874,10 +845,9 @@ const de_GetDashboardForJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -897,9 +867,10 @@ export const de_GetJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobRun != null) { - contents.jobRun = de_JobRun(data.jobRun, context); - } + const doc = take(data, { + jobRun: (_) => de_JobRun(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -927,10 +898,9 @@ const de_GetJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -950,12 +920,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applications != null) { - contents.applications = de_ApplicationList(data.applications, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + applications: (_) => de_ApplicationList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -980,10 +949,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1003,12 +971,11 @@ export const de_ListJobRunsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobRuns != null) { - contents.jobRuns = de_JobRuns(data.jobRuns, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobRuns: (_) => de_JobRuns(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1033,10 +1000,9 @@ const de_ListJobRunsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1056,9 +1022,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1086,10 +1053,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1139,10 +1105,9 @@ const de_StartApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1162,15 +1127,12 @@ export const de_StartJobRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.jobRunId != null) { - contents.jobRunId = __expectString(data.jobRunId); - } + const doc = take(data, { + applicationId: __expectString, + arn: __expectString, + jobRunId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1201,10 +1163,9 @@ const de_StartJobRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1251,10 +1212,9 @@ const de_StopApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,10 +1261,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1351,10 +1310,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1374,9 +1332,10 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.application != null) { - contents.application = de_Application(data.application, context); - } + const doc = take(data, { + application: (_) => de_Application(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1404,25 +1363,25 @@ const de_UpdateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1439,9 +1398,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1458,9 +1418,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1477,9 +1438,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1493,9 +1455,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1503,34 +1466,19 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AutoStartConfig - */ -const se_AutoStartConfig = (input: AutoStartConfig, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; +// se_AutoStartConfig omitted. -/** - * serializeAws_restJson1AutoStopConfig - */ -const se_AutoStopConfig = (input: AutoStopConfig, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.idleTimeoutMinutes != null && { idleTimeoutMinutes: input.idleTimeoutMinutes }), - }; -}; +// se_AutoStopConfig omitted. /** * serializeAws_restJson1Configuration */ const se_Configuration = (input: Configuration, context: __SerdeContext): any => { - return { - ...(input.classification != null && { classification: input.classification }), - ...(input.configurations != null && { configurations: se_ConfigurationList(input.configurations, context) }), - ...(input.properties != null && { properties: se_SensitivePropertiesMap(input.properties, context) }), - }; + return take(input, { + classification: [], + configurations: (_) => se_ConfigurationList(_, context), + properties: _json, + }); }; /** @@ -1548,278 +1496,74 @@ const se_ConfigurationList = (input: Configuration[], context: __SerdeContext): * serializeAws_restJson1ConfigurationOverrides */ const se_ConfigurationOverrides = (input: ConfigurationOverrides, context: __SerdeContext): any => { - return { - ...(input.applicationConfiguration != null && { - applicationConfiguration: se_ConfigurationList(input.applicationConfiguration, context), - }), - ...(input.monitoringConfiguration != null && { - monitoringConfiguration: se_MonitoringConfiguration(input.monitoringConfiguration, context), - }), - }; + return take(input, { + applicationConfiguration: (_) => se_ConfigurationList(_, context), + monitoringConfiguration: _json, + }); }; -/** - * serializeAws_restJson1EntryPointArguments - */ -const se_EntryPointArguments = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EntryPointArguments omitted. -/** - * serializeAws_restJson1Hive - */ -const se_Hive = (input: Hive, context: __SerdeContext): any => { - return { - ...(input.initQueryFile != null && { initQueryFile: input.initQueryFile }), - ...(input.parameters != null && { parameters: input.parameters }), - ...(input.query != null && { query: input.query }), - }; -}; +// se_Hive omitted. -/** - * serializeAws_restJson1ImageConfigurationInput - */ -const se_ImageConfigurationInput = (input: ImageConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.imageUri != null && { imageUri: input.imageUri }), - }; -}; +// se_ImageConfigurationInput omitted. -/** - * serializeAws_restJson1InitialCapacityConfig - */ -const se_InitialCapacityConfig = (input: InitialCapacityConfig, context: __SerdeContext): any => { - return { - ...(input.workerConfiguration != null && { - workerConfiguration: se_WorkerResourceConfig(input.workerConfiguration, context), - }), - ...(input.workerCount != null && { workerCount: input.workerCount }), - }; -}; +// se_InitialCapacityConfig omitted. -/** - * serializeAws_restJson1InitialCapacityConfigMap - */ -const se_InitialCapacityConfigMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_InitialCapacityConfig(value, context); - return acc; - }, {}); -}; +// se_InitialCapacityConfigMap omitted. -/** - * serializeAws_restJson1JobDriver - */ -const se_JobDriver = (input: JobDriver, context: __SerdeContext): any => { - return JobDriver.visit(input, { - hive: (value) => ({ hive: se_Hive(value, context) }), - sparkSubmit: (value) => ({ sparkSubmit: se_SparkSubmit(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_JobDriver omitted. -/** - * serializeAws_restJson1ManagedPersistenceMonitoringConfiguration - */ -const se_ManagedPersistenceMonitoringConfiguration = ( - input: ManagedPersistenceMonitoringConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }), - }; -}; +// se_ManagedPersistenceMonitoringConfiguration omitted. -/** - * serializeAws_restJson1MaximumAllowedResources - */ -const se_MaximumAllowedResources = (input: MaximumAllowedResources, context: __SerdeContext): any => { - return { - ...(input.cpu != null && { cpu: input.cpu }), - ...(input.disk != null && { disk: input.disk }), - ...(input.memory != null && { memory: input.memory }), - }; -}; +// se_MaximumAllowedResources omitted. -/** - * serializeAws_restJson1MonitoringConfiguration - */ -const se_MonitoringConfiguration = (input: MonitoringConfiguration, context: __SerdeContext): any => { - return { - ...(input.managedPersistenceMonitoringConfiguration != null && { - managedPersistenceMonitoringConfiguration: se_ManagedPersistenceMonitoringConfiguration( - input.managedPersistenceMonitoringConfiguration, - context - ), - }), - ...(input.s3MonitoringConfiguration != null && { - s3MonitoringConfiguration: se_S3MonitoringConfiguration(input.s3MonitoringConfiguration, context), - }), - }; -}; +// se_MonitoringConfiguration omitted. -/** - * serializeAws_restJson1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }), - }; -}; +// se_NetworkConfiguration omitted. -/** - * serializeAws_restJson1S3MonitoringConfiguration - */ -const se_S3MonitoringConfiguration = (input: S3MonitoringConfiguration, context: __SerdeContext): any => { - return { - ...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }), - ...(input.logUri != null && { logUri: input.logUri }), - }; -}; +// se_S3MonitoringConfiguration omitted. -/** - * serializeAws_restJson1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_restJson1SensitivePropertiesMap - */ -const se_SensitivePropertiesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SensitivePropertiesMap omitted. -/** - * serializeAws_restJson1SparkSubmit - */ -const se_SparkSubmit = (input: SparkSubmit, context: __SerdeContext): any => { - return { - ...(input.entryPoint != null && { entryPoint: input.entryPoint }), - ...(input.entryPointArguments != null && { - entryPointArguments: se_EntryPointArguments(input.entryPointArguments, context), - }), - ...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }), - }; -}; +// se_SparkSubmit omitted. -/** - * serializeAws_restJson1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1WorkerResourceConfig - */ -const se_WorkerResourceConfig = (input: WorkerResourceConfig, context: __SerdeContext): any => { - return { - ...(input.cpu != null && { cpu: input.cpu }), - ...(input.disk != null && { disk: input.disk }), - ...(input.memory != null && { memory: input.memory }), - }; -}; +// se_WorkerResourceConfig omitted. -/** - * serializeAws_restJson1WorkerTypeSpecificationInput - */ -const se_WorkerTypeSpecificationInput = (input: WorkerTypeSpecificationInput, context: __SerdeContext): any => { - return { - ...(input.imageConfiguration != null && { - imageConfiguration: se_ImageConfigurationInput(input.imageConfiguration, context), - }), - }; -}; +// se_WorkerTypeSpecificationInput omitted. -/** - * serializeAws_restJson1WorkerTypeSpecificationInputMap - */ -const se_WorkerTypeSpecificationInputMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_WorkerTypeSpecificationInput(value, context); - return acc; - }, {}); -}; +// se_WorkerTypeSpecificationInputMap omitted. /** * deserializeAws_restJson1Application */ const de_Application = (output: any, context: __SerdeContext): Application => { - return { - applicationId: __expectString(output.applicationId), - architecture: __expectString(output.architecture), - arn: __expectString(output.arn), - autoStartConfiguration: - output.autoStartConfiguration != null ? de_AutoStartConfig(output.autoStartConfiguration, context) : undefined, - autoStopConfiguration: - output.autoStopConfiguration != null ? de_AutoStopConfig(output.autoStopConfiguration, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - imageConfiguration: - output.imageConfiguration != null ? de_ImageConfiguration(output.imageConfiguration, context) : undefined, - initialCapacity: - output.initialCapacity != null ? de_InitialCapacityConfigMap(output.initialCapacity, context) : undefined, - maximumCapacity: - output.maximumCapacity != null ? de_MaximumAllowedResources(output.maximumCapacity, context) : undefined, - name: __expectString(output.name), - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - releaseLabel: __expectString(output.releaseLabel), - state: __expectString(output.state), - stateDetails: __expectString(output.stateDetails), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - workerTypeSpecifications: - output.workerTypeSpecifications != null - ? de_WorkerTypeSpecificationMap(output.workerTypeSpecifications, context) - : undefined, - } as any; + return take(output, { + applicationId: __expectString, + architecture: __expectString, + arn: __expectString, + autoStartConfiguration: _json, + autoStopConfiguration: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageConfiguration: _json, + initialCapacity: _json, + maximumCapacity: _json, + name: __expectString, + networkConfiguration: _json, + releaseLabel: __expectString, + state: __expectString, + stateDetails: __expectString, + tags: _json, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workerTypeSpecifications: _json, + }) as any; }; /** @@ -1829,9 +1573,6 @@ const de_ApplicationList = (output: any, context: __SerdeContext): ApplicationSu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationSummary(entry, context); }); return retVal; @@ -1841,50 +1582,33 @@ const de_ApplicationList = (output: any, context: __SerdeContext): ApplicationSu * deserializeAws_restJson1ApplicationSummary */ const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - architecture: __expectString(output.architecture), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - releaseLabel: __expectString(output.releaseLabel), - state: __expectString(output.state), - stateDetails: __expectString(output.stateDetails), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + architecture: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + releaseLabel: __expectString, + state: __expectString, + stateDetails: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1AutoStartConfig - */ -const de_AutoStartConfig = (output: any, context: __SerdeContext): AutoStartConfig => { - return { - enabled: __expectBoolean(output.enabled), - } as any; -}; +// de_AutoStartConfig omitted. -/** - * deserializeAws_restJson1AutoStopConfig - */ -const de_AutoStopConfig = (output: any, context: __SerdeContext): AutoStopConfig => { - return { - enabled: __expectBoolean(output.enabled), - idleTimeoutMinutes: __expectInt32(output.idleTimeoutMinutes), - } as any; -}; +// de_AutoStopConfig omitted. /** * deserializeAws_restJson1Configuration */ const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - classification: __expectString(output.classification), - configurations: output.configurations != null ? de_ConfigurationList(output.configurations, context) : undefined, - properties: output.properties != null ? de_SensitivePropertiesMap(output.properties, context) : undefined, - } as any; + return take(output, { + classification: __expectString, + configurations: (_: any) => de_ConfigurationList(_, context), + properties: _json, + }) as any; }; /** @@ -1894,9 +1618,6 @@ const de_ConfigurationList = (output: any, context: __SerdeContext): Configurati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Configuration(entry, context); }); return retVal; @@ -1906,128 +1627,48 @@ const de_ConfigurationList = (output: any, context: __SerdeContext): Configurati * deserializeAws_restJson1ConfigurationOverrides */ const de_ConfigurationOverrides = (output: any, context: __SerdeContext): ConfigurationOverrides => { - return { - applicationConfiguration: - output.applicationConfiguration != null - ? de_ConfigurationList(output.applicationConfiguration, context) - : undefined, - monitoringConfiguration: - output.monitoringConfiguration != null - ? de_MonitoringConfiguration(output.monitoringConfiguration, context) - : undefined, - } as any; + return take(output, { + applicationConfiguration: (_: any) => de_ConfigurationList(_, context), + monitoringConfiguration: _json, + }) as any; }; -/** - * deserializeAws_restJson1EntryPointArguments - */ -const de_EntryPointArguments = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EntryPointArguments omitted. -/** - * deserializeAws_restJson1Hive - */ -const de_Hive = (output: any, context: __SerdeContext): Hive => { - return { - initQueryFile: __expectString(output.initQueryFile), - parameters: __expectString(output.parameters), - query: __expectString(output.query), - } as any; -}; +// de_Hive omitted. -/** - * deserializeAws_restJson1ImageConfiguration - */ -const de_ImageConfiguration = (output: any, context: __SerdeContext): ImageConfiguration => { - return { - imageUri: __expectString(output.imageUri), - resolvedImageDigest: __expectString(output.resolvedImageDigest), - } as any; -}; +// de_ImageConfiguration omitted. -/** - * deserializeAws_restJson1InitialCapacityConfig - */ -const de_InitialCapacityConfig = (output: any, context: __SerdeContext): InitialCapacityConfig => { - return { - workerConfiguration: - output.workerConfiguration != null ? de_WorkerResourceConfig(output.workerConfiguration, context) : undefined, - workerCount: __expectLong(output.workerCount), - } as any; -}; +// de_InitialCapacityConfig omitted. -/** - * deserializeAws_restJson1InitialCapacityConfigMap - */ -const de_InitialCapacityConfigMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_InitialCapacityConfig(value, context); - return acc; - }, {}); -}; +// de_InitialCapacityConfigMap omitted. -/** - * deserializeAws_restJson1JobDriver - */ -const de_JobDriver = (output: any, context: __SerdeContext): JobDriver => { - if (output.hive != null) { - return { - hive: de_Hive(output.hive, context), - }; - } - if (output.sparkSubmit != null) { - return { - sparkSubmit: de_SparkSubmit(output.sparkSubmit, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_JobDriver omitted. /** * deserializeAws_restJson1JobRun */ const de_JobRun = (output: any, context: __SerdeContext): JobRun => { - return { - applicationId: __expectString(output.applicationId), - arn: __expectString(output.arn), - configurationOverrides: - output.configurationOverrides != null - ? de_ConfigurationOverrides(output.configurationOverrides, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - executionRole: __expectString(output.executionRole), - executionTimeoutMinutes: __expectLong(output.executionTimeoutMinutes), - jobDriver: output.jobDriver != null ? de_JobDriver(__expectUnion(output.jobDriver), context) : undefined, - jobRunId: __expectString(output.jobRunId), - name: __expectString(output.name), - networkConfiguration: - output.networkConfiguration != null ? de_NetworkConfiguration(output.networkConfiguration, context) : undefined, - releaseLabel: __expectString(output.releaseLabel), - state: __expectString(output.state), - stateDetails: __expectString(output.stateDetails), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - totalExecutionDurationSeconds: __expectInt32(output.totalExecutionDurationSeconds), - totalResourceUtilization: - output.totalResourceUtilization != null - ? de_TotalResourceUtilization(output.totalResourceUtilization, context) - : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + applicationId: __expectString, + arn: __expectString, + configurationOverrides: (_: any) => de_ConfigurationOverrides(_, context), + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + executionRole: __expectString, + executionTimeoutMinutes: __expectLong, + jobDriver: (_: any) => _json(__expectUnion(_)), + jobRunId: __expectString, + name: __expectString, + networkConfiguration: _json, + releaseLabel: __expectString, + state: __expectString, + stateDetails: __expectString, + tags: _json, + totalExecutionDurationSeconds: __expectInt32, + totalResourceUtilization: (_: any) => de_TotalResourceUtilization(_, context), + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2037,9 +1678,6 @@ const de_JobRuns = (output: any, context: __SerdeContext): JobRunSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobRunSummary(entry, context); }); return retVal; @@ -2049,200 +1687,58 @@ const de_JobRuns = (output: any, context: __SerdeContext): JobRunSummary[] => { * deserializeAws_restJson1JobRunSummary */ const de_JobRunSummary = (output: any, context: __SerdeContext): JobRunSummary => { - return { - applicationId: __expectString(output.applicationId), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdBy: __expectString(output.createdBy), - executionRole: __expectString(output.executionRole), - id: __expectString(output.id), - name: __expectString(output.name), - releaseLabel: __expectString(output.releaseLabel), - state: __expectString(output.state), - stateDetails: __expectString(output.stateDetails), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ManagedPersistenceMonitoringConfiguration - */ -const de_ManagedPersistenceMonitoringConfiguration = ( - output: any, - context: __SerdeContext -): ManagedPersistenceMonitoringConfiguration => { - return { - enabled: __expectBoolean(output.enabled), - encryptionKeyArn: __expectString(output.encryptionKeyArn), - } as any; + return take(output, { + applicationId: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdBy: __expectString, + executionRole: __expectString, + id: __expectString, + name: __expectString, + releaseLabel: __expectString, + state: __expectString, + stateDetails: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1MaximumAllowedResources - */ -const de_MaximumAllowedResources = (output: any, context: __SerdeContext): MaximumAllowedResources => { - return { - cpu: __expectString(output.cpu), - disk: __expectString(output.disk), - memory: __expectString(output.memory), - } as any; -}; +// de_ManagedPersistenceMonitoringConfiguration omitted. -/** - * deserializeAws_restJson1MonitoringConfiguration - */ -const de_MonitoringConfiguration = (output: any, context: __SerdeContext): MonitoringConfiguration => { - return { - managedPersistenceMonitoringConfiguration: - output.managedPersistenceMonitoringConfiguration != null - ? de_ManagedPersistenceMonitoringConfiguration(output.managedPersistenceMonitoringConfiguration, context) - : undefined, - s3MonitoringConfiguration: - output.s3MonitoringConfiguration != null - ? de_S3MonitoringConfiguration(output.s3MonitoringConfiguration, context) - : undefined, - } as any; -}; +// de_MaximumAllowedResources omitted. -/** - * deserializeAws_restJson1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined, - } as any; -}; +// de_MonitoringConfiguration omitted. -/** - * deserializeAws_restJson1S3MonitoringConfiguration - */ -const de_S3MonitoringConfiguration = (output: any, context: __SerdeContext): S3MonitoringConfiguration => { - return { - encryptionKeyArn: __expectString(output.encryptionKeyArn), - logUri: __expectString(output.logUri), - } as any; -}; +// de_NetworkConfiguration omitted. -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_S3MonitoringConfiguration omitted. -/** - * deserializeAws_restJson1SensitivePropertiesMap - */ -const de_SensitivePropertiesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1SparkSubmit - */ -const de_SparkSubmit = (output: any, context: __SerdeContext): SparkSubmit => { - return { - entryPoint: __expectString(output.entryPoint), - entryPointArguments: - output.entryPointArguments != null ? de_EntryPointArguments(output.entryPointArguments, context) : undefined, - sparkSubmitParameters: __expectString(output.sparkSubmitParameters), - } as any; -}; +// de_SensitivePropertiesMap omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SparkSubmit omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SubnetIds omitted. + +// de_TagMap omitted. /** * deserializeAws_restJson1TotalResourceUtilization */ const de_TotalResourceUtilization = (output: any, context: __SerdeContext): TotalResourceUtilization => { - return { - memoryGBHour: __limitedParseDouble(output.memoryGBHour), - storageGBHour: __limitedParseDouble(output.storageGBHour), - vCPUHour: __limitedParseDouble(output.vCPUHour), - } as any; + return take(output, { + memoryGBHour: __limitedParseDouble, + storageGBHour: __limitedParseDouble, + vCPUHour: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1WorkerResourceConfig - */ -const de_WorkerResourceConfig = (output: any, context: __SerdeContext): WorkerResourceConfig => { - return { - cpu: __expectString(output.cpu), - disk: __expectString(output.disk), - memory: __expectString(output.memory), - } as any; -}; +// de_WorkerResourceConfig omitted. -/** - * deserializeAws_restJson1WorkerTypeSpecification - */ -const de_WorkerTypeSpecification = (output: any, context: __SerdeContext): WorkerTypeSpecification => { - return { - imageConfiguration: - output.imageConfiguration != null ? de_ImageConfiguration(output.imageConfiguration, context) : undefined, - } as any; -}; +// de_WorkerTypeSpecification omitted. -/** - * deserializeAws_restJson1WorkerTypeSpecificationMap - */ -const de_WorkerTypeSpecificationMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_WorkerTypeSpecification(value, context); - return acc; - }, {}); -}; +// de_WorkerTypeSpecificationMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-emr/src/protocols/Aws_json1_1.ts b/clients/client-emr/src/protocols/Aws_json1_1.ts index 1f026cc94aae..06beb6d96117 100644 --- a/clients/client-emr/src/protocols/Aws_json1_1.ts +++ b/clients/client-emr/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,7 +13,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -167,44 +169,30 @@ import { import { EMRServiceException as __BaseException } from "../models/EMRServiceException"; import { AddInstanceFleetInput, - AddInstanceFleetOutput, AddInstanceGroupsInput, - AddInstanceGroupsOutput, AddJobFlowStepsInput, - AddJobFlowStepsOutput, AddTagsInput, - AddTagsOutput, Application, AutoScalingPolicy, AutoScalingPolicyDescription, - AutoScalingPolicyStateChangeReason, - AutoScalingPolicyStatus, AutoTerminationPolicy, BlockPublicAccessConfiguration, BlockPublicAccessConfigurationMetadata, BootstrapActionConfig, - BootstrapActionDetail, - CancelStepsInfo, CancelStepsInput, - CancelStepsOutput, CloudWatchAlarmDefinition, Cluster, ClusterState, - ClusterStateChangeReason, ClusterStatus, ClusterSummary, ClusterTimeline, - Command, ComputeLimits, Configuration, CreateSecurityConfigurationInput, CreateSecurityConfigurationOutput, CreateStudioInput, - CreateStudioOutput, CreateStudioSessionMappingInput, - Credentials, DeleteSecurityConfigurationInput, - DeleteSecurityConfigurationOutput, DeleteStudioInput, DeleteStudioSessionMappingInput, DescribeClusterInput, @@ -214,53 +202,41 @@ import { DescribeNotebookExecutionInput, DescribeNotebookExecutionOutput, DescribeReleaseLabelInput, - DescribeReleaseLabelOutput, DescribeSecurityConfigurationInput, DescribeSecurityConfigurationOutput, DescribeStepInput, DescribeStepOutput, DescribeStudioInput, DescribeStudioOutput, - EbsBlockDevice, EbsBlockDeviceConfig, EbsConfiguration, - EbsVolume, - Ec2InstanceAttributes, - ErrorDetail, ExecutionEngineConfig, - FailureDetails, GetAutoTerminationPolicyInput, - GetAutoTerminationPolicyOutput, GetBlockPublicAccessConfigurationInput, GetBlockPublicAccessConfigurationOutput, GetClusterSessionCredentialsInput, GetClusterSessionCredentialsOutput, GetManagedScalingPolicyInput, - GetManagedScalingPolicyOutput, GetStudioSessionMappingInput, GetStudioSessionMappingOutput, HadoopJarStepConfig, - HadoopStepConfig, Instance, InstanceFleet, InstanceFleetConfig, InstanceFleetModifyConfig, InstanceFleetProvisioningSpecifications, InstanceFleetResizingSpecifications, - InstanceFleetStateChangeReason, InstanceFleetStatus, InstanceFleetTimeline, InstanceGroup, InstanceGroupConfig, InstanceGroupDetail, InstanceGroupModifyConfig, - InstanceGroupStateChangeReason, InstanceGroupStatus, InstanceGroupTimeline, InstanceGroupType, InstanceResizePolicy, InstanceState, - InstanceStateChangeReason, InstanceStatus, InstanceTimeline, InstanceTypeConfig, @@ -276,7 +252,6 @@ import { KerberosAttributes, KeyValue, ListBootstrapActionsInput, - ListBootstrapActionsOutput, ListClustersInput, ListClustersOutput, ListInstanceFleetsInput, @@ -288,7 +263,6 @@ import { ListNotebookExecutionsInput, ListNotebookExecutionsOutput, ListReleaseLabelsInput, - ListReleaseLabelsOutput, ListSecurityConfigurationsInput, ListSecurityConfigurationsOutput, ListStepsInput, @@ -300,7 +274,6 @@ import { ManagedScalingPolicy, MetricDimension, ModifyClusterInput, - ModifyClusterOutput, ModifyInstanceFleetInput, ModifyInstanceGroupsInput, NotebookExecution, @@ -308,29 +281,20 @@ import { OnDemandCapacityReservationOptions, OnDemandProvisioningSpecification, OnDemandResizingSpecification, - OSRelease, PlacementGroupConfig, PlacementType, PortRange, PutAutoScalingPolicyInput, PutAutoScalingPolicyOutput, PutAutoTerminationPolicyInput, - PutAutoTerminationPolicyOutput, PutBlockPublicAccessConfigurationInput, - PutBlockPublicAccessConfigurationOutput, PutManagedScalingPolicyInput, - PutManagedScalingPolicyOutput, ReleaseLabelFilter, RemoveAutoScalingPolicyInput, - RemoveAutoScalingPolicyOutput, RemoveAutoTerminationPolicyInput, - RemoveAutoTerminationPolicyOutput, RemoveManagedScalingPolicyInput, - RemoveManagedScalingPolicyOutput, RemoveTagsInput, - RemoveTagsOutput, RunJobFlowInput, - RunJobFlowOutput, ScalingAction, ScalingConstraints, ScalingRule, @@ -343,17 +307,14 @@ import { SetVisibleToAllUsersInput, ShrinkPolicy, SimpleScalingPolicyConfiguration, - SimplifiedApplication, SpotProvisioningSpecification, SpotResizingSpecification, StartNotebookExecutionInput, - StartNotebookExecutionOutput, Step, StepConfig, StepDetail, StepExecutionStatusDetail, StepState, - StepStateChangeReason, StepStatus, StepSummary, StepTimeline, @@ -365,7 +326,6 @@ import { TerminateJobFlowsInput, UpdateStudioInput, UpdateStudioSessionMappingInput, - UsernamePassword, VolumeSpecification, } from "../models/models_0"; @@ -404,7 +364,7 @@ export const se_AddJobFlowStepsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddJobFlowSteps"); let body: any; - body = JSON.stringify(se_AddJobFlowStepsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -417,7 +377,7 @@ export const se_AddTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTags"); let body: any; - body = JSON.stringify(se_AddTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -430,7 +390,7 @@ export const se_CancelStepsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelSteps"); let body: any; - body = JSON.stringify(se_CancelStepsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -443,7 +403,7 @@ export const se_CreateSecurityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSecurityConfiguration"); let body: any; - body = JSON.stringify(se_CreateSecurityConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -456,7 +416,7 @@ export const se_CreateStudioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStudio"); let body: any; - body = JSON.stringify(se_CreateStudioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -469,7 +429,7 @@ export const se_CreateStudioSessionMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStudioSessionMapping"); let body: any; - body = JSON.stringify(se_CreateStudioSessionMappingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -482,7 +442,7 @@ export const se_DeleteSecurityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSecurityConfiguration"); let body: any; - body = JSON.stringify(se_DeleteSecurityConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -495,7 +455,7 @@ export const se_DeleteStudioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStudio"); let body: any; - body = JSON.stringify(se_DeleteStudioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -508,7 +468,7 @@ export const se_DeleteStudioSessionMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStudioSessionMapping"); let body: any; - body = JSON.stringify(se_DeleteStudioSessionMappingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -521,7 +481,7 @@ export const se_DescribeClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCluster"); let body: any; - body = JSON.stringify(se_DescribeClusterInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -547,7 +507,7 @@ export const se_DescribeNotebookExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNotebookExecution"); let body: any; - body = JSON.stringify(se_DescribeNotebookExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -560,7 +520,7 @@ export const se_DescribeReleaseLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReleaseLabel"); let body: any; - body = JSON.stringify(se_DescribeReleaseLabelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -573,7 +533,7 @@ export const se_DescribeSecurityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSecurityConfiguration"); let body: any; - body = JSON.stringify(se_DescribeSecurityConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -586,7 +546,7 @@ export const se_DescribeStepCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStep"); let body: any; - body = JSON.stringify(se_DescribeStepInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -599,7 +559,7 @@ export const se_DescribeStudioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStudio"); let body: any; - body = JSON.stringify(se_DescribeStudioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -612,7 +572,7 @@ export const se_GetAutoTerminationPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAutoTerminationPolicy"); let body: any; - body = JSON.stringify(se_GetAutoTerminationPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -625,7 +585,7 @@ export const se_GetBlockPublicAccessConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBlockPublicAccessConfiguration"); let body: any; - body = JSON.stringify(se_GetBlockPublicAccessConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -638,7 +598,7 @@ export const se_GetClusterSessionCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetClusterSessionCredentials"); let body: any; - body = JSON.stringify(se_GetClusterSessionCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -651,7 +611,7 @@ export const se_GetManagedScalingPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetManagedScalingPolicy"); let body: any; - body = JSON.stringify(se_GetManagedScalingPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -664,7 +624,7 @@ export const se_GetStudioSessionMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetStudioSessionMapping"); let body: any; - body = JSON.stringify(se_GetStudioSessionMappingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -677,7 +637,7 @@ export const se_ListBootstrapActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBootstrapActions"); let body: any; - body = JSON.stringify(se_ListBootstrapActionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -703,7 +663,7 @@ export const se_ListInstanceFleetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInstanceFleets"); let body: any; - body = JSON.stringify(se_ListInstanceFleetsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -716,7 +676,7 @@ export const se_ListInstanceGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInstanceGroups"); let body: any; - body = JSON.stringify(se_ListInstanceGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -729,7 +689,7 @@ export const se_ListInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInstances"); let body: any; - body = JSON.stringify(se_ListInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -755,7 +715,7 @@ export const se_ListReleaseLabelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReleaseLabels"); let body: any; - body = JSON.stringify(se_ListReleaseLabelsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -768,7 +728,7 @@ export const se_ListSecurityConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSecurityConfigurations"); let body: any; - body = JSON.stringify(se_ListSecurityConfigurationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -781,7 +741,7 @@ export const se_ListStepsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSteps"); let body: any; - body = JSON.stringify(se_ListStepsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -794,7 +754,7 @@ export const se_ListStudiosCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStudios"); let body: any; - body = JSON.stringify(se_ListStudiosInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -807,7 +767,7 @@ export const se_ListStudioSessionMappingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStudioSessionMappings"); let body: any; - body = JSON.stringify(se_ListStudioSessionMappingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -820,7 +780,7 @@ export const se_ModifyClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyCluster"); let body: any; - body = JSON.stringify(se_ModifyClusterInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -833,7 +793,7 @@ export const se_ModifyInstanceFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyInstanceFleet"); let body: any; - body = JSON.stringify(se_ModifyInstanceFleetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -872,7 +832,7 @@ export const se_PutAutoTerminationPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAutoTerminationPolicy"); let body: any; - body = JSON.stringify(se_PutAutoTerminationPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -898,7 +858,7 @@ export const se_PutManagedScalingPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutManagedScalingPolicy"); let body: any; - body = JSON.stringify(se_PutManagedScalingPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -911,7 +871,7 @@ export const se_RemoveAutoScalingPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveAutoScalingPolicy"); let body: any; - body = JSON.stringify(se_RemoveAutoScalingPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -924,7 +884,7 @@ export const se_RemoveAutoTerminationPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveAutoTerminationPolicy"); let body: any; - body = JSON.stringify(se_RemoveAutoTerminationPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -937,7 +897,7 @@ export const se_RemoveManagedScalingPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveManagedScalingPolicy"); let body: any; - body = JSON.stringify(se_RemoveManagedScalingPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -950,7 +910,7 @@ export const se_RemoveTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTags"); let body: any; - body = JSON.stringify(se_RemoveTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -976,7 +936,7 @@ export const se_SetTerminationProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetTerminationProtection"); let body: any; - body = JSON.stringify(se_SetTerminationProtectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -989,7 +949,7 @@ export const se_SetVisibleToAllUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetVisibleToAllUsers"); let body: any; - body = JSON.stringify(se_SetVisibleToAllUsersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1002,7 +962,7 @@ export const se_StartNotebookExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartNotebookExecution"); let body: any; - body = JSON.stringify(se_StartNotebookExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1015,7 +975,7 @@ export const se_StopNotebookExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopNotebookExecution"); let body: any; - body = JSON.stringify(se_StopNotebookExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1028,7 +988,7 @@ export const se_TerminateJobFlowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TerminateJobFlows"); let body: any; - body = JSON.stringify(se_TerminateJobFlowsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1041,7 +1001,7 @@ export const se_UpdateStudioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateStudio"); let body: any; - body = JSON.stringify(se_UpdateStudioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1054,7 +1014,7 @@ export const se_UpdateStudioSessionMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateStudioSessionMapping"); let body: any; - body = JSON.stringify(se_UpdateStudioSessionMappingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1070,12 +1030,12 @@ export const de_AddInstanceFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddInstanceFleetOutput(data, context); + contents = _json(data); const response: AddInstanceFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1099,10 +1059,9 @@ const de_AddInstanceFleetCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1120,12 +1079,12 @@ export const de_AddInstanceGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddInstanceGroupsOutput(data, context); + contents = _json(data); const response: AddInstanceGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1146,10 +1105,9 @@ const de_AddInstanceGroupsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1167,12 +1125,12 @@ export const de_AddJobFlowStepsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddJobFlowStepsOutput(data, context); + contents = _json(data); const response: AddJobFlowStepsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1193,10 +1151,9 @@ const de_AddJobFlowStepsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1214,12 +1171,12 @@ export const de_AddTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsOutput(data, context); + contents = _json(data); const response: AddTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1243,10 +1200,9 @@ const de_AddTagsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1264,12 +1220,12 @@ export const de_CancelStepsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelStepsOutput(data, context); + contents = _json(data); const response: CancelStepsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1293,10 +1249,9 @@ const de_CancelStepsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1319,7 +1274,7 @@ export const de_CreateSecurityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1343,10 +1298,9 @@ const de_CreateSecurityConfigurationCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1364,12 +1318,12 @@ export const de_CreateStudioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateStudioOutput(data, context); + contents = _json(data); const response: CreateStudioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1393,10 +1347,9 @@ const de_CreateStudioCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1416,7 +1369,7 @@ export const de_CreateStudioSessionMappingCommand = async ( const response: CreateStudioSessionMappingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1440,10 +1393,9 @@ const de_CreateStudioSessionMappingCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1461,12 +1413,12 @@ export const de_DeleteSecurityConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSecurityConfigurationOutput(data, context); + contents = _json(data); const response: DeleteSecurityConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1490,10 +1442,9 @@ const de_DeleteSecurityConfigurationCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1513,7 +1464,7 @@ export const de_DeleteStudioCommand = async ( const response: DeleteStudioCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1537,10 +1488,9 @@ const de_DeleteStudioCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1560,7 +1510,7 @@ export const de_DeleteStudioSessionMappingCommand = async ( const response: DeleteStudioSessionMappingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1584,10 +1534,9 @@ const de_DeleteStudioSessionMappingCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1610,7 +1559,7 @@ export const de_DescribeClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1634,10 +1583,9 @@ const de_DescribeClusterCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1660,7 +1608,7 @@ export const de_DescribeJobFlowsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1681,10 +1629,9 @@ const de_DescribeJobFlowsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1707,7 +1654,7 @@ export const de_DescribeNotebookExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1731,10 +1678,9 @@ const de_DescribeNotebookExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1752,12 +1698,12 @@ export const de_DescribeReleaseLabelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeReleaseLabelOutput(data, context); + contents = _json(data); const response: DescribeReleaseLabelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1781,10 +1727,9 @@ const de_DescribeReleaseLabelCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1807,7 +1752,7 @@ export const de_DescribeSecurityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1831,10 +1776,9 @@ const de_DescribeSecurityConfigurationCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1857,7 +1801,7 @@ export const de_DescribeStepCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1881,10 +1825,9 @@ const de_DescribeStepCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1907,7 +1850,7 @@ export const de_DescribeStudioCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1931,10 +1874,9 @@ const de_DescribeStudioCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1952,12 +1894,12 @@ export const de_GetAutoTerminationPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAutoTerminationPolicyOutput(data, context); + contents = _json(data); const response: GetAutoTerminationPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1973,10 +1915,9 @@ const de_GetAutoTerminationPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1998,7 +1939,7 @@ export const de_GetBlockPublicAccessConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2022,10 +1963,9 @@ const de_GetBlockPublicAccessConfigurationCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2048,7 +1988,7 @@ export const de_GetClusterSessionCredentialsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2072,10 +2012,9 @@ const de_GetClusterSessionCredentialsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2093,12 +2032,12 @@ export const de_GetManagedScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetManagedScalingPolicyOutput(data, context); + contents = _json(data); const response: GetManagedScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2114,10 +2053,9 @@ const de_GetManagedScalingPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2139,7 +2077,7 @@ export const de_GetStudioSessionMappingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2163,10 +2101,9 @@ const de_GetStudioSessionMappingCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2184,12 +2121,12 @@ export const de_ListBootstrapActionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBootstrapActionsOutput(data, context); + contents = _json(data); const response: ListBootstrapActionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2213,10 +2150,9 @@ const de_ListBootstrapActionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2239,7 +2175,7 @@ export const de_ListClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2263,10 +2199,9 @@ const de_ListClustersCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2289,7 +2224,7 @@ export const de_ListInstanceFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2313,10 +2248,9 @@ const de_ListInstanceFleetsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2339,7 +2273,7 @@ export const de_ListInstanceGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2363,10 +2297,9 @@ const de_ListInstanceGroupsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2389,7 +2322,7 @@ export const de_ListInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2413,10 +2346,9 @@ const de_ListInstancesCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2439,7 +2371,7 @@ export const de_ListNotebookExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2463,10 +2395,9 @@ const de_ListNotebookExecutionsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2484,12 +2415,12 @@ export const de_ListReleaseLabelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReleaseLabelsOutput(data, context); + contents = _json(data); const response: ListReleaseLabelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2513,10 +2444,9 @@ const de_ListReleaseLabelsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2539,7 +2469,7 @@ export const de_ListSecurityConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2563,10 +2493,9 @@ const de_ListSecurityConfigurationsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2589,7 +2518,7 @@ export const de_ListStepsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2613,10 +2542,9 @@ const de_ListStepsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2639,7 +2567,7 @@ export const de_ListStudiosCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2663,10 +2591,9 @@ const de_ListStudiosCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2689,7 +2616,7 @@ export const de_ListStudioSessionMappingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2713,10 +2640,9 @@ const de_ListStudioSessionMappingsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2734,12 +2660,12 @@ export const de_ModifyClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyClusterOutput(data, context); + contents = _json(data); const response: ModifyClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2763,10 +2689,9 @@ const de_ModifyClusterCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2786,7 +2711,7 @@ export const de_ModifyInstanceFleetCommand = async ( const response: ModifyInstanceFleetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2810,10 +2735,9 @@ const de_ModifyInstanceFleetCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2833,7 +2757,7 @@ export const de_ModifyInstanceGroupsCommand = async ( const response: ModifyInstanceGroupsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2854,10 +2778,9 @@ const de_ModifyInstanceGroupsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2880,7 +2803,7 @@ export const de_PutAutoScalingPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2896,10 +2819,9 @@ const de_PutAutoScalingPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2916,12 +2838,12 @@ export const de_PutAutoTerminationPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAutoTerminationPolicyOutput(data, context); + contents = _json(data); const response: PutAutoTerminationPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2937,10 +2859,9 @@ const de_PutAutoTerminationPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2957,12 +2878,12 @@ export const de_PutBlockPublicAccessConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutBlockPublicAccessConfigurationOutput(data, context); + contents = _json(data); const response: PutBlockPublicAccessConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2986,10 +2907,9 @@ const de_PutBlockPublicAccessConfigurationCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3007,12 +2927,12 @@ export const de_PutManagedScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutManagedScalingPolicyOutput(data, context); + contents = _json(data); const response: PutManagedScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3028,10 +2948,9 @@ const de_PutManagedScalingPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3048,12 +2967,12 @@ export const de_RemoveAutoScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveAutoScalingPolicyOutput(data, context); + contents = _json(data); const response: RemoveAutoScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3069,10 +2988,9 @@ const de_RemoveAutoScalingPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3089,12 +3007,12 @@ export const de_RemoveAutoTerminationPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveAutoTerminationPolicyOutput(data, context); + contents = _json(data); const response: RemoveAutoTerminationPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3110,10 +3028,9 @@ const de_RemoveAutoTerminationPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3130,12 +3047,12 @@ export const de_RemoveManagedScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveManagedScalingPolicyOutput(data, context); + contents = _json(data); const response: RemoveManagedScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3151,10 +3068,9 @@ const de_RemoveManagedScalingPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3171,12 +3087,12 @@ export const de_RemoveTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsOutput(data, context); + contents = _json(data); const response: RemoveTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3200,10 +3116,9 @@ const de_RemoveTagsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3221,12 +3136,12 @@ export const de_RunJobFlowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RunJobFlowOutput(data, context); + contents = _json(data); const response: RunJobFlowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3247,10 +3162,9 @@ const de_RunJobFlowCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3270,7 +3184,7 @@ export const de_SetTerminationProtectionCommand = async ( const response: SetTerminationProtectionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3291,10 +3205,9 @@ const de_SetTerminationProtectionCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3314,7 +3227,7 @@ export const de_SetVisibleToAllUsersCommand = async ( const response: SetVisibleToAllUsersCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3335,10 +3248,9 @@ const de_SetVisibleToAllUsersCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3356,12 +3268,12 @@ export const de_StartNotebookExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartNotebookExecutionOutput(data, context); + contents = _json(data); const response: StartNotebookExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3385,10 +3297,9 @@ const de_StartNotebookExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3408,7 +3319,7 @@ export const de_StopNotebookExecutionCommand = async ( const response: StopNotebookExecutionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3432,10 +3343,9 @@ const de_StopNotebookExecutionCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3455,7 +3365,7 @@ export const de_TerminateJobFlowsCommand = async ( const response: TerminateJobFlowsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3476,10 +3386,9 @@ const de_TerminateJobFlowsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3499,7 +3408,7 @@ export const de_UpdateStudioCommand = async ( const response: UpdateStudioCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3523,10 +3432,9 @@ const de_UpdateStudioCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3546,7 +3454,7 @@ export const de_UpdateStudioSessionMappingCommand = async ( const response: UpdateStudioSessionMappingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3570,10 +3478,9 @@ const de_UpdateStudioSessionMappingCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3584,7 +3491,7 @@ const de_UpdateStudioSessionMappingCommandError = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3600,7 +3507,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3616,7 +3523,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3628,188 +3535,91 @@ const de_InvalidRequestExceptionRes = async ( * serializeAws_json1_1AddInstanceFleetInput */ const se_AddInstanceFleetInput = (input: AddInstanceFleetInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.InstanceFleet != null && { InstanceFleet: se_InstanceFleetConfig(input.InstanceFleet, context) }), - }; + return take(input, { + ClusterId: [], + InstanceFleet: (_) => se_InstanceFleetConfig(_, context), + }); }; /** * serializeAws_json1_1AddInstanceGroupsInput */ const se_AddInstanceGroupsInput = (input: AddInstanceGroupsInput, context: __SerdeContext): any => { - return { - ...(input.InstanceGroups != null && { InstanceGroups: se_InstanceGroupConfigList(input.InstanceGroups, context) }), - ...(input.JobFlowId != null && { JobFlowId: input.JobFlowId }), - }; + return take(input, { + InstanceGroups: (_) => se_InstanceGroupConfigList(_, context), + JobFlowId: [], + }); }; -/** - * serializeAws_json1_1AddJobFlowStepsInput - */ -const se_AddJobFlowStepsInput = (input: AddJobFlowStepsInput, context: __SerdeContext): any => { - return { - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.JobFlowId != null && { JobFlowId: input.JobFlowId }), - ...(input.Steps != null && { Steps: se_StepConfigList(input.Steps, context) }), - }; -}; +// se_AddJobFlowStepsInput omitted. -/** - * serializeAws_json1_1AddTagsInput - */ -const se_AddTagsInput = (input: AddTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AddTagsInput omitted. -/** - * serializeAws_json1_1Application - */ -const se_Application = (input: Application, context: __SerdeContext): any => { - return { - ...(input.AdditionalInfo != null && { AdditionalInfo: se_StringMap(input.AdditionalInfo, context) }), - ...(input.Args != null && { Args: se_StringList(input.Args, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_Application omitted. -/** - * serializeAws_json1_1ApplicationList - */ -const se_ApplicationList = (input: Application[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Application(entry, context); - }); -}; +// se_ApplicationList omitted. /** * serializeAws_json1_1AutoScalingPolicy */ const se_AutoScalingPolicy = (input: AutoScalingPolicy, context: __SerdeContext): any => { - return { - ...(input.Constraints != null && { Constraints: se_ScalingConstraints(input.Constraints, context) }), - ...(input.Rules != null && { Rules: se_ScalingRuleList(input.Rules, context) }), - }; + return take(input, { + Constraints: _json, + Rules: (_) => se_ScalingRuleList(_, context), + }); }; -/** - * serializeAws_json1_1AutoTerminationPolicy - */ -const se_AutoTerminationPolicy = (input: AutoTerminationPolicy, context: __SerdeContext): any => { - return { - ...(input.IdleTimeout != null && { IdleTimeout: input.IdleTimeout }), - }; -}; +// se_AutoTerminationPolicy omitted. /** * serializeAws_json1_1BlockPublicAccessConfiguration */ const se_BlockPublicAccessConfiguration = (input: BlockPublicAccessConfiguration, context: __SerdeContext): any => { - return { - ...(input.BlockPublicSecurityGroupRules != null && { - BlockPublicSecurityGroupRules: input.BlockPublicSecurityGroupRules, - }), - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.Configurations != null && { Configurations: se_ConfigurationList(input.Configurations, context) }), - ...(input.PermittedPublicSecurityGroupRuleRanges != null && { - PermittedPublicSecurityGroupRuleRanges: se_PortRanges(input.PermittedPublicSecurityGroupRuleRanges, context), - }), - ...(input.Properties != null && { Properties: se_StringMap(input.Properties, context) }), - }; + return take(input, { + BlockPublicSecurityGroupRules: [], + Classification: [], + Configurations: (_) => se_ConfigurationList(_, context), + PermittedPublicSecurityGroupRuleRanges: _json, + Properties: _json, + }); }; -/** - * serializeAws_json1_1BootstrapActionConfig - */ -const se_BootstrapActionConfig = (input: BootstrapActionConfig, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ScriptBootstrapAction != null && { - ScriptBootstrapAction: se_ScriptBootstrapActionConfig(input.ScriptBootstrapAction, context), - }), - }; -}; +// se_BootstrapActionConfig omitted. -/** - * serializeAws_json1_1BootstrapActionConfigList - */ -const se_BootstrapActionConfigList = (input: BootstrapActionConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BootstrapActionConfig(entry, context); - }); -}; +// se_BootstrapActionConfigList omitted. -/** - * serializeAws_json1_1CancelStepsInput - */ -const se_CancelStepsInput = (input: CancelStepsInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.StepCancellationOption != null && { StepCancellationOption: input.StepCancellationOption }), - ...(input.StepIds != null && { StepIds: se_StepIdsList(input.StepIds, context) }), - }; -}; +// se_CancelStepsInput omitted. /** * serializeAws_json1_1CloudWatchAlarmDefinition */ const se_CloudWatchAlarmDefinition = (input: CloudWatchAlarmDefinition, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.Dimensions != null && { Dimensions: se_MetricDimensionList(input.Dimensions, context) }), - ...(input.EvaluationPeriods != null && { EvaluationPeriods: input.EvaluationPeriods }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.Period != null && { Period: input.Period }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }), - ...(input.Unit != null && { Unit: input.Unit }), - }; + return take(input, { + ComparisonOperator: [], + Dimensions: _json, + EvaluationPeriods: [], + MetricName: [], + Namespace: [], + Period: [], + Statistic: [], + Threshold: __serializeFloat, + Unit: [], + }); }; -/** - * serializeAws_json1_1ClusterStateList - */ -const se_ClusterStateList = (input: (ClusterState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ClusterStateList omitted. -/** - * serializeAws_json1_1ComputeLimits - */ -const se_ComputeLimits = (input: ComputeLimits, context: __SerdeContext): any => { - return { - ...(input.MaximumCapacityUnits != null && { MaximumCapacityUnits: input.MaximumCapacityUnits }), - ...(input.MaximumCoreCapacityUnits != null && { MaximumCoreCapacityUnits: input.MaximumCoreCapacityUnits }), - ...(input.MaximumOnDemandCapacityUnits != null && { - MaximumOnDemandCapacityUnits: input.MaximumOnDemandCapacityUnits, - }), - ...(input.MinimumCapacityUnits != null && { MinimumCapacityUnits: input.MinimumCapacityUnits }), - ...(input.UnitType != null && { UnitType: input.UnitType }), - }; -}; +// se_ComputeLimits omitted. /** * serializeAws_json1_1Configuration */ const se_Configuration = (input: Configuration, context: __SerdeContext): any => { - return { - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.Configurations != null && { Configurations: se_ConfigurationList(input.Configurations, context) }), - ...(input.Properties != null && { Properties: se_StringMap(input.Properties, context) }), - }; + return take(input, { + Classification: [], + Configurations: (_) => se_ConfigurationList(_, context), + Properties: _json, + }); }; /** @@ -3823,306 +3633,79 @@ const se_ConfigurationList = (input: Configuration[], context: __SerdeContext): }); }; -/** - * serializeAws_json1_1CreateSecurityConfigurationInput - */ -const se_CreateSecurityConfigurationInput = (input: CreateSecurityConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - }; -}; +// se_CreateSecurityConfigurationInput omitted. -/** - * serializeAws_json1_1CreateStudioInput - */ -const se_CreateStudioInput = (input: CreateStudioInput, context: __SerdeContext): any => { - return { - ...(input.AuthMode != null && { AuthMode: input.AuthMode }), - ...(input.DefaultS3Location != null && { DefaultS3Location: input.DefaultS3Location }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EngineSecurityGroupId != null && { EngineSecurityGroupId: input.EngineSecurityGroupId }), - ...(input.IdpAuthUrl != null && { IdpAuthUrl: input.IdpAuthUrl }), - ...(input.IdpRelayStateParameterName != null && { IdpRelayStateParameterName: input.IdpRelayStateParameterName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdList(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserRole != null && { UserRole: input.UserRole }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - ...(input.WorkspaceSecurityGroupId != null && { WorkspaceSecurityGroupId: input.WorkspaceSecurityGroupId }), - }; -}; +// se_CreateStudioInput omitted. -/** - * serializeAws_json1_1CreateStudioSessionMappingInput - */ -const se_CreateStudioSessionMappingInput = (input: CreateStudioSessionMappingInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityName != null && { IdentityName: input.IdentityName }), - ...(input.IdentityType != null && { IdentityType: input.IdentityType }), - ...(input.SessionPolicyArn != null && { SessionPolicyArn: input.SessionPolicyArn }), - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; +// se_CreateStudioSessionMappingInput omitted. -/** - * serializeAws_json1_1DeleteSecurityConfigurationInput - */ -const se_DeleteSecurityConfigurationInput = (input: DeleteSecurityConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteSecurityConfigurationInput omitted. -/** - * serializeAws_json1_1DeleteStudioInput - */ -const se_DeleteStudioInput = (input: DeleteStudioInput, context: __SerdeContext): any => { - return { - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; +// se_DeleteStudioInput omitted. -/** - * serializeAws_json1_1DeleteStudioSessionMappingInput - */ -const se_DeleteStudioSessionMappingInput = (input: DeleteStudioSessionMappingInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityName != null && { IdentityName: input.IdentityName }), - ...(input.IdentityType != null && { IdentityType: input.IdentityType }), - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; +// se_DeleteStudioSessionMappingInput omitted. -/** - * serializeAws_json1_1DescribeClusterInput - */ -const se_DescribeClusterInput = (input: DescribeClusterInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_DescribeClusterInput omitted. /** * serializeAws_json1_1DescribeJobFlowsInput */ const se_DescribeJobFlowsInput = (input: DescribeJobFlowsInput, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.JobFlowIds != null && { JobFlowIds: se_XmlStringList(input.JobFlowIds, context) }), - ...(input.JobFlowStates != null && { JobFlowStates: se_JobFlowExecutionStateList(input.JobFlowStates, context) }), - }; + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + JobFlowIds: _json, + JobFlowStates: _json, + }); }; -/** - * serializeAws_json1_1DescribeNotebookExecutionInput - */ -const se_DescribeNotebookExecutionInput = (input: DescribeNotebookExecutionInput, context: __SerdeContext): any => { - return { - ...(input.NotebookExecutionId != null && { NotebookExecutionId: input.NotebookExecutionId }), - }; -}; +// se_DescribeNotebookExecutionInput omitted. -/** - * serializeAws_json1_1DescribeReleaseLabelInput - */ -const se_DescribeReleaseLabelInput = (input: DescribeReleaseLabelInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ReleaseLabel != null && { ReleaseLabel: input.ReleaseLabel }), - }; -}; +// se_DescribeReleaseLabelInput omitted. -/** - * serializeAws_json1_1DescribeSecurityConfigurationInput - */ -const se_DescribeSecurityConfigurationInput = ( - input: DescribeSecurityConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeSecurityConfigurationInput omitted. -/** - * serializeAws_json1_1DescribeStepInput - */ -const se_DescribeStepInput = (input: DescribeStepInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.StepId != null && { StepId: input.StepId }), - }; -}; +// se_DescribeStepInput omitted. -/** - * serializeAws_json1_1DescribeStudioInput - */ -const se_DescribeStudioInput = (input: DescribeStudioInput, context: __SerdeContext): any => { - return { - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; +// se_DescribeStudioInput omitted. -/** - * serializeAws_json1_1EbsBlockDeviceConfig - */ -const se_EbsBlockDeviceConfig = (input: EbsBlockDeviceConfig, context: __SerdeContext): any => { - return { - ...(input.VolumeSpecification != null && { - VolumeSpecification: se_VolumeSpecification(input.VolumeSpecification, context), - }), - ...(input.VolumesPerInstance != null && { VolumesPerInstance: input.VolumesPerInstance }), - }; -}; +// se_EbsBlockDeviceConfig omitted. -/** - * serializeAws_json1_1EbsBlockDeviceConfigList - */ -const se_EbsBlockDeviceConfigList = (input: EbsBlockDeviceConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EbsBlockDeviceConfig(entry, context); - }); -}; +// se_EbsBlockDeviceConfigList omitted. -/** - * serializeAws_json1_1EbsConfiguration - */ -const se_EbsConfiguration = (input: EbsConfiguration, context: __SerdeContext): any => { - return { - ...(input.EbsBlockDeviceConfigs != null && { - EbsBlockDeviceConfigs: se_EbsBlockDeviceConfigList(input.EbsBlockDeviceConfigs, context), - }), - ...(input.EbsOptimized != null && { EbsOptimized: input.EbsOptimized }), - }; -}; +// se_EbsConfiguration omitted. -/** - * serializeAws_json1_1EC2InstanceIdsList - */ -const se_EC2InstanceIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EC2InstanceIdsList omitted. -/** - * serializeAws_json1_1EC2InstanceIdsToTerminateList - */ -const se_EC2InstanceIdsToTerminateList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EC2InstanceIdsToTerminateList omitted. -/** - * serializeAws_json1_1ExecutionEngineConfig - */ -const se_ExecutionEngineConfig = (input: ExecutionEngineConfig, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.MasterInstanceSecurityGroupId != null && { - MasterInstanceSecurityGroupId: input.MasterInstanceSecurityGroupId, - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ExecutionEngineConfig omitted. -/** - * serializeAws_json1_1GetAutoTerminationPolicyInput - */ -const se_GetAutoTerminationPolicyInput = (input: GetAutoTerminationPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_GetAutoTerminationPolicyInput omitted. -/** - * serializeAws_json1_1GetBlockPublicAccessConfigurationInput - */ -const se_GetBlockPublicAccessConfigurationInput = ( - input: GetBlockPublicAccessConfigurationInput, - context: __SerdeContext -): any => { - return {}; -}; +// se_GetBlockPublicAccessConfigurationInput omitted. -/** - * serializeAws_json1_1GetClusterSessionCredentialsInput - */ -const se_GetClusterSessionCredentialsInput = ( - input: GetClusterSessionCredentialsInput, - context: __SerdeContext -): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - }; -}; +// se_GetClusterSessionCredentialsInput omitted. -/** - * serializeAws_json1_1GetManagedScalingPolicyInput - */ -const se_GetManagedScalingPolicyInput = (input: GetManagedScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_GetManagedScalingPolicyInput omitted. -/** - * serializeAws_json1_1GetStudioSessionMappingInput - */ -const se_GetStudioSessionMappingInput = (input: GetStudioSessionMappingInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityName != null && { IdentityName: input.IdentityName }), - ...(input.IdentityType != null && { IdentityType: input.IdentityType }), - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; +// se_GetStudioSessionMappingInput omitted. -/** - * serializeAws_json1_1HadoopJarStepConfig - */ -const se_HadoopJarStepConfig = (input: HadoopJarStepConfig, context: __SerdeContext): any => { - return { - ...(input.Args != null && { Args: se_XmlStringList(input.Args, context) }), - ...(input.Jar != null && { Jar: input.Jar }), - ...(input.MainClass != null && { MainClass: input.MainClass }), - ...(input.Properties != null && { Properties: se_KeyValueList(input.Properties, context) }), - }; -}; +// se_HadoopJarStepConfig omitted. /** * serializeAws_json1_1InstanceFleetConfig */ const se_InstanceFleetConfig = (input: InstanceFleetConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceFleetType != null && { InstanceFleetType: input.InstanceFleetType }), - ...(input.InstanceTypeConfigs != null && { - InstanceTypeConfigs: se_InstanceTypeConfigList(input.InstanceTypeConfigs, context), - }), - ...(input.LaunchSpecifications != null && { - LaunchSpecifications: se_InstanceFleetProvisioningSpecifications(input.LaunchSpecifications, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResizeSpecifications != null && { - ResizeSpecifications: se_InstanceFleetResizingSpecifications(input.ResizeSpecifications, context), - }), - ...(input.TargetOnDemandCapacity != null && { TargetOnDemandCapacity: input.TargetOnDemandCapacity }), - ...(input.TargetSpotCapacity != null && { TargetSpotCapacity: input.TargetSpotCapacity }), - }; + return take(input, { + InstanceFleetType: [], + InstanceTypeConfigs: (_) => se_InstanceTypeConfigList(_, context), + LaunchSpecifications: _json, + Name: [], + ResizeSpecifications: _json, + TargetOnDemandCapacity: [], + TargetSpotCapacity: [], + }); }; /** @@ -4136,72 +3719,28 @@ const se_InstanceFleetConfigList = (input: InstanceFleetConfig[], context: __Ser }); }; -/** - * serializeAws_json1_1InstanceFleetModifyConfig - */ -const se_InstanceFleetModifyConfig = (input: InstanceFleetModifyConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceFleetId != null && { InstanceFleetId: input.InstanceFleetId }), - ...(input.ResizeSpecifications != null && { - ResizeSpecifications: se_InstanceFleetResizingSpecifications(input.ResizeSpecifications, context), - }), - ...(input.TargetOnDemandCapacity != null && { TargetOnDemandCapacity: input.TargetOnDemandCapacity }), - ...(input.TargetSpotCapacity != null && { TargetSpotCapacity: input.TargetSpotCapacity }), - }; -}; +// se_InstanceFleetModifyConfig omitted. -/** - * serializeAws_json1_1InstanceFleetProvisioningSpecifications - */ -const se_InstanceFleetProvisioningSpecifications = ( - input: InstanceFleetProvisioningSpecifications, - context: __SerdeContext -): any => { - return { - ...(input.OnDemandSpecification != null && { - OnDemandSpecification: se_OnDemandProvisioningSpecification(input.OnDemandSpecification, context), - }), - ...(input.SpotSpecification != null && { - SpotSpecification: se_SpotProvisioningSpecification(input.SpotSpecification, context), - }), - }; -}; +// se_InstanceFleetProvisioningSpecifications omitted. -/** - * serializeAws_json1_1InstanceFleetResizingSpecifications - */ -const se_InstanceFleetResizingSpecifications = ( - input: InstanceFleetResizingSpecifications, - context: __SerdeContext -): any => { - return { - ...(input.OnDemandResizeSpecification != null && { - OnDemandResizeSpecification: se_OnDemandResizingSpecification(input.OnDemandResizeSpecification, context), - }), - ...(input.SpotResizeSpecification != null && { - SpotResizeSpecification: se_SpotResizingSpecification(input.SpotResizeSpecification, context), - }), - }; -}; +// se_InstanceFleetResizingSpecifications omitted. /** * serializeAws_json1_1InstanceGroupConfig */ const se_InstanceGroupConfig = (input: InstanceGroupConfig, context: __SerdeContext): any => { - return { - ...(input.AutoScalingPolicy != null && { - AutoScalingPolicy: se_AutoScalingPolicy(input.AutoScalingPolicy, context), - }), - ...(input.BidPrice != null && { BidPrice: input.BidPrice }), - ...(input.Configurations != null && { Configurations: se_ConfigurationList(input.Configurations, context) }), - ...(input.CustomAmiId != null && { CustomAmiId: input.CustomAmiId }), - ...(input.EbsConfiguration != null && { EbsConfiguration: se_EbsConfiguration(input.EbsConfiguration, context) }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceRole != null && { InstanceRole: input.InstanceRole }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.Market != null && { Market: input.Market }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + AutoScalingPolicy: (_) => se_AutoScalingPolicy(_, context), + BidPrice: [], + Configurations: (_) => se_ConfigurationList(_, context), + CustomAmiId: [], + EbsConfiguration: _json, + InstanceCount: [], + InstanceRole: [], + InstanceType: [], + Market: [], + Name: [], + }); }; /** @@ -4219,16 +3758,14 @@ const se_InstanceGroupConfigList = (input: InstanceGroupConfig[], context: __Ser * serializeAws_json1_1InstanceGroupModifyConfig */ const se_InstanceGroupModifyConfig = (input: InstanceGroupModifyConfig, context: __SerdeContext): any => { - return { - ...(input.Configurations != null && { Configurations: se_ConfigurationList(input.Configurations, context) }), - ...(input.EC2InstanceIdsToTerminate != null && { - EC2InstanceIdsToTerminate: se_EC2InstanceIdsToTerminateList(input.EC2InstanceIdsToTerminate, context), - }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceGroupId != null && { InstanceGroupId: input.InstanceGroupId }), - ...(input.ReconfigurationType != null && { ReconfigurationType: input.ReconfigurationType }), - ...(input.ShrinkPolicy != null && { ShrinkPolicy: se_ShrinkPolicy(input.ShrinkPolicy, context) }), - }; + return take(input, { + Configurations: (_) => se_ConfigurationList(_, context), + EC2InstanceIdsToTerminate: _json, + InstanceCount: [], + InstanceGroupId: [], + ReconfigurationType: [], + ShrinkPolicy: _json, + }); }; /** @@ -4242,470 +3779,164 @@ const se_InstanceGroupModifyConfigList = (input: InstanceGroupModifyConfig[], co }); }; -/** - * serializeAws_json1_1InstanceGroupTypeList - */ -const se_InstanceGroupTypeList = (input: (InstanceGroupType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceGroupTypeList omitted. + +// se_InstanceResizePolicy omitted. + +// se_InstanceStateList omitted. /** - * serializeAws_json1_1InstanceResizePolicy + * serializeAws_json1_1InstanceTypeConfig */ -const se_InstanceResizePolicy = (input: InstanceResizePolicy, context: __SerdeContext): any => { - return { - ...(input.InstanceTerminationTimeout != null && { InstanceTerminationTimeout: input.InstanceTerminationTimeout }), - ...(input.InstancesToProtect != null && { - InstancesToProtect: se_EC2InstanceIdsList(input.InstancesToProtect, context), - }), - ...(input.InstancesToTerminate != null && { - InstancesToTerminate: se_EC2InstanceIdsList(input.InstancesToTerminate, context), - }), - }; +const se_InstanceTypeConfig = (input: InstanceTypeConfig, context: __SerdeContext): any => { + return take(input, { + BidPrice: [], + BidPriceAsPercentageOfOnDemandPrice: __serializeFloat, + Configurations: (_) => se_ConfigurationList(_, context), + CustomAmiId: [], + EbsConfiguration: _json, + InstanceType: [], + WeightedCapacity: [], + }); }; /** - * serializeAws_json1_1InstanceStateList + * serializeAws_json1_1InstanceTypeConfigList */ -const se_InstanceStateList = (input: (InstanceState | string)[], context: __SerdeContext): any => { +const se_InstanceTypeConfigList = (input: InstanceTypeConfig[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_InstanceTypeConfig(entry, context); }); }; +// se_JobFlowExecutionStateList omitted. + /** - * serializeAws_json1_1InstanceTypeConfig - */ -const se_InstanceTypeConfig = (input: InstanceTypeConfig, context: __SerdeContext): any => { - return { - ...(input.BidPrice != null && { BidPrice: input.BidPrice }), - ...(input.BidPriceAsPercentageOfOnDemandPrice != null && { - BidPriceAsPercentageOfOnDemandPrice: __serializeFloat(input.BidPriceAsPercentageOfOnDemandPrice), - }), - ...(input.Configurations != null && { Configurations: se_ConfigurationList(input.Configurations, context) }), - ...(input.CustomAmiId != null && { CustomAmiId: input.CustomAmiId }), - ...(input.EbsConfiguration != null && { EbsConfiguration: se_EbsConfiguration(input.EbsConfiguration, context) }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.WeightedCapacity != null && { WeightedCapacity: input.WeightedCapacity }), - }; -}; - -/** - * serializeAws_json1_1InstanceTypeConfigList - */ -const se_InstanceTypeConfigList = (input: InstanceTypeConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceTypeConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1JobFlowExecutionStateList - */ -const se_JobFlowExecutionStateList = (input: (JobFlowExecutionState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1JobFlowInstancesConfig + * serializeAws_json1_1JobFlowInstancesConfig */ const se_JobFlowInstancesConfig = (input: JobFlowInstancesConfig, context: __SerdeContext): any => { - return { - ...(input.AdditionalMasterSecurityGroups != null && { - AdditionalMasterSecurityGroups: se_SecurityGroupsList(input.AdditionalMasterSecurityGroups, context), - }), - ...(input.AdditionalSlaveSecurityGroups != null && { - AdditionalSlaveSecurityGroups: se_SecurityGroupsList(input.AdditionalSlaveSecurityGroups, context), - }), - ...(input.Ec2KeyName != null && { Ec2KeyName: input.Ec2KeyName }), - ...(input.Ec2SubnetId != null && { Ec2SubnetId: input.Ec2SubnetId }), - ...(input.Ec2SubnetIds != null && { Ec2SubnetIds: se_XmlStringMaxLen256List(input.Ec2SubnetIds, context) }), - ...(input.EmrManagedMasterSecurityGroup != null && { - EmrManagedMasterSecurityGroup: input.EmrManagedMasterSecurityGroup, - }), - ...(input.EmrManagedSlaveSecurityGroup != null && { - EmrManagedSlaveSecurityGroup: input.EmrManagedSlaveSecurityGroup, - }), - ...(input.HadoopVersion != null && { HadoopVersion: input.HadoopVersion }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceFleets != null && { InstanceFleets: se_InstanceFleetConfigList(input.InstanceFleets, context) }), - ...(input.InstanceGroups != null && { InstanceGroups: se_InstanceGroupConfigList(input.InstanceGroups, context) }), - ...(input.KeepJobFlowAliveWhenNoSteps != null && { - KeepJobFlowAliveWhenNoSteps: input.KeepJobFlowAliveWhenNoSteps, - }), - ...(input.MasterInstanceType != null && { MasterInstanceType: input.MasterInstanceType }), - ...(input.Placement != null && { Placement: se_PlacementType(input.Placement, context) }), - ...(input.ServiceAccessSecurityGroup != null && { ServiceAccessSecurityGroup: input.ServiceAccessSecurityGroup }), - ...(input.SlaveInstanceType != null && { SlaveInstanceType: input.SlaveInstanceType }), - ...(input.TerminationProtected != null && { TerminationProtected: input.TerminationProtected }), - }; + return take(input, { + AdditionalMasterSecurityGroups: _json, + AdditionalSlaveSecurityGroups: _json, + Ec2KeyName: [], + Ec2SubnetId: [], + Ec2SubnetIds: _json, + EmrManagedMasterSecurityGroup: [], + EmrManagedSlaveSecurityGroup: [], + HadoopVersion: [], + InstanceCount: [], + InstanceFleets: (_) => se_InstanceFleetConfigList(_, context), + InstanceGroups: (_) => se_InstanceGroupConfigList(_, context), + KeepJobFlowAliveWhenNoSteps: [], + MasterInstanceType: [], + Placement: _json, + ServiceAccessSecurityGroup: [], + SlaveInstanceType: [], + TerminationProtected: [], + }); }; -/** - * serializeAws_json1_1KerberosAttributes - */ -const se_KerberosAttributes = (input: KerberosAttributes, context: __SerdeContext): any => { - return { - ...(input.ADDomainJoinPassword != null && { ADDomainJoinPassword: input.ADDomainJoinPassword }), - ...(input.ADDomainJoinUser != null && { ADDomainJoinUser: input.ADDomainJoinUser }), - ...(input.CrossRealmTrustPrincipalPassword != null && { - CrossRealmTrustPrincipalPassword: input.CrossRealmTrustPrincipalPassword, - }), - ...(input.KdcAdminPassword != null && { KdcAdminPassword: input.KdcAdminPassword }), - ...(input.Realm != null && { Realm: input.Realm }), - }; -}; +// se_KerberosAttributes omitted. -/** - * serializeAws_json1_1KeyValue - */ -const se_KeyValue = (input: KeyValue, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_KeyValue omitted. -/** - * serializeAws_json1_1KeyValueList - */ -const se_KeyValueList = (input: KeyValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeyValue(entry, context); - }); -}; +// se_KeyValueList omitted. -/** - * serializeAws_json1_1ListBootstrapActionsInput - */ -const se_ListBootstrapActionsInput = (input: ListBootstrapActionsInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListBootstrapActionsInput omitted. /** * serializeAws_json1_1ListClustersInput */ const se_ListClustersInput = (input: ListClustersInput, context: __SerdeContext): any => { - return { - ...(input.ClusterStates != null && { ClusterStates: se_ClusterStateList(input.ClusterStates, context) }), - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.Marker != null && { Marker: input.Marker }), - }; + return take(input, { + ClusterStates: _json, + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + Marker: [], + }); }; -/** - * serializeAws_json1_1ListInstanceFleetsInput - */ -const se_ListInstanceFleetsInput = (input: ListInstanceFleetsInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListInstanceFleetsInput omitted. -/** - * serializeAws_json1_1ListInstanceGroupsInput - */ -const se_ListInstanceGroupsInput = (input: ListInstanceGroupsInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListInstanceGroupsInput omitted. -/** - * serializeAws_json1_1ListInstancesInput - */ -const se_ListInstancesInput = (input: ListInstancesInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.InstanceFleetId != null && { InstanceFleetId: input.InstanceFleetId }), - ...(input.InstanceFleetType != null && { InstanceFleetType: input.InstanceFleetType }), - ...(input.InstanceGroupId != null && { InstanceGroupId: input.InstanceGroupId }), - ...(input.InstanceGroupTypes != null && { - InstanceGroupTypes: se_InstanceGroupTypeList(input.InstanceGroupTypes, context), - }), - ...(input.InstanceStates != null && { InstanceStates: se_InstanceStateList(input.InstanceStates, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListInstancesInput omitted. /** * serializeAws_json1_1ListNotebookExecutionsInput */ const se_ListNotebookExecutionsInput = (input: ListNotebookExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.EditorId != null && { EditorId: input.EditorId }), - ...(input.From != null && { From: Math.round(input.From.getTime() / 1000) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.Status != null && { Status: input.Status }), - ...(input.To != null && { To: Math.round(input.To.getTime() / 1000) }), - }; + return take(input, { + EditorId: [], + From: (_) => Math.round(_.getTime() / 1000), + Marker: [], + Status: [], + To: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListReleaseLabelsInput - */ -const se_ListReleaseLabelsInput = (input: ListReleaseLabelsInput, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ReleaseLabelFilter(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListReleaseLabelsInput omitted. -/** - * serializeAws_json1_1ListSecurityConfigurationsInput - */ -const se_ListSecurityConfigurationsInput = (input: ListSecurityConfigurationsInput, context: __SerdeContext): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListSecurityConfigurationsInput omitted. -/** - * serializeAws_json1_1ListStepsInput - */ -const se_ListStepsInput = (input: ListStepsInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.StepIds != null && { StepIds: se_XmlStringList(input.StepIds, context) }), - ...(input.StepStates != null && { StepStates: se_StepStateList(input.StepStates, context) }), - }; -}; +// se_ListStepsInput omitted. -/** - * serializeAws_json1_1ListStudioSessionMappingsInput - */ -const se_ListStudioSessionMappingsInput = (input: ListStudioSessionMappingsInput, context: __SerdeContext): any => { - return { - ...(input.IdentityType != null && { IdentityType: input.IdentityType }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; +// se_ListStudioSessionMappingsInput omitted. -/** - * serializeAws_json1_1ListStudiosInput - */ -const se_ListStudiosInput = (input: ListStudiosInput, context: __SerdeContext): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListStudiosInput omitted. -/** - * serializeAws_json1_1ManagedScalingPolicy - */ -const se_ManagedScalingPolicy = (input: ManagedScalingPolicy, context: __SerdeContext): any => { - return { - ...(input.ComputeLimits != null && { ComputeLimits: se_ComputeLimits(input.ComputeLimits, context) }), - }; -}; +// se_ManagedScalingPolicy omitted. -/** - * serializeAws_json1_1MetricDimension - */ -const se_MetricDimension = (input: MetricDimension, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MetricDimension omitted. -/** - * serializeAws_json1_1MetricDimensionList - */ -const se_MetricDimensionList = (input: MetricDimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricDimension(entry, context); - }); -}; +// se_MetricDimensionList omitted. -/** - * serializeAws_json1_1ModifyClusterInput - */ -const se_ModifyClusterInput = (input: ModifyClusterInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.StepConcurrencyLevel != null && { StepConcurrencyLevel: input.StepConcurrencyLevel }), - }; -}; +// se_ModifyClusterInput omitted. -/** - * serializeAws_json1_1ModifyInstanceFleetInput - */ -const se_ModifyInstanceFleetInput = (input: ModifyInstanceFleetInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.InstanceFleet != null && { InstanceFleet: se_InstanceFleetModifyConfig(input.InstanceFleet, context) }), - }; -}; +// se_ModifyInstanceFleetInput omitted. /** * serializeAws_json1_1ModifyInstanceGroupsInput */ const se_ModifyInstanceGroupsInput = (input: ModifyInstanceGroupsInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.InstanceGroups != null && { - InstanceGroups: se_InstanceGroupModifyConfigList(input.InstanceGroups, context), - }), - }; + return take(input, { + ClusterId: [], + InstanceGroups: (_) => se_InstanceGroupModifyConfigList(_, context), + }); }; -/** - * serializeAws_json1_1NewSupportedProductsList - */ -const se_NewSupportedProductsList = (input: SupportedProductConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SupportedProductConfig(entry, context); - }); -}; +// se_NewSupportedProductsList omitted. -/** - * serializeAws_json1_1OnDemandCapacityReservationOptions - */ -const se_OnDemandCapacityReservationOptions = ( - input: OnDemandCapacityReservationOptions, - context: __SerdeContext -): any => { - return { - ...(input.CapacityReservationPreference != null && { - CapacityReservationPreference: input.CapacityReservationPreference, - }), - ...(input.CapacityReservationResourceGroupArn != null && { - CapacityReservationResourceGroupArn: input.CapacityReservationResourceGroupArn, - }), - ...(input.UsageStrategy != null && { UsageStrategy: input.UsageStrategy }), - }; -}; +// se_OnDemandCapacityReservationOptions omitted. -/** - * serializeAws_json1_1OnDemandProvisioningSpecification - */ -const se_OnDemandProvisioningSpecification = ( - input: OnDemandProvisioningSpecification, - context: __SerdeContext -): any => { - return { - ...(input.AllocationStrategy != null && { AllocationStrategy: input.AllocationStrategy }), - ...(input.CapacityReservationOptions != null && { - CapacityReservationOptions: se_OnDemandCapacityReservationOptions(input.CapacityReservationOptions, context), - }), - }; -}; +// se_OnDemandProvisioningSpecification omitted. -/** - * serializeAws_json1_1OnDemandResizingSpecification - */ -const se_OnDemandResizingSpecification = (input: OnDemandResizingSpecification, context: __SerdeContext): any => { - return { - ...(input.TimeoutDurationMinutes != null && { TimeoutDurationMinutes: input.TimeoutDurationMinutes }), - }; -}; +// se_OnDemandResizingSpecification omitted. -/** - * serializeAws_json1_1PlacementGroupConfig - */ -const se_PlacementGroupConfig = (input: PlacementGroupConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceRole != null && { InstanceRole: input.InstanceRole }), - ...(input.PlacementStrategy != null && { PlacementStrategy: input.PlacementStrategy }), - }; -}; +// se_PlacementGroupConfig omitted. -/** - * serializeAws_json1_1PlacementGroupConfigList - */ -const se_PlacementGroupConfigList = (input: PlacementGroupConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementGroupConfig(entry, context); - }); -}; +// se_PlacementGroupConfigList omitted. -/** - * serializeAws_json1_1PlacementType - */ -const se_PlacementType = (input: PlacementType, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_XmlStringMaxLen256List(input.AvailabilityZones, context), - }), - }; -}; +// se_PlacementType omitted. -/** - * serializeAws_json1_1PortRange - */ -const se_PortRange = (input: PortRange, context: __SerdeContext): any => { - return { - ...(input.MaxRange != null && { MaxRange: input.MaxRange }), - ...(input.MinRange != null && { MinRange: input.MinRange }), - }; -}; +// se_PortRange omitted. -/** - * serializeAws_json1_1PortRanges - */ -const se_PortRanges = (input: PortRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortRange(entry, context); - }); -}; +// se_PortRanges omitted. /** * serializeAws_json1_1PutAutoScalingPolicyInput */ const se_PutAutoScalingPolicyInput = (input: PutAutoScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.AutoScalingPolicy != null && { - AutoScalingPolicy: se_AutoScalingPolicy(input.AutoScalingPolicy, context), - }), - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.InstanceGroupId != null && { InstanceGroupId: input.InstanceGroupId }), - }; + return take(input, { + AutoScalingPolicy: (_) => se_AutoScalingPolicy(_, context), + ClusterId: [], + InstanceGroupId: [], + }); }; -/** - * serializeAws_json1_1PutAutoTerminationPolicyInput - */ -const se_PutAutoTerminationPolicyInput = (input: PutAutoTerminationPolicyInput, context: __SerdeContext): any => { - return { - ...(input.AutoTerminationPolicy != null && { - AutoTerminationPolicy: se_AutoTerminationPolicy(input.AutoTerminationPolicy, context), - }), - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_PutAutoTerminationPolicyInput omitted. /** * serializeAws_json1_1PutBlockPublicAccessConfigurationInput @@ -4714,159 +3945,74 @@ const se_PutBlockPublicAccessConfigurationInput = ( input: PutBlockPublicAccessConfigurationInput, context: __SerdeContext ): any => { - return { - ...(input.BlockPublicAccessConfiguration != null && { - BlockPublicAccessConfiguration: se_BlockPublicAccessConfiguration(input.BlockPublicAccessConfiguration, context), - }), - }; + return take(input, { + BlockPublicAccessConfiguration: (_) => se_BlockPublicAccessConfiguration(_, context), + }); }; -/** - * serializeAws_json1_1PutManagedScalingPolicyInput - */ -const se_PutManagedScalingPolicyInput = (input: PutManagedScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.ManagedScalingPolicy != null && { - ManagedScalingPolicy: se_ManagedScalingPolicy(input.ManagedScalingPolicy, context), - }), - }; -}; +// se_PutManagedScalingPolicyInput omitted. -/** - * serializeAws_json1_1ReleaseLabelFilter - */ -const se_ReleaseLabelFilter = (input: ReleaseLabelFilter, context: __SerdeContext): any => { - return { - ...(input.Application != null && { Application: input.Application }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_ReleaseLabelFilter omitted. -/** - * serializeAws_json1_1RemoveAutoScalingPolicyInput - */ -const se_RemoveAutoScalingPolicyInput = (input: RemoveAutoScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.InstanceGroupId != null && { InstanceGroupId: input.InstanceGroupId }), - }; -}; +// se_RemoveAutoScalingPolicyInput omitted. -/** - * serializeAws_json1_1RemoveAutoTerminationPolicyInput - */ -const se_RemoveAutoTerminationPolicyInput = (input: RemoveAutoTerminationPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_RemoveAutoTerminationPolicyInput omitted. -/** - * serializeAws_json1_1RemoveManagedScalingPolicyInput - */ -const se_RemoveManagedScalingPolicyInput = (input: RemoveManagedScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_RemoveManagedScalingPolicyInput omitted. -/** - * serializeAws_json1_1RemoveTagsInput - */ -const se_RemoveTagsInput = (input: RemoveTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagKeys != null && { TagKeys: se_StringList(input.TagKeys, context) }), - }; -}; +// se_RemoveTagsInput omitted. /** * serializeAws_json1_1RunJobFlowInput */ const se_RunJobFlowInput = (input: RunJobFlowInput, context: __SerdeContext): any => { - return { - ...(input.AdditionalInfo != null && { AdditionalInfo: input.AdditionalInfo }), - ...(input.AmiVersion != null && { AmiVersion: input.AmiVersion }), - ...(input.Applications != null && { Applications: se_ApplicationList(input.Applications, context) }), - ...(input.AutoScalingRole != null && { AutoScalingRole: input.AutoScalingRole }), - ...(input.AutoTerminationPolicy != null && { - AutoTerminationPolicy: se_AutoTerminationPolicy(input.AutoTerminationPolicy, context), - }), - ...(input.BootstrapActions != null && { - BootstrapActions: se_BootstrapActionConfigList(input.BootstrapActions, context), - }), - ...(input.Configurations != null && { Configurations: se_ConfigurationList(input.Configurations, context) }), - ...(input.CustomAmiId != null && { CustomAmiId: input.CustomAmiId }), - ...(input.EbsRootVolumeSize != null && { EbsRootVolumeSize: input.EbsRootVolumeSize }), - ...(input.Instances != null && { Instances: se_JobFlowInstancesConfig(input.Instances, context) }), - ...(input.JobFlowRole != null && { JobFlowRole: input.JobFlowRole }), - ...(input.KerberosAttributes != null && { - KerberosAttributes: se_KerberosAttributes(input.KerberosAttributes, context), - }), - ...(input.LogEncryptionKmsKeyId != null && { LogEncryptionKmsKeyId: input.LogEncryptionKmsKeyId }), - ...(input.LogUri != null && { LogUri: input.LogUri }), - ...(input.ManagedScalingPolicy != null && { - ManagedScalingPolicy: se_ManagedScalingPolicy(input.ManagedScalingPolicy, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NewSupportedProducts != null && { - NewSupportedProducts: se_NewSupportedProductsList(input.NewSupportedProducts, context), - }), - ...(input.OSReleaseLabel != null && { OSReleaseLabel: input.OSReleaseLabel }), - ...(input.PlacementGroupConfigs != null && { - PlacementGroupConfigs: se_PlacementGroupConfigList(input.PlacementGroupConfigs, context), - }), - ...(input.ReleaseLabel != null && { ReleaseLabel: input.ReleaseLabel }), - ...(input.RepoUpgradeOnBoot != null && { RepoUpgradeOnBoot: input.RepoUpgradeOnBoot }), - ...(input.ScaleDownBehavior != null && { ScaleDownBehavior: input.ScaleDownBehavior }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }), - ...(input.StepConcurrencyLevel != null && { StepConcurrencyLevel: input.StepConcurrencyLevel }), - ...(input.Steps != null && { Steps: se_StepConfigList(input.Steps, context) }), - ...(input.SupportedProducts != null && { - SupportedProducts: se_SupportedProductsList(input.SupportedProducts, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VisibleToAllUsers != null && { VisibleToAllUsers: input.VisibleToAllUsers }), - }; + return take(input, { + AdditionalInfo: [], + AmiVersion: [], + Applications: _json, + AutoScalingRole: [], + AutoTerminationPolicy: _json, + BootstrapActions: _json, + Configurations: (_) => se_ConfigurationList(_, context), + CustomAmiId: [], + EbsRootVolumeSize: [], + Instances: (_) => se_JobFlowInstancesConfig(_, context), + JobFlowRole: [], + KerberosAttributes: _json, + LogEncryptionKmsKeyId: [], + LogUri: [], + ManagedScalingPolicy: _json, + Name: [], + NewSupportedProducts: _json, + OSReleaseLabel: [], + PlacementGroupConfigs: _json, + ReleaseLabel: [], + RepoUpgradeOnBoot: [], + ScaleDownBehavior: [], + SecurityConfiguration: [], + ServiceRole: [], + StepConcurrencyLevel: [], + Steps: _json, + SupportedProducts: _json, + Tags: _json, + VisibleToAllUsers: [], + }); }; -/** - * serializeAws_json1_1ScalingAction - */ -const se_ScalingAction = (input: ScalingAction, context: __SerdeContext): any => { - return { - ...(input.Market != null && { Market: input.Market }), - ...(input.SimpleScalingPolicyConfiguration != null && { - SimpleScalingPolicyConfiguration: se_SimpleScalingPolicyConfiguration( - input.SimpleScalingPolicyConfiguration, - context - ), - }), - }; -}; +// se_ScalingAction omitted. -/** - * serializeAws_json1_1ScalingConstraints - */ -const se_ScalingConstraints = (input: ScalingConstraints, context: __SerdeContext): any => { - return { - ...(input.MaxCapacity != null && { MaxCapacity: input.MaxCapacity }), - ...(input.MinCapacity != null && { MinCapacity: input.MinCapacity }), - }; -}; +// se_ScalingConstraints omitted. /** * serializeAws_json1_1ScalingRule */ const se_ScalingRule = (input: ScalingRule, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_ScalingAction(input.Action, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Trigger != null && { Trigger: se_ScalingTrigger(input.Trigger, context) }), - }; + return take(input, { + Action: _json, + Description: [], + Name: [], + Trigger: (_) => se_ScalingTrigger(_, context), + }); }; /** @@ -4884,2118 +4030,953 @@ const se_ScalingRuleList = (input: ScalingRule[], context: __SerdeContext): any * serializeAws_json1_1ScalingTrigger */ const se_ScalingTrigger = (input: ScalingTrigger, context: __SerdeContext): any => { - return { - ...(input.CloudWatchAlarmDefinition != null && { - CloudWatchAlarmDefinition: se_CloudWatchAlarmDefinition(input.CloudWatchAlarmDefinition, context), - }), - }; + return take(input, { + CloudWatchAlarmDefinition: (_) => se_CloudWatchAlarmDefinition(_, context), + }); }; -/** - * serializeAws_json1_1ScriptBootstrapActionConfig - */ -const se_ScriptBootstrapActionConfig = (input: ScriptBootstrapActionConfig, context: __SerdeContext): any => { - return { - ...(input.Args != null && { Args: se_XmlStringList(input.Args, context) }), - ...(input.Path != null && { Path: input.Path }), - }; -}; +// se_ScriptBootstrapActionConfig omitted. -/** - * serializeAws_json1_1SecurityGroupsList - */ -const se_SecurityGroupsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupsList omitted. -/** - * serializeAws_json1_1SetTerminationProtectionInput - */ -const se_SetTerminationProtectionInput = (input: SetTerminationProtectionInput, context: __SerdeContext): any => { - return { - ...(input.JobFlowIds != null && { JobFlowIds: se_XmlStringList(input.JobFlowIds, context) }), - ...(input.TerminationProtected != null && { TerminationProtected: input.TerminationProtected }), - }; -}; - -/** - * serializeAws_json1_1SetVisibleToAllUsersInput - */ -const se_SetVisibleToAllUsersInput = (input: SetVisibleToAllUsersInput, context: __SerdeContext): any => { - return { - ...(input.JobFlowIds != null && { JobFlowIds: se_XmlStringList(input.JobFlowIds, context) }), - ...(input.VisibleToAllUsers != null && { VisibleToAllUsers: input.VisibleToAllUsers }), - }; -}; - -/** - * serializeAws_json1_1ShrinkPolicy - */ -const se_ShrinkPolicy = (input: ShrinkPolicy, context: __SerdeContext): any => { - return { - ...(input.DecommissionTimeout != null && { DecommissionTimeout: input.DecommissionTimeout }), - ...(input.InstanceResizePolicy != null && { - InstanceResizePolicy: se_InstanceResizePolicy(input.InstanceResizePolicy, context), - }), - }; -}; - -/** - * serializeAws_json1_1SimpleScalingPolicyConfiguration - */ -const se_SimpleScalingPolicyConfiguration = (input: SimpleScalingPolicyConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdjustmentType != null && { AdjustmentType: input.AdjustmentType }), - ...(input.CoolDown != null && { CoolDown: input.CoolDown }), - ...(input.ScalingAdjustment != null && { ScalingAdjustment: input.ScalingAdjustment }), - }; -}; - -/** - * serializeAws_json1_1SpotProvisioningSpecification - */ -const se_SpotProvisioningSpecification = (input: SpotProvisioningSpecification, context: __SerdeContext): any => { - return { - ...(input.AllocationStrategy != null && { AllocationStrategy: input.AllocationStrategy }), - ...(input.BlockDurationMinutes != null && { BlockDurationMinutes: input.BlockDurationMinutes }), - ...(input.TimeoutAction != null && { TimeoutAction: input.TimeoutAction }), - ...(input.TimeoutDurationMinutes != null && { TimeoutDurationMinutes: input.TimeoutDurationMinutes }), - }; -}; - -/** - * serializeAws_json1_1SpotResizingSpecification - */ -const se_SpotResizingSpecification = (input: SpotResizingSpecification, context: __SerdeContext): any => { - return { - ...(input.TimeoutDurationMinutes != null && { TimeoutDurationMinutes: input.TimeoutDurationMinutes }), - }; -}; - -/** - * serializeAws_json1_1StartNotebookExecutionInput - */ -const se_StartNotebookExecutionInput = (input: StartNotebookExecutionInput, context: __SerdeContext): any => { - return { - ...(input.EditorId != null && { EditorId: input.EditorId }), - ...(input.ExecutionEngine != null && { ExecutionEngine: se_ExecutionEngineConfig(input.ExecutionEngine, context) }), - ...(input.NotebookExecutionName != null && { NotebookExecutionName: input.NotebookExecutionName }), - ...(input.NotebookInstanceSecurityGroupId != null && { - NotebookInstanceSecurityGroupId: input.NotebookInstanceSecurityGroupId, - }), - ...(input.NotebookParams != null && { NotebookParams: input.NotebookParams }), - ...(input.RelativePath != null && { RelativePath: input.RelativePath }), - ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1StepConfig - */ -const se_StepConfig = (input: StepConfig, context: __SerdeContext): any => { - return { - ...(input.ActionOnFailure != null && { ActionOnFailure: input.ActionOnFailure }), - ...(input.HadoopJarStep != null && { HadoopJarStep: se_HadoopJarStepConfig(input.HadoopJarStep, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StepConfigList - */ -const se_StepConfigList = (input: StepConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StepConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1StepIdsList - */ -const se_StepIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StepStateList - */ -const se_StepStateList = (input: (StepState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StopNotebookExecutionInput - */ -const se_StopNotebookExecutionInput = (input: StopNotebookExecutionInput, context: __SerdeContext): any => { - return { - ...(input.NotebookExecutionId != null && { NotebookExecutionId: input.NotebookExecutionId }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SupportedProductConfig - */ -const se_SupportedProductConfig = (input: SupportedProductConfig, context: __SerdeContext): any => { - return { - ...(input.Args != null && { Args: se_XmlStringList(input.Args, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SupportedProductsList - */ -const se_SupportedProductsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TerminateJobFlowsInput - */ -const se_TerminateJobFlowsInput = (input: TerminateJobFlowsInput, context: __SerdeContext): any => { - return { - ...(input.JobFlowIds != null && { JobFlowIds: se_XmlStringList(input.JobFlowIds, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateStudioInput - */ -const se_UpdateStudioInput = (input: UpdateStudioInput, context: __SerdeContext): any => { - return { - ...(input.DefaultS3Location != null && { DefaultS3Location: input.DefaultS3Location }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StudioId != null && { StudioId: input.StudioId }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdList(input.SubnetIds, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateStudioSessionMappingInput - */ -const se_UpdateStudioSessionMappingInput = (input: UpdateStudioSessionMappingInput, context: __SerdeContext): any => { - return { - ...(input.IdentityId != null && { IdentityId: input.IdentityId }), - ...(input.IdentityName != null && { IdentityName: input.IdentityName }), - ...(input.IdentityType != null && { IdentityType: input.IdentityType }), - ...(input.SessionPolicyArn != null && { SessionPolicyArn: input.SessionPolicyArn }), - ...(input.StudioId != null && { StudioId: input.StudioId }), - }; -}; - -/** - * serializeAws_json1_1VolumeSpecification - */ -const se_VolumeSpecification = (input: VolumeSpecification, context: __SerdeContext): any => { - return { - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.SizeInGB != null && { SizeInGB: input.SizeInGB }), - ...(input.Throughput != null && { Throughput: input.Throughput }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; - -/** - * serializeAws_json1_1XmlStringList - */ -const se_XmlStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1XmlStringMaxLen256List - */ -const se_XmlStringMaxLen256List = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * deserializeAws_json1_1AddInstanceFleetOutput - */ -const de_AddInstanceFleetOutput = (output: any, context: __SerdeContext): AddInstanceFleetOutput => { - return { - ClusterArn: __expectString(output.ClusterArn), - ClusterId: __expectString(output.ClusterId), - InstanceFleetId: __expectString(output.InstanceFleetId), - } as any; -}; - -/** - * deserializeAws_json1_1AddInstanceGroupsOutput - */ -const de_AddInstanceGroupsOutput = (output: any, context: __SerdeContext): AddInstanceGroupsOutput => { - return { - ClusterArn: __expectString(output.ClusterArn), - InstanceGroupIds: - output.InstanceGroupIds != null ? de_InstanceGroupIdsList(output.InstanceGroupIds, context) : undefined, - JobFlowId: __expectString(output.JobFlowId), - } as any; -}; - -/** - * deserializeAws_json1_1AddJobFlowStepsOutput - */ -const de_AddJobFlowStepsOutput = (output: any, context: __SerdeContext): AddJobFlowStepsOutput => { - return { - StepIds: output.StepIds != null ? de_StepIdsList(output.StepIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AddTagsOutput - */ -const de_AddTagsOutput = (output: any, context: __SerdeContext): AddTagsOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1Application - */ -const de_Application = (output: any, context: __SerdeContext): Application => { - return { - AdditionalInfo: output.AdditionalInfo != null ? de_StringMap(output.AdditionalInfo, context) : undefined, - Args: output.Args != null ? de_StringList(output.Args, context) : undefined, - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationList - */ -const de_ApplicationList = (output: any, context: __SerdeContext): Application[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Application(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoScalingPolicyDescription - */ -const de_AutoScalingPolicyDescription = (output: any, context: __SerdeContext): AutoScalingPolicyDescription => { - return { - Constraints: output.Constraints != null ? de_ScalingConstraints(output.Constraints, context) : undefined, - Rules: output.Rules != null ? de_ScalingRuleList(output.Rules, context) : undefined, - Status: output.Status != null ? de_AutoScalingPolicyStatus(output.Status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoScalingPolicyStateChangeReason - */ -const de_AutoScalingPolicyStateChangeReason = ( - output: any, - context: __SerdeContext -): AutoScalingPolicyStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AutoScalingPolicyStatus - */ -const de_AutoScalingPolicyStatus = (output: any, context: __SerdeContext): AutoScalingPolicyStatus => { - return { - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null - ? de_AutoScalingPolicyStateChangeReason(output.StateChangeReason, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoTerminationPolicy - */ -const de_AutoTerminationPolicy = (output: any, context: __SerdeContext): AutoTerminationPolicy => { - return { - IdleTimeout: __expectLong(output.IdleTimeout), - } as any; -}; - -/** - * deserializeAws_json1_1BlockPublicAccessConfiguration - */ -const de_BlockPublicAccessConfiguration = (output: any, context: __SerdeContext): BlockPublicAccessConfiguration => { - return { - BlockPublicSecurityGroupRules: __expectBoolean(output.BlockPublicSecurityGroupRules), - Classification: __expectString(output.Classification), - Configurations: output.Configurations != null ? de_ConfigurationList(output.Configurations, context) : undefined, - PermittedPublicSecurityGroupRuleRanges: - output.PermittedPublicSecurityGroupRuleRanges != null - ? de_PortRanges(output.PermittedPublicSecurityGroupRuleRanges, context) - : undefined, - Properties: output.Properties != null ? de_StringMap(output.Properties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BlockPublicAccessConfigurationMetadata - */ -const de_BlockPublicAccessConfigurationMetadata = ( - output: any, - context: __SerdeContext -): BlockPublicAccessConfigurationMetadata => { - return { - CreatedByArn: __expectString(output.CreatedByArn), - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BootstrapActionConfig - */ -const de_BootstrapActionConfig = (output: any, context: __SerdeContext): BootstrapActionConfig => { - return { - Name: __expectString(output.Name), - ScriptBootstrapAction: - output.ScriptBootstrapAction != null - ? de_ScriptBootstrapActionConfig(output.ScriptBootstrapAction, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BootstrapActionDetail - */ -const de_BootstrapActionDetail = (output: any, context: __SerdeContext): BootstrapActionDetail => { - return { - BootstrapActionConfig: - output.BootstrapActionConfig != null - ? de_BootstrapActionConfig(output.BootstrapActionConfig, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BootstrapActionDetailList - */ -const de_BootstrapActionDetailList = (output: any, context: __SerdeContext): BootstrapActionDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BootstrapActionDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelStepsInfo - */ -const de_CancelStepsInfo = (output: any, context: __SerdeContext): CancelStepsInfo => { - return { - Reason: __expectString(output.Reason), - Status: __expectString(output.Status), - StepId: __expectString(output.StepId), - } as any; -}; - -/** - * deserializeAws_json1_1CancelStepsInfoList - */ -const de_CancelStepsInfoList = (output: any, context: __SerdeContext): CancelStepsInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CancelStepsInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelStepsOutput - */ -const de_CancelStepsOutput = (output: any, context: __SerdeContext): CancelStepsOutput => { - return { - CancelStepsInfoList: - output.CancelStepsInfoList != null ? de_CancelStepsInfoList(output.CancelStepsInfoList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchAlarmDefinition - */ -const de_CloudWatchAlarmDefinition = (output: any, context: __SerdeContext): CloudWatchAlarmDefinition => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - Dimensions: output.Dimensions != null ? de_MetricDimensionList(output.Dimensions, context) : undefined, - EvaluationPeriods: __expectInt32(output.EvaluationPeriods), - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - Period: __expectInt32(output.Period), - Statistic: __expectString(output.Statistic), - Threshold: __limitedParseDouble(output.Threshold), - Unit: __expectString(output.Unit), - } as any; -}; - -/** - * deserializeAws_json1_1Cluster - */ -const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - Applications: output.Applications != null ? de_ApplicationList(output.Applications, context) : undefined, - AutoScalingRole: __expectString(output.AutoScalingRole), - AutoTerminate: __expectBoolean(output.AutoTerminate), - ClusterArn: __expectString(output.ClusterArn), - Configurations: output.Configurations != null ? de_ConfigurationList(output.Configurations, context) : undefined, - CustomAmiId: __expectString(output.CustomAmiId), - EbsRootVolumeSize: __expectInt32(output.EbsRootVolumeSize), - Ec2InstanceAttributes: - output.Ec2InstanceAttributes != null - ? de_Ec2InstanceAttributes(output.Ec2InstanceAttributes, context) - : undefined, - Id: __expectString(output.Id), - InstanceCollectionType: __expectString(output.InstanceCollectionType), - KerberosAttributes: - output.KerberosAttributes != null ? de_KerberosAttributes(output.KerberosAttributes, context) : undefined, - LogEncryptionKmsKeyId: __expectString(output.LogEncryptionKmsKeyId), - LogUri: __expectString(output.LogUri), - MasterPublicDnsName: __expectString(output.MasterPublicDnsName), - Name: __expectString(output.Name), - NormalizedInstanceHours: __expectInt32(output.NormalizedInstanceHours), - OSReleaseLabel: __expectString(output.OSReleaseLabel), - OutpostArn: __expectString(output.OutpostArn), - PlacementGroups: - output.PlacementGroups != null ? de_PlacementGroupConfigList(output.PlacementGroups, context) : undefined, - ReleaseLabel: __expectString(output.ReleaseLabel), - RepoUpgradeOnBoot: __expectString(output.RepoUpgradeOnBoot), - RequestedAmiVersion: __expectString(output.RequestedAmiVersion), - RunningAmiVersion: __expectString(output.RunningAmiVersion), - ScaleDownBehavior: __expectString(output.ScaleDownBehavior), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - ServiceRole: __expectString(output.ServiceRole), - Status: output.Status != null ? de_ClusterStatus(output.Status, context) : undefined, - StepConcurrencyLevel: __expectInt32(output.StepConcurrencyLevel), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TerminationProtected: __expectBoolean(output.TerminationProtected), - VisibleToAllUsers: __expectBoolean(output.VisibleToAllUsers), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterStateChangeReason - */ -const de_ClusterStateChangeReason = (output: any, context: __SerdeContext): ClusterStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterStatus - */ -const de_ClusterStatus = (output: any, context: __SerdeContext): ClusterStatus => { - return { - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetailList(output.ErrorDetails, context) : undefined, - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null ? de_ClusterStateChangeReason(output.StateChangeReason, context) : undefined, - Timeline: output.Timeline != null ? de_ClusterTimeline(output.Timeline, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ClusterSummary - */ -const de_ClusterSummary = (output: any, context: __SerdeContext): ClusterSummary => { - return { - ClusterArn: __expectString(output.ClusterArn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - NormalizedInstanceHours: __expectInt32(output.NormalizedInstanceHours), - OutpostArn: __expectString(output.OutpostArn), - Status: output.Status != null ? de_ClusterStatus(output.Status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ClusterSummaryList - */ -const de_ClusterSummaryList = (output: any, context: __SerdeContext): ClusterSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClusterTimeline - */ -const de_ClusterTimeline = (output: any, context: __SerdeContext): ClusterTimeline => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - ReadyDateTime: - output.ReadyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadyDateTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Command - */ -const de_Command = (output: any, context: __SerdeContext): Command => { - return { - Args: output.Args != null ? de_StringList(output.Args, context) : undefined, - Name: __expectString(output.Name), - ScriptPath: __expectString(output.ScriptPath), - } as any; -}; - -/** - * deserializeAws_json1_1CommandList - */ -const de_CommandList = (output: any, context: __SerdeContext): Command[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Command(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComputeLimits - */ -const de_ComputeLimits = (output: any, context: __SerdeContext): ComputeLimits => { - return { - MaximumCapacityUnits: __expectInt32(output.MaximumCapacityUnits), - MaximumCoreCapacityUnits: __expectInt32(output.MaximumCoreCapacityUnits), - MaximumOnDemandCapacityUnits: __expectInt32(output.MaximumOnDemandCapacityUnits), - MinimumCapacityUnits: __expectInt32(output.MinimumCapacityUnits), - UnitType: __expectString(output.UnitType), - } as any; -}; - -/** - * deserializeAws_json1_1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - Classification: __expectString(output.Classification), - Configurations: output.Configurations != null ? de_ConfigurationList(output.Configurations, context) : undefined, - Properties: output.Properties != null ? de_StringMap(output.Properties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfigurationList - */ -const de_ConfigurationList = (output: any, context: __SerdeContext): Configuration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Configuration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateSecurityConfigurationOutput - */ -const de_CreateSecurityConfigurationOutput = ( - output: any, - context: __SerdeContext -): CreateSecurityConfigurationOutput => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateStudioOutput - */ -const de_CreateStudioOutput = (output: any, context: __SerdeContext): CreateStudioOutput => { - return { - StudioId: __expectString(output.StudioId), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1Credentials - */ -const de_Credentials = (output: any, context: __SerdeContext): Credentials => { - if (output.UsernamePassword != null) { - return { - UsernamePassword: de_UsernamePassword(output.UsernamePassword, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_json1_1DeleteSecurityConfigurationOutput - */ -const de_DeleteSecurityConfigurationOutput = ( - output: any, - context: __SerdeContext -): DeleteSecurityConfigurationOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeClusterOutput - */ -const de_DescribeClusterOutput = (output: any, context: __SerdeContext): DescribeClusterOutput => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeJobFlowsOutput - */ -const de_DescribeJobFlowsOutput = (output: any, context: __SerdeContext): DescribeJobFlowsOutput => { - return { - JobFlows: output.JobFlows != null ? de_JobFlowDetailList(output.JobFlows, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeNotebookExecutionOutput - */ -const de_DescribeNotebookExecutionOutput = (output: any, context: __SerdeContext): DescribeNotebookExecutionOutput => { - return { - NotebookExecution: - output.NotebookExecution != null ? de_NotebookExecution(output.NotebookExecution, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReleaseLabelOutput - */ -const de_DescribeReleaseLabelOutput = (output: any, context: __SerdeContext): DescribeReleaseLabelOutput => { - return { - Applications: output.Applications != null ? de_SimplifiedApplicationList(output.Applications, context) : undefined, - AvailableOSReleases: - output.AvailableOSReleases != null ? de_OSReleaseList(output.AvailableOSReleases, context) : undefined, - NextToken: __expectString(output.NextToken), - ReleaseLabel: __expectString(output.ReleaseLabel), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSecurityConfigurationOutput - */ -const de_DescribeSecurityConfigurationOutput = ( - output: any, - context: __SerdeContext -): DescribeSecurityConfigurationOutput => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - Name: __expectString(output.Name), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeStepOutput - */ -const de_DescribeStepOutput = (output: any, context: __SerdeContext): DescribeStepOutput => { - return { - Step: output.Step != null ? de_Step(output.Step, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeStudioOutput - */ -const de_DescribeStudioOutput = (output: any, context: __SerdeContext): DescribeStudioOutput => { - return { - Studio: output.Studio != null ? de_Studio(output.Studio, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EbsBlockDevice - */ -const de_EbsBlockDevice = (output: any, context: __SerdeContext): EbsBlockDevice => { - return { - Device: __expectString(output.Device), - VolumeSpecification: - output.VolumeSpecification != null ? de_VolumeSpecification(output.VolumeSpecification, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EbsBlockDeviceList - */ -const de_EbsBlockDeviceList = (output: any, context: __SerdeContext): EbsBlockDevice[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EbsBlockDevice(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EbsVolume - */ -const de_EbsVolume = (output: any, context: __SerdeContext): EbsVolume => { - return { - Device: __expectString(output.Device), - VolumeId: __expectString(output.VolumeId), - } as any; -}; - -/** - * deserializeAws_json1_1EbsVolumeList - */ -const de_EbsVolumeList = (output: any, context: __SerdeContext): EbsVolume[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EbsVolume(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Ec2InstanceAttributes - */ -const de_Ec2InstanceAttributes = (output: any, context: __SerdeContext): Ec2InstanceAttributes => { - return { - AdditionalMasterSecurityGroups: - output.AdditionalMasterSecurityGroups != null - ? de_StringList(output.AdditionalMasterSecurityGroups, context) - : undefined, - AdditionalSlaveSecurityGroups: - output.AdditionalSlaveSecurityGroups != null - ? de_StringList(output.AdditionalSlaveSecurityGroups, context) - : undefined, - Ec2AvailabilityZone: __expectString(output.Ec2AvailabilityZone), - Ec2KeyName: __expectString(output.Ec2KeyName), - Ec2SubnetId: __expectString(output.Ec2SubnetId), - EmrManagedMasterSecurityGroup: __expectString(output.EmrManagedMasterSecurityGroup), - EmrManagedSlaveSecurityGroup: __expectString(output.EmrManagedSlaveSecurityGroup), - IamInstanceProfile: __expectString(output.IamInstanceProfile), - RequestedEc2AvailabilityZones: - output.RequestedEc2AvailabilityZones != null - ? de_XmlStringMaxLen256List(output.RequestedEc2AvailabilityZones, context) - : undefined, - RequestedEc2SubnetIds: - output.RequestedEc2SubnetIds != null - ? de_XmlStringMaxLen256List(output.RequestedEc2SubnetIds, context) - : undefined, - ServiceAccessSecurityGroup: __expectString(output.ServiceAccessSecurityGroup), - } as any; -}; - -/** - * deserializeAws_json1_1EC2InstanceIdsList - */ -const de_EC2InstanceIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SetTerminationProtectionInput omitted. -/** - * deserializeAws_json1_1ErrorData - */ -const de_ErrorData = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StringMap(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorData: output.ErrorData != null ? de_ErrorData(output.ErrorData, context) : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1ErrorDetailList - */ -const de_ErrorDetailList = (output: any, context: __SerdeContext): ErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorDetail(entry, context); - }); - return retVal; -}; +// se_SetVisibleToAllUsersInput omitted. -/** - * deserializeAws_json1_1ExecutionEngineConfig - */ -const de_ExecutionEngineConfig = (output: any, context: __SerdeContext): ExecutionEngineConfig => { - return { - Id: __expectString(output.Id), - MasterInstanceSecurityGroupId: __expectString(output.MasterInstanceSecurityGroupId), - Type: __expectString(output.Type), - } as any; -}; +// se_ShrinkPolicy omitted. -/** - * deserializeAws_json1_1FailureDetails - */ -const de_FailureDetails = (output: any, context: __SerdeContext): FailureDetails => { - return { - LogFile: __expectString(output.LogFile), - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// se_SimpleScalingPolicyConfiguration omitted. -/** - * deserializeAws_json1_1GetAutoTerminationPolicyOutput - */ -const de_GetAutoTerminationPolicyOutput = (output: any, context: __SerdeContext): GetAutoTerminationPolicyOutput => { - return { - AutoTerminationPolicy: - output.AutoTerminationPolicy != null - ? de_AutoTerminationPolicy(output.AutoTerminationPolicy, context) - : undefined, - } as any; -}; +// se_SpotProvisioningSpecification omitted. -/** - * deserializeAws_json1_1GetBlockPublicAccessConfigurationOutput - */ -const de_GetBlockPublicAccessConfigurationOutput = ( - output: any, - context: __SerdeContext -): GetBlockPublicAccessConfigurationOutput => { - return { - BlockPublicAccessConfiguration: - output.BlockPublicAccessConfiguration != null - ? de_BlockPublicAccessConfiguration(output.BlockPublicAccessConfiguration, context) - : undefined, - BlockPublicAccessConfigurationMetadata: - output.BlockPublicAccessConfigurationMetadata != null - ? de_BlockPublicAccessConfigurationMetadata(output.BlockPublicAccessConfigurationMetadata, context) - : undefined, - } as any; -}; +// se_SpotResizingSpecification omitted. -/** - * deserializeAws_json1_1GetClusterSessionCredentialsOutput - */ -const de_GetClusterSessionCredentialsOutput = ( - output: any, - context: __SerdeContext -): GetClusterSessionCredentialsOutput => { - return { - Credentials: output.Credentials != null ? de_Credentials(__expectUnion(output.Credentials), context) : undefined, - ExpiresAt: - output.ExpiresAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiresAt))) : undefined, - } as any; -}; +// se_StartNotebookExecutionInput omitted. -/** - * deserializeAws_json1_1GetManagedScalingPolicyOutput - */ -const de_GetManagedScalingPolicyOutput = (output: any, context: __SerdeContext): GetManagedScalingPolicyOutput => { - return { - ManagedScalingPolicy: - output.ManagedScalingPolicy != null ? de_ManagedScalingPolicy(output.ManagedScalingPolicy, context) : undefined, - } as any; -}; +// se_StepConfig omitted. -/** - * deserializeAws_json1_1GetStudioSessionMappingOutput - */ -const de_GetStudioSessionMappingOutput = (output: any, context: __SerdeContext): GetStudioSessionMappingOutput => { - return { - SessionMapping: output.SessionMapping != null ? de_SessionMappingDetail(output.SessionMapping, context) : undefined, - } as any; -}; +// se_StepConfigList omitted. -/** - * deserializeAws_json1_1HadoopJarStepConfig - */ -const de_HadoopJarStepConfig = (output: any, context: __SerdeContext): HadoopJarStepConfig => { - return { - Args: output.Args != null ? de_XmlStringList(output.Args, context) : undefined, - Jar: __expectString(output.Jar), - MainClass: __expectString(output.MainClass), - Properties: output.Properties != null ? de_KeyValueList(output.Properties, context) : undefined, - } as any; -}; +// se_StepIdsList omitted. -/** - * deserializeAws_json1_1HadoopStepConfig - */ -const de_HadoopStepConfig = (output: any, context: __SerdeContext): HadoopStepConfig => { - return { - Args: output.Args != null ? de_StringList(output.Args, context) : undefined, - Jar: __expectString(output.Jar), - MainClass: __expectString(output.MainClass), - Properties: output.Properties != null ? de_StringMap(output.Properties, context) : undefined, - } as any; -}; +// se_StepStateList omitted. -/** - * deserializeAws_json1_1Instance - */ -const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - EbsVolumes: output.EbsVolumes != null ? de_EbsVolumeList(output.EbsVolumes, context) : undefined, - Ec2InstanceId: __expectString(output.Ec2InstanceId), - Id: __expectString(output.Id), - InstanceFleetId: __expectString(output.InstanceFleetId), - InstanceGroupId: __expectString(output.InstanceGroupId), - InstanceType: __expectString(output.InstanceType), - Market: __expectString(output.Market), - PrivateDnsName: __expectString(output.PrivateDnsName), - PrivateIpAddress: __expectString(output.PrivateIpAddress), - PublicDnsName: __expectString(output.PublicDnsName), - PublicIpAddress: __expectString(output.PublicIpAddress), - Status: output.Status != null ? de_InstanceStatus(output.Status, context) : undefined, - } as any; -}; +// se_StopNotebookExecutionInput omitted. -/** - * deserializeAws_json1_1InstanceFleet - */ -const de_InstanceFleet = (output: any, context: __SerdeContext): InstanceFleet => { - return { - Id: __expectString(output.Id), - InstanceFleetType: __expectString(output.InstanceFleetType), - InstanceTypeSpecifications: - output.InstanceTypeSpecifications != null - ? de_InstanceTypeSpecificationList(output.InstanceTypeSpecifications, context) - : undefined, - LaunchSpecifications: - output.LaunchSpecifications != null - ? de_InstanceFleetProvisioningSpecifications(output.LaunchSpecifications, context) - : undefined, - Name: __expectString(output.Name), - ProvisionedOnDemandCapacity: __expectInt32(output.ProvisionedOnDemandCapacity), - ProvisionedSpotCapacity: __expectInt32(output.ProvisionedSpotCapacity), - ResizeSpecifications: - output.ResizeSpecifications != null - ? de_InstanceFleetResizingSpecifications(output.ResizeSpecifications, context) - : undefined, - Status: output.Status != null ? de_InstanceFleetStatus(output.Status, context) : undefined, - TargetOnDemandCapacity: __expectInt32(output.TargetOnDemandCapacity), - TargetSpotCapacity: __expectInt32(output.TargetSpotCapacity), - } as any; -}; +// se_StringList omitted. -/** - * deserializeAws_json1_1InstanceFleetList - */ -const de_InstanceFleetList = (output: any, context: __SerdeContext): InstanceFleet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceFleet(entry, context); - }); - return retVal; -}; +// se_StringMap omitted. -/** - * deserializeAws_json1_1InstanceFleetProvisioningSpecifications - */ -const de_InstanceFleetProvisioningSpecifications = ( - output: any, - context: __SerdeContext -): InstanceFleetProvisioningSpecifications => { - return { - OnDemandSpecification: - output.OnDemandSpecification != null - ? de_OnDemandProvisioningSpecification(output.OnDemandSpecification, context) - : undefined, - SpotSpecification: - output.SpotSpecification != null - ? de_SpotProvisioningSpecification(output.SpotSpecification, context) - : undefined, - } as any; -}; +// se_SubnetIdList omitted. -/** - * deserializeAws_json1_1InstanceFleetResizingSpecifications - */ -const de_InstanceFleetResizingSpecifications = ( - output: any, - context: __SerdeContext -): InstanceFleetResizingSpecifications => { - return { - OnDemandResizeSpecification: - output.OnDemandResizeSpecification != null - ? de_OnDemandResizingSpecification(output.OnDemandResizeSpecification, context) - : undefined, - SpotResizeSpecification: - output.SpotResizeSpecification != null - ? de_SpotResizingSpecification(output.SpotResizeSpecification, context) - : undefined, - } as any; -}; +// se_SupportedProductConfig omitted. -/** - * deserializeAws_json1_1InstanceFleetStateChangeReason - */ -const de_InstanceFleetStateChangeReason = (output: any, context: __SerdeContext): InstanceFleetStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// se_SupportedProductsList omitted. -/** - * deserializeAws_json1_1InstanceFleetStatus - */ -const de_InstanceFleetStatus = (output: any, context: __SerdeContext): InstanceFleetStatus => { - return { - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null - ? de_InstanceFleetStateChangeReason(output.StateChangeReason, context) - : undefined, - Timeline: output.Timeline != null ? de_InstanceFleetTimeline(output.Timeline, context) : undefined, - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1InstanceFleetTimeline - */ -const de_InstanceFleetTimeline = (output: any, context: __SerdeContext): InstanceFleetTimeline => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - ReadyDateTime: - output.ReadyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadyDateTime))) - : undefined, - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1InstanceGroup - */ -const de_InstanceGroup = (output: any, context: __SerdeContext): InstanceGroup => { - return { - AutoScalingPolicy: - output.AutoScalingPolicy != null ? de_AutoScalingPolicyDescription(output.AutoScalingPolicy, context) : undefined, - BidPrice: __expectString(output.BidPrice), - Configurations: output.Configurations != null ? de_ConfigurationList(output.Configurations, context) : undefined, - ConfigurationsVersion: __expectLong(output.ConfigurationsVersion), - CustomAmiId: __expectString(output.CustomAmiId), - EbsBlockDevices: - output.EbsBlockDevices != null ? de_EbsBlockDeviceList(output.EbsBlockDevices, context) : undefined, - EbsOptimized: __expectBoolean(output.EbsOptimized), - Id: __expectString(output.Id), - InstanceGroupType: __expectString(output.InstanceGroupType), - InstanceType: __expectString(output.InstanceType), - LastSuccessfullyAppliedConfigurations: - output.LastSuccessfullyAppliedConfigurations != null - ? de_ConfigurationList(output.LastSuccessfullyAppliedConfigurations, context) - : undefined, - LastSuccessfullyAppliedConfigurationsVersion: __expectLong(output.LastSuccessfullyAppliedConfigurationsVersion), - Market: __expectString(output.Market), - Name: __expectString(output.Name), - RequestedInstanceCount: __expectInt32(output.RequestedInstanceCount), - RunningInstanceCount: __expectInt32(output.RunningInstanceCount), - ShrinkPolicy: output.ShrinkPolicy != null ? de_ShrinkPolicy(output.ShrinkPolicy, context) : undefined, - Status: output.Status != null ? de_InstanceGroupStatus(output.Status, context) : undefined, - } as any; -}; +// se_TerminateJobFlowsInput omitted. -/** - * deserializeAws_json1_1InstanceGroupDetail - */ -const de_InstanceGroupDetail = (output: any, context: __SerdeContext): InstanceGroupDetail => { - return { - BidPrice: __expectString(output.BidPrice), - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - CustomAmiId: __expectString(output.CustomAmiId), - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - InstanceGroupId: __expectString(output.InstanceGroupId), - InstanceRequestCount: __expectInt32(output.InstanceRequestCount), - InstanceRole: __expectString(output.InstanceRole), - InstanceRunningCount: __expectInt32(output.InstanceRunningCount), - InstanceType: __expectString(output.InstanceType), - LastStateChangeReason: __expectString(output.LastStateChangeReason), - Market: __expectString(output.Market), - Name: __expectString(output.Name), - ReadyDateTime: - output.ReadyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadyDateTime))) - : undefined, - StartDateTime: - output.StartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDateTime))) - : undefined, - State: __expectString(output.State), - } as any; -}; +// se_UpdateStudioInput omitted. -/** - * deserializeAws_json1_1InstanceGroupDetailList - */ -const de_InstanceGroupDetailList = (output: any, context: __SerdeContext): InstanceGroupDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceGroupDetail(entry, context); - }); - return retVal; -}; +// se_UpdateStudioSessionMappingInput omitted. -/** - * deserializeAws_json1_1InstanceGroupIdsList - */ -const de_InstanceGroupIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_VolumeSpecification omitted. -/** - * deserializeAws_json1_1InstanceGroupList - */ -const de_InstanceGroupList = (output: any, context: __SerdeContext): InstanceGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceGroup(entry, context); - }); - return retVal; -}; +// se_XmlStringList omitted. -/** - * deserializeAws_json1_1InstanceGroupStateChangeReason - */ -const de_InstanceGroupStateChangeReason = (output: any, context: __SerdeContext): InstanceGroupStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// se_XmlStringMaxLen256List omitted. -/** - * deserializeAws_json1_1InstanceGroupStatus - */ -const de_InstanceGroupStatus = (output: any, context: __SerdeContext): InstanceGroupStatus => { - return { - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null - ? de_InstanceGroupStateChangeReason(output.StateChangeReason, context) - : undefined, - Timeline: output.Timeline != null ? de_InstanceGroupTimeline(output.Timeline, context) : undefined, - } as any; -}; +// de_AddInstanceFleetOutput omitted. + +// de_AddInstanceGroupsOutput omitted. + +// de_AddJobFlowStepsOutput omitted. + +// de_AddTagsOutput omitted. + +// de_Application omitted. + +// de_ApplicationList omitted. /** - * deserializeAws_json1_1InstanceGroupTimeline + * deserializeAws_json1_1AutoScalingPolicyDescription */ -const de_InstanceGroupTimeline = (output: any, context: __SerdeContext): InstanceGroupTimeline => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - ReadyDateTime: - output.ReadyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadyDateTime))) - : undefined, - } as any; +const de_AutoScalingPolicyDescription = (output: any, context: __SerdeContext): AutoScalingPolicyDescription => { + return take(output, { + Constraints: _json, + Rules: (_: any) => de_ScalingRuleList(_, context), + Status: _json, + }) as any; }; +// de_AutoScalingPolicyStateChangeReason omitted. + +// de_AutoScalingPolicyStatus omitted. + +// de_AutoTerminationPolicy omitted. + /** - * deserializeAws_json1_1InstanceList + * deserializeAws_json1_1BlockPublicAccessConfiguration */ -const de_InstanceList = (output: any, context: __SerdeContext): Instance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Instance(entry, context); - }); - return retVal; +const de_BlockPublicAccessConfiguration = (output: any, context: __SerdeContext): BlockPublicAccessConfiguration => { + return take(output, { + BlockPublicSecurityGroupRules: __expectBoolean, + Classification: __expectString, + Configurations: (_: any) => de_ConfigurationList(_, context), + PermittedPublicSecurityGroupRuleRanges: _json, + Properties: _json, + }) as any; }; /** - * deserializeAws_json1_1InstanceResizePolicy + * deserializeAws_json1_1BlockPublicAccessConfigurationMetadata */ -const de_InstanceResizePolicy = (output: any, context: __SerdeContext): InstanceResizePolicy => { - return { - InstanceTerminationTimeout: __expectInt32(output.InstanceTerminationTimeout), - InstancesToProtect: - output.InstancesToProtect != null ? de_EC2InstanceIdsList(output.InstancesToProtect, context) : undefined, - InstancesToTerminate: - output.InstancesToTerminate != null ? de_EC2InstanceIdsList(output.InstancesToTerminate, context) : undefined, - } as any; +const de_BlockPublicAccessConfigurationMetadata = ( + output: any, + context: __SerdeContext +): BlockPublicAccessConfigurationMetadata => { + return take(output, { + CreatedByArn: __expectString, + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_BootstrapActionConfig omitted. + +// de_BootstrapActionDetail omitted. + +// de_BootstrapActionDetailList omitted. + +// de_CancelStepsInfo omitted. + +// de_CancelStepsInfoList omitted. + +// de_CancelStepsOutput omitted. + /** - * deserializeAws_json1_1InstanceStateChangeReason + * deserializeAws_json1_1CloudWatchAlarmDefinition */ -const de_InstanceStateChangeReason = (output: any, context: __SerdeContext): InstanceStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; +const de_CloudWatchAlarmDefinition = (output: any, context: __SerdeContext): CloudWatchAlarmDefinition => { + return take(output, { + ComparisonOperator: __expectString, + Dimensions: _json, + EvaluationPeriods: __expectInt32, + MetricName: __expectString, + Namespace: __expectString, + Period: __expectInt32, + Statistic: __expectString, + Threshold: __limitedParseDouble, + Unit: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InstanceStatus + * deserializeAws_json1_1Cluster */ -const de_InstanceStatus = (output: any, context: __SerdeContext): InstanceStatus => { - return { - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null ? de_InstanceStateChangeReason(output.StateChangeReason, context) : undefined, - Timeline: output.Timeline != null ? de_InstanceTimeline(output.Timeline, context) : undefined, - } as any; -}; +const de_Cluster = (output: any, context: __SerdeContext): Cluster => { + return take(output, { + Applications: _json, + AutoScalingRole: __expectString, + AutoTerminate: __expectBoolean, + ClusterArn: __expectString, + Configurations: (_: any) => de_ConfigurationList(_, context), + CustomAmiId: __expectString, + EbsRootVolumeSize: __expectInt32, + Ec2InstanceAttributes: _json, + Id: __expectString, + InstanceCollectionType: __expectString, + KerberosAttributes: _json, + LogEncryptionKmsKeyId: __expectString, + LogUri: __expectString, + MasterPublicDnsName: __expectString, + Name: __expectString, + NormalizedInstanceHours: __expectInt32, + OSReleaseLabel: __expectString, + OutpostArn: __expectString, + PlacementGroups: _json, + ReleaseLabel: __expectString, + RepoUpgradeOnBoot: __expectString, + RequestedAmiVersion: __expectString, + RunningAmiVersion: __expectString, + ScaleDownBehavior: __expectString, + SecurityConfiguration: __expectString, + ServiceRole: __expectString, + Status: (_: any) => de_ClusterStatus(_, context), + StepConcurrencyLevel: __expectInt32, + Tags: _json, + TerminationProtected: __expectBoolean, + VisibleToAllUsers: __expectBoolean, + }) as any; +}; + +// de_ClusterStateChangeReason omitted. /** - * deserializeAws_json1_1InstanceTimeline + * deserializeAws_json1_1ClusterStatus */ -const de_InstanceTimeline = (output: any, context: __SerdeContext): InstanceTimeline => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - ReadyDateTime: - output.ReadyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadyDateTime))) - : undefined, - } as any; +const de_ClusterStatus = (output: any, context: __SerdeContext): ClusterStatus => { + return take(output, { + ErrorDetails: _json, + State: __expectString, + StateChangeReason: _json, + Timeline: (_: any) => de_ClusterTimeline(_, context), + }) as any; }; /** - * deserializeAws_json1_1InstanceTypeSpecification + * deserializeAws_json1_1ClusterSummary */ -const de_InstanceTypeSpecification = (output: any, context: __SerdeContext): InstanceTypeSpecification => { - return { - BidPrice: __expectString(output.BidPrice), - BidPriceAsPercentageOfOnDemandPrice: __limitedParseDouble(output.BidPriceAsPercentageOfOnDemandPrice), - Configurations: output.Configurations != null ? de_ConfigurationList(output.Configurations, context) : undefined, - CustomAmiId: __expectString(output.CustomAmiId), - EbsBlockDevices: - output.EbsBlockDevices != null ? de_EbsBlockDeviceList(output.EbsBlockDevices, context) : undefined, - EbsOptimized: __expectBoolean(output.EbsOptimized), - InstanceType: __expectString(output.InstanceType), - WeightedCapacity: __expectInt32(output.WeightedCapacity), - } as any; +const de_ClusterSummary = (output: any, context: __SerdeContext): ClusterSummary => { + return take(output, { + ClusterArn: __expectString, + Id: __expectString, + Name: __expectString, + NormalizedInstanceHours: __expectInt32, + OutpostArn: __expectString, + Status: (_: any) => de_ClusterStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1InstanceTypeSpecificationList + * deserializeAws_json1_1ClusterSummaryList */ -const de_InstanceTypeSpecificationList = (output: any, context: __SerdeContext): InstanceTypeSpecification[] => { +const de_ClusterSummaryList = (output: any, context: __SerdeContext): ClusterSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceTypeSpecification(entry, context); + return de_ClusterSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1InternalServerError + * deserializeAws_json1_1ClusterTimeline */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return {} as any; +const de_ClusterTimeline = (output: any, context: __SerdeContext): ClusterTimeline => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReadyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_Command omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_CommandList omitted. + +// de_ComputeLimits omitted. /** - * deserializeAws_json1_1JobFlowDetail + * deserializeAws_json1_1Configuration */ -const de_JobFlowDetail = (output: any, context: __SerdeContext): JobFlowDetail => { - return { - AmiVersion: __expectString(output.AmiVersion), - AutoScalingRole: __expectString(output.AutoScalingRole), - BootstrapActions: - output.BootstrapActions != null ? de_BootstrapActionDetailList(output.BootstrapActions, context) : undefined, - ExecutionStatusDetail: - output.ExecutionStatusDetail != null - ? de_JobFlowExecutionStatusDetail(output.ExecutionStatusDetail, context) - : undefined, - Instances: output.Instances != null ? de_JobFlowInstancesDetail(output.Instances, context) : undefined, - JobFlowId: __expectString(output.JobFlowId), - JobFlowRole: __expectString(output.JobFlowRole), - LogEncryptionKmsKeyId: __expectString(output.LogEncryptionKmsKeyId), - LogUri: __expectString(output.LogUri), - Name: __expectString(output.Name), - ScaleDownBehavior: __expectString(output.ScaleDownBehavior), - ServiceRole: __expectString(output.ServiceRole), - Steps: output.Steps != null ? de_StepDetailList(output.Steps, context) : undefined, - SupportedProducts: - output.SupportedProducts != null ? de_SupportedProductsList(output.SupportedProducts, context) : undefined, - VisibleToAllUsers: __expectBoolean(output.VisibleToAllUsers), - } as any; +const de_Configuration = (output: any, context: __SerdeContext): Configuration => { + return take(output, { + Classification: __expectString, + Configurations: (_: any) => de_ConfigurationList(_, context), + Properties: _json, + }) as any; }; /** - * deserializeAws_json1_1JobFlowDetailList + * deserializeAws_json1_1ConfigurationList */ -const de_JobFlowDetailList = (output: any, context: __SerdeContext): JobFlowDetail[] => { +const de_ConfigurationList = (output: any, context: __SerdeContext): Configuration[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobFlowDetail(entry, context); + return de_Configuration(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1JobFlowExecutionStatusDetail + * deserializeAws_json1_1CreateSecurityConfigurationOutput */ -const de_JobFlowExecutionStatusDetail = (output: any, context: __SerdeContext): JobFlowExecutionStatusDetail => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - LastStateChangeReason: __expectString(output.LastStateChangeReason), - ReadyDateTime: - output.ReadyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadyDateTime))) - : undefined, - StartDateTime: - output.StartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDateTime))) - : undefined, - State: __expectString(output.State), - } as any; +const de_CreateSecurityConfigurationOutput = ( + output: any, + context: __SerdeContext +): CreateSecurityConfigurationOutput => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; +// de_CreateStudioOutput omitted. + +// de_Credentials omitted. + +// de_DeleteSecurityConfigurationOutput omitted. + /** - * deserializeAws_json1_1JobFlowInstancesDetail + * deserializeAws_json1_1DescribeClusterOutput */ -const de_JobFlowInstancesDetail = (output: any, context: __SerdeContext): JobFlowInstancesDetail => { - return { - Ec2KeyName: __expectString(output.Ec2KeyName), - Ec2SubnetId: __expectString(output.Ec2SubnetId), - HadoopVersion: __expectString(output.HadoopVersion), - InstanceCount: __expectInt32(output.InstanceCount), - InstanceGroups: - output.InstanceGroups != null ? de_InstanceGroupDetailList(output.InstanceGroups, context) : undefined, - KeepJobFlowAliveWhenNoSteps: __expectBoolean(output.KeepJobFlowAliveWhenNoSteps), - MasterInstanceId: __expectString(output.MasterInstanceId), - MasterInstanceType: __expectString(output.MasterInstanceType), - MasterPublicDnsName: __expectString(output.MasterPublicDnsName), - NormalizedInstanceHours: __expectInt32(output.NormalizedInstanceHours), - Placement: output.Placement != null ? de_PlacementType(output.Placement, context) : undefined, - SlaveInstanceType: __expectString(output.SlaveInstanceType), - TerminationProtected: __expectBoolean(output.TerminationProtected), - } as any; -}; - -/** - * deserializeAws_json1_1KerberosAttributes - */ -const de_KerberosAttributes = (output: any, context: __SerdeContext): KerberosAttributes => { - return { - ADDomainJoinPassword: __expectString(output.ADDomainJoinPassword), - ADDomainJoinUser: __expectString(output.ADDomainJoinUser), - CrossRealmTrustPrincipalPassword: __expectString(output.CrossRealmTrustPrincipalPassword), - KdcAdminPassword: __expectString(output.KdcAdminPassword), - Realm: __expectString(output.Realm), - } as any; +const de_DescribeClusterOutput = (output: any, context: __SerdeContext): DescribeClusterOutput => { + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; /** - * deserializeAws_json1_1KeyValue + * deserializeAws_json1_1DescribeJobFlowsOutput */ -const de_KeyValue = (output: any, context: __SerdeContext): KeyValue => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_DescribeJobFlowsOutput = (output: any, context: __SerdeContext): DescribeJobFlowsOutput => { + return take(output, { + JobFlows: (_: any) => de_JobFlowDetailList(_, context), + }) as any; }; /** - * deserializeAws_json1_1KeyValueList + * deserializeAws_json1_1DescribeNotebookExecutionOutput */ -const de_KeyValueList = (output: any, context: __SerdeContext): KeyValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyValue(entry, context); - }); - return retVal; +const de_DescribeNotebookExecutionOutput = (output: any, context: __SerdeContext): DescribeNotebookExecutionOutput => { + return take(output, { + NotebookExecution: (_: any) => de_NotebookExecution(_, context), + }) as any; }; +// de_DescribeReleaseLabelOutput omitted. + /** - * deserializeAws_json1_1ListBootstrapActionsOutput + * deserializeAws_json1_1DescribeSecurityConfigurationOutput */ -const de_ListBootstrapActionsOutput = (output: any, context: __SerdeContext): ListBootstrapActionsOutput => { - return { - BootstrapActions: output.BootstrapActions != null ? de_CommandList(output.BootstrapActions, context) : undefined, - Marker: __expectString(output.Marker), - } as any; +const de_DescribeSecurityConfigurationOutput = ( + output: any, + context: __SerdeContext +): DescribeSecurityConfigurationOutput => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecurityConfiguration: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListClustersOutput + * deserializeAws_json1_1DescribeStepOutput */ -const de_ListClustersOutput = (output: any, context: __SerdeContext): ListClustersOutput => { - return { - Clusters: output.Clusters != null ? de_ClusterSummaryList(output.Clusters, context) : undefined, - Marker: __expectString(output.Marker), - } as any; +const de_DescribeStepOutput = (output: any, context: __SerdeContext): DescribeStepOutput => { + return take(output, { + Step: (_: any) => de_Step(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListInstanceFleetsOutput + * deserializeAws_json1_1DescribeStudioOutput */ -const de_ListInstanceFleetsOutput = (output: any, context: __SerdeContext): ListInstanceFleetsOutput => { - return { - InstanceFleets: output.InstanceFleets != null ? de_InstanceFleetList(output.InstanceFleets, context) : undefined, - Marker: __expectString(output.Marker), - } as any; +const de_DescribeStudioOutput = (output: any, context: __SerdeContext): DescribeStudioOutput => { + return take(output, { + Studio: (_: any) => de_Studio(_, context), + }) as any; }; +// de_EbsBlockDevice omitted. + +// de_EbsBlockDeviceList omitted. + +// de_EbsVolume omitted. + +// de_EbsVolumeList omitted. + +// de_Ec2InstanceAttributes omitted. + +// de_EC2InstanceIdsList omitted. + +// de_ErrorData omitted. + +// de_ErrorDetail omitted. + +// de_ErrorDetailList omitted. + +// de_ExecutionEngineConfig omitted. + +// de_FailureDetails omitted. + +// de_GetAutoTerminationPolicyOutput omitted. + /** - * deserializeAws_json1_1ListInstanceGroupsOutput + * deserializeAws_json1_1GetBlockPublicAccessConfigurationOutput */ -const de_ListInstanceGroupsOutput = (output: any, context: __SerdeContext): ListInstanceGroupsOutput => { - return { - InstanceGroups: output.InstanceGroups != null ? de_InstanceGroupList(output.InstanceGroups, context) : undefined, - Marker: __expectString(output.Marker), - } as any; +const de_GetBlockPublicAccessConfigurationOutput = ( + output: any, + context: __SerdeContext +): GetBlockPublicAccessConfigurationOutput => { + return take(output, { + BlockPublicAccessConfiguration: (_: any) => de_BlockPublicAccessConfiguration(_, context), + BlockPublicAccessConfigurationMetadata: (_: any) => de_BlockPublicAccessConfigurationMetadata(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListInstancesOutput + * deserializeAws_json1_1GetClusterSessionCredentialsOutput */ -const de_ListInstancesOutput = (output: any, context: __SerdeContext): ListInstancesOutput => { - return { - Instances: output.Instances != null ? de_InstanceList(output.Instances, context) : undefined, - Marker: __expectString(output.Marker), - } as any; +const de_GetClusterSessionCredentialsOutput = ( + output: any, + context: __SerdeContext +): GetClusterSessionCredentialsOutput => { + return take(output, { + Credentials: (_: any) => _json(__expectUnion(_)), + ExpiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_GetManagedScalingPolicyOutput omitted. + /** - * deserializeAws_json1_1ListNotebookExecutionsOutput + * deserializeAws_json1_1GetStudioSessionMappingOutput */ -const de_ListNotebookExecutionsOutput = (output: any, context: __SerdeContext): ListNotebookExecutionsOutput => { - return { - Marker: __expectString(output.Marker), - NotebookExecutions: - output.NotebookExecutions != null - ? de_NotebookExecutionSummaryList(output.NotebookExecutions, context) - : undefined, - } as any; +const de_GetStudioSessionMappingOutput = (output: any, context: __SerdeContext): GetStudioSessionMappingOutput => { + return take(output, { + SessionMapping: (_: any) => de_SessionMappingDetail(_, context), + }) as any; }; +// de_HadoopJarStepConfig omitted. + +// de_HadoopStepConfig omitted. + /** - * deserializeAws_json1_1ListReleaseLabelsOutput + * deserializeAws_json1_1Instance */ -const de_ListReleaseLabelsOutput = (output: any, context: __SerdeContext): ListReleaseLabelsOutput => { - return { - NextToken: __expectString(output.NextToken), - ReleaseLabels: output.ReleaseLabels != null ? de_StringList(output.ReleaseLabels, context) : undefined, - } as any; +const de_Instance = (output: any, context: __SerdeContext): Instance => { + return take(output, { + EbsVolumes: _json, + Ec2InstanceId: __expectString, + Id: __expectString, + InstanceFleetId: __expectString, + InstanceGroupId: __expectString, + InstanceType: __expectString, + Market: __expectString, + PrivateDnsName: __expectString, + PrivateIpAddress: __expectString, + PublicDnsName: __expectString, + PublicIpAddress: __expectString, + Status: (_: any) => de_InstanceStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListSecurityConfigurationsOutput + * deserializeAws_json1_1InstanceFleet */ -const de_ListSecurityConfigurationsOutput = ( - output: any, - context: __SerdeContext -): ListSecurityConfigurationsOutput => { - return { - Marker: __expectString(output.Marker), - SecurityConfigurations: - output.SecurityConfigurations != null - ? de_SecurityConfigurationList(output.SecurityConfigurations, context) - : undefined, - } as any; +const de_InstanceFleet = (output: any, context: __SerdeContext): InstanceFleet => { + return take(output, { + Id: __expectString, + InstanceFleetType: __expectString, + InstanceTypeSpecifications: (_: any) => de_InstanceTypeSpecificationList(_, context), + LaunchSpecifications: _json, + Name: __expectString, + ProvisionedOnDemandCapacity: __expectInt32, + ProvisionedSpotCapacity: __expectInt32, + ResizeSpecifications: _json, + Status: (_: any) => de_InstanceFleetStatus(_, context), + TargetOnDemandCapacity: __expectInt32, + TargetSpotCapacity: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1ListStepsOutput + * deserializeAws_json1_1InstanceFleetList */ -const de_ListStepsOutput = (output: any, context: __SerdeContext): ListStepsOutput => { - return { - Marker: __expectString(output.Marker), - Steps: output.Steps != null ? de_StepSummaryList(output.Steps, context) : undefined, - } as any; +const de_InstanceFleetList = (output: any, context: __SerdeContext): InstanceFleet[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InstanceFleet(entry, context); + }); + return retVal; }; +// de_InstanceFleetProvisioningSpecifications omitted. + +// de_InstanceFleetResizingSpecifications omitted. + +// de_InstanceFleetStateChangeReason omitted. + /** - * deserializeAws_json1_1ListStudioSessionMappingsOutput + * deserializeAws_json1_1InstanceFleetStatus */ -const de_ListStudioSessionMappingsOutput = (output: any, context: __SerdeContext): ListStudioSessionMappingsOutput => { - return { - Marker: __expectString(output.Marker), - SessionMappings: - output.SessionMappings != null ? de_SessionMappingSummaryList(output.SessionMappings, context) : undefined, - } as any; +const de_InstanceFleetStatus = (output: any, context: __SerdeContext): InstanceFleetStatus => { + return take(output, { + State: __expectString, + StateChangeReason: _json, + Timeline: (_: any) => de_InstanceFleetTimeline(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListStudiosOutput + * deserializeAws_json1_1InstanceFleetTimeline */ -const de_ListStudiosOutput = (output: any, context: __SerdeContext): ListStudiosOutput => { - return { - Marker: __expectString(output.Marker), - Studios: output.Studios != null ? de_StudioSummaryList(output.Studios, context) : undefined, - } as any; +const de_InstanceFleetTimeline = (output: any, context: __SerdeContext): InstanceFleetTimeline => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReadyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ManagedScalingPolicy + * deserializeAws_json1_1InstanceGroup */ -const de_ManagedScalingPolicy = (output: any, context: __SerdeContext): ManagedScalingPolicy => { - return { - ComputeLimits: output.ComputeLimits != null ? de_ComputeLimits(output.ComputeLimits, context) : undefined, - } as any; +const de_InstanceGroup = (output: any, context: __SerdeContext): InstanceGroup => { + return take(output, { + AutoScalingPolicy: (_: any) => de_AutoScalingPolicyDescription(_, context), + BidPrice: __expectString, + Configurations: (_: any) => de_ConfigurationList(_, context), + ConfigurationsVersion: __expectLong, + CustomAmiId: __expectString, + EbsBlockDevices: _json, + EbsOptimized: __expectBoolean, + Id: __expectString, + InstanceGroupType: __expectString, + InstanceType: __expectString, + LastSuccessfullyAppliedConfigurations: (_: any) => de_ConfigurationList(_, context), + LastSuccessfullyAppliedConfigurationsVersion: __expectLong, + Market: __expectString, + Name: __expectString, + RequestedInstanceCount: __expectInt32, + RunningInstanceCount: __expectInt32, + ShrinkPolicy: _json, + Status: (_: any) => de_InstanceGroupStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1MetricDimension + * deserializeAws_json1_1InstanceGroupDetail */ -const de_MetricDimension = (output: any, context: __SerdeContext): MetricDimension => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_InstanceGroupDetail = (output: any, context: __SerdeContext): InstanceGroupDetail => { + return take(output, { + BidPrice: __expectString, + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomAmiId: __expectString, + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InstanceGroupId: __expectString, + InstanceRequestCount: __expectInt32, + InstanceRole: __expectString, + InstanceRunningCount: __expectInt32, + InstanceType: __expectString, + LastStateChangeReason: __expectString, + Market: __expectString, + Name: __expectString, + ReadyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MetricDimensionList + * deserializeAws_json1_1InstanceGroupDetailList */ -const de_MetricDimensionList = (output: any, context: __SerdeContext): MetricDimension[] => { +const de_InstanceGroupDetailList = (output: any, context: __SerdeContext): InstanceGroupDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDimension(entry, context); + return de_InstanceGroupDetail(entry, context); }); return retVal; }; +// de_InstanceGroupIdsList omitted. + /** - * deserializeAws_json1_1ModifyClusterOutput + * deserializeAws_json1_1InstanceGroupList */ -const de_ModifyClusterOutput = (output: any, context: __SerdeContext): ModifyClusterOutput => { - return { - StepConcurrencyLevel: __expectInt32(output.StepConcurrencyLevel), - } as any; +const de_InstanceGroupList = (output: any, context: __SerdeContext): InstanceGroup[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InstanceGroup(entry, context); + }); + return retVal; }; +// de_InstanceGroupStateChangeReason omitted. + /** - * deserializeAws_json1_1NotebookExecution + * deserializeAws_json1_1InstanceGroupStatus */ -const de_NotebookExecution = (output: any, context: __SerdeContext): NotebookExecution => { - return { - Arn: __expectString(output.Arn), - EditorId: __expectString(output.EditorId), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ExecutionEngine: - output.ExecutionEngine != null ? de_ExecutionEngineConfig(output.ExecutionEngine, context) : undefined, - LastStateChangeReason: __expectString(output.LastStateChangeReason), - NotebookExecutionId: __expectString(output.NotebookExecutionId), - NotebookExecutionName: __expectString(output.NotebookExecutionName), - NotebookInstanceSecurityGroupId: __expectString(output.NotebookInstanceSecurityGroupId), - NotebookParams: __expectString(output.NotebookParams), - OutputNotebookURI: __expectString(output.OutputNotebookURI), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_InstanceGroupStatus = (output: any, context: __SerdeContext): InstanceGroupStatus => { + return take(output, { + State: __expectString, + StateChangeReason: _json, + Timeline: (_: any) => de_InstanceGroupTimeline(_, context), + }) as any; }; /** - * deserializeAws_json1_1NotebookExecutionSummary + * deserializeAws_json1_1InstanceGroupTimeline */ -const de_NotebookExecutionSummary = (output: any, context: __SerdeContext): NotebookExecutionSummary => { - return { - EditorId: __expectString(output.EditorId), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - NotebookExecutionId: __expectString(output.NotebookExecutionId), - NotebookExecutionName: __expectString(output.NotebookExecutionName), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - } as any; +const de_InstanceGroupTimeline = (output: any, context: __SerdeContext): InstanceGroupTimeline => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReadyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1NotebookExecutionSummaryList + * deserializeAws_json1_1InstanceList */ -const de_NotebookExecutionSummaryList = (output: any, context: __SerdeContext): NotebookExecutionSummary[] => { +const de_InstanceList = (output: any, context: __SerdeContext): Instance[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotebookExecutionSummary(entry, context); + return de_Instance(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OnDemandCapacityReservationOptions - */ -const de_OnDemandCapacityReservationOptions = ( - output: any, - context: __SerdeContext -): OnDemandCapacityReservationOptions => { - return { - CapacityReservationPreference: __expectString(output.CapacityReservationPreference), - CapacityReservationResourceGroupArn: __expectString(output.CapacityReservationResourceGroupArn), - UsageStrategy: __expectString(output.UsageStrategy), - } as any; -}; +// de_InstanceResizePolicy omitted. + +// de_InstanceStateChangeReason omitted. /** - * deserializeAws_json1_1OnDemandProvisioningSpecification + * deserializeAws_json1_1InstanceStatus */ -const de_OnDemandProvisioningSpecification = ( - output: any, - context: __SerdeContext -): OnDemandProvisioningSpecification => { - return { - AllocationStrategy: __expectString(output.AllocationStrategy), - CapacityReservationOptions: - output.CapacityReservationOptions != null - ? de_OnDemandCapacityReservationOptions(output.CapacityReservationOptions, context) - : undefined, - } as any; +const de_InstanceStatus = (output: any, context: __SerdeContext): InstanceStatus => { + return take(output, { + State: __expectString, + StateChangeReason: _json, + Timeline: (_: any) => de_InstanceTimeline(_, context), + }) as any; }; /** - * deserializeAws_json1_1OnDemandResizingSpecification + * deserializeAws_json1_1InstanceTimeline */ -const de_OnDemandResizingSpecification = (output: any, context: __SerdeContext): OnDemandResizingSpecification => { - return { - TimeoutDurationMinutes: __expectInt32(output.TimeoutDurationMinutes), - } as any; +const de_InstanceTimeline = (output: any, context: __SerdeContext): InstanceTimeline => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReadyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1OSRelease + * deserializeAws_json1_1InstanceTypeSpecification */ -const de_OSRelease = (output: any, context: __SerdeContext): OSRelease => { - return { - Label: __expectString(output.Label), - } as any; +const de_InstanceTypeSpecification = (output: any, context: __SerdeContext): InstanceTypeSpecification => { + return take(output, { + BidPrice: __expectString, + BidPriceAsPercentageOfOnDemandPrice: __limitedParseDouble, + Configurations: (_: any) => de_ConfigurationList(_, context), + CustomAmiId: __expectString, + EbsBlockDevices: _json, + EbsOptimized: __expectBoolean, + InstanceType: __expectString, + WeightedCapacity: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1OSReleaseList + * deserializeAws_json1_1InstanceTypeSpecificationList */ -const de_OSReleaseList = (output: any, context: __SerdeContext): OSRelease[] => { +const de_InstanceTypeSpecificationList = (output: any, context: __SerdeContext): InstanceTypeSpecification[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OSRelease(entry, context); + return de_InstanceTypeSpecification(entry, context); }); return retVal; }; +// de_InternalServerError omitted. + +// de_InternalServerException omitted. + +// de_InvalidRequestException omitted. + /** - * deserializeAws_json1_1PlacementGroupConfig + * deserializeAws_json1_1JobFlowDetail */ -const de_PlacementGroupConfig = (output: any, context: __SerdeContext): PlacementGroupConfig => { - return { - InstanceRole: __expectString(output.InstanceRole), - PlacementStrategy: __expectString(output.PlacementStrategy), - } as any; +const de_JobFlowDetail = (output: any, context: __SerdeContext): JobFlowDetail => { + return take(output, { + AmiVersion: __expectString, + AutoScalingRole: __expectString, + BootstrapActions: _json, + ExecutionStatusDetail: (_: any) => de_JobFlowExecutionStatusDetail(_, context), + Instances: (_: any) => de_JobFlowInstancesDetail(_, context), + JobFlowId: __expectString, + JobFlowRole: __expectString, + LogEncryptionKmsKeyId: __expectString, + LogUri: __expectString, + Name: __expectString, + ScaleDownBehavior: __expectString, + ServiceRole: __expectString, + Steps: (_: any) => de_StepDetailList(_, context), + SupportedProducts: _json, + VisibleToAllUsers: __expectBoolean, + }) as any; }; /** - * deserializeAws_json1_1PlacementGroupConfigList + * deserializeAws_json1_1JobFlowDetailList */ -const de_PlacementGroupConfigList = (output: any, context: __SerdeContext): PlacementGroupConfig[] => { +const de_JobFlowDetailList = (output: any, context: __SerdeContext): JobFlowDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementGroupConfig(entry, context); + return de_JobFlowDetail(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PlacementType + * deserializeAws_json1_1JobFlowExecutionStatusDetail */ -const de_PlacementType = (output: any, context: __SerdeContext): PlacementType => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - AvailabilityZones: - output.AvailabilityZones != null ? de_XmlStringMaxLen256List(output.AvailabilityZones, context) : undefined, - } as any; +const de_JobFlowExecutionStatusDetail = (output: any, context: __SerdeContext): JobFlowExecutionStatusDetail => { + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastStateChangeReason: __expectString, + ReadyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PortRange + * deserializeAws_json1_1JobFlowInstancesDetail */ -const de_PortRange = (output: any, context: __SerdeContext): PortRange => { - return { - MaxRange: __expectInt32(output.MaxRange), - MinRange: __expectInt32(output.MinRange), - } as any; +const de_JobFlowInstancesDetail = (output: any, context: __SerdeContext): JobFlowInstancesDetail => { + return take(output, { + Ec2KeyName: __expectString, + Ec2SubnetId: __expectString, + HadoopVersion: __expectString, + InstanceCount: __expectInt32, + InstanceGroups: (_: any) => de_InstanceGroupDetailList(_, context), + KeepJobFlowAliveWhenNoSteps: __expectBoolean, + MasterInstanceId: __expectString, + MasterInstanceType: __expectString, + MasterPublicDnsName: __expectString, + NormalizedInstanceHours: __expectInt32, + Placement: _json, + SlaveInstanceType: __expectString, + TerminationProtected: __expectBoolean, + }) as any; }; +// de_KerberosAttributes omitted. + +// de_KeyValue omitted. + +// de_KeyValueList omitted. + +// de_ListBootstrapActionsOutput omitted. + /** - * deserializeAws_json1_1PortRanges + * deserializeAws_json1_1ListClustersOutput */ -const de_PortRanges = (output: any, context: __SerdeContext): PortRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortRange(entry, context); - }); - return retVal; +const de_ListClustersOutput = (output: any, context: __SerdeContext): ListClustersOutput => { + return take(output, { + Clusters: (_: any) => de_ClusterSummaryList(_, context), + Marker: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutAutoScalingPolicyOutput + * deserializeAws_json1_1ListInstanceFleetsOutput */ -const de_PutAutoScalingPolicyOutput = (output: any, context: __SerdeContext): PutAutoScalingPolicyOutput => { - return { - AutoScalingPolicy: - output.AutoScalingPolicy != null ? de_AutoScalingPolicyDescription(output.AutoScalingPolicy, context) : undefined, - ClusterArn: __expectString(output.ClusterArn), - ClusterId: __expectString(output.ClusterId), - InstanceGroupId: __expectString(output.InstanceGroupId), - } as any; +const de_ListInstanceFleetsOutput = (output: any, context: __SerdeContext): ListInstanceFleetsOutput => { + return take(output, { + InstanceFleets: (_: any) => de_InstanceFleetList(_, context), + Marker: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutAutoTerminationPolicyOutput + * deserializeAws_json1_1ListInstanceGroupsOutput */ -const de_PutAutoTerminationPolicyOutput = (output: any, context: __SerdeContext): PutAutoTerminationPolicyOutput => { - return {} as any; +const de_ListInstanceGroupsOutput = (output: any, context: __SerdeContext): ListInstanceGroupsOutput => { + return take(output, { + InstanceGroups: (_: any) => de_InstanceGroupList(_, context), + Marker: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutBlockPublicAccessConfigurationOutput + * deserializeAws_json1_1ListInstancesOutput */ -const de_PutBlockPublicAccessConfigurationOutput = ( - output: any, - context: __SerdeContext -): PutBlockPublicAccessConfigurationOutput => { - return {} as any; +const de_ListInstancesOutput = (output: any, context: __SerdeContext): ListInstancesOutput => { + return take(output, { + Instances: (_: any) => de_InstanceList(_, context), + Marker: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutManagedScalingPolicyOutput + * deserializeAws_json1_1ListNotebookExecutionsOutput */ -const de_PutManagedScalingPolicyOutput = (output: any, context: __SerdeContext): PutManagedScalingPolicyOutput => { - return {} as any; +const de_ListNotebookExecutionsOutput = (output: any, context: __SerdeContext): ListNotebookExecutionsOutput => { + return take(output, { + Marker: __expectString, + NotebookExecutions: (_: any) => de_NotebookExecutionSummaryList(_, context), + }) as any; }; +// de_ListReleaseLabelsOutput omitted. + /** - * deserializeAws_json1_1RemoveAutoScalingPolicyOutput + * deserializeAws_json1_1ListSecurityConfigurationsOutput */ -const de_RemoveAutoScalingPolicyOutput = (output: any, context: __SerdeContext): RemoveAutoScalingPolicyOutput => { - return {} as any; +const de_ListSecurityConfigurationsOutput = ( + output: any, + context: __SerdeContext +): ListSecurityConfigurationsOutput => { + return take(output, { + Marker: __expectString, + SecurityConfigurations: (_: any) => de_SecurityConfigurationList(_, context), + }) as any; }; /** - * deserializeAws_json1_1RemoveAutoTerminationPolicyOutput + * deserializeAws_json1_1ListStepsOutput */ -const de_RemoveAutoTerminationPolicyOutput = ( - output: any, - context: __SerdeContext -): RemoveAutoTerminationPolicyOutput => { - return {} as any; +const de_ListStepsOutput = (output: any, context: __SerdeContext): ListStepsOutput => { + return take(output, { + Marker: __expectString, + Steps: (_: any) => de_StepSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1RemoveManagedScalingPolicyOutput + * deserializeAws_json1_1ListStudioSessionMappingsOutput */ -const de_RemoveManagedScalingPolicyOutput = ( - output: any, - context: __SerdeContext -): RemoveManagedScalingPolicyOutput => { - return {} as any; +const de_ListStudioSessionMappingsOutput = (output: any, context: __SerdeContext): ListStudioSessionMappingsOutput => { + return take(output, { + Marker: __expectString, + SessionMappings: (_: any) => de_SessionMappingSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1RemoveTagsOutput + * deserializeAws_json1_1ListStudiosOutput */ -const de_RemoveTagsOutput = (output: any, context: __SerdeContext): RemoveTagsOutput => { - return {} as any; +const de_ListStudiosOutput = (output: any, context: __SerdeContext): ListStudiosOutput => { + return take(output, { + Marker: __expectString, + Studios: (_: any) => de_StudioSummaryList(_, context), + }) as any; }; +// de_ManagedScalingPolicy omitted. + +// de_MetricDimension omitted. + +// de_MetricDimensionList omitted. + +// de_ModifyClusterOutput omitted. + /** - * deserializeAws_json1_1RunJobFlowOutput + * deserializeAws_json1_1NotebookExecution */ -const de_RunJobFlowOutput = (output: any, context: __SerdeContext): RunJobFlowOutput => { - return { - ClusterArn: __expectString(output.ClusterArn), - JobFlowId: __expectString(output.JobFlowId), - } as any; +const de_NotebookExecution = (output: any, context: __SerdeContext): NotebookExecution => { + return take(output, { + Arn: __expectString, + EditorId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionEngine: _json, + LastStateChangeReason: __expectString, + NotebookExecutionId: __expectString, + NotebookExecutionName: __expectString, + NotebookInstanceSecurityGroupId: __expectString, + NotebookParams: __expectString, + OutputNotebookURI: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1ScalingAction + * deserializeAws_json1_1NotebookExecutionSummary */ -const de_ScalingAction = (output: any, context: __SerdeContext): ScalingAction => { - return { - Market: __expectString(output.Market), - SimpleScalingPolicyConfiguration: - output.SimpleScalingPolicyConfiguration != null - ? de_SimpleScalingPolicyConfiguration(output.SimpleScalingPolicyConfiguration, context) - : undefined, - } as any; +const de_NotebookExecutionSummary = (output: any, context: __SerdeContext): NotebookExecutionSummary => { + return take(output, { + EditorId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotebookExecutionId: __expectString, + NotebookExecutionName: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ScalingConstraints + * deserializeAws_json1_1NotebookExecutionSummaryList */ -const de_ScalingConstraints = (output: any, context: __SerdeContext): ScalingConstraints => { - return { - MaxCapacity: __expectInt32(output.MaxCapacity), - MinCapacity: __expectInt32(output.MinCapacity), - } as any; +const de_NotebookExecutionSummaryList = (output: any, context: __SerdeContext): NotebookExecutionSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_NotebookExecutionSummary(entry, context); + }); + return retVal; +}; + +// de_OnDemandCapacityReservationOptions omitted. + +// de_OnDemandProvisioningSpecification omitted. + +// de_OnDemandResizingSpecification omitted. + +// de_OSRelease omitted. + +// de_OSReleaseList omitted. + +// de_PlacementGroupConfig omitted. + +// de_PlacementGroupConfigList omitted. + +// de_PlacementType omitted. + +// de_PortRange omitted. + +// de_PortRanges omitted. + +/** + * deserializeAws_json1_1PutAutoScalingPolicyOutput + */ +const de_PutAutoScalingPolicyOutput = (output: any, context: __SerdeContext): PutAutoScalingPolicyOutput => { + return take(output, { + AutoScalingPolicy: (_: any) => de_AutoScalingPolicyDescription(_, context), + ClusterArn: __expectString, + ClusterId: __expectString, + InstanceGroupId: __expectString, + }) as any; }; +// de_PutAutoTerminationPolicyOutput omitted. + +// de_PutBlockPublicAccessConfigurationOutput omitted. + +// de_PutManagedScalingPolicyOutput omitted. + +// de_RemoveAutoScalingPolicyOutput omitted. + +// de_RemoveAutoTerminationPolicyOutput omitted. + +// de_RemoveManagedScalingPolicyOutput omitted. + +// de_RemoveTagsOutput omitted. + +// de_RunJobFlowOutput omitted. + +// de_ScalingAction omitted. + +// de_ScalingConstraints omitted. + /** * deserializeAws_json1_1ScalingRule */ const de_ScalingRule = (output: any, context: __SerdeContext): ScalingRule => { - return { - Action: output.Action != null ? de_ScalingAction(output.Action, context) : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Trigger: output.Trigger != null ? de_ScalingTrigger(output.Trigger, context) : undefined, - } as any; + return take(output, { + Action: _json, + Description: __expectString, + Name: __expectString, + Trigger: (_: any) => de_ScalingTrigger(_, context), + }) as any; }; /** @@ -7005,9 +4986,6 @@ const de_ScalingRuleList = (output: any, context: __SerdeContext): ScalingRule[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingRule(entry, context); }); return retVal; @@ -7017,23 +4995,12 @@ const de_ScalingRuleList = (output: any, context: __SerdeContext): ScalingRule[] * deserializeAws_json1_1ScalingTrigger */ const de_ScalingTrigger = (output: any, context: __SerdeContext): ScalingTrigger => { - return { - CloudWatchAlarmDefinition: - output.CloudWatchAlarmDefinition != null - ? de_CloudWatchAlarmDefinition(output.CloudWatchAlarmDefinition, context) - : undefined, - } as any; + return take(output, { + CloudWatchAlarmDefinition: (_: any) => de_CloudWatchAlarmDefinition(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ScriptBootstrapActionConfig - */ -const de_ScriptBootstrapActionConfig = (output: any, context: __SerdeContext): ScriptBootstrapActionConfig => { - return { - Args: output.Args != null ? de_XmlStringList(output.Args, context) : undefined, - Path: __expectString(output.Path), - } as any; -}; +// de_ScriptBootstrapActionConfig omitted. /** * deserializeAws_json1_1SecurityConfigurationList @@ -7042,9 +5009,6 @@ const de_SecurityConfigurationList = (output: any, context: __SerdeContext): Sec const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SecurityConfigurationSummary(entry, context); }); return retVal; @@ -7054,51 +5018,39 @@ const de_SecurityConfigurationList = (output: any, context: __SerdeContext): Sec * deserializeAws_json1_1SecurityConfigurationSummary */ const de_SecurityConfigurationSummary = (output: any, context: __SerdeContext): SecurityConfigurationSummary => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** * deserializeAws_json1_1SessionMappingDetail */ const de_SessionMappingDetail = (output: any, context: __SerdeContext): SessionMappingDetail => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - IdentityId: __expectString(output.IdentityId), - IdentityName: __expectString(output.IdentityName), - IdentityType: __expectString(output.IdentityType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SessionPolicyArn: __expectString(output.SessionPolicyArn), - StudioId: __expectString(output.StudioId), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IdentityId: __expectString, + IdentityName: __expectString, + IdentityType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SessionPolicyArn: __expectString, + StudioId: __expectString, + }) as any; }; /** * deserializeAws_json1_1SessionMappingSummary */ const de_SessionMappingSummary = (output: any, context: __SerdeContext): SessionMappingSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - IdentityId: __expectString(output.IdentityId), - IdentityName: __expectString(output.IdentityName), - IdentityType: __expectString(output.IdentityType), - SessionPolicyArn: __expectString(output.SessionPolicyArn), - StudioId: __expectString(output.StudioId), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IdentityId: __expectString, + IdentityName: __expectString, + IdentityType: __expectString, + SessionPolicyArn: __expectString, + StudioId: __expectString, + }) as any; }; /** @@ -7108,130 +5060,49 @@ const de_SessionMappingSummaryList = (output: any, context: __SerdeContext): Ses const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SessionMappingSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ShrinkPolicy - */ -const de_ShrinkPolicy = (output: any, context: __SerdeContext): ShrinkPolicy => { - return { - DecommissionTimeout: __expectInt32(output.DecommissionTimeout), - InstanceResizePolicy: - output.InstanceResizePolicy != null ? de_InstanceResizePolicy(output.InstanceResizePolicy, context) : undefined, - } as any; -}; +// de_ShrinkPolicy omitted. -/** - * deserializeAws_json1_1SimpleScalingPolicyConfiguration - */ -const de_SimpleScalingPolicyConfiguration = ( - output: any, - context: __SerdeContext -): SimpleScalingPolicyConfiguration => { - return { - AdjustmentType: __expectString(output.AdjustmentType), - CoolDown: __expectInt32(output.CoolDown), - ScalingAdjustment: __expectInt32(output.ScalingAdjustment), - } as any; -}; +// de_SimpleScalingPolicyConfiguration omitted. -/** - * deserializeAws_json1_1SimplifiedApplication - */ -const de_SimplifiedApplication = (output: any, context: __SerdeContext): SimplifiedApplication => { - return { - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; +// de_SimplifiedApplication omitted. -/** - * deserializeAws_json1_1SimplifiedApplicationList - */ -const de_SimplifiedApplicationList = (output: any, context: __SerdeContext): SimplifiedApplication[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimplifiedApplication(entry, context); - }); - return retVal; -}; +// de_SimplifiedApplicationList omitted. -/** - * deserializeAws_json1_1SpotProvisioningSpecification - */ -const de_SpotProvisioningSpecification = (output: any, context: __SerdeContext): SpotProvisioningSpecification => { - return { - AllocationStrategy: __expectString(output.AllocationStrategy), - BlockDurationMinutes: __expectInt32(output.BlockDurationMinutes), - TimeoutAction: __expectString(output.TimeoutAction), - TimeoutDurationMinutes: __expectInt32(output.TimeoutDurationMinutes), - } as any; -}; +// de_SpotProvisioningSpecification omitted. -/** - * deserializeAws_json1_1SpotResizingSpecification - */ -const de_SpotResizingSpecification = (output: any, context: __SerdeContext): SpotResizingSpecification => { - return { - TimeoutDurationMinutes: __expectInt32(output.TimeoutDurationMinutes), - } as any; -}; +// de_SpotResizingSpecification omitted. -/** - * deserializeAws_json1_1StartNotebookExecutionOutput - */ -const de_StartNotebookExecutionOutput = (output: any, context: __SerdeContext): StartNotebookExecutionOutput => { - return { - NotebookExecutionId: __expectString(output.NotebookExecutionId), - } as any; -}; +// de_StartNotebookExecutionOutput omitted. /** * deserializeAws_json1_1Step */ const de_Step = (output: any, context: __SerdeContext): Step => { - return { - ActionOnFailure: __expectString(output.ActionOnFailure), - Config: output.Config != null ? de_HadoopStepConfig(output.Config, context) : undefined, - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: output.Status != null ? de_StepStatus(output.Status, context) : undefined, - } as any; + return take(output, { + ActionOnFailure: __expectString, + Config: _json, + ExecutionRoleArn: __expectString, + Id: __expectString, + Name: __expectString, + Status: (_: any) => de_StepStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StepConfig - */ -const de_StepConfig = (output: any, context: __SerdeContext): StepConfig => { - return { - ActionOnFailure: __expectString(output.ActionOnFailure), - HadoopJarStep: output.HadoopJarStep != null ? de_HadoopJarStepConfig(output.HadoopJarStep, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_StepConfig omitted. /** * deserializeAws_json1_1StepDetail */ const de_StepDetail = (output: any, context: __SerdeContext): StepDetail => { - return { - ExecutionStatusDetail: - output.ExecutionStatusDetail != null - ? de_StepExecutionStatusDetail(output.ExecutionStatusDetail, context) - : undefined, - StepConfig: output.StepConfig != null ? de_StepConfig(output.StepConfig, context) : undefined, - } as any; + return take(output, { + ExecutionStatusDetail: (_: any) => de_StepExecutionStatusDetail(_, context), + StepConfig: _json, + }) as any; }; /** @@ -7241,9 +5112,6 @@ const de_StepDetailList = (output: any, context: __SerdeContext): StepDetail[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StepDetail(entry, context); }); return retVal; @@ -7253,73 +5121,42 @@ const de_StepDetailList = (output: any, context: __SerdeContext): StepDetail[] = * deserializeAws_json1_1StepExecutionStatusDetail */ const de_StepExecutionStatusDetail = (output: any, context: __SerdeContext): StepExecutionStatusDetail => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - LastStateChangeReason: __expectString(output.LastStateChangeReason), - StartDateTime: - output.StartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDateTime))) - : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1StepIdsList - */ -const de_StepIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastStateChangeReason: __expectString, + StartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1StepStateChangeReason - */ -const de_StepStateChangeReason = (output: any, context: __SerdeContext): StepStateChangeReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_StepIdsList omitted. + +// de_StepStateChangeReason omitted. /** * deserializeAws_json1_1StepStatus */ const de_StepStatus = (output: any, context: __SerdeContext): StepStatus => { - return { - FailureDetails: output.FailureDetails != null ? de_FailureDetails(output.FailureDetails, context) : undefined, - State: __expectString(output.State), - StateChangeReason: - output.StateChangeReason != null ? de_StepStateChangeReason(output.StateChangeReason, context) : undefined, - Timeline: output.Timeline != null ? de_StepTimeline(output.Timeline, context) : undefined, - } as any; + return take(output, { + FailureDetails: _json, + State: __expectString, + StateChangeReason: _json, + Timeline: (_: any) => de_StepTimeline(_, context), + }) as any; }; /** * deserializeAws_json1_1StepSummary */ const de_StepSummary = (output: any, context: __SerdeContext): StepSummary => { - return { - ActionOnFailure: __expectString(output.ActionOnFailure), - Config: output.Config != null ? de_HadoopStepConfig(output.Config, context) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: output.Status != null ? de_StepStatus(output.Status, context) : undefined, - } as any; + return take(output, { + ActionOnFailure: __expectString, + Config: _json, + Id: __expectString, + Name: __expectString, + Status: (_: any) => de_StepStatus(_, context), + }) as any; }; /** @@ -7329,9 +5166,6 @@ const de_StepSummaryList = (output: any, context: __SerdeContext): StepSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StepSummary(entry, context); }); return retVal; @@ -7341,94 +5175,55 @@ const de_StepSummaryList = (output: any, context: __SerdeContext): StepSummary[] * deserializeAws_json1_1StepTimeline */ const de_StepTimeline = (output: any, context: __SerdeContext): StepTimeline => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - EndDateTime: - output.EndDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDateTime))) - : undefined, - StartDateTime: - output.StartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDateTime))) - : undefined, - } as any; + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. /** * deserializeAws_json1_1Studio */ const de_Studio = (output: any, context: __SerdeContext): Studio => { - return { - AuthMode: __expectString(output.AuthMode), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DefaultS3Location: __expectString(output.DefaultS3Location), - Description: __expectString(output.Description), - EngineSecurityGroupId: __expectString(output.EngineSecurityGroupId), - IdpAuthUrl: __expectString(output.IdpAuthUrl), - IdpRelayStateParameterName: __expectString(output.IdpRelayStateParameterName), - Name: __expectString(output.Name), - ServiceRole: __expectString(output.ServiceRole), - StudioArn: __expectString(output.StudioArn), - StudioId: __expectString(output.StudioId), - SubnetIds: output.SubnetIds != null ? de_SubnetIdList(output.SubnetIds, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Url: __expectString(output.Url), - UserRole: __expectString(output.UserRole), - VpcId: __expectString(output.VpcId), - WorkspaceSecurityGroupId: __expectString(output.WorkspaceSecurityGroupId), - } as any; + return take(output, { + AuthMode: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultS3Location: __expectString, + Description: __expectString, + EngineSecurityGroupId: __expectString, + IdpAuthUrl: __expectString, + IdpRelayStateParameterName: __expectString, + Name: __expectString, + ServiceRole: __expectString, + StudioArn: __expectString, + StudioId: __expectString, + SubnetIds: _json, + Tags: _json, + Url: __expectString, + UserRole: __expectString, + VpcId: __expectString, + WorkspaceSecurityGroupId: __expectString, + }) as any; }; /** * deserializeAws_json1_1StudioSummary */ const de_StudioSummary = (output: any, context: __SerdeContext): StudioSummary => { - return { - AuthMode: __expectString(output.AuthMode), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - StudioId: __expectString(output.StudioId), - Url: __expectString(output.Url), - VpcId: __expectString(output.VpcId), - } as any; + return take(output, { + AuthMode: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Name: __expectString, + StudioId: __expectString, + Url: __expectString, + VpcId: __expectString, + }) as any; }; /** @@ -7438,120 +5233,26 @@ const de_StudioSummaryList = (output: any, context: __SerdeContext): StudioSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StudioSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIdList omitted. -/** - * deserializeAws_json1_1SupportedProductsList - */ -const de_SupportedProductsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SupportedProductsList omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1UsernamePassword - */ -const de_UsernamePassword = (output: any, context: __SerdeContext): UsernamePassword => { - return { - Password: __expectString(output.Password), - Username: __expectString(output.Username), - } as any; -}; +// de_UsernamePassword omitted. -/** - * deserializeAws_json1_1VolumeSpecification - */ -const de_VolumeSpecification = (output: any, context: __SerdeContext): VolumeSpecification => { - return { - Iops: __expectInt32(output.Iops), - SizeInGB: __expectInt32(output.SizeInGB), - Throughput: __expectInt32(output.Throughput), - VolumeType: __expectString(output.VolumeType), - } as any; -}; +// de_VolumeSpecification omitted. -/** - * deserializeAws_json1_1XmlStringList - */ -const de_XmlStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_XmlStringList omitted. -/** - * deserializeAws_json1_1XmlStringMaxLen256List - */ -const de_XmlStringMaxLen256List = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_XmlStringMaxLen256List omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -7573,6 +5274,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-eventbridge/src/protocols/Aws_json1_1.ts b/clients/client-eventbridge/src/protocols/Aws_json1_1.ts index 733bd8c1a46f..d5777031c9e1 100644 --- a/clients/client-eventbridge/src/protocols/Aws_json1_1.ts +++ b/clients/client-eventbridge/src/protocols/Aws_json1_1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -132,19 +133,13 @@ import { BatchParameters, BatchRetryStrategy, CancelReplayRequest, - CancelReplayResponse, CapacityProviderStrategyItem, ConcurrentModificationException, Condition, Connection, - ConnectionApiKeyAuthResponseParameters, - ConnectionAuthResponseParameters, - ConnectionBasicAuthResponseParameters, ConnectionBodyParameter, ConnectionHeaderParameter, ConnectionHttpParameters, - ConnectionOAuthClientResponseParameters, - ConnectionOAuthResponseParameters, ConnectionQueryStringParameter, CreateApiDestinationRequest, CreateApiDestinationResponse, @@ -158,23 +153,17 @@ import { CreateConnectionRequest, CreateConnectionResponse, CreateEndpointRequest, - CreateEndpointResponse, CreateEventBusRequest, - CreateEventBusResponse, CreatePartnerEventSourceRequest, - CreatePartnerEventSourceResponse, DeactivateEventSourceRequest, DeadLetterConfig, DeauthorizeConnectionRequest, DeauthorizeConnectionResponse, DeleteApiDestinationRequest, - DeleteApiDestinationResponse, DeleteArchiveRequest, - DeleteArchiveResponse, DeleteConnectionRequest, DeleteConnectionResponse, DeleteEndpointRequest, - DeleteEndpointResponse, DeleteEventBusRequest, DeletePartnerEventSourceRequest, DeleteRuleRequest, @@ -187,21 +176,17 @@ import { DescribeEndpointRequest, DescribeEndpointResponse, DescribeEventBusRequest, - DescribeEventBusResponse, DescribeEventSourceRequest, DescribeEventSourceResponse, DescribePartnerEventSourceRequest, - DescribePartnerEventSourceResponse, DescribeReplayRequest, DescribeReplayResponse, DescribeRuleRequest, - DescribeRuleResponse, DisableRuleRequest, EcsParameters, EnableRuleRequest, Endpoint, EndpointEventBus, - EventBus, EventSource, FailoverConfig, HttpParameters, @@ -221,27 +206,20 @@ import { ListEndpointsRequest, ListEndpointsResponse, ListEventBusesRequest, - ListEventBusesResponse, ListEventSourcesRequest, ListEventSourcesResponse, ListPartnerEventSourceAccountsRequest, ListPartnerEventSourceAccountsResponse, ListPartnerEventSourcesRequest, - ListPartnerEventSourcesResponse, ListReplaysRequest, ListReplaysResponse, ListRuleNamesByTargetRequest, - ListRuleNamesByTargetResponse, ListRulesRequest, - ListRulesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTargetsByRuleRequest, - ListTargetsByRuleResponse, ManagedRuleException, NetworkConfiguration, OperationDisabledException, - PartnerEventSource, PartnerEventSourceAccount, PlacementConstraint, PlacementStrategy, @@ -249,23 +227,14 @@ import { Primary, PutEventsRequest, PutEventsRequestEntry, - PutEventsResponse, - PutEventsResultEntry, PutPartnerEventsRequest, PutPartnerEventsRequestEntry, - PutPartnerEventsResponse, - PutPartnerEventsResultEntry, PutPermissionRequest, PutRuleRequest, - PutRuleResponse, PutTargetsRequest, - PutTargetsResponse, - PutTargetsResultEntry, RedshiftDataParameters, RemovePermissionRequest, RemoveTargetsRequest, - RemoveTargetsResponse, - RemoveTargetsResultEntry, Replay, ReplayDestination, ReplicationConfig, @@ -273,7 +242,6 @@ import { ResourceNotFoundException, RetryPolicy, RoutingConfig, - Rule, RunCommandParameters, RunCommandTarget, SageMakerPipelineParameter, @@ -284,12 +252,9 @@ import { StartReplayResponse, Tag, TagResourceRequest, - TagResourceResponse, Target, TestEventPatternRequest, - TestEventPatternResponse, UntagResourceRequest, - UntagResourceResponse, UpdateApiDestinationRequest, UpdateApiDestinationResponse, UpdateArchiveRequest, @@ -302,7 +267,6 @@ import { UpdateConnectionRequest, UpdateConnectionResponse, UpdateEndpointRequest, - UpdateEndpointResponse, } from "../models/models_0"; /** @@ -314,7 +278,7 @@ export const se_ActivateEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ActivateEventSource"); let body: any; - body = JSON.stringify(se_ActivateEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -327,7 +291,7 @@ export const se_CancelReplayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelReplay"); let body: any; - body = JSON.stringify(se_CancelReplayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -340,7 +304,7 @@ export const se_CreateApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApiDestination"); let body: any; - body = JSON.stringify(se_CreateApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -353,7 +317,7 @@ export const se_CreateArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateArchive"); let body: any; - body = JSON.stringify(se_CreateArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -366,7 +330,7 @@ export const se_CreateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnection"); let body: any; - body = JSON.stringify(se_CreateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -379,7 +343,7 @@ export const se_CreateEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEndpoint"); let body: any; - body = JSON.stringify(se_CreateEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -392,7 +356,7 @@ export const se_CreateEventBusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEventBus"); let body: any; - body = JSON.stringify(se_CreateEventBusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +369,7 @@ export const se_CreatePartnerEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePartnerEventSource"); let body: any; - body = JSON.stringify(se_CreatePartnerEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +382,7 @@ export const se_DeactivateEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeactivateEventSource"); let body: any; - body = JSON.stringify(se_DeactivateEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +395,7 @@ export const se_DeauthorizeConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeauthorizeConnection"); let body: any; - body = JSON.stringify(se_DeauthorizeConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +408,7 @@ export const se_DeleteApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApiDestination"); let body: any; - body = JSON.stringify(se_DeleteApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +421,7 @@ export const se_DeleteArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteArchive"); let body: any; - body = JSON.stringify(se_DeleteArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -470,7 +434,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -483,7 +447,7 @@ export const se_DeleteEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpoint"); let body: any; - body = JSON.stringify(se_DeleteEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -496,7 +460,7 @@ export const se_DeleteEventBusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventBus"); let body: any; - body = JSON.stringify(se_DeleteEventBusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -509,7 +473,7 @@ export const se_DeletePartnerEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePartnerEventSource"); let body: any; - body = JSON.stringify(se_DeletePartnerEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +486,7 @@ export const se_DeleteRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRule"); let body: any; - body = JSON.stringify(se_DeleteRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -535,7 +499,7 @@ export const se_DescribeApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApiDestination"); let body: any; - body = JSON.stringify(se_DescribeApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -548,7 +512,7 @@ export const se_DescribeArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeArchive"); let body: any; - body = JSON.stringify(se_DescribeArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +525,7 @@ export const se_DescribeConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnection"); let body: any; - body = JSON.stringify(se_DescribeConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -574,7 +538,7 @@ export const se_DescribeEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoint"); let body: any; - body = JSON.stringify(se_DescribeEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -587,7 +551,7 @@ export const se_DescribeEventBusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventBus"); let body: any; - body = JSON.stringify(se_DescribeEventBusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -600,7 +564,7 @@ export const se_DescribeEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventSource"); let body: any; - body = JSON.stringify(se_DescribeEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -613,7 +577,7 @@ export const se_DescribePartnerEventSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePartnerEventSource"); let body: any; - body = JSON.stringify(se_DescribePartnerEventSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -626,7 +590,7 @@ export const se_DescribeReplayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReplay"); let body: any; - body = JSON.stringify(se_DescribeReplayRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -639,7 +603,7 @@ export const se_DescribeRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRule"); let body: any; - body = JSON.stringify(se_DescribeRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -652,7 +616,7 @@ export const se_DisableRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableRule"); let body: any; - body = JSON.stringify(se_DisableRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -665,7 +629,7 @@ export const se_EnableRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableRule"); let body: any; - body = JSON.stringify(se_EnableRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -678,7 +642,7 @@ export const se_ListApiDestinationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApiDestinations"); let body: any; - body = JSON.stringify(se_ListApiDestinationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -691,7 +655,7 @@ export const se_ListArchivesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListArchives"); let body: any; - body = JSON.stringify(se_ListArchivesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -704,7 +668,7 @@ export const se_ListConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConnections"); let body: any; - body = JSON.stringify(se_ListConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -717,7 +681,7 @@ export const se_ListEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEndpoints"); let body: any; - body = JSON.stringify(se_ListEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -730,7 +694,7 @@ export const se_ListEventBusesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventBuses"); let body: any; - body = JSON.stringify(se_ListEventBusesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -743,7 +707,7 @@ export const se_ListEventSourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventSources"); let body: any; - body = JSON.stringify(se_ListEventSourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -756,7 +720,7 @@ export const se_ListPartnerEventSourceAccountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPartnerEventSourceAccounts"); let body: any; - body = JSON.stringify(se_ListPartnerEventSourceAccountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -769,7 +733,7 @@ export const se_ListPartnerEventSourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPartnerEventSources"); let body: any; - body = JSON.stringify(se_ListPartnerEventSourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -782,7 +746,7 @@ export const se_ListReplaysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReplays"); let body: any; - body = JSON.stringify(se_ListReplaysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -795,7 +759,7 @@ export const se_ListRuleNamesByTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuleNamesByTarget"); let body: any; - body = JSON.stringify(se_ListRuleNamesByTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -808,7 +772,7 @@ export const se_ListRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRules"); let body: any; - body = JSON.stringify(se_ListRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -821,7 +785,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -834,7 +798,7 @@ export const se_ListTargetsByRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTargetsByRule"); let body: any; - body = JSON.stringify(se_ListTargetsByRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -873,7 +837,7 @@ export const se_PutPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPermission"); let body: any; - body = JSON.stringify(se_PutPermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -886,7 +850,7 @@ export const se_PutRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRule"); let body: any; - body = JSON.stringify(se_PutRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -899,7 +863,7 @@ export const se_PutTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutTargets"); let body: any; - body = JSON.stringify(se_PutTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -912,7 +876,7 @@ export const se_RemovePermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemovePermission"); let body: any; - body = JSON.stringify(se_RemovePermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -925,7 +889,7 @@ export const se_RemoveTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTargets"); let body: any; - body = JSON.stringify(se_RemoveTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -951,7 +915,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -964,7 +928,7 @@ export const se_TestEventPatternCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestEventPattern"); let body: any; - body = JSON.stringify(se_TestEventPatternRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -977,7 +941,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -990,7 +954,7 @@ export const se_UpdateApiDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApiDestination"); let body: any; - body = JSON.stringify(se_UpdateApiDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1003,7 +967,7 @@ export const se_UpdateArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateArchive"); let body: any; - body = JSON.stringify(se_UpdateArchiveRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1016,7 +980,7 @@ export const se_UpdateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnection"); let body: any; - body = JSON.stringify(se_UpdateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1029,7 +993,7 @@ export const se_UpdateEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEndpoint"); let body: any; - body = JSON.stringify(se_UpdateEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1047,7 +1011,7 @@ export const de_ActivateEventSourceCommand = async ( const response: ActivateEventSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1080,10 +1044,9 @@ const de_ActivateEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1101,12 +1064,12 @@ export const de_CancelReplayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelReplayResponse(data, context); + contents = _json(data); const response: CancelReplayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1136,10 +1099,9 @@ const de_CancelReplayCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1162,7 +1124,7 @@ export const de_CreateApiDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1192,10 +1154,9 @@ const de_CreateApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1218,7 +1179,7 @@ export const de_CreateArchiveCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1254,10 +1215,9 @@ const de_CreateArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1280,7 +1240,7 @@ export const de_CreateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1307,10 +1267,9 @@ const de_CreateConnectionCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1328,12 +1287,12 @@ export const de_CreateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEndpointResponse(data, context); + contents = _json(data); const response: CreateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1360,10 +1319,9 @@ const de_CreateEndpointCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1381,12 +1339,12 @@ export const de_CreateEventBusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEventBusResponse(data, context); + contents = _json(data); const response: CreateEventBusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1425,10 +1383,9 @@ const de_CreateEventBusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1446,12 +1403,12 @@ export const de_CreatePartnerEventSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePartnerEventSourceResponse(data, context); + contents = _json(data); const response: CreatePartnerEventSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1484,10 +1441,9 @@ const de_CreatePartnerEventSourceCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,7 +1463,7 @@ export const de_DeactivateEventSourceCommand = async ( const response: DeactivateEventSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1540,10 +1496,9 @@ const de_DeactivateEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1566,7 +1521,7 @@ export const de_DeauthorizeConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1593,10 +1548,9 @@ const de_DeauthorizeConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1614,12 +1568,12 @@ export const de_DeleteApiDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApiDestinationResponse(data, context); + contents = _json(data); const response: DeleteApiDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1646,10 +1600,9 @@ const de_DeleteApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1667,12 +1620,12 @@ export const de_DeleteArchiveCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteArchiveResponse(data, context); + contents = _json(data); const response: DeleteArchiveCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1699,10 +1652,9 @@ const de_DeleteArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1725,7 +1677,7 @@ export const de_DeleteConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1752,10 +1704,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1773,12 +1724,12 @@ export const de_DeleteEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEndpointResponse(data, context); + contents = _json(data); const response: DeleteEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1805,10 +1756,9 @@ const de_DeleteEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1828,7 +1778,7 @@ export const de_DeleteEventBusCommand = async ( const response: DeleteEventBusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1852,10 +1802,9 @@ const de_DeleteEventBusCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1875,7 +1824,7 @@ export const de_DeletePartnerEventSourceCommand = async ( const response: DeletePartnerEventSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1902,10 +1851,9 @@ const de_DeletePartnerEventSourceCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1925,7 +1873,7 @@ export const de_DeleteRuleCommand = async ( const response: DeleteRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1955,10 +1903,9 @@ const de_DeleteRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1981,7 +1928,7 @@ export const de_DescribeApiDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2005,10 +1952,9 @@ const de_DescribeApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2031,7 +1977,7 @@ export const de_DescribeArchiveCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2058,10 +2004,9 @@ const de_DescribeArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,7 +2029,7 @@ export const de_DescribeConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2108,10 +2053,9 @@ const de_DescribeConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2134,7 +2078,7 @@ export const de_DescribeEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2158,10 +2102,9 @@ const de_DescribeEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2179,12 +2122,12 @@ export const de_DescribeEventBusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEventBusResponse(data, context); + contents = _json(data); const response: DescribeEventBusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2208,10 +2151,9 @@ const de_DescribeEventBusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2234,7 +2176,7 @@ export const de_DescribeEventSourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2261,10 +2203,9 @@ const de_DescribeEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,12 +2223,12 @@ export const de_DescribePartnerEventSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePartnerEventSourceResponse(data, context); + contents = _json(data); const response: DescribePartnerEventSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2314,10 +2255,9 @@ const de_DescribePartnerEventSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2340,7 +2280,7 @@ export const de_DescribeReplayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2364,10 +2304,9 @@ const de_DescribeReplayCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2385,12 +2324,12 @@ export const de_DescribeRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRuleResponse(data, context); + contents = _json(data); const response: DescribeRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2414,10 +2353,9 @@ const de_DescribeRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2437,7 +2375,7 @@ export const de_DisableRuleCommand = async ( const response: DisableRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2467,10 +2405,9 @@ const de_DisableRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2490,7 +2427,7 @@ export const de_EnableRuleCommand = async ( const response: EnableRuleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2520,10 +2457,9 @@ const de_EnableRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2546,7 +2482,7 @@ export const de_ListApiDestinationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2567,10 +2503,9 @@ const de_ListApiDestinationsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2593,7 +2528,7 @@ export const de_ListArchivesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2617,10 +2552,9 @@ const de_ListArchivesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2643,7 +2577,7 @@ export const de_ListConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2664,10 +2598,9 @@ const de_ListConnectionsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2690,7 +2623,7 @@ export const de_ListEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2711,10 +2644,9 @@ const de_ListEndpointsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,12 +2664,12 @@ export const de_ListEventBusesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEventBusesResponse(data, context); + contents = _json(data); const response: ListEventBusesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2758,10 +2690,9 @@ const de_ListEventBusesCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2784,7 +2715,7 @@ export const de_ListEventSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2808,10 +2739,9 @@ const de_ListEventSourcesCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2834,7 +2764,7 @@ export const de_ListPartnerEventSourceAccountsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2861,10 +2791,9 @@ const de_ListPartnerEventSourceAccountsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2882,12 +2811,12 @@ export const de_ListPartnerEventSourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPartnerEventSourcesResponse(data, context); + contents = _json(data); const response: ListPartnerEventSourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2911,10 +2840,9 @@ const de_ListPartnerEventSourcesCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2937,7 +2865,7 @@ export const de_ListReplaysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2958,10 +2886,9 @@ const de_ListReplaysCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2979,12 +2906,12 @@ export const de_ListRuleNamesByTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRuleNamesByTargetResponse(data, context); + contents = _json(data); const response: ListRuleNamesByTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3008,10 +2935,9 @@ const de_ListRuleNamesByTargetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3029,12 +2955,12 @@ export const de_ListRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRulesResponse(data, context); + contents = _json(data); const response: ListRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3058,10 +2984,9 @@ const de_ListRulesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3079,12 +3004,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3108,10 +3033,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3129,12 +3053,12 @@ export const de_ListTargetsByRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTargetsByRuleResponse(data, context); + contents = _json(data); const response: ListTargetsByRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3158,10 +3082,9 @@ const de_ListTargetsByRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3179,12 +3102,12 @@ export const de_PutEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutEventsResponse(data, context); + contents = _json(data); const response: PutEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3205,10 +3128,9 @@ const de_PutEventsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3226,12 +3148,12 @@ export const de_PutPartnerEventsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPartnerEventsResponse(data, context); + contents = _json(data); const response: PutPartnerEventsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3255,10 +3177,9 @@ const de_PutPartnerEventsCommandError = async ( throw await de_OperationDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3278,7 +3199,7 @@ export const de_PutPermissionCommand = async ( const response: PutPermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3311,10 +3232,9 @@ const de_PutPermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3332,12 +3252,12 @@ export const de_PutRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRuleResponse(data, context); + contents = _json(data); const response: PutRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3373,10 +3293,9 @@ const de_PutRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3394,12 +3313,12 @@ export const de_PutTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutTargetsResponse(data, context); + contents = _json(data); const response: PutTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3432,10 +3351,9 @@ const de_PutTargetsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3455,7 +3373,7 @@ export const de_RemovePermissionCommand = async ( const response: RemovePermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3485,10 +3403,9 @@ const de_RemovePermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3506,12 +3423,12 @@ export const de_RemoveTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTargetsResponse(data, context); + contents = _json(data); const response: RemoveTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3541,10 +3458,9 @@ const de_RemoveTargetsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3567,7 +3483,7 @@ export const de_StartReplayCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3600,10 +3516,9 @@ const de_StartReplayCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3621,12 +3536,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3656,10 +3571,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3677,12 +3591,12 @@ export const de_TestEventPatternCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestEventPatternResponse(data, context); + contents = _json(data); const response: TestEventPatternCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3706,10 +3620,9 @@ const de_TestEventPatternCommandError = async ( throw await de_InvalidEventPatternExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3727,12 +3640,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3762,10 +3675,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3788,7 +3700,7 @@ export const de_UpdateApiDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3818,10 +3730,9 @@ const de_UpdateApiDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3844,7 +3755,7 @@ export const de_UpdateArchiveCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3877,10 +3788,9 @@ const de_UpdateArchiveCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3903,7 +3813,7 @@ export const de_UpdateConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3933,10 +3843,9 @@ const de_UpdateConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3954,12 +3863,12 @@ export const de_UpdateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEndpointResponse(data, context); + contents = _json(data); const response: UpdateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3986,10 +3895,9 @@ const de_UpdateEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4003,7 +3911,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4019,7 +3927,7 @@ const de_IllegalStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IllegalStatusException(body, context); + const deserialized: any = _json(body); const exception = new IllegalStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4032,7 +3940,7 @@ const de_IllegalStatusExceptionRes = async ( */ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalException(body, context); + const deserialized: any = _json(body); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4048,7 +3956,7 @@ const de_InvalidEventPatternExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEventPatternException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEventPatternException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4064,7 +3972,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4080,7 +3988,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4096,7 +4004,7 @@ const de_ManagedRuleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ManagedRuleException(body, context); + const deserialized: any = _json(body); const exception = new ManagedRuleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4112,7 +4020,7 @@ const de_OperationDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationDisabledException(body, context); + const deserialized: any = _json(body); const exception = new OperationDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4128,7 +4036,7 @@ const de_PolicyLengthExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyLengthExceededException(body, context); + const deserialized: any = _json(body); const exception = new PolicyLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4144,7 +4052,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4160,7 +4068,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4168,3485 +4076,1035 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActivateEventSourceRequest - */ -const se_ActivateEventSourceRequest = (input: ActivateEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_ActivateEventSourceRequest omitted. -/** - * serializeAws_json1_1AwsVpcConfiguration - */ -const se_AwsVpcConfiguration = (input: AwsVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }), - ...(input.SecurityGroups != null && { SecurityGroups: se_StringList(input.SecurityGroups, context) }), - ...(input.Subnets != null && { Subnets: se_StringList(input.Subnets, context) }), - }; -}; +// se_AwsVpcConfiguration omitted. -/** - * serializeAws_json1_1BatchArrayProperties - */ -const se_BatchArrayProperties = (input: BatchArrayProperties, context: __SerdeContext): any => { - return { - ...(input.Size != null && { Size: input.Size }), - }; -}; +// se_BatchArrayProperties omitted. -/** - * serializeAws_json1_1BatchParameters - */ -const se_BatchParameters = (input: BatchParameters, context: __SerdeContext): any => { - return { - ...(input.ArrayProperties != null && { ArrayProperties: se_BatchArrayProperties(input.ArrayProperties, context) }), - ...(input.JobDefinition != null && { JobDefinition: input.JobDefinition }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.RetryStrategy != null && { RetryStrategy: se_BatchRetryStrategy(input.RetryStrategy, context) }), - }; -}; +// se_BatchParameters omitted. -/** - * serializeAws_json1_1BatchRetryStrategy - */ -const se_BatchRetryStrategy = (input: BatchRetryStrategy, context: __SerdeContext): any => { - return { - ...(input.Attempts != null && { Attempts: input.Attempts }), - }; -}; +// se_BatchRetryStrategy omitted. -/** - * serializeAws_json1_1CancelReplayRequest - */ -const se_CancelReplayRequest = (input: CancelReplayRequest, context: __SerdeContext): any => { - return { - ...(input.ReplayName != null && { ReplayName: input.ReplayName }), - }; -}; +// se_CancelReplayRequest omitted. -/** - * serializeAws_json1_1CapacityProviderStrategy - */ -const se_CapacityProviderStrategy = (input: CapacityProviderStrategyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CapacityProviderStrategyItem(entry, context); - }); -}; +// se_CapacityProviderStrategy omitted. -/** - * serializeAws_json1_1CapacityProviderStrategyItem - */ -const se_CapacityProviderStrategyItem = (input: CapacityProviderStrategyItem, context: __SerdeContext): any => { - return { - ...(input.base != null && { base: input.base }), - ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_CapacityProviderStrategyItem omitted. -/** - * serializeAws_json1_1Condition - */ -const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Condition omitted. -/** - * serializeAws_json1_1ConnectionBodyParameter - */ -const se_ConnectionBodyParameter = (input: ConnectionBodyParameter, context: __SerdeContext): any => { - return { - ...(input.IsValueSecret != null && { IsValueSecret: input.IsValueSecret }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConnectionBodyParameter omitted. -/** - * serializeAws_json1_1ConnectionBodyParametersList - */ -const se_ConnectionBodyParametersList = (input: ConnectionBodyParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectionBodyParameter(entry, context); - }); -}; +// se_ConnectionBodyParametersList omitted. -/** - * serializeAws_json1_1ConnectionHeaderParameter - */ -const se_ConnectionHeaderParameter = (input: ConnectionHeaderParameter, context: __SerdeContext): any => { - return { - ...(input.IsValueSecret != null && { IsValueSecret: input.IsValueSecret }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConnectionHeaderParameter omitted. -/** - * serializeAws_json1_1ConnectionHeaderParametersList - */ -const se_ConnectionHeaderParametersList = (input: ConnectionHeaderParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectionHeaderParameter(entry, context); - }); -}; +// se_ConnectionHeaderParametersList omitted. -/** - * serializeAws_json1_1ConnectionHttpParameters - */ -const se_ConnectionHttpParameters = (input: ConnectionHttpParameters, context: __SerdeContext): any => { - return { - ...(input.BodyParameters != null && { - BodyParameters: se_ConnectionBodyParametersList(input.BodyParameters, context), - }), - ...(input.HeaderParameters != null && { - HeaderParameters: se_ConnectionHeaderParametersList(input.HeaderParameters, context), - }), - ...(input.QueryStringParameters != null && { - QueryStringParameters: se_ConnectionQueryStringParametersList(input.QueryStringParameters, context), - }), - }; -}; +// se_ConnectionHttpParameters omitted. -/** - * serializeAws_json1_1ConnectionQueryStringParameter - */ -const se_ConnectionQueryStringParameter = (input: ConnectionQueryStringParameter, context: __SerdeContext): any => { - return { - ...(input.IsValueSecret != null && { IsValueSecret: input.IsValueSecret }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ConnectionQueryStringParameter omitted. -/** - * serializeAws_json1_1ConnectionQueryStringParametersList - */ -const se_ConnectionQueryStringParametersList = ( - input: ConnectionQueryStringParameter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectionQueryStringParameter(entry, context); - }); -}; +// se_ConnectionQueryStringParametersList omitted. -/** - * serializeAws_json1_1CreateApiDestinationRequest - */ -const se_CreateApiDestinationRequest = (input: CreateApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.InvocationEndpoint != null && { InvocationEndpoint: input.InvocationEndpoint }), - ...(input.InvocationRateLimitPerSecond != null && { - InvocationRateLimitPerSecond: input.InvocationRateLimitPerSecond, - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateApiDestinationRequest omitted. -/** - * serializeAws_json1_1CreateArchiveRequest - */ -const se_CreateArchiveRequest = (input: CreateArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; +// se_CreateArchiveRequest omitted. -/** - * serializeAws_json1_1CreateConnectionApiKeyAuthRequestParameters - */ -const se_CreateConnectionApiKeyAuthRequestParameters = ( - input: CreateConnectionApiKeyAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyName != null && { ApiKeyName: input.ApiKeyName }), - ...(input.ApiKeyValue != null && { ApiKeyValue: input.ApiKeyValue }), - }; -}; +// se_CreateConnectionApiKeyAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionAuthRequestParameters - */ -const se_CreateConnectionAuthRequestParameters = ( - input: CreateConnectionAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyAuthParameters != null && { - ApiKeyAuthParameters: se_CreateConnectionApiKeyAuthRequestParameters(input.ApiKeyAuthParameters, context), - }), - ...(input.BasicAuthParameters != null && { - BasicAuthParameters: se_CreateConnectionBasicAuthRequestParameters(input.BasicAuthParameters, context), - }), - ...(input.InvocationHttpParameters != null && { - InvocationHttpParameters: se_ConnectionHttpParameters(input.InvocationHttpParameters, context), - }), - ...(input.OAuthParameters != null && { - OAuthParameters: se_CreateConnectionOAuthRequestParameters(input.OAuthParameters, context), - }), - }; -}; +// se_CreateConnectionAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionBasicAuthRequestParameters - */ -const se_CreateConnectionBasicAuthRequestParameters = ( - input: CreateConnectionBasicAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_CreateConnectionBasicAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionOAuthClientRequestParameters - */ -const se_CreateConnectionOAuthClientRequestParameters = ( - input: CreateConnectionOAuthClientRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ClientID != null && { ClientID: input.ClientID }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - }; -}; +// se_CreateConnectionOAuthClientRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionOAuthRequestParameters - */ -const se_CreateConnectionOAuthRequestParameters = ( - input: CreateConnectionOAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizationEndpoint != null && { AuthorizationEndpoint: input.AuthorizationEndpoint }), - ...(input.ClientParameters != null && { - ClientParameters: se_CreateConnectionOAuthClientRequestParameters(input.ClientParameters, context), - }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.OAuthHttpParameters != null && { - OAuthHttpParameters: se_ConnectionHttpParameters(input.OAuthHttpParameters, context), - }), - }; -}; +// se_CreateConnectionOAuthRequestParameters omitted. -/** - * serializeAws_json1_1CreateConnectionRequest - */ -const se_CreateConnectionRequest = (input: CreateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.AuthParameters != null && { - AuthParameters: se_CreateConnectionAuthRequestParameters(input.AuthParameters, context), - }), - ...(input.AuthorizationType != null && { AuthorizationType: input.AuthorizationType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateConnectionRequest omitted. -/** - * serializeAws_json1_1CreateEndpointRequest - */ -const se_CreateEndpointRequest = (input: CreateEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBuses != null && { EventBuses: se_EndpointEventBusList(input.EventBuses, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ReplicationConfig != null && { - ReplicationConfig: se_ReplicationConfig(input.ReplicationConfig, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RoutingConfig != null && { RoutingConfig: se_RoutingConfig(input.RoutingConfig, context) }), - }; -}; +// se_CreateEndpointRequest omitted. -/** - * serializeAws_json1_1CreateEventBusRequest - */ -const se_CreateEventBusRequest = (input: CreateEventBusRequest, context: __SerdeContext): any => { - return { - ...(input.EventSourceName != null && { EventSourceName: input.EventSourceName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateEventBusRequest omitted. -/** - * serializeAws_json1_1CreatePartnerEventSourceRequest - */ -const se_CreatePartnerEventSourceRequest = (input: CreatePartnerEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Account != null && { Account: input.Account }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreatePartnerEventSourceRequest omitted. -/** - * serializeAws_json1_1DeactivateEventSourceRequest - */ -const se_DeactivateEventSourceRequest = (input: DeactivateEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeactivateEventSourceRequest omitted. -/** - * serializeAws_json1_1DeadLetterConfig - */ -const se_DeadLetterConfig = (input: DeadLetterConfig, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_DeadLetterConfig omitted. -/** - * serializeAws_json1_1DeauthorizeConnectionRequest - */ -const se_DeauthorizeConnectionRequest = (input: DeauthorizeConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeauthorizeConnectionRequest omitted. -/** - * serializeAws_json1_1DeleteApiDestinationRequest - */ -const se_DeleteApiDestinationRequest = (input: DeleteApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteApiDestinationRequest omitted. -/** - * serializeAws_json1_1DeleteArchiveRequest - */ -const se_DeleteArchiveRequest = (input: DeleteArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - }; -}; +// se_DeleteArchiveRequest omitted. -/** - * serializeAws_json1_1DeleteConnectionRequest - */ -const se_DeleteConnectionRequest = (input: DeleteConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteConnectionRequest omitted. -/** - * serializeAws_json1_1DeleteEndpointRequest - */ -const se_DeleteEndpointRequest = (input: DeleteEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteEndpointRequest omitted. -/** - * serializeAws_json1_1DeleteEventBusRequest - */ -const se_DeleteEventBusRequest = (input: DeleteEventBusRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteEventBusRequest omitted. -/** - * serializeAws_json1_1DeletePartnerEventSourceRequest - */ -const se_DeletePartnerEventSourceRequest = (input: DeletePartnerEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Account != null && { Account: input.Account }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeletePartnerEventSourceRequest omitted. -/** - * serializeAws_json1_1DeleteRuleRequest - */ -const se_DeleteRuleRequest = (input: DeleteRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Force != null && { Force: input.Force }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteRuleRequest omitted. -/** - * serializeAws_json1_1DescribeApiDestinationRequest - */ -const se_DescribeApiDestinationRequest = (input: DescribeApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeApiDestinationRequest omitted. -/** - * serializeAws_json1_1DescribeArchiveRequest - */ -const se_DescribeArchiveRequest = (input: DescribeArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - }; -}; +// se_DescribeArchiveRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionRequest - */ -const se_DescribeConnectionRequest = (input: DescribeConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeConnectionRequest omitted. -/** - * serializeAws_json1_1DescribeEndpointRequest - */ -const se_DescribeEndpointRequest = (input: DescribeEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeEndpointRequest omitted. -/** - * serializeAws_json1_1DescribeEventBusRequest - */ -const se_DescribeEventBusRequest = (input: DescribeEventBusRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeEventBusRequest omitted. -/** - * serializeAws_json1_1DescribeEventSourceRequest - */ -const se_DescribeEventSourceRequest = (input: DescribeEventSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeEventSourceRequest omitted. -/** - * serializeAws_json1_1DescribePartnerEventSourceRequest - */ -const se_DescribePartnerEventSourceRequest = ( - input: DescribePartnerEventSourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribePartnerEventSourceRequest omitted. -/** - * serializeAws_json1_1DescribeReplayRequest - */ -const se_DescribeReplayRequest = (input: DescribeReplayRequest, context: __SerdeContext): any => { - return { - ...(input.ReplayName != null && { ReplayName: input.ReplayName }), - }; -}; +// se_DescribeReplayRequest omitted. -/** - * serializeAws_json1_1DescribeRuleRequest - */ -const se_DescribeRuleRequest = (input: DescribeRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeRuleRequest omitted. -/** - * serializeAws_json1_1DisableRuleRequest - */ -const se_DisableRuleRequest = (input: DisableRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DisableRuleRequest omitted. -/** - * serializeAws_json1_1EcsParameters - */ -const se_EcsParameters = (input: EcsParameters, context: __SerdeContext): any => { - return { - ...(input.CapacityProviderStrategy != null && { - CapacityProviderStrategy: se_CapacityProviderStrategy(input.CapacityProviderStrategy, context), - }), - ...(input.EnableECSManagedTags != null && { EnableECSManagedTags: input.EnableECSManagedTags }), - ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }), - ...(input.Group != null && { Group: input.Group }), - ...(input.LaunchType != null && { LaunchType: input.LaunchType }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.PlacementConstraints != null && { - PlacementConstraints: se_PlacementConstraints(input.PlacementConstraints, context), - }), - ...(input.PlacementStrategy != null && { - PlacementStrategy: se_PlacementStrategies(input.PlacementStrategy, context), - }), - ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }), - ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TaskCount != null && { TaskCount: input.TaskCount }), - ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }), - }; -}; +// se_EcsParameters omitted. -/** - * serializeAws_json1_1EnableRuleRequest - */ -const se_EnableRuleRequest = (input: EnableRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1EndpointEventBus - */ -const se_EndpointEventBus = (input: EndpointEventBus, context: __SerdeContext): any => { - return { - ...(input.EventBusArn != null && { EventBusArn: input.EventBusArn }), - }; -}; - -/** - * serializeAws_json1_1EndpointEventBusList - */ -const se_EndpointEventBusList = (input: EndpointEventBus[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EndpointEventBus(entry, context); - }); -}; - -/** - * serializeAws_json1_1EventResourceList - */ -const se_EventResourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1FailoverConfig - */ -const se_FailoverConfig = (input: FailoverConfig, context: __SerdeContext): any => { - return { - ...(input.Primary != null && { Primary: se_Primary(input.Primary, context) }), - ...(input.Secondary != null && { Secondary: se_Secondary(input.Secondary, context) }), - }; -}; - -/** - * serializeAws_json1_1HeaderParametersMap - */ -const se_HeaderParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1HttpParameters - */ -const se_HttpParameters = (input: HttpParameters, context: __SerdeContext): any => { - return { - ...(input.HeaderParameters != null && { - HeaderParameters: se_HeaderParametersMap(input.HeaderParameters, context), - }), - ...(input.PathParameterValues != null && { - PathParameterValues: se_PathParameterList(input.PathParameterValues, context), - }), - ...(input.QueryStringParameters != null && { - QueryStringParameters: se_QueryStringParametersMap(input.QueryStringParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1InputTransformer - */ -const se_InputTransformer = (input: InputTransformer, context: __SerdeContext): any => { - return { - ...(input.InputPathsMap != null && { InputPathsMap: se_TransformerPaths(input.InputPathsMap, context) }), - ...(input.InputTemplate != null && { InputTemplate: input.InputTemplate }), - }; -}; - -/** - * serializeAws_json1_1KinesisParameters - */ -const se_KinesisParameters = (input: KinesisParameters, context: __SerdeContext): any => { - return { - ...(input.PartitionKeyPath != null && { PartitionKeyPath: input.PartitionKeyPath }), - }; -}; - -/** - * serializeAws_json1_1ListApiDestinationsRequest - */ -const se_ListApiDestinationsRequest = (input: ListApiDestinationsRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListArchivesRequest - */ -const se_ListArchivesRequest = (input: ListArchivesRequest, context: __SerdeContext): any => { - return { - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_json1_1ListConnectionsRequest - */ -const se_ListConnectionsRequest = (input: ListConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionState != null && { ConnectionState: input.ConnectionState }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEndpointsRequest - */ -const se_ListEndpointsRequest = (input: ListEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEventBusesRequest - */ -const se_ListEventBusesRequest = (input: ListEventBusesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEventSourcesRequest - */ -const se_ListEventSourcesRequest = (input: ListEventSourcesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListPartnerEventSourceAccountsRequest - */ -const se_ListPartnerEventSourceAccountsRequest = ( - input: ListPartnerEventSourceAccountsRequest, - context: __SerdeContext -): any => { - return { - ...(input.EventSourceName != null && { EventSourceName: input.EventSourceName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListPartnerEventSourcesRequest - */ -const se_ListPartnerEventSourcesRequest = (input: ListPartnerEventSourcesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListReplaysRequest - */ -const se_ListReplaysRequest = (input: ListReplaysRequest, context: __SerdeContext): any => { - return { - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_json1_1ListRuleNamesByTargetRequest - */ -const se_ListRuleNamesByTargetRequest = (input: ListRuleNamesByTargetRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }; -}; - -/** - * serializeAws_json1_1ListRulesRequest - */ -const se_ListRulesRequest = (input: ListRulesRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; - -/** - * serializeAws_json1_1ListTargetsByRuleRequest - */ -const se_ListTargetsByRuleRequest = (input: ListTargetsByRuleRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Rule != null && { Rule: input.Rule }), - }; -}; - -/** - * serializeAws_json1_1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.awsvpcConfiguration != null && { - awsvpcConfiguration: se_AwsVpcConfiguration(input.awsvpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1PathParameterList - */ -const se_PathParameterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PlacementConstraint - */ -const se_PlacementConstraint = (input: PlacementConstraint, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1PlacementConstraints - */ -const se_PlacementConstraints = (input: PlacementConstraint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementConstraint(entry, context); - }); -}; - -/** - * serializeAws_json1_1PlacementStrategies - */ -const se_PlacementStrategies = (input: PlacementStrategy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementStrategy(entry, context); - }); -}; - -/** - * serializeAws_json1_1PlacementStrategy - */ -const se_PlacementStrategy = (input: PlacementStrategy, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1Primary - */ -const se_Primary = (input: Primary, context: __SerdeContext): any => { - return { - ...(input.HealthCheck != null && { HealthCheck: input.HealthCheck }), - }; -}; - -/** - * serializeAws_json1_1PutEventsRequest - */ -const se_PutEventsRequest = (input: PutEventsRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - ...(input.Entries != null && { Entries: se_PutEventsRequestEntryList(input.Entries, context) }), - }; -}; - -/** - * serializeAws_json1_1PutEventsRequestEntry - */ -const se_PutEventsRequestEntry = (input: PutEventsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.Detail != null && { Detail: input.Detail }), - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Resources != null && { Resources: se_EventResourceList(input.Resources, context) }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Time != null && { Time: Math.round(input.Time.getTime() / 1000) }), - ...(input.TraceHeader != null && { TraceHeader: input.TraceHeader }), - }; -}; - -/** - * serializeAws_json1_1PutEventsRequestEntryList - */ -const se_PutEventsRequestEntryList = (input: PutEventsRequestEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutEventsRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutPartnerEventsRequest - */ -const se_PutPartnerEventsRequest = (input: PutPartnerEventsRequest, context: __SerdeContext): any => { - return { - ...(input.Entries != null && { Entries: se_PutPartnerEventsRequestEntryList(input.Entries, context) }), - }; -}; - -/** - * serializeAws_json1_1PutPartnerEventsRequestEntry - */ -const se_PutPartnerEventsRequestEntry = (input: PutPartnerEventsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.Detail != null && { Detail: input.Detail }), - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.Resources != null && { Resources: se_EventResourceList(input.Resources, context) }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Time != null && { Time: Math.round(input.Time.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1PutPartnerEventsRequestEntryList - */ -const se_PutPartnerEventsRequestEntryList = (input: PutPartnerEventsRequestEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutPartnerEventsRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutPermissionRequest - */ -const se_PutPermissionRequest = (input: PutPermissionRequest, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Condition != null && { Condition: se_Condition(input.Condition, context) }), - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.Principal != null && { Principal: input.Principal }), - ...(input.StatementId != null && { StatementId: input.StatementId }), - }; -}; - -/** - * serializeAws_json1_1PutRuleRequest - */ -const se_PutRuleRequest = (input: PutRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.State != null && { State: input.State }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutTargetsRequest - */ -const se_PutTargetsRequest = (input: PutTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Rule != null && { Rule: input.Rule }), - ...(input.Targets != null && { Targets: se_TargetList(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1QueryStringParametersMap - */ -const se_QueryStringParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1RedshiftDataParameters - */ -const se_RedshiftDataParameters = (input: RedshiftDataParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }), - ...(input.Sql != null && { Sql: input.Sql }), - ...(input.Sqls != null && { Sqls: se_Sqls(input.Sqls, context) }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WithEvent != null && { WithEvent: input.WithEvent }), - }; -}; - -/** - * serializeAws_json1_1RemovePermissionRequest - */ -const se_RemovePermissionRequest = (input: RemovePermissionRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.RemoveAllPermissions != null && { RemoveAllPermissions: input.RemoveAllPermissions }), - ...(input.StatementId != null && { StatementId: input.StatementId }), - }; -}; - -/** - * serializeAws_json1_1RemoveTargetsRequest - */ -const se_RemoveTargetsRequest = (input: RemoveTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.EventBusName != null && { EventBusName: input.EventBusName }), - ...(input.Force != null && { Force: input.Force }), - ...(input.Ids != null && { Ids: se_TargetIdList(input.Ids, context) }), - ...(input.Rule != null && { Rule: input.Rule }), - }; -}; - -/** - * serializeAws_json1_1ReplayDestination - */ -const se_ReplayDestination = (input: ReplayDestination, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.FilterArns != null && { FilterArns: se_ReplayDestinationFilters(input.FilterArns, context) }), - }; -}; - -/** - * serializeAws_json1_1ReplayDestinationFilters - */ -const se_ReplayDestinationFilters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ReplicationConfig - */ -const se_ReplicationConfig = (input: ReplicationConfig, context: __SerdeContext): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_json1_1RetryPolicy - */ -const se_RetryPolicy = (input: RetryPolicy, context: __SerdeContext): any => { - return { - ...(input.MaximumEventAgeInSeconds != null && { MaximumEventAgeInSeconds: input.MaximumEventAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - }; -}; - -/** - * serializeAws_json1_1RoutingConfig - */ -const se_RoutingConfig = (input: RoutingConfig, context: __SerdeContext): any => { - return { - ...(input.FailoverConfig != null && { FailoverConfig: se_FailoverConfig(input.FailoverConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1RunCommandParameters - */ -const se_RunCommandParameters = (input: RunCommandParameters, context: __SerdeContext): any => { - return { - ...(input.RunCommandTargets != null && { - RunCommandTargets: se_RunCommandTargets(input.RunCommandTargets, context), - }), - }; -}; - -/** - * serializeAws_json1_1RunCommandTarget - */ -const se_RunCommandTarget = (input: RunCommandTarget, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_RunCommandTargetValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1RunCommandTargets - */ -const se_RunCommandTargets = (input: RunCommandTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RunCommandTarget(entry, context); - }); -}; - -/** - * serializeAws_json1_1RunCommandTargetValues - */ -const se_RunCommandTargetValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SageMakerPipelineParameter - */ -const se_SageMakerPipelineParameter = (input: SageMakerPipelineParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1SageMakerPipelineParameterList - */ -const se_SageMakerPipelineParameterList = (input: SageMakerPipelineParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SageMakerPipelineParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1SageMakerPipelineParameters - */ -const se_SageMakerPipelineParameters = (input: SageMakerPipelineParameters, context: __SerdeContext): any => { - return { - ...(input.PipelineParameterList != null && { - PipelineParameterList: se_SageMakerPipelineParameterList(input.PipelineParameterList, context), - }), - }; -}; - -/** - * serializeAws_json1_1Secondary - */ -const se_Secondary = (input: Secondary, context: __SerdeContext): any => { - return { - ...(input.Route != null && { Route: input.Route }), - }; -}; - -/** - * serializeAws_json1_1Sqls - */ -const se_Sqls = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SqsParameters - */ -const se_SqsParameters = (input: SqsParameters, context: __SerdeContext): any => { - return { - ...(input.MessageGroupId != null && { MessageGroupId: input.MessageGroupId }), - }; -}; - -/** - * serializeAws_json1_1StartReplayRequest - */ -const se_StartReplayRequest = (input: StartReplayRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Destination != null && { Destination: se_ReplayDestination(input.Destination, context) }), - ...(input.EventEndTime != null && { EventEndTime: Math.round(input.EventEndTime.getTime() / 1000) }), - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.EventStartTime != null && { EventStartTime: Math.round(input.EventStartTime.getTime() / 1000) }), - ...(input.ReplayName != null && { ReplayName: input.ReplayName }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.BatchParameters != null && { BatchParameters: se_BatchParameters(input.BatchParameters, context) }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.EcsParameters != null && { EcsParameters: se_EcsParameters(input.EcsParameters, context) }), - ...(input.HttpParameters != null && { HttpParameters: se_HttpParameters(input.HttpParameters, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Input != null && { Input: input.Input }), - ...(input.InputPath != null && { InputPath: input.InputPath }), - ...(input.InputTransformer != null && { InputTransformer: se_InputTransformer(input.InputTransformer, context) }), - ...(input.KinesisParameters != null && { - KinesisParameters: se_KinesisParameters(input.KinesisParameters, context), - }), - ...(input.RedshiftDataParameters != null && { - RedshiftDataParameters: se_RedshiftDataParameters(input.RedshiftDataParameters, context), - }), - ...(input.RetryPolicy != null && { RetryPolicy: se_RetryPolicy(input.RetryPolicy, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RunCommandParameters != null && { - RunCommandParameters: se_RunCommandParameters(input.RunCommandParameters, context), - }), - ...(input.SageMakerPipelineParameters != null && { - SageMakerPipelineParameters: se_SageMakerPipelineParameters(input.SageMakerPipelineParameters, context), - }), - ...(input.SqsParameters != null && { SqsParameters: se_SqsParameters(input.SqsParameters, context) }), - }; -}; - -/** - * serializeAws_json1_1TargetIdList - */ -const se_TargetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TargetList - */ -const se_TargetList = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; - -/** - * serializeAws_json1_1TestEventPatternRequest - */ -const se_TestEventPatternRequest = (input: TestEventPatternRequest, context: __SerdeContext): any => { - return { - ...(input.Event != null && { Event: input.Event }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - }; -}; - -/** - * serializeAws_json1_1TransformerPaths - */ -const se_TransformerPaths = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateApiDestinationRequest - */ -const se_UpdateApiDestinationRequest = (input: UpdateApiDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.InvocationEndpoint != null && { InvocationEndpoint: input.InvocationEndpoint }), - ...(input.InvocationRateLimitPerSecond != null && { - InvocationRateLimitPerSecond: input.InvocationRateLimitPerSecond, - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateArchiveRequest - */ -const se_UpdateArchiveRequest = (input: UpdateArchiveRequest, context: __SerdeContext): any => { - return { - ...(input.ArchiveName != null && { ArchiveName: input.ArchiveName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.RetentionDays != null && { RetentionDays: input.RetentionDays }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionApiKeyAuthRequestParameters - */ -const se_UpdateConnectionApiKeyAuthRequestParameters = ( - input: UpdateConnectionApiKeyAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyName != null && { ApiKeyName: input.ApiKeyName }), - ...(input.ApiKeyValue != null && { ApiKeyValue: input.ApiKeyValue }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionAuthRequestParameters - */ -const se_UpdateConnectionAuthRequestParameters = ( - input: UpdateConnectionAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ApiKeyAuthParameters != null && { - ApiKeyAuthParameters: se_UpdateConnectionApiKeyAuthRequestParameters(input.ApiKeyAuthParameters, context), - }), - ...(input.BasicAuthParameters != null && { - BasicAuthParameters: se_UpdateConnectionBasicAuthRequestParameters(input.BasicAuthParameters, context), - }), - ...(input.InvocationHttpParameters != null && { - InvocationHttpParameters: se_ConnectionHttpParameters(input.InvocationHttpParameters, context), - }), - ...(input.OAuthParameters != null && { - OAuthParameters: se_UpdateConnectionOAuthRequestParameters(input.OAuthParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionBasicAuthRequestParameters - */ -const se_UpdateConnectionBasicAuthRequestParameters = ( - input: UpdateConnectionBasicAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionOAuthClientRequestParameters - */ -const se_UpdateConnectionOAuthClientRequestParameters = ( - input: UpdateConnectionOAuthClientRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.ClientID != null && { ClientID: input.ClientID }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionOAuthRequestParameters - */ -const se_UpdateConnectionOAuthRequestParameters = ( - input: UpdateConnectionOAuthRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizationEndpoint != null && { AuthorizationEndpoint: input.AuthorizationEndpoint }), - ...(input.ClientParameters != null && { - ClientParameters: se_UpdateConnectionOAuthClientRequestParameters(input.ClientParameters, context), - }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.OAuthHttpParameters != null && { - OAuthHttpParameters: se_ConnectionHttpParameters(input.OAuthHttpParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionRequest - */ -const se_UpdateConnectionRequest = (input: UpdateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.AuthParameters != null && { - AuthParameters: se_UpdateConnectionAuthRequestParameters(input.AuthParameters, context), - }), - ...(input.AuthorizationType != null && { AuthorizationType: input.AuthorizationType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateEndpointRequest - */ -const se_UpdateEndpointRequest = (input: UpdateEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBuses != null && { EventBuses: se_EndpointEventBusList(input.EventBuses, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ReplicationConfig != null && { - ReplicationConfig: se_ReplicationConfig(input.ReplicationConfig, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RoutingConfig != null && { RoutingConfig: se_RoutingConfig(input.RoutingConfig, context) }), - }; -}; - -/** - * deserializeAws_json1_1ApiDestination - */ -const de_ApiDestination = (output: any, context: __SerdeContext): ApiDestination => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - ConnectionArn: __expectString(output.ConnectionArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HttpMethod: __expectString(output.HttpMethod), - InvocationEndpoint: __expectString(output.InvocationEndpoint), - InvocationRateLimitPerSecond: __expectInt32(output.InvocationRateLimitPerSecond), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ApiDestinationResponseList - */ -const de_ApiDestinationResponseList = (output: any, context: __SerdeContext): ApiDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApiDestination(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Archive - */ -const de_Archive = (output: any, context: __SerdeContext): Archive => { - return { - ArchiveName: __expectString(output.ArchiveName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EventCount: __expectLong(output.EventCount), - EventSourceArn: __expectString(output.EventSourceArn), - RetentionDays: __expectInt32(output.RetentionDays), - SizeBytes: __expectLong(output.SizeBytes), - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1ArchiveResponseList - */ -const de_ArchiveResponseList = (output: any, context: __SerdeContext): Archive[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Archive(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AwsVpcConfiguration - */ -const de_AwsVpcConfiguration = (output: any, context: __SerdeContext): AwsVpcConfiguration => { - return { - AssignPublicIp: __expectString(output.AssignPublicIp), - SecurityGroups: output.SecurityGroups != null ? de_StringList(output.SecurityGroups, context) : undefined, - Subnets: output.Subnets != null ? de_StringList(output.Subnets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchArrayProperties - */ -const de_BatchArrayProperties = (output: any, context: __SerdeContext): BatchArrayProperties => { - return { - Size: __expectInt32(output.Size), - } as any; -}; - -/** - * deserializeAws_json1_1BatchParameters - */ -const de_BatchParameters = (output: any, context: __SerdeContext): BatchParameters => { - return { - ArrayProperties: - output.ArrayProperties != null ? de_BatchArrayProperties(output.ArrayProperties, context) : undefined, - JobDefinition: __expectString(output.JobDefinition), - JobName: __expectString(output.JobName), - RetryStrategy: output.RetryStrategy != null ? de_BatchRetryStrategy(output.RetryStrategy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchRetryStrategy - */ -const de_BatchRetryStrategy = (output: any, context: __SerdeContext): BatchRetryStrategy => { - return { - Attempts: __expectInt32(output.Attempts), - } as any; -}; - -/** - * deserializeAws_json1_1CancelReplayResponse - */ -const de_CancelReplayResponse = (output: any, context: __SerdeContext): CancelReplayResponse => { - return { - ReplayArn: __expectString(output.ReplayArn), - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1CapacityProviderStrategy - */ -const de_CapacityProviderStrategy = (output: any, context: __SerdeContext): CapacityProviderStrategyItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CapacityProviderStrategyItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CapacityProviderStrategyItem - */ -const de_CapacityProviderStrategyItem = (output: any, context: __SerdeContext): CapacityProviderStrategyItem => { - return { - base: __expectInt32(output.base), - capacityProvider: __expectString(output.capacityProvider), - weight: __expectInt32(output.weight), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Connection - */ -const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - AuthorizationType: __expectString(output.AuthorizationType), - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionApiKeyAuthResponseParameters - */ -const de_ConnectionApiKeyAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionApiKeyAuthResponseParameters => { - return { - ApiKeyName: __expectString(output.ApiKeyName), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionAuthResponseParameters - */ -const de_ConnectionAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionAuthResponseParameters => { - return { - ApiKeyAuthParameters: - output.ApiKeyAuthParameters != null - ? de_ConnectionApiKeyAuthResponseParameters(output.ApiKeyAuthParameters, context) - : undefined, - BasicAuthParameters: - output.BasicAuthParameters != null - ? de_ConnectionBasicAuthResponseParameters(output.BasicAuthParameters, context) - : undefined, - InvocationHttpParameters: - output.InvocationHttpParameters != null - ? de_ConnectionHttpParameters(output.InvocationHttpParameters, context) - : undefined, - OAuthParameters: - output.OAuthParameters != null - ? de_ConnectionOAuthResponseParameters(output.OAuthParameters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionBasicAuthResponseParameters - */ -const de_ConnectionBasicAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionBasicAuthResponseParameters => { - return { - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionBodyParameter - */ -const de_ConnectionBodyParameter = (output: any, context: __SerdeContext): ConnectionBodyParameter => { - return { - IsValueSecret: __expectBoolean(output.IsValueSecret), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionBodyParametersList - */ -const de_ConnectionBodyParametersList = (output: any, context: __SerdeContext): ConnectionBodyParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionBodyParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionHeaderParameter - */ -const de_ConnectionHeaderParameter = (output: any, context: __SerdeContext): ConnectionHeaderParameter => { - return { - IsValueSecret: __expectBoolean(output.IsValueSecret), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionHeaderParametersList - */ -const de_ConnectionHeaderParametersList = (output: any, context: __SerdeContext): ConnectionHeaderParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionHeaderParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionHttpParameters - */ -const de_ConnectionHttpParameters = (output: any, context: __SerdeContext): ConnectionHttpParameters => { - return { - BodyParameters: - output.BodyParameters != null ? de_ConnectionBodyParametersList(output.BodyParameters, context) : undefined, - HeaderParameters: - output.HeaderParameters != null ? de_ConnectionHeaderParametersList(output.HeaderParameters, context) : undefined, - QueryStringParameters: - output.QueryStringParameters != null - ? de_ConnectionQueryStringParametersList(output.QueryStringParameters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionOAuthClientResponseParameters - */ -const de_ConnectionOAuthClientResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionOAuthClientResponseParameters => { - return { - ClientID: __expectString(output.ClientID), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionOAuthResponseParameters - */ -const de_ConnectionOAuthResponseParameters = ( - output: any, - context: __SerdeContext -): ConnectionOAuthResponseParameters => { - return { - AuthorizationEndpoint: __expectString(output.AuthorizationEndpoint), - ClientParameters: - output.ClientParameters != null - ? de_ConnectionOAuthClientResponseParameters(output.ClientParameters, context) - : undefined, - HttpMethod: __expectString(output.HttpMethod), - OAuthHttpParameters: - output.OAuthHttpParameters != null ? de_ConnectionHttpParameters(output.OAuthHttpParameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionQueryStringParameter - */ -const de_ConnectionQueryStringParameter = (output: any, context: __SerdeContext): ConnectionQueryStringParameter => { - return { - IsValueSecret: __expectBoolean(output.IsValueSecret), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionQueryStringParametersList - */ -const de_ConnectionQueryStringParametersList = ( - output: any, - context: __SerdeContext -): ConnectionQueryStringParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionQueryStringParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionResponseList - */ -const de_ConnectionResponseList = (output: any, context: __SerdeContext): Connection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connection(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateApiDestinationResponse - */ -const de_CreateApiDestinationResponse = (output: any, context: __SerdeContext): CreateApiDestinationResponse => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateArchiveResponse - */ -const de_CreateArchiveResponse = (output: any, context: __SerdeContext): CreateArchiveResponse => { - return { - ArchiveArn: __expectString(output.ArchiveArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1CreateConnectionResponse - */ -const de_CreateConnectionResponse = (output: any, context: __SerdeContext): CreateConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateEndpointResponse - */ -const de_CreateEndpointResponse = (output: any, context: __SerdeContext): CreateEndpointResponse => { - return { - Arn: __expectString(output.Arn), - EventBuses: output.EventBuses != null ? de_EndpointEventBusList(output.EventBuses, context) : undefined, - Name: __expectString(output.Name), - ReplicationConfig: - output.ReplicationConfig != null ? de_ReplicationConfig(output.ReplicationConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - RoutingConfig: output.RoutingConfig != null ? de_RoutingConfig(output.RoutingConfig, context) : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1CreateEventBusResponse - */ -const de_CreateEventBusResponse = (output: any, context: __SerdeContext): CreateEventBusResponse => { - return { - EventBusArn: __expectString(output.EventBusArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePartnerEventSourceResponse - */ -const de_CreatePartnerEventSourceResponse = ( - output: any, - context: __SerdeContext -): CreatePartnerEventSourceResponse => { - return { - EventSourceArn: __expectString(output.EventSourceArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeadLetterConfig - */ -const de_DeadLetterConfig = (output: any, context: __SerdeContext): DeadLetterConfig => { - return { - Arn: __expectString(output.Arn), - } as any; -}; - -/** - * deserializeAws_json1_1DeauthorizeConnectionResponse - */ -const de_DeauthorizeConnectionResponse = (output: any, context: __SerdeContext): DeauthorizeConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteApiDestinationResponse - */ -const de_DeleteApiDestinationResponse = (output: any, context: __SerdeContext): DeleteApiDestinationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteArchiveResponse - */ -const de_DeleteArchiveResponse = (output: any, context: __SerdeContext): DeleteArchiveResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteConnectionResponse - */ -const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteEndpointResponse - */ -const de_DeleteEndpointResponse = (output: any, context: __SerdeContext): DeleteEndpointResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeApiDestinationResponse - */ -const de_DescribeApiDestinationResponse = (output: any, context: __SerdeContext): DescribeApiDestinationResponse => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - ConnectionArn: __expectString(output.ConnectionArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - HttpMethod: __expectString(output.HttpMethod), - InvocationEndpoint: __expectString(output.InvocationEndpoint), - InvocationRateLimitPerSecond: __expectInt32(output.InvocationRateLimitPerSecond), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeArchiveResponse - */ -const de_DescribeArchiveResponse = (output: any, context: __SerdeContext): DescribeArchiveResponse => { - return { - ArchiveArn: __expectString(output.ArchiveArn), - ArchiveName: __expectString(output.ArchiveName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EventCount: __expectLong(output.EventCount), - EventPattern: __expectString(output.EventPattern), - EventSourceArn: __expectString(output.EventSourceArn), - RetentionDays: __expectInt32(output.RetentionDays), - SizeBytes: __expectLong(output.SizeBytes), - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectionResponse - */ -const de_DescribeConnectionResponse = (output: any, context: __SerdeContext): DescribeConnectionResponse => { - return { - AuthParameters: - output.AuthParameters != null ? de_ConnectionAuthResponseParameters(output.AuthParameters, context) : undefined, - AuthorizationType: __expectString(output.AuthorizationType), - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - SecretArn: __expectString(output.SecretArn), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEndpointResponse - */ -const de_DescribeEndpointResponse = (output: any, context: __SerdeContext): DescribeEndpointResponse => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EndpointId: __expectString(output.EndpointId), - EndpointUrl: __expectString(output.EndpointUrl), - EventBuses: output.EventBuses != null ? de_EndpointEventBusList(output.EventBuses, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - ReplicationConfig: - output.ReplicationConfig != null ? de_ReplicationConfig(output.ReplicationConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - RoutingConfig: output.RoutingConfig != null ? de_RoutingConfig(output.RoutingConfig, context) : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEventBusResponse - */ -const de_DescribeEventBusResponse = (output: any, context: __SerdeContext): DescribeEventBusResponse => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - Policy: __expectString(output.Policy), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEventSourceResponse - */ -const de_DescribeEventSourceResponse = (output: any, context: __SerdeContext): DescribeEventSourceResponse => { - return { - Arn: __expectString(output.Arn), - CreatedBy: __expectString(output.CreatedBy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePartnerEventSourceResponse - */ -const de_DescribePartnerEventSourceResponse = ( - output: any, - context: __SerdeContext -): DescribePartnerEventSourceResponse => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeReplayResponse - */ -const de_DescribeReplayResponse = (output: any, context: __SerdeContext): DescribeReplayResponse => { - return { - Description: __expectString(output.Description), - Destination: output.Destination != null ? de_ReplayDestination(output.Destination, context) : undefined, - EventEndTime: - output.EventEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventEndTime))) - : undefined, - EventLastReplayedTime: - output.EventLastReplayedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventLastReplayedTime))) - : undefined, - EventSourceArn: __expectString(output.EventSourceArn), - EventStartTime: - output.EventStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventStartTime))) - : undefined, - ReplayArn: __expectString(output.ReplayArn), - ReplayEndTime: - output.ReplayEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayEndTime))) - : undefined, - ReplayName: __expectString(output.ReplayName), - ReplayStartTime: - output.ReplayStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayStartTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRuleResponse - */ -const de_DescribeRuleResponse = (output: any, context: __SerdeContext): DescribeRuleResponse => { - return { - Arn: __expectString(output.Arn), - CreatedBy: __expectString(output.CreatedBy), - Description: __expectString(output.Description), - EventBusName: __expectString(output.EventBusName), - EventPattern: __expectString(output.EventPattern), - ManagedBy: __expectString(output.ManagedBy), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - ScheduleExpression: __expectString(output.ScheduleExpression), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1EcsParameters - */ -const de_EcsParameters = (output: any, context: __SerdeContext): EcsParameters => { - return { - CapacityProviderStrategy: - output.CapacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.CapacityProviderStrategy, context) - : undefined, - EnableECSManagedTags: __expectBoolean(output.EnableECSManagedTags), - EnableExecuteCommand: __expectBoolean(output.EnableExecuteCommand), - Group: __expectString(output.Group), - LaunchType: __expectString(output.LaunchType), - NetworkConfiguration: - output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined, - PlacementConstraints: - output.PlacementConstraints != null ? de_PlacementConstraints(output.PlacementConstraints, context) : undefined, - PlacementStrategy: - output.PlacementStrategy != null ? de_PlacementStrategies(output.PlacementStrategy, context) : undefined, - PlatformVersion: __expectString(output.PlatformVersion), - PropagateTags: __expectString(output.PropagateTags), - ReferenceId: __expectString(output.ReferenceId), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TaskCount: __expectInt32(output.TaskCount), - TaskDefinitionArn: __expectString(output.TaskDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EndpointId: __expectString(output.EndpointId), - EndpointUrl: __expectString(output.EndpointUrl), - EventBuses: output.EventBuses != null ? de_EndpointEventBusList(output.EventBuses, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - ReplicationConfig: - output.ReplicationConfig != null ? de_ReplicationConfig(output.ReplicationConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - RoutingConfig: output.RoutingConfig != null ? de_RoutingConfig(output.RoutingConfig, context) : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1EndpointEventBus - */ -const de_EndpointEventBus = (output: any, context: __SerdeContext): EndpointEventBus => { - return { - EventBusArn: __expectString(output.EventBusArn), - } as any; -}; - -/** - * deserializeAws_json1_1EndpointEventBusList - */ -const de_EndpointEventBusList = (output: any, context: __SerdeContext): EndpointEventBus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointEventBus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EndpointList - */ -const de_EndpointList = (output: any, context: __SerdeContext): Endpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Endpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventBus - */ -const de_EventBus = (output: any, context: __SerdeContext): EventBus => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - Policy: __expectString(output.Policy), - } as any; -}; - -/** - * deserializeAws_json1_1EventBusList - */ -const de_EventBusList = (output: any, context: __SerdeContext): EventBus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventBus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventSource - */ -const de_EventSource = (output: any, context: __SerdeContext): EventSource => { - return { - Arn: __expectString(output.Arn), - CreatedBy: __expectString(output.CreatedBy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1EventSourceList - */ -const de_EventSourceList = (output: any, context: __SerdeContext): EventSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailoverConfig - */ -const de_FailoverConfig = (output: any, context: __SerdeContext): FailoverConfig => { - return { - Primary: output.Primary != null ? de_Primary(output.Primary, context) : undefined, - Secondary: output.Secondary != null ? de_Secondary(output.Secondary, context) : undefined, - } as any; -}; +// se_EnableRuleRequest omitted. -/** - * deserializeAws_json1_1HeaderParametersMap - */ -const de_HeaderParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_EndpointEventBus omitted. -/** - * deserializeAws_json1_1HttpParameters - */ -const de_HttpParameters = (output: any, context: __SerdeContext): HttpParameters => { - return { - HeaderParameters: - output.HeaderParameters != null ? de_HeaderParametersMap(output.HeaderParameters, context) : undefined, - PathParameterValues: - output.PathParameterValues != null ? de_PathParameterList(output.PathParameterValues, context) : undefined, - QueryStringParameters: - output.QueryStringParameters != null - ? de_QueryStringParametersMap(output.QueryStringParameters, context) - : undefined, - } as any; -}; +// se_EndpointEventBusList omitted. -/** - * deserializeAws_json1_1IllegalStatusException - */ -const de_IllegalStatusException = (output: any, context: __SerdeContext): IllegalStatusException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_EventResourceList omitted. -/** - * deserializeAws_json1_1InputTransformer - */ -const de_InputTransformer = (output: any, context: __SerdeContext): InputTransformer => { - return { - InputPathsMap: output.InputPathsMap != null ? de_TransformerPaths(output.InputPathsMap, context) : undefined, - InputTemplate: __expectString(output.InputTemplate), - } as any; -}; +// se_FailoverConfig omitted. -/** - * deserializeAws_json1_1InternalException - */ -const de_InternalException = (output: any, context: __SerdeContext): InternalException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_HeaderParametersMap omitted. -/** - * deserializeAws_json1_1InvalidEventPatternException - */ -const de_InvalidEventPatternException = (output: any, context: __SerdeContext): InvalidEventPatternException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_HttpParameters omitted. -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_InputTransformer omitted. -/** - * deserializeAws_json1_1KinesisParameters - */ -const de_KinesisParameters = (output: any, context: __SerdeContext): KinesisParameters => { - return { - PartitionKeyPath: __expectString(output.PartitionKeyPath), - } as any; -}; +// se_KinesisParameters omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ListApiDestinationsRequest omitted. -/** - * deserializeAws_json1_1ListApiDestinationsResponse - */ -const de_ListApiDestinationsResponse = (output: any, context: __SerdeContext): ListApiDestinationsResponse => { - return { - ApiDestinations: - output.ApiDestinations != null ? de_ApiDestinationResponseList(output.ApiDestinations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListArchivesRequest omitted. -/** - * deserializeAws_json1_1ListArchivesResponse - */ -const de_ListArchivesResponse = (output: any, context: __SerdeContext): ListArchivesResponse => { - return { - Archives: output.Archives != null ? de_ArchiveResponseList(output.Archives, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListConnectionsRequest omitted. -/** - * deserializeAws_json1_1ListConnectionsResponse - */ -const de_ListConnectionsResponse = (output: any, context: __SerdeContext): ListConnectionsResponse => { - return { - Connections: output.Connections != null ? de_ConnectionResponseList(output.Connections, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListEndpointsRequest omitted. -/** - * deserializeAws_json1_1ListEndpointsResponse - */ -const de_ListEndpointsResponse = (output: any, context: __SerdeContext): ListEndpointsResponse => { - return { - Endpoints: output.Endpoints != null ? de_EndpointList(output.Endpoints, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListEventBusesRequest omitted. -/** - * deserializeAws_json1_1ListEventBusesResponse - */ -const de_ListEventBusesResponse = (output: any, context: __SerdeContext): ListEventBusesResponse => { - return { - EventBuses: output.EventBuses != null ? de_EventBusList(output.EventBuses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListEventSourcesRequest omitted. -/** - * deserializeAws_json1_1ListEventSourcesResponse - */ -const de_ListEventSourcesResponse = (output: any, context: __SerdeContext): ListEventSourcesResponse => { - return { - EventSources: output.EventSources != null ? de_EventSourceList(output.EventSources, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListPartnerEventSourceAccountsRequest omitted. -/** - * deserializeAws_json1_1ListPartnerEventSourceAccountsResponse - */ -const de_ListPartnerEventSourceAccountsResponse = ( - output: any, - context: __SerdeContext -): ListPartnerEventSourceAccountsResponse => { - return { - NextToken: __expectString(output.NextToken), - PartnerEventSourceAccounts: - output.PartnerEventSourceAccounts != null - ? de_PartnerEventSourceAccountList(output.PartnerEventSourceAccounts, context) - : undefined, - } as any; -}; +// se_ListPartnerEventSourcesRequest omitted. -/** - * deserializeAws_json1_1ListPartnerEventSourcesResponse - */ -const de_ListPartnerEventSourcesResponse = (output: any, context: __SerdeContext): ListPartnerEventSourcesResponse => { - return { - NextToken: __expectString(output.NextToken), - PartnerEventSources: - output.PartnerEventSources != null ? de_PartnerEventSourceList(output.PartnerEventSources, context) : undefined, - } as any; -}; +// se_ListReplaysRequest omitted. -/** - * deserializeAws_json1_1ListReplaysResponse - */ -const de_ListReplaysResponse = (output: any, context: __SerdeContext): ListReplaysResponse => { - return { - NextToken: __expectString(output.NextToken), - Replays: output.Replays != null ? de_ReplayList(output.Replays, context) : undefined, - } as any; -}; +// se_ListRuleNamesByTargetRequest omitted. -/** - * deserializeAws_json1_1ListRuleNamesByTargetResponse - */ -const de_ListRuleNamesByTargetResponse = (output: any, context: __SerdeContext): ListRuleNamesByTargetResponse => { - return { - NextToken: __expectString(output.NextToken), - RuleNames: output.RuleNames != null ? de_RuleNameList(output.RuleNames, context) : undefined, - } as any; -}; +// se_ListRulesRequest omitted. -/** - * deserializeAws_json1_1ListRulesResponse - */ -const de_ListRulesResponse = (output: any, context: __SerdeContext): ListRulesResponse => { - return { - NextToken: __expectString(output.NextToken), - Rules: output.Rules != null ? de_RuleResponseList(output.Rules, context) : undefined, - } as any; -}; +// se_ListTagsForResourceRequest omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// se_ListTargetsByRuleRequest omitted. -/** - * deserializeAws_json1_1ListTargetsByRuleResponse - */ -const de_ListTargetsByRuleResponse = (output: any, context: __SerdeContext): ListTargetsByRuleResponse => { - return { - NextToken: __expectString(output.NextToken), - Targets: output.Targets != null ? de_TargetList(output.Targets, context) : undefined, - } as any; -}; +// se_NetworkConfiguration omitted. -/** - * deserializeAws_json1_1ManagedRuleException - */ -const de_ManagedRuleException = (output: any, context: __SerdeContext): ManagedRuleException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PathParameterList omitted. -/** - * deserializeAws_json1_1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - awsvpcConfiguration: - output.awsvpcConfiguration != null ? de_AwsVpcConfiguration(output.awsvpcConfiguration, context) : undefined, - } as any; -}; +// se_PlacementConstraint omitted. -/** - * deserializeAws_json1_1OperationDisabledException - */ -const de_OperationDisabledException = (output: any, context: __SerdeContext): OperationDisabledException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PlacementConstraints omitted. -/** - * deserializeAws_json1_1PartnerEventSource - */ -const de_PartnerEventSource = (output: any, context: __SerdeContext): PartnerEventSource => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// se_PlacementStrategies omitted. -/** - * deserializeAws_json1_1PartnerEventSourceAccount - */ -const de_PartnerEventSourceAccount = (output: any, context: __SerdeContext): PartnerEventSourceAccount => { - return { - Account: __expectString(output.Account), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - State: __expectString(output.State), - } as any; -}; +// se_PlacementStrategy omitted. + +// se_Primary omitted. /** - * deserializeAws_json1_1PartnerEventSourceAccountList + * serializeAws_json1_1PutEventsRequest */ -const de_PartnerEventSourceAccountList = (output: any, context: __SerdeContext): PartnerEventSourceAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartnerEventSourceAccount(entry, context); - }); - return retVal; +const se_PutEventsRequest = (input: PutEventsRequest, context: __SerdeContext): any => { + return take(input, { + EndpointId: [], + Entries: (_) => se_PutEventsRequestEntryList(_, context), + }); }; /** - * deserializeAws_json1_1PartnerEventSourceList + * serializeAws_json1_1PutEventsRequestEntry */ -const de_PartnerEventSourceList = (output: any, context: __SerdeContext): PartnerEventSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartnerEventSource(entry, context); - }); - return retVal; +const se_PutEventsRequestEntry = (input: PutEventsRequestEntry, context: __SerdeContext): any => { + return take(input, { + Detail: [], + DetailType: [], + EventBusName: [], + Resources: _json, + Source: [], + Time: (_) => Math.round(_.getTime() / 1000), + TraceHeader: [], + }); }; /** - * deserializeAws_json1_1PathParameterList + * serializeAws_json1_1PutEventsRequestEntryList */ -const de_PathParameterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) +const se_PutEventsRequestEntryList = (input: PutEventsRequestEntry[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + .map((entry) => { + return se_PutEventsRequestEntry(entry, context); }); - return retVal; }; /** - * deserializeAws_json1_1PlacementConstraint + * serializeAws_json1_1PutPartnerEventsRequest */ -const de_PlacementConstraint = (output: any, context: __SerdeContext): PlacementConstraint => { - return { - expression: __expectString(output.expression), - type: __expectString(output.type), - } as any; +const se_PutPartnerEventsRequest = (input: PutPartnerEventsRequest, context: __SerdeContext): any => { + return take(input, { + Entries: (_) => se_PutPartnerEventsRequestEntryList(_, context), + }); }; /** - * deserializeAws_json1_1PlacementConstraints + * serializeAws_json1_1PutPartnerEventsRequestEntry */ -const de_PlacementConstraints = (output: any, context: __SerdeContext): PlacementConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementConstraint(entry, context); - }); - return retVal; +const se_PutPartnerEventsRequestEntry = (input: PutPartnerEventsRequestEntry, context: __SerdeContext): any => { + return take(input, { + Detail: [], + DetailType: [], + Resources: _json, + Source: [], + Time: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * deserializeAws_json1_1PlacementStrategies + * serializeAws_json1_1PutPartnerEventsRequestEntryList */ -const de_PlacementStrategies = (output: any, context: __SerdeContext): PlacementStrategy[] => { - const retVal = (output || []) +const se_PutPartnerEventsRequestEntryList = (input: PutPartnerEventsRequestEntry[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementStrategy(entry, context); + .map((entry) => { + return se_PutPartnerEventsRequestEntry(entry, context); }); - return retVal; }; -/** - * deserializeAws_json1_1PlacementStrategy - */ -const de_PlacementStrategy = (output: any, context: __SerdeContext): PlacementStrategy => { - return { - field: __expectString(output.field), - type: __expectString(output.type), - } as any; -}; +// se_PutPermissionRequest omitted. -/** - * deserializeAws_json1_1PolicyLengthExceededException - */ -const de_PolicyLengthExceededException = (output: any, context: __SerdeContext): PolicyLengthExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_PutRuleRequest omitted. -/** - * deserializeAws_json1_1Primary - */ -const de_Primary = (output: any, context: __SerdeContext): Primary => { - return { - HealthCheck: __expectString(output.HealthCheck), - } as any; -}; +// se_PutTargetsRequest omitted. -/** - * deserializeAws_json1_1PutEventsResponse - */ -const de_PutEventsResponse = (output: any, context: __SerdeContext): PutEventsResponse => { - return { - Entries: output.Entries != null ? de_PutEventsResultEntryList(output.Entries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; +// se_QueryStringParametersMap omitted. -/** - * deserializeAws_json1_1PutEventsResultEntry - */ -const de_PutEventsResultEntry = (output: any, context: __SerdeContext): PutEventsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - EventId: __expectString(output.EventId), - } as any; -}; +// se_RedshiftDataParameters omitted. -/** - * deserializeAws_json1_1PutEventsResultEntryList - */ -const de_PutEventsResultEntryList = (output: any, context: __SerdeContext): PutEventsResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutEventsResultEntry(entry, context); - }); - return retVal; -}; +// se_RemovePermissionRequest omitted. -/** - * deserializeAws_json1_1PutPartnerEventsResponse - */ -const de_PutPartnerEventsResponse = (output: any, context: __SerdeContext): PutPartnerEventsResponse => { - return { - Entries: output.Entries != null ? de_PutPartnerEventsResultEntryList(output.Entries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; +// se_RemoveTargetsRequest omitted. -/** - * deserializeAws_json1_1PutPartnerEventsResultEntry - */ -const de_PutPartnerEventsResultEntry = (output: any, context: __SerdeContext): PutPartnerEventsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - EventId: __expectString(output.EventId), - } as any; -}; +// se_ReplayDestination omitted. -/** - * deserializeAws_json1_1PutPartnerEventsResultEntryList - */ -const de_PutPartnerEventsResultEntryList = (output: any, context: __SerdeContext): PutPartnerEventsResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutPartnerEventsResultEntry(entry, context); - }); - return retVal; -}; +// se_ReplayDestinationFilters omitted. -/** - * deserializeAws_json1_1PutRuleResponse - */ -const de_PutRuleResponse = (output: any, context: __SerdeContext): PutRuleResponse => { - return { - RuleArn: __expectString(output.RuleArn), - } as any; -}; +// se_ReplicationConfig omitted. -/** - * deserializeAws_json1_1PutTargetsResponse - */ -const de_PutTargetsResponse = (output: any, context: __SerdeContext): PutTargetsResponse => { - return { - FailedEntries: - output.FailedEntries != null ? de_PutTargetsResultEntryList(output.FailedEntries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; -}; +// se_RetryPolicy omitted. -/** - * deserializeAws_json1_1PutTargetsResultEntry - */ -const de_PutTargetsResultEntry = (output: any, context: __SerdeContext): PutTargetsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - TargetId: __expectString(output.TargetId), - } as any; -}; +// se_RoutingConfig omitted. -/** - * deserializeAws_json1_1PutTargetsResultEntryList - */ -const de_PutTargetsResultEntryList = (output: any, context: __SerdeContext): PutTargetsResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutTargetsResultEntry(entry, context); - }); - return retVal; -}; +// se_RunCommandParameters omitted. -/** - * deserializeAws_json1_1QueryStringParametersMap - */ -const de_QueryStringParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_RunCommandTarget omitted. -/** - * deserializeAws_json1_1RedshiftDataParameters - */ -const de_RedshiftDataParameters = (output: any, context: __SerdeContext): RedshiftDataParameters => { - return { - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - SecretManagerArn: __expectString(output.SecretManagerArn), - Sql: __expectString(output.Sql), - Sqls: output.Sqls != null ? de_Sqls(output.Sqls, context) : undefined, - StatementName: __expectString(output.StatementName), - WithEvent: __expectBoolean(output.WithEvent), - } as any; -}; +// se_RunCommandTargets omitted. + +// se_RunCommandTargetValues omitted. + +// se_SageMakerPipelineParameter omitted. + +// se_SageMakerPipelineParameterList omitted. + +// se_SageMakerPipelineParameters omitted. + +// se_Secondary omitted. + +// se_Sqls omitted. + +// se_SqsParameters omitted. /** - * deserializeAws_json1_1RemoveTargetsResponse + * serializeAws_json1_1StartReplayRequest */ -const de_RemoveTargetsResponse = (output: any, context: __SerdeContext): RemoveTargetsResponse => { - return { - FailedEntries: - output.FailedEntries != null ? de_RemoveTargetsResultEntryList(output.FailedEntries, context) : undefined, - FailedEntryCount: __expectInt32(output.FailedEntryCount), - } as any; +const se_StartReplayRequest = (input: StartReplayRequest, context: __SerdeContext): any => { + return take(input, { + Description: [], + Destination: _json, + EventEndTime: (_) => Math.round(_.getTime() / 1000), + EventSourceArn: [], + EventStartTime: (_) => Math.round(_.getTime() / 1000), + ReplayName: [], + }); }; +// se_StringList omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_Target omitted. + +// se_TargetIdList omitted. + +// se_TargetList omitted. + +// se_TestEventPatternRequest omitted. + +// se_TransformerPaths omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateApiDestinationRequest omitted. + +// se_UpdateArchiveRequest omitted. + +// se_UpdateConnectionApiKeyAuthRequestParameters omitted. + +// se_UpdateConnectionAuthRequestParameters omitted. + +// se_UpdateConnectionBasicAuthRequestParameters omitted. + +// se_UpdateConnectionOAuthClientRequestParameters omitted. + +// se_UpdateConnectionOAuthRequestParameters omitted. + +// se_UpdateConnectionRequest omitted. + +// se_UpdateEndpointRequest omitted. + /** - * deserializeAws_json1_1RemoveTargetsResultEntry + * deserializeAws_json1_1ApiDestination */ -const de_RemoveTargetsResultEntry = (output: any, context: __SerdeContext): RemoveTargetsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - TargetId: __expectString(output.TargetId), - } as any; +const de_ApiDestination = (output: any, context: __SerdeContext): ApiDestination => { + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + ConnectionArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpMethod: __expectString, + InvocationEndpoint: __expectString, + InvocationRateLimitPerSecond: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RemoveTargetsResultEntryList + * deserializeAws_json1_1ApiDestinationResponseList */ -const de_RemoveTargetsResultEntryList = (output: any, context: __SerdeContext): RemoveTargetsResultEntry[] => { +const de_ApiDestinationResponseList = (output: any, context: __SerdeContext): ApiDestination[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemoveTargetsResultEntry(entry, context); + return de_ApiDestination(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Replay + * deserializeAws_json1_1Archive */ -const de_Replay = (output: any, context: __SerdeContext): Replay => { - return { - EventEndTime: - output.EventEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventEndTime))) - : undefined, - EventLastReplayedTime: - output.EventLastReplayedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventLastReplayedTime))) - : undefined, - EventSourceArn: __expectString(output.EventSourceArn), - EventStartTime: - output.EventStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventStartTime))) - : undefined, - ReplayEndTime: - output.ReplayEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayEndTime))) - : undefined, - ReplayName: __expectString(output.ReplayName), - ReplayStartTime: - output.ReplayStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayStartTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; -}; - -/** - * deserializeAws_json1_1ReplayDestination - */ -const de_ReplayDestination = (output: any, context: __SerdeContext): ReplayDestination => { - return { - Arn: __expectString(output.Arn), - FilterArns: output.FilterArns != null ? de_ReplayDestinationFilters(output.FilterArns, context) : undefined, - } as any; +const de_Archive = (output: any, context: __SerdeContext): Archive => { + return take(output, { + ArchiveName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventCount: __expectLong, + EventSourceArn: __expectString, + RetentionDays: __expectInt32, + SizeBytes: __expectLong, + State: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ReplayDestinationFilters + * deserializeAws_json1_1ArchiveResponseList */ -const de_ReplayDestinationFilters = (output: any, context: __SerdeContext): string[] => { +const de_ArchiveResponseList = (output: any, context: __SerdeContext): Archive[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Archive(entry, context); }); return retVal; }; +// de_AwsVpcConfiguration omitted. + +// de_BatchArrayProperties omitted. + +// de_BatchParameters omitted. + +// de_BatchRetryStrategy omitted. + +// de_CancelReplayResponse omitted. + +// de_CapacityProviderStrategy omitted. + +// de_CapacityProviderStrategyItem omitted. + +// de_ConcurrentModificationException omitted. + /** - * deserializeAws_json1_1ReplayList + * deserializeAws_json1_1Connection */ -const de_ReplayList = (output: any, context: __SerdeContext): Replay[] => { +const de_Connection = (output: any, context: __SerdeContext): Connection => { + return take(output, { + AuthorizationType: __expectString, + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + StateReason: __expectString, + }) as any; +}; + +// de_ConnectionApiKeyAuthResponseParameters omitted. + +// de_ConnectionAuthResponseParameters omitted. + +// de_ConnectionBasicAuthResponseParameters omitted. + +// de_ConnectionBodyParameter omitted. + +// de_ConnectionBodyParametersList omitted. + +// de_ConnectionHeaderParameter omitted. + +// de_ConnectionHeaderParametersList omitted. + +// de_ConnectionHttpParameters omitted. + +// de_ConnectionOAuthClientResponseParameters omitted. + +// de_ConnectionOAuthResponseParameters omitted. + +// de_ConnectionQueryStringParameter omitted. + +// de_ConnectionQueryStringParametersList omitted. + +/** + * deserializeAws_json1_1ConnectionResponseList + */ +const de_ConnectionResponseList = (output: any, context: __SerdeContext): Connection[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Replay(entry, context); + return de_Connection(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ReplicationConfig + * deserializeAws_json1_1CreateApiDestinationResponse */ -const de_ReplicationConfig = (output: any, context: __SerdeContext): ReplicationConfig => { - return { - State: __expectString(output.State), - } as any; +const de_CreateApiDestinationResponse = (output: any, context: __SerdeContext): CreateApiDestinationResponse => { + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ResourceAlreadyExistsException + * deserializeAws_json1_1CreateArchiveResponse */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateArchiveResponse = (output: any, context: __SerdeContext): CreateArchiveResponse => { + return take(output, { + ArchiveArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1CreateConnectionResponse */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateConnectionResponse = (output: any, context: __SerdeContext): CreateConnectionResponse => { + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_CreateEndpointResponse omitted. + +// de_CreateEventBusResponse omitted. + +// de_CreatePartnerEventSourceResponse omitted. + +// de_DeadLetterConfig omitted. + /** - * deserializeAws_json1_1RetryPolicy + * deserializeAws_json1_1DeauthorizeConnectionResponse */ -const de_RetryPolicy = (output: any, context: __SerdeContext): RetryPolicy => { - return { - MaximumEventAgeInSeconds: __expectInt32(output.MaximumEventAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - } as any; +const de_DeauthorizeConnectionResponse = (output: any, context: __SerdeContext): DeauthorizeConnectionResponse => { + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DeleteApiDestinationResponse omitted. + +// de_DeleteArchiveResponse omitted. + /** - * deserializeAws_json1_1RoutingConfig + * deserializeAws_json1_1DeleteConnectionResponse */ -const de_RoutingConfig = (output: any, context: __SerdeContext): RoutingConfig => { - return { - FailoverConfig: output.FailoverConfig != null ? de_FailoverConfig(output.FailoverConfig, context) : undefined, - } as any; +const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DeleteEndpointResponse omitted. + /** - * deserializeAws_json1_1Rule + * deserializeAws_json1_1DescribeApiDestinationResponse */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - EventBusName: __expectString(output.EventBusName), - EventPattern: __expectString(output.EventPattern), - ManagedBy: __expectString(output.ManagedBy), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - ScheduleExpression: __expectString(output.ScheduleExpression), - State: __expectString(output.State), - } as any; +const de_DescribeApiDestinationResponse = (output: any, context: __SerdeContext): DescribeApiDestinationResponse => { + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + ConnectionArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + HttpMethod: __expectString, + InvocationEndpoint: __expectString, + InvocationRateLimitPerSecond: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RuleNameList + * deserializeAws_json1_1DescribeArchiveResponse */ -const de_RuleNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeArchiveResponse = (output: any, context: __SerdeContext): DescribeArchiveResponse => { + return take(output, { + ArchiveArn: __expectString, + ArchiveName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EventCount: __expectLong, + EventPattern: __expectString, + EventSourceArn: __expectString, + RetentionDays: __expectInt32, + SizeBytes: __expectLong, + State: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RuleResponseList + * deserializeAws_json1_1DescribeConnectionResponse */ -const de_RuleResponseList = (output: any, context: __SerdeContext): Rule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Rule(entry, context); - }); - return retVal; +const de_DescribeConnectionResponse = (output: any, context: __SerdeContext): DescribeConnectionResponse => { + return take(output, { + AuthParameters: _json, + AuthorizationType: __expectString, + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretArn: __expectString, + StateReason: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RunCommandParameters + * deserializeAws_json1_1DescribeEndpointResponse */ -const de_RunCommandParameters = (output: any, context: __SerdeContext): RunCommandParameters => { - return { - RunCommandTargets: - output.RunCommandTargets != null ? de_RunCommandTargets(output.RunCommandTargets, context) : undefined, - } as any; +const de_DescribeEndpointResponse = (output: any, context: __SerdeContext): DescribeEndpointResponse => { + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EndpointId: __expectString, + EndpointUrl: __expectString, + EventBuses: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ReplicationConfig: _json, + RoleArn: __expectString, + RoutingConfig: _json, + State: __expectString, + StateReason: __expectString, + }) as any; +}; + +// de_DescribeEventBusResponse omitted. + +/** + * deserializeAws_json1_1DescribeEventSourceResponse + */ +const de_DescribeEventSourceResponse = (output: any, context: __SerdeContext): DescribeEventSourceResponse => { + return take(output, { + Arn: __expectString, + CreatedBy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; +// de_DescribePartnerEventSourceResponse omitted. + /** - * deserializeAws_json1_1RunCommandTarget + * deserializeAws_json1_1DescribeReplayResponse */ -const de_RunCommandTarget = (output: any, context: __SerdeContext): RunCommandTarget => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_RunCommandTargetValues(output.Values, context) : undefined, - } as any; +const de_DescribeReplayResponse = (output: any, context: __SerdeContext): DescribeReplayResponse => { + return take(output, { + Description: __expectString, + Destination: _json, + EventEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventLastReplayedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventSourceArn: __expectString, + EventStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayArn: __expectString, + ReplayEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayName: __expectString, + ReplayStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_DescribeRuleResponse omitted. + +// de_EcsParameters omitted. + /** - * deserializeAws_json1_1RunCommandTargets + * deserializeAws_json1_1Endpoint */ -const de_RunCommandTargets = (output: any, context: __SerdeContext): RunCommandTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RunCommandTarget(entry, context); - }); - return retVal; +const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EndpointId: __expectString, + EndpointUrl: __expectString, + EventBuses: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ReplicationConfig: _json, + RoleArn: __expectString, + RoutingConfig: _json, + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_EndpointEventBus omitted. + +// de_EndpointEventBusList omitted. + /** - * deserializeAws_json1_1RunCommandTargetValues + * deserializeAws_json1_1EndpointList */ -const de_RunCommandTargetValues = (output: any, context: __SerdeContext): string[] => { +const de_EndpointList = (output: any, context: __SerdeContext): Endpoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Endpoint(entry, context); }); return retVal; }; +// de_EventBus omitted. + +// de_EventBusList omitted. + /** - * deserializeAws_json1_1SageMakerPipelineParameter + * deserializeAws_json1_1EventSource */ -const de_SageMakerPipelineParameter = (output: any, context: __SerdeContext): SageMakerPipelineParameter => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; +const de_EventSource = (output: any, context: __SerdeContext): EventSource => { + return take(output, { + Arn: __expectString, + CreatedBy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SageMakerPipelineParameterList + * deserializeAws_json1_1EventSourceList */ -const de_SageMakerPipelineParameterList = (output: any, context: __SerdeContext): SageMakerPipelineParameter[] => { +const de_EventSourceList = (output: any, context: __SerdeContext): EventSource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SageMakerPipelineParameter(entry, context); + return de_EventSource(entry, context); }); return retVal; }; +// de_FailoverConfig omitted. + +// de_HeaderParametersMap omitted. + +// de_HttpParameters omitted. + +// de_IllegalStatusException omitted. + +// de_InputTransformer omitted. + +// de_InternalException omitted. + +// de_InvalidEventPatternException omitted. + +// de_InvalidStateException omitted. + +// de_KinesisParameters omitted. + +// de_LimitExceededException omitted. + +/** + * deserializeAws_json1_1ListApiDestinationsResponse + */ +const de_ListApiDestinationsResponse = (output: any, context: __SerdeContext): ListApiDestinationsResponse => { + return take(output, { + ApiDestinations: (_: any) => de_ApiDestinationResponseList(_, context), + NextToken: __expectString, + }) as any; +}; + /** - * deserializeAws_json1_1SageMakerPipelineParameters + * deserializeAws_json1_1ListArchivesResponse */ -const de_SageMakerPipelineParameters = (output: any, context: __SerdeContext): SageMakerPipelineParameters => { - return { - PipelineParameterList: - output.PipelineParameterList != null - ? de_SageMakerPipelineParameterList(output.PipelineParameterList, context) - : undefined, - } as any; +const de_ListArchivesResponse = (output: any, context: __SerdeContext): ListArchivesResponse => { + return take(output, { + Archives: (_: any) => de_ArchiveResponseList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Secondary + * deserializeAws_json1_1ListConnectionsResponse */ -const de_Secondary = (output: any, context: __SerdeContext): Secondary => { - return { - Route: __expectString(output.Route), - } as any; +const de_ListConnectionsResponse = (output: any, context: __SerdeContext): ListConnectionsResponse => { + return take(output, { + Connections: (_: any) => de_ConnectionResponseList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Sqls + * deserializeAws_json1_1ListEndpointsResponse */ -const de_Sqls = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListEndpointsResponse = (output: any, context: __SerdeContext): ListEndpointsResponse => { + return take(output, { + Endpoints: (_: any) => de_EndpointList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListEventBusesResponse omitted. + /** - * deserializeAws_json1_1SqsParameters + * deserializeAws_json1_1ListEventSourcesResponse */ -const de_SqsParameters = (output: any, context: __SerdeContext): SqsParameters => { - return { - MessageGroupId: __expectString(output.MessageGroupId), - } as any; +const de_ListEventSourcesResponse = (output: any, context: __SerdeContext): ListEventSourcesResponse => { + return take(output, { + EventSources: (_: any) => de_EventSourceList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StartReplayResponse + * deserializeAws_json1_1ListPartnerEventSourceAccountsResponse */ -const de_StartReplayResponse = (output: any, context: __SerdeContext): StartReplayResponse => { - return { - ReplayArn: __expectString(output.ReplayArn), - ReplayStartTime: - output.ReplayStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReplayStartTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; +const de_ListPartnerEventSourceAccountsResponse = ( + output: any, + context: __SerdeContext +): ListPartnerEventSourceAccountsResponse => { + return take(output, { + NextToken: __expectString, + PartnerEventSourceAccounts: (_: any) => de_PartnerEventSourceAccountList(_, context), + }) as any; }; +// de_ListPartnerEventSourcesResponse omitted. + /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1ListReplaysResponse */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListReplaysResponse = (output: any, context: __SerdeContext): ListReplaysResponse => { + return take(output, { + NextToken: __expectString, + Replays: (_: any) => de_ReplayList(_, context), + }) as any; }; +// de_ListRuleNamesByTargetResponse omitted. + +// de_ListRulesResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListTargetsByRuleResponse omitted. + +// de_ManagedRuleException omitted. + +// de_NetworkConfiguration omitted. + +// de_OperationDisabledException omitted. + +// de_PartnerEventSource omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1PartnerEventSourceAccount */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_PartnerEventSourceAccount = (output: any, context: __SerdeContext): PartnerEventSourceAccount => { + return take(output, { + Account: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1PartnerEventSourceAccountList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_PartnerEventSourceAccountList = (output: any, context: __SerdeContext): PartnerEventSourceAccount[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_PartnerEventSourceAccount(entry, context); }); return retVal; }; +// de_PartnerEventSourceList omitted. + +// de_PathParameterList omitted. + +// de_PlacementConstraint omitted. + +// de_PlacementConstraints omitted. + +// de_PlacementStrategies omitted. + +// de_PlacementStrategy omitted. + +// de_PolicyLengthExceededException omitted. + +// de_Primary omitted. + +// de_PutEventsResponse omitted. + +// de_PutEventsResultEntry omitted. + +// de_PutEventsResultEntryList omitted. + +// de_PutPartnerEventsResponse omitted. + +// de_PutPartnerEventsResultEntry omitted. + +// de_PutPartnerEventsResultEntryList omitted. + +// de_PutRuleResponse omitted. + +// de_PutTargetsResponse omitted. + +// de_PutTargetsResultEntry omitted. + +// de_PutTargetsResultEntryList omitted. + +// de_QueryStringParametersMap omitted. + +// de_RedshiftDataParameters omitted. + +// de_RemoveTargetsResponse omitted. + +// de_RemoveTargetsResultEntry omitted. + +// de_RemoveTargetsResultEntryList omitted. + /** - * deserializeAws_json1_1TagResourceResponse + * deserializeAws_json1_1Replay */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; +const de_Replay = (output: any, context: __SerdeContext): Replay => { + return take(output, { + EventEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventLastReplayedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventSourceArn: __expectString, + EventStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReplayName: __expectString, + ReplayStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_ReplayDestination omitted. + +// de_ReplayDestinationFilters omitted. + /** - * deserializeAws_json1_1Target + * deserializeAws_json1_1ReplayList */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - Arn: __expectString(output.Arn), - BatchParameters: output.BatchParameters != null ? de_BatchParameters(output.BatchParameters, context) : undefined, - DeadLetterConfig: - output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined, - EcsParameters: output.EcsParameters != null ? de_EcsParameters(output.EcsParameters, context) : undefined, - HttpParameters: output.HttpParameters != null ? de_HttpParameters(output.HttpParameters, context) : undefined, - Id: __expectString(output.Id), - Input: __expectString(output.Input), - InputPath: __expectString(output.InputPath), - InputTransformer: - output.InputTransformer != null ? de_InputTransformer(output.InputTransformer, context) : undefined, - KinesisParameters: - output.KinesisParameters != null ? de_KinesisParameters(output.KinesisParameters, context) : undefined, - RedshiftDataParameters: - output.RedshiftDataParameters != null - ? de_RedshiftDataParameters(output.RedshiftDataParameters, context) - : undefined, - RetryPolicy: output.RetryPolicy != null ? de_RetryPolicy(output.RetryPolicy, context) : undefined, - RoleArn: __expectString(output.RoleArn), - RunCommandParameters: - output.RunCommandParameters != null ? de_RunCommandParameters(output.RunCommandParameters, context) : undefined, - SageMakerPipelineParameters: - output.SageMakerPipelineParameters != null - ? de_SageMakerPipelineParameters(output.SageMakerPipelineParameters, context) - : undefined, - SqsParameters: output.SqsParameters != null ? de_SqsParameters(output.SqsParameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TargetList - */ -const de_TargetList = (output: any, context: __SerdeContext): Target[] => { +const de_ReplayList = (output: any, context: __SerdeContext): Replay[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Target(entry, context); + return de_Replay(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TestEventPatternResponse - */ -const de_TestEventPatternResponse = (output: any, context: __SerdeContext): TestEventPatternResponse => { - return { - Result: __expectBoolean(output.Result), - } as any; -}; +// de_ReplicationConfig omitted. -/** - * deserializeAws_json1_1TransformerPaths - */ -const de_TransformerPaths = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ResourceAlreadyExistsException omitted. + +// de_ResourceNotFoundException omitted. + +// de_RetryPolicy omitted. + +// de_RoutingConfig omitted. + +// de_Rule omitted. + +// de_RuleNameList omitted. + +// de_RuleResponseList omitted. + +// de_RunCommandParameters omitted. + +// de_RunCommandTarget omitted. + +// de_RunCommandTargets omitted. + +// de_RunCommandTargetValues omitted. + +// de_SageMakerPipelineParameter omitted. + +// de_SageMakerPipelineParameterList omitted. + +// de_SageMakerPipelineParameters omitted. + +// de_Secondary omitted. + +// de_Sqls omitted. + +// de_SqsParameters omitted. /** - * deserializeAws_json1_1UntagResourceResponse + * deserializeAws_json1_1StartReplayResponse */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; +const de_StartReplayResponse = (output: any, context: __SerdeContext): StartReplayResponse => { + return take(output, { + ReplayArn: __expectString, + ReplayStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; +// de_StringList omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_Target omitted. + +// de_TargetList omitted. + +// de_TestEventPatternResponse omitted. + +// de_TransformerPaths omitted. + +// de_UntagResourceResponse omitted. + /** * deserializeAws_json1_1UpdateApiDestinationResponse */ const de_UpdateApiDestinationResponse = (output: any, context: __SerdeContext): UpdateApiDestinationResponse => { - return { - ApiDestinationArn: __expectString(output.ApiDestinationArn), - ApiDestinationState: __expectString(output.ApiDestinationState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; + return take(output, { + ApiDestinationArn: __expectString, + ApiDestinationState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1UpdateArchiveResponse */ const de_UpdateArchiveResponse = (output: any, context: __SerdeContext): UpdateArchiveResponse => { - return { - ArchiveArn: __expectString(output.ArchiveArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - } as any; + return take(output, { + ArchiveArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateReason: __expectString, + }) as any; }; /** * deserializeAws_json1_1UpdateConnectionResponse */ const de_UpdateConnectionResponse = (output: any, context: __SerdeContext): UpdateConnectionResponse => { - return { - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionState: __expectString(output.ConnectionState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastAuthorizedTime: - output.LastAuthorizedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAuthorizedTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1UpdateEndpointResponse - */ -const de_UpdateEndpointResponse = (output: any, context: __SerdeContext): UpdateEndpointResponse => { - return { - Arn: __expectString(output.Arn), - EndpointId: __expectString(output.EndpointId), - EndpointUrl: __expectString(output.EndpointUrl), - EventBuses: output.EventBuses != null ? de_EndpointEventBusList(output.EventBuses, context) : undefined, - Name: __expectString(output.Name), - ReplicationConfig: - output.ReplicationConfig != null ? de_ReplicationConfig(output.ReplicationConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - RoutingConfig: output.RoutingConfig != null ? de_RoutingConfig(output.RoutingConfig, context) : undefined, - State: __expectString(output.State), - } as any; + return take(output, { + ConnectionArn: __expectString, + ConnectionState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAuthorizedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_UpdateEndpointResponse omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -7667,6 +5125,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-evidently/src/protocols/Aws_restJson1.ts b/clients/client-evidently/src/protocols/Aws_restJson1.ts index 739f894ceaa8..ab7fb4bb34de 100644 --- a/clients/client-evidently/src/protocols/Aws_restJson1.ts +++ b/clients/client-evidently/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -17,11 +18,12 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -85,12 +87,10 @@ import { import { EvidentlyServiceException as __BaseException } from "../models/EvidentlyServiceException"; import { AccessDeniedException, - CloudWatchLogsDestination, CloudWatchLogsDestinationConfig, ConflictException, EvaluationRequest, EvaluationResult, - EvaluationRule, Event, Experiment, ExperimentExecution, @@ -104,7 +104,6 @@ import { InternalServerException, Launch, LaunchExecution, - LaunchGroup, LaunchGroupConfig, MetricDefinition, MetricDefinitionConfig, @@ -113,17 +112,11 @@ import { MetricMonitor, MetricMonitorConfig, OnlineAbConfig, - OnlineAbDefinition, Project, - ProjectAppConfigResource, ProjectAppConfigResourceConfig, - ProjectDataDelivery, ProjectDataDeliveryConfig, ProjectSummary, - PutProjectEventsResultEntry, - RefResource, ResourceNotFoundException, - S3Destination, S3DestinationConfig, ScheduledSplit, ScheduledSplitConfig, @@ -134,10 +127,8 @@ import { ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, - Treatment, TreatmentConfig, ValidationException, - ValidationExceptionField, VariableValue, Variation, VariationConfig, @@ -158,9 +149,11 @@ export const se_BatchEvaluateFeatureCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{project}/evaluations"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.requests != null && { requests: se_EvaluationRequestsList(input.requests, context) }), - }); + body = JSON.stringify( + take(input, { + requests: (_) => se_EvaluationRequestsList(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "dataplane." + resolvedHostname; @@ -194,17 +187,19 @@ export const se_CreateExperimentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{project}/experiments"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.metricGoals != null && { metricGoals: se_MetricGoalConfigList(input.metricGoals, context) }), - ...(input.name != null && { name: input.name }), - ...(input.onlineAbConfig != null && { onlineAbConfig: se_OnlineAbConfig(input.onlineAbConfig, context) }), - ...(input.randomizationSalt != null && { randomizationSalt: input.randomizationSalt }), - ...(input.samplingRate != null && { samplingRate: input.samplingRate }), - ...(input.segment != null && { segment: input.segment }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.treatments != null && { treatments: se_TreatmentConfigList(input.treatments, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + metricGoals: (_) => se_MetricGoalConfigList(_, context), + name: [], + onlineAbConfig: (_) => _json(_), + randomizationSalt: [], + samplingRate: [], + segment: [], + tags: (_) => _json(_), + treatments: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -231,15 +226,17 @@ export const se_CreateFeatureCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{project}/features"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.defaultVariation != null && { defaultVariation: input.defaultVariation }), - ...(input.description != null && { description: input.description }), - ...(input.entityOverrides != null && { entityOverrides: se_EntityOverrideMap(input.entityOverrides, context) }), - ...(input.evaluationStrategy != null && { evaluationStrategy: input.evaluationStrategy }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.variations != null && { variations: se_VariationConfigsList(input.variations, context) }), - }); + body = JSON.stringify( + take(input, { + defaultVariation: [], + description: [], + entityOverrides: (_) => _json(_), + evaluationStrategy: [], + name: [], + tags: (_) => _json(_), + variations: (_) => se_VariationConfigsList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -266,17 +263,17 @@ export const se_CreateLaunchCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{project}/launches"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.groups != null && { groups: se_LaunchGroupConfigList(input.groups, context) }), - ...(input.metricMonitors != null && { metricMonitors: se_MetricMonitorConfigList(input.metricMonitors, context) }), - ...(input.name != null && { name: input.name }), - ...(input.randomizationSalt != null && { randomizationSalt: input.randomizationSalt }), - ...(input.scheduledSplitsConfig != null && { - scheduledSplitsConfig: se_ScheduledSplitsLaunchConfig(input.scheduledSplitsConfig, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + groups: (_) => _json(_), + metricMonitors: (_) => se_MetricMonitorConfigList(_, context), + name: [], + randomizationSalt: [], + scheduledSplitsConfig: (_) => se_ScheduledSplitsLaunchConfig(_, context), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -301,15 +298,15 @@ export const se_CreateProjectCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects"; let body: any; - body = JSON.stringify({ - ...(input.appConfigResource != null && { - appConfigResource: se_ProjectAppConfigResourceConfig(input.appConfigResource, context), - }), - ...(input.dataDelivery != null && { dataDelivery: se_ProjectDataDeliveryConfig(input.dataDelivery, context) }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + appConfigResource: (_) => _json(_), + dataDelivery: (_) => _json(_), + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -334,12 +331,14 @@ export const se_CreateSegmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/segments"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.pattern != null && { pattern: __LazyJsonString.fromObject(input.pattern) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + pattern: (_) => __LazyJsonString.fromObject(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -489,10 +488,12 @@ export const se_EvaluateFeatureCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "feature", () => input.feature!, "{feature}", false); let body: any; - body = JSON.stringify({ - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.evaluationContext != null && { evaluationContext: __LazyJsonString.fromObject(input.evaluationContext) }), - }); + body = JSON.stringify( + take(input, { + entityId: [], + evaluationContext: (_) => __LazyJsonString.fromObject(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "dataplane." + resolvedHostname; @@ -554,16 +555,18 @@ export const se_GetExperimentResultsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "experiment", () => input.experiment!, "{experiment}", false); let body: any; - body = JSON.stringify({ - ...(input.baseStat != null && { baseStat: input.baseStat }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.metricNames != null && { metricNames: se_MetricNameList(input.metricNames, context) }), - ...(input.period != null && { period: input.period }), - ...(input.reportNames != null && { reportNames: se_ExperimentReportNameList(input.reportNames, context) }), - ...(input.resultStats != null && { resultStats: se_ExperimentResultRequestTypeList(input.resultStats, context) }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.treatmentNames != null && { treatmentNames: se_TreatmentNameList(input.treatmentNames, context) }), - }); + body = JSON.stringify( + take(input, { + baseStat: [], + endTime: (_) => Math.round(_.getTime() / 1000), + metricNames: (_) => _json(_), + period: [], + reportNames: (_) => _json(_), + resultStats: (_) => _json(_), + startTime: (_) => Math.round(_.getTime() / 1000), + treatmentNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -882,9 +885,11 @@ export const se_PutProjectEventsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events/projects/{project}"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.events != null && { events: se_EventList(input.events, context) }), - }); + body = JSON.stringify( + take(input, { + events: (_) => se_EventList(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "dataplane." + resolvedHostname; @@ -920,11 +925,11 @@ export const se_StartExperimentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "experiment", () => input.experiment!, "{experiment}", false); let body: any; - body = JSON.stringify({ - ...(input.analysisCompleteTime != null && { - analysisCompleteTime: Math.round(input.analysisCompleteTime.getTime() / 1000), - }), - }); + body = JSON.stringify( + take(input, { + analysisCompleteTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -979,10 +984,12 @@ export const se_StopExperimentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "experiment", () => input.experiment!, "{experiment}", false); let body: any; - body = JSON.stringify({ - ...(input.desiredState != null && { desiredState: input.desiredState }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + desiredState: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1011,10 +1018,12 @@ export const se_StopLaunchCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "launch", () => input.launch!, "{launch}", false); let body: any; - body = JSON.stringify({ - ...(input.desiredState != null && { desiredState: input.desiredState }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + desiredState: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1040,9 +1049,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1067,10 +1078,12 @@ export const se_TestSegmentPatternCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/test-segment-pattern"; let body: any; - body = JSON.stringify({ - ...(input.pattern != null && { pattern: __LazyJsonString.fromObject(input.pattern) }), - ...(input.payload != null && { payload: __LazyJsonString.fromObject(input.payload) }), - }); + body = JSON.stringify( + take(input, { + pattern: (_) => __LazyJsonString.fromObject(_), + payload: (_) => __LazyJsonString.fromObject(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1129,16 +1142,18 @@ export const se_UpdateExperimentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "experiment", () => input.experiment!, "{experiment}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.metricGoals != null && { metricGoals: se_MetricGoalConfigList(input.metricGoals, context) }), - ...(input.onlineAbConfig != null && { onlineAbConfig: se_OnlineAbConfig(input.onlineAbConfig, context) }), - ...(input.randomizationSalt != null && { randomizationSalt: input.randomizationSalt }), - ...(input.removeSegment != null && { removeSegment: input.removeSegment }), - ...(input.samplingRate != null && { samplingRate: input.samplingRate }), - ...(input.segment != null && { segment: input.segment }), - ...(input.treatments != null && { treatments: se_TreatmentConfigList(input.treatments, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + metricGoals: (_) => se_MetricGoalConfigList(_, context), + onlineAbConfig: (_) => _json(_), + randomizationSalt: [], + removeSegment: [], + samplingRate: [], + segment: [], + treatments: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1166,16 +1181,16 @@ export const se_UpdateFeatureCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "feature", () => input.feature!, "{feature}", false); let body: any; - body = JSON.stringify({ - ...(input.addOrUpdateVariations != null && { - addOrUpdateVariations: se_VariationConfigsList(input.addOrUpdateVariations, context), - }), - ...(input.defaultVariation != null && { defaultVariation: input.defaultVariation }), - ...(input.description != null && { description: input.description }), - ...(input.entityOverrides != null && { entityOverrides: se_EntityOverrideMap(input.entityOverrides, context) }), - ...(input.evaluationStrategy != null && { evaluationStrategy: input.evaluationStrategy }), - ...(input.removeVariations != null && { removeVariations: se_VariationNameList(input.removeVariations, context) }), - }); + body = JSON.stringify( + take(input, { + addOrUpdateVariations: (_) => se_VariationConfigsList(_, context), + defaultVariation: [], + description: [], + entityOverrides: (_) => _json(_), + evaluationStrategy: [], + removeVariations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1203,15 +1218,15 @@ export const se_UpdateLaunchCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); resolvedPath = __resolvedPath(resolvedPath, input, "launch", () => input.launch!, "{launch}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.groups != null && { groups: se_LaunchGroupConfigList(input.groups, context) }), - ...(input.metricMonitors != null && { metricMonitors: se_MetricMonitorConfigList(input.metricMonitors, context) }), - ...(input.randomizationSalt != null && { randomizationSalt: input.randomizationSalt }), - ...(input.scheduledSplitsConfig != null && { - scheduledSplitsConfig: se_ScheduledSplitsLaunchConfig(input.scheduledSplitsConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + groups: (_) => _json(_), + metricMonitors: (_) => se_MetricMonitorConfigList(_, context), + randomizationSalt: [], + scheduledSplitsConfig: (_) => se_ScheduledSplitsLaunchConfig(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1237,12 +1252,12 @@ export const se_UpdateProjectCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{project}"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.appConfigResource != null && { - appConfigResource: se_ProjectAppConfigResourceConfig(input.appConfigResource, context), - }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + appConfigResource: (_) => _json(_), + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1269,12 +1284,12 @@ export const se_UpdateProjectDataDeliveryCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{project}/data-delivery"; resolvedPath = __resolvedPath(resolvedPath, input, "project", () => input.project!, "{project}", false); let body: any; - body = JSON.stringify({ - ...(input.cloudWatchLogs != null && { - cloudWatchLogs: se_CloudWatchLogsDestinationConfig(input.cloudWatchLogs, context), - }), - ...(input.s3Destination != null && { s3Destination: se_S3DestinationConfig(input.s3Destination, context) }), - }); + body = JSON.stringify( + take(input, { + cloudWatchLogs: (_) => _json(_), + s3Destination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1300,9 +1315,10 @@ export const de_BatchEvaluateFeatureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.results != null) { - contents.results = de_EvaluationResultsList(data.results, context); - } + const doc = take(data, { + results: (_) => de_EvaluationResultsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1333,10 +1349,9 @@ const de_BatchEvaluateFeatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1356,9 +1371,10 @@ export const de_CreateExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiment != null) { - contents.experiment = de_Experiment(data.experiment, context); - } + const doc = take(data, { + experiment: (_) => de_Experiment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1392,10 +1408,9 @@ const de_CreateExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1415,9 +1430,10 @@ export const de_CreateFeatureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.feature != null) { - contents.feature = de_Feature(data.feature, context); - } + const doc = take(data, { + feature: (_) => de_Feature(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1451,10 +1467,9 @@ const de_CreateFeatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,9 +1489,10 @@ export const de_CreateLaunchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launch != null) { - contents.launch = de_Launch(data.launch, context); - } + const doc = take(data, { + launch: (_) => de_Launch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1510,10 +1526,9 @@ const de_CreateLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,9 +1548,10 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.project != null) { - contents.project = de_Project(data.project, context); - } + const doc = take(data, { + project: (_) => de_Project(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1566,10 +1582,9 @@ const de_CreateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1589,9 +1604,10 @@ export const de_CreateSegmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.segment != null) { - contents.segment = de_Segment(data.segment, context); - } + const doc = take(data, { + segment: (_) => de_Segment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1622,10 +1638,9 @@ const de_CreateSegmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1681,10 +1696,9 @@ const de_DeleteExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1737,10 +1751,9 @@ const de_DeleteFeatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,10 +1806,9 @@ const de_DeleteLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1849,10 +1861,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1905,10 +1916,9 @@ const de_DeleteSegmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1928,18 +1938,13 @@ export const de_EvaluateFeatureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = new __LazyJsonString(data.details); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } - if (data.value != null) { - contents.value = de_VariableValue(__expectUnion(data.value), context); - } - if (data.variation != null) { - contents.variation = __expectString(data.variation); - } + const doc = take(data, { + details: (_) => new __LazyJsonString(_), + reason: __expectString, + value: (_) => de_VariableValue(__expectUnion(_), context), + variation: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1970,10 +1975,9 @@ const de_EvaluateFeatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1993,9 +1997,10 @@ export const de_GetExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiment != null) { - contents.experiment = de_Experiment(data.experiment, context); - } + const doc = take(data, { + experiment: (_) => de_Experiment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2026,10 +2031,9 @@ const de_GetExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2049,18 +2053,13 @@ export const de_GetExperimentResultsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = __expectString(data.details); - } - if (data.reports != null) { - contents.reports = de_ExperimentReportList(data.reports, context); - } - if (data.resultsData != null) { - contents.resultsData = de_ExperimentResultsDataList(data.resultsData, context); - } - if (data.timestamps != null) { - contents.timestamps = de_TimestampList(data.timestamps, context); - } + const doc = take(data, { + details: __expectString, + reports: (_) => de_ExperimentReportList(_, context), + resultsData: (_) => de_ExperimentResultsDataList(_, context), + timestamps: (_) => de_TimestampList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2094,10 +2093,9 @@ const de_GetExperimentResultsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2117,9 +2115,10 @@ export const de_GetFeatureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.feature != null) { - contents.feature = de_Feature(data.feature, context); - } + const doc = take(data, { + feature: (_) => de_Feature(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2150,10 +2149,9 @@ const de_GetFeatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2173,9 +2171,10 @@ export const de_GetLaunchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launch != null) { - contents.launch = de_Launch(data.launch, context); - } + const doc = take(data, { + launch: (_) => de_Launch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2206,10 +2205,9 @@ const de_GetLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2229,9 +2227,10 @@ export const de_GetProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.project != null) { - contents.project = de_Project(data.project, context); - } + const doc = take(data, { + project: (_) => de_Project(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2262,10 +2261,9 @@ const de_GetProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2285,9 +2283,10 @@ export const de_GetSegmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.segment != null) { - contents.segment = de_Segment(data.segment, context); - } + const doc = take(data, { + segment: (_) => de_Segment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2318,10 +2317,9 @@ const de_GetSegmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2341,12 +2339,11 @@ export const de_ListExperimentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiments != null) { - contents.experiments = de_ExperimentList(data.experiments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + experiments: (_) => de_ExperimentList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2374,10 +2371,9 @@ const de_ListExperimentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2397,12 +2393,11 @@ export const de_ListFeaturesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.features != null) { - contents.features = de_FeatureSummariesList(data.features, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + features: (_) => de_FeatureSummariesList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2433,10 +2428,9 @@ const de_ListFeaturesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2456,12 +2450,11 @@ export const de_ListLaunchesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launches != null) { - contents.launches = de_LaunchesList(data.launches, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + launches: (_) => de_LaunchesList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2489,10 +2482,9 @@ const de_ListLaunchesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2512,12 +2504,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.projects != null) { - contents.projects = de_ProjectSummariesList(data.projects, context); - } + const doc = take(data, { + nextToken: __expectString, + projects: (_) => de_ProjectSummariesList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2545,10 +2536,9 @@ const de_ListProjectsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2568,12 +2558,11 @@ export const de_ListSegmentReferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.referencedBy != null) { - contents.referencedBy = de_RefResourceList(data.referencedBy, context); - } + const doc = take(data, { + nextToken: __expectString, + referencedBy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2604,10 +2593,9 @@ const de_ListSegmentReferencesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2627,12 +2615,11 @@ export const de_ListSegmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.segments != null) { - contents.segments = de_SegmentList(data.segments, context); - } + const doc = take(data, { + nextToken: __expectString, + segments: (_) => de_SegmentList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2660,10 +2647,9 @@ const de_ListSegmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2683,9 +2669,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2713,10 +2700,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2736,12 +2722,11 @@ export const de_PutProjectEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eventResults != null) { - contents.eventResults = de_PutProjectEventsResultEntryList(data.eventResults, context); - } - if (data.failedEventCount != null) { - contents.failedEventCount = __expectInt32(data.failedEventCount); - } + const doc = take(data, { + eventResults: _json, + failedEventCount: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2772,10 +2757,9 @@ const de_PutProjectEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2795,9 +2779,10 @@ export const de_StartExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.startedTime != null) { - contents.startedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startedTime))); - } + const doc = take(data, { + startedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2834,10 +2819,9 @@ const de_StartExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2857,9 +2841,10 @@ export const de_StartLaunchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launch != null) { - contents.launch = de_Launch(data.launch, context); - } + const doc = take(data, { + launch: (_) => de_Launch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2896,10 +2881,9 @@ const de_StartLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2919,9 +2903,10 @@ export const de_StopExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endedTime != null) { - contents.endedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endedTime))); - } + const doc = take(data, { + endedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2958,10 +2943,9 @@ const de_StopExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,9 +2965,10 @@ export const de_StopLaunchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endedTime != null) { - contents.endedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endedTime))); - } + const doc = take(data, { + endedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -3014,10 +2999,9 @@ const de_StopLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3064,10 +3048,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3087,9 +3070,10 @@ export const de_TestSegmentPatternCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.match != null) { - contents.match = __expectBoolean(data.match); - } + const doc = take(data, { + match: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -3117,10 +3101,9 @@ const de_TestSegmentPatternCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3167,10 +3150,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3190,9 +3172,10 @@ export const de_UpdateExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiment != null) { - contents.experiment = de_Experiment(data.experiment, context); - } + const doc = take(data, { + experiment: (_) => de_Experiment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3223,10 +3206,9 @@ const de_UpdateExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3246,9 +3228,10 @@ export const de_UpdateFeatureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.feature != null) { - contents.feature = de_Feature(data.feature, context); - } + const doc = take(data, { + feature: (_) => de_Feature(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3282,10 +3265,9 @@ const de_UpdateFeatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3305,9 +3287,10 @@ export const de_UpdateLaunchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launch != null) { - contents.launch = de_Launch(data.launch, context); - } + const doc = take(data, { + launch: (_) => de_Launch(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3338,10 +3321,9 @@ const de_UpdateLaunchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3361,9 +3343,10 @@ export const de_UpdateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.project != null) { - contents.project = de_Project(data.project, context); - } + const doc = take(data, { + project: (_) => de_Project(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3397,10 +3380,9 @@ const de_UpdateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3420,9 +3402,10 @@ export const de_UpdateProjectDataDeliveryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.project != null) { - contents.project = de_Project(data.project, context); - } + const doc = take(data, { + project: (_) => de_Project(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3456,16 +3439,15 @@ const de_UpdateProjectDataDeliveryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3475,9 +3457,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3491,15 +3474,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3516,9 +3496,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3535,15 +3516,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3560,21 +3538,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3591,9 +3562,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3607,15 +3579,12 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3629,15 +3598,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3645,37 +3611,19 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CloudWatchLogsDestinationConfig - */ -const se_CloudWatchLogsDestinationConfig = (input: CloudWatchLogsDestinationConfig, context: __SerdeContext): any => { - return { - ...(input.logGroup != null && { logGroup: input.logGroup }), - }; -}; +// se_CloudWatchLogsDestinationConfig omitted. -/** - * serializeAws_restJson1EntityOverrideMap - */ -const se_EntityOverrideMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EntityOverrideMap omitted. /** * serializeAws_restJson1EvaluationRequest */ const se_EvaluationRequest = (input: EvaluationRequest, context: __SerdeContext): any => { - return { - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.evaluationContext != null && { evaluationContext: __LazyJsonString.fromObject(input.evaluationContext) }), - ...(input.feature != null && { feature: input.feature }), - }; + return take(input, { + entityId: [], + evaluationContext: __LazyJsonString.fromObject, + feature: [], + }); }; /** @@ -3693,11 +3641,11 @@ const se_EvaluationRequestsList = (input: EvaluationRequest[], context: __SerdeC * serializeAws_restJson1Event */ const se_Event = (input: Event, context: __SerdeContext): any => { - return { - ...(input.data != null && { data: __LazyJsonString.fromObject(input.data) }), - ...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + data: __LazyJsonString.fromObject, + timestamp: (_) => Math.round(_.getTime() / 1000), + type: [], + }); }; /** @@ -3711,90 +3659,37 @@ const se_EventList = (input: Event[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1ExperimentReportNameList - */ -const se_ExperimentReportNameList = (input: (ExperimentReportName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExperimentReportNameList omitted. -/** - * serializeAws_restJson1ExperimentResultRequestTypeList - */ -const se_ExperimentResultRequestTypeList = ( - input: (ExperimentResultRequestType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExperimentResultRequestTypeList omitted. -/** - * serializeAws_restJson1GroupToWeightMap - */ -const se_GroupToWeightMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_GroupToWeightMap omitted. -/** - * serializeAws_restJson1LaunchGroupConfig - */ -const se_LaunchGroupConfig = (input: LaunchGroupConfig, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.feature != null && { feature: input.feature }), - ...(input.name != null && { name: input.name }), - ...(input.variation != null && { variation: input.variation }), - }; -}; +// se_LaunchGroupConfig omitted. -/** - * serializeAws_restJson1LaunchGroupConfigList - */ -const se_LaunchGroupConfigList = (input: LaunchGroupConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LaunchGroupConfig(entry, context); - }); -}; +// se_LaunchGroupConfigList omitted. /** * serializeAws_restJson1MetricDefinitionConfig */ const se_MetricDefinitionConfig = (input: MetricDefinitionConfig, context: __SerdeContext): any => { - return { - ...(input.entityIdKey != null && { entityIdKey: input.entityIdKey }), - ...(input.eventPattern != null && { eventPattern: __LazyJsonString.fromObject(input.eventPattern) }), - ...(input.name != null && { name: input.name }), - ...(input.unitLabel != null && { unitLabel: input.unitLabel }), - ...(input.valueKey != null && { valueKey: input.valueKey }), - }; + return take(input, { + entityIdKey: [], + eventPattern: __LazyJsonString.fromObject, + name: [], + unitLabel: [], + valueKey: [], + }); }; /** * serializeAws_restJson1MetricGoalConfig */ const se_MetricGoalConfig = (input: MetricGoalConfig, context: __SerdeContext): any => { - return { - ...(input.desiredChange != null && { desiredChange: input.desiredChange }), - ...(input.metricDefinition != null && { - metricDefinition: se_MetricDefinitionConfig(input.metricDefinition, context), - }), - }; + return take(input, { + desiredChange: [], + metricDefinition: (_) => se_MetricDefinitionConfig(_, context), + }); }; /** @@ -3812,11 +3707,9 @@ const se_MetricGoalConfigList = (input: MetricGoalConfig[], context: __SerdeCont * serializeAws_restJson1MetricMonitorConfig */ const se_MetricMonitorConfig = (input: MetricMonitorConfig, context: __SerdeContext): any => { - return { - ...(input.metricDefinition != null && { - metricDefinition: se_MetricDefinitionConfig(input.metricDefinition, context), - }), - }; + return take(input, { + metricDefinition: (_) => se_MetricDefinitionConfig(_, context), + }); }; /** @@ -3830,72 +3723,25 @@ const se_MetricMonitorConfigList = (input: MetricMonitorConfig[], context: __Ser }); }; -/** - * serializeAws_restJson1MetricNameList - */ -const se_MetricNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MetricNameList omitted. -/** - * serializeAws_restJson1OnlineAbConfig - */ -const se_OnlineAbConfig = (input: OnlineAbConfig, context: __SerdeContext): any => { - return { - ...(input.controlTreatmentName != null && { controlTreatmentName: input.controlTreatmentName }), - ...(input.treatmentWeights != null && { - treatmentWeights: se_TreatmentToWeightMap(input.treatmentWeights, context), - }), - }; -}; +// se_OnlineAbConfig omitted. -/** - * serializeAws_restJson1ProjectAppConfigResourceConfig - */ -const se_ProjectAppConfigResourceConfig = (input: ProjectAppConfigResourceConfig, context: __SerdeContext): any => { - return { - ...(input.applicationId != null && { applicationId: input.applicationId }), - ...(input.environmentId != null && { environmentId: input.environmentId }), - }; -}; +// se_ProjectAppConfigResourceConfig omitted. -/** - * serializeAws_restJson1ProjectDataDeliveryConfig - */ -const se_ProjectDataDeliveryConfig = (input: ProjectDataDeliveryConfig, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogs != null && { - cloudWatchLogs: se_CloudWatchLogsDestinationConfig(input.cloudWatchLogs, context), - }), - ...(input.s3Destination != null && { s3Destination: se_S3DestinationConfig(input.s3Destination, context) }), - }; -}; +// se_ProjectDataDeliveryConfig omitted. -/** - * serializeAws_restJson1S3DestinationConfig - */ -const se_S3DestinationConfig = (input: S3DestinationConfig, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3DestinationConfig omitted. /** * serializeAws_restJson1ScheduledSplitConfig */ const se_ScheduledSplitConfig = (input: ScheduledSplitConfig, context: __SerdeContext): any => { - return { - ...(input.groupWeights != null && { groupWeights: se_GroupToWeightMap(input.groupWeights, context) }), - ...(input.segmentOverrides != null && { - segmentOverrides: se_SegmentOverridesList(input.segmentOverrides, context), - }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; + return take(input, { + groupWeights: _json, + segmentOverrides: _json, + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -3913,92 +3759,24 @@ const se_ScheduledSplitConfigList = (input: ScheduledSplitConfig[], context: __S * serializeAws_restJson1ScheduledSplitsLaunchConfig */ const se_ScheduledSplitsLaunchConfig = (input: ScheduledSplitsLaunchConfig, context: __SerdeContext): any => { - return { - ...(input.steps != null && { steps: se_ScheduledSplitConfigList(input.steps, context) }), - }; + return take(input, { + steps: (_) => se_ScheduledSplitConfigList(_, context), + }); }; -/** - * serializeAws_restJson1SegmentOverride - */ -const se_SegmentOverride = (input: SegmentOverride, context: __SerdeContext): any => { - return { - ...(input.evaluationOrder != null && { evaluationOrder: input.evaluationOrder }), - ...(input.segment != null && { segment: input.segment }), - ...(input.weights != null && { weights: se_GroupToWeightMap(input.weights, context) }), - }; -}; +// se_SegmentOverride omitted. -/** - * serializeAws_restJson1SegmentOverridesList - */ -const se_SegmentOverridesList = (input: SegmentOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SegmentOverride(entry, context); - }); -}; +// se_SegmentOverridesList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TreatmentConfig - */ -const se_TreatmentConfig = (input: TreatmentConfig, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.feature != null && { feature: input.feature }), - ...(input.name != null && { name: input.name }), - ...(input.variation != null && { variation: input.variation }), - }; -}; +// se_TreatmentConfig omitted. -/** - * serializeAws_restJson1TreatmentConfigList - */ -const se_TreatmentConfigList = (input: TreatmentConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TreatmentConfig(entry, context); - }); -}; +// se_TreatmentConfigList omitted. -/** - * serializeAws_restJson1TreatmentNameList - */ -const se_TreatmentNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TreatmentNameList omitted. -/** - * serializeAws_restJson1TreatmentToWeightMap - */ -const se_TreatmentToWeightMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TreatmentToWeightMap omitted. /** * serializeAws_restJson1VariableValue @@ -4017,10 +3795,10 @@ const se_VariableValue = (input: VariableValue, context: __SerdeContext): any => * serializeAws_restJson1VariationConfig */ const se_VariationConfig = (input: VariationConfig, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_VariableValue(input.value, context) }), - }; + return take(input, { + name: [], + value: (_) => se_VariableValue(_, context), + }); }; /** @@ -4034,25 +3812,9 @@ const se_VariationConfigsList = (input: VariationConfig[], context: __SerdeConte }); }; -/** - * serializeAws_restJson1VariationNameList - */ -const se_VariationNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VariationNameList omitted. -/** - * deserializeAws_restJson1CloudWatchLogsDestination - */ -const de_CloudWatchLogsDestination = (output: any, context: __SerdeContext): CloudWatchLogsDestination => { - return { - logGroup: __expectString(output.logGroup), - } as any; -}; +// de_CloudWatchLogsDestination omitted. /** * deserializeAws_restJson1DoubleValueList @@ -4061,40 +3823,26 @@ const de_DoubleValueList = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_restJson1EntityOverrideMap - */ -const de_EntityOverrideMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EntityOverrideMap omitted. /** * deserializeAws_restJson1EvaluationResult */ const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { - return { - details: output.details != null ? new __LazyJsonString(output.details) : undefined, - entityId: __expectString(output.entityId), - feature: __expectString(output.feature), - project: __expectString(output.project), - reason: __expectString(output.reason), - value: output.value != null ? de_VariableValue(__expectUnion(output.value), context) : undefined, - variation: __expectString(output.variation), - } as any; + return take(output, { + details: (_: any) => new __LazyJsonString(_), + entityId: __expectString, + feature: __expectString, + project: __expectString, + reason: __expectString, + value: (_: any) => de_VariableValue(__expectUnion(_), context), + variation: __expectString, + }) as any; }; /** @@ -4104,84 +3852,49 @@ const de_EvaluationResultsList = (output: any, context: __SerdeContext): Evaluat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EvaluationResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EvaluationRule - */ -const de_EvaluationRule = (output: any, context: __SerdeContext): EvaluationRule => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_EvaluationRule omitted. -/** - * deserializeAws_restJson1EvaluationRulesList - */ -const de_EvaluationRulesList = (output: any, context: __SerdeContext): EvaluationRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluationRule(entry, context); - }); - return retVal; -}; +// de_EvaluationRulesList omitted. /** * deserializeAws_restJson1Experiment */ const de_Experiment = (output: any, context: __SerdeContext): Experiment => { - return { - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - description: __expectString(output.description), - execution: output.execution != null ? de_ExperimentExecution(output.execution, context) : undefined, - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - metricGoals: output.metricGoals != null ? de_MetricGoalsList(output.metricGoals, context) : undefined, - name: __expectString(output.name), - onlineAbDefinition: - output.onlineAbDefinition != null ? de_OnlineAbDefinition(output.onlineAbDefinition, context) : undefined, - project: __expectString(output.project), - randomizationSalt: __expectString(output.randomizationSalt), - samplingRate: __expectLong(output.samplingRate), - schedule: output.schedule != null ? de_ExperimentSchedule(output.schedule, context) : undefined, - segment: __expectString(output.segment), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - treatments: output.treatments != null ? de_TreatmentList(output.treatments, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + execution: (_: any) => de_ExperimentExecution(_, context), + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricGoals: (_: any) => de_MetricGoalsList(_, context), + name: __expectString, + onlineAbDefinition: _json, + project: __expectString, + randomizationSalt: __expectString, + samplingRate: __expectLong, + schedule: (_: any) => de_ExperimentSchedule(_, context), + segment: __expectString, + status: __expectString, + statusReason: __expectString, + tags: _json, + treatments: _json, + type: __expectString, + }) as any; }; /** * deserializeAws_restJson1ExperimentExecution */ const de_ExperimentExecution = (output: any, context: __SerdeContext): ExperimentExecution => { - return { - endedTime: - output.endedTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endedTime))) : undefined, - startedTime: - output.startedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedTime))) - : undefined, - } as any; + return take(output, { + endedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4191,9 +3904,6 @@ const de_ExperimentList = (output: any, context: __SerdeContext): Experiment[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Experiment(entry, context); }); return retVal; @@ -4203,12 +3913,12 @@ const de_ExperimentList = (output: any, context: __SerdeContext): Experiment[] = * deserializeAws_restJson1ExperimentReport */ const de_ExperimentReport = (output: any, context: __SerdeContext): ExperimentReport => { - return { - content: output.content != null ? new __LazyJsonString(output.content) : undefined, - metricName: __expectString(output.metricName), - reportName: __expectString(output.reportName), - treatmentName: __expectString(output.treatmentName), - } as any; + return take(output, { + content: (_: any) => new __LazyJsonString(_), + metricName: __expectString, + reportName: __expectString, + treatmentName: __expectString, + }) as any; }; /** @@ -4218,9 +3928,6 @@ const de_ExperimentReportList = (output: any, context: __SerdeContext): Experime const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExperimentReport(entry, context); }); return retVal; @@ -4230,12 +3937,12 @@ const de_ExperimentReportList = (output: any, context: __SerdeContext): Experime * deserializeAws_restJson1ExperimentResultsData */ const de_ExperimentResultsData = (output: any, context: __SerdeContext): ExperimentResultsData => { - return { - metricName: __expectString(output.metricName), - resultStat: __expectString(output.resultStat), - treatmentName: __expectString(output.treatmentName), - values: output.values != null ? de_DoubleValueList(output.values, context) : undefined, - } as any; + return take(output, { + metricName: __expectString, + resultStat: __expectString, + treatmentName: __expectString, + values: (_: any) => de_DoubleValueList(_, context), + }) as any; }; /** @@ -4245,9 +3952,6 @@ const de_ExperimentResultsDataList = (output: any, context: __SerdeContext): Exp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExperimentResultsData(entry, context); }); return retVal; @@ -4257,41 +3961,31 @@ const de_ExperimentResultsDataList = (output: any, context: __SerdeContext): Exp * deserializeAws_restJson1ExperimentSchedule */ const de_ExperimentSchedule = (output: any, context: __SerdeContext): ExperimentSchedule => { - return { - analysisCompleteTime: - output.analysisCompleteTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.analysisCompleteTime))) - : undefined, - } as any; + return take(output, { + analysisCompleteTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1Feature */ const de_Feature = (output: any, context: __SerdeContext): Feature => { - return { - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - defaultVariation: __expectString(output.defaultVariation), - description: __expectString(output.description), - entityOverrides: output.entityOverrides != null ? de_EntityOverrideMap(output.entityOverrides, context) : undefined, - evaluationRules: - output.evaluationRules != null ? de_EvaluationRulesList(output.evaluationRules, context) : undefined, - evaluationStrategy: __expectString(output.evaluationStrategy), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - name: __expectString(output.name), - project: __expectString(output.project), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - valueType: __expectString(output.valueType), - variations: output.variations != null ? de_VariationsList(output.variations, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultVariation: __expectString, + description: __expectString, + entityOverrides: _json, + evaluationRules: _json, + evaluationStrategy: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + project: __expectString, + status: __expectString, + tags: _json, + valueType: __expectString, + variations: (_: any) => de_VariationsList(_, context), + }) as any; }; /** @@ -4301,9 +3995,6 @@ const de_FeatureSummariesList = (output: any, context: __SerdeContext): FeatureS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FeatureSummary(entry, context); }); return retVal; @@ -4313,83 +4004,45 @@ const de_FeatureSummariesList = (output: any, context: __SerdeContext): FeatureS * deserializeAws_restJson1FeatureSummary */ const de_FeatureSummary = (output: any, context: __SerdeContext): FeatureSummary => { - return { - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - defaultVariation: __expectString(output.defaultVariation), - evaluationRules: - output.evaluationRules != null ? de_EvaluationRulesList(output.evaluationRules, context) : undefined, - evaluationStrategy: __expectString(output.evaluationStrategy), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - name: __expectString(output.name), - project: __expectString(output.project), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FeatureToVariationMap - */ -const de_FeatureToVariationMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultVariation: __expectString, + evaluationRules: _json, + evaluationStrategy: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + project: __expectString, + status: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1GroupToWeightMap - */ -const de_GroupToWeightMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; +// de_FeatureToVariationMap omitted. + +// de_GroupToWeightMap omitted. /** * deserializeAws_restJson1Launch */ const de_Launch = (output: any, context: __SerdeContext): Launch => { - return { - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - description: __expectString(output.description), - execution: output.execution != null ? de_LaunchExecution(output.execution, context) : undefined, - groups: output.groups != null ? de_LaunchGroupList(output.groups, context) : undefined, - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - metricMonitors: output.metricMonitors != null ? de_MetricMonitorList(output.metricMonitors, context) : undefined, - name: __expectString(output.name), - project: __expectString(output.project), - randomizationSalt: __expectString(output.randomizationSalt), - scheduledSplitsDefinition: - output.scheduledSplitsDefinition != null - ? de_ScheduledSplitsLaunchDefinition(output.scheduledSplitsDefinition, context) - : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + execution: (_: any) => de_LaunchExecution(_, context), + groups: _json, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricMonitors: (_: any) => de_MetricMonitorList(_, context), + name: __expectString, + project: __expectString, + randomizationSalt: __expectString, + scheduledSplitsDefinition: (_: any) => de_ScheduledSplitsLaunchDefinition(_, context), + status: __expectString, + statusReason: __expectString, + tags: _json, + type: __expectString, + }) as any; }; /** @@ -4399,9 +4052,6 @@ const de_LaunchesList = (output: any, context: __SerdeContext): Launch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Launch(entry, context); }); return retVal; @@ -4411,65 +4061,37 @@ const de_LaunchesList = (output: any, context: __SerdeContext): Launch[] => { * deserializeAws_restJson1LaunchExecution */ const de_LaunchExecution = (output: any, context: __SerdeContext): LaunchExecution => { - return { - endedTime: - output.endedTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endedTime))) : undefined, - startedTime: - output.startedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedTime))) - : undefined, - } as any; + return take(output, { + endedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1LaunchGroup - */ -const de_LaunchGroup = (output: any, context: __SerdeContext): LaunchGroup => { - return { - description: __expectString(output.description), - featureVariations: - output.featureVariations != null ? de_FeatureToVariationMap(output.featureVariations, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_LaunchGroup omitted. -/** - * deserializeAws_restJson1LaunchGroupList - */ -const de_LaunchGroupList = (output: any, context: __SerdeContext): LaunchGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchGroup(entry, context); - }); - return retVal; -}; +// de_LaunchGroupList omitted. /** * deserializeAws_restJson1MetricDefinition */ const de_MetricDefinition = (output: any, context: __SerdeContext): MetricDefinition => { - return { - entityIdKey: __expectString(output.entityIdKey), - eventPattern: output.eventPattern != null ? new __LazyJsonString(output.eventPattern) : undefined, - name: __expectString(output.name), - unitLabel: __expectString(output.unitLabel), - valueKey: __expectString(output.valueKey), - } as any; + return take(output, { + entityIdKey: __expectString, + eventPattern: (_: any) => new __LazyJsonString(_), + name: __expectString, + unitLabel: __expectString, + valueKey: __expectString, + }) as any; }; /** * deserializeAws_restJson1MetricGoal */ const de_MetricGoal = (output: any, context: __SerdeContext): MetricGoal => { - return { - desiredChange: __expectString(output.desiredChange), - metricDefinition: - output.metricDefinition != null ? de_MetricDefinition(output.metricDefinition, context) : undefined, - } as any; + return take(output, { + desiredChange: __expectString, + metricDefinition: (_: any) => de_MetricDefinition(_, context), + }) as any; }; /** @@ -4479,9 +4101,6 @@ const de_MetricGoalsList = (output: any, context: __SerdeContext): MetricGoal[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricGoal(entry, context); }); return retVal; @@ -4491,10 +4110,9 @@ const de_MetricGoalsList = (output: any, context: __SerdeContext): MetricGoal[] * deserializeAws_restJson1MetricMonitor */ const de_MetricMonitor = (output: any, context: __SerdeContext): MetricMonitor => { - return { - metricDefinition: - output.metricDefinition != null ? de_MetricDefinition(output.metricDefinition, context) : undefined, - } as any; + return take(output, { + metricDefinition: (_: any) => de_MetricDefinition(_, context), + }) as any; }; /** @@ -4504,76 +4122,39 @@ const de_MetricMonitorList = (output: any, context: __SerdeContext): MetricMonit const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricMonitor(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1OnlineAbDefinition - */ -const de_OnlineAbDefinition = (output: any, context: __SerdeContext): OnlineAbDefinition => { - return { - controlTreatmentName: __expectString(output.controlTreatmentName), - treatmentWeights: - output.treatmentWeights != null ? de_TreatmentToWeightMap(output.treatmentWeights, context) : undefined, - } as any; -}; +// de_OnlineAbDefinition omitted. /** * deserializeAws_restJson1Project */ const de_Project = (output: any, context: __SerdeContext): Project => { - return { - activeExperimentCount: __expectLong(output.activeExperimentCount), - activeLaunchCount: __expectLong(output.activeLaunchCount), - appConfigResource: - output.appConfigResource != null ? de_ProjectAppConfigResource(output.appConfigResource, context) : undefined, - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - dataDelivery: output.dataDelivery != null ? de_ProjectDataDelivery(output.dataDelivery, context) : undefined, - description: __expectString(output.description), - experimentCount: __expectLong(output.experimentCount), - featureCount: __expectLong(output.featureCount), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - launchCount: __expectLong(output.launchCount), - name: __expectString(output.name), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ProjectAppConfigResource - */ -const de_ProjectAppConfigResource = (output: any, context: __SerdeContext): ProjectAppConfigResource => { - return { - applicationId: __expectString(output.applicationId), - configurationProfileId: __expectString(output.configurationProfileId), - environmentId: __expectString(output.environmentId), - } as any; -}; - -/** - * deserializeAws_restJson1ProjectDataDelivery - */ -const de_ProjectDataDelivery = (output: any, context: __SerdeContext): ProjectDataDelivery => { - return { - cloudWatchLogs: - output.cloudWatchLogs != null ? de_CloudWatchLogsDestination(output.cloudWatchLogs, context) : undefined, - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; + return take(output, { + activeExperimentCount: __expectLong, + activeLaunchCount: __expectLong, + appConfigResource: _json, + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataDelivery: _json, + description: __expectString, + experimentCount: __expectLong, + featureCount: __expectLong, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + launchCount: __expectLong, + name: __expectString, + status: __expectString, + tags: _json, + }) as any; }; +// de_ProjectAppConfigResource omitted. + +// de_ProjectDataDelivery omitted. + /** * deserializeAws_restJson1ProjectSummariesList */ @@ -4581,9 +4162,6 @@ const de_ProjectSummariesList = (output: any, context: __SerdeContext): ProjectS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectSummary(entry, context); }); return retVal; @@ -4593,114 +4171,50 @@ const de_ProjectSummariesList = (output: any, context: __SerdeContext): ProjectS * deserializeAws_restJson1ProjectSummary */ const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - activeExperimentCount: __expectLong(output.activeExperimentCount), - activeLaunchCount: __expectLong(output.activeLaunchCount), - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - description: __expectString(output.description), - experimentCount: __expectLong(output.experimentCount), - featureCount: __expectLong(output.featureCount), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - launchCount: __expectLong(output.launchCount), - name: __expectString(output.name), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1PutProjectEventsResultEntry - */ -const de_PutProjectEventsResultEntry = (output: any, context: __SerdeContext): PutProjectEventsResultEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - eventId: __expectString(output.eventId), - } as any; -}; - -/** - * deserializeAws_restJson1PutProjectEventsResultEntryList - */ -const de_PutProjectEventsResultEntryList = (output: any, context: __SerdeContext): PutProjectEventsResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutProjectEventsResultEntry(entry, context); - }); - return retVal; + return take(output, { + activeExperimentCount: __expectLong, + activeLaunchCount: __expectLong, + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + experimentCount: __expectLong, + featureCount: __expectLong, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + launchCount: __expectLong, + name: __expectString, + status: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1RefResource - */ -const de_RefResource = (output: any, context: __SerdeContext): RefResource => { - return { - arn: __expectString(output.arn), - endTime: __expectString(output.endTime), - lastUpdatedOn: __expectString(output.lastUpdatedOn), - name: __expectString(output.name), - startTime: __expectString(output.startTime), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; -}; +// de_PutProjectEventsResultEntry omitted. -/** - * deserializeAws_restJson1RefResourceList - */ -const de_RefResourceList = (output: any, context: __SerdeContext): RefResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RefResource(entry, context); - }); - return retVal; -}; +// de_PutProjectEventsResultEntryList omitted. -/** - * deserializeAws_restJson1S3Destination - */ -const de_S3Destination = (output: any, context: __SerdeContext): S3Destination => { - return { - bucket: __expectString(output.bucket), - prefix: __expectString(output.prefix), - } as any; -}; +// de_RefResource omitted. + +// de_RefResourceList omitted. + +// de_S3Destination omitted. /** * deserializeAws_restJson1ScheduledSplit */ const de_ScheduledSplit = (output: any, context: __SerdeContext): ScheduledSplit => { - return { - groupWeights: output.groupWeights != null ? de_GroupToWeightMap(output.groupWeights, context) : undefined, - segmentOverrides: - output.segmentOverrides != null ? de_SegmentOverridesList(output.segmentOverrides, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; + return take(output, { + groupWeights: _json, + segmentOverrides: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1ScheduledSplitsLaunchDefinition */ const de_ScheduledSplitsLaunchDefinition = (output: any, context: __SerdeContext): ScheduledSplitsLaunchDefinition => { - return { - steps: output.steps != null ? de_ScheduledStepList(output.steps, context) : undefined, - } as any; + return take(output, { + steps: (_: any) => de_ScheduledStepList(_, context), + }) as any; }; /** @@ -4710,9 +4224,6 @@ const de_ScheduledStepList = (output: any, context: __SerdeContext): ScheduledSp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduledSplit(entry, context); }); return retVal; @@ -4722,23 +4233,17 @@ const de_ScheduledStepList = (output: any, context: __SerdeContext): ScheduledSp * deserializeAws_restJson1Segment */ const de_Segment = (output: any, context: __SerdeContext): Segment => { - return { - arn: __expectString(output.arn), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - description: __expectString(output.description), - experimentCount: __expectLong(output.experimentCount), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - launchCount: __expectLong(output.launchCount), - name: __expectString(output.name), - pattern: output.pattern != null ? new __LazyJsonString(output.pattern) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + experimentCount: __expectLong, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + launchCount: __expectLong, + name: __expectString, + pattern: (_: any) => new __LazyJsonString(_), + tags: _json, + }) as any; }; /** @@ -4748,52 +4253,16 @@ const de_SegmentList = (output: any, context: __SerdeContext): Segment[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Segment(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SegmentOverride - */ -const de_SegmentOverride = (output: any, context: __SerdeContext): SegmentOverride => { - return { - evaluationOrder: __expectLong(output.evaluationOrder), - segment: __expectString(output.segment), - weights: output.weights != null ? de_GroupToWeightMap(output.weights, context) : undefined, - } as any; -}; +// de_SegmentOverride omitted. -/** - * deserializeAws_restJson1SegmentOverridesList - */ -const de_SegmentOverridesList = (output: any, context: __SerdeContext): SegmentOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SegmentOverride(entry, context); - }); - return retVal; -}; +// de_SegmentOverridesList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1TimestampList @@ -4802,78 +4271,20 @@ const de_TimestampList = (output: any, context: __SerdeContext): Date[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry))); }); return retVal; }; -/** - * deserializeAws_restJson1Treatment - */ -const de_Treatment = (output: any, context: __SerdeContext): Treatment => { - return { - description: __expectString(output.description), - featureVariations: - output.featureVariations != null ? de_FeatureToVariationMap(output.featureVariations, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_Treatment omitted. -/** - * deserializeAws_restJson1TreatmentList - */ -const de_TreatmentList = (output: any, context: __SerdeContext): Treatment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Treatment(entry, context); - }); - return retVal; -}; +// de_TreatmentList omitted. -/** - * deserializeAws_restJson1TreatmentToWeightMap - */ -const de_TreatmentToWeightMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; +// de_TreatmentToWeightMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. /** * deserializeAws_restJson1VariableValue @@ -4898,10 +4309,10 @@ const de_VariableValue = (output: any, context: __SerdeContext): VariableValue = * deserializeAws_restJson1Variation */ const de_Variation = (output: any, context: __SerdeContext): Variation => { - return { - name: __expectString(output.name), - value: output.value != null ? de_VariableValue(__expectUnion(output.value), context) : undefined, - } as any; + return take(output, { + name: __expectString, + value: (_: any) => de_VariableValue(__expectUnion(_), context), + }) as any; }; /** @@ -4911,9 +4322,6 @@ const de_VariationsList = (output: any, context: __SerdeContext): Variation[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Variation(entry, context); }); return retVal; diff --git a/clients/client-finspace-data/src/protocols/Aws_restJson1.ts b/clients/client-finspace-data/src/protocols/Aws_restJson1.ts index 38a6e97c0977..c64dff96067a 100644 --- a/clients/client-finspace-data/src/protocols/Aws_restJson1.ts +++ b/clients/client-finspace-data/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -8,9 +9,10 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -84,30 +86,18 @@ import { FinspaceDataServiceException as __BaseException } from "../models/Finsp import { AccessDeniedException, ApplicationPermission, - AwsCredentials, - ChangesetErrorInfo, - ChangesetSummary, ColumnDefinition, ConflictException, - Credentials, - Dataset, DatasetOwnerInfo, DataViewDestinationTypeParams, - DataViewErrorInfo, - DataViewSummary, InternalServerException, LimitExceededException, - PermissionGroup, - PermissionGroupByUser, PermissionGroupParams, ResourceNotFoundException, ResourcePermission, - S3Location, SchemaDefinition, SchemaUnion, ThrottlingException, - User, - UserByPermissionGroup, ValidationException, } from "../models/models_0"; @@ -135,9 +125,11 @@ export const se_AssociateUserToPermissionGroupCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -164,12 +156,14 @@ export const se_CreateChangesetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/changesetsv2"; resolvedPath = __resolvedPath(resolvedPath, input, "datasetId", () => input.datasetId!, "{datasetId}", false); let body: any; - body = JSON.stringify({ - ...(input.changeType != null && { changeType: input.changeType }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.formatParams != null && { formatParams: se_FormatParams(input.formatParams, context) }), - ...(input.sourceParams != null && { sourceParams: se_SourceParams(input.sourceParams, context) }), - }); + body = JSON.stringify( + take(input, { + changeType: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + formatParams: (_) => _json(_), + sourceParams: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -194,18 +188,18 @@ export const se_CreateDatasetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2"; let body: any; - body = JSON.stringify({ - ...(input.alias != null && { alias: input.alias }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.datasetDescription != null && { datasetDescription: input.datasetDescription }), - ...(input.datasetTitle != null && { datasetTitle: input.datasetTitle }), - ...(input.kind != null && { kind: input.kind }), - ...(input.ownerInfo != null && { ownerInfo: se_DatasetOwnerInfo(input.ownerInfo, context) }), - ...(input.permissionGroupParams != null && { - permissionGroupParams: se_PermissionGroupParams(input.permissionGroupParams, context), - }), - ...(input.schemaDefinition != null && { schemaDefinition: se_SchemaUnion(input.schemaDefinition, context) }), - }); + body = JSON.stringify( + take(input, { + alias: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + datasetDescription: [], + datasetTitle: [], + kind: [], + ownerInfo: (_) => _json(_), + permissionGroupParams: (_) => _json(_), + schemaDefinition: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -232,18 +226,16 @@ export const se_CreateDataViewCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetId}/dataviewsv2"; resolvedPath = __resolvedPath(resolvedPath, input, "datasetId", () => input.datasetId!, "{datasetId}", false); let body: any; - body = JSON.stringify({ - ...(input.asOfTimestamp != null && { asOfTimestamp: input.asOfTimestamp }), - ...(input.autoUpdate != null && { autoUpdate: input.autoUpdate }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.destinationTypeParams != null && { - destinationTypeParams: se_DataViewDestinationTypeParams(input.destinationTypeParams, context), - }), - ...(input.partitionColumns != null && { - partitionColumns: se_PartitionColumnList(input.partitionColumns, context), - }), - ...(input.sortColumns != null && { sortColumns: se_SortColumnList(input.sortColumns, context) }), - }); + body = JSON.stringify( + take(input, { + asOfTimestamp: [], + autoUpdate: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + destinationTypeParams: (_) => _json(_), + partitionColumns: (_) => _json(_), + sortColumns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -268,14 +260,14 @@ export const se_CreatePermissionGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/permission-group"; let body: any; - body = JSON.stringify({ - ...(input.applicationPermissions != null && { - applicationPermissions: se_ApplicationPermissionList(input.applicationPermissions, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + applicationPermissions: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -300,15 +292,17 @@ export const se_CreateUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user"; let body: any; - body = JSON.stringify({ - ...(input.ApiAccess != null && { ApiAccess: input.ApiAccess }), - ...(input.apiAccessPrincipalArn != null && { apiAccessPrincipalArn: input.apiAccessPrincipalArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.emailAddress != null && { emailAddress: input.emailAddress }), - ...(input.firstName != null && { firstName: input.firstName }), - ...(input.lastName != null && { lastName: input.lastName }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + ApiAccess: [], + apiAccessPrincipalArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + emailAddress: [], + firstName: [], + lastName: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -396,9 +390,11 @@ export const se_DisableUserCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}/disable"; resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -461,9 +457,11 @@ export const se_EnableUserCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}/enable"; resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -671,9 +669,11 @@ export const se_GetWorkingLocationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workingLocationV1"; let body: any; - body = JSON.stringify({ - ...(input.locationType != null && { locationType: input.locationType }), - }); + body = JSON.stringify( + take(input, { + locationType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -904,9 +904,11 @@ export const se_ResetUserPasswordCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}/password"; resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -935,11 +937,13 @@ export const se_UpdateChangesetCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "datasetId", () => input.datasetId!, "{datasetId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "changesetId", () => input.changesetId!, "{changesetId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.formatParams != null && { formatParams: se_FormatParams(input.formatParams, context) }), - ...(input.sourceParams != null && { sourceParams: se_SourceParams(input.sourceParams, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + formatParams: (_) => _json(_), + sourceParams: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -965,14 +969,16 @@ export const se_UpdateDatasetCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasetsv2/{datasetId}"; resolvedPath = __resolvedPath(resolvedPath, input, "datasetId", () => input.datasetId!, "{datasetId}", false); let body: any; - body = JSON.stringify({ - ...(input.alias != null && { alias: input.alias }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.datasetDescription != null && { datasetDescription: input.datasetDescription }), - ...(input.datasetTitle != null && { datasetTitle: input.datasetTitle }), - ...(input.kind != null && { kind: input.kind }), - ...(input.schemaDefinition != null && { schemaDefinition: se_SchemaUnion(input.schemaDefinition, context) }), - }); + body = JSON.stringify( + take(input, { + alias: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + datasetDescription: [], + datasetTitle: [], + kind: [], + schemaDefinition: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1006,14 +1012,14 @@ export const se_UpdatePermissionGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.applicationPermissions != null && { - applicationPermissions: se_ApplicationPermissionList(input.applicationPermissions, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + applicationPermissions: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1039,14 +1045,16 @@ export const se_UpdateUserCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/{userId}"; resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - ...(input.apiAccess != null && { apiAccess: input.apiAccess }), - ...(input.apiAccessPrincipalArn != null && { apiAccessPrincipalArn: input.apiAccessPrincipalArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.firstName != null && { firstName: input.firstName }), - ...(input.lastName != null && { lastName: input.lastName }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + apiAccess: [], + apiAccessPrincipalArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + firstName: [], + lastName: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1111,10 +1119,9 @@ const de_AssociateUserToPermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1134,12 +1141,11 @@ export const de_CreateChangesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.changesetId != null) { - contents.changesetId = __expectString(data.changesetId); - } - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } + const doc = take(data, { + changesetId: __expectString, + datasetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1179,10 +1185,9 @@ const de_CreateChangesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1202,9 +1207,10 @@ export const de_CreateDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } + const doc = take(data, { + datasetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1244,10 +1250,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1267,12 +1272,11 @@ export const de_CreateDataViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataViewId != null) { - contents.dataViewId = __expectString(data.dataViewId); - } - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } + const doc = take(data, { + dataViewId: __expectString, + datasetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1309,10 +1313,9 @@ const de_CreateDataViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1332,9 +1335,10 @@ export const de_CreatePermissionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.permissionGroupId != null) { - contents.permissionGroupId = __expectString(data.permissionGroupId); - } + const doc = take(data, { + permissionGroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1371,10 +1375,9 @@ const de_CreatePermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1394,9 +1397,10 @@ export const de_CreateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1433,10 +1437,9 @@ const de_CreateUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1456,9 +1459,10 @@ export const de_DeleteDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } + const doc = take(data, { + datasetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1498,10 +1502,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1521,9 +1524,10 @@ export const de_DeletePermissionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.permissionGroupId != null) { - contents.permissionGroupId = __expectString(data.permissionGroupId); - } + const doc = take(data, { + permissionGroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1563,10 +1567,9 @@ const de_DeletePermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1586,9 +1589,10 @@ export const de_DisableUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1625,10 +1629,9 @@ const de_DisableUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1687,10 +1690,9 @@ const de_DisassociateUserFromPermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1710,9 +1712,10 @@ export const de_EnableUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1752,10 +1755,9 @@ const de_EnableUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1775,45 +1777,22 @@ export const de_GetChangesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.activeFromTimestamp != null) { - contents.activeFromTimestamp = __expectLong(data.activeFromTimestamp); - } - if (data.activeUntilTimestamp != null) { - contents.activeUntilTimestamp = __expectLong(data.activeUntilTimestamp); - } - if (data.changeType != null) { - contents.changeType = __expectString(data.changeType); - } - if (data.changesetArn != null) { - contents.changesetArn = __expectString(data.changesetArn); - } - if (data.changesetId != null) { - contents.changesetId = __expectString(data.changesetId); - } - if (data.createTime != null) { - contents.createTime = __expectLong(data.createTime); - } - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } - if (data.errorInfo != null) { - contents.errorInfo = de_ChangesetErrorInfo(data.errorInfo, context); - } - if (data.formatParams != null) { - contents.formatParams = de_FormatParams(data.formatParams, context); - } - if (data.sourceParams != null) { - contents.sourceParams = de_SourceParams(data.sourceParams, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.updatedByChangesetId != null) { - contents.updatedByChangesetId = __expectString(data.updatedByChangesetId); - } - if (data.updatesChangesetId != null) { - contents.updatesChangesetId = __expectString(data.updatesChangesetId); - } + const doc = take(data, { + activeFromTimestamp: __expectLong, + activeUntilTimestamp: __expectLong, + changeType: __expectString, + changesetArn: __expectString, + changesetId: __expectString, + createTime: __expectLong, + datasetId: __expectString, + errorInfo: _json, + formatParams: _json, + sourceParams: _json, + status: __expectString, + updatedByChangesetId: __expectString, + updatesChangesetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1850,10 +1829,9 @@ const de_GetChangesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1873,36 +1851,19 @@ export const de_GetDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alias != null) { - contents.alias = __expectString(data.alias); - } - if (data.createTime != null) { - contents.createTime = __expectLong(data.createTime); - } - if (data.datasetArn != null) { - contents.datasetArn = __expectString(data.datasetArn); - } - if (data.datasetDescription != null) { - contents.datasetDescription = __expectString(data.datasetDescription); - } - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } - if (data.datasetTitle != null) { - contents.datasetTitle = __expectString(data.datasetTitle); - } - if (data.kind != null) { - contents.kind = __expectString(data.kind); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectLong(data.lastModifiedTime); - } - if (data.schemaDefinition != null) { - contents.schemaDefinition = de_SchemaUnion(data.schemaDefinition, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + alias: __expectString, + createTime: __expectLong, + datasetArn: __expectString, + datasetDescription: __expectString, + datasetId: __expectString, + datasetTitle: __expectString, + kind: __expectString, + lastModifiedTime: __expectLong, + schemaDefinition: _json, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1939,10 +1900,9 @@ const de_GetDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1962,42 +1922,21 @@ export const de_GetDataViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.asOfTimestamp != null) { - contents.asOfTimestamp = __expectLong(data.asOfTimestamp); - } - if (data.autoUpdate != null) { - contents.autoUpdate = __expectBoolean(data.autoUpdate); - } - if (data.createTime != null) { - contents.createTime = __expectLong(data.createTime); - } - if (data.dataViewArn != null) { - contents.dataViewArn = __expectString(data.dataViewArn); - } - if (data.dataViewId != null) { - contents.dataViewId = __expectString(data.dataViewId); - } - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } - if (data.destinationTypeParams != null) { - contents.destinationTypeParams = de_DataViewDestinationTypeParams(data.destinationTypeParams, context); - } - if (data.errorInfo != null) { - contents.errorInfo = de_DataViewErrorInfo(data.errorInfo, context); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectLong(data.lastModifiedTime); - } - if (data.partitionColumns != null) { - contents.partitionColumns = de_PartitionColumnList(data.partitionColumns, context); - } - if (data.sortColumns != null) { - contents.sortColumns = de_SortColumnList(data.sortColumns, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + asOfTimestamp: __expectLong, + autoUpdate: __expectBoolean, + createTime: __expectLong, + dataViewArn: __expectString, + dataViewId: __expectString, + datasetId: __expectString, + destinationTypeParams: _json, + errorInfo: _json, + lastModifiedTime: __expectLong, + partitionColumns: _json, + sortColumns: _json, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2031,10 +1970,9 @@ const de_GetDataViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2054,12 +1992,11 @@ export const de_GetExternalDataViewAccessDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.credentials != null) { - contents.credentials = de_AwsCredentials(data.credentials, context); - } - if (data.s3Location != null) { - contents.s3Location = de_S3Location(data.s3Location, context); - } + const doc = take(data, { + credentials: _json, + s3Location: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2093,10 +2030,9 @@ const de_GetExternalDataViewAccessDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2116,9 +2052,10 @@ export const de_GetPermissionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.permissionGroup != null) { - contents.permissionGroup = de_PermissionGroup(data.permissionGroup, context); - } + const doc = take(data, { + permissionGroup: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2152,10 +2089,9 @@ const de_GetPermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2175,12 +2111,11 @@ export const de_GetProgrammaticAccessCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.credentials != null) { - contents.credentials = de_Credentials(data.credentials, context); - } - if (data.durationInMinutes != null) { - contents.durationInMinutes = __expectLong(data.durationInMinutes); - } + const doc = take(data, { + credentials: _json, + durationInMinutes: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -2211,10 +2146,9 @@ const de_GetProgrammaticAccessCredentialsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2234,45 +2168,22 @@ export const de_GetUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.apiAccess != null) { - contents.apiAccess = __expectString(data.apiAccess); - } - if (data.apiAccessPrincipalArn != null) { - contents.apiAccessPrincipalArn = __expectString(data.apiAccessPrincipalArn); - } - if (data.createTime != null) { - contents.createTime = __expectLong(data.createTime); - } - if (data.emailAddress != null) { - contents.emailAddress = __expectString(data.emailAddress); - } - if (data.firstName != null) { - contents.firstName = __expectString(data.firstName); - } - if (data.lastDisabledTime != null) { - contents.lastDisabledTime = __expectLong(data.lastDisabledTime); - } - if (data.lastEnabledTime != null) { - contents.lastEnabledTime = __expectLong(data.lastEnabledTime); - } - if (data.lastLoginTime != null) { - contents.lastLoginTime = __expectLong(data.lastLoginTime); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectLong(data.lastModifiedTime); - } - if (data.lastName != null) { - contents.lastName = __expectString(data.lastName); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + apiAccess: __expectString, + apiAccessPrincipalArn: __expectString, + createTime: __expectLong, + emailAddress: __expectString, + firstName: __expectString, + lastDisabledTime: __expectLong, + lastEnabledTime: __expectLong, + lastLoginTime: __expectLong, + lastModifiedTime: __expectLong, + lastName: __expectString, + status: __expectString, + type: __expectString, + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2306,10 +2217,9 @@ const de_GetUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2329,15 +2239,12 @@ export const de_GetWorkingLocationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.s3Bucket != null) { - contents.s3Bucket = __expectString(data.s3Bucket); - } - if (data.s3Path != null) { - contents.s3Path = __expectString(data.s3Path); - } - if (data.s3Uri != null) { - contents.s3Uri = __expectString(data.s3Uri); - } + const doc = take(data, { + s3Bucket: __expectString, + s3Path: __expectString, + s3Uri: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2368,10 +2275,9 @@ const de_GetWorkingLocationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2391,12 +2297,11 @@ export const de_ListChangesetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.changesets != null) { - contents.changesets = de_ChangesetList(data.changesets, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + changesets: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2433,10 +2338,9 @@ const de_ListChangesetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2456,12 +2360,11 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasets != null) { - contents.datasets = de_DatasetList(data.datasets, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + datasets: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2495,10 +2398,9 @@ const de_ListDatasetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2518,12 +2420,11 @@ export const de_ListDataViewsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataViews != null) { - contents.dataViews = de_DataViewList(data.dataViews, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dataViews: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2557,10 +2458,9 @@ const de_ListDataViewsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2580,12 +2480,11 @@ export const de_ListPermissionGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissionGroups != null) { - contents.permissionGroups = de_PermissionGroupList(data.permissionGroups, context); - } + const doc = take(data, { + nextToken: __expectString, + permissionGroups: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2616,10 +2515,9 @@ const de_ListPermissionGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2639,12 +2537,11 @@ export const de_ListPermissionGroupsByUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissionGroups != null) { - contents.permissionGroups = de_PermissionGroupByUserList(data.permissionGroups, context); - } + const doc = take(data, { + nextToken: __expectString, + permissionGroups: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2678,10 +2575,9 @@ const de_ListPermissionGroupsByUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2701,12 +2597,11 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.users != null) { - contents.users = de_UserList(data.users, context); - } + const doc = take(data, { + nextToken: __expectString, + users: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2737,10 +2632,9 @@ const de_ListUsersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2760,12 +2654,11 @@ export const de_ListUsersByPermissionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.users != null) { - contents.users = de_UserByPermissionGroupList(data.users, context); - } + const doc = take(data, { + nextToken: __expectString, + users: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2799,10 +2692,9 @@ const de_ListUsersByPermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2822,12 +2714,11 @@ export const de_ResetUserPasswordCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.temporaryPassword != null) { - contents.temporaryPassword = __expectString(data.temporaryPassword); - } - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + temporaryPassword: __expectString, + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2864,10 +2755,9 @@ const de_ResetUserPasswordCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2887,12 +2777,11 @@ export const de_UpdateChangesetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.changesetId != null) { - contents.changesetId = __expectString(data.changesetId); - } - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } + const doc = take(data, { + changesetId: __expectString, + datasetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2929,10 +2818,9 @@ const de_UpdateChangesetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2952,9 +2840,10 @@ export const de_UpdateDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasetId != null) { - contents.datasetId = __expectString(data.datasetId); - } + const doc = take(data, { + datasetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2991,10 +2880,9 @@ const de_UpdateDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3014,9 +2902,10 @@ export const de_UpdatePermissionGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.permissionGroupId != null) { - contents.permissionGroupId = __expectString(data.permissionGroupId); - } + const doc = take(data, { + permissionGroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3053,10 +2942,9 @@ const de_UpdatePermissionGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3076,9 +2964,10 @@ export const de_UpdateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3115,16 +3004,15 @@ const de_UpdateUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3134,9 +3022,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3150,12 +3039,11 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3172,9 +3060,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3191,9 +3080,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3210,12 +3100,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3229,6 +3118,8 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3242,12 +3133,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3255,651 +3145,101 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApplicationPermissionList - */ -const se_ApplicationPermissionList = (input: (ApplicationPermission | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationPermissionList omitted. -/** - * serializeAws_restJson1ColumnDefinition - */ -const se_ColumnDefinition = (input: ColumnDefinition, context: __SerdeContext): any => { - return { - ...(input.columnDescription != null && { columnDescription: input.columnDescription }), - ...(input.columnName != null && { columnName: input.columnName }), - ...(input.dataType != null && { dataType: input.dataType }), - }; -}; +// se_ColumnDefinition omitted. -/** - * serializeAws_restJson1ColumnList - */ -const se_ColumnList = (input: ColumnDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnDefinition(entry, context); - }); -}; +// se_ColumnList omitted. -/** - * serializeAws_restJson1ColumnNameList - */ -const se_ColumnNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ColumnNameList omitted. -/** - * serializeAws_restJson1DatasetOwnerInfo - */ -const se_DatasetOwnerInfo = (input: DatasetOwnerInfo, context: __SerdeContext): any => { - return { - ...(input.email != null && { email: input.email }), - ...(input.name != null && { name: input.name }), - ...(input.phoneNumber != null && { phoneNumber: input.phoneNumber }), - }; -}; +// se_DatasetOwnerInfo omitted. -/** - * serializeAws_restJson1DataViewDestinationTypeParams - */ -const se_DataViewDestinationTypeParams = (input: DataViewDestinationTypeParams, context: __SerdeContext): any => { - return { - ...(input.destinationType != null && { destinationType: input.destinationType }), - ...(input.s3DestinationExportFileFormat != null && { - s3DestinationExportFileFormat: input.s3DestinationExportFileFormat, - }), - ...(input.s3DestinationExportFileFormatOptions != null && { - s3DestinationExportFileFormatOptions: se_S3DestinationFormatOptions( - input.s3DestinationExportFileFormatOptions, - context - ), - }), - }; -}; +// se_DataViewDestinationTypeParams omitted. -/** - * serializeAws_restJson1FormatParams - */ -const se_FormatParams = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FormatParams omitted. -/** - * serializeAws_restJson1PartitionColumnList - */ -const se_PartitionColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PartitionColumnList omitted. -/** - * serializeAws_restJson1PermissionGroupParams - */ -const se_PermissionGroupParams = (input: PermissionGroupParams, context: __SerdeContext): any => { - return { - ...(input.datasetPermissions != null && { - datasetPermissions: se_ResourcePermissionsList(input.datasetPermissions, context), - }), - ...(input.permissionGroupId != null && { permissionGroupId: input.permissionGroupId }), - }; -}; +// se_PermissionGroupParams omitted. -/** - * serializeAws_restJson1ResourcePermission - */ -const se_ResourcePermission = (input: ResourcePermission, context: __SerdeContext): any => { - return { - ...(input.permission != null && { permission: input.permission }), - }; -}; +// se_ResourcePermission omitted. -/** - * serializeAws_restJson1ResourcePermissionsList - */ -const se_ResourcePermissionsList = (input: ResourcePermission[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourcePermission(entry, context); - }); -}; +// se_ResourcePermissionsList omitted. -/** - * serializeAws_restJson1S3DestinationFormatOptions - */ -const se_S3DestinationFormatOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_S3DestinationFormatOptions omitted. -/** - * serializeAws_restJson1SchemaDefinition - */ -const se_SchemaDefinition = (input: SchemaDefinition, context: __SerdeContext): any => { - return { - ...(input.columns != null && { columns: se_ColumnList(input.columns, context) }), - ...(input.primaryKeyColumns != null && { primaryKeyColumns: se_ColumnNameList(input.primaryKeyColumns, context) }), - }; -}; +// se_SchemaDefinition omitted. -/** - * serializeAws_restJson1SchemaUnion - */ -const se_SchemaUnion = (input: SchemaUnion, context: __SerdeContext): any => { - return { - ...(input.tabularSchemaConfig != null && { - tabularSchemaConfig: se_SchemaDefinition(input.tabularSchemaConfig, context), - }), - }; -}; +// se_SchemaUnion omitted. -/** - * serializeAws_restJson1SortColumnList - */ -const se_SortColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SortColumnList omitted. -/** - * serializeAws_restJson1SourceParams - */ -const se_SourceParams = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SourceParams omitted. -/** - * deserializeAws_restJson1ApplicationPermissionList - */ -const de_ApplicationPermissionList = (output: any, context: __SerdeContext): (ApplicationPermission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ApplicationPermissionList omitted. -/** - * deserializeAws_restJson1AwsCredentials - */ -const de_AwsCredentials = (output: any, context: __SerdeContext): AwsCredentials => { - return { - accessKeyId: __expectString(output.accessKeyId), - expiration: __expectLong(output.expiration), - secretAccessKey: __expectString(output.secretAccessKey), - sessionToken: __expectString(output.sessionToken), - } as any; -}; +// de_AwsCredentials omitted. -/** - * deserializeAws_restJson1ChangesetErrorInfo - */ -const de_ChangesetErrorInfo = (output: any, context: __SerdeContext): ChangesetErrorInfo => { - return { - errorCategory: __expectString(output.errorCategory), - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_ChangesetErrorInfo omitted. -/** - * deserializeAws_restJson1ChangesetList - */ -const de_ChangesetList = (output: any, context: __SerdeContext): ChangesetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChangesetSummary(entry, context); - }); - return retVal; -}; +// de_ChangesetList omitted. -/** - * deserializeAws_restJson1ChangesetSummary - */ -const de_ChangesetSummary = (output: any, context: __SerdeContext): ChangesetSummary => { - return { - activeFromTimestamp: __expectLong(output.activeFromTimestamp), - activeUntilTimestamp: __expectLong(output.activeUntilTimestamp), - changeType: __expectString(output.changeType), - changesetArn: __expectString(output.changesetArn), - changesetId: __expectString(output.changesetId), - createTime: __expectLong(output.createTime), - datasetId: __expectString(output.datasetId), - errorInfo: output.errorInfo != null ? de_ChangesetErrorInfo(output.errorInfo, context) : undefined, - formatParams: output.formatParams != null ? de_FormatParams(output.formatParams, context) : undefined, - sourceParams: output.sourceParams != null ? de_SourceParams(output.sourceParams, context) : undefined, - status: __expectString(output.status), - updatedByChangesetId: __expectString(output.updatedByChangesetId), - updatesChangesetId: __expectString(output.updatesChangesetId), - } as any; -}; +// de_ChangesetSummary omitted. -/** - * deserializeAws_restJson1ColumnDefinition - */ -const de_ColumnDefinition = (output: any, context: __SerdeContext): ColumnDefinition => { - return { - columnDescription: __expectString(output.columnDescription), - columnName: __expectString(output.columnName), - dataType: __expectString(output.dataType), - } as any; -}; +// de_ColumnDefinition omitted. -/** - * deserializeAws_restJson1ColumnList - */ -const de_ColumnList = (output: any, context: __SerdeContext): ColumnDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnDefinition(entry, context); - }); - return retVal; -}; +// de_ColumnList omitted. -/** - * deserializeAws_restJson1ColumnNameList - */ -const de_ColumnNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ColumnNameList omitted. -/** - * deserializeAws_restJson1Credentials - */ -const de_Credentials = (output: any, context: __SerdeContext): Credentials => { - return { - accessKeyId: __expectString(output.accessKeyId), - secretAccessKey: __expectString(output.secretAccessKey), - sessionToken: __expectString(output.sessionToken), - } as any; -}; +// de_Credentials omitted. -/** - * deserializeAws_restJson1Dataset - */ -const de_Dataset = (output: any, context: __SerdeContext): Dataset => { - return { - alias: __expectString(output.alias), - createTime: __expectLong(output.createTime), - datasetArn: __expectString(output.datasetArn), - datasetDescription: __expectString(output.datasetDescription), - datasetId: __expectString(output.datasetId), - datasetTitle: __expectString(output.datasetTitle), - kind: __expectString(output.kind), - lastModifiedTime: __expectLong(output.lastModifiedTime), - ownerInfo: output.ownerInfo != null ? de_DatasetOwnerInfo(output.ownerInfo, context) : undefined, - schemaDefinition: output.schemaDefinition != null ? de_SchemaUnion(output.schemaDefinition, context) : undefined, - } as any; -}; +// de_Dataset omitted. -/** - * deserializeAws_restJson1DatasetList - */ -const de_DatasetList = (output: any, context: __SerdeContext): Dataset[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Dataset(entry, context); - }); - return retVal; -}; +// de_DatasetList omitted. -/** - * deserializeAws_restJson1DatasetOwnerInfo - */ -const de_DatasetOwnerInfo = (output: any, context: __SerdeContext): DatasetOwnerInfo => { - return { - email: __expectString(output.email), - name: __expectString(output.name), - phoneNumber: __expectString(output.phoneNumber), - } as any; -}; +// de_DatasetOwnerInfo omitted. -/** - * deserializeAws_restJson1DataViewDestinationTypeParams - */ -const de_DataViewDestinationTypeParams = (output: any, context: __SerdeContext): DataViewDestinationTypeParams => { - return { - destinationType: __expectString(output.destinationType), - s3DestinationExportFileFormat: __expectString(output.s3DestinationExportFileFormat), - s3DestinationExportFileFormatOptions: - output.s3DestinationExportFileFormatOptions != null - ? de_S3DestinationFormatOptions(output.s3DestinationExportFileFormatOptions, context) - : undefined, - } as any; -}; +// de_DataViewDestinationTypeParams omitted. -/** - * deserializeAws_restJson1DataViewErrorInfo - */ -const de_DataViewErrorInfo = (output: any, context: __SerdeContext): DataViewErrorInfo => { - return { - errorCategory: __expectString(output.errorCategory), - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_DataViewErrorInfo omitted. -/** - * deserializeAws_restJson1DataViewList - */ -const de_DataViewList = (output: any, context: __SerdeContext): DataViewSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataViewSummary(entry, context); - }); - return retVal; -}; +// de_DataViewList omitted. -/** - * deserializeAws_restJson1DataViewSummary - */ -const de_DataViewSummary = (output: any, context: __SerdeContext): DataViewSummary => { - return { - asOfTimestamp: __expectLong(output.asOfTimestamp), - autoUpdate: __expectBoolean(output.autoUpdate), - createTime: __expectLong(output.createTime), - dataViewArn: __expectString(output.dataViewArn), - dataViewId: __expectString(output.dataViewId), - datasetId: __expectString(output.datasetId), - destinationTypeProperties: - output.destinationTypeProperties != null - ? de_DataViewDestinationTypeParams(output.destinationTypeProperties, context) - : undefined, - errorInfo: output.errorInfo != null ? de_DataViewErrorInfo(output.errorInfo, context) : undefined, - lastModifiedTime: __expectLong(output.lastModifiedTime), - partitionColumns: - output.partitionColumns != null ? de_PartitionColumnList(output.partitionColumns, context) : undefined, - sortColumns: output.sortColumns != null ? de_SortColumnList(output.sortColumns, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_DataViewSummary omitted. -/** - * deserializeAws_restJson1FormatParams - */ -const de_FormatParams = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FormatParams omitted. -/** - * deserializeAws_restJson1PartitionColumnList - */ -const de_PartitionColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PartitionColumnList omitted. -/** - * deserializeAws_restJson1PermissionGroup - */ -const de_PermissionGroup = (output: any, context: __SerdeContext): PermissionGroup => { - return { - applicationPermissions: - output.applicationPermissions != null - ? de_ApplicationPermissionList(output.applicationPermissions, context) - : undefined, - createTime: __expectLong(output.createTime), - description: __expectString(output.description), - lastModifiedTime: __expectLong(output.lastModifiedTime), - membershipStatus: __expectString(output.membershipStatus), - name: __expectString(output.name), - permissionGroupId: __expectString(output.permissionGroupId), - } as any; -}; +// de_PermissionGroup omitted. -/** - * deserializeAws_restJson1PermissionGroupByUser - */ -const de_PermissionGroupByUser = (output: any, context: __SerdeContext): PermissionGroupByUser => { - return { - membershipStatus: __expectString(output.membershipStatus), - name: __expectString(output.name), - permissionGroupId: __expectString(output.permissionGroupId), - } as any; -}; +// de_PermissionGroupByUser omitted. -/** - * deserializeAws_restJson1PermissionGroupByUserList - */ -const de_PermissionGroupByUserList = (output: any, context: __SerdeContext): PermissionGroupByUser[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PermissionGroupByUser(entry, context); - }); - return retVal; -}; +// de_PermissionGroupByUserList omitted. -/** - * deserializeAws_restJson1PermissionGroupList - */ -const de_PermissionGroupList = (output: any, context: __SerdeContext): PermissionGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PermissionGroup(entry, context); - }); - return retVal; -}; +// de_PermissionGroupList omitted. -/** - * deserializeAws_restJson1S3DestinationFormatOptions - */ -const de_S3DestinationFormatOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_S3DestinationFormatOptions omitted. -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1SchemaDefinition - */ -const de_SchemaDefinition = (output: any, context: __SerdeContext): SchemaDefinition => { - return { - columns: output.columns != null ? de_ColumnList(output.columns, context) : undefined, - primaryKeyColumns: - output.primaryKeyColumns != null ? de_ColumnNameList(output.primaryKeyColumns, context) : undefined, - } as any; -}; +// de_SchemaDefinition omitted. -/** - * deserializeAws_restJson1SchemaUnion - */ -const de_SchemaUnion = (output: any, context: __SerdeContext): SchemaUnion => { - return { - tabularSchemaConfig: - output.tabularSchemaConfig != null ? de_SchemaDefinition(output.tabularSchemaConfig, context) : undefined, - } as any; -}; +// de_SchemaUnion omitted. -/** - * deserializeAws_restJson1SortColumnList - */ -const de_SortColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SortColumnList omitted. -/** - * deserializeAws_restJson1SourceParams - */ -const de_SourceParams = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1User - */ -const de_User = (output: any, context: __SerdeContext): User => { - return { - apiAccess: __expectString(output.apiAccess), - apiAccessPrincipalArn: __expectString(output.apiAccessPrincipalArn), - createTime: __expectLong(output.createTime), - emailAddress: __expectString(output.emailAddress), - firstName: __expectString(output.firstName), - lastDisabledTime: __expectLong(output.lastDisabledTime), - lastEnabledTime: __expectLong(output.lastEnabledTime), - lastLoginTime: __expectLong(output.lastLoginTime), - lastModifiedTime: __expectLong(output.lastModifiedTime), - lastName: __expectString(output.lastName), - status: __expectString(output.status), - type: __expectString(output.type), - userId: __expectString(output.userId), - } as any; -}; - -/** - * deserializeAws_restJson1UserByPermissionGroup - */ -const de_UserByPermissionGroup = (output: any, context: __SerdeContext): UserByPermissionGroup => { - return { - apiAccess: __expectString(output.apiAccess), - apiAccessPrincipalArn: __expectString(output.apiAccessPrincipalArn), - emailAddress: __expectString(output.emailAddress), - firstName: __expectString(output.firstName), - lastName: __expectString(output.lastName), - membershipStatus: __expectString(output.membershipStatus), - status: __expectString(output.status), - type: __expectString(output.type), - userId: __expectString(output.userId), - } as any; -}; - -/** - * deserializeAws_restJson1UserByPermissionGroupList - */ -const de_UserByPermissionGroupList = (output: any, context: __SerdeContext): UserByPermissionGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserByPermissionGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1UserList - */ -const de_UserList = (output: any, context: __SerdeContext): User[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_User(entry, context); - }); - return retVal; -}; +// de_SourceParams omitted. + +// de_User omitted. + +// de_UserByPermissionGroup omitted. + +// de_UserByPermissionGroupList omitted. + +// de_UserList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-finspace/src/protocols/Aws_restJson1.ts b/clients/client-finspace/src/protocols/Aws_restJson1.ts index 27d42958d327..d8f1d4f2ddbb 100644 --- a/clients/client-finspace/src/protocols/Aws_restJson1.ts +++ b/clients/client-finspace/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -30,7 +32,6 @@ import { UpdateEnvironmentCommandInput, UpdateEnvironmentCommandOutput } from ". import { FinspaceServiceException as __BaseException } from "../models/FinspaceServiceException"; import { AccessDeniedException, - Environment, FederationParameters, InternalServerException, InvalidRequestException, @@ -55,20 +56,18 @@ export const se_CreateEnvironmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environment"; let body: any; - body = JSON.stringify({ - ...(input.dataBundles != null && { dataBundles: se_DataBundleArns(input.dataBundles, context) }), - ...(input.description != null && { description: input.description }), - ...(input.federationMode != null && { federationMode: input.federationMode }), - ...(input.federationParameters != null && { - federationParameters: se_FederationParameters(input.federationParameters, context), - }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.name != null && { name: input.name }), - ...(input.superuserParameters != null && { - superuserParameters: se_SuperuserParameters(input.superuserParameters, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + dataBundles: (_) => _json(_), + description: [], + federationMode: [], + federationParameters: (_) => _json(_), + kmsKeyId: [], + name: [], + superuserParameters: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -206,9 +205,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -272,14 +273,14 @@ export const se_UpdateEnvironmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.federationMode != null && { federationMode: input.federationMode }), - ...(input.federationParameters != null && { - federationParameters: se_FederationParameters(input.federationParameters, context), - }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + federationMode: [], + federationParameters: (_) => _json(_), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -305,15 +306,12 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environmentArn != null) { - contents.environmentArn = __expectString(data.environmentArn); - } - if (data.environmentId != null) { - contents.environmentId = __expectString(data.environmentId); - } - if (data.environmentUrl != null) { - contents.environmentUrl = __expectString(data.environmentUrl); - } + const doc = take(data, { + environmentArn: __expectString, + environmentId: __expectString, + environmentUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -350,10 +348,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -406,10 +403,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -429,9 +425,10 @@ export const de_GetEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } + const doc = take(data, { + environment: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -462,10 +459,9 @@ const de_GetEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -485,12 +481,11 @@ export const de_ListEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environments != null) { - contents.environments = de_EnvironmentList(data.environments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + environments: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -515,10 +510,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -538,9 +532,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -568,10 +563,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -618,10 +612,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -668,10 +661,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -691,9 +683,10 @@ export const de_UpdateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } + const doc = take(data, { + environment: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -727,16 +720,15 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -746,6 +738,8 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -762,9 +756,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -781,9 +776,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -800,9 +796,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -819,9 +816,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -838,9 +836,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -854,6 +853,8 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -867,9 +868,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -877,143 +879,25 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AttributeMap - */ -const se_AttributeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AttributeMap omitted. -/** - * serializeAws_restJson1DataBundleArns - */ -const se_DataBundleArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataBundleArns omitted. -/** - * serializeAws_restJson1FederationParameters - */ -const se_FederationParameters = (input: FederationParameters, context: __SerdeContext): any => { - return { - ...(input.applicationCallBackURL != null && { applicationCallBackURL: input.applicationCallBackURL }), - ...(input.attributeMap != null && { attributeMap: se_AttributeMap(input.attributeMap, context) }), - ...(input.federationProviderName != null && { federationProviderName: input.federationProviderName }), - ...(input.federationURN != null && { federationURN: input.federationURN }), - ...(input.samlMetadataDocument != null && { samlMetadataDocument: input.samlMetadataDocument }), - ...(input.samlMetadataURL != null && { samlMetadataURL: input.samlMetadataURL }), - }; -}; +// se_FederationParameters omitted. -/** - * serializeAws_restJson1SuperuserParameters - */ -const se_SuperuserParameters = (input: SuperuserParameters, context: __SerdeContext): any => { - return { - ...(input.emailAddress != null && { emailAddress: input.emailAddress }), - ...(input.firstName != null && { firstName: input.firstName }), - ...(input.lastName != null && { lastName: input.lastName }), - }; -}; +// se_SuperuserParameters omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1AttributeMap - */ -const de_AttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AttributeMap omitted. -/** - * deserializeAws_restJson1Environment - */ -const de_Environment = (output: any, context: __SerdeContext): Environment => { - return { - awsAccountId: __expectString(output.awsAccountId), - dedicatedServiceAccountId: __expectString(output.dedicatedServiceAccountId), - description: __expectString(output.description), - environmentArn: __expectString(output.environmentArn), - environmentId: __expectString(output.environmentId), - environmentUrl: __expectString(output.environmentUrl), - federationMode: __expectString(output.federationMode), - federationParameters: - output.federationParameters != null ? de_FederationParameters(output.federationParameters, context) : undefined, - kmsKeyId: __expectString(output.kmsKeyId), - name: __expectString(output.name), - sageMakerStudioDomainUrl: __expectString(output.sageMakerStudioDomainUrl), - status: __expectString(output.status), - } as any; -}; +// de_Environment omitted. -/** - * deserializeAws_restJson1EnvironmentList - */ -const de_EnvironmentList = (output: any, context: __SerdeContext): Environment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Environment(entry, context); - }); - return retVal; -}; +// de_EnvironmentList omitted. -/** - * deserializeAws_restJson1FederationParameters - */ -const de_FederationParameters = (output: any, context: __SerdeContext): FederationParameters => { - return { - applicationCallBackURL: __expectString(output.applicationCallBackURL), - attributeMap: output.attributeMap != null ? de_AttributeMap(output.attributeMap, context) : undefined, - federationProviderName: __expectString(output.federationProviderName), - federationURN: __expectString(output.federationURN), - samlMetadataDocument: __expectString(output.samlMetadataDocument), - samlMetadataURL: __expectString(output.samlMetadataURL), - } as any; -}; +// de_FederationParameters omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-firehose/src/protocols/Aws_json1_1.ts b/clients/client-firehose/src/protocols/Aws_json1_1.ts index 956fde5e485c..43ae03f6b3ee 100644 --- a/clients/client-firehose/src/protocols/Aws_json1_1.ts +++ b/clients/client-firehose/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,7 +11,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -60,12 +62,10 @@ import { _Record, AmazonOpenSearchServerlessBufferingHints, AmazonOpenSearchServerlessDestinationConfiguration, - AmazonOpenSearchServerlessDestinationDescription, AmazonOpenSearchServerlessDestinationUpdate, AmazonOpenSearchServerlessRetryOptions, AmazonopensearchserviceBufferingHints, AmazonopensearchserviceDestinationConfiguration, - AmazonopensearchserviceDestinationDescription, AmazonopensearchserviceDestinationUpdate, AmazonopensearchserviceRetryOptions, BufferingHints, @@ -73,12 +73,9 @@ import { ConcurrentModificationException, CopyCommand, CreateDeliveryStreamInput, - CreateDeliveryStreamOutput, DataFormatConversionConfiguration, DeleteDeliveryStreamInput, - DeleteDeliveryStreamOutput, DeliveryStreamDescription, - DeliveryStreamEncryptionConfiguration, DeliveryStreamEncryptionConfigurationInput, DescribeDeliveryStreamInput, DescribeDeliveryStreamOutput, @@ -87,21 +84,17 @@ import { DynamicPartitioningConfiguration, ElasticsearchBufferingHints, ElasticsearchDestinationConfiguration, - ElasticsearchDestinationDescription, ElasticsearchDestinationUpdate, ElasticsearchRetryOptions, EncryptionConfiguration, ExtendedS3DestinationConfiguration, ExtendedS3DestinationDescription, ExtendedS3DestinationUpdate, - FailureDescription, HiveJsonSerDe, HttpEndpointBufferingHints, HttpEndpointCommonAttribute, HttpEndpointConfiguration, - HttpEndpointDescription, HttpEndpointDestinationConfiguration, - HttpEndpointDestinationDescription, HttpEndpointDestinationUpdate, HttpEndpointRequestConfiguration, HttpEndpointRetryOptions, @@ -113,9 +106,7 @@ import { KMSEncryptionConfig, LimitExceededException, ListDeliveryStreamsInput, - ListDeliveryStreamsOutput, ListTagsForDeliveryStreamInput, - ListTagsForDeliveryStreamOutput, OpenXJsonSerDe, OrcSerDe, OutputFormatConfiguration, @@ -124,41 +115,29 @@ import { Processor, ProcessorParameter, PutRecordBatchInput, - PutRecordBatchOutput, - PutRecordBatchResponseEntry, PutRecordInput, - PutRecordOutput, RedshiftDestinationConfiguration, - RedshiftDestinationDescription, RedshiftDestinationUpdate, RedshiftRetryOptions, ResourceInUseException, ResourceNotFoundException, RetryOptions, S3DestinationConfiguration, - S3DestinationDescription, S3DestinationUpdate, SchemaConfiguration, Serializer, ServiceUnavailableException, SourceDescription, SplunkDestinationConfiguration, - SplunkDestinationDescription, SplunkDestinationUpdate, SplunkRetryOptions, StartDeliveryStreamEncryptionInput, - StartDeliveryStreamEncryptionOutput, StopDeliveryStreamEncryptionInput, - StopDeliveryStreamEncryptionOutput, Tag, TagDeliveryStreamInput, - TagDeliveryStreamOutput, UntagDeliveryStreamInput, - UntagDeliveryStreamOutput, UpdateDestinationInput, - UpdateDestinationOutput, VpcConfiguration, - VpcConfigurationDescription, } from "../models/models_0"; /** @@ -183,7 +162,7 @@ export const se_DeleteDeliveryStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDeliveryStream"); let body: any; - body = JSON.stringify(se_DeleteDeliveryStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -196,7 +175,7 @@ export const se_DescribeDeliveryStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDeliveryStream"); let body: any; - body = JSON.stringify(se_DescribeDeliveryStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -209,7 +188,7 @@ export const se_ListDeliveryStreamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeliveryStreams"); let body: any; - body = JSON.stringify(se_ListDeliveryStreamsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -222,7 +201,7 @@ export const se_ListTagsForDeliveryStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForDeliveryStream"); let body: any; - body = JSON.stringify(se_ListTagsForDeliveryStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -261,7 +240,7 @@ export const se_StartDeliveryStreamEncryptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDeliveryStreamEncryption"); let body: any; - body = JSON.stringify(se_StartDeliveryStreamEncryptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -274,7 +253,7 @@ export const se_StopDeliveryStreamEncryptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopDeliveryStreamEncryption"); let body: any; - body = JSON.stringify(se_StopDeliveryStreamEncryptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -287,7 +266,7 @@ export const se_TagDeliveryStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagDeliveryStream"); let body: any; - body = JSON.stringify(se_TagDeliveryStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -300,7 +279,7 @@ export const se_UntagDeliveryStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagDeliveryStream"); let body: any; - body = JSON.stringify(se_UntagDeliveryStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -329,12 +308,12 @@ export const de_CreateDeliveryStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDeliveryStreamOutput(data, context); + contents = _json(data); const response: CreateDeliveryStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -364,10 +343,9 @@ const de_CreateDeliveryStreamCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -385,12 +363,12 @@ export const de_DeleteDeliveryStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDeliveryStreamOutput(data, context); + contents = _json(data); const response: DeleteDeliveryStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -414,10 +392,9 @@ const de_DeleteDeliveryStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -440,7 +417,7 @@ export const de_DescribeDeliveryStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -461,10 +438,9 @@ const de_DescribeDeliveryStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -482,12 +458,12 @@ export const de_ListDeliveryStreamsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDeliveryStreamsOutput(data, context); + contents = _json(data); const response: ListDeliveryStreamsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -503,10 +479,9 @@ const de_ListDeliveryStreamsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -523,12 +498,12 @@ export const de_ListTagsForDeliveryStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForDeliveryStreamOutput(data, context); + contents = _json(data); const response: ListTagsForDeliveryStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -555,10 +530,9 @@ const de_ListTagsForDeliveryStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -576,12 +550,12 @@ export const de_PutRecordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRecordOutput(data, context); + contents = _json(data); const response: PutRecordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -611,10 +585,9 @@ const de_PutRecordCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -632,12 +605,12 @@ export const de_PutRecordBatchCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRecordBatchOutput(data, context); + contents = _json(data); const response: PutRecordBatchCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -667,10 +640,9 @@ const de_PutRecordBatchCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -688,12 +660,12 @@ export const de_StartDeliveryStreamEncryptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDeliveryStreamEncryptionOutput(data, context); + contents = _json(data); const response: StartDeliveryStreamEncryptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -726,10 +698,9 @@ const de_StartDeliveryStreamEncryptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -747,12 +718,12 @@ export const de_StopDeliveryStreamEncryptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopDeliveryStreamEncryptionOutput(data, context); + contents = _json(data); const response: StopDeliveryStreamEncryptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -782,10 +753,9 @@ const de_StopDeliveryStreamEncryptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -803,12 +773,12 @@ export const de_TagDeliveryStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagDeliveryStreamOutput(data, context); + contents = _json(data); const response: TagDeliveryStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -838,10 +808,9 @@ const de_TagDeliveryStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -859,12 +828,12 @@ export const de_UntagDeliveryStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagDeliveryStreamOutput(data, context); + contents = _json(data); const response: UntagDeliveryStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -894,10 +863,9 @@ const de_UntagDeliveryStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -915,12 +883,12 @@ export const de_UpdateDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDestinationOutput(data, context); + contents = _json(data); const response: UpdateDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -950,10 +918,9 @@ const de_UpdateDestinationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -967,7 +934,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -983,7 +950,7 @@ const de_InvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -999,7 +966,7 @@ const de_InvalidKMSResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKMSResourceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidKMSResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1015,7 +982,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1031,7 +998,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1047,7 +1014,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1063,7 +1030,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1071,286 +1038,49 @@ const de_ServiceUnavailableExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AmazonOpenSearchServerlessBufferingHints - */ -const se_AmazonOpenSearchServerlessBufferingHints = ( - input: AmazonOpenSearchServerlessBufferingHints, - context: __SerdeContext -): any => { - return { - ...(input.IntervalInSeconds != null && { IntervalInSeconds: input.IntervalInSeconds }), - ...(input.SizeInMBs != null && { SizeInMBs: input.SizeInMBs }), - }; -}; +// se_AmazonOpenSearchServerlessBufferingHints omitted. -/** - * serializeAws_json1_1AmazonOpenSearchServerlessDestinationConfiguration - */ -const se_AmazonOpenSearchServerlessDestinationConfiguration = ( - input: AmazonOpenSearchServerlessDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_AmazonOpenSearchServerlessBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.CollectionEndpoint != null && { CollectionEndpoint: input.CollectionEndpoint }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { - RetryOptions: se_AmazonOpenSearchServerlessRetryOptions(input.RetryOptions, context), - }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DestinationConfiguration(input.S3Configuration, context), - }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; +// se_AmazonOpenSearchServerlessDestinationConfiguration omitted. -/** - * serializeAws_json1_1AmazonOpenSearchServerlessDestinationUpdate - */ -const se_AmazonOpenSearchServerlessDestinationUpdate = ( - input: AmazonOpenSearchServerlessDestinationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_AmazonOpenSearchServerlessBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.CollectionEndpoint != null && { CollectionEndpoint: input.CollectionEndpoint }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { - RetryOptions: se_AmazonOpenSearchServerlessRetryOptions(input.RetryOptions, context), - }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3Update != null && { S3Update: se_S3DestinationUpdate(input.S3Update, context) }), - }; -}; +// se_AmazonOpenSearchServerlessDestinationUpdate omitted. -/** - * serializeAws_json1_1AmazonOpenSearchServerlessRetryOptions - */ -const se_AmazonOpenSearchServerlessRetryOptions = ( - input: AmazonOpenSearchServerlessRetryOptions, - context: __SerdeContext -): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; +// se_AmazonOpenSearchServerlessRetryOptions omitted. -/** - * serializeAws_json1_1AmazonopensearchserviceBufferingHints - */ -const se_AmazonopensearchserviceBufferingHints = ( - input: AmazonopensearchserviceBufferingHints, - context: __SerdeContext -): any => { - return { - ...(input.IntervalInSeconds != null && { IntervalInSeconds: input.IntervalInSeconds }), - ...(input.SizeInMBs != null && { SizeInMBs: input.SizeInMBs }), - }; -}; +// se_AmazonopensearchserviceBufferingHints omitted. -/** - * serializeAws_json1_1AmazonopensearchserviceDestinationConfiguration - */ -const se_AmazonopensearchserviceDestinationConfiguration = ( - input: AmazonopensearchserviceDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_AmazonopensearchserviceBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.ClusterEndpoint != null && { ClusterEndpoint: input.ClusterEndpoint }), - ...(input.DomainARN != null && { DomainARN: input.DomainARN }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.IndexRotationPeriod != null && { IndexRotationPeriod: input.IndexRotationPeriod }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { - RetryOptions: se_AmazonopensearchserviceRetryOptions(input.RetryOptions, context), - }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DestinationConfiguration(input.S3Configuration, context), - }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; +// se_AmazonopensearchserviceDestinationConfiguration omitted. -/** - * serializeAws_json1_1AmazonopensearchserviceDestinationUpdate - */ -const se_AmazonopensearchserviceDestinationUpdate = ( - input: AmazonopensearchserviceDestinationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_AmazonopensearchserviceBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.ClusterEndpoint != null && { ClusterEndpoint: input.ClusterEndpoint }), - ...(input.DomainARN != null && { DomainARN: input.DomainARN }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.IndexRotationPeriod != null && { IndexRotationPeriod: input.IndexRotationPeriod }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { - RetryOptions: se_AmazonopensearchserviceRetryOptions(input.RetryOptions, context), - }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3Update != null && { S3Update: se_S3DestinationUpdate(input.S3Update, context) }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; +// se_AmazonopensearchserviceDestinationUpdate omitted. -/** - * serializeAws_json1_1AmazonopensearchserviceRetryOptions - */ -const se_AmazonopensearchserviceRetryOptions = ( - input: AmazonopensearchserviceRetryOptions, - context: __SerdeContext -): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; +// se_AmazonopensearchserviceRetryOptions omitted. -/** - * serializeAws_json1_1BufferingHints - */ -const se_BufferingHints = (input: BufferingHints, context: __SerdeContext): any => { - return { - ...(input.IntervalInSeconds != null && { IntervalInSeconds: input.IntervalInSeconds }), - ...(input.SizeInMBs != null && { SizeInMBs: input.SizeInMBs }), - }; -}; +// se_BufferingHints omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptions - */ -const se_CloudWatchLoggingOptions = (input: CloudWatchLoggingOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.LogGroupName != null && { LogGroupName: input.LogGroupName }), - ...(input.LogStreamName != null && { LogStreamName: input.LogStreamName }), - }; -}; +// se_CloudWatchLoggingOptions omitted. -/** - * serializeAws_json1_1ColumnToJsonKeyMappings - */ -const se_ColumnToJsonKeyMappings = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ColumnToJsonKeyMappings omitted. -/** - * serializeAws_json1_1CopyCommand - */ -const se_CopyCommand = (input: CopyCommand, context: __SerdeContext): any => { - return { - ...(input.CopyOptions != null && { CopyOptions: input.CopyOptions }), - ...(input.DataTableColumns != null && { DataTableColumns: input.DataTableColumns }), - ...(input.DataTableName != null && { DataTableName: input.DataTableName }), - }; -}; +// se_CopyCommand omitted. /** * serializeAws_json1_1CreateDeliveryStreamInput */ const se_CreateDeliveryStreamInput = (input: CreateDeliveryStreamInput, context: __SerdeContext): any => { - return { - ...(input.AmazonOpenSearchServerlessDestinationConfiguration != null && { - AmazonOpenSearchServerlessDestinationConfiguration: se_AmazonOpenSearchServerlessDestinationConfiguration( - input.AmazonOpenSearchServerlessDestinationConfiguration, - context - ), - }), - ...(input.AmazonopensearchserviceDestinationConfiguration != null && { - AmazonopensearchserviceDestinationConfiguration: se_AmazonopensearchserviceDestinationConfiguration( - input.AmazonopensearchserviceDestinationConfiguration, - context - ), - }), - ...(input.DeliveryStreamEncryptionConfigurationInput != null && { - DeliveryStreamEncryptionConfigurationInput: se_DeliveryStreamEncryptionConfigurationInput( - input.DeliveryStreamEncryptionConfigurationInput, - context - ), - }), - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.DeliveryStreamType != null && { DeliveryStreamType: input.DeliveryStreamType }), - ...(input.ElasticsearchDestinationConfiguration != null && { - ElasticsearchDestinationConfiguration: se_ElasticsearchDestinationConfiguration( - input.ElasticsearchDestinationConfiguration, - context - ), - }), - ...(input.ExtendedS3DestinationConfiguration != null && { - ExtendedS3DestinationConfiguration: se_ExtendedS3DestinationConfiguration( - input.ExtendedS3DestinationConfiguration, - context - ), - }), - ...(input.HttpEndpointDestinationConfiguration != null && { - HttpEndpointDestinationConfiguration: se_HttpEndpointDestinationConfiguration( - input.HttpEndpointDestinationConfiguration, - context - ), - }), - ...(input.KinesisStreamSourceConfiguration != null && { - KinesisStreamSourceConfiguration: se_KinesisStreamSourceConfiguration( - input.KinesisStreamSourceConfiguration, - context - ), - }), - ...(input.RedshiftDestinationConfiguration != null && { - RedshiftDestinationConfiguration: se_RedshiftDestinationConfiguration( - input.RedshiftDestinationConfiguration, - context - ), - }), - ...(input.S3DestinationConfiguration != null && { - S3DestinationConfiguration: se_S3DestinationConfiguration(input.S3DestinationConfiguration, context), - }), - ...(input.SplunkDestinationConfiguration != null && { - SplunkDestinationConfiguration: se_SplunkDestinationConfiguration(input.SplunkDestinationConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagDeliveryStreamInputTagList(input.Tags, context) }), - }; + return take(input, { + AmazonOpenSearchServerlessDestinationConfiguration: _json, + AmazonopensearchserviceDestinationConfiguration: _json, + DeliveryStreamEncryptionConfigurationInput: _json, + DeliveryStreamName: [], + DeliveryStreamType: [], + ElasticsearchDestinationConfiguration: _json, + ExtendedS3DestinationConfiguration: (_) => se_ExtendedS3DestinationConfiguration(_, context), + HttpEndpointDestinationConfiguration: _json, + KinesisStreamSourceConfiguration: _json, + RedshiftDestinationConfiguration: _json, + S3DestinationConfiguration: _json, + SplunkDestinationConfiguration: _json, + Tags: _json, + }); }; /** @@ -1360,163 +1090,33 @@ const se_DataFormatConversionConfiguration = ( input: DataFormatConversionConfiguration, context: __SerdeContext ): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.InputFormatConfiguration != null && { - InputFormatConfiguration: se_InputFormatConfiguration(input.InputFormatConfiguration, context), - }), - ...(input.OutputFormatConfiguration != null && { - OutputFormatConfiguration: se_OutputFormatConfiguration(input.OutputFormatConfiguration, context), - }), - ...(input.SchemaConfiguration != null && { - SchemaConfiguration: se_SchemaConfiguration(input.SchemaConfiguration, context), - }), - }; + return take(input, { + Enabled: [], + InputFormatConfiguration: _json, + OutputFormatConfiguration: (_) => se_OutputFormatConfiguration(_, context), + SchemaConfiguration: _json, + }); }; -/** - * serializeAws_json1_1DeleteDeliveryStreamInput - */ -const se_DeleteDeliveryStreamInput = (input: DeleteDeliveryStreamInput, context: __SerdeContext): any => { - return { - ...(input.AllowForceDelete != null && { AllowForceDelete: input.AllowForceDelete }), - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - }; -}; +// se_DeleteDeliveryStreamInput omitted. -/** - * serializeAws_json1_1DeliveryStreamEncryptionConfigurationInput - */ -const se_DeliveryStreamEncryptionConfigurationInput = ( - input: DeliveryStreamEncryptionConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.KeyARN != null && { KeyARN: input.KeyARN }), - ...(input.KeyType != null && { KeyType: input.KeyType }), - }; -}; +// se_DeliveryStreamEncryptionConfigurationInput omitted. -/** - * serializeAws_json1_1DescribeDeliveryStreamInput - */ -const se_DescribeDeliveryStreamInput = (input: DescribeDeliveryStreamInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.ExclusiveStartDestinationId != null && { - ExclusiveStartDestinationId: input.ExclusiveStartDestinationId, - }), - ...(input.Limit != null && { Limit: input.Limit }), - }; -}; +// se_DescribeDeliveryStreamInput omitted. -/** - * serializeAws_json1_1Deserializer - */ -const se_Deserializer = (input: Deserializer, context: __SerdeContext): any => { - return { - ...(input.HiveJsonSerDe != null && { HiveJsonSerDe: se_HiveJsonSerDe(input.HiveJsonSerDe, context) }), - ...(input.OpenXJsonSerDe != null && { OpenXJsonSerDe: se_OpenXJsonSerDe(input.OpenXJsonSerDe, context) }), - }; -}; +// se_Deserializer omitted. -/** - * serializeAws_json1_1DynamicPartitioningConfiguration - */ -const se_DynamicPartitioningConfiguration = (input: DynamicPartitioningConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.RetryOptions != null && { RetryOptions: se_RetryOptions(input.RetryOptions, context) }), - }; -}; +// se_DynamicPartitioningConfiguration omitted. -/** - * serializeAws_json1_1ElasticsearchBufferingHints - */ -const se_ElasticsearchBufferingHints = (input: ElasticsearchBufferingHints, context: __SerdeContext): any => { - return { - ...(input.IntervalInSeconds != null && { IntervalInSeconds: input.IntervalInSeconds }), - ...(input.SizeInMBs != null && { SizeInMBs: input.SizeInMBs }), - }; -}; +// se_ElasticsearchBufferingHints omitted. -/** - * serializeAws_json1_1ElasticsearchDestinationConfiguration - */ -const se_ElasticsearchDestinationConfiguration = ( - input: ElasticsearchDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_ElasticsearchBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.ClusterEndpoint != null && { ClusterEndpoint: input.ClusterEndpoint }), - ...(input.DomainARN != null && { DomainARN: input.DomainARN }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.IndexRotationPeriod != null && { IndexRotationPeriod: input.IndexRotationPeriod }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_ElasticsearchRetryOptions(input.RetryOptions, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DestinationConfiguration(input.S3Configuration, context), - }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; +// se_ElasticsearchDestinationConfiguration omitted. -/** - * serializeAws_json1_1ElasticsearchDestinationUpdate - */ -const se_ElasticsearchDestinationUpdate = (input: ElasticsearchDestinationUpdate, context: __SerdeContext): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_ElasticsearchBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.ClusterEndpoint != null && { ClusterEndpoint: input.ClusterEndpoint }), - ...(input.DomainARN != null && { DomainARN: input.DomainARN }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.IndexRotationPeriod != null && { IndexRotationPeriod: input.IndexRotationPeriod }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_ElasticsearchRetryOptions(input.RetryOptions, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3Update != null && { S3Update: se_S3DestinationUpdate(input.S3Update, context) }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; +// se_ElasticsearchDestinationUpdate omitted. -/** - * serializeAws_json1_1ElasticsearchRetryOptions - */ -const se_ElasticsearchRetryOptions = (input: ElasticsearchRetryOptions, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; +// se_ElasticsearchRetryOptions omitted. -/** - * serializeAws_json1_1EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.KMSEncryptionConfig != null && { - KMSEncryptionConfig: se_KMSEncryptionConfig(input.KMSEncryptionConfig, context), - }), - ...(input.NoEncryptionConfig != null && { NoEncryptionConfig: input.NoEncryptionConfig }), - }; -}; +// se_EncryptionConfiguration omitted. /** * serializeAws_json1_1ExtendedS3DestinationConfiguration @@ -1525,1953 +1125,519 @@ const se_ExtendedS3DestinationConfiguration = ( input: ExtendedS3DestinationConfiguration, context: __SerdeContext ): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.BufferingHints != null && { BufferingHints: se_BufferingHints(input.BufferingHints, context) }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.CompressionFormat != null && { CompressionFormat: input.CompressionFormat }), - ...(input.DataFormatConversionConfiguration != null && { - DataFormatConversionConfiguration: se_DataFormatConversionConfiguration( - input.DataFormatConversionConfiguration, - context - ), - }), - ...(input.DynamicPartitioningConfiguration != null && { - DynamicPartitioningConfiguration: se_DynamicPartitioningConfiguration( - input.DynamicPartitioningConfiguration, - context - ), - }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.ErrorOutputPrefix != null && { ErrorOutputPrefix: input.ErrorOutputPrefix }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupConfiguration != null && { - S3BackupConfiguration: se_S3DestinationConfiguration(input.S3BackupConfiguration, context), - }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - }; + return take(input, { + BucketARN: [], + BufferingHints: _json, + CloudWatchLoggingOptions: _json, + CompressionFormat: [], + DataFormatConversionConfiguration: (_) => se_DataFormatConversionConfiguration(_, context), + DynamicPartitioningConfiguration: _json, + EncryptionConfiguration: _json, + ErrorOutputPrefix: [], + Prefix: [], + ProcessingConfiguration: _json, + RoleARN: [], + S3BackupConfiguration: _json, + S3BackupMode: [], + }); }; /** * serializeAws_json1_1ExtendedS3DestinationUpdate */ const se_ExtendedS3DestinationUpdate = (input: ExtendedS3DestinationUpdate, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.BufferingHints != null && { BufferingHints: se_BufferingHints(input.BufferingHints, context) }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.CompressionFormat != null && { CompressionFormat: input.CompressionFormat }), - ...(input.DataFormatConversionConfiguration != null && { - DataFormatConversionConfiguration: se_DataFormatConversionConfiguration( - input.DataFormatConversionConfiguration, - context - ), - }), - ...(input.DynamicPartitioningConfiguration != null && { - DynamicPartitioningConfiguration: se_DynamicPartitioningConfiguration( - input.DynamicPartitioningConfiguration, - context - ), - }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.ErrorOutputPrefix != null && { ErrorOutputPrefix: input.ErrorOutputPrefix }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3BackupUpdate != null && { S3BackupUpdate: se_S3DestinationUpdate(input.S3BackupUpdate, context) }), - }; -}; - -/** - * serializeAws_json1_1HiveJsonSerDe - */ -const se_HiveJsonSerDe = (input: HiveJsonSerDe, context: __SerdeContext): any => { - return { - ...(input.TimestampFormats != null && { - TimestampFormats: se_ListOfNonEmptyStrings(input.TimestampFormats, context), - }), - }; -}; - -/** - * serializeAws_json1_1HttpEndpointBufferingHints - */ -const se_HttpEndpointBufferingHints = (input: HttpEndpointBufferingHints, context: __SerdeContext): any => { - return { - ...(input.IntervalInSeconds != null && { IntervalInSeconds: input.IntervalInSeconds }), - ...(input.SizeInMBs != null && { SizeInMBs: input.SizeInMBs }), - }; -}; - -/** - * serializeAws_json1_1HttpEndpointCommonAttribute - */ -const se_HttpEndpointCommonAttribute = (input: HttpEndpointCommonAttribute, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.AttributeValue != null && { AttributeValue: input.AttributeValue }), - }; -}; - -/** - * serializeAws_json1_1HttpEndpointCommonAttributesList - */ -const se_HttpEndpointCommonAttributesList = (input: HttpEndpointCommonAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HttpEndpointCommonAttribute(entry, context); - }); -}; - -/** - * serializeAws_json1_1HttpEndpointConfiguration - */ -const se_HttpEndpointConfiguration = (input: HttpEndpointConfiguration, context: __SerdeContext): any => { - return { - ...(input.AccessKey != null && { AccessKey: input.AccessKey }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Url != null && { Url: input.Url }), - }; + return take(input, { + BucketARN: [], + BufferingHints: _json, + CloudWatchLoggingOptions: _json, + CompressionFormat: [], + DataFormatConversionConfiguration: (_) => se_DataFormatConversionConfiguration(_, context), + DynamicPartitioningConfiguration: _json, + EncryptionConfiguration: _json, + ErrorOutputPrefix: [], + Prefix: [], + ProcessingConfiguration: _json, + RoleARN: [], + S3BackupMode: [], + S3BackupUpdate: _json, + }); }; -/** - * serializeAws_json1_1HttpEndpointDestinationConfiguration - */ -const se_HttpEndpointDestinationConfiguration = ( - input: HttpEndpointDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_HttpEndpointBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.EndpointConfiguration != null && { - EndpointConfiguration: se_HttpEndpointConfiguration(input.EndpointConfiguration, context), - }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RequestConfiguration != null && { - RequestConfiguration: se_HttpEndpointRequestConfiguration(input.RequestConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_HttpEndpointRetryOptions(input.RetryOptions, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DestinationConfiguration(input.S3Configuration, context), - }), - }; -}; +// se_HiveJsonSerDe omitted. -/** - * serializeAws_json1_1HttpEndpointDestinationUpdate - */ -const se_HttpEndpointDestinationUpdate = (input: HttpEndpointDestinationUpdate, context: __SerdeContext): any => { - return { - ...(input.BufferingHints != null && { - BufferingHints: se_HttpEndpointBufferingHints(input.BufferingHints, context), - }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.EndpointConfiguration != null && { - EndpointConfiguration: se_HttpEndpointConfiguration(input.EndpointConfiguration, context), - }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RequestConfiguration != null && { - RequestConfiguration: se_HttpEndpointRequestConfiguration(input.RequestConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_HttpEndpointRetryOptions(input.RetryOptions, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Update != null && { S3Update: se_S3DestinationUpdate(input.S3Update, context) }), - }; -}; +// se_HttpEndpointBufferingHints omitted. -/** - * serializeAws_json1_1HttpEndpointRequestConfiguration - */ -const se_HttpEndpointRequestConfiguration = (input: HttpEndpointRequestConfiguration, context: __SerdeContext): any => { - return { - ...(input.CommonAttributes != null && { - CommonAttributes: se_HttpEndpointCommonAttributesList(input.CommonAttributes, context), - }), - ...(input.ContentEncoding != null && { ContentEncoding: input.ContentEncoding }), - }; -}; +// se_HttpEndpointCommonAttribute omitted. -/** - * serializeAws_json1_1HttpEndpointRetryOptions - */ -const se_HttpEndpointRetryOptions = (input: HttpEndpointRetryOptions, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; +// se_HttpEndpointCommonAttributesList omitted. -/** - * serializeAws_json1_1InputFormatConfiguration - */ -const se_InputFormatConfiguration = (input: InputFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.Deserializer != null && { Deserializer: se_Deserializer(input.Deserializer, context) }), - }; -}; +// se_HttpEndpointConfiguration omitted. -/** - * serializeAws_json1_1KinesisStreamSourceConfiguration - */ -const se_KinesisStreamSourceConfiguration = (input: KinesisStreamSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.KinesisStreamARN != null && { KinesisStreamARN: input.KinesisStreamARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_HttpEndpointDestinationConfiguration omitted. -/** - * serializeAws_json1_1KMSEncryptionConfig - */ -const se_KMSEncryptionConfig = (input: KMSEncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.AWSKMSKeyARN != null && { AWSKMSKeyARN: input.AWSKMSKeyARN }), - }; -}; +// se_HttpEndpointDestinationUpdate omitted. -/** - * serializeAws_json1_1ListDeliveryStreamsInput - */ -const se_ListDeliveryStreamsInput = (input: ListDeliveryStreamsInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamType != null && { DeliveryStreamType: input.DeliveryStreamType }), - ...(input.ExclusiveStartDeliveryStreamName != null && { - ExclusiveStartDeliveryStreamName: input.ExclusiveStartDeliveryStreamName, - }), - ...(input.Limit != null && { Limit: input.Limit }), - }; -}; +// se_HttpEndpointRequestConfiguration omitted. -/** - * serializeAws_json1_1ListOfNonEmptyStrings - */ -const se_ListOfNonEmptyStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HttpEndpointRetryOptions omitted. -/** - * serializeAws_json1_1ListOfNonEmptyStringsWithoutWhitespace - */ -const se_ListOfNonEmptyStringsWithoutWhitespace = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InputFormatConfiguration omitted. -/** - * serializeAws_json1_1ListTagsForDeliveryStreamInput - */ -const se_ListTagsForDeliveryStreamInput = (input: ListTagsForDeliveryStreamInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.ExclusiveStartTagKey != null && { ExclusiveStartTagKey: input.ExclusiveStartTagKey }), - ...(input.Limit != null && { Limit: input.Limit }), - }; -}; +// se_KinesisStreamSourceConfiguration omitted. -/** - * serializeAws_json1_1OpenXJsonSerDe - */ -const se_OpenXJsonSerDe = (input: OpenXJsonSerDe, context: __SerdeContext): any => { - return { - ...(input.CaseInsensitive != null && { CaseInsensitive: input.CaseInsensitive }), - ...(input.ColumnToJsonKeyMappings != null && { - ColumnToJsonKeyMappings: se_ColumnToJsonKeyMappings(input.ColumnToJsonKeyMappings, context), - }), - ...(input.ConvertDotsInJsonKeysToUnderscores != null && { - ConvertDotsInJsonKeysToUnderscores: input.ConvertDotsInJsonKeysToUnderscores, - }), - }; -}; +// se_KMSEncryptionConfig omitted. -/** - * serializeAws_json1_1OrcSerDe - */ -const se_OrcSerDe = (input: OrcSerDe, context: __SerdeContext): any => { - return { - ...(input.BlockSizeBytes != null && { BlockSizeBytes: input.BlockSizeBytes }), - ...(input.BloomFilterColumns != null && { - BloomFilterColumns: se_ListOfNonEmptyStringsWithoutWhitespace(input.BloomFilterColumns, context), - }), - ...(input.BloomFilterFalsePositiveProbability != null && { - BloomFilterFalsePositiveProbability: __serializeFloat(input.BloomFilterFalsePositiveProbability), - }), - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.DictionaryKeyThreshold != null && { - DictionaryKeyThreshold: __serializeFloat(input.DictionaryKeyThreshold), - }), - ...(input.EnablePadding != null && { EnablePadding: input.EnablePadding }), - ...(input.FormatVersion != null && { FormatVersion: input.FormatVersion }), - ...(input.PaddingTolerance != null && { PaddingTolerance: __serializeFloat(input.PaddingTolerance) }), - ...(input.RowIndexStride != null && { RowIndexStride: input.RowIndexStride }), - ...(input.StripeSizeBytes != null && { StripeSizeBytes: input.StripeSizeBytes }), - }; -}; +// se_ListDeliveryStreamsInput omitted. -/** - * serializeAws_json1_1OutputFormatConfiguration - */ -const se_OutputFormatConfiguration = (input: OutputFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.Serializer != null && { Serializer: se_Serializer(input.Serializer, context) }), - }; -}; +// se_ListOfNonEmptyStrings omitted. -/** - * serializeAws_json1_1ParquetSerDe - */ -const se_ParquetSerDe = (input: ParquetSerDe, context: __SerdeContext): any => { - return { - ...(input.BlockSizeBytes != null && { BlockSizeBytes: input.BlockSizeBytes }), - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.EnableDictionaryCompression != null && { - EnableDictionaryCompression: input.EnableDictionaryCompression, - }), - ...(input.MaxPaddingBytes != null && { MaxPaddingBytes: input.MaxPaddingBytes }), - ...(input.PageSizeBytes != null && { PageSizeBytes: input.PageSizeBytes }), - ...(input.WriterVersion != null && { WriterVersion: input.WriterVersion }), - }; -}; - -/** - * serializeAws_json1_1ProcessingConfiguration - */ -const se_ProcessingConfiguration = (input: ProcessingConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.Processors != null && { Processors: se_ProcessorList(input.Processors, context) }), - }; -}; - -/** - * serializeAws_json1_1Processor - */ -const se_Processor = (input: Processor, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_ProcessorParameterList(input.Parameters, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1ProcessorList - */ -const se_ProcessorList = (input: Processor[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Processor(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProcessorParameter - */ -const se_ProcessorParameter = (input: ProcessorParameter, context: __SerdeContext): any => { - return { - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.ParameterValue != null && { ParameterValue: input.ParameterValue }), - }; -}; - -/** - * serializeAws_json1_1ProcessorParameterList - */ -const se_ProcessorParameterList = (input: ProcessorParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProcessorParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutRecordBatchInput - */ -const se_PutRecordBatchInput = (input: PutRecordBatchInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.Records != null && { Records: se_PutRecordBatchRequestEntryList(input.Records, context) }), - }; -}; - -/** - * serializeAws_json1_1PutRecordBatchRequestEntryList - */ -const se_PutRecordBatchRequestEntryList = (input: _Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se__Record(entry, context); - }); -}; - -/** - * serializeAws_json1_1PutRecordInput - */ -const se_PutRecordInput = (input: PutRecordInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.Record != null && { Record: se__Record(input.Record, context) }), - }; -}; - -/** - * serializeAws_json1_1_Record - */ -const se__Record = (input: _Record, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: context.base64Encoder(input.Data) }), - }; -}; - -/** - * serializeAws_json1_1RedshiftDestinationConfiguration - */ -const se_RedshiftDestinationConfiguration = (input: RedshiftDestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.ClusterJDBCURL != null && { ClusterJDBCURL: input.ClusterJDBCURL }), - ...(input.CopyCommand != null && { CopyCommand: se_CopyCommand(input.CopyCommand, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_RedshiftRetryOptions(input.RetryOptions, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupConfiguration != null && { - S3BackupConfiguration: se_S3DestinationConfiguration(input.S3BackupConfiguration, context), - }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DestinationConfiguration(input.S3Configuration, context), - }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1RedshiftDestinationUpdate - */ -const se_RedshiftDestinationUpdate = (input: RedshiftDestinationUpdate, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.ClusterJDBCURL != null && { ClusterJDBCURL: input.ClusterJDBCURL }), - ...(input.CopyCommand != null && { CopyCommand: se_CopyCommand(input.CopyCommand, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_RedshiftRetryOptions(input.RetryOptions, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3BackupUpdate != null && { S3BackupUpdate: se_S3DestinationUpdate(input.S3BackupUpdate, context) }), - ...(input.S3Update != null && { S3Update: se_S3DestinationUpdate(input.S3Update, context) }), - ...(input.Username != null && { Username: input.Username }), - }; -}; - -/** - * serializeAws_json1_1RedshiftRetryOptions - */ -const se_RedshiftRetryOptions = (input: RedshiftRetryOptions, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; - -/** - * serializeAws_json1_1RetryOptions - */ -const se_RetryOptions = (input: RetryOptions, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; - -/** - * serializeAws_json1_1S3DestinationConfiguration - */ -const se_S3DestinationConfiguration = (input: S3DestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.BufferingHints != null && { BufferingHints: se_BufferingHints(input.BufferingHints, context) }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.CompressionFormat != null && { CompressionFormat: input.CompressionFormat }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.ErrorOutputPrefix != null && { ErrorOutputPrefix: input.ErrorOutputPrefix }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; - -/** - * serializeAws_json1_1S3DestinationUpdate - */ -const se_S3DestinationUpdate = (input: S3DestinationUpdate, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.BufferingHints != null && { BufferingHints: se_BufferingHints(input.BufferingHints, context) }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.CompressionFormat != null && { CompressionFormat: input.CompressionFormat }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.ErrorOutputPrefix != null && { ErrorOutputPrefix: input.ErrorOutputPrefix }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; - -/** - * serializeAws_json1_1SchemaConfiguration - */ -const se_SchemaConfiguration = (input: SchemaConfiguration, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Region != null && { Region: input.Region }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Serializer - */ -const se_Serializer = (input: Serializer, context: __SerdeContext): any => { - return { - ...(input.OrcSerDe != null && { OrcSerDe: se_OrcSerDe(input.OrcSerDe, context) }), - ...(input.ParquetSerDe != null && { ParquetSerDe: se_ParquetSerDe(input.ParquetSerDe, context) }), - }; -}; - -/** - * serializeAws_json1_1SplunkDestinationConfiguration - */ -const se_SplunkDestinationConfiguration = (input: SplunkDestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.HECAcknowledgmentTimeoutInSeconds != null && { - HECAcknowledgmentTimeoutInSeconds: input.HECAcknowledgmentTimeoutInSeconds, - }), - ...(input.HECEndpoint != null && { HECEndpoint: input.HECEndpoint }), - ...(input.HECEndpointType != null && { HECEndpointType: input.HECEndpointType }), - ...(input.HECToken != null && { HECToken: input.HECToken }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_SplunkRetryOptions(input.RetryOptions, context) }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DestinationConfiguration(input.S3Configuration, context), - }), - }; -}; - -/** - * serializeAws_json1_1SplunkDestinationUpdate - */ -const se_SplunkDestinationUpdate = (input: SplunkDestinationUpdate, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.HECAcknowledgmentTimeoutInSeconds != null && { - HECAcknowledgmentTimeoutInSeconds: input.HECAcknowledgmentTimeoutInSeconds, - }), - ...(input.HECEndpoint != null && { HECEndpoint: input.HECEndpoint }), - ...(input.HECEndpointType != null && { HECEndpointType: input.HECEndpointType }), - ...(input.HECToken != null && { HECToken: input.HECToken }), - ...(input.ProcessingConfiguration != null && { - ProcessingConfiguration: se_ProcessingConfiguration(input.ProcessingConfiguration, context), - }), - ...(input.RetryOptions != null && { RetryOptions: se_SplunkRetryOptions(input.RetryOptions, context) }), - ...(input.S3BackupMode != null && { S3BackupMode: input.S3BackupMode }), - ...(input.S3Update != null && { S3Update: se_S3DestinationUpdate(input.S3Update, context) }), - }; -}; - -/** - * serializeAws_json1_1SplunkRetryOptions - */ -const se_SplunkRetryOptions = (input: SplunkRetryOptions, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - }; -}; - -/** - * serializeAws_json1_1StartDeliveryStreamEncryptionInput - */ -const se_StartDeliveryStreamEncryptionInput = ( - input: StartDeliveryStreamEncryptionInput, - context: __SerdeContext -): any => { - return { - ...(input.DeliveryStreamEncryptionConfigurationInput != null && { - DeliveryStreamEncryptionConfigurationInput: se_DeliveryStreamEncryptionConfigurationInput( - input.DeliveryStreamEncryptionConfigurationInput, - context - ), - }), - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - }; -}; - -/** - * serializeAws_json1_1StopDeliveryStreamEncryptionInput - */ -const se_StopDeliveryStreamEncryptionInput = ( - input: StopDeliveryStreamEncryptionInput, - context: __SerdeContext -): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - }; -}; - -/** - * serializeAws_json1_1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagDeliveryStreamInput - */ -const se_TagDeliveryStreamInput = (input: TagDeliveryStreamInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.Tags != null && { Tags: se_TagDeliveryStreamInputTagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1TagDeliveryStreamInputTagList - */ -const se_TagDeliveryStreamInputTagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UntagDeliveryStreamInput - */ -const se_UntagDeliveryStreamInput = (input: UntagDeliveryStreamInput, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateDestinationInput - */ -const se_UpdateDestinationInput = (input: UpdateDestinationInput, context: __SerdeContext): any => { - return { - ...(input.AmazonOpenSearchServerlessDestinationUpdate != null && { - AmazonOpenSearchServerlessDestinationUpdate: se_AmazonOpenSearchServerlessDestinationUpdate( - input.AmazonOpenSearchServerlessDestinationUpdate, - context - ), - }), - ...(input.AmazonopensearchserviceDestinationUpdate != null && { - AmazonopensearchserviceDestinationUpdate: se_AmazonopensearchserviceDestinationUpdate( - input.AmazonopensearchserviceDestinationUpdate, - context - ), - }), - ...(input.CurrentDeliveryStreamVersionId != null && { - CurrentDeliveryStreamVersionId: input.CurrentDeliveryStreamVersionId, - }), - ...(input.DeliveryStreamName != null && { DeliveryStreamName: input.DeliveryStreamName }), - ...(input.DestinationId != null && { DestinationId: input.DestinationId }), - ...(input.ElasticsearchDestinationUpdate != null && { - ElasticsearchDestinationUpdate: se_ElasticsearchDestinationUpdate(input.ElasticsearchDestinationUpdate, context), - }), - ...(input.ExtendedS3DestinationUpdate != null && { - ExtendedS3DestinationUpdate: se_ExtendedS3DestinationUpdate(input.ExtendedS3DestinationUpdate, context), - }), - ...(input.HttpEndpointDestinationUpdate != null && { - HttpEndpointDestinationUpdate: se_HttpEndpointDestinationUpdate(input.HttpEndpointDestinationUpdate, context), - }), - ...(input.RedshiftDestinationUpdate != null && { - RedshiftDestinationUpdate: se_RedshiftDestinationUpdate(input.RedshiftDestinationUpdate, context), - }), - ...(input.S3DestinationUpdate != null && { - S3DestinationUpdate: se_S3DestinationUpdate(input.S3DestinationUpdate, context), - }), - ...(input.SplunkDestinationUpdate != null && { - SplunkDestinationUpdate: se_SplunkDestinationUpdate(input.SplunkDestinationUpdate, context), - }), - }; -}; - -/** - * serializeAws_json1_1VpcConfiguration - */ -const se_VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdList(input.SecurityGroupIds, context), - }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdList(input.SubnetIds, context) }), - }; -}; - -/** - * deserializeAws_json1_1AmazonOpenSearchServerlessBufferingHints - */ -const de_AmazonOpenSearchServerlessBufferingHints = ( - output: any, - context: __SerdeContext -): AmazonOpenSearchServerlessBufferingHints => { - return { - IntervalInSeconds: __expectInt32(output.IntervalInSeconds), - SizeInMBs: __expectInt32(output.SizeInMBs), - } as any; -}; - -/** - * deserializeAws_json1_1AmazonOpenSearchServerlessDestinationDescription - */ -const de_AmazonOpenSearchServerlessDestinationDescription = ( - output: any, - context: __SerdeContext -): AmazonOpenSearchServerlessDestinationDescription => { - return { - BufferingHints: - output.BufferingHints != null - ? de_AmazonOpenSearchServerlessBufferingHints(output.BufferingHints, context) - : undefined, - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - CollectionEndpoint: __expectString(output.CollectionEndpoint), - IndexName: __expectString(output.IndexName), - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RetryOptions: - output.RetryOptions != null ? de_AmazonOpenSearchServerlessRetryOptions(output.RetryOptions, context) : undefined, - RoleARN: __expectString(output.RoleARN), - S3BackupMode: __expectString(output.S3BackupMode), - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - VpcConfigurationDescription: - output.VpcConfigurationDescription != null - ? de_VpcConfigurationDescription(output.VpcConfigurationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AmazonOpenSearchServerlessRetryOptions - */ -const de_AmazonOpenSearchServerlessRetryOptions = ( - output: any, - context: __SerdeContext -): AmazonOpenSearchServerlessRetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1AmazonopensearchserviceBufferingHints - */ -const de_AmazonopensearchserviceBufferingHints = ( - output: any, - context: __SerdeContext -): AmazonopensearchserviceBufferingHints => { - return { - IntervalInSeconds: __expectInt32(output.IntervalInSeconds), - SizeInMBs: __expectInt32(output.SizeInMBs), - } as any; -}; - -/** - * deserializeAws_json1_1AmazonopensearchserviceDestinationDescription - */ -const de_AmazonopensearchserviceDestinationDescription = ( - output: any, - context: __SerdeContext -): AmazonopensearchserviceDestinationDescription => { - return { - BufferingHints: - output.BufferingHints != null - ? de_AmazonopensearchserviceBufferingHints(output.BufferingHints, context) - : undefined, - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - ClusterEndpoint: __expectString(output.ClusterEndpoint), - DomainARN: __expectString(output.DomainARN), - IndexName: __expectString(output.IndexName), - IndexRotationPeriod: __expectString(output.IndexRotationPeriod), - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RetryOptions: - output.RetryOptions != null ? de_AmazonopensearchserviceRetryOptions(output.RetryOptions, context) : undefined, - RoleARN: __expectString(output.RoleARN), - S3BackupMode: __expectString(output.S3BackupMode), - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - TypeName: __expectString(output.TypeName), - VpcConfigurationDescription: - output.VpcConfigurationDescription != null - ? de_VpcConfigurationDescription(output.VpcConfigurationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AmazonopensearchserviceRetryOptions - */ -const de_AmazonopensearchserviceRetryOptions = ( - output: any, - context: __SerdeContext -): AmazonopensearchserviceRetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1BufferingHints - */ -const de_BufferingHints = (output: any, context: __SerdeContext): BufferingHints => { - return { - IntervalInSeconds: __expectInt32(output.IntervalInSeconds), - SizeInMBs: __expectInt32(output.SizeInMBs), - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchLoggingOptions - */ -const de_CloudWatchLoggingOptions = (output: any, context: __SerdeContext): CloudWatchLoggingOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - LogGroupName: __expectString(output.LogGroupName), - LogStreamName: __expectString(output.LogStreamName), - } as any; -}; - -/** - * deserializeAws_json1_1ColumnToJsonKeyMappings - */ -const de_ColumnToJsonKeyMappings = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CopyCommand - */ -const de_CopyCommand = (output: any, context: __SerdeContext): CopyCommand => { - return { - CopyOptions: __expectString(output.CopyOptions), - DataTableColumns: __expectString(output.DataTableColumns), - DataTableName: __expectString(output.DataTableName), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDeliveryStreamOutput - */ -const de_CreateDeliveryStreamOutput = (output: any, context: __SerdeContext): CreateDeliveryStreamOutput => { - return { - DeliveryStreamARN: __expectString(output.DeliveryStreamARN), - } as any; -}; - -/** - * deserializeAws_json1_1DataFormatConversionConfiguration - */ -const de_DataFormatConversionConfiguration = ( - output: any, - context: __SerdeContext -): DataFormatConversionConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - InputFormatConfiguration: - output.InputFormatConfiguration != null - ? de_InputFormatConfiguration(output.InputFormatConfiguration, context) - : undefined, - OutputFormatConfiguration: - output.OutputFormatConfiguration != null - ? de_OutputFormatConfiguration(output.OutputFormatConfiguration, context) - : undefined, - SchemaConfiguration: - output.SchemaConfiguration != null ? de_SchemaConfiguration(output.SchemaConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDeliveryStreamOutput - */ -const de_DeleteDeliveryStreamOutput = (output: any, context: __SerdeContext): DeleteDeliveryStreamOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeliveryStreamDescription - */ -const de_DeliveryStreamDescription = (output: any, context: __SerdeContext): DeliveryStreamDescription => { - return { - CreateTimestamp: - output.CreateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp))) - : undefined, - DeliveryStreamARN: __expectString(output.DeliveryStreamARN), - DeliveryStreamEncryptionConfiguration: - output.DeliveryStreamEncryptionConfiguration != null - ? de_DeliveryStreamEncryptionConfiguration(output.DeliveryStreamEncryptionConfiguration, context) - : undefined, - DeliveryStreamName: __expectString(output.DeliveryStreamName), - DeliveryStreamStatus: __expectString(output.DeliveryStreamStatus), - DeliveryStreamType: __expectString(output.DeliveryStreamType), - Destinations: output.Destinations != null ? de_DestinationDescriptionList(output.Destinations, context) : undefined, - FailureDescription: - output.FailureDescription != null ? de_FailureDescription(output.FailureDescription, context) : undefined, - HasMoreDestinations: __expectBoolean(output.HasMoreDestinations), - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - Source: output.Source != null ? de_SourceDescription(output.Source, context) : undefined, - VersionId: __expectString(output.VersionId), - } as any; -}; - -/** - * deserializeAws_json1_1DeliveryStreamEncryptionConfiguration - */ -const de_DeliveryStreamEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): DeliveryStreamEncryptionConfiguration => { - return { - FailureDescription: - output.FailureDescription != null ? de_FailureDescription(output.FailureDescription, context) : undefined, - KeyARN: __expectString(output.KeyARN), - KeyType: __expectString(output.KeyType), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DeliveryStreamNameList - */ -const de_DeliveryStreamNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DescribeDeliveryStreamOutput - */ -const de_DescribeDeliveryStreamOutput = (output: any, context: __SerdeContext): DescribeDeliveryStreamOutput => { - return { - DeliveryStreamDescription: - output.DeliveryStreamDescription != null - ? de_DeliveryStreamDescription(output.DeliveryStreamDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Deserializer - */ -const de_Deserializer = (output: any, context: __SerdeContext): Deserializer => { - return { - HiveJsonSerDe: output.HiveJsonSerDe != null ? de_HiveJsonSerDe(output.HiveJsonSerDe, context) : undefined, - OpenXJsonSerDe: output.OpenXJsonSerDe != null ? de_OpenXJsonSerDe(output.OpenXJsonSerDe, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DestinationDescription - */ -const de_DestinationDescription = (output: any, context: __SerdeContext): DestinationDescription => { - return { - AmazonOpenSearchServerlessDestinationDescription: - output.AmazonOpenSearchServerlessDestinationDescription != null - ? de_AmazonOpenSearchServerlessDestinationDescription( - output.AmazonOpenSearchServerlessDestinationDescription, - context - ) - : undefined, - AmazonopensearchserviceDestinationDescription: - output.AmazonopensearchserviceDestinationDescription != null - ? de_AmazonopensearchserviceDestinationDescription( - output.AmazonopensearchserviceDestinationDescription, - context - ) - : undefined, - DestinationId: __expectString(output.DestinationId), - ElasticsearchDestinationDescription: - output.ElasticsearchDestinationDescription != null - ? de_ElasticsearchDestinationDescription(output.ElasticsearchDestinationDescription, context) - : undefined, - ExtendedS3DestinationDescription: - output.ExtendedS3DestinationDescription != null - ? de_ExtendedS3DestinationDescription(output.ExtendedS3DestinationDescription, context) - : undefined, - HttpEndpointDestinationDescription: - output.HttpEndpointDestinationDescription != null - ? de_HttpEndpointDestinationDescription(output.HttpEndpointDestinationDescription, context) - : undefined, - RedshiftDestinationDescription: - output.RedshiftDestinationDescription != null - ? de_RedshiftDestinationDescription(output.RedshiftDestinationDescription, context) - : undefined, - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - SplunkDestinationDescription: - output.SplunkDestinationDescription != null - ? de_SplunkDestinationDescription(output.SplunkDestinationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DestinationDescriptionList - */ -const de_DestinationDescriptionList = (output: any, context: __SerdeContext): DestinationDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DestinationDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DynamicPartitioningConfiguration - */ -const de_DynamicPartitioningConfiguration = ( - output: any, - context: __SerdeContext -): DynamicPartitioningConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - RetryOptions: output.RetryOptions != null ? de_RetryOptions(output.RetryOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ElasticsearchBufferingHints - */ -const de_ElasticsearchBufferingHints = (output: any, context: __SerdeContext): ElasticsearchBufferingHints => { - return { - IntervalInSeconds: __expectInt32(output.IntervalInSeconds), - SizeInMBs: __expectInt32(output.SizeInMBs), - } as any; -}; - -/** - * deserializeAws_json1_1ElasticsearchDestinationDescription - */ -const de_ElasticsearchDestinationDescription = ( - output: any, - context: __SerdeContext -): ElasticsearchDestinationDescription => { - return { - BufferingHints: - output.BufferingHints != null ? de_ElasticsearchBufferingHints(output.BufferingHints, context) : undefined, - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - ClusterEndpoint: __expectString(output.ClusterEndpoint), - DomainARN: __expectString(output.DomainARN), - IndexName: __expectString(output.IndexName), - IndexRotationPeriod: __expectString(output.IndexRotationPeriod), - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RetryOptions: output.RetryOptions != null ? de_ElasticsearchRetryOptions(output.RetryOptions, context) : undefined, - RoleARN: __expectString(output.RoleARN), - S3BackupMode: __expectString(output.S3BackupMode), - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - TypeName: __expectString(output.TypeName), - VpcConfigurationDescription: - output.VpcConfigurationDescription != null - ? de_VpcConfigurationDescription(output.VpcConfigurationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ElasticsearchRetryOptions - */ -const de_ElasticsearchRetryOptions = (output: any, context: __SerdeContext): ElasticsearchRetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - KMSEncryptionConfig: - output.KMSEncryptionConfig != null ? de_KMSEncryptionConfig(output.KMSEncryptionConfig, context) : undefined, - NoEncryptionConfig: __expectString(output.NoEncryptionConfig), - } as any; -}; - -/** - * deserializeAws_json1_1ExtendedS3DestinationDescription - */ -const de_ExtendedS3DestinationDescription = ( - output: any, - context: __SerdeContext -): ExtendedS3DestinationDescription => { - return { - BucketARN: __expectString(output.BucketARN), - BufferingHints: output.BufferingHints != null ? de_BufferingHints(output.BufferingHints, context) : undefined, - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - CompressionFormat: __expectString(output.CompressionFormat), - DataFormatConversionConfiguration: - output.DataFormatConversionConfiguration != null - ? de_DataFormatConversionConfiguration(output.DataFormatConversionConfiguration, context) - : undefined, - DynamicPartitioningConfiguration: - output.DynamicPartitioningConfiguration != null - ? de_DynamicPartitioningConfiguration(output.DynamicPartitioningConfiguration, context) - : undefined, - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - ErrorOutputPrefix: __expectString(output.ErrorOutputPrefix), - Prefix: __expectString(output.Prefix), - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RoleARN: __expectString(output.RoleARN), - S3BackupDescription: - output.S3BackupDescription != null ? de_S3DestinationDescription(output.S3BackupDescription, context) : undefined, - S3BackupMode: __expectString(output.S3BackupMode), - } as any; -}; - -/** - * deserializeAws_json1_1FailureDescription - */ -const de_FailureDescription = (output: any, context: __SerdeContext): FailureDescription => { - return { - Details: __expectString(output.Details), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1HiveJsonSerDe - */ -const de_HiveJsonSerDe = (output: any, context: __SerdeContext): HiveJsonSerDe => { - return { - TimestampFormats: - output.TimestampFormats != null ? de_ListOfNonEmptyStrings(output.TimestampFormats, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HttpEndpointBufferingHints - */ -const de_HttpEndpointBufferingHints = (output: any, context: __SerdeContext): HttpEndpointBufferingHints => { - return { - IntervalInSeconds: __expectInt32(output.IntervalInSeconds), - SizeInMBs: __expectInt32(output.SizeInMBs), - } as any; -}; - -/** - * deserializeAws_json1_1HttpEndpointCommonAttribute - */ -const de_HttpEndpointCommonAttribute = (output: any, context: __SerdeContext): HttpEndpointCommonAttribute => { - return { - AttributeName: __expectString(output.AttributeName), - AttributeValue: __expectString(output.AttributeValue), - } as any; -}; - -/** - * deserializeAws_json1_1HttpEndpointCommonAttributesList - */ -const de_HttpEndpointCommonAttributesList = (output: any, context: __SerdeContext): HttpEndpointCommonAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpEndpointCommonAttribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1HttpEndpointDescription - */ -const de_HttpEndpointDescription = (output: any, context: __SerdeContext): HttpEndpointDescription => { - return { - Name: __expectString(output.Name), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1HttpEndpointDestinationDescription - */ -const de_HttpEndpointDestinationDescription = ( - output: any, - context: __SerdeContext -): HttpEndpointDestinationDescription => { - return { - BufferingHints: - output.BufferingHints != null ? de_HttpEndpointBufferingHints(output.BufferingHints, context) : undefined, - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - EndpointConfiguration: - output.EndpointConfiguration != null - ? de_HttpEndpointDescription(output.EndpointConfiguration, context) - : undefined, - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RequestConfiguration: - output.RequestConfiguration != null - ? de_HttpEndpointRequestConfiguration(output.RequestConfiguration, context) - : undefined, - RetryOptions: output.RetryOptions != null ? de_HttpEndpointRetryOptions(output.RetryOptions, context) : undefined, - RoleARN: __expectString(output.RoleARN), - S3BackupMode: __expectString(output.S3BackupMode), - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HttpEndpointRequestConfiguration - */ -const de_HttpEndpointRequestConfiguration = ( - output: any, - context: __SerdeContext -): HttpEndpointRequestConfiguration => { - return { - CommonAttributes: - output.CommonAttributes != null - ? de_HttpEndpointCommonAttributesList(output.CommonAttributes, context) - : undefined, - ContentEncoding: __expectString(output.ContentEncoding), - } as any; -}; - -/** - * deserializeAws_json1_1HttpEndpointRetryOptions - */ -const de_HttpEndpointRetryOptions = (output: any, context: __SerdeContext): HttpEndpointRetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1InputFormatConfiguration - */ -const de_InputFormatConfiguration = (output: any, context: __SerdeContext): InputFormatConfiguration => { - return { - Deserializer: output.Deserializer != null ? de_Deserializer(output.Deserializer, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InvalidArgumentException - */ -const de_InvalidArgumentException = (output: any, context: __SerdeContext): InvalidArgumentException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidKMSResourceException - */ -const de_InvalidKMSResourceException = (output: any, context: __SerdeContext): InvalidKMSResourceException => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1KinesisStreamSourceDescription - */ -const de_KinesisStreamSourceDescription = (output: any, context: __SerdeContext): KinesisStreamSourceDescription => { - return { - DeliveryStartTimestamp: - output.DeliveryStartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeliveryStartTimestamp))) - : undefined, - KinesisStreamARN: __expectString(output.KinesisStreamARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// se_ListOfNonEmptyStringsWithoutWhitespace omitted. -/** - * deserializeAws_json1_1KMSEncryptionConfig - */ -const de_KMSEncryptionConfig = (output: any, context: __SerdeContext): KMSEncryptionConfig => { - return { - AWSKMSKeyARN: __expectString(output.AWSKMSKeyARN), - } as any; -}; +// se_ListTagsForDeliveryStreamInput omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_OpenXJsonSerDe omitted. /** - * deserializeAws_json1_1ListDeliveryStreamsOutput + * serializeAws_json1_1OrcSerDe */ -const de_ListDeliveryStreamsOutput = (output: any, context: __SerdeContext): ListDeliveryStreamsOutput => { - return { - DeliveryStreamNames: - output.DeliveryStreamNames != null ? de_DeliveryStreamNameList(output.DeliveryStreamNames, context) : undefined, - HasMoreDeliveryStreams: __expectBoolean(output.HasMoreDeliveryStreams), - } as any; +const se_OrcSerDe = (input: OrcSerDe, context: __SerdeContext): any => { + return take(input, { + BlockSizeBytes: [], + BloomFilterColumns: _json, + BloomFilterFalsePositiveProbability: __serializeFloat, + Compression: [], + DictionaryKeyThreshold: __serializeFloat, + EnablePadding: [], + FormatVersion: [], + PaddingTolerance: __serializeFloat, + RowIndexStride: [], + StripeSizeBytes: [], + }); }; /** - * deserializeAws_json1_1ListOfNonEmptyStrings + * serializeAws_json1_1OutputFormatConfiguration */ -const de_ListOfNonEmptyStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_OutputFormatConfiguration = (input: OutputFormatConfiguration, context: __SerdeContext): any => { + return take(input, { + Serializer: (_) => se_Serializer(_, context), + }); }; -/** - * deserializeAws_json1_1ListOfNonEmptyStringsWithoutWhitespace - */ -const de_ListOfNonEmptyStringsWithoutWhitespace = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ParquetSerDe omitted. + +// se_ProcessingConfiguration omitted. + +// se_Processor omitted. + +// se_ProcessorList omitted. + +// se_ProcessorParameter omitted. + +// se_ProcessorParameterList omitted. /** - * deserializeAws_json1_1ListTagsForDeliveryStreamOutput + * serializeAws_json1_1PutRecordBatchInput */ -const de_ListTagsForDeliveryStreamOutput = (output: any, context: __SerdeContext): ListTagsForDeliveryStreamOutput => { - return { - HasMoreTags: __expectBoolean(output.HasMoreTags), - Tags: output.Tags != null ? de_ListTagsForDeliveryStreamOutputTagList(output.Tags, context) : undefined, - } as any; +const se_PutRecordBatchInput = (input: PutRecordBatchInput, context: __SerdeContext): any => { + return take(input, { + DeliveryStreamName: [], + Records: (_) => se_PutRecordBatchRequestEntryList(_, context), + }); }; /** - * deserializeAws_json1_1ListTagsForDeliveryStreamOutputTagList + * serializeAws_json1_1PutRecordBatchRequestEntryList */ -const de_ListTagsForDeliveryStreamOutputTagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) +const se_PutRecordBatchRequestEntryList = (input: _Record[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + .map((entry) => { + return se__Record(entry, context); }); - return retVal; }; /** - * deserializeAws_json1_1OpenXJsonSerDe + * serializeAws_json1_1PutRecordInput */ -const de_OpenXJsonSerDe = (output: any, context: __SerdeContext): OpenXJsonSerDe => { - return { - CaseInsensitive: __expectBoolean(output.CaseInsensitive), - ColumnToJsonKeyMappings: - output.ColumnToJsonKeyMappings != null - ? de_ColumnToJsonKeyMappings(output.ColumnToJsonKeyMappings, context) - : undefined, - ConvertDotsInJsonKeysToUnderscores: __expectBoolean(output.ConvertDotsInJsonKeysToUnderscores), - } as any; +const se_PutRecordInput = (input: PutRecordInput, context: __SerdeContext): any => { + return take(input, { + DeliveryStreamName: [], + Record: (_) => se__Record(_, context), + }); }; /** - * deserializeAws_json1_1OrcSerDe + * serializeAws_json1_1_Record */ -const de_OrcSerDe = (output: any, context: __SerdeContext): OrcSerDe => { - return { - BlockSizeBytes: __expectInt32(output.BlockSizeBytes), - BloomFilterColumns: - output.BloomFilterColumns != null - ? de_ListOfNonEmptyStringsWithoutWhitespace(output.BloomFilterColumns, context) - : undefined, - BloomFilterFalsePositiveProbability: __limitedParseDouble(output.BloomFilterFalsePositiveProbability), - Compression: __expectString(output.Compression), - DictionaryKeyThreshold: __limitedParseDouble(output.DictionaryKeyThreshold), - EnablePadding: __expectBoolean(output.EnablePadding), - FormatVersion: __expectString(output.FormatVersion), - PaddingTolerance: __limitedParseDouble(output.PaddingTolerance), - RowIndexStride: __expectInt32(output.RowIndexStride), - StripeSizeBytes: __expectInt32(output.StripeSizeBytes), - } as any; +const se__Record = (input: _Record, context: __SerdeContext): any => { + return take(input, { + Data: context.base64Encoder, + }); }; -/** - * deserializeAws_json1_1OutputFormatConfiguration - */ -const de_OutputFormatConfiguration = (output: any, context: __SerdeContext): OutputFormatConfiguration => { - return { - Serializer: output.Serializer != null ? de_Serializer(output.Serializer, context) : undefined, - } as any; -}; +// se_RedshiftDestinationConfiguration omitted. -/** - * deserializeAws_json1_1ParquetSerDe - */ -const de_ParquetSerDe = (output: any, context: __SerdeContext): ParquetSerDe => { - return { - BlockSizeBytes: __expectInt32(output.BlockSizeBytes), - Compression: __expectString(output.Compression), - EnableDictionaryCompression: __expectBoolean(output.EnableDictionaryCompression), - MaxPaddingBytes: __expectInt32(output.MaxPaddingBytes), - PageSizeBytes: __expectInt32(output.PageSizeBytes), - WriterVersion: __expectString(output.WriterVersion), - } as any; -}; +// se_RedshiftDestinationUpdate omitted. -/** - * deserializeAws_json1_1ProcessingConfiguration - */ -const de_ProcessingConfiguration = (output: any, context: __SerdeContext): ProcessingConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - Processors: output.Processors != null ? de_ProcessorList(output.Processors, context) : undefined, - } as any; -}; +// se_RedshiftRetryOptions omitted. + +// se_RetryOptions omitted. + +// se_S3DestinationConfiguration omitted. + +// se_S3DestinationUpdate omitted. + +// se_SchemaConfiguration omitted. + +// se_SecurityGroupIdList omitted. /** - * deserializeAws_json1_1Processor + * serializeAws_json1_1Serializer */ -const de_Processor = (output: any, context: __SerdeContext): Processor => { - return { - Parameters: output.Parameters != null ? de_ProcessorParameterList(output.Parameters, context) : undefined, - Type: __expectString(output.Type), - } as any; +const se_Serializer = (input: Serializer, context: __SerdeContext): any => { + return take(input, { + OrcSerDe: (_) => se_OrcSerDe(_, context), + ParquetSerDe: _json, + }); }; +// se_SplunkDestinationConfiguration omitted. + +// se_SplunkDestinationUpdate omitted. + +// se_SplunkRetryOptions omitted. + +// se_StartDeliveryStreamEncryptionInput omitted. + +// se_StopDeliveryStreamEncryptionInput omitted. + +// se_SubnetIdList omitted. + +// se_Tag omitted. + +// se_TagDeliveryStreamInput omitted. + +// se_TagDeliveryStreamInputTagList omitted. + +// se_TagKeyList omitted. + +// se_UntagDeliveryStreamInput omitted. + /** - * deserializeAws_json1_1ProcessorList + * serializeAws_json1_1UpdateDestinationInput */ -const de_ProcessorList = (output: any, context: __SerdeContext): Processor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Processor(entry, context); - }); - return retVal; +const se_UpdateDestinationInput = (input: UpdateDestinationInput, context: __SerdeContext): any => { + return take(input, { + AmazonOpenSearchServerlessDestinationUpdate: _json, + AmazonopensearchserviceDestinationUpdate: _json, + CurrentDeliveryStreamVersionId: [], + DeliveryStreamName: [], + DestinationId: [], + ElasticsearchDestinationUpdate: _json, + ExtendedS3DestinationUpdate: (_) => se_ExtendedS3DestinationUpdate(_, context), + HttpEndpointDestinationUpdate: _json, + RedshiftDestinationUpdate: _json, + S3DestinationUpdate: _json, + SplunkDestinationUpdate: _json, + }); }; +// se_VpcConfiguration omitted. + +// de_AmazonOpenSearchServerlessBufferingHints omitted. + +// de_AmazonOpenSearchServerlessDestinationDescription omitted. + +// de_AmazonOpenSearchServerlessRetryOptions omitted. + +// de_AmazonopensearchserviceBufferingHints omitted. + +// de_AmazonopensearchserviceDestinationDescription omitted. + +// de_AmazonopensearchserviceRetryOptions omitted. + +// de_BufferingHints omitted. + +// de_CloudWatchLoggingOptions omitted. + +// de_ColumnToJsonKeyMappings omitted. + +// de_ConcurrentModificationException omitted. + +// de_CopyCommand omitted. + +// de_CreateDeliveryStreamOutput omitted. + /** - * deserializeAws_json1_1ProcessorParameter + * deserializeAws_json1_1DataFormatConversionConfiguration */ -const de_ProcessorParameter = (output: any, context: __SerdeContext): ProcessorParameter => { - return { - ParameterName: __expectString(output.ParameterName), - ParameterValue: __expectString(output.ParameterValue), - } as any; +const de_DataFormatConversionConfiguration = ( + output: any, + context: __SerdeContext +): DataFormatConversionConfiguration => { + return take(output, { + Enabled: __expectBoolean, + InputFormatConfiguration: _json, + OutputFormatConfiguration: (_: any) => de_OutputFormatConfiguration(_, context), + SchemaConfiguration: _json, + }) as any; }; +// de_DeleteDeliveryStreamOutput omitted. + /** - * deserializeAws_json1_1ProcessorParameterList + * deserializeAws_json1_1DeliveryStreamDescription */ -const de_ProcessorParameterList = (output: any, context: __SerdeContext): ProcessorParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProcessorParameter(entry, context); - }); - return retVal; +const de_DeliveryStreamDescription = (output: any, context: __SerdeContext): DeliveryStreamDescription => { + return take(output, { + CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeliveryStreamARN: __expectString, + DeliveryStreamEncryptionConfiguration: _json, + DeliveryStreamName: __expectString, + DeliveryStreamStatus: __expectString, + DeliveryStreamType: __expectString, + Destinations: (_: any) => de_DestinationDescriptionList(_, context), + FailureDescription: _json, + HasMoreDestinations: __expectBoolean, + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Source: (_: any) => de_SourceDescription(_, context), + VersionId: __expectString, + }) as any; }; +// de_DeliveryStreamEncryptionConfiguration omitted. + +// de_DeliveryStreamNameList omitted. + /** - * deserializeAws_json1_1PutRecordBatchOutput + * deserializeAws_json1_1DescribeDeliveryStreamOutput */ -const de_PutRecordBatchOutput = (output: any, context: __SerdeContext): PutRecordBatchOutput => { - return { - Encrypted: __expectBoolean(output.Encrypted), - FailedPutCount: __expectInt32(output.FailedPutCount), - RequestResponses: - output.RequestResponses != null - ? de_PutRecordBatchResponseEntryList(output.RequestResponses, context) - : undefined, - } as any; +const de_DescribeDeliveryStreamOutput = (output: any, context: __SerdeContext): DescribeDeliveryStreamOutput => { + return take(output, { + DeliveryStreamDescription: (_: any) => de_DeliveryStreamDescription(_, context), + }) as any; }; +// de_Deserializer omitted. + /** - * deserializeAws_json1_1PutRecordBatchResponseEntry + * deserializeAws_json1_1DestinationDescription */ -const de_PutRecordBatchResponseEntry = (output: any, context: __SerdeContext): PutRecordBatchResponseEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - RecordId: __expectString(output.RecordId), - } as any; +const de_DestinationDescription = (output: any, context: __SerdeContext): DestinationDescription => { + return take(output, { + AmazonOpenSearchServerlessDestinationDescription: _json, + AmazonopensearchserviceDestinationDescription: _json, + DestinationId: __expectString, + ElasticsearchDestinationDescription: _json, + ExtendedS3DestinationDescription: (_: any) => de_ExtendedS3DestinationDescription(_, context), + HttpEndpointDestinationDescription: _json, + RedshiftDestinationDescription: _json, + S3DestinationDescription: _json, + SplunkDestinationDescription: _json, + }) as any; }; /** - * deserializeAws_json1_1PutRecordBatchResponseEntryList + * deserializeAws_json1_1DestinationDescriptionList */ -const de_PutRecordBatchResponseEntryList = (output: any, context: __SerdeContext): PutRecordBatchResponseEntry[] => { +const de_DestinationDescriptionList = (output: any, context: __SerdeContext): DestinationDescription[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutRecordBatchResponseEntry(entry, context); + return de_DestinationDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PutRecordOutput - */ -const de_PutRecordOutput = (output: any, context: __SerdeContext): PutRecordOutput => { - return { - Encrypted: __expectBoolean(output.Encrypted), - RecordId: __expectString(output.RecordId), - } as any; -}; +// de_DynamicPartitioningConfiguration omitted. -/** - * deserializeAws_json1_1RedshiftDestinationDescription - */ -const de_RedshiftDestinationDescription = (output: any, context: __SerdeContext): RedshiftDestinationDescription => { - return { - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - ClusterJDBCURL: __expectString(output.ClusterJDBCURL), - CopyCommand: output.CopyCommand != null ? de_CopyCommand(output.CopyCommand, context) : undefined, - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RetryOptions: output.RetryOptions != null ? de_RedshiftRetryOptions(output.RetryOptions, context) : undefined, - RoleARN: __expectString(output.RoleARN), - S3BackupDescription: - output.S3BackupDescription != null ? de_S3DestinationDescription(output.S3BackupDescription, context) : undefined, - S3BackupMode: __expectString(output.S3BackupMode), - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - Username: __expectString(output.Username), - } as any; -}; - -/** - * deserializeAws_json1_1RedshiftRetryOptions - */ -const de_RedshiftRetryOptions = (output: any, context: __SerdeContext): RedshiftRetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; -}; +// de_ElasticsearchBufferingHints omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ElasticsearchDestinationDescription omitted. + +// de_ElasticsearchRetryOptions omitted. + +// de_EncryptionConfiguration omitted. /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1ExtendedS3DestinationDescription */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_ExtendedS3DestinationDescription = ( + output: any, + context: __SerdeContext +): ExtendedS3DestinationDescription => { + return take(output, { + BucketARN: __expectString, + BufferingHints: _json, + CloudWatchLoggingOptions: _json, + CompressionFormat: __expectString, + DataFormatConversionConfiguration: (_: any) => de_DataFormatConversionConfiguration(_, context), + DynamicPartitioningConfiguration: _json, + EncryptionConfiguration: _json, + ErrorOutputPrefix: __expectString, + Prefix: __expectString, + ProcessingConfiguration: _json, + RoleARN: __expectString, + S3BackupDescription: _json, + S3BackupMode: __expectString, + }) as any; }; +// de_FailureDescription omitted. + +// de_HiveJsonSerDe omitted. + +// de_HttpEndpointBufferingHints omitted. + +// de_HttpEndpointCommonAttribute omitted. + +// de_HttpEndpointCommonAttributesList omitted. + +// de_HttpEndpointDescription omitted. + +// de_HttpEndpointDestinationDescription omitted. + +// de_HttpEndpointRequestConfiguration omitted. + +// de_HttpEndpointRetryOptions omitted. + +// de_InputFormatConfiguration omitted. + +// de_InvalidArgumentException omitted. + +// de_InvalidKMSResourceException omitted. + /** - * deserializeAws_json1_1RetryOptions + * deserializeAws_json1_1KinesisStreamSourceDescription */ -const de_RetryOptions = (output: any, context: __SerdeContext): RetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; +const de_KinesisStreamSourceDescription = (output: any, context: __SerdeContext): KinesisStreamSourceDescription => { + return take(output, { + DeliveryStartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KinesisStreamARN: __expectString, + RoleARN: __expectString, + }) as any; }; +// de_KMSEncryptionConfig omitted. + +// de_LimitExceededException omitted. + +// de_ListDeliveryStreamsOutput omitted. + +// de_ListOfNonEmptyStrings omitted. + +// de_ListOfNonEmptyStringsWithoutWhitespace omitted. + +// de_ListTagsForDeliveryStreamOutput omitted. + +// de_ListTagsForDeliveryStreamOutputTagList omitted. + +// de_OpenXJsonSerDe omitted. + /** - * deserializeAws_json1_1S3DestinationDescription + * deserializeAws_json1_1OrcSerDe */ -const de_S3DestinationDescription = (output: any, context: __SerdeContext): S3DestinationDescription => { - return { - BucketARN: __expectString(output.BucketARN), - BufferingHints: output.BufferingHints != null ? de_BufferingHints(output.BufferingHints, context) : undefined, - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - CompressionFormat: __expectString(output.CompressionFormat), - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - ErrorOutputPrefix: __expectString(output.ErrorOutputPrefix), - Prefix: __expectString(output.Prefix), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1SchemaConfiguration - */ -const de_SchemaConfiguration = (output: any, context: __SerdeContext): SchemaConfiguration => { - return { - CatalogId: __expectString(output.CatalogId), - DatabaseName: __expectString(output.DatabaseName), - Region: __expectString(output.Region), - RoleARN: __expectString(output.RoleARN), - TableName: __expectString(output.TableName), - VersionId: __expectString(output.VersionId), - } as any; +const de_OrcSerDe = (output: any, context: __SerdeContext): OrcSerDe => { + return take(output, { + BlockSizeBytes: __expectInt32, + BloomFilterColumns: _json, + BloomFilterFalsePositiveProbability: __limitedParseDouble, + Compression: __expectString, + DictionaryKeyThreshold: __limitedParseDouble, + EnablePadding: __expectBoolean, + FormatVersion: __expectString, + PaddingTolerance: __limitedParseDouble, + RowIndexStride: __expectInt32, + StripeSizeBytes: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1SecurityGroupIdList + * deserializeAws_json1_1OutputFormatConfiguration */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_OutputFormatConfiguration = (output: any, context: __SerdeContext): OutputFormatConfiguration => { + return take(output, { + Serializer: (_: any) => de_Serializer(_, context), + }) as any; }; +// de_ParquetSerDe omitted. + +// de_ProcessingConfiguration omitted. + +// de_Processor omitted. + +// de_ProcessorList omitted. + +// de_ProcessorParameter omitted. + +// de_ProcessorParameterList omitted. + +// de_PutRecordBatchOutput omitted. + +// de_PutRecordBatchResponseEntry omitted. + +// de_PutRecordBatchResponseEntryList omitted. + +// de_PutRecordOutput omitted. + +// de_RedshiftDestinationDescription omitted. + +// de_RedshiftRetryOptions omitted. + +// de_ResourceInUseException omitted. + +// de_ResourceNotFoundException omitted. + +// de_RetryOptions omitted. + +// de_S3DestinationDescription omitted. + +// de_SchemaConfiguration omitted. + +// de_SecurityGroupIdList omitted. + /** * deserializeAws_json1_1Serializer */ const de_Serializer = (output: any, context: __SerdeContext): Serializer => { - return { - OrcSerDe: output.OrcSerDe != null ? de_OrcSerDe(output.OrcSerDe, context) : undefined, - ParquetSerDe: output.ParquetSerDe != null ? de_ParquetSerDe(output.ParquetSerDe, context) : undefined, - } as any; + return take(output, { + OrcSerDe: (_: any) => de_OrcSerDe(_, context), + ParquetSerDe: _json, + }) as any; }; -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceUnavailableException omitted. /** * deserializeAws_json1_1SourceDescription */ const de_SourceDescription = (output: any, context: __SerdeContext): SourceDescription => { - return { - KinesisStreamSourceDescription: - output.KinesisStreamSourceDescription != null - ? de_KinesisStreamSourceDescription(output.KinesisStreamSourceDescription, context) - : undefined, - } as any; + return take(output, { + KinesisStreamSourceDescription: (_: any) => de_KinesisStreamSourceDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SplunkDestinationDescription - */ -const de_SplunkDestinationDescription = (output: any, context: __SerdeContext): SplunkDestinationDescription => { - return { - CloudWatchLoggingOptions: - output.CloudWatchLoggingOptions != null - ? de_CloudWatchLoggingOptions(output.CloudWatchLoggingOptions, context) - : undefined, - HECAcknowledgmentTimeoutInSeconds: __expectInt32(output.HECAcknowledgmentTimeoutInSeconds), - HECEndpoint: __expectString(output.HECEndpoint), - HECEndpointType: __expectString(output.HECEndpointType), - HECToken: __expectString(output.HECToken), - ProcessingConfiguration: - output.ProcessingConfiguration != null - ? de_ProcessingConfiguration(output.ProcessingConfiguration, context) - : undefined, - RetryOptions: output.RetryOptions != null ? de_SplunkRetryOptions(output.RetryOptions, context) : undefined, - S3BackupMode: __expectString(output.S3BackupMode), - S3DestinationDescription: - output.S3DestinationDescription != null - ? de_S3DestinationDescription(output.S3DestinationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SplunkRetryOptions - */ -const de_SplunkRetryOptions = (output: any, context: __SerdeContext): SplunkRetryOptions => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - } as any; -}; +// de_SplunkDestinationDescription omitted. -/** - * deserializeAws_json1_1StartDeliveryStreamEncryptionOutput - */ -const de_StartDeliveryStreamEncryptionOutput = ( - output: any, - context: __SerdeContext -): StartDeliveryStreamEncryptionOutput => { - return {} as any; -}; +// de_SplunkRetryOptions omitted. -/** - * deserializeAws_json1_1StopDeliveryStreamEncryptionOutput - */ -const de_StopDeliveryStreamEncryptionOutput = ( - output: any, - context: __SerdeContext -): StopDeliveryStreamEncryptionOutput => { - return {} as any; -}; +// de_StartDeliveryStreamEncryptionOutput omitted. -/** - * deserializeAws_json1_1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StopDeliveryStreamEncryptionOutput omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SubnetIdList omitted. -/** - * deserializeAws_json1_1TagDeliveryStreamOutput - */ -const de_TagDeliveryStreamOutput = (output: any, context: __SerdeContext): TagDeliveryStreamOutput => { - return {} as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1UntagDeliveryStreamOutput - */ -const de_UntagDeliveryStreamOutput = (output: any, context: __SerdeContext): UntagDeliveryStreamOutput => { - return {} as any; -}; +// de_TagDeliveryStreamOutput omitted. -/** - * deserializeAws_json1_1UpdateDestinationOutput - */ -const de_UpdateDestinationOutput = (output: any, context: __SerdeContext): UpdateDestinationOutput => { - return {} as any; -}; +// de_UntagDeliveryStreamOutput omitted. -/** - * deserializeAws_json1_1VpcConfigurationDescription - */ -const de_VpcConfigurationDescription = (output: any, context: __SerdeContext): VpcConfigurationDescription => { - return { - RoleARN: __expectString(output.RoleARN), - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIdList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIdList(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_UpdateDestinationOutput omitted. + +// de_VpcConfigurationDescription omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3493,6 +1659,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-fis/src/protocols/Aws_restJson1.ts b/clients/client-fis/src/protocols/Aws_restJson1.ts index a134aa45db90..aab8e9fb9458 100644 --- a/clients/client-fis/src/protocols/Aws_restJson1.ts +++ b/clients/client-fis/src/protocols/Aws_restJson1.ts @@ -1,18 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -63,10 +63,6 @@ import { } from "../commands/UpdateExperimentTemplateCommand"; import { FisServiceException as __BaseException } from "../models/FisServiceException"; import { - Action, - ActionParameter, - ActionSummary, - ActionTarget, ConflictException, CreateExperimentTemplateActionInput, CreateExperimentTemplateLogConfigurationInput, @@ -74,32 +70,14 @@ import { CreateExperimentTemplateTargetInput, Experiment, ExperimentAction, - ExperimentActionState, - ExperimentCloudWatchLogsLogConfiguration, - ExperimentLogConfiguration, - ExperimentS3LogConfiguration, - ExperimentState, - ExperimentStopCondition, ExperimentSummary, - ExperimentTarget, - ExperimentTargetFilter, ExperimentTemplate, - ExperimentTemplateAction, - ExperimentTemplateCloudWatchLogsLogConfiguration, ExperimentTemplateCloudWatchLogsLogConfigurationInput, - ExperimentTemplateLogConfiguration, - ExperimentTemplateS3LogConfiguration, ExperimentTemplateS3LogConfigurationInput, - ExperimentTemplateStopCondition, ExperimentTemplateSummary, - ExperimentTemplateTarget, - ExperimentTemplateTargetFilter, ExperimentTemplateTargetInputFilter, ResourceNotFoundException, ServiceQuotaExceededException, - TargetResourceType, - TargetResourceTypeParameter, - TargetResourceTypeSummary, UpdateExperimentTemplateActionInputItem, UpdateExperimentTemplateLogConfigurationInput, UpdateExperimentTemplateStopConditionInput, @@ -120,20 +98,18 @@ export const se_CreateExperimentTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates"; let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_CreateExperimentTemplateActionInputMap(input.actions, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.logConfiguration != null && { - logConfiguration: se_CreateExperimentTemplateLogConfigurationInput(input.logConfiguration, context), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stopConditions != null && { - stopConditions: se_CreateExperimentTemplateStopConditionInputList(input.stopConditions, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.targets != null && { targets: se_CreateExperimentTemplateTargetInputMap(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + logConfiguration: (_) => _json(_), + roleArn: [], + stopConditions: (_) => _json(_), + tags: (_) => _json(_), + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -414,11 +390,13 @@ export const se_StartExperimentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.experimentTemplateId != null && { experimentTemplateId: input.experimentTemplateId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + experimentTemplateId: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -467,9 +445,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -523,18 +503,16 @@ export const se_UpdateExperimentTemplateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_UpdateExperimentTemplateActionInputMap(input.actions, context) }), - ...(input.description != null && { description: input.description }), - ...(input.logConfiguration != null && { - logConfiguration: se_UpdateExperimentTemplateLogConfigurationInput(input.logConfiguration, context), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stopConditions != null && { - stopConditions: se_UpdateExperimentTemplateStopConditionInputList(input.stopConditions, context), - }), - ...(input.targets != null && { targets: se_UpdateExperimentTemplateTargetInputMap(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => _json(_), + description: [], + logConfiguration: (_) => _json(_), + roleArn: [], + stopConditions: (_) => _json(_), + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -560,9 +538,10 @@ export const de_CreateExperimentTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experimentTemplate != null) { - contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context); - } + const doc = take(data, { + experimentTemplate: (_) => de_ExperimentTemplate(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -593,10 +572,9 @@ const de_CreateExperimentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -616,9 +594,10 @@ export const de_DeleteExperimentTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experimentTemplate != null) { - contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context); - } + const doc = take(data, { + experimentTemplate: (_) => de_ExperimentTemplate(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -643,10 +622,9 @@ const de_DeleteExperimentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -666,9 +644,10 @@ export const de_GetActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = de_Action(data.action, context); - } + const doc = take(data, { + action: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -693,10 +672,9 @@ const de_GetActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -716,9 +694,10 @@ export const de_GetExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiment != null) { - contents.experiment = de_Experiment(data.experiment, context); - } + const doc = take(data, { + experiment: (_) => de_Experiment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -743,10 +722,9 @@ const de_GetExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -766,9 +744,10 @@ export const de_GetExperimentTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experimentTemplate != null) { - contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context); - } + const doc = take(data, { + experimentTemplate: (_) => de_ExperimentTemplate(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -793,10 +772,9 @@ const de_GetExperimentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -816,9 +794,10 @@ export const de_GetTargetResourceTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.targetResourceType != null) { - contents.targetResourceType = de_TargetResourceType(data.targetResourceType, context); - } + const doc = take(data, { + targetResourceType: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -843,10 +822,9 @@ const de_GetTargetResourceTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -866,12 +844,11 @@ export const de_ListActionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actions != null) { - contents.actions = de_ActionSummaryList(data.actions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + actions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -893,10 +870,9 @@ const de_ListActionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -916,12 +892,11 @@ export const de_ListExperimentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiments != null) { - contents.experiments = de_ExperimentSummaryList(data.experiments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + experiments: (_) => de_ExperimentSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -943,10 +918,9 @@ const de_ListExperimentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -966,12 +940,11 @@ export const de_ListExperimentTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experimentTemplates != null) { - contents.experimentTemplates = de_ExperimentTemplateSummaryList(data.experimentTemplates, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + experimentTemplates: (_) => de_ExperimentTemplateSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -993,10 +966,9 @@ const de_ListExperimentTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1016,9 +988,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1035,10 +1008,9 @@ const de_ListTagsForResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1057,12 +1029,11 @@ export const de_ListTargetResourceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.targetResourceTypes != null) { - contents.targetResourceTypes = de_TargetResourceTypeSummaryList(data.targetResourceTypes, context); - } + const doc = take(data, { + nextToken: __expectString, + targetResourceTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1084,10 +1055,9 @@ const de_ListTargetResourceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1107,9 +1077,10 @@ export const de_StartExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiment != null) { - contents.experiment = de_Experiment(data.experiment, context); - } + const doc = take(data, { + experiment: (_) => de_Experiment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1140,10 +1111,9 @@ const de_StartExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1163,9 +1133,10 @@ export const de_StopExperimentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experiment != null) { - contents.experiment = de_Experiment(data.experiment, context); - } + const doc = take(data, { + experiment: (_) => de_Experiment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1190,10 +1161,9 @@ const de_StopExperimentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,10 +1199,9 @@ const de_TagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1267,10 +1236,9 @@ const de_UntagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1289,9 +1257,10 @@ export const de_UpdateExperimentTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.experimentTemplate != null) { - contents.experimentTemplate = de_ExperimentTemplate(data.experimentTemplate, context); - } + const doc = take(data, { + experimentTemplate: (_) => de_ExperimentTemplate(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1319,25 +1288,25 @@ const de_UpdateExperimentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1354,9 +1323,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1373,9 +1343,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1389,9 +1360,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1399,501 +1371,104 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CreateExperimentTemplateActionInput - */ -const se_CreateExperimentTemplateActionInput = ( - input: CreateExperimentTemplateActionInput, - context: __SerdeContext -): any => { - return { - ...(input.actionId != null && { actionId: input.actionId }), - ...(input.description != null && { description: input.description }), - ...(input.parameters != null && { parameters: se_ExperimentTemplateActionParameterMap(input.parameters, context) }), - ...(input.startAfter != null && { - startAfter: se_ExperimentTemplateActionStartAfterList(input.startAfter, context), - }), - ...(input.targets != null && { targets: se_ExperimentTemplateActionTargetMap(input.targets, context) }), - }; -}; +// se_CreateExperimentTemplateActionInput omitted. -/** - * serializeAws_restJson1CreateExperimentTemplateActionInputMap - */ -const se_CreateExperimentTemplateActionInputMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CreateExperimentTemplateActionInput(value, context); - return acc; - }, {}); -}; +// se_CreateExperimentTemplateActionInputMap omitted. -/** - * serializeAws_restJson1CreateExperimentTemplateLogConfigurationInput - */ -const se_CreateExperimentTemplateLogConfigurationInput = ( - input: CreateExperimentTemplateLogConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.cloudWatchLogsConfiguration != null && { - cloudWatchLogsConfiguration: se_ExperimentTemplateCloudWatchLogsLogConfigurationInput( - input.cloudWatchLogsConfiguration, - context - ), - }), - ...(input.logSchemaVersion != null && { logSchemaVersion: input.logSchemaVersion }), - ...(input.s3Configuration != null && { - s3Configuration: se_ExperimentTemplateS3LogConfigurationInput(input.s3Configuration, context), - }), - }; -}; +// se_CreateExperimentTemplateLogConfigurationInput omitted. -/** - * serializeAws_restJson1CreateExperimentTemplateStopConditionInput - */ -const se_CreateExperimentTemplateStopConditionInput = ( - input: CreateExperimentTemplateStopConditionInput, - context: __SerdeContext -): any => { - return { - ...(input.source != null && { source: input.source }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_CreateExperimentTemplateStopConditionInput omitted. -/** - * serializeAws_restJson1CreateExperimentTemplateStopConditionInputList - */ -const se_CreateExperimentTemplateStopConditionInputList = ( - input: CreateExperimentTemplateStopConditionInput[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateExperimentTemplateStopConditionInput(entry, context); - }); -}; +// se_CreateExperimentTemplateStopConditionInputList omitted. -/** - * serializeAws_restJson1CreateExperimentTemplateTargetInput - */ -const se_CreateExperimentTemplateTargetInput = ( - input: CreateExperimentTemplateTargetInput, - context: __SerdeContext -): any => { - return { - ...(input.filters != null && { filters: se_ExperimentTemplateTargetFilterInputList(input.filters, context) }), - ...(input.parameters != null && { parameters: se_ExperimentTemplateTargetParameterMap(input.parameters, context) }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - ...(input.resourceTags != null && { resourceTags: se_TagMap(input.resourceTags, context) }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.selectionMode != null && { selectionMode: input.selectionMode }), - }; -}; +// se_CreateExperimentTemplateTargetInput omitted. -/** - * serializeAws_restJson1CreateExperimentTemplateTargetInputMap - */ -const se_CreateExperimentTemplateTargetInputMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CreateExperimentTemplateTargetInput(value, context); - return acc; - }, {}); -}; +// se_CreateExperimentTemplateTargetInputMap omitted. -/** - * serializeAws_restJson1ExperimentTemplateActionParameterMap - */ -const se_ExperimentTemplateActionParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ExperimentTemplateActionParameterMap omitted. -/** - * serializeAws_restJson1ExperimentTemplateActionStartAfterList - */ -const se_ExperimentTemplateActionStartAfterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExperimentTemplateActionStartAfterList omitted. -/** - * serializeAws_restJson1ExperimentTemplateActionTargetMap - */ -const se_ExperimentTemplateActionTargetMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ExperimentTemplateActionTargetMap omitted. -/** - * serializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfigurationInput - */ -const se_ExperimentTemplateCloudWatchLogsLogConfigurationInput = ( - input: ExperimentTemplateCloudWatchLogsLogConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }), - }; -}; +// se_ExperimentTemplateCloudWatchLogsLogConfigurationInput omitted. -/** - * serializeAws_restJson1ExperimentTemplateS3LogConfigurationInput - */ -const se_ExperimentTemplateS3LogConfigurationInput = ( - input: ExperimentTemplateS3LogConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_ExperimentTemplateS3LogConfigurationInput omitted. -/** - * serializeAws_restJson1ExperimentTemplateTargetFilterInputList - */ -const se_ExperimentTemplateTargetFilterInputList = ( - input: ExperimentTemplateTargetInputFilter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExperimentTemplateTargetInputFilter(entry, context); - }); -}; +// se_ExperimentTemplateTargetFilterInputList omitted. -/** - * serializeAws_restJson1ExperimentTemplateTargetFilterValues - */ -const se_ExperimentTemplateTargetFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExperimentTemplateTargetFilterValues omitted. -/** - * serializeAws_restJson1ExperimentTemplateTargetInputFilter - */ -const se_ExperimentTemplateTargetInputFilter = ( - input: ExperimentTemplateTargetInputFilter, - context: __SerdeContext -): any => { - return { - ...(input.path != null && { path: input.path }), - ...(input.values != null && { values: se_ExperimentTemplateTargetFilterValues(input.values, context) }), - }; -}; +// se_ExperimentTemplateTargetInputFilter omitted. -/** - * serializeAws_restJson1ExperimentTemplateTargetParameterMap - */ -const se_ExperimentTemplateTargetParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ExperimentTemplateTargetParameterMap omitted. -/** - * serializeAws_restJson1ResourceArnList - */ -const se_ResourceArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceArnList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateActionInputItem - */ -const se_UpdateExperimentTemplateActionInputItem = ( - input: UpdateExperimentTemplateActionInputItem, - context: __SerdeContext -): any => { - return { - ...(input.actionId != null && { actionId: input.actionId }), - ...(input.description != null && { description: input.description }), - ...(input.parameters != null && { parameters: se_ExperimentTemplateActionParameterMap(input.parameters, context) }), - ...(input.startAfter != null && { - startAfter: se_ExperimentTemplateActionStartAfterList(input.startAfter, context), - }), - ...(input.targets != null && { targets: se_ExperimentTemplateActionTargetMap(input.targets, context) }), - }; -}; +// se_UpdateExperimentTemplateActionInputItem omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateActionInputMap - */ -const se_UpdateExperimentTemplateActionInputMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_UpdateExperimentTemplateActionInputItem(value, context); - return acc; - }, {}); -}; +// se_UpdateExperimentTemplateActionInputMap omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateLogConfigurationInput - */ -const se_UpdateExperimentTemplateLogConfigurationInput = ( - input: UpdateExperimentTemplateLogConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.cloudWatchLogsConfiguration != null && { - cloudWatchLogsConfiguration: se_ExperimentTemplateCloudWatchLogsLogConfigurationInput( - input.cloudWatchLogsConfiguration, - context - ), - }), - ...(input.logSchemaVersion != null && { logSchemaVersion: input.logSchemaVersion }), - ...(input.s3Configuration != null && { - s3Configuration: se_ExperimentTemplateS3LogConfigurationInput(input.s3Configuration, context), - }), - }; -}; +// se_UpdateExperimentTemplateLogConfigurationInput omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateStopConditionInput - */ -const se_UpdateExperimentTemplateStopConditionInput = ( - input: UpdateExperimentTemplateStopConditionInput, - context: __SerdeContext -): any => { - return { - ...(input.source != null && { source: input.source }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_UpdateExperimentTemplateStopConditionInput omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateStopConditionInputList - */ -const se_UpdateExperimentTemplateStopConditionInputList = ( - input: UpdateExperimentTemplateStopConditionInput[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateExperimentTemplateStopConditionInput(entry, context); - }); -}; +// se_UpdateExperimentTemplateStopConditionInputList omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateTargetInput - */ -const se_UpdateExperimentTemplateTargetInput = ( - input: UpdateExperimentTemplateTargetInput, - context: __SerdeContext -): any => { - return { - ...(input.filters != null && { filters: se_ExperimentTemplateTargetFilterInputList(input.filters, context) }), - ...(input.parameters != null && { parameters: se_ExperimentTemplateTargetParameterMap(input.parameters, context) }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - ...(input.resourceTags != null && { resourceTags: se_TagMap(input.resourceTags, context) }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.selectionMode != null && { selectionMode: input.selectionMode }), - }; -}; +// se_UpdateExperimentTemplateTargetInput omitted. -/** - * serializeAws_restJson1UpdateExperimentTemplateTargetInputMap - */ -const se_UpdateExperimentTemplateTargetInputMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_UpdateExperimentTemplateTargetInput(value, context); - return acc; - }, {}); -}; +// se_UpdateExperimentTemplateTargetInputMap omitted. -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - parameters: output.parameters != null ? de_ActionParameterMap(output.parameters, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - targets: output.targets != null ? de_ActionTargetMap(output.targets, context) : undefined, - } as any; -}; +// de_Action omitted. -/** - * deserializeAws_restJson1ActionParameter - */ -const de_ActionParameter = (output: any, context: __SerdeContext): ActionParameter => { - return { - description: __expectString(output.description), - required: __expectBoolean(output.required), - } as any; -}; +// de_ActionParameter omitted. -/** - * deserializeAws_restJson1ActionParameterMap - */ -const de_ActionParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ActionParameter(value, context); - return acc; - }, {}); -}; +// de_ActionParameterMap omitted. -/** - * deserializeAws_restJson1ActionSummary - */ -const de_ActionSummary = (output: any, context: __SerdeContext): ActionSummary => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - targets: output.targets != null ? de_ActionTargetMap(output.targets, context) : undefined, - } as any; -}; +// de_ActionSummary omitted. -/** - * deserializeAws_restJson1ActionSummaryList - */ -const de_ActionSummaryList = (output: any, context: __SerdeContext): ActionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionSummary(entry, context); - }); - return retVal; -}; +// de_ActionSummaryList omitted. -/** - * deserializeAws_restJson1ActionTarget - */ -const de_ActionTarget = (output: any, context: __SerdeContext): ActionTarget => { - return { - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ActionTarget omitted. -/** - * deserializeAws_restJson1ActionTargetMap - */ -const de_ActionTargetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ActionTarget(value, context); - return acc; - }, {}); -}; +// de_ActionTargetMap omitted. /** * deserializeAws_restJson1Experiment */ const de_Experiment = (output: any, context: __SerdeContext): Experiment => { - return { - actions: output.actions != null ? de_ExperimentActionMap(output.actions, context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - experimentTemplateId: __expectString(output.experimentTemplateId), - id: __expectString(output.id), - logConfiguration: - output.logConfiguration != null ? de_ExperimentLogConfiguration(output.logConfiguration, context) : undefined, - roleArn: __expectString(output.roleArn), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - state: output.state != null ? de_ExperimentState(output.state, context) : undefined, - stopConditions: - output.stopConditions != null ? de_ExperimentStopConditionList(output.stopConditions, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - targets: output.targets != null ? de_ExperimentTargetMap(output.targets, context) : undefined, - } as any; + return take(output, { + actions: (_: any) => de_ExperimentActionMap(_, context), + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + experimentTemplateId: __expectString, + id: __expectString, + logConfiguration: _json, + roleArn: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: _json, + stopConditions: _json, + tags: _json, + targets: _json, + }) as any; }; /** * deserializeAws_restJson1ExperimentAction */ const de_ExperimentAction = (output: any, context: __SerdeContext): ExperimentAction => { - return { - actionId: __expectString(output.actionId), - description: __expectString(output.description), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - parameters: output.parameters != null ? de_ExperimentActionParameterMap(output.parameters, context) : undefined, - startAfter: output.startAfter != null ? de_ExperimentActionStartAfterList(output.startAfter, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - state: output.state != null ? de_ExperimentActionState(output.state, context) : undefined, - targets: output.targets != null ? de_ExperimentActionTargetMap(output.targets, context) : undefined, - } as any; + return take(output, { + actionId: __expectString, + description: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + parameters: _json, + startAfter: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: _json, + targets: _json, + }) as any; }; /** @@ -1909,143 +1484,37 @@ const de_ExperimentActionMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExperimentActionParameterMap omitted. -/** - * deserializeAws_restJson1ExperimentActionStartAfterList - */ -const de_ExperimentActionStartAfterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExperimentActionStartAfterList omitted. -/** - * deserializeAws_restJson1ExperimentActionState - */ -const de_ExperimentActionState = (output: any, context: __SerdeContext): ExperimentActionState => { - return { - reason: __expectString(output.reason), - status: __expectString(output.status), - } as any; -}; +// de_ExperimentActionState omitted. -/** - * deserializeAws_restJson1ExperimentActionTargetMap - */ -const de_ExperimentActionTargetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExperimentActionTargetMap omitted. -/** - * deserializeAws_restJson1ExperimentCloudWatchLogsLogConfiguration - */ -const de_ExperimentCloudWatchLogsLogConfiguration = ( - output: any, - context: __SerdeContext -): ExperimentCloudWatchLogsLogConfiguration => { - return { - logGroupArn: __expectString(output.logGroupArn), - } as any; -}; +// de_ExperimentCloudWatchLogsLogConfiguration omitted. -/** - * deserializeAws_restJson1ExperimentLogConfiguration - */ -const de_ExperimentLogConfiguration = (output: any, context: __SerdeContext): ExperimentLogConfiguration => { - return { - cloudWatchLogsConfiguration: - output.cloudWatchLogsConfiguration != null - ? de_ExperimentCloudWatchLogsLogConfiguration(output.cloudWatchLogsConfiguration, context) - : undefined, - logSchemaVersion: __expectInt32(output.logSchemaVersion), - s3Configuration: - output.s3Configuration != null ? de_ExperimentS3LogConfiguration(output.s3Configuration, context) : undefined, - } as any; -}; +// de_ExperimentLogConfiguration omitted. -/** - * deserializeAws_restJson1ExperimentS3LogConfiguration - */ -const de_ExperimentS3LogConfiguration = (output: any, context: __SerdeContext): ExperimentS3LogConfiguration => { - return { - bucketName: __expectString(output.bucketName), - prefix: __expectString(output.prefix), - } as any; -}; +// de_ExperimentS3LogConfiguration omitted. -/** - * deserializeAws_restJson1ExperimentState - */ -const de_ExperimentState = (output: any, context: __SerdeContext): ExperimentState => { - return { - reason: __expectString(output.reason), - status: __expectString(output.status), - } as any; -}; +// de_ExperimentState omitted. -/** - * deserializeAws_restJson1ExperimentStopCondition - */ -const de_ExperimentStopCondition = (output: any, context: __SerdeContext): ExperimentStopCondition => { - return { - source: __expectString(output.source), - value: __expectString(output.value), - } as any; -}; +// de_ExperimentStopCondition omitted. -/** - * deserializeAws_restJson1ExperimentStopConditionList - */ -const de_ExperimentStopConditionList = (output: any, context: __SerdeContext): ExperimentStopCondition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperimentStopCondition(entry, context); - }); - return retVal; -}; +// de_ExperimentStopConditionList omitted. /** * deserializeAws_restJson1ExperimentSummary */ const de_ExperimentSummary = (output: any, context: __SerdeContext): ExperimentSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - experimentTemplateId: __expectString(output.experimentTemplateId), - id: __expectString(output.id), - state: output.state != null ? de_ExperimentState(output.state, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + experimentTemplateId: __expectString, + id: __expectString, + state: _json, + tags: _json, + }) as any; }; /** @@ -2055,286 +1524,72 @@ const de_ExperimentSummaryList = (output: any, context: __SerdeContext): Experim const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExperimentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExperimentTarget - */ -const de_ExperimentTarget = (output: any, context: __SerdeContext): ExperimentTarget => { - return { - filters: output.filters != null ? de_ExperimentTargetFilterList(output.filters, context) : undefined, - parameters: output.parameters != null ? de_ExperimentTargetParameterMap(output.parameters, context) : undefined, - resourceArns: output.resourceArns != null ? de_ResourceArnList(output.resourceArns, context) : undefined, - resourceTags: output.resourceTags != null ? de_TagMap(output.resourceTags, context) : undefined, - resourceType: __expectString(output.resourceType), - selectionMode: __expectString(output.selectionMode), - } as any; -}; +// de_ExperimentTarget omitted. -/** - * deserializeAws_restJson1ExperimentTargetFilter - */ -const de_ExperimentTargetFilter = (output: any, context: __SerdeContext): ExperimentTargetFilter => { - return { - path: __expectString(output.path), - values: output.values != null ? de_ExperimentTargetFilterValues(output.values, context) : undefined, - } as any; -}; +// de_ExperimentTargetFilter omitted. -/** - * deserializeAws_restJson1ExperimentTargetFilterList - */ -const de_ExperimentTargetFilterList = (output: any, context: __SerdeContext): ExperimentTargetFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperimentTargetFilter(entry, context); - }); - return retVal; -}; +// de_ExperimentTargetFilterList omitted. -/** - * deserializeAws_restJson1ExperimentTargetFilterValues - */ -const de_ExperimentTargetFilterValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExperimentTargetFilterValues omitted. -/** - * deserializeAws_restJson1ExperimentTargetMap - */ -const de_ExperimentTargetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ExperimentTarget(value, context); - return acc; - }, {}); -}; +// de_ExperimentTargetMap omitted. -/** - * deserializeAws_restJson1ExperimentTargetParameterMap - */ -const de_ExperimentTargetParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExperimentTargetParameterMap omitted. /** * deserializeAws_restJson1ExperimentTemplate */ const de_ExperimentTemplate = (output: any, context: __SerdeContext): ExperimentTemplate => { - return { - actions: output.actions != null ? de_ExperimentTemplateActionMap(output.actions, context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - logConfiguration: - output.logConfiguration != null - ? de_ExperimentTemplateLogConfiguration(output.logConfiguration, context) - : undefined, - roleArn: __expectString(output.roleArn), - stopConditions: - output.stopConditions != null - ? de_ExperimentTemplateStopConditionList(output.stopConditions, context) - : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - targets: output.targets != null ? de_ExperimentTemplateTargetMap(output.targets, context) : undefined, - } as any; + return take(output, { + actions: _json, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + logConfiguration: _json, + roleArn: __expectString, + stopConditions: _json, + tags: _json, + targets: _json, + }) as any; }; -/** - * deserializeAws_restJson1ExperimentTemplateAction - */ -const de_ExperimentTemplateAction = (output: any, context: __SerdeContext): ExperimentTemplateAction => { - return { - actionId: __expectString(output.actionId), - description: __expectString(output.description), - parameters: - output.parameters != null ? de_ExperimentTemplateActionParameterMap(output.parameters, context) : undefined, - startAfter: - output.startAfter != null ? de_ExperimentTemplateActionStartAfterList(output.startAfter, context) : undefined, - targets: output.targets != null ? de_ExperimentTemplateActionTargetMap(output.targets, context) : undefined, - } as any; -}; +// de_ExperimentTemplateAction omitted. -/** - * deserializeAws_restJson1ExperimentTemplateActionMap - */ -const de_ExperimentTemplateActionMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ExperimentTemplateAction(value, context); - return acc; - }, {}); -}; +// de_ExperimentTemplateActionMap omitted. -/** - * deserializeAws_restJson1ExperimentTemplateActionParameterMap - */ -const de_ExperimentTemplateActionParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExperimentTemplateActionParameterMap omitted. -/** - * deserializeAws_restJson1ExperimentTemplateActionStartAfterList - */ -const de_ExperimentTemplateActionStartAfterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExperimentTemplateActionStartAfterList omitted. -/** - * deserializeAws_restJson1ExperimentTemplateActionTargetMap - */ -const de_ExperimentTemplateActionTargetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExperimentTemplateActionTargetMap omitted. -/** - * deserializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfiguration - */ -const de_ExperimentTemplateCloudWatchLogsLogConfiguration = ( - output: any, - context: __SerdeContext -): ExperimentTemplateCloudWatchLogsLogConfiguration => { - return { - logGroupArn: __expectString(output.logGroupArn), - } as any; -}; +// de_ExperimentTemplateCloudWatchLogsLogConfiguration omitted. -/** - * deserializeAws_restJson1ExperimentTemplateLogConfiguration - */ -const de_ExperimentTemplateLogConfiguration = ( - output: any, - context: __SerdeContext -): ExperimentTemplateLogConfiguration => { - return { - cloudWatchLogsConfiguration: - output.cloudWatchLogsConfiguration != null - ? de_ExperimentTemplateCloudWatchLogsLogConfiguration(output.cloudWatchLogsConfiguration, context) - : undefined, - logSchemaVersion: __expectInt32(output.logSchemaVersion), - s3Configuration: - output.s3Configuration != null - ? de_ExperimentTemplateS3LogConfiguration(output.s3Configuration, context) - : undefined, - } as any; -}; +// de_ExperimentTemplateLogConfiguration omitted. -/** - * deserializeAws_restJson1ExperimentTemplateS3LogConfiguration - */ -const de_ExperimentTemplateS3LogConfiguration = ( - output: any, - context: __SerdeContext -): ExperimentTemplateS3LogConfiguration => { - return { - bucketName: __expectString(output.bucketName), - prefix: __expectString(output.prefix), - } as any; -}; +// de_ExperimentTemplateS3LogConfiguration omitted. -/** - * deserializeAws_restJson1ExperimentTemplateStopCondition - */ -const de_ExperimentTemplateStopCondition = (output: any, context: __SerdeContext): ExperimentTemplateStopCondition => { - return { - source: __expectString(output.source), - value: __expectString(output.value), - } as any; -}; +// de_ExperimentTemplateStopCondition omitted. -/** - * deserializeAws_restJson1ExperimentTemplateStopConditionList - */ -const de_ExperimentTemplateStopConditionList = ( - output: any, - context: __SerdeContext -): ExperimentTemplateStopCondition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperimentTemplateStopCondition(entry, context); - }); - return retVal; -}; +// de_ExperimentTemplateStopConditionList omitted. /** * deserializeAws_restJson1ExperimentTemplateSummary */ const de_ExperimentTemplateSummary = (output: any, context: __SerdeContext): ExperimentTemplateSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + }) as any; }; /** @@ -2344,193 +1599,36 @@ const de_ExperimentTemplateSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExperimentTemplateSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExperimentTemplateTarget - */ -const de_ExperimentTemplateTarget = (output: any, context: __SerdeContext): ExperimentTemplateTarget => { - return { - filters: output.filters != null ? de_ExperimentTemplateTargetFilterList(output.filters, context) : undefined, - parameters: - output.parameters != null ? de_ExperimentTemplateTargetParameterMap(output.parameters, context) : undefined, - resourceArns: output.resourceArns != null ? de_ResourceArnList(output.resourceArns, context) : undefined, - resourceTags: output.resourceTags != null ? de_TagMap(output.resourceTags, context) : undefined, - resourceType: __expectString(output.resourceType), - selectionMode: __expectString(output.selectionMode), - } as any; -}; +// de_ExperimentTemplateTarget omitted. -/** - * deserializeAws_restJson1ExperimentTemplateTargetFilter - */ -const de_ExperimentTemplateTargetFilter = (output: any, context: __SerdeContext): ExperimentTemplateTargetFilter => { - return { - path: __expectString(output.path), - values: output.values != null ? de_ExperimentTemplateTargetFilterValues(output.values, context) : undefined, - } as any; -}; +// de_ExperimentTemplateTargetFilter omitted. -/** - * deserializeAws_restJson1ExperimentTemplateTargetFilterList - */ -const de_ExperimentTemplateTargetFilterList = ( - output: any, - context: __SerdeContext -): ExperimentTemplateTargetFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperimentTemplateTargetFilter(entry, context); - }); - return retVal; -}; +// de_ExperimentTemplateTargetFilterList omitted. -/** - * deserializeAws_restJson1ExperimentTemplateTargetFilterValues - */ -const de_ExperimentTemplateTargetFilterValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExperimentTemplateTargetFilterValues omitted. -/** - * deserializeAws_restJson1ExperimentTemplateTargetMap - */ -const de_ExperimentTemplateTargetMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ExperimentTemplateTarget(value, context); - return acc; - }, {}); -}; +// de_ExperimentTemplateTargetMap omitted. -/** - * deserializeAws_restJson1ExperimentTemplateTargetParameterMap - */ -const de_ExperimentTemplateTargetParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExperimentTemplateTargetParameterMap omitted. -/** - * deserializeAws_restJson1ResourceArnList - */ -const de_ResourceArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceArnList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TargetResourceType - */ -const de_TargetResourceType = (output: any, context: __SerdeContext): TargetResourceType => { - return { - description: __expectString(output.description), - parameters: output.parameters != null ? de_TargetResourceTypeParameterMap(output.parameters, context) : undefined, - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TargetResourceType omitted. -/** - * deserializeAws_restJson1TargetResourceTypeParameter - */ -const de_TargetResourceTypeParameter = (output: any, context: __SerdeContext): TargetResourceTypeParameter => { - return { - description: __expectString(output.description), - required: __expectBoolean(output.required), - } as any; -}; +// de_TargetResourceTypeParameter omitted. -/** - * deserializeAws_restJson1TargetResourceTypeParameterMap - */ -const de_TargetResourceTypeParameterMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_TargetResourceTypeParameter(value, context); - return acc; - }, - {} - ); -}; +// de_TargetResourceTypeParameterMap omitted. -/** - * deserializeAws_restJson1TargetResourceTypeSummary - */ -const de_TargetResourceTypeSummary = (output: any, context: __SerdeContext): TargetResourceTypeSummary => { - return { - description: __expectString(output.description), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TargetResourceTypeSummary omitted. -/** - * deserializeAws_restJson1TargetResourceTypeSummaryList - */ -const de_TargetResourceTypeSummaryList = (output: any, context: __SerdeContext): TargetResourceTypeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetResourceTypeSummary(entry, context); - }); - return retVal; -}; +// de_TargetResourceTypeSummaryList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-fms/src/protocols/Aws_json1_1.ts b/clients/client-fms/src/protocols/Aws_json1_1.ts index 7b1514ae9494..9969cc6fc126 100644 --- a/clients/client-fms/src/protocols/Aws_json1_1.ts +++ b/clients/client-fms/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -115,66 +115,32 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { FMSServiceException as __BaseException } from "../models/FMSServiceException"; import { - ActionTarget, App, AppsListData, - AppsListDataSummary, AssociateAdminAccountRequest, AssociateThirdPartyFirewallRequest, - AssociateThirdPartyFirewallResponse, - AwsEc2InstanceViolation, - AwsEc2NetworkInterfaceViolation, - AwsVPCSecurityGroupViolation, BatchAssociateResourceRequest, - BatchAssociateResourceResponse, BatchDisassociateResourceRequest, - BatchDisassociateResourceResponse, - ComplianceViolator, - CustomerPolicyScopeIdType, DeleteAppsListRequest, DeleteNotificationChannelRequest, DeletePolicyRequest, DeleteProtocolsListRequest, DeleteResourceSetRequest, - DependentServiceName, DisassociateAdminAccountRequest, DisassociateThirdPartyFirewallRequest, - DisassociateThirdPartyFirewallResponse, - DiscoveredResource, - DnsDuplicateRuleGroupViolation, - DnsRuleGroupLimitExceededViolation, - DnsRuleGroupPriorityConflictViolation, - EC2AssociateRouteTableAction, - EC2CopyRouteTableAction, - EC2CreateRouteAction, - EC2CreateRouteTableAction, - EC2DeleteRouteAction, - EC2ReplaceRouteAction, - EC2ReplaceRouteTableAssociationAction, - EvaluationResult, - ExpectedRoute, - FailedItem, - FirewallSubnetIsOutOfScopeViolation, - FirewallSubnetMissingVPCEndpointViolation, - FMSPolicyUpdateFirewallCreationConfigAction, GetAdminAccountRequest, - GetAdminAccountResponse, GetAppsListRequest, GetAppsListResponse, GetComplianceDetailRequest, GetComplianceDetailResponse, GetNotificationChannelRequest, - GetNotificationChannelResponse, GetPolicyRequest, - GetPolicyResponse, GetProtectionStatusRequest, - GetProtectionStatusResponse, GetProtocolsListRequest, GetProtocolsListResponse, GetResourceSetRequest, GetResourceSetResponse, GetThirdPartyFirewallAssociationStatusRequest, - GetThirdPartyFirewallAssociationStatusResponse, GetViolationDetailsRequest, GetViolationDetailsResponse, InternalErrorException, @@ -183,83 +149,40 @@ import { InvalidTypeException, LimitExceededException, ListAppsListsRequest, - ListAppsListsResponse, ListComplianceStatusRequest, ListComplianceStatusResponse, ListDiscoveredResourcesRequest, - ListDiscoveredResourcesResponse, ListMemberAccountsRequest, - ListMemberAccountsResponse, ListPoliciesRequest, - ListPoliciesResponse, ListProtocolsListsRequest, - ListProtocolsListsResponse, ListResourceSetResourcesRequest, - ListResourceSetResourcesResponse, ListResourceSetsRequest, ListResourceSetsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListThirdPartyFirewallFirewallPoliciesRequest, - ListThirdPartyFirewallFirewallPoliciesResponse, - NetworkFirewallBlackHoleRouteDetectedViolation, - NetworkFirewallInternetTrafficNotInspectedViolation, - NetworkFirewallInvalidRouteConfigurationViolation, - NetworkFirewallMissingExpectedRoutesViolation, - NetworkFirewallMissingExpectedRTViolation, - NetworkFirewallMissingFirewallViolation, - NetworkFirewallMissingSubnetViolation, NetworkFirewallPolicy, - NetworkFirewallPolicyDescription, - NetworkFirewallPolicyModifiedViolation, - NetworkFirewallStatefulRuleGroupOverride, - NetworkFirewallUnexpectedFirewallRoutesViolation, - NetworkFirewallUnexpectedGatewayRoutesViolation, - PartialMatch, Policy, PolicyComplianceDetail, PolicyComplianceStatus, PolicyOption, - PolicySummary, - PossibleRemediationAction, - PossibleRemediationActions, ProtocolsListData, - ProtocolsListDataSummary, PutAppsListRequest, PutAppsListResponse, PutNotificationChannelRequest, PutPolicyRequest, - PutPolicyResponse, PutProtocolsListRequest, PutProtocolsListResponse, PutResourceSetRequest, PutResourceSetResponse, - RemediationAction, - RemediationActionWithOrder, - Resource, ResourceNotFoundException, ResourceSet, ResourceSetSummary, ResourceTag, - ResourceViolation, - Route, - RouteHasOutOfScopeEndpointViolation, - SecurityGroupRemediationAction, - SecurityGroupRuleDescription, SecurityServicePolicyData, - StatefulEngineOptions, - StatefulRuleGroup, - StatelessRuleGroup, Tag, TagResourceRequest, - TagResourceResponse, - ThirdPartyFirewallFirewallPolicy, - ThirdPartyFirewallMissingExpectedRouteTableViolation, - ThirdPartyFirewallMissingFirewallViolation, - ThirdPartyFirewallMissingSubnetViolation, ThirdPartyFirewallPolicy, UntagResourceRequest, - UntagResourceResponse, ViolationDetail, } from "../models/models_0"; @@ -272,7 +195,7 @@ export const se_AssociateAdminAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateAdminAccount"); let body: any; - body = JSON.stringify(se_AssociateAdminAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -285,7 +208,7 @@ export const se_AssociateThirdPartyFirewallCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateThirdPartyFirewall"); let body: any; - body = JSON.stringify(se_AssociateThirdPartyFirewallRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -298,7 +221,7 @@ export const se_BatchAssociateResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchAssociateResource"); let body: any; - body = JSON.stringify(se_BatchAssociateResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -311,7 +234,7 @@ export const se_BatchDisassociateResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDisassociateResource"); let body: any; - body = JSON.stringify(se_BatchDisassociateResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +247,7 @@ export const se_DeleteAppsListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAppsList"); let body: any; - body = JSON.stringify(se_DeleteAppsListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +260,7 @@ export const se_DeleteNotificationChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNotificationChannel"); let body: any; - body = JSON.stringify(se_DeleteNotificationChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +273,7 @@ export const se_DeletePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePolicy"); let body: any; - body = JSON.stringify(se_DeletePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +286,7 @@ export const se_DeleteProtocolsListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProtocolsList"); let body: any; - body = JSON.stringify(se_DeleteProtocolsListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +299,7 @@ export const se_DeleteResourceSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourceSet"); let body: any; - body = JSON.stringify(se_DeleteResourceSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +312,7 @@ export const se_DisassociateAdminAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateAdminAccount"); let body: any; - body = JSON.stringify(se_DisassociateAdminAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +325,7 @@ export const se_DisassociateThirdPartyFirewallCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateThirdPartyFirewall"); let body: any; - body = JSON.stringify(se_DisassociateThirdPartyFirewallRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +338,7 @@ export const se_GetAdminAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAdminAccount"); let body: any; - body = JSON.stringify(se_GetAdminAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -428,7 +351,7 @@ export const se_GetAppsListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAppsList"); let body: any; - body = JSON.stringify(se_GetAppsListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,7 +364,7 @@ export const se_GetComplianceDetailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComplianceDetail"); let body: any; - body = JSON.stringify(se_GetComplianceDetailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -454,7 +377,7 @@ export const se_GetNotificationChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNotificationChannel"); let body: any; - body = JSON.stringify(se_GetNotificationChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -467,7 +390,7 @@ export const se_GetPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPolicy"); let body: any; - body = JSON.stringify(se_GetPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -493,7 +416,7 @@ export const se_GetProtocolsListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetProtocolsList"); let body: any; - body = JSON.stringify(se_GetProtocolsListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -506,7 +429,7 @@ export const se_GetResourceSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourceSet"); let body: any; - body = JSON.stringify(se_GetResourceSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -519,7 +442,7 @@ export const se_GetThirdPartyFirewallAssociationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetThirdPartyFirewallAssociationStatus"); let body: any; - body = JSON.stringify(se_GetThirdPartyFirewallAssociationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -532,7 +455,7 @@ export const se_GetViolationDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetViolationDetails"); let body: any; - body = JSON.stringify(se_GetViolationDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +468,7 @@ export const se_ListAppsListsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAppsLists"); let body: any; - body = JSON.stringify(se_ListAppsListsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -558,7 +481,7 @@ export const se_ListComplianceStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComplianceStatus"); let body: any; - body = JSON.stringify(se_ListComplianceStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -571,7 +494,7 @@ export const se_ListDiscoveredResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDiscoveredResources"); let body: any; - body = JSON.stringify(se_ListDiscoveredResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +507,7 @@ export const se_ListMemberAccountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMemberAccounts"); let body: any; - body = JSON.stringify(se_ListMemberAccountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +520,7 @@ export const se_ListPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPolicies"); let body: any; - body = JSON.stringify(se_ListPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +533,7 @@ export const se_ListProtocolsListsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProtocolsLists"); let body: any; - body = JSON.stringify(se_ListProtocolsListsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -623,7 +546,7 @@ export const se_ListResourceSetResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceSetResources"); let body: any; - body = JSON.stringify(se_ListResourceSetResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -636,7 +559,7 @@ export const se_ListResourceSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceSets"); let body: any; - body = JSON.stringify(se_ListResourceSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +572,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +585,7 @@ export const se_ListThirdPartyFirewallFirewallPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListThirdPartyFirewallFirewallPolicies"); let body: any; - body = JSON.stringify(se_ListThirdPartyFirewallFirewallPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -688,7 +611,7 @@ export const se_PutNotificationChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutNotificationChannel"); let body: any; - body = JSON.stringify(se_PutNotificationChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -701,7 +624,7 @@ export const se_PutPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPolicy"); let body: any; - body = JSON.stringify(se_PutPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -740,7 +663,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -753,7 +676,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -771,7 +694,7 @@ export const de_AssociateAdminAccountCommand = async ( const response: AssociateAdminAccountCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -804,10 +727,9 @@ const de_AssociateAdminAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -825,12 +747,12 @@ export const de_AssociateThirdPartyFirewallCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateThirdPartyFirewallResponse(data, context); + contents = _json(data); const response: AssociateThirdPartyFirewallCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -860,10 +782,9 @@ const de_AssociateThirdPartyFirewallCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -881,12 +802,12 @@ export const de_BatchAssociateResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchAssociateResourceResponse(data, context); + contents = _json(data); const response: BatchAssociateResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -919,10 +840,9 @@ const de_BatchAssociateResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -940,12 +860,12 @@ export const de_BatchDisassociateResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDisassociateResourceResponse(data, context); + contents = _json(data); const response: BatchDisassociateResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -975,10 +895,9 @@ const de_BatchDisassociateResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -998,7 +917,7 @@ export const de_DeleteAppsListCommand = async ( const response: DeleteAppsListCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1025,10 +944,9 @@ const de_DeleteAppsListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1048,7 +966,7 @@ export const de_DeleteNotificationChannelCommand = async ( const response: DeleteNotificationChannelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1075,10 +993,9 @@ const de_DeleteNotificationChannelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1098,7 +1015,7 @@ export const de_DeletePolicyCommand = async ( const response: DeletePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1131,10 +1048,9 @@ const de_DeletePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1154,7 +1070,7 @@ export const de_DeleteProtocolsListCommand = async ( const response: DeleteProtocolsListCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1181,10 +1097,9 @@ const de_DeleteProtocolsListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1204,7 +1119,7 @@ export const de_DeleteResourceSetCommand = async ( const response: DeleteResourceSetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1234,10 +1149,9 @@ const de_DeleteResourceSetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1257,7 +1171,7 @@ export const de_DisassociateAdminAccountCommand = async ( const response: DisassociateAdminAccountCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1284,10 +1198,9 @@ const de_DisassociateAdminAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1305,12 +1218,12 @@ export const de_DisassociateThirdPartyFirewallCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateThirdPartyFirewallResponse(data, context); + contents = _json(data); const response: DisassociateThirdPartyFirewallCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1340,10 +1253,9 @@ const de_DisassociateThirdPartyFirewallCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1361,12 +1273,12 @@ export const de_GetAdminAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAdminAccountResponse(data, context); + contents = _json(data); const response: GetAdminAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1393,10 +1305,9 @@ const de_GetAdminAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1419,7 +1330,7 @@ export const de_GetAppsListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1446,10 +1357,9 @@ const de_GetAppsListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1472,7 +1382,7 @@ export const de_GetComplianceDetailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1502,10 +1412,9 @@ const de_GetComplianceDetailCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1523,12 +1432,12 @@ export const de_GetNotificationChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetNotificationChannelResponse(data, context); + contents = _json(data); const response: GetNotificationChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1555,10 +1464,9 @@ const de_GetNotificationChannelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1576,12 +1484,12 @@ export const de_GetPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPolicyResponse(data, context); + contents = _json(data); const response: GetPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1611,10 +1519,9 @@ const de_GetPolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1632,12 +1539,12 @@ export const de_GetProtectionStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetProtectionStatusResponse(data, context); + contents = _json(data); const response: GetProtectionStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1664,10 +1571,9 @@ const de_GetProtectionStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1690,7 +1596,7 @@ export const de_GetProtocolsListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1717,10 +1623,9 @@ const de_GetProtocolsListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1743,7 +1648,7 @@ export const de_GetResourceSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1773,10 +1678,9 @@ const de_GetResourceSetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1794,12 +1698,12 @@ export const de_GetThirdPartyFirewallAssociationStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetThirdPartyFirewallAssociationStatusResponse(data, context); + contents = _json(data); const response: GetThirdPartyFirewallAssociationStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1829,10 +1733,9 @@ const de_GetThirdPartyFirewallAssociationStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1855,7 +1758,7 @@ export const de_GetViolationDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1882,10 +1785,9 @@ const de_GetViolationDetailsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1903,12 +1805,12 @@ export const de_ListAppsListsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAppsListsResponse(data, context); + contents = _json(data); const response: ListAppsListsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1938,10 +1840,9 @@ const de_ListAppsListsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1964,7 +1865,7 @@ export const de_ListComplianceStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1988,10 +1889,9 @@ const de_ListComplianceStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2009,12 +1909,12 @@ export const de_ListDiscoveredResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDiscoveredResourcesResponse(data, context); + contents = _json(data); const response: ListDiscoveredResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2041,10 +1941,9 @@ const de_ListDiscoveredResourcesCommandError = async ( throw await de_InvalidOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2062,12 +1961,12 @@ export const de_ListMemberAccountsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListMemberAccountsResponse(data, context); + contents = _json(data); const response: ListMemberAccountsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2091,10 +1990,9 @@ const de_ListMemberAccountsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2112,12 +2010,12 @@ export const de_ListPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPoliciesResponse(data, context); + contents = _json(data); const response: ListPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2147,10 +2045,9 @@ const de_ListPoliciesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2168,12 +2065,12 @@ export const de_ListProtocolsListsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProtocolsListsResponse(data, context); + contents = _json(data); const response: ListProtocolsListsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2200,10 +2097,9 @@ const de_ListProtocolsListsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2221,12 +2117,12 @@ export const de_ListResourceSetResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourceSetResourcesResponse(data, context); + contents = _json(data); const response: ListResourceSetResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2256,10 +2152,9 @@ const de_ListResourceSetResourcesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,7 +2177,7 @@ export const de_ListResourceSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2309,10 +2204,9 @@ const de_ListResourceSetsCommandError = async ( throw await de_InvalidOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2330,12 +2224,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2365,10 +2259,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2386,12 +2279,12 @@ export const de_ListThirdPartyFirewallFirewallPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListThirdPartyFirewallFirewallPoliciesResponse(data, context); + contents = _json(data); const response: ListThirdPartyFirewallFirewallPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2421,10 +2314,9 @@ const de_ListThirdPartyFirewallFirewallPoliciesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2447,7 +2339,7 @@ export const de_PutAppsListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2480,10 +2372,9 @@ const de_PutAppsListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2503,7 +2394,7 @@ export const de_PutNotificationChannelCommand = async ( const response: PutNotificationChannelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2530,10 +2421,9 @@ const de_PutNotificationChannelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2551,12 +2441,12 @@ export const de_PutPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPolicyResponse(data, context); + contents = _json(data); const response: PutPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2592,10 +2482,9 @@ const de_PutPolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,7 +2507,7 @@ export const de_PutProtocolsListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2651,10 +2540,9 @@ const de_PutProtocolsListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2677,7 +2565,7 @@ export const de_PutResourceSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2707,10 +2595,9 @@ const de_PutResourceSetCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2728,12 +2615,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2766,10 +2653,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2787,12 +2673,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2822,10 +2708,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2839,7 +2724,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2855,7 +2740,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2871,7 +2756,7 @@ const de_InvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2887,7 +2772,7 @@ const de_InvalidTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2903,7 +2788,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2919,7 +2804,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2927,2296 +2812,594 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1App - */ -const se_App = (input: App, context: __SerdeContext): any => { - return { - ...(input.AppName != null && { AppName: input.AppName }), - ...(input.Port != null && { Port: input.Port }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; +// se_App omitted. -/** - * serializeAws_json1_1AppsList - */ -const se_AppsList = (input: App[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_App(entry, context); - }); -}; +// se_AppsList omitted. /** * serializeAws_json1_1AppsListData */ const se_AppsListData = (input: AppsListData, context: __SerdeContext): any => { - return { - ...(input.AppsList != null && { AppsList: se_AppsList(input.AppsList, context) }), - ...(input.CreateTime != null && { CreateTime: Math.round(input.CreateTime.getTime() / 1000) }), - ...(input.LastUpdateTime != null && { LastUpdateTime: Math.round(input.LastUpdateTime.getTime() / 1000) }), - ...(input.ListId != null && { ListId: input.ListId }), - ...(input.ListName != null && { ListName: input.ListName }), - ...(input.ListUpdateToken != null && { ListUpdateToken: input.ListUpdateToken }), - ...(input.PreviousAppsList != null && { PreviousAppsList: se_PreviousAppsList(input.PreviousAppsList, context) }), - }; + return take(input, { + AppsList: _json, + CreateTime: (_) => Math.round(_.getTime() / 1000), + LastUpdateTime: (_) => Math.round(_.getTime() / 1000), + ListId: [], + ListName: [], + ListUpdateToken: [], + PreviousAppsList: _json, + }); }; -/** - * serializeAws_json1_1AssociateAdminAccountRequest - */ -const se_AssociateAdminAccountRequest = (input: AssociateAdminAccountRequest, context: __SerdeContext): any => { - return { - ...(input.AdminAccount != null && { AdminAccount: input.AdminAccount }), - }; -}; +// se_AssociateAdminAccountRequest omitted. -/** - * serializeAws_json1_1AssociateThirdPartyFirewallRequest - */ -const se_AssociateThirdPartyFirewallRequest = ( - input: AssociateThirdPartyFirewallRequest, - context: __SerdeContext -): any => { - return { - ...(input.ThirdPartyFirewall != null && { ThirdPartyFirewall: input.ThirdPartyFirewall }), - }; -}; +// se_AssociateThirdPartyFirewallRequest omitted. -/** - * serializeAws_json1_1AWSAccountIdList - */ -const se_AWSAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AWSAccountIdList omitted. -/** - * serializeAws_json1_1BatchAssociateResourceRequest - */ -const se_BatchAssociateResourceRequest = (input: BatchAssociateResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Items != null && { Items: se_IdentifierList(input.Items, context) }), - ...(input.ResourceSetIdentifier != null && { ResourceSetIdentifier: input.ResourceSetIdentifier }), - }; -}; +// se_BatchAssociateResourceRequest omitted. -/** - * serializeAws_json1_1BatchDisassociateResourceRequest - */ -const se_BatchDisassociateResourceRequest = (input: BatchDisassociateResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Items != null && { Items: se_IdentifierList(input.Items, context) }), - ...(input.ResourceSetIdentifier != null && { ResourceSetIdentifier: input.ResourceSetIdentifier }), - }; -}; +// se_BatchDisassociateResourceRequest omitted. -/** - * serializeAws_json1_1CustomerPolicyScopeIdList - */ -const se_CustomerPolicyScopeIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomerPolicyScopeIdList omitted. -/** - * serializeAws_json1_1CustomerPolicyScopeMap - */ -const se_CustomerPolicyScopeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [CustomerPolicyScopeIdType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CustomerPolicyScopeIdList(value, context); - return acc; - }, - {} - ); -}; +// se_CustomerPolicyScopeMap omitted. -/** - * serializeAws_json1_1DeleteAppsListRequest - */ -const se_DeleteAppsListRequest = (input: DeleteAppsListRequest, context: __SerdeContext): any => { - return { - ...(input.ListId != null && { ListId: input.ListId }), - }; -}; +// se_DeleteAppsListRequest omitted. -/** - * serializeAws_json1_1DeleteNotificationChannelRequest - */ -const se_DeleteNotificationChannelRequest = (input: DeleteNotificationChannelRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DeleteNotificationChannelRequest omitted. -/** - * serializeAws_json1_1DeletePolicyRequest - */ -const se_DeletePolicyRequest = (input: DeletePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.DeleteAllPolicyResources != null && { DeleteAllPolicyResources: input.DeleteAllPolicyResources }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_DeletePolicyRequest omitted. -/** - * serializeAws_json1_1DeleteProtocolsListRequest - */ -const se_DeleteProtocolsListRequest = (input: DeleteProtocolsListRequest, context: __SerdeContext): any => { - return { - ...(input.ListId != null && { ListId: input.ListId }), - }; -}; +// se_DeleteProtocolsListRequest omitted. -/** - * serializeAws_json1_1DeleteResourceSetRequest - */ -const se_DeleteResourceSetRequest = (input: DeleteResourceSetRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - }; -}; +// se_DeleteResourceSetRequest omitted. -/** - * serializeAws_json1_1DisassociateAdminAccountRequest - */ -const se_DisassociateAdminAccountRequest = (input: DisassociateAdminAccountRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DisassociateAdminAccountRequest omitted. -/** - * serializeAws_json1_1DisassociateThirdPartyFirewallRequest - */ -const se_DisassociateThirdPartyFirewallRequest = ( - input: DisassociateThirdPartyFirewallRequest, - context: __SerdeContext -): any => { - return { - ...(input.ThirdPartyFirewall != null && { ThirdPartyFirewall: input.ThirdPartyFirewall }), - }; -}; +// se_DisassociateThirdPartyFirewallRequest omitted. -/** - * serializeAws_json1_1GetAdminAccountRequest - */ -const se_GetAdminAccountRequest = (input: GetAdminAccountRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetAdminAccountRequest omitted. -/** - * serializeAws_json1_1GetAppsListRequest - */ -const se_GetAppsListRequest = (input: GetAppsListRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultList != null && { DefaultList: input.DefaultList }), - ...(input.ListId != null && { ListId: input.ListId }), - }; -}; +// se_GetAppsListRequest omitted. -/** - * serializeAws_json1_1GetComplianceDetailRequest - */ -const se_GetComplianceDetailRequest = (input: GetComplianceDetailRequest, context: __SerdeContext): any => { - return { - ...(input.MemberAccount != null && { MemberAccount: input.MemberAccount }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_GetComplianceDetailRequest omitted. -/** - * serializeAws_json1_1GetNotificationChannelRequest - */ -const se_GetNotificationChannelRequest = (input: GetNotificationChannelRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetNotificationChannelRequest omitted. -/** - * serializeAws_json1_1GetPolicyRequest - */ -const se_GetPolicyRequest = (input: GetPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_GetPolicyRequest omitted. /** * serializeAws_json1_1GetProtectionStatusRequest */ const se_GetProtectionStatusRequest = (input: GetProtectionStatusRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MemberAccountId != null && { MemberAccountId: input.MemberAccountId }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + MemberAccountId: [], + NextToken: [], + PolicyId: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1GetProtocolsListRequest - */ -const se_GetProtocolsListRequest = (input: GetProtocolsListRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultList != null && { DefaultList: input.DefaultList }), - ...(input.ListId != null && { ListId: input.ListId }), - }; -}; +// se_GetProtocolsListRequest omitted. -/** - * serializeAws_json1_1GetResourceSetRequest - */ -const se_GetResourceSetRequest = (input: GetResourceSetRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - }; -}; +// se_GetResourceSetRequest omitted. -/** - * serializeAws_json1_1GetThirdPartyFirewallAssociationStatusRequest - */ -const se_GetThirdPartyFirewallAssociationStatusRequest = ( - input: GetThirdPartyFirewallAssociationStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.ThirdPartyFirewall != null && { ThirdPartyFirewall: input.ThirdPartyFirewall }), - }; -}; +// se_GetThirdPartyFirewallAssociationStatusRequest omitted. -/** - * serializeAws_json1_1GetViolationDetailsRequest - */ -const se_GetViolationDetailsRequest = (input: GetViolationDetailsRequest, context: __SerdeContext): any => { - return { - ...(input.MemberAccount != null && { MemberAccount: input.MemberAccount }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_GetViolationDetailsRequest omitted. -/** - * serializeAws_json1_1IdentifierList - */ -const se_IdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdentifierList omitted. -/** - * serializeAws_json1_1ListAppsListsRequest - */ -const se_ListAppsListsRequest = (input: ListAppsListsRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultLists != null && { DefaultLists: input.DefaultLists }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAppsListsRequest omitted. -/** - * serializeAws_json1_1ListComplianceStatusRequest - */ -const se_ListComplianceStatusRequest = (input: ListComplianceStatusRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_ListComplianceStatusRequest omitted. -/** - * serializeAws_json1_1ListDiscoveredResourcesRequest - */ -const se_ListDiscoveredResourcesRequest = (input: ListDiscoveredResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MemberAccountIds != null && { MemberAccountIds: se_AWSAccountIdList(input.MemberAccountIds, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_ListDiscoveredResourcesRequest omitted. -/** - * serializeAws_json1_1ListMemberAccountsRequest - */ -const se_ListMemberAccountsRequest = (input: ListMemberAccountsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListMemberAccountsRequest omitted. -/** - * serializeAws_json1_1ListPoliciesRequest - */ -const se_ListPoliciesRequest = (input: ListPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPoliciesRequest omitted. -/** - * serializeAws_json1_1ListProtocolsListsRequest - */ -const se_ListProtocolsListsRequest = (input: ListProtocolsListsRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultLists != null && { DefaultLists: input.DefaultLists }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListProtocolsListsRequest omitted. -/** - * serializeAws_json1_1ListResourceSetResourcesRequest - */ -const se_ListResourceSetResourcesRequest = (input: ListResourceSetResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResourceSetResourcesRequest omitted. -/** - * serializeAws_json1_1ListResourceSetsRequest - */ -const se_ListResourceSetsRequest = (input: ListResourceSetsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResourceSetsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListThirdPartyFirewallFirewallPoliciesRequest - */ -const se_ListThirdPartyFirewallFirewallPoliciesRequest = ( - input: ListThirdPartyFirewallFirewallPoliciesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ThirdPartyFirewall != null && { ThirdPartyFirewall: input.ThirdPartyFirewall }), - }; -}; +// se_ListThirdPartyFirewallFirewallPoliciesRequest omitted. -/** - * serializeAws_json1_1NetworkFirewallPolicy - */ -const se_NetworkFirewallPolicy = (input: NetworkFirewallPolicy, context: __SerdeContext): any => { - return { - ...(input.FirewallDeploymentModel != null && { FirewallDeploymentModel: input.FirewallDeploymentModel }), - }; -}; +// se_NetworkFirewallPolicy omitted. -/** - * serializeAws_json1_1Policy - */ -const se_Policy = (input: Policy, context: __SerdeContext): any => { - return { - ...(input.DeleteUnusedFMManagedResources != null && { - DeleteUnusedFMManagedResources: input.DeleteUnusedFMManagedResources, - }), - ...(input.ExcludeMap != null && { ExcludeMap: se_CustomerPolicyScopeMap(input.ExcludeMap, context) }), - ...(input.ExcludeResourceTags != null && { ExcludeResourceTags: input.ExcludeResourceTags }), - ...(input.IncludeMap != null && { IncludeMap: se_CustomerPolicyScopeMap(input.IncludeMap, context) }), - ...(input.PolicyDescription != null && { PolicyDescription: input.PolicyDescription }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyUpdateToken != null && { PolicyUpdateToken: input.PolicyUpdateToken }), - ...(input.RemediationEnabled != null && { RemediationEnabled: input.RemediationEnabled }), - ...(input.ResourceSetIds != null && { ResourceSetIds: se_ResourceSetIds(input.ResourceSetIds, context) }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTags(input.ResourceTags, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.ResourceTypeList != null && { ResourceTypeList: se_ResourceTypeList(input.ResourceTypeList, context) }), - ...(input.SecurityServicePolicyData != null && { - SecurityServicePolicyData: se_SecurityServicePolicyData(input.SecurityServicePolicyData, context), - }), - }; -}; +// se_Policy omitted. -/** - * serializeAws_json1_1PolicyOption - */ -const se_PolicyOption = (input: PolicyOption, context: __SerdeContext): any => { - return { - ...(input.NetworkFirewallPolicy != null && { - NetworkFirewallPolicy: se_NetworkFirewallPolicy(input.NetworkFirewallPolicy, context), - }), - ...(input.ThirdPartyFirewallPolicy != null && { - ThirdPartyFirewallPolicy: se_ThirdPartyFirewallPolicy(input.ThirdPartyFirewallPolicy, context), - }), - }; -}; +// se_PolicyOption omitted. -/** - * serializeAws_json1_1PreviousAppsList - */ -const se_PreviousAppsList = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AppsList(value, context); - return acc; - }, {}); -}; +// se_PreviousAppsList omitted. -/** - * serializeAws_json1_1PreviousProtocolsList - */ -const se_PreviousProtocolsList = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ProtocolsList(value, context); - return acc; - }, {}); -}; +// se_PreviousProtocolsList omitted. -/** - * serializeAws_json1_1ProtocolsList - */ -const se_ProtocolsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ProtocolsList omitted. /** * serializeAws_json1_1ProtocolsListData */ const se_ProtocolsListData = (input: ProtocolsListData, context: __SerdeContext): any => { - return { - ...(input.CreateTime != null && { CreateTime: Math.round(input.CreateTime.getTime() / 1000) }), - ...(input.LastUpdateTime != null && { LastUpdateTime: Math.round(input.LastUpdateTime.getTime() / 1000) }), - ...(input.ListId != null && { ListId: input.ListId }), - ...(input.ListName != null && { ListName: input.ListName }), - ...(input.ListUpdateToken != null && { ListUpdateToken: input.ListUpdateToken }), - ...(input.PreviousProtocolsList != null && { - PreviousProtocolsList: se_PreviousProtocolsList(input.PreviousProtocolsList, context), - }), - ...(input.ProtocolsList != null && { ProtocolsList: se_ProtocolsList(input.ProtocolsList, context) }), - }; + return take(input, { + CreateTime: (_) => Math.round(_.getTime() / 1000), + LastUpdateTime: (_) => Math.round(_.getTime() / 1000), + ListId: [], + ListName: [], + ListUpdateToken: [], + PreviousProtocolsList: _json, + ProtocolsList: _json, + }); }; /** * serializeAws_json1_1PutAppsListRequest */ const se_PutAppsListRequest = (input: PutAppsListRequest, context: __SerdeContext): any => { - return { - ...(input.AppsList != null && { AppsList: se_AppsListData(input.AppsList, context) }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; + return take(input, { + AppsList: (_) => se_AppsListData(_, context), + TagList: _json, + }); }; -/** - * serializeAws_json1_1PutNotificationChannelRequest - */ -const se_PutNotificationChannelRequest = (input: PutNotificationChannelRequest, context: __SerdeContext): any => { - return { - ...(input.SnsRoleName != null && { SnsRoleName: input.SnsRoleName }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - }; -}; +// se_PutNotificationChannelRequest omitted. -/** - * serializeAws_json1_1PutPolicyRequest - */ -const se_PutPolicyRequest = (input: PutPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: se_Policy(input.Policy, context) }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; -}; +// se_PutPolicyRequest omitted. /** * serializeAws_json1_1PutProtocolsListRequest */ const se_PutProtocolsListRequest = (input: PutProtocolsListRequest, context: __SerdeContext): any => { - return { - ...(input.ProtocolsList != null && { ProtocolsList: se_ProtocolsListData(input.ProtocolsList, context) }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; + return take(input, { + ProtocolsList: (_) => se_ProtocolsListData(_, context), + TagList: _json, + }); }; /** * serializeAws_json1_1PutResourceSetRequest */ const se_PutResourceSetRequest = (input: PutResourceSetRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceSet != null && { ResourceSet: se_ResourceSet(input.ResourceSet, context) }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; + return take(input, { + ResourceSet: (_) => se_ResourceSet(_, context), + TagList: _json, + }); }; /** * serializeAws_json1_1ResourceSet */ const se_ResourceSet = (input: ResourceSet, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LastUpdateTime != null && { LastUpdateTime: Math.round(input.LastUpdateTime.getTime() / 1000) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceTypeList != null && { ResourceTypeList: se_ResourceTypeList(input.ResourceTypeList, context) }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; + return take(input, { + Description: [], + Id: [], + LastUpdateTime: (_) => Math.round(_.getTime() / 1000), + Name: [], + ResourceTypeList: _json, + UpdateToken: [], + }); }; -/** - * serializeAws_json1_1ResourceSetIds - */ -const se_ResourceSetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceSetIds omitted. + +// se_ResourceTag omitted. + +// se_ResourceTags omitted. + +// se_ResourceTypeList omitted. + +// se_SecurityServicePolicyData omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_ThirdPartyFirewallPolicy omitted. + +// se_UntagResourceRequest omitted. + +// de_ActionTarget omitted. + +// de_App omitted. + +// de_AppsList omitted. /** - * serializeAws_json1_1ResourceTag + * deserializeAws_json1_1AppsListData */ -const se_ResourceTag = (input: ResourceTag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; +const de_AppsListData = (output: any, context: __SerdeContext): AppsListData => { + return take(output, { + AppsList: _json, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ListId: __expectString, + ListName: __expectString, + ListUpdateToken: __expectString, + PreviousAppsList: _json, + }) as any; }; -/** - * serializeAws_json1_1ResourceTags - */ -const se_ResourceTags = (input: ResourceTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceTag(entry, context); - }); -}; +// de_AppsListDataSummary omitted. -/** - * serializeAws_json1_1ResourceTypeList - */ -const se_ResourceTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_AppsListsData omitted. -/** - * serializeAws_json1_1SecurityServicePolicyData - */ -const se_SecurityServicePolicyData = (input: SecurityServicePolicyData, context: __SerdeContext): any => { - return { - ...(input.ManagedServiceData != null && { ManagedServiceData: input.ManagedServiceData }), - ...(input.PolicyOption != null && { PolicyOption: se_PolicyOption(input.PolicyOption, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// de_AssociateThirdPartyFirewallResponse omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// de_AwsEc2InstanceViolation omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_AwsEc2NetworkInterfaceViolation omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// de_AwsEc2NetworkInterfaceViolations omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }; -}; - -/** - * serializeAws_json1_1ThirdPartyFirewallPolicy - */ -const se_ThirdPartyFirewallPolicy = (input: ThirdPartyFirewallPolicy, context: __SerdeContext): any => { - return { - ...(input.FirewallDeploymentModel != null && { FirewallDeploymentModel: input.FirewallDeploymentModel }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// de_AwsVPCSecurityGroupViolation omitted. -/** - * deserializeAws_json1_1ActionTarget - */ -const de_ActionTarget = (output: any, context: __SerdeContext): ActionTarget => { - return { - Description: __expectString(output.Description), - ResourceId: __expectString(output.ResourceId), - } as any; -}; - -/** - * deserializeAws_json1_1App - */ -const de_App = (output: any, context: __SerdeContext): App => { - return { - AppName: __expectString(output.AppName), - Port: __expectLong(output.Port), - Protocol: __expectString(output.Protocol), - } as any; -}; - -/** - * deserializeAws_json1_1AppsList - */ -const de_AppsList = (output: any, context: __SerdeContext): App[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_App(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AppsListData - */ -const de_AppsListData = (output: any, context: __SerdeContext): AppsListData => { - return { - AppsList: output.AppsList != null ? de_AppsList(output.AppsList, context) : undefined, - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - ListId: __expectString(output.ListId), - ListName: __expectString(output.ListName), - ListUpdateToken: __expectString(output.ListUpdateToken), - PreviousAppsList: - output.PreviousAppsList != null ? de_PreviousAppsList(output.PreviousAppsList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AppsListDataSummary - */ -const de_AppsListDataSummary = (output: any, context: __SerdeContext): AppsListDataSummary => { - return { - AppsList: output.AppsList != null ? de_AppsList(output.AppsList, context) : undefined, - ListArn: __expectString(output.ListArn), - ListId: __expectString(output.ListId), - ListName: __expectString(output.ListName), - } as any; -}; - -/** - * deserializeAws_json1_1AppsListsData - */ -const de_AppsListsData = (output: any, context: __SerdeContext): AppsListDataSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppsListDataSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociateThirdPartyFirewallResponse - */ -const de_AssociateThirdPartyFirewallResponse = ( - output: any, - context: __SerdeContext -): AssociateThirdPartyFirewallResponse => { - return { - ThirdPartyFirewallStatus: __expectString(output.ThirdPartyFirewallStatus), - } as any; -}; - -/** - * deserializeAws_json1_1AwsEc2InstanceViolation - */ -const de_AwsEc2InstanceViolation = (output: any, context: __SerdeContext): AwsEc2InstanceViolation => { - return { - AwsEc2NetworkInterfaceViolations: - output.AwsEc2NetworkInterfaceViolations != null - ? de_AwsEc2NetworkInterfaceViolations(output.AwsEc2NetworkInterfaceViolations, context) - : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; - -/** - * deserializeAws_json1_1AwsEc2NetworkInterfaceViolation - */ -const de_AwsEc2NetworkInterfaceViolation = (output: any, context: __SerdeContext): AwsEc2NetworkInterfaceViolation => { - return { - ViolatingSecurityGroups: - output.ViolatingSecurityGroups != null ? de_ResourceIdList(output.ViolatingSecurityGroups, context) : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; - -/** - * deserializeAws_json1_1AwsEc2NetworkInterfaceViolations - */ -const de_AwsEc2NetworkInterfaceViolations = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfaceViolation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2NetworkInterfaceViolation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AwsVPCSecurityGroupViolation - */ -const de_AwsVPCSecurityGroupViolation = (output: any, context: __SerdeContext): AwsVPCSecurityGroupViolation => { - return { - PartialMatches: output.PartialMatches != null ? de_PartialMatches(output.PartialMatches, context) : undefined, - PossibleSecurityGroupRemediationActions: - output.PossibleSecurityGroupRemediationActions != null - ? de_SecurityGroupRemediationActions(output.PossibleSecurityGroupRemediationActions, context) - : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - ViolationTargetDescription: __expectString(output.ViolationTargetDescription), - } as any; -}; - -/** - * deserializeAws_json1_1BatchAssociateResourceResponse - */ -const de_BatchAssociateResourceResponse = (output: any, context: __SerdeContext): BatchAssociateResourceResponse => { - return { - FailedItems: output.FailedItems != null ? de_FailedItemList(output.FailedItems, context) : undefined, - ResourceSetIdentifier: __expectString(output.ResourceSetIdentifier), - } as any; -}; +// de_BatchAssociateResourceResponse omitted. -/** - * deserializeAws_json1_1BatchDisassociateResourceResponse - */ -const de_BatchDisassociateResourceResponse = ( - output: any, - context: __SerdeContext -): BatchDisassociateResourceResponse => { - return { - FailedItems: output.FailedItems != null ? de_FailedItemList(output.FailedItems, context) : undefined, - ResourceSetIdentifier: __expectString(output.ResourceSetIdentifier), - } as any; -}; +// de_BatchDisassociateResourceResponse omitted. -/** - * deserializeAws_json1_1ComplianceViolator - */ -const de_ComplianceViolator = (output: any, context: __SerdeContext): ComplianceViolator => { - return { - Metadata: output.Metadata != null ? de_ComplianceViolatorMetadata(output.Metadata, context) : undefined, - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - ViolationReason: __expectString(output.ViolationReason), - } as any; -}; +// de_ComplianceViolator omitted. -/** - * deserializeAws_json1_1ComplianceViolatorMetadata - */ -const de_ComplianceViolatorMetadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ComplianceViolatorMetadata omitted. -/** - * deserializeAws_json1_1ComplianceViolators - */ -const de_ComplianceViolators = (output: any, context: __SerdeContext): ComplianceViolator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComplianceViolator(entry, context); - }); - return retVal; -}; +// de_ComplianceViolators omitted. -/** - * deserializeAws_json1_1CustomerPolicyScopeIdList - */ -const de_CustomerPolicyScopeIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CustomerPolicyScopeIdList omitted. -/** - * deserializeAws_json1_1CustomerPolicyScopeMap - */ -const de_CustomerPolicyScopeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [CustomerPolicyScopeIdType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_CustomerPolicyScopeIdList(value, context); - return acc; - }, - {} - ); -}; +// de_CustomerPolicyScopeMap omitted. -/** - * deserializeAws_json1_1DisassociateThirdPartyFirewallResponse - */ -const de_DisassociateThirdPartyFirewallResponse = ( - output: any, - context: __SerdeContext -): DisassociateThirdPartyFirewallResponse => { - return { - ThirdPartyFirewallStatus: __expectString(output.ThirdPartyFirewallStatus), - } as any; -}; +// de_DisassociateThirdPartyFirewallResponse omitted. -/** - * deserializeAws_json1_1DiscoveredResource - */ -const de_DiscoveredResource = (output: any, context: __SerdeContext): DiscoveredResource => { - return { - AccountId: __expectString(output.AccountId), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - URI: __expectString(output.URI), - } as any; -}; +// de_DiscoveredResource omitted. -/** - * deserializeAws_json1_1DiscoveredResourceList - */ -const de_DiscoveredResourceList = (output: any, context: __SerdeContext): DiscoveredResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DiscoveredResource(entry, context); - }); - return retVal; -}; +// de_DiscoveredResourceList omitted. -/** - * deserializeAws_json1_1DnsDuplicateRuleGroupViolation - */ -const de_DnsDuplicateRuleGroupViolation = (output: any, context: __SerdeContext): DnsDuplicateRuleGroupViolation => { - return { - ViolationTarget: __expectString(output.ViolationTarget), - ViolationTargetDescription: __expectString(output.ViolationTargetDescription), - } as any; -}; +// de_DnsDuplicateRuleGroupViolation omitted. -/** - * deserializeAws_json1_1DnsRuleGroupLimitExceededViolation - */ -const de_DnsRuleGroupLimitExceededViolation = ( - output: any, - context: __SerdeContext -): DnsRuleGroupLimitExceededViolation => { - return { - NumberOfRuleGroupsAlreadyAssociated: __expectInt32(output.NumberOfRuleGroupsAlreadyAssociated), - ViolationTarget: __expectString(output.ViolationTarget), - ViolationTargetDescription: __expectString(output.ViolationTargetDescription), - } as any; -}; +// de_DnsRuleGroupLimitExceededViolation omitted. -/** - * deserializeAws_json1_1DnsRuleGroupPriorities - */ -const de_DnsRuleGroupPriorities = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_DnsRuleGroupPriorities omitted. -/** - * deserializeAws_json1_1DnsRuleGroupPriorityConflictViolation - */ -const de_DnsRuleGroupPriorityConflictViolation = ( - output: any, - context: __SerdeContext -): DnsRuleGroupPriorityConflictViolation => { - return { - ConflictingPolicyId: __expectString(output.ConflictingPolicyId), - ConflictingPriority: __expectInt32(output.ConflictingPriority), - UnavailablePriorities: - output.UnavailablePriorities != null - ? de_DnsRuleGroupPriorities(output.UnavailablePriorities, context) - : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - ViolationTargetDescription: __expectString(output.ViolationTargetDescription), - } as any; -}; +// de_DnsRuleGroupPriorityConflictViolation omitted. -/** - * deserializeAws_json1_1EC2AssociateRouteTableAction - */ -const de_EC2AssociateRouteTableAction = (output: any, context: __SerdeContext): EC2AssociateRouteTableAction => { - return { - Description: __expectString(output.Description), - GatewayId: output.GatewayId != null ? de_ActionTarget(output.GatewayId, context) : undefined, - RouteTableId: output.RouteTableId != null ? de_ActionTarget(output.RouteTableId, context) : undefined, - SubnetId: output.SubnetId != null ? de_ActionTarget(output.SubnetId, context) : undefined, - } as any; -}; +// de_EC2AssociateRouteTableAction omitted. -/** - * deserializeAws_json1_1EC2CopyRouteTableAction - */ -const de_EC2CopyRouteTableAction = (output: any, context: __SerdeContext): EC2CopyRouteTableAction => { - return { - Description: __expectString(output.Description), - RouteTableId: output.RouteTableId != null ? de_ActionTarget(output.RouteTableId, context) : undefined, - VpcId: output.VpcId != null ? de_ActionTarget(output.VpcId, context) : undefined, - } as any; -}; +// de_EC2CopyRouteTableAction omitted. -/** - * deserializeAws_json1_1EC2CreateRouteAction - */ -const de_EC2CreateRouteAction = (output: any, context: __SerdeContext): EC2CreateRouteAction => { - return { - Description: __expectString(output.Description), - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - DestinationIpv6CidrBlock: __expectString(output.DestinationIpv6CidrBlock), - DestinationPrefixListId: __expectString(output.DestinationPrefixListId), - GatewayId: output.GatewayId != null ? de_ActionTarget(output.GatewayId, context) : undefined, - RouteTableId: output.RouteTableId != null ? de_ActionTarget(output.RouteTableId, context) : undefined, - VpcEndpointId: output.VpcEndpointId != null ? de_ActionTarget(output.VpcEndpointId, context) : undefined, - } as any; -}; +// de_EC2CreateRouteAction omitted. -/** - * deserializeAws_json1_1EC2CreateRouteTableAction - */ -const de_EC2CreateRouteTableAction = (output: any, context: __SerdeContext): EC2CreateRouteTableAction => { - return { - Description: __expectString(output.Description), - VpcId: output.VpcId != null ? de_ActionTarget(output.VpcId, context) : undefined, - } as any; -}; +// de_EC2CreateRouteTableAction omitted. -/** - * deserializeAws_json1_1EC2DeleteRouteAction - */ -const de_EC2DeleteRouteAction = (output: any, context: __SerdeContext): EC2DeleteRouteAction => { - return { - Description: __expectString(output.Description), - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - DestinationIpv6CidrBlock: __expectString(output.DestinationIpv6CidrBlock), - DestinationPrefixListId: __expectString(output.DestinationPrefixListId), - RouteTableId: output.RouteTableId != null ? de_ActionTarget(output.RouteTableId, context) : undefined, - } as any; -}; +// de_EC2DeleteRouteAction omitted. -/** - * deserializeAws_json1_1EC2ReplaceRouteAction - */ -const de_EC2ReplaceRouteAction = (output: any, context: __SerdeContext): EC2ReplaceRouteAction => { - return { - Description: __expectString(output.Description), - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - DestinationIpv6CidrBlock: __expectString(output.DestinationIpv6CidrBlock), - DestinationPrefixListId: __expectString(output.DestinationPrefixListId), - GatewayId: output.GatewayId != null ? de_ActionTarget(output.GatewayId, context) : undefined, - RouteTableId: output.RouteTableId != null ? de_ActionTarget(output.RouteTableId, context) : undefined, - } as any; -}; +// de_EC2ReplaceRouteAction omitted. -/** - * deserializeAws_json1_1EC2ReplaceRouteTableAssociationAction - */ -const de_EC2ReplaceRouteTableAssociationAction = ( - output: any, - context: __SerdeContext -): EC2ReplaceRouteTableAssociationAction => { - return { - AssociationId: output.AssociationId != null ? de_ActionTarget(output.AssociationId, context) : undefined, - Description: __expectString(output.Description), - RouteTableId: output.RouteTableId != null ? de_ActionTarget(output.RouteTableId, context) : undefined, - } as any; -}; +// de_EC2ReplaceRouteTableAssociationAction omitted. -/** - * deserializeAws_json1_1EvaluationResult - */ -const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { - return { - ComplianceStatus: __expectString(output.ComplianceStatus), - EvaluationLimitExceeded: __expectBoolean(output.EvaluationLimitExceeded), - ViolatorCount: __expectLong(output.ViolatorCount), - } as any; -}; +// de_EvaluationResult omitted. -/** - * deserializeAws_json1_1EvaluationResults - */ -const de_EvaluationResults = (output: any, context: __SerdeContext): EvaluationResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluationResult(entry, context); - }); - return retVal; -}; +// de_EvaluationResults omitted. -/** - * deserializeAws_json1_1ExpectedRoute - */ -const de_ExpectedRoute = (output: any, context: __SerdeContext): ExpectedRoute => { - return { - AllowedTargets: - output.AllowedTargets != null ? de_LengthBoundedStringList(output.AllowedTargets, context) : undefined, - ContributingSubnets: - output.ContributingSubnets != null ? de_ResourceIdList(output.ContributingSubnets, context) : undefined, - IpV4Cidr: __expectString(output.IpV4Cidr), - IpV6Cidr: __expectString(output.IpV6Cidr), - PrefixListId: __expectString(output.PrefixListId), - RouteTableId: __expectString(output.RouteTableId), - } as any; -}; +// de_ExpectedRoute omitted. -/** - * deserializeAws_json1_1ExpectedRoutes - */ -const de_ExpectedRoutes = (output: any, context: __SerdeContext): ExpectedRoute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExpectedRoute(entry, context); - }); - return retVal; -}; +// de_ExpectedRoutes omitted. -/** - * deserializeAws_json1_1FailedItem - */ -const de_FailedItem = (output: any, context: __SerdeContext): FailedItem => { - return { - Reason: __expectString(output.Reason), - URI: __expectString(output.URI), - } as any; -}; +// de_FailedItem omitted. -/** - * deserializeAws_json1_1FailedItemList - */ -const de_FailedItemList = (output: any, context: __SerdeContext): FailedItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedItem(entry, context); - }); - return retVal; -}; +// de_FailedItemList omitted. -/** - * deserializeAws_json1_1FirewallSubnetIsOutOfScopeViolation - */ -const de_FirewallSubnetIsOutOfScopeViolation = ( - output: any, - context: __SerdeContext -): FirewallSubnetIsOutOfScopeViolation => { - return { - FirewallSubnetId: __expectString(output.FirewallSubnetId), - SubnetAvailabilityZone: __expectString(output.SubnetAvailabilityZone), - SubnetAvailabilityZoneId: __expectString(output.SubnetAvailabilityZoneId), - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_FirewallSubnetIsOutOfScopeViolation omitted. -/** - * deserializeAws_json1_1FirewallSubnetMissingVPCEndpointViolation - */ -const de_FirewallSubnetMissingVPCEndpointViolation = ( - output: any, - context: __SerdeContext -): FirewallSubnetMissingVPCEndpointViolation => { - return { - FirewallSubnetId: __expectString(output.FirewallSubnetId), - SubnetAvailabilityZone: __expectString(output.SubnetAvailabilityZone), - SubnetAvailabilityZoneId: __expectString(output.SubnetAvailabilityZoneId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_FirewallSubnetMissingVPCEndpointViolation omitted. -/** - * deserializeAws_json1_1FMSPolicyUpdateFirewallCreationConfigAction - */ -const de_FMSPolicyUpdateFirewallCreationConfigAction = ( - output: any, - context: __SerdeContext -): FMSPolicyUpdateFirewallCreationConfigAction => { - return { - Description: __expectString(output.Description), - FirewallCreationConfig: __expectString(output.FirewallCreationConfig), - } as any; -}; +// de_FMSPolicyUpdateFirewallCreationConfigAction omitted. -/** - * deserializeAws_json1_1GetAdminAccountResponse - */ -const de_GetAdminAccountResponse = (output: any, context: __SerdeContext): GetAdminAccountResponse => { - return { - AdminAccount: __expectString(output.AdminAccount), - RoleStatus: __expectString(output.RoleStatus), - } as any; -}; +// de_GetAdminAccountResponse omitted. /** * deserializeAws_json1_1GetAppsListResponse */ const de_GetAppsListResponse = (output: any, context: __SerdeContext): GetAppsListResponse => { - return { - AppsList: output.AppsList != null ? de_AppsListData(output.AppsList, context) : undefined, - AppsListArn: __expectString(output.AppsListArn), - } as any; + return take(output, { + AppsList: (_: any) => de_AppsListData(_, context), + AppsListArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetComplianceDetailResponse */ const de_GetComplianceDetailResponse = (output: any, context: __SerdeContext): GetComplianceDetailResponse => { - return { - PolicyComplianceDetail: - output.PolicyComplianceDetail != null - ? de_PolicyComplianceDetail(output.PolicyComplianceDetail, context) - : undefined, - } as any; + return take(output, { + PolicyComplianceDetail: (_: any) => de_PolicyComplianceDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetNotificationChannelResponse - */ -const de_GetNotificationChannelResponse = (output: any, context: __SerdeContext): GetNotificationChannelResponse => { - return { - SnsRoleName: __expectString(output.SnsRoleName), - SnsTopicArn: __expectString(output.SnsTopicArn), - } as any; -}; +// de_GetNotificationChannelResponse omitted. -/** - * deserializeAws_json1_1GetPolicyResponse - */ -const de_GetPolicyResponse = (output: any, context: __SerdeContext): GetPolicyResponse => { - return { - Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined, - PolicyArn: __expectString(output.PolicyArn), - } as any; -}; +// de_GetPolicyResponse omitted. -/** - * deserializeAws_json1_1GetProtectionStatusResponse - */ -const de_GetProtectionStatusResponse = (output: any, context: __SerdeContext): GetProtectionStatusResponse => { - return { - AdminAccountId: __expectString(output.AdminAccountId), - Data: __expectString(output.Data), - NextToken: __expectString(output.NextToken), - ServiceType: __expectString(output.ServiceType), - } as any; -}; +// de_GetProtectionStatusResponse omitted. /** * deserializeAws_json1_1GetProtocolsListResponse */ const de_GetProtocolsListResponse = (output: any, context: __SerdeContext): GetProtocolsListResponse => { - return { - ProtocolsList: output.ProtocolsList != null ? de_ProtocolsListData(output.ProtocolsList, context) : undefined, - ProtocolsListArn: __expectString(output.ProtocolsListArn), - } as any; + return take(output, { + ProtocolsList: (_: any) => de_ProtocolsListData(_, context), + ProtocolsListArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetResourceSetResponse */ const de_GetResourceSetResponse = (output: any, context: __SerdeContext): GetResourceSetResponse => { - return { - ResourceSet: output.ResourceSet != null ? de_ResourceSet(output.ResourceSet, context) : undefined, - ResourceSetArn: __expectString(output.ResourceSetArn), - } as any; + return take(output, { + ResourceSet: (_: any) => de_ResourceSet(_, context), + ResourceSetArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetThirdPartyFirewallAssociationStatusResponse - */ -const de_GetThirdPartyFirewallAssociationStatusResponse = ( - output: any, - context: __SerdeContext -): GetThirdPartyFirewallAssociationStatusResponse => { - return { - MarketplaceOnboardingStatus: __expectString(output.MarketplaceOnboardingStatus), - ThirdPartyFirewallStatus: __expectString(output.ThirdPartyFirewallStatus), - } as any; -}; +// de_GetThirdPartyFirewallAssociationStatusResponse omitted. /** * deserializeAws_json1_1GetViolationDetailsResponse */ const de_GetViolationDetailsResponse = (output: any, context: __SerdeContext): GetViolationDetailsResponse => { - return { - ViolationDetail: output.ViolationDetail != null ? de_ViolationDetail(output.ViolationDetail, context) : undefined, - } as any; + return take(output, { + ViolationDetail: (_: any) => de_ViolationDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalErrorException omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1InvalidOperationException - */ -const de_InvalidOperationException = (output: any, context: __SerdeContext): InvalidOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidOperationException omitted. -/** - * deserializeAws_json1_1InvalidTypeException - */ -const de_InvalidTypeException = (output: any, context: __SerdeContext): InvalidTypeException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidTypeException omitted. -/** - * deserializeAws_json1_1IssueInfoMap - */ -const de_IssueInfoMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DependentServiceName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_IssueInfoMap omitted. -/** - * deserializeAws_json1_1LengthBoundedStringList - */ -const de_LengthBoundedStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LengthBoundedStringList omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListAppsListsResponse - */ -const de_ListAppsListsResponse = (output: any, context: __SerdeContext): ListAppsListsResponse => { - return { - AppsLists: output.AppsLists != null ? de_AppsListsData(output.AppsLists, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAppsListsResponse omitted. /** * deserializeAws_json1_1ListComplianceStatusResponse */ const de_ListComplianceStatusResponse = (output: any, context: __SerdeContext): ListComplianceStatusResponse => { - return { - NextToken: __expectString(output.NextToken), - PolicyComplianceStatusList: - output.PolicyComplianceStatusList != null - ? de_PolicyComplianceStatusList(output.PolicyComplianceStatusList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PolicyComplianceStatusList: (_: any) => de_PolicyComplianceStatusList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListDiscoveredResourcesResponse - */ -const de_ListDiscoveredResourcesResponse = (output: any, context: __SerdeContext): ListDiscoveredResourcesResponse => { - return { - Items: output.Items != null ? de_DiscoveredResourceList(output.Items, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDiscoveredResourcesResponse omitted. -/** - * deserializeAws_json1_1ListMemberAccountsResponse - */ -const de_ListMemberAccountsResponse = (output: any, context: __SerdeContext): ListMemberAccountsResponse => { - return { - MemberAccounts: output.MemberAccounts != null ? de_MemberAccounts(output.MemberAccounts, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListMemberAccountsResponse omitted. -/** - * deserializeAws_json1_1ListPoliciesResponse - */ -const de_ListPoliciesResponse = (output: any, context: __SerdeContext): ListPoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - PolicyList: output.PolicyList != null ? de_PolicySummaryList(output.PolicyList, context) : undefined, - } as any; -}; +// de_ListPoliciesResponse omitted. -/** - * deserializeAws_json1_1ListProtocolsListsResponse - */ -const de_ListProtocolsListsResponse = (output: any, context: __SerdeContext): ListProtocolsListsResponse => { - return { - NextToken: __expectString(output.NextToken), - ProtocolsLists: output.ProtocolsLists != null ? de_ProtocolsListsData(output.ProtocolsLists, context) : undefined, - } as any; -}; +// de_ListProtocolsListsResponse omitted. -/** - * deserializeAws_json1_1ListResourceSetResourcesResponse - */ -const de_ListResourceSetResourcesResponse = ( - output: any, - context: __SerdeContext -): ListResourceSetResourcesResponse => { - return { - Items: output.Items != null ? de_ResourceList(output.Items, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListResourceSetResourcesResponse omitted. /** * deserializeAws_json1_1ListResourceSetsResponse */ const de_ListResourceSetsResponse = (output: any, context: __SerdeContext): ListResourceSetsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceSets: output.ResourceSets != null ? de_ResourceSetSummaryList(output.ResourceSets, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ResourceSets: (_: any) => de_ResourceSetSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListThirdPartyFirewallFirewallPoliciesResponse - */ -const de_ListThirdPartyFirewallFirewallPoliciesResponse = ( - output: any, - context: __SerdeContext -): ListThirdPartyFirewallFirewallPoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - ThirdPartyFirewallFirewallPolicies: - output.ThirdPartyFirewallFirewallPolicies != null - ? de_ThirdPartyFirewallFirewallPolicies(output.ThirdPartyFirewallFirewallPolicies, context) - : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1MemberAccounts - */ -const de_MemberAccounts = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListThirdPartyFirewallFirewallPoliciesResponse omitted. -/** - * deserializeAws_json1_1NetworkFirewallActionList - */ -const de_NetworkFirewallActionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MemberAccounts omitted. -/** - * deserializeAws_json1_1NetworkFirewallBlackHoleRouteDetectedViolation - */ -const de_NetworkFirewallBlackHoleRouteDetectedViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallBlackHoleRouteDetectedViolation => { - return { - RouteTableId: __expectString(output.RouteTableId), - ViolatingRoutes: output.ViolatingRoutes != null ? de_Routes(output.ViolatingRoutes, context) : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_NetworkFirewallActionList omitted. -/** - * deserializeAws_json1_1NetworkFirewallInternetTrafficNotInspectedViolation - */ -const de_NetworkFirewallInternetTrafficNotInspectedViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallInternetTrafficNotInspectedViolation => { - return { - ActualFirewallSubnetRoutes: - output.ActualFirewallSubnetRoutes != null ? de_Routes(output.ActualFirewallSubnetRoutes, context) : undefined, - ActualInternetGatewayRoutes: - output.ActualInternetGatewayRoutes != null ? de_Routes(output.ActualInternetGatewayRoutes, context) : undefined, - CurrentFirewallSubnetRouteTable: __expectString(output.CurrentFirewallSubnetRouteTable), - CurrentInternetGatewayRouteTable: __expectString(output.CurrentInternetGatewayRouteTable), - ExpectedFirewallEndpoint: __expectString(output.ExpectedFirewallEndpoint), - ExpectedFirewallSubnetRoutes: - output.ExpectedFirewallSubnetRoutes != null - ? de_ExpectedRoutes(output.ExpectedFirewallSubnetRoutes, context) - : undefined, - ExpectedInternetGatewayRoutes: - output.ExpectedInternetGatewayRoutes != null - ? de_ExpectedRoutes(output.ExpectedInternetGatewayRoutes, context) - : undefined, - FirewallSubnetId: __expectString(output.FirewallSubnetId), - InternetGatewayId: __expectString(output.InternetGatewayId), - IsRouteTableUsedInDifferentAZ: __expectBoolean(output.IsRouteTableUsedInDifferentAZ), - RouteTableId: __expectString(output.RouteTableId), - SubnetAvailabilityZone: __expectString(output.SubnetAvailabilityZone), - SubnetId: __expectString(output.SubnetId), - ViolatingRoutes: output.ViolatingRoutes != null ? de_Routes(output.ViolatingRoutes, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1NetworkFirewallInvalidRouteConfigurationViolation - */ -const de_NetworkFirewallInvalidRouteConfigurationViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallInvalidRouteConfigurationViolation => { - return { - ActualFirewallEndpoint: __expectString(output.ActualFirewallEndpoint), - ActualFirewallSubnetId: __expectString(output.ActualFirewallSubnetId), - ActualFirewallSubnetRoutes: - output.ActualFirewallSubnetRoutes != null ? de_Routes(output.ActualFirewallSubnetRoutes, context) : undefined, - ActualInternetGatewayRoutes: - output.ActualInternetGatewayRoutes != null ? de_Routes(output.ActualInternetGatewayRoutes, context) : undefined, - AffectedSubnets: output.AffectedSubnets != null ? de_ResourceIdList(output.AffectedSubnets, context) : undefined, - CurrentFirewallSubnetRouteTable: __expectString(output.CurrentFirewallSubnetRouteTable), - CurrentInternetGatewayRouteTable: __expectString(output.CurrentInternetGatewayRouteTable), - ExpectedFirewallEndpoint: __expectString(output.ExpectedFirewallEndpoint), - ExpectedFirewallSubnetId: __expectString(output.ExpectedFirewallSubnetId), - ExpectedFirewallSubnetRoutes: - output.ExpectedFirewallSubnetRoutes != null - ? de_ExpectedRoutes(output.ExpectedFirewallSubnetRoutes, context) - : undefined, - ExpectedInternetGatewayRoutes: - output.ExpectedInternetGatewayRoutes != null - ? de_ExpectedRoutes(output.ExpectedInternetGatewayRoutes, context) - : undefined, - InternetGatewayId: __expectString(output.InternetGatewayId), - IsRouteTableUsedInDifferentAZ: __expectBoolean(output.IsRouteTableUsedInDifferentAZ), - RouteTableId: __expectString(output.RouteTableId), - ViolatingRoute: output.ViolatingRoute != null ? de_Route(output.ViolatingRoute, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1NetworkFirewallMissingExpectedRoutesViolation - */ -const de_NetworkFirewallMissingExpectedRoutesViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallMissingExpectedRoutesViolation => { - return { - ExpectedRoutes: output.ExpectedRoutes != null ? de_ExpectedRoutes(output.ExpectedRoutes, context) : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_NetworkFirewallBlackHoleRouteDetectedViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallMissingExpectedRTViolation - */ -const de_NetworkFirewallMissingExpectedRTViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallMissingExpectedRTViolation => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - CurrentRouteTable: __expectString(output.CurrentRouteTable), - ExpectedRouteTable: __expectString(output.ExpectedRouteTable), - VPC: __expectString(output.VPC), - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_NetworkFirewallInternetTrafficNotInspectedViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallMissingFirewallViolation - */ -const de_NetworkFirewallMissingFirewallViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallMissingFirewallViolation => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - TargetViolationReason: __expectString(output.TargetViolationReason), - VPC: __expectString(output.VPC), - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_NetworkFirewallInvalidRouteConfigurationViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallMissingSubnetViolation - */ -const de_NetworkFirewallMissingSubnetViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallMissingSubnetViolation => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - TargetViolationReason: __expectString(output.TargetViolationReason), - VPC: __expectString(output.VPC), - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_NetworkFirewallMissingExpectedRoutesViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallPolicy - */ -const de_NetworkFirewallPolicy = (output: any, context: __SerdeContext): NetworkFirewallPolicy => { - return { - FirewallDeploymentModel: __expectString(output.FirewallDeploymentModel), - } as any; -}; +// de_NetworkFirewallMissingExpectedRTViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallPolicyDescription - */ -const de_NetworkFirewallPolicyDescription = ( - output: any, - context: __SerdeContext -): NetworkFirewallPolicyDescription => { - return { - StatefulDefaultActions: - output.StatefulDefaultActions != null - ? de_NetworkFirewallActionList(output.StatefulDefaultActions, context) - : undefined, - StatefulEngineOptions: - output.StatefulEngineOptions != null - ? de_StatefulEngineOptions(output.StatefulEngineOptions, context) - : undefined, - StatefulRuleGroups: - output.StatefulRuleGroups != null ? de_StatefulRuleGroupList(output.StatefulRuleGroups, context) : undefined, - StatelessCustomActions: - output.StatelessCustomActions != null - ? de_NetworkFirewallActionList(output.StatelessCustomActions, context) - : undefined, - StatelessDefaultActions: - output.StatelessDefaultActions != null - ? de_NetworkFirewallActionList(output.StatelessDefaultActions, context) - : undefined, - StatelessFragmentDefaultActions: - output.StatelessFragmentDefaultActions != null - ? de_NetworkFirewallActionList(output.StatelessFragmentDefaultActions, context) - : undefined, - StatelessRuleGroups: - output.StatelessRuleGroups != null ? de_StatelessRuleGroupList(output.StatelessRuleGroups, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1NetworkFirewallPolicyModifiedViolation - */ -const de_NetworkFirewallPolicyModifiedViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallPolicyModifiedViolation => { - return { - CurrentPolicyDescription: - output.CurrentPolicyDescription != null - ? de_NetworkFirewallPolicyDescription(output.CurrentPolicyDescription, context) - : undefined, - ExpectedPolicyDescription: - output.ExpectedPolicyDescription != null - ? de_NetworkFirewallPolicyDescription(output.ExpectedPolicyDescription, context) - : undefined, - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_NetworkFirewallMissingFirewallViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallStatefulRuleGroupOverride - */ -const de_NetworkFirewallStatefulRuleGroupOverride = ( - output: any, - context: __SerdeContext -): NetworkFirewallStatefulRuleGroupOverride => { - return { - Action: __expectString(output.Action), - } as any; -}; +// de_NetworkFirewallMissingSubnetViolation omitted. -/** - * deserializeAws_json1_1NetworkFirewallUnexpectedFirewallRoutesViolation - */ -const de_NetworkFirewallUnexpectedFirewallRoutesViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallUnexpectedFirewallRoutesViolation => { - return { - FirewallEndpoint: __expectString(output.FirewallEndpoint), - FirewallSubnetId: __expectString(output.FirewallSubnetId), - RouteTableId: __expectString(output.RouteTableId), - ViolatingRoutes: output.ViolatingRoutes != null ? de_Routes(output.ViolatingRoutes, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_NetworkFirewallPolicy omitted. -/** - * deserializeAws_json1_1NetworkFirewallUnexpectedGatewayRoutesViolation - */ -const de_NetworkFirewallUnexpectedGatewayRoutesViolation = ( - output: any, - context: __SerdeContext -): NetworkFirewallUnexpectedGatewayRoutesViolation => { - return { - GatewayId: __expectString(output.GatewayId), - RouteTableId: __expectString(output.RouteTableId), - ViolatingRoutes: output.ViolatingRoutes != null ? de_Routes(output.ViolatingRoutes, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_NetworkFirewallPolicyDescription omitted. -/** - * deserializeAws_json1_1OrderedRemediationActions - */ -const de_OrderedRemediationActions = (output: any, context: __SerdeContext): RemediationActionWithOrder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemediationActionWithOrder(entry, context); - }); - return retVal; -}; +// de_NetworkFirewallPolicyModifiedViolation omitted. -/** - * deserializeAws_json1_1PartialMatch - */ -const de_PartialMatch = (output: any, context: __SerdeContext): PartialMatch => { - return { - Reference: __expectString(output.Reference), - TargetViolationReasons: - output.TargetViolationReasons != null - ? de_TargetViolationReasons(output.TargetViolationReasons, context) - : undefined, - } as any; -}; +// de_NetworkFirewallStatefulRuleGroupOverride omitted. -/** - * deserializeAws_json1_1PartialMatches - */ -const de_PartialMatches = (output: any, context: __SerdeContext): PartialMatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartialMatch(entry, context); - }); - return retVal; -}; +// de_NetworkFirewallUnexpectedFirewallRoutesViolation omitted. -/** - * deserializeAws_json1_1Policy - */ -const de_Policy = (output: any, context: __SerdeContext): Policy => { - return { - DeleteUnusedFMManagedResources: __expectBoolean(output.DeleteUnusedFMManagedResources), - ExcludeMap: output.ExcludeMap != null ? de_CustomerPolicyScopeMap(output.ExcludeMap, context) : undefined, - ExcludeResourceTags: __expectBoolean(output.ExcludeResourceTags), - IncludeMap: output.IncludeMap != null ? de_CustomerPolicyScopeMap(output.IncludeMap, context) : undefined, - PolicyDescription: __expectString(output.PolicyDescription), - PolicyId: __expectString(output.PolicyId), - PolicyName: __expectString(output.PolicyName), - PolicyUpdateToken: __expectString(output.PolicyUpdateToken), - RemediationEnabled: __expectBoolean(output.RemediationEnabled), - ResourceSetIds: output.ResourceSetIds != null ? de_ResourceSetIds(output.ResourceSetIds, context) : undefined, - ResourceTags: output.ResourceTags != null ? de_ResourceTags(output.ResourceTags, context) : undefined, - ResourceType: __expectString(output.ResourceType), - ResourceTypeList: - output.ResourceTypeList != null ? de_ResourceTypeList(output.ResourceTypeList, context) : undefined, - SecurityServicePolicyData: - output.SecurityServicePolicyData != null - ? de_SecurityServicePolicyData(output.SecurityServicePolicyData, context) - : undefined, - } as any; -}; +// de_NetworkFirewallUnexpectedGatewayRoutesViolation omitted. -/** - * deserializeAws_json1_1PolicyComplianceDetail - */ -const de_PolicyComplianceDetail = (output: any, context: __SerdeContext): PolicyComplianceDetail => { - return { - EvaluationLimitExceeded: __expectBoolean(output.EvaluationLimitExceeded), - ExpiredAt: - output.ExpiredAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiredAt))) : undefined, - IssueInfoMap: output.IssueInfoMap != null ? de_IssueInfoMap(output.IssueInfoMap, context) : undefined, - MemberAccount: __expectString(output.MemberAccount), - PolicyId: __expectString(output.PolicyId), - PolicyOwner: __expectString(output.PolicyOwner), - Violators: output.Violators != null ? de_ComplianceViolators(output.Violators, context) : undefined, - } as any; -}; +// de_OrderedRemediationActions omitted. -/** - * deserializeAws_json1_1PolicyComplianceStatus - */ -const de_PolicyComplianceStatus = (output: any, context: __SerdeContext): PolicyComplianceStatus => { - return { - EvaluationResults: - output.EvaluationResults != null ? de_EvaluationResults(output.EvaluationResults, context) : undefined, - IssueInfoMap: output.IssueInfoMap != null ? de_IssueInfoMap(output.IssueInfoMap, context) : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - MemberAccount: __expectString(output.MemberAccount), - PolicyId: __expectString(output.PolicyId), - PolicyName: __expectString(output.PolicyName), - PolicyOwner: __expectString(output.PolicyOwner), - } as any; -}; +// de_PartialMatch omitted. -/** - * deserializeAws_json1_1PolicyComplianceStatusList - */ -const de_PolicyComplianceStatusList = (output: any, context: __SerdeContext): PolicyComplianceStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyComplianceStatus(entry, context); - }); - return retVal; -}; +// de_PartialMatches omitted. + +// de_Policy omitted. /** - * deserializeAws_json1_1PolicyOption + * deserializeAws_json1_1PolicyComplianceDetail */ -const de_PolicyOption = (output: any, context: __SerdeContext): PolicyOption => { - return { - NetworkFirewallPolicy: - output.NetworkFirewallPolicy != null - ? de_NetworkFirewallPolicy(output.NetworkFirewallPolicy, context) - : undefined, - ThirdPartyFirewallPolicy: - output.ThirdPartyFirewallPolicy != null - ? de_ThirdPartyFirewallPolicy(output.ThirdPartyFirewallPolicy, context) - : undefined, - } as any; +const de_PolicyComplianceDetail = (output: any, context: __SerdeContext): PolicyComplianceDetail => { + return take(output, { + EvaluationLimitExceeded: __expectBoolean, + ExpiredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IssueInfoMap: _json, + MemberAccount: __expectString, + PolicyId: __expectString, + PolicyOwner: __expectString, + Violators: _json, + }) as any; }; /** - * deserializeAws_json1_1PolicySummary + * deserializeAws_json1_1PolicyComplianceStatus */ -const de_PolicySummary = (output: any, context: __SerdeContext): PolicySummary => { - return { - DeleteUnusedFMManagedResources: __expectBoolean(output.DeleteUnusedFMManagedResources), - PolicyArn: __expectString(output.PolicyArn), - PolicyId: __expectString(output.PolicyId), - PolicyName: __expectString(output.PolicyName), - RemediationEnabled: __expectBoolean(output.RemediationEnabled), - ResourceType: __expectString(output.ResourceType), - SecurityServiceType: __expectString(output.SecurityServiceType), - } as any; +const de_PolicyComplianceStatus = (output: any, context: __SerdeContext): PolicyComplianceStatus => { + return take(output, { + EvaluationResults: _json, + IssueInfoMap: _json, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MemberAccount: __expectString, + PolicyId: __expectString, + PolicyName: __expectString, + PolicyOwner: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PolicySummaryList + * deserializeAws_json1_1PolicyComplianceStatusList */ -const de_PolicySummaryList = (output: any, context: __SerdeContext): PolicySummary[] => { +const de_PolicyComplianceStatusList = (output: any, context: __SerdeContext): PolicyComplianceStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicySummary(entry, context); + return de_PolicyComplianceStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PossibleRemediationAction - */ -const de_PossibleRemediationAction = (output: any, context: __SerdeContext): PossibleRemediationAction => { - return { - Description: __expectString(output.Description), - IsDefaultAction: __expectBoolean(output.IsDefaultAction), - OrderedRemediationActions: - output.OrderedRemediationActions != null - ? de_OrderedRemediationActions(output.OrderedRemediationActions, context) - : undefined, - } as any; -}; +// de_PolicyOption omitted. -/** - * deserializeAws_json1_1PossibleRemediationActionList - */ -const de_PossibleRemediationActionList = (output: any, context: __SerdeContext): PossibleRemediationAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PossibleRemediationAction(entry, context); - }); - return retVal; -}; +// de_PolicySummary omitted. -/** - * deserializeAws_json1_1PossibleRemediationActions - */ -const de_PossibleRemediationActions = (output: any, context: __SerdeContext): PossibleRemediationActions => { - return { - Actions: output.Actions != null ? de_PossibleRemediationActionList(output.Actions, context) : undefined, - Description: __expectString(output.Description), - } as any; -}; +// de_PolicySummaryList omitted. -/** - * deserializeAws_json1_1PreviousAppsList - */ -const de_PreviousAppsList = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AppsList(value, context); - return acc; - }, {}); -}; +// de_PossibleRemediationAction omitted. -/** - * deserializeAws_json1_1PreviousProtocolsList - */ -const de_PreviousProtocolsList = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ProtocolsList(value, context); - return acc; - }, {}); -}; +// de_PossibleRemediationActionList omitted. -/** - * deserializeAws_json1_1ProtocolsList - */ -const de_ProtocolsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PossibleRemediationActions omitted. + +// de_PreviousAppsList omitted. + +// de_PreviousProtocolsList omitted. + +// de_ProtocolsList omitted. /** * deserializeAws_json1_1ProtocolsListData */ const de_ProtocolsListData = (output: any, context: __SerdeContext): ProtocolsListData => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - ListId: __expectString(output.ListId), - ListName: __expectString(output.ListName), - ListUpdateToken: __expectString(output.ListUpdateToken), - PreviousProtocolsList: - output.PreviousProtocolsList != null - ? de_PreviousProtocolsList(output.PreviousProtocolsList, context) - : undefined, - ProtocolsList: output.ProtocolsList != null ? de_ProtocolsList(output.ProtocolsList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ProtocolsListDataSummary - */ -const de_ProtocolsListDataSummary = (output: any, context: __SerdeContext): ProtocolsListDataSummary => { - return { - ListArn: __expectString(output.ListArn), - ListId: __expectString(output.ListId), - ListName: __expectString(output.ListName), - ProtocolsList: output.ProtocolsList != null ? de_ProtocolsList(output.ProtocolsList, context) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ListId: __expectString, + ListName: __expectString, + ListUpdateToken: __expectString, + PreviousProtocolsList: _json, + ProtocolsList: _json, + }) as any; }; -/** - * deserializeAws_json1_1ProtocolsListsData - */ -const de_ProtocolsListsData = (output: any, context: __SerdeContext): ProtocolsListDataSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProtocolsListDataSummary(entry, context); - }); - return retVal; -}; +// de_ProtocolsListDataSummary omitted. + +// de_ProtocolsListsData omitted. /** * deserializeAws_json1_1PutAppsListResponse */ const de_PutAppsListResponse = (output: any, context: __SerdeContext): PutAppsListResponse => { - return { - AppsList: output.AppsList != null ? de_AppsListData(output.AppsList, context) : undefined, - AppsListArn: __expectString(output.AppsListArn), - } as any; + return take(output, { + AppsList: (_: any) => de_AppsListData(_, context), + AppsListArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PutPolicyResponse - */ -const de_PutPolicyResponse = (output: any, context: __SerdeContext): PutPolicyResponse => { - return { - Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined, - PolicyArn: __expectString(output.PolicyArn), - } as any; -}; +// de_PutPolicyResponse omitted. /** * deserializeAws_json1_1PutProtocolsListResponse */ const de_PutProtocolsListResponse = (output: any, context: __SerdeContext): PutProtocolsListResponse => { - return { - ProtocolsList: output.ProtocolsList != null ? de_ProtocolsListData(output.ProtocolsList, context) : undefined, - ProtocolsListArn: __expectString(output.ProtocolsListArn), - } as any; + return take(output, { + ProtocolsList: (_: any) => de_ProtocolsListData(_, context), + ProtocolsListArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1PutResourceSetResponse */ const de_PutResourceSetResponse = (output: any, context: __SerdeContext): PutResourceSetResponse => { - return { - ResourceSet: output.ResourceSet != null ? de_ResourceSet(output.ResourceSet, context) : undefined, - ResourceSetArn: __expectString(output.ResourceSetArn), - } as any; + return take(output, { + ResourceSet: (_: any) => de_ResourceSet(_, context), + ResourceSetArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RemediationAction - */ -const de_RemediationAction = (output: any, context: __SerdeContext): RemediationAction => { - return { - Description: __expectString(output.Description), - EC2AssociateRouteTableAction: - output.EC2AssociateRouteTableAction != null - ? de_EC2AssociateRouteTableAction(output.EC2AssociateRouteTableAction, context) - : undefined, - EC2CopyRouteTableAction: - output.EC2CopyRouteTableAction != null - ? de_EC2CopyRouteTableAction(output.EC2CopyRouteTableAction, context) - : undefined, - EC2CreateRouteAction: - output.EC2CreateRouteAction != null ? de_EC2CreateRouteAction(output.EC2CreateRouteAction, context) : undefined, - EC2CreateRouteTableAction: - output.EC2CreateRouteTableAction != null - ? de_EC2CreateRouteTableAction(output.EC2CreateRouteTableAction, context) - : undefined, - EC2DeleteRouteAction: - output.EC2DeleteRouteAction != null ? de_EC2DeleteRouteAction(output.EC2DeleteRouteAction, context) : undefined, - EC2ReplaceRouteAction: - output.EC2ReplaceRouteAction != null - ? de_EC2ReplaceRouteAction(output.EC2ReplaceRouteAction, context) - : undefined, - EC2ReplaceRouteTableAssociationAction: - output.EC2ReplaceRouteTableAssociationAction != null - ? de_EC2ReplaceRouteTableAssociationAction(output.EC2ReplaceRouteTableAssociationAction, context) - : undefined, - FMSPolicyUpdateFirewallCreationConfigAction: - output.FMSPolicyUpdateFirewallCreationConfigAction != null - ? de_FMSPolicyUpdateFirewallCreationConfigAction(output.FMSPolicyUpdateFirewallCreationConfigAction, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RemediationActionWithOrder - */ -const de_RemediationActionWithOrder = (output: any, context: __SerdeContext): RemediationActionWithOrder => { - return { - Order: __expectInt32(output.Order), - RemediationAction: - output.RemediationAction != null ? de_RemediationAction(output.RemediationAction, context) : undefined, - } as any; -}; +// de_RemediationAction omitted. -/** - * deserializeAws_json1_1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - AccountId: __expectString(output.AccountId), - URI: __expectString(output.URI), - } as any; -}; +// de_RemediationActionWithOrder omitted. -/** - * deserializeAws_json1_1ResourceIdList - */ -const de_ResourceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Resource omitted. -/** - * deserializeAws_json1_1ResourceList - */ -const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_ResourceIdList omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceList omitted. + +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1ResourceSet */ const de_ResourceSet = (output: any, context: __SerdeContext): ResourceSet => { - return { - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - Name: __expectString(output.Name), - ResourceTypeList: - output.ResourceTypeList != null ? de_ResourceTypeList(output.ResourceTypeList, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; + return take(output, { + Description: __expectString, + Id: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceTypeList: _json, + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceSetIds - */ -const de_ResourceSetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceSetIds omitted. /** * deserializeAws_json1_1ResourceSetSummary */ const de_ResourceSetSummary = (output: any, context: __SerdeContext): ResourceSetSummary => { - return { - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + Description: __expectString, + Id: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** @@ -5226,512 +3409,80 @@ const de_ResourceSetSummaryList = (output: any, context: __SerdeContext): Resour const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceSetSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceTag - */ -const de_ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_ResourceTag omitted. -/** - * deserializeAws_json1_1ResourceTags - */ -const de_ResourceTags = (output: any, context: __SerdeContext): ResourceTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTag(entry, context); - }); - return retVal; -}; +// de_ResourceTags omitted. -/** - * deserializeAws_json1_1ResourceTypeList - */ -const de_ResourceTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceTypeList omitted. -/** - * deserializeAws_json1_1ResourceViolation - */ -const de_ResourceViolation = (output: any, context: __SerdeContext): ResourceViolation => { - return { - AwsEc2InstanceViolation: - output.AwsEc2InstanceViolation != null - ? de_AwsEc2InstanceViolation(output.AwsEc2InstanceViolation, context) - : undefined, - AwsEc2NetworkInterfaceViolation: - output.AwsEc2NetworkInterfaceViolation != null - ? de_AwsEc2NetworkInterfaceViolation(output.AwsEc2NetworkInterfaceViolation, context) - : undefined, - AwsVPCSecurityGroupViolation: - output.AwsVPCSecurityGroupViolation != null - ? de_AwsVPCSecurityGroupViolation(output.AwsVPCSecurityGroupViolation, context) - : undefined, - DnsDuplicateRuleGroupViolation: - output.DnsDuplicateRuleGroupViolation != null - ? de_DnsDuplicateRuleGroupViolation(output.DnsDuplicateRuleGroupViolation, context) - : undefined, - DnsRuleGroupLimitExceededViolation: - output.DnsRuleGroupLimitExceededViolation != null - ? de_DnsRuleGroupLimitExceededViolation(output.DnsRuleGroupLimitExceededViolation, context) - : undefined, - DnsRuleGroupPriorityConflictViolation: - output.DnsRuleGroupPriorityConflictViolation != null - ? de_DnsRuleGroupPriorityConflictViolation(output.DnsRuleGroupPriorityConflictViolation, context) - : undefined, - FirewallSubnetIsOutOfScopeViolation: - output.FirewallSubnetIsOutOfScopeViolation != null - ? de_FirewallSubnetIsOutOfScopeViolation(output.FirewallSubnetIsOutOfScopeViolation, context) - : undefined, - FirewallSubnetMissingVPCEndpointViolation: - output.FirewallSubnetMissingVPCEndpointViolation != null - ? de_FirewallSubnetMissingVPCEndpointViolation(output.FirewallSubnetMissingVPCEndpointViolation, context) - : undefined, - NetworkFirewallBlackHoleRouteDetectedViolation: - output.NetworkFirewallBlackHoleRouteDetectedViolation != null - ? de_NetworkFirewallBlackHoleRouteDetectedViolation( - output.NetworkFirewallBlackHoleRouteDetectedViolation, - context - ) - : undefined, - NetworkFirewallInternetTrafficNotInspectedViolation: - output.NetworkFirewallInternetTrafficNotInspectedViolation != null - ? de_NetworkFirewallInternetTrafficNotInspectedViolation( - output.NetworkFirewallInternetTrafficNotInspectedViolation, - context - ) - : undefined, - NetworkFirewallInvalidRouteConfigurationViolation: - output.NetworkFirewallInvalidRouteConfigurationViolation != null - ? de_NetworkFirewallInvalidRouteConfigurationViolation( - output.NetworkFirewallInvalidRouteConfigurationViolation, - context - ) - : undefined, - NetworkFirewallMissingExpectedRTViolation: - output.NetworkFirewallMissingExpectedRTViolation != null - ? de_NetworkFirewallMissingExpectedRTViolation(output.NetworkFirewallMissingExpectedRTViolation, context) - : undefined, - NetworkFirewallMissingExpectedRoutesViolation: - output.NetworkFirewallMissingExpectedRoutesViolation != null - ? de_NetworkFirewallMissingExpectedRoutesViolation( - output.NetworkFirewallMissingExpectedRoutesViolation, - context - ) - : undefined, - NetworkFirewallMissingFirewallViolation: - output.NetworkFirewallMissingFirewallViolation != null - ? de_NetworkFirewallMissingFirewallViolation(output.NetworkFirewallMissingFirewallViolation, context) - : undefined, - NetworkFirewallMissingSubnetViolation: - output.NetworkFirewallMissingSubnetViolation != null - ? de_NetworkFirewallMissingSubnetViolation(output.NetworkFirewallMissingSubnetViolation, context) - : undefined, - NetworkFirewallPolicyModifiedViolation: - output.NetworkFirewallPolicyModifiedViolation != null - ? de_NetworkFirewallPolicyModifiedViolation(output.NetworkFirewallPolicyModifiedViolation, context) - : undefined, - NetworkFirewallUnexpectedFirewallRoutesViolation: - output.NetworkFirewallUnexpectedFirewallRoutesViolation != null - ? de_NetworkFirewallUnexpectedFirewallRoutesViolation( - output.NetworkFirewallUnexpectedFirewallRoutesViolation, - context - ) - : undefined, - NetworkFirewallUnexpectedGatewayRoutesViolation: - output.NetworkFirewallUnexpectedGatewayRoutesViolation != null - ? de_NetworkFirewallUnexpectedGatewayRoutesViolation( - output.NetworkFirewallUnexpectedGatewayRoutesViolation, - context - ) - : undefined, - PossibleRemediationActions: - output.PossibleRemediationActions != null - ? de_PossibleRemediationActions(output.PossibleRemediationActions, context) - : undefined, - RouteHasOutOfScopeEndpointViolation: - output.RouteHasOutOfScopeEndpointViolation != null - ? de_RouteHasOutOfScopeEndpointViolation(output.RouteHasOutOfScopeEndpointViolation, context) - : undefined, - ThirdPartyFirewallMissingExpectedRouteTableViolation: - output.ThirdPartyFirewallMissingExpectedRouteTableViolation != null - ? de_ThirdPartyFirewallMissingExpectedRouteTableViolation( - output.ThirdPartyFirewallMissingExpectedRouteTableViolation, - context - ) - : undefined, - ThirdPartyFirewallMissingFirewallViolation: - output.ThirdPartyFirewallMissingFirewallViolation != null - ? de_ThirdPartyFirewallMissingFirewallViolation(output.ThirdPartyFirewallMissingFirewallViolation, context) - : undefined, - ThirdPartyFirewallMissingSubnetViolation: - output.ThirdPartyFirewallMissingSubnetViolation != null - ? de_ThirdPartyFirewallMissingSubnetViolation(output.ThirdPartyFirewallMissingSubnetViolation, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResourceViolations - */ -const de_ResourceViolations = (output: any, context: __SerdeContext): ResourceViolation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceViolation(entry, context); - }); - return retVal; -}; +// de_ResourceViolation omitted. -/** - * deserializeAws_json1_1Route - */ -const de_Route = (output: any, context: __SerdeContext): Route => { - return { - Destination: __expectString(output.Destination), - DestinationType: __expectString(output.DestinationType), - Target: __expectString(output.Target), - TargetType: __expectString(output.TargetType), - } as any; -}; +// de_ResourceViolations omitted. -/** - * deserializeAws_json1_1RouteHasOutOfScopeEndpointViolation - */ -const de_RouteHasOutOfScopeEndpointViolation = ( - output: any, - context: __SerdeContext -): RouteHasOutOfScopeEndpointViolation => { - return { - CurrentFirewallSubnetRouteTable: __expectString(output.CurrentFirewallSubnetRouteTable), - CurrentInternetGatewayRouteTable: __expectString(output.CurrentInternetGatewayRouteTable), - FirewallSubnetId: __expectString(output.FirewallSubnetId), - FirewallSubnetRoutes: - output.FirewallSubnetRoutes != null ? de_Routes(output.FirewallSubnetRoutes, context) : undefined, - InternetGatewayId: __expectString(output.InternetGatewayId), - InternetGatewayRoutes: - output.InternetGatewayRoutes != null ? de_Routes(output.InternetGatewayRoutes, context) : undefined, - RouteTableId: __expectString(output.RouteTableId), - SubnetAvailabilityZone: __expectString(output.SubnetAvailabilityZone), - SubnetAvailabilityZoneId: __expectString(output.SubnetAvailabilityZoneId), - SubnetId: __expectString(output.SubnetId), - ViolatingRoutes: output.ViolatingRoutes != null ? de_Routes(output.ViolatingRoutes, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1Routes - */ -const de_Routes = (output: any, context: __SerdeContext): Route[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Route(entry, context); - }); - return retVal; -}; +// de_Route omitted. -/** - * deserializeAws_json1_1SecurityGroupRemediationAction - */ -const de_SecurityGroupRemediationAction = (output: any, context: __SerdeContext): SecurityGroupRemediationAction => { - return { - Description: __expectString(output.Description), - IsDefaultAction: __expectBoolean(output.IsDefaultAction), - RemediationActionType: __expectString(output.RemediationActionType), - RemediationResult: - output.RemediationResult != null ? de_SecurityGroupRuleDescription(output.RemediationResult, context) : undefined, - } as any; -}; +// de_RouteHasOutOfScopeEndpointViolation omitted. -/** - * deserializeAws_json1_1SecurityGroupRemediationActions - */ -const de_SecurityGroupRemediationActions = (output: any, context: __SerdeContext): SecurityGroupRemediationAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityGroupRemediationAction(entry, context); - }); - return retVal; -}; +// de_Routes omitted. -/** - * deserializeAws_json1_1SecurityGroupRuleDescription - */ -const de_SecurityGroupRuleDescription = (output: any, context: __SerdeContext): SecurityGroupRuleDescription => { - return { - FromPort: __expectLong(output.FromPort), - IPV4Range: __expectString(output.IPV4Range), - IPV6Range: __expectString(output.IPV6Range), - PrefixListId: __expectString(output.PrefixListId), - Protocol: __expectString(output.Protocol), - ToPort: __expectLong(output.ToPort), - } as any; -}; +// de_SecurityGroupRemediationAction omitted. -/** - * deserializeAws_json1_1SecurityServicePolicyData - */ -const de_SecurityServicePolicyData = (output: any, context: __SerdeContext): SecurityServicePolicyData => { - return { - ManagedServiceData: __expectString(output.ManagedServiceData), - PolicyOption: output.PolicyOption != null ? de_PolicyOption(output.PolicyOption, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_SecurityGroupRemediationActions omitted. -/** - * deserializeAws_json1_1StatefulEngineOptions - */ -const de_StatefulEngineOptions = (output: any, context: __SerdeContext): StatefulEngineOptions => { - return { - RuleOrder: __expectString(output.RuleOrder), - } as any; -}; +// de_SecurityGroupRuleDescription omitted. -/** - * deserializeAws_json1_1StatefulRuleGroup - */ -const de_StatefulRuleGroup = (output: any, context: __SerdeContext): StatefulRuleGroup => { - return { - Override: - output.Override != null ? de_NetworkFirewallStatefulRuleGroupOverride(output.Override, context) : undefined, - Priority: __expectInt32(output.Priority), - ResourceId: __expectString(output.ResourceId), - RuleGroupName: __expectString(output.RuleGroupName), - } as any; -}; +// de_SecurityServicePolicyData omitted. -/** - * deserializeAws_json1_1StatefulRuleGroupList - */ -const de_StatefulRuleGroupList = (output: any, context: __SerdeContext): StatefulRuleGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatefulRuleGroup(entry, context); - }); - return retVal; -}; +// de_StatefulEngineOptions omitted. -/** - * deserializeAws_json1_1StatelessRuleGroup - */ -const de_StatelessRuleGroup = (output: any, context: __SerdeContext): StatelessRuleGroup => { - return { - Priority: __expectInt32(output.Priority), - ResourceId: __expectString(output.ResourceId), - RuleGroupName: __expectString(output.RuleGroupName), - } as any; -}; +// de_StatefulRuleGroup omitted. -/** - * deserializeAws_json1_1StatelessRuleGroupList - */ -const de_StatelessRuleGroupList = (output: any, context: __SerdeContext): StatelessRuleGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatelessRuleGroup(entry, context); - }); - return retVal; -}; +// de_StatefulRuleGroupList omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_StatelessRuleGroup omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_StatelessRuleGroupList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TargetViolationReasons - */ -const de_TargetViolationReasons = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1ThirdPartyFirewallFirewallPolicies - */ -const de_ThirdPartyFirewallFirewallPolicies = ( - output: any, - context: __SerdeContext -): ThirdPartyFirewallFirewallPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThirdPartyFirewallFirewallPolicy(entry, context); - }); - return retVal; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1ThirdPartyFirewallFirewallPolicy - */ -const de_ThirdPartyFirewallFirewallPolicy = ( - output: any, - context: __SerdeContext -): ThirdPartyFirewallFirewallPolicy => { - return { - FirewallPolicyId: __expectString(output.FirewallPolicyId), - FirewallPolicyName: __expectString(output.FirewallPolicyName), - } as any; -}; +// de_TargetViolationReasons omitted. -/** - * deserializeAws_json1_1ThirdPartyFirewallMissingExpectedRouteTableViolation - */ -const de_ThirdPartyFirewallMissingExpectedRouteTableViolation = ( - output: any, - context: __SerdeContext -): ThirdPartyFirewallMissingExpectedRouteTableViolation => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - CurrentRouteTable: __expectString(output.CurrentRouteTable), - ExpectedRouteTable: __expectString(output.ExpectedRouteTable), - VPC: __expectString(output.VPC), - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_ThirdPartyFirewallFirewallPolicies omitted. -/** - * deserializeAws_json1_1ThirdPartyFirewallMissingFirewallViolation - */ -const de_ThirdPartyFirewallMissingFirewallViolation = ( - output: any, - context: __SerdeContext -): ThirdPartyFirewallMissingFirewallViolation => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - TargetViolationReason: __expectString(output.TargetViolationReason), - VPC: __expectString(output.VPC), - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_ThirdPartyFirewallFirewallPolicy omitted. -/** - * deserializeAws_json1_1ThirdPartyFirewallMissingSubnetViolation - */ -const de_ThirdPartyFirewallMissingSubnetViolation = ( - output: any, - context: __SerdeContext -): ThirdPartyFirewallMissingSubnetViolation => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - TargetViolationReason: __expectString(output.TargetViolationReason), - VPC: __expectString(output.VPC), - ViolationTarget: __expectString(output.ViolationTarget), - } as any; -}; +// de_ThirdPartyFirewallMissingExpectedRouteTableViolation omitted. -/** - * deserializeAws_json1_1ThirdPartyFirewallPolicy - */ -const de_ThirdPartyFirewallPolicy = (output: any, context: __SerdeContext): ThirdPartyFirewallPolicy => { - return { - FirewallDeploymentModel: __expectString(output.FirewallDeploymentModel), - } as any; -}; +// de_ThirdPartyFirewallMissingFirewallViolation omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_ThirdPartyFirewallMissingSubnetViolation omitted. + +// de_ThirdPartyFirewallPolicy omitted. + +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1ViolationDetail */ const de_ViolationDetail = (output: any, context: __SerdeContext): ViolationDetail => { - return { - MemberAccount: __expectString(output.MemberAccount), - PolicyId: __expectString(output.PolicyId), - ResourceDescription: __expectString(output.ResourceDescription), - ResourceId: __expectString(output.ResourceId), - ResourceTags: output.ResourceTags != null ? de_TagList(output.ResourceTags, context) : undefined, - ResourceType: __expectString(output.ResourceType), - ResourceViolations: - output.ResourceViolations != null ? de_ResourceViolations(output.ResourceViolations, context) : undefined, - } as any; + return take(output, { + MemberAccount: __expectString, + PolicyId: __expectString, + ResourceDescription: __expectString, + ResourceId: __expectString, + ResourceTags: _json, + ResourceType: __expectString, + ResourceViolations: _json, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -5754,6 +3505,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-forecast/src/protocols/Aws_json1_1.ts b/clients/client-forecast/src/protocols/Aws_json1_1.ts index 4afb62d199c4..c87c064d4694 100644 --- a/clients/client-forecast/src/protocols/Aws_json1_1.ts +++ b/clients/client-forecast/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -201,33 +203,19 @@ import { CategoricalParameterRange, ContinuousParameterRange, CreateAutoPredictorRequest, - CreateAutoPredictorResponse, CreateDatasetGroupRequest, - CreateDatasetGroupResponse, CreateDatasetImportJobRequest, - CreateDatasetImportJobResponse, CreateDatasetRequest, - CreateDatasetResponse, CreateExplainabilityExportRequest, - CreateExplainabilityExportResponse, CreateExplainabilityRequest, - CreateExplainabilityResponse, CreateForecastExportJobRequest, - CreateForecastExportJobResponse, CreateForecastRequest, - CreateForecastResponse, CreateMonitorRequest, - CreateMonitorResponse, CreatePredictorBacktestExportJobRequest, - CreatePredictorBacktestExportJobResponse, CreatePredictorRequest, - CreatePredictorResponse, CreateWhatIfAnalysisRequest, - CreateWhatIfAnalysisResponse, CreateWhatIfForecastExportRequest, - CreateWhatIfForecastExportResponse, CreateWhatIfForecastRequest, - CreateWhatIfForecastResponse, DataConfig, DataDestination, DatasetGroupSummary, @@ -282,7 +270,6 @@ import { EvaluationResult, ExplainabilityConfig, ExplainabilityExportSummary, - ExplainabilityInfo, ExplainabilitySummary, Featurization, FeaturizationConfig, @@ -321,7 +308,6 @@ import { ListPredictorsRequest, ListPredictorsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListWhatIfAnalysesRequest, ListWhatIfAnalysesResponse, ListWhatIfForecastExportsRequest, @@ -331,8 +317,6 @@ import { MetricResult, Metrics, MonitorConfig, - MonitorDataSource, - MonitorInfo, MonitorSummary, ParameterRanges, PredictorBacktestExportJobSummary, @@ -342,7 +326,6 @@ import { PredictorExecutionDetails, PredictorMonitorEvaluation, PredictorSummary, - ReferencePredictorSummary, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, @@ -355,7 +338,6 @@ import { SupplementaryFeature, Tag, TagResourceRequest, - TagResourceResponse, TestWindowSummary, TimeAlignmentBoundary, TimeSeriesCondition, @@ -364,9 +346,7 @@ import { TimeSeriesSelector, TimeSeriesTransformation, UntagResourceRequest, - UntagResourceResponse, UpdateDatasetGroupRequest, - UpdateDatasetGroupResponse, WeightedQuantileLoss, WhatIfAnalysisSummary, WhatIfForecastExportSummary, @@ -383,7 +363,7 @@ export const se_CreateAutoPredictorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAutoPredictor"); let body: any; - body = JSON.stringify(se_CreateAutoPredictorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -396,7 +376,7 @@ export const se_CreateDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataset"); let body: any; - body = JSON.stringify(se_CreateDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -409,7 +389,7 @@ export const se_CreateDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatasetGroup"); let body: any; - body = JSON.stringify(se_CreateDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -422,7 +402,7 @@ export const se_CreateDatasetImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatasetImportJob"); let body: any; - body = JSON.stringify(se_CreateDatasetImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -435,7 +415,7 @@ export const se_CreateExplainabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateExplainability"); let body: any; - body = JSON.stringify(se_CreateExplainabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -448,7 +428,7 @@ export const se_CreateExplainabilityExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateExplainabilityExport"); let body: any; - body = JSON.stringify(se_CreateExplainabilityExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,7 +441,7 @@ export const se_CreateForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateForecast"); let body: any; - body = JSON.stringify(se_CreateForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -474,7 +454,7 @@ export const se_CreateForecastExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateForecastExportJob"); let body: any; - body = JSON.stringify(se_CreateForecastExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -487,7 +467,7 @@ export const se_CreateMonitorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMonitor"); let body: any; - body = JSON.stringify(se_CreateMonitorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -513,7 +493,7 @@ export const se_CreatePredictorBacktestExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePredictorBacktestExportJob"); let body: any; - body = JSON.stringify(se_CreatePredictorBacktestExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -526,7 +506,7 @@ export const se_CreateWhatIfAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWhatIfAnalysis"); let body: any; - body = JSON.stringify(se_CreateWhatIfAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -552,7 +532,7 @@ export const se_CreateWhatIfForecastExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWhatIfForecastExport"); let body: any; - body = JSON.stringify(se_CreateWhatIfForecastExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -565,7 +545,7 @@ export const se_DeleteDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataset"); let body: any; - body = JSON.stringify(se_DeleteDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -578,7 +558,7 @@ export const se_DeleteDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDatasetGroup"); let body: any; - body = JSON.stringify(se_DeleteDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -591,7 +571,7 @@ export const se_DeleteDatasetImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDatasetImportJob"); let body: any; - body = JSON.stringify(se_DeleteDatasetImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -604,7 +584,7 @@ export const se_DeleteExplainabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteExplainability"); let body: any; - body = JSON.stringify(se_DeleteExplainabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -617,7 +597,7 @@ export const se_DeleteExplainabilityExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteExplainabilityExport"); let body: any; - body = JSON.stringify(se_DeleteExplainabilityExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -630,7 +610,7 @@ export const se_DeleteForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteForecast"); let body: any; - body = JSON.stringify(se_DeleteForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -643,7 +623,7 @@ export const se_DeleteForecastExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteForecastExportJob"); let body: any; - body = JSON.stringify(se_DeleteForecastExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -656,7 +636,7 @@ export const se_DeleteMonitorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMonitor"); let body: any; - body = JSON.stringify(se_DeleteMonitorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -669,7 +649,7 @@ export const se_DeletePredictorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePredictor"); let body: any; - body = JSON.stringify(se_DeletePredictorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -682,7 +662,7 @@ export const se_DeletePredictorBacktestExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePredictorBacktestExportJob"); let body: any; - body = JSON.stringify(se_DeletePredictorBacktestExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -695,7 +675,7 @@ export const se_DeleteResourceTreeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourceTree"); let body: any; - body = JSON.stringify(se_DeleteResourceTreeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -708,7 +688,7 @@ export const se_DeleteWhatIfAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWhatIfAnalysis"); let body: any; - body = JSON.stringify(se_DeleteWhatIfAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -721,7 +701,7 @@ export const se_DeleteWhatIfForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWhatIfForecast"); let body: any; - body = JSON.stringify(se_DeleteWhatIfForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -734,7 +714,7 @@ export const se_DeleteWhatIfForecastExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWhatIfForecastExport"); let body: any; - body = JSON.stringify(se_DeleteWhatIfForecastExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -747,7 +727,7 @@ export const se_DescribeAutoPredictorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAutoPredictor"); let body: any; - body = JSON.stringify(se_DescribeAutoPredictorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -760,7 +740,7 @@ export const se_DescribeDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataset"); let body: any; - body = JSON.stringify(se_DescribeDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -773,7 +753,7 @@ export const se_DescribeDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDatasetGroup"); let body: any; - body = JSON.stringify(se_DescribeDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -786,7 +766,7 @@ export const se_DescribeDatasetImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDatasetImportJob"); let body: any; - body = JSON.stringify(se_DescribeDatasetImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -799,7 +779,7 @@ export const se_DescribeExplainabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExplainability"); let body: any; - body = JSON.stringify(se_DescribeExplainabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -812,7 +792,7 @@ export const se_DescribeExplainabilityExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExplainabilityExport"); let body: any; - body = JSON.stringify(se_DescribeExplainabilityExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -825,7 +805,7 @@ export const se_DescribeForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeForecast"); let body: any; - body = JSON.stringify(se_DescribeForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -838,7 +818,7 @@ export const se_DescribeForecastExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeForecastExportJob"); let body: any; - body = JSON.stringify(se_DescribeForecastExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -851,7 +831,7 @@ export const se_DescribeMonitorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMonitor"); let body: any; - body = JSON.stringify(se_DescribeMonitorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -864,7 +844,7 @@ export const se_DescribePredictorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePredictor"); let body: any; - body = JSON.stringify(se_DescribePredictorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -877,7 +857,7 @@ export const se_DescribePredictorBacktestExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePredictorBacktestExportJob"); let body: any; - body = JSON.stringify(se_DescribePredictorBacktestExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -890,7 +870,7 @@ export const se_DescribeWhatIfAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWhatIfAnalysis"); let body: any; - body = JSON.stringify(se_DescribeWhatIfAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -903,7 +883,7 @@ export const se_DescribeWhatIfForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWhatIfForecast"); let body: any; - body = JSON.stringify(se_DescribeWhatIfForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -916,7 +896,7 @@ export const se_DescribeWhatIfForecastExportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWhatIfForecastExport"); let body: any; - body = JSON.stringify(se_DescribeWhatIfForecastExportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -929,7 +909,7 @@ export const se_GetAccuracyMetricsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccuracyMetrics"); let body: any; - body = JSON.stringify(se_GetAccuracyMetricsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -942,7 +922,7 @@ export const se_ListDatasetGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetGroups"); let body: any; - body = JSON.stringify(se_ListDatasetGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -955,7 +935,7 @@ export const se_ListDatasetImportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetImportJobs"); let body: any; - body = JSON.stringify(se_ListDatasetImportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -968,7 +948,7 @@ export const se_ListDatasetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasets"); let body: any; - body = JSON.stringify(se_ListDatasetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -981,7 +961,7 @@ export const se_ListExplainabilitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExplainabilities"); let body: any; - body = JSON.stringify(se_ListExplainabilitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -994,7 +974,7 @@ export const se_ListExplainabilityExportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExplainabilityExports"); let body: any; - body = JSON.stringify(se_ListExplainabilityExportsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1007,7 +987,7 @@ export const se_ListForecastExportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListForecastExportJobs"); let body: any; - body = JSON.stringify(se_ListForecastExportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1020,7 +1000,7 @@ export const se_ListForecastsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListForecasts"); let body: any; - body = JSON.stringify(se_ListForecastsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1033,7 +1013,7 @@ export const se_ListMonitorEvaluationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMonitorEvaluations"); let body: any; - body = JSON.stringify(se_ListMonitorEvaluationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1046,7 +1026,7 @@ export const se_ListMonitorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMonitors"); let body: any; - body = JSON.stringify(se_ListMonitorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1059,7 +1039,7 @@ export const se_ListPredictorBacktestExportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPredictorBacktestExportJobs"); let body: any; - body = JSON.stringify(se_ListPredictorBacktestExportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1072,7 +1052,7 @@ export const se_ListPredictorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPredictors"); let body: any; - body = JSON.stringify(se_ListPredictorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1085,7 +1065,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1098,7 +1078,7 @@ export const se_ListWhatIfAnalysesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWhatIfAnalyses"); let body: any; - body = JSON.stringify(se_ListWhatIfAnalysesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1111,7 +1091,7 @@ export const se_ListWhatIfForecastExportsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWhatIfForecastExports"); let body: any; - body = JSON.stringify(se_ListWhatIfForecastExportsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1124,7 +1104,7 @@ export const se_ListWhatIfForecastsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWhatIfForecasts"); let body: any; - body = JSON.stringify(se_ListWhatIfForecastsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1137,7 +1117,7 @@ export const se_ResumeResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResumeResource"); let body: any; - body = JSON.stringify(se_ResumeResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1150,7 +1130,7 @@ export const se_StopResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopResource"); let body: any; - body = JSON.stringify(se_StopResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1163,7 +1143,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1176,7 +1156,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1189,7 +1169,7 @@ export const se_UpdateDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDatasetGroup"); let body: any; - body = JSON.stringify(se_UpdateDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1205,12 +1185,12 @@ export const de_CreateAutoPredictorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAutoPredictorResponse(data, context); + contents = _json(data); const response: CreateAutoPredictorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1243,10 +1223,9 @@ const de_CreateAutoPredictorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1264,12 +1243,12 @@ export const de_CreateDatasetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetResponse(data, context); + contents = _json(data); const response: CreateDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1296,10 +1275,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1317,12 +1295,12 @@ export const de_CreateDatasetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetGroupResponse(data, context); + contents = _json(data); const response: CreateDatasetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1355,10 +1333,9 @@ const de_CreateDatasetGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1376,12 +1353,12 @@ export const de_CreateDatasetImportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetImportJobResponse(data, context); + contents = _json(data); const response: CreateDatasetImportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1414,10 +1391,9 @@ const de_CreateDatasetImportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1435,12 +1411,12 @@ export const de_CreateExplainabilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateExplainabilityResponse(data, context); + contents = _json(data); const response: CreateExplainabilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1473,10 +1449,9 @@ const de_CreateExplainabilityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1494,12 +1469,12 @@ export const de_CreateExplainabilityExportCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateExplainabilityExportResponse(data, context); + contents = _json(data); const response: CreateExplainabilityExportCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1532,10 +1507,9 @@ const de_CreateExplainabilityExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1553,12 +1527,12 @@ export const de_CreateForecastCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateForecastResponse(data, context); + contents = _json(data); const response: CreateForecastCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1591,10 +1565,9 @@ const de_CreateForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1612,12 +1585,12 @@ export const de_CreateForecastExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateForecastExportJobResponse(data, context); + contents = _json(data); const response: CreateForecastExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1650,10 +1623,9 @@ const de_CreateForecastExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1671,12 +1643,12 @@ export const de_CreateMonitorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMonitorResponse(data, context); + contents = _json(data); const response: CreateMonitorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1709,10 +1681,9 @@ const de_CreateMonitorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1730,12 +1701,12 @@ export const de_CreatePredictorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePredictorResponse(data, context); + contents = _json(data); const response: CreatePredictorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1768,10 +1739,9 @@ const de_CreatePredictorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1789,12 +1759,12 @@ export const de_CreatePredictorBacktestExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePredictorBacktestExportJobResponse(data, context); + contents = _json(data); const response: CreatePredictorBacktestExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1827,10 +1797,9 @@ const de_CreatePredictorBacktestExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1848,12 +1817,12 @@ export const de_CreateWhatIfAnalysisCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWhatIfAnalysisResponse(data, context); + contents = _json(data); const response: CreateWhatIfAnalysisCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1886,10 +1855,9 @@ const de_CreateWhatIfAnalysisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1907,12 +1875,12 @@ export const de_CreateWhatIfForecastCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWhatIfForecastResponse(data, context); + contents = _json(data); const response: CreateWhatIfForecastCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1945,10 +1913,9 @@ const de_CreateWhatIfForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1966,12 +1933,12 @@ export const de_CreateWhatIfForecastExportCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWhatIfForecastExportResponse(data, context); + contents = _json(data); const response: CreateWhatIfForecastExportCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2004,10 +1971,9 @@ const de_CreateWhatIfForecastExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2027,7 +1993,7 @@ export const de_DeleteDatasetCommand = async ( const response: DeleteDatasetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2054,10 +2020,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2077,7 +2042,7 @@ export const de_DeleteDatasetGroupCommand = async ( const response: DeleteDatasetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2104,10 +2069,9 @@ const de_DeleteDatasetGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2127,7 +2091,7 @@ export const de_DeleteDatasetImportJobCommand = async ( const response: DeleteDatasetImportJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2154,10 +2118,9 @@ const de_DeleteDatasetImportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2177,7 +2140,7 @@ export const de_DeleteExplainabilityCommand = async ( const response: DeleteExplainabilityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2204,10 +2167,9 @@ const de_DeleteExplainabilityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2227,7 +2189,7 @@ export const de_DeleteExplainabilityExportCommand = async ( const response: DeleteExplainabilityExportCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2254,10 +2216,9 @@ const de_DeleteExplainabilityExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2277,7 +2238,7 @@ export const de_DeleteForecastCommand = async ( const response: DeleteForecastCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2304,10 +2265,9 @@ const de_DeleteForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2327,7 +2287,7 @@ export const de_DeleteForecastExportJobCommand = async ( const response: DeleteForecastExportJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2354,10 +2314,9 @@ const de_DeleteForecastExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2377,7 +2336,7 @@ export const de_DeleteMonitorCommand = async ( const response: DeleteMonitorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2404,10 +2363,9 @@ const de_DeleteMonitorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2427,7 +2385,7 @@ export const de_DeletePredictorCommand = async ( const response: DeletePredictorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2454,10 +2412,9 @@ const de_DeletePredictorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2477,7 +2434,7 @@ export const de_DeletePredictorBacktestExportJobCommand = async ( const response: DeletePredictorBacktestExportJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2504,10 +2461,9 @@ const de_DeletePredictorBacktestExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2527,7 +2483,7 @@ export const de_DeleteResourceTreeCommand = async ( const response: DeleteResourceTreeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2554,10 +2510,9 @@ const de_DeleteResourceTreeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2577,7 +2532,7 @@ export const de_DeleteWhatIfAnalysisCommand = async ( const response: DeleteWhatIfAnalysisCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2604,10 +2559,9 @@ const de_DeleteWhatIfAnalysisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2627,7 +2581,7 @@ export const de_DeleteWhatIfForecastCommand = async ( const response: DeleteWhatIfForecastCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2654,10 +2608,9 @@ const de_DeleteWhatIfForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2677,7 +2630,7 @@ export const de_DeleteWhatIfForecastExportCommand = async ( const response: DeleteWhatIfForecastExportCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2704,10 +2657,9 @@ const de_DeleteWhatIfForecastExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2730,7 +2682,7 @@ export const de_DescribeAutoPredictorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2754,10 +2706,9 @@ const de_DescribeAutoPredictorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2780,7 +2731,7 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2804,10 +2755,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2830,7 +2780,7 @@ export const de_DescribeDatasetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2854,10 +2804,9 @@ const de_DescribeDatasetGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2880,7 +2829,7 @@ export const de_DescribeDatasetImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2904,10 +2853,9 @@ const de_DescribeDatasetImportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2930,7 +2878,7 @@ export const de_DescribeExplainabilityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2954,10 +2902,9 @@ const de_DescribeExplainabilityCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2980,7 +2927,7 @@ export const de_DescribeExplainabilityExportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3004,10 +2951,9 @@ const de_DescribeExplainabilityExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3030,7 +2976,7 @@ export const de_DescribeForecastCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3054,10 +3000,9 @@ const de_DescribeForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3080,7 +3025,7 @@ export const de_DescribeForecastExportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3104,10 +3049,9 @@ const de_DescribeForecastExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3130,7 +3074,7 @@ export const de_DescribeMonitorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3154,10 +3098,9 @@ const de_DescribeMonitorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3180,7 +3123,7 @@ export const de_DescribePredictorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3204,10 +3147,9 @@ const de_DescribePredictorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3230,7 +3172,7 @@ export const de_DescribePredictorBacktestExportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3254,10 +3196,9 @@ const de_DescribePredictorBacktestExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3280,7 +3221,7 @@ export const de_DescribeWhatIfAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3304,10 +3245,9 @@ const de_DescribeWhatIfAnalysisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3330,7 +3270,7 @@ export const de_DescribeWhatIfForecastCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3354,10 +3294,9 @@ const de_DescribeWhatIfForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3380,7 +3319,7 @@ export const de_DescribeWhatIfForecastExportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3404,10 +3343,9 @@ const de_DescribeWhatIfForecastExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3430,7 +3368,7 @@ export const de_GetAccuracyMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3457,10 +3395,9 @@ const de_GetAccuracyMetricsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3483,7 +3420,7 @@ export const de_ListDatasetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3504,10 +3441,9 @@ const de_ListDatasetGroupsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3530,7 +3466,7 @@ export const de_ListDatasetImportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3554,10 +3490,9 @@ const de_ListDatasetImportJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3580,7 +3515,7 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3601,10 +3536,9 @@ const de_ListDatasetsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3627,7 +3561,7 @@ export const de_ListExplainabilitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3651,10 +3585,9 @@ const de_ListExplainabilitiesCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3677,7 +3610,7 @@ export const de_ListExplainabilityExportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3701,10 +3634,9 @@ const de_ListExplainabilityExportsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3727,7 +3659,7 @@ export const de_ListForecastExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3751,10 +3683,9 @@ const de_ListForecastExportJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3777,7 +3708,7 @@ export const de_ListForecastsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3801,10 +3732,9 @@ const de_ListForecastsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3827,7 +3757,7 @@ export const de_ListMonitorEvaluationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3854,10 +3784,9 @@ const de_ListMonitorEvaluationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3880,7 +3809,7 @@ export const de_ListMonitorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3904,10 +3833,9 @@ const de_ListMonitorsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3930,7 +3858,7 @@ export const de_ListPredictorBacktestExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3954,10 +3882,9 @@ const de_ListPredictorBacktestExportJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3980,7 +3907,7 @@ export const de_ListPredictorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4004,10 +3931,9 @@ const de_ListPredictorsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4025,12 +3951,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4054,10 +3980,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4080,7 +4005,7 @@ export const de_ListWhatIfAnalysesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4104,10 +4029,9 @@ const de_ListWhatIfAnalysesCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4130,7 +4054,7 @@ export const de_ListWhatIfForecastExportsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4154,10 +4078,9 @@ const de_ListWhatIfForecastExportsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4180,7 +4103,7 @@ export const de_ListWhatIfForecastsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4204,10 +4127,9 @@ const de_ListWhatIfForecastsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4227,7 +4149,7 @@ export const de_ResumeResourceCommand = async ( const response: ResumeResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4257,10 +4179,9 @@ const de_ResumeResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4280,7 +4201,7 @@ export const de_StopResourceCommand = async ( const response: StopResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4307,10 +4228,9 @@ const de_StopResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4328,12 +4248,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4360,10 +4280,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4381,12 +4300,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4410,10 +4329,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4431,12 +4349,12 @@ export const de_UpdateDatasetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDatasetGroupResponse(data, context); + contents = _json(data); const response: UpdateDatasetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4463,10 +4381,9 @@ const de_UpdateDatasetGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4480,7 +4397,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4496,7 +4413,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4512,7 +4429,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4528,7 +4445,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4544,7 +4461,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4560,7 +4477,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4572,110 +4489,39 @@ const de_ResourceNotFoundExceptionRes = async ( * serializeAws_json1_1Action */ const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + AttributeName: [], + Operation: [], + Value: __serializeFloat, + }); }; -/** - * serializeAws_json1_1AdditionalDataset - */ -const se_AdditionalDataset = (input: AdditionalDataset, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: se_Configuration(input.Configuration, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_AdditionalDataset omitted. -/** - * serializeAws_json1_1AdditionalDatasets - */ -const se_AdditionalDatasets = (input: AdditionalDataset[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdditionalDataset(entry, context); - }); -}; +// se_AdditionalDatasets omitted. -/** - * serializeAws_json1_1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArnList omitted. -/** - * serializeAws_json1_1AttributeConfig - */ -const se_AttributeConfig = (input: AttributeConfig, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Transformations != null && { Transformations: se_Transformations(input.Transformations, context) }), - }; -}; +// se_AttributeConfig omitted. -/** - * serializeAws_json1_1AttributeConfigs - */ -const se_AttributeConfigs = (input: AttributeConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttributeConfig(entry, context); - }); -}; +// se_AttributeConfigs omitted. -/** - * serializeAws_json1_1CategoricalParameterRange - */ -const se_CategoricalParameterRange = (input: CategoricalParameterRange, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_Values(input.Values, context) }), - }; -}; +// se_CategoricalParameterRange omitted. -/** - * serializeAws_json1_1CategoricalParameterRanges - */ -const se_CategoricalParameterRanges = (input: CategoricalParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CategoricalParameterRange(entry, context); - }); -}; +// se_CategoricalParameterRanges omitted. -/** - * serializeAws_json1_1Configuration - */ -const se_Configuration = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Values(value, context); - return acc; - }, {}); -}; +// se_Configuration omitted. /** * serializeAws_json1_1ContinuousParameterRange */ const se_ContinuousParameterRange = (input: ContinuousParameterRange, context: __SerdeContext): any => { - return { - ...(input.MaxValue != null && { MaxValue: __serializeFloat(input.MaxValue) }), - ...(input.MinValue != null && { MinValue: __serializeFloat(input.MinValue) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ScalingType != null && { ScalingType: input.ScalingType }), - }; + return take(input, { + MaxValue: __serializeFloat, + MinValue: __serializeFloat, + Name: [], + ScalingType: [], + }); }; /** @@ -4689,1319 +4535,321 @@ const se_ContinuousParameterRanges = (input: ContinuousParameterRange[], context }); }; -/** - * serializeAws_json1_1CreateAutoPredictorRequest - */ -const se_CreateAutoPredictorRequest = (input: CreateAutoPredictorRequest, context: __SerdeContext): any => { - return { - ...(input.DataConfig != null && { DataConfig: se_DataConfig(input.DataConfig, context) }), - ...(input.EncryptionConfig != null && { EncryptionConfig: se_EncryptionConfig(input.EncryptionConfig, context) }), - ...(input.ExplainPredictor != null && { ExplainPredictor: input.ExplainPredictor }), - ...(input.ForecastDimensions != null && { - ForecastDimensions: se_ForecastDimensions(input.ForecastDimensions, context), - }), - ...(input.ForecastFrequency != null && { ForecastFrequency: input.ForecastFrequency }), - ...(input.ForecastHorizon != null && { ForecastHorizon: input.ForecastHorizon }), - ...(input.ForecastTypes != null && { ForecastTypes: se_ForecastTypes(input.ForecastTypes, context) }), - ...(input.MonitorConfig != null && { MonitorConfig: se_MonitorConfig(input.MonitorConfig, context) }), - ...(input.OptimizationMetric != null && { OptimizationMetric: input.OptimizationMetric }), - ...(input.PredictorName != null && { PredictorName: input.PredictorName }), - ...(input.ReferencePredictorArn != null && { ReferencePredictorArn: input.ReferencePredictorArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TimeAlignmentBoundary != null && { - TimeAlignmentBoundary: se_TimeAlignmentBoundary(input.TimeAlignmentBoundary, context), - }), - }; -}; - -/** - * serializeAws_json1_1CreateDatasetGroupRequest - */ -const se_CreateDatasetGroupRequest = (input: CreateDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArns != null && { DatasetArns: se_ArnList(input.DatasetArns, context) }), - ...(input.DatasetGroupName != null && { DatasetGroupName: input.DatasetGroupName }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateAutoPredictorRequest omitted. -/** - * serializeAws_json1_1CreateDatasetImportJobRequest - */ -const se_CreateDatasetImportJobRequest = (input: CreateDatasetImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - ...(input.DatasetImportJobName != null && { DatasetImportJobName: input.DatasetImportJobName }), - ...(input.Format != null && { Format: input.Format }), - ...(input.GeolocationFormat != null && { GeolocationFormat: input.GeolocationFormat }), - ...(input.ImportMode != null && { ImportMode: input.ImportMode }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TimeZone != null && { TimeZone: input.TimeZone }), - ...(input.TimestampFormat != null && { TimestampFormat: input.TimestampFormat }), - ...(input.UseGeolocationForTimeZone != null && { UseGeolocationForTimeZone: input.UseGeolocationForTimeZone }), - }; -}; +// se_CreateDatasetGroupRequest omitted. -/** - * serializeAws_json1_1CreateDatasetRequest - */ -const se_CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DataFrequency != null && { DataFrequency: input.DataFrequency }), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.DatasetType != null && { DatasetType: input.DatasetType }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.EncryptionConfig != null && { EncryptionConfig: se_EncryptionConfig(input.EncryptionConfig, context) }), - ...(input.Schema != null && { Schema: se_Schema(input.Schema, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateDatasetImportJobRequest omitted. -/** - * serializeAws_json1_1CreateExplainabilityExportRequest - */ -const se_CreateExplainabilityExportRequest = ( - input: CreateExplainabilityExportRequest, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: se_DataDestination(input.Destination, context) }), - ...(input.ExplainabilityArn != null && { ExplainabilityArn: input.ExplainabilityArn }), - ...(input.ExplainabilityExportName != null && { ExplainabilityExportName: input.ExplainabilityExportName }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateDatasetRequest omitted. -/** - * serializeAws_json1_1CreateExplainabilityRequest - */ -const se_CreateExplainabilityRequest = (input: CreateExplainabilityRequest, context: __SerdeContext): any => { - return { - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.EnableVisualization != null && { EnableVisualization: input.EnableVisualization }), - ...(input.EndDateTime != null && { EndDateTime: input.EndDateTime }), - ...(input.ExplainabilityConfig != null && { - ExplainabilityConfig: se_ExplainabilityConfig(input.ExplainabilityConfig, context), - }), - ...(input.ExplainabilityName != null && { ExplainabilityName: input.ExplainabilityName }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Schema != null && { Schema: se_Schema(input.Schema, context) }), - ...(input.StartDateTime != null && { StartDateTime: input.StartDateTime }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateExplainabilityExportRequest omitted. -/** - * serializeAws_json1_1CreateForecastExportJobRequest - */ -const se_CreateForecastExportJobRequest = (input: CreateForecastExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: se_DataDestination(input.Destination, context) }), - ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }), - ...(input.ForecastExportJobName != null && { ForecastExportJobName: input.ForecastExportJobName }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateExplainabilityRequest omitted. -/** - * serializeAws_json1_1CreateForecastRequest - */ -const se_CreateForecastRequest = (input: CreateForecastRequest, context: __SerdeContext): any => { - return { - ...(input.ForecastName != null && { ForecastName: input.ForecastName }), - ...(input.ForecastTypes != null && { ForecastTypes: se_ForecastTypes(input.ForecastTypes, context) }), - ...(input.PredictorArn != null && { PredictorArn: input.PredictorArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TimeSeriesSelector != null && { - TimeSeriesSelector: se_TimeSeriesSelector(input.TimeSeriesSelector, context), - }), - }; -}; +// se_CreateForecastExportJobRequest omitted. -/** - * serializeAws_json1_1CreateMonitorRequest - */ -const se_CreateMonitorRequest = (input: CreateMonitorRequest, context: __SerdeContext): any => { - return { - ...(input.MonitorName != null && { MonitorName: input.MonitorName }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateForecastRequest omitted. -/** - * serializeAws_json1_1CreatePredictorBacktestExportJobRequest - */ -const se_CreatePredictorBacktestExportJobRequest = ( - input: CreatePredictorBacktestExportJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: se_DataDestination(input.Destination, context) }), - ...(input.Format != null && { Format: input.Format }), - ...(input.PredictorArn != null && { PredictorArn: input.PredictorArn }), - ...(input.PredictorBacktestExportJobName != null && { - PredictorBacktestExportJobName: input.PredictorBacktestExportJobName, - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateMonitorRequest omitted. + +// se_CreatePredictorBacktestExportJobRequest omitted. /** * serializeAws_json1_1CreatePredictorRequest */ const se_CreatePredictorRequest = (input: CreatePredictorRequest, context: __SerdeContext): any => { - return { - ...(input.AlgorithmArn != null && { AlgorithmArn: input.AlgorithmArn }), - ...(input.AutoMLOverrideStrategy != null && { AutoMLOverrideStrategy: input.AutoMLOverrideStrategy }), - ...(input.EncryptionConfig != null && { EncryptionConfig: se_EncryptionConfig(input.EncryptionConfig, context) }), - ...(input.EvaluationParameters != null && { - EvaluationParameters: se_EvaluationParameters(input.EvaluationParameters, context), - }), - ...(input.FeaturizationConfig != null && { - FeaturizationConfig: se_FeaturizationConfig(input.FeaturizationConfig, context), - }), - ...(input.ForecastHorizon != null && { ForecastHorizon: input.ForecastHorizon }), - ...(input.ForecastTypes != null && { ForecastTypes: se_ForecastTypes(input.ForecastTypes, context) }), - ...(input.HPOConfig != null && { HPOConfig: se_HyperParameterTuningJobConfig(input.HPOConfig, context) }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.OptimizationMetric != null && { OptimizationMetric: input.OptimizationMetric }), - ...(input.PerformAutoML != null && { PerformAutoML: input.PerformAutoML }), - ...(input.PerformHPO != null && { PerformHPO: input.PerformHPO }), - ...(input.PredictorName != null && { PredictorName: input.PredictorName }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TrainingParameters != null && { - TrainingParameters: se_TrainingParameters(input.TrainingParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1CreateWhatIfAnalysisRequest - */ -const se_CreateWhatIfAnalysisRequest = (input: CreateWhatIfAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TimeSeriesSelector != null && { - TimeSeriesSelector: se_TimeSeriesSelector(input.TimeSeriesSelector, context), - }), - ...(input.WhatIfAnalysisName != null && { WhatIfAnalysisName: input.WhatIfAnalysisName }), - }; + return take(input, { + AlgorithmArn: [], + AutoMLOverrideStrategy: [], + EncryptionConfig: _json, + EvaluationParameters: _json, + FeaturizationConfig: _json, + ForecastHorizon: [], + ForecastTypes: _json, + HPOConfig: (_) => se_HyperParameterTuningJobConfig(_, context), + InputDataConfig: _json, + OptimizationMetric: [], + PerformAutoML: [], + PerformHPO: [], + PredictorName: [], + Tags: _json, + TrainingParameters: _json, + }); }; -/** - * serializeAws_json1_1CreateWhatIfForecastExportRequest - */ -const se_CreateWhatIfForecastExportRequest = ( - input: CreateWhatIfForecastExportRequest, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: se_DataDestination(input.Destination, context) }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.WhatIfForecastArns != null && { - WhatIfForecastArns: se_WhatIfForecastArnListForExport(input.WhatIfForecastArns, context), - }), - ...(input.WhatIfForecastExportName != null && { WhatIfForecastExportName: input.WhatIfForecastExportName }), - }; -}; +// se_CreateWhatIfAnalysisRequest omitted. + +// se_CreateWhatIfForecastExportRequest omitted. /** * serializeAws_json1_1CreateWhatIfForecastRequest */ const se_CreateWhatIfForecastRequest = (input: CreateWhatIfForecastRequest, context: __SerdeContext): any => { - return { - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TimeSeriesReplacementsDataSource != null && { - TimeSeriesReplacementsDataSource: se_TimeSeriesReplacementsDataSource( - input.TimeSeriesReplacementsDataSource, - context - ), - }), - ...(input.TimeSeriesTransformations != null && { - TimeSeriesTransformations: se_TimeSeriesTransformations(input.TimeSeriesTransformations, context), - }), - ...(input.WhatIfAnalysisArn != null && { WhatIfAnalysisArn: input.WhatIfAnalysisArn }), - ...(input.WhatIfForecastName != null && { WhatIfForecastName: input.WhatIfForecastName }), - }; + return take(input, { + Tags: _json, + TimeSeriesReplacementsDataSource: _json, + TimeSeriesTransformations: (_) => se_TimeSeriesTransformations(_, context), + WhatIfAnalysisArn: [], + WhatIfForecastName: [], + }); }; -/** - * serializeAws_json1_1DataConfig - */ -const se_DataConfig = (input: DataConfig, context: __SerdeContext): any => { - return { - ...(input.AdditionalDatasets != null && { - AdditionalDatasets: se_AdditionalDatasets(input.AdditionalDatasets, context), - }), - ...(input.AttributeConfigs != null && { AttributeConfigs: se_AttributeConfigs(input.AttributeConfigs, context) }), - ...(input.DatasetGroupArn != null && { DatasetGroupArn: input.DatasetGroupArn }), - }; -}; +// se_DataConfig omitted. -/** - * serializeAws_json1_1DataDestination - */ -const se_DataDestination = (input: DataDestination, context: __SerdeContext): any => { - return { - ...(input.S3Config != null && { S3Config: se_S3Config(input.S3Config, context) }), - }; -}; +// se_DataDestination omitted. -/** - * serializeAws_json1_1DataSource - */ -const se_DataSource = (input: DataSource, context: __SerdeContext): any => { - return { - ...(input.S3Config != null && { S3Config: se_S3Config(input.S3Config, context) }), - }; -}; +// se_DataSource omitted. -/** - * serializeAws_json1_1DeleteDatasetGroupRequest - */ -const se_DeleteDatasetGroupRequest = (input: DeleteDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetGroupArn != null && { DatasetGroupArn: input.DatasetGroupArn }), - }; -}; +// se_DeleteDatasetGroupRequest omitted. -/** - * serializeAws_json1_1DeleteDatasetImportJobRequest - */ -const se_DeleteDatasetImportJobRequest = (input: DeleteDatasetImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetImportJobArn != null && { DatasetImportJobArn: input.DatasetImportJobArn }), - }; -}; +// se_DeleteDatasetImportJobRequest omitted. -/** - * serializeAws_json1_1DeleteDatasetRequest - */ -const se_DeleteDatasetRequest = (input: DeleteDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - }; -}; +// se_DeleteDatasetRequest omitted. -/** - * serializeAws_json1_1DeleteExplainabilityExportRequest - */ -const se_DeleteExplainabilityExportRequest = ( - input: DeleteExplainabilityExportRequest, - context: __SerdeContext -): any => { - return { - ...(input.ExplainabilityExportArn != null && { ExplainabilityExportArn: input.ExplainabilityExportArn }), - }; -}; +// se_DeleteExplainabilityExportRequest omitted. -/** - * serializeAws_json1_1DeleteExplainabilityRequest - */ -const se_DeleteExplainabilityRequest = (input: DeleteExplainabilityRequest, context: __SerdeContext): any => { - return { - ...(input.ExplainabilityArn != null && { ExplainabilityArn: input.ExplainabilityArn }), - }; -}; +// se_DeleteExplainabilityRequest omitted. -/** - * serializeAws_json1_1DeleteForecastExportJobRequest - */ -const se_DeleteForecastExportJobRequest = (input: DeleteForecastExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.ForecastExportJobArn != null && { ForecastExportJobArn: input.ForecastExportJobArn }), - }; -}; +// se_DeleteForecastExportJobRequest omitted. -/** - * serializeAws_json1_1DeleteForecastRequest - */ -const se_DeleteForecastRequest = (input: DeleteForecastRequest, context: __SerdeContext): any => { - return { - ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }), - }; -}; +// se_DeleteForecastRequest omitted. -/** - * serializeAws_json1_1DeleteMonitorRequest - */ -const se_DeleteMonitorRequest = (input: DeleteMonitorRequest, context: __SerdeContext): any => { - return { - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - }; -}; +// se_DeleteMonitorRequest omitted. -/** - * serializeAws_json1_1DeletePredictorBacktestExportJobRequest - */ -const se_DeletePredictorBacktestExportJobRequest = ( - input: DeletePredictorBacktestExportJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.PredictorBacktestExportJobArn != null && { - PredictorBacktestExportJobArn: input.PredictorBacktestExportJobArn, - }), - }; -}; +// se_DeletePredictorBacktestExportJobRequest omitted. -/** - * serializeAws_json1_1DeletePredictorRequest - */ -const se_DeletePredictorRequest = (input: DeletePredictorRequest, context: __SerdeContext): any => { - return { - ...(input.PredictorArn != null && { PredictorArn: input.PredictorArn }), - }; -}; +// se_DeletePredictorRequest omitted. -/** - * serializeAws_json1_1DeleteResourceTreeRequest - */ -const se_DeleteResourceTreeRequest = (input: DeleteResourceTreeRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeleteResourceTreeRequest omitted. -/** - * serializeAws_json1_1DeleteWhatIfAnalysisRequest - */ -const se_DeleteWhatIfAnalysisRequest = (input: DeleteWhatIfAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.WhatIfAnalysisArn != null && { WhatIfAnalysisArn: input.WhatIfAnalysisArn }), - }; -}; +// se_DeleteWhatIfAnalysisRequest omitted. -/** - * serializeAws_json1_1DeleteWhatIfForecastExportRequest - */ -const se_DeleteWhatIfForecastExportRequest = ( - input: DeleteWhatIfForecastExportRequest, - context: __SerdeContext -): any => { - return { - ...(input.WhatIfForecastExportArn != null && { WhatIfForecastExportArn: input.WhatIfForecastExportArn }), - }; -}; +// se_DeleteWhatIfForecastExportRequest omitted. -/** - * serializeAws_json1_1DeleteWhatIfForecastRequest - */ -const se_DeleteWhatIfForecastRequest = (input: DeleteWhatIfForecastRequest, context: __SerdeContext): any => { - return { - ...(input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }), - }; -}; +// se_DeleteWhatIfForecastRequest omitted. -/** - * serializeAws_json1_1DescribeAutoPredictorRequest - */ -const se_DescribeAutoPredictorRequest = (input: DescribeAutoPredictorRequest, context: __SerdeContext): any => { - return { - ...(input.PredictorArn != null && { PredictorArn: input.PredictorArn }), - }; -}; +// se_DescribeAutoPredictorRequest omitted. -/** - * serializeAws_json1_1DescribeDatasetGroupRequest - */ -const se_DescribeDatasetGroupRequest = (input: DescribeDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetGroupArn != null && { DatasetGroupArn: input.DatasetGroupArn }), - }; -}; +// se_DescribeDatasetGroupRequest omitted. -/** - * serializeAws_json1_1DescribeDatasetImportJobRequest - */ -const se_DescribeDatasetImportJobRequest = (input: DescribeDatasetImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetImportJobArn != null && { DatasetImportJobArn: input.DatasetImportJobArn }), - }; -}; +// se_DescribeDatasetImportJobRequest omitted. -/** - * serializeAws_json1_1DescribeDatasetRequest - */ -const se_DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - }; -}; +// se_DescribeDatasetRequest omitted. -/** - * serializeAws_json1_1DescribeExplainabilityExportRequest - */ -const se_DescribeExplainabilityExportRequest = ( - input: DescribeExplainabilityExportRequest, - context: __SerdeContext -): any => { - return { - ...(input.ExplainabilityExportArn != null && { ExplainabilityExportArn: input.ExplainabilityExportArn }), - }; -}; +// se_DescribeExplainabilityExportRequest omitted. -/** - * serializeAws_json1_1DescribeExplainabilityRequest - */ -const se_DescribeExplainabilityRequest = (input: DescribeExplainabilityRequest, context: __SerdeContext): any => { - return { - ...(input.ExplainabilityArn != null && { ExplainabilityArn: input.ExplainabilityArn }), - }; -}; +// se_DescribeExplainabilityRequest omitted. -/** - * serializeAws_json1_1DescribeForecastExportJobRequest - */ -const se_DescribeForecastExportJobRequest = (input: DescribeForecastExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.ForecastExportJobArn != null && { ForecastExportJobArn: input.ForecastExportJobArn }), - }; -}; +// se_DescribeForecastExportJobRequest omitted. -/** - * serializeAws_json1_1DescribeForecastRequest - */ -const se_DescribeForecastRequest = (input: DescribeForecastRequest, context: __SerdeContext): any => { - return { - ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }), - }; -}; +// se_DescribeForecastRequest omitted. -/** - * serializeAws_json1_1DescribeMonitorRequest - */ -const se_DescribeMonitorRequest = (input: DescribeMonitorRequest, context: __SerdeContext): any => { - return { - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - }; -}; +// se_DescribeMonitorRequest omitted. -/** - * serializeAws_json1_1DescribePredictorBacktestExportJobRequest - */ -const se_DescribePredictorBacktestExportJobRequest = ( - input: DescribePredictorBacktestExportJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.PredictorBacktestExportJobArn != null && { - PredictorBacktestExportJobArn: input.PredictorBacktestExportJobArn, - }), - }; -}; +// se_DescribePredictorBacktestExportJobRequest omitted. -/** - * serializeAws_json1_1DescribePredictorRequest - */ -const se_DescribePredictorRequest = (input: DescribePredictorRequest, context: __SerdeContext): any => { - return { - ...(input.PredictorArn != null && { PredictorArn: input.PredictorArn }), - }; -}; +// se_DescribePredictorRequest omitted. -/** - * serializeAws_json1_1DescribeWhatIfAnalysisRequest - */ -const se_DescribeWhatIfAnalysisRequest = (input: DescribeWhatIfAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.WhatIfAnalysisArn != null && { WhatIfAnalysisArn: input.WhatIfAnalysisArn }), - }; -}; +// se_DescribeWhatIfAnalysisRequest omitted. -/** - * serializeAws_json1_1DescribeWhatIfForecastExportRequest - */ -const se_DescribeWhatIfForecastExportRequest = ( - input: DescribeWhatIfForecastExportRequest, - context: __SerdeContext -): any => { - return { - ...(input.WhatIfForecastExportArn != null && { WhatIfForecastExportArn: input.WhatIfForecastExportArn }), - }; -}; +// se_DescribeWhatIfForecastExportRequest omitted. -/** - * serializeAws_json1_1DescribeWhatIfForecastRequest - */ -const se_DescribeWhatIfForecastRequest = (input: DescribeWhatIfForecastRequest, context: __SerdeContext): any => { - return { - ...(input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }), - }; -}; +// se_DescribeWhatIfForecastRequest omitted. -/** - * serializeAws_json1_1EncryptionConfig - */ -const se_EncryptionConfig = (input: EncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.KMSKeyArn != null && { KMSKeyArn: input.KMSKeyArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_EncryptionConfig omitted. -/** - * serializeAws_json1_1EvaluationParameters - */ -const se_EvaluationParameters = (input: EvaluationParameters, context: __SerdeContext): any => { - return { - ...(input.BackTestWindowOffset != null && { BackTestWindowOffset: input.BackTestWindowOffset }), - ...(input.NumberOfBacktestWindows != null && { NumberOfBacktestWindows: input.NumberOfBacktestWindows }), - }; -}; +// se_EvaluationParameters omitted. -/** - * serializeAws_json1_1ExplainabilityConfig - */ -const se_ExplainabilityConfig = (input: ExplainabilityConfig, context: __SerdeContext): any => { - return { - ...(input.TimePointGranularity != null && { TimePointGranularity: input.TimePointGranularity }), - ...(input.TimeSeriesGranularity != null && { TimeSeriesGranularity: input.TimeSeriesGranularity }), - }; -}; +// se_ExplainabilityConfig omitted. -/** - * serializeAws_json1_1Featurization - */ -const se_Featurization = (input: Featurization, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.FeaturizationPipeline != null && { - FeaturizationPipeline: se_FeaturizationPipeline(input.FeaturizationPipeline, context), - }), - }; -}; +// se_Featurization omitted. -/** - * serializeAws_json1_1FeaturizationConfig - */ -const se_FeaturizationConfig = (input: FeaturizationConfig, context: __SerdeContext): any => { - return { - ...(input.Featurizations != null && { Featurizations: se_Featurizations(input.Featurizations, context) }), - ...(input.ForecastDimensions != null && { - ForecastDimensions: se_ForecastDimensions(input.ForecastDimensions, context), - }), - ...(input.ForecastFrequency != null && { ForecastFrequency: input.ForecastFrequency }), - }; -}; +// se_FeaturizationConfig omitted. -/** - * serializeAws_json1_1FeaturizationMethod - */ -const se_FeaturizationMethod = (input: FeaturizationMethod, context: __SerdeContext): any => { - return { - ...(input.FeaturizationMethodName != null && { FeaturizationMethodName: input.FeaturizationMethodName }), - ...(input.FeaturizationMethodParameters != null && { - FeaturizationMethodParameters: se_FeaturizationMethodParameters(input.FeaturizationMethodParameters, context), - }), - }; -}; +// se_FeaturizationMethod omitted. -/** - * serializeAws_json1_1FeaturizationMethodParameters - */ -const se_FeaturizationMethodParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FeaturizationMethodParameters omitted. -/** - * serializeAws_json1_1FeaturizationPipeline - */ -const se_FeaturizationPipeline = (input: FeaturizationMethod[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FeaturizationMethod(entry, context); - }); -}; +// se_FeaturizationPipeline omitted. -/** - * serializeAws_json1_1Featurizations - */ -const se_Featurizations = (input: Featurization[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Featurization(entry, context); - }); -}; +// se_Featurizations omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1ForecastDimensions - */ -const se_ForecastDimensions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ForecastDimensions omitted. -/** - * serializeAws_json1_1ForecastTypes - */ -const se_ForecastTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ForecastTypes omitted. -/** - * serializeAws_json1_1GetAccuracyMetricsRequest - */ -const se_GetAccuracyMetricsRequest = (input: GetAccuracyMetricsRequest, context: __SerdeContext): any => { - return { - ...(input.PredictorArn != null && { PredictorArn: input.PredictorArn }), - }; -}; +// se_GetAccuracyMetricsRequest omitted. /** * serializeAws_json1_1HyperParameterTuningJobConfig */ const se_HyperParameterTuningJobConfig = (input: HyperParameterTuningJobConfig, context: __SerdeContext): any => { - return { - ...(input.ParameterRanges != null && { ParameterRanges: se_ParameterRanges(input.ParameterRanges, context) }), - }; + return take(input, { + ParameterRanges: (_) => se_ParameterRanges(_, context), + }); }; -/** - * serializeAws_json1_1InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return { - ...(input.DatasetGroupArn != null && { DatasetGroupArn: input.DatasetGroupArn }), - ...(input.SupplementaryFeatures != null && { - SupplementaryFeatures: se_SupplementaryFeatures(input.SupplementaryFeatures, context), - }), - }; -}; +// se_InputDataConfig omitted. -/** - * serializeAws_json1_1IntegerParameterRange - */ -const se_IntegerParameterRange = (input: IntegerParameterRange, context: __SerdeContext): any => { - return { - ...(input.MaxValue != null && { MaxValue: input.MaxValue }), - ...(input.MinValue != null && { MinValue: input.MinValue }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ScalingType != null && { ScalingType: input.ScalingType }), - }; -}; +// se_IntegerParameterRange omitted. -/** - * serializeAws_json1_1IntegerParameterRanges - */ -const se_IntegerParameterRanges = (input: IntegerParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IntegerParameterRange(entry, context); - }); -}; +// se_IntegerParameterRanges omitted. -/** - * serializeAws_json1_1ListDatasetGroupsRequest - */ -const se_ListDatasetGroupsRequest = (input: ListDatasetGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatasetGroupsRequest omitted. -/** - * serializeAws_json1_1ListDatasetImportJobsRequest - */ -const se_ListDatasetImportJobsRequest = (input: ListDatasetImportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatasetImportJobsRequest omitted. -/** - * serializeAws_json1_1ListDatasetsRequest - */ -const se_ListDatasetsRequest = (input: ListDatasetsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatasetsRequest omitted. -/** - * serializeAws_json1_1ListExplainabilitiesRequest - */ -const se_ListExplainabilitiesRequest = (input: ListExplainabilitiesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListExplainabilitiesRequest omitted. -/** - * serializeAws_json1_1ListExplainabilityExportsRequest - */ -const se_ListExplainabilityExportsRequest = (input: ListExplainabilityExportsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListExplainabilityExportsRequest omitted. -/** - * serializeAws_json1_1ListForecastExportJobsRequest - */ -const se_ListForecastExportJobsRequest = (input: ListForecastExportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListForecastExportJobsRequest omitted. -/** - * serializeAws_json1_1ListForecastsRequest - */ -const se_ListForecastsRequest = (input: ListForecastsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListForecastsRequest omitted. -/** - * serializeAws_json1_1ListMonitorEvaluationsRequest - */ -const se_ListMonitorEvaluationsRequest = (input: ListMonitorEvaluationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitorArn != null && { MonitorArn: input.MonitorArn }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListMonitorEvaluationsRequest omitted. -/** - * serializeAws_json1_1ListMonitorsRequest - */ -const se_ListMonitorsRequest = (input: ListMonitorsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListMonitorsRequest omitted. -/** - * serializeAws_json1_1ListPredictorBacktestExportJobsRequest - */ -const se_ListPredictorBacktestExportJobsRequest = ( - input: ListPredictorBacktestExportJobsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPredictorBacktestExportJobsRequest omitted. -/** - * serializeAws_json1_1ListPredictorsRequest - */ -const se_ListPredictorsRequest = (input: ListPredictorsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPredictorsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListWhatIfAnalysesRequest - */ -const se_ListWhatIfAnalysesRequest = (input: ListWhatIfAnalysesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWhatIfAnalysesRequest omitted. -/** - * serializeAws_json1_1ListWhatIfForecastExportsRequest - */ -const se_ListWhatIfForecastExportsRequest = (input: ListWhatIfForecastExportsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWhatIfForecastExportsRequest omitted. -/** - * serializeAws_json1_1ListWhatIfForecastsRequest - */ -const se_ListWhatIfForecastsRequest = (input: ListWhatIfForecastsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWhatIfForecastsRequest omitted. -/** - * serializeAws_json1_1MonitorConfig - */ -const se_MonitorConfig = (input: MonitorConfig, context: __SerdeContext): any => { - return { - ...(input.MonitorName != null && { MonitorName: input.MonitorName }), - }; -}; +// se_MonitorConfig omitted. /** * serializeAws_json1_1ParameterRanges */ const se_ParameterRanges = (input: ParameterRanges, context: __SerdeContext): any => { - return { - ...(input.CategoricalParameterRanges != null && { - CategoricalParameterRanges: se_CategoricalParameterRanges(input.CategoricalParameterRanges, context), - }), - ...(input.ContinuousParameterRanges != null && { - ContinuousParameterRanges: se_ContinuousParameterRanges(input.ContinuousParameterRanges, context), - }), - ...(input.IntegerParameterRanges != null && { - IntegerParameterRanges: se_IntegerParameterRanges(input.IntegerParameterRanges, context), - }), - }; + return take(input, { + CategoricalParameterRanges: _json, + ContinuousParameterRanges: (_) => se_ContinuousParameterRanges(_, context), + IntegerParameterRanges: _json, + }); }; -/** - * serializeAws_json1_1ResumeResourceRequest - */ -const se_ResumeResourceRequest = (input: ResumeResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ResumeResourceRequest omitted. -/** - * serializeAws_json1_1S3Config - */ -const se_S3Config = (input: S3Config, context: __SerdeContext): any => { - return { - ...(input.KMSKeyArn != null && { KMSKeyArn: input.KMSKeyArn }), - ...(input.Path != null && { Path: input.Path }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_S3Config omitted. -/** - * serializeAws_json1_1Schema - */ -const se_Schema = (input: Schema, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_SchemaAttributes(input.Attributes, context) }), - }; -}; +// se_Schema omitted. -/** - * serializeAws_json1_1SchemaAttribute - */ -const se_SchemaAttribute = (input: SchemaAttribute, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.AttributeType != null && { AttributeType: input.AttributeType }), - }; -}; +// se_SchemaAttribute omitted. -/** - * serializeAws_json1_1SchemaAttributes - */ -const se_SchemaAttributes = (input: SchemaAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SchemaAttribute(entry, context); - }); -}; +// se_SchemaAttributes omitted. -/** - * serializeAws_json1_1StopResourceRequest - */ -const se_StopResourceRequest = (input: StopResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_StopResourceRequest omitted. -/** - * serializeAws_json1_1SupplementaryFeature - */ -const se_SupplementaryFeature = (input: SupplementaryFeature, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_SupplementaryFeature omitted. -/** - * serializeAws_json1_1SupplementaryFeatures - */ -const se_SupplementaryFeatures = (input: SupplementaryFeature[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SupplementaryFeature(entry, context); - }); -}; +// se_SupplementaryFeatures omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1TimeAlignmentBoundary - */ -const se_TimeAlignmentBoundary = (input: TimeAlignmentBoundary, context: __SerdeContext): any => { - return { - ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }), - ...(input.DayOfWeek != null && { DayOfWeek: input.DayOfWeek }), - ...(input.Hour != null && { Hour: input.Hour }), - ...(input.Month != null && { Month: input.Month }), - }; -}; +// se_TimeAlignmentBoundary omitted. -/** - * serializeAws_json1_1TimeSeriesCondition - */ -const se_TimeSeriesCondition = (input: TimeSeriesCondition, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.AttributeValue != null && { AttributeValue: input.AttributeValue }), - ...(input.Condition != null && { Condition: input.Condition }), - }; -}; +// se_TimeSeriesCondition omitted. -/** - * serializeAws_json1_1TimeSeriesConditions - */ -const se_TimeSeriesConditions = (input: TimeSeriesCondition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TimeSeriesCondition(entry, context); - }); -}; +// se_TimeSeriesConditions omitted. -/** - * serializeAws_json1_1TimeSeriesIdentifiers - */ -const se_TimeSeriesIdentifiers = (input: TimeSeriesIdentifiers, context: __SerdeContext): any => { - return { - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Schema != null && { Schema: se_Schema(input.Schema, context) }), - }; -}; - -/** - * serializeAws_json1_1TimeSeriesReplacementsDataSource - */ -const se_TimeSeriesReplacementsDataSource = (input: TimeSeriesReplacementsDataSource, context: __SerdeContext): any => { - return { - ...(input.Format != null && { Format: input.Format }), - ...(input.S3Config != null && { S3Config: se_S3Config(input.S3Config, context) }), - ...(input.Schema != null && { Schema: se_Schema(input.Schema, context) }), - ...(input.TimestampFormat != null && { TimestampFormat: input.TimestampFormat }), - }; -}; - -/** - * serializeAws_json1_1TimeSeriesSelector - */ -const se_TimeSeriesSelector = (input: TimeSeriesSelector, context: __SerdeContext): any => { - return { - ...(input.TimeSeriesIdentifiers != null && { - TimeSeriesIdentifiers: se_TimeSeriesIdentifiers(input.TimeSeriesIdentifiers, context), - }), - }; -}; - -/** - * serializeAws_json1_1TimeSeriesTransformation - */ -const se_TimeSeriesTransformation = (input: TimeSeriesTransformation, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_Action(input.Action, context) }), - ...(input.TimeSeriesConditions != null && { - TimeSeriesConditions: se_TimeSeriesConditions(input.TimeSeriesConditions, context), - }), - }; -}; - -/** - * serializeAws_json1_1TimeSeriesTransformations - */ -const se_TimeSeriesTransformations = (input: TimeSeriesTransformation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TimeSeriesTransformation(entry, context); - }); -}; - -/** - * serializeAws_json1_1TrainingParameters - */ -const se_TrainingParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TimeSeriesIdentifiers omitted. -/** - * serializeAws_json1_1Transformations - */ -const se_Transformations = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TimeSeriesReplacementsDataSource omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_TimeSeriesSelector omitted. /** - * serializeAws_json1_1UpdateDatasetGroupRequest + * serializeAws_json1_1TimeSeriesTransformation */ -const se_UpdateDatasetGroupRequest = (input: UpdateDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArns != null && { DatasetArns: se_ArnList(input.DatasetArns, context) }), - ...(input.DatasetGroupArn != null && { DatasetGroupArn: input.DatasetGroupArn }), - }; +const se_TimeSeriesTransformation = (input: TimeSeriesTransformation, context: __SerdeContext): any => { + return take(input, { + Action: (_) => se_Action(_, context), + TimeSeriesConditions: _json, + }); }; /** - * serializeAws_json1_1Values + * serializeAws_json1_1TimeSeriesTransformations */ -const se_Values = (input: string[], context: __SerdeContext): any => { +const se_TimeSeriesTransformations = (input: TimeSeriesTransformation[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_TimeSeriesTransformation(entry, context); }); }; -/** - * serializeAws_json1_1WhatIfForecastArnListForExport - */ -const se_WhatIfForecastArnListForExport = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TrainingParameters omitted. + +// se_Transformations omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateDatasetGroupRequest omitted. + +// se_Values omitted. + +// se_WhatIfForecastArnListForExport omitted. /** * deserializeAws_json1_1Action */ const de_Action = (output: any, context: __SerdeContext): Action => { - return { - AttributeName: __expectString(output.AttributeName), - Operation: __expectString(output.Operation), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + AttributeName: __expectString, + Operation: __expectString, + Value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1AdditionalDataset - */ -const de_AdditionalDataset = (output: any, context: __SerdeContext): AdditionalDataset => { - return { - Configuration: output.Configuration != null ? de_Configuration(output.Configuration, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_AdditionalDataset omitted. -/** - * deserializeAws_json1_1AdditionalDatasets - */ -const de_AdditionalDatasets = (output: any, context: __SerdeContext): AdditionalDataset[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalDataset(entry, context); - }); - return retVal; -}; +// de_AdditionalDatasets omitted. -/** - * deserializeAws_json1_1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArnList omitted. -/** - * deserializeAws_json1_1AttributeConfig - */ -const de_AttributeConfig = (output: any, context: __SerdeContext): AttributeConfig => { - return { - AttributeName: __expectString(output.AttributeName), - Transformations: output.Transformations != null ? de_Transformations(output.Transformations, context) : undefined, - } as any; -}; +// de_AttributeConfig omitted. -/** - * deserializeAws_json1_1AttributeConfigs - */ -const de_AttributeConfigs = (output: any, context: __SerdeContext): AttributeConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttributeConfig(entry, context); - }); - return retVal; -}; +// de_AttributeConfigs omitted. /** * deserializeAws_json1_1Baseline */ const de_Baseline = (output: any, context: __SerdeContext): Baseline => { - return { - PredictorBaseline: - output.PredictorBaseline != null ? de_PredictorBaseline(output.PredictorBaseline, context) : undefined, - } as any; + return take(output, { + PredictorBaseline: (_: any) => de_PredictorBaseline(_, context), + }) as any; }; /** * deserializeAws_json1_1BaselineMetric */ const de_BaselineMetric = (output: any, context: __SerdeContext): BaselineMetric => { - return { - Name: __expectString(output.Name), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Name: __expectString, + Value: __limitedParseDouble, + }) as any; }; /** @@ -6011,62 +4859,27 @@ const de_BaselineMetrics = (output: any, context: __SerdeContext): BaselineMetri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BaselineMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CategoricalParameterRange - */ -const de_CategoricalParameterRange = (output: any, context: __SerdeContext): CategoricalParameterRange => { - return { - Name: __expectString(output.Name), - Values: output.Values != null ? de_Values(output.Values, context) : undefined, - } as any; -}; +// de_CategoricalParameterRange omitted. -/** - * deserializeAws_json1_1CategoricalParameterRanges - */ -const de_CategoricalParameterRanges = (output: any, context: __SerdeContext): CategoricalParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CategoricalParameterRange(entry, context); - }); - return retVal; -}; +// de_CategoricalParameterRanges omitted. -/** - * deserializeAws_json1_1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Values(value, context); - return acc; - }, {}); -}; +// de_Configuration omitted. /** * deserializeAws_json1_1ContinuousParameterRange */ const de_ContinuousParameterRange = (output: any, context: __SerdeContext): ContinuousParameterRange => { - return { - MaxValue: __limitedParseDouble(output.MaxValue), - MinValue: __limitedParseDouble(output.MinValue), - Name: __expectString(output.Name), - ScalingType: __expectString(output.ScalingType), - } as any; + return take(output, { + MaxValue: __limitedParseDouble, + MinValue: __limitedParseDouble, + Name: __expectString, + ScalingType: __expectString, + }) as any; }; /** @@ -6076,170 +4889,42 @@ const de_ContinuousParameterRanges = (output: any, context: __SerdeContext): Con const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContinuousParameterRange(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CreateAutoPredictorResponse - */ -const de_CreateAutoPredictorResponse = (output: any, context: __SerdeContext): CreateAutoPredictorResponse => { - return { - PredictorArn: __expectString(output.PredictorArn), - } as any; -}; +// de_CreateAutoPredictorResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetGroupResponse - */ -const de_CreateDatasetGroupResponse = (output: any, context: __SerdeContext): CreateDatasetGroupResponse => { - return { - DatasetGroupArn: __expectString(output.DatasetGroupArn), - } as any; -}; +// de_CreateDatasetGroupResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetImportJobResponse - */ -const de_CreateDatasetImportJobResponse = (output: any, context: __SerdeContext): CreateDatasetImportJobResponse => { - return { - DatasetImportJobArn: __expectString(output.DatasetImportJobArn), - } as any; -}; +// de_CreateDatasetImportJobResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetResponse - */ -const de_CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => { - return { - DatasetArn: __expectString(output.DatasetArn), - } as any; -}; +// de_CreateDatasetResponse omitted. -/** - * deserializeAws_json1_1CreateExplainabilityExportResponse - */ -const de_CreateExplainabilityExportResponse = ( - output: any, - context: __SerdeContext -): CreateExplainabilityExportResponse => { - return { - ExplainabilityExportArn: __expectString(output.ExplainabilityExportArn), - } as any; -}; +// de_CreateExplainabilityExportResponse omitted. -/** - * deserializeAws_json1_1CreateExplainabilityResponse - */ -const de_CreateExplainabilityResponse = (output: any, context: __SerdeContext): CreateExplainabilityResponse => { - return { - ExplainabilityArn: __expectString(output.ExplainabilityArn), - } as any; -}; +// de_CreateExplainabilityResponse omitted. -/** - * deserializeAws_json1_1CreateForecastExportJobResponse - */ -const de_CreateForecastExportJobResponse = (output: any, context: __SerdeContext): CreateForecastExportJobResponse => { - return { - ForecastExportJobArn: __expectString(output.ForecastExportJobArn), - } as any; -}; +// de_CreateForecastExportJobResponse omitted. -/** - * deserializeAws_json1_1CreateForecastResponse - */ -const de_CreateForecastResponse = (output: any, context: __SerdeContext): CreateForecastResponse => { - return { - ForecastArn: __expectString(output.ForecastArn), - } as any; -}; +// de_CreateForecastResponse omitted. -/** - * deserializeAws_json1_1CreateMonitorResponse - */ -const de_CreateMonitorResponse = (output: any, context: __SerdeContext): CreateMonitorResponse => { - return { - MonitorArn: __expectString(output.MonitorArn), - } as any; -}; +// de_CreateMonitorResponse omitted. -/** - * deserializeAws_json1_1CreatePredictorBacktestExportJobResponse - */ -const de_CreatePredictorBacktestExportJobResponse = ( - output: any, - context: __SerdeContext -): CreatePredictorBacktestExportJobResponse => { - return { - PredictorBacktestExportJobArn: __expectString(output.PredictorBacktestExportJobArn), - } as any; -}; +// de_CreatePredictorBacktestExportJobResponse omitted. -/** - * deserializeAws_json1_1CreatePredictorResponse - */ -const de_CreatePredictorResponse = (output: any, context: __SerdeContext): CreatePredictorResponse => { - return { - PredictorArn: __expectString(output.PredictorArn), - } as any; -}; +// de_CreatePredictorResponse omitted. -/** - * deserializeAws_json1_1CreateWhatIfAnalysisResponse - */ -const de_CreateWhatIfAnalysisResponse = (output: any, context: __SerdeContext): CreateWhatIfAnalysisResponse => { - return { - WhatIfAnalysisArn: __expectString(output.WhatIfAnalysisArn), - } as any; -}; +// de_CreateWhatIfAnalysisResponse omitted. -/** - * deserializeAws_json1_1CreateWhatIfForecastExportResponse - */ -const de_CreateWhatIfForecastExportResponse = ( - output: any, - context: __SerdeContext -): CreateWhatIfForecastExportResponse => { - return { - WhatIfForecastExportArn: __expectString(output.WhatIfForecastExportArn), - } as any; -}; +// de_CreateWhatIfForecastExportResponse omitted. -/** - * deserializeAws_json1_1CreateWhatIfForecastResponse - */ -const de_CreateWhatIfForecastResponse = (output: any, context: __SerdeContext): CreateWhatIfForecastResponse => { - return { - WhatIfForecastArn: __expectString(output.WhatIfForecastArn), - } as any; -}; +// de_CreateWhatIfForecastResponse omitted. -/** - * deserializeAws_json1_1DataConfig - */ -const de_DataConfig = (output: any, context: __SerdeContext): DataConfig => { - return { - AdditionalDatasets: - output.AdditionalDatasets != null ? de_AdditionalDatasets(output.AdditionalDatasets, context) : undefined, - AttributeConfigs: - output.AttributeConfigs != null ? de_AttributeConfigs(output.AttributeConfigs, context) : undefined, - DatasetGroupArn: __expectString(output.DatasetGroupArn), - } as any; -}; +// de_DataConfig omitted. -/** - * deserializeAws_json1_1DataDestination - */ -const de_DataDestination = (output: any, context: __SerdeContext): DataDestination => { - return { - S3Config: output.S3Config != null ? de_S3Config(output.S3Config, context) : undefined, - } as any; -}; +// de_DataDestination omitted. /** * deserializeAws_json1_1DatasetGroups @@ -6248,9 +4933,6 @@ const de_DatasetGroups = (output: any, context: __SerdeContext): DatasetGroupSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetGroupSummary(entry, context); }); return retVal; @@ -6260,18 +4942,12 @@ const de_DatasetGroups = (output: any, context: __SerdeContext): DatasetGroupSum * deserializeAws_json1_1DatasetGroupSummary */ const de_DatasetGroupSummary = (output: any, context: __SerdeContext): DatasetGroupSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetGroupArn: __expectString(output.DatasetGroupArn), - DatasetGroupName: __expectString(output.DatasetGroupName), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetGroupArn: __expectString, + DatasetGroupName: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -6281,9 +4957,6 @@ const de_DatasetImportJobs = (output: any, context: __SerdeContext): DatasetImpo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetImportJobSummary(entry, context); }); return retVal; @@ -6293,22 +4966,16 @@ const de_DatasetImportJobs = (output: any, context: __SerdeContext): DatasetImpo * deserializeAws_json1_1DatasetImportJobSummary */ const de_DatasetImportJobSummary = (output: any, context: __SerdeContext): DatasetImportJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - DatasetImportJobArn: __expectString(output.DatasetImportJobArn), - DatasetImportJobName: __expectString(output.DatasetImportJobName), - ImportMode: __expectString(output.ImportMode), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSource: _json, + DatasetImportJobArn: __expectString, + DatasetImportJobName: __expectString, + ImportMode: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + }) as any; }; /** @@ -6318,9 +4985,6 @@ const de_Datasets = (output: any, context: __SerdeContext): DatasetSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetSummary(entry, context); }); return retVal; @@ -6330,93 +4994,58 @@ const de_Datasets = (output: any, context: __SerdeContext): DatasetSummary[] => * deserializeAws_json1_1DatasetSummary */ const de_DatasetSummary = (output: any, context: __SerdeContext): DatasetSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - DatasetType: __expectString(output.DatasetType), - Domain: __expectString(output.Domain), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + DatasetName: __expectString, + DatasetType: __expectString, + Domain: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - S3Config: output.S3Config != null ? de_S3Config(output.S3Config, context) : undefined, - } as any; -}; +// de_DataSource omitted. /** * deserializeAws_json1_1DescribeAutoPredictorResponse */ const de_DescribeAutoPredictorResponse = (output: any, context: __SerdeContext): DescribeAutoPredictorResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataConfig: output.DataConfig != null ? de_DataConfig(output.DataConfig, context) : undefined, - DatasetImportJobArns: - output.DatasetImportJobArns != null ? de_ArnList(output.DatasetImportJobArns, context) : undefined, - EncryptionConfig: - output.EncryptionConfig != null ? de_EncryptionConfig(output.EncryptionConfig, context) : undefined, - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - ExplainabilityInfo: - output.ExplainabilityInfo != null ? de_ExplainabilityInfo(output.ExplainabilityInfo, context) : undefined, - ForecastDimensions: - output.ForecastDimensions != null ? de_ForecastDimensions(output.ForecastDimensions, context) : undefined, - ForecastFrequency: __expectString(output.ForecastFrequency), - ForecastHorizon: __expectInt32(output.ForecastHorizon), - ForecastTypes: output.ForecastTypes != null ? de_ForecastTypes(output.ForecastTypes, context) : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - MonitorInfo: output.MonitorInfo != null ? de_MonitorInfo(output.MonitorInfo, context) : undefined, - OptimizationMetric: __expectString(output.OptimizationMetric), - PredictorArn: __expectString(output.PredictorArn), - PredictorName: __expectString(output.PredictorName), - ReferencePredictorSummary: - output.ReferencePredictorSummary != null - ? de_ReferencePredictorSummary(output.ReferencePredictorSummary, context) - : undefined, - Status: __expectString(output.Status), - TimeAlignmentBoundary: - output.TimeAlignmentBoundary != null - ? de_TimeAlignmentBoundary(output.TimeAlignmentBoundary, context) - : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataConfig: _json, + DatasetImportJobArns: _json, + EncryptionConfig: _json, + EstimatedTimeRemainingInMinutes: __expectLong, + ExplainabilityInfo: _json, + ForecastDimensions: _json, + ForecastFrequency: __expectString, + ForecastHorizon: __expectInt32, + ForecastTypes: _json, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + MonitorInfo: _json, + OptimizationMetric: __expectString, + PredictorArn: __expectString, + PredictorName: __expectString, + ReferencePredictorSummary: _json, + Status: __expectString, + TimeAlignmentBoundary: _json, + }) as any; }; /** * deserializeAws_json1_1DescribeDatasetGroupResponse */ const de_DescribeDatasetGroupResponse = (output: any, context: __SerdeContext): DescribeDatasetGroupResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetArns: output.DatasetArns != null ? de_ArnList(output.DatasetArns, context) : undefined, - DatasetGroupArn: __expectString(output.DatasetGroupArn), - DatasetGroupName: __expectString(output.DatasetGroupName), - Domain: __expectString(output.Domain), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArns: _json, + DatasetGroupArn: __expectString, + DatasetGroupName: __expectString, + Domain: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** @@ -6426,56 +5055,43 @@ const de_DescribeDatasetImportJobResponse = ( output: any, context: __SerdeContext ): DescribeDatasetImportJobResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataSize: __limitedParseDouble(output.DataSize), - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetImportJobArn: __expectString(output.DatasetImportJobArn), - DatasetImportJobName: __expectString(output.DatasetImportJobName), - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - FieldStatistics: output.FieldStatistics != null ? de_FieldStatistics(output.FieldStatistics, context) : undefined, - Format: __expectString(output.Format), - GeolocationFormat: __expectString(output.GeolocationFormat), - ImportMode: __expectString(output.ImportMode), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - TimeZone: __expectString(output.TimeZone), - TimestampFormat: __expectString(output.TimestampFormat), - UseGeolocationForTimeZone: __expectBoolean(output.UseGeolocationForTimeZone), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSize: __limitedParseDouble, + DataSource: _json, + DatasetArn: __expectString, + DatasetImportJobArn: __expectString, + DatasetImportJobName: __expectString, + EstimatedTimeRemainingInMinutes: __expectLong, + FieldStatistics: (_: any) => de_FieldStatistics(_, context), + Format: __expectString, + GeolocationFormat: __expectString, + ImportMode: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + TimeZone: __expectString, + TimestampFormat: __expectString, + UseGeolocationForTimeZone: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_1DescribeDatasetResponse */ const de_DescribeDatasetResponse = (output: any, context: __SerdeContext): DescribeDatasetResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataFrequency: __expectString(output.DataFrequency), - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - DatasetType: __expectString(output.DatasetType), - Domain: __expectString(output.Domain), - EncryptionConfig: - output.EncryptionConfig != null ? de_EncryptionConfig(output.EncryptionConfig, context) : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Schema: output.Schema != null ? de_Schema(output.Schema, context) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataFrequency: __expectString, + DatasetArn: __expectString, + DatasetName: __expectString, + DatasetType: __expectString, + Domain: __expectString, + EncryptionConfig: _json, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Schema: _json, + Status: __expectString, + }) as any; }; /** @@ -6485,52 +5101,39 @@ const de_DescribeExplainabilityExportResponse = ( output: any, context: __SerdeContext ): DescribeExplainabilityExportResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - ExplainabilityArn: __expectString(output.ExplainabilityArn), - ExplainabilityExportArn: __expectString(output.ExplainabilityExportArn), - ExplainabilityExportName: __expectString(output.ExplainabilityExportName), - Format: __expectString(output.Format), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + ExplainabilityArn: __expectString, + ExplainabilityExportArn: __expectString, + ExplainabilityExportName: __expectString, + Format: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeExplainabilityResponse */ const de_DescribeExplainabilityResponse = (output: any, context: __SerdeContext): DescribeExplainabilityResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - EnableVisualization: __expectBoolean(output.EnableVisualization), - EndDateTime: __expectString(output.EndDateTime), - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - ExplainabilityArn: __expectString(output.ExplainabilityArn), - ExplainabilityConfig: - output.ExplainabilityConfig != null ? de_ExplainabilityConfig(output.ExplainabilityConfig, context) : undefined, - ExplainabilityName: __expectString(output.ExplainabilityName), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - ResourceArn: __expectString(output.ResourceArn), - Schema: output.Schema != null ? de_Schema(output.Schema, context) : undefined, - StartDateTime: __expectString(output.StartDateTime), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSource: _json, + EnableVisualization: __expectBoolean, + EndDateTime: __expectString, + EstimatedTimeRemainingInMinutes: __expectLong, + ExplainabilityArn: __expectString, + ExplainabilityConfig: _json, + ExplainabilityName: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + ResourceArn: __expectString, + Schema: _json, + StartDateTime: __expectString, + Status: __expectString, + }) as any; }; /** @@ -6540,77 +5143,55 @@ const de_DescribeForecastExportJobResponse = ( output: any, context: __SerdeContext ): DescribeForecastExportJobResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - ForecastArn: __expectString(output.ForecastArn), - ForecastExportJobArn: __expectString(output.ForecastExportJobArn), - ForecastExportJobName: __expectString(output.ForecastExportJobName), - Format: __expectString(output.Format), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + ForecastArn: __expectString, + ForecastExportJobArn: __expectString, + ForecastExportJobName: __expectString, + Format: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeForecastResponse */ const de_DescribeForecastResponse = (output: any, context: __SerdeContext): DescribeForecastResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetGroupArn: __expectString(output.DatasetGroupArn), - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - ForecastArn: __expectString(output.ForecastArn), - ForecastName: __expectString(output.ForecastName), - ForecastTypes: output.ForecastTypes != null ? de_ForecastTypes(output.ForecastTypes, context) : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - PredictorArn: __expectString(output.PredictorArn), - Status: __expectString(output.Status), - TimeSeriesSelector: - output.TimeSeriesSelector != null ? de_TimeSeriesSelector(output.TimeSeriesSelector, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetGroupArn: __expectString, + EstimatedTimeRemainingInMinutes: __expectLong, + ForecastArn: __expectString, + ForecastName: __expectString, + ForecastTypes: _json, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + PredictorArn: __expectString, + Status: __expectString, + TimeSeriesSelector: _json, + }) as any; }; /** * deserializeAws_json1_1DescribeMonitorResponse */ const de_DescribeMonitorResponse = (output: any, context: __SerdeContext): DescribeMonitorResponse => { - return { - Baseline: output.Baseline != null ? de_Baseline(output.Baseline, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EstimatedEvaluationTimeRemainingInMinutes: __expectLong(output.EstimatedEvaluationTimeRemainingInMinutes), - LastEvaluationState: __expectString(output.LastEvaluationState), - LastEvaluationTime: - output.LastEvaluationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastEvaluationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - MonitorArn: __expectString(output.MonitorArn), - MonitorName: __expectString(output.MonitorName), - ResourceArn: __expectString(output.ResourceArn), - Status: __expectString(output.Status), - } as any; + return take(output, { + Baseline: (_: any) => de_Baseline(_, context), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EstimatedEvaluationTimeRemainingInMinutes: __expectLong, + LastEvaluationState: __expectString, + LastEvaluationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + MonitorArn: __expectString, + MonitorName: __expectString, + ResourceArn: __expectString, + Status: __expectString, + }) as any; }; /** @@ -6620,94 +5201,66 @@ const de_DescribePredictorBacktestExportJobResponse = ( output: any, context: __SerdeContext ): DescribePredictorBacktestExportJobResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - Format: __expectString(output.Format), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - PredictorArn: __expectString(output.PredictorArn), - PredictorBacktestExportJobArn: __expectString(output.PredictorBacktestExportJobArn), - PredictorBacktestExportJobName: __expectString(output.PredictorBacktestExportJobName), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + Format: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + PredictorArn: __expectString, + PredictorBacktestExportJobArn: __expectString, + PredictorBacktestExportJobName: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribePredictorResponse */ const de_DescribePredictorResponse = (output: any, context: __SerdeContext): DescribePredictorResponse => { - return { - AlgorithmArn: __expectString(output.AlgorithmArn), - AutoMLAlgorithmArns: - output.AutoMLAlgorithmArns != null ? de_ArnList(output.AutoMLAlgorithmArns, context) : undefined, - AutoMLOverrideStrategy: __expectString(output.AutoMLOverrideStrategy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetImportJobArns: - output.DatasetImportJobArns != null ? de_ArnList(output.DatasetImportJobArns, context) : undefined, - EncryptionConfig: - output.EncryptionConfig != null ? de_EncryptionConfig(output.EncryptionConfig, context) : undefined, - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - EvaluationParameters: - output.EvaluationParameters != null ? de_EvaluationParameters(output.EvaluationParameters, context) : undefined, - FeaturizationConfig: - output.FeaturizationConfig != null ? de_FeaturizationConfig(output.FeaturizationConfig, context) : undefined, - ForecastHorizon: __expectInt32(output.ForecastHorizon), - ForecastTypes: output.ForecastTypes != null ? de_ForecastTypes(output.ForecastTypes, context) : undefined, - HPOConfig: output.HPOConfig != null ? de_HyperParameterTuningJobConfig(output.HPOConfig, context) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - IsAutoPredictor: __expectBoolean(output.IsAutoPredictor), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - OptimizationMetric: __expectString(output.OptimizationMetric), - PerformAutoML: __expectBoolean(output.PerformAutoML), - PerformHPO: __expectBoolean(output.PerformHPO), - PredictorArn: __expectString(output.PredictorArn), - PredictorExecutionDetails: - output.PredictorExecutionDetails != null - ? de_PredictorExecutionDetails(output.PredictorExecutionDetails, context) - : undefined, - PredictorName: __expectString(output.PredictorName), - Status: __expectString(output.Status), - TrainingParameters: - output.TrainingParameters != null ? de_TrainingParameters(output.TrainingParameters, context) : undefined, - } as any; + return take(output, { + AlgorithmArn: __expectString, + AutoMLAlgorithmArns: _json, + AutoMLOverrideStrategy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetImportJobArns: _json, + EncryptionConfig: _json, + EstimatedTimeRemainingInMinutes: __expectLong, + EvaluationParameters: _json, + FeaturizationConfig: _json, + ForecastHorizon: __expectInt32, + ForecastTypes: _json, + HPOConfig: (_: any) => de_HyperParameterTuningJobConfig(_, context), + InputDataConfig: _json, + IsAutoPredictor: __expectBoolean, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + OptimizationMetric: __expectString, + PerformAutoML: __expectBoolean, + PerformHPO: __expectBoolean, + PredictorArn: __expectString, + PredictorExecutionDetails: (_: any) => de_PredictorExecutionDetails(_, context), + PredictorName: __expectString, + Status: __expectString, + TrainingParameters: _json, + }) as any; }; /** * deserializeAws_json1_1DescribeWhatIfAnalysisResponse */ const de_DescribeWhatIfAnalysisResponse = (output: any, context: __SerdeContext): DescribeWhatIfAnalysisResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - ForecastArn: __expectString(output.ForecastArn), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - TimeSeriesSelector: - output.TimeSeriesSelector != null ? de_TimeSeriesSelector(output.TimeSeriesSelector, context) : undefined, - WhatIfAnalysisArn: __expectString(output.WhatIfAnalysisArn), - WhatIfAnalysisName: __expectString(output.WhatIfAnalysisName), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EstimatedTimeRemainingInMinutes: __expectLong, + ForecastArn: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + TimeSeriesSelector: _json, + WhatIfAnalysisArn: __expectString, + WhatIfAnalysisName: __expectString, + }) as any; }; /** @@ -6717,79 +5270,52 @@ const de_DescribeWhatIfForecastExportResponse = ( output: any, context: __SerdeContext ): DescribeWhatIfForecastExportResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - Format: __expectString(output.Format), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - WhatIfForecastArns: - output.WhatIfForecastArns != null ? de_LongArnList(output.WhatIfForecastArns, context) : undefined, - WhatIfForecastExportArn: __expectString(output.WhatIfForecastExportArn), - WhatIfForecastExportName: __expectString(output.WhatIfForecastExportName), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + EstimatedTimeRemainingInMinutes: __expectLong, + Format: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + WhatIfForecastArns: _json, + WhatIfForecastExportArn: __expectString, + WhatIfForecastExportName: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeWhatIfForecastResponse */ const de_DescribeWhatIfForecastResponse = (output: any, context: __SerdeContext): DescribeWhatIfForecastResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EstimatedTimeRemainingInMinutes: __expectLong(output.EstimatedTimeRemainingInMinutes), - ForecastTypes: output.ForecastTypes != null ? de_ForecastTypes(output.ForecastTypes, context) : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - TimeSeriesReplacementsDataSource: - output.TimeSeriesReplacementsDataSource != null - ? de_TimeSeriesReplacementsDataSource(output.TimeSeriesReplacementsDataSource, context) - : undefined, - TimeSeriesTransformations: - output.TimeSeriesTransformations != null - ? de_TimeSeriesTransformations(output.TimeSeriesTransformations, context) - : undefined, - WhatIfAnalysisArn: __expectString(output.WhatIfAnalysisArn), - WhatIfForecastArn: __expectString(output.WhatIfForecastArn), - WhatIfForecastName: __expectString(output.WhatIfForecastName), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionConfig - */ -const de_EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => { - return { - KMSKeyArn: __expectString(output.KMSKeyArn), - RoleArn: __expectString(output.RoleArn), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EstimatedTimeRemainingInMinutes: __expectLong, + ForecastTypes: _json, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + TimeSeriesReplacementsDataSource: _json, + TimeSeriesTransformations: (_: any) => de_TimeSeriesTransformations(_, context), + WhatIfAnalysisArn: __expectString, + WhatIfForecastArn: __expectString, + WhatIfForecastName: __expectString, + }) as any; }; +// de_EncryptionConfig omitted. + /** * deserializeAws_json1_1ErrorMetric */ const de_ErrorMetric = (output: any, context: __SerdeContext): ErrorMetric => { - return { - ForecastType: __expectString(output.ForecastType), - MAPE: __limitedParseDouble(output.MAPE), - MASE: __limitedParseDouble(output.MASE), - RMSE: __limitedParseDouble(output.RMSE), - WAPE: __limitedParseDouble(output.WAPE), - } as any; + return take(output, { + ForecastType: __expectString, + MAPE: __limitedParseDouble, + MASE: __limitedParseDouble, + RMSE: __limitedParseDouble, + WAPE: __limitedParseDouble, + }) as any; }; /** @@ -6799,209 +5325,94 @@ const de_ErrorMetrics = (output: any, context: __SerdeContext): ErrorMetric[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ErrorMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1EvaluationParameters - */ -const de_EvaluationParameters = (output: any, context: __SerdeContext): EvaluationParameters => { - return { - BackTestWindowOffset: __expectInt32(output.BackTestWindowOffset), - NumberOfBacktestWindows: __expectInt32(output.NumberOfBacktestWindows), - } as any; -}; - -/** - * deserializeAws_json1_1EvaluationResult - */ -const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { - return { - AlgorithmArn: __expectString(output.AlgorithmArn), - TestWindows: output.TestWindows != null ? de_TestWindows(output.TestWindows, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Explainabilities - */ -const de_Explainabilities = (output: any, context: __SerdeContext): ExplainabilitySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExplainabilitySummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExplainabilityConfig - */ -const de_ExplainabilityConfig = (output: any, context: __SerdeContext): ExplainabilityConfig => { - return { - TimePointGranularity: __expectString(output.TimePointGranularity), - TimeSeriesGranularity: __expectString(output.TimeSeriesGranularity), - } as any; -}; - -/** - * deserializeAws_json1_1ExplainabilityExports - */ -const de_ExplainabilityExports = (output: any, context: __SerdeContext): ExplainabilityExportSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExplainabilityExportSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExplainabilityExportSummary - */ -const de_ExplainabilityExportSummary = (output: any, context: __SerdeContext): ExplainabilityExportSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - ExplainabilityExportArn: __expectString(output.ExplainabilityExportArn), - ExplainabilityExportName: __expectString(output.ExplainabilityExportName), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ExplainabilityInfo - */ -const de_ExplainabilityInfo = (output: any, context: __SerdeContext): ExplainabilityInfo => { - return { - ExplainabilityArn: __expectString(output.ExplainabilityArn), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ExplainabilitySummary - */ -const de_ExplainabilitySummary = (output: any, context: __SerdeContext): ExplainabilitySummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExplainabilityArn: __expectString(output.ExplainabilityArn), - ExplainabilityConfig: - output.ExplainabilityConfig != null ? de_ExplainabilityConfig(output.ExplainabilityConfig, context) : undefined, - ExplainabilityName: __expectString(output.ExplainabilityName), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - ResourceArn: __expectString(output.ResourceArn), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1Featurization - */ -const de_Featurization = (output: any, context: __SerdeContext): Featurization => { - return { - AttributeName: __expectString(output.AttributeName), - FeaturizationPipeline: - output.FeaturizationPipeline != null - ? de_FeaturizationPipeline(output.FeaturizationPipeline, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FeaturizationConfig - */ -const de_FeaturizationConfig = (output: any, context: __SerdeContext): FeaturizationConfig => { - return { - Featurizations: output.Featurizations != null ? de_Featurizations(output.Featurizations, context) : undefined, - ForecastDimensions: - output.ForecastDimensions != null ? de_ForecastDimensions(output.ForecastDimensions, context) : undefined, - ForecastFrequency: __expectString(output.ForecastFrequency), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturizationMethod - */ -const de_FeaturizationMethod = (output: any, context: __SerdeContext): FeaturizationMethod => { - return { - FeaturizationMethodName: __expectString(output.FeaturizationMethodName), - FeaturizationMethodParameters: - output.FeaturizationMethodParameters != null - ? de_FeaturizationMethodParameters(output.FeaturizationMethodParameters, context) - : undefined, - } as any; -}; +// de_EvaluationParameters omitted. -/** - * deserializeAws_json1_1FeaturizationMethodParameters - */ -const de_FeaturizationMethodParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +/** + * deserializeAws_json1_1EvaluationResult + */ +const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { + return take(output, { + AlgorithmArn: __expectString, + TestWindows: (_: any) => de_TestWindows(_, context), + }) as any; }; /** - * deserializeAws_json1_1FeaturizationPipeline + * deserializeAws_json1_1Explainabilities */ -const de_FeaturizationPipeline = (output: any, context: __SerdeContext): FeaturizationMethod[] => { +const de_Explainabilities = (output: any, context: __SerdeContext): ExplainabilitySummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeaturizationMethod(entry, context); + return de_ExplainabilitySummary(entry, context); }); return retVal; }; +// de_ExplainabilityConfig omitted. + /** - * deserializeAws_json1_1Featurizations + * deserializeAws_json1_1ExplainabilityExports */ -const de_Featurizations = (output: any, context: __SerdeContext): Featurization[] => { +const de_ExplainabilityExports = (output: any, context: __SerdeContext): ExplainabilityExportSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Featurization(entry, context); + return de_ExplainabilityExportSummary(entry, context); }); return retVal; }; +/** + * deserializeAws_json1_1ExplainabilityExportSummary + */ +const de_ExplainabilityExportSummary = (output: any, context: __SerdeContext): ExplainabilityExportSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + ExplainabilityExportArn: __expectString, + ExplainabilityExportName: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + }) as any; +}; + +// de_ExplainabilityInfo omitted. + +/** + * deserializeAws_json1_1ExplainabilitySummary + */ +const de_ExplainabilitySummary = (output: any, context: __SerdeContext): ExplainabilitySummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExplainabilityArn: __expectString, + ExplainabilityConfig: _json, + ExplainabilityName: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + ResourceArn: __expectString, + Status: __expectString, + }) as any; +}; + +// de_Featurization omitted. + +// de_FeaturizationConfig omitted. + +// de_FeaturizationMethod omitted. + +// de_FeaturizationMethodParameters omitted. + +// de_FeaturizationPipeline omitted. + +// de_Featurizations omitted. + /** * deserializeAws_json1_1FieldStatistics */ @@ -7015,20 +5426,7 @@ const de_FieldStatistics = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ForecastDimensions omitted. /** * deserializeAws_json1_1ForecastExportJobs @@ -7037,9 +5435,6 @@ const de_ForecastExportJobs = (output: any, context: __SerdeContext): ForecastEx const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ForecastExportJobSummary(entry, context); }); return retVal; @@ -7049,21 +5444,15 @@ const de_ForecastExportJobs = (output: any, context: __SerdeContext): ForecastEx * deserializeAws_json1_1ForecastExportJobSummary */ const de_ForecastExportJobSummary = (output: any, context: __SerdeContext): ForecastExportJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - ForecastExportJobArn: __expectString(output.ForecastExportJobArn), - ForecastExportJobName: __expectString(output.ForecastExportJobName), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + ForecastExportJobArn: __expectString, + ForecastExportJobName: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + }) as any; }; /** @@ -7073,9 +5462,6 @@ const de_Forecasts = (output: any, context: __SerdeContext): ForecastSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ForecastSummary(entry, context); }); return retVal; @@ -7085,171 +5471,92 @@ const de_Forecasts = (output: any, context: __SerdeContext): ForecastSummary[] = * deserializeAws_json1_1ForecastSummary */ const de_ForecastSummary = (output: any, context: __SerdeContext): ForecastSummary => { - return { - CreatedUsingAutoPredictor: __expectBoolean(output.CreatedUsingAutoPredictor), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetGroupArn: __expectString(output.DatasetGroupArn), - ForecastArn: __expectString(output.ForecastArn), - ForecastName: __expectString(output.ForecastName), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - PredictorArn: __expectString(output.PredictorArn), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ForecastTypes - */ -const de_ForecastTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + CreatedUsingAutoPredictor: __expectBoolean, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetGroupArn: __expectString, + ForecastArn: __expectString, + ForecastName: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + PredictorArn: __expectString, + Status: __expectString, + }) as any; }; +// de_ForecastTypes omitted. + /** * deserializeAws_json1_1GetAccuracyMetricsResponse */ const de_GetAccuracyMetricsResponse = (output: any, context: __SerdeContext): GetAccuracyMetricsResponse => { - return { - AutoMLOverrideStrategy: __expectString(output.AutoMLOverrideStrategy), - IsAutoPredictor: __expectBoolean(output.IsAutoPredictor), - OptimizationMetric: __expectString(output.OptimizationMetric), - PredictorEvaluationResults: - output.PredictorEvaluationResults != null - ? de_PredictorEvaluationResults(output.PredictorEvaluationResults, context) - : undefined, - } as any; + return take(output, { + AutoMLOverrideStrategy: __expectString, + IsAutoPredictor: __expectBoolean, + OptimizationMetric: __expectString, + PredictorEvaluationResults: (_: any) => de_PredictorEvaluationResults(_, context), + }) as any; }; /** * deserializeAws_json1_1HyperParameterTuningJobConfig */ const de_HyperParameterTuningJobConfig = (output: any, context: __SerdeContext): HyperParameterTuningJobConfig => { - return { - ParameterRanges: output.ParameterRanges != null ? de_ParameterRanges(output.ParameterRanges, context) : undefined, - } as any; + return take(output, { + ParameterRanges: (_: any) => de_ParameterRanges(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - return { - DatasetGroupArn: __expectString(output.DatasetGroupArn), - SupplementaryFeatures: - output.SupplementaryFeatures != null - ? de_SupplementaryFeatures(output.SupplementaryFeatures, context) - : undefined, - } as any; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_1IntegerParameterRange - */ -const de_IntegerParameterRange = (output: any, context: __SerdeContext): IntegerParameterRange => { - return { - MaxValue: __expectInt32(output.MaxValue), - MinValue: __expectInt32(output.MinValue), - Name: __expectString(output.Name), - ScalingType: __expectString(output.ScalingType), - } as any; -}; +// de_IntegerParameterRange omitted. -/** - * deserializeAws_json1_1IntegerParameterRanges - */ -const de_IntegerParameterRanges = (output: any, context: __SerdeContext): IntegerParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IntegerParameterRange(entry, context); - }); - return retVal; -}; +// de_IntegerParameterRanges omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListDatasetGroupsResponse */ const de_ListDatasetGroupsResponse = (output: any, context: __SerdeContext): ListDatasetGroupsResponse => { - return { - DatasetGroups: output.DatasetGroups != null ? de_DatasetGroups(output.DatasetGroups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DatasetGroups: (_: any) => de_DatasetGroups(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDatasetImportJobsResponse */ const de_ListDatasetImportJobsResponse = (output: any, context: __SerdeContext): ListDatasetImportJobsResponse => { - return { - DatasetImportJobs: - output.DatasetImportJobs != null ? de_DatasetImportJobs(output.DatasetImportJobs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DatasetImportJobs: (_: any) => de_DatasetImportJobs(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDatasetsResponse */ const de_ListDatasetsResponse = (output: any, context: __SerdeContext): ListDatasetsResponse => { - return { - Datasets: output.Datasets != null ? de_Datasets(output.Datasets, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Datasets: (_: any) => de_Datasets(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListExplainabilitiesResponse */ const de_ListExplainabilitiesResponse = (output: any, context: __SerdeContext): ListExplainabilitiesResponse => { - return { - Explainabilities: - output.Explainabilities != null ? de_Explainabilities(output.Explainabilities, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Explainabilities: (_: any) => de_Explainabilities(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -7259,57 +5566,50 @@ const de_ListExplainabilityExportsResponse = ( output: any, context: __SerdeContext ): ListExplainabilityExportsResponse => { - return { - ExplainabilityExports: - output.ExplainabilityExports != null - ? de_ExplainabilityExports(output.ExplainabilityExports, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ExplainabilityExports: (_: any) => de_ExplainabilityExports(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListForecastExportJobsResponse */ const de_ListForecastExportJobsResponse = (output: any, context: __SerdeContext): ListForecastExportJobsResponse => { - return { - ForecastExportJobs: - output.ForecastExportJobs != null ? de_ForecastExportJobs(output.ForecastExportJobs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ForecastExportJobs: (_: any) => de_ForecastExportJobs(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListForecastsResponse */ const de_ListForecastsResponse = (output: any, context: __SerdeContext): ListForecastsResponse => { - return { - Forecasts: output.Forecasts != null ? de_Forecasts(output.Forecasts, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Forecasts: (_: any) => de_Forecasts(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListMonitorEvaluationsResponse */ const de_ListMonitorEvaluationsResponse = (output: any, context: __SerdeContext): ListMonitorEvaluationsResponse => { - return { - NextToken: __expectString(output.NextToken), - PredictorMonitorEvaluations: - output.PredictorMonitorEvaluations != null - ? de_PredictorMonitorEvaluations(output.PredictorMonitorEvaluations, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PredictorMonitorEvaluations: (_: any) => de_PredictorMonitorEvaluations(_, context), + }) as any; }; /** * deserializeAws_json1_1ListMonitorsResponse */ const de_ListMonitorsResponse = (output: any, context: __SerdeContext): ListMonitorsResponse => { - return { - Monitors: output.Monitors != null ? de_Monitors(output.Monitors, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Monitors: (_: any) => de_Monitors(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -7319,42 +5619,32 @@ const de_ListPredictorBacktestExportJobsResponse = ( output: any, context: __SerdeContext ): ListPredictorBacktestExportJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - PredictorBacktestExportJobs: - output.PredictorBacktestExportJobs != null - ? de_PredictorBacktestExportJobs(output.PredictorBacktestExportJobs, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PredictorBacktestExportJobs: (_: any) => de_PredictorBacktestExportJobs(_, context), + }) as any; }; /** * deserializeAws_json1_1ListPredictorsResponse */ const de_ListPredictorsResponse = (output: any, context: __SerdeContext): ListPredictorsResponse => { - return { - NextToken: __expectString(output.NextToken), - Predictors: output.Predictors != null ? de_Predictors(output.Predictors, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Predictors: (_: any) => de_Predictors(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListWhatIfAnalysesResponse */ const de_ListWhatIfAnalysesResponse = (output: any, context: __SerdeContext): ListWhatIfAnalysesResponse => { - return { - NextToken: __expectString(output.NextToken), - WhatIfAnalyses: output.WhatIfAnalyses != null ? de_WhatIfAnalyses(output.WhatIfAnalyses, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + WhatIfAnalyses: (_: any) => de_WhatIfAnalyses(_, context), + }) as any; }; /** @@ -7364,48 +5654,32 @@ const de_ListWhatIfForecastExportsResponse = ( output: any, context: __SerdeContext ): ListWhatIfForecastExportsResponse => { - return { - NextToken: __expectString(output.NextToken), - WhatIfForecastExports: - output.WhatIfForecastExports != null - ? de_WhatIfForecastExports(output.WhatIfForecastExports, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + WhatIfForecastExports: (_: any) => de_WhatIfForecastExports(_, context), + }) as any; }; /** * deserializeAws_json1_1ListWhatIfForecastsResponse */ const de_ListWhatIfForecastsResponse = (output: any, context: __SerdeContext): ListWhatIfForecastsResponse => { - return { - NextToken: __expectString(output.NextToken), - WhatIfForecasts: output.WhatIfForecasts != null ? de_WhatIfForecasts(output.WhatIfForecasts, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + WhatIfForecasts: (_: any) => de_WhatIfForecasts(_, context), + }) as any; }; -/** - * deserializeAws_json1_1LongArnList - */ -const de_LongArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LongArnList omitted. /** * deserializeAws_json1_1MetricResult */ const de_MetricResult = (output: any, context: __SerdeContext): MetricResult => { - return { - MetricName: __expectString(output.MetricName), - MetricValue: __limitedParseDouble(output.MetricValue), - } as any; + return take(output, { + MetricName: __expectString, + MetricValue: __limitedParseDouble, + }) as any; }; /** @@ -7415,9 +5689,6 @@ const de_MetricResults = (output: any, context: __SerdeContext): MetricResult[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricResult(entry, context); }); return retVal; @@ -7427,37 +5698,17 @@ const de_MetricResults = (output: any, context: __SerdeContext): MetricResult[] * deserializeAws_json1_1Metrics */ const de_Metrics = (output: any, context: __SerdeContext): Metrics => { - return { - AverageWeightedQuantileLoss: __limitedParseDouble(output.AverageWeightedQuantileLoss), - ErrorMetrics: output.ErrorMetrics != null ? de_ErrorMetrics(output.ErrorMetrics, context) : undefined, - RMSE: __limitedParseDouble(output.RMSE), - WeightedQuantileLosses: - output.WeightedQuantileLosses != null - ? de_WeightedQuantileLosses(output.WeightedQuantileLosses, context) - : undefined, - } as any; + return take(output, { + AverageWeightedQuantileLoss: __limitedParseDouble, + ErrorMetrics: (_: any) => de_ErrorMetrics(_, context), + RMSE: __limitedParseDouble, + WeightedQuantileLosses: (_: any) => de_WeightedQuantileLosses(_, context), + }) as any; }; -/** - * deserializeAws_json1_1MonitorDataSource - */ -const de_MonitorDataSource = (output: any, context: __SerdeContext): MonitorDataSource => { - return { - DatasetImportJobArn: __expectString(output.DatasetImportJobArn), - ForecastArn: __expectString(output.ForecastArn), - PredictorArn: __expectString(output.PredictorArn), - } as any; -}; +// de_MonitorDataSource omitted. -/** - * deserializeAws_json1_1MonitorInfo - */ -const de_MonitorInfo = (output: any, context: __SerdeContext): MonitorInfo => { - return { - MonitorArn: __expectString(output.MonitorArn), - Status: __expectString(output.Status), - } as any; -}; +// de_MonitorInfo omitted. /** * deserializeAws_json1_1Monitors @@ -7466,9 +5717,6 @@ const de_Monitors = (output: any, context: __SerdeContext): MonitorSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MonitorSummary(entry, context); }); return retVal; @@ -7478,40 +5726,25 @@ const de_Monitors = (output: any, context: __SerdeContext): MonitorSummary[] => * deserializeAws_json1_1MonitorSummary */ const de_MonitorSummary = (output: any, context: __SerdeContext): MonitorSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - MonitorArn: __expectString(output.MonitorArn), - MonitorName: __expectString(output.MonitorName), - ResourceArn: __expectString(output.ResourceArn), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitorArn: __expectString, + MonitorName: __expectString, + ResourceArn: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1ParameterRanges */ const de_ParameterRanges = (output: any, context: __SerdeContext): ParameterRanges => { - return { - CategoricalParameterRanges: - output.CategoricalParameterRanges != null - ? de_CategoricalParameterRanges(output.CategoricalParameterRanges, context) - : undefined, - ContinuousParameterRanges: - output.ContinuousParameterRanges != null - ? de_ContinuousParameterRanges(output.ContinuousParameterRanges, context) - : undefined, - IntegerParameterRanges: - output.IntegerParameterRanges != null - ? de_IntegerParameterRanges(output.IntegerParameterRanges, context) - : undefined, - } as any; + return take(output, { + CategoricalParameterRanges: _json, + ContinuousParameterRanges: (_: any) => de_ContinuousParameterRanges(_, context), + IntegerParameterRanges: _json, + }) as any; }; /** @@ -7521,9 +5754,6 @@ const de_PredictorBacktestExportJobs = (output: any, context: __SerdeContext): P const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PredictorBacktestExportJobSummary(entry, context); }); return retVal; @@ -7536,30 +5766,24 @@ const de_PredictorBacktestExportJobSummary = ( output: any, context: __SerdeContext ): PredictorBacktestExportJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - PredictorBacktestExportJobArn: __expectString(output.PredictorBacktestExportJobArn), - PredictorBacktestExportJobName: __expectString(output.PredictorBacktestExportJobName), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + PredictorBacktestExportJobArn: __expectString, + PredictorBacktestExportJobName: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1PredictorBaseline */ const de_PredictorBaseline = (output: any, context: __SerdeContext): PredictorBaseline => { - return { - BaselineMetrics: output.BaselineMetrics != null ? de_BaselineMetrics(output.BaselineMetrics, context) : undefined, - } as any; + return take(output, { + BaselineMetrics: (_: any) => de_BaselineMetrics(_, context), + }) as any; }; /** @@ -7569,9 +5793,6 @@ const de_PredictorEvaluationResults = (output: any, context: __SerdeContext): Ev const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EvaluationResult(entry, context); }); return retVal; @@ -7581,31 +5802,29 @@ const de_PredictorEvaluationResults = (output: any, context: __SerdeContext): Ev * deserializeAws_json1_1PredictorEvent */ const de_PredictorEvent = (output: any, context: __SerdeContext): PredictorEvent => { - return { - Datetime: - output.Datetime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Datetime))) : undefined, - Detail: __expectString(output.Detail), - } as any; + return take(output, { + Datetime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Detail: __expectString, + }) as any; }; /** * deserializeAws_json1_1PredictorExecution */ const de_PredictorExecution = (output: any, context: __SerdeContext): PredictorExecution => { - return { - AlgorithmArn: __expectString(output.AlgorithmArn), - TestWindows: output.TestWindows != null ? de_TestWindowDetails(output.TestWindows, context) : undefined, - } as any; + return take(output, { + AlgorithmArn: __expectString, + TestWindows: (_: any) => de_TestWindowDetails(_, context), + }) as any; }; /** * deserializeAws_json1_1PredictorExecutionDetails */ const de_PredictorExecutionDetails = (output: any, context: __SerdeContext): PredictorExecutionDetails => { - return { - PredictorExecutions: - output.PredictorExecutions != null ? de_PredictorExecutions(output.PredictorExecutions, context) : undefined, - } as any; + return take(output, { + PredictorExecutions: (_: any) => de_PredictorExecutions(_, context), + }) as any; }; /** @@ -7615,9 +5834,6 @@ const de_PredictorExecutions = (output: any, context: __SerdeContext): Predictor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PredictorExecution(entry, context); }); return retVal; @@ -7627,29 +5843,19 @@ const de_PredictorExecutions = (output: any, context: __SerdeContext): Predictor * deserializeAws_json1_1PredictorMonitorEvaluation */ const de_PredictorMonitorEvaluation = (output: any, context: __SerdeContext): PredictorMonitorEvaluation => { - return { - EvaluationState: __expectString(output.EvaluationState), - EvaluationTime: - output.EvaluationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationTime))) - : undefined, - Message: __expectString(output.Message), - MetricResults: output.MetricResults != null ? de_MetricResults(output.MetricResults, context) : undefined, - MonitorArn: __expectString(output.MonitorArn), - MonitorDataSource: - output.MonitorDataSource != null ? de_MonitorDataSource(output.MonitorDataSource, context) : undefined, - NumItemsEvaluated: __expectLong(output.NumItemsEvaluated), - PredictorEvent: output.PredictorEvent != null ? de_PredictorEvent(output.PredictorEvent, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - WindowEndDatetime: - output.WindowEndDatetime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.WindowEndDatetime))) - : undefined, - WindowStartDatetime: - output.WindowStartDatetime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.WindowStartDatetime))) - : undefined, - } as any; + return take(output, { + EvaluationState: __expectString, + EvaluationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + MetricResults: (_: any) => de_MetricResults(_, context), + MonitorArn: __expectString, + MonitorDataSource: _json, + NumItemsEvaluated: __expectLong, + PredictorEvent: (_: any) => de_PredictorEvent(_, context), + ResourceArn: __expectString, + WindowEndDatetime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WindowStartDatetime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -7659,9 +5865,6 @@ const de_PredictorMonitorEvaluations = (output: any, context: __SerdeContext): P const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PredictorMonitorEvaluation(entry, context); }); return retVal; @@ -7674,9 +5877,6 @@ const de_Predictors = (output: any, context: __SerdeContext): PredictorSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PredictorSummary(entry, context); }); return retVal; @@ -7686,186 +5886,64 @@ const de_Predictors = (output: any, context: __SerdeContext): PredictorSummary[] * deserializeAws_json1_1PredictorSummary */ const de_PredictorSummary = (output: any, context: __SerdeContext): PredictorSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatasetGroupArn: __expectString(output.DatasetGroupArn), - IsAutoPredictor: __expectBoolean(output.IsAutoPredictor), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - PredictorArn: __expectString(output.PredictorArn), - PredictorName: __expectString(output.PredictorName), - ReferencePredictorSummary: - output.ReferencePredictorSummary != null - ? de_ReferencePredictorSummary(output.ReferencePredictorSummary, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ReferencePredictorSummary - */ -const de_ReferencePredictorSummary = (output: any, context: __SerdeContext): ReferencePredictorSummary => { - return { - Arn: __expectString(output.Arn), - State: __expectString(output.State), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetGroupArn: __expectString, + IsAutoPredictor: __expectBoolean, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + PredictorArn: __expectString, + PredictorName: __expectString, + ReferencePredictorSummary: _json, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ReferencePredictorSummary omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1S3Config - */ -const de_S3Config = (output: any, context: __SerdeContext): S3Config => { - return { - KMSKeyArn: __expectString(output.KMSKeyArn), - Path: __expectString(output.Path), - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1Schema - */ -const de_Schema = (output: any, context: __SerdeContext): Schema => { - return { - Attributes: output.Attributes != null ? de_SchemaAttributes(output.Attributes, context) : undefined, - } as any; -}; +// de_S3Config omitted. -/** - * deserializeAws_json1_1SchemaAttribute - */ -const de_SchemaAttribute = (output: any, context: __SerdeContext): SchemaAttribute => { - return { - AttributeName: __expectString(output.AttributeName), - AttributeType: __expectString(output.AttributeType), - } as any; -}; +// de_Schema omitted. -/** - * deserializeAws_json1_1SchemaAttributes - */ -const de_SchemaAttributes = (output: any, context: __SerdeContext): SchemaAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaAttribute(entry, context); - }); - return retVal; -}; +// de_SchemaAttribute omitted. + +// de_SchemaAttributes omitted. /** * deserializeAws_json1_1Statistics */ const de_Statistics = (output: any, context: __SerdeContext): Statistics => { - return { - Avg: __limitedParseDouble(output.Avg), - Count: __expectInt32(output.Count), - CountDistinct: __expectInt32(output.CountDistinct), - CountDistinctLong: __expectLong(output.CountDistinctLong), - CountLong: __expectLong(output.CountLong), - CountNan: __expectInt32(output.CountNan), - CountNanLong: __expectLong(output.CountNanLong), - CountNull: __expectInt32(output.CountNull), - CountNullLong: __expectLong(output.CountNullLong), - Max: __expectString(output.Max), - Min: __expectString(output.Min), - Stddev: __limitedParseDouble(output.Stddev), - } as any; + return take(output, { + Avg: __limitedParseDouble, + Count: __expectInt32, + CountDistinct: __expectInt32, + CountDistinctLong: __expectLong, + CountLong: __expectLong, + CountNan: __expectInt32, + CountNanLong: __expectLong, + CountNull: __expectInt32, + CountNullLong: __expectLong, + Max: __expectString, + Min: __expectString, + Stddev: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1SupplementaryFeature - */ -const de_SupplementaryFeature = (output: any, context: __SerdeContext): SupplementaryFeature => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_SupplementaryFeature omitted. -/** - * deserializeAws_json1_1SupplementaryFeatures - */ -const de_SupplementaryFeatures = (output: any, context: __SerdeContext): SupplementaryFeature[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SupplementaryFeature(entry, context); - }); - return retVal; -}; +// de_SupplementaryFeatures omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. /** * deserializeAws_json1_1TestWindowDetails @@ -7874,9 +5952,6 @@ const de_TestWindowDetails = (output: any, context: __SerdeContext): TestWindowS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TestWindowSummary(entry, context); }); return retVal; @@ -7889,9 +5964,6 @@ const de_TestWindows = (output: any, context: __SerdeContext): WindowSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WindowSummary(entry, context); }); return retVal; @@ -7901,105 +5973,34 @@ const de_TestWindows = (output: any, context: __SerdeContext): WindowSummary[] = * deserializeAws_json1_1TestWindowSummary */ const de_TestWindowSummary = (output: any, context: __SerdeContext): TestWindowSummary => { - return { - Message: __expectString(output.Message), - Status: __expectString(output.Status), - TestWindowEnd: - output.TestWindowEnd != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TestWindowEnd))) - : undefined, - TestWindowStart: - output.TestWindowStart != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TestWindowStart))) - : undefined, - } as any; + return take(output, { + Message: __expectString, + Status: __expectString, + TestWindowEnd: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TestWindowStart: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1TimeAlignmentBoundary - */ -const de_TimeAlignmentBoundary = (output: any, context: __SerdeContext): TimeAlignmentBoundary => { - return { - DayOfMonth: __expectInt32(output.DayOfMonth), - DayOfWeek: __expectString(output.DayOfWeek), - Hour: __expectInt32(output.Hour), - Month: __expectString(output.Month), - } as any; -}; +// de_TimeAlignmentBoundary omitted. -/** - * deserializeAws_json1_1TimeSeriesCondition - */ -const de_TimeSeriesCondition = (output: any, context: __SerdeContext): TimeSeriesCondition => { - return { - AttributeName: __expectString(output.AttributeName), - AttributeValue: __expectString(output.AttributeValue), - Condition: __expectString(output.Condition), - } as any; -}; +// de_TimeSeriesCondition omitted. -/** - * deserializeAws_json1_1TimeSeriesConditions - */ -const de_TimeSeriesConditions = (output: any, context: __SerdeContext): TimeSeriesCondition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TimeSeriesCondition(entry, context); - }); - return retVal; -}; +// de_TimeSeriesConditions omitted. -/** - * deserializeAws_json1_1TimeSeriesIdentifiers - */ -const de_TimeSeriesIdentifiers = (output: any, context: __SerdeContext): TimeSeriesIdentifiers => { - return { - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - Format: __expectString(output.Format), - Schema: output.Schema != null ? de_Schema(output.Schema, context) : undefined, - } as any; -}; +// de_TimeSeriesIdentifiers omitted. -/** - * deserializeAws_json1_1TimeSeriesReplacementsDataSource - */ -const de_TimeSeriesReplacementsDataSource = ( - output: any, - context: __SerdeContext -): TimeSeriesReplacementsDataSource => { - return { - Format: __expectString(output.Format), - S3Config: output.S3Config != null ? de_S3Config(output.S3Config, context) : undefined, - Schema: output.Schema != null ? de_Schema(output.Schema, context) : undefined, - TimestampFormat: __expectString(output.TimestampFormat), - } as any; -}; +// de_TimeSeriesReplacementsDataSource omitted. -/** - * deserializeAws_json1_1TimeSeriesSelector - */ -const de_TimeSeriesSelector = (output: any, context: __SerdeContext): TimeSeriesSelector => { - return { - TimeSeriesIdentifiers: - output.TimeSeriesIdentifiers != null - ? de_TimeSeriesIdentifiers(output.TimeSeriesIdentifiers, context) - : undefined, - } as any; -}; +// de_TimeSeriesSelector omitted. /** * deserializeAws_json1_1TimeSeriesTransformation */ const de_TimeSeriesTransformation = (output: any, context: __SerdeContext): TimeSeriesTransformation => { - return { - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - TimeSeriesConditions: - output.TimeSeriesConditions != null ? de_TimeSeriesConditions(output.TimeSeriesConditions, context) : undefined, - } as any; + return take(output, { + Action: (_: any) => de_Action(_, context), + TimeSeriesConditions: _json, + }) as any; }; /** @@ -8009,77 +6010,29 @@ const de_TimeSeriesTransformations = (output: any, context: __SerdeContext): Tim const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimeSeriesTransformation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TrainingParameters - */ -const de_TrainingParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TrainingParameters omitted. -/** - * deserializeAws_json1_1Transformations - */ -const de_Transformations = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Transformations omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateDatasetGroupResponse - */ -const de_UpdateDatasetGroupResponse = (output: any, context: __SerdeContext): UpdateDatasetGroupResponse => { - return {} as any; -}; +// de_UpdateDatasetGroupResponse omitted. -/** - * deserializeAws_json1_1Values - */ -const de_Values = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Values omitted. /** * deserializeAws_json1_1WeightedQuantileLoss */ const de_WeightedQuantileLoss = (output: any, context: __SerdeContext): WeightedQuantileLoss => { - return { - LossValue: __limitedParseDouble(output.LossValue), - Quantile: __limitedParseDouble(output.Quantile), - } as any; + return take(output, { + LossValue: __limitedParseDouble, + Quantile: __limitedParseDouble, + }) as any; }; /** @@ -8089,9 +6042,6 @@ const de_WeightedQuantileLosses = (output: any, context: __SerdeContext): Weight const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WeightedQuantileLoss(entry, context); }); return retVal; @@ -8104,9 +6054,6 @@ const de_WhatIfAnalyses = (output: any, context: __SerdeContext): WhatIfAnalysis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WhatIfAnalysisSummary(entry, context); }); return retVal; @@ -8116,38 +6063,19 @@ const de_WhatIfAnalyses = (output: any, context: __SerdeContext): WhatIfAnalysis * deserializeAws_json1_1WhatIfAnalysisSummary */ const de_WhatIfAnalysisSummary = (output: any, context: __SerdeContext): WhatIfAnalysisSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ForecastArn: __expectString(output.ForecastArn), - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - WhatIfAnalysisArn: __expectString(output.WhatIfAnalysisArn), - WhatIfAnalysisName: __expectString(output.WhatIfAnalysisName), - } as any; -}; - -/** - * deserializeAws_json1_1WhatIfForecastArnListForExport - */ -const de_WhatIfForecastArnListForExport = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ForecastArn: __expectString, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + WhatIfAnalysisArn: __expectString, + WhatIfAnalysisName: __expectString, + }) as any; }; +// de_WhatIfForecastArnListForExport omitted. + /** * deserializeAws_json1_1WhatIfForecastExports */ @@ -8155,9 +6083,6 @@ const de_WhatIfForecastExports = (output: any, context: __SerdeContext): WhatIfF const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WhatIfForecastExportSummary(entry, context); }); return retVal; @@ -8167,25 +6092,16 @@ const de_WhatIfForecastExports = (output: any, context: __SerdeContext): WhatIfF * deserializeAws_json1_1WhatIfForecastExportSummary */ const de_WhatIfForecastExportSummary = (output: any, context: __SerdeContext): WhatIfForecastExportSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Destination: output.Destination != null ? de_DataDestination(output.Destination, context) : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - WhatIfForecastArns: - output.WhatIfForecastArns != null - ? de_WhatIfForecastArnListForExport(output.WhatIfForecastArns, context) - : undefined, - WhatIfForecastExportArn: __expectString(output.WhatIfForecastExportArn), - WhatIfForecastExportName: __expectString(output.WhatIfForecastExportName), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Destination: _json, + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + WhatIfForecastArns: _json, + WhatIfForecastExportArn: __expectString, + WhatIfForecastExportName: __expectString, + }) as any; }; /** @@ -8195,9 +6111,6 @@ const de_WhatIfForecasts = (output: any, context: __SerdeContext): WhatIfForecas const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WhatIfForecastSummary(entry, context); }); return retVal; @@ -8207,40 +6120,28 @@ const de_WhatIfForecasts = (output: any, context: __SerdeContext): WhatIfForecas * deserializeAws_json1_1WhatIfForecastSummary */ const de_WhatIfForecastSummary = (output: any, context: __SerdeContext): WhatIfForecastSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Message: __expectString(output.Message), - Status: __expectString(output.Status), - WhatIfAnalysisArn: __expectString(output.WhatIfAnalysisArn), - WhatIfForecastArn: __expectString(output.WhatIfForecastArn), - WhatIfForecastName: __expectString(output.WhatIfForecastName), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Status: __expectString, + WhatIfAnalysisArn: __expectString, + WhatIfForecastArn: __expectString, + WhatIfForecastName: __expectString, + }) as any; }; /** * deserializeAws_json1_1WindowSummary */ const de_WindowSummary = (output: any, context: __SerdeContext): WindowSummary => { - return { - EvaluationType: __expectString(output.EvaluationType), - ItemCount: __expectInt32(output.ItemCount), - Metrics: output.Metrics != null ? de_Metrics(output.Metrics, context) : undefined, - TestWindowEnd: - output.TestWindowEnd != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TestWindowEnd))) - : undefined, - TestWindowStart: - output.TestWindowStart != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TestWindowStart))) - : undefined, - } as any; + return take(output, { + EvaluationType: __expectString, + ItemCount: __expectInt32, + Metrics: (_: any) => de_Metrics(_, context), + TestWindowEnd: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TestWindowStart: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -8263,6 +6164,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-forecastquery/src/protocols/Aws_json1_1.ts b/clients/client-forecastquery/src/protocols/Aws_json1_1.ts index 65dd48078e67..f672900a0351 100644 --- a/clients/client-forecastquery/src/protocols/Aws_json1_1.ts +++ b/clients/client-forecastquery/src/protocols/Aws_json1_1.ts @@ -1,10 +1,12 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectString as __expectString, limitedParseDouble as __limitedParseDouble, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -42,7 +44,7 @@ export const se_QueryForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("QueryForecast"); let body: any; - body = JSON.stringify(se_QueryForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -55,7 +57,7 @@ export const se_QueryWhatIfForecastCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("QueryWhatIfForecast"); let body: any; - body = JSON.stringify(se_QueryWhatIfForecastRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -76,7 +78,7 @@ export const de_QueryForecastCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -109,10 +111,9 @@ const de_QueryForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -135,7 +136,7 @@ export const de_QueryWhatIfForecastCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -168,10 +169,9 @@ const de_QueryWhatIfForecastCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -185,7 +185,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -201,7 +201,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -217,7 +217,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -233,7 +233,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -249,7 +249,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -257,90 +257,36 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1QueryForecastRequest - */ -const se_QueryForecastRequest = (input: QueryForecastRequest, context: __SerdeContext): any => { - return { - ...(input.EndDate != null && { EndDate: input.EndDate }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.ForecastArn != null && { ForecastArn: input.ForecastArn }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartDate != null && { StartDate: input.StartDate }), - }; -}; +// se_QueryForecastRequest omitted. -/** - * serializeAws_json1_1QueryWhatIfForecastRequest - */ -const se_QueryWhatIfForecastRequest = (input: QueryWhatIfForecastRequest, context: __SerdeContext): any => { - return { - ...(input.EndDate != null && { EndDate: input.EndDate }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartDate != null && { StartDate: input.StartDate }), - ...(input.WhatIfForecastArn != null && { WhatIfForecastArn: input.WhatIfForecastArn }), - }; -}; +// se_QueryWhatIfForecastRequest omitted. /** * deserializeAws_json1_1DataPoint */ const de_DataPoint = (output: any, context: __SerdeContext): DataPoint => { - return { - Timestamp: __expectString(output.Timestamp), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Timestamp: __expectString, + Value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1Forecast */ const de_Forecast = (output: any, context: __SerdeContext): Forecast => { - return { - Predictions: output.Predictions != null ? de_Predictions(output.Predictions, context) : undefined, - } as any; + return take(output, { + Predictions: (_: any) => de_Predictions(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1Predictions @@ -359,37 +305,23 @@ const de_Predictions = (output: any, context: __SerdeContext): Record { - return { - Forecast: output.Forecast != null ? de_Forecast(output.Forecast, context) : undefined, - } as any; + return take(output, { + Forecast: (_: any) => de_Forecast(_, context), + }) as any; }; /** * deserializeAws_json1_1QueryWhatIfForecastResponse */ const de_QueryWhatIfForecastResponse = (output: any, context: __SerdeContext): QueryWhatIfForecastResponse => { - return { - Forecast: output.Forecast != null ? de_Forecast(output.Forecast, context) : undefined, - } as any; + return take(output, { + Forecast: (_: any) => de_Forecast(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1TimeSeries @@ -398,9 +330,6 @@ const de_TimeSeries = (output: any, context: __SerdeContext): DataPoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataPoint(entry, context); }); return retVal; @@ -426,6 +355,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-frauddetector/src/protocols/Aws_json1_1.ts b/clients/client-frauddetector/src/protocols/Aws_json1_1.ts index d9bbe3e6727f..28b6ebafa819 100644 --- a/clients/client-frauddetector/src/protocols/Aws_json1_1.ts +++ b/clients/client-frauddetector/src/protocols/Aws_json1_1.ts @@ -1,13 +1,12 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -164,147 +163,74 @@ import { AggregatedLogOddsMetric, AggregatedVariablesImpactExplanation, AggregatedVariablesImportanceMetrics, - AllowDenyList, ATIMetricDataPoint, ATIModelPerformance, ATITrainingMetricsValue, - BatchCreateVariableError, BatchCreateVariableRequest, - BatchCreateVariableResult, - BatchGetVariableError, BatchGetVariableRequest, - BatchGetVariableResult, - BatchImport, - BatchPrediction, CancelBatchImportJobRequest, - CancelBatchImportJobResult, CancelBatchPredictionJobRequest, - CancelBatchPredictionJobResult, ConflictException, CreateBatchImportJobRequest, - CreateBatchImportJobResult, CreateBatchPredictionJobRequest, - CreateBatchPredictionJobResult, CreateDetectorVersionRequest, - CreateDetectorVersionResult, CreateListRequest, - CreateListResult, CreateModelRequest, - CreateModelResult, CreateModelVersionRequest, - CreateModelVersionResult, CreateRuleRequest, - CreateRuleResult, CreateVariableRequest, - CreateVariableResult, - DataValidationMetrics, DeleteBatchImportJobRequest, - DeleteBatchImportJobResult, DeleteBatchPredictionJobRequest, - DeleteBatchPredictionJobResult, DeleteDetectorRequest, - DeleteDetectorResult, DeleteDetectorVersionRequest, - DeleteDetectorVersionResult, DeleteEntityTypeRequest, - DeleteEntityTypeResult, DeleteEventRequest, - DeleteEventResult, DeleteEventsByEventTypeRequest, - DeleteEventsByEventTypeResult, DeleteEventTypeRequest, - DeleteEventTypeResult, DeleteExternalModelRequest, - DeleteExternalModelResult, DeleteLabelRequest, - DeleteLabelResult, DeleteListRequest, - DeleteListResult, DeleteModelRequest, - DeleteModelResult, DeleteModelVersionRequest, - DeleteModelVersionResult, DeleteOutcomeRequest, - DeleteOutcomeResult, DeleteRuleRequest, - DeleteRuleResult, DeleteVariableRequest, - DeleteVariableResult, DescribeDetectorRequest, - DescribeDetectorResult, DescribeModelVersionsRequest, DescribeModelVersionsResult, - Detector, - DetectorVersionSummary, Entity, - EntityType, - EvaluatedExternalModel, EvaluatedModelVersion, - EvaluatedRule, - Event, - EventPredictionSummary, - EventType, - EventVariableSummary, ExternalEventsDetail, - ExternalModel, - ExternalModelOutputs, - ExternalModelSummary, - FieldValidationMessage, - FileValidationMessage, FilterCondition, GetBatchImportJobsRequest, - GetBatchImportJobsResult, GetBatchPredictionJobsRequest, - GetBatchPredictionJobsResult, GetDeleteEventsByEventTypeStatusRequest, - GetDeleteEventsByEventTypeStatusResult, GetDetectorsRequest, - GetDetectorsResult, GetDetectorVersionRequest, - GetDetectorVersionResult, GetEntityTypesRequest, - GetEntityTypesResult, GetEventPredictionMetadataRequest, GetEventPredictionMetadataResult, GetEventPredictionRequest, GetEventPredictionResult, GetEventRequest, - GetEventResult, GetEventTypesRequest, - GetEventTypesResult, GetExternalModelsRequest, - GetExternalModelsResult, - GetKMSEncryptionKeyResult, GetLabelsRequest, - GetLabelsResult, GetListElementsRequest, - GetListElementsResult, GetListsMetadataRequest, - GetListsMetadataResult, GetModelsRequest, - GetModelsResult, GetModelVersionRequest, - GetModelVersionResult, GetOutcomesRequest, - GetOutcomesResult, GetRulesRequest, - GetRulesResult, GetVariablesRequest, - GetVariablesResult, IngestedEventsDetail, - IngestedEventStatistics, IngestedEventsTimeWindow, InternalServerException, - KMSKey, - Label, LabelSchema, ListEventPredictionsRequest, - ListEventPredictionsResult, ListTagsForResourceRequest, - ListTagsForResourceResult, LogOddsMetric, MetricDataPoint, - Model, ModelEndpointDataBlob, ModelInputConfiguration, ModelOutputConfiguration, @@ -315,33 +241,21 @@ import { OFIMetricDataPoint, OFIModelPerformance, OFITrainingMetricsValue, - Outcome, PredictionExplanations, PredictionTimeRange, PutDetectorRequest, - PutDetectorResult, PutEntityTypeRequest, - PutEntityTypeResult, PutEventTypeRequest, - PutEventTypeResult, PutExternalModelRequest, - PutExternalModelResult, PutKMSEncryptionKeyRequest, - PutKMSEncryptionKeyResult, PutLabelRequest, - PutLabelResult, PutOutcomeRequest, - PutOutcomeResult, ResourceNotFoundException, ResourceUnavailableException, Rule, - RuleDetail, - RuleResult, SendEventRequest, - SendEventResult, Tag, TagResourceRequest, - TagResourceResult, TFIMetricDataPoint, TFIModelPerformance, TFITrainingMetricsValue, @@ -353,31 +267,18 @@ import { TrainingResultV2, UncertaintyRange, UntagResourceRequest, - UntagResourceResult, UpdateDetectorVersionMetadataRequest, - UpdateDetectorVersionMetadataResult, UpdateDetectorVersionRequest, - UpdateDetectorVersionResult, UpdateDetectorVersionStatusRequest, - UpdateDetectorVersionStatusResult, UpdateEventLabelRequest, - UpdateEventLabelResult, UpdateListRequest, - UpdateListResult, UpdateModelRequest, - UpdateModelResult, UpdateModelVersionRequest, - UpdateModelVersionResult, UpdateModelVersionStatusRequest, - UpdateModelVersionStatusResult, UpdateRuleMetadataRequest, - UpdateRuleMetadataResult, UpdateRuleVersionRequest, - UpdateRuleVersionResult, UpdateVariableRequest, - UpdateVariableResult, ValidationException, - Variable, VariableEntry, VariableImpactExplanation, VariableImportanceMetrics, @@ -392,7 +293,7 @@ export const se_BatchCreateVariableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchCreateVariable"); let body: any; - body = JSON.stringify(se_BatchCreateVariableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +306,7 @@ export const se_BatchGetVariableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetVariable"); let body: any; - body = JSON.stringify(se_BatchGetVariableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +319,7 @@ export const se_CancelBatchImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelBatchImportJob"); let body: any; - body = JSON.stringify(se_CancelBatchImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +332,7 @@ export const se_CancelBatchPredictionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelBatchPredictionJob"); let body: any; - body = JSON.stringify(se_CancelBatchPredictionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +345,7 @@ export const se_CreateBatchImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBatchImportJob"); let body: any; - body = JSON.stringify(se_CreateBatchImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +358,7 @@ export const se_CreateBatchPredictionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBatchPredictionJob"); let body: any; - body = JSON.stringify(se_CreateBatchPredictionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -470,7 +371,7 @@ export const se_CreateDetectorVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDetectorVersion"); let body: any; - body = JSON.stringify(se_CreateDetectorVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -483,7 +384,7 @@ export const se_CreateListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateList"); let body: any; - body = JSON.stringify(se_CreateListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -496,7 +397,7 @@ export const se_CreateModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModel"); let body: any; - body = JSON.stringify(se_CreateModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -509,7 +410,7 @@ export const se_CreateModelVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModelVersion"); let body: any; - body = JSON.stringify(se_CreateModelVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +423,7 @@ export const se_CreateRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRule"); let body: any; - body = JSON.stringify(se_CreateRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -535,7 +436,7 @@ export const se_CreateVariableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVariable"); let body: any; - body = JSON.stringify(se_CreateVariableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -548,7 +449,7 @@ export const se_DeleteBatchImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBatchImportJob"); let body: any; - body = JSON.stringify(se_DeleteBatchImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +462,7 @@ export const se_DeleteBatchPredictionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBatchPredictionJob"); let body: any; - body = JSON.stringify(se_DeleteBatchPredictionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -574,7 +475,7 @@ export const se_DeleteDetectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDetector"); let body: any; - body = JSON.stringify(se_DeleteDetectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -587,7 +488,7 @@ export const se_DeleteDetectorVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDetectorVersion"); let body: any; - body = JSON.stringify(se_DeleteDetectorVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -600,7 +501,7 @@ export const se_DeleteEntityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEntityType"); let body: any; - body = JSON.stringify(se_DeleteEntityTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -613,7 +514,7 @@ export const se_DeleteEventCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEvent"); let body: any; - body = JSON.stringify(se_DeleteEventRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -626,7 +527,7 @@ export const se_DeleteEventsByEventTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventsByEventType"); let body: any; - body = JSON.stringify(se_DeleteEventsByEventTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -639,7 +540,7 @@ export const se_DeleteEventTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventType"); let body: any; - body = JSON.stringify(se_DeleteEventTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -652,7 +553,7 @@ export const se_DeleteExternalModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteExternalModel"); let body: any; - body = JSON.stringify(se_DeleteExternalModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -665,7 +566,7 @@ export const se_DeleteLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLabel"); let body: any; - body = JSON.stringify(se_DeleteLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -678,7 +579,7 @@ export const se_DeleteListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteList"); let body: any; - body = JSON.stringify(se_DeleteListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -691,7 +592,7 @@ export const se_DeleteModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModel"); let body: any; - body = JSON.stringify(se_DeleteModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -704,7 +605,7 @@ export const se_DeleteModelVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelVersion"); let body: any; - body = JSON.stringify(se_DeleteModelVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -717,7 +618,7 @@ export const se_DeleteOutcomeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOutcome"); let body: any; - body = JSON.stringify(se_DeleteOutcomeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -730,7 +631,7 @@ export const se_DeleteRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRule"); let body: any; - body = JSON.stringify(se_DeleteRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -743,7 +644,7 @@ export const se_DeleteVariableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVariable"); let body: any; - body = JSON.stringify(se_DeleteVariableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -756,7 +657,7 @@ export const se_DescribeDetectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDetector"); let body: any; - body = JSON.stringify(se_DescribeDetectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -769,7 +670,7 @@ export const se_DescribeModelVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelVersions"); let body: any; - body = JSON.stringify(se_DescribeModelVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -782,7 +683,7 @@ export const se_GetBatchImportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBatchImportJobs"); let body: any; - body = JSON.stringify(se_GetBatchImportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -795,7 +696,7 @@ export const se_GetBatchPredictionJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBatchPredictionJobs"); let body: any; - body = JSON.stringify(se_GetBatchPredictionJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -808,7 +709,7 @@ export const se_GetDeleteEventsByEventTypeStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeleteEventsByEventTypeStatus"); let body: any; - body = JSON.stringify(se_GetDeleteEventsByEventTypeStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -821,7 +722,7 @@ export const se_GetDetectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDetectors"); let body: any; - body = JSON.stringify(se_GetDetectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -834,7 +735,7 @@ export const se_GetDetectorVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDetectorVersion"); let body: any; - body = JSON.stringify(se_GetDetectorVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -847,7 +748,7 @@ export const se_GetEntityTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEntityTypes"); let body: any; - body = JSON.stringify(se_GetEntityTypesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -860,7 +761,7 @@ export const se_GetEventCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEvent"); let body: any; - body = JSON.stringify(se_GetEventRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -886,7 +787,7 @@ export const se_GetEventPredictionMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEventPredictionMetadata"); let body: any; - body = JSON.stringify(se_GetEventPredictionMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -899,7 +800,7 @@ export const se_GetEventTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEventTypes"); let body: any; - body = JSON.stringify(se_GetEventTypesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -912,7 +813,7 @@ export const se_GetExternalModelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetExternalModels"); let body: any; - body = JSON.stringify(se_GetExternalModelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -937,7 +838,7 @@ export const se_GetLabelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLabels"); let body: any; - body = JSON.stringify(se_GetLabelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -950,7 +851,7 @@ export const se_GetListElementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetListElements"); let body: any; - body = JSON.stringify(se_GetListElementsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -963,7 +864,7 @@ export const se_GetListsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetListsMetadata"); let body: any; - body = JSON.stringify(se_GetListsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -976,7 +877,7 @@ export const se_GetModelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetModels"); let body: any; - body = JSON.stringify(se_GetModelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -989,7 +890,7 @@ export const se_GetModelVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetModelVersion"); let body: any; - body = JSON.stringify(se_GetModelVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1002,7 +903,7 @@ export const se_GetOutcomesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOutcomes"); let body: any; - body = JSON.stringify(se_GetOutcomesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1015,7 +916,7 @@ export const se_GetRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRules"); let body: any; - body = JSON.stringify(se_GetRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1028,7 +929,7 @@ export const se_GetVariablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVariables"); let body: any; - body = JSON.stringify(se_GetVariablesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1041,7 +942,7 @@ export const se_ListEventPredictionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventPredictions"); let body: any; - body = JSON.stringify(se_ListEventPredictionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1054,7 +955,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1067,7 +968,7 @@ export const se_PutDetectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutDetector"); let body: any; - body = JSON.stringify(se_PutDetectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1080,7 +981,7 @@ export const se_PutEntityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutEntityType"); let body: any; - body = JSON.stringify(se_PutEntityTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1093,7 +994,7 @@ export const se_PutEventTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutEventType"); let body: any; - body = JSON.stringify(se_PutEventTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1106,7 +1007,7 @@ export const se_PutExternalModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutExternalModel"); let body: any; - body = JSON.stringify(se_PutExternalModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1119,7 +1020,7 @@ export const se_PutKMSEncryptionKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutKMSEncryptionKey"); let body: any; - body = JSON.stringify(se_PutKMSEncryptionKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1132,7 +1033,7 @@ export const se_PutLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLabel"); let body: any; - body = JSON.stringify(se_PutLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1145,7 +1046,7 @@ export const se_PutOutcomeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutOutcome"); let body: any; - body = JSON.stringify(se_PutOutcomeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1158,7 +1059,7 @@ export const se_SendEventCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendEvent"); let body: any; - body = JSON.stringify(se_SendEventRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1171,7 +1072,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1184,7 +1085,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1197,7 +1098,7 @@ export const se_UpdateDetectorVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDetectorVersion"); let body: any; - body = JSON.stringify(se_UpdateDetectorVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1210,7 +1111,7 @@ export const se_UpdateDetectorVersionMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDetectorVersionMetadata"); let body: any; - body = JSON.stringify(se_UpdateDetectorVersionMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1223,7 +1124,7 @@ export const se_UpdateDetectorVersionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDetectorVersionStatus"); let body: any; - body = JSON.stringify(se_UpdateDetectorVersionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1236,7 +1137,7 @@ export const se_UpdateEventLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEventLabel"); let body: any; - body = JSON.stringify(se_UpdateEventLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1249,7 +1150,7 @@ export const se_UpdateListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateList"); let body: any; - body = JSON.stringify(se_UpdateListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1262,7 +1163,7 @@ export const se_UpdateModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateModel"); let body: any; - body = JSON.stringify(se_UpdateModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1275,7 +1176,7 @@ export const se_UpdateModelVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateModelVersion"); let body: any; - body = JSON.stringify(se_UpdateModelVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1288,7 +1189,7 @@ export const se_UpdateModelVersionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateModelVersionStatus"); let body: any; - body = JSON.stringify(se_UpdateModelVersionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1301,7 +1202,7 @@ export const se_UpdateRuleMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRuleMetadata"); let body: any; - body = JSON.stringify(se_UpdateRuleMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1314,7 +1215,7 @@ export const se_UpdateRuleVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRuleVersion"); let body: any; - body = JSON.stringify(se_UpdateRuleVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1327,7 +1228,7 @@ export const se_UpdateVariableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVariable"); let body: any; - body = JSON.stringify(se_UpdateVariableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1343,12 +1244,12 @@ export const de_BatchCreateVariableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchCreateVariableResult(data, context); + contents = _json(data); const response: BatchCreateVariableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1378,10 +1279,9 @@ const de_BatchCreateVariableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1399,12 +1299,12 @@ export const de_BatchGetVariableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetVariableResult(data, context); + contents = _json(data); const response: BatchGetVariableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1434,10 +1334,9 @@ const de_BatchGetVariableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1455,12 +1354,12 @@ export const de_CancelBatchImportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelBatchImportJobResult(data, context); + contents = _json(data); const response: CancelBatchImportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1493,10 +1392,9 @@ const de_CancelBatchImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1514,12 +1412,12 @@ export const de_CancelBatchPredictionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelBatchPredictionJobResult(data, context); + contents = _json(data); const response: CancelBatchPredictionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1552,10 +1450,9 @@ const de_CancelBatchPredictionJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,12 +1470,12 @@ export const de_CreateBatchImportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBatchImportJobResult(data, context); + contents = _json(data); const response: CreateBatchImportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1611,10 +1508,9 @@ const de_CreateBatchImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1632,12 +1528,12 @@ export const de_CreateBatchPredictionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBatchPredictionJobResult(data, context); + contents = _json(data); const response: CreateBatchPredictionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1670,10 +1566,9 @@ const de_CreateBatchPredictionJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1691,12 +1586,12 @@ export const de_CreateDetectorVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDetectorVersionResult(data, context); + contents = _json(data); const response: CreateDetectorVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1729,10 +1624,9 @@ const de_CreateDetectorVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1750,12 +1644,12 @@ export const de_CreateListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateListResult(data, context); + contents = _json(data); const response: CreateListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1785,10 +1679,9 @@ const de_CreateListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1806,12 +1699,12 @@ export const de_CreateModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelResult(data, context); + contents = _json(data); const response: CreateModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1841,10 +1734,9 @@ const de_CreateModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,12 +1754,12 @@ export const de_CreateModelVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelVersionResult(data, context); + contents = _json(data); const response: CreateModelVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1900,10 +1792,9 @@ const de_CreateModelVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1921,12 +1812,12 @@ export const de_CreateRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRuleResult(data, context); + contents = _json(data); const response: CreateRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1956,10 +1847,9 @@ const de_CreateRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1977,12 +1867,12 @@ export const de_CreateVariableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateVariableResult(data, context); + contents = _json(data); const response: CreateVariableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2012,10 +1902,9 @@ const de_CreateVariableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2033,12 +1922,12 @@ export const de_DeleteBatchImportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBatchImportJobResult(data, context); + contents = _json(data); const response: DeleteBatchImportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2068,10 +1957,9 @@ const de_DeleteBatchImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2089,12 +1977,12 @@ export const de_DeleteBatchPredictionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBatchPredictionJobResult(data, context); + contents = _json(data); const response: DeleteBatchPredictionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2124,10 +2012,9 @@ const de_DeleteBatchPredictionJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2145,12 +2032,12 @@ export const de_DeleteDetectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDetectorResult(data, context); + contents = _json(data); const response: DeleteDetectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2183,10 +2070,9 @@ const de_DeleteDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2204,12 +2090,12 @@ export const de_DeleteDetectorVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDetectorVersionResult(data, context); + contents = _json(data); const response: DeleteDetectorVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2245,10 +2131,9 @@ const de_DeleteDetectorVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2266,12 +2151,12 @@ export const de_DeleteEntityTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEntityTypeResult(data, context); + contents = _json(data); const response: DeleteEntityTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2304,10 +2189,9 @@ const de_DeleteEntityTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2325,12 +2209,12 @@ export const de_DeleteEventCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEventResult(data, context); + contents = _json(data); const response: DeleteEventCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2360,10 +2244,9 @@ const de_DeleteEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2381,12 +2264,12 @@ export const de_DeleteEventsByEventTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEventsByEventTypeResult(data, context); + contents = _json(data); const response: DeleteEventsByEventTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2422,10 +2305,9 @@ const de_DeleteEventsByEventTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2443,12 +2325,12 @@ export const de_DeleteEventTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEventTypeResult(data, context); + contents = _json(data); const response: DeleteEventTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2481,10 +2363,9 @@ const de_DeleteEventTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2502,12 +2383,12 @@ export const de_DeleteExternalModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteExternalModelResult(data, context); + contents = _json(data); const response: DeleteExternalModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2540,10 +2421,9 @@ const de_DeleteExternalModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2561,12 +2441,12 @@ export const de_DeleteLabelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLabelResult(data, context); + contents = _json(data); const response: DeleteLabelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2596,10 +2476,9 @@ const de_DeleteLabelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2617,12 +2496,12 @@ export const de_DeleteListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteListResult(data, context); + contents = _json(data); const response: DeleteListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2655,10 +2534,9 @@ const de_DeleteListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,12 +2554,12 @@ export const de_DeleteModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteModelResult(data, context); + contents = _json(data); const response: DeleteModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2714,10 +2592,9 @@ const de_DeleteModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2735,12 +2612,12 @@ export const de_DeleteModelVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteModelVersionResult(data, context); + contents = _json(data); const response: DeleteModelVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2773,10 +2650,9 @@ const de_DeleteModelVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2794,12 +2670,12 @@ export const de_DeleteOutcomeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteOutcomeResult(data, context); + contents = _json(data); const response: DeleteOutcomeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2832,10 +2708,9 @@ const de_DeleteOutcomeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2853,12 +2728,12 @@ export const de_DeleteRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRuleResult(data, context); + contents = _json(data); const response: DeleteRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2891,10 +2766,9 @@ const de_DeleteRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2912,12 +2786,12 @@ export const de_DeleteVariableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVariableResult(data, context); + contents = _json(data); const response: DeleteVariableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2950,10 +2824,9 @@ const de_DeleteVariableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2971,12 +2844,12 @@ export const de_DescribeDetectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDetectorResult(data, context); + contents = _json(data); const response: DescribeDetectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3009,10 +2882,9 @@ const de_DescribeDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3035,7 +2907,7 @@ export const de_DescribeModelVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3068,10 +2940,9 @@ const de_DescribeModelVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3089,12 +2960,12 @@ export const de_GetBatchImportJobsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetBatchImportJobsResult(data, context); + contents = _json(data); const response: GetBatchImportJobsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3127,10 +2998,9 @@ const de_GetBatchImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3148,12 +3018,12 @@ export const de_GetBatchPredictionJobsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetBatchPredictionJobsResult(data, context); + contents = _json(data); const response: GetBatchPredictionJobsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3186,10 +3056,9 @@ const de_GetBatchPredictionJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3207,12 +3076,12 @@ export const de_GetDeleteEventsByEventTypeStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDeleteEventsByEventTypeStatusResult(data, context); + contents = _json(data); const response: GetDeleteEventsByEventTypeStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3245,10 +3114,9 @@ const de_GetDeleteEventsByEventTypeStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3266,12 +3134,12 @@ export const de_GetDetectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDetectorsResult(data, context); + contents = _json(data); const response: GetDetectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3304,10 +3172,9 @@ const de_GetDetectorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3325,12 +3192,12 @@ export const de_GetDetectorVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDetectorVersionResult(data, context); + contents = _json(data); const response: GetDetectorVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3363,10 +3230,9 @@ const de_GetDetectorVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3384,12 +3250,12 @@ export const de_GetEntityTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetEntityTypesResult(data, context); + contents = _json(data); const response: GetEntityTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3422,10 +3288,9 @@ const de_GetEntityTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3443,12 +3308,12 @@ export const de_GetEventCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetEventResult(data, context); + contents = _json(data); const response: GetEventCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3481,10 +3346,9 @@ const de_GetEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3507,7 +3371,7 @@ export const de_GetEventPredictionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3546,10 +3410,9 @@ const de_GetEventPredictionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3572,7 +3435,7 @@ export const de_GetEventPredictionMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3605,10 +3468,9 @@ const de_GetEventPredictionMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,12 +3488,12 @@ export const de_GetEventTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetEventTypesResult(data, context); + contents = _json(data); const response: GetEventTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3664,10 +3526,9 @@ const de_GetEventTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3685,12 +3546,12 @@ export const de_GetExternalModelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetExternalModelsResult(data, context); + contents = _json(data); const response: GetExternalModelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3723,10 +3584,9 @@ const de_GetExternalModelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3744,12 +3604,12 @@ export const de_GetKMSEncryptionKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetKMSEncryptionKeyResult(data, context); + contents = _json(data); const response: GetKMSEncryptionKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3779,10 +3639,9 @@ const de_GetKMSEncryptionKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3800,12 +3659,12 @@ export const de_GetLabelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLabelsResult(data, context); + contents = _json(data); const response: GetLabelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3838,10 +3697,9 @@ const de_GetLabelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3859,12 +3717,12 @@ export const de_GetListElementsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetListElementsResult(data, context); + contents = _json(data); const response: GetListElementsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3897,10 +3755,9 @@ const de_GetListElementsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3918,12 +3775,12 @@ export const de_GetListsMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetListsMetadataResult(data, context); + contents = _json(data); const response: GetListsMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3956,10 +3813,9 @@ const de_GetListsMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3977,12 +3833,12 @@ export const de_GetModelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetModelsResult(data, context); + contents = _json(data); const response: GetModelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4015,10 +3871,9 @@ const de_GetModelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4036,12 +3891,12 @@ export const de_GetModelVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetModelVersionResult(data, context); + contents = _json(data); const response: GetModelVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4074,10 +3929,9 @@ const de_GetModelVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4095,12 +3949,12 @@ export const de_GetOutcomesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetOutcomesResult(data, context); + contents = _json(data); const response: GetOutcomesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4133,10 +3987,9 @@ const de_GetOutcomesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4154,12 +4007,12 @@ export const de_GetRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRulesResult(data, context); + contents = _json(data); const response: GetRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4192,10 +4045,9 @@ const de_GetRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4213,12 +4065,12 @@ export const de_GetVariablesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetVariablesResult(data, context); + contents = _json(data); const response: GetVariablesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4251,10 +4103,9 @@ const de_GetVariablesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4272,12 +4123,12 @@ export const de_ListEventPredictionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEventPredictionsResult(data, context); + contents = _json(data); const response: ListEventPredictionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4307,10 +4158,9 @@ const de_ListEventPredictionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4328,12 +4178,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResult(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4363,10 +4213,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4384,12 +4233,12 @@ export const de_PutDetectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutDetectorResult(data, context); + contents = _json(data); const response: PutDetectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4422,10 +4271,9 @@ const de_PutDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4443,12 +4291,12 @@ export const de_PutEntityTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutEntityTypeResult(data, context); + contents = _json(data); const response: PutEntityTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4481,10 +4329,9 @@ const de_PutEntityTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4502,12 +4349,12 @@ export const de_PutEventTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutEventTypeResult(data, context); + contents = _json(data); const response: PutEventTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4540,10 +4387,9 @@ const de_PutEventTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4561,12 +4407,12 @@ export const de_PutExternalModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutExternalModelResult(data, context); + contents = _json(data); const response: PutExternalModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4599,10 +4445,9 @@ const de_PutExternalModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4620,12 +4465,12 @@ export const de_PutKMSEncryptionKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutKMSEncryptionKeyResult(data, context); + contents = _json(data); const response: PutKMSEncryptionKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4661,10 +4506,9 @@ const de_PutKMSEncryptionKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4682,12 +4526,12 @@ export const de_PutLabelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLabelResult(data, context); + contents = _json(data); const response: PutLabelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4720,10 +4564,9 @@ const de_PutLabelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4741,12 +4584,12 @@ export const de_PutOutcomeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutOutcomeResult(data, context); + contents = _json(data); const response: PutOutcomeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4779,10 +4622,9 @@ const de_PutOutcomeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4800,12 +4642,12 @@ export const de_SendEventCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendEventResult(data, context); + contents = _json(data); const response: SendEventCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4841,10 +4683,9 @@ const de_SendEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4862,12 +4703,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResult(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4897,10 +4738,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4918,12 +4758,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResult(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4953,10 +4793,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4974,12 +4813,12 @@ export const de_UpdateDetectorVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDetectorVersionResult(data, context); + contents = _json(data); const response: UpdateDetectorVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5015,10 +4854,9 @@ const de_UpdateDetectorVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5036,12 +4874,12 @@ export const de_UpdateDetectorVersionMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDetectorVersionMetadataResult(data, context); + contents = _json(data); const response: UpdateDetectorVersionMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5074,10 +4912,9 @@ const de_UpdateDetectorVersionMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5095,12 +4932,12 @@ export const de_UpdateDetectorVersionStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDetectorVersionStatusResult(data, context); + contents = _json(data); const response: UpdateDetectorVersionStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5136,10 +4973,9 @@ const de_UpdateDetectorVersionStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5157,12 +4993,12 @@ export const de_UpdateEventLabelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEventLabelResult(data, context); + contents = _json(data); const response: UpdateEventLabelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5198,10 +5034,9 @@ const de_UpdateEventLabelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5219,12 +5054,12 @@ export const de_UpdateListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateListResult(data, context); + contents = _json(data); const response: UpdateListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5260,10 +5095,9 @@ const de_UpdateListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5281,12 +5115,12 @@ export const de_UpdateModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateModelResult(data, context); + contents = _json(data); const response: UpdateModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5322,10 +5156,9 @@ const de_UpdateModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5343,12 +5176,12 @@ export const de_UpdateModelVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateModelVersionResult(data, context); + contents = _json(data); const response: UpdateModelVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5384,10 +5217,9 @@ const de_UpdateModelVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5405,12 +5237,12 @@ export const de_UpdateModelVersionStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateModelVersionStatusResult(data, context); + contents = _json(data); const response: UpdateModelVersionStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5446,10 +5278,9 @@ const de_UpdateModelVersionStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5467,12 +5298,12 @@ export const de_UpdateRuleMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleMetadataResult(data, context); + contents = _json(data); const response: UpdateRuleMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5508,10 +5339,9 @@ const de_UpdateRuleMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5529,12 +5359,12 @@ export const de_UpdateRuleVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleVersionResult(data, context); + contents = _json(data); const response: UpdateRuleVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5570,10 +5400,9 @@ const de_UpdateRuleVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5591,12 +5420,12 @@ export const de_UpdateVariableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateVariableResult(data, context); + contents = _json(data); const response: UpdateVariableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5632,10 +5461,9 @@ const de_UpdateVariableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5649,7 +5477,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5662,7 +5490,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5678,7 +5506,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5694,7 +5522,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5710,7 +5538,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5723,7 +5551,7 @@ const de_ResourceUnavailableExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5736,7 +5564,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5744,397 +5572,75 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1BatchCreateVariableRequest - */ -const se_BatchCreateVariableRequest = (input: BatchCreateVariableRequest, context: __SerdeContext): any => { - return { - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - ...(input.variableEntries != null && { variableEntries: se_VariableEntryList(input.variableEntries, context) }), - }; -}; +// se_BatchCreateVariableRequest omitted. -/** - * serializeAws_json1_1BatchGetVariableRequest - */ -const se_BatchGetVariableRequest = (input: BatchGetVariableRequest, context: __SerdeContext): any => { - return { - ...(input.names != null && { names: se_NameList(input.names, context) }), - }; -}; +// se_BatchGetVariableRequest omitted. -/** - * serializeAws_json1_1CancelBatchImportJobRequest - */ -const se_CancelBatchImportJobRequest = (input: CancelBatchImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; +// se_CancelBatchImportJobRequest omitted. -/** - * serializeAws_json1_1CancelBatchPredictionJobRequest - */ -const se_CancelBatchPredictionJobRequest = (input: CancelBatchPredictionJobRequest, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; +// se_CancelBatchPredictionJobRequest omitted. -/** - * serializeAws_json1_1CreateBatchImportJobRequest - */ -const se_CreateBatchImportJobRequest = (input: CreateBatchImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.iamRoleArn != null && { iamRoleArn: input.iamRoleArn }), - ...(input.inputPath != null && { inputPath: input.inputPath }), - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.outputPath != null && { outputPath: input.outputPath }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_CreateBatchImportJobRequest omitted. -/** - * serializeAws_json1_1CreateBatchPredictionJobRequest - */ -const se_CreateBatchPredictionJobRequest = (input: CreateBatchPredictionJobRequest, context: __SerdeContext): any => { - return { - ...(input.detectorName != null && { detectorName: input.detectorName }), - ...(input.detectorVersion != null && { detectorVersion: input.detectorVersion }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.iamRoleArn != null && { iamRoleArn: input.iamRoleArn }), - ...(input.inputPath != null && { inputPath: input.inputPath }), - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.outputPath != null && { outputPath: input.outputPath }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_CreateBatchPredictionJobRequest omitted. -/** - * serializeAws_json1_1CreateDetectorVersionRequest - */ -const se_CreateDetectorVersionRequest = (input: CreateDetectorVersionRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.externalModelEndpoints != null && { - externalModelEndpoints: se_ListOfStrings(input.externalModelEndpoints, context), - }), - ...(input.modelVersions != null && { modelVersions: se_ListOfModelVersions(input.modelVersions, context) }), - ...(input.ruleExecutionMode != null && { ruleExecutionMode: input.ruleExecutionMode }), - ...(input.rules != null && { rules: se_RuleList(input.rules, context) }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_CreateDetectorVersionRequest omitted. -/** - * serializeAws_json1_1CreateListRequest - */ -const se_CreateListRequest = (input: CreateListRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.elements != null && { elements: se_ElementsList(input.elements, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - ...(input.variableType != null && { variableType: input.variableType }), - }; -}; +// se_CreateListRequest omitted. -/** - * serializeAws_json1_1CreateModelRequest - */ -const se_CreateModelRequest = (input: CreateModelRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_CreateModelRequest omitted. -/** - * serializeAws_json1_1CreateModelVersionRequest - */ -const se_CreateModelVersionRequest = (input: CreateModelVersionRequest, context: __SerdeContext): any => { - return { - ...(input.externalEventsDetail != null && { - externalEventsDetail: se_ExternalEventsDetail(input.externalEventsDetail, context), - }), - ...(input.ingestedEventsDetail != null && { - ingestedEventsDetail: se_IngestedEventsDetail(input.ingestedEventsDetail, context), - }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - ...(input.trainingDataSchema != null && { - trainingDataSchema: se_TrainingDataSchema(input.trainingDataSchema, context), - }), - ...(input.trainingDataSource != null && { trainingDataSource: input.trainingDataSource }), - }; -}; +// se_CreateModelVersionRequest omitted. -/** - * serializeAws_json1_1CreateRuleRequest - */ -const se_CreateRuleRequest = (input: CreateRuleRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.expression != null && { expression: input.expression }), - ...(input.language != null && { language: input.language }), - ...(input.outcomes != null && { outcomes: se_NonEmptyListOfStrings(input.outcomes, context) }), - ...(input.ruleId != null && { ruleId: input.ruleId }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_CreateRuleRequest omitted. -/** - * serializeAws_json1_1CreateVariableRequest - */ -const se_CreateVariableRequest = (input: CreateVariableRequest, context: __SerdeContext): any => { - return { - ...(input.dataSource != null && { dataSource: input.dataSource }), - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - ...(input.variableType != null && { variableType: input.variableType }), - }; -}; +// se_CreateVariableRequest omitted. -/** - * serializeAws_json1_1CsvIndexToVariableMap - */ -const se_CsvIndexToVariableMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CsvIndexToVariableMap omitted. -/** - * serializeAws_json1_1DeleteBatchImportJobRequest - */ -const se_DeleteBatchImportJobRequest = (input: DeleteBatchImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; +// se_DeleteBatchImportJobRequest omitted. -/** - * serializeAws_json1_1DeleteBatchPredictionJobRequest - */ -const se_DeleteBatchPredictionJobRequest = (input: DeleteBatchPredictionJobRequest, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - }; -}; +// se_DeleteBatchPredictionJobRequest omitted. -/** - * serializeAws_json1_1DeleteDetectorRequest - */ -const se_DeleteDetectorRequest = (input: DeleteDetectorRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - }; -}; +// se_DeleteDetectorRequest omitted. -/** - * serializeAws_json1_1DeleteDetectorVersionRequest - */ -const se_DeleteDetectorVersionRequest = (input: DeleteDetectorVersionRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - }; -}; +// se_DeleteDetectorVersionRequest omitted. -/** - * serializeAws_json1_1DeleteEntityTypeRequest - */ -const se_DeleteEntityTypeRequest = (input: DeleteEntityTypeRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteEntityTypeRequest omitted. -/** - * serializeAws_json1_1DeleteEventRequest - */ -const se_DeleteEventRequest = (input: DeleteEventRequest, context: __SerdeContext): any => { - return { - ...(input.deleteAuditHistory != null && { deleteAuditHistory: input.deleteAuditHistory }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - }; -}; +// se_DeleteEventRequest omitted. -/** - * serializeAws_json1_1DeleteEventsByEventTypeRequest - */ -const se_DeleteEventsByEventTypeRequest = (input: DeleteEventsByEventTypeRequest, context: __SerdeContext): any => { - return { - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - }; -}; +// se_DeleteEventsByEventTypeRequest omitted. -/** - * serializeAws_json1_1DeleteEventTypeRequest - */ -const se_DeleteEventTypeRequest = (input: DeleteEventTypeRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteEventTypeRequest omitted. -/** - * serializeAws_json1_1DeleteExternalModelRequest - */ -const se_DeleteExternalModelRequest = (input: DeleteExternalModelRequest, context: __SerdeContext): any => { - return { - ...(input.modelEndpoint != null && { modelEndpoint: input.modelEndpoint }), - }; -}; +// se_DeleteExternalModelRequest omitted. -/** - * serializeAws_json1_1DeleteLabelRequest - */ -const se_DeleteLabelRequest = (input: DeleteLabelRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteLabelRequest omitted. -/** - * serializeAws_json1_1DeleteListRequest - */ -const se_DeleteListRequest = (input: DeleteListRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteListRequest omitted. -/** - * serializeAws_json1_1DeleteModelRequest - */ -const se_DeleteModelRequest = (input: DeleteModelRequest, context: __SerdeContext): any => { - return { - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - }; -}; +// se_DeleteModelRequest omitted. -/** - * serializeAws_json1_1DeleteModelVersionRequest - */ -const se_DeleteModelVersionRequest = (input: DeleteModelVersionRequest, context: __SerdeContext): any => { - return { - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }), - }; -}; +// se_DeleteModelVersionRequest omitted. -/** - * serializeAws_json1_1DeleteOutcomeRequest - */ -const se_DeleteOutcomeRequest = (input: DeleteOutcomeRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteOutcomeRequest omitted. -/** - * serializeAws_json1_1DeleteRuleRequest - */ -const se_DeleteRuleRequest = (input: DeleteRuleRequest, context: __SerdeContext): any => { - return { - ...(input.rule != null && { rule: se_Rule(input.rule, context) }), - }; -}; +// se_DeleteRuleRequest omitted. -/** - * serializeAws_json1_1DeleteVariableRequest - */ -const se_DeleteVariableRequest = (input: DeleteVariableRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteVariableRequest omitted. -/** - * serializeAws_json1_1DescribeDetectorRequest - */ -const se_DescribeDetectorRequest = (input: DescribeDetectorRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeDetectorRequest omitted. -/** - * serializeAws_json1_1DescribeModelVersionsRequest - */ -const se_DescribeModelVersionsRequest = (input: DescribeModelVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeModelVersionsRequest omitted. -/** - * serializeAws_json1_1ElementsList - */ -const se_ElementsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ElementsList omitted. -/** - * serializeAws_json1_1Entity - */ -const se_Entity = (input: Entity, context: __SerdeContext): any => { - return { - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.entityType != null && { entityType: input.entityType }), - }; -}; +// se_Entity omitted. -/** - * serializeAws_json1_1EventVariableMap - */ -const se_EventVariableMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EventVariableMap omitted. -/** - * serializeAws_json1_1ExternalEventsDetail - */ -const se_ExternalEventsDetail = (input: ExternalEventsDetail, context: __SerdeContext): any => { - return { - ...(input.dataAccessRoleArn != null && { dataAccessRoleArn: input.dataAccessRoleArn }), - ...(input.dataLocation != null && { dataLocation: input.dataLocation }), - }; -}; +// se_ExternalEventsDetail omitted. /** * serializeAws_json1_1ExternalModelEndpointDataBlobMap @@ -6152,2210 +5658,545 @@ const se_ExternalModelEndpointDataBlobMap = ( }, {}); }; -/** - * serializeAws_json1_1FilterCondition - */ -const se_FilterCondition = (input: FilterCondition, context: __SerdeContext): any => { - return { - ...(input.value != null && { value: input.value }), - }; -}; +// se_FilterCondition omitted. -/** - * serializeAws_json1_1GetBatchImportJobsRequest - */ -const se_GetBatchImportJobsRequest = (input: GetBatchImportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetBatchImportJobsRequest omitted. -/** - * serializeAws_json1_1GetBatchPredictionJobsRequest - */ -const se_GetBatchPredictionJobsRequest = (input: GetBatchPredictionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.jobId != null && { jobId: input.jobId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetBatchPredictionJobsRequest omitted. -/** - * serializeAws_json1_1GetDeleteEventsByEventTypeStatusRequest - */ -const se_GetDeleteEventsByEventTypeStatusRequest = ( - input: GetDeleteEventsByEventTypeStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - }; -}; +// se_GetDeleteEventsByEventTypeStatusRequest omitted. -/** - * serializeAws_json1_1GetDetectorsRequest - */ -const se_GetDetectorsRequest = (input: GetDetectorsRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetDetectorsRequest omitted. -/** - * serializeAws_json1_1GetDetectorVersionRequest - */ -const se_GetDetectorVersionRequest = (input: GetDetectorVersionRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - }; -}; +// se_GetDetectorVersionRequest omitted. -/** - * serializeAws_json1_1GetEntityTypesRequest - */ -const se_GetEntityTypesRequest = (input: GetEntityTypesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetEntityTypesRequest omitted. -/** - * serializeAws_json1_1GetEventPredictionMetadataRequest - */ -const se_GetEventPredictionMetadataRequest = ( - input: GetEventPredictionMetadataRequest, - context: __SerdeContext -): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.predictionTimestamp != null && { predictionTimestamp: input.predictionTimestamp }), - }; -}; +// se_GetEventPredictionMetadataRequest omitted. /** * serializeAws_json1_1GetEventPredictionRequest */ const se_GetEventPredictionRequest = (input: GetEventPredictionRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - ...(input.entities != null && { entities: se_listOfEntities(input.entities, context) }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventTimestamp != null && { eventTimestamp: input.eventTimestamp }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.eventVariables != null && { eventVariables: se_EventVariableMap(input.eventVariables, context) }), - ...(input.externalModelEndpointDataBlobs != null && { - externalModelEndpointDataBlobs: se_ExternalModelEndpointDataBlobMap( - input.externalModelEndpointDataBlobs, - context - ), - }), - }; + return take(input, { + detectorId: [], + detectorVersionId: [], + entities: _json, + eventId: [], + eventTimestamp: [], + eventTypeName: [], + eventVariables: _json, + externalModelEndpointDataBlobs: (_) => se_ExternalModelEndpointDataBlobMap(_, context), + }); }; -/** - * serializeAws_json1_1GetEventRequest - */ -const se_GetEventRequest = (input: GetEventRequest, context: __SerdeContext): any => { - return { - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - }; -}; +// se_GetEventRequest omitted. -/** - * serializeAws_json1_1GetEventTypesRequest - */ -const se_GetEventTypesRequest = (input: GetEventTypesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetEventTypesRequest omitted. -/** - * serializeAws_json1_1GetExternalModelsRequest - */ -const se_GetExternalModelsRequest = (input: GetExternalModelsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.modelEndpoint != null && { modelEndpoint: input.modelEndpoint }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetExternalModelsRequest omitted. -/** - * serializeAws_json1_1GetLabelsRequest - */ -const se_GetLabelsRequest = (input: GetLabelsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetLabelsRequest omitted. -/** - * serializeAws_json1_1GetListElementsRequest - */ -const se_GetListElementsRequest = (input: GetListElementsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetListElementsRequest omitted. -/** - * serializeAws_json1_1GetListsMetadataRequest - */ -const se_GetListsMetadataRequest = (input: GetListsMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetListsMetadataRequest omitted. -/** - * serializeAws_json1_1GetModelsRequest - */ -const se_GetModelsRequest = (input: GetModelsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetModelsRequest omitted. -/** - * serializeAws_json1_1GetModelVersionRequest - */ -const se_GetModelVersionRequest = (input: GetModelVersionRequest, context: __SerdeContext): any => { - return { - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }), - }; -}; +// se_GetModelVersionRequest omitted. -/** - * serializeAws_json1_1GetOutcomesRequest - */ -const se_GetOutcomesRequest = (input: GetOutcomesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetOutcomesRequest omitted. -/** - * serializeAws_json1_1GetRulesRequest - */ -const se_GetRulesRequest = (input: GetRulesRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.ruleId != null && { ruleId: input.ruleId }), - ...(input.ruleVersion != null && { ruleVersion: input.ruleVersion }), - }; -}; +// se_GetRulesRequest omitted. -/** - * serializeAws_json1_1GetVariablesRequest - */ -const se_GetVariablesRequest = (input: GetVariablesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetVariablesRequest omitted. -/** - * serializeAws_json1_1IngestedEventsDetail - */ -const se_IngestedEventsDetail = (input: IngestedEventsDetail, context: __SerdeContext): any => { - return { - ...(input.ingestedEventsTimeWindow != null && { - ingestedEventsTimeWindow: se_IngestedEventsTimeWindow(input.ingestedEventsTimeWindow, context), - }), - }; -}; +// se_IngestedEventsDetail omitted. -/** - * serializeAws_json1_1IngestedEventsTimeWindow - */ -const se_IngestedEventsTimeWindow = (input: IngestedEventsTimeWindow, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.startTime != null && { startTime: input.startTime }), - }; -}; +// se_IngestedEventsTimeWindow omitted. -/** - * serializeAws_json1_1JsonKeyToVariableMap - */ -const se_JsonKeyToVariableMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_JsonKeyToVariableMap omitted. -/** - * serializeAws_json1_1labelMapper - */ -const se_labelMapper = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ListOfStrings(value, context); - return acc; - }, {}); -}; +// se_labelMapper omitted. -/** - * serializeAws_json1_1LabelSchema - */ -const se_LabelSchema = (input: LabelSchema, context: __SerdeContext): any => { - return { - ...(input.labelMapper != null && { labelMapper: se_labelMapper(input.labelMapper, context) }), - ...(input.unlabeledEventsTreatment != null && { unlabeledEventsTreatment: input.unlabeledEventsTreatment }), - }; -}; +// se_LabelSchema omitted. -/** - * serializeAws_json1_1ListEventPredictionsRequest - */ -const se_ListEventPredictionsRequest = (input: ListEventPredictionsRequest, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: se_FilterCondition(input.detectorId, context) }), - ...(input.detectorVersionId != null && { detectorVersionId: se_FilterCondition(input.detectorVersionId, context) }), - ...(input.eventId != null && { eventId: se_FilterCondition(input.eventId, context) }), - ...(input.eventType != null && { eventType: se_FilterCondition(input.eventType, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.predictionTimeRange != null && { - predictionTimeRange: se_PredictionTimeRange(input.predictionTimeRange, context), - }), - }; -}; +// se_ListEventPredictionsRequest omitted. -/** - * serializeAws_json1_1listOfEntities - */ -const se_listOfEntities = (input: Entity[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Entity(entry, context); - }); -}; +// se_listOfEntities omitted. -/** - * serializeAws_json1_1ListOfModelVersions - */ -const se_ListOfModelVersions = (input: ModelVersion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ModelVersion(entry, context); - }); -}; +// se_ListOfModelVersions omitted. -/** - * serializeAws_json1_1ListOfStrings - */ -const se_ListOfStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfStrings omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceARN != null && { resourceARN: input.resourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. /** * serializeAws_json1_1ModelEndpointDataBlob */ const se_ModelEndpointDataBlob = (input: ModelEndpointDataBlob, context: __SerdeContext): any => { - return { - ...(input.byteBuffer != null && { byteBuffer: context.base64Encoder(input.byteBuffer) }), - ...(input.contentType != null && { contentType: input.contentType }), - }; -}; - -/** - * serializeAws_json1_1ModelInputConfiguration - */ -const se_ModelInputConfiguration = (input: ModelInputConfiguration, context: __SerdeContext): any => { - return { - ...(input.csvInputTemplate != null && { csvInputTemplate: input.csvInputTemplate }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.format != null && { format: input.format }), - ...(input.jsonInputTemplate != null && { jsonInputTemplate: input.jsonInputTemplate }), - ...(input.useEventVariables != null && { useEventVariables: input.useEventVariables }), - }; -}; - -/** - * serializeAws_json1_1ModelOutputConfiguration - */ -const se_ModelOutputConfiguration = (input: ModelOutputConfiguration, context: __SerdeContext): any => { - return { - ...(input.csvIndexToVariableMap != null && { - csvIndexToVariableMap: se_CsvIndexToVariableMap(input.csvIndexToVariableMap, context), - }), - ...(input.format != null && { format: input.format }), - ...(input.jsonKeyToVariableMap != null && { - jsonKeyToVariableMap: se_JsonKeyToVariableMap(input.jsonKeyToVariableMap, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelVersion - */ -const se_ModelVersion = (input: ModelVersion, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }), - }; -}; - -/** - * serializeAws_json1_1NameList - */ -const se_NameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NonEmptyListOfStrings - */ -const se_NonEmptyListOfStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PredictionTimeRange - */ -const se_PredictionTimeRange = (input: PredictionTimeRange, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.startTime != null && { startTime: input.startTime }), - }; -}; - -/** - * serializeAws_json1_1PutDetectorRequest - */ -const se_PutDetectorRequest = (input: PutDetectorRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutEntityTypeRequest - */ -const se_PutEntityTypeRequest = (input: PutEntityTypeRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutEventTypeRequest - */ -const se_PutEventTypeRequest = (input: PutEventTypeRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.entityTypes != null && { entityTypes: se_NonEmptyListOfStrings(input.entityTypes, context) }), - ...(input.eventIngestion != null && { eventIngestion: input.eventIngestion }), - ...(input.eventVariables != null && { eventVariables: se_NonEmptyListOfStrings(input.eventVariables, context) }), - ...(input.labels != null && { labels: se_ListOfStrings(input.labels, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1PutExternalModelRequest - */ -const se_PutExternalModelRequest = (input: PutExternalModelRequest, context: __SerdeContext): any => { - return { - ...(input.inputConfiguration != null && { - inputConfiguration: se_ModelInputConfiguration(input.inputConfiguration, context), - }), - ...(input.invokeModelEndpointRoleArn != null && { invokeModelEndpointRoleArn: input.invokeModelEndpointRoleArn }), - ...(input.modelEndpoint != null && { modelEndpoint: input.modelEndpoint }), - ...(input.modelEndpointStatus != null && { modelEndpointStatus: input.modelEndpointStatus }), - ...(input.modelSource != null && { modelSource: input.modelSource }), - ...(input.outputConfiguration != null && { - outputConfiguration: se_ModelOutputConfiguration(input.outputConfiguration, context), - }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; + return take(input, { + byteBuffer: context.base64Encoder, + contentType: [], + }); }; -/** - * serializeAws_json1_1PutKMSEncryptionKeyRequest - */ -const se_PutKMSEncryptionKeyRequest = (input: PutKMSEncryptionKeyRequest, context: __SerdeContext): any => { - return { - ...(input.kmsEncryptionKeyArn != null && { kmsEncryptionKeyArn: input.kmsEncryptionKeyArn }), - }; -}; +// se_ModelInputConfiguration omitted. -/** - * serializeAws_json1_1PutLabelRequest - */ -const se_PutLabelRequest = (input: PutLabelRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_ModelOutputConfiguration omitted. -/** - * serializeAws_json1_1PutOutcomeRequest - */ -const se_PutOutcomeRequest = (input: PutOutcomeRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_ModelVersion omitted. -/** - * serializeAws_json1_1Rule - */ -const se_Rule = (input: Rule, context: __SerdeContext): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.ruleId != null && { ruleId: input.ruleId }), - ...(input.ruleVersion != null && { ruleVersion: input.ruleVersion }), - }; -}; +// se_NameList omitted. -/** - * serializeAws_json1_1RuleList - */ -const se_RuleList = (input: Rule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Rule(entry, context); - }); -}; +// se_NonEmptyListOfStrings omitted. -/** - * serializeAws_json1_1SendEventRequest - */ -const se_SendEventRequest = (input: SendEventRequest, context: __SerdeContext): any => { - return { - ...(input.assignedLabel != null && { assignedLabel: input.assignedLabel }), - ...(input.entities != null && { entities: se_listOfEntities(input.entities, context) }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventTimestamp != null && { eventTimestamp: input.eventTimestamp }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.eventVariables != null && { eventVariables: se_EventVariableMap(input.eventVariables, context) }), - ...(input.labelTimestamp != null && { labelTimestamp: input.labelTimestamp }), - }; -}; +// se_PredictionTimeRange omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_PutDetectorRequest omitted. -/** - * serializeAws_json1_1tagKeyList - */ -const se_tagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PutEntityTypeRequest omitted. -/** - * serializeAws_json1_1tagList - */ -const se_tagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_PutEventTypeRequest omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceARN != null && { resourceARN: input.resourceARN }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_PutExternalModelRequest omitted. -/** - * serializeAws_json1_1TrainingDataSchema - */ -const se_TrainingDataSchema = (input: TrainingDataSchema, context: __SerdeContext): any => { - return { - ...(input.labelSchema != null && { labelSchema: se_LabelSchema(input.labelSchema, context) }), - ...(input.modelVariables != null && { modelVariables: se_ListOfStrings(input.modelVariables, context) }), - }; -}; +// se_PutKMSEncryptionKeyRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceARN != null && { resourceARN: input.resourceARN }), - ...(input.tagKeys != null && { tagKeys: se_tagKeyList(input.tagKeys, context) }), - }; -}; +// se_PutLabelRequest omitted. -/** - * serializeAws_json1_1UpdateDetectorVersionMetadataRequest - */ -const se_UpdateDetectorVersionMetadataRequest = ( - input: UpdateDetectorVersionMetadataRequest, - context: __SerdeContext -): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - }; -}; +// se_PutOutcomeRequest omitted. -/** - * serializeAws_json1_1UpdateDetectorVersionRequest - */ -const se_UpdateDetectorVersionRequest = (input: UpdateDetectorVersionRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - ...(input.externalModelEndpoints != null && { - externalModelEndpoints: se_ListOfStrings(input.externalModelEndpoints, context), - }), - ...(input.modelVersions != null && { modelVersions: se_ListOfModelVersions(input.modelVersions, context) }), - ...(input.ruleExecutionMode != null && { ruleExecutionMode: input.ruleExecutionMode }), - ...(input.rules != null && { rules: se_RuleList(input.rules, context) }), - }; -}; +// se_Rule omitted. -/** - * serializeAws_json1_1UpdateDetectorVersionStatusRequest - */ -const se_UpdateDetectorVersionStatusRequest = ( - input: UpdateDetectorVersionStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.detectorId != null && { detectorId: input.detectorId }), - ...(input.detectorVersionId != null && { detectorVersionId: input.detectorVersionId }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_RuleList omitted. -/** - * serializeAws_json1_1UpdateEventLabelRequest - */ -const se_UpdateEventLabelRequest = (input: UpdateEventLabelRequest, context: __SerdeContext): any => { - return { - ...(input.assignedLabel != null && { assignedLabel: input.assignedLabel }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventTypeName != null && { eventTypeName: input.eventTypeName }), - ...(input.labelTimestamp != null && { labelTimestamp: input.labelTimestamp }), - }; -}; +// se_SendEventRequest omitted. -/** - * serializeAws_json1_1UpdateListRequest - */ -const se_UpdateListRequest = (input: UpdateListRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.elements != null && { elements: se_ElementsList(input.elements, context) }), - ...(input.name != null && { name: input.name }), - ...(input.updateMode != null && { updateMode: input.updateMode }), - ...(input.variableType != null && { variableType: input.variableType }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1UpdateModelRequest - */ -const se_UpdateModelRequest = (input: UpdateModelRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - }; -}; +// se_tagKeyList omitted. -/** - * serializeAws_json1_1UpdateModelVersionRequest - */ -const se_UpdateModelVersionRequest = (input: UpdateModelVersionRequest, context: __SerdeContext): any => { - return { - ...(input.externalEventsDetail != null && { - externalEventsDetail: se_ExternalEventsDetail(input.externalEventsDetail, context), - }), - ...(input.ingestedEventsDetail != null && { - ingestedEventsDetail: se_IngestedEventsDetail(input.ingestedEventsDetail, context), - }), - ...(input.majorVersionNumber != null && { majorVersionNumber: input.majorVersionNumber }), - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; +// se_tagList omitted. -/** - * serializeAws_json1_1UpdateModelVersionStatusRequest - */ -const se_UpdateModelVersionStatusRequest = (input: UpdateModelVersionStatusRequest, context: __SerdeContext): any => { - return { - ...(input.modelId != null && { modelId: input.modelId }), - ...(input.modelType != null && { modelType: input.modelType }), - ...(input.modelVersionNumber != null && { modelVersionNumber: input.modelVersionNumber }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateRuleMetadataRequest - */ -const se_UpdateRuleMetadataRequest = (input: UpdateRuleMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.rule != null && { rule: se_Rule(input.rule, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateRuleVersionRequest - */ -const se_UpdateRuleVersionRequest = (input: UpdateRuleVersionRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.expression != null && { expression: input.expression }), - ...(input.language != null && { language: input.language }), - ...(input.outcomes != null && { outcomes: se_NonEmptyListOfStrings(input.outcomes, context) }), - ...(input.rule != null && { rule: se_Rule(input.rule, context) }), - ...(input.tags != null && { tags: se_tagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateVariableRequest - */ -const se_UpdateVariableRequest = (input: UpdateVariableRequest, context: __SerdeContext): any => { - return { - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.variableType != null && { variableType: input.variableType }), - }; -}; - -/** - * serializeAws_json1_1VariableEntry - */ -const se_VariableEntry = (input: VariableEntry, context: __SerdeContext): any => { - return { - ...(input.dataSource != null && { dataSource: input.dataSource }), - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.variableType != null && { variableType: input.variableType }), - }; -}; - -/** - * serializeAws_json1_1VariableEntryList - */ -const se_VariableEntryList = (input: VariableEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VariableEntry(entry, context); - }); -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AggregatedLogOddsMetric - */ -const de_AggregatedLogOddsMetric = (output: any, context: __SerdeContext): AggregatedLogOddsMetric => { - return { - aggregatedVariablesImportance: __limitedParseFloat32(output.aggregatedVariablesImportance), - variableNames: output.variableNames != null ? de_ListOfStrings(output.variableNames, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AggregatedVariablesImpactExplanation - */ -const de_AggregatedVariablesImpactExplanation = ( - output: any, - context: __SerdeContext -): AggregatedVariablesImpactExplanation => { - return { - eventVariableNames: - output.eventVariableNames != null ? de_ListOfStrings(output.eventVariableNames, context) : undefined, - logOddsImpact: __limitedParseFloat32(output.logOddsImpact), - relativeImpact: __expectString(output.relativeImpact), - } as any; -}; - -/** - * deserializeAws_json1_1AggregatedVariablesImportanceMetrics - */ -const de_AggregatedVariablesImportanceMetrics = ( - output: any, - context: __SerdeContext -): AggregatedVariablesImportanceMetrics => { - return { - logOddsMetrics: - output.logOddsMetrics != null ? de_ListOfAggregatedLogOddsMetrics(output.logOddsMetrics, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AllowDenyList - */ -const de_AllowDenyList = (output: any, context: __SerdeContext): AllowDenyList => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - name: __expectString(output.name), - updatedTime: __expectString(output.updatedTime), - variableType: __expectString(output.variableType), - } as any; -}; - -/** - * deserializeAws_json1_1AllowDenyLists - */ -const de_AllowDenyLists = (output: any, context: __SerdeContext): AllowDenyList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AllowDenyList(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ATIMetricDataPoint - */ -const de_ATIMetricDataPoint = (output: any, context: __SerdeContext): ATIMetricDataPoint => { - return { - adr: __limitedParseFloat32(output.adr), - atodr: __limitedParseFloat32(output.atodr), - cr: __limitedParseFloat32(output.cr), - threshold: __limitedParseFloat32(output.threshold), - } as any; -}; - -/** - * deserializeAws_json1_1ATIMetricDataPointsList - */ -const de_ATIMetricDataPointsList = (output: any, context: __SerdeContext): ATIMetricDataPoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ATIMetricDataPoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ATIModelPerformance - */ -const de_ATIModelPerformance = (output: any, context: __SerdeContext): ATIModelPerformance => { - return { - asi: __limitedParseFloat32(output.asi), - } as any; -}; - -/** - * deserializeAws_json1_1ATITrainingMetricsValue - */ -const de_ATITrainingMetricsValue = (output: any, context: __SerdeContext): ATITrainingMetricsValue => { - return { - metricDataPoints: - output.metricDataPoints != null ? de_ATIMetricDataPointsList(output.metricDataPoints, context) : undefined, - modelPerformance: - output.modelPerformance != null ? de_ATIModelPerformance(output.modelPerformance, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchCreateVariableError - */ -const de_BatchCreateVariableError = (output: any, context: __SerdeContext): BatchCreateVariableError => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1BatchCreateVariableErrorList - */ -const de_BatchCreateVariableErrorList = (output: any, context: __SerdeContext): BatchCreateVariableError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchCreateVariableError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchCreateVariableResult - */ -const de_BatchCreateVariableResult = (output: any, context: __SerdeContext): BatchCreateVariableResult => { - return { - errors: output.errors != null ? de_BatchCreateVariableErrorList(output.errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetVariableError - */ -const de_BatchGetVariableError = (output: any, context: __SerdeContext): BatchGetVariableError => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetVariableErrorList - */ -const de_BatchGetVariableErrorList = (output: any, context: __SerdeContext): BatchGetVariableError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetVariableError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchGetVariableResult - */ -const de_BatchGetVariableResult = (output: any, context: __SerdeContext): BatchGetVariableResult => { - return { - errors: output.errors != null ? de_BatchGetVariableErrorList(output.errors, context) : undefined, - variables: output.variables != null ? de_VariableList(output.variables, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchImport - */ -const de_BatchImport = (output: any, context: __SerdeContext): BatchImport => { - return { - arn: __expectString(output.arn), - completionTime: __expectString(output.completionTime), - eventTypeName: __expectString(output.eventTypeName), - failedRecordsCount: __expectInt32(output.failedRecordsCount), - failureReason: __expectString(output.failureReason), - iamRoleArn: __expectString(output.iamRoleArn), - inputPath: __expectString(output.inputPath), - jobId: __expectString(output.jobId), - outputPath: __expectString(output.outputPath), - processedRecordsCount: __expectInt32(output.processedRecordsCount), - startTime: __expectString(output.startTime), - status: __expectString(output.status), - totalRecordsCount: __expectInt32(output.totalRecordsCount), - } as any; -}; - -/** - * deserializeAws_json1_1BatchImportList - */ -const de_BatchImportList = (output: any, context: __SerdeContext): BatchImport[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchImport(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchPrediction - */ -const de_BatchPrediction = (output: any, context: __SerdeContext): BatchPrediction => { - return { - arn: __expectString(output.arn), - completionTime: __expectString(output.completionTime), - detectorName: __expectString(output.detectorName), - detectorVersion: __expectString(output.detectorVersion), - eventTypeName: __expectString(output.eventTypeName), - failureReason: __expectString(output.failureReason), - iamRoleArn: __expectString(output.iamRoleArn), - inputPath: __expectString(output.inputPath), - jobId: __expectString(output.jobId), - lastHeartbeatTime: __expectString(output.lastHeartbeatTime), - outputPath: __expectString(output.outputPath), - processedRecordsCount: __expectInt32(output.processedRecordsCount), - startTime: __expectString(output.startTime), - status: __expectString(output.status), - totalRecordsCount: __expectInt32(output.totalRecordsCount), - } as any; -}; - -/** - * deserializeAws_json1_1BatchPredictionList - */ -const de_BatchPredictionList = (output: any, context: __SerdeContext): BatchPrediction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPrediction(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelBatchImportJobResult - */ -const de_CancelBatchImportJobResult = (output: any, context: __SerdeContext): CancelBatchImportJobResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CancelBatchPredictionJobResult - */ -const de_CancelBatchPredictionJobResult = (output: any, context: __SerdeContext): CancelBatchPredictionJobResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CreateBatchImportJobResult - */ -const de_CreateBatchImportJobResult = (output: any, context: __SerdeContext): CreateBatchImportJobResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateBatchPredictionJobResult - */ -const de_CreateBatchPredictionJobResult = (output: any, context: __SerdeContext): CreateBatchPredictionJobResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateDetectorVersionResult - */ -const de_CreateDetectorVersionResult = (output: any, context: __SerdeContext): CreateDetectorVersionResult => { - return { - detectorId: __expectString(output.detectorId), - detectorVersionId: __expectString(output.detectorVersionId), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1CreateListResult - */ -const de_CreateListResult = (output: any, context: __SerdeContext): CreateListResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateModelResult - */ -const de_CreateModelResult = (output: any, context: __SerdeContext): CreateModelResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateModelVersionResult - */ -const de_CreateModelVersionResult = (output: any, context: __SerdeContext): CreateModelVersionResult => { - return { - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - modelVersionNumber: __expectString(output.modelVersionNumber), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1CreateRuleResult - */ -const de_CreateRuleResult = (output: any, context: __SerdeContext): CreateRuleResult => { - return { - rule: output.rule != null ? de_Rule(output.rule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateVariableResult - */ -const de_CreateVariableResult = (output: any, context: __SerdeContext): CreateVariableResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CsvIndexToVariableMap - */ -const de_CsvIndexToVariableMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1DataValidationMetrics - */ -const de_DataValidationMetrics = (output: any, context: __SerdeContext): DataValidationMetrics => { - return { - fieldLevelMessages: - output.fieldLevelMessages != null ? de_fieldValidationMessageList(output.fieldLevelMessages, context) : undefined, - fileLevelMessages: - output.fileLevelMessages != null ? de_fileValidationMessageList(output.fileLevelMessages, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBatchImportJobResult - */ -const de_DeleteBatchImportJobResult = (output: any, context: __SerdeContext): DeleteBatchImportJobResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteBatchPredictionJobResult - */ -const de_DeleteBatchPredictionJobResult = (output: any, context: __SerdeContext): DeleteBatchPredictionJobResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDetectorResult - */ -const de_DeleteDetectorResult = (output: any, context: __SerdeContext): DeleteDetectorResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDetectorVersionResult - */ -const de_DeleteDetectorVersionResult = (output: any, context: __SerdeContext): DeleteDetectorVersionResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteEntityTypeResult - */ -const de_DeleteEntityTypeResult = (output: any, context: __SerdeContext): DeleteEntityTypeResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteEventResult - */ -const de_DeleteEventResult = (output: any, context: __SerdeContext): DeleteEventResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteEventsByEventTypeResult - */ -const de_DeleteEventsByEventTypeResult = (output: any, context: __SerdeContext): DeleteEventsByEventTypeResult => { - return { - eventTypeName: __expectString(output.eventTypeName), - eventsDeletionStatus: __expectString(output.eventsDeletionStatus), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteEventTypeResult - */ -const de_DeleteEventTypeResult = (output: any, context: __SerdeContext): DeleteEventTypeResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteExternalModelResult - */ -const de_DeleteExternalModelResult = (output: any, context: __SerdeContext): DeleteExternalModelResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteLabelResult - */ -const de_DeleteLabelResult = (output: any, context: __SerdeContext): DeleteLabelResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteListResult - */ -const de_DeleteListResult = (output: any, context: __SerdeContext): DeleteListResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteModelResult - */ -const de_DeleteModelResult = (output: any, context: __SerdeContext): DeleteModelResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteModelVersionResult - */ -const de_DeleteModelVersionResult = (output: any, context: __SerdeContext): DeleteModelVersionResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteOutcomeResult - */ -const de_DeleteOutcomeResult = (output: any, context: __SerdeContext): DeleteOutcomeResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRuleResult - */ -const de_DeleteRuleResult = (output: any, context: __SerdeContext): DeleteRuleResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteVariableResult - */ -const de_DeleteVariableResult = (output: any, context: __SerdeContext): DeleteVariableResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeDetectorResult - */ -const de_DescribeDetectorResult = (output: any, context: __SerdeContext): DescribeDetectorResult => { - return { - arn: __expectString(output.arn), - detectorId: __expectString(output.detectorId), - detectorVersionSummaries: - output.detectorVersionSummaries != null - ? de_DetectorVersionSummaryList(output.detectorVersionSummaries, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelVersionsResult - */ -const de_DescribeModelVersionsResult = (output: any, context: __SerdeContext): DescribeModelVersionsResult => { - return { - modelVersionDetails: - output.modelVersionDetails != null ? de_modelVersionDetailList(output.modelVersionDetails, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1Detector - */ -const de_Detector = (output: any, context: __SerdeContext): Detector => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - detectorId: __expectString(output.detectorId), - eventTypeName: __expectString(output.eventTypeName), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - } as any; -}; - -/** - * deserializeAws_json1_1DetectorList - */ -const de_DetectorList = (output: any, context: __SerdeContext): Detector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Detector(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DetectorVersionSummary - */ -const de_DetectorVersionSummary = (output: any, context: __SerdeContext): DetectorVersionSummary => { - return { - description: __expectString(output.description), - detectorVersionId: __expectString(output.detectorVersionId), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1DetectorVersionSummaryList - */ -const de_DetectorVersionSummaryList = (output: any, context: __SerdeContext): DetectorVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectorVersionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ElementsList - */ -const de_ElementsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Entity - */ -const de_Entity = (output: any, context: __SerdeContext): Entity => { - return { - entityId: __expectString(output.entityId), - entityType: __expectString(output.entityType), - } as any; -}; - -/** - * deserializeAws_json1_1EntityType - */ -const de_EntityType = (output: any, context: __SerdeContext): EntityType => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1entityTypeList - */ -const de_entityTypeList = (output: any, context: __SerdeContext): EntityType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntityType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EvaluatedExternalModel - */ -const de_EvaluatedExternalModel = (output: any, context: __SerdeContext): EvaluatedExternalModel => { - return { - inputVariables: output.inputVariables != null ? de_MapOfStrings(output.inputVariables, context) : undefined, - modelEndpoint: __expectString(output.modelEndpoint), - outputVariables: output.outputVariables != null ? de_MapOfStrings(output.outputVariables, context) : undefined, - useEventVariables: __expectBoolean(output.useEventVariables), - } as any; -}; - -/** - * deserializeAws_json1_1EvaluatedModelVersion - */ -const de_EvaluatedModelVersion = (output: any, context: __SerdeContext): EvaluatedModelVersion => { - return { - evaluations: output.evaluations != null ? de_ListOfModelVersionEvaluations(output.evaluations, context) : undefined, - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - modelVersion: __expectString(output.modelVersion), - } as any; -}; - -/** - * deserializeAws_json1_1EvaluatedRule - */ -const de_EvaluatedRule = (output: any, context: __SerdeContext): EvaluatedRule => { - return { - evaluated: __expectBoolean(output.evaluated), - expression: __expectString(output.expression), - expressionWithValues: __expectString(output.expressionWithValues), - matched: __expectBoolean(output.matched), - outcomes: output.outcomes != null ? de_ListOfStrings(output.outcomes, context) : undefined, - ruleId: __expectString(output.ruleId), - ruleVersion: __expectString(output.ruleVersion), - } as any; -}; - -/** - * deserializeAws_json1_1EvaluatedRuleList - */ -const de_EvaluatedRuleList = (output: any, context: __SerdeContext): EvaluatedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluatedRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Event - */ -const de_Event = (output: any, context: __SerdeContext): Event => { - return { - currentLabel: __expectString(output.currentLabel), - entities: output.entities != null ? de_listOfEntities(output.entities, context) : undefined, - eventId: __expectString(output.eventId), - eventTimestamp: __expectString(output.eventTimestamp), - eventTypeName: __expectString(output.eventTypeName), - eventVariables: output.eventVariables != null ? de_EventAttributeMap(output.eventVariables, context) : undefined, - labelTimestamp: __expectString(output.labelTimestamp), - } as any; -}; - -/** - * deserializeAws_json1_1EventAttributeMap - */ -const de_EventAttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1EventPredictionSummary - */ -const de_EventPredictionSummary = (output: any, context: __SerdeContext): EventPredictionSummary => { - return { - detectorId: __expectString(output.detectorId), - detectorVersionId: __expectString(output.detectorVersionId), - eventId: __expectString(output.eventId), - eventTimestamp: __expectString(output.eventTimestamp), - eventTypeName: __expectString(output.eventTypeName), - predictionTimestamp: __expectString(output.predictionTimestamp), - } as any; -}; - -/** - * deserializeAws_json1_1EventType - */ -const de_EventType = (output: any, context: __SerdeContext): EventType => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - entityTypes: output.entityTypes != null ? de_NonEmptyListOfStrings(output.entityTypes, context) : undefined, - eventIngestion: __expectString(output.eventIngestion), - eventVariables: output.eventVariables != null ? de_ListOfStrings(output.eventVariables, context) : undefined, - ingestedEventStatistics: - output.ingestedEventStatistics != null - ? de_IngestedEventStatistics(output.ingestedEventStatistics, context) - : undefined, - labels: output.labels != null ? de_ListOfStrings(output.labels, context) : undefined, - lastUpdatedTime: __expectString(output.lastUpdatedTime), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1eventTypeList - */ -const de_eventTypeList = (output: any, context: __SerdeContext): EventType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EventVariableSummary - */ -const de_EventVariableSummary = (output: any, context: __SerdeContext): EventVariableSummary => { - return { - name: __expectString(output.name), - source: __expectString(output.source), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_json1_1ExternalEventsDetail - */ -const de_ExternalEventsDetail = (output: any, context: __SerdeContext): ExternalEventsDetail => { - return { - dataAccessRoleArn: __expectString(output.dataAccessRoleArn), - dataLocation: __expectString(output.dataLocation), - } as any; -}; - -/** - * deserializeAws_json1_1ExternalModel - */ -const de_ExternalModel = (output: any, context: __SerdeContext): ExternalModel => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - inputConfiguration: - output.inputConfiguration != null ? de_ModelInputConfiguration(output.inputConfiguration, context) : undefined, - invokeModelEndpointRoleArn: __expectString(output.invokeModelEndpointRoleArn), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - modelEndpoint: __expectString(output.modelEndpoint), - modelEndpointStatus: __expectString(output.modelEndpointStatus), - modelSource: __expectString(output.modelSource), - outputConfiguration: - output.outputConfiguration != null ? de_ModelOutputConfiguration(output.outputConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExternalModelList - */ -const de_ExternalModelList = (output: any, context: __SerdeContext): ExternalModel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExternalModel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExternalModelOutputs - */ -const de_ExternalModelOutputs = (output: any, context: __SerdeContext): ExternalModelOutputs => { - return { - externalModel: output.externalModel != null ? de_ExternalModelSummary(output.externalModel, context) : undefined, - outputs: output.outputs != null ? de_ExternalModelPredictionMap(output.outputs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExternalModelPredictionMap - */ -const de_ExternalModelPredictionMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ExternalModelSummary - */ -const de_ExternalModelSummary = (output: any, context: __SerdeContext): ExternalModelSummary => { - return { - modelEndpoint: __expectString(output.modelEndpoint), - modelSource: __expectString(output.modelSource), - } as any; -}; - -/** - * deserializeAws_json1_1FieldValidationMessage - */ -const de_FieldValidationMessage = (output: any, context: __SerdeContext): FieldValidationMessage => { - return { - content: __expectString(output.content), - fieldName: __expectString(output.fieldName), - identifier: __expectString(output.identifier), - title: __expectString(output.title), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1fieldValidationMessageList - */ -const de_fieldValidationMessageList = (output: any, context: __SerdeContext): FieldValidationMessage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldValidationMessage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FileValidationMessage - */ -const de_FileValidationMessage = (output: any, context: __SerdeContext): FileValidationMessage => { - return { - content: __expectString(output.content), - title: __expectString(output.title), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1fileValidationMessageList - */ -const de_fileValidationMessageList = (output: any, context: __SerdeContext): FileValidationMessage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileValidationMessage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetBatchImportJobsResult - */ -const de_GetBatchImportJobsResult = (output: any, context: __SerdeContext): GetBatchImportJobsResult => { - return { - batchImports: output.batchImports != null ? de_BatchImportList(output.batchImports, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetBatchPredictionJobsResult - */ -const de_GetBatchPredictionJobsResult = (output: any, context: __SerdeContext): GetBatchPredictionJobsResult => { - return { - batchPredictions: - output.batchPredictions != null ? de_BatchPredictionList(output.batchPredictions, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetDeleteEventsByEventTypeStatusResult - */ -const de_GetDeleteEventsByEventTypeStatusResult = ( - output: any, - context: __SerdeContext -): GetDeleteEventsByEventTypeStatusResult => { - return { - eventTypeName: __expectString(output.eventTypeName), - eventsDeletionStatus: __expectString(output.eventsDeletionStatus), - } as any; -}; - -/** - * deserializeAws_json1_1GetDetectorsResult - */ -const de_GetDetectorsResult = (output: any, context: __SerdeContext): GetDetectorsResult => { - return { - detectors: output.detectors != null ? de_DetectorList(output.detectors, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetDetectorVersionResult - */ -const de_GetDetectorVersionResult = (output: any, context: __SerdeContext): GetDetectorVersionResult => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - detectorId: __expectString(output.detectorId), - detectorVersionId: __expectString(output.detectorVersionId), - externalModelEndpoints: - output.externalModelEndpoints != null ? de_ListOfStrings(output.externalModelEndpoints, context) : undefined, - lastUpdatedTime: __expectString(output.lastUpdatedTime), - modelVersions: output.modelVersions != null ? de_ListOfModelVersions(output.modelVersions, context) : undefined, - ruleExecutionMode: __expectString(output.ruleExecutionMode), - rules: output.rules != null ? de_RuleList(output.rules, context) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1GetEntityTypesResult - */ -const de_GetEntityTypesResult = (output: any, context: __SerdeContext): GetEntityTypesResult => { - return { - entityTypes: output.entityTypes != null ? de_entityTypeList(output.entityTypes, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_TrainingDataSchema omitted. -/** - * deserializeAws_json1_1GetEventPredictionMetadataResult - */ -const de_GetEventPredictionMetadataResult = ( - output: any, - context: __SerdeContext -): GetEventPredictionMetadataResult => { - return { - detectorId: __expectString(output.detectorId), - detectorVersionId: __expectString(output.detectorVersionId), - detectorVersionStatus: __expectString(output.detectorVersionStatus), - entityId: __expectString(output.entityId), - entityType: __expectString(output.entityType), - evaluatedExternalModels: - output.evaluatedExternalModels != null - ? de_ListOfEvaluatedExternalModels(output.evaluatedExternalModels, context) - : undefined, - evaluatedModelVersions: - output.evaluatedModelVersions != null - ? de_ListOfEvaluatedModelVersions(output.evaluatedModelVersions, context) - : undefined, - eventId: __expectString(output.eventId), - eventTimestamp: __expectString(output.eventTimestamp), - eventTypeName: __expectString(output.eventTypeName), - eventVariables: - output.eventVariables != null ? de_ListOfEventVariableSummaries(output.eventVariables, context) : undefined, - outcomes: output.outcomes != null ? de_ListOfStrings(output.outcomes, context) : undefined, - predictionTimestamp: __expectString(output.predictionTimestamp), - ruleExecutionMode: __expectString(output.ruleExecutionMode), - rules: output.rules != null ? de_EvaluatedRuleList(output.rules, context) : undefined, - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1GetEventPredictionResult - */ -const de_GetEventPredictionResult = (output: any, context: __SerdeContext): GetEventPredictionResult => { - return { - externalModelOutputs: - output.externalModelOutputs != null - ? de_ListOfExternalModelOutputs(output.externalModelOutputs, context) - : undefined, - modelScores: output.modelScores != null ? de_ListOfModelScores(output.modelScores, context) : undefined, - ruleResults: output.ruleResults != null ? de_ListOfRuleResults(output.ruleResults, context) : undefined, - } as any; -}; +// se_UpdateDetectorVersionMetadataRequest omitted. -/** - * deserializeAws_json1_1GetEventResult - */ -const de_GetEventResult = (output: any, context: __SerdeContext): GetEventResult => { - return { - event: output.event != null ? de_Event(output.event, context) : undefined, - } as any; -}; +// se_UpdateDetectorVersionRequest omitted. -/** - * deserializeAws_json1_1GetEventTypesResult - */ -const de_GetEventTypesResult = (output: any, context: __SerdeContext): GetEventTypesResult => { - return { - eventTypes: output.eventTypes != null ? de_eventTypeList(output.eventTypes, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_UpdateDetectorVersionStatusRequest omitted. -/** - * deserializeAws_json1_1GetExternalModelsResult - */ -const de_GetExternalModelsResult = (output: any, context: __SerdeContext): GetExternalModelsResult => { - return { - externalModels: output.externalModels != null ? de_ExternalModelList(output.externalModels, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_UpdateEventLabelRequest omitted. -/** - * deserializeAws_json1_1GetKMSEncryptionKeyResult - */ -const de_GetKMSEncryptionKeyResult = (output: any, context: __SerdeContext): GetKMSEncryptionKeyResult => { - return { - kmsKey: output.kmsKey != null ? de_KMSKey(output.kmsKey, context) : undefined, - } as any; -}; +// se_UpdateListRequest omitted. -/** - * deserializeAws_json1_1GetLabelsResult - */ -const de_GetLabelsResult = (output: any, context: __SerdeContext): GetLabelsResult => { - return { - labels: output.labels != null ? de_labelList(output.labels, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_UpdateModelRequest omitted. -/** - * deserializeAws_json1_1GetListElementsResult - */ -const de_GetListElementsResult = (output: any, context: __SerdeContext): GetListElementsResult => { - return { - elements: output.elements != null ? de_ElementsList(output.elements, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_UpdateModelVersionRequest omitted. -/** - * deserializeAws_json1_1GetListsMetadataResult - */ -const de_GetListsMetadataResult = (output: any, context: __SerdeContext): GetListsMetadataResult => { - return { - lists: output.lists != null ? de_AllowDenyLists(output.lists, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_UpdateModelVersionStatusRequest omitted. -/** - * deserializeAws_json1_1GetModelsResult - */ -const de_GetModelsResult = (output: any, context: __SerdeContext): GetModelsResult => { - return { - models: output.models != null ? de_modelList(output.models, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_UpdateRuleMetadataRequest omitted. -/** - * deserializeAws_json1_1GetModelVersionResult - */ -const de_GetModelVersionResult = (output: any, context: __SerdeContext): GetModelVersionResult => { - return { - arn: __expectString(output.arn), - externalEventsDetail: - output.externalEventsDetail != null ? de_ExternalEventsDetail(output.externalEventsDetail, context) : undefined, - ingestedEventsDetail: - output.ingestedEventsDetail != null ? de_IngestedEventsDetail(output.ingestedEventsDetail, context) : undefined, - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - modelVersionNumber: __expectString(output.modelVersionNumber), - status: __expectString(output.status), - trainingDataSchema: - output.trainingDataSchema != null ? de_TrainingDataSchema(output.trainingDataSchema, context) : undefined, - trainingDataSource: __expectString(output.trainingDataSource), - } as any; -}; +// se_UpdateRuleVersionRequest omitted. -/** - * deserializeAws_json1_1GetOutcomesResult - */ -const de_GetOutcomesResult = (output: any, context: __SerdeContext): GetOutcomesResult => { - return { - nextToken: __expectString(output.nextToken), - outcomes: output.outcomes != null ? de_OutcomeList(output.outcomes, context) : undefined, - } as any; -}; +// se_UpdateVariableRequest omitted. -/** - * deserializeAws_json1_1GetRulesResult - */ -const de_GetRulesResult = (output: any, context: __SerdeContext): GetRulesResult => { - return { - nextToken: __expectString(output.nextToken), - ruleDetails: output.ruleDetails != null ? de_RuleDetailList(output.ruleDetails, context) : undefined, - } as any; -}; +// se_VariableEntry omitted. -/** - * deserializeAws_json1_1GetVariablesResult - */ -const de_GetVariablesResult = (output: any, context: __SerdeContext): GetVariablesResult => { - return { - nextToken: __expectString(output.nextToken), - variables: output.variables != null ? de_VariableList(output.variables, context) : undefined, - } as any; -}; +// se_VariableEntryList omitted. -/** - * deserializeAws_json1_1IngestedEventsDetail - */ -const de_IngestedEventsDetail = (output: any, context: __SerdeContext): IngestedEventsDetail => { - return { - ingestedEventsTimeWindow: - output.ingestedEventsTimeWindow != null - ? de_IngestedEventsTimeWindow(output.ingestedEventsTimeWindow, context) - : undefined, - } as any; -}; +// de_AccessDeniedException omitted. /** - * deserializeAws_json1_1IngestedEventStatistics + * deserializeAws_json1_1AggregatedLogOddsMetric */ -const de_IngestedEventStatistics = (output: any, context: __SerdeContext): IngestedEventStatistics => { - return { - eventDataSizeInBytes: __expectLong(output.eventDataSizeInBytes), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - leastRecentEvent: __expectString(output.leastRecentEvent), - mostRecentEvent: __expectString(output.mostRecentEvent), - numberOfEvents: __expectLong(output.numberOfEvents), - } as any; +const de_AggregatedLogOddsMetric = (output: any, context: __SerdeContext): AggregatedLogOddsMetric => { + return take(output, { + aggregatedVariablesImportance: __limitedParseFloat32, + variableNames: _json, + }) as any; }; /** - * deserializeAws_json1_1IngestedEventsTimeWindow + * deserializeAws_json1_1AggregatedVariablesImpactExplanation */ -const de_IngestedEventsTimeWindow = (output: any, context: __SerdeContext): IngestedEventsTimeWindow => { - return { - endTime: __expectString(output.endTime), - startTime: __expectString(output.startTime), - } as any; +const de_AggregatedVariablesImpactExplanation = ( + output: any, + context: __SerdeContext +): AggregatedVariablesImpactExplanation => { + return take(output, { + eventVariableNames: _json, + logOddsImpact: __limitedParseFloat32, + relativeImpact: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InternalServerException + * deserializeAws_json1_1AggregatedVariablesImportanceMetrics */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - } as any; +const de_AggregatedVariablesImportanceMetrics = ( + output: any, + context: __SerdeContext +): AggregatedVariablesImportanceMetrics => { + return take(output, { + logOddsMetrics: (_: any) => de_ListOfAggregatedLogOddsMetrics(_, context), + }) as any; }; -/** - * deserializeAws_json1_1JsonKeyToVariableMap - */ -const de_JsonKeyToVariableMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AllowDenyList omitted. -/** - * deserializeAws_json1_1KMSKey - */ -const de_KMSKey = (output: any, context: __SerdeContext): KMSKey => { - return { - kmsEncryptionKeyArn: __expectString(output.kmsEncryptionKeyArn), - } as any; -}; +// de_AllowDenyLists omitted. /** - * deserializeAws_json1_1Label + * deserializeAws_json1_1ATIMetricDataPoint */ -const de_Label = (output: any, context: __SerdeContext): Label => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - name: __expectString(output.name), - } as any; +const de_ATIMetricDataPoint = (output: any, context: __SerdeContext): ATIMetricDataPoint => { + return take(output, { + adr: __limitedParseFloat32, + atodr: __limitedParseFloat32, + cr: __limitedParseFloat32, + threshold: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_1labelList + * deserializeAws_json1_1ATIMetricDataPointsList */ -const de_labelList = (output: any, context: __SerdeContext): Label[] => { +const de_ATIMetricDataPointsList = (output: any, context: __SerdeContext): ATIMetricDataPoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Label(entry, context); + return de_ATIMetricDataPoint(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1labelMapper + * deserializeAws_json1_1ATIModelPerformance */ -const de_labelMapper = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ListOfStrings(value, context); - return acc; - }, {}); +const de_ATIModelPerformance = (output: any, context: __SerdeContext): ATIModelPerformance => { + return take(output, { + asi: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_1LabelSchema + * deserializeAws_json1_1ATITrainingMetricsValue */ -const de_LabelSchema = (output: any, context: __SerdeContext): LabelSchema => { - return { - labelMapper: output.labelMapper != null ? de_labelMapper(output.labelMapper, context) : undefined, - unlabeledEventsTreatment: __expectString(output.unlabeledEventsTreatment), - } as any; +const de_ATITrainingMetricsValue = (output: any, context: __SerdeContext): ATITrainingMetricsValue => { + return take(output, { + metricDataPoints: (_: any) => de_ATIMetricDataPointsList(_, context), + modelPerformance: (_: any) => de_ATIModelPerformance(_, context), + }) as any; }; +// de_BatchCreateVariableError omitted. + +// de_BatchCreateVariableErrorList omitted. + +// de_BatchCreateVariableResult omitted. + +// de_BatchGetVariableError omitted. + +// de_BatchGetVariableErrorList omitted. + +// de_BatchGetVariableResult omitted. + +// de_BatchImport omitted. + +// de_BatchImportList omitted. + +// de_BatchPrediction omitted. + +// de_BatchPredictionList omitted. + +// de_CancelBatchImportJobResult omitted. + +// de_CancelBatchPredictionJobResult omitted. + +// de_ConflictException omitted. + +// de_CreateBatchImportJobResult omitted. + +// de_CreateBatchPredictionJobResult omitted. + +// de_CreateDetectorVersionResult omitted. + +// de_CreateListResult omitted. + +// de_CreateModelResult omitted. + +// de_CreateModelVersionResult omitted. + +// de_CreateRuleResult omitted. + +// de_CreateVariableResult omitted. + +// de_CsvIndexToVariableMap omitted. + +// de_DataValidationMetrics omitted. + +// de_DeleteBatchImportJobResult omitted. + +// de_DeleteBatchPredictionJobResult omitted. + +// de_DeleteDetectorResult omitted. + +// de_DeleteDetectorVersionResult omitted. + +// de_DeleteEntityTypeResult omitted. + +// de_DeleteEventResult omitted. + +// de_DeleteEventsByEventTypeResult omitted. + +// de_DeleteEventTypeResult omitted. + +// de_DeleteExternalModelResult omitted. + +// de_DeleteLabelResult omitted. + +// de_DeleteListResult omitted. + +// de_DeleteModelResult omitted. + +// de_DeleteModelVersionResult omitted. + +// de_DeleteOutcomeResult omitted. + +// de_DeleteRuleResult omitted. + +// de_DeleteVariableResult omitted. + +// de_DescribeDetectorResult omitted. + /** - * deserializeAws_json1_1ListEventPredictionsResult + * deserializeAws_json1_1DescribeModelVersionsResult */ -const de_ListEventPredictionsResult = (output: any, context: __SerdeContext): ListEventPredictionsResult => { - return { - eventPredictionSummaries: - output.eventPredictionSummaries != null - ? de_ListOfEventPredictionSummaries(output.eventPredictionSummaries, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; +const de_DescribeModelVersionsResult = (output: any, context: __SerdeContext): DescribeModelVersionsResult => { + return take(output, { + modelVersionDetails: (_: any) => de_modelVersionDetailList(_, context), + nextToken: __expectString, + }) as any; }; +// de_Detector omitted. + +// de_DetectorList omitted. + +// de_DetectorVersionSummary omitted. + +// de_DetectorVersionSummaryList omitted. + +// de_ElementsList omitted. + +// de_Entity omitted. + +// de_EntityType omitted. + +// de_entityTypeList omitted. + +// de_EvaluatedExternalModel omitted. + /** - * deserializeAws_json1_1ListOfAggregatedLogOddsMetrics + * deserializeAws_json1_1EvaluatedModelVersion */ -const de_ListOfAggregatedLogOddsMetrics = (output: any, context: __SerdeContext): AggregatedLogOddsMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregatedLogOddsMetric(entry, context); - }); - return retVal; +const de_EvaluatedModelVersion = (output: any, context: __SerdeContext): EvaluatedModelVersion => { + return take(output, { + evaluations: (_: any) => de_ListOfModelVersionEvaluations(_, context), + modelId: __expectString, + modelType: __expectString, + modelVersion: __expectString, + }) as any; }; +// de_EvaluatedRule omitted. + +// de_EvaluatedRuleList omitted. + +// de_Event omitted. + +// de_EventAttributeMap omitted. + +// de_EventPredictionSummary omitted. + +// de_EventType omitted. + +// de_eventTypeList omitted. + +// de_EventVariableSummary omitted. + +// de_ExternalEventsDetail omitted. + +// de_ExternalModel omitted. + +// de_ExternalModelList omitted. + +// de_ExternalModelOutputs omitted. + +// de_ExternalModelPredictionMap omitted. + +// de_ExternalModelSummary omitted. + +// de_FieldValidationMessage omitted. + +// de_fieldValidationMessageList omitted. + +// de_FileValidationMessage omitted. + +// de_fileValidationMessageList omitted. + +// de_GetBatchImportJobsResult omitted. + +// de_GetBatchPredictionJobsResult omitted. + +// de_GetDeleteEventsByEventTypeStatusResult omitted. + +// de_GetDetectorsResult omitted. + +// de_GetDetectorVersionResult omitted. + +// de_GetEntityTypesResult omitted. + /** - * deserializeAws_json1_1ListOfAggregatedVariablesImpactExplanations + * deserializeAws_json1_1GetEventPredictionMetadataResult */ -const de_ListOfAggregatedVariablesImpactExplanations = ( +const de_GetEventPredictionMetadataResult = ( output: any, context: __SerdeContext -): AggregatedVariablesImpactExplanation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregatedVariablesImpactExplanation(entry, context); - }); - return retVal; +): GetEventPredictionMetadataResult => { + return take(output, { + detectorId: __expectString, + detectorVersionId: __expectString, + detectorVersionStatus: __expectString, + entityId: __expectString, + entityType: __expectString, + evaluatedExternalModels: _json, + evaluatedModelVersions: (_: any) => de_ListOfEvaluatedModelVersions(_, context), + eventId: __expectString, + eventTimestamp: __expectString, + eventTypeName: __expectString, + eventVariables: _json, + outcomes: _json, + predictionTimestamp: __expectString, + ruleExecutionMode: __expectString, + rules: _json, + }) as any; }; /** - * deserializeAws_json1_1listOfEntities + * deserializeAws_json1_1GetEventPredictionResult */ -const de_listOfEntities = (output: any, context: __SerdeContext): Entity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Entity(entry, context); - }); - return retVal; +const de_GetEventPredictionResult = (output: any, context: __SerdeContext): GetEventPredictionResult => { + return take(output, { + externalModelOutputs: _json, + modelScores: (_: any) => de_ListOfModelScores(_, context), + ruleResults: _json, + }) as any; }; -/** - * deserializeAws_json1_1ListOfEvaluatedExternalModels - */ -const de_ListOfEvaluatedExternalModels = (output: any, context: __SerdeContext): EvaluatedExternalModel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluatedExternalModel(entry, context); - }); - return retVal; -}; +// de_GetEventResult omitted. -/** - * deserializeAws_json1_1ListOfEvaluatedModelVersions - */ -const de_ListOfEvaluatedModelVersions = (output: any, context: __SerdeContext): EvaluatedModelVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EvaluatedModelVersion(entry, context); - }); - return retVal; -}; +// de_GetEventTypesResult omitted. + +// de_GetExternalModelsResult omitted. + +// de_GetKMSEncryptionKeyResult omitted. + +// de_GetLabelsResult omitted. + +// de_GetListElementsResult omitted. + +// de_GetListsMetadataResult omitted. + +// de_GetModelsResult omitted. + +// de_GetModelVersionResult omitted. + +// de_GetOutcomesResult omitted. + +// de_GetRulesResult omitted. + +// de_GetVariablesResult omitted. + +// de_IngestedEventsDetail omitted. + +// de_IngestedEventStatistics omitted. + +// de_IngestedEventsTimeWindow omitted. + +// de_InternalServerException omitted. + +// de_JsonKeyToVariableMap omitted. + +// de_KMSKey omitted. + +// de_Label omitted. + +// de_labelList omitted. + +// de_labelMapper omitted. + +// de_LabelSchema omitted. + +// de_ListEventPredictionsResult omitted. /** - * deserializeAws_json1_1ListOfEventPredictionSummaries + * deserializeAws_json1_1ListOfAggregatedLogOddsMetrics */ -const de_ListOfEventPredictionSummaries = (output: any, context: __SerdeContext): EventPredictionSummary[] => { +const de_ListOfAggregatedLogOddsMetrics = (output: any, context: __SerdeContext): AggregatedLogOddsMetric[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventPredictionSummary(entry, context); + return de_AggregatedLogOddsMetric(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ListOfEventVariableSummaries + * deserializeAws_json1_1ListOfAggregatedVariablesImpactExplanations */ -const de_ListOfEventVariableSummaries = (output: any, context: __SerdeContext): EventVariableSummary[] => { +const de_ListOfAggregatedVariablesImpactExplanations = ( + output: any, + context: __SerdeContext +): AggregatedVariablesImpactExplanation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventVariableSummary(entry, context); + return de_AggregatedVariablesImpactExplanation(entry, context); }); return retVal; }; +// de_listOfEntities omitted. + +// de_ListOfEvaluatedExternalModels omitted. + /** - * deserializeAws_json1_1ListOfExternalModelOutputs + * deserializeAws_json1_1ListOfEvaluatedModelVersions */ -const de_ListOfExternalModelOutputs = (output: any, context: __SerdeContext): ExternalModelOutputs[] => { +const de_ListOfEvaluatedModelVersions = (output: any, context: __SerdeContext): EvaluatedModelVersion[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExternalModelOutputs(entry, context); + return de_EvaluatedModelVersion(entry, context); }); return retVal; }; +// de_ListOfEventPredictionSummaries omitted. + +// de_ListOfEventVariableSummaries omitted. + +// de_ListOfExternalModelOutputs omitted. + /** * deserializeAws_json1_1ListOfLogOddsMetrics */ @@ -8363,9 +6204,6 @@ const de_ListOfLogOddsMetrics = (output: any, context: __SerdeContext): LogOddsM const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LogOddsMetric(entry, context); }); return retVal; @@ -8378,9 +6216,6 @@ const de_ListOfModelScores = (output: any, context: __SerdeContext): ModelScores const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelScores(entry, context); }); return retVal; @@ -8393,58 +6228,16 @@ const de_ListOfModelVersionEvaluations = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelVersionEvaluation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListOfModelVersions - */ -const de_ListOfModelVersions = (output: any, context: __SerdeContext): ModelVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelVersion(entry, context); - }); - return retVal; -}; +// de_ListOfModelVersions omitted. -/** - * deserializeAws_json1_1ListOfRuleResults - */ -const de_ListOfRuleResults = (output: any, context: __SerdeContext): RuleResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleResult(entry, context); - }); - return retVal; -}; +// de_ListOfRuleResults omitted. -/** - * deserializeAws_json1_1ListOfStrings - */ -const de_ListOfStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfStrings omitted. /** * deserializeAws_json1_1listOfVariableImpactExplanations @@ -8453,58 +6246,36 @@ const de_listOfVariableImpactExplanations = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VariableImpactExplanation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListTagsForResourceResult - */ -const de_ListTagsForResourceResult = (output: any, context: __SerdeContext): ListTagsForResourceResult => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_tagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResult omitted. /** * deserializeAws_json1_1LogOddsMetric */ const de_LogOddsMetric = (output: any, context: __SerdeContext): LogOddsMetric => { - return { - variableImportance: __limitedParseFloat32(output.variableImportance), - variableName: __expectString(output.variableName), - variableType: __expectString(output.variableType), - } as any; + return take(output, { + variableImportance: __limitedParseFloat32, + variableName: __expectString, + variableType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1MapOfStrings - */ -const de_MapOfStrings = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MapOfStrings omitted. /** * deserializeAws_json1_1MetricDataPoint */ const de_MetricDataPoint = (output: any, context: __SerdeContext): MetricDataPoint => { - return { - fpr: __limitedParseFloat32(output.fpr), - precision: __limitedParseFloat32(output.precision), - threshold: __limitedParseFloat32(output.threshold), - tpr: __limitedParseFloat32(output.tpr), - } as any; + return take(output, { + fpr: __limitedParseFloat32, + precision: __limitedParseFloat32, + threshold: __limitedParseFloat32, + tpr: __limitedParseFloat32, + }) as any; }; /** @@ -8514,71 +6285,18 @@ const de_metricDataPointsList = (output: any, context: __SerdeContext): MetricDa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricDataPoint(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Model - */ -const de_Model = (output: any, context: __SerdeContext): Model => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - eventTypeName: __expectString(output.eventTypeName), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - } as any; -}; +// de_Model omitted. -/** - * deserializeAws_json1_1ModelInputConfiguration - */ -const de_ModelInputConfiguration = (output: any, context: __SerdeContext): ModelInputConfiguration => { - return { - csvInputTemplate: __expectString(output.csvInputTemplate), - eventTypeName: __expectString(output.eventTypeName), - format: __expectString(output.format), - jsonInputTemplate: __expectString(output.jsonInputTemplate), - useEventVariables: __expectBoolean(output.useEventVariables), - } as any; -}; +// de_ModelInputConfiguration omitted. -/** - * deserializeAws_json1_1modelList - */ -const de_modelList = (output: any, context: __SerdeContext): Model[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Model(entry, context); - }); - return retVal; -}; +// de_modelList omitted. -/** - * deserializeAws_json1_1ModelOutputConfiguration - */ -const de_ModelOutputConfiguration = (output: any, context: __SerdeContext): ModelOutputConfiguration => { - return { - csvIndexToVariableMap: - output.csvIndexToVariableMap != null - ? de_CsvIndexToVariableMap(output.csvIndexToVariableMap, context) - : undefined, - format: __expectString(output.format), - jsonKeyToVariableMap: - output.jsonKeyToVariableMap != null ? de_JsonKeyToVariableMap(output.jsonKeyToVariableMap, context) : undefined, - } as any; -}; +// de_ModelOutputConfiguration omitted. /** * deserializeAws_json1_1ModelPredictionMap @@ -8597,47 +6315,33 @@ const de_ModelPredictionMap = (output: any, context: __SerdeContext): Record { - return { - modelVersion: output.modelVersion != null ? de_ModelVersion(output.modelVersion, context) : undefined, - scores: output.scores != null ? de_ModelPredictionMap(output.scores, context) : undefined, - } as any; + return take(output, { + modelVersion: _json, + scores: (_: any) => de_ModelPredictionMap(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ModelVersion - */ -const de_ModelVersion = (output: any, context: __SerdeContext): ModelVersion => { - return { - arn: __expectString(output.arn), - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - modelVersionNumber: __expectString(output.modelVersionNumber), - } as any; -}; +// de_ModelVersion omitted. /** * deserializeAws_json1_1ModelVersionDetail */ const de_ModelVersionDetail = (output: any, context: __SerdeContext): ModelVersionDetail => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - externalEventsDetail: - output.externalEventsDetail != null ? de_ExternalEventsDetail(output.externalEventsDetail, context) : undefined, - ingestedEventsDetail: - output.ingestedEventsDetail != null ? de_IngestedEventsDetail(output.ingestedEventsDetail, context) : undefined, - lastUpdatedTime: __expectString(output.lastUpdatedTime), - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - modelVersionNumber: __expectString(output.modelVersionNumber), - status: __expectString(output.status), - trainingDataSchema: - output.trainingDataSchema != null ? de_TrainingDataSchema(output.trainingDataSchema, context) : undefined, - trainingDataSource: __expectString(output.trainingDataSource), - trainingResult: output.trainingResult != null ? de_TrainingResult(output.trainingResult, context) : undefined, - trainingResultV2: - output.trainingResultV2 != null ? de_TrainingResultV2(output.trainingResultV2, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdTime: __expectString, + externalEventsDetail: _json, + ingestedEventsDetail: _json, + lastUpdatedTime: __expectString, + modelId: __expectString, + modelType: __expectString, + modelVersionNumber: __expectString, + status: __expectString, + trainingDataSchema: _json, + trainingDataSource: __expectString, + trainingResult: (_: any) => de_TrainingResult(_, context), + trainingResultV2: (_: any) => de_TrainingResultV2(_, context), + }) as any; }; /** @@ -8647,9 +6351,6 @@ const de_modelVersionDetailList = (output: any, context: __SerdeContext): ModelV const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelVersionDetail(entry, context); }); return retVal; @@ -8659,41 +6360,25 @@ const de_modelVersionDetailList = (output: any, context: __SerdeContext): ModelV * deserializeAws_json1_1ModelVersionEvaluation */ const de_ModelVersionEvaluation = (output: any, context: __SerdeContext): ModelVersionEvaluation => { - return { - evaluationScore: __expectString(output.evaluationScore), - outputVariableName: __expectString(output.outputVariableName), - predictionExplanations: - output.predictionExplanations != null - ? de_PredictionExplanations(output.predictionExplanations, context) - : undefined, - } as any; + return take(output, { + evaluationScore: __expectString, + outputVariableName: __expectString, + predictionExplanations: (_: any) => de_PredictionExplanations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1NonEmptyListOfStrings - */ -const de_NonEmptyListOfStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NonEmptyListOfStrings omitted. /** * deserializeAws_json1_1OFIMetricDataPoint */ const de_OFIMetricDataPoint = (output: any, context: __SerdeContext): OFIMetricDataPoint => { - return { - fpr: __limitedParseFloat32(output.fpr), - precision: __limitedParseFloat32(output.precision), - threshold: __limitedParseFloat32(output.threshold), - tpr: __limitedParseFloat32(output.tpr), - } as any; + return take(output, { + fpr: __limitedParseFloat32, + precision: __limitedParseFloat32, + threshold: __limitedParseFloat32, + tpr: __limitedParseFloat32, + }) as any; }; /** @@ -8703,9 +6388,6 @@ const de_OFIMetricDataPointsList = (output: any, context: __SerdeContext): OFIMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OFIMetricDataPoint(entry, context); }); return retVal; @@ -8715,254 +6397,82 @@ const de_OFIMetricDataPointsList = (output: any, context: __SerdeContext): OFIMe * deserializeAws_json1_1OFIModelPerformance */ const de_OFIModelPerformance = (output: any, context: __SerdeContext): OFIModelPerformance => { - return { - auc: __limitedParseFloat32(output.auc), - uncertaintyRange: - output.uncertaintyRange != null ? de_UncertaintyRange(output.uncertaintyRange, context) : undefined, - } as any; + return take(output, { + auc: __limitedParseFloat32, + uncertaintyRange: (_: any) => de_UncertaintyRange(_, context), + }) as any; }; /** * deserializeAws_json1_1OFITrainingMetricsValue */ const de_OFITrainingMetricsValue = (output: any, context: __SerdeContext): OFITrainingMetricsValue => { - return { - metricDataPoints: - output.metricDataPoints != null ? de_OFIMetricDataPointsList(output.metricDataPoints, context) : undefined, - modelPerformance: - output.modelPerformance != null ? de_OFIModelPerformance(output.modelPerformance, context) : undefined, - } as any; + return take(output, { + metricDataPoints: (_: any) => de_OFIMetricDataPointsList(_, context), + modelPerformance: (_: any) => de_OFIModelPerformance(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Outcome - */ -const de_Outcome = (output: any, context: __SerdeContext): Outcome => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - name: __expectString(output.name), - } as any; -}; +// de_Outcome omitted. -/** - * deserializeAws_json1_1OutcomeList - */ -const de_OutcomeList = (output: any, context: __SerdeContext): Outcome[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Outcome(entry, context); - }); - return retVal; -}; +// de_OutcomeList omitted. /** * deserializeAws_json1_1PredictionExplanations */ const de_PredictionExplanations = (output: any, context: __SerdeContext): PredictionExplanations => { - return { - aggregatedVariablesImpactExplanations: - output.aggregatedVariablesImpactExplanations != null - ? de_ListOfAggregatedVariablesImpactExplanations(output.aggregatedVariablesImpactExplanations, context) - : undefined, - variableImpactExplanations: - output.variableImpactExplanations != null - ? de_listOfVariableImpactExplanations(output.variableImpactExplanations, context) - : undefined, - } as any; + return take(output, { + aggregatedVariablesImpactExplanations: (_: any) => de_ListOfAggregatedVariablesImpactExplanations(_, context), + variableImpactExplanations: (_: any) => de_listOfVariableImpactExplanations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1PutDetectorResult - */ -const de_PutDetectorResult = (output: any, context: __SerdeContext): PutDetectorResult => { - return {} as any; -}; +// de_PutDetectorResult omitted. -/** - * deserializeAws_json1_1PutEntityTypeResult - */ -const de_PutEntityTypeResult = (output: any, context: __SerdeContext): PutEntityTypeResult => { - return {} as any; -}; +// de_PutEntityTypeResult omitted. -/** - * deserializeAws_json1_1PutEventTypeResult - */ -const de_PutEventTypeResult = (output: any, context: __SerdeContext): PutEventTypeResult => { - return {} as any; -}; +// de_PutEventTypeResult omitted. -/** - * deserializeAws_json1_1PutExternalModelResult - */ -const de_PutExternalModelResult = (output: any, context: __SerdeContext): PutExternalModelResult => { - return {} as any; -}; +// de_PutExternalModelResult omitted. -/** - * deserializeAws_json1_1PutKMSEncryptionKeyResult - */ -const de_PutKMSEncryptionKeyResult = (output: any, context: __SerdeContext): PutKMSEncryptionKeyResult => { - return {} as any; -}; +// de_PutKMSEncryptionKeyResult omitted. -/** - * deserializeAws_json1_1PutLabelResult - */ -const de_PutLabelResult = (output: any, context: __SerdeContext): PutLabelResult => { - return {} as any; -}; +// de_PutLabelResult omitted. -/** - * deserializeAws_json1_1PutOutcomeResult - */ -const de_PutOutcomeResult = (output: any, context: __SerdeContext): PutOutcomeResult => { - return {} as any; -}; +// de_PutOutcomeResult omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceUnavailableException omitted. -/** - * deserializeAws_json1_1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - detectorId: __expectString(output.detectorId), - ruleId: __expectString(output.ruleId), - ruleVersion: __expectString(output.ruleVersion), - } as any; -}; +// de_Rule omitted. -/** - * deserializeAws_json1_1RuleDetail - */ -const de_RuleDetail = (output: any, context: __SerdeContext): RuleDetail => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - description: __expectString(output.description), - detectorId: __expectString(output.detectorId), - expression: __expectString(output.expression), - language: __expectString(output.language), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - outcomes: output.outcomes != null ? de_NonEmptyListOfStrings(output.outcomes, context) : undefined, - ruleId: __expectString(output.ruleId), - ruleVersion: __expectString(output.ruleVersion), - } as any; -}; +// de_RuleDetail omitted. -/** - * deserializeAws_json1_1RuleDetailList - */ -const de_RuleDetailList = (output: any, context: __SerdeContext): RuleDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleDetail(entry, context); - }); - return retVal; -}; +// de_RuleDetailList omitted. -/** - * deserializeAws_json1_1RuleList - */ -const de_RuleList = (output: any, context: __SerdeContext): Rule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Rule(entry, context); - }); - return retVal; -}; +// de_RuleList omitted. -/** - * deserializeAws_json1_1RuleResult - */ -const de_RuleResult = (output: any, context: __SerdeContext): RuleResult => { - return { - outcomes: output.outcomes != null ? de_ListOfStrings(output.outcomes, context) : undefined, - ruleId: __expectString(output.ruleId), - } as any; -}; +// de_RuleResult omitted. -/** - * deserializeAws_json1_1SendEventResult - */ -const de_SendEventResult = (output: any, context: __SerdeContext): SendEventResult => { - return {} as any; -}; +// de_SendEventResult omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1tagList - */ -const de_tagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_tagList omitted. -/** - * deserializeAws_json1_1TagResourceResult - */ -const de_TagResourceResult = (output: any, context: __SerdeContext): TagResourceResult => { - return {} as any; -}; +// de_TagResourceResult omitted. /** * deserializeAws_json1_1TFIMetricDataPoint */ const de_TFIMetricDataPoint = (output: any, context: __SerdeContext): TFIMetricDataPoint => { - return { - fpr: __limitedParseFloat32(output.fpr), - precision: __limitedParseFloat32(output.precision), - threshold: __limitedParseFloat32(output.threshold), - tpr: __limitedParseFloat32(output.tpr), - } as any; + return take(output, { + fpr: __limitedParseFloat32, + precision: __limitedParseFloat32, + threshold: __limitedParseFloat32, + tpr: __limitedParseFloat32, + }) as any; }; /** @@ -8972,9 +6482,6 @@ const de_TFIMetricDataPointsList = (output: any, context: __SerdeContext): TFIMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TFIMetricDataPoint(entry, context); }); return retVal; @@ -8984,272 +6491,129 @@ const de_TFIMetricDataPointsList = (output: any, context: __SerdeContext): TFIMe * deserializeAws_json1_1TFIModelPerformance */ const de_TFIModelPerformance = (output: any, context: __SerdeContext): TFIModelPerformance => { - return { - auc: __limitedParseFloat32(output.auc), - uncertaintyRange: - output.uncertaintyRange != null ? de_UncertaintyRange(output.uncertaintyRange, context) : undefined, - } as any; + return take(output, { + auc: __limitedParseFloat32, + uncertaintyRange: (_: any) => de_UncertaintyRange(_, context), + }) as any; }; /** * deserializeAws_json1_1TFITrainingMetricsValue */ const de_TFITrainingMetricsValue = (output: any, context: __SerdeContext): TFITrainingMetricsValue => { - return { - metricDataPoints: - output.metricDataPoints != null ? de_TFIMetricDataPointsList(output.metricDataPoints, context) : undefined, - modelPerformance: - output.modelPerformance != null ? de_TFIModelPerformance(output.modelPerformance, context) : undefined, - } as any; + return take(output, { + metricDataPoints: (_: any) => de_TFIMetricDataPointsList(_, context), + modelPerformance: (_: any) => de_TFIModelPerformance(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1TrainingDataSchema - */ -const de_TrainingDataSchema = (output: any, context: __SerdeContext): TrainingDataSchema => { - return { - labelSchema: output.labelSchema != null ? de_LabelSchema(output.labelSchema, context) : undefined, - modelVariables: output.modelVariables != null ? de_ListOfStrings(output.modelVariables, context) : undefined, - } as any; -}; +// de_TrainingDataSchema omitted. /** * deserializeAws_json1_1TrainingMetrics */ const de_TrainingMetrics = (output: any, context: __SerdeContext): TrainingMetrics => { - return { - auc: __limitedParseFloat32(output.auc), - metricDataPoints: - output.metricDataPoints != null ? de_metricDataPointsList(output.metricDataPoints, context) : undefined, - } as any; + return take(output, { + auc: __limitedParseFloat32, + metricDataPoints: (_: any) => de_metricDataPointsList(_, context), + }) as any; }; /** * deserializeAws_json1_1TrainingMetricsV2 */ const de_TrainingMetricsV2 = (output: any, context: __SerdeContext): TrainingMetricsV2 => { - return { - ati: output.ati != null ? de_ATITrainingMetricsValue(output.ati, context) : undefined, - ofi: output.ofi != null ? de_OFITrainingMetricsValue(output.ofi, context) : undefined, - tfi: output.tfi != null ? de_TFITrainingMetricsValue(output.tfi, context) : undefined, - } as any; + return take(output, { + ati: (_: any) => de_ATITrainingMetricsValue(_, context), + ofi: (_: any) => de_OFITrainingMetricsValue(_, context), + tfi: (_: any) => de_TFITrainingMetricsValue(_, context), + }) as any; }; /** * deserializeAws_json1_1TrainingResult */ const de_TrainingResult = (output: any, context: __SerdeContext): TrainingResult => { - return { - dataValidationMetrics: - output.dataValidationMetrics != null - ? de_DataValidationMetrics(output.dataValidationMetrics, context) - : undefined, - trainingMetrics: output.trainingMetrics != null ? de_TrainingMetrics(output.trainingMetrics, context) : undefined, - variableImportanceMetrics: - output.variableImportanceMetrics != null - ? de_VariableImportanceMetrics(output.variableImportanceMetrics, context) - : undefined, - } as any; + return take(output, { + dataValidationMetrics: _json, + trainingMetrics: (_: any) => de_TrainingMetrics(_, context), + variableImportanceMetrics: (_: any) => de_VariableImportanceMetrics(_, context), + }) as any; }; /** * deserializeAws_json1_1TrainingResultV2 */ const de_TrainingResultV2 = (output: any, context: __SerdeContext): TrainingResultV2 => { - return { - aggregatedVariablesImportanceMetrics: - output.aggregatedVariablesImportanceMetrics != null - ? de_AggregatedVariablesImportanceMetrics(output.aggregatedVariablesImportanceMetrics, context) - : undefined, - dataValidationMetrics: - output.dataValidationMetrics != null - ? de_DataValidationMetrics(output.dataValidationMetrics, context) - : undefined, - trainingMetricsV2: - output.trainingMetricsV2 != null ? de_TrainingMetricsV2(output.trainingMetricsV2, context) : undefined, - variableImportanceMetrics: - output.variableImportanceMetrics != null - ? de_VariableImportanceMetrics(output.variableImportanceMetrics, context) - : undefined, - } as any; + return take(output, { + aggregatedVariablesImportanceMetrics: (_: any) => de_AggregatedVariablesImportanceMetrics(_, context), + dataValidationMetrics: _json, + trainingMetricsV2: (_: any) => de_TrainingMetricsV2(_, context), + variableImportanceMetrics: (_: any) => de_VariableImportanceMetrics(_, context), + }) as any; }; /** * deserializeAws_json1_1UncertaintyRange */ const de_UncertaintyRange = (output: any, context: __SerdeContext): UncertaintyRange => { - return { - lowerBoundValue: __limitedParseFloat32(output.lowerBoundValue), - upperBoundValue: __limitedParseFloat32(output.upperBoundValue), - } as any; + return take(output, { + lowerBoundValue: __limitedParseFloat32, + upperBoundValue: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResult - */ -const de_UntagResourceResult = (output: any, context: __SerdeContext): UntagResourceResult => { - return {} as any; -}; +// de_UntagResourceResult omitted. -/** - * deserializeAws_json1_1UpdateDetectorVersionMetadataResult - */ -const de_UpdateDetectorVersionMetadataResult = ( - output: any, - context: __SerdeContext -): UpdateDetectorVersionMetadataResult => { - return {} as any; -}; +// de_UpdateDetectorVersionMetadataResult omitted. -/** - * deserializeAws_json1_1UpdateDetectorVersionResult - */ -const de_UpdateDetectorVersionResult = (output: any, context: __SerdeContext): UpdateDetectorVersionResult => { - return {} as any; -}; +// de_UpdateDetectorVersionResult omitted. -/** - * deserializeAws_json1_1UpdateDetectorVersionStatusResult - */ -const de_UpdateDetectorVersionStatusResult = ( - output: any, - context: __SerdeContext -): UpdateDetectorVersionStatusResult => { - return {} as any; -}; +// de_UpdateDetectorVersionStatusResult omitted. -/** - * deserializeAws_json1_1UpdateEventLabelResult - */ -const de_UpdateEventLabelResult = (output: any, context: __SerdeContext): UpdateEventLabelResult => { - return {} as any; -}; +// de_UpdateEventLabelResult omitted. -/** - * deserializeAws_json1_1UpdateListResult - */ -const de_UpdateListResult = (output: any, context: __SerdeContext): UpdateListResult => { - return {} as any; -}; +// de_UpdateListResult omitted. -/** - * deserializeAws_json1_1UpdateModelResult - */ -const de_UpdateModelResult = (output: any, context: __SerdeContext): UpdateModelResult => { - return {} as any; -}; +// de_UpdateModelResult omitted. -/** - * deserializeAws_json1_1UpdateModelVersionResult - */ -const de_UpdateModelVersionResult = (output: any, context: __SerdeContext): UpdateModelVersionResult => { - return { - modelId: __expectString(output.modelId), - modelType: __expectString(output.modelType), - modelVersionNumber: __expectString(output.modelVersionNumber), - status: __expectString(output.status), - } as any; -}; +// de_UpdateModelVersionResult omitted. -/** - * deserializeAws_json1_1UpdateModelVersionStatusResult - */ -const de_UpdateModelVersionStatusResult = (output: any, context: __SerdeContext): UpdateModelVersionStatusResult => { - return {} as any; -}; +// de_UpdateModelVersionStatusResult omitted. -/** - * deserializeAws_json1_1UpdateRuleMetadataResult - */ -const de_UpdateRuleMetadataResult = (output: any, context: __SerdeContext): UpdateRuleMetadataResult => { - return {} as any; -}; +// de_UpdateRuleMetadataResult omitted. -/** - * deserializeAws_json1_1UpdateRuleVersionResult - */ -const de_UpdateRuleVersionResult = (output: any, context: __SerdeContext): UpdateRuleVersionResult => { - return { - rule: output.rule != null ? de_Rule(output.rule, context) : undefined, - } as any; -}; +// de_UpdateRuleVersionResult omitted. -/** - * deserializeAws_json1_1UpdateVariableResult - */ -const de_UpdateVariableResult = (output: any, context: __SerdeContext): UpdateVariableResult => { - return {} as any; -}; +// de_UpdateVariableResult omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1Variable - */ -const de_Variable = (output: any, context: __SerdeContext): Variable => { - return { - arn: __expectString(output.arn), - createdTime: __expectString(output.createdTime), - dataSource: __expectString(output.dataSource), - dataType: __expectString(output.dataType), - defaultValue: __expectString(output.defaultValue), - description: __expectString(output.description), - lastUpdatedTime: __expectString(output.lastUpdatedTime), - name: __expectString(output.name), - variableType: __expectString(output.variableType), - } as any; -}; +// de_Variable omitted. /** * deserializeAws_json1_1VariableImpactExplanation */ const de_VariableImpactExplanation = (output: any, context: __SerdeContext): VariableImpactExplanation => { - return { - eventVariableName: __expectString(output.eventVariableName), - logOddsImpact: __limitedParseFloat32(output.logOddsImpact), - relativeImpact: __expectString(output.relativeImpact), - } as any; + return take(output, { + eventVariableName: __expectString, + logOddsImpact: __limitedParseFloat32, + relativeImpact: __expectString, + }) as any; }; /** * deserializeAws_json1_1VariableImportanceMetrics */ const de_VariableImportanceMetrics = (output: any, context: __SerdeContext): VariableImportanceMetrics => { - return { - logOddsMetrics: output.logOddsMetrics != null ? de_ListOfLogOddsMetrics(output.logOddsMetrics, context) : undefined, - } as any; + return take(output, { + logOddsMetrics: (_: any) => de_ListOfLogOddsMetrics(_, context), + }) as any; }; -/** - * deserializeAws_json1_1VariableList - */ -const de_VariableList = (output: any, context: __SerdeContext): Variable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Variable(entry, context); - }); - return retVal; -}; +// de_VariableList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9271,6 +6635,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-fsx/src/protocols/Aws_json1_1.ts b/clients/client-fsx/src/protocols/Aws_json1_1.ts index f1e48339d80a..c39a28f5ff4c 100644 --- a/clients/client-fsx/src/protocols/Aws_json1_1.ts +++ b/clients/client-fsx/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -122,24 +124,18 @@ import { import { UpdateVolumeCommandInput, UpdateVolumeCommandOutput } from "../commands/UpdateVolumeCommand"; import { FSxServiceException as __BaseException } from "../models/FSxServiceException"; import { - ActiveDirectoryBackupAttributes, ActiveDirectoryError, AdministrativeAction, - AdministrativeActionFailureDetails, - Alias, AssociateFileSystemAliasesRequest, - AssociateFileSystemAliasesResponse, AutoExportPolicy, AutoImportPolicy, Backup, BackupBeingCopied, - BackupFailureDetails, BackupInProgress, BackupNotFound, BackupRestoring, BadRequest, CancelDataRepositoryTaskRequest, - CancelDataRepositoryTaskResponse, CompletionReport, CopyBackupRequest, CopyBackupResponse, @@ -174,40 +170,26 @@ import { CreateVolumeResponse, DataRepositoryAssociation, DataRepositoryAssociationNotFound, - DataRepositoryConfiguration, - DataRepositoryFailureDetails, DataRepositoryTask, DataRepositoryTaskEnded, DataRepositoryTaskExecuting, - DataRepositoryTaskFailureDetails, DataRepositoryTaskFilter, DataRepositoryTaskNotFound, DataRepositoryTaskStatus, DeleteBackupRequest, - DeleteBackupResponse, DeleteDataRepositoryAssociationRequest, - DeleteDataRepositoryAssociationResponse, DeleteFileCacheRequest, - DeleteFileCacheResponse, DeleteFileSystemLustreConfiguration, - DeleteFileSystemLustreResponse, DeleteFileSystemOpenZFSConfiguration, DeleteFileSystemOpenZFSOption, - DeleteFileSystemOpenZFSResponse, DeleteFileSystemRequest, - DeleteFileSystemResponse, DeleteFileSystemWindowsConfiguration, - DeleteFileSystemWindowsResponse, DeleteOpenZFSVolumeOption, DeleteSnapshotRequest, - DeleteSnapshotResponse, DeleteStorageVirtualMachineRequest, - DeleteStorageVirtualMachineResponse, DeleteVolumeOntapConfiguration, - DeleteVolumeOntapResponse, DeleteVolumeOpenZFSConfiguration, DeleteVolumeRequest, - DeleteVolumeResponse, DescribeBackupsRequest, DescribeBackupsResponse, DescribeDataRepositoryAssociationsRequest, @@ -217,7 +199,6 @@ import { DescribeFileCachesRequest, DescribeFileCachesResponse, DescribeFileSystemAliasesRequest, - DescribeFileSystemAliasesResponse, DescribeFileSystemsRequest, DescribeFileSystemsResponse, DescribeSnapshotsRequest, @@ -227,22 +208,15 @@ import { DescribeVolumesRequest, DescribeVolumesResponse, DisassociateFileSystemAliasesRequest, - DisassociateFileSystemAliasesResponse, DiskIopsConfiguration, EventType, FileCache, FileCacheCreating, FileCacheDataRepositoryAssociation, - FileCacheFailureDetails, - FileCacheLustreConfiguration, FileCacheLustreMetadataConfiguration, FileCacheNFSConfiguration, FileCacheNotFound, FileSystem, - FileSystemEndpoint, - FileSystemEndpoints, - FileSystemFailureDetails, - FileSystemMaintenanceOperation, FileSystemNotFound, Filter, IncompatibleParameterError, @@ -256,27 +230,17 @@ import { InvalidPerUnitStorageThroughput, InvalidRegion, InvalidSourceKmsKey, - LifecycleTransitionReason, ListTagsForResourceRequest, - ListTagsForResourceResponse, - LustreFileSystemConfiguration, - LustreLogConfiguration, LustreLogCreateConfiguration, LustreRootSquashConfiguration, MissingFileCacheConfiguration, MissingFileSystemConfiguration, MissingVolumeConfiguration, - NFSDataRepositoryConfiguration, NotServiceResourceError, - OntapFileSystemConfiguration, - OntapVolumeConfiguration, OpenZFSClientConfiguration, OpenZFSCreateRootVolumeConfiguration, - OpenZFSFileSystemConfiguration, OpenZFSNfsExport, - OpenZFSOriginSnapshotConfiguration, OpenZFSUserOrGroupQuota, - OpenZFSVolumeConfiguration, ReleaseFileSystemNfsV3LocksRequest, ReleaseFileSystemNfsV3LocksResponse, ResourceDoesNotSupportTagging, @@ -285,7 +249,6 @@ import { RestoreVolumeFromSnapshotRequest, RestoreVolumeFromSnapshotResponse, S3DataRepositoryConfiguration, - SelfManagedActiveDirectoryAttributes, SelfManagedActiveDirectoryConfiguration, SelfManagedActiveDirectoryConfigurationUpdates, ServiceLimitExceeded, @@ -296,16 +259,11 @@ import { StorageVirtualMachine, StorageVirtualMachineFilter, StorageVirtualMachineNotFound, - SvmActiveDirectoryConfiguration, - SvmEndpoint, - SvmEndpoints, Tag, TagResourceRequest, - TagResourceResponse, TieringPolicy, UnsupportedOperation, UntagResourceRequest, - UntagResourceResponse, UpdateDataRepositoryAssociationRequest, UpdateDataRepositoryAssociationResponse, UpdateFileCacheLustreConfiguration, @@ -329,9 +287,7 @@ import { Volume, VolumeFilter, VolumeNotFound, - WindowsAuditLogConfiguration, WindowsAuditLogCreateConfiguration, - WindowsFileSystemConfiguration, } from "../models/models_0"; /** @@ -356,7 +312,7 @@ export const se_CancelDataRepositoryTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelDataRepositoryTask"); let body: any; - body = JSON.stringify(se_CancelDataRepositoryTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -603,7 +559,7 @@ export const se_DescribeBackupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBackups"); let body: any; - body = JSON.stringify(se_DescribeBackupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -616,7 +572,7 @@ export const se_DescribeDataRepositoryAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataRepositoryAssociations"); let body: any; - body = JSON.stringify(se_DescribeDataRepositoryAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -629,7 +585,7 @@ export const se_DescribeDataRepositoryTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataRepositoryTasks"); let body: any; - body = JSON.stringify(se_DescribeDataRepositoryTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -642,7 +598,7 @@ export const se_DescribeFileCachesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFileCaches"); let body: any; - body = JSON.stringify(se_DescribeFileCachesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -668,7 +624,7 @@ export const se_DescribeFileSystemsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFileSystems"); let body: any; - body = JSON.stringify(se_DescribeFileSystemsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -681,7 +637,7 @@ export const se_DescribeSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSnapshots"); let body: any; - body = JSON.stringify(se_DescribeSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -694,7 +650,7 @@ export const se_DescribeStorageVirtualMachinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStorageVirtualMachines"); let body: any; - body = JSON.stringify(se_DescribeStorageVirtualMachinesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -707,7 +663,7 @@ export const se_DescribeVolumesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVolumes"); let body: any; - body = JSON.stringify(se_DescribeVolumesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -733,7 +689,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -772,7 +728,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -785,7 +741,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -879,12 +835,12 @@ export const de_AssociateFileSystemAliasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateFileSystemAliasesResponse(data, context); + contents = _json(data); const response: AssociateFileSystemAliasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -911,10 +867,9 @@ const de_AssociateFileSystemAliasesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -932,12 +887,12 @@ export const de_CancelDataRepositoryTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelDataRepositoryTaskResponse(data, context); + contents = _json(data); const response: CancelDataRepositoryTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -970,10 +925,9 @@ const de_CancelDataRepositoryTaskCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -996,7 +950,7 @@ export const de_CopyBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1047,10 +1001,9 @@ const de_CopyBackupCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1073,7 +1026,7 @@ export const de_CreateBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1115,10 +1068,9 @@ const de_CreateBackupCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1141,7 +1093,7 @@ export const de_CreateDataRepositoryAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1177,10 +1129,9 @@ const de_CreateDataRepositoryAssociationCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1203,7 +1154,7 @@ export const de_CreateDataRepositoryTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1242,10 +1193,9 @@ const de_CreateDataRepositoryTaskCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1268,7 +1218,7 @@ export const de_CreateFileCacheCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1307,10 +1257,9 @@ const de_CreateFileCacheCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,7 +1282,7 @@ export const de_CreateFileSystemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1381,10 +1330,9 @@ const de_CreateFileSystemCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1407,7 +1355,7 @@ export const de_CreateFileSystemFromBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1452,10 +1400,9 @@ const de_CreateFileSystemFromBackupCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,7 +1425,7 @@ export const de_CreateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1508,10 +1455,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,7 +1480,7 @@ export const de_CreateStorageVirtualMachineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1573,10 +1519,9 @@ const de_CreateStorageVirtualMachineCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1599,7 +1544,7 @@ export const de_CreateVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1641,10 +1586,9 @@ const de_CreateVolumeCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1667,7 +1611,7 @@ export const de_CreateVolumeFromBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1709,10 +1653,9 @@ const de_CreateVolumeFromBackupCommandError = async ( throw await de_StorageVirtualMachineNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1730,12 +1673,12 @@ export const de_DeleteBackupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBackupResponse(data, context); + contents = _json(data); const response: DeleteBackupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1774,10 +1717,9 @@ const de_DeleteBackupCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1795,12 +1737,12 @@ export const de_DeleteDataRepositoryAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDataRepositoryAssociationResponse(data, context); + contents = _json(data); const response: DeleteDataRepositoryAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1833,10 +1775,9 @@ const de_DeleteDataRepositoryAssociationCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1854,12 +1795,12 @@ export const de_DeleteFileCacheCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFileCacheResponse(data, context); + contents = _json(data); const response: DeleteFileCacheCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1892,10 +1833,9 @@ const de_DeleteFileCacheCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1913,12 +1853,12 @@ export const de_DeleteFileSystemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFileSystemResponse(data, context); + contents = _json(data); const response: DeleteFileSystemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1951,10 +1891,9 @@ const de_DeleteFileSystemCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1972,12 +1911,12 @@ export const de_DeleteSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSnapshotResponse(data, context); + contents = _json(data); const response: DeleteSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2004,10 +1943,9 @@ const de_DeleteSnapshotCommandError = async ( throw await de_SnapshotNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2025,12 +1963,12 @@ export const de_DeleteStorageVirtualMachineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteStorageVirtualMachineResponse(data, context); + contents = _json(data); const response: DeleteStorageVirtualMachineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2060,10 +1998,9 @@ const de_DeleteStorageVirtualMachineCommandError = async ( throw await de_StorageVirtualMachineNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2081,12 +2018,12 @@ export const de_DeleteVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVolumeResponse(data, context); + contents = _json(data); const response: DeleteVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2116,10 +2053,9 @@ const de_DeleteVolumeCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2142,7 +2078,7 @@ export const de_DescribeBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2175,10 +2111,9 @@ const de_DescribeBackupsCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2201,7 +2136,7 @@ export const de_DescribeDataRepositoryAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2234,10 +2169,9 @@ const de_DescribeDataRepositoryAssociationsCommandError = async ( throw await de_InvalidDataRepositoryTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2260,7 +2194,7 @@ export const de_DescribeDataRepositoryTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2290,10 +2224,9 @@ const de_DescribeDataRepositoryTasksCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2316,7 +2249,7 @@ export const de_DescribeFileCachesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2343,10 +2276,9 @@ const de_DescribeFileCachesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2364,12 +2296,12 @@ export const de_DescribeFileSystemAliasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFileSystemAliasesResponse(data, context); + contents = _json(data); const response: DescribeFileSystemAliasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2396,10 +2328,9 @@ const de_DescribeFileSystemAliasesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2422,7 +2353,7 @@ export const de_DescribeFileSystemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2449,10 +2380,9 @@ const de_DescribeFileSystemsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2475,7 +2405,7 @@ export const de_DescribeSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2502,10 +2432,9 @@ const de_DescribeSnapshotsCommandError = async ( throw await de_SnapshotNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2528,7 +2457,7 @@ export const de_DescribeStorageVirtualMachinesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2555,10 +2484,9 @@ const de_DescribeStorageVirtualMachinesCommandError = async ( throw await de_StorageVirtualMachineNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2581,7 +2509,7 @@ export const de_DescribeVolumesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2608,10 +2536,9 @@ const de_DescribeVolumesCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2629,12 +2556,12 @@ export const de_DisassociateFileSystemAliasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateFileSystemAliasesResponse(data, context); + contents = _json(data); const response: DisassociateFileSystemAliasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2661,10 +2588,9 @@ const de_DisassociateFileSystemAliasesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2682,12 +2608,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2720,10 +2646,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2746,7 +2671,7 @@ export const de_ReleaseFileSystemNfsV3LocksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2779,10 +2704,9 @@ const de_ReleaseFileSystemNfsV3LocksCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2805,7 +2729,7 @@ export const de_RestoreVolumeFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2832,10 +2756,9 @@ const de_RestoreVolumeFromSnapshotCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2853,12 +2776,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2891,10 +2814,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2912,12 +2834,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2950,10 +2872,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2976,7 +2897,7 @@ export const de_UpdateDataRepositoryAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3009,10 +2930,9 @@ const de_UpdateDataRepositoryAssociationCommandError = async ( throw await de_ServiceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3035,7 +2955,7 @@ export const de_UpdateFileCacheCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3074,10 +2994,9 @@ const de_UpdateFileCacheCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3100,7 +3019,7 @@ export const de_UpdateFileSystemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3142,10 +3061,9 @@ const de_UpdateFileSystemCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3168,7 +3086,7 @@ export const de_UpdateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3195,10 +3113,9 @@ const de_UpdateSnapshotCommandError = async ( throw await de_SnapshotNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3221,7 +3138,7 @@ export const de_UpdateStorageVirtualMachineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3254,10 +3171,9 @@ const de_UpdateStorageVirtualMachineCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3280,7 +3196,7 @@ export const de_UpdateVolumeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3313,10 +3229,9 @@ const de_UpdateVolumeCommandError = async ( throw await de_VolumeNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3330,7 +3245,7 @@ const de_ActiveDirectoryErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActiveDirectoryError(body, context); + const deserialized: any = _json(body); const exception = new ActiveDirectoryError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3343,7 +3258,7 @@ const de_ActiveDirectoryErrorRes = async ( */ const de_BackupBeingCopiedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BackupBeingCopied(body, context); + const deserialized: any = _json(body); const exception = new BackupBeingCopied({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3356,7 +3271,7 @@ const de_BackupBeingCopiedRes = async (parsedOutput: any, context: __SerdeContex */ const de_BackupInProgressRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BackupInProgress(body, context); + const deserialized: any = _json(body); const exception = new BackupInProgress({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3369,7 +3284,7 @@ const de_BackupInProgressRes = async (parsedOutput: any, context: __SerdeContext */ const de_BackupNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BackupNotFound(body, context); + const deserialized: any = _json(body); const exception = new BackupNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3382,7 +3297,7 @@ const de_BackupNotFoundRes = async (parsedOutput: any, context: __SerdeContext): */ const de_BackupRestoringRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BackupRestoring(body, context); + const deserialized: any = _json(body); const exception = new BackupRestoring({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3395,7 +3310,7 @@ const de_BackupRestoringRes = async (parsedOutput: any, context: __SerdeContext) */ const de_BadRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BadRequest(body, context); + const deserialized: any = _json(body); const exception = new BadRequest({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3411,7 +3326,7 @@ const de_DataRepositoryAssociationNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataRepositoryAssociationNotFound(body, context); + const deserialized: any = _json(body); const exception = new DataRepositoryAssociationNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3427,7 +3342,7 @@ const de_DataRepositoryTaskEndedRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataRepositoryTaskEnded(body, context); + const deserialized: any = _json(body); const exception = new DataRepositoryTaskEnded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3443,7 +3358,7 @@ const de_DataRepositoryTaskExecutingRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataRepositoryTaskExecuting(body, context); + const deserialized: any = _json(body); const exception = new DataRepositoryTaskExecuting({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3459,7 +3374,7 @@ const de_DataRepositoryTaskNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataRepositoryTaskNotFound(body, context); + const deserialized: any = _json(body); const exception = new DataRepositoryTaskNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3472,7 +3387,7 @@ const de_DataRepositoryTaskNotFoundRes = async ( */ const de_FileCacheNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileCacheNotFound(body, context); + const deserialized: any = _json(body); const exception = new FileCacheNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3485,7 +3400,7 @@ const de_FileCacheNotFoundRes = async (parsedOutput: any, context: __SerdeContex */ const de_FileSystemNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FileSystemNotFound(body, context); + const deserialized: any = _json(body); const exception = new FileSystemNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3501,7 +3416,7 @@ const de_IncompatibleParameterErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncompatibleParameterError(body, context); + const deserialized: any = _json(body); const exception = new IncompatibleParameterError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3517,7 +3432,7 @@ const de_IncompatibleRegionForMultiAZRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncompatibleRegionForMultiAZ(body, context); + const deserialized: any = _json(body); const exception = new IncompatibleRegionForMultiAZ({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3530,7 +3445,7 @@ const de_IncompatibleRegionForMultiAZRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3546,7 +3461,7 @@ const de_InvalidDataRepositoryTypeRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDataRepositoryType(body, context); + const deserialized: any = _json(body); const exception = new InvalidDataRepositoryType({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3562,7 +3477,7 @@ const de_InvalidDestinationKmsKeyRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDestinationKmsKey(body, context); + const deserialized: any = _json(body); const exception = new InvalidDestinationKmsKey({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3575,7 +3490,7 @@ const de_InvalidDestinationKmsKeyRes = async ( */ const de_InvalidExportPathRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidExportPath(body, context); + const deserialized: any = _json(body); const exception = new InvalidExportPath({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3588,7 +3503,7 @@ const de_InvalidExportPathRes = async (parsedOutput: any, context: __SerdeContex */ const de_InvalidImportPathRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidImportPath(body, context); + const deserialized: any = _json(body); const exception = new InvalidImportPath({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3604,7 +3519,7 @@ const de_InvalidNetworkSettingsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNetworkSettings(body, context); + const deserialized: any = _json(body); const exception = new InvalidNetworkSettings({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3620,7 +3535,7 @@ const de_InvalidPerUnitStorageThroughputRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPerUnitStorageThroughput(body, context); + const deserialized: any = _json(body); const exception = new InvalidPerUnitStorageThroughput({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3633,7 +3548,7 @@ const de_InvalidPerUnitStorageThroughputRes = async ( */ const de_InvalidRegionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRegion(body, context); + const deserialized: any = _json(body); const exception = new InvalidRegion({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3646,7 +3561,7 @@ const de_InvalidRegionRes = async (parsedOutput: any, context: __SerdeContext): */ const de_InvalidSourceKmsKeyRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSourceKmsKey(body, context); + const deserialized: any = _json(body); const exception = new InvalidSourceKmsKey({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3662,7 +3577,7 @@ const de_MissingFileCacheConfigurationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingFileCacheConfiguration(body, context); + const deserialized: any = _json(body); const exception = new MissingFileCacheConfiguration({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3678,7 +3593,7 @@ const de_MissingFileSystemConfigurationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingFileSystemConfiguration(body, context); + const deserialized: any = _json(body); const exception = new MissingFileSystemConfiguration({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3694,7 +3609,7 @@ const de_MissingVolumeConfigurationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingVolumeConfiguration(body, context); + const deserialized: any = _json(body); const exception = new MissingVolumeConfiguration({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3710,7 +3625,7 @@ const de_NotServiceResourceErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotServiceResourceError(body, context); + const deserialized: any = _json(body); const exception = new NotServiceResourceError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3726,7 +3641,7 @@ const de_ResourceDoesNotSupportTaggingRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceDoesNotSupportTagging(body, context); + const deserialized: any = _json(body); const exception = new ResourceDoesNotSupportTagging({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3739,7 +3654,7 @@ const de_ResourceDoesNotSupportTaggingRes = async ( */ const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFound(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3755,7 +3670,7 @@ const de_ServiceLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ServiceLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3768,7 +3683,7 @@ const de_ServiceLimitExceededRes = async ( */ const de_SnapshotNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SnapshotNotFound(body, context); + const deserialized: any = _json(body); const exception = new SnapshotNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3784,7 +3699,7 @@ const de_SourceBackupUnavailableRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SourceBackupUnavailable(body, context); + const deserialized: any = _json(body); const exception = new SourceBackupUnavailable({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3800,7 +3715,7 @@ const de_StorageVirtualMachineNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StorageVirtualMachineNotFound(body, context); + const deserialized: any = _json(body); const exception = new StorageVirtualMachineNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3816,7 +3731,7 @@ const de_UnsupportedOperationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperation(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3829,7 +3744,7 @@ const de_UnsupportedOperationRes = async ( */ const de_VolumeNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_VolumeNotFound(body, context); + const deserialized: any = _json(body); const exception = new VolumeNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3837,16 +3752,7 @@ const de_VolumeNotFoundRes = async (parsedOutput: any, context: __SerdeContext): return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AlternateDNSNames - */ -const se_AlternateDNSNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AlternateDNSNames omitted. /** * serializeAws_json1_1AssociateFileSystemAliasesRequest @@ -3855,87 +3761,47 @@ const se_AssociateFileSystemAliasesRequest = ( input: AssociateFileSystemAliasesRequest, context: __SerdeContext ): any => { - return { - ...(input.Aliases != null && { Aliases: se_AlternateDNSNames(input.Aliases, context) }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - }; + return take(input, { + Aliases: _json, + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + }); }; -/** - * serializeAws_json1_1AutoExportPolicy - */ -const se_AutoExportPolicy = (input: AutoExportPolicy, context: __SerdeContext): any => { - return { - ...(input.Events != null && { Events: se_EventTypes(input.Events, context) }), - }; -}; +// se_AutoExportPolicy omitted. -/** - * serializeAws_json1_1AutoImportPolicy - */ -const se_AutoImportPolicy = (input: AutoImportPolicy, context: __SerdeContext): any => { - return { - ...(input.Events != null && { Events: se_EventTypes(input.Events, context) }), - }; -}; +// se_AutoImportPolicy omitted. -/** - * serializeAws_json1_1BackupIds - */ -const se_BackupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BackupIds omitted. -/** - * serializeAws_json1_1CancelDataRepositoryTaskRequest - */ -const se_CancelDataRepositoryTaskRequest = (input: CancelDataRepositoryTaskRequest, context: __SerdeContext): any => { - return { - ...(input.TaskId != null && { TaskId: input.TaskId }), - }; -}; +// se_CancelDataRepositoryTaskRequest omitted. -/** - * serializeAws_json1_1CompletionReport - */ -const se_CompletionReport = (input: CompletionReport, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; +// se_CompletionReport omitted. /** * serializeAws_json1_1CopyBackupRequest */ const se_CopyBackupRequest = (input: CopyBackupRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.CopyTags != null && { CopyTags: input.CopyTags }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.SourceBackupId != null && { SourceBackupId: input.SourceBackupId }), - ...(input.SourceRegion != null && { SourceRegion: input.SourceRegion }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + CopyTags: [], + KmsKeyId: [], + SourceBackupId: [], + SourceRegion: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateBackupRequest */ const se_CreateBackupRequest = (input: CreateBackupRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + Tags: _json, + VolumeId: [], + }); }; /** @@ -3945,92 +3811,54 @@ const se_CreateDataRepositoryAssociationRequest = ( input: CreateDataRepositoryAssociationRequest, context: __SerdeContext ): any => { - return { - ...(input.BatchImportMetaDataOnCreate != null && { - BatchImportMetaDataOnCreate: input.BatchImportMetaDataOnCreate, - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DataRepositoryPath != null && { DataRepositoryPath: input.DataRepositoryPath }), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.FileSystemPath != null && { FileSystemPath: input.FileSystemPath }), - ...(input.ImportedFileChunkSize != null && { ImportedFileChunkSize: input.ImportedFileChunkSize }), - ...(input.S3 != null && { S3: se_S3DataRepositoryConfiguration(input.S3, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + BatchImportMetaDataOnCreate: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DataRepositoryPath: [], + FileSystemId: [], + FileSystemPath: [], + ImportedFileChunkSize: [], + S3: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateDataRepositoryTaskRequest */ const se_CreateDataRepositoryTaskRequest = (input: CreateDataRepositoryTaskRequest, context: __SerdeContext): any => { - return { - ...(input.CapacityToRelease != null && { CapacityToRelease: input.CapacityToRelease }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.Paths != null && { Paths: se_DataRepositoryTaskPaths(input.Paths, context) }), - ...(input.Report != null && { Report: se_CompletionReport(input.Report, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + CapacityToRelease: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + Paths: _json, + Report: _json, + Tags: _json, + Type: [], + }); }; -/** - * serializeAws_json1_1CreateFileCacheDataRepositoryAssociations - */ -const se_CreateFileCacheDataRepositoryAssociations = ( - input: FileCacheDataRepositoryAssociation[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FileCacheDataRepositoryAssociation(entry, context); - }); -}; +// se_CreateFileCacheDataRepositoryAssociations omitted. -/** - * serializeAws_json1_1CreateFileCacheLustreConfiguration - */ -const se_CreateFileCacheLustreConfiguration = ( - input: CreateFileCacheLustreConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }), - ...(input.MetadataConfiguration != null && { - MetadataConfiguration: se_FileCacheLustreMetadataConfiguration(input.MetadataConfiguration, context), - }), - ...(input.PerUnitStorageThroughput != null && { PerUnitStorageThroughput: input.PerUnitStorageThroughput }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; +// se_CreateFileCacheLustreConfiguration omitted. /** * serializeAws_json1_1CreateFileCacheRequest */ const se_CreateFileCacheRequest = (input: CreateFileCacheRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.CopyTagsToDataRepositoryAssociations != null && { - CopyTagsToDataRepositoryAssociations: input.CopyTagsToDataRepositoryAssociations, - }), - ...(input.DataRepositoryAssociations != null && { - DataRepositoryAssociations: se_CreateFileCacheDataRepositoryAssociations( - input.DataRepositoryAssociations, - context - ), - }), - ...(input.FileCacheType != null && { FileCacheType: input.FileCacheType }), - ...(input.FileCacheTypeVersion != null && { FileCacheTypeVersion: input.FileCacheTypeVersion }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LustreConfiguration != null && { - LustreConfiguration: se_CreateFileCacheLustreConfiguration(input.LustreConfiguration, context), - }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.StorageCapacity != null && { StorageCapacity: input.StorageCapacity }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + CopyTagsToDataRepositoryAssociations: [], + DataRepositoryAssociations: _json, + FileCacheType: [], + FileCacheTypeVersion: [], + KmsKeyId: [], + LustreConfiguration: _json, + SecurityGroupIds: _json, + StorageCapacity: [], + SubnetIds: _json, + Tags: _json, + }); }; /** @@ -4040,242 +3868,67 @@ const se_CreateFileSystemFromBackupRequest = ( input: CreateFileSystemFromBackupRequest, context: __SerdeContext ): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemTypeVersion != null && { FileSystemTypeVersion: input.FileSystemTypeVersion }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LustreConfiguration != null && { - LustreConfiguration: se_CreateFileSystemLustreConfiguration(input.LustreConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_CreateFileSystemOpenZFSConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.StorageCapacity != null && { StorageCapacity: input.StorageCapacity }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.WindowsConfiguration != null && { - WindowsConfiguration: se_CreateFileSystemWindowsConfiguration(input.WindowsConfiguration, context), - }), - }; + return take(input, { + BackupId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemTypeVersion: [], + KmsKeyId: [], + LustreConfiguration: _json, + OpenZFSConfiguration: _json, + SecurityGroupIds: _json, + StorageCapacity: [], + StorageType: [], + SubnetIds: _json, + Tags: _json, + WindowsConfiguration: _json, + }); }; -/** - * serializeAws_json1_1CreateFileSystemLustreConfiguration - */ -const se_CreateFileSystemLustreConfiguration = ( - input: CreateFileSystemLustreConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AutoImportPolicy != null && { AutoImportPolicy: input.AutoImportPolicy }), - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.CopyTagsToBackups != null && { CopyTagsToBackups: input.CopyTagsToBackups }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DataCompressionType != null && { DataCompressionType: input.DataCompressionType }), - ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }), - ...(input.DriveCacheType != null && { DriveCacheType: input.DriveCacheType }), - ...(input.ExportPath != null && { ExportPath: input.ExportPath }), - ...(input.ImportPath != null && { ImportPath: input.ImportPath }), - ...(input.ImportedFileChunkSize != null && { ImportedFileChunkSize: input.ImportedFileChunkSize }), - ...(input.LogConfiguration != null && { - LogConfiguration: se_LustreLogCreateConfiguration(input.LogConfiguration, context), - }), - ...(input.PerUnitStorageThroughput != null && { PerUnitStorageThroughput: input.PerUnitStorageThroughput }), - ...(input.RootSquashConfiguration != null && { - RootSquashConfiguration: se_LustreRootSquashConfiguration(input.RootSquashConfiguration, context), - }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; +// se_CreateFileSystemLustreConfiguration omitted. -/** - * serializeAws_json1_1CreateFileSystemOntapConfiguration - */ -const se_CreateFileSystemOntapConfiguration = ( - input: CreateFileSystemOntapConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }), - ...(input.DiskIopsConfiguration != null && { - DiskIopsConfiguration: se_DiskIopsConfiguration(input.DiskIopsConfiguration, context), - }), - ...(input.EndpointIpAddressRange != null && { EndpointIpAddressRange: input.EndpointIpAddressRange }), - ...(input.FsxAdminPassword != null && { FsxAdminPassword: input.FsxAdminPassword }), - ...(input.PreferredSubnetId != null && { PreferredSubnetId: input.PreferredSubnetId }), - ...(input.RouteTableIds != null && { RouteTableIds: se_RouteTableIds(input.RouteTableIds, context) }), - ...(input.ThroughputCapacity != null && { ThroughputCapacity: input.ThroughputCapacity }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; +// se_CreateFileSystemOntapConfiguration omitted. -/** - * serializeAws_json1_1CreateFileSystemOpenZFSConfiguration - */ -const se_CreateFileSystemOpenZFSConfiguration = ( - input: CreateFileSystemOpenZFSConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.CopyTagsToBackups != null && { CopyTagsToBackups: input.CopyTagsToBackups }), - ...(input.CopyTagsToVolumes != null && { CopyTagsToVolumes: input.CopyTagsToVolumes }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }), - ...(input.DiskIopsConfiguration != null && { - DiskIopsConfiguration: se_DiskIopsConfiguration(input.DiskIopsConfiguration, context), - }), - ...(input.RootVolumeConfiguration != null && { - RootVolumeConfiguration: se_OpenZFSCreateRootVolumeConfiguration(input.RootVolumeConfiguration, context), - }), - ...(input.ThroughputCapacity != null && { ThroughputCapacity: input.ThroughputCapacity }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; +// se_CreateFileSystemOpenZFSConfiguration omitted. /** * serializeAws_json1_1CreateFileSystemRequest */ const se_CreateFileSystemRequest = (input: CreateFileSystemRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemType != null && { FileSystemType: input.FileSystemType }), - ...(input.FileSystemTypeVersion != null && { FileSystemTypeVersion: input.FileSystemTypeVersion }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LustreConfiguration != null && { - LustreConfiguration: se_CreateFileSystemLustreConfiguration(input.LustreConfiguration, context), - }), - ...(input.OntapConfiguration != null && { - OntapConfiguration: se_CreateFileSystemOntapConfiguration(input.OntapConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_CreateFileSystemOpenZFSConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.StorageCapacity != null && { StorageCapacity: input.StorageCapacity }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.WindowsConfiguration != null && { - WindowsConfiguration: se_CreateFileSystemWindowsConfiguration(input.WindowsConfiguration, context), - }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemType: [], + FileSystemTypeVersion: [], + KmsKeyId: [], + LustreConfiguration: _json, + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + SecurityGroupIds: _json, + StorageCapacity: [], + StorageType: [], + SubnetIds: _json, + Tags: _json, + WindowsConfiguration: _json, + }); }; -/** - * serializeAws_json1_1CreateFileSystemWindowsConfiguration - */ -const se_CreateFileSystemWindowsConfiguration = ( - input: CreateFileSystemWindowsConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ActiveDirectoryId != null && { ActiveDirectoryId: input.ActiveDirectoryId }), - ...(input.Aliases != null && { Aliases: se_AlternateDNSNames(input.Aliases, context) }), - ...(input.AuditLogConfiguration != null && { - AuditLogConfiguration: se_WindowsAuditLogCreateConfiguration(input.AuditLogConfiguration, context), - }), - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.CopyTagsToBackups != null && { CopyTagsToBackups: input.CopyTagsToBackups }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }), - ...(input.PreferredSubnetId != null && { PreferredSubnetId: input.PreferredSubnetId }), - ...(input.SelfManagedActiveDirectoryConfiguration != null && { - SelfManagedActiveDirectoryConfiguration: se_SelfManagedActiveDirectoryConfiguration( - input.SelfManagedActiveDirectoryConfiguration, - context - ), - }), - ...(input.ThroughputCapacity != null && { ThroughputCapacity: input.ThroughputCapacity }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; +// se_CreateFileSystemWindowsConfiguration omitted. -/** - * serializeAws_json1_1CreateOntapVolumeConfiguration - */ -const se_CreateOntapVolumeConfiguration = (input: CreateOntapVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.CopyTagsToBackups != null && { CopyTagsToBackups: input.CopyTagsToBackups }), - ...(input.JunctionPath != null && { JunctionPath: input.JunctionPath }), - ...(input.OntapVolumeType != null && { OntapVolumeType: input.OntapVolumeType }), - ...(input.SecurityStyle != null && { SecurityStyle: input.SecurityStyle }), - ...(input.SizeInMegabytes != null && { SizeInMegabytes: input.SizeInMegabytes }), - ...(input.SnapshotPolicy != null && { SnapshotPolicy: input.SnapshotPolicy }), - ...(input.StorageEfficiencyEnabled != null && { StorageEfficiencyEnabled: input.StorageEfficiencyEnabled }), - ...(input.StorageVirtualMachineId != null && { StorageVirtualMachineId: input.StorageVirtualMachineId }), - ...(input.TieringPolicy != null && { TieringPolicy: se_TieringPolicy(input.TieringPolicy, context) }), - }; -}; +// se_CreateOntapVolumeConfiguration omitted. -/** - * serializeAws_json1_1CreateOpenZFSOriginSnapshotConfiguration - */ -const se_CreateOpenZFSOriginSnapshotConfiguration = ( - input: CreateOpenZFSOriginSnapshotConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CopyStrategy != null && { CopyStrategy: input.CopyStrategy }), - ...(input.SnapshotARN != null && { SnapshotARN: input.SnapshotARN }), - }; -}; +// se_CreateOpenZFSOriginSnapshotConfiguration omitted. -/** - * serializeAws_json1_1CreateOpenZFSVolumeConfiguration - */ -const se_CreateOpenZFSVolumeConfiguration = (input: CreateOpenZFSVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.CopyTagsToSnapshots != null && { CopyTagsToSnapshots: input.CopyTagsToSnapshots }), - ...(input.DataCompressionType != null && { DataCompressionType: input.DataCompressionType }), - ...(input.NfsExports != null && { NfsExports: se_OpenZFSNfsExports(input.NfsExports, context) }), - ...(input.OriginSnapshot != null && { - OriginSnapshot: se_CreateOpenZFSOriginSnapshotConfiguration(input.OriginSnapshot, context), - }), - ...(input.ParentVolumeId != null && { ParentVolumeId: input.ParentVolumeId }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RecordSizeKiB != null && { RecordSizeKiB: input.RecordSizeKiB }), - ...(input.StorageCapacityQuotaGiB != null && { StorageCapacityQuotaGiB: input.StorageCapacityQuotaGiB }), - ...(input.StorageCapacityReservationGiB != null && { - StorageCapacityReservationGiB: input.StorageCapacityReservationGiB, - }), - ...(input.UserAndGroupQuotas != null && { - UserAndGroupQuotas: se_OpenZFSUserAndGroupQuotas(input.UserAndGroupQuotas, context), - }), - }; -}; +// se_CreateOpenZFSVolumeConfiguration omitted. /** * serializeAws_json1_1CreateSnapshotRequest */ const se_CreateSnapshotRequest = (input: CreateSnapshotRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + Tags: _json, + VolumeId: [], + }); }; /** @@ -4285,135 +3938,64 @@ const se_CreateStorageVirtualMachineRequest = ( input: CreateStorageVirtualMachineRequest, context: __SerdeContext ): any => { - return { - ...(input.ActiveDirectoryConfiguration != null && { - ActiveDirectoryConfiguration: se_CreateSvmActiveDirectoryConfiguration( - input.ActiveDirectoryConfiguration, - context - ), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RootVolumeSecurityStyle != null && { RootVolumeSecurityStyle: input.RootVolumeSecurityStyle }), - ...(input.SvmAdminPassword != null && { SvmAdminPassword: input.SvmAdminPassword }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + ActiveDirectoryConfiguration: _json, + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + Name: [], + RootVolumeSecurityStyle: [], + SvmAdminPassword: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateSvmActiveDirectoryConfiguration - */ -const se_CreateSvmActiveDirectoryConfiguration = ( - input: CreateSvmActiveDirectoryConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.NetBiosName != null && { NetBiosName: input.NetBiosName }), - ...(input.SelfManagedActiveDirectoryConfiguration != null && { - SelfManagedActiveDirectoryConfiguration: se_SelfManagedActiveDirectoryConfiguration( - input.SelfManagedActiveDirectoryConfiguration, - context - ), - }), - }; -}; +// se_CreateSvmActiveDirectoryConfiguration omitted. /** * serializeAws_json1_1CreateVolumeFromBackupRequest */ const se_CreateVolumeFromBackupRequest = (input: CreateVolumeFromBackupRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.OntapConfiguration != null && { - OntapConfiguration: se_CreateOntapVolumeConfiguration(input.OntapConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + BackupId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + OntapConfiguration: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateVolumeRequest */ const se_CreateVolumeRequest = (input: CreateVolumeRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.OntapConfiguration != null && { - OntapConfiguration: se_CreateOntapVolumeConfiguration(input.OntapConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_CreateOpenZFSVolumeConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + Tags: _json, + VolumeType: [], + }); }; -/** - * serializeAws_json1_1DataRepositoryAssociationIds - */ -const se_DataRepositoryAssociationIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataRepositoryAssociationIds omitted. -/** - * serializeAws_json1_1DataRepositoryTaskFilter - */ -const se_DataRepositoryTaskFilter = (input: DataRepositoryTaskFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_DataRepositoryTaskFilterValues(input.Values, context) }), - }; -}; +// se_DataRepositoryTaskFilter omitted. -/** - * serializeAws_json1_1DataRepositoryTaskFilters - */ -const se_DataRepositoryTaskFilters = (input: DataRepositoryTaskFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataRepositoryTaskFilter(entry, context); - }); -}; +// se_DataRepositoryTaskFilters omitted. -/** - * serializeAws_json1_1DataRepositoryTaskFilterValues - */ -const se_DataRepositoryTaskFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataRepositoryTaskFilterValues omitted. -/** - * serializeAws_json1_1DataRepositoryTaskPaths - */ -const se_DataRepositoryTaskPaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataRepositoryTaskPaths omitted. /** * serializeAws_json1_1DeleteBackupRequest */ const se_DeleteBackupRequest = (input: DeleteBackupRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - }; + return take(input, { + BackupId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + }); }; /** @@ -4423,115 +4005,54 @@ const se_DeleteDataRepositoryAssociationRequest = ( input: DeleteDataRepositoryAssociationRequest, context: __SerdeContext ): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DeleteDataInFileSystem != null && { DeleteDataInFileSystem: input.DeleteDataInFileSystem }), - }; + return take(input, { + AssociationId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DeleteDataInFileSystem: [], + }); }; /** * serializeAws_json1_1DeleteFileCacheRequest */ const se_DeleteFileCacheRequest = (input: DeleteFileCacheRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileCacheId != null && { FileCacheId: input.FileCacheId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileCacheId: [], + }); }; -/** - * serializeAws_json1_1DeleteFileSystemLustreConfiguration - */ -const se_DeleteFileSystemLustreConfiguration = ( - input: DeleteFileSystemLustreConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FinalBackupTags != null && { FinalBackupTags: se_Tags(input.FinalBackupTags, context) }), - ...(input.SkipFinalBackup != null && { SkipFinalBackup: input.SkipFinalBackup }), - }; -}; +// se_DeleteFileSystemLustreConfiguration omitted. -/** - * serializeAws_json1_1DeleteFileSystemOpenZFSConfiguration - */ -const se_DeleteFileSystemOpenZFSConfiguration = ( - input: DeleteFileSystemOpenZFSConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FinalBackupTags != null && { FinalBackupTags: se_Tags(input.FinalBackupTags, context) }), - ...(input.Options != null && { Options: se_DeleteFileSystemOpenZFSOptions(input.Options, context) }), - ...(input.SkipFinalBackup != null && { SkipFinalBackup: input.SkipFinalBackup }), - }; -}; +// se_DeleteFileSystemOpenZFSConfiguration omitted. -/** - * serializeAws_json1_1DeleteFileSystemOpenZFSOptions - */ -const se_DeleteFileSystemOpenZFSOptions = ( - input: (DeleteFileSystemOpenZFSOption | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteFileSystemOpenZFSOptions omitted. /** * serializeAws_json1_1DeleteFileSystemRequest */ const se_DeleteFileSystemRequest = (input: DeleteFileSystemRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.LustreConfiguration != null && { - LustreConfiguration: se_DeleteFileSystemLustreConfiguration(input.LustreConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_DeleteFileSystemOpenZFSConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.WindowsConfiguration != null && { - WindowsConfiguration: se_DeleteFileSystemWindowsConfiguration(input.WindowsConfiguration, context), - }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + LustreConfiguration: _json, + OpenZFSConfiguration: _json, + WindowsConfiguration: _json, + }); }; -/** - * serializeAws_json1_1DeleteFileSystemWindowsConfiguration - */ -const se_DeleteFileSystemWindowsConfiguration = ( - input: DeleteFileSystemWindowsConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FinalBackupTags != null && { FinalBackupTags: se_Tags(input.FinalBackupTags, context) }), - ...(input.SkipFinalBackup != null && { SkipFinalBackup: input.SkipFinalBackup }), - }; -}; +// se_DeleteFileSystemWindowsConfiguration omitted. -/** - * serializeAws_json1_1DeleteOpenZFSVolumeOptions - */ -const se_DeleteOpenZFSVolumeOptions = (input: (DeleteOpenZFSVolumeOption | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteOpenZFSVolumeOptions omitted. /** * serializeAws_json1_1DeleteSnapshotRequest */ const se_DeleteSnapshotRequest = (input: DeleteSnapshotRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + SnapshotId: [], + }); }; /** @@ -4541,165 +4062,55 @@ const se_DeleteStorageVirtualMachineRequest = ( input: DeleteStorageVirtualMachineRequest, context: __SerdeContext ): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.StorageVirtualMachineId != null && { StorageVirtualMachineId: input.StorageVirtualMachineId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + StorageVirtualMachineId: [], + }); }; -/** - * serializeAws_json1_1DeleteVolumeOntapConfiguration - */ -const se_DeleteVolumeOntapConfiguration = (input: DeleteVolumeOntapConfiguration, context: __SerdeContext): any => { - return { - ...(input.FinalBackupTags != null && { FinalBackupTags: se_Tags(input.FinalBackupTags, context) }), - ...(input.SkipFinalBackup != null && { SkipFinalBackup: input.SkipFinalBackup }), - }; -}; +// se_DeleteVolumeOntapConfiguration omitted. -/** - * serializeAws_json1_1DeleteVolumeOpenZFSConfiguration - */ -const se_DeleteVolumeOpenZFSConfiguration = (input: DeleteVolumeOpenZFSConfiguration, context: __SerdeContext): any => { - return { - ...(input.Options != null && { Options: se_DeleteOpenZFSVolumeOptions(input.Options, context) }), - }; -}; +// se_DeleteVolumeOpenZFSConfiguration omitted. /** * serializeAws_json1_1DeleteVolumeRequest */ const se_DeleteVolumeRequest = (input: DeleteVolumeRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.OntapConfiguration != null && { - OntapConfiguration: se_DeleteVolumeOntapConfiguration(input.OntapConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_DeleteVolumeOpenZFSConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + VolumeId: [], + }); }; -/** - * serializeAws_json1_1DescribeBackupsRequest - */ -const se_DescribeBackupsRequest = (input: DescribeBackupsRequest, context: __SerdeContext): any => { - return { - ...(input.BackupIds != null && { BackupIds: se_BackupIds(input.BackupIds, context) }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeBackupsRequest omitted. -/** - * serializeAws_json1_1DescribeDataRepositoryAssociationsRequest - */ -const se_DescribeDataRepositoryAssociationsRequest = ( - input: DescribeDataRepositoryAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AssociationIds != null && { - AssociationIds: se_DataRepositoryAssociationIds(input.AssociationIds, context), - }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeDataRepositoryAssociationsRequest omitted. -/** - * serializeAws_json1_1DescribeDataRepositoryTasksRequest - */ -const se_DescribeDataRepositoryTasksRequest = ( - input: DescribeDataRepositoryTasksRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_DataRepositoryTaskFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TaskIds != null && { TaskIds: se_TaskIds(input.TaskIds, context) }), - }; -}; +// se_DescribeDataRepositoryTasksRequest omitted. -/** - * serializeAws_json1_1DescribeFileCachesRequest - */ -const se_DescribeFileCachesRequest = (input: DescribeFileCachesRequest, context: __SerdeContext): any => { - return { - ...(input.FileCacheIds != null && { FileCacheIds: se_FileCacheIds(input.FileCacheIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFileCachesRequest omitted. /** * serializeAws_json1_1DescribeFileSystemAliasesRequest */ const se_DescribeFileSystemAliasesRequest = (input: DescribeFileSystemAliasesRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1DescribeFileSystemsRequest - */ -const se_DescribeFileSystemsRequest = (input: DescribeFileSystemsRequest, context: __SerdeContext): any => { - return { - ...(input.FileSystemIds != null && { FileSystemIds: se_FileSystemIds(input.FileSystemIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeSnapshotsRequest - */ -const se_DescribeSnapshotsRequest = (input: DescribeSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_SnapshotFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SnapshotIds != null && { SnapshotIds: se_SnapshotIds(input.SnapshotIds, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeStorageVirtualMachinesRequest - */ -const se_DescribeStorageVirtualMachinesRequest = ( - input: DescribeStorageVirtualMachinesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_StorageVirtualMachineFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StorageVirtualMachineIds != null && { - StorageVirtualMachineIds: se_StorageVirtualMachineIds(input.StorageVirtualMachineIds, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribeVolumesRequest - */ -const se_DescribeVolumesRequest = (input: DescribeVolumesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_VolumeFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.VolumeIds != null && { VolumeIds: se_VolumeIds(input.VolumeIds, context) }), - }; -}; +// se_DescribeFileSystemsRequest omitted. + +// se_DescribeSnapshotsRequest omitted. + +// se_DescribeStorageVirtualMachinesRequest omitted. + +// se_DescribeVolumesRequest omitted. /** * serializeAws_json1_1DisassociateFileSystemAliasesRequest @@ -4708,2468 +4119,860 @@ const se_DisassociateFileSystemAliasesRequest = ( input: DisassociateFileSystemAliasesRequest, context: __SerdeContext ): any => { - return { - ...(input.Aliases != null && { Aliases: se_AlternateDNSNames(input.Aliases, context) }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - }; -}; - -/** - * serializeAws_json1_1DiskIopsConfiguration - */ -const se_DiskIopsConfiguration = (input: DiskIopsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; - -/** - * serializeAws_json1_1DnsIps - */ -const se_DnsIps = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1EventTypes - */ -const se_EventTypes = (input: (EventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1FileCacheDataRepositoryAssociation - */ -const se_FileCacheDataRepositoryAssociation = ( - input: FileCacheDataRepositoryAssociation, - context: __SerdeContext -): any => { - return { - ...(input.DataRepositoryPath != null && { DataRepositoryPath: input.DataRepositoryPath }), - ...(input.DataRepositorySubdirectories != null && { - DataRepositorySubdirectories: se_SubDirectoriesPaths(input.DataRepositorySubdirectories, context), - }), - ...(input.FileCachePath != null && { FileCachePath: input.FileCachePath }), - ...(input.NFS != null && { NFS: se_FileCacheNFSConfiguration(input.NFS, context) }), - }; -}; - -/** - * serializeAws_json1_1FileCacheIds - */ -const se_FileCacheIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1FileCacheLustreMetadataConfiguration - */ -const se_FileCacheLustreMetadataConfiguration = ( - input: FileCacheLustreMetadataConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.StorageCapacity != null && { StorageCapacity: input.StorageCapacity }), - }; -}; - -/** - * serializeAws_json1_1FileCacheNFSConfiguration - */ -const se_FileCacheNFSConfiguration = (input: FileCacheNFSConfiguration, context: __SerdeContext): any => { - return { - ...(input.DnsIps != null && { DnsIps: se_RepositoryDnsIps(input.DnsIps, context) }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1FileSystemIds - */ -const se_FileSystemIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; - -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; - -/** - * serializeAws_json1_1LustreLogCreateConfiguration - */ -const se_LustreLogCreateConfiguration = (input: LustreLogCreateConfiguration, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.Level != null && { Level: input.Level }), - }; -}; - -/** - * serializeAws_json1_1LustreNoSquashNids - */ -const se_LustreNoSquashNids = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LustreRootSquashConfiguration - */ -const se_LustreRootSquashConfiguration = (input: LustreRootSquashConfiguration, context: __SerdeContext): any => { - return { - ...(input.NoSquashNids != null && { NoSquashNids: se_LustreNoSquashNids(input.NoSquashNids, context) }), - ...(input.RootSquash != null && { RootSquash: input.RootSquash }), - }; -}; - -/** - * serializeAws_json1_1OpenZFSClientConfiguration - */ -const se_OpenZFSClientConfiguration = (input: OpenZFSClientConfiguration, context: __SerdeContext): any => { - return { - ...(input.Clients != null && { Clients: input.Clients }), - ...(input.Options != null && { Options: se_OpenZFSNfsExportOptions(input.Options, context) }), - }; -}; - -/** - * serializeAws_json1_1OpenZFSClientConfigurations - */ -const se_OpenZFSClientConfigurations = (input: OpenZFSClientConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpenZFSClientConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpenZFSCreateRootVolumeConfiguration - */ -const se_OpenZFSCreateRootVolumeConfiguration = ( - input: OpenZFSCreateRootVolumeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CopyTagsToSnapshots != null && { CopyTagsToSnapshots: input.CopyTagsToSnapshots }), - ...(input.DataCompressionType != null && { DataCompressionType: input.DataCompressionType }), - ...(input.NfsExports != null && { NfsExports: se_OpenZFSNfsExports(input.NfsExports, context) }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RecordSizeKiB != null && { RecordSizeKiB: input.RecordSizeKiB }), - ...(input.UserAndGroupQuotas != null && { - UserAndGroupQuotas: se_OpenZFSUserAndGroupQuotas(input.UserAndGroupQuotas, context), - }), - }; -}; - -/** - * serializeAws_json1_1OpenZFSNfsExport - */ -const se_OpenZFSNfsExport = (input: OpenZFSNfsExport, context: __SerdeContext): any => { - return { - ...(input.ClientConfigurations != null && { - ClientConfigurations: se_OpenZFSClientConfigurations(input.ClientConfigurations, context), - }), - }; -}; - -/** - * serializeAws_json1_1OpenZFSNfsExportOptions - */ -const se_OpenZFSNfsExportOptions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpenZFSNfsExports - */ -const se_OpenZFSNfsExports = (input: OpenZFSNfsExport[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpenZFSNfsExport(entry, context); - }); + return take(input, { + Aliases: _json, + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + }); }; -/** - * serializeAws_json1_1OpenZFSUserAndGroupQuotas - */ -const se_OpenZFSUserAndGroupQuotas = (input: OpenZFSUserOrGroupQuota[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpenZFSUserOrGroupQuota(entry, context); - }); -}; +// se_DiskIopsConfiguration omitted. -/** - * serializeAws_json1_1OpenZFSUserOrGroupQuota - */ -const se_OpenZFSUserOrGroupQuota = (input: OpenZFSUserOrGroupQuota, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.StorageCapacityQuotaGiB != null && { StorageCapacityQuotaGiB: input.StorageCapacityQuotaGiB }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DnsIps omitted. -/** - * serializeAws_json1_1ReleaseFileSystemNfsV3LocksRequest - */ -const se_ReleaseFileSystemNfsV3LocksRequest = ( - input: ReleaseFileSystemNfsV3LocksRequest, - context: __SerdeContext -): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - }; -}; +// se_EventTypes omitted. -/** - * serializeAws_json1_1RepositoryDnsIps - */ -const se_RepositoryDnsIps = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FileCacheDataRepositoryAssociation omitted. -/** - * serializeAws_json1_1RestoreOpenZFSVolumeOptions - */ -const se_RestoreOpenZFSVolumeOptions = ( - input: (RestoreOpenZFSVolumeOption | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FileCacheIds omitted. -/** - * serializeAws_json1_1RestoreVolumeFromSnapshotRequest - */ -const se_RestoreVolumeFromSnapshotRequest = (input: RestoreVolumeFromSnapshotRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Options != null && { Options: se_RestoreOpenZFSVolumeOptions(input.Options, context) }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; -}; +// se_FileCacheLustreMetadataConfiguration omitted. -/** - * serializeAws_json1_1RouteTableIds - */ -const se_RouteTableIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FileCacheNFSConfiguration omitted. -/** - * serializeAws_json1_1S3DataRepositoryConfiguration - */ -const se_S3DataRepositoryConfiguration = (input: S3DataRepositoryConfiguration, context: __SerdeContext): any => { - return { - ...(input.AutoExportPolicy != null && { AutoExportPolicy: se_AutoExportPolicy(input.AutoExportPolicy, context) }), - ...(input.AutoImportPolicy != null && { AutoImportPolicy: se_AutoImportPolicy(input.AutoImportPolicy, context) }), - }; -}; +// se_FileSystemIds omitted. -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Filter omitted. -/** - * serializeAws_json1_1SelfManagedActiveDirectoryConfiguration - */ -const se_SelfManagedActiveDirectoryConfiguration = ( - input: SelfManagedActiveDirectoryConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DnsIps != null && { DnsIps: se_DnsIps(input.DnsIps, context) }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FileSystemAdministratorsGroup != null && { - FileSystemAdministratorsGroup: input.FileSystemAdministratorsGroup, - }), - ...(input.OrganizationalUnitDistinguishedName != null && { - OrganizationalUnitDistinguishedName: input.OrganizationalUnitDistinguishedName, - }), - ...(input.Password != null && { Password: input.Password }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_Filters omitted. -/** - * serializeAws_json1_1SelfManagedActiveDirectoryConfigurationUpdates - */ -const se_SelfManagedActiveDirectoryConfigurationUpdates = ( - input: SelfManagedActiveDirectoryConfigurationUpdates, - context: __SerdeContext -): any => { - return { - ...(input.DnsIps != null && { DnsIps: se_DnsIps(input.DnsIps, context) }), - ...(input.Password != null && { Password: input.Password }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_1SnapshotFilter - */ -const se_SnapshotFilter = (input: SnapshotFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_SnapshotFilterValues(input.Values, context) }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1SnapshotFilters - */ -const se_SnapshotFilters = (input: SnapshotFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SnapshotFilter(entry, context); - }); -}; +// se_LustreLogCreateConfiguration omitted. -/** - * serializeAws_json1_1SnapshotFilterValues - */ -const se_SnapshotFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LustreNoSquashNids omitted. -/** - * serializeAws_json1_1SnapshotIds - */ -const se_SnapshotIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LustreRootSquashConfiguration omitted. -/** - * serializeAws_json1_1StorageVirtualMachineFilter - */ -const se_StorageVirtualMachineFilter = (input: StorageVirtualMachineFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_StorageVirtualMachineFilterValues(input.Values, context) }), - }; -}; +// se_OpenZFSClientConfiguration omitted. -/** - * serializeAws_json1_1StorageVirtualMachineFilters - */ -const se_StorageVirtualMachineFilters = (input: StorageVirtualMachineFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StorageVirtualMachineFilter(entry, context); - }); -}; +// se_OpenZFSClientConfigurations omitted. -/** - * serializeAws_json1_1StorageVirtualMachineFilterValues - */ -const se_StorageVirtualMachineFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StorageVirtualMachineIds - */ -const se_StorageVirtualMachineIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SubDirectoriesPaths - */ -const se_SubDirectoriesPaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TaskIds - */ -const se_TaskIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TieringPolicy - */ -const se_TieringPolicy = (input: TieringPolicy, context: __SerdeContext): any => { - return { - ...(input.CoolingPeriod != null && { CoolingPeriod: input.CoolingPeriod }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateDataRepositoryAssociationRequest - */ -const se_UpdateDataRepositoryAssociationRequest = ( - input: UpdateDataRepositoryAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ImportedFileChunkSize != null && { ImportedFileChunkSize: input.ImportedFileChunkSize }), - ...(input.S3 != null && { S3: se_S3DataRepositoryConfiguration(input.S3, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileCacheLustreConfiguration - */ -const se_UpdateFileCacheLustreConfiguration = ( - input: UpdateFileCacheLustreConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileCacheRequest - */ -const se_UpdateFileCacheRequest = (input: UpdateFileCacheRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileCacheId != null && { FileCacheId: input.FileCacheId }), - ...(input.LustreConfiguration != null && { - LustreConfiguration: se_UpdateFileCacheLustreConfiguration(input.LustreConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileSystemLustreConfiguration - */ -const se_UpdateFileSystemLustreConfiguration = ( - input: UpdateFileSystemLustreConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AutoImportPolicy != null && { AutoImportPolicy: input.AutoImportPolicy }), - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DataCompressionType != null && { DataCompressionType: input.DataCompressionType }), - ...(input.LogConfiguration != null && { - LogConfiguration: se_LustreLogCreateConfiguration(input.LogConfiguration, context), - }), - ...(input.RootSquashConfiguration != null && { - RootSquashConfiguration: se_LustreRootSquashConfiguration(input.RootSquashConfiguration, context), - }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileSystemOntapConfiguration - */ -const se_UpdateFileSystemOntapConfiguration = ( - input: UpdateFileSystemOntapConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AddRouteTableIds != null && { AddRouteTableIds: se_RouteTableIds(input.AddRouteTableIds, context) }), - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DiskIopsConfiguration != null && { - DiskIopsConfiguration: se_DiskIopsConfiguration(input.DiskIopsConfiguration, context), - }), - ...(input.FsxAdminPassword != null && { FsxAdminPassword: input.FsxAdminPassword }), - ...(input.RemoveRouteTableIds != null && { - RemoveRouteTableIds: se_RouteTableIds(input.RemoveRouteTableIds, context), - }), - ...(input.ThroughputCapacity != null && { ThroughputCapacity: input.ThroughputCapacity }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileSystemOpenZFSConfiguration - */ -const se_UpdateFileSystemOpenZFSConfiguration = ( - input: UpdateFileSystemOpenZFSConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.CopyTagsToBackups != null && { CopyTagsToBackups: input.CopyTagsToBackups }), - ...(input.CopyTagsToVolumes != null && { CopyTagsToVolumes: input.CopyTagsToVolumes }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.DiskIopsConfiguration != null && { - DiskIopsConfiguration: se_DiskIopsConfiguration(input.DiskIopsConfiguration, context), - }), - ...(input.ThroughputCapacity != null && { ThroughputCapacity: input.ThroughputCapacity }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileSystemRequest - */ -const se_UpdateFileSystemRequest = (input: UpdateFileSystemRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.LustreConfiguration != null && { - LustreConfiguration: se_UpdateFileSystemLustreConfiguration(input.LustreConfiguration, context), - }), - ...(input.OntapConfiguration != null && { - OntapConfiguration: se_UpdateFileSystemOntapConfiguration(input.OntapConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_UpdateFileSystemOpenZFSConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.StorageCapacity != null && { StorageCapacity: input.StorageCapacity }), - ...(input.WindowsConfiguration != null && { - WindowsConfiguration: se_UpdateFileSystemWindowsConfiguration(input.WindowsConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateFileSystemWindowsConfiguration - */ -const se_UpdateFileSystemWindowsConfiguration = ( - input: UpdateFileSystemWindowsConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AuditLogConfiguration != null && { - AuditLogConfiguration: se_WindowsAuditLogCreateConfiguration(input.AuditLogConfiguration, context), - }), - ...(input.AutomaticBackupRetentionDays != null && { - AutomaticBackupRetentionDays: input.AutomaticBackupRetentionDays, - }), - ...(input.DailyAutomaticBackupStartTime != null && { - DailyAutomaticBackupStartTime: input.DailyAutomaticBackupStartTime, - }), - ...(input.SelfManagedActiveDirectoryConfiguration != null && { - SelfManagedActiveDirectoryConfiguration: se_SelfManagedActiveDirectoryConfigurationUpdates( - input.SelfManagedActiveDirectoryConfiguration, - context - ), - }), - ...(input.ThroughputCapacity != null && { ThroughputCapacity: input.ThroughputCapacity }), - ...(input.WeeklyMaintenanceStartTime != null && { WeeklyMaintenanceStartTime: input.WeeklyMaintenanceStartTime }), - }; -}; - -/** - * serializeAws_json1_1UpdateOntapVolumeConfiguration - */ -const se_UpdateOntapVolumeConfiguration = (input: UpdateOntapVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.CopyTagsToBackups != null && { CopyTagsToBackups: input.CopyTagsToBackups }), - ...(input.JunctionPath != null && { JunctionPath: input.JunctionPath }), - ...(input.SecurityStyle != null && { SecurityStyle: input.SecurityStyle }), - ...(input.SizeInMegabytes != null && { SizeInMegabytes: input.SizeInMegabytes }), - ...(input.SnapshotPolicy != null && { SnapshotPolicy: input.SnapshotPolicy }), - ...(input.StorageEfficiencyEnabled != null && { StorageEfficiencyEnabled: input.StorageEfficiencyEnabled }), - ...(input.TieringPolicy != null && { TieringPolicy: se_TieringPolicy(input.TieringPolicy, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateOpenZFSVolumeConfiguration - */ -const se_UpdateOpenZFSVolumeConfiguration = (input: UpdateOpenZFSVolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataCompressionType != null && { DataCompressionType: input.DataCompressionType }), - ...(input.NfsExports != null && { NfsExports: se_OpenZFSNfsExports(input.NfsExports, context) }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RecordSizeKiB != null && { RecordSizeKiB: input.RecordSizeKiB }), - ...(input.StorageCapacityQuotaGiB != null && { StorageCapacityQuotaGiB: input.StorageCapacityQuotaGiB }), - ...(input.StorageCapacityReservationGiB != null && { - StorageCapacityReservationGiB: input.StorageCapacityReservationGiB, - }), - ...(input.UserAndGroupQuotas != null && { - UserAndGroupQuotas: se_OpenZFSUserAndGroupQuotas(input.UserAndGroupQuotas, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateSnapshotRequest - */ -const se_UpdateSnapshotRequest = (input: UpdateSnapshotRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - }; -}; - -/** - * serializeAws_json1_1UpdateStorageVirtualMachineRequest - */ -const se_UpdateStorageVirtualMachineRequest = ( - input: UpdateStorageVirtualMachineRequest, - context: __SerdeContext -): any => { - return { - ...(input.ActiveDirectoryConfiguration != null && { - ActiveDirectoryConfiguration: se_UpdateSvmActiveDirectoryConfiguration( - input.ActiveDirectoryConfiguration, - context - ), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.StorageVirtualMachineId != null && { StorageVirtualMachineId: input.StorageVirtualMachineId }), - ...(input.SvmAdminPassword != null && { SvmAdminPassword: input.SvmAdminPassword }), - }; -}; - -/** - * serializeAws_json1_1UpdateSvmActiveDirectoryConfiguration - */ -const se_UpdateSvmActiveDirectoryConfiguration = ( - input: UpdateSvmActiveDirectoryConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.SelfManagedActiveDirectoryConfiguration != null && { - SelfManagedActiveDirectoryConfiguration: se_SelfManagedActiveDirectoryConfigurationUpdates( - input.SelfManagedActiveDirectoryConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateVolumeRequest - */ -const se_UpdateVolumeRequest = (input: UpdateVolumeRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.OntapConfiguration != null && { - OntapConfiguration: se_UpdateOntapVolumeConfiguration(input.OntapConfiguration, context), - }), - ...(input.OpenZFSConfiguration != null && { - OpenZFSConfiguration: se_UpdateOpenZFSVolumeConfiguration(input.OpenZFSConfiguration, context), - }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; -}; - -/** - * serializeAws_json1_1VolumeFilter - */ -const se_VolumeFilter = (input: VolumeFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_VolumeFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1VolumeFilters - */ -const se_VolumeFilters = (input: VolumeFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VolumeFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1VolumeFilterValues - */ -const se_VolumeFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1VolumeIds - */ -const se_VolumeIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WindowsAuditLogCreateConfiguration - */ -const se_WindowsAuditLogCreateConfiguration = ( - input: WindowsAuditLogCreateConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AuditLogDestination != null && { AuditLogDestination: input.AuditLogDestination }), - ...(input.FileAccessAuditLogLevel != null && { FileAccessAuditLogLevel: input.FileAccessAuditLogLevel }), - ...(input.FileShareAccessAuditLogLevel != null && { - FileShareAccessAuditLogLevel: input.FileShareAccessAuditLogLevel, - }), - }; -}; - -/** - * deserializeAws_json1_1ActiveDirectoryBackupAttributes - */ -const de_ActiveDirectoryBackupAttributes = (output: any, context: __SerdeContext): ActiveDirectoryBackupAttributes => { - return { - ActiveDirectoryId: __expectString(output.ActiveDirectoryId), - DomainName: __expectString(output.DomainName), - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; - -/** - * deserializeAws_json1_1ActiveDirectoryError - */ -const de_ActiveDirectoryError = (output: any, context: __SerdeContext): ActiveDirectoryError => { - return { - ActiveDirectoryId: __expectString(output.ActiveDirectoryId), - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1AdministrativeAction - */ -const de_AdministrativeAction = (output: any, context: __SerdeContext): AdministrativeAction => { - return { - AdministrativeActionType: __expectString(output.AdministrativeActionType), - FailureDetails: - output.FailureDetails != null ? de_AdministrativeActionFailureDetails(output.FailureDetails, context) : undefined, - ProgressPercent: __expectInt32(output.ProgressPercent), - RequestTime: - output.RequestTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestTime))) - : undefined, - Status: __expectString(output.Status), - TargetFileSystemValues: - output.TargetFileSystemValues != null ? de_FileSystem(output.TargetFileSystemValues, context) : undefined, - TargetSnapshotValues: - output.TargetSnapshotValues != null ? de_Snapshot(output.TargetSnapshotValues, context) : undefined, - TargetVolumeValues: output.TargetVolumeValues != null ? de_Volume(output.TargetVolumeValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AdministrativeActionFailureDetails - */ -const de_AdministrativeActionFailureDetails = ( - output: any, - context: __SerdeContext -): AdministrativeActionFailureDetails => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AdministrativeActions - */ -const de_AdministrativeActions = (output: any, context: __SerdeContext): AdministrativeAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdministrativeAction(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Alias - */ -const de_Alias = (output: any, context: __SerdeContext): Alias => { - return { - Lifecycle: __expectString(output.Lifecycle), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1Aliases - */ -const de_Aliases = (output: any, context: __SerdeContext): Alias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Alias(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociateFileSystemAliasesResponse - */ -const de_AssociateFileSystemAliasesResponse = ( - output: any, - context: __SerdeContext -): AssociateFileSystemAliasesResponse => { - return { - Aliases: output.Aliases != null ? de_Aliases(output.Aliases, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoExportPolicy - */ -const de_AutoExportPolicy = (output: any, context: __SerdeContext): AutoExportPolicy => { - return { - Events: output.Events != null ? de_EventTypes(output.Events, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoImportPolicy - */ -const de_AutoImportPolicy = (output: any, context: __SerdeContext): AutoImportPolicy => { - return { - Events: output.Events != null ? de_EventTypes(output.Events, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Backup - */ -const de_Backup = (output: any, context: __SerdeContext): Backup => { - return { - BackupId: __expectString(output.BackupId), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DirectoryInformation: - output.DirectoryInformation != null - ? de_ActiveDirectoryBackupAttributes(output.DirectoryInformation, context) - : undefined, - FailureDetails: output.FailureDetails != null ? de_BackupFailureDetails(output.FailureDetails, context) : undefined, - FileSystem: output.FileSystem != null ? de_FileSystem(output.FileSystem, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - Lifecycle: __expectString(output.Lifecycle), - OwnerId: __expectString(output.OwnerId), - ProgressPercent: __expectInt32(output.ProgressPercent), - ResourceARN: __expectString(output.ResourceARN), - ResourceType: __expectString(output.ResourceType), - SourceBackupId: __expectString(output.SourceBackupId), - SourceBackupRegion: __expectString(output.SourceBackupRegion), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Type: __expectString(output.Type), - Volume: output.Volume != null ? de_Volume(output.Volume, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BackupBeingCopied - */ -const de_BackupBeingCopied = (output: any, context: __SerdeContext): BackupBeingCopied => { - return { - BackupId: __expectString(output.BackupId), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1BackupFailureDetails - */ -const de_BackupFailureDetails = (output: any, context: __SerdeContext): BackupFailureDetails => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1BackupInProgress - */ -const de_BackupInProgress = (output: any, context: __SerdeContext): BackupInProgress => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1BackupNotFound - */ -const de_BackupNotFound = (output: any, context: __SerdeContext): BackupNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1BackupRestoring - */ -const de_BackupRestoring = (output: any, context: __SerdeContext): BackupRestoring => { - return { - FileSystemId: __expectString(output.FileSystemId), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Backups - */ -const de_Backups = (output: any, context: __SerdeContext): Backup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Backup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BadRequest - */ -const de_BadRequest = (output: any, context: __SerdeContext): BadRequest => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CancelDataRepositoryTaskResponse - */ -const de_CancelDataRepositoryTaskResponse = ( - output: any, - context: __SerdeContext -): CancelDataRepositoryTaskResponse => { - return { - Lifecycle: __expectString(output.Lifecycle), - TaskId: __expectString(output.TaskId), - } as any; -}; - -/** - * deserializeAws_json1_1CompletionReport - */ -const de_CompletionReport = (output: any, context: __SerdeContext): CompletionReport => { - return { - Enabled: __expectBoolean(output.Enabled), - Format: __expectString(output.Format), - Path: __expectString(output.Path), - Scope: __expectString(output.Scope), - } as any; -}; - -/** - * deserializeAws_json1_1CopyBackupResponse - */ -const de_CopyBackupResponse = (output: any, context: __SerdeContext): CopyBackupResponse => { - return { - Backup: output.Backup != null ? de_Backup(output.Backup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateBackupResponse - */ -const de_CreateBackupResponse = (output: any, context: __SerdeContext): CreateBackupResponse => { - return { - Backup: output.Backup != null ? de_Backup(output.Backup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDataRepositoryAssociationResponse - */ -const de_CreateDataRepositoryAssociationResponse = ( - output: any, - context: __SerdeContext -): CreateDataRepositoryAssociationResponse => { - return { - Association: output.Association != null ? de_DataRepositoryAssociation(output.Association, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDataRepositoryTaskResponse - */ -const de_CreateDataRepositoryTaskResponse = ( - output: any, - context: __SerdeContext -): CreateDataRepositoryTaskResponse => { - return { - DataRepositoryTask: - output.DataRepositoryTask != null ? de_DataRepositoryTask(output.DataRepositoryTask, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateFileCacheResponse - */ -const de_CreateFileCacheResponse = (output: any, context: __SerdeContext): CreateFileCacheResponse => { - return { - FileCache: output.FileCache != null ? de_FileCacheCreating(output.FileCache, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateFileSystemFromBackupResponse - */ -const de_CreateFileSystemFromBackupResponse = ( - output: any, - context: __SerdeContext -): CreateFileSystemFromBackupResponse => { - return { - FileSystem: output.FileSystem != null ? de_FileSystem(output.FileSystem, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateFileSystemResponse - */ -const de_CreateFileSystemResponse = (output: any, context: __SerdeContext): CreateFileSystemResponse => { - return { - FileSystem: output.FileSystem != null ? de_FileSystem(output.FileSystem, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateSnapshotResponse - */ -const de_CreateSnapshotResponse = (output: any, context: __SerdeContext): CreateSnapshotResponse => { - return { - Snapshot: output.Snapshot != null ? de_Snapshot(output.Snapshot, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateStorageVirtualMachineResponse - */ -const de_CreateStorageVirtualMachineResponse = ( - output: any, - context: __SerdeContext -): CreateStorageVirtualMachineResponse => { - return { - StorageVirtualMachine: - output.StorageVirtualMachine != null - ? de_StorageVirtualMachine(output.StorageVirtualMachine, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateVolumeFromBackupResponse - */ -const de_CreateVolumeFromBackupResponse = (output: any, context: __SerdeContext): CreateVolumeFromBackupResponse => { - return { - Volume: output.Volume != null ? de_Volume(output.Volume, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateVolumeResponse - */ -const de_CreateVolumeResponse = (output: any, context: __SerdeContext): CreateVolumeResponse => { - return { - Volume: output.Volume != null ? de_Volume(output.Volume, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryAssociation - */ -const de_DataRepositoryAssociation = (output: any, context: __SerdeContext): DataRepositoryAssociation => { - return { - AssociationId: __expectString(output.AssociationId), - BatchImportMetaDataOnCreate: __expectBoolean(output.BatchImportMetaDataOnCreate), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataRepositoryPath: __expectString(output.DataRepositoryPath), - DataRepositorySubdirectories: - output.DataRepositorySubdirectories != null - ? de_SubDirectoriesPaths(output.DataRepositorySubdirectories, context) - : undefined, - FailureDetails: - output.FailureDetails != null ? de_DataRepositoryFailureDetails(output.FailureDetails, context) : undefined, - FileCacheId: __expectString(output.FileCacheId), - FileCachePath: __expectString(output.FileCachePath), - FileSystemId: __expectString(output.FileSystemId), - FileSystemPath: __expectString(output.FileSystemPath), - ImportedFileChunkSize: __expectInt32(output.ImportedFileChunkSize), - Lifecycle: __expectString(output.Lifecycle), - NFS: output.NFS != null ? de_NFSDataRepositoryConfiguration(output.NFS, context) : undefined, - ResourceARN: __expectString(output.ResourceARN), - S3: output.S3 != null ? de_S3DataRepositoryConfiguration(output.S3, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryAssociationIds - */ -const de_DataRepositoryAssociationIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataRepositoryAssociationNotFound - */ -const de_DataRepositoryAssociationNotFound = ( - output: any, - context: __SerdeContext -): DataRepositoryAssociationNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryAssociations - */ -const de_DataRepositoryAssociations = (output: any, context: __SerdeContext): DataRepositoryAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataRepositoryAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataRepositoryConfiguration - */ -const de_DataRepositoryConfiguration = (output: any, context: __SerdeContext): DataRepositoryConfiguration => { - return { - AutoImportPolicy: __expectString(output.AutoImportPolicy), - ExportPath: __expectString(output.ExportPath), - FailureDetails: - output.FailureDetails != null ? de_DataRepositoryFailureDetails(output.FailureDetails, context) : undefined, - ImportPath: __expectString(output.ImportPath), - ImportedFileChunkSize: __expectInt32(output.ImportedFileChunkSize), - Lifecycle: __expectString(output.Lifecycle), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryFailureDetails - */ -const de_DataRepositoryFailureDetails = (output: any, context: __SerdeContext): DataRepositoryFailureDetails => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryTask - */ -const de_DataRepositoryTask = (output: any, context: __SerdeContext): DataRepositoryTask => { - return { - CapacityToRelease: __expectLong(output.CapacityToRelease), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FailureDetails: - output.FailureDetails != null ? de_DataRepositoryTaskFailureDetails(output.FailureDetails, context) : undefined, - FileCacheId: __expectString(output.FileCacheId), - FileSystemId: __expectString(output.FileSystemId), - Lifecycle: __expectString(output.Lifecycle), - Paths: output.Paths != null ? de_DataRepositoryTaskPaths(output.Paths, context) : undefined, - Report: output.Report != null ? de_CompletionReport(output.Report, context) : undefined, - ResourceARN: __expectString(output.ResourceARN), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: output.Status != null ? de_DataRepositoryTaskStatus(output.Status, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - TaskId: __expectString(output.TaskId), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryTaskEnded - */ -const de_DataRepositoryTaskEnded = (output: any, context: __SerdeContext): DataRepositoryTaskEnded => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryTaskExecuting - */ -const de_DataRepositoryTaskExecuting = (output: any, context: __SerdeContext): DataRepositoryTaskExecuting => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryTaskFailureDetails - */ -const de_DataRepositoryTaskFailureDetails = ( - output: any, - context: __SerdeContext -): DataRepositoryTaskFailureDetails => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryTaskNotFound - */ -const de_DataRepositoryTaskNotFound = (output: any, context: __SerdeContext): DataRepositoryTaskNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DataRepositoryTaskPaths - */ -const de_DataRepositoryTaskPaths = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataRepositoryTasks - */ -const de_DataRepositoryTasks = (output: any, context: __SerdeContext): DataRepositoryTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataRepositoryTask(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataRepositoryTaskStatus - */ -const de_DataRepositoryTaskStatus = (output: any, context: __SerdeContext): DataRepositoryTaskStatus => { - return { - FailedCount: __expectLong(output.FailedCount), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - ReleasedCapacity: __expectLong(output.ReleasedCapacity), - SucceededCount: __expectLong(output.SucceededCount), - TotalCount: __expectLong(output.TotalCount), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBackupResponse - */ -const de_DeleteBackupResponse = (output: any, context: __SerdeContext): DeleteBackupResponse => { - return { - BackupId: __expectString(output.BackupId), - Lifecycle: __expectString(output.Lifecycle), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDataRepositoryAssociationResponse - */ -const de_DeleteDataRepositoryAssociationResponse = ( - output: any, - context: __SerdeContext -): DeleteDataRepositoryAssociationResponse => { - return { - AssociationId: __expectString(output.AssociationId), - DeleteDataInFileSystem: __expectBoolean(output.DeleteDataInFileSystem), - Lifecycle: __expectString(output.Lifecycle), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileCacheResponse - */ -const de_DeleteFileCacheResponse = (output: any, context: __SerdeContext): DeleteFileCacheResponse => { - return { - FileCacheId: __expectString(output.FileCacheId), - Lifecycle: __expectString(output.Lifecycle), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileSystemLustreResponse - */ -const de_DeleteFileSystemLustreResponse = (output: any, context: __SerdeContext): DeleteFileSystemLustreResponse => { - return { - FinalBackupId: __expectString(output.FinalBackupId), - FinalBackupTags: output.FinalBackupTags != null ? de_Tags(output.FinalBackupTags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileSystemOpenZFSResponse - */ -const de_DeleteFileSystemOpenZFSResponse = (output: any, context: __SerdeContext): DeleteFileSystemOpenZFSResponse => { - return { - FinalBackupId: __expectString(output.FinalBackupId), - FinalBackupTags: output.FinalBackupTags != null ? de_Tags(output.FinalBackupTags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileSystemResponse - */ -const de_DeleteFileSystemResponse = (output: any, context: __SerdeContext): DeleteFileSystemResponse => { - return { - FileSystemId: __expectString(output.FileSystemId), - Lifecycle: __expectString(output.Lifecycle), - LustreResponse: - output.LustreResponse != null ? de_DeleteFileSystemLustreResponse(output.LustreResponse, context) : undefined, - OpenZFSResponse: - output.OpenZFSResponse != null ? de_DeleteFileSystemOpenZFSResponse(output.OpenZFSResponse, context) : undefined, - WindowsResponse: - output.WindowsResponse != null ? de_DeleteFileSystemWindowsResponse(output.WindowsResponse, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileSystemWindowsResponse - */ -const de_DeleteFileSystemWindowsResponse = (output: any, context: __SerdeContext): DeleteFileSystemWindowsResponse => { - return { - FinalBackupId: __expectString(output.FinalBackupId), - FinalBackupTags: output.FinalBackupTags != null ? de_Tags(output.FinalBackupTags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteSnapshotResponse - */ -const de_DeleteSnapshotResponse = (output: any, context: __SerdeContext): DeleteSnapshotResponse => { - return { - Lifecycle: __expectString(output.Lifecycle), - SnapshotId: __expectString(output.SnapshotId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteStorageVirtualMachineResponse - */ -const de_DeleteStorageVirtualMachineResponse = ( - output: any, - context: __SerdeContext -): DeleteStorageVirtualMachineResponse => { - return { - Lifecycle: __expectString(output.Lifecycle), - StorageVirtualMachineId: __expectString(output.StorageVirtualMachineId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteVolumeOntapResponse - */ -const de_DeleteVolumeOntapResponse = (output: any, context: __SerdeContext): DeleteVolumeOntapResponse => { - return { - FinalBackupId: __expectString(output.FinalBackupId), - FinalBackupTags: output.FinalBackupTags != null ? de_Tags(output.FinalBackupTags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteVolumeResponse - */ -const de_DeleteVolumeResponse = (output: any, context: __SerdeContext): DeleteVolumeResponse => { - return { - Lifecycle: __expectString(output.Lifecycle), - OntapResponse: - output.OntapResponse != null ? de_DeleteVolumeOntapResponse(output.OntapResponse, context) : undefined, - VolumeId: __expectString(output.VolumeId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeBackupsResponse - */ -const de_DescribeBackupsResponse = (output: any, context: __SerdeContext): DescribeBackupsResponse => { - return { - Backups: output.Backups != null ? de_Backups(output.Backups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDataRepositoryAssociationsResponse - */ -const de_DescribeDataRepositoryAssociationsResponse = ( - output: any, - context: __SerdeContext -): DescribeDataRepositoryAssociationsResponse => { - return { - Associations: output.Associations != null ? de_DataRepositoryAssociations(output.Associations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDataRepositoryTasksResponse - */ -const de_DescribeDataRepositoryTasksResponse = ( - output: any, - context: __SerdeContext -): DescribeDataRepositoryTasksResponse => { - return { - DataRepositoryTasks: - output.DataRepositoryTasks != null ? de_DataRepositoryTasks(output.DataRepositoryTasks, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFileCachesResponse - */ -const de_DescribeFileCachesResponse = (output: any, context: __SerdeContext): DescribeFileCachesResponse => { - return { - FileCaches: output.FileCaches != null ? de_FileCaches(output.FileCaches, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_OpenZFSCreateRootVolumeConfiguration omitted. -/** - * deserializeAws_json1_1DescribeFileSystemAliasesResponse - */ -const de_DescribeFileSystemAliasesResponse = ( - output: any, - context: __SerdeContext -): DescribeFileSystemAliasesResponse => { - return { - Aliases: output.Aliases != null ? de_Aliases(output.Aliases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_OpenZFSNfsExport omitted. -/** - * deserializeAws_json1_1DescribeFileSystemsResponse - */ -const de_DescribeFileSystemsResponse = (output: any, context: __SerdeContext): DescribeFileSystemsResponse => { - return { - FileSystems: output.FileSystems != null ? de_FileSystems(output.FileSystems, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_OpenZFSNfsExportOptions omitted. -/** - * deserializeAws_json1_1DescribeSnapshotsResponse - */ -const de_DescribeSnapshotsResponse = (output: any, context: __SerdeContext): DescribeSnapshotsResponse => { - return { - NextToken: __expectString(output.NextToken), - Snapshots: output.Snapshots != null ? de_Snapshots(output.Snapshots, context) : undefined, - } as any; -}; +// se_OpenZFSNfsExports omitted. + +// se_OpenZFSUserAndGroupQuotas omitted. + +// se_OpenZFSUserOrGroupQuota omitted. /** - * deserializeAws_json1_1DescribeStorageVirtualMachinesResponse + * serializeAws_json1_1ReleaseFileSystemNfsV3LocksRequest */ -const de_DescribeStorageVirtualMachinesResponse = ( - output: any, +const se_ReleaseFileSystemNfsV3LocksRequest = ( + input: ReleaseFileSystemNfsV3LocksRequest, context: __SerdeContext -): DescribeStorageVirtualMachinesResponse => { - return { - NextToken: __expectString(output.NextToken), - StorageVirtualMachines: - output.StorageVirtualMachines != null - ? de_StorageVirtualMachines(output.StorageVirtualMachines, context) - : undefined, - } as any; +): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + }); }; +// se_RepositoryDnsIps omitted. + +// se_RestoreOpenZFSVolumeOptions omitted. + /** - * deserializeAws_json1_1DescribeVolumesResponse + * serializeAws_json1_1RestoreVolumeFromSnapshotRequest */ -const de_DescribeVolumesResponse = (output: any, context: __SerdeContext): DescribeVolumesResponse => { - return { - NextToken: __expectString(output.NextToken), - Volumes: output.Volumes != null ? de_Volumes(output.Volumes, context) : undefined, - } as any; +const se_RestoreVolumeFromSnapshotRequest = (input: RestoreVolumeFromSnapshotRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Options: _json, + SnapshotId: [], + VolumeId: [], + }); }; +// se_RouteTableIds omitted. + +// se_S3DataRepositoryConfiguration omitted. + +// se_SecurityGroupIds omitted. + +// se_SelfManagedActiveDirectoryConfiguration omitted. + +// se_SelfManagedActiveDirectoryConfigurationUpdates omitted. + +// se_SnapshotFilter omitted. + +// se_SnapshotFilters omitted. + +// se_SnapshotFilterValues omitted. + +// se_SnapshotIds omitted. + +// se_StorageVirtualMachineFilter omitted. + +// se_StorageVirtualMachineFilters omitted. + +// se_StorageVirtualMachineFilterValues omitted. + +// se_StorageVirtualMachineIds omitted. + +// se_SubDirectoriesPaths omitted. + +// se_SubnetIds omitted. + +// se_Tag omitted. + +// se_TagKeys omitted. + +// se_TagResourceRequest omitted. + +// se_Tags omitted. + +// se_TaskIds omitted. + +// se_TieringPolicy omitted. + +// se_UntagResourceRequest omitted. + /** - * deserializeAws_json1_1DisassociateFileSystemAliasesResponse + * serializeAws_json1_1UpdateDataRepositoryAssociationRequest */ -const de_DisassociateFileSystemAliasesResponse = ( - output: any, +const se_UpdateDataRepositoryAssociationRequest = ( + input: UpdateDataRepositoryAssociationRequest, context: __SerdeContext -): DisassociateFileSystemAliasesResponse => { - return { - Aliases: output.Aliases != null ? de_Aliases(output.Aliases, context) : undefined, - } as any; +): any => { + return take(input, { + AssociationId: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ImportedFileChunkSize: [], + S3: _json, + }); }; -/** - * deserializeAws_json1_1DiskIopsConfiguration - */ -const de_DiskIopsConfiguration = (output: any, context: __SerdeContext): DiskIopsConfiguration => { - return { - Iops: __expectLong(output.Iops), - Mode: __expectString(output.Mode), - } as any; -}; +// se_UpdateFileCacheLustreConfiguration omitted. /** - * deserializeAws_json1_1DnsIps + * serializeAws_json1_1UpdateFileCacheRequest */ -const de_DnsIps = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_UpdateFileCacheRequest = (input: UpdateFileCacheRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileCacheId: [], + LustreConfiguration: _json, + }); }; -/** - * deserializeAws_json1_1EventTypes - */ -const de_EventTypes = (output: any, context: __SerdeContext): (EventType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UpdateFileSystemLustreConfiguration omitted. -/** - * deserializeAws_json1_1FileCache - */ -const de_FileCache = (output: any, context: __SerdeContext): FileCache => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DNSName: __expectString(output.DNSName), - DataRepositoryAssociationIds: - output.DataRepositoryAssociationIds != null - ? de_DataRepositoryAssociationIds(output.DataRepositoryAssociationIds, context) - : undefined, - FailureDetails: - output.FailureDetails != null ? de_FileCacheFailureDetails(output.FailureDetails, context) : undefined, - FileCacheId: __expectString(output.FileCacheId), - FileCacheType: __expectString(output.FileCacheType), - FileCacheTypeVersion: __expectString(output.FileCacheTypeVersion), - KmsKeyId: __expectString(output.KmsKeyId), - Lifecycle: __expectString(output.Lifecycle), - LustreConfiguration: - output.LustreConfiguration != null - ? de_FileCacheLustreConfiguration(output.LustreConfiguration, context) - : undefined, - NetworkInterfaceIds: - output.NetworkInterfaceIds != null ? de_NetworkInterfaceIds(output.NetworkInterfaceIds, context) : undefined, - OwnerId: __expectString(output.OwnerId), - ResourceARN: __expectString(output.ResourceARN), - StorageCapacity: __expectInt32(output.StorageCapacity), - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// se_UpdateFileSystemOntapConfiguration omitted. + +// se_UpdateFileSystemOpenZFSConfiguration omitted. /** - * deserializeAws_json1_1FileCacheCreating + * serializeAws_json1_1UpdateFileSystemRequest */ -const de_FileCacheCreating = (output: any, context: __SerdeContext): FileCacheCreating => { - return { - CopyTagsToDataRepositoryAssociations: __expectBoolean(output.CopyTagsToDataRepositoryAssociations), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DNSName: __expectString(output.DNSName), - DataRepositoryAssociationIds: - output.DataRepositoryAssociationIds != null - ? de_DataRepositoryAssociationIds(output.DataRepositoryAssociationIds, context) - : undefined, - FailureDetails: - output.FailureDetails != null ? de_FileCacheFailureDetails(output.FailureDetails, context) : undefined, - FileCacheId: __expectString(output.FileCacheId), - FileCacheType: __expectString(output.FileCacheType), - FileCacheTypeVersion: __expectString(output.FileCacheTypeVersion), - KmsKeyId: __expectString(output.KmsKeyId), - Lifecycle: __expectString(output.Lifecycle), - LustreConfiguration: - output.LustreConfiguration != null - ? de_FileCacheLustreConfiguration(output.LustreConfiguration, context) - : undefined, - NetworkInterfaceIds: - output.NetworkInterfaceIds != null ? de_NetworkInterfaceIds(output.NetworkInterfaceIds, context) : undefined, - OwnerId: __expectString(output.OwnerId), - ResourceARN: __expectString(output.ResourceARN), - StorageCapacity: __expectInt32(output.StorageCapacity), - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1FileCacheFailureDetails - */ -const de_FileCacheFailureDetails = (output: any, context: __SerdeContext): FileCacheFailureDetails => { - return { - Message: __expectString(output.Message), - } as any; +const se_UpdateFileSystemRequest = (input: UpdateFileSystemRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FileSystemId: [], + LustreConfiguration: _json, + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + StorageCapacity: [], + WindowsConfiguration: _json, + }); }; +// se_UpdateFileSystemWindowsConfiguration omitted. + +// se_UpdateOntapVolumeConfiguration omitted. + +// se_UpdateOpenZFSVolumeConfiguration omitted. + /** - * deserializeAws_json1_1FileCacheLustreConfiguration + * serializeAws_json1_1UpdateSnapshotRequest */ -const de_FileCacheLustreConfiguration = (output: any, context: __SerdeContext): FileCacheLustreConfiguration => { - return { - DeploymentType: __expectString(output.DeploymentType), - LogConfiguration: - output.LogConfiguration != null ? de_LustreLogConfiguration(output.LogConfiguration, context) : undefined, - MetadataConfiguration: - output.MetadataConfiguration != null - ? de_FileCacheLustreMetadataConfiguration(output.MetadataConfiguration, context) - : undefined, - MountName: __expectString(output.MountName), - PerUnitStorageThroughput: __expectInt32(output.PerUnitStorageThroughput), - WeeklyMaintenanceStartTime: __expectString(output.WeeklyMaintenanceStartTime), - } as any; +const se_UpdateSnapshotRequest = (input: UpdateSnapshotRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + SnapshotId: [], + }); }; /** - * deserializeAws_json1_1FileCacheLustreMetadataConfiguration + * serializeAws_json1_1UpdateStorageVirtualMachineRequest */ -const de_FileCacheLustreMetadataConfiguration = ( - output: any, +const se_UpdateStorageVirtualMachineRequest = ( + input: UpdateStorageVirtualMachineRequest, context: __SerdeContext -): FileCacheLustreMetadataConfiguration => { - return { - StorageCapacity: __expectInt32(output.StorageCapacity), - } as any; +): any => { + return take(input, { + ActiveDirectoryConfiguration: _json, + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + StorageVirtualMachineId: [], + SvmAdminPassword: [], + }); }; -/** - * deserializeAws_json1_1FileCacheNotFound - */ -const de_FileCacheNotFound = (output: any, context: __SerdeContext): FileCacheNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateSvmActiveDirectoryConfiguration omitted. /** - * deserializeAws_json1_1FileCaches + * serializeAws_json1_1UpdateVolumeRequest */ -const de_FileCaches = (output: any, context: __SerdeContext): FileCache[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileCache(entry, context); - }); - return retVal; +const se_UpdateVolumeRequest = (input: UpdateVolumeRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + VolumeId: [], + }); }; -/** - * deserializeAws_json1_1FileSystem - */ -const de_FileSystem = (output: any, context: __SerdeContext): FileSystem => { - return { - AdministrativeActions: - output.AdministrativeActions != null - ? de_AdministrativeActions(output.AdministrativeActions, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DNSName: __expectString(output.DNSName), - FailureDetails: - output.FailureDetails != null ? de_FileSystemFailureDetails(output.FailureDetails, context) : undefined, - FileSystemId: __expectString(output.FileSystemId), - FileSystemType: __expectString(output.FileSystemType), - FileSystemTypeVersion: __expectString(output.FileSystemTypeVersion), - KmsKeyId: __expectString(output.KmsKeyId), - Lifecycle: __expectString(output.Lifecycle), - LustreConfiguration: - output.LustreConfiguration != null - ? de_LustreFileSystemConfiguration(output.LustreConfiguration, context) - : undefined, - NetworkInterfaceIds: - output.NetworkInterfaceIds != null ? de_NetworkInterfaceIds(output.NetworkInterfaceIds, context) : undefined, - OntapConfiguration: - output.OntapConfiguration != null - ? de_OntapFileSystemConfiguration(output.OntapConfiguration, context) - : undefined, - OpenZFSConfiguration: - output.OpenZFSConfiguration != null - ? de_OpenZFSFileSystemConfiguration(output.OpenZFSConfiguration, context) - : undefined, - OwnerId: __expectString(output.OwnerId), - ResourceARN: __expectString(output.ResourceARN), - StorageCapacity: __expectInt32(output.StorageCapacity), - StorageType: __expectString(output.StorageType), - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VpcId: __expectString(output.VpcId), - WindowsConfiguration: - output.WindowsConfiguration != null - ? de_WindowsFileSystemConfiguration(output.WindowsConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FileSystemEndpoint - */ -const de_FileSystemEndpoint = (output: any, context: __SerdeContext): FileSystemEndpoint => { - return { - DNSName: __expectString(output.DNSName), - IpAddresses: output.IpAddresses != null ? de_OntapEndpointIpAddresses(output.IpAddresses, context) : undefined, - } as any; -}; +// se_VolumeFilter omitted. -/** - * deserializeAws_json1_1FileSystemEndpoints - */ -const de_FileSystemEndpoints = (output: any, context: __SerdeContext): FileSystemEndpoints => { - return { - Intercluster: output.Intercluster != null ? de_FileSystemEndpoint(output.Intercluster, context) : undefined, - Management: output.Management != null ? de_FileSystemEndpoint(output.Management, context) : undefined, - } as any; -}; +// se_VolumeFilters omitted. + +// se_VolumeFilterValues omitted. + +// se_VolumeIds omitted. + +// se_WindowsAuditLogCreateConfiguration omitted. + +// de_ActiveDirectoryBackupAttributes omitted. + +// de_ActiveDirectoryError omitted. /** - * deserializeAws_json1_1FileSystemFailureDetails + * deserializeAws_json1_1AdministrativeAction */ -const de_FileSystemFailureDetails = (output: any, context: __SerdeContext): FileSystemFailureDetails => { - return { - Message: __expectString(output.Message), - } as any; +const de_AdministrativeAction = (output: any, context: __SerdeContext): AdministrativeAction => { + return take(output, { + AdministrativeActionType: __expectString, + FailureDetails: _json, + ProgressPercent: __expectInt32, + RequestTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TargetFileSystemValues: (_: any) => de_FileSystem(_, context), + TargetSnapshotValues: (_: any) => de_Snapshot(_, context), + TargetVolumeValues: (_: any) => de_Volume(_, context), + }) as any; }; +// de_AdministrativeActionFailureDetails omitted. + /** - * deserializeAws_json1_1FileSystemMaintenanceOperations + * deserializeAws_json1_1AdministrativeActions */ -const de_FileSystemMaintenanceOperations = ( - output: any, - context: __SerdeContext -): (FileSystemMaintenanceOperation | string)[] => { +const de_AdministrativeActions = (output: any, context: __SerdeContext): AdministrativeAction[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AdministrativeAction(entry, context); }); return retVal; }; +// de_Alias omitted. + +// de_Aliases omitted. + +// de_AssociateFileSystemAliasesResponse omitted. + +// de_AutoExportPolicy omitted. + +// de_AutoImportPolicy omitted. + /** - * deserializeAws_json1_1FileSystemNotFound + * deserializeAws_json1_1Backup */ -const de_FileSystemNotFound = (output: any, context: __SerdeContext): FileSystemNotFound => { - return { - Message: __expectString(output.Message), - } as any; +const de_Backup = (output: any, context: __SerdeContext): Backup => { + return take(output, { + BackupId: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DirectoryInformation: _json, + FailureDetails: _json, + FileSystem: (_: any) => de_FileSystem(_, context), + KmsKeyId: __expectString, + Lifecycle: __expectString, + OwnerId: __expectString, + ProgressPercent: __expectInt32, + ResourceARN: __expectString, + ResourceType: __expectString, + SourceBackupId: __expectString, + SourceBackupRegion: __expectString, + Tags: _json, + Type: __expectString, + Volume: (_: any) => de_Volume(_, context), + }) as any; }; +// de_BackupBeingCopied omitted. + +// de_BackupFailureDetails omitted. + +// de_BackupInProgress omitted. + +// de_BackupNotFound omitted. + +// de_BackupRestoring omitted. + /** - * deserializeAws_json1_1FileSystems + * deserializeAws_json1_1Backups */ -const de_FileSystems = (output: any, context: __SerdeContext): FileSystem[] => { +const de_Backups = (output: any, context: __SerdeContext): Backup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileSystem(entry, context); + return de_Backup(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1IncompatibleParameterError - */ -const de_IncompatibleParameterError = (output: any, context: __SerdeContext): IncompatibleParameterError => { - return { - Message: __expectString(output.Message), - Parameter: __expectString(output.Parameter), - } as any; -}; +// de_BadRequest omitted. -/** - * deserializeAws_json1_1IncompatibleRegionForMultiAZ - */ -const de_IncompatibleRegionForMultiAZ = (output: any, context: __SerdeContext): IncompatibleRegionForMultiAZ => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CancelDataRepositoryTaskResponse omitted. + +// de_CompletionReport omitted. /** - * deserializeAws_json1_1InternalServerError + * deserializeAws_json1_1CopyBackupResponse */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Message: __expectString(output.Message), - } as any; +const de_CopyBackupResponse = (output: any, context: __SerdeContext): CopyBackupResponse => { + return take(output, { + Backup: (_: any) => de_Backup(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidDataRepositoryType + * deserializeAws_json1_1CreateBackupResponse */ -const de_InvalidDataRepositoryType = (output: any, context: __SerdeContext): InvalidDataRepositoryType => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateBackupResponse = (output: any, context: __SerdeContext): CreateBackupResponse => { + return take(output, { + Backup: (_: any) => de_Backup(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidDestinationKmsKey + * deserializeAws_json1_1CreateDataRepositoryAssociationResponse */ -const de_InvalidDestinationKmsKey = (output: any, context: __SerdeContext): InvalidDestinationKmsKey => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateDataRepositoryAssociationResponse = ( + output: any, + context: __SerdeContext +): CreateDataRepositoryAssociationResponse => { + return take(output, { + Association: (_: any) => de_DataRepositoryAssociation(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidExportPath + * deserializeAws_json1_1CreateDataRepositoryTaskResponse */ -const de_InvalidExportPath = (output: any, context: __SerdeContext): InvalidExportPath => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateDataRepositoryTaskResponse = ( + output: any, + context: __SerdeContext +): CreateDataRepositoryTaskResponse => { + return take(output, { + DataRepositoryTask: (_: any) => de_DataRepositoryTask(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidImportPath + * deserializeAws_json1_1CreateFileCacheResponse */ -const de_InvalidImportPath = (output: any, context: __SerdeContext): InvalidImportPath => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateFileCacheResponse = (output: any, context: __SerdeContext): CreateFileCacheResponse => { + return take(output, { + FileCache: (_: any) => de_FileCacheCreating(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidNetworkSettings + * deserializeAws_json1_1CreateFileSystemFromBackupResponse */ -const de_InvalidNetworkSettings = (output: any, context: __SerdeContext): InvalidNetworkSettings => { - return { - InvalidRouteTableId: __expectString(output.InvalidRouteTableId), - InvalidSecurityGroupId: __expectString(output.InvalidSecurityGroupId), - InvalidSubnetId: __expectString(output.InvalidSubnetId), - Message: __expectString(output.Message), - } as any; +const de_CreateFileSystemFromBackupResponse = ( + output: any, + context: __SerdeContext +): CreateFileSystemFromBackupResponse => { + return take(output, { + FileSystem: (_: any) => de_FileSystem(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidPerUnitStorageThroughput + * deserializeAws_json1_1CreateFileSystemResponse */ -const de_InvalidPerUnitStorageThroughput = (output: any, context: __SerdeContext): InvalidPerUnitStorageThroughput => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateFileSystemResponse = (output: any, context: __SerdeContext): CreateFileSystemResponse => { + return take(output, { + FileSystem: (_: any) => de_FileSystem(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidRegion + * deserializeAws_json1_1CreateSnapshotResponse */ -const de_InvalidRegion = (output: any, context: __SerdeContext): InvalidRegion => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateSnapshotResponse = (output: any, context: __SerdeContext): CreateSnapshotResponse => { + return take(output, { + Snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; /** - * deserializeAws_json1_1InvalidSourceKmsKey + * deserializeAws_json1_1CreateStorageVirtualMachineResponse */ -const de_InvalidSourceKmsKey = (output: any, context: __SerdeContext): InvalidSourceKmsKey => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateStorageVirtualMachineResponse = ( + output: any, + context: __SerdeContext +): CreateStorageVirtualMachineResponse => { + return take(output, { + StorageVirtualMachine: (_: any) => de_StorageVirtualMachine(_, context), + }) as any; }; /** - * deserializeAws_json1_1LifecycleTransitionReason + * deserializeAws_json1_1CreateVolumeFromBackupResponse */ -const de_LifecycleTransitionReason = (output: any, context: __SerdeContext): LifecycleTransitionReason => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateVolumeFromBackupResponse = (output: any, context: __SerdeContext): CreateVolumeFromBackupResponse => { + return take(output, { + Volume: (_: any) => de_Volume(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListTagsForResourceResponse + * deserializeAws_json1_1CreateVolumeResponse */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; +const de_CreateVolumeResponse = (output: any, context: __SerdeContext): CreateVolumeResponse => { + return take(output, { + Volume: (_: any) => de_Volume(_, context), + }) as any; }; /** - * deserializeAws_json1_1LustreFileSystemConfiguration + * deserializeAws_json1_1DataRepositoryAssociation */ -const de_LustreFileSystemConfiguration = (output: any, context: __SerdeContext): LustreFileSystemConfiguration => { - return { - AutomaticBackupRetentionDays: __expectInt32(output.AutomaticBackupRetentionDays), - CopyTagsToBackups: __expectBoolean(output.CopyTagsToBackups), - DailyAutomaticBackupStartTime: __expectString(output.DailyAutomaticBackupStartTime), - DataCompressionType: __expectString(output.DataCompressionType), - DataRepositoryConfiguration: - output.DataRepositoryConfiguration != null - ? de_DataRepositoryConfiguration(output.DataRepositoryConfiguration, context) - : undefined, - DeploymentType: __expectString(output.DeploymentType), - DriveCacheType: __expectString(output.DriveCacheType), - LogConfiguration: - output.LogConfiguration != null ? de_LustreLogConfiguration(output.LogConfiguration, context) : undefined, - MountName: __expectString(output.MountName), - PerUnitStorageThroughput: __expectInt32(output.PerUnitStorageThroughput), - RootSquashConfiguration: - output.RootSquashConfiguration != null - ? de_LustreRootSquashConfiguration(output.RootSquashConfiguration, context) - : undefined, - WeeklyMaintenanceStartTime: __expectString(output.WeeklyMaintenanceStartTime), - } as any; -}; - -/** - * deserializeAws_json1_1LustreLogConfiguration - */ -const de_LustreLogConfiguration = (output: any, context: __SerdeContext): LustreLogConfiguration => { - return { - Destination: __expectString(output.Destination), - Level: __expectString(output.Level), - } as any; -}; +const de_DataRepositoryAssociation = (output: any, context: __SerdeContext): DataRepositoryAssociation => { + return take(output, { + AssociationId: __expectString, + BatchImportMetaDataOnCreate: __expectBoolean, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataRepositoryPath: __expectString, + DataRepositorySubdirectories: _json, + FailureDetails: _json, + FileCacheId: __expectString, + FileCachePath: __expectString, + FileSystemId: __expectString, + FileSystemPath: __expectString, + ImportedFileChunkSize: __expectInt32, + Lifecycle: __expectString, + NFS: _json, + ResourceARN: __expectString, + S3: _json, + Tags: _json, + }) as any; +}; + +// de_DataRepositoryAssociationIds omitted. + +// de_DataRepositoryAssociationNotFound omitted. /** - * deserializeAws_json1_1LustreNoSquashNids + * deserializeAws_json1_1DataRepositoryAssociations */ -const de_LustreNoSquashNids = (output: any, context: __SerdeContext): string[] => { +const de_DataRepositoryAssociations = (output: any, context: __SerdeContext): DataRepositoryAssociation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DataRepositoryAssociation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LustreRootSquashConfiguration - */ -const de_LustreRootSquashConfiguration = (output: any, context: __SerdeContext): LustreRootSquashConfiguration => { - return { - NoSquashNids: output.NoSquashNids != null ? de_LustreNoSquashNids(output.NoSquashNids, context) : undefined, - RootSquash: __expectString(output.RootSquash), - } as any; -}; +// de_DataRepositoryConfiguration omitted. + +// de_DataRepositoryFailureDetails omitted. /** - * deserializeAws_json1_1MissingFileCacheConfiguration + * deserializeAws_json1_1DataRepositoryTask */ -const de_MissingFileCacheConfiguration = (output: any, context: __SerdeContext): MissingFileCacheConfiguration => { - return { - Message: __expectString(output.Message), - } as any; +const de_DataRepositoryTask = (output: any, context: __SerdeContext): DataRepositoryTask => { + return take(output, { + CapacityToRelease: __expectLong, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureDetails: _json, + FileCacheId: __expectString, + FileSystemId: __expectString, + Lifecycle: __expectString, + Paths: _json, + Report: _json, + ResourceARN: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: (_: any) => de_DataRepositoryTaskStatus(_, context), + Tags: _json, + TaskId: __expectString, + Type: __expectString, + }) as any; }; +// de_DataRepositoryTaskEnded omitted. + +// de_DataRepositoryTaskExecuting omitted. + +// de_DataRepositoryTaskFailureDetails omitted. + +// de_DataRepositoryTaskNotFound omitted. + +// de_DataRepositoryTaskPaths omitted. + /** - * deserializeAws_json1_1MissingFileSystemConfiguration + * deserializeAws_json1_1DataRepositoryTasks */ -const de_MissingFileSystemConfiguration = (output: any, context: __SerdeContext): MissingFileSystemConfiguration => { - return { - Message: __expectString(output.Message), - } as any; +const de_DataRepositoryTasks = (output: any, context: __SerdeContext): DataRepositoryTask[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataRepositoryTask(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1MissingVolumeConfiguration + * deserializeAws_json1_1DataRepositoryTaskStatus */ -const de_MissingVolumeConfiguration = (output: any, context: __SerdeContext): MissingVolumeConfiguration => { - return { - Message: __expectString(output.Message), - } as any; +const de_DataRepositoryTaskStatus = (output: any, context: __SerdeContext): DataRepositoryTaskStatus => { + return take(output, { + FailedCount: __expectLong, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReleasedCapacity: __expectLong, + SucceededCount: __expectLong, + TotalCount: __expectLong, + }) as any; }; +// de_DeleteBackupResponse omitted. + +// de_DeleteDataRepositoryAssociationResponse omitted. + +// de_DeleteFileCacheResponse omitted. + +// de_DeleteFileSystemLustreResponse omitted. + +// de_DeleteFileSystemOpenZFSResponse omitted. + +// de_DeleteFileSystemResponse omitted. + +// de_DeleteFileSystemWindowsResponse omitted. + +// de_DeleteSnapshotResponse omitted. + +// de_DeleteStorageVirtualMachineResponse omitted. + +// de_DeleteVolumeOntapResponse omitted. + +// de_DeleteVolumeResponse omitted. + /** - * deserializeAws_json1_1NetworkInterfaceIds + * deserializeAws_json1_1DescribeBackupsResponse */ -const de_NetworkInterfaceIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeBackupsResponse = (output: any, context: __SerdeContext): DescribeBackupsResponse => { + return take(output, { + Backups: (_: any) => de_Backups(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NFSDataRepositoryConfiguration + * deserializeAws_json1_1DescribeDataRepositoryAssociationsResponse */ -const de_NFSDataRepositoryConfiguration = (output: any, context: __SerdeContext): NFSDataRepositoryConfiguration => { - return { - AutoExportPolicy: - output.AutoExportPolicy != null ? de_AutoExportPolicy(output.AutoExportPolicy, context) : undefined, - DnsIps: output.DnsIps != null ? de_RepositoryDnsIps(output.DnsIps, context) : undefined, - Version: __expectString(output.Version), - } as any; +const de_DescribeDataRepositoryAssociationsResponse = ( + output: any, + context: __SerdeContext +): DescribeDataRepositoryAssociationsResponse => { + return take(output, { + Associations: (_: any) => de_DataRepositoryAssociations(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotServiceResourceError + * deserializeAws_json1_1DescribeDataRepositoryTasksResponse */ -const de_NotServiceResourceError = (output: any, context: __SerdeContext): NotServiceResourceError => { - return { - Message: __expectString(output.Message), - ResourceARN: __expectString(output.ResourceARN), - } as any; +const de_DescribeDataRepositoryTasksResponse = ( + output: any, + context: __SerdeContext +): DescribeDataRepositoryTasksResponse => { + return take(output, { + DataRepositoryTasks: (_: any) => de_DataRepositoryTasks(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OntapEndpointIpAddresses + * deserializeAws_json1_1DescribeFileCachesResponse */ -const de_OntapEndpointIpAddresses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeFileCachesResponse = (output: any, context: __SerdeContext): DescribeFileCachesResponse => { + return take(output, { + FileCaches: (_: any) => de_FileCaches(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeFileSystemAliasesResponse omitted. + /** - * deserializeAws_json1_1OntapFileSystemConfiguration + * deserializeAws_json1_1DescribeFileSystemsResponse */ -const de_OntapFileSystemConfiguration = (output: any, context: __SerdeContext): OntapFileSystemConfiguration => { - return { - AutomaticBackupRetentionDays: __expectInt32(output.AutomaticBackupRetentionDays), - DailyAutomaticBackupStartTime: __expectString(output.DailyAutomaticBackupStartTime), - DeploymentType: __expectString(output.DeploymentType), - DiskIopsConfiguration: - output.DiskIopsConfiguration != null - ? de_DiskIopsConfiguration(output.DiskIopsConfiguration, context) - : undefined, - EndpointIpAddressRange: __expectString(output.EndpointIpAddressRange), - Endpoints: output.Endpoints != null ? de_FileSystemEndpoints(output.Endpoints, context) : undefined, - PreferredSubnetId: __expectString(output.PreferredSubnetId), - RouteTableIds: output.RouteTableIds != null ? de_RouteTableIds(output.RouteTableIds, context) : undefined, - ThroughputCapacity: __expectInt32(output.ThroughputCapacity), - WeeklyMaintenanceStartTime: __expectString(output.WeeklyMaintenanceStartTime), - } as any; -}; - -/** - * deserializeAws_json1_1OntapVolumeConfiguration - */ -const de_OntapVolumeConfiguration = (output: any, context: __SerdeContext): OntapVolumeConfiguration => { - return { - CopyTagsToBackups: __expectBoolean(output.CopyTagsToBackups), - FlexCacheEndpointType: __expectString(output.FlexCacheEndpointType), - JunctionPath: __expectString(output.JunctionPath), - OntapVolumeType: __expectString(output.OntapVolumeType), - SecurityStyle: __expectString(output.SecurityStyle), - SizeInMegabytes: __expectInt32(output.SizeInMegabytes), - SnapshotPolicy: __expectString(output.SnapshotPolicy), - StorageEfficiencyEnabled: __expectBoolean(output.StorageEfficiencyEnabled), - StorageVirtualMachineId: __expectString(output.StorageVirtualMachineId), - StorageVirtualMachineRoot: __expectBoolean(output.StorageVirtualMachineRoot), - TieringPolicy: output.TieringPolicy != null ? de_TieringPolicy(output.TieringPolicy, context) : undefined, - UUID: __expectString(output.UUID), - } as any; +const de_DescribeFileSystemsResponse = (output: any, context: __SerdeContext): DescribeFileSystemsResponse => { + return take(output, { + FileSystems: (_: any) => de_FileSystems(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpenZFSClientConfiguration + * deserializeAws_json1_1DescribeSnapshotsResponse */ -const de_OpenZFSClientConfiguration = (output: any, context: __SerdeContext): OpenZFSClientConfiguration => { - return { - Clients: __expectString(output.Clients), - Options: output.Options != null ? de_OpenZFSNfsExportOptions(output.Options, context) : undefined, - } as any; +const de_DescribeSnapshotsResponse = (output: any, context: __SerdeContext): DescribeSnapshotsResponse => { + return take(output, { + NextToken: __expectString, + Snapshots: (_: any) => de_Snapshots(_, context), + }) as any; }; /** - * deserializeAws_json1_1OpenZFSClientConfigurations + * deserializeAws_json1_1DescribeStorageVirtualMachinesResponse */ -const de_OpenZFSClientConfigurations = (output: any, context: __SerdeContext): OpenZFSClientConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpenZFSClientConfiguration(entry, context); - }); - return retVal; +const de_DescribeStorageVirtualMachinesResponse = ( + output: any, + context: __SerdeContext +): DescribeStorageVirtualMachinesResponse => { + return take(output, { + NextToken: __expectString, + StorageVirtualMachines: (_: any) => de_StorageVirtualMachines(_, context), + }) as any; }; /** - * deserializeAws_json1_1OpenZFSFileSystemConfiguration + * deserializeAws_json1_1DescribeVolumesResponse */ -const de_OpenZFSFileSystemConfiguration = (output: any, context: __SerdeContext): OpenZFSFileSystemConfiguration => { - return { - AutomaticBackupRetentionDays: __expectInt32(output.AutomaticBackupRetentionDays), - CopyTagsToBackups: __expectBoolean(output.CopyTagsToBackups), - CopyTagsToVolumes: __expectBoolean(output.CopyTagsToVolumes), - DailyAutomaticBackupStartTime: __expectString(output.DailyAutomaticBackupStartTime), - DeploymentType: __expectString(output.DeploymentType), - DiskIopsConfiguration: - output.DiskIopsConfiguration != null - ? de_DiskIopsConfiguration(output.DiskIopsConfiguration, context) - : undefined, - RootVolumeId: __expectString(output.RootVolumeId), - ThroughputCapacity: __expectInt32(output.ThroughputCapacity), - WeeklyMaintenanceStartTime: __expectString(output.WeeklyMaintenanceStartTime), - } as any; +const de_DescribeVolumesResponse = (output: any, context: __SerdeContext): DescribeVolumesResponse => { + return take(output, { + NextToken: __expectString, + Volumes: (_: any) => de_Volumes(_, context), + }) as any; }; +// de_DisassociateFileSystemAliasesResponse omitted. + +// de_DiskIopsConfiguration omitted. + +// de_DnsIps omitted. + +// de_EventTypes omitted. + /** - * deserializeAws_json1_1OpenZFSNfsExport + * deserializeAws_json1_1FileCache */ -const de_OpenZFSNfsExport = (output: any, context: __SerdeContext): OpenZFSNfsExport => { - return { - ClientConfigurations: - output.ClientConfigurations != null - ? de_OpenZFSClientConfigurations(output.ClientConfigurations, context) - : undefined, - } as any; +const de_FileCache = (output: any, context: __SerdeContext): FileCache => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DNSName: __expectString, + DataRepositoryAssociationIds: _json, + FailureDetails: _json, + FileCacheId: __expectString, + FileCacheType: __expectString, + FileCacheTypeVersion: __expectString, + KmsKeyId: __expectString, + Lifecycle: __expectString, + LustreConfiguration: _json, + NetworkInterfaceIds: _json, + OwnerId: __expectString, + ResourceARN: __expectString, + StorageCapacity: __expectInt32, + SubnetIds: _json, + VpcId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpenZFSNfsExportOptions + * deserializeAws_json1_1FileCacheCreating */ -const de_OpenZFSNfsExportOptions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_FileCacheCreating = (output: any, context: __SerdeContext): FileCacheCreating => { + return take(output, { + CopyTagsToDataRepositoryAssociations: __expectBoolean, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DNSName: __expectString, + DataRepositoryAssociationIds: _json, + FailureDetails: _json, + FileCacheId: __expectString, + FileCacheType: __expectString, + FileCacheTypeVersion: __expectString, + KmsKeyId: __expectString, + Lifecycle: __expectString, + LustreConfiguration: _json, + NetworkInterfaceIds: _json, + OwnerId: __expectString, + ResourceARN: __expectString, + StorageCapacity: __expectInt32, + SubnetIds: _json, + Tags: _json, + VpcId: __expectString, + }) as any; }; +// de_FileCacheFailureDetails omitted. + +// de_FileCacheLustreConfiguration omitted. + +// de_FileCacheLustreMetadataConfiguration omitted. + +// de_FileCacheNotFound omitted. + /** - * deserializeAws_json1_1OpenZFSNfsExports + * deserializeAws_json1_1FileCaches */ -const de_OpenZFSNfsExports = (output: any, context: __SerdeContext): OpenZFSNfsExport[] => { +const de_FileCaches = (output: any, context: __SerdeContext): FileCache[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpenZFSNfsExport(entry, context); + return de_FileCache(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1OpenZFSOriginSnapshotConfiguration + * deserializeAws_json1_1FileSystem */ -const de_OpenZFSOriginSnapshotConfiguration = ( - output: any, - context: __SerdeContext -): OpenZFSOriginSnapshotConfiguration => { - return { - CopyStrategy: __expectString(output.CopyStrategy), - SnapshotARN: __expectString(output.SnapshotARN), - } as any; -}; +const de_FileSystem = (output: any, context: __SerdeContext): FileSystem => { + return take(output, { + AdministrativeActions: (_: any) => de_AdministrativeActions(_, context), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DNSName: __expectString, + FailureDetails: _json, + FileSystemId: __expectString, + FileSystemType: __expectString, + FileSystemTypeVersion: __expectString, + KmsKeyId: __expectString, + Lifecycle: __expectString, + LustreConfiguration: _json, + NetworkInterfaceIds: _json, + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + OwnerId: __expectString, + ResourceARN: __expectString, + StorageCapacity: __expectInt32, + StorageType: __expectString, + SubnetIds: _json, + Tags: _json, + VpcId: __expectString, + WindowsConfiguration: _json, + }) as any; +}; + +// de_FileSystemEndpoint omitted. + +// de_FileSystemEndpoints omitted. + +// de_FileSystemFailureDetails omitted. + +// de_FileSystemMaintenanceOperations omitted. + +// de_FileSystemNotFound omitted. /** - * deserializeAws_json1_1OpenZFSUserAndGroupQuotas + * deserializeAws_json1_1FileSystems */ -const de_OpenZFSUserAndGroupQuotas = (output: any, context: __SerdeContext): OpenZFSUserOrGroupQuota[] => { +const de_FileSystems = (output: any, context: __SerdeContext): FileSystem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpenZFSUserOrGroupQuota(entry, context); + return de_FileSystem(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OpenZFSUserOrGroupQuota - */ -const de_OpenZFSUserOrGroupQuota = (output: any, context: __SerdeContext): OpenZFSUserOrGroupQuota => { - return { - Id: __expectInt32(output.Id), - StorageCapacityQuotaGiB: __expectInt32(output.StorageCapacityQuotaGiB), - Type: __expectString(output.Type), - } as any; -}; +// de_IncompatibleParameterError omitted. -/** - * deserializeAws_json1_1OpenZFSVolumeConfiguration - */ -const de_OpenZFSVolumeConfiguration = (output: any, context: __SerdeContext): OpenZFSVolumeConfiguration => { - return { - CopyTagsToSnapshots: __expectBoolean(output.CopyTagsToSnapshots), - DataCompressionType: __expectString(output.DataCompressionType), - DeleteClonedVolumes: __expectBoolean(output.DeleteClonedVolumes), - DeleteIntermediateSnaphots: __expectBoolean(output.DeleteIntermediateSnaphots), - NfsExports: output.NfsExports != null ? de_OpenZFSNfsExports(output.NfsExports, context) : undefined, - OriginSnapshot: - output.OriginSnapshot != null ? de_OpenZFSOriginSnapshotConfiguration(output.OriginSnapshot, context) : undefined, - ParentVolumeId: __expectString(output.ParentVolumeId), - ReadOnly: __expectBoolean(output.ReadOnly), - RecordSizeKiB: __expectInt32(output.RecordSizeKiB), - RestoreToSnapshot: __expectString(output.RestoreToSnapshot), - StorageCapacityQuotaGiB: __expectInt32(output.StorageCapacityQuotaGiB), - StorageCapacityReservationGiB: __expectInt32(output.StorageCapacityReservationGiB), - UserAndGroupQuotas: - output.UserAndGroupQuotas != null ? de_OpenZFSUserAndGroupQuotas(output.UserAndGroupQuotas, context) : undefined, - VolumePath: __expectString(output.VolumePath), - } as any; -}; +// de_IncompatibleRegionForMultiAZ omitted. + +// de_InternalServerError omitted. + +// de_InvalidDataRepositoryType omitted. + +// de_InvalidDestinationKmsKey omitted. + +// de_InvalidExportPath omitted. + +// de_InvalidImportPath omitted. + +// de_InvalidNetworkSettings omitted. + +// de_InvalidPerUnitStorageThroughput omitted. + +// de_InvalidRegion omitted. + +// de_InvalidSourceKmsKey omitted. + +// de_LifecycleTransitionReason omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_LustreFileSystemConfiguration omitted. + +// de_LustreLogConfiguration omitted. + +// de_LustreNoSquashNids omitted. + +// de_LustreRootSquashConfiguration omitted. + +// de_MissingFileCacheConfiguration omitted. + +// de_MissingFileSystemConfiguration omitted. + +// de_MissingVolumeConfiguration omitted. + +// de_NetworkInterfaceIds omitted. + +// de_NFSDataRepositoryConfiguration omitted. + +// de_NotServiceResourceError omitted. + +// de_OntapEndpointIpAddresses omitted. + +// de_OntapFileSystemConfiguration omitted. + +// de_OntapVolumeConfiguration omitted. + +// de_OpenZFSClientConfiguration omitted. + +// de_OpenZFSClientConfigurations omitted. + +// de_OpenZFSFileSystemConfiguration omitted. + +// de_OpenZFSNfsExport omitted. + +// de_OpenZFSNfsExportOptions omitted. + +// de_OpenZFSNfsExports omitted. + +// de_OpenZFSOriginSnapshotConfiguration omitted. + +// de_OpenZFSUserAndGroupQuotas omitted. + +// de_OpenZFSUserOrGroupQuota omitted. + +// de_OpenZFSVolumeConfiguration omitted. /** * deserializeAws_json1_1ReleaseFileSystemNfsV3LocksResponse @@ -7178,45 +4981,16 @@ const de_ReleaseFileSystemNfsV3LocksResponse = ( output: any, context: __SerdeContext ): ReleaseFileSystemNfsV3LocksResponse => { - return { - FileSystem: output.FileSystem != null ? de_FileSystem(output.FileSystem, context) : undefined, - } as any; + return take(output, { + FileSystem: (_: any) => de_FileSystem(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RepositoryDnsIps - */ -const de_RepositoryDnsIps = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RepositoryDnsIps omitted. -/** - * deserializeAws_json1_1ResourceDoesNotSupportTagging - */ -const de_ResourceDoesNotSupportTagging = (output: any, context: __SerdeContext): ResourceDoesNotSupportTagging => { - return { - Message: __expectString(output.Message), - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; +// de_ResourceDoesNotSupportTagging omitted. -/** - * deserializeAws_json1_1ResourceNotFound - */ -const de_ResourceNotFound = (output: any, context: __SerdeContext): ResourceNotFound => { - return { - Message: __expectString(output.Message), - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; +// de_ResourceNotFound omitted. /** * deserializeAws_json1_1RestoreVolumeFromSnapshotResponse @@ -7225,104 +4999,40 @@ const de_RestoreVolumeFromSnapshotResponse = ( output: any, context: __SerdeContext ): RestoreVolumeFromSnapshotResponse => { - return { - AdministrativeActions: - output.AdministrativeActions != null - ? de_AdministrativeActions(output.AdministrativeActions, context) - : undefined, - Lifecycle: __expectString(output.Lifecycle), - VolumeId: __expectString(output.VolumeId), - } as any; + return take(output, { + AdministrativeActions: (_: any) => de_AdministrativeActions(_, context), + Lifecycle: __expectString, + VolumeId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RouteTableIds - */ -const de_RouteTableIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RouteTableIds omitted. -/** - * deserializeAws_json1_1S3DataRepositoryConfiguration - */ -const de_S3DataRepositoryConfiguration = (output: any, context: __SerdeContext): S3DataRepositoryConfiguration => { - return { - AutoExportPolicy: - output.AutoExportPolicy != null ? de_AutoExportPolicy(output.AutoExportPolicy, context) : undefined, - AutoImportPolicy: - output.AutoImportPolicy != null ? de_AutoImportPolicy(output.AutoImportPolicy, context) : undefined, - } as any; -}; +// de_S3DataRepositoryConfiguration omitted. -/** - * deserializeAws_json1_1SelfManagedActiveDirectoryAttributes - */ -const de_SelfManagedActiveDirectoryAttributes = ( - output: any, - context: __SerdeContext -): SelfManagedActiveDirectoryAttributes => { - return { - DnsIps: output.DnsIps != null ? de_DnsIps(output.DnsIps, context) : undefined, - DomainName: __expectString(output.DomainName), - FileSystemAdministratorsGroup: __expectString(output.FileSystemAdministratorsGroup), - OrganizationalUnitDistinguishedName: __expectString(output.OrganizationalUnitDistinguishedName), - UserName: __expectString(output.UserName), - } as any; -}; +// de_SelfManagedActiveDirectoryAttributes omitted. -/** - * deserializeAws_json1_1ServiceLimitExceeded - */ -const de_ServiceLimitExceeded = (output: any, context: __SerdeContext): ServiceLimitExceeded => { - return { - Limit: __expectString(output.Limit), - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceLimitExceeded omitted. /** * deserializeAws_json1_1Snapshot */ const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => { - return { - AdministrativeActions: - output.AdministrativeActions != null - ? de_AdministrativeActions(output.AdministrativeActions, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Lifecycle: __expectString(output.Lifecycle), - LifecycleTransitionReason: - output.LifecycleTransitionReason != null - ? de_LifecycleTransitionReason(output.LifecycleTransitionReason, context) - : undefined, - Name: __expectString(output.Name), - ResourceARN: __expectString(output.ResourceARN), - SnapshotId: __expectString(output.SnapshotId), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VolumeId: __expectString(output.VolumeId), - } as any; -}; - -/** - * deserializeAws_json1_1SnapshotNotFound - */ -const de_SnapshotNotFound = (output: any, context: __SerdeContext): SnapshotNotFound => { - return { - Message: __expectString(output.Message), - } as any; + return take(output, { + AdministrativeActions: (_: any) => de_AdministrativeActions(_, context), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Lifecycle: __expectString, + LifecycleTransitionReason: _json, + Name: __expectString, + ResourceARN: __expectString, + SnapshotId: __expectString, + Tags: _json, + VolumeId: __expectString, + }) as any; }; +// de_SnapshotNotFound omitted. + /** * deserializeAws_json1_1Snapshots */ @@ -7330,62 +5040,35 @@ const de_Snapshots = (output: any, context: __SerdeContext): Snapshot[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Snapshot(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SourceBackupUnavailable - */ -const de_SourceBackupUnavailable = (output: any, context: __SerdeContext): SourceBackupUnavailable => { - return { - BackupId: __expectString(output.BackupId), - Message: __expectString(output.Message), - } as any; -}; +// de_SourceBackupUnavailable omitted. /** * deserializeAws_json1_1StorageVirtualMachine */ const de_StorageVirtualMachine = (output: any, context: __SerdeContext): StorageVirtualMachine => { - return { - ActiveDirectoryConfiguration: - output.ActiveDirectoryConfiguration != null - ? de_SvmActiveDirectoryConfiguration(output.ActiveDirectoryConfiguration, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Endpoints: output.Endpoints != null ? de_SvmEndpoints(output.Endpoints, context) : undefined, - FileSystemId: __expectString(output.FileSystemId), - Lifecycle: __expectString(output.Lifecycle), - LifecycleTransitionReason: - output.LifecycleTransitionReason != null - ? de_LifecycleTransitionReason(output.LifecycleTransitionReason, context) - : undefined, - Name: __expectString(output.Name), - ResourceARN: __expectString(output.ResourceARN), - RootVolumeSecurityStyle: __expectString(output.RootVolumeSecurityStyle), - StorageVirtualMachineId: __expectString(output.StorageVirtualMachineId), - Subtype: __expectString(output.Subtype), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - UUID: __expectString(output.UUID), - } as any; -}; - -/** - * deserializeAws_json1_1StorageVirtualMachineNotFound - */ -const de_StorageVirtualMachineNotFound = (output: any, context: __SerdeContext): StorageVirtualMachineNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; + return take(output, { + ActiveDirectoryConfiguration: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Endpoints: _json, + FileSystemId: __expectString, + Lifecycle: __expectString, + LifecycleTransitionReason: _json, + Name: __expectString, + ResourceARN: __expectString, + RootVolumeSecurityStyle: __expectString, + StorageVirtualMachineId: __expectString, + Subtype: __expectString, + Tags: _json, + UUID: __expectString, + }) as any; +}; + +// de_StorageVirtualMachineNotFound omitted. /** * deserializeAws_json1_1StorageVirtualMachines @@ -7394,136 +5077,32 @@ const de_StorageVirtualMachines = (output: any, context: __SerdeContext): Storag const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StorageVirtualMachine(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SubDirectoriesPaths - */ -const de_SubDirectoriesPaths = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubDirectoriesPaths omitted. -/** - * deserializeAws_json1_1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_json1_1SvmActiveDirectoryConfiguration - */ -const de_SvmActiveDirectoryConfiguration = (output: any, context: __SerdeContext): SvmActiveDirectoryConfiguration => { - return { - NetBiosName: __expectString(output.NetBiosName), - SelfManagedActiveDirectoryConfiguration: - output.SelfManagedActiveDirectoryConfiguration != null - ? de_SelfManagedActiveDirectoryAttributes(output.SelfManagedActiveDirectoryConfiguration, context) - : undefined, - } as any; -}; +// de_SvmActiveDirectoryConfiguration omitted. -/** - * deserializeAws_json1_1SvmEndpoint - */ -const de_SvmEndpoint = (output: any, context: __SerdeContext): SvmEndpoint => { - return { - DNSName: __expectString(output.DNSName), - IpAddresses: output.IpAddresses != null ? de_OntapEndpointIpAddresses(output.IpAddresses, context) : undefined, - } as any; -}; +// de_SvmEndpoint omitted. -/** - * deserializeAws_json1_1SvmEndpoints - */ -const de_SvmEndpoints = (output: any, context: __SerdeContext): SvmEndpoints => { - return { - Iscsi: output.Iscsi != null ? de_SvmEndpoint(output.Iscsi, context) : undefined, - Management: output.Management != null ? de_SvmEndpoint(output.Management, context) : undefined, - Nfs: output.Nfs != null ? de_SvmEndpoint(output.Nfs, context) : undefined, - Smb: output.Smb != null ? de_SvmEndpoint(output.Smb, context) : undefined, - } as any; -}; +// de_SvmEndpoints omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TieringPolicy - */ -const de_TieringPolicy = (output: any, context: __SerdeContext): TieringPolicy => { - return { - CoolingPeriod: __expectInt32(output.CoolingPeriod), - Name: __expectString(output.Name), - } as any; -}; +// de_TieringPolicy omitted. -/** - * deserializeAws_json1_1UnsupportedOperation - */ -const de_UnsupportedOperation = (output: any, context: __SerdeContext): UnsupportedOperation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedOperation omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateDataRepositoryAssociationResponse @@ -7532,36 +5111,36 @@ const de_UpdateDataRepositoryAssociationResponse = ( output: any, context: __SerdeContext ): UpdateDataRepositoryAssociationResponse => { - return { - Association: output.Association != null ? de_DataRepositoryAssociation(output.Association, context) : undefined, - } as any; + return take(output, { + Association: (_: any) => de_DataRepositoryAssociation(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateFileCacheResponse */ const de_UpdateFileCacheResponse = (output: any, context: __SerdeContext): UpdateFileCacheResponse => { - return { - FileCache: output.FileCache != null ? de_FileCache(output.FileCache, context) : undefined, - } as any; + return take(output, { + FileCache: (_: any) => de_FileCache(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateFileSystemResponse */ const de_UpdateFileSystemResponse = (output: any, context: __SerdeContext): UpdateFileSystemResponse => { - return { - FileSystem: output.FileSystem != null ? de_FileSystem(output.FileSystem, context) : undefined, - } as any; + return take(output, { + FileSystem: (_: any) => de_FileSystem(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateSnapshotResponse */ const de_UpdateSnapshotResponse = (output: any, context: __SerdeContext): UpdateSnapshotResponse => { - return { - Snapshot: output.Snapshot != null ? de_Snapshot(output.Snapshot, context) : undefined, - } as any; + return take(output, { + Snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; /** @@ -7571,65 +5150,42 @@ const de_UpdateStorageVirtualMachineResponse = ( output: any, context: __SerdeContext ): UpdateStorageVirtualMachineResponse => { - return { - StorageVirtualMachine: - output.StorageVirtualMachine != null - ? de_StorageVirtualMachine(output.StorageVirtualMachine, context) - : undefined, - } as any; + return take(output, { + StorageVirtualMachine: (_: any) => de_StorageVirtualMachine(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateVolumeResponse */ const de_UpdateVolumeResponse = (output: any, context: __SerdeContext): UpdateVolumeResponse => { - return { - Volume: output.Volume != null ? de_Volume(output.Volume, context) : undefined, - } as any; + return take(output, { + Volume: (_: any) => de_Volume(_, context), + }) as any; }; /** * deserializeAws_json1_1Volume */ const de_Volume = (output: any, context: __SerdeContext): Volume => { - return { - AdministrativeActions: - output.AdministrativeActions != null - ? de_AdministrativeActions(output.AdministrativeActions, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FileSystemId: __expectString(output.FileSystemId), - Lifecycle: __expectString(output.Lifecycle), - LifecycleTransitionReason: - output.LifecycleTransitionReason != null - ? de_LifecycleTransitionReason(output.LifecycleTransitionReason, context) - : undefined, - Name: __expectString(output.Name), - OntapConfiguration: - output.OntapConfiguration != null ? de_OntapVolumeConfiguration(output.OntapConfiguration, context) : undefined, - OpenZFSConfiguration: - output.OpenZFSConfiguration != null - ? de_OpenZFSVolumeConfiguration(output.OpenZFSConfiguration, context) - : undefined, - ResourceARN: __expectString(output.ResourceARN), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VolumeId: __expectString(output.VolumeId), - VolumeType: __expectString(output.VolumeType), - } as any; -}; - -/** - * deserializeAws_json1_1VolumeNotFound - */ -const de_VolumeNotFound = (output: any, context: __SerdeContext): VolumeNotFound => { - return { - Message: __expectString(output.Message), - } as any; + return take(output, { + AdministrativeActions: (_: any) => de_AdministrativeActions(_, context), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FileSystemId: __expectString, + Lifecycle: __expectString, + LifecycleTransitionReason: _json, + Name: __expectString, + OntapConfiguration: _json, + OpenZFSConfiguration: _json, + ResourceARN: __expectString, + Tags: _json, + VolumeId: __expectString, + VolumeType: __expectString, + }) as any; }; +// de_VolumeNotFound omitted. + /** * deserializeAws_json1_1Volumes */ @@ -7637,55 +5193,14 @@ const de_Volumes = (output: any, context: __SerdeContext): Volume[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Volume(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1WindowsAuditLogConfiguration - */ -const de_WindowsAuditLogConfiguration = (output: any, context: __SerdeContext): WindowsAuditLogConfiguration => { - return { - AuditLogDestination: __expectString(output.AuditLogDestination), - FileAccessAuditLogLevel: __expectString(output.FileAccessAuditLogLevel), - FileShareAccessAuditLogLevel: __expectString(output.FileShareAccessAuditLogLevel), - } as any; -}; +// de_WindowsAuditLogConfiguration omitted. -/** - * deserializeAws_json1_1WindowsFileSystemConfiguration - */ -const de_WindowsFileSystemConfiguration = (output: any, context: __SerdeContext): WindowsFileSystemConfiguration => { - return { - ActiveDirectoryId: __expectString(output.ActiveDirectoryId), - Aliases: output.Aliases != null ? de_Aliases(output.Aliases, context) : undefined, - AuditLogConfiguration: - output.AuditLogConfiguration != null - ? de_WindowsAuditLogConfiguration(output.AuditLogConfiguration, context) - : undefined, - AutomaticBackupRetentionDays: __expectInt32(output.AutomaticBackupRetentionDays), - CopyTagsToBackups: __expectBoolean(output.CopyTagsToBackups), - DailyAutomaticBackupStartTime: __expectString(output.DailyAutomaticBackupStartTime), - DeploymentType: __expectString(output.DeploymentType), - MaintenanceOperationsInProgress: - output.MaintenanceOperationsInProgress != null - ? de_FileSystemMaintenanceOperations(output.MaintenanceOperationsInProgress, context) - : undefined, - PreferredFileServerIp: __expectString(output.PreferredFileServerIp), - PreferredSubnetId: __expectString(output.PreferredSubnetId), - RemoteAdministrationEndpoint: __expectString(output.RemoteAdministrationEndpoint), - SelfManagedActiveDirectoryConfiguration: - output.SelfManagedActiveDirectoryConfiguration != null - ? de_SelfManagedActiveDirectoryAttributes(output.SelfManagedActiveDirectoryConfiguration, context) - : undefined, - ThroughputCapacity: __expectInt32(output.ThroughputCapacity), - WeeklyMaintenanceStartTime: __expectString(output.WeeklyMaintenanceStartTime), - } as any; -}; +// de_WindowsFileSystemConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -7707,6 +5222,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-gamelift/src/protocols/Aws_json1_1.ts b/clients/client-gamelift/src/protocols/Aws_json1_1.ts index 0fcf82173a4d..4672bf6962ae 100644 --- a/clients/client-gamelift/src/protocols/Aws_json1_1.ts +++ b/clients/client-gamelift/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,7 +13,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -302,11 +304,9 @@ import { import { GameLiftServiceException as __BaseException } from "../models/GameLiftServiceException"; import { AcceptMatchInput, - AcceptMatchOutput, Alias, AnywhereConfiguration, AttributeValue, - AwsCredentials, Build, CertificateConfiguration, ClaimGameServerInput, @@ -319,16 +319,13 @@ import { CreateBuildOutput, CreateFleetInput, CreateFleetLocationsInput, - CreateFleetLocationsOutput, CreateFleetOutput, CreateGameServerGroupInput, CreateGameServerGroupOutput, CreateGameSessionInput, CreateGameSessionOutput, CreateGameSessionQueueInput, - CreateGameSessionQueueOutput, CreateLocationInput, - CreateLocationOutput, CreateMatchmakingConfigurationInput, CreateMatchmakingConfigurationOutput, CreateMatchmakingRuleSetInput, @@ -342,30 +339,21 @@ import { CreateVpcPeeringAuthorizationInput, CreateVpcPeeringAuthorizationOutput, CreateVpcPeeringConnectionInput, - CreateVpcPeeringConnectionOutput, DeleteAliasInput, DeleteBuildInput, DeleteFleetInput, DeleteFleetLocationsInput, - DeleteFleetLocationsOutput, DeleteGameServerGroupInput, DeleteGameServerGroupOutput, DeleteGameSessionQueueInput, - DeleteGameSessionQueueOutput, DeleteLocationInput, - DeleteLocationOutput, DeleteMatchmakingConfigurationInput, - DeleteMatchmakingConfigurationOutput, DeleteMatchmakingRuleSetInput, - DeleteMatchmakingRuleSetOutput, DeleteScalingPolicyInput, DeleteScriptInput, DeleteVpcPeeringAuthorizationInput, - DeleteVpcPeeringAuthorizationOutput, DeleteVpcPeeringConnectionInput, - DeleteVpcPeeringConnectionOutput, DeregisterComputeInput, - DeregisterComputeOutput, DeregisterGameServerInput, DescribeAliasInput, DescribeAliasOutput, @@ -374,35 +362,26 @@ import { DescribeComputeInput, DescribeComputeOutput, DescribeEC2InstanceLimitsInput, - DescribeEC2InstanceLimitsOutput, DescribeFleetAttributesInput, DescribeFleetAttributesOutput, DescribeFleetCapacityInput, - DescribeFleetCapacityOutput, DescribeFleetEventsInput, DescribeFleetEventsOutput, DescribeFleetLocationAttributesInput, - DescribeFleetLocationAttributesOutput, DescribeFleetLocationCapacityInput, - DescribeFleetLocationCapacityOutput, DescribeFleetLocationUtilizationInput, - DescribeFleetLocationUtilizationOutput, DescribeFleetPortSettingsInput, - DescribeFleetPortSettingsOutput, DescribeFleetUtilizationInput, - DescribeFleetUtilizationOutput, DescribeGameServerGroupInput, DescribeGameServerGroupOutput, DescribeGameServerInput, DescribeGameServerInstancesInput, - DescribeGameServerInstancesOutput, DescribeGameServerOutput, DescribeGameSessionDetailsInput, DescribeGameSessionDetailsOutput, DescribeGameSessionPlacementInput, DescribeGameSessionPlacementOutput, DescribeGameSessionQueuesInput, - DescribeGameSessionQueuesOutput, DescribeGameSessionsInput, DescribeGameSessionsOutput, DescribeInstancesInput, @@ -416,7 +395,6 @@ import { DescribePlayerSessionsInput, DescribePlayerSessionsOutput, DescribeRuntimeConfigurationInput, - DescribeRuntimeConfigurationOutput, DescribeScalingPoliciesInput, DescribeScalingPoliciesOutput, DescribeScriptInput, @@ -424,42 +402,29 @@ import { DescribeVpcPeeringAuthorizationsInput, DescribeVpcPeeringAuthorizationsOutput, DescribeVpcPeeringConnectionsInput, - DescribeVpcPeeringConnectionsOutput, DesiredPlayerSession, - EC2InstanceCounts, - EC2InstanceLimit, Event, FilterConfiguration, FleetAction, FleetAttributes, - FleetCapacity, FleetCapacityExceededException, - FleetUtilization, GameProperty, GameServer, GameServerGroup, GameServerGroupAction, GameServerGroupAutoScalingPolicy, - GameServerInstance, GameSession, - GameSessionConnectionInfo, GameSessionDetail, GameSessionFullException, GameSessionPlacement, - GameSessionQueue, GameSessionQueueDestination, GetComputeAccessInput, - GetComputeAccessOutput, GetComputeAuthTokenInput, GetComputeAuthTokenOutput, GetGameSessionLogUrlInput, - GetGameSessionLogUrlOutput, GetInstanceAccessInput, - GetInstanceAccessOutput, IdempotentParameterMismatchException, Instance, - InstanceAccess, - InstanceCredentials, InstanceDefinition, InternalServiceException, InvalidFleetStatusException, @@ -475,29 +440,21 @@ import { ListComputeInput, ListComputeOutput, ListFleetsInput, - ListFleetsOutput, ListGameServerGroupsInput, ListGameServerGroupsOutput, ListGameServersInput, ListGameServersOutput, ListLocationsInput, - ListLocationsOutput, ListScriptsInput, ListScriptsOutput, ListTagsForResourceRequest, - ListTagsForResourceResponse, - LocationAttributes, LocationConfiguration, LocationFilter, - LocationModel, - LocationState, - MatchedPlayerSession, MatchmakingConfiguration, MatchmakingRuleSet, MatchmakingTicket, NotFoundException, OutOfCapacityException, - PlacedPlayerSession, Player, PlayerLatency, PlayerLatencyPolicy, @@ -505,15 +462,12 @@ import { PriorityConfiguration, PriorityType, PutScalingPolicyInput, - PutScalingPolicyOutput, RegisterComputeInput, RegisterComputeOutput, RegisterGameServerInput, RegisterGameServerOutput, RequestUploadCredentialsInput, - RequestUploadCredentialsOutput, ResolveAliasInput, - ResolveAliasOutput, ResourceCreationLimitPolicy, ResumeGameServerGroupInput, ResumeGameServerGroupOutput, @@ -526,7 +480,6 @@ import { SearchGameSessionsOutput, ServerProcess, StartFleetActionsInput, - StartFleetActionsOutput, StartGameSessionPlacementInput, StartGameSessionPlacementOutput, StartMatchBackfillInput, @@ -534,39 +487,30 @@ import { StartMatchmakingInput, StartMatchmakingOutput, StopFleetActionsInput, - StopFleetActionsOutput, StopGameSessionPlacementInput, StopGameSessionPlacementOutput, StopMatchmakingInput, - StopMatchmakingOutput, SuspendGameServerGroupInput, SuspendGameServerGroupOutput, Tag, TaggingFailedException, TagResourceRequest, - TagResourceResponse, TargetConfiguration, TargetTrackingConfiguration, TerminalRoutingStrategyException, UnauthorizedException, UnsupportedRegionException, UntagResourceRequest, - UntagResourceResponse, UpdateAliasInput, UpdateAliasOutput, UpdateBuildInput, UpdateBuildOutput, UpdateFleetAttributesInput, - UpdateFleetAttributesOutput, UpdateFleetCapacityInput, - UpdateFleetCapacityOutput, UpdateFleetPortSettingsInput, VpcPeeringAuthorization, - VpcPeeringConnection, - VpcPeeringConnectionStatus, } from "../models/models_0"; import { - UpdateFleetPortSettingsOutput, UpdateGameServerGroupInput, UpdateGameServerGroupOutput, UpdateGameServerInput, @@ -574,15 +518,12 @@ import { UpdateGameSessionInput, UpdateGameSessionOutput, UpdateGameSessionQueueInput, - UpdateGameSessionQueueOutput, UpdateMatchmakingConfigurationInput, UpdateMatchmakingConfigurationOutput, UpdateRuntimeConfigurationInput, - UpdateRuntimeConfigurationOutput, UpdateScriptInput, UpdateScriptOutput, ValidateMatchmakingRuleSetInput, - ValidateMatchmakingRuleSetOutput, } from "../models/models_1"; /** @@ -594,7 +535,7 @@ export const se_AcceptMatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptMatch"); let body: any; - body = JSON.stringify(se_AcceptMatchInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +548,7 @@ export const se_ClaimGameServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ClaimGameServer"); let body: any; - body = JSON.stringify(se_ClaimGameServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +561,7 @@ export const se_CreateAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAlias"); let body: any; - body = JSON.stringify(se_CreateAliasInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -633,7 +574,7 @@ export const se_CreateBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBuild"); let body: any; - body = JSON.stringify(se_CreateBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +587,7 @@ export const se_CreateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFleet"); let body: any; - body = JSON.stringify(se_CreateFleetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +600,7 @@ export const se_CreateFleetLocationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFleetLocations"); let body: any; - body = JSON.stringify(se_CreateFleetLocationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +626,7 @@ export const se_CreateGameSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGameSession"); let body: any; - body = JSON.stringify(se_CreateGameSessionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +639,7 @@ export const se_CreateGameSessionQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGameSessionQueue"); let body: any; - body = JSON.stringify(se_CreateGameSessionQueueInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +652,7 @@ export const se_CreateLocationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLocation"); let body: any; - body = JSON.stringify(se_CreateLocationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +665,7 @@ export const se_CreateMatchmakingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMatchmakingConfiguration"); let body: any; - body = JSON.stringify(se_CreateMatchmakingConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -737,7 +678,7 @@ export const se_CreateMatchmakingRuleSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMatchmakingRuleSet"); let body: any; - body = JSON.stringify(se_CreateMatchmakingRuleSetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +691,7 @@ export const se_CreatePlayerSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePlayerSession"); let body: any; - body = JSON.stringify(se_CreatePlayerSessionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -763,7 +704,7 @@ export const se_CreatePlayerSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePlayerSessions"); let body: any; - body = JSON.stringify(se_CreatePlayerSessionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +730,7 @@ export const se_CreateVpcPeeringAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVpcPeeringAuthorization"); let body: any; - body = JSON.stringify(se_CreateVpcPeeringAuthorizationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +743,7 @@ export const se_CreateVpcPeeringConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVpcPeeringConnection"); let body: any; - body = JSON.stringify(se_CreateVpcPeeringConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -815,7 +756,7 @@ export const se_DeleteAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAlias"); let body: any; - body = JSON.stringify(se_DeleteAliasInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -828,7 +769,7 @@ export const se_DeleteBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBuild"); let body: any; - body = JSON.stringify(se_DeleteBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -841,7 +782,7 @@ export const se_DeleteFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFleet"); let body: any; - body = JSON.stringify(se_DeleteFleetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -854,7 +795,7 @@ export const se_DeleteFleetLocationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFleetLocations"); let body: any; - body = JSON.stringify(se_DeleteFleetLocationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -867,7 +808,7 @@ export const se_DeleteGameServerGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGameServerGroup"); let body: any; - body = JSON.stringify(se_DeleteGameServerGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -880,7 +821,7 @@ export const se_DeleteGameSessionQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGameSessionQueue"); let body: any; - body = JSON.stringify(se_DeleteGameSessionQueueInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -893,7 +834,7 @@ export const se_DeleteLocationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLocation"); let body: any; - body = JSON.stringify(se_DeleteLocationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -906,7 +847,7 @@ export const se_DeleteMatchmakingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMatchmakingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteMatchmakingConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -919,7 +860,7 @@ export const se_DeleteMatchmakingRuleSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMatchmakingRuleSet"); let body: any; - body = JSON.stringify(se_DeleteMatchmakingRuleSetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -932,7 +873,7 @@ export const se_DeleteScalingPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteScalingPolicy"); let body: any; - body = JSON.stringify(se_DeleteScalingPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -945,7 +886,7 @@ export const se_DeleteScriptCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteScript"); let body: any; - body = JSON.stringify(se_DeleteScriptInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -958,7 +899,7 @@ export const se_DeleteVpcPeeringAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVpcPeeringAuthorization"); let body: any; - body = JSON.stringify(se_DeleteVpcPeeringAuthorizationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +912,7 @@ export const se_DeleteVpcPeeringConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVpcPeeringConnection"); let body: any; - body = JSON.stringify(se_DeleteVpcPeeringConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +925,7 @@ export const se_DeregisterComputeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterCompute"); let body: any; - body = JSON.stringify(se_DeregisterComputeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -997,7 +938,7 @@ export const se_DeregisterGameServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterGameServer"); let body: any; - body = JSON.stringify(se_DeregisterGameServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1010,7 +951,7 @@ export const se_DescribeAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAlias"); let body: any; - body = JSON.stringify(se_DescribeAliasInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1023,7 +964,7 @@ export const se_DescribeBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBuild"); let body: any; - body = JSON.stringify(se_DescribeBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1036,7 +977,7 @@ export const se_DescribeComputeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCompute"); let body: any; - body = JSON.stringify(se_DescribeComputeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1049,7 +990,7 @@ export const se_DescribeEC2InstanceLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEC2InstanceLimits"); let body: any; - body = JSON.stringify(se_DescribeEC2InstanceLimitsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1062,7 +1003,7 @@ export const se_DescribeFleetAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetAttributes"); let body: any; - body = JSON.stringify(se_DescribeFleetAttributesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1075,7 +1016,7 @@ export const se_DescribeFleetCapacityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetCapacity"); let body: any; - body = JSON.stringify(se_DescribeFleetCapacityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1101,7 +1042,7 @@ export const se_DescribeFleetLocationAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetLocationAttributes"); let body: any; - body = JSON.stringify(se_DescribeFleetLocationAttributesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1114,7 +1055,7 @@ export const se_DescribeFleetLocationCapacityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetLocationCapacity"); let body: any; - body = JSON.stringify(se_DescribeFleetLocationCapacityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1127,7 +1068,7 @@ export const se_DescribeFleetLocationUtilizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetLocationUtilization"); let body: any; - body = JSON.stringify(se_DescribeFleetLocationUtilizationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1140,7 +1081,7 @@ export const se_DescribeFleetPortSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetPortSettings"); let body: any; - body = JSON.stringify(se_DescribeFleetPortSettingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1153,7 +1094,7 @@ export const se_DescribeFleetUtilizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFleetUtilization"); let body: any; - body = JSON.stringify(se_DescribeFleetUtilizationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1166,7 +1107,7 @@ export const se_DescribeGameServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameServer"); let body: any; - body = JSON.stringify(se_DescribeGameServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1179,7 +1120,7 @@ export const se_DescribeGameServerGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameServerGroup"); let body: any; - body = JSON.stringify(se_DescribeGameServerGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1192,7 +1133,7 @@ export const se_DescribeGameServerInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameServerInstances"); let body: any; - body = JSON.stringify(se_DescribeGameServerInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1205,7 +1146,7 @@ export const se_DescribeGameSessionDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameSessionDetails"); let body: any; - body = JSON.stringify(se_DescribeGameSessionDetailsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1218,7 +1159,7 @@ export const se_DescribeGameSessionPlacementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameSessionPlacement"); let body: any; - body = JSON.stringify(se_DescribeGameSessionPlacementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1231,7 +1172,7 @@ export const se_DescribeGameSessionQueuesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameSessionQueues"); let body: any; - body = JSON.stringify(se_DescribeGameSessionQueuesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1244,7 +1185,7 @@ export const se_DescribeGameSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGameSessions"); let body: any; - body = JSON.stringify(se_DescribeGameSessionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1257,7 +1198,7 @@ export const se_DescribeInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstances"); let body: any; - body = JSON.stringify(se_DescribeInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1270,7 +1211,7 @@ export const se_DescribeMatchmakingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMatchmaking"); let body: any; - body = JSON.stringify(se_DescribeMatchmakingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1283,7 +1224,7 @@ export const se_DescribeMatchmakingConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMatchmakingConfigurations"); let body: any; - body = JSON.stringify(se_DescribeMatchmakingConfigurationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1296,7 +1237,7 @@ export const se_DescribeMatchmakingRuleSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMatchmakingRuleSets"); let body: any; - body = JSON.stringify(se_DescribeMatchmakingRuleSetsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1309,7 +1250,7 @@ export const se_DescribePlayerSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePlayerSessions"); let body: any; - body = JSON.stringify(se_DescribePlayerSessionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1322,7 +1263,7 @@ export const se_DescribeRuntimeConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRuntimeConfiguration"); let body: any; - body = JSON.stringify(se_DescribeRuntimeConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1335,7 +1276,7 @@ export const se_DescribeScalingPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScalingPolicies"); let body: any; - body = JSON.stringify(se_DescribeScalingPoliciesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1348,7 +1289,7 @@ export const se_DescribeScriptCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScript"); let body: any; - body = JSON.stringify(se_DescribeScriptInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1361,7 +1302,7 @@ export const se_DescribeVpcPeeringAuthorizationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVpcPeeringAuthorizations"); let body: any; - body = JSON.stringify(se_DescribeVpcPeeringAuthorizationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1374,7 +1315,7 @@ export const se_DescribeVpcPeeringConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVpcPeeringConnections"); let body: any; - body = JSON.stringify(se_DescribeVpcPeeringConnectionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1387,7 +1328,7 @@ export const se_GetComputeAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComputeAccess"); let body: any; - body = JSON.stringify(se_GetComputeAccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1400,7 +1341,7 @@ export const se_GetComputeAuthTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComputeAuthToken"); let body: any; - body = JSON.stringify(se_GetComputeAuthTokenInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1413,7 +1354,7 @@ export const se_GetGameSessionLogUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGameSessionLogUrl"); let body: any; - body = JSON.stringify(se_GetGameSessionLogUrlInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1426,7 +1367,7 @@ export const se_GetInstanceAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstanceAccess"); let body: any; - body = JSON.stringify(se_GetInstanceAccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1439,7 +1380,7 @@ export const se_ListAliasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAliases"); let body: any; - body = JSON.stringify(se_ListAliasesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1452,7 +1393,7 @@ export const se_ListBuildsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBuilds"); let body: any; - body = JSON.stringify(se_ListBuildsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1465,7 +1406,7 @@ export const se_ListComputeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCompute"); let body: any; - body = JSON.stringify(se_ListComputeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1478,7 +1419,7 @@ export const se_ListFleetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFleets"); let body: any; - body = JSON.stringify(se_ListFleetsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1491,7 +1432,7 @@ export const se_ListGameServerGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGameServerGroups"); let body: any; - body = JSON.stringify(se_ListGameServerGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1504,7 +1445,7 @@ export const se_ListGameServersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGameServers"); let body: any; - body = JSON.stringify(se_ListGameServersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1517,7 +1458,7 @@ export const se_ListLocationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLocations"); let body: any; - body = JSON.stringify(se_ListLocationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1530,7 +1471,7 @@ export const se_ListScriptsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListScripts"); let body: any; - body = JSON.stringify(se_ListScriptsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1543,7 +1484,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1569,7 +1510,7 @@ export const se_RegisterComputeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterCompute"); let body: any; - body = JSON.stringify(se_RegisterComputeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1582,7 +1523,7 @@ export const se_RegisterGameServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterGameServer"); let body: any; - body = JSON.stringify(se_RegisterGameServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1595,7 +1536,7 @@ export const se_RequestUploadCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RequestUploadCredentials"); let body: any; - body = JSON.stringify(se_RequestUploadCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1608,7 +1549,7 @@ export const se_ResolveAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResolveAlias"); let body: any; - body = JSON.stringify(se_ResolveAliasInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1621,7 +1562,7 @@ export const se_ResumeGameServerGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResumeGameServerGroup"); let body: any; - body = JSON.stringify(se_ResumeGameServerGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1634,7 +1575,7 @@ export const se_SearchGameSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchGameSessions"); let body: any; - body = JSON.stringify(se_SearchGameSessionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1647,7 +1588,7 @@ export const se_StartFleetActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartFleetActions"); let body: any; - body = JSON.stringify(se_StartFleetActionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1699,7 +1640,7 @@ export const se_StopFleetActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopFleetActions"); let body: any; - body = JSON.stringify(se_StopFleetActionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1712,7 +1653,7 @@ export const se_StopGameSessionPlacementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopGameSessionPlacement"); let body: any; - body = JSON.stringify(se_StopGameSessionPlacementInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1725,7 +1666,7 @@ export const se_StopMatchmakingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopMatchmaking"); let body: any; - body = JSON.stringify(se_StopMatchmakingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1738,7 +1679,7 @@ export const se_SuspendGameServerGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SuspendGameServerGroup"); let body: any; - body = JSON.stringify(se_SuspendGameServerGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1751,7 +1692,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1764,7 +1705,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1777,7 +1718,7 @@ export const se_UpdateAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAlias"); let body: any; - body = JSON.stringify(se_UpdateAliasInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1790,7 +1731,7 @@ export const se_UpdateBuildCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBuild"); let body: any; - body = JSON.stringify(se_UpdateBuildInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1803,7 +1744,7 @@ export const se_UpdateFleetAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFleetAttributes"); let body: any; - body = JSON.stringify(se_UpdateFleetAttributesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1816,7 +1757,7 @@ export const se_UpdateFleetCapacityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFleetCapacity"); let body: any; - body = JSON.stringify(se_UpdateFleetCapacityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1829,7 +1770,7 @@ export const se_UpdateFleetPortSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFleetPortSettings"); let body: any; - body = JSON.stringify(se_UpdateFleetPortSettingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1842,7 +1783,7 @@ export const se_UpdateGameServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGameServer"); let body: any; - body = JSON.stringify(se_UpdateGameServerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1855,7 +1796,7 @@ export const se_UpdateGameServerGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGameServerGroup"); let body: any; - body = JSON.stringify(se_UpdateGameServerGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1868,7 +1809,7 @@ export const se_UpdateGameSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGameSession"); let body: any; - body = JSON.stringify(se_UpdateGameSessionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1881,7 +1822,7 @@ export const se_UpdateGameSessionQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGameSessionQueue"); let body: any; - body = JSON.stringify(se_UpdateGameSessionQueueInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1894,7 +1835,7 @@ export const se_UpdateMatchmakingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMatchmakingConfiguration"); let body: any; - body = JSON.stringify(se_UpdateMatchmakingConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1907,7 +1848,7 @@ export const se_UpdateRuntimeConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRuntimeConfiguration"); let body: any; - body = JSON.stringify(se_UpdateRuntimeConfigurationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1933,7 +1874,7 @@ export const se_ValidateMatchmakingRuleSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ValidateMatchmakingRuleSet"); let body: any; - body = JSON.stringify(se_ValidateMatchmakingRuleSetInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1949,12 +1890,12 @@ export const de_AcceptMatchCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptMatchOutput(data, context); + contents = _json(data); const response: AcceptMatchCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1984,10 +1925,9 @@ const de_AcceptMatchCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,7 +1950,7 @@ export const de_ClaimGameServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2046,10 +1986,9 @@ const de_ClaimGameServerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2072,7 +2011,7 @@ export const de_CreateAliasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2108,10 +2047,9 @@ const de_CreateAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2134,7 +2072,7 @@ export const de_CreateBuildCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2167,10 +2105,9 @@ const de_CreateBuildCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2193,7 +2130,7 @@ export const de_CreateFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2235,10 +2172,9 @@ const de_CreateFleetCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2256,12 +2192,12 @@ export const de_CreateFleetLocationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFleetLocationsOutput(data, context); + contents = _json(data); const response: CreateFleetLocationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2300,10 +2236,9 @@ const de_CreateFleetLocationsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2326,7 +2261,7 @@ export const de_CreateGameServerGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2359,10 +2294,9 @@ const de_CreateGameServerGroupCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2385,7 +2319,7 @@ export const de_CreateGameSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2436,10 +2370,9 @@ const de_CreateGameSessionCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2457,12 +2390,12 @@ export const de_CreateGameSessionQueueCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGameSessionQueueOutput(data, context); + contents = _json(data); const response: CreateGameSessionQueueCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2498,10 +2431,9 @@ const de_CreateGameSessionQueueCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,12 +2451,12 @@ export const de_CreateLocationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLocationOutput(data, context); + contents = _json(data); const response: CreateLocationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2560,10 +2492,9 @@ const de_CreateLocationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2586,7 +2517,7 @@ export const de_CreateMatchmakingConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2622,10 +2553,9 @@ const de_CreateMatchmakingConfigurationCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2648,7 +2578,7 @@ export const de_CreateMatchmakingRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2681,10 +2611,9 @@ const de_CreateMatchmakingRuleSetCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2707,7 +2636,7 @@ export const de_CreatePlayerSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2746,10 +2675,9 @@ const de_CreatePlayerSessionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2772,7 +2700,7 @@ export const de_CreatePlayerSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2811,10 +2739,9 @@ const de_CreatePlayerSessionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2837,7 +2764,7 @@ export const de_CreateScriptCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2870,10 +2797,9 @@ const de_CreateScriptCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2896,7 +2822,7 @@ export const de_CreateVpcPeeringAuthorizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2926,10 +2852,9 @@ const de_CreateVpcPeeringAuthorizationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2947,12 +2872,12 @@ export const de_CreateVpcPeeringConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateVpcPeeringConnectionOutput(data, context); + contents = _json(data); const response: CreateVpcPeeringConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2982,10 +2907,9 @@ const de_CreateVpcPeeringConnectionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3005,7 +2929,7 @@ export const de_DeleteAliasCommand = async ( const response: DeleteAliasCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3038,10 +2962,9 @@ const de_DeleteAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3061,7 +2984,7 @@ export const de_DeleteBuildCommand = async ( const response: DeleteBuildCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3094,10 +3017,9 @@ const de_DeleteBuildCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3117,7 +3039,7 @@ export const de_DeleteFleetCommand = async ( const response: DeleteFleetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3153,10 +3075,9 @@ const de_DeleteFleetCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3174,12 +3095,12 @@ export const de_DeleteFleetLocationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFleetLocationsOutput(data, context); + contents = _json(data); const response: DeleteFleetLocationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3212,10 +3133,9 @@ const de_DeleteFleetLocationsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3238,7 +3158,7 @@ export const de_DeleteGameServerGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3268,10 +3188,9 @@ const de_DeleteGameServerGroupCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3289,12 +3208,12 @@ export const de_DeleteGameSessionQueueCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGameSessionQueueOutput(data, context); + contents = _json(data); const response: DeleteGameSessionQueueCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3327,10 +3246,9 @@ const de_DeleteGameSessionQueueCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3348,12 +3266,12 @@ export const de_DeleteLocationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLocationOutput(data, context); + contents = _json(data); const response: DeleteLocationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3383,10 +3301,9 @@ const de_DeleteLocationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3404,12 +3321,12 @@ export const de_DeleteMatchmakingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMatchmakingConfigurationOutput(data, context); + contents = _json(data); const response: DeleteMatchmakingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3442,10 +3359,9 @@ const de_DeleteMatchmakingConfigurationCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3463,12 +3379,12 @@ export const de_DeleteMatchmakingRuleSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMatchmakingRuleSetOutput(data, context); + contents = _json(data); const response: DeleteMatchmakingRuleSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3501,10 +3417,9 @@ const de_DeleteMatchmakingRuleSetCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3524,7 +3439,7 @@ export const de_DeleteScalingPolicyCommand = async ( const response: DeleteScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3554,10 +3469,9 @@ const de_DeleteScalingPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3577,7 +3491,7 @@ export const de_DeleteScriptCommand = async ( const response: DeleteScriptCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3610,10 +3524,9 @@ const de_DeleteScriptCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3631,12 +3544,12 @@ export const de_DeleteVpcPeeringAuthorizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVpcPeeringAuthorizationOutput(data, context); + contents = _json(data); const response: DeleteVpcPeeringAuthorizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3666,10 +3579,9 @@ const de_DeleteVpcPeeringAuthorizationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3687,12 +3599,12 @@ export const de_DeleteVpcPeeringConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVpcPeeringConnectionOutput(data, context); + contents = _json(data); const response: DeleteVpcPeeringConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3722,10 +3634,9 @@ const de_DeleteVpcPeeringConnectionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3743,12 +3654,12 @@ export const de_DeregisterComputeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterComputeOutput(data, context); + contents = _json(data); const response: DeregisterComputeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3778,10 +3689,9 @@ const de_DeregisterComputeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3801,7 +3711,7 @@ export const de_DeregisterGameServerCommand = async ( const response: DeregisterGameServerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3831,10 +3741,9 @@ const de_DeregisterGameServerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3857,7 +3766,7 @@ export const de_DescribeAliasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3887,10 +3796,9 @@ const de_DescribeAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3913,7 +3821,7 @@ export const de_DescribeBuildCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3943,10 +3851,9 @@ const de_DescribeBuildCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3969,7 +3876,7 @@ export const de_DescribeComputeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3999,10 +3906,9 @@ const de_DescribeComputeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4020,12 +3926,12 @@ export const de_DescribeEC2InstanceLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEC2InstanceLimitsOutput(data, context); + contents = _json(data); const response: DescribeEC2InstanceLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4055,10 +3961,9 @@ const de_DescribeEC2InstanceLimitsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4081,7 +3986,7 @@ export const de_DescribeFleetAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4111,10 +4016,9 @@ const de_DescribeFleetAttributesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4132,12 +4036,12 @@ export const de_DescribeFleetCapacityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetCapacityOutput(data, context); + contents = _json(data); const response: DescribeFleetCapacityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4167,10 +4071,9 @@ const de_DescribeFleetCapacityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4193,7 +4096,7 @@ export const de_DescribeFleetEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4223,10 +4126,9 @@ const de_DescribeFleetEventsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4244,12 +4146,12 @@ export const de_DescribeFleetLocationAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetLocationAttributesOutput(data, context); + contents = _json(data); const response: DescribeFleetLocationAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4282,10 +4184,9 @@ const de_DescribeFleetLocationAttributesCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4303,12 +4204,12 @@ export const de_DescribeFleetLocationCapacityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetLocationCapacityOutput(data, context); + contents = _json(data); const response: DescribeFleetLocationCapacityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4341,10 +4242,9 @@ const de_DescribeFleetLocationCapacityCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4362,12 +4262,12 @@ export const de_DescribeFleetLocationUtilizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetLocationUtilizationOutput(data, context); + contents = _json(data); const response: DescribeFleetLocationUtilizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4400,10 +4300,9 @@ const de_DescribeFleetLocationUtilizationCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4421,12 +4320,12 @@ export const de_DescribeFleetPortSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetPortSettingsOutput(data, context); + contents = _json(data); const response: DescribeFleetPortSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4459,10 +4358,9 @@ const de_DescribeFleetPortSettingsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4480,12 +4378,12 @@ export const de_DescribeFleetUtilizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFleetUtilizationOutput(data, context); + contents = _json(data); const response: DescribeFleetUtilizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4515,10 +4413,9 @@ const de_DescribeFleetUtilizationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4541,7 +4438,7 @@ export const de_DescribeGameServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4571,10 +4468,9 @@ const de_DescribeGameServerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4597,7 +4493,7 @@ export const de_DescribeGameServerGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4627,10 +4523,9 @@ const de_DescribeGameServerGroupCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4648,12 +4543,12 @@ export const de_DescribeGameServerInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeGameServerInstancesOutput(data, context); + contents = _json(data); const response: DescribeGameServerInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4683,10 +4578,9 @@ const de_DescribeGameServerInstancesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4709,7 +4603,7 @@ export const de_DescribeGameSessionDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4745,10 +4639,9 @@ const de_DescribeGameSessionDetailsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4771,7 +4664,7 @@ export const de_DescribeGameSessionPlacementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4801,10 +4694,9 @@ const de_DescribeGameSessionPlacementCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4822,12 +4714,12 @@ export const de_DescribeGameSessionQueuesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeGameSessionQueuesOutput(data, context); + contents = _json(data); const response: DescribeGameSessionQueuesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4857,10 +4749,9 @@ const de_DescribeGameSessionQueuesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4883,7 +4774,7 @@ export const de_DescribeGameSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4919,10 +4810,9 @@ const de_DescribeGameSessionsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4945,7 +4835,7 @@ export const de_DescribeInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4978,10 +4868,9 @@ const de_DescribeInstancesCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5004,7 +4893,7 @@ export const de_DescribeMatchmakingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5031,10 +4920,9 @@ const de_DescribeMatchmakingCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5057,7 +4945,7 @@ export const de_DescribeMatchmakingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5084,10 +4972,9 @@ const de_DescribeMatchmakingConfigurationsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5110,7 +4997,7 @@ export const de_DescribeMatchmakingRuleSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5140,10 +5027,9 @@ const de_DescribeMatchmakingRuleSetsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5166,7 +5052,7 @@ export const de_DescribePlayerSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5196,10 +5082,9 @@ const de_DescribePlayerSessionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5217,12 +5102,12 @@ export const de_DescribeRuntimeConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRuntimeConfigurationOutput(data, context); + contents = _json(data); const response: DescribeRuntimeConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5252,10 +5137,9 @@ const de_DescribeRuntimeConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5278,7 +5162,7 @@ export const de_DescribeScalingPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5311,10 +5195,9 @@ const de_DescribeScalingPoliciesCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5337,7 +5220,7 @@ export const de_DescribeScriptCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5367,10 +5250,9 @@ const de_DescribeScriptCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5393,7 +5275,7 @@ export const de_DescribeVpcPeeringAuthorizationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5420,10 +5302,9 @@ const de_DescribeVpcPeeringAuthorizationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5441,12 +5322,12 @@ export const de_DescribeVpcPeeringConnectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeVpcPeeringConnectionsOutput(data, context); + contents = _json(data); const response: DescribeVpcPeeringConnectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5476,10 +5357,9 @@ const de_DescribeVpcPeeringConnectionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5497,12 +5377,12 @@ export const de_GetComputeAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetComputeAccessOutput(data, context); + contents = _json(data); const response: GetComputeAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5532,10 +5412,9 @@ const de_GetComputeAccessCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5558,7 +5437,7 @@ export const de_GetComputeAuthTokenCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5588,10 +5467,9 @@ const de_GetComputeAuthTokenCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5609,12 +5487,12 @@ export const de_GetGameSessionLogUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGameSessionLogUrlOutput(data, context); + contents = _json(data); const response: GetGameSessionLogUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5644,10 +5522,9 @@ const de_GetGameSessionLogUrlCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5665,12 +5542,12 @@ export const de_GetInstanceAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInstanceAccessOutput(data, context); + contents = _json(data); const response: GetInstanceAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5700,10 +5577,9 @@ const de_GetInstanceAccessCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5726,7 +5602,7 @@ export const de_ListAliasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5753,10 +5629,9 @@ const de_ListAliasesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5779,7 +5654,7 @@ export const de_ListBuildsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5806,10 +5681,9 @@ const de_ListBuildsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5832,7 +5706,7 @@ export const de_ListComputeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5859,10 +5733,9 @@ const de_ListComputeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5880,12 +5753,12 @@ export const de_ListFleetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFleetsOutput(data, context); + contents = _json(data); const response: ListFleetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5915,10 +5788,9 @@ const de_ListFleetsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5941,7 +5813,7 @@ export const de_ListGameServerGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5968,10 +5840,9 @@ const de_ListGameServerGroupsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5994,7 +5865,7 @@ export const de_ListGameServersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6021,10 +5892,9 @@ const de_ListGameServersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6042,12 +5912,12 @@ export const de_ListLocationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLocationsOutput(data, context); + contents = _json(data); const response: ListLocationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6074,10 +5944,9 @@ const de_ListLocationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6100,7 +5969,7 @@ export const de_ListScriptsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6127,10 +5996,9 @@ const de_ListScriptsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6148,12 +6016,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6183,10 +6051,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TaggingFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6204,12 +6071,12 @@ export const de_PutScalingPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutScalingPolicyOutput(data, context); + contents = _json(data); const response: PutScalingPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6239,10 +6106,9 @@ const de_PutScalingPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6265,7 +6131,7 @@ export const de_RegisterComputeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6295,10 +6161,9 @@ const de_RegisterComputeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6321,7 +6186,7 @@ export const de_RegisterGameServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6354,10 +6219,9 @@ const de_RegisterGameServerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6375,12 +6239,12 @@ export const de_RequestUploadCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RequestUploadCredentialsOutput(data, context); + contents = _json(data); const response: RequestUploadCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6410,10 +6274,9 @@ const de_RequestUploadCredentialsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6431,12 +6294,12 @@ export const de_ResolveAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResolveAliasOutput(data, context); + contents = _json(data); const response: ResolveAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6469,10 +6332,9 @@ const de_ResolveAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6495,7 +6357,7 @@ export const de_ResumeGameServerGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6525,10 +6387,9 @@ const de_ResumeGameServerGroupCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6551,7 +6412,7 @@ export const de_SearchGameSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6587,10 +6448,9 @@ const de_SearchGameSessionsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6608,12 +6468,12 @@ export const de_StartFleetActionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFleetActionsOutput(data, context); + contents = _json(data); const response: StartFleetActionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6646,10 +6506,9 @@ const de_StartFleetActionsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6672,7 +6531,7 @@ export const de_StartGameSessionPlacementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6702,10 +6561,9 @@ const de_StartGameSessionPlacementCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6728,7 +6586,7 @@ export const de_StartMatchBackfillCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6758,10 +6616,9 @@ const de_StartMatchBackfillCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6784,7 +6641,7 @@ export const de_StartMatchmakingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6814,10 +6671,9 @@ const de_StartMatchmakingCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6835,12 +6691,12 @@ export const de_StopFleetActionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopFleetActionsOutput(data, context); + contents = _json(data); const response: StopFleetActionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6873,10 +6729,9 @@ const de_StopFleetActionsCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6899,7 +6754,7 @@ export const de_StopGameSessionPlacementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6929,10 +6784,9 @@ const de_StopGameSessionPlacementCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6950,12 +6804,12 @@ export const de_StopMatchmakingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopMatchmakingOutput(data, context); + contents = _json(data); const response: StopMatchmakingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6985,10 +6839,9 @@ const de_StopMatchmakingCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7011,7 +6864,7 @@ export const de_SuspendGameServerGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7041,10 +6894,9 @@ const de_SuspendGameServerGroupCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7062,12 +6914,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7097,10 +6949,9 @@ const de_TagResourceCommandError = async ( throw await de_TaggingFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7118,12 +6969,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7153,10 +7004,9 @@ const de_UntagResourceCommandError = async ( throw await de_TaggingFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7179,7 +7029,7 @@ export const de_UpdateAliasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7209,10 +7059,9 @@ const de_UpdateAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7235,7 +7084,7 @@ export const de_UpdateBuildCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7265,10 +7114,9 @@ const de_UpdateBuildCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7286,12 +7134,12 @@ export const de_UpdateFleetAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFleetAttributesOutput(data, context); + contents = _json(data); const response: UpdateFleetAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7330,10 +7178,9 @@ const de_UpdateFleetAttributesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7351,12 +7198,12 @@ export const de_UpdateFleetCapacityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFleetCapacityOutput(data, context); + contents = _json(data); const response: UpdateFleetCapacityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7398,10 +7245,9 @@ const de_UpdateFleetCapacityCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7419,12 +7265,12 @@ export const de_UpdateFleetPortSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFleetPortSettingsOutput(data, context); + contents = _json(data); const response: UpdateFleetPortSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7463,10 +7309,9 @@ const de_UpdateFleetPortSettingsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7489,7 +7334,7 @@ export const de_UpdateGameServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7519,10 +7364,9 @@ const de_UpdateGameServerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7545,7 +7389,7 @@ export const de_UpdateGameServerGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7575,10 +7419,9 @@ const de_UpdateGameServerGroupCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7601,7 +7444,7 @@ export const de_UpdateGameSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7637,10 +7480,9 @@ const de_UpdateGameSessionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7658,12 +7500,12 @@ export const de_UpdateGameSessionQueueCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGameSessionQueueOutput(data, context); + contents = _json(data); const response: UpdateGameSessionQueueCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7693,10 +7535,9 @@ const de_UpdateGameSessionQueueCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7719,7 +7560,7 @@ export const de_UpdateMatchmakingConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7749,10 +7590,9 @@ const de_UpdateMatchmakingConfigurationCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7770,12 +7610,12 @@ export const de_UpdateRuntimeConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuntimeConfigurationOutput(data, context); + contents = _json(data); const response: UpdateRuntimeConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7808,10 +7648,9 @@ const de_UpdateRuntimeConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7834,7 +7673,7 @@ export const de_UpdateScriptCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7864,10 +7703,9 @@ const de_UpdateScriptCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7885,12 +7723,12 @@ export const de_ValidateMatchmakingRuleSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ValidateMatchmakingRuleSetOutput(data, context); + contents = _json(data); const response: ValidateMatchmakingRuleSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7917,10 +7755,9 @@ const de_ValidateMatchmakingRuleSetCommandError = async ( throw await de_UnsupportedRegionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7931,7 +7768,7 @@ const de_ValidateMatchmakingRuleSetCommandError = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7947,7 +7784,7 @@ const de_FleetCapacityExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FleetCapacityExceededException(body, context); + const deserialized: any = _json(body); const exception = new FleetCapacityExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7963,7 +7800,7 @@ const de_GameSessionFullExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GameSessionFullException(body, context); + const deserialized: any = _json(body); const exception = new GameSessionFullException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7979,7 +7816,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -7995,7 +7832,7 @@ const de_InternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8011,7 +7848,7 @@ const de_InvalidFleetStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFleetStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFleetStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8027,7 +7864,7 @@ const de_InvalidGameSessionStatusExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGameSessionStatusException(body, context); + const deserialized: any = _json(body); const exception = new InvalidGameSessionStatusException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8043,7 +7880,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8059,7 +7896,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8072,7 +7909,7 @@ const de_LimitExceededExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8088,7 +7925,7 @@ const de_OutOfCapacityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OutOfCapacityException(body, context); + const deserialized: any = _json(body); const exception = new OutOfCapacityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8104,7 +7941,7 @@ const de_TaggingFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TaggingFailedException(body, context); + const deserialized: any = _json(body); const exception = new TaggingFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8120,7 +7957,7 @@ const de_TerminalRoutingStrategyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TerminalRoutingStrategyException(body, context); + const deserialized: any = _json(body); const exception = new TerminalRoutingStrategyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8136,7 +7973,7 @@ const de_UnauthorizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnauthorizedException(body, context); + const deserialized: any = _json(body); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8152,7 +7989,7 @@ const de_UnsupportedRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedRegionException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -8160,1237 +7997,281 @@ const de_UnsupportedRegionExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptMatchInput - */ -const se_AcceptMatchInput = (input: AcceptMatchInput, context: __SerdeContext): any => { - return { - ...(input.AcceptanceType != null && { AcceptanceType: input.AcceptanceType }), - ...(input.PlayerIds != null && { PlayerIds: se_StringList(input.PlayerIds, context) }), - ...(input.TicketId != null && { TicketId: input.TicketId }), - }; -}; +// se_AcceptMatchInput omitted. -/** - * serializeAws_json1_1AnywhereConfiguration - */ -const se_AnywhereConfiguration = (input: AnywhereConfiguration, context: __SerdeContext): any => { - return { - ...(input.Cost != null && { Cost: input.Cost }), - }; -}; +// se_AnywhereConfiguration omitted. /** * serializeAws_json1_1AttributeValue */ const se_AttributeValue = (input: AttributeValue, context: __SerdeContext): any => { - return { - ...(input.N != null && { N: __serializeFloat(input.N) }), - ...(input.S != null && { S: input.S }), - ...(input.SDM != null && { SDM: se_PlayerAttributeStringDoubleMap(input.SDM, context) }), - ...(input.SL != null && { SL: se_PlayerAttributeStringList(input.SL, context) }), - }; + return take(input, { + N: __serializeFloat, + S: [], + SDM: (_) => se_PlayerAttributeStringDoubleMap(_, context), + SL: _json, + }); }; -/** - * serializeAws_json1_1CertificateConfiguration - */ -const se_CertificateConfiguration = (input: CertificateConfiguration, context: __SerdeContext): any => { - return { - ...(input.CertificateType != null && { CertificateType: input.CertificateType }), - }; -}; +// se_CertificateConfiguration omitted. -/** - * serializeAws_json1_1ClaimGameServerInput - */ -const se_ClaimGameServerInput = (input: ClaimGameServerInput, context: __SerdeContext): any => { - return { - ...(input.GameServerData != null && { GameServerData: input.GameServerData }), - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerId != null && { GameServerId: input.GameServerId }), - }; -}; +// se_ClaimGameServerInput omitted. -/** - * serializeAws_json1_1CreateAliasInput - */ -const se_CreateAliasInput = (input: CreateAliasInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoutingStrategy != null && { RoutingStrategy: se_RoutingStrategy(input.RoutingStrategy, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateAliasInput omitted. -/** - * serializeAws_json1_1CreateBuildInput - */ -const se_CreateBuildInput = (input: CreateBuildInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.OperatingSystem != null && { OperatingSystem: input.OperatingSystem }), - ...(input.ServerSdkVersion != null && { ServerSdkVersion: input.ServerSdkVersion }), - ...(input.StorageLocation != null && { StorageLocation: se_S3Location(input.StorageLocation, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_CreateBuildInput omitted. -/** - * serializeAws_json1_1CreateFleetInput - */ -const se_CreateFleetInput = (input: CreateFleetInput, context: __SerdeContext): any => { - return { - ...(input.AnywhereConfiguration != null && { - AnywhereConfiguration: se_AnywhereConfiguration(input.AnywhereConfiguration, context), - }), - ...(input.BuildId != null && { BuildId: input.BuildId }), - ...(input.CertificateConfiguration != null && { - CertificateConfiguration: se_CertificateConfiguration(input.CertificateConfiguration, context), - }), - ...(input.ComputeType != null && { ComputeType: input.ComputeType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EC2InboundPermissions != null && { - EC2InboundPermissions: se_IpPermissionsList(input.EC2InboundPermissions, context), - }), - ...(input.EC2InstanceType != null && { EC2InstanceType: input.EC2InstanceType }), - ...(input.FleetType != null && { FleetType: input.FleetType }), - ...(input.InstanceRoleArn != null && { InstanceRoleArn: input.InstanceRoleArn }), - ...(input.Locations != null && { Locations: se_LocationConfigurationList(input.Locations, context) }), - ...(input.LogPaths != null && { LogPaths: se_StringList(input.LogPaths, context) }), - ...(input.MetricGroups != null && { MetricGroups: se_MetricGroupList(input.MetricGroups, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NewGameSessionProtectionPolicy != null && { - NewGameSessionProtectionPolicy: input.NewGameSessionProtectionPolicy, - }), - ...(input.PeerVpcAwsAccountId != null && { PeerVpcAwsAccountId: input.PeerVpcAwsAccountId }), - ...(input.PeerVpcId != null && { PeerVpcId: input.PeerVpcId }), - ...(input.ResourceCreationLimitPolicy != null && { - ResourceCreationLimitPolicy: se_ResourceCreationLimitPolicy(input.ResourceCreationLimitPolicy, context), - }), - ...(input.RuntimeConfiguration != null && { - RuntimeConfiguration: se_RuntimeConfiguration(input.RuntimeConfiguration, context), - }), - ...(input.ScriptId != null && { ScriptId: input.ScriptId }), - ...(input.ServerLaunchParameters != null && { ServerLaunchParameters: input.ServerLaunchParameters }), - ...(input.ServerLaunchPath != null && { ServerLaunchPath: input.ServerLaunchPath }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateFleetLocationsInput - */ -const se_CreateFleetLocationsInput = (input: CreateFleetLocationsInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Locations != null && { Locations: se_LocationConfigurationList(input.Locations, context) }), - }; -}; +// se_CreateFleetInput omitted. + +// se_CreateFleetLocationsInput omitted. /** * serializeAws_json1_1CreateGameServerGroupInput */ const se_CreateGameServerGroupInput = (input: CreateGameServerGroupInput, context: __SerdeContext): any => { - return { - ...(input.AutoScalingPolicy != null && { - AutoScalingPolicy: se_GameServerGroupAutoScalingPolicy(input.AutoScalingPolicy, context), - }), - ...(input.BalancingStrategy != null && { BalancingStrategy: input.BalancingStrategy }), - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerProtectionPolicy != null && { GameServerProtectionPolicy: input.GameServerProtectionPolicy }), - ...(input.InstanceDefinitions != null && { - InstanceDefinitions: se_InstanceDefinitions(input.InstanceDefinitions, context), - }), - ...(input.LaunchTemplate != null && { - LaunchTemplate: se_LaunchTemplateSpecification(input.LaunchTemplate, context), - }), - ...(input.MaxSize != null && { MaxSize: input.MaxSize }), - ...(input.MinSize != null && { MinSize: input.MinSize }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcSubnets != null && { VpcSubnets: se_VpcSubnets(input.VpcSubnets, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateGameSessionInput - */ -const se_CreateGameSessionInput = (input: CreateGameSessionInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.CreatorId != null && { CreatorId: input.CreatorId }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.GameProperties != null && { GameProperties: se_GamePropertyList(input.GameProperties, context) }), - ...(input.GameSessionData != null && { GameSessionData: input.GameSessionData }), - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.Location != null && { Location: input.Location }), - ...(input.MaximumPlayerSessionCount != null && { MaximumPlayerSessionCount: input.MaximumPlayerSessionCount }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + AutoScalingPolicy: (_) => se_GameServerGroupAutoScalingPolicy(_, context), + BalancingStrategy: [], + GameServerGroupName: [], + GameServerProtectionPolicy: [], + InstanceDefinitions: _json, + LaunchTemplate: _json, + MaxSize: [], + MinSize: [], + RoleArn: [], + Tags: _json, + VpcSubnets: _json, + }); }; -/** - * serializeAws_json1_1CreateGameSessionQueueInput - */ -const se_CreateGameSessionQueueInput = (input: CreateGameSessionQueueInput, context: __SerdeContext): any => { - return { - ...(input.CustomEventData != null && { CustomEventData: input.CustomEventData }), - ...(input.Destinations != null && { - Destinations: se_GameSessionQueueDestinationList(input.Destinations, context), - }), - ...(input.FilterConfiguration != null && { - FilterConfiguration: se_FilterConfiguration(input.FilterConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }), - ...(input.PlayerLatencyPolicies != null && { - PlayerLatencyPolicies: se_PlayerLatencyPolicyList(input.PlayerLatencyPolicies, context), - }), - ...(input.PriorityConfiguration != null && { - PriorityConfiguration: se_PriorityConfiguration(input.PriorityConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TimeoutInSeconds != null && { TimeoutInSeconds: input.TimeoutInSeconds }), - }; -}; - -/** - * serializeAws_json1_1CreateLocationInput - */ -const se_CreateLocationInput = (input: CreateLocationInput, context: __SerdeContext): any => { - return { - ...(input.LocationName != null && { LocationName: input.LocationName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateGameSessionInput omitted. -/** - * serializeAws_json1_1CreateMatchmakingConfigurationInput - */ -const se_CreateMatchmakingConfigurationInput = ( - input: CreateMatchmakingConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptanceRequired != null && { AcceptanceRequired: input.AcceptanceRequired }), - ...(input.AcceptanceTimeoutSeconds != null && { AcceptanceTimeoutSeconds: input.AcceptanceTimeoutSeconds }), - ...(input.AdditionalPlayerCount != null && { AdditionalPlayerCount: input.AdditionalPlayerCount }), - ...(input.BackfillMode != null && { BackfillMode: input.BackfillMode }), - ...(input.CustomEventData != null && { CustomEventData: input.CustomEventData }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FlexMatchMode != null && { FlexMatchMode: input.FlexMatchMode }), - ...(input.GameProperties != null && { GameProperties: se_GamePropertyList(input.GameProperties, context) }), - ...(input.GameSessionData != null && { GameSessionData: input.GameSessionData }), - ...(input.GameSessionQueueArns != null && { - GameSessionQueueArns: se_QueueArnsList(input.GameSessionQueueArns, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }), - ...(input.RequestTimeoutSeconds != null && { RequestTimeoutSeconds: input.RequestTimeoutSeconds }), - ...(input.RuleSetName != null && { RuleSetName: input.RuleSetName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateMatchmakingRuleSetInput - */ -const se_CreateMatchmakingRuleSetInput = (input: CreateMatchmakingRuleSetInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RuleSetBody != null && { RuleSetBody: input.RuleSetBody }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateGameSessionQueueInput omitted. -/** - * serializeAws_json1_1CreatePlayerSessionInput - */ -const se_CreatePlayerSessionInput = (input: CreatePlayerSessionInput, context: __SerdeContext): any => { - return { - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.PlayerData != null && { PlayerData: input.PlayerData }), - ...(input.PlayerId != null && { PlayerId: input.PlayerId }), - }; -}; +// se_CreateLocationInput omitted. -/** - * serializeAws_json1_1CreatePlayerSessionsInput - */ -const se_CreatePlayerSessionsInput = (input: CreatePlayerSessionsInput, context: __SerdeContext): any => { - return { - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.PlayerDataMap != null && { PlayerDataMap: se_PlayerDataMap(input.PlayerDataMap, context) }), - ...(input.PlayerIds != null && { PlayerIds: se_PlayerIdList(input.PlayerIds, context) }), - }; -}; +// se_CreateMatchmakingConfigurationInput omitted. + +// se_CreateMatchmakingRuleSetInput omitted. + +// se_CreatePlayerSessionInput omitted. + +// se_CreatePlayerSessionsInput omitted. /** * serializeAws_json1_1CreateScriptInput */ const se_CreateScriptInput = (input: CreateScriptInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.StorageLocation != null && { StorageLocation: se_S3Location(input.StorageLocation, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Version != null && { Version: input.Version }), - ...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }), - }; + return take(input, { + Name: [], + StorageLocation: _json, + Tags: _json, + Version: [], + ZipFile: context.base64Encoder, + }); }; -/** - * serializeAws_json1_1CreateVpcPeeringAuthorizationInput - */ -const se_CreateVpcPeeringAuthorizationInput = ( - input: CreateVpcPeeringAuthorizationInput, - context: __SerdeContext -): any => { - return { - ...(input.GameLiftAwsAccountId != null && { GameLiftAwsAccountId: input.GameLiftAwsAccountId }), - ...(input.PeerVpcId != null && { PeerVpcId: input.PeerVpcId }), - }; -}; +// se_CreateVpcPeeringAuthorizationInput omitted. -/** - * serializeAws_json1_1CreateVpcPeeringConnectionInput - */ -const se_CreateVpcPeeringConnectionInput = (input: CreateVpcPeeringConnectionInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.PeerVpcAwsAccountId != null && { PeerVpcAwsAccountId: input.PeerVpcAwsAccountId }), - ...(input.PeerVpcId != null && { PeerVpcId: input.PeerVpcId }), - }; -}; +// se_CreateVpcPeeringConnectionInput omitted. -/** - * serializeAws_json1_1DeleteAliasInput - */ -const se_DeleteAliasInput = (input: DeleteAliasInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - }; -}; +// se_DeleteAliasInput omitted. -/** - * serializeAws_json1_1DeleteBuildInput - */ -const se_DeleteBuildInput = (input: DeleteBuildInput, context: __SerdeContext): any => { - return { - ...(input.BuildId != null && { BuildId: input.BuildId }), - }; -}; +// se_DeleteBuildInput omitted. -/** - * serializeAws_json1_1DeleteFleetInput - */ -const se_DeleteFleetInput = (input: DeleteFleetInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; +// se_DeleteFleetInput omitted. -/** - * serializeAws_json1_1DeleteFleetLocationsInput - */ -const se_DeleteFleetLocationsInput = (input: DeleteFleetLocationsInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Locations != null && { Locations: se_LocationList(input.Locations, context) }), - }; -}; +// se_DeleteFleetLocationsInput omitted. -/** - * serializeAws_json1_1DeleteGameServerGroupInput - */ -const se_DeleteGameServerGroupInput = (input: DeleteGameServerGroupInput, context: __SerdeContext): any => { - return { - ...(input.DeleteOption != null && { DeleteOption: input.DeleteOption }), - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - }; -}; +// se_DeleteGameServerGroupInput omitted. -/** - * serializeAws_json1_1DeleteGameSessionQueueInput - */ -const se_DeleteGameSessionQueueInput = (input: DeleteGameSessionQueueInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteGameSessionQueueInput omitted. -/** - * serializeAws_json1_1DeleteLocationInput - */ -const se_DeleteLocationInput = (input: DeleteLocationInput, context: __SerdeContext): any => { - return { - ...(input.LocationName != null && { LocationName: input.LocationName }), - }; -}; +// se_DeleteLocationInput omitted. -/** - * serializeAws_json1_1DeleteMatchmakingConfigurationInput - */ -const se_DeleteMatchmakingConfigurationInput = ( - input: DeleteMatchmakingConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteMatchmakingConfigurationInput omitted. -/** - * serializeAws_json1_1DeleteMatchmakingRuleSetInput - */ -const se_DeleteMatchmakingRuleSetInput = (input: DeleteMatchmakingRuleSetInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteMatchmakingRuleSetInput omitted. -/** - * serializeAws_json1_1DeleteScalingPolicyInput - */ -const se_DeleteScalingPolicyInput = (input: DeleteScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteScalingPolicyInput omitted. -/** - * serializeAws_json1_1DeleteScriptInput - */ -const se_DeleteScriptInput = (input: DeleteScriptInput, context: __SerdeContext): any => { - return { - ...(input.ScriptId != null && { ScriptId: input.ScriptId }), - }; -}; +// se_DeleteScriptInput omitted. -/** - * serializeAws_json1_1DeleteVpcPeeringAuthorizationInput - */ -const se_DeleteVpcPeeringAuthorizationInput = ( - input: DeleteVpcPeeringAuthorizationInput, - context: __SerdeContext -): any => { - return { - ...(input.GameLiftAwsAccountId != null && { GameLiftAwsAccountId: input.GameLiftAwsAccountId }), - ...(input.PeerVpcId != null && { PeerVpcId: input.PeerVpcId }), - }; -}; +// se_DeleteVpcPeeringAuthorizationInput omitted. -/** - * serializeAws_json1_1DeleteVpcPeeringConnectionInput - */ -const se_DeleteVpcPeeringConnectionInput = (input: DeleteVpcPeeringConnectionInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.VpcPeeringConnectionId != null && { VpcPeeringConnectionId: input.VpcPeeringConnectionId }), - }; -}; +// se_DeleteVpcPeeringConnectionInput omitted. -/** - * serializeAws_json1_1DeregisterComputeInput - */ -const se_DeregisterComputeInput = (input: DeregisterComputeInput, context: __SerdeContext): any => { - return { - ...(input.ComputeName != null && { ComputeName: input.ComputeName }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; +// se_DeregisterComputeInput omitted. -/** - * serializeAws_json1_1DeregisterGameServerInput - */ -const se_DeregisterGameServerInput = (input: DeregisterGameServerInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerId != null && { GameServerId: input.GameServerId }), - }; -}; +// se_DeregisterGameServerInput omitted. -/** - * serializeAws_json1_1DescribeAliasInput - */ -const se_DescribeAliasInput = (input: DescribeAliasInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - }; -}; +// se_DescribeAliasInput omitted. -/** - * serializeAws_json1_1DescribeBuildInput - */ -const se_DescribeBuildInput = (input: DescribeBuildInput, context: __SerdeContext): any => { - return { - ...(input.BuildId != null && { BuildId: input.BuildId }), - }; -}; +// se_DescribeBuildInput omitted. -/** - * serializeAws_json1_1DescribeComputeInput - */ -const se_DescribeComputeInput = (input: DescribeComputeInput, context: __SerdeContext): any => { - return { - ...(input.ComputeName != null && { ComputeName: input.ComputeName }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; +// se_DescribeComputeInput omitted. -/** - * serializeAws_json1_1DescribeEC2InstanceLimitsInput - */ -const se_DescribeEC2InstanceLimitsInput = (input: DescribeEC2InstanceLimitsInput, context: __SerdeContext): any => { - return { - ...(input.EC2InstanceType != null && { EC2InstanceType: input.EC2InstanceType }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_DescribeEC2InstanceLimitsInput omitted. -/** - * serializeAws_json1_1DescribeFleetAttributesInput - */ -const se_DescribeFleetAttributesInput = (input: DescribeFleetAttributesInput, context: __SerdeContext): any => { - return { - ...(input.FleetIds != null && { FleetIds: se_FleetIdOrArnList(input.FleetIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetAttributesInput omitted. -/** - * serializeAws_json1_1DescribeFleetCapacityInput - */ -const se_DescribeFleetCapacityInput = (input: DescribeFleetCapacityInput, context: __SerdeContext): any => { - return { - ...(input.FleetIds != null && { FleetIds: se_FleetIdOrArnList(input.FleetIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetCapacityInput omitted. /** * serializeAws_json1_1DescribeFleetEventsInput */ const se_DescribeFleetEventsInput = (input: DescribeFleetEventsInput, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + FleetId: [], + Limit: [], + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DescribeFleetLocationAttributesInput - */ -const se_DescribeFleetLocationAttributesInput = ( - input: DescribeFleetLocationAttributesInput, - context: __SerdeContext -): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Locations != null && { Locations: se_LocationList(input.Locations, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetLocationAttributesInput omitted. -/** - * serializeAws_json1_1DescribeFleetLocationCapacityInput - */ -const se_DescribeFleetLocationCapacityInput = ( - input: DescribeFleetLocationCapacityInput, - context: __SerdeContext -): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_DescribeFleetLocationCapacityInput omitted. -/** - * serializeAws_json1_1DescribeFleetLocationUtilizationInput - */ -const se_DescribeFleetLocationUtilizationInput = ( - input: DescribeFleetLocationUtilizationInput, - context: __SerdeContext -): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_DescribeFleetLocationUtilizationInput omitted. -/** - * serializeAws_json1_1DescribeFleetPortSettingsInput - */ -const se_DescribeFleetPortSettingsInput = (input: DescribeFleetPortSettingsInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_DescribeFleetPortSettingsInput omitted. -/** - * serializeAws_json1_1DescribeFleetUtilizationInput - */ -const se_DescribeFleetUtilizationInput = (input: DescribeFleetUtilizationInput, context: __SerdeContext): any => { - return { - ...(input.FleetIds != null && { FleetIds: se_FleetIdOrArnList(input.FleetIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeFleetUtilizationInput omitted. -/** - * serializeAws_json1_1DescribeGameServerGroupInput - */ -const se_DescribeGameServerGroupInput = (input: DescribeGameServerGroupInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - }; -}; +// se_DescribeGameServerGroupInput omitted. -/** - * serializeAws_json1_1DescribeGameServerInput - */ -const se_DescribeGameServerInput = (input: DescribeGameServerInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerId != null && { GameServerId: input.GameServerId }), - }; -}; +// se_DescribeGameServerInput omitted. -/** - * serializeAws_json1_1DescribeGameServerInstancesInput - */ -const se_DescribeGameServerInstancesInput = (input: DescribeGameServerInstancesInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.InstanceIds != null && { InstanceIds: se_GameServerInstanceIds(input.InstanceIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeGameServerInstancesInput omitted. -/** - * serializeAws_json1_1DescribeGameSessionDetailsInput - */ -const se_DescribeGameSessionDetailsInput = (input: DescribeGameSessionDetailsInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StatusFilter != null && { StatusFilter: input.StatusFilter }), - }; -}; +// se_DescribeGameSessionDetailsInput omitted. -/** - * serializeAws_json1_1DescribeGameSessionPlacementInput - */ -const se_DescribeGameSessionPlacementInput = ( - input: DescribeGameSessionPlacementInput, - context: __SerdeContext -): any => { - return { - ...(input.PlacementId != null && { PlacementId: input.PlacementId }), - }; -}; +// se_DescribeGameSessionPlacementInput omitted. -/** - * serializeAws_json1_1DescribeGameSessionQueuesInput - */ -const se_DescribeGameSessionQueuesInput = (input: DescribeGameSessionQueuesInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Names != null && { Names: se_GameSessionQueueNameOrArnList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeGameSessionQueuesInput omitted. -/** - * serializeAws_json1_1DescribeGameSessionsInput - */ -const se_DescribeGameSessionsInput = (input: DescribeGameSessionsInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StatusFilter != null && { StatusFilter: input.StatusFilter }), - }; -}; +// se_DescribeGameSessionsInput omitted. -/** - * serializeAws_json1_1DescribeInstancesInput - */ -const se_DescribeInstancesInput = (input: DescribeInstancesInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeInstancesInput omitted. -/** - * serializeAws_json1_1DescribeMatchmakingConfigurationsInput - */ -const se_DescribeMatchmakingConfigurationsInput = ( - input: DescribeMatchmakingConfigurationsInput, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Names != null && { Names: se_MatchmakingConfigurationNameList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RuleSetName != null && { RuleSetName: input.RuleSetName }), - }; -}; +// se_DescribeMatchmakingConfigurationsInput omitted. -/** - * serializeAws_json1_1DescribeMatchmakingInput - */ -const se_DescribeMatchmakingInput = (input: DescribeMatchmakingInput, context: __SerdeContext): any => { - return { - ...(input.TicketIds != null && { TicketIds: se_MatchmakingIdList(input.TicketIds, context) }), - }; -}; +// se_DescribeMatchmakingInput omitted. -/** - * serializeAws_json1_1DescribeMatchmakingRuleSetsInput - */ -const se_DescribeMatchmakingRuleSetsInput = (input: DescribeMatchmakingRuleSetsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Names != null && { Names: se_MatchmakingRuleSetNameList(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeMatchmakingRuleSetsInput omitted. -/** - * serializeAws_json1_1DescribePlayerSessionsInput - */ -const se_DescribePlayerSessionsInput = (input: DescribePlayerSessionsInput, context: __SerdeContext): any => { - return { - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PlayerId != null && { PlayerId: input.PlayerId }), - ...(input.PlayerSessionId != null && { PlayerSessionId: input.PlayerSessionId }), - ...(input.PlayerSessionStatusFilter != null && { PlayerSessionStatusFilter: input.PlayerSessionStatusFilter }), - }; -}; +// se_DescribePlayerSessionsInput omitted. -/** - * serializeAws_json1_1DescribeRuntimeConfigurationInput - */ -const se_DescribeRuntimeConfigurationInput = ( - input: DescribeRuntimeConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; - -/** - * serializeAws_json1_1DescribeScalingPoliciesInput - */ -const se_DescribeScalingPoliciesInput = (input: DescribeScalingPoliciesInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StatusFilter != null && { StatusFilter: input.StatusFilter }), - }; -}; - -/** - * serializeAws_json1_1DescribeScriptInput - */ -const se_DescribeScriptInput = (input: DescribeScriptInput, context: __SerdeContext): any => { - return { - ...(input.ScriptId != null && { ScriptId: input.ScriptId }), - }; -}; - -/** - * serializeAws_json1_1DescribeVpcPeeringAuthorizationsInput - */ -const se_DescribeVpcPeeringAuthorizationsInput = ( - input: DescribeVpcPeeringAuthorizationsInput, - context: __SerdeContext -): any => { - return {}; -}; +// se_DescribeRuntimeConfigurationInput omitted. -/** - * serializeAws_json1_1DescribeVpcPeeringConnectionsInput - */ -const se_DescribeVpcPeeringConnectionsInput = ( - input: DescribeVpcPeeringConnectionsInput, - context: __SerdeContext -): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; - -/** - * serializeAws_json1_1DesiredPlayerSession - */ -const se_DesiredPlayerSession = (input: DesiredPlayerSession, context: __SerdeContext): any => { - return { - ...(input.PlayerData != null && { PlayerData: input.PlayerData }), - ...(input.PlayerId != null && { PlayerId: input.PlayerId }), - }; -}; - -/** - * serializeAws_json1_1DesiredPlayerSessionList - */ -const se_DesiredPlayerSessionList = (input: DesiredPlayerSession[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DesiredPlayerSession(entry, context); - }); -}; +// se_DescribeScalingPoliciesInput omitted. -/** - * serializeAws_json1_1FilterConfiguration - */ -const se_FilterConfiguration = (input: FilterConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowedLocations != null && { AllowedLocations: se_LocationList(input.AllowedLocations, context) }), - }; -}; +// se_DescribeScriptInput omitted. -/** - * serializeAws_json1_1FleetActionList - */ -const se_FleetActionList = (input: (FleetAction | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeVpcPeeringAuthorizationsInput omitted. -/** - * serializeAws_json1_1FleetIdOrArnList - */ -const se_FleetIdOrArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeVpcPeeringConnectionsInput omitted. -/** - * serializeAws_json1_1GameProperty - */ -const se_GameProperty = (input: GameProperty, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_DesiredPlayerSession omitted. -/** - * serializeAws_json1_1GamePropertyList - */ -const se_GamePropertyList = (input: GameProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GameProperty(entry, context); - }); -}; +// se_DesiredPlayerSessionList omitted. -/** - * serializeAws_json1_1GameServerGroupActions - */ -const se_GameServerGroupActions = (input: (GameServerGroupAction | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterConfiguration omitted. + +// se_FleetActionList omitted. + +// se_FleetIdOrArnList omitted. + +// se_GameProperty omitted. + +// se_GamePropertyList omitted. + +// se_GameServerGroupActions omitted. /** * serializeAws_json1_1GameServerGroupAutoScalingPolicy */ const se_GameServerGroupAutoScalingPolicy = (input: GameServerGroupAutoScalingPolicy, context: __SerdeContext): any => { - return { - ...(input.EstimatedInstanceWarmup != null && { EstimatedInstanceWarmup: input.EstimatedInstanceWarmup }), - ...(input.TargetTrackingConfiguration != null && { - TargetTrackingConfiguration: se_TargetTrackingConfiguration(input.TargetTrackingConfiguration, context), - }), - }; + return take(input, { + EstimatedInstanceWarmup: [], + TargetTrackingConfiguration: (_) => se_TargetTrackingConfiguration(_, context), + }); }; -/** - * serializeAws_json1_1GameServerInstanceIds - */ -const se_GameServerInstanceIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GameServerInstanceIds omitted. -/** - * serializeAws_json1_1GameSessionQueueDestination - */ -const se_GameSessionQueueDestination = (input: GameSessionQueueDestination, context: __SerdeContext): any => { - return { - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - }; -}; +// se_GameSessionQueueDestination omitted. -/** - * serializeAws_json1_1GameSessionQueueDestinationList - */ -const se_GameSessionQueueDestinationList = (input: GameSessionQueueDestination[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GameSessionQueueDestination(entry, context); - }); -}; +// se_GameSessionQueueDestinationList omitted. -/** - * serializeAws_json1_1GameSessionQueueNameOrArnList - */ -const se_GameSessionQueueNameOrArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GameSessionQueueNameOrArnList omitted. -/** - * serializeAws_json1_1GetComputeAccessInput - */ -const se_GetComputeAccessInput = (input: GetComputeAccessInput, context: __SerdeContext): any => { - return { - ...(input.ComputeName != null && { ComputeName: input.ComputeName }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; +// se_GetComputeAccessInput omitted. -/** - * serializeAws_json1_1GetComputeAuthTokenInput - */ -const se_GetComputeAuthTokenInput = (input: GetComputeAuthTokenInput, context: __SerdeContext): any => { - return { - ...(input.ComputeName != null && { ComputeName: input.ComputeName }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - }; -}; +// se_GetComputeAuthTokenInput omitted. -/** - * serializeAws_json1_1GetGameSessionLogUrlInput - */ -const se_GetGameSessionLogUrlInput = (input: GetGameSessionLogUrlInput, context: __SerdeContext): any => { - return { - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - }; -}; +// se_GetGameSessionLogUrlInput omitted. -/** - * serializeAws_json1_1GetInstanceAccessInput - */ -const se_GetInstanceAccessInput = (input: GetInstanceAccessInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_GetInstanceAccessInput omitted. -/** - * serializeAws_json1_1InstanceDefinition - */ -const se_InstanceDefinition = (input: InstanceDefinition, context: __SerdeContext): any => { - return { - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.WeightedCapacity != null && { WeightedCapacity: input.WeightedCapacity }), - }; -}; +// se_InstanceDefinition omitted. -/** - * serializeAws_json1_1InstanceDefinitions - */ -const se_InstanceDefinitions = (input: InstanceDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceDefinition(entry, context); - }); -}; +// se_InstanceDefinitions omitted. -/** - * serializeAws_json1_1IpPermission - */ -const se_IpPermission = (input: IpPermission, context: __SerdeContext): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.IpRange != null && { IpRange: input.IpRange }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - }; -}; +// se_IpPermission omitted. -/** - * serializeAws_json1_1IpPermissionsList - */ -const se_IpPermissionsList = (input: IpPermission[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IpPermission(entry, context); - }); -}; +// se_IpPermissionsList omitted. -/** - * serializeAws_json1_1LatencyMap - */ -const se_LatencyMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_LatencyMap omitted. -/** - * serializeAws_json1_1LaunchTemplateSpecification - */ -const se_LaunchTemplateSpecification = (input: LaunchTemplateSpecification, context: __SerdeContext): any => { - return { - ...(input.LaunchTemplateId != null && { LaunchTemplateId: input.LaunchTemplateId }), - ...(input.LaunchTemplateName != null && { LaunchTemplateName: input.LaunchTemplateName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_LaunchTemplateSpecification omitted. -/** - * serializeAws_json1_1ListAliasesInput - */ -const se_ListAliasesInput = (input: ListAliasesInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RoutingStrategyType != null && { RoutingStrategyType: input.RoutingStrategyType }), - }; -}; +// se_ListAliasesInput omitted. -/** - * serializeAws_json1_1ListBuildsInput - */ -const se_ListBuildsInput = (input: ListBuildsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListBuildsInput omitted. -/** - * serializeAws_json1_1ListComputeInput - */ -const se_ListComputeInput = (input: ListComputeInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListComputeInput omitted. -/** - * serializeAws_json1_1ListFleetsInput - */ -const se_ListFleetsInput = (input: ListFleetsInput, context: __SerdeContext): any => { - return { - ...(input.BuildId != null && { BuildId: input.BuildId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ScriptId != null && { ScriptId: input.ScriptId }), - }; -}; +// se_ListFleetsInput omitted. -/** - * serializeAws_json1_1ListGameServerGroupsInput - */ -const se_ListGameServerGroupsInput = (input: ListGameServerGroupsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListGameServerGroupsInput omitted. -/** - * serializeAws_json1_1ListGameServersInput - */ -const se_ListGameServersInput = (input: ListGameServersInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_ListGameServersInput omitted. -/** - * serializeAws_json1_1ListLocationsInput - */ -const se_ListLocationsInput = (input: ListLocationsInput, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_LocationFilterList(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLocationsInput omitted. -/** - * serializeAws_json1_1ListScriptsInput - */ -const se_ListScriptsInput = (input: ListScriptsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListScriptsInput omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1LocationConfiguration - */ -const se_LocationConfiguration = (input: LocationConfiguration, context: __SerdeContext): any => { - return { - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_LocationConfiguration omitted. -/** - * serializeAws_json1_1LocationConfigurationList - */ -const se_LocationConfigurationList = (input: LocationConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LocationConfiguration(entry, context); - }); -}; +// se_LocationConfigurationList omitted. -/** - * serializeAws_json1_1LocationFilterList - */ -const se_LocationFilterList = (input: (LocationFilter | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LocationFilterList omitted. -/** - * serializeAws_json1_1LocationList - */ -const se_LocationList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LocationList omitted. -/** - * serializeAws_json1_1MatchmakingConfigurationNameList - */ -const se_MatchmakingConfigurationNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MatchmakingConfigurationNameList omitted. -/** - * serializeAws_json1_1MatchmakingIdList - */ -const se_MatchmakingIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MatchmakingIdList omitted. -/** - * serializeAws_json1_1MatchmakingRuleSetNameList - */ -const se_MatchmakingRuleSetNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MatchmakingRuleSetNameList omitted. -/** - * serializeAws_json1_1MetricGroupList - */ -const se_MetricGroupList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MetricGroupList omitted. /** * serializeAws_json1_1Player */ const se_Player = (input: Player, context: __SerdeContext): any => { - return { - ...(input.LatencyInMs != null && { LatencyInMs: se_LatencyMap(input.LatencyInMs, context) }), - ...(input.PlayerAttributes != null && { PlayerAttributes: se_PlayerAttributeMap(input.PlayerAttributes, context) }), - ...(input.PlayerId != null && { PlayerId: input.PlayerId }), - ...(input.Team != null && { Team: input.Team }), - }; + return take(input, { + LatencyInMs: _json, + PlayerAttributes: (_) => se_PlayerAttributeMap(_, context), + PlayerId: [], + Team: [], + }); }; /** @@ -9419,52 +8300,21 @@ const se_PlayerAttributeStringDoubleMap = (input: Record, contex }, {}); }; -/** - * serializeAws_json1_1PlayerAttributeStringList - */ -const se_PlayerAttributeStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PlayerDataMap - */ -const se_PlayerDataMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PlayerAttributeStringList omitted. -/** - * serializeAws_json1_1PlayerIdList - */ -const se_PlayerIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PlayerDataMap omitted. + +// se_PlayerIdList omitted. /** * serializeAws_json1_1PlayerLatency */ const se_PlayerLatency = (input: PlayerLatency, context: __SerdeContext): any => { - return { - ...(input.LatencyInMilliseconds != null && { - LatencyInMilliseconds: __serializeFloat(input.LatencyInMilliseconds), - }), - ...(input.PlayerId != null && { PlayerId: input.PlayerId }), - ...(input.RegionIdentifier != null && { RegionIdentifier: input.RegionIdentifier }), - }; + return take(input, { + LatencyInMilliseconds: __serializeFloat, + PlayerId: [], + RegionIdentifier: [], + }); }; /** @@ -9478,28 +8328,9 @@ const se_PlayerLatencyList = (input: PlayerLatency[], context: __SerdeContext): }); }; -/** - * serializeAws_json1_1PlayerLatencyPolicy - */ -const se_PlayerLatencyPolicy = (input: PlayerLatencyPolicy, context: __SerdeContext): any => { - return { - ...(input.MaximumIndividualPlayerLatencyMilliseconds != null && { - MaximumIndividualPlayerLatencyMilliseconds: input.MaximumIndividualPlayerLatencyMilliseconds, - }), - ...(input.PolicyDurationSeconds != null && { PolicyDurationSeconds: input.PolicyDurationSeconds }), - }; -}; +// se_PlayerLatencyPolicy omitted. -/** - * serializeAws_json1_1PlayerLatencyPolicyList - */ -const se_PlayerLatencyPolicyList = (input: PlayerLatencyPolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlayerLatencyPolicy(entry, context); - }); -}; +// se_PlayerLatencyPolicyList omitted. /** * serializeAws_json1_1PlayerList @@ -9512,607 +8343,187 @@ const se_PlayerList = (input: Player[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_json1_1PriorityConfiguration - */ -const se_PriorityConfiguration = (input: PriorityConfiguration, context: __SerdeContext): any => { - return { - ...(input.LocationOrder != null && { LocationOrder: se_LocationList(input.LocationOrder, context) }), - ...(input.PriorityOrder != null && { PriorityOrder: se_PriorityTypeList(input.PriorityOrder, context) }), - }; -}; +// se_PriorityConfiguration omitted. -/** - * serializeAws_json1_1PriorityTypeList - */ -const se_PriorityTypeList = (input: (PriorityType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PriorityTypeList omitted. /** * serializeAws_json1_1PutScalingPolicyInput */ const se_PutScalingPolicyInput = (input: PutScalingPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.EvaluationPeriods != null && { EvaluationPeriods: input.EvaluationPeriods }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PolicyType != null && { PolicyType: input.PolicyType }), - ...(input.ScalingAdjustment != null && { ScalingAdjustment: input.ScalingAdjustment }), - ...(input.ScalingAdjustmentType != null && { ScalingAdjustmentType: input.ScalingAdjustmentType }), - ...(input.TargetConfiguration != null && { - TargetConfiguration: se_TargetConfiguration(input.TargetConfiguration, context), - }), - ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }), - }; + return take(input, { + ComparisonOperator: [], + EvaluationPeriods: [], + FleetId: [], + MetricName: [], + Name: [], + PolicyType: [], + ScalingAdjustment: [], + ScalingAdjustmentType: [], + TargetConfiguration: (_) => se_TargetConfiguration(_, context), + Threshold: __serializeFloat, + }); }; -/** - * serializeAws_json1_1QueueArnsList - */ -const se_QueueArnsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_QueueArnsList omitted. -/** - * serializeAws_json1_1RegisterComputeInput - */ -const se_RegisterComputeInput = (input: RegisterComputeInput, context: __SerdeContext): any => { - return { - ...(input.CertificatePath != null && { CertificatePath: input.CertificatePath }), - ...(input.ComputeName != null && { ComputeName: input.ComputeName }), - ...(input.DnsName != null && { DnsName: input.DnsName }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_RegisterComputeInput omitted. -/** - * serializeAws_json1_1RegisterGameServerInput - */ -const se_RegisterGameServerInput = (input: RegisterGameServerInput, context: __SerdeContext): any => { - return { - ...(input.ConnectionInfo != null && { ConnectionInfo: input.ConnectionInfo }), - ...(input.GameServerData != null && { GameServerData: input.GameServerData }), - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerId != null && { GameServerId: input.GameServerId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_RegisterGameServerInput omitted. -/** - * serializeAws_json1_1RequestUploadCredentialsInput - */ -const se_RequestUploadCredentialsInput = (input: RequestUploadCredentialsInput, context: __SerdeContext): any => { - return { - ...(input.BuildId != null && { BuildId: input.BuildId }), - }; -}; +// se_RequestUploadCredentialsInput omitted. -/** - * serializeAws_json1_1ResolveAliasInput - */ -const se_ResolveAliasInput = (input: ResolveAliasInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - }; -}; +// se_ResolveAliasInput omitted. -/** - * serializeAws_json1_1ResourceCreationLimitPolicy - */ -const se_ResourceCreationLimitPolicy = (input: ResourceCreationLimitPolicy, context: __SerdeContext): any => { - return { - ...(input.NewGameSessionsPerCreator != null && { NewGameSessionsPerCreator: input.NewGameSessionsPerCreator }), - ...(input.PolicyPeriodInMinutes != null && { PolicyPeriodInMinutes: input.PolicyPeriodInMinutes }), - }; -}; +// se_ResourceCreationLimitPolicy omitted. -/** - * serializeAws_json1_1ResumeGameServerGroupInput - */ -const se_ResumeGameServerGroupInput = (input: ResumeGameServerGroupInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.ResumeActions != null && { ResumeActions: se_GameServerGroupActions(input.ResumeActions, context) }), - }; -}; +// se_ResumeGameServerGroupInput omitted. -/** - * serializeAws_json1_1RoutingStrategy - */ -const se_RoutingStrategy = (input: RoutingStrategy, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Message != null && { Message: input.Message }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_RoutingStrategy omitted. -/** - * serializeAws_json1_1RuntimeConfiguration - */ -const se_RuntimeConfiguration = (input: RuntimeConfiguration, context: __SerdeContext): any => { - return { - ...(input.GameSessionActivationTimeoutSeconds != null && { - GameSessionActivationTimeoutSeconds: input.GameSessionActivationTimeoutSeconds, - }), - ...(input.MaxConcurrentGameSessionActivations != null && { - MaxConcurrentGameSessionActivations: input.MaxConcurrentGameSessionActivations, - }), - ...(input.ServerProcesses != null && { ServerProcesses: se_ServerProcessList(input.ServerProcesses, context) }), - }; -}; +// se_RuntimeConfiguration omitted. -/** - * serializeAws_json1_1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - ...(input.ObjectVersion != null && { ObjectVersion: input.ObjectVersion }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_json1_1SearchGameSessionsInput - */ -const se_SearchGameSessionsInput = (input: SearchGameSessionsInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortExpression != null && { SortExpression: input.SortExpression }), - }; -}; +// se_SearchGameSessionsInput omitted. -/** - * serializeAws_json1_1ServerProcess - */ -const se_ServerProcess = (input: ServerProcess, context: __SerdeContext): any => { - return { - ...(input.ConcurrentExecutions != null && { ConcurrentExecutions: input.ConcurrentExecutions }), - ...(input.LaunchPath != null && { LaunchPath: input.LaunchPath }), - ...(input.Parameters != null && { Parameters: input.Parameters }), - }; -}; +// se_ServerProcess omitted. -/** - * serializeAws_json1_1ServerProcessList - */ -const se_ServerProcessList = (input: ServerProcess[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerProcess(entry, context); - }); -}; +// se_ServerProcessList omitted. -/** - * serializeAws_json1_1StartFleetActionsInput - */ -const se_StartFleetActionsInput = (input: StartFleetActionsInput, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_FleetActionList(input.Actions, context) }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_StartFleetActionsInput omitted. /** * serializeAws_json1_1StartGameSessionPlacementInput */ const se_StartGameSessionPlacementInput = (input: StartGameSessionPlacementInput, context: __SerdeContext): any => { - return { - ...(input.DesiredPlayerSessions != null && { - DesiredPlayerSessions: se_DesiredPlayerSessionList(input.DesiredPlayerSessions, context), - }), - ...(input.GameProperties != null && { GameProperties: se_GamePropertyList(input.GameProperties, context) }), - ...(input.GameSessionData != null && { GameSessionData: input.GameSessionData }), - ...(input.GameSessionName != null && { GameSessionName: input.GameSessionName }), - ...(input.GameSessionQueueName != null && { GameSessionQueueName: input.GameSessionQueueName }), - ...(input.MaximumPlayerSessionCount != null && { MaximumPlayerSessionCount: input.MaximumPlayerSessionCount }), - ...(input.PlacementId != null && { PlacementId: input.PlacementId }), - ...(input.PlayerLatencies != null && { PlayerLatencies: se_PlayerLatencyList(input.PlayerLatencies, context) }), - }; + return take(input, { + DesiredPlayerSessions: _json, + GameProperties: _json, + GameSessionData: [], + GameSessionName: [], + GameSessionQueueName: [], + MaximumPlayerSessionCount: [], + PlacementId: [], + PlayerLatencies: (_) => se_PlayerLatencyList(_, context), + }); }; /** * serializeAws_json1_1StartMatchBackfillInput */ const se_StartMatchBackfillInput = (input: StartMatchBackfillInput, context: __SerdeContext): any => { - return { - ...(input.ConfigurationName != null && { ConfigurationName: input.ConfigurationName }), - ...(input.GameSessionArn != null && { GameSessionArn: input.GameSessionArn }), - ...(input.Players != null && { Players: se_PlayerList(input.Players, context) }), - ...(input.TicketId != null && { TicketId: input.TicketId }), - }; + return take(input, { + ConfigurationName: [], + GameSessionArn: [], + Players: (_) => se_PlayerList(_, context), + TicketId: [], + }); }; /** * serializeAws_json1_1StartMatchmakingInput */ const se_StartMatchmakingInput = (input: StartMatchmakingInput, context: __SerdeContext): any => { - return { - ...(input.ConfigurationName != null && { ConfigurationName: input.ConfigurationName }), - ...(input.Players != null && { Players: se_PlayerList(input.Players, context) }), - ...(input.TicketId != null && { TicketId: input.TicketId }), - }; + return take(input, { + ConfigurationName: [], + Players: (_) => se_PlayerList(_, context), + TicketId: [], + }); }; -/** - * serializeAws_json1_1StopFleetActionsInput - */ -const se_StopFleetActionsInput = (input: StopFleetActionsInput, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_FleetActionList(input.Actions, context) }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Location != null && { Location: input.Location }), - }; -}; +// se_StopFleetActionsInput omitted. -/** - * serializeAws_json1_1StopGameSessionPlacementInput - */ -const se_StopGameSessionPlacementInput = (input: StopGameSessionPlacementInput, context: __SerdeContext): any => { - return { - ...(input.PlacementId != null && { PlacementId: input.PlacementId }), - }; -}; +// se_StopGameSessionPlacementInput omitted. -/** - * serializeAws_json1_1StopMatchmakingInput - */ -const se_StopMatchmakingInput = (input: StopMatchmakingInput, context: __SerdeContext): any => { - return { - ...(input.TicketId != null && { TicketId: input.TicketId }), - }; -}; +// se_StopMatchmakingInput omitted. -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_json1_1SuspendGameServerGroupInput - */ -const se_SuspendGameServerGroupInput = (input: SuspendGameServerGroupInput, context: __SerdeContext): any => { - return { - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.SuspendActions != null && { SuspendActions: se_GameServerGroupActions(input.SuspendActions, context) }), - }; -}; +// se_SuspendGameServerGroupInput omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. /** * serializeAws_json1_1TargetConfiguration */ const se_TargetConfiguration = (input: TargetConfiguration, context: __SerdeContext): any => { - return { - ...(input.TargetValue != null && { TargetValue: __serializeFloat(input.TargetValue) }), - }; + return take(input, { + TargetValue: __serializeFloat, + }); }; /** * serializeAws_json1_1TargetTrackingConfiguration */ const se_TargetTrackingConfiguration = (input: TargetTrackingConfiguration, context: __SerdeContext): any => { - return { - ...(input.TargetValue != null && { TargetValue: __serializeFloat(input.TargetValue) }), - }; + return take(input, { + TargetValue: __serializeFloat, + }); }; -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateAliasInput - */ -const se_UpdateAliasInput = (input: UpdateAliasInput, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoutingStrategy != null && { RoutingStrategy: se_RoutingStrategy(input.RoutingStrategy, context) }), - }; -}; +// se_UpdateAliasInput omitted. -/** - * serializeAws_json1_1UpdateBuildInput - */ -const se_UpdateBuildInput = (input: UpdateBuildInput, context: __SerdeContext): any => { - return { - ...(input.BuildId != null && { BuildId: input.BuildId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_UpdateBuildInput omitted. -/** - * serializeAws_json1_1UpdateFleetAttributesInput - */ -const se_UpdateFleetAttributesInput = (input: UpdateFleetAttributesInput, context: __SerdeContext): any => { - return { - ...(input.AnywhereConfiguration != null && { - AnywhereConfiguration: se_AnywhereConfiguration(input.AnywhereConfiguration, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.MetricGroups != null && { MetricGroups: se_MetricGroupList(input.MetricGroups, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NewGameSessionProtectionPolicy != null && { - NewGameSessionProtectionPolicy: input.NewGameSessionProtectionPolicy, - }), - ...(input.ResourceCreationLimitPolicy != null && { - ResourceCreationLimitPolicy: se_ResourceCreationLimitPolicy(input.ResourceCreationLimitPolicy, context), - }), - }; -}; +// se_UpdateFleetAttributesInput omitted. -/** - * serializeAws_json1_1UpdateFleetCapacityInput - */ -const se_UpdateFleetCapacityInput = (input: UpdateFleetCapacityInput, context: __SerdeContext): any => { - return { - ...(input.DesiredInstances != null && { DesiredInstances: input.DesiredInstances }), - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.Location != null && { Location: input.Location }), - ...(input.MaxSize != null && { MaxSize: input.MaxSize }), - ...(input.MinSize != null && { MinSize: input.MinSize }), - }; -}; +// se_UpdateFleetCapacityInput omitted. -/** - * serializeAws_json1_1UpdateFleetPortSettingsInput - */ -const se_UpdateFleetPortSettingsInput = (input: UpdateFleetPortSettingsInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.InboundPermissionAuthorizations != null && { - InboundPermissionAuthorizations: se_IpPermissionsList(input.InboundPermissionAuthorizations, context), - }), - ...(input.InboundPermissionRevocations != null && { - InboundPermissionRevocations: se_IpPermissionsList(input.InboundPermissionRevocations, context), - }), - }; -}; +// se_UpdateFleetPortSettingsInput omitted. -/** - * serializeAws_json1_1UpdateGameServerGroupInput - */ -const se_UpdateGameServerGroupInput = (input: UpdateGameServerGroupInput, context: __SerdeContext): any => { - return { - ...(input.BalancingStrategy != null && { BalancingStrategy: input.BalancingStrategy }), - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerProtectionPolicy != null && { GameServerProtectionPolicy: input.GameServerProtectionPolicy }), - ...(input.InstanceDefinitions != null && { - InstanceDefinitions: se_InstanceDefinitions(input.InstanceDefinitions, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_UpdateGameServerGroupInput omitted. -/** - * serializeAws_json1_1UpdateGameServerInput - */ -const se_UpdateGameServerInput = (input: UpdateGameServerInput, context: __SerdeContext): any => { - return { - ...(input.GameServerData != null && { GameServerData: input.GameServerData }), - ...(input.GameServerGroupName != null && { GameServerGroupName: input.GameServerGroupName }), - ...(input.GameServerId != null && { GameServerId: input.GameServerId }), - ...(input.HealthCheck != null && { HealthCheck: input.HealthCheck }), - ...(input.UtilizationStatus != null && { UtilizationStatus: input.UtilizationStatus }), - }; -}; +// se_UpdateGameServerInput omitted. -/** - * serializeAws_json1_1UpdateGameSessionInput - */ -const se_UpdateGameSessionInput = (input: UpdateGameSessionInput, context: __SerdeContext): any => { - return { - ...(input.GameSessionId != null && { GameSessionId: input.GameSessionId }), - ...(input.MaximumPlayerSessionCount != null && { MaximumPlayerSessionCount: input.MaximumPlayerSessionCount }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PlayerSessionCreationPolicy != null && { - PlayerSessionCreationPolicy: input.PlayerSessionCreationPolicy, - }), - ...(input.ProtectionPolicy != null && { ProtectionPolicy: input.ProtectionPolicy }), - }; -}; +// se_UpdateGameSessionInput omitted. -/** - * serializeAws_json1_1UpdateGameSessionQueueInput - */ -const se_UpdateGameSessionQueueInput = (input: UpdateGameSessionQueueInput, context: __SerdeContext): any => { - return { - ...(input.CustomEventData != null && { CustomEventData: input.CustomEventData }), - ...(input.Destinations != null && { - Destinations: se_GameSessionQueueDestinationList(input.Destinations, context), - }), - ...(input.FilterConfiguration != null && { - FilterConfiguration: se_FilterConfiguration(input.FilterConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }), - ...(input.PlayerLatencyPolicies != null && { - PlayerLatencyPolicies: se_PlayerLatencyPolicyList(input.PlayerLatencyPolicies, context), - }), - ...(input.PriorityConfiguration != null && { - PriorityConfiguration: se_PriorityConfiguration(input.PriorityConfiguration, context), - }), - ...(input.TimeoutInSeconds != null && { TimeoutInSeconds: input.TimeoutInSeconds }), - }; -}; +// se_UpdateGameSessionQueueInput omitted. -/** - * serializeAws_json1_1UpdateMatchmakingConfigurationInput - */ -const se_UpdateMatchmakingConfigurationInput = ( - input: UpdateMatchmakingConfigurationInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptanceRequired != null && { AcceptanceRequired: input.AcceptanceRequired }), - ...(input.AcceptanceTimeoutSeconds != null && { AcceptanceTimeoutSeconds: input.AcceptanceTimeoutSeconds }), - ...(input.AdditionalPlayerCount != null && { AdditionalPlayerCount: input.AdditionalPlayerCount }), - ...(input.BackfillMode != null && { BackfillMode: input.BackfillMode }), - ...(input.CustomEventData != null && { CustomEventData: input.CustomEventData }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FlexMatchMode != null && { FlexMatchMode: input.FlexMatchMode }), - ...(input.GameProperties != null && { GameProperties: se_GamePropertyList(input.GameProperties, context) }), - ...(input.GameSessionData != null && { GameSessionData: input.GameSessionData }), - ...(input.GameSessionQueueArns != null && { - GameSessionQueueArns: se_QueueArnsList(input.GameSessionQueueArns, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotificationTarget != null && { NotificationTarget: input.NotificationTarget }), - ...(input.RequestTimeoutSeconds != null && { RequestTimeoutSeconds: input.RequestTimeoutSeconds }), - ...(input.RuleSetName != null && { RuleSetName: input.RuleSetName }), - }; -}; +// se_UpdateMatchmakingConfigurationInput omitted. -/** - * serializeAws_json1_1UpdateRuntimeConfigurationInput - */ -const se_UpdateRuntimeConfigurationInput = (input: UpdateRuntimeConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.FleetId != null && { FleetId: input.FleetId }), - ...(input.RuntimeConfiguration != null && { - RuntimeConfiguration: se_RuntimeConfiguration(input.RuntimeConfiguration, context), - }), - }; -}; +// se_UpdateRuntimeConfigurationInput omitted. /** * serializeAws_json1_1UpdateScriptInput */ const se_UpdateScriptInput = (input: UpdateScriptInput, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ScriptId != null && { ScriptId: input.ScriptId }), - ...(input.StorageLocation != null && { StorageLocation: se_S3Location(input.StorageLocation, context) }), - ...(input.Version != null && { Version: input.Version }), - ...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }), - }; + return take(input, { + Name: [], + ScriptId: [], + StorageLocation: _json, + Version: [], + ZipFile: context.base64Encoder, + }); }; -/** - * serializeAws_json1_1ValidateMatchmakingRuleSetInput - */ -const se_ValidateMatchmakingRuleSetInput = (input: ValidateMatchmakingRuleSetInput, context: __SerdeContext): any => { - return { - ...(input.RuleSetBody != null && { RuleSetBody: input.RuleSetBody }), - }; -}; +// se_ValidateMatchmakingRuleSetInput omitted. -/** - * serializeAws_json1_1VpcSubnets - */ -const se_VpcSubnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VpcSubnets omitted. -/** - * deserializeAws_json1_1AcceptMatchOutput - */ -const de_AcceptMatchOutput = (output: any, context: __SerdeContext): AcceptMatchOutput => { - return {} as any; -}; +// de_AcceptMatchOutput omitted. /** * deserializeAws_json1_1Alias */ const de_Alias = (output: any, context: __SerdeContext): Alias => { - return { - AliasArn: __expectString(output.AliasArn), - AliasId: __expectString(output.AliasId), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - RoutingStrategy: output.RoutingStrategy != null ? de_RoutingStrategy(output.RoutingStrategy, context) : undefined, - } as any; + return take(output, { + AliasArn: __expectString, + AliasId: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RoutingStrategy: _json, + }) as any; }; /** @@ -10122,64 +8533,42 @@ const de_AliasList = (output: any, context: __SerdeContext): Alias[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Alias(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1AnywhereConfiguration - */ -const de_AnywhereConfiguration = (output: any, context: __SerdeContext): AnywhereConfiguration => { - return { - Cost: __expectString(output.Cost), - } as any; -}; - +// de_AnywhereConfiguration omitted. + /** * deserializeAws_json1_1AttributeValue */ const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue => { - return { - N: __limitedParseDouble(output.N), - S: __expectString(output.S), - SDM: output.SDM != null ? de_PlayerAttributeStringDoubleMap(output.SDM, context) : undefined, - SL: output.SL != null ? de_PlayerAttributeStringList(output.SL, context) : undefined, - } as any; + return take(output, { + N: __limitedParseDouble, + S: __expectString, + SDM: (_: any) => de_PlayerAttributeStringDoubleMap(_, context), + SL: _json, + }) as any; }; -/** - * deserializeAws_json1_1AwsCredentials - */ -const de_AwsCredentials = (output: any, context: __SerdeContext): AwsCredentials => { - return { - AccessKeyId: __expectString(output.AccessKeyId), - SecretAccessKey: __expectString(output.SecretAccessKey), - SessionToken: __expectString(output.SessionToken), - } as any; -}; +// de_AwsCredentials omitted. /** * deserializeAws_json1_1Build */ const de_Build = (output: any, context: __SerdeContext): Build => { - return { - BuildArn: __expectString(output.BuildArn), - BuildId: __expectString(output.BuildId), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Name: __expectString(output.Name), - OperatingSystem: __expectString(output.OperatingSystem), - ServerSdkVersion: __expectString(output.ServerSdkVersion), - SizeOnDisk: __expectLong(output.SizeOnDisk), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; + return take(output, { + BuildArn: __expectString, + BuildId: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OperatingSystem: __expectString, + ServerSdkVersion: __expectString, + SizeOnDisk: __expectLong, + Status: __expectString, + Version: __expectString, + }) as any; }; /** @@ -10189,53 +8578,40 @@ const de_BuildList = (output: any, context: __SerdeContext): Build[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Build(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CertificateConfiguration - */ -const de_CertificateConfiguration = (output: any, context: __SerdeContext): CertificateConfiguration => { - return { - CertificateType: __expectString(output.CertificateType), - } as any; -}; +// de_CertificateConfiguration omitted. /** * deserializeAws_json1_1ClaimGameServerOutput */ const de_ClaimGameServerOutput = (output: any, context: __SerdeContext): ClaimGameServerOutput => { - return { - GameServer: output.GameServer != null ? de_GameServer(output.GameServer, context) : undefined, - } as any; + return take(output, { + GameServer: (_: any) => de_GameServer(_, context), + }) as any; }; /** * deserializeAws_json1_1Compute */ const de_Compute = (output: any, context: __SerdeContext): Compute => { - return { - ComputeArn: __expectString(output.ComputeArn), - ComputeName: __expectString(output.ComputeName), - ComputeStatus: __expectString(output.ComputeStatus), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DnsName: __expectString(output.DnsName), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - GameLiftServiceSdkEndpoint: __expectString(output.GameLiftServiceSdkEndpoint), - IpAddress: __expectString(output.IpAddress), - Location: __expectString(output.Location), - OperatingSystem: __expectString(output.OperatingSystem), - Type: __expectString(output.Type), - } as any; + return take(output, { + ComputeArn: __expectString, + ComputeName: __expectString, + ComputeStatus: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DnsName: __expectString, + FleetArn: __expectString, + FleetId: __expectString, + GameLiftServiceSdkEndpoint: __expectString, + IpAddress: __expectString, + Location: __expectString, + OperatingSystem: __expectString, + Type: __expectString, + }) as any; }; /** @@ -10245,101 +8621,66 @@ const de_ComputeList = (output: any, context: __SerdeContext): Compute[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Compute(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. /** * deserializeAws_json1_1CreateAliasOutput */ const de_CreateAliasOutput = (output: any, context: __SerdeContext): CreateAliasOutput => { - return { - Alias: output.Alias != null ? de_Alias(output.Alias, context) : undefined, - } as any; + return take(output, { + Alias: (_: any) => de_Alias(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateBuildOutput */ const de_CreateBuildOutput = (output: any, context: __SerdeContext): CreateBuildOutput => { - return { - Build: output.Build != null ? de_Build(output.Build, context) : undefined, - StorageLocation: output.StorageLocation != null ? de_S3Location(output.StorageLocation, context) : undefined, - UploadCredentials: - output.UploadCredentials != null ? de_AwsCredentials(output.UploadCredentials, context) : undefined, - } as any; + return take(output, { + Build: (_: any) => de_Build(_, context), + StorageLocation: _json, + UploadCredentials: _json, + }) as any; }; -/** - * deserializeAws_json1_1CreateFleetLocationsOutput - */ -const de_CreateFleetLocationsOutput = (output: any, context: __SerdeContext): CreateFleetLocationsOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - LocationStates: output.LocationStates != null ? de_LocationStateList(output.LocationStates, context) : undefined, - } as any; -}; +// de_CreateFleetLocationsOutput omitted. /** * deserializeAws_json1_1CreateFleetOutput */ const de_CreateFleetOutput = (output: any, context: __SerdeContext): CreateFleetOutput => { - return { - FleetAttributes: output.FleetAttributes != null ? de_FleetAttributes(output.FleetAttributes, context) : undefined, - LocationStates: output.LocationStates != null ? de_LocationStateList(output.LocationStates, context) : undefined, - } as any; + return take(output, { + FleetAttributes: (_: any) => de_FleetAttributes(_, context), + LocationStates: _json, + }) as any; }; /** * deserializeAws_json1_1CreateGameServerGroupOutput */ const de_CreateGameServerGroupOutput = (output: any, context: __SerdeContext): CreateGameServerGroupOutput => { - return { - GameServerGroup: output.GameServerGroup != null ? de_GameServerGroup(output.GameServerGroup, context) : undefined, - } as any; + return take(output, { + GameServerGroup: (_: any) => de_GameServerGroup(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateGameSessionOutput */ const de_CreateGameSessionOutput = (output: any, context: __SerdeContext): CreateGameSessionOutput => { - return { - GameSession: output.GameSession != null ? de_GameSession(output.GameSession, context) : undefined, - } as any; + return take(output, { + GameSession: (_: any) => de_GameSession(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateGameSessionQueueOutput - */ -const de_CreateGameSessionQueueOutput = (output: any, context: __SerdeContext): CreateGameSessionQueueOutput => { - return { - GameSessionQueue: - output.GameSessionQueue != null ? de_GameSessionQueue(output.GameSessionQueue, context) : undefined, - } as any; -}; +// de_CreateGameSessionQueueOutput omitted. -/** - * deserializeAws_json1_1CreateLocationOutput - */ -const de_CreateLocationOutput = (output: any, context: __SerdeContext): CreateLocationOutput => { - return { - Location: output.Location != null ? de_LocationModel(output.Location, context) : undefined, - } as any; -}; +// de_CreateLocationOutput omitted. /** * deserializeAws_json1_1CreateMatchmakingConfigurationOutput @@ -10348,46 +8689,45 @@ const de_CreateMatchmakingConfigurationOutput = ( output: any, context: __SerdeContext ): CreateMatchmakingConfigurationOutput => { - return { - Configuration: - output.Configuration != null ? de_MatchmakingConfiguration(output.Configuration, context) : undefined, - } as any; + return take(output, { + Configuration: (_: any) => de_MatchmakingConfiguration(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateMatchmakingRuleSetOutput */ const de_CreateMatchmakingRuleSetOutput = (output: any, context: __SerdeContext): CreateMatchmakingRuleSetOutput => { - return { - RuleSet: output.RuleSet != null ? de_MatchmakingRuleSet(output.RuleSet, context) : undefined, - } as any; + return take(output, { + RuleSet: (_: any) => de_MatchmakingRuleSet(_, context), + }) as any; }; /** * deserializeAws_json1_1CreatePlayerSessionOutput */ const de_CreatePlayerSessionOutput = (output: any, context: __SerdeContext): CreatePlayerSessionOutput => { - return { - PlayerSession: output.PlayerSession != null ? de_PlayerSession(output.PlayerSession, context) : undefined, - } as any; + return take(output, { + PlayerSession: (_: any) => de_PlayerSession(_, context), + }) as any; }; /** * deserializeAws_json1_1CreatePlayerSessionsOutput */ const de_CreatePlayerSessionsOutput = (output: any, context: __SerdeContext): CreatePlayerSessionsOutput => { - return { - PlayerSessions: output.PlayerSessions != null ? de_PlayerSessionList(output.PlayerSessions, context) : undefined, - } as any; + return take(output, { + PlayerSessions: (_: any) => de_PlayerSessionList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateScriptOutput */ const de_CreateScriptOutput = (output: any, context: __SerdeContext): CreateScriptOutput => { - return { - Script: output.Script != null ? de_Script(output.Script, context) : undefined, - } as any; + return take(output, { + Script: (_: any) => de_Script(_, context), + }) as any; }; /** @@ -10397,266 +8737,117 @@ const de_CreateVpcPeeringAuthorizationOutput = ( output: any, context: __SerdeContext ): CreateVpcPeeringAuthorizationOutput => { - return { - VpcPeeringAuthorization: - output.VpcPeeringAuthorization != null - ? de_VpcPeeringAuthorization(output.VpcPeeringAuthorization, context) - : undefined, - } as any; + return take(output, { + VpcPeeringAuthorization: (_: any) => de_VpcPeeringAuthorization(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateVpcPeeringConnectionOutput - */ -const de_CreateVpcPeeringConnectionOutput = ( - output: any, - context: __SerdeContext -): CreateVpcPeeringConnectionOutput => { - return {} as any; -}; +// de_CreateVpcPeeringConnectionOutput omitted. -/** - * deserializeAws_json1_1DeleteFleetLocationsOutput - */ -const de_DeleteFleetLocationsOutput = (output: any, context: __SerdeContext): DeleteFleetLocationsOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - LocationStates: output.LocationStates != null ? de_LocationStateList(output.LocationStates, context) : undefined, - } as any; -}; +// de_DeleteFleetLocationsOutput omitted. /** * deserializeAws_json1_1DeleteGameServerGroupOutput */ const de_DeleteGameServerGroupOutput = (output: any, context: __SerdeContext): DeleteGameServerGroupOutput => { - return { - GameServerGroup: output.GameServerGroup != null ? de_GameServerGroup(output.GameServerGroup, context) : undefined, - } as any; + return take(output, { + GameServerGroup: (_: any) => de_GameServerGroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteGameSessionQueueOutput - */ -const de_DeleteGameSessionQueueOutput = (output: any, context: __SerdeContext): DeleteGameSessionQueueOutput => { - return {} as any; -}; +// de_DeleteGameSessionQueueOutput omitted. -/** - * deserializeAws_json1_1DeleteLocationOutput - */ -const de_DeleteLocationOutput = (output: any, context: __SerdeContext): DeleteLocationOutput => { - return {} as any; -}; +// de_DeleteLocationOutput omitted. -/** - * deserializeAws_json1_1DeleteMatchmakingConfigurationOutput - */ -const de_DeleteMatchmakingConfigurationOutput = ( - output: any, - context: __SerdeContext -): DeleteMatchmakingConfigurationOutput => { - return {} as any; -}; +// de_DeleteMatchmakingConfigurationOutput omitted. -/** - * deserializeAws_json1_1DeleteMatchmakingRuleSetOutput - */ -const de_DeleteMatchmakingRuleSetOutput = (output: any, context: __SerdeContext): DeleteMatchmakingRuleSetOutput => { - return {} as any; -}; +// de_DeleteMatchmakingRuleSetOutput omitted. -/** - * deserializeAws_json1_1DeleteVpcPeeringAuthorizationOutput - */ -const de_DeleteVpcPeeringAuthorizationOutput = ( - output: any, - context: __SerdeContext -): DeleteVpcPeeringAuthorizationOutput => { - return {} as any; -}; +// de_DeleteVpcPeeringAuthorizationOutput omitted. -/** - * deserializeAws_json1_1DeleteVpcPeeringConnectionOutput - */ -const de_DeleteVpcPeeringConnectionOutput = ( - output: any, - context: __SerdeContext -): DeleteVpcPeeringConnectionOutput => { - return {} as any; -}; +// de_DeleteVpcPeeringConnectionOutput omitted. -/** - * deserializeAws_json1_1DeregisterComputeOutput - */ -const de_DeregisterComputeOutput = (output: any, context: __SerdeContext): DeregisterComputeOutput => { - return {} as any; -}; +// de_DeregisterComputeOutput omitted. /** * deserializeAws_json1_1DescribeAliasOutput */ const de_DescribeAliasOutput = (output: any, context: __SerdeContext): DescribeAliasOutput => { - return { - Alias: output.Alias != null ? de_Alias(output.Alias, context) : undefined, - } as any; + return take(output, { + Alias: (_: any) => de_Alias(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeBuildOutput */ const de_DescribeBuildOutput = (output: any, context: __SerdeContext): DescribeBuildOutput => { - return { - Build: output.Build != null ? de_Build(output.Build, context) : undefined, - } as any; + return take(output, { + Build: (_: any) => de_Build(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeComputeOutput */ const de_DescribeComputeOutput = (output: any, context: __SerdeContext): DescribeComputeOutput => { - return { - Compute: output.Compute != null ? de_Compute(output.Compute, context) : undefined, - } as any; + return take(output, { + Compute: (_: any) => de_Compute(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeEC2InstanceLimitsOutput - */ -const de_DescribeEC2InstanceLimitsOutput = (output: any, context: __SerdeContext): DescribeEC2InstanceLimitsOutput => { - return { - EC2InstanceLimits: - output.EC2InstanceLimits != null ? de_EC2InstanceLimitList(output.EC2InstanceLimits, context) : undefined, - } as any; -}; +// de_DescribeEC2InstanceLimitsOutput omitted. /** * deserializeAws_json1_1DescribeFleetAttributesOutput */ const de_DescribeFleetAttributesOutput = (output: any, context: __SerdeContext): DescribeFleetAttributesOutput => { - return { - FleetAttributes: - output.FleetAttributes != null ? de_FleetAttributesList(output.FleetAttributes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + FleetAttributes: (_: any) => de_FleetAttributesList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeFleetCapacityOutput - */ -const de_DescribeFleetCapacityOutput = (output: any, context: __SerdeContext): DescribeFleetCapacityOutput => { - return { - FleetCapacity: output.FleetCapacity != null ? de_FleetCapacityList(output.FleetCapacity, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeFleetCapacityOutput omitted. /** * deserializeAws_json1_1DescribeFleetEventsOutput */ const de_DescribeFleetEventsOutput = (output: any, context: __SerdeContext): DescribeFleetEventsOutput => { - return { - Events: output.Events != null ? de_EventList(output.Events, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Events: (_: any) => de_EventList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeFleetLocationAttributesOutput - */ -const de_DescribeFleetLocationAttributesOutput = ( - output: any, - context: __SerdeContext -): DescribeFleetLocationAttributesOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - LocationAttributes: - output.LocationAttributes != null ? de_LocationAttributesList(output.LocationAttributes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeFleetLocationAttributesOutput omitted. -/** - * deserializeAws_json1_1DescribeFleetLocationCapacityOutput - */ -const de_DescribeFleetLocationCapacityOutput = ( - output: any, - context: __SerdeContext -): DescribeFleetLocationCapacityOutput => { - return { - FleetCapacity: output.FleetCapacity != null ? de_FleetCapacity(output.FleetCapacity, context) : undefined, - } as any; -}; +// de_DescribeFleetLocationCapacityOutput omitted. -/** - * deserializeAws_json1_1DescribeFleetLocationUtilizationOutput - */ -const de_DescribeFleetLocationUtilizationOutput = ( - output: any, - context: __SerdeContext -): DescribeFleetLocationUtilizationOutput => { - return { - FleetUtilization: - output.FleetUtilization != null ? de_FleetUtilization(output.FleetUtilization, context) : undefined, - } as any; -}; +// de_DescribeFleetLocationUtilizationOutput omitted. -/** - * deserializeAws_json1_1DescribeFleetPortSettingsOutput - */ -const de_DescribeFleetPortSettingsOutput = (output: any, context: __SerdeContext): DescribeFleetPortSettingsOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - InboundPermissions: - output.InboundPermissions != null ? de_IpPermissionsList(output.InboundPermissions, context) : undefined, - Location: __expectString(output.Location), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; -}; +// de_DescribeFleetPortSettingsOutput omitted. -/** - * deserializeAws_json1_1DescribeFleetUtilizationOutput - */ -const de_DescribeFleetUtilizationOutput = (output: any, context: __SerdeContext): DescribeFleetUtilizationOutput => { - return { - FleetUtilization: - output.FleetUtilization != null ? de_FleetUtilizationList(output.FleetUtilization, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeFleetUtilizationOutput omitted. /** * deserializeAws_json1_1DescribeGameServerGroupOutput */ const de_DescribeGameServerGroupOutput = (output: any, context: __SerdeContext): DescribeGameServerGroupOutput => { - return { - GameServerGroup: output.GameServerGroup != null ? de_GameServerGroup(output.GameServerGroup, context) : undefined, - } as any; + return take(output, { + GameServerGroup: (_: any) => de_GameServerGroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeGameServerInstancesOutput - */ -const de_DescribeGameServerInstancesOutput = ( - output: any, - context: __SerdeContext -): DescribeGameServerInstancesOutput => { - return { - GameServerInstances: - output.GameServerInstances != null ? de_GameServerInstances(output.GameServerInstances, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeGameServerInstancesOutput omitted. /** * deserializeAws_json1_1DescribeGameServerOutput */ const de_DescribeGameServerOutput = (output: any, context: __SerdeContext): DescribeGameServerOutput => { - return { - GameServer: output.GameServer != null ? de_GameServer(output.GameServer, context) : undefined, - } as any; + return take(output, { + GameServer: (_: any) => de_GameServer(_, context), + }) as any; }; /** @@ -10666,11 +8857,10 @@ const de_DescribeGameSessionDetailsOutput = ( output: any, context: __SerdeContext ): DescribeGameSessionDetailsOutput => { - return { - GameSessionDetails: - output.GameSessionDetails != null ? de_GameSessionDetailList(output.GameSessionDetails, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + GameSessionDetails: (_: any) => de_GameSessionDetailList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10680,41 +8870,31 @@ const de_DescribeGameSessionPlacementOutput = ( output: any, context: __SerdeContext ): DescribeGameSessionPlacementOutput => { - return { - GameSessionPlacement: - output.GameSessionPlacement != null ? de_GameSessionPlacement(output.GameSessionPlacement, context) : undefined, - } as any; + return take(output, { + GameSessionPlacement: (_: any) => de_GameSessionPlacement(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeGameSessionQueuesOutput - */ -const de_DescribeGameSessionQueuesOutput = (output: any, context: __SerdeContext): DescribeGameSessionQueuesOutput => { - return { - GameSessionQueues: - output.GameSessionQueues != null ? de_GameSessionQueueList(output.GameSessionQueues, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeGameSessionQueuesOutput omitted. /** * deserializeAws_json1_1DescribeGameSessionsOutput */ const de_DescribeGameSessionsOutput = (output: any, context: __SerdeContext): DescribeGameSessionsOutput => { - return { - GameSessions: output.GameSessions != null ? de_GameSessionList(output.GameSessions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + GameSessions: (_: any) => de_GameSessionList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeInstancesOutput */ const de_DescribeInstancesOutput = (output: any, context: __SerdeContext): DescribeInstancesOutput => { - return { - Instances: output.Instances != null ? de_InstanceList(output.Instances, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Instances: (_: any) => de_InstanceList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -10724,20 +8904,19 @@ const de_DescribeMatchmakingConfigurationsOutput = ( output: any, context: __SerdeContext ): DescribeMatchmakingConfigurationsOutput => { - return { - Configurations: - output.Configurations != null ? de_MatchmakingConfigurationList(output.Configurations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Configurations: (_: any) => de_MatchmakingConfigurationList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeMatchmakingOutput */ const de_DescribeMatchmakingOutput = (output: any, context: __SerdeContext): DescribeMatchmakingOutput => { - return { - TicketList: output.TicketList != null ? de_MatchmakingTicketList(output.TicketList, context) : undefined, - } as any; + return take(output, { + TicketList: (_: any) => de_MatchmakingTicketList(_, context), + }) as any; }; /** @@ -10747,421 +8926,195 @@ const de_DescribeMatchmakingRuleSetsOutput = ( output: any, context: __SerdeContext ): DescribeMatchmakingRuleSetsOutput => { - return { - NextToken: __expectString(output.NextToken), - RuleSets: output.RuleSets != null ? de_MatchmakingRuleSetList(output.RuleSets, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RuleSets: (_: any) => de_MatchmakingRuleSetList(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribePlayerSessionsOutput */ const de_DescribePlayerSessionsOutput = (output: any, context: __SerdeContext): DescribePlayerSessionsOutput => { - return { - NextToken: __expectString(output.NextToken), - PlayerSessions: output.PlayerSessions != null ? de_PlayerSessionList(output.PlayerSessions, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PlayerSessions: (_: any) => de_PlayerSessionList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeRuntimeConfigurationOutput - */ -const de_DescribeRuntimeConfigurationOutput = ( - output: any, - context: __SerdeContext -): DescribeRuntimeConfigurationOutput => { - return { - RuntimeConfiguration: - output.RuntimeConfiguration != null ? de_RuntimeConfiguration(output.RuntimeConfiguration, context) : undefined, - } as any; -}; +// de_DescribeRuntimeConfigurationOutput omitted. /** * deserializeAws_json1_1DescribeScalingPoliciesOutput */ const de_DescribeScalingPoliciesOutput = (output: any, context: __SerdeContext): DescribeScalingPoliciesOutput => { - return { - NextToken: __expectString(output.NextToken), - ScalingPolicies: output.ScalingPolicies != null ? de_ScalingPolicyList(output.ScalingPolicies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeScriptOutput - */ -const de_DescribeScriptOutput = (output: any, context: __SerdeContext): DescribeScriptOutput => { - return { - Script: output.Script != null ? de_Script(output.Script, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeVpcPeeringAuthorizationsOutput - */ -const de_DescribeVpcPeeringAuthorizationsOutput = ( - output: any, - context: __SerdeContext -): DescribeVpcPeeringAuthorizationsOutput => { - return { - VpcPeeringAuthorizations: - output.VpcPeeringAuthorizations != null - ? de_VpcPeeringAuthorizationList(output.VpcPeeringAuthorizations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeVpcPeeringConnectionsOutput - */ -const de_DescribeVpcPeeringConnectionsOutput = ( - output: any, - context: __SerdeContext -): DescribeVpcPeeringConnectionsOutput => { - return { - VpcPeeringConnections: - output.VpcPeeringConnections != null - ? de_VpcPeeringConnectionList(output.VpcPeeringConnections, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EC2InstanceCounts - */ -const de_EC2InstanceCounts = (output: any, context: __SerdeContext): EC2InstanceCounts => { - return { - ACTIVE: __expectInt32(output.ACTIVE), - DESIRED: __expectInt32(output.DESIRED), - IDLE: __expectInt32(output.IDLE), - MAXIMUM: __expectInt32(output.MAXIMUM), - MINIMUM: __expectInt32(output.MINIMUM), - PENDING: __expectInt32(output.PENDING), - TERMINATING: __expectInt32(output.TERMINATING), - } as any; -}; - -/** - * deserializeAws_json1_1EC2InstanceLimit - */ -const de_EC2InstanceLimit = (output: any, context: __SerdeContext): EC2InstanceLimit => { - return { - CurrentInstances: __expectInt32(output.CurrentInstances), - EC2InstanceType: __expectString(output.EC2InstanceType), - InstanceLimit: __expectInt32(output.InstanceLimit), - Location: __expectString(output.Location), - } as any; -}; - -/** - * deserializeAws_json1_1EC2InstanceLimitList - */ -const de_EC2InstanceLimitList = (output: any, context: __SerdeContext): EC2InstanceLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EC2InstanceLimit(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Event - */ -const de_Event = (output: any, context: __SerdeContext): Event => { - return { - EventCode: __expectString(output.EventCode), - EventId: __expectString(output.EventId), - EventTime: - output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined, - Message: __expectString(output.Message), - PreSignedLogUrl: __expectString(output.PreSignedLogUrl), - ResourceId: __expectString(output.ResourceId), - } as any; -}; - -/** - * deserializeAws_json1_1EventList - */ -const de_EventList = (output: any, context: __SerdeContext): Event[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Event(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FilterConfiguration - */ -const de_FilterConfiguration = (output: any, context: __SerdeContext): FilterConfiguration => { - return { - AllowedLocations: output.AllowedLocations != null ? de_LocationList(output.AllowedLocations, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FleetActionList - */ -const de_FleetActionList = (output: any, context: __SerdeContext): (FleetAction | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FleetAttributes - */ -const de_FleetAttributes = (output: any, context: __SerdeContext): FleetAttributes => { - return { - AnywhereConfiguration: - output.AnywhereConfiguration != null - ? de_AnywhereConfiguration(output.AnywhereConfiguration, context) - : undefined, - BuildArn: __expectString(output.BuildArn), - BuildId: __expectString(output.BuildId), - CertificateConfiguration: - output.CertificateConfiguration != null - ? de_CertificateConfiguration(output.CertificateConfiguration, context) - : undefined, - ComputeType: __expectString(output.ComputeType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - FleetType: __expectString(output.FleetType), - InstanceRoleArn: __expectString(output.InstanceRoleArn), - InstanceType: __expectString(output.InstanceType), - LogPaths: output.LogPaths != null ? de_StringList(output.LogPaths, context) : undefined, - MetricGroups: output.MetricGroups != null ? de_MetricGroupList(output.MetricGroups, context) : undefined, - Name: __expectString(output.Name), - NewGameSessionProtectionPolicy: __expectString(output.NewGameSessionProtectionPolicy), - OperatingSystem: __expectString(output.OperatingSystem), - ResourceCreationLimitPolicy: - output.ResourceCreationLimitPolicy != null - ? de_ResourceCreationLimitPolicy(output.ResourceCreationLimitPolicy, context) - : undefined, - ScriptArn: __expectString(output.ScriptArn), - ScriptId: __expectString(output.ScriptId), - ServerLaunchParameters: __expectString(output.ServerLaunchParameters), - ServerLaunchPath: __expectString(output.ServerLaunchPath), - Status: __expectString(output.Status), - StoppedActions: output.StoppedActions != null ? de_FleetActionList(output.StoppedActions, context) : undefined, - TerminationTime: - output.TerminationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TerminationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FleetAttributesList - */ -const de_FleetAttributesList = (output: any, context: __SerdeContext): FleetAttributes[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetAttributes(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FleetCapacity - */ -const de_FleetCapacity = (output: any, context: __SerdeContext): FleetCapacity => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - InstanceCounts: output.InstanceCounts != null ? de_EC2InstanceCounts(output.InstanceCounts, context) : undefined, - InstanceType: __expectString(output.InstanceType), - Location: __expectString(output.Location), - } as any; -}; - -/** - * deserializeAws_json1_1FleetCapacityExceededException - */ -const de_FleetCapacityExceededException = (output: any, context: __SerdeContext): FleetCapacityExceededException => { - return { - Message: __expectString(output.Message), - } as any; + return take(output, { + NextToken: __expectString, + ScalingPolicies: (_: any) => de_ScalingPolicyList(_, context), + }) as any; }; - -/** - * deserializeAws_json1_1FleetCapacityList - */ -const de_FleetCapacityList = (output: any, context: __SerdeContext): FleetCapacity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetCapacity(entry, context); - }); - return retVal; + +/** + * deserializeAws_json1_1DescribeScriptOutput + */ +const de_DescribeScriptOutput = (output: any, context: __SerdeContext): DescribeScriptOutput => { + return take(output, { + Script: (_: any) => de_Script(_, context), + }) as any; }; /** - * deserializeAws_json1_1FleetIdList + * deserializeAws_json1_1DescribeVpcPeeringAuthorizationsOutput */ -const de_FleetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeVpcPeeringAuthorizationsOutput = ( + output: any, + context: __SerdeContext +): DescribeVpcPeeringAuthorizationsOutput => { + return take(output, { + VpcPeeringAuthorizations: (_: any) => de_VpcPeeringAuthorizationList(_, context), + }) as any; }; +// de_DescribeVpcPeeringConnectionsOutput omitted. + +// de_EC2InstanceCounts omitted. + +// de_EC2InstanceLimit omitted. + +// de_EC2InstanceLimitList omitted. + /** - * deserializeAws_json1_1FleetUtilization + * deserializeAws_json1_1Event */ -const de_FleetUtilization = (output: any, context: __SerdeContext): FleetUtilization => { - return { - ActiveGameSessionCount: __expectInt32(output.ActiveGameSessionCount), - ActiveServerProcessCount: __expectInt32(output.ActiveServerProcessCount), - CurrentPlayerSessionCount: __expectInt32(output.CurrentPlayerSessionCount), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - Location: __expectString(output.Location), - MaximumPlayerSessionCount: __expectInt32(output.MaximumPlayerSessionCount), - } as any; +const de_Event = (output: any, context: __SerdeContext): Event => { + return take(output, { + EventCode: __expectString, + EventId: __expectString, + EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + PreSignedLogUrl: __expectString, + ResourceId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1FleetUtilizationList + * deserializeAws_json1_1EventList */ -const de_FleetUtilizationList = (output: any, context: __SerdeContext): FleetUtilization[] => { +const de_EventList = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetUtilization(entry, context); + return de_Event(entry, context); }); return retVal; }; +// de_FilterConfiguration omitted. + +// de_FleetActionList omitted. + /** - * deserializeAws_json1_1GameProperty + * deserializeAws_json1_1FleetAttributes */ -const de_GameProperty = (output: any, context: __SerdeContext): GameProperty => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_FleetAttributes = (output: any, context: __SerdeContext): FleetAttributes => { + return take(output, { + AnywhereConfiguration: _json, + BuildArn: __expectString, + BuildId: __expectString, + CertificateConfiguration: _json, + ComputeType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + FleetArn: __expectString, + FleetId: __expectString, + FleetType: __expectString, + InstanceRoleArn: __expectString, + InstanceType: __expectString, + LogPaths: _json, + MetricGroups: _json, + Name: __expectString, + NewGameSessionProtectionPolicy: __expectString, + OperatingSystem: __expectString, + ResourceCreationLimitPolicy: _json, + ScriptArn: __expectString, + ScriptId: __expectString, + ServerLaunchParameters: __expectString, + ServerLaunchPath: __expectString, + Status: __expectString, + StoppedActions: _json, + TerminationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1GamePropertyList + * deserializeAws_json1_1FleetAttributesList */ -const de_GamePropertyList = (output: any, context: __SerdeContext): GameProperty[] => { +const de_FleetAttributesList = (output: any, context: __SerdeContext): FleetAttributes[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GameProperty(entry, context); + return de_FleetAttributes(entry, context); }); return retVal; }; +// de_FleetCapacity omitted. + +// de_FleetCapacityExceededException omitted. + +// de_FleetCapacityList omitted. + +// de_FleetIdList omitted. + +// de_FleetUtilization omitted. + +// de_FleetUtilizationList omitted. + +// de_GameProperty omitted. + +// de_GamePropertyList omitted. + /** * deserializeAws_json1_1GameServer */ const de_GameServer = (output: any, context: __SerdeContext): GameServer => { - return { - ClaimStatus: __expectString(output.ClaimStatus), - ConnectionInfo: __expectString(output.ConnectionInfo), - GameServerData: __expectString(output.GameServerData), - GameServerGroupArn: __expectString(output.GameServerGroupArn), - GameServerGroupName: __expectString(output.GameServerGroupName), - GameServerId: __expectString(output.GameServerId), - InstanceId: __expectString(output.InstanceId), - LastClaimTime: - output.LastClaimTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastClaimTime))) - : undefined, - LastHealthCheckTime: - output.LastHealthCheckTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastHealthCheckTime))) - : undefined, - RegistrationTime: - output.RegistrationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RegistrationTime))) - : undefined, - UtilizationStatus: __expectString(output.UtilizationStatus), - } as any; + return take(output, { + ClaimStatus: __expectString, + ConnectionInfo: __expectString, + GameServerData: __expectString, + GameServerGroupArn: __expectString, + GameServerGroupName: __expectString, + GameServerId: __expectString, + InstanceId: __expectString, + LastClaimTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastHealthCheckTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RegistrationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UtilizationStatus: __expectString, + }) as any; }; /** * deserializeAws_json1_1GameServerGroup */ const de_GameServerGroup = (output: any, context: __SerdeContext): GameServerGroup => { - return { - AutoScalingGroupArn: __expectString(output.AutoScalingGroupArn), - BalancingStrategy: __expectString(output.BalancingStrategy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - GameServerGroupArn: __expectString(output.GameServerGroupArn), - GameServerGroupName: __expectString(output.GameServerGroupName), - GameServerProtectionPolicy: __expectString(output.GameServerProtectionPolicy), - InstanceDefinitions: - output.InstanceDefinitions != null ? de_InstanceDefinitions(output.InstanceDefinitions, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - SuspendedActions: - output.SuspendedActions != null ? de_GameServerGroupActions(output.SuspendedActions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GameServerGroupActions - */ -const de_GameServerGroupActions = (output: any, context: __SerdeContext): (GameServerGroupAction | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + AutoScalingGroupArn: __expectString, + BalancingStrategy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GameServerGroupArn: __expectString, + GameServerGroupName: __expectString, + GameServerProtectionPolicy: __expectString, + InstanceDefinitions: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + Status: __expectString, + StatusReason: __expectString, + SuspendedActions: _json, + }) as any; }; +// de_GameServerGroupActions omitted. + /** * deserializeAws_json1_1GameServerGroups */ @@ -11169,40 +9122,14 @@ const de_GameServerGroups = (output: any, context: __SerdeContext): GameServerGr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GameServerGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1GameServerInstance - */ -const de_GameServerInstance = (output: any, context: __SerdeContext): GameServerInstance => { - return { - GameServerGroupArn: __expectString(output.GameServerGroupArn), - GameServerGroupName: __expectString(output.GameServerGroupName), - InstanceId: __expectString(output.InstanceId), - InstanceStatus: __expectString(output.InstanceStatus), - } as any; -}; +// de_GameServerInstance omitted. -/** - * deserializeAws_json1_1GameServerInstances - */ -const de_GameServerInstances = (output: any, context: __SerdeContext): GameServerInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GameServerInstance(entry, context); - }); - return retVal; -}; +// de_GameServerInstances omitted. /** * deserializeAws_json1_1GameServers @@ -11211,9 +9138,6 @@ const de_GameServers = (output: any, context: __SerdeContext): GameServer[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GameServer(entry, context); }); return retVal; @@ -11223,59 +9147,39 @@ const de_GameServers = (output: any, context: __SerdeContext): GameServer[] => { * deserializeAws_json1_1GameSession */ const de_GameSession = (output: any, context: __SerdeContext): GameSession => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CreatorId: __expectString(output.CreatorId), - CurrentPlayerSessionCount: __expectInt32(output.CurrentPlayerSessionCount), - DnsName: __expectString(output.DnsName), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - GameProperties: output.GameProperties != null ? de_GamePropertyList(output.GameProperties, context) : undefined, - GameSessionData: __expectString(output.GameSessionData), - GameSessionId: __expectString(output.GameSessionId), - IpAddress: __expectString(output.IpAddress), - Location: __expectString(output.Location), - MatchmakerData: __expectString(output.MatchmakerData), - MaximumPlayerSessionCount: __expectInt32(output.MaximumPlayerSessionCount), - Name: __expectString(output.Name), - PlayerSessionCreationPolicy: __expectString(output.PlayerSessionCreationPolicy), - Port: __expectInt32(output.Port), - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - TerminationTime: - output.TerminationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TerminationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GameSessionConnectionInfo - */ -const de_GameSessionConnectionInfo = (output: any, context: __SerdeContext): GameSessionConnectionInfo => { - return { - DnsName: __expectString(output.DnsName), - GameSessionArn: __expectString(output.GameSessionArn), - IpAddress: __expectString(output.IpAddress), - MatchedPlayerSessions: - output.MatchedPlayerSessions != null - ? de_MatchedPlayerSessionList(output.MatchedPlayerSessions, context) - : undefined, - Port: __expectInt32(output.Port), - } as any; -}; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorId: __expectString, + CurrentPlayerSessionCount: __expectInt32, + DnsName: __expectString, + FleetArn: __expectString, + FleetId: __expectString, + GameProperties: _json, + GameSessionData: __expectString, + GameSessionId: __expectString, + IpAddress: __expectString, + Location: __expectString, + MatchmakerData: __expectString, + MaximumPlayerSessionCount: __expectInt32, + Name: __expectString, + PlayerSessionCreationPolicy: __expectString, + Port: __expectInt32, + Status: __expectString, + StatusReason: __expectString, + TerminationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_GameSessionConnectionInfo omitted. /** * deserializeAws_json1_1GameSessionDetail */ const de_GameSessionDetail = (output: any, context: __SerdeContext): GameSessionDetail => { - return { - GameSession: output.GameSession != null ? de_GameSession(output.GameSession, context) : undefined, - ProtectionPolicy: __expectString(output.ProtectionPolicy), - } as any; + return take(output, { + GameSession: (_: any) => de_GameSession(_, context), + ProtectionPolicy: __expectString, + }) as any; }; /** @@ -11285,22 +9189,12 @@ const de_GameSessionDetailList = (output: any, context: __SerdeContext): GameSes const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GameSessionDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1GameSessionFullException - */ -const de_GameSessionFullException = (output: any, context: __SerdeContext): GameSessionFullException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_GameSessionFullException omitted. /** * deserializeAws_json1_1GameSessionList @@ -11309,9 +9203,6 @@ const de_GameSessionList = (output: any, context: __SerdeContext): GameSession[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GameSession(entry, context); }); return retVal; @@ -11321,225 +9212,83 @@ const de_GameSessionList = (output: any, context: __SerdeContext): GameSession[] * deserializeAws_json1_1GameSessionPlacement */ const de_GameSessionPlacement = (output: any, context: __SerdeContext): GameSessionPlacement => { - return { - DnsName: __expectString(output.DnsName), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - GameProperties: output.GameProperties != null ? de_GamePropertyList(output.GameProperties, context) : undefined, - GameSessionArn: __expectString(output.GameSessionArn), - GameSessionData: __expectString(output.GameSessionData), - GameSessionId: __expectString(output.GameSessionId), - GameSessionName: __expectString(output.GameSessionName), - GameSessionQueueName: __expectString(output.GameSessionQueueName), - GameSessionRegion: __expectString(output.GameSessionRegion), - IpAddress: __expectString(output.IpAddress), - MatchmakerData: __expectString(output.MatchmakerData), - MaximumPlayerSessionCount: __expectInt32(output.MaximumPlayerSessionCount), - PlacedPlayerSessions: - output.PlacedPlayerSessions != null - ? de_PlacedPlayerSessionList(output.PlacedPlayerSessions, context) - : undefined, - PlacementId: __expectString(output.PlacementId), - PlayerLatencies: output.PlayerLatencies != null ? de_PlayerLatencyList(output.PlayerLatencies, context) : undefined, - Port: __expectInt32(output.Port), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1GameSessionQueue - */ -const de_GameSessionQueue = (output: any, context: __SerdeContext): GameSessionQueue => { - return { - CustomEventData: __expectString(output.CustomEventData), - Destinations: - output.Destinations != null ? de_GameSessionQueueDestinationList(output.Destinations, context) : undefined, - FilterConfiguration: - output.FilterConfiguration != null ? de_FilterConfiguration(output.FilterConfiguration, context) : undefined, - GameSessionQueueArn: __expectString(output.GameSessionQueueArn), - Name: __expectString(output.Name), - NotificationTarget: __expectString(output.NotificationTarget), - PlayerLatencyPolicies: - output.PlayerLatencyPolicies != null - ? de_PlayerLatencyPolicyList(output.PlayerLatencyPolicies, context) - : undefined, - PriorityConfiguration: - output.PriorityConfiguration != null - ? de_PriorityConfiguration(output.PriorityConfiguration, context) - : undefined, - TimeoutInSeconds: __expectInt32(output.TimeoutInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1GameSessionQueueDestination - */ -const de_GameSessionQueueDestination = (output: any, context: __SerdeContext): GameSessionQueueDestination => { - return { - DestinationArn: __expectString(output.DestinationArn), - } as any; + return take(output, { + DnsName: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GameProperties: _json, + GameSessionArn: __expectString, + GameSessionData: __expectString, + GameSessionId: __expectString, + GameSessionName: __expectString, + GameSessionQueueName: __expectString, + GameSessionRegion: __expectString, + IpAddress: __expectString, + MatchmakerData: __expectString, + MaximumPlayerSessionCount: __expectInt32, + PlacedPlayerSessions: _json, + PlacementId: __expectString, + PlayerLatencies: (_: any) => de_PlayerLatencyList(_, context), + Port: __expectInt32, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GameSessionQueueDestinationList - */ -const de_GameSessionQueueDestinationList = (output: any, context: __SerdeContext): GameSessionQueueDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GameSessionQueueDestination(entry, context); - }); - return retVal; -}; +// de_GameSessionQueue omitted. -/** - * deserializeAws_json1_1GameSessionQueueList - */ -const de_GameSessionQueueList = (output: any, context: __SerdeContext): GameSessionQueue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GameSessionQueue(entry, context); - }); - return retVal; -}; +// de_GameSessionQueueDestination omitted. -/** - * deserializeAws_json1_1GetComputeAccessOutput - */ -const de_GetComputeAccessOutput = (output: any, context: __SerdeContext): GetComputeAccessOutput => { - return { - ComputeArn: __expectString(output.ComputeArn), - ComputeName: __expectString(output.ComputeName), - Credentials: output.Credentials != null ? de_AwsCredentials(output.Credentials, context) : undefined, - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; -}; +// de_GameSessionQueueDestinationList omitted. + +// de_GameSessionQueueList omitted. + +// de_GetComputeAccessOutput omitted. /** * deserializeAws_json1_1GetComputeAuthTokenOutput */ const de_GetComputeAuthTokenOutput = (output: any, context: __SerdeContext): GetComputeAuthTokenOutput => { - return { - AuthToken: __expectString(output.AuthToken), - ComputeArn: __expectString(output.ComputeArn), - ComputeName: __expectString(output.ComputeName), - ExpirationTimestamp: - output.ExpirationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTimestamp))) - : undefined, - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; + return take(output, { + AuthToken: __expectString, + ComputeArn: __expectString, + ComputeName: __expectString, + ExpirationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FleetArn: __expectString, + FleetId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetGameSessionLogUrlOutput - */ -const de_GetGameSessionLogUrlOutput = (output: any, context: __SerdeContext): GetGameSessionLogUrlOutput => { - return { - PreSignedUrl: __expectString(output.PreSignedUrl), - } as any; -}; +// de_GetGameSessionLogUrlOutput omitted. -/** - * deserializeAws_json1_1GetInstanceAccessOutput - */ -const de_GetInstanceAccessOutput = (output: any, context: __SerdeContext): GetInstanceAccessOutput => { - return { - InstanceAccess: output.InstanceAccess != null ? de_InstanceAccess(output.InstanceAccess, context) : undefined, - } as any; -}; +// de_GetInstanceAccessOutput omitted. -/** - * deserializeAws_json1_1IdempotentParameterMismatchException - */ -const de_IdempotentParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotentParameterMismatchException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_IdempotentParameterMismatchException omitted. /** * deserializeAws_json1_1Instance */ const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DnsName: __expectString(output.DnsName), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - InstanceId: __expectString(output.InstanceId), - IpAddress: __expectString(output.IpAddress), - Location: __expectString(output.Location), - OperatingSystem: __expectString(output.OperatingSystem), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1InstanceAccess - */ -const de_InstanceAccess = (output: any, context: __SerdeContext): InstanceAccess => { - return { - Credentials: output.Credentials != null ? de_InstanceCredentials(output.Credentials, context) : undefined, - FleetId: __expectString(output.FleetId), - InstanceId: __expectString(output.InstanceId), - IpAddress: __expectString(output.IpAddress), - OperatingSystem: __expectString(output.OperatingSystem), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DnsName: __expectString, + FleetArn: __expectString, + FleetId: __expectString, + InstanceId: __expectString, + IpAddress: __expectString, + Location: __expectString, + OperatingSystem: __expectString, + Status: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InstanceCredentials - */ -const de_InstanceCredentials = (output: any, context: __SerdeContext): InstanceCredentials => { - return { - Secret: __expectString(output.Secret), - UserName: __expectString(output.UserName), - } as any; -}; +// de_InstanceAccess omitted. -/** - * deserializeAws_json1_1InstanceDefinition - */ -const de_InstanceDefinition = (output: any, context: __SerdeContext): InstanceDefinition => { - return { - InstanceType: __expectString(output.InstanceType), - WeightedCapacity: __expectString(output.WeightedCapacity), - } as any; -}; +// de_InstanceCredentials omitted. -/** - * deserializeAws_json1_1InstanceDefinitions - */ -const de_InstanceDefinitions = (output: any, context: __SerdeContext): InstanceDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceDefinition(entry, context); - }); - return retVal; -}; +// de_InstanceDefinition omitted. + +// de_InstanceDefinitions omitted. /** * deserializeAws_json1_1InstanceList @@ -11548,335 +9297,134 @@ const de_InstanceList = (output: any, context: __SerdeContext): Instance[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Instance(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InternalServiceException - */ -const de_InternalServiceException = (output: any, context: __SerdeContext): InternalServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceException omitted. -/** - * deserializeAws_json1_1InvalidFleetStatusException - */ -const de_InvalidFleetStatusException = (output: any, context: __SerdeContext): InvalidFleetStatusException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidFleetStatusException omitted. -/** - * deserializeAws_json1_1InvalidGameSessionStatusException - */ -const de_InvalidGameSessionStatusException = ( - output: any, - context: __SerdeContext -): InvalidGameSessionStatusException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidGameSessionStatusException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1IpPermission - */ -const de_IpPermission = (output: any, context: __SerdeContext): IpPermission => { - return { - FromPort: __expectInt32(output.FromPort), - IpRange: __expectString(output.IpRange), - Protocol: __expectString(output.Protocol), - ToPort: __expectInt32(output.ToPort), - } as any; -}; +// de_IpPermission omitted. -/** - * deserializeAws_json1_1IpPermissionsList - */ -const de_IpPermissionsList = (output: any, context: __SerdeContext): IpPermission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IpPermission(entry, context); - }); - return retVal; -}; +// de_IpPermissionsList omitted. -/** - * deserializeAws_json1_1LatencyMap - */ -const de_LatencyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_LatencyMap omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListAliasesOutput */ const de_ListAliasesOutput = (output: any, context: __SerdeContext): ListAliasesOutput => { - return { - Aliases: output.Aliases != null ? de_AliasList(output.Aliases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Aliases: (_: any) => de_AliasList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListBuildsOutput */ const de_ListBuildsOutput = (output: any, context: __SerdeContext): ListBuildsOutput => { - return { - Builds: output.Builds != null ? de_BuildList(output.Builds, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Builds: (_: any) => de_BuildList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListComputeOutput */ const de_ListComputeOutput = (output: any, context: __SerdeContext): ListComputeOutput => { - return { - ComputeList: output.ComputeList != null ? de_ComputeList(output.ComputeList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ComputeList: (_: any) => de_ComputeList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListFleetsOutput - */ -const de_ListFleetsOutput = (output: any, context: __SerdeContext): ListFleetsOutput => { - return { - FleetIds: output.FleetIds != null ? de_FleetIdList(output.FleetIds, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListFleetsOutput omitted. /** * deserializeAws_json1_1ListGameServerGroupsOutput - */ -const de_ListGameServerGroupsOutput = (output: any, context: __SerdeContext): ListGameServerGroupsOutput => { - return { - GameServerGroups: - output.GameServerGroups != null ? de_GameServerGroups(output.GameServerGroups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListGameServersOutput - */ -const de_ListGameServersOutput = (output: any, context: __SerdeContext): ListGameServersOutput => { - return { - GameServers: output.GameServers != null ? de_GameServers(output.GameServers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLocationsOutput - */ -const de_ListLocationsOutput = (output: any, context: __SerdeContext): ListLocationsOutput => { - return { - Locations: output.Locations != null ? de_LocationModelList(output.Locations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListScriptsOutput - */ -const de_ListScriptsOutput = (output: any, context: __SerdeContext): ListScriptsOutput => { - return { - NextToken: __expectString(output.NextToken), - Scripts: output.Scripts != null ? de_ScriptList(output.Scripts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LocationAttributes - */ -const de_LocationAttributes = (output: any, context: __SerdeContext): LocationAttributes => { - return { - LocationState: output.LocationState != null ? de_LocationState(output.LocationState, context) : undefined, - StoppedActions: output.StoppedActions != null ? de_FleetActionList(output.StoppedActions, context) : undefined, - UpdateStatus: __expectString(output.UpdateStatus), - } as any; -}; - -/** - * deserializeAws_json1_1LocationAttributesList - */ -const de_LocationAttributesList = (output: any, context: __SerdeContext): LocationAttributes[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LocationAttributes(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LocationList - */ -const de_LocationList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LocationModel - */ -const de_LocationModel = (output: any, context: __SerdeContext): LocationModel => { - return { - LocationArn: __expectString(output.LocationArn), - LocationName: __expectString(output.LocationName), - } as any; -}; - -/** - * deserializeAws_json1_1LocationModelList - */ -const de_LocationModelList = (output: any, context: __SerdeContext): LocationModel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LocationModel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LocationState - */ -const de_LocationState = (output: any, context: __SerdeContext): LocationState => { - return { - Location: __expectString(output.Location), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1LocationStateList - */ -const de_LocationStateList = (output: any, context: __SerdeContext): LocationState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LocationState(entry, context); - }); - return retVal; + */ +const de_ListGameServerGroupsOutput = (output: any, context: __SerdeContext): ListGameServerGroupsOutput => { + return take(output, { + GameServerGroups: (_: any) => de_GameServerGroups(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MatchedPlayerSession + * deserializeAws_json1_1ListGameServersOutput */ -const de_MatchedPlayerSession = (output: any, context: __SerdeContext): MatchedPlayerSession => { - return { - PlayerId: __expectString(output.PlayerId), - PlayerSessionId: __expectString(output.PlayerSessionId), - } as any; +const de_ListGameServersOutput = (output: any, context: __SerdeContext): ListGameServersOutput => { + return take(output, { + GameServers: (_: any) => de_GameServers(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListLocationsOutput omitted. + /** - * deserializeAws_json1_1MatchedPlayerSessionList + * deserializeAws_json1_1ListScriptsOutput */ -const de_MatchedPlayerSessionList = (output: any, context: __SerdeContext): MatchedPlayerSession[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MatchedPlayerSession(entry, context); - }); - return retVal; +const de_ListScriptsOutput = (output: any, context: __SerdeContext): ListScriptsOutput => { + return take(output, { + NextToken: __expectString, + Scripts: (_: any) => de_ScriptList(_, context), + }) as any; }; +// de_ListTagsForResourceResponse omitted. + +// de_LocationAttributes omitted. + +// de_LocationAttributesList omitted. + +// de_LocationList omitted. + +// de_LocationModel omitted. + +// de_LocationModelList omitted. + +// de_LocationState omitted. + +// de_LocationStateList omitted. + +// de_MatchedPlayerSession omitted. + +// de_MatchedPlayerSessionList omitted. + /** * deserializeAws_json1_1MatchmakingConfiguration */ const de_MatchmakingConfiguration = (output: any, context: __SerdeContext): MatchmakingConfiguration => { - return { - AcceptanceRequired: __expectBoolean(output.AcceptanceRequired), - AcceptanceTimeoutSeconds: __expectInt32(output.AcceptanceTimeoutSeconds), - AdditionalPlayerCount: __expectInt32(output.AdditionalPlayerCount), - BackfillMode: __expectString(output.BackfillMode), - ConfigurationArn: __expectString(output.ConfigurationArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CustomEventData: __expectString(output.CustomEventData), - Description: __expectString(output.Description), - FlexMatchMode: __expectString(output.FlexMatchMode), - GameProperties: output.GameProperties != null ? de_GamePropertyList(output.GameProperties, context) : undefined, - GameSessionData: __expectString(output.GameSessionData), - GameSessionQueueArns: - output.GameSessionQueueArns != null ? de_QueueArnsList(output.GameSessionQueueArns, context) : undefined, - Name: __expectString(output.Name), - NotificationTarget: __expectString(output.NotificationTarget), - RequestTimeoutSeconds: __expectInt32(output.RequestTimeoutSeconds), - RuleSetArn: __expectString(output.RuleSetArn), - RuleSetName: __expectString(output.RuleSetName), - } as any; + return take(output, { + AcceptanceRequired: __expectBoolean, + AcceptanceTimeoutSeconds: __expectInt32, + AdditionalPlayerCount: __expectInt32, + BackfillMode: __expectString, + ConfigurationArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomEventData: __expectString, + Description: __expectString, + FlexMatchMode: __expectString, + GameProperties: _json, + GameSessionData: __expectString, + GameSessionQueueArns: _json, + Name: __expectString, + NotificationTarget: __expectString, + RequestTimeoutSeconds: __expectInt32, + RuleSetArn: __expectString, + RuleSetName: __expectString, + }) as any; }; /** @@ -11886,9 +9434,6 @@ const de_MatchmakingConfigurationList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MatchmakingConfiguration(entry, context); }); return retVal; @@ -11898,15 +9443,12 @@ const de_MatchmakingConfigurationList = (output: any, context: __SerdeContext): * deserializeAws_json1_1MatchmakingRuleSet */ const de_MatchmakingRuleSet = (output: any, context: __SerdeContext): MatchmakingRuleSet => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - RuleSetArn: __expectString(output.RuleSetArn), - RuleSetBody: __expectString(output.RuleSetBody), - RuleSetName: __expectString(output.RuleSetName), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuleSetArn: __expectString, + RuleSetBody: __expectString, + RuleSetName: __expectString, + }) as any; }; /** @@ -11916,9 +9458,6 @@ const de_MatchmakingRuleSetList = (output: any, context: __SerdeContext): Matchm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MatchmakingRuleSet(entry, context); }); return retVal; @@ -11928,24 +9467,19 @@ const de_MatchmakingRuleSetList = (output: any, context: __SerdeContext): Matchm * deserializeAws_json1_1MatchmakingTicket */ const de_MatchmakingTicket = (output: any, context: __SerdeContext): MatchmakingTicket => { - return { - ConfigurationArn: __expectString(output.ConfigurationArn), - ConfigurationName: __expectString(output.ConfigurationName), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - EstimatedWaitTime: __expectInt32(output.EstimatedWaitTime), - GameSessionConnectionInfo: - output.GameSessionConnectionInfo != null - ? de_GameSessionConnectionInfo(output.GameSessionConnectionInfo, context) - : undefined, - Players: output.Players != null ? de_PlayerList(output.Players, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - StatusReason: __expectString(output.StatusReason), - TicketId: __expectString(output.TicketId), - } as any; + return take(output, { + ConfigurationArn: __expectString, + ConfigurationName: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EstimatedWaitTime: __expectInt32, + GameSessionConnectionInfo: _json, + Players: (_: any) => de_PlayerList(_, context), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + StatusReason: __expectString, + TicketId: __expectString, + }) as any; }; /** @@ -11955,83 +9489,31 @@ const de_MatchmakingTicketList = (output: any, context: __SerdeContext): Matchma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MatchmakingTicket(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1MetricGroupList - */ -const de_MetricGroupList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MetricGroupList omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotFoundException omitted. -/** - * deserializeAws_json1_1OutOfCapacityException - */ -const de_OutOfCapacityException = (output: any, context: __SerdeContext): OutOfCapacityException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OutOfCapacityException omitted. -/** - * deserializeAws_json1_1PlacedPlayerSession - */ -const de_PlacedPlayerSession = (output: any, context: __SerdeContext): PlacedPlayerSession => { - return { - PlayerId: __expectString(output.PlayerId), - PlayerSessionId: __expectString(output.PlayerSessionId), - } as any; -}; +// de_PlacedPlayerSession omitted. -/** - * deserializeAws_json1_1PlacedPlayerSessionList - */ -const de_PlacedPlayerSessionList = (output: any, context: __SerdeContext): PlacedPlayerSession[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacedPlayerSession(entry, context); - }); - return retVal; -}; +// de_PlacedPlayerSessionList omitted. /** * deserializeAws_json1_1Player */ const de_Player = (output: any, context: __SerdeContext): Player => { - return { - LatencyInMs: output.LatencyInMs != null ? de_LatencyMap(output.LatencyInMs, context) : undefined, - PlayerAttributes: - output.PlayerAttributes != null ? de_PlayerAttributeMap(output.PlayerAttributes, context) : undefined, - PlayerId: __expectString(output.PlayerId), - Team: __expectString(output.Team), - } as any; + return take(output, { + LatencyInMs: _json, + PlayerAttributes: (_: any) => de_PlayerAttributeMap(_, context), + PlayerId: __expectString, + Team: __expectString, + }) as any; }; /** @@ -12060,30 +9542,17 @@ const de_PlayerAttributeStringDoubleMap = (output: any, context: __SerdeContext) }, {}); }; -/** - * deserializeAws_json1_1PlayerAttributeStringList - */ -const de_PlayerAttributeStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PlayerAttributeStringList omitted. /** * deserializeAws_json1_1PlayerLatency */ const de_PlayerLatency = (output: any, context: __SerdeContext): PlayerLatency => { - return { - LatencyInMilliseconds: __limitedParseFloat32(output.LatencyInMilliseconds), - PlayerId: __expectString(output.PlayerId), - RegionIdentifier: __expectString(output.RegionIdentifier), - } as any; + return take(output, { + LatencyInMilliseconds: __limitedParseFloat32, + PlayerId: __expectString, + RegionIdentifier: __expectString, + }) as any; }; /** @@ -12093,38 +9562,14 @@ const de_PlayerLatencyList = (output: any, context: __SerdeContext): PlayerLaten const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PlayerLatency(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PlayerLatencyPolicy - */ -const de_PlayerLatencyPolicy = (output: any, context: __SerdeContext): PlayerLatencyPolicy => { - return { - MaximumIndividualPlayerLatencyMilliseconds: __expectInt32(output.MaximumIndividualPlayerLatencyMilliseconds), - PolicyDurationSeconds: __expectInt32(output.PolicyDurationSeconds), - } as any; -}; +// de_PlayerLatencyPolicy omitted. -/** - * deserializeAws_json1_1PlayerLatencyPolicyList - */ -const de_PlayerLatencyPolicyList = (output: any, context: __SerdeContext): PlayerLatencyPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlayerLatencyPolicy(entry, context); - }); - return retVal; -}; +// de_PlayerLatencyPolicyList omitted. /** * deserializeAws_json1_1PlayerList @@ -12133,9 +9578,6 @@ const de_PlayerList = (output: any, context: __SerdeContext): Player[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Player(entry, context); }); return retVal; @@ -12145,26 +9587,20 @@ const de_PlayerList = (output: any, context: __SerdeContext): Player[] => { * deserializeAws_json1_1PlayerSession */ const de_PlayerSession = (output: any, context: __SerdeContext): PlayerSession => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DnsName: __expectString(output.DnsName), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - GameSessionId: __expectString(output.GameSessionId), - IpAddress: __expectString(output.IpAddress), - PlayerData: __expectString(output.PlayerData), - PlayerId: __expectString(output.PlayerId), - PlayerSessionId: __expectString(output.PlayerSessionId), - Port: __expectInt32(output.Port), - Status: __expectString(output.Status), - TerminationTime: - output.TerminationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TerminationTime))) - : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DnsName: __expectString, + FleetArn: __expectString, + FleetId: __expectString, + GameSessionId: __expectString, + IpAddress: __expectString, + PlayerData: __expectString, + PlayerId: __expectString, + PlayerSessionId: __expectString, + Port: __expectInt32, + Status: __expectString, + TerminationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -12174,176 +9610,78 @@ const de_PlayerSessionList = (output: any, context: __SerdeContext): PlayerSessi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PlayerSession(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PriorityConfiguration - */ -const de_PriorityConfiguration = (output: any, context: __SerdeContext): PriorityConfiguration => { - return { - LocationOrder: output.LocationOrder != null ? de_LocationList(output.LocationOrder, context) : undefined, - PriorityOrder: output.PriorityOrder != null ? de_PriorityTypeList(output.PriorityOrder, context) : undefined, - } as any; -}; +// de_PriorityConfiguration omitted. -/** - * deserializeAws_json1_1PriorityTypeList - */ -const de_PriorityTypeList = (output: any, context: __SerdeContext): (PriorityType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PriorityTypeList omitted. -/** - * deserializeAws_json1_1PutScalingPolicyOutput - */ -const de_PutScalingPolicyOutput = (output: any, context: __SerdeContext): PutScalingPolicyOutput => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_PutScalingPolicyOutput omitted. -/** - * deserializeAws_json1_1QueueArnsList - */ -const de_QueueArnsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_QueueArnsList omitted. /** * deserializeAws_json1_1RegisterComputeOutput */ const de_RegisterComputeOutput = (output: any, context: __SerdeContext): RegisterComputeOutput => { - return { - Compute: output.Compute != null ? de_Compute(output.Compute, context) : undefined, - } as any; + return take(output, { + Compute: (_: any) => de_Compute(_, context), + }) as any; }; /** * deserializeAws_json1_1RegisterGameServerOutput */ const de_RegisterGameServerOutput = (output: any, context: __SerdeContext): RegisterGameServerOutput => { - return { - GameServer: output.GameServer != null ? de_GameServer(output.GameServer, context) : undefined, - } as any; + return take(output, { + GameServer: (_: any) => de_GameServer(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RequestUploadCredentialsOutput - */ -const de_RequestUploadCredentialsOutput = (output: any, context: __SerdeContext): RequestUploadCredentialsOutput => { - return { - StorageLocation: output.StorageLocation != null ? de_S3Location(output.StorageLocation, context) : undefined, - UploadCredentials: - output.UploadCredentials != null ? de_AwsCredentials(output.UploadCredentials, context) : undefined, - } as any; -}; +// de_RequestUploadCredentialsOutput omitted. -/** - * deserializeAws_json1_1ResolveAliasOutput - */ -const de_ResolveAliasOutput = (output: any, context: __SerdeContext): ResolveAliasOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; -}; +// de_ResolveAliasOutput omitted. -/** - * deserializeAws_json1_1ResourceCreationLimitPolicy - */ -const de_ResourceCreationLimitPolicy = (output: any, context: __SerdeContext): ResourceCreationLimitPolicy => { - return { - NewGameSessionsPerCreator: __expectInt32(output.NewGameSessionsPerCreator), - PolicyPeriodInMinutes: __expectInt32(output.PolicyPeriodInMinutes), - } as any; -}; +// de_ResourceCreationLimitPolicy omitted. /** * deserializeAws_json1_1ResumeGameServerGroupOutput */ const de_ResumeGameServerGroupOutput = (output: any, context: __SerdeContext): ResumeGameServerGroupOutput => { - return { - GameServerGroup: output.GameServerGroup != null ? de_GameServerGroup(output.GameServerGroup, context) : undefined, - } as any; + return take(output, { + GameServerGroup: (_: any) => de_GameServerGroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RoutingStrategy - */ -const de_RoutingStrategy = (output: any, context: __SerdeContext): RoutingStrategy => { - return { - FleetId: __expectString(output.FleetId), - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; +// de_RoutingStrategy omitted. -/** - * deserializeAws_json1_1RuntimeConfiguration - */ -const de_RuntimeConfiguration = (output: any, context: __SerdeContext): RuntimeConfiguration => { - return { - GameSessionActivationTimeoutSeconds: __expectInt32(output.GameSessionActivationTimeoutSeconds), - MaxConcurrentGameSessionActivations: __expectInt32(output.MaxConcurrentGameSessionActivations), - ServerProcesses: output.ServerProcesses != null ? de_ServerProcessList(output.ServerProcesses, context) : undefined, - } as any; -}; +// de_RuntimeConfiguration omitted. -/** - * deserializeAws_json1_1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - ObjectVersion: __expectString(output.ObjectVersion), - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_S3Location omitted. /** * deserializeAws_json1_1ScalingPolicy */ const de_ScalingPolicy = (output: any, context: __SerdeContext): ScalingPolicy => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - EvaluationPeriods: __expectInt32(output.EvaluationPeriods), - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - Location: __expectString(output.Location), - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - PolicyType: __expectString(output.PolicyType), - ScalingAdjustment: __expectInt32(output.ScalingAdjustment), - ScalingAdjustmentType: __expectString(output.ScalingAdjustmentType), - Status: __expectString(output.Status), - TargetConfiguration: - output.TargetConfiguration != null ? de_TargetConfiguration(output.TargetConfiguration, context) : undefined, - Threshold: __limitedParseDouble(output.Threshold), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; + return take(output, { + ComparisonOperator: __expectString, + EvaluationPeriods: __expectInt32, + FleetArn: __expectString, + FleetId: __expectString, + Location: __expectString, + MetricName: __expectString, + Name: __expectString, + PolicyType: __expectString, + ScalingAdjustment: __expectInt32, + ScalingAdjustmentType: __expectString, + Status: __expectString, + TargetConfiguration: (_: any) => de_TargetConfiguration(_, context), + Threshold: __limitedParseDouble, + UpdateStatus: __expectString, + }) as any; }; /** @@ -12353,9 +9691,6 @@ const de_ScalingPolicyList = (output: any, context: __SerdeContext): ScalingPoli const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScalingPolicy(entry, context); }); return retVal; @@ -12365,18 +9700,15 @@ const de_ScalingPolicyList = (output: any, context: __SerdeContext): ScalingPoli * deserializeAws_json1_1Script */ const de_Script = (output: any, context: __SerdeContext): Script => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Name: __expectString(output.Name), - ScriptArn: __expectString(output.ScriptArn), - ScriptId: __expectString(output.ScriptId), - SizeOnDisk: __expectLong(output.SizeOnDisk), - StorageLocation: output.StorageLocation != null ? de_S3Location(output.StorageLocation, context) : undefined, - Version: __expectString(output.Version), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ScriptArn: __expectString, + ScriptId: __expectString, + SizeOnDisk: __expectLong, + StorageLocation: _json, + Version: __expectString, + }) as any; }; /** @@ -12386,9 +9718,6 @@ const de_ScriptList = (output: any, context: __SerdeContext): Script[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Script(entry, context); }); return retVal; @@ -12398,301 +9727,146 @@ const de_ScriptList = (output: any, context: __SerdeContext): Script[] => { * deserializeAws_json1_1SearchGameSessionsOutput */ const de_SearchGameSessionsOutput = (output: any, context: __SerdeContext): SearchGameSessionsOutput => { - return { - GameSessions: output.GameSessions != null ? de_GameSessionList(output.GameSessions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + GameSessions: (_: any) => de_GameSessionList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ServerProcess - */ -const de_ServerProcess = (output: any, context: __SerdeContext): ServerProcess => { - return { - ConcurrentExecutions: __expectInt32(output.ConcurrentExecutions), - LaunchPath: __expectString(output.LaunchPath), - Parameters: __expectString(output.Parameters), - } as any; -}; +// de_ServerProcess omitted. -/** - * deserializeAws_json1_1ServerProcessList - */ -const de_ServerProcessList = (output: any, context: __SerdeContext): ServerProcess[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerProcess(entry, context); - }); - return retVal; -}; +// de_ServerProcessList omitted. -/** - * deserializeAws_json1_1StartFleetActionsOutput - */ -const de_StartFleetActionsOutput = (output: any, context: __SerdeContext): StartFleetActionsOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; -}; +// de_StartFleetActionsOutput omitted. /** * deserializeAws_json1_1StartGameSessionPlacementOutput */ const de_StartGameSessionPlacementOutput = (output: any, context: __SerdeContext): StartGameSessionPlacementOutput => { - return { - GameSessionPlacement: - output.GameSessionPlacement != null ? de_GameSessionPlacement(output.GameSessionPlacement, context) : undefined, - } as any; + return take(output, { + GameSessionPlacement: (_: any) => de_GameSessionPlacement(_, context), + }) as any; }; /** * deserializeAws_json1_1StartMatchBackfillOutput */ const de_StartMatchBackfillOutput = (output: any, context: __SerdeContext): StartMatchBackfillOutput => { - return { - MatchmakingTicket: - output.MatchmakingTicket != null ? de_MatchmakingTicket(output.MatchmakingTicket, context) : undefined, - } as any; + return take(output, { + MatchmakingTicket: (_: any) => de_MatchmakingTicket(_, context), + }) as any; }; /** * deserializeAws_json1_1StartMatchmakingOutput */ const de_StartMatchmakingOutput = (output: any, context: __SerdeContext): StartMatchmakingOutput => { - return { - MatchmakingTicket: - output.MatchmakingTicket != null ? de_MatchmakingTicket(output.MatchmakingTicket, context) : undefined, - } as any; + return take(output, { + MatchmakingTicket: (_: any) => de_MatchmakingTicket(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StopFleetActionsOutput - */ -const de_StopFleetActionsOutput = (output: any, context: __SerdeContext): StopFleetActionsOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; -}; +// de_StopFleetActionsOutput omitted. /** * deserializeAws_json1_1StopGameSessionPlacementOutput */ const de_StopGameSessionPlacementOutput = (output: any, context: __SerdeContext): StopGameSessionPlacementOutput => { - return { - GameSessionPlacement: - output.GameSessionPlacement != null ? de_GameSessionPlacement(output.GameSessionPlacement, context) : undefined, - } as any; + return take(output, { + GameSessionPlacement: (_: any) => de_GameSessionPlacement(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StopMatchmakingOutput - */ -const de_StopMatchmakingOutput = (output: any, context: __SerdeContext): StopMatchmakingOutput => { - return {} as any; -}; +// de_StopMatchmakingOutput omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. /** * deserializeAws_json1_1SuspendGameServerGroupOutput */ const de_SuspendGameServerGroupOutput = (output: any, context: __SerdeContext): SuspendGameServerGroupOutput => { - return { - GameServerGroup: output.GameServerGroup != null ? de_GameServerGroup(output.GameServerGroup, context) : undefined, - } as any; + return take(output, { + GameServerGroup: (_: any) => de_GameServerGroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TaggingFailedException - */ -const de_TaggingFailedException = (output: any, context: __SerdeContext): TaggingFailedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TaggingFailedException omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1TargetConfiguration */ const de_TargetConfiguration = (output: any, context: __SerdeContext): TargetConfiguration => { - return { - TargetValue: __limitedParseDouble(output.TargetValue), - } as any; + return take(output, { + TargetValue: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1TerminalRoutingStrategyException - */ -const de_TerminalRoutingStrategyException = ( - output: any, - context: __SerdeContext -): TerminalRoutingStrategyException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TerminalRoutingStrategyException omitted. -/** - * deserializeAws_json1_1UnauthorizedException - */ -const de_UnauthorizedException = (output: any, context: __SerdeContext): UnauthorizedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnauthorizedException omitted. -/** - * deserializeAws_json1_1UnsupportedRegionException - */ -const de_UnsupportedRegionException = (output: any, context: __SerdeContext): UnsupportedRegionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedRegionException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateAliasOutput */ const de_UpdateAliasOutput = (output: any, context: __SerdeContext): UpdateAliasOutput => { - return { - Alias: output.Alias != null ? de_Alias(output.Alias, context) : undefined, - } as any; + return take(output, { + Alias: (_: any) => de_Alias(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateBuildOutput */ const de_UpdateBuildOutput = (output: any, context: __SerdeContext): UpdateBuildOutput => { - return { - Build: output.Build != null ? de_Build(output.Build, context) : undefined, - } as any; + return take(output, { + Build: (_: any) => de_Build(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateFleetAttributesOutput - */ -const de_UpdateFleetAttributesOutput = (output: any, context: __SerdeContext): UpdateFleetAttributesOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; -}; +// de_UpdateFleetAttributesOutput omitted. -/** - * deserializeAws_json1_1UpdateFleetCapacityOutput - */ -const de_UpdateFleetCapacityOutput = (output: any, context: __SerdeContext): UpdateFleetCapacityOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - Location: __expectString(output.Location), - } as any; -}; +// de_UpdateFleetCapacityOutput omitted. -/** - * deserializeAws_json1_1UpdateFleetPortSettingsOutput - */ -const de_UpdateFleetPortSettingsOutput = (output: any, context: __SerdeContext): UpdateFleetPortSettingsOutput => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - } as any; -}; +// de_UpdateFleetPortSettingsOutput omitted. /** * deserializeAws_json1_1UpdateGameServerGroupOutput */ const de_UpdateGameServerGroupOutput = (output: any, context: __SerdeContext): UpdateGameServerGroupOutput => { - return { - GameServerGroup: output.GameServerGroup != null ? de_GameServerGroup(output.GameServerGroup, context) : undefined, - } as any; + return take(output, { + GameServerGroup: (_: any) => de_GameServerGroup(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateGameServerOutput */ const de_UpdateGameServerOutput = (output: any, context: __SerdeContext): UpdateGameServerOutput => { - return { - GameServer: output.GameServer != null ? de_GameServer(output.GameServer, context) : undefined, - } as any; + return take(output, { + GameServer: (_: any) => de_GameServer(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateGameSessionOutput */ const de_UpdateGameSessionOutput = (output: any, context: __SerdeContext): UpdateGameSessionOutput => { - return { - GameSession: output.GameSession != null ? de_GameSession(output.GameSession, context) : undefined, - } as any; + return take(output, { + GameSession: (_: any) => de_GameSession(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateGameSessionQueueOutput - */ -const de_UpdateGameSessionQueueOutput = (output: any, context: __SerdeContext): UpdateGameSessionQueueOutput => { - return { - GameSessionQueue: - output.GameSessionQueue != null ? de_GameSessionQueue(output.GameSessionQueue, context) : undefined, - } as any; -}; +// de_UpdateGameSessionQueueOutput omitted. /** * deserializeAws_json1_1UpdateMatchmakingConfigurationOutput @@ -12701,63 +9875,35 @@ const de_UpdateMatchmakingConfigurationOutput = ( output: any, context: __SerdeContext ): UpdateMatchmakingConfigurationOutput => { - return { - Configuration: - output.Configuration != null ? de_MatchmakingConfiguration(output.Configuration, context) : undefined, - } as any; + return take(output, { + Configuration: (_: any) => de_MatchmakingConfiguration(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateRuntimeConfigurationOutput - */ -const de_UpdateRuntimeConfigurationOutput = ( - output: any, - context: __SerdeContext -): UpdateRuntimeConfigurationOutput => { - return { - RuntimeConfiguration: - output.RuntimeConfiguration != null ? de_RuntimeConfiguration(output.RuntimeConfiguration, context) : undefined, - } as any; -}; +// de_UpdateRuntimeConfigurationOutput omitted. /** * deserializeAws_json1_1UpdateScriptOutput */ const de_UpdateScriptOutput = (output: any, context: __SerdeContext): UpdateScriptOutput => { - return { - Script: output.Script != null ? de_Script(output.Script, context) : undefined, - } as any; + return take(output, { + Script: (_: any) => de_Script(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ValidateMatchmakingRuleSetOutput - */ -const de_ValidateMatchmakingRuleSetOutput = ( - output: any, - context: __SerdeContext -): ValidateMatchmakingRuleSetOutput => { - return { - Valid: __expectBoolean(output.Valid), - } as any; -}; +// de_ValidateMatchmakingRuleSetOutput omitted. /** * deserializeAws_json1_1VpcPeeringAuthorization */ const de_VpcPeeringAuthorization = (output: any, context: __SerdeContext): VpcPeeringAuthorization => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime))) - : undefined, - GameLiftAwsAccountId: __expectString(output.GameLiftAwsAccountId), - PeerVpcAwsAccountId: __expectString(output.PeerVpcAwsAccountId), - PeerVpcId: __expectString(output.PeerVpcId), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GameLiftAwsAccountId: __expectString, + PeerVpcAwsAccountId: __expectString, + PeerVpcId: __expectString, + }) as any; }; /** @@ -12767,53 +9913,16 @@ const de_VpcPeeringAuthorizationList = (output: any, context: __SerdeContext): V const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VpcPeeringAuthorization(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1VpcPeeringConnection - */ -const de_VpcPeeringConnection = (output: any, context: __SerdeContext): VpcPeeringConnection => { - return { - FleetArn: __expectString(output.FleetArn), - FleetId: __expectString(output.FleetId), - GameLiftVpcId: __expectString(output.GameLiftVpcId), - IpV4CidrBlock: __expectString(output.IpV4CidrBlock), - PeerVpcId: __expectString(output.PeerVpcId), - Status: output.Status != null ? de_VpcPeeringConnectionStatus(output.Status, context) : undefined, - VpcPeeringConnectionId: __expectString(output.VpcPeeringConnectionId), - } as any; -}; +// de_VpcPeeringConnection omitted. -/** - * deserializeAws_json1_1VpcPeeringConnectionList - */ -const de_VpcPeeringConnectionList = (output: any, context: __SerdeContext): VpcPeeringConnection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcPeeringConnection(entry, context); - }); - return retVal; -}; +// de_VpcPeeringConnectionList omitted. -/** - * deserializeAws_json1_1VpcPeeringConnectionStatus - */ -const de_VpcPeeringConnectionStatus = (output: any, context: __SerdeContext): VpcPeeringConnectionStatus => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_VpcPeeringConnectionStatus omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -12835,6 +9944,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-gamesparks/src/protocols/Aws_restJson1.ts b/clients/client-gamesparks/src/protocols/Aws_restJson1.ts index 339b68ee4458..6def0256e1d3 100644 --- a/clients/client-gamesparks/src/protocols/Aws_restJson1.ts +++ b/clients/client-gamesparks/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -94,12 +96,8 @@ import { AccessDeniedException, ConflictException, Connection, - DeploymentResult, - ExtensionDetails, - ExtensionVersionDetails, GameConfigurationDetails, GameDetails, - GameSummary, GeneratedCodeJobDetails, Generator, ImportGameConfigurationSource, @@ -113,7 +111,6 @@ import { StageDeploymentDetails, StageDeploymentSummary, StageDetails, - StageSummary, ThrottlingException, ValidationException, } from "../models/models_0"; @@ -131,12 +128,14 @@ export const se_CreateGameCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/game"; let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.GameName != null && { GameName: input.GameName }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + Description: [], + GameName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -163,9 +162,11 @@ export const se_CreateSnapshotCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/game/{GameName}/snapshot"; resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -191,13 +192,15 @@ export const se_CreateStageCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/game/{GameName}/stage"; resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Role != null && { Role: input.Role }), - ...(input.StageName != null && { StageName: input.StageName }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + Description: [], + Role: [], + StageName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -573,9 +576,11 @@ export const se_ImportGameConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/game/{GameName}/configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); let body: any; - body = JSON.stringify({ - ...(input.ImportSource != null && { ImportSource: se_ImportGameConfigurationSource(input.ImportSource, context) }), - }); + body = JSON.stringify( + take(input, { + ImportSource: (_) => se_ImportGameConfigurationSource(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -830,9 +835,11 @@ export const se_StartGeneratedCodeJobCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "SnapshotId", () => input.SnapshotId!, "{SnapshotId}", false); let body: any; - body = JSON.stringify({ - ...(input.Generator != null && { Generator: se_Generator(input.Generator, context) }), - }); + body = JSON.stringify( + take(input, { + Generator: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -861,10 +868,12 @@ export const se_StartStageDeploymentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "StageName", () => input.StageName!, "{StageName}", false); let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + SnapshotId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -890,9 +899,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -948,9 +959,11 @@ export const se_UpdateGameCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/game/{GameName}"; resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -977,9 +990,11 @@ export const se_UpdateGameConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/game/{GameName}/configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); let body: any; - body = JSON.stringify({ - ...(input.Modifications != null && { Modifications: se_SectionModificationList(input.Modifications, context) }), - }); + body = JSON.stringify( + take(input, { + Modifications: (_) => se_SectionModificationList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1007,9 +1022,11 @@ export const se_UpdateSnapshotCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "SnapshotId", () => input.SnapshotId!, "{SnapshotId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1037,10 +1054,12 @@ export const se_UpdateStageCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "GameName", () => input.GameName!, "{GameName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "StageName", () => input.StageName!, "{StageName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Role != null && { Role: input.Role }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Role: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1066,9 +1085,10 @@ export const de_CreateGameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Game != null) { - contents.Game = de_GameDetails(data.Game, context); - } + const doc = take(data, { + Game: (_) => de_GameDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1105,10 +1125,9 @@ const de_CreateGameCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1128,9 +1147,10 @@ export const de_CreateSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Snapshot != null) { - contents.Snapshot = de_SnapshotDetails(data.Snapshot, context); - } + const doc = take(data, { + Snapshot: (_) => de_SnapshotDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1167,10 +1187,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1190,9 +1209,10 @@ export const de_CreateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Stage != null) { - contents.Stage = de_StageDetails(data.Stage, context); - } + const doc = take(data, { + Stage: (_) => de_StageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1229,10 +1249,9 @@ const de_CreateStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1285,10 +1304,9 @@ const de_DeleteGameCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1344,10 +1362,9 @@ const de_DeleteStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1367,12 +1384,11 @@ export const de_DisconnectPlayerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DisconnectFailures != null) { - contents.DisconnectFailures = de_ConnectionIdList(data.DisconnectFailures, context); - } - if (data.DisconnectSuccesses != null) { - contents.DisconnectSuccesses = de_ConnectionIdList(data.DisconnectSuccesses, context); - } + const doc = take(data, { + DisconnectFailures: _json, + DisconnectSuccesses: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1406,10 +1422,9 @@ const de_DisconnectPlayerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1429,9 +1444,10 @@ export const de_ExportSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.S3Url != null) { - contents.S3Url = __expectString(data.S3Url); - } + const doc = take(data, { + S3Url: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1465,10 +1481,9 @@ const de_ExportSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1488,9 +1503,10 @@ export const de_GetExtensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Extension != null) { - contents.Extension = de_ExtensionDetails(data.Extension, context); - } + const doc = take(data, { + Extension: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1524,10 +1540,9 @@ const de_GetExtensionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1547,9 +1562,10 @@ export const de_GetExtensionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ExtensionVersion != null) { - contents.ExtensionVersion = de_ExtensionVersionDetails(data.ExtensionVersion, context); - } + const doc = take(data, { + ExtensionVersion: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1583,10 +1599,9 @@ const de_GetExtensionVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1606,9 +1621,10 @@ export const de_GetGameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Game != null) { - contents.Game = de_GameDetails(data.Game, context); - } + const doc = take(data, { + Game: (_) => de_GameDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1642,10 +1658,9 @@ const de_GetGameCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1665,9 +1680,10 @@ export const de_GetGameConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GameConfiguration != null) { - contents.GameConfiguration = de_GameConfigurationDetails(data.GameConfiguration, context); - } + const doc = take(data, { + GameConfiguration: (_) => de_GameConfigurationDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1701,10 +1717,9 @@ const de_GetGameConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1724,9 +1739,10 @@ export const de_GetGeneratedCodeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GeneratedCodeJob != null) { - contents.GeneratedCodeJob = de_GeneratedCodeJobDetails(data.GeneratedCodeJob, context); - } + const doc = take(data, { + GeneratedCodeJob: (_) => de_GeneratedCodeJobDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1760,10 +1776,9 @@ const de_GetGeneratedCodeJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1783,9 +1798,10 @@ export const de_GetPlayerConnectionStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connections != null) { - contents.Connections = de_ConnectionList(data.Connections, context); - } + const doc = take(data, { + Connections: (_) => de_ConnectionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1819,10 +1835,9 @@ const de_GetPlayerConnectionStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1842,9 +1857,10 @@ export const de_GetSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Snapshot != null) { - contents.Snapshot = de_SnapshotDetails(data.Snapshot, context); - } + const doc = take(data, { + Snapshot: (_) => de_SnapshotDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1878,10 +1894,9 @@ const de_GetSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1901,9 +1916,10 @@ export const de_GetStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Stage != null) { - contents.Stage = de_StageDetails(data.Stage, context); - } + const doc = take(data, { + Stage: (_) => de_StageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1937,10 +1953,9 @@ const de_GetStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1960,9 +1975,10 @@ export const de_GetStageDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StageDeployment != null) { - contents.StageDeployment = de_StageDeploymentDetails(data.StageDeployment, context); - } + const doc = take(data, { + StageDeployment: (_) => de_StageDeploymentDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1996,10 +2012,9 @@ const de_GetStageDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2019,9 +2034,10 @@ export const de_ImportGameConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GameConfiguration != null) { - contents.GameConfiguration = de_GameConfigurationDetails(data.GameConfiguration, context); - } + const doc = take(data, { + GameConfiguration: (_) => de_GameConfigurationDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2058,10 +2074,9 @@ const de_ImportGameConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2081,12 +2096,11 @@ export const de_ListExtensionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Extensions != null) { - contents.Extensions = de_ExtensionDetailsList(data.Extensions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Extensions: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2117,10 +2131,9 @@ const de_ListExtensionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2140,12 +2153,11 @@ export const de_ListExtensionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ExtensionVersions != null) { - contents.ExtensionVersions = de_ExtensionVersionDetailsList(data.ExtensionVersions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ExtensionVersions: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2179,10 +2191,9 @@ const de_ListExtensionVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2202,12 +2213,11 @@ export const de_ListGamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Games != null) { - contents.Games = de_GameSummaryList(data.Games, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Games: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2238,10 +2248,9 @@ const de_ListGamesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,12 +2270,11 @@ export const de_ListGeneratedCodeJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GeneratedCodeJobs != null) { - contents.GeneratedCodeJobs = de_GeneratedCodeJobDetailsList(data.GeneratedCodeJobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + GeneratedCodeJobs: (_) => de_GeneratedCodeJobDetailsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2300,10 +2308,9 @@ const de_ListGeneratedCodeJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2323,12 +2330,11 @@ export const de_ListSnapshotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Snapshots != null) { - contents.Snapshots = de_SnapshotSummaryList(data.Snapshots, context); - } + const doc = take(data, { + NextToken: __expectString, + Snapshots: (_) => de_SnapshotSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2362,10 +2368,9 @@ const de_ListSnapshotsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2385,12 +2390,11 @@ export const de_ListStageDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.StageDeployments != null) { - contents.StageDeployments = de_StageDeploymentList(data.StageDeployments, context); - } + const doc = take(data, { + NextToken: __expectString, + StageDeployments: (_) => de_StageDeploymentList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2424,10 +2428,9 @@ const de_ListStageDeploymentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2447,12 +2450,11 @@ export const de_ListStagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Stages != null) { - contents.Stages = de_StageSummaryList(data.Stages, context); - } + const doc = take(data, { + NextToken: __expectString, + Stages: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2486,10 +2488,9 @@ const de_ListStagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2509,9 +2510,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2539,10 +2541,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2562,9 +2563,10 @@ export const de_StartGeneratedCodeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GeneratedCodeJobId != null) { - contents.GeneratedCodeJobId = __expectString(data.GeneratedCodeJobId); - } + const doc = take(data, { + GeneratedCodeJobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2598,10 +2600,9 @@ const de_StartGeneratedCodeJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2621,9 +2622,10 @@ export const de_StartStageDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StageDeployment != null) { - contents.StageDeployment = de_StageDeploymentDetails(data.StageDeployment, context); - } + const doc = take(data, { + StageDeployment: (_) => de_StageDeploymentDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2660,10 +2662,9 @@ const de_StartStageDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2710,10 +2711,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2760,10 +2760,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2783,9 +2782,10 @@ export const de_UpdateGameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Game != null) { - contents.Game = de_GameDetails(data.Game, context); - } + const doc = take(data, { + Game: (_) => de_GameDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2819,10 +2819,9 @@ const de_UpdateGameCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2842,9 +2841,10 @@ export const de_UpdateGameConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GameConfiguration != null) { - contents.GameConfiguration = de_GameConfigurationDetails(data.GameConfiguration, context); - } + const doc = take(data, { + GameConfiguration: (_) => de_GameConfigurationDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2881,10 +2881,9 @@ const de_UpdateGameConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2904,9 +2903,10 @@ export const de_UpdateSnapshotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Snapshot != null) { - contents.Snapshot = de_SnapshotDetails(data.Snapshot, context); - } + const doc = take(data, { + Snapshot: (_) => de_SnapshotDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2940,10 +2940,9 @@ const de_UpdateSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2963,9 +2962,10 @@ export const de_UpdateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Stage != null) { - contents.Stage = de_StageDetails(data.Stage, context); - } + const doc = take(data, { + Stage: (_) => de_StageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2999,16 +2999,15 @@ const de_UpdateStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3018,9 +3017,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3034,9 +3034,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3053,9 +3054,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3072,9 +3074,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3091,9 +3094,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3107,9 +3111,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3123,9 +3128,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3140,36 +3146,27 @@ const se_Document = (input: __DocumentType, context: __SerdeContext): any => { return input; }; -/** - * serializeAws_restJson1Generator - */ -const se_Generator = (input: Generator, context: __SerdeContext): any => { - return { - ...(input.GameSdkVersion != null && { GameSdkVersion: input.GameSdkVersion }), - ...(input.Language != null && { Language: input.Language }), - ...(input.TargetPlatform != null && { TargetPlatform: input.TargetPlatform }), - }; -}; +// se_Generator omitted. /** * serializeAws_restJson1ImportGameConfigurationSource */ const se_ImportGameConfigurationSource = (input: ImportGameConfigurationSource, context: __SerdeContext): any => { - return { - ...(input.File != null && { File: context.base64Encoder(input.File) }), - }; + return take(input, { + File: context.base64Encoder, + }); }; /** * serializeAws_restJson1SectionModification */ const se_SectionModification = (input: SectionModification, context: __SerdeContext): any => { - return { - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Section != null && { Section: input.Section }), - ...(input.Value != null && { Value: se_Document(input.Value, context) }), - }; + return take(input, { + Operation: [], + Path: [], + Section: [], + Value: (_) => se_Document(_, context), + }); }; /** @@ -3183,43 +3180,19 @@ const se_SectionModificationList = (input: SectionModification[], context: __Ser }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * deserializeAws_restJson1Connection */ const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - Id: __expectString(output.Id), - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Id: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ConnectionIdList - */ -const de_ConnectionIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConnectionIdList omitted. /** * deserializeAws_restJson1ConnectionList @@ -3228,23 +3201,12 @@ const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Connection(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DeploymentResult - */ -const de_DeploymentResult = (output: any, context: __SerdeContext): DeploymentResult => { - return { - Message: __expectString(output.Message), - ResultCode: __expectString(output.ResultCode), - } as any; -}; +// de_DeploymentResult omitted. /** * deserializeAws_restJson1Document @@ -3253,129 +3215,56 @@ const de_Document = (output: any, context: __SerdeContext): __DocumentType => { return output; }; -/** - * deserializeAws_restJson1ExtensionDetails - */ -const de_ExtensionDetails = (output: any, context: __SerdeContext): ExtensionDetails => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Namespace: __expectString(output.Namespace), - } as any; -}; +// de_ExtensionDetails omitted. -/** - * deserializeAws_restJson1ExtensionDetailsList - */ -const de_ExtensionDetailsList = (output: any, context: __SerdeContext): ExtensionDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtensionDetails(entry, context); - }); - return retVal; -}; +// de_ExtensionDetailsList omitted. -/** - * deserializeAws_restJson1ExtensionVersionDetails - */ -const de_ExtensionVersionDetails = (output: any, context: __SerdeContext): ExtensionVersionDetails => { - return { - Name: __expectString(output.Name), - Namespace: __expectString(output.Namespace), - Schema: __expectString(output.Schema), - Version: __expectString(output.Version), - } as any; -}; +// de_ExtensionVersionDetails omitted. -/** - * deserializeAws_restJson1ExtensionVersionDetailsList - */ -const de_ExtensionVersionDetailsList = (output: any, context: __SerdeContext): ExtensionVersionDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtensionVersionDetails(entry, context); - }); - return retVal; -}; +// de_ExtensionVersionDetailsList omitted. /** * deserializeAws_restJson1GameConfigurationDetails */ const de_GameConfigurationDetails = (output: any, context: __SerdeContext): GameConfigurationDetails => { - return { - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - Sections: output.Sections != null ? de_Sections(output.Sections, context) : undefined, - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Sections: (_: any) => de_Sections(_, context), + }) as any; }; /** * deserializeAws_restJson1GameDetails */ const de_GameDetails = (output: any, context: __SerdeContext): GameDetails => { - return { - Arn: __expectString(output.Arn), - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - Description: __expectString(output.Description), - EnableTerminationProtection: __expectBoolean(output.EnableTerminationProtection), - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + EnableTerminationProtection: __expectBoolean, + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1GameSummary - */ -const de_GameSummary = (output: any, context: __SerdeContext): GameSummary => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_GameSummary omitted. -/** - * deserializeAws_restJson1GameSummaryList - */ -const de_GameSummaryList = (output: any, context: __SerdeContext): GameSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GameSummary(entry, context); - }); - return retVal; -}; +// de_GameSummaryList omitted. /** * deserializeAws_restJson1GeneratedCodeJobDetails */ const de_GeneratedCodeJobDetails = (output: any, context: __SerdeContext): GeneratedCodeJobDetails => { - return { - Description: __expectString(output.Description), - ExpirationTime: - output.ExpirationTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationTime)) - : undefined, - GeneratedCodeJobId: __expectString(output.GeneratedCodeJobId), - S3Url: __expectString(output.S3Url), - Status: __expectString(output.Status), - } as any; + return take(output, { + Description: __expectString, + ExpirationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + GeneratedCodeJobId: __expectString, + S3Url: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3385,9 +3274,6 @@ const de_GeneratedCodeJobDetailsList = (output: any, context: __SerdeContext): G const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GeneratedCodeJobDetails(entry, context); }); return retVal; @@ -3397,11 +3283,11 @@ const de_GeneratedCodeJobDetailsList = (output: any, context: __SerdeContext): G * deserializeAws_restJson1Section */ const de_Section = (output: any, context: __SerdeContext): Section => { - return { - Attributes: output.Attributes != null ? de_Document(output.Attributes, context) : undefined, - Name: __expectString(output.Name), - Size: __expectInt32(output.Size), - } as any; + return take(output, { + Attributes: (_: any) => de_Document(_, context), + Name: __expectString, + Size: __expectInt32, + }) as any; }; /** @@ -3421,27 +3307,25 @@ const de_Sections = (output: any, context: __SerdeContext): Record { - return { - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - Sections: output.Sections != null ? de_Sections(output.Sections, context) : undefined, - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Sections: (_: any) => de_Sections(_, context), + }) as any; }; /** * deserializeAws_restJson1SnapshotSummary */ const de_SnapshotSummary = (output: any, context: __SerdeContext): SnapshotSummary => { - return { - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3451,9 +3335,6 @@ const de_SnapshotSummaryList = (output: any, context: __SerdeContext): SnapshotS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SnapshotSummary(entry, context); }); return retVal; @@ -3463,17 +3344,15 @@ const de_SnapshotSummaryList = (output: any, context: __SerdeContext): SnapshotS * deserializeAws_restJson1StageDeploymentDetails */ const de_StageDeploymentDetails = (output: any, context: __SerdeContext): StageDeploymentDetails => { - return { - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - DeploymentAction: __expectString(output.DeploymentAction), - DeploymentId: __expectString(output.DeploymentId), - DeploymentResult: - output.DeploymentResult != null ? de_DeploymentResult(output.DeploymentResult, context) : undefined, - DeploymentState: __expectString(output.DeploymentState), - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - SnapshotId: __expectString(output.SnapshotId), - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DeploymentAction: __expectString, + DeploymentId: __expectString, + DeploymentResult: _json, + DeploymentState: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SnapshotId: __expectString, + }) as any; }; /** @@ -3483,9 +3362,6 @@ const de_StageDeploymentList = (output: any, context: __SerdeContext): StageDepl const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StageDeploymentSummary(entry, context); }); return retVal; @@ -3495,77 +3371,39 @@ const de_StageDeploymentList = (output: any, context: __SerdeContext): StageDepl * deserializeAws_restJson1StageDeploymentSummary */ const de_StageDeploymentSummary = (output: any, context: __SerdeContext): StageDeploymentSummary => { - return { - DeploymentAction: __expectString(output.DeploymentAction), - DeploymentId: __expectString(output.DeploymentId), - DeploymentResult: - output.DeploymentResult != null ? de_DeploymentResult(output.DeploymentResult, context) : undefined, - DeploymentState: __expectString(output.DeploymentState), - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - SnapshotId: __expectString(output.SnapshotId), - } as any; + return take(output, { + DeploymentAction: __expectString, + DeploymentId: __expectString, + DeploymentResult: _json, + DeploymentState: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SnapshotId: __expectString, + }) as any; }; /** * deserializeAws_restJson1StageDetails */ const de_StageDetails = (output: any, context: __SerdeContext): StageDetails => { - return { - Arn: __expectString(output.Arn), - Created: output.Created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Created)) : undefined, - Description: __expectString(output.Description), - GameKey: __expectString(output.GameKey), - LastUpdated: - output.LastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdated)) : undefined, - LogGroup: __expectString(output.LogGroup), - Name: __expectString(output.Name), - Role: __expectString(output.Role), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + Created: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + GameKey: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LogGroup: __expectString, + Name: __expectString, + Role: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1StageSummary - */ -const de_StageSummary = (output: any, context: __SerdeContext): StageSummary => { - return { - Description: __expectString(output.Description), - GameKey: __expectString(output.GameKey), - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_StageSummary omitted. -/** - * deserializeAws_restJson1StageSummaryList - */ -const de_StageSummaryList = (output: any, context: __SerdeContext): StageSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StageSummary(entry, context); - }); - return retVal; -}; +// de_StageSummaryList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-glacier/src/protocols/Aws_restJson1.ts b/clients/client-glacier/src/protocols/Aws_restJson1.ts index 04f7c869f874..96d1c98fe7e6 100644 --- a/clients/client-glacier/src/protocols/Aws_restJson1.ts +++ b/clients/client-glacier/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -8,9 +9,10 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -106,30 +108,24 @@ import { CSVOutput, DataRetrievalPolicy, DataRetrievalRule, - DescribeVaultOutput, Encryption, - GlacierJobDescription, Grant, Grantee, InputSerialization, InsufficientCapacityException, InvalidParameterValueException, - InventoryRetrievalJobDescription, InventoryRetrievalJobInput, JobParameters, LimitExceededException, MissingParameterValueException, OutputLocation, OutputSerialization, - PartListElement, PolicyEnforcedException, - ProvisionedCapacityDescription, RequestTimeoutException, ResourceNotFoundException, S3Location, SelectParameters, ServiceUnavailableException, - UploadListElement, VaultAccessPolicy, VaultLockPolicy, VaultNotificationConfig, @@ -207,9 +203,11 @@ export const se_AddTagsToVaultCommand = async ( operation: [, "add"], }); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -608,7 +606,7 @@ export const se_InitiateJobCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "vaultName", () => input.vaultName!, "{vaultName}", false); let body: any; if (input.jobParameters !== undefined) { - body = se_JobParameters(input.jobParameters, context); + body = _json(input.jobParameters); } if (body === undefined) { body = {}; @@ -672,7 +670,7 @@ export const se_InitiateVaultLockCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "vaultName", () => input.vaultName!, "{vaultName}", false); let body: any; if (input.policy !== undefined) { - body = se_VaultLockPolicy(input.policy, context); + body = _json(input.policy); } if (body === undefined) { body = {}; @@ -904,9 +902,11 @@ export const se_RemoveTagsFromVaultCommand = async ( operation: [, "remove"], }); let body: any; - body = JSON.stringify({ - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -934,9 +934,11 @@ export const se_SetDataRetrievalPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/{accountId}/policies/data-retrieval"; resolvedPath = __resolvedPath(resolvedPath, input, "accountId", () => input.accountId!, "{accountId}", false); let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: se_DataRetrievalPolicy(input.Policy, context) }), - }); + body = JSON.stringify( + take(input, { + Policy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -966,7 +968,7 @@ export const se_SetVaultAccessPolicyCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "vaultName", () => input.vaultName!, "{vaultName}", false); let body: any; if (input.policy !== undefined) { - body = se_VaultAccessPolicy(input.policy, context); + body = _json(input.policy); } if (body === undefined) { body = {}; @@ -1001,7 +1003,7 @@ export const se_SetVaultNotificationsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "vaultName", () => input.vaultName!, "{vaultName}", false); let body: any; if (input.vaultNotificationConfig !== undefined) { - body = se_VaultNotificationConfig(input.vaultNotificationConfig, context); + body = _json(input.vaultNotificationConfig); } if (body === undefined) { body = {}; @@ -1128,10 +1130,9 @@ const de_AbortMultipartUploadCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1181,10 +1182,9 @@ const de_AbortVaultLockCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1237,10 +1237,9 @@ const de_AddTagsToVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1293,10 +1292,9 @@ const de_CompleteMultipartUploadCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1346,10 +1344,9 @@ const de_CompleteVaultLockCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1400,10 +1397,9 @@ const de_CreateVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1453,10 +1449,9 @@ const de_DeleteArchiveCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1506,10 +1501,9 @@ const de_DeleteVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1559,10 +1553,9 @@ const de_DeleteVaultAccessPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1612,10 +1605,9 @@ const de_DeleteVaultNotificationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1635,72 +1627,30 @@ export const de_DescribeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Action != null) { - contents.Action = __expectString(data.Action); - } - if (data.ArchiveId != null) { - contents.ArchiveId = __expectString(data.ArchiveId); - } - if (data.ArchiveSHA256TreeHash != null) { - contents.ArchiveSHA256TreeHash = __expectString(data.ArchiveSHA256TreeHash); - } - if (data.ArchiveSizeInBytes != null) { - contents.ArchiveSizeInBytes = __expectLong(data.ArchiveSizeInBytes); - } - if (data.Completed != null) { - contents.Completed = __expectBoolean(data.Completed); - } - if (data.CompletionDate != null) { - contents.CompletionDate = __expectString(data.CompletionDate); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectString(data.CreationDate); - } - if (data.InventoryRetrievalParameters != null) { - contents.InventoryRetrievalParameters = de_InventoryRetrievalJobDescription( - data.InventoryRetrievalParameters, - context - ); - } - if (data.InventorySizeInBytes != null) { - contents.InventorySizeInBytes = __expectLong(data.InventorySizeInBytes); - } - if (data.JobDescription != null) { - contents.JobDescription = __expectString(data.JobDescription); - } - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } - if (data.JobOutputPath != null) { - contents.JobOutputPath = __expectString(data.JobOutputPath); - } - if (data.OutputLocation != null) { - contents.OutputLocation = de_OutputLocation(data.OutputLocation, context); - } - if (data.RetrievalByteRange != null) { - contents.RetrievalByteRange = __expectString(data.RetrievalByteRange); - } - if (data.SHA256TreeHash != null) { - contents.SHA256TreeHash = __expectString(data.SHA256TreeHash); - } - if (data.SNSTopic != null) { - contents.SNSTopic = __expectString(data.SNSTopic); - } - if (data.SelectParameters != null) { - contents.SelectParameters = de_SelectParameters(data.SelectParameters, context); - } - if (data.StatusCode != null) { - contents.StatusCode = __expectString(data.StatusCode); - } - if (data.StatusMessage != null) { - contents.StatusMessage = __expectString(data.StatusMessage); - } - if (data.Tier != null) { - contents.Tier = __expectString(data.Tier); - } - if (data.VaultARN != null) { - contents.VaultARN = __expectString(data.VaultARN); - } + const doc = take(data, { + Action: __expectString, + ArchiveId: __expectString, + ArchiveSHA256TreeHash: __expectString, + ArchiveSizeInBytes: __expectLong, + Completed: __expectBoolean, + CompletionDate: __expectString, + CreationDate: __expectString, + InventoryRetrievalParameters: _json, + InventorySizeInBytes: __expectLong, + JobDescription: __expectString, + JobId: __expectString, + JobOutputPath: __expectString, + OutputLocation: _json, + RetrievalByteRange: __expectString, + SHA256TreeHash: __expectString, + SNSTopic: __expectString, + SelectParameters: _json, + StatusCode: __expectString, + StatusMessage: __expectString, + Tier: __expectString, + VaultARN: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1731,10 +1681,9 @@ const de_DescribeJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1754,24 +1703,15 @@ export const de_DescribeVaultCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationDate != null) { - contents.CreationDate = __expectString(data.CreationDate); - } - if (data.LastInventoryDate != null) { - contents.LastInventoryDate = __expectString(data.LastInventoryDate); - } - if (data.NumberOfArchives != null) { - contents.NumberOfArchives = __expectLong(data.NumberOfArchives); - } - if (data.SizeInBytes != null) { - contents.SizeInBytes = __expectLong(data.SizeInBytes); - } - if (data.VaultARN != null) { - contents.VaultARN = __expectString(data.VaultARN); - } - if (data.VaultName != null) { - contents.VaultName = __expectString(data.VaultName); - } + const doc = take(data, { + CreationDate: __expectString, + LastInventoryDate: __expectString, + NumberOfArchives: __expectLong, + SizeInBytes: __expectLong, + VaultARN: __expectString, + VaultName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1802,10 +1742,9 @@ const de_DescribeVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1825,9 +1764,10 @@ export const de_GetDataRetrievalPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = de_DataRetrievalPolicy(data.Policy, context); - } + const doc = take(data, { + Policy: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1855,10 +1795,9 @@ const de_GetDataRetrievalPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1918,10 +1857,9 @@ const de_GetJobOutputCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1941,7 +1879,7 @@ export const de_GetVaultAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.policy = de_VaultAccessPolicy(data, context); + contents.policy = _json(data); return contents; }; @@ -1972,10 +1910,9 @@ const de_GetVaultAccessPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1995,18 +1932,13 @@ export const de_GetVaultLockCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationDate != null) { - contents.CreationDate = __expectString(data.CreationDate); - } - if (data.ExpirationDate != null) { - contents.ExpirationDate = __expectString(data.ExpirationDate); - } - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + CreationDate: __expectString, + ExpirationDate: __expectString, + Policy: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2037,10 +1969,9 @@ const de_GetVaultLockCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2060,7 +1991,7 @@ export const de_GetVaultNotificationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.vaultNotificationConfig = de_VaultNotificationConfig(data, context); + contents.vaultNotificationConfig = _json(data); return contents; }; @@ -2091,10 +2022,9 @@ const de_GetVaultNotificationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2153,10 +2083,9 @@ const de_InitiateJobCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2208,10 +2137,9 @@ const de_InitiateMultipartUploadCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2262,10 +2190,9 @@ const de_InitiateVaultLockCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2285,12 +2212,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JobList != null) { - contents.JobList = de_JobList(data.JobList, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + JobList: _json, + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2321,10 +2247,9 @@ const de_ListJobsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2344,12 +2269,11 @@ export const de_ListMultipartUploadsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.UploadsList != null) { - contents.UploadsList = de_UploadsList(data.UploadsList, context); - } + const doc = take(data, { + Marker: __expectString, + UploadsList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2380,10 +2304,9 @@ const de_ListMultipartUploadsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2403,27 +2326,16 @@ export const de_ListPartsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ArchiveDescription != null) { - contents.ArchiveDescription = __expectString(data.ArchiveDescription); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectString(data.CreationDate); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.MultipartUploadId != null) { - contents.MultipartUploadId = __expectString(data.MultipartUploadId); - } - if (data.PartSizeInBytes != null) { - contents.PartSizeInBytes = __expectLong(data.PartSizeInBytes); - } - if (data.Parts != null) { - contents.Parts = de_PartList(data.Parts, context); - } - if (data.VaultARN != null) { - contents.VaultARN = __expectString(data.VaultARN); - } + const doc = take(data, { + ArchiveDescription: __expectString, + CreationDate: __expectString, + Marker: __expectString, + MultipartUploadId: __expectString, + PartSizeInBytes: __expectLong, + Parts: _json, + VaultARN: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2454,10 +2366,9 @@ const de_ListPartsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2477,9 +2388,10 @@ export const de_ListProvisionedCapacityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProvisionedCapacityList != null) { - contents.ProvisionedCapacityList = de_ProvisionedCapacityList(data.ProvisionedCapacityList, context); - } + const doc = take(data, { + ProvisionedCapacityList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2507,10 +2419,9 @@ const de_ListProvisionedCapacityCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2530,9 +2441,10 @@ export const de_ListTagsForVaultCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2563,10 +2475,9 @@ const de_ListTagsForVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2586,12 +2497,11 @@ export const de_ListVaultsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.VaultList != null) { - contents.VaultList = de_VaultList(data.VaultList, context); - } + const doc = take(data, { + Marker: __expectString, + VaultList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2622,10 +2532,9 @@ const de_ListVaultsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,10 +2585,9 @@ const de_PurchaseProvisionedCapacityCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2729,10 +2637,9 @@ const de_RemoveTagsFromVaultCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2779,10 +2686,9 @@ const de_SetDataRetrievalPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2832,10 +2738,9 @@ const de_SetVaultAccessPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2885,10 +2790,9 @@ const de_SetVaultNotificationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2944,10 +2848,9 @@ const de_UploadArchiveCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3001,16 +2904,15 @@ const de_UploadMultipartPartCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InsufficientCapacityExceptionRes */ @@ -3020,15 +2922,12 @@ const de_InsufficientCapacityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new InsufficientCapacityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3045,15 +2944,12 @@ const de_InvalidParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3070,15 +2966,12 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3095,15 +2988,12 @@ const de_MissingParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new MissingParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3120,15 +3010,12 @@ const de_PolicyEnforcedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new PolicyEnforcedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3145,15 +3032,12 @@ const de_RequestTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3170,15 +3054,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3195,15 +3076,12 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3211,676 +3089,111 @@ const de_ServiceUnavailableExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccessControlPolicyList - */ -const se_AccessControlPolicyList = (input: Grant[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Grant(entry, context); - }); -}; +// se_AccessControlPolicyList omitted. -/** - * serializeAws_restJson1CSVInput - */ -const se_CSVInput = (input: CSVInput, context: __SerdeContext): any => { - return { - ...(input.Comments != null && { Comments: input.Comments }), - ...(input.FieldDelimiter != null && { FieldDelimiter: input.FieldDelimiter }), - ...(input.FileHeaderInfo != null && { FileHeaderInfo: input.FileHeaderInfo }), - ...(input.QuoteCharacter != null && { QuoteCharacter: input.QuoteCharacter }), - ...(input.QuoteEscapeCharacter != null && { QuoteEscapeCharacter: input.QuoteEscapeCharacter }), - ...(input.RecordDelimiter != null && { RecordDelimiter: input.RecordDelimiter }), - }; -}; +// se_CSVInput omitted. -/** - * serializeAws_restJson1CSVOutput - */ -const se_CSVOutput = (input: CSVOutput, context: __SerdeContext): any => { - return { - ...(input.FieldDelimiter != null && { FieldDelimiter: input.FieldDelimiter }), - ...(input.QuoteCharacter != null && { QuoteCharacter: input.QuoteCharacter }), - ...(input.QuoteEscapeCharacter != null && { QuoteEscapeCharacter: input.QuoteEscapeCharacter }), - ...(input.QuoteFields != null && { QuoteFields: input.QuoteFields }), - ...(input.RecordDelimiter != null && { RecordDelimiter: input.RecordDelimiter }), - }; -}; +// se_CSVOutput omitted. -/** - * serializeAws_restJson1DataRetrievalPolicy - */ -const se_DataRetrievalPolicy = (input: DataRetrievalPolicy, context: __SerdeContext): any => { - return { - ...(input.Rules != null && { Rules: se_DataRetrievalRulesList(input.Rules, context) }), - }; -}; +// se_DataRetrievalPolicy omitted. -/** - * serializeAws_restJson1DataRetrievalRule - */ -const se_DataRetrievalRule = (input: DataRetrievalRule, context: __SerdeContext): any => { - return { - ...(input.BytesPerHour != null && { BytesPerHour: input.BytesPerHour }), - ...(input.Strategy != null && { Strategy: input.Strategy }), - }; -}; +// se_DataRetrievalRule omitted. -/** - * serializeAws_restJson1DataRetrievalRulesList - */ -const se_DataRetrievalRulesList = (input: DataRetrievalRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataRetrievalRule(entry, context); - }); -}; +// se_DataRetrievalRulesList omitted. -/** - * serializeAws_restJson1Encryption - */ -const se_Encryption = (input: Encryption, context: __SerdeContext): any => { - return { - ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }), - ...(input.KMSContext != null && { KMSContext: input.KMSContext }), - ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }), - }; -}; +// se_Encryption omitted. -/** - * serializeAws_restJson1Grant - */ -const se_Grant = (input: Grant, context: __SerdeContext): any => { - return { - ...(input.Grantee != null && { Grantee: se_Grantee(input.Grantee, context) }), - ...(input.Permission != null && { Permission: input.Permission }), - }; -}; +// se_Grant omitted. -/** - * serializeAws_restJson1Grantee - */ -const se_Grantee = (input: Grantee, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.ID != null && { ID: input.ID }), - ...(input.Type != null && { Type: input.Type }), - ...(input.URI != null && { URI: input.URI }), - }; -}; +// se_Grantee omitted. -/** - * serializeAws_restJson1hashmap - */ -const se_hashmap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_hashmap omitted. -/** - * serializeAws_restJson1InputSerialization - */ -const se_InputSerialization = (input: InputSerialization, context: __SerdeContext): any => { - return { - ...(input.csv != null && { csv: se_CSVInput(input.csv, context) }), - }; -}; +// se_InputSerialization omitted. -/** - * serializeAws_restJson1InventoryRetrievalJobInput - */ -const se_InventoryRetrievalJobInput = (input: InventoryRetrievalJobInput, context: __SerdeContext): any => { - return { - ...(input.EndDate != null && { EndDate: input.EndDate }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.StartDate != null && { StartDate: input.StartDate }), - }; -}; +// se_InventoryRetrievalJobInput omitted. -/** - * serializeAws_restJson1JobParameters - */ -const se_JobParameters = (input: JobParameters, context: __SerdeContext): any => { - return { - ...(input.ArchiveId != null && { ArchiveId: input.ArchiveId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Format != null && { Format: input.Format }), - ...(input.InventoryRetrievalParameters != null && { - InventoryRetrievalParameters: se_InventoryRetrievalJobInput(input.InventoryRetrievalParameters, context), - }), - ...(input.OutputLocation != null && { OutputLocation: se_OutputLocation(input.OutputLocation, context) }), - ...(input.RetrievalByteRange != null && { RetrievalByteRange: input.RetrievalByteRange }), - ...(input.SNSTopic != null && { SNSTopic: input.SNSTopic }), - ...(input.SelectParameters != null && { SelectParameters: se_SelectParameters(input.SelectParameters, context) }), - ...(input.Tier != null && { Tier: input.Tier }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_JobParameters omitted. -/** - * serializeAws_restJson1NotificationEventList - */ -const se_NotificationEventList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NotificationEventList omitted. -/** - * serializeAws_restJson1OutputLocation - */ -const se_OutputLocation = (input: OutputLocation, context: __SerdeContext): any => { - return { - ...(input.S3 != null && { S3: se_S3Location(input.S3, context) }), - }; -}; +// se_OutputLocation omitted. -/** - * serializeAws_restJson1OutputSerialization - */ -const se_OutputSerialization = (input: OutputSerialization, context: __SerdeContext): any => { - return { - ...(input.csv != null && { csv: se_CSVOutput(input.csv, context) }), - }; -}; +// se_OutputSerialization omitted. -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.AccessControlList != null && { - AccessControlList: se_AccessControlPolicyList(input.AccessControlList, context), - }), - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.CannedACL != null && { CannedACL: input.CannedACL }), - ...(input.Encryption != null && { Encryption: se_Encryption(input.Encryption, context) }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.StorageClass != null && { StorageClass: input.StorageClass }), - ...(input.Tagging != null && { Tagging: se_hashmap(input.Tagging, context) }), - ...(input.UserMetadata != null && { UserMetadata: se_hashmap(input.UserMetadata, context) }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1SelectParameters - */ -const se_SelectParameters = (input: SelectParameters, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.ExpressionType != null && { ExpressionType: input.ExpressionType }), - ...(input.InputSerialization != null && { - InputSerialization: se_InputSerialization(input.InputSerialization, context), - }), - ...(input.OutputSerialization != null && { - OutputSerialization: se_OutputSerialization(input.OutputSerialization, context), - }), - }; -}; +// se_SelectParameters omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1VaultAccessPolicy - */ -const se_VaultAccessPolicy = (input: VaultAccessPolicy, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - }; -}; +// se_VaultAccessPolicy omitted. -/** - * serializeAws_restJson1VaultLockPolicy - */ -const se_VaultLockPolicy = (input: VaultLockPolicy, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - }; -}; +// se_VaultLockPolicy omitted. -/** - * serializeAws_restJson1VaultNotificationConfig - */ -const se_VaultNotificationConfig = (input: VaultNotificationConfig, context: __SerdeContext): any => { - return { - ...(input.Events != null && { Events: se_NotificationEventList(input.Events, context) }), - ...(input.SNSTopic != null && { SNSTopic: input.SNSTopic }), - }; -}; +// se_VaultNotificationConfig omitted. -/** - * deserializeAws_restJson1AccessControlPolicyList - */ -const de_AccessControlPolicyList = (output: any, context: __SerdeContext): Grant[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Grant(entry, context); - }); - return retVal; -}; +// de_AccessControlPolicyList omitted. -/** - * deserializeAws_restJson1CSVInput - */ -const de_CSVInput = (output: any, context: __SerdeContext): CSVInput => { - return { - Comments: __expectString(output.Comments), - FieldDelimiter: __expectString(output.FieldDelimiter), - FileHeaderInfo: __expectString(output.FileHeaderInfo), - QuoteCharacter: __expectString(output.QuoteCharacter), - QuoteEscapeCharacter: __expectString(output.QuoteEscapeCharacter), - RecordDelimiter: __expectString(output.RecordDelimiter), - } as any; -}; +// de_CSVInput omitted. -/** - * deserializeAws_restJson1CSVOutput - */ -const de_CSVOutput = (output: any, context: __SerdeContext): CSVOutput => { - return { - FieldDelimiter: __expectString(output.FieldDelimiter), - QuoteCharacter: __expectString(output.QuoteCharacter), - QuoteEscapeCharacter: __expectString(output.QuoteEscapeCharacter), - QuoteFields: __expectString(output.QuoteFields), - RecordDelimiter: __expectString(output.RecordDelimiter), - } as any; -}; +// de_CSVOutput omitted. -/** - * deserializeAws_restJson1DataRetrievalPolicy - */ -const de_DataRetrievalPolicy = (output: any, context: __SerdeContext): DataRetrievalPolicy => { - return { - Rules: output.Rules != null ? de_DataRetrievalRulesList(output.Rules, context) : undefined, - } as any; -}; +// de_DataRetrievalPolicy omitted. -/** - * deserializeAws_restJson1DataRetrievalRule - */ -const de_DataRetrievalRule = (output: any, context: __SerdeContext): DataRetrievalRule => { - return { - BytesPerHour: __expectLong(output.BytesPerHour), - Strategy: __expectString(output.Strategy), - } as any; -}; +// de_DataRetrievalRule omitted. -/** - * deserializeAws_restJson1DataRetrievalRulesList - */ -const de_DataRetrievalRulesList = (output: any, context: __SerdeContext): DataRetrievalRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataRetrievalRule(entry, context); - }); - return retVal; -}; +// de_DataRetrievalRulesList omitted. -/** - * deserializeAws_restJson1DescribeVaultOutput - */ -const de_DescribeVaultOutput = (output: any, context: __SerdeContext): DescribeVaultOutput => { - return { - CreationDate: __expectString(output.CreationDate), - LastInventoryDate: __expectString(output.LastInventoryDate), - NumberOfArchives: __expectLong(output.NumberOfArchives), - SizeInBytes: __expectLong(output.SizeInBytes), - VaultARN: __expectString(output.VaultARN), - VaultName: __expectString(output.VaultName), - } as any; -}; +// de_DescribeVaultOutput omitted. -/** - * deserializeAws_restJson1Encryption - */ -const de_Encryption = (output: any, context: __SerdeContext): Encryption => { - return { - EncryptionType: __expectString(output.EncryptionType), - KMSContext: __expectString(output.KMSContext), - KMSKeyId: __expectString(output.KMSKeyId), - } as any; -}; +// de_Encryption omitted. -/** - * deserializeAws_restJson1GlacierJobDescription - */ -const de_GlacierJobDescription = (output: any, context: __SerdeContext): GlacierJobDescription => { - return { - Action: __expectString(output.Action), - ArchiveId: __expectString(output.ArchiveId), - ArchiveSHA256TreeHash: __expectString(output.ArchiveSHA256TreeHash), - ArchiveSizeInBytes: __expectLong(output.ArchiveSizeInBytes), - Completed: __expectBoolean(output.Completed), - CompletionDate: __expectString(output.CompletionDate), - CreationDate: __expectString(output.CreationDate), - InventoryRetrievalParameters: - output.InventoryRetrievalParameters != null - ? de_InventoryRetrievalJobDescription(output.InventoryRetrievalParameters, context) - : undefined, - InventorySizeInBytes: __expectLong(output.InventorySizeInBytes), - JobDescription: __expectString(output.JobDescription), - JobId: __expectString(output.JobId), - JobOutputPath: __expectString(output.JobOutputPath), - OutputLocation: output.OutputLocation != null ? de_OutputLocation(output.OutputLocation, context) : undefined, - RetrievalByteRange: __expectString(output.RetrievalByteRange), - SHA256TreeHash: __expectString(output.SHA256TreeHash), - SNSTopic: __expectString(output.SNSTopic), - SelectParameters: - output.SelectParameters != null ? de_SelectParameters(output.SelectParameters, context) : undefined, - StatusCode: __expectString(output.StatusCode), - StatusMessage: __expectString(output.StatusMessage), - Tier: __expectString(output.Tier), - VaultARN: __expectString(output.VaultARN), - } as any; -}; +// de_GlacierJobDescription omitted. -/** - * deserializeAws_restJson1Grant - */ -const de_Grant = (output: any, context: __SerdeContext): Grant => { - return { - Grantee: output.Grantee != null ? de_Grantee(output.Grantee, context) : undefined, - Permission: __expectString(output.Permission), - } as any; -}; +// de_Grant omitted. -/** - * deserializeAws_restJson1Grantee - */ -const de_Grantee = (output: any, context: __SerdeContext): Grantee => { - return { - DisplayName: __expectString(output.DisplayName), - EmailAddress: __expectString(output.EmailAddress), - ID: __expectString(output.ID), - Type: __expectString(output.Type), - URI: __expectString(output.URI), - } as any; -}; +// de_Grantee omitted. -/** - * deserializeAws_restJson1hashmap - */ -const de_hashmap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_hashmap omitted. -/** - * deserializeAws_restJson1InputSerialization - */ -const de_InputSerialization = (output: any, context: __SerdeContext): InputSerialization => { - return { - csv: output.csv != null ? de_CSVInput(output.csv, context) : undefined, - } as any; -}; +// de_InputSerialization omitted. -/** - * deserializeAws_restJson1InventoryRetrievalJobDescription - */ -const de_InventoryRetrievalJobDescription = ( - output: any, - context: __SerdeContext -): InventoryRetrievalJobDescription => { - return { - EndDate: __expectString(output.EndDate), - Format: __expectString(output.Format), - Limit: __expectString(output.Limit), - Marker: __expectString(output.Marker), - StartDate: __expectString(output.StartDate), - } as any; -}; +// de_InventoryRetrievalJobDescription omitted. -/** - * deserializeAws_restJson1JobList - */ -const de_JobList = (output: any, context: __SerdeContext): GlacierJobDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlacierJobDescription(entry, context); - }); - return retVal; -}; +// de_JobList omitted. -/** - * deserializeAws_restJson1NotificationEventList - */ -const de_NotificationEventList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotificationEventList omitted. -/** - * deserializeAws_restJson1OutputLocation - */ -const de_OutputLocation = (output: any, context: __SerdeContext): OutputLocation => { - return { - S3: output.S3 != null ? de_S3Location(output.S3, context) : undefined, - } as any; -}; +// de_OutputLocation omitted. -/** - * deserializeAws_restJson1OutputSerialization - */ -const de_OutputSerialization = (output: any, context: __SerdeContext): OutputSerialization => { - return { - csv: output.csv != null ? de_CSVOutput(output.csv, context) : undefined, - } as any; -}; +// de_OutputSerialization omitted. -/** - * deserializeAws_restJson1PartList - */ -const de_PartList = (output: any, context: __SerdeContext): PartListElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartListElement(entry, context); - }); - return retVal; -}; +// de_PartList omitted. -/** - * deserializeAws_restJson1PartListElement - */ -const de_PartListElement = (output: any, context: __SerdeContext): PartListElement => { - return { - RangeInBytes: __expectString(output.RangeInBytes), - SHA256TreeHash: __expectString(output.SHA256TreeHash), - } as any; -}; +// de_PartListElement omitted. -/** - * deserializeAws_restJson1ProvisionedCapacityDescription - */ -const de_ProvisionedCapacityDescription = (output: any, context: __SerdeContext): ProvisionedCapacityDescription => { - return { - CapacityId: __expectString(output.CapacityId), - ExpirationDate: __expectString(output.ExpirationDate), - StartDate: __expectString(output.StartDate), - } as any; -}; +// de_ProvisionedCapacityDescription omitted. -/** - * deserializeAws_restJson1ProvisionedCapacityList - */ -const de_ProvisionedCapacityList = (output: any, context: __SerdeContext): ProvisionedCapacityDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisionedCapacityDescription(entry, context); - }); - return retVal; -}; +// de_ProvisionedCapacityList omitted. -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - AccessControlList: - output.AccessControlList != null ? de_AccessControlPolicyList(output.AccessControlList, context) : undefined, - BucketName: __expectString(output.BucketName), - CannedACL: __expectString(output.CannedACL), - Encryption: output.Encryption != null ? de_Encryption(output.Encryption, context) : undefined, - Prefix: __expectString(output.Prefix), - StorageClass: __expectString(output.StorageClass), - Tagging: output.Tagging != null ? de_hashmap(output.Tagging, context) : undefined, - UserMetadata: output.UserMetadata != null ? de_hashmap(output.UserMetadata, context) : undefined, - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1SelectParameters - */ -const de_SelectParameters = (output: any, context: __SerdeContext): SelectParameters => { - return { - Expression: __expectString(output.Expression), - ExpressionType: __expectString(output.ExpressionType), - InputSerialization: - output.InputSerialization != null ? de_InputSerialization(output.InputSerialization, context) : undefined, - OutputSerialization: - output.OutputSerialization != null ? de_OutputSerialization(output.OutputSerialization, context) : undefined, - } as any; -}; +// de_SelectParameters omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1UploadListElement - */ -const de_UploadListElement = (output: any, context: __SerdeContext): UploadListElement => { - return { - ArchiveDescription: __expectString(output.ArchiveDescription), - CreationDate: __expectString(output.CreationDate), - MultipartUploadId: __expectString(output.MultipartUploadId), - PartSizeInBytes: __expectLong(output.PartSizeInBytes), - VaultARN: __expectString(output.VaultARN), - } as any; -}; +// de_UploadListElement omitted. -/** - * deserializeAws_restJson1UploadsList - */ -const de_UploadsList = (output: any, context: __SerdeContext): UploadListElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UploadListElement(entry, context); - }); - return retVal; -}; +// de_UploadsList omitted. -/** - * deserializeAws_restJson1VaultAccessPolicy - */ -const de_VaultAccessPolicy = (output: any, context: __SerdeContext): VaultAccessPolicy => { - return { - Policy: __expectString(output.Policy), - } as any; -}; +// de_VaultAccessPolicy omitted. -/** - * deserializeAws_restJson1VaultList - */ -const de_VaultList = (output: any, context: __SerdeContext): DescribeVaultOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DescribeVaultOutput(entry, context); - }); - return retVal; -}; +// de_VaultList omitted. -/** - * deserializeAws_restJson1VaultNotificationConfig - */ -const de_VaultNotificationConfig = (output: any, context: __SerdeContext): VaultNotificationConfig => { - return { - Events: output.Events != null ? de_NotificationEventList(output.Events, context) : undefined, - SNSTopic: __expectString(output.SNSTopic), - } as any; -}; +// de_VaultNotificationConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts b/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts index 533f85936998..dae31b284680 100644 --- a/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts +++ b/clients/client-global-accelerator/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,7 +11,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -165,15 +167,12 @@ import { WithdrawByoipCidrCommandInput, WithdrawByoipCidrCommandOutput } from ". import { GlobalAcceleratorServiceException as __BaseException } from "../models/GlobalAcceleratorServiceException"; import { Accelerator, - AcceleratorAttributes, AcceleratorEvent, AcceleratorNotDisabledException, AcceleratorNotFoundException, AccessDeniedException, AddCustomRoutingEndpointsRequest, - AddCustomRoutingEndpointsResponse, AddEndpointsRequest, - AddEndpointsResponse, AdvertiseByoipCidrRequest, AdvertiseByoipCidrResponse, AllowCustomRoutingTrafficRequest, @@ -189,21 +188,13 @@ import { CreateCustomRoutingAcceleratorRequest, CreateCustomRoutingAcceleratorResponse, CreateCustomRoutingEndpointGroupRequest, - CreateCustomRoutingEndpointGroupResponse, CreateCustomRoutingListenerRequest, - CreateCustomRoutingListenerResponse, CreateEndpointGroupRequest, CreateEndpointGroupResponse, CreateListenerRequest, - CreateListenerResponse, CustomRoutingAccelerator, - CustomRoutingAcceleratorAttributes, CustomRoutingDestinationConfiguration, - CustomRoutingDestinationDescription, CustomRoutingEndpointConfiguration, - CustomRoutingEndpointDescription, - CustomRoutingEndpointGroup, - CustomRoutingListener, CustomRoutingProtocol, DeleteAcceleratorRequest, DeleteCustomRoutingAcceleratorRequest, @@ -215,25 +206,18 @@ import { DeprovisionByoipCidrRequest, DeprovisionByoipCidrResponse, DescribeAcceleratorAttributesRequest, - DescribeAcceleratorAttributesResponse, DescribeAcceleratorRequest, DescribeAcceleratorResponse, DescribeCustomRoutingAcceleratorAttributesRequest, - DescribeCustomRoutingAcceleratorAttributesResponse, DescribeCustomRoutingAcceleratorRequest, DescribeCustomRoutingAcceleratorResponse, DescribeCustomRoutingEndpointGroupRequest, - DescribeCustomRoutingEndpointGroupResponse, DescribeCustomRoutingListenerRequest, - DescribeCustomRoutingListenerResponse, DescribeEndpointGroupRequest, DescribeEndpointGroupResponse, DescribeListenerRequest, - DescribeListenerResponse, - DestinationPortMapping, EndpointAlreadyExistsException, EndpointConfiguration, - EndpointDescription, EndpointGroup, EndpointGroupAlreadyExistsException, EndpointGroupNotFoundException, @@ -244,7 +228,6 @@ import { InvalidArgumentException, InvalidNextTokenException, InvalidPortRangeException, - IpSet, LimitExceededException, ListAcceleratorsRequest, ListAcceleratorsResponse, @@ -253,50 +236,34 @@ import { ListCustomRoutingAcceleratorsRequest, ListCustomRoutingAcceleratorsResponse, ListCustomRoutingEndpointGroupsRequest, - ListCustomRoutingEndpointGroupsResponse, ListCustomRoutingListenersRequest, - ListCustomRoutingListenersResponse, ListCustomRoutingPortMappingsByDestinationRequest, - ListCustomRoutingPortMappingsByDestinationResponse, ListCustomRoutingPortMappingsRequest, - ListCustomRoutingPortMappingsResponse, ListEndpointGroupsRequest, ListEndpointGroupsResponse, - Listener, ListenerNotFoundException, ListListenersRequest, - ListListenersResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, - PortMapping, PortOverride, PortRange, - Protocol, ProvisionByoipCidrRequest, ProvisionByoipCidrResponse, RemoveCustomRoutingEndpointsRequest, RemoveEndpointsRequest, - SocketAddress, Tag, TagResourceRequest, - TagResourceResponse, TransactionInProgressException, UntagResourceRequest, - UntagResourceResponse, UpdateAcceleratorAttributesRequest, - UpdateAcceleratorAttributesResponse, UpdateAcceleratorRequest, UpdateAcceleratorResponse, UpdateCustomRoutingAcceleratorAttributesRequest, - UpdateCustomRoutingAcceleratorAttributesResponse, UpdateCustomRoutingAcceleratorRequest, UpdateCustomRoutingAcceleratorResponse, UpdateCustomRoutingListenerRequest, - UpdateCustomRoutingListenerResponse, UpdateEndpointGroupRequest, UpdateEndpointGroupResponse, UpdateListenerRequest, - UpdateListenerResponse, WithdrawByoipCidrRequest, WithdrawByoipCidrResponse, } from "../models/models_0"; @@ -310,7 +277,7 @@ export const se_AddCustomRoutingEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddCustomRoutingEndpoints"); let body: any; - body = JSON.stringify(se_AddCustomRoutingEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -323,7 +290,7 @@ export const se_AddEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddEndpoints"); let body: any; - body = JSON.stringify(se_AddEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -336,7 +303,7 @@ export const se_AdvertiseByoipCidrCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AdvertiseByoipCidr"); let body: any; - body = JSON.stringify(se_AdvertiseByoipCidrRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -349,7 +316,7 @@ export const se_AllowCustomRoutingTrafficCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllowCustomRoutingTraffic"); let body: any; - body = JSON.stringify(se_AllowCustomRoutingTrafficRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -440,7 +407,7 @@ export const se_DeleteAcceleratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAccelerator"); let body: any; - body = JSON.stringify(se_DeleteAcceleratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -453,7 +420,7 @@ export const se_DeleteCustomRoutingAcceleratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCustomRoutingAccelerator"); let body: any; - body = JSON.stringify(se_DeleteCustomRoutingAcceleratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -466,7 +433,7 @@ export const se_DeleteCustomRoutingEndpointGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCustomRoutingEndpointGroup"); let body: any; - body = JSON.stringify(se_DeleteCustomRoutingEndpointGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -479,7 +446,7 @@ export const se_DeleteCustomRoutingListenerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCustomRoutingListener"); let body: any; - body = JSON.stringify(se_DeleteCustomRoutingListenerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -492,7 +459,7 @@ export const se_DeleteEndpointGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpointGroup"); let body: any; - body = JSON.stringify(se_DeleteEndpointGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -505,7 +472,7 @@ export const se_DeleteListenerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteListener"); let body: any; - body = JSON.stringify(se_DeleteListenerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -518,7 +485,7 @@ export const se_DenyCustomRoutingTrafficCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DenyCustomRoutingTraffic"); let body: any; - body = JSON.stringify(se_DenyCustomRoutingTrafficRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -531,7 +498,7 @@ export const se_DeprovisionByoipCidrCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeprovisionByoipCidr"); let body: any; - body = JSON.stringify(se_DeprovisionByoipCidrRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -544,7 +511,7 @@ export const se_DescribeAcceleratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccelerator"); let body: any; - body = JSON.stringify(se_DescribeAcceleratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -557,7 +524,7 @@ export const se_DescribeAcceleratorAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAcceleratorAttributes"); let body: any; - body = JSON.stringify(se_DescribeAcceleratorAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -570,7 +537,7 @@ export const se_DescribeCustomRoutingAcceleratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCustomRoutingAccelerator"); let body: any; - body = JSON.stringify(se_DescribeCustomRoutingAcceleratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -583,7 +550,7 @@ export const se_DescribeCustomRoutingAcceleratorAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCustomRoutingAcceleratorAttributes"); let body: any; - body = JSON.stringify(se_DescribeCustomRoutingAcceleratorAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -596,7 +563,7 @@ export const se_DescribeCustomRoutingEndpointGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCustomRoutingEndpointGroup"); let body: any; - body = JSON.stringify(se_DescribeCustomRoutingEndpointGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -609,7 +576,7 @@ export const se_DescribeCustomRoutingListenerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCustomRoutingListener"); let body: any; - body = JSON.stringify(se_DescribeCustomRoutingListenerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -622,7 +589,7 @@ export const se_DescribeEndpointGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpointGroup"); let body: any; - body = JSON.stringify(se_DescribeEndpointGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -635,7 +602,7 @@ export const se_DescribeListenerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeListener"); let body: any; - body = JSON.stringify(se_DescribeListenerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -648,7 +615,7 @@ export const se_ListAcceleratorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccelerators"); let body: any; - body = JSON.stringify(se_ListAcceleratorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -661,7 +628,7 @@ export const se_ListByoipCidrsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListByoipCidrs"); let body: any; - body = JSON.stringify(se_ListByoipCidrsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -674,7 +641,7 @@ export const se_ListCustomRoutingAcceleratorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomRoutingAccelerators"); let body: any; - body = JSON.stringify(se_ListCustomRoutingAcceleratorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -687,7 +654,7 @@ export const se_ListCustomRoutingEndpointGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomRoutingEndpointGroups"); let body: any; - body = JSON.stringify(se_ListCustomRoutingEndpointGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -700,7 +667,7 @@ export const se_ListCustomRoutingListenersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomRoutingListeners"); let body: any; - body = JSON.stringify(se_ListCustomRoutingListenersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -713,7 +680,7 @@ export const se_ListCustomRoutingPortMappingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomRoutingPortMappings"); let body: any; - body = JSON.stringify(se_ListCustomRoutingPortMappingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -726,7 +693,7 @@ export const se_ListCustomRoutingPortMappingsByDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomRoutingPortMappingsByDestination"); let body: any; - body = JSON.stringify(se_ListCustomRoutingPortMappingsByDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -739,7 +706,7 @@ export const se_ListEndpointGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEndpointGroups"); let body: any; - body = JSON.stringify(se_ListEndpointGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -752,7 +719,7 @@ export const se_ListListenersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListListeners"); let body: any; - body = JSON.stringify(se_ListListenersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -765,7 +732,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -778,7 +745,7 @@ export const se_ProvisionByoipCidrCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ProvisionByoipCidr"); let body: any; - body = JSON.stringify(se_ProvisionByoipCidrRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -791,7 +758,7 @@ export const se_RemoveCustomRoutingEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveCustomRoutingEndpoints"); let body: any; - body = JSON.stringify(se_RemoveCustomRoutingEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -804,7 +771,7 @@ export const se_RemoveEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveEndpoints"); let body: any; - body = JSON.stringify(se_RemoveEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -817,7 +784,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -830,7 +797,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -843,7 +810,7 @@ export const se_UpdateAcceleratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAccelerator"); let body: any; - body = JSON.stringify(se_UpdateAcceleratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -856,7 +823,7 @@ export const se_UpdateAcceleratorAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAcceleratorAttributes"); let body: any; - body = JSON.stringify(se_UpdateAcceleratorAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -869,7 +836,7 @@ export const se_UpdateCustomRoutingAcceleratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCustomRoutingAccelerator"); let body: any; - body = JSON.stringify(se_UpdateCustomRoutingAcceleratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -882,7 +849,7 @@ export const se_UpdateCustomRoutingAcceleratorAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCustomRoutingAcceleratorAttributes"); let body: any; - body = JSON.stringify(se_UpdateCustomRoutingAcceleratorAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -895,7 +862,7 @@ export const se_UpdateCustomRoutingListenerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCustomRoutingListener"); let body: any; - body = JSON.stringify(se_UpdateCustomRoutingListenerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -921,7 +888,7 @@ export const se_UpdateListenerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateListener"); let body: any; - body = JSON.stringify(se_UpdateListenerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -934,7 +901,7 @@ export const se_WithdrawByoipCidrCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("WithdrawByoipCidr"); let body: any; - body = JSON.stringify(se_WithdrawByoipCidrRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -950,12 +917,12 @@ export const de_AddCustomRoutingEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddCustomRoutingEndpointsResponse(data, context); + contents = _json(data); const response: AddCustomRoutingEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -994,10 +961,9 @@ const de_AddCustomRoutingEndpointsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1015,12 +981,12 @@ export const de_AddEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddEndpointsResponse(data, context); + contents = _json(data); const response: AddEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1056,10 +1022,9 @@ const de_AddEndpointsCommandError = async ( throw await de_TransactionInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1082,7 +1047,7 @@ export const de_AdvertiseByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1115,10 +1080,9 @@ const de_AdvertiseByoipCidrCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1138,7 +1102,7 @@ export const de_AllowCustomRoutingTrafficCommand = async ( const response: AllowCustomRoutingTrafficCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1165,10 +1129,9 @@ const de_AllowCustomRoutingTrafficCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1191,7 +1154,7 @@ export const de_CreateAcceleratorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1218,10 +1181,9 @@ const de_CreateAcceleratorCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1244,7 +1206,7 @@ export const de_CreateCustomRoutingAcceleratorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1274,10 +1236,9 @@ const de_CreateCustomRoutingAcceleratorCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1295,12 +1256,12 @@ export const de_CreateCustomRoutingEndpointGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCustomRoutingEndpointGroupResponse(data, context); + contents = _json(data); const response: CreateCustomRoutingEndpointGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1342,10 +1303,9 @@ const de_CreateCustomRoutingEndpointGroupCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1363,12 +1323,12 @@ export const de_CreateCustomRoutingListenerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCustomRoutingListenerResponse(data, context); + contents = _json(data); const response: CreateCustomRoutingListenerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1401,10 +1361,9 @@ const de_CreateCustomRoutingListenerCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1427,7 +1386,7 @@ export const de_CreateEndpointGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1466,10 +1425,9 @@ const de_CreateEndpointGroupCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1487,12 +1445,12 @@ export const de_CreateListenerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateListenerResponse(data, context); + contents = _json(data); const response: CreateListenerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1525,10 +1483,9 @@ const de_CreateListenerCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1548,7 +1505,7 @@ export const de_DeleteAcceleratorCommand = async ( const response: DeleteAcceleratorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1581,10 +1538,9 @@ const de_DeleteAcceleratorCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1604,7 +1560,7 @@ export const de_DeleteCustomRoutingAcceleratorCommand = async ( const response: DeleteCustomRoutingAcceleratorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1637,10 +1593,9 @@ const de_DeleteCustomRoutingAcceleratorCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1660,7 +1615,7 @@ export const de_DeleteCustomRoutingEndpointGroupCommand = async ( const response: DeleteCustomRoutingEndpointGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1687,10 +1642,9 @@ const de_DeleteCustomRoutingEndpointGroupCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1710,7 +1664,7 @@ export const de_DeleteCustomRoutingListenerCommand = async ( const response: DeleteCustomRoutingListenerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1740,10 +1694,9 @@ const de_DeleteCustomRoutingListenerCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1763,7 +1716,7 @@ export const de_DeleteEndpointGroupCommand = async ( const response: DeleteEndpointGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1790,10 +1743,9 @@ const de_DeleteEndpointGroupCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1813,7 +1765,7 @@ export const de_DeleteListenerCommand = async ( const response: DeleteListenerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1843,10 +1795,9 @@ const de_DeleteListenerCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1866,7 +1817,7 @@ export const de_DenyCustomRoutingTrafficCommand = async ( const response: DenyCustomRoutingTrafficCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1893,10 +1844,9 @@ const de_DenyCustomRoutingTrafficCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1919,7 +1869,7 @@ export const de_DeprovisionByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1952,10 +1902,9 @@ const de_DeprovisionByoipCidrCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1978,7 +1927,7 @@ export const de_DescribeAcceleratorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2005,10 +1954,9 @@ const de_DescribeAcceleratorCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,12 +1974,12 @@ export const de_DescribeAcceleratorAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAcceleratorAttributesResponse(data, context); + contents = _json(data); const response: DescribeAcceleratorAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2058,10 +2006,9 @@ const de_DescribeAcceleratorAttributesCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,7 +2031,7 @@ export const de_DescribeCustomRoutingAcceleratorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2111,10 +2058,9 @@ const de_DescribeCustomRoutingAcceleratorCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2132,12 +2078,12 @@ export const de_DescribeCustomRoutingAcceleratorAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCustomRoutingAcceleratorAttributesResponse(data, context); + contents = _json(data); const response: DescribeCustomRoutingAcceleratorAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2164,10 +2110,9 @@ const de_DescribeCustomRoutingAcceleratorAttributesCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2185,12 +2130,12 @@ export const de_DescribeCustomRoutingEndpointGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCustomRoutingEndpointGroupResponse(data, context); + contents = _json(data); const response: DescribeCustomRoutingEndpointGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2217,10 +2162,9 @@ const de_DescribeCustomRoutingEndpointGroupCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2238,12 +2182,12 @@ export const de_DescribeCustomRoutingListenerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCustomRoutingListenerResponse(data, context); + contents = _json(data); const response: DescribeCustomRoutingListenerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2270,10 +2214,9 @@ const de_DescribeCustomRoutingListenerCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2296,7 +2239,7 @@ export const de_DescribeEndpointGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2323,10 +2266,9 @@ const de_DescribeEndpointGroupCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2344,12 +2286,12 @@ export const de_DescribeListenerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeListenerResponse(data, context); + contents = _json(data); const response: DescribeListenerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2376,10 +2318,9 @@ const de_DescribeListenerCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2402,7 +2343,7 @@ export const de_ListAcceleratorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2429,10 +2370,9 @@ const de_ListAcceleratorsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2455,7 +2395,7 @@ export const de_ListByoipCidrsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2485,10 +2425,9 @@ const de_ListByoipCidrsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2511,7 +2450,7 @@ export const de_ListCustomRoutingAcceleratorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2538,10 +2477,9 @@ const de_ListCustomRoutingAcceleratorsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2559,12 +2497,12 @@ export const de_ListCustomRoutingEndpointGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCustomRoutingEndpointGroupsResponse(data, context); + contents = _json(data); const response: ListCustomRoutingEndpointGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2594,10 +2532,9 @@ const de_ListCustomRoutingEndpointGroupsCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2615,12 +2552,12 @@ export const de_ListCustomRoutingListenersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCustomRoutingListenersResponse(data, context); + contents = _json(data); const response: ListCustomRoutingListenersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2650,10 +2587,9 @@ const de_ListCustomRoutingListenersCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2671,12 +2607,12 @@ export const de_ListCustomRoutingPortMappingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCustomRoutingPortMappingsResponse(data, context); + contents = _json(data); const response: ListCustomRoutingPortMappingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2709,10 +2645,9 @@ const de_ListCustomRoutingPortMappingsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2730,12 +2665,12 @@ export const de_ListCustomRoutingPortMappingsByDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCustomRoutingPortMappingsByDestinationResponse(data, context); + contents = _json(data); const response: ListCustomRoutingPortMappingsByDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2765,10 +2700,9 @@ const de_ListCustomRoutingPortMappingsByDestinationCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2791,7 +2725,7 @@ export const de_ListEndpointGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2821,10 +2755,9 @@ const de_ListEndpointGroupsCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2842,12 +2775,12 @@ export const de_ListListenersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListListenersResponse(data, context); + contents = _json(data); const response: ListListenersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2877,10 +2810,9 @@ const de_ListListenersCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2898,12 +2830,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2930,10 +2862,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2956,7 +2887,7 @@ export const de_ProvisionByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2989,10 +2920,9 @@ const de_ProvisionByoipCidrCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3012,7 +2942,7 @@ export const de_RemoveCustomRoutingEndpointsCommand = async ( const response: RemoveCustomRoutingEndpointsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3048,10 +2978,9 @@ const de_RemoveCustomRoutingEndpointsCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3071,7 +3000,7 @@ export const de_RemoveEndpointsCommand = async ( const response: RemoveEndpointsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3104,10 +3033,9 @@ const de_RemoveEndpointsCommandError = async ( throw await de_TransactionInProgressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3125,12 +3053,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3157,10 +3085,9 @@ const de_TagResourceCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3178,12 +3105,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3210,10 +3137,9 @@ const de_UntagResourceCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3236,7 +3162,7 @@ export const de_UpdateAcceleratorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3266,10 +3192,9 @@ const de_UpdateAcceleratorCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3287,12 +3212,12 @@ export const de_UpdateAcceleratorAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAcceleratorAttributesResponse(data, context); + contents = _json(data); const response: UpdateAcceleratorAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3322,10 +3247,9 @@ const de_UpdateAcceleratorAttributesCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3348,7 +3272,7 @@ export const de_UpdateCustomRoutingAcceleratorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3375,10 +3299,9 @@ const de_UpdateCustomRoutingAcceleratorCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3396,12 +3319,12 @@ export const de_UpdateCustomRoutingAcceleratorAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCustomRoutingAcceleratorAttributesResponse(data, context); + contents = _json(data); const response: UpdateCustomRoutingAcceleratorAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3431,10 +3354,9 @@ const de_UpdateCustomRoutingAcceleratorAttributesCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3452,12 +3374,12 @@ export const de_UpdateCustomRoutingListenerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCustomRoutingListenerResponse(data, context); + contents = _json(data); const response: UpdateCustomRoutingListenerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3490,10 +3412,9 @@ const de_UpdateCustomRoutingListenerCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3516,7 +3437,7 @@ export const de_UpdateEndpointGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3549,10 +3470,9 @@ const de_UpdateEndpointGroupCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3570,12 +3490,12 @@ export const de_UpdateListenerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateListenerResponse(data, context); + contents = _json(data); const response: UpdateListenerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3608,10 +3528,9 @@ const de_UpdateListenerCommandError = async ( throw await de_ListenerNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3634,7 +3553,7 @@ export const de_WithdrawByoipCidrCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3667,10 +3586,9 @@ const de_WithdrawByoipCidrCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3684,7 +3602,7 @@ const de_AcceleratorNotDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AcceleratorNotDisabledException(body, context); + const deserialized: any = _json(body); const exception = new AcceleratorNotDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3700,7 +3618,7 @@ const de_AcceleratorNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AcceleratorNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AcceleratorNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3716,7 +3634,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3732,7 +3650,7 @@ const de_AssociatedEndpointGroupFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociatedEndpointGroupFoundException(body, context); + const deserialized: any = _json(body); const exception = new AssociatedEndpointGroupFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3748,7 +3666,7 @@ const de_AssociatedListenerFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociatedListenerFoundException(body, context); + const deserialized: any = _json(body); const exception = new AssociatedListenerFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3764,7 +3682,7 @@ const de_ByoipCidrNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ByoipCidrNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ByoipCidrNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3777,7 +3695,7 @@ const de_ByoipCidrNotFoundExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3793,7 +3711,7 @@ const de_EndpointAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EndpointAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new EndpointAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3809,7 +3727,7 @@ const de_EndpointGroupAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EndpointGroupAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new EndpointGroupAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3825,7 +3743,7 @@ const de_EndpointGroupNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EndpointGroupNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EndpointGroupNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3841,7 +3759,7 @@ const de_EndpointNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EndpointNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EndpointNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3857,7 +3775,7 @@ const de_IncorrectCidrStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncorrectCidrStateException(body, context); + const deserialized: any = _json(body); const exception = new IncorrectCidrStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3873,7 +3791,7 @@ const de_InternalServiceErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3889,7 +3807,7 @@ const de_InvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3905,7 +3823,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3921,7 +3839,7 @@ const de_InvalidPortRangeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPortRangeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPortRangeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3937,7 +3855,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3953,7 +3871,7 @@ const de_ListenerNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ListenerNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ListenerNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3969,7 +3887,7 @@ const de_TransactionInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TransactionInProgressException(body, context); + const deserialized: any = _json(body); const exception = new TransactionInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3977,76 +3895,28 @@ const de_TransactionInProgressExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddCustomRoutingEndpointsRequest - */ -const se_AddCustomRoutingEndpointsRequest = (input: AddCustomRoutingEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointConfigurations != null && { - EndpointConfigurations: se_CustomRoutingEndpointConfigurations(input.EndpointConfigurations, context), - }), - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - }; -}; +// se_AddCustomRoutingEndpointsRequest omitted. -/** - * serializeAws_json1_1AddEndpointsRequest - */ -const se_AddEndpointsRequest = (input: AddEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointConfigurations != null && { - EndpointConfigurations: se_EndpointConfigurations(input.EndpointConfigurations, context), - }), - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - }; -}; +// se_AddEndpointsRequest omitted. -/** - * serializeAws_json1_1AdvertiseByoipCidrRequest - */ -const se_AdvertiseByoipCidrRequest = (input: AdvertiseByoipCidrRequest, context: __SerdeContext): any => { - return { - ...(input.Cidr != null && { Cidr: input.Cidr }), - }; -}; +// se_AdvertiseByoipCidrRequest omitted. -/** - * serializeAws_json1_1AllowCustomRoutingTrafficRequest - */ -const se_AllowCustomRoutingTrafficRequest = (input: AllowCustomRoutingTrafficRequest, context: __SerdeContext): any => { - return { - ...(input.AllowAllTrafficToEndpoint != null && { AllowAllTrafficToEndpoint: input.AllowAllTrafficToEndpoint }), - ...(input.DestinationAddresses != null && { - DestinationAddresses: se_DestinationAddresses(input.DestinationAddresses, context), - }), - ...(input.DestinationPorts != null && { DestinationPorts: se_DestinationPorts(input.DestinationPorts, context) }), - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - }; -}; +// se_AllowCustomRoutingTrafficRequest omitted. -/** - * serializeAws_json1_1CidrAuthorizationContext - */ -const se_CidrAuthorizationContext = (input: CidrAuthorizationContext, context: __SerdeContext): any => { - return { - ...(input.Message != null && { Message: input.Message }), - ...(input.Signature != null && { Signature: input.Signature }), - }; -}; +// se_CidrAuthorizationContext omitted. /** * serializeAws_json1_1CreateAcceleratorRequest */ const se_CreateAcceleratorRequest = (input: CreateAcceleratorRequest, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.IpAddressType != null && { IpAddressType: input.IpAddressType }), - ...(input.IpAddresses != null && { IpAddresses: se_IpAddresses(input.IpAddresses, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + Enabled: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + IpAddressType: [], + IpAddresses: _json, + Name: [], + Tags: _json, + }); }; /** @@ -4056,14 +3926,14 @@ const se_CreateCustomRoutingAcceleratorRequest = ( input: CreateCustomRoutingAcceleratorRequest, context: __SerdeContext ): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.IpAddressType != null && { IpAddressType: input.IpAddressType }), - ...(input.IpAddresses != null && { IpAddresses: se_IpAddresses(input.IpAddresses, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + Enabled: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + IpAddressType: [], + IpAddresses: _json, + Name: [], + Tags: _json, + }); }; /** @@ -4073,14 +3943,12 @@ const se_CreateCustomRoutingEndpointGroupRequest = ( input: CreateCustomRoutingEndpointGroupRequest, context: __SerdeContext ): any => { - return { - ...(input.DestinationConfigurations != null && { - DestinationConfigurations: se_CustomRoutingDestinationConfigurations(input.DestinationConfigurations, context), - }), - ...(input.EndpointGroupRegion != null && { EndpointGroupRegion: input.EndpointGroupRegion }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - }; + return take(input, { + DestinationConfigurations: _json, + EndpointGroupRegion: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + ListenerArn: [], + }); }; /** @@ -4090,1932 +3958,613 @@ const se_CreateCustomRoutingListenerRequest = ( input: CreateCustomRoutingListenerRequest, context: __SerdeContext ): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.PortRanges != null && { PortRanges: se_PortRanges(input.PortRanges, context) }), - }; + return take(input, { + AcceleratorArn: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + PortRanges: _json, + }); }; /** * serializeAws_json1_1CreateEndpointGroupRequest */ const se_CreateEndpointGroupRequest = (input: CreateEndpointGroupRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointConfigurations != null && { - EndpointConfigurations: se_EndpointConfigurations(input.EndpointConfigurations, context), - }), - ...(input.EndpointGroupRegion != null && { EndpointGroupRegion: input.EndpointGroupRegion }), - ...(input.HealthCheckIntervalSeconds != null && { HealthCheckIntervalSeconds: input.HealthCheckIntervalSeconds }), - ...(input.HealthCheckPath != null && { HealthCheckPath: input.HealthCheckPath }), - ...(input.HealthCheckPort != null && { HealthCheckPort: input.HealthCheckPort }), - ...(input.HealthCheckProtocol != null && { HealthCheckProtocol: input.HealthCheckProtocol }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - ...(input.PortOverrides != null && { PortOverrides: se_PortOverrides(input.PortOverrides, context) }), - ...(input.ThresholdCount != null && { ThresholdCount: input.ThresholdCount }), - ...(input.TrafficDialPercentage != null && { - TrafficDialPercentage: __serializeFloat(input.TrafficDialPercentage), - }), - }; + return take(input, { + EndpointConfigurations: _json, + EndpointGroupRegion: [], + HealthCheckIntervalSeconds: [], + HealthCheckPath: [], + HealthCheckPort: [], + HealthCheckProtocol: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + ListenerArn: [], + PortOverrides: _json, + ThresholdCount: [], + TrafficDialPercentage: __serializeFloat, + }); }; /** * serializeAws_json1_1CreateListenerRequest */ const se_CreateListenerRequest = (input: CreateListenerRequest, context: __SerdeContext): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.ClientAffinity != null && { ClientAffinity: input.ClientAffinity }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.PortRanges != null && { PortRanges: se_PortRanges(input.PortRanges, context) }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; + return take(input, { + AcceleratorArn: [], + ClientAffinity: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + PortRanges: _json, + Protocol: [], + }); }; -/** - * serializeAws_json1_1CustomRoutingDestinationConfiguration - */ -const se_CustomRoutingDestinationConfiguration = ( - input: CustomRoutingDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.Protocols != null && { Protocols: se_CustomRoutingProtocols(input.Protocols, context) }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - }; -}; +// se_CustomRoutingDestinationConfiguration omitted. -/** - * serializeAws_json1_1CustomRoutingDestinationConfigurations - */ -const se_CustomRoutingDestinationConfigurations = ( - input: CustomRoutingDestinationConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomRoutingDestinationConfiguration(entry, context); - }); -}; +// se_CustomRoutingDestinationConfigurations omitted. -/** - * serializeAws_json1_1CustomRoutingEndpointConfiguration - */ -const se_CustomRoutingEndpointConfiguration = ( - input: CustomRoutingEndpointConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - }; -}; +// se_CustomRoutingEndpointConfiguration omitted. -/** - * serializeAws_json1_1CustomRoutingEndpointConfigurations - */ -const se_CustomRoutingEndpointConfigurations = ( - input: CustomRoutingEndpointConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomRoutingEndpointConfiguration(entry, context); - }); -}; +// se_CustomRoutingEndpointConfigurations omitted. -/** - * serializeAws_json1_1CustomRoutingProtocols - */ -const se_CustomRoutingProtocols = (input: (CustomRoutingProtocol | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomRoutingProtocols omitted. -/** - * serializeAws_json1_1DeleteAcceleratorRequest - */ -const se_DeleteAcceleratorRequest = (input: DeleteAcceleratorRequest, context: __SerdeContext): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - }; -}; +// se_DeleteAcceleratorRequest omitted. -/** - * serializeAws_json1_1DeleteCustomRoutingAcceleratorRequest - */ -const se_DeleteCustomRoutingAcceleratorRequest = ( - input: DeleteCustomRoutingAcceleratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - }; -}; +// se_DeleteCustomRoutingAcceleratorRequest omitted. -/** - * serializeAws_json1_1DeleteCustomRoutingEndpointGroupRequest - */ -const se_DeleteCustomRoutingEndpointGroupRequest = ( - input: DeleteCustomRoutingEndpointGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - }; -}; +// se_DeleteCustomRoutingEndpointGroupRequest omitted. -/** - * serializeAws_json1_1DeleteCustomRoutingListenerRequest - */ -const se_DeleteCustomRoutingListenerRequest = ( - input: DeleteCustomRoutingListenerRequest, - context: __SerdeContext -): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - }; -}; +// se_DeleteCustomRoutingListenerRequest omitted. -/** - * serializeAws_json1_1DeleteEndpointGroupRequest - */ -const se_DeleteEndpointGroupRequest = (input: DeleteEndpointGroupRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - }; -}; +// se_DeleteEndpointGroupRequest omitted. -/** - * serializeAws_json1_1DeleteListenerRequest - */ -const se_DeleteListenerRequest = (input: DeleteListenerRequest, context: __SerdeContext): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - }; -}; +// se_DeleteListenerRequest omitted. -/** - * serializeAws_json1_1DenyCustomRoutingTrafficRequest - */ -const se_DenyCustomRoutingTrafficRequest = (input: DenyCustomRoutingTrafficRequest, context: __SerdeContext): any => { - return { - ...(input.DenyAllTrafficToEndpoint != null && { DenyAllTrafficToEndpoint: input.DenyAllTrafficToEndpoint }), - ...(input.DestinationAddresses != null && { - DestinationAddresses: se_DestinationAddresses(input.DestinationAddresses, context), - }), - ...(input.DestinationPorts != null && { DestinationPorts: se_DestinationPorts(input.DestinationPorts, context) }), - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - }; -}; +// se_DenyCustomRoutingTrafficRequest omitted. -/** - * serializeAws_json1_1DeprovisionByoipCidrRequest - */ -const se_DeprovisionByoipCidrRequest = (input: DeprovisionByoipCidrRequest, context: __SerdeContext): any => { - return { - ...(input.Cidr != null && { Cidr: input.Cidr }), - }; -}; +// se_DeprovisionByoipCidrRequest omitted. -/** - * serializeAws_json1_1DescribeAcceleratorAttributesRequest - */ -const se_DescribeAcceleratorAttributesRequest = ( - input: DescribeAcceleratorAttributesRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - }; -}; +// se_DescribeAcceleratorAttributesRequest omitted. -/** - * serializeAws_json1_1DescribeAcceleratorRequest - */ -const se_DescribeAcceleratorRequest = (input: DescribeAcceleratorRequest, context: __SerdeContext): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - }; -}; +// se_DescribeAcceleratorRequest omitted. -/** - * serializeAws_json1_1DescribeCustomRoutingAcceleratorAttributesRequest - */ -const se_DescribeCustomRoutingAcceleratorAttributesRequest = ( - input: DescribeCustomRoutingAcceleratorAttributesRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - }; -}; +// se_DescribeCustomRoutingAcceleratorAttributesRequest omitted. -/** - * serializeAws_json1_1DescribeCustomRoutingAcceleratorRequest - */ -const se_DescribeCustomRoutingAcceleratorRequest = ( - input: DescribeCustomRoutingAcceleratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - }; -}; +// se_DescribeCustomRoutingAcceleratorRequest omitted. -/** - * serializeAws_json1_1DescribeCustomRoutingEndpointGroupRequest - */ -const se_DescribeCustomRoutingEndpointGroupRequest = ( - input: DescribeCustomRoutingEndpointGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - }; -}; +// se_DescribeCustomRoutingEndpointGroupRequest omitted. -/** - * serializeAws_json1_1DescribeCustomRoutingListenerRequest - */ -const se_DescribeCustomRoutingListenerRequest = ( - input: DescribeCustomRoutingListenerRequest, - context: __SerdeContext -): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - }; -}; +// se_DescribeCustomRoutingListenerRequest omitted. -/** - * serializeAws_json1_1DescribeEndpointGroupRequest - */ -const se_DescribeEndpointGroupRequest = (input: DescribeEndpointGroupRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - }; -}; +// se_DescribeEndpointGroupRequest omitted. -/** - * serializeAws_json1_1DescribeListenerRequest - */ -const se_DescribeListenerRequest = (input: DescribeListenerRequest, context: __SerdeContext): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - }; -}; +// se_DescribeListenerRequest omitted. -/** - * serializeAws_json1_1DestinationAddresses - */ -const se_DestinationAddresses = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DestinationAddresses omitted. -/** - * serializeAws_json1_1DestinationPorts - */ -const se_DestinationPorts = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DestinationPorts omitted. -/** - * serializeAws_json1_1EndpointConfiguration - */ -const se_EndpointConfiguration = (input: EndpointConfiguration, context: __SerdeContext): any => { - return { - ...(input.ClientIPPreservationEnabled != null && { - ClientIPPreservationEnabled: input.ClientIPPreservationEnabled, - }), - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - ...(input.Weight != null && { Weight: input.Weight }), - }; -}; +// se_EndpointConfiguration omitted. -/** - * serializeAws_json1_1EndpointConfigurations - */ -const se_EndpointConfigurations = (input: EndpointConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EndpointConfiguration(entry, context); - }); -}; +// se_EndpointConfigurations omitted. -/** - * serializeAws_json1_1EndpointIdentifier - */ -const se_EndpointIdentifier = (input: EndpointIdentifier, context: __SerdeContext): any => { - return { - ...(input.ClientIPPreservationEnabled != null && { - ClientIPPreservationEnabled: input.ClientIPPreservationEnabled, - }), - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - }; -}; +// se_EndpointIdentifier omitted. -/** - * serializeAws_json1_1EndpointIdentifiers - */ -const se_EndpointIdentifiers = (input: EndpointIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EndpointIdentifier(entry, context); - }); -}; +// se_EndpointIdentifiers omitted. -/** - * serializeAws_json1_1EndpointIds - */ -const se_EndpointIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EndpointIds omitted. -/** - * serializeAws_json1_1IpAddresses - */ -const se_IpAddresses = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IpAddresses omitted. -/** - * serializeAws_json1_1ListAcceleratorsRequest - */ -const se_ListAcceleratorsRequest = (input: ListAcceleratorsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAcceleratorsRequest omitted. -/** - * serializeAws_json1_1ListByoipCidrsRequest - */ -const se_ListByoipCidrsRequest = (input: ListByoipCidrsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListByoipCidrsRequest omitted. -/** - * serializeAws_json1_1ListCustomRoutingAcceleratorsRequest - */ -const se_ListCustomRoutingAcceleratorsRequest = ( - input: ListCustomRoutingAcceleratorsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCustomRoutingAcceleratorsRequest omitted. -/** - * serializeAws_json1_1ListCustomRoutingEndpointGroupsRequest - */ -const se_ListCustomRoutingEndpointGroupsRequest = ( - input: ListCustomRoutingEndpointGroupsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCustomRoutingEndpointGroupsRequest omitted. -/** - * serializeAws_json1_1ListCustomRoutingListenersRequest - */ -const se_ListCustomRoutingListenersRequest = ( - input: ListCustomRoutingListenersRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCustomRoutingListenersRequest omitted. -/** - * serializeAws_json1_1ListCustomRoutingPortMappingsByDestinationRequest - */ -const se_ListCustomRoutingPortMappingsByDestinationRequest = ( - input: ListCustomRoutingPortMappingsByDestinationRequest, - context: __SerdeContext -): any => { - return { - ...(input.DestinationAddress != null && { DestinationAddress: input.DestinationAddress }), - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCustomRoutingPortMappingsByDestinationRequest omitted. -/** - * serializeAws_json1_1ListCustomRoutingPortMappingsRequest - */ -const se_ListCustomRoutingPortMappingsRequest = ( - input: ListCustomRoutingPortMappingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEndpointGroupsRequest - */ -const se_ListEndpointGroupsRequest = (input: ListEndpointGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListListenersRequest - */ -const se_ListListenersRequest = (input: ListListenersRequest, context: __SerdeContext): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1PortOverride - */ -const se_PortOverride = (input: PortOverride, context: __SerdeContext): any => { - return { - ...(input.EndpointPort != null && { EndpointPort: input.EndpointPort }), - ...(input.ListenerPort != null && { ListenerPort: input.ListenerPort }), - }; -}; - -/** - * serializeAws_json1_1PortOverrides - */ -const se_PortOverrides = (input: PortOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortOverride(entry, context); - }); -}; - -/** - * serializeAws_json1_1PortRange - */ -const se_PortRange = (input: PortRange, context: __SerdeContext): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - }; -}; - -/** - * serializeAws_json1_1PortRanges - */ -const se_PortRanges = (input: PortRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortRange(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProvisionByoipCidrRequest - */ -const se_ProvisionByoipCidrRequest = (input: ProvisionByoipCidrRequest, context: __SerdeContext): any => { - return { - ...(input.Cidr != null && { Cidr: input.Cidr }), - ...(input.CidrAuthorizationContext != null && { - CidrAuthorizationContext: se_CidrAuthorizationContext(input.CidrAuthorizationContext, context), - }), - }; -}; - -/** - * serializeAws_json1_1RemoveCustomRoutingEndpointsRequest - */ -const se_RemoveCustomRoutingEndpointsRequest = ( - input: RemoveCustomRoutingEndpointsRequest, - context: __SerdeContext -): any => { - return { - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - ...(input.EndpointIds != null && { EndpointIds: se_EndpointIds(input.EndpointIds, context) }), - }; -}; - -/** - * serializeAws_json1_1RemoveEndpointsRequest - */ -const se_RemoveEndpointsRequest = (input: RemoveEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - ...(input.EndpointIdentifiers != null && { - EndpointIdentifiers: se_EndpointIdentifiers(input.EndpointIdentifiers, context), - }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAcceleratorAttributesRequest - */ -const se_UpdateAcceleratorAttributesRequest = ( - input: UpdateAcceleratorAttributesRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.FlowLogsEnabled != null && { FlowLogsEnabled: input.FlowLogsEnabled }), - ...(input.FlowLogsS3Bucket != null && { FlowLogsS3Bucket: input.FlowLogsS3Bucket }), - ...(input.FlowLogsS3Prefix != null && { FlowLogsS3Prefix: input.FlowLogsS3Prefix }), - }; -}; - -/** - * serializeAws_json1_1UpdateAcceleratorRequest - */ -const se_UpdateAcceleratorRequest = (input: UpdateAcceleratorRequest, context: __SerdeContext): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.IpAddressType != null && { IpAddressType: input.IpAddressType }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateCustomRoutingAcceleratorAttributesRequest - */ -const se_UpdateCustomRoutingAcceleratorAttributesRequest = ( - input: UpdateCustomRoutingAcceleratorAttributesRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.FlowLogsEnabled != null && { FlowLogsEnabled: input.FlowLogsEnabled }), - ...(input.FlowLogsS3Bucket != null && { FlowLogsS3Bucket: input.FlowLogsS3Bucket }), - ...(input.FlowLogsS3Prefix != null && { FlowLogsS3Prefix: input.FlowLogsS3Prefix }), - }; -}; - -/** - * serializeAws_json1_1UpdateCustomRoutingAcceleratorRequest - */ -const se_UpdateCustomRoutingAcceleratorRequest = ( - input: UpdateCustomRoutingAcceleratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorArn != null && { AcceleratorArn: input.AcceleratorArn }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.IpAddressType != null && { IpAddressType: input.IpAddressType }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateCustomRoutingListenerRequest - */ -const se_UpdateCustomRoutingListenerRequest = ( - input: UpdateCustomRoutingListenerRequest, - context: __SerdeContext -): any => { - return { - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - ...(input.PortRanges != null && { PortRanges: se_PortRanges(input.PortRanges, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateEndpointGroupRequest - */ -const se_UpdateEndpointGroupRequest = (input: UpdateEndpointGroupRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointConfigurations != null && { - EndpointConfigurations: se_EndpointConfigurations(input.EndpointConfigurations, context), - }), - ...(input.EndpointGroupArn != null && { EndpointGroupArn: input.EndpointGroupArn }), - ...(input.HealthCheckIntervalSeconds != null && { HealthCheckIntervalSeconds: input.HealthCheckIntervalSeconds }), - ...(input.HealthCheckPath != null && { HealthCheckPath: input.HealthCheckPath }), - ...(input.HealthCheckPort != null && { HealthCheckPort: input.HealthCheckPort }), - ...(input.HealthCheckProtocol != null && { HealthCheckProtocol: input.HealthCheckProtocol }), - ...(input.PortOverrides != null && { PortOverrides: se_PortOverrides(input.PortOverrides, context) }), - ...(input.ThresholdCount != null && { ThresholdCount: input.ThresholdCount }), - ...(input.TrafficDialPercentage != null && { - TrafficDialPercentage: __serializeFloat(input.TrafficDialPercentage), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateListenerRequest - */ -const se_UpdateListenerRequest = (input: UpdateListenerRequest, context: __SerdeContext): any => { - return { - ...(input.ClientAffinity != null && { ClientAffinity: input.ClientAffinity }), - ...(input.ListenerArn != null && { ListenerArn: input.ListenerArn }), - ...(input.PortRanges != null && { PortRanges: se_PortRanges(input.PortRanges, context) }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; - -/** - * serializeAws_json1_1WithdrawByoipCidrRequest - */ -const se_WithdrawByoipCidrRequest = (input: WithdrawByoipCidrRequest, context: __SerdeContext): any => { - return { - ...(input.Cidr != null && { Cidr: input.Cidr }), - }; -}; - -/** - * deserializeAws_json1_1Accelerator - */ -const de_Accelerator = (output: any, context: __SerdeContext): Accelerator => { - return { - AcceleratorArn: __expectString(output.AcceleratorArn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DnsName: __expectString(output.DnsName), - DualStackDnsName: __expectString(output.DualStackDnsName), - Enabled: __expectBoolean(output.Enabled), - Events: output.Events != null ? de_AcceleratorEvents(output.Events, context) : undefined, - IpAddressType: __expectString(output.IpAddressType), - IpSets: output.IpSets != null ? de_IpSets(output.IpSets, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AcceleratorAttributes - */ -const de_AcceleratorAttributes = (output: any, context: __SerdeContext): AcceleratorAttributes => { - return { - FlowLogsEnabled: __expectBoolean(output.FlowLogsEnabled), - FlowLogsS3Bucket: __expectString(output.FlowLogsS3Bucket), - FlowLogsS3Prefix: __expectString(output.FlowLogsS3Prefix), - } as any; -}; - -/** - * deserializeAws_json1_1AcceleratorEvent - */ -const de_AcceleratorEvent = (output: any, context: __SerdeContext): AcceleratorEvent => { - return { - Message: __expectString(output.Message), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AcceleratorEvents - */ -const de_AcceleratorEvents = (output: any, context: __SerdeContext): AcceleratorEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AcceleratorEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AcceleratorNotDisabledException - */ -const de_AcceleratorNotDisabledException = (output: any, context: __SerdeContext): AcceleratorNotDisabledException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AcceleratorNotFoundException - */ -const de_AcceleratorNotFoundException = (output: any, context: __SerdeContext): AcceleratorNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Accelerators - */ -const de_Accelerators = (output: any, context: __SerdeContext): Accelerator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Accelerator(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AddCustomRoutingEndpointsResponse - */ -const de_AddCustomRoutingEndpointsResponse = ( - output: any, - context: __SerdeContext -): AddCustomRoutingEndpointsResponse => { - return { - EndpointDescriptions: - output.EndpointDescriptions != null - ? de_CustomRoutingEndpointDescriptions(output.EndpointDescriptions, context) - : undefined, - EndpointGroupArn: __expectString(output.EndpointGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1AddEndpointsResponse - */ -const de_AddEndpointsResponse = (output: any, context: __SerdeContext): AddEndpointsResponse => { - return { - EndpointDescriptions: - output.EndpointDescriptions != null ? de_EndpointDescriptions(output.EndpointDescriptions, context) : undefined, - EndpointGroupArn: __expectString(output.EndpointGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1AdvertiseByoipCidrResponse - */ -const de_AdvertiseByoipCidrResponse = (output: any, context: __SerdeContext): AdvertiseByoipCidrResponse => { - return { - ByoipCidr: output.ByoipCidr != null ? de_ByoipCidr(output.ByoipCidr, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociatedEndpointGroupFoundException - */ -const de_AssociatedEndpointGroupFoundException = ( - output: any, - context: __SerdeContext -): AssociatedEndpointGroupFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AssociatedListenerFoundException - */ -const de_AssociatedListenerFoundException = ( - output: any, - context: __SerdeContext -): AssociatedListenerFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ByoipCidr - */ -const de_ByoipCidr = (output: any, context: __SerdeContext): ByoipCidr => { - return { - Cidr: __expectString(output.Cidr), - Events: output.Events != null ? de_ByoipCidrEvents(output.Events, context) : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1ByoipCidrEvent - */ -const de_ByoipCidrEvent = (output: any, context: __SerdeContext): ByoipCidrEvent => { - return { - Message: __expectString(output.Message), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ByoipCidrEvents - */ -const de_ByoipCidrEvents = (output: any, context: __SerdeContext): ByoipCidrEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ByoipCidrEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ByoipCidrNotFoundException - */ -const de_ByoipCidrNotFoundException = (output: any, context: __SerdeContext): ByoipCidrNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ByoipCidrs - */ -const de_ByoipCidrs = (output: any, context: __SerdeContext): ByoipCidr[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ByoipCidr(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAcceleratorResponse - */ -const de_CreateAcceleratorResponse = (output: any, context: __SerdeContext): CreateAcceleratorResponse => { - return { - Accelerator: output.Accelerator != null ? de_Accelerator(output.Accelerator, context) : undefined, - } as any; -}; +// se_ListCustomRoutingPortMappingsRequest omitted. -/** - * deserializeAws_json1_1CreateCustomRoutingAcceleratorResponse - */ -const de_CreateCustomRoutingAcceleratorResponse = ( - output: any, - context: __SerdeContext -): CreateCustomRoutingAcceleratorResponse => { - return { - Accelerator: output.Accelerator != null ? de_CustomRoutingAccelerator(output.Accelerator, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateCustomRoutingEndpointGroupResponse - */ -const de_CreateCustomRoutingEndpointGroupResponse = ( - output: any, - context: __SerdeContext -): CreateCustomRoutingEndpointGroupResponse => { - return { - EndpointGroup: - output.EndpointGroup != null ? de_CustomRoutingEndpointGroup(output.EndpointGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateCustomRoutingListenerResponse - */ -const de_CreateCustomRoutingListenerResponse = ( - output: any, - context: __SerdeContext -): CreateCustomRoutingListenerResponse => { - return { - Listener: output.Listener != null ? de_CustomRoutingListener(output.Listener, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateEndpointGroupResponse - */ -const de_CreateEndpointGroupResponse = (output: any, context: __SerdeContext): CreateEndpointGroupResponse => { - return { - EndpointGroup: output.EndpointGroup != null ? de_EndpointGroup(output.EndpointGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateListenerResponse - */ -const de_CreateListenerResponse = (output: any, context: __SerdeContext): CreateListenerResponse => { - return { - Listener: output.Listener != null ? de_Listener(output.Listener, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingAccelerator - */ -const de_CustomRoutingAccelerator = (output: any, context: __SerdeContext): CustomRoutingAccelerator => { - return { - AcceleratorArn: __expectString(output.AcceleratorArn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DnsName: __expectString(output.DnsName), - Enabled: __expectBoolean(output.Enabled), - IpAddressType: __expectString(output.IpAddressType), - IpSets: output.IpSets != null ? de_IpSets(output.IpSets, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingAcceleratorAttributes - */ -const de_CustomRoutingAcceleratorAttributes = ( - output: any, - context: __SerdeContext -): CustomRoutingAcceleratorAttributes => { - return { - FlowLogsEnabled: __expectBoolean(output.FlowLogsEnabled), - FlowLogsS3Bucket: __expectString(output.FlowLogsS3Bucket), - FlowLogsS3Prefix: __expectString(output.FlowLogsS3Prefix), - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingAccelerators - */ -const de_CustomRoutingAccelerators = (output: any, context: __SerdeContext): CustomRoutingAccelerator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomRoutingAccelerator(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomRoutingDestinationDescription - */ -const de_CustomRoutingDestinationDescription = ( - output: any, - context: __SerdeContext -): CustomRoutingDestinationDescription => { - return { - FromPort: __expectInt32(output.FromPort), - Protocols: output.Protocols != null ? de_Protocols(output.Protocols, context) : undefined, - ToPort: __expectInt32(output.ToPort), - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingDestinationDescriptions - */ -const de_CustomRoutingDestinationDescriptions = ( - output: any, - context: __SerdeContext -): CustomRoutingDestinationDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomRoutingDestinationDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomRoutingEndpointDescription - */ -const de_CustomRoutingEndpointDescription = ( - output: any, - context: __SerdeContext -): CustomRoutingEndpointDescription => { - return { - EndpointId: __expectString(output.EndpointId), - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingEndpointDescriptions - */ -const de_CustomRoutingEndpointDescriptions = ( - output: any, - context: __SerdeContext -): CustomRoutingEndpointDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomRoutingEndpointDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomRoutingEndpointGroup - */ -const de_CustomRoutingEndpointGroup = (output: any, context: __SerdeContext): CustomRoutingEndpointGroup => { - return { - DestinationDescriptions: - output.DestinationDescriptions != null - ? de_CustomRoutingDestinationDescriptions(output.DestinationDescriptions, context) - : undefined, - EndpointDescriptions: - output.EndpointDescriptions != null - ? de_CustomRoutingEndpointDescriptions(output.EndpointDescriptions, context) - : undefined, - EndpointGroupArn: __expectString(output.EndpointGroupArn), - EndpointGroupRegion: __expectString(output.EndpointGroupRegion), - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingEndpointGroups - */ -const de_CustomRoutingEndpointGroups = (output: any, context: __SerdeContext): CustomRoutingEndpointGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomRoutingEndpointGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomRoutingListener - */ -const de_CustomRoutingListener = (output: any, context: __SerdeContext): CustomRoutingListener => { - return { - ListenerArn: __expectString(output.ListenerArn), - PortRanges: output.PortRanges != null ? de_PortRanges(output.PortRanges, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomRoutingListeners - */ -const de_CustomRoutingListeners = (output: any, context: __SerdeContext): CustomRoutingListener[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomRoutingListener(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomRoutingProtocols - */ -const de_CustomRoutingProtocols = (output: any, context: __SerdeContext): (CustomRoutingProtocol | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeprovisionByoipCidrResponse - */ -const de_DeprovisionByoipCidrResponse = (output: any, context: __SerdeContext): DeprovisionByoipCidrResponse => { - return { - ByoipCidr: output.ByoipCidr != null ? de_ByoipCidr(output.ByoipCidr, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAcceleratorAttributesResponse - */ -const de_DescribeAcceleratorAttributesResponse = ( - output: any, - context: __SerdeContext -): DescribeAcceleratorAttributesResponse => { - return { - AcceleratorAttributes: - output.AcceleratorAttributes != null - ? de_AcceleratorAttributes(output.AcceleratorAttributes, context) - : undefined, - } as any; -}; +// se_ListEndpointGroupsRequest omitted. -/** - * deserializeAws_json1_1DescribeAcceleratorResponse - */ -const de_DescribeAcceleratorResponse = (output: any, context: __SerdeContext): DescribeAcceleratorResponse => { - return { - Accelerator: output.Accelerator != null ? de_Accelerator(output.Accelerator, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCustomRoutingAcceleratorAttributesResponse - */ -const de_DescribeCustomRoutingAcceleratorAttributesResponse = ( - output: any, - context: __SerdeContext -): DescribeCustomRoutingAcceleratorAttributesResponse => { - return { - AcceleratorAttributes: - output.AcceleratorAttributes != null - ? de_CustomRoutingAcceleratorAttributes(output.AcceleratorAttributes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCustomRoutingAcceleratorResponse - */ -const de_DescribeCustomRoutingAcceleratorResponse = ( - output: any, - context: __SerdeContext -): DescribeCustomRoutingAcceleratorResponse => { - return { - Accelerator: output.Accelerator != null ? de_CustomRoutingAccelerator(output.Accelerator, context) : undefined, - } as any; -}; +// se_ListListenersRequest omitted. -/** - * deserializeAws_json1_1DescribeCustomRoutingEndpointGroupResponse - */ -const de_DescribeCustomRoutingEndpointGroupResponse = ( - output: any, - context: __SerdeContext -): DescribeCustomRoutingEndpointGroupResponse => { - return { - EndpointGroup: - output.EndpointGroup != null ? de_CustomRoutingEndpointGroup(output.EndpointGroup, context) : undefined, - } as any; -}; +// se_ListTagsForResourceRequest omitted. -/** - * deserializeAws_json1_1DescribeCustomRoutingListenerResponse - */ -const de_DescribeCustomRoutingListenerResponse = ( - output: any, - context: __SerdeContext -): DescribeCustomRoutingListenerResponse => { - return { - Listener: output.Listener != null ? de_CustomRoutingListener(output.Listener, context) : undefined, - } as any; -}; +// se_PortOverride omitted. -/** - * deserializeAws_json1_1DescribeEndpointGroupResponse - */ -const de_DescribeEndpointGroupResponse = (output: any, context: __SerdeContext): DescribeEndpointGroupResponse => { - return { - EndpointGroup: output.EndpointGroup != null ? de_EndpointGroup(output.EndpointGroup, context) : undefined, - } as any; -}; +// se_PortOverrides omitted. -/** - * deserializeAws_json1_1DescribeListenerResponse - */ -const de_DescribeListenerResponse = (output: any, context: __SerdeContext): DescribeListenerResponse => { - return { - Listener: output.Listener != null ? de_Listener(output.Listener, context) : undefined, - } as any; -}; +// se_PortRange omitted. -/** - * deserializeAws_json1_1DestinationPortMapping - */ -const de_DestinationPortMapping = (output: any, context: __SerdeContext): DestinationPortMapping => { - return { - AcceleratorArn: __expectString(output.AcceleratorArn), - AcceleratorSocketAddresses: - output.AcceleratorSocketAddresses != null - ? de_SocketAddresses(output.AcceleratorSocketAddresses, context) - : undefined, - DestinationSocketAddress: - output.DestinationSocketAddress != null ? de_SocketAddress(output.DestinationSocketAddress, context) : undefined, - DestinationTrafficState: __expectString(output.DestinationTrafficState), - EndpointGroupArn: __expectString(output.EndpointGroupArn), - EndpointGroupRegion: __expectString(output.EndpointGroupRegion), - EndpointId: __expectString(output.EndpointId), - IpAddressType: __expectString(output.IpAddressType), - } as any; -}; +// se_PortRanges omitted. -/** - * deserializeAws_json1_1DestinationPortMappings - */ -const de_DestinationPortMappings = (output: any, context: __SerdeContext): DestinationPortMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DestinationPortMapping(entry, context); - }); - return retVal; -}; +// se_ProvisionByoipCidrRequest omitted. -/** - * deserializeAws_json1_1EndpointAlreadyExistsException - */ -const de_EndpointAlreadyExistsException = (output: any, context: __SerdeContext): EndpointAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_RemoveCustomRoutingEndpointsRequest omitted. -/** - * deserializeAws_json1_1EndpointDescription - */ -const de_EndpointDescription = (output: any, context: __SerdeContext): EndpointDescription => { - return { - ClientIPPreservationEnabled: __expectBoolean(output.ClientIPPreservationEnabled), - EndpointId: __expectString(output.EndpointId), - HealthReason: __expectString(output.HealthReason), - HealthState: __expectString(output.HealthState), - Weight: __expectInt32(output.Weight), - } as any; -}; +// se_RemoveEndpointsRequest omitted. -/** - * deserializeAws_json1_1EndpointDescriptions - */ -const de_EndpointDescriptions = (output: any, context: __SerdeContext): EndpointDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointDescription(entry, context); - }); - return retVal; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1EndpointGroup - */ -const de_EndpointGroup = (output: any, context: __SerdeContext): EndpointGroup => { - return { - EndpointDescriptions: - output.EndpointDescriptions != null ? de_EndpointDescriptions(output.EndpointDescriptions, context) : undefined, - EndpointGroupArn: __expectString(output.EndpointGroupArn), - EndpointGroupRegion: __expectString(output.EndpointGroupRegion), - HealthCheckIntervalSeconds: __expectInt32(output.HealthCheckIntervalSeconds), - HealthCheckPath: __expectString(output.HealthCheckPath), - HealthCheckPort: __expectInt32(output.HealthCheckPort), - HealthCheckProtocol: __expectString(output.HealthCheckProtocol), - PortOverrides: output.PortOverrides != null ? de_PortOverrides(output.PortOverrides, context) : undefined, - ThresholdCount: __expectInt32(output.ThresholdCount), - TrafficDialPercentage: __limitedParseFloat32(output.TrafficDialPercentage), - } as any; -}; +// se_TagKeys omitted. -/** - * deserializeAws_json1_1EndpointGroupAlreadyExistsException - */ -const de_EndpointGroupAlreadyExistsException = ( - output: any, - context: __SerdeContext -): EndpointGroupAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1EndpointGroupNotFoundException - */ -const de_EndpointGroupNotFoundException = (output: any, context: __SerdeContext): EndpointGroupNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_Tags omitted. -/** - * deserializeAws_json1_1EndpointGroups - */ -const de_EndpointGroups = (output: any, context: __SerdeContext): EndpointGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointGroup(entry, context); - }); - return retVal; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1EndpointNotFoundException - */ -const de_EndpointNotFoundException = (output: any, context: __SerdeContext): EndpointNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateAcceleratorAttributesRequest omitted. -/** - * deserializeAws_json1_1IncorrectCidrStateException - */ -const de_IncorrectCidrStateException = (output: any, context: __SerdeContext): IncorrectCidrStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateAcceleratorRequest omitted. -/** - * deserializeAws_json1_1InternalServiceErrorException - */ -const de_InternalServiceErrorException = (output: any, context: __SerdeContext): InternalServiceErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateCustomRoutingAcceleratorAttributesRequest omitted. + +// se_UpdateCustomRoutingAcceleratorRequest omitted. + +// se_UpdateCustomRoutingListenerRequest omitted. /** - * deserializeAws_json1_1InvalidArgumentException + * serializeAws_json1_1UpdateEndpointGroupRequest */ -const de_InvalidArgumentException = (output: any, context: __SerdeContext): InvalidArgumentException => { - return { - Message: __expectString(output.Message), - } as any; +const se_UpdateEndpointGroupRequest = (input: UpdateEndpointGroupRequest, context: __SerdeContext): any => { + return take(input, { + EndpointConfigurations: _json, + EndpointGroupArn: [], + HealthCheckIntervalSeconds: [], + HealthCheckPath: [], + HealthCheckPort: [], + HealthCheckProtocol: [], + PortOverrides: _json, + ThresholdCount: [], + TrafficDialPercentage: __serializeFloat, + }); }; +// se_UpdateListenerRequest omitted. + +// se_WithdrawByoipCidrRequest omitted. + /** - * deserializeAws_json1_1InvalidNextTokenException + * deserializeAws_json1_1Accelerator */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; +const de_Accelerator = (output: any, context: __SerdeContext): Accelerator => { + return take(output, { + AcceleratorArn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DnsName: __expectString, + DualStackDnsName: __expectString, + Enabled: __expectBoolean, + Events: (_: any) => de_AcceleratorEvents(_, context), + IpAddressType: __expectString, + IpSets: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; +// de_AcceleratorAttributes omitted. + /** - * deserializeAws_json1_1InvalidPortRangeException + * deserializeAws_json1_1AcceleratorEvent */ -const de_InvalidPortRangeException = (output: any, context: __SerdeContext): InvalidPortRangeException => { - return { - Message: __expectString(output.Message), - } as any; +const de_AcceleratorEvent = (output: any, context: __SerdeContext): AcceleratorEvent => { + return take(output, { + Message: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1IpAddresses + * deserializeAws_json1_1AcceleratorEvents */ -const de_IpAddresses = (output: any, context: __SerdeContext): string[] => { +const de_AcceleratorEvents = (output: any, context: __SerdeContext): AcceleratorEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AcceleratorEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1IpSet - */ -const de_IpSet = (output: any, context: __SerdeContext): IpSet => { - return { - IpAddressFamily: __expectString(output.IpAddressFamily), - IpAddresses: output.IpAddresses != null ? de_IpAddresses(output.IpAddresses, context) : undefined, - IpFamily: __expectString(output.IpFamily), - } as any; -}; +// de_AcceleratorNotDisabledException omitted. + +// de_AcceleratorNotFoundException omitted. /** - * deserializeAws_json1_1IpSets + * deserializeAws_json1_1Accelerators */ -const de_IpSets = (output: any, context: __SerdeContext): IpSet[] => { +const de_Accelerators = (output: any, context: __SerdeContext): Accelerator[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IpSet(entry, context); + return de_Accelerator(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ListAcceleratorsResponse - */ -const de_ListAcceleratorsResponse = (output: any, context: __SerdeContext): ListAcceleratorsResponse => { - return { - Accelerators: output.Accelerators != null ? de_Accelerators(output.Accelerators, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1ListByoipCidrsResponse - */ -const de_ListByoipCidrsResponse = (output: any, context: __SerdeContext): ListByoipCidrsResponse => { - return { - ByoipCidrs: output.ByoipCidrs != null ? de_ByoipCidrs(output.ByoipCidrs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AddCustomRoutingEndpointsResponse omitted. -/** - * deserializeAws_json1_1ListCustomRoutingAcceleratorsResponse - */ -const de_ListCustomRoutingAcceleratorsResponse = ( - output: any, - context: __SerdeContext -): ListCustomRoutingAcceleratorsResponse => { - return { - Accelerators: output.Accelerators != null ? de_CustomRoutingAccelerators(output.Accelerators, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AddEndpointsResponse omitted. /** - * deserializeAws_json1_1ListCustomRoutingEndpointGroupsResponse + * deserializeAws_json1_1AdvertiseByoipCidrResponse */ -const de_ListCustomRoutingEndpointGroupsResponse = ( - output: any, - context: __SerdeContext -): ListCustomRoutingEndpointGroupsResponse => { - return { - EndpointGroups: - output.EndpointGroups != null ? de_CustomRoutingEndpointGroups(output.EndpointGroups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_AdvertiseByoipCidrResponse = (output: any, context: __SerdeContext): AdvertiseByoipCidrResponse => { + return take(output, { + ByoipCidr: (_: any) => de_ByoipCidr(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListCustomRoutingListenersResponse - */ -const de_ListCustomRoutingListenersResponse = ( - output: any, - context: __SerdeContext -): ListCustomRoutingListenersResponse => { - return { - Listeners: output.Listeners != null ? de_CustomRoutingListeners(output.Listeners, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AssociatedEndpointGroupFoundException omitted. -/** - * deserializeAws_json1_1ListCustomRoutingPortMappingsByDestinationResponse - */ -const de_ListCustomRoutingPortMappingsByDestinationResponse = ( - output: any, - context: __SerdeContext -): ListCustomRoutingPortMappingsByDestinationResponse => { - return { - DestinationPortMappings: - output.DestinationPortMappings != null - ? de_DestinationPortMappings(output.DestinationPortMappings, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_AssociatedListenerFoundException omitted. /** - * deserializeAws_json1_1ListCustomRoutingPortMappingsResponse + * deserializeAws_json1_1ByoipCidr */ -const de_ListCustomRoutingPortMappingsResponse = ( - output: any, - context: __SerdeContext -): ListCustomRoutingPortMappingsResponse => { - return { - NextToken: __expectString(output.NextToken), - PortMappings: output.PortMappings != null ? de_PortMappings(output.PortMappings, context) : undefined, - } as any; +const de_ByoipCidr = (output: any, context: __SerdeContext): ByoipCidr => { + return take(output, { + Cidr: __expectString, + Events: (_: any) => de_ByoipCidrEvents(_, context), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListEndpointGroupsResponse + * deserializeAws_json1_1ByoipCidrEvent */ -const de_ListEndpointGroupsResponse = (output: any, context: __SerdeContext): ListEndpointGroupsResponse => { - return { - EndpointGroups: output.EndpointGroups != null ? de_EndpointGroups(output.EndpointGroups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_ByoipCidrEvent = (output: any, context: __SerdeContext): ByoipCidrEvent => { + return take(output, { + Message: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1Listener + * deserializeAws_json1_1ByoipCidrEvents */ -const de_Listener = (output: any, context: __SerdeContext): Listener => { - return { - ClientAffinity: __expectString(output.ClientAffinity), - ListenerArn: __expectString(output.ListenerArn), - PortRanges: output.PortRanges != null ? de_PortRanges(output.PortRanges, context) : undefined, - Protocol: __expectString(output.Protocol), - } as any; +const de_ByoipCidrEvents = (output: any, context: __SerdeContext): ByoipCidrEvent[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ByoipCidrEvent(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1ListenerNotFoundException - */ -const de_ListenerNotFoundException = (output: any, context: __SerdeContext): ListenerNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ByoipCidrNotFoundException omitted. /** - * deserializeAws_json1_1Listeners + * deserializeAws_json1_1ByoipCidrs */ -const de_Listeners = (output: any, context: __SerdeContext): Listener[] => { +const de_ByoipCidrs = (output: any, context: __SerdeContext): ByoipCidr[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Listener(entry, context); + return de_ByoipCidr(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListListenersResponse - */ -const de_ListListenersResponse = (output: any, context: __SerdeContext): ListListenersResponse => { - return { - Listeners: output.Listeners != null ? de_Listeners(output.Listeners, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ConflictException omitted. /** - * deserializeAws_json1_1ListTagsForResourceResponse + * deserializeAws_json1_1CreateAcceleratorResponse */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; +const de_CreateAcceleratorResponse = (output: any, context: __SerdeContext): CreateAcceleratorResponse => { + return take(output, { + Accelerator: (_: any) => de_Accelerator(_, context), + }) as any; }; /** - * deserializeAws_json1_1PortMapping + * deserializeAws_json1_1CreateCustomRoutingAcceleratorResponse */ -const de_PortMapping = (output: any, context: __SerdeContext): PortMapping => { - return { - AcceleratorPort: __expectInt32(output.AcceleratorPort), - DestinationSocketAddress: - output.DestinationSocketAddress != null ? de_SocketAddress(output.DestinationSocketAddress, context) : undefined, - DestinationTrafficState: __expectString(output.DestinationTrafficState), - EndpointGroupArn: __expectString(output.EndpointGroupArn), - EndpointId: __expectString(output.EndpointId), - Protocols: output.Protocols != null ? de_CustomRoutingProtocols(output.Protocols, context) : undefined, - } as any; +const de_CreateCustomRoutingAcceleratorResponse = ( + output: any, + context: __SerdeContext +): CreateCustomRoutingAcceleratorResponse => { + return take(output, { + Accelerator: (_: any) => de_CustomRoutingAccelerator(_, context), + }) as any; }; +// de_CreateCustomRoutingEndpointGroupResponse omitted. + +// de_CreateCustomRoutingListenerResponse omitted. + /** - * deserializeAws_json1_1PortMappings + * deserializeAws_json1_1CreateEndpointGroupResponse */ -const de_PortMappings = (output: any, context: __SerdeContext): PortMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortMapping(entry, context); - }); - return retVal; +const de_CreateEndpointGroupResponse = (output: any, context: __SerdeContext): CreateEndpointGroupResponse => { + return take(output, { + EndpointGroup: (_: any) => de_EndpointGroup(_, context), + }) as any; }; +// de_CreateListenerResponse omitted. + /** - * deserializeAws_json1_1PortOverride + * deserializeAws_json1_1CustomRoutingAccelerator */ -const de_PortOverride = (output: any, context: __SerdeContext): PortOverride => { - return { - EndpointPort: __expectInt32(output.EndpointPort), - ListenerPort: __expectInt32(output.ListenerPort), - } as any; +const de_CustomRoutingAccelerator = (output: any, context: __SerdeContext): CustomRoutingAccelerator => { + return take(output, { + AcceleratorArn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DnsName: __expectString, + Enabled: __expectBoolean, + IpAddressType: __expectString, + IpSets: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; +// de_CustomRoutingAcceleratorAttributes omitted. + /** - * deserializeAws_json1_1PortOverrides + * deserializeAws_json1_1CustomRoutingAccelerators */ -const de_PortOverrides = (output: any, context: __SerdeContext): PortOverride[] => { +const de_CustomRoutingAccelerators = (output: any, context: __SerdeContext): CustomRoutingAccelerator[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortOverride(entry, context); + return de_CustomRoutingAccelerator(entry, context); }); return retVal; }; +// de_CustomRoutingDestinationDescription omitted. + +// de_CustomRoutingDestinationDescriptions omitted. + +// de_CustomRoutingEndpointDescription omitted. + +// de_CustomRoutingEndpointDescriptions omitted. + +// de_CustomRoutingEndpointGroup omitted. + +// de_CustomRoutingEndpointGroups omitted. + +// de_CustomRoutingListener omitted. + +// de_CustomRoutingListeners omitted. + +// de_CustomRoutingProtocols omitted. + /** - * deserializeAws_json1_1PortRange + * deserializeAws_json1_1DeprovisionByoipCidrResponse */ -const de_PortRange = (output: any, context: __SerdeContext): PortRange => { - return { - FromPort: __expectInt32(output.FromPort), - ToPort: __expectInt32(output.ToPort), - } as any; +const de_DeprovisionByoipCidrResponse = (output: any, context: __SerdeContext): DeprovisionByoipCidrResponse => { + return take(output, { + ByoipCidr: (_: any) => de_ByoipCidr(_, context), + }) as any; }; +// de_DescribeAcceleratorAttributesResponse omitted. + /** - * deserializeAws_json1_1PortRanges + * deserializeAws_json1_1DescribeAcceleratorResponse */ -const de_PortRanges = (output: any, context: __SerdeContext): PortRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortRange(entry, context); - }); - return retVal; +const de_DescribeAcceleratorResponse = (output: any, context: __SerdeContext): DescribeAcceleratorResponse => { + return take(output, { + Accelerator: (_: any) => de_Accelerator(_, context), + }) as any; }; +// de_DescribeCustomRoutingAcceleratorAttributesResponse omitted. + /** - * deserializeAws_json1_1Protocols + * deserializeAws_json1_1DescribeCustomRoutingAcceleratorResponse */ -const de_Protocols = (output: any, context: __SerdeContext): (Protocol | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeCustomRoutingAcceleratorResponse = ( + output: any, + context: __SerdeContext +): DescribeCustomRoutingAcceleratorResponse => { + return take(output, { + Accelerator: (_: any) => de_CustomRoutingAccelerator(_, context), + }) as any; }; +// de_DescribeCustomRoutingEndpointGroupResponse omitted. + +// de_DescribeCustomRoutingListenerResponse omitted. + /** - * deserializeAws_json1_1ProvisionByoipCidrResponse + * deserializeAws_json1_1DescribeEndpointGroupResponse */ -const de_ProvisionByoipCidrResponse = (output: any, context: __SerdeContext): ProvisionByoipCidrResponse => { - return { - ByoipCidr: output.ByoipCidr != null ? de_ByoipCidr(output.ByoipCidr, context) : undefined, - } as any; +const de_DescribeEndpointGroupResponse = (output: any, context: __SerdeContext): DescribeEndpointGroupResponse => { + return take(output, { + EndpointGroup: (_: any) => de_EndpointGroup(_, context), + }) as any; }; +// de_DescribeListenerResponse omitted. + +// de_DestinationPortMapping omitted. + +// de_DestinationPortMappings omitted. + +// de_EndpointAlreadyExistsException omitted. + +// de_EndpointDescription omitted. + +// de_EndpointDescriptions omitted. + /** - * deserializeAws_json1_1SocketAddress + * deserializeAws_json1_1EndpointGroup */ -const de_SocketAddress = (output: any, context: __SerdeContext): SocketAddress => { - return { - IpAddress: __expectString(output.IpAddress), - Port: __expectInt32(output.Port), - } as any; +const de_EndpointGroup = (output: any, context: __SerdeContext): EndpointGroup => { + return take(output, { + EndpointDescriptions: _json, + EndpointGroupArn: __expectString, + EndpointGroupRegion: __expectString, + HealthCheckIntervalSeconds: __expectInt32, + HealthCheckPath: __expectString, + HealthCheckPort: __expectInt32, + HealthCheckProtocol: __expectString, + PortOverrides: _json, + ThresholdCount: __expectInt32, + TrafficDialPercentage: __limitedParseFloat32, + }) as any; }; +// de_EndpointGroupAlreadyExistsException omitted. + +// de_EndpointGroupNotFoundException omitted. + /** - * deserializeAws_json1_1SocketAddresses + * deserializeAws_json1_1EndpointGroups */ -const de_SocketAddresses = (output: any, context: __SerdeContext): SocketAddress[] => { +const de_EndpointGroups = (output: any, context: __SerdeContext): EndpointGroup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SocketAddress(entry, context); + return de_EndpointGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_EndpointNotFoundException omitted. + +// de_IncorrectCidrStateException omitted. + +// de_InternalServiceErrorException omitted. + +// de_InvalidArgumentException omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidPortRangeException omitted. + +// de_IpAddresses omitted. + +// de_IpSet omitted. + +// de_IpSets omitted. + +// de_LimitExceededException omitted. /** - * deserializeAws_json1_1TagResourceResponse + * deserializeAws_json1_1ListAcceleratorsResponse */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; +const de_ListAcceleratorsResponse = (output: any, context: __SerdeContext): ListAcceleratorsResponse => { + return take(output, { + Accelerators: (_: any) => de_Accelerators(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Tags + * deserializeAws_json1_1ListByoipCidrsResponse */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_ListByoipCidrsResponse = (output: any, context: __SerdeContext): ListByoipCidrsResponse => { + return take(output, { + ByoipCidrs: (_: any) => de_ByoipCidrs(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TransactionInProgressException + * deserializeAws_json1_1ListCustomRoutingAcceleratorsResponse */ -const de_TransactionInProgressException = (output: any, context: __SerdeContext): TransactionInProgressException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListCustomRoutingAcceleratorsResponse = ( + output: any, + context: __SerdeContext +): ListCustomRoutingAcceleratorsResponse => { + return take(output, { + Accelerators: (_: any) => de_CustomRoutingAccelerators(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListCustomRoutingEndpointGroupsResponse omitted. + +// de_ListCustomRoutingListenersResponse omitted. + +// de_ListCustomRoutingPortMappingsByDestinationResponse omitted. + +// de_ListCustomRoutingPortMappingsResponse omitted. + /** - * deserializeAws_json1_1UntagResourceResponse + * deserializeAws_json1_1ListEndpointGroupsResponse */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; +const de_ListEndpointGroupsResponse = (output: any, context: __SerdeContext): ListEndpointGroupsResponse => { + return take(output, { + EndpointGroups: (_: any) => de_EndpointGroups(_, context), + NextToken: __expectString, + }) as any; }; +// de_Listener omitted. + +// de_ListenerNotFoundException omitted. + +// de_Listeners omitted. + +// de_ListListenersResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_PortMapping omitted. + +// de_PortMappings omitted. + +// de_PortOverride omitted. + +// de_PortOverrides omitted. + +// de_PortRange omitted. + +// de_PortRanges omitted. + +// de_Protocols omitted. + /** - * deserializeAws_json1_1UpdateAcceleratorAttributesResponse + * deserializeAws_json1_1ProvisionByoipCidrResponse */ -const de_UpdateAcceleratorAttributesResponse = ( - output: any, - context: __SerdeContext -): UpdateAcceleratorAttributesResponse => { - return { - AcceleratorAttributes: - output.AcceleratorAttributes != null - ? de_AcceleratorAttributes(output.AcceleratorAttributes, context) - : undefined, - } as any; +const de_ProvisionByoipCidrResponse = (output: any, context: __SerdeContext): ProvisionByoipCidrResponse => { + return take(output, { + ByoipCidr: (_: any) => de_ByoipCidr(_, context), + }) as any; }; +// de_SocketAddress omitted. + +// de_SocketAddresses omitted. + +// de_Tag omitted. + +// de_TagResourceResponse omitted. + +// de_Tags omitted. + +// de_TransactionInProgressException omitted. + +// de_UntagResourceResponse omitted. + +// de_UpdateAcceleratorAttributesResponse omitted. + /** * deserializeAws_json1_1UpdateAcceleratorResponse */ const de_UpdateAcceleratorResponse = (output: any, context: __SerdeContext): UpdateAcceleratorResponse => { - return { - Accelerator: output.Accelerator != null ? de_Accelerator(output.Accelerator, context) : undefined, - } as any; + return take(output, { + Accelerator: (_: any) => de_Accelerator(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateCustomRoutingAcceleratorAttributesResponse - */ -const de_UpdateCustomRoutingAcceleratorAttributesResponse = ( - output: any, - context: __SerdeContext -): UpdateCustomRoutingAcceleratorAttributesResponse => { - return { - AcceleratorAttributes: - output.AcceleratorAttributes != null - ? de_CustomRoutingAcceleratorAttributes(output.AcceleratorAttributes, context) - : undefined, - } as any; -}; +// de_UpdateCustomRoutingAcceleratorAttributesResponse omitted. /** * deserializeAws_json1_1UpdateCustomRoutingAcceleratorResponse @@ -6024,48 +4573,31 @@ const de_UpdateCustomRoutingAcceleratorResponse = ( output: any, context: __SerdeContext ): UpdateCustomRoutingAcceleratorResponse => { - return { - Accelerator: output.Accelerator != null ? de_CustomRoutingAccelerator(output.Accelerator, context) : undefined, - } as any; + return take(output, { + Accelerator: (_: any) => de_CustomRoutingAccelerator(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateCustomRoutingListenerResponse - */ -const de_UpdateCustomRoutingListenerResponse = ( - output: any, - context: __SerdeContext -): UpdateCustomRoutingListenerResponse => { - return { - Listener: output.Listener != null ? de_CustomRoutingListener(output.Listener, context) : undefined, - } as any; -}; +// de_UpdateCustomRoutingListenerResponse omitted. /** * deserializeAws_json1_1UpdateEndpointGroupResponse */ const de_UpdateEndpointGroupResponse = (output: any, context: __SerdeContext): UpdateEndpointGroupResponse => { - return { - EndpointGroup: output.EndpointGroup != null ? de_EndpointGroup(output.EndpointGroup, context) : undefined, - } as any; + return take(output, { + EndpointGroup: (_: any) => de_EndpointGroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateListenerResponse - */ -const de_UpdateListenerResponse = (output: any, context: __SerdeContext): UpdateListenerResponse => { - return { - Listener: output.Listener != null ? de_Listener(output.Listener, context) : undefined, - } as any; -}; +// de_UpdateListenerResponse omitted. /** * deserializeAws_json1_1WithdrawByoipCidrResponse */ const de_WithdrawByoipCidrResponse = (output: any, context: __SerdeContext): WithdrawByoipCidrResponse => { - return { - ByoipCidr: output.ByoipCidr != null ? de_ByoipCidr(output.ByoipCidr, context) : undefined, - } as any; + return take(output, { + ByoipCidr: (_: any) => de_ByoipCidr(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -6088,6 +4620,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-glue/src/protocols/Aws_json1_1.ts b/clients/client-glue/src/protocols/Aws_json1_1.ts index b3d33abc1e42..414f03189ba8 100644 --- a/clients/client-glue/src/protocols/Aws_json1_1.ts +++ b/clients/client-glue/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -452,21 +454,15 @@ import { AuditContext, BasicCatalogTarget, BatchCreatePartitionRequest, - BatchCreatePartitionResponse, BatchDeleteConnectionRequest, - BatchDeleteConnectionResponse, BatchDeletePartitionRequest, - BatchDeletePartitionResponse, BatchDeleteTableRequest, - BatchDeleteTableResponse, BatchDeleteTableVersionRequest, - BatchDeleteTableVersionResponse, BatchGetBlueprintsRequest, BatchGetBlueprintsResponse, BatchGetCrawlersRequest, BatchGetCrawlersResponse, BatchGetCustomEntityTypesRequest, - BatchGetCustomEntityTypesResponse, BatchGetDataQualityResultRequest, BatchGetDataQualityResultResponse, BatchGetDevEndpointsRequest, @@ -475,27 +471,16 @@ import { BatchGetPartitionRequest, BatchGetPartitionResponse, BatchGetTriggersRequest, - BatchGetTriggersResponse, BatchGetWorkflowsRequest, BatchGetWorkflowsResponse, - BatchStopJobRunError, BatchStopJobRunRequest, - BatchStopJobRunResponse, - BatchStopJobRunSuccessfulSubmission, - BatchUpdatePartitionFailureEntry, BatchUpdatePartitionRequest, BatchUpdatePartitionRequestEntry, - BatchUpdatePartitionResponse, Blueprint, - BlueprintDetails, CancelDataQualityRuleRecommendationRunRequest, - CancelDataQualityRuleRecommendationRunResponse, CancelDataQualityRulesetEvaluationRunRequest, - CancelDataQualityRulesetEvaluationRunResponse, CancelMLTaskRunRequest, - CancelMLTaskRunResponse, CancelStatementRequest, - CancelStatementResponse, CatalogDeltaSource, CatalogHudiSource, CatalogKafkaSource, @@ -504,51 +489,36 @@ import { CatalogSource, CatalogTarget, CheckSchemaVersionValidityInput, - CheckSchemaVersionValidityResponse, Column, ConcurrentModificationException, Condition, ConnectionInput, - ConnectionPropertyKey, ConnectionsList, Crawl, Crawler, CrawlerNodeDetails, CrawlerTargets, CreateBlueprintRequest, - CreateBlueprintResponse, CreateClassifierRequest, - CreateClassifierResponse, CreateConnectionRequest, - CreateConnectionResponse, CreateCrawlerRequest, - CreateCrawlerResponse, CreateCsvClassifierRequest, CreateCustomEntityTypeRequest, - CreateCustomEntityTypeResponse, CreateDatabaseRequest, - CreateDatabaseResponse, CreateDataQualityRulesetRequest, - CreateDataQualityRulesetResponse, CreateDevEndpointRequest, CreateDevEndpointResponse, CreateGrokClassifierRequest, - CreateJobResponse, CreateJsonClassifierRequest, CreateMLTransformRequest, - CreateMLTransformResponse, CreatePartitionIndexRequest, - CreatePartitionIndexResponse, CreatePartitionRequest, - CreatePartitionResponse, CreateXMLClassifierRequest, CustomCode, - CustomEntityType, DatabaseIdentifier, DatabaseInput, DataLakePrincipal, DataQualityResult, - DataQualityRuleResult, DataQualityTargetTable, DataSource, Datatype, @@ -566,9 +536,7 @@ import { DynamicTransform, DynamoDBCatalogSource, DynamoDBTarget, - Edge, EntityNotFoundException, - ErrorDetail, EvaluateDataQuality, EventBatchingCondition, ExecutionProperty, @@ -596,7 +564,6 @@ import { JDBCConnectorOptions, JDBCConnectorSource, JDBCConnectorTarget, - JDBCDataType, JdbcMetadataEntry, JdbcTarget, JobCommand, @@ -626,7 +593,6 @@ import { OracleSQLCatalogTarget, Order, Partition, - PartitionError, PartitionIndex, PartitionInput, PartitionValueList, @@ -635,7 +601,6 @@ import { PIIDetection, PostgreSQLCatalogSource, PostgreSQLCatalogTarget, - Predecessor, Predicate, PrincipalPermissions, RecrawlPolicy, @@ -663,7 +628,6 @@ import { S3ParquetSource, S3SourceAdditionalOptions, S3Target, - Schedule, SchemaChangePolicy, SchemaId, SchemaReference, @@ -678,26 +642,19 @@ import { Spigot, SplitFields, SqlAlias, - StartingEventBatchCondition, StorageDescriptor, StreamingDataPreviewOptions, - TableError, - TableVersionError, TransformConfigParameter, TransformEncryption, TransformParameters, - Trigger, - TriggerNodeDetails, Union, UpsertRedshiftTargetOptions, ValidationException, Workflow, WorkflowGraph, WorkflowRun, - WorkflowRunStatistics, } from "../models/models_0"; import { - BackfillError, BinaryColumnStatisticsData, BlueprintRun, BooleanColumnStatisticsData, @@ -708,36 +665,26 @@ import { CodeGenEdge, CodeGenNode, CodeGenNodeArg, - ColumnError, ColumnImportance, - ColumnRowFilter, ColumnStatistics, ColumnStatisticsData, ConditionCheckFailureException, ConflictException, - ConfusionMatrix, Connection, ConnectionPasswordEncryption, CrawlerMetrics, CrawlerRunningException, CreateRegistryInput, - CreateRegistryResponse, CreateSchemaInput, - CreateSchemaResponse, CreateScriptRequest, - CreateScriptResponse, CreateSecurityConfigurationRequest, CreateSecurityConfigurationResponse, CreateSessionRequest, CreateSessionResponse, CreateTableRequest, - CreateTableResponse, CreateTriggerRequest, - CreateTriggerResponse, CreateUserDefinedFunctionRequest, - CreateUserDefinedFunctionResponse, CreateWorkflowRequest, - CreateWorkflowResponse, CsvClassifier, Database, DataCatalogEncryptionSettings, @@ -746,64 +693,35 @@ import { DecimalColumnStatisticsData, DecimalNumber, DeleteBlueprintRequest, - DeleteBlueprintResponse, DeleteClassifierRequest, - DeleteClassifierResponse, DeleteColumnStatisticsForPartitionRequest, - DeleteColumnStatisticsForPartitionResponse, DeleteColumnStatisticsForTableRequest, - DeleteColumnStatisticsForTableResponse, DeleteConnectionRequest, - DeleteConnectionResponse, DeleteCrawlerRequest, - DeleteCrawlerResponse, DeleteCustomEntityTypeRequest, - DeleteCustomEntityTypeResponse, DeleteDatabaseRequest, - DeleteDatabaseResponse, DeleteDataQualityRulesetRequest, - DeleteDataQualityRulesetResponse, DeleteDevEndpointRequest, - DeleteDevEndpointResponse, DeleteJobRequest, - DeleteJobResponse, DeleteMLTransformRequest, - DeleteMLTransformResponse, DeletePartitionIndexRequest, - DeletePartitionIndexResponse, DeletePartitionRequest, - DeletePartitionResponse, DeleteRegistryInput, - DeleteRegistryResponse, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DeleteSchemaInput, - DeleteSchemaResponse, DeleteSchemaVersionsInput, - DeleteSchemaVersionsResponse, DeleteSecurityConfigurationRequest, - DeleteSecurityConfigurationResponse, DeleteSessionRequest, - DeleteSessionResponse, DeleteTableRequest, - DeleteTableResponse, DeleteTableVersionRequest, - DeleteTableVersionResponse, DeleteTriggerRequest, - DeleteTriggerResponse, DeleteUserDefinedFunctionRequest, - DeleteUserDefinedFunctionResponse, DeleteWorkflowRequest, - DeleteWorkflowResponse, DoubleColumnStatisticsData, EncryptionAtRest, EncryptionConfiguration, - ErrorDetails, EvaluationMetrics, - ExportLabelsTaskRunProperties, - FederatedTable, FindMatchesMetrics, - FindMatchesTaskRunProperties, GetBlueprintRequest, GetBlueprintResponse, GetBlueprintRunRequest, @@ -832,15 +750,12 @@ import { GetCrawlersRequest, GetCrawlersResponse, GetCustomEntityTypeRequest, - GetCustomEntityTypeResponse, GetDatabaseRequest, GetDatabaseResponse, GetDatabasesRequest, GetDatabasesResponse, GetDataCatalogEncryptionSettingsRequest, - GetDataCatalogEncryptionSettingsResponse, GetDataflowGraphRequest, - GetDataflowGraphResponse, GetDataQualityResultRequest, GetDataQualityResultResponse, GetDataQualityRuleRecommendationRunRequest, @@ -854,7 +769,6 @@ import { GetDevEndpointsRequest, GetDevEndpointsResponse, GetJobBookmarkRequest, - GetJobBookmarkResponse, GetJobRequest, GetJobRunRequest, GetJobRunResponse, @@ -862,7 +776,6 @@ import { GetJobRunsResponse, GetJobsRequest, GetMappingRequest, - GetMappingResponse, GetMLTaskRunRequest, GetMLTaskRunResponse, GetMLTaskRunsRequest, @@ -872,27 +785,20 @@ import { GetMLTransformsRequest, GetMLTransformsResponse, GetPartitionIndexesRequest, - GetPartitionIndexesResponse, GetPartitionRequest, GetPartitionResponse, GetPartitionsRequest, GetPartitionsResponse, GetPlanRequest, - GetPlanResponse, GetRegistryInput, - GetRegistryResponse, GetResourcePoliciesRequest, GetResourcePoliciesResponse, GetResourcePolicyRequest, GetResourcePolicyResponse, GetSchemaByDefinitionInput, - GetSchemaByDefinitionResponse, GetSchemaInput, - GetSchemaResponse, GetSchemaVersionInput, - GetSchemaVersionResponse, GetSchemaVersionsDiffInput, - GetSchemaVersionsDiffResponse, GetSecurityConfigurationRequest, GetSecurityConfigurationResponse, GetSecurityConfigurationsRequest, @@ -910,11 +816,8 @@ import { GetTableVersionsRequest, GetTableVersionsResponse, GetTagsRequest, - GetTagsResponse, GetTriggerRequest, - GetTriggerResponse, GetTriggersRequest, - GetTriggersResponse, GetUnfilteredPartitionMetadataRequest, GetUnfilteredPartitionMetadataResponse, GetUnfilteredPartitionsMetadataRequest, @@ -931,17 +834,12 @@ import { GetWorkflowRunResponse, GluePolicy, GrokClassifier, - ImportLabelsTaskRunProperties, - JobBookmarkEntry, JobBookmarksEncryption, JsonClassifier, - KeySchemaElement, - LabelingSetGenerationTaskRunProperties, Location, LongColumnStatisticsData, MappingEntry, MLTransform, - PartitionIndexDescriptor, PermissionType, PermissionTypeMismatchException, RegistryId, @@ -949,15 +847,12 @@ import { S3Encryption, SchedulerTransitioningException, SchemaColumn, - SchemaVersionErrorItem, SchemaVersionNumber, SecurityConfiguration, Segment, Session, SessionCommand, Statement, - StatementOutput, - StatementOutputData, StringColumnStatisticsData, Table, TableIdentifier, @@ -965,7 +860,6 @@ import { TableVersion, TaskRun, TaskRunFilterCriteria, - TaskRunProperties, TaskRunSortCriteria, TransformFilterCriteria, TransformSortCriteria, @@ -997,23 +891,18 @@ import { GetJobResponse, GetJobsResponse, GetWorkflowRunPropertiesRequest, - GetWorkflowRunPropertiesResponse, GetWorkflowRunsRequest, GetWorkflowRunsResponse, IllegalBlueprintStateException, IllegalWorkflowStateException, ImportCatalogToGlueRequest, - ImportCatalogToGlueResponse, Job, JobUpdate, ListBlueprintsRequest, - ListBlueprintsResponse, ListCrawlersRequest, - ListCrawlersResponse, ListCrawlsRequest, ListCrawlsResponse, ListCustomEntityTypesRequest, - ListCustomEntityTypesResponse, ListDataQualityResultsRequest, ListDataQualityResultsResponse, ListDataQualityRuleRecommendationRunsRequest, @@ -1023,144 +912,83 @@ import { ListDataQualityRulesetsRequest, ListDataQualityRulesetsResponse, ListDevEndpointsRequest, - ListDevEndpointsResponse, ListJobsRequest, - ListJobsResponse, ListMLTransformsRequest, - ListMLTransformsResponse, ListRegistriesInput, - ListRegistriesResponse, ListSchemasInput, - ListSchemasResponse, ListSchemaVersionsInput, - ListSchemaVersionsResponse, ListSessionsRequest, ListSessionsResponse, ListStatementsRequest, ListStatementsResponse, ListTriggersRequest, - ListTriggersResponse, ListWorkflowsRequest, - ListWorkflowsResponse, Mapping, - MetadataInfo, MetadataKeyValuePair, MLTransformNotReadyException, NoScheduleException, - OtherMetadataValueListItem, PropertyPredicate, PutDataCatalogEncryptionSettingsRequest, - PutDataCatalogEncryptionSettingsResponse, PutResourcePolicyRequest, - PutResourcePolicyResponse, PutSchemaVersionMetadataInput, - PutSchemaVersionMetadataResponse, PutWorkflowRunPropertiesRequest, - PutWorkflowRunPropertiesResponse, QuerySchemaVersionMetadataInput, - QuerySchemaVersionMetadataResponse, RegisterSchemaVersionInput, - RegisterSchemaVersionResponse, - RegistryListItem, RemoveSchemaVersionMetadataInput, - RemoveSchemaVersionMetadataResponse, ResetJobBookmarkRequest, - ResetJobBookmarkResponse, ResumeWorkflowRunRequest, - ResumeWorkflowRunResponse, RunStatementRequest, - RunStatementResponse, SchedulerNotRunningException, SchedulerRunningException, - SchemaListItem, - SchemaVersionListItem, SearchTablesRequest, SearchTablesResponse, SortCriterion, StartBlueprintRunRequest, - StartBlueprintRunResponse, StartCrawlerRequest, - StartCrawlerResponse, StartCrawlerScheduleRequest, - StartCrawlerScheduleResponse, StartDataQualityRuleRecommendationRunRequest, - StartDataQualityRuleRecommendationRunResponse, StartDataQualityRulesetEvaluationRunRequest, - StartDataQualityRulesetEvaluationRunResponse, StartExportLabelsTaskRunRequest, - StartExportLabelsTaskRunResponse, StartImportLabelsTaskRunRequest, - StartImportLabelsTaskRunResponse, StartJobRunRequest, - StartJobRunResponse, StartMLEvaluationTaskRunRequest, - StartMLEvaluationTaskRunResponse, StartMLLabelingSetGenerationTaskRunRequest, - StartMLLabelingSetGenerationTaskRunResponse, StartTriggerRequest, - StartTriggerResponse, StartWorkflowRunRequest, - StartWorkflowRunResponse, StopCrawlerRequest, - StopCrawlerResponse, StopCrawlerScheduleRequest, - StopCrawlerScheduleResponse, StopSessionRequest, - StopSessionResponse, StopTriggerRequest, - StopTriggerResponse, StopWorkflowRunRequest, - StopWorkflowRunResponse, TagResourceRequest, - TagResourceResponse, TriggerUpdate, UntagResourceRequest, - UntagResourceResponse, UpdateBlueprintRequest, - UpdateBlueprintResponse, UpdateClassifierRequest, - UpdateClassifierResponse, UpdateColumnStatisticsForPartitionRequest, UpdateColumnStatisticsForPartitionResponse, UpdateColumnStatisticsForTableRequest, UpdateColumnStatisticsForTableResponse, UpdateConnectionRequest, - UpdateConnectionResponse, UpdateCrawlerRequest, - UpdateCrawlerResponse, UpdateCrawlerScheduleRequest, - UpdateCrawlerScheduleResponse, UpdateCsvClassifierRequest, UpdateDatabaseRequest, - UpdateDatabaseResponse, UpdateDataQualityRulesetRequest, - UpdateDataQualityRulesetResponse, UpdateDevEndpointRequest, - UpdateDevEndpointResponse, UpdateGrokClassifierRequest, UpdateJobFromSourceControlRequest, - UpdateJobFromSourceControlResponse, UpdateJobRequest, - UpdateJobResponse, UpdateJsonClassifierRequest, UpdateMLTransformRequest, - UpdateMLTransformResponse, UpdatePartitionRequest, - UpdatePartitionResponse, UpdateRegistryInput, - UpdateRegistryResponse, UpdateSchemaInput, - UpdateSchemaResponse, UpdateSourceControlFromJobRequest, - UpdateSourceControlFromJobResponse, UpdateTableRequest, - UpdateTableResponse, UpdateTriggerRequest, - UpdateTriggerResponse, UpdateUserDefinedFunctionRequest, - UpdateUserDefinedFunctionResponse, UpdateWorkflowRequest, - UpdateWorkflowResponse, UpdateXMLClassifierRequest, VersionMismatchException, } from "../models/models_2"; @@ -1187,7 +1015,7 @@ export const se_BatchDeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteConnection"); let body: any; - body = JSON.stringify(se_BatchDeleteConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1200,7 +1028,7 @@ export const se_BatchDeletePartitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeletePartition"); let body: any; - body = JSON.stringify(se_BatchDeletePartitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1213,7 +1041,7 @@ export const se_BatchDeleteTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteTable"); let body: any; - body = JSON.stringify(se_BatchDeleteTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1226,7 +1054,7 @@ export const se_BatchDeleteTableVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteTableVersion"); let body: any; - body = JSON.stringify(se_BatchDeleteTableVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1239,7 +1067,7 @@ export const se_BatchGetBlueprintsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetBlueprints"); let body: any; - body = JSON.stringify(se_BatchGetBlueprintsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1252,7 +1080,7 @@ export const se_BatchGetCrawlersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetCrawlers"); let body: any; - body = JSON.stringify(se_BatchGetCrawlersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1265,7 +1093,7 @@ export const se_BatchGetCustomEntityTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetCustomEntityTypes"); let body: any; - body = JSON.stringify(se_BatchGetCustomEntityTypesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1278,7 +1106,7 @@ export const se_BatchGetDataQualityResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetDataQualityResult"); let body: any; - body = JSON.stringify(se_BatchGetDataQualityResultRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1291,7 +1119,7 @@ export const se_BatchGetDevEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetDevEndpoints"); let body: any; - body = JSON.stringify(se_BatchGetDevEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1304,7 +1132,7 @@ export const se_BatchGetJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetJobs"); let body: any; - body = JSON.stringify(se_BatchGetJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1317,7 +1145,7 @@ export const se_BatchGetPartitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetPartition"); let body: any; - body = JSON.stringify(se_BatchGetPartitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1330,7 +1158,7 @@ export const se_BatchGetTriggersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetTriggers"); let body: any; - body = JSON.stringify(se_BatchGetTriggersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1343,7 +1171,7 @@ export const se_BatchGetWorkflowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetWorkflows"); let body: any; - body = JSON.stringify(se_BatchGetWorkflowsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1356,7 +1184,7 @@ export const se_BatchStopJobRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchStopJobRun"); let body: any; - body = JSON.stringify(se_BatchStopJobRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1382,7 +1210,7 @@ export const se_CancelDataQualityRuleRecommendationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelDataQualityRuleRecommendationRun"); let body: any; - body = JSON.stringify(se_CancelDataQualityRuleRecommendationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1395,7 +1223,7 @@ export const se_CancelDataQualityRulesetEvaluationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelDataQualityRulesetEvaluationRun"); let body: any; - body = JSON.stringify(se_CancelDataQualityRulesetEvaluationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1408,7 +1236,7 @@ export const se_CancelMLTaskRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelMLTaskRun"); let body: any; - body = JSON.stringify(se_CancelMLTaskRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1421,7 +1249,7 @@ export const se_CancelStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelStatement"); let body: any; - body = JSON.stringify(se_CancelStatementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1434,7 +1262,7 @@ export const se_CheckSchemaVersionValidityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CheckSchemaVersionValidity"); let body: any; - body = JSON.stringify(se_CheckSchemaVersionValidityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1447,7 +1275,7 @@ export const se_CreateBlueprintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBlueprint"); let body: any; - body = JSON.stringify(se_CreateBlueprintRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1460,7 +1288,7 @@ export const se_CreateClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateClassifier"); let body: any; - body = JSON.stringify(se_CreateClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1473,7 +1301,7 @@ export const se_CreateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnection"); let body: any; - body = JSON.stringify(se_CreateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1499,7 +1327,7 @@ export const se_CreateCustomEntityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCustomEntityType"); let body: any; - body = JSON.stringify(se_CreateCustomEntityTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1512,7 +1340,7 @@ export const se_CreateDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatabase"); let body: any; - body = JSON.stringify(se_CreateDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1525,7 +1353,7 @@ export const se_CreateDataQualityRulesetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataQualityRuleset"); let body: any; - body = JSON.stringify(se_CreateDataQualityRulesetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1538,7 +1366,7 @@ export const se_CreateDevEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDevEndpoint"); let body: any; - body = JSON.stringify(se_CreateDevEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1590,7 +1418,7 @@ export const se_CreatePartitionIndexCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePartitionIndex"); let body: any; - body = JSON.stringify(se_CreatePartitionIndexRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1603,7 +1431,7 @@ export const se_CreateRegistryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRegistry"); let body: any; - body = JSON.stringify(se_CreateRegistryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1616,7 +1444,7 @@ export const se_CreateSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSchema"); let body: any; - body = JSON.stringify(se_CreateSchemaInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1629,7 +1457,7 @@ export const se_CreateScriptCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateScript"); let body: any; - body = JSON.stringify(se_CreateScriptRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1642,7 +1470,7 @@ export const se_CreateSecurityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSecurityConfiguration"); let body: any; - body = JSON.stringify(se_CreateSecurityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1681,7 +1509,7 @@ export const se_CreateTriggerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTrigger"); let body: any; - body = JSON.stringify(se_CreateTriggerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1694,7 +1522,7 @@ export const se_CreateUserDefinedFunctionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserDefinedFunction"); let body: any; - body = JSON.stringify(se_CreateUserDefinedFunctionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1707,7 +1535,7 @@ export const se_CreateWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkflow"); let body: any; - body = JSON.stringify(se_CreateWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1720,7 +1548,7 @@ export const se_DeleteBlueprintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBlueprint"); let body: any; - body = JSON.stringify(se_DeleteBlueprintRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1733,7 +1561,7 @@ export const se_DeleteClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteClassifier"); let body: any; - body = JSON.stringify(se_DeleteClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1746,7 +1574,7 @@ export const se_DeleteColumnStatisticsForPartitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteColumnStatisticsForPartition"); let body: any; - body = JSON.stringify(se_DeleteColumnStatisticsForPartitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1759,7 +1587,7 @@ export const se_DeleteColumnStatisticsForTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteColumnStatisticsForTable"); let body: any; - body = JSON.stringify(se_DeleteColumnStatisticsForTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1772,7 +1600,7 @@ export const se_DeleteConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnection"); let body: any; - body = JSON.stringify(se_DeleteConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1785,7 +1613,7 @@ export const se_DeleteCrawlerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCrawler"); let body: any; - body = JSON.stringify(se_DeleteCrawlerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1798,7 +1626,7 @@ export const se_DeleteCustomEntityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCustomEntityType"); let body: any; - body = JSON.stringify(se_DeleteCustomEntityTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1811,7 +1639,7 @@ export const se_DeleteDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDatabase"); let body: any; - body = JSON.stringify(se_DeleteDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1824,7 +1652,7 @@ export const se_DeleteDataQualityRulesetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataQualityRuleset"); let body: any; - body = JSON.stringify(se_DeleteDataQualityRulesetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1837,7 +1665,7 @@ export const se_DeleteDevEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDevEndpoint"); let body: any; - body = JSON.stringify(se_DeleteDevEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1850,7 +1678,7 @@ export const se_DeleteJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteJob"); let body: any; - body = JSON.stringify(se_DeleteJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1863,7 +1691,7 @@ export const se_DeleteMLTransformCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMLTransform"); let body: any; - body = JSON.stringify(se_DeleteMLTransformRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1876,7 +1704,7 @@ export const se_DeletePartitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePartition"); let body: any; - body = JSON.stringify(se_DeletePartitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1889,7 +1717,7 @@ export const se_DeletePartitionIndexCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePartitionIndex"); let body: any; - body = JSON.stringify(se_DeletePartitionIndexRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1902,7 +1730,7 @@ export const se_DeleteRegistryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegistry"); let body: any; - body = JSON.stringify(se_DeleteRegistryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1915,7 +1743,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1928,7 +1756,7 @@ export const se_DeleteSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSchema"); let body: any; - body = JSON.stringify(se_DeleteSchemaInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1941,7 +1769,7 @@ export const se_DeleteSchemaVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSchemaVersions"); let body: any; - body = JSON.stringify(se_DeleteSchemaVersionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1954,7 +1782,7 @@ export const se_DeleteSecurityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSecurityConfiguration"); let body: any; - body = JSON.stringify(se_DeleteSecurityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1967,7 +1795,7 @@ export const se_DeleteSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSession"); let body: any; - body = JSON.stringify(se_DeleteSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1980,7 +1808,7 @@ export const se_DeleteTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTable"); let body: any; - body = JSON.stringify(se_DeleteTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1993,7 +1821,7 @@ export const se_DeleteTableVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTableVersion"); let body: any; - body = JSON.stringify(se_DeleteTableVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2006,7 +1834,7 @@ export const se_DeleteTriggerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTrigger"); let body: any; - body = JSON.stringify(se_DeleteTriggerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2019,7 +1847,7 @@ export const se_DeleteUserDefinedFunctionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserDefinedFunction"); let body: any; - body = JSON.stringify(se_DeleteUserDefinedFunctionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2032,7 +1860,7 @@ export const se_DeleteWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkflow"); let body: any; - body = JSON.stringify(se_DeleteWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2045,7 +1873,7 @@ export const se_GetBlueprintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBlueprint"); let body: any; - body = JSON.stringify(se_GetBlueprintRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2058,7 +1886,7 @@ export const se_GetBlueprintRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBlueprintRun"); let body: any; - body = JSON.stringify(se_GetBlueprintRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2071,7 +1899,7 @@ export const se_GetBlueprintRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBlueprintRuns"); let body: any; - body = JSON.stringify(se_GetBlueprintRunsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2084,7 +1912,7 @@ export const se_GetCatalogImportStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCatalogImportStatus"); let body: any; - body = JSON.stringify(se_GetCatalogImportStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2097,7 +1925,7 @@ export const se_GetClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetClassifier"); let body: any; - body = JSON.stringify(se_GetClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2110,7 +1938,7 @@ export const se_GetClassifiersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetClassifiers"); let body: any; - body = JSON.stringify(se_GetClassifiersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2123,7 +1951,7 @@ export const se_GetColumnStatisticsForPartitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetColumnStatisticsForPartition"); let body: any; - body = JSON.stringify(se_GetColumnStatisticsForPartitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2136,7 +1964,7 @@ export const se_GetColumnStatisticsForTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetColumnStatisticsForTable"); let body: any; - body = JSON.stringify(se_GetColumnStatisticsForTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2149,7 +1977,7 @@ export const se_GetConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConnection"); let body: any; - body = JSON.stringify(se_GetConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2162,7 +1990,7 @@ export const se_GetConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConnections"); let body: any; - body = JSON.stringify(se_GetConnectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2175,7 +2003,7 @@ export const se_GetCrawlerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCrawler"); let body: any; - body = JSON.stringify(se_GetCrawlerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2188,7 +2016,7 @@ export const se_GetCrawlerMetricsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCrawlerMetrics"); let body: any; - body = JSON.stringify(se_GetCrawlerMetricsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2201,7 +2029,7 @@ export const se_GetCrawlersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCrawlers"); let body: any; - body = JSON.stringify(se_GetCrawlersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2214,7 +2042,7 @@ export const se_GetCustomEntityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCustomEntityType"); let body: any; - body = JSON.stringify(se_GetCustomEntityTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2227,7 +2055,7 @@ export const se_GetDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDatabase"); let body: any; - body = JSON.stringify(se_GetDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2240,7 +2068,7 @@ export const se_GetDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDatabases"); let body: any; - body = JSON.stringify(se_GetDatabasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2253,7 +2081,7 @@ export const se_GetDataCatalogEncryptionSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataCatalogEncryptionSettings"); let body: any; - body = JSON.stringify(se_GetDataCatalogEncryptionSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2266,7 +2094,7 @@ export const se_GetDataflowGraphCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataflowGraph"); let body: any; - body = JSON.stringify(se_GetDataflowGraphRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2279,7 +2107,7 @@ export const se_GetDataQualityResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataQualityResult"); let body: any; - body = JSON.stringify(se_GetDataQualityResultRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2292,7 +2120,7 @@ export const se_GetDataQualityRuleRecommendationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataQualityRuleRecommendationRun"); let body: any; - body = JSON.stringify(se_GetDataQualityRuleRecommendationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2305,7 +2133,7 @@ export const se_GetDataQualityRulesetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataQualityRuleset"); let body: any; - body = JSON.stringify(se_GetDataQualityRulesetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2318,7 +2146,7 @@ export const se_GetDataQualityRulesetEvaluationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataQualityRulesetEvaluationRun"); let body: any; - body = JSON.stringify(se_GetDataQualityRulesetEvaluationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2331,7 +2159,7 @@ export const se_GetDevEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDevEndpoint"); let body: any; - body = JSON.stringify(se_GetDevEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2344,7 +2172,7 @@ export const se_GetDevEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDevEndpoints"); let body: any; - body = JSON.stringify(se_GetDevEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2354,7 +2182,7 @@ export const se_GetDevEndpointsCommand = async ( export const se_GetJobCommand = async (input: GetJobCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJob"); let body: any; - body = JSON.stringify(se_GetJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2367,7 +2195,7 @@ export const se_GetJobBookmarkCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobBookmark"); let body: any; - body = JSON.stringify(se_GetJobBookmarkRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2380,7 +2208,7 @@ export const se_GetJobRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobRun"); let body: any; - body = JSON.stringify(se_GetJobRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2393,7 +2221,7 @@ export const se_GetJobRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobRuns"); let body: any; - body = JSON.stringify(se_GetJobRunsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2406,7 +2234,7 @@ export const se_GetJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobs"); let body: any; - body = JSON.stringify(se_GetJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2419,7 +2247,7 @@ export const se_GetMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMapping"); let body: any; - body = JSON.stringify(se_GetMappingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2432,7 +2260,7 @@ export const se_GetMLTaskRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMLTaskRun"); let body: any; - body = JSON.stringify(se_GetMLTaskRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2458,7 +2286,7 @@ export const se_GetMLTransformCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMLTransform"); let body: any; - body = JSON.stringify(se_GetMLTransformRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2484,7 +2312,7 @@ export const se_GetPartitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPartition"); let body: any; - body = JSON.stringify(se_GetPartitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2497,7 +2325,7 @@ export const se_GetPartitionIndexesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPartitionIndexes"); let body: any; - body = JSON.stringify(se_GetPartitionIndexesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2523,7 +2351,7 @@ export const se_GetPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPlan"); let body: any; - body = JSON.stringify(se_GetPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2536,7 +2364,7 @@ export const se_GetRegistryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegistry"); let body: any; - body = JSON.stringify(se_GetRegistryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2549,7 +2377,7 @@ export const se_GetResourcePoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicies"); let body: any; - body = JSON.stringify(se_GetResourcePoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2562,7 +2390,7 @@ export const se_GetResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); let body: any; - body = JSON.stringify(se_GetResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2575,7 +2403,7 @@ export const se_GetSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSchema"); let body: any; - body = JSON.stringify(se_GetSchemaInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2588,7 +2416,7 @@ export const se_GetSchemaByDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSchemaByDefinition"); let body: any; - body = JSON.stringify(se_GetSchemaByDefinitionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2601,7 +2429,7 @@ export const se_GetSchemaVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSchemaVersion"); let body: any; - body = JSON.stringify(se_GetSchemaVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2614,7 +2442,7 @@ export const se_GetSchemaVersionsDiffCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSchemaVersionsDiff"); let body: any; - body = JSON.stringify(se_GetSchemaVersionsDiffInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2627,7 +2455,7 @@ export const se_GetSecurityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSecurityConfiguration"); let body: any; - body = JSON.stringify(se_GetSecurityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2640,7 +2468,7 @@ export const se_GetSecurityConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSecurityConfigurations"); let body: any; - body = JSON.stringify(se_GetSecurityConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2653,7 +2481,7 @@ export const se_GetSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSession"); let body: any; - body = JSON.stringify(se_GetSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2666,7 +2494,7 @@ export const se_GetStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetStatement"); let body: any; - body = JSON.stringify(se_GetStatementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2705,7 +2533,7 @@ export const se_GetTableVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTableVersion"); let body: any; - body = JSON.stringify(se_GetTableVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2718,7 +2546,7 @@ export const se_GetTableVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTableVersions"); let body: any; - body = JSON.stringify(se_GetTableVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2731,7 +2559,7 @@ export const se_GetTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTags"); let body: any; - body = JSON.stringify(se_GetTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2744,7 +2572,7 @@ export const se_GetTriggerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTrigger"); let body: any; - body = JSON.stringify(se_GetTriggerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2757,7 +2585,7 @@ export const se_GetTriggersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTriggers"); let body: any; - body = JSON.stringify(se_GetTriggersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2770,7 +2598,7 @@ export const se_GetUnfilteredPartitionMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUnfilteredPartitionMetadata"); let body: any; - body = JSON.stringify(se_GetUnfilteredPartitionMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2783,7 +2611,7 @@ export const se_GetUnfilteredPartitionsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUnfilteredPartitionsMetadata"); let body: any; - body = JSON.stringify(se_GetUnfilteredPartitionsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2796,7 +2624,7 @@ export const se_GetUnfilteredTableMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUnfilteredTableMetadata"); let body: any; - body = JSON.stringify(se_GetUnfilteredTableMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2809,7 +2637,7 @@ export const se_GetUserDefinedFunctionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUserDefinedFunction"); let body: any; - body = JSON.stringify(se_GetUserDefinedFunctionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2822,7 +2650,7 @@ export const se_GetUserDefinedFunctionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUserDefinedFunctions"); let body: any; - body = JSON.stringify(se_GetUserDefinedFunctionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2835,7 +2663,7 @@ export const se_GetWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkflow"); let body: any; - body = JSON.stringify(se_GetWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2848,7 +2676,7 @@ export const se_GetWorkflowRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkflowRun"); let body: any; - body = JSON.stringify(se_GetWorkflowRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2861,7 +2689,7 @@ export const se_GetWorkflowRunPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkflowRunProperties"); let body: any; - body = JSON.stringify(se_GetWorkflowRunPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2874,7 +2702,7 @@ export const se_GetWorkflowRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkflowRuns"); let body: any; - body = JSON.stringify(se_GetWorkflowRunsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2887,7 +2715,7 @@ export const se_ImportCatalogToGlueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportCatalogToGlue"); let body: any; - body = JSON.stringify(se_ImportCatalogToGlueRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2900,7 +2728,7 @@ export const se_ListBlueprintsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBlueprints"); let body: any; - body = JSON.stringify(se_ListBlueprintsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2913,7 +2741,7 @@ export const se_ListCrawlersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCrawlers"); let body: any; - body = JSON.stringify(se_ListCrawlersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2926,7 +2754,7 @@ export const se_ListCrawlsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCrawls"); let body: any; - body = JSON.stringify(se_ListCrawlsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2939,7 +2767,7 @@ export const se_ListCustomEntityTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomEntityTypes"); let body: any; - body = JSON.stringify(se_ListCustomEntityTypesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3004,7 +2832,7 @@ export const se_ListDevEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDevEndpoints"); let body: any; - body = JSON.stringify(se_ListDevEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3017,7 +2845,7 @@ export const se_ListJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListJobs"); let body: any; - body = JSON.stringify(se_ListJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3043,7 +2871,7 @@ export const se_ListRegistriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRegistries"); let body: any; - body = JSON.stringify(se_ListRegistriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3056,7 +2884,7 @@ export const se_ListSchemasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSchemas"); let body: any; - body = JSON.stringify(se_ListSchemasInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3069,7 +2897,7 @@ export const se_ListSchemaVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSchemaVersions"); let body: any; - body = JSON.stringify(se_ListSchemaVersionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3082,7 +2910,7 @@ export const se_ListSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSessions"); let body: any; - body = JSON.stringify(se_ListSessionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3095,7 +2923,7 @@ export const se_ListStatementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStatements"); let body: any; - body = JSON.stringify(se_ListStatementsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3108,7 +2936,7 @@ export const se_ListTriggersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTriggers"); let body: any; - body = JSON.stringify(se_ListTriggersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3121,7 +2949,7 @@ export const se_ListWorkflowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkflows"); let body: any; - body = JSON.stringify(se_ListWorkflowsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3134,7 +2962,7 @@ export const se_PutDataCatalogEncryptionSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutDataCatalogEncryptionSettings"); let body: any; - body = JSON.stringify(se_PutDataCatalogEncryptionSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3147,7 +2975,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3160,7 +2988,7 @@ export const se_PutSchemaVersionMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutSchemaVersionMetadata"); let body: any; - body = JSON.stringify(se_PutSchemaVersionMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3173,7 +3001,7 @@ export const se_PutWorkflowRunPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutWorkflowRunProperties"); let body: any; - body = JSON.stringify(se_PutWorkflowRunPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3186,7 +3014,7 @@ export const se_QuerySchemaVersionMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("QuerySchemaVersionMetadata"); let body: any; - body = JSON.stringify(se_QuerySchemaVersionMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3199,7 +3027,7 @@ export const se_RegisterSchemaVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterSchemaVersion"); let body: any; - body = JSON.stringify(se_RegisterSchemaVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3212,7 +3040,7 @@ export const se_RemoveSchemaVersionMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveSchemaVersionMetadata"); let body: any; - body = JSON.stringify(se_RemoveSchemaVersionMetadataInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3225,7 +3053,7 @@ export const se_ResetJobBookmarkCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetJobBookmark"); let body: any; - body = JSON.stringify(se_ResetJobBookmarkRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3238,7 +3066,7 @@ export const se_ResumeWorkflowRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResumeWorkflowRun"); let body: any; - body = JSON.stringify(se_ResumeWorkflowRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3251,7 +3079,7 @@ export const se_RunStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RunStatement"); let body: any; - body = JSON.stringify(se_RunStatementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3264,7 +3092,7 @@ export const se_SearchTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchTables"); let body: any; - body = JSON.stringify(se_SearchTablesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3277,7 +3105,7 @@ export const se_StartBlueprintRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartBlueprintRun"); let body: any; - body = JSON.stringify(se_StartBlueprintRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3290,7 +3118,7 @@ export const se_StartCrawlerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartCrawler"); let body: any; - body = JSON.stringify(se_StartCrawlerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3303,7 +3131,7 @@ export const se_StartCrawlerScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartCrawlerSchedule"); let body: any; - body = JSON.stringify(se_StartCrawlerScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3316,7 +3144,7 @@ export const se_StartDataQualityRuleRecommendationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDataQualityRuleRecommendationRun"); let body: any; - body = JSON.stringify(se_StartDataQualityRuleRecommendationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3329,7 +3157,7 @@ export const se_StartDataQualityRulesetEvaluationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDataQualityRulesetEvaluationRun"); let body: any; - body = JSON.stringify(se_StartDataQualityRulesetEvaluationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3342,7 +3170,7 @@ export const se_StartExportLabelsTaskRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartExportLabelsTaskRun"); let body: any; - body = JSON.stringify(se_StartExportLabelsTaskRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3355,7 +3183,7 @@ export const se_StartImportLabelsTaskRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartImportLabelsTaskRun"); let body: any; - body = JSON.stringify(se_StartImportLabelsTaskRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3381,7 +3209,7 @@ export const se_StartMLEvaluationTaskRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartMLEvaluationTaskRun"); let body: any; - body = JSON.stringify(se_StartMLEvaluationTaskRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3394,7 +3222,7 @@ export const se_StartMLLabelingSetGenerationTaskRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartMLLabelingSetGenerationTaskRun"); let body: any; - body = JSON.stringify(se_StartMLLabelingSetGenerationTaskRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3407,7 +3235,7 @@ export const se_StartTriggerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartTrigger"); let body: any; - body = JSON.stringify(se_StartTriggerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3420,7 +3248,7 @@ export const se_StartWorkflowRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartWorkflowRun"); let body: any; - body = JSON.stringify(se_StartWorkflowRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3433,7 +3261,7 @@ export const se_StopCrawlerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopCrawler"); let body: any; - body = JSON.stringify(se_StopCrawlerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3446,7 +3274,7 @@ export const se_StopCrawlerScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopCrawlerSchedule"); let body: any; - body = JSON.stringify(se_StopCrawlerScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3459,7 +3287,7 @@ export const se_StopSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopSession"); let body: any; - body = JSON.stringify(se_StopSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3472,7 +3300,7 @@ export const se_StopTriggerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTrigger"); let body: any; - body = JSON.stringify(se_StopTriggerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3485,7 +3313,7 @@ export const se_StopWorkflowRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopWorkflowRun"); let body: any; - body = JSON.stringify(se_StopWorkflowRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3498,7 +3326,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3511,7 +3339,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3524,7 +3352,7 @@ export const se_UpdateBlueprintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBlueprint"); let body: any; - body = JSON.stringify(se_UpdateBlueprintRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3537,7 +3365,7 @@ export const se_UpdateClassifierCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateClassifier"); let body: any; - body = JSON.stringify(se_UpdateClassifierRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3576,7 +3404,7 @@ export const se_UpdateConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnection"); let body: any; - body = JSON.stringify(se_UpdateConnectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3602,7 +3430,7 @@ export const se_UpdateCrawlerScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCrawlerSchedule"); let body: any; - body = JSON.stringify(se_UpdateCrawlerScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3615,7 +3443,7 @@ export const se_UpdateDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDatabase"); let body: any; - body = JSON.stringify(se_UpdateDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3628,7 +3456,7 @@ export const se_UpdateDataQualityRulesetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDataQualityRuleset"); let body: any; - body = JSON.stringify(se_UpdateDataQualityRulesetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3641,7 +3469,7 @@ export const se_UpdateDevEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDevEndpoint"); let body: any; - body = JSON.stringify(se_UpdateDevEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3667,7 +3495,7 @@ export const se_UpdateJobFromSourceControlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateJobFromSourceControl"); let body: any; - body = JSON.stringify(se_UpdateJobFromSourceControlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3706,7 +3534,7 @@ export const se_UpdateRegistryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRegistry"); let body: any; - body = JSON.stringify(se_UpdateRegistryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3719,7 +3547,7 @@ export const se_UpdateSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSchema"); let body: any; - body = JSON.stringify(se_UpdateSchemaInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3732,7 +3560,7 @@ export const se_UpdateSourceControlFromJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSourceControlFromJob"); let body: any; - body = JSON.stringify(se_UpdateSourceControlFromJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3758,7 +3586,7 @@ export const se_UpdateTriggerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTrigger"); let body: any; - body = JSON.stringify(se_UpdateTriggerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3771,7 +3599,7 @@ export const se_UpdateUserDefinedFunctionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserDefinedFunction"); let body: any; - body = JSON.stringify(se_UpdateUserDefinedFunctionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3784,7 +3612,7 @@ export const se_UpdateWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkflow"); let body: any; - body = JSON.stringify(se_UpdateWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3800,12 +3628,12 @@ export const de_BatchCreatePartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchCreatePartitionResponse(data, context); + contents = _json(data); const response: BatchCreatePartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3844,10 +3672,9 @@ const de_BatchCreatePartitionCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3865,12 +3692,12 @@ export const de_BatchDeleteConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteConnectionResponse(data, context); + contents = _json(data); const response: BatchDeleteConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3894,10 +3721,9 @@ const de_BatchDeleteConnectionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3915,12 +3741,12 @@ export const de_BatchDeletePartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeletePartitionResponse(data, context); + contents = _json(data); const response: BatchDeletePartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3950,10 +3776,9 @@ const de_BatchDeletePartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3971,12 +3796,12 @@ export const de_BatchDeleteTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteTableResponse(data, context); + contents = _json(data); const response: BatchDeleteTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4012,10 +3837,9 @@ const de_BatchDeleteTableCommandError = async ( throw await de_ResourceNotReadyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4033,12 +3857,12 @@ export const de_BatchDeleteTableVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteTableVersionResponse(data, context); + contents = _json(data); const response: BatchDeleteTableVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4068,10 +3892,9 @@ const de_BatchDeleteTableVersionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4094,7 +3917,7 @@ export const de_BatchGetBlueprintsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4121,10 +3944,9 @@ const de_BatchGetBlueprintsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4147,7 +3969,7 @@ export const de_BatchGetCrawlersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4171,10 +3993,9 @@ const de_BatchGetCrawlersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4192,12 +4013,12 @@ export const de_BatchGetCustomEntityTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetCustomEntityTypesResponse(data, context); + contents = _json(data); const response: BatchGetCustomEntityTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4224,10 +4045,9 @@ const de_BatchGetCustomEntityTypesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4250,7 +4070,7 @@ export const de_BatchGetDataQualityResultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4277,10 +4097,9 @@ const de_BatchGetDataQualityResultCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4303,7 +4122,7 @@ export const de_BatchGetDevEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4333,10 +4152,9 @@ const de_BatchGetDevEndpointsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4359,7 +4177,7 @@ export const de_BatchGetJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4386,10 +4204,9 @@ const de_BatchGetJobsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4412,7 +4229,7 @@ export const de_BatchGetPartitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4454,10 +4271,9 @@ const de_BatchGetPartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4475,12 +4291,12 @@ export const de_BatchGetTriggersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetTriggersResponse(data, context); + contents = _json(data); const response: BatchGetTriggersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4507,10 +4323,9 @@ const de_BatchGetTriggersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4533,7 +4348,7 @@ export const de_BatchGetWorkflowsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4560,10 +4375,9 @@ const de_BatchGetWorkflowsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4581,12 +4395,12 @@ export const de_BatchStopJobRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchStopJobRunResponse(data, context); + contents = _json(data); const response: BatchStopJobRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4613,10 +4427,9 @@ const de_BatchStopJobRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4634,12 +4447,12 @@ export const de_BatchUpdatePartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchUpdatePartitionResponse(data, context); + contents = _json(data); const response: BatchUpdatePartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4672,10 +4485,9 @@ const de_BatchUpdatePartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4693,12 +4505,12 @@ export const de_CancelDataQualityRuleRecommendationRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelDataQualityRuleRecommendationRunResponse(data, context); + contents = _json(data); const response: CancelDataQualityRuleRecommendationRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4728,10 +4540,9 @@ const de_CancelDataQualityRuleRecommendationRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4749,12 +4560,12 @@ export const de_CancelDataQualityRulesetEvaluationRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelDataQualityRulesetEvaluationRunResponse(data, context); + contents = _json(data); const response: CancelDataQualityRulesetEvaluationRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4784,10 +4595,9 @@ const de_CancelDataQualityRulesetEvaluationRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4805,12 +4615,12 @@ export const de_CancelMLTaskRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelMLTaskRunResponse(data, context); + contents = _json(data); const response: CancelMLTaskRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4840,10 +4650,9 @@ const de_CancelMLTaskRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4861,12 +4670,12 @@ export const de_CancelStatementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelStatementResponse(data, context); + contents = _json(data); const response: CancelStatementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4902,10 +4711,9 @@ const de_CancelStatementCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4923,12 +4731,12 @@ export const de_CheckSchemaVersionValidityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckSchemaVersionValidityResponse(data, context); + contents = _json(data); const response: CheckSchemaVersionValidityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4955,10 +4763,9 @@ const de_CheckSchemaVersionValidityCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4976,12 +4783,12 @@ export const de_CreateBlueprintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBlueprintResponse(data, context); + contents = _json(data); const response: CreateBlueprintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5014,10 +4821,9 @@ const de_CreateBlueprintCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5035,12 +4841,12 @@ export const de_CreateClassifierCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateClassifierResponse(data, context); + contents = _json(data); const response: CreateClassifierCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5067,10 +4873,9 @@ const de_CreateClassifierCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5088,12 +4893,12 @@ export const de_CreateConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConnectionResponse(data, context); + contents = _json(data); const response: CreateConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5126,10 +4931,9 @@ const de_CreateConnectionCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5147,12 +4951,12 @@ export const de_CreateCrawlerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCrawlerResponse(data, context); + contents = _json(data); const response: CreateCrawlerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5182,10 +4986,9 @@ const de_CreateCrawlerCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5203,12 +5006,12 @@ export const de_CreateCustomEntityTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCustomEntityTypeResponse(data, context); + contents = _json(data); const response: CreateCustomEntityTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5247,10 +5050,9 @@ const de_CreateCustomEntityTypeCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5268,12 +5070,12 @@ export const de_CreateDatabaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatabaseResponse(data, context); + contents = _json(data); const response: CreateDatabaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5315,10 +5117,9 @@ const de_CreateDatabaseCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5336,12 +5137,12 @@ export const de_CreateDataQualityRulesetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataQualityRulesetResponse(data, context); + contents = _json(data); const response: CreateDataQualityRulesetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5374,10 +5175,9 @@ const de_CreateDataQualityRulesetCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5400,7 +5200,7 @@ export const de_CreateDevEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5442,10 +5242,9 @@ const de_CreateDevEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5463,12 +5262,12 @@ export const de_CreateJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateJobResponse(data, context); + contents = _json(data); const response: CreateJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5507,10 +5306,9 @@ const de_CreateJobCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5528,12 +5326,12 @@ export const de_CreateMLTransformCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMLTransformResponse(data, context); + contents = _json(data); const response: CreateMLTransformCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5572,10 +5370,9 @@ const de_CreateMLTransformCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5593,12 +5390,12 @@ export const de_CreatePartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePartitionResponse(data, context); + contents = _json(data); const response: CreatePartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5637,10 +5434,9 @@ const de_CreatePartitionCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5658,12 +5454,12 @@ export const de_CreatePartitionIndexCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePartitionIndexResponse(data, context); + contents = _json(data); const response: CreatePartitionIndexCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5702,10 +5498,9 @@ const de_CreatePartitionIndexCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5723,12 +5518,12 @@ export const de_CreateRegistryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRegistryResponse(data, context); + contents = _json(data); const response: CreateRegistryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5764,10 +5559,9 @@ const de_CreateRegistryCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5785,12 +5579,12 @@ export const de_CreateSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSchemaResponse(data, context); + contents = _json(data); const response: CreateSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5829,10 +5623,9 @@ const de_CreateSchemaCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5850,12 +5643,12 @@ export const de_CreateScriptCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateScriptResponse(data, context); + contents = _json(data); const response: CreateScriptCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5882,10 +5675,9 @@ const de_CreateScriptCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5908,7 +5700,7 @@ export const de_CreateSecurityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5941,10 +5733,9 @@ const de_CreateSecurityConfigurationCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5967,7 +5758,7 @@ export const de_CreateSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6009,10 +5800,9 @@ const de_CreateSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6030,12 +5820,12 @@ export const de_CreateTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTableResponse(data, context); + contents = _json(data); const response: CreateTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6080,10 +5870,9 @@ const de_CreateTableCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6101,12 +5890,12 @@ export const de_CreateTriggerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTriggerResponse(data, context); + contents = _json(data); const response: CreateTriggerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6148,10 +5937,9 @@ const de_CreateTriggerCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6169,12 +5957,12 @@ export const de_CreateUserDefinedFunctionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserDefinedFunctionResponse(data, context); + contents = _json(data); const response: CreateUserDefinedFunctionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6213,10 +6001,9 @@ const de_CreateUserDefinedFunctionCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6234,12 +6021,12 @@ export const de_CreateWorkflowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkflowResponse(data, context); + contents = _json(data); const response: CreateWorkflowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6275,10 +6062,9 @@ const de_CreateWorkflowCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6296,12 +6082,12 @@ export const de_DeleteBlueprintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBlueprintResponse(data, context); + contents = _json(data); const response: DeleteBlueprintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6328,10 +6114,9 @@ const de_DeleteBlueprintCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6349,12 +6134,12 @@ export const de_DeleteClassifierCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteClassifierResponse(data, context); + contents = _json(data); const response: DeleteClassifierCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6378,10 +6163,9 @@ const de_DeleteClassifierCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6399,12 +6183,12 @@ export const de_DeleteColumnStatisticsForPartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteColumnStatisticsForPartitionResponse(data, context); + contents = _json(data); const response: DeleteColumnStatisticsForPartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6437,10 +6221,9 @@ const de_DeleteColumnStatisticsForPartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6458,12 +6241,12 @@ export const de_DeleteColumnStatisticsForTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteColumnStatisticsForTableResponse(data, context); + contents = _json(data); const response: DeleteColumnStatisticsForTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6496,10 +6279,9 @@ const de_DeleteColumnStatisticsForTableCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6517,12 +6299,12 @@ export const de_DeleteConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConnectionResponse(data, context); + contents = _json(data); const response: DeleteConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6546,10 +6328,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6567,12 +6348,12 @@ export const de_DeleteCrawlerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCrawlerResponse(data, context); + contents = _json(data); const response: DeleteCrawlerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6602,10 +6383,9 @@ const de_DeleteCrawlerCommandError = async ( throw await de_SchedulerTransitioningExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6623,12 +6403,12 @@ export const de_DeleteCustomEntityTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCustomEntityTypeResponse(data, context); + contents = _json(data); const response: DeleteCustomEntityTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6661,10 +6441,9 @@ const de_DeleteCustomEntityTypeCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6682,12 +6461,12 @@ export const de_DeleteDatabaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDatabaseResponse(data, context); + contents = _json(data); const response: DeleteDatabaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6720,10 +6499,9 @@ const de_DeleteDatabaseCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6741,12 +6519,12 @@ export const de_DeleteDataQualityRulesetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDataQualityRulesetResponse(data, context); + contents = _json(data); const response: DeleteDataQualityRulesetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6776,10 +6554,9 @@ const de_DeleteDataQualityRulesetCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6797,12 +6574,12 @@ export const de_DeleteDevEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDevEndpointResponse(data, context); + contents = _json(data); const response: DeleteDevEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6832,10 +6609,9 @@ const de_DeleteDevEndpointCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6853,12 +6629,12 @@ export const de_DeleteJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteJobResponse(data, context); + contents = _json(data); const response: DeleteJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6885,10 +6661,9 @@ const de_DeleteJobCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6906,12 +6681,12 @@ export const de_DeleteMLTransformCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMLTransformResponse(data, context); + contents = _json(data); const response: DeleteMLTransformCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6941,10 +6716,9 @@ const de_DeleteMLTransformCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6962,12 +6736,12 @@ export const de_DeletePartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePartitionResponse(data, context); + contents = _json(data); const response: DeletePartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6997,10 +6771,9 @@ const de_DeletePartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7018,12 +6791,12 @@ export const de_DeletePartitionIndexCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePartitionIndexResponse(data, context); + contents = _json(data); const response: DeletePartitionIndexCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7059,10 +6832,9 @@ const de_DeletePartitionIndexCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7080,12 +6852,12 @@ export const de_DeleteRegistryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegistryResponse(data, context); + contents = _json(data); const response: DeleteRegistryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7115,10 +6887,9 @@ const de_DeleteRegistryCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7136,12 +6907,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7174,10 +6945,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7195,12 +6965,12 @@ export const de_DeleteSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSchemaResponse(data, context); + contents = _json(data); const response: DeleteSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7230,10 +7000,9 @@ const de_DeleteSchemaCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7251,12 +7020,12 @@ export const de_DeleteSchemaVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSchemaVersionsResponse(data, context); + contents = _json(data); const response: DeleteSchemaVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7286,10 +7055,9 @@ const de_DeleteSchemaVersionsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7307,12 +7075,12 @@ export const de_DeleteSecurityConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSecurityConfigurationResponse(data, context); + contents = _json(data); const response: DeleteSecurityConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7342,10 +7110,9 @@ const de_DeleteSecurityConfigurationCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7363,12 +7130,12 @@ export const de_DeleteSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSessionResponse(data, context); + contents = _json(data); const response: DeleteSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7404,10 +7171,9 @@ const de_DeleteSessionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7425,12 +7191,12 @@ export const de_DeleteTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTableResponse(data, context); + contents = _json(data); const response: DeleteTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7466,10 +7232,9 @@ const de_DeleteTableCommandError = async ( throw await de_ResourceNotReadyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7487,12 +7252,12 @@ export const de_DeleteTableVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTableVersionResponse(data, context); + contents = _json(data); const response: DeleteTableVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7522,10 +7287,9 @@ const de_DeleteTableVersionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7543,12 +7307,12 @@ export const de_DeleteTriggerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTriggerResponse(data, context); + contents = _json(data); const response: DeleteTriggerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7578,10 +7342,9 @@ const de_DeleteTriggerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7599,12 +7362,12 @@ export const de_DeleteUserDefinedFunctionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserDefinedFunctionResponse(data, context); + contents = _json(data); const response: DeleteUserDefinedFunctionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7634,10 +7397,9 @@ const de_DeleteUserDefinedFunctionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7655,12 +7417,12 @@ export const de_DeleteWorkflowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkflowResponse(data, context); + contents = _json(data); const response: DeleteWorkflowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7690,10 +7452,9 @@ const de_DeleteWorkflowCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7716,7 +7477,7 @@ export const de_GetBlueprintCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7746,10 +7507,9 @@ const de_GetBlueprintCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7772,7 +7532,7 @@ export const de_GetBlueprintRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7799,10 +7559,9 @@ const de_GetBlueprintRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7825,7 +7584,7 @@ export const de_GetBlueprintRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7855,10 +7614,9 @@ const de_GetBlueprintRunsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7881,7 +7639,7 @@ export const de_GetCatalogImportStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7905,10 +7663,9 @@ const de_GetCatalogImportStatusCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7931,7 +7688,7 @@ export const de_GetClassifierCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7955,10 +7712,9 @@ const de_GetClassifierCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7981,7 +7737,7 @@ export const de_GetClassifiersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8002,10 +7758,9 @@ const de_GetClassifiersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8028,7 +7783,7 @@ export const de_GetColumnStatisticsForPartitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8061,10 +7816,9 @@ const de_GetColumnStatisticsForPartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8087,7 +7841,7 @@ export const de_GetColumnStatisticsForTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8120,10 +7874,9 @@ const de_GetColumnStatisticsForTableCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8146,7 +7899,7 @@ export const de_GetConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8176,10 +7929,9 @@ const de_GetConnectionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8202,7 +7954,7 @@ export const de_GetConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8232,10 +7984,9 @@ const de_GetConnectionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8258,7 +8009,7 @@ export const de_GetCrawlerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8282,10 +8033,9 @@ const de_GetCrawlerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8308,7 +8058,7 @@ export const de_GetCrawlerMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8329,10 +8079,9 @@ const de_GetCrawlerMetricsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8355,7 +8104,7 @@ export const de_GetCrawlersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8376,10 +8125,9 @@ const de_GetCrawlersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8397,12 +8145,12 @@ export const de_GetCustomEntityTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCustomEntityTypeResponse(data, context); + contents = _json(data); const response: GetCustomEntityTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8435,10 +8183,9 @@ const de_GetCustomEntityTypeCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8461,7 +8208,7 @@ export const de_GetDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8497,10 +8244,9 @@ const de_GetDatabaseCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8523,7 +8269,7 @@ export const de_GetDatabasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8553,10 +8299,9 @@ const de_GetDatabasesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8574,12 +8319,12 @@ export const de_GetDataCatalogEncryptionSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDataCatalogEncryptionSettingsResponse(data, context); + contents = _json(data); const response: GetDataCatalogEncryptionSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8606,10 +8351,9 @@ const de_GetDataCatalogEncryptionSettingsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8627,12 +8371,12 @@ export const de_GetDataflowGraphCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDataflowGraphResponse(data, context); + contents = _json(data); const response: GetDataflowGraphCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8659,10 +8403,9 @@ const de_GetDataflowGraphCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8685,7 +8428,7 @@ export const de_GetDataQualityResultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8715,10 +8458,9 @@ const de_GetDataQualityResultCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8741,7 +8483,7 @@ export const de_GetDataQualityRuleRecommendationRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8771,10 +8513,9 @@ const de_GetDataQualityRuleRecommendationRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8797,7 +8538,7 @@ export const de_GetDataQualityRulesetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8827,10 +8568,9 @@ const de_GetDataQualityRulesetCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8853,7 +8593,7 @@ export const de_GetDataQualityRulesetEvaluationRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8883,10 +8623,9 @@ const de_GetDataQualityRulesetEvaluationRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8909,7 +8648,7 @@ export const de_GetDevEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8939,10 +8678,9 @@ const de_GetDevEndpointCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8965,7 +8703,7 @@ export const de_GetDevEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8995,10 +8733,9 @@ const de_GetDevEndpointsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9021,7 +8758,7 @@ export const de_GetJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9048,10 +8785,9 @@ const de_GetJobCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9069,12 +8805,12 @@ export const de_GetJobBookmarkCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetJobBookmarkResponse(data, context); + contents = _json(data); const response: GetJobBookmarkCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9107,10 +8843,9 @@ const de_GetJobBookmarkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9133,7 +8868,7 @@ export const de_GetJobRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9163,10 +8898,9 @@ const de_GetJobRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9189,7 +8923,7 @@ export const de_GetJobRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9219,10 +8953,9 @@ const de_GetJobRunsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9245,7 +8978,7 @@ export const de_GetJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9275,10 +9008,9 @@ const de_GetJobsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9296,12 +9028,12 @@ export const de_GetMappingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMappingResponse(data, context); + contents = _json(data); const response: GetMappingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9331,10 +9063,9 @@ const de_GetMappingCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9357,7 +9088,7 @@ export const de_GetMLTaskRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9387,10 +9118,9 @@ const de_GetMLTaskRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9413,7 +9143,7 @@ export const de_GetMLTaskRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9443,10 +9173,9 @@ const de_GetMLTaskRunsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9469,7 +9198,7 @@ export const de_GetMLTransformCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9499,10 +9228,9 @@ const de_GetMLTransformCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9525,7 +9253,7 @@ export const de_GetMLTransformsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9555,10 +9283,9 @@ const de_GetMLTransformsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9581,7 +9308,7 @@ export const de_GetPartitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9620,10 +9347,9 @@ const de_GetPartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9641,12 +9367,12 @@ export const de_GetPartitionIndexesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPartitionIndexesResponse(data, context); + contents = _json(data); const response: GetPartitionIndexesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9679,10 +9405,9 @@ const de_GetPartitionIndexesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9705,7 +9430,7 @@ export const de_GetPartitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9750,10 +9475,9 @@ const de_GetPartitionsCommandError = async ( throw await de_ResourceNotReadyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9771,12 +9495,12 @@ export const de_GetPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPlanResponse(data, context); + contents = _json(data); const response: GetPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9803,10 +9527,9 @@ const de_GetPlanCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9824,12 +9547,12 @@ export const de_GetRegistryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegistryResponse(data, context); + contents = _json(data); const response: GetRegistryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9859,10 +9582,9 @@ const de_GetRegistryCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9885,7 +9607,7 @@ export const de_GetResourcePoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9915,10 +9637,9 @@ const de_GetResourcePoliciesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9941,7 +9662,7 @@ export const de_GetResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9971,10 +9692,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9992,12 +9712,12 @@ export const de_GetSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSchemaResponse(data, context); + contents = _json(data); const response: GetSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10027,10 +9747,9 @@ const de_GetSchemaCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10048,12 +9767,12 @@ export const de_GetSchemaByDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSchemaByDefinitionResponse(data, context); + contents = _json(data); const response: GetSchemaByDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10083,10 +9802,9 @@ const de_GetSchemaByDefinitionCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10104,12 +9822,12 @@ export const de_GetSchemaVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSchemaVersionResponse(data, context); + contents = _json(data); const response: GetSchemaVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10139,10 +9857,9 @@ const de_GetSchemaVersionCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10160,12 +9877,12 @@ export const de_GetSchemaVersionsDiffCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSchemaVersionsDiffResponse(data, context); + contents = _json(data); const response: GetSchemaVersionsDiffCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10195,10 +9912,9 @@ const de_GetSchemaVersionsDiffCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10221,7 +9937,7 @@ export const de_GetSecurityConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10251,10 +9967,9 @@ const de_GetSecurityConfigurationCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10277,7 +9992,7 @@ export const de_GetSecurityConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10307,10 +10022,9 @@ const de_GetSecurityConfigurationsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10333,7 +10047,7 @@ export const de_GetSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10366,10 +10080,9 @@ const de_GetSessionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10392,7 +10105,7 @@ export const de_GetStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10428,10 +10141,9 @@ const de_GetStatementCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10454,7 +10166,7 @@ export const de_GetTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10496,10 +10208,9 @@ const de_GetTableCommandError = async ( throw await de_ResourceNotReadyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10522,7 +10233,7 @@ export const de_GetTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10561,10 +10272,9 @@ const de_GetTablesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10587,7 +10297,7 @@ export const de_GetTableVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10620,10 +10330,9 @@ const de_GetTableVersionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10646,7 +10355,7 @@ export const de_GetTableVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10679,10 +10388,9 @@ const de_GetTableVersionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10700,12 +10408,12 @@ export const de_GetTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTagsResponse(data, context); + contents = _json(data); const response: GetTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10735,10 +10443,9 @@ const de_GetTagsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10756,12 +10463,12 @@ export const de_GetTriggerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTriggerResponse(data, context); + contents = _json(data); const response: GetTriggerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10791,10 +10498,9 @@ const de_GetTriggerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10812,12 +10518,12 @@ export const de_GetTriggersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTriggersResponse(data, context); + contents = _json(data); const response: GetTriggersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10847,10 +10553,9 @@ const de_GetTriggersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10873,7 +10578,7 @@ export const de_GetUnfilteredPartitionMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10915,10 +10620,9 @@ const de_GetUnfilteredPartitionMetadataCommandError = async ( throw await de_PermissionTypeMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10941,7 +10645,7 @@ export const de_GetUnfilteredPartitionsMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10983,10 +10687,9 @@ const de_GetUnfilteredPartitionsMetadataCommandError = async ( throw await de_PermissionTypeMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11009,7 +10712,7 @@ export const de_GetUnfilteredTableMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11051,10 +10754,9 @@ const de_GetUnfilteredTableMetadataCommandError = async ( throw await de_PermissionTypeMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11077,7 +10779,7 @@ export const de_GetUserDefinedFunctionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11110,10 +10812,9 @@ const de_GetUserDefinedFunctionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11136,7 +10837,7 @@ export const de_GetUserDefinedFunctionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11169,10 +10870,9 @@ const de_GetUserDefinedFunctionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11195,7 +10895,7 @@ export const de_GetWorkflowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11225,10 +10925,9 @@ const de_GetWorkflowCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11251,7 +10950,7 @@ export const de_GetWorkflowRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11281,10 +10980,9 @@ const de_GetWorkflowRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11302,12 +11000,12 @@ export const de_GetWorkflowRunPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetWorkflowRunPropertiesResponse(data, context); + contents = _json(data); const response: GetWorkflowRunPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11337,10 +11035,9 @@ const de_GetWorkflowRunPropertiesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11363,7 +11060,7 @@ export const de_GetWorkflowRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11393,10 +11090,9 @@ const de_GetWorkflowRunsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11414,12 +11110,12 @@ export const de_ImportCatalogToGlueCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportCatalogToGlueResponse(data, context); + contents = _json(data); const response: ImportCatalogToGlueCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11443,10 +11139,9 @@ const de_ImportCatalogToGlueCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11464,12 +11159,12 @@ export const de_ListBlueprintsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBlueprintsResponse(data, context); + contents = _json(data); const response: ListBlueprintsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11496,10 +11191,9 @@ const de_ListBlueprintsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11517,12 +11211,12 @@ export const de_ListCrawlersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCrawlersResponse(data, context); + contents = _json(data); const response: ListCrawlersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11543,10 +11237,9 @@ const de_ListCrawlersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11569,7 +11262,7 @@ export const de_ListCrawlsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11596,10 +11289,9 @@ const de_ListCrawlsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11617,12 +11309,12 @@ export const de_ListCustomEntityTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCustomEntityTypesResponse(data, context); + contents = _json(data); const response: ListCustomEntityTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11649,10 +11341,9 @@ const de_ListCustomEntityTypesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11675,7 +11366,7 @@ export const de_ListDataQualityResultsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11702,10 +11393,9 @@ const de_ListDataQualityResultsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11728,7 +11418,7 @@ export const de_ListDataQualityRuleRecommendationRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11755,10 +11445,9 @@ const de_ListDataQualityRuleRecommendationRunsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11781,7 +11470,7 @@ export const de_ListDataQualityRulesetEvaluationRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11808,10 +11497,9 @@ const de_ListDataQualityRulesetEvaluationRunsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11834,7 +11522,7 @@ export const de_ListDataQualityRulesetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11864,10 +11552,9 @@ const de_ListDataQualityRulesetsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11885,12 +11572,12 @@ export const de_ListDevEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDevEndpointsResponse(data, context); + contents = _json(data); const response: ListDevEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11920,10 +11607,9 @@ const de_ListDevEndpointsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11941,12 +11627,12 @@ export const de_ListJobsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListJobsResponse(data, context); + contents = _json(data); const response: ListJobsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11976,10 +11662,9 @@ const de_ListJobsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11997,12 +11682,12 @@ export const de_ListMLTransformsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListMLTransformsResponse(data, context); + contents = _json(data); const response: ListMLTransformsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12032,10 +11717,9 @@ const de_ListMLTransformsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12053,12 +11737,12 @@ export const de_ListRegistriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRegistriesResponse(data, context); + contents = _json(data); const response: ListRegistriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12085,10 +11769,9 @@ const de_ListRegistriesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12106,12 +11789,12 @@ export const de_ListSchemasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSchemasResponse(data, context); + contents = _json(data); const response: ListSchemasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12141,10 +11824,9 @@ const de_ListSchemasCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12162,12 +11844,12 @@ export const de_ListSchemaVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSchemaVersionsResponse(data, context); + contents = _json(data); const response: ListSchemaVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12197,10 +11879,9 @@ const de_ListSchemaVersionsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12223,7 +11904,7 @@ export const de_ListSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12253,10 +11934,9 @@ const de_ListSessionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12279,7 +11959,7 @@ export const de_ListStatementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12315,10 +11995,9 @@ const de_ListStatementsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12336,12 +12015,12 @@ export const de_ListTriggersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTriggersResponse(data, context); + contents = _json(data); const response: ListTriggersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12371,10 +12050,9 @@ const de_ListTriggersCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12392,12 +12070,12 @@ export const de_ListWorkflowsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListWorkflowsResponse(data, context); + contents = _json(data); const response: ListWorkflowsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12424,10 +12102,9 @@ const de_ListWorkflowsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12445,12 +12122,12 @@ export const de_PutDataCatalogEncryptionSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutDataCatalogEncryptionSettingsResponse(data, context); + contents = _json(data); const response: PutDataCatalogEncryptionSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12477,10 +12154,9 @@ const de_PutDataCatalogEncryptionSettingsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12498,12 +12174,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12536,10 +12212,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12557,12 +12232,12 @@ export const de_PutSchemaVersionMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutSchemaVersionMetadataResponse(data, context); + contents = _json(data); const response: PutSchemaVersionMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12595,10 +12270,9 @@ const de_PutSchemaVersionMetadataCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12616,12 +12290,12 @@ export const de_PutWorkflowRunPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutWorkflowRunPropertiesResponse(data, context); + contents = _json(data); const response: PutWorkflowRunPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12660,10 +12334,9 @@ const de_PutWorkflowRunPropertiesCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12681,12 +12354,12 @@ export const de_QuerySchemaVersionMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_QuerySchemaVersionMetadataResponse(data, context); + contents = _json(data); const response: QuerySchemaVersionMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12713,10 +12386,9 @@ const de_QuerySchemaVersionMetadataCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12734,12 +12406,12 @@ export const de_RegisterSchemaVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterSchemaVersionResponse(data, context); + contents = _json(data); const response: RegisterSchemaVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12775,10 +12447,9 @@ const de_RegisterSchemaVersionCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12796,12 +12467,12 @@ export const de_RemoveSchemaVersionMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveSchemaVersionMetadataResponse(data, context); + contents = _json(data); const response: RemoveSchemaVersionMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12828,10 +12499,9 @@ const de_RemoveSchemaVersionMetadataCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12849,12 +12519,12 @@ export const de_ResetJobBookmarkCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResetJobBookmarkResponse(data, context); + contents = _json(data); const response: ResetJobBookmarkCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12884,10 +12554,9 @@ const de_ResetJobBookmarkCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12905,12 +12574,12 @@ export const de_ResumeWorkflowRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResumeWorkflowRunResponse(data, context); + contents = _json(data); const response: ResumeWorkflowRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12946,10 +12615,9 @@ const de_ResumeWorkflowRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12967,12 +12635,12 @@ export const de_RunStatementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RunStatementResponse(data, context); + contents = _json(data); const response: RunStatementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13014,10 +12682,9 @@ const de_RunStatementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13040,7 +12707,7 @@ export const de_SearchTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13067,10 +12734,9 @@ const de_SearchTablesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13088,12 +12754,12 @@ export const de_StartBlueprintRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartBlueprintRunResponse(data, context); + contents = _json(data); const response: StartBlueprintRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13129,10 +12795,9 @@ const de_StartBlueprintRunCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13150,12 +12815,12 @@ export const de_StartCrawlerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartCrawlerResponse(data, context); + contents = _json(data); const response: StartCrawlerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13182,10 +12847,9 @@ const de_StartCrawlerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13203,12 +12867,12 @@ export const de_StartCrawlerScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartCrawlerScheduleResponse(data, context); + contents = _json(data); const response: StartCrawlerScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13241,10 +12905,9 @@ const de_StartCrawlerScheduleCommandError = async ( throw await de_SchedulerTransitioningExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13262,12 +12925,12 @@ export const de_StartDataQualityRuleRecommendationRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDataQualityRuleRecommendationRunResponse(data, context); + contents = _json(data); const response: StartDataQualityRuleRecommendationRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13297,10 +12960,9 @@ const de_StartDataQualityRuleRecommendationRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13318,12 +12980,12 @@ export const de_StartDataQualityRulesetEvaluationRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDataQualityRulesetEvaluationRunResponse(data, context); + contents = _json(data); const response: StartDataQualityRulesetEvaluationRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13356,10 +13018,9 @@ const de_StartDataQualityRulesetEvaluationRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13377,12 +13038,12 @@ export const de_StartExportLabelsTaskRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartExportLabelsTaskRunResponse(data, context); + contents = _json(data); const response: StartExportLabelsTaskRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13412,10 +13073,9 @@ const de_StartExportLabelsTaskRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13433,12 +13093,12 @@ export const de_StartImportLabelsTaskRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartImportLabelsTaskRunResponse(data, context); + contents = _json(data); const response: StartImportLabelsTaskRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13471,10 +13131,9 @@ const de_StartImportLabelsTaskRunCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13492,12 +13151,12 @@ export const de_StartJobRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartJobRunResponse(data, context); + contents = _json(data); const response: StartJobRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13533,10 +13192,9 @@ const de_StartJobRunCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13554,12 +13212,12 @@ export const de_StartMLEvaluationTaskRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartMLEvaluationTaskRunResponse(data, context); + contents = _json(data); const response: StartMLEvaluationTaskRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13595,10 +13253,9 @@ const de_StartMLEvaluationTaskRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13616,12 +13273,12 @@ export const de_StartMLLabelingSetGenerationTaskRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartMLLabelingSetGenerationTaskRunResponse(data, context); + contents = _json(data); const response: StartMLLabelingSetGenerationTaskRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13654,10 +13311,9 @@ const de_StartMLLabelingSetGenerationTaskRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13675,12 +13331,12 @@ export const de_StartTriggerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartTriggerResponse(data, context); + contents = _json(data); const response: StartTriggerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13716,10 +13372,9 @@ const de_StartTriggerCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13737,12 +13392,12 @@ export const de_StartWorkflowRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartWorkflowRunResponse(data, context); + contents = _json(data); const response: StartWorkflowRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13778,10 +13433,9 @@ const de_StartWorkflowRunCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13799,12 +13453,12 @@ export const de_StopCrawlerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopCrawlerResponse(data, context); + contents = _json(data); const response: StopCrawlerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13834,10 +13488,9 @@ const de_StopCrawlerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13855,12 +13508,12 @@ export const de_StopCrawlerScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopCrawlerScheduleResponse(data, context); + contents = _json(data); const response: StopCrawlerScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13890,10 +13543,9 @@ const de_StopCrawlerScheduleCommandError = async ( throw await de_SchedulerTransitioningExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13911,12 +13563,12 @@ export const de_StopSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopSessionResponse(data, context); + contents = _json(data); const response: StopSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13952,10 +13604,9 @@ const de_StopSessionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13973,12 +13624,12 @@ export const de_StopTriggerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopTriggerResponse(data, context); + contents = _json(data); const response: StopTriggerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14011,10 +13662,9 @@ const de_StopTriggerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14032,12 +13682,12 @@ export const de_StopWorkflowRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopWorkflowRunResponse(data, context); + contents = _json(data); const response: StopWorkflowRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14070,10 +13720,9 @@ const de_StopWorkflowRunCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14091,12 +13740,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14126,10 +13775,9 @@ const de_TagResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14147,12 +13795,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14182,10 +13830,9 @@ const de_UntagResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14203,12 +13850,12 @@ export const de_UpdateBlueprintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateBlueprintResponse(data, context); + contents = _json(data); const response: UpdateBlueprintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14244,10 +13891,9 @@ const de_UpdateBlueprintCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14265,12 +13911,12 @@ export const de_UpdateClassifierCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateClassifierResponse(data, context); + contents = _json(data); const response: UpdateClassifierCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14300,10 +13946,9 @@ const de_UpdateClassifierCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14326,7 +13971,7 @@ export const de_UpdateColumnStatisticsForPartitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14359,10 +14004,9 @@ const de_UpdateColumnStatisticsForPartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14385,7 +14029,7 @@ export const de_UpdateColumnStatisticsForTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14418,10 +14062,9 @@ const de_UpdateColumnStatisticsForTableCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14439,12 +14082,12 @@ export const de_UpdateConnectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConnectionResponse(data, context); + contents = _json(data); const response: UpdateConnectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14474,10 +14117,9 @@ const de_UpdateConnectionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14495,12 +14137,12 @@ export const de_UpdateCrawlerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCrawlerResponse(data, context); + contents = _json(data); const response: UpdateCrawlerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14533,10 +14175,9 @@ const de_UpdateCrawlerCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14554,12 +14195,12 @@ export const de_UpdateCrawlerScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCrawlerScheduleResponse(data, context); + contents = _json(data); const response: UpdateCrawlerScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14592,10 +14233,9 @@ const de_UpdateCrawlerScheduleCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14613,12 +14253,12 @@ export const de_UpdateDatabaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDatabaseResponse(data, context); + contents = _json(data); const response: UpdateDatabaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14654,10 +14294,9 @@ const de_UpdateDatabaseCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14675,12 +14314,12 @@ export const de_UpdateDataQualityRulesetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDataQualityRulesetResponse(data, context); + contents = _json(data); const response: UpdateDataQualityRulesetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14719,10 +14358,9 @@ const de_UpdateDataQualityRulesetCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14740,12 +14378,12 @@ export const de_UpdateDevEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDevEndpointResponse(data, context); + contents = _json(data); const response: UpdateDevEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14778,10 +14416,9 @@ const de_UpdateDevEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14799,12 +14436,12 @@ export const de_UpdateJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateJobResponse(data, context); + contents = _json(data); const response: UpdateJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14837,10 +14474,9 @@ const de_UpdateJobCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14858,12 +14494,12 @@ export const de_UpdateJobFromSourceControlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateJobFromSourceControlResponse(data, context); + contents = _json(data); const response: UpdateJobFromSourceControlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14902,10 +14538,9 @@ const de_UpdateJobFromSourceControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14923,12 +14558,12 @@ export const de_UpdateMLTransformCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMLTransformResponse(data, context); + contents = _json(data); const response: UpdateMLTransformCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14961,10 +14596,9 @@ const de_UpdateMLTransformCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14982,12 +14616,12 @@ export const de_UpdatePartitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePartitionResponse(data, context); + contents = _json(data); const response: UpdatePartitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15020,10 +14654,9 @@ const de_UpdatePartitionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15041,12 +14674,12 @@ export const de_UpdateRegistryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRegistryResponse(data, context); + contents = _json(data); const response: UpdateRegistryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15079,10 +14712,9 @@ const de_UpdateRegistryCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15100,12 +14732,12 @@ export const de_UpdateSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSchemaResponse(data, context); + contents = _json(data); const response: UpdateSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15138,10 +14770,9 @@ const de_UpdateSchemaCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15159,12 +14790,12 @@ export const de_UpdateSourceControlFromJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSourceControlFromJobResponse(data, context); + contents = _json(data); const response: UpdateSourceControlFromJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15203,10 +14834,9 @@ const de_UpdateSourceControlFromJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15224,12 +14854,12 @@ export const de_UpdateTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTableResponse(data, context); + contents = _json(data); const response: UpdateTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15271,10 +14901,9 @@ const de_UpdateTableCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15292,12 +14921,12 @@ export const de_UpdateTriggerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTriggerResponse(data, context); + contents = _json(data); const response: UpdateTriggerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15330,10 +14959,9 @@ const de_UpdateTriggerCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15351,12 +14979,12 @@ export const de_UpdateUserDefinedFunctionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserDefinedFunctionResponse(data, context); + contents = _json(data); const response: UpdateUserDefinedFunctionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15389,10 +15017,9 @@ const de_UpdateUserDefinedFunctionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15410,12 +15037,12 @@ export const de_UpdateWorkflowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWorkflowResponse(data, context); + contents = _json(data); const response: UpdateWorkflowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15448,10 +15075,9 @@ const de_UpdateWorkflowCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15465,7 +15091,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15481,7 +15107,7 @@ const de_AlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15497,7 +15123,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15513,7 +15139,7 @@ const de_ConcurrentRunsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentRunsExceededException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentRunsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15529,7 +15155,7 @@ const de_ConditionCheckFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConditionCheckFailureException(body, context); + const deserialized: any = _json(body); const exception = new ConditionCheckFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15542,7 +15168,7 @@ const de_ConditionCheckFailureExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15558,7 +15184,7 @@ const de_CrawlerNotRunningExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CrawlerNotRunningException(body, context); + const deserialized: any = _json(body); const exception = new CrawlerNotRunningException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15574,7 +15200,7 @@ const de_CrawlerRunningExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CrawlerRunningException(body, context); + const deserialized: any = _json(body); const exception = new CrawlerRunningException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15590,7 +15216,7 @@ const de_CrawlerStoppingExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CrawlerStoppingException(body, context); + const deserialized: any = _json(body); const exception = new CrawlerStoppingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15606,7 +15232,7 @@ const de_EntityNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntityNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EntityNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15622,7 +15248,7 @@ const de_FederatedResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FederatedResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new FederatedResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15638,7 +15264,7 @@ const de_FederationSourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FederationSourceException(body, context); + const deserialized: any = _json(body); const exception = new FederationSourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15654,7 +15280,7 @@ const de_FederationSourceRetryableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FederationSourceRetryableException(body, context); + const deserialized: any = _json(body); const exception = new FederationSourceRetryableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15670,7 +15296,7 @@ const de_GlueEncryptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_GlueEncryptionException(body, context); + const deserialized: any = _json(body); const exception = new GlueEncryptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15686,7 +15312,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15702,7 +15328,7 @@ const de_IllegalBlueprintStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IllegalBlueprintStateException(body, context); + const deserialized: any = _json(body); const exception = new IllegalBlueprintStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15718,7 +15344,7 @@ const de_IllegalSessionStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IllegalSessionStateException(body, context); + const deserialized: any = _json(body); const exception = new IllegalSessionStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15734,7 +15360,7 @@ const de_IllegalWorkflowStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IllegalWorkflowStateException(body, context); + const deserialized: any = _json(body); const exception = new IllegalWorkflowStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15750,7 +15376,7 @@ const de_InternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15766,7 +15392,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15782,7 +15408,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15798,7 +15424,7 @@ const de_MLTransformNotReadyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MLTransformNotReadyException(body, context); + const deserialized: any = _json(body); const exception = new MLTransformNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15811,7 +15437,7 @@ const de_MLTransformNotReadyExceptionRes = async ( */ const de_NoScheduleExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoScheduleException(body, context); + const deserialized: any = _json(body); const exception = new NoScheduleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15827,7 +15453,7 @@ const de_OperationTimeoutExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationTimeoutException(body, context); + const deserialized: any = _json(body); const exception = new OperationTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15843,7 +15469,7 @@ const de_PermissionTypeMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PermissionTypeMismatchException(body, context); + const deserialized: any = _json(body); const exception = new PermissionTypeMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15859,7 +15485,7 @@ const de_ResourceNotReadyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotReadyException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15875,7 +15501,7 @@ const de_ResourceNumberLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNumberLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNumberLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15891,7 +15517,7 @@ const de_SchedulerNotRunningExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SchedulerNotRunningException(body, context); + const deserialized: any = _json(body); const exception = new SchedulerNotRunningException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15907,7 +15533,7 @@ const de_SchedulerRunningExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SchedulerRunningException(body, context); + const deserialized: any = _json(body); const exception = new SchedulerRunningException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15923,7 +15549,7 @@ const de_SchedulerTransitioningExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SchedulerTransitioningException(body, context); + const deserialized: any = _json(body); const exception = new SchedulerTransitioningException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15936,7 +15562,7 @@ const de_SchedulerTransitioningExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15952,7 +15578,7 @@ const de_VersionMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_VersionMismatchException(body, context); + const deserialized: any = _json(body); const exception = new VersionMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -15960,405 +15586,111 @@ const de_VersionMismatchExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1Action - */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.Arguments != null && { Arguments: se_GenericMap(input.Arguments, context) }), - ...(input.CrawlerName != null && { CrawlerName: input.CrawlerName }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.NotificationProperty != null && { - NotificationProperty: se_NotificationProperty(input.NotificationProperty, context), - }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }; -}; +// se_Action omitted. -/** - * serializeAws_json1_1ActionList - */ -const se_ActionList = (input: Action[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Action(entry, context); - }); -}; +// se_ActionList omitted. -/** - * serializeAws_json1_1AdditionalOptions - */ -const se_AdditionalOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AdditionalOptions omitted. -/** - * serializeAws_json1_1AdditionalPlanOptionsMap - */ -const se_AdditionalPlanOptionsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AdditionalPlanOptionsMap omitted. -/** - * serializeAws_json1_1Aggregate - */ -const se_Aggregate = (input: Aggregate, context: __SerdeContext): any => { - return { - ...(input.Aggs != null && { Aggs: se_AggregateOperations(input.Aggs, context) }), - ...(input.Groups != null && { Groups: se_GlueStudioPathList(input.Groups, context) }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_Aggregate omitted. -/** - * serializeAws_json1_1AggregateOperation - */ -const se_AggregateOperation = (input: AggregateOperation, context: __SerdeContext): any => { - return { - ...(input.AggFunc != null && { AggFunc: input.AggFunc }), - ...(input.Column != null && { Column: se_EnclosedInStringProperties(input.Column, context) }), - }; -}; +// se_AggregateOperation omitted. -/** - * serializeAws_json1_1AggregateOperations - */ -const se_AggregateOperations = (input: AggregateOperation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AggregateOperation(entry, context); - }); -}; +// se_AggregateOperations omitted. /** * serializeAws_json1_1ApplyMapping */ const se_ApplyMapping = (input: ApplyMapping, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Mapping != null && { Mapping: se_Mappings(input.Mapping, context) }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + Inputs: _json, + Mapping: (_) => se_Mappings(_, context), + Name: [], + }); }; -/** - * serializeAws_json1_1AthenaConnectorSource - */ -const se_AthenaConnectorSource = (input: AthenaConnectorSource, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ConnectionTable != null && { ConnectionTable: input.ConnectionTable }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.ConnectorName != null && { ConnectorName: input.ConnectorName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.SchemaName != null && { SchemaName: input.SchemaName }), - }; -}; +// se_AthenaConnectorSource omitted. -/** - * serializeAws_json1_1AuditColumnNamesList - */ -const se_AuditColumnNamesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AuditColumnNamesList omitted. -/** - * serializeAws_json1_1AuditContext - */ -const se_AuditContext = (input: AuditContext, context: __SerdeContext): any => { - return { - ...(input.AdditionalAuditContext != null && { AdditionalAuditContext: input.AdditionalAuditContext }), - ...(input.AllColumnsRequested != null && { AllColumnsRequested: input.AllColumnsRequested }), - ...(input.RequestedColumns != null && { - RequestedColumns: se_AuditColumnNamesList(input.RequestedColumns, context), - }), - }; -}; +// se_AuditContext omitted. -/** - * serializeAws_json1_1BasicCatalogTarget - */ -const se_BasicCatalogTarget = (input: BasicCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; +// se_BasicCatalogTarget omitted. /** * serializeAws_json1_1BatchCreatePartitionRequest */ const se_BatchCreatePartitionRequest = (input: BatchCreatePartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionInputList != null && { - PartitionInputList: se_PartitionInputList(input.PartitionInputList, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + CatalogId: [], + DatabaseName: [], + PartitionInputList: (_) => se_PartitionInputList(_, context), + TableName: [], + }); }; -/** - * serializeAws_json1_1BatchDeleteConnectionRequest - */ -const se_BatchDeleteConnectionRequest = (input: BatchDeleteConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ConnectionNameList != null && { - ConnectionNameList: se_DeleteConnectionNameList(input.ConnectionNameList, context), - }), - }; -}; +// se_BatchDeleteConnectionRequest omitted. -/** - * serializeAws_json1_1BatchDeletePartitionRequest - */ -const se_BatchDeletePartitionRequest = (input: BatchDeletePartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionsToDelete != null && { - PartitionsToDelete: se_BatchDeletePartitionValueList(input.PartitionsToDelete, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_BatchDeletePartitionRequest omitted. -/** - * serializeAws_json1_1BatchDeletePartitionValueList - */ -const se_BatchDeletePartitionValueList = (input: PartitionValueList[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PartitionValueList(entry, context); - }); -}; +// se_BatchDeletePartitionValueList omitted. -/** - * serializeAws_json1_1BatchDeleteTableNameList - */ -const se_BatchDeleteTableNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BatchDeleteTableNameList omitted. -/** - * serializeAws_json1_1BatchDeleteTableRequest - */ -const se_BatchDeleteTableRequest = (input: BatchDeleteTableRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TablesToDelete != null && { TablesToDelete: se_BatchDeleteTableNameList(input.TablesToDelete, context) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; -}; +// se_BatchDeleteTableRequest omitted. -/** - * serializeAws_json1_1BatchDeleteTableVersionList - */ -const se_BatchDeleteTableVersionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BatchDeleteTableVersionList omitted. -/** - * serializeAws_json1_1BatchDeleteTableVersionRequest - */ -const se_BatchDeleteTableVersionRequest = (input: BatchDeleteTableVersionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VersionIds != null && { VersionIds: se_BatchDeleteTableVersionList(input.VersionIds, context) }), - }; -}; +// se_BatchDeleteTableVersionRequest omitted. -/** - * serializeAws_json1_1BatchGetBlueprintNames - */ -const se_BatchGetBlueprintNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BatchGetBlueprintNames omitted. -/** - * serializeAws_json1_1BatchGetBlueprintsRequest - */ -const se_BatchGetBlueprintsRequest = (input: BatchGetBlueprintsRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeBlueprint != null && { IncludeBlueprint: input.IncludeBlueprint }), - ...(input.IncludeParameterSpec != null && { IncludeParameterSpec: input.IncludeParameterSpec }), - ...(input.Names != null && { Names: se_BatchGetBlueprintNames(input.Names, context) }), - }; -}; +// se_BatchGetBlueprintsRequest omitted. -/** - * serializeAws_json1_1BatchGetCrawlersRequest - */ -const se_BatchGetCrawlersRequest = (input: BatchGetCrawlersRequest, context: __SerdeContext): any => { - return { - ...(input.CrawlerNames != null && { CrawlerNames: se_CrawlerNameList(input.CrawlerNames, context) }), - }; -}; +// se_BatchGetCrawlersRequest omitted. -/** - * serializeAws_json1_1BatchGetCustomEntityTypesRequest - */ -const se_BatchGetCustomEntityTypesRequest = (input: BatchGetCustomEntityTypesRequest, context: __SerdeContext): any => { - return { - ...(input.Names != null && { Names: se_CustomEntityTypeNames(input.Names, context) }), - }; -}; +// se_BatchGetCustomEntityTypesRequest omitted. -/** - * serializeAws_json1_1BatchGetDataQualityResultRequest - */ -const se_BatchGetDataQualityResultRequest = (input: BatchGetDataQualityResultRequest, context: __SerdeContext): any => { - return { - ...(input.ResultIds != null && { ResultIds: se_DataQualityResultIds(input.ResultIds, context) }), - }; -}; +// se_BatchGetDataQualityResultRequest omitted. -/** - * serializeAws_json1_1BatchGetDevEndpointsRequest - */ -const se_BatchGetDevEndpointsRequest = (input: BatchGetDevEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.DevEndpointNames != null && { DevEndpointNames: se_DevEndpointNames(input.DevEndpointNames, context) }), - }; -}; +// se_BatchGetDevEndpointsRequest omitted. -/** - * serializeAws_json1_1BatchGetJobsRequest - */ -const se_BatchGetJobsRequest = (input: BatchGetJobsRequest, context: __SerdeContext): any => { - return { - ...(input.JobNames != null && { JobNames: se_JobNameList(input.JobNames, context) }), - }; -}; +// se_BatchGetJobsRequest omitted. -/** - * serializeAws_json1_1BatchGetPartitionRequest - */ -const se_BatchGetPartitionRequest = (input: BatchGetPartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionsToGet != null && { - PartitionsToGet: se_BatchGetPartitionValueList(input.PartitionsToGet, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_BatchGetPartitionRequest omitted. -/** - * serializeAws_json1_1BatchGetPartitionValueList - */ -const se_BatchGetPartitionValueList = (input: PartitionValueList[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PartitionValueList(entry, context); - }); -}; +// se_BatchGetPartitionValueList omitted. -/** - * serializeAws_json1_1BatchGetTriggersRequest - */ -const se_BatchGetTriggersRequest = (input: BatchGetTriggersRequest, context: __SerdeContext): any => { - return { - ...(input.TriggerNames != null && { TriggerNames: se_TriggerNameList(input.TriggerNames, context) }), - }; -}; +// se_BatchGetTriggersRequest omitted. -/** - * serializeAws_json1_1BatchGetWorkflowsRequest - */ -const se_BatchGetWorkflowsRequest = (input: BatchGetWorkflowsRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeGraph != null && { IncludeGraph: input.IncludeGraph }), - ...(input.Names != null && { Names: se_WorkflowNames(input.Names, context) }), - }; -}; +// se_BatchGetWorkflowsRequest omitted. -/** - * serializeAws_json1_1BatchStopJobRunJobRunIdList - */ -const se_BatchStopJobRunJobRunIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BatchStopJobRunJobRunIdList omitted. -/** - * serializeAws_json1_1BatchStopJobRunRequest - */ -const se_BatchStopJobRunRequest = (input: BatchStopJobRunRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobRunIds != null && { JobRunIds: se_BatchStopJobRunJobRunIdList(input.JobRunIds, context) }), - }; -}; +// se_BatchStopJobRunRequest omitted. /** * serializeAws_json1_1BatchUpdatePartitionRequest */ const se_BatchUpdatePartitionRequest = (input: BatchUpdatePartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Entries != null && { Entries: se_BatchUpdatePartitionRequestEntryList(input.Entries, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; + return take(input, { + CatalogId: [], + DatabaseName: [], + Entries: (_) => se_BatchUpdatePartitionRequestEntryList(_, context), + TableName: [], + }); }; /** * serializeAws_json1_1BatchUpdatePartitionRequestEntry */ const se_BatchUpdatePartitionRequestEntry = (input: BatchUpdatePartitionRequestEntry, context: __SerdeContext): any => { - return { - ...(input.PartitionInput != null && { PartitionInput: se_PartitionInput(input.PartitionInput, context) }), - ...(input.PartitionValueList != null && { - PartitionValueList: se_BoundedPartitionValueList(input.PartitionValueList, context), - }), - }; + return take(input, { + PartitionInput: (_) => se_PartitionInput(_, context), + PartitionValueList: _json, + }); }; /** @@ -16379,13108 +15711,4479 @@ const se_BatchUpdatePartitionRequestEntryList = ( * serializeAws_json1_1BinaryColumnStatisticsData */ const se_BinaryColumnStatisticsData = (input: BinaryColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.AverageLength != null && { AverageLength: __serializeFloat(input.AverageLength) }), - ...(input.MaximumLength != null && { MaximumLength: input.MaximumLength }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - }; + return take(input, { + AverageLength: __serializeFloat, + MaximumLength: [], + NumberOfNulls: [], + }); }; -/** - * serializeAws_json1_1BooleanColumnStatisticsData - */ -const se_BooleanColumnStatisticsData = (input: BooleanColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.NumberOfFalses != null && { NumberOfFalses: input.NumberOfFalses }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - ...(input.NumberOfTrues != null && { NumberOfTrues: input.NumberOfTrues }), - }; -}; +// se_BooleanColumnStatisticsData omitted. -/** - * serializeAws_json1_1BoundedPartitionValueList - */ -const se_BoundedPartitionValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BoundedPartitionValueList omitted. + +// se_CancelDataQualityRuleRecommendationRunRequest omitted. + +// se_CancelDataQualityRulesetEvaluationRunRequest omitted. + +// se_CancelMLTaskRunRequest omitted. + +// se_CancelStatementRequest omitted. + +// se_CatalogDeltaSource omitted. + +// se_CatalogEntries omitted. + +// se_CatalogEntry omitted. + +// se_CatalogHudiSource omitted. + +// se_CatalogKafkaSource omitted. + +// se_CatalogKinesisSource omitted. + +// se_CatalogSchemaChangePolicy omitted. + +// se_CatalogSource omitted. + +// se_CatalogTablesList omitted. + +// se_CatalogTarget omitted. + +// se_CatalogTargetList omitted. + +// se_CheckSchemaVersionValidityInput omitted. + +// se_ClassifierNameList omitted. + +// se_CloudWatchEncryption omitted. /** - * serializeAws_json1_1CancelDataQualityRuleRecommendationRunRequest + * serializeAws_json1_1CodeGenConfigurationNode */ -const se_CancelDataQualityRuleRecommendationRunRequest = ( - input: CancelDataQualityRuleRecommendationRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.RunId != null && { RunId: input.RunId }), - }; +const se_CodeGenConfigurationNode = (input: CodeGenConfigurationNode, context: __SerdeContext): any => { + return take(input, { + Aggregate: _json, + ApplyMapping: (_) => se_ApplyMapping(_, context), + AthenaConnectorSource: _json, + CatalogDeltaSource: _json, + CatalogHudiSource: _json, + CatalogKafkaSource: _json, + CatalogKinesisSource: _json, + CatalogSource: _json, + CatalogTarget: _json, + CustomCode: _json, + DirectJDBCSource: _json, + DirectKafkaSource: _json, + DirectKinesisSource: _json, + DropDuplicates: _json, + DropFields: _json, + DropNullFields: _json, + DynamicTransform: _json, + DynamoDBCatalogSource: _json, + EvaluateDataQuality: _json, + FillMissingValues: _json, + Filter: _json, + GovernedCatalogSource: _json, + GovernedCatalogTarget: _json, + JDBCConnectorSource: _json, + JDBCConnectorTarget: _json, + Join: _json, + Merge: _json, + MicrosoftSQLServerCatalogSource: _json, + MicrosoftSQLServerCatalogTarget: _json, + MySQLCatalogSource: _json, + MySQLCatalogTarget: _json, + OracleSQLCatalogSource: _json, + OracleSQLCatalogTarget: _json, + PIIDetection: (_) => se_PIIDetection(_, context), + PostgreSQLCatalogSource: _json, + PostgreSQLCatalogTarget: _json, + RedshiftSource: _json, + RedshiftTarget: _json, + RelationalCatalogSource: _json, + RenameField: _json, + S3CatalogDeltaSource: _json, + S3CatalogHudiSource: _json, + S3CatalogSource: _json, + S3CatalogTarget: _json, + S3CsvSource: _json, + S3DeltaCatalogTarget: _json, + S3DeltaDirectTarget: _json, + S3DeltaSource: _json, + S3DirectTarget: _json, + S3GlueParquetTarget: _json, + S3HudiCatalogTarget: _json, + S3HudiDirectTarget: _json, + S3HudiSource: _json, + S3JsonSource: _json, + S3ParquetSource: _json, + SelectFields: _json, + SelectFromCollection: _json, + SparkConnectorSource: _json, + SparkConnectorTarget: _json, + SparkSQL: _json, + Spigot: (_) => se_Spigot(_, context), + SplitFields: _json, + Union: _json, + }); }; /** - * serializeAws_json1_1CancelDataQualityRulesetEvaluationRunRequest + * serializeAws_json1_1CodeGenConfigurationNodes */ -const se_CancelDataQualityRulesetEvaluationRunRequest = ( - input: CancelDataQualityRulesetEvaluationRunRequest, +const se_CodeGenConfigurationNodes = ( + input: Record, context: __SerdeContext ): any => { - return { - ...(input.RunId != null && { RunId: input.RunId }), - }; + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_CodeGenConfigurationNode(value, context); + return acc; + }, {}); }; +// se_CodeGenEdge omitted. + +// se_CodeGenNode omitted. + +// se_CodeGenNodeArg omitted. + +// se_CodeGenNodeArgs omitted. + +// se_Column omitted. + +// se_ColumnList omitted. + /** - * serializeAws_json1_1CancelMLTaskRunRequest + * serializeAws_json1_1ColumnStatistics */ -const se_CancelMLTaskRunRequest = (input: CancelMLTaskRunRequest, context: __SerdeContext): any => { - return { - ...(input.TaskRunId != null && { TaskRunId: input.TaskRunId }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; +const se_ColumnStatistics = (input: ColumnStatistics, context: __SerdeContext): any => { + return take(input, { + AnalyzedTime: (_) => Math.round(_.getTime() / 1000), + ColumnName: [], + ColumnType: [], + StatisticsData: (_) => se_ColumnStatisticsData(_, context), + }); }; /** - * serializeAws_json1_1CancelStatementRequest + * serializeAws_json1_1ColumnStatisticsData */ -const se_CancelStatementRequest = (input: CancelStatementRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; +const se_ColumnStatisticsData = (input: ColumnStatisticsData, context: __SerdeContext): any => { + return take(input, { + BinaryColumnStatisticsData: (_) => se_BinaryColumnStatisticsData(_, context), + BooleanColumnStatisticsData: _json, + DateColumnStatisticsData: (_) => se_DateColumnStatisticsData(_, context), + DecimalColumnStatisticsData: (_) => se_DecimalColumnStatisticsData(_, context), + DoubleColumnStatisticsData: (_) => se_DoubleColumnStatisticsData(_, context), + LongColumnStatisticsData: _json, + StringColumnStatisticsData: (_) => se_StringColumnStatisticsData(_, context), + Type: [], + }); }; -/** - * serializeAws_json1_1CatalogDeltaSource - */ -const se_CatalogDeltaSource = (input: CatalogDeltaSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalDeltaOptions != null && { - AdditionalDeltaOptions: se_AdditionalOptions(input.AdditionalDeltaOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Table != null && { Table: input.Table }), - }; -}; +// se_ColumnValueStringList omitted. -/** - * serializeAws_json1_1CatalogEntries - */ -const se_CatalogEntries = (input: CatalogEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CatalogEntry(entry, context); - }); -}; +// se_Condition omitted. -/** - * serializeAws_json1_1CatalogEntry - */ -const se_CatalogEntry = (input: CatalogEntry, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_ConditionList omitted. -/** - * serializeAws_json1_1CatalogHudiSource - */ -const se_CatalogHudiSource = (input: CatalogHudiSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalHudiOptions != null && { - AdditionalHudiOptions: se_AdditionalOptions(input.AdditionalHudiOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Table != null && { Table: input.Table }), - }; -}; +// se_ConnectionInput omitted. -/** - * serializeAws_json1_1CatalogKafkaSource - */ -const se_CatalogKafkaSource = (input: CatalogKafkaSource, context: __SerdeContext): any => { - return { - ...(input.DataPreviewOptions != null && { - DataPreviewOptions: se_StreamingDataPreviewOptions(input.DataPreviewOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DetectSchema != null && { DetectSchema: input.DetectSchema }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StreamingOptions != null && { - StreamingOptions: se_KafkaStreamingSourceOptions(input.StreamingOptions, context), - }), - ...(input.Table != null && { Table: input.Table }), - ...(input.WindowSize != null && { WindowSize: input.WindowSize }), - }; -}; +// se_ConnectionPasswordEncryption omitted. -/** - * serializeAws_json1_1CatalogKinesisSource - */ -const se_CatalogKinesisSource = (input: CatalogKinesisSource, context: __SerdeContext): any => { - return { - ...(input.DataPreviewOptions != null && { - DataPreviewOptions: se_StreamingDataPreviewOptions(input.DataPreviewOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DetectSchema != null && { DetectSchema: input.DetectSchema }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StreamingOptions != null && { - StreamingOptions: se_KinesisStreamingSourceOptions(input.StreamingOptions, context), - }), - ...(input.Table != null && { Table: input.Table }), - ...(input.WindowSize != null && { WindowSize: input.WindowSize }), - }; -}; +// se_ConnectionProperties omitted. -/** - * serializeAws_json1_1CatalogSchemaChangePolicy - */ -const se_CatalogSchemaChangePolicy = (input: CatalogSchemaChangePolicy, context: __SerdeContext): any => { - return { - ...(input.EnableUpdateCatalog != null && { EnableUpdateCatalog: input.EnableUpdateCatalog }), - ...(input.UpdateBehavior != null && { UpdateBehavior: input.UpdateBehavior }), - }; -}; +// se_ConnectionsList omitted. + +// se_ContextWords omitted. + +// se_CrawlerNameList omitted. /** - * serializeAws_json1_1CatalogSource + * serializeAws_json1_1CrawlerTargets */ -const se_CatalogSource = (input: CatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; +const se_CrawlerTargets = (input: CrawlerTargets, context: __SerdeContext): any => { + return take(input, { + CatalogTargets: _json, + DeltaTargets: _json, + DynamoDBTargets: (_) => se_DynamoDBTargetList(_, context), + JdbcTargets: _json, + MongoDBTargets: _json, + S3Targets: _json, + }); }; +// se_CrawlsFilter omitted. + +// se_CrawlsFilterList omitted. + +// se_CreateBlueprintRequest omitted. + +// se_CreateClassifierRequest omitted. + +// se_CreateConnectionRequest omitted. + /** - * serializeAws_json1_1CatalogTablesList + * serializeAws_json1_1CreateCrawlerRequest */ -const se_CatalogTablesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_CreateCrawlerRequest = (input: CreateCrawlerRequest, context: __SerdeContext): any => { + return take(input, { + Classifiers: _json, + Configuration: [], + CrawlerSecurityConfiguration: [], + DatabaseName: [], + Description: [], + LakeFormationConfiguration: _json, + LineageConfiguration: _json, + Name: [], + RecrawlPolicy: _json, + Role: [], + Schedule: [], + SchemaChangePolicy: _json, + TablePrefix: [], + Tags: _json, + Targets: (_) => se_CrawlerTargets(_, context), + }); }; +// se_CreateCsvClassifierRequest omitted. + +// se_CreateCustomEntityTypeRequest omitted. + +// se_CreateDatabaseRequest omitted. + +// se_CreateDataQualityRulesetRequest omitted. + +// se_CreateDevEndpointRequest omitted. + +// se_CreateGrokClassifierRequest omitted. + /** - * serializeAws_json1_1CatalogTarget + * serializeAws_json1_1CreateJobRequest */ -const se_CatalogTarget = (input: CatalogTarget, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DlqEventQueueArn != null && { DlqEventQueueArn: input.DlqEventQueueArn }), - ...(input.EventQueueArn != null && { EventQueueArn: input.EventQueueArn }), - ...(input.Tables != null && { Tables: se_CatalogTablesList(input.Tables, context) }), - }; +const se_CreateJobRequest = (input: CreateJobRequest, context: __SerdeContext): any => { + return take(input, { + AllocatedCapacity: [], + CodeGenConfigurationNodes: (_) => se_CodeGenConfigurationNodes(_, context), + Command: _json, + Connections: _json, + DefaultArguments: _json, + Description: [], + ExecutionClass: [], + ExecutionProperty: _json, + GlueVersion: [], + LogUri: [], + MaxCapacity: __serializeFloat, + MaxRetries: [], + Name: [], + NonOverridableArguments: _json, + NotificationProperty: _json, + NumberOfWorkers: [], + Role: [], + SecurityConfiguration: [], + SourceControlDetails: _json, + Tags: _json, + Timeout: [], + WorkerType: [], + }); }; +// se_CreateJsonClassifierRequest omitted. + /** - * serializeAws_json1_1CatalogTargetList + * serializeAws_json1_1CreateMLTransformRequest */ -const se_CatalogTargetList = (input: CatalogTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CatalogTarget(entry, context); - }); +const se_CreateMLTransformRequest = (input: CreateMLTransformRequest, context: __SerdeContext): any => { + return take(input, { + Description: [], + GlueVersion: [], + InputRecordTables: _json, + MaxCapacity: __serializeFloat, + MaxRetries: [], + Name: [], + NumberOfWorkers: [], + Parameters: (_) => se_TransformParameters(_, context), + Role: [], + Tags: _json, + Timeout: [], + TransformEncryption: _json, + WorkerType: [], + }); }; +// se_CreatePartitionIndexRequest omitted. + /** - * serializeAws_json1_1CheckSchemaVersionValidityInput + * serializeAws_json1_1CreatePartitionRequest */ -const se_CheckSchemaVersionValidityInput = (input: CheckSchemaVersionValidityInput, context: __SerdeContext): any => { - return { - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.SchemaDefinition != null && { SchemaDefinition: input.SchemaDefinition }), - }; +const se_CreatePartitionRequest = (input: CreatePartitionRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + PartitionInput: (_) => se_PartitionInput(_, context), + TableName: [], + }); }; +// se_CreateRegistryInput omitted. + +// se_CreateSchemaInput omitted. + +// se_CreateScriptRequest omitted. + +// se_CreateSecurityConfigurationRequest omitted. + /** - * serializeAws_json1_1ClassifierNameList + * serializeAws_json1_1CreateSessionRequest */ -const se_ClassifierNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_CreateSessionRequest = (input: CreateSessionRequest, context: __SerdeContext): any => { + return take(input, { + Command: _json, + Connections: _json, + DefaultArguments: _json, + Description: [], + GlueVersion: [], + Id: [], + IdleTimeout: [], + MaxCapacity: __serializeFloat, + NumberOfWorkers: [], + RequestOrigin: [], + Role: [], + SecurityConfiguration: [], + Tags: _json, + Timeout: [], + WorkerType: [], + }); }; /** - * serializeAws_json1_1CloudWatchEncryption + * serializeAws_json1_1CreateTableRequest */ -const se_CloudWatchEncryption = (input: CloudWatchEncryption, context: __SerdeContext): any => { - return { - ...(input.CloudWatchEncryptionMode != null && { CloudWatchEncryptionMode: input.CloudWatchEncryptionMode }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }; +const se_CreateTableRequest = (input: CreateTableRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + PartitionIndexes: _json, + TableInput: (_) => se_TableInput(_, context), + TransactionId: [], + }); }; +// se_CreateTriggerRequest omitted. + +// se_CreateUserDefinedFunctionRequest omitted. + +// se_CreateWorkflowRequest omitted. + +// se_CreateXMLClassifierRequest omitted. + +// se_CsvHeader omitted. + +// se_CustomCode omitted. + +// se_CustomDatatypes omitted. + +// se_CustomEntityTypeNames omitted. + +// se_DagEdges omitted. + +// se_DagNodes omitted. + +// se_DatabaseIdentifier omitted. + +// se_DatabaseInput omitted. + +// se_DataCatalogEncryptionSettings omitted. + +// se_DataLakePrincipal omitted. + +// se_DataQualityEvaluationRunAdditionalRunOptions omitted. + /** - * serializeAws_json1_1CodeGenConfigurationNode + * serializeAws_json1_1DataQualityResultFilterCriteria */ -const se_CodeGenConfigurationNode = (input: CodeGenConfigurationNode, context: __SerdeContext): any => { - return { - ...(input.Aggregate != null && { Aggregate: se_Aggregate(input.Aggregate, context) }), - ...(input.ApplyMapping != null && { ApplyMapping: se_ApplyMapping(input.ApplyMapping, context) }), - ...(input.AthenaConnectorSource != null && { - AthenaConnectorSource: se_AthenaConnectorSource(input.AthenaConnectorSource, context), - }), - ...(input.CatalogDeltaSource != null && { - CatalogDeltaSource: se_CatalogDeltaSource(input.CatalogDeltaSource, context), - }), - ...(input.CatalogHudiSource != null && { - CatalogHudiSource: se_CatalogHudiSource(input.CatalogHudiSource, context), - }), - ...(input.CatalogKafkaSource != null && { - CatalogKafkaSource: se_CatalogKafkaSource(input.CatalogKafkaSource, context), - }), - ...(input.CatalogKinesisSource != null && { - CatalogKinesisSource: se_CatalogKinesisSource(input.CatalogKinesisSource, context), - }), - ...(input.CatalogSource != null && { CatalogSource: se_CatalogSource(input.CatalogSource, context) }), - ...(input.CatalogTarget != null && { CatalogTarget: se_BasicCatalogTarget(input.CatalogTarget, context) }), - ...(input.CustomCode != null && { CustomCode: se_CustomCode(input.CustomCode, context) }), - ...(input.DirectJDBCSource != null && { DirectJDBCSource: se_DirectJDBCSource(input.DirectJDBCSource, context) }), - ...(input.DirectKafkaSource != null && { - DirectKafkaSource: se_DirectKafkaSource(input.DirectKafkaSource, context), - }), - ...(input.DirectKinesisSource != null && { - DirectKinesisSource: se_DirectKinesisSource(input.DirectKinesisSource, context), - }), - ...(input.DropDuplicates != null && { DropDuplicates: se_DropDuplicates(input.DropDuplicates, context) }), - ...(input.DropFields != null && { DropFields: se_DropFields(input.DropFields, context) }), - ...(input.DropNullFields != null && { DropNullFields: se_DropNullFields(input.DropNullFields, context) }), - ...(input.DynamicTransform != null && { DynamicTransform: se_DynamicTransform(input.DynamicTransform, context) }), - ...(input.DynamoDBCatalogSource != null && { - DynamoDBCatalogSource: se_DynamoDBCatalogSource(input.DynamoDBCatalogSource, context), - }), - ...(input.EvaluateDataQuality != null && { - EvaluateDataQuality: se_EvaluateDataQuality(input.EvaluateDataQuality, context), - }), - ...(input.FillMissingValues != null && { - FillMissingValues: se_FillMissingValues(input.FillMissingValues, context), - }), - ...(input.Filter != null && { Filter: se_Filter(input.Filter, context) }), - ...(input.GovernedCatalogSource != null && { - GovernedCatalogSource: se_GovernedCatalogSource(input.GovernedCatalogSource, context), - }), - ...(input.GovernedCatalogTarget != null && { - GovernedCatalogTarget: se_GovernedCatalogTarget(input.GovernedCatalogTarget, context), - }), - ...(input.JDBCConnectorSource != null && { - JDBCConnectorSource: se_JDBCConnectorSource(input.JDBCConnectorSource, context), - }), - ...(input.JDBCConnectorTarget != null && { - JDBCConnectorTarget: se_JDBCConnectorTarget(input.JDBCConnectorTarget, context), - }), - ...(input.Join != null && { Join: se_Join(input.Join, context) }), - ...(input.Merge != null && { Merge: se_Merge(input.Merge, context) }), - ...(input.MicrosoftSQLServerCatalogSource != null && { - MicrosoftSQLServerCatalogSource: se_MicrosoftSQLServerCatalogSource( - input.MicrosoftSQLServerCatalogSource, - context - ), - }), - ...(input.MicrosoftSQLServerCatalogTarget != null && { - MicrosoftSQLServerCatalogTarget: se_MicrosoftSQLServerCatalogTarget( - input.MicrosoftSQLServerCatalogTarget, - context - ), - }), - ...(input.MySQLCatalogSource != null && { - MySQLCatalogSource: se_MySQLCatalogSource(input.MySQLCatalogSource, context), - }), - ...(input.MySQLCatalogTarget != null && { - MySQLCatalogTarget: se_MySQLCatalogTarget(input.MySQLCatalogTarget, context), - }), - ...(input.OracleSQLCatalogSource != null && { - OracleSQLCatalogSource: se_OracleSQLCatalogSource(input.OracleSQLCatalogSource, context), - }), - ...(input.OracleSQLCatalogTarget != null && { - OracleSQLCatalogTarget: se_OracleSQLCatalogTarget(input.OracleSQLCatalogTarget, context), - }), - ...(input.PIIDetection != null && { PIIDetection: se_PIIDetection(input.PIIDetection, context) }), - ...(input.PostgreSQLCatalogSource != null && { - PostgreSQLCatalogSource: se_PostgreSQLCatalogSource(input.PostgreSQLCatalogSource, context), - }), - ...(input.PostgreSQLCatalogTarget != null && { - PostgreSQLCatalogTarget: se_PostgreSQLCatalogTarget(input.PostgreSQLCatalogTarget, context), - }), - ...(input.RedshiftSource != null && { RedshiftSource: se_RedshiftSource(input.RedshiftSource, context) }), - ...(input.RedshiftTarget != null && { RedshiftTarget: se_RedshiftTarget(input.RedshiftTarget, context) }), - ...(input.RelationalCatalogSource != null && { - RelationalCatalogSource: se_RelationalCatalogSource(input.RelationalCatalogSource, context), - }), - ...(input.RenameField != null && { RenameField: se_RenameField(input.RenameField, context) }), - ...(input.S3CatalogDeltaSource != null && { - S3CatalogDeltaSource: se_S3CatalogDeltaSource(input.S3CatalogDeltaSource, context), - }), - ...(input.S3CatalogHudiSource != null && { - S3CatalogHudiSource: se_S3CatalogHudiSource(input.S3CatalogHudiSource, context), - }), - ...(input.S3CatalogSource != null && { S3CatalogSource: se_S3CatalogSource(input.S3CatalogSource, context) }), - ...(input.S3CatalogTarget != null && { S3CatalogTarget: se_S3CatalogTarget(input.S3CatalogTarget, context) }), - ...(input.S3CsvSource != null && { S3CsvSource: se_S3CsvSource(input.S3CsvSource, context) }), - ...(input.S3DeltaCatalogTarget != null && { - S3DeltaCatalogTarget: se_S3DeltaCatalogTarget(input.S3DeltaCatalogTarget, context), - }), - ...(input.S3DeltaDirectTarget != null && { - S3DeltaDirectTarget: se_S3DeltaDirectTarget(input.S3DeltaDirectTarget, context), - }), - ...(input.S3DeltaSource != null && { S3DeltaSource: se_S3DeltaSource(input.S3DeltaSource, context) }), - ...(input.S3DirectTarget != null && { S3DirectTarget: se_S3DirectTarget(input.S3DirectTarget, context) }), - ...(input.S3GlueParquetTarget != null && { - S3GlueParquetTarget: se_S3GlueParquetTarget(input.S3GlueParquetTarget, context), - }), - ...(input.S3HudiCatalogTarget != null && { - S3HudiCatalogTarget: se_S3HudiCatalogTarget(input.S3HudiCatalogTarget, context), - }), - ...(input.S3HudiDirectTarget != null && { - S3HudiDirectTarget: se_S3HudiDirectTarget(input.S3HudiDirectTarget, context), - }), - ...(input.S3HudiSource != null && { S3HudiSource: se_S3HudiSource(input.S3HudiSource, context) }), - ...(input.S3JsonSource != null && { S3JsonSource: se_S3JsonSource(input.S3JsonSource, context) }), - ...(input.S3ParquetSource != null && { S3ParquetSource: se_S3ParquetSource(input.S3ParquetSource, context) }), - ...(input.SelectFields != null && { SelectFields: se_SelectFields(input.SelectFields, context) }), - ...(input.SelectFromCollection != null && { - SelectFromCollection: se_SelectFromCollection(input.SelectFromCollection, context), - }), - ...(input.SparkConnectorSource != null && { - SparkConnectorSource: se_SparkConnectorSource(input.SparkConnectorSource, context), - }), - ...(input.SparkConnectorTarget != null && { - SparkConnectorTarget: se_SparkConnectorTarget(input.SparkConnectorTarget, context), - }), - ...(input.SparkSQL != null && { SparkSQL: se_SparkSQL(input.SparkSQL, context) }), - ...(input.Spigot != null && { Spigot: se_Spigot(input.Spigot, context) }), - ...(input.SplitFields != null && { SplitFields: se_SplitFields(input.SplitFields, context) }), - ...(input.Union != null && { Union: se_Union(input.Union, context) }), - }; +const se_DataQualityResultFilterCriteria = (input: DataQualityResultFilterCriteria, context: __SerdeContext): any => { + return take(input, { + DataSource: _json, + JobName: [], + JobRunId: [], + StartedAfter: (_) => Math.round(_.getTime() / 1000), + StartedBefore: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_DataQualityResultIds omitted. + /** - * serializeAws_json1_1CodeGenConfigurationNodes + * serializeAws_json1_1DataQualityRuleRecommendationRunFilter */ -const se_CodeGenConfigurationNodes = ( - input: Record, +const se_DataQualityRuleRecommendationRunFilter = ( + input: DataQualityRuleRecommendationRunFilter, context: __SerdeContext ): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CodeGenConfigurationNode(value, context); - return acc; - }, {}); + return take(input, { + DataSource: _json, + StartedAfter: (_) => Math.round(_.getTime() / 1000), + StartedBefore: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * serializeAws_json1_1CodeGenEdge + * serializeAws_json1_1DataQualityRulesetEvaluationRunFilter */ -const se_CodeGenEdge = (input: CodeGenEdge, context: __SerdeContext): any => { - return { - ...(input.Source != null && { Source: input.Source }), - ...(input.Target != null && { Target: input.Target }), - ...(input.TargetParameter != null && { TargetParameter: input.TargetParameter }), - }; +const se_DataQualityRulesetEvaluationRunFilter = ( + input: DataQualityRulesetEvaluationRunFilter, + context: __SerdeContext +): any => { + return take(input, { + DataSource: _json, + StartedAfter: (_) => Math.round(_.getTime() / 1000), + StartedBefore: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * serializeAws_json1_1CodeGenNode + * serializeAws_json1_1DataQualityRulesetFilterCriteria */ -const se_CodeGenNode = (input: CodeGenNode, context: __SerdeContext): any => { - return { - ...(input.Args != null && { Args: se_CodeGenNodeArgs(input.Args, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LineNumber != null && { LineNumber: input.LineNumber }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - }; +const se_DataQualityRulesetFilterCriteria = (input: DataQualityRulesetFilterCriteria, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + Description: [], + LastModifiedAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedBefore: (_) => Math.round(_.getTime() / 1000), + Name: [], + TargetTable: _json, + }); }; -/** - * serializeAws_json1_1CodeGenNodeArg - */ -const se_CodeGenNodeArg = (input: CodeGenNodeArg, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Param != null && { Param: input.Param }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_DataQualityTargetTable omitted. -/** - * serializeAws_json1_1CodeGenNodeArgs - */ -const se_CodeGenNodeArgs = (input: CodeGenNodeArg[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CodeGenNodeArg(entry, context); - }); -}; +// se_DataSource omitted. + +// se_Datatype omitted. /** - * serializeAws_json1_1Column + * serializeAws_json1_1DateColumnStatisticsData */ -const se_Column = (input: Column, context: __SerdeContext): any => { - return { - ...(input.Comment != null && { Comment: input.Comment }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.Type != null && { Type: input.Type }), - }; +const se_DateColumnStatisticsData = (input: DateColumnStatisticsData, context: __SerdeContext): any => { + return take(input, { + MaximumValue: (_) => Math.round(_.getTime() / 1000), + MinimumValue: (_) => Math.round(_.getTime() / 1000), + NumberOfDistinctValues: [], + NumberOfNulls: [], + }); }; /** - * serializeAws_json1_1ColumnList + * serializeAws_json1_1DecimalColumnStatisticsData */ -const se_ColumnList = (input: Column[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Column(entry, context); - }); +const se_DecimalColumnStatisticsData = (input: DecimalColumnStatisticsData, context: __SerdeContext): any => { + return take(input, { + MaximumValue: (_) => se_DecimalNumber(_, context), + MinimumValue: (_) => se_DecimalNumber(_, context), + NumberOfDistinctValues: [], + NumberOfNulls: [], + }); }; /** - * serializeAws_json1_1ColumnStatistics + * serializeAws_json1_1DecimalNumber */ -const se_ColumnStatistics = (input: ColumnStatistics, context: __SerdeContext): any => { - return { - ...(input.AnalyzedTime != null && { AnalyzedTime: Math.round(input.AnalyzedTime.getTime() / 1000) }), - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.ColumnType != null && { ColumnType: input.ColumnType }), - ...(input.StatisticsData != null && { StatisticsData: se_ColumnStatisticsData(input.StatisticsData, context) }), - }; +const se_DecimalNumber = (input: DecimalNumber, context: __SerdeContext): any => { + return take(input, { + Scale: [], + UnscaledValue: context.base64Encoder, + }); }; +// se_DeleteBlueprintRequest omitted. + +// se_DeleteClassifierRequest omitted. + +// se_DeleteColumnStatisticsForPartitionRequest omitted. + +// se_DeleteColumnStatisticsForTableRequest omitted. + +// se_DeleteConnectionNameList omitted. + +// se_DeleteConnectionRequest omitted. + +// se_DeleteCrawlerRequest omitted. + +// se_DeleteCustomEntityTypeRequest omitted. + +// se_DeleteDatabaseRequest omitted. + +// se_DeleteDataQualityRulesetRequest omitted. + +// se_DeleteDevEndpointRequest omitted. + +// se_DeleteJobRequest omitted. + +// se_DeleteMLTransformRequest omitted. + +// se_DeletePartitionIndexRequest omitted. + +// se_DeletePartitionRequest omitted. + +// se_DeleteRegistryInput omitted. + +// se_DeleteResourcePolicyRequest omitted. + +// se_DeleteSchemaInput omitted. + +// se_DeleteSchemaVersionsInput omitted. + +// se_DeleteSecurityConfigurationRequest omitted. + +// se_DeleteSessionRequest omitted. + +// se_DeleteTableRequest omitted. + +// se_DeleteTableVersionRequest omitted. + +// se_DeleteTriggerRequest omitted. + +// se_DeleteUserDefinedFunctionRequest omitted. + +// se_DeleteWorkflowRequest omitted. + +// se_DeltaTarget omitted. + +// se_DeltaTargetList omitted. + +// se_DevEndpointCustomLibraries omitted. + +// se_DevEndpointNames omitted. + +// se_DirectJDBCSource omitted. + +// se_DirectKafkaSource omitted. + +// se_DirectKinesisSource omitted. + +// se_DirectSchemaChangePolicy omitted. + /** - * serializeAws_json1_1ColumnStatisticsData + * serializeAws_json1_1DoubleColumnStatisticsData */ -const se_ColumnStatisticsData = (input: ColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.BinaryColumnStatisticsData != null && { - BinaryColumnStatisticsData: se_BinaryColumnStatisticsData(input.BinaryColumnStatisticsData, context), - }), - ...(input.BooleanColumnStatisticsData != null && { - BooleanColumnStatisticsData: se_BooleanColumnStatisticsData(input.BooleanColumnStatisticsData, context), - }), - ...(input.DateColumnStatisticsData != null && { - DateColumnStatisticsData: se_DateColumnStatisticsData(input.DateColumnStatisticsData, context), - }), - ...(input.DecimalColumnStatisticsData != null && { - DecimalColumnStatisticsData: se_DecimalColumnStatisticsData(input.DecimalColumnStatisticsData, context), - }), - ...(input.DoubleColumnStatisticsData != null && { - DoubleColumnStatisticsData: se_DoubleColumnStatisticsData(input.DoubleColumnStatisticsData, context), - }), - ...(input.LongColumnStatisticsData != null && { - LongColumnStatisticsData: se_LongColumnStatisticsData(input.LongColumnStatisticsData, context), - }), - ...(input.StringColumnStatisticsData != null && { - StringColumnStatisticsData: se_StringColumnStatisticsData(input.StringColumnStatisticsData, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1ColumnValueStringList - */ -const se_ColumnValueStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_DoubleColumnStatisticsData = (input: DoubleColumnStatisticsData, context: __SerdeContext): any => { + return take(input, { + MaximumValue: __serializeFloat, + MinimumValue: __serializeFloat, + NumberOfDistinctValues: [], + NumberOfNulls: [], + }); }; +// se_DQResultsPublishingOptions omitted. + +// se_DQStopJobOnFailureOptions omitted. + +// se_DropDuplicates omitted. + +// se_DropFields omitted. + +// se_DropNullFields omitted. + +// se_DynamicTransform omitted. + +// se_DynamoDBCatalogSource omitted. + /** - * serializeAws_json1_1Condition + * serializeAws_json1_1DynamoDBTarget */ -const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.CrawlState != null && { CrawlState: input.CrawlState }), - ...(input.CrawlerName != null && { CrawlerName: input.CrawlerName }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.LogicalOperator != null && { LogicalOperator: input.LogicalOperator }), - ...(input.State != null && { State: input.State }), - }; +const se_DynamoDBTarget = (input: DynamoDBTarget, context: __SerdeContext): any => { + return take(input, { + Path: [], + scanAll: [], + scanRate: __serializeFloat, + }); }; /** - * serializeAws_json1_1ConditionList + * serializeAws_json1_1DynamoDBTargetList */ -const se_ConditionList = (input: Condition[], context: __SerdeContext): any => { +const se_DynamoDBTargetList = (input: DynamoDBTarget[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Condition(entry, context); + return se_DynamoDBTarget(entry, context); }); }; -/** - * serializeAws_json1_1ConnectionInput - */ -const se_ConnectionInput = (input: ConnectionInput, context: __SerdeContext): any => { - return { - ...(input.ConnectionProperties != null && { - ConnectionProperties: se_ConnectionProperties(input.ConnectionProperties, context), - }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.MatchCriteria != null && { MatchCriteria: se_MatchCriteria(input.MatchCriteria, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PhysicalConnectionRequirements != null && { - PhysicalConnectionRequirements: se_PhysicalConnectionRequirements(input.PhysicalConnectionRequirements, context), - }), - }; -}; +// se_EnableAdditionalMetadata omitted. -/** - * serializeAws_json1_1ConnectionPasswordEncryption - */ -const se_ConnectionPasswordEncryption = (input: ConnectionPasswordEncryption, context: __SerdeContext): any => { - return { - ...(input.AwsKmsKeyId != null && { AwsKmsKeyId: input.AwsKmsKeyId }), - ...(input.ReturnConnectionPasswordEncrypted != null && { - ReturnConnectionPasswordEncrypted: input.ReturnConnectionPasswordEncrypted, - }), - }; -}; +// se_EnclosedInStringProperties omitted. -/** - * serializeAws_json1_1ConnectionProperties - */ -const se_ConnectionProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [ConnectionPropertyKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; +// se_EnclosedInStringPropertiesMinOne omitted. -/** - * serializeAws_json1_1ConnectionsList - */ -const se_ConnectionsList = (input: ConnectionsList, context: __SerdeContext): any => { - return { - ...(input.Connections != null && { Connections: se_OrchestrationStringList(input.Connections, context) }), - }; -}; +// se_EncryptionAtRest omitted. -/** - * serializeAws_json1_1ContextWords - */ -const se_ContextWords = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EncryptionConfiguration omitted. -/** - * serializeAws_json1_1CrawlerNameList - */ -const se_CrawlerNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EvaluateDataQuality omitted. -/** - * serializeAws_json1_1CrawlerTargets - */ -const se_CrawlerTargets = (input: CrawlerTargets, context: __SerdeContext): any => { - return { - ...(input.CatalogTargets != null && { CatalogTargets: se_CatalogTargetList(input.CatalogTargets, context) }), - ...(input.DeltaTargets != null && { DeltaTargets: se_DeltaTargetList(input.DeltaTargets, context) }), - ...(input.DynamoDBTargets != null && { DynamoDBTargets: se_DynamoDBTargetList(input.DynamoDBTargets, context) }), - ...(input.JdbcTargets != null && { JdbcTargets: se_JdbcTargetList(input.JdbcTargets, context) }), - ...(input.MongoDBTargets != null && { MongoDBTargets: se_MongoDBTargetList(input.MongoDBTargets, context) }), - ...(input.S3Targets != null && { S3Targets: se_S3TargetList(input.S3Targets, context) }), - }; -}; +// se_EventBatchingCondition omitted. -/** - * serializeAws_json1_1CrawlsFilter - */ -const se_CrawlsFilter = (input: CrawlsFilter, context: __SerdeContext): any => { - return { - ...(input.FieldName != null && { FieldName: input.FieldName }), - ...(input.FieldValue != null && { FieldValue: input.FieldValue }), - ...(input.FilterOperator != null && { FilterOperator: input.FilterOperator }), - }; -}; +// se_ExecutionProperty omitted. -/** - * serializeAws_json1_1CrawlsFilterList - */ -const se_CrawlsFilterList = (input: CrawlsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CrawlsFilter(entry, context); - }); -}; +// se_FederatedDatabase omitted. -/** - * serializeAws_json1_1CreateBlueprintRequest - */ -const se_CreateBlueprintRequest = (input: CreateBlueprintRequest, context: __SerdeContext): any => { - return { - ...(input.BlueprintLocation != null && { BlueprintLocation: input.BlueprintLocation }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; +// se_FillMissingValues omitted. -/** - * serializeAws_json1_1CreateClassifierRequest - */ -const se_CreateClassifierRequest = (input: CreateClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.CsvClassifier != null && { CsvClassifier: se_CreateCsvClassifierRequest(input.CsvClassifier, context) }), - ...(input.GrokClassifier != null && { - GrokClassifier: se_CreateGrokClassifierRequest(input.GrokClassifier, context), - }), - ...(input.JsonClassifier != null && { - JsonClassifier: se_CreateJsonClassifierRequest(input.JsonClassifier, context), - }), - ...(input.XMLClassifier != null && { XMLClassifier: se_CreateXMLClassifierRequest(input.XMLClassifier, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1CreateConnectionRequest - */ -const se_CreateConnectionRequest = (input: CreateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ConnectionInput != null && { ConnectionInput: se_ConnectionInput(input.ConnectionInput, context) }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; +// se_FilterExpression omitted. -/** - * serializeAws_json1_1CreateCrawlerRequest - */ -const se_CreateCrawlerRequest = (input: CreateCrawlerRequest, context: __SerdeContext): any => { - return { - ...(input.Classifiers != null && { Classifiers: se_ClassifierNameList(input.Classifiers, context) }), - ...(input.Configuration != null && { Configuration: input.Configuration }), - ...(input.CrawlerSecurityConfiguration != null && { - CrawlerSecurityConfiguration: input.CrawlerSecurityConfiguration, - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LakeFormationConfiguration != null && { - LakeFormationConfiguration: se_LakeFormationConfiguration(input.LakeFormationConfiguration, context), - }), - ...(input.LineageConfiguration != null && { - LineageConfiguration: se_LineageConfiguration(input.LineageConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RecrawlPolicy != null && { RecrawlPolicy: se_RecrawlPolicy(input.RecrawlPolicy, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_SchemaChangePolicy(input.SchemaChangePolicy, context), - }), - ...(input.TablePrefix != null && { TablePrefix: input.TablePrefix }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.Targets != null && { Targets: se_CrawlerTargets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateCsvClassifierRequest - */ -const se_CreateCsvClassifierRequest = (input: CreateCsvClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.AllowSingleColumn != null && { AllowSingleColumn: input.AllowSingleColumn }), - ...(input.ContainsHeader != null && { ContainsHeader: input.ContainsHeader }), - ...(input.CustomDatatypeConfigured != null && { CustomDatatypeConfigured: input.CustomDatatypeConfigured }), - ...(input.CustomDatatypes != null && { CustomDatatypes: se_CustomDatatypes(input.CustomDatatypes, context) }), - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.DisableValueTrimming != null && { DisableValueTrimming: input.DisableValueTrimming }), - ...(input.Header != null && { Header: se_CsvHeader(input.Header, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QuoteSymbol != null && { QuoteSymbol: input.QuoteSymbol }), - }; -}; +// se_FilterExpressions omitted. -/** - * serializeAws_json1_1CreateCustomEntityTypeRequest - */ -const se_CreateCustomEntityTypeRequest = (input: CreateCustomEntityTypeRequest, context: __SerdeContext): any => { - return { - ...(input.ContextWords != null && { ContextWords: se_ContextWords(input.ContextWords, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RegexString != null && { RegexString: input.RegexString }), - }; -}; +// se_FilterValue omitted. -/** - * serializeAws_json1_1CreateDatabaseRequest - */ -const se_CreateDatabaseRequest = (input: CreateDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseInput != null && { DatabaseInput: se_DatabaseInput(input.DatabaseInput, context) }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; +// se_FilterValues omitted. /** - * serializeAws_json1_1CreateDataQualityRulesetRequest + * serializeAws_json1_1FindMatchesParameters */ -const se_CreateDataQualityRulesetRequest = (input: CreateDataQualityRulesetRequest, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Ruleset != null && { Ruleset: input.Ruleset }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.TargetTable != null && { TargetTable: se_DataQualityTargetTable(input.TargetTable, context) }), - }; +const se_FindMatchesParameters = (input: FindMatchesParameters, context: __SerdeContext): any => { + return take(input, { + AccuracyCostTradeoff: __serializeFloat, + EnforceProvidedLabels: [], + PrecisionRecallTradeoff: __serializeFloat, + PrimaryKeyColumnName: [], + }); }; -/** - * serializeAws_json1_1CreateDevEndpointRequest - */ -const se_CreateDevEndpointRequest = (input: CreateDevEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.Arguments != null && { Arguments: se_MapValue(input.Arguments, context) }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.ExtraJarsS3Path != null && { ExtraJarsS3Path: input.ExtraJarsS3Path }), - ...(input.ExtraPythonLibsS3Path != null && { ExtraPythonLibsS3Path: input.ExtraPythonLibsS3Path }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.NumberOfNodes != null && { NumberOfNodes: input.NumberOfNodes }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.PublicKey != null && { PublicKey: input.PublicKey }), - ...(input.PublicKeys != null && { PublicKeys: se_PublicKeysList(input.PublicKeys, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_StringList(input.SecurityGroupIds, context) }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; -}; +// se_GenericMap omitted. -/** - * serializeAws_json1_1CreateGrokClassifierRequest - */ -const se_CreateGrokClassifierRequest = (input: CreateGrokClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.CustomPatterns != null && { CustomPatterns: input.CustomPatterns }), - ...(input.GrokPattern != null && { GrokPattern: input.GrokPattern }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_GetBlueprintRequest omitted. + +// se_GetBlueprintRunRequest omitted. + +// se_GetBlueprintRunsRequest omitted. + +// se_GetCatalogImportStatusRequest omitted. + +// se_GetClassifierRequest omitted. + +// se_GetClassifiersRequest omitted. + +// se_GetColumnNamesList omitted. + +// se_GetColumnStatisticsForPartitionRequest omitted. + +// se_GetColumnStatisticsForTableRequest omitted. + +// se_GetConnectionRequest omitted. + +// se_GetConnectionsFilter omitted. + +// se_GetConnectionsRequest omitted. + +// se_GetCrawlerMetricsRequest omitted. + +// se_GetCrawlerRequest omitted. + +// se_GetCrawlersRequest omitted. + +// se_GetCustomEntityTypeRequest omitted. + +// se_GetDatabaseRequest omitted. + +// se_GetDatabasesRequest omitted. + +// se_GetDataCatalogEncryptionSettingsRequest omitted. + +// se_GetDataflowGraphRequest omitted. + +// se_GetDataQualityResultRequest omitted. + +// se_GetDataQualityRuleRecommendationRunRequest omitted. + +// se_GetDataQualityRulesetEvaluationRunRequest omitted. + +// se_GetDataQualityRulesetRequest omitted. + +// se_GetDevEndpointRequest omitted. + +// se_GetDevEndpointsRequest omitted. + +// se_GetJobBookmarkRequest omitted. + +// se_GetJobRequest omitted. + +// se_GetJobRunRequest omitted. + +// se_GetJobRunsRequest omitted. + +// se_GetJobsRequest omitted. + +// se_GetMappingRequest omitted. + +// se_GetMLTaskRunRequest omitted. /** - * serializeAws_json1_1CreateJobRequest + * serializeAws_json1_1GetMLTaskRunsRequest */ -const se_CreateJobRequest = (input: CreateJobRequest, context: __SerdeContext): any => { - return { - ...(input.AllocatedCapacity != null && { AllocatedCapacity: input.AllocatedCapacity }), - ...(input.CodeGenConfigurationNodes != null && { - CodeGenConfigurationNodes: se_CodeGenConfigurationNodes(input.CodeGenConfigurationNodes, context), - }), - ...(input.Command != null && { Command: se_JobCommand(input.Command, context) }), - ...(input.Connections != null && { Connections: se_ConnectionsList(input.Connections, context) }), - ...(input.DefaultArguments != null && { DefaultArguments: se_GenericMap(input.DefaultArguments, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ExecutionClass != null && { ExecutionClass: input.ExecutionClass }), - ...(input.ExecutionProperty != null && { - ExecutionProperty: se_ExecutionProperty(input.ExecutionProperty, context), - }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.LogUri != null && { LogUri: input.LogUri }), - ...(input.MaxCapacity != null && { MaxCapacity: __serializeFloat(input.MaxCapacity) }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NonOverridableArguments != null && { - NonOverridableArguments: se_GenericMap(input.NonOverridableArguments, context), - }), - ...(input.NotificationProperty != null && { - NotificationProperty: se_NotificationProperty(input.NotificationProperty, context), - }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.Role != null && { Role: input.Role }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.SourceControlDetails != null && { - SourceControlDetails: se_SourceControlDetails(input.SourceControlDetails, context), - }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; -}; - -/** - * serializeAws_json1_1CreateJsonClassifierRequest - */ -const se_CreateJsonClassifierRequest = (input: CreateJsonClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.JsonPath != null && { JsonPath: input.JsonPath }), - ...(input.Name != null && { Name: input.Name }), - }; +const se_GetMLTaskRunsRequest = (input: GetMLTaskRunsRequest, context: __SerdeContext): any => { + return take(input, { + Filter: (_) => se_TaskRunFilterCriteria(_, context), + MaxResults: [], + NextToken: [], + Sort: _json, + TransformId: [], + }); }; +// se_GetMLTransformRequest omitted. + /** - * serializeAws_json1_1CreateMLTransformRequest + * serializeAws_json1_1GetMLTransformsRequest */ -const se_CreateMLTransformRequest = (input: CreateMLTransformRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.InputRecordTables != null && { InputRecordTables: se_GlueTables(input.InputRecordTables, context) }), - ...(input.MaxCapacity != null && { MaxCapacity: __serializeFloat(input.MaxCapacity) }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.Parameters != null && { Parameters: se_TransformParameters(input.Parameters, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.TransformEncryption != null && { - TransformEncryption: se_TransformEncryption(input.TransformEncryption, context), - }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; +const se_GetMLTransformsRequest = (input: GetMLTransformsRequest, context: __SerdeContext): any => { + return take(input, { + Filter: (_) => se_TransformFilterCriteria(_, context), + MaxResults: [], + NextToken: [], + Sort: _json, + }); }; +// se_GetPartitionIndexesRequest omitted. + +// se_GetPartitionRequest omitted. + /** - * serializeAws_json1_1CreatePartitionIndexRequest + * serializeAws_json1_1GetPartitionsRequest */ -const se_CreatePartitionIndexRequest = (input: CreatePartitionIndexRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionIndex != null && { PartitionIndex: se_PartitionIndex(input.PartitionIndex, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; +const se_GetPartitionsRequest = (input: GetPartitionsRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + ExcludeColumnSchema: [], + Expression: [], + MaxResults: [], + NextToken: [], + QueryAsOfTime: (_) => Math.round(_.getTime() / 1000), + Segment: _json, + TableName: [], + TransactionId: [], + }); }; +// se_GetPlanRequest omitted. + +// se_GetRegistryInput omitted. + +// se_GetResourcePoliciesRequest omitted. + +// se_GetResourcePolicyRequest omitted. + +// se_GetSchemaByDefinitionInput omitted. + +// se_GetSchemaInput omitted. + +// se_GetSchemaVersionInput omitted. + +// se_GetSchemaVersionsDiffInput omitted. + +// se_GetSecurityConfigurationRequest omitted. + +// se_GetSecurityConfigurationsRequest omitted. + +// se_GetSessionRequest omitted. + +// se_GetStatementRequest omitted. + /** - * serializeAws_json1_1CreatePartitionRequest + * serializeAws_json1_1GetTableRequest */ -const se_CreatePartitionRequest = (input: CreatePartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionInput != null && { PartitionInput: se_PartitionInput(input.PartitionInput, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; +const se_GetTableRequest = (input: GetTableRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + Name: [], + QueryAsOfTime: (_) => Math.round(_.getTime() / 1000), + TransactionId: [], + }); }; /** - * serializeAws_json1_1CreateRegistryInput + * serializeAws_json1_1GetTablesRequest */ -const se_CreateRegistryInput = (input: CreateRegistryInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.RegistryName != null && { RegistryName: input.RegistryName }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; +const se_GetTablesRequest = (input: GetTablesRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + Expression: [], + MaxResults: [], + NextToken: [], + QueryAsOfTime: (_) => Math.round(_.getTime() / 1000), + TransactionId: [], + }); }; +// se_GetTableVersionRequest omitted. + +// se_GetTableVersionsRequest omitted. + +// se_GetTagsRequest omitted. + +// se_GetTriggerRequest omitted. + +// se_GetTriggersRequest omitted. + +// se_GetUnfilteredPartitionMetadataRequest omitted. + +// se_GetUnfilteredPartitionsMetadataRequest omitted. + +// se_GetUnfilteredTableMetadataRequest omitted. + +// se_GetUserDefinedFunctionRequest omitted. + +// se_GetUserDefinedFunctionsRequest omitted. + +// se_GetWorkflowRequest omitted. + +// se_GetWorkflowRunPropertiesRequest omitted. + +// se_GetWorkflowRunRequest omitted. + +// se_GetWorkflowRunsRequest omitted. + +// se_GlueSchema omitted. + +// se_GlueSchemas omitted. + +// se_GlueStudioPathList omitted. + +// se_GlueStudioSchemaColumn omitted. + +// se_GlueStudioSchemaColumnList omitted. + +// se_GlueTable omitted. + +// se_GlueTableAdditionalOptions omitted. + +// se_GlueTables omitted. + +// se_GovernedCatalogSource omitted. + +// se_GovernedCatalogTarget omitted. + +// se_ImportCatalogToGlueRequest omitted. + +// se_JDBCConnectorOptions omitted. + +// se_JDBCConnectorSource omitted. + +// se_JDBCConnectorTarget omitted. + +// se_JDBCDataTypeMapping omitted. + +// se_JdbcTarget omitted. + +// se_JdbcTargetList omitted. + +// se_JobBookmarksEncryption omitted. + +// se_JobCommand omitted. + +// se_JobNameList omitted. + /** - * serializeAws_json1_1CreateSchemaInput + * serializeAws_json1_1JobUpdate */ -const se_CreateSchemaInput = (input: CreateSchemaInput, context: __SerdeContext): any => { - return { - ...(input.Compatibility != null && { Compatibility: input.Compatibility }), - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.Description != null && { Description: input.Description }), - ...(input.RegistryId != null && { RegistryId: se_RegistryId(input.RegistryId, context) }), - ...(input.SchemaDefinition != null && { SchemaDefinition: input.SchemaDefinition }), - ...(input.SchemaName != null && { SchemaName: input.SchemaName }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; +const se_JobUpdate = (input: JobUpdate, context: __SerdeContext): any => { + return take(input, { + AllocatedCapacity: [], + CodeGenConfigurationNodes: (_) => se_CodeGenConfigurationNodes(_, context), + Command: _json, + Connections: _json, + DefaultArguments: _json, + Description: [], + ExecutionClass: [], + ExecutionProperty: _json, + GlueVersion: [], + LogUri: [], + MaxCapacity: __serializeFloat, + MaxRetries: [], + NonOverridableArguments: _json, + NotificationProperty: _json, + NumberOfWorkers: [], + Role: [], + SecurityConfiguration: [], + SourceControlDetails: _json, + Timeout: [], + WorkerType: [], + }); }; +// se_Join omitted. + +// se_JoinColumn omitted. + +// se_JoinColumns omitted. + +// se_KafkaStreamingSourceOptions omitted. + +// se_KeyList omitted. + +// se_KinesisStreamingSourceOptions omitted. + +// se_LakeFormationConfiguration omitted. + +// se_LimitedPathList omitted. + +// se_LimitedStringList omitted. + +// se_LineageConfiguration omitted. + +// se_ListBlueprintsRequest omitted. + +// se_ListCrawlersRequest omitted. + +// se_ListCrawlsRequest omitted. + +// se_ListCustomEntityTypesRequest omitted. + /** - * serializeAws_json1_1CreateScriptRequest + * serializeAws_json1_1ListDataQualityResultsRequest */ -const se_CreateScriptRequest = (input: CreateScriptRequest, context: __SerdeContext): any => { - return { - ...(input.DagEdges != null && { DagEdges: se_DagEdges(input.DagEdges, context) }), - ...(input.DagNodes != null && { DagNodes: se_DagNodes(input.DagNodes, context) }), - ...(input.Language != null && { Language: input.Language }), - }; +const se_ListDataQualityResultsRequest = (input: ListDataQualityResultsRequest, context: __SerdeContext): any => { + return take(input, { + Filter: (_) => se_DataQualityResultFilterCriteria(_, context), + MaxResults: [], + NextToken: [], + }); }; /** - * serializeAws_json1_1CreateSecurityConfigurationRequest + * serializeAws_json1_1ListDataQualityRuleRecommendationRunsRequest */ -const se_CreateSecurityConfigurationRequest = ( - input: CreateSecurityConfigurationRequest, +const se_ListDataQualityRuleRecommendationRunsRequest = ( + input: ListDataQualityRuleRecommendationRunsRequest, context: __SerdeContext ): any => { - return { - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + Filter: (_) => se_DataQualityRuleRecommendationRunFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** - * serializeAws_json1_1CreateSessionRequest + * serializeAws_json1_1ListDataQualityRulesetEvaluationRunsRequest */ -const se_CreateSessionRequest = (input: CreateSessionRequest, context: __SerdeContext): any => { - return { - ...(input.Command != null && { Command: se_SessionCommand(input.Command, context) }), - ...(input.Connections != null && { Connections: se_ConnectionsList(input.Connections, context) }), - ...(input.DefaultArguments != null && { - DefaultArguments: se_OrchestrationArgumentsMap(input.DefaultArguments, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IdleTimeout != null && { IdleTimeout: input.IdleTimeout }), - ...(input.MaxCapacity != null && { MaxCapacity: __serializeFloat(input.MaxCapacity) }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - ...(input.Role != null && { Role: input.Role }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; +const se_ListDataQualityRulesetEvaluationRunsRequest = ( + input: ListDataQualityRulesetEvaluationRunsRequest, + context: __SerdeContext +): any => { + return take(input, { + Filter: (_) => se_DataQualityRulesetEvaluationRunFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** - * serializeAws_json1_1CreateTableRequest + * serializeAws_json1_1ListDataQualityRulesetsRequest */ -const se_CreateTableRequest = (input: CreateTableRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionIndexes != null && { PartitionIndexes: se_PartitionIndexList(input.PartitionIndexes, context) }), - ...(input.TableInput != null && { TableInput: se_TableInput(input.TableInput, context) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; +const se_ListDataQualityRulesetsRequest = (input: ListDataQualityRulesetsRequest, context: __SerdeContext): any => { + return take(input, { + Filter: (_) => se_DataQualityRulesetFilterCriteria(_, context), + MaxResults: [], + NextToken: [], + Tags: _json, + }); }; +// se_ListDevEndpointsRequest omitted. + +// se_ListJobsRequest omitted. + /** - * serializeAws_json1_1CreateTriggerRequest + * serializeAws_json1_1ListMLTransformsRequest */ -const se_CreateTriggerRequest = (input: CreateTriggerRequest, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_ActionList(input.Actions, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBatchingCondition != null && { - EventBatchingCondition: se_EventBatchingCondition(input.EventBatchingCondition, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Predicate != null && { Predicate: se_Predicate(input.Predicate, context) }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.StartOnCreation != null && { StartOnCreation: input.StartOnCreation }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.WorkflowName != null && { WorkflowName: input.WorkflowName }), - }; +const se_ListMLTransformsRequest = (input: ListMLTransformsRequest, context: __SerdeContext): any => { + return take(input, { + Filter: (_) => se_TransformFilterCriteria(_, context), + MaxResults: [], + NextToken: [], + Sort: _json, + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateUserDefinedFunctionRequest - */ -const se_CreateUserDefinedFunctionRequest = (input: CreateUserDefinedFunctionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.FunctionInput != null && { FunctionInput: se_UserDefinedFunctionInput(input.FunctionInput, context) }), - }; -}; +// se_ListRegistriesInput omitted. -/** - * serializeAws_json1_1CreateWorkflowRequest - */ -const se_CreateWorkflowRequest = (input: CreateWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultRunProperties != null && { - DefaultRunProperties: se_WorkflowRunProperties(input.DefaultRunProperties, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.MaxConcurrentRuns != null && { MaxConcurrentRuns: input.MaxConcurrentRuns }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; +// se_ListSchemasInput omitted. -/** - * serializeAws_json1_1CreateXMLClassifierRequest - */ -const se_CreateXMLClassifierRequest = (input: CreateXMLClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RowTag != null && { RowTag: input.RowTag }), - }; -}; +// se_ListSchemaVersionsInput omitted. -/** - * serializeAws_json1_1CsvHeader - */ -const se_CsvHeader = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListSessionsRequest omitted. -/** - * serializeAws_json1_1CustomCode - */ -const se_CustomCode = (input: CustomCode, context: __SerdeContext): any => { - return { - ...(input.ClassName != null && { ClassName: input.ClassName }), - ...(input.Code != null && { Code: input.Code }), - ...(input.Inputs != null && { Inputs: se_ManyInputs(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - }; -}; +// se_ListStatementsRequest omitted. -/** - * serializeAws_json1_1CustomDatatypes - */ -const se_CustomDatatypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListTriggersRequest omitted. -/** - * serializeAws_json1_1CustomEntityTypeNames - */ -const se_CustomEntityTypeNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListWorkflowsRequest omitted. -/** - * serializeAws_json1_1DagEdges - */ -const se_DagEdges = (input: CodeGenEdge[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CodeGenEdge(entry, context); - }); -}; +// se_Location omitted. -/** - * serializeAws_json1_1DagNodes - */ -const se_DagNodes = (input: CodeGenNode[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CodeGenNode(entry, context); - }); -}; +// se_LocationMap omitted. -/** - * serializeAws_json1_1DatabaseIdentifier - */ -const se_DatabaseIdentifier = (input: DatabaseIdentifier, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - }; -}; +// se_LocationStringList omitted. -/** - * serializeAws_json1_1DatabaseInput - */ -const se_DatabaseInput = (input: DatabaseInput, context: __SerdeContext): any => { - return { - ...(input.CreateTableDefaultPermissions != null && { - CreateTableDefaultPermissions: se_PrincipalPermissionsList(input.CreateTableDefaultPermissions, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FederatedDatabase != null && { - FederatedDatabase: se_FederatedDatabase(input.FederatedDatabase, context), - }), - ...(input.LocationUri != null && { LocationUri: input.LocationUri }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.TargetDatabase != null && { TargetDatabase: se_DatabaseIdentifier(input.TargetDatabase, context) }), - }; -}; +// se_LongColumnStatisticsData omitted. -/** - * serializeAws_json1_1DataCatalogEncryptionSettings - */ -const se_DataCatalogEncryptionSettings = (input: DataCatalogEncryptionSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectionPasswordEncryption != null && { - ConnectionPasswordEncryption: se_ConnectionPasswordEncryption(input.ConnectionPasswordEncryption, context), - }), - ...(input.EncryptionAtRest != null && { EncryptionAtRest: se_EncryptionAtRest(input.EncryptionAtRest, context) }), - }; -}; +// se_ManyInputs omitted. /** - * serializeAws_json1_1DataLakePrincipal + * serializeAws_json1_1Mapping */ -const se_DataLakePrincipal = (input: DataLakePrincipal, context: __SerdeContext): any => { - return { - ...(input.DataLakePrincipalIdentifier != null && { - DataLakePrincipalIdentifier: input.DataLakePrincipalIdentifier, - }), - }; +const se_Mapping = (input: Mapping, context: __SerdeContext): any => { + return take(input, { + Children: (_) => se_Mappings(_, context), + Dropped: [], + FromPath: _json, + FromType: [], + ToKey: [], + ToType: [], + }); }; -/** - * serializeAws_json1_1DataQualityEvaluationRunAdditionalRunOptions - */ -const se_DataQualityEvaluationRunAdditionalRunOptions = ( - input: DataQualityEvaluationRunAdditionalRunOptions, - context: __SerdeContext -): any => { - return { - ...(input.CloudWatchMetricsEnabled != null && { CloudWatchMetricsEnabled: input.CloudWatchMetricsEnabled }), - ...(input.ResultsS3Prefix != null && { ResultsS3Prefix: input.ResultsS3Prefix }), - }; -}; +// se_MappingEntry omitted. -/** - * serializeAws_json1_1DataQualityResultFilterCriteria - */ -const se_DataQualityResultFilterCriteria = (input: DataQualityResultFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobRunId != null && { JobRunId: input.JobRunId }), - ...(input.StartedAfter != null && { StartedAfter: Math.round(input.StartedAfter.getTime() / 1000) }), - ...(input.StartedBefore != null && { StartedBefore: Math.round(input.StartedBefore.getTime() / 1000) }), - }; -}; +// se_MappingList omitted. /** - * serializeAws_json1_1DataQualityResultIds + * serializeAws_json1_1Mappings */ -const se_DataQualityResultIds = (input: string[], context: __SerdeContext): any => { +const se_Mappings = (input: Mapping[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_Mapping(entry, context); }); }; -/** - * serializeAws_json1_1DataQualityRuleRecommendationRunFilter - */ -const se_DataQualityRuleRecommendationRunFilter = ( - input: DataQualityRuleRecommendationRunFilter, - context: __SerdeContext -): any => { - return { - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.StartedAfter != null && { StartedAfter: Math.round(input.StartedAfter.getTime() / 1000) }), - ...(input.StartedBefore != null && { StartedBefore: Math.round(input.StartedBefore.getTime() / 1000) }), - }; -}; +// se_MapValue omitted. -/** - * serializeAws_json1_1DataQualityRulesetEvaluationRunFilter - */ -const se_DataQualityRulesetEvaluationRunFilter = ( - input: DataQualityRulesetEvaluationRunFilter, - context: __SerdeContext -): any => { - return { - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.StartedAfter != null && { StartedAfter: Math.round(input.StartedAfter.getTime() / 1000) }), - ...(input.StartedBefore != null && { StartedBefore: Math.round(input.StartedBefore.getTime() / 1000) }), - }; -}; +// se_MatchCriteria omitted. -/** - * serializeAws_json1_1DataQualityRulesetFilterCriteria - */ -const se_DataQualityRulesetFilterCriteria = (input: DataQualityRulesetFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LastModifiedAfter != null && { LastModifiedAfter: Math.round(input.LastModifiedAfter.getTime() / 1000) }), - ...(input.LastModifiedBefore != null && { - LastModifiedBefore: Math.round(input.LastModifiedBefore.getTime() / 1000), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetTable != null && { TargetTable: se_DataQualityTargetTable(input.TargetTable, context) }), - }; -}; +// se_Merge omitted. -/** - * serializeAws_json1_1DataQualityTargetTable - */ -const se_DataQualityTargetTable = (input: DataQualityTargetTable, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_MetadataKeyValuePair omitted. -/** - * serializeAws_json1_1DataSource - */ -const se_DataSource = (input: DataSource, context: __SerdeContext): any => { - return { - ...(input.GlueTable != null && { GlueTable: se_GlueTable(input.GlueTable, context) }), - }; -}; +// se_MetadataList omitted. -/** - * serializeAws_json1_1Datatype - */ -const se_Datatype = (input: Datatype, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Label != null && { Label: input.Label }), - }; -}; +// se_MicrosoftSQLServerCatalogSource omitted. -/** - * serializeAws_json1_1DateColumnStatisticsData - */ -const se_DateColumnStatisticsData = (input: DateColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.MaximumValue != null && { MaximumValue: Math.round(input.MaximumValue.getTime() / 1000) }), - ...(input.MinimumValue != null && { MinimumValue: Math.round(input.MinimumValue.getTime() / 1000) }), - ...(input.NumberOfDistinctValues != null && { NumberOfDistinctValues: input.NumberOfDistinctValues }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - }; -}; +// se_MicrosoftSQLServerCatalogTarget omitted. -/** - * serializeAws_json1_1DecimalColumnStatisticsData - */ -const se_DecimalColumnStatisticsData = (input: DecimalColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.MaximumValue != null && { MaximumValue: se_DecimalNumber(input.MaximumValue, context) }), - ...(input.MinimumValue != null && { MinimumValue: se_DecimalNumber(input.MinimumValue, context) }), - ...(input.NumberOfDistinctValues != null && { NumberOfDistinctValues: input.NumberOfDistinctValues }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - }; -}; +// se_MLUserDataEncryption omitted. -/** - * serializeAws_json1_1DecimalNumber - */ -const se_DecimalNumber = (input: DecimalNumber, context: __SerdeContext): any => { - return { - ...(input.Scale != null && { Scale: input.Scale }), - ...(input.UnscaledValue != null && { UnscaledValue: context.base64Encoder(input.UnscaledValue) }), - }; -}; +// se_MongoDBTarget omitted. -/** - * serializeAws_json1_1DeleteBlueprintRequest - */ -const se_DeleteBlueprintRequest = (input: DeleteBlueprintRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_MongoDBTargetList omitted. -/** - * serializeAws_json1_1DeleteClassifierRequest - */ -const se_DeleteClassifierRequest = (input: DeleteClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_MySQLCatalogSource omitted. -/** - * serializeAws_json1_1DeleteColumnStatisticsForPartitionRequest - */ -const se_DeleteColumnStatisticsForPartitionRequest = ( - input: DeleteColumnStatisticsForPartitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionValues != null && { PartitionValues: se_ValueStringList(input.PartitionValues, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_MySQLCatalogTarget omitted. + +// se_NameStringList omitted. + +// se_NodeIdList omitted. + +// se_NotificationProperty omitted. + +// se_NullCheckBoxList omitted. + +// se_NullValueField omitted. + +// se_NullValueFields omitted. + +// se_OneInput omitted. + +// se_OracleSQLCatalogSource omitted. + +// se_OracleSQLCatalogTarget omitted. + +// se_OrchestrationArgumentsMap omitted. + +// se_OrchestrationStringList omitted. + +// se_Order omitted. + +// se_OrderList omitted. + +// se_ParametersMap omitted. + +// se_PartitionIndex omitted. + +// se_PartitionIndexList omitted. /** - * serializeAws_json1_1DeleteColumnStatisticsForTableRequest + * serializeAws_json1_1PartitionInput */ -const se_DeleteColumnStatisticsForTableRequest = ( - input: DeleteColumnStatisticsForTableRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; +const se_PartitionInput = (input: PartitionInput, context: __SerdeContext): any => { + return take(input, { + LastAccessTime: (_) => Math.round(_.getTime() / 1000), + LastAnalyzedTime: (_) => Math.round(_.getTime() / 1000), + Parameters: _json, + StorageDescriptor: _json, + Values: _json, + }); }; /** - * serializeAws_json1_1DeleteConnectionNameList + * serializeAws_json1_1PartitionInputList */ -const se_DeleteConnectionNameList = (input: string[], context: __SerdeContext): any => { +const se_PartitionInputList = (input: PartitionInput[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_PartitionInput(entry, context); }); }; -/** - * serializeAws_json1_1DeleteConnectionRequest - */ -const se_DeleteConnectionRequest = (input: DeleteConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - }; -}; +// se_PartitionValueList omitted. -/** - * serializeAws_json1_1DeleteCrawlerRequest - */ -const se_DeleteCrawlerRequest = (input: DeleteCrawlerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_PathList omitted. -/** - * serializeAws_json1_1DeleteCustomEntityTypeRequest - */ -const se_DeleteCustomEntityTypeRequest = (input: DeleteCustomEntityTypeRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_PermissionList omitted. -/** - * serializeAws_json1_1DeleteDatabaseRequest - */ -const se_DeleteDatabaseRequest = (input: DeleteDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_PermissionTypeList omitted. -/** - * serializeAws_json1_1DeleteDataQualityRulesetRequest - */ -const se_DeleteDataQualityRulesetRequest = (input: DeleteDataQualityRulesetRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_PhysicalConnectionRequirements omitted. /** - * serializeAws_json1_1DeleteDevEndpointRequest + * serializeAws_json1_1PIIDetection */ -const se_DeleteDevEndpointRequest = (input: DeleteDevEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; +const se_PIIDetection = (input: PIIDetection, context: __SerdeContext): any => { + return take(input, { + EntityTypesToDetect: _json, + Inputs: _json, + MaskValue: [], + Name: [], + OutputColumnName: [], + PiiType: [], + SampleFraction: __serializeFloat, + ThresholdFraction: __serializeFloat, + }); }; -/** - * serializeAws_json1_1DeleteJobRequest - */ -const se_DeleteJobRequest = (input: DeleteJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - }; -}; +// se_PostgreSQLCatalogSource omitted. -/** - * serializeAws_json1_1DeleteMLTransformRequest - */ -const se_DeleteMLTransformRequest = (input: DeleteMLTransformRequest, context: __SerdeContext): any => { - return { - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; +// se_PostgreSQLCatalogTarget omitted. -/** - * serializeAws_json1_1DeletePartitionIndexRequest - */ -const se_DeletePartitionIndexRequest = (input: DeletePartitionIndexRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_Predicate omitted. -/** - * serializeAws_json1_1DeletePartitionRequest - */ -const se_DeletePartitionRequest = (input: DeletePartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionValues != null && { PartitionValues: se_ValueStringList(input.PartitionValues, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_PrincipalPermissions omitted. -/** - * serializeAws_json1_1DeleteRegistryInput - */ -const se_DeleteRegistryInput = (input: DeleteRegistryInput, context: __SerdeContext): any => { - return { - ...(input.RegistryId != null && { RegistryId: se_RegistryId(input.RegistryId, context) }), - }; -}; +// se_PrincipalPermissionsList omitted. -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyHashCondition != null && { PolicyHashCondition: input.PolicyHashCondition }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_PropertyPredicate omitted. -/** - * serializeAws_json1_1DeleteSchemaInput - */ -const se_DeleteSchemaInput = (input: DeleteSchemaInput, context: __SerdeContext): any => { - return { - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteSchemaVersionsInput - */ -const se_DeleteSchemaVersionsInput = (input: DeleteSchemaVersionsInput, context: __SerdeContext): any => { - return { - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.Versions != null && { Versions: input.Versions }), - }; -}; - -/** - * serializeAws_json1_1DeleteSecurityConfigurationRequest - */ -const se_DeleteSecurityConfigurationRequest = ( - input: DeleteSecurityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DeleteSessionRequest - */ -const se_DeleteSessionRequest = (input: DeleteSessionRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - }; -}; - -/** - * serializeAws_json1_1DeleteTableRequest - */ -const se_DeleteTableRequest = (input: DeleteTableRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; -}; - -/** - * serializeAws_json1_1DeleteTableVersionRequest - */ -const se_DeleteTableVersionRequest = (input: DeleteTableVersionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_json1_1DeleteTriggerRequest - */ -const se_DeleteTriggerRequest = (input: DeleteTriggerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DeleteUserDefinedFunctionRequest - */ -const se_DeleteUserDefinedFunctionRequest = (input: DeleteUserDefinedFunctionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteWorkflowRequest - */ -const se_DeleteWorkflowRequest = (input: DeleteWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DeltaTarget - */ -const se_DeltaTarget = (input: DeltaTarget, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.CreateNativeDeltaTable != null && { CreateNativeDeltaTable: input.CreateNativeDeltaTable }), - ...(input.DeltaTables != null && { DeltaTables: se_PathList(input.DeltaTables, context) }), - ...(input.WriteManifest != null && { WriteManifest: input.WriteManifest }), - }; -}; - -/** - * serializeAws_json1_1DeltaTargetList - */ -const se_DeltaTargetList = (input: DeltaTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeltaTarget(entry, context); - }); -}; - -/** - * serializeAws_json1_1DevEndpointCustomLibraries - */ -const se_DevEndpointCustomLibraries = (input: DevEndpointCustomLibraries, context: __SerdeContext): any => { - return { - ...(input.ExtraJarsS3Path != null && { ExtraJarsS3Path: input.ExtraJarsS3Path }), - ...(input.ExtraPythonLibsS3Path != null && { ExtraPythonLibsS3Path: input.ExtraPythonLibsS3Path }), - }; -}; - -/** - * serializeAws_json1_1DevEndpointNames - */ -const se_DevEndpointNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1DirectJDBCSource - */ -const se_DirectJDBCSource = (input: DirectJDBCSource, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedshiftTmpDir != null && { RedshiftTmpDir: input.RedshiftTmpDir }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1DirectKafkaSource - */ -const se_DirectKafkaSource = (input: DirectKafkaSource, context: __SerdeContext): any => { - return { - ...(input.DataPreviewOptions != null && { - DataPreviewOptions: se_StreamingDataPreviewOptions(input.DataPreviewOptions, context), - }), - ...(input.DetectSchema != null && { DetectSchema: input.DetectSchema }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StreamingOptions != null && { - StreamingOptions: se_KafkaStreamingSourceOptions(input.StreamingOptions, context), - }), - ...(input.WindowSize != null && { WindowSize: input.WindowSize }), - }; -}; - -/** - * serializeAws_json1_1DirectKinesisSource - */ -const se_DirectKinesisSource = (input: DirectKinesisSource, context: __SerdeContext): any => { - return { - ...(input.DataPreviewOptions != null && { - DataPreviewOptions: se_StreamingDataPreviewOptions(input.DataPreviewOptions, context), - }), - ...(input.DetectSchema != null && { DetectSchema: input.DetectSchema }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StreamingOptions != null && { - StreamingOptions: se_KinesisStreamingSourceOptions(input.StreamingOptions, context), - }), - ...(input.WindowSize != null && { WindowSize: input.WindowSize }), - }; -}; - -/** - * serializeAws_json1_1DirectSchemaChangePolicy - */ -const se_DirectSchemaChangePolicy = (input: DirectSchemaChangePolicy, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.EnableUpdateCatalog != null && { EnableUpdateCatalog: input.EnableUpdateCatalog }), - ...(input.Table != null && { Table: input.Table }), - ...(input.UpdateBehavior != null && { UpdateBehavior: input.UpdateBehavior }), - }; -}; - -/** - * serializeAws_json1_1DoubleColumnStatisticsData - */ -const se_DoubleColumnStatisticsData = (input: DoubleColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.MaximumValue != null && { MaximumValue: __serializeFloat(input.MaximumValue) }), - ...(input.MinimumValue != null && { MinimumValue: __serializeFloat(input.MinimumValue) }), - ...(input.NumberOfDistinctValues != null && { NumberOfDistinctValues: input.NumberOfDistinctValues }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - }; -}; - -/** - * serializeAws_json1_1DQResultsPublishingOptions - */ -const se_DQResultsPublishingOptions = (input: DQResultsPublishingOptions, context: __SerdeContext): any => { - return { - ...(input.CloudWatchMetricsEnabled != null && { CloudWatchMetricsEnabled: input.CloudWatchMetricsEnabled }), - ...(input.EvaluationContext != null && { EvaluationContext: input.EvaluationContext }), - ...(input.ResultsPublishingEnabled != null && { ResultsPublishingEnabled: input.ResultsPublishingEnabled }), - ...(input.ResultsS3Prefix != null && { ResultsS3Prefix: input.ResultsS3Prefix }), - }; -}; - -/** - * serializeAws_json1_1DQStopJobOnFailureOptions - */ -const se_DQStopJobOnFailureOptions = (input: DQStopJobOnFailureOptions, context: __SerdeContext): any => { - return { - ...(input.StopJobOnFailureTiming != null && { StopJobOnFailureTiming: input.StopJobOnFailureTiming }), - }; -}; - -/** - * serializeAws_json1_1DropDuplicates - */ -const se_DropDuplicates = (input: DropDuplicates, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_LimitedPathList(input.Columns, context) }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DropFields - */ -const se_DropFields = (input: DropFields, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Paths != null && { Paths: se_GlueStudioPathList(input.Paths, context) }), - }; -}; - -/** - * serializeAws_json1_1DropNullFields - */ -const se_DropNullFields = (input: DropNullFields, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NullCheckBoxList != null && { NullCheckBoxList: se_NullCheckBoxList(input.NullCheckBoxList, context) }), - ...(input.NullTextList != null && { NullTextList: se_NullValueFields(input.NullTextList, context) }), - }; -}; - -/** - * serializeAws_json1_1DynamicTransform - */ -const se_DynamicTransform = (input: DynamicTransform, context: __SerdeContext): any => { - return { - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_TransformConfigParameterList(input.Parameters, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.TransformName != null && { TransformName: input.TransformName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1DynamoDBCatalogSource - */ -const se_DynamoDBCatalogSource = (input: DynamoDBCatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1DynamoDBTarget - */ -const se_DynamoDBTarget = (input: DynamoDBTarget, context: __SerdeContext): any => { - return { - ...(input.Path != null && { Path: input.Path }), - ...(input.scanAll != null && { scanAll: input.scanAll }), - ...(input.scanRate != null && { scanRate: __serializeFloat(input.scanRate) }), - }; -}; - -/** - * serializeAws_json1_1DynamoDBTargetList - */ -const se_DynamoDBTargetList = (input: DynamoDBTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DynamoDBTarget(entry, context); - }); -}; - -/** - * serializeAws_json1_1EnableAdditionalMetadata - */ -const se_EnableAdditionalMetadata = (input: (JdbcMetadataEntry | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1EnclosedInStringProperties - */ -const se_EnclosedInStringProperties = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1EnclosedInStringPropertiesMinOne - */ -const se_EnclosedInStringPropertiesMinOne = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1EncryptionAtRest - */ -const se_EncryptionAtRest = (input: EncryptionAtRest, context: __SerdeContext): any => { - return { - ...(input.CatalogEncryptionMode != null && { CatalogEncryptionMode: input.CatalogEncryptionMode }), - ...(input.SseAwsKmsKeyId != null && { SseAwsKmsKeyId: input.SseAwsKmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.CloudWatchEncryption != null && { - CloudWatchEncryption: se_CloudWatchEncryption(input.CloudWatchEncryption, context), - }), - ...(input.JobBookmarksEncryption != null && { - JobBookmarksEncryption: se_JobBookmarksEncryption(input.JobBookmarksEncryption, context), - }), - ...(input.S3Encryption != null && { S3Encryption: se_S3EncryptionList(input.S3Encryption, context) }), - }; -}; - -/** - * serializeAws_json1_1EvaluateDataQuality - */ -const se_EvaluateDataQuality = (input: EvaluateDataQuality, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Output != null && { Output: input.Output }), - ...(input.PublishingOptions != null && { - PublishingOptions: se_DQResultsPublishingOptions(input.PublishingOptions, context), - }), - ...(input.Ruleset != null && { Ruleset: input.Ruleset }), - ...(input.StopJobOnFailureOptions != null && { - StopJobOnFailureOptions: se_DQStopJobOnFailureOptions(input.StopJobOnFailureOptions, context), - }), - }; -}; - -/** - * serializeAws_json1_1EventBatchingCondition - */ -const se_EventBatchingCondition = (input: EventBatchingCondition, context: __SerdeContext): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.BatchWindow != null && { BatchWindow: input.BatchWindow }), - }; -}; - -/** - * serializeAws_json1_1ExecutionProperty - */ -const se_ExecutionProperty = (input: ExecutionProperty, context: __SerdeContext): any => { - return { - ...(input.MaxConcurrentRuns != null && { MaxConcurrentRuns: input.MaxConcurrentRuns }), - }; -}; - -/** - * serializeAws_json1_1FederatedDatabase - */ -const se_FederatedDatabase = (input: FederatedDatabase, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.Identifier != null && { Identifier: input.Identifier }), - }; -}; - -/** - * serializeAws_json1_1FillMissingValues - */ -const se_FillMissingValues = (input: FillMissingValues, context: __SerdeContext): any => { - return { - ...(input.FilledPath != null && { FilledPath: input.FilledPath }), - ...(input.ImputedPath != null && { ImputedPath: input.ImputedPath }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterExpressions(input.Filters, context) }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.LogicalOperator != null && { LogicalOperator: input.LogicalOperator }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1FilterExpression - */ -const se_FilterExpression = (input: FilterExpression, context: __SerdeContext): any => { - return { - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1FilterExpressions - */ -const se_FilterExpressions = (input: FilterExpression[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterExpression(entry, context); - }); -}; - -/** - * serializeAws_json1_1FilterValue - */ -const se_FilterValue = (input: FilterValue, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: se_EnclosedInStringProperties(input.Value, context) }), - }; -}; - -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: FilterValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterValue(entry, context); - }); -}; - -/** - * serializeAws_json1_1FindMatchesParameters - */ -const se_FindMatchesParameters = (input: FindMatchesParameters, context: __SerdeContext): any => { - return { - ...(input.AccuracyCostTradeoff != null && { AccuracyCostTradeoff: __serializeFloat(input.AccuracyCostTradeoff) }), - ...(input.EnforceProvidedLabels != null && { EnforceProvidedLabels: input.EnforceProvidedLabels }), - ...(input.PrecisionRecallTradeoff != null && { - PrecisionRecallTradeoff: __serializeFloat(input.PrecisionRecallTradeoff), - }), - ...(input.PrimaryKeyColumnName != null && { PrimaryKeyColumnName: input.PrimaryKeyColumnName }), - }; -}; - -/** - * serializeAws_json1_1GenericMap - */ -const se_GenericMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1GetBlueprintRequest - */ -const se_GetBlueprintRequest = (input: GetBlueprintRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeBlueprint != null && { IncludeBlueprint: input.IncludeBlueprint }), - ...(input.IncludeParameterSpec != null && { IncludeParameterSpec: input.IncludeParameterSpec }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetBlueprintRunRequest - */ -const se_GetBlueprintRunRequest = (input: GetBlueprintRunRequest, context: __SerdeContext): any => { - return { - ...(input.BlueprintName != null && { BlueprintName: input.BlueprintName }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetBlueprintRunsRequest - */ -const se_GetBlueprintRunsRequest = (input: GetBlueprintRunsRequest, context: __SerdeContext): any => { - return { - ...(input.BlueprintName != null && { BlueprintName: input.BlueprintName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetCatalogImportStatusRequest - */ -const se_GetCatalogImportStatusRequest = (input: GetCatalogImportStatusRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - }; -}; - -/** - * serializeAws_json1_1GetClassifierRequest - */ -const se_GetClassifierRequest = (input: GetClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetClassifiersRequest - */ -const se_GetClassifiersRequest = (input: GetClassifiersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetColumnNamesList - */ -const se_GetColumnNamesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1GetColumnStatisticsForPartitionRequest - */ -const se_GetColumnStatisticsForPartitionRequest = ( - input: GetColumnStatisticsForPartitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnNames != null && { ColumnNames: se_GetColumnNamesList(input.ColumnNames, context) }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionValues != null && { PartitionValues: se_ValueStringList(input.PartitionValues, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetColumnStatisticsForTableRequest - */ -const se_GetColumnStatisticsForTableRequest = ( - input: GetColumnStatisticsForTableRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnNames != null && { ColumnNames: se_GetColumnNamesList(input.ColumnNames, context) }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetConnectionRequest - */ -const se_GetConnectionRequest = (input: GetConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.HidePassword != null && { HidePassword: input.HidePassword }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetConnectionsFilter - */ -const se_GetConnectionsFilter = (input: GetConnectionsFilter, context: __SerdeContext): any => { - return { - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.MatchCriteria != null && { MatchCriteria: se_MatchCriteria(input.MatchCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1GetConnectionsRequest - */ -const se_GetConnectionsRequest = (input: GetConnectionsRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Filter != null && { Filter: se_GetConnectionsFilter(input.Filter, context) }), - ...(input.HidePassword != null && { HidePassword: input.HidePassword }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetCrawlerMetricsRequest - */ -const se_GetCrawlerMetricsRequest = (input: GetCrawlerMetricsRequest, context: __SerdeContext): any => { - return { - ...(input.CrawlerNameList != null && { CrawlerNameList: se_CrawlerNameList(input.CrawlerNameList, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetCrawlerRequest - */ -const se_GetCrawlerRequest = (input: GetCrawlerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetCrawlersRequest - */ -const se_GetCrawlersRequest = (input: GetCrawlersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetCustomEntityTypeRequest - */ -const se_GetCustomEntityTypeRequest = (input: GetCustomEntityTypeRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetDatabaseRequest - */ -const se_GetDatabaseRequest = (input: GetDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetDatabasesRequest - */ -const se_GetDatabasesRequest = (input: GetDatabasesRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceShareType != null && { ResourceShareType: input.ResourceShareType }), - }; -}; - -/** - * serializeAws_json1_1GetDataCatalogEncryptionSettingsRequest - */ -const se_GetDataCatalogEncryptionSettingsRequest = ( - input: GetDataCatalogEncryptionSettingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - }; -}; - -/** - * serializeAws_json1_1GetDataflowGraphRequest - */ -const se_GetDataflowGraphRequest = (input: GetDataflowGraphRequest, context: __SerdeContext): any => { - return { - ...(input.PythonScript != null && { PythonScript: input.PythonScript }), - }; -}; - -/** - * serializeAws_json1_1GetDataQualityResultRequest - */ -const se_GetDataQualityResultRequest = (input: GetDataQualityResultRequest, context: __SerdeContext): any => { - return { - ...(input.ResultId != null && { ResultId: input.ResultId }), - }; -}; - -/** - * serializeAws_json1_1GetDataQualityRuleRecommendationRunRequest - */ -const se_GetDataQualityRuleRecommendationRunRequest = ( - input: GetDataQualityRuleRecommendationRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetDataQualityRulesetEvaluationRunRequest - */ -const se_GetDataQualityRulesetEvaluationRunRequest = ( - input: GetDataQualityRulesetEvaluationRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetDataQualityRulesetRequest - */ -const se_GetDataQualityRulesetRequest = (input: GetDataQualityRulesetRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetDevEndpointRequest - */ -const se_GetDevEndpointRequest = (input: GetDevEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; -}; - -/** - * serializeAws_json1_1GetDevEndpointsRequest - */ -const se_GetDevEndpointsRequest = (input: GetDevEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetJobBookmarkRequest - */ -const se_GetJobBookmarkRequest = (input: GetJobBookmarkRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetJobRequest - */ -const se_GetJobRequest = (input: GetJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - }; -}; - -/** - * serializeAws_json1_1GetJobRunRequest - */ -const se_GetJobRunRequest = (input: GetJobRunRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.PredecessorsIncluded != null && { PredecessorsIncluded: input.PredecessorsIncluded }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetJobRunsRequest - */ -const se_GetJobRunsRequest = (input: GetJobRunsRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetJobsRequest - */ -const se_GetJobsRequest = (input: GetJobsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetMappingRequest - */ -const se_GetMappingRequest = (input: GetMappingRequest, context: __SerdeContext): any => { - return { - ...(input.Location != null && { Location: se_Location(input.Location, context) }), - ...(input.Sinks != null && { Sinks: se_CatalogEntries(input.Sinks, context) }), - ...(input.Source != null && { Source: se_CatalogEntry(input.Source, context) }), - }; -}; - -/** - * serializeAws_json1_1GetMLTaskRunRequest - */ -const se_GetMLTaskRunRequest = (input: GetMLTaskRunRequest, context: __SerdeContext): any => { - return { - ...(input.TaskRunId != null && { TaskRunId: input.TaskRunId }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1GetMLTaskRunsRequest - */ -const se_GetMLTaskRunsRequest = (input: GetMLTaskRunsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_TaskRunFilterCriteria(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Sort != null && { Sort: se_TaskRunSortCriteria(input.Sort, context) }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1GetMLTransformRequest - */ -const se_GetMLTransformRequest = (input: GetMLTransformRequest, context: __SerdeContext): any => { - return { - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1GetMLTransformsRequest - */ -const se_GetMLTransformsRequest = (input: GetMLTransformsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_TransformFilterCriteria(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Sort != null && { Sort: se_TransformSortCriteria(input.Sort, context) }), - }; -}; - -/** - * serializeAws_json1_1GetPartitionIndexesRequest - */ -const se_GetPartitionIndexesRequest = (input: GetPartitionIndexesRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetPartitionRequest - */ -const se_GetPartitionRequest = (input: GetPartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionValues != null && { PartitionValues: se_ValueStringList(input.PartitionValues, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetPartitionsRequest - */ -const se_GetPartitionsRequest = (input: GetPartitionsRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.ExcludeColumnSchema != null && { ExcludeColumnSchema: input.ExcludeColumnSchema }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryAsOfTime != null && { QueryAsOfTime: Math.round(input.QueryAsOfTime.getTime() / 1000) }), - ...(input.Segment != null && { Segment: se_Segment(input.Segment, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; -}; - -/** - * serializeAws_json1_1GetPlanRequest - */ -const se_GetPlanRequest = (input: GetPlanRequest, context: __SerdeContext): any => { - return { - ...(input.AdditionalPlanOptionsMap != null && { - AdditionalPlanOptionsMap: se_AdditionalPlanOptionsMap(input.AdditionalPlanOptionsMap, context), - }), - ...(input.Language != null && { Language: input.Language }), - ...(input.Location != null && { Location: se_Location(input.Location, context) }), - ...(input.Mapping != null && { Mapping: se_MappingList(input.Mapping, context) }), - ...(input.Sinks != null && { Sinks: se_CatalogEntries(input.Sinks, context) }), - ...(input.Source != null && { Source: se_CatalogEntry(input.Source, context) }), - }; -}; - -/** - * serializeAws_json1_1GetRegistryInput - */ -const se_GetRegistryInput = (input: GetRegistryInput, context: __SerdeContext): any => { - return { - ...(input.RegistryId != null && { RegistryId: se_RegistryId(input.RegistryId, context) }), - }; -}; - -/** - * serializeAws_json1_1GetResourcePoliciesRequest - */ -const se_GetResourcePoliciesRequest = (input: GetResourcePoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetResourcePolicyRequest - */ -const se_GetResourcePolicyRequest = (input: GetResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1GetSchemaByDefinitionInput - */ -const se_GetSchemaByDefinitionInput = (input: GetSchemaByDefinitionInput, context: __SerdeContext): any => { - return { - ...(input.SchemaDefinition != null && { SchemaDefinition: input.SchemaDefinition }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - }; -}; - -/** - * serializeAws_json1_1GetSchemaInput - */ -const se_GetSchemaInput = (input: GetSchemaInput, context: __SerdeContext): any => { - return { - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - }; -}; - -/** - * serializeAws_json1_1GetSchemaVersionInput - */ -const se_GetSchemaVersionInput = (input: GetSchemaVersionInput, context: __SerdeContext): any => { - return { - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SchemaVersionId != null && { SchemaVersionId: input.SchemaVersionId }), - ...(input.SchemaVersionNumber != null && { - SchemaVersionNumber: se_SchemaVersionNumber(input.SchemaVersionNumber, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetSchemaVersionsDiffInput - */ -const se_GetSchemaVersionsDiffInput = (input: GetSchemaVersionsDiffInput, context: __SerdeContext): any => { - return { - ...(input.FirstSchemaVersionNumber != null && { - FirstSchemaVersionNumber: se_SchemaVersionNumber(input.FirstSchemaVersionNumber, context), - }), - ...(input.SchemaDiffType != null && { SchemaDiffType: input.SchemaDiffType }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SecondSchemaVersionNumber != null && { - SecondSchemaVersionNumber: se_SchemaVersionNumber(input.SecondSchemaVersionNumber, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetSecurityConfigurationRequest - */ -const se_GetSecurityConfigurationRequest = (input: GetSecurityConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetSecurityConfigurationsRequest - */ -const se_GetSecurityConfigurationsRequest = (input: GetSecurityConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetSessionRequest - */ -const se_GetSessionRequest = (input: GetSessionRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - }; -}; - -/** - * serializeAws_json1_1GetStatementRequest - */ -const se_GetStatementRequest = (input: GetStatementRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1GetTableRequest - */ -const se_GetTableRequest = (input: GetTableRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QueryAsOfTime != null && { QueryAsOfTime: Math.round(input.QueryAsOfTime.getTime() / 1000) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; -}; - -/** - * serializeAws_json1_1GetTablesRequest - */ -const se_GetTablesRequest = (input: GetTablesRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryAsOfTime != null && { QueryAsOfTime: Math.round(input.QueryAsOfTime.getTime() / 1000) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; -}; - -/** - * serializeAws_json1_1GetTableVersionRequest - */ -const se_GetTableVersionRequest = (input: GetTableVersionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_json1_1GetTableVersionsRequest - */ -const se_GetTableVersionsRequest = (input: GetTableVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetTagsRequest - */ -const se_GetTagsRequest = (input: GetTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1GetTriggerRequest - */ -const se_GetTriggerRequest = (input: GetTriggerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetTriggersRequest - */ -const se_GetTriggersRequest = (input: GetTriggersRequest, context: __SerdeContext): any => { - return { - ...(input.DependentJobName != null && { DependentJobName: input.DependentJobName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetUnfilteredPartitionMetadataRequest - */ -const se_GetUnfilteredPartitionMetadataRequest = ( - input: GetUnfilteredPartitionMetadataRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuditContext != null && { AuditContext: se_AuditContext(input.AuditContext, context) }), - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionValues != null && { PartitionValues: se_ValueStringList(input.PartitionValues, context) }), - ...(input.SupportedPermissionTypes != null && { - SupportedPermissionTypes: se_PermissionTypeList(input.SupportedPermissionTypes, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetUnfilteredPartitionsMetadataRequest - */ -const se_GetUnfilteredPartitionsMetadataRequest = ( - input: GetUnfilteredPartitionsMetadataRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuditContext != null && { AuditContext: se_AuditContext(input.AuditContext, context) }), - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Segment != null && { Segment: se_Segment(input.Segment, context) }), - ...(input.SupportedPermissionTypes != null && { - SupportedPermissionTypes: se_PermissionTypeList(input.SupportedPermissionTypes, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GetUnfilteredTableMetadataRequest - */ -const se_GetUnfilteredTableMetadataRequest = ( - input: GetUnfilteredTableMetadataRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuditContext != null && { AuditContext: se_AuditContext(input.AuditContext, context) }), - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SupportedPermissionTypes != null && { - SupportedPermissionTypes: se_PermissionTypeList(input.SupportedPermissionTypes, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetUserDefinedFunctionRequest - */ -const se_GetUserDefinedFunctionRequest = (input: GetUserDefinedFunctionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - }; -}; - -/** - * serializeAws_json1_1GetUserDefinedFunctionsRequest - */ -const se_GetUserDefinedFunctionsRequest = (input: GetUserDefinedFunctionsRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Pattern != null && { Pattern: input.Pattern }), - }; -}; - -/** - * serializeAws_json1_1GetWorkflowRequest - */ -const se_GetWorkflowRequest = (input: GetWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeGraph != null && { IncludeGraph: input.IncludeGraph }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1GetWorkflowRunPropertiesRequest - */ -const se_GetWorkflowRunPropertiesRequest = (input: GetWorkflowRunPropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetWorkflowRunRequest - */ -const se_GetWorkflowRunRequest = (input: GetWorkflowRunRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeGraph != null && { IncludeGraph: input.IncludeGraph }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1GetWorkflowRunsRequest - */ -const se_GetWorkflowRunsRequest = (input: GetWorkflowRunsRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeGraph != null && { IncludeGraph: input.IncludeGraph }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GlueSchema - */ -const se_GlueSchema = (input: GlueSchema, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_GlueStudioSchemaColumnList(input.Columns, context) }), - }; -}; - -/** - * serializeAws_json1_1GlueSchemas - */ -const se_GlueSchemas = (input: GlueSchema[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GlueSchema(entry, context); - }); -}; - -/** - * serializeAws_json1_1GlueStudioPathList - */ -const se_GlueStudioPathList = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnclosedInStringProperties(entry, context); - }); -}; - -/** - * serializeAws_json1_1GlueStudioSchemaColumn - */ -const se_GlueStudioSchemaColumn = (input: GlueStudioSchemaColumn, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1GlueStudioSchemaColumnList - */ -const se_GlueStudioSchemaColumnList = (input: GlueStudioSchemaColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GlueStudioSchemaColumn(entry, context); - }); -}; - -/** - * serializeAws_json1_1GlueTable - */ -const se_GlueTable = (input: GlueTable, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_GlueTableAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1GlueTableAdditionalOptions - */ -const se_GlueTableAdditionalOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1GlueTables - */ -const se_GlueTables = (input: GlueTable[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GlueTable(entry, context); - }); -}; - -/** - * serializeAws_json1_1GovernedCatalogSource - */ -const se_GovernedCatalogSource = (input: GovernedCatalogSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3SourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionPredicate != null && { PartitionPredicate: input.PartitionPredicate }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1GovernedCatalogTarget - */ -const se_GovernedCatalogTarget = (input: GovernedCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_CatalogSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1ImportCatalogToGlueRequest - */ -const se_ImportCatalogToGlueRequest = (input: ImportCatalogToGlueRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - }; -}; - -/** - * serializeAws_json1_1JDBCConnectorOptions - */ -const se_JDBCConnectorOptions = (input: JDBCConnectorOptions, context: __SerdeContext): any => { - return { - ...(input.DataTypeMapping != null && { DataTypeMapping: se_JDBCDataTypeMapping(input.DataTypeMapping, context) }), - ...(input.FilterPredicate != null && { FilterPredicate: input.FilterPredicate }), - ...(input.JobBookmarkKeys != null && { - JobBookmarkKeys: se_EnclosedInStringProperties(input.JobBookmarkKeys, context), - }), - ...(input.JobBookmarkKeysSortOrder != null && { JobBookmarkKeysSortOrder: input.JobBookmarkKeysSortOrder }), - ...(input.LowerBound != null && { LowerBound: input.LowerBound }), - ...(input.NumPartitions != null && { NumPartitions: input.NumPartitions }), - ...(input.PartitionColumn != null && { PartitionColumn: input.PartitionColumn }), - ...(input.UpperBound != null && { UpperBound: input.UpperBound }), - }; -}; - -/** - * serializeAws_json1_1JDBCConnectorSource - */ -const se_JDBCConnectorSource = (input: JDBCConnectorSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_JDBCConnectorOptions(input.AdditionalOptions, context), - }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ConnectionTable != null && { ConnectionTable: input.ConnectionTable }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.ConnectorName != null && { ConnectorName: input.ConnectorName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Query != null && { Query: input.Query }), - }; -}; - -/** - * serializeAws_json1_1JDBCConnectorTarget - */ -const se_JDBCConnectorTarget = (input: JDBCConnectorTarget, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ConnectionTable != null && { ConnectionTable: input.ConnectionTable }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.ConnectorName != null && { ConnectorName: input.ConnectorName }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - }; -}; - -/** - * serializeAws_json1_1JDBCDataTypeMapping - */ -const se_JDBCDataTypeMapping = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [JDBCDataType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1JdbcTarget - */ -const se_JdbcTarget = (input: JdbcTarget, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.EnableAdditionalMetadata != null && { - EnableAdditionalMetadata: se_EnableAdditionalMetadata(input.EnableAdditionalMetadata, context), - }), - ...(input.Exclusions != null && { Exclusions: se_PathList(input.Exclusions, context) }), - ...(input.Path != null && { Path: input.Path }), - }; -}; - -/** - * serializeAws_json1_1JdbcTargetList - */ -const se_JdbcTargetList = (input: JdbcTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JdbcTarget(entry, context); - }); -}; - -/** - * serializeAws_json1_1JobBookmarksEncryption - */ -const se_JobBookmarksEncryption = (input: JobBookmarksEncryption, context: __SerdeContext): any => { - return { - ...(input.JobBookmarksEncryptionMode != null && { JobBookmarksEncryptionMode: input.JobBookmarksEncryptionMode }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }; -}; - -/** - * serializeAws_json1_1JobCommand - */ -const se_JobCommand = (input: JobCommand, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.PythonVersion != null && { PythonVersion: input.PythonVersion }), - ...(input.ScriptLocation != null && { ScriptLocation: input.ScriptLocation }), - }; -}; - -/** - * serializeAws_json1_1JobNameList - */ -const se_JobNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1JobUpdate - */ -const se_JobUpdate = (input: JobUpdate, context: __SerdeContext): any => { - return { - ...(input.AllocatedCapacity != null && { AllocatedCapacity: input.AllocatedCapacity }), - ...(input.CodeGenConfigurationNodes != null && { - CodeGenConfigurationNodes: se_CodeGenConfigurationNodes(input.CodeGenConfigurationNodes, context), - }), - ...(input.Command != null && { Command: se_JobCommand(input.Command, context) }), - ...(input.Connections != null && { Connections: se_ConnectionsList(input.Connections, context) }), - ...(input.DefaultArguments != null && { DefaultArguments: se_GenericMap(input.DefaultArguments, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ExecutionClass != null && { ExecutionClass: input.ExecutionClass }), - ...(input.ExecutionProperty != null && { - ExecutionProperty: se_ExecutionProperty(input.ExecutionProperty, context), - }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.LogUri != null && { LogUri: input.LogUri }), - ...(input.MaxCapacity != null && { MaxCapacity: __serializeFloat(input.MaxCapacity) }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.NonOverridableArguments != null && { - NonOverridableArguments: se_GenericMap(input.NonOverridableArguments, context), - }), - ...(input.NotificationProperty != null && { - NotificationProperty: se_NotificationProperty(input.NotificationProperty, context), - }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.Role != null && { Role: input.Role }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.SourceControlDetails != null && { - SourceControlDetails: se_SourceControlDetails(input.SourceControlDetails, context), - }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; -}; - -/** - * serializeAws_json1_1Join - */ -const se_Join = (input: Join, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_JoinColumns(input.Columns, context) }), - ...(input.Inputs != null && { Inputs: se_TwoInputs(input.Inputs, context) }), - ...(input.JoinType != null && { JoinType: input.JoinType }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1JoinColumn - */ -const se_JoinColumn = (input: JoinColumn, context: __SerdeContext): any => { - return { - ...(input.From != null && { From: input.From }), - ...(input.Keys != null && { Keys: se_GlueStudioPathList(input.Keys, context) }), - }; -}; - -/** - * serializeAws_json1_1JoinColumns - */ -const se_JoinColumns = (input: JoinColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JoinColumn(entry, context); - }); -}; - -/** - * serializeAws_json1_1KafkaStreamingSourceOptions - */ -const se_KafkaStreamingSourceOptions = (input: KafkaStreamingSourceOptions, context: __SerdeContext): any => { - return { - ...(input.AddRecordTimestamp != null && { AddRecordTimestamp: input.AddRecordTimestamp }), - ...(input.Assign != null && { Assign: input.Assign }), - ...(input.BootstrapServers != null && { BootstrapServers: input.BootstrapServers }), - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.EmitConsumerLagMetrics != null && { EmitConsumerLagMetrics: input.EmitConsumerLagMetrics }), - ...(input.EndingOffsets != null && { EndingOffsets: input.EndingOffsets }), - ...(input.IncludeHeaders != null && { IncludeHeaders: input.IncludeHeaders }), - ...(input.MaxOffsetsPerTrigger != null && { MaxOffsetsPerTrigger: input.MaxOffsetsPerTrigger }), - ...(input.MinPartitions != null && { MinPartitions: input.MinPartitions }), - ...(input.NumRetries != null && { NumRetries: input.NumRetries }), - ...(input.PollTimeoutMs != null && { PollTimeoutMs: input.PollTimeoutMs }), - ...(input.RetryIntervalMs != null && { RetryIntervalMs: input.RetryIntervalMs }), - ...(input.SecurityProtocol != null && { SecurityProtocol: input.SecurityProtocol }), - ...(input.StartingOffsets != null && { StartingOffsets: input.StartingOffsets }), - ...(input.SubscribePattern != null && { SubscribePattern: input.SubscribePattern }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; - -/** - * serializeAws_json1_1KeyList - */ -const se_KeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1KinesisStreamingSourceOptions - */ -const se_KinesisStreamingSourceOptions = (input: KinesisStreamingSourceOptions, context: __SerdeContext): any => { - return { - ...(input.AddIdleTimeBetweenReads != null && { AddIdleTimeBetweenReads: input.AddIdleTimeBetweenReads }), - ...(input.AddRecordTimestamp != null && { AddRecordTimestamp: input.AddRecordTimestamp }), - ...(input.AvoidEmptyBatches != null && { AvoidEmptyBatches: input.AvoidEmptyBatches }), - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.DescribeShardInterval != null && { DescribeShardInterval: input.DescribeShardInterval }), - ...(input.EmitConsumerLagMetrics != null && { EmitConsumerLagMetrics: input.EmitConsumerLagMetrics }), - ...(input.EndpointUrl != null && { EndpointUrl: input.EndpointUrl }), - ...(input.IdleTimeBetweenReadsInMs != null && { IdleTimeBetweenReadsInMs: input.IdleTimeBetweenReadsInMs }), - ...(input.MaxFetchRecordsPerShard != null && { MaxFetchRecordsPerShard: input.MaxFetchRecordsPerShard }), - ...(input.MaxFetchTimeInMs != null && { MaxFetchTimeInMs: input.MaxFetchTimeInMs }), - ...(input.MaxRecordPerRead != null && { MaxRecordPerRead: input.MaxRecordPerRead }), - ...(input.MaxRetryIntervalMs != null && { MaxRetryIntervalMs: input.MaxRetryIntervalMs }), - ...(input.NumRetries != null && { NumRetries: input.NumRetries }), - ...(input.RetryIntervalMs != null && { RetryIntervalMs: input.RetryIntervalMs }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RoleSessionName != null && { RoleSessionName: input.RoleSessionName }), - ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }), - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; - -/** - * serializeAws_json1_1LakeFormationConfiguration - */ -const se_LakeFormationConfiguration = (input: LakeFormationConfiguration, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.UseLakeFormationCredentials != null && { - UseLakeFormationCredentials: input.UseLakeFormationCredentials, - }), - }; -}; - -/** - * serializeAws_json1_1LimitedPathList - */ -const se_LimitedPathList = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LimitedStringList(entry, context); - }); -}; - -/** - * serializeAws_json1_1LimitedStringList - */ -const se_LimitedStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LineageConfiguration - */ -const se_LineageConfiguration = (input: LineageConfiguration, context: __SerdeContext): any => { - return { - ...(input.CrawlerLineageSettings != null && { CrawlerLineageSettings: input.CrawlerLineageSettings }), - }; -}; - -/** - * serializeAws_json1_1ListBlueprintsRequest - */ -const se_ListBlueprintsRequest = (input: ListBlueprintsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListCrawlersRequest - */ -const se_ListCrawlersRequest = (input: ListCrawlersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListCrawlsRequest - */ -const se_ListCrawlsRequest = (input: ListCrawlsRequest, context: __SerdeContext): any => { - return { - ...(input.CrawlerName != null && { CrawlerName: input.CrawlerName }), - ...(input.Filters != null && { Filters: se_CrawlsFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListCustomEntityTypesRequest - */ -const se_ListCustomEntityTypesRequest = (input: ListCustomEntityTypesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDataQualityResultsRequest - */ -const se_ListDataQualityResultsRequest = (input: ListDataQualityResultsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_DataQualityResultFilterCriteria(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDataQualityRuleRecommendationRunsRequest - */ -const se_ListDataQualityRuleRecommendationRunsRequest = ( - input: ListDataQualityRuleRecommendationRunsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filter != null && { Filter: se_DataQualityRuleRecommendationRunFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDataQualityRulesetEvaluationRunsRequest - */ -const se_ListDataQualityRulesetEvaluationRunsRequest = ( - input: ListDataQualityRulesetEvaluationRunsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filter != null && { Filter: se_DataQualityRulesetEvaluationRunFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDataQualityRulesetsRequest - */ -const se_ListDataQualityRulesetsRequest = (input: ListDataQualityRulesetsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_DataQualityRulesetFilterCriteria(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListDevEndpointsRequest - */ -const se_ListDevEndpointsRequest = (input: ListDevEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListJobsRequest - */ -const se_ListJobsRequest = (input: ListJobsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListMLTransformsRequest - */ -const se_ListMLTransformsRequest = (input: ListMLTransformsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_TransformFilterCriteria(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Sort != null && { Sort: se_TransformSortCriteria(input.Sort, context) }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListRegistriesInput - */ -const se_ListRegistriesInput = (input: ListRegistriesInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSchemasInput - */ -const se_ListSchemasInput = (input: ListSchemasInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RegistryId != null && { RegistryId: se_RegistryId(input.RegistryId, context) }), - }; -}; - -/** - * serializeAws_json1_1ListSchemaVersionsInput - */ -const se_ListSchemaVersionsInput = (input: ListSchemaVersionsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - }; -}; - -/** - * serializeAws_json1_1ListSessionsRequest - */ -const se_ListSessionsRequest = (input: ListSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListStatementsRequest - */ -const se_ListStatementsRequest = (input: ListStatementsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1ListTriggersRequest - */ -const se_ListTriggersRequest = (input: ListTriggersRequest, context: __SerdeContext): any => { - return { - ...(input.DependentJobName != null && { DependentJobName: input.DependentJobName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Tags != null && { Tags: se_TagsMap(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1ListWorkflowsRequest - */ -const se_ListWorkflowsRequest = (input: ListWorkflowsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1Location - */ -const se_Location = (input: Location, context: __SerdeContext): any => { - return { - ...(input.DynamoDB != null && { DynamoDB: se_CodeGenNodeArgs(input.DynamoDB, context) }), - ...(input.Jdbc != null && { Jdbc: se_CodeGenNodeArgs(input.Jdbc, context) }), - ...(input.S3 != null && { S3: se_CodeGenNodeArgs(input.S3, context) }), - }; -}; - -/** - * serializeAws_json1_1LocationMap - */ -const se_LocationMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1LocationStringList - */ -const se_LocationStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LongColumnStatisticsData - */ -const se_LongColumnStatisticsData = (input: LongColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.MaximumValue != null && { MaximumValue: input.MaximumValue }), - ...(input.MinimumValue != null && { MinimumValue: input.MinimumValue }), - ...(input.NumberOfDistinctValues != null && { NumberOfDistinctValues: input.NumberOfDistinctValues }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - }; -}; - -/** - * serializeAws_json1_1ManyInputs - */ -const se_ManyInputs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Mapping - */ -const se_Mapping = (input: Mapping, context: __SerdeContext): any => { - return { - ...(input.Children != null && { Children: se_Mappings(input.Children, context) }), - ...(input.Dropped != null && { Dropped: input.Dropped }), - ...(input.FromPath != null && { FromPath: se_EnclosedInStringProperties(input.FromPath, context) }), - ...(input.FromType != null && { FromType: input.FromType }), - ...(input.ToKey != null && { ToKey: input.ToKey }), - ...(input.ToType != null && { ToType: input.ToType }), - }; -}; - -/** - * serializeAws_json1_1MappingEntry - */ -const se_MappingEntry = (input: MappingEntry, context: __SerdeContext): any => { - return { - ...(input.SourcePath != null && { SourcePath: input.SourcePath }), - ...(input.SourceTable != null && { SourceTable: input.SourceTable }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.TargetPath != null && { TargetPath: input.TargetPath }), - ...(input.TargetTable != null && { TargetTable: input.TargetTable }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - }; -}; - -/** - * serializeAws_json1_1MappingList - */ -const se_MappingList = (input: MappingEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MappingEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1Mappings - */ -const se_Mappings = (input: Mapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Mapping(entry, context); - }); -}; - -/** - * serializeAws_json1_1MapValue - */ -const se_MapValue = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1MatchCriteria - */ -const se_MatchCriteria = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Merge - */ -const se_Merge = (input: Merge, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_TwoInputs(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PrimaryKeys != null && { PrimaryKeys: se_GlueStudioPathList(input.PrimaryKeys, context) }), - ...(input.Source != null && { Source: input.Source }), - }; -}; - -/** - * serializeAws_json1_1MetadataKeyValuePair - */ -const se_MetadataKeyValuePair = (input: MetadataKeyValuePair, context: __SerdeContext): any => { - return { - ...(input.MetadataKey != null && { MetadataKey: input.MetadataKey }), - ...(input.MetadataValue != null && { MetadataValue: input.MetadataValue }), - }; -}; - -/** - * serializeAws_json1_1MetadataList - */ -const se_MetadataList = (input: MetadataKeyValuePair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetadataKeyValuePair(entry, context); - }); -}; - -/** - * serializeAws_json1_1MicrosoftSQLServerCatalogSource - */ -const se_MicrosoftSQLServerCatalogSource = (input: MicrosoftSQLServerCatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1MicrosoftSQLServerCatalogTarget - */ -const se_MicrosoftSQLServerCatalogTarget = (input: MicrosoftSQLServerCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1MLUserDataEncryption - */ -const se_MLUserDataEncryption = (input: MLUserDataEncryption, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MlUserDataEncryptionMode != null && { MlUserDataEncryptionMode: input.MlUserDataEncryptionMode }), - }; -}; - -/** - * serializeAws_json1_1MongoDBTarget - */ -const se_MongoDBTarget = (input: MongoDBTarget, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.Path != null && { Path: input.Path }), - ...(input.ScanAll != null && { ScanAll: input.ScanAll }), - }; -}; - -/** - * serializeAws_json1_1MongoDBTargetList - */ -const se_MongoDBTargetList = (input: MongoDBTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MongoDBTarget(entry, context); - }); -}; - -/** - * serializeAws_json1_1MySQLCatalogSource - */ -const se_MySQLCatalogSource = (input: MySQLCatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1MySQLCatalogTarget - */ -const se_MySQLCatalogTarget = (input: MySQLCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1NameStringList - */ -const se_NameStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NodeIdList - */ -const se_NodeIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NotificationProperty - */ -const se_NotificationProperty = (input: NotificationProperty, context: __SerdeContext): any => { - return { - ...(input.NotifyDelayAfter != null && { NotifyDelayAfter: input.NotifyDelayAfter }), - }; -}; - -/** - * serializeAws_json1_1NullCheckBoxList - */ -const se_NullCheckBoxList = (input: NullCheckBoxList, context: __SerdeContext): any => { - return { - ...(input.IsEmpty != null && { IsEmpty: input.IsEmpty }), - ...(input.IsNegOne != null && { IsNegOne: input.IsNegOne }), - ...(input.IsNullString != null && { IsNullString: input.IsNullString }), - }; -}; - -/** - * serializeAws_json1_1NullValueField - */ -const se_NullValueField = (input: NullValueField, context: __SerdeContext): any => { - return { - ...(input.Datatype != null && { Datatype: se_Datatype(input.Datatype, context) }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1NullValueFields - */ -const se_NullValueFields = (input: NullValueField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NullValueField(entry, context); - }); -}; - -/** - * serializeAws_json1_1OneInput - */ -const se_OneInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OracleSQLCatalogSource - */ -const se_OracleSQLCatalogSource = (input: OracleSQLCatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1OracleSQLCatalogTarget - */ -const se_OracleSQLCatalogTarget = (input: OracleSQLCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1OrchestrationArgumentsMap - */ -const se_OrchestrationArgumentsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1OrchestrationStringList - */ -const se_OrchestrationStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Order - */ -const se_Order = (input: Order, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: input.Column }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1OrderList - */ -const se_OrderList = (input: Order[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Order(entry, context); - }); -}; - -/** - * serializeAws_json1_1ParametersMap - */ -const se_ParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1PartitionIndex - */ -const se_PartitionIndex = (input: PartitionIndex, context: __SerdeContext): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.Keys != null && { Keys: se_KeyList(input.Keys, context) }), - }; -}; - -/** - * serializeAws_json1_1PartitionIndexList - */ -const se_PartitionIndexList = (input: PartitionIndex[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PartitionIndex(entry, context); - }); -}; - -/** - * serializeAws_json1_1PartitionInput - */ -const se_PartitionInput = (input: PartitionInput, context: __SerdeContext): any => { - return { - ...(input.LastAccessTime != null && { LastAccessTime: Math.round(input.LastAccessTime.getTime() / 1000) }), - ...(input.LastAnalyzedTime != null && { LastAnalyzedTime: Math.round(input.LastAnalyzedTime.getTime() / 1000) }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.StorageDescriptor != null && { - StorageDescriptor: se_StorageDescriptor(input.StorageDescriptor, context), - }), - ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1PartitionInputList - */ -const se_PartitionInputList = (input: PartitionInput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PartitionInput(entry, context); - }); -}; - -/** - * serializeAws_json1_1PartitionValueList - */ -const se_PartitionValueList = (input: PartitionValueList, context: __SerdeContext): any => { - return { - ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1PathList - */ -const se_PathList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PermissionList - */ -const se_PermissionList = (input: (Permission | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PermissionTypeList - */ -const se_PermissionTypeList = (input: (PermissionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PhysicalConnectionRequirements - */ -const se_PhysicalConnectionRequirements = (input: PhysicalConnectionRequirements, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.SecurityGroupIdList != null && { - SecurityGroupIdList: se_SecurityGroupIdList(input.SecurityGroupIdList, context), - }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; - -/** - * serializeAws_json1_1PIIDetection - */ -const se_PIIDetection = (input: PIIDetection, context: __SerdeContext): any => { - return { - ...(input.EntityTypesToDetect != null && { - EntityTypesToDetect: se_EnclosedInStringProperties(input.EntityTypesToDetect, context), - }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.MaskValue != null && { MaskValue: input.MaskValue }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputColumnName != null && { OutputColumnName: input.OutputColumnName }), - ...(input.PiiType != null && { PiiType: input.PiiType }), - ...(input.SampleFraction != null && { SampleFraction: __serializeFloat(input.SampleFraction) }), - ...(input.ThresholdFraction != null && { ThresholdFraction: __serializeFloat(input.ThresholdFraction) }), - }; -}; - -/** - * serializeAws_json1_1PostgreSQLCatalogSource - */ -const se_PostgreSQLCatalogSource = (input: PostgreSQLCatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1PostgreSQLCatalogTarget - */ -const se_PostgreSQLCatalogTarget = (input: PostgreSQLCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1Predicate - */ -const se_Predicate = (input: Predicate, context: __SerdeContext): any => { - return { - ...(input.Conditions != null && { Conditions: se_ConditionList(input.Conditions, context) }), - ...(input.Logical != null && { Logical: input.Logical }), - }; -}; - -/** - * serializeAws_json1_1PrincipalPermissions - */ -const se_PrincipalPermissions = (input: PrincipalPermissions, context: __SerdeContext): any => { - return { - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.Principal != null && { Principal: se_DataLakePrincipal(input.Principal, context) }), - }; -}; - -/** - * serializeAws_json1_1PrincipalPermissionsList - */ -const se_PrincipalPermissionsList = (input: PrincipalPermissions[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PrincipalPermissions(entry, context); - }); -}; - -/** - * serializeAws_json1_1PropertyPredicate - */ -const se_PropertyPredicate = (input: PropertyPredicate, context: __SerdeContext): any => { - return { - ...(input.Comparator != null && { Comparator: input.Comparator }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1PublicKeysList - */ -const se_PublicKeysList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PutDataCatalogEncryptionSettingsRequest - */ -const se_PutDataCatalogEncryptionSettingsRequest = ( - input: PutDataCatalogEncryptionSettingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DataCatalogEncryptionSettings != null && { - DataCatalogEncryptionSettings: se_DataCatalogEncryptionSettings(input.DataCatalogEncryptionSettings, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.EnableHybrid != null && { EnableHybrid: input.EnableHybrid }), - ...(input.PolicyExistsCondition != null && { PolicyExistsCondition: input.PolicyExistsCondition }), - ...(input.PolicyHashCondition != null && { PolicyHashCondition: input.PolicyHashCondition }), - ...(input.PolicyInJson != null && { PolicyInJson: input.PolicyInJson }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1PutSchemaVersionMetadataInput - */ -const se_PutSchemaVersionMetadataInput = (input: PutSchemaVersionMetadataInput, context: __SerdeContext): any => { - return { - ...(input.MetadataKeyValue != null && { - MetadataKeyValue: se_MetadataKeyValuePair(input.MetadataKeyValue, context), - }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SchemaVersionId != null && { SchemaVersionId: input.SchemaVersionId }), - ...(input.SchemaVersionNumber != null && { - SchemaVersionNumber: se_SchemaVersionNumber(input.SchemaVersionNumber, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutWorkflowRunPropertiesRequest - */ -const se_PutWorkflowRunPropertiesRequest = (input: PutWorkflowRunPropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RunId != null && { RunId: input.RunId }), - ...(input.RunProperties != null && { RunProperties: se_WorkflowRunProperties(input.RunProperties, context) }), - }; -}; - -/** - * serializeAws_json1_1QuerySchemaVersionMetadataInput - */ -const se_QuerySchemaVersionMetadataInput = (input: QuerySchemaVersionMetadataInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MetadataList != null && { MetadataList: se_MetadataList(input.MetadataList, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SchemaVersionId != null && { SchemaVersionId: input.SchemaVersionId }), - ...(input.SchemaVersionNumber != null && { - SchemaVersionNumber: se_SchemaVersionNumber(input.SchemaVersionNumber, context), - }), - }; -}; - -/** - * serializeAws_json1_1RecrawlPolicy - */ -const se_RecrawlPolicy = (input: RecrawlPolicy, context: __SerdeContext): any => { - return { - ...(input.RecrawlBehavior != null && { RecrawlBehavior: input.RecrawlBehavior }), - }; -}; - -/** - * serializeAws_json1_1RedshiftSource - */ -const se_RedshiftSource = (input: RedshiftSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedshiftTmpDir != null && { RedshiftTmpDir: input.RedshiftTmpDir }), - ...(input.Table != null && { Table: input.Table }), - ...(input.TmpDirIAMRole != null && { TmpDirIAMRole: input.TmpDirIAMRole }), - }; -}; - -/** - * serializeAws_json1_1RedshiftTarget - */ -const se_RedshiftTarget = (input: RedshiftTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedshiftTmpDir != null && { RedshiftTmpDir: input.RedshiftTmpDir }), - ...(input.Table != null && { Table: input.Table }), - ...(input.TmpDirIAMRole != null && { TmpDirIAMRole: input.TmpDirIAMRole }), - ...(input.UpsertRedshiftOptions != null && { - UpsertRedshiftOptions: se_UpsertRedshiftTargetOptions(input.UpsertRedshiftOptions, context), - }), - }; -}; - -/** - * serializeAws_json1_1RegisterSchemaVersionInput - */ -const se_RegisterSchemaVersionInput = (input: RegisterSchemaVersionInput, context: __SerdeContext): any => { - return { - ...(input.SchemaDefinition != null && { SchemaDefinition: input.SchemaDefinition }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - }; -}; - -/** - * serializeAws_json1_1RegistryId - */ -const se_RegistryId = (input: RegistryId, context: __SerdeContext): any => { - return { - ...(input.RegistryArn != null && { RegistryArn: input.RegistryArn }), - ...(input.RegistryName != null && { RegistryName: input.RegistryName }), - }; -}; - -/** - * serializeAws_json1_1RelationalCatalogSource - */ -const se_RelationalCatalogSource = (input: RelationalCatalogSource, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1RemoveSchemaVersionMetadataInput - */ -const se_RemoveSchemaVersionMetadataInput = (input: RemoveSchemaVersionMetadataInput, context: __SerdeContext): any => { - return { - ...(input.MetadataKeyValue != null && { - MetadataKeyValue: se_MetadataKeyValuePair(input.MetadataKeyValue, context), - }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SchemaVersionId != null && { SchemaVersionId: input.SchemaVersionId }), - ...(input.SchemaVersionNumber != null && { - SchemaVersionNumber: se_SchemaVersionNumber(input.SchemaVersionNumber, context), - }), - }; -}; - -/** - * serializeAws_json1_1RenameField - */ -const se_RenameField = (input: RenameField, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SourcePath != null && { SourcePath: se_EnclosedInStringProperties(input.SourcePath, context) }), - ...(input.TargetPath != null && { TargetPath: se_EnclosedInStringProperties(input.TargetPath, context) }), - }; -}; - -/** - * serializeAws_json1_1ResetJobBookmarkRequest - */ -const se_ResetJobBookmarkRequest = (input: ResetJobBookmarkRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1ResourceUri - */ -const se_ResourceUri = (input: ResourceUri, context: __SerdeContext): any => { - return { - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; - -/** - * serializeAws_json1_1ResourceUriList - */ -const se_ResourceUriList = (input: ResourceUri[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceUri(entry, context); - }); -}; - -/** - * serializeAws_json1_1ResumeWorkflowRunRequest - */ -const se_ResumeWorkflowRunRequest = (input: ResumeWorkflowRunRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.NodeIds != null && { NodeIds: se_NodeIdList(input.NodeIds, context) }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1RulesetNames - */ -const se_RulesetNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RunStatementRequest - */ -const se_RunStatementRequest = (input: RunStatementRequest, context: __SerdeContext): any => { - return { - ...(input.Code != null && { Code: input.Code }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1S3CatalogDeltaSource - */ -const se_S3CatalogDeltaSource = (input: S3CatalogDeltaSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalDeltaOptions != null && { - AdditionalDeltaOptions: se_AdditionalOptions(input.AdditionalDeltaOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1S3CatalogHudiSource - */ -const se_S3CatalogHudiSource = (input: S3CatalogHudiSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalHudiOptions != null && { - AdditionalHudiOptions: se_AdditionalOptions(input.AdditionalHudiOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1S3CatalogSource - */ -const se_S3CatalogSource = (input: S3CatalogSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3SourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionPredicate != null && { PartitionPredicate: input.PartitionPredicate }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1S3CatalogTarget - */ -const se_S3CatalogTarget = (input: S3CatalogTarget, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_CatalogSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1S3CsvSource - */ -const se_S3CsvSource = (input: S3CsvSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3DirectSourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.Escaper != null && { Escaper: input.Escaper }), - ...(input.Exclusions != null && { Exclusions: se_EnclosedInStringProperties(input.Exclusions, context) }), - ...(input.GroupFiles != null && { GroupFiles: input.GroupFiles }), - ...(input.GroupSize != null && { GroupSize: input.GroupSize }), - ...(input.MaxBand != null && { MaxBand: input.MaxBand }), - ...(input.MaxFilesInBand != null && { MaxFilesInBand: input.MaxFilesInBand }), - ...(input.Multiline != null && { Multiline: input.Multiline }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OptimizePerformance != null && { OptimizePerformance: input.OptimizePerformance }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Paths != null && { Paths: se_EnclosedInStringProperties(input.Paths, context) }), - ...(input.QuoteChar != null && { QuoteChar: input.QuoteChar }), - ...(input.Recurse != null && { Recurse: input.Recurse }), - ...(input.Separator != null && { Separator: input.Separator }), - ...(input.SkipFirst != null && { SkipFirst: input.SkipFirst }), - ...(input.WithHeader != null && { WithHeader: input.WithHeader }), - ...(input.WriteHeader != null && { WriteHeader: input.WriteHeader }), - }; -}; - -/** - * serializeAws_json1_1S3DeltaCatalogTarget - */ -const se_S3DeltaCatalogTarget = (input: S3DeltaCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_CatalogSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1S3DeltaDirectTarget - */ -const se_S3DeltaDirectTarget = (input: S3DeltaDirectTarget, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_DirectSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - }; -}; - -/** - * serializeAws_json1_1S3DeltaSource - */ -const se_S3DeltaSource = (input: S3DeltaSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalDeltaOptions != null && { - AdditionalDeltaOptions: se_AdditionalOptions(input.AdditionalDeltaOptions, context), - }), - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3DirectSourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Paths != null && { Paths: se_EnclosedInStringProperties(input.Paths, context) }), - }; -}; - -/** - * serializeAws_json1_1S3DirectSourceAdditionalOptions - */ -const se_S3DirectSourceAdditionalOptions = (input: S3DirectSourceAdditionalOptions, context: __SerdeContext): any => { - return { - ...(input.BoundedFiles != null && { BoundedFiles: input.BoundedFiles }), - ...(input.BoundedSize != null && { BoundedSize: input.BoundedSize }), - ...(input.EnableSamplePath != null && { EnableSamplePath: input.EnableSamplePath }), - ...(input.SamplePath != null && { SamplePath: input.SamplePath }), - }; -}; - -/** - * serializeAws_json1_1S3DirectTarget - */ -const se_S3DirectTarget = (input: S3DirectTarget, context: __SerdeContext): any => { - return { - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_DirectSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - }; -}; - -/** - * serializeAws_json1_1S3Encryption - */ -const se_S3Encryption = (input: S3Encryption, context: __SerdeContext): any => { - return { - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.S3EncryptionMode != null && { S3EncryptionMode: input.S3EncryptionMode }), - }; -}; - -/** - * serializeAws_json1_1S3EncryptionList - */ -const se_S3EncryptionList = (input: S3Encryption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3Encryption(entry, context); - }); -}; - -/** - * serializeAws_json1_1S3GlueParquetTarget - */ -const se_S3GlueParquetTarget = (input: S3GlueParquetTarget, context: __SerdeContext): any => { - return { - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_DirectSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - }; -}; - -/** - * serializeAws_json1_1S3HudiCatalogTarget - */ -const se_S3HudiCatalogTarget = (input: S3HudiCatalogTarget, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_CatalogSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - ...(input.Table != null && { Table: input.Table }), - }; -}; - -/** - * serializeAws_json1_1S3HudiDirectTarget - */ -const se_S3HudiDirectTarget = (input: S3HudiDirectTarget, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.Format != null && { Format: input.Format }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PartitionKeys != null && { PartitionKeys: se_GlueStudioPathList(input.PartitionKeys, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_DirectSchemaChangePolicy(input.SchemaChangePolicy, context), - }), - }; -}; - -/** - * serializeAws_json1_1S3HudiSource - */ -const se_S3HudiSource = (input: S3HudiSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalHudiOptions != null && { - AdditionalHudiOptions: se_AdditionalOptions(input.AdditionalHudiOptions, context), - }), - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3DirectSourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Paths != null && { Paths: se_EnclosedInStringProperties(input.Paths, context) }), - }; -}; - -/** - * serializeAws_json1_1S3JsonSource - */ -const se_S3JsonSource = (input: S3JsonSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3DirectSourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.Exclusions != null && { Exclusions: se_EnclosedInStringProperties(input.Exclusions, context) }), - ...(input.GroupFiles != null && { GroupFiles: input.GroupFiles }), - ...(input.GroupSize != null && { GroupSize: input.GroupSize }), - ...(input.JsonPath != null && { JsonPath: input.JsonPath }), - ...(input.MaxBand != null && { MaxBand: input.MaxBand }), - ...(input.MaxFilesInBand != null && { MaxFilesInBand: input.MaxFilesInBand }), - ...(input.Multiline != null && { Multiline: input.Multiline }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Paths != null && { Paths: se_EnclosedInStringProperties(input.Paths, context) }), - ...(input.Recurse != null && { Recurse: input.Recurse }), - }; -}; - -/** - * serializeAws_json1_1S3ParquetSource - */ -const se_S3ParquetSource = (input: S3ParquetSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_S3DirectSourceAdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.Exclusions != null && { Exclusions: se_EnclosedInStringProperties(input.Exclusions, context) }), - ...(input.GroupFiles != null && { GroupFiles: input.GroupFiles }), - ...(input.GroupSize != null && { GroupSize: input.GroupSize }), - ...(input.MaxBand != null && { MaxBand: input.MaxBand }), - ...(input.MaxFilesInBand != null && { MaxFilesInBand: input.MaxFilesInBand }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.Paths != null && { Paths: se_EnclosedInStringProperties(input.Paths, context) }), - ...(input.Recurse != null && { Recurse: input.Recurse }), - }; -}; - -/** - * serializeAws_json1_1S3SourceAdditionalOptions - */ -const se_S3SourceAdditionalOptions = (input: S3SourceAdditionalOptions, context: __SerdeContext): any => { - return { - ...(input.BoundedFiles != null && { BoundedFiles: input.BoundedFiles }), - ...(input.BoundedSize != null && { BoundedSize: input.BoundedSize }), - }; -}; - -/** - * serializeAws_json1_1S3Target - */ -const se_S3Target = (input: S3Target, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.DlqEventQueueArn != null && { DlqEventQueueArn: input.DlqEventQueueArn }), - ...(input.EventQueueArn != null && { EventQueueArn: input.EventQueueArn }), - ...(input.Exclusions != null && { Exclusions: se_PathList(input.Exclusions, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.SampleSize != null && { SampleSize: input.SampleSize }), - }; -}; - -/** - * serializeAws_json1_1S3TargetList - */ -const se_S3TargetList = (input: S3Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3Target(entry, context); - }); -}; - -/** - * serializeAws_json1_1SchemaChangePolicy - */ -const se_SchemaChangePolicy = (input: SchemaChangePolicy, context: __SerdeContext): any => { - return { - ...(input.DeleteBehavior != null && { DeleteBehavior: input.DeleteBehavior }), - ...(input.UpdateBehavior != null && { UpdateBehavior: input.UpdateBehavior }), - }; -}; - -/** - * serializeAws_json1_1SchemaColumn - */ -const se_SchemaColumn = (input: SchemaColumn, context: __SerdeContext): any => { - return { - ...(input.DataType != null && { DataType: input.DataType }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SchemaId - */ -const se_SchemaId = (input: SchemaId, context: __SerdeContext): any => { - return { - ...(input.RegistryName != null && { RegistryName: input.RegistryName }), - ...(input.SchemaArn != null && { SchemaArn: input.SchemaArn }), - ...(input.SchemaName != null && { SchemaName: input.SchemaName }), - }; -}; - -/** - * serializeAws_json1_1SchemaReference - */ -const se_SchemaReference = (input: SchemaReference, context: __SerdeContext): any => { - return { - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SchemaVersionId != null && { SchemaVersionId: input.SchemaVersionId }), - ...(input.SchemaVersionNumber != null && { SchemaVersionNumber: input.SchemaVersionNumber }), - }; -}; - -/** - * serializeAws_json1_1SchemaVersionNumber - */ -const se_SchemaVersionNumber = (input: SchemaVersionNumber, context: __SerdeContext): any => { - return { - ...(input.LatestVersion != null && { LatestVersion: input.LatestVersion }), - ...(input.VersionNumber != null && { VersionNumber: input.VersionNumber }), - }; -}; - -/** - * serializeAws_json1_1SearchPropertyPredicates - */ -const se_SearchPropertyPredicates = (input: PropertyPredicate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PropertyPredicate(entry, context); - }); -}; - -/** - * serializeAws_json1_1SearchTablesRequest - */ -const se_SearchTablesRequest = (input: SearchTablesRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Filters != null && { Filters: se_SearchPropertyPredicates(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceShareType != null && { ResourceShareType: input.ResourceShareType }), - ...(input.SearchText != null && { SearchText: input.SearchText }), - ...(input.SortCriteria != null && { SortCriteria: se_SortCriteria(input.SortCriteria, context) }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Segment - */ -const se_Segment = (input: Segment, context: __SerdeContext): any => { - return { - ...(input.SegmentNumber != null && { SegmentNumber: input.SegmentNumber }), - ...(input.TotalSegments != null && { TotalSegments: input.TotalSegments }), - }; -}; - -/** - * serializeAws_json1_1SelectFields - */ -const se_SelectFields = (input: SelectFields, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Paths != null && { Paths: se_GlueStudioPathList(input.Paths, context) }), - }; -}; - -/** - * serializeAws_json1_1SelectFromCollection - */ -const se_SelectFromCollection = (input: SelectFromCollection, context: __SerdeContext): any => { - return { - ...(input.Index != null && { Index: input.Index }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SerDeInfo - */ -const se_SerDeInfo = (input: SerDeInfo, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.SerializationLibrary != null && { SerializationLibrary: input.SerializationLibrary }), - }; -}; - -/** - * serializeAws_json1_1SessionCommand - */ -const se_SessionCommand = (input: SessionCommand, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.PythonVersion != null && { PythonVersion: input.PythonVersion }), - }; -}; - -/** - * serializeAws_json1_1SkewedInfo - */ -const se_SkewedInfo = (input: SkewedInfo, context: __SerdeContext): any => { - return { - ...(input.SkewedColumnNames != null && { SkewedColumnNames: se_NameStringList(input.SkewedColumnNames, context) }), - ...(input.SkewedColumnValueLocationMaps != null && { - SkewedColumnValueLocationMaps: se_LocationMap(input.SkewedColumnValueLocationMaps, context), - }), - ...(input.SkewedColumnValues != null && { - SkewedColumnValues: se_ColumnValueStringList(input.SkewedColumnValues, context), - }), - }; -}; - -/** - * serializeAws_json1_1SortCriteria - */ -const se_SortCriteria = (input: SortCriterion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SortCriterion(entry, context); - }); -}; - -/** - * serializeAws_json1_1SortCriterion - */ -const se_SortCriterion = (input: SortCriterion, context: __SerdeContext): any => { - return { - ...(input.FieldName != null && { FieldName: input.FieldName }), - ...(input.Sort != null && { Sort: input.Sort }), - }; -}; - -/** - * serializeAws_json1_1SourceControlDetails - */ -const se_SourceControlDetails = (input: SourceControlDetails, context: __SerdeContext): any => { - return { - ...(input.AuthStrategy != null && { AuthStrategy: input.AuthStrategy }), - ...(input.AuthToken != null && { AuthToken: input.AuthToken }), - ...(input.Branch != null && { Branch: input.Branch }), - ...(input.Folder != null && { Folder: input.Folder }), - ...(input.LastCommitId != null && { LastCommitId: input.LastCommitId }), - ...(input.Owner != null && { Owner: input.Owner }), - ...(input.Provider != null && { Provider: input.Provider }), - ...(input.Repository != null && { Repository: input.Repository }), - }; -}; - -/** - * serializeAws_json1_1SparkConnectorSource - */ -const se_SparkConnectorSource = (input: SparkConnectorSource, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.ConnectorName != null && { ConnectorName: input.ConnectorName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - }; -}; - -/** - * serializeAws_json1_1SparkConnectorTarget - */ -const se_SparkConnectorTarget = (input: SparkConnectorTarget, context: __SerdeContext): any => { - return { - ...(input.AdditionalOptions != null && { - AdditionalOptions: se_AdditionalOptions(input.AdditionalOptions, context), - }), - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.ConnectorName != null && { ConnectorName: input.ConnectorName }), - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - }; -}; - -/** - * serializeAws_json1_1SparkSQL - */ -const se_SparkSQL = (input: SparkSQL, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_ManyInputs(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputSchemas != null && { OutputSchemas: se_GlueSchemas(input.OutputSchemas, context) }), - ...(input.SqlAliases != null && { SqlAliases: se_SqlAliases(input.SqlAliases, context) }), - ...(input.SqlQuery != null && { SqlQuery: input.SqlQuery }), - }; -}; - -/** - * serializeAws_json1_1Spigot - */ -const se_Spigot = (input: Spigot, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Prob != null && { Prob: __serializeFloat(input.Prob) }), - ...(input.Topk != null && { Topk: input.Topk }), - }; -}; - -/** - * serializeAws_json1_1SplitFields - */ -const se_SplitFields = (input: SplitFields, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_OneInput(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Paths != null && { Paths: se_GlueStudioPathList(input.Paths, context) }), - }; -}; - -/** - * serializeAws_json1_1SqlAlias - */ -const se_SqlAlias = (input: SqlAlias, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.From != null && { From: input.From }), - }; -}; - -/** - * serializeAws_json1_1SqlAliases - */ -const se_SqlAliases = (input: SqlAlias[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SqlAlias(entry, context); - }); -}; - -/** - * serializeAws_json1_1StartBlueprintRunRequest - */ -const se_StartBlueprintRunRequest = (input: StartBlueprintRunRequest, context: __SerdeContext): any => { - return { - ...(input.BlueprintName != null && { BlueprintName: input.BlueprintName }), - ...(input.Parameters != null && { Parameters: input.Parameters }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_json1_1StartCrawlerRequest - */ -const se_StartCrawlerRequest = (input: StartCrawlerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StartCrawlerScheduleRequest - */ -const se_StartCrawlerScheduleRequest = (input: StartCrawlerScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.CrawlerName != null && { CrawlerName: input.CrawlerName }), - }; -}; - -/** - * serializeAws_json1_1StartDataQualityRuleRecommendationRunRequest - */ -const se_StartDataQualityRuleRecommendationRunRequest = ( - input: StartDataQualityRuleRecommendationRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.CreatedRulesetName != null && { CreatedRulesetName: input.CreatedRulesetName }), - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }; -}; - -/** - * serializeAws_json1_1StartDataQualityRulesetEvaluationRunRequest - */ -const se_StartDataQualityRulesetEvaluationRunRequest = ( - input: StartDataQualityRulesetEvaluationRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.AdditionalRunOptions != null && { - AdditionalRunOptions: se_DataQualityEvaluationRunAdditionalRunOptions(input.AdditionalRunOptions, context), - }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.Role != null && { Role: input.Role }), - ...(input.RulesetNames != null && { RulesetNames: se_RulesetNames(input.RulesetNames, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }; -}; - -/** - * serializeAws_json1_1StartExportLabelsTaskRunRequest - */ -const se_StartExportLabelsTaskRunRequest = (input: StartExportLabelsTaskRunRequest, context: __SerdeContext): any => { - return { - ...(input.OutputS3Path != null && { OutputS3Path: input.OutputS3Path }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1StartImportLabelsTaskRunRequest - */ -const se_StartImportLabelsTaskRunRequest = (input: StartImportLabelsTaskRunRequest, context: __SerdeContext): any => { - return { - ...(input.InputS3Path != null && { InputS3Path: input.InputS3Path }), - ...(input.ReplaceAllLabels != null && { ReplaceAllLabels: input.ReplaceAllLabels }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1StartJobRunRequest - */ -const se_StartJobRunRequest = (input: StartJobRunRequest, context: __SerdeContext): any => { - return { - ...(input.AllocatedCapacity != null && { AllocatedCapacity: input.AllocatedCapacity }), - ...(input.Arguments != null && { Arguments: se_GenericMap(input.Arguments, context) }), - ...(input.ExecutionClass != null && { ExecutionClass: input.ExecutionClass }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobRunId != null && { JobRunId: input.JobRunId }), - ...(input.MaxCapacity != null && { MaxCapacity: __serializeFloat(input.MaxCapacity) }), - ...(input.NotificationProperty != null && { - NotificationProperty: se_NotificationProperty(input.NotificationProperty, context), - }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.SecurityConfiguration != null && { SecurityConfiguration: input.SecurityConfiguration }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; -}; - -/** - * serializeAws_json1_1StartMLEvaluationTaskRunRequest - */ -const se_StartMLEvaluationTaskRunRequest = (input: StartMLEvaluationTaskRunRequest, context: __SerdeContext): any => { - return { - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1StartMLLabelingSetGenerationTaskRunRequest - */ -const se_StartMLLabelingSetGenerationTaskRunRequest = ( - input: StartMLLabelingSetGenerationTaskRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.OutputS3Path != null && { OutputS3Path: input.OutputS3Path }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - }; -}; - -/** - * serializeAws_json1_1StartTriggerRequest - */ -const se_StartTriggerRequest = (input: StartTriggerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StartWorkflowRunRequest - */ -const se_StartWorkflowRunRequest = (input: StartWorkflowRunRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RunProperties != null && { RunProperties: se_WorkflowRunProperties(input.RunProperties, context) }), - }; -}; - -/** - * serializeAws_json1_1StopCrawlerRequest - */ -const se_StopCrawlerRequest = (input: StopCrawlerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StopCrawlerScheduleRequest - */ -const se_StopCrawlerScheduleRequest = (input: StopCrawlerScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.CrawlerName != null && { CrawlerName: input.CrawlerName }), - }; -}; - -/** - * serializeAws_json1_1StopSessionRequest - */ -const se_StopSessionRequest = (input: StopSessionRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.RequestOrigin != null && { RequestOrigin: input.RequestOrigin }), - }; -}; - -/** - * serializeAws_json1_1StopTriggerRequest - */ -const se_StopTriggerRequest = (input: StopTriggerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StopWorkflowRunRequest - */ -const se_StopWorkflowRunRequest = (input: StopWorkflowRunRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RunId != null && { RunId: input.RunId }), - }; -}; - -/** - * serializeAws_json1_1StorageDescriptor - */ -const se_StorageDescriptor = (input: StorageDescriptor, context: __SerdeContext): any => { - return { - ...(input.AdditionalLocations != null && { - AdditionalLocations: se_LocationStringList(input.AdditionalLocations, context), - }), - ...(input.BucketColumns != null && { BucketColumns: se_NameStringList(input.BucketColumns, context) }), - ...(input.Columns != null && { Columns: se_ColumnList(input.Columns, context) }), - ...(input.Compressed != null && { Compressed: input.Compressed }), - ...(input.InputFormat != null && { InputFormat: input.InputFormat }), - ...(input.Location != null && { Location: input.Location }), - ...(input.NumberOfBuckets != null && { NumberOfBuckets: input.NumberOfBuckets }), - ...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.SchemaReference != null && { SchemaReference: se_SchemaReference(input.SchemaReference, context) }), - ...(input.SerdeInfo != null && { SerdeInfo: se_SerDeInfo(input.SerdeInfo, context) }), - ...(input.SkewedInfo != null && { SkewedInfo: se_SkewedInfo(input.SkewedInfo, context) }), - ...(input.SortColumns != null && { SortColumns: se_OrderList(input.SortColumns, context) }), - ...(input.StoredAsSubDirectories != null && { StoredAsSubDirectories: input.StoredAsSubDirectories }), - }; -}; - -/** - * serializeAws_json1_1StreamingDataPreviewOptions - */ -const se_StreamingDataPreviewOptions = (input: StreamingDataPreviewOptions, context: __SerdeContext): any => { - return { - ...(input.PollingTime != null && { PollingTime: input.PollingTime }), - ...(input.RecordPollingLimit != null && { RecordPollingLimit: input.RecordPollingLimit }), - }; -}; - -/** - * serializeAws_json1_1StringColumnStatisticsData - */ -const se_StringColumnStatisticsData = (input: StringColumnStatisticsData, context: __SerdeContext): any => { - return { - ...(input.AverageLength != null && { AverageLength: __serializeFloat(input.AverageLength) }), - ...(input.MaximumLength != null && { MaximumLength: input.MaximumLength }), - ...(input.NumberOfDistinctValues != null && { NumberOfDistinctValues: input.NumberOfDistinctValues }), - ...(input.NumberOfNulls != null && { NumberOfNulls: input.NumberOfNulls }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TableIdentifier - */ -const se_TableIdentifier = (input: TableIdentifier, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1TableInput - */ -const se_TableInput = (input: TableInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.LastAccessTime != null && { LastAccessTime: Math.round(input.LastAccessTime.getTime() / 1000) }), - ...(input.LastAnalyzedTime != null && { LastAnalyzedTime: Math.round(input.LastAnalyzedTime.getTime() / 1000) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Owner != null && { Owner: input.Owner }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.PartitionKeys != null && { PartitionKeys: se_ColumnList(input.PartitionKeys, context) }), - ...(input.Retention != null && { Retention: input.Retention }), - ...(input.StorageDescriptor != null && { - StorageDescriptor: se_StorageDescriptor(input.StorageDescriptor, context), - }), - ...(input.TableType != null && { TableType: input.TableType }), - ...(input.TargetTable != null && { TargetTable: se_TableIdentifier(input.TargetTable, context) }), - ...(input.ViewExpandedText != null && { ViewExpandedText: input.ViewExpandedText }), - ...(input.ViewOriginalText != null && { ViewOriginalText: input.ViewOriginalText }), - }; -}; - -/** - * serializeAws_json1_1TagKeysList - */ -const se_TagKeysList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagsToAdd != null && { TagsToAdd: se_TagsMap(input.TagsToAdd, context) }), - }; -}; - -/** - * serializeAws_json1_1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TaskRunFilterCriteria - */ -const se_TaskRunFilterCriteria = (input: TaskRunFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.StartedAfter != null && { StartedAfter: Math.round(input.StartedAfter.getTime() / 1000) }), - ...(input.StartedBefore != null && { StartedBefore: Math.round(input.StartedBefore.getTime() / 1000) }), - ...(input.Status != null && { Status: input.Status }), - ...(input.TaskRunType != null && { TaskRunType: input.TaskRunType }), - }; -}; - -/** - * serializeAws_json1_1TaskRunSortCriteria - */ -const se_TaskRunSortCriteria = (input: TaskRunSortCriteria, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: input.Column }), - ...(input.SortDirection != null && { SortDirection: input.SortDirection }), - }; -}; - -/** - * serializeAws_json1_1TransformConfigParameter - */ -const se_TransformConfigParameter = (input: TransformConfigParameter, context: __SerdeContext): any => { - return { - ...(input.IsOptional != null && { IsOptional: input.IsOptional }), - ...(input.ListType != null && { ListType: input.ListType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - ...(input.ValidationMessage != null && { ValidationMessage: input.ValidationMessage }), - ...(input.ValidationRule != null && { ValidationRule: input.ValidationRule }), - ...(input.Value != null && { Value: se_EnclosedInStringProperties(input.Value, context) }), - }; -}; - -/** - * serializeAws_json1_1TransformConfigParameterList - */ -const se_TransformConfigParameterList = (input: TransformConfigParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TransformConfigParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1TransformEncryption - */ -const se_TransformEncryption = (input: TransformEncryption, context: __SerdeContext): any => { - return { - ...(input.MlUserDataEncryption != null && { - MlUserDataEncryption: se_MLUserDataEncryption(input.MlUserDataEncryption, context), - }), - ...(input.TaskRunSecurityConfigurationName != null && { - TaskRunSecurityConfigurationName: input.TaskRunSecurityConfigurationName, - }), - }; -}; - -/** - * serializeAws_json1_1TransformFilterCriteria - */ -const se_TransformFilterCriteria = (input: TransformFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.LastModifiedAfter != null && { LastModifiedAfter: Math.round(input.LastModifiedAfter.getTime() / 1000) }), - ...(input.LastModifiedBefore != null && { - LastModifiedBefore: Math.round(input.LastModifiedBefore.getTime() / 1000), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Schema != null && { Schema: se_TransformSchema(input.Schema, context) }), - ...(input.Status != null && { Status: input.Status }), - ...(input.TransformType != null && { TransformType: input.TransformType }), - }; -}; - -/** - * serializeAws_json1_1TransformParameters - */ -const se_TransformParameters = (input: TransformParameters, context: __SerdeContext): any => { - return { - ...(input.FindMatchesParameters != null && { - FindMatchesParameters: se_FindMatchesParameters(input.FindMatchesParameters, context), - }), - ...(input.TransformType != null && { TransformType: input.TransformType }), - }; -}; - -/** - * serializeAws_json1_1TransformSchema - */ -const se_TransformSchema = (input: SchemaColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SchemaColumn(entry, context); - }); -}; - -/** - * serializeAws_json1_1TransformSortCriteria - */ -const se_TransformSortCriteria = (input: TransformSortCriteria, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: input.Column }), - ...(input.SortDirection != null && { SortDirection: input.SortDirection }), - }; -}; - -/** - * serializeAws_json1_1TriggerNameList - */ -const se_TriggerNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TriggerUpdate - */ -const se_TriggerUpdate = (input: TriggerUpdate, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_ActionList(input.Actions, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EventBatchingCondition != null && { - EventBatchingCondition: se_EventBatchingCondition(input.EventBatchingCondition, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Predicate != null && { Predicate: se_Predicate(input.Predicate, context) }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - }; -}; - -/** - * serializeAws_json1_1TwoInputs - */ -const se_TwoInputs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Union - */ -const se_Union = (input: Union, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_TwoInputs(input.Inputs, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.UnionType != null && { UnionType: input.UnionType }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagsToRemove != null && { TagsToRemove: se_TagKeysList(input.TagsToRemove, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateBlueprintRequest - */ -const se_UpdateBlueprintRequest = (input: UpdateBlueprintRequest, context: __SerdeContext): any => { - return { - ...(input.BlueprintLocation != null && { BlueprintLocation: input.BlueprintLocation }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateClassifierRequest - */ -const se_UpdateClassifierRequest = (input: UpdateClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.CsvClassifier != null && { CsvClassifier: se_UpdateCsvClassifierRequest(input.CsvClassifier, context) }), - ...(input.GrokClassifier != null && { - GrokClassifier: se_UpdateGrokClassifierRequest(input.GrokClassifier, context), - }), - ...(input.JsonClassifier != null && { - JsonClassifier: se_UpdateJsonClassifierRequest(input.JsonClassifier, context), - }), - ...(input.XMLClassifier != null && { XMLClassifier: se_UpdateXMLClassifierRequest(input.XMLClassifier, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateColumnStatisticsForPartitionRequest - */ -const se_UpdateColumnStatisticsForPartitionRequest = ( - input: UpdateColumnStatisticsForPartitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnStatisticsList != null && { - ColumnStatisticsList: se_UpdateColumnStatisticsList(input.ColumnStatisticsList, context), - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionValues != null && { PartitionValues: se_ValueStringList(input.PartitionValues, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1UpdateColumnStatisticsForTableRequest - */ -const se_UpdateColumnStatisticsForTableRequest = ( - input: UpdateColumnStatisticsForTableRequest, - context: __SerdeContext -): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnStatisticsList != null && { - ColumnStatisticsList: se_UpdateColumnStatisticsList(input.ColumnStatisticsList, context), - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1UpdateColumnStatisticsList - */ -const se_UpdateColumnStatisticsList = (input: ColumnStatistics[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnStatistics(entry, context); - }); -}; - -/** - * serializeAws_json1_1UpdateConnectionRequest - */ -const se_UpdateConnectionRequest = (input: UpdateConnectionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ConnectionInput != null && { ConnectionInput: se_ConnectionInput(input.ConnectionInput, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateCrawlerRequest - */ -const se_UpdateCrawlerRequest = (input: UpdateCrawlerRequest, context: __SerdeContext): any => { - return { - ...(input.Classifiers != null && { Classifiers: se_ClassifierNameList(input.Classifiers, context) }), - ...(input.Configuration != null && { Configuration: input.Configuration }), - ...(input.CrawlerSecurityConfiguration != null && { - CrawlerSecurityConfiguration: input.CrawlerSecurityConfiguration, - }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LakeFormationConfiguration != null && { - LakeFormationConfiguration: se_LakeFormationConfiguration(input.LakeFormationConfiguration, context), - }), - ...(input.LineageConfiguration != null && { - LineageConfiguration: se_LineageConfiguration(input.LineageConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RecrawlPolicy != null && { RecrawlPolicy: se_RecrawlPolicy(input.RecrawlPolicy, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.SchemaChangePolicy != null && { - SchemaChangePolicy: se_SchemaChangePolicy(input.SchemaChangePolicy, context), - }), - ...(input.TablePrefix != null && { TablePrefix: input.TablePrefix }), - ...(input.Targets != null && { Targets: se_CrawlerTargets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateCrawlerScheduleRequest - */ -const se_UpdateCrawlerScheduleRequest = (input: UpdateCrawlerScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.CrawlerName != null && { CrawlerName: input.CrawlerName }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - }; -}; - -/** - * serializeAws_json1_1UpdateCsvClassifierRequest - */ -const se_UpdateCsvClassifierRequest = (input: UpdateCsvClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.AllowSingleColumn != null && { AllowSingleColumn: input.AllowSingleColumn }), - ...(input.ContainsHeader != null && { ContainsHeader: input.ContainsHeader }), - ...(input.CustomDatatypeConfigured != null && { CustomDatatypeConfigured: input.CustomDatatypeConfigured }), - ...(input.CustomDatatypes != null && { CustomDatatypes: se_CustomDatatypes(input.CustomDatatypes, context) }), - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.DisableValueTrimming != null && { DisableValueTrimming: input.DisableValueTrimming }), - ...(input.Header != null && { Header: se_CsvHeader(input.Header, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QuoteSymbol != null && { QuoteSymbol: input.QuoteSymbol }), - }; -}; - -/** - * serializeAws_json1_1UpdateDatabaseRequest - */ -const se_UpdateDatabaseRequest = (input: UpdateDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseInput != null && { DatabaseInput: se_DatabaseInput(input.DatabaseInput, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateDataQualityRulesetRequest - */ -const se_UpdateDataQualityRulesetRequest = (input: UpdateDataQualityRulesetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Ruleset != null && { Ruleset: input.Ruleset }), - }; -}; - -/** - * serializeAws_json1_1UpdateDevEndpointRequest - */ -const se_UpdateDevEndpointRequest = (input: UpdateDevEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.AddArguments != null && { AddArguments: se_MapValue(input.AddArguments, context) }), - ...(input.AddPublicKeys != null && { AddPublicKeys: se_PublicKeysList(input.AddPublicKeys, context) }), - ...(input.CustomLibraries != null && { - CustomLibraries: se_DevEndpointCustomLibraries(input.CustomLibraries, context), - }), - ...(input.DeleteArguments != null && { DeleteArguments: se_StringList(input.DeleteArguments, context) }), - ...(input.DeletePublicKeys != null && { DeletePublicKeys: se_PublicKeysList(input.DeletePublicKeys, context) }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.PublicKey != null && { PublicKey: input.PublicKey }), - ...(input.UpdateEtlLibraries != null && { UpdateEtlLibraries: input.UpdateEtlLibraries }), - }; -}; - -/** - * serializeAws_json1_1UpdateGrokClassifierRequest - */ -const se_UpdateGrokClassifierRequest = (input: UpdateGrokClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.CustomPatterns != null && { CustomPatterns: input.CustomPatterns }), - ...(input.GrokPattern != null && { GrokPattern: input.GrokPattern }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateJobFromSourceControlRequest - */ -const se_UpdateJobFromSourceControlRequest = ( - input: UpdateJobFromSourceControlRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuthStrategy != null && { AuthStrategy: input.AuthStrategy }), - ...(input.AuthToken != null && { AuthToken: input.AuthToken }), - ...(input.BranchName != null && { BranchName: input.BranchName }), - ...(input.CommitId != null && { CommitId: input.CommitId }), - ...(input.Folder != null && { Folder: input.Folder }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.Provider != null && { Provider: input.Provider }), - ...(input.RepositoryName != null && { RepositoryName: input.RepositoryName }), - ...(input.RepositoryOwner != null && { RepositoryOwner: input.RepositoryOwner }), - }; -}; - -/** - * serializeAws_json1_1UpdateJobRequest - */ -const se_UpdateJobRequest = (input: UpdateJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobUpdate != null && { JobUpdate: se_JobUpdate(input.JobUpdate, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateJsonClassifierRequest - */ -const se_UpdateJsonClassifierRequest = (input: UpdateJsonClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.JsonPath != null && { JsonPath: input.JsonPath }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateMLTransformRequest - */ -const se_UpdateMLTransformRequest = (input: UpdateMLTransformRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.GlueVersion != null && { GlueVersion: input.GlueVersion }), - ...(input.MaxCapacity != null && { MaxCapacity: __serializeFloat(input.MaxCapacity) }), - ...(input.MaxRetries != null && { MaxRetries: input.MaxRetries }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NumberOfWorkers != null && { NumberOfWorkers: input.NumberOfWorkers }), - ...(input.Parameters != null && { Parameters: se_TransformParameters(input.Parameters, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.TransformId != null && { TransformId: input.TransformId }), - ...(input.WorkerType != null && { WorkerType: input.WorkerType }), - }; -}; - -/** - * serializeAws_json1_1UpdatePartitionRequest - */ -const se_UpdatePartitionRequest = (input: UpdatePartitionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.PartitionInput != null && { PartitionInput: se_PartitionInput(input.PartitionInput, context) }), - ...(input.PartitionValueList != null && { - PartitionValueList: se_BoundedPartitionValueList(input.PartitionValueList, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; - -/** - * serializeAws_json1_1UpdateRegistryInput - */ -const se_UpdateRegistryInput = (input: UpdateRegistryInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.RegistryId != null && { RegistryId: se_RegistryId(input.RegistryId, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateSchemaInput - */ -const se_UpdateSchemaInput = (input: UpdateSchemaInput, context: __SerdeContext): any => { - return { - ...(input.Compatibility != null && { Compatibility: input.Compatibility }), - ...(input.Description != null && { Description: input.Description }), - ...(input.SchemaId != null && { SchemaId: se_SchemaId(input.SchemaId, context) }), - ...(input.SchemaVersionNumber != null && { - SchemaVersionNumber: se_SchemaVersionNumber(input.SchemaVersionNumber, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateSourceControlFromJobRequest - */ -const se_UpdateSourceControlFromJobRequest = ( - input: UpdateSourceControlFromJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuthStrategy != null && { AuthStrategy: input.AuthStrategy }), - ...(input.AuthToken != null && { AuthToken: input.AuthToken }), - ...(input.BranchName != null && { BranchName: input.BranchName }), - ...(input.CommitId != null && { CommitId: input.CommitId }), - ...(input.Folder != null && { Folder: input.Folder }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.Provider != null && { Provider: input.Provider }), - ...(input.RepositoryName != null && { RepositoryName: input.RepositoryName }), - ...(input.RepositoryOwner != null && { RepositoryOwner: input.RepositoryOwner }), - }; -}; - -/** - * serializeAws_json1_1UpdateTableRequest - */ -const se_UpdateTableRequest = (input: UpdateTableRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.SkipArchive != null && { SkipArchive: input.SkipArchive }), - ...(input.TableInput != null && { TableInput: se_TableInput(input.TableInput, context) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_json1_1UpdateTriggerRequest - */ -const se_UpdateTriggerRequest = (input: UpdateTriggerRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.TriggerUpdate != null && { TriggerUpdate: se_TriggerUpdate(input.TriggerUpdate, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserDefinedFunctionRequest - */ -const se_UpdateUserDefinedFunctionRequest = (input: UpdateUserDefinedFunctionRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.FunctionInput != null && { FunctionInput: se_UserDefinedFunctionInput(input.FunctionInput, context) }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - }; -}; - -/** - * serializeAws_json1_1UpdateWorkflowRequest - */ -const se_UpdateWorkflowRequest = (input: UpdateWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultRunProperties != null && { - DefaultRunProperties: se_WorkflowRunProperties(input.DefaultRunProperties, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.MaxConcurrentRuns != null && { MaxConcurrentRuns: input.MaxConcurrentRuns }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateXMLClassifierRequest - */ -const se_UpdateXMLClassifierRequest = (input: UpdateXMLClassifierRequest, context: __SerdeContext): any => { - return { - ...(input.Classification != null && { Classification: input.Classification }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RowTag != null && { RowTag: input.RowTag }), - }; -}; - -/** - * serializeAws_json1_1UpsertRedshiftTargetOptions - */ -const se_UpsertRedshiftTargetOptions = (input: UpsertRedshiftTargetOptions, context: __SerdeContext): any => { - return { - ...(input.ConnectionName != null && { ConnectionName: input.ConnectionName }), - ...(input.TableLocation != null && { TableLocation: input.TableLocation }), - ...(input.UpsertKeys != null && { UpsertKeys: se_EnclosedInStringPropertiesMinOne(input.UpsertKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UserDefinedFunctionInput - */ -const se_UserDefinedFunctionInput = (input: UserDefinedFunctionInput, context: __SerdeContext): any => { - return { - ...(input.ClassName != null && { ClassName: input.ClassName }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - ...(input.OwnerName != null && { OwnerName: input.OwnerName }), - ...(input.OwnerType != null && { OwnerType: input.OwnerType }), - ...(input.ResourceUris != null && { ResourceUris: se_ResourceUriList(input.ResourceUris, context) }), - }; -}; - -/** - * serializeAws_json1_1ValueStringList - */ -const se_ValueStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkflowNames - */ -const se_WorkflowNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkflowRunProperties - */ -const se_WorkflowRunProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - Arguments: output.Arguments != null ? de_GenericMap(output.Arguments, context) : undefined, - CrawlerName: __expectString(output.CrawlerName), - JobName: __expectString(output.JobName), - NotificationProperty: - output.NotificationProperty != null ? de_NotificationProperty(output.NotificationProperty, context) : undefined, - SecurityConfiguration: __expectString(output.SecurityConfiguration), - Timeout: __expectInt32(output.Timeout), - } as any; -}; - -/** - * deserializeAws_json1_1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): Action[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Action(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AdditionalOptions - */ -const de_AdditionalOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1Aggregate - */ -const de_Aggregate = (output: any, context: __SerdeContext): Aggregate => { - return { - Aggs: output.Aggs != null ? de_AggregateOperations(output.Aggs, context) : undefined, - Groups: output.Groups != null ? de_GlueStudioPathList(output.Groups, context) : undefined, - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AggregateOperation - */ -const de_AggregateOperation = (output: any, context: __SerdeContext): AggregateOperation => { - return { - AggFunc: __expectString(output.AggFunc), - Column: output.Column != null ? de_EnclosedInStringProperties(output.Column, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AggregateOperations - */ -const de_AggregateOperations = (output: any, context: __SerdeContext): AggregateOperation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregateOperation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlreadyExistsException - */ -const de_AlreadyExistsException = (output: any, context: __SerdeContext): AlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplyMapping - */ -const de_ApplyMapping = (output: any, context: __SerdeContext): ApplyMapping => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Mapping: output.Mapping != null ? de_Mappings(output.Mapping, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AthenaConnectorSource - */ -const de_AthenaConnectorSource = (output: any, context: __SerdeContext): AthenaConnectorSource => { - return { - ConnectionName: __expectString(output.ConnectionName), - ConnectionTable: __expectString(output.ConnectionTable), - ConnectionType: __expectString(output.ConnectionType), - ConnectorName: __expectString(output.ConnectorName), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - SchemaName: __expectString(output.SchemaName), - } as any; -}; - -/** - * deserializeAws_json1_1BackfillError - */ -const de_BackfillError = (output: any, context: __SerdeContext): BackfillError => { - return { - Code: __expectString(output.Code), - Partitions: output.Partitions != null ? de_BackfillErroredPartitionsList(output.Partitions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BackfillErroredPartitionsList - */ -const de_BackfillErroredPartitionsList = (output: any, context: __SerdeContext): PartitionValueList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartitionValueList(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BackfillErrors - */ -const de_BackfillErrors = (output: any, context: __SerdeContext): BackfillError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BackfillError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BasicCatalogTarget - */ -const de_BasicCatalogTarget = (output: any, context: __SerdeContext): BasicCatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1BatchCreatePartitionResponse - */ -const de_BatchCreatePartitionResponse = (output: any, context: __SerdeContext): BatchCreatePartitionResponse => { - return { - Errors: output.Errors != null ? de_PartitionErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteConnectionResponse - */ -const de_BatchDeleteConnectionResponse = (output: any, context: __SerdeContext): BatchDeleteConnectionResponse => { - return { - Errors: output.Errors != null ? de_ErrorByName(output.Errors, context) : undefined, - Succeeded: output.Succeeded != null ? de_NameStringList(output.Succeeded, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeletePartitionResponse - */ -const de_BatchDeletePartitionResponse = (output: any, context: __SerdeContext): BatchDeletePartitionResponse => { - return { - Errors: output.Errors != null ? de_PartitionErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteTableResponse - */ -const de_BatchDeleteTableResponse = (output: any, context: __SerdeContext): BatchDeleteTableResponse => { - return { - Errors: output.Errors != null ? de_TableErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteTableVersionResponse - */ -const de_BatchDeleteTableVersionResponse = (output: any, context: __SerdeContext): BatchDeleteTableVersionResponse => { - return { - Errors: output.Errors != null ? de_TableVersionErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetBlueprintsResponse - */ -const de_BatchGetBlueprintsResponse = (output: any, context: __SerdeContext): BatchGetBlueprintsResponse => { - return { - Blueprints: output.Blueprints != null ? de_Blueprints(output.Blueprints, context) : undefined, - MissingBlueprints: - output.MissingBlueprints != null ? de_BlueprintNames(output.MissingBlueprints, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetCrawlersResponse - */ -const de_BatchGetCrawlersResponse = (output: any, context: __SerdeContext): BatchGetCrawlersResponse => { - return { - Crawlers: output.Crawlers != null ? de_CrawlerList(output.Crawlers, context) : undefined, - CrawlersNotFound: - output.CrawlersNotFound != null ? de_CrawlerNameList(output.CrawlersNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetCustomEntityTypesResponse - */ -const de_BatchGetCustomEntityTypesResponse = ( - output: any, - context: __SerdeContext -): BatchGetCustomEntityTypesResponse => { - return { - CustomEntityTypes: - output.CustomEntityTypes != null ? de_CustomEntityTypes(output.CustomEntityTypes, context) : undefined, - CustomEntityTypesNotFound: - output.CustomEntityTypesNotFound != null - ? de_CustomEntityTypeNames(output.CustomEntityTypesNotFound, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDataQualityResultResponse - */ -const de_BatchGetDataQualityResultResponse = ( - output: any, - context: __SerdeContext -): BatchGetDataQualityResultResponse => { - return { - Results: output.Results != null ? de_DataQualityResultsList(output.Results, context) : undefined, - ResultsNotFound: - output.ResultsNotFound != null ? de_DataQualityResultIds(output.ResultsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDevEndpointsResponse - */ -const de_BatchGetDevEndpointsResponse = (output: any, context: __SerdeContext): BatchGetDevEndpointsResponse => { - return { - DevEndpoints: output.DevEndpoints != null ? de_DevEndpointList(output.DevEndpoints, context) : undefined, - DevEndpointsNotFound: - output.DevEndpointsNotFound != null ? de_DevEndpointNames(output.DevEndpointsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetJobsResponse - */ -const de_BatchGetJobsResponse = (output: any, context: __SerdeContext): BatchGetJobsResponse => { - return { - Jobs: output.Jobs != null ? de_JobList(output.Jobs, context) : undefined, - JobsNotFound: output.JobsNotFound != null ? de_JobNameList(output.JobsNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetPartitionResponse - */ -const de_BatchGetPartitionResponse = (output: any, context: __SerdeContext): BatchGetPartitionResponse => { - return { - Partitions: output.Partitions != null ? de_PartitionList(output.Partitions, context) : undefined, - UnprocessedKeys: - output.UnprocessedKeys != null ? de_BatchGetPartitionValueList(output.UnprocessedKeys, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetPartitionValueList - */ -const de_BatchGetPartitionValueList = (output: any, context: __SerdeContext): PartitionValueList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartitionValueList(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchGetTriggersResponse - */ -const de_BatchGetTriggersResponse = (output: any, context: __SerdeContext): BatchGetTriggersResponse => { - return { - Triggers: output.Triggers != null ? de_TriggerList(output.Triggers, context) : undefined, - TriggersNotFound: - output.TriggersNotFound != null ? de_TriggerNameList(output.TriggersNotFound, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetWorkflowsResponse - */ -const de_BatchGetWorkflowsResponse = (output: any, context: __SerdeContext): BatchGetWorkflowsResponse => { - return { - MissingWorkflows: output.MissingWorkflows != null ? de_WorkflowNames(output.MissingWorkflows, context) : undefined, - Workflows: output.Workflows != null ? de_Workflows(output.Workflows, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchStopJobRunError - */ -const de_BatchStopJobRunError = (output: any, context: __SerdeContext): BatchStopJobRunError => { - return { - ErrorDetail: output.ErrorDetail != null ? de_ErrorDetail(output.ErrorDetail, context) : undefined, - JobName: __expectString(output.JobName), - JobRunId: __expectString(output.JobRunId), - } as any; -}; - -/** - * deserializeAws_json1_1BatchStopJobRunErrorList - */ -const de_BatchStopJobRunErrorList = (output: any, context: __SerdeContext): BatchStopJobRunError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchStopJobRunError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchStopJobRunResponse - */ -const de_BatchStopJobRunResponse = (output: any, context: __SerdeContext): BatchStopJobRunResponse => { - return { - Errors: output.Errors != null ? de_BatchStopJobRunErrorList(output.Errors, context) : undefined, - SuccessfulSubmissions: - output.SuccessfulSubmissions != null - ? de_BatchStopJobRunSuccessfulSubmissionList(output.SuccessfulSubmissions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchStopJobRunSuccessfulSubmission - */ -const de_BatchStopJobRunSuccessfulSubmission = ( - output: any, - context: __SerdeContext -): BatchStopJobRunSuccessfulSubmission => { - return { - JobName: __expectString(output.JobName), - JobRunId: __expectString(output.JobRunId), - } as any; -}; - -/** - * deserializeAws_json1_1BatchStopJobRunSuccessfulSubmissionList - */ -const de_BatchStopJobRunSuccessfulSubmissionList = ( - output: any, - context: __SerdeContext -): BatchStopJobRunSuccessfulSubmission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchStopJobRunSuccessfulSubmission(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchUpdatePartitionFailureEntry - */ -const de_BatchUpdatePartitionFailureEntry = ( - output: any, - context: __SerdeContext -): BatchUpdatePartitionFailureEntry => { - return { - ErrorDetail: output.ErrorDetail != null ? de_ErrorDetail(output.ErrorDetail, context) : undefined, - PartitionValueList: - output.PartitionValueList != null ? de_BoundedPartitionValueList(output.PartitionValueList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchUpdatePartitionFailureList - */ -const de_BatchUpdatePartitionFailureList = ( - output: any, - context: __SerdeContext -): BatchUpdatePartitionFailureEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchUpdatePartitionFailureEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchUpdatePartitionResponse - */ -const de_BatchUpdatePartitionResponse = (output: any, context: __SerdeContext): BatchUpdatePartitionResponse => { - return { - Errors: output.Errors != null ? de_BatchUpdatePartitionFailureList(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BinaryColumnStatisticsData - */ -const de_BinaryColumnStatisticsData = (output: any, context: __SerdeContext): BinaryColumnStatisticsData => { - return { - AverageLength: __limitedParseDouble(output.AverageLength), - MaximumLength: __expectLong(output.MaximumLength), - NumberOfNulls: __expectLong(output.NumberOfNulls), - } as any; -}; - -/** - * deserializeAws_json1_1Blueprint - */ -const de_Blueprint = (output: any, context: __SerdeContext): Blueprint => { - return { - BlueprintLocation: __expectString(output.BlueprintLocation), - BlueprintServiceLocation: __expectString(output.BlueprintServiceLocation), - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - LastActiveDefinition: - output.LastActiveDefinition != null ? de_LastActiveDefinition(output.LastActiveDefinition, context) : undefined, - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - Name: __expectString(output.Name), - ParameterSpec: __expectString(output.ParameterSpec), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1BlueprintDetails - */ -const de_BlueprintDetails = (output: any, context: __SerdeContext): BlueprintDetails => { - return { - BlueprintName: __expectString(output.BlueprintName), - RunId: __expectString(output.RunId), - } as any; -}; - -/** - * deserializeAws_json1_1BlueprintNames - */ -const de_BlueprintNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BlueprintRun - */ -const de_BlueprintRun = (output: any, context: __SerdeContext): BlueprintRun => { - return { - BlueprintName: __expectString(output.BlueprintName), - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - Parameters: __expectString(output.Parameters), - RoleArn: __expectString(output.RoleArn), - RollbackErrorMessage: __expectString(output.RollbackErrorMessage), - RunId: __expectString(output.RunId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - State: __expectString(output.State), - WorkflowName: __expectString(output.WorkflowName), - } as any; -}; - -/** - * deserializeAws_json1_1BlueprintRuns - */ -const de_BlueprintRuns = (output: any, context: __SerdeContext): BlueprintRun[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BlueprintRun(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Blueprints - */ -const de_Blueprints = (output: any, context: __SerdeContext): Blueprint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Blueprint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BooleanColumnStatisticsData - */ -const de_BooleanColumnStatisticsData = (output: any, context: __SerdeContext): BooleanColumnStatisticsData => { - return { - NumberOfFalses: __expectLong(output.NumberOfFalses), - NumberOfNulls: __expectLong(output.NumberOfNulls), - NumberOfTrues: __expectLong(output.NumberOfTrues), - } as any; -}; - -/** - * deserializeAws_json1_1BoundedPartitionValueList - */ -const de_BoundedPartitionValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelDataQualityRuleRecommendationRunResponse - */ -const de_CancelDataQualityRuleRecommendationRunResponse = ( - output: any, - context: __SerdeContext -): CancelDataQualityRuleRecommendationRunResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CancelDataQualityRulesetEvaluationRunResponse - */ -const de_CancelDataQualityRulesetEvaluationRunResponse = ( - output: any, - context: __SerdeContext -): CancelDataQualityRulesetEvaluationRunResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CancelMLTaskRunResponse - */ -const de_CancelMLTaskRunResponse = (output: any, context: __SerdeContext): CancelMLTaskRunResponse => { - return { - Status: __expectString(output.Status), - TaskRunId: __expectString(output.TaskRunId), - TransformId: __expectString(output.TransformId), - } as any; -}; - -/** - * deserializeAws_json1_1CancelStatementResponse - */ -const de_CancelStatementResponse = (output: any, context: __SerdeContext): CancelStatementResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CatalogDeltaSource - */ -const de_CatalogDeltaSource = (output: any, context: __SerdeContext): CatalogDeltaSource => { - return { - AdditionalDeltaOptions: - output.AdditionalDeltaOptions != null ? de_AdditionalOptions(output.AdditionalDeltaOptions, context) : undefined, - Database: __expectString(output.Database), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogHudiSource - */ -const de_CatalogHudiSource = (output: any, context: __SerdeContext): CatalogHudiSource => { - return { - AdditionalHudiOptions: - output.AdditionalHudiOptions != null ? de_AdditionalOptions(output.AdditionalHudiOptions, context) : undefined, - Database: __expectString(output.Database), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogImportStatus - */ -const de_CatalogImportStatus = (output: any, context: __SerdeContext): CatalogImportStatus => { - return { - ImportCompleted: __expectBoolean(output.ImportCompleted), - ImportTime: - output.ImportTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ImportTime))) : undefined, - ImportedBy: __expectString(output.ImportedBy), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogKafkaSource - */ -const de_CatalogKafkaSource = (output: any, context: __SerdeContext): CatalogKafkaSource => { - return { - DataPreviewOptions: - output.DataPreviewOptions != null - ? de_StreamingDataPreviewOptions(output.DataPreviewOptions, context) - : undefined, - Database: __expectString(output.Database), - DetectSchema: __expectBoolean(output.DetectSchema), - Name: __expectString(output.Name), - StreamingOptions: - output.StreamingOptions != null ? de_KafkaStreamingSourceOptions(output.StreamingOptions, context) : undefined, - Table: __expectString(output.Table), - WindowSize: __expectInt32(output.WindowSize), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogKinesisSource - */ -const de_CatalogKinesisSource = (output: any, context: __SerdeContext): CatalogKinesisSource => { - return { - DataPreviewOptions: - output.DataPreviewOptions != null - ? de_StreamingDataPreviewOptions(output.DataPreviewOptions, context) - : undefined, - Database: __expectString(output.Database), - DetectSchema: __expectBoolean(output.DetectSchema), - Name: __expectString(output.Name), - StreamingOptions: - output.StreamingOptions != null ? de_KinesisStreamingSourceOptions(output.StreamingOptions, context) : undefined, - Table: __expectString(output.Table), - WindowSize: __expectInt32(output.WindowSize), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogSchemaChangePolicy - */ -const de_CatalogSchemaChangePolicy = (output: any, context: __SerdeContext): CatalogSchemaChangePolicy => { - return { - EnableUpdateCatalog: __expectBoolean(output.EnableUpdateCatalog), - UpdateBehavior: __expectString(output.UpdateBehavior), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogSource - */ -const de_CatalogSource = (output: any, context: __SerdeContext): CatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogTablesList - */ -const de_CatalogTablesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CatalogTarget - */ -const de_CatalogTarget = (output: any, context: __SerdeContext): CatalogTarget => { - return { - ConnectionName: __expectString(output.ConnectionName), - DatabaseName: __expectString(output.DatabaseName), - DlqEventQueueArn: __expectString(output.DlqEventQueueArn), - EventQueueArn: __expectString(output.EventQueueArn), - Tables: output.Tables != null ? de_CatalogTablesList(output.Tables, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CatalogTargetList - */ -const de_CatalogTargetList = (output: any, context: __SerdeContext): CatalogTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CatalogTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CheckSchemaVersionValidityResponse - */ -const de_CheckSchemaVersionValidityResponse = ( - output: any, - context: __SerdeContext -): CheckSchemaVersionValidityResponse => { - return { - Error: __expectString(output.Error), - Valid: __expectBoolean(output.Valid), - } as any; -}; - -/** - * deserializeAws_json1_1Classifier - */ -const de_Classifier = (output: any, context: __SerdeContext): Classifier => { - return { - CsvClassifier: output.CsvClassifier != null ? de_CsvClassifier(output.CsvClassifier, context) : undefined, - GrokClassifier: output.GrokClassifier != null ? de_GrokClassifier(output.GrokClassifier, context) : undefined, - JsonClassifier: output.JsonClassifier != null ? de_JsonClassifier(output.JsonClassifier, context) : undefined, - XMLClassifier: output.XMLClassifier != null ? de_XMLClassifier(output.XMLClassifier, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ClassifierList - */ -const de_ClassifierList = (output: any, context: __SerdeContext): Classifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Classifier(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClassifierNameList - */ -const de_ClassifierNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CloudWatchEncryption - */ -const de_CloudWatchEncryption = (output: any, context: __SerdeContext): CloudWatchEncryption => { - return { - CloudWatchEncryptionMode: __expectString(output.CloudWatchEncryptionMode), - KmsKeyArn: __expectString(output.KmsKeyArn), - } as any; -}; - -/** - * deserializeAws_json1_1CodeGenConfigurationNode - */ -const de_CodeGenConfigurationNode = (output: any, context: __SerdeContext): CodeGenConfigurationNode => { - return { - Aggregate: output.Aggregate != null ? de_Aggregate(output.Aggregate, context) : undefined, - ApplyMapping: output.ApplyMapping != null ? de_ApplyMapping(output.ApplyMapping, context) : undefined, - AthenaConnectorSource: - output.AthenaConnectorSource != null - ? de_AthenaConnectorSource(output.AthenaConnectorSource, context) - : undefined, - CatalogDeltaSource: - output.CatalogDeltaSource != null ? de_CatalogDeltaSource(output.CatalogDeltaSource, context) : undefined, - CatalogHudiSource: - output.CatalogHudiSource != null ? de_CatalogHudiSource(output.CatalogHudiSource, context) : undefined, - CatalogKafkaSource: - output.CatalogKafkaSource != null ? de_CatalogKafkaSource(output.CatalogKafkaSource, context) : undefined, - CatalogKinesisSource: - output.CatalogKinesisSource != null ? de_CatalogKinesisSource(output.CatalogKinesisSource, context) : undefined, - CatalogSource: output.CatalogSource != null ? de_CatalogSource(output.CatalogSource, context) : undefined, - CatalogTarget: output.CatalogTarget != null ? de_BasicCatalogTarget(output.CatalogTarget, context) : undefined, - CustomCode: output.CustomCode != null ? de_CustomCode(output.CustomCode, context) : undefined, - DirectJDBCSource: - output.DirectJDBCSource != null ? de_DirectJDBCSource(output.DirectJDBCSource, context) : undefined, - DirectKafkaSource: - output.DirectKafkaSource != null ? de_DirectKafkaSource(output.DirectKafkaSource, context) : undefined, - DirectKinesisSource: - output.DirectKinesisSource != null ? de_DirectKinesisSource(output.DirectKinesisSource, context) : undefined, - DropDuplicates: output.DropDuplicates != null ? de_DropDuplicates(output.DropDuplicates, context) : undefined, - DropFields: output.DropFields != null ? de_DropFields(output.DropFields, context) : undefined, - DropNullFields: output.DropNullFields != null ? de_DropNullFields(output.DropNullFields, context) : undefined, - DynamicTransform: - output.DynamicTransform != null ? de_DynamicTransform(output.DynamicTransform, context) : undefined, - DynamoDBCatalogSource: - output.DynamoDBCatalogSource != null - ? de_DynamoDBCatalogSource(output.DynamoDBCatalogSource, context) - : undefined, - EvaluateDataQuality: - output.EvaluateDataQuality != null ? de_EvaluateDataQuality(output.EvaluateDataQuality, context) : undefined, - FillMissingValues: - output.FillMissingValues != null ? de_FillMissingValues(output.FillMissingValues, context) : undefined, - Filter: output.Filter != null ? de_Filter(output.Filter, context) : undefined, - GovernedCatalogSource: - output.GovernedCatalogSource != null - ? de_GovernedCatalogSource(output.GovernedCatalogSource, context) - : undefined, - GovernedCatalogTarget: - output.GovernedCatalogTarget != null - ? de_GovernedCatalogTarget(output.GovernedCatalogTarget, context) - : undefined, - JDBCConnectorSource: - output.JDBCConnectorSource != null ? de_JDBCConnectorSource(output.JDBCConnectorSource, context) : undefined, - JDBCConnectorTarget: - output.JDBCConnectorTarget != null ? de_JDBCConnectorTarget(output.JDBCConnectorTarget, context) : undefined, - Join: output.Join != null ? de_Join(output.Join, context) : undefined, - Merge: output.Merge != null ? de_Merge(output.Merge, context) : undefined, - MicrosoftSQLServerCatalogSource: - output.MicrosoftSQLServerCatalogSource != null - ? de_MicrosoftSQLServerCatalogSource(output.MicrosoftSQLServerCatalogSource, context) - : undefined, - MicrosoftSQLServerCatalogTarget: - output.MicrosoftSQLServerCatalogTarget != null - ? de_MicrosoftSQLServerCatalogTarget(output.MicrosoftSQLServerCatalogTarget, context) - : undefined, - MySQLCatalogSource: - output.MySQLCatalogSource != null ? de_MySQLCatalogSource(output.MySQLCatalogSource, context) : undefined, - MySQLCatalogTarget: - output.MySQLCatalogTarget != null ? de_MySQLCatalogTarget(output.MySQLCatalogTarget, context) : undefined, - OracleSQLCatalogSource: - output.OracleSQLCatalogSource != null - ? de_OracleSQLCatalogSource(output.OracleSQLCatalogSource, context) - : undefined, - OracleSQLCatalogTarget: - output.OracleSQLCatalogTarget != null - ? de_OracleSQLCatalogTarget(output.OracleSQLCatalogTarget, context) - : undefined, - PIIDetection: output.PIIDetection != null ? de_PIIDetection(output.PIIDetection, context) : undefined, - PostgreSQLCatalogSource: - output.PostgreSQLCatalogSource != null - ? de_PostgreSQLCatalogSource(output.PostgreSQLCatalogSource, context) - : undefined, - PostgreSQLCatalogTarget: - output.PostgreSQLCatalogTarget != null - ? de_PostgreSQLCatalogTarget(output.PostgreSQLCatalogTarget, context) - : undefined, - RedshiftSource: output.RedshiftSource != null ? de_RedshiftSource(output.RedshiftSource, context) : undefined, - RedshiftTarget: output.RedshiftTarget != null ? de_RedshiftTarget(output.RedshiftTarget, context) : undefined, - RelationalCatalogSource: - output.RelationalCatalogSource != null - ? de_RelationalCatalogSource(output.RelationalCatalogSource, context) - : undefined, - RenameField: output.RenameField != null ? de_RenameField(output.RenameField, context) : undefined, - S3CatalogDeltaSource: - output.S3CatalogDeltaSource != null ? de_S3CatalogDeltaSource(output.S3CatalogDeltaSource, context) : undefined, - S3CatalogHudiSource: - output.S3CatalogHudiSource != null ? de_S3CatalogHudiSource(output.S3CatalogHudiSource, context) : undefined, - S3CatalogSource: output.S3CatalogSource != null ? de_S3CatalogSource(output.S3CatalogSource, context) : undefined, - S3CatalogTarget: output.S3CatalogTarget != null ? de_S3CatalogTarget(output.S3CatalogTarget, context) : undefined, - S3CsvSource: output.S3CsvSource != null ? de_S3CsvSource(output.S3CsvSource, context) : undefined, - S3DeltaCatalogTarget: - output.S3DeltaCatalogTarget != null ? de_S3DeltaCatalogTarget(output.S3DeltaCatalogTarget, context) : undefined, - S3DeltaDirectTarget: - output.S3DeltaDirectTarget != null ? de_S3DeltaDirectTarget(output.S3DeltaDirectTarget, context) : undefined, - S3DeltaSource: output.S3DeltaSource != null ? de_S3DeltaSource(output.S3DeltaSource, context) : undefined, - S3DirectTarget: output.S3DirectTarget != null ? de_S3DirectTarget(output.S3DirectTarget, context) : undefined, - S3GlueParquetTarget: - output.S3GlueParquetTarget != null ? de_S3GlueParquetTarget(output.S3GlueParquetTarget, context) : undefined, - S3HudiCatalogTarget: - output.S3HudiCatalogTarget != null ? de_S3HudiCatalogTarget(output.S3HudiCatalogTarget, context) : undefined, - S3HudiDirectTarget: - output.S3HudiDirectTarget != null ? de_S3HudiDirectTarget(output.S3HudiDirectTarget, context) : undefined, - S3HudiSource: output.S3HudiSource != null ? de_S3HudiSource(output.S3HudiSource, context) : undefined, - S3JsonSource: output.S3JsonSource != null ? de_S3JsonSource(output.S3JsonSource, context) : undefined, - S3ParquetSource: output.S3ParquetSource != null ? de_S3ParquetSource(output.S3ParquetSource, context) : undefined, - SelectFields: output.SelectFields != null ? de_SelectFields(output.SelectFields, context) : undefined, - SelectFromCollection: - output.SelectFromCollection != null ? de_SelectFromCollection(output.SelectFromCollection, context) : undefined, - SparkConnectorSource: - output.SparkConnectorSource != null ? de_SparkConnectorSource(output.SparkConnectorSource, context) : undefined, - SparkConnectorTarget: - output.SparkConnectorTarget != null ? de_SparkConnectorTarget(output.SparkConnectorTarget, context) : undefined, - SparkSQL: output.SparkSQL != null ? de_SparkSQL(output.SparkSQL, context) : undefined, - Spigot: output.Spigot != null ? de_Spigot(output.Spigot, context) : undefined, - SplitFields: output.SplitFields != null ? de_SplitFields(output.SplitFields, context) : undefined, - Union: output.Union != null ? de_Union(output.Union, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CodeGenConfigurationNodes - */ -const de_CodeGenConfigurationNodes = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_CodeGenConfigurationNode(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1CodeGenEdge - */ -const de_CodeGenEdge = (output: any, context: __SerdeContext): CodeGenEdge => { - return { - Source: __expectString(output.Source), - Target: __expectString(output.Target), - TargetParameter: __expectString(output.TargetParameter), - } as any; -}; - -/** - * deserializeAws_json1_1CodeGenNode - */ -const de_CodeGenNode = (output: any, context: __SerdeContext): CodeGenNode => { - return { - Args: output.Args != null ? de_CodeGenNodeArgs(output.Args, context) : undefined, - Id: __expectString(output.Id), - LineNumber: __expectInt32(output.LineNumber), - NodeType: __expectString(output.NodeType), - } as any; -}; - -/** - * deserializeAws_json1_1CodeGenNodeArg - */ -const de_CodeGenNodeArg = (output: any, context: __SerdeContext): CodeGenNodeArg => { - return { - Name: __expectString(output.Name), - Param: __expectBoolean(output.Param), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1CodeGenNodeArgs - */ -const de_CodeGenNodeArgs = (output: any, context: __SerdeContext): CodeGenNodeArg[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeGenNodeArg(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Column - */ -const de_Column = (output: any, context: __SerdeContext): Column => { - return { - Comment: __expectString(output.Comment), - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ColumnError - */ -const de_ColumnError = (output: any, context: __SerdeContext): ColumnError => { - return { - ColumnName: __expectString(output.ColumnName), - Error: output.Error != null ? de_ErrorDetail(output.Error, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ColumnErrors - */ -const de_ColumnErrors = (output: any, context: __SerdeContext): ColumnError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnImportance - */ -const de_ColumnImportance = (output: any, context: __SerdeContext): ColumnImportance => { - return { - ColumnName: __expectString(output.ColumnName), - Importance: __limitedParseDouble(output.Importance), - } as any; -}; - -/** - * deserializeAws_json1_1ColumnImportanceList - */ -const de_ColumnImportanceList = (output: any, context: __SerdeContext): ColumnImportance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnImportance(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnList - */ -const de_ColumnList = (output: any, context: __SerdeContext): Column[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Column(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnRowFilter - */ -const de_ColumnRowFilter = (output: any, context: __SerdeContext): ColumnRowFilter => { - return { - ColumnName: __expectString(output.ColumnName), - RowFilterExpression: __expectString(output.RowFilterExpression), - } as any; -}; - -/** - * deserializeAws_json1_1ColumnRowFilterList - */ -const de_ColumnRowFilterList = (output: any, context: __SerdeContext): ColumnRowFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnRowFilter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnStatistics - */ -const de_ColumnStatistics = (output: any, context: __SerdeContext): ColumnStatistics => { - return { - AnalyzedTime: - output.AnalyzedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AnalyzedTime))) - : undefined, - ColumnName: __expectString(output.ColumnName), - ColumnType: __expectString(output.ColumnType), - StatisticsData: output.StatisticsData != null ? de_ColumnStatisticsData(output.StatisticsData, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ColumnStatisticsData - */ -const de_ColumnStatisticsData = (output: any, context: __SerdeContext): ColumnStatisticsData => { - return { - BinaryColumnStatisticsData: - output.BinaryColumnStatisticsData != null - ? de_BinaryColumnStatisticsData(output.BinaryColumnStatisticsData, context) - : undefined, - BooleanColumnStatisticsData: - output.BooleanColumnStatisticsData != null - ? de_BooleanColumnStatisticsData(output.BooleanColumnStatisticsData, context) - : undefined, - DateColumnStatisticsData: - output.DateColumnStatisticsData != null - ? de_DateColumnStatisticsData(output.DateColumnStatisticsData, context) - : undefined, - DecimalColumnStatisticsData: - output.DecimalColumnStatisticsData != null - ? de_DecimalColumnStatisticsData(output.DecimalColumnStatisticsData, context) - : undefined, - DoubleColumnStatisticsData: - output.DoubleColumnStatisticsData != null - ? de_DoubleColumnStatisticsData(output.DoubleColumnStatisticsData, context) - : undefined, - LongColumnStatisticsData: - output.LongColumnStatisticsData != null - ? de_LongColumnStatisticsData(output.LongColumnStatisticsData, context) - : undefined, - StringColumnStatisticsData: - output.StringColumnStatisticsData != null - ? de_StringColumnStatisticsData(output.StringColumnStatisticsData, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ColumnStatisticsError - */ -const de_ColumnStatisticsError = (output: any, context: __SerdeContext): ColumnStatisticsError => { - return { - ColumnStatistics: - output.ColumnStatistics != null ? de_ColumnStatistics(output.ColumnStatistics, context) : undefined, - Error: output.Error != null ? de_ErrorDetail(output.Error, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ColumnStatisticsErrors - */ -const de_ColumnStatisticsErrors = (output: any, context: __SerdeContext): ColumnStatisticsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnStatisticsError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnStatisticsList - */ -const de_ColumnStatisticsList = (output: any, context: __SerdeContext): ColumnStatistics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnStatistics(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnValueStringList - */ -const de_ColumnValueStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentRunsExceededException - */ -const de_ConcurrentRunsExceededException = (output: any, context: __SerdeContext): ConcurrentRunsExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Condition - */ -const de_Condition = (output: any, context: __SerdeContext): Condition => { - return { - CrawlState: __expectString(output.CrawlState), - CrawlerName: __expectString(output.CrawlerName), - JobName: __expectString(output.JobName), - LogicalOperator: __expectString(output.LogicalOperator), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1ConditionCheckFailureException - */ -const de_ConditionCheckFailureException = (output: any, context: __SerdeContext): ConditionCheckFailureException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConditionList - */ -const de_ConditionList = (output: any, context: __SerdeContext): Condition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Condition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConfusionMatrix - */ -const de_ConfusionMatrix = (output: any, context: __SerdeContext): ConfusionMatrix => { - return { - NumFalseNegatives: __expectLong(output.NumFalseNegatives), - NumFalsePositives: __expectLong(output.NumFalsePositives), - NumTrueNegatives: __expectLong(output.NumTrueNegatives), - NumTruePositives: __expectLong(output.NumTruePositives), - } as any; -}; - -/** - * deserializeAws_json1_1Connection - */ -const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - ConnectionProperties: - output.ConnectionProperties != null ? de_ConnectionProperties(output.ConnectionProperties, context) : undefined, - ConnectionType: __expectString(output.ConnectionType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastUpdatedBy: __expectString(output.LastUpdatedBy), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - MatchCriteria: output.MatchCriteria != null ? de_MatchCriteria(output.MatchCriteria, context) : undefined, - Name: __expectString(output.Name), - PhysicalConnectionRequirements: - output.PhysicalConnectionRequirements != null - ? de_PhysicalConnectionRequirements(output.PhysicalConnectionRequirements, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionList - */ -const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connection(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionPasswordEncryption - */ -const de_ConnectionPasswordEncryption = (output: any, context: __SerdeContext): ConnectionPasswordEncryption => { - return { - AwsKmsKeyId: __expectString(output.AwsKmsKeyId), - ReturnConnectionPasswordEncrypted: __expectBoolean(output.ReturnConnectionPasswordEncrypted), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionProperties - */ -const de_ConnectionProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [ConnectionPropertyKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1ConnectionsList - */ -const de_ConnectionsList = (output: any, context: __SerdeContext): ConnectionsList => { - return { - Connections: output.Connections != null ? de_OrchestrationStringList(output.Connections, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContextWords - */ -const de_ContextWords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Crawl - */ -const de_Crawl = (output: any, context: __SerdeContext): Crawl => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - LogGroup: __expectString(output.LogGroup), - LogStream: __expectString(output.LogStream), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1Crawler - */ -const de_Crawler = (output: any, context: __SerdeContext): Crawler => { - return { - Classifiers: output.Classifiers != null ? de_ClassifierNameList(output.Classifiers, context) : undefined, - Configuration: __expectString(output.Configuration), - CrawlElapsedTime: __expectLong(output.CrawlElapsedTime), - CrawlerSecurityConfiguration: __expectString(output.CrawlerSecurityConfiguration), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatabaseName: __expectString(output.DatabaseName), - Description: __expectString(output.Description), - LakeFormationConfiguration: - output.LakeFormationConfiguration != null - ? de_LakeFormationConfiguration(output.LakeFormationConfiguration, context) - : undefined, - LastCrawl: output.LastCrawl != null ? de_LastCrawlInfo(output.LastCrawl, context) : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - LineageConfiguration: - output.LineageConfiguration != null ? de_LineageConfiguration(output.LineageConfiguration, context) : undefined, - Name: __expectString(output.Name), - RecrawlPolicy: output.RecrawlPolicy != null ? de_RecrawlPolicy(output.RecrawlPolicy, context) : undefined, - Role: __expectString(output.Role), - Schedule: output.Schedule != null ? de_Schedule(output.Schedule, context) : undefined, - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_SchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - State: __expectString(output.State), - TablePrefix: __expectString(output.TablePrefix), - Targets: output.Targets != null ? de_CrawlerTargets(output.Targets, context) : undefined, - Version: __expectLong(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerHistory - */ -const de_CrawlerHistory = (output: any, context: __SerdeContext): CrawlerHistory => { - return { - CrawlId: __expectString(output.CrawlId), - DPUHour: __limitedParseDouble(output.DPUHour), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - LogGroup: __expectString(output.LogGroup), - LogStream: __expectString(output.LogStream), - MessagePrefix: __expectString(output.MessagePrefix), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - Summary: __expectString(output.Summary), - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerHistoryList - */ -const de_CrawlerHistoryList = (output: any, context: __SerdeContext): CrawlerHistory[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CrawlerHistory(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CrawlerList - */ -const de_CrawlerList = (output: any, context: __SerdeContext): Crawler[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Crawler(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CrawlerMetrics - */ -const de_CrawlerMetrics = (output: any, context: __SerdeContext): CrawlerMetrics => { - return { - CrawlerName: __expectString(output.CrawlerName), - LastRuntimeSeconds: __limitedParseDouble(output.LastRuntimeSeconds), - MedianRuntimeSeconds: __limitedParseDouble(output.MedianRuntimeSeconds), - StillEstimating: __expectBoolean(output.StillEstimating), - TablesCreated: __expectInt32(output.TablesCreated), - TablesDeleted: __expectInt32(output.TablesDeleted), - TablesUpdated: __expectInt32(output.TablesUpdated), - TimeLeftSeconds: __limitedParseDouble(output.TimeLeftSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerMetricsList - */ -const de_CrawlerMetricsList = (output: any, context: __SerdeContext): CrawlerMetrics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CrawlerMetrics(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CrawlerNameList - */ -const de_CrawlerNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CrawlerNodeDetails - */ -const de_CrawlerNodeDetails = (output: any, context: __SerdeContext): CrawlerNodeDetails => { - return { - Crawls: output.Crawls != null ? de_CrawlList(output.Crawls, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerNotRunningException - */ -const de_CrawlerNotRunningException = (output: any, context: __SerdeContext): CrawlerNotRunningException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerRunningException - */ -const de_CrawlerRunningException = (output: any, context: __SerdeContext): CrawlerRunningException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerStoppingException - */ -const de_CrawlerStoppingException = (output: any, context: __SerdeContext): CrawlerStoppingException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CrawlerTargets - */ -const de_CrawlerTargets = (output: any, context: __SerdeContext): CrawlerTargets => { - return { - CatalogTargets: output.CatalogTargets != null ? de_CatalogTargetList(output.CatalogTargets, context) : undefined, - DeltaTargets: output.DeltaTargets != null ? de_DeltaTargetList(output.DeltaTargets, context) : undefined, - DynamoDBTargets: - output.DynamoDBTargets != null ? de_DynamoDBTargetList(output.DynamoDBTargets, context) : undefined, - JdbcTargets: output.JdbcTargets != null ? de_JdbcTargetList(output.JdbcTargets, context) : undefined, - MongoDBTargets: output.MongoDBTargets != null ? de_MongoDBTargetList(output.MongoDBTargets, context) : undefined, - S3Targets: output.S3Targets != null ? de_S3TargetList(output.S3Targets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CrawlList - */ -const de_CrawlList = (output: any, context: __SerdeContext): Crawl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Crawl(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateBlueprintResponse - */ -const de_CreateBlueprintResponse = (output: any, context: __SerdeContext): CreateBlueprintResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateClassifierResponse - */ -const de_CreateClassifierResponse = (output: any, context: __SerdeContext): CreateClassifierResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateConnectionResponse - */ -const de_CreateConnectionResponse = (output: any, context: __SerdeContext): CreateConnectionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateCrawlerResponse - */ -const de_CreateCrawlerResponse = (output: any, context: __SerdeContext): CreateCrawlerResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateCustomEntityTypeResponse - */ -const de_CreateCustomEntityTypeResponse = (output: any, context: __SerdeContext): CreateCustomEntityTypeResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDatabaseResponse - */ -const de_CreateDatabaseResponse = (output: any, context: __SerdeContext): CreateDatabaseResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateDataQualityRulesetResponse - */ -const de_CreateDataQualityRulesetResponse = ( - output: any, - context: __SerdeContext -): CreateDataQualityRulesetResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDevEndpointResponse - */ -const de_CreateDevEndpointResponse = (output: any, context: __SerdeContext): CreateDevEndpointResponse => { - return { - Arguments: output.Arguments != null ? de_MapValue(output.Arguments, context) : undefined, - AvailabilityZone: __expectString(output.AvailabilityZone), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EndpointName: __expectString(output.EndpointName), - ExtraJarsS3Path: __expectString(output.ExtraJarsS3Path), - ExtraPythonLibsS3Path: __expectString(output.ExtraPythonLibsS3Path), - FailureReason: __expectString(output.FailureReason), - GlueVersion: __expectString(output.GlueVersion), - NumberOfNodes: __expectInt32(output.NumberOfNodes), - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - RoleArn: __expectString(output.RoleArn), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - SecurityGroupIds: output.SecurityGroupIds != null ? de_StringList(output.SecurityGroupIds, context) : undefined, - Status: __expectString(output.Status), - SubnetId: __expectString(output.SubnetId), - VpcId: __expectString(output.VpcId), - WorkerType: __expectString(output.WorkerType), - YarnEndpointAddress: __expectString(output.YarnEndpointAddress), - ZeppelinRemoteSparkInterpreterPort: __expectInt32(output.ZeppelinRemoteSparkInterpreterPort), - } as any; -}; - -/** - * deserializeAws_json1_1CreateJobResponse - */ -const de_CreateJobResponse = (output: any, context: __SerdeContext): CreateJobResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateMLTransformResponse - */ -const de_CreateMLTransformResponse = (output: any, context: __SerdeContext): CreateMLTransformResponse => { - return { - TransformId: __expectString(output.TransformId), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePartitionIndexResponse - */ -const de_CreatePartitionIndexResponse = (output: any, context: __SerdeContext): CreatePartitionIndexResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreatePartitionResponse - */ -const de_CreatePartitionResponse = (output: any, context: __SerdeContext): CreatePartitionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateRegistryResponse - */ -const de_CreateRegistryResponse = (output: any, context: __SerdeContext): CreateRegistryResponse => { - return { - Description: __expectString(output.Description), - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - Tags: output.Tags != null ? de_TagsMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateSchemaResponse - */ -const de_CreateSchemaResponse = (output: any, context: __SerdeContext): CreateSchemaResponse => { - return { - Compatibility: __expectString(output.Compatibility), - DataFormat: __expectString(output.DataFormat), - Description: __expectString(output.Description), - LatestSchemaVersion: __expectLong(output.LatestSchemaVersion), - NextSchemaVersion: __expectLong(output.NextSchemaVersion), - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaCheckpoint: __expectLong(output.SchemaCheckpoint), - SchemaName: __expectString(output.SchemaName), - SchemaStatus: __expectString(output.SchemaStatus), - SchemaVersionId: __expectString(output.SchemaVersionId), - SchemaVersionStatus: __expectString(output.SchemaVersionStatus), - Tags: output.Tags != null ? de_TagsMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateScriptResponse - */ -const de_CreateScriptResponse = (output: any, context: __SerdeContext): CreateScriptResponse => { - return { - PythonScript: __expectString(output.PythonScript), - ScalaCode: __expectString(output.ScalaCode), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSecurityConfigurationResponse - */ -const de_CreateSecurityConfigurationResponse = ( - output: any, - context: __SerdeContext -): CreateSecurityConfigurationResponse => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSessionResponse - */ -const de_CreateSessionResponse = (output: any, context: __SerdeContext): CreateSessionResponse => { - return { - Session: output.Session != null ? de_Session(output.Session, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTableResponse - */ -const de_CreateTableResponse = (output: any, context: __SerdeContext): CreateTableResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateTriggerResponse - */ -const de_CreateTriggerResponse = (output: any, context: __SerdeContext): CreateTriggerResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserDefinedFunctionResponse - */ -const de_CreateUserDefinedFunctionResponse = ( - output: any, - context: __SerdeContext -): CreateUserDefinedFunctionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateWorkflowResponse - */ -const de_CreateWorkflowResponse = (output: any, context: __SerdeContext): CreateWorkflowResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CsvClassifier - */ -const de_CsvClassifier = (output: any, context: __SerdeContext): CsvClassifier => { - return { - AllowSingleColumn: __expectBoolean(output.AllowSingleColumn), - ContainsHeader: __expectString(output.ContainsHeader), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CustomDatatypeConfigured: __expectBoolean(output.CustomDatatypeConfigured), - CustomDatatypes: output.CustomDatatypes != null ? de_CustomDatatypes(output.CustomDatatypes, context) : undefined, - Delimiter: __expectString(output.Delimiter), - DisableValueTrimming: __expectBoolean(output.DisableValueTrimming), - Header: output.Header != null ? de_CsvHeader(output.Header, context) : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Name: __expectString(output.Name), - QuoteSymbol: __expectString(output.QuoteSymbol), - Version: __expectLong(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1CsvHeader - */ -const de_CsvHeader = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomCode - */ -const de_CustomCode = (output: any, context: __SerdeContext): CustomCode => { - return { - ClassName: __expectString(output.ClassName), - Code: __expectString(output.Code), - Inputs: output.Inputs != null ? de_ManyInputs(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomDatatypes - */ -const de_CustomDatatypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomEntityType - */ -const de_CustomEntityType = (output: any, context: __SerdeContext): CustomEntityType => { - return { - ContextWords: output.ContextWords != null ? de_ContextWords(output.ContextWords, context) : undefined, - Name: __expectString(output.Name), - RegexString: __expectString(output.RegexString), - } as any; -}; - -/** - * deserializeAws_json1_1CustomEntityTypeNames - */ -const de_CustomEntityTypeNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomEntityTypes - */ -const de_CustomEntityTypes = (output: any, context: __SerdeContext): CustomEntityType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomEntityType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DagEdges - */ -const de_DagEdges = (output: any, context: __SerdeContext): CodeGenEdge[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeGenEdge(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DagNodes - */ -const de_DagNodes = (output: any, context: __SerdeContext): CodeGenNode[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeGenNode(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Database - */ -const de_Database = (output: any, context: __SerdeContext): Database => { - return { - CatalogId: __expectString(output.CatalogId), - CreateTableDefaultPermissions: - output.CreateTableDefaultPermissions != null - ? de_PrincipalPermissionsList(output.CreateTableDefaultPermissions, context) - : undefined, - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - Description: __expectString(output.Description), - FederatedDatabase: - output.FederatedDatabase != null ? de_FederatedDatabase(output.FederatedDatabase, context) : undefined, - LocationUri: __expectString(output.LocationUri), - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - TargetDatabase: output.TargetDatabase != null ? de_DatabaseIdentifier(output.TargetDatabase, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DatabaseIdentifier - */ -const de_DatabaseIdentifier = (output: any, context: __SerdeContext): DatabaseIdentifier => { - return { - CatalogId: __expectString(output.CatalogId), - DatabaseName: __expectString(output.DatabaseName), - } as any; -}; - -/** - * deserializeAws_json1_1DatabaseList - */ -const de_DatabaseList = (output: any, context: __SerdeContext): Database[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Database(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataCatalogEncryptionSettings - */ -const de_DataCatalogEncryptionSettings = (output: any, context: __SerdeContext): DataCatalogEncryptionSettings => { - return { - ConnectionPasswordEncryption: - output.ConnectionPasswordEncryption != null - ? de_ConnectionPasswordEncryption(output.ConnectionPasswordEncryption, context) - : undefined, - EncryptionAtRest: - output.EncryptionAtRest != null ? de_EncryptionAtRest(output.EncryptionAtRest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataLakePrincipal - */ -const de_DataLakePrincipal = (output: any, context: __SerdeContext): DataLakePrincipal => { - return { - DataLakePrincipalIdentifier: __expectString(output.DataLakePrincipalIdentifier), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityEvaluationRunAdditionalRunOptions - */ -const de_DataQualityEvaluationRunAdditionalRunOptions = ( - output: any, - context: __SerdeContext -): DataQualityEvaluationRunAdditionalRunOptions => { - return { - CloudWatchMetricsEnabled: __expectBoolean(output.CloudWatchMetricsEnabled), - ResultsS3Prefix: __expectString(output.ResultsS3Prefix), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityResult - */ -const de_DataQualityResult = (output: any, context: __SerdeContext): DataQualityResult => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - EvaluationContext: __expectString(output.EvaluationContext), - JobName: __expectString(output.JobName), - JobRunId: __expectString(output.JobRunId), - ResultId: __expectString(output.ResultId), - RuleResults: output.RuleResults != null ? de_DataQualityRuleResults(output.RuleResults, context) : undefined, - RulesetEvaluationRunId: __expectString(output.RulesetEvaluationRunId), - RulesetName: __expectString(output.RulesetName), - Score: __limitedParseDouble(output.Score), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityResultDescription - */ -const de_DataQualityResultDescription = (output: any, context: __SerdeContext): DataQualityResultDescription => { - return { - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - JobName: __expectString(output.JobName), - JobRunId: __expectString(output.JobRunId), - ResultId: __expectString(output.ResultId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityResultDescriptionList - */ -const de_DataQualityResultDescriptionList = (output: any, context: __SerdeContext): DataQualityResultDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataQualityResultDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityResultIdList - */ -const de_DataQualityResultIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityResultIds - */ -const de_DataQualityResultIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityResultsList - */ -const de_DataQualityResultsList = (output: any, context: __SerdeContext): DataQualityResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataQualityResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityRuleRecommendationRunDescription - */ -const de_DataQualityRuleRecommendationRunDescription = ( - output: any, - context: __SerdeContext -): DataQualityRuleRecommendationRunDescription => { - return { - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - RunId: __expectString(output.RunId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityRuleRecommendationRunList - */ -const de_DataQualityRuleRecommendationRunList = ( - output: any, - context: __SerdeContext -): DataQualityRuleRecommendationRunDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataQualityRuleRecommendationRunDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityRuleResult - */ -const de_DataQualityRuleResult = (output: any, context: __SerdeContext): DataQualityRuleResult => { - return { - Description: __expectString(output.Description), - EvaluationMessage: __expectString(output.EvaluationMessage), - Name: __expectString(output.Name), - Result: __expectString(output.Result), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityRuleResults - */ -const de_DataQualityRuleResults = (output: any, context: __SerdeContext): DataQualityRuleResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataQualityRuleResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityRulesetEvaluationRunDescription - */ -const de_DataQualityRulesetEvaluationRunDescription = ( - output: any, - context: __SerdeContext -): DataQualityRulesetEvaluationRunDescription => { - return { - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - RunId: __expectString(output.RunId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityRulesetEvaluationRunList - */ -const de_DataQualityRulesetEvaluationRunList = ( - output: any, - context: __SerdeContext -): DataQualityRulesetEvaluationRunDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataQualityRulesetEvaluationRunDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityRulesetList - */ -const de_DataQualityRulesetList = (output: any, context: __SerdeContext): DataQualityRulesetListDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataQualityRulesetListDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataQualityRulesetListDetails - */ -const de_DataQualityRulesetListDetails = (output: any, context: __SerdeContext): DataQualityRulesetListDetails => { - return { - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - Description: __expectString(output.Description), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - Name: __expectString(output.Name), - RecommendationRunId: __expectString(output.RecommendationRunId), - RuleCount: __expectInt32(output.RuleCount), - TargetTable: output.TargetTable != null ? de_DataQualityTargetTable(output.TargetTable, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityTargetTable - */ -const de_DataQualityTargetTable = (output: any, context: __SerdeContext): DataQualityTargetTable => { - return { - DatabaseName: __expectString(output.DatabaseName), - TableName: __expectString(output.TableName), - } as any; -}; - -/** - * deserializeAws_json1_1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - GlueTable: output.GlueTable != null ? de_GlueTable(output.GlueTable, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Datatype - */ -const de_Datatype = (output: any, context: __SerdeContext): Datatype => { - return { - Id: __expectString(output.Id), - Label: __expectString(output.Label), - } as any; -}; - -/** - * deserializeAws_json1_1DateColumnStatisticsData - */ -const de_DateColumnStatisticsData = (output: any, context: __SerdeContext): DateColumnStatisticsData => { - return { - MaximumValue: - output.MaximumValue != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.MaximumValue))) - : undefined, - MinimumValue: - output.MinimumValue != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.MinimumValue))) - : undefined, - NumberOfDistinctValues: __expectLong(output.NumberOfDistinctValues), - NumberOfNulls: __expectLong(output.NumberOfNulls), - } as any; -}; - -/** - * deserializeAws_json1_1DecimalColumnStatisticsData - */ -const de_DecimalColumnStatisticsData = (output: any, context: __SerdeContext): DecimalColumnStatisticsData => { - return { - MaximumValue: output.MaximumValue != null ? de_DecimalNumber(output.MaximumValue, context) : undefined, - MinimumValue: output.MinimumValue != null ? de_DecimalNumber(output.MinimumValue, context) : undefined, - NumberOfDistinctValues: __expectLong(output.NumberOfDistinctValues), - NumberOfNulls: __expectLong(output.NumberOfNulls), - } as any; -}; - -/** - * deserializeAws_json1_1DecimalNumber - */ -const de_DecimalNumber = (output: any, context: __SerdeContext): DecimalNumber => { - return { - Scale: __expectInt32(output.Scale), - UnscaledValue: output.UnscaledValue != null ? context.base64Decoder(output.UnscaledValue) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBlueprintResponse - */ -const de_DeleteBlueprintResponse = (output: any, context: __SerdeContext): DeleteBlueprintResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteClassifierResponse - */ -const de_DeleteClassifierResponse = (output: any, context: __SerdeContext): DeleteClassifierResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteColumnStatisticsForPartitionResponse - */ -const de_DeleteColumnStatisticsForPartitionResponse = ( - output: any, - context: __SerdeContext -): DeleteColumnStatisticsForPartitionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteColumnStatisticsForTableResponse - */ -const de_DeleteColumnStatisticsForTableResponse = ( - output: any, - context: __SerdeContext -): DeleteColumnStatisticsForTableResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteConnectionResponse - */ -const de_DeleteConnectionResponse = (output: any, context: __SerdeContext): DeleteConnectionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteCrawlerResponse - */ -const de_DeleteCrawlerResponse = (output: any, context: __SerdeContext): DeleteCrawlerResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteCustomEntityTypeResponse - */ -const de_DeleteCustomEntityTypeResponse = (output: any, context: __SerdeContext): DeleteCustomEntityTypeResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDatabaseResponse - */ -const de_DeleteDatabaseResponse = (output: any, context: __SerdeContext): DeleteDatabaseResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDataQualityRulesetResponse - */ -const de_DeleteDataQualityRulesetResponse = ( - output: any, - context: __SerdeContext -): DeleteDataQualityRulesetResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDevEndpointResponse - */ -const de_DeleteDevEndpointResponse = (output: any, context: __SerdeContext): DeleteDevEndpointResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteJobResponse - */ -const de_DeleteJobResponse = (output: any, context: __SerdeContext): DeleteJobResponse => { - return { - JobName: __expectString(output.JobName), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteMLTransformResponse - */ -const de_DeleteMLTransformResponse = (output: any, context: __SerdeContext): DeleteMLTransformResponse => { - return { - TransformId: __expectString(output.TransformId), - } as any; -}; - -/** - * deserializeAws_json1_1DeletePartitionIndexResponse - */ -const de_DeletePartitionIndexResponse = (output: any, context: __SerdeContext): DeletePartitionIndexResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeletePartitionResponse - */ -const de_DeletePartitionResponse = (output: any, context: __SerdeContext): DeletePartitionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRegistryResponse - */ -const de_DeleteRegistryResponse = (output: any, context: __SerdeContext): DeleteRegistryResponse => { - return { - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteSchemaResponse - */ -const de_DeleteSchemaResponse = (output: any, context: __SerdeContext): DeleteSchemaResponse => { - return { - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteSchemaVersionsResponse - */ -const de_DeleteSchemaVersionsResponse = (output: any, context: __SerdeContext): DeleteSchemaVersionsResponse => { - return { - SchemaVersionErrors: - output.SchemaVersionErrors != null ? de_SchemaVersionErrorList(output.SchemaVersionErrors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteSecurityConfigurationResponse - */ -const de_DeleteSecurityConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteSecurityConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteSessionResponse - */ -const de_DeleteSessionResponse = (output: any, context: __SerdeContext): DeleteSessionResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTableResponse - */ -const de_DeleteTableResponse = (output: any, context: __SerdeContext): DeleteTableResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteTableVersionResponse - */ -const de_DeleteTableVersionResponse = (output: any, context: __SerdeContext): DeleteTableVersionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteTriggerResponse - */ -const de_DeleteTriggerResponse = (output: any, context: __SerdeContext): DeleteTriggerResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteUserDefinedFunctionResponse - */ -const de_DeleteUserDefinedFunctionResponse = ( - output: any, - context: __SerdeContext -): DeleteUserDefinedFunctionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteWorkflowResponse - */ -const de_DeleteWorkflowResponse = (output: any, context: __SerdeContext): DeleteWorkflowResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DeltaTarget - */ -const de_DeltaTarget = (output: any, context: __SerdeContext): DeltaTarget => { - return { - ConnectionName: __expectString(output.ConnectionName), - CreateNativeDeltaTable: __expectBoolean(output.CreateNativeDeltaTable), - DeltaTables: output.DeltaTables != null ? de_PathList(output.DeltaTables, context) : undefined, - WriteManifest: __expectBoolean(output.WriteManifest), - } as any; -}; - -/** - * deserializeAws_json1_1DeltaTargetList - */ -const de_DeltaTargetList = (output: any, context: __SerdeContext): DeltaTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeltaTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DevEndpoint - */ -const de_DevEndpoint = (output: any, context: __SerdeContext): DevEndpoint => { - return { - Arguments: output.Arguments != null ? de_MapValue(output.Arguments, context) : undefined, - AvailabilityZone: __expectString(output.AvailabilityZone), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EndpointName: __expectString(output.EndpointName), - ExtraJarsS3Path: __expectString(output.ExtraJarsS3Path), - ExtraPythonLibsS3Path: __expectString(output.ExtraPythonLibsS3Path), - FailureReason: __expectString(output.FailureReason), - GlueVersion: __expectString(output.GlueVersion), - LastModifiedTimestamp: - output.LastModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTimestamp))) - : undefined, - LastUpdateStatus: __expectString(output.LastUpdateStatus), - NumberOfNodes: __expectInt32(output.NumberOfNodes), - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - PrivateAddress: __expectString(output.PrivateAddress), - PublicAddress: __expectString(output.PublicAddress), - PublicKey: __expectString(output.PublicKey), - PublicKeys: output.PublicKeys != null ? de_PublicKeysList(output.PublicKeys, context) : undefined, - RoleArn: __expectString(output.RoleArn), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - SecurityGroupIds: output.SecurityGroupIds != null ? de_StringList(output.SecurityGroupIds, context) : undefined, - Status: __expectString(output.Status), - SubnetId: __expectString(output.SubnetId), - VpcId: __expectString(output.VpcId), - WorkerType: __expectString(output.WorkerType), - YarnEndpointAddress: __expectString(output.YarnEndpointAddress), - ZeppelinRemoteSparkInterpreterPort: __expectInt32(output.ZeppelinRemoteSparkInterpreterPort), - } as any; -}; - -/** - * deserializeAws_json1_1DevEndpointList - */ -const de_DevEndpointList = (output: any, context: __SerdeContext): DevEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DevEndpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DevEndpointNameList - */ -const de_DevEndpointNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DevEndpointNames - */ -const de_DevEndpointNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DirectJDBCSource - */ -const de_DirectJDBCSource = (output: any, context: __SerdeContext): DirectJDBCSource => { - return { - ConnectionName: __expectString(output.ConnectionName), - ConnectionType: __expectString(output.ConnectionType), - Database: __expectString(output.Database), - Name: __expectString(output.Name), - RedshiftTmpDir: __expectString(output.RedshiftTmpDir), - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1DirectKafkaSource - */ -const de_DirectKafkaSource = (output: any, context: __SerdeContext): DirectKafkaSource => { - return { - DataPreviewOptions: - output.DataPreviewOptions != null - ? de_StreamingDataPreviewOptions(output.DataPreviewOptions, context) - : undefined, - DetectSchema: __expectBoolean(output.DetectSchema), - Name: __expectString(output.Name), - StreamingOptions: - output.StreamingOptions != null ? de_KafkaStreamingSourceOptions(output.StreamingOptions, context) : undefined, - WindowSize: __expectInt32(output.WindowSize), - } as any; -}; - -/** - * deserializeAws_json1_1DirectKinesisSource - */ -const de_DirectKinesisSource = (output: any, context: __SerdeContext): DirectKinesisSource => { - return { - DataPreviewOptions: - output.DataPreviewOptions != null - ? de_StreamingDataPreviewOptions(output.DataPreviewOptions, context) - : undefined, - DetectSchema: __expectBoolean(output.DetectSchema), - Name: __expectString(output.Name), - StreamingOptions: - output.StreamingOptions != null ? de_KinesisStreamingSourceOptions(output.StreamingOptions, context) : undefined, - WindowSize: __expectInt32(output.WindowSize), - } as any; -}; - -/** - * deserializeAws_json1_1DirectSchemaChangePolicy - */ -const de_DirectSchemaChangePolicy = (output: any, context: __SerdeContext): DirectSchemaChangePolicy => { - return { - Database: __expectString(output.Database), - EnableUpdateCatalog: __expectBoolean(output.EnableUpdateCatalog), - Table: __expectString(output.Table), - UpdateBehavior: __expectString(output.UpdateBehavior), - } as any; -}; - -/** - * deserializeAws_json1_1DoubleColumnStatisticsData - */ -const de_DoubleColumnStatisticsData = (output: any, context: __SerdeContext): DoubleColumnStatisticsData => { - return { - MaximumValue: __limitedParseDouble(output.MaximumValue), - MinimumValue: __limitedParseDouble(output.MinimumValue), - NumberOfDistinctValues: __expectLong(output.NumberOfDistinctValues), - NumberOfNulls: __expectLong(output.NumberOfNulls), - } as any; -}; - -/** - * deserializeAws_json1_1DQResultsPublishingOptions - */ -const de_DQResultsPublishingOptions = (output: any, context: __SerdeContext): DQResultsPublishingOptions => { - return { - CloudWatchMetricsEnabled: __expectBoolean(output.CloudWatchMetricsEnabled), - EvaluationContext: __expectString(output.EvaluationContext), - ResultsPublishingEnabled: __expectBoolean(output.ResultsPublishingEnabled), - ResultsS3Prefix: __expectString(output.ResultsS3Prefix), - } as any; -}; - -/** - * deserializeAws_json1_1DQStopJobOnFailureOptions - */ -const de_DQStopJobOnFailureOptions = (output: any, context: __SerdeContext): DQStopJobOnFailureOptions => { - return { - StopJobOnFailureTiming: __expectString(output.StopJobOnFailureTiming), - } as any; -}; - -/** - * deserializeAws_json1_1DropDuplicates - */ -const de_DropDuplicates = (output: any, context: __SerdeContext): DropDuplicates => { - return { - Columns: output.Columns != null ? de_LimitedPathList(output.Columns, context) : undefined, - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DropFields - */ -const de_DropFields = (output: any, context: __SerdeContext): DropFields => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Paths: output.Paths != null ? de_GlueStudioPathList(output.Paths, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DropNullFields - */ -const de_DropNullFields = (output: any, context: __SerdeContext): DropNullFields => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - NullCheckBoxList: - output.NullCheckBoxList != null ? de_NullCheckBoxList(output.NullCheckBoxList, context) : undefined, - NullTextList: output.NullTextList != null ? de_NullValueFields(output.NullTextList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DynamicTransform - */ -const de_DynamicTransform = (output: any, context: __SerdeContext): DynamicTransform => { - return { - FunctionName: __expectString(output.FunctionName), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_TransformConfigParameterList(output.Parameters, context) : undefined, - Path: __expectString(output.Path), - TransformName: __expectString(output.TransformName), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1DynamoDBCatalogSource - */ -const de_DynamoDBCatalogSource = (output: any, context: __SerdeContext): DynamoDBCatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1DynamoDBTarget - */ -const de_DynamoDBTarget = (output: any, context: __SerdeContext): DynamoDBTarget => { - return { - Path: __expectString(output.Path), - scanAll: __expectBoolean(output.scanAll), - scanRate: __limitedParseDouble(output.scanRate), - } as any; -}; - -/** - * deserializeAws_json1_1DynamoDBTargetList - */ -const de_DynamoDBTargetList = (output: any, context: __SerdeContext): DynamoDBTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DynamoDBTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Edge - */ -const de_Edge = (output: any, context: __SerdeContext): Edge => { - return { - DestinationId: __expectString(output.DestinationId), - SourceId: __expectString(output.SourceId), - } as any; -}; - -/** - * deserializeAws_json1_1EdgeList - */ -const de_EdgeList = (output: any, context: __SerdeContext): Edge[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Edge(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EnableAdditionalMetadata - */ -const de_EnableAdditionalMetadata = (output: any, context: __SerdeContext): (JdbcMetadataEntry | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EnclosedInStringProperties - */ -const de_EnclosedInStringProperties = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EnclosedInStringPropertiesMinOne - */ -const de_EnclosedInStringPropertiesMinOne = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EncryptionAtRest - */ -const de_EncryptionAtRest = (output: any, context: __SerdeContext): EncryptionAtRest => { - return { - CatalogEncryptionMode: __expectString(output.CatalogEncryptionMode), - SseAwsKmsKeyId: __expectString(output.SseAwsKmsKeyId), - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - CloudWatchEncryption: - output.CloudWatchEncryption != null ? de_CloudWatchEncryption(output.CloudWatchEncryption, context) : undefined, - JobBookmarksEncryption: - output.JobBookmarksEncryption != null - ? de_JobBookmarksEncryption(output.JobBookmarksEncryption, context) - : undefined, - S3Encryption: output.S3Encryption != null ? de_S3EncryptionList(output.S3Encryption, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EntityNotFoundException - */ -const de_EntityNotFoundException = (output: any, context: __SerdeContext): EntityNotFoundException => { - return { - FromFederationSource: __expectBoolean(output.FromFederationSource), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ErrorByName - */ -const de_ErrorByName = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ErrorDetail(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1EvaluateDataQuality - */ -const de_EvaluateDataQuality = (output: any, context: __SerdeContext): EvaluateDataQuality => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Output: __expectString(output.Output), - PublishingOptions: - output.PublishingOptions != null ? de_DQResultsPublishingOptions(output.PublishingOptions, context) : undefined, - Ruleset: __expectString(output.Ruleset), - StopJobOnFailureOptions: - output.StopJobOnFailureOptions != null - ? de_DQStopJobOnFailureOptions(output.StopJobOnFailureOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EvaluationMetrics - */ -const de_EvaluationMetrics = (output: any, context: __SerdeContext): EvaluationMetrics => { - return { - FindMatchesMetrics: - output.FindMatchesMetrics != null ? de_FindMatchesMetrics(output.FindMatchesMetrics, context) : undefined, - TransformType: __expectString(output.TransformType), - } as any; -}; - -/** - * deserializeAws_json1_1EventBatchingCondition - */ -const de_EventBatchingCondition = (output: any, context: __SerdeContext): EventBatchingCondition => { - return { - BatchSize: __expectInt32(output.BatchSize), - BatchWindow: __expectInt32(output.BatchWindow), - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionProperty - */ -const de_ExecutionProperty = (output: any, context: __SerdeContext): ExecutionProperty => { - return { - MaxConcurrentRuns: __expectInt32(output.MaxConcurrentRuns), - } as any; -}; - -/** - * deserializeAws_json1_1ExportLabelsTaskRunProperties - */ -const de_ExportLabelsTaskRunProperties = (output: any, context: __SerdeContext): ExportLabelsTaskRunProperties => { - return { - OutputS3Path: __expectString(output.OutputS3Path), - } as any; -}; - -/** - * deserializeAws_json1_1FederatedDatabase - */ -const de_FederatedDatabase = (output: any, context: __SerdeContext): FederatedDatabase => { - return { - ConnectionName: __expectString(output.ConnectionName), - Identifier: __expectString(output.Identifier), - } as any; -}; - -/** - * deserializeAws_json1_1FederatedResourceAlreadyExistsException - */ -const de_FederatedResourceAlreadyExistsException = ( - output: any, - context: __SerdeContext -): FederatedResourceAlreadyExistsException => { - return { - AssociatedGlueResource: __expectString(output.AssociatedGlueResource), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1FederatedTable - */ -const de_FederatedTable = (output: any, context: __SerdeContext): FederatedTable => { - return { - ConnectionName: __expectString(output.ConnectionName), - DatabaseIdentifier: __expectString(output.DatabaseIdentifier), - Identifier: __expectString(output.Identifier), - } as any; -}; - -/** - * deserializeAws_json1_1FederationSourceException - */ -const de_FederationSourceException = (output: any, context: __SerdeContext): FederationSourceException => { - return { - FederationSourceErrorCode: __expectString(output.FederationSourceErrorCode), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1FederationSourceRetryableException - */ -const de_FederationSourceRetryableException = ( - output: any, - context: __SerdeContext -): FederationSourceRetryableException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1FillMissingValues - */ -const de_FillMissingValues = (output: any, context: __SerdeContext): FillMissingValues => { - return { - FilledPath: __expectString(output.FilledPath), - ImputedPath: __expectString(output.ImputedPath), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1Filter - */ -const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - Filters: output.Filters != null ? de_FilterExpressions(output.Filters, context) : undefined, - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - LogicalOperator: __expectString(output.LogicalOperator), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1FilterExpression - */ -const de_FilterExpression = (output: any, context: __SerdeContext): FilterExpression => { - return { - Negated: __expectBoolean(output.Negated), - Operation: __expectString(output.Operation), - Values: output.Values != null ? de_FilterValues(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FilterExpressions - */ -const de_FilterExpressions = (output: any, context: __SerdeContext): FilterExpression[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilterExpression(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FilterValue - */ -const de_FilterValue = (output: any, context: __SerdeContext): FilterValue => { - return { - Type: __expectString(output.Type), - Value: output.Value != null ? de_EnclosedInStringProperties(output.Value, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FilterValues - */ -const de_FilterValues = (output: any, context: __SerdeContext): FilterValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilterValue(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FindMatchesMetrics - */ -const de_FindMatchesMetrics = (output: any, context: __SerdeContext): FindMatchesMetrics => { - return { - AreaUnderPRCurve: __limitedParseDouble(output.AreaUnderPRCurve), - ColumnImportances: - output.ColumnImportances != null ? de_ColumnImportanceList(output.ColumnImportances, context) : undefined, - ConfusionMatrix: output.ConfusionMatrix != null ? de_ConfusionMatrix(output.ConfusionMatrix, context) : undefined, - F1: __limitedParseDouble(output.F1), - Precision: __limitedParseDouble(output.Precision), - Recall: __limitedParseDouble(output.Recall), - } as any; -}; - -/** - * deserializeAws_json1_1FindMatchesParameters - */ -const de_FindMatchesParameters = (output: any, context: __SerdeContext): FindMatchesParameters => { - return { - AccuracyCostTradeoff: __limitedParseDouble(output.AccuracyCostTradeoff), - EnforceProvidedLabels: __expectBoolean(output.EnforceProvidedLabels), - PrecisionRecallTradeoff: __limitedParseDouble(output.PrecisionRecallTradeoff), - PrimaryKeyColumnName: __expectString(output.PrimaryKeyColumnName), - } as any; -}; - -/** - * deserializeAws_json1_1FindMatchesTaskRunProperties - */ -const de_FindMatchesTaskRunProperties = (output: any, context: __SerdeContext): FindMatchesTaskRunProperties => { - return { - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobRunId: __expectString(output.JobRunId), - } as any; -}; - -/** - * deserializeAws_json1_1GenericMap - */ -const de_GenericMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1GetBlueprintResponse - */ -const de_GetBlueprintResponse = (output: any, context: __SerdeContext): GetBlueprintResponse => { - return { - Blueprint: output.Blueprint != null ? de_Blueprint(output.Blueprint, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetBlueprintRunResponse - */ -const de_GetBlueprintRunResponse = (output: any, context: __SerdeContext): GetBlueprintRunResponse => { - return { - BlueprintRun: output.BlueprintRun != null ? de_BlueprintRun(output.BlueprintRun, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetBlueprintRunsResponse - */ -const de_GetBlueprintRunsResponse = (output: any, context: __SerdeContext): GetBlueprintRunsResponse => { - return { - BlueprintRuns: output.BlueprintRuns != null ? de_BlueprintRuns(output.BlueprintRuns, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetCatalogImportStatusResponse - */ -const de_GetCatalogImportStatusResponse = (output: any, context: __SerdeContext): GetCatalogImportStatusResponse => { - return { - ImportStatus: output.ImportStatus != null ? de_CatalogImportStatus(output.ImportStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetClassifierResponse - */ -const de_GetClassifierResponse = (output: any, context: __SerdeContext): GetClassifierResponse => { - return { - Classifier: output.Classifier != null ? de_Classifier(output.Classifier, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetClassifiersResponse - */ -const de_GetClassifiersResponse = (output: any, context: __SerdeContext): GetClassifiersResponse => { - return { - Classifiers: output.Classifiers != null ? de_ClassifierList(output.Classifiers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetColumnStatisticsForPartitionResponse - */ -const de_GetColumnStatisticsForPartitionResponse = ( - output: any, - context: __SerdeContext -): GetColumnStatisticsForPartitionResponse => { - return { - ColumnStatisticsList: - output.ColumnStatisticsList != null ? de_ColumnStatisticsList(output.ColumnStatisticsList, context) : undefined, - Errors: output.Errors != null ? de_ColumnErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetColumnStatisticsForTableResponse - */ -const de_GetColumnStatisticsForTableResponse = ( - output: any, - context: __SerdeContext -): GetColumnStatisticsForTableResponse => { - return { - ColumnStatisticsList: - output.ColumnStatisticsList != null ? de_ColumnStatisticsList(output.ColumnStatisticsList, context) : undefined, - Errors: output.Errors != null ? de_ColumnErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetConnectionResponse - */ -const de_GetConnectionResponse = (output: any, context: __SerdeContext): GetConnectionResponse => { - return { - Connection: output.Connection != null ? de_Connection(output.Connection, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetConnectionsResponse - */ -const de_GetConnectionsResponse = (output: any, context: __SerdeContext): GetConnectionsResponse => { - return { - ConnectionList: output.ConnectionList != null ? de_ConnectionList(output.ConnectionList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetCrawlerMetricsResponse - */ -const de_GetCrawlerMetricsResponse = (output: any, context: __SerdeContext): GetCrawlerMetricsResponse => { - return { - CrawlerMetricsList: - output.CrawlerMetricsList != null ? de_CrawlerMetricsList(output.CrawlerMetricsList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetCrawlerResponse - */ -const de_GetCrawlerResponse = (output: any, context: __SerdeContext): GetCrawlerResponse => { - return { - Crawler: output.Crawler != null ? de_Crawler(output.Crawler, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetCrawlersResponse - */ -const de_GetCrawlersResponse = (output: any, context: __SerdeContext): GetCrawlersResponse => { - return { - Crawlers: output.Crawlers != null ? de_CrawlerList(output.Crawlers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetCustomEntityTypeResponse - */ -const de_GetCustomEntityTypeResponse = (output: any, context: __SerdeContext): GetCustomEntityTypeResponse => { - return { - ContextWords: output.ContextWords != null ? de_ContextWords(output.ContextWords, context) : undefined, - Name: __expectString(output.Name), - RegexString: __expectString(output.RegexString), - } as any; -}; - -/** - * deserializeAws_json1_1GetDatabaseResponse - */ -const de_GetDatabaseResponse = (output: any, context: __SerdeContext): GetDatabaseResponse => { - return { - Database: output.Database != null ? de_Database(output.Database, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDatabasesResponse - */ -const de_GetDatabasesResponse = (output: any, context: __SerdeContext): GetDatabasesResponse => { - return { - DatabaseList: output.DatabaseList != null ? de_DatabaseList(output.DatabaseList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetDataCatalogEncryptionSettingsResponse - */ -const de_GetDataCatalogEncryptionSettingsResponse = ( - output: any, - context: __SerdeContext -): GetDataCatalogEncryptionSettingsResponse => { - return { - DataCatalogEncryptionSettings: - output.DataCatalogEncryptionSettings != null - ? de_DataCatalogEncryptionSettings(output.DataCatalogEncryptionSettings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDataflowGraphResponse - */ -const de_GetDataflowGraphResponse = (output: any, context: __SerdeContext): GetDataflowGraphResponse => { - return { - DagEdges: output.DagEdges != null ? de_DagEdges(output.DagEdges, context) : undefined, - DagNodes: output.DagNodes != null ? de_DagNodes(output.DagNodes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDataQualityResultResponse - */ -const de_GetDataQualityResultResponse = (output: any, context: __SerdeContext): GetDataQualityResultResponse => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - EvaluationContext: __expectString(output.EvaluationContext), - JobName: __expectString(output.JobName), - JobRunId: __expectString(output.JobRunId), - ResultId: __expectString(output.ResultId), - RuleResults: output.RuleResults != null ? de_DataQualityRuleResults(output.RuleResults, context) : undefined, - RulesetEvaluationRunId: __expectString(output.RulesetEvaluationRunId), - RulesetName: __expectString(output.RulesetName), - Score: __limitedParseDouble(output.Score), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDataQualityRuleRecommendationRunResponse - */ -const de_GetDataQualityRuleRecommendationRunResponse = ( - output: any, - context: __SerdeContext -): GetDataQualityRuleRecommendationRunResponse => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - CreatedRulesetName: __expectString(output.CreatedRulesetName), - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - ErrorString: __expectString(output.ErrorString), - ExecutionTime: __expectInt32(output.ExecutionTime), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - RecommendedRuleset: __expectString(output.RecommendedRuleset), - Role: __expectString(output.Role), - RunId: __expectString(output.RunId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Status: __expectString(output.Status), - Timeout: __expectInt32(output.Timeout), - } as any; -}; - -/** - * deserializeAws_json1_1GetDataQualityRulesetEvaluationRunResponse - */ -const de_GetDataQualityRulesetEvaluationRunResponse = ( - output: any, - context: __SerdeContext -): GetDataQualityRulesetEvaluationRunResponse => { - return { - AdditionalRunOptions: - output.AdditionalRunOptions != null - ? de_DataQualityEvaluationRunAdditionalRunOptions(output.AdditionalRunOptions, context) - : undefined, - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - ErrorString: __expectString(output.ErrorString), - ExecutionTime: __expectInt32(output.ExecutionTime), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - ResultIds: output.ResultIds != null ? de_DataQualityResultIdList(output.ResultIds, context) : undefined, - Role: __expectString(output.Role), - RulesetNames: output.RulesetNames != null ? de_RulesetNames(output.RulesetNames, context) : undefined, - RunId: __expectString(output.RunId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Status: __expectString(output.Status), - Timeout: __expectInt32(output.Timeout), - } as any; -}; - -/** - * deserializeAws_json1_1GetDataQualityRulesetResponse - */ -const de_GetDataQualityRulesetResponse = (output: any, context: __SerdeContext): GetDataQualityRulesetResponse => { - return { - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - Description: __expectString(output.Description), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - Name: __expectString(output.Name), - RecommendationRunId: __expectString(output.RecommendationRunId), - Ruleset: __expectString(output.Ruleset), - TargetTable: output.TargetTable != null ? de_DataQualityTargetTable(output.TargetTable, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDevEndpointResponse - */ -const de_GetDevEndpointResponse = (output: any, context: __SerdeContext): GetDevEndpointResponse => { - return { - DevEndpoint: output.DevEndpoint != null ? de_DevEndpoint(output.DevEndpoint, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetDevEndpointsResponse - */ -const de_GetDevEndpointsResponse = (output: any, context: __SerdeContext): GetDevEndpointsResponse => { - return { - DevEndpoints: output.DevEndpoints != null ? de_DevEndpointList(output.DevEndpoints, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetJobBookmarkResponse - */ -const de_GetJobBookmarkResponse = (output: any, context: __SerdeContext): GetJobBookmarkResponse => { - return { - JobBookmarkEntry: - output.JobBookmarkEntry != null ? de_JobBookmarkEntry(output.JobBookmarkEntry, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetJobResponse - */ -const de_GetJobResponse = (output: any, context: __SerdeContext): GetJobResponse => { - return { - Job: output.Job != null ? de_Job(output.Job, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetJobRunResponse - */ -const de_GetJobRunResponse = (output: any, context: __SerdeContext): GetJobRunResponse => { - return { - JobRun: output.JobRun != null ? de_JobRun(output.JobRun, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetJobRunsResponse - */ -const de_GetJobRunsResponse = (output: any, context: __SerdeContext): GetJobRunsResponse => { - return { - JobRuns: output.JobRuns != null ? de_JobRunList(output.JobRuns, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetJobsResponse - */ -const de_GetJobsResponse = (output: any, context: __SerdeContext): GetJobsResponse => { - return { - Jobs: output.Jobs != null ? de_JobList(output.Jobs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetMappingResponse - */ -const de_GetMappingResponse = (output: any, context: __SerdeContext): GetMappingResponse => { - return { - Mapping: output.Mapping != null ? de_MappingList(output.Mapping, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetMLTaskRunResponse - */ -const de_GetMLTaskRunResponse = (output: any, context: __SerdeContext): GetMLTaskRunResponse => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - ErrorString: __expectString(output.ErrorString), - ExecutionTime: __expectInt32(output.ExecutionTime), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - LogGroupName: __expectString(output.LogGroupName), - Properties: output.Properties != null ? de_TaskRunProperties(output.Properties, context) : undefined, - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Status: __expectString(output.Status), - TaskRunId: __expectString(output.TaskRunId), - TransformId: __expectString(output.TransformId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMLTaskRunsResponse - */ -const de_GetMLTaskRunsResponse = (output: any, context: __SerdeContext): GetMLTaskRunsResponse => { - return { - NextToken: __expectString(output.NextToken), - TaskRuns: output.TaskRuns != null ? de_TaskRunList(output.TaskRuns, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetMLTransformResponse - */ -const de_GetMLTransformResponse = (output: any, context: __SerdeContext): GetMLTransformResponse => { - return { - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - Description: __expectString(output.Description), - EvaluationMetrics: - output.EvaluationMetrics != null ? de_EvaluationMetrics(output.EvaluationMetrics, context) : undefined, - GlueVersion: __expectString(output.GlueVersion), - InputRecordTables: output.InputRecordTables != null ? de_GlueTables(output.InputRecordTables, context) : undefined, - LabelCount: __expectInt32(output.LabelCount), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - MaxCapacity: __limitedParseDouble(output.MaxCapacity), - MaxRetries: __expectInt32(output.MaxRetries), - Name: __expectString(output.Name), - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - Parameters: output.Parameters != null ? de_TransformParameters(output.Parameters, context) : undefined, - Role: __expectString(output.Role), - Schema: output.Schema != null ? de_TransformSchema(output.Schema, context) : undefined, - Status: __expectString(output.Status), - Timeout: __expectInt32(output.Timeout), - TransformEncryption: - output.TransformEncryption != null ? de_TransformEncryption(output.TransformEncryption, context) : undefined, - TransformId: __expectString(output.TransformId), - WorkerType: __expectString(output.WorkerType), - } as any; -}; - -/** - * deserializeAws_json1_1GetMLTransformsResponse - */ -const de_GetMLTransformsResponse = (output: any, context: __SerdeContext): GetMLTransformsResponse => { - return { - NextToken: __expectString(output.NextToken), - Transforms: output.Transforms != null ? de_TransformList(output.Transforms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPartitionIndexesResponse - */ -const de_GetPartitionIndexesResponse = (output: any, context: __SerdeContext): GetPartitionIndexesResponse => { - return { - NextToken: __expectString(output.NextToken), - PartitionIndexDescriptorList: - output.PartitionIndexDescriptorList != null - ? de_PartitionIndexDescriptorList(output.PartitionIndexDescriptorList, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPartitionResponse - */ -const de_GetPartitionResponse = (output: any, context: __SerdeContext): GetPartitionResponse => { - return { - Partition: output.Partition != null ? de_Partition(output.Partition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPartitionsResponse - */ -const de_GetPartitionsResponse = (output: any, context: __SerdeContext): GetPartitionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Partitions: output.Partitions != null ? de_PartitionList(output.Partitions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPlanResponse - */ -const de_GetPlanResponse = (output: any, context: __SerdeContext): GetPlanResponse => { - return { - PythonScript: __expectString(output.PythonScript), - ScalaCode: __expectString(output.ScalaCode), - } as any; -}; - -/** - * deserializeAws_json1_1GetRegistryResponse - */ -const de_GetRegistryResponse = (output: any, context: __SerdeContext): GetRegistryResponse => { - return { - CreatedTime: __expectString(output.CreatedTime), - Description: __expectString(output.Description), - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - Status: __expectString(output.Status), - UpdatedTime: __expectString(output.UpdatedTime), - } as any; -}; - -/** - * deserializeAws_json1_1GetResourcePoliciesResponse - */ -const de_GetResourcePoliciesResponse = (output: any, context: __SerdeContext): GetResourcePoliciesResponse => { - return { - GetResourcePoliciesResponseList: - output.GetResourcePoliciesResponseList != null - ? de_GetResourcePoliciesResponseList(output.GetResourcePoliciesResponseList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetResourcePoliciesResponseList - */ -const de_GetResourcePoliciesResponseList = (output: any, context: __SerdeContext): GluePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GluePolicy(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetResourcePolicyResponse - */ -const de_GetResourcePolicyResponse = (output: any, context: __SerdeContext): GetResourcePolicyResponse => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - PolicyHash: __expectString(output.PolicyHash), - PolicyInJson: __expectString(output.PolicyInJson), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSchemaByDefinitionResponse - */ -const de_GetSchemaByDefinitionResponse = (output: any, context: __SerdeContext): GetSchemaByDefinitionResponse => { - return { - CreatedTime: __expectString(output.CreatedTime), - DataFormat: __expectString(output.DataFormat), - SchemaArn: __expectString(output.SchemaArn), - SchemaVersionId: __expectString(output.SchemaVersionId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1GetSchemaResponse - */ -const de_GetSchemaResponse = (output: any, context: __SerdeContext): GetSchemaResponse => { - return { - Compatibility: __expectString(output.Compatibility), - CreatedTime: __expectString(output.CreatedTime), - DataFormat: __expectString(output.DataFormat), - Description: __expectString(output.Description), - LatestSchemaVersion: __expectLong(output.LatestSchemaVersion), - NextSchemaVersion: __expectLong(output.NextSchemaVersion), - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaCheckpoint: __expectLong(output.SchemaCheckpoint), - SchemaName: __expectString(output.SchemaName), - SchemaStatus: __expectString(output.SchemaStatus), - UpdatedTime: __expectString(output.UpdatedTime), - } as any; -}; - -/** - * deserializeAws_json1_1GetSchemaVersionResponse - */ -const de_GetSchemaVersionResponse = (output: any, context: __SerdeContext): GetSchemaVersionResponse => { - return { - CreatedTime: __expectString(output.CreatedTime), - DataFormat: __expectString(output.DataFormat), - SchemaArn: __expectString(output.SchemaArn), - SchemaDefinition: __expectString(output.SchemaDefinition), - SchemaVersionId: __expectString(output.SchemaVersionId), - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; -}; - -/** - * deserializeAws_json1_1GetSchemaVersionsDiffResponse - */ -const de_GetSchemaVersionsDiffResponse = (output: any, context: __SerdeContext): GetSchemaVersionsDiffResponse => { - return { - Diff: __expectString(output.Diff), - } as any; -}; - -/** - * deserializeAws_json1_1GetSecurityConfigurationResponse - */ -const de_GetSecurityConfigurationResponse = ( - output: any, - context: __SerdeContext -): GetSecurityConfigurationResponse => { - return { - SecurityConfiguration: - output.SecurityConfiguration != null - ? de_SecurityConfiguration(output.SecurityConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSecurityConfigurationsResponse - */ -const de_GetSecurityConfigurationsResponse = ( - output: any, - context: __SerdeContext -): GetSecurityConfigurationsResponse => { - return { - NextToken: __expectString(output.NextToken), - SecurityConfigurations: - output.SecurityConfigurations != null - ? de_SecurityConfigurationList(output.SecurityConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSessionResponse - */ -const de_GetSessionResponse = (output: any, context: __SerdeContext): GetSessionResponse => { - return { - Session: output.Session != null ? de_Session(output.Session, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetStatementResponse - */ -const de_GetStatementResponse = (output: any, context: __SerdeContext): GetStatementResponse => { - return { - Statement: output.Statement != null ? de_Statement(output.Statement, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTableResponse - */ -const de_GetTableResponse = (output: any, context: __SerdeContext): GetTableResponse => { - return { - Table: output.Table != null ? de_Table(output.Table, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTablesResponse - */ -const de_GetTablesResponse = (output: any, context: __SerdeContext): GetTablesResponse => { - return { - NextToken: __expectString(output.NextToken), - TableList: output.TableList != null ? de_TableList(output.TableList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTableVersionResponse - */ -const de_GetTableVersionResponse = (output: any, context: __SerdeContext): GetTableVersionResponse => { - return { - TableVersion: output.TableVersion != null ? de_TableVersion(output.TableVersion, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTableVersionsList - */ -const de_GetTableVersionsList = (output: any, context: __SerdeContext): TableVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableVersion(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetTableVersionsResponse - */ -const de_GetTableVersionsResponse = (output: any, context: __SerdeContext): GetTableVersionsResponse => { - return { - NextToken: __expectString(output.NextToken), - TableVersions: output.TableVersions != null ? de_GetTableVersionsList(output.TableVersions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTagsResponse - */ -const de_GetTagsResponse = (output: any, context: __SerdeContext): GetTagsResponse => { - return { - Tags: output.Tags != null ? de_TagsMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTriggerResponse - */ -const de_GetTriggerResponse = (output: any, context: __SerdeContext): GetTriggerResponse => { - return { - Trigger: output.Trigger != null ? de_Trigger(output.Trigger, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetTriggersResponse - */ -const de_GetTriggersResponse = (output: any, context: __SerdeContext): GetTriggersResponse => { - return { - NextToken: __expectString(output.NextToken), - Triggers: output.Triggers != null ? de_TriggerList(output.Triggers, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetUnfilteredPartitionMetadataResponse - */ -const de_GetUnfilteredPartitionMetadataResponse = ( - output: any, - context: __SerdeContext -): GetUnfilteredPartitionMetadataResponse => { - return { - AuthorizedColumns: - output.AuthorizedColumns != null ? de_NameStringList(output.AuthorizedColumns, context) : undefined, - IsRegisteredWithLakeFormation: __expectBoolean(output.IsRegisteredWithLakeFormation), - Partition: output.Partition != null ? de_Partition(output.Partition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetUnfilteredPartitionsMetadataResponse - */ -const de_GetUnfilteredPartitionsMetadataResponse = ( - output: any, - context: __SerdeContext -): GetUnfilteredPartitionsMetadataResponse => { - return { - NextToken: __expectString(output.NextToken), - UnfilteredPartitions: - output.UnfilteredPartitions != null - ? de_UnfilteredPartitionList(output.UnfilteredPartitions, context) - : undefined, - } as any; -}; +// se_PublicKeysList omitted. -/** - * deserializeAws_json1_1GetUnfilteredTableMetadataResponse - */ -const de_GetUnfilteredTableMetadataResponse = ( - output: any, - context: __SerdeContext -): GetUnfilteredTableMetadataResponse => { - return { - AuthorizedColumns: - output.AuthorizedColumns != null ? de_NameStringList(output.AuthorizedColumns, context) : undefined, - CellFilters: output.CellFilters != null ? de_ColumnRowFilterList(output.CellFilters, context) : undefined, - IsRegisteredWithLakeFormation: __expectBoolean(output.IsRegisteredWithLakeFormation), - Table: output.Table != null ? de_Table(output.Table, context) : undefined, - } as any; -}; +// se_PutDataCatalogEncryptionSettingsRequest omitted. -/** - * deserializeAws_json1_1GetUserDefinedFunctionResponse - */ -const de_GetUserDefinedFunctionResponse = (output: any, context: __SerdeContext): GetUserDefinedFunctionResponse => { - return { - UserDefinedFunction: - output.UserDefinedFunction != null ? de_UserDefinedFunction(output.UserDefinedFunction, context) : undefined, - } as any; -}; +// se_PutResourcePolicyRequest omitted. -/** - * deserializeAws_json1_1GetUserDefinedFunctionsResponse - */ -const de_GetUserDefinedFunctionsResponse = (output: any, context: __SerdeContext): GetUserDefinedFunctionsResponse => { - return { - NextToken: __expectString(output.NextToken), - UserDefinedFunctions: - output.UserDefinedFunctions != null - ? de_UserDefinedFunctionList(output.UserDefinedFunctions, context) - : undefined, - } as any; -}; +// se_PutSchemaVersionMetadataInput omitted. -/** - * deserializeAws_json1_1GetWorkflowResponse - */ -const de_GetWorkflowResponse = (output: any, context: __SerdeContext): GetWorkflowResponse => { - return { - Workflow: output.Workflow != null ? de_Workflow(output.Workflow, context) : undefined, - } as any; -}; +// se_PutWorkflowRunPropertiesRequest omitted. -/** - * deserializeAws_json1_1GetWorkflowRunPropertiesResponse - */ -const de_GetWorkflowRunPropertiesResponse = ( - output: any, - context: __SerdeContext -): GetWorkflowRunPropertiesResponse => { - return { - RunProperties: output.RunProperties != null ? de_WorkflowRunProperties(output.RunProperties, context) : undefined, - } as any; -}; +// se_QuerySchemaVersionMetadataInput omitted. -/** - * deserializeAws_json1_1GetWorkflowRunResponse - */ -const de_GetWorkflowRunResponse = (output: any, context: __SerdeContext): GetWorkflowRunResponse => { - return { - Run: output.Run != null ? de_WorkflowRun(output.Run, context) : undefined, - } as any; -}; +// se_RecrawlPolicy omitted. -/** - * deserializeAws_json1_1GetWorkflowRunsResponse - */ -const de_GetWorkflowRunsResponse = (output: any, context: __SerdeContext): GetWorkflowRunsResponse => { - return { - NextToken: __expectString(output.NextToken), - Runs: output.Runs != null ? de_WorkflowRuns(output.Runs, context) : undefined, - } as any; -}; +// se_RedshiftSource omitted. -/** - * deserializeAws_json1_1GlueEncryptionException - */ -const de_GlueEncryptionException = (output: any, context: __SerdeContext): GlueEncryptionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_RedshiftTarget omitted. -/** - * deserializeAws_json1_1GluePolicy - */ -const de_GluePolicy = (output: any, context: __SerdeContext): GluePolicy => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - PolicyHash: __expectString(output.PolicyHash), - PolicyInJson: __expectString(output.PolicyInJson), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined, - } as any; -}; +// se_RegisterSchemaVersionInput omitted. -/** - * deserializeAws_json1_1GlueSchema - */ -const de_GlueSchema = (output: any, context: __SerdeContext): GlueSchema => { - return { - Columns: output.Columns != null ? de_GlueStudioSchemaColumnList(output.Columns, context) : undefined, - } as any; -}; +// se_RegistryId omitted. -/** - * deserializeAws_json1_1GlueSchemas - */ -const de_GlueSchemas = (output: any, context: __SerdeContext): GlueSchema[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlueSchema(entry, context); - }); - return retVal; -}; +// se_RelationalCatalogSource omitted. -/** - * deserializeAws_json1_1GlueStudioPathList - */ -const de_GlueStudioPathList = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnclosedInStringProperties(entry, context); - }); - return retVal; -}; +// se_RemoveSchemaVersionMetadataInput omitted. -/** - * deserializeAws_json1_1GlueStudioSchemaColumn - */ -const de_GlueStudioSchemaColumn = (output: any, context: __SerdeContext): GlueStudioSchemaColumn => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// se_RenameField omitted. -/** - * deserializeAws_json1_1GlueStudioSchemaColumnList - */ -const de_GlueStudioSchemaColumnList = (output: any, context: __SerdeContext): GlueStudioSchemaColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlueStudioSchemaColumn(entry, context); - }); - return retVal; -}; +// se_ResetJobBookmarkRequest omitted. -/** - * deserializeAws_json1_1GlueTable - */ -const de_GlueTable = (output: any, context: __SerdeContext): GlueTable => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_GlueTableAdditionalOptions(output.AdditionalOptions, context) : undefined, - CatalogId: __expectString(output.CatalogId), - ConnectionName: __expectString(output.ConnectionName), - DatabaseName: __expectString(output.DatabaseName), - TableName: __expectString(output.TableName), - } as any; -}; +// se_ResourceUri omitted. -/** - * deserializeAws_json1_1GlueTableAdditionalOptions - */ -const de_GlueTableAdditionalOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_ResourceUriList omitted. -/** - * deserializeAws_json1_1GlueTables - */ -const de_GlueTables = (output: any, context: __SerdeContext): GlueTable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GlueTable(entry, context); - }); - return retVal; -}; +// se_ResumeWorkflowRunRequest omitted. -/** - * deserializeAws_json1_1GovernedCatalogSource - */ -const de_GovernedCatalogSource = (output: any, context: __SerdeContext): GovernedCatalogSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_S3SourceAdditionalOptions(output.AdditionalOptions, context) : undefined, - Database: __expectString(output.Database), - Name: __expectString(output.Name), - PartitionPredicate: __expectString(output.PartitionPredicate), - Table: __expectString(output.Table), - } as any; -}; +// se_RulesetNames omitted. -/** - * deserializeAws_json1_1GovernedCatalogTarget - */ -const de_GovernedCatalogTarget = (output: any, context: __SerdeContext): GovernedCatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_CatalogSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - Table: __expectString(output.Table), - } as any; -}; +// se_RunStatementRequest omitted. -/** - * deserializeAws_json1_1GrokClassifier - */ -const de_GrokClassifier = (output: any, context: __SerdeContext): GrokClassifier => { - return { - Classification: __expectString(output.Classification), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CustomPatterns: __expectString(output.CustomPatterns), - GrokPattern: __expectString(output.GrokPattern), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Name: __expectString(output.Name), - Version: __expectLong(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1IdempotentParameterMismatchException - */ -const de_IdempotentParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotentParameterMismatchException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_S3CatalogDeltaSource omitted. -/** - * deserializeAws_json1_1IllegalBlueprintStateException - */ -const de_IllegalBlueprintStateException = (output: any, context: __SerdeContext): IllegalBlueprintStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_S3CatalogHudiSource omitted. -/** - * deserializeAws_json1_1IllegalSessionStateException - */ -const de_IllegalSessionStateException = (output: any, context: __SerdeContext): IllegalSessionStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_S3CatalogSource omitted. -/** - * deserializeAws_json1_1IllegalWorkflowStateException - */ -const de_IllegalWorkflowStateException = (output: any, context: __SerdeContext): IllegalWorkflowStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_S3CatalogTarget omitted. -/** - * deserializeAws_json1_1ImportCatalogToGlueResponse - */ -const de_ImportCatalogToGlueResponse = (output: any, context: __SerdeContext): ImportCatalogToGlueResponse => { - return {} as any; -}; +// se_S3CsvSource omitted. -/** - * deserializeAws_json1_1ImportLabelsTaskRunProperties - */ -const de_ImportLabelsTaskRunProperties = (output: any, context: __SerdeContext): ImportLabelsTaskRunProperties => { - return { - InputS3Path: __expectString(output.InputS3Path), - Replace: __expectBoolean(output.Replace), - } as any; -}; +// se_S3DeltaCatalogTarget omitted. -/** - * deserializeAws_json1_1InternalServiceException - */ -const de_InternalServiceException = (output: any, context: __SerdeContext): InternalServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_S3DeltaDirectTarget omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - FromFederationSource: __expectBoolean(output.FromFederationSource), - Message: __expectString(output.Message), - } as any; -}; +// se_S3DeltaSource omitted. -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_S3DirectSourceAdditionalOptions omitted. -/** - * deserializeAws_json1_1JDBCConnectorOptions - */ -const de_JDBCConnectorOptions = (output: any, context: __SerdeContext): JDBCConnectorOptions => { - return { - DataTypeMapping: - output.DataTypeMapping != null ? de_JDBCDataTypeMapping(output.DataTypeMapping, context) : undefined, - FilterPredicate: __expectString(output.FilterPredicate), - JobBookmarkKeys: - output.JobBookmarkKeys != null ? de_EnclosedInStringProperties(output.JobBookmarkKeys, context) : undefined, - JobBookmarkKeysSortOrder: __expectString(output.JobBookmarkKeysSortOrder), - LowerBound: __expectLong(output.LowerBound), - NumPartitions: __expectLong(output.NumPartitions), - PartitionColumn: __expectString(output.PartitionColumn), - UpperBound: __expectLong(output.UpperBound), - } as any; -}; +// se_S3DirectTarget omitted. -/** - * deserializeAws_json1_1JDBCConnectorSource - */ -const de_JDBCConnectorSource = (output: any, context: __SerdeContext): JDBCConnectorSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_JDBCConnectorOptions(output.AdditionalOptions, context) : undefined, - ConnectionName: __expectString(output.ConnectionName), - ConnectionTable: __expectString(output.ConnectionTable), - ConnectionType: __expectString(output.ConnectionType), - ConnectorName: __expectString(output.ConnectorName), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Query: __expectString(output.Query), - } as any; -}; +// se_S3Encryption omitted. -/** - * deserializeAws_json1_1JDBCConnectorTarget - */ -const de_JDBCConnectorTarget = (output: any, context: __SerdeContext): JDBCConnectorTarget => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - ConnectionName: __expectString(output.ConnectionName), - ConnectionTable: __expectString(output.ConnectionTable), - ConnectionType: __expectString(output.ConnectionType), - ConnectorName: __expectString(output.ConnectorName), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1JDBCDataTypeMapping - */ -const de_JDBCDataTypeMapping = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [JDBCDataType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// se_S3EncryptionList omitted. -/** - * deserializeAws_json1_1JdbcTarget - */ -const de_JdbcTarget = (output: any, context: __SerdeContext): JdbcTarget => { - return { - ConnectionName: __expectString(output.ConnectionName), - EnableAdditionalMetadata: - output.EnableAdditionalMetadata != null - ? de_EnableAdditionalMetadata(output.EnableAdditionalMetadata, context) - : undefined, - Exclusions: output.Exclusions != null ? de_PathList(output.Exclusions, context) : undefined, - Path: __expectString(output.Path), - } as any; -}; +// se_S3GlueParquetTarget omitted. -/** - * deserializeAws_json1_1JdbcTargetList - */ -const de_JdbcTargetList = (output: any, context: __SerdeContext): JdbcTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JdbcTarget(entry, context); - }); - return retVal; -}; +// se_S3HudiCatalogTarget omitted. -/** - * deserializeAws_json1_1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - AllocatedCapacity: __expectInt32(output.AllocatedCapacity), - CodeGenConfigurationNodes: - output.CodeGenConfigurationNodes != null - ? de_CodeGenConfigurationNodes(output.CodeGenConfigurationNodes, context) - : undefined, - Command: output.Command != null ? de_JobCommand(output.Command, context) : undefined, - Connections: output.Connections != null ? de_ConnectionsList(output.Connections, context) : undefined, - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - DefaultArguments: output.DefaultArguments != null ? de_GenericMap(output.DefaultArguments, context) : undefined, - Description: __expectString(output.Description), - ExecutionClass: __expectString(output.ExecutionClass), - ExecutionProperty: - output.ExecutionProperty != null ? de_ExecutionProperty(output.ExecutionProperty, context) : undefined, - GlueVersion: __expectString(output.GlueVersion), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - LogUri: __expectString(output.LogUri), - MaxCapacity: __limitedParseDouble(output.MaxCapacity), - MaxRetries: __expectInt32(output.MaxRetries), - Name: __expectString(output.Name), - NonOverridableArguments: - output.NonOverridableArguments != null ? de_GenericMap(output.NonOverridableArguments, context) : undefined, - NotificationProperty: - output.NotificationProperty != null ? de_NotificationProperty(output.NotificationProperty, context) : undefined, - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - Role: __expectString(output.Role), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - SourceControlDetails: - output.SourceControlDetails != null ? de_SourceControlDetails(output.SourceControlDetails, context) : undefined, - Timeout: __expectInt32(output.Timeout), - WorkerType: __expectString(output.WorkerType), - } as any; -}; - -/** - * deserializeAws_json1_1JobBookmarkEntry - */ -const de_JobBookmarkEntry = (output: any, context: __SerdeContext): JobBookmarkEntry => { - return { - Attempt: __expectInt32(output.Attempt), - JobBookmark: __expectString(output.JobBookmark), - JobName: __expectString(output.JobName), - PreviousRunId: __expectString(output.PreviousRunId), - Run: __expectInt32(output.Run), - RunId: __expectString(output.RunId), - Version: __expectInt32(output.Version), - } as any; -}; +// se_S3HudiDirectTarget omitted. -/** - * deserializeAws_json1_1JobBookmarksEncryption - */ -const de_JobBookmarksEncryption = (output: any, context: __SerdeContext): JobBookmarksEncryption => { - return { - JobBookmarksEncryptionMode: __expectString(output.JobBookmarksEncryptionMode), - KmsKeyArn: __expectString(output.KmsKeyArn), - } as any; -}; +// se_S3HudiSource omitted. -/** - * deserializeAws_json1_1JobCommand - */ -const de_JobCommand = (output: any, context: __SerdeContext): JobCommand => { - return { - Name: __expectString(output.Name), - PythonVersion: __expectString(output.PythonVersion), - ScriptLocation: __expectString(output.ScriptLocation), - } as any; -}; +// se_S3JsonSource omitted. -/** - * deserializeAws_json1_1JobList - */ -const de_JobList = (output: any, context: __SerdeContext): Job[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Job(entry, context); - }); - return retVal; -}; +// se_S3ParquetSource omitted. -/** - * deserializeAws_json1_1JobNameList - */ -const de_JobNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_S3SourceAdditionalOptions omitted. -/** - * deserializeAws_json1_1JobNodeDetails - */ -const de_JobNodeDetails = (output: any, context: __SerdeContext): JobNodeDetails => { - return { - JobRuns: output.JobRuns != null ? de_JobRunList(output.JobRuns, context) : undefined, - } as any; -}; +// se_S3Target omitted. -/** - * deserializeAws_json1_1JobRun - */ -const de_JobRun = (output: any, context: __SerdeContext): JobRun => { - return { - AllocatedCapacity: __expectInt32(output.AllocatedCapacity), - Arguments: output.Arguments != null ? de_GenericMap(output.Arguments, context) : undefined, - Attempt: __expectInt32(output.Attempt), - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - DPUSeconds: __limitedParseDouble(output.DPUSeconds), - ErrorMessage: __expectString(output.ErrorMessage), - ExecutionClass: __expectString(output.ExecutionClass), - ExecutionTime: __expectInt32(output.ExecutionTime), - GlueVersion: __expectString(output.GlueVersion), - Id: __expectString(output.Id), - JobName: __expectString(output.JobName), - JobRunState: __expectString(output.JobRunState), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - LogGroupName: __expectString(output.LogGroupName), - MaxCapacity: __limitedParseDouble(output.MaxCapacity), - NotificationProperty: - output.NotificationProperty != null ? de_NotificationProperty(output.NotificationProperty, context) : undefined, - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - PredecessorRuns: output.PredecessorRuns != null ? de_PredecessorList(output.PredecessorRuns, context) : undefined, - PreviousRunId: __expectString(output.PreviousRunId), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Timeout: __expectInt32(output.Timeout), - TriggerName: __expectString(output.TriggerName), - WorkerType: __expectString(output.WorkerType), - } as any; -}; +// se_S3TargetList omitted. -/** - * deserializeAws_json1_1JobRunList - */ -const de_JobRunList = (output: any, context: __SerdeContext): JobRun[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobRun(entry, context); - }); - return retVal; -}; +// se_SchemaChangePolicy omitted. -/** - * deserializeAws_json1_1Join - */ -const de_Join = (output: any, context: __SerdeContext): Join => { - return { - Columns: output.Columns != null ? de_JoinColumns(output.Columns, context) : undefined, - Inputs: output.Inputs != null ? de_TwoInputs(output.Inputs, context) : undefined, - JoinType: __expectString(output.JoinType), - Name: __expectString(output.Name), - } as any; -}; +// se_SchemaColumn omitted. -/** - * deserializeAws_json1_1JoinColumn - */ -const de_JoinColumn = (output: any, context: __SerdeContext): JoinColumn => { - return { - From: __expectString(output.From), - Keys: output.Keys != null ? de_GlueStudioPathList(output.Keys, context) : undefined, - } as any; -}; +// se_SchemaId omitted. -/** - * deserializeAws_json1_1JoinColumns - */ -const de_JoinColumns = (output: any, context: __SerdeContext): JoinColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JoinColumn(entry, context); - }); - return retVal; -}; +// se_SchemaReference omitted. -/** - * deserializeAws_json1_1JsonClassifier - */ -const de_JsonClassifier = (output: any, context: __SerdeContext): JsonClassifier => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - JsonPath: __expectString(output.JsonPath), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Name: __expectString(output.Name), - Version: __expectLong(output.Version), - } as any; -}; +// se_SchemaVersionNumber omitted. -/** - * deserializeAws_json1_1KafkaStreamingSourceOptions - */ -const de_KafkaStreamingSourceOptions = (output: any, context: __SerdeContext): KafkaStreamingSourceOptions => { - return { - AddRecordTimestamp: __expectString(output.AddRecordTimestamp), - Assign: __expectString(output.Assign), - BootstrapServers: __expectString(output.BootstrapServers), - Classification: __expectString(output.Classification), - ConnectionName: __expectString(output.ConnectionName), - Delimiter: __expectString(output.Delimiter), - EmitConsumerLagMetrics: __expectString(output.EmitConsumerLagMetrics), - EndingOffsets: __expectString(output.EndingOffsets), - IncludeHeaders: __expectBoolean(output.IncludeHeaders), - MaxOffsetsPerTrigger: __expectLong(output.MaxOffsetsPerTrigger), - MinPartitions: __expectInt32(output.MinPartitions), - NumRetries: __expectInt32(output.NumRetries), - PollTimeoutMs: __expectLong(output.PollTimeoutMs), - RetryIntervalMs: __expectLong(output.RetryIntervalMs), - SecurityProtocol: __expectString(output.SecurityProtocol), - StartingOffsets: __expectString(output.StartingOffsets), - SubscribePattern: __expectString(output.SubscribePattern), - TopicName: __expectString(output.TopicName), - } as any; -}; - -/** - * deserializeAws_json1_1KeySchemaElement - */ -const de_KeySchemaElement = (output: any, context: __SerdeContext): KeySchemaElement => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// se_SearchPropertyPredicates omitted. -/** - * deserializeAws_json1_1KeySchemaElementList - */ -const de_KeySchemaElementList = (output: any, context: __SerdeContext): KeySchemaElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeySchemaElement(entry, context); - }); - return retVal; -}; +// se_SearchTablesRequest omitted. -/** - * deserializeAws_json1_1KinesisStreamingSourceOptions - */ -const de_KinesisStreamingSourceOptions = (output: any, context: __SerdeContext): KinesisStreamingSourceOptions => { - return { - AddIdleTimeBetweenReads: __expectBoolean(output.AddIdleTimeBetweenReads), - AddRecordTimestamp: __expectString(output.AddRecordTimestamp), - AvoidEmptyBatches: __expectBoolean(output.AvoidEmptyBatches), - Classification: __expectString(output.Classification), - Delimiter: __expectString(output.Delimiter), - DescribeShardInterval: __expectLong(output.DescribeShardInterval), - EmitConsumerLagMetrics: __expectString(output.EmitConsumerLagMetrics), - EndpointUrl: __expectString(output.EndpointUrl), - IdleTimeBetweenReadsInMs: __expectLong(output.IdleTimeBetweenReadsInMs), - MaxFetchRecordsPerShard: __expectLong(output.MaxFetchRecordsPerShard), - MaxFetchTimeInMs: __expectLong(output.MaxFetchTimeInMs), - MaxRecordPerRead: __expectLong(output.MaxRecordPerRead), - MaxRetryIntervalMs: __expectLong(output.MaxRetryIntervalMs), - NumRetries: __expectInt32(output.NumRetries), - RetryIntervalMs: __expectLong(output.RetryIntervalMs), - RoleArn: __expectString(output.RoleArn), - RoleSessionName: __expectString(output.RoleSessionName), - StartingPosition: __expectString(output.StartingPosition), - StreamArn: __expectString(output.StreamArn), - StreamName: __expectString(output.StreamName), - } as any; -}; - -/** - * deserializeAws_json1_1LabelingSetGenerationTaskRunProperties - */ -const de_LabelingSetGenerationTaskRunProperties = ( - output: any, - context: __SerdeContext -): LabelingSetGenerationTaskRunProperties => { - return { - OutputS3Path: __expectString(output.OutputS3Path), - } as any; -}; +// se_SecurityGroupIdList omitted. -/** - * deserializeAws_json1_1LakeFormationConfiguration - */ -const de_LakeFormationConfiguration = (output: any, context: __SerdeContext): LakeFormationConfiguration => { - return { - AccountId: __expectString(output.AccountId), - UseLakeFormationCredentials: __expectBoolean(output.UseLakeFormationCredentials), - } as any; -}; +// se_Segment omitted. -/** - * deserializeAws_json1_1LastActiveDefinition - */ -const de_LastActiveDefinition = (output: any, context: __SerdeContext): LastActiveDefinition => { - return { - BlueprintLocation: __expectString(output.BlueprintLocation), - BlueprintServiceLocation: __expectString(output.BlueprintServiceLocation), - Description: __expectString(output.Description), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - ParameterSpec: __expectString(output.ParameterSpec), - } as any; -}; +// se_SelectFields omitted. -/** - * deserializeAws_json1_1LastCrawlInfo - */ -const de_LastCrawlInfo = (output: any, context: __SerdeContext): LastCrawlInfo => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - LogGroup: __expectString(output.LogGroup), - LogStream: __expectString(output.LogStream), - MessagePrefix: __expectString(output.MessagePrefix), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - } as any; -}; +// se_SelectFromCollection omitted. -/** - * deserializeAws_json1_1LimitedPathList - */ -const de_LimitedPathList = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LimitedStringList(entry, context); - }); - return retVal; -}; +// se_SerDeInfo omitted. -/** - * deserializeAws_json1_1LimitedStringList - */ -const de_LimitedStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_SessionCommand omitted. -/** - * deserializeAws_json1_1LineageConfiguration - */ -const de_LineageConfiguration = (output: any, context: __SerdeContext): LineageConfiguration => { - return { - CrawlerLineageSettings: __expectString(output.CrawlerLineageSettings), - } as any; -}; +// se_SkewedInfo omitted. -/** - * deserializeAws_json1_1ListBlueprintsResponse - */ -const de_ListBlueprintsResponse = (output: any, context: __SerdeContext): ListBlueprintsResponse => { - return { - Blueprints: output.Blueprints != null ? de_BlueprintNames(output.Blueprints, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_SortCriteria omitted. -/** - * deserializeAws_json1_1ListCrawlersResponse - */ -const de_ListCrawlersResponse = (output: any, context: __SerdeContext): ListCrawlersResponse => { - return { - CrawlerNames: output.CrawlerNames != null ? de_CrawlerNameList(output.CrawlerNames, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_SortCriterion omitted. -/** - * deserializeAws_json1_1ListCrawlsResponse - */ -const de_ListCrawlsResponse = (output: any, context: __SerdeContext): ListCrawlsResponse => { - return { - Crawls: output.Crawls != null ? de_CrawlerHistoryList(output.Crawls, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_SourceControlDetails omitted. -/** - * deserializeAws_json1_1ListCustomEntityTypesResponse - */ -const de_ListCustomEntityTypesResponse = (output: any, context: __SerdeContext): ListCustomEntityTypesResponse => { - return { - CustomEntityTypes: - output.CustomEntityTypes != null ? de_CustomEntityTypes(output.CustomEntityTypes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_SparkConnectorSource omitted. + +// se_SparkConnectorTarget omitted. + +// se_SparkSQL omitted. /** - * deserializeAws_json1_1ListDataQualityResultsResponse + * serializeAws_json1_1Spigot */ -const de_ListDataQualityResultsResponse = (output: any, context: __SerdeContext): ListDataQualityResultsResponse => { - return { - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_DataQualityResultDescriptionList(output.Results, context) : undefined, - } as any; +const se_Spigot = (input: Spigot, context: __SerdeContext): any => { + return take(input, { + Inputs: _json, + Name: [], + Path: [], + Prob: __serializeFloat, + Topk: [], + }); }; -/** - * deserializeAws_json1_1ListDataQualityRuleRecommendationRunsResponse - */ -const de_ListDataQualityRuleRecommendationRunsResponse = ( - output: any, - context: __SerdeContext -): ListDataQualityRuleRecommendationRunsResponse => { - return { - NextToken: __expectString(output.NextToken), - Runs: output.Runs != null ? de_DataQualityRuleRecommendationRunList(output.Runs, context) : undefined, - } as any; -}; +// se_SplitFields omitted. -/** - * deserializeAws_json1_1ListDataQualityRulesetEvaluationRunsResponse - */ -const de_ListDataQualityRulesetEvaluationRunsResponse = ( - output: any, - context: __SerdeContext -): ListDataQualityRulesetEvaluationRunsResponse => { - return { - NextToken: __expectString(output.NextToken), - Runs: output.Runs != null ? de_DataQualityRulesetEvaluationRunList(output.Runs, context) : undefined, - } as any; -}; +// se_SqlAlias omitted. -/** - * deserializeAws_json1_1ListDataQualityRulesetsResponse - */ -const de_ListDataQualityRulesetsResponse = (output: any, context: __SerdeContext): ListDataQualityRulesetsResponse => { - return { - NextToken: __expectString(output.NextToken), - Rulesets: output.Rulesets != null ? de_DataQualityRulesetList(output.Rulesets, context) : undefined, - } as any; -}; +// se_SqlAliases omitted. -/** - * deserializeAws_json1_1ListDevEndpointsResponse - */ -const de_ListDevEndpointsResponse = (output: any, context: __SerdeContext): ListDevEndpointsResponse => { - return { - DevEndpointNames: - output.DevEndpointNames != null ? de_DevEndpointNameList(output.DevEndpointNames, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_StartBlueprintRunRequest omitted. -/** - * deserializeAws_json1_1ListJobsResponse - */ -const de_ListJobsResponse = (output: any, context: __SerdeContext): ListJobsResponse => { - return { - JobNames: output.JobNames != null ? de_JobNameList(output.JobNames, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_StartCrawlerRequest omitted. -/** - * deserializeAws_json1_1ListMLTransformsResponse - */ -const de_ListMLTransformsResponse = (output: any, context: __SerdeContext): ListMLTransformsResponse => { - return { - NextToken: __expectString(output.NextToken), - TransformIds: output.TransformIds != null ? de_TransformIdList(output.TransformIds, context) : undefined, - } as any; -}; +// se_StartCrawlerScheduleRequest omitted. + +// se_StartDataQualityRuleRecommendationRunRequest omitted. + +// se_StartDataQualityRulesetEvaluationRunRequest omitted. + +// se_StartExportLabelsTaskRunRequest omitted. + +// se_StartImportLabelsTaskRunRequest omitted. /** - * deserializeAws_json1_1ListRegistriesResponse + * serializeAws_json1_1StartJobRunRequest */ -const de_ListRegistriesResponse = (output: any, context: __SerdeContext): ListRegistriesResponse => { - return { - NextToken: __expectString(output.NextToken), - Registries: output.Registries != null ? de_RegistryListDefinition(output.Registries, context) : undefined, - } as any; +const se_StartJobRunRequest = (input: StartJobRunRequest, context: __SerdeContext): any => { + return take(input, { + AllocatedCapacity: [], + Arguments: _json, + ExecutionClass: [], + JobName: [], + JobRunId: [], + MaxCapacity: __serializeFloat, + NotificationProperty: _json, + NumberOfWorkers: [], + SecurityConfiguration: [], + Timeout: [], + WorkerType: [], + }); }; +// se_StartMLEvaluationTaskRunRequest omitted. + +// se_StartMLLabelingSetGenerationTaskRunRequest omitted. + +// se_StartTriggerRequest omitted. + +// se_StartWorkflowRunRequest omitted. + +// se_StopCrawlerRequest omitted. + +// se_StopCrawlerScheduleRequest omitted. + +// se_StopSessionRequest omitted. + +// se_StopTriggerRequest omitted. + +// se_StopWorkflowRunRequest omitted. + +// se_StorageDescriptor omitted. + +// se_StreamingDataPreviewOptions omitted. + /** - * deserializeAws_json1_1ListSchemasResponse + * serializeAws_json1_1StringColumnStatisticsData */ -const de_ListSchemasResponse = (output: any, context: __SerdeContext): ListSchemasResponse => { - return { - NextToken: __expectString(output.NextToken), - Schemas: output.Schemas != null ? de_SchemaListDefinition(output.Schemas, context) : undefined, - } as any; +const se_StringColumnStatisticsData = (input: StringColumnStatisticsData, context: __SerdeContext): any => { + return take(input, { + AverageLength: __serializeFloat, + MaximumLength: [], + NumberOfDistinctValues: [], + NumberOfNulls: [], + }); }; +// se_StringList omitted. + +// se_TableIdentifier omitted. + /** - * deserializeAws_json1_1ListSchemaVersionsResponse + * serializeAws_json1_1TableInput */ -const de_ListSchemaVersionsResponse = (output: any, context: __SerdeContext): ListSchemaVersionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Schemas: output.Schemas != null ? de_SchemaVersionList(output.Schemas, context) : undefined, - } as any; +const se_TableInput = (input: TableInput, context: __SerdeContext): any => { + return take(input, { + Description: [], + LastAccessTime: (_) => Math.round(_.getTime() / 1000), + LastAnalyzedTime: (_) => Math.round(_.getTime() / 1000), + Name: [], + Owner: [], + Parameters: _json, + PartitionKeys: _json, + Retention: [], + StorageDescriptor: _json, + TableType: [], + TargetTable: _json, + ViewExpandedText: [], + ViewOriginalText: [], + }); }; +// se_TagKeysList omitted. + +// se_TagResourceRequest omitted. + +// se_TagsMap omitted. + /** - * deserializeAws_json1_1ListSessionsResponse + * serializeAws_json1_1TaskRunFilterCriteria */ -const de_ListSessionsResponse = (output: any, context: __SerdeContext): ListSessionsResponse => { - return { - Ids: output.Ids != null ? de_SessionIdList(output.Ids, context) : undefined, - NextToken: __expectString(output.NextToken), - Sessions: output.Sessions != null ? de_SessionList(output.Sessions, context) : undefined, - } as any; +const se_TaskRunFilterCriteria = (input: TaskRunFilterCriteria, context: __SerdeContext): any => { + return take(input, { + StartedAfter: (_) => Math.round(_.getTime() / 1000), + StartedBefore: (_) => Math.round(_.getTime() / 1000), + Status: [], + TaskRunType: [], + }); }; +// se_TaskRunSortCriteria omitted. + +// se_TransformConfigParameter omitted. + +// se_TransformConfigParameterList omitted. + +// se_TransformEncryption omitted. + /** - * deserializeAws_json1_1ListStatementsResponse + * serializeAws_json1_1TransformFilterCriteria */ -const de_ListStatementsResponse = (output: any, context: __SerdeContext): ListStatementsResponse => { - return { - NextToken: __expectString(output.NextToken), - Statements: output.Statements != null ? de_StatementList(output.Statements, context) : undefined, - } as any; +const se_TransformFilterCriteria = (input: TransformFilterCriteria, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + GlueVersion: [], + LastModifiedAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedBefore: (_) => Math.round(_.getTime() / 1000), + Name: [], + Schema: _json, + Status: [], + TransformType: [], + }); }; /** - * deserializeAws_json1_1ListTriggersResponse + * serializeAws_json1_1TransformParameters */ -const de_ListTriggersResponse = (output: any, context: __SerdeContext): ListTriggersResponse => { - return { - NextToken: __expectString(output.NextToken), - TriggerNames: output.TriggerNames != null ? de_TriggerNameList(output.TriggerNames, context) : undefined, - } as any; +const se_TransformParameters = (input: TransformParameters, context: __SerdeContext): any => { + return take(input, { + FindMatchesParameters: (_) => se_FindMatchesParameters(_, context), + TransformType: [], + }); }; +// se_TransformSchema omitted. + +// se_TransformSortCriteria omitted. + +// se_TriggerNameList omitted. + +// se_TriggerUpdate omitted. + +// se_TwoInputs omitted. + +// se_Union omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateBlueprintRequest omitted. + +// se_UpdateClassifierRequest omitted. + /** - * deserializeAws_json1_1ListWorkflowsResponse + * serializeAws_json1_1UpdateColumnStatisticsForPartitionRequest */ -const de_ListWorkflowsResponse = (output: any, context: __SerdeContext): ListWorkflowsResponse => { - return { - NextToken: __expectString(output.NextToken), - Workflows: output.Workflows != null ? de_WorkflowNames(output.Workflows, context) : undefined, - } as any; +const se_UpdateColumnStatisticsForPartitionRequest = ( + input: UpdateColumnStatisticsForPartitionRequest, + context: __SerdeContext +): any => { + return take(input, { + CatalogId: [], + ColumnStatisticsList: (_) => se_UpdateColumnStatisticsList(_, context), + DatabaseName: [], + PartitionValues: _json, + TableName: [], + }); }; /** - * deserializeAws_json1_1LocationMap + * serializeAws_json1_1UpdateColumnStatisticsForTableRequest */ -const de_LocationMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const se_UpdateColumnStatisticsForTableRequest = ( + input: UpdateColumnStatisticsForTableRequest, + context: __SerdeContext +): any => { + return take(input, { + CatalogId: [], + ColumnStatisticsList: (_) => se_UpdateColumnStatisticsList(_, context), + DatabaseName: [], + TableName: [], + }); }; /** - * deserializeAws_json1_1LocationStringList + * serializeAws_json1_1UpdateColumnStatisticsList */ -const de_LocationStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) +const se_UpdateColumnStatisticsList = (input: ColumnStatistics[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + .map((entry) => { + return se_ColumnStatistics(entry, context); }); - return retVal; }; +// se_UpdateConnectionRequest omitted. + /** - * deserializeAws_json1_1LongColumnStatisticsData + * serializeAws_json1_1UpdateCrawlerRequest */ -const de_LongColumnStatisticsData = (output: any, context: __SerdeContext): LongColumnStatisticsData => { - return { - MaximumValue: __expectLong(output.MaximumValue), - MinimumValue: __expectLong(output.MinimumValue), - NumberOfDistinctValues: __expectLong(output.NumberOfDistinctValues), - NumberOfNulls: __expectLong(output.NumberOfNulls), - } as any; +const se_UpdateCrawlerRequest = (input: UpdateCrawlerRequest, context: __SerdeContext): any => { + return take(input, { + Classifiers: _json, + Configuration: [], + CrawlerSecurityConfiguration: [], + DatabaseName: [], + Description: [], + LakeFormationConfiguration: _json, + LineageConfiguration: _json, + Name: [], + RecrawlPolicy: _json, + Role: [], + Schedule: [], + SchemaChangePolicy: _json, + TablePrefix: [], + Targets: (_) => se_CrawlerTargets(_, context), + }); }; +// se_UpdateCrawlerScheduleRequest omitted. + +// se_UpdateCsvClassifierRequest omitted. + +// se_UpdateDatabaseRequest omitted. + +// se_UpdateDataQualityRulesetRequest omitted. + +// se_UpdateDevEndpointRequest omitted. + +// se_UpdateGrokClassifierRequest omitted. + +// se_UpdateJobFromSourceControlRequest omitted. + /** - * deserializeAws_json1_1ManyInputs + * serializeAws_json1_1UpdateJobRequest */ -const de_ManyInputs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_UpdateJobRequest = (input: UpdateJobRequest, context: __SerdeContext): any => { + return take(input, { + JobName: [], + JobUpdate: (_) => se_JobUpdate(_, context), + }); }; +// se_UpdateJsonClassifierRequest omitted. + /** - * deserializeAws_json1_1Mapping + * serializeAws_json1_1UpdateMLTransformRequest */ -const de_Mapping = (output: any, context: __SerdeContext): Mapping => { - return { - Children: output.Children != null ? de_Mappings(output.Children, context) : undefined, - Dropped: __expectBoolean(output.Dropped), - FromPath: output.FromPath != null ? de_EnclosedInStringProperties(output.FromPath, context) : undefined, - FromType: __expectString(output.FromType), - ToKey: __expectString(output.ToKey), - ToType: __expectString(output.ToType), - } as any; +const se_UpdateMLTransformRequest = (input: UpdateMLTransformRequest, context: __SerdeContext): any => { + return take(input, { + Description: [], + GlueVersion: [], + MaxCapacity: __serializeFloat, + MaxRetries: [], + Name: [], + NumberOfWorkers: [], + Parameters: (_) => se_TransformParameters(_, context), + Role: [], + Timeout: [], + TransformId: [], + WorkerType: [], + }); }; /** - * deserializeAws_json1_1MappingEntry + * serializeAws_json1_1UpdatePartitionRequest */ -const de_MappingEntry = (output: any, context: __SerdeContext): MappingEntry => { - return { - SourcePath: __expectString(output.SourcePath), - SourceTable: __expectString(output.SourceTable), - SourceType: __expectString(output.SourceType), - TargetPath: __expectString(output.TargetPath), - TargetTable: __expectString(output.TargetTable), - TargetType: __expectString(output.TargetType), - } as any; +const se_UpdatePartitionRequest = (input: UpdatePartitionRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + PartitionInput: (_) => se_PartitionInput(_, context), + PartitionValueList: _json, + TableName: [], + }); }; +// se_UpdateRegistryInput omitted. + +// se_UpdateSchemaInput omitted. + +// se_UpdateSourceControlFromJobRequest omitted. + /** - * deserializeAws_json1_1MappingList + * serializeAws_json1_1UpdateTableRequest */ -const de_MappingList = (output: any, context: __SerdeContext): MappingEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MappingEntry(entry, context); - }); - return retVal; +const se_UpdateTableRequest = (input: UpdateTableRequest, context: __SerdeContext): any => { + return take(input, { + CatalogId: [], + DatabaseName: [], + SkipArchive: [], + TableInput: (_) => se_TableInput(_, context), + TransactionId: [], + VersionId: [], + }); }; +// se_UpdateTriggerRequest omitted. + +// se_UpdateUserDefinedFunctionRequest omitted. + +// se_UpdateWorkflowRequest omitted. + +// se_UpdateXMLClassifierRequest omitted. + +// se_UpsertRedshiftTargetOptions omitted. + +// se_UserDefinedFunctionInput omitted. + +// se_ValueStringList omitted. + +// se_WorkflowNames omitted. + +// se_WorkflowRunProperties omitted. + +// de_AccessDeniedException omitted. + +// de_Action omitted. + +// de_ActionList omitted. + +// de_AdditionalOptions omitted. + +// de_Aggregate omitted. + +// de_AggregateOperation omitted. + +// de_AggregateOperations omitted. + +// de_AlreadyExistsException omitted. + /** - * deserializeAws_json1_1Mappings + * deserializeAws_json1_1ApplyMapping */ -const de_Mappings = (output: any, context: __SerdeContext): Mapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Mapping(entry, context); - }); - return retVal; +const de_ApplyMapping = (output: any, context: __SerdeContext): ApplyMapping => { + return take(output, { + Inputs: _json, + Mapping: (_: any) => de_Mappings(_, context), + Name: __expectString, + }) as any; }; +// de_AthenaConnectorSource omitted. + +// de_BackfillError omitted. + +// de_BackfillErroredPartitionsList omitted. + +// de_BackfillErrors omitted. + +// de_BasicCatalogTarget omitted. + +// de_BatchCreatePartitionResponse omitted. + +// de_BatchDeleteConnectionResponse omitted. + +// de_BatchDeletePartitionResponse omitted. + +// de_BatchDeleteTableResponse omitted. + +// de_BatchDeleteTableVersionResponse omitted. + /** - * deserializeAws_json1_1MapValue + * deserializeAws_json1_1BatchGetBlueprintsResponse */ -const de_MapValue = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_BatchGetBlueprintsResponse = (output: any, context: __SerdeContext): BatchGetBlueprintsResponse => { + return take(output, { + Blueprints: (_: any) => de_Blueprints(_, context), + MissingBlueprints: _json, + }) as any; }; /** - * deserializeAws_json1_1MatchCriteria + * deserializeAws_json1_1BatchGetCrawlersResponse */ -const de_MatchCriteria = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_BatchGetCrawlersResponse = (output: any, context: __SerdeContext): BatchGetCrawlersResponse => { + return take(output, { + Crawlers: (_: any) => de_CrawlerList(_, context), + CrawlersNotFound: _json, + }) as any; }; +// de_BatchGetCustomEntityTypesResponse omitted. + /** - * deserializeAws_json1_1Merge + * deserializeAws_json1_1BatchGetDataQualityResultResponse */ -const de_Merge = (output: any, context: __SerdeContext): Merge => { - return { - Inputs: output.Inputs != null ? de_TwoInputs(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PrimaryKeys: output.PrimaryKeys != null ? de_GlueStudioPathList(output.PrimaryKeys, context) : undefined, - Source: __expectString(output.Source), - } as any; +const de_BatchGetDataQualityResultResponse = ( + output: any, + context: __SerdeContext +): BatchGetDataQualityResultResponse => { + return take(output, { + Results: (_: any) => de_DataQualityResultsList(_, context), + ResultsNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1MetadataInfo + * deserializeAws_json1_1BatchGetDevEndpointsResponse */ -const de_MetadataInfo = (output: any, context: __SerdeContext): MetadataInfo => { - return { - CreatedTime: __expectString(output.CreatedTime), - MetadataValue: __expectString(output.MetadataValue), - OtherMetadataValueList: - output.OtherMetadataValueList != null - ? de_OtherMetadataValueList(output.OtherMetadataValueList, context) - : undefined, - } as any; +const de_BatchGetDevEndpointsResponse = (output: any, context: __SerdeContext): BatchGetDevEndpointsResponse => { + return take(output, { + DevEndpoints: (_: any) => de_DevEndpointList(_, context), + DevEndpointsNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1MetadataInfoMap + * deserializeAws_json1_1BatchGetJobsResponse */ -const de_MetadataInfoMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MetadataInfo(value, context); - return acc; - }, {}); +const de_BatchGetJobsResponse = (output: any, context: __SerdeContext): BatchGetJobsResponse => { + return take(output, { + Jobs: (_: any) => de_JobList(_, context), + JobsNotFound: _json, + }) as any; }; /** - * deserializeAws_json1_1MicrosoftSQLServerCatalogSource + * deserializeAws_json1_1BatchGetPartitionResponse */ -const de_MicrosoftSQLServerCatalogSource = (output: any, context: __SerdeContext): MicrosoftSQLServerCatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_BatchGetPartitionResponse = (output: any, context: __SerdeContext): BatchGetPartitionResponse => { + return take(output, { + Partitions: (_: any) => de_PartitionList(_, context), + UnprocessedKeys: _json, + }) as any; }; +// de_BatchGetPartitionValueList omitted. + +// de_BatchGetTriggersResponse omitted. + /** - * deserializeAws_json1_1MicrosoftSQLServerCatalogTarget + * deserializeAws_json1_1BatchGetWorkflowsResponse */ -const de_MicrosoftSQLServerCatalogTarget = (output: any, context: __SerdeContext): MicrosoftSQLServerCatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_BatchGetWorkflowsResponse = (output: any, context: __SerdeContext): BatchGetWorkflowsResponse => { + return take(output, { + MissingWorkflows: _json, + Workflows: (_: any) => de_Workflows(_, context), + }) as any; }; +// de_BatchStopJobRunError omitted. + +// de_BatchStopJobRunErrorList omitted. + +// de_BatchStopJobRunResponse omitted. + +// de_BatchStopJobRunSuccessfulSubmission omitted. + +// de_BatchStopJobRunSuccessfulSubmissionList omitted. + +// de_BatchUpdatePartitionFailureEntry omitted. + +// de_BatchUpdatePartitionFailureList omitted. + +// de_BatchUpdatePartitionResponse omitted. + /** - * deserializeAws_json1_1MLTransform + * deserializeAws_json1_1BinaryColumnStatisticsData */ -const de_MLTransform = (output: any, context: __SerdeContext): MLTransform => { - return { - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - Description: __expectString(output.Description), - EvaluationMetrics: - output.EvaluationMetrics != null ? de_EvaluationMetrics(output.EvaluationMetrics, context) : undefined, - GlueVersion: __expectString(output.GlueVersion), - InputRecordTables: output.InputRecordTables != null ? de_GlueTables(output.InputRecordTables, context) : undefined, - LabelCount: __expectInt32(output.LabelCount), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - MaxCapacity: __limitedParseDouble(output.MaxCapacity), - MaxRetries: __expectInt32(output.MaxRetries), - Name: __expectString(output.Name), - NumberOfWorkers: __expectInt32(output.NumberOfWorkers), - Parameters: output.Parameters != null ? de_TransformParameters(output.Parameters, context) : undefined, - Role: __expectString(output.Role), - Schema: output.Schema != null ? de_TransformSchema(output.Schema, context) : undefined, - Status: __expectString(output.Status), - Timeout: __expectInt32(output.Timeout), - TransformEncryption: - output.TransformEncryption != null ? de_TransformEncryption(output.TransformEncryption, context) : undefined, - TransformId: __expectString(output.TransformId), - WorkerType: __expectString(output.WorkerType), - } as any; -}; - -/** - * deserializeAws_json1_1MLTransformNotReadyException - */ -const de_MLTransformNotReadyException = (output: any, context: __SerdeContext): MLTransformNotReadyException => { - return { - Message: __expectString(output.Message), - } as any; +const de_BinaryColumnStatisticsData = (output: any, context: __SerdeContext): BinaryColumnStatisticsData => { + return take(output, { + AverageLength: __limitedParseDouble, + MaximumLength: __expectLong, + NumberOfNulls: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1MLUserDataEncryption + * deserializeAws_json1_1Blueprint */ -const de_MLUserDataEncryption = (output: any, context: __SerdeContext): MLUserDataEncryption => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - MlUserDataEncryptionMode: __expectString(output.MlUserDataEncryptionMode), - } as any; +const de_Blueprint = (output: any, context: __SerdeContext): Blueprint => { + return take(output, { + BlueprintLocation: __expectString, + BlueprintServiceLocation: __expectString, + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ErrorMessage: __expectString, + LastActiveDefinition: (_: any) => de_LastActiveDefinition(_, context), + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ParameterSpec: __expectString, + Status: __expectString, + }) as any; }; +// de_BlueprintDetails omitted. + +// de_BlueprintNames omitted. + /** - * deserializeAws_json1_1MongoDBTarget + * deserializeAws_json1_1BlueprintRun */ -const de_MongoDBTarget = (output: any, context: __SerdeContext): MongoDBTarget => { - return { - ConnectionName: __expectString(output.ConnectionName), - Path: __expectString(output.Path), - ScanAll: __expectBoolean(output.ScanAll), - } as any; +const de_BlueprintRun = (output: any, context: __SerdeContext): BlueprintRun => { + return take(output, { + BlueprintName: __expectString, + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + Parameters: __expectString, + RoleArn: __expectString, + RollbackErrorMessage: __expectString, + RunId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + WorkflowName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MongoDBTargetList + * deserializeAws_json1_1BlueprintRuns */ -const de_MongoDBTargetList = (output: any, context: __SerdeContext): MongoDBTarget[] => { +const de_BlueprintRuns = (output: any, context: __SerdeContext): BlueprintRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MongoDBTarget(entry, context); + return de_BlueprintRun(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MySQLCatalogSource - */ -const de_MySQLCatalogSource = (output: any, context: __SerdeContext): MySQLCatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1MySQLCatalogTarget - */ -const de_MySQLCatalogTarget = (output: any, context: __SerdeContext): MySQLCatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; -}; - -/** - * deserializeAws_json1_1NameStringList + * deserializeAws_json1_1Blueprints */ -const de_NameStringList = (output: any, context: __SerdeContext): string[] => { +const de_Blueprints = (output: any, context: __SerdeContext): Blueprint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Blueprint(entry, context); }); return retVal; }; +// de_BooleanColumnStatisticsData omitted. + +// de_BoundedPartitionValueList omitted. + +// de_CancelDataQualityRuleRecommendationRunResponse omitted. + +// de_CancelDataQualityRulesetEvaluationRunResponse omitted. + +// de_CancelMLTaskRunResponse omitted. + +// de_CancelStatementResponse omitted. + +// de_CatalogDeltaSource omitted. + +// de_CatalogHudiSource omitted. + /** - * deserializeAws_json1_1Node + * deserializeAws_json1_1CatalogImportStatus */ -const de_Node = (output: any, context: __SerdeContext): Node => { - return { - CrawlerDetails: output.CrawlerDetails != null ? de_CrawlerNodeDetails(output.CrawlerDetails, context) : undefined, - JobDetails: output.JobDetails != null ? de_JobNodeDetails(output.JobDetails, context) : undefined, - Name: __expectString(output.Name), - TriggerDetails: output.TriggerDetails != null ? de_TriggerNodeDetails(output.TriggerDetails, context) : undefined, - Type: __expectString(output.Type), - UniqueId: __expectString(output.UniqueId), - } as any; +const de_CatalogImportStatus = (output: any, context: __SerdeContext): CatalogImportStatus => { + return take(output, { + ImportCompleted: __expectBoolean, + ImportTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImportedBy: __expectString, + }) as any; }; +// de_CatalogKafkaSource omitted. + +// de_CatalogKinesisSource omitted. + +// de_CatalogSchemaChangePolicy omitted. + +// de_CatalogSource omitted. + +// de_CatalogTablesList omitted. + +// de_CatalogTarget omitted. + +// de_CatalogTargetList omitted. + +// de_CheckSchemaVersionValidityResponse omitted. + /** - * deserializeAws_json1_1NodeIdList + * deserializeAws_json1_1Classifier */ -const de_NodeIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_Classifier = (output: any, context: __SerdeContext): Classifier => { + return take(output, { + CsvClassifier: (_: any) => de_CsvClassifier(_, context), + GrokClassifier: (_: any) => de_GrokClassifier(_, context), + JsonClassifier: (_: any) => de_JsonClassifier(_, context), + XMLClassifier: (_: any) => de_XMLClassifier(_, context), + }) as any; }; /** - * deserializeAws_json1_1NodeList + * deserializeAws_json1_1ClassifierList */ -const de_NodeList = (output: any, context: __SerdeContext): Node[] => { +const de_ClassifierList = (output: any, context: __SerdeContext): Classifier[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Node(entry, context); + return de_Classifier(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NoScheduleException - */ -const de_NoScheduleException = (output: any, context: __SerdeContext): NoScheduleException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ClassifierNameList omitted. -/** - * deserializeAws_json1_1NotificationProperty - */ -const de_NotificationProperty = (output: any, context: __SerdeContext): NotificationProperty => { - return { - NotifyDelayAfter: __expectInt32(output.NotifyDelayAfter), - } as any; -}; +// de_CloudWatchEncryption omitted. /** - * deserializeAws_json1_1NullCheckBoxList + * deserializeAws_json1_1CodeGenConfigurationNode */ -const de_NullCheckBoxList = (output: any, context: __SerdeContext): NullCheckBoxList => { - return { - IsEmpty: __expectBoolean(output.IsEmpty), - IsNegOne: __expectBoolean(output.IsNegOne), - IsNullString: __expectBoolean(output.IsNullString), - } as any; +const de_CodeGenConfigurationNode = (output: any, context: __SerdeContext): CodeGenConfigurationNode => { + return take(output, { + Aggregate: _json, + ApplyMapping: (_: any) => de_ApplyMapping(_, context), + AthenaConnectorSource: _json, + CatalogDeltaSource: _json, + CatalogHudiSource: _json, + CatalogKafkaSource: _json, + CatalogKinesisSource: _json, + CatalogSource: _json, + CatalogTarget: _json, + CustomCode: _json, + DirectJDBCSource: _json, + DirectKafkaSource: _json, + DirectKinesisSource: _json, + DropDuplicates: _json, + DropFields: _json, + DropNullFields: _json, + DynamicTransform: _json, + DynamoDBCatalogSource: _json, + EvaluateDataQuality: _json, + FillMissingValues: _json, + Filter: _json, + GovernedCatalogSource: _json, + GovernedCatalogTarget: _json, + JDBCConnectorSource: _json, + JDBCConnectorTarget: _json, + Join: _json, + Merge: _json, + MicrosoftSQLServerCatalogSource: _json, + MicrosoftSQLServerCatalogTarget: _json, + MySQLCatalogSource: _json, + MySQLCatalogTarget: _json, + OracleSQLCatalogSource: _json, + OracleSQLCatalogTarget: _json, + PIIDetection: (_: any) => de_PIIDetection(_, context), + PostgreSQLCatalogSource: _json, + PostgreSQLCatalogTarget: _json, + RedshiftSource: _json, + RedshiftTarget: _json, + RelationalCatalogSource: _json, + RenameField: _json, + S3CatalogDeltaSource: _json, + S3CatalogHudiSource: _json, + S3CatalogSource: _json, + S3CatalogTarget: _json, + S3CsvSource: _json, + S3DeltaCatalogTarget: _json, + S3DeltaDirectTarget: _json, + S3DeltaSource: _json, + S3DirectTarget: _json, + S3GlueParquetTarget: _json, + S3HudiCatalogTarget: _json, + S3HudiDirectTarget: _json, + S3HudiSource: _json, + S3JsonSource: _json, + S3ParquetSource: _json, + SelectFields: _json, + SelectFromCollection: _json, + SparkConnectorSource: _json, + SparkConnectorTarget: _json, + SparkSQL: _json, + Spigot: (_: any) => de_Spigot(_, context), + SplitFields: _json, + Union: _json, + }) as any; }; /** - * deserializeAws_json1_1NullValueField + * deserializeAws_json1_1CodeGenConfigurationNodes */ -const de_NullValueField = (output: any, context: __SerdeContext): NullValueField => { - return { - Datatype: output.Datatype != null ? de_Datatype(output.Datatype, context) : undefined, - Value: __expectString(output.Value), - } as any; +const de_CodeGenConfigurationNodes = ( + output: any, + context: __SerdeContext +): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = de_CodeGenConfigurationNode(value, context); + return acc; + }, {}); }; +// de_CodeGenEdge omitted. + +// de_CodeGenNode omitted. + +// de_CodeGenNodeArg omitted. + +// de_CodeGenNodeArgs omitted. + +// de_Column omitted. + +// de_ColumnError omitted. + +// de_ColumnErrors omitted. + /** - * deserializeAws_json1_1NullValueFields + * deserializeAws_json1_1ColumnImportance */ -const de_NullValueFields = (output: any, context: __SerdeContext): NullValueField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NullValueField(entry, context); - }); - return retVal; +const de_ColumnImportance = (output: any, context: __SerdeContext): ColumnImportance => { + return take(output, { + ColumnName: __expectString, + Importance: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_json1_1OneInput + * deserializeAws_json1_1ColumnImportanceList */ -const de_OneInput = (output: any, context: __SerdeContext): string[] => { +const de_ColumnImportanceList = (output: any, context: __SerdeContext): ColumnImportance[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ColumnImportance(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OperationTimeoutException - */ -const de_OperationTimeoutException = (output: any, context: __SerdeContext): OperationTimeoutException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ColumnList omitted. + +// de_ColumnRowFilter omitted. + +// de_ColumnRowFilterList omitted. /** - * deserializeAws_json1_1OracleSQLCatalogSource + * deserializeAws_json1_1ColumnStatistics */ -const de_OracleSQLCatalogSource = (output: any, context: __SerdeContext): OracleSQLCatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_ColumnStatistics = (output: any, context: __SerdeContext): ColumnStatistics => { + return take(output, { + AnalyzedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ColumnName: __expectString, + ColumnType: __expectString, + StatisticsData: (_: any) => de_ColumnStatisticsData(_, context), + }) as any; }; /** - * deserializeAws_json1_1OracleSQLCatalogTarget + * deserializeAws_json1_1ColumnStatisticsData */ -const de_OracleSQLCatalogTarget = (output: any, context: __SerdeContext): OracleSQLCatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_ColumnStatisticsData = (output: any, context: __SerdeContext): ColumnStatisticsData => { + return take(output, { + BinaryColumnStatisticsData: (_: any) => de_BinaryColumnStatisticsData(_, context), + BooleanColumnStatisticsData: _json, + DateColumnStatisticsData: (_: any) => de_DateColumnStatisticsData(_, context), + DecimalColumnStatisticsData: (_: any) => de_DecimalColumnStatisticsData(_, context), + DoubleColumnStatisticsData: (_: any) => de_DoubleColumnStatisticsData(_, context), + LongColumnStatisticsData: _json, + StringColumnStatisticsData: (_: any) => de_StringColumnStatisticsData(_, context), + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OrchestrationArgumentsMap + * deserializeAws_json1_1ColumnStatisticsError */ -const de_OrchestrationArgumentsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_ColumnStatisticsError = (output: any, context: __SerdeContext): ColumnStatisticsError => { + return take(output, { + ColumnStatistics: (_: any) => de_ColumnStatistics(_, context), + Error: _json, + }) as any; }; /** - * deserializeAws_json1_1OrchestrationStringList + * deserializeAws_json1_1ColumnStatisticsErrors */ -const de_OrchestrationStringList = (output: any, context: __SerdeContext): string[] => { +const de_ColumnStatisticsErrors = (output: any, context: __SerdeContext): ColumnStatisticsError[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ColumnStatisticsError(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Order - */ -const de_Order = (output: any, context: __SerdeContext): Order => { - return { - Column: __expectString(output.Column), - SortOrder: __expectInt32(output.SortOrder), - } as any; -}; - -/** - * deserializeAws_json1_1OrderList + * deserializeAws_json1_1ColumnStatisticsList */ -const de_OrderList = (output: any, context: __SerdeContext): Order[] => { +const de_ColumnStatisticsList = (output: any, context: __SerdeContext): ColumnStatistics[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Order(entry, context); + return de_ColumnStatistics(entry, context); }); return retVal; }; +// de_ColumnValueStringList omitted. + +// de_ConcurrentModificationException omitted. + +// de_ConcurrentRunsExceededException omitted. + +// de_Condition omitted. + +// de_ConditionCheckFailureException omitted. + +// de_ConditionList omitted. + +// de_ConflictException omitted. + +// de_ConfusionMatrix omitted. + +/** + * deserializeAws_json1_1Connection + */ +const de_Connection = (output: any, context: __SerdeContext): Connection => { + return take(output, { + ConnectionProperties: _json, + ConnectionType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastUpdatedBy: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MatchCriteria: _json, + Name: __expectString, + PhysicalConnectionRequirements: _json, + }) as any; +}; + /** - * deserializeAws_json1_1OtherMetadataValueList + * deserializeAws_json1_1ConnectionList */ -const de_OtherMetadataValueList = (output: any, context: __SerdeContext): OtherMetadataValueListItem[] => { +const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OtherMetadataValueListItem(entry, context); + return de_Connection(entry, context); }); return retVal; }; +// de_ConnectionPasswordEncryption omitted. + +// de_ConnectionProperties omitted. + +// de_ConnectionsList omitted. + +// de_ContextWords omitted. + /** - * deserializeAws_json1_1OtherMetadataValueListItem + * deserializeAws_json1_1Crawl */ -const de_OtherMetadataValueListItem = (output: any, context: __SerdeContext): OtherMetadataValueListItem => { - return { - CreatedTime: __expectString(output.CreatedTime), - MetadataValue: __expectString(output.MetadataValue), - } as any; +const de_Crawl = (output: any, context: __SerdeContext): Crawl => { + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + LogGroup: __expectString, + LogStream: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParametersMap + * deserializeAws_json1_1Crawler */ -const de_ParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_Crawler = (output: any, context: __SerdeContext): Crawler => { + return take(output, { + Classifiers: _json, + Configuration: __expectString, + CrawlElapsedTime: __expectLong, + CrawlerSecurityConfiguration: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatabaseName: __expectString, + Description: __expectString, + LakeFormationConfiguration: _json, + LastCrawl: (_: any) => de_LastCrawlInfo(_, context), + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageConfiguration: _json, + Name: __expectString, + RecrawlPolicy: _json, + Role: __expectString, + Schedule: _json, + SchemaChangePolicy: _json, + State: __expectString, + TablePrefix: __expectString, + Targets: (_: any) => de_CrawlerTargets(_, context), + Version: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1Partition + * deserializeAws_json1_1CrawlerHistory */ -const de_Partition = (output: any, context: __SerdeContext): Partition => { - return { - CatalogId: __expectString(output.CatalogId), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatabaseName: __expectString(output.DatabaseName), - LastAccessTime: - output.LastAccessTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessTime))) - : undefined, - LastAnalyzedTime: - output.LastAnalyzedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAnalyzedTime))) - : undefined, - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - StorageDescriptor: - output.StorageDescriptor != null ? de_StorageDescriptor(output.StorageDescriptor, context) : undefined, - TableName: __expectString(output.TableName), - Values: output.Values != null ? de_ValueStringList(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1PartitionError - */ -const de_PartitionError = (output: any, context: __SerdeContext): PartitionError => { - return { - ErrorDetail: output.ErrorDetail != null ? de_ErrorDetail(output.ErrorDetail, context) : undefined, - PartitionValues: output.PartitionValues != null ? de_ValueStringList(output.PartitionValues, context) : undefined, - } as any; +const de_CrawlerHistory = (output: any, context: __SerdeContext): CrawlerHistory => { + return take(output, { + CrawlId: __expectString, + DPUHour: __limitedParseDouble, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + LogGroup: __expectString, + LogStream: __expectString, + MessagePrefix: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + Summary: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PartitionErrors + * deserializeAws_json1_1CrawlerHistoryList */ -const de_PartitionErrors = (output: any, context: __SerdeContext): PartitionError[] => { +const de_CrawlerHistoryList = (output: any, context: __SerdeContext): CrawlerHistory[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartitionError(entry, context); + return de_CrawlerHistory(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PartitionIndexDescriptor - */ -const de_PartitionIndexDescriptor = (output: any, context: __SerdeContext): PartitionIndexDescriptor => { - return { - BackfillErrors: output.BackfillErrors != null ? de_BackfillErrors(output.BackfillErrors, context) : undefined, - IndexName: __expectString(output.IndexName), - IndexStatus: __expectString(output.IndexStatus), - Keys: output.Keys != null ? de_KeySchemaElementList(output.Keys, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1PartitionIndexDescriptorList + * deserializeAws_json1_1CrawlerList */ -const de_PartitionIndexDescriptorList = (output: any, context: __SerdeContext): PartitionIndexDescriptor[] => { +const de_CrawlerList = (output: any, context: __SerdeContext): Crawler[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartitionIndexDescriptor(entry, context); + return de_Crawler(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PartitionList + * deserializeAws_json1_1CrawlerMetrics */ -const de_PartitionList = (output: any, context: __SerdeContext): Partition[] => { +const de_CrawlerMetrics = (output: any, context: __SerdeContext): CrawlerMetrics => { + return take(output, { + CrawlerName: __expectString, + LastRuntimeSeconds: __limitedParseDouble, + MedianRuntimeSeconds: __limitedParseDouble, + StillEstimating: __expectBoolean, + TablesCreated: __expectInt32, + TablesDeleted: __expectInt32, + TablesUpdated: __expectInt32, + TimeLeftSeconds: __limitedParseDouble, + }) as any; +}; + +/** + * deserializeAws_json1_1CrawlerMetricsList + */ +const de_CrawlerMetricsList = (output: any, context: __SerdeContext): CrawlerMetrics[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Partition(entry, context); + return de_CrawlerMetrics(entry, context); }); return retVal; }; +// de_CrawlerNameList omitted. + /** - * deserializeAws_json1_1PartitionValueList + * deserializeAws_json1_1CrawlerNodeDetails */ -const de_PartitionValueList = (output: any, context: __SerdeContext): PartitionValueList => { - return { - Values: output.Values != null ? de_ValueStringList(output.Values, context) : undefined, - } as any; +const de_CrawlerNodeDetails = (output: any, context: __SerdeContext): CrawlerNodeDetails => { + return take(output, { + Crawls: (_: any) => de_CrawlList(_, context), + }) as any; }; +// de_CrawlerNotRunningException omitted. + +// de_CrawlerRunningException omitted. + +// de_CrawlerStoppingException omitted. + /** - * deserializeAws_json1_1PathList + * deserializeAws_json1_1CrawlerTargets */ -const de_PathList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_CrawlerTargets = (output: any, context: __SerdeContext): CrawlerTargets => { + return take(output, { + CatalogTargets: _json, + DeltaTargets: _json, + DynamoDBTargets: (_: any) => de_DynamoDBTargetList(_, context), + JdbcTargets: _json, + MongoDBTargets: _json, + S3Targets: _json, + }) as any; }; /** - * deserializeAws_json1_1PermissionList + * deserializeAws_json1_1CrawlList */ -const de_PermissionList = (output: any, context: __SerdeContext): (Permission | string)[] => { +const de_CrawlList = (output: any, context: __SerdeContext): Crawl[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Crawl(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PermissionTypeMismatchException - */ -const de_PermissionTypeMismatchException = (output: any, context: __SerdeContext): PermissionTypeMismatchException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CreateBlueprintResponse omitted. + +// de_CreateClassifierResponse omitted. + +// de_CreateConnectionResponse omitted. + +// de_CreateCrawlerResponse omitted. + +// de_CreateCustomEntityTypeResponse omitted. + +// de_CreateDatabaseResponse omitted. + +// de_CreateDataQualityRulesetResponse omitted. /** - * deserializeAws_json1_1PhysicalConnectionRequirements + * deserializeAws_json1_1CreateDevEndpointResponse */ -const de_PhysicalConnectionRequirements = (output: any, context: __SerdeContext): PhysicalConnectionRequirements => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - SecurityGroupIdList: - output.SecurityGroupIdList != null ? de_SecurityGroupIdList(output.SecurityGroupIdList, context) : undefined, - SubnetId: __expectString(output.SubnetId), - } as any; +const de_CreateDevEndpointResponse = (output: any, context: __SerdeContext): CreateDevEndpointResponse => { + return take(output, { + Arguments: _json, + AvailabilityZone: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + ExtraJarsS3Path: __expectString, + ExtraPythonLibsS3Path: __expectString, + FailureReason: __expectString, + GlueVersion: __expectString, + NumberOfNodes: __expectInt32, + NumberOfWorkers: __expectInt32, + RoleArn: __expectString, + SecurityConfiguration: __expectString, + SecurityGroupIds: _json, + Status: __expectString, + SubnetId: __expectString, + VpcId: __expectString, + WorkerType: __expectString, + YarnEndpointAddress: __expectString, + ZeppelinRemoteSparkInterpreterPort: __expectInt32, + }) as any; }; +// de_CreateJobResponse omitted. + +// de_CreateMLTransformResponse omitted. + +// de_CreatePartitionIndexResponse omitted. + +// de_CreatePartitionResponse omitted. + +// de_CreateRegistryResponse omitted. + +// de_CreateSchemaResponse omitted. + +// de_CreateScriptResponse omitted. + /** - * deserializeAws_json1_1PIIDetection + * deserializeAws_json1_1CreateSecurityConfigurationResponse */ -const de_PIIDetection = (output: any, context: __SerdeContext): PIIDetection => { - return { - EntityTypesToDetect: - output.EntityTypesToDetect != null - ? de_EnclosedInStringProperties(output.EntityTypesToDetect, context) - : undefined, - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - MaskValue: __expectString(output.MaskValue), - Name: __expectString(output.Name), - OutputColumnName: __expectString(output.OutputColumnName), - PiiType: __expectString(output.PiiType), - SampleFraction: __limitedParseDouble(output.SampleFraction), - ThresholdFraction: __limitedParseDouble(output.ThresholdFraction), - } as any; +const de_CreateSecurityConfigurationResponse = ( + output: any, + context: __SerdeContext +): CreateSecurityConfigurationResponse => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PostgreSQLCatalogSource + * deserializeAws_json1_1CreateSessionResponse */ -const de_PostgreSQLCatalogSource = (output: any, context: __SerdeContext): PostgreSQLCatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_CreateSessionResponse = (output: any, context: __SerdeContext): CreateSessionResponse => { + return take(output, { + Session: (_: any) => de_Session(_, context), + }) as any; }; +// de_CreateTableResponse omitted. + +// de_CreateTriggerResponse omitted. + +// de_CreateUserDefinedFunctionResponse omitted. + +// de_CreateWorkflowResponse omitted. + /** - * deserializeAws_json1_1PostgreSQLCatalogTarget + * deserializeAws_json1_1CsvClassifier */ -const de_PostgreSQLCatalogTarget = (output: any, context: __SerdeContext): PostgreSQLCatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_CsvClassifier = (output: any, context: __SerdeContext): CsvClassifier => { + return take(output, { + AllowSingleColumn: __expectBoolean, + ContainsHeader: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomDatatypeConfigured: __expectBoolean, + CustomDatatypes: _json, + Delimiter: __expectString, + DisableValueTrimming: __expectBoolean, + Header: _json, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + QuoteSymbol: __expectString, + Version: __expectLong, + }) as any; }; +// de_CsvHeader omitted. + +// de_CustomCode omitted. + +// de_CustomDatatypes omitted. + +// de_CustomEntityType omitted. + +// de_CustomEntityTypeNames omitted. + +// de_CustomEntityTypes omitted. + +// de_DagEdges omitted. + +// de_DagNodes omitted. + /** - * deserializeAws_json1_1Predecessor + * deserializeAws_json1_1Database */ -const de_Predecessor = (output: any, context: __SerdeContext): Predecessor => { - return { - JobName: __expectString(output.JobName), - RunId: __expectString(output.RunId), - } as any; +const de_Database = (output: any, context: __SerdeContext): Database => { + return take(output, { + CatalogId: __expectString, + CreateTableDefaultPermissions: _json, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + FederatedDatabase: _json, + LocationUri: __expectString, + Name: __expectString, + Parameters: _json, + TargetDatabase: _json, + }) as any; }; +// de_DatabaseIdentifier omitted. + /** - * deserializeAws_json1_1PredecessorList + * deserializeAws_json1_1DatabaseList */ -const de_PredecessorList = (output: any, context: __SerdeContext): Predecessor[] => { +const de_DatabaseList = (output: any, context: __SerdeContext): Database[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Predecessor(entry, context); + return de_Database(entry, context); }); return retVal; }; +// de_DataCatalogEncryptionSettings omitted. + +// de_DataLakePrincipal omitted. + +// de_DataQualityEvaluationRunAdditionalRunOptions omitted. + /** - * deserializeAws_json1_1Predicate + * deserializeAws_json1_1DataQualityResult */ -const de_Predicate = (output: any, context: __SerdeContext): Predicate => { - return { - Conditions: output.Conditions != null ? de_ConditionList(output.Conditions, context) : undefined, - Logical: __expectString(output.Logical), - } as any; +const de_DataQualityResult = (output: any, context: __SerdeContext): DataQualityResult => { + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSource: _json, + EvaluationContext: __expectString, + JobName: __expectString, + JobRunId: __expectString, + ResultId: __expectString, + RuleResults: _json, + RulesetEvaluationRunId: __expectString, + RulesetName: __expectString, + Score: __limitedParseDouble, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1PrincipalPermissions + * deserializeAws_json1_1DataQualityResultDescription */ -const de_PrincipalPermissions = (output: any, context: __SerdeContext): PrincipalPermissions => { - return { - Permissions: output.Permissions != null ? de_PermissionList(output.Permissions, context) : undefined, - Principal: output.Principal != null ? de_DataLakePrincipal(output.Principal, context) : undefined, - } as any; +const de_DataQualityResultDescription = (output: any, context: __SerdeContext): DataQualityResultDescription => { + return take(output, { + DataSource: _json, + JobName: __expectString, + JobRunId: __expectString, + ResultId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1PrincipalPermissionsList + * deserializeAws_json1_1DataQualityResultDescriptionList */ -const de_PrincipalPermissionsList = (output: any, context: __SerdeContext): PrincipalPermissions[] => { +const de_DataQualityResultDescriptionList = (output: any, context: __SerdeContext): DataQualityResultDescription[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PrincipalPermissions(entry, context); + return de_DataQualityResultDescription(entry, context); }); return retVal; }; +// de_DataQualityResultIdList omitted. + +// de_DataQualityResultIds omitted. + /** - * deserializeAws_json1_1PublicKeysList + * deserializeAws_json1_1DataQualityResultsList */ -const de_PublicKeysList = (output: any, context: __SerdeContext): string[] => { +const de_DataQualityResultsList = (output: any, context: __SerdeContext): DataQualityResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DataQualityResult(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PutDataCatalogEncryptionSettingsResponse + * deserializeAws_json1_1DataQualityRuleRecommendationRunDescription */ -const de_PutDataCatalogEncryptionSettingsResponse = ( +const de_DataQualityRuleRecommendationRunDescription = ( output: any, context: __SerdeContext -): PutDataCatalogEncryptionSettingsResponse => { - return {} as any; +): DataQualityRuleRecommendationRunDescription => { + return take(output, { + DataSource: _json, + RunId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutResourcePolicyResponse + * deserializeAws_json1_1DataQualityRuleRecommendationRunList */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - PolicyHash: __expectString(output.PolicyHash), - } as any; +const de_DataQualityRuleRecommendationRunList = ( + output: any, + context: __SerdeContext +): DataQualityRuleRecommendationRunDescription[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataQualityRuleRecommendationRunDescription(entry, context); + }); + return retVal; }; +// de_DataQualityRuleResult omitted. + +// de_DataQualityRuleResults omitted. + /** - * deserializeAws_json1_1PutSchemaVersionMetadataResponse + * deserializeAws_json1_1DataQualityRulesetEvaluationRunDescription */ -const de_PutSchemaVersionMetadataResponse = ( +const de_DataQualityRulesetEvaluationRunDescription = ( output: any, context: __SerdeContext -): PutSchemaVersionMetadataResponse => { - return { - LatestVersion: __expectBoolean(output.LatestVersion), - MetadataKey: __expectString(output.MetadataKey), - MetadataValue: __expectString(output.MetadataValue), - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - SchemaVersionId: __expectString(output.SchemaVersionId), - VersionNumber: __expectLong(output.VersionNumber), - } as any; +): DataQualityRulesetEvaluationRunDescription => { + return take(output, { + DataSource: _json, + RunId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PutWorkflowRunPropertiesResponse + * deserializeAws_json1_1DataQualityRulesetEvaluationRunList */ -const de_PutWorkflowRunPropertiesResponse = ( +const de_DataQualityRulesetEvaluationRunList = ( output: any, context: __SerdeContext -): PutWorkflowRunPropertiesResponse => { - return {} as any; +): DataQualityRulesetEvaluationRunDescription[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataQualityRulesetEvaluationRunDescription(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1QuerySchemaVersionMetadataResponse + * deserializeAws_json1_1DataQualityRulesetList */ -const de_QuerySchemaVersionMetadataResponse = ( - output: any, - context: __SerdeContext -): QuerySchemaVersionMetadataResponse => { - return { - MetadataInfoMap: output.MetadataInfoMap != null ? de_MetadataInfoMap(output.MetadataInfoMap, context) : undefined, - NextToken: __expectString(output.NextToken), - SchemaVersionId: __expectString(output.SchemaVersionId), - } as any; +const de_DataQualityRulesetList = (output: any, context: __SerdeContext): DataQualityRulesetListDetails[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DataQualityRulesetListDetails(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1RecrawlPolicy + * deserializeAws_json1_1DataQualityRulesetListDetails */ -const de_RecrawlPolicy = (output: any, context: __SerdeContext): RecrawlPolicy => { - return { - RecrawlBehavior: __expectString(output.RecrawlBehavior), - } as any; +const de_DataQualityRulesetListDetails = (output: any, context: __SerdeContext): DataQualityRulesetListDetails => { + return take(output, { + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RecommendationRunId: __expectString, + RuleCount: __expectInt32, + TargetTable: _json, + }) as any; }; +// de_DataQualityTargetTable omitted. + +// de_DataSource omitted. + +// de_Datatype omitted. + /** - * deserializeAws_json1_1RedshiftSource + * deserializeAws_json1_1DateColumnStatisticsData */ -const de_RedshiftSource = (output: any, context: __SerdeContext): RedshiftSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - RedshiftTmpDir: __expectString(output.RedshiftTmpDir), - Table: __expectString(output.Table), - TmpDirIAMRole: __expectString(output.TmpDirIAMRole), - } as any; +const de_DateColumnStatisticsData = (output: any, context: __SerdeContext): DateColumnStatisticsData => { + return take(output, { + MaximumValue: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MinimumValue: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfDistinctValues: __expectLong, + NumberOfNulls: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1RedshiftTarget + * deserializeAws_json1_1DecimalColumnStatisticsData */ -const de_RedshiftTarget = (output: any, context: __SerdeContext): RedshiftTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - RedshiftTmpDir: __expectString(output.RedshiftTmpDir), - Table: __expectString(output.Table), - TmpDirIAMRole: __expectString(output.TmpDirIAMRole), - UpsertRedshiftOptions: - output.UpsertRedshiftOptions != null - ? de_UpsertRedshiftTargetOptions(output.UpsertRedshiftOptions, context) - : undefined, - } as any; +const de_DecimalColumnStatisticsData = (output: any, context: __SerdeContext): DecimalColumnStatisticsData => { + return take(output, { + MaximumValue: (_: any) => de_DecimalNumber(_, context), + MinimumValue: (_: any) => de_DecimalNumber(_, context), + NumberOfDistinctValues: __expectLong, + NumberOfNulls: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1RegisterSchemaVersionResponse + * deserializeAws_json1_1DecimalNumber */ -const de_RegisterSchemaVersionResponse = (output: any, context: __SerdeContext): RegisterSchemaVersionResponse => { - return { - SchemaVersionId: __expectString(output.SchemaVersionId), - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; +const de_DecimalNumber = (output: any, context: __SerdeContext): DecimalNumber => { + return take(output, { + Scale: __expectInt32, + UnscaledValue: context.base64Decoder, + }) as any; +}; + +// de_DeleteBlueprintResponse omitted. + +// de_DeleteClassifierResponse omitted. + +// de_DeleteColumnStatisticsForPartitionResponse omitted. + +// de_DeleteColumnStatisticsForTableResponse omitted. + +// de_DeleteConnectionResponse omitted. + +// de_DeleteCrawlerResponse omitted. + +// de_DeleteCustomEntityTypeResponse omitted. + +// de_DeleteDatabaseResponse omitted. + +// de_DeleteDataQualityRulesetResponse omitted. + +// de_DeleteDevEndpointResponse omitted. + +// de_DeleteJobResponse omitted. + +// de_DeleteMLTransformResponse omitted. + +// de_DeletePartitionIndexResponse omitted. + +// de_DeletePartitionResponse omitted. + +// de_DeleteRegistryResponse omitted. + +// de_DeleteResourcePolicyResponse omitted. + +// de_DeleteSchemaResponse omitted. + +// de_DeleteSchemaVersionsResponse omitted. + +// de_DeleteSecurityConfigurationResponse omitted. + +// de_DeleteSessionResponse omitted. + +// de_DeleteTableResponse omitted. + +// de_DeleteTableVersionResponse omitted. + +// de_DeleteTriggerResponse omitted. + +// de_DeleteUserDefinedFunctionResponse omitted. + +// de_DeleteWorkflowResponse omitted. + +// de_DeltaTarget omitted. + +// de_DeltaTargetList omitted. + +/** + * deserializeAws_json1_1DevEndpoint + */ +const de_DevEndpoint = (output: any, context: __SerdeContext): DevEndpoint => { + return take(output, { + Arguments: _json, + AvailabilityZone: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + ExtraJarsS3Path: __expectString, + ExtraPythonLibsS3Path: __expectString, + FailureReason: __expectString, + GlueVersion: __expectString, + LastModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateStatus: __expectString, + NumberOfNodes: __expectInt32, + NumberOfWorkers: __expectInt32, + PrivateAddress: __expectString, + PublicAddress: __expectString, + PublicKey: __expectString, + PublicKeys: _json, + RoleArn: __expectString, + SecurityConfiguration: __expectString, + SecurityGroupIds: _json, + Status: __expectString, + SubnetId: __expectString, + VpcId: __expectString, + WorkerType: __expectString, + YarnEndpointAddress: __expectString, + ZeppelinRemoteSparkInterpreterPort: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1RegistryListDefinition + * deserializeAws_json1_1DevEndpointList */ -const de_RegistryListDefinition = (output: any, context: __SerdeContext): RegistryListItem[] => { +const de_DevEndpointList = (output: any, context: __SerdeContext): DevEndpoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegistryListItem(entry, context); + return de_DevEndpoint(entry, context); }); return retVal; }; +// de_DevEndpointNameList omitted. + +// de_DevEndpointNames omitted. + +// de_DirectJDBCSource omitted. + +// de_DirectKafkaSource omitted. + +// de_DirectKinesisSource omitted. + +// de_DirectSchemaChangePolicy omitted. + /** - * deserializeAws_json1_1RegistryListItem + * deserializeAws_json1_1DoubleColumnStatisticsData */ -const de_RegistryListItem = (output: any, context: __SerdeContext): RegistryListItem => { - return { - CreatedTime: __expectString(output.CreatedTime), - Description: __expectString(output.Description), - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - Status: __expectString(output.Status), - UpdatedTime: __expectString(output.UpdatedTime), - } as any; +const de_DoubleColumnStatisticsData = (output: any, context: __SerdeContext): DoubleColumnStatisticsData => { + return take(output, { + MaximumValue: __limitedParseDouble, + MinimumValue: __limitedParseDouble, + NumberOfDistinctValues: __expectLong, + NumberOfNulls: __expectLong, + }) as any; +}; + +// de_DQResultsPublishingOptions omitted. + +// de_DQStopJobOnFailureOptions omitted. + +// de_DropDuplicates omitted. + +// de_DropFields omitted. + +// de_DropNullFields omitted. + +// de_DynamicTransform omitted. + +// de_DynamoDBCatalogSource omitted. + +/** + * deserializeAws_json1_1DynamoDBTarget + */ +const de_DynamoDBTarget = (output: any, context: __SerdeContext): DynamoDBTarget => { + return take(output, { + Path: __expectString, + scanAll: __expectBoolean, + scanRate: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_json1_1RelationalCatalogSource + * deserializeAws_json1_1DynamoDBTargetList */ -const de_RelationalCatalogSource = (output: any, context: __SerdeContext): RelationalCatalogSource => { - return { - Database: __expectString(output.Database), - Name: __expectString(output.Name), - Table: __expectString(output.Table), - } as any; +const de_DynamoDBTargetList = (output: any, context: __SerdeContext): DynamoDBTarget[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DynamoDBTarget(entry, context); + }); + return retVal; }; +// de_Edge omitted. + +// de_EdgeList omitted. + +// de_EnableAdditionalMetadata omitted. + +// de_EnclosedInStringProperties omitted. + +// de_EnclosedInStringPropertiesMinOne omitted. + +// de_EncryptionAtRest omitted. + +// de_EncryptionConfiguration omitted. + +// de_EntityNotFoundException omitted. + +// de_ErrorByName omitted. + +// de_ErrorDetail omitted. + +// de_ErrorDetails omitted. + +// de_EvaluateDataQuality omitted. + /** - * deserializeAws_json1_1RemoveSchemaVersionMetadataResponse + * deserializeAws_json1_1EvaluationMetrics */ -const de_RemoveSchemaVersionMetadataResponse = ( - output: any, - context: __SerdeContext -): RemoveSchemaVersionMetadataResponse => { - return { - LatestVersion: __expectBoolean(output.LatestVersion), - MetadataKey: __expectString(output.MetadataKey), - MetadataValue: __expectString(output.MetadataValue), - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - SchemaVersionId: __expectString(output.SchemaVersionId), - VersionNumber: __expectLong(output.VersionNumber), - } as any; +const de_EvaluationMetrics = (output: any, context: __SerdeContext): EvaluationMetrics => { + return take(output, { + FindMatchesMetrics: (_: any) => de_FindMatchesMetrics(_, context), + TransformType: __expectString, + }) as any; }; +// de_EventBatchingCondition omitted. + +// de_ExecutionProperty omitted. + +// de_ExportLabelsTaskRunProperties omitted. + +// de_FederatedDatabase omitted. + +// de_FederatedResourceAlreadyExistsException omitted. + +// de_FederatedTable omitted. + +// de_FederationSourceException omitted. + +// de_FederationSourceRetryableException omitted. + +// de_FillMissingValues omitted. + +// de_Filter omitted. + +// de_FilterExpression omitted. + +// de_FilterExpressions omitted. + +// de_FilterValue omitted. + +// de_FilterValues omitted. + /** - * deserializeAws_json1_1RenameField + * deserializeAws_json1_1FindMatchesMetrics */ -const de_RenameField = (output: any, context: __SerdeContext): RenameField => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - SourcePath: output.SourcePath != null ? de_EnclosedInStringProperties(output.SourcePath, context) : undefined, - TargetPath: output.TargetPath != null ? de_EnclosedInStringProperties(output.TargetPath, context) : undefined, - } as any; +const de_FindMatchesMetrics = (output: any, context: __SerdeContext): FindMatchesMetrics => { + return take(output, { + AreaUnderPRCurve: __limitedParseDouble, + ColumnImportances: (_: any) => de_ColumnImportanceList(_, context), + ConfusionMatrix: _json, + F1: __limitedParseDouble, + Precision: __limitedParseDouble, + Recall: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_json1_1ResetJobBookmarkResponse + * deserializeAws_json1_1FindMatchesParameters */ -const de_ResetJobBookmarkResponse = (output: any, context: __SerdeContext): ResetJobBookmarkResponse => { - return { - JobBookmarkEntry: - output.JobBookmarkEntry != null ? de_JobBookmarkEntry(output.JobBookmarkEntry, context) : undefined, - } as any; +const de_FindMatchesParameters = (output: any, context: __SerdeContext): FindMatchesParameters => { + return take(output, { + AccuracyCostTradeoff: __limitedParseDouble, + EnforceProvidedLabels: __expectBoolean, + PrecisionRecallTradeoff: __limitedParseDouble, + PrimaryKeyColumnName: __expectString, + }) as any; }; +// de_FindMatchesTaskRunProperties omitted. + +// de_GenericMap omitted. + /** - * deserializeAws_json1_1ResourceNotReadyException + * deserializeAws_json1_1GetBlueprintResponse */ -const de_ResourceNotReadyException = (output: any, context: __SerdeContext): ResourceNotReadyException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetBlueprintResponse = (output: any, context: __SerdeContext): GetBlueprintResponse => { + return take(output, { + Blueprint: (_: any) => de_Blueprint(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceNumberLimitExceededException + * deserializeAws_json1_1GetBlueprintRunResponse */ -const de_ResourceNumberLimitExceededException = ( - output: any, - context: __SerdeContext -): ResourceNumberLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetBlueprintRunResponse = (output: any, context: __SerdeContext): GetBlueprintRunResponse => { + return take(output, { + BlueprintRun: (_: any) => de_BlueprintRun(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceUri + * deserializeAws_json1_1GetBlueprintRunsResponse */ -const de_ResourceUri = (output: any, context: __SerdeContext): ResourceUri => { - return { - ResourceType: __expectString(output.ResourceType), - Uri: __expectString(output.Uri), - } as any; +const de_GetBlueprintRunsResponse = (output: any, context: __SerdeContext): GetBlueprintRunsResponse => { + return take(output, { + BlueprintRuns: (_: any) => de_BlueprintRuns(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceUriList + * deserializeAws_json1_1GetCatalogImportStatusResponse */ -const de_ResourceUriList = (output: any, context: __SerdeContext): ResourceUri[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceUri(entry, context); - }); - return retVal; +const de_GetCatalogImportStatusResponse = (output: any, context: __SerdeContext): GetCatalogImportStatusResponse => { + return take(output, { + ImportStatus: (_: any) => de_CatalogImportStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResumeWorkflowRunResponse + * deserializeAws_json1_1GetClassifierResponse */ -const de_ResumeWorkflowRunResponse = (output: any, context: __SerdeContext): ResumeWorkflowRunResponse => { - return { - NodeIds: output.NodeIds != null ? de_NodeIdList(output.NodeIds, context) : undefined, - RunId: __expectString(output.RunId), - } as any; +const de_GetClassifierResponse = (output: any, context: __SerdeContext): GetClassifierResponse => { + return take(output, { + Classifier: (_: any) => de_Classifier(_, context), + }) as any; }; /** - * deserializeAws_json1_1RulesetNames + * deserializeAws_json1_1GetClassifiersResponse */ -const de_RulesetNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetClassifiersResponse = (output: any, context: __SerdeContext): GetClassifiersResponse => { + return take(output, { + Classifiers: (_: any) => de_ClassifierList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RunStatementResponse + * deserializeAws_json1_1GetColumnStatisticsForPartitionResponse */ -const de_RunStatementResponse = (output: any, context: __SerdeContext): RunStatementResponse => { - return { - Id: __expectInt32(output.Id), - } as any; +const de_GetColumnStatisticsForPartitionResponse = ( + output: any, + context: __SerdeContext +): GetColumnStatisticsForPartitionResponse => { + return take(output, { + ColumnStatisticsList: (_: any) => de_ColumnStatisticsList(_, context), + Errors: _json, + }) as any; }; /** - * deserializeAws_json1_1S3CatalogDeltaSource + * deserializeAws_json1_1GetColumnStatisticsForTableResponse */ -const de_S3CatalogDeltaSource = (output: any, context: __SerdeContext): S3CatalogDeltaSource => { - return { - AdditionalDeltaOptions: - output.AdditionalDeltaOptions != null ? de_AdditionalOptions(output.AdditionalDeltaOptions, context) : undefined, - Database: __expectString(output.Database), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Table: __expectString(output.Table), - } as any; +const de_GetColumnStatisticsForTableResponse = ( + output: any, + context: __SerdeContext +): GetColumnStatisticsForTableResponse => { + return take(output, { + ColumnStatisticsList: (_: any) => de_ColumnStatisticsList(_, context), + Errors: _json, + }) as any; }; /** - * deserializeAws_json1_1S3CatalogHudiSource + * deserializeAws_json1_1GetConnectionResponse */ -const de_S3CatalogHudiSource = (output: any, context: __SerdeContext): S3CatalogHudiSource => { - return { - AdditionalHudiOptions: - output.AdditionalHudiOptions != null ? de_AdditionalOptions(output.AdditionalHudiOptions, context) : undefined, - Database: __expectString(output.Database), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Table: __expectString(output.Table), - } as any; +const de_GetConnectionResponse = (output: any, context: __SerdeContext): GetConnectionResponse => { + return take(output, { + Connection: (_: any) => de_Connection(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3CatalogSource + * deserializeAws_json1_1GetConnectionsResponse */ -const de_S3CatalogSource = (output: any, context: __SerdeContext): S3CatalogSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_S3SourceAdditionalOptions(output.AdditionalOptions, context) : undefined, - Database: __expectString(output.Database), - Name: __expectString(output.Name), - PartitionPredicate: __expectString(output.PartitionPredicate), - Table: __expectString(output.Table), - } as any; +const de_GetConnectionsResponse = (output: any, context: __SerdeContext): GetConnectionsResponse => { + return take(output, { + ConnectionList: (_: any) => de_ConnectionList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1S3CatalogTarget + * deserializeAws_json1_1GetCrawlerMetricsResponse */ -const de_S3CatalogTarget = (output: any, context: __SerdeContext): S3CatalogTarget => { - return { - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_CatalogSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - Table: __expectString(output.Table), - } as any; +const de_GetCrawlerMetricsResponse = (output: any, context: __SerdeContext): GetCrawlerMetricsResponse => { + return take(output, { + CrawlerMetricsList: (_: any) => de_CrawlerMetricsList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1S3CsvSource + * deserializeAws_json1_1GetCrawlerResponse */ -const de_S3CsvSource = (output: any, context: __SerdeContext): S3CsvSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null - ? de_S3DirectSourceAdditionalOptions(output.AdditionalOptions, context) - : undefined, - CompressionType: __expectString(output.CompressionType), - Escaper: __expectString(output.Escaper), - Exclusions: output.Exclusions != null ? de_EnclosedInStringProperties(output.Exclusions, context) : undefined, - GroupFiles: __expectString(output.GroupFiles), - GroupSize: __expectString(output.GroupSize), - MaxBand: __expectInt32(output.MaxBand), - MaxFilesInBand: __expectInt32(output.MaxFilesInBand), - Multiline: __expectBoolean(output.Multiline), - Name: __expectString(output.Name), - OptimizePerformance: __expectBoolean(output.OptimizePerformance), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Paths: output.Paths != null ? de_EnclosedInStringProperties(output.Paths, context) : undefined, - QuoteChar: __expectString(output.QuoteChar), - Recurse: __expectBoolean(output.Recurse), - Separator: __expectString(output.Separator), - SkipFirst: __expectBoolean(output.SkipFirst), - WithHeader: __expectBoolean(output.WithHeader), - WriteHeader: __expectBoolean(output.WriteHeader), - } as any; -}; - -/** - * deserializeAws_json1_1S3DeltaCatalogTarget - */ -const de_S3DeltaCatalogTarget = (output: any, context: __SerdeContext): S3DeltaCatalogTarget => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_CatalogSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - Table: __expectString(output.Table), - } as any; +const de_GetCrawlerResponse = (output: any, context: __SerdeContext): GetCrawlerResponse => { + return take(output, { + Crawler: (_: any) => de_Crawler(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3DeltaDirectTarget + * deserializeAws_json1_1GetCrawlersResponse */ -const de_S3DeltaDirectTarget = (output: any, context: __SerdeContext): S3DeltaDirectTarget => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - Compression: __expectString(output.Compression), - Format: __expectString(output.Format), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - Path: __expectString(output.Path), - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_DirectSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - } as any; +const de_GetCrawlersResponse = (output: any, context: __SerdeContext): GetCrawlersResponse => { + return take(output, { + Crawlers: (_: any) => de_CrawlerList(_, context), + NextToken: __expectString, + }) as any; }; +// de_GetCustomEntityTypeResponse omitted. + /** - * deserializeAws_json1_1S3DeltaSource + * deserializeAws_json1_1GetDatabaseResponse */ -const de_S3DeltaSource = (output: any, context: __SerdeContext): S3DeltaSource => { - return { - AdditionalDeltaOptions: - output.AdditionalDeltaOptions != null ? de_AdditionalOptions(output.AdditionalDeltaOptions, context) : undefined, - AdditionalOptions: - output.AdditionalOptions != null - ? de_S3DirectSourceAdditionalOptions(output.AdditionalOptions, context) - : undefined, - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Paths: output.Paths != null ? de_EnclosedInStringProperties(output.Paths, context) : undefined, - } as any; +const de_GetDatabaseResponse = (output: any, context: __SerdeContext): GetDatabaseResponse => { + return take(output, { + Database: (_: any) => de_Database(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3DirectSourceAdditionalOptions + * deserializeAws_json1_1GetDatabasesResponse */ -const de_S3DirectSourceAdditionalOptions = (output: any, context: __SerdeContext): S3DirectSourceAdditionalOptions => { - return { - BoundedFiles: __expectLong(output.BoundedFiles), - BoundedSize: __expectLong(output.BoundedSize), - EnableSamplePath: __expectBoolean(output.EnableSamplePath), - SamplePath: __expectString(output.SamplePath), - } as any; +const de_GetDatabasesResponse = (output: any, context: __SerdeContext): GetDatabasesResponse => { + return take(output, { + DatabaseList: (_: any) => de_DatabaseList(_, context), + NextToken: __expectString, + }) as any; }; +// de_GetDataCatalogEncryptionSettingsResponse omitted. + +// de_GetDataflowGraphResponse omitted. + /** - * deserializeAws_json1_1S3DirectTarget + * deserializeAws_json1_1GetDataQualityResultResponse */ -const de_S3DirectTarget = (output: any, context: __SerdeContext): S3DirectTarget => { - return { - Compression: __expectString(output.Compression), - Format: __expectString(output.Format), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - Path: __expectString(output.Path), - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_DirectSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - } as any; +const de_GetDataQualityResultResponse = (output: any, context: __SerdeContext): GetDataQualityResultResponse => { + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSource: _json, + EvaluationContext: __expectString, + JobName: __expectString, + JobRunId: __expectString, + ResultId: __expectString, + RuleResults: _json, + RulesetEvaluationRunId: __expectString, + RulesetName: __expectString, + Score: __limitedParseDouble, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1S3Encryption + * deserializeAws_json1_1GetDataQualityRuleRecommendationRunResponse */ -const de_S3Encryption = (output: any, context: __SerdeContext): S3Encryption => { - return { - KmsKeyArn: __expectString(output.KmsKeyArn), - S3EncryptionMode: __expectString(output.S3EncryptionMode), - } as any; +const de_GetDataQualityRuleRecommendationRunResponse = ( + output: any, + context: __SerdeContext +): GetDataQualityRuleRecommendationRunResponse => { + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedRulesetName: __expectString, + DataSource: _json, + ErrorString: __expectString, + ExecutionTime: __expectInt32, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfWorkers: __expectInt32, + RecommendedRuleset: __expectString, + Role: __expectString, + RunId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Timeout: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1S3EncryptionList + * deserializeAws_json1_1GetDataQualityRulesetEvaluationRunResponse */ -const de_S3EncryptionList = (output: any, context: __SerdeContext): S3Encryption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3Encryption(entry, context); - }); - return retVal; +const de_GetDataQualityRulesetEvaluationRunResponse = ( + output: any, + context: __SerdeContext +): GetDataQualityRulesetEvaluationRunResponse => { + return take(output, { + AdditionalRunOptions: _json, + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSource: _json, + ErrorString: __expectString, + ExecutionTime: __expectInt32, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfWorkers: __expectInt32, + ResultIds: _json, + Role: __expectString, + RulesetNames: _json, + RunId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Timeout: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1S3GlueParquetTarget + * deserializeAws_json1_1GetDataQualityRulesetResponse */ -const de_S3GlueParquetTarget = (output: any, context: __SerdeContext): S3GlueParquetTarget => { - return { - Compression: __expectString(output.Compression), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - Path: __expectString(output.Path), - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_DirectSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - } as any; +const de_GetDataQualityRulesetResponse = (output: any, context: __SerdeContext): GetDataQualityRulesetResponse => { + return take(output, { + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RecommendationRunId: __expectString, + Ruleset: __expectString, + TargetTable: _json, + }) as any; }; /** - * deserializeAws_json1_1S3HudiCatalogTarget + * deserializeAws_json1_1GetDevEndpointResponse */ -const de_S3HudiCatalogTarget = (output: any, context: __SerdeContext): S3HudiCatalogTarget => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - Database: __expectString(output.Database), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_CatalogSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - Table: __expectString(output.Table), - } as any; +const de_GetDevEndpointResponse = (output: any, context: __SerdeContext): GetDevEndpointResponse => { + return take(output, { + DevEndpoint: (_: any) => de_DevEndpoint(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3HudiDirectTarget + * deserializeAws_json1_1GetDevEndpointsResponse */ -const de_S3HudiDirectTarget = (output: any, context: __SerdeContext): S3HudiDirectTarget => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - Compression: __expectString(output.Compression), - Format: __expectString(output.Format), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - PartitionKeys: output.PartitionKeys != null ? de_GlueStudioPathList(output.PartitionKeys, context) : undefined, - Path: __expectString(output.Path), - SchemaChangePolicy: - output.SchemaChangePolicy != null ? de_DirectSchemaChangePolicy(output.SchemaChangePolicy, context) : undefined, - } as any; +const de_GetDevEndpointsResponse = (output: any, context: __SerdeContext): GetDevEndpointsResponse => { + return take(output, { + DevEndpoints: (_: any) => de_DevEndpointList(_, context), + NextToken: __expectString, + }) as any; }; +// de_GetJobBookmarkResponse omitted. + /** - * deserializeAws_json1_1S3HudiSource + * deserializeAws_json1_1GetJobResponse */ -const de_S3HudiSource = (output: any, context: __SerdeContext): S3HudiSource => { - return { - AdditionalHudiOptions: - output.AdditionalHudiOptions != null ? de_AdditionalOptions(output.AdditionalHudiOptions, context) : undefined, - AdditionalOptions: - output.AdditionalOptions != null - ? de_S3DirectSourceAdditionalOptions(output.AdditionalOptions, context) - : undefined, - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Paths: output.Paths != null ? de_EnclosedInStringProperties(output.Paths, context) : undefined, - } as any; +const de_GetJobResponse = (output: any, context: __SerdeContext): GetJobResponse => { + return take(output, { + Job: (_: any) => de_Job(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3JsonSource + * deserializeAws_json1_1GetJobRunResponse */ -const de_S3JsonSource = (output: any, context: __SerdeContext): S3JsonSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null - ? de_S3DirectSourceAdditionalOptions(output.AdditionalOptions, context) - : undefined, - CompressionType: __expectString(output.CompressionType), - Exclusions: output.Exclusions != null ? de_EnclosedInStringProperties(output.Exclusions, context) : undefined, - GroupFiles: __expectString(output.GroupFiles), - GroupSize: __expectString(output.GroupSize), - JsonPath: __expectString(output.JsonPath), - MaxBand: __expectInt32(output.MaxBand), - MaxFilesInBand: __expectInt32(output.MaxFilesInBand), - Multiline: __expectBoolean(output.Multiline), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Paths: output.Paths != null ? de_EnclosedInStringProperties(output.Paths, context) : undefined, - Recurse: __expectBoolean(output.Recurse), - } as any; -}; - -/** - * deserializeAws_json1_1S3ParquetSource - */ -const de_S3ParquetSource = (output: any, context: __SerdeContext): S3ParquetSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null - ? de_S3DirectSourceAdditionalOptions(output.AdditionalOptions, context) - : undefined, - CompressionType: __expectString(output.CompressionType), - Exclusions: output.Exclusions != null ? de_EnclosedInStringProperties(output.Exclusions, context) : undefined, - GroupFiles: __expectString(output.GroupFiles), - GroupSize: __expectString(output.GroupSize), - MaxBand: __expectInt32(output.MaxBand), - MaxFilesInBand: __expectInt32(output.MaxFilesInBand), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - Paths: output.Paths != null ? de_EnclosedInStringProperties(output.Paths, context) : undefined, - Recurse: __expectBoolean(output.Recurse), - } as any; -}; - -/** - * deserializeAws_json1_1S3SourceAdditionalOptions - */ -const de_S3SourceAdditionalOptions = (output: any, context: __SerdeContext): S3SourceAdditionalOptions => { - return { - BoundedFiles: __expectLong(output.BoundedFiles), - BoundedSize: __expectLong(output.BoundedSize), - } as any; +const de_GetJobRunResponse = (output: any, context: __SerdeContext): GetJobRunResponse => { + return take(output, { + JobRun: (_: any) => de_JobRun(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3Target + * deserializeAws_json1_1GetJobRunsResponse */ -const de_S3Target = (output: any, context: __SerdeContext): S3Target => { - return { - ConnectionName: __expectString(output.ConnectionName), - DlqEventQueueArn: __expectString(output.DlqEventQueueArn), - EventQueueArn: __expectString(output.EventQueueArn), - Exclusions: output.Exclusions != null ? de_PathList(output.Exclusions, context) : undefined, - Path: __expectString(output.Path), - SampleSize: __expectInt32(output.SampleSize), - } as any; +const de_GetJobRunsResponse = (output: any, context: __SerdeContext): GetJobRunsResponse => { + return take(output, { + JobRuns: (_: any) => de_JobRunList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1S3TargetList + * deserializeAws_json1_1GetJobsResponse */ -const de_S3TargetList = (output: any, context: __SerdeContext): S3Target[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3Target(entry, context); - }); - return retVal; +const de_GetJobsResponse = (output: any, context: __SerdeContext): GetJobsResponse => { + return take(output, { + Jobs: (_: any) => de_JobList(_, context), + NextToken: __expectString, + }) as any; }; +// de_GetMappingResponse omitted. + /** - * deserializeAws_json1_1Schedule + * deserializeAws_json1_1GetMLTaskRunResponse */ -const de_Schedule = (output: any, context: __SerdeContext): Schedule => { - return { - ScheduleExpression: __expectString(output.ScheduleExpression), - State: __expectString(output.State), - } as any; +const de_GetMLTaskRunResponse = (output: any, context: __SerdeContext): GetMLTaskRunResponse => { + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorString: __expectString, + ExecutionTime: __expectInt32, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogGroupName: __expectString, + Properties: _json, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TaskRunId: __expectString, + TransformId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SchedulerNotRunningException + * deserializeAws_json1_1GetMLTaskRunsResponse */ -const de_SchedulerNotRunningException = (output: any, context: __SerdeContext): SchedulerNotRunningException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetMLTaskRunsResponse = (output: any, context: __SerdeContext): GetMLTaskRunsResponse => { + return take(output, { + NextToken: __expectString, + TaskRuns: (_: any) => de_TaskRunList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SchedulerRunningException + * deserializeAws_json1_1GetMLTransformResponse */ -const de_SchedulerRunningException = (output: any, context: __SerdeContext): SchedulerRunningException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetMLTransformResponse = (output: any, context: __SerdeContext): GetMLTransformResponse => { + return take(output, { + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EvaluationMetrics: (_: any) => de_EvaluationMetrics(_, context), + GlueVersion: __expectString, + InputRecordTables: _json, + LabelCount: __expectInt32, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxCapacity: __limitedParseDouble, + MaxRetries: __expectInt32, + Name: __expectString, + NumberOfWorkers: __expectInt32, + Parameters: (_: any) => de_TransformParameters(_, context), + Role: __expectString, + Schema: _json, + Status: __expectString, + Timeout: __expectInt32, + TransformEncryption: _json, + TransformId: __expectString, + WorkerType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SchedulerTransitioningException + * deserializeAws_json1_1GetMLTransformsResponse */ -const de_SchedulerTransitioningException = (output: any, context: __SerdeContext): SchedulerTransitioningException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetMLTransformsResponse = (output: any, context: __SerdeContext): GetMLTransformsResponse => { + return take(output, { + NextToken: __expectString, + Transforms: (_: any) => de_TransformList(_, context), + }) as any; }; +// de_GetPartitionIndexesResponse omitted. + /** - * deserializeAws_json1_1SchemaChangePolicy + * deserializeAws_json1_1GetPartitionResponse */ -const de_SchemaChangePolicy = (output: any, context: __SerdeContext): SchemaChangePolicy => { - return { - DeleteBehavior: __expectString(output.DeleteBehavior), - UpdateBehavior: __expectString(output.UpdateBehavior), - } as any; +const de_GetPartitionResponse = (output: any, context: __SerdeContext): GetPartitionResponse => { + return take(output, { + Partition: (_: any) => de_Partition(_, context), + }) as any; }; /** - * deserializeAws_json1_1SchemaColumn + * deserializeAws_json1_1GetPartitionsResponse */ -const de_SchemaColumn = (output: any, context: __SerdeContext): SchemaColumn => { - return { - DataType: __expectString(output.DataType), - Name: __expectString(output.Name), - } as any; +const de_GetPartitionsResponse = (output: any, context: __SerdeContext): GetPartitionsResponse => { + return take(output, { + NextToken: __expectString, + Partitions: (_: any) => de_PartitionList(_, context), + }) as any; }; +// de_GetPlanResponse omitted. + +// de_GetRegistryResponse omitted. + /** - * deserializeAws_json1_1SchemaId + * deserializeAws_json1_1GetResourcePoliciesResponse */ -const de_SchemaId = (output: any, context: __SerdeContext): SchemaId => { - return { - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - } as any; +const de_GetResourcePoliciesResponse = (output: any, context: __SerdeContext): GetResourcePoliciesResponse => { + return take(output, { + GetResourcePoliciesResponseList: (_: any) => de_GetResourcePoliciesResponseList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SchemaListDefinition + * deserializeAws_json1_1GetResourcePoliciesResponseList */ -const de_SchemaListDefinition = (output: any, context: __SerdeContext): SchemaListItem[] => { +const de_GetResourcePoliciesResponseList = (output: any, context: __SerdeContext): GluePolicy[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaListItem(entry, context); + return de_GluePolicy(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SchemaListItem + * deserializeAws_json1_1GetResourcePolicyResponse */ -const de_SchemaListItem = (output: any, context: __SerdeContext): SchemaListItem => { - return { - CreatedTime: __expectString(output.CreatedTime), - Description: __expectString(output.Description), - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - SchemaStatus: __expectString(output.SchemaStatus), - UpdatedTime: __expectString(output.UpdatedTime), - } as any; +const de_GetResourcePolicyResponse = (output: any, context: __SerdeContext): GetResourcePolicyResponse => { + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyHash: __expectString, + PolicyInJson: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_GetSchemaByDefinitionResponse omitted. + +// de_GetSchemaResponse omitted. + +// de_GetSchemaVersionResponse omitted. + +// de_GetSchemaVersionsDiffResponse omitted. + /** - * deserializeAws_json1_1SchemaReference + * deserializeAws_json1_1GetSecurityConfigurationResponse */ -const de_SchemaReference = (output: any, context: __SerdeContext): SchemaReference => { - return { - SchemaId: output.SchemaId != null ? de_SchemaId(output.SchemaId, context) : undefined, - SchemaVersionId: __expectString(output.SchemaVersionId), - SchemaVersionNumber: __expectLong(output.SchemaVersionNumber), - } as any; +const de_GetSecurityConfigurationResponse = ( + output: any, + context: __SerdeContext +): GetSecurityConfigurationResponse => { + return take(output, { + SecurityConfiguration: (_: any) => de_SecurityConfiguration(_, context), + }) as any; }; /** - * deserializeAws_json1_1SchemaVersionErrorItem + * deserializeAws_json1_1GetSecurityConfigurationsResponse */ -const de_SchemaVersionErrorItem = (output: any, context: __SerdeContext): SchemaVersionErrorItem => { - return { - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined, - VersionNumber: __expectLong(output.VersionNumber), - } as any; +const de_GetSecurityConfigurationsResponse = ( + output: any, + context: __SerdeContext +): GetSecurityConfigurationsResponse => { + return take(output, { + NextToken: __expectString, + SecurityConfigurations: (_: any) => de_SecurityConfigurationList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SchemaVersionErrorList + * deserializeAws_json1_1GetSessionResponse */ -const de_SchemaVersionErrorList = (output: any, context: __SerdeContext): SchemaVersionErrorItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaVersionErrorItem(entry, context); - }); - return retVal; +const de_GetSessionResponse = (output: any, context: __SerdeContext): GetSessionResponse => { + return take(output, { + Session: (_: any) => de_Session(_, context), + }) as any; }; /** - * deserializeAws_json1_1SchemaVersionList + * deserializeAws_json1_1GetStatementResponse */ -const de_SchemaVersionList = (output: any, context: __SerdeContext): SchemaVersionListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaVersionListItem(entry, context); - }); - return retVal; +const de_GetStatementResponse = (output: any, context: __SerdeContext): GetStatementResponse => { + return take(output, { + Statement: (_: any) => de_Statement(_, context), + }) as any; }; /** - * deserializeAws_json1_1SchemaVersionListItem + * deserializeAws_json1_1GetTableResponse */ -const de_SchemaVersionListItem = (output: any, context: __SerdeContext): SchemaVersionListItem => { - return { - CreatedTime: __expectString(output.CreatedTime), - SchemaArn: __expectString(output.SchemaArn), - SchemaVersionId: __expectString(output.SchemaVersionId), - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; +const de_GetTableResponse = (output: any, context: __SerdeContext): GetTableResponse => { + return take(output, { + Table: (_: any) => de_Table(_, context), + }) as any; }; /** - * deserializeAws_json1_1SearchTablesResponse + * deserializeAws_json1_1GetTablesResponse */ -const de_SearchTablesResponse = (output: any, context: __SerdeContext): SearchTablesResponse => { - return { - NextToken: __expectString(output.NextToken), - TableList: output.TableList != null ? de_TableList(output.TableList, context) : undefined, - } as any; +const de_GetTablesResponse = (output: any, context: __SerdeContext): GetTablesResponse => { + return take(output, { + NextToken: __expectString, + TableList: (_: any) => de_TableList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SecurityConfiguration + * deserializeAws_json1_1GetTableVersionResponse */ -const de_SecurityConfiguration = (output: any, context: __SerdeContext): SecurityConfiguration => { - return { - CreatedTimeStamp: - output.CreatedTimeStamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimeStamp))) - : undefined, - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - Name: __expectString(output.Name), - } as any; +const de_GetTableVersionResponse = (output: any, context: __SerdeContext): GetTableVersionResponse => { + return take(output, { + TableVersion: (_: any) => de_TableVersion(_, context), + }) as any; }; /** - * deserializeAws_json1_1SecurityConfigurationList + * deserializeAws_json1_1GetTableVersionsList */ -const de_SecurityConfigurationList = (output: any, context: __SerdeContext): SecurityConfiguration[] => { +const de_GetTableVersionsList = (output: any, context: __SerdeContext): TableVersion[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityConfiguration(entry, context); + return de_TableVersion(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SecurityGroupIdList + * deserializeAws_json1_1GetTableVersionsResponse */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetTableVersionsResponse = (output: any, context: __SerdeContext): GetTableVersionsResponse => { + return take(output, { + NextToken: __expectString, + TableVersions: (_: any) => de_GetTableVersionsList(_, context), + }) as any; }; +// de_GetTagsResponse omitted. + +// de_GetTriggerResponse omitted. + +// de_GetTriggersResponse omitted. + /** - * deserializeAws_json1_1SelectFields + * deserializeAws_json1_1GetUnfilteredPartitionMetadataResponse */ -const de_SelectFields = (output: any, context: __SerdeContext): SelectFields => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Paths: output.Paths != null ? de_GlueStudioPathList(output.Paths, context) : undefined, - } as any; +const de_GetUnfilteredPartitionMetadataResponse = ( + output: any, + context: __SerdeContext +): GetUnfilteredPartitionMetadataResponse => { + return take(output, { + AuthorizedColumns: _json, + IsRegisteredWithLakeFormation: __expectBoolean, + Partition: (_: any) => de_Partition(_, context), + }) as any; }; /** - * deserializeAws_json1_1SelectFromCollection + * deserializeAws_json1_1GetUnfilteredPartitionsMetadataResponse */ -const de_SelectFromCollection = (output: any, context: __SerdeContext): SelectFromCollection => { - return { - Index: __expectInt32(output.Index), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - } as any; +const de_GetUnfilteredPartitionsMetadataResponse = ( + output: any, + context: __SerdeContext +): GetUnfilteredPartitionsMetadataResponse => { + return take(output, { + NextToken: __expectString, + UnfilteredPartitions: (_: any) => de_UnfilteredPartitionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SerDeInfo + * deserializeAws_json1_1GetUnfilteredTableMetadataResponse */ -const de_SerDeInfo = (output: any, context: __SerdeContext): SerDeInfo => { - return { - Name: __expectString(output.Name), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - SerializationLibrary: __expectString(output.SerializationLibrary), - } as any; +const de_GetUnfilteredTableMetadataResponse = ( + output: any, + context: __SerdeContext +): GetUnfilteredTableMetadataResponse => { + return take(output, { + AuthorizedColumns: _json, + CellFilters: _json, + IsRegisteredWithLakeFormation: __expectBoolean, + Table: (_: any) => de_Table(_, context), + }) as any; }; /** - * deserializeAws_json1_1Session + * deserializeAws_json1_1GetUserDefinedFunctionResponse */ -const de_Session = (output: any, context: __SerdeContext): Session => { - return { - Command: output.Command != null ? de_SessionCommand(output.Command, context) : undefined, - Connections: output.Connections != null ? de_ConnectionsList(output.Connections, context) : undefined, - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - DefaultArguments: - output.DefaultArguments != null ? de_OrchestrationArgumentsMap(output.DefaultArguments, context) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - GlueVersion: __expectString(output.GlueVersion), - Id: __expectString(output.Id), - MaxCapacity: __limitedParseDouble(output.MaxCapacity), - Progress: __limitedParseDouble(output.Progress), - Role: __expectString(output.Role), - SecurityConfiguration: __expectString(output.SecurityConfiguration), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1SessionCommand - */ -const de_SessionCommand = (output: any, context: __SerdeContext): SessionCommand => { - return { - Name: __expectString(output.Name), - PythonVersion: __expectString(output.PythonVersion), - } as any; +const de_GetUserDefinedFunctionResponse = (output: any, context: __SerdeContext): GetUserDefinedFunctionResponse => { + return take(output, { + UserDefinedFunction: (_: any) => de_UserDefinedFunction(_, context), + }) as any; }; /** - * deserializeAws_json1_1SessionIdList + * deserializeAws_json1_1GetUserDefinedFunctionsResponse */ -const de_SessionIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetUserDefinedFunctionsResponse = (output: any, context: __SerdeContext): GetUserDefinedFunctionsResponse => { + return take(output, { + NextToken: __expectString, + UserDefinedFunctions: (_: any) => de_UserDefinedFunctionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SessionList + * deserializeAws_json1_1GetWorkflowResponse */ -const de_SessionList = (output: any, context: __SerdeContext): Session[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Session(entry, context); - }); - return retVal; +const de_GetWorkflowResponse = (output: any, context: __SerdeContext): GetWorkflowResponse => { + return take(output, { + Workflow: (_: any) => de_Workflow(_, context), + }) as any; }; +// de_GetWorkflowRunPropertiesResponse omitted. + /** - * deserializeAws_json1_1SkewedInfo + * deserializeAws_json1_1GetWorkflowRunResponse */ -const de_SkewedInfo = (output: any, context: __SerdeContext): SkewedInfo => { - return { - SkewedColumnNames: - output.SkewedColumnNames != null ? de_NameStringList(output.SkewedColumnNames, context) : undefined, - SkewedColumnValueLocationMaps: - output.SkewedColumnValueLocationMaps != null - ? de_LocationMap(output.SkewedColumnValueLocationMaps, context) - : undefined, - SkewedColumnValues: - output.SkewedColumnValues != null ? de_ColumnValueStringList(output.SkewedColumnValues, context) : undefined, - } as any; +const de_GetWorkflowRunResponse = (output: any, context: __SerdeContext): GetWorkflowRunResponse => { + return take(output, { + Run: (_: any) => de_WorkflowRun(_, context), + }) as any; }; /** - * deserializeAws_json1_1SourceControlDetails + * deserializeAws_json1_1GetWorkflowRunsResponse */ -const de_SourceControlDetails = (output: any, context: __SerdeContext): SourceControlDetails => { - return { - AuthStrategy: __expectString(output.AuthStrategy), - AuthToken: __expectString(output.AuthToken), - Branch: __expectString(output.Branch), - Folder: __expectString(output.Folder), - LastCommitId: __expectString(output.LastCommitId), - Owner: __expectString(output.Owner), - Provider: __expectString(output.Provider), - Repository: __expectString(output.Repository), - } as any; +const de_GetWorkflowRunsResponse = (output: any, context: __SerdeContext): GetWorkflowRunsResponse => { + return take(output, { + NextToken: __expectString, + Runs: (_: any) => de_WorkflowRuns(_, context), + }) as any; }; +// de_GlueEncryptionException omitted. + /** - * deserializeAws_json1_1SparkConnectorSource + * deserializeAws_json1_1GluePolicy */ -const de_SparkConnectorSource = (output: any, context: __SerdeContext): SparkConnectorSource => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - ConnectionName: __expectString(output.ConnectionName), - ConnectionType: __expectString(output.ConnectionType), - ConnectorName: __expectString(output.ConnectorName), - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - } as any; +const de_GluePolicy = (output: any, context: __SerdeContext): GluePolicy => { + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyHash: __expectString, + PolicyInJson: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_GlueSchema omitted. + +// de_GlueSchemas omitted. + +// de_GlueStudioPathList omitted. + +// de_GlueStudioSchemaColumn omitted. + +// de_GlueStudioSchemaColumnList omitted. + +// de_GlueTable omitted. + +// de_GlueTableAdditionalOptions omitted. + +// de_GlueTables omitted. + +// de_GovernedCatalogSource omitted. + +// de_GovernedCatalogTarget omitted. + /** - * deserializeAws_json1_1SparkConnectorTarget + * deserializeAws_json1_1GrokClassifier */ -const de_SparkConnectorTarget = (output: any, context: __SerdeContext): SparkConnectorTarget => { - return { - AdditionalOptions: - output.AdditionalOptions != null ? de_AdditionalOptions(output.AdditionalOptions, context) : undefined, - ConnectionName: __expectString(output.ConnectionName), - ConnectionType: __expectString(output.ConnectionType), - ConnectorName: __expectString(output.ConnectorName), - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - } as any; +const de_GrokClassifier = (output: any, context: __SerdeContext): GrokClassifier => { + return take(output, { + Classification: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomPatterns: __expectString, + GrokPattern: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Version: __expectLong, + }) as any; }; +// de_IdempotentParameterMismatchException omitted. + +// de_IllegalBlueprintStateException omitted. + +// de_IllegalSessionStateException omitted. + +// de_IllegalWorkflowStateException omitted. + +// de_ImportCatalogToGlueResponse omitted. + +// de_ImportLabelsTaskRunProperties omitted. + +// de_InternalServiceException omitted. + +// de_InvalidInputException omitted. + +// de_InvalidStateException omitted. + +// de_JDBCConnectorOptions omitted. + +// de_JDBCConnectorSource omitted. + +// de_JDBCConnectorTarget omitted. + +// de_JDBCDataTypeMapping omitted. + +// de_JdbcTarget omitted. + +// de_JdbcTargetList omitted. + /** - * deserializeAws_json1_1SparkSQL + * deserializeAws_json1_1Job */ -const de_SparkSQL = (output: any, context: __SerdeContext): SparkSQL => { - return { - Inputs: output.Inputs != null ? de_ManyInputs(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - OutputSchemas: output.OutputSchemas != null ? de_GlueSchemas(output.OutputSchemas, context) : undefined, - SqlAliases: output.SqlAliases != null ? de_SqlAliases(output.SqlAliases, context) : undefined, - SqlQuery: __expectString(output.SqlQuery), - } as any; -}; +const de_Job = (output: any, context: __SerdeContext): Job => { + return take(output, { + AllocatedCapacity: __expectInt32, + CodeGenConfigurationNodes: (_: any) => de_CodeGenConfigurationNodes(_, context), + Command: _json, + Connections: _json, + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultArguments: _json, + Description: __expectString, + ExecutionClass: __expectString, + ExecutionProperty: _json, + GlueVersion: __expectString, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogUri: __expectString, + MaxCapacity: __limitedParseDouble, + MaxRetries: __expectInt32, + Name: __expectString, + NonOverridableArguments: _json, + NotificationProperty: _json, + NumberOfWorkers: __expectInt32, + Role: __expectString, + SecurityConfiguration: __expectString, + SourceControlDetails: _json, + Timeout: __expectInt32, + WorkerType: __expectString, + }) as any; +}; + +// de_JobBookmarkEntry omitted. + +// de_JobBookmarksEncryption omitted. + +// de_JobCommand omitted. /** - * deserializeAws_json1_1Spigot + * deserializeAws_json1_1JobList */ -const de_Spigot = (output: any, context: __SerdeContext): Spigot => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Path: __expectString(output.Path), - Prob: __limitedParseDouble(output.Prob), - Topk: __expectInt32(output.Topk), - } as any; +const de_JobList = (output: any, context: __SerdeContext): Job[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Job(entry, context); + }); + return retVal; }; +// de_JobNameList omitted. + /** - * deserializeAws_json1_1SplitFields + * deserializeAws_json1_1JobNodeDetails */ -const de_SplitFields = (output: any, context: __SerdeContext): SplitFields => { - return { - Inputs: output.Inputs != null ? de_OneInput(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - Paths: output.Paths != null ? de_GlueStudioPathList(output.Paths, context) : undefined, - } as any; +const de_JobNodeDetails = (output: any, context: __SerdeContext): JobNodeDetails => { + return take(output, { + JobRuns: (_: any) => de_JobRunList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SqlAlias + * deserializeAws_json1_1JobRun */ -const de_SqlAlias = (output: any, context: __SerdeContext): SqlAlias => { - return { - Alias: __expectString(output.Alias), - From: __expectString(output.From), - } as any; +const de_JobRun = (output: any, context: __SerdeContext): JobRun => { + return take(output, { + AllocatedCapacity: __expectInt32, + Arguments: _json, + Attempt: __expectInt32, + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DPUSeconds: __limitedParseDouble, + ErrorMessage: __expectString, + ExecutionClass: __expectString, + ExecutionTime: __expectInt32, + GlueVersion: __expectString, + Id: __expectString, + JobName: __expectString, + JobRunState: __expectString, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogGroupName: __expectString, + MaxCapacity: __limitedParseDouble, + NotificationProperty: _json, + NumberOfWorkers: __expectInt32, + PredecessorRuns: _json, + PreviousRunId: __expectString, + SecurityConfiguration: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Timeout: __expectInt32, + TriggerName: __expectString, + WorkerType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SqlAliases + * deserializeAws_json1_1JobRunList */ -const de_SqlAliases = (output: any, context: __SerdeContext): SqlAlias[] => { +const de_JobRunList = (output: any, context: __SerdeContext): JobRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SqlAlias(entry, context); + return de_JobRun(entry, context); }); return retVal; }; +// de_Join omitted. + +// de_JoinColumn omitted. + +// de_JoinColumns omitted. + +/** + * deserializeAws_json1_1JsonClassifier + */ +const de_JsonClassifier = (output: any, context: __SerdeContext): JsonClassifier => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JsonPath: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Version: __expectLong, + }) as any; +}; + +// de_KafkaStreamingSourceOptions omitted. + +// de_KeySchemaElement omitted. + +// de_KeySchemaElementList omitted. + +// de_KinesisStreamingSourceOptions omitted. + +// de_LabelingSetGenerationTaskRunProperties omitted. + +// de_LakeFormationConfiguration omitted. + +/** + * deserializeAws_json1_1LastActiveDefinition + */ +const de_LastActiveDefinition = (output: any, context: __SerdeContext): LastActiveDefinition => { + return take(output, { + BlueprintLocation: __expectString, + BlueprintServiceLocation: __expectString, + Description: __expectString, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParameterSpec: __expectString, + }) as any; +}; + /** - * deserializeAws_json1_1StartBlueprintRunResponse + * deserializeAws_json1_1LastCrawlInfo */ -const de_StartBlueprintRunResponse = (output: any, context: __SerdeContext): StartBlueprintRunResponse => { - return { - RunId: __expectString(output.RunId), - } as any; +const de_LastCrawlInfo = (output: any, context: __SerdeContext): LastCrawlInfo => { + return take(output, { + ErrorMessage: __expectString, + LogGroup: __expectString, + LogStream: __expectString, + MessagePrefix: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; +// de_LimitedPathList omitted. + +// de_LimitedStringList omitted. + +// de_LineageConfiguration omitted. + +// de_ListBlueprintsResponse omitted. + +// de_ListCrawlersResponse omitted. + /** - * deserializeAws_json1_1StartCrawlerResponse + * deserializeAws_json1_1ListCrawlsResponse */ -const de_StartCrawlerResponse = (output: any, context: __SerdeContext): StartCrawlerResponse => { - return {} as any; +const de_ListCrawlsResponse = (output: any, context: __SerdeContext): ListCrawlsResponse => { + return take(output, { + Crawls: (_: any) => de_CrawlerHistoryList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListCustomEntityTypesResponse omitted. + /** - * deserializeAws_json1_1StartCrawlerScheduleResponse + * deserializeAws_json1_1ListDataQualityResultsResponse */ -const de_StartCrawlerScheduleResponse = (output: any, context: __SerdeContext): StartCrawlerScheduleResponse => { - return {} as any; +const de_ListDataQualityResultsResponse = (output: any, context: __SerdeContext): ListDataQualityResultsResponse => { + return take(output, { + NextToken: __expectString, + Results: (_: any) => de_DataQualityResultDescriptionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartDataQualityRuleRecommendationRunResponse + * deserializeAws_json1_1ListDataQualityRuleRecommendationRunsResponse */ -const de_StartDataQualityRuleRecommendationRunResponse = ( +const de_ListDataQualityRuleRecommendationRunsResponse = ( output: any, context: __SerdeContext -): StartDataQualityRuleRecommendationRunResponse => { - return { - RunId: __expectString(output.RunId), - } as any; +): ListDataQualityRuleRecommendationRunsResponse => { + return take(output, { + NextToken: __expectString, + Runs: (_: any) => de_DataQualityRuleRecommendationRunList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartDataQualityRulesetEvaluationRunResponse + * deserializeAws_json1_1ListDataQualityRulesetEvaluationRunsResponse */ -const de_StartDataQualityRulesetEvaluationRunResponse = ( +const de_ListDataQualityRulesetEvaluationRunsResponse = ( output: any, context: __SerdeContext -): StartDataQualityRulesetEvaluationRunResponse => { - return { - RunId: __expectString(output.RunId), - } as any; +): ListDataQualityRulesetEvaluationRunsResponse => { + return take(output, { + NextToken: __expectString, + Runs: (_: any) => de_DataQualityRulesetEvaluationRunList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartExportLabelsTaskRunResponse + * deserializeAws_json1_1ListDataQualityRulesetsResponse */ -const de_StartExportLabelsTaskRunResponse = ( - output: any, - context: __SerdeContext -): StartExportLabelsTaskRunResponse => { - return { - TaskRunId: __expectString(output.TaskRunId), - } as any; +const de_ListDataQualityRulesetsResponse = (output: any, context: __SerdeContext): ListDataQualityRulesetsResponse => { + return take(output, { + NextToken: __expectString, + Rulesets: (_: any) => de_DataQualityRulesetList(_, context), + }) as any; }; +// de_ListDevEndpointsResponse omitted. + +// de_ListJobsResponse omitted. + +// de_ListMLTransformsResponse omitted. + +// de_ListRegistriesResponse omitted. + +// de_ListSchemasResponse omitted. + +// de_ListSchemaVersionsResponse omitted. + /** - * deserializeAws_json1_1StartImportLabelsTaskRunResponse + * deserializeAws_json1_1ListSessionsResponse */ -const de_StartImportLabelsTaskRunResponse = ( - output: any, - context: __SerdeContext -): StartImportLabelsTaskRunResponse => { - return { - TaskRunId: __expectString(output.TaskRunId), - } as any; +const de_ListSessionsResponse = (output: any, context: __SerdeContext): ListSessionsResponse => { + return take(output, { + Ids: _json, + NextToken: __expectString, + Sessions: (_: any) => de_SessionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartingEventBatchCondition + * deserializeAws_json1_1ListStatementsResponse */ -const de_StartingEventBatchCondition = (output: any, context: __SerdeContext): StartingEventBatchCondition => { - return { - BatchSize: __expectInt32(output.BatchSize), - BatchWindow: __expectInt32(output.BatchWindow), - } as any; +const de_ListStatementsResponse = (output: any, context: __SerdeContext): ListStatementsResponse => { + return take(output, { + NextToken: __expectString, + Statements: (_: any) => de_StatementList(_, context), + }) as any; }; +// de_ListTriggersResponse omitted. + +// de_ListWorkflowsResponse omitted. + +// de_LocationMap omitted. + +// de_LocationStringList omitted. + +// de_LongColumnStatisticsData omitted. + +// de_ManyInputs omitted. + /** - * deserializeAws_json1_1StartJobRunResponse + * deserializeAws_json1_1Mapping */ -const de_StartJobRunResponse = (output: any, context: __SerdeContext): StartJobRunResponse => { - return { - JobRunId: __expectString(output.JobRunId), - } as any; +const de_Mapping = (output: any, context: __SerdeContext): Mapping => { + return take(output, { + Children: (_: any) => de_Mappings(_, context), + Dropped: __expectBoolean, + FromPath: _json, + FromType: __expectString, + ToKey: __expectString, + ToType: __expectString, + }) as any; }; +// de_MappingEntry omitted. + +// de_MappingList omitted. + /** - * deserializeAws_json1_1StartMLEvaluationTaskRunResponse + * deserializeAws_json1_1Mappings */ -const de_StartMLEvaluationTaskRunResponse = ( - output: any, - context: __SerdeContext -): StartMLEvaluationTaskRunResponse => { - return { - TaskRunId: __expectString(output.TaskRunId), - } as any; +const de_Mappings = (output: any, context: __SerdeContext): Mapping[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Mapping(entry, context); + }); + return retVal; }; +// de_MapValue omitted. + +// de_MatchCriteria omitted. + +// de_Merge omitted. + +// de_MetadataInfo omitted. + +// de_MetadataInfoMap omitted. + +// de_MicrosoftSQLServerCatalogSource omitted. + +// de_MicrosoftSQLServerCatalogTarget omitted. + /** - * deserializeAws_json1_1StartMLLabelingSetGenerationTaskRunResponse + * deserializeAws_json1_1MLTransform */ -const de_StartMLLabelingSetGenerationTaskRunResponse = ( - output: any, - context: __SerdeContext -): StartMLLabelingSetGenerationTaskRunResponse => { - return { - TaskRunId: __expectString(output.TaskRunId), - } as any; +const de_MLTransform = (output: any, context: __SerdeContext): MLTransform => { + return take(output, { + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EvaluationMetrics: (_: any) => de_EvaluationMetrics(_, context), + GlueVersion: __expectString, + InputRecordTables: _json, + LabelCount: __expectInt32, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxCapacity: __limitedParseDouble, + MaxRetries: __expectInt32, + Name: __expectString, + NumberOfWorkers: __expectInt32, + Parameters: (_: any) => de_TransformParameters(_, context), + Role: __expectString, + Schema: _json, + Status: __expectString, + Timeout: __expectInt32, + TransformEncryption: _json, + TransformId: __expectString, + WorkerType: __expectString, + }) as any; }; +// de_MLTransformNotReadyException omitted. + +// de_MLUserDataEncryption omitted. + +// de_MongoDBTarget omitted. + +// de_MongoDBTargetList omitted. + +// de_MySQLCatalogSource omitted. + +// de_MySQLCatalogTarget omitted. + +// de_NameStringList omitted. + /** - * deserializeAws_json1_1StartTriggerResponse + * deserializeAws_json1_1Node */ -const de_StartTriggerResponse = (output: any, context: __SerdeContext): StartTriggerResponse => { - return { - Name: __expectString(output.Name), - } as any; +const de_Node = (output: any, context: __SerdeContext): Node => { + return take(output, { + CrawlerDetails: (_: any) => de_CrawlerNodeDetails(_, context), + JobDetails: (_: any) => de_JobNodeDetails(_, context), + Name: __expectString, + TriggerDetails: _json, + Type: __expectString, + UniqueId: __expectString, + }) as any; }; +// de_NodeIdList omitted. + /** - * deserializeAws_json1_1StartWorkflowRunResponse + * deserializeAws_json1_1NodeList */ -const de_StartWorkflowRunResponse = (output: any, context: __SerdeContext): StartWorkflowRunResponse => { - return { - RunId: __expectString(output.RunId), - } as any; +const de_NodeList = (output: any, context: __SerdeContext): Node[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Node(entry, context); + }); + return retVal; }; +// de_NoScheduleException omitted. + +// de_NotificationProperty omitted. + +// de_NullCheckBoxList omitted. + +// de_NullValueField omitted. + +// de_NullValueFields omitted. + +// de_OneInput omitted. + +// de_OperationTimeoutException omitted. + +// de_OracleSQLCatalogSource omitted. + +// de_OracleSQLCatalogTarget omitted. + +// de_OrchestrationArgumentsMap omitted. + +// de_OrchestrationStringList omitted. + +// de_Order omitted. + +// de_OrderList omitted. + +// de_OtherMetadataValueList omitted. + +// de_OtherMetadataValueListItem omitted. + +// de_ParametersMap omitted. + /** - * deserializeAws_json1_1Statement + * deserializeAws_json1_1Partition */ -const de_Statement = (output: any, context: __SerdeContext): Statement => { - return { - Code: __expectString(output.Code), - CompletedOn: __expectLong(output.CompletedOn), - Id: __expectInt32(output.Id), - Output: output.Output != null ? de_StatementOutput(output.Output, context) : undefined, - Progress: __limitedParseDouble(output.Progress), - StartedOn: __expectLong(output.StartedOn), - State: __expectString(output.State), - } as any; +const de_Partition = (output: any, context: __SerdeContext): Partition => { + return take(output, { + CatalogId: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatabaseName: __expectString, + LastAccessTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAnalyzedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Parameters: _json, + StorageDescriptor: _json, + TableName: __expectString, + Values: _json, + }) as any; }; +// de_PartitionError omitted. + +// de_PartitionErrors omitted. + +// de_PartitionIndexDescriptor omitted. + +// de_PartitionIndexDescriptorList omitted. + /** - * deserializeAws_json1_1StatementList + * deserializeAws_json1_1PartitionList */ -const de_StatementList = (output: any, context: __SerdeContext): Statement[] => { +const de_PartitionList = (output: any, context: __SerdeContext): Partition[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Statement(entry, context); + return de_Partition(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StatementOutput - */ -const de_StatementOutput = (output: any, context: __SerdeContext): StatementOutput => { - return { - Data: output.Data != null ? de_StatementOutputData(output.Data, context) : undefined, - ErrorName: __expectString(output.ErrorName), - ErrorValue: __expectString(output.ErrorValue), - ExecutionCount: __expectInt32(output.ExecutionCount), - Status: __expectString(output.Status), - Traceback: output.Traceback != null ? de_OrchestrationStringList(output.Traceback, context) : undefined, - } as any; -}; +// de_PartitionValueList omitted. + +// de_PathList omitted. + +// de_PermissionList omitted. + +// de_PermissionTypeMismatchException omitted. + +// de_PhysicalConnectionRequirements omitted. /** - * deserializeAws_json1_1StatementOutputData + * deserializeAws_json1_1PIIDetection */ -const de_StatementOutputData = (output: any, context: __SerdeContext): StatementOutputData => { - return { - TextPlain: __expectString(output.TextPlain), - } as any; +const de_PIIDetection = (output: any, context: __SerdeContext): PIIDetection => { + return take(output, { + EntityTypesToDetect: _json, + Inputs: _json, + MaskValue: __expectString, + Name: __expectString, + OutputColumnName: __expectString, + PiiType: __expectString, + SampleFraction: __limitedParseDouble, + ThresholdFraction: __limitedParseDouble, + }) as any; }; +// de_PostgreSQLCatalogSource omitted. + +// de_PostgreSQLCatalogTarget omitted. + +// de_Predecessor omitted. + +// de_PredecessorList omitted. + +// de_Predicate omitted. + +// de_PrincipalPermissions omitted. + +// de_PrincipalPermissionsList omitted. + +// de_PublicKeysList omitted. + +// de_PutDataCatalogEncryptionSettingsResponse omitted. + +// de_PutResourcePolicyResponse omitted. + +// de_PutSchemaVersionMetadataResponse omitted. + +// de_PutWorkflowRunPropertiesResponse omitted. + +// de_QuerySchemaVersionMetadataResponse omitted. + +// de_RecrawlPolicy omitted. + +// de_RedshiftSource omitted. + +// de_RedshiftTarget omitted. + +// de_RegisterSchemaVersionResponse omitted. + +// de_RegistryListDefinition omitted. + +// de_RegistryListItem omitted. + +// de_RelationalCatalogSource omitted. + +// de_RemoveSchemaVersionMetadataResponse omitted. + +// de_RenameField omitted. + +// de_ResetJobBookmarkResponse omitted. + +// de_ResourceNotReadyException omitted. + +// de_ResourceNumberLimitExceededException omitted. + +// de_ResourceUri omitted. + +// de_ResourceUriList omitted. + +// de_ResumeWorkflowRunResponse omitted. + +// de_RulesetNames omitted. + +// de_RunStatementResponse omitted. + +// de_S3CatalogDeltaSource omitted. + +// de_S3CatalogHudiSource omitted. + +// de_S3CatalogSource omitted. + +// de_S3CatalogTarget omitted. + +// de_S3CsvSource omitted. + +// de_S3DeltaCatalogTarget omitted. + +// de_S3DeltaDirectTarget omitted. + +// de_S3DeltaSource omitted. + +// de_S3DirectSourceAdditionalOptions omitted. + +// de_S3DirectTarget omitted. + +// de_S3Encryption omitted. + +// de_S3EncryptionList omitted. + +// de_S3GlueParquetTarget omitted. + +// de_S3HudiCatalogTarget omitted. + +// de_S3HudiDirectTarget omitted. + +// de_S3HudiSource omitted. + +// de_S3JsonSource omitted. + +// de_S3ParquetSource omitted. + +// de_S3SourceAdditionalOptions omitted. + +// de_S3Target omitted. + +// de_S3TargetList omitted. + +// de_Schedule omitted. + +// de_SchedulerNotRunningException omitted. + +// de_SchedulerRunningException omitted. + +// de_SchedulerTransitioningException omitted. + +// de_SchemaChangePolicy omitted. + +// de_SchemaColumn omitted. + +// de_SchemaId omitted. + +// de_SchemaListDefinition omitted. + +// de_SchemaListItem omitted. + +// de_SchemaReference omitted. + +// de_SchemaVersionErrorItem omitted. + +// de_SchemaVersionErrorList omitted. + +// de_SchemaVersionList omitted. + +// de_SchemaVersionListItem omitted. + /** - * deserializeAws_json1_1StopCrawlerResponse + * deserializeAws_json1_1SearchTablesResponse */ -const de_StopCrawlerResponse = (output: any, context: __SerdeContext): StopCrawlerResponse => { - return {} as any; +const de_SearchTablesResponse = (output: any, context: __SerdeContext): SearchTablesResponse => { + return take(output, { + NextToken: __expectString, + TableList: (_: any) => de_TableList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StopCrawlerScheduleResponse + * deserializeAws_json1_1SecurityConfiguration */ -const de_StopCrawlerScheduleResponse = (output: any, context: __SerdeContext): StopCrawlerScheduleResponse => { - return {} as any; +const de_SecurityConfiguration = (output: any, context: __SerdeContext): SecurityConfiguration => { + return take(output, { + CreatedTimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EncryptionConfiguration: _json, + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StopSessionResponse + * deserializeAws_json1_1SecurityConfigurationList */ -const de_StopSessionResponse = (output: any, context: __SerdeContext): StopSessionResponse => { - return { - Id: __expectString(output.Id), - } as any; +const de_SecurityConfigurationList = (output: any, context: __SerdeContext): SecurityConfiguration[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SecurityConfiguration(entry, context); + }); + return retVal; }; +// de_SecurityGroupIdList omitted. + +// de_SelectFields omitted. + +// de_SelectFromCollection omitted. + +// de_SerDeInfo omitted. + /** - * deserializeAws_json1_1StopTriggerResponse + * deserializeAws_json1_1Session */ -const de_StopTriggerResponse = (output: any, context: __SerdeContext): StopTriggerResponse => { - return { - Name: __expectString(output.Name), - } as any; +const de_Session = (output: any, context: __SerdeContext): Session => { + return take(output, { + Command: _json, + Connections: _json, + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultArguments: _json, + Description: __expectString, + ErrorMessage: __expectString, + GlueVersion: __expectString, + Id: __expectString, + MaxCapacity: __limitedParseDouble, + Progress: __limitedParseDouble, + Role: __expectString, + SecurityConfiguration: __expectString, + Status: __expectString, + }) as any; }; +// de_SessionCommand omitted. + +// de_SessionIdList omitted. + /** - * deserializeAws_json1_1StopWorkflowRunResponse + * deserializeAws_json1_1SessionList */ -const de_StopWorkflowRunResponse = (output: any, context: __SerdeContext): StopWorkflowRunResponse => { - return {} as any; +const de_SessionList = (output: any, context: __SerdeContext): Session[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Session(entry, context); + }); + return retVal; }; +// de_SkewedInfo omitted. + +// de_SourceControlDetails omitted. + +// de_SparkConnectorSource omitted. + +// de_SparkConnectorTarget omitted. + +// de_SparkSQL omitted. + /** - * deserializeAws_json1_1StorageDescriptor + * deserializeAws_json1_1Spigot */ -const de_StorageDescriptor = (output: any, context: __SerdeContext): StorageDescriptor => { - return { - AdditionalLocations: - output.AdditionalLocations != null ? de_LocationStringList(output.AdditionalLocations, context) : undefined, - BucketColumns: output.BucketColumns != null ? de_NameStringList(output.BucketColumns, context) : undefined, - Columns: output.Columns != null ? de_ColumnList(output.Columns, context) : undefined, - Compressed: __expectBoolean(output.Compressed), - InputFormat: __expectString(output.InputFormat), - Location: __expectString(output.Location), - NumberOfBuckets: __expectInt32(output.NumberOfBuckets), - OutputFormat: __expectString(output.OutputFormat), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - SchemaReference: output.SchemaReference != null ? de_SchemaReference(output.SchemaReference, context) : undefined, - SerdeInfo: output.SerdeInfo != null ? de_SerDeInfo(output.SerdeInfo, context) : undefined, - SkewedInfo: output.SkewedInfo != null ? de_SkewedInfo(output.SkewedInfo, context) : undefined, - SortColumns: output.SortColumns != null ? de_OrderList(output.SortColumns, context) : undefined, - StoredAsSubDirectories: __expectBoolean(output.StoredAsSubDirectories), - } as any; -}; - -/** - * deserializeAws_json1_1StreamingDataPreviewOptions - */ -const de_StreamingDataPreviewOptions = (output: any, context: __SerdeContext): StreamingDataPreviewOptions => { - return { - PollingTime: __expectLong(output.PollingTime), - RecordPollingLimit: __expectLong(output.RecordPollingLimit), - } as any; +const de_Spigot = (output: any, context: __SerdeContext): Spigot => { + return take(output, { + Inputs: _json, + Name: __expectString, + Path: __expectString, + Prob: __limitedParseDouble, + Topk: __expectInt32, + }) as any; }; +// de_SplitFields omitted. + +// de_SqlAlias omitted. + +// de_SqlAliases omitted. + +// de_StartBlueprintRunResponse omitted. + +// de_StartCrawlerResponse omitted. + +// de_StartCrawlerScheduleResponse omitted. + +// de_StartDataQualityRuleRecommendationRunResponse omitted. + +// de_StartDataQualityRulesetEvaluationRunResponse omitted. + +// de_StartExportLabelsTaskRunResponse omitted. + +// de_StartImportLabelsTaskRunResponse omitted. + +// de_StartingEventBatchCondition omitted. + +// de_StartJobRunResponse omitted. + +// de_StartMLEvaluationTaskRunResponse omitted. + +// de_StartMLLabelingSetGenerationTaskRunResponse omitted. + +// de_StartTriggerResponse omitted. + +// de_StartWorkflowRunResponse omitted. + /** - * deserializeAws_json1_1StringColumnStatisticsData + * deserializeAws_json1_1Statement */ -const de_StringColumnStatisticsData = (output: any, context: __SerdeContext): StringColumnStatisticsData => { - return { - AverageLength: __limitedParseDouble(output.AverageLength), - MaximumLength: __expectLong(output.MaximumLength), - NumberOfDistinctValues: __expectLong(output.NumberOfDistinctValues), - NumberOfNulls: __expectLong(output.NumberOfNulls), - } as any; +const de_Statement = (output: any, context: __SerdeContext): Statement => { + return take(output, { + Code: __expectString, + CompletedOn: __expectLong, + Id: __expectInt32, + Output: _json, + Progress: __limitedParseDouble, + StartedOn: __expectLong, + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1StatementList */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { +const de_StatementList = (output: any, context: __SerdeContext): Statement[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Statement(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Table - */ -const de_Table = (output: any, context: __SerdeContext): Table => { - return { - CatalogId: __expectString(output.CatalogId), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - CreatedBy: __expectString(output.CreatedBy), - DatabaseName: __expectString(output.DatabaseName), - Description: __expectString(output.Description), - FederatedTable: output.FederatedTable != null ? de_FederatedTable(output.FederatedTable, context) : undefined, - IsRegisteredWithLakeFormation: __expectBoolean(output.IsRegisteredWithLakeFormation), - LastAccessTime: - output.LastAccessTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessTime))) - : undefined, - LastAnalyzedTime: - output.LastAnalyzedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAnalyzedTime))) - : undefined, - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - PartitionKeys: output.PartitionKeys != null ? de_ColumnList(output.PartitionKeys, context) : undefined, - Retention: __expectInt32(output.Retention), - StorageDescriptor: - output.StorageDescriptor != null ? de_StorageDescriptor(output.StorageDescriptor, context) : undefined, - TableType: __expectString(output.TableType), - TargetTable: output.TargetTable != null ? de_TableIdentifier(output.TargetTable, context) : undefined, - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateTime))) : undefined, - VersionId: __expectString(output.VersionId), - ViewExpandedText: __expectString(output.ViewExpandedText), - ViewOriginalText: __expectString(output.ViewOriginalText), - } as any; -}; - -/** - * deserializeAws_json1_1TableError - */ -const de_TableError = (output: any, context: __SerdeContext): TableError => { - return { - ErrorDetail: output.ErrorDetail != null ? de_ErrorDetail(output.ErrorDetail, context) : undefined, - TableName: __expectString(output.TableName), - } as any; -}; +// de_StatementOutput omitted. + +// de_StatementOutputData omitted. + +// de_StopCrawlerResponse omitted. + +// de_StopCrawlerScheduleResponse omitted. + +// de_StopSessionResponse omitted. + +// de_StopTriggerResponse omitted. + +// de_StopWorkflowRunResponse omitted. + +// de_StorageDescriptor omitted. + +// de_StreamingDataPreviewOptions omitted. /** - * deserializeAws_json1_1TableErrors + * deserializeAws_json1_1StringColumnStatisticsData */ -const de_TableErrors = (output: any, context: __SerdeContext): TableError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableError(entry, context); - }); - return retVal; +const de_StringColumnStatisticsData = (output: any, context: __SerdeContext): StringColumnStatisticsData => { + return take(output, { + AverageLength: __limitedParseDouble, + MaximumLength: __expectLong, + NumberOfDistinctValues: __expectLong, + NumberOfNulls: __expectLong, + }) as any; }; +// de_StringList omitted. + /** - * deserializeAws_json1_1TableIdentifier + * deserializeAws_json1_1Table */ -const de_TableIdentifier = (output: any, context: __SerdeContext): TableIdentifier => { - return { - CatalogId: __expectString(output.CatalogId), - DatabaseName: __expectString(output.DatabaseName), - Name: __expectString(output.Name), - } as any; -}; +const de_Table = (output: any, context: __SerdeContext): Table => { + return take(output, { + CatalogId: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedBy: __expectString, + DatabaseName: __expectString, + Description: __expectString, + FederatedTable: _json, + IsRegisteredWithLakeFormation: __expectBoolean, + LastAccessTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAnalyzedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Owner: __expectString, + Parameters: _json, + PartitionKeys: _json, + Retention: __expectInt32, + StorageDescriptor: _json, + TableType: __expectString, + TargetTable: _json, + UpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + ViewExpandedText: __expectString, + ViewOriginalText: __expectString, + }) as any; +}; + +// de_TableError omitted. + +// de_TableErrors omitted. + +// de_TableIdentifier omitted. /** * deserializeAws_json1_1TableList @@ -29489,9 +20192,6 @@ const de_TableList = (output: any, context: __SerdeContext): Table[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Table(entry, context); }); return retVal; @@ -29501,81 +20201,36 @@ const de_TableList = (output: any, context: __SerdeContext): Table[] => { * deserializeAws_json1_1TableVersion */ const de_TableVersion = (output: any, context: __SerdeContext): TableVersion => { - return { - Table: output.Table != null ? de_Table(output.Table, context) : undefined, - VersionId: __expectString(output.VersionId), - } as any; + return take(output, { + Table: (_: any) => de_Table(_, context), + VersionId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1TableVersionError - */ -const de_TableVersionError = (output: any, context: __SerdeContext): TableVersionError => { - return { - ErrorDetail: output.ErrorDetail != null ? de_ErrorDetail(output.ErrorDetail, context) : undefined, - TableName: __expectString(output.TableName), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_TableVersionError omitted. -/** - * deserializeAws_json1_1TableVersionErrors - */ -const de_TableVersionErrors = (output: any, context: __SerdeContext): TableVersionError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableVersionError(entry, context); - }); - return retVal; -}; +// de_TableVersionErrors omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. /** * deserializeAws_json1_1TaskRun */ const de_TaskRun = (output: any, context: __SerdeContext): TaskRun => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - ErrorString: __expectString(output.ErrorString), - ExecutionTime: __expectInt32(output.ExecutionTime), - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - LogGroupName: __expectString(output.LogGroupName), - Properties: output.Properties != null ? de_TaskRunProperties(output.Properties, context) : undefined, - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - Status: __expectString(output.Status), - TaskRunId: __expectString(output.TaskRunId), - TransformId: __expectString(output.TransformId), - } as any; + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorString: __expectString, + ExecutionTime: __expectInt32, + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogGroupName: __expectString, + Properties: _json, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TaskRunId: __expectString, + TransformId: __expectString, + }) as any; }; /** @@ -29585,94 +20240,20 @@ const de_TaskRunList = (output: any, context: __SerdeContext): TaskRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TaskRun(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TaskRunProperties - */ -const de_TaskRunProperties = (output: any, context: __SerdeContext): TaskRunProperties => { - return { - ExportLabelsTaskRunProperties: - output.ExportLabelsTaskRunProperties != null - ? de_ExportLabelsTaskRunProperties(output.ExportLabelsTaskRunProperties, context) - : undefined, - FindMatchesTaskRunProperties: - output.FindMatchesTaskRunProperties != null - ? de_FindMatchesTaskRunProperties(output.FindMatchesTaskRunProperties, context) - : undefined, - ImportLabelsTaskRunProperties: - output.ImportLabelsTaskRunProperties != null - ? de_ImportLabelsTaskRunProperties(output.ImportLabelsTaskRunProperties, context) - : undefined, - LabelingSetGenerationTaskRunProperties: - output.LabelingSetGenerationTaskRunProperties != null - ? de_LabelingSetGenerationTaskRunProperties(output.LabelingSetGenerationTaskRunProperties, context) - : undefined, - TaskType: __expectString(output.TaskType), - } as any; -}; - -/** - * deserializeAws_json1_1TransformConfigParameter - */ -const de_TransformConfigParameter = (output: any, context: __SerdeContext): TransformConfigParameter => { - return { - IsOptional: __expectBoolean(output.IsOptional), - ListType: __expectString(output.ListType), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - ValidationMessage: __expectString(output.ValidationMessage), - ValidationRule: __expectString(output.ValidationRule), - Value: output.Value != null ? de_EnclosedInStringProperties(output.Value, context) : undefined, - } as any; -}; +// de_TaskRunProperties omitted. -/** - * deserializeAws_json1_1TransformConfigParameterList - */ -const de_TransformConfigParameterList = (output: any, context: __SerdeContext): TransformConfigParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TransformConfigParameter(entry, context); - }); - return retVal; -}; +// de_TransformConfigParameter omitted. -/** - * deserializeAws_json1_1TransformEncryption - */ -const de_TransformEncryption = (output: any, context: __SerdeContext): TransformEncryption => { - return { - MlUserDataEncryption: - output.MlUserDataEncryption != null ? de_MLUserDataEncryption(output.MlUserDataEncryption, context) : undefined, - TaskRunSecurityConfigurationName: __expectString(output.TaskRunSecurityConfigurationName), - } as any; -}; +// de_TransformConfigParameterList omitted. -/** - * deserializeAws_json1_1TransformIdList - */ -const de_TransformIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TransformEncryption omitted. + +// de_TransformIdList omitted. /** * deserializeAws_json1_1TransformList @@ -29681,9 +20262,6 @@ const de_TransformList = (output: any, context: __SerdeContext): MLTransform[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MLTransform(entry, context); }); return retVal; @@ -29693,115 +20271,33 @@ const de_TransformList = (output: any, context: __SerdeContext): MLTransform[] = * deserializeAws_json1_1TransformParameters */ const de_TransformParameters = (output: any, context: __SerdeContext): TransformParameters => { - return { - FindMatchesParameters: - output.FindMatchesParameters != null - ? de_FindMatchesParameters(output.FindMatchesParameters, context) - : undefined, - TransformType: __expectString(output.TransformType), - } as any; + return take(output, { + FindMatchesParameters: (_: any) => de_FindMatchesParameters(_, context), + TransformType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1TransformSchema - */ -const de_TransformSchema = (output: any, context: __SerdeContext): SchemaColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaColumn(entry, context); - }); - return retVal; -}; +// de_TransformSchema omitted. -/** - * deserializeAws_json1_1Trigger - */ -const de_Trigger = (output: any, context: __SerdeContext): Trigger => { - return { - Actions: output.Actions != null ? de_ActionList(output.Actions, context) : undefined, - Description: __expectString(output.Description), - EventBatchingCondition: - output.EventBatchingCondition != null - ? de_EventBatchingCondition(output.EventBatchingCondition, context) - : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Predicate: output.Predicate != null ? de_Predicate(output.Predicate, context) : undefined, - Schedule: __expectString(output.Schedule), - State: __expectString(output.State), - Type: __expectString(output.Type), - WorkflowName: __expectString(output.WorkflowName), - } as any; -}; - -/** - * deserializeAws_json1_1TriggerList - */ -const de_TriggerList = (output: any, context: __SerdeContext): Trigger[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Trigger(entry, context); - }); - return retVal; -}; +// de_Trigger omitted. -/** - * deserializeAws_json1_1TriggerNameList - */ -const de_TriggerNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TriggerList omitted. -/** - * deserializeAws_json1_1TriggerNodeDetails - */ -const de_TriggerNodeDetails = (output: any, context: __SerdeContext): TriggerNodeDetails => { - return { - Trigger: output.Trigger != null ? de_Trigger(output.Trigger, context) : undefined, - } as any; -}; +// de_TriggerNameList omitted. -/** - * deserializeAws_json1_1TwoInputs - */ -const de_TwoInputs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TriggerNodeDetails omitted. + +// de_TwoInputs omitted. /** * deserializeAws_json1_1UnfilteredPartition */ const de_UnfilteredPartition = (output: any, context: __SerdeContext): UnfilteredPartition => { - return { - AuthorizedColumns: - output.AuthorizedColumns != null ? de_NameStringList(output.AuthorizedColumns, context) : undefined, - IsRegisteredWithLakeFormation: __expectBoolean(output.IsRegisteredWithLakeFormation), - Partition: output.Partition != null ? de_Partition(output.Partition, context) : undefined, - } as any; + return take(output, { + AuthorizedColumns: _json, + IsRegisteredWithLakeFormation: __expectBoolean, + Partition: (_: any) => de_Partition(_, context), + }) as any; }; /** @@ -29811,47 +20307,18 @@ const de_UnfilteredPartitionList = (output: any, context: __SerdeContext): Unfil const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UnfilteredPartition(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Union - */ -const de_Union = (output: any, context: __SerdeContext): Union => { - return { - Inputs: output.Inputs != null ? de_TwoInputs(output.Inputs, context) : undefined, - Name: __expectString(output.Name), - UnionType: __expectString(output.UnionType), - } as any; -}; +// de_Union omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateBlueprintResponse - */ -const de_UpdateBlueprintResponse = (output: any, context: __SerdeContext): UpdateBlueprintResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_UpdateBlueprintResponse omitted. -/** - * deserializeAws_json1_1UpdateClassifierResponse - */ -const de_UpdateClassifierResponse = (output: any, context: __SerdeContext): UpdateClassifierResponse => { - return {} as any; -}; +// de_UpdateClassifierResponse omitted. /** * deserializeAws_json1_1UpdateColumnStatisticsForPartitionResponse @@ -29860,9 +20327,9 @@ const de_UpdateColumnStatisticsForPartitionResponse = ( output: any, context: __SerdeContext ): UpdateColumnStatisticsForPartitionResponse => { - return { - Errors: output.Errors != null ? de_ColumnStatisticsErrors(output.Errors, context) : undefined, - } as any; + return take(output, { + Errors: (_: any) => de_ColumnStatisticsErrors(_, context), + }) as any; }; /** @@ -29872,191 +20339,61 @@ const de_UpdateColumnStatisticsForTableResponse = ( output: any, context: __SerdeContext ): UpdateColumnStatisticsForTableResponse => { - return { - Errors: output.Errors != null ? de_ColumnStatisticsErrors(output.Errors, context) : undefined, - } as any; + return take(output, { + Errors: (_: any) => de_ColumnStatisticsErrors(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateConnectionResponse - */ -const de_UpdateConnectionResponse = (output: any, context: __SerdeContext): UpdateConnectionResponse => { - return {} as any; -}; +// de_UpdateConnectionResponse omitted. -/** - * deserializeAws_json1_1UpdateCrawlerResponse - */ -const de_UpdateCrawlerResponse = (output: any, context: __SerdeContext): UpdateCrawlerResponse => { - return {} as any; -}; +// de_UpdateCrawlerResponse omitted. -/** - * deserializeAws_json1_1UpdateCrawlerScheduleResponse - */ -const de_UpdateCrawlerScheduleResponse = (output: any, context: __SerdeContext): UpdateCrawlerScheduleResponse => { - return {} as any; -}; +// de_UpdateCrawlerScheduleResponse omitted. -/** - * deserializeAws_json1_1UpdateDatabaseResponse - */ -const de_UpdateDatabaseResponse = (output: any, context: __SerdeContext): UpdateDatabaseResponse => { - return {} as any; -}; +// de_UpdateDatabaseResponse omitted. -/** - * deserializeAws_json1_1UpdateDataQualityRulesetResponse - */ -const de_UpdateDataQualityRulesetResponse = ( - output: any, - context: __SerdeContext -): UpdateDataQualityRulesetResponse => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Ruleset: __expectString(output.Ruleset), - } as any; -}; +// de_UpdateDataQualityRulesetResponse omitted. -/** - * deserializeAws_json1_1UpdateDevEndpointResponse - */ -const de_UpdateDevEndpointResponse = (output: any, context: __SerdeContext): UpdateDevEndpointResponse => { - return {} as any; -}; +// de_UpdateDevEndpointResponse omitted. -/** - * deserializeAws_json1_1UpdateJobFromSourceControlResponse - */ -const de_UpdateJobFromSourceControlResponse = ( - output: any, - context: __SerdeContext -): UpdateJobFromSourceControlResponse => { - return { - JobName: __expectString(output.JobName), - } as any; -}; +// de_UpdateJobFromSourceControlResponse omitted. -/** - * deserializeAws_json1_1UpdateJobResponse - */ -const de_UpdateJobResponse = (output: any, context: __SerdeContext): UpdateJobResponse => { - return { - JobName: __expectString(output.JobName), - } as any; -}; +// de_UpdateJobResponse omitted. -/** - * deserializeAws_json1_1UpdateMLTransformResponse - */ -const de_UpdateMLTransformResponse = (output: any, context: __SerdeContext): UpdateMLTransformResponse => { - return { - TransformId: __expectString(output.TransformId), - } as any; -}; +// de_UpdateMLTransformResponse omitted. -/** - * deserializeAws_json1_1UpdatePartitionResponse - */ -const de_UpdatePartitionResponse = (output: any, context: __SerdeContext): UpdatePartitionResponse => { - return {} as any; -}; +// de_UpdatePartitionResponse omitted. -/** - * deserializeAws_json1_1UpdateRegistryResponse - */ -const de_UpdateRegistryResponse = (output: any, context: __SerdeContext): UpdateRegistryResponse => { - return { - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - } as any; -}; +// de_UpdateRegistryResponse omitted. -/** - * deserializeAws_json1_1UpdateSchemaResponse - */ -const de_UpdateSchemaResponse = (output: any, context: __SerdeContext): UpdateSchemaResponse => { - return { - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - } as any; -}; +// de_UpdateSchemaResponse omitted. -/** - * deserializeAws_json1_1UpdateSourceControlFromJobResponse - */ -const de_UpdateSourceControlFromJobResponse = ( - output: any, - context: __SerdeContext -): UpdateSourceControlFromJobResponse => { - return { - JobName: __expectString(output.JobName), - } as any; -}; +// de_UpdateSourceControlFromJobResponse omitted. -/** - * deserializeAws_json1_1UpdateTableResponse - */ -const de_UpdateTableResponse = (output: any, context: __SerdeContext): UpdateTableResponse => { - return {} as any; -}; +// de_UpdateTableResponse omitted. -/** - * deserializeAws_json1_1UpdateTriggerResponse - */ -const de_UpdateTriggerResponse = (output: any, context: __SerdeContext): UpdateTriggerResponse => { - return { - Trigger: output.Trigger != null ? de_Trigger(output.Trigger, context) : undefined, - } as any; -}; +// de_UpdateTriggerResponse omitted. -/** - * deserializeAws_json1_1UpdateUserDefinedFunctionResponse - */ -const de_UpdateUserDefinedFunctionResponse = ( - output: any, - context: __SerdeContext -): UpdateUserDefinedFunctionResponse => { - return {} as any; -}; +// de_UpdateUserDefinedFunctionResponse omitted. -/** - * deserializeAws_json1_1UpdateWorkflowResponse - */ -const de_UpdateWorkflowResponse = (output: any, context: __SerdeContext): UpdateWorkflowResponse => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_UpdateWorkflowResponse omitted. -/** - * deserializeAws_json1_1UpsertRedshiftTargetOptions - */ -const de_UpsertRedshiftTargetOptions = (output: any, context: __SerdeContext): UpsertRedshiftTargetOptions => { - return { - ConnectionName: __expectString(output.ConnectionName), - TableLocation: __expectString(output.TableLocation), - UpsertKeys: output.UpsertKeys != null ? de_EnclosedInStringPropertiesMinOne(output.UpsertKeys, context) : undefined, - } as any; -}; +// de_UpsertRedshiftTargetOptions omitted. /** * deserializeAws_json1_1UserDefinedFunction */ const de_UserDefinedFunction = (output: any, context: __SerdeContext): UserDefinedFunction => { - return { - CatalogId: __expectString(output.CatalogId), - ClassName: __expectString(output.ClassName), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - DatabaseName: __expectString(output.DatabaseName), - FunctionName: __expectString(output.FunctionName), - OwnerName: __expectString(output.OwnerName), - OwnerType: __expectString(output.OwnerType), - ResourceUris: output.ResourceUris != null ? de_ResourceUriList(output.ResourceUris, context) : undefined, - } as any; + return take(output, { + CatalogId: __expectString, + ClassName: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatabaseName: __expectString, + FunctionName: __expectString, + OwnerName: __expectString, + OwnerType: __expectString, + ResourceUris: _json, + }) as any; }; /** @@ -30066,137 +20403,67 @@ const de_UserDefinedFunctionList = (output: any, context: __SerdeContext): UserD const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserDefinedFunction(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1ValueStringList - */ -const de_ValueStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ValueStringList omitted. -/** - * deserializeAws_json1_1VersionMismatchException - */ -const de_VersionMismatchException = (output: any, context: __SerdeContext): VersionMismatchException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_VersionMismatchException omitted. /** * deserializeAws_json1_1Workflow */ const de_Workflow = (output: any, context: __SerdeContext): Workflow => { - return { - BlueprintDetails: - output.BlueprintDetails != null ? de_BlueprintDetails(output.BlueprintDetails, context) : undefined, - CreatedOn: - output.CreatedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedOn))) : undefined, - DefaultRunProperties: - output.DefaultRunProperties != null ? de_WorkflowRunProperties(output.DefaultRunProperties, context) : undefined, - Description: __expectString(output.Description), - Graph: output.Graph != null ? de_WorkflowGraph(output.Graph, context) : undefined, - LastModifiedOn: - output.LastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedOn))) - : undefined, - LastRun: output.LastRun != null ? de_WorkflowRun(output.LastRun, context) : undefined, - MaxConcurrentRuns: __expectInt32(output.MaxConcurrentRuns), - Name: __expectString(output.Name), - } as any; + return take(output, { + BlueprintDetails: _json, + CreatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultRunProperties: _json, + Description: __expectString, + Graph: (_: any) => de_WorkflowGraph(_, context), + LastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRun: (_: any) => de_WorkflowRun(_, context), + MaxConcurrentRuns: __expectInt32, + Name: __expectString, + }) as any; }; /** * deserializeAws_json1_1WorkflowGraph */ const de_WorkflowGraph = (output: any, context: __SerdeContext): WorkflowGraph => { - return { - Edges: output.Edges != null ? de_EdgeList(output.Edges, context) : undefined, - Nodes: output.Nodes != null ? de_NodeList(output.Nodes, context) : undefined, - } as any; + return take(output, { + Edges: _json, + Nodes: (_: any) => de_NodeList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1WorkflowNames - */ -const de_WorkflowNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkflowNames omitted. /** * deserializeAws_json1_1WorkflowRun */ const de_WorkflowRun = (output: any, context: __SerdeContext): WorkflowRun => { - return { - CompletedOn: - output.CompletedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedOn))) - : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - Graph: output.Graph != null ? de_WorkflowGraph(output.Graph, context) : undefined, - Name: __expectString(output.Name), - PreviousRunId: __expectString(output.PreviousRunId), - StartedOn: - output.StartedOn != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedOn))) : undefined, - StartingEventBatchCondition: - output.StartingEventBatchCondition != null - ? de_StartingEventBatchCondition(output.StartingEventBatchCondition, context) - : undefined, - Statistics: output.Statistics != null ? de_WorkflowRunStatistics(output.Statistics, context) : undefined, - Status: __expectString(output.Status), - WorkflowRunId: __expectString(output.WorkflowRunId), - WorkflowRunProperties: - output.WorkflowRunProperties != null - ? de_WorkflowRunProperties(output.WorkflowRunProperties, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1WorkflowRunProperties - */ -const de_WorkflowRunProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + CompletedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + Graph: (_: any) => de_WorkflowGraph(_, context), + Name: __expectString, + PreviousRunId: __expectString, + StartedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartingEventBatchCondition: _json, + Statistics: _json, + Status: __expectString, + WorkflowRunId: __expectString, + WorkflowRunProperties: _json, + }) as any; }; +// de_WorkflowRunProperties omitted. + /** * deserializeAws_json1_1WorkflowRuns */ @@ -30204,29 +20471,12 @@ const de_WorkflowRuns = (output: any, context: __SerdeContext): WorkflowRun[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkflowRun(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1WorkflowRunStatistics - */ -const de_WorkflowRunStatistics = (output: any, context: __SerdeContext): WorkflowRunStatistics => { - return { - ErroredActions: __expectInt32(output.ErroredActions), - FailedActions: __expectInt32(output.FailedActions), - RunningActions: __expectInt32(output.RunningActions), - StoppedActions: __expectInt32(output.StoppedActions), - SucceededActions: __expectInt32(output.SucceededActions), - TimeoutActions: __expectInt32(output.TimeoutActions), - TotalActions: __expectInt32(output.TotalActions), - WaitingActions: __expectInt32(output.WaitingActions), - } as any; -}; +// de_WorkflowRunStatistics omitted. /** * deserializeAws_json1_1Workflows @@ -30235,9 +20485,6 @@ const de_Workflows = (output: any, context: __SerdeContext): Workflow[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Workflow(entry, context); }); return retVal; @@ -30247,20 +20494,14 @@ const de_Workflows = (output: any, context: __SerdeContext): Workflow[] => { * deserializeAws_json1_1XMLClassifier */ const de_XMLClassifier = (output: any, context: __SerdeContext): XMLClassifier => { - return { - Classification: __expectString(output.Classification), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Name: __expectString(output.Name), - RowTag: __expectString(output.RowTag), - Version: __expectLong(output.Version), - } as any; + return take(output, { + Classification: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RowTag: __expectString, + Version: __expectLong, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -30283,6 +20524,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-grafana/src/protocols/Aws_restJson1.ts b/clients/client-grafana/src/protocols/Aws_restJson1.ts index 4fb083ec2aa7..cae8446fa7aa 100644 --- a/clients/client-grafana/src/protocols/Aws_restJson1.ts +++ b/clients/client-grafana/src/protocols/Aws_restJson1.ts @@ -1,21 +1,21 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -70,28 +70,21 @@ import { GrafanaServiceException as __BaseException } from "../models/GrafanaSer import { AccessDeniedException, AssertionAttributes, - AuthenticationDescription, AuthenticationProviderTypes, - AuthenticationSummary, - AwsSsoAuthentication, ConflictException, DataSourceType, IdpMetadata, InternalServerException, NetworkAccessConfiguration, NotificationDestinationType, - PermissionEntry, ResourceNotFoundException, RoleValues, - SamlAuthentication, SamlConfiguration, ServiceQuotaExceededException, ThrottlingException, - UpdateError, UpdateInstruction, User, ValidationException, - ValidationExceptionField, VpcConfiguration, WorkspaceDescription, WorkspaceSummary, @@ -136,37 +129,26 @@ export const se_CreateWorkspaceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces"; let body: any; - body = JSON.stringify({ - ...(input.accountAccessType != null && { accountAccessType: input.accountAccessType }), - ...(input.authenticationProviders != null && { - authenticationProviders: se_AuthenticationProviders(input.authenticationProviders, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.configuration != null && { configuration: __LazyJsonString.fromObject(input.configuration) }), - ...(input.networkAccessControl != null && { - networkAccessControl: se_NetworkAccessConfiguration(input.networkAccessControl, context), - }), - ...(input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName }), - ...(input.permissionType != null && { permissionType: input.permissionType }), - ...(input.stackSetName != null && { stackSetName: input.stackSetName }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.vpcConfiguration != null && { vpcConfiguration: se_VpcConfiguration(input.vpcConfiguration, context) }), - ...(input.workspaceDataSources != null && { - workspaceDataSources: se_DataSourceTypesList(input.workspaceDataSources, context), - }), - ...(input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription }), - ...(input.workspaceName != null && { workspaceName: input.workspaceName }), - ...(input.workspaceNotificationDestinations != null && { - workspaceNotificationDestinations: se_NotificationDestinationsList( - input.workspaceNotificationDestinations, - context - ), - }), - ...(input.workspaceOrganizationalUnits != null && { - workspaceOrganizationalUnits: se_OrganizationalUnitList(input.workspaceOrganizationalUnits, context), - }), - ...(input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn }), - }); + body = JSON.stringify( + take(input, { + accountAccessType: [], + authenticationProviders: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + configuration: (_) => __LazyJsonString.fromObject(_), + networkAccessControl: (_) => _json(_), + organizationRoleName: [], + permissionType: [], + stackSetName: [], + tags: (_) => _json(_), + vpcConfiguration: (_) => _json(_), + workspaceDataSources: (_) => _json(_), + workspaceDescription: [], + workspaceName: [], + workspaceNotificationDestinations: (_) => _json(_), + workspaceOrganizationalUnits: (_) => _json(_), + workspaceRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -193,11 +175,13 @@ export const se_CreateWorkspaceApiKeyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/apikeys"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.keyName != null && { keyName: input.keyName }), - ...(input.keyRole != null && { keyRole: input.keyRole }), - ...(input.secondsToLive != null && { secondsToLive: input.secondsToLive }), - }); + body = JSON.stringify( + take(input, { + keyName: [], + keyRole: [], + secondsToLive: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -453,9 +437,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -512,11 +498,11 @@ export const se_UpdatePermissionsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/permissions"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.updateInstructionBatch != null && { - updateInstructionBatch: se_UpdateInstructionBatch(input.updateInstructionBatch, context), - }), - }); + body = JSON.stringify( + take(input, { + updateInstructionBatch: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -543,35 +529,24 @@ export const se_UpdateWorkspaceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.accountAccessType != null && { accountAccessType: input.accountAccessType }), - ...(input.networkAccessControl != null && { - networkAccessControl: se_NetworkAccessConfiguration(input.networkAccessControl, context), - }), - ...(input.organizationRoleName != null && { organizationRoleName: input.organizationRoleName }), - ...(input.permissionType != null && { permissionType: input.permissionType }), - ...(input.removeNetworkAccessConfiguration != null && { - removeNetworkAccessConfiguration: input.removeNetworkAccessConfiguration, - }), - ...(input.removeVpcConfiguration != null && { removeVpcConfiguration: input.removeVpcConfiguration }), - ...(input.stackSetName != null && { stackSetName: input.stackSetName }), - ...(input.vpcConfiguration != null && { vpcConfiguration: se_VpcConfiguration(input.vpcConfiguration, context) }), - ...(input.workspaceDataSources != null && { - workspaceDataSources: se_DataSourceTypesList(input.workspaceDataSources, context), - }), - ...(input.workspaceDescription != null && { workspaceDescription: input.workspaceDescription }), - ...(input.workspaceName != null && { workspaceName: input.workspaceName }), - ...(input.workspaceNotificationDestinations != null && { - workspaceNotificationDestinations: se_NotificationDestinationsList( - input.workspaceNotificationDestinations, - context - ), - }), - ...(input.workspaceOrganizationalUnits != null && { - workspaceOrganizationalUnits: se_OrganizationalUnitList(input.workspaceOrganizationalUnits, context), - }), - ...(input.workspaceRoleArn != null && { workspaceRoleArn: input.workspaceRoleArn }), - }); + body = JSON.stringify( + take(input, { + accountAccessType: [], + networkAccessControl: (_) => _json(_), + organizationRoleName: [], + permissionType: [], + removeNetworkAccessConfiguration: [], + removeVpcConfiguration: [], + stackSetName: [], + vpcConfiguration: (_) => _json(_), + workspaceDataSources: (_) => _json(_), + workspaceDescription: [], + workspaceName: [], + workspaceNotificationDestinations: (_) => _json(_), + workspaceOrganizationalUnits: (_) => _json(_), + workspaceRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -598,14 +573,12 @@ export const se_UpdateWorkspaceAuthenticationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/authentication"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.authenticationProviders != null && { - authenticationProviders: se_AuthenticationProviders(input.authenticationProviders, context), - }), - ...(input.samlConfiguration != null && { - samlConfiguration: se_SamlConfiguration(input.samlConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + authenticationProviders: (_) => _json(_), + samlConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -632,9 +605,11 @@ export const se_UpdateWorkspaceConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.configuration != null && { configuration: __LazyJsonString.fromObject(input.configuration) }), - }); + body = JSON.stringify( + take(input, { + configuration: (_) => __LazyJsonString.fromObject(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -660,9 +635,10 @@ export const de_AssociateLicenseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -696,10 +672,9 @@ const de_AssociateLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -719,9 +694,10 @@ export const de_CreateWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -758,10 +734,9 @@ const de_CreateWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -781,15 +756,12 @@ export const de_CreateWorkspaceApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.key != null) { - contents.key = __expectString(data.key); - } - if (data.keyName != null) { - contents.keyName = __expectString(data.keyName); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + key: __expectString, + keyName: __expectString, + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -829,10 +801,9 @@ const de_CreateWorkspaceApiKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -852,9 +823,10 @@ export const de_DeleteWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -891,10 +863,9 @@ const de_DeleteWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -914,12 +885,11 @@ export const de_DeleteWorkspaceApiKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.keyName != null) { - contents.keyName = __expectString(data.keyName); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + keyName: __expectString, + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -956,10 +926,9 @@ const de_DeleteWorkspaceApiKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -979,9 +948,10 @@ export const de_DescribeWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1015,10 +985,9 @@ const de_DescribeWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1038,9 +1007,10 @@ export const de_DescribeWorkspaceAuthenticationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authentication != null) { - contents.authentication = de_AuthenticationDescription(data.authentication, context); - } + const doc = take(data, { + authentication: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1074,10 +1044,9 @@ const de_DescribeWorkspaceAuthenticationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1097,9 +1066,10 @@ export const de_DescribeWorkspaceConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuration != null) { - contents.configuration = new __LazyJsonString(data.configuration); - } + const doc = take(data, { + configuration: (_) => new __LazyJsonString(_), + }); + Object.assign(contents, doc); return contents; }; @@ -1130,10 +1100,9 @@ const de_DescribeWorkspaceConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1153,9 +1122,10 @@ export const de_DisassociateLicenseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1189,10 +1159,9 @@ const de_DisassociateLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1212,12 +1181,11 @@ export const de_ListPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissions != null) { - contents.permissions = de_PermissionEntryList(data.permissions, context); - } + const doc = take(data, { + nextToken: __expectString, + permissions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1251,10 +1219,9 @@ const de_ListPermissionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1274,9 +1241,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1310,10 +1278,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,12 +1300,11 @@ export const de_ListWorkspacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workspaces != null) { - contents.workspaces = de_WorkspaceList(data.workspaces, context); - } + const doc = take(data, { + nextToken: __expectString, + workspaces: (_) => de_WorkspaceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1366,10 +1332,9 @@ const de_ListWorkspacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1422,10 +1387,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,10 +1442,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1501,9 +1464,10 @@ export const de_UpdatePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_UpdateErrorList(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1537,10 +1501,9 @@ const de_UpdatePermissionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1560,9 +1523,10 @@ export const de_UpdateWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workspace != null) { - contents.workspace = de_WorkspaceDescription(data.workspace, context); - } + const doc = take(data, { + workspace: (_) => de_WorkspaceDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1599,10 +1563,9 @@ const de_UpdateWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1622,9 +1585,10 @@ export const de_UpdateWorkspaceAuthenticationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authentication != null) { - contents.authentication = de_AuthenticationDescription(data.authentication, context); - } + const doc = take(data, { + authentication: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1661,10 +1625,9 @@ const de_UpdateWorkspaceAuthenticationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1720,16 +1683,15 @@ const de_UpdateWorkspaceConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1739,9 +1701,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1755,15 +1718,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1785,9 +1745,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1804,15 +1765,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1829,21 +1787,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1862,15 +1813,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1884,15 +1832,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1900,685 +1845,138 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AllowedOrganizations - */ -const se_AllowedOrganizations = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedOrganizations omitted. -/** - * serializeAws_restJson1AssertionAttributes - */ -const se_AssertionAttributes = (input: AssertionAttributes, context: __SerdeContext): any => { - return { - ...(input.email != null && { email: input.email }), - ...(input.groups != null && { groups: input.groups }), - ...(input.login != null && { login: input.login }), - ...(input.name != null && { name: input.name }), - ...(input.org != null && { org: input.org }), - ...(input.role != null && { role: input.role }), - }; -}; +// se_AssertionAttributes omitted. -/** - * serializeAws_restJson1AuthenticationProviders - */ -const se_AuthenticationProviders = (input: (AuthenticationProviderTypes | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AuthenticationProviders omitted. -/** - * serializeAws_restJson1DataSourceTypesList - */ -const se_DataSourceTypesList = (input: (DataSourceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataSourceTypesList omitted. -/** - * serializeAws_restJson1IdpMetadata - */ -const se_IdpMetadata = (input: IdpMetadata, context: __SerdeContext): any => { - return IdpMetadata.visit(input, { - url: (value) => ({ url: value }), - xml: (value) => ({ xml: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_IdpMetadata omitted. -/** - * serializeAws_restJson1NetworkAccessConfiguration - */ -const se_NetworkAccessConfiguration = (input: NetworkAccessConfiguration, context: __SerdeContext): any => { - return { - ...(input.prefixListIds != null && { prefixListIds: se_PrefixListIds(input.prefixListIds, context) }), - ...(input.vpceIds != null && { vpceIds: se_VpceIds(input.vpceIds, context) }), - }; -}; +// se_NetworkAccessConfiguration omitted. -/** - * serializeAws_restJson1NotificationDestinationsList - */ -const se_NotificationDestinationsList = ( - input: (NotificationDestinationType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NotificationDestinationsList omitted. -/** - * serializeAws_restJson1OrganizationalUnitList - */ -const se_OrganizationalUnitList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OrganizationalUnitList omitted. -/** - * serializeAws_restJson1PrefixListIds - */ -const se_PrefixListIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PrefixListIds omitted. -/** - * serializeAws_restJson1RoleValueList - */ -const se_RoleValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RoleValueList omitted. -/** - * serializeAws_restJson1RoleValues - */ -const se_RoleValues = (input: RoleValues, context: __SerdeContext): any => { - return { - ...(input.admin != null && { admin: se_RoleValueList(input.admin, context) }), - ...(input.editor != null && { editor: se_RoleValueList(input.editor, context) }), - }; -}; +// se_RoleValues omitted. -/** - * serializeAws_restJson1SamlConfiguration - */ -const se_SamlConfiguration = (input: SamlConfiguration, context: __SerdeContext): any => { - return { - ...(input.allowedOrganizations != null && { - allowedOrganizations: se_AllowedOrganizations(input.allowedOrganizations, context), - }), - ...(input.assertionAttributes != null && { - assertionAttributes: se_AssertionAttributes(input.assertionAttributes, context), - }), - ...(input.idpMetadata != null && { idpMetadata: se_IdpMetadata(input.idpMetadata, context) }), - ...(input.loginValidityDuration != null && { loginValidityDuration: input.loginValidityDuration }), - ...(input.roleValues != null && { roleValues: se_RoleValues(input.roleValues, context) }), - }; -}; +// se_SamlConfiguration omitted. -/** - * serializeAws_restJson1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_restJson1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1UpdateInstruction - */ -const se_UpdateInstruction = (input: UpdateInstruction, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.role != null && { role: input.role }), - ...(input.users != null && { users: se_UserList(input.users, context) }), - }; -}; +// se_UpdateInstruction omitted. -/** - * serializeAws_restJson1UpdateInstructionBatch - */ -const se_UpdateInstructionBatch = (input: UpdateInstruction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateInstruction(entry, context); - }); -}; +// se_UpdateInstructionBatch omitted. -/** - * serializeAws_restJson1User - */ -const se_User = (input: User, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_User omitted. -/** - * serializeAws_restJson1UserList - */ -const se_UserList = (input: User[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_User(entry, context); - }); -}; +// se_UserList omitted. -/** - * serializeAws_restJson1VpcConfiguration - */ -const se_VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }), - }; -}; +// se_VpcConfiguration omitted. -/** - * serializeAws_restJson1VpceIds - */ -const se_VpceIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VpceIds omitted. -/** - * deserializeAws_restJson1AllowedOrganizations - */ -const de_AllowedOrganizations = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AllowedOrganizations omitted. -/** - * deserializeAws_restJson1AssertionAttributes - */ -const de_AssertionAttributes = (output: any, context: __SerdeContext): AssertionAttributes => { - return { - email: __expectString(output.email), - groups: __expectString(output.groups), - login: __expectString(output.login), - name: __expectString(output.name), - org: __expectString(output.org), - role: __expectString(output.role), - } as any; -}; +// de_AssertionAttributes omitted. -/** - * deserializeAws_restJson1AuthenticationDescription - */ -const de_AuthenticationDescription = (output: any, context: __SerdeContext): AuthenticationDescription => { - return { - awsSso: output.awsSso != null ? de_AwsSsoAuthentication(output.awsSso, context) : undefined, - providers: output.providers != null ? de_AuthenticationProviders(output.providers, context) : undefined, - saml: output.saml != null ? de_SamlAuthentication(output.saml, context) : undefined, - } as any; -}; +// de_AuthenticationDescription omitted. -/** - * deserializeAws_restJson1AuthenticationProviders - */ -const de_AuthenticationProviders = (output: any, context: __SerdeContext): (AuthenticationProviderTypes | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuthenticationProviders omitted. -/** - * deserializeAws_restJson1AuthenticationSummary - */ -const de_AuthenticationSummary = (output: any, context: __SerdeContext): AuthenticationSummary => { - return { - providers: output.providers != null ? de_AuthenticationProviders(output.providers, context) : undefined, - samlConfigurationStatus: __expectString(output.samlConfigurationStatus), - } as any; -}; +// de_AuthenticationSummary omitted. -/** - * deserializeAws_restJson1AwsSsoAuthentication - */ -const de_AwsSsoAuthentication = (output: any, context: __SerdeContext): AwsSsoAuthentication => { - return { - ssoClientId: __expectString(output.ssoClientId), - } as any; -}; +// de_AwsSsoAuthentication omitted. -/** - * deserializeAws_restJson1DataSourceTypesList - */ -const de_DataSourceTypesList = (output: any, context: __SerdeContext): (DataSourceType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DataSourceTypesList omitted. -/** - * deserializeAws_restJson1IdpMetadata - */ -const de_IdpMetadata = (output: any, context: __SerdeContext): IdpMetadata => { - if (__expectString(output.url) !== undefined) { - return { url: __expectString(output.url) as any }; - } - if (__expectString(output.xml) !== undefined) { - return { xml: __expectString(output.xml) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_IdpMetadata omitted. -/** - * deserializeAws_restJson1NetworkAccessConfiguration - */ -const de_NetworkAccessConfiguration = (output: any, context: __SerdeContext): NetworkAccessConfiguration => { - return { - prefixListIds: output.prefixListIds != null ? de_PrefixListIds(output.prefixListIds, context) : undefined, - vpceIds: output.vpceIds != null ? de_VpceIds(output.vpceIds, context) : undefined, - } as any; -}; +// de_NetworkAccessConfiguration omitted. -/** - * deserializeAws_restJson1NotificationDestinationsList - */ -const de_NotificationDestinationsList = ( - output: any, - context: __SerdeContext -): (NotificationDestinationType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotificationDestinationsList omitted. -/** - * deserializeAws_restJson1OrganizationalUnitList - */ -const de_OrganizationalUnitList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OrganizationalUnitList omitted. -/** - * deserializeAws_restJson1PermissionEntry - */ -const de_PermissionEntry = (output: any, context: __SerdeContext): PermissionEntry => { - return { - role: __expectString(output.role), - user: output.user != null ? de_User(output.user, context) : undefined, - } as any; -}; +// de_PermissionEntry omitted. -/** - * deserializeAws_restJson1PermissionEntryList - */ -const de_PermissionEntryList = (output: any, context: __SerdeContext): PermissionEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PermissionEntry(entry, context); - }); - return retVal; -}; +// de_PermissionEntryList omitted. -/** - * deserializeAws_restJson1PrefixListIds - */ -const de_PrefixListIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PrefixListIds omitted. -/** - * deserializeAws_restJson1RoleValueList - */ -const de_RoleValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RoleValueList omitted. -/** - * deserializeAws_restJson1RoleValues - */ -const de_RoleValues = (output: any, context: __SerdeContext): RoleValues => { - return { - admin: output.admin != null ? de_RoleValueList(output.admin, context) : undefined, - editor: output.editor != null ? de_RoleValueList(output.editor, context) : undefined, - } as any; -}; +// de_RoleValues omitted. -/** - * deserializeAws_restJson1SamlAuthentication - */ -const de_SamlAuthentication = (output: any, context: __SerdeContext): SamlAuthentication => { - return { - configuration: output.configuration != null ? de_SamlConfiguration(output.configuration, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_SamlAuthentication omitted. -/** - * deserializeAws_restJson1SamlConfiguration - */ -const de_SamlConfiguration = (output: any, context: __SerdeContext): SamlConfiguration => { - return { - allowedOrganizations: - output.allowedOrganizations != null ? de_AllowedOrganizations(output.allowedOrganizations, context) : undefined, - assertionAttributes: - output.assertionAttributes != null ? de_AssertionAttributes(output.assertionAttributes, context) : undefined, - idpMetadata: output.idpMetadata != null ? de_IdpMetadata(__expectUnion(output.idpMetadata), context) : undefined, - loginValidityDuration: __expectInt32(output.loginValidityDuration), - roleValues: output.roleValues != null ? de_RoleValues(output.roleValues, context) : undefined, - } as any; -}; +// de_SamlConfiguration omitted. -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1UpdateError - */ -const de_UpdateError = (output: any, context: __SerdeContext): UpdateError => { - return { - causedBy: output.causedBy != null ? de_UpdateInstruction(output.causedBy, context) : undefined, - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_UpdateError omitted. -/** - * deserializeAws_restJson1UpdateErrorList - */ -const de_UpdateErrorList = (output: any, context: __SerdeContext): UpdateError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateError(entry, context); - }); - return retVal; -}; +// de_UpdateErrorList omitted. -/** - * deserializeAws_restJson1UpdateInstruction - */ -const de_UpdateInstruction = (output: any, context: __SerdeContext): UpdateInstruction => { - return { - action: __expectString(output.action), - role: __expectString(output.role), - users: output.users != null ? de_UserList(output.users, context) : undefined, - } as any; -}; +// de_UpdateInstruction omitted. -/** - * deserializeAws_restJson1User - */ -const de_User = (output: any, context: __SerdeContext): User => { - return { - id: __expectString(output.id), - type: __expectString(output.type), - } as any; -}; +// de_User omitted. -/** - * deserializeAws_restJson1UserList - */ -const de_UserList = (output: any, context: __SerdeContext): User[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_User(entry, context); - }); - return retVal; -}; +// de_UserList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1VpcConfiguration - */ -const de_VpcConfiguration = (output: any, context: __SerdeContext): VpcConfiguration => { - return { - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined, - } as any; -}; +// de_VpcConfiguration omitted. -/** - * deserializeAws_restJson1VpceIds - */ -const de_VpceIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VpceIds omitted. /** * deserializeAws_restJson1WorkspaceDescription */ const de_WorkspaceDescription = (output: any, context: __SerdeContext): WorkspaceDescription => { - return { - accountAccessType: __expectString(output.accountAccessType), - authentication: - output.authentication != null ? de_AuthenticationSummary(output.authentication, context) : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - dataSources: output.dataSources != null ? de_DataSourceTypesList(output.dataSources, context) : undefined, - description: __expectString(output.description), - endpoint: __expectString(output.endpoint), - freeTrialConsumed: __expectBoolean(output.freeTrialConsumed), - freeTrialExpiration: - output.freeTrialExpiration != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.freeTrialExpiration))) - : undefined, - grafanaVersion: __expectString(output.grafanaVersion), - id: __expectString(output.id), - licenseExpiration: - output.licenseExpiration != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.licenseExpiration))) - : undefined, - licenseType: __expectString(output.licenseType), - modified: - output.modified != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modified))) : undefined, - name: __expectString(output.name), - networkAccessControl: - output.networkAccessControl != null - ? de_NetworkAccessConfiguration(output.networkAccessControl, context) - : undefined, - notificationDestinations: - output.notificationDestinations != null - ? de_NotificationDestinationsList(output.notificationDestinations, context) - : undefined, - organizationRoleName: __expectString(output.organizationRoleName), - organizationalUnits: - output.organizationalUnits != null ? de_OrganizationalUnitList(output.organizationalUnits, context) : undefined, - permissionType: __expectString(output.permissionType), - stackSetName: __expectString(output.stackSetName), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - vpcConfiguration: - output.vpcConfiguration != null ? de_VpcConfiguration(output.vpcConfiguration, context) : undefined, - workspaceRoleArn: __expectString(output.workspaceRoleArn), - } as any; + return take(output, { + accountAccessType: __expectString, + authentication: _json, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataSources: _json, + description: __expectString, + endpoint: __expectString, + freeTrialConsumed: __expectBoolean, + freeTrialExpiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + grafanaVersion: __expectString, + id: __expectString, + licenseExpiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + licenseType: __expectString, + modified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + networkAccessControl: _json, + notificationDestinations: _json, + organizationRoleName: __expectString, + organizationalUnits: _json, + permissionType: __expectString, + stackSetName: __expectString, + status: __expectString, + tags: _json, + vpcConfiguration: _json, + workspaceRoleArn: __expectString, + }) as any; }; /** @@ -2588,9 +1986,6 @@ const de_WorkspaceList = (output: any, context: __SerdeContext): WorkspaceSummar const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkspaceSummary(entry, context); }); return retVal; @@ -2600,25 +1995,19 @@ const de_WorkspaceList = (output: any, context: __SerdeContext): WorkspaceSummar * deserializeAws_restJson1WorkspaceSummary */ const de_WorkspaceSummary = (output: any, context: __SerdeContext): WorkspaceSummary => { - return { - authentication: - output.authentication != null ? de_AuthenticationSummary(output.authentication, context) : undefined, - created: - output.created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.created))) : undefined, - description: __expectString(output.description), - endpoint: __expectString(output.endpoint), - grafanaVersion: __expectString(output.grafanaVersion), - id: __expectString(output.id), - modified: - output.modified != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modified))) : undefined, - name: __expectString(output.name), - notificationDestinations: - output.notificationDestinations != null - ? de_NotificationDestinationsList(output.notificationDestinations, context) - : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + authentication: _json, + created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + endpoint: __expectString, + grafanaVersion: __expectString, + id: __expectString, + modified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + notificationDestinations: _json, + status: __expectString, + tags: _json, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-greengrass/src/protocols/Aws_restJson1.ts b/clients/client-greengrass/src/protocols/Aws_restJson1.ts index bd04037a662a..db8c69329749 100644 --- a/clients/client-greengrass/src/protocols/Aws_restJson1.ts +++ b/clients/client-greengrass/src/protocols/Aws_restJson1.ts @@ -1,16 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -341,19 +341,14 @@ import { import { GreengrassServiceException as __BaseException } from "../models/GreengrassServiceException"; import { BadRequestException, - BulkDeployment, - BulkDeploymentMetrics, - BulkDeploymentResult, ConnectivityInfo, Connector, ConnectorDefinitionVersion, Core, CoreDefinitionVersion, DefinitionInformation, - Deployment, Device, DeviceDefinitionVersion, - ErrorDetail, Function, FunctionConfiguration, FunctionConfigurationEnvironment, @@ -362,8 +357,6 @@ import { FunctionDefinitionVersion, FunctionExecutionConfig, FunctionRunAsConfig, - GroupCertificateAuthorityProperties, - GroupInformation, GroupOwnerSetting, GroupVersion, InternalServerErrorException, @@ -376,15 +369,12 @@ import { ResourceDataContainer, ResourceDefinitionVersion, ResourceDownloadOwnerSetting, - RuntimeConfiguration, S3MachineLearningModelResourceData, SageMakerMachineLearningModelResourceData, SecretsManagerSecretResourceData, Subscription, SubscriptionDefinitionVersion, - TelemetryConfiguration, TelemetryConfigurationUpdate, - VersionInformation, } from "../models/models_0"; /** @@ -402,9 +392,11 @@ export const se_AssociateRoleToGroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}/role"; resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId!, "{GroupId}", false); let body: any; - body = JSON.stringify({ - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }); + body = JSON.stringify( + take(input, { + RoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -430,9 +422,11 @@ export const se_AssociateServiceRoleToAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole"; let body: any; - body = JSON.stringify({ - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }); + body = JSON.stringify( + take(input, { + RoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -459,13 +453,13 @@ export const se_CreateConnectorDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/connectors"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { - InitialVersion: se_ConnectorDefinitionVersion(input.InitialVersion, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -501,9 +495,11 @@ export const se_CreateConnectorDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Connectors != null && { Connectors: se___listOfConnector(input.Connectors, context) }), - }); + body = JSON.stringify( + take(input, { + Connectors: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -530,11 +526,13 @@ export const se_CreateCoreDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/cores"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { InitialVersion: se_CoreDefinitionVersion(input.InitialVersion, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -570,9 +568,11 @@ export const se_CreateCoreDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Cores != null && { Cores: se___listOfCore(input.Cores, context) }), - }); + body = JSON.stringify( + take(input, { + Cores: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -600,11 +600,13 @@ export const se_CreateDeploymentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}/deployments"; resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId!, "{GroupId}", false); let body: any; - body = JSON.stringify({ - ...(input.DeploymentId != null && { DeploymentId: input.DeploymentId }), - ...(input.DeploymentType != null && { DeploymentType: input.DeploymentType }), - ...(input.GroupVersionId != null && { GroupVersionId: input.GroupVersionId }), - }); + body = JSON.stringify( + take(input, { + DeploymentId: [], + DeploymentType: [], + GroupVersionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -631,11 +633,13 @@ export const se_CreateDeviceDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/devices"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { InitialVersion: se_DeviceDefinitionVersion(input.InitialVersion, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -671,9 +675,11 @@ export const se_CreateDeviceDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Devices != null && { Devices: se___listOfDevice(input.Devices, context) }), - }); + body = JSON.stringify( + take(input, { + Devices: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -700,13 +706,13 @@ export const se_CreateFunctionDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/functions"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { - InitialVersion: se_FunctionDefinitionVersion(input.InitialVersion, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -742,10 +748,12 @@ export const se_CreateFunctionDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DefaultConfig != null && { DefaultConfig: se_FunctionDefaultConfig(input.DefaultConfig, context) }), - ...(input.Functions != null && { Functions: se___listOfFunction(input.Functions, context) }), - }); + body = JSON.stringify( + take(input, { + DefaultConfig: (_) => _json(_), + Functions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -771,11 +779,13 @@ export const se_CreateGroupCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { InitialVersion: se_GroupVersion(input.InitialVersion, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -830,23 +840,17 @@ export const se_CreateGroupVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId!, "{GroupId}", false); let body: any; - body = JSON.stringify({ - ...(input.ConnectorDefinitionVersionArn != null && { - ConnectorDefinitionVersionArn: input.ConnectorDefinitionVersionArn, - }), - ...(input.CoreDefinitionVersionArn != null && { CoreDefinitionVersionArn: input.CoreDefinitionVersionArn }), - ...(input.DeviceDefinitionVersionArn != null && { DeviceDefinitionVersionArn: input.DeviceDefinitionVersionArn }), - ...(input.FunctionDefinitionVersionArn != null && { - FunctionDefinitionVersionArn: input.FunctionDefinitionVersionArn, - }), - ...(input.LoggerDefinitionVersionArn != null && { LoggerDefinitionVersionArn: input.LoggerDefinitionVersionArn }), - ...(input.ResourceDefinitionVersionArn != null && { - ResourceDefinitionVersionArn: input.ResourceDefinitionVersionArn, - }), - ...(input.SubscriptionDefinitionVersionArn != null && { - SubscriptionDefinitionVersionArn: input.SubscriptionDefinitionVersionArn, - }), - }); + body = JSON.stringify( + take(input, { + ConnectorDefinitionVersionArn: [], + CoreDefinitionVersionArn: [], + DeviceDefinitionVersionArn: [], + FunctionDefinitionVersionArn: [], + LoggerDefinitionVersionArn: [], + ResourceDefinitionVersionArn: [], + SubscriptionDefinitionVersionArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -873,11 +877,13 @@ export const se_CreateLoggerDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/loggers"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { InitialVersion: se_LoggerDefinitionVersion(input.InitialVersion, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -913,9 +919,11 @@ export const se_CreateLoggerDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Loggers != null && { Loggers: se___listOfLogger(input.Loggers, context) }), - }); + body = JSON.stringify( + take(input, { + Loggers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -942,13 +950,13 @@ export const se_CreateResourceDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/resources"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { - InitialVersion: se_ResourceDefinitionVersion(input.InitialVersion, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -984,9 +992,11 @@ export const se_CreateResourceDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Resources != null && { Resources: se___listOfResource(input.Resources, context) }), - }); + body = JSON.stringify( + take(input, { + Resources: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1012,16 +1022,16 @@ export const se_CreateSoftwareUpdateJobCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/updates"; let body: any; - body = JSON.stringify({ - ...(input.S3UrlSignerRole != null && { S3UrlSignerRole: input.S3UrlSignerRole }), - ...(input.SoftwareToUpdate != null && { SoftwareToUpdate: input.SoftwareToUpdate }), - ...(input.UpdateAgentLogLevel != null && { UpdateAgentLogLevel: input.UpdateAgentLogLevel }), - ...(input.UpdateTargets != null && { UpdateTargets: se_UpdateTargets(input.UpdateTargets, context) }), - ...(input.UpdateTargetsArchitecture != null && { UpdateTargetsArchitecture: input.UpdateTargetsArchitecture }), - ...(input.UpdateTargetsOperatingSystem != null && { - UpdateTargetsOperatingSystem: input.UpdateTargetsOperatingSystem, - }), - }); + body = JSON.stringify( + take(input, { + S3UrlSignerRole: [], + SoftwareToUpdate: [], + UpdateAgentLogLevel: [], + UpdateTargets: (_) => _json(_), + UpdateTargetsArchitecture: [], + UpdateTargetsOperatingSystem: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1048,13 +1058,13 @@ export const se_CreateSubscriptionDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/definition/subscriptions"; let body: any; - body = JSON.stringify({ - ...(input.InitialVersion != null && { - InitialVersion: se_SubscriptionDefinitionVersion(input.InitialVersion, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + InitialVersion: (_) => _json(_), + Name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1090,9 +1100,11 @@ export const se_CreateSubscriptionDefinitionVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Subscriptions != null && { Subscriptions: se___listOfSubscription(input.Subscriptions, context) }), - }); + body = JSON.stringify( + take(input, { + Subscriptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2876,9 +2888,11 @@ export const se_ResetDeploymentsCommand = async ( "/greengrass/groups/{GroupId}/deployments/$reset"; resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId!, "{GroupId}", false); let body: any; - body = JSON.stringify({ - ...(input.Force != null && { Force: input.Force }), - }); + body = JSON.stringify( + take(input, { + Force: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2905,11 +2919,13 @@ export const se_StartBulkDeploymentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/bulk/deployments"; let body: any; - body = JSON.stringify({ - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.InputFileUri != null && { InputFileUri: input.InputFileUri }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + ExecutionRoleArn: [], + InputFileUri: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2967,9 +2983,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3027,11 +3045,11 @@ export const se_UpdateConnectivityInfoCommand = async ( "/greengrass/things/{ThingName}/connectivityInfo"; resolvedPath = __resolvedPath(resolvedPath, input, "ThingName", () => input.ThingName!, "{ThingName}", false); let body: any; - body = JSON.stringify({ - ...(input.ConnectivityInfo != null && { - ConnectivityInfo: se___listOfConnectivityInfo(input.ConnectivityInfo, context), - }), - }); + body = JSON.stringify( + take(input, { + ConnectivityInfo: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3066,9 +3084,11 @@ export const se_UpdateConnectorDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3103,9 +3123,11 @@ export const se_UpdateCoreDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3140,9 +3162,11 @@ export const se_UpdateDeviceDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3177,9 +3201,11 @@ export const se_UpdateFunctionDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3206,9 +3232,11 @@ export const se_UpdateGroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/groups/{GroupId}"; resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId!, "{GroupId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3236,11 +3264,11 @@ export const se_UpdateGroupCertificateConfigurationCommand = async ( "/greengrass/groups/{GroupId}/certificateauthorities/configuration/expiry"; resolvedPath = __resolvedPath(resolvedPath, input, "GroupId", () => input.GroupId!, "{GroupId}", false); let body: any; - body = JSON.stringify({ - ...(input.CertificateExpiryInMilliseconds != null && { - CertificateExpiryInMilliseconds: input.CertificateExpiryInMilliseconds, - }), - }); + body = JSON.stringify( + take(input, { + CertificateExpiryInMilliseconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3275,9 +3303,11 @@ export const se_UpdateLoggerDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3312,9 +3342,11 @@ export const se_UpdateResourceDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3349,9 +3381,11 @@ export const se_UpdateSubscriptionDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3379,11 +3413,11 @@ export const se_UpdateThingRuntimeConfigurationCommand = async ( "/greengrass/things/{ThingName}/runtimeconfig"; resolvedPath = __resolvedPath(resolvedPath, input, "ThingName", () => input.ThingName!, "{ThingName}", false); let body: any; - body = JSON.stringify({ - ...(input.TelemetryConfiguration != null && { - TelemetryConfiguration: se_TelemetryConfigurationUpdate(input.TelemetryConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + TelemetryConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3409,9 +3443,10 @@ export const de_AssociateRoleToGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociatedAt != null) { - contents.AssociatedAt = __expectString(data.AssociatedAt); - } + const doc = take(data, { + AssociatedAt: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3436,10 +3471,9 @@ const de_AssociateRoleToGroupCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3459,9 +3493,10 @@ export const de_AssociateServiceRoleToAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociatedAt != null) { - contents.AssociatedAt = __expectString(data.AssociatedAt); - } + const doc = take(data, { + AssociatedAt: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3486,10 +3521,9 @@ const de_AssociateServiceRoleToAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3509,27 +3543,16 @@ export const de_CreateConnectorDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3551,10 +3574,9 @@ const de_CreateConnectorDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3574,18 +3596,13 @@ export const de_CreateConnectorDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3607,10 +3624,9 @@ const de_CreateConnectorDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3630,27 +3646,16 @@ export const de_CreateCoreDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3672,10 +3677,9 @@ const de_CreateCoreDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3695,18 +3699,13 @@ export const de_CreateCoreDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3728,10 +3727,9 @@ const de_CreateCoreDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3751,12 +3749,11 @@ export const de_CreateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeploymentArn != null) { - contents.DeploymentArn = __expectString(data.DeploymentArn); - } - if (data.DeploymentId != null) { - contents.DeploymentId = __expectString(data.DeploymentId); - } + const doc = take(data, { + DeploymentArn: __expectString, + DeploymentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3778,10 +3775,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3801,27 +3797,16 @@ export const de_CreateDeviceDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3843,10 +3828,9 @@ const de_CreateDeviceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3866,18 +3850,13 @@ export const de_CreateDeviceDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3899,10 +3878,9 @@ const de_CreateDeviceDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3922,27 +3900,16 @@ export const de_CreateFunctionDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3964,10 +3931,9 @@ const de_CreateFunctionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3987,18 +3953,13 @@ export const de_CreateFunctionDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4020,10 +3981,9 @@ const de_CreateFunctionDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4043,27 +4003,16 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4085,10 +4034,9 @@ const de_CreateGroupCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4108,9 +4056,10 @@ export const de_CreateGroupCertificateAuthorityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupCertificateAuthorityArn != null) { - contents.GroupCertificateAuthorityArn = __expectString(data.GroupCertificateAuthorityArn); - } + const doc = take(data, { + GroupCertificateAuthorityArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4135,10 +4084,9 @@ const de_CreateGroupCertificateAuthorityCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4158,18 +4106,13 @@ export const de_CreateGroupVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4191,10 +4134,9 @@ const de_CreateGroupVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4214,27 +4156,16 @@ export const de_CreateLoggerDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4256,10 +4187,9 @@ const de_CreateLoggerDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4279,18 +4209,13 @@ export const de_CreateLoggerDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4312,10 +4237,9 @@ const de_CreateLoggerDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4335,27 +4259,16 @@ export const de_CreateResourceDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4377,10 +4290,9 @@ const de_CreateResourceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4400,18 +4312,13 @@ export const de_CreateResourceDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4433,10 +4340,9 @@ const de_CreateResourceDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4456,15 +4362,12 @@ export const de_CreateSoftwareUpdateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IotJobArn != null) { - contents.IotJobArn = __expectString(data.IotJobArn); - } - if (data.IotJobId != null) { - contents.IotJobId = __expectString(data.IotJobId); - } - if (data.PlatformSoftwareVersion != null) { - contents.PlatformSoftwareVersion = __expectString(data.PlatformSoftwareVersion); - } + const doc = take(data, { + IotJobArn: __expectString, + IotJobId: __expectString, + PlatformSoftwareVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4489,10 +4392,9 @@ const de_CreateSoftwareUpdateJobCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4512,27 +4414,16 @@ export const de_CreateSubscriptionDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4554,10 +4445,9 @@ const de_CreateSubscriptionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4577,18 +4467,13 @@ export const de_CreateSubscriptionDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4610,10 +4495,9 @@ const de_CreateSubscriptionDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4654,10 +4538,9 @@ const de_DeleteConnectorDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4698,10 +4581,9 @@ const de_DeleteCoreDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4742,10 +4624,9 @@ const de_DeleteDeviceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4786,10 +4667,9 @@ const de_DeleteFunctionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4830,10 +4710,9 @@ const de_DeleteGroupCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4874,10 +4753,9 @@ const de_DeleteLoggerDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4918,10 +4796,9 @@ const de_DeleteResourceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4962,10 +4839,9 @@ const de_DeleteSubscriptionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4985,9 +4861,10 @@ export const de_DisassociateRoleFromGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DisassociatedAt != null) { - contents.DisassociatedAt = __expectString(data.DisassociatedAt); - } + const doc = take(data, { + DisassociatedAt: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5012,10 +4889,9 @@ const de_DisassociateRoleFromGroupCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5035,9 +4911,10 @@ export const de_DisassociateServiceRoleFromAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DisassociatedAt != null) { - contents.DisassociatedAt = __expectString(data.DisassociatedAt); - } + const doc = take(data, { + DisassociatedAt: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5059,10 +4936,9 @@ const de_DisassociateServiceRoleFromAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5082,12 +4958,11 @@ export const de_GetAssociatedRoleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociatedAt != null) { - contents.AssociatedAt = __expectString(data.AssociatedAt); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } + const doc = take(data, { + AssociatedAt: __expectString, + RoleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5112,10 +4987,9 @@ const de_GetAssociatedRoleCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5135,24 +5009,15 @@ export const de_GetBulkDeploymentStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BulkDeploymentMetrics != null) { - contents.BulkDeploymentMetrics = de_BulkDeploymentMetrics(data.BulkDeploymentMetrics, context); - } - if (data.BulkDeploymentStatus != null) { - contents.BulkDeploymentStatus = __expectString(data.BulkDeploymentStatus); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectString(data.CreatedAt); - } - if (data.ErrorDetails != null) { - contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context); - } - if (data.ErrorMessage != null) { - contents.ErrorMessage = __expectString(data.ErrorMessage); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + BulkDeploymentMetrics: _json, + BulkDeploymentStatus: __expectString, + CreatedAt: __expectString, + ErrorDetails: _json, + ErrorMessage: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5174,10 +5039,9 @@ const de_GetBulkDeploymentStatusCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5197,12 +5061,11 @@ export const de_GetConnectivityInfoCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectivityInfo != null) { - contents.ConnectivityInfo = de___listOfConnectivityInfo(data.ConnectivityInfo, context); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ConnectivityInfo: _json, + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); return contents; }; @@ -5227,10 +5090,9 @@ const de_GetConnectivityInfoCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5250,30 +5112,17 @@ export const de_GetConnectorDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5295,10 +5144,9 @@ const de_GetConnectorDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5318,24 +5166,15 @@ export const de_GetConnectorDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_ConnectorDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + NextToken: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5357,10 +5196,9 @@ const de_GetConnectorDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5380,30 +5218,17 @@ export const de_GetCoreDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5425,10 +5250,9 @@ const de_GetCoreDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5448,24 +5272,15 @@ export const de_GetCoreDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_CoreDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + NextToken: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5487,10 +5302,9 @@ const de_GetCoreDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5510,21 +5324,14 @@ export const de_GetDeploymentStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeploymentStatus != null) { - contents.DeploymentStatus = __expectString(data.DeploymentStatus); - } - if (data.DeploymentType != null) { - contents.DeploymentType = __expectString(data.DeploymentType); - } - if (data.ErrorDetails != null) { - contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context); - } - if (data.ErrorMessage != null) { - contents.ErrorMessage = __expectString(data.ErrorMessage); - } - if (data.UpdatedAt != null) { - contents.UpdatedAt = __expectString(data.UpdatedAt); - } + const doc = take(data, { + DeploymentStatus: __expectString, + DeploymentType: __expectString, + ErrorDetails: _json, + ErrorMessage: __expectString, + UpdatedAt: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5546,10 +5353,9 @@ const de_GetDeploymentStatusCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5569,30 +5375,17 @@ export const de_GetDeviceDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5614,10 +5407,9 @@ const de_GetDeviceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5637,24 +5429,15 @@ export const de_GetDeviceDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_DeviceDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + NextToken: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5676,10 +5459,9 @@ const de_GetDeviceDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5699,30 +5481,17 @@ export const de_GetFunctionDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5744,10 +5513,9 @@ const de_GetFunctionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5767,24 +5535,15 @@ export const de_GetFunctionDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_FunctionDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + NextToken: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5806,10 +5565,9 @@ const de_GetFunctionDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5829,30 +5587,17 @@ export const de_GetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5874,10 +5619,9 @@ const de_GetGroupCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5897,15 +5641,12 @@ export const de_GetGroupCertificateAuthorityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupCertificateAuthorityArn != null) { - contents.GroupCertificateAuthorityArn = __expectString(data.GroupCertificateAuthorityArn); - } - if (data.GroupCertificateAuthorityId != null) { - contents.GroupCertificateAuthorityId = __expectString(data.GroupCertificateAuthorityId); - } - if (data.PemEncodedCertificate != null) { - contents.PemEncodedCertificate = __expectString(data.PemEncodedCertificate); - } + const doc = take(data, { + GroupCertificateAuthorityArn: __expectString, + GroupCertificateAuthorityId: __expectString, + PemEncodedCertificate: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5930,10 +5671,9 @@ const de_GetGroupCertificateAuthorityCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5953,15 +5693,12 @@ export const de_GetGroupCertificateConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CertificateAuthorityExpiryInMilliseconds != null) { - contents.CertificateAuthorityExpiryInMilliseconds = __expectString(data.CertificateAuthorityExpiryInMilliseconds); - } - if (data.CertificateExpiryInMilliseconds != null) { - contents.CertificateExpiryInMilliseconds = __expectString(data.CertificateExpiryInMilliseconds); - } - if (data.GroupId != null) { - contents.GroupId = __expectString(data.GroupId); - } + const doc = take(data, { + CertificateAuthorityExpiryInMilliseconds: __expectString, + CertificateExpiryInMilliseconds: __expectString, + GroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5986,10 +5723,9 @@ const de_GetGroupCertificateConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6009,21 +5745,14 @@ export const de_GetGroupVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_GroupVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6045,10 +5774,9 @@ const de_GetGroupVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6068,30 +5796,17 @@ export const de_GetLoggerDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6113,10 +5828,9 @@ const de_GetLoggerDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6136,21 +5850,14 @@ export const de_GetLoggerDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_LoggerDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6172,10 +5879,9 @@ const de_GetLoggerDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6195,30 +5901,17 @@ export const de_GetResourceDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6240,10 +5933,9 @@ const de_GetResourceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6263,21 +5955,14 @@ export const de_GetResourceDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_ResourceDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6299,10 +5984,9 @@ const de_GetResourceDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6322,12 +6006,11 @@ export const de_GetServiceRoleForAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociatedAt != null) { - contents.AssociatedAt = __expectString(data.AssociatedAt); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } + const doc = take(data, { + AssociatedAt: __expectString, + RoleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6349,10 +6032,9 @@ const de_GetServiceRoleForAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6372,30 +6054,17 @@ export const de_GetSubscriptionDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectString(data.LastUpdatedTimestamp); - } - if (data.LatestVersion != null) { - contents.LatestVersion = __expectString(data.LatestVersion); - } - if (data.LatestVersionArn != null) { - contents.LatestVersionArn = __expectString(data.LatestVersionArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6417,10 +6086,9 @@ const de_GetSubscriptionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6440,24 +6108,15 @@ export const de_GetSubscriptionDefinitionVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTimestamp != null) { - contents.CreationTimestamp = __expectString(data.CreationTimestamp); - } - if (data.Definition != null) { - contents.Definition = de_SubscriptionDefinitionVersion(data.Definition, context); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Arn: __expectString, + CreationTimestamp: __expectString, + Definition: _json, + Id: __expectString, + NextToken: __expectString, + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6479,10 +6138,9 @@ const de_GetSubscriptionDefinitionVersionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6502,9 +6160,10 @@ export const de_GetThingRuntimeConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RuntimeConfiguration != null) { - contents.RuntimeConfiguration = de_RuntimeConfiguration(data.RuntimeConfiguration, context); - } + const doc = take(data, { + RuntimeConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6529,10 +6188,9 @@ const de_GetThingRuntimeConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6552,12 +6210,11 @@ export const de_ListBulkDeploymentDetailedReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Deployments != null) { - contents.Deployments = de_BulkDeploymentResults(data.Deployments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Deployments: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6579,10 +6236,9 @@ const de_ListBulkDeploymentDetailedReportsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6602,12 +6258,11 @@ export const de_ListBulkDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BulkDeployments != null) { - contents.BulkDeployments = de_BulkDeployments(data.BulkDeployments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + BulkDeployments: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6629,10 +6284,9 @@ const de_ListBulkDeploymentsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6652,12 +6306,11 @@ export const de_ListConnectorDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6674,10 +6327,9 @@ const de_ListConnectorDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6696,12 +6348,11 @@ export const de_ListConnectorDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6723,10 +6374,9 @@ const de_ListConnectorDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6746,12 +6396,11 @@ export const de_ListCoreDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6768,10 +6417,9 @@ const de_ListCoreDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6790,12 +6438,11 @@ export const de_ListCoreDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6817,10 +6464,9 @@ const de_ListCoreDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6840,12 +6486,11 @@ export const de_ListDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Deployments != null) { - contents.Deployments = de_Deployments(data.Deployments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Deployments: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6867,10 +6512,9 @@ const de_ListDeploymentsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6890,12 +6534,11 @@ export const de_ListDeviceDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6912,10 +6555,9 @@ const de_ListDeviceDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6934,12 +6576,11 @@ export const de_ListDeviceDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6961,10 +6602,9 @@ const de_ListDeviceDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6984,12 +6624,11 @@ export const de_ListFunctionDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7006,10 +6645,9 @@ const de_ListFunctionDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7028,12 +6666,11 @@ export const de_ListFunctionDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7055,10 +6692,9 @@ const de_ListFunctionDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7078,12 +6714,10 @@ export const de_ListGroupCertificateAuthoritiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupCertificateAuthorities != null) { - contents.GroupCertificateAuthorities = de___listOfGroupCertificateAuthorityProperties( - data.GroupCertificateAuthorities, - context - ); - } + const doc = take(data, { + GroupCertificateAuthorities: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7108,10 +6742,9 @@ const de_ListGroupCertificateAuthoritiesCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7131,12 +6764,11 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Groups != null) { - contents.Groups = de___listOfGroupInformation(data.Groups, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Groups: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7153,10 +6785,9 @@ const de_ListGroupsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7175,12 +6806,11 @@ export const de_ListGroupVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7202,10 +6832,9 @@ const de_ListGroupVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7225,12 +6854,11 @@ export const de_ListLoggerDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7247,10 +6875,9 @@ const de_ListLoggerDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7269,12 +6896,11 @@ export const de_ListLoggerDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7296,10 +6922,9 @@ const de_ListLoggerDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7319,12 +6944,11 @@ export const de_ListResourceDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7341,10 +6965,9 @@ const de_ListResourceDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7363,12 +6986,11 @@ export const de_ListResourceDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7390,10 +7012,9 @@ const de_ListResourceDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7413,12 +7034,11 @@ export const de_ListSubscriptionDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definitions != null) { - contents.Definitions = de___listOfDefinitionInformation(data.Definitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Definitions: (_) => de___listOfDefinitionInformation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7435,10 +7055,9 @@ const de_ListSubscriptionDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7457,12 +7076,11 @@ export const de_ListSubscriptionDefinitionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de___listOfVersionInformation(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7484,10 +7102,9 @@ const de_ListSubscriptionDefinitionVersionsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7507,9 +7124,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7531,10 +7149,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7554,12 +7171,11 @@ export const de_ResetDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeploymentArn != null) { - contents.DeploymentArn = __expectString(data.DeploymentArn); - } - if (data.DeploymentId != null) { - contents.DeploymentId = __expectString(data.DeploymentId); - } + const doc = take(data, { + DeploymentArn: __expectString, + DeploymentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7581,10 +7197,9 @@ const de_ResetDeploymentsCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7604,12 +7219,11 @@ export const de_StartBulkDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BulkDeploymentArn != null) { - contents.BulkDeploymentArn = __expectString(data.BulkDeploymentArn); - } - if (data.BulkDeploymentId != null) { - contents.BulkDeploymentId = __expectString(data.BulkDeploymentId); - } + const doc = take(data, { + BulkDeploymentArn: __expectString, + BulkDeploymentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7631,10 +7245,9 @@ const de_StartBulkDeploymentCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7675,10 +7288,9 @@ const de_StopBulkDeploymentCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7719,10 +7331,9 @@ const de_TagResourceCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7763,10 +7374,9 @@ const de_UntagResourceCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7786,12 +7396,11 @@ export const de_UpdateConnectivityInfoCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } + const doc = take(data, { + Message: [, __expectString, `message`], + Version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7816,10 +7425,9 @@ const de_UpdateConnectivityInfoCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7860,10 +7468,9 @@ const de_UpdateConnectorDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7904,10 +7511,9 @@ const de_UpdateCoreDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7948,10 +7554,9 @@ const de_UpdateDeviceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7992,10 +7597,9 @@ const de_UpdateFunctionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8036,10 +7640,9 @@ const de_UpdateGroupCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8059,15 +7662,12 @@ export const de_UpdateGroupCertificateConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CertificateAuthorityExpiryInMilliseconds != null) { - contents.CertificateAuthorityExpiryInMilliseconds = __expectString(data.CertificateAuthorityExpiryInMilliseconds); - } - if (data.CertificateExpiryInMilliseconds != null) { - contents.CertificateExpiryInMilliseconds = __expectString(data.CertificateExpiryInMilliseconds); - } - if (data.GroupId != null) { - contents.GroupId = __expectString(data.GroupId); - } + const doc = take(data, { + CertificateAuthorityExpiryInMilliseconds: __expectString, + CertificateExpiryInMilliseconds: __expectString, + GroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8092,10 +7692,9 @@ const de_UpdateGroupCertificateConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8136,10 +7735,9 @@ const de_UpdateLoggerDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8180,10 +7778,9 @@ const de_UpdateResourceDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8224,10 +7821,9 @@ const de_UpdateSubscriptionDefinitionCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8271,28 +7867,26 @@ const de_UpdateThingRuntimeConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorDetails != null) { - contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorDetails: _json, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8309,12 +7903,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorDetails != null) { - contents.ErrorDetails = de_ErrorDetails(data.ErrorDetails, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + ErrorDetails: _json, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8322,602 +7915,103 @@ const de_InternalServerErrorExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. -/** - * serializeAws_restJson1__listOfConnectivityInfo - */ -const se___listOfConnectivityInfo = (input: ConnectivityInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConnectivityInfo(entry, context); - }); -}; +// se___listOfConnectivityInfo omitted. -/** - * serializeAws_restJson1__listOfConnector - */ -const se___listOfConnector = (input: Connector[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Connector(entry, context); - }); -}; +// se___listOfConnector omitted. -/** - * serializeAws_restJson1__listOfCore - */ -const se___listOfCore = (input: Core[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Core(entry, context); - }); -}; +// se___listOfCore omitted. -/** - * serializeAws_restJson1__listOfDevice - */ -const se___listOfDevice = (input: Device[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Device(entry, context); - }); -}; +// se___listOfDevice omitted. -/** - * serializeAws_restJson1__listOfFunction - */ -const se___listOfFunction = (input: Function[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Function(entry, context); - }); -}; +// se___listOfFunction omitted. -/** - * serializeAws_restJson1__listOfLogger - */ -const se___listOfLogger = (input: Logger[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Logger(entry, context); - }); -}; +// se___listOfLogger omitted. -/** - * serializeAws_restJson1__listOfResource - */ -const se___listOfResource = (input: Resource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Resource(entry, context); - }); -}; +// se___listOfResource omitted. -/** - * serializeAws_restJson1__listOfResourceAccessPolicy - */ -const se___listOfResourceAccessPolicy = (input: ResourceAccessPolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceAccessPolicy(entry, context); - }); -}; +// se___listOfResourceAccessPolicy omitted. -/** - * serializeAws_restJson1__listOfSubscription - */ -const se___listOfSubscription = (input: Subscription[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Subscription(entry, context); - }); -}; +// se___listOfSubscription omitted. -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. -/** - * serializeAws_restJson1ConnectivityInfo - */ -const se_ConnectivityInfo = (input: ConnectivityInfo, context: __SerdeContext): any => { - return { - ...(input.HostAddress != null && { HostAddress: input.HostAddress }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.PortNumber != null && { PortNumber: input.PortNumber }), - }; -}; +// se_ConnectivityInfo omitted. -/** - * serializeAws_restJson1Connector - */ -const se_Connector = (input: Connector, context: __SerdeContext): any => { - return { - ...(input.ConnectorArn != null && { ConnectorArn: input.ConnectorArn }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Parameters != null && { Parameters: se___mapOf__string(input.Parameters, context) }), - }; -}; +// se_Connector omitted. -/** - * serializeAws_restJson1ConnectorDefinitionVersion - */ -const se_ConnectorDefinitionVersion = (input: ConnectorDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.Connectors != null && { Connectors: se___listOfConnector(input.Connectors, context) }), - }; -}; +// se_ConnectorDefinitionVersion omitted. -/** - * serializeAws_restJson1Core - */ -const se_Core = (input: Core, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Id != null && { Id: input.Id }), - ...(input.SyncShadow != null && { SyncShadow: input.SyncShadow }), - ...(input.ThingArn != null && { ThingArn: input.ThingArn }), - }; -}; +// se_Core omitted. -/** - * serializeAws_restJson1CoreDefinitionVersion - */ -const se_CoreDefinitionVersion = (input: CoreDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.Cores != null && { Cores: se___listOfCore(input.Cores, context) }), - }; -}; +// se_CoreDefinitionVersion omitted. -/** - * serializeAws_restJson1Device - */ -const se_Device = (input: Device, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.Id != null && { Id: input.Id }), - ...(input.SyncShadow != null && { SyncShadow: input.SyncShadow }), - ...(input.ThingArn != null && { ThingArn: input.ThingArn }), - }; -}; +// se_Device omitted. -/** - * serializeAws_restJson1DeviceDefinitionVersion - */ -const se_DeviceDefinitionVersion = (input: DeviceDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.Devices != null && { Devices: se___listOfDevice(input.Devices, context) }), - }; -}; +// se_DeviceDefinitionVersion omitted. -/** - * serializeAws_restJson1Function - */ -const se_Function = (input: Function, context: __SerdeContext): any => { - return { - ...(input.FunctionArn != null && { FunctionArn: input.FunctionArn }), - ...(input.FunctionConfiguration != null && { - FunctionConfiguration: se_FunctionConfiguration(input.FunctionConfiguration, context), - }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_Function omitted. -/** - * serializeAws_restJson1FunctionConfiguration - */ -const se_FunctionConfiguration = (input: FunctionConfiguration, context: __SerdeContext): any => { - return { - ...(input.EncodingType != null && { EncodingType: input.EncodingType }), - ...(input.Environment != null && { Environment: se_FunctionConfigurationEnvironment(input.Environment, context) }), - ...(input.ExecArgs != null && { ExecArgs: input.ExecArgs }), - ...(input.Executable != null && { Executable: input.Executable }), - ...(input.FunctionRuntimeOverride != null && { FunctionRuntimeOverride: input.FunctionRuntimeOverride }), - ...(input.MemorySize != null && { MemorySize: input.MemorySize }), - ...(input.Pinned != null && { Pinned: input.Pinned }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }; -}; +// se_FunctionConfiguration omitted. -/** - * serializeAws_restJson1FunctionConfigurationEnvironment - */ -const se_FunctionConfigurationEnvironment = (input: FunctionConfigurationEnvironment, context: __SerdeContext): any => { - return { - ...(input.AccessSysfs != null && { AccessSysfs: input.AccessSysfs }), - ...(input.Execution != null && { Execution: se_FunctionExecutionConfig(input.Execution, context) }), - ...(input.ResourceAccessPolicies != null && { - ResourceAccessPolicies: se___listOfResourceAccessPolicy(input.ResourceAccessPolicies, context), - }), - ...(input.Variables != null && { Variables: se___mapOf__string(input.Variables, context) }), - }; -}; +// se_FunctionConfigurationEnvironment omitted. -/** - * serializeAws_restJson1FunctionDefaultConfig - */ -const se_FunctionDefaultConfig = (input: FunctionDefaultConfig, context: __SerdeContext): any => { - return { - ...(input.Execution != null && { Execution: se_FunctionDefaultExecutionConfig(input.Execution, context) }), - }; -}; +// se_FunctionDefaultConfig omitted. -/** - * serializeAws_restJson1FunctionDefaultExecutionConfig - */ -const se_FunctionDefaultExecutionConfig = (input: FunctionDefaultExecutionConfig, context: __SerdeContext): any => { - return { - ...(input.IsolationMode != null && { IsolationMode: input.IsolationMode }), - ...(input.RunAs != null && { RunAs: se_FunctionRunAsConfig(input.RunAs, context) }), - }; -}; +// se_FunctionDefaultExecutionConfig omitted. -/** - * serializeAws_restJson1FunctionDefinitionVersion - */ -const se_FunctionDefinitionVersion = (input: FunctionDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.DefaultConfig != null && { DefaultConfig: se_FunctionDefaultConfig(input.DefaultConfig, context) }), - ...(input.Functions != null && { Functions: se___listOfFunction(input.Functions, context) }), - }; -}; +// se_FunctionDefinitionVersion omitted. -/** - * serializeAws_restJson1FunctionExecutionConfig - */ -const se_FunctionExecutionConfig = (input: FunctionExecutionConfig, context: __SerdeContext): any => { - return { - ...(input.IsolationMode != null && { IsolationMode: input.IsolationMode }), - ...(input.RunAs != null && { RunAs: se_FunctionRunAsConfig(input.RunAs, context) }), - }; -}; +// se_FunctionExecutionConfig omitted. -/** - * serializeAws_restJson1FunctionRunAsConfig - */ -const se_FunctionRunAsConfig = (input: FunctionRunAsConfig, context: __SerdeContext): any => { - return { - ...(input.Gid != null && { Gid: input.Gid }), - ...(input.Uid != null && { Uid: input.Uid }), - }; -}; +// se_FunctionRunAsConfig omitted. -/** - * serializeAws_restJson1GroupOwnerSetting - */ -const se_GroupOwnerSetting = (input: GroupOwnerSetting, context: __SerdeContext): any => { - return { - ...(input.AutoAddGroupOwner != null && { AutoAddGroupOwner: input.AutoAddGroupOwner }), - ...(input.GroupOwner != null && { GroupOwner: input.GroupOwner }), - }; -}; +// se_GroupOwnerSetting omitted. -/** - * serializeAws_restJson1GroupVersion - */ -const se_GroupVersion = (input: GroupVersion, context: __SerdeContext): any => { - return { - ...(input.ConnectorDefinitionVersionArn != null && { - ConnectorDefinitionVersionArn: input.ConnectorDefinitionVersionArn, - }), - ...(input.CoreDefinitionVersionArn != null && { CoreDefinitionVersionArn: input.CoreDefinitionVersionArn }), - ...(input.DeviceDefinitionVersionArn != null && { DeviceDefinitionVersionArn: input.DeviceDefinitionVersionArn }), - ...(input.FunctionDefinitionVersionArn != null && { - FunctionDefinitionVersionArn: input.FunctionDefinitionVersionArn, - }), - ...(input.LoggerDefinitionVersionArn != null && { LoggerDefinitionVersionArn: input.LoggerDefinitionVersionArn }), - ...(input.ResourceDefinitionVersionArn != null && { - ResourceDefinitionVersionArn: input.ResourceDefinitionVersionArn, - }), - ...(input.SubscriptionDefinitionVersionArn != null && { - SubscriptionDefinitionVersionArn: input.SubscriptionDefinitionVersionArn, - }), - }; -}; +// se_GroupVersion omitted. -/** - * serializeAws_restJson1LocalDeviceResourceData - */ -const se_LocalDeviceResourceData = (input: LocalDeviceResourceData, context: __SerdeContext): any => { - return { - ...(input.GroupOwnerSetting != null && { - GroupOwnerSetting: se_GroupOwnerSetting(input.GroupOwnerSetting, context), - }), - ...(input.SourcePath != null && { SourcePath: input.SourcePath }), - }; -}; +// se_LocalDeviceResourceData omitted. -/** - * serializeAws_restJson1LocalVolumeResourceData - */ -const se_LocalVolumeResourceData = (input: LocalVolumeResourceData, context: __SerdeContext): any => { - return { - ...(input.DestinationPath != null && { DestinationPath: input.DestinationPath }), - ...(input.GroupOwnerSetting != null && { - GroupOwnerSetting: se_GroupOwnerSetting(input.GroupOwnerSetting, context), - }), - ...(input.SourcePath != null && { SourcePath: input.SourcePath }), - }; -}; +// se_LocalVolumeResourceData omitted. -/** - * serializeAws_restJson1Logger - */ -const se_Logger = (input: Logger, context: __SerdeContext): any => { - return { - ...(input.Component != null && { Component: input.Component }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Level != null && { Level: input.Level }), - ...(input.Space != null && { Space: input.Space }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Logger omitted. -/** - * serializeAws_restJson1LoggerDefinitionVersion - */ -const se_LoggerDefinitionVersion = (input: LoggerDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.Loggers != null && { Loggers: se___listOfLogger(input.Loggers, context) }), - }; -}; +// se_LoggerDefinitionVersion omitted. -/** - * serializeAws_restJson1Resource - */ -const se_Resource = (input: Resource, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceDataContainer != null && { - ResourceDataContainer: se_ResourceDataContainer(input.ResourceDataContainer, context), - }), - }; -}; +// se_Resource omitted. -/** - * serializeAws_restJson1ResourceAccessPolicy - */ -const se_ResourceAccessPolicy = (input: ResourceAccessPolicy, context: __SerdeContext): any => { - return { - ...(input.Permission != null && { Permission: input.Permission }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_ResourceAccessPolicy omitted. -/** - * serializeAws_restJson1ResourceDataContainer - */ -const se_ResourceDataContainer = (input: ResourceDataContainer, context: __SerdeContext): any => { - return { - ...(input.LocalDeviceResourceData != null && { - LocalDeviceResourceData: se_LocalDeviceResourceData(input.LocalDeviceResourceData, context), - }), - ...(input.LocalVolumeResourceData != null && { - LocalVolumeResourceData: se_LocalVolumeResourceData(input.LocalVolumeResourceData, context), - }), - ...(input.S3MachineLearningModelResourceData != null && { - S3MachineLearningModelResourceData: se_S3MachineLearningModelResourceData( - input.S3MachineLearningModelResourceData, - context - ), - }), - ...(input.SageMakerMachineLearningModelResourceData != null && { - SageMakerMachineLearningModelResourceData: se_SageMakerMachineLearningModelResourceData( - input.SageMakerMachineLearningModelResourceData, - context - ), - }), - ...(input.SecretsManagerSecretResourceData != null && { - SecretsManagerSecretResourceData: se_SecretsManagerSecretResourceData( - input.SecretsManagerSecretResourceData, - context - ), - }), - }; -}; +// se_ResourceDataContainer omitted. -/** - * serializeAws_restJson1ResourceDefinitionVersion - */ -const se_ResourceDefinitionVersion = (input: ResourceDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.Resources != null && { Resources: se___listOfResource(input.Resources, context) }), - }; -}; +// se_ResourceDefinitionVersion omitted. -/** - * serializeAws_restJson1ResourceDownloadOwnerSetting - */ -const se_ResourceDownloadOwnerSetting = (input: ResourceDownloadOwnerSetting, context: __SerdeContext): any => { - return { - ...(input.GroupOwner != null && { GroupOwner: input.GroupOwner }), - ...(input.GroupPermission != null && { GroupPermission: input.GroupPermission }), - }; -}; +// se_ResourceDownloadOwnerSetting omitted. -/** - * serializeAws_restJson1S3MachineLearningModelResourceData - */ -const se_S3MachineLearningModelResourceData = ( - input: S3MachineLearningModelResourceData, - context: __SerdeContext -): any => { - return { - ...(input.DestinationPath != null && { DestinationPath: input.DestinationPath }), - ...(input.OwnerSetting != null && { OwnerSetting: se_ResourceDownloadOwnerSetting(input.OwnerSetting, context) }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_S3MachineLearningModelResourceData omitted. -/** - * serializeAws_restJson1SageMakerMachineLearningModelResourceData - */ -const se_SageMakerMachineLearningModelResourceData = ( - input: SageMakerMachineLearningModelResourceData, - context: __SerdeContext -): any => { - return { - ...(input.DestinationPath != null && { DestinationPath: input.DestinationPath }), - ...(input.OwnerSetting != null && { OwnerSetting: se_ResourceDownloadOwnerSetting(input.OwnerSetting, context) }), - ...(input.SageMakerJobArn != null && { SageMakerJobArn: input.SageMakerJobArn }), - }; -}; +// se_SageMakerMachineLearningModelResourceData omitted. -/** - * serializeAws_restJson1SecretsManagerSecretResourceData - */ -const se_SecretsManagerSecretResourceData = (input: SecretsManagerSecretResourceData, context: __SerdeContext): any => { - return { - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.AdditionalStagingLabelsToDownload != null && { - AdditionalStagingLabelsToDownload: se___listOf__string(input.AdditionalStagingLabelsToDownload, context), - }), - }; -}; +// se_SecretsManagerSecretResourceData omitted. -/** - * serializeAws_restJson1Subscription - */ -const se_Subscription = (input: Subscription, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Subject != null && { Subject: input.Subject }), - ...(input.Target != null && { Target: input.Target }), - }; -}; +// se_Subscription omitted. -/** - * serializeAws_restJson1SubscriptionDefinitionVersion - */ -const se_SubscriptionDefinitionVersion = (input: SubscriptionDefinitionVersion, context: __SerdeContext): any => { - return { - ...(input.Subscriptions != null && { Subscriptions: se___listOfSubscription(input.Subscriptions, context) }), - }; -}; +// se_SubscriptionDefinitionVersion omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1TelemetryConfigurationUpdate - */ -const se_TelemetryConfigurationUpdate = (input: TelemetryConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.Telemetry != null && { Telemetry: input.Telemetry }), - }; -}; +// se_TelemetryConfigurationUpdate omitted. -/** - * serializeAws_restJson1UpdateTargets - */ -const se_UpdateTargets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdateTargets omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. -/** - * deserializeAws_restJson1__listOfConnectivityInfo - */ -const de___listOfConnectivityInfo = (output: any, context: __SerdeContext): ConnectivityInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectivityInfo(entry, context); - }); - return retVal; -}; +// de___listOfConnectivityInfo omitted. -/** - * deserializeAws_restJson1__listOfConnector - */ -const de___listOfConnector = (output: any, context: __SerdeContext): Connector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Connector(entry, context); - }); - return retVal; -}; +// de___listOfConnector omitted. -/** - * deserializeAws_restJson1__listOfCore - */ -const de___listOfCore = (output: any, context: __SerdeContext): Core[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Core(entry, context); - }); - return retVal; -}; +// de___listOfCore omitted. /** * deserializeAws_restJson1__listOfDefinitionInformation @@ -8926,756 +8020,138 @@ const de___listOfDefinitionInformation = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DefinitionInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfDevice - */ -const de___listOfDevice = (output: any, context: __SerdeContext): Device[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Device(entry, context); - }); - return retVal; -}; +// de___listOfDevice omitted. -/** - * deserializeAws_restJson1__listOfFunction - */ -const de___listOfFunction = (output: any, context: __SerdeContext): Function[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Function(entry, context); - }); - return retVal; -}; +// de___listOfFunction omitted. -/** - * deserializeAws_restJson1__listOfGroupCertificateAuthorityProperties - */ -const de___listOfGroupCertificateAuthorityProperties = ( - output: any, - context: __SerdeContext -): GroupCertificateAuthorityProperties[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupCertificateAuthorityProperties(entry, context); - }); - return retVal; -}; +// de___listOfGroupCertificateAuthorityProperties omitted. -/** - * deserializeAws_restJson1__listOfGroupInformation - */ -const de___listOfGroupInformation = (output: any, context: __SerdeContext): GroupInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupInformation(entry, context); - }); - return retVal; -}; +// de___listOfGroupInformation omitted. -/** - * deserializeAws_restJson1__listOfLogger - */ -const de___listOfLogger = (output: any, context: __SerdeContext): Logger[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Logger(entry, context); - }); - return retVal; -}; +// de___listOfLogger omitted. -/** - * deserializeAws_restJson1__listOfResource - */ -const de___listOfResource = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de___listOfResource omitted. -/** - * deserializeAws_restJson1__listOfResourceAccessPolicy - */ -const de___listOfResourceAccessPolicy = (output: any, context: __SerdeContext): ResourceAccessPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceAccessPolicy(entry, context); - }); - return retVal; -}; +// de___listOfResourceAccessPolicy omitted. -/** - * deserializeAws_restJson1__listOfSubscription - */ -const de___listOfSubscription = (output: any, context: __SerdeContext): Subscription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subscription(entry, context); - }); - return retVal; -}; +// de___listOfSubscription omitted. -/** - * deserializeAws_restJson1__listOfVersionInformation - */ -const de___listOfVersionInformation = (output: any, context: __SerdeContext): VersionInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VersionInformation(entry, context); - }); - return retVal; -}; +// de___listOfVersionInformation omitted. -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. -/** - * deserializeAws_restJson1BulkDeployment - */ -const de_BulkDeployment = (output: any, context: __SerdeContext): BulkDeployment => { - return { - BulkDeploymentArn: __expectString(output.BulkDeploymentArn), - BulkDeploymentId: __expectString(output.BulkDeploymentId), - CreatedAt: __expectString(output.CreatedAt), - } as any; -}; +// de_BulkDeployment omitted. -/** - * deserializeAws_restJson1BulkDeploymentMetrics - */ -const de_BulkDeploymentMetrics = (output: any, context: __SerdeContext): BulkDeploymentMetrics => { - return { - InvalidInputRecords: __expectInt32(output.InvalidInputRecords), - RecordsProcessed: __expectInt32(output.RecordsProcessed), - RetryAttempts: __expectInt32(output.RetryAttempts), - } as any; -}; +// de_BulkDeploymentMetrics omitted. -/** - * deserializeAws_restJson1BulkDeploymentResult - */ -const de_BulkDeploymentResult = (output: any, context: __SerdeContext): BulkDeploymentResult => { - return { - CreatedAt: __expectString(output.CreatedAt), - DeploymentArn: __expectString(output.DeploymentArn), - DeploymentId: __expectString(output.DeploymentId), - DeploymentStatus: __expectString(output.DeploymentStatus), - DeploymentType: __expectString(output.DeploymentType), - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - GroupArn: __expectString(output.GroupArn), - } as any; -}; +// de_BulkDeploymentResult omitted. -/** - * deserializeAws_restJson1BulkDeploymentResults - */ -const de_BulkDeploymentResults = (output: any, context: __SerdeContext): BulkDeploymentResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BulkDeploymentResult(entry, context); - }); - return retVal; -}; +// de_BulkDeploymentResults omitted. -/** - * deserializeAws_restJson1BulkDeployments - */ -const de_BulkDeployments = (output: any, context: __SerdeContext): BulkDeployment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BulkDeployment(entry, context); - }); - return retVal; -}; +// de_BulkDeployments omitted. -/** - * deserializeAws_restJson1ConnectivityInfo - */ -const de_ConnectivityInfo = (output: any, context: __SerdeContext): ConnectivityInfo => { - return { - HostAddress: __expectString(output.HostAddress), - Id: __expectString(output.Id), - Metadata: __expectString(output.Metadata), - PortNumber: __expectInt32(output.PortNumber), - } as any; -}; +// de_ConnectivityInfo omitted. -/** - * deserializeAws_restJson1Connector - */ -const de_Connector = (output: any, context: __SerdeContext): Connector => { - return { - ConnectorArn: __expectString(output.ConnectorArn), - Id: __expectString(output.Id), - Parameters: output.Parameters != null ? de___mapOf__string(output.Parameters, context) : undefined, - } as any; -}; +// de_Connector omitted. -/** - * deserializeAws_restJson1ConnectorDefinitionVersion - */ -const de_ConnectorDefinitionVersion = (output: any, context: __SerdeContext): ConnectorDefinitionVersion => { - return { - Connectors: output.Connectors != null ? de___listOfConnector(output.Connectors, context) : undefined, - } as any; -}; +// de_ConnectorDefinitionVersion omitted. -/** - * deserializeAws_restJson1Core - */ -const de_Core = (output: any, context: __SerdeContext): Core => { - return { - CertificateArn: __expectString(output.CertificateArn), - Id: __expectString(output.Id), - SyncShadow: __expectBoolean(output.SyncShadow), - ThingArn: __expectString(output.ThingArn), - } as any; -}; +// de_Core omitted. -/** - * deserializeAws_restJson1CoreDefinitionVersion - */ -const de_CoreDefinitionVersion = (output: any, context: __SerdeContext): CoreDefinitionVersion => { - return { - Cores: output.Cores != null ? de___listOfCore(output.Cores, context) : undefined, - } as any; -}; +// de_CoreDefinitionVersion omitted. /** * deserializeAws_restJson1DefinitionInformation */ const de_DefinitionInformation = (output: any, context: __SerdeContext): DefinitionInformation => { - return { - Arn: __expectString(output.Arn), - CreationTimestamp: __expectString(output.CreationTimestamp), - Id: __expectString(output.Id), - LastUpdatedTimestamp: __expectString(output.LastUpdatedTimestamp), - LatestVersion: __expectString(output.LatestVersion), - LatestVersionArn: __expectString(output.LatestVersionArn), - Name: __expectString(output.Name), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationTimestamp: __expectString, + Id: __expectString, + LastUpdatedTimestamp: __expectString, + LatestVersion: __expectString, + LatestVersionArn: __expectString, + Name: __expectString, + Tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1Deployment - */ -const de_Deployment = (output: any, context: __SerdeContext): Deployment => { - return { - CreatedAt: __expectString(output.CreatedAt), - DeploymentArn: __expectString(output.DeploymentArn), - DeploymentId: __expectString(output.DeploymentId), - DeploymentType: __expectString(output.DeploymentType), - GroupArn: __expectString(output.GroupArn), - } as any; -}; +// de_Deployment omitted. -/** - * deserializeAws_restJson1Deployments - */ -const de_Deployments = (output: any, context: __SerdeContext): Deployment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Deployment(entry, context); - }); - return retVal; -}; +// de_Deployments omitted. -/** - * deserializeAws_restJson1Device - */ -const de_Device = (output: any, context: __SerdeContext): Device => { - return { - CertificateArn: __expectString(output.CertificateArn), - Id: __expectString(output.Id), - SyncShadow: __expectBoolean(output.SyncShadow), - ThingArn: __expectString(output.ThingArn), - } as any; -}; +// de_Device omitted. -/** - * deserializeAws_restJson1DeviceDefinitionVersion - */ -const de_DeviceDefinitionVersion = (output: any, context: __SerdeContext): DeviceDefinitionVersion => { - return { - Devices: output.Devices != null ? de___listOfDevice(output.Devices, context) : undefined, - } as any; -}; +// de_DeviceDefinitionVersion omitted. -/** - * deserializeAws_restJson1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - DetailedErrorCode: __expectString(output.DetailedErrorCode), - DetailedErrorMessage: __expectString(output.DetailedErrorMessage), - } as any; -}; +// de_ErrorDetail omitted. -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorDetail(entry, context); - }); - return retVal; -}; +// de_ErrorDetails omitted. -/** - * deserializeAws_restJson1Function - */ -const de_Function = (output: any, context: __SerdeContext): Function => { - return { - FunctionArn: __expectString(output.FunctionArn), - FunctionConfiguration: - output.FunctionConfiguration != null - ? de_FunctionConfiguration(output.FunctionConfiguration, context) - : undefined, - Id: __expectString(output.Id), - } as any; -}; +// de_Function omitted. -/** - * deserializeAws_restJson1FunctionConfiguration - */ -const de_FunctionConfiguration = (output: any, context: __SerdeContext): FunctionConfiguration => { - return { - EncodingType: __expectString(output.EncodingType), - Environment: - output.Environment != null ? de_FunctionConfigurationEnvironment(output.Environment, context) : undefined, - ExecArgs: __expectString(output.ExecArgs), - Executable: __expectString(output.Executable), - FunctionRuntimeOverride: __expectString(output.FunctionRuntimeOverride), - MemorySize: __expectInt32(output.MemorySize), - Pinned: __expectBoolean(output.Pinned), - Timeout: __expectInt32(output.Timeout), - } as any; -}; +// de_FunctionConfiguration omitted. -/** - * deserializeAws_restJson1FunctionConfigurationEnvironment - */ -const de_FunctionConfigurationEnvironment = ( - output: any, - context: __SerdeContext -): FunctionConfigurationEnvironment => { - return { - AccessSysfs: __expectBoolean(output.AccessSysfs), - Execution: output.Execution != null ? de_FunctionExecutionConfig(output.Execution, context) : undefined, - ResourceAccessPolicies: - output.ResourceAccessPolicies != null - ? de___listOfResourceAccessPolicy(output.ResourceAccessPolicies, context) - : undefined, - Variables: output.Variables != null ? de___mapOf__string(output.Variables, context) : undefined, - } as any; -}; +// de_FunctionConfigurationEnvironment omitted. -/** - * deserializeAws_restJson1FunctionDefaultConfig - */ -const de_FunctionDefaultConfig = (output: any, context: __SerdeContext): FunctionDefaultConfig => { - return { - Execution: output.Execution != null ? de_FunctionDefaultExecutionConfig(output.Execution, context) : undefined, - } as any; -}; +// de_FunctionDefaultConfig omitted. -/** - * deserializeAws_restJson1FunctionDefaultExecutionConfig - */ -const de_FunctionDefaultExecutionConfig = (output: any, context: __SerdeContext): FunctionDefaultExecutionConfig => { - return { - IsolationMode: __expectString(output.IsolationMode), - RunAs: output.RunAs != null ? de_FunctionRunAsConfig(output.RunAs, context) : undefined, - } as any; -}; +// de_FunctionDefaultExecutionConfig omitted. -/** - * deserializeAws_restJson1FunctionDefinitionVersion - */ -const de_FunctionDefinitionVersion = (output: any, context: __SerdeContext): FunctionDefinitionVersion => { - return { - DefaultConfig: output.DefaultConfig != null ? de_FunctionDefaultConfig(output.DefaultConfig, context) : undefined, - Functions: output.Functions != null ? de___listOfFunction(output.Functions, context) : undefined, - } as any; -}; +// de_FunctionDefinitionVersion omitted. -/** - * deserializeAws_restJson1FunctionExecutionConfig - */ -const de_FunctionExecutionConfig = (output: any, context: __SerdeContext): FunctionExecutionConfig => { - return { - IsolationMode: __expectString(output.IsolationMode), - RunAs: output.RunAs != null ? de_FunctionRunAsConfig(output.RunAs, context) : undefined, - } as any; -}; +// de_FunctionExecutionConfig omitted. -/** - * deserializeAws_restJson1FunctionRunAsConfig - */ -const de_FunctionRunAsConfig = (output: any, context: __SerdeContext): FunctionRunAsConfig => { - return { - Gid: __expectInt32(output.Gid), - Uid: __expectInt32(output.Uid), - } as any; -}; +// de_FunctionRunAsConfig omitted. -/** - * deserializeAws_restJson1GroupCertificateAuthorityProperties - */ -const de_GroupCertificateAuthorityProperties = ( - output: any, - context: __SerdeContext -): GroupCertificateAuthorityProperties => { - return { - GroupCertificateAuthorityArn: __expectString(output.GroupCertificateAuthorityArn), - GroupCertificateAuthorityId: __expectString(output.GroupCertificateAuthorityId), - } as any; -}; +// de_GroupCertificateAuthorityProperties omitted. -/** - * deserializeAws_restJson1GroupInformation - */ -const de_GroupInformation = (output: any, context: __SerdeContext): GroupInformation => { - return { - Arn: __expectString(output.Arn), - CreationTimestamp: __expectString(output.CreationTimestamp), - Id: __expectString(output.Id), - LastUpdatedTimestamp: __expectString(output.LastUpdatedTimestamp), - LatestVersion: __expectString(output.LatestVersion), - LatestVersionArn: __expectString(output.LatestVersionArn), - Name: __expectString(output.Name), - } as any; -}; +// de_GroupInformation omitted. -/** - * deserializeAws_restJson1GroupOwnerSetting - */ -const de_GroupOwnerSetting = (output: any, context: __SerdeContext): GroupOwnerSetting => { - return { - AutoAddGroupOwner: __expectBoolean(output.AutoAddGroupOwner), - GroupOwner: __expectString(output.GroupOwner), - } as any; -}; +// de_GroupOwnerSetting omitted. -/** - * deserializeAws_restJson1GroupVersion - */ -const de_GroupVersion = (output: any, context: __SerdeContext): GroupVersion => { - return { - ConnectorDefinitionVersionArn: __expectString(output.ConnectorDefinitionVersionArn), - CoreDefinitionVersionArn: __expectString(output.CoreDefinitionVersionArn), - DeviceDefinitionVersionArn: __expectString(output.DeviceDefinitionVersionArn), - FunctionDefinitionVersionArn: __expectString(output.FunctionDefinitionVersionArn), - LoggerDefinitionVersionArn: __expectString(output.LoggerDefinitionVersionArn), - ResourceDefinitionVersionArn: __expectString(output.ResourceDefinitionVersionArn), - SubscriptionDefinitionVersionArn: __expectString(output.SubscriptionDefinitionVersionArn), - } as any; -}; +// de_GroupVersion omitted. -/** - * deserializeAws_restJson1LocalDeviceResourceData - */ -const de_LocalDeviceResourceData = (output: any, context: __SerdeContext): LocalDeviceResourceData => { - return { - GroupOwnerSetting: - output.GroupOwnerSetting != null ? de_GroupOwnerSetting(output.GroupOwnerSetting, context) : undefined, - SourcePath: __expectString(output.SourcePath), - } as any; -}; +// de_LocalDeviceResourceData omitted. -/** - * deserializeAws_restJson1LocalVolumeResourceData - */ -const de_LocalVolumeResourceData = (output: any, context: __SerdeContext): LocalVolumeResourceData => { - return { - DestinationPath: __expectString(output.DestinationPath), - GroupOwnerSetting: - output.GroupOwnerSetting != null ? de_GroupOwnerSetting(output.GroupOwnerSetting, context) : undefined, - SourcePath: __expectString(output.SourcePath), - } as any; -}; +// de_LocalVolumeResourceData omitted. -/** - * deserializeAws_restJson1Logger - */ -const de_Logger = (output: any, context: __SerdeContext): Logger => { - return { - Component: __expectString(output.Component), - Id: __expectString(output.Id), - Level: __expectString(output.Level), - Space: __expectInt32(output.Space), - Type: __expectString(output.Type), - } as any; -}; +// de_Logger omitted. -/** - * deserializeAws_restJson1LoggerDefinitionVersion - */ -const de_LoggerDefinitionVersion = (output: any, context: __SerdeContext): LoggerDefinitionVersion => { - return { - Loggers: output.Loggers != null ? de___listOfLogger(output.Loggers, context) : undefined, - } as any; -}; +// de_LoggerDefinitionVersion omitted. -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ResourceDataContainer: - output.ResourceDataContainer != null - ? de_ResourceDataContainer(output.ResourceDataContainer, context) - : undefined, - } as any; -}; +// de_Resource omitted. -/** - * deserializeAws_restJson1ResourceAccessPolicy - */ -const de_ResourceAccessPolicy = (output: any, context: __SerdeContext): ResourceAccessPolicy => { - return { - Permission: __expectString(output.Permission), - ResourceId: __expectString(output.ResourceId), - } as any; -}; +// de_ResourceAccessPolicy omitted. -/** - * deserializeAws_restJson1ResourceDataContainer - */ -const de_ResourceDataContainer = (output: any, context: __SerdeContext): ResourceDataContainer => { - return { - LocalDeviceResourceData: - output.LocalDeviceResourceData != null - ? de_LocalDeviceResourceData(output.LocalDeviceResourceData, context) - : undefined, - LocalVolumeResourceData: - output.LocalVolumeResourceData != null - ? de_LocalVolumeResourceData(output.LocalVolumeResourceData, context) - : undefined, - S3MachineLearningModelResourceData: - output.S3MachineLearningModelResourceData != null - ? de_S3MachineLearningModelResourceData(output.S3MachineLearningModelResourceData, context) - : undefined, - SageMakerMachineLearningModelResourceData: - output.SageMakerMachineLearningModelResourceData != null - ? de_SageMakerMachineLearningModelResourceData(output.SageMakerMachineLearningModelResourceData, context) - : undefined, - SecretsManagerSecretResourceData: - output.SecretsManagerSecretResourceData != null - ? de_SecretsManagerSecretResourceData(output.SecretsManagerSecretResourceData, context) - : undefined, - } as any; -}; +// de_ResourceDataContainer omitted. -/** - * deserializeAws_restJson1ResourceDefinitionVersion - */ -const de_ResourceDefinitionVersion = (output: any, context: __SerdeContext): ResourceDefinitionVersion => { - return { - Resources: output.Resources != null ? de___listOfResource(output.Resources, context) : undefined, - } as any; -}; +// de_ResourceDefinitionVersion omitted. -/** - * deserializeAws_restJson1ResourceDownloadOwnerSetting - */ -const de_ResourceDownloadOwnerSetting = (output: any, context: __SerdeContext): ResourceDownloadOwnerSetting => { - return { - GroupOwner: __expectString(output.GroupOwner), - GroupPermission: __expectString(output.GroupPermission), - } as any; -}; +// de_ResourceDownloadOwnerSetting omitted. -/** - * deserializeAws_restJson1RuntimeConfiguration - */ -const de_RuntimeConfiguration = (output: any, context: __SerdeContext): RuntimeConfiguration => { - return { - TelemetryConfiguration: - output.TelemetryConfiguration != null - ? de_TelemetryConfiguration(output.TelemetryConfiguration, context) - : undefined, - } as any; -}; +// de_RuntimeConfiguration omitted. -/** - * deserializeAws_restJson1S3MachineLearningModelResourceData - */ -const de_S3MachineLearningModelResourceData = ( - output: any, - context: __SerdeContext -): S3MachineLearningModelResourceData => { - return { - DestinationPath: __expectString(output.DestinationPath), - OwnerSetting: - output.OwnerSetting != null ? de_ResourceDownloadOwnerSetting(output.OwnerSetting, context) : undefined, - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_S3MachineLearningModelResourceData omitted. -/** - * deserializeAws_restJson1SageMakerMachineLearningModelResourceData - */ -const de_SageMakerMachineLearningModelResourceData = ( - output: any, - context: __SerdeContext -): SageMakerMachineLearningModelResourceData => { - return { - DestinationPath: __expectString(output.DestinationPath), - OwnerSetting: - output.OwnerSetting != null ? de_ResourceDownloadOwnerSetting(output.OwnerSetting, context) : undefined, - SageMakerJobArn: __expectString(output.SageMakerJobArn), - } as any; -}; +// de_SageMakerMachineLearningModelResourceData omitted. -/** - * deserializeAws_restJson1SecretsManagerSecretResourceData - */ -const de_SecretsManagerSecretResourceData = ( - output: any, - context: __SerdeContext -): SecretsManagerSecretResourceData => { - return { - ARN: __expectString(output.ARN), - AdditionalStagingLabelsToDownload: - output.AdditionalStagingLabelsToDownload != null - ? de___listOf__string(output.AdditionalStagingLabelsToDownload, context) - : undefined, - } as any; -}; +// de_SecretsManagerSecretResourceData omitted. -/** - * deserializeAws_restJson1Subscription - */ -const de_Subscription = (output: any, context: __SerdeContext): Subscription => { - return { - Id: __expectString(output.Id), - Source: __expectString(output.Source), - Subject: __expectString(output.Subject), - Target: __expectString(output.Target), - } as any; -}; +// de_Subscription omitted. -/** - * deserializeAws_restJson1SubscriptionDefinitionVersion - */ -const de_SubscriptionDefinitionVersion = (output: any, context: __SerdeContext): SubscriptionDefinitionVersion => { - return { - Subscriptions: output.Subscriptions != null ? de___listOfSubscription(output.Subscriptions, context) : undefined, - } as any; -}; +// de_SubscriptionDefinitionVersion omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1TelemetryConfiguration - */ -const de_TelemetryConfiguration = (output: any, context: __SerdeContext): TelemetryConfiguration => { - return { - ConfigurationSyncStatus: __expectString(output.ConfigurationSyncStatus), - Telemetry: __expectString(output.Telemetry), - } as any; -}; +// de_TelemetryConfiguration omitted. -/** - * deserializeAws_restJson1VersionInformation - */ -const de_VersionInformation = (output: any, context: __SerdeContext): VersionInformation => { - return { - Arn: __expectString(output.Arn), - CreationTimestamp: __expectString(output.CreationTimestamp), - Id: __expectString(output.Id), - Version: __expectString(output.Version), - } as any; -}; +// de_VersionInformation omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-greengrassv2/src/protocols/Aws_restJson1.ts b/clients/client-greengrassv2/src/protocols/Aws_restJson1.ts index e9aaddeb4658..ecae644934e4 100644 --- a/clients/client-greengrassv2/src/protocols/Aws_restJson1.ts +++ b/clients/client-greengrassv2/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,12 +12,13 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -103,9 +105,7 @@ import { GreengrassV2ServiceException as __BaseException } from "../models/Green import { AccessDeniedException, AssociateClientDeviceWithCoreDeviceEntry, - AssociateClientDeviceWithCoreDeviceErrorEntry, AssociatedClientDevice, - CloudComponentStatus, Component, ComponentCandidate, ComponentConfigurationUpdate, @@ -114,7 +114,6 @@ import { ComponentLatestVersion, ComponentPlatform, ComponentRunWith, - ComponentVersionListItem, ConflictException, ConnectivityInfo, CoreDevice, @@ -124,9 +123,7 @@ import { DeploymentIoTJobConfiguration, DeploymentPolicies, DisassociateClientDeviceFromCoreDeviceEntry, - DisassociateClientDeviceFromCoreDeviceErrorEntry, EffectiveDeployment, - EffectiveDeploymentStatusDetails, InstalledComponent, InternalServerException, IoTJobAbortConfig, @@ -149,7 +146,6 @@ import { SystemResourceLimits, ThrottlingException, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -166,9 +162,11 @@ export const se_AssociateServiceRoleToAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/servicerole"; let body: any; - body = JSON.stringify({ - ...(input.roleArn != null && { RoleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + RoleArn: [, , `roleArn`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -203,9 +201,11 @@ export const se_BatchAssociateClientDeviceWithCoreDeviceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.entries != null && { entries: se_AssociateClientDeviceWithCoreDeviceEntryList(input.entries, context) }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -240,11 +240,11 @@ export const se_BatchDisassociateClientDeviceFromCoreDeviceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.entries != null && { - entries: se_DisassociateClientDeviceFromCoreDeviceEntryList(input.entries, context), - }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -302,14 +302,14 @@ export const se_CreateComponentVersionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/createComponentVersion"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.inlineRecipe != null && { inlineRecipe: context.base64Encoder(input.inlineRecipe) }), - ...(input.lambdaFunction != null && { - lambdaFunction: se_LambdaFunctionRecipeSource(input.lambdaFunction, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + inlineRecipe: (_) => context.base64Encoder(_), + lambdaFunction: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -335,20 +335,18 @@ export const se_CreateDeploymentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/deployments"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.components != null && { components: se_ComponentDeploymentSpecifications(input.components, context) }), - ...(input.deploymentName != null && { deploymentName: input.deploymentName }), - ...(input.deploymentPolicies != null && { - deploymentPolicies: se_DeploymentPolicies(input.deploymentPolicies, context), - }), - ...(input.iotJobConfiguration != null && { - iotJobConfiguration: se_DeploymentIoTJobConfiguration(input.iotJobConfiguration, context), - }), - ...(input.parentTargetArn != null && { parentTargetArn: input.parentTargetArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + components: (_) => se_ComponentDeploymentSpecifications(_, context), + deploymentName: [], + deploymentPolicies: (_) => _json(_), + iotJobConfiguration: (_) => se_DeploymentIoTJobConfiguration(_, context), + parentTargetArn: [], + tags: (_) => _json(_), + targetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -940,12 +938,12 @@ export const se_ResolveComponentCandidatesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/greengrass/v2/resolveComponentCandidates"; let body: any; - body = JSON.stringify({ - ...(input.componentCandidates != null && { - componentCandidates: se_ComponentCandidateList(input.componentCandidates, context), - }), - ...(input.platform != null && { platform: se_ComponentPlatform(input.platform, context) }), - }); + body = JSON.stringify( + take(input, { + componentCandidates: (_) => _json(_), + platform: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -971,9 +969,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1031,11 +1031,11 @@ export const se_UpdateConnectivityInfoCommand = async ( "/greengrass/things/{thingName}/connectivityInfo"; resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName!, "{thingName}", false); let body: any; - body = JSON.stringify({ - ...(input.connectivityInfo != null && { - ConnectivityInfo: se_connectivityInfoList(input.connectivityInfo, context), - }), - }); + body = JSON.stringify( + take(input, { + ConnectivityInfo: [, (_) => se_connectivityInfoList(_, context), `connectivityInfo`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1061,9 +1061,10 @@ export const de_AssociateServiceRoleToAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociatedAt != null) { - contents.associatedAt = __expectString(data.AssociatedAt); - } + const doc = take(data, { + associatedAt: [, __expectString, `AssociatedAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -1088,10 +1089,9 @@ const de_AssociateServiceRoleToAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1111,9 +1111,10 @@ export const de_BatchAssociateClientDeviceWithCoreDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_AssociateClientDeviceWithCoreDeviceErrorList(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1147,10 +1148,9 @@ const de_BatchAssociateClientDeviceWithCoreDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1170,9 +1170,10 @@ export const de_BatchDisassociateClientDeviceFromCoreDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_DisassociateClientDeviceFromCoreDeviceErrorList(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1206,10 +1207,9 @@ const de_BatchDisassociateClientDeviceFromCoreDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,9 +1229,10 @@ export const de_CancelDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1268,10 +1269,9 @@ const de_CancelDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1291,21 +1291,14 @@ export const de_CreateComponentVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.componentName != null) { - contents.componentName = __expectString(data.componentName); - } - if (data.componentVersion != null) { - contents.componentVersion = __expectString(data.componentVersion); - } - if (data.creationTimestamp != null) { - contents.creationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTimestamp))); - } - if (data.status != null) { - contents.status = de_CloudComponentStatus(data.status, context); - } + const doc = take(data, { + arn: __expectString, + componentName: __expectString, + componentVersion: __expectString, + creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1345,10 +1338,9 @@ const de_CreateComponentVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1368,15 +1360,12 @@ export const de_CreateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } - if (data.iotJobArn != null) { - contents.iotJobArn = __expectString(data.iotJobArn); - } - if (data.iotJobId != null) { - contents.iotJobId = __expectString(data.iotJobId); - } + const doc = take(data, { + deploymentId: __expectString, + iotJobArn: __expectString, + iotJobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1416,10 +1405,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1475,10 +1463,9 @@ const de_DeleteComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,10 +1521,9 @@ const de_DeleteCoreDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1593,10 +1579,9 @@ const de_DeleteDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1616,33 +1601,18 @@ export const de_DescribeComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.componentName != null) { - contents.componentName = __expectString(data.componentName); - } - if (data.componentVersion != null) { - contents.componentVersion = __expectString(data.componentVersion); - } - if (data.creationTimestamp != null) { - contents.creationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTimestamp))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.platforms != null) { - contents.platforms = de_ComponentPlatformList(data.platforms, context); - } - if (data.publisher != null) { - contents.publisher = __expectString(data.publisher); - } - if (data.status != null) { - contents.status = de_CloudComponentStatus(data.status, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + componentName: __expectString, + componentVersion: __expectString, + creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + platforms: _json, + publisher: __expectString, + status: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1676,10 +1646,9 @@ const de_DescribeComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1699,9 +1668,10 @@ export const de_DisassociateServiceRoleFromAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DisassociatedAt != null) { - contents.disassociatedAt = __expectString(data.DisassociatedAt); - } + const doc = take(data, { + disassociatedAt: [, __expectString, `DisassociatedAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -1723,10 +1693,9 @@ const de_DisassociateServiceRoleFromAccountCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1746,15 +1715,12 @@ export const de_GetComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.recipe != null) { - contents.recipe = context.base64Decoder(data.recipe); - } - if (data.recipeOutputFormat != null) { - contents.recipeOutputFormat = __expectString(data.recipeOutputFormat); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + recipe: context.base64Decoder, + recipeOutputFormat: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1788,10 +1754,9 @@ const de_GetComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1811,9 +1776,10 @@ export const de_GetComponentVersionArtifactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.preSignedUrl != null) { - contents.preSignedUrl = __expectString(data.preSignedUrl); - } + const doc = take(data, { + preSignedUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1847,10 +1813,9 @@ const de_GetComponentVersionArtifactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1870,12 +1835,11 @@ export const de_GetConnectivityInfoCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectivityInfo != null) { - contents.connectivityInfo = de_connectivityInfoList(data.ConnectivityInfo, context); - } - if (data.Message != null) { - contents.message = __expectString(data.Message); - } + const doc = take(data, { + connectivityInfo: [, (_) => de_connectivityInfoList(_, context), `ConnectivityInfo`], + message: [, __expectString, `Message`], + }); + Object.assign(contents, doc); return contents; }; @@ -1900,10 +1864,9 @@ const de_GetConnectivityInfoCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1923,29 +1886,16 @@ export const de_GetCoreDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.architecture != null) { - contents.architecture = __expectString(data.architecture); - } - if (data.coreDeviceThingName != null) { - contents.coreDeviceThingName = __expectString(data.coreDeviceThingName); - } - if (data.coreVersion != null) { - contents.coreVersion = __expectString(data.coreVersion); - } - if (data.lastStatusUpdateTimestamp != null) { - contents.lastStatusUpdateTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.lastStatusUpdateTimestamp)) - ); - } - if (data.platform != null) { - contents.platform = __expectString(data.platform); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + architecture: __expectString, + coreDeviceThingName: __expectString, + coreVersion: __expectString, + lastStatusUpdateTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + platform: __expectString, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1979,10 +1929,9 @@ const de_GetCoreDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2002,48 +1951,23 @@ export const de_GetDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.components != null) { - contents.components = de_ComponentDeploymentSpecifications(data.components, context); - } - if (data.creationTimestamp != null) { - contents.creationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTimestamp))); - } - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } - if (data.deploymentName != null) { - contents.deploymentName = __expectString(data.deploymentName); - } - if (data.deploymentPolicies != null) { - contents.deploymentPolicies = de_DeploymentPolicies(data.deploymentPolicies, context); - } - if (data.deploymentStatus != null) { - contents.deploymentStatus = __expectString(data.deploymentStatus); - } - if (data.iotJobArn != null) { - contents.iotJobArn = __expectString(data.iotJobArn); - } - if (data.iotJobConfiguration != null) { - contents.iotJobConfiguration = de_DeploymentIoTJobConfiguration(data.iotJobConfiguration, context); - } - if (data.iotJobId != null) { - contents.iotJobId = __expectString(data.iotJobId); - } - if (data.isLatestForTarget != null) { - contents.isLatestForTarget = __expectBoolean(data.isLatestForTarget); - } - if (data.parentTargetArn != null) { - contents.parentTargetArn = __expectString(data.parentTargetArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.targetArn != null) { - contents.targetArn = __expectString(data.targetArn); - } + const doc = take(data, { + components: (_) => de_ComponentDeploymentSpecifications(_, context), + creationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + deploymentName: __expectString, + deploymentPolicies: _json, + deploymentStatus: __expectString, + iotJobArn: __expectString, + iotJobConfiguration: (_) => de_DeploymentIoTJobConfiguration(_, context), + iotJobId: __expectString, + isLatestForTarget: __expectBoolean, + parentTargetArn: __expectString, + revisionId: __expectString, + tags: _json, + targetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2077,10 +2001,9 @@ const de_GetDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2100,12 +2023,11 @@ export const de_GetServiceRoleForAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssociatedAt != null) { - contents.associatedAt = __expectString(data.AssociatedAt); - } - if (data.RoleArn != null) { - contents.roleArn = __expectString(data.RoleArn); - } + const doc = take(data, { + associatedAt: [, __expectString, `AssociatedAt`], + roleArn: [, __expectString, `RoleArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -2127,10 +2049,9 @@ const de_GetServiceRoleForAccountCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2150,12 +2071,11 @@ export const de_ListClientDevicesAssociatedWithCoreDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associatedClientDevices != null) { - contents.associatedClientDevices = de_AssociatedClientDeviceList(data.associatedClientDevices, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + associatedClientDevices: (_) => de_AssociatedClientDeviceList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2189,10 +2109,9 @@ const de_ListClientDevicesAssociatedWithCoreDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2212,12 +2131,11 @@ export const de_ListComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.components != null) { - contents.components = de_ComponentList(data.components, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + components: (_) => de_ComponentList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2251,10 +2169,9 @@ const de_ListComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2274,12 +2191,11 @@ export const de_ListComponentVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentVersions != null) { - contents.componentVersions = de_ComponentVersionList(data.componentVersions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + componentVersions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2313,10 +2229,9 @@ const de_ListComponentVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2336,12 +2251,11 @@ export const de_ListCoreDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.coreDevices != null) { - contents.coreDevices = de_CoreDevicesList(data.coreDevices, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + coreDevices: (_) => de_CoreDevicesList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2372,10 +2286,9 @@ const de_ListCoreDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2395,12 +2308,11 @@ export const de_ListDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deployments != null) { - contents.deployments = de_DeploymentList(data.deployments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + deployments: (_) => de_DeploymentList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2431,10 +2343,9 @@ const de_ListDeploymentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2454,12 +2365,11 @@ export const de_ListEffectiveDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.effectiveDeployments != null) { - contents.effectiveDeployments = de_EffectiveDeploymentsList(data.effectiveDeployments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + effectiveDeployments: (_) => de_EffectiveDeploymentsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2493,10 +2403,9 @@ const de_ListEffectiveDeploymentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2516,12 +2425,11 @@ export const de_ListInstalledComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.installedComponents != null) { - contents.installedComponents = de_InstalledComponentList(data.installedComponents, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + installedComponents: (_) => de_InstalledComponentList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2555,10 +2463,9 @@ const de_ListInstalledComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2578,9 +2485,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2608,10 +2516,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2631,9 +2538,10 @@ export const de_ResolveComponentCandidatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resolvedComponentVersions != null) { - contents.resolvedComponentVersions = de_ResolvedComponentVersionsList(data.resolvedComponentVersions, context); - } + const doc = take(data, { + resolvedComponentVersions: (_) => de_ResolvedComponentVersionsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2670,10 +2578,9 @@ const de_ResolveComponentCandidatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2720,10 +2627,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2770,10 +2676,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2793,12 +2698,11 @@ export const de_UpdateConnectivityInfoCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.message = __expectString(data.Message); - } - if (data.Version != null) { - contents.version = __expectString(data.Version); - } + const doc = take(data, { + message: [, __expectString, `Message`], + version: [, __expectString, `Version`], + }); + Object.assign(contents, doc); return contents; }; @@ -2823,16 +2727,15 @@ const de_UpdateConnectivityInfoCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2842,9 +2745,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2858,15 +2762,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2888,9 +2789,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2907,9 +2809,10 @@ const de_RequestAlreadyInProgressExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestAlreadyInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2926,15 +2829,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2951,21 +2851,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2984,15 +2877,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3006,15 +2896,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fields != null) { - contents.fields = de_ValidationExceptionFieldList(data.fields, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fields: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3022,114 +2909,31 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AssociateClientDeviceWithCoreDeviceEntry - */ -const se_AssociateClientDeviceWithCoreDeviceEntry = ( - input: AssociateClientDeviceWithCoreDeviceEntry, - context: __SerdeContext -): any => { - return { - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; +// se_AssociateClientDeviceWithCoreDeviceEntry omitted. -/** - * serializeAws_restJson1AssociateClientDeviceWithCoreDeviceEntryList - */ -const se_AssociateClientDeviceWithCoreDeviceEntryList = ( - input: AssociateClientDeviceWithCoreDeviceEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociateClientDeviceWithCoreDeviceEntry(entry, context); - }); -}; +// se_AssociateClientDeviceWithCoreDeviceEntryList omitted. -/** - * serializeAws_restJson1ComponentCandidate - */ -const se_ComponentCandidate = (input: ComponentCandidate, context: __SerdeContext): any => { - return { - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.componentVersion != null && { componentVersion: input.componentVersion }), - ...(input.versionRequirements != null && { - versionRequirements: se_ComponentVersionRequirementMap(input.versionRequirements, context), - }), - }; -}; +// se_ComponentCandidate omitted. -/** - * serializeAws_restJson1ComponentCandidateList - */ -const se_ComponentCandidateList = (input: ComponentCandidate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentCandidate(entry, context); - }); -}; +// se_ComponentCandidateList omitted. -/** - * serializeAws_restJson1ComponentConfigurationPathList - */ -const se_ComponentConfigurationPathList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComponentConfigurationPathList omitted. -/** - * serializeAws_restJson1ComponentConfigurationUpdate - */ -const se_ComponentConfigurationUpdate = (input: ComponentConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.merge != null && { merge: input.merge }), - ...(input.reset != null && { reset: se_ComponentConfigurationPathList(input.reset, context) }), - }; -}; +// se_ComponentConfigurationUpdate omitted. -/** - * serializeAws_restJson1ComponentDependencyMap - */ -const se_ComponentDependencyMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ComponentDependencyRequirement(value, context); - return acc; - }, {}); -}; +// se_ComponentDependencyMap omitted. -/** - * serializeAws_restJson1ComponentDependencyRequirement - */ -const se_ComponentDependencyRequirement = (input: ComponentDependencyRequirement, context: __SerdeContext): any => { - return { - ...(input.dependencyType != null && { dependencyType: input.dependencyType }), - ...(input.versionRequirement != null && { versionRequirement: input.versionRequirement }), - }; -}; +// se_ComponentDependencyRequirement omitted. /** * serializeAws_restJson1ComponentDeploymentSpecification */ const se_ComponentDeploymentSpecification = (input: ComponentDeploymentSpecification, context: __SerdeContext): any => { - return { - ...(input.componentVersion != null && { componentVersion: input.componentVersion }), - ...(input.configurationUpdate != null && { - configurationUpdate: se_ComponentConfigurationUpdate(input.configurationUpdate, context), - }), - ...(input.runWith != null && { runWith: se_ComponentRunWith(input.runWith, context) }), - }; + return take(input, { + componentVersion: [], + configurationUpdate: _json, + runWith: (_) => se_ComponentRunWith(_, context), + }); }; /** @@ -3148,63 +2952,33 @@ const se_ComponentDeploymentSpecifications = ( }, {}); }; -/** - * serializeAws_restJson1ComponentPlatform - */ -const se_ComponentPlatform = (input: ComponentPlatform, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_PlatformAttributesMap(input.attributes, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_ComponentPlatform omitted. -/** - * serializeAws_restJson1ComponentPlatformList - */ -const se_ComponentPlatformList = (input: ComponentPlatform[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentPlatform(entry, context); - }); -}; +// se_ComponentPlatformList omitted. /** * serializeAws_restJson1ComponentRunWith */ const se_ComponentRunWith = (input: ComponentRunWith, context: __SerdeContext): any => { - return { - ...(input.posixUser != null && { posixUser: input.posixUser }), - ...(input.systemResourceLimits != null && { - systemResourceLimits: se_SystemResourceLimits(input.systemResourceLimits, context), - }), - ...(input.windowsUser != null && { windowsUser: input.windowsUser }), - }; + return take(input, { + posixUser: [], + systemResourceLimits: (_) => se_SystemResourceLimits(_, context), + windowsUser: [], + }); }; -/** - * serializeAws_restJson1ComponentVersionRequirementMap - */ -const se_ComponentVersionRequirementMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ComponentVersionRequirementMap omitted. /** * serializeAws_restJson1ConnectivityInfo */ const se_ConnectivityInfo = (input: ConnectivityInfo, context: __SerdeContext): any => { - return { - ...(input.hostAddress != null && { HostAddress: input.hostAddress }), - ...(input.id != null && { Id: input.id }), - ...(input.metadata != null && { Metadata: input.metadata }), - ...(input.portNumber != null && { PortNumber: input.portNumber }), - }; + return take(input, { + HostAddress: [, , `hostAddress`], + Id: [, , `id`], + Metadata: [, , `metadata`], + PortNumber: [, , `portNumber`], + }); }; /** @@ -3218,104 +2992,46 @@ const se_connectivityInfoList = (input: ConnectivityInfo[], context: __SerdeCont }); }; -/** - * serializeAws_restJson1DeploymentComponentUpdatePolicy - */ -const se_DeploymentComponentUpdatePolicy = (input: DeploymentComponentUpdatePolicy, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }), - }; -}; +// se_DeploymentComponentUpdatePolicy omitted. -/** - * serializeAws_restJson1DeploymentConfigurationValidationPolicy - */ -const se_DeploymentConfigurationValidationPolicy = ( - input: DeploymentConfigurationValidationPolicy, - context: __SerdeContext -): any => { - return { - ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }), - }; -}; +// se_DeploymentConfigurationValidationPolicy omitted. /** * serializeAws_restJson1DeploymentIoTJobConfiguration */ const se_DeploymentIoTJobConfiguration = (input: DeploymentIoTJobConfiguration, context: __SerdeContext): any => { - return { - ...(input.abortConfig != null && { abortConfig: se_IoTJobAbortConfig(input.abortConfig, context) }), - ...(input.jobExecutionsRolloutConfig != null && { - jobExecutionsRolloutConfig: se_IoTJobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context), - }), - ...(input.timeoutConfig != null && { timeoutConfig: se_IoTJobTimeoutConfig(input.timeoutConfig, context) }), - }; + return take(input, { + abortConfig: (_) => se_IoTJobAbortConfig(_, context), + jobExecutionsRolloutConfig: (_) => se_IoTJobExecutionsRolloutConfig(_, context), + timeoutConfig: _json, + }); }; -/** - * serializeAws_restJson1DeploymentPolicies - */ -const se_DeploymentPolicies = (input: DeploymentPolicies, context: __SerdeContext): any => { - return { - ...(input.componentUpdatePolicy != null && { - componentUpdatePolicy: se_DeploymentComponentUpdatePolicy(input.componentUpdatePolicy, context), - }), - ...(input.configurationValidationPolicy != null && { - configurationValidationPolicy: se_DeploymentConfigurationValidationPolicy( - input.configurationValidationPolicy, - context - ), - }), - ...(input.failureHandlingPolicy != null && { failureHandlingPolicy: input.failureHandlingPolicy }), - }; -}; +// se_DeploymentPolicies omitted. -/** - * serializeAws_restJson1DisassociateClientDeviceFromCoreDeviceEntry - */ -const se_DisassociateClientDeviceFromCoreDeviceEntry = ( - input: DisassociateClientDeviceFromCoreDeviceEntry, - context: __SerdeContext -): any => { - return { - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; +// se_DisassociateClientDeviceFromCoreDeviceEntry omitted. -/** - * serializeAws_restJson1DisassociateClientDeviceFromCoreDeviceEntryList - */ -const se_DisassociateClientDeviceFromCoreDeviceEntryList = ( - input: DisassociateClientDeviceFromCoreDeviceEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DisassociateClientDeviceFromCoreDeviceEntry(entry, context); - }); -}; +// se_DisassociateClientDeviceFromCoreDeviceEntryList omitted. /** * serializeAws_restJson1IoTJobAbortConfig */ const se_IoTJobAbortConfig = (input: IoTJobAbortConfig, context: __SerdeContext): any => { - return { - ...(input.criteriaList != null && { criteriaList: se_IoTJobAbortCriteriaList(input.criteriaList, context) }), - }; + return take(input, { + criteriaList: (_) => se_IoTJobAbortCriteriaList(_, context), + }); }; /** * serializeAws_restJson1IoTJobAbortCriteria */ const se_IoTJobAbortCriteria = (input: IoTJobAbortCriteria, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.failureType != null && { failureType: input.failureType }), - ...(input.minNumberOfExecutedThings != null && { minNumberOfExecutedThings: input.minNumberOfExecutedThings }), - ...(input.thresholdPercentage != null && { thresholdPercentage: __serializeFloat(input.thresholdPercentage) }), - }; + return take(input, { + action: [], + failureType: [], + minNumberOfExecutedThings: [], + thresholdPercentage: __serializeFloat, + }); }; /** @@ -3333,280 +3049,77 @@ const se_IoTJobAbortCriteriaList = (input: IoTJobAbortCriteria[], context: __Ser * serializeAws_restJson1IoTJobExecutionsRolloutConfig */ const se_IoTJobExecutionsRolloutConfig = (input: IoTJobExecutionsRolloutConfig, context: __SerdeContext): any => { - return { - ...(input.exponentialRate != null && { - exponentialRate: se_IoTJobExponentialRolloutRate(input.exponentialRate, context), - }), - ...(input.maximumPerMinute != null && { maximumPerMinute: input.maximumPerMinute }), - }; + return take(input, { + exponentialRate: (_) => se_IoTJobExponentialRolloutRate(_, context), + maximumPerMinute: [], + }); }; /** * serializeAws_restJson1IoTJobExponentialRolloutRate */ const se_IoTJobExponentialRolloutRate = (input: IoTJobExponentialRolloutRate, context: __SerdeContext): any => { - return { - ...(input.baseRatePerMinute != null && { baseRatePerMinute: input.baseRatePerMinute }), - ...(input.incrementFactor != null && { incrementFactor: __serializeFloat(input.incrementFactor) }), - ...(input.rateIncreaseCriteria != null && { - rateIncreaseCriteria: se_IoTJobRateIncreaseCriteria(input.rateIncreaseCriteria, context), - }), - }; + return take(input, { + baseRatePerMinute: [], + incrementFactor: __serializeFloat, + rateIncreaseCriteria: _json, + }); }; -/** - * serializeAws_restJson1IoTJobRateIncreaseCriteria - */ -const se_IoTJobRateIncreaseCriteria = (input: IoTJobRateIncreaseCriteria, context: __SerdeContext): any => { - return { - ...(input.numberOfNotifiedThings != null && { numberOfNotifiedThings: input.numberOfNotifiedThings }), - ...(input.numberOfSucceededThings != null && { numberOfSucceededThings: input.numberOfSucceededThings }), - }; -}; +// se_IoTJobRateIncreaseCriteria omitted. -/** - * serializeAws_restJson1IoTJobTimeoutConfig - */ -const se_IoTJobTimeoutConfig = (input: IoTJobTimeoutConfig, context: __SerdeContext): any => { - return { - ...(input.inProgressTimeoutInMinutes != null && { inProgressTimeoutInMinutes: input.inProgressTimeoutInMinutes }), - }; -}; +// se_IoTJobTimeoutConfig omitted. -/** - * serializeAws_restJson1LambdaContainerParams - */ -const se_LambdaContainerParams = (input: LambdaContainerParams, context: __SerdeContext): any => { - return { - ...(input.devices != null && { devices: se_LambdaDeviceList(input.devices, context) }), - ...(input.memorySizeInKB != null && { memorySizeInKB: input.memorySizeInKB }), - ...(input.mountROSysfs != null && { mountROSysfs: input.mountROSysfs }), - ...(input.volumes != null && { volumes: se_LambdaVolumeList(input.volumes, context) }), - }; -}; +// se_LambdaContainerParams omitted. -/** - * serializeAws_restJson1LambdaDeviceList - */ -const se_LambdaDeviceList = (input: LambdaDeviceMount[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LambdaDeviceMount(entry, context); - }); -}; +// se_LambdaDeviceList omitted. -/** - * serializeAws_restJson1LambdaDeviceMount - */ -const se_LambdaDeviceMount = (input: LambdaDeviceMount, context: __SerdeContext): any => { - return { - ...(input.addGroupOwner != null && { addGroupOwner: input.addGroupOwner }), - ...(input.path != null && { path: input.path }), - ...(input.permission != null && { permission: input.permission }), - }; -}; +// se_LambdaDeviceMount omitted. -/** - * serializeAws_restJson1LambdaEnvironmentVariables - */ -const se_LambdaEnvironmentVariables = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_LambdaEnvironmentVariables omitted. -/** - * serializeAws_restJson1LambdaEventSource - */ -const se_LambdaEventSource = (input: LambdaEventSource, context: __SerdeContext): any => { - return { - ...(input.topic != null && { topic: input.topic }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_LambdaEventSource omitted. -/** - * serializeAws_restJson1LambdaEventSourceList - */ -const se_LambdaEventSourceList = (input: LambdaEventSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LambdaEventSource(entry, context); - }); -}; +// se_LambdaEventSourceList omitted. -/** - * serializeAws_restJson1LambdaExecArgsList - */ -const se_LambdaExecArgsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LambdaExecArgsList omitted. -/** - * serializeAws_restJson1LambdaExecutionParameters - */ -const se_LambdaExecutionParameters = (input: LambdaExecutionParameters, context: __SerdeContext): any => { - return { - ...(input.environmentVariables != null && { - environmentVariables: se_LambdaEnvironmentVariables(input.environmentVariables, context), - }), - ...(input.eventSources != null && { eventSources: se_LambdaEventSourceList(input.eventSources, context) }), - ...(input.execArgs != null && { execArgs: se_LambdaExecArgsList(input.execArgs, context) }), - ...(input.inputPayloadEncodingType != null && { inputPayloadEncodingType: input.inputPayloadEncodingType }), - ...(input.linuxProcessParams != null && { - linuxProcessParams: se_LambdaLinuxProcessParams(input.linuxProcessParams, context), - }), - ...(input.maxIdleTimeInSeconds != null && { maxIdleTimeInSeconds: input.maxIdleTimeInSeconds }), - ...(input.maxInstancesCount != null && { maxInstancesCount: input.maxInstancesCount }), - ...(input.maxQueueSize != null && { maxQueueSize: input.maxQueueSize }), - ...(input.pinned != null && { pinned: input.pinned }), - ...(input.statusTimeoutInSeconds != null && { statusTimeoutInSeconds: input.statusTimeoutInSeconds }), - ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }), - }; -}; +// se_LambdaExecutionParameters omitted. -/** - * serializeAws_restJson1LambdaFunctionRecipeSource - */ -const se_LambdaFunctionRecipeSource = (input: LambdaFunctionRecipeSource, context: __SerdeContext): any => { - return { - ...(input.componentDependencies != null && { - componentDependencies: se_ComponentDependencyMap(input.componentDependencies, context), - }), - ...(input.componentLambdaParameters != null && { - componentLambdaParameters: se_LambdaExecutionParameters(input.componentLambdaParameters, context), - }), - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.componentPlatforms != null && { - componentPlatforms: se_ComponentPlatformList(input.componentPlatforms, context), - }), - ...(input.componentVersion != null && { componentVersion: input.componentVersion }), - ...(input.lambdaArn != null && { lambdaArn: input.lambdaArn }), - }; -}; +// se_LambdaFunctionRecipeSource omitted. -/** - * serializeAws_restJson1LambdaLinuxProcessParams - */ -const se_LambdaLinuxProcessParams = (input: LambdaLinuxProcessParams, context: __SerdeContext): any => { - return { - ...(input.containerParams != null && { containerParams: se_LambdaContainerParams(input.containerParams, context) }), - ...(input.isolationMode != null && { isolationMode: input.isolationMode }), - }; -}; +// se_LambdaLinuxProcessParams omitted. -/** - * serializeAws_restJson1LambdaVolumeList - */ -const se_LambdaVolumeList = (input: LambdaVolumeMount[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LambdaVolumeMount(entry, context); - }); -}; +// se_LambdaVolumeList omitted. -/** - * serializeAws_restJson1LambdaVolumeMount - */ -const se_LambdaVolumeMount = (input: LambdaVolumeMount, context: __SerdeContext): any => { - return { - ...(input.addGroupOwner != null && { addGroupOwner: input.addGroupOwner }), - ...(input.destinationPath != null && { destinationPath: input.destinationPath }), - ...(input.permission != null && { permission: input.permission }), - ...(input.sourcePath != null && { sourcePath: input.sourcePath }), - }; -}; +// se_LambdaVolumeMount omitted. -/** - * serializeAws_restJson1PlatformAttributesMap - */ -const se_PlatformAttributesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PlatformAttributesMap omitted. /** * serializeAws_restJson1SystemResourceLimits */ const se_SystemResourceLimits = (input: SystemResourceLimits, context: __SerdeContext): any => { - return { - ...(input.cpus != null && { cpus: __serializeFloat(input.cpus) }), - ...(input.memory != null && { memory: input.memory }), - }; + return take(input, { + cpus: __serializeFloat, + memory: [], + }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1AssociateClientDeviceWithCoreDeviceErrorEntry - */ -const de_AssociateClientDeviceWithCoreDeviceErrorEntry = ( - output: any, - context: __SerdeContext -): AssociateClientDeviceWithCoreDeviceErrorEntry => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - thingName: __expectString(output.thingName), - } as any; -}; +// de_AssociateClientDeviceWithCoreDeviceErrorEntry omitted. -/** - * deserializeAws_restJson1AssociateClientDeviceWithCoreDeviceErrorList - */ -const de_AssociateClientDeviceWithCoreDeviceErrorList = ( - output: any, - context: __SerdeContext -): AssociateClientDeviceWithCoreDeviceErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociateClientDeviceWithCoreDeviceErrorEntry(entry, context); - }); - return retVal; -}; +// de_AssociateClientDeviceWithCoreDeviceErrorList omitted. /** * deserializeAws_restJson1AssociatedClientDevice */ const de_AssociatedClientDevice = (output: any, context: __SerdeContext): AssociatedClientDevice => { - return { - associationTimestamp: - output.associationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.associationTimestamp))) - : undefined, - thingName: __expectString(output.thingName), - } as any; + return take(output, { + associationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + thingName: __expectString, + }) as any; }; /** @@ -3616,62 +3129,27 @@ const de_AssociatedClientDeviceList = (output: any, context: __SerdeContext): As const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssociatedClientDevice(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CloudComponentStatus - */ -const de_CloudComponentStatus = (output: any, context: __SerdeContext): CloudComponentStatus => { - return { - componentState: __expectString(output.componentState), - errors: output.errors != null ? de_StringMap(output.errors, context) : undefined, - message: __expectString(output.message), - vendorGuidance: __expectString(output.vendorGuidance), - vendorGuidanceMessage: __expectString(output.vendorGuidanceMessage), - } as any; -}; +// de_CloudComponentStatus omitted. /** * deserializeAws_restJson1Component */ const de_Component = (output: any, context: __SerdeContext): Component => { - return { - arn: __expectString(output.arn), - componentName: __expectString(output.componentName), - latestVersion: output.latestVersion != null ? de_ComponentLatestVersion(output.latestVersion, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + componentName: __expectString, + latestVersion: (_: any) => de_ComponentLatestVersion(_, context), + }) as any; }; -/** - * deserializeAws_restJson1ComponentConfigurationPathList - */ -const de_ComponentConfigurationPathList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ComponentConfigurationPathList omitted. -/** - * deserializeAws_restJson1ComponentConfigurationUpdate - */ -const de_ComponentConfigurationUpdate = (output: any, context: __SerdeContext): ComponentConfigurationUpdate => { - return { - merge: __expectString(output.merge), - reset: output.reset != null ? de_ComponentConfigurationPathList(output.reset, context) : undefined, - } as any; -}; +// de_ComponentConfigurationUpdate omitted. /** * deserializeAws_restJson1ComponentDeploymentSpecification @@ -3680,14 +3158,11 @@ const de_ComponentDeploymentSpecification = ( output: any, context: __SerdeContext ): ComponentDeploymentSpecification => { - return { - componentVersion: __expectString(output.componentVersion), - configurationUpdate: - output.configurationUpdate != null - ? de_ComponentConfigurationUpdate(output.configurationUpdate, context) - : undefined, - runWith: output.runWith != null ? de_ComponentRunWith(output.runWith, context) : undefined, - } as any; + return take(output, { + componentVersion: __expectString, + configurationUpdate: _json, + runWith: (_: any) => de_ComponentRunWith(_, context), + }) as any; }; /** @@ -3713,17 +3188,14 @@ const de_ComponentDeploymentSpecifications = ( * deserializeAws_restJson1ComponentLatestVersion */ const de_ComponentLatestVersion = (output: any, context: __SerdeContext): ComponentLatestVersion => { - return { - arn: __expectString(output.arn), - componentVersion: __expectString(output.componentVersion), - creationTimestamp: - output.creationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp))) - : undefined, - description: __expectString(output.description), - platforms: output.platforms != null ? de_ComponentPlatformList(output.platforms, context) : undefined, - publisher: __expectString(output.publisher), - } as any; + return take(output, { + arn: __expectString, + componentVersion: __expectString, + creationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + platforms: _json, + publisher: __expectString, + }) as any; }; /** @@ -3733,87 +3205,40 @@ const de_ComponentList = (output: any, context: __SerdeContext): Component[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Component(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ComponentPlatform - */ -const de_ComponentPlatform = (output: any, context: __SerdeContext): ComponentPlatform => { - return { - attributes: output.attributes != null ? de_PlatformAttributesMap(output.attributes, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_ComponentPlatform omitted. -/** - * deserializeAws_restJson1ComponentPlatformList - */ -const de_ComponentPlatformList = (output: any, context: __SerdeContext): ComponentPlatform[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentPlatform(entry, context); - }); - return retVal; -}; +// de_ComponentPlatformList omitted. /** * deserializeAws_restJson1ComponentRunWith */ const de_ComponentRunWith = (output: any, context: __SerdeContext): ComponentRunWith => { - return { - posixUser: __expectString(output.posixUser), - systemResourceLimits: - output.systemResourceLimits != null ? de_SystemResourceLimits(output.systemResourceLimits, context) : undefined, - windowsUser: __expectString(output.windowsUser), - } as any; + return take(output, { + posixUser: __expectString, + systemResourceLimits: (_: any) => de_SystemResourceLimits(_, context), + windowsUser: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ComponentVersionList - */ -const de_ComponentVersionList = (output: any, context: __SerdeContext): ComponentVersionListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentVersionListItem(entry, context); - }); - return retVal; -}; +// de_ComponentVersionList omitted. -/** - * deserializeAws_restJson1ComponentVersionListItem - */ -const de_ComponentVersionListItem = (output: any, context: __SerdeContext): ComponentVersionListItem => { - return { - arn: __expectString(output.arn), - componentName: __expectString(output.componentName), - componentVersion: __expectString(output.componentVersion), - } as any; -}; +// de_ComponentVersionListItem omitted. /** * deserializeAws_restJson1ConnectivityInfo */ const de_ConnectivityInfo = (output: any, context: __SerdeContext): ConnectivityInfo => { - return { - hostAddress: __expectString(output.HostAddress), - id: __expectString(output.Id), - metadata: __expectString(output.Metadata), - portNumber: __expectInt32(output.PortNumber), - } as any; + return take(output, { + hostAddress: [, __expectString, `HostAddress`], + id: [, __expectString, `Id`], + metadata: [, __expectString, `Metadata`], + portNumber: [, __expectInt32, `PortNumber`], + }) as any; }; /** @@ -3823,9 +3248,6 @@ const de_connectivityInfoList = (output: any, context: __SerdeContext): Connecti const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConnectivityInfo(entry, context); }); return retVal; @@ -3835,14 +3257,11 @@ const de_connectivityInfoList = (output: any, context: __SerdeContext): Connecti * deserializeAws_restJson1CoreDevice */ const de_CoreDevice = (output: any, context: __SerdeContext): CoreDevice => { - return { - coreDeviceThingName: __expectString(output.coreDeviceThingName), - lastStatusUpdateTimestamp: - output.lastStatusUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusUpdateTimestamp))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + coreDeviceThingName: __expectString, + lastStatusUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** @@ -3852,9 +3271,6 @@ const de_CoreDevicesList = (output: any, context: __SerdeContext): CoreDevice[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CoreDevice(entry, context); }); return retVal; @@ -3864,55 +3280,31 @@ const de_CoreDevicesList = (output: any, context: __SerdeContext): CoreDevice[] * deserializeAws_restJson1Deployment */ const de_Deployment = (output: any, context: __SerdeContext): Deployment => { - return { - creationTimestamp: - output.creationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp))) - : undefined, - deploymentId: __expectString(output.deploymentId), - deploymentName: __expectString(output.deploymentName), - deploymentStatus: __expectString(output.deploymentStatus), - isLatestForTarget: __expectBoolean(output.isLatestForTarget), - parentTargetArn: __expectString(output.parentTargetArn), - revisionId: __expectString(output.revisionId), - targetArn: __expectString(output.targetArn), - } as any; + return take(output, { + creationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + deploymentName: __expectString, + deploymentStatus: __expectString, + isLatestForTarget: __expectBoolean, + parentTargetArn: __expectString, + revisionId: __expectString, + targetArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DeploymentComponentUpdatePolicy - */ -const de_DeploymentComponentUpdatePolicy = (output: any, context: __SerdeContext): DeploymentComponentUpdatePolicy => { - return { - action: __expectString(output.action), - timeoutInSeconds: __expectInt32(output.timeoutInSeconds), - } as any; -}; +// de_DeploymentComponentUpdatePolicy omitted. -/** - * deserializeAws_restJson1DeploymentConfigurationValidationPolicy - */ -const de_DeploymentConfigurationValidationPolicy = ( - output: any, - context: __SerdeContext -): DeploymentConfigurationValidationPolicy => { - return { - timeoutInSeconds: __expectInt32(output.timeoutInSeconds), - } as any; -}; +// de_DeploymentConfigurationValidationPolicy omitted. /** * deserializeAws_restJson1DeploymentIoTJobConfiguration */ const de_DeploymentIoTJobConfiguration = (output: any, context: __SerdeContext): DeploymentIoTJobConfiguration => { - return { - abortConfig: output.abortConfig != null ? de_IoTJobAbortConfig(output.abortConfig, context) : undefined, - jobExecutionsRolloutConfig: - output.jobExecutionsRolloutConfig != null - ? de_IoTJobExecutionsRolloutConfig(output.jobExecutionsRolloutConfig, context) - : undefined, - timeoutConfig: output.timeoutConfig != null ? de_IoTJobTimeoutConfig(output.timeoutConfig, context) : undefined, - } as any; + return take(output, { + abortConfig: (_: any) => de_IoTJobAbortConfig(_, context), + jobExecutionsRolloutConfig: (_: any) => de_IoTJobExecutionsRolloutConfig(_, context), + timeoutConfig: _json, + }) as any; }; /** @@ -3922,118 +3314,39 @@ const de_DeploymentList = (output: any, context: __SerdeContext): Deployment[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Deployment(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DeploymentPolicies - */ -const de_DeploymentPolicies = (output: any, context: __SerdeContext): DeploymentPolicies => { - return { - componentUpdatePolicy: - output.componentUpdatePolicy != null - ? de_DeploymentComponentUpdatePolicy(output.componentUpdatePolicy, context) - : undefined, - configurationValidationPolicy: - output.configurationValidationPolicy != null - ? de_DeploymentConfigurationValidationPolicy(output.configurationValidationPolicy, context) - : undefined, - failureHandlingPolicy: __expectString(output.failureHandlingPolicy), - } as any; -}; +// de_DeploymentPolicies omitted. -/** - * deserializeAws_restJson1DisassociateClientDeviceFromCoreDeviceErrorEntry - */ -const de_DisassociateClientDeviceFromCoreDeviceErrorEntry = ( - output: any, - context: __SerdeContext -): DisassociateClientDeviceFromCoreDeviceErrorEntry => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - thingName: __expectString(output.thingName), - } as any; -}; +// de_DisassociateClientDeviceFromCoreDeviceErrorEntry omitted. -/** - * deserializeAws_restJson1DisassociateClientDeviceFromCoreDeviceErrorList - */ -const de_DisassociateClientDeviceFromCoreDeviceErrorList = ( - output: any, - context: __SerdeContext -): DisassociateClientDeviceFromCoreDeviceErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DisassociateClientDeviceFromCoreDeviceErrorEntry(entry, context); - }); - return retVal; -}; +// de_DisassociateClientDeviceFromCoreDeviceErrorList omitted. /** * deserializeAws_restJson1EffectiveDeployment */ const de_EffectiveDeployment = (output: any, context: __SerdeContext): EffectiveDeployment => { - return { - coreDeviceExecutionStatus: __expectString(output.coreDeviceExecutionStatus), - creationTimestamp: - output.creationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp))) - : undefined, - deploymentId: __expectString(output.deploymentId), - deploymentName: __expectString(output.deploymentName), - description: __expectString(output.description), - iotJobArn: __expectString(output.iotJobArn), - iotJobId: __expectString(output.iotJobId), - modifiedTimestamp: - output.modifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedTimestamp))) - : undefined, - reason: __expectString(output.reason), - statusDetails: - output.statusDetails != null ? de_EffectiveDeploymentStatusDetails(output.statusDetails, context) : undefined, - targetArn: __expectString(output.targetArn), - } as any; -}; - -/** - * deserializeAws_restJson1EffectiveDeploymentErrorStack - */ -const de_EffectiveDeploymentErrorStack = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + coreDeviceExecutionStatus: __expectString, + creationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + deploymentName: __expectString, + description: __expectString, + iotJobArn: __expectString, + iotJobId: __expectString, + modifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + reason: __expectString, + statusDetails: _json, + targetArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1EffectiveDeploymentErrorTypeList - */ -const de_EffectiveDeploymentErrorTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EffectiveDeploymentErrorStack omitted. + +// de_EffectiveDeploymentErrorTypeList omitted. /** * deserializeAws_restJson1EffectiveDeploymentsList @@ -4042,68 +3355,32 @@ const de_EffectiveDeploymentsList = (output: any, context: __SerdeContext): Effe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EffectiveDeployment(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EffectiveDeploymentStatusDetails - */ -const de_EffectiveDeploymentStatusDetails = ( - output: any, - context: __SerdeContext -): EffectiveDeploymentStatusDetails => { - return { - errorStack: output.errorStack != null ? de_EffectiveDeploymentErrorStack(output.errorStack, context) : undefined, - errorTypes: output.errorTypes != null ? de_EffectiveDeploymentErrorTypeList(output.errorTypes, context) : undefined, - } as any; -}; +// de_EffectiveDeploymentStatusDetails omitted. /** * deserializeAws_restJson1InstalledComponent */ const de_InstalledComponent = (output: any, context: __SerdeContext): InstalledComponent => { - return { - componentName: __expectString(output.componentName), - componentVersion: __expectString(output.componentVersion), - isRoot: __expectBoolean(output.isRoot), - lastInstallationSource: __expectString(output.lastInstallationSource), - lastReportedTimestamp: - output.lastReportedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastReportedTimestamp))) - : undefined, - lastStatusChangeTimestamp: - output.lastStatusChangeTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStatusChangeTimestamp))) - : undefined, - lifecycleState: __expectString(output.lifecycleState), - lifecycleStateDetails: __expectString(output.lifecycleStateDetails), - lifecycleStatusCodes: - output.lifecycleStatusCodes != null - ? de_InstalledComponentLifecycleStatusCodeList(output.lifecycleStatusCodes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1InstalledComponentLifecycleStatusCodeList - */ -const de_InstalledComponentLifecycleStatusCodeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + componentName: __expectString, + componentVersion: __expectString, + isRoot: __expectBoolean, + lastInstallationSource: __expectString, + lastReportedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStatusChangeTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lifecycleState: __expectString, + lifecycleStateDetails: __expectString, + lifecycleStatusCodes: _json, + }) as any; }; +// de_InstalledComponentLifecycleStatusCodeList omitted. + /** * deserializeAws_restJson1InstalledComponentList */ @@ -4111,9 +3388,6 @@ const de_InstalledComponentList = (output: any, context: __SerdeContext): Instal const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstalledComponent(entry, context); }); return retVal; @@ -4123,21 +3397,21 @@ const de_InstalledComponentList = (output: any, context: __SerdeContext): Instal * deserializeAws_restJson1IoTJobAbortConfig */ const de_IoTJobAbortConfig = (output: any, context: __SerdeContext): IoTJobAbortConfig => { - return { - criteriaList: output.criteriaList != null ? de_IoTJobAbortCriteriaList(output.criteriaList, context) : undefined, - } as any; + return take(output, { + criteriaList: (_: any) => de_IoTJobAbortCriteriaList(_, context), + }) as any; }; /** * deserializeAws_restJson1IoTJobAbortCriteria */ const de_IoTJobAbortCriteria = (output: any, context: __SerdeContext): IoTJobAbortCriteria => { - return { - action: __expectString(output.action), - failureType: __expectString(output.failureType), - minNumberOfExecutedThings: __expectInt32(output.minNumberOfExecutedThings), - thresholdPercentage: __limitedParseDouble(output.thresholdPercentage), - } as any; + return take(output, { + action: __expectString, + failureType: __expectString, + minNumberOfExecutedThings: __expectInt32, + thresholdPercentage: __limitedParseDouble, + }) as any; }; /** @@ -4147,9 +3421,6 @@ const de_IoTJobAbortCriteriaList = (output: any, context: __SerdeContext): IoTJo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IoTJobAbortCriteria(entry, context); }); return retVal; @@ -4159,71 +3430,41 @@ const de_IoTJobAbortCriteriaList = (output: any, context: __SerdeContext): IoTJo * deserializeAws_restJson1IoTJobExecutionsRolloutConfig */ const de_IoTJobExecutionsRolloutConfig = (output: any, context: __SerdeContext): IoTJobExecutionsRolloutConfig => { - return { - exponentialRate: - output.exponentialRate != null ? de_IoTJobExponentialRolloutRate(output.exponentialRate, context) : undefined, - maximumPerMinute: __expectInt32(output.maximumPerMinute), - } as any; + return take(output, { + exponentialRate: (_: any) => de_IoTJobExponentialRolloutRate(_, context), + maximumPerMinute: __expectInt32, + }) as any; }; /** * deserializeAws_restJson1IoTJobExponentialRolloutRate */ const de_IoTJobExponentialRolloutRate = (output: any, context: __SerdeContext): IoTJobExponentialRolloutRate => { - return { - baseRatePerMinute: __expectInt32(output.baseRatePerMinute), - incrementFactor: __limitedParseDouble(output.incrementFactor), - rateIncreaseCriteria: - output.rateIncreaseCriteria != null - ? de_IoTJobRateIncreaseCriteria(output.rateIncreaseCriteria, context) - : undefined, - } as any; + return take(output, { + baseRatePerMinute: __expectInt32, + incrementFactor: __limitedParseDouble, + rateIncreaseCriteria: _json, + }) as any; }; -/** - * deserializeAws_restJson1IoTJobRateIncreaseCriteria - */ -const de_IoTJobRateIncreaseCriteria = (output: any, context: __SerdeContext): IoTJobRateIncreaseCriteria => { - return { - numberOfNotifiedThings: __expectInt32(output.numberOfNotifiedThings), - numberOfSucceededThings: __expectInt32(output.numberOfSucceededThings), - } as any; -}; +// de_IoTJobRateIncreaseCriteria omitted. -/** - * deserializeAws_restJson1IoTJobTimeoutConfig - */ -const de_IoTJobTimeoutConfig = (output: any, context: __SerdeContext): IoTJobTimeoutConfig => { - return { - inProgressTimeoutInMinutes: __expectLong(output.inProgressTimeoutInMinutes), - } as any; -}; +// de_IoTJobTimeoutConfig omitted. -/** - * deserializeAws_restJson1PlatformAttributesMap - */ -const de_PlatformAttributesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PlatformAttributesMap omitted. /** * deserializeAws_restJson1ResolvedComponentVersion */ const de_ResolvedComponentVersion = (output: any, context: __SerdeContext): ResolvedComponentVersion => { - return { - arn: __expectString(output.arn), - componentName: __expectString(output.componentName), - componentVersion: __expectString(output.componentVersion), - message: __expectString(output.message), - recipe: output.recipe != null ? context.base64Decoder(output.recipe) : undefined, - vendorGuidance: __expectString(output.vendorGuidance), - } as any; + return take(output, { + arn: __expectString, + componentName: __expectString, + componentVersion: __expectString, + message: __expectString, + recipe: context.base64Decoder, + vendorGuidance: __expectString, + }) as any; }; /** @@ -4233,74 +3474,28 @@ const de_ResolvedComponentVersionsList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResolvedComponentVersion(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. /** * deserializeAws_restJson1SystemResourceLimits */ const de_SystemResourceLimits = (output: any, context: __SerdeContext): SystemResourceLimits => { - return { - cpus: __limitedParseDouble(output.cpus), - memory: __expectLong(output.memory), - } as any; + return take(output, { + cpus: __limitedParseDouble, + memory: __expectLong, + }) as any; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-groundstation/src/protocols/Aws_restJson1.ts b/clients/client-groundstation/src/protocols/Aws_restJson1.ts index 9c0830c74232..7d1e5b03f2b6 100644 --- a/clients/client-groundstation/src/protocols/Aws_restJson1.ts +++ b/clients/client-groundstation/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,11 +12,12 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -90,7 +92,6 @@ import { GroundStationServiceException as __BaseException } from "../models/Grou import { AgentDetails, AggregateStatus, - AntennaDemodDecodeDetails, AntennaDownlinkConfig, AntennaDownlinkDemodDecodeConfig, AntennaUplinkConfig, @@ -98,37 +99,28 @@ import { CapabilityHealthReason, ComponentStatusData, ComponentVersion, - ConfigDetails, - ConfigListItem, ConfigTypeData, ConnectionDetails, ContactData, ContactStatus, - DataflowDetail, DataflowEndpoint, DataflowEndpointConfig, - DataflowEndpointListItem, DecodeConfig, DemodulationConfig, DependencyException, - Destination, DiscoveryData, Eirp, Elevation, EndpointDetails, EphemerisData, - EphemerisDescription, EphemerisItem, EphemerisMetaData, EphemerisStatus, - EphemerisTypeDescription, Frequency, FrequencyBandwidth, - GroundStationData, IntegerRange, InvalidParameterException, KmsKey, - MissionProfileListItem, OEMEphemeris, RangedConnectionDetails, RangedSocketAddress, @@ -136,11 +128,9 @@ import { ResourceNotFoundException, S3Object, S3RecordingConfig, - S3RecordingDetails, SatelliteListItem, SecurityDetails, SocketAddress, - Source, SpectrumConfig, TimeRange, TLEData, @@ -186,11 +176,13 @@ export const se_CreateConfigCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/config"; let body: any; - body = JSON.stringify({ - ...(input.configData != null && { configData: se_ConfigTypeData(input.configData, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + configData: (_) => se_ConfigTypeData(_, context), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -215,16 +207,14 @@ export const se_CreateDataflowEndpointGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataflowEndpointGroup"; let body: any; - body = JSON.stringify({ - ...(input.contactPostPassDurationSeconds != null && { - contactPostPassDurationSeconds: input.contactPostPassDurationSeconds, - }), - ...(input.contactPrePassDurationSeconds != null && { - contactPrePassDurationSeconds: input.contactPrePassDurationSeconds, - }), - ...(input.endpointDetails != null && { endpointDetails: se_EndpointDetailsList(input.endpointDetails, context) }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + contactPostPassDurationSeconds: [], + contactPrePassDurationSeconds: [], + endpointDetails: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -249,16 +239,18 @@ export const se_CreateEphemerisCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemeris"; let body: any; - body = JSON.stringify({ - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.ephemeris != null && { ephemeris: se_EphemerisData(input.ephemeris, context) }), - ...(input.expirationTime != null && { expirationTime: Math.round(input.expirationTime.getTime() / 1000) }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.name != null && { name: input.name }), - ...(input.priority != null && { priority: input.priority }), - ...(input.satelliteId != null && { satelliteId: input.satelliteId }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + enabled: [], + ephemeris: (_) => se_EphemerisData(_, context), + expirationTime: (_) => Math.round(_.getTime() / 1000), + kmsKeyArn: [], + name: [], + priority: [], + satelliteId: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -283,23 +275,19 @@ export const se_CreateMissionProfileCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/missionprofile"; let body: any; - body = JSON.stringify({ - ...(input.contactPostPassDurationSeconds != null && { - contactPostPassDurationSeconds: input.contactPostPassDurationSeconds, - }), - ...(input.contactPrePassDurationSeconds != null && { - contactPrePassDurationSeconds: input.contactPrePassDurationSeconds, - }), - ...(input.dataflowEdges != null && { dataflowEdges: se_DataflowEdgeList(input.dataflowEdges, context) }), - ...(input.minimumViableContactDurationSeconds != null && { - minimumViableContactDurationSeconds: input.minimumViableContactDurationSeconds, - }), - ...(input.name != null && { name: input.name }), - ...(input.streamsKmsKey != null && { streamsKmsKey: se_KmsKey(input.streamsKmsKey, context) }), - ...(input.streamsKmsRole != null && { streamsKmsRole: input.streamsKmsRole }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.trackingConfigArn != null && { trackingConfigArn: input.trackingConfigArn }), - }); + body = JSON.stringify( + take(input, { + contactPostPassDurationSeconds: [], + contactPrePassDurationSeconds: [], + dataflowEdges: (_) => _json(_), + minimumViableContactDurationSeconds: [], + name: [], + streamsKmsKey: (_) => _json(_), + streamsKmsRole: [], + tags: (_) => _json(_), + trackingConfigArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -562,10 +550,12 @@ export const se_GetMinuteUsageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/minute-usage"; let body: any; - body = JSON.stringify({ - ...(input.month != null && { month: input.month }), - ...(input.year != null && { year: input.year }), - }); + body = JSON.stringify( + take(input, { + month: [], + year: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -671,16 +661,18 @@ export const se_ListContactsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contacts"; let body: any; - body = JSON.stringify({ - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.groundStation != null && { groundStation: input.groundStation }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.missionProfileArn != null && { missionProfileArn: input.missionProfileArn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.satelliteArn != null && { satelliteArn: input.satelliteArn }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statusList != null && { statusList: se_StatusList(input.statusList, context) }), - }); + body = JSON.stringify( + take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + groundStation: [], + maxResults: [], + missionProfileArn: [], + nextToken: [], + satelliteArn: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statusList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -736,12 +728,14 @@ export const se_ListEphemeridesCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.satelliteId != null && { satelliteId: input.satelliteId }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statusList != null && { statusList: se_EphemerisStatusList(input.statusList, context) }), - }); + body = JSON.stringify( + take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + satelliteId: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statusList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -872,10 +866,12 @@ export const se_RegisterAgentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agent"; let body: any; - body = JSON.stringify({ - ...(input.agentDetails != null && { agentDetails: se_AgentDetails(input.agentDetails, context) }), - ...(input.discoveryData != null && { discoveryData: se_DiscoveryData(input.discoveryData, context) }), - }); + body = JSON.stringify( + take(input, { + agentDetails: (_) => _json(_), + discoveryData: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -900,14 +896,16 @@ export const se_ReserveContactCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/contact"; let body: any; - body = JSON.stringify({ - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.groundStation != null && { groundStation: input.groundStation }), - ...(input.missionProfileArn != null && { missionProfileArn: input.missionProfileArn }), - ...(input.satelliteArn != null && { satelliteArn: input.satelliteArn }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + groundStation: [], + missionProfileArn: [], + satelliteArn: [], + startTime: (_) => Math.round(_.getTime() / 1000), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -933,9 +931,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -991,13 +991,13 @@ export const se_UpdateAgentStatusCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/agent/{agentId}"; resolvedPath = __resolvedPath(resolvedPath, input, "agentId", () => input.agentId!, "{agentId}", false); let body: any; - body = JSON.stringify({ - ...(input.aggregateStatus != null && { aggregateStatus: se_AggregateStatus(input.aggregateStatus, context) }), - ...(input.componentStatuses != null && { - componentStatuses: se_ComponentStatusList(input.componentStatuses, context), - }), - ...(input.taskId != null && { taskId: input.taskId }), - }); + body = JSON.stringify( + take(input, { + aggregateStatus: (_) => _json(_), + componentStatuses: (_) => _json(_), + taskId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1025,10 +1025,12 @@ export const se_UpdateConfigCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "configId", () => input.configId!, "{configId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "configType", () => input.configType!, "{configType}", false); let body: any; - body = JSON.stringify({ - ...(input.configData != null && { configData: se_ConfigTypeData(input.configData, context) }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + configData: (_) => se_ConfigTypeData(_, context), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1054,11 +1056,13 @@ export const se_UpdateEphemerisCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ephemeris/{ephemerisId}"; resolvedPath = __resolvedPath(resolvedPath, input, "ephemerisId", () => input.ephemerisId!, "{ephemerisId}", false); let body: any; - body = JSON.stringify({ - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.name != null && { name: input.name }), - ...(input.priority != null && { priority: input.priority }), - }); + body = JSON.stringify( + take(input, { + enabled: [], + name: [], + priority: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1092,22 +1096,18 @@ export const se_UpdateMissionProfileCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.contactPostPassDurationSeconds != null && { - contactPostPassDurationSeconds: input.contactPostPassDurationSeconds, - }), - ...(input.contactPrePassDurationSeconds != null && { - contactPrePassDurationSeconds: input.contactPrePassDurationSeconds, - }), - ...(input.dataflowEdges != null && { dataflowEdges: se_DataflowEdgeList(input.dataflowEdges, context) }), - ...(input.minimumViableContactDurationSeconds != null && { - minimumViableContactDurationSeconds: input.minimumViableContactDurationSeconds, - }), - ...(input.name != null && { name: input.name }), - ...(input.streamsKmsKey != null && { streamsKmsKey: se_KmsKey(input.streamsKmsKey, context) }), - ...(input.streamsKmsRole != null && { streamsKmsRole: input.streamsKmsRole }), - ...(input.trackingConfigArn != null && { trackingConfigArn: input.trackingConfigArn }), - }); + body = JSON.stringify( + take(input, { + contactPostPassDurationSeconds: [], + contactPrePassDurationSeconds: [], + dataflowEdges: (_) => _json(_), + minimumViableContactDurationSeconds: [], + name: [], + streamsKmsKey: (_) => _json(_), + streamsKmsRole: [], + trackingConfigArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1133,9 +1133,10 @@ export const de_CancelContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contactId != null) { - contents.contactId = __expectString(data.contactId); - } + const doc = take(data, { + contactId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1163,10 +1164,9 @@ const de_CancelContactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1186,15 +1186,12 @@ export const de_CreateConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configArn != null) { - contents.configArn = __expectString(data.configArn); - } - if (data.configId != null) { - contents.configId = __expectString(data.configId); - } - if (data.configType != null) { - contents.configType = __expectString(data.configType); - } + const doc = take(data, { + configArn: __expectString, + configId: __expectString, + configType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1225,10 +1222,9 @@ const de_CreateConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1248,9 +1244,10 @@ export const de_CreateDataflowEndpointGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataflowEndpointGroupId != null) { - contents.dataflowEndpointGroupId = __expectString(data.dataflowEndpointGroupId); - } + const doc = take(data, { + dataflowEndpointGroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1278,10 +1275,9 @@ const de_CreateDataflowEndpointGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,9 +1297,10 @@ export const de_CreateEphemerisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ephemerisId != null) { - contents.ephemerisId = __expectString(data.ephemerisId); - } + const doc = take(data, { + ephemerisId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1331,10 +1328,9 @@ const de_CreateEphemerisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1354,9 +1350,10 @@ export const de_CreateMissionProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.missionProfileId != null) { - contents.missionProfileId = __expectString(data.missionProfileId); - } + const doc = take(data, { + missionProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1384,10 +1381,9 @@ const de_CreateMissionProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1407,15 +1403,12 @@ export const de_DeleteConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configArn != null) { - contents.configArn = __expectString(data.configArn); - } - if (data.configId != null) { - contents.configId = __expectString(data.configId); - } - if (data.configType != null) { - contents.configType = __expectString(data.configType); - } + const doc = take(data, { + configArn: __expectString, + configId: __expectString, + configType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1443,10 +1436,9 @@ const de_DeleteConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1466,9 +1458,10 @@ export const de_DeleteDataflowEndpointGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataflowEndpointGroupId != null) { - contents.dataflowEndpointGroupId = __expectString(data.dataflowEndpointGroupId); - } + const doc = take(data, { + dataflowEndpointGroupId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1496,10 +1489,9 @@ const de_DeleteDataflowEndpointGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1519,9 +1511,10 @@ export const de_DeleteEphemerisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ephemerisId != null) { - contents.ephemerisId = __expectString(data.ephemerisId); - } + const doc = take(data, { + ephemerisId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1549,10 +1542,9 @@ const de_DeleteEphemerisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1572,9 +1564,10 @@ export const de_DeleteMissionProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.missionProfileId != null) { - contents.missionProfileId = __expectString(data.missionProfileId); - } + const doc = take(data, { + missionProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1602,10 +1595,9 @@ const de_DeleteMissionProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1625,48 +1617,23 @@ export const de_DescribeContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contactId != null) { - contents.contactId = __expectString(data.contactId); - } - if (data.contactStatus != null) { - contents.contactStatus = __expectString(data.contactStatus); - } - if (data.dataflowList != null) { - contents.dataflowList = de_DataflowList(data.dataflowList, context); - } - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.errorMessage != null) { - contents.errorMessage = __expectString(data.errorMessage); - } - if (data.groundStation != null) { - contents.groundStation = __expectString(data.groundStation); - } - if (data.maximumElevation != null) { - contents.maximumElevation = de_Elevation(data.maximumElevation, context); - } - if (data.missionProfileArn != null) { - contents.missionProfileArn = __expectString(data.missionProfileArn); - } - if (data.postPassEndTime != null) { - contents.postPassEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.postPassEndTime))); - } - if (data.prePassStartTime != null) { - contents.prePassStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.prePassStartTime))); - } - if (data.region != null) { - contents.region = __expectString(data.region); - } - if (data.satelliteArn != null) { - contents.satelliteArn = __expectString(data.satelliteArn); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + contactId: __expectString, + contactStatus: __expectString, + dataflowList: _json, + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errorMessage: __expectString, + groundStation: __expectString, + maximumElevation: (_) => de_Elevation(_, context), + missionProfileArn: __expectString, + postPassEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + prePassStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + region: __expectString, + satelliteArn: __expectString, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1694,10 +1661,9 @@ const de_DescribeContactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1717,36 +1683,19 @@ export const de_DescribeEphemerisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.enabled != null) { - contents.enabled = __expectBoolean(data.enabled); - } - if (data.ephemerisId != null) { - contents.ephemerisId = __expectString(data.ephemerisId); - } - if (data.invalidReason != null) { - contents.invalidReason = __expectString(data.invalidReason); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.priority != null) { - contents.priority = __expectInt32(data.priority); - } - if (data.satelliteId != null) { - contents.satelliteId = __expectString(data.satelliteId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.suppliedData != null) { - contents.suppliedData = de_EphemerisTypeDescription(__expectUnion(data.suppliedData), context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + enabled: __expectBoolean, + ephemerisId: __expectString, + invalidReason: __expectString, + name: __expectString, + priority: __expectInt32, + satelliteId: __expectString, + status: __expectString, + suppliedData: (_) => _json(__expectUnion(_)), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1774,10 +1723,9 @@ const de_DescribeEphemerisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1797,12 +1745,11 @@ export const de_GetAgentConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.agentId != null) { - contents.agentId = __expectString(data.agentId); - } - if (data.taskingDocument != null) { - contents.taskingDocument = __expectString(data.taskingDocument); - } + const doc = take(data, { + agentId: __expectString, + taskingDocument: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1830,10 +1777,9 @@ const de_GetAgentConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1853,24 +1799,15 @@ export const de_GetConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configArn != null) { - contents.configArn = __expectString(data.configArn); - } - if (data.configData != null) { - contents.configData = de_ConfigTypeData(__expectUnion(data.configData), context); - } - if (data.configId != null) { - contents.configId = __expectString(data.configId); - } - if (data.configType != null) { - contents.configType = __expectString(data.configType); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + configArn: __expectString, + configData: (_) => de_ConfigTypeData(__expectUnion(_), context), + configId: __expectString, + configType: __expectString, + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1898,10 +1835,9 @@ const de_GetConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1921,24 +1857,15 @@ export const de_GetDataflowEndpointGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contactPostPassDurationSeconds != null) { - contents.contactPostPassDurationSeconds = __expectInt32(data.contactPostPassDurationSeconds); - } - if (data.contactPrePassDurationSeconds != null) { - contents.contactPrePassDurationSeconds = __expectInt32(data.contactPrePassDurationSeconds); - } - if (data.dataflowEndpointGroupArn != null) { - contents.dataflowEndpointGroupArn = __expectString(data.dataflowEndpointGroupArn); - } - if (data.dataflowEndpointGroupId != null) { - contents.dataflowEndpointGroupId = __expectString(data.dataflowEndpointGroupId); - } - if (data.endpointsDetails != null) { - contents.endpointsDetails = de_EndpointDetailsList(data.endpointsDetails, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + contactPostPassDurationSeconds: __expectInt32, + contactPrePassDurationSeconds: __expectInt32, + dataflowEndpointGroupArn: __expectString, + dataflowEndpointGroupId: __expectString, + endpointsDetails: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1966,10 +1893,9 @@ const de_GetDataflowEndpointGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1989,21 +1915,14 @@ export const de_GetMinuteUsageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.estimatedMinutesRemaining != null) { - contents.estimatedMinutesRemaining = __expectInt32(data.estimatedMinutesRemaining); - } - if (data.isReservedMinutesCustomer != null) { - contents.isReservedMinutesCustomer = __expectBoolean(data.isReservedMinutesCustomer); - } - if (data.totalReservedMinuteAllocation != null) { - contents.totalReservedMinuteAllocation = __expectInt32(data.totalReservedMinuteAllocation); - } - if (data.totalScheduledMinutes != null) { - contents.totalScheduledMinutes = __expectInt32(data.totalScheduledMinutes); - } - if (data.upcomingMinutesScheduled != null) { - contents.upcomingMinutesScheduled = __expectInt32(data.upcomingMinutesScheduled); - } + const doc = take(data, { + estimatedMinutesRemaining: __expectInt32, + isReservedMinutesCustomer: __expectBoolean, + totalReservedMinuteAllocation: __expectInt32, + totalScheduledMinutes: __expectInt32, + upcomingMinutesScheduled: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2031,10 +1950,9 @@ const de_GetMinuteUsageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2054,42 +1972,21 @@ export const de_GetMissionProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contactPostPassDurationSeconds != null) { - contents.contactPostPassDurationSeconds = __expectInt32(data.contactPostPassDurationSeconds); - } - if (data.contactPrePassDurationSeconds != null) { - contents.contactPrePassDurationSeconds = __expectInt32(data.contactPrePassDurationSeconds); - } - if (data.dataflowEdges != null) { - contents.dataflowEdges = de_DataflowEdgeList(data.dataflowEdges, context); - } - if (data.minimumViableContactDurationSeconds != null) { - contents.minimumViableContactDurationSeconds = __expectInt32(data.minimumViableContactDurationSeconds); - } - if (data.missionProfileArn != null) { - contents.missionProfileArn = __expectString(data.missionProfileArn); - } - if (data.missionProfileId != null) { - contents.missionProfileId = __expectString(data.missionProfileId); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.region != null) { - contents.region = __expectString(data.region); - } - if (data.streamsKmsKey != null) { - contents.streamsKmsKey = de_KmsKey(__expectUnion(data.streamsKmsKey), context); - } - if (data.streamsKmsRole != null) { - contents.streamsKmsRole = __expectString(data.streamsKmsRole); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.trackingConfigArn != null) { - contents.trackingConfigArn = __expectString(data.trackingConfigArn); - } + const doc = take(data, { + contactPostPassDurationSeconds: __expectInt32, + contactPrePassDurationSeconds: __expectInt32, + dataflowEdges: _json, + minimumViableContactDurationSeconds: __expectInt32, + missionProfileArn: __expectString, + missionProfileId: __expectString, + name: __expectString, + region: __expectString, + streamsKmsKey: (_) => _json(__expectUnion(_)), + streamsKmsRole: __expectString, + tags: _json, + trackingConfigArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2117,10 +2014,9 @@ const de_GetMissionProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2140,21 +2036,14 @@ export const de_GetSatelliteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.currentEphemeris != null) { - contents.currentEphemeris = de_EphemerisMetaData(data.currentEphemeris, context); - } - if (data.groundStations != null) { - contents.groundStations = de_GroundStationIdList(data.groundStations, context); - } - if (data.noradSatelliteID != null) { - contents.noradSatelliteID = __expectInt32(data.noradSatelliteID); - } - if (data.satelliteArn != null) { - contents.satelliteArn = __expectString(data.satelliteArn); - } - if (data.satelliteId != null) { - contents.satelliteId = __expectString(data.satelliteId); - } + const doc = take(data, { + currentEphemeris: (_) => de_EphemerisMetaData(_, context), + groundStations: _json, + noradSatelliteID: __expectInt32, + satelliteArn: __expectString, + satelliteId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2182,10 +2071,9 @@ const de_GetSatelliteCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2205,12 +2093,11 @@ export const de_ListConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configList != null) { - contents.configList = de_ConfigList(data.configList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + configList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2238,10 +2125,9 @@ const de_ListConfigsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,12 +2147,11 @@ export const de_ListContactsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contactList != null) { - contents.contactList = de_ContactList(data.contactList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + contactList: (_) => de_ContactList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2294,10 +2179,9 @@ const de_ListContactsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2317,12 +2201,11 @@ export const de_ListDataflowEndpointGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataflowEndpointGroupList != null) { - contents.dataflowEndpointGroupList = de_DataflowEndpointGroupList(data.dataflowEndpointGroupList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dataflowEndpointGroupList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2350,10 +2233,9 @@ const de_ListDataflowEndpointGroupsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2373,12 +2255,11 @@ export const de_ListEphemeridesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ephemerides != null) { - contents.ephemerides = de_EphemeridesList(data.ephemerides, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + ephemerides: (_) => de_EphemeridesList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2406,10 +2287,9 @@ const de_ListEphemeridesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2429,12 +2309,11 @@ export const de_ListGroundStationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.groundStationList != null) { - contents.groundStationList = de_GroundStationList(data.groundStationList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + groundStationList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2462,10 +2341,9 @@ const de_ListGroundStationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2485,12 +2363,11 @@ export const de_ListMissionProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.missionProfileList != null) { - contents.missionProfileList = de_MissionProfileList(data.missionProfileList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + missionProfileList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2518,10 +2395,9 @@ const de_ListMissionProfilesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2541,12 +2417,11 @@ export const de_ListSatellitesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.satellites != null) { - contents.satellites = de_SatelliteList(data.satellites, context); - } + const doc = take(data, { + nextToken: __expectString, + satellites: (_) => de_SatelliteList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2574,10 +2449,9 @@ const de_ListSatellitesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2597,9 +2471,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2627,10 +2502,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2650,9 +2524,10 @@ export const de_RegisterAgentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.agentId != null) { - contents.agentId = __expectString(data.agentId); - } + const doc = take(data, { + agentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2680,10 +2555,9 @@ const de_RegisterAgentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2703,9 +2577,10 @@ export const de_ReserveContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contactId != null) { - contents.contactId = __expectString(data.contactId); - } + const doc = take(data, { + contactId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2733,10 +2608,9 @@ const de_ReserveContactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2783,10 +2657,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2833,10 +2706,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2856,9 +2728,10 @@ export const de_UpdateAgentStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.agentId != null) { - contents.agentId = __expectString(data.agentId); - } + const doc = take(data, { + agentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2886,10 +2759,9 @@ const de_UpdateAgentStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2909,15 +2781,12 @@ export const de_UpdateConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configArn != null) { - contents.configArn = __expectString(data.configArn); - } - if (data.configId != null) { - contents.configId = __expectString(data.configId); - } - if (data.configType != null) { - contents.configType = __expectString(data.configType); - } + const doc = take(data, { + configArn: __expectString, + configId: __expectString, + configType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2945,10 +2814,9 @@ const de_UpdateConfigCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2968,9 +2836,10 @@ export const de_UpdateEphemerisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ephemerisId != null) { - contents.ephemerisId = __expectString(data.ephemerisId); - } + const doc = take(data, { + ephemerisId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2998,10 +2867,9 @@ const de_UpdateEphemerisCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3021,9 +2889,10 @@ export const de_UpdateMissionProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.missionProfileId != null) { - contents.missionProfileId = __expectString(data.missionProfileId); - } + const doc = take(data, { + missionProfileId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3051,28 +2920,26 @@ const de_UpdateMissionProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1DependencyExceptionRes */ const de_DependencyExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.parameterName != null) { - contents.parameterName = __expectString(data.parameterName); - } + const doc = take(data, { + message: __expectString, + parameterName: __expectString, + }); + Object.assign(contents, doc); const exception = new DependencyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3089,12 +2956,11 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.parameterName != null) { - contents.parameterName = __expectString(data.parameterName); - } + const doc = take(data, { + message: __expectString, + parameterName: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3111,12 +2977,11 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.parameterName != null) { - contents.parameterName = __expectString(data.parameterName); - } + const doc = take(data, { + message: __expectString, + parameterName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3133,9 +2998,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3143,157 +3009,56 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AgentCpuCoresList - */ -const se_AgentCpuCoresList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentCpuCoresList omitted. -/** - * serializeAws_restJson1AgentDetails - */ -const se_AgentDetails = (input: AgentDetails, context: __SerdeContext): any => { - return { - ...(input.agentCpuCores != null && { agentCpuCores: se_AgentCpuCoresList(input.agentCpuCores, context) }), - ...(input.agentVersion != null && { agentVersion: input.agentVersion }), - ...(input.componentVersions != null && { - componentVersions: se_ComponentVersionList(input.componentVersions, context), - }), - ...(input.instanceId != null && { instanceId: input.instanceId }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.reservedCpuCores != null && { reservedCpuCores: se_AgentCpuCoresList(input.reservedCpuCores, context) }), - }; -}; +// se_AgentDetails omitted. -/** - * serializeAws_restJson1AggregateStatus - */ -const se_AggregateStatus = (input: AggregateStatus, context: __SerdeContext): any => { - return { - ...(input.signatureMap != null && { signatureMap: se_SignatureMap(input.signatureMap, context) }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_AggregateStatus omitted. /** * serializeAws_restJson1AntennaDownlinkConfig */ const se_AntennaDownlinkConfig = (input: AntennaDownlinkConfig, context: __SerdeContext): any => { - return { - ...(input.spectrumConfig != null && { spectrumConfig: se_SpectrumConfig(input.spectrumConfig, context) }), - }; + return take(input, { + spectrumConfig: (_) => se_SpectrumConfig(_, context), + }); }; /** * serializeAws_restJson1AntennaDownlinkDemodDecodeConfig */ const se_AntennaDownlinkDemodDecodeConfig = (input: AntennaDownlinkDemodDecodeConfig, context: __SerdeContext): any => { - return { - ...(input.decodeConfig != null && { decodeConfig: se_DecodeConfig(input.decodeConfig, context) }), - ...(input.demodulationConfig != null && { - demodulationConfig: se_DemodulationConfig(input.demodulationConfig, context), - }), - ...(input.spectrumConfig != null && { spectrumConfig: se_SpectrumConfig(input.spectrumConfig, context) }), - }; + return take(input, { + decodeConfig: _json, + demodulationConfig: _json, + spectrumConfig: (_) => se_SpectrumConfig(_, context), + }); }; /** * serializeAws_restJson1AntennaUplinkConfig */ const se_AntennaUplinkConfig = (input: AntennaUplinkConfig, context: __SerdeContext): any => { - return { - ...(input.spectrumConfig != null && { spectrumConfig: se_UplinkSpectrumConfig(input.spectrumConfig, context) }), - ...(input.targetEirp != null && { targetEirp: se_Eirp(input.targetEirp, context) }), - ...(input.transmitDisabled != null && { transmitDisabled: input.transmitDisabled }), - }; + return take(input, { + spectrumConfig: (_) => se_UplinkSpectrumConfig(_, context), + targetEirp: (_) => se_Eirp(_, context), + transmitDisabled: [], + }); }; -/** - * serializeAws_restJson1AwsGroundStationAgentEndpoint - */ -const se_AwsGroundStationAgentEndpoint = (input: AwsGroundStationAgentEndpoint, context: __SerdeContext): any => { - return { - ...(input.agentStatus != null && { agentStatus: input.agentStatus }), - ...(input.auditResults != null && { auditResults: input.auditResults }), - ...(input.egressAddress != null && { egressAddress: se_ConnectionDetails(input.egressAddress, context) }), - ...(input.ingressAddress != null && { ingressAddress: se_RangedConnectionDetails(input.ingressAddress, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_AwsGroundStationAgentEndpoint omitted. -/** - * serializeAws_restJson1CapabilityArnList - */ -const se_CapabilityArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CapabilityArnList omitted. -/** - * serializeAws_restJson1CapabilityHealthReasonList - */ -const se_CapabilityHealthReasonList = (input: (CapabilityHealthReason | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CapabilityHealthReasonList omitted. -/** - * serializeAws_restJson1ComponentStatusData - */ -const se_ComponentStatusData = (input: ComponentStatusData, context: __SerdeContext): any => { - return { - ...(input.bytesReceived != null && { bytesReceived: input.bytesReceived }), - ...(input.bytesSent != null && { bytesSent: input.bytesSent }), - ...(input.capabilityArn != null && { capabilityArn: input.capabilityArn }), - ...(input.componentType != null && { componentType: input.componentType }), - ...(input.dataflowId != null && { dataflowId: input.dataflowId }), - ...(input.packetsDropped != null && { packetsDropped: input.packetsDropped }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_ComponentStatusData omitted. -/** - * serializeAws_restJson1ComponentStatusList - */ -const se_ComponentStatusList = (input: ComponentStatusData[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentStatusData(entry, context); - }); -}; +// se_ComponentStatusList omitted. -/** - * serializeAws_restJson1ComponentVersion - */ -const se_ComponentVersion = (input: ComponentVersion, context: __SerdeContext): any => { - return { - ...(input.componentType != null && { componentType: input.componentType }), - ...(input.versions != null && { versions: se_VersionStringList(input.versions, context) }), - }; -}; +// se_ComponentVersion omitted. -/** - * serializeAws_restJson1ComponentVersionList - */ -const se_ComponentVersionList = (input: ComponentVersion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentVersion(entry, context); - }); -}; +// se_ComponentVersionList omitted. /** * serializeAws_restJson1ConfigTypeData @@ -3305,373 +3070,137 @@ const se_ConfigTypeData = (input: ConfigTypeData, context: __SerdeContext): any antennaDownlinkDemodDecodeConfig: se_AntennaDownlinkDemodDecodeConfig(value, context), }), antennaUplinkConfig: (value) => ({ antennaUplinkConfig: se_AntennaUplinkConfig(value, context) }), - dataflowEndpointConfig: (value) => ({ dataflowEndpointConfig: se_DataflowEndpointConfig(value, context) }), - s3RecordingConfig: (value) => ({ s3RecordingConfig: se_S3RecordingConfig(value, context) }), - trackingConfig: (value) => ({ trackingConfig: se_TrackingConfig(value, context) }), - uplinkEchoConfig: (value) => ({ uplinkEchoConfig: se_UplinkEchoConfig(value, context) }), + dataflowEndpointConfig: (value) => ({ dataflowEndpointConfig: _json(value) }), + s3RecordingConfig: (value) => ({ s3RecordingConfig: _json(value) }), + trackingConfig: (value) => ({ trackingConfig: _json(value) }), + uplinkEchoConfig: (value) => ({ uplinkEchoConfig: _json(value) }), _: (name, value) => ({ name: value } as any), }); }; +// se_ConnectionDetails omitted. + +// se_DataflowEdge omitted. + +// se_DataflowEdgeList omitted. + +// se_DataflowEndpoint omitted. + +// se_DataflowEndpointConfig omitted. + +// se_DecodeConfig omitted. + +// se_DemodulationConfig omitted. + +// se_DiscoveryData omitted. + /** - * serializeAws_restJson1ConnectionDetails + * serializeAws_restJson1Eirp */ -const se_ConnectionDetails = (input: ConnectionDetails, context: __SerdeContext): any => { - return { - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.socketAddress != null && { socketAddress: se_SocketAddress(input.socketAddress, context) }), - }; +const se_Eirp = (input: Eirp, context: __SerdeContext): any => { + return take(input, { + units: [], + value: __serializeFloat, + }); }; +// se_EndpointDetails omitted. + +// se_EndpointDetailsList omitted. + /** - * serializeAws_restJson1DataflowEdge + * serializeAws_restJson1EphemerisData */ -const se_DataflowEdge = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1DataflowEdgeList - */ -const se_DataflowEdgeList = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataflowEdge(entry, context); - }); -}; - -/** - * serializeAws_restJson1DataflowEndpoint - */ -const se_DataflowEndpoint = (input: DataflowEndpoint, context: __SerdeContext): any => { - return { - ...(input.address != null && { address: se_SocketAddress(input.address, context) }), - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.name != null && { name: input.name }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_restJson1DataflowEndpointConfig - */ -const se_DataflowEndpointConfig = (input: DataflowEndpointConfig, context: __SerdeContext): any => { - return { - ...(input.dataflowEndpointName != null && { dataflowEndpointName: input.dataflowEndpointName }), - ...(input.dataflowEndpointRegion != null && { dataflowEndpointRegion: input.dataflowEndpointRegion }), - }; -}; - -/** - * serializeAws_restJson1DecodeConfig - */ -const se_DecodeConfig = (input: DecodeConfig, context: __SerdeContext): any => { - return { - ...(input.unvalidatedJSON != null && { unvalidatedJSON: input.unvalidatedJSON }), - }; -}; - -/** - * serializeAws_restJson1DemodulationConfig - */ -const se_DemodulationConfig = (input: DemodulationConfig, context: __SerdeContext): any => { - return { - ...(input.unvalidatedJSON != null && { unvalidatedJSON: input.unvalidatedJSON }), - }; -}; - -/** - * serializeAws_restJson1DiscoveryData - */ -const se_DiscoveryData = (input: DiscoveryData, context: __SerdeContext): any => { - return { - ...(input.capabilityArns != null && { capabilityArns: se_CapabilityArnList(input.capabilityArns, context) }), - ...(input.privateIpAddresses != null && { - privateIpAddresses: se_IpAddressList(input.privateIpAddresses, context), - }), - ...(input.publicIpAddresses != null && { publicIpAddresses: se_IpAddressList(input.publicIpAddresses, context) }), - }; -}; - -/** - * serializeAws_restJson1Eirp - */ -const se_Eirp = (input: Eirp, context: __SerdeContext): any => { - return { - ...(input.units != null && { units: input.units }), - ...(input.value != null && { value: __serializeFloat(input.value) }), - }; -}; - -/** - * serializeAws_restJson1EndpointDetails - */ -const se_EndpointDetails = (input: EndpointDetails, context: __SerdeContext): any => { - return { - ...(input.awsGroundStationAgentEndpoint != null && { - awsGroundStationAgentEndpoint: se_AwsGroundStationAgentEndpoint(input.awsGroundStationAgentEndpoint, context), - }), - ...(input.endpoint != null && { endpoint: se_DataflowEndpoint(input.endpoint, context) }), - ...(input.healthReasons != null && { healthReasons: se_CapabilityHealthReasonList(input.healthReasons, context) }), - ...(input.healthStatus != null && { healthStatus: input.healthStatus }), - ...(input.securityDetails != null && { securityDetails: se_SecurityDetails(input.securityDetails, context) }), - }; -}; - -/** - * serializeAws_restJson1EndpointDetailsList - */ -const se_EndpointDetailsList = (input: EndpointDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EndpointDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1EphemerisData - */ -const se_EphemerisData = (input: EphemerisData, context: __SerdeContext): any => { - return EphemerisData.visit(input, { - oem: (value) => ({ oem: se_OEMEphemeris(value, context) }), - tle: (value) => ({ tle: se_TLEEphemeris(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1EphemerisStatusList - */ -const se_EphemerisStatusList = (input: (EphemerisStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_EphemerisData = (input: EphemerisData, context: __SerdeContext): any => { + return EphemerisData.visit(input, { + oem: (value) => ({ oem: _json(value) }), + tle: (value) => ({ tle: se_TLEEphemeris(value, context) }), + _: (name, value) => ({ name: value } as any), + }); }; +// se_EphemerisStatusList omitted. + /** * serializeAws_restJson1Frequency */ const se_Frequency = (input: Frequency, context: __SerdeContext): any => { - return { - ...(input.units != null && { units: input.units }), - ...(input.value != null && { value: __serializeFloat(input.value) }), - }; + return take(input, { + units: [], + value: __serializeFloat, + }); }; /** * serializeAws_restJson1FrequencyBandwidth */ const se_FrequencyBandwidth = (input: FrequencyBandwidth, context: __SerdeContext): any => { - return { - ...(input.units != null && { units: input.units }), - ...(input.value != null && { value: __serializeFloat(input.value) }), - }; + return take(input, { + units: [], + value: __serializeFloat, + }); }; -/** - * serializeAws_restJson1IntegerRange - */ -const se_IntegerRange = (input: IntegerRange, context: __SerdeContext): any => { - return { - ...(input.maximum != null && { maximum: input.maximum }), - ...(input.minimum != null && { minimum: input.minimum }), - }; -}; +// se_IntegerRange omitted. -/** - * serializeAws_restJson1IpAddressList - */ -const se_IpAddressList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IpAddressList omitted. -/** - * serializeAws_restJson1KmsKey - */ -const se_KmsKey = (input: KmsKey, context: __SerdeContext): any => { - return KmsKey.visit(input, { - kmsAliasArn: (value) => ({ kmsAliasArn: value }), - kmsKeyArn: (value) => ({ kmsKeyArn: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_KmsKey omitted. -/** - * serializeAws_restJson1OEMEphemeris - */ -const se_OEMEphemeris = (input: OEMEphemeris, context: __SerdeContext): any => { - return { - ...(input.oemData != null && { oemData: input.oemData }), - ...(input.s3Object != null && { s3Object: se_S3Object(input.s3Object, context) }), - }; -}; +// se_OEMEphemeris omitted. -/** - * serializeAws_restJson1RangedConnectionDetails - */ -const se_RangedConnectionDetails = (input: RangedConnectionDetails, context: __SerdeContext): any => { - return { - ...(input.mtu != null && { mtu: input.mtu }), - ...(input.socketAddress != null && { socketAddress: se_RangedSocketAddress(input.socketAddress, context) }), - }; -}; +// se_RangedConnectionDetails omitted. -/** - * serializeAws_restJson1RangedSocketAddress - */ -const se_RangedSocketAddress = (input: RangedSocketAddress, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.portRange != null && { portRange: se_IntegerRange(input.portRange, context) }), - }; -}; +// se_RangedSocketAddress omitted. -/** - * serializeAws_restJson1S3Object - */ -const se_S3Object = (input: S3Object, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_S3Object omitted. -/** - * serializeAws_restJson1S3RecordingConfig - */ -const se_S3RecordingConfig = (input: S3RecordingConfig, context: __SerdeContext): any => { - return { - ...(input.bucketArn != null && { bucketArn: input.bucketArn }), - ...(input.prefix != null && { prefix: input.prefix }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_S3RecordingConfig omitted. -/** - * serializeAws_restJson1SecurityDetails - */ -const se_SecurityDetails = (input: SecurityDetails, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.securityGroupIds != null && { - securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context), - }), - ...(input.subnetIds != null && { subnetIds: se_SubnetList(input.subnetIds, context) }), - }; -}; +// se_SecurityDetails omitted. -/** - * serializeAws_restJson1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIdList omitted. -/** - * serializeAws_restJson1SignatureMap - */ -const se_SignatureMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SignatureMap omitted. -/** - * serializeAws_restJson1SocketAddress - */ -const se_SocketAddress = (input: SocketAddress, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.port != null && { port: input.port }), - }; -}; +// se_SocketAddress omitted. /** * serializeAws_restJson1SpectrumConfig */ const se_SpectrumConfig = (input: SpectrumConfig, context: __SerdeContext): any => { - return { - ...(input.bandwidth != null && { bandwidth: se_FrequencyBandwidth(input.bandwidth, context) }), - ...(input.centerFrequency != null && { centerFrequency: se_Frequency(input.centerFrequency, context) }), - ...(input.polarization != null && { polarization: input.polarization }), - }; + return take(input, { + bandwidth: (_) => se_FrequencyBandwidth(_, context), + centerFrequency: (_) => se_Frequency(_, context), + polarization: [], + }); }; -/** - * serializeAws_restJson1StatusList - */ -const se_StatusList = (input: (ContactStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StatusList omitted. -/** - * serializeAws_restJson1SubnetList - */ -const se_SubnetList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetList omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. /** * serializeAws_restJson1TimeRange */ const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_restJson1TLEData */ const se_TLEData = (input: TLEData, context: __SerdeContext): any => { - return { - ...(input.tleLine1 != null && { tleLine1: input.tleLine1 }), - ...(input.tleLine2 != null && { tleLine2: input.tleLine2 }), - ...(input.validTimeRange != null && { validTimeRange: se_TimeRange(input.validTimeRange, context) }), - }; + return take(input, { + tleLine1: [], + tleLine2: [], + validTimeRange: (_) => se_TimeRange(_, context), + }); }; /** @@ -3689,68 +3218,37 @@ const se_TLEDataList = (input: TLEData[], context: __SerdeContext): any => { * serializeAws_restJson1TLEEphemeris */ const se_TLEEphemeris = (input: TLEEphemeris, context: __SerdeContext): any => { - return { - ...(input.s3Object != null && { s3Object: se_S3Object(input.s3Object, context) }), - ...(input.tleData != null && { tleData: se_TLEDataList(input.tleData, context) }), - }; + return take(input, { + s3Object: _json, + tleData: (_) => se_TLEDataList(_, context), + }); }; -/** - * serializeAws_restJson1TrackingConfig - */ -const se_TrackingConfig = (input: TrackingConfig, context: __SerdeContext): any => { - return { - ...(input.autotrack != null && { autotrack: input.autotrack }), - }; -}; +// se_TrackingConfig omitted. -/** - * serializeAws_restJson1UplinkEchoConfig - */ -const se_UplinkEchoConfig = (input: UplinkEchoConfig, context: __SerdeContext): any => { - return { - ...(input.antennaUplinkConfigArn != null && { antennaUplinkConfigArn: input.antennaUplinkConfigArn }), - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; +// se_UplinkEchoConfig omitted. /** * serializeAws_restJson1UplinkSpectrumConfig */ const se_UplinkSpectrumConfig = (input: UplinkSpectrumConfig, context: __SerdeContext): any => { - return { - ...(input.centerFrequency != null && { centerFrequency: se_Frequency(input.centerFrequency, context) }), - ...(input.polarization != null && { polarization: input.polarization }), - }; + return take(input, { + centerFrequency: (_) => se_Frequency(_, context), + polarization: [], + }); }; -/** - * serializeAws_restJson1VersionStringList - */ -const se_VersionStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VersionStringList omitted. -/** - * deserializeAws_restJson1AntennaDemodDecodeDetails - */ -const de_AntennaDemodDecodeDetails = (output: any, context: __SerdeContext): AntennaDemodDecodeDetails => { - return { - outputNode: __expectString(output.outputNode), - } as any; -}; +// de_AntennaDemodDecodeDetails omitted. /** * deserializeAws_restJson1AntennaDownlinkConfig */ const de_AntennaDownlinkConfig = (output: any, context: __SerdeContext): AntennaDownlinkConfig => { - return { - spectrumConfig: output.spectrumConfig != null ? de_SpectrumConfig(output.spectrumConfig, context) : undefined, - } as any; + return take(output, { + spectrumConfig: (_: any) => de_SpectrumConfig(_, context), + }) as any; }; /** @@ -3760,102 +3258,33 @@ const de_AntennaDownlinkDemodDecodeConfig = ( output: any, context: __SerdeContext ): AntennaDownlinkDemodDecodeConfig => { - return { - decodeConfig: output.decodeConfig != null ? de_DecodeConfig(output.decodeConfig, context) : undefined, - demodulationConfig: - output.demodulationConfig != null ? de_DemodulationConfig(output.demodulationConfig, context) : undefined, - spectrumConfig: output.spectrumConfig != null ? de_SpectrumConfig(output.spectrumConfig, context) : undefined, - } as any; + return take(output, { + decodeConfig: _json, + demodulationConfig: _json, + spectrumConfig: (_: any) => de_SpectrumConfig(_, context), + }) as any; }; /** * deserializeAws_restJson1AntennaUplinkConfig */ const de_AntennaUplinkConfig = (output: any, context: __SerdeContext): AntennaUplinkConfig => { - return { - spectrumConfig: output.spectrumConfig != null ? de_UplinkSpectrumConfig(output.spectrumConfig, context) : undefined, - targetEirp: output.targetEirp != null ? de_Eirp(output.targetEirp, context) : undefined, - transmitDisabled: __expectBoolean(output.transmitDisabled), - } as any; + return take(output, { + spectrumConfig: (_: any) => de_UplinkSpectrumConfig(_, context), + targetEirp: (_: any) => de_Eirp(_, context), + transmitDisabled: __expectBoolean, + }) as any; }; -/** - * deserializeAws_restJson1AwsGroundStationAgentEndpoint - */ -const de_AwsGroundStationAgentEndpoint = (output: any, context: __SerdeContext): AwsGroundStationAgentEndpoint => { - return { - agentStatus: __expectString(output.agentStatus), - auditResults: __expectString(output.auditResults), - egressAddress: output.egressAddress != null ? de_ConnectionDetails(output.egressAddress, context) : undefined, - ingressAddress: - output.ingressAddress != null ? de_RangedConnectionDetails(output.ingressAddress, context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_AwsGroundStationAgentEndpoint omitted. -/** - * deserializeAws_restJson1CapabilityHealthReasonList - */ -const de_CapabilityHealthReasonList = (output: any, context: __SerdeContext): (CapabilityHealthReason | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CapabilityHealthReasonList omitted. -/** - * deserializeAws_restJson1ConfigDetails - */ -const de_ConfigDetails = (output: any, context: __SerdeContext): ConfigDetails => { - if (output.antennaDemodDecodeDetails != null) { - return { - antennaDemodDecodeDetails: de_AntennaDemodDecodeDetails(output.antennaDemodDecodeDetails, context), - }; - } - if (output.endpointDetails != null) { - return { - endpointDetails: de_EndpointDetails(output.endpointDetails, context), - }; - } - if (output.s3RecordingDetails != null) { - return { - s3RecordingDetails: de_S3RecordingDetails(output.s3RecordingDetails, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ConfigDetails omitted. -/** - * deserializeAws_restJson1ConfigList - */ -const de_ConfigList = (output: any, context: __SerdeContext): ConfigListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigListItem(entry, context); - }); - return retVal; -}; +// de_ConfigList omitted. -/** - * deserializeAws_restJson1ConfigListItem - */ -const de_ConfigListItem = (output: any, context: __SerdeContext): ConfigListItem => { - return { - configArn: __expectString(output.configArn), - configId: __expectString(output.configId), - configType: __expectString(output.configType), - name: __expectString(output.name), - } as any; -}; +// de_ConfigListItem omitted. /** * deserializeAws_restJson1ConfigTypeData @@ -3881,64 +3310,48 @@ const de_ConfigTypeData = (output: any, context: __SerdeContext): ConfigTypeData } if (output.dataflowEndpointConfig != null) { return { - dataflowEndpointConfig: de_DataflowEndpointConfig(output.dataflowEndpointConfig, context), + dataflowEndpointConfig: _json(output.dataflowEndpointConfig), }; } if (output.s3RecordingConfig != null) { return { - s3RecordingConfig: de_S3RecordingConfig(output.s3RecordingConfig, context), + s3RecordingConfig: _json(output.s3RecordingConfig), }; } if (output.trackingConfig != null) { return { - trackingConfig: de_TrackingConfig(output.trackingConfig, context), + trackingConfig: _json(output.trackingConfig), }; } if (output.uplinkEchoConfig != null) { return { - uplinkEchoConfig: de_UplinkEchoConfig(output.uplinkEchoConfig, context), + uplinkEchoConfig: _json(output.uplinkEchoConfig), }; } return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1ConnectionDetails - */ -const de_ConnectionDetails = (output: any, context: __SerdeContext): ConnectionDetails => { - return { - mtu: __expectInt32(output.mtu), - socketAddress: output.socketAddress != null ? de_SocketAddress(output.socketAddress, context) : undefined, - } as any; -}; +// de_ConnectionDetails omitted. /** * deserializeAws_restJson1ContactData */ const de_ContactData = (output: any, context: __SerdeContext): ContactData => { - return { - contactId: __expectString(output.contactId), - contactStatus: __expectString(output.contactStatus), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - errorMessage: __expectString(output.errorMessage), - groundStation: __expectString(output.groundStation), - maximumElevation: output.maximumElevation != null ? de_Elevation(output.maximumElevation, context) : undefined, - missionProfileArn: __expectString(output.missionProfileArn), - postPassEndTime: - output.postPassEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.postPassEndTime))) - : undefined, - prePassStartTime: - output.prePassStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.prePassStartTime))) - : undefined, - region: __expectString(output.region), - satelliteArn: __expectString(output.satelliteArn), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - } as any; + return take(output, { + contactId: __expectString, + contactStatus: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errorMessage: __expectString, + groundStation: __expectString, + maximumElevation: (_: any) => de_Elevation(_, context), + missionProfileArn: __expectString, + postPassEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + prePassStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + region: __expectString, + satelliteArn: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + }) as any; }; /** @@ -3948,199 +3361,56 @@ const de_ContactList = (output: any, context: __SerdeContext): ContactData[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContactData(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DataflowDetail - */ -const de_DataflowDetail = (output: any, context: __SerdeContext): DataflowDetail => { - return { - destination: output.destination != null ? de_Destination(output.destination, context) : undefined, - errorMessage: __expectString(output.errorMessage), - source: output.source != null ? de_Source(output.source, context) : undefined, - } as any; -}; +// de_DataflowDetail omitted. -/** - * deserializeAws_restJson1DataflowEdge - */ -const de_DataflowEdge = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DataflowEdge omitted. -/** - * deserializeAws_restJson1DataflowEdgeList - */ -const de_DataflowEdgeList = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataflowEdge(entry, context); - }); - return retVal; -}; +// de_DataflowEdgeList omitted. -/** - * deserializeAws_restJson1DataflowEndpoint - */ -const de_DataflowEndpoint = (output: any, context: __SerdeContext): DataflowEndpoint => { - return { - address: output.address != null ? de_SocketAddress(output.address, context) : undefined, - mtu: __expectInt32(output.mtu), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_DataflowEndpoint omitted. -/** - * deserializeAws_restJson1DataflowEndpointConfig - */ -const de_DataflowEndpointConfig = (output: any, context: __SerdeContext): DataflowEndpointConfig => { - return { - dataflowEndpointName: __expectString(output.dataflowEndpointName), - dataflowEndpointRegion: __expectString(output.dataflowEndpointRegion), - } as any; -}; +// de_DataflowEndpointConfig omitted. -/** - * deserializeAws_restJson1DataflowEndpointGroupList - */ -const de_DataflowEndpointGroupList = (output: any, context: __SerdeContext): DataflowEndpointListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataflowEndpointListItem(entry, context); - }); - return retVal; -}; +// de_DataflowEndpointGroupList omitted. -/** - * deserializeAws_restJson1DataflowEndpointListItem - */ -const de_DataflowEndpointListItem = (output: any, context: __SerdeContext): DataflowEndpointListItem => { - return { - dataflowEndpointGroupArn: __expectString(output.dataflowEndpointGroupArn), - dataflowEndpointGroupId: __expectString(output.dataflowEndpointGroupId), - } as any; -}; +// de_DataflowEndpointListItem omitted. -/** - * deserializeAws_restJson1DataflowList - */ -const de_DataflowList = (output: any, context: __SerdeContext): DataflowDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataflowDetail(entry, context); - }); - return retVal; -}; +// de_DataflowList omitted. -/** - * deserializeAws_restJson1DecodeConfig - */ -const de_DecodeConfig = (output: any, context: __SerdeContext): DecodeConfig => { - return { - unvalidatedJSON: __expectString(output.unvalidatedJSON), - } as any; -}; +// de_DecodeConfig omitted. -/** - * deserializeAws_restJson1DemodulationConfig - */ -const de_DemodulationConfig = (output: any, context: __SerdeContext): DemodulationConfig => { - return { - unvalidatedJSON: __expectString(output.unvalidatedJSON), - } as any; -}; +// de_DemodulationConfig omitted. -/** - * deserializeAws_restJson1Destination - */ -const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - configDetails: - output.configDetails != null ? de_ConfigDetails(__expectUnion(output.configDetails), context) : undefined, - configId: __expectString(output.configId), - configType: __expectString(output.configType), - dataflowDestinationRegion: __expectString(output.dataflowDestinationRegion), - } as any; -}; +// de_Destination omitted. /** * deserializeAws_restJson1Eirp */ const de_Eirp = (output: any, context: __SerdeContext): Eirp => { - return { - units: __expectString(output.units), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + units: __expectString, + value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1Elevation */ const de_Elevation = (output: any, context: __SerdeContext): Elevation => { - return { - unit: __expectString(output.unit), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + unit: __expectString, + value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1EndpointDetails - */ -const de_EndpointDetails = (output: any, context: __SerdeContext): EndpointDetails => { - return { - awsGroundStationAgentEndpoint: - output.awsGroundStationAgentEndpoint != null - ? de_AwsGroundStationAgentEndpoint(output.awsGroundStationAgentEndpoint, context) - : undefined, - endpoint: output.endpoint != null ? de_DataflowEndpoint(output.endpoint, context) : undefined, - healthReasons: - output.healthReasons != null ? de_CapabilityHealthReasonList(output.healthReasons, context) : undefined, - healthStatus: __expectString(output.healthStatus), - securityDetails: output.securityDetails != null ? de_SecurityDetails(output.securityDetails, context) : undefined, - } as any; -}; +// de_EndpointDetails omitted. -/** - * deserializeAws_restJson1EndpointDetailsList - */ -const de_EndpointDetailsList = (output: any, context: __SerdeContext): EndpointDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointDetails(entry, context); - }); - return retVal; -}; +// de_EndpointDetailsList omitted. /** * deserializeAws_restJson1EphemeridesList @@ -4149,233 +3419,85 @@ const de_EphemeridesList = (output: any, context: __SerdeContext): EphemerisItem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EphemerisItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EphemerisDescription - */ -const de_EphemerisDescription = (output: any, context: __SerdeContext): EphemerisDescription => { - return { - ephemerisData: __expectString(output.ephemerisData), - sourceS3Object: output.sourceS3Object != null ? de_S3Object(output.sourceS3Object, context) : undefined, - } as any; -}; +// de_EphemerisDescription omitted. /** * deserializeAws_restJson1EphemerisItem */ const de_EphemerisItem = (output: any, context: __SerdeContext): EphemerisItem => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - enabled: __expectBoolean(output.enabled), - ephemerisId: __expectString(output.ephemerisId), - name: __expectString(output.name), - priority: __expectInt32(output.priority), - sourceS3Object: output.sourceS3Object != null ? de_S3Object(output.sourceS3Object, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + enabled: __expectBoolean, + ephemerisId: __expectString, + name: __expectString, + priority: __expectInt32, + sourceS3Object: _json, + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1EphemerisMetaData */ const de_EphemerisMetaData = (output: any, context: __SerdeContext): EphemerisMetaData => { - return { - ephemerisId: __expectString(output.ephemerisId), - epoch: output.epoch != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.epoch))) : undefined, - name: __expectString(output.name), - source: __expectString(output.source), - } as any; + return take(output, { + ephemerisId: __expectString, + epoch: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + source: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1EphemerisTypeDescription - */ -const de_EphemerisTypeDescription = (output: any, context: __SerdeContext): EphemerisTypeDescription => { - if (output.oem != null) { - return { - oem: de_EphemerisDescription(output.oem, context), - }; - } - if (output.tle != null) { - return { - tle: de_EphemerisDescription(output.tle, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_EphemerisTypeDescription omitted. /** * deserializeAws_restJson1Frequency */ const de_Frequency = (output: any, context: __SerdeContext): Frequency => { - return { - units: __expectString(output.units), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + units: __expectString, + value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1FrequencyBandwidth */ const de_FrequencyBandwidth = (output: any, context: __SerdeContext): FrequencyBandwidth => { - return { - units: __expectString(output.units), - value: __limitedParseDouble(output.value), - } as any; + return take(output, { + units: __expectString, + value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1GroundStationData - */ -const de_GroundStationData = (output: any, context: __SerdeContext): GroundStationData => { - return { - groundStationId: __expectString(output.groundStationId), - groundStationName: __expectString(output.groundStationName), - region: __expectString(output.region), - } as any; -}; +// de_GroundStationData omitted. -/** - * deserializeAws_restJson1GroundStationIdList - */ -const de_GroundStationIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GroundStationIdList omitted. -/** - * deserializeAws_restJson1GroundStationList - */ -const de_GroundStationList = (output: any, context: __SerdeContext): GroundStationData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroundStationData(entry, context); - }); - return retVal; -}; +// de_GroundStationList omitted. -/** - * deserializeAws_restJson1IntegerRange - */ -const de_IntegerRange = (output: any, context: __SerdeContext): IntegerRange => { - return { - maximum: __expectInt32(output.maximum), - minimum: __expectInt32(output.minimum), - } as any; -}; +// de_IntegerRange omitted. -/** - * deserializeAws_restJson1KmsKey - */ -const de_KmsKey = (output: any, context: __SerdeContext): KmsKey => { - if (__expectString(output.kmsAliasArn) !== undefined) { - return { kmsAliasArn: __expectString(output.kmsAliasArn) as any }; - } - if (__expectString(output.kmsKeyArn) !== undefined) { - return { kmsKeyArn: __expectString(output.kmsKeyArn) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_KmsKey omitted. -/** - * deserializeAws_restJson1MissionProfileList - */ -const de_MissionProfileList = (output: any, context: __SerdeContext): MissionProfileListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MissionProfileListItem(entry, context); - }); - return retVal; -}; +// de_MissionProfileList omitted. -/** - * deserializeAws_restJson1MissionProfileListItem - */ -const de_MissionProfileListItem = (output: any, context: __SerdeContext): MissionProfileListItem => { - return { - missionProfileArn: __expectString(output.missionProfileArn), - missionProfileId: __expectString(output.missionProfileId), - name: __expectString(output.name), - region: __expectString(output.region), - } as any; -}; +// de_MissionProfileListItem omitted. -/** - * deserializeAws_restJson1RangedConnectionDetails - */ -const de_RangedConnectionDetails = (output: any, context: __SerdeContext): RangedConnectionDetails => { - return { - mtu: __expectInt32(output.mtu), - socketAddress: output.socketAddress != null ? de_RangedSocketAddress(output.socketAddress, context) : undefined, - } as any; -}; +// de_RangedConnectionDetails omitted. -/** - * deserializeAws_restJson1RangedSocketAddress - */ -const de_RangedSocketAddress = (output: any, context: __SerdeContext): RangedSocketAddress => { - return { - name: __expectString(output.name), - portRange: output.portRange != null ? de_IntegerRange(output.portRange, context) : undefined, - } as any; -}; +// de_RangedSocketAddress omitted. -/** - * deserializeAws_restJson1S3Object - */ -const de_S3Object = (output: any, context: __SerdeContext): S3Object => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - version: __expectString(output.version), - } as any; -}; +// de_S3Object omitted. -/** - * deserializeAws_restJson1S3RecordingConfig - */ -const de_S3RecordingConfig = (output: any, context: __SerdeContext): S3RecordingConfig => { - return { - bucketArn: __expectString(output.bucketArn), - prefix: __expectString(output.prefix), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_S3RecordingConfig omitted. -/** - * deserializeAws_restJson1S3RecordingDetails - */ -const de_S3RecordingDetails = (output: any, context: __SerdeContext): S3RecordingDetails => { - return { - bucketArn: __expectString(output.bucketArn), - keyTemplate: __expectString(output.keyTemplate), - } as any; -}; +// de_S3RecordingDetails omitted. /** * deserializeAws_restJson1SatelliteList @@ -4384,9 +3506,6 @@ const de_SatelliteList = (output: any, context: __SerdeContext): SatelliteListIt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SatelliteListItem(entry, context); }); return retVal; @@ -4396,132 +3515,50 @@ const de_SatelliteList = (output: any, context: __SerdeContext): SatelliteListIt * deserializeAws_restJson1SatelliteListItem */ const de_SatelliteListItem = (output: any, context: __SerdeContext): SatelliteListItem => { - return { - currentEphemeris: - output.currentEphemeris != null ? de_EphemerisMetaData(output.currentEphemeris, context) : undefined, - groundStations: output.groundStations != null ? de_GroundStationIdList(output.groundStations, context) : undefined, - noradSatelliteID: __expectInt32(output.noradSatelliteID), - satelliteArn: __expectString(output.satelliteArn), - satelliteId: __expectString(output.satelliteId), - } as any; + return take(output, { + currentEphemeris: (_: any) => de_EphemerisMetaData(_, context), + groundStations: _json, + noradSatelliteID: __expectInt32, + satelliteArn: __expectString, + satelliteId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SecurityDetails - */ -const de_SecurityDetails = (output: any, context: __SerdeContext): SecurityDetails => { - return { - roleArn: __expectString(output.roleArn), - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetList(output.subnetIds, context) : undefined, - } as any; -}; +// de_SecurityDetails omitted. -/** - * deserializeAws_restJson1SecurityGroupIdList - */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIdList omitted. -/** - * deserializeAws_restJson1SocketAddress - */ -const de_SocketAddress = (output: any, context: __SerdeContext): SocketAddress => { - return { - name: __expectString(output.name), - port: __expectInt32(output.port), - } as any; -}; +// de_SocketAddress omitted. -/** - * deserializeAws_restJson1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - configDetails: - output.configDetails != null ? de_ConfigDetails(__expectUnion(output.configDetails), context) : undefined, - configId: __expectString(output.configId), - configType: __expectString(output.configType), - dataflowSourceRegion: __expectString(output.dataflowSourceRegion), - } as any; -}; +// de_Source omitted. /** * deserializeAws_restJson1SpectrumConfig */ const de_SpectrumConfig = (output: any, context: __SerdeContext): SpectrumConfig => { - return { - bandwidth: output.bandwidth != null ? de_FrequencyBandwidth(output.bandwidth, context) : undefined, - centerFrequency: output.centerFrequency != null ? de_Frequency(output.centerFrequency, context) : undefined, - polarization: __expectString(output.polarization), - } as any; + return take(output, { + bandwidth: (_: any) => de_FrequencyBandwidth(_, context), + centerFrequency: (_: any) => de_Frequency(_, context), + polarization: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SubnetList - */ -const de_SubnetList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetList omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. -/** - * deserializeAws_restJson1TrackingConfig - */ -const de_TrackingConfig = (output: any, context: __SerdeContext): TrackingConfig => { - return { - autotrack: __expectString(output.autotrack), - } as any; -}; +// de_TrackingConfig omitted. -/** - * deserializeAws_restJson1UplinkEchoConfig - */ -const de_UplinkEchoConfig = (output: any, context: __SerdeContext): UplinkEchoConfig => { - return { - antennaUplinkConfigArn: __expectString(output.antennaUplinkConfigArn), - enabled: __expectBoolean(output.enabled), - } as any; -}; +// de_UplinkEchoConfig omitted. /** * deserializeAws_restJson1UplinkSpectrumConfig */ const de_UplinkSpectrumConfig = (output: any, context: __SerdeContext): UplinkSpectrumConfig => { - return { - centerFrequency: output.centerFrequency != null ? de_Frequency(output.centerFrequency, context) : undefined, - polarization: __expectString(output.polarization), - } as any; + return take(output, { + centerFrequency: (_: any) => de_Frequency(_, context), + polarization: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-guardduty/src/protocols/Aws_restJson1.ts b/clients/client-guardduty/src/protocols/Aws_restJson1.ts index 272bf6f93714..301f8322f933 100644 --- a/clients/client-guardduty/src/protocols/Aws_restJson1.ts +++ b/clients/client-guardduty/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,10 +12,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -216,7 +218,6 @@ import { CoverageSortCriteria, CoverageStatistics, CoverageStatisticsType, - CoverageStatus, DataSource, DataSourceConfigurations, DataSourceConfigurationsResult, @@ -304,7 +305,6 @@ import { RemotePortDetails, Resource, ResourceDetails, - ResourceType, RuntimeContext, RuntimeDetails, S3BucketDetail, @@ -375,10 +375,12 @@ export const se_AcceptAdministratorInvitationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/administrator"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AdministratorId != null && { administratorId: input.AdministratorId }), - ...(input.InvitationId != null && { invitationId: input.InvitationId }), - }); + body = JSON.stringify( + take(input, { + administratorId: [, , `AdministratorId`], + invitationId: [, , `InvitationId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -405,10 +407,12 @@ export const se_AcceptInvitationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/master"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.InvitationId != null && { invitationId: input.InvitationId }), - ...(input.MasterId != null && { masterId: input.MasterId }), - }); + body = JSON.stringify( + take(input, { + invitationId: [, , `InvitationId`], + masterId: [, , `MasterId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -435,9 +439,11 @@ export const se_ArchiveFindingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/findings/archive"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FindingIds != null && { findingIds: se_FindingIds(input.FindingIds, context) }), - }); + body = JSON.stringify( + take(input, { + findingIds: [, (_) => _json(_), `FindingIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -462,14 +468,16 @@ export const se_CreateDetectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector"; let body: any; - body = JSON.stringify({ - clientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataSources != null && { dataSources: se_DataSourceConfigurations(input.DataSources, context) }), - ...(input.Enable != null && { enable: input.Enable }), - ...(input.Features != null && { features: se_DetectorFeatureConfigurations(input.Features, context) }), - ...(input.FindingPublishingFrequency != null && { findingPublishingFrequency: input.FindingPublishingFrequency }), - ...(input.Tags != null && { tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `ClientToken`], + dataSources: [, (_) => se_DataSourceConfigurations(_, context), `DataSources`], + enable: [, , `Enable`], + features: [, (_) => se_DetectorFeatureConfigurations(_, context), `Features`], + findingPublishingFrequency: [, , `FindingPublishingFrequency`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -496,15 +504,17 @@ export const se_CreateFilterCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/filter"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.Action != null && { action: input.Action }), - clientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { description: input.Description }), - ...(input.FindingCriteria != null && { findingCriteria: se_FindingCriteria(input.FindingCriteria, context) }), - ...(input.Name != null && { name: input.Name }), - ...(input.Rank != null && { rank: input.Rank }), - ...(input.Tags != null && { tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + action: [, , `Action`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `ClientToken`], + description: [, , `Description`], + findingCriteria: [, (_) => se_FindingCriteria(_, context), `FindingCriteria`], + name: [, , `Name`], + rank: [, , `Rank`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -531,14 +541,16 @@ export const se_CreateIPSetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/ipset"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.Activate != null && { activate: input.Activate }), - clientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Format != null && { format: input.Format }), - ...(input.Location != null && { location: input.Location }), - ...(input.Name != null && { name: input.Name }), - ...(input.Tags != null && { tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + activate: [, , `Activate`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `ClientToken`], + format: [, , `Format`], + location: [, , `Location`], + name: [, , `Name`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -565,9 +577,11 @@ export const se_CreateMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/member"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountDetails != null && { accountDetails: se_AccountDetails(input.AccountDetails, context) }), - }); + body = JSON.stringify( + take(input, { + accountDetails: [, (_) => se_AccountDetails(_, context), `AccountDetails`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -595,13 +609,13 @@ export const se_CreatePublishingDestinationCommand = async ( "/detector/{DetectorId}/publishingDestination"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DestinationProperties != null && { - destinationProperties: se_DestinationProperties(input.DestinationProperties, context), - }), - ...(input.DestinationType != null && { destinationType: input.DestinationType }), - }); + body = JSON.stringify( + take(input, { + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `ClientToken`], + destinationProperties: [, (_) => se_DestinationProperties(_, context), `DestinationProperties`], + destinationType: [, , `DestinationType`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -628,9 +642,11 @@ export const se_CreateSampleFindingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/findings/create"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FindingTypes != null && { findingTypes: se_FindingTypes(input.FindingTypes, context) }), - }); + body = JSON.stringify( + take(input, { + findingTypes: [, (_) => _json(_), `FindingTypes`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -657,14 +673,16 @@ export const se_CreateThreatIntelSetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/threatintelset"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.Activate != null && { activate: input.Activate }), - clientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Format != null && { format: input.Format }), - ...(input.Location != null && { location: input.Location }), - ...(input.Name != null && { name: input.Name }), - ...(input.Tags != null && { tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + activate: [, , `Activate`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `ClientToken`], + format: [, , `Format`], + location: [, , `Location`], + name: [, , `Name`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -689,9 +707,11 @@ export const se_DeclineInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitation/decline"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -765,9 +785,11 @@ export const se_DeleteInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitation/delete"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -819,9 +841,11 @@ export const se_DeleteMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/member/delete"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -914,12 +938,14 @@ export const se_DescribeMalwareScansCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/malware-scans"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FilterCriteria != null && { filterCriteria: se_FilterCriteria(input.FilterCriteria, context) }), - ...(input.MaxResults != null && { maxResults: input.MaxResults }), - ...(input.NextToken != null && { nextToken: input.NextToken }), - ...(input.SortCriteria != null && { sortCriteria: se_SortCriteria(input.SortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: [, (_) => se_FilterCriteria(_, context), `FilterCriteria`], + maxResults: [, , `MaxResults`], + nextToken: [, , `NextToken`], + sortCriteria: [, (_) => se_SortCriteria(_, context), `SortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1006,9 +1032,11 @@ export const se_DisableOrganizationAdminAccountCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/admin/disable"; let body: any; - body = JSON.stringify({ - ...(input.AdminAccountId != null && { adminAccountId: input.AdminAccountId }), - }); + body = JSON.stringify( + take(input, { + adminAccountId: [, , `AdminAccountId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1086,9 +1114,11 @@ export const se_DisassociateMembersCommand = async ( "/detector/{DetectorId}/member/disassociate"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1113,9 +1143,11 @@ export const se_EnableOrganizationAdminAccountCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/admin/enable"; let body: any; - body = JSON.stringify({ - ...(input.AdminAccountId != null && { adminAccountId: input.AdminAccountId }), - }); + body = JSON.stringify( + take(input, { + adminAccountId: [, , `AdminAccountId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1167,12 +1199,12 @@ export const se_GetCoverageStatisticsCommand = async ( "/detector/{DetectorId}/coverage/statistics"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FilterCriteria != null && { filterCriteria: se_CoverageFilterCriteria(input.FilterCriteria, context) }), - ...(input.StatisticsType != null && { - statisticsType: se_CoverageStatisticsTypeList(input.StatisticsType, context), - }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: [, (_) => se_CoverageFilterCriteria(_, context), `FilterCriteria`], + statisticsType: [, (_) => _json(_), `StatisticsType`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1248,10 +1280,12 @@ export const se_GetFindingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/findings/get"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FindingIds != null && { findingIds: se_FindingIds(input.FindingIds, context) }), - ...(input.SortCriteria != null && { sortCriteria: se_SortCriteria(input.SortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + findingIds: [, (_) => _json(_), `FindingIds`], + sortCriteria: [, (_) => se_SortCriteria(_, context), `SortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1279,12 +1313,12 @@ export const se_GetFindingsStatisticsCommand = async ( "/detector/{DetectorId}/findings/statistics"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FindingCriteria != null && { findingCriteria: se_FindingCriteria(input.FindingCriteria, context) }), - ...(input.FindingStatisticTypes != null && { - findingStatisticTypes: se_FindingStatisticTypes(input.FindingStatisticTypes, context), - }), - }); + body = JSON.stringify( + take(input, { + findingCriteria: [, (_) => se_FindingCriteria(_, context), `FindingCriteria`], + findingStatisticTypes: [, (_) => _json(_), `FindingStatisticTypes`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1411,9 +1445,11 @@ export const se_GetMemberDetectorsCommand = async ( "/detector/{DetectorId}/member/detector/get"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1440,9 +1476,11 @@ export const se_GetMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/member/get"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1470,9 +1508,11 @@ export const se_GetRemainingFreeTrialDaysCommand = async ( "/detector/{DetectorId}/freeTrial/daysRemaining"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1532,13 +1572,15 @@ export const se_GetUsageStatisticsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/usage/statistics"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { maxResults: input.MaxResults }), - ...(input.NextToken != null && { nextToken: input.NextToken }), - ...(input.Unit != null && { unit: input.Unit }), - ...(input.UsageCriteria != null && { usageCriteria: se_UsageCriteria(input.UsageCriteria, context) }), - ...(input.UsageStatisticType != null && { usageStatisticsType: input.UsageStatisticType }), - }); + body = JSON.stringify( + take(input, { + maxResults: [, , `MaxResults`], + nextToken: [, , `NextToken`], + unit: [, , `Unit`], + usageCriteria: [, (_) => se_UsageCriteria(_, context), `UsageCriteria`], + usageStatisticsType: [, , `UsageStatisticType`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1565,11 +1607,13 @@ export const se_InviteMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/member/invite"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - ...(input.DisableEmailNotification != null && { disableEmailNotification: input.DisableEmailNotification }), - ...(input.Message != null && { message: input.Message }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + disableEmailNotification: [, , `DisableEmailNotification`], + message: [, , `Message`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1596,12 +1640,14 @@ export const se_ListCoverageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/coverage"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FilterCriteria != null && { filterCriteria: se_CoverageFilterCriteria(input.FilterCriteria, context) }), - ...(input.MaxResults != null && { maxResults: input.MaxResults }), - ...(input.NextToken != null && { nextToken: input.NextToken }), - ...(input.SortCriteria != null && { sortCriteria: se_CoverageSortCriteria(input.SortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: [, (_) => se_CoverageFilterCriteria(_, context), `FilterCriteria`], + maxResults: [, , `MaxResults`], + nextToken: [, , `NextToken`], + sortCriteria: [, (_) => se_CoverageSortCriteria(_, context), `SortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1684,12 +1730,14 @@ export const se_ListFindingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/findings"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FindingCriteria != null && { findingCriteria: se_FindingCriteria(input.FindingCriteria, context) }), - ...(input.MaxResults != null && { maxResults: input.MaxResults }), - ...(input.NextToken != null && { nextToken: input.NextToken }), - ...(input.SortCriteria != null && { sortCriteria: se_SortCriteria(input.SortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + findingCriteria: [, (_) => se_FindingCriteria(_, context), `FindingCriteria`], + maxResults: [, , `MaxResults`], + nextToken: [, , `NextToken`], + sortCriteria: [, (_) => se_SortCriteria(_, context), `SortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1911,9 +1959,11 @@ export const se_StartMonitoringMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/member/start"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1940,9 +1990,11 @@ export const se_StopMonitoringMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/member/stop"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1968,9 +2020,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1997,9 +2051,11 @@ export const se_UnarchiveFindingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/findings/unarchive"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.FindingIds != null && { findingIds: se_FindingIds(input.FindingIds, context) }), - }); + body = JSON.stringify( + take(input, { + findingIds: [, (_) => _json(_), `FindingIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2055,12 +2111,14 @@ export const se_UpdateDetectorCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.DataSources != null && { dataSources: se_DataSourceConfigurations(input.DataSources, context) }), - ...(input.Enable != null && { enable: input.Enable }), - ...(input.Features != null && { features: se_DetectorFeatureConfigurations(input.Features, context) }), - ...(input.FindingPublishingFrequency != null && { findingPublishingFrequency: input.FindingPublishingFrequency }), - }); + body = JSON.stringify( + take(input, { + dataSources: [, (_) => se_DataSourceConfigurations(_, context), `DataSources`], + enable: [, , `Enable`], + features: [, (_) => se_DetectorFeatureConfigurations(_, context), `Features`], + findingPublishingFrequency: [, , `FindingPublishingFrequency`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2089,12 +2147,14 @@ export const se_UpdateFilterCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "FilterName", () => input.FilterName!, "{FilterName}", false); let body: any; - body = JSON.stringify({ - ...(input.Action != null && { action: input.Action }), - ...(input.Description != null && { description: input.Description }), - ...(input.FindingCriteria != null && { findingCriteria: se_FindingCriteria(input.FindingCriteria, context) }), - ...(input.Rank != null && { rank: input.Rank }), - }); + body = JSON.stringify( + take(input, { + action: [, , `Action`], + description: [, , `Description`], + findingCriteria: [, (_) => se_FindingCriteria(_, context), `FindingCriteria`], + rank: [, , `Rank`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2121,11 +2181,13 @@ export const se_UpdateFindingsFeedbackCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/findings/feedback"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.Comments != null && { comments: input.Comments }), - ...(input.Feedback != null && { feedback: input.Feedback }), - ...(input.FindingIds != null && { findingIds: se_FindingIds(input.FindingIds, context) }), - }); + body = JSON.stringify( + take(input, { + comments: [, , `Comments`], + feedback: [, , `Feedback`], + findingIds: [, (_) => _json(_), `FindingIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2153,11 +2215,13 @@ export const se_UpdateIPSetCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "IpSetId", () => input.IpSetId!, "{IpSetId}", false); let body: any; - body = JSON.stringify({ - ...(input.Activate != null && { activate: input.Activate }), - ...(input.Location != null && { location: input.Location }), - ...(input.Name != null && { name: input.Name }), - }); + body = JSON.stringify( + take(input, { + activate: [, , `Activate`], + location: [, , `Location`], + name: [, , `Name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2185,12 +2249,12 @@ export const se_UpdateMalwareScanSettingsCommand = async ( "/detector/{DetectorId}/malware-scan-settings"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.EbsSnapshotPreservation != null && { ebsSnapshotPreservation: input.EbsSnapshotPreservation }), - ...(input.ScanResourceCriteria != null && { - scanResourceCriteria: se_ScanResourceCriteria(input.ScanResourceCriteria, context), - }), - }); + body = JSON.stringify( + take(input, { + ebsSnapshotPreservation: [, , `EbsSnapshotPreservation`], + scanResourceCriteria: [, (_) => se_ScanResourceCriteria(_, context), `ScanResourceCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2218,11 +2282,13 @@ export const se_UpdateMemberDetectorsCommand = async ( "/detector/{DetectorId}/member/detector/update"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - ...(input.DataSources != null && { dataSources: se_DataSourceConfigurations(input.DataSources, context) }), - ...(input.Features != null && { features: se_MemberFeaturesConfigurations(input.Features, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `AccountIds`], + dataSources: [, (_) => se_DataSourceConfigurations(_, context), `DataSources`], + features: [, (_) => se_MemberFeaturesConfigurations(_, context), `Features`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2249,16 +2315,14 @@ export const se_UpdateOrganizationConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector/{DetectorId}/admin"; resolvedPath = __resolvedPath(resolvedPath, input, "DetectorId", () => input.DetectorId!, "{DetectorId}", false); let body: any; - body = JSON.stringify({ - ...(input.AutoEnable != null && { autoEnable: input.AutoEnable }), - ...(input.AutoEnableOrganizationMembers != null && { - autoEnableOrganizationMembers: input.AutoEnableOrganizationMembers, - }), - ...(input.DataSources != null && { - dataSources: se_OrganizationDataSourceConfigurations(input.DataSources, context), - }), - ...(input.Features != null && { features: se_OrganizationFeaturesConfigurations(input.Features, context) }), - }); + body = JSON.stringify( + take(input, { + autoEnable: [, , `AutoEnable`], + autoEnableOrganizationMembers: [, , `AutoEnableOrganizationMembers`], + dataSources: [, (_) => se_OrganizationDataSourceConfigurations(_, context), `DataSources`], + features: [, (_) => se_OrganizationFeaturesConfigurations(_, context), `Features`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2294,11 +2358,11 @@ export const se_UpdatePublishingDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DestinationProperties != null && { - destinationProperties: se_DestinationProperties(input.DestinationProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + destinationProperties: [, (_) => se_DestinationProperties(_, context), `DestinationProperties`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2334,11 +2398,13 @@ export const se_UpdateThreatIntelSetCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Activate != null && { activate: input.Activate }), - ...(input.Location != null && { location: input.Location }), - ...(input.Name != null && { name: input.Name }), - }); + body = JSON.stringify( + take(input, { + activate: [, , `Activate`], + location: [, , `Location`], + name: [, , `Name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2388,10 +2454,9 @@ const de_AcceptAdministratorInvitationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2435,10 +2500,9 @@ const de_AcceptInvitationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2482,10 +2546,9 @@ const de_ArchiveFindingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,12 +2568,11 @@ export const de_CreateDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorId != null) { - contents.DetectorId = __expectString(data.detectorId); - } - if (data.unprocessedDataSources != null) { - contents.UnprocessedDataSources = de_UnprocessedDataSourcesResult(data.unprocessedDataSources, context); - } + const doc = take(data, { + DetectorId: [, __expectString, `detectorId`], + UnprocessedDataSources: [, (_) => de_UnprocessedDataSourcesResult(_, context), `unprocessedDataSources`], + }); + Object.assign(contents, doc); return contents; }; @@ -2535,10 +2597,9 @@ const de_CreateDetectorCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2558,9 +2619,10 @@ export const de_CreateFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.name != null) { - contents.Name = __expectString(data.name); - } + const doc = take(data, { + Name: [, __expectString, `name`], + }); + Object.assign(contents, doc); return contents; }; @@ -2585,10 +2647,9 @@ const de_CreateFilterCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2608,9 +2669,10 @@ export const de_CreateIPSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ipSetId != null) { - contents.IpSetId = __expectString(data.ipSetId); - } + const doc = take(data, { + IpSetId: [, __expectString, `ipSetId`], + }); + Object.assign(contents, doc); return contents; }; @@ -2635,10 +2697,9 @@ const de_CreateIPSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2658,9 +2719,10 @@ export const de_CreateMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -2685,10 +2747,9 @@ const de_CreateMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2708,9 +2769,10 @@ export const de_CreatePublishingDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.destinationId != null) { - contents.DestinationId = __expectString(data.destinationId); - } + const doc = take(data, { + DestinationId: [, __expectString, `destinationId`], + }); + Object.assign(contents, doc); return contents; }; @@ -2735,10 +2797,9 @@ const de_CreatePublishingDestinationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2782,10 +2843,9 @@ const de_CreateSampleFindingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2805,9 +2865,10 @@ export const de_CreateThreatIntelSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.threatIntelSetId != null) { - contents.ThreatIntelSetId = __expectString(data.threatIntelSetId); - } + const doc = take(data, { + ThreatIntelSetId: [, __expectString, `threatIntelSetId`], + }); + Object.assign(contents, doc); return contents; }; @@ -2832,10 +2893,9 @@ const de_CreateThreatIntelSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2855,9 +2915,10 @@ export const de_DeclineInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -2882,10 +2943,9 @@ const de_DeclineInvitationsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2929,10 +2989,9 @@ const de_DeleteDetectorCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2976,10 +3035,9 @@ const de_DeleteFilterCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2999,9 +3057,10 @@ export const de_DeleteInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -3026,10 +3085,9 @@ const de_DeleteInvitationsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3073,10 +3131,9 @@ const de_DeleteIPSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3096,9 +3153,10 @@ export const de_DeleteMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -3123,10 +3181,9 @@ const de_DeleteMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3170,10 +3227,9 @@ const de_DeletePublishingDestinationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3217,10 +3273,9 @@ const de_DeleteThreatIntelSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3240,12 +3295,11 @@ export const de_DescribeMalwareScansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.scans != null) { - contents.Scans = de_Scans(data.scans, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Scans: [, (_) => de_Scans(_, context), `scans`], + }); + Object.assign(contents, doc); return contents; }; @@ -3270,10 +3324,9 @@ const de_DescribeMalwareScansCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3293,24 +3346,15 @@ export const de_DescribeOrganizationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoEnable != null) { - contents.AutoEnable = __expectBoolean(data.autoEnable); - } - if (data.autoEnableOrganizationMembers != null) { - contents.AutoEnableOrganizationMembers = __expectString(data.autoEnableOrganizationMembers); - } - if (data.dataSources != null) { - contents.DataSources = de_OrganizationDataSourceConfigurationsResult(data.dataSources, context); - } - if (data.features != null) { - contents.Features = de_OrganizationFeaturesConfigurationsResults(data.features, context); - } - if (data.memberAccountLimitReached != null) { - contents.MemberAccountLimitReached = __expectBoolean(data.memberAccountLimitReached); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + AutoEnable: [, __expectBoolean, `autoEnable`], + AutoEnableOrganizationMembers: [, __expectString, `autoEnableOrganizationMembers`], + DataSources: [, (_) => de_OrganizationDataSourceConfigurationsResult(_, context), `dataSources`], + Features: [, (_) => de_OrganizationFeaturesConfigurationsResults(_, context), `features`], + MemberAccountLimitReached: [, __expectBoolean, `memberAccountLimitReached`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3335,10 +3379,9 @@ const de_DescribeOrganizationConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3358,21 +3401,14 @@ export const de_DescribePublishingDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.destinationId != null) { - contents.DestinationId = __expectString(data.destinationId); - } - if (data.destinationProperties != null) { - contents.DestinationProperties = de_DestinationProperties(data.destinationProperties, context); - } - if (data.destinationType != null) { - contents.DestinationType = __expectString(data.destinationType); - } - if (data.publishingFailureStartTimestamp != null) { - contents.PublishingFailureStartTimestamp = __expectLong(data.publishingFailureStartTimestamp); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + DestinationId: [, __expectString, `destinationId`], + DestinationProperties: [, (_) => de_DestinationProperties(_, context), `destinationProperties`], + DestinationType: [, __expectString, `destinationType`], + PublishingFailureStartTimestamp: [, __expectLong, `publishingFailureStartTimestamp`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -3397,10 +3433,9 @@ const de_DescribePublishingDestinationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3444,10 +3479,9 @@ const de_DisableOrganizationAdminAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3491,10 +3525,9 @@ const de_DisassociateFromAdministratorAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3538,10 +3571,9 @@ const de_DisassociateFromMasterAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3561,9 +3593,10 @@ export const de_DisassociateMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -3588,10 +3621,9 @@ const de_DisassociateMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3635,10 +3667,9 @@ const de_EnableOrganizationAdminAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3658,9 +3689,10 @@ export const de_GetAdministratorAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.administrator != null) { - contents.Administrator = de_Administrator(data.administrator, context); - } + const doc = take(data, { + Administrator: [, (_) => de_Administrator(_, context), `administrator`], + }); + Object.assign(contents, doc); return contents; }; @@ -3685,10 +3717,9 @@ const de_GetAdministratorAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3708,9 +3739,10 @@ export const de_GetCoverageStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.coverageStatistics != null) { - contents.CoverageStatistics = de_CoverageStatistics(data.coverageStatistics, context); - } + const doc = take(data, { + CoverageStatistics: [, (_) => de_CoverageStatistics(_, context), `coverageStatistics`], + }); + Object.assign(contents, doc); return contents; }; @@ -3735,10 +3767,9 @@ const de_GetCoverageStatisticsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3758,30 +3789,17 @@ export const de_GetDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.dataSources != null) { - contents.DataSources = de_DataSourceConfigurationsResult(data.dataSources, context); - } - if (data.features != null) { - contents.Features = de_DetectorFeatureConfigurationsResults(data.features, context); - } - if (data.findingPublishingFrequency != null) { - contents.FindingPublishingFrequency = __expectString(data.findingPublishingFrequency); - } - if (data.serviceRole != null) { - contents.ServiceRole = __expectString(data.serviceRole); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.tags != null) { - contents.Tags = de_TagMap(data.tags, context); - } - if (data.updatedAt != null) { - contents.UpdatedAt = __expectString(data.updatedAt); - } + const doc = take(data, { + CreatedAt: [, __expectString, `createdAt`], + DataSources: [, (_) => de_DataSourceConfigurationsResult(_, context), `dataSources`], + Features: [, (_) => de_DetectorFeatureConfigurationsResults(_, context), `features`], + FindingPublishingFrequency: [, __expectString, `findingPublishingFrequency`], + ServiceRole: [, __expectString, `serviceRole`], + Status: [, __expectString, `status`], + Tags: [, _json, `tags`], + UpdatedAt: [, __expectString, `updatedAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -3806,10 +3824,9 @@ const de_GetDetectorCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3829,24 +3846,15 @@ export const de_GetFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.Action = __expectString(data.action); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.findingCriteria != null) { - contents.FindingCriteria = de_FindingCriteria(data.findingCriteria, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.rank != null) { - contents.Rank = __expectInt32(data.rank); - } - if (data.tags != null) { - contents.Tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + Action: [, __expectString, `action`], + Description: [, __expectString, `description`], + FindingCriteria: [, (_) => de_FindingCriteria(_, context), `findingCriteria`], + Name: [, __expectString, `name`], + Rank: [, __expectInt32, `rank`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3871,10 +3879,9 @@ const de_GetFilterCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3894,9 +3901,10 @@ export const de_GetFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.Findings = de_Findings(data.findings, context); - } + const doc = take(data, { + Findings: [, (_) => de_Findings(_, context), `findings`], + }); + Object.assign(contents, doc); return contents; }; @@ -3921,10 +3929,9 @@ const de_GetFindingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3944,9 +3951,10 @@ export const de_GetFindingsStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findingStatistics != null) { - contents.FindingStatistics = de_FindingStatistics(data.findingStatistics, context); - } + const doc = take(data, { + FindingStatistics: [, (_) => de_FindingStatistics(_, context), `findingStatistics`], + }); + Object.assign(contents, doc); return contents; }; @@ -3971,10 +3979,9 @@ const de_GetFindingsStatisticsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3994,9 +4001,10 @@ export const de_GetInvitationsCountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.invitationsCount != null) { - contents.InvitationsCount = __expectInt32(data.invitationsCount); - } + const doc = take(data, { + InvitationsCount: [, __expectInt32, `invitationsCount`], + }); + Object.assign(contents, doc); return contents; }; @@ -4021,10 +4029,9 @@ const de_GetInvitationsCountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4044,21 +4051,14 @@ export const de_GetIPSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.format != null) { - contents.Format = __expectString(data.format); - } - if (data.location != null) { - contents.Location = __expectString(data.location); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.tags != null) { - contents.Tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + Format: [, __expectString, `format`], + Location: [, __expectString, `location`], + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -4083,10 +4083,9 @@ const de_GetIPSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4106,12 +4105,11 @@ export const de_GetMalwareScanSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ebsSnapshotPreservation != null) { - contents.EbsSnapshotPreservation = __expectString(data.ebsSnapshotPreservation); - } - if (data.scanResourceCriteria != null) { - contents.ScanResourceCriteria = de_ScanResourceCriteria(data.scanResourceCriteria, context); - } + const doc = take(data, { + EbsSnapshotPreservation: [, __expectString, `ebsSnapshotPreservation`], + ScanResourceCriteria: [, (_) => de_ScanResourceCriteria(_, context), `scanResourceCriteria`], + }); + Object.assign(contents, doc); return contents; }; @@ -4136,10 +4134,9 @@ const de_GetMalwareScanSettingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4159,9 +4156,10 @@ export const de_GetMasterAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.master != null) { - contents.Master = de_Master(data.master, context); - } + const doc = take(data, { + Master: [, (_) => de_Master(_, context), `master`], + }); + Object.assign(contents, doc); return contents; }; @@ -4186,10 +4184,9 @@ const de_GetMasterAccountCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4209,12 +4206,11 @@ export const de_GetMemberDetectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.MemberDataSourceConfigurations = de_MemberDataSourceConfigurations(data.members, context); - } - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + MemberDataSourceConfigurations: [, (_) => de_MemberDataSourceConfigurations(_, context), `members`], + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -4239,10 +4235,9 @@ const de_GetMemberDetectorsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4262,12 +4257,11 @@ export const de_GetMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.Members = de_Members(data.members, context); - } - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + Members: [, (_) => de_Members(_, context), `members`], + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -4292,10 +4286,9 @@ const de_GetMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4315,12 +4308,11 @@ export const de_GetRemainingFreeTrialDaysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accounts != null) { - contents.Accounts = de_AccountFreeTrialInfos(data.accounts, context); - } - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + Accounts: [, (_) => de_AccountFreeTrialInfos(_, context), `accounts`], + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -4345,10 +4337,9 @@ const de_GetRemainingFreeTrialDaysCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4368,21 +4359,14 @@ export const de_GetThreatIntelSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.format != null) { - contents.Format = __expectString(data.format); - } - if (data.location != null) { - contents.Location = __expectString(data.location); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.tags != null) { - contents.Tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + Format: [, __expectString, `format`], + Location: [, __expectString, `location`], + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -4407,10 +4391,9 @@ const de_GetThreatIntelSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4430,12 +4413,11 @@ export const de_GetUsageStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.usageStatistics != null) { - contents.UsageStatistics = de_UsageStatistics(data.usageStatistics, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + UsageStatistics: [, (_) => de_UsageStatistics(_, context), `usageStatistics`], + }); + Object.assign(contents, doc); return contents; }; @@ -4460,10 +4442,9 @@ const de_GetUsageStatisticsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4483,9 +4464,10 @@ export const de_InviteMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -4510,10 +4492,9 @@ const de_InviteMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4533,12 +4514,11 @@ export const de_ListCoverageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.resources != null) { - contents.Resources = de_CoverageResources(data.resources, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Resources: [, (_) => de_CoverageResources(_, context), `resources`], + }); + Object.assign(contents, doc); return contents; }; @@ -4563,10 +4543,9 @@ const de_ListCoverageCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4586,12 +4565,11 @@ export const de_ListDetectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorIds != null) { - contents.DetectorIds = de_DetectorIds(data.detectorIds, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + DetectorIds: [, _json, `detectorIds`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4616,10 +4594,9 @@ const de_ListDetectorsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4639,12 +4616,11 @@ export const de_ListFiltersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.filterNames != null) { - contents.FilterNames = de_FilterNames(data.filterNames, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + FilterNames: [, _json, `filterNames`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4669,10 +4645,9 @@ const de_ListFiltersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4692,12 +4667,11 @@ export const de_ListFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findingIds != null) { - contents.FindingIds = de_FindingIds(data.findingIds, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + FindingIds: [, _json, `findingIds`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4722,10 +4696,9 @@ const de_ListFindingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4745,12 +4718,11 @@ export const de_ListInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.invitations != null) { - contents.Invitations = de_Invitations(data.invitations, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Invitations: [, (_) => de_Invitations(_, context), `invitations`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4775,10 +4747,9 @@ const de_ListInvitationsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4798,12 +4769,11 @@ export const de_ListIPSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ipSetIds != null) { - contents.IpSetIds = de_IpSetIds(data.ipSetIds, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + IpSetIds: [, _json, `ipSetIds`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4828,10 +4798,9 @@ const de_ListIPSetsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4851,12 +4820,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.Members = de_Members(data.members, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Members: [, (_) => de_Members(_, context), `members`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4881,10 +4849,9 @@ const de_ListMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4904,12 +4871,11 @@ export const de_ListOrganizationAdminAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adminAccounts != null) { - contents.AdminAccounts = de_AdminAccounts(data.adminAccounts, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + AdminAccounts: [, (_) => de_AdminAccounts(_, context), `adminAccounts`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4934,10 +4900,9 @@ const de_ListOrganizationAdminAccountsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4957,12 +4922,11 @@ export const de_ListPublishingDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.destinations != null) { - contents.Destinations = de_Destinations(data.destinations, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Destinations: [, (_) => de_Destinations(_, context), `destinations`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4987,10 +4951,9 @@ const de_ListPublishingDestinationsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5010,9 +4973,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -5037,10 +5001,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5060,12 +5023,11 @@ export const de_ListThreatIntelSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.threatIntelSetIds != null) { - contents.ThreatIntelSetIds = de_ThreatIntelSetIds(data.threatIntelSetIds, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + ThreatIntelSetIds: [, _json, `threatIntelSetIds`], + }); + Object.assign(contents, doc); return contents; }; @@ -5090,10 +5052,9 @@ const de_ListThreatIntelSetsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5113,9 +5074,10 @@ export const de_StartMonitoringMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -5140,10 +5102,9 @@ const de_StartMonitoringMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5163,9 +5124,10 @@ export const de_StopMonitoringMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -5190,10 +5152,9 @@ const de_StopMonitoringMembersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5237,10 +5198,9 @@ const de_TagResourceCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5284,10 +5244,9 @@ const de_UnarchiveFindingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5331,10 +5290,9 @@ const de_UntagResourceCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5378,10 +5336,9 @@ const de_UpdateDetectorCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5401,9 +5358,10 @@ export const de_UpdateFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.name != null) { - contents.Name = __expectString(data.name); - } + const doc = take(data, { + Name: [, __expectString, `name`], + }); + Object.assign(contents, doc); return contents; }; @@ -5428,10 +5386,9 @@ const de_UpdateFilterCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5475,10 +5432,9 @@ const de_UpdateFindingsFeedbackCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5522,10 +5478,9 @@ const de_UpdateIPSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5569,10 +5524,9 @@ const de_UpdateMalwareScanSettingsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5592,9 +5546,10 @@ export const de_UpdateMemberDetectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.UnprocessedAccounts = de_UnprocessedAccounts(data.unprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: [, (_) => de_UnprocessedAccounts(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -5619,10 +5574,9 @@ const de_UpdateMemberDetectorsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5666,10 +5620,9 @@ const de_UpdateOrganizationConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5713,10 +5666,9 @@ const de_UpdatePublishingDestinationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5760,28 +5712,26 @@ const de_UpdateThreatIntelSetCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.__type != null) { - contents.Type = __expectString(data.__type); - } + const doc = take(data, { + Message: [, __expectString, `message`], + Type: [, __expectString, `__type`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5798,12 +5748,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.__type != null) { - contents.Type = __expectString(data.__type); - } + const doc = take(data, { + Message: [, __expectString, `message`], + Type: [, __expectString, `__type`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5815,10 +5764,10 @@ const de_InternalServerErrorExceptionRes = async ( * serializeAws_restJson1AccountDetail */ const se_AccountDetail = (input: AccountDetail, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { accountId: input.AccountId }), - ...(input.Email != null && { email: input.Email }), - }; + return take(input, { + accountId: [, , `AccountId`], + email: [, , `Email`], + }); }; /** @@ -5832,68 +5781,55 @@ const se_AccountDetails = (input: AccountDetail[], context: __SerdeContext): any }); }; -/** - * serializeAws_restJson1AccountIds - */ -const se_AccountIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIds omitted. /** * serializeAws_restJson1Condition */ const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.Eq != null && { eq: se_Eq(input.Eq, context) }), - ...(input.Equals != null && { equals: se_Equals(input.Equals, context) }), - ...(input.GreaterThan != null && { greaterThan: input.GreaterThan }), - ...(input.GreaterThanOrEqual != null && { greaterThanOrEqual: input.GreaterThanOrEqual }), - ...(input.Gt != null && { gt: input.Gt }), - ...(input.Gte != null && { gte: input.Gte }), - ...(input.LessThan != null && { lessThan: input.LessThan }), - ...(input.LessThanOrEqual != null && { lessThanOrEqual: input.LessThanOrEqual }), - ...(input.Lt != null && { lt: input.Lt }), - ...(input.Lte != null && { lte: input.Lte }), - ...(input.Neq != null && { neq: se_Neq(input.Neq, context) }), - ...(input.NotEquals != null && { notEquals: se_NotEquals(input.NotEquals, context) }), - }; + return take(input, { + eq: [, _json, `Eq`], + equals: [, _json, `Equals`], + greaterThan: [, , `GreaterThan`], + greaterThanOrEqual: [, , `GreaterThanOrEqual`], + gt: [, , `Gt`], + gte: [, , `Gte`], + lessThan: [, , `LessThan`], + lessThanOrEqual: [, , `LessThanOrEqual`], + lt: [, , `Lt`], + lte: [, , `Lte`], + neq: [, _json, `Neq`], + notEquals: [, _json, `NotEquals`], + }); }; /** * serializeAws_restJson1CoverageFilterCondition */ const se_CoverageFilterCondition = (input: CoverageFilterCondition, context: __SerdeContext): any => { - return { - ...(input.Equals != null && { equals: se_Equals(input.Equals, context) }), - ...(input.NotEquals != null && { notEquals: se_NotEquals(input.NotEquals, context) }), - }; + return take(input, { + equals: [, _json, `Equals`], + notEquals: [, _json, `NotEquals`], + }); }; /** * serializeAws_restJson1CoverageFilterCriteria */ const se_CoverageFilterCriteria = (input: CoverageFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.FilterCriterion != null && { - filterCriterion: se_CoverageFilterCriterionList(input.FilterCriterion, context), - }), - }; + return take(input, { + filterCriterion: [, (_) => se_CoverageFilterCriterionList(_, context), `FilterCriterion`], + }); }; /** * serializeAws_restJson1CoverageFilterCriterion */ const se_CoverageFilterCriterion = (input: CoverageFilterCriterion, context: __SerdeContext): any => { - return { - ...(input.CriterionKey != null && { criterionKey: input.CriterionKey }), - ...(input.FilterCondition != null && { - filterCondition: se_CoverageFilterCondition(input.FilterCondition, context), - }), - }; + return take(input, { + criterionKey: [, , `CriterionKey`], + filterCondition: [, (_) => se_CoverageFilterCondition(_, context), `FilterCondition`], + }); }; /** @@ -5911,22 +5847,13 @@ const se_CoverageFilterCriterionList = (input: CoverageFilterCriterion[], contex * serializeAws_restJson1CoverageSortCriteria */ const se_CoverageSortCriteria = (input: CoverageSortCriteria, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { attributeName: input.AttributeName }), - ...(input.OrderBy != null && { orderBy: input.OrderBy }), - }; + return take(input, { + attributeName: [, , `AttributeName`], + orderBy: [, , `OrderBy`], + }); }; -/** - * serializeAws_restJson1CoverageStatisticsTypeList - */ -const se_CoverageStatisticsTypeList = (input: (CoverageStatisticsType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CoverageStatisticsTypeList omitted. /** * serializeAws_restJson1Criterion @@ -5945,44 +5872,33 @@ const se_Criterion = (input: Record, context: __SerdeContext) * serializeAws_restJson1DataSourceConfigurations */ const se_DataSourceConfigurations = (input: DataSourceConfigurations, context: __SerdeContext): any => { - return { - ...(input.Kubernetes != null && { kubernetes: se_KubernetesConfiguration(input.Kubernetes, context) }), - ...(input.MalwareProtection != null && { - malwareProtection: se_MalwareProtectionConfiguration(input.MalwareProtection, context), - }), - ...(input.S3Logs != null && { s3Logs: se_S3LogsConfiguration(input.S3Logs, context) }), - }; + return take(input, { + kubernetes: [, (_) => se_KubernetesConfiguration(_, context), `Kubernetes`], + malwareProtection: [, (_) => se_MalwareProtectionConfiguration(_, context), `MalwareProtection`], + s3Logs: [, (_) => se_S3LogsConfiguration(_, context), `S3Logs`], + }); }; -/** - * serializeAws_restJson1DataSourceList - */ -const se_DataSourceList = (input: (DataSource | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataSourceList omitted. /** * serializeAws_restJson1DestinationProperties */ const se_DestinationProperties = (input: DestinationProperties, context: __SerdeContext): any => { - return { - ...(input.DestinationArn != null && { destinationArn: input.DestinationArn }), - ...(input.KmsKeyArn != null && { kmsKeyArn: input.KmsKeyArn }), - }; + return take(input, { + destinationArn: [, , `DestinationArn`], + kmsKeyArn: [, , `KmsKeyArn`], + }); }; /** * serializeAws_restJson1DetectorAdditionalConfiguration */ const se_DetectorAdditionalConfiguration = (input: DetectorAdditionalConfiguration, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - ...(input.Status != null && { status: input.Status }), - }; + return take(input, { + name: [, , `Name`], + status: [, , `Status`], + }); }; /** @@ -6003,13 +5919,11 @@ const se_DetectorAdditionalConfigurations = ( * serializeAws_restJson1DetectorFeatureConfiguration */ const se_DetectorFeatureConfiguration = (input: DetectorFeatureConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdditionalConfiguration != null && { - additionalConfiguration: se_DetectorAdditionalConfigurations(input.AdditionalConfiguration, context), - }), - ...(input.Name != null && { name: input.Name }), - ...(input.Status != null && { status: input.Status }), - }; + return take(input, { + additionalConfiguration: [, (_) => se_DetectorAdditionalConfigurations(_, context), `AdditionalConfiguration`], + name: [, , `Name`], + status: [, , `Status`], + }); }; /** @@ -6023,56 +5937,38 @@ const se_DetectorFeatureConfigurations = (input: DetectorFeatureConfiguration[], }); }; -/** - * serializeAws_restJson1Eq - */ -const se_Eq = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Eq omitted. -/** - * serializeAws_restJson1Equals - */ -const se_Equals = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Equals omitted. /** * serializeAws_restJson1FilterCondition */ const se_FilterCondition = (input: FilterCondition, context: __SerdeContext): any => { - return { - ...(input.EqualsValue != null && { equalsValue: input.EqualsValue }), - ...(input.GreaterThan != null && { greaterThan: input.GreaterThan }), - ...(input.LessThan != null && { lessThan: input.LessThan }), - }; + return take(input, { + equalsValue: [, , `EqualsValue`], + greaterThan: [, , `GreaterThan`], + lessThan: [, , `LessThan`], + }); }; /** * serializeAws_restJson1FilterCriteria */ const se_FilterCriteria = (input: FilterCriteria, context: __SerdeContext): any => { - return { - ...(input.FilterCriterion != null && { filterCriterion: se_FilterCriterionList(input.FilterCriterion, context) }), - }; + return take(input, { + filterCriterion: [, (_) => se_FilterCriterionList(_, context), `FilterCriterion`], + }); }; /** * serializeAws_restJson1FilterCriterion */ const se_FilterCriterion = (input: FilterCriterion, context: __SerdeContext): any => { - return { - ...(input.CriterionKey != null && { criterionKey: input.CriterionKey }), - ...(input.FilterCondition != null && { filterCondition: se_FilterCondition(input.FilterCondition, context) }), - }; + return take(input, { + criterionKey: [, , `CriterionKey`], + filterCondition: [, (_) => se_FilterCondition(_, context), `FilterCondition`], + }); }; /** @@ -6090,71 +5986,42 @@ const se_FilterCriterionList = (input: FilterCriterion[], context: __SerdeContex * serializeAws_restJson1FindingCriteria */ const se_FindingCriteria = (input: FindingCriteria, context: __SerdeContext): any => { - return { - ...(input.Criterion != null && { criterion: se_Criterion(input.Criterion, context) }), - }; + return take(input, { + criterion: [, (_) => se_Criterion(_, context), `Criterion`], + }); }; -/** - * serializeAws_restJson1FindingIds - */ -const se_FindingIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FindingIds omitted. -/** - * serializeAws_restJson1FindingStatisticTypes - */ -const se_FindingStatisticTypes = (input: (FindingStatisticType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FindingStatisticTypes omitted. -/** - * serializeAws_restJson1FindingTypes - */ -const se_FindingTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FindingTypes omitted. /** * serializeAws_restJson1KubernetesAuditLogsConfiguration */ const se_KubernetesAuditLogsConfiguration = (input: KubernetesAuditLogsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enable != null && { enable: input.Enable }), - }; + return take(input, { + enable: [, , `Enable`], + }); }; /** * serializeAws_restJson1KubernetesConfiguration */ const se_KubernetesConfiguration = (input: KubernetesConfiguration, context: __SerdeContext): any => { - return { - ...(input.AuditLogs != null && { auditLogs: se_KubernetesAuditLogsConfiguration(input.AuditLogs, context) }), - }; + return take(input, { + auditLogs: [, (_) => se_KubernetesAuditLogsConfiguration(_, context), `AuditLogs`], + }); }; /** * serializeAws_restJson1MalwareProtectionConfiguration */ const se_MalwareProtectionConfiguration = (input: MalwareProtectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.ScanEc2InstanceWithFindings != null && { - scanEc2InstanceWithFindings: se_ScanEc2InstanceWithFindings(input.ScanEc2InstanceWithFindings, context), - }), - }; + return take(input, { + scanEc2InstanceWithFindings: [, (_) => se_ScanEc2InstanceWithFindings(_, context), `ScanEc2InstanceWithFindings`], + }); }; /** @@ -6172,10 +6039,10 @@ const se_MapEquals = (input: ScanConditionPair[], context: __SerdeContext): any * serializeAws_restJson1MemberAdditionalConfiguration */ const se_MemberAdditionalConfiguration = (input: MemberAdditionalConfiguration, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - ...(input.Status != null && { status: input.Status }), - }; + return take(input, { + name: [, , `Name`], + status: [, , `Status`], + }); }; /** @@ -6193,13 +6060,11 @@ const se_MemberAdditionalConfigurations = (input: MemberAdditionalConfiguration[ * serializeAws_restJson1MemberFeaturesConfiguration */ const se_MemberFeaturesConfiguration = (input: MemberFeaturesConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdditionalConfiguration != null && { - additionalConfiguration: se_MemberAdditionalConfigurations(input.AdditionalConfiguration, context), - }), - ...(input.Name != null && { name: input.Name }), - ...(input.Status != null && { status: input.Status }), - }; + return take(input, { + additionalConfiguration: [, (_) => se_MemberAdditionalConfigurations(_, context), `AdditionalConfiguration`], + name: [, , `Name`], + status: [, , `Status`], + }); }; /** @@ -6213,27 +6078,9 @@ const se_MemberFeaturesConfigurations = (input: MemberFeaturesConfiguration[], c }); }; -/** - * serializeAws_restJson1Neq - */ -const se_Neq = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Neq omitted. -/** - * serializeAws_restJson1NotEquals - */ -const se_NotEquals = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NotEquals omitted. /** * serializeAws_restJson1OrganizationAdditionalConfiguration @@ -6242,10 +6089,10 @@ const se_OrganizationAdditionalConfiguration = ( input: OrganizationAdditionalConfiguration, context: __SerdeContext ): any => { - return { - ...(input.AutoEnable != null && { autoEnable: input.AutoEnable }), - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + autoEnable: [, , `AutoEnable`], + name: [, , `Name`], + }); }; /** @@ -6269,35 +6116,31 @@ const se_OrganizationDataSourceConfigurations = ( input: OrganizationDataSourceConfigurations, context: __SerdeContext ): any => { - return { - ...(input.Kubernetes != null && { kubernetes: se_OrganizationKubernetesConfiguration(input.Kubernetes, context) }), - ...(input.MalwareProtection != null && { - malwareProtection: se_OrganizationMalwareProtectionConfiguration(input.MalwareProtection, context), - }), - ...(input.S3Logs != null && { s3Logs: se_OrganizationS3LogsConfiguration(input.S3Logs, context) }), - }; + return take(input, { + kubernetes: [, (_) => se_OrganizationKubernetesConfiguration(_, context), `Kubernetes`], + malwareProtection: [, (_) => se_OrganizationMalwareProtectionConfiguration(_, context), `MalwareProtection`], + s3Logs: [, (_) => se_OrganizationS3LogsConfiguration(_, context), `S3Logs`], + }); }; /** * serializeAws_restJson1OrganizationEbsVolumes */ const se_OrganizationEbsVolumes = (input: OrganizationEbsVolumes, context: __SerdeContext): any => { - return { - ...(input.AutoEnable != null && { autoEnable: input.AutoEnable }), - }; + return take(input, { + autoEnable: [, , `AutoEnable`], + }); }; /** * serializeAws_restJson1OrganizationFeatureConfiguration */ const se_OrganizationFeatureConfiguration = (input: OrganizationFeatureConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdditionalConfiguration != null && { - additionalConfiguration: se_OrganizationAdditionalConfigurations(input.AdditionalConfiguration, context), - }), - ...(input.AutoEnable != null && { autoEnable: input.AutoEnable }), - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + additionalConfiguration: [, (_) => se_OrganizationAdditionalConfigurations(_, context), `AdditionalConfiguration`], + autoEnable: [, , `AutoEnable`], + name: [, , `Name`], + }); }; /** @@ -6321,9 +6164,9 @@ const se_OrganizationKubernetesAuditLogsConfiguration = ( input: OrganizationKubernetesAuditLogsConfiguration, context: __SerdeContext ): any => { - return { - ...(input.AutoEnable != null && { autoEnable: input.AutoEnable }), - }; + return take(input, { + autoEnable: [, , `AutoEnable`], + }); }; /** @@ -6333,11 +6176,9 @@ const se_OrganizationKubernetesConfiguration = ( input: OrganizationKubernetesConfiguration, context: __SerdeContext ): any => { - return { - ...(input.AuditLogs != null && { - auditLogs: se_OrganizationKubernetesAuditLogsConfiguration(input.AuditLogs, context), - }), - }; + return take(input, { + auditLogs: [, (_) => se_OrganizationKubernetesAuditLogsConfiguration(_, context), `AuditLogs`], + }); }; /** @@ -6347,23 +6188,22 @@ const se_OrganizationMalwareProtectionConfiguration = ( input: OrganizationMalwareProtectionConfiguration, context: __SerdeContext ): any => { - return { - ...(input.ScanEc2InstanceWithFindings != null && { - scanEc2InstanceWithFindings: se_OrganizationScanEc2InstanceWithFindings( - input.ScanEc2InstanceWithFindings, - context - ), - }), - }; + return take(input, { + scanEc2InstanceWithFindings: [ + , + (_) => se_OrganizationScanEc2InstanceWithFindings(_, context), + `ScanEc2InstanceWithFindings`, + ], + }); }; /** * serializeAws_restJson1OrganizationS3LogsConfiguration */ const se_OrganizationS3LogsConfiguration = (input: OrganizationS3LogsConfiguration, context: __SerdeContext): any => { - return { - ...(input.AutoEnable != null && { autoEnable: input.AutoEnable }), - }; + return take(input, { + autoEnable: [, , `AutoEnable`], + }); }; /** @@ -6373,48 +6213,39 @@ const se_OrganizationScanEc2InstanceWithFindings = ( input: OrganizationScanEc2InstanceWithFindings, context: __SerdeContext ): any => { - return { - ...(input.EbsVolumes != null && { ebsVolumes: se_OrganizationEbsVolumes(input.EbsVolumes, context) }), - }; + return take(input, { + ebsVolumes: [, (_) => se_OrganizationEbsVolumes(_, context), `EbsVolumes`], + }); }; -/** - * serializeAws_restJson1ResourceList - */ -const se_ResourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceList omitted. /** * serializeAws_restJson1S3LogsConfiguration */ const se_S3LogsConfiguration = (input: S3LogsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enable != null && { enable: input.Enable }), - }; + return take(input, { + enable: [, , `Enable`], + }); }; /** * serializeAws_restJson1ScanCondition */ const se_ScanCondition = (input: ScanCondition, context: __SerdeContext): any => { - return { - ...(input.MapEquals != null && { mapEquals: se_MapEquals(input.MapEquals, context) }), - }; + return take(input, { + mapEquals: [, (_) => se_MapEquals(_, context), `MapEquals`], + }); }; /** * serializeAws_restJson1ScanConditionPair */ const se_ScanConditionPair = (input: ScanConditionPair, context: __SerdeContext): any => { - return { - ...(input.Key != null && { key: input.Key }), - ...(input.Value != null && { value: input.Value }), - }; + return take(input, { + key: [, , `Key`], + value: [, , `Value`], + }); }; /** @@ -6434,98 +6265,78 @@ const se_ScanCriterion = (input: Record, context: __Serde * serializeAws_restJson1ScanEc2InstanceWithFindings */ const se_ScanEc2InstanceWithFindings = (input: ScanEc2InstanceWithFindings, context: __SerdeContext): any => { - return { - ...(input.EbsVolumes != null && { ebsVolumes: input.EbsVolumes }), - }; + return take(input, { + ebsVolumes: [, , `EbsVolumes`], + }); }; /** * serializeAws_restJson1ScanResourceCriteria */ const se_ScanResourceCriteria = (input: ScanResourceCriteria, context: __SerdeContext): any => { - return { - ...(input.Exclude != null && { exclude: se_ScanCriterion(input.Exclude, context) }), - ...(input.Include != null && { include: se_ScanCriterion(input.Include, context) }), - }; + return take(input, { + exclude: [, (_) => se_ScanCriterion(_, context), `Exclude`], + include: [, (_) => se_ScanCriterion(_, context), `Include`], + }); }; /** * serializeAws_restJson1SortCriteria */ const se_SortCriteria = (input: SortCriteria, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { attributeName: input.AttributeName }), - ...(input.OrderBy != null && { orderBy: input.OrderBy }), - }; + return take(input, { + attributeName: [, , `AttributeName`], + orderBy: [, , `OrderBy`], + }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * serializeAws_restJson1UsageCriteria */ const se_UsageCriteria = (input: UsageCriteria, context: __SerdeContext): any => { - return { - ...(input.AccountIds != null && { accountIds: se_AccountIds(input.AccountIds, context) }), - ...(input.DataSources != null && { dataSources: se_DataSourceList(input.DataSources, context) }), - ...(input.Features != null && { features: se_UsageFeatureList(input.Features, context) }), - ...(input.Resources != null && { resources: se_ResourceList(input.Resources, context) }), - }; + return take(input, { + accountIds: [, _json, `AccountIds`], + dataSources: [, _json, `DataSources`], + features: [, _json, `Features`], + resources: [, _json, `Resources`], + }); }; -/** - * serializeAws_restJson1UsageFeatureList - */ -const se_UsageFeatureList = (input: (UsageFeature | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UsageFeatureList omitted. /** * deserializeAws_restJson1AccessControlList */ const de_AccessControlList = (output: any, context: __SerdeContext): AccessControlList => { - return { - AllowsPublicReadAccess: __expectBoolean(output.allowsPublicReadAccess), - AllowsPublicWriteAccess: __expectBoolean(output.allowsPublicWriteAccess), - } as any; + return take(output, { + AllowsPublicReadAccess: [, __expectBoolean, `allowsPublicReadAccess`], + AllowsPublicWriteAccess: [, __expectBoolean, `allowsPublicWriteAccess`], + }) as any; }; /** * deserializeAws_restJson1AccessKeyDetails */ const de_AccessKeyDetails = (output: any, context: __SerdeContext): AccessKeyDetails => { - return { - AccessKeyId: __expectString(output.accessKeyId), - PrincipalId: __expectString(output.principalId), - UserName: __expectString(output.userName), - UserType: __expectString(output.userType), - } as any; + return take(output, { + AccessKeyId: [, __expectString, `accessKeyId`], + PrincipalId: [, __expectString, `principalId`], + UserName: [, __expectString, `userName`], + UserType: [, __expectString, `userType`], + }) as any; }; /** * deserializeAws_restJson1AccountFreeTrialInfo */ const de_AccountFreeTrialInfo = (output: any, context: __SerdeContext): AccountFreeTrialInfo => { - return { - AccountId: __expectString(output.accountId), - DataSources: output.dataSources != null ? de_DataSourcesFreeTrial(output.dataSources, context) : undefined, - Features: output.features != null ? de_FreeTrialFeatureConfigurationsResults(output.features, context) : undefined, - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + DataSources: (_) => [, de_DataSourcesFreeTrial(_, context), `dataSources`], + Features: (_) => [, de_FreeTrialFeatureConfigurationsResults(_, context), `features`], + }) as any; }; /** @@ -6535,9 +6346,6 @@ const de_AccountFreeTrialInfos = (output: any, context: __SerdeContext): Account const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccountFreeTrialInfo(entry, context); }); return retVal; @@ -6547,56 +6355,44 @@ const de_AccountFreeTrialInfos = (output: any, context: __SerdeContext): Account * deserializeAws_restJson1AccountLevelPermissions */ const de_AccountLevelPermissions = (output: any, context: __SerdeContext): AccountLevelPermissions => { - return { - BlockPublicAccess: - output.blockPublicAccess != null ? de_BlockPublicAccess(output.blockPublicAccess, context) : undefined, - } as any; + return take(output, { + BlockPublicAccess: (_) => [, de_BlockPublicAccess(_, context), `blockPublicAccess`], + }) as any; }; /** * deserializeAws_restJson1Action */ const de_Action = (output: any, context: __SerdeContext): Action => { - return { - ActionType: __expectString(output.actionType), - AwsApiCallAction: - output.awsApiCallAction != null ? de_AwsApiCallAction(output.awsApiCallAction, context) : undefined, - DnsRequestAction: - output.dnsRequestAction != null ? de_DnsRequestAction(output.dnsRequestAction, context) : undefined, - KubernetesApiCallAction: - output.kubernetesApiCallAction != null - ? de_KubernetesApiCallAction(output.kubernetesApiCallAction, context) - : undefined, - NetworkConnectionAction: - output.networkConnectionAction != null - ? de_NetworkConnectionAction(output.networkConnectionAction, context) - : undefined, - PortProbeAction: output.portProbeAction != null ? de_PortProbeAction(output.portProbeAction, context) : undefined, - RdsLoginAttemptAction: - output.rdsLoginAttemptAction != null - ? de_RdsLoginAttemptAction(output.rdsLoginAttemptAction, context) - : undefined, - } as any; + return take(output, { + ActionType: [, __expectString, `actionType`], + AwsApiCallAction: (_) => [, de_AwsApiCallAction(_, context), `awsApiCallAction`], + DnsRequestAction: (_) => [, de_DnsRequestAction(_, context), `dnsRequestAction`], + KubernetesApiCallAction: (_) => [, de_KubernetesApiCallAction(_, context), `kubernetesApiCallAction`], + NetworkConnectionAction: (_) => [, de_NetworkConnectionAction(_, context), `networkConnectionAction`], + PortProbeAction: (_) => [, de_PortProbeAction(_, context), `portProbeAction`], + RdsLoginAttemptAction: (_) => [, de_RdsLoginAttemptAction(_, context), `rdsLoginAttemptAction`], + }) as any; }; /** * deserializeAws_restJson1AddonDetails */ const de_AddonDetails = (output: any, context: __SerdeContext): AddonDetails => { - return { - AddonStatus: __expectString(output.addonStatus), - AddonVersion: __expectString(output.addonVersion), - } as any; + return take(output, { + AddonStatus: [, __expectString, `addonStatus`], + AddonVersion: [, __expectString, `addonVersion`], + }) as any; }; /** * deserializeAws_restJson1AdminAccount */ const de_AdminAccount = (output: any, context: __SerdeContext): AdminAccount => { - return { - AdminAccountId: __expectString(output.adminAccountId), - AdminStatus: __expectString(output.adminStatus), - } as any; + return take(output, { + AdminAccountId: [, __expectString, `adminAccountId`], + AdminStatus: [, __expectString, `adminStatus`], + }) as any; }; /** @@ -6606,9 +6402,6 @@ const de_AdminAccounts = (output: any, context: __SerdeContext): AdminAccount[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AdminAccount(entry, context); }); return retVal; @@ -6618,132 +6411,117 @@ const de_AdminAccounts = (output: any, context: __SerdeContext): AdminAccount[] * deserializeAws_restJson1Administrator */ const de_Administrator = (output: any, context: __SerdeContext): Administrator => { - return { - AccountId: __expectString(output.accountId), - InvitationId: __expectString(output.invitationId), - InvitedAt: __expectString(output.invitedAt), - RelationshipStatus: __expectString(output.relationshipStatus), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + InvitationId: [, __expectString, `invitationId`], + InvitedAt: [, __expectString, `invitedAt`], + RelationshipStatus: [, __expectString, `relationshipStatus`], + }) as any; }; -/** - * deserializeAws_restJson1AffectedResources - */ -const de_AffectedResources = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AffectedResources omitted. /** * deserializeAws_restJson1AwsApiCallAction */ const de_AwsApiCallAction = (output: any, context: __SerdeContext): AwsApiCallAction => { - return { - AffectedResources: - output.affectedResources != null ? de_AffectedResources(output.affectedResources, context) : undefined, - Api: __expectString(output.api), - CallerType: __expectString(output.callerType), - DomainDetails: output.domainDetails != null ? de_DomainDetails(output.domainDetails, context) : undefined, - ErrorCode: __expectString(output.errorCode), - RemoteAccountDetails: - output.remoteAccountDetails != null ? de_RemoteAccountDetails(output.remoteAccountDetails, context) : undefined, - RemoteIpDetails: output.remoteIpDetails != null ? de_RemoteIpDetails(output.remoteIpDetails, context) : undefined, - ServiceName: __expectString(output.serviceName), - UserAgent: __expectString(output.userAgent), - } as any; + return take(output, { + AffectedResources: [, _json, `affectedResources`], + Api: [, __expectString, `api`], + CallerType: [, __expectString, `callerType`], + DomainDetails: (_) => [, de_DomainDetails(_, context), `domainDetails`], + ErrorCode: [, __expectString, `errorCode`], + RemoteAccountDetails: (_) => [, de_RemoteAccountDetails(_, context), `remoteAccountDetails`], + RemoteIpDetails: (_) => [, de_RemoteIpDetails(_, context), `remoteIpDetails`], + ServiceName: [, __expectString, `serviceName`], + UserAgent: [, __expectString, `userAgent`], + }) as any; }; /** * deserializeAws_restJson1BlockPublicAccess */ const de_BlockPublicAccess = (output: any, context: __SerdeContext): BlockPublicAccess => { - return { - BlockPublicAcls: __expectBoolean(output.blockPublicAcls), - BlockPublicPolicy: __expectBoolean(output.blockPublicPolicy), - IgnorePublicAcls: __expectBoolean(output.ignorePublicAcls), - RestrictPublicBuckets: __expectBoolean(output.restrictPublicBuckets), - } as any; + return take(output, { + BlockPublicAcls: [, __expectBoolean, `blockPublicAcls`], + BlockPublicPolicy: [, __expectBoolean, `blockPublicPolicy`], + IgnorePublicAcls: [, __expectBoolean, `ignorePublicAcls`], + RestrictPublicBuckets: [, __expectBoolean, `restrictPublicBuckets`], + }) as any; }; /** * deserializeAws_restJson1BucketLevelPermissions */ const de_BucketLevelPermissions = (output: any, context: __SerdeContext): BucketLevelPermissions => { - return { - AccessControlList: - output.accessControlList != null ? de_AccessControlList(output.accessControlList, context) : undefined, - BlockPublicAccess: - output.blockPublicAccess != null ? de_BlockPublicAccess(output.blockPublicAccess, context) : undefined, - BucketPolicy: output.bucketPolicy != null ? de_BucketPolicy(output.bucketPolicy, context) : undefined, - } as any; + return take(output, { + AccessControlList: (_) => [, de_AccessControlList(_, context), `accessControlList`], + BlockPublicAccess: (_) => [, de_BlockPublicAccess(_, context), `blockPublicAccess`], + BucketPolicy: (_) => [, de_BucketPolicy(_, context), `bucketPolicy`], + }) as any; }; /** * deserializeAws_restJson1BucketPolicy */ const de_BucketPolicy = (output: any, context: __SerdeContext): BucketPolicy => { - return { - AllowsPublicReadAccess: __expectBoolean(output.allowsPublicReadAccess), - AllowsPublicWriteAccess: __expectBoolean(output.allowsPublicWriteAccess), - } as any; + return take(output, { + AllowsPublicReadAccess: [, __expectBoolean, `allowsPublicReadAccess`], + AllowsPublicWriteAccess: [, __expectBoolean, `allowsPublicWriteAccess`], + }) as any; }; /** * deserializeAws_restJson1City */ const de_City = (output: any, context: __SerdeContext): City => { - return { - CityName: __expectString(output.cityName), - } as any; + return take(output, { + CityName: [, __expectString, `cityName`], + }) as any; }; /** * deserializeAws_restJson1CloudTrailConfigurationResult */ const de_CloudTrailConfigurationResult = (output: any, context: __SerdeContext): CloudTrailConfigurationResult => { - return { - Status: __expectString(output.status), - } as any; + return take(output, { + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1Condition */ const de_Condition = (output: any, context: __SerdeContext): Condition => { - return { - Eq: output.eq != null ? de_Eq(output.eq, context) : undefined, - Equals: output.equals != null ? de_Equals(output.equals, context) : undefined, - GreaterThan: __expectLong(output.greaterThan), - GreaterThanOrEqual: __expectLong(output.greaterThanOrEqual), - Gt: __expectInt32(output.gt), - Gte: __expectInt32(output.gte), - LessThan: __expectLong(output.lessThan), - LessThanOrEqual: __expectLong(output.lessThanOrEqual), - Lt: __expectInt32(output.lt), - Lte: __expectInt32(output.lte), - Neq: output.neq != null ? de_Neq(output.neq, context) : undefined, - NotEquals: output.notEquals != null ? de_NotEquals(output.notEquals, context) : undefined, - } as any; + return take(output, { + Eq: [, _json, `eq`], + Equals: [, _json, `equals`], + GreaterThan: [, __expectLong, `greaterThan`], + GreaterThanOrEqual: [, __expectLong, `greaterThanOrEqual`], + Gt: [, __expectInt32, `gt`], + Gte: [, __expectInt32, `gte`], + LessThan: [, __expectLong, `lessThan`], + LessThanOrEqual: [, __expectLong, `lessThanOrEqual`], + Lt: [, __expectInt32, `lt`], + Lte: [, __expectInt32, `lte`], + Neq: [, _json, `neq`], + NotEquals: [, _json, `notEquals`], + }) as any; }; /** * deserializeAws_restJson1Container */ const de_Container = (output: any, context: __SerdeContext): Container => { - return { - ContainerRuntime: __expectString(output.containerRuntime), - Id: __expectString(output.id), - Image: __expectString(output.image), - ImagePrefix: __expectString(output.imagePrefix), - Name: __expectString(output.name), - SecurityContext: output.securityContext != null ? de_SecurityContext(output.securityContext, context) : undefined, - VolumeMounts: output.volumeMounts != null ? de_VolumeMounts(output.volumeMounts, context) : undefined, - } as any; + return take(output, { + ContainerRuntime: [, __expectString, `containerRuntime`], + Id: [, __expectString, `id`], + Image: [, __expectString, `image`], + ImagePrefix: [, __expectString, `imagePrefix`], + Name: [, __expectString, `name`], + SecurityContext: (_) => [, de_SecurityContext(_, context), `securityContext`], + VolumeMounts: (_) => [, de_VolumeMounts(_, context), `volumeMounts`], + }) as any; }; /** @@ -6753,101 +6531,62 @@ const de_Containers = (output: any, context: __SerdeContext): Container[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Container(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CountByCoverageStatus - */ -const de_CountByCoverageStatus = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [CoverageStatus | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; +// de_CountByCoverageStatus omitted. -/** - * deserializeAws_restJson1CountByResourceType - */ -const de_CountByResourceType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [ResourceType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectLong(value) as any; - return acc; - }, {}); -}; +// de_CountByResourceType omitted. -/** - * deserializeAws_restJson1CountBySeverity - */ -const de_CountBySeverity = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_CountBySeverity omitted. /** * deserializeAws_restJson1Country */ const de_Country = (output: any, context: __SerdeContext): Country => { - return { - CountryCode: __expectString(output.countryCode), - CountryName: __expectString(output.countryName), - } as any; + return take(output, { + CountryCode: [, __expectString, `countryCode`], + CountryName: [, __expectString, `countryName`], + }) as any; }; /** * deserializeAws_restJson1CoverageEksClusterDetails */ const de_CoverageEksClusterDetails = (output: any, context: __SerdeContext): CoverageEksClusterDetails => { - return { - AddonDetails: output.addonDetails != null ? de_AddonDetails(output.addonDetails, context) : undefined, - ClusterName: __expectString(output.clusterName), - CompatibleNodes: __expectLong(output.compatibleNodes), - CoveredNodes: __expectLong(output.coveredNodes), - } as any; + return take(output, { + AddonDetails: (_) => [, de_AddonDetails(_, context), `addonDetails`], + ClusterName: [, __expectString, `clusterName`], + CompatibleNodes: [, __expectLong, `compatibleNodes`], + CoveredNodes: [, __expectLong, `coveredNodes`], + }) as any; }; /** * deserializeAws_restJson1CoverageResource */ const de_CoverageResource = (output: any, context: __SerdeContext): CoverageResource => { - return { - AccountId: __expectString(output.accountId), - CoverageStatus: __expectString(output.coverageStatus), - DetectorId: __expectString(output.detectorId), - Issue: __expectString(output.issue), - ResourceDetails: - output.resourceDetails != null ? de_CoverageResourceDetails(output.resourceDetails, context) : undefined, - ResourceId: __expectString(output.resourceId), - UpdatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + CoverageStatus: [, __expectString, `coverageStatus`], + DetectorId: [, __expectString, `detectorId`], + Issue: [, __expectString, `issue`], + ResourceDetails: (_) => [, de_CoverageResourceDetails(_, context), `resourceDetails`], + ResourceId: [, __expectString, `resourceId`], + UpdatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `updatedAt`], + }) as any; }; /** * deserializeAws_restJson1CoverageResourceDetails */ const de_CoverageResourceDetails = (output: any, context: __SerdeContext): CoverageResourceDetails => { - return { - EksClusterDetails: - output.eksClusterDetails != null ? de_CoverageEksClusterDetails(output.eksClusterDetails, context) : undefined, - ResourceType: __expectString(output.resourceType), - } as any; + return take(output, { + EksClusterDetails: (_) => [, de_CoverageEksClusterDetails(_, context), `eksClusterDetails`], + ResourceType: [, __expectString, `resourceType`], + }) as any; }; /** @@ -6857,9 +6596,6 @@ const de_CoverageResources = (output: any, context: __SerdeContext): CoverageRes const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CoverageResource(entry, context); }); return retVal; @@ -6869,14 +6605,10 @@ const de_CoverageResources = (output: any, context: __SerdeContext): CoverageRes * deserializeAws_restJson1CoverageStatistics */ const de_CoverageStatistics = (output: any, context: __SerdeContext): CoverageStatistics => { - return { - CountByCoverageStatus: - output.countByCoverageStatus != null - ? de_CountByCoverageStatus(output.countByCoverageStatus, context) - : undefined, - CountByResourceType: - output.countByResourceType != null ? de_CountByResourceType(output.countByResourceType, context) : undefined, - } as any; + return take(output, { + CountByCoverageStatus: [, _json, `countByCoverageStatus`], + CountByResourceType: [, _json, `countByResourceType`], + }) as any; }; /** @@ -6896,74 +6628,68 @@ const de_Criterion = (output: any, context: __SerdeContext): Record { - return { - CloudTrail: output.cloudTrail != null ? de_CloudTrailConfigurationResult(output.cloudTrail, context) : undefined, - DNSLogs: output.dnsLogs != null ? de_DNSLogsConfigurationResult(output.dnsLogs, context) : undefined, - FlowLogs: output.flowLogs != null ? de_FlowLogsConfigurationResult(output.flowLogs, context) : undefined, - Kubernetes: output.kubernetes != null ? de_KubernetesConfigurationResult(output.kubernetes, context) : undefined, - MalwareProtection: - output.malwareProtection != null - ? de_MalwareProtectionConfigurationResult(output.malwareProtection, context) - : undefined, - S3Logs: output.s3Logs != null ? de_S3LogsConfigurationResult(output.s3Logs, context) : undefined, - } as any; + return take(output, { + CloudTrail: (_) => [, de_CloudTrailConfigurationResult(_, context), `cloudTrail`], + DNSLogs: (_) => [, de_DNSLogsConfigurationResult(_, context), `dnsLogs`], + FlowLogs: (_) => [, de_FlowLogsConfigurationResult(_, context), `flowLogs`], + Kubernetes: (_) => [, de_KubernetesConfigurationResult(_, context), `kubernetes`], + MalwareProtection: (_) => [, de_MalwareProtectionConfigurationResult(_, context), `malwareProtection`], + S3Logs: (_) => [, de_S3LogsConfigurationResult(_, context), `s3Logs`], + }) as any; }; /** * deserializeAws_restJson1DataSourceFreeTrial */ const de_DataSourceFreeTrial = (output: any, context: __SerdeContext): DataSourceFreeTrial => { - return { - FreeTrialDaysRemaining: __expectInt32(output.freeTrialDaysRemaining), - } as any; + return take(output, { + FreeTrialDaysRemaining: [, __expectInt32, `freeTrialDaysRemaining`], + }) as any; }; /** * deserializeAws_restJson1DataSourcesFreeTrial */ const de_DataSourcesFreeTrial = (output: any, context: __SerdeContext): DataSourcesFreeTrial => { - return { - CloudTrail: output.cloudTrail != null ? de_DataSourceFreeTrial(output.cloudTrail, context) : undefined, - DnsLogs: output.dnsLogs != null ? de_DataSourceFreeTrial(output.dnsLogs, context) : undefined, - FlowLogs: output.flowLogs != null ? de_DataSourceFreeTrial(output.flowLogs, context) : undefined, - Kubernetes: output.kubernetes != null ? de_KubernetesDataSourceFreeTrial(output.kubernetes, context) : undefined, - MalwareProtection: - output.malwareProtection != null - ? de_MalwareProtectionDataSourceFreeTrial(output.malwareProtection, context) - : undefined, - S3Logs: output.s3Logs != null ? de_DataSourceFreeTrial(output.s3Logs, context) : undefined, - } as any; + return take(output, { + CloudTrail: (_) => [, de_DataSourceFreeTrial(_, context), `cloudTrail`], + DnsLogs: (_) => [, de_DataSourceFreeTrial(_, context), `dnsLogs`], + FlowLogs: (_) => [, de_DataSourceFreeTrial(_, context), `flowLogs`], + Kubernetes: (_) => [, de_KubernetesDataSourceFreeTrial(_, context), `kubernetes`], + MalwareProtection: (_) => [, de_MalwareProtectionDataSourceFreeTrial(_, context), `malwareProtection`], + S3Logs: (_) => [, de_DataSourceFreeTrial(_, context), `s3Logs`], + }) as any; }; /** * deserializeAws_restJson1DefaultServerSideEncryption */ const de_DefaultServerSideEncryption = (output: any, context: __SerdeContext): DefaultServerSideEncryption => { - return { - EncryptionType: __expectString(output.encryptionType), - KmsMasterKeyArn: __expectString(output.kmsMasterKeyArn), - } as any; + return take(output, { + EncryptionType: [, __expectString, `encryptionType`], + KmsMasterKeyArn: [, __expectString, `kmsMasterKeyArn`], + }) as any; }; /** * deserializeAws_restJson1Destination */ const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - DestinationId: __expectString(output.destinationId), - DestinationType: __expectString(output.destinationType), - Status: __expectString(output.status), - } as any; + return take(output, { + DestinationId: [, __expectString, `destinationId`], + DestinationType: [, __expectString, `destinationType`], + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1DestinationProperties */ const de_DestinationProperties = (output: any, context: __SerdeContext): DestinationProperties => { - return { - DestinationArn: __expectString(output.destinationArn), - KmsKeyArn: __expectString(output.kmsKeyArn), - } as any; + return take(output, { + DestinationArn: [, __expectString, `destinationArn`], + KmsKeyArn: [, __expectString, `kmsKeyArn`], + }) as any; }; /** @@ -6973,9 +6699,6 @@ const de_Destinations = (output: any, context: __SerdeContext): Destination[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Destination(entry, context); }); return retVal; @@ -6988,12 +6711,11 @@ const de_DetectorAdditionalConfigurationResult = ( output: any, context: __SerdeContext ): DetectorAdditionalConfigurationResult => { - return { - Name: __expectString(output.name), - Status: __expectString(output.status), - UpdatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + UpdatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `updatedAt`], + }) as any; }; /** @@ -7006,9 +6728,6 @@ const de_DetectorAdditionalConfigurationResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DetectorAdditionalConfigurationResult(entry, context); }); return retVal; @@ -7021,16 +6740,16 @@ const de_DetectorFeatureConfigurationResult = ( output: any, context: __SerdeContext ): DetectorFeatureConfigurationResult => { - return { - AdditionalConfiguration: - output.additionalConfiguration != null - ? de_DetectorAdditionalConfigurationResults(output.additionalConfiguration, context) - : undefined, - Name: __expectString(output.name), - Status: __expectString(output.status), - UpdatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + AdditionalConfiguration: (_) => [ + , + de_DetectorAdditionalConfigurationResults(_, context), + `additionalConfiguration`, + ], + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + UpdatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `updatedAt`], + }) as any; }; /** @@ -7043,191 +6762,135 @@ const de_DetectorFeatureConfigurationsResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DetectorFeatureConfigurationResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DetectorIds - */ -const de_DetectorIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DetectorIds omitted. /** * deserializeAws_restJson1DNSLogsConfigurationResult */ const de_DNSLogsConfigurationResult = (output: any, context: __SerdeContext): DNSLogsConfigurationResult => { - return { - Status: __expectString(output.status), - } as any; + return take(output, { + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1DnsRequestAction */ const de_DnsRequestAction = (output: any, context: __SerdeContext): DnsRequestAction => { - return { - Blocked: __expectBoolean(output.blocked), - Domain: __expectString(output.domain), - Protocol: __expectString(output.protocol), - } as any; + return take(output, { + Blocked: [, __expectBoolean, `blocked`], + Domain: [, __expectString, `domain`], + Protocol: [, __expectString, `protocol`], + }) as any; }; /** * deserializeAws_restJson1DomainDetails */ const de_DomainDetails = (output: any, context: __SerdeContext): DomainDetails => { - return { - Domain: __expectString(output.domain), - } as any; + return take(output, { + Domain: [, __expectString, `domain`], + }) as any; }; /** * deserializeAws_restJson1EbsVolumeDetails */ const de_EbsVolumeDetails = (output: any, context: __SerdeContext): EbsVolumeDetails => { - return { - ScannedVolumeDetails: - output.scannedVolumeDetails != null ? de_VolumeDetails(output.scannedVolumeDetails, context) : undefined, - SkippedVolumeDetails: - output.skippedVolumeDetails != null ? de_VolumeDetails(output.skippedVolumeDetails, context) : undefined, - } as any; + return take(output, { + ScannedVolumeDetails: (_) => [, de_VolumeDetails(_, context), `scannedVolumeDetails`], + SkippedVolumeDetails: (_) => [, de_VolumeDetails(_, context), `skippedVolumeDetails`], + }) as any; }; /** * deserializeAws_restJson1EbsVolumeScanDetails */ const de_EbsVolumeScanDetails = (output: any, context: __SerdeContext): EbsVolumeScanDetails => { - return { - ScanCompletedAt: - output.scanCompletedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scanCompletedAt))) - : undefined, - ScanDetections: output.scanDetections != null ? de_ScanDetections(output.scanDetections, context) : undefined, - ScanId: __expectString(output.scanId), - ScanStartedAt: - output.scanStartedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scanStartedAt))) - : undefined, - Sources: output.sources != null ? de_Sources(output.sources, context) : undefined, - TriggerFindingId: __expectString(output.triggerFindingId), - } as any; + return take(output, { + ScanCompletedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `scanCompletedAt`], + ScanDetections: (_) => [, de_ScanDetections(_, context), `scanDetections`], + ScanId: [, __expectString, `scanId`], + ScanStartedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `scanStartedAt`], + Sources: [, _json, `sources`], + TriggerFindingId: [, __expectString, `triggerFindingId`], + }) as any; }; /** * deserializeAws_restJson1EbsVolumesResult */ const de_EbsVolumesResult = (output: any, context: __SerdeContext): EbsVolumesResult => { - return { - Reason: __expectString(output.reason), - Status: __expectString(output.status), - } as any; + return take(output, { + Reason: [, __expectString, `reason`], + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1EcsClusterDetails */ const de_EcsClusterDetails = (output: any, context: __SerdeContext): EcsClusterDetails => { - return { - ActiveServicesCount: __expectInt32(output.activeServicesCount), - Arn: __expectString(output.arn), - Name: __expectString(output.name), - RegisteredContainerInstancesCount: __expectInt32(output.registeredContainerInstancesCount), - RunningTasksCount: __expectInt32(output.runningTasksCount), - Status: __expectString(output.status), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - TaskDetails: output.taskDetails != null ? de_EcsTaskDetails(output.taskDetails, context) : undefined, - } as any; + return take(output, { + ActiveServicesCount: [, __expectInt32, `activeServicesCount`], + Arn: [, __expectString, `arn`], + Name: [, __expectString, `name`], + RegisteredContainerInstancesCount: [, __expectInt32, `registeredContainerInstancesCount`], + RunningTasksCount: [, __expectInt32, `runningTasksCount`], + Status: [, __expectString, `status`], + Tags: (_) => [, de_Tags(_, context), `tags`], + TaskDetails: (_) => [, de_EcsTaskDetails(_, context), `taskDetails`], + }) as any; }; /** * deserializeAws_restJson1EcsTaskDetails */ const de_EcsTaskDetails = (output: any, context: __SerdeContext): EcsTaskDetails => { - return { - Arn: __expectString(output.arn), - Containers: output.containers != null ? de_Containers(output.containers, context) : undefined, - DefinitionArn: __expectString(output.definitionArn), - Group: __expectString(output.group), - StartedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - StartedBy: __expectString(output.startedBy), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - TaskCreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - Version: __expectString(output.version), - Volumes: output.volumes != null ? de_Volumes(output.volumes, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Containers: (_) => [, de_Containers(_, context), `containers`], + DefinitionArn: [, __expectString, `definitionArn`], + Group: [, __expectString, `group`], + StartedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `startedAt`], + StartedBy: [, __expectString, `startedBy`], + Tags: (_) => [, de_Tags(_, context), `tags`], + TaskCreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + Version: [, __expectString, `version`], + Volumes: (_) => [, de_Volumes(_, context), `volumes`], + }) as any; }; /** * deserializeAws_restJson1EksClusterDetails */ const de_EksClusterDetails = (output: any, context: __SerdeContext): EksClusterDetails => { - return { - Arn: __expectString(output.arn), - CreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - Name: __expectString(output.name), - Status: __expectString(output.status), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - VpcId: __expectString(output.vpcId), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + Tags: (_) => [, de_Tags(_, context), `tags`], + VpcId: [, __expectString, `vpcId`], + }) as any; }; -/** - * deserializeAws_restJson1Eq - */ -const de_Eq = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Eq omitted. -/** - * deserializeAws_restJson1Equals - */ -const de_Equals = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Equals omitted. /** * deserializeAws_restJson1Evidence */ const de_Evidence = (output: any, context: __SerdeContext): Evidence => { - return { - ThreatIntelligenceDetails: - output.threatIntelligenceDetails != null - ? de_ThreatIntelligenceDetails(output.threatIntelligenceDetails, context) - : undefined, - } as any; + return take(output, { + ThreatIntelligenceDetails: (_) => [, de_ThreatIntelligenceDetails(_, context), `threatIntelligenceDetails`], + }) as any; }; /** @@ -7237,75 +6900,46 @@ const de_FilePaths = (output: any, context: __SerdeContext): ScanFilePath[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScanFilePath(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FilterNames - */ -const de_FilterNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FilterNames omitted. /** * deserializeAws_restJson1Finding */ const de_Finding = (output: any, context: __SerdeContext): Finding => { - return { - AccountId: __expectString(output.accountId), - Arn: __expectString(output.arn), - Confidence: __limitedParseDouble(output.confidence), - CreatedAt: __expectString(output.createdAt), - Description: __expectString(output.description), - Id: __expectString(output.id), - Partition: __expectString(output.partition), - Region: __expectString(output.region), - Resource: output.resource != null ? de_Resource(output.resource, context) : undefined, - SchemaVersion: __expectString(output.schemaVersion), - Service: output.service != null ? de_Service(output.service, context) : undefined, - Severity: __limitedParseDouble(output.severity), - Title: __expectString(output.title), - Type: __expectString(output.type), - UpdatedAt: __expectString(output.updatedAt), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + Arn: [, __expectString, `arn`], + Confidence: [, __limitedParseDouble, `confidence`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + Id: [, __expectString, `id`], + Partition: [, __expectString, `partition`], + Region: [, __expectString, `region`], + Resource: (_) => [, de_Resource(_, context), `resource`], + SchemaVersion: [, __expectString, `schemaVersion`], + Service: (_) => [, de_Service(_, context), `service`], + Severity: [, __limitedParseDouble, `severity`], + Title: [, __expectString, `title`], + Type: [, __expectString, `type`], + UpdatedAt: [, __expectString, `updatedAt`], + }) as any; }; /** * deserializeAws_restJson1FindingCriteria */ const de_FindingCriteria = (output: any, context: __SerdeContext): FindingCriteria => { - return { - Criterion: output.criterion != null ? de_Criterion(output.criterion, context) : undefined, - } as any; + return take(output, { + Criterion: (_) => [, de_Criterion(_, context), `criterion`], + }) as any; }; -/** - * deserializeAws_restJson1FindingIds - */ -const de_FindingIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FindingIds omitted. /** * deserializeAws_restJson1Findings @@ -7314,9 +6948,6 @@ const de_Findings = (output: any, context: __SerdeContext): Finding[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Finding(entry, context); }); return retVal; @@ -7326,33 +6957,20 @@ const de_Findings = (output: any, context: __SerdeContext): Finding[] => { * deserializeAws_restJson1FindingStatistics */ const de_FindingStatistics = (output: any, context: __SerdeContext): FindingStatistics => { - return { - CountBySeverity: output.countBySeverity != null ? de_CountBySeverity(output.countBySeverity, context) : undefined, - } as any; + return take(output, { + CountBySeverity: [, _json, `countBySeverity`], + }) as any; }; -/** - * deserializeAws_restJson1FlagsList - */ -const de_FlagsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FlagsList omitted. /** * deserializeAws_restJson1FlowLogsConfigurationResult */ const de_FlowLogsConfigurationResult = (output: any, context: __SerdeContext): FlowLogsConfigurationResult => { - return { - Status: __expectString(output.status), - } as any; + return take(output, { + Status: [, __expectString, `status`], + }) as any; }; /** @@ -7362,10 +6980,10 @@ const de_FreeTrialFeatureConfigurationResult = ( output: any, context: __SerdeContext ): FreeTrialFeatureConfigurationResult => { - return { - FreeTrialDaysRemaining: __expectInt32(output.freeTrialDaysRemaining), - Name: __expectString(output.name), - } as any; + return take(output, { + FreeTrialDaysRemaining: [, __expectInt32, `freeTrialDaysRemaining`], + Name: [, __expectString, `name`], + }) as any; }; /** @@ -7378,9 +6996,6 @@ const de_FreeTrialFeatureConfigurationsResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FreeTrialFeatureConfigurationResult(entry, context); }); return retVal; @@ -7390,90 +7005,75 @@ const de_FreeTrialFeatureConfigurationsResults = ( * deserializeAws_restJson1GeoLocation */ const de_GeoLocation = (output: any, context: __SerdeContext): GeoLocation => { - return { - Lat: __limitedParseDouble(output.lat), - Lon: __limitedParseDouble(output.lon), - } as any; + return take(output, { + Lat: [, __limitedParseDouble, `lat`], + Lon: [, __limitedParseDouble, `lon`], + }) as any; }; -/** - * deserializeAws_restJson1Groups - */ -const de_Groups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Groups omitted. /** * deserializeAws_restJson1HighestSeverityThreatDetails */ const de_HighestSeverityThreatDetails = (output: any, context: __SerdeContext): HighestSeverityThreatDetails => { - return { - Count: __expectInt32(output.count), - Severity: __expectString(output.severity), - ThreatName: __expectString(output.threatName), - } as any; + return take(output, { + Count: [, __expectInt32, `count`], + Severity: [, __expectString, `severity`], + ThreatName: [, __expectString, `threatName`], + }) as any; }; /** * deserializeAws_restJson1HostPath */ const de_HostPath = (output: any, context: __SerdeContext): HostPath => { - return { - Path: __expectString(output.path), - } as any; + return take(output, { + Path: [, __expectString, `path`], + }) as any; }; /** * deserializeAws_restJson1IamInstanceProfile */ const de_IamInstanceProfile = (output: any, context: __SerdeContext): IamInstanceProfile => { - return { - Arn: __expectString(output.arn), - Id: __expectString(output.id), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Id: [, __expectString, `id`], + }) as any; }; /** * deserializeAws_restJson1InstanceDetails */ const de_InstanceDetails = (output: any, context: __SerdeContext): InstanceDetails => { - return { - AvailabilityZone: __expectString(output.availabilityZone), - IamInstanceProfile: - output.iamInstanceProfile != null ? de_IamInstanceProfile(output.iamInstanceProfile, context) : undefined, - ImageDescription: __expectString(output.imageDescription), - ImageId: __expectString(output.imageId), - InstanceId: __expectString(output.instanceId), - InstanceState: __expectString(output.instanceState), - InstanceType: __expectString(output.instanceType), - LaunchTime: __expectString(output.launchTime), - NetworkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - OutpostArn: __expectString(output.outpostArn), - Platform: __expectString(output.platform), - ProductCodes: output.productCodes != null ? de_ProductCodes(output.productCodes, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + AvailabilityZone: [, __expectString, `availabilityZone`], + IamInstanceProfile: (_) => [, de_IamInstanceProfile(_, context), `iamInstanceProfile`], + ImageDescription: [, __expectString, `imageDescription`], + ImageId: [, __expectString, `imageId`], + InstanceId: [, __expectString, `instanceId`], + InstanceState: [, __expectString, `instanceState`], + InstanceType: [, __expectString, `instanceType`], + LaunchTime: [, __expectString, `launchTime`], + NetworkInterfaces: (_) => [, de_NetworkInterfaces(_, context), `networkInterfaces`], + OutpostArn: [, __expectString, `outpostArn`], + Platform: [, __expectString, `platform`], + ProductCodes: (_) => [, de_ProductCodes(_, context), `productCodes`], + Tags: (_) => [, de_Tags(_, context), `tags`], + }) as any; }; /** * deserializeAws_restJson1Invitation */ const de_Invitation = (output: any, context: __SerdeContext): Invitation => { - return { - AccountId: __expectString(output.accountId), - InvitationId: __expectString(output.invitationId), - InvitedAt: __expectString(output.invitedAt), - RelationshipStatus: __expectString(output.relationshipStatus), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + InvitationId: [, __expectString, `invitationId`], + InvitedAt: [, __expectString, `invitedAt`], + RelationshipStatus: [, __expectString, `relationshipStatus`], + }) as any; }; /** @@ -7483,57 +7083,28 @@ const de_Invitations = (output: any, context: __SerdeContext): Invitation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Invitation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IpSetIds - */ -const de_IpSetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpSetIds omitted. -/** - * deserializeAws_restJson1Ipv6Addresses - */ -const de_Ipv6Addresses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Ipv6Addresses omitted. /** * deserializeAws_restJson1KubernetesApiCallAction */ const de_KubernetesApiCallAction = (output: any, context: __SerdeContext): KubernetesApiCallAction => { - return { - Parameters: __expectString(output.parameters), - RemoteIpDetails: output.remoteIpDetails != null ? de_RemoteIpDetails(output.remoteIpDetails, context) : undefined, - RequestUri: __expectString(output.requestUri), - SourceIps: output.sourceIps != null ? de_SourceIps(output.sourceIps, context) : undefined, - StatusCode: __expectInt32(output.statusCode), - UserAgent: __expectString(output.userAgent), - Verb: __expectString(output.verb), - } as any; + return take(output, { + Parameters: [, __expectString, `parameters`], + RemoteIpDetails: (_) => [, de_RemoteIpDetails(_, context), `remoteIpDetails`], + RequestUri: [, __expectString, `requestUri`], + SourceIps: [, _json, `sourceIps`], + StatusCode: [, __expectInt32, `statusCode`], + UserAgent: [, __expectString, `userAgent`], + Verb: [, __expectString, `verb`], + }) as any; }; /** @@ -7543,70 +7114,63 @@ const de_KubernetesAuditLogsConfigurationResult = ( output: any, context: __SerdeContext ): KubernetesAuditLogsConfigurationResult => { - return { - Status: __expectString(output.status), - } as any; + return take(output, { + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1KubernetesConfigurationResult */ const de_KubernetesConfigurationResult = (output: any, context: __SerdeContext): KubernetesConfigurationResult => { - return { - AuditLogs: - output.auditLogs != null ? de_KubernetesAuditLogsConfigurationResult(output.auditLogs, context) : undefined, - } as any; + return take(output, { + AuditLogs: (_) => [, de_KubernetesAuditLogsConfigurationResult(_, context), `auditLogs`], + }) as any; }; /** * deserializeAws_restJson1KubernetesDataSourceFreeTrial */ const de_KubernetesDataSourceFreeTrial = (output: any, context: __SerdeContext): KubernetesDataSourceFreeTrial => { - return { - AuditLogs: output.auditLogs != null ? de_DataSourceFreeTrial(output.auditLogs, context) : undefined, - } as any; + return take(output, { + AuditLogs: (_) => [, de_DataSourceFreeTrial(_, context), `auditLogs`], + }) as any; }; /** * deserializeAws_restJson1KubernetesDetails */ const de_KubernetesDetails = (output: any, context: __SerdeContext): KubernetesDetails => { - return { - KubernetesUserDetails: - output.kubernetesUserDetails != null - ? de_KubernetesUserDetails(output.kubernetesUserDetails, context) - : undefined, - KubernetesWorkloadDetails: - output.kubernetesWorkloadDetails != null - ? de_KubernetesWorkloadDetails(output.kubernetesWorkloadDetails, context) - : undefined, - } as any; + return take(output, { + KubernetesUserDetails: (_) => [, de_KubernetesUserDetails(_, context), `kubernetesUserDetails`], + KubernetesWorkloadDetails: (_) => [, de_KubernetesWorkloadDetails(_, context), `kubernetesWorkloadDetails`], + }) as any; }; /** * deserializeAws_restJson1KubernetesUserDetails */ const de_KubernetesUserDetails = (output: any, context: __SerdeContext): KubernetesUserDetails => { - return { - Groups: output.groups != null ? de_Groups(output.groups, context) : undefined, - Uid: __expectString(output.uid), - Username: __expectString(output.username), - } as any; + return take(output, { + Groups: [, _json, `groups`], + Uid: [, __expectString, `uid`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1KubernetesWorkloadDetails */ const de_KubernetesWorkloadDetails = (output: any, context: __SerdeContext): KubernetesWorkloadDetails => { - return { - Containers: output.containers != null ? de_Containers(output.containers, context) : undefined, - HostNetwork: __expectBoolean(output.hostNetwork), - Name: __expectString(output.name), - Namespace: __expectString(output.namespace), - Type: __expectString(output.type), - Uid: __expectString(output.uid), - Volumes: output.volumes != null ? de_Volumes(output.volumes, context) : undefined, - } as any; + return take(output, { + Containers: (_) => [, de_Containers(_, context), `containers`], + HostNetwork: [, __expectBoolean, `hostNetwork`], + Name: [, __expectString, `name`], + Namespace: [, __expectString, `namespace`], + Type: [, __expectString, `type`], + Uid: [, __expectString, `uid`], + Volumes: (_) => [, de_Volumes(_, context), `volumes`], + }) as any; }; /** @@ -7616,9 +7180,6 @@ const de_Lineage = (output: any, context: __SerdeContext): LineageObject[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LineageObject(entry, context); }); return retVal; @@ -7628,49 +7189,48 @@ const de_Lineage = (output: any, context: __SerdeContext): LineageObject[] => { * deserializeAws_restJson1LineageObject */ const de_LineageObject = (output: any, context: __SerdeContext): LineageObject => { - return { - Euid: __expectInt32(output.euid), - ExecutablePath: __expectString(output.executablePath), - Name: __expectString(output.name), - NamespacePid: __expectInt32(output.namespacePid), - ParentUuid: __expectString(output.parentUuid), - Pid: __expectInt32(output.pid), - StartTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - UserId: __expectInt32(output.userId), - Uuid: __expectString(output.uuid), - } as any; + return take(output, { + Euid: [, __expectInt32, `euid`], + ExecutablePath: [, __expectString, `executablePath`], + Name: [, __expectString, `name`], + NamespacePid: [, __expectInt32, `namespacePid`], + ParentUuid: [, __expectString, `parentUuid`], + Pid: [, __expectInt32, `pid`], + StartTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `startTime`], + UserId: [, __expectInt32, `userId`], + Uuid: [, __expectString, `uuid`], + }) as any; }; /** * deserializeAws_restJson1LocalIpDetails */ const de_LocalIpDetails = (output: any, context: __SerdeContext): LocalIpDetails => { - return { - IpAddressV4: __expectString(output.ipAddressV4), - } as any; + return take(output, { + IpAddressV4: [, __expectString, `ipAddressV4`], + }) as any; }; /** * deserializeAws_restJson1LocalPortDetails */ const de_LocalPortDetails = (output: any, context: __SerdeContext): LocalPortDetails => { - return { - Port: __expectInt32(output.port), - PortName: __expectString(output.portName), - } as any; + return take(output, { + Port: [, __expectInt32, `port`], + PortName: [, __expectString, `portName`], + }) as any; }; /** * deserializeAws_restJson1LoginAttribute */ const de_LoginAttribute = (output: any, context: __SerdeContext): LoginAttribute => { - return { - Application: __expectString(output.application), - FailedLoginAttempts: __expectInt32(output.failedLoginAttempts), - SuccessfulLoginAttempts: __expectInt32(output.successfulLoginAttempts), - User: __expectString(output.user), - } as any; + return take(output, { + Application: [, __expectString, `application`], + FailedLoginAttempts: [, __expectInt32, `failedLoginAttempts`], + SuccessfulLoginAttempts: [, __expectInt32, `successfulLoginAttempts`], + User: [, __expectString, `user`], + }) as any; }; /** @@ -7680,9 +7240,6 @@ const de_LoginAttributes = (output: any, context: __SerdeContext): LoginAttribut const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LoginAttribute(entry, context); }); return retVal; @@ -7695,13 +7252,14 @@ const de_MalwareProtectionConfigurationResult = ( output: any, context: __SerdeContext ): MalwareProtectionConfigurationResult => { - return { - ScanEc2InstanceWithFindings: - output.scanEc2InstanceWithFindings != null - ? de_ScanEc2InstanceWithFindingsResult(output.scanEc2InstanceWithFindings, context) - : undefined, - ServiceRole: __expectString(output.serviceRole), - } as any; + return take(output, { + ScanEc2InstanceWithFindings: (_) => [ + , + de_ScanEc2InstanceWithFindingsResult(_, context), + `scanEc2InstanceWithFindings`, + ], + ServiceRole: [, __expectString, `serviceRole`], + }) as any; }; /** @@ -7711,12 +7269,9 @@ const de_MalwareProtectionDataSourceFreeTrial = ( output: any, context: __SerdeContext ): MalwareProtectionDataSourceFreeTrial => { - return { - ScanEc2InstanceWithFindings: - output.scanEc2InstanceWithFindings != null - ? de_DataSourceFreeTrial(output.scanEc2InstanceWithFindings, context) - : undefined, - } as any; + return take(output, { + ScanEc2InstanceWithFindings: (_) => [, de_DataSourceFreeTrial(_, context), `scanEc2InstanceWithFindings`], + }) as any; }; /** @@ -7726,9 +7281,6 @@ const de_MapEquals = (output: any, context: __SerdeContext): ScanConditionPair[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScanConditionPair(entry, context); }); return retVal; @@ -7738,28 +7290,28 @@ const de_MapEquals = (output: any, context: __SerdeContext): ScanConditionPair[] * deserializeAws_restJson1Master */ const de_Master = (output: any, context: __SerdeContext): Master => { - return { - AccountId: __expectString(output.accountId), - InvitationId: __expectString(output.invitationId), - InvitedAt: __expectString(output.invitedAt), - RelationshipStatus: __expectString(output.relationshipStatus), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + InvitationId: [, __expectString, `invitationId`], + InvitedAt: [, __expectString, `invitedAt`], + RelationshipStatus: [, __expectString, `relationshipStatus`], + }) as any; }; /** * deserializeAws_restJson1Member */ const de_Member = (output: any, context: __SerdeContext): Member => { - return { - AccountId: __expectString(output.accountId), - AdministratorId: __expectString(output.administratorId), - DetectorId: __expectString(output.detectorId), - Email: __expectString(output.email), - InvitedAt: __expectString(output.invitedAt), - MasterId: __expectString(output.masterId), - RelationshipStatus: __expectString(output.relationshipStatus), - UpdatedAt: __expectString(output.updatedAt), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + AdministratorId: [, __expectString, `administratorId`], + DetectorId: [, __expectString, `detectorId`], + Email: [, __expectString, `email`], + InvitedAt: [, __expectString, `invitedAt`], + MasterId: [, __expectString, `masterId`], + RelationshipStatus: [, __expectString, `relationshipStatus`], + UpdatedAt: [, __expectString, `updatedAt`], + }) as any; }; /** @@ -7769,12 +7321,11 @@ const de_MemberAdditionalConfigurationResult = ( output: any, context: __SerdeContext ): MemberAdditionalConfigurationResult => { - return { - Name: __expectString(output.name), - Status: __expectString(output.status), - UpdatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + UpdatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `updatedAt`], + }) as any; }; /** @@ -7787,9 +7338,6 @@ const de_MemberAdditionalConfigurationResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MemberAdditionalConfigurationResult(entry, context); }); return retVal; @@ -7799,12 +7347,11 @@ const de_MemberAdditionalConfigurationResults = ( * deserializeAws_restJson1MemberDataSourceConfiguration */ const de_MemberDataSourceConfiguration = (output: any, context: __SerdeContext): MemberDataSourceConfiguration => { - return { - AccountId: __expectString(output.accountId), - DataSources: - output.dataSources != null ? de_DataSourceConfigurationsResult(output.dataSources, context) : undefined, - Features: output.features != null ? de_MemberFeaturesConfigurationsResults(output.features, context) : undefined, - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + DataSources: (_) => [, de_DataSourceConfigurationsResult(_, context), `dataSources`], + Features: (_) => [, de_MemberFeaturesConfigurationsResults(_, context), `features`], + }) as any; }; /** @@ -7814,9 +7361,6 @@ const de_MemberDataSourceConfigurations = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MemberDataSourceConfiguration(entry, context); }); return retVal; @@ -7829,16 +7373,12 @@ const de_MemberFeaturesConfigurationResult = ( output: any, context: __SerdeContext ): MemberFeaturesConfigurationResult => { - return { - AdditionalConfiguration: - output.additionalConfiguration != null - ? de_MemberAdditionalConfigurationResults(output.additionalConfiguration, context) - : undefined, - Name: __expectString(output.name), - Status: __expectString(output.status), - UpdatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + AdditionalConfiguration: (_) => [, de_MemberAdditionalConfigurationResults(_, context), `additionalConfiguration`], + Name: [, __expectString, `name`], + Status: [, __expectString, `status`], + UpdatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `updatedAt`], + }) as any; }; /** @@ -7851,9 +7391,6 @@ const de_MemberFeaturesConfigurationsResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MemberFeaturesConfigurationResult(entry, context); }); return retVal; @@ -7866,78 +7403,46 @@ const de_Members = (output: any, context: __SerdeContext): Member[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Member(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MemoryRegionsList - */ -const de_MemoryRegionsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MemoryRegionsList omitted. -/** - * deserializeAws_restJson1Neq - */ -const de_Neq = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Neq omitted. /** * deserializeAws_restJson1NetworkConnectionAction */ const de_NetworkConnectionAction = (output: any, context: __SerdeContext): NetworkConnectionAction => { - return { - Blocked: __expectBoolean(output.blocked), - ConnectionDirection: __expectString(output.connectionDirection), - LocalIpDetails: output.localIpDetails != null ? de_LocalIpDetails(output.localIpDetails, context) : undefined, - LocalPortDetails: - output.localPortDetails != null ? de_LocalPortDetails(output.localPortDetails, context) : undefined, - Protocol: __expectString(output.protocol), - RemoteIpDetails: output.remoteIpDetails != null ? de_RemoteIpDetails(output.remoteIpDetails, context) : undefined, - RemotePortDetails: - output.remotePortDetails != null ? de_RemotePortDetails(output.remotePortDetails, context) : undefined, - } as any; + return take(output, { + Blocked: [, __expectBoolean, `blocked`], + ConnectionDirection: [, __expectString, `connectionDirection`], + LocalIpDetails: (_) => [, de_LocalIpDetails(_, context), `localIpDetails`], + LocalPortDetails: (_) => [, de_LocalPortDetails(_, context), `localPortDetails`], + Protocol: [, __expectString, `protocol`], + RemoteIpDetails: (_) => [, de_RemoteIpDetails(_, context), `remoteIpDetails`], + RemotePortDetails: (_) => [, de_RemotePortDetails(_, context), `remotePortDetails`], + }) as any; }; /** * deserializeAws_restJson1NetworkInterface */ const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - Ipv6Addresses: output.ipv6Addresses != null ? de_Ipv6Addresses(output.ipv6Addresses, context) : undefined, - NetworkInterfaceId: __expectString(output.networkInterfaceId), - PrivateDnsName: __expectString(output.privateDnsName), - PrivateIpAddress: __expectString(output.privateIpAddress), - PrivateIpAddresses: - output.privateIpAddresses != null ? de_PrivateIpAddresses(output.privateIpAddresses, context) : undefined, - PublicDnsName: __expectString(output.publicDnsName), - PublicIp: __expectString(output.publicIp), - SecurityGroups: output.securityGroups != null ? de_SecurityGroups(output.securityGroups, context) : undefined, - SubnetId: __expectString(output.subnetId), - VpcId: __expectString(output.vpcId), - } as any; + return take(output, { + Ipv6Addresses: [, _json, `ipv6Addresses`], + NetworkInterfaceId: [, __expectString, `networkInterfaceId`], + PrivateDnsName: [, __expectString, `privateDnsName`], + PrivateIpAddress: [, __expectString, `privateIpAddress`], + PrivateIpAddresses: (_) => [, de_PrivateIpAddresses(_, context), `privateIpAddresses`], + PublicDnsName: [, __expectString, `publicDnsName`], + PublicIp: [, __expectString, `publicIp`], + SecurityGroups: (_) => [, de_SecurityGroups(_, context), `securityGroups`], + SubnetId: [, __expectString, `subnetId`], + VpcId: [, __expectString, `vpcId`], + }) as any; }; /** @@ -7947,39 +7452,23 @@ const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NetworkInterface(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NotEquals - */ -const de_NotEquals = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotEquals omitted. /** * deserializeAws_restJson1Organization */ const de_Organization = (output: any, context: __SerdeContext): Organization => { - return { - Asn: __expectString(output.asn), - AsnOrg: __expectString(output.asnOrg), - Isp: __expectString(output.isp), - Org: __expectString(output.org), - } as any; + return take(output, { + Asn: [, __expectString, `asn`], + AsnOrg: [, __expectString, `asnOrg`], + Isp: [, __expectString, `isp`], + Org: [, __expectString, `org`], + }) as any; }; /** @@ -7989,10 +7478,10 @@ const de_OrganizationAdditionalConfigurationResult = ( output: any, context: __SerdeContext ): OrganizationAdditionalConfigurationResult => { - return { - AutoEnable: __expectString(output.autoEnable), - Name: __expectString(output.name), - } as any; + return take(output, { + AutoEnable: [, __expectString, `autoEnable`], + Name: [, __expectString, `name`], + }) as any; }; /** @@ -8005,9 +7494,6 @@ const de_OrganizationAdditionalConfigurationResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OrganizationAdditionalConfigurationResult(entry, context); }); return retVal; @@ -8020,24 +7506,20 @@ const de_OrganizationDataSourceConfigurationsResult = ( output: any, context: __SerdeContext ): OrganizationDataSourceConfigurationsResult => { - return { - Kubernetes: - output.kubernetes != null ? de_OrganizationKubernetesConfigurationResult(output.kubernetes, context) : undefined, - MalwareProtection: - output.malwareProtection != null - ? de_OrganizationMalwareProtectionConfigurationResult(output.malwareProtection, context) - : undefined, - S3Logs: output.s3Logs != null ? de_OrganizationS3LogsConfigurationResult(output.s3Logs, context) : undefined, - } as any; + return take(output, { + Kubernetes: (_) => [, de_OrganizationKubernetesConfigurationResult(_, context), `kubernetes`], + MalwareProtection: (_) => [, de_OrganizationMalwareProtectionConfigurationResult(_, context), `malwareProtection`], + S3Logs: (_) => [, de_OrganizationS3LogsConfigurationResult(_, context), `s3Logs`], + }) as any; }; /** * deserializeAws_restJson1OrganizationEbsVolumesResult */ const de_OrganizationEbsVolumesResult = (output: any, context: __SerdeContext): OrganizationEbsVolumesResult => { - return { - AutoEnable: __expectBoolean(output.autoEnable), - } as any; + return take(output, { + AutoEnable: [, __expectBoolean, `autoEnable`], + }) as any; }; /** @@ -8047,14 +7529,15 @@ const de_OrganizationFeatureConfigurationResult = ( output: any, context: __SerdeContext ): OrganizationFeatureConfigurationResult => { - return { - AdditionalConfiguration: - output.additionalConfiguration != null - ? de_OrganizationAdditionalConfigurationResults(output.additionalConfiguration, context) - : undefined, - AutoEnable: __expectString(output.autoEnable), - Name: __expectString(output.name), - } as any; + return take(output, { + AdditionalConfiguration: (_) => [ + , + de_OrganizationAdditionalConfigurationResults(_, context), + `additionalConfiguration`, + ], + AutoEnable: [, __expectString, `autoEnable`], + Name: [, __expectString, `name`], + }) as any; }; /** @@ -8067,9 +7550,6 @@ const de_OrganizationFeaturesConfigurationsResults = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OrganizationFeatureConfigurationResult(entry, context); }); return retVal; @@ -8082,9 +7562,9 @@ const de_OrganizationKubernetesAuditLogsConfigurationResult = ( output: any, context: __SerdeContext ): OrganizationKubernetesAuditLogsConfigurationResult => { - return { - AutoEnable: __expectBoolean(output.autoEnable), - } as any; + return take(output, { + AutoEnable: [, __expectBoolean, `autoEnable`], + }) as any; }; /** @@ -8094,12 +7574,9 @@ const de_OrganizationKubernetesConfigurationResult = ( output: any, context: __SerdeContext ): OrganizationKubernetesConfigurationResult => { - return { - AuditLogs: - output.auditLogs != null - ? de_OrganizationKubernetesAuditLogsConfigurationResult(output.auditLogs, context) - : undefined, - } as any; + return take(output, { + AuditLogs: (_) => [, de_OrganizationKubernetesAuditLogsConfigurationResult(_, context), `auditLogs`], + }) as any; }; /** @@ -8109,12 +7586,13 @@ const de_OrganizationMalwareProtectionConfigurationResult = ( output: any, context: __SerdeContext ): OrganizationMalwareProtectionConfigurationResult => { - return { - ScanEc2InstanceWithFindings: - output.scanEc2InstanceWithFindings != null - ? de_OrganizationScanEc2InstanceWithFindingsResult(output.scanEc2InstanceWithFindings, context) - : undefined, - } as any; + return take(output, { + ScanEc2InstanceWithFindings: (_) => [ + , + de_OrganizationScanEc2InstanceWithFindingsResult(_, context), + `scanEc2InstanceWithFindings`, + ], + }) as any; }; /** @@ -8124,9 +7602,9 @@ const de_OrganizationS3LogsConfigurationResult = ( output: any, context: __SerdeContext ): OrganizationS3LogsConfigurationResult => { - return { - AutoEnable: __expectBoolean(output.autoEnable), - } as any; + return take(output, { + AutoEnable: [, __expectBoolean, `autoEnable`], + }) as any; }; /** @@ -8136,57 +7614,49 @@ const de_OrganizationScanEc2InstanceWithFindingsResult = ( output: any, context: __SerdeContext ): OrganizationScanEc2InstanceWithFindingsResult => { - return { - EbsVolumes: output.ebsVolumes != null ? de_OrganizationEbsVolumesResult(output.ebsVolumes, context) : undefined, - } as any; + return take(output, { + EbsVolumes: (_) => [, de_OrganizationEbsVolumesResult(_, context), `ebsVolumes`], + }) as any; }; /** * deserializeAws_restJson1Owner */ const de_Owner = (output: any, context: __SerdeContext): Owner => { - return { - Id: __expectString(output.id), - } as any; + return take(output, { + Id: [, __expectString, `id`], + }) as any; }; /** * deserializeAws_restJson1PermissionConfiguration */ const de_PermissionConfiguration = (output: any, context: __SerdeContext): PermissionConfiguration => { - return { - AccountLevelPermissions: - output.accountLevelPermissions != null - ? de_AccountLevelPermissions(output.accountLevelPermissions, context) - : undefined, - BucketLevelPermissions: - output.bucketLevelPermissions != null - ? de_BucketLevelPermissions(output.bucketLevelPermissions, context) - : undefined, - } as any; + return take(output, { + AccountLevelPermissions: (_) => [, de_AccountLevelPermissions(_, context), `accountLevelPermissions`], + BucketLevelPermissions: (_) => [, de_BucketLevelPermissions(_, context), `bucketLevelPermissions`], + }) as any; }; /** * deserializeAws_restJson1PortProbeAction */ const de_PortProbeAction = (output: any, context: __SerdeContext): PortProbeAction => { - return { - Blocked: __expectBoolean(output.blocked), - PortProbeDetails: - output.portProbeDetails != null ? de_PortProbeDetails(output.portProbeDetails, context) : undefined, - } as any; + return take(output, { + Blocked: [, __expectBoolean, `blocked`], + PortProbeDetails: (_) => [, de_PortProbeDetails(_, context), `portProbeDetails`], + }) as any; }; /** * deserializeAws_restJson1PortProbeDetail */ const de_PortProbeDetail = (output: any, context: __SerdeContext): PortProbeDetail => { - return { - LocalIpDetails: output.localIpDetails != null ? de_LocalIpDetails(output.localIpDetails, context) : undefined, - LocalPortDetails: - output.localPortDetails != null ? de_LocalPortDetails(output.localPortDetails, context) : undefined, - RemoteIpDetails: output.remoteIpDetails != null ? de_RemoteIpDetails(output.remoteIpDetails, context) : undefined, - } as any; + return take(output, { + LocalIpDetails: (_) => [, de_LocalIpDetails(_, context), `localIpDetails`], + LocalPortDetails: (_) => [, de_LocalPortDetails(_, context), `localPortDetails`], + RemoteIpDetails: (_) => [, de_RemoteIpDetails(_, context), `remoteIpDetails`], + }) as any; }; /** @@ -8196,9 +7666,6 @@ const de_PortProbeDetails = (output: any, context: __SerdeContext): PortProbeDet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PortProbeDetail(entry, context); }); return retVal; @@ -8208,10 +7675,10 @@ const de_PortProbeDetails = (output: any, context: __SerdeContext): PortProbeDet * deserializeAws_restJson1PrivateIpAddressDetails */ const de_PrivateIpAddressDetails = (output: any, context: __SerdeContext): PrivateIpAddressDetails => { - return { - PrivateDnsName: __expectString(output.privateDnsName), - PrivateIpAddress: __expectString(output.privateIpAddress), - } as any; + return take(output, { + PrivateDnsName: [, __expectString, `privateDnsName`], + PrivateIpAddress: [, __expectString, `privateIpAddress`], + }) as any; }; /** @@ -8221,9 +7688,6 @@ const de_PrivateIpAddresses = (output: any, context: __SerdeContext): PrivateIpA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PrivateIpAddressDetails(entry, context); }); return retVal; @@ -8233,32 +7697,31 @@ const de_PrivateIpAddresses = (output: any, context: __SerdeContext): PrivateIpA * deserializeAws_restJson1ProcessDetails */ const de_ProcessDetails = (output: any, context: __SerdeContext): ProcessDetails => { - return { - Euid: __expectInt32(output.euid), - ExecutablePath: __expectString(output.executablePath), - ExecutableSha256: __expectString(output.executableSha256), - Lineage: output.lineage != null ? de_Lineage(output.lineage, context) : undefined, - Name: __expectString(output.name), - NamespacePid: __expectInt32(output.namespacePid), - ParentUuid: __expectString(output.parentUuid), - Pid: __expectInt32(output.pid), - Pwd: __expectString(output.pwd), - StartTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - User: __expectString(output.user), - UserId: __expectInt32(output.userId), - Uuid: __expectString(output.uuid), - } as any; + return take(output, { + Euid: [, __expectInt32, `euid`], + ExecutablePath: [, __expectString, `executablePath`], + ExecutableSha256: [, __expectString, `executableSha256`], + Lineage: (_) => [, de_Lineage(_, context), `lineage`], + Name: [, __expectString, `name`], + NamespacePid: [, __expectInt32, `namespacePid`], + ParentUuid: [, __expectString, `parentUuid`], + Pid: [, __expectInt32, `pid`], + Pwd: [, __expectString, `pwd`], + StartTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `startTime`], + User: [, __expectString, `user`], + UserId: [, __expectInt32, `userId`], + Uuid: [, __expectString, `uuid`], + }) as any; }; /** * deserializeAws_restJson1ProductCode */ const de_ProductCode = (output: any, context: __SerdeContext): ProductCode => { - return { - Code: __expectString(output.productCodeId), - ProductType: __expectString(output.productCodeType), - } as any; + return take(output, { + Code: [, __expectString, `productCodeId`], + ProductType: [, __expectString, `productCodeType`], + }) as any; }; /** @@ -8268,9 +7731,6 @@ const de_ProductCodes = (output: any, context: __SerdeContext): ProductCode[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProductCode(entry, context); }); return retVal; @@ -8280,177 +7740,162 @@ const de_ProductCodes = (output: any, context: __SerdeContext): ProductCode[] => * deserializeAws_restJson1PublicAccess */ const de_PublicAccess = (output: any, context: __SerdeContext): PublicAccess => { - return { - EffectivePermission: __expectString(output.effectivePermission), - PermissionConfiguration: - output.permissionConfiguration != null - ? de_PermissionConfiguration(output.permissionConfiguration, context) - : undefined, - } as any; + return take(output, { + EffectivePermission: [, __expectString, `effectivePermission`], + PermissionConfiguration: (_) => [, de_PermissionConfiguration(_, context), `permissionConfiguration`], + }) as any; }; /** * deserializeAws_restJson1RdsDbInstanceDetails */ const de_RdsDbInstanceDetails = (output: any, context: __SerdeContext): RdsDbInstanceDetails => { - return { - DbClusterIdentifier: __expectString(output.dbClusterIdentifier), - DbInstanceArn: __expectString(output.dbInstanceArn), - DbInstanceIdentifier: __expectString(output.dbInstanceIdentifier), - Engine: __expectString(output.engine), - EngineVersion: __expectString(output.engineVersion), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + DbClusterIdentifier: [, __expectString, `dbClusterIdentifier`], + DbInstanceArn: [, __expectString, `dbInstanceArn`], + DbInstanceIdentifier: [, __expectString, `dbInstanceIdentifier`], + Engine: [, __expectString, `engine`], + EngineVersion: [, __expectString, `engineVersion`], + Tags: (_) => [, de_Tags(_, context), `tags`], + }) as any; }; /** * deserializeAws_restJson1RdsDbUserDetails */ const de_RdsDbUserDetails = (output: any, context: __SerdeContext): RdsDbUserDetails => { - return { - Application: __expectString(output.application), - AuthMethod: __expectString(output.authMethod), - Database: __expectString(output.database), - Ssl: __expectString(output.ssl), - User: __expectString(output.user), - } as any; + return take(output, { + Application: [, __expectString, `application`], + AuthMethod: [, __expectString, `authMethod`], + Database: [, __expectString, `database`], + Ssl: [, __expectString, `ssl`], + User: [, __expectString, `user`], + }) as any; }; /** * deserializeAws_restJson1RdsLoginAttemptAction */ const de_RdsLoginAttemptAction = (output: any, context: __SerdeContext): RdsLoginAttemptAction => { - return { - LoginAttributes: output.LoginAttributes != null ? de_LoginAttributes(output.LoginAttributes, context) : undefined, - RemoteIpDetails: output.remoteIpDetails != null ? de_RemoteIpDetails(output.remoteIpDetails, context) : undefined, - } as any; + return take(output, { + LoginAttributes: (_: any) => de_LoginAttributes(_, context), + RemoteIpDetails: (_) => [, de_RemoteIpDetails(_, context), `remoteIpDetails`], + }) as any; }; /** * deserializeAws_restJson1RemoteAccountDetails */ const de_RemoteAccountDetails = (output: any, context: __SerdeContext): RemoteAccountDetails => { - return { - AccountId: __expectString(output.accountId), - Affiliated: __expectBoolean(output.affiliated), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + Affiliated: [, __expectBoolean, `affiliated`], + }) as any; }; /** * deserializeAws_restJson1RemoteIpDetails */ const de_RemoteIpDetails = (output: any, context: __SerdeContext): RemoteIpDetails => { - return { - City: output.city != null ? de_City(output.city, context) : undefined, - Country: output.country != null ? de_Country(output.country, context) : undefined, - GeoLocation: output.geoLocation != null ? de_GeoLocation(output.geoLocation, context) : undefined, - IpAddressV4: __expectString(output.ipAddressV4), - Organization: output.organization != null ? de_Organization(output.organization, context) : undefined, - } as any; + return take(output, { + City: (_) => [, de_City(_, context), `city`], + Country: (_) => [, de_Country(_, context), `country`], + GeoLocation: (_) => [, de_GeoLocation(_, context), `geoLocation`], + IpAddressV4: [, __expectString, `ipAddressV4`], + Organization: (_) => [, de_Organization(_, context), `organization`], + }) as any; }; /** * deserializeAws_restJson1RemotePortDetails */ const de_RemotePortDetails = (output: any, context: __SerdeContext): RemotePortDetails => { - return { - Port: __expectInt32(output.port), - PortName: __expectString(output.portName), - } as any; + return take(output, { + Port: [, __expectInt32, `port`], + PortName: [, __expectString, `portName`], + }) as any; }; /** * deserializeAws_restJson1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - AccessKeyDetails: - output.accessKeyDetails != null ? de_AccessKeyDetails(output.accessKeyDetails, context) : undefined, - ContainerDetails: output.containerDetails != null ? de_Container(output.containerDetails, context) : undefined, - EbsVolumeDetails: - output.ebsVolumeDetails != null ? de_EbsVolumeDetails(output.ebsVolumeDetails, context) : undefined, - EcsClusterDetails: - output.ecsClusterDetails != null ? de_EcsClusterDetails(output.ecsClusterDetails, context) : undefined, - EksClusterDetails: - output.eksClusterDetails != null ? de_EksClusterDetails(output.eksClusterDetails, context) : undefined, - InstanceDetails: output.instanceDetails != null ? de_InstanceDetails(output.instanceDetails, context) : undefined, - KubernetesDetails: - output.kubernetesDetails != null ? de_KubernetesDetails(output.kubernetesDetails, context) : undefined, - RdsDbInstanceDetails: - output.rdsDbInstanceDetails != null ? de_RdsDbInstanceDetails(output.rdsDbInstanceDetails, context) : undefined, - RdsDbUserDetails: - output.rdsDbUserDetails != null ? de_RdsDbUserDetails(output.rdsDbUserDetails, context) : undefined, - ResourceType: __expectString(output.resourceType), - S3BucketDetails: output.s3BucketDetails != null ? de_S3BucketDetails(output.s3BucketDetails, context) : undefined, - } as any; + return take(output, { + AccessKeyDetails: (_) => [, de_AccessKeyDetails(_, context), `accessKeyDetails`], + ContainerDetails: (_) => [, de_Container(_, context), `containerDetails`], + EbsVolumeDetails: (_) => [, de_EbsVolumeDetails(_, context), `ebsVolumeDetails`], + EcsClusterDetails: (_) => [, de_EcsClusterDetails(_, context), `ecsClusterDetails`], + EksClusterDetails: (_) => [, de_EksClusterDetails(_, context), `eksClusterDetails`], + InstanceDetails: (_) => [, de_InstanceDetails(_, context), `instanceDetails`], + KubernetesDetails: (_) => [, de_KubernetesDetails(_, context), `kubernetesDetails`], + RdsDbInstanceDetails: (_) => [, de_RdsDbInstanceDetails(_, context), `rdsDbInstanceDetails`], + RdsDbUserDetails: (_) => [, de_RdsDbUserDetails(_, context), `rdsDbUserDetails`], + ResourceType: [, __expectString, `resourceType`], + S3BucketDetails: (_) => [, de_S3BucketDetails(_, context), `s3BucketDetails`], + }) as any; }; /** * deserializeAws_restJson1ResourceDetails */ const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - InstanceArn: __expectString(output.instanceArn), - } as any; + return take(output, { + InstanceArn: [, __expectString, `instanceArn`], + }) as any; }; /** * deserializeAws_restJson1RuntimeContext */ const de_RuntimeContext = (output: any, context: __SerdeContext): RuntimeContext => { - return { - AddressFamily: __expectString(output.addressFamily), - FileSystemType: __expectString(output.fileSystemType), - Flags: output.flags != null ? de_FlagsList(output.flags, context) : undefined, - IanaProtocolNumber: __expectInt32(output.ianaProtocolNumber), - LdPreloadValue: __expectString(output.ldPreloadValue), - LibraryPath: __expectString(output.libraryPath), - MemoryRegions: output.memoryRegions != null ? de_MemoryRegionsList(output.memoryRegions, context) : undefined, - ModifiedAt: - output.modifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt))) : undefined, - ModifyingProcess: output.modifyingProcess != null ? de_ProcessDetails(output.modifyingProcess, context) : undefined, - ModuleFilePath: __expectString(output.moduleFilePath), - ModuleName: __expectString(output.moduleName), - ModuleSha256: __expectString(output.moduleSha256), - MountSource: __expectString(output.mountSource), - MountTarget: __expectString(output.mountTarget), - ReleaseAgentPath: __expectString(output.releaseAgentPath), - RuncBinaryPath: __expectString(output.runcBinaryPath), - ScriptPath: __expectString(output.scriptPath), - ShellHistoryFilePath: __expectString(output.shellHistoryFilePath), - SocketPath: __expectString(output.socketPath), - TargetProcess: output.targetProcess != null ? de_ProcessDetails(output.targetProcess, context) : undefined, - } as any; + return take(output, { + AddressFamily: [, __expectString, `addressFamily`], + FileSystemType: [, __expectString, `fileSystemType`], + Flags: [, _json, `flags`], + IanaProtocolNumber: [, __expectInt32, `ianaProtocolNumber`], + LdPreloadValue: [, __expectString, `ldPreloadValue`], + LibraryPath: [, __expectString, `libraryPath`], + MemoryRegions: [, _json, `memoryRegions`], + ModifiedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `modifiedAt`], + ModifyingProcess: (_) => [, de_ProcessDetails(_, context), `modifyingProcess`], + ModuleFilePath: [, __expectString, `moduleFilePath`], + ModuleName: [, __expectString, `moduleName`], + ModuleSha256: [, __expectString, `moduleSha256`], + MountSource: [, __expectString, `mountSource`], + MountTarget: [, __expectString, `mountTarget`], + ReleaseAgentPath: [, __expectString, `releaseAgentPath`], + RuncBinaryPath: [, __expectString, `runcBinaryPath`], + ScriptPath: [, __expectString, `scriptPath`], + ShellHistoryFilePath: [, __expectString, `shellHistoryFilePath`], + SocketPath: [, __expectString, `socketPath`], + TargetProcess: (_) => [, de_ProcessDetails(_, context), `targetProcess`], + }) as any; }; /** * deserializeAws_restJson1RuntimeDetails */ const de_RuntimeDetails = (output: any, context: __SerdeContext): RuntimeDetails => { - return { - Context: output.context != null ? de_RuntimeContext(output.context, context) : undefined, - Process: output.process != null ? de_ProcessDetails(output.process, context) : undefined, - } as any; + return take(output, { + Context: (_) => [, de_RuntimeContext(_, context), `context`], + Process: (_) => [, de_ProcessDetails(_, context), `process`], + }) as any; }; /** * deserializeAws_restJson1S3BucketDetail */ const de_S3BucketDetail = (output: any, context: __SerdeContext): S3BucketDetail => { - return { - Arn: __expectString(output.arn), - CreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - DefaultServerSideEncryption: - output.defaultServerSideEncryption != null - ? de_DefaultServerSideEncryption(output.defaultServerSideEncryption, context) - : undefined, - Name: __expectString(output.name), - Owner: output.owner != null ? de_Owner(output.owner, context) : undefined, - PublicAccess: output.publicAccess != null ? de_PublicAccess(output.publicAccess, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + DefaultServerSideEncryption: (_) => [, de_DefaultServerSideEncryption(_, context), `defaultServerSideEncryption`], + Name: [, __expectString, `name`], + Owner: (_) => [, de_Owner(_, context), `owner`], + PublicAccess: (_) => [, de_PublicAccess(_, context), `publicAccess`], + Tags: (_) => [, de_Tags(_, context), `tags`], + Type: [, __expectString, `type`], + }) as any; }; /** @@ -8460,9 +7905,6 @@ const de_S3BucketDetails = (output: any, context: __SerdeContext): S3BucketDetai const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_S3BucketDetail(entry, context); }); return retVal; @@ -8472,57 +7914,50 @@ const de_S3BucketDetails = (output: any, context: __SerdeContext): S3BucketDetai * deserializeAws_restJson1S3LogsConfigurationResult */ const de_S3LogsConfigurationResult = (output: any, context: __SerdeContext): S3LogsConfigurationResult => { - return { - Status: __expectString(output.status), - } as any; + return take(output, { + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1Scan */ const de_Scan = (output: any, context: __SerdeContext): Scan => { - return { - AccountId: __expectString(output.accountId), - AdminDetectorId: __expectString(output.adminDetectorId), - AttachedVolumes: output.attachedVolumes != null ? de_VolumeDetails(output.attachedVolumes, context) : undefined, - DetectorId: __expectString(output.detectorId), - FailureReason: __expectString(output.failureReason), - FileCount: __expectLong(output.fileCount), - ResourceDetails: output.resourceDetails != null ? de_ResourceDetails(output.resourceDetails, context) : undefined, - ScanEndTime: - output.scanEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scanEndTime))) - : undefined, - ScanId: __expectString(output.scanId), - ScanResultDetails: - output.scanResultDetails != null ? de_ScanResultDetails(output.scanResultDetails, context) : undefined, - ScanStartTime: - output.scanStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scanStartTime))) - : undefined, - ScanStatus: __expectString(output.scanStatus), - TotalBytes: __expectLong(output.totalBytes), - TriggerDetails: output.triggerDetails != null ? de_TriggerDetails(output.triggerDetails, context) : undefined, - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + AdminDetectorId: [, __expectString, `adminDetectorId`], + AttachedVolumes: (_) => [, de_VolumeDetails(_, context), `attachedVolumes`], + DetectorId: [, __expectString, `detectorId`], + FailureReason: [, __expectString, `failureReason`], + FileCount: [, __expectLong, `fileCount`], + ResourceDetails: (_) => [, de_ResourceDetails(_, context), `resourceDetails`], + ScanEndTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `scanEndTime`], + ScanId: [, __expectString, `scanId`], + ScanResultDetails: (_) => [, de_ScanResultDetails(_, context), `scanResultDetails`], + ScanStartTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `scanStartTime`], + ScanStatus: [, __expectString, `scanStatus`], + TotalBytes: [, __expectLong, `totalBytes`], + TriggerDetails: (_) => [, de_TriggerDetails(_, context), `triggerDetails`], + }) as any; }; /** * deserializeAws_restJson1ScanCondition */ const de_ScanCondition = (output: any, context: __SerdeContext): ScanCondition => { - return { - MapEquals: output.mapEquals != null ? de_MapEquals(output.mapEquals, context) : undefined, - } as any; + return take(output, { + MapEquals: (_) => [, de_MapEquals(_, context), `mapEquals`], + }) as any; }; /** * deserializeAws_restJson1ScanConditionPair */ const de_ScanConditionPair = (output: any, context: __SerdeContext): ScanConditionPair => { - return { - Key: __expectString(output.key), - Value: __expectString(output.value), - } as any; + return take(output, { + Key: [, __expectString, `key`], + Value: [, __expectString, `value`], + }) as any; }; /** @@ -8545,20 +7980,16 @@ const de_ScanCriterion = (output: any, context: __SerdeContext): Record { - return { - HighestSeverityThreatDetails: - output.highestSeverityThreatDetails != null - ? de_HighestSeverityThreatDetails(output.highestSeverityThreatDetails, context) - : undefined, - ScannedItemCount: - output.scannedItemCount != null ? de_ScannedItemCount(output.scannedItemCount, context) : undefined, - ThreatDetectedByName: - output.threatDetectedByName != null ? de_ThreatDetectedByName(output.threatDetectedByName, context) : undefined, - ThreatsDetectedItemCount: - output.threatsDetectedItemCount != null - ? de_ThreatsDetectedItemCount(output.threatsDetectedItemCount, context) - : undefined, - } as any; + return take(output, { + HighestSeverityThreatDetails: (_) => [ + , + de_HighestSeverityThreatDetails(_, context), + `highestSeverityThreatDetails`, + ], + ScannedItemCount: (_) => [, de_ScannedItemCount(_, context), `scannedItemCount`], + ThreatDetectedByName: (_) => [, de_ThreatDetectedByName(_, context), `threatDetectedByName`], + ThreatsDetectedItemCount: (_) => [, de_ThreatsDetectedItemCount(_, context), `threatsDetectedItemCount`], + }) as any; }; /** @@ -8568,51 +7999,51 @@ const de_ScanEc2InstanceWithFindingsResult = ( output: any, context: __SerdeContext ): ScanEc2InstanceWithFindingsResult => { - return { - EbsVolumes: output.ebsVolumes != null ? de_EbsVolumesResult(output.ebsVolumes, context) : undefined, - } as any; + return take(output, { + EbsVolumes: (_) => [, de_EbsVolumesResult(_, context), `ebsVolumes`], + }) as any; }; /** * deserializeAws_restJson1ScanFilePath */ const de_ScanFilePath = (output: any, context: __SerdeContext): ScanFilePath => { - return { - FileName: __expectString(output.fileName), - FilePath: __expectString(output.filePath), - Hash: __expectString(output.hash), - VolumeArn: __expectString(output.volumeArn), - } as any; + return take(output, { + FileName: [, __expectString, `fileName`], + FilePath: [, __expectString, `filePath`], + Hash: [, __expectString, `hash`], + VolumeArn: [, __expectString, `volumeArn`], + }) as any; }; /** * deserializeAws_restJson1ScannedItemCount */ const de_ScannedItemCount = (output: any, context: __SerdeContext): ScannedItemCount => { - return { - Files: __expectInt32(output.files), - TotalGb: __expectInt32(output.totalGb), - Volumes: __expectInt32(output.volumes), - } as any; + return take(output, { + Files: [, __expectInt32, `files`], + TotalGb: [, __expectInt32, `totalGb`], + Volumes: [, __expectInt32, `volumes`], + }) as any; }; /** * deserializeAws_restJson1ScanResourceCriteria */ const de_ScanResourceCriteria = (output: any, context: __SerdeContext): ScanResourceCriteria => { - return { - Exclude: output.exclude != null ? de_ScanCriterion(output.exclude, context) : undefined, - Include: output.include != null ? de_ScanCriterion(output.include, context) : undefined, - } as any; + return take(output, { + Exclude: (_) => [, de_ScanCriterion(_, context), `exclude`], + Include: (_) => [, de_ScanCriterion(_, context), `include`], + }) as any; }; /** * deserializeAws_restJson1ScanResultDetails */ const de_ScanResultDetails = (output: any, context: __SerdeContext): ScanResultDetails => { - return { - ScanResult: __expectString(output.scanResult), - } as any; + return take(output, { + ScanResult: [, __expectString, `scanResult`], + }) as any; }; /** @@ -8622,9 +8053,6 @@ const de_Scans = (output: any, context: __SerdeContext): Scan[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Scan(entry, context); }); return retVal; @@ -8634,12 +8062,12 @@ const de_Scans = (output: any, context: __SerdeContext): Scan[] => { * deserializeAws_restJson1ScanThreatName */ const de_ScanThreatName = (output: any, context: __SerdeContext): ScanThreatName => { - return { - FilePaths: output.filePaths != null ? de_FilePaths(output.filePaths, context) : undefined, - ItemCount: __expectInt32(output.itemCount), - Name: __expectString(output.name), - Severity: __expectString(output.severity), - } as any; + return take(output, { + FilePaths: (_) => [, de_FilePaths(_, context), `filePaths`], + ItemCount: [, __expectInt32, `itemCount`], + Name: [, __expectString, `name`], + Severity: [, __expectString, `severity`], + }) as any; }; /** @@ -8649,9 +8077,6 @@ const de_ScanThreatNames = (output: any, context: __SerdeContext): ScanThreatNam const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScanThreatName(entry, context); }); return retVal; @@ -8661,19 +8086,19 @@ const de_ScanThreatNames = (output: any, context: __SerdeContext): ScanThreatNam * deserializeAws_restJson1SecurityContext */ const de_SecurityContext = (output: any, context: __SerdeContext): SecurityContext => { - return { - Privileged: __expectBoolean(output.privileged), - } as any; + return take(output, { + Privileged: [, __expectBoolean, `privileged`], + }) as any; }; /** * deserializeAws_restJson1SecurityGroup */ const de_SecurityGroup = (output: any, context: __SerdeContext): SecurityGroup => { - return { - GroupId: __expectString(output.groupId), - GroupName: __expectString(output.groupName), - } as any; + return take(output, { + GroupId: [, __expectString, `groupId`], + GroupName: [, __expectString, `groupName`], + }) as any; }; /** @@ -8683,9 +8108,6 @@ const de_SecurityGroups = (output: any, context: __SerdeContext): SecurityGroup[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SecurityGroup(entry, context); }); return retVal; @@ -8695,88 +8117,49 @@ const de_SecurityGroups = (output: any, context: __SerdeContext): SecurityGroup[ * deserializeAws_restJson1Service */ const de_Service = (output: any, context: __SerdeContext): Service => { - return { - Action: output.action != null ? de_Action(output.action, context) : undefined, - AdditionalInfo: - output.additionalInfo != null ? de_ServiceAdditionalInfo(output.additionalInfo, context) : undefined, - Archived: __expectBoolean(output.archived), - Count: __expectInt32(output.count), - DetectorId: __expectString(output.detectorId), - EbsVolumeScanDetails: - output.ebsVolumeScanDetails != null ? de_EbsVolumeScanDetails(output.ebsVolumeScanDetails, context) : undefined, - EventFirstSeen: __expectString(output.eventFirstSeen), - EventLastSeen: __expectString(output.eventLastSeen), - Evidence: output.evidence != null ? de_Evidence(output.evidence, context) : undefined, - FeatureName: __expectString(output.featureName), - ResourceRole: __expectString(output.resourceRole), - RuntimeDetails: output.runtimeDetails != null ? de_RuntimeDetails(output.runtimeDetails, context) : undefined, - ServiceName: __expectString(output.serviceName), - UserFeedback: __expectString(output.userFeedback), - } as any; + return take(output, { + Action: (_) => [, de_Action(_, context), `action`], + AdditionalInfo: (_) => [, de_ServiceAdditionalInfo(_, context), `additionalInfo`], + Archived: [, __expectBoolean, `archived`], + Count: [, __expectInt32, `count`], + DetectorId: [, __expectString, `detectorId`], + EbsVolumeScanDetails: (_) => [, de_EbsVolumeScanDetails(_, context), `ebsVolumeScanDetails`], + EventFirstSeen: [, __expectString, `eventFirstSeen`], + EventLastSeen: [, __expectString, `eventLastSeen`], + Evidence: (_) => [, de_Evidence(_, context), `evidence`], + FeatureName: [, __expectString, `featureName`], + ResourceRole: [, __expectString, `resourceRole`], + RuntimeDetails: (_) => [, de_RuntimeDetails(_, context), `runtimeDetails`], + ServiceName: [, __expectString, `serviceName`], + UserFeedback: [, __expectString, `userFeedback`], + }) as any; }; /** * deserializeAws_restJson1ServiceAdditionalInfo */ const de_ServiceAdditionalInfo = (output: any, context: __SerdeContext): ServiceAdditionalInfo => { - return { - Type: __expectString(output.type), - Value: __expectString(output.value), - } as any; + return take(output, { + Type: [, __expectString, `type`], + Value: [, __expectString, `value`], + }) as any; }; -/** - * deserializeAws_restJson1SourceIps - */ -const de_SourceIps = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SourceIps omitted. -/** - * deserializeAws_restJson1Sources - */ -const de_Sources = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Sources omitted. /** * deserializeAws_restJson1Tag */ const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.key), - Value: __expectString(output.value), - } as any; + return take(output, { + Key: [, __expectString, `key`], + Value: [, __expectString, `value`], + }) as any; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1Tags @@ -8785,9 +8168,6 @@ const de_Tags = (output: any, context: __SerdeContext): Tag[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Tag(entry, context); }); return retVal; @@ -8797,22 +8177,22 @@ const de_Tags = (output: any, context: __SerdeContext): Tag[] => { * deserializeAws_restJson1ThreatDetectedByName */ const de_ThreatDetectedByName = (output: any, context: __SerdeContext): ThreatDetectedByName => { - return { - ItemCount: __expectInt32(output.itemCount), - Shortened: __expectBoolean(output.shortened), - ThreatNames: output.threatNames != null ? de_ScanThreatNames(output.threatNames, context) : undefined, - UniqueThreatNameCount: __expectInt32(output.uniqueThreatNameCount), - } as any; + return take(output, { + ItemCount: [, __expectInt32, `itemCount`], + Shortened: [, __expectBoolean, `shortened`], + ThreatNames: (_) => [, de_ScanThreatNames(_, context), `threatNames`], + UniqueThreatNameCount: [, __expectInt32, `uniqueThreatNameCount`], + }) as any; }; /** * deserializeAws_restJson1ThreatIntelligenceDetail */ const de_ThreatIntelligenceDetail = (output: any, context: __SerdeContext): ThreatIntelligenceDetail => { - return { - ThreatListName: __expectString(output.threatListName), - ThreatNames: output.threatNames != null ? de_ThreatNames(output.threatNames, context) : undefined, - } as any; + return take(output, { + ThreatListName: [, __expectString, `threatListName`], + ThreatNames: [, _json, `threatNames`], + }) as any; }; /** @@ -8822,81 +8202,52 @@ const de_ThreatIntelligenceDetails = (output: any, context: __SerdeContext): Thr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThreatIntelligenceDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ThreatIntelSetIds - */ -const de_ThreatIntelSetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ThreatIntelSetIds omitted. -/** - * deserializeAws_restJson1ThreatNames - */ -const de_ThreatNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ThreatNames omitted. /** * deserializeAws_restJson1ThreatsDetectedItemCount */ const de_ThreatsDetectedItemCount = (output: any, context: __SerdeContext): ThreatsDetectedItemCount => { - return { - Files: __expectInt32(output.files), - } as any; + return take(output, { + Files: [, __expectInt32, `files`], + }) as any; }; /** * deserializeAws_restJson1Total */ const de_Total = (output: any, context: __SerdeContext): Total => { - return { - Amount: __expectString(output.amount), - Unit: __expectString(output.unit), - } as any; + return take(output, { + Amount: [, __expectString, `amount`], + Unit: [, __expectString, `unit`], + }) as any; }; /** * deserializeAws_restJson1TriggerDetails */ const de_TriggerDetails = (output: any, context: __SerdeContext): TriggerDetails => { - return { - Description: __expectString(output.description), - GuardDutyFindingId: __expectString(output.guardDutyFindingId), - } as any; + return take(output, { + Description: [, __expectString, `description`], + GuardDutyFindingId: [, __expectString, `guardDutyFindingId`], + }) as any; }; /** * deserializeAws_restJson1UnprocessedAccount */ const de_UnprocessedAccount = (output: any, context: __SerdeContext): UnprocessedAccount => { - return { - AccountId: __expectString(output.accountId), - Result: __expectString(output.result), - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + Result: [, __expectString, `result`], + }) as any; }; /** @@ -8906,9 +8257,6 @@ const de_UnprocessedAccounts = (output: any, context: __SerdeContext): Unprocess const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UnprocessedAccount(entry, context); }); return retVal; @@ -8918,22 +8266,19 @@ const de_UnprocessedAccounts = (output: any, context: __SerdeContext): Unprocess * deserializeAws_restJson1UnprocessedDataSourcesResult */ const de_UnprocessedDataSourcesResult = (output: any, context: __SerdeContext): UnprocessedDataSourcesResult => { - return { - MalwareProtection: - output.malwareProtection != null - ? de_MalwareProtectionConfigurationResult(output.malwareProtection, context) - : undefined, - } as any; + return take(output, { + MalwareProtection: (_) => [, de_MalwareProtectionConfigurationResult(_, context), `malwareProtection`], + }) as any; }; /** * deserializeAws_restJson1UsageAccountResult */ const de_UsageAccountResult = (output: any, context: __SerdeContext): UsageAccountResult => { - return { - AccountId: __expectString(output.accountId), - Total: output.total != null ? de_Total(output.total, context) : undefined, - } as any; + return take(output, { + AccountId: [, __expectString, `accountId`], + Total: (_) => [, de_Total(_, context), `total`], + }) as any; }; /** @@ -8943,9 +8288,6 @@ const de_UsageAccountResultList = (output: any, context: __SerdeContext): UsageA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageAccountResult(entry, context); }); return retVal; @@ -8955,10 +8297,10 @@ const de_UsageAccountResultList = (output: any, context: __SerdeContext): UsageA * deserializeAws_restJson1UsageDataSourceResult */ const de_UsageDataSourceResult = (output: any, context: __SerdeContext): UsageDataSourceResult => { - return { - DataSource: __expectString(output.dataSource), - Total: output.total != null ? de_Total(output.total, context) : undefined, - } as any; + return take(output, { + DataSource: [, __expectString, `dataSource`], + Total: (_) => [, de_Total(_, context), `total`], + }) as any; }; /** @@ -8968,9 +8310,6 @@ const de_UsageDataSourceResultList = (output: any, context: __SerdeContext): Usa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageDataSourceResult(entry, context); }); return retVal; @@ -8980,10 +8319,10 @@ const de_UsageDataSourceResultList = (output: any, context: __SerdeContext): Usa * deserializeAws_restJson1UsageFeatureResult */ const de_UsageFeatureResult = (output: any, context: __SerdeContext): UsageFeatureResult => { - return { - Feature: __expectString(output.feature), - Total: output.total != null ? de_Total(output.total, context) : undefined, - } as any; + return take(output, { + Feature: [, __expectString, `feature`], + Total: (_) => [, de_Total(_, context), `total`], + }) as any; }; /** @@ -8993,9 +8332,6 @@ const de_UsageFeatureResultList = (output: any, context: __SerdeContext): UsageF const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageFeatureResult(entry, context); }); return retVal; @@ -9005,10 +8341,10 @@ const de_UsageFeatureResultList = (output: any, context: __SerdeContext): UsageF * deserializeAws_restJson1UsageResourceResult */ const de_UsageResourceResult = (output: any, context: __SerdeContext): UsageResourceResult => { - return { - Resource: __expectString(output.resource), - Total: output.total != null ? de_Total(output.total, context) : undefined, - } as any; + return take(output, { + Resource: [, __expectString, `resource`], + Total: (_) => [, de_Total(_, context), `total`], + }) as any; }; /** @@ -9018,9 +8354,6 @@ const de_UsageResourceResultList = (output: any, context: __SerdeContext): Usage const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageResourceResult(entry, context); }); return retVal; @@ -9030,39 +8363,38 @@ const de_UsageResourceResultList = (output: any, context: __SerdeContext): Usage * deserializeAws_restJson1UsageStatistics */ const de_UsageStatistics = (output: any, context: __SerdeContext): UsageStatistics => { - return { - SumByAccount: output.sumByAccount != null ? de_UsageAccountResultList(output.sumByAccount, context) : undefined, - SumByDataSource: - output.sumByDataSource != null ? de_UsageDataSourceResultList(output.sumByDataSource, context) : undefined, - SumByFeature: output.sumByFeature != null ? de_UsageFeatureResultList(output.sumByFeature, context) : undefined, - SumByResource: output.sumByResource != null ? de_UsageResourceResultList(output.sumByResource, context) : undefined, - TopResources: output.topResources != null ? de_UsageResourceResultList(output.topResources, context) : undefined, - } as any; + return take(output, { + SumByAccount: (_) => [, de_UsageAccountResultList(_, context), `sumByAccount`], + SumByDataSource: (_) => [, de_UsageDataSourceResultList(_, context), `sumByDataSource`], + SumByFeature: (_) => [, de_UsageFeatureResultList(_, context), `sumByFeature`], + SumByResource: (_) => [, de_UsageResourceResultList(_, context), `sumByResource`], + TopResources: (_) => [, de_UsageResourceResultList(_, context), `topResources`], + }) as any; }; /** * deserializeAws_restJson1Volume */ const de_Volume = (output: any, context: __SerdeContext): Volume => { - return { - HostPath: output.hostPath != null ? de_HostPath(output.hostPath, context) : undefined, - Name: __expectString(output.name), - } as any; + return take(output, { + HostPath: (_) => [, de_HostPath(_, context), `hostPath`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1VolumeDetail */ const de_VolumeDetail = (output: any, context: __SerdeContext): VolumeDetail => { - return { - DeviceName: __expectString(output.deviceName), - EncryptionType: __expectString(output.encryptionType), - KmsKeyArn: __expectString(output.kmsKeyArn), - SnapshotArn: __expectString(output.snapshotArn), - VolumeArn: __expectString(output.volumeArn), - VolumeSizeInGB: __expectInt32(output.volumeSizeInGB), - VolumeType: __expectString(output.volumeType), - } as any; + return take(output, { + DeviceName: [, __expectString, `deviceName`], + EncryptionType: [, __expectString, `encryptionType`], + KmsKeyArn: [, __expectString, `kmsKeyArn`], + SnapshotArn: [, __expectString, `snapshotArn`], + VolumeArn: [, __expectString, `volumeArn`], + VolumeSizeInGB: [, __expectInt32, `volumeSizeInGB`], + VolumeType: [, __expectString, `volumeType`], + }) as any; }; /** @@ -9072,9 +8404,6 @@ const de_VolumeDetails = (output: any, context: __SerdeContext): VolumeDetail[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VolumeDetail(entry, context); }); return retVal; @@ -9084,10 +8413,10 @@ const de_VolumeDetails = (output: any, context: __SerdeContext): VolumeDetail[] * deserializeAws_restJson1VolumeMount */ const de_VolumeMount = (output: any, context: __SerdeContext): VolumeMount => { - return { - MountPath: __expectString(output.mountPath), - Name: __expectString(output.name), - } as any; + return take(output, { + MountPath: [, __expectString, `mountPath`], + Name: [, __expectString, `name`], + }) as any; }; /** @@ -9097,9 +8426,6 @@ const de_VolumeMounts = (output: any, context: __SerdeContext): VolumeMount[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VolumeMount(entry, context); }); return retVal; @@ -9112,9 +8438,6 @@ const de_Volumes = (output: any, context: __SerdeContext): Volume[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Volume(entry, context); }); return retVal; diff --git a/clients/client-health/src/protocols/Aws_json1_1.ts b/clients/client-health/src/protocols/Aws_json1_1.ts index 11673a1c7e74..df363ff7c70f 100644 --- a/clients/client-health/src/protocols/Aws_json1_1.ts +++ b/clients/client-health/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -68,15 +69,12 @@ import { ConcurrentModificationException, DateTimeRange, DescribeAffectedAccountsForOrganizationRequest, - DescribeAffectedAccountsForOrganizationResponse, DescribeAffectedEntitiesForOrganizationRequest, DescribeAffectedEntitiesForOrganizationResponse, DescribeAffectedEntitiesRequest, DescribeAffectedEntitiesResponse, DescribeEntityAggregatesRequest, - DescribeEntityAggregatesResponse, DescribeEventAggregatesRequest, - DescribeEventAggregatesResponse, DescribeEventDetailsForOrganizationRequest, DescribeEventDetailsForOrganizationResponse, DescribeEventDetailsRequest, @@ -86,27 +84,18 @@ import { DescribeEventsRequest, DescribeEventsResponse, DescribeEventTypesRequest, - DescribeEventTypesResponse, - DescribeHealthServiceStatusForOrganizationResponse, - EntityAggregate, EntityFilter, EntityStatusCode, Event, EventAccountFilter, - EventAggregate, - EventDescription, EventDetails, - EventDetailsErrorItem, EventFilter, EventStatusCode, - EventType, EventTypeCategory, EventTypeFilter, InvalidPaginationToken, - OrganizationAffectedEntitiesErrorItem, OrganizationEvent, OrganizationEventDetails, - OrganizationEventDetailsErrorItem, OrganizationEventFilter, UnsupportedLocale, } from "../models/models_0"; @@ -120,7 +109,7 @@ export const se_DescribeAffectedAccountsForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAffectedAccountsForOrganization"); let body: any; - body = JSON.stringify(se_DescribeAffectedAccountsForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -146,7 +135,7 @@ export const se_DescribeAffectedEntitiesForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAffectedEntitiesForOrganization"); let body: any; - body = JSON.stringify(se_DescribeAffectedEntitiesForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -159,7 +148,7 @@ export const se_DescribeEntityAggregatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEntityAggregates"); let body: any; - body = JSON.stringify(se_DescribeEntityAggregatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -185,7 +174,7 @@ export const se_DescribeEventDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventDetails"); let body: any; - body = JSON.stringify(se_DescribeEventDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -198,7 +187,7 @@ export const se_DescribeEventDetailsForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventDetailsForOrganization"); let body: any; - body = JSON.stringify(se_DescribeEventDetailsForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -237,7 +226,7 @@ export const se_DescribeEventTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventTypes"); let body: any; - body = JSON.stringify(se_DescribeEventTypesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,12 +278,12 @@ export const de_DescribeAffectedAccountsForOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAffectedAccountsForOrganizationResponse(data, context); + contents = _json(data); const response: DescribeAffectedAccountsForOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -315,10 +304,9 @@ const de_DescribeAffectedAccountsForOrganizationCommandError = async ( throw await de_InvalidPaginationTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -341,7 +329,7 @@ export const de_DescribeAffectedEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -365,10 +353,9 @@ const de_DescribeAffectedEntitiesCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -391,7 +378,7 @@ export const de_DescribeAffectedEntitiesForOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -415,10 +402,9 @@ const de_DescribeAffectedEntitiesForOrganizationCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -436,12 +422,12 @@ export const de_DescribeEntityAggregatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEntityAggregatesResponse(data, context); + contents = _json(data); const response: DescribeEntityAggregatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -457,10 +443,9 @@ const de_DescribeEntityAggregatesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -477,12 +462,12 @@ export const de_DescribeEventAggregatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEventAggregatesResponse(data, context); + contents = _json(data); const response: DescribeEventAggregatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -503,10 +488,9 @@ const de_DescribeEventAggregatesCommandError = async ( throw await de_InvalidPaginationTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -529,7 +513,7 @@ export const de_DescribeEventDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -550,10 +534,9 @@ const de_DescribeEventDetailsCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -576,7 +559,7 @@ export const de_DescribeEventDetailsForOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -597,10 +580,9 @@ const de_DescribeEventDetailsForOrganizationCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -623,7 +605,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -647,10 +629,9 @@ const de_DescribeEventsCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -673,7 +654,7 @@ export const de_DescribeEventsForOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -697,10 +678,9 @@ const de_DescribeEventsForOrganizationCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -718,12 +698,12 @@ export const de_DescribeEventTypesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEventTypesResponse(data, context); + contents = _json(data); const response: DescribeEventTypesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -747,10 +727,9 @@ const de_DescribeEventTypesCommandError = async ( throw await de_UnsupportedLocaleRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -768,12 +747,12 @@ export const de_DescribeHealthServiceStatusForOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeHealthServiceStatusForOrganizationResponse(data, context); + contents = _json(data); const response: DescribeHealthServiceStatusForOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -789,10 +768,9 @@ const de_DescribeHealthServiceStatusForOrganizationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -811,7 +789,7 @@ export const de_DisableHealthServiceAccessForOrganizationCommand = async ( const response: DisableHealthServiceAccessForOrganizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -832,10 +810,9 @@ const de_DisableHealthServiceAccessForOrganizationCommandError = async ( throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -855,7 +832,7 @@ export const de_EnableHealthServiceAccessForOrganizationCommand = async ( const response: EnableHealthServiceAccessForOrganizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -876,10 +853,9 @@ const de_EnableHealthServiceAccessForOrganizationCommandError = async ( throw await de_ConcurrentModificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -893,7 +869,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -909,7 +885,7 @@ const de_InvalidPaginationTokenRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPaginationToken(body, context); + const deserialized: any = _json(body); const exception = new InvalidPaginationToken({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -922,7 +898,7 @@ const de_InvalidPaginationTokenRes = async ( */ const de_UnsupportedLocaleRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedLocale(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedLocale({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -930,36 +906,18 @@ const de_UnsupportedLocaleRes = async (parsedOutput: any, context: __SerdeContex return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1availabilityZones - */ -const se_availabilityZones = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_availabilityZones omitted. -/** - * serializeAws_json1_1awsAccountIdsList - */ -const se_awsAccountIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_awsAccountIdsList omitted. /** * serializeAws_json1_1DateTimeRange */ const se_DateTimeRange = (input: DateTimeRange, context: __SerdeContext): any => { - return { - ...(input.from != null && { from: Math.round(input.from.getTime() / 1000) }), - ...(input.to != null && { to: Math.round(input.to.getTime() / 1000) }), - }; + return take(input, { + from: (_) => Math.round(_.getTime() / 1000), + to: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -973,97 +931,39 @@ const se_dateTimeRangeList = (input: DateTimeRange[], context: __SerdeContext): }); }; -/** - * serializeAws_json1_1DescribeAffectedAccountsForOrganizationRequest - */ -const se_DescribeAffectedAccountsForOrganizationRequest = ( - input: DescribeAffectedAccountsForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.eventArn != null && { eventArn: input.eventArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeAffectedAccountsForOrganizationRequest omitted. -/** - * serializeAws_json1_1DescribeAffectedEntitiesForOrganizationRequest - */ -const se_DescribeAffectedEntitiesForOrganizationRequest = ( - input: DescribeAffectedEntitiesForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.locale != null && { locale: input.locale }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.organizationEntityFilters != null && { - organizationEntityFilters: se_OrganizationEntityFiltersList(input.organizationEntityFilters, context), - }), - }; -}; +// se_DescribeAffectedEntitiesForOrganizationRequest omitted. /** * serializeAws_json1_1DescribeAffectedEntitiesRequest */ const se_DescribeAffectedEntitiesRequest = (input: DescribeAffectedEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_EntityFilter(input.filter, context) }), - ...(input.locale != null && { locale: input.locale }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; + return take(input, { + filter: (_) => se_EntityFilter(_, context), + locale: [], + maxResults: [], + nextToken: [], + }); }; -/** - * serializeAws_json1_1DescribeEntityAggregatesRequest - */ -const se_DescribeEntityAggregatesRequest = (input: DescribeEntityAggregatesRequest, context: __SerdeContext): any => { - return { - ...(input.eventArns != null && { eventArns: se_EventArnsList(input.eventArns, context) }), - }; -}; +// se_DescribeEntityAggregatesRequest omitted. /** * serializeAws_json1_1DescribeEventAggregatesRequest */ const se_DescribeEventAggregatesRequest = (input: DescribeEventAggregatesRequest, context: __SerdeContext): any => { - return { - ...(input.aggregateField != null && { aggregateField: input.aggregateField }), - ...(input.filter != null && { filter: se_EventFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; + return take(input, { + aggregateField: [], + filter: (_) => se_EventFilter(_, context), + maxResults: [], + nextToken: [], + }); }; -/** - * serializeAws_json1_1DescribeEventDetailsForOrganizationRequest - */ -const se_DescribeEventDetailsForOrganizationRequest = ( - input: DescribeEventDetailsForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.locale != null && { locale: input.locale }), - ...(input.organizationEventDetailFilters != null && { - organizationEventDetailFilters: se_OrganizationEventDetailFiltersList( - input.organizationEventDetailFilters, - context - ), - }), - }; -}; +// se_DescribeEventDetailsForOrganizationRequest omitted. -/** - * serializeAws_json1_1DescribeEventDetailsRequest - */ -const se_DescribeEventDetailsRequest = (input: DescribeEventDetailsRequest, context: __SerdeContext): any => { - return { - ...(input.eventArns != null && { eventArns: se_eventArnList(input.eventArns, context) }), - ...(input.locale != null && { locale: input.locale }), - }; -}; +// se_DescribeEventDetailsRequest omitted. /** * serializeAws_json1_1DescribeEventsForOrganizationRequest @@ -1072,378 +972,141 @@ const se_DescribeEventsForOrganizationRequest = ( input: DescribeEventsForOrganizationRequest, context: __SerdeContext ): any => { - return { - ...(input.filter != null && { filter: se_OrganizationEventFilter(input.filter, context) }), - ...(input.locale != null && { locale: input.locale }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; + return take(input, { + filter: (_) => se_OrganizationEventFilter(_, context), + locale: [], + maxResults: [], + nextToken: [], + }); }; /** * serializeAws_json1_1DescribeEventsRequest */ const se_DescribeEventsRequest = (input: DescribeEventsRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_EventFilter(input.filter, context) }), - ...(input.locale != null && { locale: input.locale }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; + return take(input, { + filter: (_) => se_EventFilter(_, context), + locale: [], + maxResults: [], + nextToken: [], + }); }; -/** - * serializeAws_json1_1DescribeEventTypesRequest - */ -const se_DescribeEventTypesRequest = (input: DescribeEventTypesRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_EventTypeFilter(input.filter, context) }), - ...(input.locale != null && { locale: input.locale }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeEventTypesRequest omitted. -/** - * serializeAws_json1_1entityArnList - */ -const se_entityArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_entityArnList omitted. /** * serializeAws_json1_1EntityFilter */ const se_EntityFilter = (input: EntityFilter, context: __SerdeContext): any => { - return { - ...(input.entityArns != null && { entityArns: se_entityArnList(input.entityArns, context) }), - ...(input.entityValues != null && { entityValues: se_entityValueList(input.entityValues, context) }), - ...(input.eventArns != null && { eventArns: se_eventArnList(input.eventArns, context) }), - ...(input.lastUpdatedTimes != null && { lastUpdatedTimes: se_dateTimeRangeList(input.lastUpdatedTimes, context) }), - ...(input.statusCodes != null && { statusCodes: se_entityStatusCodeList(input.statusCodes, context) }), - ...(input.tags != null && { tags: se_tagFilter(input.tags, context) }), - }; + return take(input, { + entityArns: _json, + entityValues: _json, + eventArns: _json, + lastUpdatedTimes: (_) => se_dateTimeRangeList(_, context), + statusCodes: _json, + tags: _json, + }); }; -/** - * serializeAws_json1_1entityStatusCodeList - */ -const se_entityStatusCodeList = (input: (EntityStatusCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_entityStatusCodeList omitted. -/** - * serializeAws_json1_1entityValueList - */ -const se_entityValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_entityValueList omitted. -/** - * serializeAws_json1_1EventAccountFilter - */ -const se_EventAccountFilter = (input: EventAccountFilter, context: __SerdeContext): any => { - return { - ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }), - ...(input.eventArn != null && { eventArn: input.eventArn }), - }; -}; +// se_EventAccountFilter omitted. -/** - * serializeAws_json1_1eventArnList - */ -const se_eventArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_eventArnList omitted. -/** - * serializeAws_json1_1EventArnsList - */ -const se_EventArnsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventArnsList omitted. /** * serializeAws_json1_1EventFilter */ const se_EventFilter = (input: EventFilter, context: __SerdeContext): any => { - return { - ...(input.availabilityZones != null && { - availabilityZones: se_availabilityZones(input.availabilityZones, context), - }), - ...(input.endTimes != null && { endTimes: se_dateTimeRangeList(input.endTimes, context) }), - ...(input.entityArns != null && { entityArns: se_entityArnList(input.entityArns, context) }), - ...(input.entityValues != null && { entityValues: se_entityValueList(input.entityValues, context) }), - ...(input.eventArns != null && { eventArns: se_eventArnList(input.eventArns, context) }), - ...(input.eventStatusCodes != null && { - eventStatusCodes: se_eventStatusCodeList(input.eventStatusCodes, context), - }), - ...(input.eventTypeCategories != null && { - eventTypeCategories: se_eventTypeCategoryList2(input.eventTypeCategories, context), - }), - ...(input.eventTypeCodes != null && { eventTypeCodes: se_eventTypeList2(input.eventTypeCodes, context) }), - ...(input.lastUpdatedTimes != null && { lastUpdatedTimes: se_dateTimeRangeList(input.lastUpdatedTimes, context) }), - ...(input.regions != null && { regions: se_regionList(input.regions, context) }), - ...(input.services != null && { services: se_serviceList(input.services, context) }), - ...(input.startTimes != null && { startTimes: se_dateTimeRangeList(input.startTimes, context) }), - ...(input.tags != null && { tags: se_tagFilter(input.tags, context) }), - }; + return take(input, { + availabilityZones: _json, + endTimes: (_) => se_dateTimeRangeList(_, context), + entityArns: _json, + entityValues: _json, + eventArns: _json, + eventStatusCodes: _json, + eventTypeCategories: _json, + eventTypeCodes: _json, + lastUpdatedTimes: (_) => se_dateTimeRangeList(_, context), + regions: _json, + services: _json, + startTimes: (_) => se_dateTimeRangeList(_, context), + tags: _json, + }); }; -/** - * serializeAws_json1_1eventStatusCodeList - */ -const se_eventStatusCodeList = (input: (EventStatusCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_eventStatusCodeList omitted. -/** - * serializeAws_json1_1EventTypeCategoryList - */ -const se_EventTypeCategoryList = (input: (EventTypeCategory | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypeCategoryList omitted. -/** - * serializeAws_json1_1eventTypeCategoryList2 - */ -const se_eventTypeCategoryList2 = (input: (EventTypeCategory | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_eventTypeCategoryList2 omitted. -/** - * serializeAws_json1_1EventTypeCodeList - */ -const se_EventTypeCodeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypeCodeList omitted. -/** - * serializeAws_json1_1EventTypeFilter - */ -const se_EventTypeFilter = (input: EventTypeFilter, context: __SerdeContext): any => { - return { - ...(input.eventTypeCategories != null && { - eventTypeCategories: se_EventTypeCategoryList(input.eventTypeCategories, context), - }), - ...(input.eventTypeCodes != null && { eventTypeCodes: se_EventTypeCodeList(input.eventTypeCodes, context) }), - ...(input.services != null && { services: se_serviceList(input.services, context) }), - }; -}; +// se_EventTypeFilter omitted. -/** - * serializeAws_json1_1eventTypeList2 - */ -const se_eventTypeList2 = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_eventTypeList2 omitted. -/** - * serializeAws_json1_1OrganizationEntityFiltersList - */ -const se_OrganizationEntityFiltersList = (input: EventAccountFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EventAccountFilter(entry, context); - }); -}; +// se_OrganizationEntityFiltersList omitted. -/** - * serializeAws_json1_1OrganizationEventDetailFiltersList - */ -const se_OrganizationEventDetailFiltersList = (input: EventAccountFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EventAccountFilter(entry, context); - }); -}; +// se_OrganizationEventDetailFiltersList omitted. /** * serializeAws_json1_1OrganizationEventFilter */ const se_OrganizationEventFilter = (input: OrganizationEventFilter, context: __SerdeContext): any => { - return { - ...(input.awsAccountIds != null && { awsAccountIds: se_awsAccountIdsList(input.awsAccountIds, context) }), - ...(input.endTime != null && { endTime: se_DateTimeRange(input.endTime, context) }), - ...(input.entityArns != null && { entityArns: se_entityArnList(input.entityArns, context) }), - ...(input.entityValues != null && { entityValues: se_entityValueList(input.entityValues, context) }), - ...(input.eventStatusCodes != null && { - eventStatusCodes: se_eventStatusCodeList(input.eventStatusCodes, context), - }), - ...(input.eventTypeCategories != null && { - eventTypeCategories: se_eventTypeCategoryList2(input.eventTypeCategories, context), - }), - ...(input.eventTypeCodes != null && { eventTypeCodes: se_eventTypeList2(input.eventTypeCodes, context) }), - ...(input.lastUpdatedTime != null && { lastUpdatedTime: se_DateTimeRange(input.lastUpdatedTime, context) }), - ...(input.regions != null && { regions: se_regionList(input.regions, context) }), - ...(input.services != null && { services: se_serviceList(input.services, context) }), - ...(input.startTime != null && { startTime: se_DateTimeRange(input.startTime, context) }), - }; + return take(input, { + awsAccountIds: _json, + endTime: (_) => se_DateTimeRange(_, context), + entityArns: _json, + entityValues: _json, + eventStatusCodes: _json, + eventTypeCategories: _json, + eventTypeCodes: _json, + lastUpdatedTime: (_) => se_DateTimeRange(_, context), + regions: _json, + services: _json, + startTime: (_) => se_DateTimeRange(_, context), + }); }; -/** - * serializeAws_json1_1regionList - */ -const se_regionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_regionList omitted. -/** - * serializeAws_json1_1serviceList - */ -const se_serviceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_serviceList omitted. -/** - * serializeAws_json1_1tagFilter - */ -const se_tagFilter = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_tagSet(entry, context); - }); -}; +// se_tagFilter omitted. -/** - * serializeAws_json1_1tagSet - */ -const se_tagSet = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_tagSet omitted. -/** - * deserializeAws_json1_1affectedAccountsList - */ -const de_affectedAccountsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_affectedAccountsList omitted. /** * deserializeAws_json1_1AffectedEntity */ const de_AffectedEntity = (output: any, context: __SerdeContext): AffectedEntity => { - return { - awsAccountId: __expectString(output.awsAccountId), - entityArn: __expectString(output.entityArn), - entityUrl: __expectString(output.entityUrl), - entityValue: __expectString(output.entityValue), - eventArn: __expectString(output.eventArn), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - statusCode: __expectString(output.statusCode), - tags: output.tags != null ? de_tagSet(output.tags, context) : undefined, - } as any; + return take(output, { + awsAccountId: __expectString, + entityArn: __expectString, + entityUrl: __expectString, + entityValue: __expectString, + eventArn: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + statusCode: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1DescribeAffectedAccountsForOrganizationResponse - */ -const de_DescribeAffectedAccountsForOrganizationResponse = ( - output: any, - context: __SerdeContext -): DescribeAffectedAccountsForOrganizationResponse => { - return { - affectedAccounts: - output.affectedAccounts != null ? de_affectedAccountsList(output.affectedAccounts, context) : undefined, - eventScopeCode: __expectString(output.eventScopeCode), - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeAffectedAccountsForOrganizationResponse omitted. -/** - * deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationFailedSet - */ -const de_DescribeAffectedEntitiesForOrganizationFailedSet = ( - output: any, - context: __SerdeContext -): OrganizationAffectedEntitiesErrorItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationAffectedEntitiesErrorItem(entry, context); - }); - return retVal; -}; +// de_DescribeAffectedEntitiesForOrganizationFailedSet omitted. /** * deserializeAws_json1_1DescribeAffectedEntitiesForOrganizationResponse @@ -1452,14 +1115,11 @@ const de_DescribeAffectedEntitiesForOrganizationResponse = ( output: any, context: __SerdeContext ): DescribeAffectedEntitiesForOrganizationResponse => { - return { - entities: output.entities != null ? de_EntityList(output.entities, context) : undefined, - failedSet: - output.failedSet != null - ? de_DescribeAffectedEntitiesForOrganizationFailedSet(output.failedSet, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + entities: (_: any) => de_EntityList(_, context), + failedSet: _json, + nextToken: __expectString, + }) as any; }; /** @@ -1469,68 +1129,19 @@ const de_DescribeAffectedEntitiesResponse = ( output: any, context: __SerdeContext ): DescribeAffectedEntitiesResponse => { - return { - entities: output.entities != null ? de_EntityList(output.entities, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + entities: (_: any) => de_EntityList(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeEntityAggregatesResponse - */ -const de_DescribeEntityAggregatesResponse = ( - output: any, - context: __SerdeContext -): DescribeEntityAggregatesResponse => { - return { - entityAggregates: - output.entityAggregates != null ? de_EntityAggregateList(output.entityAggregates, context) : undefined, - } as any; -}; +// de_DescribeEntityAggregatesResponse omitted. -/** - * deserializeAws_json1_1DescribeEventAggregatesResponse - */ -const de_DescribeEventAggregatesResponse = (output: any, context: __SerdeContext): DescribeEventAggregatesResponse => { - return { - eventAggregates: - output.eventAggregates != null ? de_EventAggregateList(output.eventAggregates, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeEventAggregatesResponse omitted. -/** - * deserializeAws_json1_1DescribeEventDetailsFailedSet - */ -const de_DescribeEventDetailsFailedSet = (output: any, context: __SerdeContext): EventDetailsErrorItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventDetailsErrorItem(entry, context); - }); - return retVal; -}; +// de_DescribeEventDetailsFailedSet omitted. -/** - * deserializeAws_json1_1DescribeEventDetailsForOrganizationFailedSet - */ -const de_DescribeEventDetailsForOrganizationFailedSet = ( - output: any, - context: __SerdeContext -): OrganizationEventDetailsErrorItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationEventDetailsErrorItem(entry, context); - }); - return retVal; -}; +// de_DescribeEventDetailsForOrganizationFailedSet omitted. /** * deserializeAws_json1_1DescribeEventDetailsForOrganizationResponse @@ -1539,14 +1150,10 @@ const de_DescribeEventDetailsForOrganizationResponse = ( output: any, context: __SerdeContext ): DescribeEventDetailsForOrganizationResponse => { - return { - failedSet: - output.failedSet != null ? de_DescribeEventDetailsForOrganizationFailedSet(output.failedSet, context) : undefined, - successfulSet: - output.successfulSet != null - ? de_DescribeEventDetailsForOrganizationSuccessfulSet(output.successfulSet, context) - : undefined, - } as any; + return take(output, { + failedSet: _json, + successfulSet: (_: any) => de_DescribeEventDetailsForOrganizationSuccessfulSet(_, context), + }) as any; }; /** @@ -1559,9 +1166,6 @@ const de_DescribeEventDetailsForOrganizationSuccessfulSet = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OrganizationEventDetails(entry, context); }); return retVal; @@ -1571,11 +1175,10 @@ const de_DescribeEventDetailsForOrganizationSuccessfulSet = ( * deserializeAws_json1_1DescribeEventDetailsResponse */ const de_DescribeEventDetailsResponse = (output: any, context: __SerdeContext): DescribeEventDetailsResponse => { - return { - failedSet: output.failedSet != null ? de_DescribeEventDetailsFailedSet(output.failedSet, context) : undefined, - successfulSet: - output.successfulSet != null ? de_DescribeEventDetailsSuccessfulSet(output.successfulSet, context) : undefined, - } as any; + return take(output, { + failedSet: _json, + successfulSet: (_: any) => de_DescribeEventDetailsSuccessfulSet(_, context), + }) as any; }; /** @@ -1585,9 +1188,6 @@ const de_DescribeEventDetailsSuccessfulSet = (output: any, context: __SerdeConte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventDetails(entry, context); }); return retVal; @@ -1600,68 +1200,29 @@ const de_DescribeEventsForOrganizationResponse = ( output: any, context: __SerdeContext ): DescribeEventsForOrganizationResponse => { - return { - events: output.events != null ? de_OrganizationEventList(output.events, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + events: (_: any) => de_OrganizationEventList(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeEventsResponse */ const de_DescribeEventsResponse = (output: any, context: __SerdeContext): DescribeEventsResponse => { - return { - events: output.events != null ? de_EventList(output.events, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + events: (_: any) => de_EventList(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeEventTypesResponse - */ -const de_DescribeEventTypesResponse = (output: any, context: __SerdeContext): DescribeEventTypesResponse => { - return { - eventTypes: output.eventTypes != null ? de_EventTypeList(output.eventTypes, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeEventTypesResponse omitted. -/** - * deserializeAws_json1_1DescribeHealthServiceStatusForOrganizationResponse - */ -const de_DescribeHealthServiceStatusForOrganizationResponse = ( - output: any, - context: __SerdeContext -): DescribeHealthServiceStatusForOrganizationResponse => { - return { - healthServiceAccessStatusForOrganization: __expectString(output.healthServiceAccessStatusForOrganization), - } as any; -}; +// de_DescribeHealthServiceStatusForOrganizationResponse omitted. -/** - * deserializeAws_json1_1EntityAggregate - */ -const de_EntityAggregate = (output: any, context: __SerdeContext): EntityAggregate => { - return { - count: __expectInt32(output.count), - eventArn: __expectString(output.eventArn), - } as any; -}; +// de_EntityAggregate omitted. -/** - * deserializeAws_json1_1EntityAggregateList - */ -const de_EntityAggregateList = (output: any, context: __SerdeContext): EntityAggregate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntityAggregate(entry, context); - }); - return retVal; -}; +// de_EntityAggregateList omitted. /** * deserializeAws_json1_1EntityList @@ -1670,9 +1231,6 @@ const de_EntityList = (output: any, context: __SerdeContext): AffectedEntity[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AffectedEntity(entry, context); }); return retVal; @@ -1682,82 +1240,39 @@ const de_EntityList = (output: any, context: __SerdeContext): AffectedEntity[] = * deserializeAws_json1_1Event */ const de_Event = (output: any, context: __SerdeContext): Event => { - return { - arn: __expectString(output.arn), - availabilityZone: __expectString(output.availabilityZone), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - eventScopeCode: __expectString(output.eventScopeCode), - eventTypeCategory: __expectString(output.eventTypeCategory), - eventTypeCode: __expectString(output.eventTypeCode), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - region: __expectString(output.region), - service: __expectString(output.service), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - statusCode: __expectString(output.statusCode), - } as any; -}; - -/** - * deserializeAws_json1_1EventAggregate - */ -const de_EventAggregate = (output: any, context: __SerdeContext): EventAggregate => { - return { - aggregateValue: __expectString(output.aggregateValue), - count: __expectInt32(output.count), - } as any; + return take(output, { + arn: __expectString, + availabilityZone: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventScopeCode: __expectString, + eventTypeCategory: __expectString, + eventTypeCode: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + region: __expectString, + service: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + statusCode: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1EventAggregateList - */ -const de_EventAggregateList = (output: any, context: __SerdeContext): EventAggregate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventAggregate(entry, context); - }); - return retVal; -}; +// de_EventAggregate omitted. -/** - * deserializeAws_json1_1EventDescription - */ -const de_EventDescription = (output: any, context: __SerdeContext): EventDescription => { - return { - latestDescription: __expectString(output.latestDescription), - } as any; -}; +// de_EventAggregateList omitted. + +// de_EventDescription omitted. /** * deserializeAws_json1_1EventDetails */ const de_EventDetails = (output: any, context: __SerdeContext): EventDetails => { - return { - event: output.event != null ? de_Event(output.event, context) : undefined, - eventDescription: - output.eventDescription != null ? de_EventDescription(output.eventDescription, context) : undefined, - eventMetadata: output.eventMetadata != null ? de_eventMetadata(output.eventMetadata, context) : undefined, - } as any; + return take(output, { + event: (_: any) => de_Event(_, context), + eventDescription: _json, + eventMetadata: _json, + }) as any; }; -/** - * deserializeAws_json1_1EventDetailsErrorItem - */ -const de_EventDetailsErrorItem = (output: any, context: __SerdeContext): EventDetailsErrorItem => { - return { - errorMessage: __expectString(output.errorMessage), - errorName: __expectString(output.errorName), - eventArn: __expectString(output.eventArn), - } as any; -}; +// de_EventDetailsErrorItem omitted. /** * deserializeAws_json1_1EventList @@ -1766,127 +1281,52 @@ const de_EventList = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Event(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1eventMetadata - */ -const de_eventMetadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_eventMetadata omitted. -/** - * deserializeAws_json1_1EventType - */ -const de_EventType = (output: any, context: __SerdeContext): EventType => { - return { - category: __expectString(output.category), - code: __expectString(output.code), - service: __expectString(output.service), - } as any; -}; +// de_EventType omitted. -/** - * deserializeAws_json1_1EventTypeList - */ -const de_EventTypeList = (output: any, context: __SerdeContext): EventType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventType(entry, context); - }); - return retVal; -}; +// de_EventTypeList omitted. -/** - * deserializeAws_json1_1InvalidPaginationToken - */ -const de_InvalidPaginationToken = (output: any, context: __SerdeContext): InvalidPaginationToken => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPaginationToken omitted. -/** - * deserializeAws_json1_1OrganizationAffectedEntitiesErrorItem - */ -const de_OrganizationAffectedEntitiesErrorItem = ( - output: any, - context: __SerdeContext -): OrganizationAffectedEntitiesErrorItem => { - return { - awsAccountId: __expectString(output.awsAccountId), - errorMessage: __expectString(output.errorMessage), - errorName: __expectString(output.errorName), - eventArn: __expectString(output.eventArn), - } as any; -}; +// de_OrganizationAffectedEntitiesErrorItem omitted. /** * deserializeAws_json1_1OrganizationEvent */ const de_OrganizationEvent = (output: any, context: __SerdeContext): OrganizationEvent => { - return { - arn: __expectString(output.arn), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - eventScopeCode: __expectString(output.eventScopeCode), - eventTypeCategory: __expectString(output.eventTypeCategory), - eventTypeCode: __expectString(output.eventTypeCode), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - region: __expectString(output.region), - service: __expectString(output.service), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - statusCode: __expectString(output.statusCode), - } as any; + return take(output, { + arn: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventScopeCode: __expectString, + eventTypeCategory: __expectString, + eventTypeCode: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + region: __expectString, + service: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + statusCode: __expectString, + }) as any; }; /** * deserializeAws_json1_1OrganizationEventDetails */ const de_OrganizationEventDetails = (output: any, context: __SerdeContext): OrganizationEventDetails => { - return { - awsAccountId: __expectString(output.awsAccountId), - event: output.event != null ? de_Event(output.event, context) : undefined, - eventDescription: - output.eventDescription != null ? de_EventDescription(output.eventDescription, context) : undefined, - eventMetadata: output.eventMetadata != null ? de_eventMetadata(output.eventMetadata, context) : undefined, - } as any; + return take(output, { + awsAccountId: __expectString, + event: (_: any) => de_Event(_, context), + eventDescription: _json, + eventMetadata: _json, + }) as any; }; -/** - * deserializeAws_json1_1OrganizationEventDetailsErrorItem - */ -const de_OrganizationEventDetailsErrorItem = ( - output: any, - context: __SerdeContext -): OrganizationEventDetailsErrorItem => { - return { - awsAccountId: __expectString(output.awsAccountId), - errorMessage: __expectString(output.errorMessage), - errorName: __expectString(output.errorName), - eventArn: __expectString(output.eventArn), - } as any; -}; +// de_OrganizationEventDetailsErrorItem omitted. /** * deserializeAws_json1_1OrganizationEventList @@ -1895,35 +1335,14 @@ const de_OrganizationEventList = (output: any, context: __SerdeContext): Organiz const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OrganizationEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1tagSet - */ -const de_tagSet = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_tagSet omitted. -/** - * deserializeAws_json1_1UnsupportedLocale - */ -const de_UnsupportedLocale = (output: any, context: __SerdeContext): UnsupportedLocale => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedLocale omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1945,6 +1364,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-healthlake/src/protocols/Aws_json1_0.ts b/clients/client-healthlake/src/protocols/Aws_json1_0.ts index 869428c9a816..dd75a8b8911a 100644 --- a/clients/client-healthlake/src/protocols/Aws_json1_0.ts +++ b/clients/client-healthlake/src/protocols/Aws_json1_0.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, expectUnion as __expectUnion, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -53,11 +55,9 @@ import { AccessDeniedException, ConflictException, CreateFHIRDatastoreRequest, - CreateFHIRDatastoreResponse, DatastoreFilter, DatastoreProperties, DeleteFHIRDatastoreRequest, - DeleteFHIRDatastoreResponse, DescribeFHIRDatastoreRequest, DescribeFHIRDatastoreResponse, DescribeFHIRExportJobRequest, @@ -76,22 +76,17 @@ import { ListFHIRImportJobsRequest, ListFHIRImportJobsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, OutputDataConfig, PreloadDataConfig, ResourceNotFoundException, S3Configuration, SseConfiguration, StartFHIRExportJobRequest, - StartFHIRExportJobResponse, StartFHIRImportJobRequest, - StartFHIRImportJobResponse, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, UntagResourceRequest, - UntagResourceResponse, ValidationException, } from "../models/models_0"; @@ -117,7 +112,7 @@ export const se_DeleteFHIRDatastoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFHIRDatastore"); let body: any; - body = JSON.stringify(se_DeleteFHIRDatastoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -130,7 +125,7 @@ export const se_DescribeFHIRDatastoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFHIRDatastore"); let body: any; - body = JSON.stringify(se_DescribeFHIRDatastoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -143,7 +138,7 @@ export const se_DescribeFHIRExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFHIRExportJob"); let body: any; - body = JSON.stringify(se_DescribeFHIRExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -156,7 +151,7 @@ export const se_DescribeFHIRImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFHIRImportJob"); let body: any; - body = JSON.stringify(se_DescribeFHIRImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -208,7 +203,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -247,7 +242,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -260,7 +255,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -276,12 +271,12 @@ export const de_CreateFHIRDatastoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFHIRDatastoreResponse(data, context); + contents = _json(data); const response: CreateFHIRDatastoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -311,10 +306,9 @@ const de_CreateFHIRDatastoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -332,12 +326,12 @@ export const de_DeleteFHIRDatastoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFHIRDatastoreResponse(data, context); + contents = _json(data); const response: DeleteFHIRDatastoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -373,10 +367,9 @@ const de_DeleteFHIRDatastoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -399,7 +392,7 @@ export const de_DescribeFHIRDatastoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -429,10 +422,9 @@ const de_DescribeFHIRDatastoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -455,7 +447,7 @@ export const de_DescribeFHIRExportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -485,10 +477,9 @@ const de_DescribeFHIRExportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -511,7 +502,7 @@ export const de_DescribeFHIRImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -541,10 +532,9 @@ const de_DescribeFHIRImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -567,7 +557,7 @@ export const de_ListFHIRDatastoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -594,10 +584,9 @@ const de_ListFHIRDatastoresCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -620,7 +609,7 @@ export const de_ListFHIRExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -653,10 +642,9 @@ const de_ListFHIRExportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -679,7 +667,7 @@ export const de_ListFHIRImportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -712,10 +700,9 @@ const de_ListFHIRImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -733,12 +720,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -762,10 +749,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -783,12 +769,12 @@ export const de_StartFHIRExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFHIRExportJobResponse(data, context); + contents = _json(data); const response: StartFHIRExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -821,10 +807,9 @@ const de_StartFHIRExportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -842,12 +827,12 @@ export const de_StartFHIRImportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFHIRImportJobResponse(data, context); + contents = _json(data); const response: StartFHIRImportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -880,10 +865,9 @@ const de_StartFHIRImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -901,12 +885,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -930,10 +914,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -951,12 +934,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -980,10 +963,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -997,7 +979,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1010,7 +992,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1026,7 +1008,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1042,7 +1024,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1055,7 +1037,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1068,7 +1050,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1080,307 +1062,149 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_0CreateFHIRDatastoreRequest */ const se_CreateFHIRDatastoreRequest = (input: CreateFHIRDatastoreRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DatastoreName != null && { DatastoreName: input.DatastoreName }), - ...(input.DatastoreTypeVersion != null && { DatastoreTypeVersion: input.DatastoreTypeVersion }), - ...(input.PreloadDataConfig != null && { - PreloadDataConfig: se_PreloadDataConfig(input.PreloadDataConfig, context), - }), - ...(input.SseConfiguration != null && { SseConfiguration: se_SseConfiguration(input.SseConfiguration, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DatastoreName: [], + DatastoreTypeVersion: [], + PreloadDataConfig: _json, + SseConfiguration: _json, + Tags: _json, + }); }; /** * serializeAws_json1_0DatastoreFilter */ const se_DatastoreFilter = (input: DatastoreFilter, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.DatastoreName != null && { DatastoreName: input.DatastoreName }), - ...(input.DatastoreStatus != null && { DatastoreStatus: input.DatastoreStatus }), - }; + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + DatastoreName: [], + DatastoreStatus: [], + }); }; -/** - * serializeAws_json1_0DeleteFHIRDatastoreRequest - */ -const se_DeleteFHIRDatastoreRequest = (input: DeleteFHIRDatastoreRequest, context: __SerdeContext): any => { - return { - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - }; -}; +// se_DeleteFHIRDatastoreRequest omitted. -/** - * serializeAws_json1_0DescribeFHIRDatastoreRequest - */ -const se_DescribeFHIRDatastoreRequest = (input: DescribeFHIRDatastoreRequest, context: __SerdeContext): any => { - return { - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - }; -}; +// se_DescribeFHIRDatastoreRequest omitted. -/** - * serializeAws_json1_0DescribeFHIRExportJobRequest - */ -const se_DescribeFHIRExportJobRequest = (input: DescribeFHIRExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeFHIRExportJobRequest omitted. -/** - * serializeAws_json1_0DescribeFHIRImportJobRequest - */ -const se_DescribeFHIRImportJobRequest = (input: DescribeFHIRImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeFHIRImportJobRequest omitted. -/** - * serializeAws_json1_0InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return InputDataConfig.visit(input, { - S3Uri: (value) => ({ S3Uri: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_InputDataConfig omitted. -/** - * serializeAws_json1_0KmsEncryptionConfig - */ -const se_KmsEncryptionConfig = (input: KmsEncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.CmkType != null && { CmkType: input.CmkType }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; +// se_KmsEncryptionConfig omitted. /** * serializeAws_json1_0ListFHIRDatastoresRequest */ const se_ListFHIRDatastoresRequest = (input: ListFHIRDatastoresRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_DatastoreFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_DatastoreFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_0ListFHIRExportJobsRequest */ const se_ListFHIRExportJobsRequest = (input: ListFHIRExportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SubmittedAfter != null && { SubmittedAfter: Math.round(input.SubmittedAfter.getTime() / 1000) }), - ...(input.SubmittedBefore != null && { SubmittedBefore: Math.round(input.SubmittedBefore.getTime() / 1000) }), - }; + return take(input, { + DatastoreId: [], + JobName: [], + JobStatus: [], + MaxResults: [], + NextToken: [], + SubmittedAfter: (_) => Math.round(_.getTime() / 1000), + SubmittedBefore: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_0ListFHIRImportJobsRequest */ const se_ListFHIRImportJobsRequest = (input: ListFHIRImportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SubmittedAfter != null && { SubmittedAfter: Math.round(input.SubmittedAfter.getTime() / 1000) }), - ...(input.SubmittedBefore != null && { SubmittedBefore: Math.round(input.SubmittedBefore.getTime() / 1000) }), - }; + return take(input, { + DatastoreId: [], + JobName: [], + JobStatus: [], + MaxResults: [], + NextToken: [], + SubmittedAfter: (_) => Math.round(_.getTime() / 1000), + SubmittedBefore: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0OutputDataConfig - */ -const se_OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { - return OutputDataConfig.visit(input, { - S3Configuration: (value) => ({ S3Configuration: se_S3Configuration(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_OutputDataConfig omitted. -/** - * serializeAws_json1_0PreloadDataConfig - */ -const se_PreloadDataConfig = (input: PreloadDataConfig, context: __SerdeContext): any => { - return { - ...(input.PreloadDataType != null && { PreloadDataType: input.PreloadDataType }), - }; -}; +// se_PreloadDataConfig omitted. -/** - * serializeAws_json1_0S3Configuration - */ -const se_S3Configuration = (input: S3Configuration, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_S3Configuration omitted. -/** - * serializeAws_json1_0SseConfiguration - */ -const se_SseConfiguration = (input: SseConfiguration, context: __SerdeContext): any => { - return { - ...(input.KmsEncryptionConfig != null && { - KmsEncryptionConfig: se_KmsEncryptionConfig(input.KmsEncryptionConfig, context), - }), - }; -}; +// se_SseConfiguration omitted. /** * serializeAws_json1_0StartFHIRExportJobRequest */ const se_StartFHIRExportJobRequest = (input: StartFHIRExportJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DatastoreId: [], + JobName: [], + OutputDataConfig: _json, + }); }; /** * serializeAws_json1_0StartFHIRImportJobRequest */ const se_StartFHIRImportJobRequest = (input: StartFHIRImportJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DatastoreId != null && { DatastoreId: input.DatastoreId }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobOutputDataConfig != null && { - JobOutputDataConfig: se_OutputDataConfig(input.JobOutputDataConfig, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DatastoreId: [], + InputDataConfig: _json, + JobName: [], + JobOutputDataConfig: _json, + }); }; -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateFHIRDatastoreResponse - */ -const de_CreateFHIRDatastoreResponse = (output: any, context: __SerdeContext): CreateFHIRDatastoreResponse => { - return { - DatastoreArn: __expectString(output.DatastoreArn), - DatastoreEndpoint: __expectString(output.DatastoreEndpoint), - DatastoreId: __expectString(output.DatastoreId), - DatastoreStatus: __expectString(output.DatastoreStatus), - } as any; -}; +// de_CreateFHIRDatastoreResponse omitted. /** * deserializeAws_json1_0DatastoreProperties */ const de_DatastoreProperties = (output: any, context: __SerdeContext): DatastoreProperties => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DatastoreArn: __expectString(output.DatastoreArn), - DatastoreEndpoint: __expectString(output.DatastoreEndpoint), - DatastoreId: __expectString(output.DatastoreId), - DatastoreName: __expectString(output.DatastoreName), - DatastoreStatus: __expectString(output.DatastoreStatus), - DatastoreTypeVersion: __expectString(output.DatastoreTypeVersion), - PreloadDataConfig: - output.PreloadDataConfig != null ? de_PreloadDataConfig(output.PreloadDataConfig, context) : undefined, - SseConfiguration: - output.SseConfiguration != null ? de_SseConfiguration(output.SseConfiguration, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatastoreArn: __expectString, + DatastoreEndpoint: __expectString, + DatastoreId: __expectString, + DatastoreName: __expectString, + DatastoreStatus: __expectString, + DatastoreTypeVersion: __expectString, + PreloadDataConfig: _json, + SseConfiguration: _json, + }) as any; }; /** @@ -1390,76 +1214,55 @@ const de_DatastorePropertiesList = (output: any, context: __SerdeContext): Datas const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatastoreProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0DeleteFHIRDatastoreResponse - */ -const de_DeleteFHIRDatastoreResponse = (output: any, context: __SerdeContext): DeleteFHIRDatastoreResponse => { - return { - DatastoreArn: __expectString(output.DatastoreArn), - DatastoreEndpoint: __expectString(output.DatastoreEndpoint), - DatastoreId: __expectString(output.DatastoreId), - DatastoreStatus: __expectString(output.DatastoreStatus), - } as any; -}; +// de_DeleteFHIRDatastoreResponse omitted. /** * deserializeAws_json1_0DescribeFHIRDatastoreResponse */ const de_DescribeFHIRDatastoreResponse = (output: any, context: __SerdeContext): DescribeFHIRDatastoreResponse => { - return { - DatastoreProperties: - output.DatastoreProperties != null ? de_DatastoreProperties(output.DatastoreProperties, context) : undefined, - } as any; + return take(output, { + DatastoreProperties: (_: any) => de_DatastoreProperties(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeFHIRExportJobResponse */ const de_DescribeFHIRExportJobResponse = (output: any, context: __SerdeContext): DescribeFHIRExportJobResponse => { - return { - ExportJobProperties: - output.ExportJobProperties != null ? de_ExportJobProperties(output.ExportJobProperties, context) : undefined, - } as any; + return take(output, { + ExportJobProperties: (_: any) => de_ExportJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeFHIRImportJobResponse */ const de_DescribeFHIRImportJobResponse = (output: any, context: __SerdeContext): DescribeFHIRImportJobResponse => { - return { - ImportJobProperties: - output.ImportJobProperties != null ? de_ImportJobProperties(output.ImportJobProperties, context) : undefined, - } as any; + return take(output, { + ImportJobProperties: (_: any) => de_ImportJobProperties(_, context), + }) as any; }; /** * deserializeAws_json1_0ExportJobProperties */ const de_ExportJobProperties = (output: any, context: __SerdeContext): ExportJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DatastoreId: __expectString(output.DatastoreId), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null - ? de_OutputDataConfig(__expectUnion(output.OutputDataConfig), context) - : undefined, - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + DatastoreId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + Message: __expectString, + OutputDataConfig: (_: any) => _json(__expectUnion(_)), + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1469,9 +1272,6 @@ const de_ExportJobPropertiesList = (output: any, context: __SerdeContext): Expor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExportJobProperties(entry, context); }); return retVal; @@ -1481,24 +1281,18 @@ const de_ExportJobPropertiesList = (output: any, context: __SerdeContext): Expor * deserializeAws_json1_0ImportJobProperties */ const de_ImportJobProperties = (output: any, context: __SerdeContext): ImportJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DatastoreId: __expectString(output.DatastoreId), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: - output.InputDataConfig != null ? de_InputDataConfig(__expectUnion(output.InputDataConfig), context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobOutputDataConfig: - output.JobOutputDataConfig != null - ? de_OutputDataConfig(__expectUnion(output.JobOutputDataConfig), context) - : undefined, - JobStatus: __expectString(output.JobStatus), - Message: __expectString(output.Message), - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + DatastoreId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: (_: any) => _json(__expectUnion(_)), + JobId: __expectString, + JobName: __expectString, + JobOutputDataConfig: (_: any) => _json(__expectUnion(_)), + JobStatus: __expectString, + Message: __expectString, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1508,219 +1302,74 @@ const de_ImportJobPropertiesList = (output: any, context: __SerdeContext): Impor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportJobProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - if (__expectString(output.S3Uri) !== undefined) { - return { S3Uri: __expectString(output.S3Uri) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0KmsEncryptionConfig - */ -const de_KmsEncryptionConfig = (output: any, context: __SerdeContext): KmsEncryptionConfig => { - return { - CmkType: __expectString(output.CmkType), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// de_KmsEncryptionConfig omitted. /** * deserializeAws_json1_0ListFHIRDatastoresResponse */ const de_ListFHIRDatastoresResponse = (output: any, context: __SerdeContext): ListFHIRDatastoresResponse => { - return { - DatastorePropertiesList: - output.DatastorePropertiesList != null - ? de_DatastorePropertiesList(output.DatastorePropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DatastorePropertiesList: (_: any) => de_DatastorePropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListFHIRExportJobsResponse */ const de_ListFHIRExportJobsResponse = (output: any, context: __SerdeContext): ListFHIRExportJobsResponse => { - return { - ExportJobPropertiesList: - output.ExportJobPropertiesList != null - ? de_ExportJobPropertiesList(output.ExportJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ExportJobPropertiesList: (_: any) => de_ExportJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListFHIRImportJobsResponse */ const de_ListFHIRImportJobsResponse = (output: any, context: __SerdeContext): ListFHIRImportJobsResponse => { - return { - ImportJobPropertiesList: - output.ImportJobPropertiesList != null - ? de_ImportJobPropertiesList(output.ImportJobPropertiesList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ImportJobPropertiesList: (_: any) => de_ImportJobPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0OutputDataConfig - */ -const de_OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { - if (output.S3Configuration != null) { - return { - S3Configuration: de_S3Configuration(output.S3Configuration, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_OutputDataConfig omitted. -/** - * deserializeAws_json1_0PreloadDataConfig - */ -const de_PreloadDataConfig = (output: any, context: __SerdeContext): PreloadDataConfig => { - return { - PreloadDataType: __expectString(output.PreloadDataType), - } as any; -}; +// de_PreloadDataConfig omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0S3Configuration - */ -const de_S3Configuration = (output: any, context: __SerdeContext): S3Configuration => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_S3Configuration omitted. -/** - * deserializeAws_json1_0SseConfiguration - */ -const de_SseConfiguration = (output: any, context: __SerdeContext): SseConfiguration => { - return { - KmsEncryptionConfig: - output.KmsEncryptionConfig != null ? de_KmsEncryptionConfig(output.KmsEncryptionConfig, context) : undefined, - } as any; -}; +// de_SseConfiguration omitted. -/** - * deserializeAws_json1_0StartFHIRExportJobResponse - */ -const de_StartFHIRExportJobResponse = (output: any, context: __SerdeContext): StartFHIRExportJobResponse => { - return { - DatastoreId: __expectString(output.DatastoreId), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartFHIRExportJobResponse omitted. -/** - * deserializeAws_json1_0StartFHIRImportJobResponse - */ -const de_StartFHIRImportJobResponse = (output: any, context: __SerdeContext): StartFHIRImportJobResponse => { - return { - DatastoreId: __expectString(output.DatastoreId), - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartFHIRImportJobResponse omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1742,6 +1391,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-honeycode/src/protocols/Aws_restJson1.ts b/clients/client-honeycode/src/protocols/Aws_restJson1.ts index a68904296e20..ce17ce772611 100644 --- a/clients/client-honeycode/src/protocols/Aws_restJson1.ts +++ b/clients/client-honeycode/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -65,35 +65,24 @@ import { AccessDeniedException, AutomationExecutionException, AutomationExecutionTimeoutException, - Cell, CellInput, - ColumnMetadata, CreateRowData, - DataItem, DelimitedTextImportOptions, DestinationOptions, - FailedBatchItem, Filter, ImportDataSource, ImportDataSourceConfig, - ImportJobSubmitter, ImportOptions, InternalServerException, RequestTimeoutException, ResourceNotFoundException, - ResultRow, - ResultSet, ServiceQuotaExceededException, ServiceUnavailableException, SourceDataColumnProperties, - Table, - TableColumn, TableDataImportJobMetadata, - TableRow, ThrottlingException, UpdateRowData, UpsertRowData, - UpsertRowsResult, ValidationException, VariableValue, } from "../models/models_0"; @@ -115,10 +104,12 @@ export const se_BatchCreateTableRowsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workbookId", () => input.workbookId!, "{workbookId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "tableId", () => input.tableId!, "{tableId}", false); let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.rowsToCreate != null && { rowsToCreate: se_CreateRowDataList(input.rowsToCreate, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + rowsToCreate: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -147,10 +138,12 @@ export const se_BatchDeleteTableRowsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workbookId", () => input.workbookId!, "{workbookId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "tableId", () => input.tableId!, "{tableId}", false); let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.rowIds != null && { rowIds: se_RowIdList(input.rowIds, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + rowIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -179,10 +172,12 @@ export const se_BatchUpdateTableRowsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workbookId", () => input.workbookId!, "{workbookId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "tableId", () => input.tableId!, "{tableId}", false); let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.rowsToUpdate != null && { rowsToUpdate: se_UpdateRowDataList(input.rowsToUpdate, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + rowsToUpdate: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -211,10 +206,12 @@ export const se_BatchUpsertTableRowsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workbookId", () => input.workbookId!, "{workbookId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "tableId", () => input.tableId!, "{tableId}", false); let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.rowsToUpsert != null && { rowsToUpsert: se_UpsertRowDataList(input.rowsToUpsert, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + rowsToUpsert: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -266,14 +263,16 @@ export const se_GetScreenDataCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/screendata"; let body: any; - body = JSON.stringify({ - ...(input.appId != null && { appId: input.appId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.screenId != null && { screenId: input.screenId }), - ...(input.variables != null && { variables: se_VariableValueMap(input.variables, context) }), - ...(input.workbookId != null && { workbookId: input.workbookId }), - }); + body = JSON.stringify( + take(input, { + appId: [], + maxResults: [], + nextToken: [], + screenId: [], + variables: (_) => _json(_), + workbookId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -311,11 +310,13 @@ export const se_InvokeScreenAutomationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.rowId != null && { rowId: input.rowId }), - ...(input.variables != null && { variables: se_VariableValueMap(input.variables, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + rowId: [], + variables: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -374,11 +375,13 @@ export const se_ListTableRowsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workbookId", () => input.workbookId!, "{workbookId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "tableId", () => input.tableId!, "{tableId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.rowIds != null && { rowIds: se_RowIdList(input.rowIds, context) }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + rowIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -459,11 +462,13 @@ export const se_QueryTableRowsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workbookId", () => input.workbookId!, "{workbookId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "tableId", () => input.tableId!, "{tableId}", false); let body: any; - body = JSON.stringify({ - ...(input.filterFormula != null && { filterFormula: se_Filter(input.filterFormula, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filterFormula: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -499,12 +504,14 @@ export const se_StartTableDataImportJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.dataFormat != null && { dataFormat: input.dataFormat }), - ...(input.dataSource != null && { dataSource: se_ImportDataSource(input.dataSource, context) }), - ...(input.importOptions != null && { importOptions: se_ImportOptions(input.importOptions, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + dataFormat: [], + dataSource: (_) => _json(_), + importOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -530,9 +537,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -588,15 +597,12 @@ export const de_BatchCreateTableRowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdRows != null) { - contents.createdRows = de_CreatedRowsMap(data.createdRows, context); - } - if (data.failedBatchItems != null) { - contents.failedBatchItems = de_FailedBatchItems(data.failedBatchItems, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + createdRows: _json, + failedBatchItems: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -639,10 +645,9 @@ const de_BatchCreateTableRowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -662,12 +667,11 @@ export const de_BatchDeleteTableRowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedBatchItems != null) { - contents.failedBatchItems = de_FailedBatchItems(data.failedBatchItems, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + failedBatchItems: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -707,10 +711,9 @@ const de_BatchDeleteTableRowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -730,12 +733,11 @@ export const de_BatchUpdateTableRowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedBatchItems != null) { - contents.failedBatchItems = de_FailedBatchItems(data.failedBatchItems, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + failedBatchItems: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -775,10 +777,9 @@ const de_BatchUpdateTableRowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -798,15 +799,12 @@ export const de_BatchUpsertTableRowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failedBatchItems != null) { - contents.failedBatchItems = de_FailedBatchItems(data.failedBatchItems, context); - } - if (data.rows != null) { - contents.rows = de_UpsertRowsResultMap(data.rows, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + failedBatchItems: _json, + rows: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -849,10 +847,9 @@ const de_BatchUpsertTableRowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -872,18 +869,13 @@ export const de_DescribeTableDataImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorCode != null) { - contents.errorCode = __expectString(data.errorCode); - } - if (data.jobMetadata != null) { - contents.jobMetadata = de_TableDataImportJobMetadata(data.jobMetadata, context); - } - if (data.jobStatus != null) { - contents.jobStatus = __expectString(data.jobStatus); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + errorCode: __expectString, + jobMetadata: (_) => de_TableDataImportJobMetadata(_, context), + jobStatus: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -923,10 +915,9 @@ const de_DescribeTableDataImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -946,15 +937,12 @@ export const de_GetScreenDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.results != null) { - contents.results = de_ResultSetMap(data.results, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + nextToken: __expectString, + results: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -994,10 +982,9 @@ const de_GetScreenDataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1017,9 +1004,10 @@ export const de_InvokeScreenAutomationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1068,10 +1056,9 @@ const de_InvokeScreenAutomationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1091,15 +1078,12 @@ export const de_ListTableColumnsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tableColumns != null) { - contents.tableColumns = de_TableColumns(data.tableColumns, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + nextToken: __expectString, + tableColumns: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1139,10 +1123,9 @@ const de_ListTableColumnsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1162,21 +1145,14 @@ export const de_ListTableRowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.columnIds != null) { - contents.columnIds = de_ResourceIds(data.columnIds, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.rowIdsNotFound != null) { - contents.rowIdsNotFound = de_RowIdList(data.rowIdsNotFound, context); - } - if (data.rows != null) { - contents.rows = de_TableRows(data.rows, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + columnIds: _json, + nextToken: __expectString, + rowIdsNotFound: _json, + rows: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1216,10 +1192,9 @@ const de_ListTableRowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1239,15 +1214,12 @@ export const de_ListTablesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tables != null) { - contents.tables = de_Tables(data.tables, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + nextToken: __expectString, + tables: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1287,10 +1259,9 @@ const de_ListTablesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1310,9 +1281,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1352,10 +1324,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1375,18 +1346,13 @@ export const de_QueryTableRowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.columnIds != null) { - contents.columnIds = de_ResourceIds(data.columnIds, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.rows != null) { - contents.rows = de_TableRows(data.rows, context); - } - if (data.workbookCursor != null) { - contents.workbookCursor = __expectLong(data.workbookCursor); - } + const doc = take(data, { + columnIds: _json, + nextToken: __expectString, + rows: _json, + workbookCursor: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -1426,10 +1392,9 @@ const de_QueryTableRowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,12 +1414,11 @@ export const de_StartTableDataImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobStatus != null) { - contents.jobStatus = __expectString(data.jobStatus); - } + const doc = take(data, { + jobId: __expectString, + jobStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1497,10 +1461,9 @@ const de_StartTableDataImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1559,10 +1522,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1621,16 +1583,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1640,9 +1601,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1659,9 +1621,10 @@ const de_AutomationExecutionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AutomationExecutionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1678,9 +1641,10 @@ const de_AutomationExecutionTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AutomationExecutionTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1697,9 +1661,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1716,9 +1681,10 @@ const de_RequestTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1735,9 +1701,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1754,9 +1721,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1773,9 +1741,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1789,9 +1758,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1805,9 +1775,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1815,661 +1786,125 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CellInput - */ -const se_CellInput = (input: CellInput, context: __SerdeContext): any => { - return { - ...(input.fact != null && { fact: input.fact }), - ...(input.facts != null && { facts: se_FactList(input.facts, context) }), - }; -}; +// se_CellInput omitted. -/** - * serializeAws_restJson1CreateRowData - */ -const se_CreateRowData = (input: CreateRowData, context: __SerdeContext): any => { - return { - ...(input.batchItemId != null && { batchItemId: input.batchItemId }), - ...(input.cellsToCreate != null && { cellsToCreate: se_RowDataInput(input.cellsToCreate, context) }), - }; -}; +// se_CreateRowData omitted. -/** - * serializeAws_restJson1CreateRowDataList - */ -const se_CreateRowDataList = (input: CreateRowData[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateRowData(entry, context); - }); -}; +// se_CreateRowDataList omitted. -/** - * serializeAws_restJson1DelimitedTextImportOptions - */ -const se_DelimitedTextImportOptions = (input: DelimitedTextImportOptions, context: __SerdeContext): any => { - return { - ...(input.dataCharacterEncoding != null && { dataCharacterEncoding: input.dataCharacterEncoding }), - ...(input.delimiter != null && { delimiter: input.delimiter }), - ...(input.hasHeaderRow != null && { hasHeaderRow: input.hasHeaderRow }), - ...(input.ignoreEmptyRows != null && { ignoreEmptyRows: input.ignoreEmptyRows }), - }; -}; +// se_DelimitedTextImportOptions omitted. -/** - * serializeAws_restJson1DestinationOptions - */ -const se_DestinationOptions = (input: DestinationOptions, context: __SerdeContext): any => { - return { - ...(input.columnMap != null && { columnMap: se_ImportColumnMap(input.columnMap, context) }), - }; -}; +// se_DestinationOptions omitted. -/** - * serializeAws_restJson1FactList - */ -const se_FactList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FactList omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.contextRowId != null && { contextRowId: input.contextRowId }), - ...(input.formula != null && { formula: input.formula }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1ImportColumnMap - */ -const se_ImportColumnMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SourceDataColumnProperties(value, context); - return acc; - }, {}); -}; +// se_ImportColumnMap omitted. -/** - * serializeAws_restJson1ImportDataSource - */ -const se_ImportDataSource = (input: ImportDataSource, context: __SerdeContext): any => { - return { - ...(input.dataSourceConfig != null && { - dataSourceConfig: se_ImportDataSourceConfig(input.dataSourceConfig, context), - }), - }; -}; +// se_ImportDataSource omitted. -/** - * serializeAws_restJson1ImportDataSourceConfig - */ -const se_ImportDataSourceConfig = (input: ImportDataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.dataSourceUrl != null && { dataSourceUrl: input.dataSourceUrl }), - }; -}; +// se_ImportDataSourceConfig omitted. -/** - * serializeAws_restJson1ImportOptions - */ -const se_ImportOptions = (input: ImportOptions, context: __SerdeContext): any => { - return { - ...(input.delimitedTextOptions != null && { - delimitedTextOptions: se_DelimitedTextImportOptions(input.delimitedTextOptions, context), - }), - ...(input.destinationOptions != null && { - destinationOptions: se_DestinationOptions(input.destinationOptions, context), - }), - }; -}; +// se_ImportOptions omitted. -/** - * serializeAws_restJson1RowDataInput - */ -const se_RowDataInput = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CellInput(value, context); - return acc; - }, {}); -}; +// se_RowDataInput omitted. -/** - * serializeAws_restJson1RowIdList - */ -const se_RowIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RowIdList omitted. -/** - * serializeAws_restJson1SourceDataColumnProperties - */ -const se_SourceDataColumnProperties = (input: SourceDataColumnProperties, context: __SerdeContext): any => { - return { - ...(input.columnIndex != null && { columnIndex: input.columnIndex }), - }; -}; +// se_SourceDataColumnProperties omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. -/** - * serializeAws_restJson1UpdateRowData - */ -const se_UpdateRowData = (input: UpdateRowData, context: __SerdeContext): any => { - return { - ...(input.cellsToUpdate != null && { cellsToUpdate: se_RowDataInput(input.cellsToUpdate, context) }), - ...(input.rowId != null && { rowId: input.rowId }), - }; -}; +// se_UpdateRowData omitted. -/** - * serializeAws_restJson1UpdateRowDataList - */ -const se_UpdateRowDataList = (input: UpdateRowData[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateRowData(entry, context); - }); -}; +// se_UpdateRowDataList omitted. -/** - * serializeAws_restJson1UpsertRowData - */ -const se_UpsertRowData = (input: UpsertRowData, context: __SerdeContext): any => { - return { - ...(input.batchItemId != null && { batchItemId: input.batchItemId }), - ...(input.cellsToUpdate != null && { cellsToUpdate: se_RowDataInput(input.cellsToUpdate, context) }), - ...(input.filter != null && { filter: se_Filter(input.filter, context) }), - }; -}; +// se_UpsertRowData omitted. -/** - * serializeAws_restJson1UpsertRowDataList - */ -const se_UpsertRowDataList = (input: UpsertRowData[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpsertRowData(entry, context); - }); -}; +// se_UpsertRowDataList omitted. -/** - * serializeAws_restJson1VariableValue - */ -const se_VariableValue = (input: VariableValue, context: __SerdeContext): any => { - return { - ...(input.rawValue != null && { rawValue: input.rawValue }), - }; -}; +// se_VariableValue omitted. -/** - * serializeAws_restJson1VariableValueMap - */ -const se_VariableValueMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_VariableValue(value, context); - return acc; - }, {}); -}; +// se_VariableValueMap omitted. -/** - * deserializeAws_restJson1Cell - */ -const de_Cell = (output: any, context: __SerdeContext): Cell => { - return { - format: __expectString(output.format), - formattedValue: __expectString(output.formattedValue), - formattedValues: - output.formattedValues != null ? de_FormattedValuesList(output.formattedValues, context) : undefined, - formula: __expectString(output.formula), - rawValue: __expectString(output.rawValue), - } as any; -}; +// de_Cell omitted. -/** - * deserializeAws_restJson1Cells - */ -const de_Cells = (output: any, context: __SerdeContext): Cell[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Cell(entry, context); - }); - return retVal; -}; +// de_Cells omitted. -/** - * deserializeAws_restJson1ColumnMetadata - */ -const de_ColumnMetadata = (output: any, context: __SerdeContext): ColumnMetadata => { - return { - format: __expectString(output.format), - name: __expectString(output.name), - } as any; -}; +// de_ColumnMetadata omitted. -/** - * deserializeAws_restJson1CreatedRowsMap - */ -const de_CreatedRowsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_CreatedRowsMap omitted. -/** - * deserializeAws_restJson1DataItem - */ -const de_DataItem = (output: any, context: __SerdeContext): DataItem => { - return { - formattedValue: __expectString(output.formattedValue), - overrideFormat: __expectString(output.overrideFormat), - rawValue: __expectString(output.rawValue), - } as any; -}; +// de_DataItem omitted. -/** - * deserializeAws_restJson1DataItems - */ -const de_DataItems = (output: any, context: __SerdeContext): DataItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataItem(entry, context); - }); - return retVal; -}; +// de_DataItems omitted. -/** - * deserializeAws_restJson1DelimitedTextImportOptions - */ -const de_DelimitedTextImportOptions = (output: any, context: __SerdeContext): DelimitedTextImportOptions => { - return { - dataCharacterEncoding: __expectString(output.dataCharacterEncoding), - delimiter: __expectString(output.delimiter), - hasHeaderRow: __expectBoolean(output.hasHeaderRow), - ignoreEmptyRows: __expectBoolean(output.ignoreEmptyRows), - } as any; -}; +// de_DelimitedTextImportOptions omitted. -/** - * deserializeAws_restJson1DestinationOptions - */ -const de_DestinationOptions = (output: any, context: __SerdeContext): DestinationOptions => { - return { - columnMap: output.columnMap != null ? de_ImportColumnMap(output.columnMap, context) : undefined, - } as any; -}; +// de_DestinationOptions omitted. -/** - * deserializeAws_restJson1FailedBatchItem - */ -const de_FailedBatchItem = (output: any, context: __SerdeContext): FailedBatchItem => { - return { - errorMessage: __expectString(output.errorMessage), - id: __expectString(output.id), - } as any; -}; +// de_FailedBatchItem omitted. -/** - * deserializeAws_restJson1FailedBatchItems - */ -const de_FailedBatchItems = (output: any, context: __SerdeContext): FailedBatchItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedBatchItem(entry, context); - }); - return retVal; -}; +// de_FailedBatchItems omitted. -/** - * deserializeAws_restJson1FormattedValuesList - */ -const de_FormattedValuesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FormattedValuesList omitted. -/** - * deserializeAws_restJson1ImportColumnMap - */ -const de_ImportColumnMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SourceDataColumnProperties(value, context); - return acc; - }, - {} - ); -}; +// de_ImportColumnMap omitted. -/** - * deserializeAws_restJson1ImportDataSource - */ -const de_ImportDataSource = (output: any, context: __SerdeContext): ImportDataSource => { - return { - dataSourceConfig: - output.dataSourceConfig != null ? de_ImportDataSourceConfig(output.dataSourceConfig, context) : undefined, - } as any; -}; +// de_ImportDataSource omitted. -/** - * deserializeAws_restJson1ImportDataSourceConfig - */ -const de_ImportDataSourceConfig = (output: any, context: __SerdeContext): ImportDataSourceConfig => { - return { - dataSourceUrl: __expectString(output.dataSourceUrl), - } as any; -}; +// de_ImportDataSourceConfig omitted. -/** - * deserializeAws_restJson1ImportJobSubmitter - */ -const de_ImportJobSubmitter = (output: any, context: __SerdeContext): ImportJobSubmitter => { - return { - email: __expectString(output.email), - userArn: __expectString(output.userArn), - } as any; -}; +// de_ImportJobSubmitter omitted. -/** - * deserializeAws_restJson1ImportOptions - */ -const de_ImportOptions = (output: any, context: __SerdeContext): ImportOptions => { - return { - delimitedTextOptions: - output.delimitedTextOptions != null - ? de_DelimitedTextImportOptions(output.delimitedTextOptions, context) - : undefined, - destinationOptions: - output.destinationOptions != null ? de_DestinationOptions(output.destinationOptions, context) : undefined, - } as any; -}; +// de_ImportOptions omitted. -/** - * deserializeAws_restJson1ResourceIds - */ -const de_ResourceIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceIds omitted. -/** - * deserializeAws_restJson1ResultHeader - */ -const de_ResultHeader = (output: any, context: __SerdeContext): ColumnMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnMetadata(entry, context); - }); - return retVal; -}; +// de_ResultHeader omitted. -/** - * deserializeAws_restJson1ResultRow - */ -const de_ResultRow = (output: any, context: __SerdeContext): ResultRow => { - return { - dataItems: output.dataItems != null ? de_DataItems(output.dataItems, context) : undefined, - rowId: __expectString(output.rowId), - } as any; -}; +// de_ResultRow omitted. -/** - * deserializeAws_restJson1ResultRows - */ -const de_ResultRows = (output: any, context: __SerdeContext): ResultRow[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultRow(entry, context); - }); - return retVal; -}; +// de_ResultRows omitted. -/** - * deserializeAws_restJson1ResultSet - */ -const de_ResultSet = (output: any, context: __SerdeContext): ResultSet => { - return { - headers: output.headers != null ? de_ResultHeader(output.headers, context) : undefined, - rows: output.rows != null ? de_ResultRows(output.rows, context) : undefined, - } as any; -}; +// de_ResultSet omitted. -/** - * deserializeAws_restJson1ResultSetMap - */ -const de_ResultSetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ResultSet(value, context); - return acc; - }, {}); -}; +// de_ResultSetMap omitted. -/** - * deserializeAws_restJson1RowIdList - */ -const de_RowIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RowIdList omitted. -/** - * deserializeAws_restJson1SourceDataColumnProperties - */ -const de_SourceDataColumnProperties = (output: any, context: __SerdeContext): SourceDataColumnProperties => { - return { - columnIndex: __expectInt32(output.columnIndex), - } as any; -}; +// de_SourceDataColumnProperties omitted. -/** - * deserializeAws_restJson1Table - */ -const de_Table = (output: any, context: __SerdeContext): Table => { - return { - tableId: __expectString(output.tableId), - tableName: __expectString(output.tableName), - } as any; -}; +// de_Table omitted. -/** - * deserializeAws_restJson1TableColumn - */ -const de_TableColumn = (output: any, context: __SerdeContext): TableColumn => { - return { - format: __expectString(output.format), - tableColumnId: __expectString(output.tableColumnId), - tableColumnName: __expectString(output.tableColumnName), - } as any; -}; +// de_TableColumn omitted. -/** - * deserializeAws_restJson1TableColumns - */ -const de_TableColumns = (output: any, context: __SerdeContext): TableColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableColumn(entry, context); - }); - return retVal; -}; +// de_TableColumns omitted. /** * deserializeAws_restJson1TableDataImportJobMetadata */ const de_TableDataImportJobMetadata = (output: any, context: __SerdeContext): TableDataImportJobMetadata => { - return { - dataSource: output.dataSource != null ? de_ImportDataSource(output.dataSource, context) : undefined, - importOptions: output.importOptions != null ? de_ImportOptions(output.importOptions, context) : undefined, - submitTime: - output.submitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.submitTime))) : undefined, - submitter: output.submitter != null ? de_ImportJobSubmitter(output.submitter, context) : undefined, - } as any; + return take(output, { + dataSource: _json, + importOptions: _json, + submitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + submitter: _json, + }) as any; }; -/** - * deserializeAws_restJson1TableRow - */ -const de_TableRow = (output: any, context: __SerdeContext): TableRow => { - return { - cells: output.cells != null ? de_Cells(output.cells, context) : undefined, - rowId: __expectString(output.rowId), - } as any; -}; +// de_TableRow omitted. -/** - * deserializeAws_restJson1TableRows - */ -const de_TableRows = (output: any, context: __SerdeContext): TableRow[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableRow(entry, context); - }); - return retVal; -}; +// de_TableRows omitted. -/** - * deserializeAws_restJson1Tables - */ -const de_Tables = (output: any, context: __SerdeContext): Table[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Table(entry, context); - }); - return retVal; -}; +// de_Tables omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagsMap omitted. -/** - * deserializeAws_restJson1UpsertRowsResult - */ -const de_UpsertRowsResult = (output: any, context: __SerdeContext): UpsertRowsResult => { - return { - rowIds: output.rowIds != null ? de_RowIdList(output.rowIds, context) : undefined, - upsertAction: __expectString(output.upsertAction), - } as any; -}; +// de_UpsertRowsResult omitted. -/** - * deserializeAws_restJson1UpsertRowsResultMap - */ -const de_UpsertRowsResultMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_UpsertRowsResult(value, context); - return acc; - }, {}); -}; +// de_UpsertRowsResultMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iam/src/protocols/Aws_query.ts b/clients/client-iam/src/protocols/Aws_query.ts index 5e8e9f91f65f..4684e92f8f8b 100644 --- a/clients/client-iam/src/protocols/Aws_query.ts +++ b/clients/client-iam/src/protocols/Aws_query.ts @@ -10,7 +10,7 @@ import { parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -3415,7 +3415,7 @@ export const de_AddClientIDToOpenIDConnectProviderCommand = async ( const response: AddClientIDToOpenIDConnectProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3445,10 +3445,9 @@ const de_AddClientIDToOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3468,7 +3467,7 @@ export const de_AddRoleToInstanceProfileCommand = async ( const response: AddRoleToInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3501,10 +3500,9 @@ const de_AddRoleToInstanceProfileCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3524,7 +3522,7 @@ export const de_AddUserToGroupCommand = async ( const response: AddUserToGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3551,10 +3549,9 @@ const de_AddUserToGroupCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3574,7 +3571,7 @@ export const de_AttachGroupPolicyCommand = async ( const response: AttachGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3607,10 +3604,9 @@ const de_AttachGroupPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3630,7 +3626,7 @@ export const de_AttachRolePolicyCommand = async ( const response: AttachRolePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3666,10 +3662,9 @@ const de_AttachRolePolicyCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3689,7 +3684,7 @@ export const de_AttachUserPolicyCommand = async ( const response: AttachUserPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3722,10 +3717,9 @@ const de_AttachUserPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3745,7 +3739,7 @@ export const de_ChangePasswordCommand = async ( const response: ChangePasswordCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3781,10 +3775,9 @@ const de_ChangePasswordCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3807,7 +3800,7 @@ export const de_CreateAccessKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3834,10 +3827,9 @@ const de_CreateAccessKeyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3857,7 +3849,7 @@ export const de_CreateAccountAliasCommand = async ( const response: CreateAccountAliasCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3884,10 +3876,9 @@ const de_CreateAccountAliasCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3910,7 +3901,7 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3940,10 +3931,9 @@ const de_CreateGroupCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3966,7 +3956,7 @@ export const de_CreateInstanceProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3999,10 +3989,9 @@ const de_CreateInstanceProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4025,7 +4014,7 @@ export const de_CreateLoginProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4058,10 +4047,9 @@ const de_CreateLoginProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4084,7 +4072,7 @@ export const de_CreateOpenIDConnectProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4117,10 +4105,9 @@ const de_CreateOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4143,7 +4130,7 @@ export const de_CreatePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4179,10 +4166,9 @@ const de_CreatePolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4205,7 +4191,7 @@ export const de_CreatePolicyVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4238,10 +4224,9 @@ const de_CreatePolicyVersionCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4264,7 +4249,7 @@ export const de_CreateRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4300,10 +4285,9 @@ const de_CreateRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4326,7 +4310,7 @@ export const de_CreateSAMLProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4359,10 +4343,9 @@ const de_CreateSAMLProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4385,7 +4368,7 @@ export const de_CreateServiceLinkedRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4415,10 +4398,9 @@ const de_CreateServiceLinkedRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4441,7 +4423,7 @@ export const de_CreateServiceSpecificCredentialCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4468,10 +4450,9 @@ const de_CreateServiceSpecificCredentialCommandError = async ( throw await de_ServiceNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4494,7 +4475,7 @@ export const de_CreateUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4530,10 +4511,9 @@ const de_CreateUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4556,7 +4536,7 @@ export const de_CreateVirtualMFADeviceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4589,10 +4569,9 @@ const de_CreateVirtualMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4612,7 +4591,7 @@ export const de_DeactivateMFADeviceCommand = async ( const response: DeactivateMFADeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4642,10 +4621,9 @@ const de_DeactivateMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4665,7 +4643,7 @@ export const de_DeleteAccessKeyCommand = async ( const response: DeleteAccessKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4692,10 +4670,9 @@ const de_DeleteAccessKeyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4715,7 +4692,7 @@ export const de_DeleteAccountAliasCommand = async ( const response: DeleteAccountAliasCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4742,10 +4719,9 @@ const de_DeleteAccountAliasCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4765,7 +4741,7 @@ export const de_DeleteAccountPasswordPolicyCommand = async ( const response: DeleteAccountPasswordPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4792,10 +4768,9 @@ const de_DeleteAccountPasswordPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4815,7 +4790,7 @@ export const de_DeleteGroupCommand = async ( const response: DeleteGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4845,10 +4820,9 @@ const de_DeleteGroupCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4868,7 +4842,7 @@ export const de_DeleteGroupPolicyCommand = async ( const response: DeleteGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4895,10 +4869,9 @@ const de_DeleteGroupPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4918,7 +4891,7 @@ export const de_DeleteInstanceProfileCommand = async ( const response: DeleteInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4948,10 +4921,9 @@ const de_DeleteInstanceProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4971,7 +4943,7 @@ export const de_DeleteLoginProfileCommand = async ( const response: DeleteLoginProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5001,10 +4973,9 @@ const de_DeleteLoginProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5024,7 +4995,7 @@ export const de_DeleteOpenIDConnectProviderCommand = async ( const response: DeleteOpenIDConnectProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5051,10 +5022,9 @@ const de_DeleteOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5074,7 +5044,7 @@ export const de_DeletePolicyCommand = async ( const response: DeletePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5107,10 +5077,9 @@ const de_DeletePolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5130,7 +5099,7 @@ export const de_DeletePolicyVersionCommand = async ( const response: DeletePolicyVersionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5163,10 +5132,9 @@ const de_DeletePolicyVersionCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5186,7 +5154,7 @@ export const de_DeleteRoleCommand = async ( const response: DeleteRoleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5222,10 +5190,9 @@ const de_DeleteRoleCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5245,7 +5212,7 @@ export const de_DeleteRolePermissionsBoundaryCommand = async ( const response: DeleteRolePermissionsBoundaryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5272,10 +5239,9 @@ const de_DeleteRolePermissionsBoundaryCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5295,7 +5261,7 @@ export const de_DeleteRolePolicyCommand = async ( const response: DeleteRolePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5325,10 +5291,9 @@ const de_DeleteRolePolicyCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5348,7 +5313,7 @@ export const de_DeleteSAMLProviderCommand = async ( const response: DeleteSAMLProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5378,10 +5343,9 @@ const de_DeleteSAMLProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5401,7 +5365,7 @@ export const de_DeleteServerCertificateCommand = async ( const response: DeleteServerCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5431,10 +5395,9 @@ const de_DeleteServerCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5457,7 +5420,7 @@ export const de_DeleteServiceLinkedRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5484,10 +5447,9 @@ const de_DeleteServiceLinkedRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5507,7 +5469,7 @@ export const de_DeleteServiceSpecificCredentialCommand = async ( const response: DeleteServiceSpecificCredentialCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5528,10 +5490,9 @@ const de_DeleteServiceSpecificCredentialCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5551,7 +5512,7 @@ export const de_DeleteSigningCertificateCommand = async ( const response: DeleteSigningCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5578,10 +5539,9 @@ const de_DeleteSigningCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5601,7 +5561,7 @@ export const de_DeleteSSHPublicKeyCommand = async ( const response: DeleteSSHPublicKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5622,10 +5582,9 @@ const de_DeleteSSHPublicKeyCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5645,7 +5604,7 @@ export const de_DeleteUserCommand = async ( const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5678,10 +5637,9 @@ const de_DeleteUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5701,7 +5659,7 @@ export const de_DeleteUserPermissionsBoundaryCommand = async ( const response: DeleteUserPermissionsBoundaryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5725,10 +5683,9 @@ const de_DeleteUserPermissionsBoundaryCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5748,7 +5705,7 @@ export const de_DeleteUserPolicyCommand = async ( const response: DeleteUserPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5775,10 +5732,9 @@ const de_DeleteUserPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5798,7 +5754,7 @@ export const de_DeleteVirtualMFADeviceCommand = async ( const response: DeleteVirtualMFADeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5828,10 +5784,9 @@ const de_DeleteVirtualMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5851,7 +5806,7 @@ export const de_DetachGroupPolicyCommand = async ( const response: DetachGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5881,10 +5836,9 @@ const de_DetachGroupPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5904,7 +5858,7 @@ export const de_DetachRolePolicyCommand = async ( const response: DetachRolePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5937,10 +5891,9 @@ const de_DetachRolePolicyCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5960,7 +5913,7 @@ export const de_DetachUserPolicyCommand = async ( const response: DetachUserPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5990,10 +5943,9 @@ const de_DetachUserPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6013,7 +5965,7 @@ export const de_EnableMFADeviceCommand = async ( const response: EnableMFADeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6049,10 +6001,9 @@ const de_EnableMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6075,7 +6026,7 @@ export const de_GenerateCredentialReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6099,10 +6050,9 @@ const de_GenerateCredentialReportCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6125,7 +6075,7 @@ export const de_GenerateOrganizationsAccessReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6146,10 +6096,9 @@ const de_GenerateOrganizationsAccessReportCommandError = async ( throw await de_ReportGenerationLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6172,7 +6121,7 @@ export const de_GenerateServiceLastAccessedDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6196,10 +6145,9 @@ const de_GenerateServiceLastAccessedDetailsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6222,7 +6170,7 @@ export const de_GetAccessKeyLastUsedCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6243,10 +6191,9 @@ const de_GetAccessKeyLastUsedCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6269,7 +6216,7 @@ export const de_GetAccountAuthorizationDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6290,10 +6237,9 @@ const de_GetAccountAuthorizationDetailsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6316,7 +6262,7 @@ export const de_GetAccountPasswordPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6340,10 +6286,9 @@ const de_GetAccountPasswordPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6366,7 +6311,7 @@ export const de_GetAccountSummaryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6387,10 +6332,9 @@ const de_GetAccountSummaryCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6413,7 +6357,7 @@ export const de_GetContextKeysForCustomPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6434,10 +6378,9 @@ const de_GetContextKeysForCustomPolicyCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6460,7 +6403,7 @@ export const de_GetContextKeysForPrincipalPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6484,10 +6427,9 @@ const de_GetContextKeysForPrincipalPolicyCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6510,7 +6452,7 @@ export const de_GetCredentialReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6540,10 +6482,9 @@ const de_GetCredentialReportCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6566,7 +6507,7 @@ export const de_GetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6590,10 +6531,9 @@ const de_GetGroupCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6616,7 +6556,7 @@ export const de_GetGroupPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6640,10 +6580,9 @@ const de_GetGroupPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6666,7 +6605,7 @@ export const de_GetInstanceProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6690,10 +6629,9 @@ const de_GetInstanceProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6716,7 +6654,7 @@ export const de_GetLoginProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6740,10 +6678,9 @@ const de_GetLoginProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6766,7 +6703,7 @@ export const de_GetOpenIDConnectProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6793,10 +6730,9 @@ const de_GetOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6819,7 +6755,7 @@ export const de_GetOrganizationsAccessReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6840,10 +6776,9 @@ const de_GetOrganizationsAccessReportCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6866,7 +6801,7 @@ export const de_GetPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6893,10 +6828,9 @@ const de_GetPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6919,7 +6853,7 @@ export const de_GetPolicyVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6946,10 +6880,9 @@ const de_GetPolicyVersionCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6972,7 +6905,7 @@ export const de_GetRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6996,10 +6929,9 @@ const de_GetRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7022,7 +6954,7 @@ export const de_GetRolePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7046,10 +6978,9 @@ const de_GetRolePolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7072,7 +7003,7 @@ export const de_GetSAMLProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7099,10 +7030,9 @@ const de_GetSAMLProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7125,7 +7055,7 @@ export const de_GetServerCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7149,10 +7079,9 @@ const de_GetServerCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7175,7 +7104,7 @@ export const de_GetServiceLastAccessedDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7199,10 +7128,9 @@ const de_GetServiceLastAccessedDetailsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7228,7 +7156,7 @@ export const de_GetServiceLastAccessedDetailsWithEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7252,10 +7180,9 @@ const de_GetServiceLastAccessedDetailsWithEntitiesCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7278,7 +7205,7 @@ export const de_GetServiceLinkedRoleDeletionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7305,10 +7232,9 @@ const de_GetServiceLinkedRoleDeletionStatusCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7331,7 +7257,7 @@ export const de_GetSSHPublicKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7355,10 +7281,9 @@ const de_GetSSHPublicKeyCommandError = async ( throw await de_UnrecognizedPublicKeyEncodingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7381,7 +7306,7 @@ export const de_GetUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7405,10 +7330,9 @@ const de_GetUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7431,7 +7355,7 @@ export const de_GetUserPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7455,10 +7379,9 @@ const de_GetUserPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7481,7 +7404,7 @@ export const de_ListAccessKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7505,10 +7428,9 @@ const de_ListAccessKeysCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7531,7 +7453,7 @@ export const de_ListAccountAliasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7552,10 +7474,9 @@ const de_ListAccountAliasesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7578,7 +7499,7 @@ export const de_ListAttachedGroupPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7605,10 +7526,9 @@ const de_ListAttachedGroupPoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7631,7 +7551,7 @@ export const de_ListAttachedRolePoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7658,10 +7578,9 @@ const de_ListAttachedRolePoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7684,7 +7603,7 @@ export const de_ListAttachedUserPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7711,10 +7630,9 @@ const de_ListAttachedUserPoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7737,7 +7655,7 @@ export const de_ListEntitiesForPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7764,10 +7682,9 @@ const de_ListEntitiesForPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7790,7 +7707,7 @@ export const de_ListGroupPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7814,10 +7731,9 @@ const de_ListGroupPoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7840,7 +7756,7 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7861,10 +7777,9 @@ const de_ListGroupsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7887,7 +7802,7 @@ export const de_ListGroupsForUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7911,10 +7826,9 @@ const de_ListGroupsForUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7937,7 +7851,7 @@ export const de_ListInstanceProfilesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7958,10 +7872,9 @@ const de_ListInstanceProfilesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7984,7 +7897,7 @@ export const de_ListInstanceProfilesForRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8008,10 +7921,9 @@ const de_ListInstanceProfilesForRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8034,7 +7946,7 @@ export const de_ListInstanceProfileTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8058,10 +7970,9 @@ const de_ListInstanceProfileTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8084,7 +7995,7 @@ export const de_ListMFADevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8108,10 +8019,9 @@ const de_ListMFADevicesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8134,7 +8044,7 @@ export const de_ListMFADeviceTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8161,10 +8071,9 @@ const de_ListMFADeviceTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8187,7 +8096,7 @@ export const de_ListOpenIDConnectProvidersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8208,10 +8117,9 @@ const de_ListOpenIDConnectProvidersCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8234,7 +8142,7 @@ export const de_ListOpenIDConnectProviderTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8261,10 +8169,9 @@ const de_ListOpenIDConnectProviderTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8287,7 +8194,7 @@ export const de_ListPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8308,10 +8215,9 @@ const de_ListPoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8334,7 +8240,7 @@ export const de_ListPoliciesGrantingServiceAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8358,10 +8264,9 @@ const de_ListPoliciesGrantingServiceAccessCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8384,7 +8289,7 @@ export const de_ListPolicyTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8411,10 +8316,9 @@ const de_ListPolicyTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8437,7 +8341,7 @@ export const de_ListPolicyVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8464,10 +8368,9 @@ const de_ListPolicyVersionsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8490,7 +8393,7 @@ export const de_ListRolePoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8514,10 +8417,9 @@ const de_ListRolePoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8540,7 +8442,7 @@ export const de_ListRolesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8561,10 +8463,9 @@ const de_ListRolesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8587,7 +8488,7 @@ export const de_ListRoleTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8611,10 +8512,9 @@ const de_ListRoleTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8637,7 +8537,7 @@ export const de_ListSAMLProvidersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8658,10 +8558,9 @@ const de_ListSAMLProvidersCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8684,7 +8583,7 @@ export const de_ListSAMLProviderTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8711,10 +8610,9 @@ const de_ListSAMLProviderTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8737,7 +8635,7 @@ export const de_ListServerCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8758,10 +8656,9 @@ const de_ListServerCertificatesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8784,7 +8681,7 @@ export const de_ListServerCertificateTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8808,10 +8705,9 @@ const de_ListServerCertificateTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8834,7 +8730,7 @@ export const de_ListServiceSpecificCredentialsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8858,10 +8754,9 @@ const de_ListServiceSpecificCredentialsCommandError = async ( throw await de_ServiceNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8884,7 +8779,7 @@ export const de_ListSigningCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8908,10 +8803,9 @@ const de_ListSigningCertificatesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8934,7 +8828,7 @@ export const de_ListSSHPublicKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8955,10 +8849,9 @@ const de_ListSSHPublicKeysCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8981,7 +8874,7 @@ export const de_ListUserPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9005,10 +8898,9 @@ const de_ListUserPoliciesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9031,7 +8923,7 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9052,10 +8944,9 @@ const de_ListUsersCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9078,7 +8969,7 @@ export const de_ListUserTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9102,10 +8993,9 @@ const de_ListUserTagsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9128,7 +9018,7 @@ export const de_ListVirtualMFADevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9144,10 +9034,9 @@ const de_ListVirtualMFADevicesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9166,7 +9055,7 @@ export const de_PutGroupPolicyCommand = async ( const response: PutGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9196,10 +9085,9 @@ const de_PutGroupPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9219,7 +9107,7 @@ export const de_PutRolePermissionsBoundaryCommand = async ( const response: PutRolePermissionsBoundaryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9252,10 +9140,9 @@ const de_PutRolePermissionsBoundaryCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9275,7 +9162,7 @@ export const de_PutRolePolicyCommand = async ( const response: PutRolePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9308,10 +9195,9 @@ const de_PutRolePolicyCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9331,7 +9217,7 @@ export const de_PutUserPermissionsBoundaryCommand = async ( const response: PutUserPermissionsBoundaryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9361,10 +9247,9 @@ const de_PutUserPermissionsBoundaryCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9384,7 +9269,7 @@ export const de_PutUserPolicyCommand = async ( const response: PutUserPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9414,10 +9299,9 @@ const de_PutUserPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9437,7 +9321,7 @@ export const de_RemoveClientIDFromOpenIDConnectProviderCommand = async ( const response: RemoveClientIDFromOpenIDConnectProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9464,10 +9348,9 @@ const de_RemoveClientIDFromOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9487,7 +9370,7 @@ export const de_RemoveRoleFromInstanceProfileCommand = async ( const response: RemoveRoleFromInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9517,10 +9400,9 @@ const de_RemoveRoleFromInstanceProfileCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9540,7 +9422,7 @@ export const de_RemoveUserFromGroupCommand = async ( const response: RemoveUserFromGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9567,10 +9449,9 @@ const de_RemoveUserFromGroupCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9593,7 +9474,7 @@ export const de_ResetServiceSpecificCredentialCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9614,10 +9495,9 @@ const de_ResetServiceSpecificCredentialCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9637,7 +9517,7 @@ export const de_ResyncMFADeviceCommand = async ( const response: ResyncMFADeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9667,10 +9547,9 @@ const de_ResyncMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9690,7 +9569,7 @@ export const de_SetDefaultPolicyVersionCommand = async ( const response: SetDefaultPolicyVersionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9720,10 +9599,9 @@ const de_SetDefaultPolicyVersionCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9743,7 +9621,7 @@ export const de_SetSecurityTokenServicePreferencesCommand = async ( const response: SetSecurityTokenServicePreferencesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9764,10 +9642,9 @@ const de_SetSecurityTokenServicePreferencesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9790,7 +9667,7 @@ export const de_SimulateCustomPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9814,10 +9691,9 @@ const de_SimulateCustomPolicyCommandError = async ( throw await de_PolicyEvaluationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9840,7 +9716,7 @@ export const de_SimulatePrincipalPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9867,10 +9743,9 @@ const de_SimulatePrincipalPolicyCommandError = async ( throw await de_PolicyEvaluationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9890,7 +9765,7 @@ export const de_TagInstanceProfileCommand = async ( const response: TagInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9923,10 +9798,9 @@ const de_TagInstanceProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9946,7 +9820,7 @@ export const de_TagMFADeviceCommand = async ( const response: TagMFADeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9979,10 +9853,9 @@ const de_TagMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10002,7 +9875,7 @@ export const de_TagOpenIDConnectProviderCommand = async ( const response: TagOpenIDConnectProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10035,10 +9908,9 @@ const de_TagOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10058,7 +9930,7 @@ export const de_TagPolicyCommand = async ( const response: TagPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10091,10 +9963,9 @@ const de_TagPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10114,7 +9985,7 @@ export const de_TagRoleCommand = async ( const response: TagRoleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10147,10 +10018,9 @@ const de_TagRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10170,7 +10040,7 @@ export const de_TagSAMLProviderCommand = async ( const response: TagSAMLProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10203,10 +10073,9 @@ const de_TagSAMLProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10226,7 +10095,7 @@ export const de_TagServerCertificateCommand = async ( const response: TagServerCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10259,10 +10128,9 @@ const de_TagServerCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10282,7 +10150,7 @@ export const de_TagUserCommand = async ( const response: TagUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10315,10 +10183,9 @@ const de_TagUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10338,7 +10205,7 @@ export const de_UntagInstanceProfileCommand = async ( const response: UntagInstanceProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10368,10 +10235,9 @@ const de_UntagInstanceProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10391,7 +10257,7 @@ export const de_UntagMFADeviceCommand = async ( const response: UntagMFADeviceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10421,10 +10287,9 @@ const de_UntagMFADeviceCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10444,7 +10309,7 @@ export const de_UntagOpenIDConnectProviderCommand = async ( const response: UntagOpenIDConnectProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10474,10 +10339,9 @@ const de_UntagOpenIDConnectProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10497,7 +10361,7 @@ export const de_UntagPolicyCommand = async ( const response: UntagPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10527,10 +10391,9 @@ const de_UntagPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10550,7 +10413,7 @@ export const de_UntagRoleCommand = async ( const response: UntagRoleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10577,10 +10440,9 @@ const de_UntagRoleCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10600,7 +10462,7 @@ export const de_UntagSAMLProviderCommand = async ( const response: UntagSAMLProviderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10630,10 +10492,9 @@ const de_UntagSAMLProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10653,7 +10514,7 @@ export const de_UntagServerCertificateCommand = async ( const response: UntagServerCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10683,10 +10544,9 @@ const de_UntagServerCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10706,7 +10566,7 @@ export const de_UntagUserCommand = async ( const response: UntagUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10733,10 +10593,9 @@ const de_UntagUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10756,7 +10615,7 @@ export const de_UpdateAccessKeyCommand = async ( const response: UpdateAccessKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10783,10 +10642,9 @@ const de_UpdateAccessKeyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10806,7 +10664,7 @@ export const de_UpdateAccountPasswordPolicyCommand = async ( const response: UpdateAccountPasswordPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10836,10 +10694,9 @@ const de_UpdateAccountPasswordPolicyCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10859,7 +10716,7 @@ export const de_UpdateAssumeRolePolicyCommand = async ( const response: UpdateAssumeRolePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10892,10 +10749,9 @@ const de_UpdateAssumeRolePolicyCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10915,7 +10771,7 @@ export const de_UpdateGroupCommand = async ( const response: UpdateGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10945,10 +10801,9 @@ const de_UpdateGroupCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10968,7 +10823,7 @@ export const de_UpdateLoginProfileCommand = async ( const response: UpdateLoginProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11001,10 +10856,9 @@ const de_UpdateLoginProfileCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11024,7 +10878,7 @@ export const de_UpdateOpenIDConnectProviderThumbprintCommand = async ( const response: UpdateOpenIDConnectProviderThumbprintCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11051,10 +10905,9 @@ const de_UpdateOpenIDConnectProviderThumbprintCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11077,7 +10930,7 @@ export const de_UpdateRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11104,10 +10957,9 @@ const de_UpdateRoleCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11130,7 +10982,7 @@ export const de_UpdateRoleDescriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11157,10 +11009,9 @@ const de_UpdateRoleDescriptionCommandError = async ( throw await de_UnmodifiableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11183,7 +11034,7 @@ export const de_UpdateSAMLProviderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11213,10 +11064,9 @@ const de_UpdateSAMLProviderCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11236,7 +11086,7 @@ export const de_UpdateServerCertificateCommand = async ( const response: UpdateServerCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11266,10 +11116,9 @@ const de_UpdateServerCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11289,7 +11138,7 @@ export const de_UpdateServiceSpecificCredentialCommand = async ( const response: UpdateServiceSpecificCredentialCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11310,10 +11159,9 @@ const de_UpdateServiceSpecificCredentialCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11333,7 +11181,7 @@ export const de_UpdateSigningCertificateCommand = async ( const response: UpdateSigningCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11360,10 +11208,9 @@ const de_UpdateSigningCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11383,7 +11230,7 @@ export const de_UpdateSSHPublicKeyCommand = async ( const response: UpdateSSHPublicKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11404,10 +11251,9 @@ const de_UpdateSSHPublicKeyCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11427,7 +11273,7 @@ export const de_UpdateUserCommand = async ( const response: UpdateUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -11463,10 +11309,9 @@ const de_UpdateUserCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11489,7 +11334,7 @@ export const de_UploadServerCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11528,10 +11373,9 @@ const de_UploadServerCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11554,7 +11398,7 @@ export const de_UploadSigningCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11593,10 +11437,9 @@ const de_UploadSigningCertificateCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11619,7 +11462,7 @@ export const de_UploadSSHPublicKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11652,10 +11495,9 @@ const de_UploadSSHPublicKeyCommandError = async ( throw await de_UnrecognizedPublicKeyEncodingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -18691,6 +18533,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-identitystore/src/protocols/Aws_json1_1.ts b/clients/client-identitystore/src/protocols/Aws_json1_1.ts index 4f1d943af465..59889ce999a2 100644 --- a/clients/client-identitystore/src/protocols/Aws_json1_1.ts +++ b/clients/client-identitystore/src/protocols/Aws_json1_1.ts @@ -1,12 +1,10 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectString as __expectString, - expectUnion as __expectUnion, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -61,46 +59,26 @@ import { AttributeOperation, ConflictException, CreateGroupMembershipRequest, - CreateGroupMembershipResponse, CreateGroupRequest, - CreateGroupResponse, CreateUserRequest, - CreateUserResponse, DeleteGroupMembershipRequest, - DeleteGroupMembershipResponse, DeleteGroupRequest, - DeleteGroupResponse, DeleteUserRequest, - DeleteUserResponse, DescribeGroupMembershipRequest, - DescribeGroupMembershipResponse, DescribeGroupRequest, - DescribeGroupResponse, DescribeUserRequest, - DescribeUserResponse, Email, ExternalId, Filter, GetGroupIdRequest, - GetGroupIdResponse, GetGroupMembershipIdRequest, - GetGroupMembershipIdResponse, GetUserIdRequest, - GetUserIdResponse, - Group, - GroupMembership, - GroupMembershipExistenceResult, InternalServerException, IsMemberInGroupsRequest, - IsMemberInGroupsResponse, ListGroupMembershipsForMemberRequest, - ListGroupMembershipsForMemberResponse, ListGroupMembershipsRequest, - ListGroupMembershipsResponse, ListGroupsRequest, - ListGroupsResponse, ListUsersRequest, - ListUsersResponse, MemberId, Name, PhoneNumber, @@ -109,10 +87,7 @@ import { ThrottlingException, UniqueAttribute, UpdateGroupRequest, - UpdateGroupResponse, UpdateUserRequest, - UpdateUserResponse, - User, ValidationException, } from "../models/models_0"; @@ -125,7 +100,7 @@ export const se_CreateGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGroup"); let body: any; - body = JSON.stringify(se_CreateGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -138,7 +113,7 @@ export const se_CreateGroupMembershipCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGroupMembership"); let body: any; - body = JSON.stringify(se_CreateGroupMembershipRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -151,7 +126,7 @@ export const se_CreateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUser"); let body: any; - body = JSON.stringify(se_CreateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -164,7 +139,7 @@ export const se_DeleteGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGroup"); let body: any; - body = JSON.stringify(se_DeleteGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -177,7 +152,7 @@ export const se_DeleteGroupMembershipCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGroupMembership"); let body: any; - body = JSON.stringify(se_DeleteGroupMembershipRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -190,7 +165,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -203,7 +178,7 @@ export const se_DescribeGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGroup"); let body: any; - body = JSON.stringify(se_DescribeGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -216,7 +191,7 @@ export const se_DescribeGroupMembershipCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGroupMembership"); let body: any; - body = JSON.stringify(se_DescribeGroupMembershipRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -229,7 +204,7 @@ export const se_DescribeUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUser"); let body: any; - body = JSON.stringify(se_DescribeUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -255,7 +230,7 @@ export const se_GetGroupMembershipIdCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGroupMembershipId"); let body: any; - body = JSON.stringify(se_GetGroupMembershipIdRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +256,7 @@ export const se_IsMemberInGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("IsMemberInGroups"); let body: any; - body = JSON.stringify(se_IsMemberInGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -294,7 +269,7 @@ export const se_ListGroupMembershipsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroupMemberships"); let body: any; - body = JSON.stringify(se_ListGroupMembershipsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -307,7 +282,7 @@ export const se_ListGroupMembershipsForMemberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroupMembershipsForMember"); let body: any; - body = JSON.stringify(se_ListGroupMembershipsForMemberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -320,7 +295,7 @@ export const se_ListGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroups"); let body: any; - body = JSON.stringify(se_ListGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -333,7 +308,7 @@ export const se_ListUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsers"); let body: any; - body = JSON.stringify(se_ListUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -375,12 +350,12 @@ export const de_CreateGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGroupResponse(data, context); + contents = _json(data); const response: CreateGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -419,10 +394,9 @@ const de_CreateGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -440,12 +414,12 @@ export const de_CreateGroupMembershipCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGroupMembershipResponse(data, context); + contents = _json(data); const response: CreateGroupMembershipCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -484,10 +458,9 @@ const de_CreateGroupMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -505,12 +478,12 @@ export const de_CreateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserResponse(data, context); + contents = _json(data); const response: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -549,10 +522,9 @@ const de_CreateUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -570,12 +542,12 @@ export const de_DeleteGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGroupResponse(data, context); + contents = _json(data); const response: DeleteGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -611,10 +583,9 @@ const de_DeleteGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -632,12 +603,12 @@ export const de_DeleteGroupMembershipCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGroupMembershipResponse(data, context); + contents = _json(data); const response: DeleteGroupMembershipCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -673,10 +644,9 @@ const de_DeleteGroupMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -694,12 +664,12 @@ export const de_DeleteUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserResponse(data, context); + contents = _json(data); const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -735,10 +705,9 @@ const de_DeleteUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -756,12 +725,12 @@ export const de_DescribeGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeGroupResponse(data, context); + contents = _json(data); const response: DescribeGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -794,10 +763,9 @@ const de_DescribeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -815,12 +783,12 @@ export const de_DescribeGroupMembershipCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeGroupMembershipResponse(data, context); + contents = _json(data); const response: DescribeGroupMembershipCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -853,10 +821,9 @@ const de_DescribeGroupMembershipCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -874,12 +841,12 @@ export const de_DescribeUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeUserResponse(data, context); + contents = _json(data); const response: DescribeUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -912,10 +879,9 @@ const de_DescribeUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -933,12 +899,12 @@ export const de_GetGroupIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGroupIdResponse(data, context); + contents = _json(data); const response: GetGroupIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -971,10 +937,9 @@ const de_GetGroupIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -992,12 +957,12 @@ export const de_GetGroupMembershipIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGroupMembershipIdResponse(data, context); + contents = _json(data); const response: GetGroupMembershipIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1030,10 +995,9 @@ const de_GetGroupMembershipIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1051,12 +1015,12 @@ export const de_GetUserIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetUserIdResponse(data, context); + contents = _json(data); const response: GetUserIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1089,10 +1053,9 @@ const de_GetUserIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1110,12 +1073,12 @@ export const de_IsMemberInGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_IsMemberInGroupsResponse(data, context); + contents = _json(data); const response: IsMemberInGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1148,10 +1111,9 @@ const de_IsMemberInGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1169,12 +1131,12 @@ export const de_ListGroupMembershipsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGroupMembershipsResponse(data, context); + contents = _json(data); const response: ListGroupMembershipsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1207,10 +1169,9 @@ const de_ListGroupMembershipsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1228,12 +1189,12 @@ export const de_ListGroupMembershipsForMemberCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGroupMembershipsForMemberResponse(data, context); + contents = _json(data); const response: ListGroupMembershipsForMemberCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1266,10 +1227,9 @@ const de_ListGroupMembershipsForMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1287,12 +1247,12 @@ export const de_ListGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGroupsResponse(data, context); + contents = _json(data); const response: ListGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1325,10 +1285,9 @@ const de_ListGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1346,12 +1305,12 @@ export const de_ListUsersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListUsersResponse(data, context); + contents = _json(data); const response: ListUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1384,10 +1343,9 @@ const de_ListUsersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1405,12 +1363,12 @@ export const de_UpdateGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGroupResponse(data, context); + contents = _json(data); const response: UpdateGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1449,10 +1407,9 @@ const de_UpdateGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1470,12 +1427,12 @@ export const de_UpdateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserResponse(data, context); + contents = _json(data); const response: UpdateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1514,10 +1471,9 @@ const de_UpdateUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1531,7 +1487,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1544,7 +1500,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1560,7 +1516,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1576,7 +1532,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1592,7 +1548,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1605,7 +1561,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1618,7 +1574,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1626,39 +1582,16 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1Address - */ -const se_Address = (input: Address, context: __SerdeContext): any => { - return { - ...(input.Country != null && { Country: input.Country }), - ...(input.Formatted != null && { Formatted: input.Formatted }), - ...(input.Locality != null && { Locality: input.Locality }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.Primary != null && { Primary: input.Primary }), - ...(input.Region != null && { Region: input.Region }), - ...(input.StreetAddress != null && { StreetAddress: input.StreetAddress }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Address omitted. -/** - * serializeAws_json1_1Addresses - */ -const se_Addresses = (input: Address[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Address(entry, context); - }); -}; +// se_Addresses omitted. /** * serializeAws_json1_1AlternateIdentifier */ const se_AlternateIdentifier = (input: AlternateIdentifier, context: __SerdeContext): any => { return AlternateIdentifier.visit(input, { - ExternalId: (value) => ({ ExternalId: se_ExternalId(value, context) }), + ExternalId: (value) => ({ ExternalId: _json(value) }), UniqueAttribute: (value) => ({ UniqueAttribute: se_UniqueAttribute(value, context) }), _: (name, value) => ({ name: value } as any), }); @@ -1668,10 +1601,10 @@ const se_AlternateIdentifier = (input: AlternateIdentifier, context: __SerdeCont * serializeAws_json1_1AttributeOperation */ const se_AttributeOperation = (input: AttributeOperation, context: __SerdeContext): any => { - return { - ...(input.AttributePath != null && { AttributePath: input.AttributePath }), - ...(input.AttributeValue != null && { AttributeValue: se_AttributeValue(input.AttributeValue, context) }), - }; + return take(input, { + AttributePath: [], + AttributeValue: (_) => se_AttributeValue(_, context), + }); }; /** @@ -1692,873 +1625,195 @@ const se_AttributeValue = (input: __DocumentType, context: __SerdeContext): any return input; }; -/** - * serializeAws_json1_1CreateGroupMembershipRequest - */ -const se_CreateGroupMembershipRequest = (input: CreateGroupMembershipRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MemberId != null && { MemberId: se_MemberId(input.MemberId, context) }), - }; -}; +// se_CreateGroupMembershipRequest omitted. -/** - * serializeAws_json1_1CreateGroupRequest - */ -const se_CreateGroupRequest = (input: CreateGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - }; -}; +// se_CreateGroupRequest omitted. -/** - * serializeAws_json1_1CreateUserRequest - */ -const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { - return { - ...(input.Addresses != null && { Addresses: se_Addresses(input.Addresses, context) }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Emails != null && { Emails: se_Emails(input.Emails, context) }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.Name != null && { Name: se_Name(input.Name, context) }), - ...(input.NickName != null && { NickName: input.NickName }), - ...(input.PhoneNumbers != null && { PhoneNumbers: se_PhoneNumbers(input.PhoneNumbers, context) }), - ...(input.PreferredLanguage != null && { PreferredLanguage: input.PreferredLanguage }), - ...(input.ProfileUrl != null && { ProfileUrl: input.ProfileUrl }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - ...(input.Title != null && { Title: input.Title }), - ...(input.UserName != null && { UserName: input.UserName }), - ...(input.UserType != null && { UserType: input.UserType }), - }; -}; +// se_CreateUserRequest omitted. -/** - * serializeAws_json1_1DeleteGroupMembershipRequest - */ -const se_DeleteGroupMembershipRequest = (input: DeleteGroupMembershipRequest, context: __SerdeContext): any => { - return { - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MembershipId != null && { MembershipId: input.MembershipId }), - }; -}; +// se_DeleteGroupMembershipRequest omitted. -/** - * serializeAws_json1_1DeleteGroupRequest - */ -const se_DeleteGroupRequest = (input: DeleteGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - }; -}; +// se_DeleteGroupRequest omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DescribeGroupMembershipRequest - */ -const se_DescribeGroupMembershipRequest = (input: DescribeGroupMembershipRequest, context: __SerdeContext): any => { - return { - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MembershipId != null && { MembershipId: input.MembershipId }), - }; -}; +// se_DescribeGroupMembershipRequest omitted. -/** - * serializeAws_json1_1DescribeGroupRequest - */ -const se_DescribeGroupRequest = (input: DescribeGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - }; -}; +// se_DescribeGroupRequest omitted. -/** - * serializeAws_json1_1DescribeUserRequest - */ -const se_DescribeUserRequest = (input: DescribeUserRequest, context: __SerdeContext): any => { - return { - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_DescribeUserRequest omitted. -/** - * serializeAws_json1_1Email - */ -const se_Email = (input: Email, context: __SerdeContext): any => { - return { - ...(input.Primary != null && { Primary: input.Primary }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Email omitted. -/** - * serializeAws_json1_1Emails - */ -const se_Emails = (input: Email[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Email(entry, context); - }); -}; +// se_Emails omitted. -/** - * serializeAws_json1_1ExternalId - */ -const se_ExternalId = (input: ExternalId, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Issuer != null && { Issuer: input.Issuer }), - }; -}; +// se_ExternalId omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.AttributePath != null && { AttributePath: input.AttributePath }), - ...(input.AttributeValue != null && { AttributeValue: input.AttributeValue }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. /** * serializeAws_json1_1GetGroupIdRequest */ const se_GetGroupIdRequest = (input: GetGroupIdRequest, context: __SerdeContext): any => { - return { - ...(input.AlternateIdentifier != null && { - AlternateIdentifier: se_AlternateIdentifier(input.AlternateIdentifier, context), - }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - }; + return take(input, { + AlternateIdentifier: (_) => se_AlternateIdentifier(_, context), + IdentityStoreId: [], + }); }; -/** - * serializeAws_json1_1GetGroupMembershipIdRequest - */ -const se_GetGroupMembershipIdRequest = (input: GetGroupMembershipIdRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MemberId != null && { MemberId: se_MemberId(input.MemberId, context) }), - }; -}; +// se_GetGroupMembershipIdRequest omitted. /** * serializeAws_json1_1GetUserIdRequest */ const se_GetUserIdRequest = (input: GetUserIdRequest, context: __SerdeContext): any => { - return { - ...(input.AlternateIdentifier != null && { - AlternateIdentifier: se_AlternateIdentifier(input.AlternateIdentifier, context), - }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - }; + return take(input, { + AlternateIdentifier: (_) => se_AlternateIdentifier(_, context), + IdentityStoreId: [], + }); }; -/** - * serializeAws_json1_1GroupIds - */ -const se_GroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GroupIds omitted. -/** - * serializeAws_json1_1IsMemberInGroupsRequest - */ -const se_IsMemberInGroupsRequest = (input: IsMemberInGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.GroupIds != null && { GroupIds: se_GroupIds(input.GroupIds, context) }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MemberId != null && { MemberId: se_MemberId(input.MemberId, context) }), - }; -}; +// se_IsMemberInGroupsRequest omitted. -/** - * serializeAws_json1_1ListGroupMembershipsForMemberRequest - */ -const se_ListGroupMembershipsForMemberRequest = ( - input: ListGroupMembershipsForMemberRequest, - context: __SerdeContext -): any => { - return { - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MemberId != null && { MemberId: se_MemberId(input.MemberId, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListGroupMembershipsForMemberRequest omitted. -/** - * serializeAws_json1_1ListGroupMembershipsRequest - */ -const se_ListGroupMembershipsRequest = (input: ListGroupMembershipsRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListGroupMembershipsRequest omitted. -/** - * serializeAws_json1_1ListGroupsRequest - */ -const se_ListGroupsRequest = (input: ListGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListGroupsRequest omitted. -/** - * serializeAws_json1_1ListUsersRequest - */ -const se_ListUsersRequest = (input: ListUsersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListUsersRequest omitted. -/** - * serializeAws_json1_1MemberId - */ -const se_MemberId = (input: MemberId, context: __SerdeContext): any => { - return MemberId.visit(input, { - UserId: (value) => ({ UserId: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_MemberId omitted. -/** - * serializeAws_json1_1Name - */ -const se_Name = (input: Name, context: __SerdeContext): any => { - return { - ...(input.FamilyName != null && { FamilyName: input.FamilyName }), - ...(input.Formatted != null && { Formatted: input.Formatted }), - ...(input.GivenName != null && { GivenName: input.GivenName }), - ...(input.HonorificPrefix != null && { HonorificPrefix: input.HonorificPrefix }), - ...(input.HonorificSuffix != null && { HonorificSuffix: input.HonorificSuffix }), - ...(input.MiddleName != null && { MiddleName: input.MiddleName }), - }; -}; +// se_Name omitted. -/** - * serializeAws_json1_1PhoneNumber - */ -const se_PhoneNumber = (input: PhoneNumber, context: __SerdeContext): any => { - return { - ...(input.Primary != null && { Primary: input.Primary }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_PhoneNumber omitted. -/** - * serializeAws_json1_1PhoneNumbers - */ -const se_PhoneNumbers = (input: PhoneNumber[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PhoneNumber(entry, context); - }); -}; +// se_PhoneNumbers omitted. /** * serializeAws_json1_1UniqueAttribute */ const se_UniqueAttribute = (input: UniqueAttribute, context: __SerdeContext): any => { - return { - ...(input.AttributePath != null && { AttributePath: input.AttributePath }), - ...(input.AttributeValue != null && { AttributeValue: se_AttributeValue(input.AttributeValue, context) }), - }; + return take(input, { + AttributePath: [], + AttributeValue: (_) => se_AttributeValue(_, context), + }); }; /** * serializeAws_json1_1UpdateGroupRequest */ const se_UpdateGroupRequest = (input: UpdateGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.Operations != null && { Operations: se_AttributeOperations(input.Operations, context) }), - }; + return take(input, { + GroupId: [], + IdentityStoreId: [], + Operations: (_) => se_AttributeOperations(_, context), + }); }; /** * serializeAws_json1_1UpdateUserRequest */ const se_UpdateUserRequest = (input: UpdateUserRequest, context: __SerdeContext): any => { - return { - ...(input.IdentityStoreId != null && { IdentityStoreId: input.IdentityStoreId }), - ...(input.Operations != null && { Operations: se_AttributeOperations(input.Operations, context) }), - ...(input.UserId != null && { UserId: input.UserId }), - }; + return take(input, { + IdentityStoreId: [], + Operations: (_) => se_AttributeOperations(_, context), + UserId: [], + }); }; -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - Country: __expectString(output.Country), - Formatted: __expectString(output.Formatted), - Locality: __expectString(output.Locality), - PostalCode: __expectString(output.PostalCode), - Primary: __expectBoolean(output.Primary), - Region: __expectString(output.Region), - StreetAddress: __expectString(output.StreetAddress), - Type: __expectString(output.Type), - } as any; -}; +// de_Address omitted. -/** - * deserializeAws_json1_1Addresses - */ -const de_Addresses = (output: any, context: __SerdeContext): Address[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Address(entry, context); - }); - return retVal; -}; +// de_Addresses omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1CreateGroupMembershipResponse - */ -const de_CreateGroupMembershipResponse = (output: any, context: __SerdeContext): CreateGroupMembershipResponse => { - return { - IdentityStoreId: __expectString(output.IdentityStoreId), - MembershipId: __expectString(output.MembershipId), - } as any; -}; +// de_CreateGroupMembershipResponse omitted. -/** - * deserializeAws_json1_1CreateGroupResponse - */ -const de_CreateGroupResponse = (output: any, context: __SerdeContext): CreateGroupResponse => { - return { - GroupId: __expectString(output.GroupId), - IdentityStoreId: __expectString(output.IdentityStoreId), - } as any; -}; +// de_CreateGroupResponse omitted. -/** - * deserializeAws_json1_1CreateUserResponse - */ -const de_CreateUserResponse = (output: any, context: __SerdeContext): CreateUserResponse => { - return { - IdentityStoreId: __expectString(output.IdentityStoreId), - UserId: __expectString(output.UserId), - } as any; -}; +// de_CreateUserResponse omitted. -/** - * deserializeAws_json1_1DeleteGroupMembershipResponse - */ -const de_DeleteGroupMembershipResponse = (output: any, context: __SerdeContext): DeleteGroupMembershipResponse => { - return {} as any; -}; +// de_DeleteGroupMembershipResponse omitted. -/** - * deserializeAws_json1_1DeleteGroupResponse - */ -const de_DeleteGroupResponse = (output: any, context: __SerdeContext): DeleteGroupResponse => { - return {} as any; -}; +// de_DeleteGroupResponse omitted. -/** - * deserializeAws_json1_1DeleteUserResponse - */ -const de_DeleteUserResponse = (output: any, context: __SerdeContext): DeleteUserResponse => { - return {} as any; -}; +// de_DeleteUserResponse omitted. -/** - * deserializeAws_json1_1DescribeGroupMembershipResponse - */ -const de_DescribeGroupMembershipResponse = (output: any, context: __SerdeContext): DescribeGroupMembershipResponse => { - return { - GroupId: __expectString(output.GroupId), - IdentityStoreId: __expectString(output.IdentityStoreId), - MemberId: output.MemberId != null ? de_MemberId(__expectUnion(output.MemberId), context) : undefined, - MembershipId: __expectString(output.MembershipId), - } as any; -}; +// de_DescribeGroupMembershipResponse omitted. -/** - * deserializeAws_json1_1DescribeGroupResponse - */ -const de_DescribeGroupResponse = (output: any, context: __SerdeContext): DescribeGroupResponse => { - return { - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - ExternalIds: output.ExternalIds != null ? de_ExternalIds(output.ExternalIds, context) : undefined, - GroupId: __expectString(output.GroupId), - IdentityStoreId: __expectString(output.IdentityStoreId), - } as any; -}; +// de_DescribeGroupResponse omitted. -/** - * deserializeAws_json1_1DescribeUserResponse - */ -const de_DescribeUserResponse = (output: any, context: __SerdeContext): DescribeUserResponse => { - return { - Addresses: output.Addresses != null ? de_Addresses(output.Addresses, context) : undefined, - DisplayName: __expectString(output.DisplayName), - Emails: output.Emails != null ? de_Emails(output.Emails, context) : undefined, - ExternalIds: output.ExternalIds != null ? de_ExternalIds(output.ExternalIds, context) : undefined, - IdentityStoreId: __expectString(output.IdentityStoreId), - Locale: __expectString(output.Locale), - Name: output.Name != null ? de_Name(output.Name, context) : undefined, - NickName: __expectString(output.NickName), - PhoneNumbers: output.PhoneNumbers != null ? de_PhoneNumbers(output.PhoneNumbers, context) : undefined, - PreferredLanguage: __expectString(output.PreferredLanguage), - ProfileUrl: __expectString(output.ProfileUrl), - Timezone: __expectString(output.Timezone), - Title: __expectString(output.Title), - UserId: __expectString(output.UserId), - UserName: __expectString(output.UserName), - UserType: __expectString(output.UserType), - } as any; -}; - -/** - * deserializeAws_json1_1Email - */ -const de_Email = (output: any, context: __SerdeContext): Email => { - return { - Primary: __expectBoolean(output.Primary), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_DescribeUserResponse omitted. -/** - * deserializeAws_json1_1Emails - */ -const de_Emails = (output: any, context: __SerdeContext): Email[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Email(entry, context); - }); - return retVal; -}; +// de_Email omitted. -/** - * deserializeAws_json1_1ExternalId - */ -const de_ExternalId = (output: any, context: __SerdeContext): ExternalId => { - return { - Id: __expectString(output.Id), - Issuer: __expectString(output.Issuer), - } as any; -}; +// de_Emails omitted. -/** - * deserializeAws_json1_1ExternalIds - */ -const de_ExternalIds = (output: any, context: __SerdeContext): ExternalId[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExternalId(entry, context); - }); - return retVal; -}; +// de_ExternalId omitted. -/** - * deserializeAws_json1_1GetGroupIdResponse - */ -const de_GetGroupIdResponse = (output: any, context: __SerdeContext): GetGroupIdResponse => { - return { - GroupId: __expectString(output.GroupId), - IdentityStoreId: __expectString(output.IdentityStoreId), - } as any; -}; +// de_ExternalIds omitted. -/** - * deserializeAws_json1_1GetGroupMembershipIdResponse - */ -const de_GetGroupMembershipIdResponse = (output: any, context: __SerdeContext): GetGroupMembershipIdResponse => { - return { - IdentityStoreId: __expectString(output.IdentityStoreId), - MembershipId: __expectString(output.MembershipId), - } as any; -}; +// de_GetGroupIdResponse omitted. -/** - * deserializeAws_json1_1GetUserIdResponse - */ -const de_GetUserIdResponse = (output: any, context: __SerdeContext): GetUserIdResponse => { - return { - IdentityStoreId: __expectString(output.IdentityStoreId), - UserId: __expectString(output.UserId), - } as any; -}; +// de_GetGroupMembershipIdResponse omitted. -/** - * deserializeAws_json1_1Group - */ -const de_Group = (output: any, context: __SerdeContext): Group => { - return { - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - ExternalIds: output.ExternalIds != null ? de_ExternalIds(output.ExternalIds, context) : undefined, - GroupId: __expectString(output.GroupId), - IdentityStoreId: __expectString(output.IdentityStoreId), - } as any; -}; +// de_GetUserIdResponse omitted. -/** - * deserializeAws_json1_1GroupMembership - */ -const de_GroupMembership = (output: any, context: __SerdeContext): GroupMembership => { - return { - GroupId: __expectString(output.GroupId), - IdentityStoreId: __expectString(output.IdentityStoreId), - MemberId: output.MemberId != null ? de_MemberId(__expectUnion(output.MemberId), context) : undefined, - MembershipId: __expectString(output.MembershipId), - } as any; -}; +// de_Group omitted. -/** - * deserializeAws_json1_1GroupMembershipExistenceResult - */ -const de_GroupMembershipExistenceResult = (output: any, context: __SerdeContext): GroupMembershipExistenceResult => { - return { - GroupId: __expectString(output.GroupId), - MemberId: output.MemberId != null ? de_MemberId(__expectUnion(output.MemberId), context) : undefined, - MembershipExists: __expectBoolean(output.MembershipExists), - } as any; -}; +// de_GroupMembership omitted. -/** - * deserializeAws_json1_1GroupMembershipExistenceResults - */ -const de_GroupMembershipExistenceResults = (output: any, context: __SerdeContext): GroupMembershipExistenceResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupMembershipExistenceResult(entry, context); - }); - return retVal; -}; +// de_GroupMembershipExistenceResult omitted. -/** - * deserializeAws_json1_1GroupMemberships - */ -const de_GroupMemberships = (output: any, context: __SerdeContext): GroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupMembership(entry, context); - }); - return retVal; -}; +// de_GroupMembershipExistenceResults omitted. -/** - * deserializeAws_json1_1Groups - */ -const de_Groups = (output: any, context: __SerdeContext): Group[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Group(entry, context); - }); - return retVal; -}; +// de_GroupMemberships omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds), - } as any; -}; +// de_Groups omitted. -/** - * deserializeAws_json1_1IsMemberInGroupsResponse - */ -const de_IsMemberInGroupsResponse = (output: any, context: __SerdeContext): IsMemberInGroupsResponse => { - return { - Results: output.Results != null ? de_GroupMembershipExistenceResults(output.Results, context) : undefined, - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1ListGroupMembershipsForMemberResponse - */ -const de_ListGroupMembershipsForMemberResponse = ( - output: any, - context: __SerdeContext -): ListGroupMembershipsForMemberResponse => { - return { - GroupMemberships: - output.GroupMemberships != null ? de_GroupMemberships(output.GroupMemberships, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_IsMemberInGroupsResponse omitted. -/** - * deserializeAws_json1_1ListGroupMembershipsResponse - */ -const de_ListGroupMembershipsResponse = (output: any, context: __SerdeContext): ListGroupMembershipsResponse => { - return { - GroupMemberships: - output.GroupMemberships != null ? de_GroupMemberships(output.GroupMemberships, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListGroupMembershipsForMemberResponse omitted. -/** - * deserializeAws_json1_1ListGroupsResponse - */ -const de_ListGroupsResponse = (output: any, context: __SerdeContext): ListGroupsResponse => { - return { - Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListGroupMembershipsResponse omitted. -/** - * deserializeAws_json1_1ListUsersResponse - */ -const de_ListUsersResponse = (output: any, context: __SerdeContext): ListUsersResponse => { - return { - NextToken: __expectString(output.NextToken), - Users: output.Users != null ? de_Users(output.Users, context) : undefined, - } as any; -}; +// de_ListGroupsResponse omitted. -/** - * deserializeAws_json1_1MemberId - */ -const de_MemberId = (output: any, context: __SerdeContext): MemberId => { - if (__expectString(output.UserId) !== undefined) { - return { UserId: __expectString(output.UserId) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ListUsersResponse omitted. -/** - * deserializeAws_json1_1Name - */ -const de_Name = (output: any, context: __SerdeContext): Name => { - return { - FamilyName: __expectString(output.FamilyName), - Formatted: __expectString(output.Formatted), - GivenName: __expectString(output.GivenName), - HonorificPrefix: __expectString(output.HonorificPrefix), - HonorificSuffix: __expectString(output.HonorificSuffix), - MiddleName: __expectString(output.MiddleName), - } as any; -}; +// de_MemberId omitted. -/** - * deserializeAws_json1_1PhoneNumber - */ -const de_PhoneNumber = (output: any, context: __SerdeContext): PhoneNumber => { - return { - Primary: __expectBoolean(output.Primary), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_Name omitted. -/** - * deserializeAws_json1_1PhoneNumbers - */ -const de_PhoneNumbers = (output: any, context: __SerdeContext): PhoneNumber[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhoneNumber(entry, context); - }); - return retVal; -}; +// de_PhoneNumber omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_PhoneNumbers omitted. -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_1UpdateGroupResponse - */ -const de_UpdateGroupResponse = (output: any, context: __SerdeContext): UpdateGroupResponse => { - return {} as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UpdateUserResponse - */ -const de_UpdateUserResponse = (output: any, context: __SerdeContext): UpdateUserResponse => { - return {} as any; -}; +// de_UpdateGroupResponse omitted. -/** - * deserializeAws_json1_1User - */ -const de_User = (output: any, context: __SerdeContext): User => { - return { - Addresses: output.Addresses != null ? de_Addresses(output.Addresses, context) : undefined, - DisplayName: __expectString(output.DisplayName), - Emails: output.Emails != null ? de_Emails(output.Emails, context) : undefined, - ExternalIds: output.ExternalIds != null ? de_ExternalIds(output.ExternalIds, context) : undefined, - IdentityStoreId: __expectString(output.IdentityStoreId), - Locale: __expectString(output.Locale), - Name: output.Name != null ? de_Name(output.Name, context) : undefined, - NickName: __expectString(output.NickName), - PhoneNumbers: output.PhoneNumbers != null ? de_PhoneNumbers(output.PhoneNumbers, context) : undefined, - PreferredLanguage: __expectString(output.PreferredLanguage), - ProfileUrl: __expectString(output.ProfileUrl), - Timezone: __expectString(output.Timezone), - Title: __expectString(output.Title), - UserId: __expectString(output.UserId), - UserName: __expectString(output.UserName), - UserType: __expectString(output.UserType), - } as any; -}; - -/** - * deserializeAws_json1_1Users - */ -const de_Users = (output: any, context: __SerdeContext): User[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_User(entry, context); - }); - return retVal; -}; +// de_UpdateUserResponse omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_User omitted. + +// de_Users omitted. + +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2580,6 +1835,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-imagebuilder/src/protocols/Aws_restJson1.ts b/clients/client-imagebuilder/src/protocols/Aws_restJson1.ts index bb2756e1c2b9..acaeeed2afb7 100644 --- a/clients/client-imagebuilder/src/protocols/Aws_restJson1.ts +++ b/clients/client-imagebuilder/src/protocols/Aws_restJson1.ts @@ -1,20 +1,20 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -177,29 +177,16 @@ import { } from "../commands/UpdateInfrastructureConfigurationCommand"; import { ImagebuilderServiceException as __BaseException } from "../models/ImagebuilderServiceException"; import { - AccountAggregation, AdditionalInstanceConfiguration, - Ami, AmiDistributionConfiguration, CallRateLimitExceededException, ClientException, - Component, ComponentConfiguration, ComponentParameter, - ComponentParameterDetail, - ComponentState, - ComponentSummary, - ComponentVersion, - Container, ContainerDistributionConfiguration, - ContainerRecipe, - ContainerRecipeSummary, CvssScore, - CvssScoreAdjustment, CvssScoreDetails, Distribution, - DistributionConfiguration, - DistributionConfigurationSummary, EbsInstanceBlockDeviceSpecification, EcrConfiguration, FastLaunchConfiguration, @@ -208,24 +195,10 @@ import { Filter, ForbiddenException, IdempotentParameterMismatchException, - Image, - ImageAggregation, - ImagePackage, - ImagePipeline, - ImagePipelineAggregation, - ImageRecipe, - ImageRecipeSummary, ImageScanFinding, - ImageScanFindingAggregation, ImageScanFindingsFilter, ImageScanningConfiguration, - ImageScanState, - ImageState, - ImageSummary, ImageTestsConfiguration, - ImageVersion, - InfrastructureConfiguration, - InfrastructureConfigurationSummary, InspectorScoreDetails, InstanceBlockDeviceMapping, InstanceConfiguration, @@ -239,10 +212,7 @@ import { LaunchPermissionConfiguration, LaunchTemplateConfiguration, Logging, - OutputResources, PackageVulnerabilityDetails, - Remediation, - RemediationRecommendation, ResourceAlreadyExistsException, ResourceDependencyException, ResourceInUseException, @@ -253,13 +223,8 @@ import { ServiceException, ServiceQuotaExceededException, ServiceUnavailableException, - SeverityCounts, SystemsManagerAgent, TargetContainerRepository, - VulnerabilityIdAggregation, - VulnerablePackage, - WorkflowExecutionMetadata, - WorkflowStepMetadata, } from "../models/models_0"; /** @@ -275,10 +240,12 @@ export const se_CancelImageCreationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CancelImageCreation"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.imageBuildVersionArn != null && { imageBuildVersionArn: input.imageBuildVersionArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + imageBuildVersionArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -303,21 +270,21 @@ export const se_CreateComponentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateComponent"; let body: any; - body = JSON.stringify({ - ...(input.changeDescription != null && { changeDescription: input.changeDescription }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.data != null && { data: input.data }), - ...(input.description != null && { description: input.description }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.name != null && { name: input.name }), - ...(input.platform != null && { platform: input.platform }), - ...(input.semanticVersion != null && { semanticVersion: input.semanticVersion }), - ...(input.supportedOsVersions != null && { - supportedOsVersions: se_OsVersionList(input.supportedOsVersions, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.uri != null && { uri: input.uri }), - }); + body = JSON.stringify( + take(input, { + changeDescription: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + data: [], + description: [], + kmsKeyId: [], + name: [], + platform: [], + semanticVersion: [], + supportedOsVersions: (_) => _json(_), + tags: (_) => _json(_), + uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -342,28 +309,26 @@ export const se_CreateContainerRecipeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateContainerRecipe"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.components != null && { components: se_ComponentConfigurationList(input.components, context) }), - ...(input.containerType != null && { containerType: input.containerType }), - ...(input.description != null && { description: input.description }), - ...(input.dockerfileTemplateData != null && { dockerfileTemplateData: input.dockerfileTemplateData }), - ...(input.dockerfileTemplateUri != null && { dockerfileTemplateUri: input.dockerfileTemplateUri }), - ...(input.imageOsVersionOverride != null && { imageOsVersionOverride: input.imageOsVersionOverride }), - ...(input.instanceConfiguration != null && { - instanceConfiguration: se_InstanceConfiguration(input.instanceConfiguration, context), - }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.name != null && { name: input.name }), - ...(input.parentImage != null && { parentImage: input.parentImage }), - ...(input.platformOverride != null && { platformOverride: input.platformOverride }), - ...(input.semanticVersion != null && { semanticVersion: input.semanticVersion }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.targetRepository != null && { - targetRepository: se_TargetContainerRepository(input.targetRepository, context), - }), - ...(input.workingDirectory != null && { workingDirectory: input.workingDirectory }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + components: (_) => _json(_), + containerType: [], + description: [], + dockerfileTemplateData: [], + dockerfileTemplateUri: [], + imageOsVersionOverride: [], + instanceConfiguration: (_) => _json(_), + kmsKeyId: [], + name: [], + parentImage: [], + platformOverride: [], + semanticVersion: [], + tags: (_) => _json(_), + targetRepository: (_) => _json(_), + workingDirectory: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -389,13 +354,15 @@ export const se_CreateDistributionConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateDistributionConfiguration"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.distributions != null && { distributions: se_DistributionList(input.distributions, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + distributions: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -420,27 +387,19 @@ export const se_CreateImageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateImage"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.containerRecipeArn != null && { containerRecipeArn: input.containerRecipeArn }), - ...(input.distributionConfigurationArn != null && { - distributionConfigurationArn: input.distributionConfigurationArn, - }), - ...(input.enhancedImageMetadataEnabled != null && { - enhancedImageMetadataEnabled: input.enhancedImageMetadataEnabled, - }), - ...(input.imageRecipeArn != null && { imageRecipeArn: input.imageRecipeArn }), - ...(input.imageScanningConfiguration != null && { - imageScanningConfiguration: se_ImageScanningConfiguration(input.imageScanningConfiguration, context), - }), - ...(input.imageTestsConfiguration != null && { - imageTestsConfiguration: se_ImageTestsConfiguration(input.imageTestsConfiguration, context), - }), - ...(input.infrastructureConfigurationArn != null && { - infrastructureConfigurationArn: input.infrastructureConfigurationArn, - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + containerRecipeArn: [], + distributionConfigurationArn: [], + enhancedImageMetadataEnabled: [], + imageRecipeArn: [], + imageScanningConfiguration: (_) => _json(_), + imageTestsConfiguration: (_) => _json(_), + infrastructureConfigurationArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -465,31 +424,23 @@ export const se_CreateImagePipelineCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateImagePipeline"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.containerRecipeArn != null && { containerRecipeArn: input.containerRecipeArn }), - ...(input.description != null && { description: input.description }), - ...(input.distributionConfigurationArn != null && { - distributionConfigurationArn: input.distributionConfigurationArn, - }), - ...(input.enhancedImageMetadataEnabled != null && { - enhancedImageMetadataEnabled: input.enhancedImageMetadataEnabled, - }), - ...(input.imageRecipeArn != null && { imageRecipeArn: input.imageRecipeArn }), - ...(input.imageScanningConfiguration != null && { - imageScanningConfiguration: se_ImageScanningConfiguration(input.imageScanningConfiguration, context), - }), - ...(input.imageTestsConfiguration != null && { - imageTestsConfiguration: se_ImageTestsConfiguration(input.imageTestsConfiguration, context), - }), - ...(input.infrastructureConfigurationArn != null && { - infrastructureConfigurationArn: input.infrastructureConfigurationArn, - }), - ...(input.name != null && { name: input.name }), - ...(input.schedule != null && { schedule: se_Schedule(input.schedule, context) }), - ...(input.status != null && { status: input.status }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + containerRecipeArn: [], + description: [], + distributionConfigurationArn: [], + enhancedImageMetadataEnabled: [], + imageRecipeArn: [], + imageScanningConfiguration: (_) => _json(_), + imageTestsConfiguration: (_) => _json(_), + infrastructureConfigurationArn: [], + name: [], + schedule: (_) => _json(_), + status: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -514,25 +465,20 @@ export const se_CreateImageRecipeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateImageRecipe"; let body: any; - body = JSON.stringify({ - ...(input.additionalInstanceConfiguration != null && { - additionalInstanceConfiguration: se_AdditionalInstanceConfiguration( - input.additionalInstanceConfiguration, - context - ), - }), - ...(input.blockDeviceMappings != null && { - blockDeviceMappings: se_InstanceBlockDeviceMappings(input.blockDeviceMappings, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.components != null && { components: se_ComponentConfigurationList(input.components, context) }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.parentImage != null && { parentImage: input.parentImage }), - ...(input.semanticVersion != null && { semanticVersion: input.semanticVersion }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.workingDirectory != null && { workingDirectory: input.workingDirectory }), - }); + body = JSON.stringify( + take(input, { + additionalInstanceConfiguration: (_) => _json(_), + blockDeviceMappings: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + components: (_) => _json(_), + description: [], + name: [], + parentImage: [], + semanticVersion: [], + tags: (_) => _json(_), + workingDirectory: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -558,24 +504,24 @@ export const se_CreateInfrastructureConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateInfrastructureConfiguration"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.instanceMetadataOptions != null && { - instanceMetadataOptions: se_InstanceMetadataOptions(input.instanceMetadataOptions, context), - }), - ...(input.instanceProfileName != null && { instanceProfileName: input.instanceProfileName }), - ...(input.instanceTypes != null && { instanceTypes: se_InstanceTypeList(input.instanceTypes, context) }), - ...(input.keyPair != null && { keyPair: input.keyPair }), - ...(input.logging != null && { logging: se_Logging(input.logging, context) }), - ...(input.name != null && { name: input.name }), - ...(input.resourceTags != null && { resourceTags: se_ResourceTagMap(input.resourceTags, context) }), - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }), - ...(input.subnetId != null && { subnetId: input.subnetId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.terminateInstanceOnFailure != null && { terminateInstanceOnFailure: input.terminateInstanceOnFailure }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + instanceMetadataOptions: (_) => _json(_), + instanceProfileName: [], + instanceTypes: (_) => _json(_), + keyPair: [], + logging: (_) => _json(_), + name: [], + resourceTags: (_) => _json(_), + securityGroupIds: (_) => _json(_), + snsTopicArn: [], + subnetId: [], + tags: (_) => _json(_), + terminateInstanceOnFailure: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1138,20 +1084,22 @@ export const se_ImportComponentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ImportComponent"; let body: any; - body = JSON.stringify({ - ...(input.changeDescription != null && { changeDescription: input.changeDescription }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.data != null && { data: input.data }), - ...(input.description != null && { description: input.description }), - ...(input.format != null && { format: input.format }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.name != null && { name: input.name }), - ...(input.platform != null && { platform: input.platform }), - ...(input.semanticVersion != null && { semanticVersion: input.semanticVersion }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - ...(input.uri != null && { uri: input.uri }), - }); + body = JSON.stringify( + take(input, { + changeDescription: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + data: [], + description: [], + format: [], + kmsKeyId: [], + name: [], + platform: [], + semanticVersion: [], + tags: (_) => _json(_), + type: [], + uri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1176,16 +1124,18 @@ export const se_ImportVmImageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ImportVmImage"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.osVersion != null && { osVersion: input.osVersion }), - ...(input.platform != null && { platform: input.platform }), - ...(input.semanticVersion != null && { semanticVersion: input.semanticVersion }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.vmImportTaskId != null && { vmImportTaskId: input.vmImportTaskId }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + osVersion: [], + platform: [], + semanticVersion: [], + tags: (_) => _json(_), + vmImportTaskId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1211,11 +1161,13 @@ export const se_ListComponentBuildVersionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListComponentBuildVersions"; let body: any; - body = JSON.stringify({ - ...(input.componentVersionArn != null && { componentVersionArn: input.componentVersionArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + componentVersionArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1240,13 +1192,15 @@ export const se_ListComponentsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListComponents"; let body: any; - body = JSON.stringify({ - ...(input.byName != null && { byName: input.byName }), - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.owner != null && { owner: input.owner }), - }); + body = JSON.stringify( + take(input, { + byName: [], + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + owner: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1271,12 +1225,14 @@ export const se_ListContainerRecipesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListContainerRecipes"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.owner != null && { owner: input.owner }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + owner: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1302,11 +1258,13 @@ export const se_ListDistributionConfigurationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListDistributionConfigurations"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1332,12 +1290,14 @@ export const se_ListImageBuildVersionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImageBuildVersions"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.imageVersionArn != null && { imageVersionArn: input.imageVersionArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + imageVersionArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1362,11 +1322,13 @@ export const se_ListImagePackagesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImagePackages"; let body: any; - body = JSON.stringify({ - ...(input.imageBuildVersionArn != null && { imageBuildVersionArn: input.imageBuildVersionArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + imageBuildVersionArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1392,12 +1354,14 @@ export const se_ListImagePipelineImagesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImagePipelineImages"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.imagePipelineArn != null && { imagePipelineArn: input.imagePipelineArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + imagePipelineArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1422,11 +1386,13 @@ export const se_ListImagePipelinesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImagePipelines"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1451,12 +1417,14 @@ export const se_ListImageRecipesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImageRecipes"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.owner != null && { owner: input.owner }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + owner: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1481,14 +1449,16 @@ export const se_ListImagesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImages"; let body: any; - body = JSON.stringify({ - ...(input.byName != null && { byName: input.byName }), - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.includeDeprecated != null && { includeDeprecated: input.includeDeprecated }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.owner != null && { owner: input.owner }), - }); + body = JSON.stringify( + take(input, { + byName: [], + filters: (_) => _json(_), + includeDeprecated: [], + maxResults: [], + nextToken: [], + owner: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1514,10 +1484,12 @@ export const se_ListImageScanFindingAggregationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImageScanFindingAggregations"; let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_Filter(input.filter, context) }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => _json(_), + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1542,11 +1514,13 @@ export const se_ListImageScanFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImageScanFindings"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ImageScanFindingsFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1572,11 +1546,13 @@ export const se_ListInfrastructureConfigurationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListInfrastructureConfigurations"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1625,11 +1601,13 @@ export const se_ListWorkflowExecutionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListWorkflowExecutions"; let body: any; - body = JSON.stringify({ - ...(input.imageBuildVersionArn != null && { imageBuildVersionArn: input.imageBuildVersionArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + imageBuildVersionArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1655,11 +1633,13 @@ export const se_ListWorkflowStepExecutionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListWorkflowStepExecutions"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.workflowExecutionId != null && { workflowExecutionId: input.workflowExecutionId }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + workflowExecutionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1684,10 +1664,12 @@ export const se_PutComponentPolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutComponentPolicy"; let body: any; - body = JSON.stringify({ - ...(input.componentArn != null && { componentArn: input.componentArn }), - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + componentArn: [], + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1713,10 +1695,12 @@ export const se_PutContainerRecipePolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutContainerRecipePolicy"; let body: any; - body = JSON.stringify({ - ...(input.containerRecipeArn != null && { containerRecipeArn: input.containerRecipeArn }), - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + containerRecipeArn: [], + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1741,10 +1725,12 @@ export const se_PutImagePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutImagePolicy"; let body: any; - body = JSON.stringify({ - ...(input.imageArn != null && { imageArn: input.imageArn }), - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + imageArn: [], + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1769,10 +1755,12 @@ export const se_PutImageRecipePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutImageRecipePolicy"; let body: any; - body = JSON.stringify({ - ...(input.imageRecipeArn != null && { imageRecipeArn: input.imageRecipeArn }), - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + imageRecipeArn: [], + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1798,10 +1786,12 @@ export const se_StartImagePipelineExecutionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartImagePipelineExecution"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.imagePipelineArn != null && { imagePipelineArn: input.imagePipelineArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + imagePipelineArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1827,9 +1817,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1885,14 +1877,14 @@ export const se_UpdateDistributionConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateDistributionConfiguration"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.distributionConfigurationArn != null && { - distributionConfigurationArn: input.distributionConfigurationArn, - }), - ...(input.distributions != null && { distributions: se_DistributionList(input.distributions, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + distributionConfigurationArn: [], + distributions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1917,30 +1909,22 @@ export const se_UpdateImagePipelineCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateImagePipeline"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.containerRecipeArn != null && { containerRecipeArn: input.containerRecipeArn }), - ...(input.description != null && { description: input.description }), - ...(input.distributionConfigurationArn != null && { - distributionConfigurationArn: input.distributionConfigurationArn, - }), - ...(input.enhancedImageMetadataEnabled != null && { - enhancedImageMetadataEnabled: input.enhancedImageMetadataEnabled, - }), - ...(input.imagePipelineArn != null && { imagePipelineArn: input.imagePipelineArn }), - ...(input.imageRecipeArn != null && { imageRecipeArn: input.imageRecipeArn }), - ...(input.imageScanningConfiguration != null && { - imageScanningConfiguration: se_ImageScanningConfiguration(input.imageScanningConfiguration, context), - }), - ...(input.imageTestsConfiguration != null && { - imageTestsConfiguration: se_ImageTestsConfiguration(input.imageTestsConfiguration, context), - }), - ...(input.infrastructureConfigurationArn != null && { - infrastructureConfigurationArn: input.infrastructureConfigurationArn, - }), - ...(input.schedule != null && { schedule: se_Schedule(input.schedule, context) }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + containerRecipeArn: [], + description: [], + distributionConfigurationArn: [], + enhancedImageMetadataEnabled: [], + imagePipelineArn: [], + imageRecipeArn: [], + imageScanningConfiguration: (_) => _json(_), + imageTestsConfiguration: (_) => _json(_), + infrastructureConfigurationArn: [], + schedule: (_) => _json(_), + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1966,25 +1950,23 @@ export const se_UpdateInfrastructureConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateInfrastructureConfiguration"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.infrastructureConfigurationArn != null && { - infrastructureConfigurationArn: input.infrastructureConfigurationArn, - }), - ...(input.instanceMetadataOptions != null && { - instanceMetadataOptions: se_InstanceMetadataOptions(input.instanceMetadataOptions, context), - }), - ...(input.instanceProfileName != null && { instanceProfileName: input.instanceProfileName }), - ...(input.instanceTypes != null && { instanceTypes: se_InstanceTypeList(input.instanceTypes, context) }), - ...(input.keyPair != null && { keyPair: input.keyPair }), - ...(input.logging != null && { logging: se_Logging(input.logging, context) }), - ...(input.resourceTags != null && { resourceTags: se_ResourceTagMap(input.resourceTags, context) }), - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }), - ...(input.subnetId != null && { subnetId: input.subnetId }), - ...(input.terminateInstanceOnFailure != null && { terminateInstanceOnFailure: input.terminateInstanceOnFailure }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + infrastructureConfigurationArn: [], + instanceMetadataOptions: (_) => _json(_), + instanceProfileName: [], + instanceTypes: (_) => _json(_), + keyPair: [], + logging: (_) => _json(_), + resourceTags: (_) => _json(_), + securityGroupIds: (_) => _json(_), + snsTopicArn: [], + subnetId: [], + terminateInstanceOnFailure: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2010,15 +1992,12 @@ export const de_CancelImageCreationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imageBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2061,10 +2040,9 @@ const de_CancelImageCreationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,15 +2062,12 @@ export const de_CreateComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.componentBuildVersionArn != null) { - contents.componentBuildVersionArn = __expectString(data.componentBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + componentBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2144,10 +2119,9 @@ const de_CreateComponentCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2167,15 +2141,12 @@ export const de_CreateContainerRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.containerRecipeArn != null) { - contents.containerRecipeArn = __expectString(data.containerRecipeArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + containerRecipeArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2227,10 +2198,9 @@ const de_CreateContainerRecipeCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2250,15 +2220,12 @@ export const de_CreateDistributionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.distributionConfigurationArn != null) { - contents.distributionConfigurationArn = __expectString(data.distributionConfigurationArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + distributionConfigurationArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2310,10 +2277,9 @@ const de_CreateDistributionConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2333,15 +2299,12 @@ export const de_CreateImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imageBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2387,10 +2350,9 @@ const de_CreateImageCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2410,15 +2372,12 @@ export const de_CreateImagePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imagePipelineArn != null) { - contents.imagePipelineArn = __expectString(data.imagePipelineArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imagePipelineArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2467,10 +2426,9 @@ const de_CreateImagePipelineCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2490,15 +2448,12 @@ export const de_CreateImageRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imageRecipeArn != null) { - contents.imageRecipeArn = __expectString(data.imageRecipeArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imageRecipeArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2550,10 +2505,9 @@ const de_CreateImageRecipeCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2573,15 +2527,12 @@ export const de_CreateInfrastructureConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.infrastructureConfigurationArn != null) { - contents.infrastructureConfigurationArn = __expectString(data.infrastructureConfigurationArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + infrastructureConfigurationArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2630,10 +2581,9 @@ const de_CreateInfrastructureConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2653,12 +2603,11 @@ export const de_DeleteComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentBuildVersionArn != null) { - contents.componentBuildVersionArn = __expectString(data.componentBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + componentBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2698,10 +2647,9 @@ const de_DeleteComponentCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2721,12 +2669,11 @@ export const de_DeleteContainerRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.containerRecipeArn != null) { - contents.containerRecipeArn = __expectString(data.containerRecipeArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + containerRecipeArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2766,10 +2713,9 @@ const de_DeleteContainerRecipeCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2789,12 +2735,11 @@ export const de_DeleteDistributionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.distributionConfigurationArn != null) { - contents.distributionConfigurationArn = __expectString(data.distributionConfigurationArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + distributionConfigurationArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2834,10 +2779,9 @@ const de_DeleteDistributionConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2857,12 +2801,11 @@ export const de_DeleteImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2902,10 +2845,9 @@ const de_DeleteImageCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2925,12 +2867,11 @@ export const de_DeleteImagePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imagePipelineArn != null) { - contents.imagePipelineArn = __expectString(data.imagePipelineArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imagePipelineArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2970,10 +2911,9 @@ const de_DeleteImagePipelineCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2993,12 +2933,11 @@ export const de_DeleteImageRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageRecipeArn != null) { - contents.imageRecipeArn = __expectString(data.imageRecipeArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageRecipeArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3038,10 +2977,9 @@ const de_DeleteImageRecipeCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3061,12 +2999,11 @@ export const de_DeleteInfrastructureConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.infrastructureConfigurationArn != null) { - contents.infrastructureConfigurationArn = __expectString(data.infrastructureConfigurationArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + infrastructureConfigurationArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3106,10 +3043,9 @@ const de_DeleteInfrastructureConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3129,12 +3065,11 @@ export const de_GetComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.component != null) { - contents.component = de_Component(data.component, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + component: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3171,10 +3106,9 @@ const de_GetComponentCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3194,12 +3128,11 @@ export const de_GetComponentPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + policy: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3236,10 +3169,9 @@ const de_GetComponentPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3259,12 +3191,11 @@ export const de_GetContainerRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.containerRecipe != null) { - contents.containerRecipe = de_ContainerRecipe(data.containerRecipe, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + containerRecipe: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3301,10 +3232,9 @@ const de_GetContainerRecipeCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3324,12 +3254,11 @@ export const de_GetContainerRecipePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + policy: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3366,10 +3295,9 @@ const de_GetContainerRecipePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3389,12 +3317,11 @@ export const de_GetDistributionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.distributionConfiguration != null) { - contents.distributionConfiguration = de_DistributionConfiguration(data.distributionConfiguration, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + distributionConfiguration: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3431,10 +3358,9 @@ const de_GetDistributionConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3454,12 +3380,11 @@ export const de_GetImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.image != null) { - contents.image = de_Image(data.image, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + image: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3496,10 +3421,9 @@ const de_GetImageCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3519,12 +3443,11 @@ export const de_GetImagePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imagePipeline != null) { - contents.imagePipeline = de_ImagePipeline(data.imagePipeline, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imagePipeline: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3561,10 +3484,9 @@ const de_GetImagePipelineCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3584,12 +3506,11 @@ export const de_GetImagePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + policy: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3626,10 +3547,9 @@ const de_GetImagePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3649,12 +3569,11 @@ export const de_GetImageRecipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageRecipe != null) { - contents.imageRecipe = de_ImageRecipe(data.imageRecipe, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageRecipe: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3691,10 +3610,9 @@ const de_GetImageRecipeCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3714,12 +3632,11 @@ export const de_GetImageRecipePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + policy: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3756,10 +3673,9 @@ const de_GetImageRecipePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3779,12 +3695,11 @@ export const de_GetInfrastructureConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.infrastructureConfiguration != null) { - contents.infrastructureConfiguration = de_InfrastructureConfiguration(data.infrastructureConfiguration, context); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + infrastructureConfiguration: _json, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3821,10 +3736,9 @@ const de_GetInfrastructureConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3844,45 +3758,22 @@ export const de_GetWorkflowExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endTime != null) { - contents.endTime = __expectString(data.endTime); - } - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } - if (data.startTime != null) { - contents.startTime = __expectString(data.startTime); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.totalStepCount != null) { - contents.totalStepCount = __expectInt32(data.totalStepCount); - } - if (data.totalStepsFailed != null) { - contents.totalStepsFailed = __expectInt32(data.totalStepsFailed); - } - if (data.totalStepsSkipped != null) { - contents.totalStepsSkipped = __expectInt32(data.totalStepsSkipped); - } - if (data.totalStepsSucceeded != null) { - contents.totalStepsSucceeded = __expectInt32(data.totalStepsSucceeded); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } - if (data.workflowBuildVersionArn != null) { - contents.workflowBuildVersionArn = __expectString(data.workflowBuildVersionArn); - } - if (data.workflowExecutionId != null) { - contents.workflowExecutionId = __expectString(data.workflowExecutionId); - } + const doc = take(data, { + endTime: __expectString, + imageBuildVersionArn: __expectString, + message: __expectString, + requestId: __expectString, + startTime: __expectString, + status: __expectString, + totalStepCount: __expectInt32, + totalStepsFailed: __expectInt32, + totalStepsSkipped: __expectInt32, + totalStepsSucceeded: __expectInt32, + type: __expectString, + workflowBuildVersionArn: __expectString, + workflowExecutionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3919,10 +3810,9 @@ const de_GetWorkflowExecutionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3942,57 +3832,26 @@ export const de_GetWorkflowStepExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = __expectString(data.action); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.endTime != null) { - contents.endTime = __expectString(data.endTime); - } - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.inputs != null) { - contents.inputs = __expectString(data.inputs); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.onFailure != null) { - contents.onFailure = __expectString(data.onFailure); - } - if (data.outputs != null) { - contents.outputs = __expectString(data.outputs); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } - if (data.rollbackStatus != null) { - contents.rollbackStatus = __expectString(data.rollbackStatus); - } - if (data.startTime != null) { - contents.startTime = __expectString(data.startTime); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.stepExecutionId != null) { - contents.stepExecutionId = __expectString(data.stepExecutionId); - } - if (data.timeoutSeconds != null) { - contents.timeoutSeconds = __expectInt32(data.timeoutSeconds); - } - if (data.workflowBuildVersionArn != null) { - contents.workflowBuildVersionArn = __expectString(data.workflowBuildVersionArn); - } - if (data.workflowExecutionId != null) { - contents.workflowExecutionId = __expectString(data.workflowExecutionId); - } + const doc = take(data, { + action: __expectString, + description: __expectString, + endTime: __expectString, + imageBuildVersionArn: __expectString, + inputs: __expectString, + message: __expectString, + name: __expectString, + onFailure: __expectString, + outputs: __expectString, + requestId: __expectString, + rollbackStatus: __expectString, + startTime: __expectString, + status: __expectString, + stepExecutionId: __expectString, + timeoutSeconds: __expectInt32, + workflowBuildVersionArn: __expectString, + workflowExecutionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4029,10 +3888,9 @@ const de_GetWorkflowStepExecutionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4052,15 +3910,12 @@ export const de_ImportComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.componentBuildVersionArn != null) { - contents.componentBuildVersionArn = __expectString(data.componentBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + componentBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4109,10 +3964,9 @@ const de_ImportComponentCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4132,15 +3986,12 @@ export const de_ImportVmImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imageArn != null) { - contents.imageArn = __expectString(data.imageArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imageArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4168,10 +4019,9 @@ const de_ImportVmImageCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4191,15 +4041,12 @@ export const de_ListComponentBuildVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentSummaryList != null) { - contents.componentSummaryList = de_ComponentSummaryList(data.componentSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + componentSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4239,10 +4086,9 @@ const de_ListComponentBuildVersionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4262,15 +4108,12 @@ export const de_ListComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentVersionList != null) { - contents.componentVersionList = de_ComponentVersionList(data.componentVersionList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + componentVersionList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4310,10 +4153,9 @@ const de_ListComponentsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4333,15 +4175,12 @@ export const de_ListContainerRecipesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.containerRecipeSummaryList != null) { - contents.containerRecipeSummaryList = de_ContainerRecipeSummaryList(data.containerRecipeSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + containerRecipeSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4381,10 +4220,9 @@ const de_ListContainerRecipesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4404,18 +4242,12 @@ export const de_ListDistributionConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.distributionConfigurationSummaryList != null) { - contents.distributionConfigurationSummaryList = de_DistributionConfigurationSummaryList( - data.distributionConfigurationSummaryList, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + distributionConfigurationSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4455,10 +4287,9 @@ const de_ListDistributionConfigurationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4478,15 +4309,12 @@ export const de_ListImageBuildVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageSummaryList != null) { - contents.imageSummaryList = de_ImageSummaryList(data.imageSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4526,10 +4354,9 @@ const de_ListImageBuildVersionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4549,15 +4376,12 @@ export const de_ListImagePackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imagePackageList != null) { - contents.imagePackageList = de_ImagePackageList(data.imagePackageList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imagePackageList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4600,10 +4424,9 @@ const de_ListImagePackagesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4623,15 +4446,12 @@ export const de_ListImagePipelineImagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageSummaryList != null) { - contents.imageSummaryList = de_ImageSummaryList(data.imageSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4674,10 +4494,9 @@ const de_ListImagePipelineImagesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4697,15 +4516,12 @@ export const de_ListImagePipelinesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imagePipelineList != null) { - contents.imagePipelineList = de_ImagePipelineList(data.imagePipelineList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imagePipelineList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4745,10 +4561,9 @@ const de_ListImagePipelinesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4768,15 +4583,12 @@ export const de_ListImageRecipesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageRecipeSummaryList != null) { - contents.imageRecipeSummaryList = de_ImageRecipeSummaryList(data.imageRecipeSummaryList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageRecipeSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4816,10 +4628,9 @@ const de_ListImageRecipesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4839,15 +4650,12 @@ export const de_ListImagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageVersionList != null) { - contents.imageVersionList = de_ImageVersionList(data.imageVersionList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageVersionList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4887,10 +4695,9 @@ const de_ListImagesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4910,18 +4717,13 @@ export const de_ListImageScanFindingAggregationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.aggregationType != null) { - contents.aggregationType = __expectString(data.aggregationType); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } - if (data.responses != null) { - contents.responses = de_ImageScanFindingAggregationsList(data.responses, context); - } + const doc = take(data, { + aggregationType: __expectString, + nextToken: __expectString, + requestId: __expectString, + responses: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4961,10 +4763,9 @@ const de_ListImageScanFindingAggregationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4984,15 +4785,12 @@ export const de_ListImageScanFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de_ImageScanFindingsList(data.findings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + findings: (_) => de_ImageScanFindingsList(_, context), + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5032,10 +4830,9 @@ const de_ListImageScanFindingsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5055,18 +4852,12 @@ export const de_ListInfrastructureConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.infrastructureConfigurationSummaryList != null) { - contents.infrastructureConfigurationSummaryList = de_InfrastructureConfigurationSummaryList( - data.infrastructureConfigurationSummaryList, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + infrastructureConfigurationSummaryList: _json, + nextToken: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5106,10 +4897,9 @@ const de_ListInfrastructureConfigurationsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5129,9 +4919,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5159,10 +4950,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5182,21 +4972,14 @@ export const de_ListWorkflowExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } - if (data.workflowExecutions != null) { - contents.workflowExecutions = de_WorkflowExecutionsList(data.workflowExecutions, context); - } + const doc = take(data, { + imageBuildVersionArn: __expectString, + message: __expectString, + nextToken: __expectString, + requestId: __expectString, + workflowExecutions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5236,10 +5019,9 @@ const de_ListWorkflowExecutionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5259,27 +5041,16 @@ export const de_ListWorkflowStepExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } - if (data.steps != null) { - contents.steps = de_WorkflowStepExecutionsList(data.steps, context); - } - if (data.workflowBuildVersionArn != null) { - contents.workflowBuildVersionArn = __expectString(data.workflowBuildVersionArn); - } - if (data.workflowExecutionId != null) { - contents.workflowExecutionId = __expectString(data.workflowExecutionId); - } + const doc = take(data, { + imageBuildVersionArn: __expectString, + message: __expectString, + nextToken: __expectString, + requestId: __expectString, + steps: _json, + workflowBuildVersionArn: __expectString, + workflowExecutionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5319,10 +5090,9 @@ const de_ListWorkflowStepExecutionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5342,12 +5112,11 @@ export const de_PutComponentPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentArn != null) { - contents.componentArn = __expectString(data.componentArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + componentArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5390,10 +5159,9 @@ const de_PutComponentPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5413,12 +5181,11 @@ export const de_PutContainerRecipePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.containerRecipeArn != null) { - contents.containerRecipeArn = __expectString(data.containerRecipeArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + containerRecipeArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5461,10 +5228,9 @@ const de_PutContainerRecipePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5484,12 +5250,11 @@ export const de_PutImagePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageArn != null) { - contents.imageArn = __expectString(data.imageArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5532,10 +5297,9 @@ const de_PutImagePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5555,12 +5319,11 @@ export const de_PutImageRecipePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.imageRecipeArn != null) { - contents.imageRecipeArn = __expectString(data.imageRecipeArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + imageRecipeArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5603,10 +5366,9 @@ const de_PutImageRecipePolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5626,15 +5388,12 @@ export const de_StartImagePipelineExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imageBuildVersionArn != null) { - contents.imageBuildVersionArn = __expectString(data.imageBuildVersionArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imageBuildVersionArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5680,10 +5439,9 @@ const de_StartImagePipelineExecutionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5730,10 +5488,9 @@ const de_TagResourceCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5780,10 +5537,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5803,15 +5559,12 @@ export const de_UpdateDistributionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.distributionConfigurationArn != null) { - contents.distributionConfigurationArn = __expectString(data.distributionConfigurationArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + distributionConfigurationArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5857,10 +5610,9 @@ const de_UpdateDistributionConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5880,15 +5632,12 @@ export const de_UpdateImagePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.imagePipelineArn != null) { - contents.imagePipelineArn = __expectString(data.imagePipelineArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + imagePipelineArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5931,10 +5680,9 @@ const de_UpdateImagePipelineCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5954,15 +5702,12 @@ export const de_UpdateInfrastructureConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.infrastructureConfigurationArn != null) { - contents.infrastructureConfigurationArn = __expectString(data.infrastructureConfigurationArn); - } - if (data.requestId != null) { - contents.requestId = __expectString(data.requestId); - } + const doc = take(data, { + clientToken: __expectString, + infrastructureConfigurationArn: __expectString, + requestId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6005,16 +5750,15 @@ const de_UpdateInfrastructureConfigurationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1CallRateLimitExceededExceptionRes */ @@ -6024,9 +5768,10 @@ const de_CallRateLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new CallRateLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6040,9 +5785,10 @@ const de_CallRateLimitExceededExceptionRes = async ( const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6056,9 +5802,10 @@ const de_ClientExceptionRes = async (parsedOutput: any, context: __SerdeContext) const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6075,9 +5822,10 @@ const de_IdempotentParameterMismatchExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6094,9 +5842,10 @@ const de_InvalidPaginationTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidPaginationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6113,9 +5862,10 @@ const de_InvalidParameterCombinationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6132,9 +5882,10 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6151,9 +5902,10 @@ const de_InvalidParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6170,9 +5922,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6189,9 +5942,10 @@ const de_InvalidVersionNumberExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidVersionNumberException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6208,9 +5962,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6227,9 +5982,10 @@ const de_ResourceDependencyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceDependencyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6246,9 +6002,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6265,9 +6022,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6281,9 +6039,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6300,9 +6059,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6319,9 +6079,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6329,1460 +6090,260 @@ const de_ServiceUnavailableExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountList - */ -const se_AccountList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountList omitted. -/** - * serializeAws_restJson1AdditionalInstanceConfiguration - */ -const se_AdditionalInstanceConfiguration = (input: AdditionalInstanceConfiguration, context: __SerdeContext): any => { - return { - ...(input.systemsManagerAgent != null && { - systemsManagerAgent: se_SystemsManagerAgent(input.systemsManagerAgent, context), - }), - ...(input.userDataOverride != null && { userDataOverride: input.userDataOverride }), - }; -}; +// se_AdditionalInstanceConfiguration omitted. -/** - * serializeAws_restJson1AmiDistributionConfiguration - */ -const se_AmiDistributionConfiguration = (input: AmiDistributionConfiguration, context: __SerdeContext): any => { - return { - ...(input.amiTags != null && { amiTags: se_TagMap(input.amiTags, context) }), - ...(input.description != null && { description: input.description }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.launchPermission != null && { - launchPermission: se_LaunchPermissionConfiguration(input.launchPermission, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.targetAccountIds != null && { targetAccountIds: se_AccountList(input.targetAccountIds, context) }), - }; -}; +// se_AmiDistributionConfiguration omitted. -/** - * serializeAws_restJson1ComponentConfiguration - */ -const se_ComponentConfiguration = (input: ComponentConfiguration, context: __SerdeContext): any => { - return { - ...(input.componentArn != null && { componentArn: input.componentArn }), - ...(input.parameters != null && { parameters: se_ComponentParameterList(input.parameters, context) }), - }; -}; +// se_ComponentConfiguration omitted. -/** - * serializeAws_restJson1ComponentConfigurationList - */ -const se_ComponentConfigurationList = (input: ComponentConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentConfiguration(entry, context); - }); -}; +// se_ComponentConfigurationList omitted. -/** - * serializeAws_restJson1ComponentParameter - */ -const se_ComponentParameter = (input: ComponentParameter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_ComponentParameterValueList(input.value, context) }), - }; -}; +// se_ComponentParameter omitted. -/** - * serializeAws_restJson1ComponentParameterList - */ -const se_ComponentParameterList = (input: ComponentParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComponentParameter(entry, context); - }); -}; +// se_ComponentParameterList omitted. -/** - * serializeAws_restJson1ComponentParameterValueList - */ -const se_ComponentParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComponentParameterValueList omitted. -/** - * serializeAws_restJson1ContainerDistributionConfiguration - */ -const se_ContainerDistributionConfiguration = ( - input: ContainerDistributionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.containerTags != null && { containerTags: se_StringList(input.containerTags, context) }), - ...(input.description != null && { description: input.description }), - ...(input.targetRepository != null && { - targetRepository: se_TargetContainerRepository(input.targetRepository, context), - }), - }; -}; +// se_ContainerDistributionConfiguration omitted. -/** - * serializeAws_restJson1Distribution - */ -const se_Distribution = (input: Distribution, context: __SerdeContext): any => { - return { - ...(input.amiDistributionConfiguration != null && { - amiDistributionConfiguration: se_AmiDistributionConfiguration(input.amiDistributionConfiguration, context), - }), - ...(input.containerDistributionConfiguration != null && { - containerDistributionConfiguration: se_ContainerDistributionConfiguration( - input.containerDistributionConfiguration, - context - ), - }), - ...(input.fastLaunchConfigurations != null && { - fastLaunchConfigurations: se_FastLaunchConfigurationList(input.fastLaunchConfigurations, context), - }), - ...(input.launchTemplateConfigurations != null && { - launchTemplateConfigurations: se_LaunchTemplateConfigurationList(input.launchTemplateConfigurations, context), - }), - ...(input.licenseConfigurationArns != null && { - licenseConfigurationArns: se_LicenseConfigurationArnList(input.licenseConfigurationArns, context), - }), - ...(input.region != null && { region: input.region }), - ...(input.s3ExportConfiguration != null && { - s3ExportConfiguration: se_S3ExportConfiguration(input.s3ExportConfiguration, context), - }), - }; -}; +// se_Distribution omitted. -/** - * serializeAws_restJson1DistributionList - */ -const se_DistributionList = (input: Distribution[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Distribution(entry, context); - }); -}; +// se_DistributionList omitted. -/** - * serializeAws_restJson1EbsInstanceBlockDeviceSpecification - */ -const se_EbsInstanceBlockDeviceSpecification = ( - input: EbsInstanceBlockDeviceSpecification, - context: __SerdeContext -): any => { - return { - ...(input.deleteOnTermination != null && { deleteOnTermination: input.deleteOnTermination }), - ...(input.encrypted != null && { encrypted: input.encrypted }), - ...(input.iops != null && { iops: input.iops }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.snapshotId != null && { snapshotId: input.snapshotId }), - ...(input.throughput != null && { throughput: input.throughput }), - ...(input.volumeSize != null && { volumeSize: input.volumeSize }), - ...(input.volumeType != null && { volumeType: input.volumeType }), - }; -}; +// se_EbsInstanceBlockDeviceSpecification omitted. -/** - * serializeAws_restJson1EcrConfiguration - */ -const se_EcrConfiguration = (input: EcrConfiguration, context: __SerdeContext): any => { - return { - ...(input.containerTags != null && { containerTags: se_StringList(input.containerTags, context) }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - }; -}; +// se_EcrConfiguration omitted. -/** - * serializeAws_restJson1FastLaunchConfiguration - */ -const se_FastLaunchConfiguration = (input: FastLaunchConfiguration, context: __SerdeContext): any => { - return { - ...(input.accountId != null && { accountId: input.accountId }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.launchTemplate != null && { - launchTemplate: se_FastLaunchLaunchTemplateSpecification(input.launchTemplate, context), - }), - ...(input.maxParallelLaunches != null && { maxParallelLaunches: input.maxParallelLaunches }), - ...(input.snapshotConfiguration != null && { - snapshotConfiguration: se_FastLaunchSnapshotConfiguration(input.snapshotConfiguration, context), - }), - }; -}; +// se_FastLaunchConfiguration omitted. -/** - * serializeAws_restJson1FastLaunchConfigurationList - */ -const se_FastLaunchConfigurationList = (input: FastLaunchConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FastLaunchConfiguration(entry, context); - }); -}; +// se_FastLaunchConfigurationList omitted. -/** - * serializeAws_restJson1FastLaunchLaunchTemplateSpecification - */ -const se_FastLaunchLaunchTemplateSpecification = ( - input: FastLaunchLaunchTemplateSpecification, - context: __SerdeContext -): any => { - return { - ...(input.launchTemplateId != null && { launchTemplateId: input.launchTemplateId }), - ...(input.launchTemplateName != null && { launchTemplateName: input.launchTemplateName }), - ...(input.launchTemplateVersion != null && { launchTemplateVersion: input.launchTemplateVersion }), - }; -}; +// se_FastLaunchLaunchTemplateSpecification omitted. -/** - * serializeAws_restJson1FastLaunchSnapshotConfiguration - */ -const se_FastLaunchSnapshotConfiguration = (input: FastLaunchSnapshotConfiguration, context: __SerdeContext): any => { - return { - ...(input.targetResourceCount != null && { targetResourceCount: input.targetResourceCount }), - }; -}; +// se_FastLaunchSnapshotConfiguration omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_restJson1ImageScanFindingsFilter - */ -const se_ImageScanFindingsFilter = (input: ImageScanFindingsFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_ImageScanFindingsFilterValues(input.values, context) }), - }; -}; +// se_ImageScanFindingsFilter omitted. -/** - * serializeAws_restJson1ImageScanFindingsFilterList - */ -const se_ImageScanFindingsFilterList = (input: ImageScanFindingsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ImageScanFindingsFilter(entry, context); - }); -}; +// se_ImageScanFindingsFilterList omitted. -/** - * serializeAws_restJson1ImageScanFindingsFilterValues - */ -const se_ImageScanFindingsFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ImageScanFindingsFilterValues omitted. -/** - * serializeAws_restJson1ImageScanningConfiguration - */ -const se_ImageScanningConfiguration = (input: ImageScanningConfiguration, context: __SerdeContext): any => { - return { - ...(input.ecrConfiguration != null && { ecrConfiguration: se_EcrConfiguration(input.ecrConfiguration, context) }), - ...(input.imageScanningEnabled != null && { imageScanningEnabled: input.imageScanningEnabled }), - }; -}; +// se_ImageScanningConfiguration omitted. -/** - * serializeAws_restJson1ImageTestsConfiguration - */ -const se_ImageTestsConfiguration = (input: ImageTestsConfiguration, context: __SerdeContext): any => { - return { - ...(input.imageTestsEnabled != null && { imageTestsEnabled: input.imageTestsEnabled }), - ...(input.timeoutMinutes != null && { timeoutMinutes: input.timeoutMinutes }), - }; -}; +// se_ImageTestsConfiguration omitted. -/** - * serializeAws_restJson1InstanceBlockDeviceMapping - */ -const se_InstanceBlockDeviceMapping = (input: InstanceBlockDeviceMapping, context: __SerdeContext): any => { - return { - ...(input.deviceName != null && { deviceName: input.deviceName }), - ...(input.ebs != null && { ebs: se_EbsInstanceBlockDeviceSpecification(input.ebs, context) }), - ...(input.noDevice != null && { noDevice: input.noDevice }), - ...(input.virtualName != null && { virtualName: input.virtualName }), - }; -}; +// se_InstanceBlockDeviceMapping omitted. -/** - * serializeAws_restJson1InstanceBlockDeviceMappings - */ -const se_InstanceBlockDeviceMappings = (input: InstanceBlockDeviceMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceBlockDeviceMapping(entry, context); - }); -}; +// se_InstanceBlockDeviceMappings omitted. -/** - * serializeAws_restJson1InstanceConfiguration - */ -const se_InstanceConfiguration = (input: InstanceConfiguration, context: __SerdeContext): any => { - return { - ...(input.blockDeviceMappings != null && { - blockDeviceMappings: se_InstanceBlockDeviceMappings(input.blockDeviceMappings, context), - }), - ...(input.image != null && { image: input.image }), - }; -}; +// se_InstanceConfiguration omitted. -/** - * serializeAws_restJson1InstanceMetadataOptions - */ -const se_InstanceMetadataOptions = (input: InstanceMetadataOptions, context: __SerdeContext): any => { - return { - ...(input.httpPutResponseHopLimit != null && { httpPutResponseHopLimit: input.httpPutResponseHopLimit }), - ...(input.httpTokens != null && { httpTokens: input.httpTokens }), - }; -}; +// se_InstanceMetadataOptions omitted. -/** - * serializeAws_restJson1InstanceTypeList - */ -const se_InstanceTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceTypeList omitted. -/** - * serializeAws_restJson1LaunchPermissionConfiguration - */ -const se_LaunchPermissionConfiguration = (input: LaunchPermissionConfiguration, context: __SerdeContext): any => { - return { - ...(input.organizationArns != null && { - organizationArns: se_OrganizationArnList(input.organizationArns, context), - }), - ...(input.organizationalUnitArns != null && { - organizationalUnitArns: se_OrganizationalUnitArnList(input.organizationalUnitArns, context), - }), - ...(input.userGroups != null && { userGroups: se_StringList(input.userGroups, context) }), - ...(input.userIds != null && { userIds: se_AccountList(input.userIds, context) }), - }; -}; +// se_LaunchPermissionConfiguration omitted. -/** - * serializeAws_restJson1LaunchTemplateConfiguration - */ -const se_LaunchTemplateConfiguration = (input: LaunchTemplateConfiguration, context: __SerdeContext): any => { - return { - ...(input.accountId != null && { accountId: input.accountId }), - ...(input.launchTemplateId != null && { launchTemplateId: input.launchTemplateId }), - ...(input.setDefaultVersion != null && { setDefaultVersion: input.setDefaultVersion }), - }; -}; +// se_LaunchTemplateConfiguration omitted. -/** - * serializeAws_restJson1LaunchTemplateConfigurationList - */ -const se_LaunchTemplateConfigurationList = (input: LaunchTemplateConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LaunchTemplateConfiguration(entry, context); - }); -}; +// se_LaunchTemplateConfigurationList omitted. -/** - * serializeAws_restJson1LicenseConfigurationArnList - */ -const se_LicenseConfigurationArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LicenseConfigurationArnList omitted. -/** - * serializeAws_restJson1Logging - */ -const se_Logging = (input: Logging, context: __SerdeContext): any => { - return { - ...(input.s3Logs != null && { s3Logs: se_S3Logs(input.s3Logs, context) }), - }; -}; +// se_Logging omitted. -/** - * serializeAws_restJson1OrganizationalUnitArnList - */ -const se_OrganizationalUnitArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OrganizationalUnitArnList omitted. -/** - * serializeAws_restJson1OrganizationArnList - */ -const se_OrganizationArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OrganizationArnList omitted. -/** - * serializeAws_restJson1OsVersionList - */ -const se_OsVersionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OsVersionList omitted. -/** - * serializeAws_restJson1ResourceTagMap - */ -const se_ResourceTagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ResourceTagMap omitted. -/** - * serializeAws_restJson1S3ExportConfiguration - */ -const se_S3ExportConfiguration = (input: S3ExportConfiguration, context: __SerdeContext): any => { - return { - ...(input.diskImageFormat != null && { diskImageFormat: input.diskImageFormat }), - ...(input.roleName != null && { roleName: input.roleName }), - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3Prefix != null && { s3Prefix: input.s3Prefix }), - }; -}; +// se_S3ExportConfiguration omitted. + +// se_S3Logs omitted. + +// se_Schedule omitted. + +// se_SecurityGroupIds omitted. + +// se_StringList omitted. + +// se_SystemsManagerAgent omitted. + +// se_TagMap omitted. + +// se_TargetContainerRepository omitted. + +// de_AccountAggregation omitted. + +// de_AccountList omitted. + +// de_AdditionalInstanceConfiguration omitted. + +// de_Ami omitted. + +// de_AmiDistributionConfiguration omitted. + +// de_AmiList omitted. + +// de_Component omitted. + +// de_ComponentConfiguration omitted. + +// de_ComponentConfigurationList omitted. + +// de_ComponentParameter omitted. + +// de_ComponentParameterDetail omitted. + +// de_ComponentParameterDetailList omitted. + +// de_ComponentParameterList omitted. + +// de_ComponentParameterValueList omitted. + +// de_ComponentState omitted. + +// de_ComponentSummary omitted. + +// de_ComponentSummaryList omitted. + +// de_ComponentVersion omitted. + +// de_ComponentVersionList omitted. + +// de_Container omitted. + +// de_ContainerDistributionConfiguration omitted. + +// de_ContainerList omitted. + +// de_ContainerRecipe omitted. + +// de_ContainerRecipeSummary omitted. + +// de_ContainerRecipeSummaryList omitted. /** - * serializeAws_restJson1S3Logs + * deserializeAws_restJson1CvssScore */ -const se_S3Logs = (input: S3Logs, context: __SerdeContext): any => { - return { - ...(input.s3BucketName != null && { s3BucketName: input.s3BucketName }), - ...(input.s3KeyPrefix != null && { s3KeyPrefix: input.s3KeyPrefix }), - }; +const de_CvssScore = (output: any, context: __SerdeContext): CvssScore => { + return take(output, { + baseScore: __limitedParseDouble, + scoringVector: __expectString, + source: __expectString, + version: __expectString, + }) as any; }; +// de_CvssScoreAdjustment omitted. + +// de_CvssScoreAdjustmentList omitted. + /** - * serializeAws_restJson1Schedule + * deserializeAws_restJson1CvssScoreDetails */ -const se_Schedule = (input: Schedule, context: __SerdeContext): any => { - return { - ...(input.pipelineExecutionStartCondition != null && { - pipelineExecutionStartCondition: input.pipelineExecutionStartCondition, - }), - ...(input.scheduleExpression != null && { scheduleExpression: input.scheduleExpression }), - ...(input.timezone != null && { timezone: input.timezone }), - }; +const de_CvssScoreDetails = (output: any, context: __SerdeContext): CvssScoreDetails => { + return take(output, { + adjustments: _json, + cvssSource: __expectString, + score: __limitedParseDouble, + scoreSource: __expectString, + scoringVector: __expectString, + version: __expectString, + }) as any; }; /** - * serializeAws_restJson1SecurityGroupIds + * deserializeAws_restJson1CvssScoreList */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input +const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_CvssScore(entry, context); }); + return retVal; }; -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SystemsManagerAgent - */ -const se_SystemsManagerAgent = (input: SystemsManagerAgent, context: __SerdeContext): any => { - return { - ...(input.uninstallAfterBuild != null && { uninstallAfterBuild: input.uninstallAfterBuild }), - }; -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TargetContainerRepository - */ -const se_TargetContainerRepository = (input: TargetContainerRepository, context: __SerdeContext): any => { - return { - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.service != null && { service: input.service }), - }; -}; - -/** - * deserializeAws_restJson1AccountAggregation - */ -const de_AccountAggregation = (output: any, context: __SerdeContext): AccountAggregation => { - return { - accountId: __expectString(output.accountId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AccountList - */ -const de_AccountList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdditionalInstanceConfiguration - */ -const de_AdditionalInstanceConfiguration = (output: any, context: __SerdeContext): AdditionalInstanceConfiguration => { - return { - systemsManagerAgent: - output.systemsManagerAgent != null ? de_SystemsManagerAgent(output.systemsManagerAgent, context) : undefined, - userDataOverride: __expectString(output.userDataOverride), - } as any; -}; - -/** - * deserializeAws_restJson1Ami - */ -const de_Ami = (output: any, context: __SerdeContext): Ami => { - return { - accountId: __expectString(output.accountId), - description: __expectString(output.description), - image: __expectString(output.image), - name: __expectString(output.name), - region: __expectString(output.region), - state: output.state != null ? de_ImageState(output.state, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AmiDistributionConfiguration - */ -const de_AmiDistributionConfiguration = (output: any, context: __SerdeContext): AmiDistributionConfiguration => { - return { - amiTags: output.amiTags != null ? de_TagMap(output.amiTags, context) : undefined, - description: __expectString(output.description), - kmsKeyId: __expectString(output.kmsKeyId), - launchPermission: - output.launchPermission != null ? de_LaunchPermissionConfiguration(output.launchPermission, context) : undefined, - name: __expectString(output.name), - targetAccountIds: output.targetAccountIds != null ? de_AccountList(output.targetAccountIds, context) : undefined, - } as any; -}; +// de_Distribution omitted. -/** - * deserializeAws_restJson1AmiList - */ -const de_AmiList = (output: any, context: __SerdeContext): Ami[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ami(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Component - */ -const de_Component = (output: any, context: __SerdeContext): Component => { - return { - arn: __expectString(output.arn), - changeDescription: __expectString(output.changeDescription), - data: __expectString(output.data), - dateCreated: __expectString(output.dateCreated), - description: __expectString(output.description), - encrypted: __expectBoolean(output.encrypted), - kmsKeyId: __expectString(output.kmsKeyId), - name: __expectString(output.name), - obfuscate: __expectBoolean(output.obfuscate), - owner: __expectString(output.owner), - parameters: output.parameters != null ? de_ComponentParameterDetailList(output.parameters, context) : undefined, - platform: __expectString(output.platform), - publisher: __expectString(output.publisher), - state: output.state != null ? de_ComponentState(output.state, context) : undefined, - supportedOsVersions: - output.supportedOsVersions != null ? de_OsVersionList(output.supportedOsVersions, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1ComponentConfiguration - */ -const de_ComponentConfiguration = (output: any, context: __SerdeContext): ComponentConfiguration => { - return { - componentArn: __expectString(output.componentArn), - parameters: output.parameters != null ? de_ComponentParameterList(output.parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ComponentConfigurationList - */ -const de_ComponentConfigurationList = (output: any, context: __SerdeContext): ComponentConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentConfiguration(entry, context); - }); - return retVal; -}; +// de_DistributionConfiguration omitted. -/** - * deserializeAws_restJson1ComponentParameter - */ -const de_ComponentParameter = (output: any, context: __SerdeContext): ComponentParameter => { - return { - name: __expectString(output.name), - value: output.value != null ? de_ComponentParameterValueList(output.value, context) : undefined, - } as any; -}; +// de_DistributionConfigurationSummary omitted. -/** - * deserializeAws_restJson1ComponentParameterDetail - */ -const de_ComponentParameterDetail = (output: any, context: __SerdeContext): ComponentParameterDetail => { - return { - defaultValue: - output.defaultValue != null ? de_ComponentParameterValueList(output.defaultValue, context) : undefined, - description: __expectString(output.description), - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_DistributionConfigurationSummaryList omitted. -/** - * deserializeAws_restJson1ComponentParameterDetailList - */ -const de_ComponentParameterDetailList = (output: any, context: __SerdeContext): ComponentParameterDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentParameterDetail(entry, context); - }); - return retVal; -}; +// de_DistributionList omitted. -/** - * deserializeAws_restJson1ComponentParameterList - */ -const de_ComponentParameterList = (output: any, context: __SerdeContext): ComponentParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentParameter(entry, context); - }); - return retVal; -}; +// de_EbsInstanceBlockDeviceSpecification omitted. -/** - * deserializeAws_restJson1ComponentParameterValueList - */ -const de_ComponentParameterValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EcrConfiguration omitted. -/** - * deserializeAws_restJson1ComponentState - */ -const de_ComponentState = (output: any, context: __SerdeContext): ComponentState => { - return { - reason: __expectString(output.reason), - status: __expectString(output.status), - } as any; -}; +// de_FastLaunchConfiguration omitted. -/** - * deserializeAws_restJson1ComponentSummary - */ -const de_ComponentSummary = (output: any, context: __SerdeContext): ComponentSummary => { - return { - arn: __expectString(output.arn), - changeDescription: __expectString(output.changeDescription), - dateCreated: __expectString(output.dateCreated), - description: __expectString(output.description), - name: __expectString(output.name), - obfuscate: __expectBoolean(output.obfuscate), - owner: __expectString(output.owner), - platform: __expectString(output.platform), - publisher: __expectString(output.publisher), - state: output.state != null ? de_ComponentState(output.state, context) : undefined, - supportedOsVersions: - output.supportedOsVersions != null ? de_OsVersionList(output.supportedOsVersions, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; +// de_FastLaunchConfigurationList omitted. -/** - * deserializeAws_restJson1ComponentSummaryList - */ -const de_ComponentSummaryList = (output: any, context: __SerdeContext): ComponentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentSummary(entry, context); - }); - return retVal; -}; +// de_FastLaunchLaunchTemplateSpecification omitted. -/** - * deserializeAws_restJson1ComponentVersion - */ -const de_ComponentVersion = (output: any, context: __SerdeContext): ComponentVersion => { - return { - arn: __expectString(output.arn), - dateCreated: __expectString(output.dateCreated), - description: __expectString(output.description), - name: __expectString(output.name), - owner: __expectString(output.owner), - platform: __expectString(output.platform), - supportedOsVersions: - output.supportedOsVersions != null ? de_OsVersionList(output.supportedOsVersions, context) : undefined, - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; +// de_FastLaunchSnapshotConfiguration omitted. -/** - * deserializeAws_restJson1ComponentVersionList - */ -const de_ComponentVersionList = (output: any, context: __SerdeContext): ComponentVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentVersion(entry, context); - }); - return retVal; -}; +// de_Image omitted. -/** - * deserializeAws_restJson1Container - */ -const de_Container = (output: any, context: __SerdeContext): Container => { - return { - imageUris: output.imageUris != null ? de_StringList(output.imageUris, context) : undefined, - region: __expectString(output.region), - } as any; -}; +// de_ImageAggregation omitted. -/** - * deserializeAws_restJson1ContainerDistributionConfiguration - */ -const de_ContainerDistributionConfiguration = ( - output: any, - context: __SerdeContext -): ContainerDistributionConfiguration => { - return { - containerTags: output.containerTags != null ? de_StringList(output.containerTags, context) : undefined, - description: __expectString(output.description), - targetRepository: - output.targetRepository != null ? de_TargetContainerRepository(output.targetRepository, context) : undefined, - } as any; -}; +// de_ImagePackage omitted. -/** - * deserializeAws_restJson1ContainerList - */ -const de_ContainerList = (output: any, context: __SerdeContext): Container[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Container(entry, context); - }); - return retVal; -}; +// de_ImagePackageList omitted. -/** - * deserializeAws_restJson1ContainerRecipe - */ -const de_ContainerRecipe = (output: any, context: __SerdeContext): ContainerRecipe => { - return { - arn: __expectString(output.arn), - components: output.components != null ? de_ComponentConfigurationList(output.components, context) : undefined, - containerType: __expectString(output.containerType), - dateCreated: __expectString(output.dateCreated), - description: __expectString(output.description), - dockerfileTemplateData: __expectString(output.dockerfileTemplateData), - encrypted: __expectBoolean(output.encrypted), - instanceConfiguration: - output.instanceConfiguration != null - ? de_InstanceConfiguration(output.instanceConfiguration, context) - : undefined, - kmsKeyId: __expectString(output.kmsKeyId), - name: __expectString(output.name), - owner: __expectString(output.owner), - parentImage: __expectString(output.parentImage), - platform: __expectString(output.platform), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - targetRepository: - output.targetRepository != null ? de_TargetContainerRepository(output.targetRepository, context) : undefined, - version: __expectString(output.version), - workingDirectory: __expectString(output.workingDirectory), - } as any; -}; - -/** - * deserializeAws_restJson1ContainerRecipeSummary - */ -const de_ContainerRecipeSummary = (output: any, context: __SerdeContext): ContainerRecipeSummary => { - return { - arn: __expectString(output.arn), - containerType: __expectString(output.containerType), - dateCreated: __expectString(output.dateCreated), - name: __expectString(output.name), - owner: __expectString(output.owner), - parentImage: __expectString(output.parentImage), - platform: __expectString(output.platform), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ContainerRecipeSummaryList - */ -const de_ContainerRecipeSummaryList = (output: any, context: __SerdeContext): ContainerRecipeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerRecipeSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CvssScore - */ -const de_CvssScore = (output: any, context: __SerdeContext): CvssScore => { - return { - baseScore: __limitedParseDouble(output.baseScore), - scoringVector: __expectString(output.scoringVector), - source: __expectString(output.source), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1CvssScoreAdjustment - */ -const de_CvssScoreAdjustment = (output: any, context: __SerdeContext): CvssScoreAdjustment => { - return { - metric: __expectString(output.metric), - reason: __expectString(output.reason), - } as any; -}; - -/** - * deserializeAws_restJson1CvssScoreAdjustmentList - */ -const de_CvssScoreAdjustmentList = (output: any, context: __SerdeContext): CvssScoreAdjustment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CvssScoreAdjustment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CvssScoreDetails - */ -const de_CvssScoreDetails = (output: any, context: __SerdeContext): CvssScoreDetails => { - return { - adjustments: output.adjustments != null ? de_CvssScoreAdjustmentList(output.adjustments, context) : undefined, - cvssSource: __expectString(output.cvssSource), - score: __limitedParseDouble(output.score), - scoreSource: __expectString(output.scoreSource), - scoringVector: __expectString(output.scoringVector), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1CvssScoreList - */ -const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CvssScore(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Distribution - */ -const de_Distribution = (output: any, context: __SerdeContext): Distribution => { - return { - amiDistributionConfiguration: - output.amiDistributionConfiguration != null - ? de_AmiDistributionConfiguration(output.amiDistributionConfiguration, context) - : undefined, - containerDistributionConfiguration: - output.containerDistributionConfiguration != null - ? de_ContainerDistributionConfiguration(output.containerDistributionConfiguration, context) - : undefined, - fastLaunchConfigurations: - output.fastLaunchConfigurations != null - ? de_FastLaunchConfigurationList(output.fastLaunchConfigurations, context) - : undefined, - launchTemplateConfigurations: - output.launchTemplateConfigurations != null - ? de_LaunchTemplateConfigurationList(output.launchTemplateConfigurations, context) - : undefined, - licenseConfigurationArns: - output.licenseConfigurationArns != null - ? de_LicenseConfigurationArnList(output.licenseConfigurationArns, context) - : undefined, - region: __expectString(output.region), - s3ExportConfiguration: - output.s3ExportConfiguration != null - ? de_S3ExportConfiguration(output.s3ExportConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DistributionConfiguration - */ -const de_DistributionConfiguration = (output: any, context: __SerdeContext): DistributionConfiguration => { - return { - arn: __expectString(output.arn), - dateCreated: __expectString(output.dateCreated), - dateUpdated: __expectString(output.dateUpdated), - description: __expectString(output.description), - distributions: output.distributions != null ? de_DistributionList(output.distributions, context) : undefined, - name: __expectString(output.name), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - timeoutMinutes: __expectInt32(output.timeoutMinutes), - } as any; -}; - -/** - * deserializeAws_restJson1DistributionConfigurationSummary - */ -const de_DistributionConfigurationSummary = ( - output: any, - context: __SerdeContext -): DistributionConfigurationSummary => { - return { - arn: __expectString(output.arn), - dateCreated: __expectString(output.dateCreated), - dateUpdated: __expectString(output.dateUpdated), - description: __expectString(output.description), - name: __expectString(output.name), - regions: output.regions != null ? de_RegionList(output.regions, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DistributionConfigurationSummaryList - */ -const de_DistributionConfigurationSummaryList = ( - output: any, - context: __SerdeContext -): DistributionConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DistributionConfigurationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DistributionList - */ -const de_DistributionList = (output: any, context: __SerdeContext): Distribution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Distribution(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EbsInstanceBlockDeviceSpecification - */ -const de_EbsInstanceBlockDeviceSpecification = ( - output: any, - context: __SerdeContext -): EbsInstanceBlockDeviceSpecification => { - return { - deleteOnTermination: __expectBoolean(output.deleteOnTermination), - encrypted: __expectBoolean(output.encrypted), - iops: __expectInt32(output.iops), - kmsKeyId: __expectString(output.kmsKeyId), - snapshotId: __expectString(output.snapshotId), - throughput: __expectInt32(output.throughput), - volumeSize: __expectInt32(output.volumeSize), - volumeType: __expectString(output.volumeType), - } as any; -}; - -/** - * deserializeAws_restJson1EcrConfiguration - */ -const de_EcrConfiguration = (output: any, context: __SerdeContext): EcrConfiguration => { - return { - containerTags: output.containerTags != null ? de_StringList(output.containerTags, context) : undefined, - repositoryName: __expectString(output.repositoryName), - } as any; -}; - -/** - * deserializeAws_restJson1FastLaunchConfiguration - */ -const de_FastLaunchConfiguration = (output: any, context: __SerdeContext): FastLaunchConfiguration => { - return { - accountId: __expectString(output.accountId), - enabled: __expectBoolean(output.enabled), - launchTemplate: - output.launchTemplate != null - ? de_FastLaunchLaunchTemplateSpecification(output.launchTemplate, context) - : undefined, - maxParallelLaunches: __expectInt32(output.maxParallelLaunches), - snapshotConfiguration: - output.snapshotConfiguration != null - ? de_FastLaunchSnapshotConfiguration(output.snapshotConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FastLaunchConfigurationList - */ -const de_FastLaunchConfigurationList = (output: any, context: __SerdeContext): FastLaunchConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FastLaunchConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FastLaunchLaunchTemplateSpecification - */ -const de_FastLaunchLaunchTemplateSpecification = ( - output: any, - context: __SerdeContext -): FastLaunchLaunchTemplateSpecification => { - return { - launchTemplateId: __expectString(output.launchTemplateId), - launchTemplateName: __expectString(output.launchTemplateName), - launchTemplateVersion: __expectString(output.launchTemplateVersion), - } as any; -}; - -/** - * deserializeAws_restJson1FastLaunchSnapshotConfiguration - */ -const de_FastLaunchSnapshotConfiguration = (output: any, context: __SerdeContext): FastLaunchSnapshotConfiguration => { - return { - targetResourceCount: __expectInt32(output.targetResourceCount), - } as any; -}; - -/** - * deserializeAws_restJson1Image - */ -const de_Image = (output: any, context: __SerdeContext): Image => { - return { - arn: __expectString(output.arn), - buildType: __expectString(output.buildType), - containerRecipe: output.containerRecipe != null ? de_ContainerRecipe(output.containerRecipe, context) : undefined, - dateCreated: __expectString(output.dateCreated), - distributionConfiguration: - output.distributionConfiguration != null - ? de_DistributionConfiguration(output.distributionConfiguration, context) - : undefined, - enhancedImageMetadataEnabled: __expectBoolean(output.enhancedImageMetadataEnabled), - imageRecipe: output.imageRecipe != null ? de_ImageRecipe(output.imageRecipe, context) : undefined, - imageScanningConfiguration: - output.imageScanningConfiguration != null - ? de_ImageScanningConfiguration(output.imageScanningConfiguration, context) - : undefined, - imageSource: __expectString(output.imageSource), - imageTestsConfiguration: - output.imageTestsConfiguration != null - ? de_ImageTestsConfiguration(output.imageTestsConfiguration, context) - : undefined, - infrastructureConfiguration: - output.infrastructureConfiguration != null - ? de_InfrastructureConfiguration(output.infrastructureConfiguration, context) - : undefined, - name: __expectString(output.name), - osVersion: __expectString(output.osVersion), - outputResources: output.outputResources != null ? de_OutputResources(output.outputResources, context) : undefined, - platform: __expectString(output.platform), - scanState: output.scanState != null ? de_ImageScanState(output.scanState, context) : undefined, - sourcePipelineArn: __expectString(output.sourcePipelineArn), - sourcePipelineName: __expectString(output.sourcePipelineName), - state: output.state != null ? de_ImageState(output.state, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1ImageAggregation - */ -const de_ImageAggregation = (output: any, context: __SerdeContext): ImageAggregation => { - return { - imageBuildVersionArn: __expectString(output.imageBuildVersionArn), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ImagePackage - */ -const de_ImagePackage = (output: any, context: __SerdeContext): ImagePackage => { - return { - packageName: __expectString(output.packageName), - packageVersion: __expectString(output.packageVersion), - } as any; -}; - -/** - * deserializeAws_restJson1ImagePackageList - */ -const de_ImagePackageList = (output: any, context: __SerdeContext): ImagePackage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImagePackage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ImagePipeline - */ -const de_ImagePipeline = (output: any, context: __SerdeContext): ImagePipeline => { - return { - arn: __expectString(output.arn), - containerRecipeArn: __expectString(output.containerRecipeArn), - dateCreated: __expectString(output.dateCreated), - dateLastRun: __expectString(output.dateLastRun), - dateNextRun: __expectString(output.dateNextRun), - dateUpdated: __expectString(output.dateUpdated), - description: __expectString(output.description), - distributionConfigurationArn: __expectString(output.distributionConfigurationArn), - enhancedImageMetadataEnabled: __expectBoolean(output.enhancedImageMetadataEnabled), - imageRecipeArn: __expectString(output.imageRecipeArn), - imageScanningConfiguration: - output.imageScanningConfiguration != null - ? de_ImageScanningConfiguration(output.imageScanningConfiguration, context) - : undefined, - imageTestsConfiguration: - output.imageTestsConfiguration != null - ? de_ImageTestsConfiguration(output.imageTestsConfiguration, context) - : undefined, - infrastructureConfigurationArn: __expectString(output.infrastructureConfigurationArn), - name: __expectString(output.name), - platform: __expectString(output.platform), - schedule: output.schedule != null ? de_Schedule(output.schedule, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ImagePipelineAggregation - */ -const de_ImagePipelineAggregation = (output: any, context: __SerdeContext): ImagePipelineAggregation => { - return { - imagePipelineArn: __expectString(output.imagePipelineArn), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ImagePipelineList - */ -const de_ImagePipelineList = (output: any, context: __SerdeContext): ImagePipeline[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImagePipeline(entry, context); - }); - return retVal; -}; +// de_ImagePipeline omitted. -/** - * deserializeAws_restJson1ImageRecipe - */ -const de_ImageRecipe = (output: any, context: __SerdeContext): ImageRecipe => { - return { - additionalInstanceConfiguration: - output.additionalInstanceConfiguration != null - ? de_AdditionalInstanceConfiguration(output.additionalInstanceConfiguration, context) - : undefined, - arn: __expectString(output.arn), - blockDeviceMappings: - output.blockDeviceMappings != null - ? de_InstanceBlockDeviceMappings(output.blockDeviceMappings, context) - : undefined, - components: output.components != null ? de_ComponentConfigurationList(output.components, context) : undefined, - dateCreated: __expectString(output.dateCreated), - description: __expectString(output.description), - name: __expectString(output.name), - owner: __expectString(output.owner), - parentImage: __expectString(output.parentImage), - platform: __expectString(output.platform), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - version: __expectString(output.version), - workingDirectory: __expectString(output.workingDirectory), - } as any; -}; +// de_ImagePipelineAggregation omitted. -/** - * deserializeAws_restJson1ImageRecipeSummary - */ -const de_ImageRecipeSummary = (output: any, context: __SerdeContext): ImageRecipeSummary => { - return { - arn: __expectString(output.arn), - dateCreated: __expectString(output.dateCreated), - name: __expectString(output.name), - owner: __expectString(output.owner), - parentImage: __expectString(output.parentImage), - platform: __expectString(output.platform), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_ImagePipelineList omitted. -/** - * deserializeAws_restJson1ImageRecipeSummaryList - */ -const de_ImageRecipeSummaryList = (output: any, context: __SerdeContext): ImageRecipeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageRecipeSummary(entry, context); - }); - return retVal; -}; +// de_ImageRecipe omitted. + +// de_ImageRecipeSummary omitted. + +// de_ImageRecipeSummaryList omitted. /** * deserializeAws_restJson1ImageScanFinding */ const de_ImageScanFinding = (output: any, context: __SerdeContext): ImageScanFinding => { - return { - awsAccountId: __expectString(output.awsAccountId), - description: __expectString(output.description), - firstObservedAt: - output.firstObservedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.firstObservedAt))) - : undefined, - fixAvailable: __expectString(output.fixAvailable), - imageBuildVersionArn: __expectString(output.imageBuildVersionArn), - imagePipelineArn: __expectString(output.imagePipelineArn), - inspectorScore: __limitedParseDouble(output.inspectorScore), - inspectorScoreDetails: - output.inspectorScoreDetails != null - ? de_InspectorScoreDetails(output.inspectorScoreDetails, context) - : undefined, - packageVulnerabilityDetails: - output.packageVulnerabilityDetails != null - ? de_PackageVulnerabilityDetails(output.packageVulnerabilityDetails, context) - : undefined, - remediation: output.remediation != null ? de_Remediation(output.remediation, context) : undefined, - severity: __expectString(output.severity), - title: __expectString(output.title), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ImageScanFindingAggregation - */ -const de_ImageScanFindingAggregation = (output: any, context: __SerdeContext): ImageScanFindingAggregation => { - return { - accountAggregation: - output.accountAggregation != null ? de_AccountAggregation(output.accountAggregation, context) : undefined, - imageAggregation: - output.imageAggregation != null ? de_ImageAggregation(output.imageAggregation, context) : undefined, - imagePipelineAggregation: - output.imagePipelineAggregation != null - ? de_ImagePipelineAggregation(output.imagePipelineAggregation, context) - : undefined, - vulnerabilityIdAggregation: - output.vulnerabilityIdAggregation != null - ? de_VulnerabilityIdAggregation(output.vulnerabilityIdAggregation, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ImageScanFindingAggregationsList - */ -const de_ImageScanFindingAggregationsList = (output: any, context: __SerdeContext): ImageScanFindingAggregation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageScanFindingAggregation(entry, context); - }); - return retVal; + return take(output, { + awsAccountId: __expectString, + description: __expectString, + firstObservedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fixAvailable: __expectString, + imageBuildVersionArn: __expectString, + imagePipelineArn: __expectString, + inspectorScore: __limitedParseDouble, + inspectorScoreDetails: (_: any) => de_InspectorScoreDetails(_, context), + packageVulnerabilityDetails: (_: any) => de_PackageVulnerabilityDetails(_, context), + remediation: _json, + severity: __expectString, + title: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ImageScanFindingAggregation omitted. + +// de_ImageScanFindingAggregationsList omitted. + /** * deserializeAws_restJson1ImageScanFindingsList */ @@ -7790,708 +6351,131 @@ const de_ImageScanFindingsList = (output: any, context: __SerdeContext): ImageSc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImageScanFinding(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ImageScanningConfiguration - */ -const de_ImageScanningConfiguration = (output: any, context: __SerdeContext): ImageScanningConfiguration => { - return { - ecrConfiguration: - output.ecrConfiguration != null ? de_EcrConfiguration(output.ecrConfiguration, context) : undefined, - imageScanningEnabled: __expectBoolean(output.imageScanningEnabled), - } as any; -}; +// de_ImageScanningConfiguration omitted. -/** - * deserializeAws_restJson1ImageScanState - */ -const de_ImageScanState = (output: any, context: __SerdeContext): ImageScanState => { - return { - reason: __expectString(output.reason), - status: __expectString(output.status), - } as any; -}; +// de_ImageScanState omitted. -/** - * deserializeAws_restJson1ImageState - */ -const de_ImageState = (output: any, context: __SerdeContext): ImageState => { - return { - reason: __expectString(output.reason), - status: __expectString(output.status), - } as any; -}; +// de_ImageState omitted. -/** - * deserializeAws_restJson1ImageSummary - */ -const de_ImageSummary = (output: any, context: __SerdeContext): ImageSummary => { - return { - arn: __expectString(output.arn), - buildType: __expectString(output.buildType), - dateCreated: __expectString(output.dateCreated), - imageSource: __expectString(output.imageSource), - name: __expectString(output.name), - osVersion: __expectString(output.osVersion), - outputResources: output.outputResources != null ? de_OutputResources(output.outputResources, context) : undefined, - owner: __expectString(output.owner), - platform: __expectString(output.platform), - state: output.state != null ? de_ImageState(output.state, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; +// de_ImageSummary omitted. -/** - * deserializeAws_restJson1ImageSummaryList - */ -const de_ImageSummaryList = (output: any, context: __SerdeContext): ImageSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageSummary(entry, context); - }); - return retVal; -}; +// de_ImageSummaryList omitted. -/** - * deserializeAws_restJson1ImageTestsConfiguration - */ -const de_ImageTestsConfiguration = (output: any, context: __SerdeContext): ImageTestsConfiguration => { - return { - imageTestsEnabled: __expectBoolean(output.imageTestsEnabled), - timeoutMinutes: __expectInt32(output.timeoutMinutes), - } as any; -}; +// de_ImageTestsConfiguration omitted. -/** - * deserializeAws_restJson1ImageVersion - */ -const de_ImageVersion = (output: any, context: __SerdeContext): ImageVersion => { - return { - arn: __expectString(output.arn), - buildType: __expectString(output.buildType), - dateCreated: __expectString(output.dateCreated), - imageSource: __expectString(output.imageSource), - name: __expectString(output.name), - osVersion: __expectString(output.osVersion), - owner: __expectString(output.owner), - platform: __expectString(output.platform), - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; +// de_ImageVersion omitted. -/** - * deserializeAws_restJson1ImageVersionList - */ -const de_ImageVersionList = (output: any, context: __SerdeContext): ImageVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageVersion(entry, context); - }); - return retVal; -}; +// de_ImageVersionList omitted. -/** - * deserializeAws_restJson1InfrastructureConfiguration - */ -const de_InfrastructureConfiguration = (output: any, context: __SerdeContext): InfrastructureConfiguration => { - return { - arn: __expectString(output.arn), - dateCreated: __expectString(output.dateCreated), - dateUpdated: __expectString(output.dateUpdated), - description: __expectString(output.description), - instanceMetadataOptions: - output.instanceMetadataOptions != null - ? de_InstanceMetadataOptions(output.instanceMetadataOptions, context) - : undefined, - instanceProfileName: __expectString(output.instanceProfileName), - instanceTypes: output.instanceTypes != null ? de_InstanceTypeList(output.instanceTypes, context) : undefined, - keyPair: __expectString(output.keyPair), - logging: output.logging != null ? de_Logging(output.logging, context) : undefined, - name: __expectString(output.name), - resourceTags: output.resourceTags != null ? de_ResourceTagMap(output.resourceTags, context) : undefined, - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - snsTopicArn: __expectString(output.snsTopicArn), - subnetId: __expectString(output.subnetId), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - terminateInstanceOnFailure: __expectBoolean(output.terminateInstanceOnFailure), - } as any; -}; +// de_InfrastructureConfiguration omitted. -/** - * deserializeAws_restJson1InfrastructureConfigurationSummary - */ -const de_InfrastructureConfigurationSummary = ( - output: any, - context: __SerdeContext -): InfrastructureConfigurationSummary => { - return { - arn: __expectString(output.arn), - dateCreated: __expectString(output.dateCreated), - dateUpdated: __expectString(output.dateUpdated), - description: __expectString(output.description), - instanceProfileName: __expectString(output.instanceProfileName), - instanceTypes: output.instanceTypes != null ? de_InstanceTypeList(output.instanceTypes, context) : undefined, - name: __expectString(output.name), - resourceTags: output.resourceTags != null ? de_ResourceTagMap(output.resourceTags, context) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_InfrastructureConfigurationSummary omitted. -/** - * deserializeAws_restJson1InfrastructureConfigurationSummaryList - */ -const de_InfrastructureConfigurationSummaryList = ( - output: any, - context: __SerdeContext -): InfrastructureConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InfrastructureConfigurationSummary(entry, context); - }); - return retVal; -}; +// de_InfrastructureConfigurationSummaryList omitted. /** * deserializeAws_restJson1InspectorScoreDetails */ const de_InspectorScoreDetails = (output: any, context: __SerdeContext): InspectorScoreDetails => { - return { - adjustedCvss: output.adjustedCvss != null ? de_CvssScoreDetails(output.adjustedCvss, context) : undefined, - } as any; + return take(output, { + adjustedCvss: (_: any) => de_CvssScoreDetails(_, context), + }) as any; }; -/** - * deserializeAws_restJson1InstanceBlockDeviceMapping - */ -const de_InstanceBlockDeviceMapping = (output: any, context: __SerdeContext): InstanceBlockDeviceMapping => { - return { - deviceName: __expectString(output.deviceName), - ebs: output.ebs != null ? de_EbsInstanceBlockDeviceSpecification(output.ebs, context) : undefined, - noDevice: __expectString(output.noDevice), - virtualName: __expectString(output.virtualName), - } as any; -}; +// de_InstanceBlockDeviceMapping omitted. -/** - * deserializeAws_restJson1InstanceBlockDeviceMappings - */ -const de_InstanceBlockDeviceMappings = (output: any, context: __SerdeContext): InstanceBlockDeviceMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceBlockDeviceMapping(entry, context); - }); - return retVal; -}; +// de_InstanceBlockDeviceMappings omitted. -/** - * deserializeAws_restJson1InstanceConfiguration - */ -const de_InstanceConfiguration = (output: any, context: __SerdeContext): InstanceConfiguration => { - return { - blockDeviceMappings: - output.blockDeviceMappings != null - ? de_InstanceBlockDeviceMappings(output.blockDeviceMappings, context) - : undefined, - image: __expectString(output.image), - } as any; -}; +// de_InstanceConfiguration omitted. -/** - * deserializeAws_restJson1InstanceMetadataOptions - */ -const de_InstanceMetadataOptions = (output: any, context: __SerdeContext): InstanceMetadataOptions => { - return { - httpPutResponseHopLimit: __expectInt32(output.httpPutResponseHopLimit), - httpTokens: __expectString(output.httpTokens), - } as any; -}; +// de_InstanceMetadataOptions omitted. -/** - * deserializeAws_restJson1InstanceTypeList - */ -const de_InstanceTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InstanceTypeList omitted. -/** - * deserializeAws_restJson1LaunchPermissionConfiguration - */ -const de_LaunchPermissionConfiguration = (output: any, context: __SerdeContext): LaunchPermissionConfiguration => { - return { - organizationArns: - output.organizationArns != null ? de_OrganizationArnList(output.organizationArns, context) : undefined, - organizationalUnitArns: - output.organizationalUnitArns != null - ? de_OrganizationalUnitArnList(output.organizationalUnitArns, context) - : undefined, - userGroups: output.userGroups != null ? de_StringList(output.userGroups, context) : undefined, - userIds: output.userIds != null ? de_AccountList(output.userIds, context) : undefined, - } as any; -}; +// de_LaunchPermissionConfiguration omitted. -/** - * deserializeAws_restJson1LaunchTemplateConfiguration - */ -const de_LaunchTemplateConfiguration = (output: any, context: __SerdeContext): LaunchTemplateConfiguration => { - return { - accountId: __expectString(output.accountId), - launchTemplateId: __expectString(output.launchTemplateId), - setDefaultVersion: __expectBoolean(output.setDefaultVersion), - } as any; -}; +// de_LaunchTemplateConfiguration omitted. -/** - * deserializeAws_restJson1LaunchTemplateConfigurationList - */ -const de_LaunchTemplateConfigurationList = (output: any, context: __SerdeContext): LaunchTemplateConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchTemplateConfiguration(entry, context); - }); - return retVal; -}; +// de_LaunchTemplateConfigurationList omitted. -/** - * deserializeAws_restJson1LicenseConfigurationArnList - */ -const de_LicenseConfigurationArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LicenseConfigurationArnList omitted. -/** - * deserializeAws_restJson1Logging - */ -const de_Logging = (output: any, context: __SerdeContext): Logging => { - return { - s3Logs: output.s3Logs != null ? de_S3Logs(output.s3Logs, context) : undefined, - } as any; -}; +// de_Logging omitted. -/** - * deserializeAws_restJson1NonEmptyStringList - */ -const de_NonEmptyStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NonEmptyStringList omitted. -/** - * deserializeAws_restJson1OrganizationalUnitArnList - */ -const de_OrganizationalUnitArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OrganizationalUnitArnList omitted. -/** - * deserializeAws_restJson1OrganizationArnList - */ -const de_OrganizationArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OrganizationArnList omitted. -/** - * deserializeAws_restJson1OsVersionList - */ -const de_OsVersionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OsVersionList omitted. -/** - * deserializeAws_restJson1OutputResources - */ -const de_OutputResources = (output: any, context: __SerdeContext): OutputResources => { - return { - amis: output.amis != null ? de_AmiList(output.amis, context) : undefined, - containers: output.containers != null ? de_ContainerList(output.containers, context) : undefined, - } as any; -}; +// de_OutputResources omitted. /** * deserializeAws_restJson1PackageVulnerabilityDetails */ const de_PackageVulnerabilityDetails = (output: any, context: __SerdeContext): PackageVulnerabilityDetails => { - return { - cvss: output.cvss != null ? de_CvssScoreList(output.cvss, context) : undefined, - referenceUrls: output.referenceUrls != null ? de_NonEmptyStringList(output.referenceUrls, context) : undefined, - relatedVulnerabilities: - output.relatedVulnerabilities != null - ? de_VulnerabilityIdList(output.relatedVulnerabilities, context) - : undefined, - source: __expectString(output.source), - sourceUrl: __expectString(output.sourceUrl), - vendorCreatedAt: - output.vendorCreatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vendorCreatedAt))) - : undefined, - vendorSeverity: __expectString(output.vendorSeverity), - vendorUpdatedAt: - output.vendorUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vendorUpdatedAt))) - : undefined, - vulnerabilityId: __expectString(output.vulnerabilityId), - vulnerablePackages: - output.vulnerablePackages != null ? de_VulnerablePackageList(output.vulnerablePackages, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RegionList - */ -const de_RegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + cvss: (_: any) => de_CvssScoreList(_, context), + referenceUrls: _json, + relatedVulnerabilities: _json, + source: __expectString, + sourceUrl: __expectString, + vendorCreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorSeverity: __expectString, + vendorUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vulnerabilityId: __expectString, + vulnerablePackages: _json, + }) as any; }; -/** - * deserializeAws_restJson1Remediation - */ -const de_Remediation = (output: any, context: __SerdeContext): Remediation => { - return { - recommendation: - output.recommendation != null ? de_RemediationRecommendation(output.recommendation, context) : undefined, - } as any; -}; +// de_RegionList omitted. -/** - * deserializeAws_restJson1RemediationRecommendation - */ -const de_RemediationRecommendation = (output: any, context: __SerdeContext): RemediationRecommendation => { - return { - text: __expectString(output.text), - url: __expectString(output.url), - } as any; -}; +// de_Remediation omitted. -/** - * deserializeAws_restJson1ResourceTagMap - */ -const de_ResourceTagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RemediationRecommendation omitted. -/** - * deserializeAws_restJson1S3ExportConfiguration - */ -const de_S3ExportConfiguration = (output: any, context: __SerdeContext): S3ExportConfiguration => { - return { - diskImageFormat: __expectString(output.diskImageFormat), - roleName: __expectString(output.roleName), - s3Bucket: __expectString(output.s3Bucket), - s3Prefix: __expectString(output.s3Prefix), - } as any; -}; +// de_ResourceTagMap omitted. -/** - * deserializeAws_restJson1S3Logs - */ -const de_S3Logs = (output: any, context: __SerdeContext): S3Logs => { - return { - s3BucketName: __expectString(output.s3BucketName), - s3KeyPrefix: __expectString(output.s3KeyPrefix), - } as any; -}; +// de_S3ExportConfiguration omitted. -/** - * deserializeAws_restJson1Schedule - */ -const de_Schedule = (output: any, context: __SerdeContext): Schedule => { - return { - pipelineExecutionStartCondition: __expectString(output.pipelineExecutionStartCondition), - scheduleExpression: __expectString(output.scheduleExpression), - timezone: __expectString(output.timezone), - } as any; -}; +// de_S3Logs omitted. -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Schedule omitted. -/** - * deserializeAws_restJson1SeverityCounts - */ -const de_SeverityCounts = (output: any, context: __SerdeContext): SeverityCounts => { - return { - all: __expectLong(output.all), - critical: __expectLong(output.critical), - high: __expectLong(output.high), - medium: __expectLong(output.medium), - } as any; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SeverityCounts omitted. -/** - * deserializeAws_restJson1SystemsManagerAgent - */ -const de_SystemsManagerAgent = (output: any, context: __SerdeContext): SystemsManagerAgent => { - return { - uninstallAfterBuild: __expectBoolean(output.uninstallAfterBuild), - } as any; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SystemsManagerAgent omitted. -/** - * deserializeAws_restJson1TargetContainerRepository - */ -const de_TargetContainerRepository = (output: any, context: __SerdeContext): TargetContainerRepository => { - return { - repositoryName: __expectString(output.repositoryName), - service: __expectString(output.service), - } as any; -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1VulnerabilityIdAggregation - */ -const de_VulnerabilityIdAggregation = (output: any, context: __SerdeContext): VulnerabilityIdAggregation => { - return { - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - vulnerabilityId: __expectString(output.vulnerabilityId), - } as any; -}; +// de_TargetContainerRepository omitted. -/** - * deserializeAws_restJson1VulnerabilityIdList - */ -const de_VulnerabilityIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VulnerabilityIdAggregation omitted. -/** - * deserializeAws_restJson1VulnerablePackage - */ -const de_VulnerablePackage = (output: any, context: __SerdeContext): VulnerablePackage => { - return { - arch: __expectString(output.arch), - epoch: __expectInt32(output.epoch), - filePath: __expectString(output.filePath), - fixedInVersion: __expectString(output.fixedInVersion), - name: __expectString(output.name), - packageManager: __expectString(output.packageManager), - release: __expectString(output.release), - remediation: __expectString(output.remediation), - sourceLayerHash: __expectString(output.sourceLayerHash), - version: __expectString(output.version), - } as any; -}; +// de_VulnerabilityIdList omitted. -/** - * deserializeAws_restJson1VulnerablePackageList - */ -const de_VulnerablePackageList = (output: any, context: __SerdeContext): VulnerablePackage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VulnerablePackage(entry, context); - }); - return retVal; -}; +// de_VulnerablePackage omitted. -/** - * deserializeAws_restJson1WorkflowExecutionMetadata - */ -const de_WorkflowExecutionMetadata = (output: any, context: __SerdeContext): WorkflowExecutionMetadata => { - return { - endTime: __expectString(output.endTime), - message: __expectString(output.message), - startTime: __expectString(output.startTime), - status: __expectString(output.status), - totalStepCount: __expectInt32(output.totalStepCount), - totalStepsFailed: __expectInt32(output.totalStepsFailed), - totalStepsSkipped: __expectInt32(output.totalStepsSkipped), - totalStepsSucceeded: __expectInt32(output.totalStepsSucceeded), - type: __expectString(output.type), - workflowBuildVersionArn: __expectString(output.workflowBuildVersionArn), - workflowExecutionId: __expectString(output.workflowExecutionId), - } as any; -}; +// de_VulnerablePackageList omitted. -/** - * deserializeAws_restJson1WorkflowExecutionsList - */ -const de_WorkflowExecutionsList = (output: any, context: __SerdeContext): WorkflowExecutionMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowExecutionMetadata(entry, context); - }); - return retVal; -}; +// de_WorkflowExecutionMetadata omitted. -/** - * deserializeAws_restJson1WorkflowStepExecutionsList - */ -const de_WorkflowStepExecutionsList = (output: any, context: __SerdeContext): WorkflowStepMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowStepMetadata(entry, context); - }); - return retVal; -}; +// de_WorkflowExecutionsList omitted. -/** - * deserializeAws_restJson1WorkflowStepMetadata - */ -const de_WorkflowStepMetadata = (output: any, context: __SerdeContext): WorkflowStepMetadata => { - return { - action: __expectString(output.action), - description: __expectString(output.description), - endTime: __expectString(output.endTime), - inputs: __expectString(output.inputs), - message: __expectString(output.message), - name: __expectString(output.name), - outputs: __expectString(output.outputs), - rollbackStatus: __expectString(output.rollbackStatus), - startTime: __expectString(output.startTime), - status: __expectString(output.status), - stepExecutionId: __expectString(output.stepExecutionId), - } as any; -}; +// de_WorkflowStepExecutionsList omitted. + +// de_WorkflowStepMetadata omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-inspector/src/protocols/Aws_json1_1.ts b/clients/client-inspector/src/protocols/Aws_json1_1.ts index 2646be31efae..8ade98f30d5c 100644 --- a/clients/client-inspector/src/protocols/Aws_json1_1.ts +++ b/clients/client-inspector/src/protocols/Aws_json1_1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -138,15 +139,11 @@ import { InspectorServiceException as __BaseException } from "../models/Inspecto import { AccessDeniedException, AddAttributesToFindingsRequest, - AddAttributesToFindingsResponse, - AgentAlreadyRunningAssessment, AgentFilter, AgentHealth, AgentHealthCode, - AgentPreview, AgentsAlreadyRunningAssessmentException, AssessmentRun, - AssessmentRunAgent, AssessmentRunFilter, AssessmentRunInProgressException, AssessmentRunNotification, @@ -156,16 +153,11 @@ import { AssessmentTargetFilter, AssessmentTemplate, AssessmentTemplateFilter, - AssetAttributes, Attribute, CreateAssessmentTargetRequest, - CreateAssessmentTargetResponse, CreateAssessmentTemplateRequest, - CreateAssessmentTemplateResponse, CreateExclusionsPreviewRequest, - CreateExclusionsPreviewResponse, CreateResourceGroupRequest, - CreateResourceGroupResponse, DeleteAssessmentRunRequest, DeleteAssessmentTargetRequest, DeleteAssessmentTemplateRequest, @@ -177,73 +169,47 @@ import { DescribeAssessmentTemplatesResponse, DescribeCrossAccountAccessRoleResponse, DescribeExclusionsRequest, - DescribeExclusionsResponse, DescribeFindingsRequest, DescribeFindingsResponse, DescribeResourceGroupsRequest, DescribeResourceGroupsResponse, DescribeRulesPackagesRequest, - DescribeRulesPackagesResponse, DurationRange, EventSubscription, - Exclusion, - ExclusionPreview, - FailedItemDetails, Finding, FindingFilter, GetAssessmentReportRequest, - GetAssessmentReportResponse, GetExclusionsPreviewRequest, - GetExclusionsPreviewResponse, GetTelemetryMetadataRequest, - GetTelemetryMetadataResponse, - InspectorServiceAttributes, InternalException, InvalidCrossAccountRoleException, InvalidInputException, LimitExceededException, ListAssessmentRunAgentsRequest, - ListAssessmentRunAgentsResponse, ListAssessmentRunsRequest, - ListAssessmentRunsResponse, ListAssessmentTargetsRequest, - ListAssessmentTargetsResponse, ListAssessmentTemplatesRequest, - ListAssessmentTemplatesResponse, ListEventSubscriptionsRequest, ListEventSubscriptionsResponse, ListExclusionsRequest, - ListExclusionsResponse, ListFindingsRequest, - ListFindingsResponse, ListRulesPackagesRequest, - ListRulesPackagesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, - NetworkInterface, NoSuchEntityException, PreviewAgentsRequest, - PreviewAgentsResponse, PreviewGenerationInProgressException, - PrivateIp, RegisterCrossAccountAccessRoleRequest, RemoveAttributesFromFindingsRequest, - RemoveAttributesFromFindingsResponse, ResourceGroup, ResourceGroupTag, - RulesPackage, - Scope, - SecurityGroup, ServiceTemporarilyUnavailableException, SetTagsForResourceRequest, Severity, StartAssessmentRunRequest, - StartAssessmentRunResponse, StopAssessmentRunRequest, SubscribeToEventRequest, Subscription, Tag, - TelemetryMetadata, TimestampRange, UnsubscribeFromEventRequest, UnsupportedFeatureException, @@ -259,7 +225,7 @@ export const se_AddAttributesToFindingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddAttributesToFindings"); let body: any; - body = JSON.stringify(se_AddAttributesToFindingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -272,7 +238,7 @@ export const se_CreateAssessmentTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAssessmentTarget"); let body: any; - body = JSON.stringify(se_CreateAssessmentTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -285,7 +251,7 @@ export const se_CreateAssessmentTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAssessmentTemplate"); let body: any; - body = JSON.stringify(se_CreateAssessmentTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -298,7 +264,7 @@ export const se_CreateExclusionsPreviewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateExclusionsPreview"); let body: any; - body = JSON.stringify(se_CreateExclusionsPreviewRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -311,7 +277,7 @@ export const se_CreateResourceGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateResourceGroup"); let body: any; - body = JSON.stringify(se_CreateResourceGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +290,7 @@ export const se_DeleteAssessmentRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAssessmentRun"); let body: any; - body = JSON.stringify(se_DeleteAssessmentRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +303,7 @@ export const se_DeleteAssessmentTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAssessmentTarget"); let body: any; - body = JSON.stringify(se_DeleteAssessmentTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +316,7 @@ export const se_DeleteAssessmentTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAssessmentTemplate"); let body: any; - body = JSON.stringify(se_DeleteAssessmentTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +329,7 @@ export const se_DescribeAssessmentRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAssessmentRuns"); let body: any; - body = JSON.stringify(se_DescribeAssessmentRunsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +342,7 @@ export const se_DescribeAssessmentTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAssessmentTargets"); let body: any; - body = JSON.stringify(se_DescribeAssessmentTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +355,7 @@ export const se_DescribeAssessmentTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAssessmentTemplates"); let body: any; - body = JSON.stringify(se_DescribeAssessmentTemplatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -414,7 +380,7 @@ export const se_DescribeExclusionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExclusions"); let body: any; - body = JSON.stringify(se_DescribeExclusionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -427,7 +393,7 @@ export const se_DescribeFindingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFindings"); let body: any; - body = JSON.stringify(se_DescribeFindingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -440,7 +406,7 @@ export const se_DescribeResourceGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeResourceGroups"); let body: any; - body = JSON.stringify(se_DescribeResourceGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -453,7 +419,7 @@ export const se_DescribeRulesPackagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRulesPackages"); let body: any; - body = JSON.stringify(se_DescribeRulesPackagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -466,7 +432,7 @@ export const se_GetAssessmentReportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAssessmentReport"); let body: any; - body = JSON.stringify(se_GetAssessmentReportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -479,7 +445,7 @@ export const se_GetExclusionsPreviewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetExclusionsPreview"); let body: any; - body = JSON.stringify(se_GetExclusionsPreviewRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -492,7 +458,7 @@ export const se_GetTelemetryMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTelemetryMetadata"); let body: any; - body = JSON.stringify(se_GetTelemetryMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -505,7 +471,7 @@ export const se_ListAssessmentRunAgentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssessmentRunAgents"); let body: any; - body = JSON.stringify(se_ListAssessmentRunAgentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -531,7 +497,7 @@ export const se_ListAssessmentTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssessmentTargets"); let body: any; - body = JSON.stringify(se_ListAssessmentTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -544,7 +510,7 @@ export const se_ListAssessmentTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssessmentTemplates"); let body: any; - body = JSON.stringify(se_ListAssessmentTemplatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -557,7 +523,7 @@ export const se_ListEventSubscriptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventSubscriptions"); let body: any; - body = JSON.stringify(se_ListEventSubscriptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -570,7 +536,7 @@ export const se_ListExclusionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExclusions"); let body: any; - body = JSON.stringify(se_ListExclusionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -596,7 +562,7 @@ export const se_ListRulesPackagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRulesPackages"); let body: any; - body = JSON.stringify(se_ListRulesPackagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -609,7 +575,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -622,7 +588,7 @@ export const se_PreviewAgentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PreviewAgents"); let body: any; - body = JSON.stringify(se_PreviewAgentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -635,7 +601,7 @@ export const se_RegisterCrossAccountAccessRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterCrossAccountAccessRole"); let body: any; - body = JSON.stringify(se_RegisterCrossAccountAccessRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -648,7 +614,7 @@ export const se_RemoveAttributesFromFindingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveAttributesFromFindings"); let body: any; - body = JSON.stringify(se_RemoveAttributesFromFindingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -661,7 +627,7 @@ export const se_SetTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetTagsForResource"); let body: any; - body = JSON.stringify(se_SetTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -674,7 +640,7 @@ export const se_StartAssessmentRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartAssessmentRun"); let body: any; - body = JSON.stringify(se_StartAssessmentRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -687,7 +653,7 @@ export const se_StopAssessmentRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopAssessmentRun"); let body: any; - body = JSON.stringify(se_StopAssessmentRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -700,7 +666,7 @@ export const se_SubscribeToEventCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SubscribeToEvent"); let body: any; - body = JSON.stringify(se_SubscribeToEventRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -713,7 +679,7 @@ export const se_UnsubscribeFromEventCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnsubscribeFromEvent"); let body: any; - body = JSON.stringify(se_UnsubscribeFromEventRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -726,7 +692,7 @@ export const se_UpdateAssessmentTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAssessmentTarget"); let body: any; - body = JSON.stringify(se_UpdateAssessmentTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -742,12 +708,12 @@ export const de_AddAttributesToFindingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddAttributesToFindingsResponse(data, context); + contents = _json(data); const response: AddAttributesToFindingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -780,10 +746,9 @@ const de_AddAttributesToFindingsCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -801,12 +766,12 @@ export const de_CreateAssessmentTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAssessmentTargetResponse(data, context); + contents = _json(data); const response: CreateAssessmentTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -845,10 +810,9 @@ const de_CreateAssessmentTargetCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -866,12 +830,12 @@ export const de_CreateAssessmentTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAssessmentTemplateResponse(data, context); + contents = _json(data); const response: CreateAssessmentTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -907,10 +871,9 @@ const de_CreateAssessmentTemplateCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -928,12 +891,12 @@ export const de_CreateExclusionsPreviewCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateExclusionsPreviewResponse(data, context); + contents = _json(data); const response: CreateExclusionsPreviewCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -969,10 +932,9 @@ const de_CreateExclusionsPreviewCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -990,12 +952,12 @@ export const de_CreateResourceGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResourceGroupResponse(data, context); + contents = _json(data); const response: CreateResourceGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1028,10 +990,9 @@ const de_CreateResourceGroupCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1051,7 +1012,7 @@ export const de_DeleteAssessmentRunCommand = async ( const response: DeleteAssessmentRunCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1087,10 +1048,9 @@ const de_DeleteAssessmentRunCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1110,7 +1070,7 @@ export const de_DeleteAssessmentTargetCommand = async ( const response: DeleteAssessmentTargetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1146,10 +1106,9 @@ const de_DeleteAssessmentTargetCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1169,7 +1128,7 @@ export const de_DeleteAssessmentTemplateCommand = async ( const response: DeleteAssessmentTemplateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1205,10 +1164,9 @@ const de_DeleteAssessmentTemplateCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1231,7 +1189,7 @@ export const de_DescribeAssessmentRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1255,10 +1213,9 @@ const de_DescribeAssessmentRunsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1281,7 +1238,7 @@ export const de_DescribeAssessmentTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1305,10 +1262,9 @@ const de_DescribeAssessmentTargetsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1331,7 +1287,7 @@ export const de_DescribeAssessmentTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1355,10 +1311,9 @@ const de_DescribeAssessmentTemplatesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1381,7 +1336,7 @@ export const de_DescribeCrossAccountAccessRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1402,10 +1357,9 @@ const de_DescribeCrossAccountAccessRoleCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1423,12 +1377,12 @@ export const de_DescribeExclusionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeExclusionsResponse(data, context); + contents = _json(data); const response: DescribeExclusionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1452,10 +1406,9 @@ const de_DescribeExclusionsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,7 +1431,7 @@ export const de_DescribeFindingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1502,10 +1455,9 @@ const de_DescribeFindingsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1528,7 +1480,7 @@ export const de_DescribeResourceGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1552,10 +1504,9 @@ const de_DescribeResourceGroupsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,12 +1524,12 @@ export const de_DescribeRulesPackagesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRulesPackagesResponse(data, context); + contents = _json(data); const response: DescribeRulesPackagesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1602,10 +1553,9 @@ const de_DescribeRulesPackagesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1623,12 +1573,12 @@ export const de_GetAssessmentReportCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAssessmentReportResponse(data, context); + contents = _json(data); const response: GetAssessmentReportCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1667,10 +1617,9 @@ const de_GetAssessmentReportCommandError = async ( throw await de_UnsupportedFeatureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1688,12 +1637,12 @@ export const de_GetExclusionsPreviewCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetExclusionsPreviewResponse(data, context); + contents = _json(data); const response: GetExclusionsPreviewCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1723,10 +1672,9 @@ const de_GetExclusionsPreviewCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1744,12 +1692,12 @@ export const de_GetTelemetryMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTelemetryMetadataResponse(data, context); + contents = _json(data); const response: GetTelemetryMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1779,10 +1727,9 @@ const de_GetTelemetryMetadataCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1800,12 +1747,12 @@ export const de_ListAssessmentRunAgentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssessmentRunAgentsResponse(data, context); + contents = _json(data); const response: ListAssessmentRunAgentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1835,10 +1782,9 @@ const de_ListAssessmentRunAgentsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1856,12 +1802,12 @@ export const de_ListAssessmentRunsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssessmentRunsResponse(data, context); + contents = _json(data); const response: ListAssessmentRunsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1891,10 +1837,9 @@ const de_ListAssessmentRunsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1912,12 +1857,12 @@ export const de_ListAssessmentTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssessmentTargetsResponse(data, context); + contents = _json(data); const response: ListAssessmentTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1944,10 +1889,9 @@ const de_ListAssessmentTargetsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1965,12 +1909,12 @@ export const de_ListAssessmentTemplatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAssessmentTemplatesResponse(data, context); + contents = _json(data); const response: ListAssessmentTemplatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2000,10 +1944,9 @@ const de_ListAssessmentTemplatesCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,7 +1969,7 @@ export const de_ListEventSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2056,10 +1999,9 @@ const de_ListEventSubscriptionsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2077,12 +2019,12 @@ export const de_ListExclusionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListExclusionsResponse(data, context); + contents = _json(data); const response: ListExclusionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2112,10 +2054,9 @@ const de_ListExclusionsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2133,12 +2074,12 @@ export const de_ListFindingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFindingsResponse(data, context); + contents = _json(data); const response: ListFindingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2168,10 +2109,9 @@ const de_ListFindingsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2189,12 +2129,12 @@ export const de_ListRulesPackagesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRulesPackagesResponse(data, context); + contents = _json(data); const response: ListRulesPackagesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2221,10 +2161,9 @@ const de_ListRulesPackagesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2242,12 +2181,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2277,10 +2216,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2298,12 +2236,12 @@ export const de_PreviewAgentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PreviewAgentsResponse(data, context); + contents = _json(data); const response: PreviewAgentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2336,10 +2274,9 @@ const de_PreviewAgentsCommandError = async ( throw await de_NoSuchEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2359,7 +2296,7 @@ export const de_RegisterCrossAccountAccessRoleCommand = async ( const response: RegisterCrossAccountAccessRoleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2392,10 +2329,9 @@ const de_RegisterCrossAccountAccessRoleCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2413,12 +2349,12 @@ export const de_RemoveAttributesFromFindingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveAttributesFromFindingsResponse(data, context); + contents = _json(data); const response: RemoveAttributesFromFindingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2451,10 +2387,9 @@ const de_RemoveAttributesFromFindingsCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2474,7 +2409,7 @@ export const de_SetTagsForResourceCommand = async ( const response: SetTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2507,10 +2442,9 @@ const de_SetTagsForResourceCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2528,12 +2462,12 @@ export const de_StartAssessmentRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartAssessmentRunResponse(data, context); + contents = _json(data); const response: StartAssessmentRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2575,10 +2509,9 @@ const de_StartAssessmentRunCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2598,7 +2531,7 @@ export const de_StopAssessmentRunCommand = async ( const response: StopAssessmentRunCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2631,10 +2564,9 @@ const de_StopAssessmentRunCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2654,7 +2586,7 @@ export const de_SubscribeToEventCommand = async ( const response: SubscribeToEventCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2690,10 +2622,9 @@ const de_SubscribeToEventCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2713,7 +2644,7 @@ export const de_UnsubscribeFromEventCommand = async ( const response: UnsubscribeFromEventCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2746,10 +2677,9 @@ const de_UnsubscribeFromEventCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2769,7 +2699,7 @@ export const de_UpdateAssessmentTargetCommand = async ( const response: UpdateAssessmentTargetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2802,10 +2732,9 @@ const de_UpdateAssessmentTargetCommandError = async ( throw await de_ServiceTemporarilyUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2819,7 +2748,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2835,7 +2764,7 @@ const de_AgentsAlreadyRunningAssessmentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AgentsAlreadyRunningAssessmentException(body, context); + const deserialized: any = _json(body); const exception = new AgentsAlreadyRunningAssessmentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2851,7 +2780,7 @@ const de_AssessmentRunInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssessmentRunInProgressException(body, context); + const deserialized: any = _json(body); const exception = new AssessmentRunInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2864,7 +2793,7 @@ const de_AssessmentRunInProgressExceptionRes = async ( */ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalException(body, context); + const deserialized: any = _json(body); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2880,7 +2809,7 @@ const de_InvalidCrossAccountRoleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCrossAccountRoleException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCrossAccountRoleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2896,7 +2825,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2912,7 +2841,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2928,7 +2857,7 @@ const de_NoSuchEntityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchEntityException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchEntityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2944,7 +2873,7 @@ const de_PreviewGenerationInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PreviewGenerationInProgressException(body, context); + const deserialized: any = _json(body); const exception = new PreviewGenerationInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2960,7 +2889,7 @@ const de_ServiceTemporarilyUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceTemporarilyUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceTemporarilyUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2976,7 +2905,7 @@ const de_UnsupportedFeatureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedFeatureException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedFeatureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2984,2044 +2913,658 @@ const de_UnsupportedFeatureExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddAttributesToFindingsRequest - */ -const se_AddAttributesToFindingsRequest = (input: AddAttributesToFindingsRequest, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_UserAttributeList(input.attributes, context) }), - ...(input.findingArns != null && { findingArns: se_AddRemoveAttributesFindingArnList(input.findingArns, context) }), - }; -}; +// se_AddAttributesToFindingsRequest omitted. -/** - * serializeAws_json1_1AddRemoveAttributesFindingArnList - */ -const se_AddRemoveAttributesFindingArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AddRemoveAttributesFindingArnList omitted. -/** - * serializeAws_json1_1AgentFilter - */ -const se_AgentFilter = (input: AgentFilter, context: __SerdeContext): any => { - return { - ...(input.agentHealthCodes != null && { - agentHealthCodes: se_AgentHealthCodeList(input.agentHealthCodes, context), - }), - ...(input.agentHealths != null && { agentHealths: se_AgentHealthList(input.agentHealths, context) }), - }; -}; +// se_AgentFilter omitted. -/** - * serializeAws_json1_1AgentHealthCodeList - */ -const se_AgentHealthCodeList = (input: (AgentHealthCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentHealthCodeList omitted. -/** - * serializeAws_json1_1AgentHealthList - */ -const se_AgentHealthList = (input: (AgentHealth | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentHealthList omitted. -/** - * serializeAws_json1_1AgentIdList - */ -const se_AgentIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AgentIdList omitted. /** * serializeAws_json1_1AssessmentRunFilter */ const se_AssessmentRunFilter = (input: AssessmentRunFilter, context: __SerdeContext): any => { - return { - ...(input.completionTimeRange != null && { - completionTimeRange: se_TimestampRange(input.completionTimeRange, context), - }), - ...(input.durationRange != null && { durationRange: se_DurationRange(input.durationRange, context) }), - ...(input.namePattern != null && { namePattern: input.namePattern }), - ...(input.rulesPackageArns != null && { - rulesPackageArns: se_FilterRulesPackageArnList(input.rulesPackageArns, context), - }), - ...(input.startTimeRange != null && { startTimeRange: se_TimestampRange(input.startTimeRange, context) }), - ...(input.stateChangeTimeRange != null && { - stateChangeTimeRange: se_TimestampRange(input.stateChangeTimeRange, context), - }), - ...(input.states != null && { states: se_AssessmentRunStateList(input.states, context) }), - }; -}; - -/** - * serializeAws_json1_1AssessmentRunStateList - */ -const se_AssessmentRunStateList = (input: (AssessmentRunState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1AssessmentTargetFilter - */ -const se_AssessmentTargetFilter = (input: AssessmentTargetFilter, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetNamePattern != null && { - assessmentTargetNamePattern: input.assessmentTargetNamePattern, - }), - }; -}; - -/** - * serializeAws_json1_1AssessmentTemplateFilter - */ -const se_AssessmentTemplateFilter = (input: AssessmentTemplateFilter, context: __SerdeContext): any => { - return { - ...(input.durationRange != null && { durationRange: se_DurationRange(input.durationRange, context) }), - ...(input.namePattern != null && { namePattern: input.namePattern }), - ...(input.rulesPackageArns != null && { - rulesPackageArns: se_FilterRulesPackageArnList(input.rulesPackageArns, context), - }), - }; -}; - -/** - * serializeAws_json1_1AssessmentTemplateRulesPackageArnList - */ -const se_AssessmentTemplateRulesPackageArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Attribute - */ -const se_Attribute = (input: Attribute, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1AttributeList - */ -const se_AttributeList = (input: Attribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Attribute(entry, context); - }); -}; - -/** - * serializeAws_json1_1AutoScalingGroupList - */ -const se_AutoScalingGroupList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1BatchDescribeArnList - */ -const se_BatchDescribeArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1BatchDescribeExclusionsArnList - */ -const se_BatchDescribeExclusionsArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1CreateAssessmentTargetRequest - */ -const se_CreateAssessmentTargetRequest = (input: CreateAssessmentTargetRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetName != null && { assessmentTargetName: input.assessmentTargetName }), - ...(input.resourceGroupArn != null && { resourceGroupArn: input.resourceGroupArn }), - }; -}; - -/** - * serializeAws_json1_1CreateAssessmentTemplateRequest - */ -const se_CreateAssessmentTemplateRequest = (input: CreateAssessmentTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetArn != null && { assessmentTargetArn: input.assessmentTargetArn }), - ...(input.assessmentTemplateName != null && { assessmentTemplateName: input.assessmentTemplateName }), - ...(input.durationInSeconds != null && { durationInSeconds: input.durationInSeconds }), - ...(input.rulesPackageArns != null && { - rulesPackageArns: se_AssessmentTemplateRulesPackageArnList(input.rulesPackageArns, context), - }), - ...(input.userAttributesForFindings != null && { - userAttributesForFindings: se_UserAttributeList(input.userAttributesForFindings, context), - }), - }; -}; - -/** - * serializeAws_json1_1CreateExclusionsPreviewRequest - */ -const se_CreateExclusionsPreviewRequest = (input: CreateExclusionsPreviewRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTemplateArn != null && { assessmentTemplateArn: input.assessmentTemplateArn }), - }; -}; - -/** - * serializeAws_json1_1CreateResourceGroupRequest - */ -const se_CreateResourceGroupRequest = (input: CreateResourceGroupRequest, context: __SerdeContext): any => { - return { - ...(input.resourceGroupTags != null && { - resourceGroupTags: se_ResourceGroupTags(input.resourceGroupTags, context), - }), - }; -}; - -/** - * serializeAws_json1_1DeleteAssessmentRunRequest - */ -const se_DeleteAssessmentRunRequest = (input: DeleteAssessmentRunRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArn != null && { assessmentRunArn: input.assessmentRunArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteAssessmentTargetRequest - */ -const se_DeleteAssessmentTargetRequest = (input: DeleteAssessmentTargetRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetArn != null && { assessmentTargetArn: input.assessmentTargetArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteAssessmentTemplateRequest - */ -const se_DeleteAssessmentTemplateRequest = (input: DeleteAssessmentTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTemplateArn != null && { assessmentTemplateArn: input.assessmentTemplateArn }), - }; + return take(input, { + completionTimeRange: (_) => se_TimestampRange(_, context), + durationRange: _json, + namePattern: [], + rulesPackageArns: _json, + startTimeRange: (_) => se_TimestampRange(_, context), + stateChangeTimeRange: (_) => se_TimestampRange(_, context), + states: _json, + }); }; -/** - * serializeAws_json1_1DescribeAssessmentRunsRequest - */ -const se_DescribeAssessmentRunsRequest = (input: DescribeAssessmentRunsRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArns != null && { - assessmentRunArns: se_BatchDescribeArnList(input.assessmentRunArns, context), - }), - }; -}; +// se_AssessmentRunStateList omitted. -/** - * serializeAws_json1_1DescribeAssessmentTargetsRequest - */ -const se_DescribeAssessmentTargetsRequest = (input: DescribeAssessmentTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetArns != null && { - assessmentTargetArns: se_BatchDescribeArnList(input.assessmentTargetArns, context), - }), - }; -}; +// se_AssessmentTargetFilter omitted. -/** - * serializeAws_json1_1DescribeAssessmentTemplatesRequest - */ -const se_DescribeAssessmentTemplatesRequest = ( - input: DescribeAssessmentTemplatesRequest, - context: __SerdeContext -): any => { - return { - ...(input.assessmentTemplateArns != null && { - assessmentTemplateArns: se_BatchDescribeArnList(input.assessmentTemplateArns, context), - }), - }; -}; +// se_AssessmentTemplateFilter omitted. -/** - * serializeAws_json1_1DescribeExclusionsRequest - */ -const se_DescribeExclusionsRequest = (input: DescribeExclusionsRequest, context: __SerdeContext): any => { - return { - ...(input.exclusionArns != null && { - exclusionArns: se_BatchDescribeExclusionsArnList(input.exclusionArns, context), - }), - ...(input.locale != null && { locale: input.locale }), - }; -}; +// se_AssessmentTemplateRulesPackageArnList omitted. -/** - * serializeAws_json1_1DescribeFindingsRequest - */ -const se_DescribeFindingsRequest = (input: DescribeFindingsRequest, context: __SerdeContext): any => { - return { - ...(input.findingArns != null && { findingArns: se_BatchDescribeArnList(input.findingArns, context) }), - ...(input.locale != null && { locale: input.locale }), - }; -}; +// se_Attribute omitted. -/** - * serializeAws_json1_1DescribeResourceGroupsRequest - */ -const se_DescribeResourceGroupsRequest = (input: DescribeResourceGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.resourceGroupArns != null && { - resourceGroupArns: se_BatchDescribeArnList(input.resourceGroupArns, context), - }), - }; -}; +// se_AttributeList omitted. -/** - * serializeAws_json1_1DescribeRulesPackagesRequest - */ -const se_DescribeRulesPackagesRequest = (input: DescribeRulesPackagesRequest, context: __SerdeContext): any => { - return { - ...(input.locale != null && { locale: input.locale }), - ...(input.rulesPackageArns != null && { - rulesPackageArns: se_BatchDescribeArnList(input.rulesPackageArns, context), - }), - }; -}; +// se_AutoScalingGroupList omitted. -/** - * serializeAws_json1_1DurationRange - */ -const se_DurationRange = (input: DurationRange, context: __SerdeContext): any => { - return { - ...(input.maxSeconds != null && { maxSeconds: input.maxSeconds }), - ...(input.minSeconds != null && { minSeconds: input.minSeconds }), - }; -}; +// se_BatchDescribeArnList omitted. -/** - * serializeAws_json1_1FilterRulesPackageArnList - */ -const se_FilterRulesPackageArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BatchDescribeExclusionsArnList omitted. -/** - * serializeAws_json1_1FindingFilter - */ -const se_FindingFilter = (input: FindingFilter, context: __SerdeContext): any => { - return { - ...(input.agentIds != null && { agentIds: se_AgentIdList(input.agentIds, context) }), - ...(input.attributes != null && { attributes: se_AttributeList(input.attributes, context) }), - ...(input.autoScalingGroups != null && { - autoScalingGroups: se_AutoScalingGroupList(input.autoScalingGroups, context), - }), - ...(input.creationTimeRange != null && { creationTimeRange: se_TimestampRange(input.creationTimeRange, context) }), - ...(input.ruleNames != null && { ruleNames: se_RuleNameList(input.ruleNames, context) }), - ...(input.rulesPackageArns != null && { - rulesPackageArns: se_FilterRulesPackageArnList(input.rulesPackageArns, context), - }), - ...(input.severities != null && { severities: se_SeverityList(input.severities, context) }), - ...(input.userAttributes != null && { userAttributes: se_AttributeList(input.userAttributes, context) }), - }; -}; +// se_CreateAssessmentTargetRequest omitted. -/** - * serializeAws_json1_1GetAssessmentReportRequest - */ -const se_GetAssessmentReportRequest = (input: GetAssessmentReportRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArn != null && { assessmentRunArn: input.assessmentRunArn }), - ...(input.reportFileFormat != null && { reportFileFormat: input.reportFileFormat }), - ...(input.reportType != null && { reportType: input.reportType }), - }; -}; +// se_CreateAssessmentTemplateRequest omitted. -/** - * serializeAws_json1_1GetExclusionsPreviewRequest - */ -const se_GetExclusionsPreviewRequest = (input: GetExclusionsPreviewRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTemplateArn != null && { assessmentTemplateArn: input.assessmentTemplateArn }), - ...(input.locale != null && { locale: input.locale }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.previewToken != null && { previewToken: input.previewToken }), - }; -}; +// se_CreateExclusionsPreviewRequest omitted. -/** - * serializeAws_json1_1GetTelemetryMetadataRequest - */ -const se_GetTelemetryMetadataRequest = (input: GetTelemetryMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArn != null && { assessmentRunArn: input.assessmentRunArn }), - }; -}; +// se_CreateResourceGroupRequest omitted. -/** - * serializeAws_json1_1ListAssessmentRunAgentsRequest - */ -const se_ListAssessmentRunAgentsRequest = (input: ListAssessmentRunAgentsRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArn != null && { assessmentRunArn: input.assessmentRunArn }), - ...(input.filter != null && { filter: se_AgentFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DeleteAssessmentRunRequest omitted. -/** - * serializeAws_json1_1ListAssessmentRunsRequest - */ -const se_ListAssessmentRunsRequest = (input: ListAssessmentRunsRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTemplateArns != null && { - assessmentTemplateArns: se_ListParentArnList(input.assessmentTemplateArns, context), - }), - ...(input.filter != null && { filter: se_AssessmentRunFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DeleteAssessmentTargetRequest omitted. -/** - * serializeAws_json1_1ListAssessmentTargetsRequest - */ -const se_ListAssessmentTargetsRequest = (input: ListAssessmentTargetsRequest, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: se_AssessmentTargetFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DeleteAssessmentTemplateRequest omitted. -/** - * serializeAws_json1_1ListAssessmentTemplatesRequest - */ -const se_ListAssessmentTemplatesRequest = (input: ListAssessmentTemplatesRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetArns != null && { - assessmentTargetArns: se_ListParentArnList(input.assessmentTargetArns, context), - }), - ...(input.filter != null && { filter: se_AssessmentTemplateFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeAssessmentRunsRequest omitted. -/** - * serializeAws_json1_1ListEventSubscriptionsRequest - */ -const se_ListEventSubscriptionsRequest = (input: ListEventSubscriptionsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_DescribeAssessmentTargetsRequest omitted. -/** - * serializeAws_json1_1ListExclusionsRequest - */ -const se_ListExclusionsRequest = (input: ListExclusionsRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArn != null && { assessmentRunArn: input.assessmentRunArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeAssessmentTemplatesRequest omitted. -/** - * serializeAws_json1_1ListFindingsRequest - */ -const se_ListFindingsRequest = (input: ListFindingsRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArns != null && { - assessmentRunArns: se_ListParentArnList(input.assessmentRunArns, context), - }), - ...(input.filter != null && { filter: se_FindingFilter(input.filter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeExclusionsRequest omitted. -/** - * serializeAws_json1_1ListParentArnList - */ -const se_ListParentArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeFindingsRequest omitted. -/** - * serializeAws_json1_1ListRulesPackagesRequest - */ -const se_ListRulesPackagesRequest = (input: ListRulesPackagesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeResourceGroupsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_DescribeRulesPackagesRequest omitted. -/** - * serializeAws_json1_1PreviewAgentsRequest - */ -const se_PreviewAgentsRequest = (input: PreviewAgentsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.previewAgentsArn != null && { previewAgentsArn: input.previewAgentsArn }), - }; -}; +// se_DurationRange omitted. -/** - * serializeAws_json1_1RegisterCrossAccountAccessRoleRequest - */ -const se_RegisterCrossAccountAccessRoleRequest = ( - input: RegisterCrossAccountAccessRoleRequest, - context: __SerdeContext -): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_json1_1RemoveAttributesFromFindingsRequest - */ -const se_RemoveAttributesFromFindingsRequest = ( - input: RemoveAttributesFromFindingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.attributeKeys != null && { attributeKeys: se_UserAttributeKeyList(input.attributeKeys, context) }), - ...(input.findingArns != null && { findingArns: se_AddRemoveAttributesFindingArnList(input.findingArns, context) }), - }; -}; - -/** - * serializeAws_json1_1ResourceGroupTag - */ -const se_ResourceGroupTag = (input: ResourceGroupTag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1ResourceGroupTags - */ -const se_ResourceGroupTags = (input: ResourceGroupTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceGroupTag(entry, context); - }); -}; - -/** - * serializeAws_json1_1RuleNameList - */ -const se_RuleNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SetTagsForResourceRequest - */ -const se_SetTagsForResourceRequest = (input: SetTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1SeverityList - */ -const se_SeverityList = (input: (Severity | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StartAssessmentRunRequest - */ -const se_StartAssessmentRunRequest = (input: StartAssessmentRunRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunName != null && { assessmentRunName: input.assessmentRunName }), - ...(input.assessmentTemplateArn != null && { assessmentTemplateArn: input.assessmentTemplateArn }), - }; -}; - -/** - * serializeAws_json1_1StopAssessmentRunRequest - */ -const se_StopAssessmentRunRequest = (input: StopAssessmentRunRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentRunArn != null && { assessmentRunArn: input.assessmentRunArn }), - ...(input.stopAction != null && { stopAction: input.stopAction }), - }; -}; - -/** - * serializeAws_json1_1SubscribeToEventRequest - */ -const se_SubscribeToEventRequest = (input: SubscribeToEventRequest, context: __SerdeContext): any => { - return { - ...(input.event != null && { event: input.event }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.topicArn != null && { topicArn: input.topicArn }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TimestampRange - */ -const se_TimestampRange = (input: TimestampRange, context: __SerdeContext): any => { - return { - ...(input.beginDate != null && { beginDate: Math.round(input.beginDate.getTime() / 1000) }), - ...(input.endDate != null && { endDate: Math.round(input.endDate.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1UnsubscribeFromEventRequest - */ -const se_UnsubscribeFromEventRequest = (input: UnsubscribeFromEventRequest, context: __SerdeContext): any => { - return { - ...(input.event != null && { event: input.event }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.topicArn != null && { topicArn: input.topicArn }), - }; -}; - -/** - * serializeAws_json1_1UpdateAssessmentTargetRequest - */ -const se_UpdateAssessmentTargetRequest = (input: UpdateAssessmentTargetRequest, context: __SerdeContext): any => { - return { - ...(input.assessmentTargetArn != null && { assessmentTargetArn: input.assessmentTargetArn }), - ...(input.assessmentTargetName != null && { assessmentTargetName: input.assessmentTargetName }), - ...(input.resourceGroupArn != null && { resourceGroupArn: input.resourceGroupArn }), - }; -}; - -/** - * serializeAws_json1_1UserAttributeKeyList - */ -const se_UserAttributeKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UserAttributeList - */ -const se_UserAttributeList = (input: Attribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Attribute(entry, context); - }); -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - canRetry: __expectBoolean(output.canRetry), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AddAttributesToFindingsResponse - */ -const de_AddAttributesToFindingsResponse = (output: any, context: __SerdeContext): AddAttributesToFindingsResponse => { - return { - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AgentAlreadyRunningAssessment - */ -const de_AgentAlreadyRunningAssessment = (output: any, context: __SerdeContext): AgentAlreadyRunningAssessment => { - return { - agentId: __expectString(output.agentId), - assessmentRunArn: __expectString(output.assessmentRunArn), - } as any; -}; - -/** - * deserializeAws_json1_1AgentAlreadyRunningAssessmentList - */ -const de_AgentAlreadyRunningAssessmentList = ( - output: any, - context: __SerdeContext -): AgentAlreadyRunningAssessment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentAlreadyRunningAssessment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AgentPreview - */ -const de_AgentPreview = (output: any, context: __SerdeContext): AgentPreview => { - return { - agentHealth: __expectString(output.agentHealth), - agentId: __expectString(output.agentId), - agentVersion: __expectString(output.agentVersion), - autoScalingGroup: __expectString(output.autoScalingGroup), - hostname: __expectString(output.hostname), - ipv4Address: __expectString(output.ipv4Address), - kernelVersion: __expectString(output.kernelVersion), - operatingSystem: __expectString(output.operatingSystem), - } as any; -}; - -/** - * deserializeAws_json1_1AgentPreviewList - */ -const de_AgentPreviewList = (output: any, context: __SerdeContext): AgentPreview[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentPreview(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AgentsAlreadyRunningAssessmentException - */ -const de_AgentsAlreadyRunningAssessmentException = ( - output: any, - context: __SerdeContext -): AgentsAlreadyRunningAssessmentException => { - return { - agents: output.agents != null ? de_AgentAlreadyRunningAssessmentList(output.agents, context) : undefined, - agentsTruncated: __expectBoolean(output.agentsTruncated), - canRetry: __expectBoolean(output.canRetry), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentRulesPackageArnList - */ -const de_AssessmentRulesPackageArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentRun - */ -const de_AssessmentRun = (output: any, context: __SerdeContext): AssessmentRun => { - return { - arn: __expectString(output.arn), - assessmentTemplateArn: __expectString(output.assessmentTemplateArn), - completedAt: - output.completedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completedAt))) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - dataCollected: __expectBoolean(output.dataCollected), - durationInSeconds: __expectInt32(output.durationInSeconds), - findingCounts: - output.findingCounts != null ? de_AssessmentRunFindingCounts(output.findingCounts, context) : undefined, - name: __expectString(output.name), - notifications: - output.notifications != null ? de_AssessmentRunNotificationList(output.notifications, context) : undefined, - rulesPackageArns: - output.rulesPackageArns != null ? de_AssessmentRulesPackageArnList(output.rulesPackageArns, context) : undefined, - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - state: __expectString(output.state), - stateChangedAt: - output.stateChangedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stateChangedAt))) - : undefined, - stateChanges: - output.stateChanges != null ? de_AssessmentRunStateChangeList(output.stateChanges, context) : undefined, - userAttributesForFindings: - output.userAttributesForFindings != null - ? de_UserAttributeList(output.userAttributesForFindings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentRunAgent - */ -const de_AssessmentRunAgent = (output: any, context: __SerdeContext): AssessmentRunAgent => { - return { - agentHealth: __expectString(output.agentHealth), - agentHealthCode: __expectString(output.agentHealthCode), - agentHealthDetails: __expectString(output.agentHealthDetails), - agentId: __expectString(output.agentId), - assessmentRunArn: __expectString(output.assessmentRunArn), - autoScalingGroup: __expectString(output.autoScalingGroup), - telemetryMetadata: - output.telemetryMetadata != null ? de_TelemetryMetadataList(output.telemetryMetadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentRunAgentList - */ -const de_AssessmentRunAgentList = (output: any, context: __SerdeContext): AssessmentRunAgent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentRunAgent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentRunFindingCounts - */ -const de_AssessmentRunFindingCounts = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [Severity | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1AssessmentRunInProgressArnList - */ -const de_AssessmentRunInProgressArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentRunInProgressException - */ -const de_AssessmentRunInProgressException = ( - output: any, - context: __SerdeContext -): AssessmentRunInProgressException => { - return { - assessmentRunArns: - output.assessmentRunArns != null - ? de_AssessmentRunInProgressArnList(output.assessmentRunArns, context) - : undefined, - assessmentRunArnsTruncated: __expectBoolean(output.assessmentRunArnsTruncated), - canRetry: __expectBoolean(output.canRetry), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentRunList - */ -const de_AssessmentRunList = (output: any, context: __SerdeContext): AssessmentRun[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentRun(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentRunNotification - */ -const de_AssessmentRunNotification = (output: any, context: __SerdeContext): AssessmentRunNotification => { - return { - date: output.date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.date))) : undefined, - error: __expectBoolean(output.error), - event: __expectString(output.event), - message: __expectString(output.message), - snsPublishStatusCode: __expectString(output.snsPublishStatusCode), - snsTopicArn: __expectString(output.snsTopicArn), - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentRunNotificationList - */ -const de_AssessmentRunNotificationList = (output: any, context: __SerdeContext): AssessmentRunNotification[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentRunNotification(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentRunStateChange - */ -const de_AssessmentRunStateChange = (output: any, context: __SerdeContext): AssessmentRunStateChange => { - return { - state: __expectString(output.state), - stateChangedAt: - output.stateChangedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stateChangedAt))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentRunStateChangeList - */ -const de_AssessmentRunStateChangeList = (output: any, context: __SerdeContext): AssessmentRunStateChange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentRunStateChange(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentTarget - */ -const de_AssessmentTarget = (output: any, context: __SerdeContext): AssessmentTarget => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - name: __expectString(output.name), - resourceGroupArn: __expectString(output.resourceGroupArn), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentTargetList - */ -const de_AssessmentTargetList = (output: any, context: __SerdeContext): AssessmentTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentTemplate - */ -const de_AssessmentTemplate = (output: any, context: __SerdeContext): AssessmentTemplate => { - return { - arn: __expectString(output.arn), - assessmentRunCount: __expectInt32(output.assessmentRunCount), - assessmentTargetArn: __expectString(output.assessmentTargetArn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - durationInSeconds: __expectInt32(output.durationInSeconds), - lastAssessmentRunArn: __expectString(output.lastAssessmentRunArn), - name: __expectString(output.name), - rulesPackageArns: - output.rulesPackageArns != null - ? de_AssessmentTemplateRulesPackageArnList(output.rulesPackageArns, context) - : undefined, - userAttributesForFindings: - output.userAttributesForFindings != null - ? de_UserAttributeList(output.userAttributesForFindings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssessmentTemplateList - */ -const de_AssessmentTemplateList = (output: any, context: __SerdeContext): AssessmentTemplate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentTemplate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssessmentTemplateRulesPackageArnList - */ -const de_AssessmentTemplateRulesPackageArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssetAttributes - */ -const de_AssetAttributes = (output: any, context: __SerdeContext): AssetAttributes => { - return { - agentId: __expectString(output.agentId), - amiId: __expectString(output.amiId), - autoScalingGroup: __expectString(output.autoScalingGroup), - hostname: __expectString(output.hostname), - ipv4Addresses: output.ipv4Addresses != null ? de_Ipv4AddressList(output.ipv4Addresses, context) : undefined, - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - schemaVersion: __expectInt32(output.schemaVersion), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_json1_1AttributeList - */ -const de_AttributeList = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateAssessmentTargetResponse - */ -const de_CreateAssessmentTargetResponse = (output: any, context: __SerdeContext): CreateAssessmentTargetResponse => { - return { - assessmentTargetArn: __expectString(output.assessmentTargetArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAssessmentTemplateResponse - */ -const de_CreateAssessmentTemplateResponse = ( - output: any, - context: __SerdeContext -): CreateAssessmentTemplateResponse => { - return { - assessmentTemplateArn: __expectString(output.assessmentTemplateArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateExclusionsPreviewResponse - */ -const de_CreateExclusionsPreviewResponse = (output: any, context: __SerdeContext): CreateExclusionsPreviewResponse => { - return { - previewToken: __expectString(output.previewToken), - } as any; -}; - -/** - * deserializeAws_json1_1CreateResourceGroupResponse - */ -const de_CreateResourceGroupResponse = (output: any, context: __SerdeContext): CreateResourceGroupResponse => { - return { - resourceGroupArn: __expectString(output.resourceGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAssessmentRunsResponse - */ -const de_DescribeAssessmentRunsResponse = (output: any, context: __SerdeContext): DescribeAssessmentRunsResponse => { - return { - assessmentRuns: output.assessmentRuns != null ? de_AssessmentRunList(output.assessmentRuns, context) : undefined, - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAssessmentTargetsResponse - */ -const de_DescribeAssessmentTargetsResponse = ( - output: any, - context: __SerdeContext -): DescribeAssessmentTargetsResponse => { - return { - assessmentTargets: - output.assessmentTargets != null ? de_AssessmentTargetList(output.assessmentTargets, context) : undefined, - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAssessmentTemplatesResponse - */ -const de_DescribeAssessmentTemplatesResponse = ( - output: any, - context: __SerdeContext -): DescribeAssessmentTemplatesResponse => { - return { - assessmentTemplates: - output.assessmentTemplates != null ? de_AssessmentTemplateList(output.assessmentTemplates, context) : undefined, - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCrossAccountAccessRoleResponse - */ -const de_DescribeCrossAccountAccessRoleResponse = ( - output: any, - context: __SerdeContext -): DescribeCrossAccountAccessRoleResponse => { - return { - registeredAt: - output.registeredAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.registeredAt))) - : undefined, - roleArn: __expectString(output.roleArn), - valid: __expectBoolean(output.valid), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeExclusionsResponse - */ -const de_DescribeExclusionsResponse = (output: any, context: __SerdeContext): DescribeExclusionsResponse => { - return { - exclusions: output.exclusions != null ? de_ExclusionMap(output.exclusions, context) : undefined, - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFindingsResponse - */ -const de_DescribeFindingsResponse = (output: any, context: __SerdeContext): DescribeFindingsResponse => { - return { - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - findings: output.findings != null ? de_FindingList(output.findings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeResourceGroupsResponse - */ -const de_DescribeResourceGroupsResponse = (output: any, context: __SerdeContext): DescribeResourceGroupsResponse => { - return { - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - resourceGroups: output.resourceGroups != null ? de_ResourceGroupList(output.resourceGroups, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRulesPackagesResponse - */ -const de_DescribeRulesPackagesResponse = (output: any, context: __SerdeContext): DescribeRulesPackagesResponse => { - return { - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - rulesPackages: output.rulesPackages != null ? de_RulesPackageList(output.rulesPackages, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EventSubscription - */ -const de_EventSubscription = (output: any, context: __SerdeContext): EventSubscription => { - return { - event: __expectString(output.event), - subscribedAt: - output.subscribedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.subscribedAt))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EventSubscriptionList - */ -const de_EventSubscriptionList = (output: any, context: __SerdeContext): EventSubscription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventSubscription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Exclusion - */ -const de_Exclusion = (output: any, context: __SerdeContext): Exclusion => { - return { - arn: __expectString(output.arn), - attributes: output.attributes != null ? de_AttributeList(output.attributes, context) : undefined, - description: __expectString(output.description), - recommendation: __expectString(output.recommendation), - scopes: output.scopes != null ? de_ScopeList(output.scopes, context) : undefined, - title: __expectString(output.title), - } as any; -}; - -/** - * deserializeAws_json1_1ExclusionMap - */ -const de_ExclusionMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Exclusion(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ExclusionPreview - */ -const de_ExclusionPreview = (output: any, context: __SerdeContext): ExclusionPreview => { - return { - attributes: output.attributes != null ? de_AttributeList(output.attributes, context) : undefined, - description: __expectString(output.description), - recommendation: __expectString(output.recommendation), - scopes: output.scopes != null ? de_ScopeList(output.scopes, context) : undefined, - title: __expectString(output.title), - } as any; -}; - -/** - * deserializeAws_json1_1ExclusionPreviewList - */ -const de_ExclusionPreviewList = (output: any, context: __SerdeContext): ExclusionPreview[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExclusionPreview(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailedItemDetails - */ -const de_FailedItemDetails = (output: any, context: __SerdeContext): FailedItemDetails => { - return { - failureCode: __expectString(output.failureCode), - retryable: __expectBoolean(output.retryable), - } as any; -}; - -/** - * deserializeAws_json1_1FailedItems - */ -const de_FailedItems = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FailedItemDetails(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1Finding - */ -const de_Finding = (output: any, context: __SerdeContext): Finding => { - return { - arn: __expectString(output.arn), - assetAttributes: output.assetAttributes != null ? de_AssetAttributes(output.assetAttributes, context) : undefined, - assetType: __expectString(output.assetType), - attributes: output.attributes != null ? de_AttributeList(output.attributes, context) : undefined, - confidence: __expectInt32(output.confidence), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - indicatorOfCompromise: __expectBoolean(output.indicatorOfCompromise), - numericSeverity: __limitedParseDouble(output.numericSeverity), - recommendation: __expectString(output.recommendation), - schemaVersion: __expectInt32(output.schemaVersion), - service: __expectString(output.service), - serviceAttributes: - output.serviceAttributes != null ? de_InspectorServiceAttributes(output.serviceAttributes, context) : undefined, - severity: __expectString(output.severity), - title: __expectString(output.title), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - userAttributes: output.userAttributes != null ? de_UserAttributeList(output.userAttributes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FindingList - */ -const de_FindingList = (output: any, context: __SerdeContext): Finding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Finding(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetAssessmentReportResponse - */ -const de_GetAssessmentReportResponse = (output: any, context: __SerdeContext): GetAssessmentReportResponse => { - return { - status: __expectString(output.status), - url: __expectString(output.url), - } as any; -}; - -/** - * deserializeAws_json1_1GetExclusionsPreviewResponse - */ -const de_GetExclusionsPreviewResponse = (output: any, context: __SerdeContext): GetExclusionsPreviewResponse => { - return { - exclusionPreviews: - output.exclusionPreviews != null ? de_ExclusionPreviewList(output.exclusionPreviews, context) : undefined, - nextToken: __expectString(output.nextToken), - previewStatus: __expectString(output.previewStatus), - } as any; -}; - -/** - * deserializeAws_json1_1GetTelemetryMetadataResponse - */ -const de_GetTelemetryMetadataResponse = (output: any, context: __SerdeContext): GetTelemetryMetadataResponse => { - return { - telemetryMetadata: - output.telemetryMetadata != null ? de_TelemetryMetadataList(output.telemetryMetadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InspectorServiceAttributes - */ -const de_InspectorServiceAttributes = (output: any, context: __SerdeContext): InspectorServiceAttributes => { - return { - assessmentRunArn: __expectString(output.assessmentRunArn), - rulesPackageArn: __expectString(output.rulesPackageArn), - schemaVersion: __expectInt32(output.schemaVersion), - } as any; -}; - -/** - * deserializeAws_json1_1InternalException - */ -const de_InternalException = (output: any, context: __SerdeContext): InternalException => { - return { - canRetry: __expectBoolean(output.canRetry), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCrossAccountRoleException - */ -const de_InvalidCrossAccountRoleException = ( - output: any, - context: __SerdeContext -): InvalidCrossAccountRoleException => { - return { - canRetry: __expectBoolean(output.canRetry), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - canRetry: __expectBoolean(output.canRetry), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Ipv4AddressList - */ -const de_Ipv4AddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Ipv6Addresses - */ -const de_Ipv6Addresses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - canRetry: __expectBoolean(output.canRetry), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ListAssessmentRunAgentsResponse - */ -const de_ListAssessmentRunAgentsResponse = (output: any, context: __SerdeContext): ListAssessmentRunAgentsResponse => { - return { - assessmentRunAgents: - output.assessmentRunAgents != null ? de_AssessmentRunAgentList(output.assessmentRunAgents, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListAssessmentRunsResponse - */ -const de_ListAssessmentRunsResponse = (output: any, context: __SerdeContext): ListAssessmentRunsResponse => { - return { - assessmentRunArns: - output.assessmentRunArns != null ? de_ListReturnedArnList(output.assessmentRunArns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListAssessmentTargetsResponse - */ -const de_ListAssessmentTargetsResponse = (output: any, context: __SerdeContext): ListAssessmentTargetsResponse => { - return { - assessmentTargetArns: - output.assessmentTargetArns != null ? de_ListReturnedArnList(output.assessmentTargetArns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListAssessmentTemplatesResponse - */ -const de_ListAssessmentTemplatesResponse = (output: any, context: __SerdeContext): ListAssessmentTemplatesResponse => { - return { - assessmentTemplateArns: - output.assessmentTemplateArns != null - ? de_ListReturnedArnList(output.assessmentTemplateArns, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListEventSubscriptionsResponse - */ -const de_ListEventSubscriptionsResponse = (output: any, context: __SerdeContext): ListEventSubscriptionsResponse => { - return { - nextToken: __expectString(output.nextToken), - subscriptions: output.subscriptions != null ? de_SubscriptionList(output.subscriptions, context) : undefined, - } as any; -}; +// se_FilterRulesPackageArnList omitted. /** - * deserializeAws_json1_1ListExclusionsResponse + * serializeAws_json1_1FindingFilter */ -const de_ListExclusionsResponse = (output: any, context: __SerdeContext): ListExclusionsResponse => { - return { - exclusionArns: output.exclusionArns != null ? de_ListReturnedArnList(output.exclusionArns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; +const se_FindingFilter = (input: FindingFilter, context: __SerdeContext): any => { + return take(input, { + agentIds: _json, + attributes: _json, + autoScalingGroups: _json, + creationTimeRange: (_) => se_TimestampRange(_, context), + ruleNames: _json, + rulesPackageArns: _json, + severities: _json, + userAttributes: _json, + }); }; -/** - * deserializeAws_json1_1ListFindingsResponse - */ -const de_ListFindingsResponse = (output: any, context: __SerdeContext): ListFindingsResponse => { - return { - findingArns: output.findingArns != null ? de_ListReturnedArnList(output.findingArns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// se_GetAssessmentReportRequest omitted. + +// se_GetExclusionsPreviewRequest omitted. + +// se_GetTelemetryMetadataRequest omitted. + +// se_ListAssessmentRunAgentsRequest omitted. /** - * deserializeAws_json1_1ListReturnedArnList + * serializeAws_json1_1ListAssessmentRunsRequest */ -const de_ListReturnedArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_ListAssessmentRunsRequest = (input: ListAssessmentRunsRequest, context: __SerdeContext): any => { + return take(input, { + assessmentTemplateArns: _json, + filter: (_) => se_AssessmentRunFilter(_, context), + maxResults: [], + nextToken: [], + }); }; +// se_ListAssessmentTargetsRequest omitted. + +// se_ListAssessmentTemplatesRequest omitted. + +// se_ListEventSubscriptionsRequest omitted. + +// se_ListExclusionsRequest omitted. + /** - * deserializeAws_json1_1ListRulesPackagesResponse + * serializeAws_json1_1ListFindingsRequest */ -const de_ListRulesPackagesResponse = (output: any, context: __SerdeContext): ListRulesPackagesResponse => { - return { - nextToken: __expectString(output.nextToken), - rulesPackageArns: - output.rulesPackageArns != null ? de_ListReturnedArnList(output.rulesPackageArns, context) : undefined, - } as any; +const se_ListFindingsRequest = (input: ListFindingsRequest, context: __SerdeContext): any => { + return take(input, { + assessmentRunArns: _json, + filter: (_) => se_FindingFilter(_, context), + maxResults: [], + nextToken: [], + }); }; +// se_ListParentArnList omitted. + +// se_ListRulesPackagesRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_PreviewAgentsRequest omitted. + +// se_RegisterCrossAccountAccessRoleRequest omitted. + +// se_RemoveAttributesFromFindingsRequest omitted. + +// se_ResourceGroupTag omitted. + +// se_ResourceGroupTags omitted. + +// se_RuleNameList omitted. + +// se_SetTagsForResourceRequest omitted. + +// se_SeverityList omitted. + +// se_StartAssessmentRunRequest omitted. + +// se_StopAssessmentRunRequest omitted. + +// se_SubscribeToEventRequest omitted. + +// se_Tag omitted. + +// se_TagList omitted. + /** - * deserializeAws_json1_1ListTagsForResourceResponse + * serializeAws_json1_1TimestampRange */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; +const se_TimestampRange = (input: TimestampRange, context: __SerdeContext): any => { + return take(input, { + beginDate: (_) => Math.round(_.getTime() / 1000), + endDate: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_UnsubscribeFromEventRequest omitted. + +// se_UpdateAssessmentTargetRequest omitted. + +// se_UserAttributeKeyList omitted. + +// se_UserAttributeList omitted. + +// de_AccessDeniedException omitted. + +// de_AddAttributesToFindingsResponse omitted. + +// de_AgentAlreadyRunningAssessment omitted. + +// de_AgentAlreadyRunningAssessmentList omitted. + +// de_AgentPreview omitted. + +// de_AgentPreviewList omitted. + +// de_AgentsAlreadyRunningAssessmentException omitted. + +// de_AssessmentRulesPackageArnList omitted. + /** - * deserializeAws_json1_1NetworkInterface + * deserializeAws_json1_1AssessmentRun */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - ipv6Addresses: output.ipv6Addresses != null ? de_Ipv6Addresses(output.ipv6Addresses, context) : undefined, - networkInterfaceId: __expectString(output.networkInterfaceId), - privateDnsName: __expectString(output.privateDnsName), - privateIpAddress: __expectString(output.privateIpAddress), - privateIpAddresses: - output.privateIpAddresses != null ? de_PrivateIpAddresses(output.privateIpAddresses, context) : undefined, - publicDnsName: __expectString(output.publicDnsName), - publicIp: __expectString(output.publicIp), - securityGroups: output.securityGroups != null ? de_SecurityGroups(output.securityGroups, context) : undefined, - subnetId: __expectString(output.subnetId), - vpcId: __expectString(output.vpcId), - } as any; +const de_AssessmentRun = (output: any, context: __SerdeContext): AssessmentRun => { + return take(output, { + arn: __expectString, + assessmentTemplateArn: __expectString, + completedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataCollected: __expectBoolean, + durationInSeconds: __expectInt32, + findingCounts: _json, + name: __expectString, + notifications: (_: any) => de_AssessmentRunNotificationList(_, context), + rulesPackageArns: _json, + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: __expectString, + stateChangedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateChanges: (_: any) => de_AssessmentRunStateChangeList(_, context), + userAttributesForFindings: _json, + }) as any; }; +// de_AssessmentRunAgent omitted. + +// de_AssessmentRunAgentList omitted. + +// de_AssessmentRunFindingCounts omitted. + +// de_AssessmentRunInProgressArnList omitted. + +// de_AssessmentRunInProgressException omitted. + /** - * deserializeAws_json1_1NetworkInterfaces + * deserializeAws_json1_1AssessmentRunList */ -const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { +const de_AssessmentRunList = (output: any, context: __SerdeContext): AssessmentRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); + return de_AssessmentRun(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1NoSuchEntityException - */ -const de_NoSuchEntityException = (output: any, context: __SerdeContext): NoSuchEntityException => { - return { - canRetry: __expectBoolean(output.canRetry), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1PreviewAgentsResponse - */ -const de_PreviewAgentsResponse = (output: any, context: __SerdeContext): PreviewAgentsResponse => { - return { - agentPreviews: output.agentPreviews != null ? de_AgentPreviewList(output.agentPreviews, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_1PreviewGenerationInProgressException - */ -const de_PreviewGenerationInProgressException = ( - output: any, - context: __SerdeContext -): PreviewGenerationInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1PrivateIp + * deserializeAws_json1_1AssessmentRunNotification */ -const de_PrivateIp = (output: any, context: __SerdeContext): PrivateIp => { - return { - privateDnsName: __expectString(output.privateDnsName), - privateIpAddress: __expectString(output.privateIpAddress), - } as any; +const de_AssessmentRunNotification = (output: any, context: __SerdeContext): AssessmentRunNotification => { + return take(output, { + date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + error: __expectBoolean, + event: __expectString, + message: __expectString, + snsPublishStatusCode: __expectString, + snsTopicArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PrivateIpAddresses + * deserializeAws_json1_1AssessmentRunNotificationList */ -const de_PrivateIpAddresses = (output: any, context: __SerdeContext): PrivateIp[] => { +const de_AssessmentRunNotificationList = (output: any, context: __SerdeContext): AssessmentRunNotification[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PrivateIp(entry, context); + return de_AssessmentRunNotification(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1RemoveAttributesFromFindingsResponse - */ -const de_RemoveAttributesFromFindingsResponse = ( - output: any, - context: __SerdeContext -): RemoveAttributesFromFindingsResponse => { - return { - failedItems: output.failedItems != null ? de_FailedItems(output.failedItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResourceGroup + * deserializeAws_json1_1AssessmentRunStateChange */ -const de_ResourceGroup = (output: any, context: __SerdeContext): ResourceGroup => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - tags: output.tags != null ? de_ResourceGroupTags(output.tags, context) : undefined, - } as any; +const de_AssessmentRunStateChange = (output: any, context: __SerdeContext): AssessmentRunStateChange => { + return take(output, { + state: __expectString, + stateChangedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ResourceGroupList + * deserializeAws_json1_1AssessmentRunStateChangeList */ -const de_ResourceGroupList = (output: any, context: __SerdeContext): ResourceGroup[] => { +const de_AssessmentRunStateChangeList = (output: any, context: __SerdeContext): AssessmentRunStateChange[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceGroup(entry, context); + return de_AssessmentRunStateChange(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceGroupTag + * deserializeAws_json1_1AssessmentTarget */ -const de_ResourceGroupTag = (output: any, context: __SerdeContext): ResourceGroupTag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; +const de_AssessmentTarget = (output: any, context: __SerdeContext): AssessmentTarget => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + resourceGroupArn: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ResourceGroupTags + * deserializeAws_json1_1AssessmentTargetList */ -const de_ResourceGroupTags = (output: any, context: __SerdeContext): ResourceGroupTag[] => { +const de_AssessmentTargetList = (output: any, context: __SerdeContext): AssessmentTarget[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceGroupTag(entry, context); + return de_AssessmentTarget(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1RulesPackage + * deserializeAws_json1_1AssessmentTemplate */ -const de_RulesPackage = (output: any, context: __SerdeContext): RulesPackage => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - name: __expectString(output.name), - provider: __expectString(output.provider), - version: __expectString(output.version), - } as any; +const de_AssessmentTemplate = (output: any, context: __SerdeContext): AssessmentTemplate => { + return take(output, { + arn: __expectString, + assessmentRunCount: __expectInt32, + assessmentTargetArn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + durationInSeconds: __expectInt32, + lastAssessmentRunArn: __expectString, + name: __expectString, + rulesPackageArns: _json, + userAttributesForFindings: _json, + }) as any; }; /** - * deserializeAws_json1_1RulesPackageList + * deserializeAws_json1_1AssessmentTemplateList */ -const de_RulesPackageList = (output: any, context: __SerdeContext): RulesPackage[] => { +const de_AssessmentTemplateList = (output: any, context: __SerdeContext): AssessmentTemplate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RulesPackage(entry, context); + return de_AssessmentTemplate(entry, context); }); return retVal; }; +// de_AssessmentTemplateRulesPackageArnList omitted. + +// de_AssetAttributes omitted. + +// de_Attribute omitted. + +// de_AttributeList omitted. + +// de_CreateAssessmentTargetResponse omitted. + +// de_CreateAssessmentTemplateResponse omitted. + +// de_CreateExclusionsPreviewResponse omitted. + +// de_CreateResourceGroupResponse omitted. + /** - * deserializeAws_json1_1Scope + * deserializeAws_json1_1DescribeAssessmentRunsResponse */ -const de_Scope = (output: any, context: __SerdeContext): Scope => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; +const de_DescribeAssessmentRunsResponse = (output: any, context: __SerdeContext): DescribeAssessmentRunsResponse => { + return take(output, { + assessmentRuns: (_: any) => de_AssessmentRunList(_, context), + failedItems: _json, + }) as any; }; /** - * deserializeAws_json1_1ScopeList + * deserializeAws_json1_1DescribeAssessmentTargetsResponse */ -const de_ScopeList = (output: any, context: __SerdeContext): Scope[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Scope(entry, context); - }); - return retVal; +const de_DescribeAssessmentTargetsResponse = ( + output: any, + context: __SerdeContext +): DescribeAssessmentTargetsResponse => { + return take(output, { + assessmentTargets: (_: any) => de_AssessmentTargetList(_, context), + failedItems: _json, + }) as any; }; /** - * deserializeAws_json1_1SecurityGroup + * deserializeAws_json1_1DescribeAssessmentTemplatesResponse */ -const de_SecurityGroup = (output: any, context: __SerdeContext): SecurityGroup => { - return { - groupId: __expectString(output.groupId), - groupName: __expectString(output.groupName), - } as any; +const de_DescribeAssessmentTemplatesResponse = ( + output: any, + context: __SerdeContext +): DescribeAssessmentTemplatesResponse => { + return take(output, { + assessmentTemplates: (_: any) => de_AssessmentTemplateList(_, context), + failedItems: _json, + }) as any; }; /** - * deserializeAws_json1_1SecurityGroups + * deserializeAws_json1_1DescribeCrossAccountAccessRoleResponse */ -const de_SecurityGroups = (output: any, context: __SerdeContext): SecurityGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityGroup(entry, context); - }); - return retVal; +const de_DescribeCrossAccountAccessRoleResponse = ( + output: any, + context: __SerdeContext +): DescribeCrossAccountAccessRoleResponse => { + return take(output, { + registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + valid: __expectBoolean, + }) as any; }; +// de_DescribeExclusionsResponse omitted. + /** - * deserializeAws_json1_1ServiceTemporarilyUnavailableException + * deserializeAws_json1_1DescribeFindingsResponse */ -const de_ServiceTemporarilyUnavailableException = ( - output: any, - context: __SerdeContext -): ServiceTemporarilyUnavailableException => { - return { - canRetry: __expectBoolean(output.canRetry), - message: __expectString(output.message), - } as any; +const de_DescribeFindingsResponse = (output: any, context: __SerdeContext): DescribeFindingsResponse => { + return take(output, { + failedItems: _json, + findings: (_: any) => de_FindingList(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartAssessmentRunResponse + * deserializeAws_json1_1DescribeResourceGroupsResponse */ -const de_StartAssessmentRunResponse = (output: any, context: __SerdeContext): StartAssessmentRunResponse => { - return { - assessmentRunArn: __expectString(output.assessmentRunArn), - } as any; +const de_DescribeResourceGroupsResponse = (output: any, context: __SerdeContext): DescribeResourceGroupsResponse => { + return take(output, { + failedItems: _json, + resourceGroups: (_: any) => de_ResourceGroupList(_, context), + }) as any; }; +// de_DescribeRulesPackagesResponse omitted. + /** - * deserializeAws_json1_1Subscription + * deserializeAws_json1_1EventSubscription */ -const de_Subscription = (output: any, context: __SerdeContext): Subscription => { - return { - eventSubscriptions: - output.eventSubscriptions != null ? de_EventSubscriptionList(output.eventSubscriptions, context) : undefined, - resourceArn: __expectString(output.resourceArn), - topicArn: __expectString(output.topicArn), - } as any; +const de_EventSubscription = (output: any, context: __SerdeContext): EventSubscription => { + return take(output, { + event: __expectString, + subscribedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1SubscriptionList + * deserializeAws_json1_1EventSubscriptionList */ -const de_SubscriptionList = (output: any, context: __SerdeContext): Subscription[] => { +const de_EventSubscriptionList = (output: any, context: __SerdeContext): EventSubscription[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subscription(entry, context); + return de_EventSubscription(entry, context); }); return retVal; }; +// de_Exclusion omitted. + +// de_ExclusionMap omitted. + +// de_ExclusionPreview omitted. + +// de_ExclusionPreviewList omitted. + +// de_FailedItemDetails omitted. + +// de_FailedItems omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1Finding */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; +const de_Finding = (output: any, context: __SerdeContext): Finding => { + return take(output, { + arn: __expectString, + assetAttributes: _json, + assetType: __expectString, + attributes: _json, + confidence: __expectInt32, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + indicatorOfCompromise: __expectBoolean, + numericSeverity: __limitedParseDouble, + recommendation: __expectString, + schemaVersion: __expectInt32, + service: __expectString, + serviceAttributes: _json, + severity: __expectString, + title: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + userAttributes: _json, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1FindingList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_FindingList = (output: any, context: __SerdeContext): Finding[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_Finding(entry, context); }); return retVal; }; +// de_GetAssessmentReportResponse omitted. + +// de_GetExclusionsPreviewResponse omitted. + +// de_GetTelemetryMetadataResponse omitted. + +// de_InspectorServiceAttributes omitted. + +// de_InternalException omitted. + +// de_InvalidCrossAccountRoleException omitted. + +// de_InvalidInputException omitted. + +// de_Ipv4AddressList omitted. + +// de_Ipv6Addresses omitted. + +// de_LimitExceededException omitted. + +// de_ListAssessmentRunAgentsResponse omitted. + +// de_ListAssessmentRunsResponse omitted. + +// de_ListAssessmentTargetsResponse omitted. + +// de_ListAssessmentTemplatesResponse omitted. + /** - * deserializeAws_json1_1Tags + * deserializeAws_json1_1ListEventSubscriptionsResponse */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_ListEventSubscriptionsResponse = (output: any, context: __SerdeContext): ListEventSubscriptionsResponse => { + return take(output, { + nextToken: __expectString, + subscriptions: (_: any) => de_SubscriptionList(_, context), + }) as any; }; +// de_ListExclusionsResponse omitted. + +// de_ListFindingsResponse omitted. + +// de_ListReturnedArnList omitted. + +// de_ListRulesPackagesResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_NetworkInterface omitted. + +// de_NetworkInterfaces omitted. + +// de_NoSuchEntityException omitted. + +// de_PreviewAgentsResponse omitted. + +// de_PreviewGenerationInProgressException omitted. + +// de_PrivateIp omitted. + +// de_PrivateIpAddresses omitted. + +// de_RemoveAttributesFromFindingsResponse omitted. + /** - * deserializeAws_json1_1TelemetryMetadata + * deserializeAws_json1_1ResourceGroup */ -const de_TelemetryMetadata = (output: any, context: __SerdeContext): TelemetryMetadata => { - return { - count: __expectLong(output.count), - dataSize: __expectLong(output.dataSize), - messageType: __expectString(output.messageType), - } as any; +const de_ResourceGroup = (output: any, context: __SerdeContext): ResourceGroup => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + }) as any; }; /** - * deserializeAws_json1_1TelemetryMetadataList + * deserializeAws_json1_1ResourceGroupList */ -const de_TelemetryMetadataList = (output: any, context: __SerdeContext): TelemetryMetadata[] => { +const de_ResourceGroupList = (output: any, context: __SerdeContext): ResourceGroup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TelemetryMetadata(entry, context); + return de_ResourceGroup(entry, context); }); return retVal; }; +// de_ResourceGroupTag omitted. + +// de_ResourceGroupTags omitted. + +// de_RulesPackage omitted. + +// de_RulesPackageList omitted. + +// de_Scope omitted. + +// de_ScopeList omitted. + +// de_SecurityGroup omitted. + +// de_SecurityGroups omitted. + +// de_ServiceTemporarilyUnavailableException omitted. + +// de_StartAssessmentRunResponse omitted. + /** - * deserializeAws_json1_1UnsupportedFeatureException + * deserializeAws_json1_1Subscription */ -const de_UnsupportedFeatureException = (output: any, context: __SerdeContext): UnsupportedFeatureException => { - return { - canRetry: __expectBoolean(output.canRetry), - message: __expectString(output.message), - } as any; +const de_Subscription = (output: any, context: __SerdeContext): Subscription => { + return take(output, { + eventSubscriptions: (_: any) => de_EventSubscriptionList(_, context), + resourceArn: __expectString, + topicArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UserAttributeList + * deserializeAws_json1_1SubscriptionList */ -const de_UserAttributeList = (output: any, context: __SerdeContext): Attribute[] => { +const de_SubscriptionList = (output: any, context: __SerdeContext): Subscription[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); + return de_Subscription(entry, context); }); return retVal; }; +// de_Tag omitted. + +// de_TagList omitted. + +// de_Tags omitted. + +// de_TelemetryMetadata omitted. + +// de_TelemetryMetadataList omitted. + +// de_UnsupportedFeatureException omitted. + +// de_UserAttributeList omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -5042,6 +3585,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-inspector2/src/protocols/Aws_restJson1.ts b/clients/client-inspector2/src/protocols/Aws_restJson1.ts index ff2d4563bb06..8bce0121df11 100644 --- a/clients/client-inspector2/src/protocols/Aws_restJson1.ts +++ b/clients/client-inspector2/src/protocols/Aws_restJson1.ts @@ -1,9 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -12,12 +12,13 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -109,101 +110,61 @@ import { import { Inspector2ServiceException as __BaseException } from "../models/Inspector2ServiceException"; import { AccessDeniedException, - Account, AccountAggregation, - AccountAggregationResponse, - AccountState, AggregationRequest, AggregationResponse, AmiAggregation, - AmiAggregationResponse, - Architecture, AutoEnable, AwsEc2InstanceDetails, AwsEcrContainerAggregation, - AwsEcrContainerAggregationResponse, AwsEcrContainerImageDetails, AwsLambdaFunctionDetails, BadRequestException, ConflictException, - Counts, CoverageFilterCriteria, CoverageMapFilter, CoverageStringFilter, - CoveredResource, CvssScore, - CvssScoreAdjustment, CvssScoreDetails, DateFilter, - DelegatedAdmin, - DelegatedAdminAccount, Destination, Ec2InstanceAggregation, - Ec2InstanceAggregationResponse, - Ec2Metadata, EcrConfiguration, EcrConfigurationState, - EcrContainerImageMetadata, - EcrRepositoryMetadata, EcrRescanDurationState, ExploitabilityDetails, - FailedAccount, Filter, FilterCriteria, Finding, FindingTypeAggregation, - FindingTypeAggregationResponse, FreeTrialAccountInfo, FreeTrialInfo, - FreeTrialInfoError, ImageLayerAggregation, - ImageLayerAggregationResponse, InspectorScoreDetails, InternalServerException, LambdaFunctionAggregation, LambdaFunctionAggregationResponse, - LambdaFunctionMetadata, LambdaLayerAggregation, - LambdaLayerAggregationResponse, - LambdaVpcConfig, MapFilter, Member, - NetworkPath, - NetworkReachabilityDetails, NumberFilter, PackageAggregation, - PackageAggregationResponse, PackageFilter, PackageVulnerabilityDetails, - Permission, - PortRange, PortRangeFilter, - Recommendation, - Remediation, RepositoryAggregation, - RepositoryAggregationResponse, Resource, ResourceDetails, ResourceNotFoundException, - ResourceScanMetadata, ResourceScanType, - ResourceState, - ResourceStatus, - ScanStatus, ServiceQuotaExceededException, - SeverityCounts, SortCriteria, - State, - Step, StringFilter, ThrottlingException, TitleAggregation, - TitleAggregationResponse, Usage, UsageTotal, ValidationException, - ValidationExceptionField, - VulnerablePackage, } from "../models/models_0"; /** @@ -219,9 +180,11 @@ export const se_AssociateMemberCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/associate"; let body: any; - body = JSON.stringify({ - ...(input.accountId != null && { accountId: input.accountId }), - }); + body = JSON.stringify( + take(input, { + accountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -246,9 +209,11 @@ export const se_BatchGetAccountStatusCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/status/batch/get"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se_AccountIdSet(input.accountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -274,9 +239,11 @@ export const se_BatchGetFreeTrialInfoCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/freetrialinfo/batchget"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se_MeteringAccountIdList(input.accountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -301,9 +268,11 @@ export const se_CancelFindingsReportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/cancel"; let body: any; - body = JSON.stringify({ - ...(input.reportId != null && { reportId: input.reportId }), - }); + body = JSON.stringify( + take(input, { + reportId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,14 +297,16 @@ export const se_CreateFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/create"; let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - ...(input.description != null && { description: input.description }), - ...(input.filterCriteria != null && { filterCriteria: se_FilterCriteria(input.filterCriteria, context) }), - ...(input.name != null && { name: input.name }), - ...(input.reason != null && { reason: input.reason }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + action: [], + description: [], + filterCriteria: (_) => se_FilterCriteria(_, context), + name: [], + reason: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -360,11 +331,13 @@ export const se_CreateFindingsReportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/create"; let body: any; - body = JSON.stringify({ - ...(input.filterCriteria != null && { filterCriteria: se_FilterCriteria(input.filterCriteria, context) }), - ...(input.reportFormat != null && { reportFormat: input.reportFormat }), - ...(input.s3Destination != null && { s3Destination: se_Destination(input.s3Destination, context) }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: (_) => se_FilterCriteria(_, context), + reportFormat: [], + s3Destination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -389,9 +362,11 @@ export const se_DeleteFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/delete"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -442,10 +417,12 @@ export const se_DisableCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disable"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se_AccountIdSet(input.accountIds, context) }), - ...(input.resourceTypes != null && { resourceTypes: se_DisableResourceTypeList(input.resourceTypes, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + resourceTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -471,9 +448,11 @@ export const se_DisableDelegatedAdminAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/disable"; let body: any; - body = JSON.stringify({ - ...(input.delegatedAdminAccountId != null && { delegatedAdminAccountId: input.delegatedAdminAccountId }), - }); + body = JSON.stringify( + take(input, { + delegatedAdminAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -498,9 +477,11 @@ export const se_DisassociateMemberCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/disassociate"; let body: any; - body = JSON.stringify({ - ...(input.accountId != null && { accountId: input.accountId }), - }); + body = JSON.stringify( + take(input, { + accountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -522,11 +503,13 @@ export const se_EnableCommand = async (input: EnableCommandInput, context: __Ser }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/enable"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se_AccountIdSet(input.accountIds, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.resourceTypes != null && { resourceTypes: se_EnableResourceTypeList(input.resourceTypes, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + resourceTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -552,10 +535,12 @@ export const se_EnableDelegatedAdminAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/enable"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.delegatedAdminAccountId != null && { delegatedAdminAccountId: input.delegatedAdminAccountId }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + delegatedAdminAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -631,9 +616,11 @@ export const se_GetFindingsReportStatusCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reporting/status/get"; let body: any; - body = JSON.stringify({ - ...(input.reportId != null && { reportId: input.reportId }), - }); + body = JSON.stringify( + take(input, { + reportId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -658,9 +645,11 @@ export const se_GetMemberCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/get"; let body: any; - body = JSON.stringify({ - ...(input.accountId != null && { accountId: input.accountId }), - }); + body = JSON.stringify( + take(input, { + accountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -686,11 +675,13 @@ export const se_ListAccountPermissionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accountpermissions/list"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.service != null && { service: input.service }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + service: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -715,11 +706,13 @@ export const se_ListCoverageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/list"; let body: any; - body = JSON.stringify({ - ...(input.filterCriteria != null && { filterCriteria: se_CoverageFilterCriteria(input.filterCriteria, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -745,11 +738,13 @@ export const se_ListCoverageStatisticsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/coverage/statistics/list"; let body: any; - body = JSON.stringify({ - ...(input.filterCriteria != null && { filterCriteria: se_CoverageFilterCriteria(input.filterCriteria, context) }), - ...(input.groupBy != null && { groupBy: input.groupBy }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: (_) => _json(_), + groupBy: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -775,10 +770,12 @@ export const se_ListDelegatedAdminAccountsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delegatedadminaccounts/list"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -803,12 +800,14 @@ export const se_ListFiltersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/list"; let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - ...(input.arns != null && { arns: se_FilterArnList(input.arns, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + action: [], + arns: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -834,15 +833,15 @@ export const se_ListFindingAggregationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/aggregation/list"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se_StringFilterList(input.accountIds, context) }), - ...(input.aggregationRequest != null && { - aggregationRequest: se_AggregationRequest(input.aggregationRequest, context), - }), - ...(input.aggregationType != null && { aggregationType: input.aggregationType }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + aggregationRequest: (_) => _json(_), + aggregationType: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -867,12 +866,14 @@ export const se_ListFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/list"; let body: any; - body = JSON.stringify({ - ...(input.filterCriteria != null && { filterCriteria: se_FilterCriteria(input.filterCriteria, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortCriteria != null && { sortCriteria: se_SortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: (_) => se_FilterCriteria(_, context), + maxResults: [], + nextToken: [], + sortCriteria: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -897,11 +898,13 @@ export const se_ListMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/list"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.onlyAssociated != null && { onlyAssociated: input.onlyAssociated }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + onlyAssociated: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -949,11 +952,13 @@ export const se_ListUsageTotalsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usage/list"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se_UsageAccountIdList(input.accountIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + accountIds: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -979,9 +984,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1036,9 +1043,11 @@ export const se_UpdateConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/update"; let body: any; - body = JSON.stringify({ - ...(input.ecrConfiguration != null && { ecrConfiguration: se_EcrConfiguration(input.ecrConfiguration, context) }), - }); + body = JSON.stringify( + take(input, { + ecrConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1063,14 +1072,16 @@ export const se_UpdateFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/filters/update"; let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - ...(input.description != null && { description: input.description }), - ...(input.filterArn != null && { filterArn: input.filterArn }), - ...(input.filterCriteria != null && { filterCriteria: se_FilterCriteria(input.filterCriteria, context) }), - ...(input.name != null && { name: input.name }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + action: [], + description: [], + filterArn: [], + filterCriteria: (_) => se_FilterCriteria(_, context), + name: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1096,9 +1107,11 @@ export const se_UpdateOrganizationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizationconfiguration/update"; let body: any; - body = JSON.stringify({ - ...(input.autoEnable != null && { autoEnable: se_AutoEnable(input.autoEnable, context) }), - }); + body = JSON.stringify( + take(input, { + autoEnable: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1124,9 +1137,10 @@ export const de_AssociateMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountId != null) { - contents.accountId = __expectString(data.accountId); - } + const doc = take(data, { + accountId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1157,10 +1171,9 @@ const de_AssociateMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1180,12 +1193,11 @@ export const de_BatchGetAccountStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accounts != null) { - contents.accounts = de_AccountStateList(data.accounts, context); - } - if (data.failedAccounts != null) { - contents.failedAccounts = de_FailedAccountList(data.failedAccounts, context); - } + const doc = take(data, { + accounts: _json, + failedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1219,10 +1231,9 @@ const de_BatchGetAccountStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1242,12 +1253,11 @@ export const de_BatchGetFreeTrialInfoCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accounts != null) { - contents.accounts = de_FreeTrialAccountInfoList(data.accounts, context); - } - if (data.failedAccounts != null) { - contents.failedAccounts = de_FreeTrialInfoErrorList(data.failedAccounts, context); - } + const doc = take(data, { + accounts: (_) => de_FreeTrialAccountInfoList(_, context), + failedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1278,10 +1288,9 @@ const de_BatchGetFreeTrialInfoCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,9 +1310,10 @@ export const de_CancelFindingsReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } + const doc = take(data, { + reportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1337,10 +1347,9 @@ const de_CancelFindingsReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1360,9 +1369,10 @@ export const de_CreateFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1399,10 +1409,9 @@ const de_CreateFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1422,9 +1431,10 @@ export const de_CreateFindingsReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } + const doc = take(data, { + reportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1458,10 +1468,9 @@ const de_CreateFindingsReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1481,9 +1490,10 @@ export const de_DeleteFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1517,10 +1527,9 @@ const de_DeleteFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1540,12 +1549,11 @@ export const de_DescribeOrganizationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoEnable != null) { - contents.autoEnable = de_AutoEnable(data.autoEnable, context); - } - if (data.maxAccountLimitReached != null) { - contents.maxAccountLimitReached = __expectBoolean(data.maxAccountLimitReached); - } + const doc = take(data, { + autoEnable: _json, + maxAccountLimitReached: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1576,10 +1584,9 @@ const de_DescribeOrganizationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1599,12 +1606,11 @@ export const de_DisableCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accounts != null) { - contents.accounts = de_AccountList(data.accounts, context); - } - if (data.failedAccounts != null) { - contents.failedAccounts = de_FailedAccountList(data.failedAccounts, context); - } + const doc = take(data, { + accounts: _json, + failedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1638,10 +1644,9 @@ const de_DisableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1661,9 +1666,10 @@ export const de_DisableDelegatedAdminAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.delegatedAdminAccountId != null) { - contents.delegatedAdminAccountId = __expectString(data.delegatedAdminAccountId); - } + const doc = take(data, { + delegatedAdminAccountId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1700,10 +1706,9 @@ const de_DisableDelegatedAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1723,9 +1728,10 @@ export const de_DisassociateMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountId != null) { - contents.accountId = __expectString(data.accountId); - } + const doc = take(data, { + accountId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1756,10 +1762,9 @@ const de_DisassociateMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1779,12 +1784,11 @@ export const de_EnableCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accounts != null) { - contents.accounts = de_AccountList(data.accounts, context); - } - if (data.failedAccounts != null) { - contents.failedAccounts = de_FailedAccountList(data.failedAccounts, context); - } + const doc = take(data, { + accounts: _json, + failedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1815,10 +1819,9 @@ const de_EnableCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1838,9 +1841,10 @@ export const de_EnableDelegatedAdminAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.delegatedAdminAccountId != null) { - contents.delegatedAdminAccountId = __expectString(data.delegatedAdminAccountId); - } + const doc = take(data, { + delegatedAdminAccountId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1877,10 +1881,9 @@ const de_EnableDelegatedAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1900,9 +1903,10 @@ export const de_GetConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ecrConfiguration != null) { - contents.ecrConfiguration = de_EcrConfigurationState(data.ecrConfiguration, context); - } + const doc = take(data, { + ecrConfiguration: (_) => de_EcrConfigurationState(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1930,10 +1934,9 @@ const de_GetConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1953,9 +1956,10 @@ export const de_GetDelegatedAdminAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.delegatedAdmin != null) { - contents.delegatedAdmin = de_DelegatedAdmin(data.delegatedAdmin, context); - } + const doc = take(data, { + delegatedAdmin: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1989,10 +1993,9 @@ const de_GetDelegatedAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2012,24 +2015,15 @@ export const de_GetFindingsReportStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.destination != null) { - contents.destination = de_Destination(data.destination, context); - } - if (data.errorCode != null) { - contents.errorCode = __expectString(data.errorCode); - } - if (data.errorMessage != null) { - contents.errorMessage = __expectString(data.errorMessage); - } - if (data.filterCriteria != null) { - contents.filterCriteria = de_FilterCriteria(data.filterCriteria, context); - } - if (data.reportId != null) { - contents.reportId = __expectString(data.reportId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + destination: _json, + errorCode: __expectString, + errorMessage: __expectString, + filterCriteria: (_) => de_FilterCriteria(_, context), + reportId: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2063,10 +2057,9 @@ const de_GetFindingsReportStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2086,9 +2079,10 @@ export const de_GetMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.member != null) { - contents.member = de_Member(data.member, context); - } + const doc = take(data, { + member: (_) => de_Member(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2122,10 +2116,9 @@ const de_GetMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2145,12 +2138,11 @@ export const de_ListAccountPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissions != null) { - contents.permissions = de_Permissions(data.permissions, context); - } + const doc = take(data, { + nextToken: __expectString, + permissions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2181,10 +2173,9 @@ const de_ListAccountPermissionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2204,12 +2195,11 @@ export const de_ListCoverageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.coveredResources != null) { - contents.coveredResources = de_CoveredResources(data.coveredResources, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + coveredResources: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2237,10 +2227,9 @@ const de_ListCoverageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2260,15 +2249,12 @@ export const de_ListCoverageStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.countsByGroup != null) { - contents.countsByGroup = de_CountsList(data.countsByGroup, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.totalCounts != null) { - contents.totalCounts = __expectLong(data.totalCounts); - } + const doc = take(data, { + countsByGroup: _json, + nextToken: __expectString, + totalCounts: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -2296,10 +2282,9 @@ const de_ListCoverageStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2319,12 +2304,11 @@ export const de_ListDelegatedAdminAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.delegatedAdminAccounts != null) { - contents.delegatedAdminAccounts = de_DelegatedAdminAccountList(data.delegatedAdminAccounts, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + delegatedAdminAccounts: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2355,10 +2339,9 @@ const de_ListDelegatedAdminAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2378,12 +2361,11 @@ export const de_ListFiltersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.filters != null) { - contents.filters = de_FilterList(data.filters, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + filters: (_) => de_FilterList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2414,10 +2396,9 @@ const de_ListFiltersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2437,15 +2418,12 @@ export const de_ListFindingAggregationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.aggregationType != null) { - contents.aggregationType = __expectString(data.aggregationType); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.responses != null) { - contents.responses = de_AggregationResponseList(data.responses, context); - } + const doc = take(data, { + aggregationType: __expectString, + nextToken: __expectString, + responses: (_) => de_AggregationResponseList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2473,10 +2451,9 @@ const de_ListFindingAggregationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2496,12 +2473,11 @@ export const de_ListFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de_FindingList(data.findings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findings: (_) => de_FindingList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2529,10 +2505,9 @@ const de_ListFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2552,12 +2527,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.members = de_MemberList(data.members, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + members: (_) => de_MemberList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2588,10 +2562,9 @@ const de_ListMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2611,9 +2584,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2644,10 +2618,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2667,12 +2640,11 @@ export const de_ListUsageTotalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.totals != null) { - contents.totals = de_UsageTotalList(data.totals, context); - } + const doc = take(data, { + nextToken: __expectString, + totals: (_) => de_UsageTotalList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2703,10 +2675,9 @@ const de_ListUsageTotalsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2759,10 +2730,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2812,10 +2782,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2865,10 +2834,9 @@ const de_UpdateConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2888,9 +2856,10 @@ export const de_UpdateFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2924,10 +2893,9 @@ const de_UpdateFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2947,9 +2915,10 @@ export const de_UpdateOrganizationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoEnable != null) { - contents.autoEnable = de_AutoEnable(data.autoEnable, context); - } + const doc = take(data, { + autoEnable: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2980,16 +2949,15 @@ const de_UpdateOrganizationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2999,9 +2967,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3015,9 +2984,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3031,15 +3001,12 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3061,9 +3028,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3080,9 +3048,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3099,12 +3068,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3123,9 +3091,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3139,15 +3108,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fields != null) { - contents.fields = de_ValidationExceptionFields(data.fields, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fields: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3155,169 +3121,36 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountAggregation - */ -const se_AccountAggregation = (input: AccountAggregation, context: __SerdeContext): any => { - return { - ...(input.findingType != null && { findingType: input.findingType }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_AccountAggregation omitted. -/** - * serializeAws_restJson1AccountIdSet - */ -const se_AccountIdSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdSet omitted. -/** - * serializeAws_restJson1AggregationRequest - */ -const se_AggregationRequest = (input: AggregationRequest, context: __SerdeContext): any => { - return AggregationRequest.visit(input, { - accountAggregation: (value) => ({ accountAggregation: se_AccountAggregation(value, context) }), - amiAggregation: (value) => ({ amiAggregation: se_AmiAggregation(value, context) }), - awsEcrContainerAggregation: (value) => ({ - awsEcrContainerAggregation: se_AwsEcrContainerAggregation(value, context), - }), - ec2InstanceAggregation: (value) => ({ ec2InstanceAggregation: se_Ec2InstanceAggregation(value, context) }), - findingTypeAggregation: (value) => ({ findingTypeAggregation: se_FindingTypeAggregation(value, context) }), - imageLayerAggregation: (value) => ({ imageLayerAggregation: se_ImageLayerAggregation(value, context) }), - lambdaFunctionAggregation: (value) => ({ lambdaFunctionAggregation: se_LambdaFunctionAggregation(value, context) }), - lambdaLayerAggregation: (value) => ({ lambdaLayerAggregation: se_LambdaLayerAggregation(value, context) }), - packageAggregation: (value) => ({ packageAggregation: se_PackageAggregation(value, context) }), - repositoryAggregation: (value) => ({ repositoryAggregation: se_RepositoryAggregation(value, context) }), - titleAggregation: (value) => ({ titleAggregation: se_TitleAggregation(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_AggregationRequest omitted. -/** - * serializeAws_restJson1AmiAggregation - */ -const se_AmiAggregation = (input: AmiAggregation, context: __SerdeContext): any => { - return { - ...(input.amis != null && { amis: se_StringFilterList(input.amis, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_AmiAggregation omitted. -/** - * serializeAws_restJson1AutoEnable - */ -const se_AutoEnable = (input: AutoEnable, context: __SerdeContext): any => { - return { - ...(input.ec2 != null && { ec2: input.ec2 }), - ...(input.ecr != null && { ecr: input.ecr }), - ...(input.lambda != null && { lambda: input.lambda }), - }; -}; +// se_AutoEnable omitted. -/** - * serializeAws_restJson1AwsEcrContainerAggregation - */ -const se_AwsEcrContainerAggregation = (input: AwsEcrContainerAggregation, context: __SerdeContext): any => { - return { - ...(input.architectures != null && { architectures: se_StringFilterList(input.architectures, context) }), - ...(input.imageShas != null && { imageShas: se_StringFilterList(input.imageShas, context) }), - ...(input.imageTags != null && { imageTags: se_StringFilterList(input.imageTags, context) }), - ...(input.repositories != null && { repositories: se_StringFilterList(input.repositories, context) }), - ...(input.resourceIds != null && { resourceIds: se_StringFilterList(input.resourceIds, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_AwsEcrContainerAggregation omitted. -/** - * serializeAws_restJson1CoverageFilterCriteria - */ -const se_CoverageFilterCriteria = (input: CoverageFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.accountId != null && { accountId: se_CoverageStringFilterList(input.accountId, context) }), - ...(input.ec2InstanceTags != null && { ec2InstanceTags: se_CoverageMapFilterList(input.ec2InstanceTags, context) }), - ...(input.ecrImageTags != null && { ecrImageTags: se_CoverageStringFilterList(input.ecrImageTags, context) }), - ...(input.ecrRepositoryName != null && { - ecrRepositoryName: se_CoverageStringFilterList(input.ecrRepositoryName, context), - }), - ...(input.lambdaFunctionName != null && { - lambdaFunctionName: se_CoverageStringFilterList(input.lambdaFunctionName, context), - }), - ...(input.lambdaFunctionRuntime != null && { - lambdaFunctionRuntime: se_CoverageStringFilterList(input.lambdaFunctionRuntime, context), - }), - ...(input.lambdaFunctionTags != null && { - lambdaFunctionTags: se_CoverageMapFilterList(input.lambdaFunctionTags, context), - }), - ...(input.resourceId != null && { resourceId: se_CoverageStringFilterList(input.resourceId, context) }), - ...(input.resourceType != null && { resourceType: se_CoverageStringFilterList(input.resourceType, context) }), - ...(input.scanStatusCode != null && { scanStatusCode: se_CoverageStringFilterList(input.scanStatusCode, context) }), - ...(input.scanStatusReason != null && { - scanStatusReason: se_CoverageStringFilterList(input.scanStatusReason, context), - }), - ...(input.scanType != null && { scanType: se_CoverageStringFilterList(input.scanType, context) }), - }; -}; +// se_CoverageFilterCriteria omitted. -/** - * serializeAws_restJson1CoverageMapFilter - */ -const se_CoverageMapFilter = (input: CoverageMapFilter, context: __SerdeContext): any => { - return { - ...(input.comparison != null && { comparison: input.comparison }), - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_CoverageMapFilter omitted. -/** - * serializeAws_restJson1CoverageMapFilterList - */ -const se_CoverageMapFilterList = (input: CoverageMapFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CoverageMapFilter(entry, context); - }); -}; +// se_CoverageMapFilterList omitted. -/** - * serializeAws_restJson1CoverageStringFilter - */ -const se_CoverageStringFilter = (input: CoverageStringFilter, context: __SerdeContext): any => { - return { - ...(input.comparison != null && { comparison: input.comparison }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_CoverageStringFilter omitted. -/** - * serializeAws_restJson1CoverageStringFilterList - */ -const se_CoverageStringFilterList = (input: CoverageStringFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CoverageStringFilter(entry, context); - }); -}; +// se_CoverageStringFilterList omitted. /** * serializeAws_restJson1DateFilter */ const se_DateFilter = (input: DateFilter, context: __SerdeContext): any => { - return { - ...(input.endInclusive != null && { endInclusive: Math.round(input.endInclusive.getTime() / 1000) }), - ...(input.startInclusive != null && { startInclusive: Math.round(input.startInclusive.getTime() / 1000) }), - }; + return take(input, { + endInclusive: (_) => Math.round(_.getTime() / 1000), + startInclusive: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -3331,236 +3164,86 @@ const se_DateFilterList = (input: DateFilter[], context: __SerdeContext): any => }); }; -/** - * serializeAws_restJson1Destination - */ -const se_Destination = (input: Destination, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - }; -}; +// se_Destination omitted. -/** - * serializeAws_restJson1DisableResourceTypeList - */ -const se_DisableResourceTypeList = (input: (ResourceScanType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DisableResourceTypeList omitted. -/** - * serializeAws_restJson1Ec2InstanceAggregation - */ -const se_Ec2InstanceAggregation = (input: Ec2InstanceAggregation, context: __SerdeContext): any => { - return { - ...(input.amis != null && { amis: se_StringFilterList(input.amis, context) }), - ...(input.instanceIds != null && { instanceIds: se_StringFilterList(input.instanceIds, context) }), - ...(input.instanceTags != null && { instanceTags: se_MapFilterList(input.instanceTags, context) }), - ...(input.operatingSystems != null && { operatingSystems: se_StringFilterList(input.operatingSystems, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_Ec2InstanceAggregation omitted. -/** - * serializeAws_restJson1EcrConfiguration - */ -const se_EcrConfiguration = (input: EcrConfiguration, context: __SerdeContext): any => { - return { - ...(input.rescanDuration != null && { rescanDuration: input.rescanDuration }), - }; -}; +// se_EcrConfiguration omitted. -/** - * serializeAws_restJson1EnableResourceTypeList - */ -const se_EnableResourceTypeList = (input: (ResourceScanType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EnableResourceTypeList omitted. -/** - * serializeAws_restJson1FilterArnList - */ -const se_FilterArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterArnList omitted. /** * serializeAws_restJson1FilterCriteria */ const se_FilterCriteria = (input: FilterCriteria, context: __SerdeContext): any => { - return { - ...(input.awsAccountId != null && { awsAccountId: se_StringFilterList(input.awsAccountId, context) }), - ...(input.componentId != null && { componentId: se_StringFilterList(input.componentId, context) }), - ...(input.componentType != null && { componentType: se_StringFilterList(input.componentType, context) }), - ...(input.ec2InstanceImageId != null && { - ec2InstanceImageId: se_StringFilterList(input.ec2InstanceImageId, context), - }), - ...(input.ec2InstanceSubnetId != null && { - ec2InstanceSubnetId: se_StringFilterList(input.ec2InstanceSubnetId, context), - }), - ...(input.ec2InstanceVpcId != null && { ec2InstanceVpcId: se_StringFilterList(input.ec2InstanceVpcId, context) }), - ...(input.ecrImageArchitecture != null && { - ecrImageArchitecture: se_StringFilterList(input.ecrImageArchitecture, context), - }), - ...(input.ecrImageHash != null && { ecrImageHash: se_StringFilterList(input.ecrImageHash, context) }), - ...(input.ecrImagePushedAt != null && { ecrImagePushedAt: se_DateFilterList(input.ecrImagePushedAt, context) }), - ...(input.ecrImageRegistry != null && { ecrImageRegistry: se_StringFilterList(input.ecrImageRegistry, context) }), - ...(input.ecrImageRepositoryName != null && { - ecrImageRepositoryName: se_StringFilterList(input.ecrImageRepositoryName, context), - }), - ...(input.ecrImageTags != null && { ecrImageTags: se_StringFilterList(input.ecrImageTags, context) }), - ...(input.exploitAvailable != null && { exploitAvailable: se_StringFilterList(input.exploitAvailable, context) }), - ...(input.findingArn != null && { findingArn: se_StringFilterList(input.findingArn, context) }), - ...(input.findingStatus != null && { findingStatus: se_StringFilterList(input.findingStatus, context) }), - ...(input.findingType != null && { findingType: se_StringFilterList(input.findingType, context) }), - ...(input.firstObservedAt != null && { firstObservedAt: se_DateFilterList(input.firstObservedAt, context) }), - ...(input.fixAvailable != null && { fixAvailable: se_StringFilterList(input.fixAvailable, context) }), - ...(input.inspectorScore != null && { inspectorScore: se_NumberFilterList(input.inspectorScore, context) }), - ...(input.lambdaFunctionExecutionRoleArn != null && { - lambdaFunctionExecutionRoleArn: se_StringFilterList(input.lambdaFunctionExecutionRoleArn, context), - }), - ...(input.lambdaFunctionLastModifiedAt != null && { - lambdaFunctionLastModifiedAt: se_DateFilterList(input.lambdaFunctionLastModifiedAt, context), - }), - ...(input.lambdaFunctionLayers != null && { - lambdaFunctionLayers: se_StringFilterList(input.lambdaFunctionLayers, context), - }), - ...(input.lambdaFunctionName != null && { - lambdaFunctionName: se_StringFilterList(input.lambdaFunctionName, context), - }), - ...(input.lambdaFunctionRuntime != null && { - lambdaFunctionRuntime: se_StringFilterList(input.lambdaFunctionRuntime, context), - }), - ...(input.lastObservedAt != null && { lastObservedAt: se_DateFilterList(input.lastObservedAt, context) }), - ...(input.networkProtocol != null && { networkProtocol: se_StringFilterList(input.networkProtocol, context) }), - ...(input.portRange != null && { portRange: se_PortRangeFilterList(input.portRange, context) }), - ...(input.relatedVulnerabilities != null && { - relatedVulnerabilities: se_StringFilterList(input.relatedVulnerabilities, context), - }), - ...(input.resourceId != null && { resourceId: se_StringFilterList(input.resourceId, context) }), - ...(input.resourceTags != null && { resourceTags: se_MapFilterList(input.resourceTags, context) }), - ...(input.resourceType != null && { resourceType: se_StringFilterList(input.resourceType, context) }), - ...(input.severity != null && { severity: se_StringFilterList(input.severity, context) }), - ...(input.title != null && { title: se_StringFilterList(input.title, context) }), - ...(input.updatedAt != null && { updatedAt: se_DateFilterList(input.updatedAt, context) }), - ...(input.vendorSeverity != null && { vendorSeverity: se_StringFilterList(input.vendorSeverity, context) }), - ...(input.vulnerabilityId != null && { vulnerabilityId: se_StringFilterList(input.vulnerabilityId, context) }), - ...(input.vulnerabilitySource != null && { - vulnerabilitySource: se_StringFilterList(input.vulnerabilitySource, context), - }), - ...(input.vulnerablePackages != null && { - vulnerablePackages: se_PackageFilterList(input.vulnerablePackages, context), - }), - }; + return take(input, { + awsAccountId: _json, + componentId: _json, + componentType: _json, + ec2InstanceImageId: _json, + ec2InstanceSubnetId: _json, + ec2InstanceVpcId: _json, + ecrImageArchitecture: _json, + ecrImageHash: _json, + ecrImagePushedAt: (_) => se_DateFilterList(_, context), + ecrImageRegistry: _json, + ecrImageRepositoryName: _json, + ecrImageTags: _json, + exploitAvailable: _json, + findingArn: _json, + findingStatus: _json, + findingType: _json, + firstObservedAt: (_) => se_DateFilterList(_, context), + fixAvailable: _json, + inspectorScore: (_) => se_NumberFilterList(_, context), + lambdaFunctionExecutionRoleArn: _json, + lambdaFunctionLastModifiedAt: (_) => se_DateFilterList(_, context), + lambdaFunctionLayers: _json, + lambdaFunctionName: _json, + lambdaFunctionRuntime: _json, + lastObservedAt: (_) => se_DateFilterList(_, context), + networkProtocol: _json, + portRange: _json, + relatedVulnerabilities: _json, + resourceId: _json, + resourceTags: _json, + resourceType: _json, + severity: _json, + title: _json, + updatedAt: (_) => se_DateFilterList(_, context), + vendorSeverity: _json, + vulnerabilityId: _json, + vulnerabilitySource: _json, + vulnerablePackages: (_) => se_PackageFilterList(_, context), + }); }; -/** - * serializeAws_restJson1FindingTypeAggregation - */ -const se_FindingTypeAggregation = (input: FindingTypeAggregation, context: __SerdeContext): any => { - return { - ...(input.findingType != null && { findingType: input.findingType }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_FindingTypeAggregation omitted. -/** - * serializeAws_restJson1ImageLayerAggregation - */ -const se_ImageLayerAggregation = (input: ImageLayerAggregation, context: __SerdeContext): any => { - return { - ...(input.layerHashes != null && { layerHashes: se_StringFilterList(input.layerHashes, context) }), - ...(input.repositories != null && { repositories: se_StringFilterList(input.repositories, context) }), - ...(input.resourceIds != null && { resourceIds: se_StringFilterList(input.resourceIds, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ImageLayerAggregation omitted. -/** - * serializeAws_restJson1LambdaFunctionAggregation - */ -const se_LambdaFunctionAggregation = (input: LambdaFunctionAggregation, context: __SerdeContext): any => { - return { - ...(input.functionNames != null && { functionNames: se_StringFilterList(input.functionNames, context) }), - ...(input.functionTags != null && { functionTags: se_MapFilterList(input.functionTags, context) }), - ...(input.resourceIds != null && { resourceIds: se_StringFilterList(input.resourceIds, context) }), - ...(input.runtimes != null && { runtimes: se_StringFilterList(input.runtimes, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_LambdaFunctionAggregation omitted. -/** - * serializeAws_restJson1LambdaLayerAggregation - */ -const se_LambdaLayerAggregation = (input: LambdaLayerAggregation, context: __SerdeContext): any => { - return { - ...(input.functionNames != null && { functionNames: se_StringFilterList(input.functionNames, context) }), - ...(input.layerArns != null && { layerArns: se_StringFilterList(input.layerArns, context) }), - ...(input.resourceIds != null && { resourceIds: se_StringFilterList(input.resourceIds, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_LambdaLayerAggregation omitted. -/** - * serializeAws_restJson1MapFilter - */ -const se_MapFilter = (input: MapFilter, context: __SerdeContext): any => { - return { - ...(input.comparison != null && { comparison: input.comparison }), - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_MapFilter omitted. -/** - * serializeAws_restJson1MapFilterList - */ -const se_MapFilterList = (input: MapFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MapFilter(entry, context); - }); -}; +// se_MapFilterList omitted. -/** - * serializeAws_restJson1MeteringAccountIdList - */ -const se_MeteringAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MeteringAccountIdList omitted. /** * serializeAws_restJson1NumberFilter */ const se_NumberFilter = (input: NumberFilter, context: __SerdeContext): any => { - return { - ...(input.lowerInclusive != null && { lowerInclusive: __serializeFloat(input.lowerInclusive) }), - ...(input.upperInclusive != null && { upperInclusive: __serializeFloat(input.upperInclusive) }), - }; + return take(input, { + lowerInclusive: __serializeFloat, + upperInclusive: __serializeFloat, + }); }; /** @@ -3574,32 +3257,21 @@ const se_NumberFilterList = (input: NumberFilter[], context: __SerdeContext): an }); }; -/** - * serializeAws_restJson1PackageAggregation - */ -const se_PackageAggregation = (input: PackageAggregation, context: __SerdeContext): any => { - return { - ...(input.packageNames != null && { packageNames: se_StringFilterList(input.packageNames, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_PackageAggregation omitted. /** * serializeAws_restJson1PackageFilter */ const se_PackageFilter = (input: PackageFilter, context: __SerdeContext): any => { - return { - ...(input.architecture != null && { architecture: se_StringFilter(input.architecture, context) }), - ...(input.epoch != null && { epoch: se_NumberFilter(input.epoch, context) }), - ...(input.name != null && { name: se_StringFilter(input.name, context) }), - ...(input.release != null && { release: se_StringFilter(input.release, context) }), - ...(input.sourceLambdaLayerArn != null && { - sourceLambdaLayerArn: se_StringFilter(input.sourceLambdaLayerArn, context), - }), - ...(input.sourceLayerHash != null && { sourceLayerHash: se_StringFilter(input.sourceLayerHash, context) }), - ...(input.version != null && { version: se_StringFilter(input.version, context) }), - }; + return take(input, { + architecture: _json, + epoch: (_) => se_NumberFilter(_, context), + name: _json, + release: _json, + sourceLambdaLayerArn: _json, + sourceLayerHash: _json, + version: _json, + }); }; /** @@ -3613,167 +3285,33 @@ const se_PackageFilterList = (input: PackageFilter[], context: __SerdeContext): }); }; -/** - * serializeAws_restJson1PortRangeFilter - */ -const se_PortRangeFilter = (input: PortRangeFilter, context: __SerdeContext): any => { - return { - ...(input.beginInclusive != null && { beginInclusive: input.beginInclusive }), - ...(input.endInclusive != null && { endInclusive: input.endInclusive }), - }; -}; +// se_PortRangeFilter omitted. -/** - * serializeAws_restJson1PortRangeFilterList - */ -const se_PortRangeFilterList = (input: PortRangeFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortRangeFilter(entry, context); - }); -}; +// se_PortRangeFilterList omitted. -/** - * serializeAws_restJson1RepositoryAggregation - */ -const se_RepositoryAggregation = (input: RepositoryAggregation, context: __SerdeContext): any => { - return { - ...(input.repositories != null && { repositories: se_StringFilterList(input.repositories, context) }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_RepositoryAggregation omitted. -/** - * serializeAws_restJson1SortCriteria - */ -const se_SortCriteria = (input: SortCriteria, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_SortCriteria omitted. -/** - * serializeAws_restJson1StringFilter - */ -const se_StringFilter = (input: StringFilter, context: __SerdeContext): any => { - return { - ...(input.comparison != null && { comparison: input.comparison }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_StringFilter omitted. -/** - * serializeAws_restJson1StringFilterList - */ -const se_StringFilterList = (input: StringFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StringFilter(entry, context); - }); -}; +// se_StringFilterList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TitleAggregation - */ -const se_TitleAggregation = (input: TitleAggregation, context: __SerdeContext): any => { - return { - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - ...(input.titles != null && { titles: se_StringFilterList(input.titles, context) }), - ...(input.vulnerabilityIds != null && { vulnerabilityIds: se_StringFilterList(input.vulnerabilityIds, context) }), - }; -}; +// se_TitleAggregation omitted. -/** - * serializeAws_restJson1UsageAccountIdList - */ -const se_UsageAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UsageAccountIdList omitted. -/** - * deserializeAws_restJson1Account - */ -const de_Account = (output: any, context: __SerdeContext): Account => { - return { - accountId: __expectString(output.accountId), - resourceStatus: output.resourceStatus != null ? de_ResourceStatus(output.resourceStatus, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_Account omitted. -/** - * deserializeAws_restJson1AccountAggregationResponse - */ -const de_AccountAggregationResponse = (output: any, context: __SerdeContext): AccountAggregationResponse => { - return { - accountId: __expectString(output.accountId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_AccountAggregationResponse omitted. -/** - * deserializeAws_restJson1AccountList - */ -const de_AccountList = (output: any, context: __SerdeContext): Account[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Account(entry, context); - }); - return retVal; -}; +// de_AccountList omitted. -/** - * deserializeAws_restJson1AccountState - */ -const de_AccountState = (output: any, context: __SerdeContext): AccountState => { - return { - accountId: __expectString(output.accountId), - resourceState: output.resourceState != null ? de_ResourceState(output.resourceState, context) : undefined, - state: output.state != null ? de_State(output.state, context) : undefined, - } as any; -}; +// de_AccountState omitted. -/** - * deserializeAws_restJson1AccountStateList - */ -const de_AccountStateList = (output: any, context: __SerdeContext): AccountState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountState(entry, context); - }); - return retVal; -}; +// de_AccountStateList omitted. /** * deserializeAws_restJson1AggregationResponse @@ -3781,32 +3319,32 @@ const de_AccountStateList = (output: any, context: __SerdeContext): AccountState const de_AggregationResponse = (output: any, context: __SerdeContext): AggregationResponse => { if (output.accountAggregation != null) { return { - accountAggregation: de_AccountAggregationResponse(output.accountAggregation, context), + accountAggregation: _json(output.accountAggregation), }; } if (output.amiAggregation != null) { return { - amiAggregation: de_AmiAggregationResponse(output.amiAggregation, context), + amiAggregation: _json(output.amiAggregation), }; } if (output.awsEcrContainerAggregation != null) { return { - awsEcrContainerAggregation: de_AwsEcrContainerAggregationResponse(output.awsEcrContainerAggregation, context), + awsEcrContainerAggregation: _json(output.awsEcrContainerAggregation), }; } if (output.ec2InstanceAggregation != null) { return { - ec2InstanceAggregation: de_Ec2InstanceAggregationResponse(output.ec2InstanceAggregation, context), + ec2InstanceAggregation: _json(output.ec2InstanceAggregation), }; } if (output.findingTypeAggregation != null) { return { - findingTypeAggregation: de_FindingTypeAggregationResponse(output.findingTypeAggregation, context), + findingTypeAggregation: _json(output.findingTypeAggregation), }; } if (output.imageLayerAggregation != null) { return { - imageLayerAggregation: de_ImageLayerAggregationResponse(output.imageLayerAggregation, context), + imageLayerAggregation: _json(output.imageLayerAggregation), }; } if (output.lambdaFunctionAggregation != null) { @@ -3816,22 +3354,22 @@ const de_AggregationResponse = (output: any, context: __SerdeContext): Aggregati } if (output.lambdaLayerAggregation != null) { return { - lambdaLayerAggregation: de_LambdaLayerAggregationResponse(output.lambdaLayerAggregation, context), + lambdaLayerAggregation: _json(output.lambdaLayerAggregation), }; } if (output.packageAggregation != null) { return { - packageAggregation: de_PackageAggregationResponse(output.packageAggregation, context), + packageAggregation: _json(output.packageAggregation), }; } if (output.repositoryAggregation != null) { return { - repositoryAggregation: de_RepositoryAggregationResponse(output.repositoryAggregation, context), + repositoryAggregation: _json(output.repositoryAggregation), }; } if (output.titleAggregation != null) { return { - titleAggregation: de_TitleAggregationResponse(output.titleAggregation, context), + titleAggregation: _json(output.titleAggregation), }; } return { $unknown: Object.entries(output)[0] }; @@ -3844,231 +3382,107 @@ const de_AggregationResponseList = (output: any, context: __SerdeContext): Aggre const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AggregationResponse(__expectUnion(entry), context); }); return retVal; }; -/** - * deserializeAws_restJson1AmiAggregationResponse - */ -const de_AmiAggregationResponse = (output: any, context: __SerdeContext): AmiAggregationResponse => { - return { - accountId: __expectString(output.accountId), - affectedInstances: __expectLong(output.affectedInstances), - ami: __expectString(output.ami), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_AmiAggregationResponse omitted. -/** - * deserializeAws_restJson1ArchitectureList - */ -const de_ArchitectureList = (output: any, context: __SerdeContext): (Architecture | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArchitectureList omitted. -/** - * deserializeAws_restJson1AutoEnable - */ -const de_AutoEnable = (output: any, context: __SerdeContext): AutoEnable => { - return { - ec2: __expectBoolean(output.ec2), - ecr: __expectBoolean(output.ecr), - lambda: __expectBoolean(output.lambda), - } as any; -}; +// de_AutoEnable omitted. /** * deserializeAws_restJson1AwsEc2InstanceDetails */ const de_AwsEc2InstanceDetails = (output: any, context: __SerdeContext): AwsEc2InstanceDetails => { - return { - iamInstanceProfileArn: __expectString(output.iamInstanceProfileArn), - imageId: __expectString(output.imageId), - ipV4Addresses: output.ipV4Addresses != null ? de_IpV4AddressList(output.ipV4Addresses, context) : undefined, - ipV6Addresses: output.ipV6Addresses != null ? de_IpV6AddressList(output.ipV6Addresses, context) : undefined, - keyName: __expectString(output.keyName), - launchedAt: - output.launchedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.launchedAt))) : undefined, - platform: __expectString(output.platform), - subnetId: __expectString(output.subnetId), - type: __expectString(output.type), - vpcId: __expectString(output.vpcId), - } as any; + return take(output, { + iamInstanceProfileArn: __expectString, + imageId: __expectString, + ipV4Addresses: _json, + ipV6Addresses: _json, + keyName: __expectString, + launchedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + platform: __expectString, + subnetId: __expectString, + type: __expectString, + vpcId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AwsEcrContainerAggregationResponse - */ -const de_AwsEcrContainerAggregationResponse = ( - output: any, - context: __SerdeContext -): AwsEcrContainerAggregationResponse => { - return { - accountId: __expectString(output.accountId), - architecture: __expectString(output.architecture), - imageSha: __expectString(output.imageSha), - imageTags: output.imageTags != null ? de_StringList(output.imageTags, context) : undefined, - repository: __expectString(output.repository), - resourceId: __expectString(output.resourceId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_AwsEcrContainerAggregationResponse omitted. /** * deserializeAws_restJson1AwsEcrContainerImageDetails */ const de_AwsEcrContainerImageDetails = (output: any, context: __SerdeContext): AwsEcrContainerImageDetails => { - return { - architecture: __expectString(output.architecture), - author: __expectString(output.author), - imageHash: __expectString(output.imageHash), - imageTags: output.imageTags != null ? de_ImageTagList(output.imageTags, context) : undefined, - platform: __expectString(output.platform), - pushedAt: - output.pushedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.pushedAt))) : undefined, - registry: __expectString(output.registry), - repositoryName: __expectString(output.repositoryName), - } as any; + return take(output, { + architecture: __expectString, + author: __expectString, + imageHash: __expectString, + imageTags: _json, + platform: __expectString, + pushedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registry: __expectString, + repositoryName: __expectString, + }) as any; }; /** * deserializeAws_restJson1AwsLambdaFunctionDetails */ const de_AwsLambdaFunctionDetails = (output: any, context: __SerdeContext): AwsLambdaFunctionDetails => { - return { - architectures: output.architectures != null ? de_ArchitectureList(output.architectures, context) : undefined, - codeSha256: __expectString(output.codeSha256), - executionRoleArn: __expectString(output.executionRoleArn), - functionName: __expectString(output.functionName), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - layers: output.layers != null ? de_LayerList(output.layers, context) : undefined, - packageType: __expectString(output.packageType), - runtime: __expectString(output.runtime), - version: __expectString(output.version), - vpcConfig: output.vpcConfig != null ? de_LambdaVpcConfig(output.vpcConfig, context) : undefined, - } as any; + return take(output, { + architectures: _json, + codeSha256: __expectString, + executionRoleArn: __expectString, + functionName: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + layers: _json, + packageType: __expectString, + runtime: __expectString, + version: __expectString, + vpcConfig: _json, + }) as any; }; -/** - * deserializeAws_restJson1Counts - */ -const de_Counts = (output: any, context: __SerdeContext): Counts => { - return { - count: __expectLong(output.count), - groupKey: __expectString(output.groupKey), - } as any; -}; +// de_Counts omitted. -/** - * deserializeAws_restJson1CountsList - */ -const de_CountsList = (output: any, context: __SerdeContext): Counts[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Counts(entry, context); - }); - return retVal; -}; +// de_CountsList omitted. -/** - * deserializeAws_restJson1CoveredResource - */ -const de_CoveredResource = (output: any, context: __SerdeContext): CoveredResource => { - return { - accountId: __expectString(output.accountId), - resourceId: __expectString(output.resourceId), - resourceMetadata: - output.resourceMetadata != null ? de_ResourceScanMetadata(output.resourceMetadata, context) : undefined, - resourceType: __expectString(output.resourceType), - scanStatus: output.scanStatus != null ? de_ScanStatus(output.scanStatus, context) : undefined, - scanType: __expectString(output.scanType), - } as any; -}; +// de_CoveredResource omitted. -/** - * deserializeAws_restJson1CoveredResources - */ -const de_CoveredResources = (output: any, context: __SerdeContext): CoveredResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoveredResource(entry, context); - }); - return retVal; -}; +// de_CoveredResources omitted. /** * deserializeAws_restJson1CvssScore */ const de_CvssScore = (output: any, context: __SerdeContext): CvssScore => { - return { - baseScore: __limitedParseDouble(output.baseScore), - scoringVector: __expectString(output.scoringVector), - source: __expectString(output.source), - version: __expectString(output.version), - } as any; + return take(output, { + baseScore: __limitedParseDouble, + scoringVector: __expectString, + source: __expectString, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1CvssScoreAdjustment - */ -const de_CvssScoreAdjustment = (output: any, context: __SerdeContext): CvssScoreAdjustment => { - return { - metric: __expectString(output.metric), - reason: __expectString(output.reason), - } as any; -}; +// de_CvssScoreAdjustment omitted. -/** - * deserializeAws_restJson1CvssScoreAdjustmentList - */ -const de_CvssScoreAdjustmentList = (output: any, context: __SerdeContext): CvssScoreAdjustment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CvssScoreAdjustment(entry, context); - }); - return retVal; -}; +// de_CvssScoreAdjustmentList omitted. /** * deserializeAws_restJson1CvssScoreDetails */ const de_CvssScoreDetails = (output: any, context: __SerdeContext): CvssScoreDetails => { - return { - adjustments: output.adjustments != null ? de_CvssScoreAdjustmentList(output.adjustments, context) : undefined, - cvssSource: __expectString(output.cvssSource), - score: __limitedParseDouble(output.score), - scoreSource: __expectString(output.scoreSource), - scoringVector: __expectString(output.scoringVector), - version: __expectString(output.version), - } as any; + return take(output, { + adjustments: _json, + cvssSource: __expectString, + score: __limitedParseDouble, + scoreSource: __expectString, + scoringVector: __expectString, + version: __expectString, + }) as any; }; /** @@ -4078,9 +3492,6 @@ const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CvssScore(entry, context); }); return retVal; @@ -4090,16 +3501,10 @@ const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => * deserializeAws_restJson1DateFilter */ const de_DateFilter = (output: any, context: __SerdeContext): DateFilter => { - return { - endInclusive: - output.endInclusive != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endInclusive))) - : undefined, - startInclusive: - output.startInclusive != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startInclusive))) - : undefined, - } as any; + return take(output, { + endInclusive: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startInclusive: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4109,250 +3514,122 @@ const de_DateFilterList = (output: any, context: __SerdeContext): DateFilter[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DateFilter(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DelegatedAdmin - */ -const de_DelegatedAdmin = (output: any, context: __SerdeContext): DelegatedAdmin => { - return { - accountId: __expectString(output.accountId), - relationshipStatus: __expectString(output.relationshipStatus), - } as any; -}; +// de_DelegatedAdmin omitted. -/** - * deserializeAws_restJson1DelegatedAdminAccount - */ -const de_DelegatedAdminAccount = (output: any, context: __SerdeContext): DelegatedAdminAccount => { - return { - accountId: __expectString(output.accountId), - status: __expectString(output.status), - } as any; -}; +// de_DelegatedAdminAccount omitted. -/** - * deserializeAws_restJson1DelegatedAdminAccountList - */ -const de_DelegatedAdminAccountList = (output: any, context: __SerdeContext): DelegatedAdminAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DelegatedAdminAccount(entry, context); - }); - return retVal; -}; +// de_DelegatedAdminAccountList omitted. -/** - * deserializeAws_restJson1Destination - */ -const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - bucketName: __expectString(output.bucketName), - keyPrefix: __expectString(output.keyPrefix), - kmsKeyArn: __expectString(output.kmsKeyArn), - } as any; -}; +// de_Destination omitted. -/** - * deserializeAws_restJson1Ec2InstanceAggregationResponse - */ -const de_Ec2InstanceAggregationResponse = (output: any, context: __SerdeContext): Ec2InstanceAggregationResponse => { - return { - accountId: __expectString(output.accountId), - ami: __expectString(output.ami), - instanceId: __expectString(output.instanceId), - instanceTags: output.instanceTags != null ? de_TagMap(output.instanceTags, context) : undefined, - networkFindings: __expectLong(output.networkFindings), - operatingSystem: __expectString(output.operatingSystem), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_Ec2InstanceAggregationResponse omitted. -/** - * deserializeAws_restJson1Ec2Metadata - */ -const de_Ec2Metadata = (output: any, context: __SerdeContext): Ec2Metadata => { - return { - amiId: __expectString(output.amiId), - platform: __expectString(output.platform), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_Ec2Metadata omitted. /** * deserializeAws_restJson1EcrConfigurationState */ const de_EcrConfigurationState = (output: any, context: __SerdeContext): EcrConfigurationState => { - return { - rescanDurationState: - output.rescanDurationState != null ? de_EcrRescanDurationState(output.rescanDurationState, context) : undefined, - } as any; + return take(output, { + rescanDurationState: (_: any) => de_EcrRescanDurationState(_, context), + }) as any; }; -/** - * deserializeAws_restJson1EcrContainerImageMetadata - */ -const de_EcrContainerImageMetadata = (output: any, context: __SerdeContext): EcrContainerImageMetadata => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_EcrContainerImageMetadata omitted. -/** - * deserializeAws_restJson1EcrRepositoryMetadata - */ -const de_EcrRepositoryMetadata = (output: any, context: __SerdeContext): EcrRepositoryMetadata => { - return { - name: __expectString(output.name), - scanFrequency: __expectString(output.scanFrequency), - } as any; -}; +// de_EcrRepositoryMetadata omitted. /** * deserializeAws_restJson1EcrRescanDurationState */ const de_EcrRescanDurationState = (output: any, context: __SerdeContext): EcrRescanDurationState => { - return { - rescanDuration: __expectString(output.rescanDuration), - status: __expectString(output.status), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + rescanDuration: __expectString, + status: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1ExploitabilityDetails */ const de_ExploitabilityDetails = (output: any, context: __SerdeContext): ExploitabilityDetails => { - return { - lastKnownExploitAt: - output.lastKnownExploitAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastKnownExploitAt))) - : undefined, - } as any; + return take(output, { + lastKnownExploitAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1FailedAccount - */ -const de_FailedAccount = (output: any, context: __SerdeContext): FailedAccount => { - return { - accountId: __expectString(output.accountId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - resourceStatus: output.resourceStatus != null ? de_ResourceStatus(output.resourceStatus, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_FailedAccount omitted. -/** - * deserializeAws_restJson1FailedAccountList - */ -const de_FailedAccountList = (output: any, context: __SerdeContext): FailedAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedAccount(entry, context); - }); - return retVal; -}; +// de_FailedAccountList omitted. /** * deserializeAws_restJson1Filter */ const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - action: __expectString(output.action), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - criteria: output.criteria != null ? de_FilterCriteria(output.criteria, context) : undefined, - description: __expectString(output.description), - name: __expectString(output.name), - ownerId: __expectString(output.ownerId), - reason: __expectString(output.reason), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + action: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + criteria: (_: any) => de_FilterCriteria(_, context), + description: __expectString, + name: __expectString, + ownerId: __expectString, + reason: __expectString, + tags: _json, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1FilterCriteria */ const de_FilterCriteria = (output: any, context: __SerdeContext): FilterCriteria => { - return { - awsAccountId: output.awsAccountId != null ? de_StringFilterList(output.awsAccountId, context) : undefined, - componentId: output.componentId != null ? de_StringFilterList(output.componentId, context) : undefined, - componentType: output.componentType != null ? de_StringFilterList(output.componentType, context) : undefined, - ec2InstanceImageId: - output.ec2InstanceImageId != null ? de_StringFilterList(output.ec2InstanceImageId, context) : undefined, - ec2InstanceSubnetId: - output.ec2InstanceSubnetId != null ? de_StringFilterList(output.ec2InstanceSubnetId, context) : undefined, - ec2InstanceVpcId: - output.ec2InstanceVpcId != null ? de_StringFilterList(output.ec2InstanceVpcId, context) : undefined, - ecrImageArchitecture: - output.ecrImageArchitecture != null ? de_StringFilterList(output.ecrImageArchitecture, context) : undefined, - ecrImageHash: output.ecrImageHash != null ? de_StringFilterList(output.ecrImageHash, context) : undefined, - ecrImagePushedAt: output.ecrImagePushedAt != null ? de_DateFilterList(output.ecrImagePushedAt, context) : undefined, - ecrImageRegistry: - output.ecrImageRegistry != null ? de_StringFilterList(output.ecrImageRegistry, context) : undefined, - ecrImageRepositoryName: - output.ecrImageRepositoryName != null ? de_StringFilterList(output.ecrImageRepositoryName, context) : undefined, - ecrImageTags: output.ecrImageTags != null ? de_StringFilterList(output.ecrImageTags, context) : undefined, - exploitAvailable: - output.exploitAvailable != null ? de_StringFilterList(output.exploitAvailable, context) : undefined, - findingArn: output.findingArn != null ? de_StringFilterList(output.findingArn, context) : undefined, - findingStatus: output.findingStatus != null ? de_StringFilterList(output.findingStatus, context) : undefined, - findingType: output.findingType != null ? de_StringFilterList(output.findingType, context) : undefined, - firstObservedAt: output.firstObservedAt != null ? de_DateFilterList(output.firstObservedAt, context) : undefined, - fixAvailable: output.fixAvailable != null ? de_StringFilterList(output.fixAvailable, context) : undefined, - inspectorScore: output.inspectorScore != null ? de_NumberFilterList(output.inspectorScore, context) : undefined, - lambdaFunctionExecutionRoleArn: - output.lambdaFunctionExecutionRoleArn != null - ? de_StringFilterList(output.lambdaFunctionExecutionRoleArn, context) - : undefined, - lambdaFunctionLastModifiedAt: - output.lambdaFunctionLastModifiedAt != null - ? de_DateFilterList(output.lambdaFunctionLastModifiedAt, context) - : undefined, - lambdaFunctionLayers: - output.lambdaFunctionLayers != null ? de_StringFilterList(output.lambdaFunctionLayers, context) : undefined, - lambdaFunctionName: - output.lambdaFunctionName != null ? de_StringFilterList(output.lambdaFunctionName, context) : undefined, - lambdaFunctionRuntime: - output.lambdaFunctionRuntime != null ? de_StringFilterList(output.lambdaFunctionRuntime, context) : undefined, - lastObservedAt: output.lastObservedAt != null ? de_DateFilterList(output.lastObservedAt, context) : undefined, - networkProtocol: output.networkProtocol != null ? de_StringFilterList(output.networkProtocol, context) : undefined, - portRange: output.portRange != null ? de_PortRangeFilterList(output.portRange, context) : undefined, - relatedVulnerabilities: - output.relatedVulnerabilities != null ? de_StringFilterList(output.relatedVulnerabilities, context) : undefined, - resourceId: output.resourceId != null ? de_StringFilterList(output.resourceId, context) : undefined, - resourceTags: output.resourceTags != null ? de_MapFilterList(output.resourceTags, context) : undefined, - resourceType: output.resourceType != null ? de_StringFilterList(output.resourceType, context) : undefined, - severity: output.severity != null ? de_StringFilterList(output.severity, context) : undefined, - title: output.title != null ? de_StringFilterList(output.title, context) : undefined, - updatedAt: output.updatedAt != null ? de_DateFilterList(output.updatedAt, context) : undefined, - vendorSeverity: output.vendorSeverity != null ? de_StringFilterList(output.vendorSeverity, context) : undefined, - vulnerabilityId: output.vulnerabilityId != null ? de_StringFilterList(output.vulnerabilityId, context) : undefined, - vulnerabilitySource: - output.vulnerabilitySource != null ? de_StringFilterList(output.vulnerabilitySource, context) : undefined, - vulnerablePackages: - output.vulnerablePackages != null ? de_PackageFilterList(output.vulnerablePackages, context) : undefined, - } as any; + return take(output, { + awsAccountId: _json, + componentId: _json, + componentType: _json, + ec2InstanceImageId: _json, + ec2InstanceSubnetId: _json, + ec2InstanceVpcId: _json, + ecrImageArchitecture: _json, + ecrImageHash: _json, + ecrImagePushedAt: (_: any) => de_DateFilterList(_, context), + ecrImageRegistry: _json, + ecrImageRepositoryName: _json, + ecrImageTags: _json, + exploitAvailable: _json, + findingArn: _json, + findingStatus: _json, + findingType: _json, + firstObservedAt: (_: any) => de_DateFilterList(_, context), + fixAvailable: _json, + inspectorScore: (_: any) => de_NumberFilterList(_, context), + lambdaFunctionExecutionRoleArn: _json, + lambdaFunctionLastModifiedAt: (_: any) => de_DateFilterList(_, context), + lambdaFunctionLayers: _json, + lambdaFunctionName: _json, + lambdaFunctionRuntime: _json, + lastObservedAt: (_: any) => de_DateFilterList(_, context), + networkProtocol: _json, + portRange: _json, + relatedVulnerabilities: _json, + resourceId: _json, + resourceTags: _json, + resourceType: _json, + severity: _json, + title: _json, + updatedAt: (_: any) => de_DateFilterList(_, context), + vendorSeverity: _json, + vulnerabilityId: _json, + vulnerabilitySource: _json, + vulnerablePackages: (_: any) => de_PackageFilterList(_, context), + }) as any; }; /** @@ -4362,9 +3639,6 @@ const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Filter(entry, context); }); return retVal; @@ -4374,46 +3648,27 @@ const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { * deserializeAws_restJson1Finding */ const de_Finding = (output: any, context: __SerdeContext): Finding => { - return { - awsAccountId: __expectString(output.awsAccountId), - description: __expectString(output.description), - exploitAvailable: __expectString(output.exploitAvailable), - exploitabilityDetails: - output.exploitabilityDetails != null - ? de_ExploitabilityDetails(output.exploitabilityDetails, context) - : undefined, - findingArn: __expectString(output.findingArn), - firstObservedAt: - output.firstObservedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.firstObservedAt))) - : undefined, - fixAvailable: __expectString(output.fixAvailable), - inspectorScore: __limitedParseDouble(output.inspectorScore), - inspectorScoreDetails: - output.inspectorScoreDetails != null - ? de_InspectorScoreDetails(output.inspectorScoreDetails, context) - : undefined, - lastObservedAt: - output.lastObservedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastObservedAt))) - : undefined, - networkReachabilityDetails: - output.networkReachabilityDetails != null - ? de_NetworkReachabilityDetails(output.networkReachabilityDetails, context) - : undefined, - packageVulnerabilityDetails: - output.packageVulnerabilityDetails != null - ? de_PackageVulnerabilityDetails(output.packageVulnerabilityDetails, context) - : undefined, - remediation: output.remediation != null ? de_Remediation(output.remediation, context) : undefined, - resources: output.resources != null ? de_ResourceList(output.resources, context) : undefined, - severity: __expectString(output.severity), - status: __expectString(output.status), - title: __expectString(output.title), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + awsAccountId: __expectString, + description: __expectString, + exploitAvailable: __expectString, + exploitabilityDetails: (_: any) => de_ExploitabilityDetails(_, context), + findingArn: __expectString, + firstObservedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fixAvailable: __expectString, + inspectorScore: __limitedParseDouble, + inspectorScoreDetails: (_: any) => de_InspectorScoreDetails(_, context), + lastObservedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + networkReachabilityDetails: _json, + packageVulnerabilityDetails: (_: any) => de_PackageVulnerabilityDetails(_, context), + remediation: _json, + resources: (_: any) => de_ResourceList(_, context), + severity: __expectString, + status: __expectString, + title: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4423,32 +3678,21 @@ const de_FindingList = (output: any, context: __SerdeContext): Finding[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Finding(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FindingTypeAggregationResponse - */ -const de_FindingTypeAggregationResponse = (output: any, context: __SerdeContext): FindingTypeAggregationResponse => { - return { - accountId: __expectString(output.accountId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_FindingTypeAggregationResponse omitted. /** * deserializeAws_restJson1FreeTrialAccountInfo */ const de_FreeTrialAccountInfo = (output: any, context: __SerdeContext): FreeTrialAccountInfo => { - return { - accountId: __expectString(output.accountId), - freeTrialInfo: output.freeTrialInfo != null ? de_FreeTrialInfoList(output.freeTrialInfo, context) : undefined, - } as any; + return take(output, { + accountId: __expectString, + freeTrialInfo: (_: any) => de_FreeTrialInfoList(_, context), + }) as any; }; /** @@ -4458,9 +3702,6 @@ const de_FreeTrialAccountInfoList = (output: any, context: __SerdeContext): Free const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FreeTrialAccountInfo(entry, context); }); return retVal; @@ -4470,39 +3711,17 @@ const de_FreeTrialAccountInfoList = (output: any, context: __SerdeContext): Free * deserializeAws_restJson1FreeTrialInfo */ const de_FreeTrialInfo = (output: any, context: __SerdeContext): FreeTrialInfo => { - return { - end: output.end != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.end))) : undefined, - start: output.start != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.start))) : undefined, - status: __expectString(output.status), - type: __expectString(output.type), - } as any; + return take(output, { + end: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + start: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1FreeTrialInfoError - */ -const de_FreeTrialInfoError = (output: any, context: __SerdeContext): FreeTrialInfoError => { - return { - accountId: __expectString(output.accountId), - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_FreeTrialInfoError omitted. -/** - * deserializeAws_restJson1FreeTrialInfoErrorList - */ -const de_FreeTrialInfoErrorList = (output: any, context: __SerdeContext): FreeTrialInfoError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FreeTrialInfoError(entry, context); - }); - return retVal; -}; +// de_FreeTrialInfoErrorList omitted. /** * deserializeAws_restJson1FreeTrialInfoList @@ -4511,80 +3730,27 @@ const de_FreeTrialInfoList = (output: any, context: __SerdeContext): FreeTrialIn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FreeTrialInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ImageLayerAggregationResponse - */ -const de_ImageLayerAggregationResponse = (output: any, context: __SerdeContext): ImageLayerAggregationResponse => { - return { - accountId: __expectString(output.accountId), - layerHash: __expectString(output.layerHash), - repository: __expectString(output.repository), - resourceId: __expectString(output.resourceId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_ImageLayerAggregationResponse omitted. -/** - * deserializeAws_restJson1ImageTagList - */ -const de_ImageTagList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ImageTagList omitted. /** * deserializeAws_restJson1InspectorScoreDetails */ const de_InspectorScoreDetails = (output: any, context: __SerdeContext): InspectorScoreDetails => { - return { - adjustedCvss: output.adjustedCvss != null ? de_CvssScoreDetails(output.adjustedCvss, context) : undefined, - } as any; + return take(output, { + adjustedCvss: (_: any) => de_CvssScoreDetails(_, context), + }) as any; }; -/** - * deserializeAws_restJson1IpV4AddressList - */ -const de_IpV4AddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpV4AddressList omitted. -/** - * deserializeAws_restJson1IpV6AddressList - */ -const de_IpV6AddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpV6AddressList omitted. /** * deserializeAws_restJson1LambdaFunctionAggregationResponse @@ -4593,124 +3759,41 @@ const de_LambdaFunctionAggregationResponse = ( output: any, context: __SerdeContext ): LambdaFunctionAggregationResponse => { - return { - accountId: __expectString(output.accountId), - functionName: __expectString(output.functionName), - lambdaTags: output.lambdaTags != null ? de_TagMap(output.lambdaTags, context) : undefined, - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - resourceId: __expectString(output.resourceId), - runtime: __expectString(output.runtime), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; + return take(output, { + accountId: __expectString, + functionName: __expectString, + lambdaTags: _json, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceId: __expectString, + runtime: __expectString, + severityCounts: _json, + }) as any; }; -/** - * deserializeAws_restJson1LambdaFunctionMetadata - */ -const de_LambdaFunctionMetadata = (output: any, context: __SerdeContext): LambdaFunctionMetadata => { - return { - functionName: __expectString(output.functionName), - functionTags: output.functionTags != null ? de_TagMap(output.functionTags, context) : undefined, - layers: output.layers != null ? de_LambdaLayerList(output.layers, context) : undefined, - runtime: __expectString(output.runtime), - } as any; -}; +// de_LambdaFunctionMetadata omitted. -/** - * deserializeAws_restJson1LambdaLayerAggregationResponse - */ -const de_LambdaLayerAggregationResponse = (output: any, context: __SerdeContext): LambdaLayerAggregationResponse => { - return { - accountId: __expectString(output.accountId), - functionName: __expectString(output.functionName), - layerArn: __expectString(output.layerArn), - resourceId: __expectString(output.resourceId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_LambdaLayerAggregationResponse omitted. -/** - * deserializeAws_restJson1LambdaLayerList - */ -const de_LambdaLayerList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LambdaLayerList omitted. -/** - * deserializeAws_restJson1LambdaVpcConfig - */ -const de_LambdaVpcConfig = (output: any, context: __SerdeContext): LambdaVpcConfig => { - return { - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_LambdaVpcConfig omitted. -/** - * deserializeAws_restJson1LayerList - */ -const de_LayerList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LayerList omitted. -/** - * deserializeAws_restJson1MapFilter - */ -const de_MapFilter = (output: any, context: __SerdeContext): MapFilter => { - return { - comparison: __expectString(output.comparison), - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_MapFilter omitted. -/** - * deserializeAws_restJson1MapFilterList - */ -const de_MapFilterList = (output: any, context: __SerdeContext): MapFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MapFilter(entry, context); - }); - return retVal; -}; +// de_MapFilterList omitted. /** * deserializeAws_restJson1Member */ const de_Member = (output: any, context: __SerdeContext): Member => { - return { - accountId: __expectString(output.accountId), - delegatedAdminAccountId: __expectString(output.delegatedAdminAccountId), - relationshipStatus: __expectString(output.relationshipStatus), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + accountId: __expectString, + delegatedAdminAccountId: __expectString, + relationshipStatus: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4720,57 +3803,25 @@ const de_MemberList = (output: any, context: __SerdeContext): Member[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Member(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NetworkPath - */ -const de_NetworkPath = (output: any, context: __SerdeContext): NetworkPath => { - return { - steps: output.steps != null ? de_StepList(output.steps, context) : undefined, - } as any; -}; +// de_NetworkPath omitted. -/** - * deserializeAws_restJson1NetworkReachabilityDetails - */ -const de_NetworkReachabilityDetails = (output: any, context: __SerdeContext): NetworkReachabilityDetails => { - return { - networkPath: output.networkPath != null ? de_NetworkPath(output.networkPath, context) : undefined, - openPortRange: output.openPortRange != null ? de_PortRange(output.openPortRange, context) : undefined, - protocol: __expectString(output.protocol), - } as any; -}; +// de_NetworkReachabilityDetails omitted. -/** - * deserializeAws_restJson1NonEmptyStringList - */ -const de_NonEmptyStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NonEmptyStringList omitted. /** * deserializeAws_restJson1NumberFilter */ const de_NumberFilter = (output: any, context: __SerdeContext): NumberFilter => { - return { - lowerInclusive: __limitedParseDouble(output.lowerInclusive), - upperInclusive: __limitedParseDouble(output.upperInclusive), - } as any; + return take(output, { + lowerInclusive: __limitedParseDouble, + upperInclusive: __limitedParseDouble, + }) as any; }; /** @@ -4780,39 +3831,26 @@ const de_NumberFilterList = (output: any, context: __SerdeContext): NumberFilter const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NumberFilter(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PackageAggregationResponse - */ -const de_PackageAggregationResponse = (output: any, context: __SerdeContext): PackageAggregationResponse => { - return { - accountId: __expectString(output.accountId), - packageName: __expectString(output.packageName), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_PackageAggregationResponse omitted. /** * deserializeAws_restJson1PackageFilter */ const de_PackageFilter = (output: any, context: __SerdeContext): PackageFilter => { - return { - architecture: output.architecture != null ? de_StringFilter(output.architecture, context) : undefined, - epoch: output.epoch != null ? de_NumberFilter(output.epoch, context) : undefined, - name: output.name != null ? de_StringFilter(output.name, context) : undefined, - release: output.release != null ? de_StringFilter(output.release, context) : undefined, - sourceLambdaLayerArn: - output.sourceLambdaLayerArn != null ? de_StringFilter(output.sourceLambdaLayerArn, context) : undefined, - sourceLayerHash: output.sourceLayerHash != null ? de_StringFilter(output.sourceLayerHash, context) : undefined, - version: output.version != null ? de_StringFilter(output.version, context) : undefined, - } as any; + return take(output, { + architecture: _json, + epoch: (_: any) => de_NumberFilter(_, context), + name: _json, + release: _json, + sourceLambdaLayerArn: _json, + sourceLayerHash: _json, + version: _json, + }) as any; }; /** @@ -4822,9 +3860,6 @@ const de_PackageFilterList = (output: any, context: __SerdeContext): PackageFilt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageFilter(entry, context); }); return retVal; @@ -4834,149 +3869,59 @@ const de_PackageFilterList = (output: any, context: __SerdeContext): PackageFilt * deserializeAws_restJson1PackageVulnerabilityDetails */ const de_PackageVulnerabilityDetails = (output: any, context: __SerdeContext): PackageVulnerabilityDetails => { - return { - cvss: output.cvss != null ? de_CvssScoreList(output.cvss, context) : undefined, - referenceUrls: output.referenceUrls != null ? de_NonEmptyStringList(output.referenceUrls, context) : undefined, - relatedVulnerabilities: - output.relatedVulnerabilities != null - ? de_VulnerabilityIdList(output.relatedVulnerabilities, context) - : undefined, - source: __expectString(output.source), - sourceUrl: __expectString(output.sourceUrl), - vendorCreatedAt: - output.vendorCreatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vendorCreatedAt))) - : undefined, - vendorSeverity: __expectString(output.vendorSeverity), - vendorUpdatedAt: - output.vendorUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.vendorUpdatedAt))) - : undefined, - vulnerabilityId: __expectString(output.vulnerabilityId), - vulnerablePackages: - output.vulnerablePackages != null ? de_VulnerablePackageList(output.vulnerablePackages, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Permission - */ -const de_Permission = (output: any, context: __SerdeContext): Permission => { - return { - operation: __expectString(output.operation), - service: __expectString(output.service), - } as any; -}; - -/** - * deserializeAws_restJson1Permissions - */ -const de_Permissions = (output: any, context: __SerdeContext): Permission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Permission(entry, context); - }); - return retVal; + return take(output, { + cvss: (_: any) => de_CvssScoreList(_, context), + referenceUrls: _json, + relatedVulnerabilities: _json, + source: __expectString, + sourceUrl: __expectString, + vendorCreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorSeverity: __expectString, + vendorUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vulnerabilityId: __expectString, + vulnerablePackages: _json, + }) as any; }; -/** - * deserializeAws_restJson1PortRange - */ -const de_PortRange = (output: any, context: __SerdeContext): PortRange => { - return { - begin: __expectInt32(output.begin), - end: __expectInt32(output.end), - } as any; -}; +// de_Permission omitted. -/** - * deserializeAws_restJson1PortRangeFilter - */ -const de_PortRangeFilter = (output: any, context: __SerdeContext): PortRangeFilter => { - return { - beginInclusive: __expectInt32(output.beginInclusive), - endInclusive: __expectInt32(output.endInclusive), - } as any; -}; +// de_Permissions omitted. -/** - * deserializeAws_restJson1PortRangeFilterList - */ -const de_PortRangeFilterList = (output: any, context: __SerdeContext): PortRangeFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortRangeFilter(entry, context); - }); - return retVal; -}; +// de_PortRange omitted. -/** - * deserializeAws_restJson1Recommendation - */ -const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - Url: __expectString(output.Url), - text: __expectString(output.text), - } as any; -}; +// de_PortRangeFilter omitted. -/** - * deserializeAws_restJson1Remediation - */ -const de_Remediation = (output: any, context: __SerdeContext): Remediation => { - return { - recommendation: output.recommendation != null ? de_Recommendation(output.recommendation, context) : undefined, - } as any; -}; +// de_PortRangeFilterList omitted. -/** - * deserializeAws_restJson1RepositoryAggregationResponse - */ -const de_RepositoryAggregationResponse = (output: any, context: __SerdeContext): RepositoryAggregationResponse => { - return { - accountId: __expectString(output.accountId), - affectedImages: __expectLong(output.affectedImages), - repository: __expectString(output.repository), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - } as any; -}; +// de_Recommendation omitted. + +// de_Remediation omitted. + +// de_RepositoryAggregationResponse omitted. /** * deserializeAws_restJson1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - details: output.details != null ? de_ResourceDetails(output.details, context) : undefined, - id: __expectString(output.id), - partition: __expectString(output.partition), - region: __expectString(output.region), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + details: (_: any) => de_ResourceDetails(_, context), + id: __expectString, + partition: __expectString, + region: __expectString, + tags: _json, + type: __expectString, + }) as any; }; /** * deserializeAws_restJson1ResourceDetails */ const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - awsEc2Instance: - output.awsEc2Instance != null ? de_AwsEc2InstanceDetails(output.awsEc2Instance, context) : undefined, - awsEcrContainerImage: - output.awsEcrContainerImage != null - ? de_AwsEcrContainerImageDetails(output.awsEcrContainerImage, context) - : undefined, - awsLambdaFunction: - output.awsLambdaFunction != null ? de_AwsLambdaFunctionDetails(output.awsLambdaFunction, context) : undefined, - } as any; + return take(output, { + awsEc2Instance: (_: any) => de_AwsEc2InstanceDetails(_, context), + awsEcrContainerImage: (_: any) => de_AwsEcrContainerImageDetails(_, context), + awsLambdaFunction: (_: any) => de_AwsLambdaFunctionDetails(_, context), + }) as any; }; /** @@ -4986,227 +3931,53 @@ const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Resource(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ResourceScanMetadata - */ -const de_ResourceScanMetadata = (output: any, context: __SerdeContext): ResourceScanMetadata => { - return { - ec2: output.ec2 != null ? de_Ec2Metadata(output.ec2, context) : undefined, - ecrImage: output.ecrImage != null ? de_EcrContainerImageMetadata(output.ecrImage, context) : undefined, - ecrRepository: output.ecrRepository != null ? de_EcrRepositoryMetadata(output.ecrRepository, context) : undefined, - lambdaFunction: - output.lambdaFunction != null ? de_LambdaFunctionMetadata(output.lambdaFunction, context) : undefined, - } as any; -}; +// de_ResourceScanMetadata omitted. -/** - * deserializeAws_restJson1ResourceState - */ -const de_ResourceState = (output: any, context: __SerdeContext): ResourceState => { - return { - ec2: output.ec2 != null ? de_State(output.ec2, context) : undefined, - ecr: output.ecr != null ? de_State(output.ecr, context) : undefined, - lambda: output.lambda != null ? de_State(output.lambda, context) : undefined, - } as any; -}; +// de_ResourceState omitted. -/** - * deserializeAws_restJson1ResourceStatus - */ -const de_ResourceStatus = (output: any, context: __SerdeContext): ResourceStatus => { - return { - ec2: __expectString(output.ec2), - ecr: __expectString(output.ecr), - lambda: __expectString(output.lambda), - } as any; -}; +// de_ResourceStatus omitted. -/** - * deserializeAws_restJson1ScanStatus - */ -const de_ScanStatus = (output: any, context: __SerdeContext): ScanStatus => { - return { - reason: __expectString(output.reason), - statusCode: __expectString(output.statusCode), - } as any; -}; +// de_ScanStatus omitted. -/** - * deserializeAws_restJson1SecurityGroupIdList - */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIdList omitted. -/** - * deserializeAws_restJson1SeverityCounts - */ -const de_SeverityCounts = (output: any, context: __SerdeContext): SeverityCounts => { - return { - all: __expectLong(output.all), - critical: __expectLong(output.critical), - high: __expectLong(output.high), - medium: __expectLong(output.medium), - } as any; -}; +// de_SeverityCounts omitted. -/** - * deserializeAws_restJson1State - */ -const de_State = (output: any, context: __SerdeContext): State => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - status: __expectString(output.status), - } as any; -}; +// de_State omitted. -/** - * deserializeAws_restJson1Step - */ -const de_Step = (output: any, context: __SerdeContext): Step => { - return { - componentId: __expectString(output.componentId), - componentType: __expectString(output.componentType), - } as any; -}; +// de_Step omitted. -/** - * deserializeAws_restJson1StepList - */ -const de_StepList = (output: any, context: __SerdeContext): Step[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Step(entry, context); - }); - return retVal; -}; +// de_StepList omitted. -/** - * deserializeAws_restJson1StringFilter - */ -const de_StringFilter = (output: any, context: __SerdeContext): StringFilter => { - return { - comparison: __expectString(output.comparison), - value: __expectString(output.value), - } as any; -}; +// de_StringFilter omitted. -/** - * deserializeAws_restJson1StringFilterList - */ -const de_StringFilterList = (output: any, context: __SerdeContext): StringFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StringFilter(entry, context); - }); - return retVal; -}; +// de_StringFilterList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIdList omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TitleAggregationResponse - */ -const de_TitleAggregationResponse = (output: any, context: __SerdeContext): TitleAggregationResponse => { - return { - accountId: __expectString(output.accountId), - severityCounts: output.severityCounts != null ? de_SeverityCounts(output.severityCounts, context) : undefined, - title: __expectString(output.title), - vulnerabilityId: __expectString(output.vulnerabilityId), - } as any; -}; +// de_TitleAggregationResponse omitted. /** * deserializeAws_restJson1Usage */ const de_Usage = (output: any, context: __SerdeContext): Usage => { - return { - currency: __expectString(output.currency), - estimatedMonthlyCost: __limitedParseDouble(output.estimatedMonthlyCost), - total: __limitedParseDouble(output.total), - type: __expectString(output.type), - } as any; + return take(output, { + currency: __expectString, + estimatedMonthlyCost: __limitedParseDouble, + total: __limitedParseDouble, + type: __expectString, + }) as any; }; /** @@ -5216,9 +3987,6 @@ const de_UsageList = (output: any, context: __SerdeContext): Usage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Usage(entry, context); }); return retVal; @@ -5228,10 +3996,10 @@ const de_UsageList = (output: any, context: __SerdeContext): Usage[] => { * deserializeAws_restJson1UsageTotal */ const de_UsageTotal = (output: any, context: __SerdeContext): UsageTotal => { - return { - accountId: __expectString(output.accountId), - usage: output.usage != null ? de_UsageList(output.usage, context) : undefined, - } as any; + return take(output, { + accountId: __expectString, + usage: (_: any) => de_UsageList(_, context), + }) as any; }; /** @@ -5241,87 +4009,20 @@ const de_UsageTotalList = (output: any, context: __SerdeContext): UsageTotal[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageTotal(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFields - */ -const de_ValidationExceptionFields = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFields omitted. -/** - * deserializeAws_restJson1VulnerabilityIdList - */ -const de_VulnerabilityIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VulnerabilityIdList omitted. -/** - * deserializeAws_restJson1VulnerablePackage - */ -const de_VulnerablePackage = (output: any, context: __SerdeContext): VulnerablePackage => { - return { - arch: __expectString(output.arch), - epoch: __expectInt32(output.epoch), - filePath: __expectString(output.filePath), - fixedInVersion: __expectString(output.fixedInVersion), - name: __expectString(output.name), - packageManager: __expectString(output.packageManager), - release: __expectString(output.release), - remediation: __expectString(output.remediation), - sourceLambdaLayerArn: __expectString(output.sourceLambdaLayerArn), - sourceLayerHash: __expectString(output.sourceLayerHash), - version: __expectString(output.version), - } as any; -}; +// de_VulnerablePackage omitted. -/** - * deserializeAws_restJson1VulnerablePackageList - */ -const de_VulnerablePackageList = (output: any, context: __SerdeContext): VulnerablePackage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VulnerablePackage(entry, context); - }); - return retVal; -}; +// de_VulnerablePackageList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-internetmonitor/src/protocols/Aws_restJson1.ts b/clients/client-internetmonitor/src/protocols/Aws_restJson1.ts index 1155f82c7da9..a216502cab6c 100644 --- a/clients/client-internetmonitor/src/protocols/Aws_restJson1.ts +++ b/clients/client-internetmonitor/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -47,9 +49,6 @@ import { InternetHealth, InternetMeasurementsLogDelivery, LimitExceededException, - Monitor, - Network, - NetworkImpairment, NotFoundException, PerformanceMeasurement, ResourceNotFoundException, @@ -73,19 +72,16 @@ export const se_CreateMonitorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20210603/Monitors"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.InternetMeasurementsLogDelivery != null && { - InternetMeasurementsLogDelivery: se_InternetMeasurementsLogDelivery( - input.InternetMeasurementsLogDelivery, - context - ), - }), - ...(input.MaxCityNetworksToMonitor != null && { MaxCityNetworksToMonitor: input.MaxCityNetworksToMonitor }), - ...(input.MonitorName != null && { MonitorName: input.MonitorName }), - ...(input.Resources != null && { Resources: se_SetOfARNs(input.Resources, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + InternetMeasurementsLogDelivery: (_) => _json(_), + MaxCityNetworksToMonitor: [], + MonitorName: [], + Resources: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -272,9 +268,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -331,19 +329,16 @@ export const se_UpdateMonitorCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v20210603/Monitors/{MonitorName}"; resolvedPath = __resolvedPath(resolvedPath, input, "MonitorName", () => input.MonitorName!, "{MonitorName}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.InternetMeasurementsLogDelivery != null && { - InternetMeasurementsLogDelivery: se_InternetMeasurementsLogDelivery( - input.InternetMeasurementsLogDelivery, - context - ), - }), - ...(input.MaxCityNetworksToMonitor != null && { MaxCityNetworksToMonitor: input.MaxCityNetworksToMonitor }), - ...(input.ResourcesToAdd != null && { ResourcesToAdd: se_SetOfARNs(input.ResourcesToAdd, context) }), - ...(input.ResourcesToRemove != null && { ResourcesToRemove: se_SetOfARNs(input.ResourcesToRemove, context) }), - ...(input.Status != null && { Status: input.Status }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + InternetMeasurementsLogDelivery: (_) => _json(_), + MaxCityNetworksToMonitor: [], + ResourcesToAdd: (_) => _json(_), + ResourcesToRemove: (_) => _json(_), + Status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -369,12 +364,11 @@ export const de_CreateMonitorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Arn: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -411,10 +405,9 @@ const de_CreateMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -464,10 +457,9 @@ const de_DeleteMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -487,36 +479,19 @@ export const de_GetHealthEventCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.EndedAt != null) { - contents.EndedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.EndedAt)); - } - if (data.EventArn != null) { - contents.EventArn = __expectString(data.EventArn); - } - if (data.EventId != null) { - contents.EventId = __expectString(data.EventId); - } - if (data.ImpactType != null) { - contents.ImpactType = __expectString(data.ImpactType); - } - if (data.ImpactedLocations != null) { - contents.ImpactedLocations = de_ImpactedLocationsList(data.ImpactedLocations, context); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastUpdatedAt)); - } - if (data.PercentOfTotalTrafficImpacted != null) { - contents.PercentOfTotalTrafficImpacted = __limitedParseDouble(data.PercentOfTotalTrafficImpacted); - } - if (data.StartedAt != null) { - contents.StartedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.StartedAt)); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + EndedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + EventArn: __expectString, + EventId: __expectString, + ImpactType: __expectString, + ImpactedLocations: (_) => de_ImpactedLocationsList(_, context), + LastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + PercentOfTotalTrafficImpacted: __limitedParseDouble, + StartedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -547,10 +522,9 @@ const de_GetHealthEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -570,42 +544,20 @@ export const de_GetMonitorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.InternetMeasurementsLogDelivery != null) { - contents.InternetMeasurementsLogDelivery = de_InternetMeasurementsLogDelivery( - data.InternetMeasurementsLogDelivery, - context - ); - } - if (data.MaxCityNetworksToMonitor != null) { - contents.MaxCityNetworksToMonitor = __expectInt32(data.MaxCityNetworksToMonitor); - } - if (data.ModifiedAt != null) { - contents.ModifiedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.ModifiedAt)); - } - if (data.MonitorArn != null) { - contents.MonitorArn = __expectString(data.MonitorArn); - } - if (data.MonitorName != null) { - contents.MonitorName = __expectString(data.MonitorName); - } - if (data.ProcessingStatus != null) { - contents.ProcessingStatus = __expectString(data.ProcessingStatus); - } - if (data.ProcessingStatusInfo != null) { - contents.ProcessingStatusInfo = __expectString(data.ProcessingStatusInfo); - } - if (data.Resources != null) { - contents.Resources = de_SetOfARNs(data.Resources, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + InternetMeasurementsLogDelivery: _json, + MaxCityNetworksToMonitor: __expectInt32, + ModifiedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MonitorArn: __expectString, + MonitorName: __expectString, + ProcessingStatus: __expectString, + ProcessingStatusInfo: __expectString, + Resources: _json, + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -636,10 +588,9 @@ const de_GetMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -659,12 +610,11 @@ export const de_ListHealthEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HealthEvents != null) { - contents.HealthEvents = de_HealthEventList(data.HealthEvents, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + HealthEvents: (_) => de_HealthEventList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -695,10 +645,9 @@ const de_ListHealthEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -718,12 +667,11 @@ export const de_ListMonitorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Monitors != null) { - contents.Monitors = de_MonitorList(data.Monitors, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Monitors: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -754,10 +702,9 @@ const de_ListMonitorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -777,9 +724,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -813,10 +761,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -869,10 +816,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -925,10 +871,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -948,12 +893,11 @@ export const de_UpdateMonitorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MonitorArn != null) { - contents.MonitorArn = __expectString(data.MonitorArn); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + MonitorArn: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -990,16 +934,15 @@ const de_UpdateMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1009,9 +952,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1025,9 +969,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1041,9 +986,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1060,9 +1006,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1079,9 +1026,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1098,9 +1046,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1114,9 +1063,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1133,9 +1083,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1149,9 +1100,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1168,9 +1120,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1184,9 +1137,10 @@ const de_TooManyRequestsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1194,83 +1148,41 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1InternetMeasurementsLogDelivery - */ -const se_InternetMeasurementsLogDelivery = (input: InternetMeasurementsLogDelivery, context: __SerdeContext): any => { - return { - ...(input.S3Config != null && { S3Config: se_S3Config(input.S3Config, context) }), - }; -}; +// se_InternetMeasurementsLogDelivery omitted. -/** - * serializeAws_restJson1S3Config - */ -const se_S3Config = (input: S3Config, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.BucketPrefix != null && { BucketPrefix: input.BucketPrefix }), - ...(input.LogDeliveryStatus != null && { LogDeliveryStatus: input.LogDeliveryStatus }), - }; -}; +// se_S3Config omitted. -/** - * serializeAws_restJson1SetOfARNs - */ -const se_SetOfARNs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SetOfARNs omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * deserializeAws_restJson1AvailabilityMeasurement */ const de_AvailabilityMeasurement = (output: any, context: __SerdeContext): AvailabilityMeasurement => { - return { - ExperienceScore: __limitedParseDouble(output.ExperienceScore), - PercentOfClientLocationImpacted: __limitedParseDouble(output.PercentOfClientLocationImpacted), - PercentOfTotalTrafficImpacted: __limitedParseDouble(output.PercentOfTotalTrafficImpacted), - } as any; + return take(output, { + ExperienceScore: __limitedParseDouble, + PercentOfClientLocationImpacted: __limitedParseDouble, + PercentOfTotalTrafficImpacted: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1HealthEvent */ const de_HealthEvent = (output: any, context: __SerdeContext): HealthEvent => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedAt)) : undefined, - EndedAt: output.EndedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndedAt)) : undefined, - EventArn: __expectString(output.EventArn), - EventId: __expectString(output.EventId), - ImpactType: __expectString(output.ImpactType), - ImpactedLocations: - output.ImpactedLocations != null ? de_ImpactedLocationsList(output.ImpactedLocations, context) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdatedAt)) - : undefined, - PercentOfTotalTrafficImpacted: __limitedParseDouble(output.PercentOfTotalTrafficImpacted), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartedAt)) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + EndedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + EventArn: __expectString, + EventId: __expectString, + ImpactType: __expectString, + ImpactedLocations: (_: any) => de_ImpactedLocationsList(_, context), + LastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + PercentOfTotalTrafficImpacted: __limitedParseDouble, + StartedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Status: __expectString, + }) as any; }; /** @@ -1280,9 +1192,6 @@ const de_HealthEventList = (output: any, context: __SerdeContext): HealthEvent[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HealthEvent(entry, context); }); return retVal; @@ -1292,22 +1201,22 @@ const de_HealthEventList = (output: any, context: __SerdeContext): HealthEvent[] * deserializeAws_restJson1ImpactedLocation */ const de_ImpactedLocation = (output: any, context: __SerdeContext): ImpactedLocation => { - return { - ASName: __expectString(output.ASName), - ASNumber: __expectLong(output.ASNumber), - CausedBy: output.CausedBy != null ? de_NetworkImpairment(output.CausedBy, context) : undefined, - City: __expectString(output.City), - Country: __expectString(output.Country), - CountryCode: __expectString(output.CountryCode), - InternetHealth: output.InternetHealth != null ? de_InternetHealth(output.InternetHealth, context) : undefined, - Latitude: __limitedParseDouble(output.Latitude), - Longitude: __limitedParseDouble(output.Longitude), - Metro: __expectString(output.Metro), - ServiceLocation: __expectString(output.ServiceLocation), - Status: __expectString(output.Status), - Subdivision: __expectString(output.Subdivision), - SubdivisionCode: __expectString(output.SubdivisionCode), - } as any; + return take(output, { + ASName: __expectString, + ASNumber: __expectLong, + CausedBy: _json, + City: __expectString, + Country: __expectString, + CountryCode: __expectString, + InternetHealth: (_: any) => de_InternetHealth(_, context), + Latitude: __limitedParseDouble, + Longitude: __limitedParseDouble, + Metro: __expectString, + ServiceLocation: __expectString, + Status: __expectString, + Subdivision: __expectString, + SubdivisionCode: __expectString, + }) as any; }; /** @@ -1317,9 +1226,6 @@ const de_ImpactedLocationsList = (output: any, context: __SerdeContext): Impacte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImpactedLocation(entry, context); }); return retVal; @@ -1329,145 +1235,52 @@ const de_ImpactedLocationsList = (output: any, context: __SerdeContext): Impacte * deserializeAws_restJson1InternetHealth */ const de_InternetHealth = (output: any, context: __SerdeContext): InternetHealth => { - return { - Availability: output.Availability != null ? de_AvailabilityMeasurement(output.Availability, context) : undefined, - Performance: output.Performance != null ? de_PerformanceMeasurement(output.Performance, context) : undefined, - } as any; + return take(output, { + Availability: (_: any) => de_AvailabilityMeasurement(_, context), + Performance: (_: any) => de_PerformanceMeasurement(_, context), + }) as any; }; -/** - * deserializeAws_restJson1InternetMeasurementsLogDelivery - */ -const de_InternetMeasurementsLogDelivery = (output: any, context: __SerdeContext): InternetMeasurementsLogDelivery => { - return { - S3Config: output.S3Config != null ? de_S3Config(output.S3Config, context) : undefined, - } as any; -}; +// de_InternetMeasurementsLogDelivery omitted. -/** - * deserializeAws_restJson1Monitor - */ -const de_Monitor = (output: any, context: __SerdeContext): Monitor => { - return { - MonitorArn: __expectString(output.MonitorArn), - MonitorName: __expectString(output.MonitorName), - ProcessingStatus: __expectString(output.ProcessingStatus), - Status: __expectString(output.Status), - } as any; -}; +// de_Monitor omitted. -/** - * deserializeAws_restJson1MonitorList - */ -const de_MonitorList = (output: any, context: __SerdeContext): Monitor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Monitor(entry, context); - }); - return retVal; -}; +// de_MonitorList omitted. -/** - * deserializeAws_restJson1Network - */ -const de_Network = (output: any, context: __SerdeContext): Network => { - return { - ASName: __expectString(output.ASName), - ASNumber: __expectLong(output.ASNumber), - } as any; -}; +// de_Network omitted. -/** - * deserializeAws_restJson1NetworkImpairment - */ -const de_NetworkImpairment = (output: any, context: __SerdeContext): NetworkImpairment => { - return { - AsPath: output.AsPath != null ? de_NetworkList(output.AsPath, context) : undefined, - NetworkEventType: __expectString(output.NetworkEventType), - Networks: output.Networks != null ? de_NetworkList(output.Networks, context) : undefined, - } as any; -}; +// de_NetworkImpairment omitted. -/** - * deserializeAws_restJson1NetworkList - */ -const de_NetworkList = (output: any, context: __SerdeContext): Network[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Network(entry, context); - }); - return retVal; -}; +// de_NetworkList omitted. /** * deserializeAws_restJson1PerformanceMeasurement */ const de_PerformanceMeasurement = (output: any, context: __SerdeContext): PerformanceMeasurement => { - return { - ExperienceScore: __limitedParseDouble(output.ExperienceScore), - PercentOfClientLocationImpacted: __limitedParseDouble(output.PercentOfClientLocationImpacted), - PercentOfTotalTrafficImpacted: __limitedParseDouble(output.PercentOfTotalTrafficImpacted), - RoundTripTime: output.RoundTripTime != null ? de_RoundTripTime(output.RoundTripTime, context) : undefined, - } as any; + return take(output, { + ExperienceScore: __limitedParseDouble, + PercentOfClientLocationImpacted: __limitedParseDouble, + PercentOfTotalTrafficImpacted: __limitedParseDouble, + RoundTripTime: (_: any) => de_RoundTripTime(_, context), + }) as any; }; /** * deserializeAws_restJson1RoundTripTime */ const de_RoundTripTime = (output: any, context: __SerdeContext): RoundTripTime => { - return { - P50: __limitedParseDouble(output.P50), - P90: __limitedParseDouble(output.P90), - P95: __limitedParseDouble(output.P95), - } as any; + return take(output, { + P50: __limitedParseDouble, + P90: __limitedParseDouble, + P95: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1S3Config - */ -const de_S3Config = (output: any, context: __SerdeContext): S3Config => { - return { - BucketName: __expectString(output.BucketName), - BucketPrefix: __expectString(output.BucketPrefix), - LogDeliveryStatus: __expectString(output.LogDeliveryStatus), - } as any; -}; +// de_S3Config omitted. -/** - * deserializeAws_restJson1SetOfARNs - */ -const de_SetOfARNs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SetOfARNs omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot-1click-devices-service/src/protocols/Aws_restJson1.ts b/clients/client-iot-1click-devices-service/src/protocols/Aws_restJson1.ts index c2d80549b196..f4fcae652d86 100644 --- a/clients/client-iot-1click-devices-service/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-1click-devices-service/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,9 +10,10 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -46,7 +48,6 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { UpdateDeviceStateCommandInput, UpdateDeviceStateCommandOutput } from "../commands/UpdateDeviceStateCommand"; import { IoT1ClickDevicesServiceServiceException as __BaseException } from "../models/IoT1ClickDevicesServiceServiceException"; import { - Attributes, Device, DeviceDescription, DeviceEvent, @@ -121,9 +122,11 @@ export const se_FinalizeDeviceClaimCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{DeviceId}/finalize-claim"; resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId!, "{DeviceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -198,10 +201,12 @@ export const se_InvokeDeviceMethodCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{DeviceId}/methods"; resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId!, "{DeviceId}", false); let body: any; - body = JSON.stringify({ - ...(input.DeviceMethod != null && { deviceMethod: se_DeviceMethod(input.DeviceMethod, context) }), - ...(input.DeviceMethodParameters != null && { deviceMethodParameters: input.DeviceMethodParameters }), - }); + body = JSON.stringify( + take(input, { + deviceMethod: [, (_) => se_DeviceMethod(_, context), `DeviceMethod`], + deviceMethodParameters: [, , `DeviceMethodParameters`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -315,9 +320,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -398,9 +405,11 @@ export const se_UpdateDeviceStateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{DeviceId}/state"; resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId!, "{DeviceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Enabled != null && { enabled: input.Enabled }), - }); + body = JSON.stringify( + take(input, { + enabled: [, , `Enabled`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -426,12 +435,11 @@ export const de_ClaimDevicesByClaimCodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.claimCode != null) { - contents.ClaimCode = __expectString(data.claimCode); - } - if (data.total != null) { - contents.Total = __expectInt32(data.total); - } + const doc = take(data, { + ClaimCode: [, __expectString, `claimCode`], + Total: [, __expectInt32, `total`], + }); + Object.assign(contents, doc); return contents; }; @@ -459,10 +467,9 @@ const de_ClaimDevicesByClaimCodeCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -482,9 +489,10 @@ export const de_DescribeDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceDescription != null) { - contents.DeviceDescription = de_DeviceDescription(data.deviceDescription, context); - } + const doc = take(data, { + DeviceDescription: [, (_) => de_DeviceDescription(_, context), `deviceDescription`], + }); + Object.assign(contents, doc); return contents; }; @@ -512,10 +520,9 @@ const de_DescribeDeviceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -535,9 +542,10 @@ export const de_FinalizeDeviceClaimCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -571,10 +579,9 @@ const de_FinalizeDeviceClaimCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -594,9 +601,10 @@ export const de_GetDeviceMethodsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceMethods != null) { - contents.DeviceMethods = de___listOfDeviceMethod(data.deviceMethods, context); - } + const doc = take(data, { + DeviceMethods: [, (_) => de___listOfDeviceMethod(_, context), `deviceMethods`], + }); + Object.assign(contents, doc); return contents; }; @@ -624,10 +632,9 @@ const de_GetDeviceMethodsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -647,9 +654,10 @@ export const de_InitiateDeviceClaimCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -680,10 +688,9 @@ const de_InitiateDeviceClaimCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -703,9 +710,10 @@ export const de_InvokeDeviceMethodCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceMethodResponse != null) { - contents.DeviceMethodResponse = __expectString(data.deviceMethodResponse); - } + const doc = take(data, { + DeviceMethodResponse: [, __expectString, `deviceMethodResponse`], + }); + Object.assign(contents, doc); return contents; }; @@ -742,10 +750,9 @@ const de_InvokeDeviceMethodCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -765,12 +772,11 @@ export const de_ListDeviceEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.events != null) { - contents.Events = de___listOfDeviceEvent(data.events, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Events: [, (_) => de___listOfDeviceEvent(_, context), `events`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -801,10 +807,9 @@ const de_ListDeviceEventsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -824,12 +829,11 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.devices != null) { - contents.Devices = de___listOfDeviceDescription(data.devices, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Devices: [, (_) => de___listOfDeviceDescription(_, context), `devices`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -857,10 +861,9 @@ const de_ListDevicesCommandError = async ( throw await de_RangeNotSatisfiableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -880,9 +883,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -907,10 +911,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -957,10 +960,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -980,9 +982,10 @@ export const de_UnclaimDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1010,10 +1013,9 @@ const de_UnclaimDeviceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1060,10 +1062,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1110,28 +1111,26 @@ const de_UpdateDeviceStateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ForbiddenExceptionRes */ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1148,12 +1147,11 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1170,12 +1168,11 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1192,12 +1189,11 @@ const de_PreconditionFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new PreconditionFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1214,12 +1210,11 @@ const de_RangeNotSatisfiableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new RangeNotSatisfiableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1236,12 +1231,11 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1258,12 +1252,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.Code = __expectString(data.code); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1271,27 +1264,16 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. /** * serializeAws_restJson1DeviceMethod */ const se_DeviceMethod = (input: DeviceMethod, context: __SerdeContext): any => { - return { - ...(input.DeviceType != null && { deviceType: input.DeviceType }), - ...(input.MethodName != null && { methodName: input.MethodName }), - }; + return take(input, { + deviceType: [, , `DeviceType`], + methodName: [, , `MethodName`], + }); }; /** @@ -1301,9 +1283,6 @@ const de___listOfDeviceDescription = (output: any, context: __SerdeContext): Dev const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeviceDescription(entry, context); }); return retVal; @@ -1316,9 +1295,6 @@ const de___listOfDeviceEvent = (output: any, context: __SerdeContext): DeviceEve const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeviceEvent(entry, context); }); return retVal; @@ -1331,91 +1307,61 @@ const de___listOfDeviceMethod = (output: any, context: __SerdeContext): DeviceMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeviceMethod(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. -/** - * deserializeAws_restJson1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Attributes => { - return {} as any; -}; +// de_Attributes omitted. /** * deserializeAws_restJson1Device */ const de_Device = (output: any, context: __SerdeContext): Device => { - return { - Attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - DeviceId: __expectString(output.deviceId), - Type: __expectString(output.type), - } as any; + return take(output, { + Attributes: [, _json, `attributes`], + DeviceId: [, __expectString, `deviceId`], + Type: [, __expectString, `type`], + }) as any; }; -/** - * deserializeAws_restJson1DeviceAttributes - */ -const de_DeviceAttributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DeviceAttributes omitted. /** * deserializeAws_restJson1DeviceDescription */ const de_DeviceDescription = (output: any, context: __SerdeContext): DeviceDescription => { - return { - Arn: __expectString(output.arn), - Attributes: output.attributes != null ? de_DeviceAttributes(output.attributes, context) : undefined, - DeviceId: __expectString(output.deviceId), - Enabled: __expectBoolean(output.enabled), - RemainingLife: __limitedParseDouble(output.remainingLife), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Attributes: [, _json, `attributes`], + DeviceId: [, __expectString, `deviceId`], + Enabled: [, __expectBoolean, `enabled`], + RemainingLife: [, __limitedParseDouble, `remainingLife`], + Tags: [, _json, `tags`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1DeviceEvent */ const de_DeviceEvent = (output: any, context: __SerdeContext): DeviceEvent => { - return { - Device: output.device != null ? de_Device(output.device, context) : undefined, - StdEvent: __expectString(output.stdEvent), - } as any; + return take(output, { + Device: (_) => [, de_Device(_, context), `device`], + StdEvent: [, __expectString, `stdEvent`], + }) as any; }; /** * deserializeAws_restJson1DeviceMethod */ const de_DeviceMethod = (output: any, context: __SerdeContext): DeviceMethod => { - return { - DeviceType: __expectString(output.deviceType), - MethodName: __expectString(output.methodName), - } as any; + return take(output, { + DeviceType: [, __expectString, `deviceType`], + MethodName: [, __expectString, `methodName`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-iot-1click-projects/src/protocols/Aws_restJson1.ts b/clients/client-iot-1click-projects/src/protocols/Aws_restJson1.ts index a8e1e7a7ef71..e6de8c50bc32 100644 --- a/clients/client-iot-1click-projects/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-1click-projects/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -93,9 +95,11 @@ export const se_AssociateDeviceWithPlacementCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.deviceId != null && { deviceId: input.deviceId }), - }); + body = JSON.stringify( + take(input, { + deviceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -122,10 +126,12 @@ export const se_CreatePlacementCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{projectName}/placements"; resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: se_PlacementAttributeMap(input.attributes, context) }), - ...(input.placementName != null && { placementName: input.placementName }), - }); + body = JSON.stringify( + take(input, { + attributes: (_) => _json(_), + placementName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -150,14 +156,14 @@ export const se_CreateProjectCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.placementTemplate != null && { - placementTemplate: se_PlacementTemplate(input.placementTemplate, context), - }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + placementTemplate: (_) => _json(_), + projectName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -448,9 +454,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -516,9 +524,11 @@ export const se_UpdatePlacementCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: se_PlacementAttributeMap(input.attributes, context) }), - }); + body = JSON.stringify( + take(input, { + attributes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -544,12 +554,12 @@ export const se_UpdateProjectCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{projectName}"; resolvedPath = __resolvedPath(resolvedPath, input, "projectName", () => input.projectName!, "{projectName}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.placementTemplate != null && { - placementTemplate: se_PlacementTemplate(input.placementTemplate, context), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + placementTemplate: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -605,10 +615,9 @@ const de_AssociateDeviceWithPlacementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -658,10 +667,9 @@ const de_CreatePlacementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -708,10 +716,9 @@ const de_CreateProjectCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -761,10 +768,9 @@ const de_DeletePlacementCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -814,10 +820,9 @@ const de_DeleteProjectCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -837,9 +842,10 @@ export const de_DescribePlacementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.placement != null) { - contents.placement = de_PlacementDescription(data.placement, context); - } + const doc = take(data, { + placement: (_) => de_PlacementDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -867,10 +873,9 @@ const de_DescribePlacementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -890,9 +895,10 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.project != null) { - contents.project = de_ProjectDescription(data.project, context); - } + const doc = take(data, { + project: (_) => de_ProjectDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -920,10 +926,9 @@ const de_DescribeProjectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -973,10 +978,9 @@ const de_DisassociateDeviceFromPlacementCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -996,9 +1000,10 @@ export const de_GetDevicesInPlacementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.devices != null) { - contents.devices = de_DeviceMap(data.devices, context); - } + const doc = take(data, { + devices: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1026,10 +1031,9 @@ const de_GetDevicesInPlacementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1049,12 +1053,11 @@ export const de_ListPlacementsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.placements != null) { - contents.placements = de_PlacementSummaryList(data.placements, context); - } + const doc = take(data, { + nextToken: __expectString, + placements: (_) => de_PlacementSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1082,10 +1085,9 @@ const de_ListPlacementsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1105,12 +1107,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.projects != null) { - contents.projects = de_ProjectSummaryList(data.projects, context); - } + const doc = take(data, { + nextToken: __expectString, + projects: (_) => de_ProjectSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1135,10 +1136,9 @@ const de_ListProjectsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1158,9 +1158,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1188,10 +1189,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1238,10 +1238,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1288,10 +1287,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1341,10 +1339,9 @@ const de_UpdatePlacementCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1394,16 +1391,15 @@ const de_UpdateProjectCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalFailureExceptionRes */ @@ -1413,12 +1409,11 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1435,12 +1430,11 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1457,12 +1451,11 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1479,12 +1472,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1501,12 +1493,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1514,206 +1505,55 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DefaultPlacementAttributeMap - */ -const se_DefaultPlacementAttributeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DefaultPlacementAttributeMap omitted. -/** - * serializeAws_restJson1DeviceCallbackOverrideMap - */ -const se_DeviceCallbackOverrideMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DeviceCallbackOverrideMap omitted. -/** - * serializeAws_restJson1DeviceTemplate - */ -const se_DeviceTemplate = (input: DeviceTemplate, context: __SerdeContext): any => { - return { - ...(input.callbackOverrides != null && { - callbackOverrides: se_DeviceCallbackOverrideMap(input.callbackOverrides, context), - }), - ...(input.deviceType != null && { deviceType: input.deviceType }), - }; -}; +// se_DeviceTemplate omitted. -/** - * serializeAws_restJson1DeviceTemplateMap - */ -const se_DeviceTemplateMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_DeviceTemplate(value, context); - return acc; - }, {}); -}; +// se_DeviceTemplateMap omitted. -/** - * serializeAws_restJson1PlacementAttributeMap - */ -const se_PlacementAttributeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PlacementAttributeMap omitted. -/** - * serializeAws_restJson1PlacementTemplate - */ -const se_PlacementTemplate = (input: PlacementTemplate, context: __SerdeContext): any => { - return { - ...(input.defaultAttributes != null && { - defaultAttributes: se_DefaultPlacementAttributeMap(input.defaultAttributes, context), - }), - ...(input.deviceTemplates != null && { deviceTemplates: se_DeviceTemplateMap(input.deviceTemplates, context) }), - }; -}; +// se_PlacementTemplate omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1DefaultPlacementAttributeMap - */ -const de_DefaultPlacementAttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DefaultPlacementAttributeMap omitted. -/** - * deserializeAws_restJson1DeviceCallbackOverrideMap - */ -const de_DeviceCallbackOverrideMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DeviceCallbackOverrideMap omitted. -/** - * deserializeAws_restJson1DeviceMap - */ -const de_DeviceMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DeviceMap omitted. -/** - * deserializeAws_restJson1DeviceTemplate - */ -const de_DeviceTemplate = (output: any, context: __SerdeContext): DeviceTemplate => { - return { - callbackOverrides: - output.callbackOverrides != null ? de_DeviceCallbackOverrideMap(output.callbackOverrides, context) : undefined, - deviceType: __expectString(output.deviceType), - } as any; -}; +// de_DeviceTemplate omitted. -/** - * deserializeAws_restJson1DeviceTemplateMap - */ -const de_DeviceTemplateMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_DeviceTemplate(value, context); - return acc; - }, {}); -}; +// de_DeviceTemplateMap omitted. -/** - * deserializeAws_restJson1PlacementAttributeMap - */ -const de_PlacementAttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PlacementAttributeMap omitted. /** * deserializeAws_restJson1PlacementDescription */ const de_PlacementDescription = (output: any, context: __SerdeContext): PlacementDescription => { - return { - attributes: output.attributes != null ? de_PlacementAttributeMap(output.attributes, context) : undefined, - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - placementName: __expectString(output.placementName), - projectName: __expectString(output.projectName), - updatedDate: - output.updatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedDate))) - : undefined, - } as any; + return take(output, { + attributes: _json, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + placementName: __expectString, + projectName: __expectString, + updatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1PlacementSummary */ const de_PlacementSummary = (output: any, context: __SerdeContext): PlacementSummary => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - placementName: __expectString(output.placementName), - projectName: __expectString(output.projectName), - updatedDate: - output.updatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedDate))) - : undefined, - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + placementName: __expectString, + projectName: __expectString, + updatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1723,64 +1563,39 @@ const de_PlacementSummaryList = (output: any, context: __SerdeContext): Placemen const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PlacementSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PlacementTemplate - */ -const de_PlacementTemplate = (output: any, context: __SerdeContext): PlacementTemplate => { - return { - defaultAttributes: - output.defaultAttributes != null ? de_DefaultPlacementAttributeMap(output.defaultAttributes, context) : undefined, - deviceTemplates: output.deviceTemplates != null ? de_DeviceTemplateMap(output.deviceTemplates, context) : undefined, - } as any; -}; +// de_PlacementTemplate omitted. /** * deserializeAws_restJson1ProjectDescription */ const de_ProjectDescription = (output: any, context: __SerdeContext): ProjectDescription => { - return { - arn: __expectString(output.arn), - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - placementTemplate: - output.placementTemplate != null ? de_PlacementTemplate(output.placementTemplate, context) : undefined, - projectName: __expectString(output.projectName), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - updatedDate: - output.updatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedDate))) - : undefined, - } as any; + return take(output, { + arn: __expectString, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + placementTemplate: _json, + projectName: __expectString, + tags: _json, + updatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1ProjectSummary */ const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - arn: __expectString(output.arn), - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - projectName: __expectString(output.projectName), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - updatedDate: - output.updatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedDate))) - : undefined, - } as any; + return take(output, { + arn: __expectString, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + projectName: __expectString, + tags: _json, + updatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1790,26 +1605,12 @@ const de_ProjectSummaryList = (output: any, context: __SerdeContext): ProjectSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot-data-plane/src/protocols/Aws_restJson1.ts b/clients/client-iot-data-plane/src/protocols/Aws_restJson1.ts index 7464da5e9706..14ba057b29f7 100644 --- a/clients/client-iot-data-plane/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-data-plane/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,9 +10,10 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -40,7 +42,6 @@ import { MethodNotAllowedException, RequestEntityTooLargeException, ResourceNotFoundException, - RetainedMessageSummary, ServiceUnavailableException, ThrottlingException, UnauthorizedException, @@ -315,10 +316,9 @@ const de_DeleteThingShadowCommandError = async ( throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -338,21 +338,14 @@ export const de_GetRetainedMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectLong(data.lastModifiedTime); - } - if (data.payload != null) { - contents.payload = context.base64Decoder(data.payload); - } - if (data.qos != null) { - contents.qos = __expectInt32(data.qos); - } - if (data.topic != null) { - contents.topic = __expectString(data.topic); - } - if (data.userProperties != null) { - contents.userProperties = context.base64Decoder(data.userProperties); - } + const doc = take(data, { + lastModifiedTime: __expectLong, + payload: context.base64Decoder, + qos: __expectInt32, + topic: __expectString, + userProperties: context.base64Decoder, + }); + Object.assign(contents, doc); return contents; }; @@ -392,10 +385,9 @@ const de_GetRetainedMessageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -458,10 +450,9 @@ const de_GetThingShadowCommandError = async ( throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -481,15 +472,12 @@ export const de_ListNamedShadowsForThingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.results != null) { - contents.results = de_NamedShadowList(data.results, context); - } - if (data.timestamp != null) { - contents.timestamp = __expectLong(data.timestamp); - } + const doc = take(data, { + nextToken: __expectString, + results: _json, + timestamp: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -529,10 +517,9 @@ const de_ListNamedShadowsForThingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -552,12 +539,11 @@ export const de_ListRetainedMessagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.retainedTopics != null) { - contents.retainedTopics = de_RetainedMessageList(data.retainedTopics, context); - } + const doc = take(data, { + nextToken: __expectString, + retainedTopics: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -594,10 +580,9 @@ const de_ListRetainedMessagesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -650,10 +635,9 @@ const de_PublishCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -719,25 +703,25 @@ const de_UpdateThingShadowCommandError = async ( throw await de_UnsupportedDocumentEncodingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -754,9 +738,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -773,9 +758,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -792,9 +778,10 @@ const de_MethodNotAllowedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MethodNotAllowedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -811,9 +798,10 @@ const de_RequestEntityTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestEntityTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -830,9 +818,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -849,9 +838,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -865,9 +855,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -884,9 +875,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -903,9 +895,10 @@ const de_UnsupportedDocumentEncodingExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedDocumentEncodingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -913,47 +906,11 @@ const de_UnsupportedDocumentEncodingExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1NamedShadowList - */ -const de_NamedShadowList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NamedShadowList omitted. -/** - * deserializeAws_restJson1RetainedMessageList - */ -const de_RetainedMessageList = (output: any, context: __SerdeContext): RetainedMessageSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RetainedMessageSummary(entry, context); - }); - return retVal; -}; +// de_RetainedMessageList omitted. -/** - * deserializeAws_restJson1RetainedMessageSummary - */ -const de_RetainedMessageSummary = (output: any, context: __SerdeContext): RetainedMessageSummary => { - return { - lastModifiedTime: __expectLong(output.lastModifiedTime), - payloadSize: __expectLong(output.payloadSize), - qos: __expectInt32(output.qos), - topic: __expectString(output.topic), - } as any; -}; +// de_RetainedMessageSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot-events-data/src/protocols/Aws_restJson1.ts b/clients/client-iot-events-data/src/protocols/Aws_restJson1.ts index 3078a58e71b3..8c962db305e7 100644 --- a/clients/client-iot-events-data/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-events-data/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -42,45 +44,28 @@ import { ListAlarmsCommandInput, ListAlarmsCommandOutput } from "../commands/Lis import { ListDetectorsCommandInput, ListDetectorsCommandOutput } from "../commands/ListDetectorsCommand"; import { IoTEventsDataServiceException as __BaseException } from "../models/IoTEventsDataServiceException"; import { - AcknowledgeActionConfiguration, AcknowledgeAlarmActionRequest, Alarm, - AlarmState, AlarmSummary, - BatchAlarmActionErrorEntry, - BatchDeleteDetectorErrorEntry, - BatchPutMessageErrorEntry, - BatchUpdateDetectorErrorEntry, - CustomerAction, DeleteDetectorRequest, Detector, DetectorState, DetectorStateDefinition, - DetectorStateSummary, DetectorSummary, - DisableActionConfiguration, DisableAlarmActionRequest, - EnableActionConfiguration, EnableAlarmActionRequest, InternalFailureException, InvalidRequestException, Message, - ResetActionConfiguration, ResetAlarmActionRequest, ResourceNotFoundException, - RuleEvaluation, ServiceUnavailableException, - SimpleRuleEvaluation, - SnoozeActionConfiguration, SnoozeAlarmActionRequest, - StateChangeConfiguration, - SystemEvent, ThrottlingException, Timer, TimerDefinition, TimestampValue, UpdateDetectorRequest, - Variable, VariableDefinition, } from "../models/models_0"; @@ -97,11 +82,11 @@ export const se_BatchAcknowledgeAlarmCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarms/acknowledge"; let body: any; - body = JSON.stringify({ - ...(input.acknowledgeActionRequests != null && { - acknowledgeActionRequests: se_AcknowledgeAlarmActionRequests(input.acknowledgeActionRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + acknowledgeActionRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -126,9 +111,11 @@ export const se_BatchDeleteDetectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detectors/delete"; let body: any; - body = JSON.stringify({ - ...(input.detectors != null && { detectors: se_DeleteDetectorRequests(input.detectors, context) }), - }); + body = JSON.stringify( + take(input, { + detectors: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -153,11 +140,11 @@ export const se_BatchDisableAlarmCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarms/disable"; let body: any; - body = JSON.stringify({ - ...(input.disableActionRequests != null && { - disableActionRequests: se_DisableAlarmActionRequests(input.disableActionRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + disableActionRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -182,11 +169,11 @@ export const se_BatchEnableAlarmCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarms/enable"; let body: any; - body = JSON.stringify({ - ...(input.enableActionRequests != null && { - enableActionRequests: se_EnableAlarmActionRequests(input.enableActionRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + enableActionRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -211,9 +198,11 @@ export const se_BatchPutMessageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/inputs/messages"; let body: any; - body = JSON.stringify({ - ...(input.messages != null && { messages: se_Messages(input.messages, context) }), - }); + body = JSON.stringify( + take(input, { + messages: (_) => se_Messages(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -238,11 +227,11 @@ export const se_BatchResetAlarmCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarms/reset"; let body: any; - body = JSON.stringify({ - ...(input.resetActionRequests != null && { - resetActionRequests: se_ResetAlarmActionRequests(input.resetActionRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + resetActionRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -267,11 +256,11 @@ export const se_BatchSnoozeAlarmCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarms/snooze"; let body: any; - body = JSON.stringify({ - ...(input.snoozeActionRequests != null && { - snoozeActionRequests: se_SnoozeAlarmActionRequests(input.snoozeActionRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + snoozeActionRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -296,9 +285,11 @@ export const se_BatchUpdateDetectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detectors"; let body: any; - body = JSON.stringify({ - ...(input.detectors != null && { detectors: se_UpdateDetectorRequests(input.detectors, context) }), - }); + body = JSON.stringify( + take(input, { + detectors: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -466,9 +457,10 @@ export const de_BatchAcknowledgeAlarmCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchAlarmActionErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -499,10 +491,9 @@ const de_BatchAcknowledgeAlarmCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -522,12 +513,10 @@ export const de_BatchDeleteDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.batchDeleteDetectorErrorEntries != null) { - contents.batchDeleteDetectorErrorEntries = de_BatchDeleteDetectorErrorEntries( - data.batchDeleteDetectorErrorEntries, - context - ); - } + const doc = take(data, { + batchDeleteDetectorErrorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -558,10 +547,9 @@ const de_BatchDeleteDetectorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -581,9 +569,10 @@ export const de_BatchDisableAlarmCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchAlarmActionErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -614,10 +603,9 @@ const de_BatchDisableAlarmCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -637,9 +625,10 @@ export const de_BatchEnableAlarmCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchAlarmActionErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -670,10 +659,9 @@ const de_BatchEnableAlarmCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -693,9 +681,10 @@ export const de_BatchPutMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BatchPutMessageErrorEntries != null) { - contents.BatchPutMessageErrorEntries = de_BatchPutMessageErrorEntries(data.BatchPutMessageErrorEntries, context); - } + const doc = take(data, { + BatchPutMessageErrorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -726,10 +715,9 @@ const de_BatchPutMessageCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -749,9 +737,10 @@ export const de_BatchResetAlarmCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchAlarmActionErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -782,10 +771,9 @@ const de_BatchResetAlarmCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -805,9 +793,10 @@ export const de_BatchSnoozeAlarmCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchAlarmActionErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -838,10 +827,9 @@ const de_BatchSnoozeAlarmCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -861,12 +849,10 @@ export const de_BatchUpdateDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.batchUpdateDetectorErrorEntries != null) { - contents.batchUpdateDetectorErrorEntries = de_BatchUpdateDetectorErrorEntries( - data.batchUpdateDetectorErrorEntries, - context - ); - } + const doc = take(data, { + batchUpdateDetectorErrorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -897,10 +883,9 @@ const de_BatchUpdateDetectorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -920,9 +905,10 @@ export const de_DescribeAlarmCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarm != null) { - contents.alarm = de_Alarm(data.alarm, context); - } + const doc = take(data, { + alarm: (_) => de_Alarm(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -956,10 +942,9 @@ const de_DescribeAlarmCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -979,9 +964,10 @@ export const de_DescribeDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detector != null) { - contents.detector = de_Detector(data.detector, context); - } + const doc = take(data, { + detector: (_) => de_Detector(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1015,10 +1001,9 @@ const de_DescribeDetectorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1038,12 +1023,11 @@ export const de_ListAlarmsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmSummaries != null) { - contents.alarmSummaries = de_AlarmSummaries(data.alarmSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + alarmSummaries: (_) => de_AlarmSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1077,10 +1061,9 @@ const de_ListAlarmsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1100,12 +1083,11 @@ export const de_ListDetectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorSummaries != null) { - contents.detectorSummaries = de_DetectorSummaries(data.detectorSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + detectorSummaries: (_) => de_DetectorSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1139,16 +1121,15 @@ const de_ListDetectorsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalFailureExceptionRes */ @@ -1158,9 +1139,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1177,9 +1159,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1196,9 +1179,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1215,9 +1199,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1231,9 +1216,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1241,118 +1227,34 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AcknowledgeAlarmActionRequest - */ -const se_AcknowledgeAlarmActionRequest = (input: AcknowledgeAlarmActionRequest, context: __SerdeContext): any => { - return { - ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.note != null && { note: input.note }), - ...(input.requestId != null && { requestId: input.requestId }), - }; -}; +// se_AcknowledgeAlarmActionRequest omitted. -/** - * serializeAws_restJson1AcknowledgeAlarmActionRequests - */ -const se_AcknowledgeAlarmActionRequests = (input: AcknowledgeAlarmActionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AcknowledgeAlarmActionRequest(entry, context); - }); -}; +// se_AcknowledgeAlarmActionRequests omitted. -/** - * serializeAws_restJson1DeleteDetectorRequest - */ -const se_DeleteDetectorRequest = (input: DeleteDetectorRequest, context: __SerdeContext): any => { - return { - ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.messageId != null && { messageId: input.messageId }), - }; -}; +// se_DeleteDetectorRequest omitted. -/** - * serializeAws_restJson1DeleteDetectorRequests - */ -const se_DeleteDetectorRequests = (input: DeleteDetectorRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeleteDetectorRequest(entry, context); - }); -}; +// se_DeleteDetectorRequests omitted. -/** - * serializeAws_restJson1DetectorStateDefinition - */ -const se_DetectorStateDefinition = (input: DetectorStateDefinition, context: __SerdeContext): any => { - return { - ...(input.stateName != null && { stateName: input.stateName }), - ...(input.timers != null && { timers: se_TimerDefinitions(input.timers, context) }), - ...(input.variables != null && { variables: se_VariableDefinitions(input.variables, context) }), - }; -}; +// se_DetectorStateDefinition omitted. -/** - * serializeAws_restJson1DisableAlarmActionRequest - */ -const se_DisableAlarmActionRequest = (input: DisableAlarmActionRequest, context: __SerdeContext): any => { - return { - ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.note != null && { note: input.note }), - ...(input.requestId != null && { requestId: input.requestId }), - }; -}; +// se_DisableAlarmActionRequest omitted. -/** - * serializeAws_restJson1DisableAlarmActionRequests - */ -const se_DisableAlarmActionRequests = (input: DisableAlarmActionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DisableAlarmActionRequest(entry, context); - }); -}; +// se_DisableAlarmActionRequests omitted. -/** - * serializeAws_restJson1EnableAlarmActionRequest - */ -const se_EnableAlarmActionRequest = (input: EnableAlarmActionRequest, context: __SerdeContext): any => { - return { - ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.note != null && { note: input.note }), - ...(input.requestId != null && { requestId: input.requestId }), - }; -}; +// se_EnableAlarmActionRequest omitted. -/** - * serializeAws_restJson1EnableAlarmActionRequests - */ -const se_EnableAlarmActionRequests = (input: EnableAlarmActionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnableAlarmActionRequest(entry, context); - }); -}; +// se_EnableAlarmActionRequests omitted. /** * serializeAws_restJson1Message */ const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.inputName != null && { inputName: input.inputName }), - ...(input.messageId != null && { messageId: input.messageId }), - ...(input.payload != null && { payload: context.base64Encoder(input.payload) }), - ...(input.timestamp != null && { timestamp: se_TimestampValue(input.timestamp, context) }), - }; + return take(input, { + inputName: [], + messageId: [], + payload: context.base64Encoder, + timestamp: _json, + }); }; /** @@ -1366,168 +1268,46 @@ const se_Messages = (input: Message[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1ResetAlarmActionRequest - */ -const se_ResetAlarmActionRequest = (input: ResetAlarmActionRequest, context: __SerdeContext): any => { - return { - ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.note != null && { note: input.note }), - ...(input.requestId != null && { requestId: input.requestId }), - }; -}; +// se_ResetAlarmActionRequest omitted. -/** - * serializeAws_restJson1ResetAlarmActionRequests - */ -const se_ResetAlarmActionRequests = (input: ResetAlarmActionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResetAlarmActionRequest(entry, context); - }); -}; +// se_ResetAlarmActionRequests omitted. -/** - * serializeAws_restJson1SnoozeAlarmActionRequest - */ -const se_SnoozeAlarmActionRequest = (input: SnoozeAlarmActionRequest, context: __SerdeContext): any => { - return { - ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.note != null && { note: input.note }), - ...(input.requestId != null && { requestId: input.requestId }), - ...(input.snoozeDuration != null && { snoozeDuration: input.snoozeDuration }), - }; -}; +// se_SnoozeAlarmActionRequest omitted. -/** - * serializeAws_restJson1SnoozeAlarmActionRequests - */ -const se_SnoozeAlarmActionRequests = (input: SnoozeAlarmActionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SnoozeAlarmActionRequest(entry, context); - }); -}; +// se_SnoozeAlarmActionRequests omitted. -/** - * serializeAws_restJson1TimerDefinition - */ -const se_TimerDefinition = (input: TimerDefinition, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.seconds != null && { seconds: input.seconds }), - }; -}; +// se_TimerDefinition omitted. -/** - * serializeAws_restJson1TimerDefinitions - */ -const se_TimerDefinitions = (input: TimerDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TimerDefinition(entry, context); - }); -}; +// se_TimerDefinitions omitted. -/** - * serializeAws_restJson1TimestampValue - */ -const se_TimestampValue = (input: TimestampValue, context: __SerdeContext): any => { - return { - ...(input.timeInMillis != null && { timeInMillis: input.timeInMillis }), - }; -}; +// se_TimestampValue omitted. -/** - * serializeAws_restJson1UpdateDetectorRequest - */ -const se_UpdateDetectorRequest = (input: UpdateDetectorRequest, context: __SerdeContext): any => { - return { - ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - ...(input.messageId != null && { messageId: input.messageId }), - ...(input.state != null && { state: se_DetectorStateDefinition(input.state, context) }), - }; -}; +// se_UpdateDetectorRequest omitted. -/** - * serializeAws_restJson1UpdateDetectorRequests - */ -const se_UpdateDetectorRequests = (input: UpdateDetectorRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateDetectorRequest(entry, context); - }); -}; +// se_UpdateDetectorRequests omitted. -/** - * serializeAws_restJson1VariableDefinition - */ -const se_VariableDefinition = (input: VariableDefinition, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_VariableDefinition omitted. -/** - * serializeAws_restJson1VariableDefinitions - */ -const se_VariableDefinitions = (input: VariableDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VariableDefinition(entry, context); - }); -}; +// se_VariableDefinitions omitted. -/** - * deserializeAws_restJson1AcknowledgeActionConfiguration - */ -const de_AcknowledgeActionConfiguration = (output: any, context: __SerdeContext): AcknowledgeActionConfiguration => { - return { - note: __expectString(output.note), - } as any; -}; +// de_AcknowledgeActionConfiguration omitted. /** * deserializeAws_restJson1Alarm */ const de_Alarm = (output: any, context: __SerdeContext): Alarm => { - return { - alarmModelName: __expectString(output.alarmModelName), - alarmModelVersion: __expectString(output.alarmModelVersion), - alarmState: output.alarmState != null ? de_AlarmState(output.alarmState, context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - keyValue: __expectString(output.keyValue), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - severity: __expectInt32(output.severity), - } as any; + return take(output, { + alarmModelName: __expectString, + alarmModelVersion: __expectString, + alarmState: _json, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + keyValue: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + severity: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1AlarmState - */ -const de_AlarmState = (output: any, context: __SerdeContext): AlarmState => { - return { - customerAction: output.customerAction != null ? de_CustomerAction(output.customerAction, context) : undefined, - ruleEvaluation: output.ruleEvaluation != null ? de_RuleEvaluation(output.ruleEvaluation, context) : undefined, - stateName: __expectString(output.stateName), - systemEvent: output.systemEvent != null ? de_SystemEvent(output.systemEvent, context) : undefined, - } as any; -}; +// de_AlarmState omitted. /** * deserializeAws_restJson1AlarmSummaries @@ -1536,9 +1316,6 @@ const de_AlarmSummaries = (output: any, context: __SerdeContext): AlarmSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AlarmSummary(entry, context); }); return retVal; @@ -1548,194 +1325,60 @@ const de_AlarmSummaries = (output: any, context: __SerdeContext): AlarmSummary[] * deserializeAws_restJson1AlarmSummary */ const de_AlarmSummary = (output: any, context: __SerdeContext): AlarmSummary => { - return { - alarmModelName: __expectString(output.alarmModelName), - alarmModelVersion: __expectString(output.alarmModelVersion), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - keyValue: __expectString(output.keyValue), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - stateName: __expectString(output.stateName), - } as any; + return take(output, { + alarmModelName: __expectString, + alarmModelVersion: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + keyValue: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BatchAlarmActionErrorEntries - */ -const de_BatchAlarmActionErrorEntries = (output: any, context: __SerdeContext): BatchAlarmActionErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchAlarmActionErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchAlarmActionErrorEntries omitted. -/** - * deserializeAws_restJson1BatchAlarmActionErrorEntry - */ -const de_BatchAlarmActionErrorEntry = (output: any, context: __SerdeContext): BatchAlarmActionErrorEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - requestId: __expectString(output.requestId), - } as any; -}; +// de_BatchAlarmActionErrorEntry omitted. -/** - * deserializeAws_restJson1BatchDeleteDetectorErrorEntries - */ -const de_BatchDeleteDetectorErrorEntries = (output: any, context: __SerdeContext): BatchDeleteDetectorErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteDetectorErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchDeleteDetectorErrorEntries omitted. -/** - * deserializeAws_restJson1BatchDeleteDetectorErrorEntry - */ -const de_BatchDeleteDetectorErrorEntry = (output: any, context: __SerdeContext): BatchDeleteDetectorErrorEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - messageId: __expectString(output.messageId), - } as any; -}; +// de_BatchDeleteDetectorErrorEntry omitted. -/** - * deserializeAws_restJson1BatchPutMessageErrorEntries - */ -const de_BatchPutMessageErrorEntries = (output: any, context: __SerdeContext): BatchPutMessageErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutMessageErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchPutMessageErrorEntries omitted. -/** - * deserializeAws_restJson1BatchPutMessageErrorEntry - */ -const de_BatchPutMessageErrorEntry = (output: any, context: __SerdeContext): BatchPutMessageErrorEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - messageId: __expectString(output.messageId), - } as any; -}; +// de_BatchPutMessageErrorEntry omitted. -/** - * deserializeAws_restJson1BatchUpdateDetectorErrorEntries - */ -const de_BatchUpdateDetectorErrorEntries = (output: any, context: __SerdeContext): BatchUpdateDetectorErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchUpdateDetectorErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchUpdateDetectorErrorEntries omitted. -/** - * deserializeAws_restJson1BatchUpdateDetectorErrorEntry - */ -const de_BatchUpdateDetectorErrorEntry = (output: any, context: __SerdeContext): BatchUpdateDetectorErrorEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - messageId: __expectString(output.messageId), - } as any; -}; +// de_BatchUpdateDetectorErrorEntry omitted. -/** - * deserializeAws_restJson1CustomerAction - */ -const de_CustomerAction = (output: any, context: __SerdeContext): CustomerAction => { - return { - acknowledgeActionConfiguration: - output.acknowledgeActionConfiguration != null - ? de_AcknowledgeActionConfiguration(output.acknowledgeActionConfiguration, context) - : undefined, - actionName: __expectString(output.actionName), - disableActionConfiguration: - output.disableActionConfiguration != null - ? de_DisableActionConfiguration(output.disableActionConfiguration, context) - : undefined, - enableActionConfiguration: - output.enableActionConfiguration != null - ? de_EnableActionConfiguration(output.enableActionConfiguration, context) - : undefined, - resetActionConfiguration: - output.resetActionConfiguration != null - ? de_ResetActionConfiguration(output.resetActionConfiguration, context) - : undefined, - snoozeActionConfiguration: - output.snoozeActionConfiguration != null - ? de_SnoozeActionConfiguration(output.snoozeActionConfiguration, context) - : undefined, - } as any; -}; +// de_CustomerAction omitted. /** * deserializeAws_restJson1Detector */ const de_Detector = (output: any, context: __SerdeContext): Detector => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - detectorModelName: __expectString(output.detectorModelName), - detectorModelVersion: __expectString(output.detectorModelVersion), - keyValue: __expectString(output.keyValue), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - state: output.state != null ? de_DetectorState(output.state, context) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + detectorModelName: __expectString, + detectorModelVersion: __expectString, + keyValue: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: (_: any) => de_DetectorState(_, context), + }) as any; }; /** * deserializeAws_restJson1DetectorState */ const de_DetectorState = (output: any, context: __SerdeContext): DetectorState => { - return { - stateName: __expectString(output.stateName), - timers: output.timers != null ? de_Timers(output.timers, context) : undefined, - variables: output.variables != null ? de_Variables(output.variables, context) : undefined, - } as any; + return take(output, { + stateName: __expectString, + timers: (_: any) => de_Timers(_, context), + variables: _json, + }) as any; }; -/** - * deserializeAws_restJson1DetectorStateSummary - */ -const de_DetectorStateSummary = (output: any, context: __SerdeContext): DetectorStateSummary => { - return { - stateName: __expectString(output.stateName), - } as any; -}; +// de_DetectorStateSummary omitted. /** * deserializeAws_restJson1DetectorSummaries @@ -1744,9 +1387,6 @@ const de_DetectorSummaries = (output: any, context: __SerdeContext): DetectorSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DetectorSummary(entry, context); }); return retVal; @@ -1756,111 +1396,40 @@ const de_DetectorSummaries = (output: any, context: __SerdeContext): DetectorSum * deserializeAws_restJson1DetectorSummary */ const de_DetectorSummary = (output: any, context: __SerdeContext): DetectorSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - detectorModelName: __expectString(output.detectorModelName), - detectorModelVersion: __expectString(output.detectorModelVersion), - keyValue: __expectString(output.keyValue), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - state: output.state != null ? de_DetectorStateSummary(output.state, context) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + detectorModelName: __expectString, + detectorModelVersion: __expectString, + keyValue: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: _json, + }) as any; }; -/** - * deserializeAws_restJson1DisableActionConfiguration - */ -const de_DisableActionConfiguration = (output: any, context: __SerdeContext): DisableActionConfiguration => { - return { - note: __expectString(output.note), - } as any; -}; +// de_DisableActionConfiguration omitted. -/** - * deserializeAws_restJson1EnableActionConfiguration - */ -const de_EnableActionConfiguration = (output: any, context: __SerdeContext): EnableActionConfiguration => { - return { - note: __expectString(output.note), - } as any; -}; +// de_EnableActionConfiguration omitted. -/** - * deserializeAws_restJson1ResetActionConfiguration - */ -const de_ResetActionConfiguration = (output: any, context: __SerdeContext): ResetActionConfiguration => { - return { - note: __expectString(output.note), - } as any; -}; +// de_ResetActionConfiguration omitted. -/** - * deserializeAws_restJson1RuleEvaluation - */ -const de_RuleEvaluation = (output: any, context: __SerdeContext): RuleEvaluation => { - return { - simpleRuleEvaluation: - output.simpleRuleEvaluation != null ? de_SimpleRuleEvaluation(output.simpleRuleEvaluation, context) : undefined, - } as any; -}; +// de_RuleEvaluation omitted. -/** - * deserializeAws_restJson1SimpleRuleEvaluation - */ -const de_SimpleRuleEvaluation = (output: any, context: __SerdeContext): SimpleRuleEvaluation => { - return { - inputPropertyValue: __expectString(output.inputPropertyValue), - operator: __expectString(output.operator), - thresholdValue: __expectString(output.thresholdValue), - } as any; -}; +// de_SimpleRuleEvaluation omitted. -/** - * deserializeAws_restJson1SnoozeActionConfiguration - */ -const de_SnoozeActionConfiguration = (output: any, context: __SerdeContext): SnoozeActionConfiguration => { - return { - note: __expectString(output.note), - snoozeDuration: __expectInt32(output.snoozeDuration), - } as any; -}; +// de_SnoozeActionConfiguration omitted. -/** - * deserializeAws_restJson1StateChangeConfiguration - */ -const de_StateChangeConfiguration = (output: any, context: __SerdeContext): StateChangeConfiguration => { - return { - triggerType: __expectString(output.triggerType), - } as any; -}; +// de_StateChangeConfiguration omitted. -/** - * deserializeAws_restJson1SystemEvent - */ -const de_SystemEvent = (output: any, context: __SerdeContext): SystemEvent => { - return { - eventType: __expectString(output.eventType), - stateChangeConfiguration: - output.stateChangeConfiguration != null - ? de_StateChangeConfiguration(output.stateChangeConfiguration, context) - : undefined, - } as any; -}; +// de_SystemEvent omitted. /** * deserializeAws_restJson1Timer */ const de_Timer = (output: any, context: __SerdeContext): Timer => { - return { - name: __expectString(output.name), - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - } as any; + return take(output, { + name: __expectString, + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1870,38 +1439,14 @@ const de_Timers = (output: any, context: __SerdeContext): Timer[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Timer(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Variable - */ -const de_Variable = (output: any, context: __SerdeContext): Variable => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_Variable omitted. -/** - * deserializeAws_restJson1Variables - */ -const de_Variables = (output: any, context: __SerdeContext): Variable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Variable(entry, context); - }); - return retVal; -}; +// de_Variables omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot-events/src/protocols/Aws_restJson1.ts b/clients/client-iot-events/src/protocols/Aws_restJson1.ts index 56c1cebc41c8..1cf949ae801e 100644 --- a/clients/client-iot-events/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-events/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -90,8 +91,6 @@ import { AlarmModelVersionSummary, AlarmNotification, AlarmRule, - AnalysisResult, - AnalysisResultLocation, AssetPropertyTimestamp, AssetPropertyValue, AssetPropertyVariant, @@ -138,7 +137,6 @@ import { ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, - RoutedResource, ServiceUnavailableException, SetTimerAction, SetVariableAction, @@ -167,24 +165,20 @@ export const se_CreateAlarmModelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/alarm-models"; let body: any; - body = JSON.stringify({ - ...(input.alarmCapabilities != null && { - alarmCapabilities: se_AlarmCapabilities(input.alarmCapabilities, context), - }), - ...(input.alarmEventActions != null && { - alarmEventActions: se_AlarmEventActions(input.alarmEventActions, context), - }), - ...(input.alarmModelDescription != null && { alarmModelDescription: input.alarmModelDescription }), - ...(input.alarmModelName != null && { alarmModelName: input.alarmModelName }), - ...(input.alarmNotification != null && { - alarmNotification: se_AlarmNotification(input.alarmNotification, context), - }), - ...(input.alarmRule != null && { alarmRule: se_AlarmRule(input.alarmRule, context) }), - ...(input.key != null && { key: input.key }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.severity != null && { severity: input.severity }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + alarmCapabilities: (_) => _json(_), + alarmEventActions: (_) => _json(_), + alarmModelDescription: [], + alarmModelName: [], + alarmNotification: (_) => _json(_), + alarmRule: (_) => _json(_), + key: [], + roleArn: [], + severity: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -209,17 +203,17 @@ export const se_CreateDetectorModelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detector-models"; let body: any; - body = JSON.stringify({ - ...(input.detectorModelDefinition != null && { - detectorModelDefinition: se_DetectorModelDefinition(input.detectorModelDefinition, context), - }), - ...(input.detectorModelDescription != null && { detectorModelDescription: input.detectorModelDescription }), - ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }), - ...(input.evaluationMethod != null && { evaluationMethod: input.evaluationMethod }), - ...(input.key != null && { key: input.key }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context), + detectorModelDescription: [], + detectorModelName: [], + evaluationMethod: [], + key: [], + roleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -244,12 +238,14 @@ export const se_CreateInputCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/inputs"; let body: any; - body = JSON.stringify({ - ...(input.inputDefinition != null && { inputDefinition: se_InputDefinition(input.inputDefinition, context) }), - ...(input.inputDescription != null && { inputDescription: input.inputDescription }), - ...(input.inputName != null && { inputName: input.inputName }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + inputDefinition: (_) => _json(_), + inputDescription: [], + inputName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -658,11 +654,13 @@ export const se_ListInputRoutingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/input-routings"; let body: any; - body = JSON.stringify({ - ...(input.inputIdentifier != null && { inputIdentifier: se_InputIdentifier(input.inputIdentifier, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + inputIdentifier: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -740,9 +738,11 @@ export const se_PutLoggingOptionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging"; let body: any; - body = JSON.stringify({ - ...(input.loggingOptions != null && { loggingOptions: se_LoggingOptions(input.loggingOptions, context) }), - }); + body = JSON.stringify( + take(input, { + loggingOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -768,11 +768,11 @@ export const se_StartDetectorModelAnalysisCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/analysis/detector-models"; let body: any; - body = JSON.stringify({ - ...(input.detectorModelDefinition != null && { - detectorModelDefinition: se_DetectorModelDefinition(input.detectorModelDefinition, context), - }), - }); + body = JSON.stringify( + take(input, { + detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -800,9 +800,11 @@ export const se_TagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -867,21 +869,17 @@ export const se_UpdateAlarmModelCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.alarmCapabilities != null && { - alarmCapabilities: se_AlarmCapabilities(input.alarmCapabilities, context), - }), - ...(input.alarmEventActions != null && { - alarmEventActions: se_AlarmEventActions(input.alarmEventActions, context), - }), - ...(input.alarmModelDescription != null && { alarmModelDescription: input.alarmModelDescription }), - ...(input.alarmNotification != null && { - alarmNotification: se_AlarmNotification(input.alarmNotification, context), - }), - ...(input.alarmRule != null && { alarmRule: se_AlarmRule(input.alarmRule, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.severity != null && { severity: input.severity }), - }); + body = JSON.stringify( + take(input, { + alarmCapabilities: (_) => _json(_), + alarmEventActions: (_) => _json(_), + alarmModelDescription: [], + alarmNotification: (_) => _json(_), + alarmRule: (_) => _json(_), + roleArn: [], + severity: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -915,14 +913,14 @@ export const se_UpdateDetectorModelCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.detectorModelDefinition != null && { - detectorModelDefinition: se_DetectorModelDefinition(input.detectorModelDefinition, context), - }), - ...(input.detectorModelDescription != null && { detectorModelDescription: input.detectorModelDescription }), - ...(input.evaluationMethod != null && { evaluationMethod: input.evaluationMethod }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + detectorModelDefinition: (_) => se_DetectorModelDefinition(_, context), + detectorModelDescription: [], + evaluationMethod: [], + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -948,10 +946,12 @@ export const se_UpdateInputCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/inputs/{inputName}"; resolvedPath = __resolvedPath(resolvedPath, input, "inputName", () => input.inputName!, "{inputName}", false); let body: any; - body = JSON.stringify({ - ...(input.inputDefinition != null && { inputDefinition: se_InputDefinition(input.inputDefinition, context) }), - ...(input.inputDescription != null && { inputDescription: input.inputDescription }), - }); + body = JSON.stringify( + take(input, { + inputDefinition: (_) => _json(_), + inputDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -977,21 +977,14 @@ export const de_CreateAlarmModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmModelArn != null) { - contents.alarmModelArn = __expectString(data.alarmModelArn); - } - if (data.alarmModelVersion != null) { - contents.alarmModelVersion = __expectString(data.alarmModelVersion); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.lastUpdateTime != null) { - contents.lastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + alarmModelArn: __expectString, + alarmModelVersion: __expectString, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1031,10 +1024,9 @@ const de_CreateAlarmModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1054,9 +1046,10 @@ export const de_CreateDetectorModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorModelConfiguration != null) { - contents.detectorModelConfiguration = de_DetectorModelConfiguration(data.detectorModelConfiguration, context); - } + const doc = take(data, { + detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1096,10 +1089,9 @@ const de_CreateDetectorModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1119,9 +1111,10 @@ export const de_CreateInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputConfiguration != null) { - contents.inputConfiguration = de_InputConfiguration(data.inputConfiguration, context); - } + const doc = take(data, { + inputConfiguration: (_) => de_InputConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1155,10 +1148,9 @@ const de_CreateInputCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1214,10 +1206,9 @@ const de_DeleteAlarmModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,10 +1264,9 @@ const de_DeleteDetectorModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1332,10 +1322,9 @@ const de_DeleteInputCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1355,51 +1344,24 @@ export const de_DescribeAlarmModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmCapabilities != null) { - contents.alarmCapabilities = de_AlarmCapabilities(data.alarmCapabilities, context); - } - if (data.alarmEventActions != null) { - contents.alarmEventActions = de_AlarmEventActions(data.alarmEventActions, context); - } - if (data.alarmModelArn != null) { - contents.alarmModelArn = __expectString(data.alarmModelArn); - } - if (data.alarmModelDescription != null) { - contents.alarmModelDescription = __expectString(data.alarmModelDescription); - } - if (data.alarmModelName != null) { - contents.alarmModelName = __expectString(data.alarmModelName); - } - if (data.alarmModelVersion != null) { - contents.alarmModelVersion = __expectString(data.alarmModelVersion); - } - if (data.alarmNotification != null) { - contents.alarmNotification = de_AlarmNotification(data.alarmNotification, context); - } - if (data.alarmRule != null) { - contents.alarmRule = de_AlarmRule(data.alarmRule, context); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.key != null) { - contents.key = __expectString(data.key); - } - if (data.lastUpdateTime != null) { - contents.lastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateTime))); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.severity != null) { - contents.severity = __expectInt32(data.severity); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + alarmCapabilities: _json, + alarmEventActions: _json, + alarmModelArn: __expectString, + alarmModelDescription: __expectString, + alarmModelName: __expectString, + alarmModelVersion: __expectString, + alarmNotification: _json, + alarmRule: _json, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + key: __expectString, + lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + severity: __expectInt32, + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1433,10 +1395,9 @@ const de_DescribeAlarmModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1456,9 +1417,10 @@ export const de_DescribeDetectorModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorModel != null) { - contents.detectorModel = de_DetectorModel(data.detectorModel, context); - } + const doc = take(data, { + detectorModel: (_) => de_DetectorModel(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1492,10 +1454,9 @@ const de_DescribeDetectorModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1515,9 +1476,10 @@ export const de_DescribeDetectorModelAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1551,10 +1513,9 @@ const de_DescribeDetectorModelAnalysisCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1574,9 +1535,10 @@ export const de_DescribeInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.input != null) { - contents.input = de_Input(data.input, context); - } + const doc = take(data, { + input: (_) => de_Input(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1610,10 +1572,9 @@ const de_DescribeInputCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1633,9 +1594,10 @@ export const de_DescribeLoggingOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.loggingOptions != null) { - contents.loggingOptions = de_LoggingOptions(data.loggingOptions, context); - } + const doc = take(data, { + loggingOptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1672,10 +1634,9 @@ const de_DescribeLoggingOptionsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1695,12 +1656,11 @@ export const de_GetDetectorModelAnalysisResultsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analysisResults != null) { - contents.analysisResults = de_AnalysisResults(data.analysisResults, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + analysisResults: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1734,10 +1694,9 @@ const de_GetDetectorModelAnalysisResultsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1757,12 +1716,11 @@ export const de_ListAlarmModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmModelSummaries != null) { - contents.alarmModelSummaries = de_AlarmModelSummaries(data.alarmModelSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + alarmModelSummaries: (_) => de_AlarmModelSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1793,10 +1751,9 @@ const de_ListAlarmModelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1816,12 +1773,11 @@ export const de_ListAlarmModelVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmModelVersionSummaries != null) { - contents.alarmModelVersionSummaries = de_AlarmModelVersionSummaries(data.alarmModelVersionSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + alarmModelVersionSummaries: (_) => de_AlarmModelVersionSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1855,10 +1811,9 @@ const de_ListAlarmModelVersionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1878,12 +1833,11 @@ export const de_ListDetectorModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorModelSummaries != null) { - contents.detectorModelSummaries = de_DetectorModelSummaries(data.detectorModelSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + detectorModelSummaries: (_) => de_DetectorModelSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1914,10 +1868,9 @@ const de_ListDetectorModelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1937,15 +1890,11 @@ export const de_ListDetectorModelVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorModelVersionSummaries != null) { - contents.detectorModelVersionSummaries = de_DetectorModelVersionSummaries( - data.detectorModelVersionSummaries, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + detectorModelVersionSummaries: (_) => de_DetectorModelVersionSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1979,10 +1928,9 @@ const de_ListDetectorModelVersionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2002,12 +1950,11 @@ export const de_ListInputRoutingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.routedResources != null) { - contents.routedResources = de_RoutedResources(data.routedResources, context); - } + const doc = take(data, { + nextToken: __expectString, + routedResources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2041,10 +1988,9 @@ const de_ListInputRoutingsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2064,12 +2010,11 @@ export const de_ListInputsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputSummaries != null) { - contents.inputSummaries = de_InputSummaries(data.inputSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + inputSummaries: (_) => de_InputSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2100,10 +2045,9 @@ const de_ListInputsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2123,9 +2067,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2159,10 +2104,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2218,10 +2162,9 @@ const de_PutLoggingOptionsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2241,9 +2184,10 @@ export const de_StartDetectorModelAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.analysisId != null) { - contents.analysisId = __expectString(data.analysisId); - } + const doc = take(data, { + analysisId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2277,10 +2221,9 @@ const de_StartDetectorModelAnalysisCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2336,10 +2279,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2392,10 +2334,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2415,21 +2356,14 @@ export const de_UpdateAlarmModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmModelArn != null) { - contents.alarmModelArn = __expectString(data.alarmModelArn); - } - if (data.alarmModelVersion != null) { - contents.alarmModelVersion = __expectString(data.alarmModelVersion); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.lastUpdateTime != null) { - contents.lastUpdateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + alarmModelArn: __expectString, + alarmModelVersion: __expectString, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2466,10 +2400,9 @@ const de_UpdateAlarmModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2489,9 +2422,10 @@ export const de_UpdateDetectorModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detectorModelConfiguration != null) { - contents.detectorModelConfiguration = de_DetectorModelConfiguration(data.detectorModelConfiguration, context); - } + const doc = take(data, { + detectorModelConfiguration: (_) => de_DetectorModelConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2528,10 +2462,9 @@ const de_UpdateDetectorModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2551,9 +2484,10 @@ export const de_UpdateInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputConfiguration != null) { - contents.inputConfiguration = de_InputConfiguration(data.inputConfiguration, context); - } + const doc = take(data, { + inputConfiguration: (_) => de_InputConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2590,16 +2524,15 @@ const de_UpdateInputCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalFailureExceptionRes */ @@ -2609,9 +2542,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2628,9 +2562,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2647,9 +2582,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2666,15 +2602,12 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + message: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2691,9 +2624,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2710,9 +2644,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2729,9 +2664,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2745,9 +2681,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2764,9 +2701,10 @@ const de_UnsupportedOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2774,1292 +2712,365 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AcknowledgeFlow - */ -const se_AcknowledgeFlow = (input: AcknowledgeFlow, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; +// se_AcknowledgeFlow omitted. + +// se_Action omitted. + +// se_Actions omitted. + +// se_AlarmAction omitted. + +// se_AlarmActions omitted. + +// se_AlarmCapabilities omitted. + +// se_AlarmEventActions omitted. + +// se_AlarmNotification omitted. + +// se_AlarmRule omitted. + +// se_AssetPropertyTimestamp omitted. + +// se_AssetPropertyValue omitted. + +// se_AssetPropertyVariant omitted. + +// se_Attribute omitted. + +// se_Attributes omitted. + +// se_ClearTimerAction omitted. + +// se_DetectorDebugOption omitted. + +// se_DetectorDebugOptions omitted. /** - * serializeAws_restJson1Action + * serializeAws_restJson1DetectorModelDefinition */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.clearTimer != null && { clearTimer: se_ClearTimerAction(input.clearTimer, context) }), - ...(input.dynamoDB != null && { dynamoDB: se_DynamoDBAction(input.dynamoDB, context) }), - ...(input.dynamoDBv2 != null && { dynamoDBv2: se_DynamoDBv2Action(input.dynamoDBv2, context) }), - ...(input.firehose != null && { firehose: se_FirehoseAction(input.firehose, context) }), - ...(input.iotEvents != null && { iotEvents: se_IotEventsAction(input.iotEvents, context) }), - ...(input.iotSiteWise != null && { iotSiteWise: se_IotSiteWiseAction(input.iotSiteWise, context) }), - ...(input.iotTopicPublish != null && { iotTopicPublish: se_IotTopicPublishAction(input.iotTopicPublish, context) }), - ...(input.lambda != null && { lambda: se_LambdaAction(input.lambda, context) }), - ...(input.resetTimer != null && { resetTimer: se_ResetTimerAction(input.resetTimer, context) }), - ...(input.setTimer != null && { setTimer: se_SetTimerAction(input.setTimer, context) }), - ...(input.setVariable != null && { setVariable: se_SetVariableAction(input.setVariable, context) }), - ...(input.sns != null && { sns: se_SNSTopicPublishAction(input.sns, context) }), - ...(input.sqs != null && { sqs: se_SqsAction(input.sqs, context) }), - }; +const se_DetectorModelDefinition = (input: DetectorModelDefinition, context: __SerdeContext): any => { + return take(input, { + initialStateName: [], + states: _json, + }); }; +// se_DynamoDBAction omitted. + +// se_DynamoDBv2Action omitted. + +// se_EmailConfiguration omitted. + +// se_EmailConfigurations omitted. + +// se_EmailContent omitted. + +// se_EmailRecipients omitted. + +// se_Event omitted. + +// se_Events omitted. + +// se_FirehoseAction omitted. + +// se_InitializationConfiguration omitted. + +// se_InputDefinition omitted. + +// se_InputIdentifier omitted. + +// se_IotEventsAction omitted. + +// se_IotEventsInputIdentifier omitted. + +// se_IotSiteWiseAction omitted. + +// se_IotSiteWiseAssetModelPropertyIdentifier omitted. + +// se_IotSiteWiseInputIdentifier omitted. + +// se_IotTopicPublishAction omitted. + +// se_LambdaAction omitted. + +// se_LoggingOptions omitted. + +// se_NotificationAction omitted. + +// se_NotificationActions omitted. + +// se_NotificationTargetActions omitted. + +// se_OnEnterLifecycle omitted. + +// se_OnExitLifecycle omitted. + +// se_OnInputLifecycle omitted. + +// se_Payload omitted. + +// se_RecipientDetail omitted. + +// se_RecipientDetails omitted. + +// se_ResetTimerAction omitted. + +// se_SetTimerAction omitted. + +// se_SetVariableAction omitted. + +// se_SimpleRule omitted. + +// se_SMSConfiguration omitted. + +// se_SMSConfigurations omitted. + +// se_SNSTopicPublishAction omitted. + +// se_SqsAction omitted. + +// se_SSOIdentity omitted. + +// se_State omitted. + +// se_States omitted. + +// se_Tag omitted. + +// se_Tags omitted. + +// se_TransitionEvent omitted. + +// se_TransitionEvents omitted. + +// de_AcknowledgeFlow omitted. + +// de_Action omitted. + +// de_Actions omitted. + +// de_AlarmAction omitted. + +// de_AlarmActions omitted. + +// de_AlarmCapabilities omitted. + +// de_AlarmEventActions omitted. + /** - * serializeAws_restJson1Actions + * deserializeAws_restJson1AlarmModelSummaries */ -const se_Actions = (input: Action[], context: __SerdeContext): any => { - return input +const de_AlarmModelSummaries = (output: any, context: __SerdeContext): AlarmModelSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_Action(entry, context); + .map((entry: any) => { + return de_AlarmModelSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1AlarmAction + * deserializeAws_restJson1AlarmModelSummary */ -const se_AlarmAction = (input: AlarmAction, context: __SerdeContext): any => { - return { - ...(input.dynamoDB != null && { dynamoDB: se_DynamoDBAction(input.dynamoDB, context) }), - ...(input.dynamoDBv2 != null && { dynamoDBv2: se_DynamoDBv2Action(input.dynamoDBv2, context) }), - ...(input.firehose != null && { firehose: se_FirehoseAction(input.firehose, context) }), - ...(input.iotEvents != null && { iotEvents: se_IotEventsAction(input.iotEvents, context) }), - ...(input.iotSiteWise != null && { iotSiteWise: se_IotSiteWiseAction(input.iotSiteWise, context) }), - ...(input.iotTopicPublish != null && { iotTopicPublish: se_IotTopicPublishAction(input.iotTopicPublish, context) }), - ...(input.lambda != null && { lambda: se_LambdaAction(input.lambda, context) }), - ...(input.sns != null && { sns: se_SNSTopicPublishAction(input.sns, context) }), - ...(input.sqs != null && { sqs: se_SqsAction(input.sqs, context) }), - }; +const de_AlarmModelSummary = (output: any, context: __SerdeContext): AlarmModelSummary => { + return take(output, { + alarmModelDescription: __expectString, + alarmModelName: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * serializeAws_restJson1AlarmActions + * deserializeAws_restJson1AlarmModelVersionSummaries */ -const se_AlarmActions = (input: AlarmAction[], context: __SerdeContext): any => { - return input +const de_AlarmModelVersionSummaries = (output: any, context: __SerdeContext): AlarmModelVersionSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_AlarmAction(entry, context); + .map((entry: any) => { + return de_AlarmModelVersionSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1AlarmCapabilities + * deserializeAws_restJson1AlarmModelVersionSummary */ -const se_AlarmCapabilities = (input: AlarmCapabilities, context: __SerdeContext): any => { - return { - ...(input.acknowledgeFlow != null && { acknowledgeFlow: se_AcknowledgeFlow(input.acknowledgeFlow, context) }), - ...(input.initializationConfiguration != null && { - initializationConfiguration: se_InitializationConfiguration(input.initializationConfiguration, context), - }), - }; +const de_AlarmModelVersionSummary = (output: any, context: __SerdeContext): AlarmModelVersionSummary => { + return take(output, { + alarmModelArn: __expectString, + alarmModelName: __expectString, + alarmModelVersion: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + status: __expectString, + statusMessage: __expectString, + }) as any; }; -/** - * serializeAws_restJson1AlarmEventActions - */ -const se_AlarmEventActions = (input: AlarmEventActions, context: __SerdeContext): any => { - return { - ...(input.alarmActions != null && { alarmActions: se_AlarmActions(input.alarmActions, context) }), - }; -}; +// de_AlarmNotification omitted. -/** - * serializeAws_restJson1AlarmNotification - */ -const se_AlarmNotification = (input: AlarmNotification, context: __SerdeContext): any => { - return { - ...(input.notificationActions != null && { - notificationActions: se_NotificationActions(input.notificationActions, context), - }), - }; -}; +// de_AlarmRule omitted. -/** - * serializeAws_restJson1AlarmRule - */ -const se_AlarmRule = (input: AlarmRule, context: __SerdeContext): any => { - return { - ...(input.simpleRule != null && { simpleRule: se_SimpleRule(input.simpleRule, context) }), - }; -}; +// de_AnalysisResult omitted. -/** - * serializeAws_restJson1AssetPropertyTimestamp - */ -const se_AssetPropertyTimestamp = (input: AssetPropertyTimestamp, context: __SerdeContext): any => { - return { - ...(input.offsetInNanos != null && { offsetInNanos: input.offsetInNanos }), - ...(input.timeInSeconds != null && { timeInSeconds: input.timeInSeconds }), - }; -}; +// de_AnalysisResultLocation omitted. + +// de_AnalysisResultLocations omitted. + +// de_AnalysisResults omitted. + +// de_AssetPropertyTimestamp omitted. + +// de_AssetPropertyValue omitted. + +// de_AssetPropertyVariant omitted. + +// de_Attribute omitted. + +// de_Attributes omitted. + +// de_ClearTimerAction omitted. + +// de_DetectorDebugOption omitted. + +// de_DetectorDebugOptions omitted. /** - * serializeAws_restJson1AssetPropertyValue + * deserializeAws_restJson1DetectorModel */ -const se_AssetPropertyValue = (input: AssetPropertyValue, context: __SerdeContext): any => { - return { - ...(input.quality != null && { quality: input.quality }), - ...(input.timestamp != null && { timestamp: se_AssetPropertyTimestamp(input.timestamp, context) }), - ...(input.value != null && { value: se_AssetPropertyVariant(input.value, context) }), - }; +const de_DetectorModel = (output: any, context: __SerdeContext): DetectorModel => { + return take(output, { + detectorModelConfiguration: (_: any) => de_DetectorModelConfiguration(_, context), + detectorModelDefinition: (_: any) => de_DetectorModelDefinition(_, context), + }) as any; }; /** - * serializeAws_restJson1AssetPropertyVariant + * deserializeAws_restJson1DetectorModelConfiguration */ -const se_AssetPropertyVariant = (input: AssetPropertyVariant, context: __SerdeContext): any => { - return { - ...(input.booleanValue != null && { booleanValue: input.booleanValue }), - ...(input.doubleValue != null && { doubleValue: input.doubleValue }), - ...(input.integerValue != null && { integerValue: input.integerValue }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; +const de_DetectorModelConfiguration = (output: any, context: __SerdeContext): DetectorModelConfiguration => { + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + detectorModelArn: __expectString, + detectorModelDescription: __expectString, + detectorModelName: __expectString, + detectorModelVersion: __expectString, + evaluationMethod: __expectString, + key: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + status: __expectString, + }) as any; }; /** - * serializeAws_restJson1Attribute + * deserializeAws_restJson1DetectorModelDefinition */ -const se_Attribute = (input: Attribute, context: __SerdeContext): any => { - return { - ...(input.jsonPath != null && { jsonPath: input.jsonPath }), - }; +const de_DetectorModelDefinition = (output: any, context: __SerdeContext): DetectorModelDefinition => { + return take(output, { + initialStateName: __expectString, + states: _json, + }) as any; }; /** - * serializeAws_restJson1Attributes + * deserializeAws_restJson1DetectorModelSummaries */ -const se_Attributes = (input: Attribute[], context: __SerdeContext): any => { - return input +const de_DetectorModelSummaries = (output: any, context: __SerdeContext): DetectorModelSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_Attribute(entry, context); + .map((entry: any) => { + return de_DetectorModelSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1ClearTimerAction - */ -const se_ClearTimerAction = (input: ClearTimerAction, context: __SerdeContext): any => { - return { - ...(input.timerName != null && { timerName: input.timerName }), - }; -}; - -/** - * serializeAws_restJson1DetectorDebugOption + * deserializeAws_restJson1DetectorModelSummary */ -const se_DetectorDebugOption = (input: DetectorDebugOption, context: __SerdeContext): any => { - return { - ...(input.detectorModelName != null && { detectorModelName: input.detectorModelName }), - ...(input.keyValue != null && { keyValue: input.keyValue }), - }; +const de_DetectorModelSummary = (output: any, context: __SerdeContext): DetectorModelSummary => { + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + detectorModelDescription: __expectString, + detectorModelName: __expectString, + }) as any; }; /** - * serializeAws_restJson1DetectorDebugOptions + * deserializeAws_restJson1DetectorModelVersionSummaries */ -const se_DetectorDebugOptions = (input: DetectorDebugOption[], context: __SerdeContext): any => { - return input +const de_DetectorModelVersionSummaries = (output: any, context: __SerdeContext): DetectorModelVersionSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_DetectorDebugOption(entry, context); + .map((entry: any) => { + return de_DetectorModelVersionSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1DetectorModelDefinition - */ -const se_DetectorModelDefinition = (input: DetectorModelDefinition, context: __SerdeContext): any => { - return { - ...(input.initialStateName != null && { initialStateName: input.initialStateName }), - ...(input.states != null && { states: se_States(input.states, context) }), - }; -}; - -/** - * serializeAws_restJson1DynamoDBAction - */ -const se_DynamoDBAction = (input: DynamoDBAction, context: __SerdeContext): any => { - return { - ...(input.hashKeyField != null && { hashKeyField: input.hashKeyField }), - ...(input.hashKeyType != null && { hashKeyType: input.hashKeyType }), - ...(input.hashKeyValue != null && { hashKeyValue: input.hashKeyValue }), - ...(input.operation != null && { operation: input.operation }), - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - ...(input.payloadField != null && { payloadField: input.payloadField }), - ...(input.rangeKeyField != null && { rangeKeyField: input.rangeKeyField }), - ...(input.rangeKeyType != null && { rangeKeyType: input.rangeKeyType }), - ...(input.rangeKeyValue != null && { rangeKeyValue: input.rangeKeyValue }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; - -/** - * serializeAws_restJson1DynamoDBv2Action - */ -const se_DynamoDBv2Action = (input: DynamoDBv2Action, context: __SerdeContext): any => { - return { - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; - -/** - * serializeAws_restJson1EmailConfiguration - */ -const se_EmailConfiguration = (input: EmailConfiguration, context: __SerdeContext): any => { - return { - ...(input.content != null && { content: se_EmailContent(input.content, context) }), - ...(input.from != null && { from: input.from }), - ...(input.recipients != null && { recipients: se_EmailRecipients(input.recipients, context) }), - }; -}; - -/** - * serializeAws_restJson1EmailConfigurations - */ -const se_EmailConfigurations = (input: EmailConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EmailConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1EmailContent - */ -const se_EmailContent = (input: EmailContent, context: __SerdeContext): any => { - return { - ...(input.additionalMessage != null && { additionalMessage: input.additionalMessage }), - ...(input.subject != null && { subject: input.subject }), - }; -}; - -/** - * serializeAws_restJson1EmailRecipients - */ -const se_EmailRecipients = (input: EmailRecipients, context: __SerdeContext): any => { - return { - ...(input.to != null && { to: se_RecipientDetails(input.to, context) }), - }; -}; - -/** - * serializeAws_restJson1Event - */ -const se_Event = (input: Event, context: __SerdeContext): any => { - return { - ...(input.actions != null && { actions: se_Actions(input.actions, context) }), - ...(input.condition != null && { condition: input.condition }), - ...(input.eventName != null && { eventName: input.eventName }), - }; -}; - -/** - * serializeAws_restJson1Events - */ -const se_Events = (input: Event[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Event(entry, context); - }); -}; - -/** - * serializeAws_restJson1FirehoseAction - */ -const se_FirehoseAction = (input: FirehoseAction, context: __SerdeContext): any => { - return { - ...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }), - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - ...(input.separator != null && { separator: input.separator }), - }; -}; - -/** - * serializeAws_restJson1InitializationConfiguration - */ -const se_InitializationConfiguration = (input: InitializationConfiguration, context: __SerdeContext): any => { - return { - ...(input.disabledOnInitialization != null && { disabledOnInitialization: input.disabledOnInitialization }), - }; -}; - -/** - * serializeAws_restJson1InputDefinition - */ -const se_InputDefinition = (input: InputDefinition, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }), - }; -}; - -/** - * serializeAws_restJson1InputIdentifier - */ -const se_InputIdentifier = (input: InputIdentifier, context: __SerdeContext): any => { - return { - ...(input.iotEventsInputIdentifier != null && { - iotEventsInputIdentifier: se_IotEventsInputIdentifier(input.iotEventsInputIdentifier, context), - }), - ...(input.iotSiteWiseInputIdentifier != null && { - iotSiteWiseInputIdentifier: se_IotSiteWiseInputIdentifier(input.iotSiteWiseInputIdentifier, context), - }), - }; -}; - -/** - * serializeAws_restJson1IotEventsAction - */ -const se_IotEventsAction = (input: IotEventsAction, context: __SerdeContext): any => { - return { - ...(input.inputName != null && { inputName: input.inputName }), - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - }; -}; - -/** - * serializeAws_restJson1IotEventsInputIdentifier - */ -const se_IotEventsInputIdentifier = (input: IotEventsInputIdentifier, context: __SerdeContext): any => { - return { - ...(input.inputName != null && { inputName: input.inputName }), - }; -}; - -/** - * serializeAws_restJson1IotSiteWiseAction - */ -const se_IotSiteWiseAction = (input: IotSiteWiseAction, context: __SerdeContext): any => { - return { - ...(input.assetId != null && { assetId: input.assetId }), - ...(input.entryId != null && { entryId: input.entryId }), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - ...(input.propertyValue != null && { propertyValue: se_AssetPropertyValue(input.propertyValue, context) }), - }; -}; - -/** - * serializeAws_restJson1IotSiteWiseAssetModelPropertyIdentifier - */ -const se_IotSiteWiseAssetModelPropertyIdentifier = ( - input: IotSiteWiseAssetModelPropertyIdentifier, - context: __SerdeContext -): any => { - return { - ...(input.assetModelId != null && { assetModelId: input.assetModelId }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - }; -}; - -/** - * serializeAws_restJson1IotSiteWiseInputIdentifier - */ -const se_IotSiteWiseInputIdentifier = (input: IotSiteWiseInputIdentifier, context: __SerdeContext): any => { - return { - ...(input.iotSiteWiseAssetModelPropertyIdentifier != null && { - iotSiteWiseAssetModelPropertyIdentifier: se_IotSiteWiseAssetModelPropertyIdentifier( - input.iotSiteWiseAssetModelPropertyIdentifier, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1IotTopicPublishAction - */ -const se_IotTopicPublishAction = (input: IotTopicPublishAction, context: __SerdeContext): any => { - return { - ...(input.mqttTopic != null && { mqttTopic: input.mqttTopic }), - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - }; -}; - -/** - * serializeAws_restJson1LambdaAction - */ -const se_LambdaAction = (input: LambdaAction, context: __SerdeContext): any => { - return { - ...(input.functionArn != null && { functionArn: input.functionArn }), - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - }; -}; - -/** - * serializeAws_restJson1LoggingOptions - */ -const se_LoggingOptions = (input: LoggingOptions, context: __SerdeContext): any => { - return { - ...(input.detectorDebugOptions != null && { - detectorDebugOptions: se_DetectorDebugOptions(input.detectorDebugOptions, context), - }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.level != null && { level: input.level }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_restJson1NotificationAction - */ -const se_NotificationAction = (input: NotificationAction, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_NotificationTargetActions(input.action, context) }), - ...(input.emailConfigurations != null && { - emailConfigurations: se_EmailConfigurations(input.emailConfigurations, context), - }), - ...(input.smsConfigurations != null && { - smsConfigurations: se_SMSConfigurations(input.smsConfigurations, context), - }), - }; -}; - -/** - * serializeAws_restJson1NotificationActions - */ -const se_NotificationActions = (input: NotificationAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NotificationAction(entry, context); - }); -}; - -/** - * serializeAws_restJson1NotificationTargetActions - */ -const se_NotificationTargetActions = (input: NotificationTargetActions, context: __SerdeContext): any => { - return { - ...(input.lambdaAction != null && { lambdaAction: se_LambdaAction(input.lambdaAction, context) }), - }; -}; - -/** - * serializeAws_restJson1OnEnterLifecycle - */ -const se_OnEnterLifecycle = (input: OnEnterLifecycle, context: __SerdeContext): any => { - return { - ...(input.events != null && { events: se_Events(input.events, context) }), - }; -}; - -/** - * serializeAws_restJson1OnExitLifecycle - */ -const se_OnExitLifecycle = (input: OnExitLifecycle, context: __SerdeContext): any => { - return { - ...(input.events != null && { events: se_Events(input.events, context) }), - }; -}; - -/** - * serializeAws_restJson1OnInputLifecycle - */ -const se_OnInputLifecycle = (input: OnInputLifecycle, context: __SerdeContext): any => { - return { - ...(input.events != null && { events: se_Events(input.events, context) }), - ...(input.transitionEvents != null && { transitionEvents: se_TransitionEvents(input.transitionEvents, context) }), - }; -}; - -/** - * serializeAws_restJson1Payload - */ -const se_Payload = (input: Payload, context: __SerdeContext): any => { - return { - ...(input.contentExpression != null && { contentExpression: input.contentExpression }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_restJson1RecipientDetail - */ -const se_RecipientDetail = (input: RecipientDetail, context: __SerdeContext): any => { - return { - ...(input.ssoIdentity != null && { ssoIdentity: se_SSOIdentity(input.ssoIdentity, context) }), - }; -}; - -/** - * serializeAws_restJson1RecipientDetails - */ -const se_RecipientDetails = (input: RecipientDetail[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecipientDetail(entry, context); - }); -}; - -/** - * serializeAws_restJson1ResetTimerAction - */ -const se_ResetTimerAction = (input: ResetTimerAction, context: __SerdeContext): any => { - return { - ...(input.timerName != null && { timerName: input.timerName }), - }; -}; - -/** - * serializeAws_restJson1SetTimerAction - */ -const se_SetTimerAction = (input: SetTimerAction, context: __SerdeContext): any => { - return { - ...(input.durationExpression != null && { durationExpression: input.durationExpression }), - ...(input.seconds != null && { seconds: input.seconds }), - ...(input.timerName != null && { timerName: input.timerName }), - }; -}; - -/** - * serializeAws_restJson1SetVariableAction - */ -const se_SetVariableAction = (input: SetVariableAction, context: __SerdeContext): any => { - return { - ...(input.value != null && { value: input.value }), - ...(input.variableName != null && { variableName: input.variableName }), - }; -}; - -/** - * serializeAws_restJson1SimpleRule - */ -const se_SimpleRule = (input: SimpleRule, context: __SerdeContext): any => { - return { - ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }), - ...(input.inputProperty != null && { inputProperty: input.inputProperty }), - ...(input.threshold != null && { threshold: input.threshold }), - }; -}; - -/** - * serializeAws_restJson1SMSConfiguration - */ -const se_SMSConfiguration = (input: SMSConfiguration, context: __SerdeContext): any => { - return { - ...(input.additionalMessage != null && { additionalMessage: input.additionalMessage }), - ...(input.recipients != null && { recipients: se_RecipientDetails(input.recipients, context) }), - ...(input.senderId != null && { senderId: input.senderId }), - }; -}; - -/** - * serializeAws_restJson1SMSConfigurations - */ -const se_SMSConfigurations = (input: SMSConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SMSConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1SNSTopicPublishAction - */ -const se_SNSTopicPublishAction = (input: SNSTopicPublishAction, context: __SerdeContext): any => { - return { - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }; -}; - -/** - * serializeAws_restJson1SqsAction - */ -const se_SqsAction = (input: SqsAction, context: __SerdeContext): any => { - return { - ...(input.payload != null && { payload: se_Payload(input.payload, context) }), - ...(input.queueUrl != null && { queueUrl: input.queueUrl }), - ...(input.useBase64 != null && { useBase64: input.useBase64 }), - }; -}; - -/** - * serializeAws_restJson1SSOIdentity - */ -const se_SSOIdentity = (input: SSOIdentity, context: __SerdeContext): any => { - return { - ...(input.identityStoreId != null && { identityStoreId: input.identityStoreId }), - ...(input.userId != null && { userId: input.userId }), - }; -}; - -/** - * serializeAws_restJson1State - */ -const se_State = (input: State, context: __SerdeContext): any => { - return { - ...(input.onEnter != null && { onEnter: se_OnEnterLifecycle(input.onEnter, context) }), - ...(input.onExit != null && { onExit: se_OnExitLifecycle(input.onExit, context) }), - ...(input.onInput != null && { onInput: se_OnInputLifecycle(input.onInput, context) }), - ...(input.stateName != null && { stateName: input.stateName }), - }; -}; - -/** - * serializeAws_restJson1States - */ -const se_States = (input: State[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_State(entry, context); - }); -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1TransitionEvent - */ -const se_TransitionEvent = (input: TransitionEvent, context: __SerdeContext): any => { - return { - ...(input.actions != null && { actions: se_Actions(input.actions, context) }), - ...(input.condition != null && { condition: input.condition }), - ...(input.eventName != null && { eventName: input.eventName }), - ...(input.nextState != null && { nextState: input.nextState }), - }; -}; - -/** - * serializeAws_restJson1TransitionEvents - */ -const se_TransitionEvents = (input: TransitionEvent[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TransitionEvent(entry, context); - }); -}; - -/** - * deserializeAws_restJson1AcknowledgeFlow - */ -const de_AcknowledgeFlow = (output: any, context: __SerdeContext): AcknowledgeFlow => { - return { - enabled: __expectBoolean(output.enabled), - } as any; -}; - -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - clearTimer: output.clearTimer != null ? de_ClearTimerAction(output.clearTimer, context) : undefined, - dynamoDB: output.dynamoDB != null ? de_DynamoDBAction(output.dynamoDB, context) : undefined, - dynamoDBv2: output.dynamoDBv2 != null ? de_DynamoDBv2Action(output.dynamoDBv2, context) : undefined, - firehose: output.firehose != null ? de_FirehoseAction(output.firehose, context) : undefined, - iotEvents: output.iotEvents != null ? de_IotEventsAction(output.iotEvents, context) : undefined, - iotSiteWise: output.iotSiteWise != null ? de_IotSiteWiseAction(output.iotSiteWise, context) : undefined, - iotTopicPublish: - output.iotTopicPublish != null ? de_IotTopicPublishAction(output.iotTopicPublish, context) : undefined, - lambda: output.lambda != null ? de_LambdaAction(output.lambda, context) : undefined, - resetTimer: output.resetTimer != null ? de_ResetTimerAction(output.resetTimer, context) : undefined, - setTimer: output.setTimer != null ? de_SetTimerAction(output.setTimer, context) : undefined, - setVariable: output.setVariable != null ? de_SetVariableAction(output.setVariable, context) : undefined, - sns: output.sns != null ? de_SNSTopicPublishAction(output.sns, context) : undefined, - sqs: output.sqs != null ? de_SqsAction(output.sqs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Actions - */ -const de_Actions = (output: any, context: __SerdeContext): Action[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Action(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AlarmAction - */ -const de_AlarmAction = (output: any, context: __SerdeContext): AlarmAction => { - return { - dynamoDB: output.dynamoDB != null ? de_DynamoDBAction(output.dynamoDB, context) : undefined, - dynamoDBv2: output.dynamoDBv2 != null ? de_DynamoDBv2Action(output.dynamoDBv2, context) : undefined, - firehose: output.firehose != null ? de_FirehoseAction(output.firehose, context) : undefined, - iotEvents: output.iotEvents != null ? de_IotEventsAction(output.iotEvents, context) : undefined, - iotSiteWise: output.iotSiteWise != null ? de_IotSiteWiseAction(output.iotSiteWise, context) : undefined, - iotTopicPublish: - output.iotTopicPublish != null ? de_IotTopicPublishAction(output.iotTopicPublish, context) : undefined, - lambda: output.lambda != null ? de_LambdaAction(output.lambda, context) : undefined, - sns: output.sns != null ? de_SNSTopicPublishAction(output.sns, context) : undefined, - sqs: output.sqs != null ? de_SqsAction(output.sqs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlarmActions - */ -const de_AlarmActions = (output: any, context: __SerdeContext): AlarmAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlarmAction(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AlarmCapabilities - */ -const de_AlarmCapabilities = (output: any, context: __SerdeContext): AlarmCapabilities => { - return { - acknowledgeFlow: output.acknowledgeFlow != null ? de_AcknowledgeFlow(output.acknowledgeFlow, context) : undefined, - initializationConfiguration: - output.initializationConfiguration != null - ? de_InitializationConfiguration(output.initializationConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlarmEventActions - */ -const de_AlarmEventActions = (output: any, context: __SerdeContext): AlarmEventActions => { - return { - alarmActions: output.alarmActions != null ? de_AlarmActions(output.alarmActions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlarmModelSummaries - */ -const de_AlarmModelSummaries = (output: any, context: __SerdeContext): AlarmModelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlarmModelSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AlarmModelSummary - */ -const de_AlarmModelSummary = (output: any, context: __SerdeContext): AlarmModelSummary => { - return { - alarmModelDescription: __expectString(output.alarmModelDescription), - alarmModelName: __expectString(output.alarmModelName), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlarmModelVersionSummaries - */ -const de_AlarmModelVersionSummaries = (output: any, context: __SerdeContext): AlarmModelVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlarmModelVersionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AlarmModelVersionSummary - */ -const de_AlarmModelVersionSummary = (output: any, context: __SerdeContext): AlarmModelVersionSummary => { - return { - alarmModelArn: __expectString(output.alarmModelArn), - alarmModelName: __expectString(output.alarmModelName), - alarmModelVersion: __expectString(output.alarmModelVersion), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1AlarmNotification - */ -const de_AlarmNotification = (output: any, context: __SerdeContext): AlarmNotification => { - return { - notificationActions: - output.notificationActions != null ? de_NotificationActions(output.notificationActions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlarmRule - */ -const de_AlarmRule = (output: any, context: __SerdeContext): AlarmRule => { - return { - simpleRule: output.simpleRule != null ? de_SimpleRule(output.simpleRule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisResult - */ -const de_AnalysisResult = (output: any, context: __SerdeContext): AnalysisResult => { - return { - level: __expectString(output.level), - locations: output.locations != null ? de_AnalysisResultLocations(output.locations, context) : undefined, - message: __expectString(output.message), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisResultLocation - */ -const de_AnalysisResultLocation = (output: any, context: __SerdeContext): AnalysisResultLocation => { - return { - path: __expectString(output.path), - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisResultLocations - */ -const de_AnalysisResultLocations = (output: any, context: __SerdeContext): AnalysisResultLocation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnalysisResultLocation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnalysisResults - */ -const de_AnalysisResults = (output: any, context: __SerdeContext): AnalysisResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnalysisResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssetPropertyTimestamp - */ -const de_AssetPropertyTimestamp = (output: any, context: __SerdeContext): AssetPropertyTimestamp => { - return { - offsetInNanos: __expectString(output.offsetInNanos), - timeInSeconds: __expectString(output.timeInSeconds), - } as any; -}; - -/** - * deserializeAws_restJson1AssetPropertyValue - */ -const de_AssetPropertyValue = (output: any, context: __SerdeContext): AssetPropertyValue => { - return { - quality: __expectString(output.quality), - timestamp: output.timestamp != null ? de_AssetPropertyTimestamp(output.timestamp, context) : undefined, - value: output.value != null ? de_AssetPropertyVariant(output.value, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssetPropertyVariant - */ -const de_AssetPropertyVariant = (output: any, context: __SerdeContext): AssetPropertyVariant => { - return { - booleanValue: __expectString(output.booleanValue), - doubleValue: __expectString(output.doubleValue), - integerValue: __expectString(output.integerValue), - stringValue: __expectString(output.stringValue), - } as any; -}; - -/** - * deserializeAws_restJson1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - jsonPath: __expectString(output.jsonPath), - } as any; -}; - -/** - * deserializeAws_restJson1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Attribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Attribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ClearTimerAction - */ -const de_ClearTimerAction = (output: any, context: __SerdeContext): ClearTimerAction => { - return { - timerName: __expectString(output.timerName), - } as any; -}; - -/** - * deserializeAws_restJson1DetectorDebugOption - */ -const de_DetectorDebugOption = (output: any, context: __SerdeContext): DetectorDebugOption => { - return { - detectorModelName: __expectString(output.detectorModelName), - keyValue: __expectString(output.keyValue), - } as any; -}; - -/** - * deserializeAws_restJson1DetectorDebugOptions - */ -const de_DetectorDebugOptions = (output: any, context: __SerdeContext): DetectorDebugOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectorDebugOption(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DetectorModel - */ -const de_DetectorModel = (output: any, context: __SerdeContext): DetectorModel => { - return { - detectorModelConfiguration: - output.detectorModelConfiguration != null - ? de_DetectorModelConfiguration(output.detectorModelConfiguration, context) - : undefined, - detectorModelDefinition: - output.detectorModelDefinition != null - ? de_DetectorModelDefinition(output.detectorModelDefinition, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DetectorModelConfiguration - */ -const de_DetectorModelConfiguration = (output: any, context: __SerdeContext): DetectorModelConfiguration => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - detectorModelArn: __expectString(output.detectorModelArn), - detectorModelDescription: __expectString(output.detectorModelDescription), - detectorModelName: __expectString(output.detectorModelName), - detectorModelVersion: __expectString(output.detectorModelVersion), - evaluationMethod: __expectString(output.evaluationMethod), - key: __expectString(output.key), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1DetectorModelDefinition - */ -const de_DetectorModelDefinition = (output: any, context: __SerdeContext): DetectorModelDefinition => { - return { - initialStateName: __expectString(output.initialStateName), - states: output.states != null ? de_States(output.states, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DetectorModelSummaries - */ -const de_DetectorModelSummaries = (output: any, context: __SerdeContext): DetectorModelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectorModelSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DetectorModelSummary - */ -const de_DetectorModelSummary = (output: any, context: __SerdeContext): DetectorModelSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - detectorModelDescription: __expectString(output.detectorModelDescription), - detectorModelName: __expectString(output.detectorModelName), - } as any; -}; - -/** - * deserializeAws_restJson1DetectorModelVersionSummaries - */ -const de_DetectorModelVersionSummaries = (output: any, context: __SerdeContext): DetectorModelVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectorModelVersionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DetectorModelVersionSummary + * deserializeAws_restJson1DetectorModelVersionSummary */ const de_DetectorModelVersionSummary = (output: any, context: __SerdeContext): DetectorModelVersionSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - detectorModelArn: __expectString(output.detectorModelArn), - detectorModelName: __expectString(output.detectorModelName), - detectorModelVersion: __expectString(output.detectorModelVersion), - evaluationMethod: __expectString(output.evaluationMethod), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + detectorModelArn: __expectString, + detectorModelName: __expectString, + detectorModelVersion: __expectString, + evaluationMethod: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DynamoDBAction - */ -const de_DynamoDBAction = (output: any, context: __SerdeContext): DynamoDBAction => { - return { - hashKeyField: __expectString(output.hashKeyField), - hashKeyType: __expectString(output.hashKeyType), - hashKeyValue: __expectString(output.hashKeyValue), - operation: __expectString(output.operation), - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - payloadField: __expectString(output.payloadField), - rangeKeyField: __expectString(output.rangeKeyField), - rangeKeyType: __expectString(output.rangeKeyType), - rangeKeyValue: __expectString(output.rangeKeyValue), - tableName: __expectString(output.tableName), - } as any; -}; +// de_DynamoDBAction omitted. -/** - * deserializeAws_restJson1DynamoDBv2Action - */ -const de_DynamoDBv2Action = (output: any, context: __SerdeContext): DynamoDBv2Action => { - return { - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - tableName: __expectString(output.tableName), - } as any; -}; +// de_DynamoDBv2Action omitted. -/** - * deserializeAws_restJson1EmailConfiguration - */ -const de_EmailConfiguration = (output: any, context: __SerdeContext): EmailConfiguration => { - return { - content: output.content != null ? de_EmailContent(output.content, context) : undefined, - from: __expectString(output.from), - recipients: output.recipients != null ? de_EmailRecipients(output.recipients, context) : undefined, - } as any; -}; +// de_EmailConfiguration omitted. -/** - * deserializeAws_restJson1EmailConfigurations - */ -const de_EmailConfigurations = (output: any, context: __SerdeContext): EmailConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EmailConfiguration(entry, context); - }); - return retVal; -}; +// de_EmailConfigurations omitted. -/** - * deserializeAws_restJson1EmailContent - */ -const de_EmailContent = (output: any, context: __SerdeContext): EmailContent => { - return { - additionalMessage: __expectString(output.additionalMessage), - subject: __expectString(output.subject), - } as any; -}; +// de_EmailContent omitted. -/** - * deserializeAws_restJson1EmailRecipients - */ -const de_EmailRecipients = (output: any, context: __SerdeContext): EmailRecipients => { - return { - to: output.to != null ? de_RecipientDetails(output.to, context) : undefined, - } as any; -}; +// de_EmailRecipients omitted. -/** - * deserializeAws_restJson1Event - */ -const de_Event = (output: any, context: __SerdeContext): Event => { - return { - actions: output.actions != null ? de_Actions(output.actions, context) : undefined, - condition: __expectString(output.condition), - eventName: __expectString(output.eventName), - } as any; -}; +// de_Event omitted. -/** - * deserializeAws_restJson1Events - */ -const de_Events = (output: any, context: __SerdeContext): Event[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Event(entry, context); - }); - return retVal; -}; +// de_Events omitted. -/** - * deserializeAws_restJson1FirehoseAction - */ -const de_FirehoseAction = (output: any, context: __SerdeContext): FirehoseAction => { - return { - deliveryStreamName: __expectString(output.deliveryStreamName), - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - separator: __expectString(output.separator), - } as any; -}; +// de_FirehoseAction omitted. -/** - * deserializeAws_restJson1InitializationConfiguration - */ -const de_InitializationConfiguration = (output: any, context: __SerdeContext): InitializationConfiguration => { - return { - disabledOnInitialization: __expectBoolean(output.disabledOnInitialization), - } as any; -}; +// de_InitializationConfiguration omitted. /** * deserializeAws_restJson1Input */ const de_Input = (output: any, context: __SerdeContext): Input => { - return { - inputConfiguration: - output.inputConfiguration != null ? de_InputConfiguration(output.inputConfiguration, context) : undefined, - inputDefinition: output.inputDefinition != null ? de_InputDefinition(output.inputDefinition, context) : undefined, - } as any; + return take(output, { + inputConfiguration: (_: any) => de_InputConfiguration(_, context), + inputDefinition: _json, + }) as any; }; /** * deserializeAws_restJson1InputConfiguration */ const de_InputConfiguration = (output: any, context: __SerdeContext): InputConfiguration => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - inputArn: __expectString(output.inputArn), - inputDescription: __expectString(output.inputDescription), - inputName: __expectString(output.inputName), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + inputArn: __expectString, + inputDescription: __expectString, + inputName: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1InputDefinition - */ -const de_InputDefinition = (output: any, context: __SerdeContext): InputDefinition => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - } as any; -}; +// de_InputDefinition omitted. /** * deserializeAws_restJson1InputSummaries @@ -4068,9 +3079,6 @@ const de_InputSummaries = (output: any, context: __SerdeContext): InputSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputSummary(entry, context); }); return retVal; @@ -4080,379 +3088,77 @@ const de_InputSummaries = (output: any, context: __SerdeContext): InputSummary[] * deserializeAws_restJson1InputSummary */ const de_InputSummary = (output: any, context: __SerdeContext): InputSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - inputArn: __expectString(output.inputArn), - inputDescription: __expectString(output.inputDescription), - inputName: __expectString(output.inputName), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + inputArn: __expectString, + inputDescription: __expectString, + inputName: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1IotEventsAction - */ -const de_IotEventsAction = (output: any, context: __SerdeContext): IotEventsAction => { - return { - inputName: __expectString(output.inputName), - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - } as any; -}; +// de_IotEventsAction omitted. -/** - * deserializeAws_restJson1IotSiteWiseAction - */ -const de_IotSiteWiseAction = (output: any, context: __SerdeContext): IotSiteWiseAction => { - return { - assetId: __expectString(output.assetId), - entryId: __expectString(output.entryId), - propertyAlias: __expectString(output.propertyAlias), - propertyId: __expectString(output.propertyId), - propertyValue: output.propertyValue != null ? de_AssetPropertyValue(output.propertyValue, context) : undefined, - } as any; -}; +// de_IotSiteWiseAction omitted. -/** - * deserializeAws_restJson1IotTopicPublishAction - */ -const de_IotTopicPublishAction = (output: any, context: __SerdeContext): IotTopicPublishAction => { - return { - mqttTopic: __expectString(output.mqttTopic), - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - } as any; -}; +// de_IotTopicPublishAction omitted. -/** - * deserializeAws_restJson1LambdaAction - */ -const de_LambdaAction = (output: any, context: __SerdeContext): LambdaAction => { - return { - functionArn: __expectString(output.functionArn), - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - } as any; -}; +// de_LambdaAction omitted. -/** - * deserializeAws_restJson1LoggingOptions - */ -const de_LoggingOptions = (output: any, context: __SerdeContext): LoggingOptions => { - return { - detectorDebugOptions: - output.detectorDebugOptions != null ? de_DetectorDebugOptions(output.detectorDebugOptions, context) : undefined, - enabled: __expectBoolean(output.enabled), - level: __expectString(output.level), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_LoggingOptions omitted. -/** - * deserializeAws_restJson1NotificationAction - */ -const de_NotificationAction = (output: any, context: __SerdeContext): NotificationAction => { - return { - action: output.action != null ? de_NotificationTargetActions(output.action, context) : undefined, - emailConfigurations: - output.emailConfigurations != null ? de_EmailConfigurations(output.emailConfigurations, context) : undefined, - smsConfigurations: - output.smsConfigurations != null ? de_SMSConfigurations(output.smsConfigurations, context) : undefined, - } as any; -}; +// de_NotificationAction omitted. -/** - * deserializeAws_restJson1NotificationActions - */ -const de_NotificationActions = (output: any, context: __SerdeContext): NotificationAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotificationAction(entry, context); - }); - return retVal; -}; +// de_NotificationActions omitted. -/** - * deserializeAws_restJson1NotificationTargetActions - */ -const de_NotificationTargetActions = (output: any, context: __SerdeContext): NotificationTargetActions => { - return { - lambdaAction: output.lambdaAction != null ? de_LambdaAction(output.lambdaAction, context) : undefined, - } as any; -}; +// de_NotificationTargetActions omitted. -/** - * deserializeAws_restJson1OnEnterLifecycle - */ -const de_OnEnterLifecycle = (output: any, context: __SerdeContext): OnEnterLifecycle => { - return { - events: output.events != null ? de_Events(output.events, context) : undefined, - } as any; -}; +// de_OnEnterLifecycle omitted. -/** - * deserializeAws_restJson1OnExitLifecycle - */ -const de_OnExitLifecycle = (output: any, context: __SerdeContext): OnExitLifecycle => { - return { - events: output.events != null ? de_Events(output.events, context) : undefined, - } as any; -}; +// de_OnExitLifecycle omitted. -/** - * deserializeAws_restJson1OnInputLifecycle - */ -const de_OnInputLifecycle = (output: any, context: __SerdeContext): OnInputLifecycle => { - return { - events: output.events != null ? de_Events(output.events, context) : undefined, - transitionEvents: - output.transitionEvents != null ? de_TransitionEvents(output.transitionEvents, context) : undefined, - } as any; -}; +// de_OnInputLifecycle omitted. -/** - * deserializeAws_restJson1Payload - */ -const de_Payload = (output: any, context: __SerdeContext): Payload => { - return { - contentExpression: __expectString(output.contentExpression), - type: __expectString(output.type), - } as any; -}; +// de_Payload omitted. -/** - * deserializeAws_restJson1RecipientDetail - */ -const de_RecipientDetail = (output: any, context: __SerdeContext): RecipientDetail => { - return { - ssoIdentity: output.ssoIdentity != null ? de_SSOIdentity(output.ssoIdentity, context) : undefined, - } as any; -}; +// de_RecipientDetail omitted. -/** - * deserializeAws_restJson1RecipientDetails - */ -const de_RecipientDetails = (output: any, context: __SerdeContext): RecipientDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecipientDetail(entry, context); - }); - return retVal; -}; +// de_RecipientDetails omitted. -/** - * deserializeAws_restJson1ResetTimerAction - */ -const de_ResetTimerAction = (output: any, context: __SerdeContext): ResetTimerAction => { - return { - timerName: __expectString(output.timerName), - } as any; -}; +// de_ResetTimerAction omitted. -/** - * deserializeAws_restJson1RoutedResource - */ -const de_RoutedResource = (output: any, context: __SerdeContext): RoutedResource => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_RoutedResource omitted. -/** - * deserializeAws_restJson1RoutedResources - */ -const de_RoutedResources = (output: any, context: __SerdeContext): RoutedResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoutedResource(entry, context); - }); - return retVal; -}; +// de_RoutedResources omitted. -/** - * deserializeAws_restJson1SetTimerAction - */ -const de_SetTimerAction = (output: any, context: __SerdeContext): SetTimerAction => { - return { - durationExpression: __expectString(output.durationExpression), - seconds: __expectInt32(output.seconds), - timerName: __expectString(output.timerName), - } as any; -}; +// de_SetTimerAction omitted. -/** - * deserializeAws_restJson1SetVariableAction - */ -const de_SetVariableAction = (output: any, context: __SerdeContext): SetVariableAction => { - return { - value: __expectString(output.value), - variableName: __expectString(output.variableName), - } as any; -}; +// de_SetVariableAction omitted. -/** - * deserializeAws_restJson1SimpleRule - */ -const de_SimpleRule = (output: any, context: __SerdeContext): SimpleRule => { - return { - comparisonOperator: __expectString(output.comparisonOperator), - inputProperty: __expectString(output.inputProperty), - threshold: __expectString(output.threshold), - } as any; -}; +// de_SimpleRule omitted. -/** - * deserializeAws_restJson1SMSConfiguration - */ -const de_SMSConfiguration = (output: any, context: __SerdeContext): SMSConfiguration => { - return { - additionalMessage: __expectString(output.additionalMessage), - recipients: output.recipients != null ? de_RecipientDetails(output.recipients, context) : undefined, - senderId: __expectString(output.senderId), - } as any; -}; +// de_SMSConfiguration omitted. -/** - * deserializeAws_restJson1SMSConfigurations - */ -const de_SMSConfigurations = (output: any, context: __SerdeContext): SMSConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SMSConfiguration(entry, context); - }); - return retVal; -}; +// de_SMSConfigurations omitted. -/** - * deserializeAws_restJson1SNSTopicPublishAction - */ -const de_SNSTopicPublishAction = (output: any, context: __SerdeContext): SNSTopicPublishAction => { - return { - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - targetArn: __expectString(output.targetArn), - } as any; -}; +// de_SNSTopicPublishAction omitted. -/** - * deserializeAws_restJson1SqsAction - */ -const de_SqsAction = (output: any, context: __SerdeContext): SqsAction => { - return { - payload: output.payload != null ? de_Payload(output.payload, context) : undefined, - queueUrl: __expectString(output.queueUrl), - useBase64: __expectBoolean(output.useBase64), - } as any; -}; +// de_SqsAction omitted. -/** - * deserializeAws_restJson1SSOIdentity - */ -const de_SSOIdentity = (output: any, context: __SerdeContext): SSOIdentity => { - return { - identityStoreId: __expectString(output.identityStoreId), - userId: __expectString(output.userId), - } as any; -}; +// de_SSOIdentity omitted. -/** - * deserializeAws_restJson1State - */ -const de_State = (output: any, context: __SerdeContext): State => { - return { - onEnter: output.onEnter != null ? de_OnEnterLifecycle(output.onEnter, context) : undefined, - onExit: output.onExit != null ? de_OnExitLifecycle(output.onExit, context) : undefined, - onInput: output.onInput != null ? de_OnInputLifecycle(output.onInput, context) : undefined, - stateName: __expectString(output.stateName), - } as any; -}; +// de_State omitted. -/** - * deserializeAws_restJson1States - */ -const de_States = (output: any, context: __SerdeContext): State[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_State(entry, context); - }); - return retVal; -}; +// de_States omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1TransitionEvent - */ -const de_TransitionEvent = (output: any, context: __SerdeContext): TransitionEvent => { - return { - actions: output.actions != null ? de_Actions(output.actions, context) : undefined, - condition: __expectString(output.condition), - eventName: __expectString(output.eventName), - nextState: __expectString(output.nextState), - } as any; -}; +// de_TransitionEvent omitted. -/** - * deserializeAws_restJson1TransitionEvents - */ -const de_TransitionEvents = (output: any, context: __SerdeContext): TransitionEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TransitionEvent(entry, context); - }); - return retVal; -}; +// de_TransitionEvents omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot-jobs-data-plane/src/protocols/Aws_restJson1.ts b/clients/client-iot-jobs-data-plane/src/protocols/Aws_restJson1.ts index 161bf4507836..53ad4b5335f2 100644 --- a/clients/client-iot-jobs-data-plane/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-jobs-data-plane/src/protocols/Aws_restJson1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -35,9 +36,6 @@ import { CertificateValidationException, InvalidRequestException, InvalidStateTransitionException, - JobExecution, - JobExecutionState, - JobExecutionSummary, ResourceNotFoundException, ServiceUnavailableException, TerminalStateException, @@ -112,10 +110,12 @@ export const se_StartNextPendingJobExecutionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}/jobs/$next"; resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName!, "{thingName}", false); let body: any; - body = JSON.stringify({ - ...(input.statusDetails != null && { statusDetails: se_DetailsMap(input.statusDetails, context) }), - ...(input.stepTimeoutInMinutes != null && { stepTimeoutInMinutes: input.stepTimeoutInMinutes }), - }); + body = JSON.stringify( + take(input, { + statusDetails: (_) => _json(_), + stepTimeoutInMinutes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -143,15 +143,17 @@ export const se_UpdateJobExecutionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId!, "{jobId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName!, "{thingName}", false); let body: any; - body = JSON.stringify({ - ...(input.executionNumber != null && { executionNumber: input.executionNumber }), - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - ...(input.includeJobDocument != null && { includeJobDocument: input.includeJobDocument }), - ...(input.includeJobExecutionState != null && { includeJobExecutionState: input.includeJobExecutionState }), - ...(input.status != null && { status: input.status }), - ...(input.statusDetails != null && { statusDetails: se_DetailsMap(input.statusDetails, context) }), - ...(input.stepTimeoutInMinutes != null && { stepTimeoutInMinutes: input.stepTimeoutInMinutes }), - }); + body = JSON.stringify( + take(input, { + executionNumber: [], + expectedVersion: [], + includeJobDocument: [], + includeJobExecutionState: [], + status: [], + statusDetails: (_) => _json(_), + stepTimeoutInMinutes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -177,9 +179,10 @@ export const de_DescribeJobExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.execution != null) { - contents.execution = de_JobExecution(data.execution, context); - } + const doc = take(data, { + execution: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -216,10 +219,9 @@ const de_DescribeJobExecutionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -239,12 +241,11 @@ export const de_GetPendingJobExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inProgressJobs != null) { - contents.inProgressJobs = de_JobExecutionSummaryList(data.inProgressJobs, context); - } - if (data.queuedJobs != null) { - contents.queuedJobs = de_JobExecutionSummaryList(data.queuedJobs, context); - } + const doc = take(data, { + inProgressJobs: _json, + queuedJobs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -278,10 +279,9 @@ const de_GetPendingJobExecutionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -301,9 +301,10 @@ export const de_StartNextPendingJobExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.execution != null) { - contents.execution = de_JobExecution(data.execution, context); - } + const doc = take(data, { + execution: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -337,10 +338,9 @@ const de_StartNextPendingJobExecutionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -360,12 +360,11 @@ export const de_UpdateJobExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executionState != null) { - contents.executionState = de_JobExecutionState(data.executionState, context); - } - if (data.jobDocument != null) { - contents.jobDocument = __expectString(data.jobDocument); - } + const doc = take(data, { + executionState: _json, + jobDocument: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -402,16 +401,15 @@ const de_UpdateJobExecutionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1CertificateValidationExceptionRes */ @@ -421,9 +419,10 @@ const de_CertificateValidationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new CertificateValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -440,9 +439,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -459,9 +459,10 @@ const de_InvalidStateTransitionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidStateTransitionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -478,9 +479,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -497,9 +499,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -516,9 +519,10 @@ const de_TerminalStateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TerminalStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -532,12 +536,11 @@ const de_TerminalStateExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.payload != null) { - contents.payload = context.base64Decoder(data.payload); - } + const doc = take(data, { + message: __expectString, + payload: context.base64Decoder, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -545,90 +548,17 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DetailsMap - */ -const se_DetailsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DetailsMap omitted. -/** - * deserializeAws_restJson1DetailsMap - */ -const de_DetailsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DetailsMap omitted. -/** - * deserializeAws_restJson1JobExecution - */ -const de_JobExecution = (output: any, context: __SerdeContext): JobExecution => { - return { - approximateSecondsBeforeTimedOut: __expectLong(output.approximateSecondsBeforeTimedOut), - executionNumber: __expectLong(output.executionNumber), - jobDocument: __expectString(output.jobDocument), - jobId: __expectString(output.jobId), - lastUpdatedAt: __expectLong(output.lastUpdatedAt), - queuedAt: __expectLong(output.queuedAt), - startedAt: __expectLong(output.startedAt), - status: __expectString(output.status), - statusDetails: output.statusDetails != null ? de_DetailsMap(output.statusDetails, context) : undefined, - thingName: __expectString(output.thingName), - versionNumber: __expectLong(output.versionNumber), - } as any; -}; +// de_JobExecution omitted. -/** - * deserializeAws_restJson1JobExecutionState - */ -const de_JobExecutionState = (output: any, context: __SerdeContext): JobExecutionState => { - return { - status: __expectString(output.status), - statusDetails: output.statusDetails != null ? de_DetailsMap(output.statusDetails, context) : undefined, - versionNumber: __expectLong(output.versionNumber), - } as any; -}; +// de_JobExecutionState omitted. -/** - * deserializeAws_restJson1JobExecutionSummary - */ -const de_JobExecutionSummary = (output: any, context: __SerdeContext): JobExecutionSummary => { - return { - executionNumber: __expectLong(output.executionNumber), - jobId: __expectString(output.jobId), - lastUpdatedAt: __expectLong(output.lastUpdatedAt), - queuedAt: __expectLong(output.queuedAt), - startedAt: __expectLong(output.startedAt), - versionNumber: __expectLong(output.versionNumber), - } as any; -}; +// de_JobExecutionSummary omitted. -/** - * deserializeAws_restJson1JobExecutionSummaryList - */ -const de_JobExecutionSummaryList = (output: any, context: __SerdeContext): JobExecutionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobExecutionSummary(entry, context); - }); - return retVal; -}; +// de_JobExecutionSummaryList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot-roborunner/src/protocols/Aws_restJson1.ts b/clients/client-iot-roborunner/src/protocols/Aws_restJson1.ts index 18584543e1af..e5955838c8c7 100644 --- a/clients/client-iot-roborunner/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-roborunner/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -9,10 +10,11 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -73,13 +75,15 @@ export const se_CreateDestinationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createDestination"; let body: any; - body = JSON.stringify({ - ...(input.additionalFixedProperties != null && { additionalFixedProperties: input.additionalFixedProperties }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.site != null && { site: input.site }), - ...(input.state != null && { state: input.state }), - }); + body = JSON.stringify( + take(input, { + additionalFixedProperties: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + site: [], + state: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -104,12 +108,14 @@ export const se_CreateSiteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createSite"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.countryCode != null && { countryCode: input.countryCode }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + countryCode: [], + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -134,18 +140,18 @@ export const se_CreateWorkerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createWorker"; let body: any; - body = JSON.stringify({ - ...(input.additionalFixedProperties != null && { additionalFixedProperties: input.additionalFixedProperties }), - ...(input.additionalTransientProperties != null && { - additionalTransientProperties: input.additionalTransientProperties, - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.fleet != null && { fleet: input.fleet }), - ...(input.name != null && { name: input.name }), - ...(input.orientation != null && { orientation: se_Orientation(input.orientation, context) }), - ...(input.position != null && { position: se_PositionCoordinates(input.position, context) }), - ...(input.vendorProperties != null && { vendorProperties: se_VendorProperties(input.vendorProperties, context) }), - }); + body = JSON.stringify( + take(input, { + additionalFixedProperties: [], + additionalTransientProperties: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + fleet: [], + name: [], + orientation: (_) => se_Orientation(_, context), + position: (_) => se_PositionCoordinates(_, context), + vendorProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -170,12 +176,14 @@ export const se_CreateWorkerFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createWorkerFleet"; let body: any; - body = JSON.stringify({ - ...(input.additionalFixedProperties != null && { additionalFixedProperties: input.additionalFixedProperties }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.site != null && { site: input.site }), - }); + body = JSON.stringify( + take(input, { + additionalFixedProperties: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + site: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -200,9 +208,11 @@ export const se_DeleteDestinationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteDestination"; let body: any; - body = JSON.stringify({ - ...(input.id != null && { id: input.id }), - }); + body = JSON.stringify( + take(input, { + id: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -227,9 +237,11 @@ export const se_DeleteSiteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteSite"; let body: any; - body = JSON.stringify({ - ...(input.id != null && { id: input.id }), - }); + body = JSON.stringify( + take(input, { + id: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -254,9 +266,11 @@ export const se_DeleteWorkerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteWorker"; let body: any; - body = JSON.stringify({ - ...(input.id != null && { id: input.id }), - }); + body = JSON.stringify( + take(input, { + id: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -281,9 +295,11 @@ export const se_DeleteWorkerFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteWorkerFleet"; let body: any; - body = JSON.stringify({ - ...(input.id != null && { id: input.id }), - }); + body = JSON.stringify( + take(input, { + id: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -525,12 +541,14 @@ export const se_UpdateDestinationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDestination"; let body: any; - body = JSON.stringify({ - ...(input.additionalFixedProperties != null && { additionalFixedProperties: input.additionalFixedProperties }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.state != null && { state: input.state }), - }); + body = JSON.stringify( + take(input, { + additionalFixedProperties: [], + id: [], + name: [], + state: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -555,12 +573,14 @@ export const se_UpdateSiteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateSite"; let body: any; - body = JSON.stringify({ - ...(input.countryCode != null && { countryCode: input.countryCode }), - ...(input.description != null && { description: input.description }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + countryCode: [], + description: [], + id: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -585,17 +605,17 @@ export const se_UpdateWorkerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateWorker"; let body: any; - body = JSON.stringify({ - ...(input.additionalFixedProperties != null && { additionalFixedProperties: input.additionalFixedProperties }), - ...(input.additionalTransientProperties != null && { - additionalTransientProperties: input.additionalTransientProperties, - }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.orientation != null && { orientation: se_Orientation(input.orientation, context) }), - ...(input.position != null && { position: se_PositionCoordinates(input.position, context) }), - ...(input.vendorProperties != null && { vendorProperties: se_VendorProperties(input.vendorProperties, context) }), - }); + body = JSON.stringify( + take(input, { + additionalFixedProperties: [], + additionalTransientProperties: [], + id: [], + name: [], + orientation: (_) => se_Orientation(_, context), + position: (_) => se_PositionCoordinates(_, context), + vendorProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -620,11 +640,13 @@ export const se_UpdateWorkerFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateWorkerFleet"; let body: any; - body = JSON.stringify({ - ...(input.additionalFixedProperties != null && { additionalFixedProperties: input.additionalFixedProperties }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + additionalFixedProperties: [], + id: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -650,21 +672,14 @@ export const de_CreateDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + state: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -704,10 +719,9 @@ const de_CreateDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -727,18 +741,13 @@ export const de_CreateSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -775,10 +784,9 @@ const de_CreateSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -798,21 +806,14 @@ export const de_CreateWorkerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.site != null) { - contents.site = __expectString(data.site); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + site: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -852,10 +853,9 @@ const de_CreateWorkerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -875,18 +875,13 @@ export const de_CreateWorkerFleetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -926,10 +921,9 @@ const de_CreateWorkerFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -985,10 +979,9 @@ const de_DeleteDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1044,10 +1037,9 @@ const de_DeleteSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1103,10 +1095,9 @@ const de_DeleteWorkerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1162,10 +1153,9 @@ const de_DeleteWorkerFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1185,30 +1175,17 @@ export const de_GetDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalFixedProperties != null) { - contents.additionalFixedProperties = __expectString(data.additionalFixedProperties); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.site != null) { - contents.site = __expectString(data.site); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + additionalFixedProperties: __expectString, + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + site: __expectString, + state: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1242,10 +1219,9 @@ const de_GetDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1265,27 +1241,16 @@ export const de_GetSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.countryCode != null) { - contents.countryCode = __expectString(data.countryCode); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + arn: __expectString, + countryCode: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1319,10 +1284,9 @@ const de_GetSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1342,42 +1306,21 @@ export const de_GetWorkerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalFixedProperties != null) { - contents.additionalFixedProperties = __expectString(data.additionalFixedProperties); - } - if (data.additionalTransientProperties != null) { - contents.additionalTransientProperties = __expectString(data.additionalTransientProperties); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.orientation != null) { - contents.orientation = de_Orientation(__expectUnion(data.orientation), context); - } - if (data.position != null) { - contents.position = de_PositionCoordinates(__expectUnion(data.position), context); - } - if (data.site != null) { - contents.site = __expectString(data.site); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } - if (data.vendorProperties != null) { - contents.vendorProperties = de_VendorProperties(data.vendorProperties, context); - } + const doc = take(data, { + additionalFixedProperties: __expectString, + additionalTransientProperties: __expectString, + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fleet: __expectString, + id: __expectString, + name: __expectString, + orientation: (_) => de_Orientation(__expectUnion(_), context), + position: (_) => de_PositionCoordinates(__expectUnion(_), context), + site: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorProperties: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1411,10 +1354,9 @@ const de_GetWorkerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1434,27 +1376,16 @@ export const de_GetWorkerFleetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalFixedProperties != null) { - contents.additionalFixedProperties = __expectString(data.additionalFixedProperties); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.site != null) { - contents.site = __expectString(data.site); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + additionalFixedProperties: __expectString, + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + site: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1488,10 +1419,9 @@ const de_GetWorkerFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1511,12 +1441,11 @@ export const de_ListDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.destinations != null) { - contents.destinations = de_Destinations(data.destinations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + destinations: (_) => de_Destinations(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1550,10 +1479,9 @@ const de_ListDestinationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,12 +1501,11 @@ export const de_ListSitesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sites != null) { - contents.sites = de_Sites(data.sites, context); - } + const doc = take(data, { + nextToken: __expectString, + sites: (_) => de_Sites(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1609,10 +1536,9 @@ const de_ListSitesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1632,12 +1558,11 @@ export const de_ListWorkerFleetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workerFleets != null) { - contents.workerFleets = de_WorkerFleets(data.workerFleets, context); - } + const doc = take(data, { + nextToken: __expectString, + workerFleets: (_) => de_WorkerFleets(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1671,10 +1596,9 @@ const de_ListWorkerFleetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1694,12 +1618,11 @@ export const de_ListWorkersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workers != null) { - contents.workers = de_Workers(data.workers, context); - } + const doc = take(data, { + nextToken: __expectString, + workers: (_) => de_Workers(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1733,10 +1656,9 @@ const de_ListWorkersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1756,24 +1678,15 @@ export const de_UpdateDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalFixedProperties != null) { - contents.additionalFixedProperties = __expectString(data.additionalFixedProperties); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + additionalFixedProperties: __expectString, + arn: __expectString, + id: __expectString, + name: __expectString, + state: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1807,10 +1720,9 @@ const de_UpdateDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1830,24 +1742,15 @@ export const de_UpdateSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.countryCode != null) { - contents.countryCode = __expectString(data.countryCode); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + arn: __expectString, + countryCode: __expectString, + description: __expectString, + id: __expectString, + name: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1881,10 +1784,9 @@ const de_UpdateSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1904,36 +1806,19 @@ export const de_UpdateWorkerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalFixedProperties != null) { - contents.additionalFixedProperties = __expectString(data.additionalFixedProperties); - } - if (data.additionalTransientProperties != null) { - contents.additionalTransientProperties = __expectString(data.additionalTransientProperties); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.orientation != null) { - contents.orientation = de_Orientation(__expectUnion(data.orientation), context); - } - if (data.position != null) { - contents.position = de_PositionCoordinates(__expectUnion(data.position), context); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } - if (data.vendorProperties != null) { - contents.vendorProperties = de_VendorProperties(data.vendorProperties, context); - } + const doc = take(data, { + additionalFixedProperties: __expectString, + additionalTransientProperties: __expectString, + arn: __expectString, + fleet: __expectString, + id: __expectString, + name: __expectString, + orientation: (_) => de_Orientation(__expectUnion(_), context), + position: (_) => de_PositionCoordinates(__expectUnion(_), context), + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorProperties: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1967,10 +1852,9 @@ const de_UpdateWorkerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1990,21 +1874,14 @@ export const de_UpdateWorkerFleetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalFixedProperties != null) { - contents.additionalFixedProperties = __expectString(data.additionalFixedProperties); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updatedAt))); - } + const doc = take(data, { + additionalFixedProperties: __expectString, + arn: __expectString, + id: __expectString, + name: __expectString, + updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2038,16 +1915,15 @@ const de_UpdateWorkerFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2057,9 +1933,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2073,9 +1950,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2092,9 +1970,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2111,9 +1990,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2130,9 +2010,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2146,9 +2027,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2162,9 +2044,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2176,11 +2059,11 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_restJson1CartesianCoordinates */ const se_CartesianCoordinates = (input: CartesianCoordinates, context: __SerdeContext): any => { - return { - ...(input.x != null && { x: __serializeFloat(input.x) }), - ...(input.y != null && { y: __serializeFloat(input.y) }), - ...(input.z != null && { z: __serializeFloat(input.z) }), - }; + return take(input, { + x: __serializeFloat, + y: __serializeFloat, + z: __serializeFloat, + }); }; /** @@ -2203,49 +2086,33 @@ const se_PositionCoordinates = (input: PositionCoordinates, context: __SerdeCont }); }; -/** - * serializeAws_restJson1VendorProperties - */ -const se_VendorProperties = (input: VendorProperties, context: __SerdeContext): any => { - return { - ...(input.vendorAdditionalFixedProperties != null && { - vendorAdditionalFixedProperties: input.vendorAdditionalFixedProperties, - }), - ...(input.vendorAdditionalTransientProperties != null && { - vendorAdditionalTransientProperties: input.vendorAdditionalTransientProperties, - }), - ...(input.vendorWorkerId != null && { vendorWorkerId: input.vendorWorkerId }), - ...(input.vendorWorkerIpAddress != null && { vendorWorkerIpAddress: input.vendorWorkerIpAddress }), - }; -}; +// se_VendorProperties omitted. /** * deserializeAws_restJson1CartesianCoordinates */ const de_CartesianCoordinates = (output: any, context: __SerdeContext): CartesianCoordinates => { - return { - x: __limitedParseDouble(output.x), - y: __limitedParseDouble(output.y), - z: __limitedParseDouble(output.z), - } as any; + return take(output, { + x: __limitedParseDouble, + y: __limitedParseDouble, + z: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1Destination */ const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - additionalFixedProperties: __expectString(output.additionalFixedProperties), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - site: __expectString(output.site), - state: __expectString(output.state), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + additionalFixedProperties: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + site: __expectString, + state: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2255,9 +2122,6 @@ const de_Destinations = (output: any, context: __SerdeContext): Destination[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Destination(entry, context); }); return retVal; @@ -2289,13 +2153,12 @@ const de_PositionCoordinates = (output: any, context: __SerdeContext): PositionC * deserializeAws_restJson1Site */ const de_Site = (output: any, context: __SerdeContext): Site => { - return { - arn: __expectString(output.arn), - countryCode: __expectString(output.countryCode), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + countryCode: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** @@ -2305,64 +2168,46 @@ const de_Sites = (output: any, context: __SerdeContext): Site[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Site(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VendorProperties - */ -const de_VendorProperties = (output: any, context: __SerdeContext): VendorProperties => { - return { - vendorAdditionalFixedProperties: __expectString(output.vendorAdditionalFixedProperties), - vendorAdditionalTransientProperties: __expectString(output.vendorAdditionalTransientProperties), - vendorWorkerId: __expectString(output.vendorWorkerId), - vendorWorkerIpAddress: __expectString(output.vendorWorkerIpAddress), - } as any; -}; +// de_VendorProperties omitted. /** * deserializeAws_restJson1Worker */ const de_Worker = (output: any, context: __SerdeContext): Worker => { - return { - additionalFixedProperties: __expectString(output.additionalFixedProperties), - additionalTransientProperties: __expectString(output.additionalTransientProperties), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - fleet: __expectString(output.fleet), - id: __expectString(output.id), - name: __expectString(output.name), - orientation: output.orientation != null ? de_Orientation(__expectUnion(output.orientation), context) : undefined, - position: output.position != null ? de_PositionCoordinates(__expectUnion(output.position), context) : undefined, - site: __expectString(output.site), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - vendorProperties: - output.vendorProperties != null ? de_VendorProperties(output.vendorProperties, context) : undefined, - } as any; + return take(output, { + additionalFixedProperties: __expectString, + additionalTransientProperties: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fleet: __expectString, + id: __expectString, + name: __expectString, + orientation: (_: any) => de_Orientation(__expectUnion(_), context), + position: (_: any) => de_PositionCoordinates(__expectUnion(_), context), + site: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorProperties: _json, + }) as any; }; /** * deserializeAws_restJson1WorkerFleet */ const de_WorkerFleet = (output: any, context: __SerdeContext): WorkerFleet => { - return { - additionalFixedProperties: __expectString(output.additionalFixedProperties), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - site: __expectString(output.site), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + additionalFixedProperties: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + site: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2372,9 +2217,6 @@ const de_WorkerFleets = (output: any, context: __SerdeContext): WorkerFleet[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkerFleet(entry, context); }); return retVal; @@ -2387,9 +2229,6 @@ const de_Workers = (output: any, context: __SerdeContext): Worker[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Worker(entry, context); }); return retVal; diff --git a/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts b/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts index 31bfe7aa0629..2dd3a982f5c0 100644 --- a/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot-wireless/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,12 +13,13 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -399,20 +401,12 @@ import { CdmaNmrObj, CdmaObj, CellTowers, - CertificateList, ConflictException, ConnectionStatusEventConfiguration, ConnectionStatusResourceTypeEventConfiguration, - DakCertificateMetadata, - Destinations, - DeviceProfile, DeviceRegistrationStateEventConfiguration, DeviceRegistrationStateResourceTypeEventConfiguration, - DownlinkQueueMessage, - EventConfigurationItem, - EventNotificationItemConfigurations, FPorts, - FuotaTask, GatewayListItem, GlobalIdentity, Gnss, @@ -433,15 +427,11 @@ import { LoRaWANFuotaTask, LoRaWANFuotaTaskGetInfo, LoRaWANGateway, - LoRaWANGatewayCurrentVersion, LoRaWANGatewayMetadata, LoRaWANGatewayVersion, - LoRaWANGetServiceProfileInfo, LoRaWANJoinEventNotificationConfigurations, LoRaWANJoinResourceTypeEventConfiguration, - LoRaWANListDevice, LoRaWANMulticast, - LoRaWANMulticastGet, LoRaWANMulticastSession, LoRaWANSendDataToDevice, LoRaWANServiceProfile, @@ -451,32 +441,19 @@ import { LteObj, MessageDeliveryStatusEventConfiguration, MessageDeliveryStatusResourceTypeEventConfiguration, - MulticastGroup, - MulticastGroupByFuotaTask, - NetworkAnalyzerConfigurations, OtaaV1_0_x, OtaaV1_1, ParticipatingGateways, - PositionConfigurationItem, Positioning, - PositionSolverDetails, ProximityEventConfiguration, ProximityResourceTypeEventConfiguration, ResourceNotFoundException, - SemtechGnssDetail, - ServiceProfile, SessionKeysAbpV1_0_x, SessionKeysAbpV1_1, SidewalkAccountInfo, - SidewalkAccountInfoWithFingerprint, SidewalkCreateDeviceProfile, SidewalkCreateWirelessDevice, - SidewalkDevice, - SidewalkDeviceMetadata, SidewalkEventNotificationConfigurations, - SidewalkGetDeviceProfile, - SidewalkGetStartImportInfo, - SidewalkListDevice, SidewalkResourceTypeEventConfiguration, Tag, TdscdmaLocalId, @@ -500,7 +477,6 @@ import { LoRaWANMulticastMetadata, LoRaWANStartFuotaTask, LoRaWANUpdateDevice, - LoRaWANUpdateGatewayTaskEntry, MulticastWirelessMetadata, PositionSolverConfigurations, SemtechGnssConfiguration, @@ -513,9 +489,6 @@ import { UpdateAbpV1_0_x, UpdateAbpV1_1, UpdateFPorts, - UpdateWirelessGatewayTaskEntry, - WirelessDeviceStatistics, - WirelessGatewayStatistics, WirelessMetadata, } from "../models/models_1"; @@ -532,11 +505,13 @@ export const se_AssociateAwsAccountWithPartnerAccountCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/partner-accounts"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkAccountInfo(input.Sidewalk, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Sidewalk: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -563,9 +538,11 @@ export const se_AssociateMulticastGroupWithFuotaTaskCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}/multicast-group"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.MulticastGroupId != null && { MulticastGroupId: input.MulticastGroupId }), - }); + body = JSON.stringify( + take(input, { + MulticastGroupId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -592,9 +569,11 @@ export const se_AssociateWirelessDeviceWithFuotaTaskCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}/wireless-device"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.WirelessDeviceId != null && { WirelessDeviceId: input.WirelessDeviceId }), - }); + body = JSON.stringify( + take(input, { + WirelessDeviceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -621,9 +600,11 @@ export const se_AssociateWirelessDeviceWithMulticastGroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/wireless-device"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.WirelessDeviceId != null && { WirelessDeviceId: input.WirelessDeviceId }), - }); + body = JSON.stringify( + take(input, { + WirelessDeviceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -650,9 +631,11 @@ export const se_AssociateWirelessDeviceWithThingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/thing"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.ThingArn != null && { ThingArn: input.ThingArn }), - }); + body = JSON.stringify( + take(input, { + ThingArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -679,9 +662,11 @@ export const se_AssociateWirelessGatewayWithCertificateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}/certificate"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.IotCertificateId != null && { IotCertificateId: input.IotCertificateId }), - }); + body = JSON.stringify( + take(input, { + IotCertificateId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -708,9 +693,11 @@ export const se_AssociateWirelessGatewayWithThingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}/thing"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.ThingArn != null && { ThingArn: input.ThingArn }), - }); + body = JSON.stringify( + take(input, { + ThingArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -759,15 +746,17 @@ export const se_CreateDestinationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/destinations"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.ExpressionType != null && { ExpressionType: input.ExpressionType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Expression: [], + ExpressionType: [], + Name: [], + RoleArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -792,13 +781,15 @@ export const se_CreateDeviceProfileCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device-profiles"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANDeviceProfile(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkCreateDeviceProfile(input.Sidewalk, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + LoRaWAN: (_) => _json(_), + Name: [], + Sidewalk: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -823,18 +814,20 @@ export const se_CreateFuotaTaskCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.FirmwareUpdateImage != null && { FirmwareUpdateImage: input.FirmwareUpdateImage }), - ...(input.FirmwareUpdateRole != null && { FirmwareUpdateRole: input.FirmwareUpdateRole }), - ...(input.FragmentIntervalMS != null && { FragmentIntervalMS: input.FragmentIntervalMS }), - ...(input.FragmentSizeBytes != null && { FragmentSizeBytes: input.FragmentSizeBytes }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANFuotaTask(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedundancyPercent != null && { RedundancyPercent: input.RedundancyPercent }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + FirmwareUpdateImage: [], + FirmwareUpdateRole: [], + FragmentIntervalMS: [], + FragmentSizeBytes: [], + LoRaWAN: (_) => _json(_), + Name: [], + RedundancyPercent: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -859,13 +852,15 @@ export const se_CreateMulticastGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANMulticast(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + LoRaWAN: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -891,17 +886,17 @@ export const se_CreateNetworkAnalyzerConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/network-analyzer-configurations"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TraceContent != null && { TraceContent: se_TraceContent(input.TraceContent, context) }), - ...(input.WirelessDevices != null && { WirelessDevices: se_WirelessDeviceList(input.WirelessDevices, context) }), - ...(input.WirelessGateways != null && { - WirelessGateways: se_WirelessGatewayList(input.WirelessGateways, context), - }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Tags: (_) => _json(_), + TraceContent: (_) => _json(_), + WirelessDevices: (_) => _json(_), + WirelessGateways: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -926,12 +921,14 @@ export const se_CreateServiceProfileCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/service-profiles"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANServiceProfile(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + LoRaWAN: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -956,17 +953,19 @@ export const se_CreateWirelessDeviceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.DestinationName != null && { DestinationName: input.DestinationName }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANDevice(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Positioning != null && { Positioning: input.Positioning }), - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkCreateWirelessDevice(input.Sidewalk, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + DestinationName: [], + LoRaWAN: (_) => _json(_), + Name: [], + Positioning: [], + Sidewalk: (_) => _json(_), + Tags: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -991,13 +990,15 @@ export const se_CreateWirelessGatewayCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANGateway(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + LoRaWAN: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1024,11 +1025,11 @@ export const se_CreateWirelessGatewayTaskCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}/tasks"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.WirelessGatewayTaskDefinitionId != null && { - WirelessGatewayTaskDefinitionId: input.WirelessGatewayTaskDefinitionId, - }), - }); + body = JSON.stringify( + take(input, { + WirelessGatewayTaskDefinitionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1054,13 +1055,15 @@ export const se_CreateWirelessGatewayTaskDefinitionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateway-task-definitions"; let body: any; - body = JSON.stringify({ - ...(input.AutoCreateTasks != null && { AutoCreateTasks: input.AutoCreateTasks }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Update != null && { Update: se_UpdateWirelessGatewayTaskCreate(input.Update, context) }), - }); + body = JSON.stringify( + take(input, { + AutoCreateTasks: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + Tags: (_) => _json(_), + Update: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1918,13 +1921,15 @@ export const se_GetPositionEstimateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/position-estimate"; let body: any; - body = JSON.stringify({ - ...(input.CellTowers != null && { CellTowers: se_CellTowers(input.CellTowers, context) }), - ...(input.Gnss != null && { Gnss: se_Gnss(input.Gnss, context) }), - ...(input.Ip != null && { Ip: se_Ip(input.Ip, context) }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.WiFiAccessPoints != null && { WiFiAccessPoints: se_WiFiAccessPoints(input.WiFiAccessPoints, context) }), - }); + body = JSON.stringify( + take(input, { + CellTowers: (_) => se_CellTowers(_, context), + Gnss: (_) => se_Gnss(_, context), + Ip: (_) => _json(_), + Timestamp: (_) => Math.round(_.getTime() / 1000), + WiFiAccessPoints: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2831,10 +2836,12 @@ export const se_PutPositionConfigurationCommand = async ( resourceType: [, __expectNonNull(input.ResourceType!, `ResourceType`)], }); let body: any; - body = JSON.stringify({ - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.Solvers != null && { Solvers: se_PositionSolverConfigurations(input.Solvers, context) }), - }); + body = JSON.stringify( + take(input, { + Destination: [], + Solvers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2872,9 +2879,11 @@ export const se_PutResourceLogLevelCommand = async ( resourceType: [, __expectNonNull(input.ResourceType!, `ResourceType`)], }); let body: any; - body = JSON.stringify({ - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - }); + body = JSON.stringify( + take(input, { + LogLevel: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2962,12 +2971,12 @@ export const se_SendDataToMulticastGroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/data"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.PayloadData != null && { PayloadData: input.PayloadData }), - ...(input.WirelessMetadata != null && { - WirelessMetadata: se_MulticastWirelessMetadata(input.WirelessMetadata, context), - }), - }); + body = JSON.stringify( + take(input, { + PayloadData: [], + WirelessMetadata: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2994,11 +3003,13 @@ export const se_SendDataToWirelessDeviceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}/data"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.PayloadData != null && { PayloadData: input.PayloadData }), - ...(input.TransmitMode != null && { TransmitMode: input.TransmitMode }), - ...(input.WirelessMetadata != null && { WirelessMetadata: se_WirelessMetadata(input.WirelessMetadata, context) }), - }); + body = JSON.stringify( + take(input, { + PayloadData: [], + TransmitMode: [], + WirelessMetadata: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3025,10 +3036,12 @@ export const se_StartBulkAssociateWirelessDeviceWithMulticastGroupCommand = asyn `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/bulk"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + QueryString: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3055,10 +3068,12 @@ export const se_StartBulkDisassociateWirelessDeviceFromMulticastGroupCommand = a `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/bulk"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + QueryString: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3084,9 +3099,11 @@ export const se_StartFuotaTaskCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANStartFuotaTask(input.LoRaWAN, context) }), - }); + body = JSON.stringify( + take(input, { + LoRaWAN: (_) => se_LoRaWANStartFuotaTask(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3113,9 +3130,11 @@ export const se_StartMulticastGroupSessionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}/session"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANMulticastSession(input.LoRaWAN, context) }), - }); + body = JSON.stringify( + take(input, { + LoRaWAN: (_) => se_LoRaWANMulticastSession(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3141,13 +3160,15 @@ export const se_StartSingleWirelessDeviceImportTaskCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless_single_device_import_task"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DestinationName != null && { DestinationName: input.DestinationName }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkSingleStartImportInfo(input.Sidewalk, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DestinationName: [], + DeviceName: [], + Sidewalk: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3173,12 +3194,14 @@ export const se_StartWirelessDeviceImportTaskCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless_device_import_task"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.DestinationName != null && { DestinationName: input.DestinationName }), - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkStartImportInfo(input.Sidewalk, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + DestinationName: [], + Sidewalk: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3206,9 +3229,11 @@ export const se_TagResourceCommand = async ( resourceArn: [, __expectNonNull(input.ResourceArn!, `ResourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3289,12 +3314,14 @@ export const se_UpdateDestinationCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/destinations/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.ExpressionType != null && { ExpressionType: input.ExpressionType }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Expression: [], + ExpressionType: [], + RoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3320,25 +3347,15 @@ export const se_UpdateEventConfigurationByResourceTypesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-configurations-resource-types"; let body: any; - body = JSON.stringify({ - ...(input.ConnectionStatus != null && { - ConnectionStatus: se_ConnectionStatusResourceTypeEventConfiguration(input.ConnectionStatus, context), - }), - ...(input.DeviceRegistrationState != null && { - DeviceRegistrationState: se_DeviceRegistrationStateResourceTypeEventConfiguration( - input.DeviceRegistrationState, - context - ), - }), - ...(input.Join != null && { Join: se_JoinResourceTypeEventConfiguration(input.Join, context) }), - ...(input.MessageDeliveryStatus != null && { - MessageDeliveryStatus: se_MessageDeliveryStatusResourceTypeEventConfiguration( - input.MessageDeliveryStatus, - context - ), - }), - ...(input.Proximity != null && { Proximity: se_ProximityResourceTypeEventConfiguration(input.Proximity, context) }), - }); + body = JSON.stringify( + take(input, { + ConnectionStatus: (_) => _json(_), + DeviceRegistrationState: (_) => _json(_), + Join: (_) => _json(_), + MessageDeliveryStatus: (_) => _json(_), + Proximity: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3364,16 +3381,18 @@ export const se_UpdateFuotaTaskCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fuota-tasks/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.FirmwareUpdateImage != null && { FirmwareUpdateImage: input.FirmwareUpdateImage }), - ...(input.FirmwareUpdateRole != null && { FirmwareUpdateRole: input.FirmwareUpdateRole }), - ...(input.FragmentIntervalMS != null && { FragmentIntervalMS: input.FragmentIntervalMS }), - ...(input.FragmentSizeBytes != null && { FragmentSizeBytes: input.FragmentSizeBytes }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANFuotaTask(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RedundancyPercent != null && { RedundancyPercent: input.RedundancyPercent }), - }); + body = JSON.stringify( + take(input, { + Description: [], + FirmwareUpdateImage: [], + FirmwareUpdateRole: [], + FragmentIntervalMS: [], + FragmentSizeBytes: [], + LoRaWAN: (_) => _json(_), + Name: [], + RedundancyPercent: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3398,15 +3417,13 @@ export const se_UpdateLogLevelsByResourceTypesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/log-levels"; let body: any; - body = JSON.stringify({ - ...(input.DefaultLogLevel != null && { DefaultLogLevel: input.DefaultLogLevel }), - ...(input.WirelessDeviceLogOptions != null && { - WirelessDeviceLogOptions: se_WirelessDeviceLogOptionList(input.WirelessDeviceLogOptions, context), - }), - ...(input.WirelessGatewayLogOptions != null && { - WirelessGatewayLogOptions: se_WirelessGatewayLogOptionList(input.WirelessGatewayLogOptions, context), - }), - }); + body = JSON.stringify( + take(input, { + DefaultLogLevel: [], + WirelessDeviceLogOptions: (_) => _json(_), + WirelessGatewayLogOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3432,11 +3449,13 @@ export const se_UpdateMulticastGroupCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/multicast-groups/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANMulticast(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + LoRaWAN: (_) => _json(_), + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3471,22 +3490,16 @@ export const se_UpdateNetworkAnalyzerConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.TraceContent != null && { TraceContent: se_TraceContent(input.TraceContent, context) }), - ...(input.WirelessDevicesToAdd != null && { - WirelessDevicesToAdd: se_WirelessDeviceList(input.WirelessDevicesToAdd, context), - }), - ...(input.WirelessDevicesToRemove != null && { - WirelessDevicesToRemove: se_WirelessDeviceList(input.WirelessDevicesToRemove, context), - }), - ...(input.WirelessGatewaysToAdd != null && { - WirelessGatewaysToAdd: se_WirelessGatewayList(input.WirelessGatewaysToAdd, context), - }), - ...(input.WirelessGatewaysToRemove != null && { - WirelessGatewaysToRemove: se_WirelessGatewayList(input.WirelessGatewaysToRemove, context), - }), - }); + body = JSON.stringify( + take(input, { + Description: [], + TraceContent: (_) => _json(_), + WirelessDevicesToAdd: (_) => _json(_), + WirelessDevicesToRemove: (_) => _json(_), + WirelessGatewaysToAdd: (_) => _json(_), + WirelessGatewaysToRemove: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3523,9 +3536,11 @@ export const se_UpdatePartnerAccountCommand = async ( partnerType: [, __expectNonNull(input.PartnerType!, `PartnerType`)], }); let body: any; - body = JSON.stringify({ - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkUpdateAccount(input.Sidewalk, context) }), - }); + body = JSON.stringify( + take(input, { + Sidewalk: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3563,9 +3578,11 @@ export const se_UpdatePositionCommand = async ( resourceType: [, __expectNonNull(input.ResourceType!, `ResourceType`)], }); let body: any; - body = JSON.stringify({ - ...(input.Position != null && { Position: se_PositionCoordinate(input.Position, context) }), - }); + body = JSON.stringify( + take(input, { + Position: (_) => se_PositionCoordinate(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3597,19 +3614,15 @@ export const se_UpdateResourceEventConfigurationCommand = async ( partnerType: [, input.PartnerType!], }); let body: any; - body = JSON.stringify({ - ...(input.ConnectionStatus != null && { - ConnectionStatus: se_ConnectionStatusEventConfiguration(input.ConnectionStatus, context), - }), - ...(input.DeviceRegistrationState != null && { - DeviceRegistrationState: se_DeviceRegistrationStateEventConfiguration(input.DeviceRegistrationState, context), - }), - ...(input.Join != null && { Join: se_JoinEventConfiguration(input.Join, context) }), - ...(input.MessageDeliveryStatus != null && { - MessageDeliveryStatus: se_MessageDeliveryStatusEventConfiguration(input.MessageDeliveryStatus, context), - }), - ...(input.Proximity != null && { Proximity: se_ProximityEventConfiguration(input.Proximity, context) }), - }); + body = JSON.stringify( + take(input, { + ConnectionStatus: (_) => _json(_), + DeviceRegistrationState: (_) => _json(_), + Join: (_) => _json(_), + MessageDeliveryStatus: (_) => _json(_), + Proximity: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3676,13 +3689,15 @@ export const se_UpdateWirelessDeviceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-devices/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.DestinationName != null && { DestinationName: input.DestinationName }), - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANUpdateDevice(input.LoRaWAN, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Positioning != null && { Positioning: input.Positioning }), - }); + body = JSON.stringify( + take(input, { + Description: [], + DestinationName: [], + LoRaWAN: (_) => _json(_), + Name: [], + Positioning: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3709,9 +3724,11 @@ export const se_UpdateWirelessDeviceImportTaskCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless_device_import_task/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkUpdateImportInfo(input.Sidewalk, context) }), - }); + body = JSON.stringify( + take(input, { + Sidewalk: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3737,12 +3754,14 @@ export const se_UpdateWirelessGatewayCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/wireless-gateways/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.JoinEuiFilters != null && { JoinEuiFilters: se_JoinEuiFilters(input.JoinEuiFilters, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NetIdFilters != null && { NetIdFilters: se_NetIdFilters(input.NetIdFilters, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + JoinEuiFilters: (_) => _json(_), + Name: [], + NetIdFilters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3768,12 +3787,11 @@ export const de_AssociateAwsAccountWithPartnerAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkAccountInfo(data.Sidewalk, context); - } + const doc = take(data, { + Arn: __expectString, + Sidewalk: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3810,10 +3828,9 @@ const de_AssociateAwsAccountWithPartnerAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3869,10 +3886,9 @@ const de_AssociateMulticastGroupWithFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3928,10 +3944,9 @@ const de_AssociateWirelessDeviceWithFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3987,10 +4002,9 @@ const de_AssociateWirelessDeviceWithMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4046,10 +4060,9 @@ const de_AssociateWirelessDeviceWithThingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4069,9 +4082,10 @@ export const de_AssociateWirelessGatewayWithCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IotCertificateId != null) { - contents.IotCertificateId = __expectString(data.IotCertificateId); - } + const doc = take(data, { + IotCertificateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4108,10 +4122,9 @@ const de_AssociateWirelessGatewayWithCertificateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4167,10 +4180,9 @@ const de_AssociateWirelessGatewayWithThingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4226,10 +4238,9 @@ const de_CancelMulticastGroupSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4249,12 +4260,11 @@ export const de_CreateDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4291,10 +4301,9 @@ const de_CreateDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4314,12 +4323,11 @@ export const de_CreateDeviceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4353,10 +4361,9 @@ const de_CreateDeviceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4376,12 +4383,11 @@ export const de_CreateFuotaTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4418,10 +4424,9 @@ const de_CreateFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4441,12 +4446,11 @@ export const de_CreateMulticastGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4483,10 +4487,9 @@ const de_CreateMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4506,12 +4509,11 @@ export const de_CreateNetworkAnalyzerConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4548,10 +4550,9 @@ const de_CreateNetworkAnalyzerConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4571,12 +4572,11 @@ export const de_CreateServiceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4610,10 +4610,9 @@ const de_CreateServiceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4633,12 +4632,11 @@ export const de_CreateWirelessDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4675,10 +4673,9 @@ const de_CreateWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4698,12 +4695,11 @@ export const de_CreateWirelessGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4737,10 +4733,9 @@ const de_CreateWirelessGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4760,12 +4755,11 @@ export const de_CreateWirelessGatewayTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.WirelessGatewayTaskDefinitionId != null) { - contents.WirelessGatewayTaskDefinitionId = __expectString(data.WirelessGatewayTaskDefinitionId); - } + const doc = take(data, { + Status: __expectString, + WirelessGatewayTaskDefinitionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4802,10 +4796,9 @@ const de_CreateWirelessGatewayTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4825,12 +4818,11 @@ export const de_CreateWirelessGatewayTaskDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4867,10 +4859,9 @@ const de_CreateWirelessGatewayTaskDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4926,10 +4917,9 @@ const de_DeleteDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4985,10 +4975,9 @@ const de_DeleteDeviceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5041,10 +5030,9 @@ const de_DeleteFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5100,10 +5088,9 @@ const de_DeleteMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5159,10 +5146,9 @@ const de_DeleteNetworkAnalyzerConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5215,10 +5201,9 @@ const de_DeleteQueuedMessagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5274,10 +5259,9 @@ const de_DeleteServiceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5330,10 +5314,9 @@ const de_DeleteWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5389,10 +5372,9 @@ const de_DeleteWirelessDeviceImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5445,10 +5427,9 @@ const de_DeleteWirelessGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5501,10 +5482,9 @@ const de_DeleteWirelessGatewayTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5557,10 +5537,9 @@ const de_DeleteWirelessGatewayTaskDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5610,10 +5589,9 @@ const de_DeregisterWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5663,10 +5641,9 @@ const de_DisassociateAwsAccountFromPartnerAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5719,10 +5696,9 @@ const de_DisassociateMulticastGroupFromFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5778,10 +5754,9 @@ const de_DisassociateWirelessDeviceFromFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5834,10 +5809,9 @@ const de_DisassociateWirelessDeviceFromMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5893,10 +5867,9 @@ const de_DisassociateWirelessDeviceFromThingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5949,10 +5922,9 @@ const de_DisassociateWirelessGatewayFromCertificateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6008,10 +5980,9 @@ const de_DisassociateWirelessGatewayFromThingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6031,24 +6002,15 @@ export const de_GetDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Expression != null) { - contents.Expression = __expectString(data.Expression); - } - if (data.ExpressionType != null) { - contents.ExpressionType = __expectString(data.ExpressionType); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + Expression: __expectString, + ExpressionType: __expectString, + Name: __expectString, + RoleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6082,10 +6044,9 @@ const de_GetDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6105,21 +6066,14 @@ export const de_GetDeviceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANDeviceProfile(data.LoRaWAN, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkGetDeviceProfile(data.Sidewalk, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + LoRaWAN: _json, + Name: __expectString, + Sidewalk: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6153,10 +6107,9 @@ const de_GetDeviceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6176,27 +6129,14 @@ export const de_GetEventConfigurationByResourceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionStatus != null) { - contents.ConnectionStatus = de_ConnectionStatusResourceTypeEventConfiguration(data.ConnectionStatus, context); - } - if (data.DeviceRegistrationState != null) { - contents.DeviceRegistrationState = de_DeviceRegistrationStateResourceTypeEventConfiguration( - data.DeviceRegistrationState, - context - ); - } - if (data.Join != null) { - contents.Join = de_JoinResourceTypeEventConfiguration(data.Join, context); - } - if (data.MessageDeliveryStatus != null) { - contents.MessageDeliveryStatus = de_MessageDeliveryStatusResourceTypeEventConfiguration( - data.MessageDeliveryStatus, - context - ); - } - if (data.Proximity != null) { - contents.Proximity = de_ProximityResourceTypeEventConfiguration(data.Proximity, context); - } + const doc = take(data, { + ConnectionStatus: _json, + DeviceRegistrationState: _json, + Join: _json, + MessageDeliveryStatus: _json, + Proximity: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6224,10 +6164,9 @@ const de_GetEventConfigurationByResourceTypesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6247,42 +6186,21 @@ export const de_GetFuotaTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FirmwareUpdateImage != null) { - contents.FirmwareUpdateImage = __expectString(data.FirmwareUpdateImage); - } - if (data.FirmwareUpdateRole != null) { - contents.FirmwareUpdateRole = __expectString(data.FirmwareUpdateRole); - } - if (data.FragmentIntervalMS != null) { - contents.FragmentIntervalMS = __expectInt32(data.FragmentIntervalMS); - } - if (data.FragmentSizeBytes != null) { - contents.FragmentSizeBytes = __expectInt32(data.FragmentSizeBytes); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANFuotaTaskGetInfo(data.LoRaWAN, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RedundancyPercent != null) { - contents.RedundancyPercent = __expectInt32(data.RedundancyPercent); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + FirmwareUpdateImage: __expectString, + FirmwareUpdateRole: __expectString, + FragmentIntervalMS: __expectInt32, + FragmentSizeBytes: __expectInt32, + Id: __expectString, + LoRaWAN: (_) => de_LoRaWANFuotaTaskGetInfo(_, context), + Name: __expectString, + RedundancyPercent: __expectInt32, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6316,10 +6234,9 @@ const de_GetFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6339,15 +6256,12 @@ export const de_GetLogLevelsByResourceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DefaultLogLevel != null) { - contents.DefaultLogLevel = __expectString(data.DefaultLogLevel); - } - if (data.WirelessDeviceLogOptions != null) { - contents.WirelessDeviceLogOptions = de_WirelessDeviceLogOptionList(data.WirelessDeviceLogOptions, context); - } - if (data.WirelessGatewayLogOptions != null) { - contents.WirelessGatewayLogOptions = de_WirelessGatewayLogOptionList(data.WirelessGatewayLogOptions, context); - } + const doc = take(data, { + DefaultLogLevel: __expectString, + WirelessDeviceLogOptions: _json, + WirelessGatewayLogOptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6381,10 +6295,9 @@ const de_GetLogLevelsByResourceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6404,27 +6317,16 @@ export const de_GetMulticastGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedAt))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANMulticastGet(data.LoRaWAN, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Id: __expectString, + LoRaWAN: _json, + Name: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6458,10 +6360,9 @@ const de_GetMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6481,9 +6382,10 @@ export const de_GetMulticastGroupSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANMulticastSession(data.LoRaWAN, context); - } + const doc = take(data, { + LoRaWAN: (_) => de_LoRaWANMulticastSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6517,10 +6419,9 @@ const de_GetMulticastGroupSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6540,24 +6441,15 @@ export const de_GetNetworkAnalyzerConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.TraceContent != null) { - contents.TraceContent = de_TraceContent(data.TraceContent, context); - } - if (data.WirelessDevices != null) { - contents.WirelessDevices = de_WirelessDeviceList(data.WirelessDevices, context); - } - if (data.WirelessGateways != null) { - contents.WirelessGateways = de_WirelessGatewayList(data.WirelessGateways, context); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + Name: __expectString, + TraceContent: _json, + WirelessDevices: _json, + WirelessGateways: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6591,10 +6483,9 @@ const de_GetNetworkAnalyzerConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6614,12 +6505,11 @@ export const de_GetPartnerAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountLinked != null) { - contents.AccountLinked = __expectBoolean(data.AccountLinked); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkAccountInfoWithFingerprint(data.Sidewalk, context); - } + const doc = take(data, { + AccountLinked: __expectBoolean, + Sidewalk: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6650,10 +6540,9 @@ const de_GetPartnerAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6673,24 +6562,15 @@ export const de_GetPositionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Accuracy != null) { - contents.Accuracy = de_Accuracy(data.Accuracy, context); - } - if (data.Position != null) { - contents.Position = de_PositionCoordinate(data.Position, context); - } - if (data.SolverProvider != null) { - contents.SolverProvider = __expectString(data.SolverProvider); - } - if (data.SolverType != null) { - contents.SolverType = __expectString(data.SolverType); - } - if (data.SolverVersion != null) { - contents.SolverVersion = __expectString(data.SolverVersion); - } - if (data.Timestamp != null) { - contents.Timestamp = __expectString(data.Timestamp); - } + const doc = take(data, { + Accuracy: (_) => de_Accuracy(_, context), + Position: (_) => de_PositionCoordinate(_, context), + SolverProvider: __expectString, + SolverType: __expectString, + SolverVersion: __expectString, + Timestamp: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6724,10 +6604,9 @@ const de_GetPositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6747,12 +6626,11 @@ export const de_GetPositionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Destination != null) { - contents.Destination = __expectString(data.Destination); - } - if (data.Solvers != null) { - contents.Solvers = de_PositionSolverDetails(data.Solvers, context); - } + const doc = take(data, { + Destination: __expectString, + Solvers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6786,10 +6664,9 @@ const de_GetPositionConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6843,10 +6720,9 @@ const de_GetPositionEstimateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6866,24 +6742,14 @@ export const de_GetResourceEventConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionStatus != null) { - contents.ConnectionStatus = de_ConnectionStatusEventConfiguration(data.ConnectionStatus, context); - } - if (data.DeviceRegistrationState != null) { - contents.DeviceRegistrationState = de_DeviceRegistrationStateEventConfiguration( - data.DeviceRegistrationState, - context - ); - } - if (data.Join != null) { - contents.Join = de_JoinEventConfiguration(data.Join, context); - } - if (data.MessageDeliveryStatus != null) { - contents.MessageDeliveryStatus = de_MessageDeliveryStatusEventConfiguration(data.MessageDeliveryStatus, context); - } - if (data.Proximity != null) { - contents.Proximity = de_ProximityEventConfiguration(data.Proximity, context); - } + const doc = take(data, { + ConnectionStatus: _json, + DeviceRegistrationState: _json, + Join: _json, + MessageDeliveryStatus: _json, + Proximity: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6917,10 +6783,9 @@ const de_GetResourceEventConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6940,9 +6805,10 @@ export const de_GetResourceLogLevelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LogLevel != null) { - contents.LogLevel = __expectString(data.LogLevel); - } + const doc = take(data, { + LogLevel: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6976,10 +6842,9 @@ const de_GetResourceLogLevelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7033,10 +6898,9 @@ const de_GetResourcePositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7056,15 +6920,12 @@ export const de_GetServiceEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServerTrust != null) { - contents.ServerTrust = __expectString(data.ServerTrust); - } - if (data.ServiceEndpoint != null) { - contents.ServiceEndpoint = __expectString(data.ServiceEndpoint); - } - if (data.ServiceType != null) { - contents.ServiceType = __expectString(data.ServiceType); - } + const doc = take(data, { + ServerTrust: __expectString, + ServiceEndpoint: __expectString, + ServiceType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7095,10 +6956,9 @@ const de_GetServiceEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7118,18 +6978,13 @@ export const de_GetServiceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANGetServiceProfileInfo(data.LoRaWAN, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + LoRaWAN: _json, + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7163,10 +7018,9 @@ const de_GetServiceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7186,39 +7040,20 @@ export const de_GetWirelessDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DestinationName != null) { - contents.DestinationName = __expectString(data.DestinationName); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANDevice(data.LoRaWAN, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Positioning != null) { - contents.Positioning = __expectString(data.Positioning); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkDevice(data.Sidewalk, context); - } - if (data.ThingArn != null) { - contents.ThingArn = __expectString(data.ThingArn); - } - if (data.ThingName != null) { - contents.ThingName = __expectString(data.ThingName); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + DestinationName: __expectString, + Id: __expectString, + LoRaWAN: _json, + Name: __expectString, + Positioning: __expectString, + Sidewalk: _json, + ThingArn: __expectString, + ThingName: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7252,10 +7087,9 @@ const de_GetWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7275,39 +7109,20 @@ export const de_GetWirelessDeviceImportTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.DestinationName != null) { - contents.DestinationName = __expectString(data.DestinationName); - } - if (data.FailedImportedDeviceCount != null) { - contents.FailedImportedDeviceCount = __expectLong(data.FailedImportedDeviceCount); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.InitializedImportedDeviceCount != null) { - contents.InitializedImportedDeviceCount = __expectLong(data.InitializedImportedDeviceCount); - } - if (data.OnboardedImportedDeviceCount != null) { - contents.OnboardedImportedDeviceCount = __expectLong(data.OnboardedImportedDeviceCount); - } - if (data.PendingImportedDeviceCount != null) { - contents.PendingImportedDeviceCount = __expectLong(data.PendingImportedDeviceCount); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkGetStartImportInfo(data.Sidewalk, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusReason != null) { - contents.StatusReason = __expectString(data.StatusReason); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DestinationName: __expectString, + FailedImportedDeviceCount: __expectLong, + Id: __expectString, + InitializedImportedDeviceCount: __expectLong, + OnboardedImportedDeviceCount: __expectLong, + PendingImportedDeviceCount: __expectLong, + Sidewalk: _json, + Status: __expectString, + StatusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7344,10 +7159,9 @@ const de_GetWirelessDeviceImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7367,18 +7181,13 @@ export const de_GetWirelessDeviceStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastUplinkReceivedAt != null) { - contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANDeviceMetadata(data.LoRaWAN, context); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkDeviceMetadata(data.Sidewalk, context); - } - if (data.WirelessDeviceId != null) { - contents.WirelessDeviceId = __expectString(data.WirelessDeviceId); - } + const doc = take(data, { + LastUplinkReceivedAt: __expectString, + LoRaWAN: (_) => de_LoRaWANDeviceMetadata(_, context), + Sidewalk: _json, + WirelessDeviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7412,10 +7221,9 @@ const de_GetWirelessDeviceStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7435,27 +7243,16 @@ export const de_GetWirelessGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANGateway(data.LoRaWAN, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ThingArn != null) { - contents.ThingArn = __expectString(data.ThingArn); - } - if (data.ThingName != null) { - contents.ThingName = __expectString(data.ThingName); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + Id: __expectString, + LoRaWAN: _json, + Name: __expectString, + ThingArn: __expectString, + ThingName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7489,10 +7286,9 @@ const de_GetWirelessGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7512,12 +7308,11 @@ export const de_GetWirelessGatewayCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IotCertificateId != null) { - contents.IotCertificateId = __expectString(data.IotCertificateId); - } - if (data.LoRaWANNetworkServerCertificateId != null) { - contents.LoRaWANNetworkServerCertificateId = __expectString(data.LoRaWANNetworkServerCertificateId); - } + const doc = take(data, { + IotCertificateId: __expectString, + LoRaWANNetworkServerCertificateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7551,10 +7346,9 @@ const de_GetWirelessGatewayCertificateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7574,9 +7368,10 @@ export const de_GetWirelessGatewayFirmwareInformationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LoRaWAN != null) { - contents.LoRaWAN = de_LoRaWANGatewayCurrentVersion(data.LoRaWAN, context); - } + const doc = take(data, { + LoRaWAN: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7610,10 +7405,9 @@ const de_GetWirelessGatewayFirmwareInformationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7633,15 +7427,12 @@ export const de_GetWirelessGatewayStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionStatus != null) { - contents.ConnectionStatus = __expectString(data.ConnectionStatus); - } - if (data.LastUplinkReceivedAt != null) { - contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); - } - if (data.WirelessGatewayId != null) { - contents.WirelessGatewayId = __expectString(data.WirelessGatewayId); - } + const doc = take(data, { + ConnectionStatus: __expectString, + LastUplinkReceivedAt: __expectString, + WirelessGatewayId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7675,10 +7466,9 @@ const de_GetWirelessGatewayStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7698,21 +7488,14 @@ export const de_GetWirelessGatewayTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastUplinkReceivedAt != null) { - contents.LastUplinkReceivedAt = __expectString(data.LastUplinkReceivedAt); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.TaskCreatedAt != null) { - contents.TaskCreatedAt = __expectString(data.TaskCreatedAt); - } - if (data.WirelessGatewayId != null) { - contents.WirelessGatewayId = __expectString(data.WirelessGatewayId); - } - if (data.WirelessGatewayTaskDefinitionId != null) { - contents.WirelessGatewayTaskDefinitionId = __expectString(data.WirelessGatewayTaskDefinitionId); - } + const doc = take(data, { + LastUplinkReceivedAt: __expectString, + Status: __expectString, + TaskCreatedAt: __expectString, + WirelessGatewayId: __expectString, + WirelessGatewayTaskDefinitionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7746,10 +7529,9 @@ const de_GetWirelessGatewayTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7769,18 +7551,13 @@ export const de_GetWirelessGatewayTaskDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AutoCreateTasks != null) { - contents.AutoCreateTasks = __expectBoolean(data.AutoCreateTasks); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Update != null) { - contents.Update = de_UpdateWirelessGatewayTaskCreate(data.Update, context); - } + const doc = take(data, { + Arn: __expectString, + AutoCreateTasks: __expectBoolean, + Name: __expectString, + Update: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7814,10 +7591,9 @@ const de_GetWirelessGatewayTaskDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7837,12 +7613,11 @@ export const de_ListDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DestinationList != null) { - contents.DestinationList = de_DestinationList(data.DestinationList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DestinationList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7873,10 +7648,9 @@ const de_ListDestinationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7896,12 +7670,11 @@ export const de_ListDeviceProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceProfileList != null) { - contents.DeviceProfileList = de_DeviceProfileList(data.DeviceProfileList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DeviceProfileList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7932,10 +7705,9 @@ const de_ListDeviceProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7955,15 +7727,12 @@ export const de_ListDevicesForWirelessDeviceImportTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DestinationName != null) { - contents.DestinationName = __expectString(data.DestinationName); - } - if (data.ImportedWirelessDeviceList != null) { - contents.ImportedWirelessDeviceList = de_ImportedWirelessDeviceList(data.ImportedWirelessDeviceList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DestinationName: __expectString, + ImportedWirelessDeviceList: (_) => de_ImportedWirelessDeviceList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8000,10 +7769,9 @@ const de_ListDevicesForWirelessDeviceImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8023,12 +7791,11 @@ export const de_ListEventConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventConfigurationsList != null) { - contents.EventConfigurationsList = de_EventConfigurationsList(data.EventConfigurationsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EventConfigurationsList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8059,10 +7826,9 @@ const de_ListEventConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8082,12 +7848,11 @@ export const de_ListFuotaTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FuotaTaskList != null) { - contents.FuotaTaskList = de_FuotaTaskList(data.FuotaTaskList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + FuotaTaskList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8118,10 +7883,9 @@ const de_ListFuotaTasksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8141,12 +7905,11 @@ export const de_ListMulticastGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MulticastGroupList != null) { - contents.MulticastGroupList = de_MulticastGroupList(data.MulticastGroupList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MulticastGroupList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8177,10 +7940,9 @@ const de_ListMulticastGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8200,12 +7962,11 @@ export const de_ListMulticastGroupsByFuotaTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MulticastGroupList != null) { - contents.MulticastGroupList = de_MulticastGroupListByFuotaTask(data.MulticastGroupList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MulticastGroupList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8239,10 +8000,9 @@ const de_ListMulticastGroupsByFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8262,15 +8022,11 @@ export const de_ListNetworkAnalyzerConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NetworkAnalyzerConfigurationList != null) { - contents.NetworkAnalyzerConfigurationList = de_NetworkAnalyzerConfigurationList( - data.NetworkAnalyzerConfigurationList, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + NetworkAnalyzerConfigurationList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8301,10 +8057,9 @@ const de_ListNetworkAnalyzerConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8324,12 +8079,11 @@ export const de_ListPartnerAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Sidewalk != null) { - contents.Sidewalk = de_SidewalkAccountList(data.Sidewalk, context); - } + const doc = take(data, { + NextToken: __expectString, + Sidewalk: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8360,10 +8114,9 @@ const de_ListPartnerAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8383,12 +8136,11 @@ export const de_ListPositionConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PositionConfigurationList != null) { - contents.PositionConfigurationList = de_PositionConfigurationList(data.PositionConfigurationList, context); - } + const doc = take(data, { + NextToken: __expectString, + PositionConfigurationList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8419,10 +8171,9 @@ const de_ListPositionConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8442,12 +8193,11 @@ export const de_ListQueuedMessagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DownlinkQueueMessagesList != null) { - contents.DownlinkQueueMessagesList = de_DownlinkQueueMessagesList(data.DownlinkQueueMessagesList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DownlinkQueueMessagesList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8481,10 +8231,9 @@ const de_ListQueuedMessagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8504,12 +8253,11 @@ export const de_ListServiceProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ServiceProfileList != null) { - contents.ServiceProfileList = de_ServiceProfileList(data.ServiceProfileList, context); - } + const doc = take(data, { + NextToken: __expectString, + ServiceProfileList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8540,10 +8288,9 @@ const de_ListServiceProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8563,9 +8310,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8599,10 +8347,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8622,12 +8369,11 @@ export const de_ListWirelessDeviceImportTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WirelessDeviceImportTaskList != null) { - contents.WirelessDeviceImportTaskList = de_WirelessDeviceImportTaskList(data.WirelessDeviceImportTaskList, context); - } + const doc = take(data, { + NextToken: __expectString, + WirelessDeviceImportTaskList: (_) => de_WirelessDeviceImportTaskList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8664,10 +8410,9 @@ const de_ListWirelessDeviceImportTasksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8687,12 +8432,11 @@ export const de_ListWirelessDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WirelessDeviceList != null) { - contents.WirelessDeviceList = de_WirelessDeviceStatisticsList(data.WirelessDeviceList, context); - } + const doc = take(data, { + NextToken: __expectString, + WirelessDeviceList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8723,10 +8467,9 @@ const de_ListWirelessDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8746,12 +8489,11 @@ export const de_ListWirelessGatewaysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WirelessGatewayList != null) { - contents.WirelessGatewayList = de_WirelessGatewayStatisticsList(data.WirelessGatewayList, context); - } + const doc = take(data, { + NextToken: __expectString, + WirelessGatewayList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8782,10 +8524,9 @@ const de_ListWirelessGatewaysCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8805,12 +8546,11 @@ export const de_ListWirelessGatewayTaskDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TaskDefinitions != null) { - contents.TaskDefinitions = de_WirelessGatewayTaskDefinitionList(data.TaskDefinitions, context); - } + const doc = take(data, { + NextToken: __expectString, + TaskDefinitions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8841,10 +8581,9 @@ const de_ListWirelessGatewayTaskDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8897,10 +8636,9 @@ const de_PutPositionConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8953,10 +8691,9 @@ const de_PutResourceLogLevelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9009,10 +8746,9 @@ const de_ResetAllResourceLogLevelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9065,10 +8801,9 @@ const de_ResetResourceLogLevelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9088,9 +8823,10 @@ export const de_SendDataToMulticastGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9127,10 +8863,9 @@ const de_SendDataToMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9150,9 +8885,10 @@ export const de_SendDataToWirelessDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9183,10 +8919,9 @@ const de_SendDataToWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9239,10 +8974,9 @@ const de_StartBulkAssociateWirelessDeviceWithMulticastGroupCommandError = async throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9295,10 +9029,9 @@ const de_StartBulkDisassociateWirelessDeviceFromMulticastGroupCommandError = asy throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9354,10 +9087,9 @@ const de_StartFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9413,10 +9145,9 @@ const de_StartMulticastGroupSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9436,12 +9167,11 @@ export const de_StartSingleWirelessDeviceImportTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9478,10 +9208,9 @@ const de_StartSingleWirelessDeviceImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9501,12 +9230,11 @@ export const de_StartWirelessDeviceImportTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9543,10 +9271,9 @@ const de_StartWirelessDeviceImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9602,10 +9329,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9625,9 +9351,10 @@ export const de_TestWirelessDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Result != null) { - contents.Result = __expectString(data.Result); - } + const doc = take(data, { + Result: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9658,10 +9385,9 @@ const de_TestWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9714,10 +9440,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9770,10 +9495,9 @@ const de_UpdateDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9823,10 +9547,9 @@ const de_UpdateEventConfigurationByResourceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9882,10 +9605,9 @@ const de_UpdateFuotaTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9941,10 +9663,9 @@ const de_UpdateLogLevelsByResourceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10000,10 +9721,9 @@ const de_UpdateMulticastGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10056,10 +9776,9 @@ const de_UpdateNetworkAnalyzerConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10109,10 +9828,9 @@ const de_UpdatePartnerAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10165,10 +9883,9 @@ const de_UpdatePositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10224,10 +9941,9 @@ const de_UpdateResourceEventConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10280,10 +9996,9 @@ const de_UpdateResourcePositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10336,10 +10051,9 @@ const de_UpdateWirelessDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10395,10 +10109,9 @@ const de_UpdateWirelessDeviceImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10451,16 +10164,15 @@ const de_UpdateWirelessGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -10470,9 +10182,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10486,15 +10199,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10511,9 +10221,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10530,15 +10241,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10552,9 +10260,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10571,12 +10280,11 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10590,9 +10298,10 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -10600,49 +10309,13 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AbpV1_0_x - */ -const se_AbpV1_0_x = (input: AbpV1_0_x, context: __SerdeContext): any => { - return { - ...(input.DevAddr != null && { DevAddr: input.DevAddr }), - ...(input.FCntStart != null && { FCntStart: input.FCntStart }), - ...(input.SessionKeys != null && { SessionKeys: se_SessionKeysAbpV1_0_x(input.SessionKeys, context) }), - }; -}; +// se_AbpV1_0_x omitted. -/** - * serializeAws_restJson1AbpV1_1 - */ -const se_AbpV1_1 = (input: AbpV1_1, context: __SerdeContext): any => { - return { - ...(input.DevAddr != null && { DevAddr: input.DevAddr }), - ...(input.FCntStart != null && { FCntStart: input.FCntStart }), - ...(input.SessionKeys != null && { SessionKeys: se_SessionKeysAbpV1_1(input.SessionKeys, context) }), - }; -}; +// se_AbpV1_1 omitted. -/** - * serializeAws_restJson1ApplicationConfig - */ -const se_ApplicationConfig = (input: ApplicationConfig, context: __SerdeContext): any => { - return { - ...(input.DestinationName != null && { DestinationName: input.DestinationName }), - ...(input.FPort != null && { FPort: input.FPort }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ApplicationConfig omitted. -/** - * serializeAws_restJson1Applications - */ -const se_Applications = (input: ApplicationConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ApplicationConfig(entry, context); - }); -}; +// se_Applications omitted. /** * serializeAws_restJson1AssistPosition @@ -10655,26 +10328,9 @@ const se_AssistPosition = (input: number[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1Beaconing - */ -const se_Beaconing = (input: Beaconing, context: __SerdeContext): any => { - return { - ...(input.DataRate != null && { DataRate: input.DataRate }), - ...(input.Frequencies != null && { Frequencies: se_BeaconingFrequencies(input.Frequencies, context) }), - }; -}; +// se_Beaconing omitted. -/** - * serializeAws_restJson1BeaconingFrequencies - */ -const se_BeaconingFrequencies = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BeaconingFrequencies omitted. /** * serializeAws_restJson1CdmaList @@ -10687,2542 +10343,634 @@ const se_CdmaList = (input: CdmaObj[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1CdmaLocalId - */ -const se_CdmaLocalId = (input: CdmaLocalId, context: __SerdeContext): any => { - return { - ...(input.CdmaChannel != null && { CdmaChannel: input.CdmaChannel }), - ...(input.PnOffset != null && { PnOffset: input.PnOffset }), - }; -}; +// se_CdmaLocalId omitted. -/** - * serializeAws_restJson1CdmaNmrList - */ -const se_CdmaNmrList = (input: CdmaNmrObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CdmaNmrObj(entry, context); - }); -}; +// se_CdmaNmrList omitted. -/** - * serializeAws_restJson1CdmaNmrObj - */ -const se_CdmaNmrObj = (input: CdmaNmrObj, context: __SerdeContext): any => { - return { - ...(input.BaseStationId != null && { BaseStationId: input.BaseStationId }), - ...(input.CdmaChannel != null && { CdmaChannel: input.CdmaChannel }), - ...(input.PilotPower != null && { PilotPower: input.PilotPower }), - ...(input.PnOffset != null && { PnOffset: input.PnOffset }), - }; -}; +// se_CdmaNmrObj omitted. /** * serializeAws_restJson1CdmaObj */ const se_CdmaObj = (input: CdmaObj, context: __SerdeContext): any => { - return { - ...(input.BaseLat != null && { BaseLat: __serializeFloat(input.BaseLat) }), - ...(input.BaseLng != null && { BaseLng: __serializeFloat(input.BaseLng) }), - ...(input.BaseStationId != null && { BaseStationId: input.BaseStationId }), - ...(input.CdmaLocalId != null && { CdmaLocalId: se_CdmaLocalId(input.CdmaLocalId, context) }), - ...(input.CdmaNmr != null && { CdmaNmr: se_CdmaNmrList(input.CdmaNmr, context) }), - ...(input.NetworkId != null && { NetworkId: input.NetworkId }), - ...(input.PilotPower != null && { PilotPower: input.PilotPower }), - ...(input.RegistrationZone != null && { RegistrationZone: input.RegistrationZone }), - ...(input.SystemId != null && { SystemId: input.SystemId }), - }; + return take(input, { + BaseLat: __serializeFloat, + BaseLng: __serializeFloat, + BaseStationId: [], + CdmaLocalId: _json, + CdmaNmr: _json, + NetworkId: [], + PilotPower: [], + RegistrationZone: [], + SystemId: [], + }); }; /** * serializeAws_restJson1CellTowers */ const se_CellTowers = (input: CellTowers, context: __SerdeContext): any => { - return { - ...(input.Cdma != null && { Cdma: se_CdmaList(input.Cdma, context) }), - ...(input.Gsm != null && { Gsm: se_GsmList(input.Gsm, context) }), - ...(input.Lte != null && { Lte: se_LteList(input.Lte, context) }), - ...(input.Tdscdma != null && { Tdscdma: se_TdscdmaList(input.Tdscdma, context) }), - ...(input.Wcdma != null && { Wcdma: se_WcdmaList(input.Wcdma, context) }), - }; + return take(input, { + Cdma: (_) => se_CdmaList(_, context), + Gsm: _json, + Lte: (_) => se_LteList(_, context), + Tdscdma: _json, + Wcdma: _json, + }); }; -/** - * serializeAws_restJson1ConnectionStatusEventConfiguration - */ -const se_ConnectionStatusEventConfiguration = ( - input: ConnectionStatusEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.LoRaWAN != null && { - LoRaWAN: se_LoRaWANConnectionStatusEventNotificationConfigurations(input.LoRaWAN, context), - }), - ...(input.WirelessGatewayIdEventTopic != null && { - WirelessGatewayIdEventTopic: input.WirelessGatewayIdEventTopic, - }), - }; -}; +// se_ConnectionStatusEventConfiguration omitted. -/** - * serializeAws_restJson1ConnectionStatusResourceTypeEventConfiguration - */ -const se_ConnectionStatusResourceTypeEventConfiguration = ( - input: ConnectionStatusResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.LoRaWAN != null && { - LoRaWAN: se_LoRaWANConnectionStatusResourceTypeEventConfiguration(input.LoRaWAN, context), - }), - }; -}; +// se_ConnectionStatusResourceTypeEventConfiguration omitted. -/** - * serializeAws_restJson1DeviceRegistrationStateEventConfiguration - */ -const se_DeviceRegistrationStateEventConfiguration = ( - input: DeviceRegistrationStateEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkEventNotificationConfigurations(input.Sidewalk, context) }), - ...(input.WirelessDeviceIdEventTopic != null && { WirelessDeviceIdEventTopic: input.WirelessDeviceIdEventTopic }), - }; -}; +// se_DeviceRegistrationStateEventConfiguration omitted. -/** - * serializeAws_restJson1DeviceRegistrationStateResourceTypeEventConfiguration - */ -const se_DeviceRegistrationStateResourceTypeEventConfiguration = ( - input: DeviceRegistrationStateResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkResourceTypeEventConfiguration(input.Sidewalk, context) }), - }; -}; +// se_DeviceRegistrationStateResourceTypeEventConfiguration omitted. -/** - * serializeAws_restJson1FactoryPresetFreqsList - */ -const se_FactoryPresetFreqsList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FactoryPresetFreqsList omitted. -/** - * serializeAws_restJson1FPorts - */ -const se_FPorts = (input: FPorts, context: __SerdeContext): any => { - return { - ...(input.Applications != null && { Applications: se_Applications(input.Applications, context) }), - ...(input.ClockSync != null && { ClockSync: input.ClockSync }), - ...(input.Fuota != null && { Fuota: input.Fuota }), - ...(input.Multicast != null && { Multicast: input.Multicast }), - ...(input.Positioning != null && { Positioning: se_Positioning(input.Positioning, context) }), - }; -}; +// se_FPorts omitted. -/** - * serializeAws_restJson1GatewayList - */ -const se_GatewayList = (input: GatewayListItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GatewayListItem(entry, context); - }); -}; +// se_GatewayList omitted. + +// se_GatewayListItem omitted. + +// se_GlobalIdentity omitted. /** - * serializeAws_restJson1GatewayListItem + * serializeAws_restJson1Gnss */ -const se_GatewayListItem = (input: GatewayListItem, context: __SerdeContext): any => { - return { - ...(input.DownlinkFrequency != null && { DownlinkFrequency: input.DownlinkFrequency }), - ...(input.GatewayId != null && { GatewayId: input.GatewayId }), - }; +const se_Gnss = (input: Gnss, context: __SerdeContext): any => { + return take(input, { + AssistAltitude: __serializeFloat, + AssistPosition: (_) => se_AssistPosition(_, context), + CaptureTime: __serializeFloat, + CaptureTimeAccuracy: __serializeFloat, + Payload: [], + Use2DSolver: [], + }); }; +// se_GsmList omitted. + +// se_GsmLocalId omitted. + +// se_GsmNmrList omitted. + +// se_GsmNmrObj omitted. + +// se_GsmObj omitted. + +// se_Ip omitted. + +// se_JoinEuiFilters omitted. + +// se_JoinEuiRange omitted. + +// se_JoinEventConfiguration omitted. + +// se_JoinResourceTypeEventConfiguration omitted. + +// se_LoRaWANConnectionStatusEventNotificationConfigurations omitted. + +// se_LoRaWANConnectionStatusResourceTypeEventConfiguration omitted. + +// se_LoRaWANDevice omitted. + +// se_LoRaWANDeviceProfile omitted. + +// se_LoRaWANFuotaTask omitted. + +// se_LoRaWANGateway omitted. + +// se_LoRaWANGatewayVersion omitted. + +// se_LoRaWANJoinEventNotificationConfigurations omitted. + +// se_LoRaWANJoinResourceTypeEventConfiguration omitted. + +// se_LoRaWANMulticast omitted. + +// se_LoRaWANMulticastMetadata omitted. + /** - * serializeAws_restJson1GlobalIdentity + * serializeAws_restJson1LoRaWANMulticastSession */ -const se_GlobalIdentity = (input: GlobalIdentity, context: __SerdeContext): any => { - return { - ...(input.GeranCid != null && { GeranCid: input.GeranCid }), - ...(input.Lac != null && { Lac: input.Lac }), - }; +const se_LoRaWANMulticastSession = (input: LoRaWANMulticastSession, context: __SerdeContext): any => { + return take(input, { + DlDr: [], + DlFreq: [], + SessionStartTime: (_) => _.toISOString().split(".")[0] + "Z", + SessionTimeout: [], + }); }; +// se_LoRaWANSendDataToDevice omitted. + +// se_LoRaWANServiceProfile omitted. + /** - * serializeAws_restJson1Gnss + * serializeAws_restJson1LoRaWANStartFuotaTask */ -const se_Gnss = (input: Gnss, context: __SerdeContext): any => { - return { - ...(input.AssistAltitude != null && { AssistAltitude: __serializeFloat(input.AssistAltitude) }), - ...(input.AssistPosition != null && { AssistPosition: se_AssistPosition(input.AssistPosition, context) }), - ...(input.CaptureTime != null && { CaptureTime: __serializeFloat(input.CaptureTime) }), - ...(input.CaptureTimeAccuracy != null && { CaptureTimeAccuracy: __serializeFloat(input.CaptureTimeAccuracy) }), - ...(input.Payload != null && { Payload: input.Payload }), - ...(input.Use2DSolver != null && { Use2DSolver: input.Use2DSolver }), - }; +const se_LoRaWANStartFuotaTask = (input: LoRaWANStartFuotaTask, context: __SerdeContext): any => { + return take(input, { + StartTime: (_) => _.toISOString().split(".")[0] + "Z", + }); }; +// se_LoRaWANUpdateDevice omitted. + +// se_LoRaWANUpdateGatewayTaskCreate omitted. + /** - * serializeAws_restJson1GsmList + * serializeAws_restJson1LteList */ -const se_GsmList = (input: GsmObj[], context: __SerdeContext): any => { +const se_LteList = (input: LteObj[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_GsmObj(entry, context); + return se_LteObj(entry, context); }); }; -/** - * serializeAws_restJson1GsmLocalId - */ -const se_GsmLocalId = (input: GsmLocalId, context: __SerdeContext): any => { - return { - ...(input.Bcch != null && { Bcch: input.Bcch }), - ...(input.Bsic != null && { Bsic: input.Bsic }), - }; -}; +// se_LteLocalId omitted. /** - * serializeAws_restJson1GsmNmrList + * serializeAws_restJson1LteNmrList */ -const se_GsmNmrList = (input: GsmNmrObj[], context: __SerdeContext): any => { +const se_LteNmrList = (input: LteNmrObj[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_GsmNmrObj(entry, context); + return se_LteNmrObj(entry, context); }); }; /** - * serializeAws_restJson1GsmNmrObj + * serializeAws_restJson1LteNmrObj */ -const se_GsmNmrObj = (input: GsmNmrObj, context: __SerdeContext): any => { - return { - ...(input.Bcch != null && { Bcch: input.Bcch }), - ...(input.Bsic != null && { Bsic: input.Bsic }), - ...(input.GlobalIdentity != null && { GlobalIdentity: se_GlobalIdentity(input.GlobalIdentity, context) }), - ...(input.RxLevel != null && { RxLevel: input.RxLevel }), - }; +const se_LteNmrObj = (input: LteNmrObj, context: __SerdeContext): any => { + return take(input, { + Earfcn: [], + EutranCid: [], + Pci: [], + Rsrp: [], + Rsrq: __serializeFloat, + }); }; /** - * serializeAws_restJson1GsmObj + * serializeAws_restJson1LteObj */ -const se_GsmObj = (input: GsmObj, context: __SerdeContext): any => { - return { - ...(input.GeranCid != null && { GeranCid: input.GeranCid }), - ...(input.GsmLocalId != null && { GsmLocalId: se_GsmLocalId(input.GsmLocalId, context) }), - ...(input.GsmNmr != null && { GsmNmr: se_GsmNmrList(input.GsmNmr, context) }), - ...(input.GsmTimingAdvance != null && { GsmTimingAdvance: input.GsmTimingAdvance }), - ...(input.Lac != null && { Lac: input.Lac }), - ...(input.Mcc != null && { Mcc: input.Mcc }), - ...(input.Mnc != null && { Mnc: input.Mnc }), - ...(input.RxLevel != null && { RxLevel: input.RxLevel }), - }; +const se_LteObj = (input: LteObj, context: __SerdeContext): any => { + return take(input, { + EutranCid: [], + LteLocalId: _json, + LteNmr: (_) => se_LteNmrList(_, context), + LteTimingAdvance: [], + Mcc: [], + Mnc: [], + NrCapable: [], + Rsrp: [], + Rsrq: __serializeFloat, + Tac: [], + }); }; -/** - * serializeAws_restJson1Ip - */ -const se_Ip = (input: Ip, context: __SerdeContext): any => { - return { - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - }; -}; +// se_MessageDeliveryStatusEventConfiguration omitted. -/** - * serializeAws_restJson1JoinEuiFilters - */ -const se_JoinEuiFilters = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JoinEuiRange(entry, context); - }); -}; +// se_MessageDeliveryStatusResourceTypeEventConfiguration omitted. + +// se_MulticastWirelessMetadata omitted. + +// se_NetIdFilters omitted. + +// se_OtaaV1_0_x omitted. + +// se_OtaaV1_1 omitted. + +// se_ParticipatingGateways omitted. /** - * serializeAws_restJson1JoinEuiRange + * serializeAws_restJson1PositionCoordinate */ -const se_JoinEuiRange = (input: string[], context: __SerdeContext): any => { +const se_PositionCoordinate = (input: number[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return __serializeFloat(entry); }); }; -/** - * serializeAws_restJson1JoinEventConfiguration - */ -const se_JoinEventConfiguration = (input: JoinEventConfiguration, context: __SerdeContext): any => { - return { - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANJoinEventNotificationConfigurations(input.LoRaWAN, context) }), - ...(input.WirelessDeviceIdEventTopic != null && { WirelessDeviceIdEventTopic: input.WirelessDeviceIdEventTopic }), - }; -}; +// se_Positioning omitted. -/** - * serializeAws_restJson1JoinResourceTypeEventConfiguration - */ -const se_JoinResourceTypeEventConfiguration = ( - input: JoinResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANJoinResourceTypeEventConfiguration(input.LoRaWAN, context) }), - }; -}; +// se_PositionSolverConfigurations omitted. -/** - * serializeAws_restJson1LoRaWANConnectionStatusEventNotificationConfigurations - */ -const se_LoRaWANConnectionStatusEventNotificationConfigurations = ( - input: LoRaWANConnectionStatusEventNotificationConfigurations, - context: __SerdeContext -): any => { - return { - ...(input.GatewayEuiEventTopic != null && { GatewayEuiEventTopic: input.GatewayEuiEventTopic }), - }; -}; +// se_ProximityEventConfiguration omitted. -/** - * serializeAws_restJson1LoRaWANConnectionStatusResourceTypeEventConfiguration - */ -const se_LoRaWANConnectionStatusResourceTypeEventConfiguration = ( - input: LoRaWANConnectionStatusResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.WirelessGatewayEventTopic != null && { WirelessGatewayEventTopic: input.WirelessGatewayEventTopic }), - }; -}; +// se_ProximityResourceTypeEventConfiguration omitted. -/** - * serializeAws_restJson1LoRaWANDevice - */ -const se_LoRaWANDevice = (input: LoRaWANDevice, context: __SerdeContext): any => { - return { - ...(input.AbpV1_0_x != null && { AbpV1_0_x: se_AbpV1_0_x(input.AbpV1_0_x, context) }), - ...(input.AbpV1_1 != null && { AbpV1_1: se_AbpV1_1(input.AbpV1_1, context) }), - ...(input.DevEui != null && { DevEui: input.DevEui }), - ...(input.DeviceProfileId != null && { DeviceProfileId: input.DeviceProfileId }), - ...(input.FPorts != null && { FPorts: se_FPorts(input.FPorts, context) }), - ...(input.OtaaV1_0_x != null && { OtaaV1_0_x: se_OtaaV1_0_x(input.OtaaV1_0_x, context) }), - ...(input.OtaaV1_1 != null && { OtaaV1_1: se_OtaaV1_1(input.OtaaV1_1, context) }), - ...(input.ServiceProfileId != null && { ServiceProfileId: input.ServiceProfileId }), - }; -}; +// se_SemtechGnssConfiguration omitted. -/** - * serializeAws_restJson1LoRaWANDeviceProfile - */ -const se_LoRaWANDeviceProfile = (input: LoRaWANDeviceProfile, context: __SerdeContext): any => { - return { - ...(input.ClassBTimeout != null && { ClassBTimeout: input.ClassBTimeout }), - ...(input.ClassCTimeout != null && { ClassCTimeout: input.ClassCTimeout }), - ...(input.FactoryPresetFreqsList != null && { - FactoryPresetFreqsList: se_FactoryPresetFreqsList(input.FactoryPresetFreqsList, context), - }), - ...(input.MacVersion != null && { MacVersion: input.MacVersion }), - ...(input.MaxDutyCycle != null && { MaxDutyCycle: input.MaxDutyCycle }), - ...(input.MaxEirp != null && { MaxEirp: input.MaxEirp }), - ...(input.PingSlotDr != null && { PingSlotDr: input.PingSlotDr }), - ...(input.PingSlotFreq != null && { PingSlotFreq: input.PingSlotFreq }), - ...(input.PingSlotPeriod != null && { PingSlotPeriod: input.PingSlotPeriod }), - ...(input.RegParamsRevision != null && { RegParamsRevision: input.RegParamsRevision }), - ...(input.RfRegion != null && { RfRegion: input.RfRegion }), - ...(input.RxDataRate2 != null && { RxDataRate2: input.RxDataRate2 }), - ...(input.RxDelay1 != null && { RxDelay1: input.RxDelay1 }), - ...(input.RxDrOffset1 != null && { RxDrOffset1: input.RxDrOffset1 }), - ...(input.RxFreq2 != null && { RxFreq2: input.RxFreq2 }), - ...(input.Supports32BitFCnt != null && { Supports32BitFCnt: input.Supports32BitFCnt }), - ...(input.SupportsClassB != null && { SupportsClassB: input.SupportsClassB }), - ...(input.SupportsClassC != null && { SupportsClassC: input.SupportsClassC }), - ...(input.SupportsJoin != null && { SupportsJoin: input.SupportsJoin }), - }; -}; +// se_SessionKeysAbpV1_0_x omitted. -/** - * serializeAws_restJson1LoRaWANFuotaTask - */ -const se_LoRaWANFuotaTask = (input: LoRaWANFuotaTask, context: __SerdeContext): any => { - return { - ...(input.RfRegion != null && { RfRegion: input.RfRegion }), - }; -}; +// se_SessionKeysAbpV1_1 omitted. -/** - * serializeAws_restJson1LoRaWANGateway - */ -const se_LoRaWANGateway = (input: LoRaWANGateway, context: __SerdeContext): any => { - return { - ...(input.Beaconing != null && { Beaconing: se_Beaconing(input.Beaconing, context) }), - ...(input.GatewayEui != null && { GatewayEui: input.GatewayEui }), - ...(input.JoinEuiFilters != null && { JoinEuiFilters: se_JoinEuiFilters(input.JoinEuiFilters, context) }), - ...(input.NetIdFilters != null && { NetIdFilters: se_NetIdFilters(input.NetIdFilters, context) }), - ...(input.RfRegion != null && { RfRegion: input.RfRegion }), - ...(input.SubBands != null && { SubBands: se_SubBands(input.SubBands, context) }), - }; -}; +// se_SidewalkAccountInfo omitted. -/** - * serializeAws_restJson1LoRaWANGatewayVersion - */ -const se_LoRaWANGatewayVersion = (input: LoRaWANGatewayVersion, context: __SerdeContext): any => { - return { - ...(input.Model != null && { Model: input.Model }), - ...(input.PackageVersion != null && { PackageVersion: input.PackageVersion }), - ...(input.Station != null && { Station: input.Station }), - }; -}; +// se_SidewalkCreateDeviceProfile omitted. -/** - * serializeAws_restJson1LoRaWANJoinEventNotificationConfigurations - */ -const se_LoRaWANJoinEventNotificationConfigurations = ( - input: LoRaWANJoinEventNotificationConfigurations, - context: __SerdeContext -): any => { - return { - ...(input.DevEuiEventTopic != null && { DevEuiEventTopic: input.DevEuiEventTopic }), - }; -}; +// se_SidewalkCreateWirelessDevice omitted. -/** - * serializeAws_restJson1LoRaWANJoinResourceTypeEventConfiguration - */ -const se_LoRaWANJoinResourceTypeEventConfiguration = ( - input: LoRaWANJoinResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.WirelessDeviceEventTopic != null && { WirelessDeviceEventTopic: input.WirelessDeviceEventTopic }), - }; -}; +// se_SidewalkEventNotificationConfigurations omitted. -/** - * serializeAws_restJson1LoRaWANMulticast - */ -const se_LoRaWANMulticast = (input: LoRaWANMulticast, context: __SerdeContext): any => { - return { - ...(input.DlClass != null && { DlClass: input.DlClass }), - ...(input.RfRegion != null && { RfRegion: input.RfRegion }), - }; -}; +// se_SidewalkResourceTypeEventConfiguration omitted. -/** - * serializeAws_restJson1LoRaWANMulticastMetadata - */ -const se_LoRaWANMulticastMetadata = (input: LoRaWANMulticastMetadata, context: __SerdeContext): any => { - return { - ...(input.FPort != null && { FPort: input.FPort }), - }; -}; +// se_SidewalkSendDataToDevice omitted. -/** - * serializeAws_restJson1LoRaWANMulticastSession - */ -const se_LoRaWANMulticastSession = (input: LoRaWANMulticastSession, context: __SerdeContext): any => { - return { - ...(input.DlDr != null && { DlDr: input.DlDr }), - ...(input.DlFreq != null && { DlFreq: input.DlFreq }), - ...(input.SessionStartTime != null && { - SessionStartTime: input.SessionStartTime.toISOString().split(".")[0] + "Z", - }), - ...(input.SessionTimeout != null && { SessionTimeout: input.SessionTimeout }), - }; -}; +// se_SidewalkSingleStartImportInfo omitted. -/** - * serializeAws_restJson1LoRaWANSendDataToDevice - */ -const se_LoRaWANSendDataToDevice = (input: LoRaWANSendDataToDevice, context: __SerdeContext): any => { - return { - ...(input.FPort != null && { FPort: input.FPort }), - ...(input.ParticipatingGateways != null && { - ParticipatingGateways: se_ParticipatingGateways(input.ParticipatingGateways, context), - }), - }; -}; +// se_SidewalkStartImportInfo omitted. -/** - * serializeAws_restJson1LoRaWANServiceProfile - */ -const se_LoRaWANServiceProfile = (input: LoRaWANServiceProfile, context: __SerdeContext): any => { - return { - ...(input.AddGwMetadata != null && { AddGwMetadata: input.AddGwMetadata }), - ...(input.DrMax != null && { DrMax: input.DrMax }), - ...(input.DrMin != null && { DrMin: input.DrMin }), - }; -}; +// se_SidewalkUpdateAccount omitted. -/** - * serializeAws_restJson1LoRaWANStartFuotaTask - */ -const se_LoRaWANStartFuotaTask = (input: LoRaWANStartFuotaTask, context: __SerdeContext): any => { - return { - ...(input.StartTime != null && { StartTime: input.StartTime.toISOString().split(".")[0] + "Z" }), - }; -}; +// se_SidewalkUpdateImportInfo omitted. -/** - * serializeAws_restJson1LoRaWANUpdateDevice - */ -const se_LoRaWANUpdateDevice = (input: LoRaWANUpdateDevice, context: __SerdeContext): any => { - return { - ...(input.AbpV1_0_x != null && { AbpV1_0_x: se_UpdateAbpV1_0_x(input.AbpV1_0_x, context) }), - ...(input.AbpV1_1 != null && { AbpV1_1: se_UpdateAbpV1_1(input.AbpV1_1, context) }), - ...(input.DeviceProfileId != null && { DeviceProfileId: input.DeviceProfileId }), - ...(input.FPorts != null && { FPorts: se_UpdateFPorts(input.FPorts, context) }), - ...(input.ServiceProfileId != null && { ServiceProfileId: input.ServiceProfileId }), - }; -}; +// se_SubBands omitted. -/** - * serializeAws_restJson1LoRaWANUpdateGatewayTaskCreate - */ -const se_LoRaWANUpdateGatewayTaskCreate = (input: LoRaWANUpdateGatewayTaskCreate, context: __SerdeContext): any => { - return { - ...(input.CurrentVersion != null && { CurrentVersion: se_LoRaWANGatewayVersion(input.CurrentVersion, context) }), - ...(input.SigKeyCrc != null && { SigKeyCrc: input.SigKeyCrc }), - ...(input.UpdateSignature != null && { UpdateSignature: input.UpdateSignature }), - ...(input.UpdateVersion != null && { UpdateVersion: se_LoRaWANGatewayVersion(input.UpdateVersion, context) }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1LteList - */ -const se_LteList = (input: LteObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LteObj(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1LteLocalId - */ -const se_LteLocalId = (input: LteLocalId, context: __SerdeContext): any => { - return { - ...(input.Earfcn != null && { Earfcn: input.Earfcn }), - ...(input.Pci != null && { Pci: input.Pci }), - }; -}; +// se_TdscdmaList omitted. -/** - * serializeAws_restJson1LteNmrList - */ -const se_LteNmrList = (input: LteNmrObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LteNmrObj(entry, context); - }); -}; +// se_TdscdmaLocalId omitted. -/** - * serializeAws_restJson1LteNmrObj - */ -const se_LteNmrObj = (input: LteNmrObj, context: __SerdeContext): any => { - return { - ...(input.Earfcn != null && { Earfcn: input.Earfcn }), - ...(input.EutranCid != null && { EutranCid: input.EutranCid }), - ...(input.Pci != null && { Pci: input.Pci }), - ...(input.Rsrp != null && { Rsrp: input.Rsrp }), - ...(input.Rsrq != null && { Rsrq: __serializeFloat(input.Rsrq) }), - }; -}; +// se_TdscdmaNmrList omitted. -/** - * serializeAws_restJson1LteObj - */ -const se_LteObj = (input: LteObj, context: __SerdeContext): any => { - return { - ...(input.EutranCid != null && { EutranCid: input.EutranCid }), - ...(input.LteLocalId != null && { LteLocalId: se_LteLocalId(input.LteLocalId, context) }), - ...(input.LteNmr != null && { LteNmr: se_LteNmrList(input.LteNmr, context) }), - ...(input.LteTimingAdvance != null && { LteTimingAdvance: input.LteTimingAdvance }), - ...(input.Mcc != null && { Mcc: input.Mcc }), - ...(input.Mnc != null && { Mnc: input.Mnc }), - ...(input.NrCapable != null && { NrCapable: input.NrCapable }), - ...(input.Rsrp != null && { Rsrp: input.Rsrp }), - ...(input.Rsrq != null && { Rsrq: __serializeFloat(input.Rsrq) }), - ...(input.Tac != null && { Tac: input.Tac }), - }; -}; +// se_TdscdmaNmrObj omitted. -/** - * serializeAws_restJson1MessageDeliveryStatusEventConfiguration - */ -const se_MessageDeliveryStatusEventConfiguration = ( - input: MessageDeliveryStatusEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkEventNotificationConfigurations(input.Sidewalk, context) }), - ...(input.WirelessDeviceIdEventTopic != null && { WirelessDeviceIdEventTopic: input.WirelessDeviceIdEventTopic }), - }; -}; +// se_TdscdmaObj omitted. -/** - * serializeAws_restJson1MessageDeliveryStatusResourceTypeEventConfiguration - */ -const se_MessageDeliveryStatusResourceTypeEventConfiguration = ( - input: MessageDeliveryStatusResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkResourceTypeEventConfiguration(input.Sidewalk, context) }), - }; -}; +// se_TraceContent omitted. -/** - * serializeAws_restJson1MulticastWirelessMetadata - */ -const se_MulticastWirelessMetadata = (input: MulticastWirelessMetadata, context: __SerdeContext): any => { - return { - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANMulticastMetadata(input.LoRaWAN, context) }), - }; -}; +// se_UpdateAbpV1_0_x omitted. -/** - * serializeAws_restJson1NetIdFilters - */ -const se_NetIdFilters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdateAbpV1_1 omitted. -/** - * serializeAws_restJson1OtaaV1_0_x - */ -const se_OtaaV1_0_x = (input: OtaaV1_0_x, context: __SerdeContext): any => { - return { - ...(input.AppEui != null && { AppEui: input.AppEui }), - ...(input.AppKey != null && { AppKey: input.AppKey }), - ...(input.GenAppKey != null && { GenAppKey: input.GenAppKey }), - }; -}; +// se_UpdateFPorts omitted. -/** - * serializeAws_restJson1OtaaV1_1 - */ -const se_OtaaV1_1 = (input: OtaaV1_1, context: __SerdeContext): any => { - return { - ...(input.AppKey != null && { AppKey: input.AppKey }), - ...(input.JoinEui != null && { JoinEui: input.JoinEui }), - ...(input.NwkKey != null && { NwkKey: input.NwkKey }), - }; -}; +// se_UpdateWirelessGatewayTaskCreate omitted. -/** - * serializeAws_restJson1ParticipatingGateways - */ -const se_ParticipatingGateways = (input: ParticipatingGateways, context: __SerdeContext): any => { - return { - ...(input.DownlinkMode != null && { DownlinkMode: input.DownlinkMode }), - ...(input.GatewayList != null && { GatewayList: se_GatewayList(input.GatewayList, context) }), - ...(input.TransmissionInterval != null && { TransmissionInterval: input.TransmissionInterval }), - }; -}; +// se_WcdmaList omitted. -/** - * serializeAws_restJson1PositionCoordinate - */ -const se_PositionCoordinate = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return __serializeFloat(entry); - }); -}; +// se_WcdmaLocalId omitted. -/** - * serializeAws_restJson1Positioning - */ -const se_Positioning = (input: Positioning, context: __SerdeContext): any => { - return { - ...(input.ClockSync != null && { ClockSync: input.ClockSync }), - ...(input.Gnss != null && { Gnss: input.Gnss }), - ...(input.Stream != null && { Stream: input.Stream }), - }; -}; +// se_WcdmaNmrList omitted. -/** - * serializeAws_restJson1PositionSolverConfigurations - */ -const se_PositionSolverConfigurations = (input: PositionSolverConfigurations, context: __SerdeContext): any => { - return { - ...(input.SemtechGnss != null && { SemtechGnss: se_SemtechGnssConfiguration(input.SemtechGnss, context) }), - }; -}; +// se_WcdmaNmrObj omitted. -/** - * serializeAws_restJson1ProximityEventConfiguration - */ -const se_ProximityEventConfiguration = (input: ProximityEventConfiguration, context: __SerdeContext): any => { - return { - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkEventNotificationConfigurations(input.Sidewalk, context) }), - ...(input.WirelessDeviceIdEventTopic != null && { WirelessDeviceIdEventTopic: input.WirelessDeviceIdEventTopic }), - }; -}; +// se_WcdmaObj omitted. -/** - * serializeAws_restJson1ProximityResourceTypeEventConfiguration - */ -const se_ProximityResourceTypeEventConfiguration = ( - input: ProximityResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkResourceTypeEventConfiguration(input.Sidewalk, context) }), - }; -}; +// se_WiFiAccessPoint omitted. -/** - * serializeAws_restJson1SemtechGnssConfiguration - */ -const se_SemtechGnssConfiguration = (input: SemtechGnssConfiguration, context: __SerdeContext): any => { - return { - ...(input.Fec != null && { Fec: input.Fec }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_WiFiAccessPoints omitted. -/** - * serializeAws_restJson1SessionKeysAbpV1_0_x - */ -const se_SessionKeysAbpV1_0_x = (input: SessionKeysAbpV1_0_x, context: __SerdeContext): any => { - return { - ...(input.AppSKey != null && { AppSKey: input.AppSKey }), - ...(input.NwkSKey != null && { NwkSKey: input.NwkSKey }), - }; -}; +// se_WirelessDeviceEventLogOption omitted. -/** - * serializeAws_restJson1SessionKeysAbpV1_1 - */ -const se_SessionKeysAbpV1_1 = (input: SessionKeysAbpV1_1, context: __SerdeContext): any => { - return { - ...(input.AppSKey != null && { AppSKey: input.AppSKey }), - ...(input.FNwkSIntKey != null && { FNwkSIntKey: input.FNwkSIntKey }), - ...(input.NwkSEncKey != null && { NwkSEncKey: input.NwkSEncKey }), - ...(input.SNwkSIntKey != null && { SNwkSIntKey: input.SNwkSIntKey }), - }; -}; +// se_WirelessDeviceEventLogOptionList omitted. -/** - * serializeAws_restJson1SidewalkAccountInfo - */ -const se_SidewalkAccountInfo = (input: SidewalkAccountInfo, context: __SerdeContext): any => { - return { - ...(input.AmazonId != null && { AmazonId: input.AmazonId }), - ...(input.AppServerPrivateKey != null && { AppServerPrivateKey: input.AppServerPrivateKey }), - }; -}; +// se_WirelessDeviceList omitted. -/** - * serializeAws_restJson1SidewalkCreateDeviceProfile - */ -const se_SidewalkCreateDeviceProfile = (input: SidewalkCreateDeviceProfile, context: __SerdeContext): any => { - return {}; -}; +// se_WirelessDeviceLogOption omitted. -/** - * serializeAws_restJson1SidewalkCreateWirelessDevice - */ -const se_SidewalkCreateWirelessDevice = (input: SidewalkCreateWirelessDevice, context: __SerdeContext): any => { - return { - ...(input.DeviceProfileId != null && { DeviceProfileId: input.DeviceProfileId }), - }; -}; +// se_WirelessDeviceLogOptionList omitted. -/** - * serializeAws_restJson1SidewalkEventNotificationConfigurations - */ -const se_SidewalkEventNotificationConfigurations = ( - input: SidewalkEventNotificationConfigurations, - context: __SerdeContext -): any => { - return { - ...(input.AmazonIdEventTopic != null && { AmazonIdEventTopic: input.AmazonIdEventTopic }), - }; -}; +// se_WirelessGatewayEventLogOption omitted. -/** - * serializeAws_restJson1SidewalkResourceTypeEventConfiguration - */ -const se_SidewalkResourceTypeEventConfiguration = ( - input: SidewalkResourceTypeEventConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.WirelessDeviceEventTopic != null && { WirelessDeviceEventTopic: input.WirelessDeviceEventTopic }), - }; -}; +// se_WirelessGatewayEventLogOptionList omitted. -/** - * serializeAws_restJson1SidewalkSendDataToDevice - */ -const se_SidewalkSendDataToDevice = (input: SidewalkSendDataToDevice, context: __SerdeContext): any => { - return { - ...(input.AckModeRetryDurationSecs != null && { AckModeRetryDurationSecs: input.AckModeRetryDurationSecs }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.Seq != null && { Seq: input.Seq }), - }; -}; +// se_WirelessGatewayList omitted. -/** - * serializeAws_restJson1SidewalkSingleStartImportInfo - */ -const se_SidewalkSingleStartImportInfo = (input: SidewalkSingleStartImportInfo, context: __SerdeContext): any => { - return { - ...(input.SidewalkManufacturingSn != null && { SidewalkManufacturingSn: input.SidewalkManufacturingSn }), - }; -}; +// se_WirelessGatewayLogOption omitted. -/** - * serializeAws_restJson1SidewalkStartImportInfo - */ -const se_SidewalkStartImportInfo = (input: SidewalkStartImportInfo, context: __SerdeContext): any => { - return { - ...(input.DeviceCreationFile != null && { DeviceCreationFile: input.DeviceCreationFile }), - ...(input.Role != null && { Role: input.Role }), - }; -}; +// se_WirelessGatewayLogOptionList omitted. -/** - * serializeAws_restJson1SidewalkUpdateAccount - */ -const se_SidewalkUpdateAccount = (input: SidewalkUpdateAccount, context: __SerdeContext): any => { - return { - ...(input.AppServerPrivateKey != null && { AppServerPrivateKey: input.AppServerPrivateKey }), - }; -}; +// se_WirelessMetadata omitted. -/** - * serializeAws_restJson1SidewalkUpdateImportInfo - */ -const se_SidewalkUpdateImportInfo = (input: SidewalkUpdateImportInfo, context: __SerdeContext): any => { - return { - ...(input.DeviceCreationFile != null && { DeviceCreationFile: input.DeviceCreationFile }), - }; -}; +// de_AbpV1_0_x omitted. -/** - * serializeAws_restJson1SubBands - */ -const se_SubBands = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_AbpV1_1 omitted. /** - * serializeAws_restJson1Tag + * deserializeAws_restJson1Accuracy */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; +const de_Accuracy = (output: any, context: __SerdeContext): Accuracy => { + return take(output, { + HorizontalAccuracy: __limitedParseFloat32, + VerticalAccuracy: __limitedParseFloat32, + }) as any; }; -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// de_ApplicationConfig omitted. -/** - * serializeAws_restJson1TdscdmaList - */ -const se_TdscdmaList = (input: TdscdmaObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TdscdmaObj(entry, context); - }); -}; +// de_Applications omitted. -/** - * serializeAws_restJson1TdscdmaLocalId - */ -const se_TdscdmaLocalId = (input: TdscdmaLocalId, context: __SerdeContext): any => { - return { - ...(input.CellParams != null && { CellParams: input.CellParams }), - ...(input.Uarfcn != null && { Uarfcn: input.Uarfcn }), - }; -}; +// de_Beaconing omitted. -/** - * serializeAws_restJson1TdscdmaNmrList - */ -const se_TdscdmaNmrList = (input: TdscdmaNmrObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TdscdmaNmrObj(entry, context); - }); -}; +// de_BeaconingFrequencies omitted. -/** - * serializeAws_restJson1TdscdmaNmrObj - */ -const se_TdscdmaNmrObj = (input: TdscdmaNmrObj, context: __SerdeContext): any => { - return { - ...(input.CellParams != null && { CellParams: input.CellParams }), - ...(input.PathLoss != null && { PathLoss: input.PathLoss }), - ...(input.Rscp != null && { Rscp: input.Rscp }), - ...(input.Uarfcn != null && { Uarfcn: input.Uarfcn }), - ...(input.UtranCid != null && { UtranCid: input.UtranCid }), - }; -}; +// de_CertificateList omitted. -/** - * serializeAws_restJson1TdscdmaObj - */ -const se_TdscdmaObj = (input: TdscdmaObj, context: __SerdeContext): any => { - return { - ...(input.Lac != null && { Lac: input.Lac }), - ...(input.Mcc != null && { Mcc: input.Mcc }), - ...(input.Mnc != null && { Mnc: input.Mnc }), - ...(input.PathLoss != null && { PathLoss: input.PathLoss }), - ...(input.Rscp != null && { Rscp: input.Rscp }), - ...(input.TdscdmaLocalId != null && { TdscdmaLocalId: se_TdscdmaLocalId(input.TdscdmaLocalId, context) }), - ...(input.TdscdmaNmr != null && { TdscdmaNmr: se_TdscdmaNmrList(input.TdscdmaNmr, context) }), - ...(input.TdscdmaTimingAdvance != null && { TdscdmaTimingAdvance: input.TdscdmaTimingAdvance }), - ...(input.UtranCid != null && { UtranCid: input.UtranCid }), - }; -}; - -/** - * serializeAws_restJson1TraceContent - */ -const se_TraceContent = (input: TraceContent, context: __SerdeContext): any => { - return { - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - ...(input.WirelessDeviceFrameInfo != null && { WirelessDeviceFrameInfo: input.WirelessDeviceFrameInfo }), - }; -}; - -/** - * serializeAws_restJson1UpdateAbpV1_0_x - */ -const se_UpdateAbpV1_0_x = (input: UpdateAbpV1_0_x, context: __SerdeContext): any => { - return { - ...(input.FCntStart != null && { FCntStart: input.FCntStart }), - }; -}; - -/** - * serializeAws_restJson1UpdateAbpV1_1 - */ -const se_UpdateAbpV1_1 = (input: UpdateAbpV1_1, context: __SerdeContext): any => { - return { - ...(input.FCntStart != null && { FCntStart: input.FCntStart }), - }; -}; - -/** - * serializeAws_restJson1UpdateFPorts - */ -const se_UpdateFPorts = (input: UpdateFPorts, context: __SerdeContext): any => { - return { - ...(input.Applications != null && { Applications: se_Applications(input.Applications, context) }), - ...(input.Positioning != null && { Positioning: se_Positioning(input.Positioning, context) }), - }; -}; - -/** - * serializeAws_restJson1UpdateWirelessGatewayTaskCreate - */ -const se_UpdateWirelessGatewayTaskCreate = (input: UpdateWirelessGatewayTaskCreate, context: __SerdeContext): any => { - return { - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANUpdateGatewayTaskCreate(input.LoRaWAN, context) }), - ...(input.UpdateDataRole != null && { UpdateDataRole: input.UpdateDataRole }), - ...(input.UpdateDataSource != null && { UpdateDataSource: input.UpdateDataSource }), - }; -}; - -/** - * serializeAws_restJson1WcdmaList - */ -const se_WcdmaList = (input: WcdmaObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WcdmaObj(entry, context); - }); -}; - -/** - * serializeAws_restJson1WcdmaLocalId - */ -const se_WcdmaLocalId = (input: WcdmaLocalId, context: __SerdeContext): any => { - return { - ...(input.Psc != null && { Psc: input.Psc }), - ...(input.Uarfcndl != null && { Uarfcndl: input.Uarfcndl }), - }; -}; - -/** - * serializeAws_restJson1WcdmaNmrList - */ -const se_WcdmaNmrList = (input: WcdmaNmrObj[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WcdmaNmrObj(entry, context); - }); -}; - -/** - * serializeAws_restJson1WcdmaNmrObj - */ -const se_WcdmaNmrObj = (input: WcdmaNmrObj, context: __SerdeContext): any => { - return { - ...(input.PathLoss != null && { PathLoss: input.PathLoss }), - ...(input.Psc != null && { Psc: input.Psc }), - ...(input.Rscp != null && { Rscp: input.Rscp }), - ...(input.Uarfcndl != null && { Uarfcndl: input.Uarfcndl }), - ...(input.UtranCid != null && { UtranCid: input.UtranCid }), - }; -}; - -/** - * serializeAws_restJson1WcdmaObj - */ -const se_WcdmaObj = (input: WcdmaObj, context: __SerdeContext): any => { - return { - ...(input.Lac != null && { Lac: input.Lac }), - ...(input.Mcc != null && { Mcc: input.Mcc }), - ...(input.Mnc != null && { Mnc: input.Mnc }), - ...(input.PathLoss != null && { PathLoss: input.PathLoss }), - ...(input.Rscp != null && { Rscp: input.Rscp }), - ...(input.UtranCid != null && { UtranCid: input.UtranCid }), - ...(input.WcdmaLocalId != null && { WcdmaLocalId: se_WcdmaLocalId(input.WcdmaLocalId, context) }), - ...(input.WcdmaNmr != null && { WcdmaNmr: se_WcdmaNmrList(input.WcdmaNmr, context) }), - }; -}; - -/** - * serializeAws_restJson1WiFiAccessPoint - */ -const se_WiFiAccessPoint = (input: WiFiAccessPoint, context: __SerdeContext): any => { - return { - ...(input.MacAddress != null && { MacAddress: input.MacAddress }), - ...(input.Rss != null && { Rss: input.Rss }), - }; -}; - -/** - * serializeAws_restJson1WiFiAccessPoints - */ -const se_WiFiAccessPoints = (input: WiFiAccessPoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WiFiAccessPoint(entry, context); - }); -}; - -/** - * serializeAws_restJson1WirelessDeviceEventLogOption - */ -const se_WirelessDeviceEventLogOption = (input: WirelessDeviceEventLogOption, context: __SerdeContext): any => { - return { - ...(input.Event != null && { Event: input.Event }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - }; -}; - -/** - * serializeAws_restJson1WirelessDeviceEventLogOptionList - */ -const se_WirelessDeviceEventLogOptionList = (input: WirelessDeviceEventLogOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WirelessDeviceEventLogOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1WirelessDeviceList - */ -const se_WirelessDeviceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1WirelessDeviceLogOption - */ -const se_WirelessDeviceLogOption = (input: WirelessDeviceLogOption, context: __SerdeContext): any => { - return { - ...(input.Events != null && { Events: se_WirelessDeviceEventLogOptionList(input.Events, context) }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1WirelessDeviceLogOptionList - */ -const se_WirelessDeviceLogOptionList = (input: WirelessDeviceLogOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WirelessDeviceLogOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1WirelessGatewayEventLogOption - */ -const se_WirelessGatewayEventLogOption = (input: WirelessGatewayEventLogOption, context: __SerdeContext): any => { - return { - ...(input.Event != null && { Event: input.Event }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - }; -}; - -/** - * serializeAws_restJson1WirelessGatewayEventLogOptionList - */ -const se_WirelessGatewayEventLogOptionList = (input: WirelessGatewayEventLogOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WirelessGatewayEventLogOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1WirelessGatewayList - */ -const se_WirelessGatewayList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1WirelessGatewayLogOption - */ -const se_WirelessGatewayLogOption = (input: WirelessGatewayLogOption, context: __SerdeContext): any => { - return { - ...(input.Events != null && { Events: se_WirelessGatewayEventLogOptionList(input.Events, context) }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1WirelessGatewayLogOptionList - */ -const se_WirelessGatewayLogOptionList = (input: WirelessGatewayLogOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WirelessGatewayLogOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1WirelessMetadata - */ -const se_WirelessMetadata = (input: WirelessMetadata, context: __SerdeContext): any => { - return { - ...(input.LoRaWAN != null && { LoRaWAN: se_LoRaWANSendDataToDevice(input.LoRaWAN, context) }), - ...(input.Sidewalk != null && { Sidewalk: se_SidewalkSendDataToDevice(input.Sidewalk, context) }), - }; -}; - -/** - * deserializeAws_restJson1AbpV1_0_x - */ -const de_AbpV1_0_x = (output: any, context: __SerdeContext): AbpV1_0_x => { - return { - DevAddr: __expectString(output.DevAddr), - FCntStart: __expectInt32(output.FCntStart), - SessionKeys: output.SessionKeys != null ? de_SessionKeysAbpV1_0_x(output.SessionKeys, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AbpV1_1 - */ -const de_AbpV1_1 = (output: any, context: __SerdeContext): AbpV1_1 => { - return { - DevAddr: __expectString(output.DevAddr), - FCntStart: __expectInt32(output.FCntStart), - SessionKeys: output.SessionKeys != null ? de_SessionKeysAbpV1_1(output.SessionKeys, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Accuracy - */ -const de_Accuracy = (output: any, context: __SerdeContext): Accuracy => { - return { - HorizontalAccuracy: __limitedParseFloat32(output.HorizontalAccuracy), - VerticalAccuracy: __limitedParseFloat32(output.VerticalAccuracy), - } as any; -}; - -/** - * deserializeAws_restJson1ApplicationConfig - */ -const de_ApplicationConfig = (output: any, context: __SerdeContext): ApplicationConfig => { - return { - DestinationName: __expectString(output.DestinationName), - FPort: __expectInt32(output.FPort), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1Applications - */ -const de_Applications = (output: any, context: __SerdeContext): ApplicationConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Beaconing - */ -const de_Beaconing = (output: any, context: __SerdeContext): Beaconing => { - return { - DataRate: __expectInt32(output.DataRate), - Frequencies: output.Frequencies != null ? de_BeaconingFrequencies(output.Frequencies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BeaconingFrequencies - */ -const de_BeaconingFrequencies = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CertificateList - */ -const de_CertificateList = (output: any, context: __SerdeContext): CertificateList => { - return { - SigningAlg: __expectString(output.SigningAlg), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1ConnectionStatusEventConfiguration - */ -const de_ConnectionStatusEventConfiguration = ( - output: any, - context: __SerdeContext -): ConnectionStatusEventConfiguration => { - return { - LoRaWAN: - output.LoRaWAN != null - ? de_LoRaWANConnectionStatusEventNotificationConfigurations(output.LoRaWAN, context) - : undefined, - WirelessGatewayIdEventTopic: __expectString(output.WirelessGatewayIdEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1ConnectionStatusResourceTypeEventConfiguration - */ -const de_ConnectionStatusResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): ConnectionStatusResourceTypeEventConfiguration => { - return { - LoRaWAN: - output.LoRaWAN != null - ? de_LoRaWANConnectionStatusResourceTypeEventConfiguration(output.LoRaWAN, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DakCertificateMetadata - */ -const de_DakCertificateMetadata = (output: any, context: __SerdeContext): DakCertificateMetadata => { - return { - ApId: __expectString(output.ApId), - CertificateId: __expectString(output.CertificateId), - DeviceTypeId: __expectString(output.DeviceTypeId), - FactorySupport: __expectBoolean(output.FactorySupport), - MaxAllowedSignature: __expectInt32(output.MaxAllowedSignature), - } as any; -}; - -/** - * deserializeAws_restJson1DakCertificateMetadataList - */ -const de_DakCertificateMetadataList = (output: any, context: __SerdeContext): DakCertificateMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DakCertificateMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DestinationList - */ -const de_DestinationList = (output: any, context: __SerdeContext): Destinations[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Destinations(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Destinations - */ -const de_Destinations = (output: any, context: __SerdeContext): Destinations => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Expression: __expectString(output.Expression), - ExpressionType: __expectString(output.ExpressionType), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_restJson1DeviceCertificateList - */ -const de_DeviceCertificateList = (output: any, context: __SerdeContext): CertificateList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CertificateList(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DeviceCreationFileList - */ -const de_DeviceCreationFileList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DeviceProfile - */ -const de_DeviceProfile = (output: any, context: __SerdeContext): DeviceProfile => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1DeviceProfileList - */ -const de_DeviceProfileList = (output: any, context: __SerdeContext): DeviceProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceProfile(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DeviceRegistrationStateEventConfiguration - */ -const de_DeviceRegistrationStateEventConfiguration = ( - output: any, - context: __SerdeContext -): DeviceRegistrationStateEventConfiguration => { - return { - Sidewalk: - output.Sidewalk != null ? de_SidewalkEventNotificationConfigurations(output.Sidewalk, context) : undefined, - WirelessDeviceIdEventTopic: __expectString(output.WirelessDeviceIdEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1DeviceRegistrationStateResourceTypeEventConfiguration - */ -const de_DeviceRegistrationStateResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): DeviceRegistrationStateResourceTypeEventConfiguration => { - return { - Sidewalk: output.Sidewalk != null ? de_SidewalkResourceTypeEventConfiguration(output.Sidewalk, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DownlinkQueueMessage - */ -const de_DownlinkQueueMessage = (output: any, context: __SerdeContext): DownlinkQueueMessage => { - return { - LoRaWAN: output.LoRaWAN != null ? de_LoRaWANSendDataToDevice(output.LoRaWAN, context) : undefined, - MessageId: __expectString(output.MessageId), - ReceivedAt: __expectString(output.ReceivedAt), - TransmitMode: __expectInt32(output.TransmitMode), - } as any; -}; - -/** - * deserializeAws_restJson1DownlinkQueueMessagesList - */ -const de_DownlinkQueueMessagesList = (output: any, context: __SerdeContext): DownlinkQueueMessage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DownlinkQueueMessage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EventConfigurationItem - */ -const de_EventConfigurationItem = (output: any, context: __SerdeContext): EventConfigurationItem => { - return { - Events: output.Events != null ? de_EventNotificationItemConfigurations(output.Events, context) : undefined, - Identifier: __expectString(output.Identifier), - IdentifierType: __expectString(output.IdentifierType), - PartnerType: __expectString(output.PartnerType), - } as any; -}; - -/** - * deserializeAws_restJson1EventConfigurationsList - */ -const de_EventConfigurationsList = (output: any, context: __SerdeContext): EventConfigurationItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventConfigurationItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EventNotificationItemConfigurations - */ -const de_EventNotificationItemConfigurations = ( - output: any, - context: __SerdeContext -): EventNotificationItemConfigurations => { - return { - ConnectionStatus: - output.ConnectionStatus != null - ? de_ConnectionStatusEventConfiguration(output.ConnectionStatus, context) - : undefined, - DeviceRegistrationState: - output.DeviceRegistrationState != null - ? de_DeviceRegistrationStateEventConfiguration(output.DeviceRegistrationState, context) - : undefined, - Join: output.Join != null ? de_JoinEventConfiguration(output.Join, context) : undefined, - MessageDeliveryStatus: - output.MessageDeliveryStatus != null - ? de_MessageDeliveryStatusEventConfiguration(output.MessageDeliveryStatus, context) - : undefined, - Proximity: output.Proximity != null ? de_ProximityEventConfiguration(output.Proximity, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FactoryPresetFreqsList - */ -const de_FactoryPresetFreqsList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FPorts - */ -const de_FPorts = (output: any, context: __SerdeContext): FPorts => { - return { - Applications: output.Applications != null ? de_Applications(output.Applications, context) : undefined, - ClockSync: __expectInt32(output.ClockSync), - Fuota: __expectInt32(output.Fuota), - Multicast: __expectInt32(output.Multicast), - Positioning: output.Positioning != null ? de_Positioning(output.Positioning, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FuotaTask - */ -const de_FuotaTask = (output: any, context: __SerdeContext): FuotaTask => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1FuotaTaskList - */ -const de_FuotaTaskList = (output: any, context: __SerdeContext): FuotaTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FuotaTask(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GatewayList - */ -const de_GatewayList = (output: any, context: __SerdeContext): GatewayListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewayListItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GatewayListItem - */ -const de_GatewayListItem = (output: any, context: __SerdeContext): GatewayListItem => { - return { - DownlinkFrequency: __expectInt32(output.DownlinkFrequency), - GatewayId: __expectString(output.GatewayId), - } as any; -}; - -/** - * deserializeAws_restJson1ImportedSidewalkDevice - */ -const de_ImportedSidewalkDevice = (output: any, context: __SerdeContext): ImportedSidewalkDevice => { - return { - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdateTime)) - : undefined, - OnboardingStatus: __expectString(output.OnboardingStatus), - OnboardingStatusReason: __expectString(output.OnboardingStatusReason), - SidewalkManufacturingSn: __expectString(output.SidewalkManufacturingSn), - } as any; -}; - -/** - * deserializeAws_restJson1ImportedWirelessDevice - */ -const de_ImportedWirelessDevice = (output: any, context: __SerdeContext): ImportedWirelessDevice => { - return { - Sidewalk: output.Sidewalk != null ? de_ImportedSidewalkDevice(output.Sidewalk, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ImportedWirelessDeviceList - */ -const de_ImportedWirelessDeviceList = (output: any, context: __SerdeContext): ImportedWirelessDevice[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportedWirelessDevice(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1JoinEuiFilters - */ -const de_JoinEuiFilters = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JoinEuiRange(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1JoinEuiRange - */ -const de_JoinEuiRange = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1JoinEventConfiguration - */ -const de_JoinEventConfiguration = (output: any, context: __SerdeContext): JoinEventConfiguration => { - return { - LoRaWAN: - output.LoRaWAN != null ? de_LoRaWANJoinEventNotificationConfigurations(output.LoRaWAN, context) : undefined, - WirelessDeviceIdEventTopic: __expectString(output.WirelessDeviceIdEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1JoinResourceTypeEventConfiguration - */ -const de_JoinResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): JoinResourceTypeEventConfiguration => { - return { - LoRaWAN: output.LoRaWAN != null ? de_LoRaWANJoinResourceTypeEventConfiguration(output.LoRaWAN, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANConnectionStatusEventNotificationConfigurations - */ -const de_LoRaWANConnectionStatusEventNotificationConfigurations = ( - output: any, - context: __SerdeContext -): LoRaWANConnectionStatusEventNotificationConfigurations => { - return { - GatewayEuiEventTopic: __expectString(output.GatewayEuiEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANConnectionStatusResourceTypeEventConfiguration - */ -const de_LoRaWANConnectionStatusResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): LoRaWANConnectionStatusResourceTypeEventConfiguration => { - return { - WirelessGatewayEventTopic: __expectString(output.WirelessGatewayEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANDevice - */ -const de_LoRaWANDevice = (output: any, context: __SerdeContext): LoRaWANDevice => { - return { - AbpV1_0_x: output.AbpV1_0_x != null ? de_AbpV1_0_x(output.AbpV1_0_x, context) : undefined, - AbpV1_1: output.AbpV1_1 != null ? de_AbpV1_1(output.AbpV1_1, context) : undefined, - DevEui: __expectString(output.DevEui), - DeviceProfileId: __expectString(output.DeviceProfileId), - FPorts: output.FPorts != null ? de_FPorts(output.FPorts, context) : undefined, - OtaaV1_0_x: output.OtaaV1_0_x != null ? de_OtaaV1_0_x(output.OtaaV1_0_x, context) : undefined, - OtaaV1_1: output.OtaaV1_1 != null ? de_OtaaV1_1(output.OtaaV1_1, context) : undefined, - ServiceProfileId: __expectString(output.ServiceProfileId), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANDeviceMetadata - */ -const de_LoRaWANDeviceMetadata = (output: any, context: __SerdeContext): LoRaWANDeviceMetadata => { - return { - DataRate: __expectInt32(output.DataRate), - DevEui: __expectString(output.DevEui), - FPort: __expectInt32(output.FPort), - Frequency: __expectInt32(output.Frequency), - Gateways: output.Gateways != null ? de_LoRaWANGatewayMetadataList(output.Gateways, context) : undefined, - Timestamp: __expectString(output.Timestamp), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANDeviceProfile - */ -const de_LoRaWANDeviceProfile = (output: any, context: __SerdeContext): LoRaWANDeviceProfile => { - return { - ClassBTimeout: __expectInt32(output.ClassBTimeout), - ClassCTimeout: __expectInt32(output.ClassCTimeout), - FactoryPresetFreqsList: - output.FactoryPresetFreqsList != null - ? de_FactoryPresetFreqsList(output.FactoryPresetFreqsList, context) - : undefined, - MacVersion: __expectString(output.MacVersion), - MaxDutyCycle: __expectInt32(output.MaxDutyCycle), - MaxEirp: __expectInt32(output.MaxEirp), - PingSlotDr: __expectInt32(output.PingSlotDr), - PingSlotFreq: __expectInt32(output.PingSlotFreq), - PingSlotPeriod: __expectInt32(output.PingSlotPeriod), - RegParamsRevision: __expectString(output.RegParamsRevision), - RfRegion: __expectString(output.RfRegion), - RxDataRate2: __expectInt32(output.RxDataRate2), - RxDelay1: __expectInt32(output.RxDelay1), - RxDrOffset1: __expectInt32(output.RxDrOffset1), - RxFreq2: __expectInt32(output.RxFreq2), - Supports32BitFCnt: __expectBoolean(output.Supports32BitFCnt), - SupportsClassB: __expectBoolean(output.SupportsClassB), - SupportsClassC: __expectBoolean(output.SupportsClassC), - SupportsJoin: __expectBoolean(output.SupportsJoin), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANFuotaTaskGetInfo - */ -const de_LoRaWANFuotaTaskGetInfo = (output: any, context: __SerdeContext): LoRaWANFuotaTaskGetInfo => { - return { - RfRegion: __expectString(output.RfRegion), - StartTime: - output.StartTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartTime)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANGateway - */ -const de_LoRaWANGateway = (output: any, context: __SerdeContext): LoRaWANGateway => { - return { - Beaconing: output.Beaconing != null ? de_Beaconing(output.Beaconing, context) : undefined, - GatewayEui: __expectString(output.GatewayEui), - JoinEuiFilters: output.JoinEuiFilters != null ? de_JoinEuiFilters(output.JoinEuiFilters, context) : undefined, - NetIdFilters: output.NetIdFilters != null ? de_NetIdFilters(output.NetIdFilters, context) : undefined, - RfRegion: __expectString(output.RfRegion), - SubBands: output.SubBands != null ? de_SubBands(output.SubBands, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANGatewayCurrentVersion - */ -const de_LoRaWANGatewayCurrentVersion = (output: any, context: __SerdeContext): LoRaWANGatewayCurrentVersion => { - return { - CurrentVersion: - output.CurrentVersion != null ? de_LoRaWANGatewayVersion(output.CurrentVersion, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANGatewayMetadata - */ -const de_LoRaWANGatewayMetadata = (output: any, context: __SerdeContext): LoRaWANGatewayMetadata => { - return { - GatewayEui: __expectString(output.GatewayEui), - Rssi: __limitedParseDouble(output.Rssi), - Snr: __limitedParseDouble(output.Snr), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANGatewayMetadataList - */ -const de_LoRaWANGatewayMetadataList = (output: any, context: __SerdeContext): LoRaWANGatewayMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoRaWANGatewayMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LoRaWANGatewayVersion - */ -const de_LoRaWANGatewayVersion = (output: any, context: __SerdeContext): LoRaWANGatewayVersion => { - return { - Model: __expectString(output.Model), - PackageVersion: __expectString(output.PackageVersion), - Station: __expectString(output.Station), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANGetServiceProfileInfo - */ -const de_LoRaWANGetServiceProfileInfo = (output: any, context: __SerdeContext): LoRaWANGetServiceProfileInfo => { - return { - AddGwMetadata: __expectBoolean(output.AddGwMetadata), - ChannelMask: __expectString(output.ChannelMask), - DevStatusReqFreq: __expectInt32(output.DevStatusReqFreq), - DlBucketSize: __expectInt32(output.DlBucketSize), - DlRate: __expectInt32(output.DlRate), - DlRatePolicy: __expectString(output.DlRatePolicy), - DrMax: __expectInt32(output.DrMax), - DrMin: __expectInt32(output.DrMin), - HrAllowed: __expectBoolean(output.HrAllowed), - MinGwDiversity: __expectInt32(output.MinGwDiversity), - NwkGeoLoc: __expectBoolean(output.NwkGeoLoc), - PrAllowed: __expectBoolean(output.PrAllowed), - RaAllowed: __expectBoolean(output.RaAllowed), - ReportDevStatusBattery: __expectBoolean(output.ReportDevStatusBattery), - ReportDevStatusMargin: __expectBoolean(output.ReportDevStatusMargin), - TargetPer: __expectInt32(output.TargetPer), - UlBucketSize: __expectInt32(output.UlBucketSize), - UlRate: __expectInt32(output.UlRate), - UlRatePolicy: __expectString(output.UlRatePolicy), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANJoinEventNotificationConfigurations - */ -const de_LoRaWANJoinEventNotificationConfigurations = ( - output: any, - context: __SerdeContext -): LoRaWANJoinEventNotificationConfigurations => { - return { - DevEuiEventTopic: __expectString(output.DevEuiEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANJoinResourceTypeEventConfiguration - */ -const de_LoRaWANJoinResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): LoRaWANJoinResourceTypeEventConfiguration => { - return { - WirelessDeviceEventTopic: __expectString(output.WirelessDeviceEventTopic), - } as any; -}; - -/** - * deserializeAws_restJson1LoRaWANListDevice - */ -const de_LoRaWANListDevice = (output: any, context: __SerdeContext): LoRaWANListDevice => { - return { - DevEui: __expectString(output.DevEui), - } as any; -}; +// de_ConnectionStatusEventConfiguration omitted. -/** - * deserializeAws_restJson1LoRaWANMulticastGet - */ -const de_LoRaWANMulticastGet = (output: any, context: __SerdeContext): LoRaWANMulticastGet => { - return { - DlClass: __expectString(output.DlClass), - NumberOfDevicesInGroup: __expectInt32(output.NumberOfDevicesInGroup), - NumberOfDevicesRequested: __expectInt32(output.NumberOfDevicesRequested), - RfRegion: __expectString(output.RfRegion), - } as any; -}; +// de_ConnectionStatusResourceTypeEventConfiguration omitted. -/** - * deserializeAws_restJson1LoRaWANMulticastSession - */ -const de_LoRaWANMulticastSession = (output: any, context: __SerdeContext): LoRaWANMulticastSession => { - return { - DlDr: __expectInt32(output.DlDr), - DlFreq: __expectInt32(output.DlFreq), - SessionStartTime: - output.SessionStartTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SessionStartTime)) - : undefined, - SessionTimeout: __expectInt32(output.SessionTimeout), - } as any; -}; +// de_DakCertificateMetadata omitted. -/** - * deserializeAws_restJson1LoRaWANSendDataToDevice - */ -const de_LoRaWANSendDataToDevice = (output: any, context: __SerdeContext): LoRaWANSendDataToDevice => { - return { - FPort: __expectInt32(output.FPort), - ParticipatingGateways: - output.ParticipatingGateways != null - ? de_ParticipatingGateways(output.ParticipatingGateways, context) - : undefined, - } as any; -}; +// de_DakCertificateMetadataList omitted. -/** - * deserializeAws_restJson1LoRaWANUpdateGatewayTaskCreate - */ -const de_LoRaWANUpdateGatewayTaskCreate = (output: any, context: __SerdeContext): LoRaWANUpdateGatewayTaskCreate => { - return { - CurrentVersion: - output.CurrentVersion != null ? de_LoRaWANGatewayVersion(output.CurrentVersion, context) : undefined, - SigKeyCrc: __expectLong(output.SigKeyCrc), - UpdateSignature: __expectString(output.UpdateSignature), - UpdateVersion: output.UpdateVersion != null ? de_LoRaWANGatewayVersion(output.UpdateVersion, context) : undefined, - } as any; -}; +// de_DestinationList omitted. -/** - * deserializeAws_restJson1LoRaWANUpdateGatewayTaskEntry - */ -const de_LoRaWANUpdateGatewayTaskEntry = (output: any, context: __SerdeContext): LoRaWANUpdateGatewayTaskEntry => { - return { - CurrentVersion: - output.CurrentVersion != null ? de_LoRaWANGatewayVersion(output.CurrentVersion, context) : undefined, - UpdateVersion: output.UpdateVersion != null ? de_LoRaWANGatewayVersion(output.UpdateVersion, context) : undefined, - } as any; -}; +// de_Destinations omitted. -/** - * deserializeAws_restJson1MessageDeliveryStatusEventConfiguration - */ -const de_MessageDeliveryStatusEventConfiguration = ( - output: any, - context: __SerdeContext -): MessageDeliveryStatusEventConfiguration => { - return { - Sidewalk: - output.Sidewalk != null ? de_SidewalkEventNotificationConfigurations(output.Sidewalk, context) : undefined, - WirelessDeviceIdEventTopic: __expectString(output.WirelessDeviceIdEventTopic), - } as any; -}; +// de_DeviceCertificateList omitted. -/** - * deserializeAws_restJson1MessageDeliveryStatusResourceTypeEventConfiguration - */ -const de_MessageDeliveryStatusResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): MessageDeliveryStatusResourceTypeEventConfiguration => { - return { - Sidewalk: output.Sidewalk != null ? de_SidewalkResourceTypeEventConfiguration(output.Sidewalk, context) : undefined, - } as any; -}; +// de_DeviceCreationFileList omitted. -/** - * deserializeAws_restJson1MulticastGroup - */ -const de_MulticastGroup = (output: any, context: __SerdeContext): MulticastGroup => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_DeviceProfile omitted. -/** - * deserializeAws_restJson1MulticastGroupByFuotaTask - */ -const de_MulticastGroupByFuotaTask = (output: any, context: __SerdeContext): MulticastGroupByFuotaTask => { - return { - Id: __expectString(output.Id), - } as any; -}; +// de_DeviceProfileList omitted. -/** - * deserializeAws_restJson1MulticastGroupList - */ -const de_MulticastGroupList = (output: any, context: __SerdeContext): MulticastGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MulticastGroup(entry, context); - }); - return retVal; -}; +// de_DeviceRegistrationStateEventConfiguration omitted. -/** - * deserializeAws_restJson1MulticastGroupListByFuotaTask - */ -const de_MulticastGroupListByFuotaTask = (output: any, context: __SerdeContext): MulticastGroupByFuotaTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MulticastGroupByFuotaTask(entry, context); - }); - return retVal; -}; +// de_DeviceRegistrationStateResourceTypeEventConfiguration omitted. -/** - * deserializeAws_restJson1NetIdFilters - */ -const de_NetIdFilters = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DownlinkQueueMessage omitted. -/** - * deserializeAws_restJson1NetworkAnalyzerConfigurationList - */ -const de_NetworkAnalyzerConfigurationList = (output: any, context: __SerdeContext): NetworkAnalyzerConfigurations[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkAnalyzerConfigurations(entry, context); - }); - return retVal; -}; +// de_DownlinkQueueMessagesList omitted. -/** - * deserializeAws_restJson1NetworkAnalyzerConfigurations - */ -const de_NetworkAnalyzerConfigurations = (output: any, context: __SerdeContext): NetworkAnalyzerConfigurations => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// de_EventConfigurationItem omitted. -/** - * deserializeAws_restJson1OtaaV1_0_x - */ -const de_OtaaV1_0_x = (output: any, context: __SerdeContext): OtaaV1_0_x => { - return { - AppEui: __expectString(output.AppEui), - AppKey: __expectString(output.AppKey), - GenAppKey: __expectString(output.GenAppKey), - } as any; -}; +// de_EventConfigurationsList omitted. -/** - * deserializeAws_restJson1OtaaV1_1 - */ -const de_OtaaV1_1 = (output: any, context: __SerdeContext): OtaaV1_1 => { - return { - AppKey: __expectString(output.AppKey), - JoinEui: __expectString(output.JoinEui), - NwkKey: __expectString(output.NwkKey), - } as any; -}; +// de_EventNotificationItemConfigurations omitted. -/** - * deserializeAws_restJson1ParticipatingGateways - */ -const de_ParticipatingGateways = (output: any, context: __SerdeContext): ParticipatingGateways => { - return { - DownlinkMode: __expectString(output.DownlinkMode), - GatewayList: output.GatewayList != null ? de_GatewayList(output.GatewayList, context) : undefined, - TransmissionInterval: __expectInt32(output.TransmissionInterval), - } as any; -}; +// de_FactoryPresetFreqsList omitted. -/** - * deserializeAws_restJson1PositionConfigurationItem - */ -const de_PositionConfigurationItem = (output: any, context: __SerdeContext): PositionConfigurationItem => { - return { - Destination: __expectString(output.Destination), - ResourceIdentifier: __expectString(output.ResourceIdentifier), - ResourceType: __expectString(output.ResourceType), - Solvers: output.Solvers != null ? de_PositionSolverDetails(output.Solvers, context) : undefined, - } as any; -}; +// de_FPorts omitted. -/** - * deserializeAws_restJson1PositionConfigurationList - */ -const de_PositionConfigurationList = (output: any, context: __SerdeContext): PositionConfigurationItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PositionConfigurationItem(entry, context); - }); - return retVal; -}; +// de_FuotaTask omitted. -/** - * deserializeAws_restJson1PositionCoordinate - */ -const de_PositionCoordinate = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __limitedParseFloat32(entry) as any; - }); - return retVal; -}; +// de_FuotaTaskList omitted. + +// de_GatewayList omitted. + +// de_GatewayListItem omitted. /** - * deserializeAws_restJson1Positioning + * deserializeAws_restJson1ImportedSidewalkDevice */ -const de_Positioning = (output: any, context: __SerdeContext): Positioning => { - return { - ClockSync: __expectInt32(output.ClockSync), - Gnss: __expectInt32(output.Gnss), - Stream: __expectInt32(output.Stream), - } as any; +const de_ImportedSidewalkDevice = (output: any, context: __SerdeContext): ImportedSidewalkDevice => { + return take(output, { + LastUpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + OnboardingStatus: __expectString, + OnboardingStatusReason: __expectString, + SidewalkManufacturingSn: __expectString, + }) as any; }; /** - * deserializeAws_restJson1PositionSolverDetails + * deserializeAws_restJson1ImportedWirelessDevice */ -const de_PositionSolverDetails = (output: any, context: __SerdeContext): PositionSolverDetails => { - return { - SemtechGnss: output.SemtechGnss != null ? de_SemtechGnssDetail(output.SemtechGnss, context) : undefined, - } as any; +const de_ImportedWirelessDevice = (output: any, context: __SerdeContext): ImportedWirelessDevice => { + return take(output, { + Sidewalk: (_: any) => de_ImportedSidewalkDevice(_, context), + }) as any; }; /** - * deserializeAws_restJson1PrivateKeysList + * deserializeAws_restJson1ImportedWirelessDeviceList */ -const de_PrivateKeysList = (output: any, context: __SerdeContext): CertificateList[] => { +const de_ImportedWirelessDeviceList = (output: any, context: __SerdeContext): ImportedWirelessDevice[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CertificateList(entry, context); + return de_ImportedWirelessDevice(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ProximityEventConfiguration - */ -const de_ProximityEventConfiguration = (output: any, context: __SerdeContext): ProximityEventConfiguration => { - return { - Sidewalk: - output.Sidewalk != null ? de_SidewalkEventNotificationConfigurations(output.Sidewalk, context) : undefined, - WirelessDeviceIdEventTopic: __expectString(output.WirelessDeviceIdEventTopic), - } as any; -}; +// de_JoinEuiFilters omitted. -/** - * deserializeAws_restJson1ProximityResourceTypeEventConfiguration - */ -const de_ProximityResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): ProximityResourceTypeEventConfiguration => { - return { - Sidewalk: output.Sidewalk != null ? de_SidewalkResourceTypeEventConfiguration(output.Sidewalk, context) : undefined, - } as any; -}; +// de_JoinEuiRange omitted. -/** - * deserializeAws_restJson1SemtechGnssDetail - */ -const de_SemtechGnssDetail = (output: any, context: __SerdeContext): SemtechGnssDetail => { - return { - Fec: __expectString(output.Fec), - Provider: __expectString(output.Provider), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; +// de_JoinEventConfiguration omitted. -/** - * deserializeAws_restJson1ServiceProfile - */ -const de_ServiceProfile = (output: any, context: __SerdeContext): ServiceProfile => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_JoinResourceTypeEventConfiguration omitted. -/** - * deserializeAws_restJson1ServiceProfileList - */ -const de_ServiceProfileList = (output: any, context: __SerdeContext): ServiceProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceProfile(entry, context); - }); - return retVal; -}; +// de_LoRaWANConnectionStatusEventNotificationConfigurations omitted. -/** - * deserializeAws_restJson1SessionKeysAbpV1_0_x - */ -const de_SessionKeysAbpV1_0_x = (output: any, context: __SerdeContext): SessionKeysAbpV1_0_x => { - return { - AppSKey: __expectString(output.AppSKey), - NwkSKey: __expectString(output.NwkSKey), - } as any; -}; +// de_LoRaWANConnectionStatusResourceTypeEventConfiguration omitted. + +// de_LoRaWANDevice omitted. /** - * deserializeAws_restJson1SessionKeysAbpV1_1 + * deserializeAws_restJson1LoRaWANDeviceMetadata */ -const de_SessionKeysAbpV1_1 = (output: any, context: __SerdeContext): SessionKeysAbpV1_1 => { - return { - AppSKey: __expectString(output.AppSKey), - FNwkSIntKey: __expectString(output.FNwkSIntKey), - NwkSEncKey: __expectString(output.NwkSEncKey), - SNwkSIntKey: __expectString(output.SNwkSIntKey), - } as any; +const de_LoRaWANDeviceMetadata = (output: any, context: __SerdeContext): LoRaWANDeviceMetadata => { + return take(output, { + DataRate: __expectInt32, + DevEui: __expectString, + FPort: __expectInt32, + Frequency: __expectInt32, + Gateways: (_: any) => de_LoRaWANGatewayMetadataList(_, context), + Timestamp: __expectString, + }) as any; }; +// de_LoRaWANDeviceProfile omitted. + /** - * deserializeAws_restJson1SidewalkAccountInfo + * deserializeAws_restJson1LoRaWANFuotaTaskGetInfo */ -const de_SidewalkAccountInfo = (output: any, context: __SerdeContext): SidewalkAccountInfo => { - return { - AmazonId: __expectString(output.AmazonId), - AppServerPrivateKey: __expectString(output.AppServerPrivateKey), - } as any; +const de_LoRaWANFuotaTaskGetInfo = (output: any, context: __SerdeContext): LoRaWANFuotaTaskGetInfo => { + return take(output, { + RfRegion: __expectString, + StartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; +// de_LoRaWANGateway omitted. + +// de_LoRaWANGatewayCurrentVersion omitted. + /** - * deserializeAws_restJson1SidewalkAccountInfoWithFingerprint + * deserializeAws_restJson1LoRaWANGatewayMetadata */ -const de_SidewalkAccountInfoWithFingerprint = ( - output: any, - context: __SerdeContext -): SidewalkAccountInfoWithFingerprint => { - return { - AmazonId: __expectString(output.AmazonId), - Arn: __expectString(output.Arn), - Fingerprint: __expectString(output.Fingerprint), - } as any; +const de_LoRaWANGatewayMetadata = (output: any, context: __SerdeContext): LoRaWANGatewayMetadata => { + return take(output, { + GatewayEui: __expectString, + Rssi: __limitedParseDouble, + Snr: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1SidewalkAccountList + * deserializeAws_restJson1LoRaWANGatewayMetadataList */ -const de_SidewalkAccountList = (output: any, context: __SerdeContext): SidewalkAccountInfoWithFingerprint[] => { +const de_LoRaWANGatewayMetadataList = (output: any, context: __SerdeContext): LoRaWANGatewayMetadata[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SidewalkAccountInfoWithFingerprint(entry, context); + return de_LoRaWANGatewayMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SidewalkDevice - */ -const de_SidewalkDevice = (output: any, context: __SerdeContext): SidewalkDevice => { - return { - AmazonId: __expectString(output.AmazonId), - CertificateId: __expectString(output.CertificateId), - DeviceCertificates: - output.DeviceCertificates != null ? de_DeviceCertificateList(output.DeviceCertificates, context) : undefined, - DeviceProfileId: __expectString(output.DeviceProfileId), - PrivateKeys: output.PrivateKeys != null ? de_PrivateKeysList(output.PrivateKeys, context) : undefined, - SidewalkId: __expectString(output.SidewalkId), - SidewalkManufacturingSn: __expectString(output.SidewalkManufacturingSn), - Status: __expectString(output.Status), - } as any; -}; +// de_LoRaWANGatewayVersion omitted. -/** - * deserializeAws_restJson1SidewalkDeviceMetadata - */ -const de_SidewalkDeviceMetadata = (output: any, context: __SerdeContext): SidewalkDeviceMetadata => { - return { - BatteryLevel: __expectString(output.BatteryLevel), - DeviceState: __expectString(output.DeviceState), - Event: __expectString(output.Event), - Rssi: __expectInt32(output.Rssi), - } as any; -}; +// de_LoRaWANGetServiceProfileInfo omitted. -/** - * deserializeAws_restJson1SidewalkEventNotificationConfigurations - */ -const de_SidewalkEventNotificationConfigurations = ( - output: any, - context: __SerdeContext -): SidewalkEventNotificationConfigurations => { - return { - AmazonIdEventTopic: __expectString(output.AmazonIdEventTopic), - } as any; -}; +// de_LoRaWANJoinEventNotificationConfigurations omitted. -/** - * deserializeAws_restJson1SidewalkGetDeviceProfile - */ -const de_SidewalkGetDeviceProfile = (output: any, context: __SerdeContext): SidewalkGetDeviceProfile => { - return { - ApplicationServerPublicKey: __expectString(output.ApplicationServerPublicKey), - DakCertificateMetadata: - output.DakCertificateMetadata != null - ? de_DakCertificateMetadataList(output.DakCertificateMetadata, context) - : undefined, - QualificationStatus: __expectBoolean(output.QualificationStatus), - } as any; -}; +// de_LoRaWANJoinResourceTypeEventConfiguration omitted. -/** - * deserializeAws_restJson1SidewalkGetStartImportInfo - */ -const de_SidewalkGetStartImportInfo = (output: any, context: __SerdeContext): SidewalkGetStartImportInfo => { - return { - DeviceCreationFileList: - output.DeviceCreationFileList != null - ? de_DeviceCreationFileList(output.DeviceCreationFileList, context) - : undefined, - Role: __expectString(output.Role), - } as any; -}; +// de_LoRaWANListDevice omitted. -/** - * deserializeAws_restJson1SidewalkListDevice - */ -const de_SidewalkListDevice = (output: any, context: __SerdeContext): SidewalkListDevice => { - return { - AmazonId: __expectString(output.AmazonId), - DeviceCertificates: - output.DeviceCertificates != null ? de_DeviceCertificateList(output.DeviceCertificates, context) : undefined, - DeviceProfileId: __expectString(output.DeviceProfileId), - SidewalkId: __expectString(output.SidewalkId), - SidewalkManufacturingSn: __expectString(output.SidewalkManufacturingSn), - Status: __expectString(output.Status), - } as any; -}; +// de_LoRaWANMulticastGet omitted. /** - * deserializeAws_restJson1SidewalkResourceTypeEventConfiguration + * deserializeAws_restJson1LoRaWANMulticastSession */ -const de_SidewalkResourceTypeEventConfiguration = ( - output: any, - context: __SerdeContext -): SidewalkResourceTypeEventConfiguration => { - return { - WirelessDeviceEventTopic: __expectString(output.WirelessDeviceEventTopic), - } as any; +const de_LoRaWANMulticastSession = (output: any, context: __SerdeContext): LoRaWANMulticastSession => { + return take(output, { + DlDr: __expectInt32, + DlFreq: __expectInt32, + SessionStartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SessionTimeout: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1SubBands - */ -const de_SubBands = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_LoRaWANSendDataToDevice omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_LoRaWANUpdateGatewayTaskCreate omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_LoRaWANUpdateGatewayTaskEntry omitted. -/** - * deserializeAws_restJson1TraceContent - */ -const de_TraceContent = (output: any, context: __SerdeContext): TraceContent => { - return { - LogLevel: __expectString(output.LogLevel), - WirelessDeviceFrameInfo: __expectString(output.WirelessDeviceFrameInfo), - } as any; -}; +// de_MessageDeliveryStatusEventConfiguration omitted. -/** - * deserializeAws_restJson1UpdateWirelessGatewayTaskCreate - */ -const de_UpdateWirelessGatewayTaskCreate = (output: any, context: __SerdeContext): UpdateWirelessGatewayTaskCreate => { - return { - LoRaWAN: output.LoRaWAN != null ? de_LoRaWANUpdateGatewayTaskCreate(output.LoRaWAN, context) : undefined, - UpdateDataRole: __expectString(output.UpdateDataRole), - UpdateDataSource: __expectString(output.UpdateDataSource), - } as any; -}; +// de_MessageDeliveryStatusResourceTypeEventConfiguration omitted. -/** - * deserializeAws_restJson1UpdateWirelessGatewayTaskEntry - */ -const de_UpdateWirelessGatewayTaskEntry = (output: any, context: __SerdeContext): UpdateWirelessGatewayTaskEntry => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - LoRaWAN: output.LoRaWAN != null ? de_LoRaWANUpdateGatewayTaskEntry(output.LoRaWAN, context) : undefined, - } as any; -}; +// de_MulticastGroup omitted. -/** - * deserializeAws_restJson1WirelessDeviceEventLogOption - */ -const de_WirelessDeviceEventLogOption = (output: any, context: __SerdeContext): WirelessDeviceEventLogOption => { - return { - Event: __expectString(output.Event), - LogLevel: __expectString(output.LogLevel), - } as any; -}; +// de_MulticastGroupByFuotaTask omitted. + +// de_MulticastGroupList omitted. + +// de_MulticastGroupListByFuotaTask omitted. + +// de_NetIdFilters omitted. + +// de_NetworkAnalyzerConfigurationList omitted. + +// de_NetworkAnalyzerConfigurations omitted. + +// de_OtaaV1_0_x omitted. + +// de_OtaaV1_1 omitted. + +// de_ParticipatingGateways omitted. + +// de_PositionConfigurationItem omitted. + +// de_PositionConfigurationList omitted. /** - * deserializeAws_restJson1WirelessDeviceEventLogOptionList + * deserializeAws_restJson1PositionCoordinate */ -const de_WirelessDeviceEventLogOptionList = (output: any, context: __SerdeContext): WirelessDeviceEventLogOption[] => { +const de_PositionCoordinate = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WirelessDeviceEventLogOption(entry, context); + return __limitedParseFloat32(entry) as any; }); return retVal; }; +// de_Positioning omitted. + +// de_PositionSolverDetails omitted. + +// de_PrivateKeysList omitted. + +// de_ProximityEventConfiguration omitted. + +// de_ProximityResourceTypeEventConfiguration omitted. + +// de_SemtechGnssDetail omitted. + +// de_ServiceProfile omitted. + +// de_ServiceProfileList omitted. + +// de_SessionKeysAbpV1_0_x omitted. + +// de_SessionKeysAbpV1_1 omitted. + +// de_SidewalkAccountInfo omitted. + +// de_SidewalkAccountInfoWithFingerprint omitted. + +// de_SidewalkAccountList omitted. + +// de_SidewalkDevice omitted. + +// de_SidewalkDeviceMetadata omitted. + +// de_SidewalkEventNotificationConfigurations omitted. + +// de_SidewalkGetDeviceProfile omitted. + +// de_SidewalkGetStartImportInfo omitted. + +// de_SidewalkListDevice omitted. + +// de_SidewalkResourceTypeEventConfiguration omitted. + +// de_SubBands omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TraceContent omitted. + +// de_UpdateWirelessGatewayTaskCreate omitted. + +// de_UpdateWirelessGatewayTaskEntry omitted. + +// de_WirelessDeviceEventLogOption omitted. + +// de_WirelessDeviceEventLogOptionList omitted. + /** * deserializeAws_restJson1WirelessDeviceImportTask */ const de_WirelessDeviceImportTask = (output: any, context: __SerdeContext): WirelessDeviceImportTask => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationTime)) : undefined, - DestinationName: __expectString(output.DestinationName), - FailedImportedDeviceCount: __expectLong(output.FailedImportedDeviceCount), - Id: __expectString(output.Id), - InitializedImportedDeviceCount: __expectLong(output.InitializedImportedDeviceCount), - OnboardedImportedDeviceCount: __expectLong(output.OnboardedImportedDeviceCount), - PendingImportedDeviceCount: __expectLong(output.PendingImportedDeviceCount), - Sidewalk: output.Sidewalk != null ? de_SidewalkGetStartImportInfo(output.Sidewalk, context) : undefined, - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DestinationName: __expectString, + FailedImportedDeviceCount: __expectLong, + Id: __expectString, + InitializedImportedDeviceCount: __expectLong, + OnboardedImportedDeviceCount: __expectLong, + PendingImportedDeviceCount: __expectLong, + Sidewalk: _json, + Status: __expectString, + StatusReason: __expectString, + }) as any; }; /** @@ -13232,204 +10980,36 @@ const de_WirelessDeviceImportTaskList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WirelessDeviceImportTask(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1WirelessDeviceList - */ -const de_WirelessDeviceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WirelessDeviceList omitted. -/** - * deserializeAws_restJson1WirelessDeviceLogOption - */ -const de_WirelessDeviceLogOption = (output: any, context: __SerdeContext): WirelessDeviceLogOption => { - return { - Events: output.Events != null ? de_WirelessDeviceEventLogOptionList(output.Events, context) : undefined, - LogLevel: __expectString(output.LogLevel), - Type: __expectString(output.Type), - } as any; -}; +// de_WirelessDeviceLogOption omitted. -/** - * deserializeAws_restJson1WirelessDeviceLogOptionList - */ -const de_WirelessDeviceLogOptionList = (output: any, context: __SerdeContext): WirelessDeviceLogOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WirelessDeviceLogOption(entry, context); - }); - return retVal; -}; +// de_WirelessDeviceLogOptionList omitted. -/** - * deserializeAws_restJson1WirelessDeviceStatistics - */ -const de_WirelessDeviceStatistics = (output: any, context: __SerdeContext): WirelessDeviceStatistics => { - return { - Arn: __expectString(output.Arn), - DestinationName: __expectString(output.DestinationName), - FuotaDeviceStatus: __expectString(output.FuotaDeviceStatus), - Id: __expectString(output.Id), - LastUplinkReceivedAt: __expectString(output.LastUplinkReceivedAt), - LoRaWAN: output.LoRaWAN != null ? de_LoRaWANListDevice(output.LoRaWAN, context) : undefined, - McGroupId: __expectInt32(output.McGroupId), - MulticastDeviceStatus: __expectString(output.MulticastDeviceStatus), - Name: __expectString(output.Name), - Sidewalk: output.Sidewalk != null ? de_SidewalkListDevice(output.Sidewalk, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_WirelessDeviceStatistics omitted. -/** - * deserializeAws_restJson1WirelessDeviceStatisticsList - */ -const de_WirelessDeviceStatisticsList = (output: any, context: __SerdeContext): WirelessDeviceStatistics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WirelessDeviceStatistics(entry, context); - }); - return retVal; -}; +// de_WirelessDeviceStatisticsList omitted. -/** - * deserializeAws_restJson1WirelessGatewayEventLogOption - */ -const de_WirelessGatewayEventLogOption = (output: any, context: __SerdeContext): WirelessGatewayEventLogOption => { - return { - Event: __expectString(output.Event), - LogLevel: __expectString(output.LogLevel), - } as any; -}; +// de_WirelessGatewayEventLogOption omitted. -/** - * deserializeAws_restJson1WirelessGatewayEventLogOptionList - */ -const de_WirelessGatewayEventLogOptionList = ( - output: any, - context: __SerdeContext -): WirelessGatewayEventLogOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WirelessGatewayEventLogOption(entry, context); - }); - return retVal; -}; +// de_WirelessGatewayEventLogOptionList omitted. -/** - * deserializeAws_restJson1WirelessGatewayList - */ -const de_WirelessGatewayList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WirelessGatewayList omitted. -/** - * deserializeAws_restJson1WirelessGatewayLogOption - */ -const de_WirelessGatewayLogOption = (output: any, context: __SerdeContext): WirelessGatewayLogOption => { - return { - Events: output.Events != null ? de_WirelessGatewayEventLogOptionList(output.Events, context) : undefined, - LogLevel: __expectString(output.LogLevel), - Type: __expectString(output.Type), - } as any; -}; +// de_WirelessGatewayLogOption omitted. -/** - * deserializeAws_restJson1WirelessGatewayLogOptionList - */ -const de_WirelessGatewayLogOptionList = (output: any, context: __SerdeContext): WirelessGatewayLogOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WirelessGatewayLogOption(entry, context); - }); - return retVal; -}; +// de_WirelessGatewayLogOptionList omitted. -/** - * deserializeAws_restJson1WirelessGatewayStatistics - */ -const de_WirelessGatewayStatistics = (output: any, context: __SerdeContext): WirelessGatewayStatistics => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastUplinkReceivedAt: __expectString(output.LastUplinkReceivedAt), - LoRaWAN: output.LoRaWAN != null ? de_LoRaWANGateway(output.LoRaWAN, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_WirelessGatewayStatistics omitted. -/** - * deserializeAws_restJson1WirelessGatewayStatisticsList - */ -const de_WirelessGatewayStatisticsList = (output: any, context: __SerdeContext): WirelessGatewayStatistics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WirelessGatewayStatistics(entry, context); - }); - return retVal; -}; +// de_WirelessGatewayStatisticsList omitted. -/** - * deserializeAws_restJson1WirelessGatewayTaskDefinitionList - */ -const de_WirelessGatewayTaskDefinitionList = ( - output: any, - context: __SerdeContext -): UpdateWirelessGatewayTaskEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateWirelessGatewayTaskEntry(entry, context); - }); - return retVal; -}; +// de_WirelessGatewayTaskDefinitionList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iot/src/protocols/Aws_restJson1.ts b/clients/client-iot/src/protocols/Aws_restJson1.ts index e773b96f6fa6..91e6bbc54ef9 100644 --- a/clients/client-iot/src/protocols/Aws_restJson1.ts +++ b/clients/client-iot/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,14 +10,14 @@ import { expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -684,27 +685,20 @@ import { AddThingsToThingGroupParams, AggregationType, AlertTarget, - AlertTargetType, - Allowed, AssetPropertyTimestamp, AssetPropertyValue, AssetPropertyVariant, AttributePayload, AuditCheckConfiguration, - AuditCheckDetails, AuditFinding, AuditMitigationActionExecutionMetadata, AuditMitigationActionsTaskMetadata, AuditMitigationActionsTaskTarget, AuditNotificationTarget, - AuditNotificationType, AuditSuppression, - AuditTaskMetadata, AuthInfo, AuthorizerConfig, AuthorizerDescription, - AuthorizerSummary, - AuthResult, AwsJobAbortConfig, AwsJobAbortCriteria, AwsJobExecutionsRolloutConfig, @@ -727,13 +721,11 @@ import { ConflictingResourceUpdateException, CustomCodeSigning, DeleteConflictException, - Denied, Destination, DynamoDBAction, DynamoDBv2Action, ElasticsearchAction, EnableIoTLoggingParams, - ExplicitDeny, ExponentialRolloutRate, FileLocation, FirehoseAction, @@ -741,8 +733,6 @@ import { HttpActionHeader, HttpAuthorization, HttpUrlDestinationConfiguration, - HttpUrlDestinationProperties, - ImplicitDeny, IndexNotReadyException, InternalException, InternalFailureException, @@ -757,7 +747,6 @@ import { JobExecutionsRetryConfig, JobExecutionsRolloutConfig, KafkaAction, - KeyPair, KinesisAction, LambdaAction, LimitExceededException, @@ -771,10 +760,8 @@ import { MetricValue, MitigationActionParams, MqttHeaders, - NonCompliantResource, OpenSearchAction, OTAUpdateFile, - Policy, PolicyVersionIdentifier, PresignedUrlConfig, Protocol, @@ -783,7 +770,6 @@ import { PutAssetPropertyValueEntry, PutItemInput, RateIncreaseCriteria, - RelatedResource, ReplaceDefaultPolicyVersionParams, RepublishAction, ResourceAlreadyExistsException, @@ -806,7 +792,6 @@ import { StepFunctionsAction, StreamFile, Tag, - TaskStatisticsForAuditCheck, ThingGroupProperties, ThingTypeProperties, ThrottlingException, @@ -824,14 +809,11 @@ import { UserProperty, VersionConflictException, VersionsLimitExceededException, - ViolationEventAdditionalInfo, VpcDestinationConfiguration, - VpcDestinationProperties, } from "../models/models_0"; import { BehaviorModelTrainingSummary, BillingGroupMetadata, - Bucket, BucketsAggregationType, CACertificate, CACertificateDescription, @@ -840,31 +822,19 @@ import { CertificateValidity, Configuration, DetectMitigationActionExecution, - DetectMitigationActionsTaskStatistics, DetectMitigationActionsTaskSummary, DetectMitigationActionsTaskTarget, - DocumentParameter, - DomainConfigurationSummary, - EffectivePolicy, - ErrorInfo, - EventType, Field, - FleetMetricNameAndArn, - GroupNameAndArn, IndexingFilter, InternalServerException, Job, JobExecution, - JobExecutionStatusDetails, JobExecutionSummary, JobExecutionSummaryForJob, JobExecutionSummaryForThing, - JobProcessDetails, JobSummary, JobTemplateSummary, - ManagedJobTemplateSummary, MetricDatum, - MitigationAction, MitigationActionIdentifier, NotConfiguredException, OTAUpdateInfo, @@ -876,15 +846,8 @@ import { ProvisioningTemplateVersionSummary, RegistrationConfig, RoleAliasDescription, - ScheduledAuditMetadata, - ScheduledJobRollout, - SecurityProfileIdentifier, - SecurityProfileTarget, - SecurityProfileTargetMapping, - ServerCertificateSummary, Statistics, StreamInfo, - TaskStatistics, TermsAggregation, ThingGroupIndexingConfiguration, ThingGroupMetadata, @@ -897,28 +860,19 @@ import { import { CertificateConflictException, HttpContext, - HttpUrlDestinationSummary, InvalidResponseException, LoggingOptionsPayload, LogTarget, - LogTargetConfiguration, MqttContext, RegistrationCodeValidationException, ResourceRegistrationFailureException, - StreamSummary, TaskAlreadyExistsException, - ThingAttribute, - ThingConnectivity, - ThingDocument, - ThingGroupDocument, ThingTypeDefinition, TlsContext, TopicRuleDestinationSummary, TopicRuleListItem, TransferConflictException, - ValidationError, ViolationEvent, - VpcDestinationSummary, } from "../models/models_2"; /** @@ -971,12 +925,14 @@ export const se_AddThingToBillingGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/billing-groups/addThingToBillingGroup"; let body: any; - body = JSON.stringify({ - ...(input.billingGroupArn != null && { billingGroupArn: input.billingGroupArn }), - ...(input.billingGroupName != null && { billingGroupName: input.billingGroupName }), - ...(input.thingArn != null && { thingArn: input.thingArn }), - ...(input.thingName != null && { thingName: input.thingName }), - }); + body = JSON.stringify( + take(input, { + billingGroupArn: [], + billingGroupName: [], + thingArn: [], + thingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1002,13 +958,15 @@ export const se_AddThingToThingGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/thing-groups/addThingToThingGroup"; let body: any; - body = JSON.stringify({ - ...(input.overrideDynamicGroups != null && { overrideDynamicGroups: input.overrideDynamicGroups }), - ...(input.thingArn != null && { thingArn: input.thingArn }), - ...(input.thingGroupArn != null && { thingGroupArn: input.thingGroupArn }), - ...(input.thingGroupName != null && { thingGroupName: input.thingGroupName }), - ...(input.thingName != null && { thingName: input.thingName }), - }); + body = JSON.stringify( + take(input, { + overrideDynamicGroups: [], + thingArn: [], + thingGroupArn: [], + thingGroupName: [], + thingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1037,10 +995,12 @@ export const se_AssociateTargetsWithJobCommand = async ( namespaceId: [, input.namespaceId!], }); let body: any; - body = JSON.stringify({ - ...(input.comment != null && { comment: input.comment }), - ...(input.targets != null && { targets: se_JobTargets(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + comment: [], + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1068,9 +1028,11 @@ export const se_AttachPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/target-policies/{policyName}"; resolvedPath = __resolvedPath(resolvedPath, input, "policyName", () => input.policyName!, "{policyName}", false); let body: any; - body = JSON.stringify({ - ...(input.target != null && { target: input.target }), - }); + body = JSON.stringify( + take(input, { + target: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1293,10 +1255,12 @@ export const se_CancelJobCommand = async ( force: [() => input.force !== void 0, () => input.force!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.comment != null && { comment: input.comment }), - ...(input.reasonCode != null && { reasonCode: input.reasonCode }), - }); + body = JSON.stringify( + take(input, { + comment: [], + reasonCode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1328,10 +1292,12 @@ export const se_CancelJobExecutionCommand = async ( force: [() => input.force !== void 0, () => input.force!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - ...(input.statusDetails != null && { statusDetails: se_DetailsMap(input.statusDetails, context) }), - }); + body = JSON.stringify( + take(input, { + expectedVersion: [], + statusDetails: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1414,16 +1380,16 @@ export const se_CreateAuditSuppressionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/suppressions/create"; let body: any; - body = JSON.stringify({ - ...(input.checkName != null && { checkName: input.checkName }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.expirationDate != null && { expirationDate: Math.round(input.expirationDate.getTime() / 1000) }), - ...(input.resourceIdentifier != null && { - resourceIdentifier: se_ResourceIdentifier(input.resourceIdentifier, context), - }), - ...(input.suppressIndefinitely != null && { suppressIndefinitely: input.suppressIndefinitely }), - }); + body = JSON.stringify( + take(input, { + checkName: [], + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + expirationDate: (_) => Math.round(_.getTime() / 1000), + resourceIdentifier: (_) => _json(_), + suppressIndefinitely: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1457,17 +1423,17 @@ export const se_CreateAuthorizerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.authorizerFunctionArn != null && { authorizerFunctionArn: input.authorizerFunctionArn }), - ...(input.enableCachingForHttp != null && { enableCachingForHttp: input.enableCachingForHttp }), - ...(input.signingDisabled != null && { signingDisabled: input.signingDisabled }), - ...(input.status != null && { status: input.status }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.tokenKeyName != null && { tokenKeyName: input.tokenKeyName }), - ...(input.tokenSigningPublicKeys != null && { - tokenSigningPublicKeys: se_PublicKeyMap(input.tokenSigningPublicKeys, context), - }), - }); + body = JSON.stringify( + take(input, { + authorizerFunctionArn: [], + enableCachingForHttp: [], + signingDisabled: [], + status: [], + tags: (_) => _json(_), + tokenKeyName: [], + tokenSigningPublicKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1501,12 +1467,12 @@ export const se_CreateBillingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.billingGroupProperties != null && { - billingGroupProperties: se_BillingGroupProperties(input.billingGroupProperties, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + billingGroupProperties: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1534,9 +1500,11 @@ export const se_CreateCertificateFromCsrCommand = async ( setAsActive: [() => input.setAsActive !== void 0, () => input.setAsActive!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.certificateSigningRequest != null && { certificateSigningRequest: input.certificateSigningRequest }), - }); + body = JSON.stringify( + take(input, { + certificateSigningRequest: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1564,12 +1532,14 @@ export const se_CreateCustomMetricCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-metric/{metricName}"; resolvedPath = __resolvedPath(resolvedPath, input, "metricName", () => input.metricName!, "{metricName}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.metricType != null && { metricType: input.metricType }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + displayName: [], + metricType: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1595,12 +1565,14 @@ export const se_CreateDimensionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dimensions/{name}"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.stringValues != null && { stringValues: se_DimensionStringValues(input.stringValues, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + stringValues: (_) => _json(_), + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1635,16 +1607,16 @@ export const se_CreateDomainConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.authorizerConfig != null && { authorizerConfig: se_AuthorizerConfig(input.authorizerConfig, context) }), - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.serverCertificateArns != null && { - serverCertificateArns: se_ServerCertificateArns(input.serverCertificateArns, context), - }), - ...(input.serviceType != null && { serviceType: input.serviceType }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.validationCertificateArn != null && { validationCertificateArn: input.validationCertificateArn }), - }); + body = JSON.stringify( + take(input, { + authorizerConfig: (_) => _json(_), + domainName: [], + serverCertificateArns: (_) => _json(_), + serviceType: [], + tags: (_) => _json(_), + validationCertificateArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1678,15 +1650,15 @@ export const se_CreateDynamicThingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.thingGroupProperties != null && { - thingGroupProperties: se_ThingGroupProperties(input.thingGroupProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + indexName: [], + queryString: [], + queryVersion: [], + tags: (_) => _json(_), + thingGroupProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1713,17 +1685,19 @@ export const se_CreateFleetMetricCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fleet-metric/{metricName}"; resolvedPath = __resolvedPath(resolvedPath, input, "metricName", () => input.metricName!, "{metricName}", false); let body: any; - body = JSON.stringify({ - ...(input.aggregationField != null && { aggregationField: input.aggregationField }), - ...(input.aggregationType != null && { aggregationType: se_AggregationType(input.aggregationType, context) }), - ...(input.description != null && { description: input.description }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.period != null && { period: input.period }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.unit != null && { unit: input.unit }), - }); + body = JSON.stringify( + take(input, { + aggregationField: [], + aggregationType: (_) => _json(_), + description: [], + indexName: [], + period: [], + queryString: [], + queryVersion: [], + tags: (_) => _json(_), + unit: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1749,29 +1723,25 @@ export const se_CreateJobCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs/{jobId}"; resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId!, "{jobId}", false); let body: any; - body = JSON.stringify({ - ...(input.abortConfig != null && { abortConfig: se_AbortConfig(input.abortConfig, context) }), - ...(input.description != null && { description: input.description }), - ...(input.document != null && { document: input.document }), - ...(input.documentParameters != null && { documentParameters: se_ParameterMap(input.documentParameters, context) }), - ...(input.documentSource != null && { documentSource: input.documentSource }), - ...(input.jobExecutionsRetryConfig != null && { - jobExecutionsRetryConfig: se_JobExecutionsRetryConfig(input.jobExecutionsRetryConfig, context), - }), - ...(input.jobExecutionsRolloutConfig != null && { - jobExecutionsRolloutConfig: se_JobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context), - }), - ...(input.jobTemplateArn != null && { jobTemplateArn: input.jobTemplateArn }), - ...(input.namespaceId != null && { namespaceId: input.namespaceId }), - ...(input.presignedUrlConfig != null && { - presignedUrlConfig: se_PresignedUrlConfig(input.presignedUrlConfig, context), - }), - ...(input.schedulingConfig != null && { schedulingConfig: se_SchedulingConfig(input.schedulingConfig, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.targetSelection != null && { targetSelection: input.targetSelection }), - ...(input.targets != null && { targets: se_JobTargets(input.targets, context) }), - ...(input.timeoutConfig != null && { timeoutConfig: se_TimeoutConfig(input.timeoutConfig, context) }), - }); + body = JSON.stringify( + take(input, { + abortConfig: (_) => se_AbortConfig(_, context), + description: [], + document: [], + documentParameters: (_) => _json(_), + documentSource: [], + jobExecutionsRetryConfig: (_) => _json(_), + jobExecutionsRolloutConfig: (_) => se_JobExecutionsRolloutConfig(_, context), + jobTemplateArn: [], + namespaceId: [], + presignedUrlConfig: (_) => _json(_), + schedulingConfig: (_) => _json(_), + tags: (_) => _json(_), + targetSelection: [], + targets: (_) => _json(_), + timeoutConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1805,27 +1775,21 @@ export const se_CreateJobTemplateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.abortConfig != null && { abortConfig: se_AbortConfig(input.abortConfig, context) }), - ...(input.description != null && { description: input.description }), - ...(input.document != null && { document: input.document }), - ...(input.documentSource != null && { documentSource: input.documentSource }), - ...(input.jobArn != null && { jobArn: input.jobArn }), - ...(input.jobExecutionsRetryConfig != null && { - jobExecutionsRetryConfig: se_JobExecutionsRetryConfig(input.jobExecutionsRetryConfig, context), - }), - ...(input.jobExecutionsRolloutConfig != null && { - jobExecutionsRolloutConfig: se_JobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context), - }), - ...(input.maintenanceWindows != null && { - maintenanceWindows: se_MaintenanceWindows(input.maintenanceWindows, context), - }), - ...(input.presignedUrlConfig != null && { - presignedUrlConfig: se_PresignedUrlConfig(input.presignedUrlConfig, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.timeoutConfig != null && { timeoutConfig: se_TimeoutConfig(input.timeoutConfig, context) }), - }); + body = JSON.stringify( + take(input, { + abortConfig: (_) => se_AbortConfig(_, context), + description: [], + document: [], + documentSource: [], + jobArn: [], + jobExecutionsRetryConfig: (_) => _json(_), + jobExecutionsRolloutConfig: (_) => se_JobExecutionsRolloutConfig(_, context), + maintenanceWindows: (_) => _json(_), + presignedUrlConfig: (_) => _json(_), + tags: (_) => _json(_), + timeoutConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1878,11 +1842,13 @@ export const se_CreateMitigationActionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/mitigationactions/actions/{actionName}"; resolvedPath = __resolvedPath(resolvedPath, input, "actionName", () => input.actionName!, "{actionName}", false); let body: any; - body = JSON.stringify({ - ...(input.actionParams != null && { actionParams: se_MitigationActionParams(input.actionParams, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + actionParams: (_) => _json(_), + roleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1909,30 +1875,22 @@ export const se_CreateOTAUpdateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/otaUpdates/{otaUpdateId}"; resolvedPath = __resolvedPath(resolvedPath, input, "otaUpdateId", () => input.otaUpdateId!, "{otaUpdateId}", false); let body: any; - body = JSON.stringify({ - ...(input.additionalParameters != null && { - additionalParameters: se_AdditionalParameterMap(input.additionalParameters, context), - }), - ...(input.awsJobAbortConfig != null && { - awsJobAbortConfig: se_AwsJobAbortConfig(input.awsJobAbortConfig, context), - }), - ...(input.awsJobExecutionsRolloutConfig != null && { - awsJobExecutionsRolloutConfig: se_AwsJobExecutionsRolloutConfig(input.awsJobExecutionsRolloutConfig, context), - }), - ...(input.awsJobPresignedUrlConfig != null && { - awsJobPresignedUrlConfig: se_AwsJobPresignedUrlConfig(input.awsJobPresignedUrlConfig, context), - }), - ...(input.awsJobTimeoutConfig != null && { - awsJobTimeoutConfig: se_AwsJobTimeoutConfig(input.awsJobTimeoutConfig, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.files != null && { files: se_OTAUpdateFiles(input.files, context) }), - ...(input.protocols != null && { protocols: se_Protocols(input.protocols, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.targetSelection != null && { targetSelection: input.targetSelection }), - ...(input.targets != null && { targets: se_Targets(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + additionalParameters: (_) => _json(_), + awsJobAbortConfig: (_) => se_AwsJobAbortConfig(_, context), + awsJobExecutionsRolloutConfig: (_) => se_AwsJobExecutionsRolloutConfig(_, context), + awsJobPresignedUrlConfig: (_) => _json(_), + awsJobTimeoutConfig: (_) => _json(_), + description: [], + files: (_) => se_OTAUpdateFiles(_, context), + protocols: (_) => _json(_), + roleArn: [], + tags: (_) => _json(_), + targetSelection: [], + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1958,10 +1916,12 @@ export const se_CreatePolicyCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policies/{policyName}"; resolvedPath = __resolvedPath(resolvedPath, input, "policyName", () => input.policyName!, "{policyName}", false); let body: any; - body = JSON.stringify({ - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + policyDocument: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1991,9 +1951,11 @@ export const se_CreatePolicyVersionCommand = async ( setAsDefault: [() => input.setAsDefault !== void 0, () => input.setAsDefault!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.policyDocument != null && { policyDocument: input.policyDocument }), - }); + body = JSON.stringify( + take(input, { + policyDocument: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2052,18 +2014,18 @@ export const se_CreateProvisioningTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/provisioning-templates"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.preProvisioningHook != null && { - preProvisioningHook: se_ProvisioningHook(input.preProvisioningHook, context), - }), - ...(input.provisioningRoleArn != null && { provisioningRoleArn: input.provisioningRoleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateBody != null && { templateBody: input.templateBody }), - ...(input.templateName != null && { templateName: input.templateName }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + description: [], + enabled: [], + preProvisioningHook: (_) => _json(_), + provisioningRoleArn: [], + tags: (_) => _json(_), + templateBody: [], + templateName: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2101,9 +2063,11 @@ export const se_CreateProvisioningTemplateVersionCommand = async ( setAsDefault: [() => input.setAsDefault !== void 0, () => input.setAsDefault!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.templateBody != null && { templateBody: input.templateBody }), - }); + body = JSON.stringify( + take(input, { + templateBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2131,11 +2095,13 @@ export const se_CreateRoleAliasCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/role-aliases/{roleAlias}"; resolvedPath = __resolvedPath(resolvedPath, input, "roleAlias", () => input.roleAlias!, "{roleAlias}", false); let body: any; - body = JSON.stringify({ - ...(input.credentialDurationSeconds != null && { credentialDurationSeconds: input.credentialDurationSeconds }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + credentialDurationSeconds: [], + roleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2170,15 +2136,15 @@ export const se_CreateScheduledAuditCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.dayOfMonth != null && { dayOfMonth: input.dayOfMonth }), - ...(input.dayOfWeek != null && { dayOfWeek: input.dayOfWeek }), - ...(input.frequency != null && { frequency: input.frequency }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.targetCheckNames != null && { - targetCheckNames: se_TargetAuditCheckNames(input.targetCheckNames, context), - }), - }); + body = JSON.stringify( + take(input, { + dayOfMonth: [], + dayOfWeek: [], + frequency: [], + tags: (_) => _json(_), + targetCheckNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2212,18 +2178,16 @@ export const se_CreateSecurityProfileCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.additionalMetricsToRetain != null && { - additionalMetricsToRetain: se_AdditionalMetricsToRetainList(input.additionalMetricsToRetain, context), - }), - ...(input.additionalMetricsToRetainV2 != null && { - additionalMetricsToRetainV2: se_AdditionalMetricsToRetainV2List(input.additionalMetricsToRetainV2, context), - }), - ...(input.alertTargets != null && { alertTargets: se_AlertTargets(input.alertTargets, context) }), - ...(input.behaviors != null && { behaviors: se_Behaviors(input.behaviors, context) }), - ...(input.securityProfileDescription != null && { securityProfileDescription: input.securityProfileDescription }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + additionalMetricsToRetain: (_) => _json(_), + additionalMetricsToRetainV2: (_) => _json(_), + alertTargets: (_) => _json(_), + behaviors: (_) => se_Behaviors(_, context), + securityProfileDescription: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2249,12 +2213,14 @@ export const se_CreateStreamCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/streams/{streamId}"; resolvedPath = __resolvedPath(resolvedPath, input, "streamId", () => input.streamId!, "{streamId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.files != null && { files: se_StreamFiles(input.files, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + files: (_) => _json(_), + roleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2280,11 +2246,13 @@ export const se_CreateThingCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}"; resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName!, "{thingName}", false); let body: any; - body = JSON.stringify({ - ...(input.attributePayload != null && { attributePayload: se_AttributePayload(input.attributePayload, context) }), - ...(input.billingGroupName != null && { billingGroupName: input.billingGroupName }), - ...(input.thingTypeName != null && { thingTypeName: input.thingTypeName }), - }); + body = JSON.stringify( + take(input, { + attributePayload: (_) => _json(_), + billingGroupName: [], + thingTypeName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2318,13 +2286,13 @@ export const se_CreateThingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.parentGroupName != null && { parentGroupName: input.parentGroupName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.thingGroupProperties != null && { - thingGroupProperties: se_ThingGroupProperties(input.thingGroupProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + parentGroupName: [], + tags: (_) => _json(_), + thingGroupProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2358,12 +2326,12 @@ export const se_CreateThingTypeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.thingTypeProperties != null && { - thingTypeProperties: se_ThingTypeProperties(input.thingTypeProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + thingTypeProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2391,7 +2359,7 @@ export const se_CreateTopicRuleCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ruleName", () => input.ruleName!, "{ruleName}", false); let body: any; if (input.topicRulePayload !== undefined) { - body = se_TopicRulePayload(input.topicRulePayload, context); + body = _json(input.topicRulePayload); } if (body === undefined) { body = {}; @@ -2421,11 +2389,11 @@ export const se_CreateTopicRuleDestinationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/destinations"; let body: any; - body = JSON.stringify({ - ...(input.destinationConfiguration != null && { - destinationConfiguration: se_TopicRuleDestinationConfiguration(input.destinationConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + destinationConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2480,12 +2448,12 @@ export const se_DeleteAuditSuppressionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/suppressions/delete"; let body: any; - body = JSON.stringify({ - ...(input.checkName != null && { checkName: input.checkName }), - ...(input.resourceIdentifier != null && { - resourceIdentifier: se_ResourceIdentifier(input.resourceIdentifier, context), - }), - }); + body = JSON.stringify( + take(input, { + checkName: [], + resourceIdentifier: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3376,9 +3344,11 @@ export const se_DeprecateThingTypeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.undoDeprecate != null && { undoDeprecate: input.undoDeprecate }), - }); + body = JSON.stringify( + take(input, { + undoDeprecate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3477,12 +3447,12 @@ export const se_DescribeAuditSuppressionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/suppressions/describe"; let body: any; - body = JSON.stringify({ - ...(input.checkName != null && { checkName: input.checkName }), - ...(input.resourceIdentifier != null && { - resourceIdentifier: se_ResourceIdentifier(input.resourceIdentifier, context), - }), - }); + body = JSON.stringify( + take(input, { + checkName: [], + resourceIdentifier: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4314,9 +4284,11 @@ export const se_DetachPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/target-policies/{policyName}"; resolvedPath = __resolvedPath(resolvedPath, input, "policyName", () => input.policyName!, "{policyName}", false); let body: any; - body = JSON.stringify({ - ...(input.target != null && { target: input.target }), - }); + body = JSON.stringify( + take(input, { + target: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4505,15 +4477,15 @@ export const se_GetBucketsAggregationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/indices/buckets"; let body: any; - body = JSON.stringify({ - ...(input.aggregationField != null && { aggregationField: input.aggregationField }), - ...(input.bucketsAggregationType != null && { - bucketsAggregationType: se_BucketsAggregationType(input.bucketsAggregationType, context), - }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - }); + body = JSON.stringify( + take(input, { + aggregationField: [], + bucketsAggregationType: (_) => _json(_), + indexName: [], + queryString: [], + queryVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4538,12 +4510,14 @@ export const se_GetCardinalityCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/indices/cardinality"; let body: any; - body = JSON.stringify({ - ...(input.aggregationField != null && { aggregationField: input.aggregationField }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - }); + body = JSON.stringify( + take(input, { + aggregationField: [], + indexName: [], + queryString: [], + queryVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4571,10 +4545,12 @@ export const se_GetEffectivePoliciesCommand = async ( thingName: [, input.thingName!], }); let body: any; - body = JSON.stringify({ - ...(input.cognitoIdentityPoolId != null && { cognitoIdentityPoolId: input.cognitoIdentityPoolId }), - ...(input.principal != null && { principal: input.principal }), - }); + body = JSON.stringify( + take(input, { + cognitoIdentityPoolId: [], + principal: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4698,13 +4674,15 @@ export const se_GetPercentilesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/indices/percentiles"; let body: any; - body = JSON.stringify({ - ...(input.aggregationField != null && { aggregationField: input.aggregationField }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.percents != null && { percents: se_PercentList(input.percents, context) }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - }); + body = JSON.stringify( + take(input, { + aggregationField: [], + indexName: [], + percents: (_) => se_PercentList(_, context), + queryString: [], + queryVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4810,12 +4788,14 @@ export const se_GetStatisticsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/indices/statistics"; let body: any; - body = JSON.stringify({ - ...(input.aggregationField != null && { aggregationField: input.aggregationField }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - }); + body = JSON.stringify( + take(input, { + aggregationField: [], + indexName: [], + queryString: [], + queryVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4973,18 +4953,18 @@ export const se_ListAuditFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/findings"; let body: any; - body = JSON.stringify({ - ...(input.checkName != null && { checkName: input.checkName }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.listSuppressedFindings != null && { listSuppressedFindings: input.listSuppressedFindings }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceIdentifier != null && { - resourceIdentifier: se_ResourceIdentifier(input.resourceIdentifier, context), - }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.taskId != null && { taskId: input.taskId }), - }); + body = JSON.stringify( + take(input, { + checkName: [], + endTime: (_) => Math.round(_.getTime() / 1000), + listSuppressedFindings: [], + maxResults: [], + nextToken: [], + resourceIdentifier: (_) => _json(_), + startTime: (_) => Math.round(_.getTime() / 1000), + taskId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5080,15 +5060,15 @@ export const se_ListAuditSuppressionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/suppressions/list"; let body: any; - body = JSON.stringify({ - ...(input.ascendingOrder != null && { ascendingOrder: input.ascendingOrder }), - ...(input.checkName != null && { checkName: input.checkName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceIdentifier != null && { - resourceIdentifier: se_ResourceIdentifier(input.resourceIdentifier, context), - }), - }); + body = JSON.stringify( + take(input, { + ascendingOrder: [], + checkName: [], + maxResults: [], + nextToken: [], + resourceIdentifier: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6661,12 +6641,12 @@ export const se_PutVerificationStateOnViolationCommand = async ( "/violations/verification-state/{violationId}"; resolvedPath = __resolvedPath(resolvedPath, input, "violationId", () => input.violationId!, "{violationId}", false); let body: any; - body = JSON.stringify({ - ...(input.verificationState != null && { verificationState: input.verificationState }), - ...(input.verificationStateDescription != null && { - verificationStateDescription: input.verificationStateDescription, - }), - }); + body = JSON.stringify( + take(input, { + verificationState: [], + verificationStateDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6698,15 +6678,15 @@ export const se_RegisterCACertificateCommand = async ( ], }); let body: any; - body = JSON.stringify({ - ...(input.caCertificate != null && { caCertificate: input.caCertificate }), - ...(input.certificateMode != null && { certificateMode: input.certificateMode }), - ...(input.registrationConfig != null && { - registrationConfig: se_RegistrationConfig(input.registrationConfig, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.verificationCertificate != null && { verificationCertificate: input.verificationCertificate }), - }); + body = JSON.stringify( + take(input, { + caCertificate: [], + certificateMode: [], + registrationConfig: (_) => _json(_), + tags: (_) => _json(_), + verificationCertificate: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6735,11 +6715,13 @@ export const se_RegisterCertificateCommand = async ( setAsActive: [() => input.setAsActive !== void 0, () => input.setAsActive!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.caCertificatePem != null && { caCertificatePem: input.caCertificatePem }), - ...(input.certificatePem != null && { certificatePem: input.certificatePem }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + caCertificatePem: [], + certificatePem: [], + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6766,10 +6748,12 @@ export const se_RegisterCertificateWithoutCACommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/certificate/register-no-ca"; let body: any; - body = JSON.stringify({ - ...(input.certificatePem != null && { certificatePem: input.certificatePem }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + certificatePem: [], + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6794,10 +6778,12 @@ export const se_RegisterThingCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things"; let body: any; - body = JSON.stringify({ - ...(input.parameters != null && { parameters: se_Parameters(input.parameters, context) }), - ...(input.templateBody != null && { templateBody: input.templateBody }), - }); + body = JSON.stringify( + take(input, { + parameters: (_) => _json(_), + templateBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6832,9 +6818,11 @@ export const se_RejectCertificateTransferCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.rejectReason != null && { rejectReason: input.rejectReason }), - }); + body = JSON.stringify( + take(input, { + rejectReason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6861,12 +6849,14 @@ export const se_RemoveThingFromBillingGroupCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/billing-groups/removeThingFromBillingGroup"; let body: any; - body = JSON.stringify({ - ...(input.billingGroupArn != null && { billingGroupArn: input.billingGroupArn }), - ...(input.billingGroupName != null && { billingGroupName: input.billingGroupName }), - ...(input.thingArn != null && { thingArn: input.thingArn }), - ...(input.thingName != null && { thingName: input.thingName }), - }); + body = JSON.stringify( + take(input, { + billingGroupArn: [], + billingGroupName: [], + thingArn: [], + thingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6892,12 +6882,14 @@ export const se_RemoveThingFromThingGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/thing-groups/removeThingFromThingGroup"; let body: any; - body = JSON.stringify({ - ...(input.thingArn != null && { thingArn: input.thingArn }), - ...(input.thingGroupArn != null && { thingGroupArn: input.thingGroupArn }), - ...(input.thingGroupName != null && { thingGroupName: input.thingGroupName }), - ...(input.thingName != null && { thingName: input.thingName }), - }); + body = JSON.stringify( + take(input, { + thingArn: [], + thingGroupArn: [], + thingGroupName: [], + thingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6924,7 +6916,7 @@ export const se_ReplaceTopicRuleCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ruleName", () => input.ruleName!, "{ruleName}", false); let body: any; if (input.topicRulePayload !== undefined) { - body = se_TopicRulePayload(input.topicRulePayload, context); + body = _json(input.topicRulePayload); } if (body === undefined) { body = {}; @@ -6954,13 +6946,15 @@ export const se_SearchIndexCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/indices/search"; let body: any; - body = JSON.stringify({ - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - }); + body = JSON.stringify( + take(input, { + indexName: [], + maxResults: [], + nextToken: [], + queryString: [], + queryVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6985,9 +6979,11 @@ export const se_SetDefaultAuthorizerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/default-authorizer"; let body: any; - body = JSON.stringify({ - ...(input.authorizerName != null && { authorizerName: input.authorizerName }), - }); + body = JSON.stringify( + take(input, { + authorizerName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7046,7 +7042,7 @@ export const se_SetLoggingOptionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/loggingOptions"; let body: any; if (input.loggingOptionsPayload !== undefined) { - body = se_LoggingOptionsPayload(input.loggingOptionsPayload, context); + body = _json(input.loggingOptionsPayload); } if (body === undefined) { body = {}; @@ -7076,10 +7072,12 @@ export const se_SetV2LoggingLevelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2LoggingLevel"; let body: any; - body = JSON.stringify({ - ...(input.logLevel != null && { logLevel: input.logLevel }), - ...(input.logTarget != null && { logTarget: se_LogTarget(input.logTarget, context) }), - }); + body = JSON.stringify( + take(input, { + logLevel: [], + logTarget: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7104,11 +7102,13 @@ export const se_SetV2LoggingOptionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2LoggingOptions"; let body: any; - body = JSON.stringify({ - ...(input.defaultLogLevel != null && { defaultLogLevel: input.defaultLogLevel }), - ...(input.disableAllLogs != null && { disableAllLogs: input.disableAllLogs }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + defaultLogLevel: [], + disableAllLogs: [], + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7135,13 +7135,13 @@ export const se_StartAuditMitigationActionsTaskCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/mitigationactions/tasks/{taskId}"; resolvedPath = __resolvedPath(resolvedPath, input, "taskId", () => input.taskId!, "{taskId}", false); let body: any; - body = JSON.stringify({ - ...(input.auditCheckToActionsMapping != null && { - auditCheckToActionsMapping: se_AuditCheckToActionsMapping(input.auditCheckToActionsMapping, context), - }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.target != null && { target: se_AuditMitigationActionsTaskTarget(input.target, context) }), - }); + body = JSON.stringify( + take(input, { + auditCheckToActionsMapping: (_) => _json(_), + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + target: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7168,18 +7168,16 @@ export const se_StartDetectMitigationActionsTaskCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/detect/mitigationactions/tasks/{taskId}"; resolvedPath = __resolvedPath(resolvedPath, input, "taskId", () => input.taskId!, "{taskId}", false); let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_DetectMitigationActionsToExecuteList(input.actions, context) }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.includeOnlyActiveViolations != null && { - includeOnlyActiveViolations: input.includeOnlyActiveViolations, - }), - ...(input.includeSuppressedAlerts != null && { includeSuppressedAlerts: input.includeSuppressedAlerts }), - ...(input.target != null && { target: se_DetectMitigationActionsTaskTarget(input.target, context) }), - ...(input.violationEventOccurrenceRange != null && { - violationEventOccurrenceRange: se_ViolationEventOccurrenceRange(input.violationEventOccurrenceRange, context), - }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => _json(_), + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + includeOnlyActiveViolations: [], + includeSuppressedAlerts: [], + target: (_) => _json(_), + violationEventOccurrenceRange: (_) => se_ViolationEventOccurrenceRange(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7204,11 +7202,11 @@ export const se_StartOnDemandAuditTaskCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/tasks"; let body: any; - body = JSON.stringify({ - ...(input.targetCheckNames != null && { - targetCheckNames: se_TargetAuditCheckNames(input.targetCheckNames, context), - }), - }); + body = JSON.stringify( + take(input, { + targetCheckNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7234,12 +7232,14 @@ export const se_StartThingRegistrationTaskCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/thing-registration-tasks"; let body: any; - body = JSON.stringify({ - ...(input.inputFileBucket != null && { inputFileBucket: input.inputFileBucket }), - ...(input.inputFileKey != null && { inputFileKey: input.inputFileKey }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.templateBody != null && { templateBody: input.templateBody }), - }); + body = JSON.stringify( + take(input, { + inputFileBucket: [], + inputFileKey: [], + roleArn: [], + templateBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7288,10 +7288,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7319,13 +7321,15 @@ export const se_TestAuthorizationCommand = async ( clientId: [, input.clientId!], }); let body: any; - body = JSON.stringify({ - ...(input.authInfos != null && { authInfos: se_AuthInfos(input.authInfos, context) }), - ...(input.cognitoIdentityPoolId != null && { cognitoIdentityPoolId: input.cognitoIdentityPoolId }), - ...(input.policyNamesToAdd != null && { policyNamesToAdd: se_PolicyNames(input.policyNamesToAdd, context) }), - ...(input.policyNamesToSkip != null && { policyNamesToSkip: se_PolicyNames(input.policyNamesToSkip, context) }), - ...(input.principal != null && { principal: input.principal }), - }); + body = JSON.stringify( + take(input, { + authInfos: (_) => _json(_), + cognitoIdentityPoolId: [], + policyNamesToAdd: (_) => _json(_), + policyNamesToSkip: (_) => _json(_), + principal: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7360,13 +7364,15 @@ export const se_TestInvokeAuthorizerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.httpContext != null && { httpContext: se_HttpContext(input.httpContext, context) }), - ...(input.mqttContext != null && { mqttContext: se_MqttContext(input.mqttContext, context) }), - ...(input.tlsContext != null && { tlsContext: se_TlsContext(input.tlsContext, context) }), - ...(input.token != null && { token: input.token }), - ...(input.tokenSignature != null && { tokenSignature: input.tokenSignature }), - }); + body = JSON.stringify( + take(input, { + httpContext: (_) => _json(_), + mqttContext: (_) => se_MqttContext(_, context), + tlsContext: (_) => _json(_), + token: [], + tokenSignature: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7403,9 +7409,11 @@ export const se_TransferCertificateCommand = async ( targetAwsAccount: [, __expectNonNull(input.targetAwsAccount!, `targetAwsAccount`)], }); let body: any; - body = JSON.stringify({ - ...(input.transferMessage != null && { transferMessage: input.transferMessage }), - }); + body = JSON.stringify( + take(input, { + transferMessage: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7431,10 +7439,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untag"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + tagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7459,18 +7469,13 @@ export const se_UpdateAccountAuditConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/configuration"; let body: any; - body = JSON.stringify({ - ...(input.auditCheckConfigurations != null && { - auditCheckConfigurations: se_AuditCheckConfigurations(input.auditCheckConfigurations, context), - }), - ...(input.auditNotificationTargetConfigurations != null && { - auditNotificationTargetConfigurations: se_AuditNotificationTargetConfigurations( - input.auditNotificationTargetConfigurations, - context - ), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + auditCheckConfigurations: (_) => _json(_), + auditNotificationTargetConfigurations: (_) => _json(_), + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7496,15 +7501,15 @@ export const se_UpdateAuditSuppressionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/audit/suppressions/update"; let body: any; - body = JSON.stringify({ - ...(input.checkName != null && { checkName: input.checkName }), - ...(input.description != null && { description: input.description }), - ...(input.expirationDate != null && { expirationDate: Math.round(input.expirationDate.getTime() / 1000) }), - ...(input.resourceIdentifier != null && { - resourceIdentifier: se_ResourceIdentifier(input.resourceIdentifier, context), - }), - ...(input.suppressIndefinitely != null && { suppressIndefinitely: input.suppressIndefinitely }), - }); + body = JSON.stringify( + take(input, { + checkName: [], + description: [], + expirationDate: (_) => Math.round(_.getTime() / 1000), + resourceIdentifier: (_) => _json(_), + suppressIndefinitely: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7538,15 +7543,15 @@ export const se_UpdateAuthorizerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.authorizerFunctionArn != null && { authorizerFunctionArn: input.authorizerFunctionArn }), - ...(input.enableCachingForHttp != null && { enableCachingForHttp: input.enableCachingForHttp }), - ...(input.status != null && { status: input.status }), - ...(input.tokenKeyName != null && { tokenKeyName: input.tokenKeyName }), - ...(input.tokenSigningPublicKeys != null && { - tokenSigningPublicKeys: se_PublicKeyMap(input.tokenSigningPublicKeys, context), - }), - }); + body = JSON.stringify( + take(input, { + authorizerFunctionArn: [], + enableCachingForHttp: [], + status: [], + tokenKeyName: [], + tokenSigningPublicKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7580,12 +7585,12 @@ export const se_UpdateBillingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.billingGroupProperties != null && { - billingGroupProperties: se_BillingGroupProperties(input.billingGroupProperties, context), - }), - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - }); + body = JSON.stringify( + take(input, { + billingGroupProperties: (_) => _json(_), + expectedVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7623,12 +7628,12 @@ export const se_UpdateCACertificateCommand = async ( newAutoRegistrationStatus: [, input.newAutoRegistrationStatus!], }); let body: any; - body = JSON.stringify({ - ...(input.registrationConfig != null && { - registrationConfig: se_RegistrationConfig(input.registrationConfig, context), - }), - ...(input.removeAutoRegistration != null && { removeAutoRegistration: input.removeAutoRegistration }), - }); + body = JSON.stringify( + take(input, { + registrationConfig: (_) => _json(_), + removeAutoRegistration: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7691,9 +7696,11 @@ export const se_UpdateCustomMetricCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-metric/{metricName}"; resolvedPath = __resolvedPath(resolvedPath, input, "metricName", () => input.metricName!, "{metricName}", false); let body: any; - body = JSON.stringify({ - ...(input.displayName != null && { displayName: input.displayName }), - }); + body = JSON.stringify( + take(input, { + displayName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7719,9 +7726,11 @@ export const se_UpdateDimensionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dimensions/{name}"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.stringValues != null && { stringValues: se_DimensionStringValues(input.stringValues, context) }), - }); + body = JSON.stringify( + take(input, { + stringValues: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7756,11 +7765,13 @@ export const se_UpdateDomainConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.authorizerConfig != null && { authorizerConfig: se_AuthorizerConfig(input.authorizerConfig, context) }), - ...(input.domainConfigurationStatus != null && { domainConfigurationStatus: input.domainConfigurationStatus }), - ...(input.removeAuthorizerConfig != null && { removeAuthorizerConfig: input.removeAuthorizerConfig }), - }); + body = JSON.stringify( + take(input, { + authorizerConfig: (_) => _json(_), + domainConfigurationStatus: [], + removeAuthorizerConfig: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7794,15 +7805,15 @@ export const se_UpdateDynamicThingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - ...(input.thingGroupProperties != null && { - thingGroupProperties: se_ThingGroupProperties(input.thingGroupProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + expectedVersion: [], + indexName: [], + queryString: [], + queryVersion: [], + thingGroupProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7827,11 +7838,11 @@ export const se_UpdateEventConfigurationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/event-configurations"; let body: any; - body = JSON.stringify({ - ...(input.eventConfigurations != null && { - eventConfigurations: se_EventConfigurations(input.eventConfigurations, context), - }), - }); + body = JSON.stringify( + take(input, { + eventConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7858,17 +7869,19 @@ export const se_UpdateFleetMetricCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/fleet-metric/{metricName}"; resolvedPath = __resolvedPath(resolvedPath, input, "metricName", () => input.metricName!, "{metricName}", false); let body: any; - body = JSON.stringify({ - ...(input.aggregationField != null && { aggregationField: input.aggregationField }), - ...(input.aggregationType != null && { aggregationType: se_AggregationType(input.aggregationType, context) }), - ...(input.description != null && { description: input.description }), - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - ...(input.indexName != null && { indexName: input.indexName }), - ...(input.period != null && { period: input.period }), - ...(input.queryString != null && { queryString: input.queryString }), - ...(input.queryVersion != null && { queryVersion: input.queryVersion }), - ...(input.unit != null && { unit: input.unit }), - }); + body = JSON.stringify( + take(input, { + aggregationField: [], + aggregationType: (_) => _json(_), + description: [], + expectedVersion: [], + indexName: [], + period: [], + queryString: [], + queryVersion: [], + unit: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7893,17 +7906,12 @@ export const se_UpdateIndexingConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/indexing/config"; let body: any; - body = JSON.stringify({ - ...(input.thingGroupIndexingConfiguration != null && { - thingGroupIndexingConfiguration: se_ThingGroupIndexingConfiguration( - input.thingGroupIndexingConfiguration, - context - ), - }), - ...(input.thingIndexingConfiguration != null && { - thingIndexingConfiguration: se_ThingIndexingConfiguration(input.thingIndexingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + thingGroupIndexingConfiguration: (_) => _json(_), + thingIndexingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7932,20 +7940,16 @@ export const se_UpdateJobCommand = async ( namespaceId: [, input.namespaceId!], }); let body: any; - body = JSON.stringify({ - ...(input.abortConfig != null && { abortConfig: se_AbortConfig(input.abortConfig, context) }), - ...(input.description != null && { description: input.description }), - ...(input.jobExecutionsRetryConfig != null && { - jobExecutionsRetryConfig: se_JobExecutionsRetryConfig(input.jobExecutionsRetryConfig, context), - }), - ...(input.jobExecutionsRolloutConfig != null && { - jobExecutionsRolloutConfig: se_JobExecutionsRolloutConfig(input.jobExecutionsRolloutConfig, context), - }), - ...(input.presignedUrlConfig != null && { - presignedUrlConfig: se_PresignedUrlConfig(input.presignedUrlConfig, context), - }), - ...(input.timeoutConfig != null && { timeoutConfig: se_TimeoutConfig(input.timeoutConfig, context) }), - }); + body = JSON.stringify( + take(input, { + abortConfig: (_) => se_AbortConfig(_, context), + description: [], + jobExecutionsRetryConfig: (_) => _json(_), + jobExecutionsRolloutConfig: (_) => se_JobExecutionsRolloutConfig(_, context), + presignedUrlConfig: (_) => _json(_), + timeoutConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -7973,10 +7977,12 @@ export const se_UpdateMitigationActionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/mitigationactions/actions/{actionName}"; resolvedPath = __resolvedPath(resolvedPath, input, "actionName", () => input.actionName!, "{actionName}", false); let body: any; - body = JSON.stringify({ - ...(input.actionParams != null && { actionParams: se_MitigationActionParams(input.actionParams, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + actionParams: (_) => _json(_), + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8010,16 +8016,16 @@ export const se_UpdateProvisioningTemplateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.defaultVersionId != null && { defaultVersionId: input.defaultVersionId }), - ...(input.description != null && { description: input.description }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.preProvisioningHook != null && { - preProvisioningHook: se_ProvisioningHook(input.preProvisioningHook, context), - }), - ...(input.provisioningRoleArn != null && { provisioningRoleArn: input.provisioningRoleArn }), - ...(input.removePreProvisioningHook != null && { removePreProvisioningHook: input.removePreProvisioningHook }), - }); + body = JSON.stringify( + take(input, { + defaultVersionId: [], + description: [], + enabled: [], + preProvisioningHook: (_) => _json(_), + provisioningRoleArn: [], + removePreProvisioningHook: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8046,10 +8052,12 @@ export const se_UpdateRoleAliasCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/role-aliases/{roleAlias}"; resolvedPath = __resolvedPath(resolvedPath, input, "roleAlias", () => input.roleAlias!, "{roleAlias}", false); let body: any; - body = JSON.stringify({ - ...(input.credentialDurationSeconds != null && { credentialDurationSeconds: input.credentialDurationSeconds }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + credentialDurationSeconds: [], + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8084,14 +8092,14 @@ export const se_UpdateScheduledAuditCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.dayOfMonth != null && { dayOfMonth: input.dayOfMonth }), - ...(input.dayOfWeek != null && { dayOfWeek: input.dayOfWeek }), - ...(input.frequency != null && { frequency: input.frequency }), - ...(input.targetCheckNames != null && { - targetCheckNames: se_TargetAuditCheckNames(input.targetCheckNames, context), - }), - }); + body = JSON.stringify( + take(input, { + dayOfMonth: [], + dayOfWeek: [], + frequency: [], + targetCheckNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8128,22 +8136,18 @@ export const se_UpdateSecurityProfileCommand = async ( expectedVersion: [() => input.expectedVersion !== void 0, () => input.expectedVersion!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.additionalMetricsToRetain != null && { - additionalMetricsToRetain: se_AdditionalMetricsToRetainList(input.additionalMetricsToRetain, context), - }), - ...(input.additionalMetricsToRetainV2 != null && { - additionalMetricsToRetainV2: se_AdditionalMetricsToRetainV2List(input.additionalMetricsToRetainV2, context), - }), - ...(input.alertTargets != null && { alertTargets: se_AlertTargets(input.alertTargets, context) }), - ...(input.behaviors != null && { behaviors: se_Behaviors(input.behaviors, context) }), - ...(input.deleteAdditionalMetricsToRetain != null && { - deleteAdditionalMetricsToRetain: input.deleteAdditionalMetricsToRetain, - }), - ...(input.deleteAlertTargets != null && { deleteAlertTargets: input.deleteAlertTargets }), - ...(input.deleteBehaviors != null && { deleteBehaviors: input.deleteBehaviors }), - ...(input.securityProfileDescription != null && { securityProfileDescription: input.securityProfileDescription }), - }); + body = JSON.stringify( + take(input, { + additionalMetricsToRetain: (_) => _json(_), + additionalMetricsToRetainV2: (_) => _json(_), + alertTargets: (_) => _json(_), + behaviors: (_) => se_Behaviors(_, context), + deleteAdditionalMetricsToRetain: [], + deleteAlertTargets: [], + deleteBehaviors: [], + securityProfileDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8170,11 +8174,13 @@ export const se_UpdateStreamCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/streams/{streamId}"; resolvedPath = __resolvedPath(resolvedPath, input, "streamId", () => input.streamId!, "{streamId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.files != null && { files: se_StreamFiles(input.files, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + description: [], + files: (_) => _json(_), + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8200,12 +8206,14 @@ export const se_UpdateThingCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/things/{thingName}"; resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName!, "{thingName}", false); let body: any; - body = JSON.stringify({ - ...(input.attributePayload != null && { attributePayload: se_AttributePayload(input.attributePayload, context) }), - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - ...(input.removeThingType != null && { removeThingType: input.removeThingType }), - ...(input.thingTypeName != null && { thingTypeName: input.thingTypeName }), - }); + body = JSON.stringify( + take(input, { + attributePayload: (_) => _json(_), + expectedVersion: [], + removeThingType: [], + thingTypeName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8239,12 +8247,12 @@ export const se_UpdateThingGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.expectedVersion != null && { expectedVersion: input.expectedVersion }), - ...(input.thingGroupProperties != null && { - thingGroupProperties: se_ThingGroupProperties(input.thingGroupProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + expectedVersion: [], + thingGroupProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8270,14 +8278,14 @@ export const se_UpdateThingGroupsForThingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/thing-groups/updateThingGroupsForThing"; let body: any; - body = JSON.stringify({ - ...(input.overrideDynamicGroups != null && { overrideDynamicGroups: input.overrideDynamicGroups }), - ...(input.thingGroupsToAdd != null && { thingGroupsToAdd: se_ThingGroupList(input.thingGroupsToAdd, context) }), - ...(input.thingGroupsToRemove != null && { - thingGroupsToRemove: se_ThingGroupList(input.thingGroupsToRemove, context), - }), - ...(input.thingName != null && { thingName: input.thingName }), - }); + body = JSON.stringify( + take(input, { + overrideDynamicGroups: [], + thingGroupsToAdd: (_) => _json(_), + thingGroupsToRemove: (_) => _json(_), + thingName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8302,10 +8310,12 @@ export const se_UpdateTopicRuleDestinationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/destinations"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + arn: [], + status: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8331,9 +8341,11 @@ export const se_ValidateSecurityProfileBehaviorsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/security-profile-behaviors/validate"; let body: any; - body = JSON.stringify({ - ...(input.behaviors != null && { behaviors: se_Behaviors(input.behaviors, context) }), - }); + body = JSON.stringify( + take(input, { + behaviors: (_) => se_Behaviors(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -8398,10 +8410,9 @@ const de_AcceptCertificateTransferCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8451,10 +8462,9 @@ const de_AddThingToBillingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8504,10 +8514,9 @@ const de_AddThingToThingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8527,15 +8536,12 @@ export const de_AssociateTargetsWithJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + description: __expectString, + jobArn: __expectString, + jobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8569,10 +8575,9 @@ const de_AssociateTargetsWithJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8631,10 +8636,9 @@ const de_AttachPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8693,10 +8697,9 @@ const de_AttachPrincipalPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8752,10 +8755,9 @@ const de_AttachSecurityProfileCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8811,10 +8813,9 @@ const de_AttachThingPrincipalCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8864,10 +8865,9 @@ const de_CancelAuditMitigationActionsTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8917,10 +8917,9 @@ const de_CancelAuditTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8979,10 +8978,9 @@ const de_CancelCertificateTransferCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9032,10 +9030,9 @@ const de_CancelDetectMitigationActionsTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9055,15 +9052,12 @@ export const de_CancelJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + description: __expectString, + jobArn: __expectString, + jobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9097,10 +9091,9 @@ const de_CancelJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9156,10 +9149,9 @@ const de_CancelJobExecutionCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9215,10 +9207,9 @@ const de_ClearDefaultAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9271,10 +9262,9 @@ const de_ConfirmTopicRuleDestinationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9327,10 +9317,9 @@ const de_CreateAuditSuppressionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9350,12 +9339,11 @@ export const de_CreateAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerArn != null) { - contents.authorizerArn = __expectString(data.authorizerArn); - } - if (data.authorizerName != null) { - contents.authorizerName = __expectString(data.authorizerName); - } + const doc = take(data, { + authorizerArn: __expectString, + authorizerName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9395,10 +9383,9 @@ const de_CreateAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9418,15 +9405,12 @@ export const de_CreateBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.billingGroupArn != null) { - contents.billingGroupArn = __expectString(data.billingGroupArn); - } - if (data.billingGroupId != null) { - contents.billingGroupId = __expectString(data.billingGroupId); - } - if (data.billingGroupName != null) { - contents.billingGroupName = __expectString(data.billingGroupName); - } + const doc = take(data, { + billingGroupArn: __expectString, + billingGroupId: __expectString, + billingGroupName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9457,10 +9441,9 @@ const de_CreateBillingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9480,15 +9463,12 @@ export const de_CreateCertificateFromCsrCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateId != null) { - contents.certificateId = __expectString(data.certificateId); - } - if (data.certificatePem != null) { - contents.certificatePem = __expectString(data.certificatePem); - } + const doc = take(data, { + certificateArn: __expectString, + certificateId: __expectString, + certificatePem: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9522,10 +9502,9 @@ const de_CreateCertificateFromCsrCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9545,12 +9524,11 @@ export const de_CreateCustomMetricCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.metricArn != null) { - contents.metricArn = __expectString(data.metricArn); - } - if (data.metricName != null) { - contents.metricName = __expectString(data.metricName); - } + const doc = take(data, { + metricArn: __expectString, + metricName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9584,10 +9562,9 @@ const de_CreateCustomMetricCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9607,12 +9584,11 @@ export const de_CreateDimensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9646,10 +9622,9 @@ const de_CreateDimensionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9669,12 +9644,11 @@ export const de_CreateDomainConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainConfigurationArn != null) { - contents.domainConfigurationArn = __expectString(data.domainConfigurationArn); - } - if (data.domainConfigurationName != null) { - contents.domainConfigurationName = __expectString(data.domainConfigurationName); - } + const doc = take(data, { + domainConfigurationArn: __expectString, + domainConfigurationName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9717,10 +9691,9 @@ const de_CreateDomainConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9740,24 +9713,15 @@ export const de_CreateDynamicThingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.indexName != null) { - contents.indexName = __expectString(data.indexName); - } - if (data.queryString != null) { - contents.queryString = __expectString(data.queryString); - } - if (data.queryVersion != null) { - contents.queryVersion = __expectString(data.queryVersion); - } - if (data.thingGroupArn != null) { - contents.thingGroupArn = __expectString(data.thingGroupArn); - } - if (data.thingGroupId != null) { - contents.thingGroupId = __expectString(data.thingGroupId); - } - if (data.thingGroupName != null) { - contents.thingGroupName = __expectString(data.thingGroupName); - } + const doc = take(data, { + indexName: __expectString, + queryString: __expectString, + queryVersion: __expectString, + thingGroupArn: __expectString, + thingGroupId: __expectString, + thingGroupName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9797,10 +9761,9 @@ const de_CreateDynamicThingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9820,12 +9783,11 @@ export const de_CreateFleetMetricCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.metricArn != null) { - contents.metricArn = __expectString(data.metricArn); - } - if (data.metricName != null) { - contents.metricName = __expectString(data.metricName); - } + const doc = take(data, { + metricArn: __expectString, + metricName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9877,10 +9839,9 @@ const de_CreateFleetMetricCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9900,15 +9861,12 @@ export const de_CreateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + description: __expectString, + jobArn: __expectString, + jobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -9945,10 +9903,9 @@ const de_CreateJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9968,12 +9925,11 @@ export const de_CreateJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplateArn != null) { - contents.jobTemplateArn = __expectString(data.jobTemplateArn); - } - if (data.jobTemplateId != null) { - contents.jobTemplateId = __expectString(data.jobTemplateId); - } + const doc = take(data, { + jobTemplateArn: __expectString, + jobTemplateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10010,10 +9966,9 @@ const de_CreateJobTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10033,18 +9988,13 @@ export const de_CreateKeysAndCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateId != null) { - contents.certificateId = __expectString(data.certificateId); - } - if (data.certificatePem != null) { - contents.certificatePem = __expectString(data.certificatePem); - } - if (data.keyPair != null) { - contents.keyPair = de_KeyPair(data.keyPair, context); - } + const doc = take(data, { + certificateArn: __expectString, + certificateId: __expectString, + certificatePem: __expectString, + keyPair: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -10078,10 +10028,9 @@ const de_CreateKeysAndCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10101,12 +10050,11 @@ export const de_CreateMitigationActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionArn != null) { - contents.actionArn = __expectString(data.actionArn); - } - if (data.actionId != null) { - contents.actionId = __expectString(data.actionId); - } + const doc = take(data, { + actionArn: __expectString, + actionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10140,10 +10088,9 @@ const de_CreateMitigationActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10163,21 +10110,14 @@ export const de_CreateOTAUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.awsIotJobArn != null) { - contents.awsIotJobArn = __expectString(data.awsIotJobArn); - } - if (data.awsIotJobId != null) { - contents.awsIotJobId = __expectString(data.awsIotJobId); - } - if (data.otaUpdateArn != null) { - contents.otaUpdateArn = __expectString(data.otaUpdateArn); - } - if (data.otaUpdateId != null) { - contents.otaUpdateId = __expectString(data.otaUpdateId); - } - if (data.otaUpdateStatus != null) { - contents.otaUpdateStatus = __expectString(data.otaUpdateStatus); - } + const doc = take(data, { + awsIotJobArn: __expectString, + awsIotJobId: __expectString, + otaUpdateArn: __expectString, + otaUpdateId: __expectString, + otaUpdateStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10220,10 +10160,9 @@ const de_CreateOTAUpdateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10243,18 +10182,13 @@ export const de_CreatePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policyArn != null) { - contents.policyArn = __expectString(data.policyArn); - } - if (data.policyDocument != null) { - contents.policyDocument = __expectString(data.policyDocument); - } - if (data.policyName != null) { - contents.policyName = __expectString(data.policyName); - } - if (data.policyVersionId != null) { - contents.policyVersionId = __expectString(data.policyVersionId); - } + const doc = take(data, { + policyArn: __expectString, + policyDocument: __expectString, + policyName: __expectString, + policyVersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10294,10 +10228,9 @@ const de_CreatePolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10317,18 +10250,13 @@ export const de_CreatePolicyVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.isDefaultVersion != null) { - contents.isDefaultVersion = __expectBoolean(data.isDefaultVersion); - } - if (data.policyArn != null) { - contents.policyArn = __expectString(data.policyArn); - } - if (data.policyDocument != null) { - contents.policyDocument = __expectString(data.policyDocument); - } - if (data.policyVersionId != null) { - contents.policyVersionId = __expectString(data.policyVersionId); - } + const doc = take(data, { + isDefaultVersion: __expectBoolean, + policyArn: __expectString, + policyDocument: __expectString, + policyVersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10371,10 +10299,9 @@ const de_CreatePolicyVersionCommandError = async ( throw await de_VersionsLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10394,18 +10321,13 @@ export const de_CreateProvisioningClaimCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateId != null) { - contents.certificateId = __expectString(data.certificateId); - } - if (data.certificatePem != null) { - contents.certificatePem = __expectString(data.certificatePem); - } - if (data.expiration != null) { - contents.expiration = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expiration))); - } - if (data.keyPair != null) { - contents.keyPair = de_KeyPair(data.keyPair, context); - } + const doc = take(data, { + certificateId: __expectString, + certificatePem: __expectString, + expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + keyPair: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -10442,10 +10364,9 @@ const de_CreateProvisioningClaimCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10465,15 +10386,12 @@ export const de_CreateProvisioningTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.defaultVersionId != null) { - contents.defaultVersionId = __expectInt32(data.defaultVersionId); - } - if (data.templateArn != null) { - contents.templateArn = __expectString(data.templateArn); - } - if (data.templateName != null) { - contents.templateName = __expectString(data.templateName); - } + const doc = take(data, { + defaultVersionId: __expectInt32, + templateArn: __expectString, + templateName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10510,10 +10428,9 @@ const de_CreateProvisioningTemplateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10533,18 +10450,13 @@ export const de_CreateProvisioningTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.isDefaultVersion != null) { - contents.isDefaultVersion = __expectBoolean(data.isDefaultVersion); - } - if (data.templateArn != null) { - contents.templateArn = __expectString(data.templateArn); - } - if (data.templateName != null) { - contents.templateName = __expectString(data.templateName); - } - if (data.versionId != null) { - contents.versionId = __expectInt32(data.versionId); - } + const doc = take(data, { + isDefaultVersion: __expectBoolean, + templateArn: __expectString, + templateName: __expectString, + versionId: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -10584,10 +10496,9 @@ const de_CreateProvisioningTemplateVersionCommandError = async ( throw await de_VersionsLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10607,12 +10518,11 @@ export const de_CreateRoleAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.roleAlias != null) { - contents.roleAlias = __expectString(data.roleAlias); - } - if (data.roleAliasArn != null) { - contents.roleAliasArn = __expectString(data.roleAliasArn); - } + const doc = take(data, { + roleAlias: __expectString, + roleAliasArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10652,10 +10562,9 @@ const de_CreateRoleAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10675,9 +10584,10 @@ export const de_CreateScheduledAuditCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.scheduledAuditArn != null) { - contents.scheduledAuditArn = __expectString(data.scheduledAuditArn); - } + const doc = take(data, { + scheduledAuditArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10711,10 +10621,9 @@ const de_CreateScheduledAuditCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10734,12 +10643,11 @@ export const de_CreateSecurityProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.securityProfileArn != null) { - contents.securityProfileArn = __expectString(data.securityProfileArn); - } - if (data.securityProfileName != null) { - contents.securityProfileName = __expectString(data.securityProfileName); - } + const doc = take(data, { + securityProfileArn: __expectString, + securityProfileName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10770,10 +10678,9 @@ const de_CreateSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10793,18 +10700,13 @@ export const de_CreateStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.streamArn != null) { - contents.streamArn = __expectString(data.streamArn); - } - if (data.streamId != null) { - contents.streamId = __expectString(data.streamId); - } - if (data.streamVersion != null) { - contents.streamVersion = __expectInt32(data.streamVersion); - } + const doc = take(data, { + description: __expectString, + streamArn: __expectString, + streamId: __expectString, + streamVersion: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -10847,10 +10749,9 @@ const de_CreateStreamCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10870,15 +10771,12 @@ export const de_CreateThingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.thingArn != null) { - contents.thingArn = __expectString(data.thingArn); - } - if (data.thingId != null) { - contents.thingId = __expectString(data.thingId); - } - if (data.thingName != null) { - contents.thingName = __expectString(data.thingName); - } + const doc = take(data, { + thingArn: __expectString, + thingId: __expectString, + thingName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10918,10 +10816,9 @@ const de_CreateThingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10941,15 +10838,12 @@ export const de_CreateThingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.thingGroupArn != null) { - contents.thingGroupArn = __expectString(data.thingGroupArn); - } - if (data.thingGroupId != null) { - contents.thingGroupId = __expectString(data.thingGroupId); - } - if (data.thingGroupName != null) { - contents.thingGroupName = __expectString(data.thingGroupName); - } + const doc = take(data, { + thingGroupArn: __expectString, + thingGroupId: __expectString, + thingGroupName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -10980,10 +10874,9 @@ const de_CreateThingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11003,15 +10896,12 @@ export const de_CreateThingTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.thingTypeArn != null) { - contents.thingTypeArn = __expectString(data.thingTypeArn); - } - if (data.thingTypeId != null) { - contents.thingTypeId = __expectString(data.thingTypeId); - } - if (data.thingTypeName != null) { - contents.thingTypeName = __expectString(data.thingTypeName); - } + const doc = take(data, { + thingTypeArn: __expectString, + thingTypeId: __expectString, + thingTypeName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -11048,10 +10938,9 @@ const de_CreateThingTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11107,10 +10996,9 @@ const de_CreateTopicRuleCommandError = async ( throw await de_SqlParseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11130,9 +11018,10 @@ export const de_CreateTopicRuleDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.topicRuleDestination != null) { - contents.topicRuleDestination = de_TopicRuleDestination(data.topicRuleDestination, context); - } + const doc = take(data, { + topicRuleDestination: (_) => de_TopicRuleDestination(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -11166,10 +11055,9 @@ const de_CreateTopicRuleDestinationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11219,10 +11107,9 @@ const de_DeleteAccountAuditConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11269,10 +11156,9 @@ const de_DeleteAuditSuppressionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11331,10 +11217,9 @@ const de_DeleteAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11384,10 +11269,9 @@ const de_DeleteBillingGroupCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11446,10 +11330,9 @@ const de_DeleteCACertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11511,10 +11394,9 @@ const de_DeleteCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11561,10 +11443,9 @@ const de_DeleteCustomMetricCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11611,10 +11492,9 @@ const de_DeleteDimensionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11670,10 +11550,9 @@ const de_DeleteDomainConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11723,10 +11602,9 @@ const de_DeleteDynamicThingGroupCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11782,10 +11660,9 @@ const de_DeleteFleetMetricCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11841,10 +11718,9 @@ const de_DeleteJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11897,10 +11773,9 @@ const de_DeleteJobExecutionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11950,10 +11825,9 @@ const de_DeleteJobTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12000,10 +11874,9 @@ const de_DeleteMitigationActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12062,10 +11935,9 @@ const de_DeleteOTAUpdateCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12124,10 +11996,9 @@ const de_DeletePolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12186,10 +12057,9 @@ const de_DeletePolicyVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12248,10 +12118,9 @@ const de_DeleteProvisioningTemplateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12310,10 +12179,9 @@ const de_DeleteProvisioningTemplateVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12366,10 +12234,9 @@ const de_DeleteRegistrationCodeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12428,10 +12295,9 @@ const de_DeleteRoleAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12481,10 +12347,9 @@ const de_DeleteScheduledAuditCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12534,10 +12399,9 @@ const de_DeleteSecurityProfileCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12596,10 +12460,9 @@ const de_DeleteStreamCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12658,10 +12521,9 @@ const de_DeleteThingCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12711,10 +12573,9 @@ const de_DeleteThingGroupCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12770,10 +12631,9 @@ const de_DeleteThingTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12826,10 +12686,9 @@ const de_DeleteTopicRuleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12882,10 +12741,9 @@ const de_DeleteTopicRuleDestinationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12932,10 +12790,9 @@ const de_DeleteV2LoggingLevelCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12991,10 +12848,9 @@ const de_DeprecateThingTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13014,18 +12870,12 @@ export const de_DescribeAccountAuditConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.auditCheckConfigurations != null) { - contents.auditCheckConfigurations = de_AuditCheckConfigurations(data.auditCheckConfigurations, context); - } - if (data.auditNotificationTargetConfigurations != null) { - contents.auditNotificationTargetConfigurations = de_AuditNotificationTargetConfigurations( - data.auditNotificationTargetConfigurations, - context - ); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + auditCheckConfigurations: _json, + auditNotificationTargetConfigurations: _json, + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13050,10 +12900,9 @@ const de_DescribeAccountAuditConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13073,9 +12922,10 @@ export const de_DescribeAuditFindingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.finding != null) { - contents.finding = de_AuditFinding(data.finding, context); - } + const doc = take(data, { + finding: (_) => de_AuditFinding(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13106,10 +12956,9 @@ const de_DescribeAuditFindingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13129,27 +12978,16 @@ export const de_DescribeAuditMitigationActionsTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionsDefinition != null) { - contents.actionsDefinition = de_MitigationActionList(data.actionsDefinition, context); - } - if (data.auditCheckToActionsMapping != null) { - contents.auditCheckToActionsMapping = de_AuditCheckToActionsMapping(data.auditCheckToActionsMapping, context); - } - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.target != null) { - contents.target = de_AuditMitigationActionsTaskTarget(data.target, context); - } - if (data.taskStatistics != null) { - contents.taskStatistics = de_AuditMitigationActionsTaskStatistics(data.taskStatistics, context); - } - if (data.taskStatus != null) { - contents.taskStatus = __expectString(data.taskStatus); - } + const doc = take(data, { + actionsDefinition: _json, + auditCheckToActionsMapping: _json, + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + target: _json, + taskStatistics: _json, + taskStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13180,10 +13018,9 @@ const de_DescribeAuditMitigationActionsTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13203,21 +13040,14 @@ export const de_DescribeAuditSuppressionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checkName != null) { - contents.checkName = __expectString(data.checkName); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.expirationDate != null) { - contents.expirationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.expirationDate))); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = de_ResourceIdentifier(data.resourceIdentifier, context); - } - if (data.suppressIndefinitely != null) { - contents.suppressIndefinitely = __expectBoolean(data.suppressIndefinitely); - } + const doc = take(data, { + checkName: __expectString, + description: __expectString, + expirationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: _json, + suppressIndefinitely: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -13248,10 +13078,9 @@ const de_DescribeAuditSuppressionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13271,24 +13100,15 @@ export const de_DescribeAuditTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.auditDetails != null) { - contents.auditDetails = de_AuditDetails(data.auditDetails, context); - } - if (data.scheduledAuditName != null) { - contents.scheduledAuditName = __expectString(data.scheduledAuditName); - } - if (data.taskStartTime != null) { - contents.taskStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.taskStartTime))); - } - if (data.taskStatistics != null) { - contents.taskStatistics = de_TaskStatistics(data.taskStatistics, context); - } - if (data.taskStatus != null) { - contents.taskStatus = __expectString(data.taskStatus); - } - if (data.taskType != null) { - contents.taskType = __expectString(data.taskType); - } + const doc = take(data, { + auditDetails: _json, + scheduledAuditName: __expectString, + taskStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + taskStatistics: _json, + taskStatus: __expectString, + taskType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13319,10 +13139,9 @@ const de_DescribeAuditTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13342,9 +13161,10 @@ export const de_DescribeAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerDescription != null) { - contents.authorizerDescription = de_AuthorizerDescription(data.authorizerDescription, context); - } + const doc = take(data, { + authorizerDescription: (_) => de_AuthorizerDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13381,10 +13201,9 @@ const de_DescribeAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13404,24 +13223,15 @@ export const de_DescribeBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.billingGroupArn != null) { - contents.billingGroupArn = __expectString(data.billingGroupArn); - } - if (data.billingGroupId != null) { - contents.billingGroupId = __expectString(data.billingGroupId); - } - if (data.billingGroupMetadata != null) { - contents.billingGroupMetadata = de_BillingGroupMetadata(data.billingGroupMetadata, context); - } - if (data.billingGroupName != null) { - contents.billingGroupName = __expectString(data.billingGroupName); - } - if (data.billingGroupProperties != null) { - contents.billingGroupProperties = de_BillingGroupProperties(data.billingGroupProperties, context); - } - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + billingGroupArn: __expectString, + billingGroupId: __expectString, + billingGroupMetadata: (_) => de_BillingGroupMetadata(_, context), + billingGroupName: __expectString, + billingGroupProperties: _json, + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -13452,10 +13262,9 @@ const de_DescribeBillingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13475,12 +13284,11 @@ export const de_DescribeCACertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateDescription != null) { - contents.certificateDescription = de_CACertificateDescription(data.certificateDescription, context); - } - if (data.registrationConfig != null) { - contents.registrationConfig = de_RegistrationConfig(data.registrationConfig, context); - } + const doc = take(data, { + certificateDescription: (_) => de_CACertificateDescription(_, context), + registrationConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -13517,10 +13325,9 @@ const de_DescribeCACertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13540,9 +13347,10 @@ export const de_DescribeCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateDescription != null) { - contents.certificateDescription = de_CertificateDescription(data.certificateDescription, context); - } + const doc = take(data, { + certificateDescription: (_) => de_CertificateDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13579,10 +13387,9 @@ const de_DescribeCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13602,24 +13409,15 @@ export const de_DescribeCustomMetricCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.metricArn != null) { - contents.metricArn = __expectString(data.metricArn); - } - if (data.metricName != null) { - contents.metricName = __expectString(data.metricName); - } - if (data.metricType != null) { - contents.metricType = __expectString(data.metricType); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricArn: __expectString, + metricName: __expectString, + metricType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13650,10 +13448,9 @@ const de_DescribeCustomMetricCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13673,9 +13470,10 @@ export const de_DescribeDefaultAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerDescription != null) { - contents.authorizerDescription = de_AuthorizerDescription(data.authorizerDescription, context); - } + const doc = take(data, { + authorizerDescription: (_) => de_AuthorizerDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13712,10 +13510,9 @@ const de_DescribeDefaultAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13735,9 +13532,10 @@ export const de_DescribeDetectMitigationActionsTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskSummary != null) { - contents.taskSummary = de_DetectMitigationActionsTaskSummary(data.taskSummary, context); - } + const doc = take(data, { + taskSummary: (_) => de_DetectMitigationActionsTaskSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -13768,10 +13566,9 @@ const de_DescribeDetectMitigationActionsTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13791,24 +13588,15 @@ export const de_DescribeDimensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stringValues != null) { - contents.stringValues = de_DimensionStringValues(data.stringValues, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + arn: __expectString, + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stringValues: _json, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13839,10 +13627,9 @@ const de_DescribeDimensionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13862,33 +13649,18 @@ export const de_DescribeDomainConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerConfig != null) { - contents.authorizerConfig = de_AuthorizerConfig(data.authorizerConfig, context); - } - if (data.domainConfigurationArn != null) { - contents.domainConfigurationArn = __expectString(data.domainConfigurationArn); - } - if (data.domainConfigurationName != null) { - contents.domainConfigurationName = __expectString(data.domainConfigurationName); - } - if (data.domainConfigurationStatus != null) { - contents.domainConfigurationStatus = __expectString(data.domainConfigurationStatus); - } - if (data.domainName != null) { - contents.domainName = __expectString(data.domainName); - } - if (data.domainType != null) { - contents.domainType = __expectString(data.domainType); - } - if (data.lastStatusChangeDate != null) { - contents.lastStatusChangeDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStatusChangeDate))); - } - if (data.serverCertificates != null) { - contents.serverCertificates = de_ServerCertificates(data.serverCertificates, context); - } - if (data.serviceType != null) { - contents.serviceType = __expectString(data.serviceType); - } + const doc = take(data, { + authorizerConfig: _json, + domainConfigurationArn: __expectString, + domainConfigurationName: __expectString, + domainConfigurationStatus: __expectString, + domainName: __expectString, + domainType: __expectString, + lastStatusChangeDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + serverCertificates: _json, + serviceType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13925,10 +13697,9 @@ const de_DescribeDomainConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13948,9 +13719,10 @@ export const de_DescribeEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endpointAddress != null) { - contents.endpointAddress = __expectString(data.endpointAddress); - } + const doc = take(data, { + endpointAddress: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -13981,10 +13753,9 @@ const de_DescribeEndpointCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14004,15 +13775,12 @@ export const de_DescribeEventConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.eventConfigurations != null) { - contents.eventConfigurations = de_EventConfigurations(data.eventConfigurations, context); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventConfigurations: _json, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -14037,10 +13805,9 @@ const de_DescribeEventConfigurationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14060,45 +13827,22 @@ export const de_DescribeFleetMetricCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.aggregationField != null) { - contents.aggregationField = __expectString(data.aggregationField); - } - if (data.aggregationType != null) { - contents.aggregationType = de_AggregationType(data.aggregationType, context); - } - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.indexName != null) { - contents.indexName = __expectString(data.indexName); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.metricArn != null) { - contents.metricArn = __expectString(data.metricArn); - } - if (data.metricName != null) { - contents.metricName = __expectString(data.metricName); - } - if (data.period != null) { - contents.period = __expectInt32(data.period); - } - if (data.queryString != null) { - contents.queryString = __expectString(data.queryString); - } - if (data.queryVersion != null) { - contents.queryVersion = __expectString(data.queryVersion); - } - if (data.unit != null) { - contents.unit = __expectString(data.unit); - } - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + aggregationField: __expectString, + aggregationType: _json, + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + indexName: __expectString, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricArn: __expectString, + metricName: __expectString, + period: __expectInt32, + queryString: __expectString, + queryVersion: __expectString, + unit: __expectString, + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -14135,10 +13879,9 @@ const de_DescribeFleetMetricCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14158,15 +13901,12 @@ export const de_DescribeIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.indexName != null) { - contents.indexName = __expectString(data.indexName); - } - if (data.indexStatus != null) { - contents.indexStatus = __expectString(data.indexStatus); - } - if (data.schema != null) { - contents.schema = __expectString(data.schema); - } + const doc = take(data, { + indexName: __expectString, + indexStatus: __expectString, + schema: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14203,10 +13943,9 @@ const de_DescribeIndexCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14226,12 +13965,11 @@ export const de_DescribeJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.documentSource != null) { - contents.documentSource = __expectString(data.documentSource); - } - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + documentSource: __expectString, + job: (_) => de_Job(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -14262,10 +14000,9 @@ const de_DescribeJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14285,9 +14022,10 @@ export const de_DescribeJobExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.execution != null) { - contents.execution = de_JobExecution(data.execution, context); - } + const doc = take(data, { + execution: (_) => de_JobExecution(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -14318,10 +14056,9 @@ const de_DescribeJobExecutionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14341,42 +14078,21 @@ export const de_DescribeJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.abortConfig != null) { - contents.abortConfig = de_AbortConfig(data.abortConfig, context); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.document != null) { - contents.document = __expectString(data.document); - } - if (data.documentSource != null) { - contents.documentSource = __expectString(data.documentSource); - } - if (data.jobExecutionsRetryConfig != null) { - contents.jobExecutionsRetryConfig = de_JobExecutionsRetryConfig(data.jobExecutionsRetryConfig, context); - } - if (data.jobExecutionsRolloutConfig != null) { - contents.jobExecutionsRolloutConfig = de_JobExecutionsRolloutConfig(data.jobExecutionsRolloutConfig, context); - } - if (data.jobTemplateArn != null) { - contents.jobTemplateArn = __expectString(data.jobTemplateArn); - } - if (data.jobTemplateId != null) { - contents.jobTemplateId = __expectString(data.jobTemplateId); - } - if (data.maintenanceWindows != null) { - contents.maintenanceWindows = de_MaintenanceWindows(data.maintenanceWindows, context); - } - if (data.presignedUrlConfig != null) { - contents.presignedUrlConfig = de_PresignedUrlConfig(data.presignedUrlConfig, context); - } - if (data.timeoutConfig != null) { - contents.timeoutConfig = de_TimeoutConfig(data.timeoutConfig, context); - } + const doc = take(data, { + abortConfig: (_) => de_AbortConfig(_, context), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + document: __expectString, + documentSource: __expectString, + jobExecutionsRetryConfig: _json, + jobExecutionsRolloutConfig: (_) => de_JobExecutionsRolloutConfig(_, context), + jobTemplateArn: __expectString, + jobTemplateId: __expectString, + maintenanceWindows: _json, + presignedUrlConfig: _json, + timeoutConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -14407,10 +14123,9 @@ const de_DescribeJobTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14430,27 +14145,16 @@ export const de_DescribeManagedJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.document != null) { - contents.document = __expectString(data.document); - } - if (data.documentParameters != null) { - contents.documentParameters = de_DocumentParameters(data.documentParameters, context); - } - if (data.environments != null) { - contents.environments = de_Environments(data.environments, context); - } - if (data.templateArn != null) { - contents.templateArn = __expectString(data.templateArn); - } - if (data.templateName != null) { - contents.templateName = __expectString(data.templateName); - } - if (data.templateVersion != null) { - contents.templateVersion = __expectString(data.templateVersion); - } + const doc = take(data, { + description: __expectString, + document: __expectString, + documentParameters: _json, + environments: _json, + templateArn: __expectString, + templateName: __expectString, + templateVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14481,10 +14185,9 @@ const de_DescribeManagedJobTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14504,30 +14207,17 @@ export const de_DescribeMitigationActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionArn != null) { - contents.actionArn = __expectString(data.actionArn); - } - if (data.actionId != null) { - contents.actionId = __expectString(data.actionId); - } - if (data.actionName != null) { - contents.actionName = __expectString(data.actionName); - } - if (data.actionParams != null) { - contents.actionParams = de_MitigationActionParams(data.actionParams, context); - } - if (data.actionType != null) { - contents.actionType = __expectString(data.actionType); - } - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + actionArn: __expectString, + actionId: __expectString, + actionName: __expectString, + actionParams: _json, + actionType: __expectString, + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14558,10 +14248,9 @@ const de_DescribeMitigationActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14581,39 +14270,20 @@ export const de_DescribeProvisioningTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.defaultVersionId != null) { - contents.defaultVersionId = __expectInt32(data.defaultVersionId); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enabled != null) { - contents.enabled = __expectBoolean(data.enabled); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.preProvisioningHook != null) { - contents.preProvisioningHook = de_ProvisioningHook(data.preProvisioningHook, context); - } - if (data.provisioningRoleArn != null) { - contents.provisioningRoleArn = __expectString(data.provisioningRoleArn); - } - if (data.templateArn != null) { - contents.templateArn = __expectString(data.templateArn); - } - if (data.templateBody != null) { - contents.templateBody = __expectString(data.templateBody); - } - if (data.templateName != null) { - contents.templateName = __expectString(data.templateName); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultVersionId: __expectInt32, + description: __expectString, + enabled: __expectBoolean, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + preProvisioningHook: _json, + provisioningRoleArn: __expectString, + templateArn: __expectString, + templateBody: __expectString, + templateName: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14647,10 +14317,9 @@ const de_DescribeProvisioningTemplateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14670,18 +14339,13 @@ export const de_DescribeProvisioningTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.isDefaultVersion != null) { - contents.isDefaultVersion = __expectBoolean(data.isDefaultVersion); - } - if (data.templateBody != null) { - contents.templateBody = __expectString(data.templateBody); - } - if (data.versionId != null) { - contents.versionId = __expectInt32(data.versionId); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + isDefaultVersion: __expectBoolean, + templateBody: __expectString, + versionId: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -14715,10 +14379,9 @@ const de_DescribeProvisioningTemplateVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14738,9 +14401,10 @@ export const de_DescribeRoleAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.roleAliasDescription != null) { - contents.roleAliasDescription = de_RoleAliasDescription(data.roleAliasDescription, context); - } + const doc = take(data, { + roleAliasDescription: (_) => de_RoleAliasDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -14777,10 +14441,9 @@ const de_DescribeRoleAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14800,24 +14463,15 @@ export const de_DescribeScheduledAuditCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dayOfMonth != null) { - contents.dayOfMonth = __expectString(data.dayOfMonth); - } - if (data.dayOfWeek != null) { - contents.dayOfWeek = __expectString(data.dayOfWeek); - } - if (data.frequency != null) { - contents.frequency = __expectString(data.frequency); - } - if (data.scheduledAuditArn != null) { - contents.scheduledAuditArn = __expectString(data.scheduledAuditArn); - } - if (data.scheduledAuditName != null) { - contents.scheduledAuditName = __expectString(data.scheduledAuditName); - } - if (data.targetCheckNames != null) { - contents.targetCheckNames = de_TargetAuditCheckNames(data.targetCheckNames, context); - } + const doc = take(data, { + dayOfMonth: __expectString, + dayOfWeek: __expectString, + frequency: __expectString, + scheduledAuditArn: __expectString, + scheduledAuditName: __expectString, + targetCheckNames: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -14848,10 +14502,9 @@ const de_DescribeScheduledAuditCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14871,39 +14524,19 @@ export const de_DescribeSecurityProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalMetricsToRetain != null) { - contents.additionalMetricsToRetain = de_AdditionalMetricsToRetainList(data.additionalMetricsToRetain, context); - } - if (data.additionalMetricsToRetainV2 != null) { - contents.additionalMetricsToRetainV2 = de_AdditionalMetricsToRetainV2List( - data.additionalMetricsToRetainV2, - context - ); - } - if (data.alertTargets != null) { - contents.alertTargets = de_AlertTargets(data.alertTargets, context); - } - if (data.behaviors != null) { - contents.behaviors = de_Behaviors(data.behaviors, context); - } - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.securityProfileArn != null) { - contents.securityProfileArn = __expectString(data.securityProfileArn); - } - if (data.securityProfileDescription != null) { - contents.securityProfileDescription = __expectString(data.securityProfileDescription); - } - if (data.securityProfileName != null) { - contents.securityProfileName = __expectString(data.securityProfileName); - } - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + additionalMetricsToRetain: _json, + additionalMetricsToRetainV2: _json, + alertTargets: _json, + behaviors: (_) => de_Behaviors(_, context), + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + securityProfileArn: __expectString, + securityProfileDescription: __expectString, + securityProfileName: __expectString, + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -14934,10 +14567,9 @@ const de_DescribeSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14957,9 +14589,10 @@ export const de_DescribeStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamInfo != null) { - contents.streamInfo = de_StreamInfo(data.streamInfo, context); - } + const doc = take(data, { + streamInfo: (_) => de_StreamInfo(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -14996,10 +14629,9 @@ const de_DescribeStreamCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15019,30 +14651,17 @@ export const de_DescribeThingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributes != null) { - contents.attributes = de_Attributes(data.attributes, context); - } - if (data.billingGroupName != null) { - contents.billingGroupName = __expectString(data.billingGroupName); - } - if (data.defaultClientId != null) { - contents.defaultClientId = __expectString(data.defaultClientId); - } - if (data.thingArn != null) { - contents.thingArn = __expectString(data.thingArn); - } - if (data.thingId != null) { - contents.thingId = __expectString(data.thingId); - } - if (data.thingName != null) { - contents.thingName = __expectString(data.thingName); - } - if (data.thingTypeName != null) { - contents.thingTypeName = __expectString(data.thingTypeName); - } - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + attributes: _json, + billingGroupName: __expectString, + defaultClientId: __expectString, + thingArn: __expectString, + thingId: __expectString, + thingName: __expectString, + thingTypeName: __expectString, + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -15079,10 +14698,9 @@ const de_DescribeThingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15102,36 +14720,19 @@ export const de_DescribeThingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.indexName != null) { - contents.indexName = __expectString(data.indexName); - } - if (data.queryString != null) { - contents.queryString = __expectString(data.queryString); - } - if (data.queryVersion != null) { - contents.queryVersion = __expectString(data.queryVersion); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.thingGroupArn != null) { - contents.thingGroupArn = __expectString(data.thingGroupArn); - } - if (data.thingGroupId != null) { - contents.thingGroupId = __expectString(data.thingGroupId); - } - if (data.thingGroupMetadata != null) { - contents.thingGroupMetadata = de_ThingGroupMetadata(data.thingGroupMetadata, context); - } - if (data.thingGroupName != null) { - contents.thingGroupName = __expectString(data.thingGroupName); - } - if (data.thingGroupProperties != null) { - contents.thingGroupProperties = de_ThingGroupProperties(data.thingGroupProperties, context); - } - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + indexName: __expectString, + queryString: __expectString, + queryVersion: __expectString, + status: __expectString, + thingGroupArn: __expectString, + thingGroupId: __expectString, + thingGroupMetadata: (_) => de_ThingGroupMetadata(_, context), + thingGroupName: __expectString, + thingGroupProperties: _json, + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -15162,10 +14763,9 @@ const de_DescribeThingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15185,42 +14785,21 @@ export const de_DescribeThingRegistrationTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.failureCount != null) { - contents.failureCount = __expectInt32(data.failureCount); - } - if (data.inputFileBucket != null) { - contents.inputFileBucket = __expectString(data.inputFileBucket); - } - if (data.inputFileKey != null) { - contents.inputFileKey = __expectString(data.inputFileKey); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.percentageProgress != null) { - contents.percentageProgress = __expectInt32(data.percentageProgress); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.successCount != null) { - contents.successCount = __expectInt32(data.successCount); - } - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } - if (data.templateBody != null) { - contents.templateBody = __expectString(data.templateBody); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCount: __expectInt32, + inputFileBucket: __expectString, + inputFileKey: __expectString, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + percentageProgress: __expectInt32, + roleArn: __expectString, + status: __expectString, + successCount: __expectInt32, + taskId: __expectString, + templateBody: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -15254,10 +14833,9 @@ const de_DescribeThingRegistrationTaskCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15277,21 +14855,14 @@ export const de_DescribeThingTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.thingTypeArn != null) { - contents.thingTypeArn = __expectString(data.thingTypeArn); - } - if (data.thingTypeId != null) { - contents.thingTypeId = __expectString(data.thingTypeId); - } - if (data.thingTypeMetadata != null) { - contents.thingTypeMetadata = de_ThingTypeMetadata(data.thingTypeMetadata, context); - } - if (data.thingTypeName != null) { - contents.thingTypeName = __expectString(data.thingTypeName); - } - if (data.thingTypeProperties != null) { - contents.thingTypeProperties = de_ThingTypeProperties(data.thingTypeProperties, context); - } + const doc = take(data, { + thingTypeArn: __expectString, + thingTypeId: __expectString, + thingTypeMetadata: (_) => de_ThingTypeMetadata(_, context), + thingTypeName: __expectString, + thingTypeProperties: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -15328,10 +14899,9 @@ const de_DescribeThingTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15387,10 +14957,9 @@ const de_DetachPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15446,10 +15015,9 @@ const de_DetachPrincipalPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15499,10 +15067,9 @@ const de_DetachSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15558,10 +15125,9 @@ const de_DetachThingPrincipalCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15614,10 +15180,9 @@ const de_DisableTopicRuleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15670,10 +15235,9 @@ const de_EnableTopicRuleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15693,12 +15257,11 @@ export const de_GetBehaviorModelTrainingSummariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.summaries != null) { - contents.summaries = de_BehaviorModelTrainingSummaries(data.summaries, context); - } + const doc = take(data, { + nextToken: __expectString, + summaries: (_) => de_BehaviorModelTrainingSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -15729,10 +15292,9 @@ const de_GetBehaviorModelTrainingSummariesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15752,12 +15314,11 @@ export const de_GetBucketsAggregationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.buckets != null) { - contents.buckets = de_Buckets(data.buckets, context); - } - if (data.totalCount != null) { - contents.totalCount = __expectInt32(data.totalCount); - } + const doc = take(data, { + buckets: _json, + totalCount: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -15803,10 +15364,9 @@ const de_GetBucketsAggregationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15826,9 +15386,10 @@ export const de_GetCardinalityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cardinality != null) { - contents.cardinality = __expectInt32(data.cardinality); - } + const doc = take(data, { + cardinality: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -15874,10 +15435,9 @@ const de_GetCardinalityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15897,9 +15457,10 @@ export const de_GetEffectivePoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.effectivePolicies != null) { - contents.effectivePolicies = de_EffectivePolicies(data.effectivePolicies, context); - } + const doc = take(data, { + effectivePolicies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -15939,10 +15500,9 @@ const de_GetEffectivePoliciesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15962,15 +15522,11 @@ export const de_GetIndexingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.thingGroupIndexingConfiguration != null) { - contents.thingGroupIndexingConfiguration = de_ThingGroupIndexingConfiguration( - data.thingGroupIndexingConfiguration, - context - ); - } - if (data.thingIndexingConfiguration != null) { - contents.thingIndexingConfiguration = de_ThingIndexingConfiguration(data.thingIndexingConfiguration, context); - } + const doc = take(data, { + thingGroupIndexingConfiguration: _json, + thingIndexingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16004,10 +15560,9 @@ const de_GetIndexingConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16027,9 +15582,10 @@ export const de_GetJobDocumentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.document != null) { - contents.document = __expectString(data.document); - } + const doc = take(data, { + document: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16060,10 +15616,9 @@ const de_GetJobDocumentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16083,12 +15638,11 @@ export const de_GetLoggingOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.logLevel != null) { - contents.logLevel = __expectString(data.logLevel); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + logLevel: __expectString, + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16116,10 +15670,9 @@ const de_GetLoggingOptionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16139,9 +15692,10 @@ export const de_GetOTAUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.otaUpdateInfo != null) { - contents.otaUpdateInfo = de_OTAUpdateInfo(data.otaUpdateInfo, context); - } + const doc = take(data, { + otaUpdateInfo: (_) => de_OTAUpdateInfo(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16178,10 +15732,9 @@ const de_GetOTAUpdateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16201,9 +15754,10 @@ export const de_GetPercentilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.percentiles != null) { - contents.percentiles = de_Percentiles(data.percentiles, context); - } + const doc = take(data, { + percentiles: (_) => de_Percentiles(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16249,10 +15803,9 @@ const de_GetPercentilesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16272,27 +15825,16 @@ export const de_GetPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.defaultVersionId != null) { - contents.defaultVersionId = __expectString(data.defaultVersionId); - } - if (data.generationId != null) { - contents.generationId = __expectString(data.generationId); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.policyArn != null) { - contents.policyArn = __expectString(data.policyArn); - } - if (data.policyDocument != null) { - contents.policyDocument = __expectString(data.policyDocument); - } - if (data.policyName != null) { - contents.policyName = __expectString(data.policyName); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultVersionId: __expectString, + generationId: __expectString, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + policyArn: __expectString, + policyDocument: __expectString, + policyName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16329,10 +15871,9 @@ const de_GetPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16352,30 +15893,17 @@ export const de_GetPolicyVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.generationId != null) { - contents.generationId = __expectString(data.generationId); - } - if (data.isDefaultVersion != null) { - contents.isDefaultVersion = __expectBoolean(data.isDefaultVersion); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.policyArn != null) { - contents.policyArn = __expectString(data.policyArn); - } - if (data.policyDocument != null) { - contents.policyDocument = __expectString(data.policyDocument); - } - if (data.policyName != null) { - contents.policyName = __expectString(data.policyName); - } - if (data.policyVersionId != null) { - contents.policyVersionId = __expectString(data.policyVersionId); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + generationId: __expectString, + isDefaultVersion: __expectBoolean, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + policyArn: __expectString, + policyDocument: __expectString, + policyName: __expectString, + policyVersionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16412,10 +15940,9 @@ const de_GetPolicyVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16435,9 +15962,10 @@ export const de_GetRegistrationCodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.registrationCode != null) { - contents.registrationCode = __expectString(data.registrationCode); - } + const doc = take(data, { + registrationCode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16471,10 +15999,9 @@ const de_GetRegistrationCodeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16494,9 +16021,10 @@ export const de_GetStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.statistics != null) { - contents.statistics = de_Statistics(data.statistics, context); - } + const doc = take(data, { + statistics: (_) => de_Statistics(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16542,10 +16070,9 @@ const de_GetStatisticsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16565,12 +16092,11 @@ export const de_GetTopicRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.rule != null) { - contents.rule = de_TopicRule(data.rule, context); - } - if (data.ruleArn != null) { - contents.ruleArn = __expectString(data.ruleArn); - } + const doc = take(data, { + rule: (_) => de_TopicRule(_, context), + ruleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16601,10 +16127,9 @@ const de_GetTopicRuleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16624,9 +16149,10 @@ export const de_GetTopicRuleDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.topicRuleDestination != null) { - contents.topicRuleDestination = de_TopicRuleDestination(data.topicRuleDestination, context); - } + const doc = take(data, { + topicRuleDestination: (_) => de_TopicRuleDestination(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -16657,10 +16183,9 @@ const de_GetTopicRuleDestinationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16680,15 +16205,12 @@ export const de_GetV2LoggingOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.defaultLogLevel != null) { - contents.defaultLogLevel = __expectString(data.defaultLogLevel); - } - if (data.disableAllLogs != null) { - contents.disableAllLogs = __expectBoolean(data.disableAllLogs); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + defaultLogLevel: __expectString, + disableAllLogs: __expectBoolean, + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16716,10 +16238,9 @@ const de_GetV2LoggingOptionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16739,12 +16260,11 @@ export const de_ListActiveViolationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.activeViolations != null) { - contents.activeViolations = de_ActiveViolations(data.activeViolations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + activeViolations: (_) => de_ActiveViolations(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16775,10 +16295,9 @@ const de_ListActiveViolationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16798,12 +16317,11 @@ export const de_ListAttachedPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.policies != null) { - contents.policies = de_Policies(data.policies, context); - } + const doc = take(data, { + nextMarker: __expectString, + policies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -16843,10 +16361,9 @@ const de_ListAttachedPoliciesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16866,12 +16383,11 @@ export const de_ListAuditFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de_AuditFindings(data.findings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findings: (_) => de_AuditFindings(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16899,10 +16415,9 @@ const de_ListAuditFindingsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16922,12 +16437,11 @@ export const de_ListAuditMitigationActionsExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionsExecutions != null) { - contents.actionsExecutions = de_AuditMitigationActionExecutionMetadataList(data.actionsExecutions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + actionsExecutions: (_) => de_AuditMitigationActionExecutionMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -16955,10 +16469,9 @@ const de_ListAuditMitigationActionsExecutionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16978,12 +16491,11 @@ export const de_ListAuditMitigationActionsTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tasks != null) { - contents.tasks = de_AuditMitigationActionsTaskMetadataList(data.tasks, context); - } + const doc = take(data, { + nextToken: __expectString, + tasks: (_) => de_AuditMitigationActionsTaskMetadataList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -17011,10 +16523,9 @@ const de_ListAuditMitigationActionsTasksCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17034,12 +16545,11 @@ export const de_ListAuditSuppressionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.suppressions != null) { - contents.suppressions = de_AuditSuppressionList(data.suppressions, context); - } + const doc = take(data, { + nextToken: __expectString, + suppressions: (_) => de_AuditSuppressionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -17067,10 +16577,9 @@ const de_ListAuditSuppressionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17090,12 +16599,11 @@ export const de_ListAuditTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tasks != null) { - contents.tasks = de_AuditTaskMetadataList(data.tasks, context); - } + const doc = take(data, { + nextToken: __expectString, + tasks: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -17123,10 +16631,9 @@ const de_ListAuditTasksCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17146,12 +16653,11 @@ export const de_ListAuthorizersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizers != null) { - contents.authorizers = de_Authorizers(data.authorizers, context); - } - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } + const doc = take(data, { + authorizers: _json, + nextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17185,10 +16691,9 @@ const de_ListAuthorizersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17208,12 +16713,11 @@ export const de_ListBillingGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.billingGroups != null) { - contents.billingGroups = de_BillingGroupNameAndArnList(data.billingGroups, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + billingGroups: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17244,10 +16748,9 @@ const de_ListBillingGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17267,12 +16770,11 @@ export const de_ListCACertificatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificates != null) { - contents.certificates = de_CACertificates(data.certificates, context); - } - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } + const doc = take(data, { + certificates: (_) => de_CACertificates(_, context), + nextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17306,10 +16808,9 @@ const de_ListCACertificatesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17329,12 +16830,11 @@ export const de_ListCertificatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificates != null) { - contents.certificates = de_Certificates(data.certificates, context); - } - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } + const doc = take(data, { + certificates: (_) => de_Certificates(_, context), + nextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17368,10 +16868,9 @@ const de_ListCertificatesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17391,12 +16890,11 @@ export const de_ListCertificatesByCACommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificates != null) { - contents.certificates = de_Certificates(data.certificates, context); - } - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } + const doc = take(data, { + certificates: (_) => de_Certificates(_, context), + nextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17430,10 +16928,9 @@ const de_ListCertificatesByCACommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17453,12 +16950,11 @@ export const de_ListCustomMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.metricNames != null) { - contents.metricNames = de_MetricNames(data.metricNames, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + metricNames: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17486,10 +16982,9 @@ const de_ListCustomMetricsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17509,12 +17004,11 @@ export const de_ListDetectMitigationActionsExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionsExecutions != null) { - contents.actionsExecutions = de_DetectMitigationActionExecutionList(data.actionsExecutions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + actionsExecutions: (_) => de_DetectMitigationActionExecutionList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17542,10 +17036,9 @@ const de_ListDetectMitigationActionsExecutionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17565,12 +17058,11 @@ export const de_ListDetectMitigationActionsTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tasks != null) { - contents.tasks = de_DetectMitigationActionsTaskSummaryList(data.tasks, context); - } + const doc = take(data, { + nextToken: __expectString, + tasks: (_) => de_DetectMitigationActionsTaskSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -17598,10 +17090,9 @@ const de_ListDetectMitigationActionsTasksCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17621,12 +17112,11 @@ export const de_ListDimensionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dimensionNames != null) { - contents.dimensionNames = de_DimensionNames(data.dimensionNames, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dimensionNames: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17654,10 +17144,9 @@ const de_ListDimensionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17677,12 +17166,11 @@ export const de_ListDomainConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainConfigurations != null) { - contents.domainConfigurations = de_DomainConfigurations(data.domainConfigurations, context); - } - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } + const doc = take(data, { + domainConfigurations: _json, + nextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17716,10 +17204,9 @@ const de_ListDomainConfigurationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17739,12 +17226,11 @@ export const de_ListFleetMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fleetMetrics != null) { - contents.fleetMetrics = de_FleetMetricNameAndArnList(data.fleetMetrics, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + fleetMetrics: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17778,10 +17264,9 @@ const de_ListFleetMetricsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17801,12 +17286,11 @@ export const de_ListIndicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.indexNames != null) { - contents.indexNames = de_IndexNamesList(data.indexNames, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + indexNames: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17840,10 +17324,9 @@ const de_ListIndicesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17863,12 +17346,11 @@ export const de_ListJobExecutionsForJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executionSummaries != null) { - contents.executionSummaries = de_JobExecutionSummaryForJobList(data.executionSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + executionSummaries: (_) => de_JobExecutionSummaryForJobList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17899,10 +17381,9 @@ const de_ListJobExecutionsForJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17922,12 +17403,11 @@ export const de_ListJobExecutionsForThingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executionSummaries != null) { - contents.executionSummaries = de_JobExecutionSummaryForThingList(data.executionSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + executionSummaries: (_) => de_JobExecutionSummaryForThingList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -17958,10 +17438,9 @@ const de_ListJobExecutionsForThingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17981,12 +17460,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.jobs = de_JobSummaryList(data.jobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobs: (_) => de_JobSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18017,10 +17495,9 @@ const de_ListJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18040,12 +17517,11 @@ export const de_ListJobTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplates != null) { - contents.jobTemplates = de_JobTemplateSummaryList(data.jobTemplates, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobTemplates: (_) => de_JobTemplateSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18073,10 +17549,9 @@ const de_ListJobTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18096,12 +17571,11 @@ export const de_ListManagedJobTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.managedJobTemplates != null) { - contents.managedJobTemplates = de_ManagedJobTemplatesSummaryList(data.managedJobTemplates, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + managedJobTemplates: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18132,10 +17606,9 @@ const de_ListManagedJobTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18155,12 +17628,11 @@ export const de_ListMetricValuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.metricDatumList != null) { - contents.metricDatumList = de_MetricDatumList(data.metricDatumList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + metricDatumList: (_) => de_MetricDatumList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18191,10 +17663,9 @@ const de_ListMetricValuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18214,12 +17685,11 @@ export const de_ListMitigationActionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionIdentifiers != null) { - contents.actionIdentifiers = de_MitigationActionIdentifierList(data.actionIdentifiers, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + actionIdentifiers: (_) => de_MitigationActionIdentifierList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -18247,10 +17717,9 @@ const de_ListMitigationActionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18270,12 +17739,11 @@ export const de_ListOTAUpdatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.otaUpdates != null) { - contents.otaUpdates = de_OTAUpdatesSummary(data.otaUpdates, context); - } + const doc = take(data, { + nextToken: __expectString, + otaUpdates: (_) => de_OTAUpdatesSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18309,10 +17777,9 @@ const de_ListOTAUpdatesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18332,12 +17799,11 @@ export const de_ListOutgoingCertificatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.outgoingCertificates != null) { - contents.outgoingCertificates = de_OutgoingCertificates(data.outgoingCertificates, context); - } + const doc = take(data, { + nextMarker: __expectString, + outgoingCertificates: (_) => de_OutgoingCertificates(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18371,10 +17837,9 @@ const de_ListOutgoingCertificatesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18394,12 +17859,11 @@ export const de_ListPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.policies != null) { - contents.policies = de_Policies(data.policies, context); - } + const doc = take(data, { + nextMarker: __expectString, + policies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18433,10 +17897,9 @@ const de_ListPoliciesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18456,12 +17919,11 @@ export const de_ListPolicyPrincipalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.principals != null) { - contents.principals = de_Principals(data.principals, context); - } + const doc = take(data, { + nextMarker: __expectString, + principals: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18498,10 +17960,9 @@ const de_ListPolicyPrincipalsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18521,9 +17982,10 @@ export const de_ListPolicyVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policyVersions != null) { - contents.policyVersions = de_PolicyVersions(data.policyVersions, context); - } + const doc = take(data, { + policyVersions: (_) => de_PolicyVersions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18560,10 +18022,9 @@ const de_ListPolicyVersionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18583,12 +18044,11 @@ export const de_ListPrincipalPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.policies != null) { - contents.policies = de_Policies(data.policies, context); - } + const doc = take(data, { + nextMarker: __expectString, + policies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18625,10 +18085,9 @@ const de_ListPrincipalPoliciesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18648,12 +18107,11 @@ export const de_ListPrincipalThingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.things != null) { - contents.things = de_ThingNameList(data.things, context); - } + const doc = take(data, { + nextToken: __expectString, + things: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18690,10 +18148,9 @@ const de_ListPrincipalThingsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18713,12 +18170,11 @@ export const de_ListProvisioningTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templates != null) { - contents.templates = de_ProvisioningTemplateListing(data.templates, context); - } + const doc = take(data, { + nextToken: __expectString, + templates: (_) => de_ProvisioningTemplateListing(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18749,10 +18205,9 @@ const de_ListProvisioningTemplatesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18772,12 +18227,11 @@ export const de_ListProvisioningTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.versions != null) { - contents.versions = de_ProvisioningTemplateVersionListing(data.versions, context); - } + const doc = take(data, { + nextToken: __expectString, + versions: (_) => de_ProvisioningTemplateVersionListing(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -18811,10 +18265,9 @@ const de_ListProvisioningTemplateVersionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18834,12 +18287,11 @@ export const de_ListRelatedResourcesForAuditFindingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.relatedResources != null) { - contents.relatedResources = de_RelatedResources(data.relatedResources, context); - } + const doc = take(data, { + nextToken: __expectString, + relatedResources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18870,10 +18322,9 @@ const de_ListRelatedResourcesForAuditFindingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18893,12 +18344,11 @@ export const de_ListRoleAliasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.roleAliases != null) { - contents.roleAliases = de_RoleAliases(data.roleAliases, context); - } + const doc = take(data, { + nextMarker: __expectString, + roleAliases: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18932,10 +18382,9 @@ const de_ListRoleAliasesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18955,12 +18404,11 @@ export const de_ListScheduledAuditsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.scheduledAudits != null) { - contents.scheduledAudits = de_ScheduledAuditMetadataList(data.scheduledAudits, context); - } + const doc = take(data, { + nextToken: __expectString, + scheduledAudits: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -18988,10 +18436,9 @@ const de_ListScheduledAuditsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19011,12 +18458,11 @@ export const de_ListSecurityProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.securityProfileIdentifiers != null) { - contents.securityProfileIdentifiers = de_SecurityProfileIdentifiers(data.securityProfileIdentifiers, context); - } + const doc = take(data, { + nextToken: __expectString, + securityProfileIdentifiers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19047,10 +18493,9 @@ const de_ListSecurityProfilesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19070,15 +18515,11 @@ export const de_ListSecurityProfilesForTargetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.securityProfileTargetMappings != null) { - contents.securityProfileTargetMappings = de_SecurityProfileTargetMappings( - data.securityProfileTargetMappings, - context - ); - } + const doc = take(data, { + nextToken: __expectString, + securityProfileTargetMappings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19109,10 +18550,9 @@ const de_ListSecurityProfilesForTargetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19132,12 +18572,11 @@ export const de_ListStreamsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.streams != null) { - contents.streams = de_StreamsSummary(data.streams, context); - } + const doc = take(data, { + nextToken: __expectString, + streams: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19171,10 +18610,9 @@ const de_ListStreamsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19194,12 +18632,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + nextToken: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19230,10 +18667,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19253,12 +18689,11 @@ export const de_ListTargetsForPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextMarker != null) { - contents.nextMarker = __expectString(data.nextMarker); - } - if (data.targets != null) { - contents.targets = de_PolicyTargets(data.targets, context); - } + const doc = take(data, { + nextMarker: __expectString, + targets: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19298,10 +18733,9 @@ const de_ListTargetsForPolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19321,12 +18755,11 @@ export const de_ListTargetsForSecurityProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.securityProfileTargets != null) { - contents.securityProfileTargets = de_SecurityProfileTargets(data.securityProfileTargets, context); - } + const doc = take(data, { + nextToken: __expectString, + securityProfileTargets: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19357,10 +18790,9 @@ const de_ListTargetsForSecurityProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19380,12 +18812,11 @@ export const de_ListThingGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.thingGroups != null) { - contents.thingGroups = de_ThingGroupNameAndArnList(data.thingGroups, context); - } + const doc = take(data, { + nextToken: __expectString, + thingGroups: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19416,10 +18847,9 @@ const de_ListThingGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19439,12 +18869,11 @@ export const de_ListThingGroupsForThingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.thingGroups != null) { - contents.thingGroups = de_ThingGroupNameAndArnList(data.thingGroups, context); - } + const doc = take(data, { + nextToken: __expectString, + thingGroups: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19475,10 +18904,9 @@ const de_ListThingGroupsForThingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19498,12 +18926,11 @@ export const de_ListThingPrincipalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.principals != null) { - contents.principals = de_Principals(data.principals, context); - } + const doc = take(data, { + nextToken: __expectString, + principals: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19540,10 +18967,9 @@ const de_ListThingPrincipalsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19563,15 +18989,12 @@ export const de_ListThingRegistrationTaskReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.reportType != null) { - contents.reportType = __expectString(data.reportType); - } - if (data.resourceLinks != null) { - contents.resourceLinks = de_S3FileUrlList(data.resourceLinks, context); - } + const doc = take(data, { + nextToken: __expectString, + reportType: __expectString, + resourceLinks: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19602,10 +19025,9 @@ const de_ListThingRegistrationTaskReportsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19625,12 +19047,11 @@ export const de_ListThingRegistrationTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.taskIds != null) { - contents.taskIds = de_TaskIdList(data.taskIds, context); - } + const doc = take(data, { + nextToken: __expectString, + taskIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19661,10 +19082,9 @@ const de_ListThingRegistrationTasksCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19684,12 +19104,11 @@ export const de_ListThingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.things != null) { - contents.things = de_ThingAttributeList(data.things, context); - } + const doc = take(data, { + nextToken: __expectString, + things: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19723,10 +19142,9 @@ const de_ListThingsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19746,12 +19164,11 @@ export const de_ListThingsInBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.things != null) { - contents.things = de_ThingNameList(data.things, context); - } + const doc = take(data, { + nextToken: __expectString, + things: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19782,10 +19199,9 @@ const de_ListThingsInBillingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19805,12 +19221,11 @@ export const de_ListThingsInThingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.things != null) { - contents.things = de_ThingNameList(data.things, context); - } + const doc = take(data, { + nextToken: __expectString, + things: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -19841,10 +19256,9 @@ const de_ListThingsInThingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19864,12 +19278,11 @@ export const de_ListThingTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.thingTypes != null) { - contents.thingTypes = de_ThingTypeList(data.thingTypes, context); - } + const doc = take(data, { + nextToken: __expectString, + thingTypes: (_) => de_ThingTypeList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -19903,10 +19316,9 @@ const de_ListThingTypesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19926,12 +19338,11 @@ export const de_ListTopicRuleDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.destinationSummaries != null) { - contents.destinationSummaries = de_TopicRuleDestinationSummaries(data.destinationSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + destinationSummaries: (_) => de_TopicRuleDestinationSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -19962,10 +19373,9 @@ const de_ListTopicRuleDestinationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19985,12 +19395,11 @@ export const de_ListTopicRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.rules != null) { - contents.rules = de_TopicRuleList(data.rules, context); - } + const doc = take(data, { + nextToken: __expectString, + rules: (_) => de_TopicRuleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -20018,10 +19427,9 @@ const de_ListTopicRulesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20041,12 +19449,11 @@ export const de_ListV2LoggingLevelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.logTargetConfigurations != null) { - contents.logTargetConfigurations = de_LogTargetConfigurations(data.logTargetConfigurations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + logTargetConfigurations: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -20077,10 +19484,9 @@ const de_ListV2LoggingLevelsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20100,12 +19506,11 @@ export const de_ListViolationEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.violationEvents != null) { - contents.violationEvents = de_ViolationEvents(data.violationEvents, context); - } + const doc = take(data, { + nextToken: __expectString, + violationEvents: (_) => de_ViolationEvents(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -20133,10 +19538,9 @@ const de_ListViolationEventsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20183,10 +19587,9 @@ const de_PutVerificationStateOnViolationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20206,12 +19609,11 @@ export const de_RegisterCACertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateId != null) { - contents.certificateId = __expectString(data.certificateId); - } + const doc = take(data, { + certificateArn: __expectString, + certificateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -20260,10 +19662,9 @@ const de_RegisterCACertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20283,12 +19684,11 @@ export const de_RegisterCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateId != null) { - contents.certificateId = __expectString(data.certificateId); - } + const doc = take(data, { + certificateArn: __expectString, + certificateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -20334,10 +19734,9 @@ const de_RegisterCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20357,12 +19756,11 @@ export const de_RegisterCertificateWithoutCACommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.certificateId != null) { - contents.certificateId = __expectString(data.certificateId); - } + const doc = take(data, { + certificateArn: __expectString, + certificateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -20405,10 +19803,9 @@ const de_RegisterCertificateWithoutCACommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20428,12 +19825,11 @@ export const de_RegisterThingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificatePem != null) { - contents.certificatePem = __expectString(data.certificatePem); - } - if (data.resourceArns != null) { - contents.resourceArns = de_ResourceArns(data.resourceArns, context); - } + const doc = take(data, { + certificatePem: __expectString, + resourceArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -20473,10 +19869,9 @@ const de_RegisterThingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20535,10 +19930,9 @@ const de_RejectCertificateTransferCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20588,10 +19982,9 @@ const de_RemoveThingFromBillingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20641,10 +20034,9 @@ const de_RemoveThingFromThingGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20700,10 +20092,9 @@ const de_ReplaceTopicRuleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20723,15 +20114,12 @@ export const de_SearchIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.thingGroups != null) { - contents.thingGroups = de_ThingGroupDocumentList(data.thingGroups, context); - } - if (data.things != null) { - contents.things = de_ThingDocumentList(data.things, context); - } + const doc = take(data, { + nextToken: __expectString, + thingGroups: _json, + things: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -20774,10 +20162,9 @@ const de_SearchIndexCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20797,12 +20184,11 @@ export const de_SetDefaultAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerArn != null) { - contents.authorizerArn = __expectString(data.authorizerArn); - } - if (data.authorizerName != null) { - contents.authorizerName = __expectString(data.authorizerName); - } + const doc = take(data, { + authorizerArn: __expectString, + authorizerName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -20842,10 +20228,9 @@ const de_SetDefaultAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20901,10 +20286,9 @@ const de_SetDefaultPolicyVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -20951,10 +20335,9 @@ const de_SetLoggingOptionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21007,10 +20390,9 @@ const de_SetV2LoggingLevelCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21057,10 +20439,9 @@ const de_SetV2LoggingOptionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21080,9 +20461,10 @@ export const de_StartAuditMitigationActionsTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -21116,10 +20498,9 @@ const de_StartAuditMitigationActionsTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21139,9 +20520,10 @@ export const de_StartDetectMitigationActionsTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -21175,10 +20557,9 @@ const de_StartDetectMitigationActionsTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21198,9 +20579,10 @@ export const de_StartOnDemandAuditTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -21231,10 +20613,9 @@ const de_StartOnDemandAuditTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21254,9 +20635,10 @@ export const de_StartThingRegistrationTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -21287,10 +20669,9 @@ const de_StartThingRegistrationTaskCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21343,10 +20724,9 @@ const de_StopThingRegistrationTaskCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21399,10 +20779,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21422,9 +20801,10 @@ export const de_TestAuthorizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authResults != null) { - contents.authResults = de_AuthResults(data.authResults, context); - } + const doc = take(data, { + authResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -21464,10 +20844,9 @@ const de_TestAuthorizationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21487,21 +20866,14 @@ export const de_TestInvokeAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.disconnectAfterInSeconds != null) { - contents.disconnectAfterInSeconds = __expectInt32(data.disconnectAfterInSeconds); - } - if (data.isAuthenticated != null) { - contents.isAuthenticated = __expectBoolean(data.isAuthenticated); - } - if (data.policyDocuments != null) { - contents.policyDocuments = de_PolicyDocuments(data.policyDocuments, context); - } - if (data.principalId != null) { - contents.principalId = __expectString(data.principalId); - } - if (data.refreshAfterInSeconds != null) { - contents.refreshAfterInSeconds = __expectInt32(data.refreshAfterInSeconds); - } + const doc = take(data, { + disconnectAfterInSeconds: __expectInt32, + isAuthenticated: __expectBoolean, + policyDocuments: _json, + principalId: __expectString, + refreshAfterInSeconds: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -21541,10 +20913,9 @@ const de_TestInvokeAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21564,9 +20935,10 @@ export const de_TransferCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.transferredCertificateArn != null) { - contents.transferredCertificateArn = __expectString(data.transferredCertificateArn); - } + const doc = take(data, { + transferredCertificateArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -21609,10 +20981,9 @@ const de_TransferCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21662,10 +21033,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21712,10 +21082,9 @@ const de_UpdateAccountAuditConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21765,10 +21134,9 @@ const de_UpdateAuditSuppressionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21788,12 +21156,11 @@ export const de_UpdateAuthorizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizerArn != null) { - contents.authorizerArn = __expectString(data.authorizerArn); - } - if (data.authorizerName != null) { - contents.authorizerName = __expectString(data.authorizerName); - } + const doc = take(data, { + authorizerArn: __expectString, + authorizerName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -21833,10 +21200,9 @@ const de_UpdateAuthorizerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21856,9 +21222,10 @@ export const de_UpdateBillingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -21892,10 +21259,9 @@ const de_UpdateBillingGroupCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -21951,10 +21317,9 @@ const de_UpdateCACertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22013,10 +21378,9 @@ const de_UpdateCertificateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22036,24 +21400,15 @@ export const de_UpdateCustomMetricCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.metricArn != null) { - contents.metricArn = __expectString(data.metricArn); - } - if (data.metricName != null) { - contents.metricName = __expectString(data.metricName); - } - if (data.metricType != null) { - contents.metricType = __expectString(data.metricType); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricArn: __expectString, + metricName: __expectString, + metricType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -22084,10 +21439,9 @@ const de_UpdateCustomMetricCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22107,24 +21461,15 @@ export const de_UpdateDimensionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stringValues != null) { - contents.stringValues = de_DimensionStringValues(data.stringValues, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + arn: __expectString, + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stringValues: _json, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -22155,10 +21500,9 @@ const de_UpdateDimensionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22178,12 +21522,11 @@ export const de_UpdateDomainConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.domainConfigurationArn != null) { - contents.domainConfigurationArn = __expectString(data.domainConfigurationArn); - } - if (data.domainConfigurationName != null) { - contents.domainConfigurationName = __expectString(data.domainConfigurationName); - } + const doc = take(data, { + domainConfigurationArn: __expectString, + domainConfigurationName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -22223,10 +21566,9 @@ const de_UpdateDomainConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22246,9 +21588,10 @@ export const de_UpdateDynamicThingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -22285,10 +21628,9 @@ const de_UpdateDynamicThingGroupCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22335,10 +21677,9 @@ const de_UpdateEventConfigurationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22406,10 +21747,9 @@ const de_UpdateFleetMetricCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22462,10 +21802,9 @@ const de_UpdateIndexingConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22515,10 +21854,9 @@ const de_UpdateJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22538,12 +21876,11 @@ export const de_UpdateMitigationActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionArn != null) { - contents.actionArn = __expectString(data.actionArn); - } - if (data.actionId != null) { - contents.actionId = __expectString(data.actionId); - } + const doc = take(data, { + actionArn: __expectString, + actionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -22574,10 +21911,9 @@ const de_UpdateMitigationActionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22630,10 +21966,9 @@ const de_UpdateProvisioningTemplateCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22653,12 +21988,11 @@ export const de_UpdateRoleAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.roleAlias != null) { - contents.roleAlias = __expectString(data.roleAlias); - } - if (data.roleAliasArn != null) { - contents.roleAliasArn = __expectString(data.roleAliasArn); - } + const doc = take(data, { + roleAlias: __expectString, + roleAliasArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -22695,10 +22029,9 @@ const de_UpdateRoleAliasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22718,9 +22051,10 @@ export const de_UpdateScheduledAuditCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.scheduledAuditArn != null) { - contents.scheduledAuditArn = __expectString(data.scheduledAuditArn); - } + const doc = take(data, { + scheduledAuditArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -22751,10 +22085,9 @@ const de_UpdateScheduledAuditCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22774,39 +22107,19 @@ export const de_UpdateSecurityProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalMetricsToRetain != null) { - contents.additionalMetricsToRetain = de_AdditionalMetricsToRetainList(data.additionalMetricsToRetain, context); - } - if (data.additionalMetricsToRetainV2 != null) { - contents.additionalMetricsToRetainV2 = de_AdditionalMetricsToRetainV2List( - data.additionalMetricsToRetainV2, - context - ); - } - if (data.alertTargets != null) { - contents.alertTargets = de_AlertTargets(data.alertTargets, context); - } - if (data.behaviors != null) { - contents.behaviors = de_Behaviors(data.behaviors, context); - } - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.lastModifiedDate != null) { - contents.lastModifiedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedDate))); - } - if (data.securityProfileArn != null) { - contents.securityProfileArn = __expectString(data.securityProfileArn); - } - if (data.securityProfileDescription != null) { - contents.securityProfileDescription = __expectString(data.securityProfileDescription); - } - if (data.securityProfileName != null) { - contents.securityProfileName = __expectString(data.securityProfileName); - } - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + additionalMetricsToRetain: _json, + additionalMetricsToRetainV2: _json, + alertTargets: _json, + behaviors: (_) => de_Behaviors(_, context), + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + securityProfileArn: __expectString, + securityProfileDescription: __expectString, + securityProfileName: __expectString, + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -22840,10 +22153,9 @@ const de_UpdateSecurityProfileCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22863,18 +22175,13 @@ export const de_UpdateStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.streamArn != null) { - contents.streamArn = __expectString(data.streamArn); - } - if (data.streamId != null) { - contents.streamId = __expectString(data.streamId); - } - if (data.streamVersion != null) { - contents.streamVersion = __expectInt32(data.streamVersion); - } + const doc = take(data, { + description: __expectString, + streamArn: __expectString, + streamId: __expectString, + streamVersion: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -22911,10 +22218,9 @@ const de_UpdateStreamCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22973,10 +22279,9 @@ const de_UpdateThingCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -22996,9 +22301,10 @@ export const de_UpdateThingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.version != null) { - contents.version = __expectLong(data.version); - } + const doc = take(data, { + version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -23032,10 +22338,9 @@ const de_UpdateThingGroupCommandError = async ( throw await de_VersionConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -23085,10 +22390,9 @@ const de_UpdateThingGroupsForThingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -23141,10 +22445,9 @@ const de_UpdateTopicRuleDestinationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -23164,12 +22467,11 @@ export const de_ValidateSecurityProfileBehaviorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.valid != null) { - contents.valid = __expectBoolean(data.valid); - } - if (data.validationErrors != null) { - contents.validationErrors = de_ValidationErrors(data.validationErrors, context); - } + const doc = take(data, { + valid: __expectBoolean, + validationErrors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -23197,16 +22499,15 @@ const de_ValidateSecurityProfileBehaviorsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1CertificateConflictExceptionRes */ @@ -23216,9 +22517,10 @@ const de_CertificateConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new CertificateConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23235,9 +22537,10 @@ const de_CertificateStateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new CertificateStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23254,9 +22557,10 @@ const de_CertificateValidationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new CertificateValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23270,9 +22574,10 @@ const de_CertificateValidationExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23289,9 +22594,10 @@ const de_ConflictingResourceUpdateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictingResourceUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23308,9 +22614,10 @@ const de_DeleteConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DeleteConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23327,9 +22634,10 @@ const de_IndexNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new IndexNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23343,9 +22651,10 @@ const de_IndexNotReadyExceptionRes = async ( const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23362,9 +22671,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23381,9 +22691,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23400,9 +22711,10 @@ const de_InvalidAggregationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidAggregationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23419,9 +22731,10 @@ const de_InvalidQueryExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidQueryException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23438,9 +22751,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23457,9 +22771,10 @@ const de_InvalidResponseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidResponseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23476,9 +22791,10 @@ const de_InvalidStateTransitionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidStateTransitionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23495,9 +22811,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23514,9 +22831,10 @@ const de_MalformedPolicyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MalformedPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23533,9 +22851,10 @@ const de_NotConfiguredExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotConfiguredException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23552,9 +22871,10 @@ const de_RegistrationCodeValidationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RegistrationCodeValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23571,15 +22891,12 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + message: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23596,9 +22913,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23615,9 +22933,10 @@ const de_ResourceRegistrationFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceRegistrationFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23634,9 +22953,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23650,9 +22970,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_SqlParseExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SqlParseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23669,9 +22990,10 @@ const de_TaskAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TaskAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23685,9 +23007,10 @@ const de_TaskAlreadyExistsExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23704,9 +23027,10 @@ const de_TransferAlreadyCompletedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TransferAlreadyCompletedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23723,9 +23047,10 @@ const de_TransferConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TransferConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23742,9 +23067,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23761,9 +23087,10 @@ const de_VersionConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new VersionConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23780,9 +23107,10 @@ const de_VersionsLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new VersionsLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -23794,21 +23122,21 @@ const de_VersionsLimitExceededExceptionRes = async ( * serializeAws_restJson1AbortConfig */ const se_AbortConfig = (input: AbortConfig, context: __SerdeContext): any => { - return { - ...(input.criteriaList != null && { criteriaList: se_AbortCriteriaList(input.criteriaList, context) }), - }; + return take(input, { + criteriaList: (_) => se_AbortCriteriaList(_, context), + }); }; /** * serializeAws_restJson1AbortCriteria */ const se_AbortCriteria = (input: AbortCriteria, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.failureType != null && { failureType: input.failureType }), - ...(input.minNumberOfExecutedThings != null && { minNumberOfExecutedThings: input.minNumberOfExecutedThings }), - ...(input.thresholdPercentage != null && { thresholdPercentage: __serializeFloat(input.thresholdPercentage) }), - }; + return take(input, { + action: [], + failureType: [], + minNumberOfExecutedThings: [], + thresholdPercentage: __serializeFloat, + }); }; /** @@ -23822,363 +23150,79 @@ const se_AbortCriteriaList = (input: AbortCriteria[], context: __SerdeContext): }); }; -/** - * serializeAws_restJson1Action - */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.cloudwatchAlarm != null && { cloudwatchAlarm: se_CloudwatchAlarmAction(input.cloudwatchAlarm, context) }), - ...(input.cloudwatchLogs != null && { cloudwatchLogs: se_CloudwatchLogsAction(input.cloudwatchLogs, context) }), - ...(input.cloudwatchMetric != null && { - cloudwatchMetric: se_CloudwatchMetricAction(input.cloudwatchMetric, context), - }), - ...(input.dynamoDB != null && { dynamoDB: se_DynamoDBAction(input.dynamoDB, context) }), - ...(input.dynamoDBv2 != null && { dynamoDBv2: se_DynamoDBv2Action(input.dynamoDBv2, context) }), - ...(input.elasticsearch != null && { elasticsearch: se_ElasticsearchAction(input.elasticsearch, context) }), - ...(input.firehose != null && { firehose: se_FirehoseAction(input.firehose, context) }), - ...(input.http != null && { http: se_HttpAction(input.http, context) }), - ...(input.iotAnalytics != null && { iotAnalytics: se_IotAnalyticsAction(input.iotAnalytics, context) }), - ...(input.iotEvents != null && { iotEvents: se_IotEventsAction(input.iotEvents, context) }), - ...(input.iotSiteWise != null && { iotSiteWise: se_IotSiteWiseAction(input.iotSiteWise, context) }), - ...(input.kafka != null && { kafka: se_KafkaAction(input.kafka, context) }), - ...(input.kinesis != null && { kinesis: se_KinesisAction(input.kinesis, context) }), - ...(input.lambda != null && { lambda: se_LambdaAction(input.lambda, context) }), - ...(input.location != null && { location: se_LocationAction(input.location, context) }), - ...(input.openSearch != null && { openSearch: se_OpenSearchAction(input.openSearch, context) }), - ...(input.republish != null && { republish: se_RepublishAction(input.republish, context) }), - ...(input.s3 != null && { s3: se_S3Action(input.s3, context) }), - ...(input.salesforce != null && { salesforce: se_SalesforceAction(input.salesforce, context) }), - ...(input.sns != null && { sns: se_SnsAction(input.sns, context) }), - ...(input.sqs != null && { sqs: se_SqsAction(input.sqs, context) }), - ...(input.stepFunctions != null && { stepFunctions: se_StepFunctionsAction(input.stepFunctions, context) }), - ...(input.timestream != null && { timestream: se_TimestreamAction(input.timestream, context) }), - }; -}; +// se_Action omitted. -/** - * serializeAws_restJson1ActionList - */ -const se_ActionList = (input: Action[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Action(entry, context); - }); -}; +// se_ActionList omitted. -/** - * serializeAws_restJson1AdditionalMetricsToRetainList - */ -const se_AdditionalMetricsToRetainList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalMetricsToRetainList omitted. -/** - * serializeAws_restJson1AdditionalMetricsToRetainV2List - */ -const se_AdditionalMetricsToRetainV2List = (input: MetricToRetain[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricToRetain(entry, context); - }); -}; +// se_AdditionalMetricsToRetainV2List omitted. -/** - * serializeAws_restJson1AdditionalParameterMap - */ -const se_AdditionalParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AdditionalParameterMap omitted. -/** - * serializeAws_restJson1AddThingsToThingGroupParams - */ -const se_AddThingsToThingGroupParams = (input: AddThingsToThingGroupParams, context: __SerdeContext): any => { - return { - ...(input.overrideDynamicGroups != null && { overrideDynamicGroups: input.overrideDynamicGroups }), - ...(input.thingGroupNames != null && { thingGroupNames: se_ThingGroupNames(input.thingGroupNames, context) }), - }; -}; +// se_AddThingsToThingGroupParams omitted. -/** - * serializeAws_restJson1AggregationType - */ -const se_AggregationType = (input: AggregationType, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_AggregationTypeValues(input.values, context) }), - }; -}; +// se_AggregationType omitted. -/** - * serializeAws_restJson1AggregationTypeValues - */ -const se_AggregationTypeValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AggregationTypeValues omitted. -/** - * serializeAws_restJson1AlertTarget - */ -const se_AlertTarget = (input: AlertTarget, context: __SerdeContext): any => { - return { - ...(input.alertTargetArn != null && { alertTargetArn: input.alertTargetArn }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_AlertTarget omitted. -/** - * serializeAws_restJson1AlertTargets - */ -const se_AlertTargets = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [AlertTargetType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AlertTarget(value, context); - return acc; - }, {}); -}; +// se_AlertTargets omitted. -/** - * serializeAws_restJson1AssetPropertyTimestamp - */ -const se_AssetPropertyTimestamp = (input: AssetPropertyTimestamp, context: __SerdeContext): any => { - return { - ...(input.offsetInNanos != null && { offsetInNanos: input.offsetInNanos }), - ...(input.timeInSeconds != null && { timeInSeconds: input.timeInSeconds }), - }; -}; +// se_AssetPropertyTimestamp omitted. -/** - * serializeAws_restJson1AssetPropertyValue - */ -const se_AssetPropertyValue = (input: AssetPropertyValue, context: __SerdeContext): any => { - return { - ...(input.quality != null && { quality: input.quality }), - ...(input.timestamp != null && { timestamp: se_AssetPropertyTimestamp(input.timestamp, context) }), - ...(input.value != null && { value: se_AssetPropertyVariant(input.value, context) }), - }; -}; +// se_AssetPropertyValue omitted. -/** - * serializeAws_restJson1AssetPropertyValueList - */ -const se_AssetPropertyValueList = (input: AssetPropertyValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetPropertyValue(entry, context); - }); -}; +// se_AssetPropertyValueList omitted. -/** - * serializeAws_restJson1AssetPropertyVariant - */ -const se_AssetPropertyVariant = (input: AssetPropertyVariant, context: __SerdeContext): any => { - return AssetPropertyVariant.visit(input, { - booleanValue: (value) => ({ booleanValue: value }), - doubleValue: (value) => ({ doubleValue: value }), - integerValue: (value) => ({ integerValue: value }), - stringValue: (value) => ({ stringValue: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_AssetPropertyVariant omitted. -/** - * serializeAws_restJson1AttributePayload - */ -const se_AttributePayload = (input: AttributePayload, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_Attributes(input.attributes, context) }), - ...(input.merge != null && { merge: input.merge }), - }; -}; +// se_AttributePayload omitted. -/** - * serializeAws_restJson1Attributes - */ -const se_Attributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Attributes omitted. -/** - * serializeAws_restJson1AttributesMap - */ -const se_AttributesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AttributesMap omitted. -/** - * serializeAws_restJson1AuditCheckConfiguration - */ -const se_AuditCheckConfiguration = (input: AuditCheckConfiguration, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; +// se_AuditCheckConfiguration omitted. -/** - * serializeAws_restJson1AuditCheckConfigurations - */ -const se_AuditCheckConfigurations = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AuditCheckConfiguration(value, context); - return acc; - }, {}); -}; +// se_AuditCheckConfigurations omitted. -/** - * serializeAws_restJson1AuditCheckToActionsMapping - */ -const se_AuditCheckToActionsMapping = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MitigationActionNameList(value, context); - return acc; - }, {}); -}; +// se_AuditCheckToActionsMapping omitted. -/** - * serializeAws_restJson1AuditCheckToReasonCodeFilter - */ -const se_AuditCheckToReasonCodeFilter = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ReasonForNonComplianceCodes(value, context); - return acc; - }, {}); -}; +// se_AuditCheckToReasonCodeFilter omitted. -/** - * serializeAws_restJson1AuditMitigationActionsTaskTarget - */ -const se_AuditMitigationActionsTaskTarget = (input: AuditMitigationActionsTaskTarget, context: __SerdeContext): any => { - return { - ...(input.auditCheckToReasonCodeFilter != null && { - auditCheckToReasonCodeFilter: se_AuditCheckToReasonCodeFilter(input.auditCheckToReasonCodeFilter, context), - }), - ...(input.auditTaskId != null && { auditTaskId: input.auditTaskId }), - ...(input.findingIds != null && { findingIds: se_FindingIds(input.findingIds, context) }), - }; -}; +// se_AuditMitigationActionsTaskTarget omitted. -/** - * serializeAws_restJson1AuditNotificationTarget - */ -const se_AuditNotificationTarget = (input: AuditNotificationTarget, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }; -}; +// se_AuditNotificationTarget omitted. -/** - * serializeAws_restJson1AuditNotificationTargetConfigurations - */ -const se_AuditNotificationTargetConfigurations = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [AuditNotificationType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AuditNotificationTarget(value, context); - return acc; - }, - {} - ); -}; +// se_AuditNotificationTargetConfigurations omitted. -/** - * serializeAws_restJson1AuthInfo - */ -const se_AuthInfo = (input: AuthInfo, context: __SerdeContext): any => { - return { - ...(input.actionType != null && { actionType: input.actionType }), - ...(input.resources != null && { resources: se_Resources(input.resources, context) }), - }; -}; +// se_AuthInfo omitted. -/** - * serializeAws_restJson1AuthInfos - */ -const se_AuthInfos = (input: AuthInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AuthInfo(entry, context); - }); -}; +// se_AuthInfos omitted. -/** - * serializeAws_restJson1AuthorizerConfig - */ -const se_AuthorizerConfig = (input: AuthorizerConfig, context: __SerdeContext): any => { - return { - ...(input.allowAuthorizerOverride != null && { allowAuthorizerOverride: input.allowAuthorizerOverride }), - ...(input.defaultAuthorizerName != null && { defaultAuthorizerName: input.defaultAuthorizerName }), - }; -}; +// se_AuthorizerConfig omitted. /** * serializeAws_restJson1AwsJobAbortConfig */ const se_AwsJobAbortConfig = (input: AwsJobAbortConfig, context: __SerdeContext): any => { - return { - ...(input.abortCriteriaList != null && { - abortCriteriaList: se_AwsJobAbortCriteriaList(input.abortCriteriaList, context), - }), - }; + return take(input, { + abortCriteriaList: (_) => se_AwsJobAbortCriteriaList(_, context), + }); }; /** * serializeAws_restJson1AwsJobAbortCriteria */ const se_AwsJobAbortCriteria = (input: AwsJobAbortCriteria, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.failureType != null && { failureType: input.failureType }), - ...(input.minNumberOfExecutedThings != null && { minNumberOfExecutedThings: input.minNumberOfExecutedThings }), - ...(input.thresholdPercentage != null && { thresholdPercentage: __serializeFloat(input.thresholdPercentage) }), - }; + return take(input, { + action: [], + failureType: [], + minNumberOfExecutedThings: [], + thresholdPercentage: __serializeFloat, + }); }; /** @@ -24196,89 +23240,55 @@ const se_AwsJobAbortCriteriaList = (input: AwsJobAbortCriteria[], context: __Ser * serializeAws_restJson1AwsJobExecutionsRolloutConfig */ const se_AwsJobExecutionsRolloutConfig = (input: AwsJobExecutionsRolloutConfig, context: __SerdeContext): any => { - return { - ...(input.exponentialRate != null && { - exponentialRate: se_AwsJobExponentialRolloutRate(input.exponentialRate, context), - }), - ...(input.maximumPerMinute != null && { maximumPerMinute: input.maximumPerMinute }), - }; + return take(input, { + exponentialRate: (_) => se_AwsJobExponentialRolloutRate(_, context), + maximumPerMinute: [], + }); }; /** * serializeAws_restJson1AwsJobExponentialRolloutRate */ const se_AwsJobExponentialRolloutRate = (input: AwsJobExponentialRolloutRate, context: __SerdeContext): any => { - return { - ...(input.baseRatePerMinute != null && { baseRatePerMinute: input.baseRatePerMinute }), - ...(input.incrementFactor != null && { incrementFactor: __serializeFloat(input.incrementFactor) }), - ...(input.rateIncreaseCriteria != null && { - rateIncreaseCriteria: se_AwsJobRateIncreaseCriteria(input.rateIncreaseCriteria, context), - }), - }; + return take(input, { + baseRatePerMinute: [], + incrementFactor: __serializeFloat, + rateIncreaseCriteria: _json, + }); }; -/** - * serializeAws_restJson1AwsJobPresignedUrlConfig - */ -const se_AwsJobPresignedUrlConfig = (input: AwsJobPresignedUrlConfig, context: __SerdeContext): any => { - return { - ...(input.expiresInSec != null && { expiresInSec: input.expiresInSec }), - }; -}; +// se_AwsJobPresignedUrlConfig omitted. -/** - * serializeAws_restJson1AwsJobRateIncreaseCriteria - */ -const se_AwsJobRateIncreaseCriteria = (input: AwsJobRateIncreaseCriteria, context: __SerdeContext): any => { - return { - ...(input.numberOfNotifiedThings != null && { numberOfNotifiedThings: input.numberOfNotifiedThings }), - ...(input.numberOfSucceededThings != null && { numberOfSucceededThings: input.numberOfSucceededThings }), - }; -}; +// se_AwsJobRateIncreaseCriteria omitted. -/** - * serializeAws_restJson1AwsJobTimeoutConfig - */ -const se_AwsJobTimeoutConfig = (input: AwsJobTimeoutConfig, context: __SerdeContext): any => { - return { - ...(input.inProgressTimeoutInMinutes != null && { inProgressTimeoutInMinutes: input.inProgressTimeoutInMinutes }), - }; -}; +// se_AwsJobTimeoutConfig omitted. /** * serializeAws_restJson1Behavior */ const se_Behavior = (input: Behavior, context: __SerdeContext): any => { - return { - ...(input.criteria != null && { criteria: se_BehaviorCriteria(input.criteria, context) }), - ...(input.metric != null && { metric: input.metric }), - ...(input.metricDimension != null && { metricDimension: se_MetricDimension(input.metricDimension, context) }), - ...(input.name != null && { name: input.name }), - ...(input.suppressAlerts != null && { suppressAlerts: input.suppressAlerts }), - }; + return take(input, { + criteria: (_) => se_BehaviorCriteria(_, context), + metric: [], + metricDimension: _json, + name: [], + suppressAlerts: [], + }); }; /** * serializeAws_restJson1BehaviorCriteria */ const se_BehaviorCriteria = (input: BehaviorCriteria, context: __SerdeContext): any => { - return { - ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }), - ...(input.consecutiveDatapointsToAlarm != null && { - consecutiveDatapointsToAlarm: input.consecutiveDatapointsToAlarm, - }), - ...(input.consecutiveDatapointsToClear != null && { - consecutiveDatapointsToClear: input.consecutiveDatapointsToClear, - }), - ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }), - ...(input.mlDetectionConfig != null && { - mlDetectionConfig: se_MachineLearningDetectionConfig(input.mlDetectionConfig, context), - }), - ...(input.statisticalThreshold != null && { - statisticalThreshold: se_StatisticalThreshold(input.statisticalThreshold, context), - }), - ...(input.value != null && { value: se_MetricValue(input.value, context) }), - }; + return take(input, { + comparisonOperator: [], + consecutiveDatapointsToAlarm: [], + consecutiveDatapointsToClear: [], + durationSeconds: [], + mlDetectionConfig: _json, + statisticalThreshold: _json, + value: (_) => se_MetricValue(_, context), + }); }; /** @@ -24292,5541 +23302,1823 @@ const se_Behaviors = (input: Behavior[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1BillingGroupProperties - */ -const se_BillingGroupProperties = (input: BillingGroupProperties, context: __SerdeContext): any => { - return { - ...(input.billingGroupDescription != null && { billingGroupDescription: input.billingGroupDescription }), - }; -}; +// se_BillingGroupProperties omitted. + +// se_BucketsAggregationType omitted. + +// se_Cidrs omitted. + +// se_ClientProperties omitted. + +// se_CloudwatchAlarmAction omitted. + +// se_CloudwatchLogsAction omitted. + +// se_CloudwatchMetricAction omitted. /** - * serializeAws_restJson1BucketsAggregationType + * serializeAws_restJson1CodeSigning */ -const se_BucketsAggregationType = (input: BucketsAggregationType, context: __SerdeContext): any => { - return { - ...(input.termsAggregation != null && { termsAggregation: se_TermsAggregation(input.termsAggregation, context) }), - }; +const se_CodeSigning = (input: CodeSigning, context: __SerdeContext): any => { + return take(input, { + awsSignerJobId: [], + customCodeSigning: (_) => se_CustomCodeSigning(_, context), + startSigningJobParameter: _json, + }); }; +// se_CodeSigningCertificateChain omitted. + /** - * serializeAws_restJson1Cidrs + * serializeAws_restJson1CodeSigningSignature */ -const se_Cidrs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_CodeSigningSignature = (input: CodeSigningSignature, context: __SerdeContext): any => { + return take(input, { + inlineDocument: context.base64Encoder, + }); }; +// se_Configuration omitted. + /** - * serializeAws_restJson1ClientProperties + * serializeAws_restJson1CustomCodeSigning */ -const se_ClientProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); +const se_CustomCodeSigning = (input: CustomCodeSigning, context: __SerdeContext): any => { + return take(input, { + certificateChain: _json, + hashAlgorithm: [], + signature: (_) => se_CodeSigningSignature(_, context), + signatureAlgorithm: [], + }); }; -/** - * serializeAws_restJson1CloudwatchAlarmAction - */ -const se_CloudwatchAlarmAction = (input: CloudwatchAlarmAction, context: __SerdeContext): any => { - return { - ...(input.alarmName != null && { alarmName: input.alarmName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stateReason != null && { stateReason: input.stateReason }), - ...(input.stateValue != null && { stateValue: input.stateValue }), - }; -}; +// se_Destination omitted. -/** - * serializeAws_restJson1CloudwatchLogsAction - */ -const se_CloudwatchLogsAction = (input: CloudwatchLogsAction, context: __SerdeContext): any => { - return { - ...(input.batchMode != null && { batchMode: input.batchMode }), - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_DetailsMap omitted. -/** - * serializeAws_restJson1CloudwatchMetricAction - */ -const se_CloudwatchMetricAction = (input: CloudwatchMetricAction, context: __SerdeContext): any => { - return { - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.metricNamespace != null && { metricNamespace: input.metricNamespace }), - ...(input.metricTimestamp != null && { metricTimestamp: input.metricTimestamp }), - ...(input.metricUnit != null && { metricUnit: input.metricUnit }), - ...(input.metricValue != null && { metricValue: input.metricValue }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_DetectMitigationActionsTaskTarget omitted. -/** - * serializeAws_restJson1CodeSigning - */ -const se_CodeSigning = (input: CodeSigning, context: __SerdeContext): any => { - return { - ...(input.awsSignerJobId != null && { awsSignerJobId: input.awsSignerJobId }), - ...(input.customCodeSigning != null && { - customCodeSigning: se_CustomCodeSigning(input.customCodeSigning, context), - }), - ...(input.startSigningJobParameter != null && { - startSigningJobParameter: se_StartSigningJobParameter(input.startSigningJobParameter, context), - }), - }; -}; +// se_DetectMitigationActionsToExecuteList omitted. -/** - * serializeAws_restJson1CodeSigningCertificateChain - */ -const se_CodeSigningCertificateChain = (input: CodeSigningCertificateChain, context: __SerdeContext): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.inlineDocument != null && { inlineDocument: input.inlineDocument }), - }; -}; +// se_DimensionStringValues omitted. -/** - * serializeAws_restJson1CodeSigningSignature - */ -const se_CodeSigningSignature = (input: CodeSigningSignature, context: __SerdeContext): any => { - return { - ...(input.inlineDocument != null && { inlineDocument: context.base64Encoder(input.inlineDocument) }), - }; -}; +// se_DynamoDBAction omitted. -/** - * serializeAws_restJson1Configuration - */ -const se_Configuration = (input: Configuration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_DynamoDBv2Action omitted. -/** - * serializeAws_restJson1CustomCodeSigning - */ -const se_CustomCodeSigning = (input: CustomCodeSigning, context: __SerdeContext): any => { - return { - ...(input.certificateChain != null && { - certificateChain: se_CodeSigningCertificateChain(input.certificateChain, context), - }), - ...(input.hashAlgorithm != null && { hashAlgorithm: input.hashAlgorithm }), - ...(input.signature != null && { signature: se_CodeSigningSignature(input.signature, context) }), - ...(input.signatureAlgorithm != null && { signatureAlgorithm: input.signatureAlgorithm }), - }; -}; +// se_ElasticsearchAction omitted. -/** - * serializeAws_restJson1Destination - */ -const se_Destination = (input: Destination, context: __SerdeContext): any => { - return { - ...(input.s3Destination != null && { s3Destination: se_S3Destination(input.s3Destination, context) }), - }; -}; +// se_EnableIoTLoggingParams omitted. -/** - * serializeAws_restJson1DetailsMap - */ -const se_DetailsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EventConfigurations omitted. /** - * serializeAws_restJson1DetectMitigationActionsTaskTarget + * serializeAws_restJson1ExponentialRolloutRate */ -const se_DetectMitigationActionsTaskTarget = ( - input: DetectMitigationActionsTaskTarget, - context: __SerdeContext -): any => { - return { - ...(input.behaviorName != null && { behaviorName: input.behaviorName }), - ...(input.securityProfileName != null && { securityProfileName: input.securityProfileName }), - ...(input.violationIds != null && { - violationIds: se_TargetViolationIdsForDetectMitigationActions(input.violationIds, context), - }), - }; +const se_ExponentialRolloutRate = (input: ExponentialRolloutRate, context: __SerdeContext): any => { + return take(input, { + baseRatePerMinute: [], + incrementFactor: __serializeFloat, + rateIncreaseCriteria: _json, + }); }; -/** - * serializeAws_restJson1DetectMitigationActionsToExecuteList - */ -const se_DetectMitigationActionsToExecuteList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Field omitted. -/** - * serializeAws_restJson1DimensionStringValues - */ -const se_DimensionStringValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Fields omitted. -/** - * serializeAws_restJson1DynamoDBAction - */ -const se_DynamoDBAction = (input: DynamoDBAction, context: __SerdeContext): any => { - return { - ...(input.hashKeyField != null && { hashKeyField: input.hashKeyField }), - ...(input.hashKeyType != null && { hashKeyType: input.hashKeyType }), - ...(input.hashKeyValue != null && { hashKeyValue: input.hashKeyValue }), - ...(input.operation != null && { operation: input.operation }), - ...(input.payloadField != null && { payloadField: input.payloadField }), - ...(input.rangeKeyField != null && { rangeKeyField: input.rangeKeyField }), - ...(input.rangeKeyType != null && { rangeKeyType: input.rangeKeyType }), - ...(input.rangeKeyValue != null && { rangeKeyValue: input.rangeKeyValue }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; +// se_FileLocation omitted. -/** - * serializeAws_restJson1DynamoDBv2Action - */ -const se_DynamoDBv2Action = (input: DynamoDBv2Action, context: __SerdeContext): any => { - return { - ...(input.putItem != null && { putItem: se_PutItemInput(input.putItem, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_FindingIds omitted. -/** - * serializeAws_restJson1ElasticsearchAction - */ -const se_ElasticsearchAction = (input: ElasticsearchAction, context: __SerdeContext): any => { - return { - ...(input.endpoint != null && { endpoint: input.endpoint }), - ...(input.id != null && { id: input.id }), - ...(input.index != null && { index: input.index }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_FirehoseAction omitted. -/** - * serializeAws_restJson1EnableIoTLoggingParams - */ -const se_EnableIoTLoggingParams = (input: EnableIoTLoggingParams, context: __SerdeContext): any => { - return { - ...(input.logLevel != null && { logLevel: input.logLevel }), - ...(input.roleArnForLogging != null && { roleArnForLogging: input.roleArnForLogging }), - }; -}; +// se_HeaderList omitted. + +// se_HttpAction omitted. + +// se_HttpActionHeader omitted. + +// se_HttpAuthorization omitted. + +// se_HttpContext omitted. + +// se_HttpHeaders omitted. + +// se_HttpUrlDestinationConfiguration omitted. + +// se_IndexingFilter omitted. + +// se_IotAnalyticsAction omitted. + +// se_IotEventsAction omitted. + +// se_IotSiteWiseAction omitted. + +// se_IssuerCertificateIdentifier omitted. + +// se_JobExecutionsRetryConfig omitted. /** - * serializeAws_restJson1EventConfigurations + * serializeAws_restJson1JobExecutionsRolloutConfig */ -const se_EventConfigurations = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [EventType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Configuration(value, context); - return acc; - }, {}); +const se_JobExecutionsRolloutConfig = (input: JobExecutionsRolloutConfig, context: __SerdeContext): any => { + return take(input, { + exponentialRate: (_) => se_ExponentialRolloutRate(_, context), + maximumPerMinute: [], + }); }; +// se_JobTargets omitted. + +// se_KafkaAction omitted. + +// se_KinesisAction omitted. + +// se_LambdaAction omitted. + +// se_LocationAction omitted. + +// se_LocationTimestamp omitted. + +// se_LoggingOptionsPayload omitted. + +// se_LogTarget omitted. + +// se_MachineLearningDetectionConfig omitted. + +// se_MaintenanceWindow omitted. + +// se_MaintenanceWindows omitted. + +// se_MetricDimension omitted. + +// se_MetricToRetain omitted. + /** - * serializeAws_restJson1ExponentialRolloutRate + * serializeAws_restJson1MetricValue */ -const se_ExponentialRolloutRate = (input: ExponentialRolloutRate, context: __SerdeContext): any => { - return { - ...(input.baseRatePerMinute != null && { baseRatePerMinute: input.baseRatePerMinute }), - ...(input.incrementFactor != null && { incrementFactor: __serializeFloat(input.incrementFactor) }), - ...(input.rateIncreaseCriteria != null && { - rateIncreaseCriteria: se_RateIncreaseCriteria(input.rateIncreaseCriteria, context), - }), - }; +const se_MetricValue = (input: MetricValue, context: __SerdeContext): any => { + return take(input, { + cidrs: _json, + count: [], + number: __serializeFloat, + numbers: (_) => se_NumberList(_, context), + ports: _json, + strings: _json, + }); }; +// se_MitigationActionNameList omitted. + +// se_MitigationActionParams omitted. + /** - * serializeAws_restJson1Field + * serializeAws_restJson1MqttContext */ -const se_Field = (input: Field, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; +const se_MqttContext = (input: MqttContext, context: __SerdeContext): any => { + return take(input, { + clientId: [], + password: context.base64Encoder, + username: [], + }); }; +// se_MqttHeaders omitted. + +// se_NamedShadowNamesFilter omitted. + /** - * serializeAws_restJson1Fields + * serializeAws_restJson1NumberList */ -const se_Fields = (input: Field[], context: __SerdeContext): any => { +const se_NumberList = (input: number[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Field(entry, context); + return __serializeFloat(entry); }); }; +// se_OpenSearchAction omitted. + /** - * serializeAws_restJson1FileLocation + * serializeAws_restJson1OTAUpdateFile */ -const se_FileLocation = (input: FileLocation, context: __SerdeContext): any => { - return { - ...(input.s3Location != null && { s3Location: se_S3Location(input.s3Location, context) }), - ...(input.stream != null && { stream: se__Stream(input.stream, context) }), - }; +const se_OTAUpdateFile = (input: OTAUpdateFile, context: __SerdeContext): any => { + return take(input, { + attributes: _json, + codeSigning: (_) => se_CodeSigning(_, context), + fileLocation: _json, + fileName: [], + fileType: [], + fileVersion: [], + }); }; /** - * serializeAws_restJson1FindingIds + * serializeAws_restJson1OTAUpdateFiles */ -const se_FindingIds = (input: string[], context: __SerdeContext): any => { +const se_OTAUpdateFiles = (input: OTAUpdateFile[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_OTAUpdateFile(entry, context); }); }; -/** - * serializeAws_restJson1FirehoseAction - */ -const se_FirehoseAction = (input: FirehoseAction, context: __SerdeContext): any => { - return { - ...(input.batchMode != null && { batchMode: input.batchMode }), - ...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.separator != null && { separator: input.separator }), - }; -}; +// se_ParameterMap omitted. + +// se_Parameters omitted. /** - * serializeAws_restJson1HeaderList + * serializeAws_restJson1PercentList */ -const se_HeaderList = (input: HttpActionHeader[], context: __SerdeContext): any => { +const se_PercentList = (input: number[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_HttpActionHeader(entry, context); + return __serializeFloat(entry); }); }; -/** - * serializeAws_restJson1HttpAction - */ -const se_HttpAction = (input: HttpAction, context: __SerdeContext): any => { - return { - ...(input.auth != null && { auth: se_HttpAuthorization(input.auth, context) }), - ...(input.confirmationUrl != null && { confirmationUrl: input.confirmationUrl }), - ...(input.headers != null && { headers: se_HeaderList(input.headers, context) }), - ...(input.url != null && { url: input.url }), - }; -}; +// se_PolicyNames omitted. -/** - * serializeAws_restJson1HttpActionHeader - */ -const se_HttpActionHeader = (input: HttpActionHeader, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_PolicyVersionIdentifier omitted. -/** - * serializeAws_restJson1HttpAuthorization - */ -const se_HttpAuthorization = (input: HttpAuthorization, context: __SerdeContext): any => { - return { - ...(input.sigv4 != null && { sigv4: se_SigV4Authorization(input.sigv4, context) }), - }; -}; +// se_Ports omitted. -/** - * serializeAws_restJson1HttpContext - */ -const se_HttpContext = (input: HttpContext, context: __SerdeContext): any => { - return { - ...(input.headers != null && { headers: se_HttpHeaders(input.headers, context) }), - ...(input.queryString != null && { queryString: input.queryString }), - }; -}; +// se_PresignedUrlConfig omitted. -/** - * serializeAws_restJson1HttpHeaders - */ -const se_HttpHeaders = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Protocols omitted. -/** - * serializeAws_restJson1HttpUrlDestinationConfiguration - */ -const se_HttpUrlDestinationConfiguration = (input: HttpUrlDestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.confirmationUrl != null && { confirmationUrl: input.confirmationUrl }), - }; -}; +// se_ProvisioningHook omitted. -/** - * serializeAws_restJson1IndexingFilter - */ -const se_IndexingFilter = (input: IndexingFilter, context: __SerdeContext): any => { - return { - ...(input.namedShadowNames != null && { - namedShadowNames: se_NamedShadowNamesFilter(input.namedShadowNames, context), - }), - }; -}; +// se_PublicKeyMap omitted. -/** - * serializeAws_restJson1IotAnalyticsAction - */ -const se_IotAnalyticsAction = (input: IotAnalyticsAction, context: __SerdeContext): any => { - return { - ...(input.batchMode != null && { batchMode: input.batchMode }), - ...(input.channelArn != null && { channelArn: input.channelArn }), - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_PublishFindingToSnsParams omitted. -/** - * serializeAws_restJson1IotEventsAction - */ -const se_IotEventsAction = (input: IotEventsAction, context: __SerdeContext): any => { - return { - ...(input.batchMode != null && { batchMode: input.batchMode }), - ...(input.inputName != null && { inputName: input.inputName }), - ...(input.messageId != null && { messageId: input.messageId }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_PutAssetPropertyValueEntry omitted. -/** - * serializeAws_restJson1IotSiteWiseAction - */ -const se_IotSiteWiseAction = (input: IotSiteWiseAction, context: __SerdeContext): any => { - return { - ...(input.putAssetPropertyValueEntries != null && { - putAssetPropertyValueEntries: se_PutAssetPropertyValueEntryList(input.putAssetPropertyValueEntries, context), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_PutAssetPropertyValueEntryList omitted. -/** - * serializeAws_restJson1IssuerCertificateIdentifier - */ -const se_IssuerCertificateIdentifier = (input: IssuerCertificateIdentifier, context: __SerdeContext): any => { - return { - ...(input.issuerCertificateSerialNumber != null && { - issuerCertificateSerialNumber: input.issuerCertificateSerialNumber, - }), - ...(input.issuerCertificateSubject != null && { issuerCertificateSubject: input.issuerCertificateSubject }), - ...(input.issuerId != null && { issuerId: input.issuerId }), - }; -}; +// se_PutItemInput omitted. -/** - * serializeAws_restJson1JobExecutionsRetryConfig - */ -const se_JobExecutionsRetryConfig = (input: JobExecutionsRetryConfig, context: __SerdeContext): any => { - return { - ...(input.criteriaList != null && { criteriaList: se_RetryCriteriaList(input.criteriaList, context) }), - }; -}; +// se_RateIncreaseCriteria omitted. -/** - * serializeAws_restJson1JobExecutionsRolloutConfig - */ -const se_JobExecutionsRolloutConfig = (input: JobExecutionsRolloutConfig, context: __SerdeContext): any => { - return { - ...(input.exponentialRate != null && { - exponentialRate: se_ExponentialRolloutRate(input.exponentialRate, context), - }), - ...(input.maximumPerMinute != null && { maximumPerMinute: input.maximumPerMinute }), - }; -}; +// se_ReasonForNonComplianceCodes omitted. -/** - * serializeAws_restJson1JobTargets - */ -const se_JobTargets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RegistrationConfig omitted. -/** - * serializeAws_restJson1KafkaAction - */ -const se_KafkaAction = (input: KafkaAction, context: __SerdeContext): any => { - return { - ...(input.clientProperties != null && { clientProperties: se_ClientProperties(input.clientProperties, context) }), - ...(input.destinationArn != null && { destinationArn: input.destinationArn }), - ...(input.key != null && { key: input.key }), - ...(input.partition != null && { partition: input.partition }), - ...(input.topic != null && { topic: input.topic }), - }; -}; +// se_ReplaceDefaultPolicyVersionParams omitted. -/** - * serializeAws_restJson1KinesisAction - */ -const se_KinesisAction = (input: KinesisAction, context: __SerdeContext): any => { - return { - ...(input.partitionKey != null && { partitionKey: input.partitionKey }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.streamName != null && { streamName: input.streamName }), - }; -}; +// se_RepublishAction omitted. -/** - * serializeAws_restJson1LambdaAction - */ -const se_LambdaAction = (input: LambdaAction, context: __SerdeContext): any => { - return { - ...(input.functionArn != null && { functionArn: input.functionArn }), - }; -}; +// se_ResourceIdentifier omitted. -/** - * serializeAws_restJson1LocationAction - */ -const se_LocationAction = (input: LocationAction, context: __SerdeContext): any => { - return { - ...(input.deviceId != null && { deviceId: input.deviceId }), - ...(input.latitude != null && { latitude: input.latitude }), - ...(input.longitude != null && { longitude: input.longitude }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.timestamp != null && { timestamp: se_LocationTimestamp(input.timestamp, context) }), - ...(input.trackerName != null && { trackerName: input.trackerName }), - }; -}; +// se_Resources omitted. -/** - * serializeAws_restJson1LocationTimestamp - */ -const se_LocationTimestamp = (input: LocationTimestamp, context: __SerdeContext): any => { - return { - ...(input.unit != null && { unit: input.unit }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_RetryCriteria omitted. -/** - * serializeAws_restJson1LoggingOptionsPayload - */ -const se_LoggingOptionsPayload = (input: LoggingOptionsPayload, context: __SerdeContext): any => { - return { - ...(input.logLevel != null && { logLevel: input.logLevel }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_RetryCriteriaList omitted. -/** - * serializeAws_restJson1LogTarget - */ -const se_LogTarget = (input: LogTarget, context: __SerdeContext): any => { - return { - ...(input.targetName != null && { targetName: input.targetName }), - ...(input.targetType != null && { targetType: input.targetType }), - }; -}; +// se_S3Action omitted. -/** - * serializeAws_restJson1MachineLearningDetectionConfig - */ -const se_MachineLearningDetectionConfig = (input: MachineLearningDetectionConfig, context: __SerdeContext): any => { - return { - ...(input.confidenceLevel != null && { confidenceLevel: input.confidenceLevel }), - }; -}; +// se_S3Destination omitted. -/** - * serializeAws_restJson1MaintenanceWindow - */ -const se_MaintenanceWindow = (input: MaintenanceWindow, context: __SerdeContext): any => { - return { - ...(input.durationInMinutes != null && { durationInMinutes: input.durationInMinutes }), - ...(input.startTime != null && { startTime: input.startTime }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1MaintenanceWindows - */ -const se_MaintenanceWindows = (input: MaintenanceWindow[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MaintenanceWindow(entry, context); - }); -}; +// se_SalesforceAction omitted. -/** - * serializeAws_restJson1MetricDimension - */ -const se_MetricDimension = (input: MetricDimension, context: __SerdeContext): any => { - return { - ...(input.dimensionName != null && { dimensionName: input.dimensionName }), - ...(input.operator != null && { operator: input.operator }), - }; -}; +// se_SchedulingConfig omitted. -/** - * serializeAws_restJson1MetricToRetain - */ -const se_MetricToRetain = (input: MetricToRetain, context: __SerdeContext): any => { - return { - ...(input.metric != null && { metric: input.metric }), - ...(input.metricDimension != null && { metricDimension: se_MetricDimension(input.metricDimension, context) }), - }; -}; +// se_SearchableAttributes omitted. -/** - * serializeAws_restJson1MetricValue - */ -const se_MetricValue = (input: MetricValue, context: __SerdeContext): any => { - return { - ...(input.cidrs != null && { cidrs: se_Cidrs(input.cidrs, context) }), - ...(input.count != null && { count: input.count }), - ...(input.number != null && { number: __serializeFloat(input.number) }), - ...(input.numbers != null && { numbers: se_NumberList(input.numbers, context) }), - ...(input.ports != null && { ports: se_Ports(input.ports, context) }), - ...(input.strings != null && { strings: se_StringList(input.strings, context) }), - }; -}; - -/** - * serializeAws_restJson1MitigationActionNameList - */ -const se_MitigationActionNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1MitigationActionParams - */ -const se_MitigationActionParams = (input: MitigationActionParams, context: __SerdeContext): any => { - return { - ...(input.addThingsToThingGroupParams != null && { - addThingsToThingGroupParams: se_AddThingsToThingGroupParams(input.addThingsToThingGroupParams, context), - }), - ...(input.enableIoTLoggingParams != null && { - enableIoTLoggingParams: se_EnableIoTLoggingParams(input.enableIoTLoggingParams, context), - }), - ...(input.publishFindingToSnsParams != null && { - publishFindingToSnsParams: se_PublishFindingToSnsParams(input.publishFindingToSnsParams, context), - }), - ...(input.replaceDefaultPolicyVersionParams != null && { - replaceDefaultPolicyVersionParams: se_ReplaceDefaultPolicyVersionParams( - input.replaceDefaultPolicyVersionParams, - context - ), - }), - ...(input.updateCACertificateParams != null && { - updateCACertificateParams: se_UpdateCACertificateParams(input.updateCACertificateParams, context), - }), - ...(input.updateDeviceCertificateParams != null && { - updateDeviceCertificateParams: se_UpdateDeviceCertificateParams(input.updateDeviceCertificateParams, context), - }), - }; -}; - -/** - * serializeAws_restJson1MqttContext - */ -const se_MqttContext = (input: MqttContext, context: __SerdeContext): any => { - return { - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.password != null && { password: context.base64Encoder(input.password) }), - ...(input.username != null && { username: input.username }), - }; -}; - -/** - * serializeAws_restJson1MqttHeaders - */ -const se_MqttHeaders = (input: MqttHeaders, context: __SerdeContext): any => { - return { - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.correlationData != null && { correlationData: input.correlationData }), - ...(input.messageExpiry != null && { messageExpiry: input.messageExpiry }), - ...(input.payloadFormatIndicator != null && { payloadFormatIndicator: input.payloadFormatIndicator }), - ...(input.responseTopic != null && { responseTopic: input.responseTopic }), - ...(input.userProperties != null && { userProperties: se_UserProperties(input.userProperties, context) }), - }; -}; - -/** - * serializeAws_restJson1NamedShadowNamesFilter - */ -const se_NamedShadowNamesFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1NumberList - */ -const se_NumberList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return __serializeFloat(entry); - }); -}; - -/** - * serializeAws_restJson1OpenSearchAction - */ -const se_OpenSearchAction = (input: OpenSearchAction, context: __SerdeContext): any => { - return { - ...(input.endpoint != null && { endpoint: input.endpoint }), - ...(input.id != null && { id: input.id }), - ...(input.index != null && { index: input.index }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_restJson1OTAUpdateFile - */ -const se_OTAUpdateFile = (input: OTAUpdateFile, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_AttributesMap(input.attributes, context) }), - ...(input.codeSigning != null && { codeSigning: se_CodeSigning(input.codeSigning, context) }), - ...(input.fileLocation != null && { fileLocation: se_FileLocation(input.fileLocation, context) }), - ...(input.fileName != null && { fileName: input.fileName }), - ...(input.fileType != null && { fileType: input.fileType }), - ...(input.fileVersion != null && { fileVersion: input.fileVersion }), - }; -}; - -/** - * serializeAws_restJson1OTAUpdateFiles - */ -const se_OTAUpdateFiles = (input: OTAUpdateFile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OTAUpdateFile(entry, context); - }); -}; - -/** - * serializeAws_restJson1ParameterMap - */ -const se_ParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Parameters - */ -const se_Parameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1PercentList - */ -const se_PercentList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return __serializeFloat(entry); - }); -}; - -/** - * serializeAws_restJson1PolicyNames - */ -const se_PolicyNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1PolicyVersionIdentifier - */ -const se_PolicyVersionIdentifier = (input: PolicyVersionIdentifier, context: __SerdeContext): any => { - return { - ...(input.policyName != null && { policyName: input.policyName }), - ...(input.policyVersionId != null && { policyVersionId: input.policyVersionId }), - }; -}; - -/** - * serializeAws_restJson1Ports - */ -const se_Ports = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1PresignedUrlConfig - */ -const se_PresignedUrlConfig = (input: PresignedUrlConfig, context: __SerdeContext): any => { - return { - ...(input.expiresInSec != null && { expiresInSec: input.expiresInSec }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_restJson1Protocols - */ -const se_Protocols = (input: (Protocol | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ProvisioningHook - */ -const se_ProvisioningHook = (input: ProvisioningHook, context: __SerdeContext): any => { - return { - ...(input.payloadVersion != null && { payloadVersion: input.payloadVersion }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }; -}; - -/** - * serializeAws_restJson1PublicKeyMap - */ -const se_PublicKeyMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1PublishFindingToSnsParams - */ -const se_PublishFindingToSnsParams = (input: PublishFindingToSnsParams, context: __SerdeContext): any => { - return { - ...(input.topicArn != null && { topicArn: input.topicArn }), - }; -}; - -/** - * serializeAws_restJson1PutAssetPropertyValueEntry - */ -const se_PutAssetPropertyValueEntry = (input: PutAssetPropertyValueEntry, context: __SerdeContext): any => { - return { - ...(input.assetId != null && { assetId: input.assetId }), - ...(input.entryId != null && { entryId: input.entryId }), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - ...(input.propertyValues != null && { propertyValues: se_AssetPropertyValueList(input.propertyValues, context) }), - }; -}; - -/** - * serializeAws_restJson1PutAssetPropertyValueEntryList - */ -const se_PutAssetPropertyValueEntryList = (input: PutAssetPropertyValueEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutAssetPropertyValueEntry(entry, context); - }); -}; - -/** - * serializeAws_restJson1PutItemInput - */ -const se_PutItemInput = (input: PutItemInput, context: __SerdeContext): any => { - return { - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; - -/** - * serializeAws_restJson1RateIncreaseCriteria - */ -const se_RateIncreaseCriteria = (input: RateIncreaseCriteria, context: __SerdeContext): any => { - return { - ...(input.numberOfNotifiedThings != null && { numberOfNotifiedThings: input.numberOfNotifiedThings }), - ...(input.numberOfSucceededThings != null && { numberOfSucceededThings: input.numberOfSucceededThings }), - }; -}; - -/** - * serializeAws_restJson1ReasonForNonComplianceCodes - */ -const se_ReasonForNonComplianceCodes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RegistrationConfig - */ -const se_RegistrationConfig = (input: RegistrationConfig, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.templateBody != null && { templateBody: input.templateBody }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; - -/** - * serializeAws_restJson1ReplaceDefaultPolicyVersionParams - */ -const se_ReplaceDefaultPolicyVersionParams = ( - input: ReplaceDefaultPolicyVersionParams, - context: __SerdeContext -): any => { - return { - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; - -/** - * serializeAws_restJson1RepublishAction - */ -const se_RepublishAction = (input: RepublishAction, context: __SerdeContext): any => { - return { - ...(input.headers != null && { headers: se_MqttHeaders(input.headers, context) }), - ...(input.qos != null && { qos: input.qos }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.topic != null && { topic: input.topic }), - }; -}; - -/** - * serializeAws_restJson1ResourceIdentifier - */ -const se_ResourceIdentifier = (input: ResourceIdentifier, context: __SerdeContext): any => { - return { - ...(input.account != null && { account: input.account }), - ...(input.caCertificateId != null && { caCertificateId: input.caCertificateId }), - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.cognitoIdentityPoolId != null && { cognitoIdentityPoolId: input.cognitoIdentityPoolId }), - ...(input.deviceCertificateArn != null && { deviceCertificateArn: input.deviceCertificateArn }), - ...(input.deviceCertificateId != null && { deviceCertificateId: input.deviceCertificateId }), - ...(input.iamRoleArn != null && { iamRoleArn: input.iamRoleArn }), - ...(input.issuerCertificateIdentifier != null && { - issuerCertificateIdentifier: se_IssuerCertificateIdentifier(input.issuerCertificateIdentifier, context), - }), - ...(input.policyVersionIdentifier != null && { - policyVersionIdentifier: se_PolicyVersionIdentifier(input.policyVersionIdentifier, context), - }), - ...(input.roleAliasArn != null && { roleAliasArn: input.roleAliasArn }), - }; -}; - -/** - * serializeAws_restJson1Resources - */ -const se_Resources = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RetryCriteria - */ -const se_RetryCriteria = (input: RetryCriteria, context: __SerdeContext): any => { - return { - ...(input.failureType != null && { failureType: input.failureType }), - ...(input.numberOfRetries != null && { numberOfRetries: input.numberOfRetries }), - }; -}; - -/** - * serializeAws_restJson1RetryCriteriaList - */ -const se_RetryCriteriaList = (input: RetryCriteria[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RetryCriteria(entry, context); - }); -}; - -/** - * serializeAws_restJson1S3Action - */ -const se_S3Action = (input: S3Action, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.cannedAcl != null && { cannedAcl: input.cannedAcl }), - ...(input.key != null && { key: input.key }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_restJson1S3Destination - */ -const se_S3Destination = (input: S3Destination, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; - -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_restJson1SalesforceAction - */ -const se_SalesforceAction = (input: SalesforceAction, context: __SerdeContext): any => { - return { - ...(input.token != null && { token: input.token }), - ...(input.url != null && { url: input.url }), - }; -}; - -/** - * serializeAws_restJson1SchedulingConfig - */ -const se_SchedulingConfig = (input: SchedulingConfig, context: __SerdeContext): any => { - return { - ...(input.endBehavior != null && { endBehavior: input.endBehavior }), - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.maintenanceWindows != null && { - maintenanceWindows: se_MaintenanceWindows(input.maintenanceWindows, context), - }), - ...(input.startTime != null && { startTime: input.startTime }), - }; -}; - -/** - * serializeAws_restJson1SearchableAttributes - */ -const se_SearchableAttributes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SecurityGroupList - */ -const se_SecurityGroupList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ServerCertificateArns - */ -const se_ServerCertificateArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SigningProfileParameter - */ -const se_SigningProfileParameter = (input: SigningProfileParameter, context: __SerdeContext): any => { - return { - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - ...(input.certificatePathOnDevice != null && { certificatePathOnDevice: input.certificatePathOnDevice }), - ...(input.platform != null && { platform: input.platform }), - }; -}; - -/** - * serializeAws_restJson1SigV4Authorization - */ -const se_SigV4Authorization = (input: SigV4Authorization, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.signingRegion != null && { signingRegion: input.signingRegion }), - }; -}; - -/** - * serializeAws_restJson1SnsAction - */ -const se_SnsAction = (input: SnsAction, context: __SerdeContext): any => { - return { - ...(input.messageFormat != null && { messageFormat: input.messageFormat }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }; -}; - -/** - * serializeAws_restJson1SqsAction - */ -const se_SqsAction = (input: SqsAction, context: __SerdeContext): any => { - return { - ...(input.queueUrl != null && { queueUrl: input.queueUrl }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.useBase64 != null && { useBase64: input.useBase64 }), - }; -}; - -/** - * serializeAws_restJson1StartSigningJobParameter - */ -const se_StartSigningJobParameter = (input: StartSigningJobParameter, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: se_Destination(input.destination, context) }), - ...(input.signingProfileName != null && { signingProfileName: input.signingProfileName }), - ...(input.signingProfileParameter != null && { - signingProfileParameter: se_SigningProfileParameter(input.signingProfileParameter, context), - }), - }; -}; - -/** - * serializeAws_restJson1StatisticalThreshold - */ -const se_StatisticalThreshold = (input: StatisticalThreshold, context: __SerdeContext): any => { - return { - ...(input.statistic != null && { statistic: input.statistic }), - }; -}; - -/** - * serializeAws_restJson1StepFunctionsAction - */ -const se_StepFunctionsAction = (input: StepFunctionsAction, context: __SerdeContext): any => { - return { - ...(input.executionNamePrefix != null && { executionNamePrefix: input.executionNamePrefix }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stateMachineName != null && { stateMachineName: input.stateMachineName }), - }; -}; - -/** - * serializeAws_restJson1_Stream - */ -const se__Stream = (input: _Stream, context: __SerdeContext): any => { - return { - ...(input.fileId != null && { fileId: input.fileId }), - ...(input.streamId != null && { streamId: input.streamId }), - }; -}; - -/** - * serializeAws_restJson1StreamFile - */ -const se_StreamFile = (input: StreamFile, context: __SerdeContext): any => { - return { - ...(input.fileId != null && { fileId: input.fileId }), - ...(input.s3Location != null && { s3Location: se_S3Location(input.s3Location, context) }), - }; -}; - -/** - * serializeAws_restJson1StreamFiles - */ -const se_StreamFiles = (input: StreamFile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StreamFile(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1TargetAuditCheckNames - */ -const se_TargetAuditCheckNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Targets - */ -const se_Targets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TargetViolationIdsForDetectMitigationActions - */ -const se_TargetViolationIdsForDetectMitigationActions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TermsAggregation - */ -const se_TermsAggregation = (input: TermsAggregation, context: __SerdeContext): any => { - return { - ...(input.maxBuckets != null && { maxBuckets: input.maxBuckets }), - }; -}; - -/** - * serializeAws_restJson1ThingGroupIndexingConfiguration - */ -const se_ThingGroupIndexingConfiguration = (input: ThingGroupIndexingConfiguration, context: __SerdeContext): any => { - return { - ...(input.customFields != null && { customFields: se_Fields(input.customFields, context) }), - ...(input.managedFields != null && { managedFields: se_Fields(input.managedFields, context) }), - ...(input.thingGroupIndexingMode != null && { thingGroupIndexingMode: input.thingGroupIndexingMode }), - }; -}; - -/** - * serializeAws_restJson1ThingGroupList - */ -const se_ThingGroupList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ThingGroupNames - */ -const se_ThingGroupNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ThingGroupProperties - */ -const se_ThingGroupProperties = (input: ThingGroupProperties, context: __SerdeContext): any => { - return { - ...(input.attributePayload != null && { attributePayload: se_AttributePayload(input.attributePayload, context) }), - ...(input.thingGroupDescription != null && { thingGroupDescription: input.thingGroupDescription }), - }; -}; - -/** - * serializeAws_restJson1ThingIndexingConfiguration - */ -const se_ThingIndexingConfiguration = (input: ThingIndexingConfiguration, context: __SerdeContext): any => { - return { - ...(input.customFields != null && { customFields: se_Fields(input.customFields, context) }), - ...(input.deviceDefenderIndexingMode != null && { deviceDefenderIndexingMode: input.deviceDefenderIndexingMode }), - ...(input.filter != null && { filter: se_IndexingFilter(input.filter, context) }), - ...(input.managedFields != null && { managedFields: se_Fields(input.managedFields, context) }), - ...(input.namedShadowIndexingMode != null && { namedShadowIndexingMode: input.namedShadowIndexingMode }), - ...(input.thingConnectivityIndexingMode != null && { - thingConnectivityIndexingMode: input.thingConnectivityIndexingMode, - }), - ...(input.thingIndexingMode != null && { thingIndexingMode: input.thingIndexingMode }), - }; -}; - -/** - * serializeAws_restJson1ThingTypeProperties - */ -const se_ThingTypeProperties = (input: ThingTypeProperties, context: __SerdeContext): any => { - return { - ...(input.searchableAttributes != null && { - searchableAttributes: se_SearchableAttributes(input.searchableAttributes, context), - }), - ...(input.thingTypeDescription != null && { thingTypeDescription: input.thingTypeDescription }), - }; -}; - -/** - * serializeAws_restJson1TimeoutConfig - */ -const se_TimeoutConfig = (input: TimeoutConfig, context: __SerdeContext): any => { - return { - ...(input.inProgressTimeoutInMinutes != null && { inProgressTimeoutInMinutes: input.inProgressTimeoutInMinutes }), - }; -}; - -/** - * serializeAws_restJson1TimestreamAction - */ -const se_TimestreamAction = (input: TimestreamAction, context: __SerdeContext): any => { - return { - ...(input.databaseName != null && { databaseName: input.databaseName }), - ...(input.dimensions != null && { dimensions: se_TimestreamDimensionList(input.dimensions, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tableName != null && { tableName: input.tableName }), - ...(input.timestamp != null && { timestamp: se_TimestreamTimestamp(input.timestamp, context) }), - }; -}; - -/** - * serializeAws_restJson1TimestreamDimension - */ -const se_TimestreamDimension = (input: TimestreamDimension, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1TimestreamDimensionList - */ -const se_TimestreamDimensionList = (input: TimestreamDimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TimestreamDimension(entry, context); - }); -}; - -/** - * serializeAws_restJson1TimestreamTimestamp - */ -const se_TimestreamTimestamp = (input: TimestreamTimestamp, context: __SerdeContext): any => { - return { - ...(input.unit != null && { unit: input.unit }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1TlsContext - */ -const se_TlsContext = (input: TlsContext, context: __SerdeContext): any => { - return { - ...(input.serverName != null && { serverName: input.serverName }), - }; -}; - -/** - * serializeAws_restJson1TopicRuleDestinationConfiguration - */ -const se_TopicRuleDestinationConfiguration = ( - input: TopicRuleDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.httpUrlConfiguration != null && { - httpUrlConfiguration: se_HttpUrlDestinationConfiguration(input.httpUrlConfiguration, context), - }), - ...(input.vpcConfiguration != null && { - vpcConfiguration: se_VpcDestinationConfiguration(input.vpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1TopicRulePayload - */ -const se_TopicRulePayload = (input: TopicRulePayload, context: __SerdeContext): any => { - return { - ...(input.actions != null && { actions: se_ActionList(input.actions, context) }), - ...(input.awsIotSqlVersion != null && { awsIotSqlVersion: input.awsIotSqlVersion }), - ...(input.description != null && { description: input.description }), - ...(input.errorAction != null && { errorAction: se_Action(input.errorAction, context) }), - ...(input.ruleDisabled != null && { ruleDisabled: input.ruleDisabled }), - ...(input.sql != null && { sql: input.sql }), - }; -}; - -/** - * serializeAws_restJson1UpdateCACertificateParams - */ -const se_UpdateCACertificateParams = (input: UpdateCACertificateParams, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - }; -}; - -/** - * serializeAws_restJson1UpdateDeviceCertificateParams - */ -const se_UpdateDeviceCertificateParams = (input: UpdateDeviceCertificateParams, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - }; -}; - -/** - * serializeAws_restJson1UserProperties - */ -const se_UserProperties = (input: UserProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UserProperty(entry, context); - }); -}; - -/** - * serializeAws_restJson1UserProperty - */ -const se_UserProperty = (input: UserProperty, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1ViolationEventOccurrenceRange - */ -const se_ViolationEventOccurrenceRange = (input: ViolationEventOccurrenceRange, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_restJson1VpcDestinationConfiguration - */ -const se_VpcDestinationConfiguration = (input: VpcDestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.securityGroups != null && { securityGroups: se_SecurityGroupList(input.securityGroups, context) }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }; -}; - -/** - * deserializeAws_restJson1AbortConfig - */ -const de_AbortConfig = (output: any, context: __SerdeContext): AbortConfig => { - return { - criteriaList: output.criteriaList != null ? de_AbortCriteriaList(output.criteriaList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AbortCriteria - */ -const de_AbortCriteria = (output: any, context: __SerdeContext): AbortCriteria => { - return { - action: __expectString(output.action), - failureType: __expectString(output.failureType), - minNumberOfExecutedThings: __expectInt32(output.minNumberOfExecutedThings), - thresholdPercentage: __limitedParseDouble(output.thresholdPercentage), - } as any; -}; - -/** - * deserializeAws_restJson1AbortCriteriaList - */ -const de_AbortCriteriaList = (output: any, context: __SerdeContext): AbortCriteria[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AbortCriteria(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - cloudwatchAlarm: - output.cloudwatchAlarm != null ? de_CloudwatchAlarmAction(output.cloudwatchAlarm, context) : undefined, - cloudwatchLogs: output.cloudwatchLogs != null ? de_CloudwatchLogsAction(output.cloudwatchLogs, context) : undefined, - cloudwatchMetric: - output.cloudwatchMetric != null ? de_CloudwatchMetricAction(output.cloudwatchMetric, context) : undefined, - dynamoDB: output.dynamoDB != null ? de_DynamoDBAction(output.dynamoDB, context) : undefined, - dynamoDBv2: output.dynamoDBv2 != null ? de_DynamoDBv2Action(output.dynamoDBv2, context) : undefined, - elasticsearch: output.elasticsearch != null ? de_ElasticsearchAction(output.elasticsearch, context) : undefined, - firehose: output.firehose != null ? de_FirehoseAction(output.firehose, context) : undefined, - http: output.http != null ? de_HttpAction(output.http, context) : undefined, - iotAnalytics: output.iotAnalytics != null ? de_IotAnalyticsAction(output.iotAnalytics, context) : undefined, - iotEvents: output.iotEvents != null ? de_IotEventsAction(output.iotEvents, context) : undefined, - iotSiteWise: output.iotSiteWise != null ? de_IotSiteWiseAction(output.iotSiteWise, context) : undefined, - kafka: output.kafka != null ? de_KafkaAction(output.kafka, context) : undefined, - kinesis: output.kinesis != null ? de_KinesisAction(output.kinesis, context) : undefined, - lambda: output.lambda != null ? de_LambdaAction(output.lambda, context) : undefined, - location: output.location != null ? de_LocationAction(output.location, context) : undefined, - openSearch: output.openSearch != null ? de_OpenSearchAction(output.openSearch, context) : undefined, - republish: output.republish != null ? de_RepublishAction(output.republish, context) : undefined, - s3: output.s3 != null ? de_S3Action(output.s3, context) : undefined, - salesforce: output.salesforce != null ? de_SalesforceAction(output.salesforce, context) : undefined, - sns: output.sns != null ? de_SnsAction(output.sns, context) : undefined, - sqs: output.sqs != null ? de_SqsAction(output.sqs, context) : undefined, - stepFunctions: output.stepFunctions != null ? de_StepFunctionsAction(output.stepFunctions, context) : undefined, - timestream: output.timestream != null ? de_TimestreamAction(output.timestream, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): Action[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Action(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ActiveViolation - */ -const de_ActiveViolation = (output: any, context: __SerdeContext): ActiveViolation => { - return { - behavior: output.behavior != null ? de_Behavior(output.behavior, context) : undefined, - lastViolationTime: - output.lastViolationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastViolationTime))) - : undefined, - lastViolationValue: - output.lastViolationValue != null ? de_MetricValue(output.lastViolationValue, context) : undefined, - securityProfileName: __expectString(output.securityProfileName), - thingName: __expectString(output.thingName), - verificationState: __expectString(output.verificationState), - verificationStateDescription: __expectString(output.verificationStateDescription), - violationEventAdditionalInfo: - output.violationEventAdditionalInfo != null - ? de_ViolationEventAdditionalInfo(output.violationEventAdditionalInfo, context) - : undefined, - violationId: __expectString(output.violationId), - violationStartTime: - output.violationStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.violationStartTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ActiveViolations - */ -const de_ActiveViolations = (output: any, context: __SerdeContext): ActiveViolation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActiveViolation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdditionalMetricsToRetainList - */ -const de_AdditionalMetricsToRetainList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdditionalMetricsToRetainV2List - */ -const de_AdditionalMetricsToRetainV2List = (output: any, context: __SerdeContext): MetricToRetain[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricToRetain(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdditionalParameterMap - */ -const de_AdditionalParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AddThingsToThingGroupParams - */ -const de_AddThingsToThingGroupParams = (output: any, context: __SerdeContext): AddThingsToThingGroupParams => { - return { - overrideDynamicGroups: __expectBoolean(output.overrideDynamicGroups), - thingGroupNames: output.thingGroupNames != null ? de_ThingGroupNames(output.thingGroupNames, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AggregationType - */ -const de_AggregationType = (output: any, context: __SerdeContext): AggregationType => { - return { - name: __expectString(output.name), - values: output.values != null ? de_AggregationTypeValues(output.values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AggregationTypeValues - */ -const de_AggregationTypeValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AlertTarget - */ -const de_AlertTarget = (output: any, context: __SerdeContext): AlertTarget => { - return { - alertTargetArn: __expectString(output.alertTargetArn), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1AlertTargets - */ -const de_AlertTargets = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [AlertTargetType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AlertTarget(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_restJson1Allowed - */ -const de_Allowed = (output: any, context: __SerdeContext): Allowed => { - return { - policies: output.policies != null ? de_Policies(output.policies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssetPropertyTimestamp - */ -const de_AssetPropertyTimestamp = (output: any, context: __SerdeContext): AssetPropertyTimestamp => { - return { - offsetInNanos: __expectString(output.offsetInNanos), - timeInSeconds: __expectString(output.timeInSeconds), - } as any; -}; - -/** - * deserializeAws_restJson1AssetPropertyValue - */ -const de_AssetPropertyValue = (output: any, context: __SerdeContext): AssetPropertyValue => { - return { - quality: __expectString(output.quality), - timestamp: output.timestamp != null ? de_AssetPropertyTimestamp(output.timestamp, context) : undefined, - value: output.value != null ? de_AssetPropertyVariant(__expectUnion(output.value), context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssetPropertyValueList - */ -const de_AssetPropertyValueList = (output: any, context: __SerdeContext): AssetPropertyValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetPropertyValue(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssetPropertyVariant - */ -const de_AssetPropertyVariant = (output: any, context: __SerdeContext): AssetPropertyVariant => { - if (__expectString(output.booleanValue) !== undefined) { - return { booleanValue: __expectString(output.booleanValue) as any }; - } - if (__expectString(output.doubleValue) !== undefined) { - return { doubleValue: __expectString(output.doubleValue) as any }; - } - if (__expectString(output.integerValue) !== undefined) { - return { integerValue: __expectString(output.integerValue) as any }; - } - if (__expectString(output.stringValue) !== undefined) { - return { stringValue: __expectString(output.stringValue) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1AttributePayload - */ -const de_AttributePayload = (output: any, context: __SerdeContext): AttributePayload => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - merge: __expectBoolean(output.merge), - } as any; -}; - -/** - * deserializeAws_restJson1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AttributesMap - */ -const de_AttributesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AuditCheckConfiguration - */ -const de_AuditCheckConfiguration = (output: any, context: __SerdeContext): AuditCheckConfiguration => { - return { - enabled: __expectBoolean(output.enabled), - } as any; -}; - -/** - * deserializeAws_restJson1AuditCheckConfigurations - */ -const de_AuditCheckConfigurations = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AuditCheckConfiguration(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AuditCheckDetails - */ -const de_AuditCheckDetails = (output: any, context: __SerdeContext): AuditCheckDetails => { - return { - checkCompliant: __expectBoolean(output.checkCompliant), - checkRunStatus: __expectString(output.checkRunStatus), - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - nonCompliantResourcesCount: __expectLong(output.nonCompliantResourcesCount), - suppressedNonCompliantResourcesCount: __expectLong(output.suppressedNonCompliantResourcesCount), - totalResourcesCount: __expectLong(output.totalResourcesCount), - } as any; -}; - -/** - * deserializeAws_restJson1AuditCheckToActionsMapping - */ -const de_AuditCheckToActionsMapping = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MitigationActionNameList(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AuditCheckToReasonCodeFilter - */ -const de_AuditCheckToReasonCodeFilter = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ReasonForNonComplianceCodes(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AuditDetails - */ -const de_AuditDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AuditCheckDetails(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AuditFinding - */ -const de_AuditFinding = (output: any, context: __SerdeContext): AuditFinding => { - return { - checkName: __expectString(output.checkName), - findingId: __expectString(output.findingId), - findingTime: - output.findingTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.findingTime))) - : undefined, - isSuppressed: __expectBoolean(output.isSuppressed), - nonCompliantResource: - output.nonCompliantResource != null ? de_NonCompliantResource(output.nonCompliantResource, context) : undefined, - reasonForNonCompliance: __expectString(output.reasonForNonCompliance), - reasonForNonComplianceCode: __expectString(output.reasonForNonComplianceCode), - relatedResources: - output.relatedResources != null ? de_RelatedResources(output.relatedResources, context) : undefined, - severity: __expectString(output.severity), - taskId: __expectString(output.taskId), - taskStartTime: - output.taskStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.taskStartTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AuditFindings - */ -const de_AuditFindings = (output: any, context: __SerdeContext): AuditFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuditFinding(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuditMitigationActionExecutionMetadata - */ -const de_AuditMitigationActionExecutionMetadata = ( - output: any, - context: __SerdeContext -): AuditMitigationActionExecutionMetadata => { - return { - actionId: __expectString(output.actionId), - actionName: __expectString(output.actionName), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - errorCode: __expectString(output.errorCode), - findingId: __expectString(output.findingId), - message: __expectString(output.message), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - taskId: __expectString(output.taskId), - } as any; -}; - -/** - * deserializeAws_restJson1AuditMitigationActionExecutionMetadataList - */ -const de_AuditMitigationActionExecutionMetadataList = ( - output: any, - context: __SerdeContext -): AuditMitigationActionExecutionMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuditMitigationActionExecutionMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuditMitigationActionsTaskMetadata - */ -const de_AuditMitigationActionsTaskMetadata = ( - output: any, - context: __SerdeContext -): AuditMitigationActionsTaskMetadata => { - return { - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - taskId: __expectString(output.taskId), - taskStatus: __expectString(output.taskStatus), - } as any; -}; - -/** - * deserializeAws_restJson1AuditMitigationActionsTaskMetadataList - */ -const de_AuditMitigationActionsTaskMetadataList = ( - output: any, - context: __SerdeContext -): AuditMitigationActionsTaskMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuditMitigationActionsTaskMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuditMitigationActionsTaskStatistics - */ -const de_AuditMitigationActionsTaskStatistics = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_TaskStatisticsForAuditCheck(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_restJson1AuditMitigationActionsTaskTarget - */ -const de_AuditMitigationActionsTaskTarget = ( - output: any, - context: __SerdeContext -): AuditMitigationActionsTaskTarget => { - return { - auditCheckToReasonCodeFilter: - output.auditCheckToReasonCodeFilter != null - ? de_AuditCheckToReasonCodeFilter(output.auditCheckToReasonCodeFilter, context) - : undefined, - auditTaskId: __expectString(output.auditTaskId), - findingIds: output.findingIds != null ? de_FindingIds(output.findingIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AuditNotificationTarget - */ -const de_AuditNotificationTarget = (output: any, context: __SerdeContext): AuditNotificationTarget => { - return { - enabled: __expectBoolean(output.enabled), - roleArn: __expectString(output.roleArn), - targetArn: __expectString(output.targetArn), - } as any; -}; - -/** - * deserializeAws_restJson1AuditNotificationTargetConfigurations - */ -const de_AuditNotificationTargetConfigurations = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [AuditNotificationType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AuditNotificationTarget(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_restJson1AuditSuppression - */ -const de_AuditSuppression = (output: any, context: __SerdeContext): AuditSuppression => { - return { - checkName: __expectString(output.checkName), - description: __expectString(output.description), - expirationDate: - output.expirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expirationDate))) - : undefined, - resourceIdentifier: - output.resourceIdentifier != null ? de_ResourceIdentifier(output.resourceIdentifier, context) : undefined, - suppressIndefinitely: __expectBoolean(output.suppressIndefinitely), - } as any; -}; - -/** - * deserializeAws_restJson1AuditSuppressionList - */ -const de_AuditSuppressionList = (output: any, context: __SerdeContext): AuditSuppression[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuditSuppression(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuditTaskMetadata - */ -const de_AuditTaskMetadata = (output: any, context: __SerdeContext): AuditTaskMetadata => { - return { - taskId: __expectString(output.taskId), - taskStatus: __expectString(output.taskStatus), - taskType: __expectString(output.taskType), - } as any; -}; - -/** - * deserializeAws_restJson1AuditTaskMetadataList - */ -const de_AuditTaskMetadataList = (output: any, context: __SerdeContext): AuditTaskMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuditTaskMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuthInfo - */ -const de_AuthInfo = (output: any, context: __SerdeContext): AuthInfo => { - return { - actionType: __expectString(output.actionType), - resources: output.resources != null ? de_Resources(output.resources, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AuthorizerConfig - */ -const de_AuthorizerConfig = (output: any, context: __SerdeContext): AuthorizerConfig => { - return { - allowAuthorizerOverride: __expectBoolean(output.allowAuthorizerOverride), - defaultAuthorizerName: __expectString(output.defaultAuthorizerName), - } as any; -}; - -/** - * deserializeAws_restJson1AuthorizerDescription - */ -const de_AuthorizerDescription = (output: any, context: __SerdeContext): AuthorizerDescription => { - return { - authorizerArn: __expectString(output.authorizerArn), - authorizerFunctionArn: __expectString(output.authorizerFunctionArn), - authorizerName: __expectString(output.authorizerName), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - enableCachingForHttp: __expectBoolean(output.enableCachingForHttp), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - signingDisabled: __expectBoolean(output.signingDisabled), - status: __expectString(output.status), - tokenKeyName: __expectString(output.tokenKeyName), - tokenSigningPublicKeys: - output.tokenSigningPublicKeys != null ? de_PublicKeyMap(output.tokenSigningPublicKeys, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Authorizers - */ -const de_Authorizers = (output: any, context: __SerdeContext): AuthorizerSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthorizerSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AuthorizerSummary - */ -const de_AuthorizerSummary = (output: any, context: __SerdeContext): AuthorizerSummary => { - return { - authorizerArn: __expectString(output.authorizerArn), - authorizerName: __expectString(output.authorizerName), - } as any; -}; - -/** - * deserializeAws_restJson1AuthResult - */ -const de_AuthResult = (output: any, context: __SerdeContext): AuthResult => { - return { - allowed: output.allowed != null ? de_Allowed(output.allowed, context) : undefined, - authDecision: __expectString(output.authDecision), - authInfo: output.authInfo != null ? de_AuthInfo(output.authInfo, context) : undefined, - denied: output.denied != null ? de_Denied(output.denied, context) : undefined, - missingContextValues: - output.missingContextValues != null ? de_MissingContextValues(output.missingContextValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AuthResults - */ -const de_AuthResults = (output: any, context: __SerdeContext): AuthResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsJobExecutionsRolloutConfig - */ -const de_AwsJobExecutionsRolloutConfig = (output: any, context: __SerdeContext): AwsJobExecutionsRolloutConfig => { - return { - exponentialRate: - output.exponentialRate != null ? de_AwsJobExponentialRolloutRate(output.exponentialRate, context) : undefined, - maximumPerMinute: __expectInt32(output.maximumPerMinute), - } as any; -}; - -/** - * deserializeAws_restJson1AwsJobExponentialRolloutRate - */ -const de_AwsJobExponentialRolloutRate = (output: any, context: __SerdeContext): AwsJobExponentialRolloutRate => { - return { - baseRatePerMinute: __expectInt32(output.baseRatePerMinute), - incrementFactor: __limitedParseDouble(output.incrementFactor), - rateIncreaseCriteria: - output.rateIncreaseCriteria != null - ? de_AwsJobRateIncreaseCriteria(output.rateIncreaseCriteria, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsJobPresignedUrlConfig - */ -const de_AwsJobPresignedUrlConfig = (output: any, context: __SerdeContext): AwsJobPresignedUrlConfig => { - return { - expiresInSec: __expectLong(output.expiresInSec), - } as any; -}; - -/** - * deserializeAws_restJson1AwsJobRateIncreaseCriteria - */ -const de_AwsJobRateIncreaseCriteria = (output: any, context: __SerdeContext): AwsJobRateIncreaseCriteria => { - return { - numberOfNotifiedThings: __expectInt32(output.numberOfNotifiedThings), - numberOfSucceededThings: __expectInt32(output.numberOfSucceededThings), - } as any; -}; - -/** - * deserializeAws_restJson1Behavior - */ -const de_Behavior = (output: any, context: __SerdeContext): Behavior => { - return { - criteria: output.criteria != null ? de_BehaviorCriteria(output.criteria, context) : undefined, - metric: __expectString(output.metric), - metricDimension: output.metricDimension != null ? de_MetricDimension(output.metricDimension, context) : undefined, - name: __expectString(output.name), - suppressAlerts: __expectBoolean(output.suppressAlerts), - } as any; -}; - -/** - * deserializeAws_restJson1BehaviorCriteria - */ -const de_BehaviorCriteria = (output: any, context: __SerdeContext): BehaviorCriteria => { - return { - comparisonOperator: __expectString(output.comparisonOperator), - consecutiveDatapointsToAlarm: __expectInt32(output.consecutiveDatapointsToAlarm), - consecutiveDatapointsToClear: __expectInt32(output.consecutiveDatapointsToClear), - durationSeconds: __expectInt32(output.durationSeconds), - mlDetectionConfig: - output.mlDetectionConfig != null - ? de_MachineLearningDetectionConfig(output.mlDetectionConfig, context) - : undefined, - statisticalThreshold: - output.statisticalThreshold != null ? de_StatisticalThreshold(output.statisticalThreshold, context) : undefined, - value: output.value != null ? de_MetricValue(output.value, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BehaviorModelTrainingSummaries - */ -const de_BehaviorModelTrainingSummaries = (output: any, context: __SerdeContext): BehaviorModelTrainingSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BehaviorModelTrainingSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BehaviorModelTrainingSummary - */ -const de_BehaviorModelTrainingSummary = (output: any, context: __SerdeContext): BehaviorModelTrainingSummary => { - return { - behaviorName: __expectString(output.behaviorName), - datapointsCollectionPercentage: __limitedParseDouble(output.datapointsCollectionPercentage), - lastModelRefreshDate: - output.lastModelRefreshDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModelRefreshDate))) - : undefined, - modelStatus: __expectString(output.modelStatus), - securityProfileName: __expectString(output.securityProfileName), - trainingDataCollectionStartDate: - output.trainingDataCollectionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.trainingDataCollectionStartDate))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Behaviors - */ -const de_Behaviors = (output: any, context: __SerdeContext): Behavior[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Behavior(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BillingGroupMetadata - */ -const de_BillingGroupMetadata = (output: any, context: __SerdeContext): BillingGroupMetadata => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BillingGroupNameAndArnList - */ -const de_BillingGroupNameAndArnList = (output: any, context: __SerdeContext): GroupNameAndArn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupNameAndArn(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BillingGroupProperties - */ -const de_BillingGroupProperties = (output: any, context: __SerdeContext): BillingGroupProperties => { - return { - billingGroupDescription: __expectString(output.billingGroupDescription), - } as any; -}; - -/** - * deserializeAws_restJson1Bucket - */ -const de_Bucket = (output: any, context: __SerdeContext): Bucket => { - return { - count: __expectInt32(output.count), - keyValue: __expectString(output.keyValue), - } as any; -}; - -/** - * deserializeAws_restJson1Buckets - */ -const de_Buckets = (output: any, context: __SerdeContext): Bucket[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Bucket(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CACertificate - */ -const de_CACertificate = (output: any, context: __SerdeContext): CACertificate => { - return { - certificateArn: __expectString(output.certificateArn), - certificateId: __expectString(output.certificateId), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1CACertificateDescription - */ -const de_CACertificateDescription = (output: any, context: __SerdeContext): CACertificateDescription => { - return { - autoRegistrationStatus: __expectString(output.autoRegistrationStatus), - certificateArn: __expectString(output.certificateArn), - certificateId: __expectString(output.certificateId), - certificateMode: __expectString(output.certificateMode), - certificatePem: __expectString(output.certificatePem), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - customerVersion: __expectInt32(output.customerVersion), - generationId: __expectString(output.generationId), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - ownedBy: __expectString(output.ownedBy), - status: __expectString(output.status), - validity: output.validity != null ? de_CertificateValidity(output.validity, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CACertificates - */ -const de_CACertificates = (output: any, context: __SerdeContext): CACertificate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CACertificate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Certificate - */ -const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - certificateArn: __expectString(output.certificateArn), - certificateId: __expectString(output.certificateId), - certificateMode: __expectString(output.certificateMode), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1CertificateDescription - */ -const de_CertificateDescription = (output: any, context: __SerdeContext): CertificateDescription => { - return { - caCertificateId: __expectString(output.caCertificateId), - certificateArn: __expectString(output.certificateArn), - certificateId: __expectString(output.certificateId), - certificateMode: __expectString(output.certificateMode), - certificatePem: __expectString(output.certificatePem), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - customerVersion: __expectInt32(output.customerVersion), - generationId: __expectString(output.generationId), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - ownedBy: __expectString(output.ownedBy), - previousOwnedBy: __expectString(output.previousOwnedBy), - status: __expectString(output.status), - transferData: output.transferData != null ? de_TransferData(output.transferData, context) : undefined, - validity: output.validity != null ? de_CertificateValidity(output.validity, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Certificates - */ -const de_Certificates = (output: any, context: __SerdeContext): Certificate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Certificate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CertificateValidity - */ -const de_CertificateValidity = (output: any, context: __SerdeContext): CertificateValidity => { - return { - notAfter: - output.notAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notAfter))) : undefined, - notBefore: - output.notBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notBefore))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Cidrs - */ -const de_Cidrs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ClientProperties - */ -const de_ClientProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1CloudwatchAlarmAction - */ -const de_CloudwatchAlarmAction = (output: any, context: __SerdeContext): CloudwatchAlarmAction => { - return { - alarmName: __expectString(output.alarmName), - roleArn: __expectString(output.roleArn), - stateReason: __expectString(output.stateReason), - stateValue: __expectString(output.stateValue), - } as any; -}; - -/** - * deserializeAws_restJson1CloudwatchLogsAction - */ -const de_CloudwatchLogsAction = (output: any, context: __SerdeContext): CloudwatchLogsAction => { - return { - batchMode: __expectBoolean(output.batchMode), - logGroupName: __expectString(output.logGroupName), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1CloudwatchMetricAction - */ -const de_CloudwatchMetricAction = (output: any, context: __SerdeContext): CloudwatchMetricAction => { - return { - metricName: __expectString(output.metricName), - metricNamespace: __expectString(output.metricNamespace), - metricTimestamp: __expectString(output.metricTimestamp), - metricUnit: __expectString(output.metricUnit), - metricValue: __expectString(output.metricValue), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1CodeSigning - */ -const de_CodeSigning = (output: any, context: __SerdeContext): CodeSigning => { - return { - awsSignerJobId: __expectString(output.awsSignerJobId), - customCodeSigning: - output.customCodeSigning != null ? de_CustomCodeSigning(output.customCodeSigning, context) : undefined, - startSigningJobParameter: - output.startSigningJobParameter != null - ? de_StartSigningJobParameter(output.startSigningJobParameter, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CodeSigningCertificateChain - */ -const de_CodeSigningCertificateChain = (output: any, context: __SerdeContext): CodeSigningCertificateChain => { - return { - certificateName: __expectString(output.certificateName), - inlineDocument: __expectString(output.inlineDocument), - } as any; -}; - -/** - * deserializeAws_restJson1CodeSigningSignature - */ -const de_CodeSigningSignature = (output: any, context: __SerdeContext): CodeSigningSignature => { - return { - inlineDocument: output.inlineDocument != null ? context.base64Decoder(output.inlineDocument) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; - -/** - * deserializeAws_restJson1CustomCodeSigning - */ -const de_CustomCodeSigning = (output: any, context: __SerdeContext): CustomCodeSigning => { - return { - certificateChain: - output.certificateChain != null ? de_CodeSigningCertificateChain(output.certificateChain, context) : undefined, - hashAlgorithm: __expectString(output.hashAlgorithm), - signature: output.signature != null ? de_CodeSigningSignature(output.signature, context) : undefined, - signatureAlgorithm: __expectString(output.signatureAlgorithm), - } as any; -}; - -/** - * deserializeAws_restJson1Denied - */ -const de_Denied = (output: any, context: __SerdeContext): Denied => { - return { - explicitDeny: output.explicitDeny != null ? de_ExplicitDeny(output.explicitDeny, context) : undefined, - implicitDeny: output.implicitDeny != null ? de_ImplicitDeny(output.implicitDeny, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Destination - */ -const de_Destination = (output: any, context: __SerdeContext): Destination => { - return { - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DetailsMap - */ -const de_DetailsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1DetectMitigationActionExecution - */ -const de_DetectMitigationActionExecution = (output: any, context: __SerdeContext): DetectMitigationActionExecution => { - return { - actionName: __expectString(output.actionName), - errorCode: __expectString(output.errorCode), - executionEndDate: - output.executionEndDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.executionEndDate))) - : undefined, - executionStartDate: - output.executionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.executionStartDate))) - : undefined, - message: __expectString(output.message), - status: __expectString(output.status), - taskId: __expectString(output.taskId), - thingName: __expectString(output.thingName), - violationId: __expectString(output.violationId), - } as any; -}; - -/** - * deserializeAws_restJson1DetectMitigationActionExecutionList - */ -const de_DetectMitigationActionExecutionList = ( - output: any, - context: __SerdeContext -): DetectMitigationActionExecution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectMitigationActionExecution(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DetectMitigationActionsTaskStatistics - */ -const de_DetectMitigationActionsTaskStatistics = ( - output: any, - context: __SerdeContext -): DetectMitigationActionsTaskStatistics => { - return { - actionsExecuted: __expectLong(output.actionsExecuted), - actionsFailed: __expectLong(output.actionsFailed), - actionsSkipped: __expectLong(output.actionsSkipped), - } as any; -}; - -/** - * deserializeAws_restJson1DetectMitigationActionsTaskSummary - */ -const de_DetectMitigationActionsTaskSummary = ( - output: any, - context: __SerdeContext -): DetectMitigationActionsTaskSummary => { - return { - actionsDefinition: - output.actionsDefinition != null ? de_MitigationActionList(output.actionsDefinition, context) : undefined, - onlyActiveViolationsIncluded: __expectBoolean(output.onlyActiveViolationsIncluded), - suppressedAlertsIncluded: __expectBoolean(output.suppressedAlertsIncluded), - target: output.target != null ? de_DetectMitigationActionsTaskTarget(output.target, context) : undefined, - taskEndTime: - output.taskEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.taskEndTime))) - : undefined, - taskId: __expectString(output.taskId), - taskStartTime: - output.taskStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.taskStartTime))) - : undefined, - taskStatistics: - output.taskStatistics != null - ? de_DetectMitigationActionsTaskStatistics(output.taskStatistics, context) - : undefined, - taskStatus: __expectString(output.taskStatus), - violationEventOccurrenceRange: - output.violationEventOccurrenceRange != null - ? de_ViolationEventOccurrenceRange(output.violationEventOccurrenceRange, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DetectMitigationActionsTaskSummaryList - */ -const de_DetectMitigationActionsTaskSummaryList = ( - output: any, - context: __SerdeContext -): DetectMitigationActionsTaskSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectMitigationActionsTaskSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DetectMitigationActionsTaskTarget - */ -const de_DetectMitigationActionsTaskTarget = ( - output: any, - context: __SerdeContext -): DetectMitigationActionsTaskTarget => { - return { - behaviorName: __expectString(output.behaviorName), - securityProfileName: __expectString(output.securityProfileName), - violationIds: - output.violationIds != null - ? de_TargetViolationIdsForDetectMitigationActions(output.violationIds, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DimensionNames - */ -const de_DimensionNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DimensionStringValues - */ -const de_DimensionStringValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DocumentParameter - */ -const de_DocumentParameter = (output: any, context: __SerdeContext): DocumentParameter => { - return { - description: __expectString(output.description), - example: __expectString(output.example), - key: __expectString(output.key), - optional: __expectBoolean(output.optional), - regex: __expectString(output.regex), - } as any; -}; - -/** - * deserializeAws_restJson1DocumentParameters - */ -const de_DocumentParameters = (output: any, context: __SerdeContext): DocumentParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DomainConfigurations - */ -const de_DomainConfigurations = (output: any, context: __SerdeContext): DomainConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainConfigurationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DomainConfigurationSummary - */ -const de_DomainConfigurationSummary = (output: any, context: __SerdeContext): DomainConfigurationSummary => { - return { - domainConfigurationArn: __expectString(output.domainConfigurationArn), - domainConfigurationName: __expectString(output.domainConfigurationName), - serviceType: __expectString(output.serviceType), - } as any; -}; - -/** - * deserializeAws_restJson1DynamoDBAction - */ -const de_DynamoDBAction = (output: any, context: __SerdeContext): DynamoDBAction => { - return { - hashKeyField: __expectString(output.hashKeyField), - hashKeyType: __expectString(output.hashKeyType), - hashKeyValue: __expectString(output.hashKeyValue), - operation: __expectString(output.operation), - payloadField: __expectString(output.payloadField), - rangeKeyField: __expectString(output.rangeKeyField), - rangeKeyType: __expectString(output.rangeKeyType), - rangeKeyValue: __expectString(output.rangeKeyValue), - roleArn: __expectString(output.roleArn), - tableName: __expectString(output.tableName), - } as any; -}; - -/** - * deserializeAws_restJson1DynamoDBv2Action - */ -const de_DynamoDBv2Action = (output: any, context: __SerdeContext): DynamoDBv2Action => { - return { - putItem: output.putItem != null ? de_PutItemInput(output.putItem, context) : undefined, - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1EffectivePolicies - */ -const de_EffectivePolicies = (output: any, context: __SerdeContext): EffectivePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EffectivePolicy(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EffectivePolicy - */ -const de_EffectivePolicy = (output: any, context: __SerdeContext): EffectivePolicy => { - return { - policyArn: __expectString(output.policyArn), - policyDocument: __expectString(output.policyDocument), - policyName: __expectString(output.policyName), - } as any; -}; - -/** - * deserializeAws_restJson1ElasticsearchAction - */ -const de_ElasticsearchAction = (output: any, context: __SerdeContext): ElasticsearchAction => { - return { - endpoint: __expectString(output.endpoint), - id: __expectString(output.id), - index: __expectString(output.index), - roleArn: __expectString(output.roleArn), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1EnableIoTLoggingParams - */ -const de_EnableIoTLoggingParams = (output: any, context: __SerdeContext): EnableIoTLoggingParams => { - return { - logLevel: __expectString(output.logLevel), - roleArnForLogging: __expectString(output.roleArnForLogging), - } as any; -}; - -/** - * deserializeAws_restJson1Environments - */ -const de_Environments = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ErrorInfo - */ -const de_ErrorInfo = (output: any, context: __SerdeContext): ErrorInfo => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_restJson1EventConfigurations - */ -const de_EventConfigurations = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [EventType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Configuration(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_restJson1ExplicitDeny - */ -const de_ExplicitDeny = (output: any, context: __SerdeContext): ExplicitDeny => { - return { - policies: output.policies != null ? de_Policies(output.policies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ExponentialRolloutRate - */ -const de_ExponentialRolloutRate = (output: any, context: __SerdeContext): ExponentialRolloutRate => { - return { - baseRatePerMinute: __expectInt32(output.baseRatePerMinute), - incrementFactor: __limitedParseDouble(output.incrementFactor), - rateIncreaseCriteria: - output.rateIncreaseCriteria != null ? de_RateIncreaseCriteria(output.rateIncreaseCriteria, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Field - */ -const de_Field = (output: any, context: __SerdeContext): Field => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1Fields - */ -const de_Fields = (output: any, context: __SerdeContext): Field[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Field(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FileLocation - */ -const de_FileLocation = (output: any, context: __SerdeContext): FileLocation => { - return { - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - stream: output.stream != null ? de__Stream(output.stream, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FindingIds - */ -const de_FindingIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FirehoseAction - */ -const de_FirehoseAction = (output: any, context: __SerdeContext): FirehoseAction => { - return { - batchMode: __expectBoolean(output.batchMode), - deliveryStreamName: __expectString(output.deliveryStreamName), - roleArn: __expectString(output.roleArn), - separator: __expectString(output.separator), - } as any; -}; - -/** - * deserializeAws_restJson1FleetMetricNameAndArn - */ -const de_FleetMetricNameAndArn = (output: any, context: __SerdeContext): FleetMetricNameAndArn => { - return { - metricArn: __expectString(output.metricArn), - metricName: __expectString(output.metricName), - } as any; -}; - -/** - * deserializeAws_restJson1FleetMetricNameAndArnList - */ -const de_FleetMetricNameAndArnList = (output: any, context: __SerdeContext): FleetMetricNameAndArn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FleetMetricNameAndArn(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1GroupNameAndArn - */ -const de_GroupNameAndArn = (output: any, context: __SerdeContext): GroupNameAndArn => { - return { - groupArn: __expectString(output.groupArn), - groupName: __expectString(output.groupName), - } as any; -}; - -/** - * deserializeAws_restJson1HeaderList - */ -const de_HeaderList = (output: any, context: __SerdeContext): HttpActionHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpActionHeader(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1HttpAction - */ -const de_HttpAction = (output: any, context: __SerdeContext): HttpAction => { - return { - auth: output.auth != null ? de_HttpAuthorization(output.auth, context) : undefined, - confirmationUrl: __expectString(output.confirmationUrl), - headers: output.headers != null ? de_HeaderList(output.headers, context) : undefined, - url: __expectString(output.url), - } as any; -}; - -/** - * deserializeAws_restJson1HttpActionHeader - */ -const de_HttpActionHeader = (output: any, context: __SerdeContext): HttpActionHeader => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_restJson1HttpAuthorization - */ -const de_HttpAuthorization = (output: any, context: __SerdeContext): HttpAuthorization => { - return { - sigv4: output.sigv4 != null ? de_SigV4Authorization(output.sigv4, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1HttpUrlDestinationProperties - */ -const de_HttpUrlDestinationProperties = (output: any, context: __SerdeContext): HttpUrlDestinationProperties => { - return { - confirmationUrl: __expectString(output.confirmationUrl), - } as any; -}; - -/** - * deserializeAws_restJson1HttpUrlDestinationSummary - */ -const de_HttpUrlDestinationSummary = (output: any, context: __SerdeContext): HttpUrlDestinationSummary => { - return { - confirmationUrl: __expectString(output.confirmationUrl), - } as any; -}; - -/** - * deserializeAws_restJson1ImplicitDeny - */ -const de_ImplicitDeny = (output: any, context: __SerdeContext): ImplicitDeny => { - return { - policies: output.policies != null ? de_Policies(output.policies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1IndexingFilter - */ -const de_IndexingFilter = (output: any, context: __SerdeContext): IndexingFilter => { - return { - namedShadowNames: - output.namedShadowNames != null ? de_NamedShadowNamesFilter(output.namedShadowNames, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1IndexNamesList - */ -const de_IndexNamesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1IotAnalyticsAction - */ -const de_IotAnalyticsAction = (output: any, context: __SerdeContext): IotAnalyticsAction => { - return { - batchMode: __expectBoolean(output.batchMode), - channelArn: __expectString(output.channelArn), - channelName: __expectString(output.channelName), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1IotEventsAction - */ -const de_IotEventsAction = (output: any, context: __SerdeContext): IotEventsAction => { - return { - batchMode: __expectBoolean(output.batchMode), - inputName: __expectString(output.inputName), - messageId: __expectString(output.messageId), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1IotSiteWiseAction - */ -const de_IotSiteWiseAction = (output: any, context: __SerdeContext): IotSiteWiseAction => { - return { - putAssetPropertyValueEntries: - output.putAssetPropertyValueEntries != null - ? de_PutAssetPropertyValueEntryList(output.putAssetPropertyValueEntries, context) - : undefined, - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1IssuerCertificateIdentifier - */ -const de_IssuerCertificateIdentifier = (output: any, context: __SerdeContext): IssuerCertificateIdentifier => { - return { - issuerCertificateSerialNumber: __expectString(output.issuerCertificateSerialNumber), - issuerCertificateSubject: __expectString(output.issuerCertificateSubject), - issuerId: __expectString(output.issuerId), - } as any; -}; +// se_SecurityGroupList omitted. -/** - * deserializeAws_restJson1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - abortConfig: output.abortConfig != null ? de_AbortConfig(output.abortConfig, context) : undefined, - comment: __expectString(output.comment), - completedAt: - output.completedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completedAt))) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - documentParameters: - output.documentParameters != null ? de_ParameterMap(output.documentParameters, context) : undefined, - forceCanceled: __expectBoolean(output.forceCanceled), - isConcurrent: __expectBoolean(output.isConcurrent), - jobArn: __expectString(output.jobArn), - jobExecutionsRetryConfig: - output.jobExecutionsRetryConfig != null - ? de_JobExecutionsRetryConfig(output.jobExecutionsRetryConfig, context) - : undefined, - jobExecutionsRolloutConfig: - output.jobExecutionsRolloutConfig != null - ? de_JobExecutionsRolloutConfig(output.jobExecutionsRolloutConfig, context) - : undefined, - jobId: __expectString(output.jobId), - jobProcessDetails: - output.jobProcessDetails != null ? de_JobProcessDetails(output.jobProcessDetails, context) : undefined, - jobTemplateArn: __expectString(output.jobTemplateArn), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - namespaceId: __expectString(output.namespaceId), - presignedUrlConfig: - output.presignedUrlConfig != null ? de_PresignedUrlConfig(output.presignedUrlConfig, context) : undefined, - reasonCode: __expectString(output.reasonCode), - scheduledJobRollouts: - output.scheduledJobRollouts != null - ? de_ScheduledJobRolloutList(output.scheduledJobRollouts, context) - : undefined, - schedulingConfig: - output.schedulingConfig != null ? de_SchedulingConfig(output.schedulingConfig, context) : undefined, - status: __expectString(output.status), - targetSelection: __expectString(output.targetSelection), - targets: output.targets != null ? de_JobTargets(output.targets, context) : undefined, - timeoutConfig: output.timeoutConfig != null ? de_TimeoutConfig(output.timeoutConfig, context) : undefined, - } as any; -}; +// se_ServerCertificateArns omitted. -/** - * deserializeAws_restJson1JobExecution - */ -const de_JobExecution = (output: any, context: __SerdeContext): JobExecution => { - return { - approximateSecondsBeforeTimedOut: __expectLong(output.approximateSecondsBeforeTimedOut), - executionNumber: __expectLong(output.executionNumber), - forceCanceled: __expectBoolean(output.forceCanceled), - jobId: __expectString(output.jobId), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - queuedAt: - output.queuedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.queuedAt))) : undefined, - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - status: __expectString(output.status), - statusDetails: - output.statusDetails != null ? de_JobExecutionStatusDetails(output.statusDetails, context) : undefined, - thingArn: __expectString(output.thingArn), - versionNumber: __expectLong(output.versionNumber), - } as any; -}; +// se_SigningProfileParameter omitted. -/** - * deserializeAws_restJson1JobExecutionsRetryConfig - */ -const de_JobExecutionsRetryConfig = (output: any, context: __SerdeContext): JobExecutionsRetryConfig => { - return { - criteriaList: output.criteriaList != null ? de_RetryCriteriaList(output.criteriaList, context) : undefined, - } as any; -}; +// se_SigV4Authorization omitted. -/** - * deserializeAws_restJson1JobExecutionsRolloutConfig - */ -const de_JobExecutionsRolloutConfig = (output: any, context: __SerdeContext): JobExecutionsRolloutConfig => { - return { - exponentialRate: - output.exponentialRate != null ? de_ExponentialRolloutRate(output.exponentialRate, context) : undefined, - maximumPerMinute: __expectInt32(output.maximumPerMinute), - } as any; -}; +// se_SnsAction omitted. -/** - * deserializeAws_restJson1JobExecutionStatusDetails - */ -const de_JobExecutionStatusDetails = (output: any, context: __SerdeContext): JobExecutionStatusDetails => { - return { - detailsMap: output.detailsMap != null ? de_DetailsMap(output.detailsMap, context) : undefined, - } as any; -}; +// se_SqsAction omitted. -/** - * deserializeAws_restJson1JobExecutionSummary - */ -const de_JobExecutionSummary = (output: any, context: __SerdeContext): JobExecutionSummary => { - return { - executionNumber: __expectLong(output.executionNumber), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - queuedAt: - output.queuedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.queuedAt))) : undefined, - retryAttempt: __expectInt32(output.retryAttempt), - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - status: __expectString(output.status), - } as any; -}; +// se_StartSigningJobParameter omitted. -/** - * deserializeAws_restJson1JobExecutionSummaryForJob - */ -const de_JobExecutionSummaryForJob = (output: any, context: __SerdeContext): JobExecutionSummaryForJob => { - return { - jobExecutionSummary: - output.jobExecutionSummary != null ? de_JobExecutionSummary(output.jobExecutionSummary, context) : undefined, - thingArn: __expectString(output.thingArn), - } as any; -}; +// se_StatisticalThreshold omitted. -/** - * deserializeAws_restJson1JobExecutionSummaryForJobList - */ -const de_JobExecutionSummaryForJobList = (output: any, context: __SerdeContext): JobExecutionSummaryForJob[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobExecutionSummaryForJob(entry, context); - }); - return retVal; -}; +// se_StepFunctionsAction omitted. -/** - * deserializeAws_restJson1JobExecutionSummaryForThing - */ -const de_JobExecutionSummaryForThing = (output: any, context: __SerdeContext): JobExecutionSummaryForThing => { - return { - jobExecutionSummary: - output.jobExecutionSummary != null ? de_JobExecutionSummary(output.jobExecutionSummary, context) : undefined, - jobId: __expectString(output.jobId), - } as any; -}; +// se__Stream omitted. -/** - * deserializeAws_restJson1JobExecutionSummaryForThingList - */ -const de_JobExecutionSummaryForThingList = (output: any, context: __SerdeContext): JobExecutionSummaryForThing[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobExecutionSummaryForThing(entry, context); - }); - return retVal; -}; +// se_StreamFile omitted. -/** - * deserializeAws_restJson1JobProcessDetails - */ -const de_JobProcessDetails = (output: any, context: __SerdeContext): JobProcessDetails => { - return { - numberOfCanceledThings: __expectInt32(output.numberOfCanceledThings), - numberOfFailedThings: __expectInt32(output.numberOfFailedThings), - numberOfInProgressThings: __expectInt32(output.numberOfInProgressThings), - numberOfQueuedThings: __expectInt32(output.numberOfQueuedThings), - numberOfRejectedThings: __expectInt32(output.numberOfRejectedThings), - numberOfRemovedThings: __expectInt32(output.numberOfRemovedThings), - numberOfSucceededThings: __expectInt32(output.numberOfSucceededThings), - numberOfTimedOutThings: __expectInt32(output.numberOfTimedOutThings), - processingTargets: - output.processingTargets != null ? de_ProcessingTargetNameList(output.processingTargets, context) : undefined, - } as any; -}; +// se_StreamFiles omitted. -/** - * deserializeAws_restJson1JobSummary - */ -const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { - return { - completedAt: - output.completedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completedAt))) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - isConcurrent: __expectBoolean(output.isConcurrent), - jobArn: __expectString(output.jobArn), - jobId: __expectString(output.jobId), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - status: __expectString(output.status), - targetSelection: __expectString(output.targetSelection), - thingGroupId: __expectString(output.thingGroupId), - } as any; -}; +// se_StringList omitted. -/** - * deserializeAws_restJson1JobSummaryList - */ -const de_JobSummaryList = (output: any, context: __SerdeContext): JobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobSummary(entry, context); - }); - return retVal; -}; +// se_SubnetIdList omitted. -/** - * deserializeAws_restJson1JobTargets - */ -const de_JobTargets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_Tag omitted. -/** - * deserializeAws_restJson1JobTemplateSummary - */ -const de_JobTemplateSummary = (output: any, context: __SerdeContext): JobTemplateSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - jobTemplateArn: __expectString(output.jobTemplateArn), - jobTemplateId: __expectString(output.jobTemplateId), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_restJson1JobTemplateSummaryList - */ -const de_JobTemplateSummaryList = (output: any, context: __SerdeContext): JobTemplateSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobTemplateSummary(entry, context); - }); - return retVal; -}; +// se_TagList omitted. -/** - * deserializeAws_restJson1KafkaAction - */ -const de_KafkaAction = (output: any, context: __SerdeContext): KafkaAction => { - return { - clientProperties: - output.clientProperties != null ? de_ClientProperties(output.clientProperties, context) : undefined, - destinationArn: __expectString(output.destinationArn), - key: __expectString(output.key), - partition: __expectString(output.partition), - topic: __expectString(output.topic), - } as any; -}; +// se_TargetAuditCheckNames omitted. -/** - * deserializeAws_restJson1KeyPair - */ -const de_KeyPair = (output: any, context: __SerdeContext): KeyPair => { - return { - PrivateKey: __expectString(output.PrivateKey), - PublicKey: __expectString(output.PublicKey), - } as any; -}; +// se_Targets omitted. -/** - * deserializeAws_restJson1KinesisAction - */ -const de_KinesisAction = (output: any, context: __SerdeContext): KinesisAction => { - return { - partitionKey: __expectString(output.partitionKey), - roleArn: __expectString(output.roleArn), - streamName: __expectString(output.streamName), - } as any; -}; +// se_TargetViolationIdsForDetectMitigationActions omitted. -/** - * deserializeAws_restJson1LambdaAction - */ -const de_LambdaAction = (output: any, context: __SerdeContext): LambdaAction => { - return { - functionArn: __expectString(output.functionArn), - } as any; -}; +// se_TermsAggregation omitted. -/** - * deserializeAws_restJson1LocationAction - */ -const de_LocationAction = (output: any, context: __SerdeContext): LocationAction => { - return { - deviceId: __expectString(output.deviceId), - latitude: __expectString(output.latitude), - longitude: __expectString(output.longitude), - roleArn: __expectString(output.roleArn), - timestamp: output.timestamp != null ? de_LocationTimestamp(output.timestamp, context) : undefined, - trackerName: __expectString(output.trackerName), - } as any; -}; +// se_ThingGroupIndexingConfiguration omitted. -/** - * deserializeAws_restJson1LocationTimestamp - */ -const de_LocationTimestamp = (output: any, context: __SerdeContext): LocationTimestamp => { - return { - unit: __expectString(output.unit), - value: __expectString(output.value), - } as any; -}; +// se_ThingGroupList omitted. -/** - * deserializeAws_restJson1LogTarget - */ -const de_LogTarget = (output: any, context: __SerdeContext): LogTarget => { - return { - targetName: __expectString(output.targetName), - targetType: __expectString(output.targetType), - } as any; -}; +// se_ThingGroupNames omitted. -/** - * deserializeAws_restJson1LogTargetConfiguration - */ -const de_LogTargetConfiguration = (output: any, context: __SerdeContext): LogTargetConfiguration => { - return { - logLevel: __expectString(output.logLevel), - logTarget: output.logTarget != null ? de_LogTarget(output.logTarget, context) : undefined, - } as any; -}; +// se_ThingGroupProperties omitted. -/** - * deserializeAws_restJson1LogTargetConfigurations - */ -const de_LogTargetConfigurations = (output: any, context: __SerdeContext): LogTargetConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogTargetConfiguration(entry, context); - }); - return retVal; -}; +// se_ThingIndexingConfiguration omitted. -/** - * deserializeAws_restJson1MachineLearningDetectionConfig - */ -const de_MachineLearningDetectionConfig = (output: any, context: __SerdeContext): MachineLearningDetectionConfig => { - return { - confidenceLevel: __expectString(output.confidenceLevel), - } as any; -}; +// se_ThingTypeProperties omitted. -/** - * deserializeAws_restJson1MaintenanceWindow - */ -const de_MaintenanceWindow = (output: any, context: __SerdeContext): MaintenanceWindow => { - return { - durationInMinutes: __expectInt32(output.durationInMinutes), - startTime: __expectString(output.startTime), - } as any; -}; +// se_TimeoutConfig omitted. -/** - * deserializeAws_restJson1MaintenanceWindows - */ -const de_MaintenanceWindows = (output: any, context: __SerdeContext): MaintenanceWindow[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindow(entry, context); - }); - return retVal; -}; +// se_TimestreamAction omitted. -/** - * deserializeAws_restJson1ManagedJobTemplatesSummaryList - */ -const de_ManagedJobTemplatesSummaryList = (output: any, context: __SerdeContext): ManagedJobTemplateSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedJobTemplateSummary(entry, context); - }); - return retVal; -}; +// se_TimestreamDimension omitted. -/** - * deserializeAws_restJson1ManagedJobTemplateSummary - */ -const de_ManagedJobTemplateSummary = (output: any, context: __SerdeContext): ManagedJobTemplateSummary => { - return { - description: __expectString(output.description), - environments: output.environments != null ? de_Environments(output.environments, context) : undefined, - templateArn: __expectString(output.templateArn), - templateName: __expectString(output.templateName), - templateVersion: __expectString(output.templateVersion), - } as any; -}; +// se_TimestreamDimensionList omitted. -/** - * deserializeAws_restJson1MetricDatum - */ -const de_MetricDatum = (output: any, context: __SerdeContext): MetricDatum => { - return { - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - value: output.value != null ? de_MetricValue(output.value, context) : undefined, - } as any; -}; +// se_TimestreamTimestamp omitted. -/** - * deserializeAws_restJson1MetricDatumList - */ -const de_MetricDatumList = (output: any, context: __SerdeContext): MetricDatum[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDatum(entry, context); - }); - return retVal; -}; +// se_TlsContext omitted. -/** - * deserializeAws_restJson1MetricDimension - */ -const de_MetricDimension = (output: any, context: __SerdeContext): MetricDimension => { - return { - dimensionName: __expectString(output.dimensionName), - operator: __expectString(output.operator), - } as any; -}; +// se_TopicRuleDestinationConfiguration omitted. -/** - * deserializeAws_restJson1MetricNames - */ -const de_MetricNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_TopicRulePayload omitted. -/** - * deserializeAws_restJson1MetricToRetain - */ -const de_MetricToRetain = (output: any, context: __SerdeContext): MetricToRetain => { - return { - metric: __expectString(output.metric), - metricDimension: output.metricDimension != null ? de_MetricDimension(output.metricDimension, context) : undefined, - } as any; -}; +// se_UpdateCACertificateParams omitted. -/** - * deserializeAws_restJson1MetricValue - */ -const de_MetricValue = (output: any, context: __SerdeContext): MetricValue => { - return { - cidrs: output.cidrs != null ? de_Cidrs(output.cidrs, context) : undefined, - count: __expectLong(output.count), - number: __limitedParseDouble(output.number), - numbers: output.numbers != null ? de_NumberList(output.numbers, context) : undefined, - ports: output.ports != null ? de_Ports(output.ports, context) : undefined, - strings: output.strings != null ? de_StringList(output.strings, context) : undefined, - } as any; -}; +// se_UpdateDeviceCertificateParams omitted. -/** - * deserializeAws_restJson1MissingContextValues - */ -const de_MissingContextValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UserProperties omitted. -/** - * deserializeAws_restJson1MitigationAction - */ -const de_MitigationAction = (output: any, context: __SerdeContext): MitigationAction => { - return { - actionParams: output.actionParams != null ? de_MitigationActionParams(output.actionParams, context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - } as any; -}; +// se_UserProperty omitted. /** - * deserializeAws_restJson1MitigationActionIdentifier + * serializeAws_restJson1ViolationEventOccurrenceRange */ -const de_MitigationActionIdentifier = (output: any, context: __SerdeContext): MitigationActionIdentifier => { - return { - actionArn: __expectString(output.actionArn), - actionName: __expectString(output.actionName), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - } as any; +const se_ViolationEventOccurrenceRange = (input: ViolationEventOccurrenceRange, context: __SerdeContext): any => { + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_VpcDestinationConfiguration omitted. + /** - * deserializeAws_restJson1MitigationActionIdentifierList + * deserializeAws_restJson1AbortConfig */ -const de_MitigationActionIdentifierList = (output: any, context: __SerdeContext): MitigationActionIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MitigationActionIdentifier(entry, context); - }); - return retVal; +const de_AbortConfig = (output: any, context: __SerdeContext): AbortConfig => { + return take(output, { + criteriaList: (_: any) => de_AbortCriteriaList(_, context), + }) as any; }; /** - * deserializeAws_restJson1MitigationActionList + * deserializeAws_restJson1AbortCriteria */ -const de_MitigationActionList = (output: any, context: __SerdeContext): MitigationAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MitigationAction(entry, context); - }); - return retVal; +const de_AbortCriteria = (output: any, context: __SerdeContext): AbortCriteria => { + return take(output, { + action: __expectString, + failureType: __expectString, + minNumberOfExecutedThings: __expectInt32, + thresholdPercentage: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1MitigationActionNameList + * deserializeAws_restJson1AbortCriteriaList */ -const de_MitigationActionNameList = (output: any, context: __SerdeContext): string[] => { +const de_AbortCriteriaList = (output: any, context: __SerdeContext): AbortCriteria[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AbortCriteria(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MitigationActionParams - */ -const de_MitigationActionParams = (output: any, context: __SerdeContext): MitigationActionParams => { - return { - addThingsToThingGroupParams: - output.addThingsToThingGroupParams != null - ? de_AddThingsToThingGroupParams(output.addThingsToThingGroupParams, context) - : undefined, - enableIoTLoggingParams: - output.enableIoTLoggingParams != null - ? de_EnableIoTLoggingParams(output.enableIoTLoggingParams, context) - : undefined, - publishFindingToSnsParams: - output.publishFindingToSnsParams != null - ? de_PublishFindingToSnsParams(output.publishFindingToSnsParams, context) - : undefined, - replaceDefaultPolicyVersionParams: - output.replaceDefaultPolicyVersionParams != null - ? de_ReplaceDefaultPolicyVersionParams(output.replaceDefaultPolicyVersionParams, context) - : undefined, - updateCACertificateParams: - output.updateCACertificateParams != null - ? de_UpdateCACertificateParams(output.updateCACertificateParams, context) - : undefined, - updateDeviceCertificateParams: - output.updateDeviceCertificateParams != null - ? de_UpdateDeviceCertificateParams(output.updateDeviceCertificateParams, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1MqttHeaders - */ -const de_MqttHeaders = (output: any, context: __SerdeContext): MqttHeaders => { - return { - contentType: __expectString(output.contentType), - correlationData: __expectString(output.correlationData), - messageExpiry: __expectString(output.messageExpiry), - payloadFormatIndicator: __expectString(output.payloadFormatIndicator), - responseTopic: __expectString(output.responseTopic), - userProperties: output.userProperties != null ? de_UserProperties(output.userProperties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1NamedShadowNamesFilter - */ -const de_NamedShadowNamesFilter = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Action omitted. + +// de_ActionList omitted. /** - * deserializeAws_restJson1NonCompliantResource + * deserializeAws_restJson1ActiveViolation */ -const de_NonCompliantResource = (output: any, context: __SerdeContext): NonCompliantResource => { - return { - additionalInfo: output.additionalInfo != null ? de_StringMap(output.additionalInfo, context) : undefined, - resourceIdentifier: - output.resourceIdentifier != null ? de_ResourceIdentifier(output.resourceIdentifier, context) : undefined, - resourceType: __expectString(output.resourceType), - } as any; +const de_ActiveViolation = (output: any, context: __SerdeContext): ActiveViolation => { + return take(output, { + behavior: (_: any) => de_Behavior(_, context), + lastViolationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastViolationValue: (_: any) => de_MetricValue(_, context), + securityProfileName: __expectString, + thingName: __expectString, + verificationState: __expectString, + verificationStateDescription: __expectString, + violationEventAdditionalInfo: _json, + violationId: __expectString, + violationStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1NumberList + * deserializeAws_restJson1ActiveViolations */ -const de_NumberList = (output: any, context: __SerdeContext): number[] => { +const de_ActiveViolations = (output: any, context: __SerdeContext): ActiveViolation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __limitedParseDouble(entry) as any; + return de_ActiveViolation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1OpenSearchAction - */ -const de_OpenSearchAction = (output: any, context: __SerdeContext): OpenSearchAction => { - return { - endpoint: __expectString(output.endpoint), - id: __expectString(output.id), - index: __expectString(output.index), - roleArn: __expectString(output.roleArn), - type: __expectString(output.type), - } as any; -}; +// de_AdditionalMetricsToRetainList omitted. -/** - * deserializeAws_restJson1OTAUpdateFile - */ -const de_OTAUpdateFile = (output: any, context: __SerdeContext): OTAUpdateFile => { - return { - attributes: output.attributes != null ? de_AttributesMap(output.attributes, context) : undefined, - codeSigning: output.codeSigning != null ? de_CodeSigning(output.codeSigning, context) : undefined, - fileLocation: output.fileLocation != null ? de_FileLocation(output.fileLocation, context) : undefined, - fileName: __expectString(output.fileName), - fileType: __expectInt32(output.fileType), - fileVersion: __expectString(output.fileVersion), - } as any; -}; +// de_AdditionalMetricsToRetainV2List omitted. -/** - * deserializeAws_restJson1OTAUpdateFiles - */ -const de_OTAUpdateFiles = (output: any, context: __SerdeContext): OTAUpdateFile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OTAUpdateFile(entry, context); - }); - return retVal; -}; +// de_AdditionalParameterMap omitted. -/** - * deserializeAws_restJson1OTAUpdateInfo - */ -const de_OTAUpdateInfo = (output: any, context: __SerdeContext): OTAUpdateInfo => { - return { - additionalParameters: - output.additionalParameters != null ? de_AdditionalParameterMap(output.additionalParameters, context) : undefined, - awsIotJobArn: __expectString(output.awsIotJobArn), - awsIotJobId: __expectString(output.awsIotJobId), - awsJobExecutionsRolloutConfig: - output.awsJobExecutionsRolloutConfig != null - ? de_AwsJobExecutionsRolloutConfig(output.awsJobExecutionsRolloutConfig, context) - : undefined, - awsJobPresignedUrlConfig: - output.awsJobPresignedUrlConfig != null - ? de_AwsJobPresignedUrlConfig(output.awsJobPresignedUrlConfig, context) - : undefined, - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - errorInfo: output.errorInfo != null ? de_ErrorInfo(output.errorInfo, context) : undefined, - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - otaUpdateArn: __expectString(output.otaUpdateArn), - otaUpdateFiles: output.otaUpdateFiles != null ? de_OTAUpdateFiles(output.otaUpdateFiles, context) : undefined, - otaUpdateId: __expectString(output.otaUpdateId), - otaUpdateStatus: __expectString(output.otaUpdateStatus), - protocols: output.protocols != null ? de_Protocols(output.protocols, context) : undefined, - targetSelection: __expectString(output.targetSelection), - targets: output.targets != null ? de_Targets(output.targets, context) : undefined, - } as any; -}; +// de_AddThingsToThingGroupParams omitted. -/** - * deserializeAws_restJson1OTAUpdatesSummary - */ -const de_OTAUpdatesSummary = (output: any, context: __SerdeContext): OTAUpdateSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OTAUpdateSummary(entry, context); - }); - return retVal; -}; +// de_AggregationType omitted. -/** - * deserializeAws_restJson1OTAUpdateSummary - */ -const de_OTAUpdateSummary = (output: any, context: __SerdeContext): OTAUpdateSummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - otaUpdateArn: __expectString(output.otaUpdateArn), - otaUpdateId: __expectString(output.otaUpdateId), - } as any; -}; +// de_AggregationTypeValues omitted. -/** - * deserializeAws_restJson1OutgoingCertificate - */ -const de_OutgoingCertificate = (output: any, context: __SerdeContext): OutgoingCertificate => { - return { - certificateArn: __expectString(output.certificateArn), - certificateId: __expectString(output.certificateId), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - transferDate: - output.transferDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.transferDate))) - : undefined, - transferMessage: __expectString(output.transferMessage), - transferredTo: __expectString(output.transferredTo), - } as any; -}; +// de_AlertTarget omitted. -/** - * deserializeAws_restJson1OutgoingCertificates - */ -const de_OutgoingCertificates = (output: any, context: __SerdeContext): OutgoingCertificate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutgoingCertificate(entry, context); - }); - return retVal; -}; +// de_AlertTargets omitted. + +// de_Allowed omitted. + +// de_AssetPropertyTimestamp omitted. + +// de_AssetPropertyValue omitted. + +// de_AssetPropertyValueList omitted. + +// de_AssetPropertyVariant omitted. + +// de_AttributePayload omitted. + +// de_Attributes omitted. + +// de_AttributesMap omitted. + +// de_AuditCheckConfiguration omitted. + +// de_AuditCheckConfigurations omitted. + +// de_AuditCheckDetails omitted. + +// de_AuditCheckToActionsMapping omitted. + +// de_AuditCheckToReasonCodeFilter omitted. + +// de_AuditDetails omitted. /** - * deserializeAws_restJson1ParameterMap + * deserializeAws_restJson1AuditFinding */ -const de_ParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_AuditFinding = (output: any, context: __SerdeContext): AuditFinding => { + return take(output, { + checkName: __expectString, + findingId: __expectString, + findingTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + isSuppressed: __expectBoolean, + nonCompliantResource: _json, + reasonForNonCompliance: __expectString, + reasonForNonComplianceCode: __expectString, + relatedResources: _json, + severity: __expectString, + taskId: __expectString, + taskStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1Percentiles + * deserializeAws_restJson1AuditFindings */ -const de_Percentiles = (output: any, context: __SerdeContext): PercentPair[] => { +const de_AuditFindings = (output: any, context: __SerdeContext): AuditFinding[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PercentPair(entry, context); + return de_AuditFinding(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1PercentPair + * deserializeAws_restJson1AuditMitigationActionExecutionMetadata */ -const de_PercentPair = (output: any, context: __SerdeContext): PercentPair => { - return { - percent: __limitedParseDouble(output.percent), - value: __limitedParseDouble(output.value), - } as any; +const de_AuditMitigationActionExecutionMetadata = ( + output: any, + context: __SerdeContext +): AuditMitigationActionExecutionMetadata => { + return take(output, { + actionId: __expectString, + actionName: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errorCode: __expectString, + findingId: __expectString, + message: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + taskId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1Policies + * deserializeAws_restJson1AuditMitigationActionExecutionMetadataList */ -const de_Policies = (output: any, context: __SerdeContext): Policy[] => { +const de_AuditMitigationActionExecutionMetadataList = ( + output: any, + context: __SerdeContext +): AuditMitigationActionExecutionMetadata[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Policy(entry, context); + return de_AuditMitigationActionExecutionMetadata(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1Policy + * deserializeAws_restJson1AuditMitigationActionsTaskMetadata */ -const de_Policy = (output: any, context: __SerdeContext): Policy => { - return { - policyArn: __expectString(output.policyArn), - policyName: __expectString(output.policyName), - } as any; +const de_AuditMitigationActionsTaskMetadata = ( + output: any, + context: __SerdeContext +): AuditMitigationActionsTaskMetadata => { + return take(output, { + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + taskId: __expectString, + taskStatus: __expectString, + }) as any; }; /** - * deserializeAws_restJson1PolicyDocuments + * deserializeAws_restJson1AuditMitigationActionsTaskMetadataList */ -const de_PolicyDocuments = (output: any, context: __SerdeContext): string[] => { +const de_AuditMitigationActionsTaskMetadataList = ( + output: any, + context: __SerdeContext +): AuditMitigationActionsTaskMetadata[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AuditMitigationActionsTaskMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PolicyTargets - */ -const de_PolicyTargets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuditMitigationActionsTaskStatistics omitted. -/** - * deserializeAws_restJson1PolicyVersion - */ -const de_PolicyVersion = (output: any, context: __SerdeContext): PolicyVersion => { - return { - createDate: - output.createDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createDate))) : undefined, - isDefaultVersion: __expectBoolean(output.isDefaultVersion), - versionId: __expectString(output.versionId), - } as any; -}; +// de_AuditMitigationActionsTaskTarget omitted. -/** - * deserializeAws_restJson1PolicyVersionIdentifier - */ -const de_PolicyVersionIdentifier = (output: any, context: __SerdeContext): PolicyVersionIdentifier => { - return { - policyName: __expectString(output.policyName), - policyVersionId: __expectString(output.policyVersionId), - } as any; -}; +// de_AuditNotificationTarget omitted. + +// de_AuditNotificationTargetConfigurations omitted. /** - * deserializeAws_restJson1PolicyVersions + * deserializeAws_restJson1AuditSuppression */ -const de_PolicyVersions = (output: any, context: __SerdeContext): PolicyVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyVersion(entry, context); - }); - return retVal; +const de_AuditSuppression = (output: any, context: __SerdeContext): AuditSuppression => { + return take(output, { + checkName: __expectString, + description: __expectString, + expirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceIdentifier: _json, + suppressIndefinitely: __expectBoolean, + }) as any; }; /** - * deserializeAws_restJson1Ports + * deserializeAws_restJson1AuditSuppressionList */ -const de_Ports = (output: any, context: __SerdeContext): number[] => { +const de_AuditSuppressionList = (output: any, context: __SerdeContext): AuditSuppression[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; + return de_AuditSuppression(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PresignedUrlConfig - */ -const de_PresignedUrlConfig = (output: any, context: __SerdeContext): PresignedUrlConfig => { - return { - expiresInSec: __expectLong(output.expiresInSec), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_AuditTaskMetadata omitted. -/** - * deserializeAws_restJson1Principals - */ -const de_Principals = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuditTaskMetadataList omitted. -/** - * deserializeAws_restJson1ProcessingTargetNameList - */ -const de_ProcessingTargetNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuthInfo omitted. -/** - * deserializeAws_restJson1Protocols - */ -const de_Protocols = (output: any, context: __SerdeContext): (Protocol | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuthorizerConfig omitted. /** - * deserializeAws_restJson1ProvisioningHook + * deserializeAws_restJson1AuthorizerDescription */ -const de_ProvisioningHook = (output: any, context: __SerdeContext): ProvisioningHook => { - return { - payloadVersion: __expectString(output.payloadVersion), - targetArn: __expectString(output.targetArn), - } as any; +const de_AuthorizerDescription = (output: any, context: __SerdeContext): AuthorizerDescription => { + return take(output, { + authorizerArn: __expectString, + authorizerFunctionArn: __expectString, + authorizerName: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + enableCachingForHttp: __expectBoolean, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + signingDisabled: __expectBoolean, + status: __expectString, + tokenKeyName: __expectString, + tokenSigningPublicKeys: _json, + }) as any; }; -/** - * deserializeAws_restJson1ProvisioningTemplateListing - */ -const de_ProvisioningTemplateListing = (output: any, context: __SerdeContext): ProvisioningTemplateSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningTemplateSummary(entry, context); - }); - return retVal; -}; +// de_Authorizers omitted. + +// de_AuthorizerSummary omitted. + +// de_AuthResult omitted. + +// de_AuthResults omitted. /** - * deserializeAws_restJson1ProvisioningTemplateSummary + * deserializeAws_restJson1AwsJobExecutionsRolloutConfig */ -const de_ProvisioningTemplateSummary = (output: any, context: __SerdeContext): ProvisioningTemplateSummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - enabled: __expectBoolean(output.enabled), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - templateArn: __expectString(output.templateArn), - templateName: __expectString(output.templateName), - type: __expectString(output.type), - } as any; +const de_AwsJobExecutionsRolloutConfig = (output: any, context: __SerdeContext): AwsJobExecutionsRolloutConfig => { + return take(output, { + exponentialRate: (_: any) => de_AwsJobExponentialRolloutRate(_, context), + maximumPerMinute: __expectInt32, + }) as any; }; /** - * deserializeAws_restJson1ProvisioningTemplateVersionListing + * deserializeAws_restJson1AwsJobExponentialRolloutRate */ -const de_ProvisioningTemplateVersionListing = ( - output: any, - context: __SerdeContext -): ProvisioningTemplateVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningTemplateVersionSummary(entry, context); - }); - return retVal; +const de_AwsJobExponentialRolloutRate = (output: any, context: __SerdeContext): AwsJobExponentialRolloutRate => { + return take(output, { + baseRatePerMinute: __expectInt32, + incrementFactor: __limitedParseDouble, + rateIncreaseCriteria: _json, + }) as any; }; +// de_AwsJobPresignedUrlConfig omitted. + +// de_AwsJobRateIncreaseCriteria omitted. + /** - * deserializeAws_restJson1ProvisioningTemplateVersionSummary + * deserializeAws_restJson1Behavior */ -const de_ProvisioningTemplateVersionSummary = ( - output: any, - context: __SerdeContext -): ProvisioningTemplateVersionSummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - isDefaultVersion: __expectBoolean(output.isDefaultVersion), - versionId: __expectInt32(output.versionId), - } as any; +const de_Behavior = (output: any, context: __SerdeContext): Behavior => { + return take(output, { + criteria: (_: any) => de_BehaviorCriteria(_, context), + metric: __expectString, + metricDimension: _json, + name: __expectString, + suppressAlerts: __expectBoolean, + }) as any; }; /** - * deserializeAws_restJson1PublicKeyMap + * deserializeAws_restJson1BehaviorCriteria */ -const de_PublicKeyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_BehaviorCriteria = (output: any, context: __SerdeContext): BehaviorCriteria => { + return take(output, { + comparisonOperator: __expectString, + consecutiveDatapointsToAlarm: __expectInt32, + consecutiveDatapointsToClear: __expectInt32, + durationSeconds: __expectInt32, + mlDetectionConfig: _json, + statisticalThreshold: _json, + value: (_: any) => de_MetricValue(_, context), + }) as any; }; /** - * deserializeAws_restJson1PublishFindingToSnsParams + * deserializeAws_restJson1BehaviorModelTrainingSummaries */ -const de_PublishFindingToSnsParams = (output: any, context: __SerdeContext): PublishFindingToSnsParams => { - return { - topicArn: __expectString(output.topicArn), - } as any; +const de_BehaviorModelTrainingSummaries = (output: any, context: __SerdeContext): BehaviorModelTrainingSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_BehaviorModelTrainingSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1PutAssetPropertyValueEntry + * deserializeAws_restJson1BehaviorModelTrainingSummary */ -const de_PutAssetPropertyValueEntry = (output: any, context: __SerdeContext): PutAssetPropertyValueEntry => { - return { - assetId: __expectString(output.assetId), - entryId: __expectString(output.entryId), - propertyAlias: __expectString(output.propertyAlias), - propertyId: __expectString(output.propertyId), - propertyValues: - output.propertyValues != null ? de_AssetPropertyValueList(output.propertyValues, context) : undefined, - } as any; +const de_BehaviorModelTrainingSummary = (output: any, context: __SerdeContext): BehaviorModelTrainingSummary => { + return take(output, { + behaviorName: __expectString, + datapointsCollectionPercentage: __limitedParseDouble, + lastModelRefreshDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + modelStatus: __expectString, + securityProfileName: __expectString, + trainingDataCollectionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1PutAssetPropertyValueEntryList + * deserializeAws_restJson1Behaviors */ -const de_PutAssetPropertyValueEntryList = (output: any, context: __SerdeContext): PutAssetPropertyValueEntry[] => { +const de_Behaviors = (output: any, context: __SerdeContext): Behavior[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutAssetPropertyValueEntry(entry, context); + return de_Behavior(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1PutItemInput + * deserializeAws_restJson1BillingGroupMetadata + */ +const de_BillingGroupMetadata = (output: any, context: __SerdeContext): BillingGroupMetadata => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_BillingGroupNameAndArnList omitted. + +// de_BillingGroupProperties omitted. + +// de_Bucket omitted. + +// de_Buckets omitted. + +/** + * deserializeAws_restJson1CACertificate */ -const de_PutItemInput = (output: any, context: __SerdeContext): PutItemInput => { - return { - tableName: __expectString(output.tableName), - } as any; +const de_CACertificate = (output: any, context: __SerdeContext): CACertificate => { + return take(output, { + certificateArn: __expectString, + certificateId: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** - * deserializeAws_restJson1RateIncreaseCriteria + * deserializeAws_restJson1CACertificateDescription */ -const de_RateIncreaseCriteria = (output: any, context: __SerdeContext): RateIncreaseCriteria => { - return { - numberOfNotifiedThings: __expectInt32(output.numberOfNotifiedThings), - numberOfSucceededThings: __expectInt32(output.numberOfSucceededThings), - } as any; +const de_CACertificateDescription = (output: any, context: __SerdeContext): CACertificateDescription => { + return take(output, { + autoRegistrationStatus: __expectString, + certificateArn: __expectString, + certificateId: __expectString, + certificateMode: __expectString, + certificatePem: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerVersion: __expectInt32, + generationId: __expectString, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ownedBy: __expectString, + status: __expectString, + validity: (_: any) => de_CertificateValidity(_, context), + }) as any; }; /** - * deserializeAws_restJson1ReasonForNonComplianceCodes + * deserializeAws_restJson1CACertificates */ -const de_ReasonForNonComplianceCodes = (output: any, context: __SerdeContext): string[] => { +const de_CACertificates = (output: any, context: __SerdeContext): CACertificate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_CACertificate(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1RegistrationConfig + * deserializeAws_restJson1Certificate */ -const de_RegistrationConfig = (output: any, context: __SerdeContext): RegistrationConfig => { - return { - roleArn: __expectString(output.roleArn), - templateBody: __expectString(output.templateBody), - templateName: __expectString(output.templateName), - } as any; +const de_Certificate = (output: any, context: __SerdeContext): Certificate => { + return take(output, { + certificateArn: __expectString, + certificateId: __expectString, + certificateMode: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** - * deserializeAws_restJson1RelatedResource + * deserializeAws_restJson1CertificateDescription */ -const de_RelatedResource = (output: any, context: __SerdeContext): RelatedResource => { - return { - additionalInfo: output.additionalInfo != null ? de_StringMap(output.additionalInfo, context) : undefined, - resourceIdentifier: - output.resourceIdentifier != null ? de_ResourceIdentifier(output.resourceIdentifier, context) : undefined, - resourceType: __expectString(output.resourceType), - } as any; +const de_CertificateDescription = (output: any, context: __SerdeContext): CertificateDescription => { + return take(output, { + caCertificateId: __expectString, + certificateArn: __expectString, + certificateId: __expectString, + certificateMode: __expectString, + certificatePem: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerVersion: __expectInt32, + generationId: __expectString, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ownedBy: __expectString, + previousOwnedBy: __expectString, + status: __expectString, + transferData: (_: any) => de_TransferData(_, context), + validity: (_: any) => de_CertificateValidity(_, context), + }) as any; }; /** - * deserializeAws_restJson1RelatedResources + * deserializeAws_restJson1Certificates */ -const de_RelatedResources = (output: any, context: __SerdeContext): RelatedResource[] => { +const de_Certificates = (output: any, context: __SerdeContext): Certificate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelatedResource(entry, context); + return de_Certificate(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1ReplaceDefaultPolicyVersionParams + * deserializeAws_restJson1CertificateValidity */ -const de_ReplaceDefaultPolicyVersionParams = ( - output: any, - context: __SerdeContext -): ReplaceDefaultPolicyVersionParams => { - return { - templateName: __expectString(output.templateName), - } as any; +const de_CertificateValidity = (output: any, context: __SerdeContext): CertificateValidity => { + return take(output, { + notAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1RepublishAction - */ -const de_RepublishAction = (output: any, context: __SerdeContext): RepublishAction => { - return { - headers: output.headers != null ? de_MqttHeaders(output.headers, context) : undefined, - qos: __expectInt32(output.qos), - roleArn: __expectString(output.roleArn), - topic: __expectString(output.topic), - } as any; -}; +// de_Cidrs omitted. -/** - * deserializeAws_restJson1ResourceArns - */ -const de_ResourceArns = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ClientProperties omitted. + +// de_CloudwatchAlarmAction omitted. + +// de_CloudwatchLogsAction omitted. + +// de_CloudwatchMetricAction omitted. /** - * deserializeAws_restJson1ResourceIdentifier + * deserializeAws_restJson1CodeSigning */ -const de_ResourceIdentifier = (output: any, context: __SerdeContext): ResourceIdentifier => { - return { - account: __expectString(output.account), - caCertificateId: __expectString(output.caCertificateId), - clientId: __expectString(output.clientId), - cognitoIdentityPoolId: __expectString(output.cognitoIdentityPoolId), - deviceCertificateArn: __expectString(output.deviceCertificateArn), - deviceCertificateId: __expectString(output.deviceCertificateId), - iamRoleArn: __expectString(output.iamRoleArn), - issuerCertificateIdentifier: - output.issuerCertificateIdentifier != null - ? de_IssuerCertificateIdentifier(output.issuerCertificateIdentifier, context) - : undefined, - policyVersionIdentifier: - output.policyVersionIdentifier != null - ? de_PolicyVersionIdentifier(output.policyVersionIdentifier, context) - : undefined, - roleAliasArn: __expectString(output.roleAliasArn), - } as any; +const de_CodeSigning = (output: any, context: __SerdeContext): CodeSigning => { + return take(output, { + awsSignerJobId: __expectString, + customCodeSigning: (_: any) => de_CustomCodeSigning(_, context), + startSigningJobParameter: _json, + }) as any; }; +// de_CodeSigningCertificateChain omitted. + /** - * deserializeAws_restJson1Resources + * deserializeAws_restJson1CodeSigningSignature */ -const de_Resources = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_CodeSigningSignature = (output: any, context: __SerdeContext): CodeSigningSignature => { + return take(output, { + inlineDocument: context.base64Decoder, + }) as any; }; +// de_Configuration omitted. + /** - * deserializeAws_restJson1RetryCriteria + * deserializeAws_restJson1CustomCodeSigning */ -const de_RetryCriteria = (output: any, context: __SerdeContext): RetryCriteria => { - return { - failureType: __expectString(output.failureType), - numberOfRetries: __expectInt32(output.numberOfRetries), - } as any; +const de_CustomCodeSigning = (output: any, context: __SerdeContext): CustomCodeSigning => { + return take(output, { + certificateChain: _json, + hashAlgorithm: __expectString, + signature: (_: any) => de_CodeSigningSignature(_, context), + signatureAlgorithm: __expectString, + }) as any; }; +// de_Denied omitted. + +// de_Destination omitted. + +// de_DetailsMap omitted. + /** - * deserializeAws_restJson1RetryCriteriaList + * deserializeAws_restJson1DetectMitigationActionExecution */ -const de_RetryCriteriaList = (output: any, context: __SerdeContext): RetryCriteria[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RetryCriteria(entry, context); - }); - return retVal; +const de_DetectMitigationActionExecution = (output: any, context: __SerdeContext): DetectMitigationActionExecution => { + return take(output, { + actionName: __expectString, + errorCode: __expectString, + executionEndDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + executionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + status: __expectString, + taskId: __expectString, + thingName: __expectString, + violationId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1RoleAliasDescription + * deserializeAws_restJson1DetectMitigationActionExecutionList */ -const de_RoleAliasDescription = (output: any, context: __SerdeContext): RoleAliasDescription => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - credentialDurationSeconds: __expectInt32(output.credentialDurationSeconds), - lastModifiedDate: - output.lastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedDate))) - : undefined, - owner: __expectString(output.owner), - roleAlias: __expectString(output.roleAlias), - roleAliasArn: __expectString(output.roleAliasArn), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_restJson1RoleAliases - */ -const de_RoleAliases = (output: any, context: __SerdeContext): string[] => { +const de_DetectMitigationActionExecutionList = ( + output: any, + context: __SerdeContext +): DetectMitigationActionExecution[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DetectMitigationActionExecution(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Action - */ -const de_S3Action = (output: any, context: __SerdeContext): S3Action => { - return { - bucketName: __expectString(output.bucketName), - cannedAcl: __expectString(output.cannedAcl), - key: __expectString(output.key), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_DetectMitigationActionsTaskStatistics omitted. /** - * deserializeAws_restJson1S3Destination + * deserializeAws_restJson1DetectMitigationActionsTaskSummary */ -const de_S3Destination = (output: any, context: __SerdeContext): S3Destination => { - return { - bucket: __expectString(output.bucket), - prefix: __expectString(output.prefix), - } as any; +const de_DetectMitigationActionsTaskSummary = ( + output: any, + context: __SerdeContext +): DetectMitigationActionsTaskSummary => { + return take(output, { + actionsDefinition: _json, + onlyActiveViolationsIncluded: __expectBoolean, + suppressedAlertsIncluded: __expectBoolean, + target: _json, + taskEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + taskId: __expectString, + taskStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + taskStatistics: _json, + taskStatus: __expectString, + violationEventOccurrenceRange: (_: any) => de_ViolationEventOccurrenceRange(_, context), + }) as any; }; /** - * deserializeAws_restJson1S3FileUrlList + * deserializeAws_restJson1DetectMitigationActionsTaskSummaryList */ -const de_S3FileUrlList = (output: any, context: __SerdeContext): string[] => { +const de_DetectMitigationActionsTaskSummaryList = ( + output: any, + context: __SerdeContext +): DetectMitigationActionsTaskSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DetectMitigationActionsTaskSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - version: __expectString(output.version), - } as any; -}; +// de_DetectMitigationActionsTaskTarget omitted. -/** - * deserializeAws_restJson1SalesforceAction - */ -const de_SalesforceAction = (output: any, context: __SerdeContext): SalesforceAction => { - return { - token: __expectString(output.token), - url: __expectString(output.url), - } as any; -}; +// de_DimensionNames omitted. + +// de_DimensionStringValues omitted. + +// de_DocumentParameter omitted. + +// de_DocumentParameters omitted. + +// de_DomainConfigurations omitted. + +// de_DomainConfigurationSummary omitted. + +// de_DynamoDBAction omitted. + +// de_DynamoDBv2Action omitted. + +// de_EffectivePolicies omitted. + +// de_EffectivePolicy omitted. + +// de_ElasticsearchAction omitted. + +// de_EnableIoTLoggingParams omitted. + +// de_Environments omitted. + +// de_ErrorInfo omitted. + +// de_EventConfigurations omitted. + +// de_ExplicitDeny omitted. /** - * deserializeAws_restJson1ScheduledAuditMetadata + * deserializeAws_restJson1ExponentialRolloutRate */ -const de_ScheduledAuditMetadata = (output: any, context: __SerdeContext): ScheduledAuditMetadata => { - return { - dayOfMonth: __expectString(output.dayOfMonth), - dayOfWeek: __expectString(output.dayOfWeek), - frequency: __expectString(output.frequency), - scheduledAuditArn: __expectString(output.scheduledAuditArn), - scheduledAuditName: __expectString(output.scheduledAuditName), - } as any; +const de_ExponentialRolloutRate = (output: any, context: __SerdeContext): ExponentialRolloutRate => { + return take(output, { + baseRatePerMinute: __expectInt32, + incrementFactor: __limitedParseDouble, + rateIncreaseCriteria: _json, + }) as any; }; +// de_Field omitted. + +// de_Fields omitted. + +// de_FileLocation omitted. + +// de_FindingIds omitted. + +// de_FirehoseAction omitted. + +// de_FleetMetricNameAndArn omitted. + +// de_FleetMetricNameAndArnList omitted. + +// de_GroupNameAndArn omitted. + +// de_HeaderList omitted. + +// de_HttpAction omitted. + +// de_HttpActionHeader omitted. + +// de_HttpAuthorization omitted. + +// de_HttpUrlDestinationProperties omitted. + +// de_HttpUrlDestinationSummary omitted. + +// de_ImplicitDeny omitted. + +// de_IndexingFilter omitted. + +// de_IndexNamesList omitted. + +// de_IotAnalyticsAction omitted. + +// de_IotEventsAction omitted. + +// de_IotSiteWiseAction omitted. + +// de_IssuerCertificateIdentifier omitted. + /** - * deserializeAws_restJson1ScheduledAuditMetadataList + * deserializeAws_restJson1Job */ -const de_ScheduledAuditMetadataList = (output: any, context: __SerdeContext): ScheduledAuditMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ScheduledAuditMetadata(entry, context); - }); - return retVal; +const de_Job = (output: any, context: __SerdeContext): Job => { + return take(output, { + abortConfig: (_: any) => de_AbortConfig(_, context), + comment: __expectString, + completedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + documentParameters: _json, + forceCanceled: __expectBoolean, + isConcurrent: __expectBoolean, + jobArn: __expectString, + jobExecutionsRetryConfig: _json, + jobExecutionsRolloutConfig: (_: any) => de_JobExecutionsRolloutConfig(_, context), + jobId: __expectString, + jobProcessDetails: _json, + jobTemplateArn: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + namespaceId: __expectString, + presignedUrlConfig: _json, + reasonCode: __expectString, + scheduledJobRollouts: _json, + schedulingConfig: _json, + status: __expectString, + targetSelection: __expectString, + targets: _json, + timeoutConfig: _json, + }) as any; }; /** - * deserializeAws_restJson1ScheduledJobRollout + * deserializeAws_restJson1JobExecution */ -const de_ScheduledJobRollout = (output: any, context: __SerdeContext): ScheduledJobRollout => { - return { - startTime: __expectString(output.startTime), - } as any; +const de_JobExecution = (output: any, context: __SerdeContext): JobExecution => { + return take(output, { + approximateSecondsBeforeTimedOut: __expectLong, + executionNumber: __expectLong, + forceCanceled: __expectBoolean, + jobId: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + queuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusDetails: _json, + thingArn: __expectString, + versionNumber: __expectLong, + }) as any; }; +// de_JobExecutionsRetryConfig omitted. + /** - * deserializeAws_restJson1ScheduledJobRolloutList + * deserializeAws_restJson1JobExecutionsRolloutConfig */ -const de_ScheduledJobRolloutList = (output: any, context: __SerdeContext): ScheduledJobRollout[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ScheduledJobRollout(entry, context); - }); - return retVal; +const de_JobExecutionsRolloutConfig = (output: any, context: __SerdeContext): JobExecutionsRolloutConfig => { + return take(output, { + exponentialRate: (_: any) => de_ExponentialRolloutRate(_, context), + maximumPerMinute: __expectInt32, + }) as any; }; +// de_JobExecutionStatusDetails omitted. + /** - * deserializeAws_restJson1SchedulingConfig + * deserializeAws_restJson1JobExecutionSummary */ -const de_SchedulingConfig = (output: any, context: __SerdeContext): SchedulingConfig => { - return { - endBehavior: __expectString(output.endBehavior), - endTime: __expectString(output.endTime), - maintenanceWindows: - output.maintenanceWindows != null ? de_MaintenanceWindows(output.maintenanceWindows, context) : undefined, - startTime: __expectString(output.startTime), - } as any; +const de_JobExecutionSummary = (output: any, context: __SerdeContext): JobExecutionSummary => { + return take(output, { + executionNumber: __expectLong, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + queuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + retryAttempt: __expectInt32, + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SearchableAttributes + * deserializeAws_restJson1JobExecutionSummaryForJob */ -const de_SearchableAttributes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_JobExecutionSummaryForJob = (output: any, context: __SerdeContext): JobExecutionSummaryForJob => { + return take(output, { + jobExecutionSummary: (_: any) => de_JobExecutionSummary(_, context), + thingArn: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SecurityGroupList + * deserializeAws_restJson1JobExecutionSummaryForJobList */ -const de_SecurityGroupList = (output: any, context: __SerdeContext): string[] => { +const de_JobExecutionSummaryForJobList = (output: any, context: __SerdeContext): JobExecutionSummaryForJob[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_JobExecutionSummaryForJob(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1SecurityProfileIdentifier + * deserializeAws_restJson1JobExecutionSummaryForThing */ -const de_SecurityProfileIdentifier = (output: any, context: __SerdeContext): SecurityProfileIdentifier => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; +const de_JobExecutionSummaryForThing = (output: any, context: __SerdeContext): JobExecutionSummaryForThing => { + return take(output, { + jobExecutionSummary: (_: any) => de_JobExecutionSummary(_, context), + jobId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SecurityProfileIdentifiers + * deserializeAws_restJson1JobExecutionSummaryForThingList */ -const de_SecurityProfileIdentifiers = (output: any, context: __SerdeContext): SecurityProfileIdentifier[] => { +const de_JobExecutionSummaryForThingList = (output: any, context: __SerdeContext): JobExecutionSummaryForThing[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityProfileIdentifier(entry, context); + return de_JobExecutionSummaryForThing(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SecurityProfileTarget - */ -const de_SecurityProfileTarget = (output: any, context: __SerdeContext): SecurityProfileTarget => { - return { - arn: __expectString(output.arn), - } as any; -}; +// de_JobProcessDetails omitted. /** - * deserializeAws_restJson1SecurityProfileTargetMapping + * deserializeAws_restJson1JobSummary */ -const de_SecurityProfileTargetMapping = (output: any, context: __SerdeContext): SecurityProfileTargetMapping => { - return { - securityProfileIdentifier: - output.securityProfileIdentifier != null - ? de_SecurityProfileIdentifier(output.securityProfileIdentifier, context) - : undefined, - target: output.target != null ? de_SecurityProfileTarget(output.target, context) : undefined, - } as any; +const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { + return take(output, { + completedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + isConcurrent: __expectBoolean, + jobArn: __expectString, + jobId: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + targetSelection: __expectString, + thingGroupId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SecurityProfileTargetMappings + * deserializeAws_restJson1JobSummaryList */ -const de_SecurityProfileTargetMappings = (output: any, context: __SerdeContext): SecurityProfileTargetMapping[] => { +const de_JobSummaryList = (output: any, context: __SerdeContext): JobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityProfileTargetMapping(entry, context); + return de_JobSummary(entry, context); }); return retVal; }; +// de_JobTargets omitted. + /** - * deserializeAws_restJson1SecurityProfileTargets + * deserializeAws_restJson1JobTemplateSummary */ -const de_SecurityProfileTargets = (output: any, context: __SerdeContext): SecurityProfileTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityProfileTarget(entry, context); - }); - return retVal; +const de_JobTemplateSummary = (output: any, context: __SerdeContext): JobTemplateSummary => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + jobTemplateArn: __expectString, + jobTemplateId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1ServerCertificates + * deserializeAws_restJson1JobTemplateSummaryList */ -const de_ServerCertificates = (output: any, context: __SerdeContext): ServerCertificateSummary[] => { +const de_JobTemplateSummaryList = (output: any, context: __SerdeContext): JobTemplateSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerCertificateSummary(entry, context); + return de_JobTemplateSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ServerCertificateSummary - */ -const de_ServerCertificateSummary = (output: any, context: __SerdeContext): ServerCertificateSummary => { - return { - serverCertificateArn: __expectString(output.serverCertificateArn), - serverCertificateStatus: __expectString(output.serverCertificateStatus), - serverCertificateStatusDetail: __expectString(output.serverCertificateStatusDetail), - } as any; -}; +// de_KafkaAction omitted. -/** - * deserializeAws_restJson1SigningProfileParameter - */ -const de_SigningProfileParameter = (output: any, context: __SerdeContext): SigningProfileParameter => { - return { - certificateArn: __expectString(output.certificateArn), - certificatePathOnDevice: __expectString(output.certificatePathOnDevice), - platform: __expectString(output.platform), - } as any; -}; +// de_KeyPair omitted. -/** - * deserializeAws_restJson1SigV4Authorization - */ -const de_SigV4Authorization = (output: any, context: __SerdeContext): SigV4Authorization => { - return { - roleArn: __expectString(output.roleArn), - serviceName: __expectString(output.serviceName), - signingRegion: __expectString(output.signingRegion), - } as any; -}; +// de_KinesisAction omitted. -/** - * deserializeAws_restJson1SnsAction - */ -const de_SnsAction = (output: any, context: __SerdeContext): SnsAction => { - return { - messageFormat: __expectString(output.messageFormat), - roleArn: __expectString(output.roleArn), - targetArn: __expectString(output.targetArn), - } as any; -}; +// de_LambdaAction omitted. -/** - * deserializeAws_restJson1SqsAction - */ -const de_SqsAction = (output: any, context: __SerdeContext): SqsAction => { - return { - queueUrl: __expectString(output.queueUrl), - roleArn: __expectString(output.roleArn), - useBase64: __expectBoolean(output.useBase64), - } as any; -}; +// de_LocationAction omitted. -/** - * deserializeAws_restJson1StartSigningJobParameter - */ -const de_StartSigningJobParameter = (output: any, context: __SerdeContext): StartSigningJobParameter => { - return { - destination: output.destination != null ? de_Destination(output.destination, context) : undefined, - signingProfileName: __expectString(output.signingProfileName), - signingProfileParameter: - output.signingProfileParameter != null - ? de_SigningProfileParameter(output.signingProfileParameter, context) - : undefined, - } as any; -}; +// de_LocationTimestamp omitted. -/** - * deserializeAws_restJson1StatisticalThreshold - */ -const de_StatisticalThreshold = (output: any, context: __SerdeContext): StatisticalThreshold => { - return { - statistic: __expectString(output.statistic), - } as any; -}; +// de_LogTarget omitted. -/** - * deserializeAws_restJson1Statistics - */ -const de_Statistics = (output: any, context: __SerdeContext): Statistics => { - return { - average: __limitedParseDouble(output.average), - count: __expectInt32(output.count), - maximum: __limitedParseDouble(output.maximum), - minimum: __limitedParseDouble(output.minimum), - stdDeviation: __limitedParseDouble(output.stdDeviation), - sum: __limitedParseDouble(output.sum), - sumOfSquares: __limitedParseDouble(output.sumOfSquares), - variance: __limitedParseDouble(output.variance), - } as any; -}; +// de_LogTargetConfiguration omitted. + +// de_LogTargetConfigurations omitted. + +// de_MachineLearningDetectionConfig omitted. + +// de_MaintenanceWindow omitted. + +// de_MaintenanceWindows omitted. + +// de_ManagedJobTemplatesSummaryList omitted. + +// de_ManagedJobTemplateSummary omitted. /** - * deserializeAws_restJson1StepFunctionsAction + * deserializeAws_restJson1MetricDatum */ -const de_StepFunctionsAction = (output: any, context: __SerdeContext): StepFunctionsAction => { - return { - executionNamePrefix: __expectString(output.executionNamePrefix), - roleArn: __expectString(output.roleArn), - stateMachineName: __expectString(output.stateMachineName), - } as any; +const de_MetricDatum = (output: any, context: __SerdeContext): MetricDatum => { + return take(output, { + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + value: (_: any) => de_MetricValue(_, context), + }) as any; }; /** - * deserializeAws_restJson1_Stream + * deserializeAws_restJson1MetricDatumList */ -const de__Stream = (output: any, context: __SerdeContext): _Stream => { - return { - fileId: __expectInt32(output.fileId), - streamId: __expectString(output.streamId), - } as any; +const de_MetricDatumList = (output: any, context: __SerdeContext): MetricDatum[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MetricDatum(entry, context); + }); + return retVal; }; +// de_MetricDimension omitted. + +// de_MetricNames omitted. + +// de_MetricToRetain omitted. + /** - * deserializeAws_restJson1StreamFile + * deserializeAws_restJson1MetricValue */ -const de_StreamFile = (output: any, context: __SerdeContext): StreamFile => { - return { - fileId: __expectInt32(output.fileId), - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - } as any; +const de_MetricValue = (output: any, context: __SerdeContext): MetricValue => { + return take(output, { + cidrs: _json, + count: __expectLong, + number: __limitedParseDouble, + numbers: (_: any) => de_NumberList(_, context), + ports: _json, + strings: _json, + }) as any; }; +// de_MissingContextValues omitted. + +// de_MitigationAction omitted. + /** - * deserializeAws_restJson1StreamFiles + * deserializeAws_restJson1MitigationActionIdentifier */ -const de_StreamFiles = (output: any, context: __SerdeContext): StreamFile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamFile(entry, context); - }); - return retVal; +const de_MitigationActionIdentifier = (output: any, context: __SerdeContext): MitigationActionIdentifier => { + return take(output, { + actionArn: __expectString, + actionName: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1StreamInfo + * deserializeAws_restJson1MitigationActionIdentifierList */ -const de_StreamInfo = (output: any, context: __SerdeContext): StreamInfo => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - files: output.files != null ? de_StreamFiles(output.files, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - roleArn: __expectString(output.roleArn), - streamArn: __expectString(output.streamArn), - streamId: __expectString(output.streamId), - streamVersion: __expectInt32(output.streamVersion), - } as any; -}; - -/** - * deserializeAws_restJson1StreamsSummary - */ -const de_StreamsSummary = (output: any, context: __SerdeContext): StreamSummary[] => { +const de_MitigationActionIdentifierList = (output: any, context: __SerdeContext): MitigationActionIdentifier[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamSummary(entry, context); + return de_MitigationActionIdentifier(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StreamSummary - */ -const de_StreamSummary = (output: any, context: __SerdeContext): StreamSummary => { - return { - description: __expectString(output.description), - streamArn: __expectString(output.streamArn), - streamId: __expectString(output.streamId), - streamVersion: __expectInt32(output.streamVersion), - } as any; -}; +// de_MitigationActionList omitted. + +// de_MitigationActionNameList omitted. + +// de_MitigationActionParams omitted. + +// de_MqttHeaders omitted. + +// de_NamedShadowNamesFilter omitted. + +// de_NonCompliantResource omitted. /** - * deserializeAws_restJson1StringList + * deserializeAws_restJson1NumberList */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { +const de_NumberList = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return __limitedParseDouble(entry) as any; }); return retVal; }; +// de_OpenSearchAction omitted. + /** - * deserializeAws_restJson1StringMap + * deserializeAws_restJson1OTAUpdateFile */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_OTAUpdateFile = (output: any, context: __SerdeContext): OTAUpdateFile => { + return take(output, { + attributes: _json, + codeSigning: (_: any) => de_CodeSigning(_, context), + fileLocation: _json, + fileName: __expectString, + fileType: __expectInt32, + fileVersion: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SubnetIdList + * deserializeAws_restJson1OTAUpdateFiles */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { +const de_OTAUpdateFiles = (output: any, context: __SerdeContext): OTAUpdateFile[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_OTAUpdateFile(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1Tag + * deserializeAws_restJson1OTAUpdateInfo */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_OTAUpdateInfo = (output: any, context: __SerdeContext): OTAUpdateInfo => { + return take(output, { + additionalParameters: _json, + awsIotJobArn: __expectString, + awsIotJobId: __expectString, + awsJobExecutionsRolloutConfig: (_: any) => de_AwsJobExecutionsRolloutConfig(_, context), + awsJobPresignedUrlConfig: _json, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + errorInfo: _json, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + otaUpdateArn: __expectString, + otaUpdateFiles: (_: any) => de_OTAUpdateFiles(_, context), + otaUpdateId: __expectString, + otaUpdateStatus: __expectString, + protocols: _json, + targetSelection: __expectString, + targets: _json, + }) as any; }; /** - * deserializeAws_restJson1TagList + * deserializeAws_restJson1OTAUpdatesSummary */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_OTAUpdatesSummary = (output: any, context: __SerdeContext): OTAUpdateSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_OTAUpdateSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1TargetAuditCheckNames + * deserializeAws_restJson1OTAUpdateSummary */ -const de_TargetAuditCheckNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_OTAUpdateSummary = (output: any, context: __SerdeContext): OTAUpdateSummary => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + otaUpdateArn: __expectString, + otaUpdateId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1Targets + * deserializeAws_restJson1OutgoingCertificate */ -const de_Targets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_OutgoingCertificate = (output: any, context: __SerdeContext): OutgoingCertificate => { + return take(output, { + certificateArn: __expectString, + certificateId: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + transferDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + transferMessage: __expectString, + transferredTo: __expectString, + }) as any; }; /** - * deserializeAws_restJson1TargetViolationIdsForDetectMitigationActions + * deserializeAws_restJson1OutgoingCertificates */ -const de_TargetViolationIdsForDetectMitigationActions = (output: any, context: __SerdeContext): string[] => { +const de_OutgoingCertificates = (output: any, context: __SerdeContext): OutgoingCertificate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_OutgoingCertificate(entry, context); }); return retVal; }; +// de_ParameterMap omitted. + /** - * deserializeAws_restJson1TaskIdList + * deserializeAws_restJson1Percentiles */ -const de_TaskIdList = (output: any, context: __SerdeContext): string[] => { +const de_Percentiles = (output: any, context: __SerdeContext): PercentPair[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_PercentPair(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1TaskStatistics + * deserializeAws_restJson1PercentPair */ -const de_TaskStatistics = (output: any, context: __SerdeContext): TaskStatistics => { - return { - canceledChecks: __expectInt32(output.canceledChecks), - compliantChecks: __expectInt32(output.compliantChecks), - failedChecks: __expectInt32(output.failedChecks), - inProgressChecks: __expectInt32(output.inProgressChecks), - nonCompliantChecks: __expectInt32(output.nonCompliantChecks), - totalChecks: __expectInt32(output.totalChecks), - waitingForDataCollectionChecks: __expectInt32(output.waitingForDataCollectionChecks), - } as any; +const de_PercentPair = (output: any, context: __SerdeContext): PercentPair => { + return take(output, { + percent: __limitedParseDouble, + value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1TaskStatisticsForAuditCheck - */ -const de_TaskStatisticsForAuditCheck = (output: any, context: __SerdeContext): TaskStatisticsForAuditCheck => { - return { - canceledFindingsCount: __expectLong(output.canceledFindingsCount), - failedFindingsCount: __expectLong(output.failedFindingsCount), - skippedFindingsCount: __expectLong(output.skippedFindingsCount), - succeededFindingsCount: __expectLong(output.succeededFindingsCount), - totalFindingsCount: __expectLong(output.totalFindingsCount), - } as any; -}; +// de_Policies omitted. + +// de_Policy omitted. + +// de_PolicyDocuments omitted. + +// de_PolicyTargets omitted. /** - * deserializeAws_restJson1ThingAttribute + * deserializeAws_restJson1PolicyVersion */ -const de_ThingAttribute = (output: any, context: __SerdeContext): ThingAttribute => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - thingArn: __expectString(output.thingArn), - thingName: __expectString(output.thingName), - thingTypeName: __expectString(output.thingTypeName), - version: __expectLong(output.version), - } as any; +const de_PolicyVersion = (output: any, context: __SerdeContext): PolicyVersion => { + return take(output, { + createDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + isDefaultVersion: __expectBoolean, + versionId: __expectString, + }) as any; }; +// de_PolicyVersionIdentifier omitted. + /** - * deserializeAws_restJson1ThingAttributeList + * deserializeAws_restJson1PolicyVersions */ -const de_ThingAttributeList = (output: any, context: __SerdeContext): ThingAttribute[] => { +const de_PolicyVersions = (output: any, context: __SerdeContext): PolicyVersion[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThingAttribute(entry, context); + return de_PolicyVersion(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ThingConnectivity - */ -const de_ThingConnectivity = (output: any, context: __SerdeContext): ThingConnectivity => { - return { - connected: __expectBoolean(output.connected), - disconnectReason: __expectString(output.disconnectReason), - timestamp: __expectLong(output.timestamp), - } as any; -}; +// de_Ports omitted. -/** - * deserializeAws_restJson1ThingDocument - */ -const de_ThingDocument = (output: any, context: __SerdeContext): ThingDocument => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - connectivity: output.connectivity != null ? de_ThingConnectivity(output.connectivity, context) : undefined, - deviceDefender: __expectString(output.deviceDefender), - shadow: __expectString(output.shadow), - thingGroupNames: - output.thingGroupNames != null ? de_ThingGroupNameList(output.thingGroupNames, context) : undefined, - thingId: __expectString(output.thingId), - thingName: __expectString(output.thingName), - thingTypeName: __expectString(output.thingTypeName), - } as any; -}; +// de_PresignedUrlConfig omitted. + +// de_Principals omitted. + +// de_ProcessingTargetNameList omitted. + +// de_Protocols omitted. + +// de_ProvisioningHook omitted. /** - * deserializeAws_restJson1ThingDocumentList + * deserializeAws_restJson1ProvisioningTemplateListing */ -const de_ThingDocumentList = (output: any, context: __SerdeContext): ThingDocument[] => { +const de_ProvisioningTemplateListing = (output: any, context: __SerdeContext): ProvisioningTemplateSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThingDocument(entry, context); + return de_ProvisioningTemplateSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1ThingGroupDocument + * deserializeAws_restJson1ProvisioningTemplateSummary */ -const de_ThingGroupDocument = (output: any, context: __SerdeContext): ThingGroupDocument => { - return { - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - parentGroupNames: - output.parentGroupNames != null ? de_ThingGroupNameList(output.parentGroupNames, context) : undefined, - thingGroupDescription: __expectString(output.thingGroupDescription), - thingGroupId: __expectString(output.thingGroupId), - thingGroupName: __expectString(output.thingGroupName), - } as any; +const de_ProvisioningTemplateSummary = (output: any, context: __SerdeContext): ProvisioningTemplateSummary => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + enabled: __expectBoolean, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + templateArn: __expectString, + templateName: __expectString, + type: __expectString, + }) as any; }; /** - * deserializeAws_restJson1ThingGroupDocumentList + * deserializeAws_restJson1ProvisioningTemplateVersionListing */ -const de_ThingGroupDocumentList = (output: any, context: __SerdeContext): ThingGroupDocument[] => { +const de_ProvisioningTemplateVersionListing = ( + output: any, + context: __SerdeContext +): ProvisioningTemplateVersionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThingGroupDocument(entry, context); + return de_ProvisioningTemplateVersionSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1ThingGroupIndexingConfiguration + * deserializeAws_restJson1ProvisioningTemplateVersionSummary */ -const de_ThingGroupIndexingConfiguration = (output: any, context: __SerdeContext): ThingGroupIndexingConfiguration => { - return { - customFields: output.customFields != null ? de_Fields(output.customFields, context) : undefined, - managedFields: output.managedFields != null ? de_Fields(output.managedFields, context) : undefined, - thingGroupIndexingMode: __expectString(output.thingGroupIndexingMode), - } as any; +const de_ProvisioningTemplateVersionSummary = ( + output: any, + context: __SerdeContext +): ProvisioningTemplateVersionSummary => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + isDefaultVersion: __expectBoolean, + versionId: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1ThingGroupMetadata - */ -const de_ThingGroupMetadata = (output: any, context: __SerdeContext): ThingGroupMetadata => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - parentGroupName: __expectString(output.parentGroupName), - rootToParentThingGroups: - output.rootToParentThingGroups != null - ? de_ThingGroupNameAndArnList(output.rootToParentThingGroups, context) - : undefined, - } as any; -}; +// de_PublicKeyMap omitted. -/** - * deserializeAws_restJson1ThingGroupNameAndArnList - */ -const de_ThingGroupNameAndArnList = (output: any, context: __SerdeContext): GroupNameAndArn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupNameAndArn(entry, context); - }); - return retVal; -}; +// de_PublishFindingToSnsParams omitted. -/** - * deserializeAws_restJson1ThingGroupNameList - */ -const de_ThingGroupNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PutAssetPropertyValueEntry omitted. + +// de_PutAssetPropertyValueEntryList omitted. + +// de_PutItemInput omitted. + +// de_RateIncreaseCriteria omitted. + +// de_ReasonForNonComplianceCodes omitted. + +// de_RegistrationConfig omitted. + +// de_RelatedResource omitted. + +// de_RelatedResources omitted. + +// de_ReplaceDefaultPolicyVersionParams omitted. + +// de_RepublishAction omitted. + +// de_ResourceArns omitted. + +// de_ResourceIdentifier omitted. + +// de_Resources omitted. + +// de_RetryCriteria omitted. + +// de_RetryCriteriaList omitted. /** - * deserializeAws_restJson1ThingGroupNames + * deserializeAws_restJson1RoleAliasDescription */ -const de_ThingGroupNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_RoleAliasDescription = (output: any, context: __SerdeContext): RoleAliasDescription => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + credentialDurationSeconds: __expectInt32, + lastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + owner: __expectString, + roleAlias: __expectString, + roleAliasArn: __expectString, + roleArn: __expectString, + }) as any; }; +// de_RoleAliases omitted. + +// de_S3Action omitted. + +// de_S3Destination omitted. + +// de_S3FileUrlList omitted. + +// de_S3Location omitted. + +// de_SalesforceAction omitted. + +// de_ScheduledAuditMetadata omitted. + +// de_ScheduledAuditMetadataList omitted. + +// de_ScheduledJobRollout omitted. + +// de_ScheduledJobRolloutList omitted. + +// de_SchedulingConfig omitted. + +// de_SearchableAttributes omitted. + +// de_SecurityGroupList omitted. + +// de_SecurityProfileIdentifier omitted. + +// de_SecurityProfileIdentifiers omitted. + +// de_SecurityProfileTarget omitted. + +// de_SecurityProfileTargetMapping omitted. + +// de_SecurityProfileTargetMappings omitted. + +// de_SecurityProfileTargets omitted. + +// de_ServerCertificates omitted. + +// de_ServerCertificateSummary omitted. + +// de_SigningProfileParameter omitted. + +// de_SigV4Authorization omitted. + +// de_SnsAction omitted. + +// de_SqsAction omitted. + +// de_StartSigningJobParameter omitted. + +// de_StatisticalThreshold omitted. + /** - * deserializeAws_restJson1ThingGroupProperties + * deserializeAws_restJson1Statistics */ -const de_ThingGroupProperties = (output: any, context: __SerdeContext): ThingGroupProperties => { - return { - attributePayload: - output.attributePayload != null ? de_AttributePayload(output.attributePayload, context) : undefined, - thingGroupDescription: __expectString(output.thingGroupDescription), - } as any; +const de_Statistics = (output: any, context: __SerdeContext): Statistics => { + return take(output, { + average: __limitedParseDouble, + count: __expectInt32, + maximum: __limitedParseDouble, + minimum: __limitedParseDouble, + stdDeviation: __limitedParseDouble, + sum: __limitedParseDouble, + sumOfSquares: __limitedParseDouble, + variance: __limitedParseDouble, + }) as any; }; +// de_StepFunctionsAction omitted. + +// de__Stream omitted. + +// de_StreamFile omitted. + +// de_StreamFiles omitted. + /** - * deserializeAws_restJson1ThingIndexingConfiguration + * deserializeAws_restJson1StreamInfo */ -const de_ThingIndexingConfiguration = (output: any, context: __SerdeContext): ThingIndexingConfiguration => { - return { - customFields: output.customFields != null ? de_Fields(output.customFields, context) : undefined, - deviceDefenderIndexingMode: __expectString(output.deviceDefenderIndexingMode), - filter: output.filter != null ? de_IndexingFilter(output.filter, context) : undefined, - managedFields: output.managedFields != null ? de_Fields(output.managedFields, context) : undefined, - namedShadowIndexingMode: __expectString(output.namedShadowIndexingMode), - thingConnectivityIndexingMode: __expectString(output.thingConnectivityIndexingMode), - thingIndexingMode: __expectString(output.thingIndexingMode), - } as any; +const de_StreamInfo = (output: any, context: __SerdeContext): StreamInfo => { + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + files: _json, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + streamArn: __expectString, + streamId: __expectString, + streamVersion: __expectInt32, + }) as any; }; +// de_StreamsSummary omitted. + +// de_StreamSummary omitted. + +// de_StringList omitted. + +// de_StringMap omitted. + +// de_SubnetIdList omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TargetAuditCheckNames omitted. + +// de_Targets omitted. + +// de_TargetViolationIdsForDetectMitigationActions omitted. + +// de_TaskIdList omitted. + +// de_TaskStatistics omitted. + +// de_TaskStatisticsForAuditCheck omitted. + +// de_ThingAttribute omitted. + +// de_ThingAttributeList omitted. + +// de_ThingConnectivity omitted. + +// de_ThingDocument omitted. + +// de_ThingDocumentList omitted. + +// de_ThingGroupDocument omitted. + +// de_ThingGroupDocumentList omitted. + +// de_ThingGroupIndexingConfiguration omitted. + /** - * deserializeAws_restJson1ThingNameList + * deserializeAws_restJson1ThingGroupMetadata */ -const de_ThingNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ThingGroupMetadata = (output: any, context: __SerdeContext): ThingGroupMetadata => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + parentGroupName: __expectString, + rootToParentThingGroups: _json, + }) as any; }; +// de_ThingGroupNameAndArnList omitted. + +// de_ThingGroupNameList omitted. + +// de_ThingGroupNames omitted. + +// de_ThingGroupProperties omitted. + +// de_ThingIndexingConfiguration omitted. + +// de_ThingNameList omitted. + /** * deserializeAws_restJson1ThingTypeDefinition */ const de_ThingTypeDefinition = (output: any, context: __SerdeContext): ThingTypeDefinition => { - return { - thingTypeArn: __expectString(output.thingTypeArn), - thingTypeMetadata: - output.thingTypeMetadata != null ? de_ThingTypeMetadata(output.thingTypeMetadata, context) : undefined, - thingTypeName: __expectString(output.thingTypeName), - thingTypeProperties: - output.thingTypeProperties != null ? de_ThingTypeProperties(output.thingTypeProperties, context) : undefined, - } as any; + return take(output, { + thingTypeArn: __expectString, + thingTypeMetadata: (_: any) => de_ThingTypeMetadata(_, context), + thingTypeName: __expectString, + thingTypeProperties: _json, + }) as any; }; /** @@ -29836,9 +25128,6 @@ const de_ThingTypeList = (output: any, context: __SerdeContext): ThingTypeDefini const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThingTypeDefinition(entry, context); }); return retVal; @@ -29848,123 +25137,54 @@ const de_ThingTypeList = (output: any, context: __SerdeContext): ThingTypeDefini * deserializeAws_restJson1ThingTypeMetadata */ const de_ThingTypeMetadata = (output: any, context: __SerdeContext): ThingTypeMetadata => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - deprecated: __expectBoolean(output.deprecated), - deprecationDate: - output.deprecationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deprecationDate))) - : undefined, - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deprecated: __expectBoolean, + deprecationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1ThingTypeProperties - */ -const de_ThingTypeProperties = (output: any, context: __SerdeContext): ThingTypeProperties => { - return { - searchableAttributes: - output.searchableAttributes != null ? de_SearchableAttributes(output.searchableAttributes, context) : undefined, - thingTypeDescription: __expectString(output.thingTypeDescription), - } as any; -}; +// de_ThingTypeProperties omitted. -/** - * deserializeAws_restJson1TimeoutConfig - */ -const de_TimeoutConfig = (output: any, context: __SerdeContext): TimeoutConfig => { - return { - inProgressTimeoutInMinutes: __expectLong(output.inProgressTimeoutInMinutes), - } as any; -}; +// de_TimeoutConfig omitted. -/** - * deserializeAws_restJson1TimestreamAction - */ -const de_TimestreamAction = (output: any, context: __SerdeContext): TimestreamAction => { - return { - databaseName: __expectString(output.databaseName), - dimensions: output.dimensions != null ? de_TimestreamDimensionList(output.dimensions, context) : undefined, - roleArn: __expectString(output.roleArn), - tableName: __expectString(output.tableName), - timestamp: output.timestamp != null ? de_TimestreamTimestamp(output.timestamp, context) : undefined, - } as any; -}; +// de_TimestreamAction omitted. -/** - * deserializeAws_restJson1TimestreamDimension - */ -const de_TimestreamDimension = (output: any, context: __SerdeContext): TimestreamDimension => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_TimestreamDimension omitted. -/** - * deserializeAws_restJson1TimestreamDimensionList - */ -const de_TimestreamDimensionList = (output: any, context: __SerdeContext): TimestreamDimension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TimestreamDimension(entry, context); - }); - return retVal; -}; +// de_TimestreamDimensionList omitted. -/** - * deserializeAws_restJson1TimestreamTimestamp - */ -const de_TimestreamTimestamp = (output: any, context: __SerdeContext): TimestreamTimestamp => { - return { - unit: __expectString(output.unit), - value: __expectString(output.value), - } as any; -}; +// de_TimestreamTimestamp omitted. /** * deserializeAws_restJson1TopicRule */ const de_TopicRule = (output: any, context: __SerdeContext): TopicRule => { - return { - actions: output.actions != null ? de_ActionList(output.actions, context) : undefined, - awsIotSqlVersion: __expectString(output.awsIotSqlVersion), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - errorAction: output.errorAction != null ? de_Action(output.errorAction, context) : undefined, - ruleDisabled: __expectBoolean(output.ruleDisabled), - ruleName: __expectString(output.ruleName), - sql: __expectString(output.sql), - } as any; + return take(output, { + actions: _json, + awsIotSqlVersion: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + errorAction: _json, + ruleDisabled: __expectBoolean, + ruleName: __expectString, + sql: __expectString, + }) as any; }; /** * deserializeAws_restJson1TopicRuleDestination */ const de_TopicRuleDestination = (output: any, context: __SerdeContext): TopicRuleDestination => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - httpUrlProperties: - output.httpUrlProperties != null ? de_HttpUrlDestinationProperties(output.httpUrlProperties, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - vpcProperties: - output.vpcProperties != null ? de_VpcDestinationProperties(output.vpcProperties, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + httpUrlProperties: _json, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReason: __expectString, + vpcProperties: _json, + }) as any; }; /** @@ -29974,9 +25194,6 @@ const de_TopicRuleDestinationSummaries = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TopicRuleDestinationSummary(entry, context); }); return retVal; @@ -29986,23 +25203,15 @@ const de_TopicRuleDestinationSummaries = (output: any, context: __SerdeContext): * deserializeAws_restJson1TopicRuleDestinationSummary */ const de_TopicRuleDestinationSummary = (output: any, context: __SerdeContext): TopicRuleDestinationSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - httpUrlSummary: - output.httpUrlSummary != null ? de_HttpUrlDestinationSummary(output.httpUrlSummary, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - vpcDestinationSummary: - output.vpcDestinationSummary != null - ? de_VpcDestinationSummary(output.vpcDestinationSummary, context) - : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + httpUrlSummary: _json, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReason: __expectString, + vpcDestinationSummary: _json, + }) as any; }; /** @@ -30012,9 +25221,6 @@ const de_TopicRuleList = (output: any, context: __SerdeContext): TopicRuleListIt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TopicRuleListItem(entry, context); }); return retVal; @@ -30024,144 +25230,68 @@ const de_TopicRuleList = (output: any, context: __SerdeContext): TopicRuleListIt * deserializeAws_restJson1TopicRuleListItem */ const de_TopicRuleListItem = (output: any, context: __SerdeContext): TopicRuleListItem => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - ruleArn: __expectString(output.ruleArn), - ruleDisabled: __expectBoolean(output.ruleDisabled), - ruleName: __expectString(output.ruleName), - topicPattern: __expectString(output.topicPattern), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ruleArn: __expectString, + ruleDisabled: __expectBoolean, + ruleName: __expectString, + topicPattern: __expectString, + }) as any; }; /** * deserializeAws_restJson1TransferData */ const de_TransferData = (output: any, context: __SerdeContext): TransferData => { - return { - acceptDate: - output.acceptDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.acceptDate))) : undefined, - rejectDate: - output.rejectDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.rejectDate))) : undefined, - rejectReason: __expectString(output.rejectReason), - transferDate: - output.transferDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.transferDate))) - : undefined, - transferMessage: __expectString(output.transferMessage), - } as any; + return take(output, { + acceptDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + rejectDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + rejectReason: __expectString, + transferDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + transferMessage: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1UpdateCACertificateParams - */ -const de_UpdateCACertificateParams = (output: any, context: __SerdeContext): UpdateCACertificateParams => { - return { - action: __expectString(output.action), - } as any; -}; +// de_UpdateCACertificateParams omitted. -/** - * deserializeAws_restJson1UpdateDeviceCertificateParams - */ -const de_UpdateDeviceCertificateParams = (output: any, context: __SerdeContext): UpdateDeviceCertificateParams => { - return { - action: __expectString(output.action), - } as any; -}; +// de_UpdateDeviceCertificateParams omitted. -/** - * deserializeAws_restJson1UserProperties - */ -const de_UserProperties = (output: any, context: __SerdeContext): UserProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserProperty(entry, context); - }); - return retVal; -}; +// de_UserProperties omitted. -/** - * deserializeAws_restJson1UserProperty - */ -const de_UserProperty = (output: any, context: __SerdeContext): UserProperty => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_UserProperty omitted. -/** - * deserializeAws_restJson1ValidationError - */ -const de_ValidationError = (output: any, context: __SerdeContext): ValidationError => { - return { - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_ValidationError omitted. -/** - * deserializeAws_restJson1ValidationErrors - */ -const de_ValidationErrors = (output: any, context: __SerdeContext): ValidationError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationError(entry, context); - }); - return retVal; -}; +// de_ValidationErrors omitted. /** * deserializeAws_restJson1ViolationEvent */ const de_ViolationEvent = (output: any, context: __SerdeContext): ViolationEvent => { - return { - behavior: output.behavior != null ? de_Behavior(output.behavior, context) : undefined, - metricValue: output.metricValue != null ? de_MetricValue(output.metricValue, context) : undefined, - securityProfileName: __expectString(output.securityProfileName), - thingName: __expectString(output.thingName), - verificationState: __expectString(output.verificationState), - verificationStateDescription: __expectString(output.verificationStateDescription), - violationEventAdditionalInfo: - output.violationEventAdditionalInfo != null - ? de_ViolationEventAdditionalInfo(output.violationEventAdditionalInfo, context) - : undefined, - violationEventTime: - output.violationEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.violationEventTime))) - : undefined, - violationEventType: __expectString(output.violationEventType), - violationId: __expectString(output.violationId), - } as any; + return take(output, { + behavior: (_: any) => de_Behavior(_, context), + metricValue: (_: any) => de_MetricValue(_, context), + securityProfileName: __expectString, + thingName: __expectString, + verificationState: __expectString, + verificationStateDescription: __expectString, + violationEventAdditionalInfo: _json, + violationEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + violationEventType: __expectString, + violationId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ViolationEventAdditionalInfo - */ -const de_ViolationEventAdditionalInfo = (output: any, context: __SerdeContext): ViolationEventAdditionalInfo => { - return { - confidenceLevel: __expectString(output.confidenceLevel), - } as any; -}; +// de_ViolationEventAdditionalInfo omitted. /** * deserializeAws_restJson1ViolationEventOccurrenceRange */ const de_ViolationEventOccurrenceRange = (output: any, context: __SerdeContext): ViolationEventOccurrenceRange => { - return { - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; + return take(output, { + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -30171,37 +25301,14 @@ const de_ViolationEvents = (output: any, context: __SerdeContext): ViolationEven const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ViolationEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VpcDestinationProperties - */ -const de_VpcDestinationProperties = (output: any, context: __SerdeContext): VpcDestinationProperties => { - return { - roleArn: __expectString(output.roleArn), - securityGroups: output.securityGroups != null ? de_SecurityGroupList(output.securityGroups, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcDestinationProperties omitted. -/** - * deserializeAws_restJson1VpcDestinationSummary - */ -const de_VpcDestinationSummary = (output: any, context: __SerdeContext): VpcDestinationSummary => { - return { - roleArn: __expectString(output.roleArn), - securityGroups: output.securityGroups != null ? de_SecurityGroupList(output.securityGroups, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcDestinationSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iotanalytics/src/protocols/Aws_restJson1.ts b/clients/client-iotanalytics/src/protocols/Aws_restJson1.ts index 651b98418ddd..e8c441927556 100644 --- a/clients/client-iotanalytics/src/protocols/Aws_restJson1.ts +++ b/clients/client-iotanalytics/src/protocols/Aws_restJson1.ts @@ -1,9 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, @@ -11,11 +10,12 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -84,40 +84,31 @@ import { UpdatePipelineCommandInput, UpdatePipelineCommandOutput } from "../comm import { IoTAnalyticsServiceException as __BaseException } from "../models/IoTAnalyticsServiceException"; import { AddAttributesActivity, - BatchPutMessageErrorEntry, Channel, ChannelActivity, ChannelMessages, ChannelStatistics, ChannelStorage, - ChannelStorageSummary, ChannelSummary, Column, ContainerDatasetAction, CustomerManagedChannelS3Storage, - CustomerManagedChannelS3StorageSummary, CustomerManagedDatastoreS3Storage, - CustomerManagedDatastoreS3StorageSummary, Dataset, DatasetAction, - DatasetActionSummary, DatasetContentDeliveryDestination, DatasetContentDeliveryRule, - DatasetContentStatus, DatasetContentSummary, DatasetContentVersionValue, - DatasetEntry, DatasetSummary, DatasetTrigger, Datastore, DatastoreActivity, DatastoreIotSiteWiseMultiLayerStorage, - DatastoreIotSiteWiseMultiLayerStorageSummary, DatastorePartition, DatastorePartitions, DatastoreStatistics, DatastoreStorage, - DatastoreStorageSummary, DatastoreSummary, DeltaTime, DeltaTimeSessionWindowConfiguration, @@ -131,7 +122,6 @@ import { InvalidRequestException, IotEventsDestinationConfiguration, IotSiteWiseCustomerManagedDatastoreS3Storage, - IotSiteWiseCustomerManagedDatastoreS3StorageSummary, JsonConfiguration, LambdaActivity, LateDataRule, @@ -158,9 +148,7 @@ import { SchemaDefinition, SelectAttributesActivity, ServiceManagedChannelS3Storage, - ServiceManagedChannelS3StorageSummary, ServiceManagedDatastoreS3Storage, - ServiceManagedDatastoreS3StorageSummary, ServiceUnavailableException, SqlQueryDatasetAction, Tag, @@ -184,10 +172,12 @@ export const se_BatchPutMessageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/messages/batch"; let body: any; - body = JSON.stringify({ - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.messages != null && { messages: se_Messages(input.messages, context) }), - }); + body = JSON.stringify( + take(input, { + channelName: [], + messages: (_) => se_Messages(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -252,12 +242,14 @@ export const se_CreateChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels"; let body: any; - body = JSON.stringify({ - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.channelStorage != null && { channelStorage: se_ChannelStorage(input.channelStorage, context) }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + channelName: [], + channelStorage: (_) => _json(_), + retentionPeriod: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -282,20 +274,18 @@ export const se_CreateDatasetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets"; let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_DatasetActions(input.actions, context) }), - ...(input.contentDeliveryRules != null && { - contentDeliveryRules: se_DatasetContentDeliveryRules(input.contentDeliveryRules, context), - }), - ...(input.datasetName != null && { datasetName: input.datasetName }), - ...(input.lateDataRules != null && { lateDataRules: se_LateDataRules(input.lateDataRules, context) }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.triggers != null && { triggers: se_DatasetTriggers(input.triggers, context) }), - ...(input.versioningConfiguration != null && { - versioningConfiguration: se_VersioningConfiguration(input.versioningConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => se_DatasetActions(_, context), + contentDeliveryRules: (_) => _json(_), + datasetName: [], + lateDataRules: (_) => _json(_), + retentionPeriod: (_) => _json(_), + tags: (_) => _json(_), + triggers: (_) => _json(_), + versioningConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -322,9 +312,11 @@ export const se_CreateDatasetContentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetName}/content"; resolvedPath = __resolvedPath(resolvedPath, input, "datasetName", () => input.datasetName!, "{datasetName}", false); let body: any; - body = JSON.stringify({ - ...(input.versionId != null && { versionId: input.versionId }), - }); + body = JSON.stringify( + take(input, { + versionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -349,18 +341,16 @@ export const se_CreateDatastoreCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datastores"; let body: any; - body = JSON.stringify({ - ...(input.datastoreName != null && { datastoreName: input.datastoreName }), - ...(input.datastorePartitions != null && { - datastorePartitions: se_DatastorePartitions(input.datastorePartitions, context), - }), - ...(input.datastoreStorage != null && { datastoreStorage: se_DatastoreStorage(input.datastoreStorage, context) }), - ...(input.fileFormatConfiguration != null && { - fileFormatConfiguration: se_FileFormatConfiguration(input.fileFormatConfiguration, context), - }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + datastoreName: [], + datastorePartitions: (_) => _json(_), + datastoreStorage: (_) => _json(_), + fileFormatConfiguration: (_) => _json(_), + retentionPeriod: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -385,13 +375,13 @@ export const se_CreatePipelineCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pipelines"; let body: any; - body = JSON.stringify({ - ...(input.pipelineActivities != null && { - pipelineActivities: se_PipelineActivities(input.pipelineActivities, context), - }), - ...(input.pipelineName != null && { pipelineName: input.pipelineName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + pipelineActivities: (_) => _json(_), + pipelineName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -892,9 +882,11 @@ export const se_PutLoggingOptionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging"; let body: any; - body = JSON.stringify({ - ...(input.loggingOptions != null && { loggingOptions: se_LoggingOptions(input.loggingOptions, context) }), - }); + body = JSON.stringify( + take(input, { + loggingOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -920,10 +912,12 @@ export const se_RunPipelineActivityCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pipelineactivities/run"; let body: any; - body = JSON.stringify({ - ...(input.payloads != null && { payloads: se_MessagePayloads(input.payloads, context) }), - ...(input.pipelineActivity != null && { pipelineActivity: se_PipelineActivity(input.pipelineActivity, context) }), - }); + body = JSON.stringify( + take(input, { + payloads: (_) => se_MessagePayloads(_, context), + pipelineActivity: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -990,11 +984,13 @@ export const se_StartPipelineReprocessingCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.channelMessages != null && { channelMessages: se_ChannelMessages(input.channelMessages, context) }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + channelMessages: (_) => _json(_), + endTime: (_) => Math.round(_.getTime() / 1000), + startTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1022,9 +1018,11 @@ export const se_TagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1081,10 +1079,12 @@ export const se_UpdateChannelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{channelName}"; resolvedPath = __resolvedPath(resolvedPath, input, "channelName", () => input.channelName!, "{channelName}", false); let body: any; - body = JSON.stringify({ - ...(input.channelStorage != null && { channelStorage: se_ChannelStorage(input.channelStorage, context) }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - }); + body = JSON.stringify( + take(input, { + channelStorage: (_) => _json(_), + retentionPeriod: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1110,18 +1110,16 @@ export const se_UpdateDatasetCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasets/{datasetName}"; resolvedPath = __resolvedPath(resolvedPath, input, "datasetName", () => input.datasetName!, "{datasetName}", false); let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_DatasetActions(input.actions, context) }), - ...(input.contentDeliveryRules != null && { - contentDeliveryRules: se_DatasetContentDeliveryRules(input.contentDeliveryRules, context), - }), - ...(input.lateDataRules != null && { lateDataRules: se_LateDataRules(input.lateDataRules, context) }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - ...(input.triggers != null && { triggers: se_DatasetTriggers(input.triggers, context) }), - ...(input.versioningConfiguration != null && { - versioningConfiguration: se_VersioningConfiguration(input.versioningConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => se_DatasetActions(_, context), + contentDeliveryRules: (_) => _json(_), + lateDataRules: (_) => _json(_), + retentionPeriod: (_) => _json(_), + triggers: (_) => _json(_), + versioningConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1155,13 +1153,13 @@ export const se_UpdateDatastoreCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.datastoreStorage != null && { datastoreStorage: se_DatastoreStorage(input.datastoreStorage, context) }), - ...(input.fileFormatConfiguration != null && { - fileFormatConfiguration: se_FileFormatConfiguration(input.fileFormatConfiguration, context), - }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - }); + body = JSON.stringify( + take(input, { + datastoreStorage: (_) => _json(_), + fileFormatConfiguration: (_) => _json(_), + retentionPeriod: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1195,11 +1193,11 @@ export const se_UpdatePipelineCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.pipelineActivities != null && { - pipelineActivities: se_PipelineActivities(input.pipelineActivities, context), - }), - }); + body = JSON.stringify( + take(input, { + pipelineActivities: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1225,9 +1223,10 @@ export const de_BatchPutMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.batchPutMessageErrorEntries != null) { - contents.batchPutMessageErrorEntries = de_BatchPutMessageErrorEntries(data.batchPutMessageErrorEntries, context); - } + const doc = take(data, { + batchPutMessageErrorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1261,10 +1260,9 @@ const de_BatchPutMessageCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1317,10 +1315,9 @@ const de_CancelPipelineReprocessingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1340,15 +1337,12 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channelArn != null) { - contents.channelArn = __expectString(data.channelArn); - } - if (data.channelName != null) { - contents.channelName = __expectString(data.channelName); - } - if (data.retentionPeriod != null) { - contents.retentionPeriod = de_RetentionPeriod(data.retentionPeriod, context); - } + const doc = take(data, { + channelArn: __expectString, + channelName: __expectString, + retentionPeriod: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1385,10 +1379,9 @@ const de_CreateChannelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1408,15 +1401,12 @@ export const de_CreateDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasetArn != null) { - contents.datasetArn = __expectString(data.datasetArn); - } - if (data.datasetName != null) { - contents.datasetName = __expectString(data.datasetName); - } - if (data.retentionPeriod != null) { - contents.retentionPeriod = de_RetentionPeriod(data.retentionPeriod, context); - } + const doc = take(data, { + datasetArn: __expectString, + datasetName: __expectString, + retentionPeriod: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1453,10 +1443,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1476,9 +1465,10 @@ export const de_CreateDatasetContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.versionId != null) { - contents.versionId = __expectString(data.versionId); - } + const doc = take(data, { + versionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1512,10 +1502,9 @@ const de_CreateDatasetContentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1535,15 +1524,12 @@ export const de_CreateDatastoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datastoreArn != null) { - contents.datastoreArn = __expectString(data.datastoreArn); - } - if (data.datastoreName != null) { - contents.datastoreName = __expectString(data.datastoreName); - } - if (data.retentionPeriod != null) { - contents.retentionPeriod = de_RetentionPeriod(data.retentionPeriod, context); - } + const doc = take(data, { + datastoreArn: __expectString, + datastoreName: __expectString, + retentionPeriod: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1580,10 +1566,9 @@ const de_CreateDatastoreCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1603,12 +1588,11 @@ export const de_CreatePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.pipelineArn != null) { - contents.pipelineArn = __expectString(data.pipelineArn); - } - if (data.pipelineName != null) { - contents.pipelineName = __expectString(data.pipelineName); - } + const doc = take(data, { + pipelineArn: __expectString, + pipelineName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1645,10 +1629,9 @@ const de_CreatePipelineCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1701,10 +1684,9 @@ const de_DeleteChannelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1757,10 +1739,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1813,10 +1794,9 @@ const de_DeleteDatasetContentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1869,10 +1849,9 @@ const de_DeleteDatastoreCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1925,10 +1904,9 @@ const de_DeletePipelineCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1948,12 +1926,11 @@ export const de_DescribeChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.channel = de_Channel(data.channel, context); - } - if (data.statistics != null) { - contents.statistics = de_ChannelStatistics(data.statistics, context); - } + const doc = take(data, { + channel: (_) => de_Channel(_, context), + statistics: (_) => de_ChannelStatistics(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1987,10 +1964,9 @@ const de_DescribeChannelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,9 +1986,10 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataset != null) { - contents.dataset = de_Dataset(data.dataset, context); - } + const doc = take(data, { + dataset: (_) => de_Dataset(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2046,10 +2023,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2069,12 +2045,11 @@ export const de_DescribeDatastoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datastore != null) { - contents.datastore = de_Datastore(data.datastore, context); - } - if (data.statistics != null) { - contents.statistics = de_DatastoreStatistics(data.statistics, context); - } + const doc = take(data, { + datastore: (_) => de_Datastore(_, context), + statistics: (_) => de_DatastoreStatistics(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2108,10 +2083,9 @@ const de_DescribeDatastoreCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2131,9 +2105,10 @@ export const de_DescribeLoggingOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.loggingOptions != null) { - contents.loggingOptions = de_LoggingOptions(data.loggingOptions, context); - } + const doc = take(data, { + loggingOptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2167,10 +2142,9 @@ const de_DescribeLoggingOptionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2190,9 +2164,10 @@ export const de_DescribePipelineCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.pipeline != null) { - contents.pipeline = de_Pipeline(data.pipeline, context); - } + const doc = take(data, { + pipeline: (_) => de_Pipeline(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2226,10 +2201,9 @@ const de_DescribePipelineCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2249,15 +2223,12 @@ export const de_GetDatasetContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entries != null) { - contents.entries = de_DatasetEntries(data.entries, context); - } - if (data.status != null) { - contents.status = de_DatasetContentStatus(data.status, context); - } - if (data.timestamp != null) { - contents.timestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.timestamp))); - } + const doc = take(data, { + entries: _json, + status: _json, + timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2291,10 +2262,9 @@ const de_GetDatasetContentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2314,12 +2284,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channelSummaries != null) { - contents.channelSummaries = de_ChannelSummaries(data.channelSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + channelSummaries: (_) => de_ChannelSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2350,10 +2319,9 @@ const de_ListChannelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2373,12 +2341,11 @@ export const de_ListDatasetContentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasetContentSummaries != null) { - contents.datasetContentSummaries = de_DatasetContentSummaries(data.datasetContentSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + datasetContentSummaries: (_) => de_DatasetContentSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2412,10 +2379,9 @@ const de_ListDatasetContentsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2435,12 +2401,11 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datasetSummaries != null) { - contents.datasetSummaries = de_DatasetSummaries(data.datasetSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + datasetSummaries: (_) => de_DatasetSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2471,10 +2436,9 @@ const de_ListDatasetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2494,12 +2458,11 @@ export const de_ListDatastoresCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datastoreSummaries != null) { - contents.datastoreSummaries = de_DatastoreSummaries(data.datastoreSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + datastoreSummaries: (_) => de_DatastoreSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2530,10 +2493,9 @@ const de_ListDatastoresCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2553,12 +2515,11 @@ export const de_ListPipelinesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.pipelineSummaries != null) { - contents.pipelineSummaries = de_PipelineSummaries(data.pipelineSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + pipelineSummaries: (_) => de_PipelineSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2589,10 +2550,9 @@ const de_ListPipelinesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2612,9 +2572,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2651,10 +2612,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2704,10 +2664,9 @@ const de_PutLoggingOptionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2727,12 +2686,11 @@ export const de_RunPipelineActivityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.logResult != null) { - contents.logResult = __expectString(data.logResult); - } - if (data.payloads != null) { - contents.payloads = de_MessagePayloads(data.payloads, context); - } + const doc = take(data, { + logResult: __expectString, + payloads: (_) => de_MessagePayloads(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2763,10 +2721,9 @@ const de_RunPipelineActivityCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2786,9 +2743,10 @@ export const de_SampleChannelDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.payloads != null) { - contents.payloads = de_MessagePayloads(data.payloads, context); - } + const doc = take(data, { + payloads: (_) => de_MessagePayloads(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2822,10 +2780,9 @@ const de_SampleChannelDataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2845,9 +2802,10 @@ export const de_StartPipelineReprocessingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reprocessingId != null) { - contents.reprocessingId = __expectString(data.reprocessingId); - } + const doc = take(data, { + reprocessingId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2884,10 +2842,9 @@ const de_StartPipelineReprocessingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2943,10 +2900,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3002,10 +2958,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3058,10 +3013,9 @@ const de_UpdateChannelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3114,10 +3068,9 @@ const de_UpdateDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3170,10 +3123,9 @@ const de_UpdateDatastoreCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3229,16 +3181,15 @@ const de_UpdatePipelineCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalFailureExceptionRes */ @@ -3248,9 +3199,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3267,9 +3219,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3286,9 +3239,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3305,15 +3259,12 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + message: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3330,9 +3281,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3349,9 +3301,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3365,9 +3318,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3375,146 +3329,47 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AddAttributesActivity - */ -const se_AddAttributesActivity = (input: AddAttributesActivity, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_AttributeNameMapping(input.attributes, context) }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; +// se_AddAttributesActivity omitted. -/** - * serializeAws_restJson1AttributeNameMapping - */ -const se_AttributeNameMapping = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AttributeNameMapping omitted. -/** - * serializeAws_restJson1AttributeNames - */ -const se_AttributeNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttributeNames omitted. -/** - * serializeAws_restJson1ChannelActivity - */ -const se_ChannelActivity = (input: ChannelActivity, context: __SerdeContext): any => { - return { - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; +// se_ChannelActivity omitted. -/** - * serializeAws_restJson1ChannelMessages - */ -const se_ChannelMessages = (input: ChannelMessages, context: __SerdeContext): any => { - return { - ...(input.s3Paths != null && { s3Paths: se_S3PathChannelMessages(input.s3Paths, context) }), - }; -}; +// se_ChannelMessages omitted. -/** - * serializeAws_restJson1ChannelStorage - */ -const se_ChannelStorage = (input: ChannelStorage, context: __SerdeContext): any => { - return { - ...(input.customerManagedS3 != null && { - customerManagedS3: se_CustomerManagedChannelS3Storage(input.customerManagedS3, context), - }), - ...(input.serviceManagedS3 != null && { - serviceManagedS3: se_ServiceManagedChannelS3Storage(input.serviceManagedS3, context), - }), - }; -}; +// se_ChannelStorage omitted. -/** - * serializeAws_restJson1Column - */ -const se_Column = (input: Column, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_Column omitted. -/** - * serializeAws_restJson1Columns - */ -const se_Columns = (input: Column[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Column(entry, context); - }); -}; +// se_Columns omitted. /** * serializeAws_restJson1ContainerDatasetAction */ const se_ContainerDatasetAction = (input: ContainerDatasetAction, context: __SerdeContext): any => { - return { - ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }), - ...(input.image != null && { image: input.image }), - ...(input.resourceConfiguration != null && { - resourceConfiguration: se_ResourceConfiguration(input.resourceConfiguration, context), - }), - ...(input.variables != null && { variables: se_Variables(input.variables, context) }), - }; + return take(input, { + executionRoleArn: [], + image: [], + resourceConfiguration: _json, + variables: (_) => se_Variables(_, context), + }); }; -/** - * serializeAws_restJson1CustomerManagedChannelS3Storage - */ -const se_CustomerManagedChannelS3Storage = (input: CustomerManagedChannelS3Storage, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_CustomerManagedChannelS3Storage omitted. -/** - * serializeAws_restJson1CustomerManagedDatastoreS3Storage - */ -const se_CustomerManagedDatastoreS3Storage = ( - input: CustomerManagedDatastoreS3Storage, - context: __SerdeContext -): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_CustomerManagedDatastoreS3Storage omitted. /** * serializeAws_restJson1DatasetAction */ const se_DatasetAction = (input: DatasetAction, context: __SerdeContext): any => { - return { - ...(input.actionName != null && { actionName: input.actionName }), - ...(input.containerAction != null && { - containerAction: se_ContainerDatasetAction(input.containerAction, context), - }), - ...(input.queryAction != null && { queryAction: se_SqlQueryDatasetAction(input.queryAction, context) }), - }; + return take(input, { + actionName: [], + containerAction: (_) => se_ContainerDatasetAction(_, context), + queryAction: _json, + }); }; /** @@ -3528,954 +3383,283 @@ const se_DatasetActions = (input: DatasetAction[], context: __SerdeContext): any }); }; -/** - * serializeAws_restJson1DatasetContentDeliveryDestination - */ -const se_DatasetContentDeliveryDestination = ( - input: DatasetContentDeliveryDestination, - context: __SerdeContext -): any => { - return { - ...(input.iotEventsDestinationConfiguration != null && { - iotEventsDestinationConfiguration: se_IotEventsDestinationConfiguration( - input.iotEventsDestinationConfiguration, - context - ), - }), - ...(input.s3DestinationConfiguration != null && { - s3DestinationConfiguration: se_S3DestinationConfiguration(input.s3DestinationConfiguration, context), - }), - }; -}; +// se_DatasetContentDeliveryDestination omitted. + +// se_DatasetContentDeliveryRule omitted. + +// se_DatasetContentDeliveryRules omitted. + +// se_DatasetContentVersionValue omitted. + +// se_DatasetTrigger omitted. + +// se_DatasetTriggers omitted. + +// se_DatastoreActivity omitted. + +// se_DatastoreIotSiteWiseMultiLayerStorage omitted. + +// se_DatastorePartition omitted. + +// se_DatastorePartitions omitted. + +// se_DatastoreStorage omitted. + +// se_DeltaTime omitted. + +// se_DeltaTimeSessionWindowConfiguration omitted. + +// se_DeviceRegistryEnrichActivity omitted. + +// se_DeviceShadowEnrichActivity omitted. + +// se_FileFormatConfiguration omitted. + +// se_FilterActivity omitted. + +// se_GlueConfiguration omitted. + +// se_IotEventsDestinationConfiguration omitted. + +// se_IotSiteWiseCustomerManagedDatastoreS3Storage omitted. + +// se_JsonConfiguration omitted. + +// se_LambdaActivity omitted. + +// se_LateDataRule omitted. + +// se_LateDataRuleConfiguration omitted. + +// se_LateDataRules omitted. + +// se_LoggingOptions omitted. + +// se_MathActivity omitted. /** - * serializeAws_restJson1DatasetContentDeliveryRule + * serializeAws_restJson1Message */ -const se_DatasetContentDeliveryRule = (input: DatasetContentDeliveryRule, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: se_DatasetContentDeliveryDestination(input.destination, context) }), - ...(input.entryName != null && { entryName: input.entryName }), - }; +const se_Message = (input: Message, context: __SerdeContext): any => { + return take(input, { + messageId: [], + payload: context.base64Encoder, + }); }; /** - * serializeAws_restJson1DatasetContentDeliveryRules + * serializeAws_restJson1MessagePayloads */ -const se_DatasetContentDeliveryRules = (input: DatasetContentDeliveryRule[], context: __SerdeContext): any => { +const se_MessagePayloads = (input: Uint8Array[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DatasetContentDeliveryRule(entry, context); + return context.base64Encoder(entry); }); }; /** - * serializeAws_restJson1DatasetContentVersionValue + * serializeAws_restJson1Messages */ -const se_DatasetContentVersionValue = (input: DatasetContentVersionValue, context: __SerdeContext): any => { - return { - ...(input.datasetName != null && { datasetName: input.datasetName }), - }; +const se_Messages = (input: Message[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_Message(entry, context); + }); }; +// se_OutputFileUriValue omitted. + +// se_ParquetConfiguration omitted. + +// se_Partition omitted. + +// se_Partitions omitted. + +// se_PipelineActivities omitted. + +// se_PipelineActivity omitted. + +// se_QueryFilter omitted. + +// se_QueryFilters omitted. + +// se_RemoveAttributesActivity omitted. + +// se_ResourceConfiguration omitted. + +// se_RetentionPeriod omitted. + +// se_S3DestinationConfiguration omitted. + +// se_S3PathChannelMessages omitted. + +// se_Schedule omitted. + +// se_SchemaDefinition omitted. + +// se_SelectAttributesActivity omitted. + +// se_ServiceManagedChannelS3Storage omitted. + +// se_ServiceManagedDatastoreS3Storage omitted. + +// se_SqlQueryDatasetAction omitted. + +// se_Tag omitted. + +// se_TagList omitted. + +// se_TimestampPartition omitted. + +// se_TriggeringDataset omitted. + /** - * serializeAws_restJson1DatasetTrigger + * serializeAws_restJson1Variable */ -const se_DatasetTrigger = (input: DatasetTrigger, context: __SerdeContext): any => { - return { - ...(input.dataset != null && { dataset: se_TriggeringDataset(input.dataset, context) }), - ...(input.schedule != null && { schedule: se_Schedule(input.schedule, context) }), - }; +const se_Variable = (input: Variable, context: __SerdeContext): any => { + return take(input, { + datasetContentVersionValue: _json, + doubleValue: __serializeFloat, + name: [], + outputFileUriValue: _json, + stringValue: [], + }); }; /** - * serializeAws_restJson1DatasetTriggers + * serializeAws_restJson1Variables */ -const se_DatasetTriggers = (input: DatasetTrigger[], context: __SerdeContext): any => { +const se_Variables = (input: Variable[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DatasetTrigger(entry, context); + return se_Variable(entry, context); }); }; +// se_VersioningConfiguration omitted. + +// de_AddAttributesActivity omitted. + +// de_AttributeNameMapping omitted. + +// de_AttributeNames omitted. + +// de_BatchPutMessageErrorEntries omitted. + +// de_BatchPutMessageErrorEntry omitted. + /** - * serializeAws_restJson1DatastoreActivity + * deserializeAws_restJson1Channel */ -const se_DatastoreActivity = (input: DatastoreActivity, context: __SerdeContext): any => { - return { - ...(input.datastoreName != null && { datastoreName: input.datastoreName }), - ...(input.name != null && { name: input.name }), - }; +const de_Channel = (output: any, context: __SerdeContext): Channel => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastMessageArrivalTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + retentionPeriod: _json, + status: __expectString, + storage: _json, + }) as any; }; +// de_ChannelActivity omitted. + /** - * serializeAws_restJson1DatastoreIotSiteWiseMultiLayerStorage + * deserializeAws_restJson1ChannelStatistics */ -const se_DatastoreIotSiteWiseMultiLayerStorage = ( - input: DatastoreIotSiteWiseMultiLayerStorage, - context: __SerdeContext -): any => { - return { - ...(input.customerManagedS3Storage != null && { - customerManagedS3Storage: se_IotSiteWiseCustomerManagedDatastoreS3Storage( - input.customerManagedS3Storage, - context - ), - }), - }; +const de_ChannelStatistics = (output: any, context: __SerdeContext): ChannelStatistics => { + return take(output, { + size: (_: any) => de_EstimatedResourceSize(_, context), + }) as any; }; +// de_ChannelStorage omitted. + +// de_ChannelStorageSummary omitted. + /** - * serializeAws_restJson1DatastorePartition + * deserializeAws_restJson1ChannelSummaries */ -const se_DatastorePartition = (input: DatastorePartition, context: __SerdeContext): any => { - return { - ...(input.attributePartition != null && { attributePartition: se_Partition(input.attributePartition, context) }), - ...(input.timestampPartition != null && { - timestampPartition: se_TimestampPartition(input.timestampPartition, context), - }), - }; +const de_ChannelSummaries = (output: any, context: __SerdeContext): ChannelSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ChannelSummary(entry, context); + }); + return retVal; }; /** - * serializeAws_restJson1DatastorePartitions - */ -const se_DatastorePartitions = (input: DatastorePartitions, context: __SerdeContext): any => { - return { - ...(input.partitions != null && { partitions: se_Partitions(input.partitions, context) }), - }; -}; - -/** - * serializeAws_restJson1DatastoreStorage - */ -const se_DatastoreStorage = (input: DatastoreStorage, context: __SerdeContext): any => { - return DatastoreStorage.visit(input, { - customerManagedS3: (value) => ({ customerManagedS3: se_CustomerManagedDatastoreS3Storage(value, context) }), - iotSiteWiseMultiLayerStorage: (value) => ({ - iotSiteWiseMultiLayerStorage: se_DatastoreIotSiteWiseMultiLayerStorage(value, context), - }), - serviceManagedS3: (value) => ({ serviceManagedS3: se_ServiceManagedDatastoreS3Storage(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1DeltaTime - */ -const se_DeltaTime = (input: DeltaTime, context: __SerdeContext): any => { - return { - ...(input.offsetSeconds != null && { offsetSeconds: input.offsetSeconds }), - ...(input.timeExpression != null && { timeExpression: input.timeExpression }), - }; -}; - -/** - * serializeAws_restJson1DeltaTimeSessionWindowConfiguration - */ -const se_DeltaTimeSessionWindowConfiguration = ( - input: DeltaTimeSessionWindowConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.timeoutInMinutes != null && { timeoutInMinutes: input.timeoutInMinutes }), - }; -}; - -/** - * serializeAws_restJson1DeviceRegistryEnrichActivity - */ -const se_DeviceRegistryEnrichActivity = (input: DeviceRegistryEnrichActivity, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; - -/** - * serializeAws_restJson1DeviceShadowEnrichActivity - */ -const se_DeviceShadowEnrichActivity = (input: DeviceShadowEnrichActivity, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; - -/** - * serializeAws_restJson1FileFormatConfiguration - */ -const se_FileFormatConfiguration = (input: FileFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.jsonConfiguration != null && { - jsonConfiguration: se_JsonConfiguration(input.jsonConfiguration, context), - }), - ...(input.parquetConfiguration != null && { - parquetConfiguration: se_ParquetConfiguration(input.parquetConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1FilterActivity - */ -const se_FilterActivity = (input: FilterActivity, context: __SerdeContext): any => { - return { - ...(input.filter != null && { filter: input.filter }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; - -/** - * serializeAws_restJson1GlueConfiguration - */ -const se_GlueConfiguration = (input: GlueConfiguration, context: __SerdeContext): any => { - return { - ...(input.databaseName != null && { databaseName: input.databaseName }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; - -/** - * serializeAws_restJson1IotEventsDestinationConfiguration - */ -const se_IotEventsDestinationConfiguration = ( - input: IotEventsDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.inputName != null && { inputName: input.inputName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_restJson1IotSiteWiseCustomerManagedDatastoreS3Storage - */ -const se_IotSiteWiseCustomerManagedDatastoreS3Storage = ( - input: IotSiteWiseCustomerManagedDatastoreS3Storage, - context: __SerdeContext -): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - }; -}; - -/** - * serializeAws_restJson1JsonConfiguration - */ -const se_JsonConfiguration = (input: JsonConfiguration, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_restJson1LambdaActivity - */ -const se_LambdaActivity = (input: LambdaActivity, context: __SerdeContext): any => { - return { - ...(input.batchSize != null && { batchSize: input.batchSize }), - ...(input.lambdaName != null && { lambdaName: input.lambdaName }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; - -/** - * serializeAws_restJson1LateDataRule - */ -const se_LateDataRule = (input: LateDataRule, context: __SerdeContext): any => { - return { - ...(input.ruleConfiguration != null && { - ruleConfiguration: se_LateDataRuleConfiguration(input.ruleConfiguration, context), - }), - ...(input.ruleName != null && { ruleName: input.ruleName }), - }; -}; - -/** - * serializeAws_restJson1LateDataRuleConfiguration - */ -const se_LateDataRuleConfiguration = (input: LateDataRuleConfiguration, context: __SerdeContext): any => { - return { - ...(input.deltaTimeSessionWindowConfiguration != null && { - deltaTimeSessionWindowConfiguration: se_DeltaTimeSessionWindowConfiguration( - input.deltaTimeSessionWindowConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1LateDataRules - */ -const se_LateDataRules = (input: LateDataRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LateDataRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1LoggingOptions - */ -const se_LoggingOptions = (input: LoggingOptions, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.level != null && { level: input.level }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_restJson1MathActivity - */ -const se_MathActivity = (input: MathActivity, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.math != null && { math: input.math }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; - -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.messageId != null && { messageId: input.messageId }), - ...(input.payload != null && { payload: context.base64Encoder(input.payload) }), - }; -}; - -/** - * serializeAws_restJson1MessagePayloads - */ -const se_MessagePayloads = (input: Uint8Array[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return context.base64Encoder(entry); - }); -}; - -/** - * serializeAws_restJson1Messages - */ -const se_Messages = (input: Message[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Message(entry, context); - }); -}; - -/** - * serializeAws_restJson1OutputFileUriValue - */ -const se_OutputFileUriValue = (input: OutputFileUriValue, context: __SerdeContext): any => { - return { - ...(input.fileName != null && { fileName: input.fileName }), - }; -}; - -/** - * serializeAws_restJson1ParquetConfiguration - */ -const se_ParquetConfiguration = (input: ParquetConfiguration, context: __SerdeContext): any => { - return { - ...(input.schemaDefinition != null && { schemaDefinition: se_SchemaDefinition(input.schemaDefinition, context) }), - }; -}; - -/** - * serializeAws_restJson1Partition - */ -const se_Partition = (input: Partition, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - }; -}; - -/** - * serializeAws_restJson1Partitions - */ -const se_Partitions = (input: DatastorePartition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DatastorePartition(entry, context); - }); -}; - -/** - * serializeAws_restJson1PipelineActivities - */ -const se_PipelineActivities = (input: PipelineActivity[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PipelineActivity(entry, context); - }); -}; - -/** - * serializeAws_restJson1PipelineActivity - */ -const se_PipelineActivity = (input: PipelineActivity, context: __SerdeContext): any => { - return { - ...(input.addAttributes != null && { addAttributes: se_AddAttributesActivity(input.addAttributes, context) }), - ...(input.channel != null && { channel: se_ChannelActivity(input.channel, context) }), - ...(input.datastore != null && { datastore: se_DatastoreActivity(input.datastore, context) }), - ...(input.deviceRegistryEnrich != null && { - deviceRegistryEnrich: se_DeviceRegistryEnrichActivity(input.deviceRegistryEnrich, context), - }), - ...(input.deviceShadowEnrich != null && { - deviceShadowEnrich: se_DeviceShadowEnrichActivity(input.deviceShadowEnrich, context), - }), - ...(input.filter != null && { filter: se_FilterActivity(input.filter, context) }), - ...(input.lambda != null && { lambda: se_LambdaActivity(input.lambda, context) }), - ...(input.math != null && { math: se_MathActivity(input.math, context) }), - ...(input.removeAttributes != null && { - removeAttributes: se_RemoveAttributesActivity(input.removeAttributes, context), - }), - ...(input.selectAttributes != null && { - selectAttributes: se_SelectAttributesActivity(input.selectAttributes, context), - }), - }; -}; - -/** - * serializeAws_restJson1QueryFilter - */ -const se_QueryFilter = (input: QueryFilter, context: __SerdeContext): any => { - return { - ...(input.deltaTime != null && { deltaTime: se_DeltaTime(input.deltaTime, context) }), - }; -}; - -/** - * serializeAws_restJson1QueryFilters - */ -const se_QueryFilters = (input: QueryFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_QueryFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1RemoveAttributesActivity - */ -const se_RemoveAttributesActivity = (input: RemoveAttributesActivity, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_AttributeNames(input.attributes, context) }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; - -/** - * serializeAws_restJson1ResourceConfiguration - */ -const se_ResourceConfiguration = (input: ResourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.computeType != null && { computeType: input.computeType }), - ...(input.volumeSizeInGB != null && { volumeSizeInGB: input.volumeSizeInGB }), - }; -}; - -/** - * serializeAws_restJson1RetentionPeriod - */ -const se_RetentionPeriod = (input: RetentionPeriod, context: __SerdeContext): any => { - return { - ...(input.numberOfDays != null && { numberOfDays: input.numberOfDays }), - ...(input.unlimited != null && { unlimited: input.unlimited }), - }; -}; - -/** - * serializeAws_restJson1S3DestinationConfiguration - */ -const se_S3DestinationConfiguration = (input: S3DestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.glueConfiguration != null && { - glueConfiguration: se_GlueConfiguration(input.glueConfiguration, context), - }), - ...(input.key != null && { key: input.key }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; - -/** - * serializeAws_restJson1S3PathChannelMessages - */ -const se_S3PathChannelMessages = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Schedule - */ -const se_Schedule = (input: Schedule, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - }; -}; - -/** - * serializeAws_restJson1SchemaDefinition - */ -const se_SchemaDefinition = (input: SchemaDefinition, context: __SerdeContext): any => { - return { - ...(input.columns != null && { columns: se_Columns(input.columns, context) }), - }; -}; - -/** - * serializeAws_restJson1SelectAttributesActivity - */ -const se_SelectAttributesActivity = (input: SelectAttributesActivity, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_AttributeNames(input.attributes, context) }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: input.next }), - }; -}; - -/** - * serializeAws_restJson1ServiceManagedChannelS3Storage - */ -const se_ServiceManagedChannelS3Storage = (input: ServiceManagedChannelS3Storage, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_restJson1ServiceManagedDatastoreS3Storage - */ -const se_ServiceManagedDatastoreS3Storage = (input: ServiceManagedDatastoreS3Storage, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_restJson1SqlQueryDatasetAction - */ -const se_SqlQueryDatasetAction = (input: SqlQueryDatasetAction, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_QueryFilters(input.filters, context) }), - ...(input.sqlQuery != null && { sqlQuery: input.sqlQuery }), - }; -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1TimestampPartition - */ -const se_TimestampPartition = (input: TimestampPartition, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.timestampFormat != null && { timestampFormat: input.timestampFormat }), - }; -}; - -/** - * serializeAws_restJson1TriggeringDataset - */ -const se_TriggeringDataset = (input: TriggeringDataset, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_restJson1Variable - */ -const se_Variable = (input: Variable, context: __SerdeContext): any => { - return { - ...(input.datasetContentVersionValue != null && { - datasetContentVersionValue: se_DatasetContentVersionValue(input.datasetContentVersionValue, context), - }), - ...(input.doubleValue != null && { doubleValue: __serializeFloat(input.doubleValue) }), - ...(input.name != null && { name: input.name }), - ...(input.outputFileUriValue != null && { - outputFileUriValue: se_OutputFileUriValue(input.outputFileUriValue, context), - }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; -}; - -/** - * serializeAws_restJson1Variables - */ -const se_Variables = (input: Variable[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Variable(entry, context); - }); -}; - -/** - * serializeAws_restJson1VersioningConfiguration - */ -const se_VersioningConfiguration = (input: VersioningConfiguration, context: __SerdeContext): any => { - return { - ...(input.maxVersions != null && { maxVersions: input.maxVersions }), - ...(input.unlimited != null && { unlimited: input.unlimited }), - }; -}; - -/** - * deserializeAws_restJson1AddAttributesActivity - */ -const de_AddAttributesActivity = (output: any, context: __SerdeContext): AddAttributesActivity => { - return { - attributes: output.attributes != null ? de_AttributeNameMapping(output.attributes, context) : undefined, - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; - -/** - * deserializeAws_restJson1AttributeNameMapping - */ -const de_AttributeNameMapping = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AttributeNames - */ -const de_AttributeNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchPutMessageErrorEntries - */ -const de_BatchPutMessageErrorEntries = (output: any, context: __SerdeContext): BatchPutMessageErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutMessageErrorEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchPutMessageErrorEntry - */ -const de_BatchPutMessageErrorEntry = (output: any, context: __SerdeContext): BatchPutMessageErrorEntry => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - messageId: __expectString(output.messageId), - } as any; -}; - -/** - * deserializeAws_restJson1Channel - */ -const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastMessageArrivalTime: - output.lastMessageArrivalTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastMessageArrivalTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - name: __expectString(output.name), - retentionPeriod: output.retentionPeriod != null ? de_RetentionPeriod(output.retentionPeriod, context) : undefined, - status: __expectString(output.status), - storage: output.storage != null ? de_ChannelStorage(output.storage, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelActivity - */ -const de_ChannelActivity = (output: any, context: __SerdeContext): ChannelActivity => { - return { - channelName: __expectString(output.channelName), - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; - -/** - * deserializeAws_restJson1ChannelStatistics - */ -const de_ChannelStatistics = (output: any, context: __SerdeContext): ChannelStatistics => { - return { - size: output.size != null ? de_EstimatedResourceSize(output.size, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelStorage - */ -const de_ChannelStorage = (output: any, context: __SerdeContext): ChannelStorage => { - return { - customerManagedS3: - output.customerManagedS3 != null - ? de_CustomerManagedChannelS3Storage(output.customerManagedS3, context) - : undefined, - serviceManagedS3: - output.serviceManagedS3 != null ? de_ServiceManagedChannelS3Storage(output.serviceManagedS3, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelStorageSummary - */ -const de_ChannelStorageSummary = (output: any, context: __SerdeContext): ChannelStorageSummary => { - return { - customerManagedS3: - output.customerManagedS3 != null - ? de_CustomerManagedChannelS3StorageSummary(output.customerManagedS3, context) - : undefined, - serviceManagedS3: - output.serviceManagedS3 != null - ? de_ServiceManagedChannelS3StorageSummary(output.serviceManagedS3, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ChannelSummaries - */ -const de_ChannelSummaries = (output: any, context: __SerdeContext): ChannelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChannelSummary + * deserializeAws_restJson1ChannelSummary */ const de_ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => { - return { - channelName: __expectString(output.channelName), - channelStorage: - output.channelStorage != null ? de_ChannelStorageSummary(output.channelStorage, context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastMessageArrivalTime: - output.lastMessageArrivalTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastMessageArrivalTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + channelName: __expectString, + channelStorage: _json, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastMessageArrivalTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Column - */ -const de_Column = (output: any, context: __SerdeContext): Column => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_Column omitted. -/** - * deserializeAws_restJson1Columns - */ -const de_Columns = (output: any, context: __SerdeContext): Column[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Column(entry, context); - }); - return retVal; -}; +// de_Columns omitted. /** * deserializeAws_restJson1ContainerDatasetAction */ const de_ContainerDatasetAction = (output: any, context: __SerdeContext): ContainerDatasetAction => { - return { - executionRoleArn: __expectString(output.executionRoleArn), - image: __expectString(output.image), - resourceConfiguration: - output.resourceConfiguration != null - ? de_ResourceConfiguration(output.resourceConfiguration, context) - : undefined, - variables: output.variables != null ? de_Variables(output.variables, context) : undefined, - } as any; + return take(output, { + executionRoleArn: __expectString, + image: __expectString, + resourceConfiguration: _json, + variables: (_: any) => de_Variables(_, context), + }) as any; }; -/** - * deserializeAws_restJson1CustomerManagedChannelS3Storage - */ -const de_CustomerManagedChannelS3Storage = (output: any, context: __SerdeContext): CustomerManagedChannelS3Storage => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_CustomerManagedChannelS3Storage omitted. -/** - * deserializeAws_restJson1CustomerManagedChannelS3StorageSummary - */ -const de_CustomerManagedChannelS3StorageSummary = ( - output: any, - context: __SerdeContext -): CustomerManagedChannelS3StorageSummary => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_CustomerManagedChannelS3StorageSummary omitted. -/** - * deserializeAws_restJson1CustomerManagedDatastoreS3Storage - */ -const de_CustomerManagedDatastoreS3Storage = ( - output: any, - context: __SerdeContext -): CustomerManagedDatastoreS3Storage => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_CustomerManagedDatastoreS3Storage omitted. -/** - * deserializeAws_restJson1CustomerManagedDatastoreS3StorageSummary - */ -const de_CustomerManagedDatastoreS3StorageSummary = ( - output: any, - context: __SerdeContext -): CustomerManagedDatastoreS3StorageSummary => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_CustomerManagedDatastoreS3StorageSummary omitted. /** * deserializeAws_restJson1Dataset */ const de_Dataset = (output: any, context: __SerdeContext): Dataset => { - return { - actions: output.actions != null ? de_DatasetActions(output.actions, context) : undefined, - arn: __expectString(output.arn), - contentDeliveryRules: - output.contentDeliveryRules != null - ? de_DatasetContentDeliveryRules(output.contentDeliveryRules, context) - : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - lateDataRules: output.lateDataRules != null ? de_LateDataRules(output.lateDataRules, context) : undefined, - name: __expectString(output.name), - retentionPeriod: output.retentionPeriod != null ? de_RetentionPeriod(output.retentionPeriod, context) : undefined, - status: __expectString(output.status), - triggers: output.triggers != null ? de_DatasetTriggers(output.triggers, context) : undefined, - versioningConfiguration: - output.versioningConfiguration != null - ? de_VersioningConfiguration(output.versioningConfiguration, context) - : undefined, - } as any; + return take(output, { + actions: (_: any) => de_DatasetActions(_, context), + arn: __expectString, + contentDeliveryRules: _json, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lateDataRules: _json, + name: __expectString, + retentionPeriod: _json, + status: __expectString, + triggers: _json, + versioningConfiguration: _json, + }) as any; }; /** * deserializeAws_restJson1DatasetAction */ const de_DatasetAction = (output: any, context: __SerdeContext): DatasetAction => { - return { - actionName: __expectString(output.actionName), - containerAction: - output.containerAction != null ? de_ContainerDatasetAction(output.containerAction, context) : undefined, - queryAction: output.queryAction != null ? de_SqlQueryDatasetAction(output.queryAction, context) : undefined, - } as any; + return take(output, { + actionName: __expectString, + containerAction: (_: any) => de_ContainerDatasetAction(_, context), + queryAction: _json, + }) as any; }; /** @@ -4485,93 +3669,22 @@ const de_DatasetActions = (output: any, context: __SerdeContext): DatasetAction[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetAction(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DatasetActionSummaries - */ -const de_DatasetActionSummaries = (output: any, context: __SerdeContext): DatasetActionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatasetActionSummary(entry, context); - }); - return retVal; -}; +// de_DatasetActionSummaries omitted. -/** - * deserializeAws_restJson1DatasetActionSummary - */ -const de_DatasetActionSummary = (output: any, context: __SerdeContext): DatasetActionSummary => { - return { - actionName: __expectString(output.actionName), - actionType: __expectString(output.actionType), - } as any; -}; +// de_DatasetActionSummary omitted. -/** - * deserializeAws_restJson1DatasetContentDeliveryDestination - */ -const de_DatasetContentDeliveryDestination = ( - output: any, - context: __SerdeContext -): DatasetContentDeliveryDestination => { - return { - iotEventsDestinationConfiguration: - output.iotEventsDestinationConfiguration != null - ? de_IotEventsDestinationConfiguration(output.iotEventsDestinationConfiguration, context) - : undefined, - s3DestinationConfiguration: - output.s3DestinationConfiguration != null - ? de_S3DestinationConfiguration(output.s3DestinationConfiguration, context) - : undefined, - } as any; -}; +// de_DatasetContentDeliveryDestination omitted. -/** - * deserializeAws_restJson1DatasetContentDeliveryRule - */ -const de_DatasetContentDeliveryRule = (output: any, context: __SerdeContext): DatasetContentDeliveryRule => { - return { - destination: - output.destination != null ? de_DatasetContentDeliveryDestination(output.destination, context) : undefined, - entryName: __expectString(output.entryName), - } as any; -}; +// de_DatasetContentDeliveryRule omitted. -/** - * deserializeAws_restJson1DatasetContentDeliveryRules - */ -const de_DatasetContentDeliveryRules = (output: any, context: __SerdeContext): DatasetContentDeliveryRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatasetContentDeliveryRule(entry, context); - }); - return retVal; -}; +// de_DatasetContentDeliveryRules omitted. -/** - * deserializeAws_restJson1DatasetContentStatus - */ -const de_DatasetContentStatus = (output: any, context: __SerdeContext): DatasetContentStatus => { - return { - reason: __expectString(output.reason), - state: __expectString(output.state), - } as any; -}; +// de_DatasetContentStatus omitted. /** * deserializeAws_restJson1DatasetContentSummaries @@ -4580,9 +3693,6 @@ const de_DatasetContentSummaries = (output: any, context: __SerdeContext): Datas const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetContentSummary(entry, context); }); return retVal; @@ -4592,57 +3702,20 @@ const de_DatasetContentSummaries = (output: any, context: __SerdeContext): Datas * deserializeAws_restJson1DatasetContentSummary */ const de_DatasetContentSummary = (output: any, context: __SerdeContext): DatasetContentSummary => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) - : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - scheduleTime: - output.scheduleTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scheduleTime))) - : undefined, - status: output.status != null ? de_DatasetContentStatus(output.status, context) : undefined, - version: __expectString(output.version), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + scheduleTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DatasetContentVersionValue - */ -const de_DatasetContentVersionValue = (output: any, context: __SerdeContext): DatasetContentVersionValue => { - return { - datasetName: __expectString(output.datasetName), - } as any; -}; +// de_DatasetContentVersionValue omitted. -/** - * deserializeAws_restJson1DatasetEntries - */ -const de_DatasetEntries = (output: any, context: __SerdeContext): DatasetEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatasetEntry(entry, context); - }); - return retVal; -}; +// de_DatasetEntries omitted. -/** - * deserializeAws_restJson1DatasetEntry - */ -const de_DatasetEntry = (output: any, context: __SerdeContext): DatasetEntry => { - return { - dataURI: __expectString(output.dataURI), - entryName: __expectString(output.entryName), - } as any; -}; +// de_DatasetEntry omitted. /** * deserializeAws_restJson1DatasetSummaries @@ -4651,9 +3724,6 @@ const de_DatasetSummaries = (output: any, context: __SerdeContext): DatasetSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetSummary(entry, context); }); return retVal; @@ -4663,192 +3733,60 @@ const de_DatasetSummaries = (output: any, context: __SerdeContext): DatasetSumma * deserializeAws_restJson1DatasetSummary */ const de_DatasetSummary = (output: any, context: __SerdeContext): DatasetSummary => { - return { - actions: output.actions != null ? de_DatasetActionSummaries(output.actions, context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - datasetName: __expectString(output.datasetName), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - status: __expectString(output.status), - triggers: output.triggers != null ? de_DatasetTriggers(output.triggers, context) : undefined, - } as any; + return take(output, { + actions: _json, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetName: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + triggers: _json, + }) as any; }; -/** - * deserializeAws_restJson1DatasetTrigger - */ -const de_DatasetTrigger = (output: any, context: __SerdeContext): DatasetTrigger => { - return { - dataset: output.dataset != null ? de_TriggeringDataset(output.dataset, context) : undefined, - schedule: output.schedule != null ? de_Schedule(output.schedule, context) : undefined, - } as any; -}; +// de_DatasetTrigger omitted. -/** - * deserializeAws_restJson1DatasetTriggers - */ -const de_DatasetTriggers = (output: any, context: __SerdeContext): DatasetTrigger[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatasetTrigger(entry, context); - }); - return retVal; -}; +// de_DatasetTriggers omitted. /** * deserializeAws_restJson1Datastore */ const de_Datastore = (output: any, context: __SerdeContext): Datastore => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - datastorePartitions: - output.datastorePartitions != null ? de_DatastorePartitions(output.datastorePartitions, context) : undefined, - fileFormatConfiguration: - output.fileFormatConfiguration != null - ? de_FileFormatConfiguration(output.fileFormatConfiguration, context) - : undefined, - lastMessageArrivalTime: - output.lastMessageArrivalTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastMessageArrivalTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - name: __expectString(output.name), - retentionPeriod: output.retentionPeriod != null ? de_RetentionPeriod(output.retentionPeriod, context) : undefined, - status: __expectString(output.status), - storage: output.storage != null ? de_DatastoreStorage(__expectUnion(output.storage), context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DatastoreActivity - */ -const de_DatastoreActivity = (output: any, context: __SerdeContext): DatastoreActivity => { - return { - datastoreName: __expectString(output.datastoreName), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_restJson1DatastoreIotSiteWiseMultiLayerStorage - */ -const de_DatastoreIotSiteWiseMultiLayerStorage = ( - output: any, - context: __SerdeContext -): DatastoreIotSiteWiseMultiLayerStorage => { - return { - customerManagedS3Storage: - output.customerManagedS3Storage != null - ? de_IotSiteWiseCustomerManagedDatastoreS3Storage(output.customerManagedS3Storage, context) - : undefined, - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datastorePartitions: _json, + fileFormatConfiguration: _json, + lastMessageArrivalTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + retentionPeriod: _json, + status: __expectString, + storage: (_: any) => _json(__expectUnion(_)), + }) as any; }; -/** - * deserializeAws_restJson1DatastoreIotSiteWiseMultiLayerStorageSummary - */ -const de_DatastoreIotSiteWiseMultiLayerStorageSummary = ( - output: any, - context: __SerdeContext -): DatastoreIotSiteWiseMultiLayerStorageSummary => { - return { - customerManagedS3Storage: - output.customerManagedS3Storage != null - ? de_IotSiteWiseCustomerManagedDatastoreS3StorageSummary(output.customerManagedS3Storage, context) - : undefined, - } as any; -}; +// de_DatastoreActivity omitted. -/** - * deserializeAws_restJson1DatastorePartition - */ -const de_DatastorePartition = (output: any, context: __SerdeContext): DatastorePartition => { - return { - attributePartition: - output.attributePartition != null ? de_Partition(output.attributePartition, context) : undefined, - timestampPartition: - output.timestampPartition != null ? de_TimestampPartition(output.timestampPartition, context) : undefined, - } as any; -}; +// de_DatastoreIotSiteWiseMultiLayerStorage omitted. -/** - * deserializeAws_restJson1DatastorePartitions - */ -const de_DatastorePartitions = (output: any, context: __SerdeContext): DatastorePartitions => { - return { - partitions: output.partitions != null ? de_Partitions(output.partitions, context) : undefined, - } as any; -}; +// de_DatastoreIotSiteWiseMultiLayerStorageSummary omitted. + +// de_DatastorePartition omitted. + +// de_DatastorePartitions omitted. /** * deserializeAws_restJson1DatastoreStatistics */ const de_DatastoreStatistics = (output: any, context: __SerdeContext): DatastoreStatistics => { - return { - size: output.size != null ? de_EstimatedResourceSize(output.size, context) : undefined, - } as any; + return take(output, { + size: (_: any) => de_EstimatedResourceSize(_, context), + }) as any; }; -/** - * deserializeAws_restJson1DatastoreStorage - */ -const de_DatastoreStorage = (output: any, context: __SerdeContext): DatastoreStorage => { - if (output.customerManagedS3 != null) { - return { - customerManagedS3: de_CustomerManagedDatastoreS3Storage(output.customerManagedS3, context), - }; - } - if (output.iotSiteWiseMultiLayerStorage != null) { - return { - iotSiteWiseMultiLayerStorage: de_DatastoreIotSiteWiseMultiLayerStorage( - output.iotSiteWiseMultiLayerStorage, - context - ), - }; - } - if (output.serviceManagedS3 != null) { - return { - serviceManagedS3: de_ServiceManagedDatastoreS3Storage(output.serviceManagedS3, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_DatastoreStorage omitted. -/** - * deserializeAws_restJson1DatastoreStorageSummary - */ -const de_DatastoreStorageSummary = (output: any, context: __SerdeContext): DatastoreStorageSummary => { - return { - customerManagedS3: - output.customerManagedS3 != null - ? de_CustomerManagedDatastoreS3StorageSummary(output.customerManagedS3, context) - : undefined, - iotSiteWiseMultiLayerStorage: - output.iotSiteWiseMultiLayerStorage != null - ? de_DatastoreIotSiteWiseMultiLayerStorageSummary(output.iotSiteWiseMultiLayerStorage, context) - : undefined, - serviceManagedS3: - output.serviceManagedS3 != null - ? de_ServiceManagedDatastoreS3StorageSummary(output.serviceManagedS3, context) - : undefined, - } as any; -}; +// de_DatastoreStorageSummary omitted. /** * deserializeAws_restJson1DatastoreSummaries @@ -4857,9 +3795,6 @@ const de_DatastoreSummaries = (output: any, context: __SerdeContext): DatastoreS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatastoreSummary(entry, context); }); return retVal; @@ -4869,241 +3804,61 @@ const de_DatastoreSummaries = (output: any, context: __SerdeContext): DatastoreS * deserializeAws_restJson1DatastoreSummary */ const de_DatastoreSummary = (output: any, context: __SerdeContext): DatastoreSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - datastoreName: __expectString(output.datastoreName), - datastorePartitions: - output.datastorePartitions != null ? de_DatastorePartitions(output.datastorePartitions, context) : undefined, - datastoreStorage: - output.datastoreStorage != null ? de_DatastoreStorageSummary(output.datastoreStorage, context) : undefined, - fileFormatType: __expectString(output.fileFormatType), - lastMessageArrivalTime: - output.lastMessageArrivalTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastMessageArrivalTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1DeltaTime - */ -const de_DeltaTime = (output: any, context: __SerdeContext): DeltaTime => { - return { - offsetSeconds: __expectInt32(output.offsetSeconds), - timeExpression: __expectString(output.timeExpression), - } as any; -}; - -/** - * deserializeAws_restJson1DeltaTimeSessionWindowConfiguration - */ -const de_DeltaTimeSessionWindowConfiguration = ( - output: any, - context: __SerdeContext -): DeltaTimeSessionWindowConfiguration => { - return { - timeoutInMinutes: __expectInt32(output.timeoutInMinutes), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datastoreName: __expectString, + datastorePartitions: _json, + datastoreStorage: _json, + fileFormatType: __expectString, + lastMessageArrivalTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DeviceRegistryEnrichActivity - */ -const de_DeviceRegistryEnrichActivity = (output: any, context: __SerdeContext): DeviceRegistryEnrichActivity => { - return { - attribute: __expectString(output.attribute), - name: __expectString(output.name), - next: __expectString(output.next), - roleArn: __expectString(output.roleArn), - thingName: __expectString(output.thingName), - } as any; -}; +// de_DeltaTime omitted. -/** - * deserializeAws_restJson1DeviceShadowEnrichActivity - */ -const de_DeviceShadowEnrichActivity = (output: any, context: __SerdeContext): DeviceShadowEnrichActivity => { - return { - attribute: __expectString(output.attribute), - name: __expectString(output.name), - next: __expectString(output.next), - roleArn: __expectString(output.roleArn), - thingName: __expectString(output.thingName), - } as any; -}; +// de_DeltaTimeSessionWindowConfiguration omitted. + +// de_DeviceRegistryEnrichActivity omitted. + +// de_DeviceShadowEnrichActivity omitted. /** * deserializeAws_restJson1EstimatedResourceSize */ const de_EstimatedResourceSize = (output: any, context: __SerdeContext): EstimatedResourceSize => { - return { - estimatedOn: - output.estimatedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.estimatedOn))) - : undefined, - estimatedSizeInBytes: __limitedParseDouble(output.estimatedSizeInBytes), - } as any; + return take(output, { + estimatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + estimatedSizeInBytes: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1FileFormatConfiguration - */ -const de_FileFormatConfiguration = (output: any, context: __SerdeContext): FileFormatConfiguration => { - return { - jsonConfiguration: - output.jsonConfiguration != null ? de_JsonConfiguration(output.jsonConfiguration, context) : undefined, - parquetConfiguration: - output.parquetConfiguration != null ? de_ParquetConfiguration(output.parquetConfiguration, context) : undefined, - } as any; -}; +// de_FileFormatConfiguration omitted. -/** - * deserializeAws_restJson1FilterActivity - */ -const de_FilterActivity = (output: any, context: __SerdeContext): FilterActivity => { - return { - filter: __expectString(output.filter), - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; +// de_FilterActivity omitted. -/** - * deserializeAws_restJson1GlueConfiguration - */ -const de_GlueConfiguration = (output: any, context: __SerdeContext): GlueConfiguration => { - return { - databaseName: __expectString(output.databaseName), - tableName: __expectString(output.tableName), - } as any; -}; +// de_GlueConfiguration omitted. -/** - * deserializeAws_restJson1IotEventsDestinationConfiguration - */ -const de_IotEventsDestinationConfiguration = ( - output: any, - context: __SerdeContext -): IotEventsDestinationConfiguration => { - return { - inputName: __expectString(output.inputName), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_IotEventsDestinationConfiguration omitted. -/** - * deserializeAws_restJson1IotSiteWiseCustomerManagedDatastoreS3Storage - */ -const de_IotSiteWiseCustomerManagedDatastoreS3Storage = ( - output: any, - context: __SerdeContext -): IotSiteWiseCustomerManagedDatastoreS3Storage => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - } as any; -}; +// de_IotSiteWiseCustomerManagedDatastoreS3Storage omitted. -/** - * deserializeAws_restJson1IotSiteWiseCustomerManagedDatastoreS3StorageSummary - */ -const de_IotSiteWiseCustomerManagedDatastoreS3StorageSummary = ( - output: any, - context: __SerdeContext -): IotSiteWiseCustomerManagedDatastoreS3StorageSummary => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - } as any; -}; +// de_IotSiteWiseCustomerManagedDatastoreS3StorageSummary omitted. -/** - * deserializeAws_restJson1JsonConfiguration - */ -const de_JsonConfiguration = (output: any, context: __SerdeContext): JsonConfiguration => { - return {} as any; -}; +// de_JsonConfiguration omitted. -/** - * deserializeAws_restJson1LambdaActivity - */ -const de_LambdaActivity = (output: any, context: __SerdeContext): LambdaActivity => { - return { - batchSize: __expectInt32(output.batchSize), - lambdaName: __expectString(output.lambdaName), - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; +// de_LambdaActivity omitted. -/** - * deserializeAws_restJson1LateDataRule - */ -const de_LateDataRule = (output: any, context: __SerdeContext): LateDataRule => { - return { - ruleConfiguration: - output.ruleConfiguration != null ? de_LateDataRuleConfiguration(output.ruleConfiguration, context) : undefined, - ruleName: __expectString(output.ruleName), - } as any; -}; +// de_LateDataRule omitted. -/** - * deserializeAws_restJson1LateDataRuleConfiguration - */ -const de_LateDataRuleConfiguration = (output: any, context: __SerdeContext): LateDataRuleConfiguration => { - return { - deltaTimeSessionWindowConfiguration: - output.deltaTimeSessionWindowConfiguration != null - ? de_DeltaTimeSessionWindowConfiguration(output.deltaTimeSessionWindowConfiguration, context) - : undefined, - } as any; -}; +// de_LateDataRuleConfiguration omitted. -/** - * deserializeAws_restJson1LateDataRules - */ -const de_LateDataRules = (output: any, context: __SerdeContext): LateDataRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LateDataRule(entry, context); - }); - return retVal; -}; +// de_LateDataRules omitted. -/** - * deserializeAws_restJson1LoggingOptions - */ -const de_LoggingOptions = (output: any, context: __SerdeContext): LoggingOptions => { - return { - enabled: __expectBoolean(output.enabled), - level: __expectString(output.level), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_LoggingOptions omitted. -/** - * deserializeAws_restJson1MathActivity - */ -const de_MathActivity = (output: any, context: __SerdeContext): MathActivity => { - return { - attribute: __expectString(output.attribute), - math: __expectString(output.math), - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; +// de_MathActivity omitted. /** * deserializeAws_restJson1MessagePayloads @@ -5112,118 +3867,36 @@ const de_MessagePayloads = (output: any, context: __SerdeContext): Uint8Array[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return context.base64Decoder(entry); }); return retVal; }; -/** - * deserializeAws_restJson1OutputFileUriValue - */ -const de_OutputFileUriValue = (output: any, context: __SerdeContext): OutputFileUriValue => { - return { - fileName: __expectString(output.fileName), - } as any; -}; +// de_OutputFileUriValue omitted. -/** - * deserializeAws_restJson1ParquetConfiguration - */ -const de_ParquetConfiguration = (output: any, context: __SerdeContext): ParquetConfiguration => { - return { - schemaDefinition: - output.schemaDefinition != null ? de_SchemaDefinition(output.schemaDefinition, context) : undefined, - } as any; -}; +// de_ParquetConfiguration omitted. -/** - * deserializeAws_restJson1Partition - */ -const de_Partition = (output: any, context: __SerdeContext): Partition => { - return { - attributeName: __expectString(output.attributeName), - } as any; -}; +// de_Partition omitted. -/** - * deserializeAws_restJson1Partitions - */ -const de_Partitions = (output: any, context: __SerdeContext): DatastorePartition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatastorePartition(entry, context); - }); - return retVal; -}; +// de_Partitions omitted. /** * deserializeAws_restJson1Pipeline */ const de_Pipeline = (output: any, context: __SerdeContext): Pipeline => { - return { - activities: output.activities != null ? de_PipelineActivities(output.activities, context) : undefined, - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - name: __expectString(output.name), - reprocessingSummaries: - output.reprocessingSummaries != null - ? de_ReprocessingSummaries(output.reprocessingSummaries, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1PipelineActivities - */ -const de_PipelineActivities = (output: any, context: __SerdeContext): PipelineActivity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineActivity(entry, context); - }); - return retVal; + return take(output, { + activities: _json, + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + reprocessingSummaries: (_: any) => de_ReprocessingSummaries(_, context), + }) as any; }; -/** - * deserializeAws_restJson1PipelineActivity - */ -const de_PipelineActivity = (output: any, context: __SerdeContext): PipelineActivity => { - return { - addAttributes: output.addAttributes != null ? de_AddAttributesActivity(output.addAttributes, context) : undefined, - channel: output.channel != null ? de_ChannelActivity(output.channel, context) : undefined, - datastore: output.datastore != null ? de_DatastoreActivity(output.datastore, context) : undefined, - deviceRegistryEnrich: - output.deviceRegistryEnrich != null - ? de_DeviceRegistryEnrichActivity(output.deviceRegistryEnrich, context) - : undefined, - deviceShadowEnrich: - output.deviceShadowEnrich != null ? de_DeviceShadowEnrichActivity(output.deviceShadowEnrich, context) : undefined, - filter: output.filter != null ? de_FilterActivity(output.filter, context) : undefined, - lambda: output.lambda != null ? de_LambdaActivity(output.lambda, context) : undefined, - math: output.math != null ? de_MathActivity(output.math, context) : undefined, - removeAttributes: - output.removeAttributes != null ? de_RemoveAttributesActivity(output.removeAttributes, context) : undefined, - selectAttributes: - output.selectAttributes != null ? de_SelectAttributesActivity(output.selectAttributes, context) : undefined, - } as any; -}; +// de_PipelineActivities omitted. + +// de_PipelineActivity omitted. /** * deserializeAws_restJson1PipelineSummaries @@ -5232,9 +3905,6 @@ const de_PipelineSummaries = (output: any, context: __SerdeContext): PipelineSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PipelineSummary(entry, context); }); return retVal; @@ -5244,57 +3914,19 @@ const de_PipelineSummaries = (output: any, context: __SerdeContext): PipelineSum * deserializeAws_restJson1PipelineSummary */ const de_PipelineSummary = (output: any, context: __SerdeContext): PipelineSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateTime))) - : undefined, - pipelineName: __expectString(output.pipelineName), - reprocessingSummaries: - output.reprocessingSummaries != null - ? de_ReprocessingSummaries(output.reprocessingSummaries, context) - : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pipelineName: __expectString, + reprocessingSummaries: (_: any) => de_ReprocessingSummaries(_, context), + }) as any; }; -/** - * deserializeAws_restJson1QueryFilter - */ -const de_QueryFilter = (output: any, context: __SerdeContext): QueryFilter => { - return { - deltaTime: output.deltaTime != null ? de_DeltaTime(output.deltaTime, context) : undefined, - } as any; -}; +// de_QueryFilter omitted. -/** - * deserializeAws_restJson1QueryFilters - */ -const de_QueryFilters = (output: any, context: __SerdeContext): QueryFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryFilter(entry, context); - }); - return retVal; -}; +// de_QueryFilters omitted. -/** - * deserializeAws_restJson1RemoveAttributesActivity - */ -const de_RemoveAttributesActivity = (output: any, context: __SerdeContext): RemoveAttributesActivity => { - return { - attributes: output.attributes != null ? de_AttributeNames(output.attributes, context) : undefined, - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; +// de_RemoveAttributesActivity omitted. /** * deserializeAws_restJson1ReprocessingSummaries @@ -5303,9 +3935,6 @@ const de_ReprocessingSummaries = (output: any, context: __SerdeContext): Reproce const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReprocessingSummary(entry, context); }); return retVal; @@ -5315,184 +3944,54 @@ const de_ReprocessingSummaries = (output: any, context: __SerdeContext): Reproce * deserializeAws_restJson1ReprocessingSummary */ const de_ReprocessingSummary = (output: any, context: __SerdeContext): ReprocessingSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - id: __expectString(output.id), - status: __expectString(output.status), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ResourceConfiguration - */ -const de_ResourceConfiguration = (output: any, context: __SerdeContext): ResourceConfiguration => { - return { - computeType: __expectString(output.computeType), - volumeSizeInGB: __expectInt32(output.volumeSizeInGB), - } as any; -}; +// de_ResourceConfiguration omitted. -/** - * deserializeAws_restJson1RetentionPeriod - */ -const de_RetentionPeriod = (output: any, context: __SerdeContext): RetentionPeriod => { - return { - numberOfDays: __expectInt32(output.numberOfDays), - unlimited: __expectBoolean(output.unlimited), - } as any; -}; +// de_RetentionPeriod omitted. -/** - * deserializeAws_restJson1S3DestinationConfiguration - */ -const de_S3DestinationConfiguration = (output: any, context: __SerdeContext): S3DestinationConfiguration => { - return { - bucket: __expectString(output.bucket), - glueConfiguration: - output.glueConfiguration != null ? de_GlueConfiguration(output.glueConfiguration, context) : undefined, - key: __expectString(output.key), - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_S3DestinationConfiguration omitted. -/** - * deserializeAws_restJson1Schedule - */ -const de_Schedule = (output: any, context: __SerdeContext): Schedule => { - return { - expression: __expectString(output.expression), - } as any; -}; +// de_Schedule omitted. -/** - * deserializeAws_restJson1SchemaDefinition - */ -const de_SchemaDefinition = (output: any, context: __SerdeContext): SchemaDefinition => { - return { - columns: output.columns != null ? de_Columns(output.columns, context) : undefined, - } as any; -}; +// de_SchemaDefinition omitted. -/** - * deserializeAws_restJson1SelectAttributesActivity - */ -const de_SelectAttributesActivity = (output: any, context: __SerdeContext): SelectAttributesActivity => { - return { - attributes: output.attributes != null ? de_AttributeNames(output.attributes, context) : undefined, - name: __expectString(output.name), - next: __expectString(output.next), - } as any; -}; +// de_SelectAttributesActivity omitted. -/** - * deserializeAws_restJson1ServiceManagedChannelS3Storage - */ -const de_ServiceManagedChannelS3Storage = (output: any, context: __SerdeContext): ServiceManagedChannelS3Storage => { - return {} as any; -}; +// de_ServiceManagedChannelS3Storage omitted. -/** - * deserializeAws_restJson1ServiceManagedChannelS3StorageSummary - */ -const de_ServiceManagedChannelS3StorageSummary = ( - output: any, - context: __SerdeContext -): ServiceManagedChannelS3StorageSummary => { - return {} as any; -}; +// de_ServiceManagedChannelS3StorageSummary omitted. -/** - * deserializeAws_restJson1ServiceManagedDatastoreS3Storage - */ -const de_ServiceManagedDatastoreS3Storage = ( - output: any, - context: __SerdeContext -): ServiceManagedDatastoreS3Storage => { - return {} as any; -}; +// de_ServiceManagedDatastoreS3Storage omitted. -/** - * deserializeAws_restJson1ServiceManagedDatastoreS3StorageSummary - */ -const de_ServiceManagedDatastoreS3StorageSummary = ( - output: any, - context: __SerdeContext -): ServiceManagedDatastoreS3StorageSummary => { - return {} as any; -}; +// de_ServiceManagedDatastoreS3StorageSummary omitted. -/** - * deserializeAws_restJson1SqlQueryDatasetAction - */ -const de_SqlQueryDatasetAction = (output: any, context: __SerdeContext): SqlQueryDatasetAction => { - return { - filters: output.filters != null ? de_QueryFilters(output.filters, context) : undefined, - sqlQuery: __expectString(output.sqlQuery), - } as any; -}; +// de_SqlQueryDatasetAction omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TimestampPartition - */ -const de_TimestampPartition = (output: any, context: __SerdeContext): TimestampPartition => { - return { - attributeName: __expectString(output.attributeName), - timestampFormat: __expectString(output.timestampFormat), - } as any; -}; +// de_TimestampPartition omitted. -/** - * deserializeAws_restJson1TriggeringDataset - */ -const de_TriggeringDataset = (output: any, context: __SerdeContext): TriggeringDataset => { - return { - name: __expectString(output.name), - } as any; -}; +// de_TriggeringDataset omitted. /** * deserializeAws_restJson1Variable */ const de_Variable = (output: any, context: __SerdeContext): Variable => { - return { - datasetContentVersionValue: - output.datasetContentVersionValue != null - ? de_DatasetContentVersionValue(output.datasetContentVersionValue, context) - : undefined, - doubleValue: __limitedParseDouble(output.doubleValue), - name: __expectString(output.name), - outputFileUriValue: - output.outputFileUriValue != null ? de_OutputFileUriValue(output.outputFileUriValue, context) : undefined, - stringValue: __expectString(output.stringValue), - } as any; + return take(output, { + datasetContentVersionValue: _json, + doubleValue: __limitedParseDouble, + name: __expectString, + outputFileUriValue: _json, + stringValue: __expectString, + }) as any; }; /** @@ -5502,23 +4001,12 @@ const de_Variables = (output: any, context: __SerdeContext): Variable[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Variable(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VersioningConfiguration - */ -const de_VersioningConfiguration = (output: any, context: __SerdeContext): VersioningConfiguration => { - return { - maxVersions: __expectInt32(output.maxVersions), - unlimited: __expectBoolean(output.unlimited), - } as any; -}; +// de_VersioningConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iotdeviceadvisor/src/protocols/Aws_restJson1.ts b/clients/client-iotdeviceadvisor/src/protocols/Aws_restJson1.ts index 8a459d6eaa48..563cd46c049c 100644 --- a/clients/client-iotdeviceadvisor/src/protocols/Aws_restJson1.ts +++ b/clients/client-iotdeviceadvisor/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -61,7 +63,6 @@ import { SuiteRunConfiguration, SuiteRunInformation, TestCaseRun, - TestCaseScenario, TestResult, ValidationException, } from "../models/models_0"; @@ -79,12 +80,12 @@ export const se_CreateSuiteDefinitionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/suiteDefinitions"; let body: any; - body = JSON.stringify({ - ...(input.suiteDefinitionConfiguration != null && { - suiteDefinitionConfiguration: se_SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + suiteDefinitionConfiguration: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -357,13 +358,13 @@ export const se_StartSuiteRunCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.suiteDefinitionVersion != null && { suiteDefinitionVersion: input.suiteDefinitionVersion }), - ...(input.suiteRunConfiguration != null && { - suiteRunConfiguration: se_SuiteRunConfiguration(input.suiteRunConfiguration, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + suiteDefinitionVersion: [], + suiteRunConfiguration: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -422,9 +423,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -488,11 +491,11 @@ export const se_UpdateSuiteDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.suiteDefinitionConfiguration != null && { - suiteDefinitionConfiguration: se_SuiteDefinitionConfiguration(input.suiteDefinitionConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + suiteDefinitionConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -518,18 +521,13 @@ export const de_CreateSuiteDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.suiteDefinitionArn != null) { - contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn); - } - if (data.suiteDefinitionId != null) { - contents.suiteDefinitionId = __expectString(data.suiteDefinitionId); - } - if (data.suiteDefinitionName != null) { - contents.suiteDefinitionName = __expectString(data.suiteDefinitionName); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + suiteDefinitionArn: __expectString, + suiteDefinitionId: __expectString, + suiteDefinitionName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -554,10 +552,9 @@ const de_CreateSuiteDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -601,10 +598,9 @@ const de_DeleteSuiteDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -624,9 +620,10 @@ export const de_GetEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endpoint != null) { - contents.endpoint = __expectString(data.endpoint); - } + const doc = take(data, { + endpoint: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -654,10 +651,9 @@ const de_GetEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -677,30 +673,17 @@ export const de_GetSuiteDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.lastModifiedAt != null) { - contents.lastModifiedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedAt))); - } - if (data.latestVersion != null) { - contents.latestVersion = __expectString(data.latestVersion); - } - if (data.suiteDefinitionArn != null) { - contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn); - } - if (data.suiteDefinitionConfiguration != null) { - contents.suiteDefinitionConfiguration = de_SuiteDefinitionConfiguration(data.suiteDefinitionConfiguration, context); - } - if (data.suiteDefinitionId != null) { - contents.suiteDefinitionId = __expectString(data.suiteDefinitionId); - } - if (data.suiteDefinitionVersion != null) { - contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestVersion: __expectString, + suiteDefinitionArn: __expectString, + suiteDefinitionConfiguration: _json, + suiteDefinitionId: __expectString, + suiteDefinitionVersion: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -728,10 +711,9 @@ const de_GetSuiteDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -751,39 +733,20 @@ export const de_GetSuiteRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.errorReason != null) { - contents.errorReason = __expectString(data.errorReason); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.suiteDefinitionId != null) { - contents.suiteDefinitionId = __expectString(data.suiteDefinitionId); - } - if (data.suiteDefinitionVersion != null) { - contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion); - } - if (data.suiteRunArn != null) { - contents.suiteRunArn = __expectString(data.suiteRunArn); - } - if (data.suiteRunConfiguration != null) { - contents.suiteRunConfiguration = de_SuiteRunConfiguration(data.suiteRunConfiguration, context); - } - if (data.suiteRunId != null) { - contents.suiteRunId = __expectString(data.suiteRunId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.testResult != null) { - contents.testResult = de_TestResult(data.testResult, context); - } + const doc = take(data, { + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errorReason: __expectString, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + suiteDefinitionId: __expectString, + suiteDefinitionVersion: __expectString, + suiteRunArn: __expectString, + suiteRunConfiguration: _json, + suiteRunId: __expectString, + tags: _json, + testResult: (_) => de_TestResult(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -811,10 +774,9 @@ const de_GetSuiteRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -834,9 +796,10 @@ export const de_GetSuiteRunReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.qualificationReportDownloadUrl != null) { - contents.qualificationReportDownloadUrl = __expectString(data.qualificationReportDownloadUrl); - } + const doc = take(data, { + qualificationReportDownloadUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -864,10 +827,9 @@ const de_GetSuiteRunReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -887,15 +849,11 @@ export const de_ListSuiteDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.suiteDefinitionInformationList != null) { - contents.suiteDefinitionInformationList = de_SuiteDefinitionInformationList( - data.suiteDefinitionInformationList, - context - ); - } + const doc = take(data, { + nextToken: __expectString, + suiteDefinitionInformationList: (_) => de_SuiteDefinitionInformationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -920,10 +878,9 @@ const de_ListSuiteDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -943,12 +900,11 @@ export const de_ListSuiteRunsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.suiteRunsList != null) { - contents.suiteRunsList = de_SuiteRunsList(data.suiteRunsList, context); - } + const doc = take(data, { + nextToken: __expectString, + suiteRunsList: (_) => de_SuiteRunsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -973,10 +929,9 @@ const de_ListSuiteRunsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -996,9 +951,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1026,10 +982,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1049,18 +1004,13 @@ export const de_StartSuiteRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.endpoint != null) { - contents.endpoint = __expectString(data.endpoint); - } - if (data.suiteRunArn != null) { - contents.suiteRunArn = __expectString(data.suiteRunArn); - } - if (data.suiteRunId != null) { - contents.suiteRunId = __expectString(data.suiteRunId); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + endpoint: __expectString, + suiteRunArn: __expectString, + suiteRunId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1088,10 +1038,9 @@ const de_StartSuiteRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1138,10 +1087,9 @@ const de_StopSuiteRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1188,10 +1136,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1238,10 +1185,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1261,24 +1207,15 @@ export const de_UpdateSuiteDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.suiteDefinitionArn != null) { - contents.suiteDefinitionArn = __expectString(data.suiteDefinitionArn); - } - if (data.suiteDefinitionId != null) { - contents.suiteDefinitionId = __expectString(data.suiteDefinitionId); - } - if (data.suiteDefinitionName != null) { - contents.suiteDefinitionName = __expectString(data.suiteDefinitionName); - } - if (data.suiteDefinitionVersion != null) { - contents.suiteDefinitionVersion = __expectString(data.suiteDefinitionVersion); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + suiteDefinitionArn: __expectString, + suiteDefinitionId: __expectString, + suiteDefinitionName: __expectString, + suiteDefinitionVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1303,25 +1240,25 @@ const de_UpdateSuiteDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1338,9 +1275,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1357,9 +1295,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1373,9 +1312,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1383,111 +1323,31 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DeviceUnderTest - */ -const se_DeviceUnderTest = (input: DeviceUnderTest, context: __SerdeContext): any => { - return { - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - ...(input.thingArn != null && { thingArn: input.thingArn }), - }; -}; +// se_DeviceUnderTest omitted. -/** - * serializeAws_restJson1DeviceUnderTestList - */ -const se_DeviceUnderTestList = (input: DeviceUnderTest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeviceUnderTest(entry, context); - }); -}; +// se_DeviceUnderTestList omitted. -/** - * serializeAws_restJson1SelectedTestList - */ -const se_SelectedTestList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SelectedTestList omitted. -/** - * serializeAws_restJson1SuiteDefinitionConfiguration - */ -const se_SuiteDefinitionConfiguration = (input: SuiteDefinitionConfiguration, context: __SerdeContext): any => { - return { - ...(input.devicePermissionRoleArn != null && { devicePermissionRoleArn: input.devicePermissionRoleArn }), - ...(input.devices != null && { devices: se_DeviceUnderTestList(input.devices, context) }), - ...(input.intendedForQualification != null && { intendedForQualification: input.intendedForQualification }), - ...(input.isLongDurationTest != null && { isLongDurationTest: input.isLongDurationTest }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.rootGroup != null && { rootGroup: input.rootGroup }), - ...(input.suiteDefinitionName != null && { suiteDefinitionName: input.suiteDefinitionName }), - }; -}; +// se_SuiteDefinitionConfiguration omitted. -/** - * serializeAws_restJson1SuiteRunConfiguration - */ -const se_SuiteRunConfiguration = (input: SuiteRunConfiguration, context: __SerdeContext): any => { - return { - ...(input.parallelRun != null && { parallelRun: input.parallelRun }), - ...(input.primaryDevice != null && { primaryDevice: se_DeviceUnderTest(input.primaryDevice, context) }), - ...(input.selectedTestList != null && { selectedTestList: se_SelectedTestList(input.selectedTestList, context) }), - }; -}; +// se_SuiteRunConfiguration omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1DeviceUnderTest - */ -const de_DeviceUnderTest = (output: any, context: __SerdeContext): DeviceUnderTest => { - return { - certificateArn: __expectString(output.certificateArn), - thingArn: __expectString(output.thingArn), - } as any; -}; +// de_DeviceUnderTest omitted. -/** - * deserializeAws_restJson1DeviceUnderTestList - */ -const de_DeviceUnderTestList = (output: any, context: __SerdeContext): DeviceUnderTest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceUnderTest(entry, context); - }); - return retVal; -}; +// de_DeviceUnderTestList omitted. /** * deserializeAws_restJson1GroupResult */ const de_GroupResult = (output: any, context: __SerdeContext): GroupResult => { - return { - groupId: __expectString(output.groupId), - groupName: __expectString(output.groupName), - tests: output.tests != null ? de_TestCaseRuns(output.tests, context) : undefined, - } as any; + return take(output, { + groupId: __expectString, + groupName: __expectString, + tests: (_: any) => de_TestCaseRuns(_, context), + }) as any; }; /** @@ -1497,58 +1357,28 @@ const de_GroupResultList = (output: any, context: __SerdeContext): GroupResult[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GroupResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SelectedTestList - */ -const de_SelectedTestList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SelectedTestList omitted. -/** - * deserializeAws_restJson1SuiteDefinitionConfiguration - */ -const de_SuiteDefinitionConfiguration = (output: any, context: __SerdeContext): SuiteDefinitionConfiguration => { - return { - devicePermissionRoleArn: __expectString(output.devicePermissionRoleArn), - devices: output.devices != null ? de_DeviceUnderTestList(output.devices, context) : undefined, - intendedForQualification: __expectBoolean(output.intendedForQualification), - isLongDurationTest: __expectBoolean(output.isLongDurationTest), - protocol: __expectString(output.protocol), - rootGroup: __expectString(output.rootGroup), - suiteDefinitionName: __expectString(output.suiteDefinitionName), - } as any; -}; +// de_SuiteDefinitionConfiguration omitted. /** * deserializeAws_restJson1SuiteDefinitionInformation */ const de_SuiteDefinitionInformation = (output: any, context: __SerdeContext): SuiteDefinitionInformation => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - defaultDevices: output.defaultDevices != null ? de_DeviceUnderTestList(output.defaultDevices, context) : undefined, - intendedForQualification: __expectBoolean(output.intendedForQualification), - isLongDurationTest: __expectBoolean(output.isLongDurationTest), - protocol: __expectString(output.protocol), - suiteDefinitionId: __expectString(output.suiteDefinitionId), - suiteDefinitionName: __expectString(output.suiteDefinitionName), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultDevices: _json, + intendedForQualification: __expectBoolean, + isLongDurationTest: __expectBoolean, + protocol: __expectString, + suiteDefinitionId: __expectString, + suiteDefinitionName: __expectString, + }) as any; }; /** @@ -1558,44 +1388,29 @@ const de_SuiteDefinitionInformationList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SuiteDefinitionInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SuiteRunConfiguration - */ -const de_SuiteRunConfiguration = (output: any, context: __SerdeContext): SuiteRunConfiguration => { - return { - parallelRun: __expectBoolean(output.parallelRun), - primaryDevice: output.primaryDevice != null ? de_DeviceUnderTest(output.primaryDevice, context) : undefined, - selectedTestList: - output.selectedTestList != null ? de_SelectedTestList(output.selectedTestList, context) : undefined, - } as any; -}; +// de_SuiteRunConfiguration omitted. /** * deserializeAws_restJson1SuiteRunInformation */ const de_SuiteRunInformation = (output: any, context: __SerdeContext): SuiteRunInformation => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - endAt: output.endAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endAt))) : undefined, - failed: __expectInt32(output.failed), - passed: __expectInt32(output.passed), - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - status: __expectString(output.status), - suiteDefinitionId: __expectString(output.suiteDefinitionId), - suiteDefinitionName: __expectString(output.suiteDefinitionName), - suiteDefinitionVersion: __expectString(output.suiteDefinitionVersion), - suiteRunId: __expectString(output.suiteRunId), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + endAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failed: __expectInt32, + passed: __expectInt32, + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + suiteDefinitionId: __expectString, + suiteDefinitionName: __expectString, + suiteDefinitionVersion: __expectString, + suiteRunId: __expectString, + }) as any; }; /** @@ -1605,45 +1420,29 @@ const de_SuiteRunsList = (output: any, context: __SerdeContext): SuiteRunInforma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SuiteRunInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1TestCaseRun */ const de_TestCaseRun = (output: any, context: __SerdeContext): TestCaseRun => { - return { - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - failure: __expectString(output.failure), - logUrl: __expectString(output.logUrl), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - testCaseDefinitionId: __expectString(output.testCaseDefinitionId), - testCaseDefinitionName: __expectString(output.testCaseDefinitionName), - testCaseRunId: __expectString(output.testCaseRunId), - testScenarios: output.testScenarios != null ? de_TestCaseScenariosList(output.testScenarios, context) : undefined, - warnings: __expectString(output.warnings), - } as any; + return take(output, { + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failure: __expectString, + logUrl: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + testCaseDefinitionId: __expectString, + testCaseDefinitionName: __expectString, + testCaseRunId: __expectString, + testScenarios: _json, + warnings: __expectString, + }) as any; }; /** @@ -1653,49 +1452,22 @@ const de_TestCaseRuns = (output: any, context: __SerdeContext): TestCaseRun[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TestCaseRun(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TestCaseScenario - */ -const de_TestCaseScenario = (output: any, context: __SerdeContext): TestCaseScenario => { - return { - failure: __expectString(output.failure), - status: __expectString(output.status), - systemMessage: __expectString(output.systemMessage), - testCaseScenarioId: __expectString(output.testCaseScenarioId), - testCaseScenarioType: __expectString(output.testCaseScenarioType), - } as any; -}; +// de_TestCaseScenario omitted. -/** - * deserializeAws_restJson1TestCaseScenariosList - */ -const de_TestCaseScenariosList = (output: any, context: __SerdeContext): TestCaseScenario[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TestCaseScenario(entry, context); - }); - return retVal; -}; +// de_TestCaseScenariosList omitted. /** * deserializeAws_restJson1TestResult */ const de_TestResult = (output: any, context: __SerdeContext): TestResult => { - return { - groups: output.groups != null ? de_GroupResultList(output.groups, context) : undefined, - } as any; + return take(output, { + groups: (_: any) => de_GroupResultList(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-iotfleethub/src/protocols/Aws_restJson1.ts b/clients/client-iotfleethub/src/protocols/Aws_restJson1.ts index de03bbbaf6bb..46fb0c3c570f 100644 --- a/clients/client-iotfleethub/src/protocols/Aws_restJson1.ts +++ b/clients/client-iotfleethub/src/protocols/Aws_restJson1.ts @@ -1,15 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -34,7 +36,6 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from "../commands/UpdateApplicationCommand"; import { IoTFleetHubServiceException as __BaseException } from "../models/IoTFleetHubServiceException"; import { - ApplicationSummary, ConflictException, InternalFailureException, InvalidRequestException, @@ -56,13 +57,15 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; let body: any; - body = JSON.stringify({ - ...(input.applicationDescription != null && { applicationDescription: input.applicationDescription }), - ...(input.applicationName != null && { applicationName: input.applicationName }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + applicationDescription: [], + applicationName: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + roleArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -203,9 +206,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -269,11 +274,13 @@ export const se_UpdateApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.applicationDescription != null && { applicationDescription: input.applicationDescription }), - ...(input.applicationName != null && { applicationName: input.applicationName }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + applicationDescription: [], + applicationName: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -299,12 +306,11 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } + const doc = take(data, { + applicationArn: __expectString, + applicationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -335,10 +341,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -388,10 +393,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -411,42 +415,21 @@ export const de_DescribeApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.applicationCreationDate != null) { - contents.applicationCreationDate = __expectLong(data.applicationCreationDate); - } - if (data.applicationDescription != null) { - contents.applicationDescription = __expectString(data.applicationDescription); - } - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.applicationLastUpdateDate != null) { - contents.applicationLastUpdateDate = __expectLong(data.applicationLastUpdateDate); - } - if (data.applicationName != null) { - contents.applicationName = __expectString(data.applicationName); - } - if (data.applicationState != null) { - contents.applicationState = __expectString(data.applicationState); - } - if (data.applicationUrl != null) { - contents.applicationUrl = __expectString(data.applicationUrl); - } - if (data.errorMessage != null) { - contents.errorMessage = __expectString(data.errorMessage); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.ssoClientId != null) { - contents.ssoClientId = __expectString(data.ssoClientId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + applicationArn: __expectString, + applicationCreationDate: __expectLong, + applicationDescription: __expectString, + applicationId: __expectString, + applicationLastUpdateDate: __expectLong, + applicationName: __expectString, + applicationState: __expectString, + applicationUrl: __expectString, + errorMessage: __expectString, + roleArn: __expectString, + ssoClientId: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -477,10 +460,9 @@ const de_DescribeApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -500,12 +482,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationSummaries != null) { - contents.applicationSummaries = de_ApplicationSummaries(data.applicationSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + applicationSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -533,10 +514,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -556,9 +536,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -586,10 +567,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -636,10 +616,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -686,10 +665,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -742,25 +720,25 @@ const de_UpdateApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -777,9 +755,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -796,9 +775,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -815,9 +795,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -834,9 +815,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -850,9 +832,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -860,61 +843,13 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1ApplicationSummaries - */ -const de_ApplicationSummaries = (output: any, context: __SerdeContext): ApplicationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationSummary(entry, context); - }); - return retVal; -}; +// de_ApplicationSummaries omitted. -/** - * deserializeAws_restJson1ApplicationSummary - */ -const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - applicationCreationDate: __expectLong(output.applicationCreationDate), - applicationDescription: __expectString(output.applicationDescription), - applicationId: __expectString(output.applicationId), - applicationLastUpdateDate: __expectLong(output.applicationLastUpdateDate), - applicationName: __expectString(output.applicationName), - applicationState: __expectString(output.applicationState), - applicationUrl: __expectString(output.applicationUrl), - } as any; -}; +// de_ApplicationSummary omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-iotfleetwise/src/protocols/Aws_json1_0.ts b/clients/client-iotfleetwise/src/protocols/Aws_json1_0.ts index 0ccc62b05bc1..83aba646af32 100644 --- a/clients/client-iotfleetwise/src/protocols/Aws_json1_0.ts +++ b/clients/client-iotfleetwise/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,7 +13,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -142,12 +144,9 @@ import { AccessDeniedException, Actuator, AssociateVehicleFleetRequest, - AssociateVehicleFleetResponse, Attribute, BatchCreateVehicleRequest, - BatchCreateVehicleResponse, BatchUpdateVehicleRequest, - BatchUpdateVehicleResponse, Branch, CampaignSummary, CanDbcDefinition, @@ -158,36 +157,21 @@ import { ConditionBasedCollectionScheme, ConflictException, CreateCampaignRequest, - CreateCampaignResponse, CreateDecoderManifestRequest, - CreateDecoderManifestResponse, CreateFleetRequest, - CreateFleetResponse, CreateModelManifestRequest, - CreateModelManifestResponse, CreateSignalCatalogRequest, - CreateSignalCatalogResponse, - CreateVehicleError, CreateVehicleRequest, CreateVehicleRequestItem, - CreateVehicleResponse, - CreateVehicleResponseItem, DecoderManifestSummary, DecoderManifestValidationException, DeleteCampaignRequest, - DeleteCampaignResponse, DeleteDecoderManifestRequest, - DeleteDecoderManifestResponse, DeleteFleetRequest, - DeleteFleetResponse, DeleteModelManifestRequest, - DeleteModelManifestResponse, DeleteSignalCatalogRequest, - DeleteSignalCatalogResponse, DeleteVehicleRequest, - DeleteVehicleResponse, DisassociateVehicleFleetRequest, - DisassociateVehicleFleetResponse, FleetSummary, FormattedVss, GetCampaignRequest, @@ -197,7 +181,6 @@ import { GetFleetRequest, GetFleetResponse, GetLoggingOptionsRequest, - GetLoggingOptionsResponse, GetModelManifestRequest, GetModelManifestResponse, GetRegisterAccountStatusRequest, @@ -207,30 +190,21 @@ import { GetVehicleRequest, GetVehicleResponse, GetVehicleStatusRequest, - GetVehicleStatusResponse, - IamRegistrationResponse, IamResources, ImportDecoderManifestRequest, - ImportDecoderManifestResponse, ImportSignalCatalogRequest, - ImportSignalCatalogResponse, InternalServerException, - InvalidNetworkInterface, InvalidNodeException, - InvalidSignal, - InvalidSignalDecoder, InvalidSignalsException, LimitExceededException, ListCampaignsRequest, ListCampaignsResponse, ListDecoderManifestNetworkInterfacesRequest, - ListDecoderManifestNetworkInterfacesResponse, ListDecoderManifestSignalsRequest, ListDecoderManifestSignalsResponse, ListDecoderManifestsRequest, ListDecoderManifestsResponse, ListFleetsForVehicleRequest, - ListFleetsForVehicleResponse, ListFleetsRequest, ListFleetsResponse, ListModelManifestNodesRequest, @@ -242,20 +216,16 @@ import { ListSignalCatalogsRequest, ListSignalCatalogsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListVehiclesInFleetRequest, - ListVehiclesInFleetResponse, ListVehiclesRequest, ListVehiclesResponse, ModelManifestSummary, NetworkFileDefinition, NetworkInterface, Node, - NodeCounts, ObdInterface, ObdSignal, PutLoggingOptionsRequest, - PutLoggingOptionsResponse, RegisterAccountRequest, RegisterAccountResponse, ResourceNotFoundException, @@ -265,31 +235,18 @@ import { SignalInformation, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, TimeBasedCollectionScheme, - TimestreamRegistrationResponse, TimestreamResources, UntagResourceRequest, - UntagResourceResponse, UpdateCampaignRequest, - UpdateCampaignResponse, UpdateDecoderManifestRequest, - UpdateDecoderManifestResponse, UpdateFleetRequest, - UpdateFleetResponse, UpdateModelManifestRequest, - UpdateModelManifestResponse, UpdateSignalCatalogRequest, - UpdateSignalCatalogResponse, - UpdateVehicleError, UpdateVehicleRequest, UpdateVehicleRequestItem, - UpdateVehicleResponse, - UpdateVehicleResponseItem, ValidationException, - ValidationExceptionField, - VehicleStatus, VehicleSummary, } from "../models/models_0"; @@ -302,7 +259,7 @@ export const se_AssociateVehicleFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateVehicleFleet"); let body: any; - body = JSON.stringify(se_AssociateVehicleFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +272,7 @@ export const se_BatchCreateVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchCreateVehicle"); let body: any; - body = JSON.stringify(se_BatchCreateVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +285,7 @@ export const se_BatchUpdateVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchUpdateVehicle"); let body: any; - body = JSON.stringify(se_BatchUpdateVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +324,7 @@ export const se_CreateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFleet"); let body: any; - body = JSON.stringify(se_CreateFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -380,7 +337,7 @@ export const se_CreateModelManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModelManifest"); let body: any; - body = JSON.stringify(se_CreateModelManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -406,7 +363,7 @@ export const se_CreateVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVehicle"); let body: any; - body = JSON.stringify(se_CreateVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -419,7 +376,7 @@ export const se_DeleteCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCampaign"); let body: any; - body = JSON.stringify(se_DeleteCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -432,7 +389,7 @@ export const se_DeleteDecoderManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDecoderManifest"); let body: any; - body = JSON.stringify(se_DeleteDecoderManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -445,7 +402,7 @@ export const se_DeleteFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFleet"); let body: any; - body = JSON.stringify(se_DeleteFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -458,7 +415,7 @@ export const se_DeleteModelManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelManifest"); let body: any; - body = JSON.stringify(se_DeleteModelManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -471,7 +428,7 @@ export const se_DeleteSignalCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSignalCatalog"); let body: any; - body = JSON.stringify(se_DeleteSignalCatalogRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -484,7 +441,7 @@ export const se_DeleteVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVehicle"); let body: any; - body = JSON.stringify(se_DeleteVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -497,7 +454,7 @@ export const se_DisassociateVehicleFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateVehicleFleet"); let body: any; - body = JSON.stringify(se_DisassociateVehicleFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -510,7 +467,7 @@ export const se_GetCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCampaign"); let body: any; - body = JSON.stringify(se_GetCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -523,7 +480,7 @@ export const se_GetDecoderManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDecoderManifest"); let body: any; - body = JSON.stringify(se_GetDecoderManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -536,7 +493,7 @@ export const se_GetFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFleet"); let body: any; - body = JSON.stringify(se_GetFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -549,7 +506,7 @@ export const se_GetLoggingOptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoggingOptions"); let body: any; - body = JSON.stringify(se_GetLoggingOptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -562,7 +519,7 @@ export const se_GetModelManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetModelManifest"); let body: any; - body = JSON.stringify(se_GetModelManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -575,7 +532,7 @@ export const se_GetRegisterAccountStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegisterAccountStatus"); let body: any; - body = JSON.stringify(se_GetRegisterAccountStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -588,7 +545,7 @@ export const se_GetSignalCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSignalCatalog"); let body: any; - body = JSON.stringify(se_GetSignalCatalogRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -601,7 +558,7 @@ export const se_GetVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVehicle"); let body: any; - body = JSON.stringify(se_GetVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -614,7 +571,7 @@ export const se_GetVehicleStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVehicleStatus"); let body: any; - body = JSON.stringify(se_GetVehicleStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -640,7 +597,7 @@ export const se_ImportSignalCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportSignalCatalog"); let body: any; - body = JSON.stringify(se_ImportSignalCatalogRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -653,7 +610,7 @@ export const se_ListCampaignsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCampaigns"); let body: any; - body = JSON.stringify(se_ListCampaignsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -666,7 +623,7 @@ export const se_ListDecoderManifestNetworkInterfacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDecoderManifestNetworkInterfaces"); let body: any; - body = JSON.stringify(se_ListDecoderManifestNetworkInterfacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -679,7 +636,7 @@ export const se_ListDecoderManifestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDecoderManifests"); let body: any; - body = JSON.stringify(se_ListDecoderManifestsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -692,7 +649,7 @@ export const se_ListDecoderManifestSignalsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDecoderManifestSignals"); let body: any; - body = JSON.stringify(se_ListDecoderManifestSignalsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -705,7 +662,7 @@ export const se_ListFleetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFleets"); let body: any; - body = JSON.stringify(se_ListFleetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -718,7 +675,7 @@ export const se_ListFleetsForVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFleetsForVehicle"); let body: any; - body = JSON.stringify(se_ListFleetsForVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -731,7 +688,7 @@ export const se_ListModelManifestNodesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListModelManifestNodes"); let body: any; - body = JSON.stringify(se_ListModelManifestNodesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -744,7 +701,7 @@ export const se_ListModelManifestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListModelManifests"); let body: any; - body = JSON.stringify(se_ListModelManifestsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -757,7 +714,7 @@ export const se_ListSignalCatalogNodesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSignalCatalogNodes"); let body: any; - body = JSON.stringify(se_ListSignalCatalogNodesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -770,7 +727,7 @@ export const se_ListSignalCatalogsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSignalCatalogs"); let body: any; - body = JSON.stringify(se_ListSignalCatalogsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -783,7 +740,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -796,7 +753,7 @@ export const se_ListVehiclesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVehicles"); let body: any; - body = JSON.stringify(se_ListVehiclesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -809,7 +766,7 @@ export const se_ListVehiclesInFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVehiclesInFleet"); let body: any; - body = JSON.stringify(se_ListVehiclesInFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -822,7 +779,7 @@ export const se_PutLoggingOptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLoggingOptions"); let body: any; - body = JSON.stringify(se_PutLoggingOptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -835,7 +792,7 @@ export const se_RegisterAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterAccount"); let body: any; - body = JSON.stringify(se_RegisterAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -848,7 +805,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -861,7 +818,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -874,7 +831,7 @@ export const se_UpdateCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCampaign"); let body: any; - body = JSON.stringify(se_UpdateCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -900,7 +857,7 @@ export const se_UpdateFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFleet"); let body: any; - body = JSON.stringify(se_UpdateFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -913,7 +870,7 @@ export const se_UpdateModelManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateModelManifest"); let body: any; - body = JSON.stringify(se_UpdateModelManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -939,7 +896,7 @@ export const se_UpdateVehicleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVehicle"); let body: any; - body = JSON.stringify(se_UpdateVehicleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -955,12 +912,12 @@ export const de_AssociateVehicleFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateVehicleFleetResponse(data, context); + contents = _json(data); const response: AssociateVehicleFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -993,10 +950,9 @@ const de_AssociateVehicleFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1014,12 +970,12 @@ export const de_BatchCreateVehicleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchCreateVehicleResponse(data, context); + contents = _json(data); const response: BatchCreateVehicleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1052,10 +1008,9 @@ const de_BatchCreateVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1073,12 +1028,12 @@ export const de_BatchUpdateVehicleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchUpdateVehicleResponse(data, context); + contents = _json(data); const response: BatchUpdateVehicleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1108,10 +1063,9 @@ const de_BatchUpdateVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1129,12 +1083,12 @@ export const de_CreateCampaignCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCampaignResponse(data, context); + contents = _json(data); const response: CreateCampaignCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1173,10 +1127,9 @@ const de_CreateCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1194,12 +1147,12 @@ export const de_CreateDecoderManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDecoderManifestResponse(data, context); + contents = _json(data); const response: CreateDecoderManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1241,10 +1194,9 @@ const de_CreateDecoderManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1262,12 +1214,12 @@ export const de_CreateFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFleetResponse(data, context); + contents = _json(data); const response: CreateFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1306,10 +1258,9 @@ const de_CreateFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1327,12 +1278,12 @@ export const de_CreateModelManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelManifestResponse(data, context); + contents = _json(data); const response: CreateModelManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1374,10 +1325,9 @@ const de_CreateModelManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1395,12 +1345,12 @@ export const de_CreateSignalCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSignalCatalogResponse(data, context); + contents = _json(data); const response: CreateSignalCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1442,10 +1392,9 @@ const de_CreateSignalCatalogCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1463,12 +1412,12 @@ export const de_CreateVehicleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateVehicleResponse(data, context); + contents = _json(data); const response: CreateVehicleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1507,10 +1456,9 @@ const de_CreateVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1528,12 +1476,12 @@ export const de_DeleteCampaignCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCampaignResponse(data, context); + contents = _json(data); const response: DeleteCampaignCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1566,10 +1514,9 @@ const de_DeleteCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1587,12 +1534,12 @@ export const de_DeleteDecoderManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDecoderManifestResponse(data, context); + contents = _json(data); const response: DeleteDecoderManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1625,10 +1572,9 @@ const de_DeleteDecoderManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1646,12 +1592,12 @@ export const de_DeleteFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFleetResponse(data, context); + contents = _json(data); const response: DeleteFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1681,10 +1627,9 @@ const de_DeleteFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1702,12 +1647,12 @@ export const de_DeleteModelManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteModelManifestResponse(data, context); + contents = _json(data); const response: DeleteModelManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1740,10 +1685,9 @@ const de_DeleteModelManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1761,12 +1705,12 @@ export const de_DeleteSignalCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSignalCatalogResponse(data, context); + contents = _json(data); const response: DeleteSignalCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1799,10 +1743,9 @@ const de_DeleteSignalCatalogCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1820,12 +1763,12 @@ export const de_DeleteVehicleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVehicleResponse(data, context); + contents = _json(data); const response: DeleteVehicleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1855,10 +1798,9 @@ const de_DeleteVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1876,12 +1818,12 @@ export const de_DisassociateVehicleFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateVehicleFleetResponse(data, context); + contents = _json(data); const response: DisassociateVehicleFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1914,10 +1856,9 @@ const de_DisassociateVehicleFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1940,7 +1881,7 @@ export const de_GetCampaignCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1973,10 +1914,9 @@ const de_GetCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1999,7 +1939,7 @@ export const de_GetDecoderManifestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2032,10 +1972,9 @@ const de_GetDecoderManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2058,7 +1997,7 @@ export const de_GetFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2091,10 +2030,9 @@ const de_GetFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2112,12 +2050,12 @@ export const de_GetLoggingOptionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLoggingOptionsResponse(data, context); + contents = _json(data); const response: GetLoggingOptionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2144,10 +2082,9 @@ const de_GetLoggingOptionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2170,7 +2107,7 @@ export const de_GetModelManifestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2203,10 +2140,9 @@ const de_GetModelManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2229,7 +2165,7 @@ export const de_GetRegisterAccountStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2262,10 +2198,9 @@ const de_GetRegisterAccountStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2288,7 +2223,7 @@ export const de_GetSignalCatalogCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2321,10 +2256,9 @@ const de_GetSignalCatalogCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2347,7 +2281,7 @@ export const de_GetVehicleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2380,10 +2314,9 @@ const de_GetVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2401,12 +2334,12 @@ export const de_GetVehicleStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetVehicleStatusResponse(data, context); + contents = _json(data); const response: GetVehicleStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2439,10 +2372,9 @@ const de_GetVehicleStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2460,12 +2392,12 @@ export const de_ImportDecoderManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportDecoderManifestResponse(data, context); + contents = _json(data); const response: ImportDecoderManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2507,10 +2439,9 @@ const de_ImportDecoderManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2528,12 +2459,12 @@ export const de_ImportSignalCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportSignalCatalogResponse(data, context); + contents = _json(data); const response: ImportSignalCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2575,10 +2506,9 @@ const de_ImportSignalCatalogCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2601,7 +2531,7 @@ export const de_ListCampaignsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2631,10 +2561,9 @@ const de_ListCampaignsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2652,12 +2581,12 @@ export const de_ListDecoderManifestNetworkInterfacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDecoderManifestNetworkInterfacesResponse(data, context); + contents = _json(data); const response: ListDecoderManifestNetworkInterfacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2690,10 +2619,9 @@ const de_ListDecoderManifestNetworkInterfacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2716,7 +2644,7 @@ export const de_ListDecoderManifestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2746,10 +2674,9 @@ const de_ListDecoderManifestsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2772,7 +2699,7 @@ export const de_ListDecoderManifestSignalsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2805,10 +2732,9 @@ const de_ListDecoderManifestSignalsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2831,7 +2757,7 @@ export const de_ListFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2864,10 +2790,9 @@ const de_ListFleetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2885,12 +2810,12 @@ export const de_ListFleetsForVehicleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFleetsForVehicleResponse(data, context); + contents = _json(data); const response: ListFleetsForVehicleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2923,10 +2848,9 @@ const de_ListFleetsForVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2949,7 +2873,7 @@ export const de_ListModelManifestNodesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2985,10 +2909,9 @@ const de_ListModelManifestNodesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3011,7 +2934,7 @@ export const de_ListModelManifestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3041,10 +2964,9 @@ const de_ListModelManifestsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3067,7 +2989,7 @@ export const de_ListSignalCatalogNodesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3103,10 +3025,9 @@ const de_ListSignalCatalogNodesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3129,7 +3050,7 @@ export const de_ListSignalCatalogsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3159,10 +3080,9 @@ const de_ListSignalCatalogsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3180,12 +3100,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3218,10 +3138,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3244,7 +3163,7 @@ export const de_ListVehiclesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3274,10 +3193,9 @@ const de_ListVehiclesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3295,12 +3213,12 @@ export const de_ListVehiclesInFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVehiclesInFleetResponse(data, context); + contents = _json(data); const response: ListVehiclesInFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3333,10 +3251,9 @@ const de_ListVehiclesInFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3354,12 +3271,12 @@ export const de_PutLoggingOptionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLoggingOptionsResponse(data, context); + contents = _json(data); const response: PutLoggingOptionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3395,10 +3312,9 @@ const de_PutLoggingOptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3421,7 +3337,7 @@ export const de_RegisterAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3457,10 +3373,9 @@ const de_RegisterAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3478,12 +3393,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3516,10 +3431,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3537,12 +3451,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3575,10 +3489,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3596,12 +3509,12 @@ export const de_UpdateCampaignCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCampaignResponse(data, context); + contents = _json(data); const response: UpdateCampaignCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3637,10 +3550,9 @@ const de_UpdateCampaignCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3658,12 +3570,12 @@ export const de_UpdateDecoderManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDecoderManifestResponse(data, context); + contents = _json(data); const response: UpdateDecoderManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3705,10 +3617,9 @@ const de_UpdateDecoderManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3726,12 +3637,12 @@ export const de_UpdateFleetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFleetResponse(data, context); + contents = _json(data); const response: UpdateFleetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3767,10 +3678,9 @@ const de_UpdateFleetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3788,12 +3698,12 @@ export const de_UpdateModelManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateModelManifestResponse(data, context); + contents = _json(data); const response: UpdateModelManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3832,10 +3742,9 @@ const de_UpdateModelManifestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3853,12 +3762,12 @@ export const de_UpdateSignalCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSignalCatalogResponse(data, context); + contents = _json(data); const response: UpdateSignalCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3903,10 +3812,9 @@ const de_UpdateSignalCatalogCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3924,12 +3832,12 @@ export const de_UpdateVehicleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateVehicleResponse(data, context); + contents = _json(data); const response: UpdateVehicleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3965,10 +3873,9 @@ const de_UpdateVehicleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3982,7 +3889,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3995,7 +3902,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4011,7 +3918,7 @@ const de_DecoderManifestValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DecoderManifestValidationException(body, context); + const deserialized: any = _json(body); const exception = new DecoderManifestValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4027,7 +3934,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4059,7 +3966,7 @@ const de_InvalidSignalsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSignalsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSignalsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4075,7 +3982,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4091,7 +3998,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4104,7 +4011,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4117,7 +4024,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4129,1394 +4036,527 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_0Actuator */ const se_Actuator = (input: Actuator, context: __SerdeContext): any => { - return { - ...(input.allowedValues != null && { allowedValues: se_listOfStrings(input.allowedValues, context) }), - ...(input.assignedValue != null && { assignedValue: input.assignedValue }), - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.description != null && { description: input.description }), - ...(input.fullyQualifiedName != null && { fullyQualifiedName: input.fullyQualifiedName }), - ...(input.max != null && { max: __serializeFloat(input.max) }), - ...(input.min != null && { min: __serializeFloat(input.min) }), - ...(input.unit != null && { unit: input.unit }), - }; + return take(input, { + allowedValues: _json, + assignedValue: [], + dataType: [], + description: [], + fullyQualifiedName: [], + max: __serializeFloat, + min: __serializeFloat, + unit: [], + }); }; -/** - * serializeAws_json1_0AssociateVehicleFleetRequest - */ -const se_AssociateVehicleFleetRequest = (input: AssociateVehicleFleetRequest, context: __SerdeContext): any => { - return { - ...(input.fleetId != null && { fleetId: input.fleetId }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; -}; +// se_AssociateVehicleFleetRequest omitted. /** * serializeAws_json1_0Attribute */ const se_Attribute = (input: Attribute, context: __SerdeContext): any => { - return { - ...(input.allowedValues != null && { allowedValues: se_listOfStrings(input.allowedValues, context) }), - ...(input.assignedValue != null && { assignedValue: input.assignedValue }), - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - ...(input.description != null && { description: input.description }), - ...(input.fullyQualifiedName != null && { fullyQualifiedName: input.fullyQualifiedName }), - ...(input.max != null && { max: __serializeFloat(input.max) }), - ...(input.min != null && { min: __serializeFloat(input.min) }), - ...(input.unit != null && { unit: input.unit }), - }; + return take(input, { + allowedValues: _json, + assignedValue: [], + dataType: [], + defaultValue: [], + description: [], + fullyQualifiedName: [], + max: __serializeFloat, + min: __serializeFloat, + unit: [], + }); }; -/** - * serializeAws_json1_0attributesMap - */ -const se_attributesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_attributesMap omitted. -/** - * serializeAws_json1_0BatchCreateVehicleRequest - */ -const se_BatchCreateVehicleRequest = (input: BatchCreateVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.vehicles != null && { vehicles: se_createVehicleRequestItems(input.vehicles, context) }), - }; -}; +// se_BatchCreateVehicleRequest omitted. -/** - * serializeAws_json1_0BatchUpdateVehicleRequest - */ -const se_BatchUpdateVehicleRequest = (input: BatchUpdateVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.vehicles != null && { vehicles: se_updateVehicleRequestItems(input.vehicles, context) }), - }; -}; +// se_BatchUpdateVehicleRequest omitted. -/** - * serializeAws_json1_0Branch - */ -const se_Branch = (input: Branch, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.fullyQualifiedName != null && { fullyQualifiedName: input.fullyQualifiedName }), - }; -}; +// se_Branch omitted. /** * serializeAws_json1_0CanDbcDefinition */ const se_CanDbcDefinition = (input: CanDbcDefinition, context: __SerdeContext): any => { - return { - ...(input.canDbcFiles != null && { canDbcFiles: se_NetworkFilesList(input.canDbcFiles, context) }), - ...(input.networkInterface != null && { networkInterface: input.networkInterface }), - ...(input.signalsMap != null && { signalsMap: se_ModelSignalsMap(input.signalsMap, context) }), - }; + return take(input, { + canDbcFiles: (_) => se_NetworkFilesList(_, context), + networkInterface: [], + signalsMap: _json, + }); }; -/** - * serializeAws_json1_0CanInterface - */ -const se_CanInterface = (input: CanInterface, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.protocolName != null && { protocolName: input.protocolName }), - ...(input.protocolVersion != null && { protocolVersion: input.protocolVersion }), - }; -}; +// se_CanInterface omitted. /** * serializeAws_json1_0CanSignal */ const se_CanSignal = (input: CanSignal, context: __SerdeContext): any => { - return { - ...(input.factor != null && { factor: __serializeFloat(input.factor) }), - ...(input.isBigEndian != null && { isBigEndian: input.isBigEndian }), - ...(input.isSigned != null && { isSigned: input.isSigned }), - ...(input.length != null && { length: input.length }), - ...(input.messageId != null && { messageId: input.messageId }), - ...(input.name != null && { name: input.name }), - ...(input.offset != null && { offset: __serializeFloat(input.offset) }), - ...(input.startBit != null && { startBit: input.startBit }), - }; + return take(input, { + factor: __serializeFloat, + isBigEndian: [], + isSigned: [], + length: [], + messageId: [], + name: [], + offset: __serializeFloat, + startBit: [], + }); }; -/** - * serializeAws_json1_0CloudWatchLogDeliveryOptions - */ -const se_CloudWatchLogDeliveryOptions = (input: CloudWatchLogDeliveryOptions, context: __SerdeContext): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - ...(input.logType != null && { logType: input.logType }), - }; -}; +// se_CloudWatchLogDeliveryOptions omitted. -/** - * serializeAws_json1_0CollectionScheme - */ -const se_CollectionScheme = (input: CollectionScheme, context: __SerdeContext): any => { - return CollectionScheme.visit(input, { - conditionBasedCollectionScheme: (value) => ({ - conditionBasedCollectionScheme: se_ConditionBasedCollectionScheme(value, context), - }), - timeBasedCollectionScheme: (value) => ({ timeBasedCollectionScheme: se_TimeBasedCollectionScheme(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_CollectionScheme omitted. -/** - * serializeAws_json1_0ConditionBasedCollectionScheme - */ -const se_ConditionBasedCollectionScheme = (input: ConditionBasedCollectionScheme, context: __SerdeContext): any => { - return { - ...(input.conditionLanguageVersion != null && { conditionLanguageVersion: input.conditionLanguageVersion }), - ...(input.expression != null && { expression: input.expression }), - ...(input.minimumTriggerIntervalMs != null && { minimumTriggerIntervalMs: input.minimumTriggerIntervalMs }), - ...(input.triggerMode != null && { triggerMode: input.triggerMode }), - }; -}; +// se_ConditionBasedCollectionScheme omitted. /** * serializeAws_json1_0CreateCampaignRequest */ const se_CreateCampaignRequest = (input: CreateCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.collectionScheme != null && { collectionScheme: se_CollectionScheme(input.collectionScheme, context) }), - ...(input.compression != null && { compression: input.compression }), - ...(input.dataExtraDimensions != null && { - dataExtraDimensions: se_DataExtraDimensionNodePathList(input.dataExtraDimensions, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.diagnosticsMode != null && { diagnosticsMode: input.diagnosticsMode }), - ...(input.expiryTime != null && { expiryTime: Math.round(input.expiryTime.getTime() / 1000) }), - ...(input.name != null && { name: input.name }), - ...(input.postTriggerCollectionDuration != null && { - postTriggerCollectionDuration: input.postTriggerCollectionDuration, - }), - ...(input.priority != null && { priority: input.priority }), - ...(input.signalCatalogArn != null && { signalCatalogArn: input.signalCatalogArn }), - ...(input.signalsToCollect != null && { - signalsToCollect: se_SignalInformationList(input.signalsToCollect, context), - }), - ...(input.spoolingMode != null && { spoolingMode: input.spoolingMode }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.targetArn != null && { targetArn: input.targetArn }), - }; + return take(input, { + collectionScheme: _json, + compression: [], + dataExtraDimensions: _json, + description: [], + diagnosticsMode: [], + expiryTime: (_) => Math.round(_.getTime() / 1000), + name: [], + postTriggerCollectionDuration: [], + priority: [], + signalCatalogArn: [], + signalsToCollect: _json, + spoolingMode: [], + startTime: (_) => Math.round(_.getTime() / 1000), + tags: _json, + targetArn: [], + }); }; /** * serializeAws_json1_0CreateDecoderManifestRequest */ const se_CreateDecoderManifestRequest = (input: CreateDecoderManifestRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.name != null && { name: input.name }), - ...(input.networkInterfaces != null && { - networkInterfaces: se_NetworkInterfaces(input.networkInterfaces, context), - }), - ...(input.signalDecoders != null && { signalDecoders: se_SignalDecoders(input.signalDecoders, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; + return take(input, { + description: [], + modelManifestArn: [], + name: [], + networkInterfaces: _json, + signalDecoders: (_) => se_SignalDecoders(_, context), + tags: _json, + }); }; -/** - * serializeAws_json1_0CreateFleetRequest - */ -const se_CreateFleetRequest = (input: CreateFleetRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.fleetId != null && { fleetId: input.fleetId }), - ...(input.signalCatalogArn != null && { signalCatalogArn: input.signalCatalogArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateFleetRequest omitted. -/** - * serializeAws_json1_0CreateModelManifestRequest - */ -const se_CreateModelManifestRequest = (input: CreateModelManifestRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.nodes != null && { nodes: se_listOfStrings(input.nodes, context) }), - ...(input.signalCatalogArn != null && { signalCatalogArn: input.signalCatalogArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateModelManifestRequest omitted. /** * serializeAws_json1_0CreateSignalCatalogRequest */ const se_CreateSignalCatalogRequest = (input: CreateSignalCatalogRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.nodes != null && { nodes: se_Nodes(input.nodes, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; + return take(input, { + description: [], + name: [], + nodes: (_) => se_Nodes(_, context), + tags: _json, + }); }; +// se_CreateVehicleRequest omitted. + +// se_CreateVehicleRequestItem omitted. + +// se_createVehicleRequestItems omitted. + +// se_DataExtraDimensionNodePathList omitted. + +// se_DeleteCampaignRequest omitted. + +// se_DeleteDecoderManifestRequest omitted. + +// se_DeleteFleetRequest omitted. + +// se_DeleteModelManifestRequest omitted. + +// se_DeleteSignalCatalogRequest omitted. + +// se_DeleteVehicleRequest omitted. + +// se_DisassociateVehicleFleetRequest omitted. + +// se_FormattedVss omitted. + +// se_Fqns omitted. + +// se_GetCampaignRequest omitted. + +// se_GetDecoderManifestRequest omitted. + +// se_GetFleetRequest omitted. + +// se_GetLoggingOptionsRequest omitted. + +// se_GetModelManifestRequest omitted. + +// se_GetRegisterAccountStatusRequest omitted. + +// se_GetSignalCatalogRequest omitted. + +// se_GetVehicleRequest omitted. + +// se_GetVehicleStatusRequest omitted. + +// se_IamResources omitted. + /** - * serializeAws_json1_0CreateVehicleRequest + * serializeAws_json1_0ImportDecoderManifestRequest */ -const se_CreateVehicleRequest = (input: CreateVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.associationBehavior != null && { associationBehavior: input.associationBehavior }), - ...(input.attributes != null && { attributes: se_attributesMap(input.attributes, context) }), - ...(input.decoderManifestArn != null && { decoderManifestArn: input.decoderManifestArn }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; +const se_ImportDecoderManifestRequest = (input: ImportDecoderManifestRequest, context: __SerdeContext): any => { + return take(input, { + name: [], + networkFileDefinitions: (_) => se_NetworkFileDefinitions(_, context), + }); }; +// se_ImportSignalCatalogRequest omitted. + +// se_InterfaceIds omitted. + +// se_ListCampaignsRequest omitted. + +// se_ListDecoderManifestNetworkInterfacesRequest omitted. + +// se_ListDecoderManifestSignalsRequest omitted. + +// se_ListDecoderManifestsRequest omitted. + +// se_ListFleetsForVehicleRequest omitted. + +// se_ListFleetsRequest omitted. + +// se_ListModelManifestNodesRequest omitted. + +// se_ListModelManifestsRequest omitted. + +// se_listOfStrings omitted. + +// se_ListSignalCatalogNodesRequest omitted. + +// se_ListSignalCatalogsRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_ListVehiclesInFleetRequest omitted. + +// se_ListVehiclesRequest omitted. + +// se_ModelSignalsMap omitted. + /** - * serializeAws_json1_0CreateVehicleRequestItem + * serializeAws_json1_0NetworkFileDefinition */ -const se_CreateVehicleRequestItem = (input: CreateVehicleRequestItem, context: __SerdeContext): any => { - return { - ...(input.associationBehavior != null && { associationBehavior: input.associationBehavior }), - ...(input.attributes != null && { attributes: se_attributesMap(input.attributes, context) }), - ...(input.decoderManifestArn != null && { decoderManifestArn: input.decoderManifestArn }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; +const se_NetworkFileDefinition = (input: NetworkFileDefinition, context: __SerdeContext): any => { + return NetworkFileDefinition.visit(input, { + canDbc: (value) => ({ canDbc: se_CanDbcDefinition(value, context) }), + _: (name, value) => ({ name: value } as any), + }); }; /** - * serializeAws_json1_0createVehicleRequestItems + * serializeAws_json1_0NetworkFileDefinitions */ -const se_createVehicleRequestItems = (input: CreateVehicleRequestItem[], context: __SerdeContext): any => { +const se_NetworkFileDefinitions = (input: NetworkFileDefinition[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_CreateVehicleRequestItem(entry, context); + return se_NetworkFileDefinition(entry, context); }); }; /** - * serializeAws_json1_0DataExtraDimensionNodePathList + * serializeAws_json1_0NetworkFilesList */ -const se_DataExtraDimensionNodePathList = (input: string[], context: __SerdeContext): any => { +const se_NetworkFilesList = (input: Uint8Array[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return context.base64Encoder(entry); }); }; -/** - * serializeAws_json1_0DeleteCampaignRequest - */ -const se_DeleteCampaignRequest = (input: DeleteCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_NetworkInterface omitted. -/** - * serializeAws_json1_0DeleteDecoderManifestRequest - */ -const se_DeleteDecoderManifestRequest = (input: DeleteDecoderManifestRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_NetworkInterfaces omitted. /** - * serializeAws_json1_0DeleteFleetRequest + * serializeAws_json1_0Node */ -const se_DeleteFleetRequest = (input: DeleteFleetRequest, context: __SerdeContext): any => { - return { - ...(input.fleetId != null && { fleetId: input.fleetId }), - }; +const se_Node = (input: Node, context: __SerdeContext): any => { + return Node.visit(input, { + actuator: (value) => ({ actuator: se_Actuator(value, context) }), + attribute: (value) => ({ attribute: se_Attribute(value, context) }), + branch: (value) => ({ branch: _json(value) }), + sensor: (value) => ({ sensor: se_Sensor(value, context) }), + _: (name, value) => ({ name: value } as any), + }); }; -/** - * serializeAws_json1_0DeleteModelManifestRequest - */ -const se_DeleteModelManifestRequest = (input: DeleteModelManifestRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_NodePaths omitted. /** - * serializeAws_json1_0DeleteSignalCatalogRequest + * serializeAws_json1_0Nodes */ -const se_DeleteSignalCatalogRequest = (input: DeleteSignalCatalogRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; +const se_Nodes = (input: Node[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_Node(entry, context); + }); }; +// se_ObdInterface omitted. + /** - * serializeAws_json1_0DeleteVehicleRequest + * serializeAws_json1_0ObdSignal */ -const se_DeleteVehicleRequest = (input: DeleteVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; +const se_ObdSignal = (input: ObdSignal, context: __SerdeContext): any => { + return take(input, { + bitMaskLength: [], + bitRightShift: [], + byteLength: [], + offset: __serializeFloat, + pid: [], + pidResponseLength: [], + scaling: __serializeFloat, + serviceMode: [], + startByte: [], + }); }; +// se_PutLoggingOptionsRequest omitted. + +// se_RegisterAccountRequest omitted. + /** - * serializeAws_json1_0DisassociateVehicleFleetRequest + * serializeAws_json1_0Sensor */ -const se_DisassociateVehicleFleetRequest = (input: DisassociateVehicleFleetRequest, context: __SerdeContext): any => { - return { - ...(input.fleetId != null && { fleetId: input.fleetId }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; +const se_Sensor = (input: Sensor, context: __SerdeContext): any => { + return take(input, { + allowedValues: _json, + dataType: [], + description: [], + fullyQualifiedName: [], + max: __serializeFloat, + min: __serializeFloat, + unit: [], + }); }; /** - * serializeAws_json1_0FormattedVss + * serializeAws_json1_0SignalDecoder */ -const se_FormattedVss = (input: FormattedVss, context: __SerdeContext): any => { - return FormattedVss.visit(input, { - vssJson: (value) => ({ vssJson: value }), - _: (name, value) => ({ name: value } as any), +const se_SignalDecoder = (input: SignalDecoder, context: __SerdeContext): any => { + return take(input, { + canSignal: (_) => se_CanSignal(_, context), + fullyQualifiedName: [], + interfaceId: [], + obdSignal: (_) => se_ObdSignal(_, context), + type: [], }); }; /** - * serializeAws_json1_0Fqns + * serializeAws_json1_0SignalDecoders */ -const se_Fqns = (input: string[], context: __SerdeContext): any => { +const se_SignalDecoders = (input: SignalDecoder[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_SignalDecoder(entry, context); }); }; -/** - * serializeAws_json1_0GetCampaignRequest - */ -const se_GetCampaignRequest = (input: GetCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_SignalInformation omitted. -/** - * serializeAws_json1_0GetDecoderManifestRequest - */ -const se_GetDecoderManifestRequest = (input: GetDecoderManifestRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_SignalInformationList omitted. -/** - * serializeAws_json1_0GetFleetRequest - */ -const se_GetFleetRequest = (input: GetFleetRequest, context: __SerdeContext): any => { - return { - ...(input.fleetId != null && { fleetId: input.fleetId }), - }; -}; +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_TimeBasedCollectionScheme omitted. + +// se_TimestreamResources omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateCampaignRequest omitted. /** - * serializeAws_json1_0GetLoggingOptionsRequest + * serializeAws_json1_0UpdateDecoderManifestRequest */ -const se_GetLoggingOptionsRequest = (input: GetLoggingOptionsRequest, context: __SerdeContext): any => { - return {}; +const se_UpdateDecoderManifestRequest = (input: UpdateDecoderManifestRequest, context: __SerdeContext): any => { + return take(input, { + description: [], + name: [], + networkInterfacesToAdd: _json, + networkInterfacesToRemove: _json, + networkInterfacesToUpdate: _json, + signalDecodersToAdd: (_) => se_SignalDecoders(_, context), + signalDecodersToRemove: _json, + signalDecodersToUpdate: (_) => se_SignalDecoders(_, context), + status: [], + }); }; +// se_UpdateFleetRequest omitted. + +// se_UpdateModelManifestRequest omitted. + /** - * serializeAws_json1_0GetModelManifestRequest + * serializeAws_json1_0UpdateSignalCatalogRequest */ -const se_GetModelManifestRequest = (input: GetModelManifestRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; +const se_UpdateSignalCatalogRequest = (input: UpdateSignalCatalogRequest, context: __SerdeContext): any => { + return take(input, { + description: [], + name: [], + nodesToAdd: (_) => se_Nodes(_, context), + nodesToRemove: _json, + nodesToUpdate: (_) => se_Nodes(_, context), + }); }; +// se_UpdateVehicleRequest omitted. + +// se_UpdateVehicleRequestItem omitted. + +// se_updateVehicleRequestItems omitted. + +// de_AccessDeniedException omitted. + /** - * serializeAws_json1_0GetRegisterAccountStatusRequest + * deserializeAws_json1_0Actuator */ -const se_GetRegisterAccountStatusRequest = (input: GetRegisterAccountStatusRequest, context: __SerdeContext): any => { - return {}; +const de_Actuator = (output: any, context: __SerdeContext): Actuator => { + return take(output, { + allowedValues: _json, + assignedValue: __expectString, + dataType: __expectString, + description: __expectString, + fullyQualifiedName: __expectString, + max: __limitedParseDouble, + min: __limitedParseDouble, + unit: __expectString, + }) as any; }; +// de_AssociateVehicleFleetResponse omitted. + /** - * serializeAws_json1_0GetSignalCatalogRequest + * deserializeAws_json1_0Attribute */ -const se_GetSignalCatalogRequest = (input: GetSignalCatalogRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; +const de_Attribute = (output: any, context: __SerdeContext): Attribute => { + return take(output, { + allowedValues: _json, + assignedValue: __expectString, + dataType: __expectString, + defaultValue: __expectString, + description: __expectString, + fullyQualifiedName: __expectString, + max: __limitedParseDouble, + min: __limitedParseDouble, + unit: __expectString, + }) as any; }; +// de_attributesMap omitted. + +// de_BatchCreateVehicleResponse omitted. + +// de_BatchUpdateVehicleResponse omitted. + +// de_Branch omitted. + /** - * serializeAws_json1_0GetVehicleRequest + * deserializeAws_json1_0campaignSummaries */ -const se_GetVehicleRequest = (input: GetVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; +const de_campaignSummaries = (output: any, context: __SerdeContext): CampaignSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_CampaignSummary(entry, context); + }); + return retVal; }; /** - * serializeAws_json1_0GetVehicleStatusRequest + * deserializeAws_json1_0CampaignSummary */ -const se_GetVehicleStatusRequest = (input: GetVehicleStatusRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; +const de_CampaignSummary = (output: any, context: __SerdeContext): CampaignSummary => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + signalCatalogArn: __expectString, + status: __expectString, + targetArn: __expectString, + }) as any; }; +// de_CanInterface omitted. + /** - * serializeAws_json1_0IamResources + * deserializeAws_json1_0CanSignal */ -const se_IamResources = (input: IamResources, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; +const de_CanSignal = (output: any, context: __SerdeContext): CanSignal => { + return take(output, { + factor: __limitedParseDouble, + isBigEndian: __expectBoolean, + isSigned: __expectBoolean, + length: __expectInt32, + messageId: __expectInt32, + name: __expectString, + offset: __limitedParseDouble, + startBit: __expectInt32, + }) as any; }; -/** - * serializeAws_json1_0ImportDecoderManifestRequest - */ -const se_ImportDecoderManifestRequest = (input: ImportDecoderManifestRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.networkFileDefinitions != null && { - networkFileDefinitions: se_NetworkFileDefinitions(input.networkFileDefinitions, context), - }), - }; -}; - -/** - * serializeAws_json1_0ImportSignalCatalogRequest - */ -const se_ImportSignalCatalogRequest = (input: ImportSignalCatalogRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.vss != null && { vss: se_FormattedVss(input.vss, context) }), - }; -}; - -/** - * serializeAws_json1_0InterfaceIds - */ -const se_InterfaceIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0ListCampaignsRequest - */ -const se_ListCampaignsRequest = (input: ListCampaignsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_0ListDecoderManifestNetworkInterfacesRequest - */ -const se_ListDecoderManifestNetworkInterfacesRequest = ( - input: ListDecoderManifestNetworkInterfacesRequest, - context: __SerdeContext -): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListDecoderManifestSignalsRequest - */ -const se_ListDecoderManifestSignalsRequest = ( - input: ListDecoderManifestSignalsRequest, - context: __SerdeContext -): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListDecoderManifestsRequest - */ -const se_ListDecoderManifestsRequest = (input: ListDecoderManifestsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListFleetsForVehicleRequest - */ -const se_ListFleetsForVehicleRequest = (input: ListFleetsForVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; -}; - -/** - * serializeAws_json1_0ListFleetsRequest - */ -const se_ListFleetsRequest = (input: ListFleetsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListModelManifestNodesRequest - */ -const se_ListModelManifestNodesRequest = (input: ListModelManifestNodesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListModelManifestsRequest - */ -const se_ListModelManifestsRequest = (input: ListModelManifestsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.signalCatalogArn != null && { signalCatalogArn: input.signalCatalogArn }), - }; -}; - -/** - * serializeAws_json1_0listOfStrings - */ -const se_listOfStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0ListSignalCatalogNodesRequest - */ -const se_ListSignalCatalogNodesRequest = (input: ListSignalCatalogNodesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListSignalCatalogsRequest - */ -const se_ListSignalCatalogsRequest = (input: ListSignalCatalogsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; - -/** - * serializeAws_json1_0ListVehiclesInFleetRequest - */ -const se_ListVehiclesInFleetRequest = (input: ListVehiclesInFleetRequest, context: __SerdeContext): any => { - return { - ...(input.fleetId != null && { fleetId: input.fleetId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListVehiclesRequest - */ -const se_ListVehiclesRequest = (input: ListVehiclesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ModelSignalsMap - */ -const se_ModelSignalsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_0NetworkFileDefinition - */ -const se_NetworkFileDefinition = (input: NetworkFileDefinition, context: __SerdeContext): any => { - return NetworkFileDefinition.visit(input, { - canDbc: (value) => ({ canDbc: se_CanDbcDefinition(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_json1_0NetworkFileDefinitions - */ -const se_NetworkFileDefinitions = (input: NetworkFileDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NetworkFileDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_0NetworkFilesList - */ -const se_NetworkFilesList = (input: Uint8Array[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return context.base64Encoder(entry); - }); -}; - -/** - * serializeAws_json1_0NetworkInterface - */ -const se_NetworkInterface = (input: NetworkInterface, context: __SerdeContext): any => { - return { - ...(input.canInterface != null && { canInterface: se_CanInterface(input.canInterface, context) }), - ...(input.interfaceId != null && { interfaceId: input.interfaceId }), - ...(input.obdInterface != null && { obdInterface: se_ObdInterface(input.obdInterface, context) }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_0NetworkInterfaces - */ -const se_NetworkInterfaces = (input: NetworkInterface[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NetworkInterface(entry, context); - }); -}; - -/** - * serializeAws_json1_0Node - */ -const se_Node = (input: Node, context: __SerdeContext): any => { - return Node.visit(input, { - actuator: (value) => ({ actuator: se_Actuator(value, context) }), - attribute: (value) => ({ attribute: se_Attribute(value, context) }), - branch: (value) => ({ branch: se_Branch(value, context) }), - sensor: (value) => ({ sensor: se_Sensor(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_json1_0NodePaths - */ -const se_NodePaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0Nodes - */ -const se_Nodes = (input: Node[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Node(entry, context); - }); -}; - -/** - * serializeAws_json1_0ObdInterface - */ -const se_ObdInterface = (input: ObdInterface, context: __SerdeContext): any => { - return { - ...(input.dtcRequestIntervalSeconds != null && { dtcRequestIntervalSeconds: input.dtcRequestIntervalSeconds }), - ...(input.hasTransmissionEcu != null && { hasTransmissionEcu: input.hasTransmissionEcu }), - ...(input.name != null && { name: input.name }), - ...(input.obdStandard != null && { obdStandard: input.obdStandard }), - ...(input.pidRequestIntervalSeconds != null && { pidRequestIntervalSeconds: input.pidRequestIntervalSeconds }), - ...(input.requestMessageId != null && { requestMessageId: input.requestMessageId }), - ...(input.useExtendedIds != null && { useExtendedIds: input.useExtendedIds }), - }; -}; - -/** - * serializeAws_json1_0ObdSignal - */ -const se_ObdSignal = (input: ObdSignal, context: __SerdeContext): any => { - return { - ...(input.bitMaskLength != null && { bitMaskLength: input.bitMaskLength }), - ...(input.bitRightShift != null && { bitRightShift: input.bitRightShift }), - ...(input.byteLength != null && { byteLength: input.byteLength }), - ...(input.offset != null && { offset: __serializeFloat(input.offset) }), - ...(input.pid != null && { pid: input.pid }), - ...(input.pidResponseLength != null && { pidResponseLength: input.pidResponseLength }), - ...(input.scaling != null && { scaling: __serializeFloat(input.scaling) }), - ...(input.serviceMode != null && { serviceMode: input.serviceMode }), - ...(input.startByte != null && { startByte: input.startByte }), - }; -}; - -/** - * serializeAws_json1_0PutLoggingOptionsRequest - */ -const se_PutLoggingOptionsRequest = (input: PutLoggingOptionsRequest, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogDelivery != null && { - cloudWatchLogDelivery: se_CloudWatchLogDeliveryOptions(input.cloudWatchLogDelivery, context), - }), - }; -}; - -/** - * serializeAws_json1_0RegisterAccountRequest - */ -const se_RegisterAccountRequest = (input: RegisterAccountRequest, context: __SerdeContext): any => { - return { - ...(input.iamResources != null && { iamResources: se_IamResources(input.iamResources, context) }), - ...(input.timestreamResources != null && { - timestreamResources: se_TimestreamResources(input.timestreamResources, context), - }), - }; -}; - -/** - * serializeAws_json1_0Sensor - */ -const se_Sensor = (input: Sensor, context: __SerdeContext): any => { - return { - ...(input.allowedValues != null && { allowedValues: se_listOfStrings(input.allowedValues, context) }), - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.description != null && { description: input.description }), - ...(input.fullyQualifiedName != null && { fullyQualifiedName: input.fullyQualifiedName }), - ...(input.max != null && { max: __serializeFloat(input.max) }), - ...(input.min != null && { min: __serializeFloat(input.min) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; - -/** - * serializeAws_json1_0SignalDecoder - */ -const se_SignalDecoder = (input: SignalDecoder, context: __SerdeContext): any => { - return { - ...(input.canSignal != null && { canSignal: se_CanSignal(input.canSignal, context) }), - ...(input.fullyQualifiedName != null && { fullyQualifiedName: input.fullyQualifiedName }), - ...(input.interfaceId != null && { interfaceId: input.interfaceId }), - ...(input.obdSignal != null && { obdSignal: se_ObdSignal(input.obdSignal, context) }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_0SignalDecoders - */ -const se_SignalDecoders = (input: SignalDecoder[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SignalDecoder(entry, context); - }); -}; - -/** - * serializeAws_json1_0SignalInformation - */ -const se_SignalInformation = (input: SignalInformation, context: __SerdeContext): any => { - return { - ...(input.maxSampleCount != null && { maxSampleCount: input.maxSampleCount }), - ...(input.minimumSamplingIntervalMs != null && { minimumSamplingIntervalMs: input.minimumSamplingIntervalMs }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_0SignalInformationList - */ -const se_SignalInformationList = (input: SignalInformation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SignalInformation(entry, context); - }); -}; - -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_0TimeBasedCollectionScheme - */ -const se_TimeBasedCollectionScheme = (input: TimeBasedCollectionScheme, context: __SerdeContext): any => { - return { - ...(input.periodMs != null && { periodMs: input.periodMs }), - }; -}; - -/** - * serializeAws_json1_0TimestreamResources - */ -const se_TimestreamResources = (input: TimestreamResources, context: __SerdeContext): any => { - return { - ...(input.timestreamDatabaseName != null && { timestreamDatabaseName: input.timestreamDatabaseName }), - ...(input.timestreamTableName != null && { timestreamTableName: input.timestreamTableName }), - }; -}; - -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_0UpdateCampaignRequest - */ -const se_UpdateCampaignRequest = (input: UpdateCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: input.action }), - ...(input.dataExtraDimensions != null && { - dataExtraDimensions: se_DataExtraDimensionNodePathList(input.dataExtraDimensions, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_0UpdateDecoderManifestRequest - */ -const se_UpdateDecoderManifestRequest = (input: UpdateDecoderManifestRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.networkInterfacesToAdd != null && { - networkInterfacesToAdd: se_NetworkInterfaces(input.networkInterfacesToAdd, context), - }), - ...(input.networkInterfacesToRemove != null && { - networkInterfacesToRemove: se_InterfaceIds(input.networkInterfacesToRemove, context), - }), - ...(input.networkInterfacesToUpdate != null && { - networkInterfacesToUpdate: se_NetworkInterfaces(input.networkInterfacesToUpdate, context), - }), - ...(input.signalDecodersToAdd != null && { - signalDecodersToAdd: se_SignalDecoders(input.signalDecodersToAdd, context), - }), - ...(input.signalDecodersToRemove != null && { - signalDecodersToRemove: se_Fqns(input.signalDecodersToRemove, context), - }), - ...(input.signalDecodersToUpdate != null && { - signalDecodersToUpdate: se_SignalDecoders(input.signalDecodersToUpdate, context), - }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_0UpdateFleetRequest - */ -const se_UpdateFleetRequest = (input: UpdateFleetRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.fleetId != null && { fleetId: input.fleetId }), - }; -}; - -/** - * serializeAws_json1_0UpdateModelManifestRequest - */ -const se_UpdateModelManifestRequest = (input: UpdateModelManifestRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.nodesToAdd != null && { nodesToAdd: se_NodePaths(input.nodesToAdd, context) }), - ...(input.nodesToRemove != null && { nodesToRemove: se_NodePaths(input.nodesToRemove, context) }), - ...(input.status != null && { status: input.status }), - }; -}; - -/** - * serializeAws_json1_0UpdateSignalCatalogRequest - */ -const se_UpdateSignalCatalogRequest = (input: UpdateSignalCatalogRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.nodesToAdd != null && { nodesToAdd: se_Nodes(input.nodesToAdd, context) }), - ...(input.nodesToRemove != null && { nodesToRemove: se_NodePaths(input.nodesToRemove, context) }), - ...(input.nodesToUpdate != null && { nodesToUpdate: se_Nodes(input.nodesToUpdate, context) }), - }; -}; - -/** - * serializeAws_json1_0UpdateVehicleRequest - */ -const se_UpdateVehicleRequest = (input: UpdateVehicleRequest, context: __SerdeContext): any => { - return { - ...(input.attributeUpdateMode != null && { attributeUpdateMode: input.attributeUpdateMode }), - ...(input.attributes != null && { attributes: se_attributesMap(input.attributes, context) }), - ...(input.decoderManifestArn != null && { decoderManifestArn: input.decoderManifestArn }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; -}; - -/** - * serializeAws_json1_0UpdateVehicleRequestItem - */ -const se_UpdateVehicleRequestItem = (input: UpdateVehicleRequestItem, context: __SerdeContext): any => { - return { - ...(input.attributeUpdateMode != null && { attributeUpdateMode: input.attributeUpdateMode }), - ...(input.attributes != null && { attributes: se_attributesMap(input.attributes, context) }), - ...(input.decoderManifestArn != null && { decoderManifestArn: input.decoderManifestArn }), - ...(input.modelManifestArn != null && { modelManifestArn: input.modelManifestArn }), - ...(input.vehicleName != null && { vehicleName: input.vehicleName }), - }; -}; - -/** - * serializeAws_json1_0updateVehicleRequestItems - */ -const se_updateVehicleRequestItems = (input: UpdateVehicleRequestItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateVehicleRequestItem(entry, context); - }); -}; - -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0Actuator - */ -const de_Actuator = (output: any, context: __SerdeContext): Actuator => { - return { - allowedValues: output.allowedValues != null ? de_listOfStrings(output.allowedValues, context) : undefined, - assignedValue: __expectString(output.assignedValue), - dataType: __expectString(output.dataType), - description: __expectString(output.description), - fullyQualifiedName: __expectString(output.fullyQualifiedName), - max: __limitedParseDouble(output.max), - min: __limitedParseDouble(output.min), - unit: __expectString(output.unit), - } as any; -}; - -/** - * deserializeAws_json1_0AssociateVehicleFleetResponse - */ -const de_AssociateVehicleFleetResponse = (output: any, context: __SerdeContext): AssociateVehicleFleetResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_0Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - allowedValues: output.allowedValues != null ? de_listOfStrings(output.allowedValues, context) : undefined, - assignedValue: __expectString(output.assignedValue), - dataType: __expectString(output.dataType), - defaultValue: __expectString(output.defaultValue), - description: __expectString(output.description), - fullyQualifiedName: __expectString(output.fullyQualifiedName), - max: __limitedParseDouble(output.max), - min: __limitedParseDouble(output.min), - unit: __expectString(output.unit), - } as any; -}; - -/** - * deserializeAws_json1_0attributesMap - */ -const de_attributesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_0BatchCreateVehicleResponse - */ -const de_BatchCreateVehicleResponse = (output: any, context: __SerdeContext): BatchCreateVehicleResponse => { - return { - errors: output.errors != null ? de_createVehicleErrors(output.errors, context) : undefined, - vehicles: output.vehicles != null ? de_createVehicleResponses(output.vehicles, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0BatchUpdateVehicleResponse - */ -const de_BatchUpdateVehicleResponse = (output: any, context: __SerdeContext): BatchUpdateVehicleResponse => { - return { - errors: output.errors != null ? de_updateVehicleErrors(output.errors, context) : undefined, - vehicles: output.vehicles != null ? de_updateVehicleResponseItems(output.vehicles, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0Branch - */ -const de_Branch = (output: any, context: __SerdeContext): Branch => { - return { - description: __expectString(output.description), - fullyQualifiedName: __expectString(output.fullyQualifiedName), - } as any; -}; - -/** - * deserializeAws_json1_0campaignSummaries - */ -const de_campaignSummaries = (output: any, context: __SerdeContext): CampaignSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CampaignSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0CampaignSummary - */ -const de_CampaignSummary = (output: any, context: __SerdeContext): CampaignSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - name: __expectString(output.name), - signalCatalogArn: __expectString(output.signalCatalogArn), - status: __expectString(output.status), - targetArn: __expectString(output.targetArn), - } as any; -}; - -/** - * deserializeAws_json1_0CanInterface - */ -const de_CanInterface = (output: any, context: __SerdeContext): CanInterface => { - return { - name: __expectString(output.name), - protocolName: __expectString(output.protocolName), - protocolVersion: __expectString(output.protocolVersion), - } as any; -}; - -/** - * deserializeAws_json1_0CanSignal - */ -const de_CanSignal = (output: any, context: __SerdeContext): CanSignal => { - return { - factor: __limitedParseDouble(output.factor), - isBigEndian: __expectBoolean(output.isBigEndian), - isSigned: __expectBoolean(output.isSigned), - length: __expectInt32(output.length), - messageId: __expectInt32(output.messageId), - name: __expectString(output.name), - offset: __limitedParseDouble(output.offset), - startBit: __expectInt32(output.startBit), - } as any; -}; - -/** - * deserializeAws_json1_0CloudWatchLogDeliveryOptions - */ -const de_CloudWatchLogDeliveryOptions = (output: any, context: __SerdeContext): CloudWatchLogDeliveryOptions => { - return { - logGroupName: __expectString(output.logGroupName), - logType: __expectString(output.logType), - } as any; -}; +// de_CloudWatchLogDeliveryOptions omitted. -/** - * deserializeAws_json1_0CollectionScheme - */ -const de_CollectionScheme = (output: any, context: __SerdeContext): CollectionScheme => { - if (output.conditionBasedCollectionScheme != null) { - return { - conditionBasedCollectionScheme: de_ConditionBasedCollectionScheme(output.conditionBasedCollectionScheme, context), - }; - } - if (output.timeBasedCollectionScheme != null) { - return { - timeBasedCollectionScheme: de_TimeBasedCollectionScheme(output.timeBasedCollectionScheme, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_CollectionScheme omitted. -/** - * deserializeAws_json1_0ConditionBasedCollectionScheme - */ -const de_ConditionBasedCollectionScheme = (output: any, context: __SerdeContext): ConditionBasedCollectionScheme => { - return { - conditionLanguageVersion: __expectInt32(output.conditionLanguageVersion), - expression: __expectString(output.expression), - minimumTriggerIntervalMs: __expectLong(output.minimumTriggerIntervalMs), - triggerMode: __expectString(output.triggerMode), - } as any; -}; +// de_ConditionBasedCollectionScheme omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateCampaignResponse - */ -const de_CreateCampaignResponse = (output: any, context: __SerdeContext): CreateCampaignResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_CreateCampaignResponse omitted. -/** - * deserializeAws_json1_0CreateDecoderManifestResponse - */ -const de_CreateDecoderManifestResponse = (output: any, context: __SerdeContext): CreateDecoderManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_CreateDecoderManifestResponse omitted. -/** - * deserializeAws_json1_0CreateFleetResponse - */ -const de_CreateFleetResponse = (output: any, context: __SerdeContext): CreateFleetResponse => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - } as any; -}; +// de_CreateFleetResponse omitted. -/** - * deserializeAws_json1_0CreateModelManifestResponse - */ -const de_CreateModelManifestResponse = (output: any, context: __SerdeContext): CreateModelManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_CreateModelManifestResponse omitted. -/** - * deserializeAws_json1_0CreateSignalCatalogResponse - */ -const de_CreateSignalCatalogResponse = (output: any, context: __SerdeContext): CreateSignalCatalogResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_CreateSignalCatalogResponse omitted. -/** - * deserializeAws_json1_0CreateVehicleError - */ -const de_CreateVehicleError = (output: any, context: __SerdeContext): CreateVehicleError => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_CreateVehicleError omitted. -/** - * deserializeAws_json1_0createVehicleErrors - */ -const de_createVehicleErrors = (output: any, context: __SerdeContext): CreateVehicleError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CreateVehicleError(entry, context); - }); - return retVal; -}; +// de_createVehicleErrors omitted. -/** - * deserializeAws_json1_0CreateVehicleResponse - */ -const de_CreateVehicleResponse = (output: any, context: __SerdeContext): CreateVehicleResponse => { - return { - arn: __expectString(output.arn), - thingArn: __expectString(output.thingArn), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_CreateVehicleResponse omitted. -/** - * deserializeAws_json1_0CreateVehicleResponseItem - */ -const de_CreateVehicleResponseItem = (output: any, context: __SerdeContext): CreateVehicleResponseItem => { - return { - arn: __expectString(output.arn), - thingArn: __expectString(output.thingArn), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_CreateVehicleResponseItem omitted. -/** - * deserializeAws_json1_0createVehicleResponses - */ -const de_createVehicleResponses = (output: any, context: __SerdeContext): CreateVehicleResponseItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CreateVehicleResponseItem(entry, context); - }); - return retVal; -}; +// de_createVehicleResponses omitted. -/** - * deserializeAws_json1_0DataExtraDimensionNodePathList - */ -const de_DataExtraDimensionNodePathList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DataExtraDimensionNodePathList omitted. /** * deserializeAws_json1_0decoderManifestSummaries @@ -5525,9 +4565,6 @@ const de_decoderManifestSummaries = (output: any, context: __SerdeContext): Deco const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DecoderManifestSummary(entry, context); }); return retVal; @@ -5537,125 +4574,34 @@ const de_decoderManifestSummaries = (output: any, context: __SerdeContext): Deco * deserializeAws_json1_0DecoderManifestSummary */ const de_DecoderManifestSummary = (output: any, context: __SerdeContext): DecoderManifestSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - modelManifestArn: __expectString(output.modelManifestArn), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_0DecoderManifestValidationException - */ -const de_DecoderManifestValidationException = ( - output: any, - context: __SerdeContext -): DecoderManifestValidationException => { - return { - invalidNetworkInterfaces: - output.invalidNetworkInterfaces != null - ? de_InvalidNetworkInterfaces(output.invalidNetworkInterfaces, context) - : undefined, - invalidSignals: - output.invalidSignals != null ? de_InvalidSignalDecoders(output.invalidSignals, context) : undefined, - message: __expectString(output.message), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + modelManifestArn: __expectString, + name: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0DeleteCampaignResponse - */ -const de_DeleteCampaignResponse = (output: any, context: __SerdeContext): DeleteCampaignResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_DecoderManifestValidationException omitted. -/** - * deserializeAws_json1_0DeleteDecoderManifestResponse - */ -const de_DeleteDecoderManifestResponse = (output: any, context: __SerdeContext): DeleteDecoderManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_DeleteCampaignResponse omitted. -/** - * deserializeAws_json1_0DeleteFleetResponse - */ -const de_DeleteFleetResponse = (output: any, context: __SerdeContext): DeleteFleetResponse => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - } as any; -}; +// de_DeleteDecoderManifestResponse omitted. -/** - * deserializeAws_json1_0DeleteModelManifestResponse - */ -const de_DeleteModelManifestResponse = (output: any, context: __SerdeContext): DeleteModelManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_DeleteFleetResponse omitted. -/** - * deserializeAws_json1_0DeleteSignalCatalogResponse - */ -const de_DeleteSignalCatalogResponse = (output: any, context: __SerdeContext): DeleteSignalCatalogResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_DeleteModelManifestResponse omitted. -/** - * deserializeAws_json1_0DeleteVehicleResponse - */ -const de_DeleteVehicleResponse = (output: any, context: __SerdeContext): DeleteVehicleResponse => { - return { - arn: __expectString(output.arn), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_DeleteSignalCatalogResponse omitted. -/** - * deserializeAws_json1_0DisassociateVehicleFleetResponse - */ -const de_DisassociateVehicleFleetResponse = ( - output: any, - context: __SerdeContext -): DisassociateVehicleFleetResponse => { - return {} as any; -}; +// de_DeleteVehicleResponse omitted. -/** - * deserializeAws_json1_0fleets - */ -const de_fleets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DisassociateVehicleFleetResponse omitted. + +// de_fleets omitted. /** * deserializeAws_json1_0fleetSummaries @@ -5664,410 +4610,193 @@ const de_fleetSummaries = (output: any, context: __SerdeContext): FleetSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FleetSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_0FleetSummary - */ -const de_FleetSummary = (output: any, context: __SerdeContext): FleetSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - signalCatalogArn: __expectString(output.signalCatalogArn), - } as any; -}; - -/** - * deserializeAws_json1_0GetCampaignResponse - */ -const de_GetCampaignResponse = (output: any, context: __SerdeContext): GetCampaignResponse => { - return { - arn: __expectString(output.arn), - collectionScheme: - output.collectionScheme != null - ? de_CollectionScheme(__expectUnion(output.collectionScheme), context) - : undefined, - compression: __expectString(output.compression), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - dataExtraDimensions: - output.dataExtraDimensions != null - ? de_DataExtraDimensionNodePathList(output.dataExtraDimensions, context) - : undefined, - description: __expectString(output.description), - diagnosticsMode: __expectString(output.diagnosticsMode), - expiryTime: - output.expiryTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiryTime))) : undefined, - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - name: __expectString(output.name), - postTriggerCollectionDuration: __expectLong(output.postTriggerCollectionDuration), - priority: __expectInt32(output.priority), - signalCatalogArn: __expectString(output.signalCatalogArn), - signalsToCollect: - output.signalsToCollect != null ? de_SignalInformationList(output.signalsToCollect, context) : undefined, - spoolingMode: __expectString(output.spoolingMode), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - targetArn: __expectString(output.targetArn), - } as any; -}; - -/** - * deserializeAws_json1_0GetDecoderManifestResponse - */ -const de_GetDecoderManifestResponse = (output: any, context: __SerdeContext): GetDecoderManifestResponse => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - modelManifestArn: __expectString(output.modelManifestArn), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_0GetFleetResponse - */ -const de_GetFleetResponse = (output: any, context: __SerdeContext): GetFleetResponse => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - signalCatalogArn: __expectString(output.signalCatalogArn), - } as any; -}; - -/** - * deserializeAws_json1_0GetLoggingOptionsResponse - */ -const de_GetLoggingOptionsResponse = (output: any, context: __SerdeContext): GetLoggingOptionsResponse => { - return { - cloudWatchLogDelivery: - output.cloudWatchLogDelivery != null - ? de_CloudWatchLogDeliveryOptions(output.cloudWatchLogDelivery, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0GetModelManifestResponse - */ -const de_GetModelManifestResponse = (output: any, context: __SerdeContext): GetModelManifestResponse => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - name: __expectString(output.name), - signalCatalogArn: __expectString(output.signalCatalogArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_0GetRegisterAccountStatusResponse - */ -const de_GetRegisterAccountStatusResponse = ( - output: any, - context: __SerdeContext -): GetRegisterAccountStatusResponse => { - return { - accountStatus: __expectString(output.accountStatus), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - customerAccountId: __expectString(output.customerAccountId), - iamRegistrationResponse: - output.iamRegistrationResponse != null - ? de_IamRegistrationResponse(output.iamRegistrationResponse, context) - : undefined, - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - timestreamRegistrationResponse: - output.timestreamRegistrationResponse != null - ? de_TimestreamRegistrationResponse(output.timestreamRegistrationResponse, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0GetSignalCatalogResponse - */ -const de_GetSignalCatalogResponse = (output: any, context: __SerdeContext): GetSignalCatalogResponse => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - name: __expectString(output.name), - nodeCounts: output.nodeCounts != null ? de_NodeCounts(output.nodeCounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0GetVehicleResponse - */ -const de_GetVehicleResponse = (output: any, context: __SerdeContext): GetVehicleResponse => { - return { - arn: __expectString(output.arn), - attributes: output.attributes != null ? de_attributesMap(output.attributes, context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - decoderManifestArn: __expectString(output.decoderManifestArn), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - modelManifestArn: __expectString(output.modelManifestArn), - vehicleName: __expectString(output.vehicleName), - } as any; -}; - -/** - * deserializeAws_json1_0GetVehicleStatusResponse - */ -const de_GetVehicleStatusResponse = (output: any, context: __SerdeContext): GetVehicleStatusResponse => { - return { - campaigns: output.campaigns != null ? de_VehicleStatusList(output.campaigns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_0IamRegistrationResponse - */ -const de_IamRegistrationResponse = (output: any, context: __SerdeContext): IamRegistrationResponse => { - return { - errorMessage: __expectString(output.errorMessage), - registrationStatus: __expectString(output.registrationStatus), - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_json1_0IamResources - */ -const de_IamResources = (output: any, context: __SerdeContext): IamResources => { - return { - roleArn: __expectString(output.roleArn), - } as any; -}; - -/** - * deserializeAws_json1_0ImportDecoderManifestResponse - */ -const de_ImportDecoderManifestResponse = (output: any, context: __SerdeContext): ImportDecoderManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_0ImportSignalCatalogResponse - */ -const de_ImportSignalCatalogResponse = (output: any, context: __SerdeContext): ImportSignalCatalogResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - retryAfterSeconds: __expectInt32(output.retryAfterSeconds), - } as any; -}; - -/** - * deserializeAws_json1_0InvalidNetworkInterface + * deserializeAws_json1_0FleetSummary */ -const de_InvalidNetworkInterface = (output: any, context: __SerdeContext): InvalidNetworkInterface => { - return { - interfaceId: __expectString(output.interfaceId), - reason: __expectString(output.reason), - } as any; +const de_FleetSummary = (output: any, context: __SerdeContext): FleetSummary => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + signalCatalogArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_0InvalidNetworkInterfaces + * deserializeAws_json1_0GetCampaignResponse */ -const de_InvalidNetworkInterfaces = (output: any, context: __SerdeContext): InvalidNetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InvalidNetworkInterface(entry, context); - }); - return retVal; +const de_GetCampaignResponse = (output: any, context: __SerdeContext): GetCampaignResponse => { + return take(output, { + arn: __expectString, + collectionScheme: (_: any) => _json(__expectUnion(_)), + compression: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataExtraDimensions: _json, + description: __expectString, + diagnosticsMode: __expectString, + expiryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + postTriggerCollectionDuration: __expectLong, + priority: __expectInt32, + signalCatalogArn: __expectString, + signalsToCollect: _json, + spoolingMode: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + targetArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_0InvalidNodeException + * deserializeAws_json1_0GetDecoderManifestResponse */ -const de_InvalidNodeException = (output: any, context: __SerdeContext): InvalidNodeException => { - return { - invalidNodes: output.invalidNodes != null ? de_Nodes(output.invalidNodes, context) : undefined, - message: __expectString(output.message), - reason: __expectString(output.reason), - } as any; +const de_GetDecoderManifestResponse = (output: any, context: __SerdeContext): GetDecoderManifestResponse => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + modelManifestArn: __expectString, + name: __expectString, + status: __expectString, + }) as any; }; /** - * deserializeAws_json1_0InvalidSignal + * deserializeAws_json1_0GetFleetResponse */ -const de_InvalidSignal = (output: any, context: __SerdeContext): InvalidSignal => { - return { - name: __expectString(output.name), - reason: __expectString(output.reason), - } as any; +const de_GetFleetResponse = (output: any, context: __SerdeContext): GetFleetResponse => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + signalCatalogArn: __expectString, + }) as any; }; +// de_GetLoggingOptionsResponse omitted. + /** - * deserializeAws_json1_0InvalidSignalDecoder + * deserializeAws_json1_0GetModelManifestResponse */ -const de_InvalidSignalDecoder = (output: any, context: __SerdeContext): InvalidSignalDecoder => { - return { - name: __expectString(output.name), - reason: __expectString(output.reason), - } as any; +const de_GetModelManifestResponse = (output: any, context: __SerdeContext): GetModelManifestResponse => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + signalCatalogArn: __expectString, + status: __expectString, + }) as any; }; /** - * deserializeAws_json1_0InvalidSignalDecoders + * deserializeAws_json1_0GetRegisterAccountStatusResponse */ -const de_InvalidSignalDecoders = (output: any, context: __SerdeContext): InvalidSignalDecoder[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InvalidSignalDecoder(entry, context); - }); - return retVal; +const de_GetRegisterAccountStatusResponse = ( + output: any, + context: __SerdeContext +): GetRegisterAccountStatusResponse => { + return take(output, { + accountStatus: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customerAccountId: __expectString, + iamRegistrationResponse: _json, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + timestreamRegistrationResponse: _json, + }) as any; }; /** - * deserializeAws_json1_0InvalidSignals + * deserializeAws_json1_0GetSignalCatalogResponse */ -const de_InvalidSignals = (output: any, context: __SerdeContext): InvalidSignal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InvalidSignal(entry, context); - }); - return retVal; +const de_GetSignalCatalogResponse = (output: any, context: __SerdeContext): GetSignalCatalogResponse => { + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + nodeCounts: _json, + }) as any; }; /** - * deserializeAws_json1_0InvalidSignalsException + * deserializeAws_json1_0GetVehicleResponse */ -const de_InvalidSignalsException = (output: any, context: __SerdeContext): InvalidSignalsException => { - return { - invalidSignals: output.invalidSignals != null ? de_InvalidSignals(output.invalidSignals, context) : undefined, - message: __expectString(output.message), - } as any; +const de_GetVehicleResponse = (output: any, context: __SerdeContext): GetVehicleResponse => { + return take(output, { + arn: __expectString, + attributes: _json, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + decoderManifestArn: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + modelManifestArn: __expectString, + vehicleName: __expectString, + }) as any; }; +// de_GetVehicleStatusResponse omitted. + +// de_IamRegistrationResponse omitted. + +// de_IamResources omitted. + +// de_ImportDecoderManifestResponse omitted. + +// de_ImportSignalCatalogResponse omitted. + +// de_InternalServerException omitted. + +// de_InvalidNetworkInterface omitted. + +// de_InvalidNetworkInterfaces omitted. + /** - * deserializeAws_json1_0LimitExceededException + * deserializeAws_json1_0InvalidNodeException */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - } as any; +const de_InvalidNodeException = (output: any, context: __SerdeContext): InvalidNodeException => { + return take(output, { + invalidNodes: (_: any) => de_Nodes(_, context), + message: __expectString, + reason: __expectString, + }) as any; }; +// de_InvalidSignal omitted. + +// de_InvalidSignalDecoder omitted. + +// de_InvalidSignalDecoders omitted. + +// de_InvalidSignals omitted. + +// de_InvalidSignalsException omitted. + +// de_LimitExceededException omitted. + /** * deserializeAws_json1_0ListCampaignsResponse */ const de_ListCampaignsResponse = (output: any, context: __SerdeContext): ListCampaignsResponse => { - return { - campaignSummaries: - output.campaignSummaries != null ? de_campaignSummaries(output.campaignSummaries, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + campaignSummaries: (_: any) => de_campaignSummaries(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListDecoderManifestNetworkInterfacesResponse - */ -const de_ListDecoderManifestNetworkInterfacesResponse = ( - output: any, - context: __SerdeContext -): ListDecoderManifestNetworkInterfacesResponse => { - return { - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListDecoderManifestNetworkInterfacesResponse omitted. /** * deserializeAws_json1_0ListDecoderManifestSignalsResponse @@ -6076,125 +4805,88 @@ const de_ListDecoderManifestSignalsResponse = ( output: any, context: __SerdeContext ): ListDecoderManifestSignalsResponse => { - return { - nextToken: __expectString(output.nextToken), - signalDecoders: output.signalDecoders != null ? de_SignalDecoders(output.signalDecoders, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + signalDecoders: (_: any) => de_SignalDecoders(_, context), + }) as any; }; /** * deserializeAws_json1_0ListDecoderManifestsResponse */ const de_ListDecoderManifestsResponse = (output: any, context: __SerdeContext): ListDecoderManifestsResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_decoderManifestSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_decoderManifestSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListFleetsForVehicleResponse - */ -const de_ListFleetsForVehicleResponse = (output: any, context: __SerdeContext): ListFleetsForVehicleResponse => { - return { - fleets: output.fleets != null ? de_fleets(output.fleets, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListFleetsForVehicleResponse omitted. /** * deserializeAws_json1_0ListFleetsResponse */ const de_ListFleetsResponse = (output: any, context: __SerdeContext): ListFleetsResponse => { - return { - fleetSummaries: output.fleetSummaries != null ? de_fleetSummaries(output.fleetSummaries, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + fleetSummaries: (_: any) => de_fleetSummaries(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListModelManifestNodesResponse */ const de_ListModelManifestNodesResponse = (output: any, context: __SerdeContext): ListModelManifestNodesResponse => { - return { - nextToken: __expectString(output.nextToken), - nodes: output.nodes != null ? de_Nodes(output.nodes, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + nodes: (_: any) => de_Nodes(_, context), + }) as any; }; /** * deserializeAws_json1_0ListModelManifestsResponse */ const de_ListModelManifestsResponse = (output: any, context: __SerdeContext): ListModelManifestsResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_modelManifestSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_modelManifestSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0listOfStrings - */ -const de_listOfStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_listOfStrings omitted. /** * deserializeAws_json1_0ListSignalCatalogNodesResponse */ const de_ListSignalCatalogNodesResponse = (output: any, context: __SerdeContext): ListSignalCatalogNodesResponse => { - return { - nextToken: __expectString(output.nextToken), - nodes: output.nodes != null ? de_Nodes(output.nodes, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + nodes: (_: any) => de_Nodes(_, context), + }) as any; }; /** * deserializeAws_json1_0ListSignalCatalogsResponse */ const de_ListSignalCatalogsResponse = (output: any, context: __SerdeContext): ListSignalCatalogsResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_signalCatalogSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_signalCatalogSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0ListVehiclesInFleetResponse - */ -const de_ListVehiclesInFleetResponse = (output: any, context: __SerdeContext): ListVehiclesInFleetResponse => { - return { - nextToken: __expectString(output.nextToken), - vehicles: output.vehicles != null ? de_vehicles(output.vehicles, context) : undefined, - } as any; -}; +// de_ListVehiclesInFleetResponse omitted. /** * deserializeAws_json1_0ListVehiclesResponse */ const de_ListVehiclesResponse = (output: any, context: __SerdeContext): ListVehiclesResponse => { - return { - nextToken: __expectString(output.nextToken), - vehicleSummaries: - output.vehicleSummaries != null ? de_vehicleSummaries(output.vehicleSummaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + vehicleSummaries: (_: any) => de_vehicleSummaries(_, context), + }) as any; }; /** @@ -6204,9 +4896,6 @@ const de_modelManifestSummaries = (output: any, context: __SerdeContext): ModelM const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelManifestSummary(entry, context); }); return retVal; @@ -6216,49 +4905,20 @@ const de_modelManifestSummaries = (output: any, context: __SerdeContext): ModelM * deserializeAws_json1_0ModelManifestSummary */ const de_ModelManifestSummary = (output: any, context: __SerdeContext): ModelManifestSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - name: __expectString(output.name), - signalCatalogArn: __expectString(output.signalCatalogArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_0NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - canInterface: output.canInterface != null ? de_CanInterface(output.canInterface, context) : undefined, - interfaceId: __expectString(output.interfaceId), - obdInterface: output.obdInterface != null ? de_ObdInterface(output.obdInterface, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + signalCatalogArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0NetworkInterfaces - */ -const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; -}; +// de_NetworkInterface omitted. + +// de_NetworkInterfaces omitted. /** * deserializeAws_json1_0Node @@ -6276,7 +4936,7 @@ const de_Node = (output: any, context: __SerdeContext): Node => { } if (output.branch != null) { return { - branch: de_Branch(output.branch, context), + branch: _json(output.branch), }; } if (output.sensor != null) { @@ -6287,18 +4947,7 @@ const de_Node = (output: any, context: __SerdeContext): Node => { return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_json1_0NodeCounts - */ -const de_NodeCounts = (output: any, context: __SerdeContext): NodeCounts => { - return { - totalActuators: __expectInt32(output.totalActuators), - totalAttributes: __expectInt32(output.totalAttributes), - totalBranches: __expectInt32(output.totalBranches), - totalNodes: __expectInt32(output.totalNodes), - totalSensors: __expectInt32(output.totalSensors), - } as any; -}; +// de_NodeCounts omitted. /** * deserializeAws_json1_0Nodes @@ -6307,97 +4956,60 @@ const de_Nodes = (output: any, context: __SerdeContext): Node[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Node(__expectUnion(entry), context); }); return retVal; }; -/** - * deserializeAws_json1_0ObdInterface - */ -const de_ObdInterface = (output: any, context: __SerdeContext): ObdInterface => { - return { - dtcRequestIntervalSeconds: __expectInt32(output.dtcRequestIntervalSeconds), - hasTransmissionEcu: __expectBoolean(output.hasTransmissionEcu), - name: __expectString(output.name), - obdStandard: __expectString(output.obdStandard), - pidRequestIntervalSeconds: __expectInt32(output.pidRequestIntervalSeconds), - requestMessageId: __expectInt32(output.requestMessageId), - useExtendedIds: __expectBoolean(output.useExtendedIds), - } as any; -}; +// de_ObdInterface omitted. /** * deserializeAws_json1_0ObdSignal */ const de_ObdSignal = (output: any, context: __SerdeContext): ObdSignal => { - return { - bitMaskLength: __expectInt32(output.bitMaskLength), - bitRightShift: __expectInt32(output.bitRightShift), - byteLength: __expectInt32(output.byteLength), - offset: __limitedParseDouble(output.offset), - pid: __expectInt32(output.pid), - pidResponseLength: __expectInt32(output.pidResponseLength), - scaling: __limitedParseDouble(output.scaling), - serviceMode: __expectInt32(output.serviceMode), - startByte: __expectInt32(output.startByte), - } as any; + return take(output, { + bitMaskLength: __expectInt32, + bitRightShift: __expectInt32, + byteLength: __expectInt32, + offset: __limitedParseDouble, + pid: __expectInt32, + pidResponseLength: __expectInt32, + scaling: __limitedParseDouble, + serviceMode: __expectInt32, + startByte: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_0PutLoggingOptionsResponse - */ -const de_PutLoggingOptionsResponse = (output: any, context: __SerdeContext): PutLoggingOptionsResponse => { - return {} as any; -}; +// de_PutLoggingOptionsResponse omitted. /** * deserializeAws_json1_0RegisterAccountResponse */ const de_RegisterAccountResponse = (output: any, context: __SerdeContext): RegisterAccountResponse => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - iamResources: output.iamResources != null ? de_IamResources(output.iamResources, context) : undefined, - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - registerAccountStatus: __expectString(output.registerAccountStatus), - timestreamResources: - output.timestreamResources != null ? de_TimestreamResources(output.timestreamResources, context) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + iamResources: _json, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + registerAccountStatus: __expectString, + timestreamResources: _json, + }) as any; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_0Sensor */ const de_Sensor = (output: any, context: __SerdeContext): Sensor => { - return { - allowedValues: output.allowedValues != null ? de_listOfStrings(output.allowedValues, context) : undefined, - dataType: __expectString(output.dataType), - description: __expectString(output.description), - fullyQualifiedName: __expectString(output.fullyQualifiedName), - max: __limitedParseDouble(output.max), - min: __limitedParseDouble(output.min), - unit: __expectString(output.unit), - } as any; + return take(output, { + allowedValues: _json, + dataType: __expectString, + description: __expectString, + fullyQualifiedName: __expectString, + max: __limitedParseDouble, + min: __limitedParseDouble, + unit: __expectString, + }) as any; }; /** @@ -6407,9 +5019,6 @@ const de_signalCatalogSummaries = (output: any, context: __SerdeContext): Signal const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SignalCatalogSummary(entry, context); }); return retVal; @@ -6419,31 +5028,25 @@ const de_signalCatalogSummaries = (output: any, context: __SerdeContext): Signal * deserializeAws_json1_0SignalCatalogSummary */ const de_SignalCatalogSummary = (output: any, context: __SerdeContext): SignalCatalogSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** * deserializeAws_json1_0SignalDecoder */ const de_SignalDecoder = (output: any, context: __SerdeContext): SignalDecoder => { - return { - canSignal: output.canSignal != null ? de_CanSignal(output.canSignal, context) : undefined, - fullyQualifiedName: __expectString(output.fullyQualifiedName), - interfaceId: __expectString(output.interfaceId), - obdSignal: output.obdSignal != null ? de_ObdSignal(output.obdSignal, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + canSignal: (_: any) => de_CanSignal(_, context), + fullyQualifiedName: __expectString, + interfaceId: __expectString, + obdSignal: (_: any) => de_ObdSignal(_, context), + type: __expectString, + }) as any; }; /** @@ -6453,312 +5056,62 @@ const de_SignalDecoders = (output: any, context: __SerdeContext): SignalDecoder[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SignalDecoder(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0SignalInformation - */ -const de_SignalInformation = (output: any, context: __SerdeContext): SignalInformation => { - return { - maxSampleCount: __expectLong(output.maxSampleCount), - minimumSamplingIntervalMs: __expectLong(output.minimumSamplingIntervalMs), - name: __expectString(output.name), - } as any; -}; +// de_SignalInformation omitted. -/** - * deserializeAws_json1_0SignalInformationList - */ -const de_SignalInformationList = (output: any, context: __SerdeContext): SignalInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SignalInformation(entry, context); - }); - return retVal; -}; +// de_SignalInformationList omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - quotaCode: __expectString(output.quotaCode), - retryAfterSeconds: __expectInt32(output.retryAfterSeconds), - serviceCode: __expectString(output.serviceCode), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0TimeBasedCollectionScheme - */ -const de_TimeBasedCollectionScheme = (output: any, context: __SerdeContext): TimeBasedCollectionScheme => { - return { - periodMs: __expectLong(output.periodMs), - } as any; -}; +// de_TimeBasedCollectionScheme omitted. -/** - * deserializeAws_json1_0TimestreamRegistrationResponse - */ -const de_TimestreamRegistrationResponse = (output: any, context: __SerdeContext): TimestreamRegistrationResponse => { - return { - errorMessage: __expectString(output.errorMessage), - registrationStatus: __expectString(output.registrationStatus), - timestreamDatabaseArn: __expectString(output.timestreamDatabaseArn), - timestreamDatabaseName: __expectString(output.timestreamDatabaseName), - timestreamTableArn: __expectString(output.timestreamTableArn), - timestreamTableName: __expectString(output.timestreamTableName), - } as any; -}; +// de_TimestreamRegistrationResponse omitted. -/** - * deserializeAws_json1_0TimestreamResources - */ -const de_TimestreamResources = (output: any, context: __SerdeContext): TimestreamResources => { - return { - timestreamDatabaseName: __expectString(output.timestreamDatabaseName), - timestreamTableName: __expectString(output.timestreamTableName), - } as any; -}; +// de_TimestreamResources omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_0UpdateCampaignResponse - */ -const de_UpdateCampaignResponse = (output: any, context: __SerdeContext): UpdateCampaignResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_UpdateCampaignResponse omitted. -/** - * deserializeAws_json1_0UpdateDecoderManifestResponse - */ -const de_UpdateDecoderManifestResponse = (output: any, context: __SerdeContext): UpdateDecoderManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_UpdateDecoderManifestResponse omitted. -/** - * deserializeAws_json1_0UpdateFleetResponse - */ -const de_UpdateFleetResponse = (output: any, context: __SerdeContext): UpdateFleetResponse => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - } as any; -}; +// de_UpdateFleetResponse omitted. -/** - * deserializeAws_json1_0UpdateModelManifestResponse - */ -const de_UpdateModelManifestResponse = (output: any, context: __SerdeContext): UpdateModelManifestResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_UpdateModelManifestResponse omitted. -/** - * deserializeAws_json1_0UpdateSignalCatalogResponse - */ -const de_UpdateSignalCatalogResponse = (output: any, context: __SerdeContext): UpdateSignalCatalogResponse => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - } as any; -}; +// de_UpdateSignalCatalogResponse omitted. -/** - * deserializeAws_json1_0UpdateVehicleError - */ -const de_UpdateVehicleError = (output: any, context: __SerdeContext): UpdateVehicleError => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_UpdateVehicleError omitted. -/** - * deserializeAws_json1_0updateVehicleErrors - */ -const de_updateVehicleErrors = (output: any, context: __SerdeContext): UpdateVehicleError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateVehicleError(entry, context); - }); - return retVal; -}; +// de_updateVehicleErrors omitted. -/** - * deserializeAws_json1_0UpdateVehicleResponse - */ -const de_UpdateVehicleResponse = (output: any, context: __SerdeContext): UpdateVehicleResponse => { - return { - arn: __expectString(output.arn), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_UpdateVehicleResponse omitted. -/** - * deserializeAws_json1_0UpdateVehicleResponseItem - */ -const de_UpdateVehicleResponseItem = (output: any, context: __SerdeContext): UpdateVehicleResponseItem => { - return { - arn: __expectString(output.arn), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_UpdateVehicleResponseItem omitted. -/** - * deserializeAws_json1_0updateVehicleResponseItems - */ -const de_updateVehicleResponseItems = (output: any, context: __SerdeContext): UpdateVehicleResponseItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateVehicleResponseItem(entry, context); - }); - return retVal; -}; +// de_updateVehicleResponseItems omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - fieldList: output.fieldList != null ? de_ValidationExceptionFieldList(output.fieldList, context) : undefined, - message: __expectString(output.message), - reason: __expectString(output.reason), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_0ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_json1_0ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_json1_0vehicles - */ -const de_vehicles = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_vehicles omitted. -/** - * deserializeAws_json1_0VehicleStatus - */ -const de_VehicleStatus = (output: any, context: __SerdeContext): VehicleStatus => { - return { - campaignName: __expectString(output.campaignName), - status: __expectString(output.status), - vehicleName: __expectString(output.vehicleName), - } as any; -}; +// de_VehicleStatus omitted. -/** - * deserializeAws_json1_0VehicleStatusList - */ -const de_VehicleStatusList = (output: any, context: __SerdeContext): VehicleStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VehicleStatus(entry, context); - }); - return retVal; -}; +// de_VehicleStatusList omitted. /** * deserializeAws_json1_0vehicleSummaries @@ -6767,9 +5120,6 @@ const de_vehicleSummaries = (output: any, context: __SerdeContext): VehicleSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VehicleSummary(entry, context); }); return retVal; @@ -6779,20 +5129,14 @@ const de_vehicleSummaries = (output: any, context: __SerdeContext): VehicleSumma * deserializeAws_json1_0VehicleSummary */ const de_VehicleSummary = (output: any, context: __SerdeContext): VehicleSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - decoderManifestArn: __expectString(output.decoderManifestArn), - lastModificationTime: - output.lastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModificationTime))) - : undefined, - modelManifestArn: __expectString(output.modelManifestArn), - vehicleName: __expectString(output.vehicleName), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + decoderManifestArn: __expectString, + lastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + modelManifestArn: __expectString, + vehicleName: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -6815,6 +5159,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-iotsecuretunneling/src/protocols/Aws_json1_1.ts b/clients/client-iotsecuretunneling/src/protocols/Aws_json1_1.ts index 4e3ce58c26c2..f6b3220b489c 100644 --- a/clients/client-iotsecuretunneling/src/protocols/Aws_json1_1.ts +++ b/clients/client-iotsecuretunneling/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -33,29 +34,23 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { IoTSecureTunnelingServiceException as __BaseException } from "../models/IoTSecureTunnelingServiceException"; import { CloseTunnelRequest, - CloseTunnelResponse, ConnectionState, DescribeTunnelRequest, DescribeTunnelResponse, DestinationConfig, LimitExceededException, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTunnelsRequest, ListTunnelsResponse, OpenTunnelRequest, - OpenTunnelResponse, ResourceNotFoundException, RotateTunnelAccessTokenRequest, - RotateTunnelAccessTokenResponse, Tag, TagResourceRequest, - TagResourceResponse, TimeoutConfig, Tunnel, TunnelSummary, UntagResourceRequest, - UntagResourceResponse, } from "../models/models_0"; /** @@ -67,7 +62,7 @@ export const se_CloseTunnelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CloseTunnel"); let body: any; - body = JSON.stringify(se_CloseTunnelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -80,7 +75,7 @@ export const se_DescribeTunnelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTunnel"); let body: any; - body = JSON.stringify(se_DescribeTunnelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -93,7 +88,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -106,7 +101,7 @@ export const se_ListTunnelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTunnels"); let body: any; - body = JSON.stringify(se_ListTunnelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -119,7 +114,7 @@ export const se_OpenTunnelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("OpenTunnel"); let body: any; - body = JSON.stringify(se_OpenTunnelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -132,7 +127,7 @@ export const se_RotateTunnelAccessTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RotateTunnelAccessToken"); let body: any; - body = JSON.stringify(se_RotateTunnelAccessTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -145,7 +140,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -158,7 +153,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -174,12 +169,12 @@ export const de_CloseTunnelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CloseTunnelResponse(data, context); + contents = _json(data); const response: CloseTunnelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -200,10 +195,9 @@ const de_CloseTunnelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -226,7 +220,7 @@ export const de_DescribeTunnelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -247,10 +241,9 @@ const de_DescribeTunnelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -268,12 +261,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -294,10 +287,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -320,7 +312,7 @@ export const de_ListTunnelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -336,10 +328,9 @@ const de_ListTunnelsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -356,12 +347,12 @@ export const de_OpenTunnelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_OpenTunnelResponse(data, context); + contents = _json(data); const response: OpenTunnelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -382,10 +373,9 @@ const de_OpenTunnelCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -403,12 +393,12 @@ export const de_RotateTunnelAccessTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RotateTunnelAccessTokenResponse(data, context); + contents = _json(data); const response: RotateTunnelAccessTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -429,10 +419,9 @@ const de_RotateTunnelAccessTokenCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -450,12 +439,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -476,10 +465,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -497,12 +485,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -523,10 +511,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -540,7 +527,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -556,7 +543,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -564,353 +551,118 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CloseTunnelRequest - */ -const se_CloseTunnelRequest = (input: CloseTunnelRequest, context: __SerdeContext): any => { - return { - ...(input.delete != null && { delete: input.delete }), - ...(input.tunnelId != null && { tunnelId: input.tunnelId }), - }; -}; +// se_CloseTunnelRequest omitted. -/** - * serializeAws_json1_1DescribeTunnelRequest - */ -const se_DescribeTunnelRequest = (input: DescribeTunnelRequest, context: __SerdeContext): any => { - return { - ...(input.tunnelId != null && { tunnelId: input.tunnelId }), - }; -}; +// se_DescribeTunnelRequest omitted. -/** - * serializeAws_json1_1DestinationConfig - */ -const se_DestinationConfig = (input: DestinationConfig, context: __SerdeContext): any => { - return { - ...(input.services != null && { services: se_ServiceList(input.services, context) }), - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; +// se_DestinationConfig omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListTunnelsRequest - */ -const se_ListTunnelsRequest = (input: ListTunnelsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; +// se_ListTunnelsRequest omitted. -/** - * serializeAws_json1_1OpenTunnelRequest - */ -const se_OpenTunnelRequest = (input: OpenTunnelRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.destinationConfig != null && { - destinationConfig: se_DestinationConfig(input.destinationConfig, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.timeoutConfig != null && { timeoutConfig: se_TimeoutConfig(input.timeoutConfig, context) }), - }; -}; +// se_OpenTunnelRequest omitted. -/** - * serializeAws_json1_1RotateTunnelAccessTokenRequest - */ -const se_RotateTunnelAccessTokenRequest = (input: RotateTunnelAccessTokenRequest, context: __SerdeContext): any => { - return { - ...(input.clientMode != null && { clientMode: input.clientMode }), - ...(input.destinationConfig != null && { - destinationConfig: se_DestinationConfig(input.destinationConfig, context), - }), - ...(input.tunnelId != null && { tunnelId: input.tunnelId }), - }; -}; +// se_RotateTunnelAccessTokenRequest omitted. -/** - * serializeAws_json1_1ServiceList - */ -const se_ServiceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ServiceList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1TimeoutConfig - */ -const se_TimeoutConfig = (input: TimeoutConfig, context: __SerdeContext): any => { - return { - ...(input.maxLifetimeTimeoutMinutes != null && { maxLifetimeTimeoutMinutes: input.maxLifetimeTimeoutMinutes }), - }; -}; +// se_TimeoutConfig omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1CloseTunnelResponse - */ -const de_CloseTunnelResponse = (output: any, context: __SerdeContext): CloseTunnelResponse => { - return {} as any; -}; +// de_CloseTunnelResponse omitted. /** * deserializeAws_json1_1ConnectionState */ const de_ConnectionState = (output: any, context: __SerdeContext): ConnectionState => { - return { - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeTunnelResponse */ const de_DescribeTunnelResponse = (output: any, context: __SerdeContext): DescribeTunnelResponse => { - return { - tunnel: output.tunnel != null ? de_Tunnel(output.tunnel, context) : undefined, - } as any; + return take(output, { + tunnel: (_: any) => de_Tunnel(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DestinationConfig - */ -const de_DestinationConfig = (output: any, context: __SerdeContext): DestinationConfig => { - return { - services: output.services != null ? de_ServiceList(output.services, context) : undefined, - thingName: __expectString(output.thingName), - } as any; -}; +// de_DestinationConfig omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListTunnelsResponse */ const de_ListTunnelsResponse = (output: any, context: __SerdeContext): ListTunnelsResponse => { - return { - nextToken: __expectString(output.nextToken), - tunnelSummaries: output.tunnelSummaries != null ? de_TunnelSummaryList(output.tunnelSummaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + tunnelSummaries: (_: any) => de_TunnelSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1OpenTunnelResponse - */ -const de_OpenTunnelResponse = (output: any, context: __SerdeContext): OpenTunnelResponse => { - return { - destinationAccessToken: __expectString(output.destinationAccessToken), - sourceAccessToken: __expectString(output.sourceAccessToken), - tunnelArn: __expectString(output.tunnelArn), - tunnelId: __expectString(output.tunnelId), - } as any; -}; +// de_OpenTunnelResponse omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1RotateTunnelAccessTokenResponse - */ -const de_RotateTunnelAccessTokenResponse = (output: any, context: __SerdeContext): RotateTunnelAccessTokenResponse => { - return { - destinationAccessToken: __expectString(output.destinationAccessToken), - sourceAccessToken: __expectString(output.sourceAccessToken), - tunnelArn: __expectString(output.tunnelArn), - } as any; -}; +// de_RotateTunnelAccessTokenResponse omitted. -/** - * deserializeAws_json1_1ServiceList - */ -const de_ServiceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ServiceList omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TimeoutConfig - */ -const de_TimeoutConfig = (output: any, context: __SerdeContext): TimeoutConfig => { - return { - maxLifetimeTimeoutMinutes: __expectInt32(output.maxLifetimeTimeoutMinutes), - } as any; -}; +// de_TimeoutConfig omitted. /** * deserializeAws_json1_1Tunnel */ const de_Tunnel = (output: any, context: __SerdeContext): Tunnel => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - destinationConfig: - output.destinationConfig != null ? de_DestinationConfig(output.destinationConfig, context) : undefined, - destinationConnectionState: - output.destinationConnectionState != null - ? de_ConnectionState(output.destinationConnectionState, context) - : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - sourceConnectionState: - output.sourceConnectionState != null ? de_ConnectionState(output.sourceConnectionState, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - timeoutConfig: output.timeoutConfig != null ? de_TimeoutConfig(output.timeoutConfig, context) : undefined, - tunnelArn: __expectString(output.tunnelArn), - tunnelId: __expectString(output.tunnelId), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + destinationConfig: _json, + destinationConnectionState: (_: any) => de_ConnectionState(_, context), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + sourceConnectionState: (_: any) => de_ConnectionState(_, context), + status: __expectString, + tags: _json, + timeoutConfig: _json, + tunnelArn: __expectString, + tunnelId: __expectString, + }) as any; }; /** * deserializeAws_json1_1TunnelSummary */ const de_TunnelSummary = (output: any, context: __SerdeContext): TunnelSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - status: __expectString(output.status), - tunnelArn: __expectString(output.tunnelArn), - tunnelId: __expectString(output.tunnelId), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + tunnelArn: __expectString, + tunnelId: __expectString, + }) as any; }; /** @@ -920,20 +672,12 @@ const de_TunnelSummaryList = (output: any, context: __SerdeContext): TunnelSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TunnelSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -955,6 +699,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts b/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts index b02c35191f87..cd4faca2ccac 100644 --- a/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts +++ b/clients/client-iotsitewise/src/protocols/Aws_restJson1.ts @@ -5,21 +5,22 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -195,60 +196,39 @@ import { Aggregates, AggregateType, Alarms, - AssetCompositeModel, - AssetErrorDetails, - AssetHierarchy, - AssetHierarchyInfo, AssetModelCompositeModel, AssetModelCompositeModelDefinition, AssetModelHierarchy, AssetModelHierarchyDefinition, AssetModelProperty, AssetModelPropertyDefinition, - AssetModelPropertySummary, - AssetModelStatus, AssetModelSummary, - AssetProperty, - AssetPropertySummary, AssetPropertyValue, - AssetRelationshipSummary, - AssetStatus, AssetSummary, AssociatedAssetsSummary, Attribute, BatchGetAssetPropertyAggregatesEntry, - BatchGetAssetPropertyAggregatesErrorEntry, BatchGetAssetPropertyAggregatesErrorInfo, BatchGetAssetPropertyAggregatesSkippedEntry, BatchGetAssetPropertyAggregatesSuccessEntry, BatchGetAssetPropertyValueEntry, - BatchGetAssetPropertyValueErrorEntry, BatchGetAssetPropertyValueErrorInfo, BatchGetAssetPropertyValueHistoryEntry, - BatchGetAssetPropertyValueHistoryErrorEntry, BatchGetAssetPropertyValueHistoryErrorInfo, BatchGetAssetPropertyValueHistorySkippedEntry, BatchGetAssetPropertyValueHistorySuccessEntry, BatchGetAssetPropertyValueSkippedEntry, BatchGetAssetPropertyValueSuccessEntry, - BatchPutAssetPropertyError, - BatchPutAssetPropertyErrorEntry, ColumnName, - CompositeModelProperty, - ConfigurationErrorDetails, - ConfigurationStatus, ConflictingOperationException, Csv, CustomerManagedS3Storage, DashboardSummary, - DetailedError, - ErrorDetails, ErrorReportLocation, ExpressionVariable, File, FileFormat, ForwardingConfig, - GatewayCapabilitySummary, GatewayPlatform, GatewaySummary, Greengrass, @@ -259,12 +239,10 @@ import { Identity, Image, ImageFile, - ImageLocation, InternalFailureException, InterpolatedAssetPropertyValue, InvalidRequestException, JobConfiguration, - JobSummary, LimitExceededException, LoggingOptions, Measurement, @@ -272,15 +250,11 @@ import { Metric, MetricProcessingConfig, MetricWindow, - MonitorErrorDetails, MultiLayerStorage, PortalResource, - PortalStatus, PortalSummary, ProjectResource, ProjectSummary, - Property, - PropertyNotification, PropertyType, PutAssetPropertyValueEntry, Quality, @@ -317,11 +291,13 @@ export const se_AssociateAssetsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{assetId}/associate"; resolvedPath = __resolvedPath(resolvedPath, input, "assetId", () => input.assetId!, "{assetId}", false); let body: any; - body = JSON.stringify({ - ...(input.childAssetId != null && { childAssetId: input.childAssetId }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.hierarchyId != null && { hierarchyId: input.hierarchyId }), - }); + body = JSON.stringify( + take(input, { + childAssetId: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + hierarchyId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -358,9 +334,11 @@ export const se_AssociateTimeSeriesToAssetPropertyCommand = async ( propertyId: [, __expectNonNull(input.propertyId!, `propertyId`)], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -395,10 +373,12 @@ export const se_BatchAssociateProjectAssetsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{projectId}/assets/associate"; resolvedPath = __resolvedPath(resolvedPath, input, "projectId", () => input.projectId!, "{projectId}", false); let body: any; - body = JSON.stringify({ - ...(input.assetIds != null && { assetIds: se_IDs(input.assetIds, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + assetIds: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -432,10 +412,12 @@ export const se_BatchDisassociateProjectAssetsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{projectId}/assets/disassociate"; resolvedPath = __resolvedPath(resolvedPath, input, "projectId", () => input.projectId!, "{projectId}", false); let body: any; - body = JSON.stringify({ - ...(input.assetIds != null && { assetIds: se_IDs(input.assetIds, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + assetIds: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -468,11 +450,13 @@ export const se_BatchGetAssetPropertyAggregatesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/properties/batch/aggregates"; let body: any; - body = JSON.stringify({ - ...(input.entries != null && { entries: se_BatchGetAssetPropertyAggregatesEntries(input.entries, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => se_BatchGetAssetPropertyAggregatesEntries(_, context), + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -505,10 +489,12 @@ export const se_BatchGetAssetPropertyValueCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/properties/batch/latest"; let body: any; - body = JSON.stringify({ - ...(input.entries != null && { entries: se_BatchGetAssetPropertyValueEntries(input.entries, context) }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => _json(_), + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -541,11 +527,13 @@ export const se_BatchGetAssetPropertyValueHistoryCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/properties/batch/history"; let body: any; - body = JSON.stringify({ - ...(input.entries != null && { entries: se_BatchGetAssetPropertyValueHistoryEntries(input.entries, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => se_BatchGetAssetPropertyValueHistoryEntries(_, context), + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -577,9 +565,11 @@ export const se_BatchPutAssetPropertyValueCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/properties"; let body: any; - body = JSON.stringify({ - ...(input.entries != null && { entries: se_PutAssetPropertyValueEntries(input.entries, context) }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => se_PutAssetPropertyValueEntries(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -611,17 +601,15 @@ export const se_CreateAccessPolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/access-policies"; let body: any; - body = JSON.stringify({ - ...(input.accessPolicyIdentity != null && { - accessPolicyIdentity: se_Identity(input.accessPolicyIdentity, context), - }), - ...(input.accessPolicyPermission != null && { accessPolicyPermission: input.accessPolicyPermission }), - ...(input.accessPolicyResource != null && { - accessPolicyResource: se_Resource(input.accessPolicyResource, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + accessPolicyIdentity: (_) => _json(_), + accessPolicyPermission: [], + accessPolicyResource: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -653,13 +641,15 @@ export const se_CreateAssetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets"; let body: any; - body = JSON.stringify({ - ...(input.assetDescription != null && { assetDescription: input.assetDescription }), - ...(input.assetModelId != null && { assetModelId: input.assetModelId }), - ...(input.assetName != null && { assetName: input.assetName }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + assetDescription: [], + assetModelId: [], + assetName: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -691,21 +681,17 @@ export const se_CreateAssetModelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/asset-models"; let body: any; - body = JSON.stringify({ - ...(input.assetModelCompositeModels != null && { - assetModelCompositeModels: se_AssetModelCompositeModelDefinitions(input.assetModelCompositeModels, context), - }), - ...(input.assetModelDescription != null && { assetModelDescription: input.assetModelDescription }), - ...(input.assetModelHierarchies != null && { - assetModelHierarchies: se_AssetModelHierarchyDefinitions(input.assetModelHierarchies, context), - }), - ...(input.assetModelName != null && { assetModelName: input.assetModelName }), - ...(input.assetModelProperties != null && { - assetModelProperties: se_AssetModelPropertyDefinitions(input.assetModelProperties, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + assetModelCompositeModels: (_) => _json(_), + assetModelDescription: [], + assetModelHierarchies: (_) => _json(_), + assetModelName: [], + assetModelProperties: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -737,15 +723,15 @@ export const se_CreateBulkImportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs"; let body: any; - body = JSON.stringify({ - ...(input.errorReportLocation != null && { - errorReportLocation: se_ErrorReportLocation(input.errorReportLocation, context), - }), - ...(input.files != null && { files: se_Files(input.files, context) }), - ...(input.jobConfiguration != null && { jobConfiguration: se_JobConfiguration(input.jobConfiguration, context) }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.jobRoleArn != null && { jobRoleArn: input.jobRoleArn }), - }); + body = JSON.stringify( + take(input, { + errorReportLocation: (_) => _json(_), + files: (_) => _json(_), + jobConfiguration: (_) => _json(_), + jobName: [], + jobRoleArn: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -777,14 +763,16 @@ export const se_CreateDashboardCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dashboards"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.dashboardDefinition != null && { dashboardDefinition: input.dashboardDefinition }), - ...(input.dashboardDescription != null && { dashboardDescription: input.dashboardDescription }), - ...(input.dashboardName != null && { dashboardName: input.dashboardName }), - ...(input.projectId != null && { projectId: input.projectId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + dashboardDefinition: [], + dashboardDescription: [], + dashboardName: [], + projectId: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -816,11 +804,13 @@ export const se_CreateGatewayCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/20200301/gateways"; let body: any; - body = JSON.stringify({ - ...(input.gatewayName != null && { gatewayName: input.gatewayName }), - ...(input.gatewayPlatform != null && { gatewayPlatform: se_GatewayPlatform(input.gatewayPlatform, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + gatewayName: [], + gatewayPlatform: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -852,18 +842,20 @@ export const se_CreatePortalCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/portals"; let body: any; - body = JSON.stringify({ - ...(input.alarms != null && { alarms: se_Alarms(input.alarms, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.notificationSenderEmail != null && { notificationSenderEmail: input.notificationSenderEmail }), - ...(input.portalAuthMode != null && { portalAuthMode: input.portalAuthMode }), - ...(input.portalContactEmail != null && { portalContactEmail: input.portalContactEmail }), - ...(input.portalDescription != null && { portalDescription: input.portalDescription }), - ...(input.portalLogoImageFile != null && { portalLogoImageFile: se_ImageFile(input.portalLogoImageFile, context) }), - ...(input.portalName != null && { portalName: input.portalName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + alarms: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + notificationSenderEmail: [], + portalAuthMode: [], + portalContactEmail: [], + portalDescription: [], + portalLogoImageFile: (_) => se_ImageFile(_, context), + portalName: [], + roleArn: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -895,13 +887,15 @@ export const se_CreateProjectCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.portalId != null && { portalId: input.portalId }), - ...(input.projectDescription != null && { projectDescription: input.projectDescription }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + portalId: [], + projectDescription: [], + projectName: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -1190,9 +1184,11 @@ export const se_DeleteTimeSeriesCommand = async ( propertyId: [, input.propertyId!], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1698,11 +1694,13 @@ export const se_DisassociateAssetsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{assetId}/disassociate"; resolvedPath = __resolvedPath(resolvedPath, input, "assetId", () => input.assetId!, "{assetId}", false); let body: any; - body = JSON.stringify({ - ...(input.childAssetId != null && { childAssetId: input.childAssetId }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.hierarchyId != null && { hierarchyId: input.hierarchyId }), - }); + body = JSON.stringify( + take(input, { + childAssetId: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + hierarchyId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1740,9 +1738,11 @@ export const se_DisassociateTimeSeriesFromAssetPropertyCommand = async ( propertyId: [, __expectNonNull(input.propertyId!, `propertyId`)], }); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2512,10 +2512,12 @@ export const se_PutDefaultEncryptionConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/account/encryption"; let body: any; - body = JSON.stringify({ - ...(input.encryptionType != null && { encryptionType: input.encryptionType }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - }); + body = JSON.stringify( + take(input, { + encryptionType: [], + kmsKeyId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2547,9 +2549,11 @@ export const se_PutLoggingOptionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/logging"; let body: any; - body = JSON.stringify({ - ...(input.loggingOptions != null && { loggingOptions: se_LoggingOptions(input.loggingOptions, context) }), - }); + body = JSON.stringify( + take(input, { + loggingOptions: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2582,14 +2586,14 @@ export const se_PutStorageConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration/account/storage"; let body: any; - body = JSON.stringify({ - ...(input.disassociatedDataStorage != null && { disassociatedDataStorage: input.disassociatedDataStorage }), - ...(input.multiLayerStorage != null && { - multiLayerStorage: se_MultiLayerStorage(input.multiLayerStorage, context), - }), - ...(input.retentionPeriod != null && { retentionPeriod: se_RetentionPeriod(input.retentionPeriod, context) }), - ...(input.storageType != null && { storageType: input.storageType }), - }); + body = JSON.stringify( + take(input, { + disassociatedDataStorage: [], + multiLayerStorage: (_) => _json(_), + retentionPeriod: (_) => _json(_), + storageType: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2624,9 +2628,11 @@ export const se_TagResourceCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2705,16 +2711,14 @@ export const se_UpdateAccessPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.accessPolicyIdentity != null && { - accessPolicyIdentity: se_Identity(input.accessPolicyIdentity, context), - }), - ...(input.accessPolicyPermission != null && { accessPolicyPermission: input.accessPolicyPermission }), - ...(input.accessPolicyResource != null && { - accessPolicyResource: se_Resource(input.accessPolicyResource, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + accessPolicyIdentity: (_) => _json(_), + accessPolicyPermission: [], + accessPolicyResource: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -2747,11 +2751,13 @@ export const se_UpdateAssetCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets/{assetId}"; resolvedPath = __resolvedPath(resolvedPath, input, "assetId", () => input.assetId!, "{assetId}", false); let body: any; - body = JSON.stringify({ - ...(input.assetDescription != null && { assetDescription: input.assetDescription }), - ...(input.assetName != null && { assetName: input.assetName }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + assetDescription: [], + assetName: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2792,20 +2798,16 @@ export const se_UpdateAssetModelCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.assetModelCompositeModels != null && { - assetModelCompositeModels: se_AssetModelCompositeModels(input.assetModelCompositeModels, context), - }), - ...(input.assetModelDescription != null && { assetModelDescription: input.assetModelDescription }), - ...(input.assetModelHierarchies != null && { - assetModelHierarchies: se_AssetModelHierarchies(input.assetModelHierarchies, context), - }), - ...(input.assetModelName != null && { assetModelName: input.assetModelName }), - ...(input.assetModelProperties != null && { - assetModelProperties: se_AssetModelProperties(input.assetModelProperties, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + assetModelCompositeModels: (_) => _json(_), + assetModelDescription: [], + assetModelHierarchies: (_) => _json(_), + assetModelName: [], + assetModelProperties: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2840,12 +2842,14 @@ export const se_UpdateAssetPropertyCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "assetId", () => input.assetId!, "{assetId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "propertyId", () => input.propertyId!, "{propertyId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyNotificationState != null && { propertyNotificationState: input.propertyNotificationState }), - ...(input.propertyUnit != null && { propertyUnit: input.propertyUnit }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + propertyAlias: [], + propertyNotificationState: [], + propertyUnit: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2879,12 +2883,14 @@ export const se_UpdateDashboardCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dashboards/{dashboardId}"; resolvedPath = __resolvedPath(resolvedPath, input, "dashboardId", () => input.dashboardId!, "{dashboardId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.dashboardDefinition != null && { dashboardDefinition: input.dashboardDefinition }), - ...(input.dashboardDescription != null && { dashboardDescription: input.dashboardDescription }), - ...(input.dashboardName != null && { dashboardName: input.dashboardName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + dashboardDefinition: [], + dashboardDescription: [], + dashboardName: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -2918,9 +2924,11 @@ export const se_UpdateGatewayCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/20200301/gateways/{gatewayId}"; resolvedPath = __resolvedPath(resolvedPath, input, "gatewayId", () => input.gatewayId!, "{gatewayId}", false); let body: any; - body = JSON.stringify({ - ...(input.gatewayName != null && { gatewayName: input.gatewayName }), - }); + body = JSON.stringify( + take(input, { + gatewayName: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2954,10 +2962,12 @@ export const se_UpdateGatewayCapabilityConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/20200301/gateways/{gatewayId}/capability"; resolvedPath = __resolvedPath(resolvedPath, input, "gatewayId", () => input.gatewayId!, "{gatewayId}", false); let body: any; - body = JSON.stringify({ - ...(input.capabilityConfiguration != null && { capabilityConfiguration: input.capabilityConfiguration }), - ...(input.capabilityNamespace != null && { capabilityNamespace: input.capabilityNamespace }), - }); + body = JSON.stringify( + take(input, { + capabilityConfiguration: [], + capabilityNamespace: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -2990,16 +3000,18 @@ export const se_UpdatePortalCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/portals/{portalId}"; resolvedPath = __resolvedPath(resolvedPath, input, "portalId", () => input.portalId!, "{portalId}", false); let body: any; - body = JSON.stringify({ - ...(input.alarms != null && { alarms: se_Alarms(input.alarms, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.notificationSenderEmail != null && { notificationSenderEmail: input.notificationSenderEmail }), - ...(input.portalContactEmail != null && { portalContactEmail: input.portalContactEmail }), - ...(input.portalDescription != null && { portalDescription: input.portalDescription }), - ...(input.portalLogoImage != null && { portalLogoImage: se_Image(input.portalLogoImage, context) }), - ...(input.portalName != null && { portalName: input.portalName }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + alarms: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + notificationSenderEmail: [], + portalContactEmail: [], + portalDescription: [], + portalLogoImage: (_) => se_Image(_, context), + portalName: [], + roleArn: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -3032,11 +3044,13 @@ export const se_UpdateProjectCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/projects/{projectId}"; resolvedPath = __resolvedPath(resolvedPath, input, "projectId", () => input.projectId!, "{projectId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.projectDescription != null && { projectDescription: input.projectDescription }), - ...(input.projectName != null && { projectName: input.projectName }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + projectDescription: [], + projectName: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "monitor." + resolvedHostname; @@ -3108,10 +3122,9 @@ const de_AssociateAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3164,10 +3177,9 @@ const de_AssociateTimeSeriesToAssetPropertyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3187,9 +3199,10 @@ export const de_BatchAssociateProjectAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchAssociateProjectAssetsErrors(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3223,10 +3236,9 @@ const de_BatchAssociateProjectAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3246,9 +3258,10 @@ export const de_BatchDisassociateProjectAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchDisassociateProjectAssetsErrors(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3279,10 +3292,9 @@ const de_BatchDisassociateProjectAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3302,18 +3314,13 @@ export const de_BatchGetAssetPropertyAggregatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchGetAssetPropertyAggregatesErrorEntries(data.errorEntries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.skippedEntries != null) { - contents.skippedEntries = de_BatchGetAssetPropertyAggregatesSkippedEntries(data.skippedEntries, context); - } - if (data.successEntries != null) { - contents.successEntries = de_BatchGetAssetPropertyAggregatesSuccessEntries(data.successEntries, context); - } + const doc = take(data, { + errorEntries: _json, + nextToken: __expectString, + skippedEntries: (_) => de_BatchGetAssetPropertyAggregatesSkippedEntries(_, context), + successEntries: (_) => de_BatchGetAssetPropertyAggregatesSuccessEntries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3344,10 +3351,9 @@ const de_BatchGetAssetPropertyAggregatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3367,18 +3373,13 @@ export const de_BatchGetAssetPropertyValueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchGetAssetPropertyValueErrorEntries(data.errorEntries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.skippedEntries != null) { - contents.skippedEntries = de_BatchGetAssetPropertyValueSkippedEntries(data.skippedEntries, context); - } - if (data.successEntries != null) { - contents.successEntries = de_BatchGetAssetPropertyValueSuccessEntries(data.successEntries, context); - } + const doc = take(data, { + errorEntries: _json, + nextToken: __expectString, + skippedEntries: (_) => de_BatchGetAssetPropertyValueSkippedEntries(_, context), + successEntries: (_) => de_BatchGetAssetPropertyValueSuccessEntries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3409,10 +3410,9 @@ const de_BatchGetAssetPropertyValueCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3432,18 +3432,13 @@ export const de_BatchGetAssetPropertyValueHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchGetAssetPropertyValueHistoryErrorEntries(data.errorEntries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.skippedEntries != null) { - contents.skippedEntries = de_BatchGetAssetPropertyValueHistorySkippedEntries(data.skippedEntries, context); - } - if (data.successEntries != null) { - contents.successEntries = de_BatchGetAssetPropertyValueHistorySuccessEntries(data.successEntries, context); - } + const doc = take(data, { + errorEntries: _json, + nextToken: __expectString, + skippedEntries: (_) => de_BatchGetAssetPropertyValueHistorySkippedEntries(_, context), + successEntries: (_) => de_BatchGetAssetPropertyValueHistorySuccessEntries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3474,10 +3469,9 @@ const de_BatchGetAssetPropertyValueHistoryCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3497,9 +3491,10 @@ export const de_BatchPutAssetPropertyValueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_BatchPutAssetPropertyErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3539,10 +3534,9 @@ const de_BatchPutAssetPropertyValueCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3562,12 +3556,11 @@ export const de_CreateAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessPolicyArn != null) { - contents.accessPolicyArn = __expectString(data.accessPolicyArn); - } - if (data.accessPolicyId != null) { - contents.accessPolicyId = __expectString(data.accessPolicyId); - } + const doc = take(data, { + accessPolicyArn: __expectString, + accessPolicyId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3601,10 +3594,9 @@ const de_CreateAccessPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3624,15 +3616,12 @@ export const de_CreateAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetArn != null) { - contents.assetArn = __expectString(data.assetArn); - } - if (data.assetId != null) { - contents.assetId = __expectString(data.assetId); - } - if (data.assetStatus != null) { - contents.assetStatus = de_AssetStatus(data.assetStatus, context); - } + const doc = take(data, { + assetArn: __expectString, + assetId: __expectString, + assetStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3672,10 +3661,9 @@ const de_CreateAssetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3695,15 +3683,12 @@ export const de_CreateAssetModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetModelArn != null) { - contents.assetModelArn = __expectString(data.assetModelArn); - } - if (data.assetModelId != null) { - contents.assetModelId = __expectString(data.assetModelId); - } - if (data.assetModelStatus != null) { - contents.assetModelStatus = de_AssetModelStatus(data.assetModelStatus, context); - } + const doc = take(data, { + assetModelArn: __expectString, + assetModelId: __expectString, + assetModelStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3743,10 +3728,9 @@ const de_CreateAssetModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3766,15 +3750,12 @@ export const de_CreateBulkImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobName != null) { - contents.jobName = __expectString(data.jobName); - } - if (data.jobStatus != null) { - contents.jobStatus = __expectString(data.jobStatus); - } + const doc = take(data, { + jobId: __expectString, + jobName: __expectString, + jobStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3814,10 +3795,9 @@ const de_CreateBulkImportJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3837,12 +3817,11 @@ export const de_CreateDashboardCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dashboardArn != null) { - contents.dashboardArn = __expectString(data.dashboardArn); - } - if (data.dashboardId != null) { - contents.dashboardId = __expectString(data.dashboardId); - } + const doc = take(data, { + dashboardArn: __expectString, + dashboardId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3876,10 +3855,9 @@ const de_CreateDashboardCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3899,12 +3877,11 @@ export const de_CreateGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gatewayArn != null) { - contents.gatewayArn = __expectString(data.gatewayArn); - } - if (data.gatewayId != null) { - contents.gatewayId = __expectString(data.gatewayId); - } + const doc = take(data, { + gatewayArn: __expectString, + gatewayId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3938,10 +3915,9 @@ const de_CreateGatewayCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3961,21 +3937,14 @@ export const de_CreatePortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.portalId != null) { - contents.portalId = __expectString(data.portalId); - } - if (data.portalStartUrl != null) { - contents.portalStartUrl = __expectString(data.portalStartUrl); - } - if (data.portalStatus != null) { - contents.portalStatus = de_PortalStatus(data.portalStatus, context); - } - if (data.ssoApplicationId != null) { - contents.ssoApplicationId = __expectString(data.ssoApplicationId); - } + const doc = take(data, { + portalArn: __expectString, + portalId: __expectString, + portalStartUrl: __expectString, + portalStatus: _json, + ssoApplicationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4009,10 +3978,9 @@ const de_CreatePortalCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4032,12 +4000,11 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.projectArn != null) { - contents.projectArn = __expectString(data.projectArn); - } - if (data.projectId != null) { - contents.projectId = __expectString(data.projectId); - } + const doc = take(data, { + projectArn: __expectString, + projectId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4071,10 +4038,9 @@ const de_CreateProjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4124,10 +4090,9 @@ const de_DeleteAccessPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4147,9 +4112,10 @@ export const de_DeleteAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetStatus != null) { - contents.assetStatus = de_AssetStatus(data.assetStatus, context); - } + const doc = take(data, { + assetStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4183,10 +4149,9 @@ const de_DeleteAssetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4206,9 +4171,10 @@ export const de_DeleteAssetModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetModelStatus != null) { - contents.assetModelStatus = de_AssetModelStatus(data.assetModelStatus, context); - } + const doc = take(data, { + assetModelStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4242,10 +4208,9 @@ const de_DeleteAssetModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4295,10 +4260,9 @@ const de_DeleteDashboardCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4348,10 +4312,9 @@ const de_DeleteGatewayCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4371,9 +4334,10 @@ export const de_DeletePortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalStatus != null) { - contents.portalStatus = de_PortalStatus(data.portalStatus, context); - } + const doc = take(data, { + portalStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4407,10 +4371,9 @@ const de_DeletePortalCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4460,10 +4423,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4516,10 +4478,9 @@ const de_DeleteTimeSeriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4539,31 +4500,16 @@ export const de_DescribeAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessPolicyArn != null) { - contents.accessPolicyArn = __expectString(data.accessPolicyArn); - } - if (data.accessPolicyCreationDate != null) { - contents.accessPolicyCreationDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.accessPolicyCreationDate)) - ); - } - if (data.accessPolicyId != null) { - contents.accessPolicyId = __expectString(data.accessPolicyId); - } - if (data.accessPolicyIdentity != null) { - contents.accessPolicyIdentity = de_Identity(data.accessPolicyIdentity, context); - } - if (data.accessPolicyLastUpdateDate != null) { - contents.accessPolicyLastUpdateDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.accessPolicyLastUpdateDate)) - ); - } - if (data.accessPolicyPermission != null) { - contents.accessPolicyPermission = __expectString(data.accessPolicyPermission); - } - if (data.accessPolicyResource != null) { - contents.accessPolicyResource = de_Resource(data.accessPolicyResource, context); - } + const doc = take(data, { + accessPolicyArn: __expectString, + accessPolicyCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + accessPolicyId: __expectString, + accessPolicyIdentity: _json, + accessPolicyLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + accessPolicyPermission: __expectString, + accessPolicyResource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4594,10 +4540,9 @@ const de_DescribeAccessPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4617,39 +4562,20 @@ export const de_DescribeAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetArn != null) { - contents.assetArn = __expectString(data.assetArn); - } - if (data.assetCompositeModels != null) { - contents.assetCompositeModels = de_AssetCompositeModels(data.assetCompositeModels, context); - } - if (data.assetCreationDate != null) { - contents.assetCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.assetCreationDate))); - } - if (data.assetDescription != null) { - contents.assetDescription = __expectString(data.assetDescription); - } - if (data.assetHierarchies != null) { - contents.assetHierarchies = de_AssetHierarchies(data.assetHierarchies, context); - } - if (data.assetId != null) { - contents.assetId = __expectString(data.assetId); - } - if (data.assetLastUpdateDate != null) { - contents.assetLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.assetLastUpdateDate))); - } - if (data.assetModelId != null) { - contents.assetModelId = __expectString(data.assetModelId); - } - if (data.assetName != null) { - contents.assetName = __expectString(data.assetName); - } - if (data.assetProperties != null) { - contents.assetProperties = de_AssetProperties(data.assetProperties, context); - } - if (data.assetStatus != null) { - contents.assetStatus = de_AssetStatus(data.assetStatus, context); - } + const doc = take(data, { + assetArn: __expectString, + assetCompositeModels: _json, + assetCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + assetDescription: __expectString, + assetHierarchies: _json, + assetId: __expectString, + assetLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + assetModelId: __expectString, + assetName: __expectString, + assetProperties: _json, + assetStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4680,10 +4606,9 @@ const de_DescribeAssetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4703,40 +4628,19 @@ export const de_DescribeAssetModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetModelArn != null) { - contents.assetModelArn = __expectString(data.assetModelArn); - } - if (data.assetModelCompositeModels != null) { - contents.assetModelCompositeModels = de_AssetModelCompositeModels(data.assetModelCompositeModels, context); - } - if (data.assetModelCreationDate != null) { - contents.assetModelCreationDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.assetModelCreationDate)) - ); - } - if (data.assetModelDescription != null) { - contents.assetModelDescription = __expectString(data.assetModelDescription); - } - if (data.assetModelHierarchies != null) { - contents.assetModelHierarchies = de_AssetModelHierarchies(data.assetModelHierarchies, context); - } - if (data.assetModelId != null) { - contents.assetModelId = __expectString(data.assetModelId); - } - if (data.assetModelLastUpdateDate != null) { - contents.assetModelLastUpdateDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.assetModelLastUpdateDate)) - ); - } - if (data.assetModelName != null) { - contents.assetModelName = __expectString(data.assetModelName); - } - if (data.assetModelProperties != null) { - contents.assetModelProperties = de_AssetModelProperties(data.assetModelProperties, context); - } - if (data.assetModelStatus != null) { - contents.assetModelStatus = de_AssetModelStatus(data.assetModelStatus, context); - } + const doc = take(data, { + assetModelArn: __expectString, + assetModelCompositeModels: _json, + assetModelCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + assetModelDescription: __expectString, + assetModelHierarchies: _json, + assetModelId: __expectString, + assetModelLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + assetModelName: __expectString, + assetModelProperties: _json, + assetModelStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4767,10 +4671,9 @@ const de_DescribeAssetModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4790,21 +4693,14 @@ export const de_DescribeAssetPropertyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetId != null) { - contents.assetId = __expectString(data.assetId); - } - if (data.assetModelId != null) { - contents.assetModelId = __expectString(data.assetModelId); - } - if (data.assetName != null) { - contents.assetName = __expectString(data.assetName); - } - if (data.assetProperty != null) { - contents.assetProperty = de_Property(data.assetProperty, context); - } - if (data.compositeModel != null) { - contents.compositeModel = de_CompositeModelProperty(data.compositeModel, context); - } + const doc = take(data, { + assetId: __expectString, + assetModelId: __expectString, + assetName: __expectString, + assetProperty: _json, + compositeModel: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4835,10 +4731,9 @@ const de_DescribeAssetPropertyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4858,33 +4753,18 @@ export const de_DescribeBulkImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorReportLocation != null) { - contents.errorReportLocation = de_ErrorReportLocation(data.errorReportLocation, context); - } - if (data.files != null) { - contents.files = de_Files(data.files, context); - } - if (data.jobConfiguration != null) { - contents.jobConfiguration = de_JobConfiguration(data.jobConfiguration, context); - } - if (data.jobCreationDate != null) { - contents.jobCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.jobCreationDate))); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobLastUpdateDate != null) { - contents.jobLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.jobLastUpdateDate))); - } - if (data.jobName != null) { - contents.jobName = __expectString(data.jobName); - } - if (data.jobRoleArn != null) { - contents.jobRoleArn = __expectString(data.jobRoleArn); - } - if (data.jobStatus != null) { - contents.jobStatus = __expectString(data.jobStatus); - } + const doc = take(data, { + errorReportLocation: _json, + files: _json, + jobConfiguration: _json, + jobCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + jobId: __expectString, + jobLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + jobName: __expectString, + jobRoleArn: __expectString, + jobStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4915,10 +4795,9 @@ const de_DescribeBulkImportJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4938,32 +4817,17 @@ export const de_DescribeDashboardCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dashboardArn != null) { - contents.dashboardArn = __expectString(data.dashboardArn); - } - if (data.dashboardCreationDate != null) { - contents.dashboardCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.dashboardCreationDate))); - } - if (data.dashboardDefinition != null) { - contents.dashboardDefinition = __expectString(data.dashboardDefinition); - } - if (data.dashboardDescription != null) { - contents.dashboardDescription = __expectString(data.dashboardDescription); - } - if (data.dashboardId != null) { - contents.dashboardId = __expectString(data.dashboardId); - } - if (data.dashboardLastUpdateDate != null) { - contents.dashboardLastUpdateDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.dashboardLastUpdateDate)) - ); - } - if (data.dashboardName != null) { - contents.dashboardName = __expectString(data.dashboardName); - } - if (data.projectId != null) { - contents.projectId = __expectString(data.projectId); - } + const doc = take(data, { + dashboardArn: __expectString, + dashboardCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dashboardDefinition: __expectString, + dashboardDescription: __expectString, + dashboardId: __expectString, + dashboardLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dashboardName: __expectString, + projectId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4994,10 +4858,9 @@ const de_DescribeDashboardCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5017,15 +4880,12 @@ export const de_DescribeDefaultEncryptionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationStatus != null) { - contents.configurationStatus = de_ConfigurationStatus(data.configurationStatus, context); - } - if (data.encryptionType != null) { - contents.encryptionType = __expectString(data.encryptionType); - } - if (data.kmsKeyArn != null) { - contents.kmsKeyArn = __expectString(data.kmsKeyArn); - } + const doc = take(data, { + configurationStatus: _json, + encryptionType: __expectString, + kmsKeyArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5053,10 +4913,9 @@ const de_DescribeDefaultEncryptionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5076,27 +4935,16 @@ export const de_DescribeGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDate != null) { - contents.creationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDate))); - } - if (data.gatewayArn != null) { - contents.gatewayArn = __expectString(data.gatewayArn); - } - if (data.gatewayCapabilitySummaries != null) { - contents.gatewayCapabilitySummaries = de_GatewayCapabilitySummaries(data.gatewayCapabilitySummaries, context); - } - if (data.gatewayId != null) { - contents.gatewayId = __expectString(data.gatewayId); - } - if (data.gatewayName != null) { - contents.gatewayName = __expectString(data.gatewayName); - } - if (data.gatewayPlatform != null) { - contents.gatewayPlatform = de_GatewayPlatform(data.gatewayPlatform, context); - } - if (data.lastUpdateDate != null) { - contents.lastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateDate))); - } + const doc = take(data, { + creationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + gatewayArn: __expectString, + gatewayCapabilitySummaries: _json, + gatewayId: __expectString, + gatewayName: __expectString, + gatewayPlatform: _json, + lastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -5127,10 +4975,9 @@ const de_DescribeGatewayCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5150,18 +4997,13 @@ export const de_DescribeGatewayCapabilityConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.capabilityConfiguration != null) { - contents.capabilityConfiguration = __expectString(data.capabilityConfiguration); - } - if (data.capabilityNamespace != null) { - contents.capabilityNamespace = __expectString(data.capabilityNamespace); - } - if (data.capabilitySyncStatus != null) { - contents.capabilitySyncStatus = __expectString(data.capabilitySyncStatus); - } - if (data.gatewayId != null) { - contents.gatewayId = __expectString(data.gatewayId); - } + const doc = take(data, { + capabilityConfiguration: __expectString, + capabilityNamespace: __expectString, + capabilitySyncStatus: __expectString, + gatewayId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5192,10 +5034,9 @@ const de_DescribeGatewayCapabilityConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5215,9 +5056,10 @@ export const de_DescribeLoggingOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.loggingOptions != null) { - contents.loggingOptions = de_LoggingOptions(data.loggingOptions, context); - } + const doc = take(data, { + loggingOptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5248,10 +5090,9 @@ const de_DescribeLoggingOptionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5271,51 +5112,24 @@ export const de_DescribePortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarms != null) { - contents.alarms = de_Alarms(data.alarms, context); - } - if (data.notificationSenderEmail != null) { - contents.notificationSenderEmail = __expectString(data.notificationSenderEmail); - } - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.portalAuthMode != null) { - contents.portalAuthMode = __expectString(data.portalAuthMode); - } - if (data.portalClientId != null) { - contents.portalClientId = __expectString(data.portalClientId); - } - if (data.portalContactEmail != null) { - contents.portalContactEmail = __expectString(data.portalContactEmail); - } - if (data.portalCreationDate != null) { - contents.portalCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.portalCreationDate))); - } - if (data.portalDescription != null) { - contents.portalDescription = __expectString(data.portalDescription); - } - if (data.portalId != null) { - contents.portalId = __expectString(data.portalId); - } - if (data.portalLastUpdateDate != null) { - contents.portalLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.portalLastUpdateDate))); - } - if (data.portalLogoImageLocation != null) { - contents.portalLogoImageLocation = de_ImageLocation(data.portalLogoImageLocation, context); - } - if (data.portalName != null) { - contents.portalName = __expectString(data.portalName); - } - if (data.portalStartUrl != null) { - contents.portalStartUrl = __expectString(data.portalStartUrl); - } - if (data.portalStatus != null) { - contents.portalStatus = de_PortalStatus(data.portalStatus, context); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + alarms: _json, + notificationSenderEmail: __expectString, + portalArn: __expectString, + portalAuthMode: __expectString, + portalClientId: __expectString, + portalContactEmail: __expectString, + portalCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + portalDescription: __expectString, + portalId: __expectString, + portalLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + portalLogoImageLocation: _json, + portalName: __expectString, + portalStartUrl: __expectString, + portalStatus: _json, + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5346,10 +5160,9 @@ const de_DescribePortalCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5369,27 +5182,16 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalId != null) { - contents.portalId = __expectString(data.portalId); - } - if (data.projectArn != null) { - contents.projectArn = __expectString(data.projectArn); - } - if (data.projectCreationDate != null) { - contents.projectCreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.projectCreationDate))); - } - if (data.projectDescription != null) { - contents.projectDescription = __expectString(data.projectDescription); - } - if (data.projectId != null) { - contents.projectId = __expectString(data.projectId); - } - if (data.projectLastUpdateDate != null) { - contents.projectLastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.projectLastUpdateDate))); - } - if (data.projectName != null) { - contents.projectName = __expectString(data.projectName); - } + const doc = take(data, { + portalId: __expectString, + projectArn: __expectString, + projectCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + projectDescription: __expectString, + projectId: __expectString, + projectLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + projectName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5420,10 +5222,9 @@ const de_DescribeProjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5443,24 +5244,15 @@ export const de_DescribeStorageConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationStatus != null) { - contents.configurationStatus = de_ConfigurationStatus(data.configurationStatus, context); - } - if (data.disassociatedDataStorage != null) { - contents.disassociatedDataStorage = __expectString(data.disassociatedDataStorage); - } - if (data.lastUpdateDate != null) { - contents.lastUpdateDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdateDate))); - } - if (data.multiLayerStorage != null) { - contents.multiLayerStorage = de_MultiLayerStorage(data.multiLayerStorage, context); - } - if (data.retentionPeriod != null) { - contents.retentionPeriod = de_RetentionPeriod(data.retentionPeriod, context); - } - if (data.storageType != null) { - contents.storageType = __expectString(data.storageType); - } + const doc = take(data, { + configurationStatus: _json, + disassociatedDataStorage: __expectString, + lastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + multiLayerStorage: _json, + retentionPeriod: _json, + storageType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5497,10 +5289,9 @@ const de_DescribeStorageConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5520,37 +5311,18 @@ export const de_DescribeTimeSeriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alias != null) { - contents.alias = __expectString(data.alias); - } - if (data.assetId != null) { - contents.assetId = __expectString(data.assetId); - } - if (data.dataType != null) { - contents.dataType = __expectString(data.dataType); - } - if (data.dataTypeSpec != null) { - contents.dataTypeSpec = __expectString(data.dataTypeSpec); - } - if (data.propertyId != null) { - contents.propertyId = __expectString(data.propertyId); - } - if (data.timeSeriesArn != null) { - contents.timeSeriesArn = __expectString(data.timeSeriesArn); - } - if (data.timeSeriesCreationDate != null) { - contents.timeSeriesCreationDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.timeSeriesCreationDate)) - ); - } - if (data.timeSeriesId != null) { - contents.timeSeriesId = __expectString(data.timeSeriesId); - } - if (data.timeSeriesLastUpdateDate != null) { - contents.timeSeriesLastUpdateDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.timeSeriesLastUpdateDate)) - ); - } + const doc = take(data, { + alias: __expectString, + assetId: __expectString, + dataType: __expectString, + dataTypeSpec: __expectString, + propertyId: __expectString, + timeSeriesArn: __expectString, + timeSeriesCreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + timeSeriesId: __expectString, + timeSeriesLastUpdateDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -5581,10 +5353,9 @@ const de_DescribeTimeSeriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5637,10 +5408,9 @@ const de_DisassociateAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5693,10 +5463,9 @@ const de_DisassociateTimeSeriesFromAssetPropertyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5716,12 +5485,11 @@ export const de_GetAssetPropertyAggregatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.aggregatedValues != null) { - contents.aggregatedValues = de_AggregatedValues(data.aggregatedValues, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + aggregatedValues: (_) => de_AggregatedValues(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5755,10 +5523,9 @@ const de_GetAssetPropertyAggregatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5778,9 +5545,10 @@ export const de_GetAssetPropertyValueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.propertyValue != null) { - contents.propertyValue = de_AssetPropertyValue(data.propertyValue, context); - } + const doc = take(data, { + propertyValue: (_) => de_AssetPropertyValue(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5814,10 +5582,9 @@ const de_GetAssetPropertyValueCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5837,12 +5604,11 @@ export const de_GetAssetPropertyValueHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetPropertyValueHistory != null) { - contents.assetPropertyValueHistory = de_AssetPropertyValueHistory(data.assetPropertyValueHistory, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetPropertyValueHistory: (_) => de_AssetPropertyValueHistory(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5876,10 +5642,9 @@ const de_GetAssetPropertyValueHistoryCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5899,15 +5664,11 @@ export const de_GetInterpolatedAssetPropertyValuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.interpolatedAssetPropertyValues != null) { - contents.interpolatedAssetPropertyValues = de_InterpolatedAssetPropertyValues( - data.interpolatedAssetPropertyValues, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + interpolatedAssetPropertyValues: (_) => de_InterpolatedAssetPropertyValues(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5941,10 +5702,9 @@ const de_GetInterpolatedAssetPropertyValuesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5964,12 +5724,11 @@ export const de_ListAccessPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessPolicySummaries != null) { - contents.accessPolicySummaries = de_AccessPolicySummaries(data.accessPolicySummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + accessPolicySummaries: (_) => de_AccessPolicySummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5997,10 +5756,9 @@ const de_ListAccessPoliciesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6020,12 +5778,11 @@ export const de_ListAssetModelPropertiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetModelPropertySummaries != null) { - contents.assetModelPropertySummaries = de_AssetModelPropertySummaries(data.assetModelPropertySummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetModelPropertySummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6056,10 +5813,9 @@ const de_ListAssetModelPropertiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6079,12 +5835,11 @@ export const de_ListAssetModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetModelSummaries != null) { - contents.assetModelSummaries = de_AssetModelSummaries(data.assetModelSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetModelSummaries: (_) => de_AssetModelSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6112,10 +5867,9 @@ const de_ListAssetModelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6135,12 +5889,11 @@ export const de_ListAssetPropertiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetPropertySummaries != null) { - contents.assetPropertySummaries = de_AssetPropertySummaries(data.assetPropertySummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetPropertySummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6171,10 +5924,9 @@ const de_ListAssetPropertiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6194,12 +5946,11 @@ export const de_ListAssetRelationshipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetRelationshipSummaries != null) { - contents.assetRelationshipSummaries = de_AssetRelationshipSummaries(data.assetRelationshipSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetRelationshipSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6230,10 +5981,9 @@ const de_ListAssetRelationshipsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6253,12 +6003,11 @@ export const de_ListAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetSummaries != null) { - contents.assetSummaries = de_AssetSummaries(data.assetSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetSummaries: (_) => de_AssetSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6289,10 +6038,9 @@ const de_ListAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6312,12 +6060,11 @@ export const de_ListAssociatedAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetSummaries != null) { - contents.assetSummaries = de_AssociatedAssetsSummaries(data.assetSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetSummaries: (_) => de_AssociatedAssetsSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6348,10 +6095,9 @@ const de_ListAssociatedAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6371,12 +6117,11 @@ export const de_ListBulkImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobSummaries != null) { - contents.jobSummaries = de_JobSummaries(data.jobSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6407,10 +6152,9 @@ const de_ListBulkImportJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6430,12 +6174,11 @@ export const de_ListDashboardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dashboardSummaries != null) { - contents.dashboardSummaries = de_DashboardSummaries(data.dashboardSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dashboardSummaries: (_) => de_DashboardSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6463,10 +6206,9 @@ const de_ListDashboardsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6486,12 +6228,11 @@ export const de_ListGatewaysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gatewaySummaries != null) { - contents.gatewaySummaries = de_GatewaySummaries(data.gatewaySummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + gatewaySummaries: (_) => de_GatewaySummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6519,10 +6260,9 @@ const de_ListGatewaysCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6542,12 +6282,11 @@ export const de_ListPortalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.portalSummaries != null) { - contents.portalSummaries = de_PortalSummaries(data.portalSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + portalSummaries: (_) => de_PortalSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6575,10 +6314,9 @@ const de_ListPortalsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6598,12 +6336,11 @@ export const de_ListProjectAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetIds != null) { - contents.assetIds = de_AssetIDs(data.assetIds, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assetIds: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6631,10 +6368,9 @@ const de_ListProjectAssetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6654,12 +6390,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.projectSummaries != null) { - contents.projectSummaries = de_ProjectSummaries(data.projectSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + projectSummaries: (_) => de_ProjectSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6687,10 +6422,9 @@ const de_ListProjectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6710,9 +6444,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6752,10 +6487,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6775,12 +6509,11 @@ export const de_ListTimeSeriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TimeSeriesSummaries != null) { - contents.TimeSeriesSummaries = de_TimeSeriesSummaries(data.TimeSeriesSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + TimeSeriesSummaries: (_) => de_TimeSeriesSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6811,10 +6544,9 @@ const de_ListTimeSeriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6834,15 +6566,12 @@ export const de_PutDefaultEncryptionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationStatus != null) { - contents.configurationStatus = de_ConfigurationStatus(data.configurationStatus, context); - } - if (data.encryptionType != null) { - contents.encryptionType = __expectString(data.encryptionType); - } - if (data.kmsKeyArn != null) { - contents.kmsKeyArn = __expectString(data.kmsKeyArn); - } + const doc = take(data, { + configurationStatus: _json, + encryptionType: __expectString, + kmsKeyArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6876,10 +6605,9 @@ const de_PutDefaultEncryptionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6932,10 +6660,9 @@ const de_PutLoggingOptionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6955,21 +6682,14 @@ export const de_PutStorageConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationStatus != null) { - contents.configurationStatus = de_ConfigurationStatus(data.configurationStatus, context); - } - if (data.disassociatedDataStorage != null) { - contents.disassociatedDataStorage = __expectString(data.disassociatedDataStorage); - } - if (data.multiLayerStorage != null) { - contents.multiLayerStorage = de_MultiLayerStorage(data.multiLayerStorage, context); - } - if (data.retentionPeriod != null) { - contents.retentionPeriod = de_RetentionPeriod(data.retentionPeriod, context); - } - if (data.storageType != null) { - contents.storageType = __expectString(data.storageType); - } + const doc = take(data, { + configurationStatus: _json, + disassociatedDataStorage: __expectString, + multiLayerStorage: _json, + retentionPeriod: _json, + storageType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7009,10 +6729,9 @@ const de_PutStorageConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7074,10 +6793,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7136,10 +6854,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7189,10 +6906,9 @@ const de_UpdateAccessPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7212,9 +6928,10 @@ export const de_UpdateAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetStatus != null) { - contents.assetStatus = de_AssetStatus(data.assetStatus, context); - } + const doc = take(data, { + assetStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7251,10 +6968,9 @@ const de_UpdateAssetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7274,9 +6990,10 @@ export const de_UpdateAssetModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assetModelStatus != null) { - contents.assetModelStatus = de_AssetModelStatus(data.assetModelStatus, context); - } + const doc = take(data, { + assetModelStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7316,10 +7033,9 @@ const de_UpdateAssetModelCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7372,10 +7088,9 @@ const de_UpdateAssetPropertyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7425,10 +7140,9 @@ const de_UpdateDashboardCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7481,10 +7195,9 @@ const de_UpdateGatewayCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7504,12 +7217,11 @@ export const de_UpdateGatewayCapabilityConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.capabilityNamespace != null) { - contents.capabilityNamespace = __expectString(data.capabilityNamespace); - } - if (data.capabilitySyncStatus != null) { - contents.capabilitySyncStatus = __expectString(data.capabilitySyncStatus); - } + const doc = take(data, { + capabilityNamespace: __expectString, + capabilitySyncStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7546,10 +7258,9 @@ const de_UpdateGatewayCapabilityConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7569,9 +7280,10 @@ export const de_UpdatePortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalStatus != null) { - contents.portalStatus = de_PortalStatus(data.portalStatus, context); - } + const doc = take(data, { + portalStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7605,10 +7317,9 @@ const de_UpdatePortalCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7658,16 +7369,15 @@ const de_UpdateProjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictingOperationExceptionRes */ @@ -7677,15 +7387,12 @@ const de_ConflictingOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + message: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictingOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7702,9 +7409,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7721,9 +7429,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7740,9 +7449,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7759,15 +7469,12 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + message: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7784,9 +7491,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7803,9 +7511,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7819,9 +7528,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7838,12 +7548,11 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceName != null) { - contents.resourceName = __expectString(data.resourceName); - } + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7860,9 +7569,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7870,181 +7580,43 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AggregateTypes - */ -const se_AggregateTypes = (input: (AggregateType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AggregateTypes omitted. -/** - * serializeAws_restJson1Alarms - */ -const se_Alarms = (input: Alarms, context: __SerdeContext): any => { - return { - ...(input.alarmRoleArn != null && { alarmRoleArn: input.alarmRoleArn }), - ...(input.notificationLambdaArn != null && { notificationLambdaArn: input.notificationLambdaArn }), - }; -}; +// se_Alarms omitted. -/** - * serializeAws_restJson1AssetModelCompositeModel - */ -const se_AssetModelCompositeModel = (input: AssetModelCompositeModel, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.properties != null && { properties: se_AssetModelProperties(input.properties, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_AssetModelCompositeModel omitted. -/** - * serializeAws_restJson1AssetModelCompositeModelDefinition - */ -const se_AssetModelCompositeModelDefinition = ( - input: AssetModelCompositeModelDefinition, - context: __SerdeContext -): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.properties != null && { properties: se_AssetModelPropertyDefinitions(input.properties, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_AssetModelCompositeModelDefinition omitted. -/** - * serializeAws_restJson1AssetModelCompositeModelDefinitions - */ -const se_AssetModelCompositeModelDefinitions = ( - input: AssetModelCompositeModelDefinition[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetModelCompositeModelDefinition(entry, context); - }); -}; +// se_AssetModelCompositeModelDefinitions omitted. -/** - * serializeAws_restJson1AssetModelCompositeModels - */ -const se_AssetModelCompositeModels = (input: AssetModelCompositeModel[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetModelCompositeModel(entry, context); - }); -}; +// se_AssetModelCompositeModels omitted. -/** - * serializeAws_restJson1AssetModelHierarchies - */ -const se_AssetModelHierarchies = (input: AssetModelHierarchy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetModelHierarchy(entry, context); - }); -}; +// se_AssetModelHierarchies omitted. -/** - * serializeAws_restJson1AssetModelHierarchy - */ -const se_AssetModelHierarchy = (input: AssetModelHierarchy, context: __SerdeContext): any => { - return { - ...(input.childAssetModelId != null && { childAssetModelId: input.childAssetModelId }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_AssetModelHierarchy omitted. -/** - * serializeAws_restJson1AssetModelHierarchyDefinition - */ -const se_AssetModelHierarchyDefinition = (input: AssetModelHierarchyDefinition, context: __SerdeContext): any => { - return { - ...(input.childAssetModelId != null && { childAssetModelId: input.childAssetModelId }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_AssetModelHierarchyDefinition omitted. -/** - * serializeAws_restJson1AssetModelHierarchyDefinitions - */ -const se_AssetModelHierarchyDefinitions = (input: AssetModelHierarchyDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetModelHierarchyDefinition(entry, context); - }); -}; +// se_AssetModelHierarchyDefinitions omitted. -/** - * serializeAws_restJson1AssetModelProperties - */ -const se_AssetModelProperties = (input: AssetModelProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetModelProperty(entry, context); - }); -}; +// se_AssetModelProperties omitted. -/** - * serializeAws_restJson1AssetModelProperty - */ -const se_AssetModelProperty = (input: AssetModelProperty, context: __SerdeContext): any => { - return { - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.dataTypeSpec != null && { dataTypeSpec: input.dataTypeSpec }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: se_PropertyType(input.type, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; +// se_AssetModelProperty omitted. -/** - * serializeAws_restJson1AssetModelPropertyDefinition - */ -const se_AssetModelPropertyDefinition = (input: AssetModelPropertyDefinition, context: __SerdeContext): any => { - return { - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.dataTypeSpec != null && { dataTypeSpec: input.dataTypeSpec }), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: se_PropertyType(input.type, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; +// se_AssetModelPropertyDefinition omitted. -/** - * serializeAws_restJson1AssetModelPropertyDefinitions - */ -const se_AssetModelPropertyDefinitions = (input: AssetModelPropertyDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssetModelPropertyDefinition(entry, context); - }); -}; +// se_AssetModelPropertyDefinitions omitted. /** * serializeAws_restJson1AssetPropertyValue */ const se_AssetPropertyValue = (input: AssetPropertyValue, context: __SerdeContext): any => { - return { - ...(input.quality != null && { quality: input.quality }), - ...(input.timestamp != null && { timestamp: se_TimeInNanos(input.timestamp, context) }), - ...(input.value != null && { value: se_Variant(input.value, context) }), - }; + return take(input, { + quality: [], + timestamp: _json, + value: (_) => se_Variant(_, context), + }); }; /** @@ -8058,14 +7630,7 @@ const se_AssetPropertyValues = (input: AssetPropertyValue[], context: __SerdeCon }); }; -/** - * serializeAws_restJson1Attribute - */ -const se_Attribute = (input: Attribute, context: __SerdeContext): any => { - return { - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - }; -}; +// se_Attribute omitted. /** * serializeAws_restJson1BatchGetAssetPropertyAggregatesEntries @@ -8088,45 +7653,23 @@ const se_BatchGetAssetPropertyAggregatesEntry = ( input: BatchGetAssetPropertyAggregatesEntry, context: __SerdeContext ): any => { - return { - ...(input.aggregateTypes != null && { aggregateTypes: se_AggregateTypes(input.aggregateTypes, context) }), - ...(input.assetId != null && { assetId: input.assetId }), - ...(input.endDate != null && { endDate: Math.round(input.endDate.getTime() / 1000) }), - ...(input.entryId != null && { entryId: input.entryId }), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - ...(input.qualities != null && { qualities: se_Qualities(input.qualities, context) }), - ...(input.resolution != null && { resolution: input.resolution }), - ...(input.startDate != null && { startDate: Math.round(input.startDate.getTime() / 1000) }), - ...(input.timeOrdering != null && { timeOrdering: input.timeOrdering }), - }; + return take(input, { + aggregateTypes: _json, + assetId: [], + endDate: (_) => Math.round(_.getTime() / 1000), + entryId: [], + propertyAlias: [], + propertyId: [], + qualities: _json, + resolution: [], + startDate: (_) => Math.round(_.getTime() / 1000), + timeOrdering: [], + }); }; -/** - * serializeAws_restJson1BatchGetAssetPropertyValueEntries - */ -const se_BatchGetAssetPropertyValueEntries = ( - input: BatchGetAssetPropertyValueEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BatchGetAssetPropertyValueEntry(entry, context); - }); -}; +// se_BatchGetAssetPropertyValueEntries omitted. -/** - * serializeAws_restJson1BatchGetAssetPropertyValueEntry - */ -const se_BatchGetAssetPropertyValueEntry = (input: BatchGetAssetPropertyValueEntry, context: __SerdeContext): any => { - return { - ...(input.assetId != null && { assetId: input.assetId }), - ...(input.entryId != null && { entryId: input.entryId }), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - }; -}; +// se_BatchGetAssetPropertyValueEntry omitted. /** * serializeAws_restJson1BatchGetAssetPropertyValueHistoryEntries @@ -8149,527 +7692,196 @@ const se_BatchGetAssetPropertyValueHistoryEntry = ( input: BatchGetAssetPropertyValueHistoryEntry, context: __SerdeContext ): any => { - return { - ...(input.assetId != null && { assetId: input.assetId }), - ...(input.endDate != null && { endDate: Math.round(input.endDate.getTime() / 1000) }), - ...(input.entryId != null && { entryId: input.entryId }), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - ...(input.qualities != null && { qualities: se_Qualities(input.qualities, context) }), - ...(input.startDate != null && { startDate: Math.round(input.startDate.getTime() / 1000) }), - ...(input.timeOrdering != null && { timeOrdering: input.timeOrdering }), - }; + return take(input, { + assetId: [], + endDate: (_) => Math.round(_.getTime() / 1000), + entryId: [], + propertyAlias: [], + propertyId: [], + qualities: _json, + startDate: (_) => Math.round(_.getTime() / 1000), + timeOrdering: [], + }); }; -/** - * serializeAws_restJson1ColumnNames - */ -const se_ColumnNames = (input: (ColumnName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ColumnNames omitted. -/** - * serializeAws_restJson1Csv - */ -const se_Csv = (input: Csv, context: __SerdeContext): any => { - return { - ...(input.columnNames != null && { columnNames: se_ColumnNames(input.columnNames, context) }), - }; -}; +// se_Csv omitted. -/** - * serializeAws_restJson1CustomerManagedS3Storage - */ -const se_CustomerManagedS3Storage = (input: CustomerManagedS3Storage, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.s3ResourceArn != null && { s3ResourceArn: input.s3ResourceArn }), - }; -}; +// se_CustomerManagedS3Storage omitted. + +// se_ErrorReportLocation omitted. + +// se_ExpressionVariable omitted. + +// se_ExpressionVariables omitted. + +// se_File omitted. + +// se_FileFormat omitted. + +// se_Files omitted. + +// se_ForwardingConfig omitted. + +// se_GatewayPlatform omitted. + +// se_Greengrass omitted. + +// se_GreengrassV2 omitted. + +// se_GroupIdentity omitted. + +// se_IAMRoleIdentity omitted. + +// se_IAMUserIdentity omitted. + +// se_Identity omitted. + +// se_IDs omitted. /** - * serializeAws_restJson1ErrorReportLocation + * serializeAws_restJson1Image */ -const se_ErrorReportLocation = (input: ErrorReportLocation, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.prefix != null && { prefix: input.prefix }), - }; +const se_Image = (input: Image, context: __SerdeContext): any => { + return take(input, { + file: (_) => se_ImageFile(_, context), + id: [], + }); }; /** - * serializeAws_restJson1ExpressionVariable + * serializeAws_restJson1ImageFile */ -const se_ExpressionVariable = (input: ExpressionVariable, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_VariableValue(input.value, context) }), - }; +const se_ImageFile = (input: ImageFile, context: __SerdeContext): any => { + return take(input, { + data: context.base64Encoder, + type: [], + }); }; +// se_JobConfiguration omitted. + +// se_LoggingOptions omitted. + +// se_Measurement omitted. + +// se_MeasurementProcessingConfig omitted. + +// se_Metric omitted. + +// se_MetricProcessingConfig omitted. + +// se_MetricWindow omitted. + +// se_MultiLayerStorage omitted. + +// se_PortalResource omitted. + +// se_ProjectResource omitted. + +// se_PropertyType omitted. + /** - * serializeAws_restJson1ExpressionVariables + * serializeAws_restJson1PutAssetPropertyValueEntries */ -const se_ExpressionVariables = (input: ExpressionVariable[], context: __SerdeContext): any => { +const se_PutAssetPropertyValueEntries = (input: PutAssetPropertyValueEntry[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ExpressionVariable(entry, context); + return se_PutAssetPropertyValueEntry(entry, context); }); }; /** - * serializeAws_restJson1File + * serializeAws_restJson1PutAssetPropertyValueEntry */ -const se_File = (input: File, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - ...(input.versionId != null && { versionId: input.versionId }), - }; +const se_PutAssetPropertyValueEntry = (input: PutAssetPropertyValueEntry, context: __SerdeContext): any => { + return take(input, { + assetId: [], + entryId: [], + propertyAlias: [], + propertyId: [], + propertyValues: (_) => se_AssetPropertyValues(_, context), + }); }; +// se_Qualities omitted. + +// se_Resource omitted. + +// se_RetentionPeriod omitted. + +// se_TagMap omitted. + +// se_TimeInNanos omitted. + +// se_Transform omitted. + +// se_TransformProcessingConfig omitted. + +// se_TumblingWindow omitted. + +// se_UserIdentity omitted. + +// se_VariableValue omitted. + /** - * serializeAws_restJson1FileFormat + * serializeAws_restJson1Variant */ -const se_FileFormat = (input: FileFormat, context: __SerdeContext): any => { - return { - ...(input.csv != null && { csv: se_Csv(input.csv, context) }), - }; +const se_Variant = (input: Variant, context: __SerdeContext): any => { + return take(input, { + booleanValue: [], + doubleValue: __serializeFloat, + integerValue: [], + stringValue: [], + }); }; /** - * serializeAws_restJson1Files + * deserializeAws_restJson1AccessPolicySummaries */ -const se_Files = (input: File[], context: __SerdeContext): any => { - return input +const de_AccessPolicySummaries = (output: any, context: __SerdeContext): AccessPolicySummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_File(entry, context); + .map((entry: any) => { + return de_AccessPolicySummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1ForwardingConfig + * deserializeAws_restJson1AccessPolicySummary */ -const se_ForwardingConfig = (input: ForwardingConfig, context: __SerdeContext): any => { - return { - ...(input.state != null && { state: input.state }), - }; +const de_AccessPolicySummary = (output: any, context: __SerdeContext): AccessPolicySummary => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + identity: _json, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + permission: __expectString, + resource: _json, + }) as any; }; /** - * serializeAws_restJson1GatewayPlatform + * deserializeAws_restJson1AggregatedValue */ -const se_GatewayPlatform = (input: GatewayPlatform, context: __SerdeContext): any => { - return { - ...(input.greengrass != null && { greengrass: se_Greengrass(input.greengrass, context) }), - ...(input.greengrassV2 != null && { greengrassV2: se_GreengrassV2(input.greengrassV2, context) }), - }; +const de_AggregatedValue = (output: any, context: __SerdeContext): AggregatedValue => { + return take(output, { + quality: __expectString, + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + value: (_: any) => de_Aggregates(_, context), + }) as any; }; /** - * serializeAws_restJson1Greengrass - */ -const se_Greengrass = (input: Greengrass, context: __SerdeContext): any => { - return { - ...(input.groupArn != null && { groupArn: input.groupArn }), - }; -}; - -/** - * serializeAws_restJson1GreengrassV2 - */ -const se_GreengrassV2 = (input: GreengrassV2, context: __SerdeContext): any => { - return { - ...(input.coreDeviceThingName != null && { coreDeviceThingName: input.coreDeviceThingName }), - }; -}; - -/** - * serializeAws_restJson1GroupIdentity - */ -const se_GroupIdentity = (input: GroupIdentity, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_restJson1IAMRoleIdentity - */ -const se_IAMRoleIdentity = (input: IAMRoleIdentity, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_restJson1IAMUserIdentity - */ -const se_IAMUserIdentity = (input: IAMUserIdentity, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; - -/** - * serializeAws_restJson1Identity - */ -const se_Identity = (input: Identity, context: __SerdeContext): any => { - return { - ...(input.group != null && { group: se_GroupIdentity(input.group, context) }), - ...(input.iamRole != null && { iamRole: se_IAMRoleIdentity(input.iamRole, context) }), - ...(input.iamUser != null && { iamUser: se_IAMUserIdentity(input.iamUser, context) }), - ...(input.user != null && { user: se_UserIdentity(input.user, context) }), - }; -}; - -/** - * serializeAws_restJson1IDs - */ -const se_IDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Image - */ -const se_Image = (input: Image, context: __SerdeContext): any => { - return { - ...(input.file != null && { file: se_ImageFile(input.file, context) }), - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_restJson1ImageFile - */ -const se_ImageFile = (input: ImageFile, context: __SerdeContext): any => { - return { - ...(input.data != null && { data: context.base64Encoder(input.data) }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_restJson1JobConfiguration - */ -const se_JobConfiguration = (input: JobConfiguration, context: __SerdeContext): any => { - return { - ...(input.fileFormat != null && { fileFormat: se_FileFormat(input.fileFormat, context) }), - }; -}; - -/** - * serializeAws_restJson1LoggingOptions - */ -const se_LoggingOptions = (input: LoggingOptions, context: __SerdeContext): any => { - return { - ...(input.level != null && { level: input.level }), - }; -}; - -/** - * serializeAws_restJson1Measurement - */ -const se_Measurement = (input: Measurement, context: __SerdeContext): any => { - return { - ...(input.processingConfig != null && { - processingConfig: se_MeasurementProcessingConfig(input.processingConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1MeasurementProcessingConfig - */ -const se_MeasurementProcessingConfig = (input: MeasurementProcessingConfig, context: __SerdeContext): any => { - return { - ...(input.forwardingConfig != null && { forwardingConfig: se_ForwardingConfig(input.forwardingConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1Metric - */ -const se_Metric = (input: Metric, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.processingConfig != null && { - processingConfig: se_MetricProcessingConfig(input.processingConfig, context), - }), - ...(input.variables != null && { variables: se_ExpressionVariables(input.variables, context) }), - ...(input.window != null && { window: se_MetricWindow(input.window, context) }), - }; -}; - -/** - * serializeAws_restJson1MetricProcessingConfig - */ -const se_MetricProcessingConfig = (input: MetricProcessingConfig, context: __SerdeContext): any => { - return { - ...(input.computeLocation != null && { computeLocation: input.computeLocation }), - }; -}; - -/** - * serializeAws_restJson1MetricWindow - */ -const se_MetricWindow = (input: MetricWindow, context: __SerdeContext): any => { - return { - ...(input.tumbling != null && { tumbling: se_TumblingWindow(input.tumbling, context) }), - }; -}; - -/** - * serializeAws_restJson1MultiLayerStorage - */ -const se_MultiLayerStorage = (input: MultiLayerStorage, context: __SerdeContext): any => { - return { - ...(input.customerManagedS3Storage != null && { - customerManagedS3Storage: se_CustomerManagedS3Storage(input.customerManagedS3Storage, context), - }), - }; -}; - -/** - * serializeAws_restJson1PortalResource - */ -const se_PortalResource = (input: PortalResource, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_restJson1ProjectResource - */ -const se_ProjectResource = (input: ProjectResource, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_restJson1PropertyType - */ -const se_PropertyType = (input: PropertyType, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: se_Attribute(input.attribute, context) }), - ...(input.measurement != null && { measurement: se_Measurement(input.measurement, context) }), - ...(input.metric != null && { metric: se_Metric(input.metric, context) }), - ...(input.transform != null && { transform: se_Transform(input.transform, context) }), - }; -}; - -/** - * serializeAws_restJson1PutAssetPropertyValueEntries - */ -const se_PutAssetPropertyValueEntries = (input: PutAssetPropertyValueEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PutAssetPropertyValueEntry(entry, context); - }); -}; - -/** - * serializeAws_restJson1PutAssetPropertyValueEntry - */ -const se_PutAssetPropertyValueEntry = (input: PutAssetPropertyValueEntry, context: __SerdeContext): any => { - return { - ...(input.assetId != null && { assetId: input.assetId }), - ...(input.entryId != null && { entryId: input.entryId }), - ...(input.propertyAlias != null && { propertyAlias: input.propertyAlias }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - ...(input.propertyValues != null && { propertyValues: se_AssetPropertyValues(input.propertyValues, context) }), - }; -}; - -/** - * serializeAws_restJson1Qualities - */ -const se_Qualities = (input: (Quality | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Resource - */ -const se_Resource = (input: Resource, context: __SerdeContext): any => { - return { - ...(input.portal != null && { portal: se_PortalResource(input.portal, context) }), - ...(input.project != null && { project: se_ProjectResource(input.project, context) }), - }; -}; - -/** - * serializeAws_restJson1RetentionPeriod - */ -const se_RetentionPeriod = (input: RetentionPeriod, context: __SerdeContext): any => { - return { - ...(input.numberOfDays != null && { numberOfDays: input.numberOfDays }), - ...(input.unlimited != null && { unlimited: input.unlimited }), - }; -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TimeInNanos - */ -const se_TimeInNanos = (input: TimeInNanos, context: __SerdeContext): any => { - return { - ...(input.offsetInNanos != null && { offsetInNanos: input.offsetInNanos }), - ...(input.timeInSeconds != null && { timeInSeconds: input.timeInSeconds }), - }; -}; - -/** - * serializeAws_restJson1Transform - */ -const se_Transform = (input: Transform, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.processingConfig != null && { - processingConfig: se_TransformProcessingConfig(input.processingConfig, context), - }), - ...(input.variables != null && { variables: se_ExpressionVariables(input.variables, context) }), - }; -}; - -/** - * serializeAws_restJson1TransformProcessingConfig - */ -const se_TransformProcessingConfig = (input: TransformProcessingConfig, context: __SerdeContext): any => { - return { - ...(input.computeLocation != null && { computeLocation: input.computeLocation }), - ...(input.forwardingConfig != null && { forwardingConfig: se_ForwardingConfig(input.forwardingConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1TumblingWindow - */ -const se_TumblingWindow = (input: TumblingWindow, context: __SerdeContext): any => { - return { - ...(input.interval != null && { interval: input.interval }), - ...(input.offset != null && { offset: input.offset }), - }; -}; - -/** - * serializeAws_restJson1UserIdentity - */ -const se_UserIdentity = (input: UserIdentity, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; - -/** - * serializeAws_restJson1VariableValue - */ -const se_VariableValue = (input: VariableValue, context: __SerdeContext): any => { - return { - ...(input.hierarchyId != null && { hierarchyId: input.hierarchyId }), - ...(input.propertyId != null && { propertyId: input.propertyId }), - }; -}; - -/** - * serializeAws_restJson1Variant - */ -const se_Variant = (input: Variant, context: __SerdeContext): any => { - return { - ...(input.booleanValue != null && { booleanValue: input.booleanValue }), - ...(input.doubleValue != null && { doubleValue: __serializeFloat(input.doubleValue) }), - ...(input.integerValue != null && { integerValue: input.integerValue }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; -}; - -/** - * deserializeAws_restJson1AccessPolicySummaries - */ -const de_AccessPolicySummaries = (output: any, context: __SerdeContext): AccessPolicySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessPolicySummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AccessPolicySummary - */ -const de_AccessPolicySummary = (output: any, context: __SerdeContext): AccessPolicySummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - id: __expectString(output.id), - identity: output.identity != null ? de_Identity(output.identity, context) : undefined, - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - permission: __expectString(output.permission), - resource: output.resource != null ? de_Resource(output.resource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AggregatedValue - */ -const de_AggregatedValue = (output: any, context: __SerdeContext): AggregatedValue => { - return { - quality: __expectString(output.quality), - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - value: output.value != null ? de_Aggregates(output.value, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AggregatedValues + * deserializeAws_restJson1AggregatedValues */ const de_AggregatedValues = (output: any, context: __SerdeContext): AggregatedValue[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AggregatedValue(entry, context); }); return retVal; @@ -8679,237 +7891,49 @@ const de_AggregatedValues = (output: any, context: __SerdeContext): AggregatedVa * deserializeAws_restJson1Aggregates */ const de_Aggregates = (output: any, context: __SerdeContext): Aggregates => { - return { - average: __limitedParseDouble(output.average), - count: __limitedParseDouble(output.count), - maximum: __limitedParseDouble(output.maximum), - minimum: __limitedParseDouble(output.minimum), - standardDeviation: __limitedParseDouble(output.standardDeviation), - sum: __limitedParseDouble(output.sum), - } as any; + return take(output, { + average: __limitedParseDouble, + count: __limitedParseDouble, + maximum: __limitedParseDouble, + minimum: __limitedParseDouble, + standardDeviation: __limitedParseDouble, + sum: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1Alarms - */ -const de_Alarms = (output: any, context: __SerdeContext): Alarms => { - return { - alarmRoleArn: __expectString(output.alarmRoleArn), - notificationLambdaArn: __expectString(output.notificationLambdaArn), - } as any; -}; +// de_Alarms omitted. -/** - * deserializeAws_restJson1AssetCompositeModel - */ -const de_AssetCompositeModel = (output: any, context: __SerdeContext): AssetCompositeModel => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - properties: output.properties != null ? de_AssetProperties(output.properties, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_AssetCompositeModel omitted. -/** - * deserializeAws_restJson1AssetCompositeModels - */ -const de_AssetCompositeModels = (output: any, context: __SerdeContext): AssetCompositeModel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetCompositeModel(entry, context); - }); - return retVal; -}; +// de_AssetCompositeModels omitted. -/** - * deserializeAws_restJson1AssetErrorDetails - */ -const de_AssetErrorDetails = (output: any, context: __SerdeContext): AssetErrorDetails => { - return { - assetId: __expectString(output.assetId), - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_AssetErrorDetails omitted. -/** - * deserializeAws_restJson1AssetHierarchies - */ -const de_AssetHierarchies = (output: any, context: __SerdeContext): AssetHierarchy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetHierarchy(entry, context); - }); - return retVal; -}; +// de_AssetHierarchies omitted. -/** - * deserializeAws_restJson1AssetHierarchy - */ -const de_AssetHierarchy = (output: any, context: __SerdeContext): AssetHierarchy => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_AssetHierarchy omitted. -/** - * deserializeAws_restJson1AssetHierarchyInfo - */ -const de_AssetHierarchyInfo = (output: any, context: __SerdeContext): AssetHierarchyInfo => { - return { - childAssetId: __expectString(output.childAssetId), - parentAssetId: __expectString(output.parentAssetId), - } as any; -}; +// de_AssetHierarchyInfo omitted. -/** - * deserializeAws_restJson1AssetIDs - */ -const de_AssetIDs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AssetIDs omitted. -/** - * deserializeAws_restJson1AssetModelCompositeModel - */ -const de_AssetModelCompositeModel = (output: any, context: __SerdeContext): AssetModelCompositeModel => { - return { - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - properties: output.properties != null ? de_AssetModelProperties(output.properties, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_AssetModelCompositeModel omitted. -/** - * deserializeAws_restJson1AssetModelCompositeModels - */ -const de_AssetModelCompositeModels = (output: any, context: __SerdeContext): AssetModelCompositeModel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetModelCompositeModel(entry, context); - }); - return retVal; -}; +// de_AssetModelCompositeModels omitted. -/** - * deserializeAws_restJson1AssetModelHierarchies - */ -const de_AssetModelHierarchies = (output: any, context: __SerdeContext): AssetModelHierarchy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetModelHierarchy(entry, context); - }); - return retVal; -}; +// de_AssetModelHierarchies omitted. -/** - * deserializeAws_restJson1AssetModelHierarchy - */ -const de_AssetModelHierarchy = (output: any, context: __SerdeContext): AssetModelHierarchy => { - return { - childAssetModelId: __expectString(output.childAssetModelId), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_AssetModelHierarchy omitted. -/** - * deserializeAws_restJson1AssetModelProperties - */ -const de_AssetModelProperties = (output: any, context: __SerdeContext): AssetModelProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetModelProperty(entry, context); - }); - return retVal; -}; +// de_AssetModelProperties omitted. -/** - * deserializeAws_restJson1AssetModelProperty - */ -const de_AssetModelProperty = (output: any, context: __SerdeContext): AssetModelProperty => { - return { - dataType: __expectString(output.dataType), - dataTypeSpec: __expectString(output.dataTypeSpec), - id: __expectString(output.id), - name: __expectString(output.name), - type: output.type != null ? de_PropertyType(output.type, context) : undefined, - unit: __expectString(output.unit), - } as any; -}; +// de_AssetModelProperty omitted. -/** - * deserializeAws_restJson1AssetModelPropertySummaries - */ -const de_AssetModelPropertySummaries = (output: any, context: __SerdeContext): AssetModelPropertySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetModelPropertySummary(entry, context); - }); - return retVal; -}; +// de_AssetModelPropertySummaries omitted. -/** - * deserializeAws_restJson1AssetModelPropertySummary - */ -const de_AssetModelPropertySummary = (output: any, context: __SerdeContext): AssetModelPropertySummary => { - return { - assetModelCompositeModelId: __expectString(output.assetModelCompositeModelId), - dataType: __expectString(output.dataType), - dataTypeSpec: __expectString(output.dataTypeSpec), - id: __expectString(output.id), - name: __expectString(output.name), - type: output.type != null ? de_PropertyType(output.type, context) : undefined, - unit: __expectString(output.unit), - } as any; -}; +// de_AssetModelPropertySummary omitted. -/** - * deserializeAws_restJson1AssetModelStatus - */ -const de_AssetModelStatus = (output: any, context: __SerdeContext): AssetModelStatus => { - return { - error: output.error != null ? de_ErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_AssetModelStatus omitted. /** * deserializeAws_restJson1AssetModelSummaries @@ -8918,9 +7942,6 @@ const de_AssetModelSummaries = (output: any, context: __SerdeContext): AssetMode const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssetModelSummary(entry, context); }); return retVal; @@ -8930,90 +7951,34 @@ const de_AssetModelSummaries = (output: any, context: __SerdeContext): AssetMode * deserializeAws_restJson1AssetModelSummary */ const de_AssetModelSummary = (output: any, context: __SerdeContext): AssetModelSummary => { - return { - arn: __expectString(output.arn), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - name: __expectString(output.name), - status: output.status != null ? de_AssetModelStatus(output.status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssetProperties - */ -const de_AssetProperties = (output: any, context: __SerdeContext): AssetProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetProperty(entry, context); - }); - return retVal; + return take(output, { + arn: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: _json, + }) as any; }; -/** - * deserializeAws_restJson1AssetProperty - */ -const de_AssetProperty = (output: any, context: __SerdeContext): AssetProperty => { - return { - alias: __expectString(output.alias), - dataType: __expectString(output.dataType), - dataTypeSpec: __expectString(output.dataTypeSpec), - id: __expectString(output.id), - name: __expectString(output.name), - notification: output.notification != null ? de_PropertyNotification(output.notification, context) : undefined, - unit: __expectString(output.unit), - } as any; -}; +// de_AssetProperties omitted. -/** - * deserializeAws_restJson1AssetPropertySummaries - */ -const de_AssetPropertySummaries = (output: any, context: __SerdeContext): AssetPropertySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetPropertySummary(entry, context); - }); - return retVal; -}; +// de_AssetProperty omitted. -/** - * deserializeAws_restJson1AssetPropertySummary - */ -const de_AssetPropertySummary = (output: any, context: __SerdeContext): AssetPropertySummary => { - return { - alias: __expectString(output.alias), - assetCompositeModelId: __expectString(output.assetCompositeModelId), - id: __expectString(output.id), - notification: output.notification != null ? de_PropertyNotification(output.notification, context) : undefined, - unit: __expectString(output.unit), - } as any; -}; +// de_AssetPropertySummaries omitted. + +// de_AssetPropertySummary omitted. /** * deserializeAws_restJson1AssetPropertyValue */ const de_AssetPropertyValue = (output: any, context: __SerdeContext): AssetPropertyValue => { - return { - quality: __expectString(output.quality), - timestamp: output.timestamp != null ? de_TimeInNanos(output.timestamp, context) : undefined, - value: output.value != null ? de_Variant(output.value, context) : undefined, - } as any; + return take(output, { + quality: __expectString, + timestamp: _json, + value: (_: any) => de_Variant(_, context), + }) as any; }; /** @@ -9023,48 +7988,16 @@ const de_AssetPropertyValueHistory = (output: any, context: __SerdeContext): Ass const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssetPropertyValue(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AssetRelationshipSummaries - */ -const de_AssetRelationshipSummaries = (output: any, context: __SerdeContext): AssetRelationshipSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetRelationshipSummary(entry, context); - }); - return retVal; -}; +// de_AssetRelationshipSummaries omitted. -/** - * deserializeAws_restJson1AssetRelationshipSummary - */ -const de_AssetRelationshipSummary = (output: any, context: __SerdeContext): AssetRelationshipSummary => { - return { - hierarchyInfo: output.hierarchyInfo != null ? de_AssetHierarchyInfo(output.hierarchyInfo, context) : undefined, - relationshipType: __expectString(output.relationshipType), - } as any; -}; +// de_AssetRelationshipSummary omitted. -/** - * deserializeAws_restJson1AssetStatus - */ -const de_AssetStatus = (output: any, context: __SerdeContext): AssetStatus => { - return { - error: output.error != null ? de_ErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_AssetStatus omitted. /** * deserializeAws_restJson1AssetSummaries @@ -9073,9 +8006,6 @@ const de_AssetSummaries = (output: any, context: __SerdeContext): AssetSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssetSummary(entry, context); }); return retVal; @@ -9085,23 +8015,17 @@ const de_AssetSummaries = (output: any, context: __SerdeContext): AssetSummary[] * deserializeAws_restJson1AssetSummary */ const de_AssetSummary = (output: any, context: __SerdeContext): AssetSummary => { - return { - arn: __expectString(output.arn), - assetModelId: __expectString(output.assetModelId), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - hierarchies: output.hierarchies != null ? de_AssetHierarchies(output.hierarchies, context) : undefined, - id: __expectString(output.id), - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - name: __expectString(output.name), - status: output.status != null ? de_AssetStatus(output.status, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + assetModelId: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + hierarchies: _json, + id: __expectString, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: _json, + }) as any; }; /** @@ -9111,108 +8035,38 @@ const de_AssociatedAssetsSummaries = (output: any, context: __SerdeContext): Ass const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssociatedAssetsSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1AssociatedAssetsSummary - */ -const de_AssociatedAssetsSummary = (output: any, context: __SerdeContext): AssociatedAssetsSummary => { - return { - arn: __expectString(output.arn), - assetModelId: __expectString(output.assetModelId), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - hierarchies: output.hierarchies != null ? de_AssetHierarchies(output.hierarchies, context) : undefined, - id: __expectString(output.id), - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - name: __expectString(output.name), - status: output.status != null ? de_AssetStatus(output.status, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Attribute - */ -const de_Attribute = (output: any, context: __SerdeContext): Attribute => { - return { - defaultValue: __expectString(output.defaultValue), - } as any; -}; - -/** - * deserializeAws_restJson1BatchAssociateProjectAssetsErrors - */ -const de_BatchAssociateProjectAssetsErrors = (output: any, context: __SerdeContext): AssetErrorDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetErrorDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchDisassociateProjectAssetsErrors - */ -const de_BatchDisassociateProjectAssetsErrors = (output: any, context: __SerdeContext): AssetErrorDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssetErrorDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntries - */ -const de_BatchGetAssetPropertyAggregatesErrorEntries = ( - output: any, - context: __SerdeContext -): BatchGetAssetPropertyAggregatesErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetAssetPropertyAggregatesErrorEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorEntry + * deserializeAws_restJson1AssociatedAssetsSummary */ -const de_BatchGetAssetPropertyAggregatesErrorEntry = ( - output: any, - context: __SerdeContext -): BatchGetAssetPropertyAggregatesErrorEntry => { - return { - entryId: __expectString(output.entryId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; +const de_AssociatedAssetsSummary = (output: any, context: __SerdeContext): AssociatedAssetsSummary => { + return take(output, { + arn: __expectString, + assetModelId: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + hierarchies: _json, + id: __expectString, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: _json, + }) as any; }; +// de_Attribute omitted. + +// de_BatchAssociateProjectAssetsErrors omitted. + +// de_BatchDisassociateProjectAssetsErrors omitted. + +// de_BatchGetAssetPropertyAggregatesErrorEntries omitted. + +// de_BatchGetAssetPropertyAggregatesErrorEntry omitted. + /** * deserializeAws_restJson1BatchGetAssetPropertyAggregatesErrorInfo */ @@ -9220,13 +8074,10 @@ const de_BatchGetAssetPropertyAggregatesErrorInfo = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyAggregatesErrorInfo => { - return { - errorCode: __expectString(output.errorCode), - errorTimestamp: - output.errorTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.errorTimestamp))) - : undefined, - } as any; + return take(output, { + errorCode: __expectString, + errorTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -9239,9 +8090,6 @@ const de_BatchGetAssetPropertyAggregatesSkippedEntries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetAssetPropertyAggregatesSkippedEntry(entry, context); }); return retVal; @@ -9254,12 +8102,11 @@ const de_BatchGetAssetPropertyAggregatesSkippedEntry = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyAggregatesSkippedEntry => { - return { - completionStatus: __expectString(output.completionStatus), - entryId: __expectString(output.entryId), - errorInfo: - output.errorInfo != null ? de_BatchGetAssetPropertyAggregatesErrorInfo(output.errorInfo, context) : undefined, - } as any; + return take(output, { + completionStatus: __expectString, + entryId: __expectString, + errorInfo: (_: any) => de_BatchGetAssetPropertyAggregatesErrorInfo(_, context), + }) as any; }; /** @@ -9272,9 +8119,6 @@ const de_BatchGetAssetPropertyAggregatesSuccessEntries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetAssetPropertyAggregatesSuccessEntry(entry, context); }); return retVal; @@ -9287,44 +8131,15 @@ const de_BatchGetAssetPropertyAggregatesSuccessEntry = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyAggregatesSuccessEntry => { - return { - aggregatedValues: - output.aggregatedValues != null ? de_AggregatedValues(output.aggregatedValues, context) : undefined, - entryId: __expectString(output.entryId), - } as any; + return take(output, { + aggregatedValues: (_: any) => de_AggregatedValues(_, context), + entryId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntries - */ -const de_BatchGetAssetPropertyValueErrorEntries = ( - output: any, - context: __SerdeContext -): BatchGetAssetPropertyValueErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetAssetPropertyValueErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchGetAssetPropertyValueErrorEntries omitted. -/** - * deserializeAws_restJson1BatchGetAssetPropertyValueErrorEntry - */ -const de_BatchGetAssetPropertyValueErrorEntry = ( - output: any, - context: __SerdeContext -): BatchGetAssetPropertyValueErrorEntry => { - return { - entryId: __expectString(output.entryId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_BatchGetAssetPropertyValueErrorEntry omitted. /** * deserializeAws_restJson1BatchGetAssetPropertyValueErrorInfo @@ -9333,46 +8148,15 @@ const de_BatchGetAssetPropertyValueErrorInfo = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyValueErrorInfo => { - return { - errorCode: __expectString(output.errorCode), - errorTimestamp: - output.errorTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.errorTimestamp))) - : undefined, - } as any; + return take(output, { + errorCode: __expectString, + errorTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntries - */ -const de_BatchGetAssetPropertyValueHistoryErrorEntries = ( - output: any, - context: __SerdeContext -): BatchGetAssetPropertyValueHistoryErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetAssetPropertyValueHistoryErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchGetAssetPropertyValueHistoryErrorEntries omitted. -/** - * deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorEntry - */ -const de_BatchGetAssetPropertyValueHistoryErrorEntry = ( - output: any, - context: __SerdeContext -): BatchGetAssetPropertyValueHistoryErrorEntry => { - return { - entryId: __expectString(output.entryId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; -}; +// de_BatchGetAssetPropertyValueHistoryErrorEntry omitted. /** * deserializeAws_restJson1BatchGetAssetPropertyValueHistoryErrorInfo @@ -9381,13 +8165,10 @@ const de_BatchGetAssetPropertyValueHistoryErrorInfo = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyValueHistoryErrorInfo => { - return { - errorCode: __expectString(output.errorCode), - errorTimestamp: - output.errorTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.errorTimestamp))) - : undefined, - } as any; + return take(output, { + errorCode: __expectString, + errorTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -9400,9 +8181,6 @@ const de_BatchGetAssetPropertyValueHistorySkippedEntries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetAssetPropertyValueHistorySkippedEntry(entry, context); }); return retVal; @@ -9415,12 +8193,11 @@ const de_BatchGetAssetPropertyValueHistorySkippedEntry = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyValueHistorySkippedEntry => { - return { - completionStatus: __expectString(output.completionStatus), - entryId: __expectString(output.entryId), - errorInfo: - output.errorInfo != null ? de_BatchGetAssetPropertyValueHistoryErrorInfo(output.errorInfo, context) : undefined, - } as any; + return take(output, { + completionStatus: __expectString, + entryId: __expectString, + errorInfo: (_: any) => de_BatchGetAssetPropertyValueHistoryErrorInfo(_, context), + }) as any; }; /** @@ -9433,9 +8210,6 @@ const de_BatchGetAssetPropertyValueHistorySuccessEntries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetAssetPropertyValueHistorySuccessEntry(entry, context); }); return retVal; @@ -9448,13 +8222,10 @@ const de_BatchGetAssetPropertyValueHistorySuccessEntry = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyValueHistorySuccessEntry => { - return { - assetPropertyValueHistory: - output.assetPropertyValueHistory != null - ? de_AssetPropertyValueHistory(output.assetPropertyValueHistory, context) - : undefined, - entryId: __expectString(output.entryId), - } as any; + return take(output, { + assetPropertyValueHistory: (_: any) => de_AssetPropertyValueHistory(_, context), + entryId: __expectString, + }) as any; }; /** @@ -9467,9 +8238,6 @@ const de_BatchGetAssetPropertyValueSkippedEntries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetAssetPropertyValueSkippedEntry(entry, context); }); return retVal; @@ -9482,11 +8250,11 @@ const de_BatchGetAssetPropertyValueSkippedEntry = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyValueSkippedEntry => { - return { - completionStatus: __expectString(output.completionStatus), - entryId: __expectString(output.entryId), - errorInfo: output.errorInfo != null ? de_BatchGetAssetPropertyValueErrorInfo(output.errorInfo, context) : undefined, - } as any; + return take(output, { + completionStatus: __expectString, + entryId: __expectString, + errorInfo: (_: any) => de_BatchGetAssetPropertyValueErrorInfo(_, context), + }) as any; }; /** @@ -9499,9 +8267,6 @@ const de_BatchGetAssetPropertyValueSuccessEntries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetAssetPropertyValueSuccessEntry(entry, context); }); return retVal; @@ -9514,132 +8279,31 @@ const de_BatchGetAssetPropertyValueSuccessEntry = ( output: any, context: __SerdeContext ): BatchGetAssetPropertyValueSuccessEntry => { - return { - assetPropertyValue: - output.assetPropertyValue != null ? de_AssetPropertyValue(output.assetPropertyValue, context) : undefined, - entryId: __expectString(output.entryId), - } as any; + return take(output, { + assetPropertyValue: (_: any) => de_AssetPropertyValue(_, context), + entryId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1BatchPutAssetPropertyError - */ -const de_BatchPutAssetPropertyError = (output: any, context: __SerdeContext): BatchPutAssetPropertyError => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - timestamps: output.timestamps != null ? de_Timestamps(output.timestamps, context) : undefined, - } as any; -}; +// de_BatchPutAssetPropertyError omitted. -/** - * deserializeAws_restJson1BatchPutAssetPropertyErrorEntries - */ -const de_BatchPutAssetPropertyErrorEntries = ( - output: any, - context: __SerdeContext -): BatchPutAssetPropertyErrorEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutAssetPropertyErrorEntry(entry, context); - }); - return retVal; -}; +// de_BatchPutAssetPropertyErrorEntries omitted. -/** - * deserializeAws_restJson1BatchPutAssetPropertyErrorEntry - */ -const de_BatchPutAssetPropertyErrorEntry = (output: any, context: __SerdeContext): BatchPutAssetPropertyErrorEntry => { - return { - entryId: __expectString(output.entryId), - errors: output.errors != null ? de_BatchPutAssetPropertyErrors(output.errors, context) : undefined, - } as any; -}; +// de_BatchPutAssetPropertyErrorEntry omitted. -/** - * deserializeAws_restJson1BatchPutAssetPropertyErrors - */ -const de_BatchPutAssetPropertyErrors = (output: any, context: __SerdeContext): BatchPutAssetPropertyError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutAssetPropertyError(entry, context); - }); - return retVal; -}; +// de_BatchPutAssetPropertyErrors omitted. -/** - * deserializeAws_restJson1ColumnNames - */ -const de_ColumnNames = (output: any, context: __SerdeContext): (ColumnName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ColumnNames omitted. -/** - * deserializeAws_restJson1CompositeModelProperty - */ -const de_CompositeModelProperty = (output: any, context: __SerdeContext): CompositeModelProperty => { - return { - assetProperty: output.assetProperty != null ? de_Property(output.assetProperty, context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_CompositeModelProperty omitted. -/** - * deserializeAws_restJson1ConfigurationErrorDetails - */ -const de_ConfigurationErrorDetails = (output: any, context: __SerdeContext): ConfigurationErrorDetails => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ConfigurationErrorDetails omitted. -/** - * deserializeAws_restJson1ConfigurationStatus - */ -const de_ConfigurationStatus = (output: any, context: __SerdeContext): ConfigurationStatus => { - return { - error: output.error != null ? de_ConfigurationErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_ConfigurationStatus omitted. -/** - * deserializeAws_restJson1Csv - */ -const de_Csv = (output: any, context: __SerdeContext): Csv => { - return { - columnNames: output.columnNames != null ? de_ColumnNames(output.columnNames, context) : undefined, - } as any; -}; +// de_Csv omitted. -/** - * deserializeAws_restJson1CustomerManagedS3Storage - */ -const de_CustomerManagedS3Storage = (output: any, context: __SerdeContext): CustomerManagedS3Storage => { - return { - roleArn: __expectString(output.roleArn), - s3ResourceArn: __expectString(output.s3ResourceArn), - } as any; -}; +// de_CustomerManagedS3Storage omitted. /** * deserializeAws_restJson1DashboardSummaries @@ -9648,9 +8312,6 @@ const de_DashboardSummaries = (output: any, context: __SerdeContext): DashboardS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DashboardSummary(entry, context); }); return retVal; @@ -9660,170 +8321,40 @@ const de_DashboardSummaries = (output: any, context: __SerdeContext): DashboardS * deserializeAws_restJson1DashboardSummary */ const de_DashboardSummary = (output: any, context: __SerdeContext): DashboardSummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DetailedError - */ -const de_DetailedError = (output: any, context: __SerdeContext): DetailedError => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_DetailedError omitted. -/** - * deserializeAws_restJson1DetailedErrors - */ -const de_DetailedErrors = (output: any, context: __SerdeContext): DetailedError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetailedError(entry, context); - }); - return retVal; -}; +// de_DetailedErrors omitted. -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - code: __expectString(output.code), - details: output.details != null ? de_DetailedErrors(output.details, context) : undefined, - message: __expectString(output.message), - } as any; -}; +// de_ErrorDetails omitted. -/** - * deserializeAws_restJson1ErrorReportLocation - */ -const de_ErrorReportLocation = (output: any, context: __SerdeContext): ErrorReportLocation => { - return { - bucket: __expectString(output.bucket), - prefix: __expectString(output.prefix), - } as any; -}; +// de_ErrorReportLocation omitted. -/** - * deserializeAws_restJson1ExpressionVariable - */ -const de_ExpressionVariable = (output: any, context: __SerdeContext): ExpressionVariable => { - return { - name: __expectString(output.name), - value: output.value != null ? de_VariableValue(output.value, context) : undefined, - } as any; -}; +// de_ExpressionVariable omitted. -/** - * deserializeAws_restJson1ExpressionVariables - */ -const de_ExpressionVariables = (output: any, context: __SerdeContext): ExpressionVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExpressionVariable(entry, context); - }); - return retVal; -}; +// de_ExpressionVariables omitted. -/** - * deserializeAws_restJson1File - */ -const de_File = (output: any, context: __SerdeContext): File => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - versionId: __expectString(output.versionId), - } as any; -}; +// de_File omitted. -/** - * deserializeAws_restJson1FileFormat - */ -const de_FileFormat = (output: any, context: __SerdeContext): FileFormat => { - return { - csv: output.csv != null ? de_Csv(output.csv, context) : undefined, - } as any; -}; +// de_FileFormat omitted. -/** - * deserializeAws_restJson1Files - */ -const de_Files = (output: any, context: __SerdeContext): File[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_File(entry, context); - }); - return retVal; -}; +// de_Files omitted. -/** - * deserializeAws_restJson1ForwardingConfig - */ -const de_ForwardingConfig = (output: any, context: __SerdeContext): ForwardingConfig => { - return { - state: __expectString(output.state), - } as any; -}; +// de_ForwardingConfig omitted. -/** - * deserializeAws_restJson1GatewayCapabilitySummaries - */ -const de_GatewayCapabilitySummaries = (output: any, context: __SerdeContext): GatewayCapabilitySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewayCapabilitySummary(entry, context); - }); - return retVal; -}; +// de_GatewayCapabilitySummaries omitted. -/** - * deserializeAws_restJson1GatewayCapabilitySummary - */ -const de_GatewayCapabilitySummary = (output: any, context: __SerdeContext): GatewayCapabilitySummary => { - return { - capabilityNamespace: __expectString(output.capabilityNamespace), - capabilitySyncStatus: __expectString(output.capabilitySyncStatus), - } as any; -}; +// de_GatewayCapabilitySummary omitted. -/** - * deserializeAws_restJson1GatewayPlatform - */ -const de_GatewayPlatform = (output: any, context: __SerdeContext): GatewayPlatform => { - return { - greengrass: output.greengrass != null ? de_Greengrass(output.greengrass, context) : undefined, - greengrassV2: output.greengrassV2 != null ? de_GreengrassV2(output.greengrassV2, context) : undefined, - } as any; -}; +// de_GatewayPlatform omitted. /** * deserializeAws_restJson1GatewaySummaries @@ -9832,9 +8363,6 @@ const de_GatewaySummaries = (output: any, context: __SerdeContext): GatewaySumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GatewaySummary(entry, context); }); return retVal; @@ -9844,100 +8372,38 @@ const de_GatewaySummaries = (output: any, context: __SerdeContext): GatewaySumma * deserializeAws_restJson1GatewaySummary */ const de_GatewaySummary = (output: any, context: __SerdeContext): GatewaySummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - gatewayCapabilitySummaries: - output.gatewayCapabilitySummaries != null - ? de_GatewayCapabilitySummaries(output.gatewayCapabilitySummaries, context) - : undefined, - gatewayId: __expectString(output.gatewayId), - gatewayName: __expectString(output.gatewayName), - gatewayPlatform: output.gatewayPlatform != null ? de_GatewayPlatform(output.gatewayPlatform, context) : undefined, - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + gatewayCapabilitySummaries: _json, + gatewayId: __expectString, + gatewayName: __expectString, + gatewayPlatform: _json, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1Greengrass - */ -const de_Greengrass = (output: any, context: __SerdeContext): Greengrass => { - return { - groupArn: __expectString(output.groupArn), - } as any; -}; +// de_Greengrass omitted. -/** - * deserializeAws_restJson1GreengrassV2 - */ -const de_GreengrassV2 = (output: any, context: __SerdeContext): GreengrassV2 => { - return { - coreDeviceThingName: __expectString(output.coreDeviceThingName), - } as any; -}; +// de_GreengrassV2 omitted. -/** - * deserializeAws_restJson1GroupIdentity - */ -const de_GroupIdentity = (output: any, context: __SerdeContext): GroupIdentity => { - return { - id: __expectString(output.id), - } as any; -}; +// de_GroupIdentity omitted. -/** - * deserializeAws_restJson1IAMRoleIdentity - */ -const de_IAMRoleIdentity = (output: any, context: __SerdeContext): IAMRoleIdentity => { - return { - arn: __expectString(output.arn), - } as any; -}; +// de_IAMRoleIdentity omitted. -/** - * deserializeAws_restJson1IAMUserIdentity - */ -const de_IAMUserIdentity = (output: any, context: __SerdeContext): IAMUserIdentity => { - return { - arn: __expectString(output.arn), - } as any; -}; +// de_IAMUserIdentity omitted. -/** - * deserializeAws_restJson1Identity - */ -const de_Identity = (output: any, context: __SerdeContext): Identity => { - return { - group: output.group != null ? de_GroupIdentity(output.group, context) : undefined, - iamRole: output.iamRole != null ? de_IAMRoleIdentity(output.iamRole, context) : undefined, - iamUser: output.iamUser != null ? de_IAMUserIdentity(output.iamUser, context) : undefined, - user: output.user != null ? de_UserIdentity(output.user, context) : undefined, - } as any; -}; +// de_Identity omitted. -/** - * deserializeAws_restJson1ImageLocation - */ -const de_ImageLocation = (output: any, context: __SerdeContext): ImageLocation => { - return { - id: __expectString(output.id), - url: __expectString(output.url), - } as any; -}; +// de_ImageLocation omitted. /** * deserializeAws_restJson1InterpolatedAssetPropertyValue */ const de_InterpolatedAssetPropertyValue = (output: any, context: __SerdeContext): InterpolatedAssetPropertyValue => { - return { - timestamp: output.timestamp != null ? de_TimeInNanos(output.timestamp, context) : undefined, - value: output.value != null ? de_Variant(output.value, context) : undefined, - } as any; + return take(output, { + timestamp: _json, + value: (_: any) => de_Variant(_, context), + }) as any; }; /** @@ -9947,149 +8413,36 @@ const de_InterpolatedAssetPropertyValues = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InterpolatedAssetPropertyValue(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1JobConfiguration - */ -const de_JobConfiguration = (output: any, context: __SerdeContext): JobConfiguration => { - return { - fileFormat: output.fileFormat != null ? de_FileFormat(output.fileFormat, context) : undefined, - } as any; -}; +// de_JobConfiguration omitted. -/** - * deserializeAws_restJson1JobSummaries - */ -const de_JobSummaries = (output: any, context: __SerdeContext): JobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobSummary(entry, context); - }); - return retVal; -}; +// de_JobSummaries omitted. -/** - * deserializeAws_restJson1JobSummary - */ -const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_JobSummary omitted. -/** - * deserializeAws_restJson1LoggingOptions - */ -const de_LoggingOptions = (output: any, context: __SerdeContext): LoggingOptions => { - return { - level: __expectString(output.level), - } as any; -}; +// de_LoggingOptions omitted. -/** - * deserializeAws_restJson1Measurement - */ -const de_Measurement = (output: any, context: __SerdeContext): Measurement => { - return { - processingConfig: - output.processingConfig != null ? de_MeasurementProcessingConfig(output.processingConfig, context) : undefined, - } as any; -}; +// de_Measurement omitted. -/** - * deserializeAws_restJson1MeasurementProcessingConfig - */ -const de_MeasurementProcessingConfig = (output: any, context: __SerdeContext): MeasurementProcessingConfig => { - return { - forwardingConfig: - output.forwardingConfig != null ? de_ForwardingConfig(output.forwardingConfig, context) : undefined, - } as any; -}; +// de_MeasurementProcessingConfig omitted. -/** - * deserializeAws_restJson1Metric - */ -const de_Metric = (output: any, context: __SerdeContext): Metric => { - return { - expression: __expectString(output.expression), - processingConfig: - output.processingConfig != null ? de_MetricProcessingConfig(output.processingConfig, context) : undefined, - variables: output.variables != null ? de_ExpressionVariables(output.variables, context) : undefined, - window: output.window != null ? de_MetricWindow(output.window, context) : undefined, - } as any; -}; +// de_Metric omitted. -/** - * deserializeAws_restJson1MetricProcessingConfig - */ -const de_MetricProcessingConfig = (output: any, context: __SerdeContext): MetricProcessingConfig => { - return { - computeLocation: __expectString(output.computeLocation), - } as any; -}; +// de_MetricProcessingConfig omitted. -/** - * deserializeAws_restJson1MetricWindow - */ -const de_MetricWindow = (output: any, context: __SerdeContext): MetricWindow => { - return { - tumbling: output.tumbling != null ? de_TumblingWindow(output.tumbling, context) : undefined, - } as any; -}; +// de_MetricWindow omitted. -/** - * deserializeAws_restJson1MonitorErrorDetails - */ -const de_MonitorErrorDetails = (output: any, context: __SerdeContext): MonitorErrorDetails => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_MonitorErrorDetails omitted. -/** - * deserializeAws_restJson1MultiLayerStorage - */ -const de_MultiLayerStorage = (output: any, context: __SerdeContext): MultiLayerStorage => { - return { - customerManagedS3Storage: - output.customerManagedS3Storage != null - ? de_CustomerManagedS3Storage(output.customerManagedS3Storage, context) - : undefined, - } as any; -}; +// de_MultiLayerStorage omitted. -/** - * deserializeAws_restJson1PortalResource - */ -const de_PortalResource = (output: any, context: __SerdeContext): PortalResource => { - return { - id: __expectString(output.id), - } as any; -}; +// de_PortalResource omitted. -/** - * deserializeAws_restJson1PortalStatus - */ -const de_PortalStatus = (output: any, context: __SerdeContext): PortalStatus => { - return { - error: output.error != null ? de_MonitorErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_PortalStatus omitted. /** * deserializeAws_restJson1PortalSummaries @@ -10098,9 +8451,6 @@ const de_PortalSummaries = (output: any, context: __SerdeContext): PortalSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PortalSummary(entry, context); }); return retVal; @@ -10110,32 +8460,19 @@ const de_PortalSummaries = (output: any, context: __SerdeContext): PortalSummary * deserializeAws_restJson1PortalSummary */ const de_PortalSummary = (output: any, context: __SerdeContext): PortalSummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - startUrl: __expectString(output.startUrl), - status: output.status != null ? de_PortalStatus(output.status, context) : undefined, - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + roleArn: __expectString, + startUrl: __expectString, + status: _json, + }) as any; }; -/** - * deserializeAws_restJson1ProjectResource - */ -const de_ProjectResource = (output: any, context: __SerdeContext): ProjectResource => { - return { - id: __expectString(output.id), - } as any; -}; +// de_ProjectResource omitted. /** * deserializeAws_restJson1ProjectSummaries @@ -10144,9 +8481,6 @@ const de_ProjectSummaries = (output: any, context: __SerdeContext): ProjectSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectSummary(entry, context); }); return retVal; @@ -10156,100 +8490,28 @@ const de_ProjectSummaries = (output: any, context: __SerdeContext): ProjectSumma * deserializeAws_restJson1ProjectSummary */ const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateDate: - output.lastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateDate))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Property - */ -const de_Property = (output: any, context: __SerdeContext): Property => { - return { - alias: __expectString(output.alias), - dataType: __expectString(output.dataType), - id: __expectString(output.id), - name: __expectString(output.name), - notification: output.notification != null ? de_PropertyNotification(output.notification, context) : undefined, - type: output.type != null ? de_PropertyType(output.type, context) : undefined, - unit: __expectString(output.unit), - } as any; -}; +// de_Property omitted. -/** - * deserializeAws_restJson1PropertyNotification - */ -const de_PropertyNotification = (output: any, context: __SerdeContext): PropertyNotification => { - return { - state: __expectString(output.state), - topic: __expectString(output.topic), - } as any; -}; +// de_PropertyNotification omitted. -/** - * deserializeAws_restJson1PropertyType - */ -const de_PropertyType = (output: any, context: __SerdeContext): PropertyType => { - return { - attribute: output.attribute != null ? de_Attribute(output.attribute, context) : undefined, - measurement: output.measurement != null ? de_Measurement(output.measurement, context) : undefined, - metric: output.metric != null ? de_Metric(output.metric, context) : undefined, - transform: output.transform != null ? de_Transform(output.transform, context) : undefined, - } as any; -}; +// de_PropertyType omitted. -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - portal: output.portal != null ? de_PortalResource(output.portal, context) : undefined, - project: output.project != null ? de_ProjectResource(output.project, context) : undefined, - } as any; -}; +// de_Resource omitted. -/** - * deserializeAws_restJson1RetentionPeriod - */ -const de_RetentionPeriod = (output: any, context: __SerdeContext): RetentionPeriod => { - return { - numberOfDays: __expectInt32(output.numberOfDays), - unlimited: __expectBoolean(output.unlimited), - } as any; -}; +// de_RetentionPeriod omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TimeInNanos - */ -const de_TimeInNanos = (output: any, context: __SerdeContext): TimeInNanos => { - return { - offsetInNanos: __expectInt32(output.offsetInNanos), - timeInSeconds: __expectLong(output.timeInSeconds), - } as any; -}; +// de_TimeInNanos omitted. /** * deserializeAws_restJson1TimeSeriesSummaries @@ -10258,9 +8520,6 @@ const de_TimeSeriesSummaries = (output: any, context: __SerdeContext): TimeSerie const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimeSeriesSummary(entry, context); }); return retVal; @@ -10270,102 +8529,41 @@ const de_TimeSeriesSummaries = (output: any, context: __SerdeContext): TimeSerie * deserializeAws_restJson1TimeSeriesSummary */ const de_TimeSeriesSummary = (output: any, context: __SerdeContext): TimeSeriesSummary => { - return { - alias: __expectString(output.alias), - assetId: __expectString(output.assetId), - dataType: __expectString(output.dataType), - dataTypeSpec: __expectString(output.dataTypeSpec), - propertyId: __expectString(output.propertyId), - timeSeriesArn: __expectString(output.timeSeriesArn), - timeSeriesCreationDate: - output.timeSeriesCreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeSeriesCreationDate))) - : undefined, - timeSeriesId: __expectString(output.timeSeriesId), - timeSeriesLastUpdateDate: - output.timeSeriesLastUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timeSeriesLastUpdateDate))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Timestamps - */ -const de_Timestamps = (output: any, context: __SerdeContext): TimeInNanos[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TimeInNanos(entry, context); - }); - return retVal; + return take(output, { + alias: __expectString, + assetId: __expectString, + dataType: __expectString, + dataTypeSpec: __expectString, + propertyId: __expectString, + timeSeriesArn: __expectString, + timeSeriesCreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + timeSeriesId: __expectString, + timeSeriesLastUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1Transform - */ -const de_Transform = (output: any, context: __SerdeContext): Transform => { - return { - expression: __expectString(output.expression), - processingConfig: - output.processingConfig != null ? de_TransformProcessingConfig(output.processingConfig, context) : undefined, - variables: output.variables != null ? de_ExpressionVariables(output.variables, context) : undefined, - } as any; -}; +// de_Timestamps omitted. -/** - * deserializeAws_restJson1TransformProcessingConfig - */ -const de_TransformProcessingConfig = (output: any, context: __SerdeContext): TransformProcessingConfig => { - return { - computeLocation: __expectString(output.computeLocation), - forwardingConfig: - output.forwardingConfig != null ? de_ForwardingConfig(output.forwardingConfig, context) : undefined, - } as any; -}; +// de_Transform omitted. -/** - * deserializeAws_restJson1TumblingWindow - */ -const de_TumblingWindow = (output: any, context: __SerdeContext): TumblingWindow => { - return { - interval: __expectString(output.interval), - offset: __expectString(output.offset), - } as any; -}; +// de_TransformProcessingConfig omitted. -/** - * deserializeAws_restJson1UserIdentity - */ -const de_UserIdentity = (output: any, context: __SerdeContext): UserIdentity => { - return { - id: __expectString(output.id), - } as any; -}; +// de_TumblingWindow omitted. -/** - * deserializeAws_restJson1VariableValue - */ -const de_VariableValue = (output: any, context: __SerdeContext): VariableValue => { - return { - hierarchyId: __expectString(output.hierarchyId), - propertyId: __expectString(output.propertyId), - } as any; -}; +// de_UserIdentity omitted. + +// de_VariableValue omitted. /** * deserializeAws_restJson1Variant */ const de_Variant = (output: any, context: __SerdeContext): Variant => { - return { - booleanValue: __expectBoolean(output.booleanValue), - doubleValue: __limitedParseDouble(output.doubleValue), - integerValue: __expectInt32(output.integerValue), - stringValue: __expectString(output.stringValue), - } as any; + return take(output, { + booleanValue: __expectBoolean, + doubleValue: __limitedParseDouble, + integerValue: __expectInt32, + stringValue: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-iotthingsgraph/src/protocols/Aws_json1_1.ts b/clients/client-iotthingsgraph/src/protocols/Aws_json1_1.ts index 9be2949a9996..a78729b97896 100644 --- a/clients/client-iotthingsgraph/src/protocols/Aws_json1_1.ts +++ b/clients/client-iotthingsgraph/src/protocols/Aws_json1_1.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -118,7 +119,6 @@ import { import { IoTThingsGraphServiceException as __BaseException } from "../models/IoTThingsGraphServiceException"; import { AssociateEntityToThingRequest, - AssociateEntityToThingResponse, CreateFlowTemplateRequest, CreateFlowTemplateResponse, CreateSystemInstanceRequest, @@ -127,24 +127,15 @@ import { CreateSystemTemplateResponse, DefinitionDocument, DeleteFlowTemplateRequest, - DeleteFlowTemplateResponse, DeleteNamespaceRequest, - DeleteNamespaceResponse, DeleteSystemInstanceRequest, - DeleteSystemInstanceResponse, DeleteSystemTemplateRequest, - DeleteSystemTemplateResponse, - DependencyRevision, DeploySystemInstanceRequest, DeploySystemInstanceResponse, DeprecateFlowTemplateRequest, - DeprecateFlowTemplateResponse, DeprecateSystemTemplateRequest, - DeprecateSystemTemplateResponse, DescribeNamespaceRequest, - DescribeNamespaceResponse, DissociateEntityFromThingRequest, - DissociateEntityFromThingResponse, EntityDescription, EntityFilter, EntityType, @@ -160,7 +151,6 @@ import { GetFlowTemplateRevisionsRequest, GetFlowTemplateRevisionsResponse, GetNamespaceDeletionStatusRequest, - GetNamespaceDeletionStatusResponse, GetSystemInstanceRequest, GetSystemInstanceResponse, GetSystemTemplateRequest, @@ -175,7 +165,6 @@ import { ListFlowExecutionMessagesRequest, ListFlowExecutionMessagesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MetricsConfiguration, ResourceAlreadyExistsException, ResourceInUseException, @@ -191,7 +180,6 @@ import { SearchSystemTemplatesRequest, SearchSystemTemplatesResponse, SearchThingsRequest, - SearchThingsResponse, SystemInstanceDescription, SystemInstanceFilter, SystemInstanceSummary, @@ -200,19 +188,15 @@ import { SystemTemplateSummary, Tag, TagResourceRequest, - TagResourceResponse, - Thing, ThrottlingException, UndeploySystemInstanceRequest, UndeploySystemInstanceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateFlowTemplateRequest, UpdateFlowTemplateResponse, UpdateSystemTemplateRequest, UpdateSystemTemplateResponse, UploadEntityDefinitionsRequest, - UploadEntityDefinitionsResponse, } from "../models/models_0"; /** @@ -224,7 +208,7 @@ export const se_AssociateEntityToThingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateEntityToThing"); let body: any; - body = JSON.stringify(se_AssociateEntityToThingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -237,7 +221,7 @@ export const se_CreateFlowTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFlowTemplate"); let body: any; - body = JSON.stringify(se_CreateFlowTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -250,7 +234,7 @@ export const se_CreateSystemInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSystemInstance"); let body: any; - body = JSON.stringify(se_CreateSystemInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -263,7 +247,7 @@ export const se_CreateSystemTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSystemTemplate"); let body: any; - body = JSON.stringify(se_CreateSystemTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -276,7 +260,7 @@ export const se_DeleteFlowTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFlowTemplate"); let body: any; - body = JSON.stringify(se_DeleteFlowTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,7 +273,7 @@ export const se_DeleteNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNamespace"); let body: any; - body = JSON.stringify(se_DeleteNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +286,7 @@ export const se_DeleteSystemInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSystemInstance"); let body: any; - body = JSON.stringify(se_DeleteSystemInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +299,7 @@ export const se_DeleteSystemTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSystemTemplate"); let body: any; - body = JSON.stringify(se_DeleteSystemTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +312,7 @@ export const se_DeploySystemInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeploySystemInstance"); let body: any; - body = JSON.stringify(se_DeploySystemInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -341,7 +325,7 @@ export const se_DeprecateFlowTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeprecateFlowTemplate"); let body: any; - body = JSON.stringify(se_DeprecateFlowTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +338,7 @@ export const se_DeprecateSystemTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeprecateSystemTemplate"); let body: any; - body = JSON.stringify(se_DeprecateSystemTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +351,7 @@ export const se_DescribeNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNamespace"); let body: any; - body = JSON.stringify(se_DescribeNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -380,7 +364,7 @@ export const se_DissociateEntityFromThingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DissociateEntityFromThing"); let body: any; - body = JSON.stringify(se_DissociateEntityFromThingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -393,7 +377,7 @@ export const se_GetEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEntities"); let body: any; - body = JSON.stringify(se_GetEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -406,7 +390,7 @@ export const se_GetFlowTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFlowTemplate"); let body: any; - body = JSON.stringify(se_GetFlowTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -419,7 +403,7 @@ export const se_GetFlowTemplateRevisionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFlowTemplateRevisions"); let body: any; - body = JSON.stringify(se_GetFlowTemplateRevisionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -432,7 +416,7 @@ export const se_GetNamespaceDeletionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNamespaceDeletionStatus"); let body: any; - body = JSON.stringify(se_GetNamespaceDeletionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -445,7 +429,7 @@ export const se_GetSystemInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSystemInstance"); let body: any; - body = JSON.stringify(se_GetSystemInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -458,7 +442,7 @@ export const se_GetSystemTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSystemTemplate"); let body: any; - body = JSON.stringify(se_GetSystemTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -471,7 +455,7 @@ export const se_GetSystemTemplateRevisionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSystemTemplateRevisions"); let body: any; - body = JSON.stringify(se_GetSystemTemplateRevisionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -484,7 +468,7 @@ export const se_GetUploadStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUploadStatus"); let body: any; - body = JSON.stringify(se_GetUploadStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -497,7 +481,7 @@ export const se_ListFlowExecutionMessagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFlowExecutionMessages"); let body: any; - body = JSON.stringify(se_ListFlowExecutionMessagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -510,7 +494,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -523,7 +507,7 @@ export const se_SearchEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchEntities"); let body: any; - body = JSON.stringify(se_SearchEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -549,7 +533,7 @@ export const se_SearchFlowTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchFlowTemplates"); let body: any; - body = JSON.stringify(se_SearchFlowTemplatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -562,7 +546,7 @@ export const se_SearchSystemInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchSystemInstances"); let body: any; - body = JSON.stringify(se_SearchSystemInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -575,7 +559,7 @@ export const se_SearchSystemTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchSystemTemplates"); let body: any; - body = JSON.stringify(se_SearchSystemTemplatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -588,7 +572,7 @@ export const se_SearchThingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchThings"); let body: any; - body = JSON.stringify(se_SearchThingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -601,7 +585,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -614,7 +598,7 @@ export const se_UndeploySystemInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UndeploySystemInstance"); let body: any; - body = JSON.stringify(se_UndeploySystemInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -627,7 +611,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -640,7 +624,7 @@ export const se_UpdateFlowTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFlowTemplate"); let body: any; - body = JSON.stringify(se_UpdateFlowTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -653,7 +637,7 @@ export const se_UpdateSystemTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSystemTemplate"); let body: any; - body = JSON.stringify(se_UpdateSystemTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -666,7 +650,7 @@ export const se_UploadEntityDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UploadEntityDefinitions"); let body: any; - body = JSON.stringify(se_UploadEntityDefinitionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -682,12 +666,12 @@ export const de_AssociateEntityToThingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateEntityToThingResponse(data, context); + contents = _json(data); const response: AssociateEntityToThingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -717,10 +701,9 @@ const de_AssociateEntityToThingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -743,7 +726,7 @@ export const de_CreateFlowTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -776,10 +759,9 @@ const de_CreateFlowTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -802,7 +784,7 @@ export const de_CreateSystemInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -835,10 +817,9 @@ const de_CreateSystemInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -861,7 +842,7 @@ export const de_CreateSystemTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -891,10 +872,9 @@ const de_CreateSystemTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -912,12 +892,12 @@ export const de_DeleteFlowTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFlowTemplateResponse(data, context); + contents = _json(data); const response: DeleteFlowTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -947,10 +927,9 @@ const de_DeleteFlowTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -968,12 +947,12 @@ export const de_DeleteNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNamespaceResponse(data, context); + contents = _json(data); const response: DeleteNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -997,10 +976,9 @@ const de_DeleteNamespaceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1018,12 +996,12 @@ export const de_DeleteSystemInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSystemInstanceResponse(data, context); + contents = _json(data); const response: DeleteSystemInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1053,10 +1031,9 @@ const de_DeleteSystemInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1074,12 +1051,12 @@ export const de_DeleteSystemTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSystemTemplateResponse(data, context); + contents = _json(data); const response: DeleteSystemTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1109,10 +1086,9 @@ const de_DeleteSystemTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1135,7 +1111,7 @@ export const de_DeploySystemInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1168,10 +1144,9 @@ const de_DeploySystemInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1189,12 +1164,12 @@ export const de_DeprecateFlowTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeprecateFlowTemplateResponse(data, context); + contents = _json(data); const response: DeprecateFlowTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1224,10 +1199,9 @@ const de_DeprecateFlowTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1245,12 +1219,12 @@ export const de_DeprecateSystemTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeprecateSystemTemplateResponse(data, context); + contents = _json(data); const response: DeprecateSystemTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1280,10 +1254,9 @@ const de_DeprecateSystemTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1301,12 +1274,12 @@ export const de_DescribeNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeNamespaceResponse(data, context); + contents = _json(data); const response: DescribeNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1336,10 +1309,9 @@ const de_DescribeNamespaceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1357,12 +1329,12 @@ export const de_DissociateEntityFromThingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DissociateEntityFromThingResponse(data, context); + contents = _json(data); const response: DissociateEntityFromThingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1392,10 +1364,9 @@ const de_DissociateEntityFromThingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1418,7 +1389,7 @@ export const de_GetEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1448,10 +1419,9 @@ const de_GetEntitiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,7 +1444,7 @@ export const de_GetFlowTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1504,10 +1474,9 @@ const de_GetFlowTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1530,7 +1499,7 @@ export const de_GetFlowTemplateRevisionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1560,10 +1529,9 @@ const de_GetFlowTemplateRevisionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1581,12 +1549,12 @@ export const de_GetNamespaceDeletionStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetNamespaceDeletionStatusResponse(data, context); + contents = _json(data); const response: GetNamespaceDeletionStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1613,10 +1581,9 @@ const de_GetNamespaceDeletionStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1639,7 +1606,7 @@ export const de_GetSystemInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1669,10 +1636,9 @@ const de_GetSystemInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1695,7 +1661,7 @@ export const de_GetSystemTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1725,10 +1691,9 @@ const de_GetSystemTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1751,7 +1716,7 @@ export const de_GetSystemTemplateRevisionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1781,10 +1746,9 @@ const de_GetSystemTemplateRevisionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1807,7 +1771,7 @@ export const de_GetUploadStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1837,10 +1801,9 @@ const de_GetUploadStatusCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1863,7 +1826,7 @@ export const de_ListFlowExecutionMessagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1893,10 +1856,9 @@ const de_ListFlowExecutionMessagesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1914,12 +1876,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1949,10 +1911,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1975,7 +1936,7 @@ export const de_SearchEntitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2002,10 +1963,9 @@ const de_SearchEntitiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,7 +1988,7 @@ export const de_SearchFlowExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2058,10 +2018,9 @@ const de_SearchFlowExecutionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,7 +2043,7 @@ export const de_SearchFlowTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2111,10 +2070,9 @@ const de_SearchFlowTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2137,7 +2095,7 @@ export const de_SearchSystemInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2164,10 +2122,9 @@ const de_SearchSystemInstancesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2190,7 +2147,7 @@ export const de_SearchSystemTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2217,10 +2174,9 @@ const de_SearchSystemTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2238,12 +2194,12 @@ export const de_SearchThingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchThingsResponse(data, context); + contents = _json(data); const response: SearchThingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2273,10 +2229,9 @@ const de_SearchThingsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2294,12 +2249,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2329,10 +2284,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2355,7 +2309,7 @@ export const de_UndeploySystemInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2388,10 +2342,9 @@ const de_UndeploySystemInstanceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2409,12 +2362,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2444,10 +2397,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2470,7 +2422,7 @@ export const de_UpdateFlowTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2500,10 +2452,9 @@ const de_UpdateFlowTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2526,7 +2477,7 @@ export const de_UpdateSystemTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2556,10 +2507,9 @@ const de_UpdateSystemTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2577,12 +2527,12 @@ export const de_UploadEntityDefinitionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UploadEntityDefinitionsResponse(data, context); + contents = _json(data); const response: UploadEntityDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2609,10 +2559,9 @@ const de_UploadEntityDefinitionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2626,7 +2575,7 @@ const de_InternalFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalFailureException(body, context); + const deserialized: any = _json(body); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2642,7 +2591,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2658,7 +2607,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2674,7 +2623,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2690,7 +2639,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2706,7 +2655,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2719,7 +2668,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2727,734 +2676,198 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateEntityToThingRequest - */ -const se_AssociateEntityToThingRequest = (input: AssociateEntityToThingRequest, context: __SerdeContext): any => { - return { - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.namespaceVersion != null && { namespaceVersion: input.namespaceVersion }), - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; +// se_AssociateEntityToThingRequest omitted. -/** - * serializeAws_json1_1CreateFlowTemplateRequest - */ -const se_CreateFlowTemplateRequest = (input: CreateFlowTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.compatibleNamespaceVersion != null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }), - ...(input.definition != null && { definition: se_DefinitionDocument(input.definition, context) }), - }; -}; +// se_CreateFlowTemplateRequest omitted. -/** - * serializeAws_json1_1CreateSystemInstanceRequest - */ -const se_CreateSystemInstanceRequest = (input: CreateSystemInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.definition != null && { definition: se_DefinitionDocument(input.definition, context) }), - ...(input.flowActionsRoleArn != null && { flowActionsRoleArn: input.flowActionsRoleArn }), - ...(input.greengrassGroupName != null && { greengrassGroupName: input.greengrassGroupName }), - ...(input.metricsConfiguration != null && { - metricsConfiguration: se_MetricsConfiguration(input.metricsConfiguration, context), - }), - ...(input.s3BucketName != null && { s3BucketName: input.s3BucketName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.target != null && { target: input.target }), - }; -}; +// se_CreateSystemInstanceRequest omitted. -/** - * serializeAws_json1_1CreateSystemTemplateRequest - */ -const se_CreateSystemTemplateRequest = (input: CreateSystemTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.compatibleNamespaceVersion != null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }), - ...(input.definition != null && { definition: se_DefinitionDocument(input.definition, context) }), - }; -}; +// se_CreateSystemTemplateRequest omitted. -/** - * serializeAws_json1_1DefinitionDocument - */ -const se_DefinitionDocument = (input: DefinitionDocument, context: __SerdeContext): any => { - return { - ...(input.language != null && { language: input.language }), - ...(input.text != null && { text: input.text }), - }; -}; +// se_DefinitionDocument omitted. -/** - * serializeAws_json1_1DeleteFlowTemplateRequest - */ -const se_DeleteFlowTemplateRequest = (input: DeleteFlowTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeleteFlowTemplateRequest omitted. -/** - * serializeAws_json1_1DeleteNamespaceRequest - */ -const se_DeleteNamespaceRequest = (input: DeleteNamespaceRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DeleteNamespaceRequest omitted. -/** - * serializeAws_json1_1DeleteSystemInstanceRequest - */ -const se_DeleteSystemInstanceRequest = (input: DeleteSystemInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeleteSystemInstanceRequest omitted. -/** - * serializeAws_json1_1DeleteSystemTemplateRequest - */ -const se_DeleteSystemTemplateRequest = (input: DeleteSystemTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeleteSystemTemplateRequest omitted. -/** - * serializeAws_json1_1DeploySystemInstanceRequest - */ -const se_DeploySystemInstanceRequest = (input: DeploySystemInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeploySystemInstanceRequest omitted. -/** - * serializeAws_json1_1DeprecateFlowTemplateRequest - */ -const se_DeprecateFlowTemplateRequest = (input: DeprecateFlowTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeprecateFlowTemplateRequest omitted. -/** - * serializeAws_json1_1DeprecateSystemTemplateRequest - */ -const se_DeprecateSystemTemplateRequest = (input: DeprecateSystemTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeprecateSystemTemplateRequest omitted. -/** - * serializeAws_json1_1DescribeNamespaceRequest - */ -const se_DescribeNamespaceRequest = (input: DescribeNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - }; -}; +// se_DescribeNamespaceRequest omitted. -/** - * serializeAws_json1_1DissociateEntityFromThingRequest - */ -const se_DissociateEntityFromThingRequest = (input: DissociateEntityFromThingRequest, context: __SerdeContext): any => { - return { - ...(input.entityType != null && { entityType: input.entityType }), - ...(input.thingName != null && { thingName: input.thingName }), - }; -}; +// se_DissociateEntityFromThingRequest omitted. -/** - * serializeAws_json1_1EntityFilter - */ -const se_EntityFilter = (input: EntityFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_EntityFilterValues(input.value, context) }), - }; -}; +// se_EntityFilter omitted. -/** - * serializeAws_json1_1EntityFilters - */ -const se_EntityFilters = (input: EntityFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntityFilter(entry, context); - }); -}; +// se_EntityFilters omitted. -/** - * serializeAws_json1_1EntityFilterValues - */ -const se_EntityFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EntityFilterValues omitted. -/** - * serializeAws_json1_1EntityTypes - */ -const se_EntityTypes = (input: (EntityType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EntityTypes omitted. -/** - * serializeAws_json1_1FlowTemplateFilter - */ -const se_FlowTemplateFilter = (input: FlowTemplateFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_FlowTemplateFilterValues(input.value, context) }), - }; -}; +// se_FlowTemplateFilter omitted. -/** - * serializeAws_json1_1FlowTemplateFilters - */ -const se_FlowTemplateFilters = (input: FlowTemplateFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FlowTemplateFilter(entry, context); - }); -}; +// se_FlowTemplateFilters omitted. -/** - * serializeAws_json1_1FlowTemplateFilterValues - */ -const se_FlowTemplateFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FlowTemplateFilterValues omitted. -/** - * serializeAws_json1_1GetEntitiesRequest - */ -const se_GetEntitiesRequest = (input: GetEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.ids != null && { ids: se_Urns(input.ids, context) }), - ...(input.namespaceVersion != null && { namespaceVersion: input.namespaceVersion }), - }; -}; +// se_GetEntitiesRequest omitted. -/** - * serializeAws_json1_1GetFlowTemplateRequest - */ -const se_GetFlowTemplateRequest = (input: GetFlowTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.revisionNumber != null && { revisionNumber: input.revisionNumber }), - }; -}; +// se_GetFlowTemplateRequest omitted. -/** - * serializeAws_json1_1GetFlowTemplateRevisionsRequest - */ -const se_GetFlowTemplateRevisionsRequest = (input: GetFlowTemplateRevisionsRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetFlowTemplateRevisionsRequest omitted. -/** - * serializeAws_json1_1GetNamespaceDeletionStatusRequest - */ -const se_GetNamespaceDeletionStatusRequest = ( - input: GetNamespaceDeletionStatusRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_GetNamespaceDeletionStatusRequest omitted. -/** - * serializeAws_json1_1GetSystemInstanceRequest - */ -const se_GetSystemInstanceRequest = (input: GetSystemInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_GetSystemInstanceRequest omitted. -/** - * serializeAws_json1_1GetSystemTemplateRequest - */ -const se_GetSystemTemplateRequest = (input: GetSystemTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.revisionNumber != null && { revisionNumber: input.revisionNumber }), - }; -}; +// se_GetSystemTemplateRequest omitted. -/** - * serializeAws_json1_1GetSystemTemplateRevisionsRequest - */ -const se_GetSystemTemplateRevisionsRequest = ( - input: GetSystemTemplateRevisionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetSystemTemplateRevisionsRequest omitted. -/** - * serializeAws_json1_1GetUploadStatusRequest - */ -const se_GetUploadStatusRequest = (input: GetUploadStatusRequest, context: __SerdeContext): any => { - return { - ...(input.uploadId != null && { uploadId: input.uploadId }), - }; -}; +// se_GetUploadStatusRequest omitted. -/** - * serializeAws_json1_1ListFlowExecutionMessagesRequest - */ -const se_ListFlowExecutionMessagesRequest = (input: ListFlowExecutionMessagesRequest, context: __SerdeContext): any => { - return { - ...(input.flowExecutionId != null && { flowExecutionId: input.flowExecutionId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListFlowExecutionMessagesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1MetricsConfiguration - */ -const se_MetricsConfiguration = (input: MetricsConfiguration, context: __SerdeContext): any => { - return { - ...(input.cloudMetricEnabled != null && { cloudMetricEnabled: input.cloudMetricEnabled }), - ...(input.metricRuleRoleArn != null && { metricRuleRoleArn: input.metricRuleRoleArn }), - }; -}; +// se_MetricsConfiguration omitted. -/** - * serializeAws_json1_1SearchEntitiesRequest - */ -const se_SearchEntitiesRequest = (input: SearchEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.entityTypes != null && { entityTypes: se_EntityTypes(input.entityTypes, context) }), - ...(input.filters != null && { filters: se_EntityFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.namespaceVersion != null && { namespaceVersion: input.namespaceVersion }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_SearchEntitiesRequest omitted. /** * serializeAws_json1_1SearchFlowExecutionsRequest */ const se_SearchFlowExecutionsRequest = (input: SearchFlowExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.flowExecutionId != null && { flowExecutionId: input.flowExecutionId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.systemInstanceId != null && { systemInstanceId: input.systemInstanceId }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + flowExecutionId: [], + maxResults: [], + nextToken: [], + startTime: (_) => Math.round(_.getTime() / 1000), + systemInstanceId: [], + }); }; -/** - * serializeAws_json1_1SearchFlowTemplatesRequest - */ -const se_SearchFlowTemplatesRequest = (input: SearchFlowTemplatesRequest, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_FlowTemplateFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_SearchFlowTemplatesRequest omitted. -/** - * serializeAws_json1_1SearchSystemInstancesRequest - */ -const se_SearchSystemInstancesRequest = (input: SearchSystemInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_SystemInstanceFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_SearchSystemInstancesRequest omitted. -/** - * serializeAws_json1_1SearchSystemTemplatesRequest - */ -const se_SearchSystemTemplatesRequest = (input: SearchSystemTemplatesRequest, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_SystemTemplateFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_SearchSystemTemplatesRequest omitted. -/** - * serializeAws_json1_1SearchThingsRequest - */ -const se_SearchThingsRequest = (input: SearchThingsRequest, context: __SerdeContext): any => { - return { - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.namespaceVersion != null && { namespaceVersion: input.namespaceVersion }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_SearchThingsRequest omitted. -/** - * serializeAws_json1_1SystemInstanceFilter - */ -const se_SystemInstanceFilter = (input: SystemInstanceFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_SystemInstanceFilterValues(input.value, context) }), - }; -}; +// se_SystemInstanceFilter omitted. -/** - * serializeAws_json1_1SystemInstanceFilters - */ -const se_SystemInstanceFilters = (input: SystemInstanceFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SystemInstanceFilter(entry, context); - }); -}; +// se_SystemInstanceFilters omitted. -/** - * serializeAws_json1_1SystemInstanceFilterValues - */ -const se_SystemInstanceFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SystemInstanceFilterValues omitted. -/** - * serializeAws_json1_1SystemTemplateFilter - */ -const se_SystemTemplateFilter = (input: SystemTemplateFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: se_SystemTemplateFilterValues(input.value, context) }), - }; -}; +// se_SystemTemplateFilter omitted. -/** - * serializeAws_json1_1SystemTemplateFilters - */ -const se_SystemTemplateFilters = (input: SystemTemplateFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SystemTemplateFilter(entry, context); - }); -}; +// se_SystemTemplateFilters omitted. -/** - * serializeAws_json1_1SystemTemplateFilterValues - */ -const se_SystemTemplateFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SystemTemplateFilterValues omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UndeploySystemInstanceRequest - */ -const se_UndeploySystemInstanceRequest = (input: UndeploySystemInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_UndeploySystemInstanceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateFlowTemplateRequest - */ -const se_UpdateFlowTemplateRequest = (input: UpdateFlowTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.compatibleNamespaceVersion != null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }), - ...(input.definition != null && { definition: se_DefinitionDocument(input.definition, context) }), - ...(input.id != null && { id: input.id }), - }; -}; +// se_UpdateFlowTemplateRequest omitted. -/** - * serializeAws_json1_1UpdateSystemTemplateRequest - */ -const se_UpdateSystemTemplateRequest = (input: UpdateSystemTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.compatibleNamespaceVersion != null && { compatibleNamespaceVersion: input.compatibleNamespaceVersion }), - ...(input.definition != null && { definition: se_DefinitionDocument(input.definition, context) }), - ...(input.id != null && { id: input.id }), - }; -}; +// se_UpdateSystemTemplateRequest omitted. -/** - * serializeAws_json1_1UploadEntityDefinitionsRequest - */ -const se_UploadEntityDefinitionsRequest = (input: UploadEntityDefinitionsRequest, context: __SerdeContext): any => { - return { - ...(input.deprecateExistingEntities != null && { deprecateExistingEntities: input.deprecateExistingEntities }), - ...(input.document != null && { document: se_DefinitionDocument(input.document, context) }), - ...(input.syncWithPublicNamespace != null && { syncWithPublicNamespace: input.syncWithPublicNamespace }), - }; -}; +// se_UploadEntityDefinitionsRequest omitted. -/** - * serializeAws_json1_1Urns - */ -const se_Urns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Urns omitted. -/** - * deserializeAws_json1_1AssociateEntityToThingResponse - */ -const de_AssociateEntityToThingResponse = (output: any, context: __SerdeContext): AssociateEntityToThingResponse => { - return {} as any; -}; +// de_AssociateEntityToThingResponse omitted. /** * deserializeAws_json1_1CreateFlowTemplateResponse */ const de_CreateFlowTemplateResponse = (output: any, context: __SerdeContext): CreateFlowTemplateResponse => { - return { - summary: output.summary != null ? de_FlowTemplateSummary(output.summary, context) : undefined, - } as any; + return take(output, { + summary: (_: any) => de_FlowTemplateSummary(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateSystemInstanceResponse */ const de_CreateSystemInstanceResponse = (output: any, context: __SerdeContext): CreateSystemInstanceResponse => { - return { - summary: output.summary != null ? de_SystemInstanceSummary(output.summary, context) : undefined, - } as any; + return take(output, { + summary: (_: any) => de_SystemInstanceSummary(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateSystemTemplateResponse */ const de_CreateSystemTemplateResponse = (output: any, context: __SerdeContext): CreateSystemTemplateResponse => { - return { - summary: output.summary != null ? de_SystemTemplateSummary(output.summary, context) : undefined, - } as any; + return take(output, { + summary: (_: any) => de_SystemTemplateSummary(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DefinitionDocument - */ -const de_DefinitionDocument = (output: any, context: __SerdeContext): DefinitionDocument => { - return { - language: __expectString(output.language), - text: __expectString(output.text), - } as any; -}; +// de_DefinitionDocument omitted. -/** - * deserializeAws_json1_1DeleteFlowTemplateResponse - */ -const de_DeleteFlowTemplateResponse = (output: any, context: __SerdeContext): DeleteFlowTemplateResponse => { - return {} as any; -}; +// de_DeleteFlowTemplateResponse omitted. -/** - * deserializeAws_json1_1DeleteNamespaceResponse - */ -const de_DeleteNamespaceResponse = (output: any, context: __SerdeContext): DeleteNamespaceResponse => { - return { - namespaceArn: __expectString(output.namespaceArn), - namespaceName: __expectString(output.namespaceName), - } as any; -}; +// de_DeleteNamespaceResponse omitted. -/** - * deserializeAws_json1_1DeleteSystemInstanceResponse - */ -const de_DeleteSystemInstanceResponse = (output: any, context: __SerdeContext): DeleteSystemInstanceResponse => { - return {} as any; -}; +// de_DeleteSystemInstanceResponse omitted. -/** - * deserializeAws_json1_1DeleteSystemTemplateResponse - */ -const de_DeleteSystemTemplateResponse = (output: any, context: __SerdeContext): DeleteSystemTemplateResponse => { - return {} as any; -}; +// de_DeleteSystemTemplateResponse omitted. -/** - * deserializeAws_json1_1DependencyRevision - */ -const de_DependencyRevision = (output: any, context: __SerdeContext): DependencyRevision => { - return { - id: __expectString(output.id), - revisionNumber: __expectLong(output.revisionNumber), - } as any; -}; +// de_DependencyRevision omitted. -/** - * deserializeAws_json1_1DependencyRevisions - */ -const de_DependencyRevisions = (output: any, context: __SerdeContext): DependencyRevision[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DependencyRevision(entry, context); - }); - return retVal; -}; +// de_DependencyRevisions omitted. /** * deserializeAws_json1_1DeploySystemInstanceResponse */ const de_DeploySystemInstanceResponse = (output: any, context: __SerdeContext): DeploySystemInstanceResponse => { - return { - greengrassDeploymentId: __expectString(output.greengrassDeploymentId), - summary: output.summary != null ? de_SystemInstanceSummary(output.summary, context) : undefined, - } as any; + return take(output, { + greengrassDeploymentId: __expectString, + summary: (_: any) => de_SystemInstanceSummary(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeprecateFlowTemplateResponse - */ -const de_DeprecateFlowTemplateResponse = (output: any, context: __SerdeContext): DeprecateFlowTemplateResponse => { - return {} as any; -}; +// de_DeprecateFlowTemplateResponse omitted. -/** - * deserializeAws_json1_1DeprecateSystemTemplateResponse - */ -const de_DeprecateSystemTemplateResponse = (output: any, context: __SerdeContext): DeprecateSystemTemplateResponse => { - return {} as any; -}; +// de_DeprecateSystemTemplateResponse omitted. -/** - * deserializeAws_json1_1DescribeNamespaceResponse - */ -const de_DescribeNamespaceResponse = (output: any, context: __SerdeContext): DescribeNamespaceResponse => { - return { - namespaceArn: __expectString(output.namespaceArn), - namespaceName: __expectString(output.namespaceName), - namespaceVersion: __expectLong(output.namespaceVersion), - trackingNamespaceName: __expectString(output.trackingNamespaceName), - trackingNamespaceVersion: __expectLong(output.trackingNamespaceVersion), - } as any; -}; +// de_DescribeNamespaceResponse omitted. -/** - * deserializeAws_json1_1DissociateEntityFromThingResponse - */ -const de_DissociateEntityFromThingResponse = ( - output: any, - context: __SerdeContext -): DissociateEntityFromThingResponse => { - return {} as any; -}; +// de_DissociateEntityFromThingResponse omitted. /** * deserializeAws_json1_1EntityDescription */ const de_EntityDescription = (output: any, context: __SerdeContext): EntityDescription => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - definition: output.definition != null ? de_DefinitionDocument(output.definition, context) : undefined, - id: __expectString(output.id), - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + definition: _json, + id: __expectString, + type: __expectString, + }) as any; }; /** @@ -3464,9 +2877,6 @@ const de_EntityDescriptions = (output: any, context: __SerdeContext): EntityDesc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntityDescription(entry, context); }); return retVal; @@ -3476,13 +2886,12 @@ const de_EntityDescriptions = (output: any, context: __SerdeContext): EntityDesc * deserializeAws_json1_1FlowExecutionMessage */ const de_FlowExecutionMessage = (output: any, context: __SerdeContext): FlowExecutionMessage => { - return { - eventType: __expectString(output.eventType), - messageId: __expectString(output.messageId), - payload: __expectString(output.payload), - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - } as any; + return take(output, { + eventType: __expectString, + messageId: __expectString, + payload: __expectString, + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3492,9 +2901,6 @@ const de_FlowExecutionMessages = (output: any, context: __SerdeContext): FlowExe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FlowExecutionMessage(entry, context); }); return retVal; @@ -3507,9 +2913,6 @@ const de_FlowExecutionSummaries = (output: any, context: __SerdeContext): FlowEx const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FlowExecutionSummary(entry, context); }); return retVal; @@ -3519,27 +2922,25 @@ const de_FlowExecutionSummaries = (output: any, context: __SerdeContext): FlowEx * deserializeAws_json1_1FlowExecutionSummary */ const de_FlowExecutionSummary = (output: any, context: __SerdeContext): FlowExecutionSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - flowExecutionId: __expectString(output.flowExecutionId), - flowTemplateId: __expectString(output.flowTemplateId), - status: __expectString(output.status), - systemInstanceId: __expectString(output.systemInstanceId), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + flowExecutionId: __expectString, + flowTemplateId: __expectString, + status: __expectString, + systemInstanceId: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1FlowTemplateDescription */ const de_FlowTemplateDescription = (output: any, context: __SerdeContext): FlowTemplateDescription => { - return { - definition: output.definition != null ? de_DefinitionDocument(output.definition, context) : undefined, - summary: output.summary != null ? de_FlowTemplateSummary(output.summary, context) : undefined, - validatedNamespaceVersion: __expectLong(output.validatedNamespaceVersion), - } as any; + return take(output, { + definition: _json, + summary: (_: any) => de_FlowTemplateSummary(_, context), + validatedNamespaceVersion: __expectLong, + }) as any; }; /** @@ -3549,9 +2950,6 @@ const de_FlowTemplateSummaries = (output: any, context: __SerdeContext): FlowTem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FlowTemplateSummary(entry, context); }); return retVal; @@ -3561,31 +2959,30 @@ const de_FlowTemplateSummaries = (output: any, context: __SerdeContext): FlowTem * deserializeAws_json1_1FlowTemplateSummary */ const de_FlowTemplateSummary = (output: any, context: __SerdeContext): FlowTemplateSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - revisionNumber: __expectLong(output.revisionNumber), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + revisionNumber: __expectLong, + }) as any; }; /** * deserializeAws_json1_1GetEntitiesResponse */ const de_GetEntitiesResponse = (output: any, context: __SerdeContext): GetEntitiesResponse => { - return { - descriptions: output.descriptions != null ? de_EntityDescriptions(output.descriptions, context) : undefined, - } as any; + return take(output, { + descriptions: (_: any) => de_EntityDescriptions(_, context), + }) as any; }; /** * deserializeAws_json1_1GetFlowTemplateResponse */ const de_GetFlowTemplateResponse = (output: any, context: __SerdeContext): GetFlowTemplateResponse => { - return { - description: output.description != null ? de_FlowTemplateDescription(output.description, context) : undefined, - } as any; + return take(output, { + description: (_: any) => de_FlowTemplateDescription(_, context), + }) as any; }; /** @@ -3595,44 +2992,30 @@ const de_GetFlowTemplateRevisionsResponse = ( output: any, context: __SerdeContext ): GetFlowTemplateRevisionsResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_FlowTemplateSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_FlowTemplateSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetNamespaceDeletionStatusResponse - */ -const de_GetNamespaceDeletionStatusResponse = ( - output: any, - context: __SerdeContext -): GetNamespaceDeletionStatusResponse => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - namespaceArn: __expectString(output.namespaceArn), - namespaceName: __expectString(output.namespaceName), - status: __expectString(output.status), - } as any; -}; +// de_GetNamespaceDeletionStatusResponse omitted. /** * deserializeAws_json1_1GetSystemInstanceResponse */ const de_GetSystemInstanceResponse = (output: any, context: __SerdeContext): GetSystemInstanceResponse => { - return { - description: output.description != null ? de_SystemInstanceDescription(output.description, context) : undefined, - } as any; + return take(output, { + description: (_: any) => de_SystemInstanceDescription(_, context), + }) as any; }; /** * deserializeAws_json1_1GetSystemTemplateResponse */ const de_GetSystemTemplateResponse = (output: any, context: __SerdeContext): GetSystemTemplateResponse => { - return { - description: output.description != null ? de_SystemTemplateDescription(output.description, context) : undefined, - } as any; + return take(output, { + description: (_: any) => de_SystemTemplateDescription(_, context), + }) as any; }; /** @@ -3642,56 +3025,32 @@ const de_GetSystemTemplateRevisionsResponse = ( output: any, context: __SerdeContext ): GetSystemTemplateRevisionsResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_SystemTemplateSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_SystemTemplateSummaries(_, context), + }) as any; }; /** * deserializeAws_json1_1GetUploadStatusResponse */ const de_GetUploadStatusResponse = (output: any, context: __SerdeContext): GetUploadStatusResponse => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - failureReason: output.failureReason != null ? de_StringList(output.failureReason, context) : undefined, - namespaceArn: __expectString(output.namespaceArn), - namespaceName: __expectString(output.namespaceName), - namespaceVersion: __expectLong(output.namespaceVersion), - uploadId: __expectString(output.uploadId), - uploadStatus: __expectString(output.uploadStatus), - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: _json, + namespaceArn: __expectString, + namespaceName: __expectString, + namespaceVersion: __expectLong, + uploadId: __expectString, + uploadStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InternalFailureException - */ -const de_InternalFailureException = (output: any, context: __SerdeContext): InternalFailureException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalFailureException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListFlowExecutionMessagesResponse @@ -3700,151 +3059,89 @@ const de_ListFlowExecutionMessagesResponse = ( output: any, context: __SerdeContext ): ListFlowExecutionMessagesResponse => { - return { - messages: output.messages != null ? de_FlowExecutionMessages(output.messages, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + messages: (_: any) => de_FlowExecutionMessages(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1MetricsConfiguration - */ -const de_MetricsConfiguration = (output: any, context: __SerdeContext): MetricsConfiguration => { - return { - cloudMetricEnabled: __expectBoolean(output.cloudMetricEnabled), - metricRuleRoleArn: __expectString(output.metricRuleRoleArn), - } as any; -}; +// de_MetricsConfiguration omitted. -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1SearchEntitiesResponse */ const de_SearchEntitiesResponse = (output: any, context: __SerdeContext): SearchEntitiesResponse => { - return { - descriptions: output.descriptions != null ? de_EntityDescriptions(output.descriptions, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + descriptions: (_: any) => de_EntityDescriptions(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1SearchFlowExecutionsResponse */ const de_SearchFlowExecutionsResponse = (output: any, context: __SerdeContext): SearchFlowExecutionsResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_FlowExecutionSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_FlowExecutionSummaries(_, context), + }) as any; }; /** * deserializeAws_json1_1SearchFlowTemplatesResponse */ const de_SearchFlowTemplatesResponse = (output: any, context: __SerdeContext): SearchFlowTemplatesResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_FlowTemplateSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_FlowTemplateSummaries(_, context), + }) as any; }; /** * deserializeAws_json1_1SearchSystemInstancesResponse */ const de_SearchSystemInstancesResponse = (output: any, context: __SerdeContext): SearchSystemInstancesResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_SystemInstanceSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_SystemInstanceSummaries(_, context), + }) as any; }; /** * deserializeAws_json1_1SearchSystemTemplatesResponse */ const de_SearchSystemTemplatesResponse = (output: any, context: __SerdeContext): SearchSystemTemplatesResponse => { - return { - nextToken: __expectString(output.nextToken), - summaries: output.summaries != null ? de_SystemTemplateSummaries(output.summaries, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + summaries: (_: any) => de_SystemTemplateSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SearchThingsResponse - */ -const de_SearchThingsResponse = (output: any, context: __SerdeContext): SearchThingsResponse => { - return { - nextToken: __expectString(output.nextToken), - things: output.things != null ? de_Things(output.things, context) : undefined, - } as any; -}; +// de_SearchThingsResponse omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. /** * deserializeAws_json1_1SystemInstanceDescription */ const de_SystemInstanceDescription = (output: any, context: __SerdeContext): SystemInstanceDescription => { - return { - definition: output.definition != null ? de_DefinitionDocument(output.definition, context) : undefined, - flowActionsRoleArn: __expectString(output.flowActionsRoleArn), - metricsConfiguration: - output.metricsConfiguration != null ? de_MetricsConfiguration(output.metricsConfiguration, context) : undefined, - s3BucketName: __expectString(output.s3BucketName), - summary: output.summary != null ? de_SystemInstanceSummary(output.summary, context) : undefined, - validatedDependencyRevisions: - output.validatedDependencyRevisions != null - ? de_DependencyRevisions(output.validatedDependencyRevisions, context) - : undefined, - validatedNamespaceVersion: __expectLong(output.validatedNamespaceVersion), - } as any; + return take(output, { + definition: _json, + flowActionsRoleArn: __expectString, + metricsConfiguration: _json, + s3BucketName: __expectString, + summary: (_: any) => de_SystemInstanceSummary(_, context), + validatedDependencyRevisions: _json, + validatedNamespaceVersion: __expectLong, + }) as any; }; /** @@ -3854,9 +3151,6 @@ const de_SystemInstanceSummaries = (output: any, context: __SerdeContext): Syste const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SystemInstanceSummary(entry, context); }); return retVal; @@ -3866,30 +3160,28 @@ const de_SystemInstanceSummaries = (output: any, context: __SerdeContext): Syste * deserializeAws_json1_1SystemInstanceSummary */ const de_SystemInstanceSummary = (output: any, context: __SerdeContext): SystemInstanceSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - greengrassGroupId: __expectString(output.greengrassGroupId), - greengrassGroupName: __expectString(output.greengrassGroupName), - greengrassGroupVersionId: __expectString(output.greengrassGroupVersionId), - id: __expectString(output.id), - status: __expectString(output.status), - target: __expectString(output.target), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + greengrassGroupId: __expectString, + greengrassGroupName: __expectString, + greengrassGroupVersionId: __expectString, + id: __expectString, + status: __expectString, + target: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1SystemTemplateDescription */ const de_SystemTemplateDescription = (output: any, context: __SerdeContext): SystemTemplateDescription => { - return { - definition: output.definition != null ? de_DefinitionDocument(output.definition, context) : undefined, - summary: output.summary != null ? de_SystemTemplateSummary(output.summary, context) : undefined, - validatedNamespaceVersion: __expectLong(output.validatedNamespaceVersion), - } as any; + return take(output, { + definition: _json, + summary: (_: any) => de_SystemTemplateSummary(_, context), + validatedNamespaceVersion: __expectLong, + }) as any; }; /** @@ -3899,9 +3191,6 @@ const de_SystemTemplateSummaries = (output: any, context: __SerdeContext): Syste const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SystemTemplateSummary(entry, context); }); return retVal; @@ -3911,123 +3200,56 @@ const de_SystemTemplateSummaries = (output: any, context: __SerdeContext): Syste * deserializeAws_json1_1SystemTemplateSummary */ const de_SystemTemplateSummary = (output: any, context: __SerdeContext): SystemTemplateSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - id: __expectString(output.id), - revisionNumber: __expectLong(output.revisionNumber), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + revisionNumber: __expectLong, + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1Thing - */ -const de_Thing = (output: any, context: __SerdeContext): Thing => { - return { - thingArn: __expectString(output.thingArn), - thingName: __expectString(output.thingName), - } as any; -}; +// de_Thing omitted. -/** - * deserializeAws_json1_1Things - */ -const de_Things = (output: any, context: __SerdeContext): Thing[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Thing(entry, context); - }); - return retVal; -}; +// de_Things omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. /** * deserializeAws_json1_1UndeploySystemInstanceResponse */ const de_UndeploySystemInstanceResponse = (output: any, context: __SerdeContext): UndeploySystemInstanceResponse => { - return { - summary: output.summary != null ? de_SystemInstanceSummary(output.summary, context) : undefined, - } as any; + return take(output, { + summary: (_: any) => de_SystemInstanceSummary(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateFlowTemplateResponse */ const de_UpdateFlowTemplateResponse = (output: any, context: __SerdeContext): UpdateFlowTemplateResponse => { - return { - summary: output.summary != null ? de_FlowTemplateSummary(output.summary, context) : undefined, - } as any; + return take(output, { + summary: (_: any) => de_FlowTemplateSummary(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateSystemTemplateResponse */ const de_UpdateSystemTemplateResponse = (output: any, context: __SerdeContext): UpdateSystemTemplateResponse => { - return { - summary: output.summary != null ? de_SystemTemplateSummary(output.summary, context) : undefined, - } as any; + return take(output, { + summary: (_: any) => de_SystemTemplateSummary(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UploadEntityDefinitionsResponse - */ -const de_UploadEntityDefinitionsResponse = (output: any, context: __SerdeContext): UploadEntityDefinitionsResponse => { - return { - uploadId: __expectString(output.uploadId), - } as any; -}; +// de_UploadEntityDefinitionsResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4049,6 +3271,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-iottwinmaker/src/protocols/Aws_restJson1.ts b/clients/client-iottwinmaker/src/protocols/Aws_restJson1.ts index bc3738ebab85..8ade9241de96 100644 --- a/clients/client-iottwinmaker/src/protocols/Aws_restJson1.ts +++ b/clients/client-iottwinmaker/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -15,11 +16,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -85,10 +87,7 @@ import { AccessDeniedException, BatchPutPropertyError, BatchPutPropertyErrorEntry, - BundleInformation, - ColumnDescription, ComponentPropertyGroupRequest, - ComponentPropertyGroupResponse, ComponentRequest, ComponentResponse, ComponentTypeSummary, @@ -101,9 +100,7 @@ import { DataValue, EntityPropertyReference, EntitySummary, - ErrorDetails, FunctionRequest, - FunctionResponse, InternalServerException, InterpolationParameters, LambdaFunction, @@ -116,7 +113,6 @@ import { PropertyDefinitionResponse, PropertyFilter, PropertyGroupRequest, - PropertyGroupResponse, PropertyLatestValue, PropertyRequest, PropertyResponse, @@ -130,11 +126,8 @@ import { Row, SceneSummary, ServiceQuotaExceededException, - Status, - SyncJobStatus, SyncJobSummary, SyncResourceFilter, - SyncResourceStatus, SyncResourceSummary, TabularConditions, ThrottlingException, @@ -159,9 +152,11 @@ export const se_BatchPutPropertyValuesCommand = async ( "/workspaces/{workspaceId}/entity-properties"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.entries != null && { entries: se_Entries(input.entries, context) }), - }); + body = JSON.stringify( + take(input, { + entries: (_) => se_Entries(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -204,18 +199,18 @@ export const se_CreateComponentTypeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.componentTypeName != null && { componentTypeName: input.componentTypeName }), - ...(input.description != null && { description: input.description }), - ...(input.extendsFrom != null && { extendsFrom: se_ExtendsFrom(input.extendsFrom, context) }), - ...(input.functions != null && { functions: se_FunctionsRequest(input.functions, context) }), - ...(input.isSingleton != null && { isSingleton: input.isSingleton }), - ...(input.propertyDefinitions != null && { - propertyDefinitions: se_PropertyDefinitionsRequest(input.propertyDefinitions, context), - }), - ...(input.propertyGroups != null && { propertyGroups: se_PropertyGroupsRequest(input.propertyGroups, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + componentTypeName: [], + description: [], + extendsFrom: (_) => _json(_), + functions: (_) => _json(_), + isSingleton: [], + propertyDefinitions: (_) => se_PropertyDefinitionsRequest(_, context), + propertyGroups: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -249,14 +244,16 @@ export const se_CreateEntityCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/entities"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.components != null && { components: se_ComponentsMapRequest(input.components, context) }), - ...(input.description != null && { description: input.description }), - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.entityName != null && { entityName: input.entityName }), - ...(input.parentEntityId != null && { parentEntityId: input.parentEntityId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + components: (_) => se_ComponentsMapRequest(_, context), + description: [], + entityId: [], + entityName: [], + parentEntityId: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -290,14 +287,16 @@ export const se_CreateSceneCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/scenes"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.capabilities != null && { capabilities: se_SceneCapabilities(input.capabilities, context) }), - ...(input.contentLocation != null && { contentLocation: input.contentLocation }), - ...(input.description != null && { description: input.description }), - ...(input.sceneId != null && { sceneId: input.sceneId }), - ...(input.sceneMetadata != null && { sceneMetadata: se_SceneMetadataMap(input.sceneMetadata, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + capabilities: (_) => _json(_), + contentLocation: [], + description: [], + sceneId: [], + sceneMetadata: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -333,10 +332,12 @@ export const se_CreateSyncJobCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "syncSource", () => input.syncSource!, "{syncSource}", false); let body: any; - body = JSON.stringify({ - ...(input.syncRole != null && { syncRole: input.syncRole }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + syncRole: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -370,12 +371,14 @@ export const se_CreateWorkspaceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.role != null && { role: input.role }), - ...(input.s3Location != null && { s3Location: input.s3Location }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + role: [], + s3Location: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -581,12 +584,14 @@ export const se_ExecuteQueryCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/queries/execution"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.queryStatement != null && { queryStatement: input.queryStatement }), - ...(input.workspaceId != null && { workspaceId: input.workspaceId }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + queryStatement: [], + workspaceId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -726,20 +731,18 @@ export const se_GetPropertyValueCommand = async ( "/workspaces/{workspaceId}/entity-properties/value"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }), - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.propertyGroupName != null && { propertyGroupName: input.propertyGroupName }), - ...(input.selectedProperties != null && { - selectedProperties: se_SelectedPropertyList(input.selectedProperties, context), - }), - ...(input.tabularConditions != null && { - tabularConditions: se_TabularConditions(input.tabularConditions, context), - }), - }); + body = JSON.stringify( + take(input, { + componentName: [], + componentTypeId: [], + entityId: [], + maxResults: [], + nextToken: [], + propertyGroupName: [], + selectedProperties: (_) => _json(_), + tabularConditions: (_) => se_TabularConditions(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -774,23 +777,23 @@ export const se_GetPropertyValueHistoryCommand = async ( "/workspaces/{workspaceId}/entity-properties/history"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }), - ...(input.endDateTime != null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) }), - ...(input.endTime != null && { endTime: input.endTime }), - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.interpolation != null && { interpolation: se_InterpolationParameters(input.interpolation, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.orderByTime != null && { orderByTime: input.orderByTime }), - ...(input.propertyFilters != null && { propertyFilters: se_PropertyFilters(input.propertyFilters, context) }), - ...(input.selectedProperties != null && { - selectedProperties: se_SelectedPropertyList(input.selectedProperties, context), - }), - ...(input.startDateTime != null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }), - ...(input.startTime != null && { startTime: input.startTime }), - }); + body = JSON.stringify( + take(input, { + componentName: [], + componentTypeId: [], + endDateTime: (_) => Math.round(_.getTime() / 1000), + endTime: [], + entityId: [], + interpolation: (_) => _json(_), + maxResults: [], + nextToken: [], + orderByTime: [], + propertyFilters: (_) => se_PropertyFilters(_, context), + selectedProperties: (_) => _json(_), + startDateTime: (_) => Math.round(_.getTime() / 1000), + startTime: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data." + resolvedHostname; @@ -923,11 +926,13 @@ export const se_ListComponentTypesCommand = async ( "/workspaces/{workspaceId}/component-types-list"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ListComponentTypesFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -961,11 +966,13 @@ export const se_ListEntitiesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/entities-list"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ListEntitiesFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -999,10 +1006,12 @@ export const se_ListScenesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/scenes-list"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1036,10 +1045,12 @@ export const se_ListSyncJobsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}/sync-jobs-list"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1075,11 +1086,13 @@ export const se_ListSyncResourcesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "syncSource", () => input.syncSource!, "{syncSource}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SyncResourceFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1111,11 +1124,13 @@ export const se_ListTagsForResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags-list"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceARN != null && { resourceARN: input.resourceARN }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + resourceARN: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1147,10 +1162,12 @@ export const se_ListWorkspacesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces-list"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1182,10 +1199,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags"; let body: any; - body = JSON.stringify({ - ...(input.resourceARN != null && { resourceARN: input.resourceARN }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + resourceARN: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1265,17 +1284,17 @@ export const se_UpdateComponentTypeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.componentTypeName != null && { componentTypeName: input.componentTypeName }), - ...(input.description != null && { description: input.description }), - ...(input.extendsFrom != null && { extendsFrom: se_ExtendsFrom(input.extendsFrom, context) }), - ...(input.functions != null && { functions: se_FunctionsRequest(input.functions, context) }), - ...(input.isSingleton != null && { isSingleton: input.isSingleton }), - ...(input.propertyDefinitions != null && { - propertyDefinitions: se_PropertyDefinitionsRequest(input.propertyDefinitions, context), - }), - ...(input.propertyGroups != null && { propertyGroups: se_PropertyGroupsRequest(input.propertyGroups, context) }), - }); + body = JSON.stringify( + take(input, { + componentTypeName: [], + description: [], + extendsFrom: (_) => _json(_), + functions: (_) => _json(_), + isSingleton: [], + propertyDefinitions: (_) => se_PropertyDefinitionsRequest(_, context), + propertyGroups: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1311,16 +1330,14 @@ export const se_UpdateEntityCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "entityId", () => input.entityId!, "{entityId}", false); let body: any; - body = JSON.stringify({ - ...(input.componentUpdates != null && { - componentUpdates: se_ComponentUpdatesMapRequest(input.componentUpdates, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.entityName != null && { entityName: input.entityName }), - ...(input.parentEntityUpdate != null && { - parentEntityUpdate: se_ParentEntityUpdateRequest(input.parentEntityUpdate, context), - }), - }); + body = JSON.stringify( + take(input, { + componentUpdates: (_) => se_ComponentUpdatesMapRequest(_, context), + description: [], + entityName: [], + parentEntityUpdate: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1352,10 +1369,12 @@ export const se_UpdatePricingPlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/pricingplan"; let body: any; - body = JSON.stringify({ - ...(input.bundleNames != null && { bundleNames: se_PricingBundles(input.bundleNames, context) }), - ...(input.pricingMode != null && { pricingMode: input.pricingMode }), - }); + body = JSON.stringify( + take(input, { + bundleNames: (_) => _json(_), + pricingMode: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1391,12 +1410,14 @@ export const se_UpdateSceneCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "sceneId", () => input.sceneId!, "{sceneId}", false); let body: any; - body = JSON.stringify({ - ...(input.capabilities != null && { capabilities: se_SceneCapabilities(input.capabilities, context) }), - ...(input.contentLocation != null && { contentLocation: input.contentLocation }), - ...(input.description != null && { description: input.description }), - ...(input.sceneMetadata != null && { sceneMetadata: se_SceneMetadataMap(input.sceneMetadata, context) }), - }); + body = JSON.stringify( + take(input, { + capabilities: (_) => _json(_), + contentLocation: [], + description: [], + sceneMetadata: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1430,10 +1451,12 @@ export const se_UpdateWorkspaceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces/{workspaceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "workspaceId", () => input.workspaceId!, "{workspaceId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.role != null && { role: input.role }), - }); + body = JSON.stringify( + take(input, { + description: [], + role: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -1466,9 +1489,10 @@ export const de_BatchPutPropertyValuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errorEntries != null) { - contents.errorEntries = de_ErrorEntries(data.errorEntries, context); - } + const doc = take(data, { + errorEntries: (_) => de_ErrorEntries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1499,10 +1523,9 @@ const de_BatchPutPropertyValuesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1522,15 +1545,12 @@ export const de_CreateComponentTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1567,10 +1587,9 @@ const de_CreateComponentTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1590,18 +1609,13 @@ export const de_CreateEntityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.entityId != null) { - contents.entityId = __expectString(data.entityId); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + entityId: __expectString, + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1638,10 +1652,9 @@ const de_CreateEntityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1661,12 +1674,11 @@ export const de_CreateSceneCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1703,10 +1715,9 @@ const de_CreateSceneCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1726,15 +1737,12 @@ export const de_CreateSyncJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1771,10 +1779,9 @@ const de_CreateSyncJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1794,12 +1801,11 @@ export const de_CreateWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1836,10 +1842,9 @@ const de_CreateWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1859,9 +1864,10 @@ export const de_DeleteComponentTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1895,10 +1901,9 @@ const de_DeleteComponentTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1918,9 +1923,10 @@ export const de_DeleteEntityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1954,10 +1960,9 @@ const de_DeleteEntityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,10 +2015,9 @@ const de_DeleteSceneCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2033,9 +2037,10 @@ export const de_DeleteSyncJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2072,10 +2077,9 @@ const de_DeleteSyncJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2128,10 +2132,9 @@ const de_DeleteWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2151,15 +2154,12 @@ export const de_ExecuteQueryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.columnDescriptions != null) { - contents.columnDescriptions = de_ColumnDescriptions(data.columnDescriptions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.rows != null) { - contents.rows = de_Rows(data.rows, context); - } + const doc = take(data, { + columnDescriptions: _json, + nextToken: __expectString, + rows: (_) => de_Rows(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2196,10 +2196,9 @@ const de_ExecuteQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2219,54 +2218,25 @@ export const de_GetComponentTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.componentTypeId != null) { - contents.componentTypeId = __expectString(data.componentTypeId); - } - if (data.componentTypeName != null) { - contents.componentTypeName = __expectString(data.componentTypeName); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.extendsFrom != null) { - contents.extendsFrom = de_ExtendsFrom(data.extendsFrom, context); - } - if (data.functions != null) { - contents.functions = de_FunctionsResponse(data.functions, context); - } - if (data.isAbstract != null) { - contents.isAbstract = __expectBoolean(data.isAbstract); - } - if (data.isSchemaInitialized != null) { - contents.isSchemaInitialized = __expectBoolean(data.isSchemaInitialized); - } - if (data.isSingleton != null) { - contents.isSingleton = __expectBoolean(data.isSingleton); - } - if (data.propertyDefinitions != null) { - contents.propertyDefinitions = de_PropertyDefinitionsResponse(data.propertyDefinitions, context); - } - if (data.propertyGroups != null) { - contents.propertyGroups = de_PropertyGroupsResponse(data.propertyGroups, context); - } - if (data.status != null) { - contents.status = de_Status(data.status, context); - } - if (data.syncSource != null) { - contents.syncSource = __expectString(data.syncSource); - } - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + componentTypeId: __expectString, + componentTypeName: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + extendsFrom: _json, + functions: _json, + isAbstract: __expectBoolean, + isSchemaInitialized: __expectBoolean, + isSingleton: __expectBoolean, + propertyDefinitions: (_) => de_PropertyDefinitionsResponse(_, context), + propertyGroups: _json, + status: _json, + syncSource: __expectString, + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2300,10 +2270,9 @@ const de_GetComponentTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2323,42 +2292,21 @@ export const de_GetEntityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.components != null) { - contents.components = de_ComponentsMap(data.components, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.entityId != null) { - contents.entityId = __expectString(data.entityId); - } - if (data.entityName != null) { - contents.entityName = __expectString(data.entityName); - } - if (data.hasChildEntities != null) { - contents.hasChildEntities = __expectBoolean(data.hasChildEntities); - } - if (data.parentEntityId != null) { - contents.parentEntityId = __expectString(data.parentEntityId); - } - if (data.status != null) { - contents.status = de_Status(data.status, context); - } - if (data.syncSource != null) { - contents.syncSource = __expectString(data.syncSource); - } - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + components: (_) => de_ComponentsMap(_, context), + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + entityId: __expectString, + entityName: __expectString, + hasChildEntities: __expectBoolean, + parentEntityId: __expectString, + status: _json, + syncSource: __expectString, + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2392,10 +2340,9 @@ const de_GetEntityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2415,12 +2362,11 @@ export const de_GetPricingPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.currentPricingPlan != null) { - contents.currentPricingPlan = de_PricingPlan(data.currentPricingPlan, context); - } - if (data.pendingPricingPlan != null) { - contents.pendingPricingPlan = de_PricingPlan(data.pendingPricingPlan, context); - } + const doc = take(data, { + currentPricingPlan: (_) => de_PricingPlan(_, context), + pendingPricingPlan: (_) => de_PricingPlan(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2451,10 +2397,9 @@ const de_GetPricingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2474,15 +2419,12 @@ export const de_GetPropertyValueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.propertyValues != null) { - contents.propertyValues = de_PropertyLatestValueMap(data.propertyValues, context); - } - if (data.tabularPropertyValues != null) { - contents.tabularPropertyValues = de_TabularPropertyValues(data.tabularPropertyValues, context); - } + const doc = take(data, { + nextToken: __expectString, + propertyValues: (_) => de_PropertyLatestValueMap(_, context), + tabularPropertyValues: (_) => de_TabularPropertyValues(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2522,10 +2464,9 @@ const de_GetPropertyValueCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2545,12 +2486,11 @@ export const de_GetPropertyValueHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.propertyValues != null) { - contents.propertyValues = de_PropertyValueList(data.propertyValues, context); - } + const doc = take(data, { + nextToken: __expectString, + propertyValues: (_) => de_PropertyValueList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2590,10 +2530,9 @@ const de_GetPropertyValueHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2613,36 +2552,19 @@ export const de_GetSceneCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.capabilities != null) { - contents.capabilities = de_SceneCapabilities(data.capabilities, context); - } - if (data.contentLocation != null) { - contents.contentLocation = __expectString(data.contentLocation); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.generatedSceneMetadata != null) { - contents.generatedSceneMetadata = de_GeneratedSceneMetadataMap(data.generatedSceneMetadata, context); - } - if (data.sceneId != null) { - contents.sceneId = __expectString(data.sceneId); - } - if (data.sceneMetadata != null) { - contents.sceneMetadata = de_SceneMetadataMap(data.sceneMetadata, context); - } - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + capabilities: _json, + contentLocation: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + generatedSceneMetadata: _json, + sceneId: __expectString, + sceneMetadata: _json, + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2676,10 +2598,9 @@ const de_GetSceneCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2699,27 +2620,16 @@ export const de_GetSyncJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.status != null) { - contents.status = de_SyncJobStatus(data.status, context); - } - if (data.syncRole != null) { - contents.syncRole = __expectString(data.syncRole); - } - if (data.syncSource != null) { - contents.syncSource = __expectString(data.syncSource); - } - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + syncRole: __expectString, + syncSource: __expectString, + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2756,10 +2666,9 @@ const de_GetSyncJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2779,27 +2688,16 @@ export const de_GetWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.role != null) { - contents.role = __expectString(data.role); - } - if (data.s3Location != null) { - contents.s3Location = __expectString(data.s3Location); - } - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + role: __expectString, + s3Location: __expectString, + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2833,10 +2731,9 @@ const de_GetWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2856,18 +2753,13 @@ export const de_ListComponentTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentTypeSummaries != null) { - contents.componentTypeSummaries = de_ComponentTypeSummaries(data.componentTypeSummaries, context); - } - if (data.maxResults != null) { - contents.maxResults = __expectInt32(data.maxResults); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + componentTypeSummaries: (_) => de_ComponentTypeSummaries(_, context), + maxResults: __expectInt32, + nextToken: __expectString, + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2898,10 +2790,9 @@ const de_ListComponentTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2921,12 +2812,11 @@ export const de_ListEntitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entitySummaries != null) { - contents.entitySummaries = de_EntitySummaries(data.entitySummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + entitySummaries: (_) => de_EntitySummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2957,10 +2847,9 @@ const de_ListEntitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2980,12 +2869,11 @@ export const de_ListScenesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sceneSummaries != null) { - contents.sceneSummaries = de_SceneSummaries(data.sceneSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + sceneSummaries: (_) => de_SceneSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3016,10 +2904,9 @@ const de_ListScenesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3039,12 +2926,11 @@ export const de_ListSyncJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.syncJobSummaries != null) { - contents.syncJobSummaries = de_SyncJobSummaries(data.syncJobSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + syncJobSummaries: (_) => de_SyncJobSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3078,10 +2964,9 @@ const de_ListSyncJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3101,12 +2986,11 @@ export const de_ListSyncResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.syncResources != null) { - contents.syncResources = de_SyncResourceSummaries(data.syncResources, context); - } + const doc = take(data, { + nextToken: __expectString, + syncResources: (_) => de_SyncResourceSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3140,10 +3024,9 @@ const de_ListSyncResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3163,12 +3046,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + nextToken: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3193,10 +3075,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3216,12 +3097,11 @@ export const de_ListWorkspacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workspaceSummaries != null) { - contents.workspaceSummaries = de_WorkspaceSummaries(data.workspaceSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + workspaceSummaries: (_) => de_WorkspaceSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3252,10 +3132,9 @@ const de_ListWorkspacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3302,10 +3181,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3349,10 +3227,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3372,18 +3249,13 @@ export const de_UpdateComponentTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.componentTypeId != null) { - contents.componentTypeId = __expectString(data.componentTypeId); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.workspaceId != null) { - contents.workspaceId = __expectString(data.workspaceId); - } + const doc = take(data, { + arn: __expectString, + componentTypeId: __expectString, + state: __expectString, + workspaceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3420,10 +3292,9 @@ const de_UpdateComponentTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3443,12 +3314,11 @@ export const de_UpdateEntityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } + const doc = take(data, { + state: __expectString, + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -3488,10 +3358,9 @@ const de_UpdateEntityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3511,12 +3380,11 @@ export const de_UpdatePricingPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.currentPricingPlan != null) { - contents.currentPricingPlan = de_PricingPlan(data.currentPricingPlan, context); - } - if (data.pendingPricingPlan != null) { - contents.pendingPricingPlan = de_PricingPlan(data.pendingPricingPlan, context); - } + const doc = take(data, { + currentPricingPlan: (_) => de_PricingPlan(_, context), + pendingPricingPlan: (_) => de_PricingPlan(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3547,10 +3415,9 @@ const de_UpdatePricingPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3570,9 +3437,10 @@ export const de_UpdateSceneCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } + const doc = take(data, { + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -3606,10 +3474,9 @@ const de_UpdateSceneCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3629,9 +3496,10 @@ export const de_UpdateWorkspaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.updateDateTime != null) { - contents.updateDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.updateDateTime))); - } + const doc = take(data, { + updateDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -3668,16 +3536,15 @@ const de_UpdateWorkspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3687,9 +3554,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3703,9 +3571,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3722,9 +3591,10 @@ const de_ConnectorFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConnectorFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3741,9 +3611,10 @@ const de_ConnectorTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConnectorTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3760,9 +3631,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3779,9 +3651,10 @@ const de_QueryTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new QueryTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3798,9 +3671,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3817,9 +3691,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3833,9 +3708,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3852,9 +3728,10 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3868,9 +3745,10 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3878,45 +3756,20 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ComponentPropertyGroupRequest - */ -const se_ComponentPropertyGroupRequest = (input: ComponentPropertyGroupRequest, context: __SerdeContext): any => { - return { - ...(input.groupType != null && { groupType: input.groupType }), - ...(input.propertyNames != null && { propertyNames: se_PropertyNames(input.propertyNames, context) }), - ...(input.updateType != null && { updateType: input.updateType }), - }; -}; +// se_ComponentPropertyGroupRequest omitted. -/** - * serializeAws_restJson1ComponentPropertyGroupRequests - */ -const se_ComponentPropertyGroupRequests = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ComponentPropertyGroupRequest(value, context); - return acc; - }, {}); -}; +// se_ComponentPropertyGroupRequests omitted. /** * serializeAws_restJson1ComponentRequest */ const se_ComponentRequest = (input: ComponentRequest, context: __SerdeContext): any => { - return { - ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }), - ...(input.description != null && { description: input.description }), - ...(input.properties != null && { properties: se_PropertyRequests(input.properties, context) }), - ...(input.propertyGroups != null && { - propertyGroups: se_ComponentPropertyGroupRequests(input.propertyGroups, context), - }), - }; + return take(input, { + componentTypeId: [], + description: [], + properties: (_) => se_PropertyRequests(_, context), + propertyGroups: _json, + }); }; /** @@ -3936,15 +3789,13 @@ const se_ComponentsMapRequest = (input: Record, contex * serializeAws_restJson1ComponentUpdateRequest */ const se_ComponentUpdateRequest = (input: ComponentUpdateRequest, context: __SerdeContext): any => { - return { - ...(input.componentTypeId != null && { componentTypeId: input.componentTypeId }), - ...(input.description != null && { description: input.description }), - ...(input.propertyGroupUpdates != null && { - propertyGroupUpdates: se_ComponentPropertyGroupRequests(input.propertyGroupUpdates, context), - }), - ...(input.propertyUpdates != null && { propertyUpdates: se_PropertyRequests(input.propertyUpdates, context) }), - ...(input.updateType != null && { updateType: input.updateType }), - }; + return take(input, { + componentTypeId: [], + description: [], + propertyGroupUpdates: _json, + propertyUpdates: (_) => se_PropertyRequests(_, context), + updateType: [], + }); }; /** @@ -3960,59 +3811,38 @@ const se_ComponentUpdatesMapRequest = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Configuration omitted. -/** - * serializeAws_restJson1DataConnector - */ -const se_DataConnector = (input: DataConnector, context: __SerdeContext): any => { - return { - ...(input.isNative != null && { isNative: input.isNative }), - ...(input.lambda != null && { lambda: se_LambdaFunction(input.lambda, context) }), - }; -}; +// se_DataConnector omitted. /** * serializeAws_restJson1DataType */ const se_DataType = (input: DataType, context: __SerdeContext): any => { - return { - ...(input.allowedValues != null && { allowedValues: se_DataValueList(input.allowedValues, context) }), - ...(input.nestedType != null && { nestedType: se_DataType(input.nestedType, context) }), - ...(input.relationship != null && { relationship: se_Relationship(input.relationship, context) }), - ...(input.type != null && { type: input.type }), - ...(input.unitOfMeasure != null && { unitOfMeasure: input.unitOfMeasure }), - }; + return take(input, { + allowedValues: (_) => se_DataValueList(_, context), + nestedType: (_) => se_DataType(_, context), + relationship: _json, + type: [], + unitOfMeasure: [], + }); }; /** * serializeAws_restJson1DataValue */ const se_DataValue = (input: DataValue, context: __SerdeContext): any => { - return { - ...(input.booleanValue != null && { booleanValue: input.booleanValue }), - ...(input.doubleValue != null && { doubleValue: __serializeFloat(input.doubleValue) }), - ...(input.expression != null && { expression: input.expression }), - ...(input.integerValue != null && { integerValue: input.integerValue }), - ...(input.listValue != null && { listValue: se_DataValueList(input.listValue, context) }), - ...(input.longValue != null && { longValue: input.longValue }), - ...(input.mapValue != null && { mapValue: se_DataValueMap(input.mapValue, context) }), - ...(input.relationshipValue != null && { - relationshipValue: se_RelationshipValue(input.relationshipValue, context), - }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }; + return take(input, { + booleanValue: [], + doubleValue: __serializeFloat, + expression: [], + integerValue: [], + listValue: (_) => se_DataValueList(_, context), + longValue: [], + mapValue: (_) => se_DataValueMap(_, context), + relationshipValue: _json, + stringValue: [], + }); }; /** @@ -4039,19 +3869,7 @@ const se_DataValueMap = (input: Record, context: __SerdeConte }, {}); }; -/** - * serializeAws_restJson1EntityPropertyReference - */ -const se_EntityPropertyReference = (input: EntityPropertyReference, context: __SerdeContext): any => { - return { - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.entityId != null && { entityId: input.entityId }), - ...(input.externalIdProperty != null && { - externalIdProperty: se_ExternalIdProperty(input.externalIdProperty, context), - }), - ...(input.propertyName != null && { propertyName: input.propertyName }), - }; -}; +// se_EntityPropertyReference omitted. /** * serializeAws_restJson1Entries @@ -4064,177 +3882,48 @@ const se_Entries = (input: PropertyValueEntry[], context: __SerdeContext): any = }); }; -/** - * serializeAws_restJson1ExtendsFrom - */ -const se_ExtendsFrom = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExtendsFrom omitted. -/** - * serializeAws_restJson1ExternalIdProperty - */ -const se_ExternalIdProperty = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ExternalIdProperty omitted. -/** - * serializeAws_restJson1FunctionRequest - */ -const se_FunctionRequest = (input: FunctionRequest, context: __SerdeContext): any => { - return { - ...(input.implementedBy != null && { implementedBy: se_DataConnector(input.implementedBy, context) }), - ...(input.requiredProperties != null && { - requiredProperties: se_RequiredProperties(input.requiredProperties, context), - }), - ...(input.scope != null && { scope: input.scope }), - }; -}; +// se_FunctionRequest omitted. -/** - * serializeAws_restJson1FunctionsRequest - */ -const se_FunctionsRequest = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FunctionRequest(value, context); - return acc; - }, {}); -}; +// se_FunctionsRequest omitted. -/** - * serializeAws_restJson1InterpolationParameters - */ -const se_InterpolationParameters = (input: InterpolationParameters, context: __SerdeContext): any => { - return { - ...(input.interpolationType != null && { interpolationType: input.interpolationType }), - ...(input.intervalInSeconds != null && { intervalInSeconds: input.intervalInSeconds }), - }; -}; +// se_InterpolationParameters omitted. -/** - * serializeAws_restJson1LambdaFunction - */ -const se_LambdaFunction = (input: LambdaFunction, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - }; -}; +// se_LambdaFunction omitted. -/** - * serializeAws_restJson1ListComponentTypesFilter - */ -const se_ListComponentTypesFilter = (input: ListComponentTypesFilter, context: __SerdeContext): any => { - return ListComponentTypesFilter.visit(input, { - extendsFrom: (value) => ({ extendsFrom: value }), - isAbstract: (value) => ({ isAbstract: value }), - namespace: (value) => ({ namespace: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ListComponentTypesFilter omitted. -/** - * serializeAws_restJson1ListComponentTypesFilters - */ -const se_ListComponentTypesFilters = (input: ListComponentTypesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListComponentTypesFilter(entry, context); - }); -}; +// se_ListComponentTypesFilters omitted. -/** - * serializeAws_restJson1ListEntitiesFilter - */ -const se_ListEntitiesFilter = (input: ListEntitiesFilter, context: __SerdeContext): any => { - return ListEntitiesFilter.visit(input, { - componentTypeId: (value) => ({ componentTypeId: value }), - externalId: (value) => ({ externalId: value }), - parentEntityId: (value) => ({ parentEntityId: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ListEntitiesFilter omitted. -/** - * serializeAws_restJson1ListEntitiesFilters - */ -const se_ListEntitiesFilters = (input: ListEntitiesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListEntitiesFilter(entry, context); - }); -}; +// se_ListEntitiesFilters omitted. -/** - * serializeAws_restJson1OrderBy - */ -const se_OrderBy = (input: OrderBy, context: __SerdeContext): any => { - return { - ...(input.order != null && { order: input.order }), - ...(input.propertyName != null && { propertyName: input.propertyName }), - }; -}; +// se_OrderBy omitted. -/** - * serializeAws_restJson1OrderByList - */ -const se_OrderByList = (input: OrderBy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OrderBy(entry, context); - }); -}; +// se_OrderByList omitted. -/** - * serializeAws_restJson1ParentEntityUpdateRequest - */ -const se_ParentEntityUpdateRequest = (input: ParentEntityUpdateRequest, context: __SerdeContext): any => { - return { - ...(input.parentEntityId != null && { parentEntityId: input.parentEntityId }), - ...(input.updateType != null && { updateType: input.updateType }), - }; -}; +// se_ParentEntityUpdateRequest omitted. -/** - * serializeAws_restJson1PricingBundles - */ -const se_PricingBundles = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PricingBundles omitted. /** * serializeAws_restJson1PropertyDefinitionRequest */ const se_PropertyDefinitionRequest = (input: PropertyDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.configuration != null && { configuration: se_Configuration(input.configuration, context) }), - ...(input.dataType != null && { dataType: se_DataType(input.dataType, context) }), - ...(input.defaultValue != null && { defaultValue: se_DataValue(input.defaultValue, context) }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.isExternalId != null && { isExternalId: input.isExternalId }), - ...(input.isRequiredInEntity != null && { isRequiredInEntity: input.isRequiredInEntity }), - ...(input.isStoredExternally != null && { isStoredExternally: input.isStoredExternally }), - ...(input.isTimeSeries != null && { isTimeSeries: input.isTimeSeries }), - }; + return take(input, { + configuration: _json, + dataType: (_) => se_DataType(_, context), + defaultValue: (_) => se_DataValue(_, context), + displayName: [], + isExternalId: [], + isRequiredInEntity: [], + isStoredExternally: [], + isTimeSeries: [], + }); }; /** @@ -4257,11 +3946,11 @@ const se_PropertyDefinitionsRequest = ( * serializeAws_restJson1PropertyFilter */ const se_PropertyFilter = (input: PropertyFilter, context: __SerdeContext): any => { - return { - ...(input.operator != null && { operator: input.operator }), - ...(input.propertyName != null && { propertyName: input.propertyName }), - ...(input.value != null && { value: se_DataValue(input.value, context) }), - }; + return take(input, { + operator: [], + propertyName: [], + value: (_) => se_DataValue(_, context), + }); }; /** @@ -4275,49 +3964,21 @@ const se_PropertyFilters = (input: PropertyFilter[], context: __SerdeContext): a }); }; -/** - * serializeAws_restJson1PropertyGroupRequest - */ -const se_PropertyGroupRequest = (input: PropertyGroupRequest, context: __SerdeContext): any => { - return { - ...(input.groupType != null && { groupType: input.groupType }), - ...(input.propertyNames != null && { propertyNames: se_PropertyNames(input.propertyNames, context) }), - }; -}; +// se_PropertyGroupRequest omitted. -/** - * serializeAws_restJson1PropertyGroupsRequest - */ -const se_PropertyGroupsRequest = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_PropertyGroupRequest(value, context); - return acc; - }, {}); -}; +// se_PropertyGroupsRequest omitted. -/** - * serializeAws_restJson1PropertyNames - */ -const se_PropertyNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PropertyNames omitted. /** * serializeAws_restJson1PropertyRequest */ const se_PropertyRequest = (input: PropertyRequest, context: __SerdeContext): any => { - return { - ...(input.definition != null && { definition: se_PropertyDefinitionRequest(input.definition, context) }), - ...(input.updateType != null && { updateType: input.updateType }), - ...(input.value != null && { value: se_DataValue(input.value, context) }), - }; + return take(input, { + definition: (_) => se_PropertyDefinitionRequest(_, context), + updateType: [], + value: (_) => se_DataValue(_, context), + }); }; /** @@ -4337,23 +3998,21 @@ const se_PropertyRequests = (input: Record, context: __ * serializeAws_restJson1PropertyValue */ const se_PropertyValue = (input: PropertyValue, context: __SerdeContext): any => { - return { - ...(input.time != null && { time: input.time }), - ...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }), - ...(input.value != null && { value: se_DataValue(input.value, context) }), - }; + return take(input, { + time: [], + timestamp: (_) => Math.round(_.getTime() / 1000), + value: (_) => se_DataValue(_, context), + }); }; /** * serializeAws_restJson1PropertyValueEntry */ const se_PropertyValueEntry = (input: PropertyValueEntry, context: __SerdeContext): any => { - return { - ...(input.entityPropertyReference != null && { - entityPropertyReference: se_EntityPropertyReference(input.entityPropertyReference, context), - }), - ...(input.propertyValues != null && { propertyValues: se_PropertyValues(input.propertyValues, context) }), - }; + return take(input, { + entityPropertyReference: _json, + propertyValues: (_) => se_PropertyValues(_, context), + }); }; /** @@ -4367,219 +4026,78 @@ const se_PropertyValues = (input: PropertyValue[], context: __SerdeContext): any }); }; -/** - * serializeAws_restJson1Relationship - */ -const se_Relationship = (input: Relationship, context: __SerdeContext): any => { - return { - ...(input.relationshipType != null && { relationshipType: input.relationshipType }), - ...(input.targetComponentTypeId != null && { targetComponentTypeId: input.targetComponentTypeId }), - }; -}; +// se_Relationship omitted. -/** - * serializeAws_restJson1RelationshipValue - */ -const se_RelationshipValue = (input: RelationshipValue, context: __SerdeContext): any => { - return { - ...(input.targetComponentName != null && { targetComponentName: input.targetComponentName }), - ...(input.targetEntityId != null && { targetEntityId: input.targetEntityId }), - }; -}; +// se_RelationshipValue omitted. -/** - * serializeAws_restJson1RequiredProperties - */ -const se_RequiredProperties = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RequiredProperties omitted. -/** - * serializeAws_restJson1SceneCapabilities - */ -const se_SceneCapabilities = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SceneCapabilities omitted. -/** - * serializeAws_restJson1SceneMetadataMap - */ -const se_SceneMetadataMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SceneMetadataMap omitted. -/** - * serializeAws_restJson1SelectedPropertyList - */ -const se_SelectedPropertyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SelectedPropertyList omitted. -/** - * serializeAws_restJson1SyncResourceFilter - */ -const se_SyncResourceFilter = (input: SyncResourceFilter, context: __SerdeContext): any => { - return SyncResourceFilter.visit(input, { - externalId: (value) => ({ externalId: value }), - resourceId: (value) => ({ resourceId: value }), - resourceType: (value) => ({ resourceType: value }), - state: (value) => ({ state: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_SyncResourceFilter omitted. -/** - * serializeAws_restJson1SyncResourceFilters - */ -const se_SyncResourceFilters = (input: SyncResourceFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SyncResourceFilter(entry, context); - }); -}; +// se_SyncResourceFilters omitted. /** * serializeAws_restJson1TabularConditions */ const se_TabularConditions = (input: TabularConditions, context: __SerdeContext): any => { - return { - ...(input.orderBy != null && { orderBy: se_OrderByList(input.orderBy, context) }), - ...(input.propertyFilters != null && { propertyFilters: se_PropertyFilters(input.propertyFilters, context) }), - }; + return take(input, { + orderBy: _json, + propertyFilters: (_) => se_PropertyFilters(_, context), + }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * deserializeAws_restJson1BatchPutPropertyError */ const de_BatchPutPropertyError = (output: any, context: __SerdeContext): BatchPutPropertyError => { - return { - entry: output.entry != null ? de_PropertyValueEntry(output.entry, context) : undefined, - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; + return take(output, { + entry: (_: any) => de_PropertyValueEntry(_, context), + errorCode: __expectString, + errorMessage: __expectString, + }) as any; }; /** * deserializeAws_restJson1BatchPutPropertyErrorEntry */ const de_BatchPutPropertyErrorEntry = (output: any, context: __SerdeContext): BatchPutPropertyErrorEntry => { - return { - errors: output.errors != null ? de_Errors(output.errors, context) : undefined, - } as any; + return take(output, { + errors: (_: any) => de_Errors(_, context), + }) as any; }; -/** - * deserializeAws_restJson1BundleInformation - */ -const de_BundleInformation = (output: any, context: __SerdeContext): BundleInformation => { - return { - bundleNames: output.bundleNames != null ? de_PricingBundles(output.bundleNames, context) : undefined, - pricingTier: __expectString(output.pricingTier), - } as any; -}; +// de_BundleInformation omitted. -/** - * deserializeAws_restJson1ColumnDescription - */ -const de_ColumnDescription = (output: any, context: __SerdeContext): ColumnDescription => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_ColumnDescription omitted. -/** - * deserializeAws_restJson1ColumnDescriptions - */ -const de_ColumnDescriptions = (output: any, context: __SerdeContext): ColumnDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnDescription(entry, context); - }); - return retVal; -}; +// de_ColumnDescriptions omitted. -/** - * deserializeAws_restJson1ComponentPropertyGroupResponse - */ -const de_ComponentPropertyGroupResponse = (output: any, context: __SerdeContext): ComponentPropertyGroupResponse => { - return { - groupType: __expectString(output.groupType), - isInherited: __expectBoolean(output.isInherited), - propertyNames: output.propertyNames != null ? de_PropertyNames(output.propertyNames, context) : undefined, - } as any; -}; +// de_ComponentPropertyGroupResponse omitted. -/** - * deserializeAws_restJson1ComponentPropertyGroupResponses - */ -const de_ComponentPropertyGroupResponses = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ComponentPropertyGroupResponse(value, context); - return acc; - }, - {} - ); -}; +// de_ComponentPropertyGroupResponses omitted. /** * deserializeAws_restJson1ComponentResponse */ const de_ComponentResponse = (output: any, context: __SerdeContext): ComponentResponse => { - return { - componentName: __expectString(output.componentName), - componentTypeId: __expectString(output.componentTypeId), - definedIn: __expectString(output.definedIn), - description: __expectString(output.description), - properties: output.properties != null ? de_PropertyResponses(output.properties, context) : undefined, - propertyGroups: - output.propertyGroups != null ? de_ComponentPropertyGroupResponses(output.propertyGroups, context) : undefined, - status: output.status != null ? de_Status(output.status, context) : undefined, - syncSource: __expectString(output.syncSource), - } as any; + return take(output, { + componentName: __expectString, + componentTypeId: __expectString, + definedIn: __expectString, + description: __expectString, + properties: (_: any) => de_PropertyResponses(_, context), + propertyGroups: _json, + status: _json, + syncSource: __expectString, + }) as any; }; /** @@ -4602,9 +4120,6 @@ const de_ComponentTypeSummaries = (output: any, context: __SerdeContext): Compon const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComponentTypeSummary(entry, context); }); return retVal; @@ -4614,75 +4129,49 @@ const de_ComponentTypeSummaries = (output: any, context: __SerdeContext): Compon * deserializeAws_restJson1ComponentTypeSummary */ const de_ComponentTypeSummary = (output: any, context: __SerdeContext): ComponentTypeSummary => { - return { - arn: __expectString(output.arn), - componentTypeId: __expectString(output.componentTypeId), - componentTypeName: __expectString(output.componentTypeName), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - status: output.status != null ? de_Status(output.status, context) : undefined, - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Configuration - */ -const de_Configuration = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + arn: __expectString, + componentTypeId: __expectString, + componentTypeName: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + status: _json, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1DataConnector - */ -const de_DataConnector = (output: any, context: __SerdeContext): DataConnector => { - return { - isNative: __expectBoolean(output.isNative), - lambda: output.lambda != null ? de_LambdaFunction(output.lambda, context) : undefined, - } as any; -}; +// de_Configuration omitted. + +// de_DataConnector omitted. /** * deserializeAws_restJson1DataType */ const de_DataType = (output: any, context: __SerdeContext): DataType => { - return { - allowedValues: output.allowedValues != null ? de_DataValueList(output.allowedValues, context) : undefined, - nestedType: output.nestedType != null ? de_DataType(output.nestedType, context) : undefined, - relationship: output.relationship != null ? de_Relationship(output.relationship, context) : undefined, - type: __expectString(output.type), - unitOfMeasure: __expectString(output.unitOfMeasure), - } as any; + return take(output, { + allowedValues: (_: any) => de_DataValueList(_, context), + nestedType: (_: any) => de_DataType(_, context), + relationship: _json, + type: __expectString, + unitOfMeasure: __expectString, + }) as any; }; /** * deserializeAws_restJson1DataValue */ const de_DataValue = (output: any, context: __SerdeContext): DataValue => { - return { - booleanValue: __expectBoolean(output.booleanValue), - doubleValue: __limitedParseDouble(output.doubleValue), - expression: __expectString(output.expression), - integerValue: __expectInt32(output.integerValue), - listValue: output.listValue != null ? de_DataValueList(output.listValue, context) : undefined, - longValue: __expectLong(output.longValue), - mapValue: output.mapValue != null ? de_DataValueMap(output.mapValue, context) : undefined, - relationshipValue: - output.relationshipValue != null ? de_RelationshipValue(output.relationshipValue, context) : undefined, - stringValue: __expectString(output.stringValue), - } as any; + return take(output, { + booleanValue: __expectBoolean, + doubleValue: __limitedParseDouble, + expression: __expectString, + integerValue: __expectInt32, + listValue: (_: any) => de_DataValueList(_, context), + longValue: __expectLong, + mapValue: (_: any) => de_DataValueMap(_, context), + relationshipValue: _json, + stringValue: __expectString, + }) as any; }; /** @@ -4692,9 +4181,6 @@ const de_DataValueList = (output: any, context: __SerdeContext): DataValue[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataValue(entry, context); }); return retVal; @@ -4713,18 +4199,7 @@ const de_DataValueMap = (output: any, context: __SerdeContext): Record { - return { - componentName: __expectString(output.componentName), - entityId: __expectString(output.entityId), - externalIdProperty: - output.externalIdProperty != null ? de_ExternalIdProperty(output.externalIdProperty, context) : undefined, - propertyName: __expectString(output.propertyName), - } as any; -}; +// de_EntityPropertyReference omitted. /** * deserializeAws_restJson1EntitySummaries @@ -4733,9 +4208,6 @@ const de_EntitySummaries = (output: any, context: __SerdeContext): EntitySummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EntitySummary(entry, context); }); return retVal; @@ -4745,34 +4217,20 @@ const de_EntitySummaries = (output: any, context: __SerdeContext): EntitySummary * deserializeAws_restJson1EntitySummary */ const de_EntitySummary = (output: any, context: __SerdeContext): EntitySummary => { - return { - arn: __expectString(output.arn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - entityId: __expectString(output.entityId), - entityName: __expectString(output.entityName), - hasChildEntities: __expectBoolean(output.hasChildEntities), - parentEntityId: __expectString(output.parentEntityId), - status: output.status != null ? de_Status(output.status, context) : undefined, - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - } as any; + return take(output, { + arn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + entityId: __expectString, + entityName: __expectString, + hasChildEntities: __expectBoolean, + parentEntityId: __expectString, + status: _json, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ErrorDetails omitted. /** * deserializeAws_restJson1ErrorEntries @@ -4781,9 +4239,6 @@ const de_ErrorEntries = (output: any, context: __SerdeContext): BatchPutProperty const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchPutPropertyErrorEntry(entry, context); }); return retVal; @@ -4796,143 +4251,56 @@ const de_Errors = (output: any, context: __SerdeContext): BatchPutPropertyError[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchPutPropertyError(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExtendsFrom - */ -const de_ExtendsFrom = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExtendsFrom omitted. -/** - * deserializeAws_restJson1ExternalIdProperty - */ -const de_ExternalIdProperty = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExternalIdProperty omitted. -/** - * deserializeAws_restJson1FunctionResponse - */ -const de_FunctionResponse = (output: any, context: __SerdeContext): FunctionResponse => { - return { - implementedBy: output.implementedBy != null ? de_DataConnector(output.implementedBy, context) : undefined, - isInherited: __expectBoolean(output.isInherited), - requiredProperties: - output.requiredProperties != null ? de_RequiredProperties(output.requiredProperties, context) : undefined, - scope: __expectString(output.scope), - } as any; -}; +// de_FunctionResponse omitted. -/** - * deserializeAws_restJson1FunctionsResponse - */ -const de_FunctionsResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FunctionResponse(value, context); - return acc; - }, {}); -}; +// de_FunctionsResponse omitted. -/** - * deserializeAws_restJson1GeneratedSceneMetadataMap - */ -const de_GeneratedSceneMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_GeneratedSceneMetadataMap omitted. -/** - * deserializeAws_restJson1LambdaFunction - */ -const de_LambdaFunction = (output: any, context: __SerdeContext): LambdaFunction => { - return { - arn: __expectString(output.arn), - } as any; -}; +// de_LambdaFunction omitted. -/** - * deserializeAws_restJson1PricingBundles - */ -const de_PricingBundles = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PricingBundles omitted. /** * deserializeAws_restJson1PricingPlan */ const de_PricingPlan = (output: any, context: __SerdeContext): PricingPlan => { - return { - billableEntityCount: __expectLong(output.billableEntityCount), - bundleInformation: - output.bundleInformation != null ? de_BundleInformation(output.bundleInformation, context) : undefined, - effectiveDateTime: - output.effectiveDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.effectiveDateTime))) - : undefined, - pricingMode: __expectString(output.pricingMode), - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - updateReason: __expectString(output.updateReason), - } as any; + return take(output, { + billableEntityCount: __expectLong, + bundleInformation: _json, + effectiveDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pricingMode: __expectString, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + updateReason: __expectString, + }) as any; }; /** * deserializeAws_restJson1PropertyDefinitionResponse */ const de_PropertyDefinitionResponse = (output: any, context: __SerdeContext): PropertyDefinitionResponse => { - return { - configuration: output.configuration != null ? de_Configuration(output.configuration, context) : undefined, - dataType: output.dataType != null ? de_DataType(output.dataType, context) : undefined, - defaultValue: output.defaultValue != null ? de_DataValue(output.defaultValue, context) : undefined, - displayName: __expectString(output.displayName), - isExternalId: __expectBoolean(output.isExternalId), - isFinal: __expectBoolean(output.isFinal), - isImported: __expectBoolean(output.isImported), - isInherited: __expectBoolean(output.isInherited), - isRequiredInEntity: __expectBoolean(output.isRequiredInEntity), - isStoredExternally: __expectBoolean(output.isStoredExternally), - isTimeSeries: __expectBoolean(output.isTimeSeries), - } as any; + return take(output, { + configuration: _json, + dataType: (_: any) => de_DataType(_, context), + defaultValue: (_: any) => de_DataValue(_, context), + displayName: __expectString, + isExternalId: __expectBoolean, + isFinal: __expectBoolean, + isImported: __expectBoolean, + isInherited: __expectBoolean, + isRequiredInEntity: __expectBoolean, + isStoredExternally: __expectBoolean, + isTimeSeries: __expectBoolean, + }) as any; }; /** @@ -4954,39 +4322,18 @@ const de_PropertyDefinitionsResponse = ( ); }; -/** - * deserializeAws_restJson1PropertyGroupResponse - */ -const de_PropertyGroupResponse = (output: any, context: __SerdeContext): PropertyGroupResponse => { - return { - groupType: __expectString(output.groupType), - isInherited: __expectBoolean(output.isInherited), - propertyNames: output.propertyNames != null ? de_PropertyNames(output.propertyNames, context) : undefined, - } as any; -}; +// de_PropertyGroupResponse omitted. -/** - * deserializeAws_restJson1PropertyGroupsResponse - */ -const de_PropertyGroupsResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PropertyGroupResponse(value, context); - return acc; - }, {}); -}; +// de_PropertyGroupsResponse omitted. /** * deserializeAws_restJson1PropertyLatestValue */ const de_PropertyLatestValue = (output: any, context: __SerdeContext): PropertyLatestValue => { - return { - propertyReference: - output.propertyReference != null ? de_EntityPropertyReference(output.propertyReference, context) : undefined, - propertyValue: output.propertyValue != null ? de_DataValue(output.propertyValue, context) : undefined, - } as any; + return take(output, { + propertyReference: _json, + propertyValue: (_: any) => de_DataValue(_, context), + }) as any; }; /** @@ -5002,29 +4349,16 @@ const de_PropertyLatestValueMap = (output: any, context: __SerdeContext): Record }, {}); }; -/** - * deserializeAws_restJson1PropertyNames - */ -const de_PropertyNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PropertyNames omitted. /** * deserializeAws_restJson1PropertyResponse */ const de_PropertyResponse = (output: any, context: __SerdeContext): PropertyResponse => { - return { - definition: output.definition != null ? de_PropertyDefinitionResponse(output.definition, context) : undefined, - value: output.value != null ? de_DataValue(output.value, context) : undefined, - } as any; + return take(output, { + definition: (_: any) => de_PropertyDefinitionResponse(_, context), + value: (_: any) => de_DataValue(_, context), + }) as any; }; /** @@ -5057,38 +4391,31 @@ const de_PropertyTableValue = (output: any, context: __SerdeContext): Record { - return { - time: __expectString(output.time), - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - value: output.value != null ? de_DataValue(output.value, context) : undefined, - } as any; + return take(output, { + time: __expectString, + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + value: (_: any) => de_DataValue(_, context), + }) as any; }; /** * deserializeAws_restJson1PropertyValueEntry */ const de_PropertyValueEntry = (output: any, context: __SerdeContext): PropertyValueEntry => { - return { - entityPropertyReference: - output.entityPropertyReference != null - ? de_EntityPropertyReference(output.entityPropertyReference, context) - : undefined, - propertyValues: output.propertyValues != null ? de_PropertyValues(output.propertyValues, context) : undefined, - } as any; + return take(output, { + entityPropertyReference: _json, + propertyValues: (_: any) => de_PropertyValues(_, context), + }) as any; }; /** * deserializeAws_restJson1PropertyValueHistory */ const de_PropertyValueHistory = (output: any, context: __SerdeContext): PropertyValueHistory => { - return { - entityPropertyReference: - output.entityPropertyReference != null - ? de_EntityPropertyReference(output.entityPropertyReference, context) - : undefined, - values: output.values != null ? de_Values(output.values, context) : undefined, - } as any; + return take(output, { + entityPropertyReference: _json, + values: (_: any) => de_Values(_, context), + }) as any; }; /** @@ -5098,9 +4425,6 @@ const de_PropertyValueList = (output: any, context: __SerdeContext): PropertyVal const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PropertyValueHistory(entry, context); }); return retVal; @@ -5113,9 +4437,6 @@ const de_PropertyValues = (output: any, context: __SerdeContext): PropertyValue[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PropertyValue(entry, context); }); return retVal; @@ -5128,48 +4449,19 @@ const de_QueryResultValue = (output: any, context: __SerdeContext): __DocumentTy return output; }; -/** - * deserializeAws_restJson1Relationship - */ -const de_Relationship = (output: any, context: __SerdeContext): Relationship => { - return { - relationshipType: __expectString(output.relationshipType), - targetComponentTypeId: __expectString(output.targetComponentTypeId), - } as any; -}; +// de_Relationship omitted. -/** - * deserializeAws_restJson1RelationshipValue - */ -const de_RelationshipValue = (output: any, context: __SerdeContext): RelationshipValue => { - return { - targetComponentName: __expectString(output.targetComponentName), - targetEntityId: __expectString(output.targetEntityId), - } as any; -}; +// de_RelationshipValue omitted. -/** - * deserializeAws_restJson1RequiredProperties - */ -const de_RequiredProperties = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RequiredProperties omitted. /** * deserializeAws_restJson1Row */ const de_Row = (output: any, context: __SerdeContext): Row => { - return { - rowData: output.rowData != null ? de_RowData(output.rowData, context) : undefined, - } as any; + return take(output, { + rowData: (_: any) => de_RowData(_, context), + }) as any; }; /** @@ -5179,9 +4471,6 @@ const de_RowData = (output: any, context: __SerdeContext): __DocumentType[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QueryResultValue(entry, context); }); return retVal; @@ -5194,41 +4483,14 @@ const de_Rows = (output: any, context: __SerdeContext): Row[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Row(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SceneCapabilities - */ -const de_SceneCapabilities = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SceneCapabilities omitted. -/** - * deserializeAws_restJson1SceneMetadataMap - */ -const de_SceneMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SceneMetadataMap omitted. /** * deserializeAws_restJson1SceneSummaries @@ -5237,9 +4499,6 @@ const de_SceneSummaries = (output: any, context: __SerdeContext): SceneSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SceneSummary(entry, context); }); return retVal; @@ -5249,41 +4508,19 @@ const de_SceneSummaries = (output: any, context: __SerdeContext): SceneSummary[] * deserializeAws_restJson1SceneSummary */ const de_SceneSummary = (output: any, context: __SerdeContext): SceneSummary => { - return { - arn: __expectString(output.arn), - contentLocation: __expectString(output.contentLocation), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - sceneId: __expectString(output.sceneId), - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - } as any; + return take(output, { + arn: __expectString, + contentLocation: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + sceneId: __expectString, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1Status - */ -const de_Status = (output: any, context: __SerdeContext): Status => { - return { - error: output.error != null ? de_ErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_Status omitted. -/** - * deserializeAws_restJson1SyncJobStatus - */ -const de_SyncJobStatus = (output: any, context: __SerdeContext): SyncJobStatus => { - return { - error: output.error != null ? de_ErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_SyncJobStatus omitted. /** * deserializeAws_restJson1SyncJobSummaries @@ -5292,9 +4529,6 @@ const de_SyncJobSummaries = (output: any, context: __SerdeContext): SyncJobSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SyncJobSummary(entry, context); }); return retVal; @@ -5304,31 +4538,17 @@ const de_SyncJobSummaries = (output: any, context: __SerdeContext): SyncJobSumma * deserializeAws_restJson1SyncJobSummary */ const de_SyncJobSummary = (output: any, context: __SerdeContext): SyncJobSummary => { - return { - arn: __expectString(output.arn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - status: output.status != null ? de_SyncJobStatus(output.status, context) : undefined, - syncSource: __expectString(output.syncSource), - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - workspaceId: __expectString(output.workspaceId), - } as any; + return take(output, { + arn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: _json, + syncSource: __expectString, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SyncResourceStatus - */ -const de_SyncResourceStatus = (output: any, context: __SerdeContext): SyncResourceStatus => { - return { - error: output.error != null ? de_ErrorDetails(output.error, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_SyncResourceStatus omitted. /** * deserializeAws_restJson1SyncResourceSummaries @@ -5337,9 +4557,6 @@ const de_SyncResourceSummaries = (output: any, context: __SerdeContext): SyncRes const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SyncResourceSummary(entry, context); }); return retVal; @@ -5349,16 +4566,13 @@ const de_SyncResourceSummaries = (output: any, context: __SerdeContext): SyncRes * deserializeAws_restJson1SyncResourceSummary */ const de_SyncResourceSummary = (output: any, context: __SerdeContext): SyncResourceSummary => { - return { - externalId: __expectString(output.externalId), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - status: output.status != null ? de_SyncResourceStatus(output.status, context) : undefined, - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - } as any; + return take(output, { + externalId: __expectString, + resourceId: __expectString, + resourceType: __expectString, + status: _json, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5368,9 +4582,6 @@ const de_TabularPropertyValue = (output: any, context: __SerdeContext): Record e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PropertyTableValue(entry, context); }); return retVal; @@ -5383,26 +4594,12 @@ const de_TabularPropertyValues = (output: any, context: __SerdeContext): Record< const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TabularPropertyValue(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1Values @@ -5411,9 +4608,6 @@ const de_Values = (output: any, context: __SerdeContext): PropertyValue[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PropertyValue(entry, context); }); return retVal; @@ -5426,9 +4620,6 @@ const de_WorkspaceSummaries = (output: any, context: __SerdeContext): WorkspaceS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkspaceSummary(entry, context); }); return retVal; @@ -5438,19 +4629,13 @@ const de_WorkspaceSummaries = (output: any, context: __SerdeContext): WorkspaceS * deserializeAws_restJson1WorkspaceSummary */ const de_WorkspaceSummary = (output: any, context: __SerdeContext): WorkspaceSummary => { - return { - arn: __expectString(output.arn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - updateDateTime: - output.updateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDateTime))) - : undefined, - workspaceId: __expectString(output.workspaceId), - } as any; + return take(output, { + arn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + updateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + workspaceId: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-ivs-realtime/src/protocols/Aws_restJson1.ts b/clients/client-ivs-realtime/src/protocols/Aws_restJson1.ts index 5e2502c8ad4d..cc580306be0f 100644 --- a/clients/client-ivs-realtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-ivs-realtime/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -48,8 +50,6 @@ import { PendingVerification, ResourceNotFoundException, ServiceQuotaExceededException, - Stage, - StageSummary, ValidationException, } from "../models/models_0"; @@ -67,13 +67,15 @@ export const se_CreateParticipantTokenCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateParticipantToken"; let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: se_ParticipantTokenAttributes(input.attributes, context) }), - ...(input.capabilities != null && { capabilities: se_ParticipantTokenCapabilities(input.capabilities, context) }), - ...(input.duration != null && { duration: input.duration }), - ...(input.stageArn != null && { stageArn: input.stageArn }), - ...(input.userId != null && { userId: input.userId }), - }); + body = JSON.stringify( + take(input, { + attributes: (_) => _json(_), + capabilities: (_) => _json(_), + duration: [], + stageArn: [], + userId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -98,13 +100,13 @@ export const se_CreateStageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateStage"; let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - ...(input.participantTokenConfigurations != null && { - participantTokenConfigurations: se_ParticipantTokenConfigurations(input.participantTokenConfigurations, context), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + name: [], + participantTokenConfigurations: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -129,9 +131,11 @@ export const se_DeleteStageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteStage"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -156,11 +160,13 @@ export const se_DisconnectParticipantCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectParticipant"; let body: any; - body = JSON.stringify({ - ...(input.participantId != null && { participantId: input.participantId }), - ...(input.reason != null && { reason: input.reason }), - ...(input.stageArn != null && { stageArn: input.stageArn }), - }); + body = JSON.stringify( + take(input, { + participantId: [], + reason: [], + stageArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -185,9 +191,11 @@ export const se_GetStageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStage"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -212,10 +220,12 @@ export const se_ListStagesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStages"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -264,9 +274,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -321,10 +333,12 @@ export const se_UpdateStageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateStage"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + arn: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -350,9 +364,10 @@ export const de_CreateParticipantTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.participantToken != null) { - contents.participantToken = de_ParticipantToken(data.participantToken, context); - } + const doc = take(data, { + participantToken: (_) => de_ParticipantToken(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -386,10 +401,9 @@ const de_CreateParticipantTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -409,12 +423,11 @@ export const de_CreateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.participantTokens != null) { - contents.participantTokens = de_ParticipantTokenList(data.participantTokens, context); - } - if (data.stage != null) { - contents.stage = de_Stage(data.stage, context); - } + const doc = take(data, { + participantTokens: (_) => de_ParticipantTokenList(_, context), + stage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -445,10 +458,9 @@ const de_CreateStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -501,10 +513,9 @@ const de_DeleteStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -554,10 +565,9 @@ const de_DisconnectParticipantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -577,9 +587,10 @@ export const de_GetStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.stage != null) { - contents.stage = de_Stage(data.stage, context); - } + const doc = take(data, { + stage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -607,10 +618,9 @@ const de_GetStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -630,12 +640,11 @@ export const de_ListStagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.stages != null) { - contents.stages = de_StageSummaryList(data.stages, context); - } + const doc = take(data, { + nextToken: __expectString, + stages: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -663,10 +672,9 @@ const de_ListStagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -686,9 +694,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -716,10 +725,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -766,10 +774,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -816,10 +823,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -839,9 +845,10 @@ export const de_UpdateStageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.stage != null) { - contents.stage = de_Stage(data.stage, context); - } + const doc = take(data, { + stage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -875,16 +882,15 @@ const de_UpdateStageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -894,9 +900,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -910,9 +917,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -929,9 +937,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -945,9 +954,10 @@ const de_InternalServerExceptionRes = async ( const de_PendingVerificationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new PendingVerification({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -964,9 +974,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -983,9 +994,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -999,9 +1011,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1009,118 +1022,34 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ParticipantTokenAttributes - */ -const se_ParticipantTokenAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ParticipantTokenAttributes omitted. -/** - * serializeAws_restJson1ParticipantTokenCapabilities - */ -const se_ParticipantTokenCapabilities = ( - input: (ParticipantTokenCapability | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ParticipantTokenCapabilities omitted. -/** - * serializeAws_restJson1ParticipantTokenConfiguration - */ -const se_ParticipantTokenConfiguration = (input: ParticipantTokenConfiguration, context: __SerdeContext): any => { - return { - ...(input.attributes != null && { attributes: se_ParticipantTokenAttributes(input.attributes, context) }), - ...(input.capabilities != null && { capabilities: se_ParticipantTokenCapabilities(input.capabilities, context) }), - ...(input.duration != null && { duration: input.duration }), - ...(input.userId != null && { userId: input.userId }), - }; -}; +// se_ParticipantTokenConfiguration omitted. -/** - * serializeAws_restJson1ParticipantTokenConfigurations - */ -const se_ParticipantTokenConfigurations = (input: ParticipantTokenConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParticipantTokenConfiguration(entry, context); - }); -}; +// se_ParticipantTokenConfigurations omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. /** * deserializeAws_restJson1ParticipantToken */ const de_ParticipantToken = (output: any, context: __SerdeContext): ParticipantToken => { - return { - attributes: output.attributes != null ? de_ParticipantTokenAttributes(output.attributes, context) : undefined, - capabilities: - output.capabilities != null ? de_ParticipantTokenCapabilities(output.capabilities, context) : undefined, - duration: __expectInt32(output.duration), - expirationTime: - output.expirationTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.expirationTime)) - : undefined, - participantId: __expectString(output.participantId), - token: __expectString(output.token), - userId: __expectString(output.userId), - } as any; + return take(output, { + attributes: _json, + capabilities: _json, + duration: __expectInt32, + expirationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + participantId: __expectString, + token: __expectString, + userId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ParticipantTokenAttributes - */ -const de_ParticipantTokenAttributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ParticipantTokenAttributes omitted. -/** - * deserializeAws_restJson1ParticipantTokenCapabilities - */ -const de_ParticipantTokenCapabilities = ( - output: any, - context: __SerdeContext -): (ParticipantTokenCapability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ParticipantTokenCapabilities omitted. /** * deserializeAws_restJson1ParticipantTokenList @@ -1129,65 +1058,18 @@ const de_ParticipantTokenList = (output: any, context: __SerdeContext): Particip const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ParticipantToken(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Stage - */ -const de_Stage = (output: any, context: __SerdeContext): Stage => { - return { - activeSessionId: __expectString(output.activeSessionId), - arn: __expectString(output.arn), - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_Stage omitted. -/** - * deserializeAws_restJson1StageSummary - */ -const de_StageSummary = (output: any, context: __SerdeContext): StageSummary => { - return { - activeSessionId: __expectString(output.activeSessionId), - arn: __expectString(output.arn), - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_StageSummary omitted. -/** - * deserializeAws_restJson1StageSummaryList - */ -const de_StageSummaryList = (output: any, context: __SerdeContext): StageSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StageSummary(entry, context); - }); - return retVal; -}; +// de_StageSummaryList omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-ivs/src/protocols/Aws_restJson1.ts b/clients/client-ivs/src/protocols/Aws_restJson1.ts index 4fdbcb32bd65..efd5fde58269 100644 --- a/clients/client-ivs/src/protocols/Aws_restJson1.ts +++ b/clients/client-ivs/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -76,27 +77,16 @@ import { IvsServiceException as __BaseException } from "../models/IvsServiceExce import { _Stream, AccessDeniedException, - AudioConfiguration, - BatchError, - Channel, ChannelNotBroadcasting, - ChannelSummary, ConflictException, DestinationConfiguration, - IngestConfiguration, InternalServerException, PendingVerification, - PlaybackKeyPair, - PlaybackKeyPairSummary, - RecordingConfiguration, - RecordingConfigurationSummary, ResourceNotFoundException, S3DestinationConfiguration, ServiceQuotaExceededException, StreamEvent, StreamFilters, - StreamKey, - StreamKeySummary, StreamSession, StreamSessionSummary, StreamSummary, @@ -104,7 +94,6 @@ import { ThrottlingException, ThumbnailConfiguration, ValidationException, - VideoConfiguration, } from "../models/models_0"; /** @@ -120,9 +109,11 @@ export const se_BatchGetChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetChannel"; let body: any; - body = JSON.stringify({ - ...(input.arns != null && { arns: se_ChannelArnList(input.arns, context) }), - }); + body = JSON.stringify( + take(input, { + arns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -147,9 +138,11 @@ export const se_BatchGetStreamKeyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetStreamKey"; let body: any; - body = JSON.stringify({ - ...(input.arns != null && { arns: se_StreamKeyArnList(input.arns, context) }), - }); + body = JSON.stringify( + take(input, { + arns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -174,15 +167,17 @@ export const se_CreateChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateChannel"; let body: any; - body = JSON.stringify({ - ...(input.authorized != null && { authorized: input.authorized }), - ...(input.insecureIngest != null && { insecureIngest: input.insecureIngest }), - ...(input.latencyMode != null && { latencyMode: input.latencyMode }), - ...(input.name != null && { name: input.name }), - ...(input.recordingConfigurationArn != null && { recordingConfigurationArn: input.recordingConfigurationArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + authorized: [], + insecureIngest: [], + latencyMode: [], + name: [], + recordingConfigurationArn: [], + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -208,19 +203,15 @@ export const se_CreateRecordingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateRecordingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.destinationConfiguration != null && { - destinationConfiguration: se_DestinationConfiguration(input.destinationConfiguration, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.recordingReconnectWindowSeconds != null && { - recordingReconnectWindowSeconds: input.recordingReconnectWindowSeconds, - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.thumbnailConfiguration != null && { - thumbnailConfiguration: se_ThumbnailConfiguration(input.thumbnailConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + destinationConfiguration: (_) => _json(_), + name: [], + recordingReconnectWindowSeconds: [], + tags: (_) => _json(_), + thumbnailConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -245,10 +236,12 @@ export const se_CreateStreamKeyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateStreamKey"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -273,9 +266,11 @@ export const se_DeleteChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteChannel"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -300,9 +295,11 @@ export const se_DeletePlaybackKeyPairCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeletePlaybackKeyPair"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,9 +325,11 @@ export const se_DeleteRecordingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRecordingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -355,9 +354,11 @@ export const se_DeleteStreamKeyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteStreamKey"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -382,9 +383,11 @@ export const se_GetChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetChannel"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -409,9 +412,11 @@ export const se_GetPlaybackKeyPairCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetPlaybackKeyPair"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -437,9 +442,11 @@ export const se_GetRecordingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetRecordingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -464,9 +471,11 @@ export const se_GetStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStream"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -491,9 +500,11 @@ export const se_GetStreamKeyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStreamKey"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -518,10 +529,12 @@ export const se_GetStreamSessionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetStreamSession"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - ...(input.streamId != null && { streamId: input.streamId }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + streamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -546,11 +559,13 @@ export const se_ImportPlaybackKeyPairCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ImportPlaybackKeyPair"; let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - ...(input.publicKeyMaterial != null && { publicKeyMaterial: input.publicKeyMaterial }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + name: [], + publicKeyMaterial: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -575,14 +590,14 @@ export const se_ListChannelsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListChannels"; let body: any; - body = JSON.stringify({ - ...(input.filterByName != null && { filterByName: input.filterByName }), - ...(input.filterByRecordingConfigurationArn != null && { - filterByRecordingConfigurationArn: input.filterByRecordingConfigurationArn, - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filterByName: [], + filterByRecordingConfigurationArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -607,10 +622,12 @@ export const se_ListPlaybackKeyPairsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListPlaybackKeyPairs"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -636,10 +653,12 @@ export const se_ListRecordingConfigurationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListRecordingConfigurations"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -664,11 +683,13 @@ export const se_ListStreamKeysCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreamKeys"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -693,11 +714,13 @@ export const se_ListStreamsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreams"; let body: any; - body = JSON.stringify({ - ...(input.filterBy != null && { filterBy: se_StreamFilters(input.filterBy, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filterBy: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -722,11 +745,13 @@ export const se_ListStreamSessionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListStreamSessions"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -774,10 +799,12 @@ export const se_PutMetadataCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutMetadata"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - ...(input.metadata != null && { metadata: input.metadata }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + metadata: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -802,9 +829,11 @@ export const se_StopStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StopStream"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -830,9 +859,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -887,15 +918,17 @@ export const se_UpdateChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateChannel"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.authorized != null && { authorized: input.authorized }), - ...(input.insecureIngest != null && { insecureIngest: input.insecureIngest }), - ...(input.latencyMode != null && { latencyMode: input.latencyMode }), - ...(input.name != null && { name: input.name }), - ...(input.recordingConfigurationArn != null && { recordingConfigurationArn: input.recordingConfigurationArn }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + arn: [], + authorized: [], + insecureIngest: [], + latencyMode: [], + name: [], + recordingConfigurationArn: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -921,12 +954,11 @@ export const de_BatchGetChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channels != null) { - contents.channels = de_Channels(data.channels, context); - } - if (data.errors != null) { - contents.errors = de_BatchErrors(data.errors, context); - } + const doc = take(data, { + channels: _json, + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -943,10 +975,9 @@ const de_BatchGetChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -965,12 +996,11 @@ export const de_BatchGetStreamKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_BatchErrors(data.errors, context); - } - if (data.streamKeys != null) { - contents.streamKeys = de_StreamKeys(data.streamKeys, context); - } + const doc = take(data, { + errors: _json, + streamKeys: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -987,10 +1017,9 @@ const de_BatchGetStreamKeyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1009,12 +1038,11 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.channel = de_Channel(data.channel, context); - } - if (data.streamKey != null) { - contents.streamKey = de_StreamKey(data.streamKey, context); - } + const doc = take(data, { + channel: _json, + streamKey: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1048,10 +1076,9 @@ const de_CreateChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1071,9 +1098,10 @@ export const de_CreateRecordingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.recordingConfiguration != null) { - contents.recordingConfiguration = de_RecordingConfiguration(data.recordingConfiguration, context); - } + const doc = take(data, { + recordingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1110,10 +1138,9 @@ const de_CreateRecordingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1133,9 +1160,10 @@ export const de_CreateStreamKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamKey != null) { - contents.streamKey = de_StreamKey(data.streamKey, context); - } + const doc = take(data, { + streamKey: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1169,10 +1197,9 @@ const de_CreateStreamKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1225,10 +1252,9 @@ const de_DeleteChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1278,10 +1304,9 @@ const de_DeletePlaybackKeyPairCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1334,10 +1359,9 @@ const de_DeleteRecordingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1387,10 +1411,9 @@ const de_DeleteStreamKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1410,9 +1433,10 @@ export const de_GetChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.channel = de_Channel(data.channel, context); - } + const doc = take(data, { + channel: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1440,10 +1464,9 @@ const de_GetChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1463,9 +1486,10 @@ export const de_GetPlaybackKeyPairCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.keyPair != null) { - contents.keyPair = de_PlaybackKeyPair(data.keyPair, context); - } + const doc = take(data, { + keyPair: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1493,10 +1517,9 @@ const de_GetPlaybackKeyPairCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1516,9 +1539,10 @@ export const de_GetRecordingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.recordingConfiguration != null) { - contents.recordingConfiguration = de_RecordingConfiguration(data.recordingConfiguration, context); - } + const doc = take(data, { + recordingConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1549,10 +1573,9 @@ const de_GetRecordingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1572,9 +1595,10 @@ export const de_GetStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.stream != null) { - contents.stream = de__Stream(data.stream, context); - } + const doc = take(data, { + stream: (_) => de__Stream(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1605,10 +1629,9 @@ const de_GetStreamCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1628,9 +1651,10 @@ export const de_GetStreamKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamKey != null) { - contents.streamKey = de_StreamKey(data.streamKey, context); - } + const doc = take(data, { + streamKey: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1658,10 +1682,9 @@ const de_GetStreamKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1681,9 +1704,10 @@ export const de_GetStreamSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamSession != null) { - contents.streamSession = de_StreamSession(data.streamSession, context); - } + const doc = take(data, { + streamSession: (_) => de_StreamSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1711,10 +1735,9 @@ const de_GetStreamSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1734,9 +1757,10 @@ export const de_ImportPlaybackKeyPairCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.keyPair != null) { - contents.keyPair = de_PlaybackKeyPair(data.keyPair, context); - } + const doc = take(data, { + keyPair: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1770,10 +1794,9 @@ const de_ImportPlaybackKeyPairCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,12 +1816,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channels != null) { - contents.channels = de_ChannelList(data.channels, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + channels: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1826,10 +1848,9 @@ const de_ListChannelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1849,12 +1870,11 @@ export const de_ListPlaybackKeyPairsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.keyPairs != null) { - contents.keyPairs = de_PlaybackKeyPairList(data.keyPairs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + keyPairs: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1879,10 +1899,9 @@ const de_ListPlaybackKeyPairsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1902,12 +1921,11 @@ export const de_ListRecordingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.recordingConfigurations != null) { - contents.recordingConfigurations = de_RecordingConfigurationList(data.recordingConfigurations, context); - } + const doc = take(data, { + nextToken: __expectString, + recordingConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1935,10 +1953,9 @@ const de_ListRecordingConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,12 +1975,11 @@ export const de_ListStreamKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.streamKeys != null) { - contents.streamKeys = de_StreamKeyList(data.streamKeys, context); - } + const doc = take(data, { + nextToken: __expectString, + streamKeys: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1991,10 +2007,9 @@ const de_ListStreamKeysCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2014,12 +2029,11 @@ export const de_ListStreamsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.streams != null) { - contents.streams = de_StreamList(data.streams, context); - } + const doc = take(data, { + nextToken: __expectString, + streams: (_) => de_StreamList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2044,10 +2058,9 @@ const de_ListStreamsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2067,12 +2080,11 @@ export const de_ListStreamSessionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.streamSessions != null) { - contents.streamSessions = de_StreamSessionList(data.streamSessions, context); - } + const doc = take(data, { + nextToken: __expectString, + streamSessions: (_) => de_StreamSessionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2100,10 +2112,9 @@ const de_ListStreamSessionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2123,9 +2134,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2153,10 +2165,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2209,10 +2220,9 @@ const de_PutMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2265,10 +2275,9 @@ const de_StopStreamCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2315,10 +2324,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2365,10 +2373,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2388,9 +2395,10 @@ export const de_UpdateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.channel = de_Channel(data.channel, context); - } + const doc = take(data, { + channel: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2424,16 +2432,15 @@ const de_UpdateChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2443,9 +2450,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2462,9 +2470,10 @@ const de_ChannelNotBroadcastingRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ChannelNotBroadcasting({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2478,9 +2487,10 @@ const de_ChannelNotBroadcastingRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2497,9 +2507,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2513,9 +2524,10 @@ const de_InternalServerExceptionRes = async ( const de_PendingVerificationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new PendingVerification({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2532,9 +2544,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2551,9 +2564,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2567,9 +2581,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_StreamUnavailableRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new StreamUnavailable({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2583,9 +2598,10 @@ const de_StreamUnavailableRes = async (parsedOutput: any, context: __SerdeContex const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2599,9 +2615,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exceptionMessage != null) { - contents.exceptionMessage = __expectString(data.exceptionMessage); - } + const doc = take(data, { + exceptionMessage: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2609,323 +2626,76 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ChannelArnList - */ -const se_ChannelArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ChannelArnList omitted. -/** - * serializeAws_restJson1DestinationConfiguration - */ -const se_DestinationConfiguration = (input: DestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.s3 != null && { s3: se_S3DestinationConfiguration(input.s3, context) }), - }; -}; +// se_DestinationConfiguration omitted. -/** - * serializeAws_restJson1S3DestinationConfiguration - */ -const se_S3DestinationConfiguration = (input: S3DestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - }; -}; +// se_S3DestinationConfiguration omitted. -/** - * serializeAws_restJson1StreamFilters - */ -const se_StreamFilters = (input: StreamFilters, context: __SerdeContext): any => { - return { - ...(input.health != null && { health: input.health }), - }; -}; +// se_StreamFilters omitted. -/** - * serializeAws_restJson1StreamKeyArnList - */ -const se_StreamKeyArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StreamKeyArnList omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1ThumbnailConfiguration - */ -const se_ThumbnailConfiguration = (input: ThumbnailConfiguration, context: __SerdeContext): any => { - return { - ...(input.recordingMode != null && { recordingMode: input.recordingMode }), - ...(input.targetIntervalSeconds != null && { targetIntervalSeconds: input.targetIntervalSeconds }), - }; -}; +// se_ThumbnailConfiguration omitted. -/** - * deserializeAws_restJson1AudioConfiguration - */ -const de_AudioConfiguration = (output: any, context: __SerdeContext): AudioConfiguration => { - return { - channels: __expectLong(output.channels), - codec: __expectString(output.codec), - sampleRate: __expectLong(output.sampleRate), - targetBitrate: __expectLong(output.targetBitrate), - } as any; -}; +// de_AudioConfiguration omitted. -/** - * deserializeAws_restJson1BatchError - */ -const de_BatchError = (output: any, context: __SerdeContext): BatchError => { - return { - arn: __expectString(output.arn), - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_BatchError omitted. -/** - * deserializeAws_restJson1BatchErrors - */ -const de_BatchErrors = (output: any, context: __SerdeContext): BatchError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchError(entry, context); - }); - return retVal; -}; +// de_BatchErrors omitted. -/** - * deserializeAws_restJson1Channel - */ -const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - arn: __expectString(output.arn), - authorized: __expectBoolean(output.authorized), - ingestEndpoint: __expectString(output.ingestEndpoint), - insecureIngest: __expectBoolean(output.insecureIngest), - latencyMode: __expectString(output.latencyMode), - name: __expectString(output.name), - playbackUrl: __expectString(output.playbackUrl), - recordingConfigurationArn: __expectString(output.recordingConfigurationArn), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_Channel omitted. -/** - * deserializeAws_restJson1ChannelList - */ -const de_ChannelList = (output: any, context: __SerdeContext): ChannelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelSummary(entry, context); - }); - return retVal; -}; +// de_ChannelList omitted. -/** - * deserializeAws_restJson1Channels - */ -const de_Channels = (output: any, context: __SerdeContext): Channel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Channel(entry, context); - }); - return retVal; -}; +// de_Channels omitted. -/** - * deserializeAws_restJson1ChannelSummary - */ -const de_ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => { - return { - arn: __expectString(output.arn), - authorized: __expectBoolean(output.authorized), - insecureIngest: __expectBoolean(output.insecureIngest), - latencyMode: __expectString(output.latencyMode), - name: __expectString(output.name), - recordingConfigurationArn: __expectString(output.recordingConfigurationArn), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_ChannelSummary omitted. -/** - * deserializeAws_restJson1DestinationConfiguration - */ -const de_DestinationConfiguration = (output: any, context: __SerdeContext): DestinationConfiguration => { - return { - s3: output.s3 != null ? de_S3DestinationConfiguration(output.s3, context) : undefined, - } as any; -}; +// de_DestinationConfiguration omitted. -/** - * deserializeAws_restJson1IngestConfiguration - */ -const de_IngestConfiguration = (output: any, context: __SerdeContext): IngestConfiguration => { - return { - audio: output.audio != null ? de_AudioConfiguration(output.audio, context) : undefined, - video: output.video != null ? de_VideoConfiguration(output.video, context) : undefined, - } as any; -}; +// de_IngestConfiguration omitted. -/** - * deserializeAws_restJson1PlaybackKeyPair - */ -const de_PlaybackKeyPair = (output: any, context: __SerdeContext): PlaybackKeyPair => { - return { - arn: __expectString(output.arn), - fingerprint: __expectString(output.fingerprint), - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_PlaybackKeyPair omitted. -/** - * deserializeAws_restJson1PlaybackKeyPairList - */ -const de_PlaybackKeyPairList = (output: any, context: __SerdeContext): PlaybackKeyPairSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlaybackKeyPairSummary(entry, context); - }); - return retVal; -}; +// de_PlaybackKeyPairList omitted. -/** - * deserializeAws_restJson1PlaybackKeyPairSummary - */ -const de_PlaybackKeyPairSummary = (output: any, context: __SerdeContext): PlaybackKeyPairSummary => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_PlaybackKeyPairSummary omitted. -/** - * deserializeAws_restJson1RecordingConfiguration - */ -const de_RecordingConfiguration = (output: any, context: __SerdeContext): RecordingConfiguration => { - return { - arn: __expectString(output.arn), - destinationConfiguration: - output.destinationConfiguration != null - ? de_DestinationConfiguration(output.destinationConfiguration, context) - : undefined, - name: __expectString(output.name), - recordingReconnectWindowSeconds: __expectInt32(output.recordingReconnectWindowSeconds), - state: __expectString(output.state), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - thumbnailConfiguration: - output.thumbnailConfiguration != null - ? de_ThumbnailConfiguration(output.thumbnailConfiguration, context) - : undefined, - } as any; -}; +// de_RecordingConfiguration omitted. -/** - * deserializeAws_restJson1RecordingConfigurationList - */ -const de_RecordingConfigurationList = (output: any, context: __SerdeContext): RecordingConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordingConfigurationSummary(entry, context); - }); - return retVal; -}; +// de_RecordingConfigurationList omitted. -/** - * deserializeAws_restJson1RecordingConfigurationSummary - */ -const de_RecordingConfigurationSummary = (output: any, context: __SerdeContext): RecordingConfigurationSummary => { - return { - arn: __expectString(output.arn), - destinationConfiguration: - output.destinationConfiguration != null - ? de_DestinationConfiguration(output.destinationConfiguration, context) - : undefined, - name: __expectString(output.name), - state: __expectString(output.state), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_RecordingConfigurationSummary omitted. -/** - * deserializeAws_restJson1S3DestinationConfiguration - */ -const de_S3DestinationConfiguration = (output: any, context: __SerdeContext): S3DestinationConfiguration => { - return { - bucketName: __expectString(output.bucketName), - } as any; -}; +// de_S3DestinationConfiguration omitted. /** * deserializeAws_restJson1_Stream */ const de__Stream = (output: any, context: __SerdeContext): _Stream => { - return { - channelArn: __expectString(output.channelArn), - health: __expectString(output.health), - playbackUrl: __expectString(output.playbackUrl), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - state: __expectString(output.state), - streamId: __expectString(output.streamId), - viewerCount: __expectLong(output.viewerCount), - } as any; + return take(output, { + channelArn: __expectString, + health: __expectString, + playbackUrl: __expectString, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + state: __expectString, + streamId: __expectString, + viewerCount: __expectLong, + }) as any; }; /** * deserializeAws_restJson1StreamEvent */ const de_StreamEvent = (output: any, context: __SerdeContext): StreamEvent => { - return { - eventTime: - output.eventTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.eventTime)) : undefined, - name: __expectString(output.name), - type: __expectString(output.type), - } as any; + return take(output, { + eventTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + type: __expectString, + }) as any; }; /** @@ -2935,66 +2705,18 @@ const de_StreamEvents = (output: any, context: __SerdeContext): StreamEvent[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StreamKey - */ -const de_StreamKey = (output: any, context: __SerdeContext): StreamKey => { - return { - arn: __expectString(output.arn), - channelArn: __expectString(output.channelArn), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - value: __expectString(output.value), - } as any; -}; +// de_StreamKey omitted. -/** - * deserializeAws_restJson1StreamKeyList - */ -const de_StreamKeyList = (output: any, context: __SerdeContext): StreamKeySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamKeySummary(entry, context); - }); - return retVal; -}; +// de_StreamKeyList omitted. -/** - * deserializeAws_restJson1StreamKeys - */ -const de_StreamKeys = (output: any, context: __SerdeContext): StreamKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamKey(entry, context); - }); - return retVal; -}; +// de_StreamKeys omitted. -/** - * deserializeAws_restJson1StreamKeySummary - */ -const de_StreamKeySummary = (output: any, context: __SerdeContext): StreamKeySummary => { - return { - arn: __expectString(output.arn), - channelArn: __expectString(output.channelArn), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_StreamKeySummary omitted. /** * deserializeAws_restJson1StreamList @@ -3003,9 +2725,6 @@ const de_StreamList = (output: any, context: __SerdeContext): StreamSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamSummary(entry, context); }); return retVal; @@ -3015,20 +2734,15 @@ const de_StreamList = (output: any, context: __SerdeContext): StreamSummary[] => * deserializeAws_restJson1StreamSession */ const de_StreamSession = (output: any, context: __SerdeContext): StreamSession => { - return { - channel: output.channel != null ? de_Channel(output.channel, context) : undefined, - endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - ingestConfiguration: - output.ingestConfiguration != null ? de_IngestConfiguration(output.ingestConfiguration, context) : undefined, - recordingConfiguration: - output.recordingConfiguration != null - ? de_RecordingConfiguration(output.recordingConfiguration, context) - : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - streamId: __expectString(output.streamId), - truncatedEvents: output.truncatedEvents != null ? de_StreamEvents(output.truncatedEvents, context) : undefined, - } as any; + return take(output, { + channel: _json, + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ingestConfiguration: _json, + recordingConfiguration: _json, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + streamId: __expectString, + truncatedEvents: (_: any) => de_StreamEvents(_, context), + }) as any; }; /** @@ -3038,9 +2752,6 @@ const de_StreamSessionList = (output: any, context: __SerdeContext): StreamSessi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamSessionSummary(entry, context); }); return retVal; @@ -3050,68 +2761,33 @@ const de_StreamSessionList = (output: any, context: __SerdeContext): StreamSessi * deserializeAws_restJson1StreamSessionSummary */ const de_StreamSessionSummary = (output: any, context: __SerdeContext): StreamSessionSummary => { - return { - endTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - hasErrorEvent: __expectBoolean(output.hasErrorEvent), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - streamId: __expectString(output.streamId), - } as any; + return take(output, { + endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + hasErrorEvent: __expectBoolean, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + streamId: __expectString, + }) as any; }; /** * deserializeAws_restJson1StreamSummary */ const de_StreamSummary = (output: any, context: __SerdeContext): StreamSummary => { - return { - channelArn: __expectString(output.channelArn), - health: __expectString(output.health), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - state: __expectString(output.state), - streamId: __expectString(output.streamId), - viewerCount: __expectLong(output.viewerCount), - } as any; + return take(output, { + channelArn: __expectString, + health: __expectString, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + state: __expectString, + streamId: __expectString, + viewerCount: __expectLong, + }) as any; }; -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1ThumbnailConfiguration - */ -const de_ThumbnailConfiguration = (output: any, context: __SerdeContext): ThumbnailConfiguration => { - return { - recordingMode: __expectString(output.recordingMode), - targetIntervalSeconds: __expectLong(output.targetIntervalSeconds), - } as any; -}; +// de_ThumbnailConfiguration omitted. -/** - * deserializeAws_restJson1VideoConfiguration - */ -const de_VideoConfiguration = (output: any, context: __SerdeContext): VideoConfiguration => { - return { - avcLevel: __expectString(output.avcLevel), - avcProfile: __expectString(output.avcProfile), - codec: __expectString(output.codec), - encoder: __expectString(output.encoder), - targetBitrate: __expectLong(output.targetBitrate), - targetFramerate: __expectLong(output.targetFramerate), - videoHeight: __expectLong(output.videoHeight), - videoWidth: __expectLong(output.videoWidth), - } as any; -}; +// de_VideoConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-ivschat/src/protocols/Aws_restJson1.ts b/clients/client-ivschat/src/protocols/Aws_restJson1.ts index 01ed21d50d06..a8fd27256a1c 100644 --- a/clients/client-ivschat/src/protocols/Aws_restJson1.ts +++ b/clients/client-ivschat/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -72,7 +74,6 @@ import { ServiceQuotaExceededException, ThrottlingException, ValidationException, - ValidationExceptionField, } from "../models/models_0"; /** @@ -88,13 +89,15 @@ export const se_CreateChatTokenCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateChatToken"; let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: se_ChatTokenAttributes(input.attributes, context) }), - ...(input.capabilities != null && { capabilities: se_ChatTokenCapabilities(input.capabilities, context) }), - ...(input.roomIdentifier != null && { roomIdentifier: input.roomIdentifier }), - ...(input.sessionDurationInMinutes != null && { sessionDurationInMinutes: input.sessionDurationInMinutes }), - ...(input.userId != null && { userId: input.userId }), - }); + body = JSON.stringify( + take(input, { + attributes: (_) => _json(_), + capabilities: (_) => _json(_), + roomIdentifier: [], + sessionDurationInMinutes: [], + userId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -120,13 +123,13 @@ export const se_CreateLoggingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLoggingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.destinationConfiguration != null && { - destinationConfiguration: se_DestinationConfiguration(input.destinationConfiguration, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + destinationConfiguration: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -151,23 +154,16 @@ export const se_CreateRoomCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateRoom"; let body: any; - body = JSON.stringify({ - ...(input.loggingConfigurationIdentifiers != null && { - loggingConfigurationIdentifiers: se_LoggingConfigurationIdentifierList( - input.loggingConfigurationIdentifiers, - context - ), - }), - ...(input.maximumMessageLength != null && { maximumMessageLength: input.maximumMessageLength }), - ...(input.maximumMessageRatePerSecond != null && { - maximumMessageRatePerSecond: input.maximumMessageRatePerSecond, - }), - ...(input.messageReviewHandler != null && { - messageReviewHandler: se_MessageReviewHandler(input.messageReviewHandler, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + loggingConfigurationIdentifiers: (_) => _json(_), + maximumMessageLength: [], + maximumMessageRatePerSecond: [], + messageReviewHandler: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -193,9 +189,11 @@ export const se_DeleteLoggingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLoggingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.identifier != null && { identifier: input.identifier }), - }); + body = JSON.stringify( + take(input, { + identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -220,11 +218,13 @@ export const se_DeleteMessageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteMessage"; let body: any; - body = JSON.stringify({ - ...(input.id != null && { id: input.id }), - ...(input.reason != null && { reason: input.reason }), - ...(input.roomIdentifier != null && { roomIdentifier: input.roomIdentifier }), - }); + body = JSON.stringify( + take(input, { + id: [], + reason: [], + roomIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -249,9 +249,11 @@ export const se_DeleteRoomCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteRoom"; let body: any; - body = JSON.stringify({ - ...(input.identifier != null && { identifier: input.identifier }), - }); + body = JSON.stringify( + take(input, { + identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -276,11 +278,13 @@ export const se_DisconnectUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectUser"; let body: any; - body = JSON.stringify({ - ...(input.reason != null && { reason: input.reason }), - ...(input.roomIdentifier != null && { roomIdentifier: input.roomIdentifier }), - ...(input.userId != null && { userId: input.userId }), - }); + body = JSON.stringify( + take(input, { + reason: [], + roomIdentifier: [], + userId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -306,9 +310,11 @@ export const se_GetLoggingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLoggingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.identifier != null && { identifier: input.identifier }), - }); + body = JSON.stringify( + take(input, { + identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -333,9 +339,11 @@ export const se_GetRoomCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetRoom"; let body: any; - body = JSON.stringify({ - ...(input.identifier != null && { identifier: input.identifier }), - }); + body = JSON.stringify( + take(input, { + identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -361,10 +369,12 @@ export const se_ListLoggingConfigurationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLoggingConfigurations"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -389,15 +399,15 @@ export const se_ListRoomsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListRooms"; let body: any; - body = JSON.stringify({ - ...(input.loggingConfigurationIdentifier != null && { - loggingConfigurationIdentifier: input.loggingConfigurationIdentifier, - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.messageReviewHandlerUri != null && { messageReviewHandlerUri: input.messageReviewHandlerUri }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + loggingConfigurationIdentifier: [], + maxResults: [], + messageReviewHandlerUri: [], + name: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -445,11 +455,13 @@ export const se_SendEventCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SendEvent"; let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: se_EventAttributes(input.attributes, context) }), - ...(input.eventName != null && { eventName: input.eventName }), - ...(input.roomIdentifier != null && { roomIdentifier: input.roomIdentifier }), - }); + body = JSON.stringify( + take(input, { + attributes: (_) => _json(_), + eventName: [], + roomIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -475,9 +487,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -533,13 +547,13 @@ export const se_UpdateLoggingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLoggingConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.destinationConfiguration != null && { - destinationConfiguration: se_DestinationConfiguration(input.destinationConfiguration, context), - }), - ...(input.identifier != null && { identifier: input.identifier }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + destinationConfiguration: (_) => _json(_), + identifier: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -564,23 +578,16 @@ export const se_UpdateRoomCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateRoom"; let body: any; - body = JSON.stringify({ - ...(input.identifier != null && { identifier: input.identifier }), - ...(input.loggingConfigurationIdentifiers != null && { - loggingConfigurationIdentifiers: se_LoggingConfigurationIdentifierList( - input.loggingConfigurationIdentifiers, - context - ), - }), - ...(input.maximumMessageLength != null && { maximumMessageLength: input.maximumMessageLength }), - ...(input.maximumMessageRatePerSecond != null && { - maximumMessageRatePerSecond: input.maximumMessageRatePerSecond, - }), - ...(input.messageReviewHandler != null && { - messageReviewHandler: se_MessageReviewHandler(input.messageReviewHandler, context), - }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + identifier: [], + loggingConfigurationIdentifiers: (_) => _json(_), + maximumMessageLength: [], + maximumMessageRatePerSecond: [], + messageReviewHandler: (_) => _json(_), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -606,15 +613,12 @@ export const de_CreateChatTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.sessionExpirationTime != null) { - contents.sessionExpirationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.sessionExpirationTime)); - } - if (data.token != null) { - contents.token = __expectString(data.token); - } - if (data.tokenExpirationTime != null) { - contents.tokenExpirationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.tokenExpirationTime)); - } + const doc = take(data, { + sessionExpirationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + token: __expectString, + tokenExpirationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -645,10 +649,9 @@ const de_CreateChatTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -668,33 +671,17 @@ export const de_CreateLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createTime != null) { - contents.createTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createTime)); - } - if (data.destinationConfiguration != null) { - contents.destinationConfiguration = de_DestinationConfiguration( - __expectUnion(data.destinationConfiguration), - context - ); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationConfiguration: (_) => _json(__expectUnion(_)), + id: __expectString, + name: __expectString, + state: __expectString, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -731,10 +718,9 @@ const de_CreateLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -754,39 +740,19 @@ export const de_CreateRoomCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createTime != null) { - contents.createTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.loggingConfigurationIdentifiers != null) { - contents.loggingConfigurationIdentifiers = de_LoggingConfigurationIdentifierList( - data.loggingConfigurationIdentifiers, - context - ); - } - if (data.maximumMessageLength != null) { - contents.maximumMessageLength = __expectInt32(data.maximumMessageLength); - } - if (data.maximumMessageRatePerSecond != null) { - contents.maximumMessageRatePerSecond = __expectInt32(data.maximumMessageRatePerSecond); - } - if (data.messageReviewHandler != null) { - contents.messageReviewHandler = de_MessageReviewHandler(data.messageReviewHandler, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + loggingConfigurationIdentifiers: _json, + maximumMessageLength: __expectInt32, + maximumMessageRatePerSecond: __expectInt32, + messageReviewHandler: _json, + name: __expectString, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -823,10 +789,9 @@ const de_CreateRoomCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -879,10 +844,9 @@ const de_DeleteLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -902,9 +866,10 @@ export const de_DeleteMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -938,10 +903,9 @@ const de_DeleteMessageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -991,10 +955,9 @@ const de_DeleteRoomCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1047,10 +1010,9 @@ const de_DisconnectUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1070,33 +1032,17 @@ export const de_GetLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createTime != null) { - contents.createTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createTime)); - } - if (data.destinationConfiguration != null) { - contents.destinationConfiguration = de_DestinationConfiguration( - __expectUnion(data.destinationConfiguration), - context - ); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationConfiguration: (_) => _json(__expectUnion(_)), + id: __expectString, + name: __expectString, + state: __expectString, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1124,10 +1070,9 @@ const de_GetLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,39 +1092,19 @@ export const de_GetRoomCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createTime != null) { - contents.createTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.loggingConfigurationIdentifiers != null) { - contents.loggingConfigurationIdentifiers = de_LoggingConfigurationIdentifierList( - data.loggingConfigurationIdentifiers, - context - ); - } - if (data.maximumMessageLength != null) { - contents.maximumMessageLength = __expectInt32(data.maximumMessageLength); - } - if (data.maximumMessageRatePerSecond != null) { - contents.maximumMessageRatePerSecond = __expectInt32(data.maximumMessageRatePerSecond); - } - if (data.messageReviewHandler != null) { - contents.messageReviewHandler = de_MessageReviewHandler(data.messageReviewHandler, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + loggingConfigurationIdentifiers: _json, + maximumMessageLength: __expectInt32, + maximumMessageRatePerSecond: __expectInt32, + messageReviewHandler: _json, + name: __expectString, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1207,10 +1132,9 @@ const de_GetRoomCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1230,12 +1154,11 @@ export const de_ListLoggingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.loggingConfigurations != null) { - contents.loggingConfigurations = de_LoggingConfigurationList(data.loggingConfigurations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + loggingConfigurations: (_) => de_LoggingConfigurationList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1260,10 +1183,9 @@ const de_ListLoggingConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1283,12 +1205,11 @@ export const de_ListRoomsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.rooms != null) { - contents.rooms = de_RoomList(data.rooms, context); - } + const doc = take(data, { + nextToken: __expectString, + rooms: (_) => de_RoomList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1316,10 +1237,9 @@ const de_ListRoomsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1339,9 +1259,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1369,10 +1290,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1392,9 +1312,10 @@ export const de_SendEventCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1428,10 +1349,9 @@ const de_SendEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,10 +1398,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1528,10 +1447,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1551,33 +1469,17 @@ export const de_UpdateLoggingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createTime != null) { - contents.createTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createTime)); - } - if (data.destinationConfiguration != null) { - contents.destinationConfiguration = de_DestinationConfiguration( - __expectUnion(data.destinationConfiguration), - context - ); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationConfiguration: (_) => _json(__expectUnion(_)), + id: __expectString, + name: __expectString, + state: __expectString, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1611,10 +1513,9 @@ const de_UpdateLoggingConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1634,39 +1535,19 @@ export const de_UpdateRoomCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createTime != null) { - contents.createTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.loggingConfigurationIdentifiers != null) { - contents.loggingConfigurationIdentifiers = de_LoggingConfigurationIdentifierList( - data.loggingConfigurationIdentifiers, - context - ); - } - if (data.maximumMessageLength != null) { - contents.maximumMessageLength = __expectInt32(data.maximumMessageLength); - } - if (data.maximumMessageRatePerSecond != null) { - contents.maximumMessageRatePerSecond = __expectInt32(data.maximumMessageRatePerSecond); - } - if (data.messageReviewHandler != null) { - contents.messageReviewHandler = de_MessageReviewHandler(data.messageReviewHandler, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + createTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + loggingConfigurationIdentifiers: _json, + maximumMessageLength: __expectInt32, + maximumMessageRatePerSecond: __expectInt32, + messageReviewHandler: _json, + name: __expectString, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1697,16 +1578,15 @@ const de_UpdateRoomCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1716,9 +1596,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1732,15 +1613,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1757,9 +1635,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1773,9 +1652,10 @@ const de_InternalServerExceptionRes = async ( const de_PendingVerificationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PendingVerification({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1792,15 +1672,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1817,18 +1694,13 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.limit != null) { - contents.limit = __expectInt32(data.limit); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + limit: __expectInt32, + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1842,18 +1714,13 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.limit != null) { - contents.limit = __expectInt32(data.limit); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + limit: __expectInt32, + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1867,15 +1734,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1883,179 +1747,33 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ChatTokenAttributes - */ -const se_ChatTokenAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ChatTokenAttributes omitted. -/** - * serializeAws_restJson1ChatTokenCapabilities - */ -const se_ChatTokenCapabilities = (input: (ChatTokenCapability | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ChatTokenCapabilities omitted. -/** - * serializeAws_restJson1CloudWatchLogsDestinationConfiguration - */ -const se_CloudWatchLogsDestinationConfiguration = ( - input: CloudWatchLogsDestinationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.logGroupName != null && { logGroupName: input.logGroupName }), - }; -}; +// se_CloudWatchLogsDestinationConfiguration omitted. -/** - * serializeAws_restJson1DestinationConfiguration - */ -const se_DestinationConfiguration = (input: DestinationConfiguration, context: __SerdeContext): any => { - return DestinationConfiguration.visit(input, { - cloudWatchLogs: (value) => ({ cloudWatchLogs: se_CloudWatchLogsDestinationConfiguration(value, context) }), - firehose: (value) => ({ firehose: se_FirehoseDestinationConfiguration(value, context) }), - s3: (value) => ({ s3: se_S3DestinationConfiguration(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_DestinationConfiguration omitted. -/** - * serializeAws_restJson1EventAttributes - */ -const se_EventAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EventAttributes omitted. -/** - * serializeAws_restJson1FirehoseDestinationConfiguration - */ -const se_FirehoseDestinationConfiguration = (input: FirehoseDestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.deliveryStreamName != null && { deliveryStreamName: input.deliveryStreamName }), - }; -}; +// se_FirehoseDestinationConfiguration omitted. -/** - * serializeAws_restJson1LoggingConfigurationIdentifierList - */ -const se_LoggingConfigurationIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LoggingConfigurationIdentifierList omitted. -/** - * serializeAws_restJson1MessageReviewHandler - */ -const se_MessageReviewHandler = (input: MessageReviewHandler, context: __SerdeContext): any => { - return { - ...(input.fallbackResult != null && { fallbackResult: input.fallbackResult }), - ...(input.uri != null && { uri: input.uri }), - }; -}; +// se_MessageReviewHandler omitted. -/** - * serializeAws_restJson1S3DestinationConfiguration - */ -const se_S3DestinationConfiguration = (input: S3DestinationConfiguration, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - }; -}; +// se_S3DestinationConfiguration omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1CloudWatchLogsDestinationConfiguration - */ -const de_CloudWatchLogsDestinationConfiguration = ( - output: any, - context: __SerdeContext -): CloudWatchLogsDestinationConfiguration => { - return { - logGroupName: __expectString(output.logGroupName), - } as any; -}; +// de_CloudWatchLogsDestinationConfiguration omitted. -/** - * deserializeAws_restJson1DestinationConfiguration - */ -const de_DestinationConfiguration = (output: any, context: __SerdeContext): DestinationConfiguration => { - if (output.cloudWatchLogs != null) { - return { - cloudWatchLogs: de_CloudWatchLogsDestinationConfiguration(output.cloudWatchLogs, context), - }; - } - if (output.firehose != null) { - return { - firehose: de_FirehoseDestinationConfiguration(output.firehose, context), - }; - } - if (output.s3 != null) { - return { - s3: de_S3DestinationConfiguration(output.s3, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_DestinationConfiguration omitted. -/** - * deserializeAws_restJson1FirehoseDestinationConfiguration - */ -const de_FirehoseDestinationConfiguration = ( - output: any, - context: __SerdeContext -): FirehoseDestinationConfiguration => { - return { - deliveryStreamName: __expectString(output.deliveryStreamName), - } as any; -}; +// de_FirehoseDestinationConfiguration omitted. -/** - * deserializeAws_restJson1LoggingConfigurationIdentifierList - */ -const de_LoggingConfigurationIdentifierList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LoggingConfigurationIdentifierList omitted. /** * deserializeAws_restJson1LoggingConfigurationList @@ -2064,9 +1782,6 @@ const de_LoggingConfigurationList = (output: any, context: __SerdeContext): Logg const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LoggingConfigurationSummary(entry, context); }); return retVal; @@ -2076,32 +1791,19 @@ const de_LoggingConfigurationList = (output: any, context: __SerdeContext): Logg * deserializeAws_restJson1LoggingConfigurationSummary */ const de_LoggingConfigurationSummary = (output: any, context: __SerdeContext): LoggingConfigurationSummary => { - return { - arn: __expectString(output.arn), - createTime: - output.createTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createTime)) : undefined, - destinationConfiguration: - output.destinationConfiguration != null - ? de_DestinationConfiguration(__expectUnion(output.destinationConfiguration), context) - : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - state: __expectString(output.state), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + arn: __expectString, + createTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationConfiguration: (_: any) => _json(__expectUnion(_)), + id: __expectString, + name: __expectString, + state: __expectString, + tags: _json, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1MessageReviewHandler - */ -const de_MessageReviewHandler = (output: any, context: __SerdeContext): MessageReviewHandler => { - return { - fallbackResult: __expectString(output.fallbackResult), - uri: __expectString(output.uri), - } as any; -}; +// de_MessageReviewHandler omitted. /** * deserializeAws_restJson1RoomList @@ -2110,9 +1812,6 @@ const de_RoomList = (output: any, context: __SerdeContext): RoomSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RoomSummary(entry, context); }); return retVal; @@ -2122,70 +1821,25 @@ const de_RoomList = (output: any, context: __SerdeContext): RoomSummary[] => { * deserializeAws_restJson1RoomSummary */ const de_RoomSummary = (output: any, context: __SerdeContext): RoomSummary => { - return { - arn: __expectString(output.arn), - createTime: - output.createTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createTime)) : undefined, - id: __expectString(output.id), - loggingConfigurationIdentifiers: - output.loggingConfigurationIdentifiers != null - ? de_LoggingConfigurationIdentifierList(output.loggingConfigurationIdentifiers, context) - : undefined, - messageReviewHandler: - output.messageReviewHandler != null ? de_MessageReviewHandler(output.messageReviewHandler, context) : undefined, - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + arn: __expectString, + createTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + loggingConfigurationIdentifiers: _json, + messageReviewHandler: _json, + name: __expectString, + tags: _json, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1S3DestinationConfiguration - */ -const de_S3DestinationConfiguration = (output: any, context: __SerdeContext): S3DestinationConfiguration => { - return { - bucketName: __expectString(output.bucketName), - } as any; -}; +// de_S3DestinationConfiguration omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-kafka/src/protocols/Aws_restJson1.ts b/clients/client-kafka/src/protocols/Aws_restJson1.ts index 345df34b1cd6..377ab6b4fcde 100644 --- a/clients/client-kafka/src/protocols/Aws_restJson1.ts +++ b/clients/client-kafka/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,10 +11,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -186,9 +188,11 @@ export const se_BatchAssociateScramSecretCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/scram-secrets"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.SecretArnList != null && { secretArnList: se___listOf__string(input.SecretArnList, context) }), - }); + body = JSON.stringify( + take(input, { + secretArnList: [, (_) => _json(_), `SecretArnList`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -215,9 +219,11 @@ export const se_BatchDisassociateScramSecretCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/scram-secrets"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.SecretArnList != null && { secretArnList: se___listOf__string(input.SecretArnList, context) }), - }); + body = JSON.stringify( + take(input, { + secretArnList: [, (_) => _json(_), `SecretArnList`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -242,26 +248,22 @@ export const se_CreateClusterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters"; let body: any; - body = JSON.stringify({ - ...(input.BrokerNodeGroupInfo != null && { - brokerNodeGroupInfo: se_BrokerNodeGroupInfo(input.BrokerNodeGroupInfo, context), - }), - ...(input.ClientAuthentication != null && { - clientAuthentication: se_ClientAuthentication(input.ClientAuthentication, context), - }), - ...(input.ClusterName != null && { clusterName: input.ClusterName }), - ...(input.ConfigurationInfo != null && { - configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context), - }), - ...(input.EncryptionInfo != null && { encryptionInfo: se_EncryptionInfo(input.EncryptionInfo, context) }), - ...(input.EnhancedMonitoring != null && { enhancedMonitoring: input.EnhancedMonitoring }), - ...(input.KafkaVersion != null && { kafkaVersion: input.KafkaVersion }), - ...(input.LoggingInfo != null && { loggingInfo: se_LoggingInfo(input.LoggingInfo, context) }), - ...(input.NumberOfBrokerNodes != null && { numberOfBrokerNodes: input.NumberOfBrokerNodes }), - ...(input.OpenMonitoring != null && { openMonitoring: se_OpenMonitoringInfo(input.OpenMonitoring, context) }), - ...(input.StorageMode != null && { storageMode: input.StorageMode }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + brokerNodeGroupInfo: [, (_) => se_BrokerNodeGroupInfo(_, context), `BrokerNodeGroupInfo`], + clientAuthentication: [, (_) => se_ClientAuthentication(_, context), `ClientAuthentication`], + clusterName: [, , `ClusterName`], + configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`], + encryptionInfo: [, (_) => se_EncryptionInfo(_, context), `EncryptionInfo`], + enhancedMonitoring: [, , `EnhancedMonitoring`], + kafkaVersion: [, , `KafkaVersion`], + loggingInfo: [, (_) => se_LoggingInfo(_, context), `LoggingInfo`], + numberOfBrokerNodes: [, , `NumberOfBrokerNodes`], + openMonitoring: [, (_) => se_OpenMonitoringInfo(_, context), `OpenMonitoring`], + storageMode: [, , `StorageMode`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -286,12 +288,14 @@ export const se_CreateClusterV2Command = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v2/clusters"; let body: any; - body = JSON.stringify({ - ...(input.ClusterName != null && { clusterName: input.ClusterName }), - ...(input.Provisioned != null && { provisioned: se_ProvisionedRequest(input.Provisioned, context) }), - ...(input.Serverless != null && { serverless: se_ServerlessRequest(input.Serverless, context) }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + clusterName: [, , `ClusterName`], + provisioned: [, (_) => se_ProvisionedRequest(_, context), `Provisioned`], + serverless: [, (_) => se_ServerlessRequest(_, context), `Serverless`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -316,12 +320,14 @@ export const se_CreateConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.KafkaVersions != null && { kafkaVersions: se___listOf__string(input.KafkaVersions, context) }), - ...(input.Name != null && { name: input.Name }), - ...(input.ServerProperties != null && { serverProperties: context.base64Encoder(input.ServerProperties) }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + kafkaVersions: [, (_) => _json(_), `KafkaVersions`], + name: [, , `Name`], + serverProperties: [, (_) => context.base64Encoder(_), `ServerProperties`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -829,9 +835,11 @@ export const se_RebootBrokerCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/reboot-broker"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.BrokerIds != null && { brokerIds: se___listOf__string(input.BrokerIds, context) }), - }); + body = JSON.stringify( + take(input, { + brokerIds: [, (_) => _json(_), `BrokerIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -857,9 +865,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -916,10 +926,12 @@ export const se_UpdateBrokerCountCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes/count"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.TargetNumberOfBrokerNodes != null && { targetNumberOfBrokerNodes: input.TargetNumberOfBrokerNodes }), - }); + body = JSON.stringify( + take(input, { + currentVersion: [, , `CurrentVersion`], + targetNumberOfBrokerNodes: [, , `TargetNumberOfBrokerNodes`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -946,12 +958,12 @@ export const se_UpdateBrokerStorageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes/storage"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.TargetBrokerEBSVolumeInfo != null && { - targetBrokerEBSVolumeInfo: se___listOfBrokerEBSVolumeInfo(input.TargetBrokerEBSVolumeInfo, context), - }), - }); + body = JSON.stringify( + take(input, { + currentVersion: [, , `CurrentVersion`], + targetBrokerEBSVolumeInfo: [, (_) => se___listOfBrokerEBSVolumeInfo(_, context), `TargetBrokerEBSVolumeInfo`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -978,10 +990,12 @@ export const se_UpdateBrokerTypeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/nodes/type"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.TargetInstanceType != null && { targetInstanceType: input.TargetInstanceType }), - }); + body = JSON.stringify( + take(input, { + currentVersion: [, , `CurrentVersion`], + targetInstanceType: [, , `TargetInstanceType`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1008,12 +1022,12 @@ export const se_UpdateClusterConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/configuration"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ConfigurationInfo != null && { - configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context), - }), - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - }); + body = JSON.stringify( + take(input, { + configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`], + currentVersion: [, , `CurrentVersion`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1040,13 +1054,13 @@ export const se_UpdateClusterKafkaVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/version"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ConfigurationInfo != null && { - configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context), - }), - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.TargetKafkaVersion != null && { targetKafkaVersion: input.TargetKafkaVersion }), - }); + body = JSON.stringify( + take(input, { + configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`], + currentVersion: [, , `CurrentVersion`], + targetKafkaVersion: [, , `TargetKafkaVersion`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1072,10 +1086,12 @@ export const se_UpdateConfigurationCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations/{Arn}"; resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn!, "{Arn}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.ServerProperties != null && { serverProperties: context.base64Encoder(input.ServerProperties) }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + serverProperties: [, (_) => context.base64Encoder(_), `ServerProperties`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1102,10 +1118,12 @@ export const se_UpdateConnectivityCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/connectivity"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ConnectivityInfo != null && { connectivityInfo: se_ConnectivityInfo(input.ConnectivityInfo, context) }), - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - }); + body = JSON.stringify( + take(input, { + connectivityInfo: [, (_) => se_ConnectivityInfo(_, context), `ConnectivityInfo`], + currentVersion: [, , `CurrentVersion`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1132,12 +1150,14 @@ export const se_UpdateMonitoringCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/monitoring"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.EnhancedMonitoring != null && { enhancedMonitoring: input.EnhancedMonitoring }), - ...(input.LoggingInfo != null && { loggingInfo: se_LoggingInfo(input.LoggingInfo, context) }), - ...(input.OpenMonitoring != null && { openMonitoring: se_OpenMonitoringInfo(input.OpenMonitoring, context) }), - }); + body = JSON.stringify( + take(input, { + currentVersion: [, , `CurrentVersion`], + enhancedMonitoring: [, , `EnhancedMonitoring`], + loggingInfo: [, (_) => se_LoggingInfo(_, context), `LoggingInfo`], + openMonitoring: [, (_) => se_OpenMonitoringInfo(_, context), `OpenMonitoring`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1164,13 +1184,13 @@ export const se_UpdateSecurityCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/security"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ClientAuthentication != null && { - clientAuthentication: se_ClientAuthentication(input.ClientAuthentication, context), - }), - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.EncryptionInfo != null && { encryptionInfo: se_EncryptionInfo(input.EncryptionInfo, context) }), - }); + body = JSON.stringify( + take(input, { + clientAuthentication: [, (_) => se_ClientAuthentication(_, context), `ClientAuthentication`], + currentVersion: [, , `CurrentVersion`], + encryptionInfo: [, (_) => se_EncryptionInfo(_, context), `EncryptionInfo`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1197,14 +1217,14 @@ export const se_UpdateStorageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/clusters/{ClusterArn}/storage"; resolvedPath = __resolvedPath(resolvedPath, input, "ClusterArn", () => input.ClusterArn!, "{ClusterArn}", false); let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { currentVersion: input.CurrentVersion }), - ...(input.ProvisionedThroughput != null && { - provisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.StorageMode != null && { storageMode: input.StorageMode }), - ...(input.VolumeSizeGB != null && { volumeSizeGB: input.VolumeSizeGB }), - }); + body = JSON.stringify( + take(input, { + currentVersion: [, , `CurrentVersion`], + provisionedThroughput: [, (_) => se_ProvisionedThroughput(_, context), `ProvisionedThroughput`], + storageMode: [, , `StorageMode`], + volumeSizeGB: [, , `VolumeSizeGB`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1230,12 +1250,11 @@ export const de_BatchAssociateScramSecretCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.unprocessedScramSecrets != null) { - contents.UnprocessedScramSecrets = de___listOfUnprocessedScramSecret(data.unprocessedScramSecrets, context); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + UnprocessedScramSecrets: [, (_) => de___listOfUnprocessedScramSecret(_, context), `unprocessedScramSecrets`], + }); + Object.assign(contents, doc); return contents; }; @@ -1275,10 +1294,9 @@ const de_BatchAssociateScramSecretCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,12 +1316,11 @@ export const de_BatchDisassociateScramSecretCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.unprocessedScramSecrets != null) { - contents.UnprocessedScramSecrets = de___listOfUnprocessedScramSecret(data.unprocessedScramSecrets, context); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + UnprocessedScramSecrets: [, (_) => de___listOfUnprocessedScramSecret(_, context), `unprocessedScramSecrets`], + }); + Object.assign(contents, doc); return contents; }; @@ -1343,10 +1360,9 @@ const de_BatchDisassociateScramSecretCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1366,15 +1382,12 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterName != null) { - contents.ClusterName = __expectString(data.clusterName); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterName: [, __expectString, `clusterName`], + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1414,10 +1427,9 @@ const de_CreateClusterCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1437,18 +1449,13 @@ export const de_CreateClusterV2Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterName != null) { - contents.ClusterName = __expectString(data.clusterName); - } - if (data.clusterType != null) { - contents.ClusterType = __expectString(data.clusterType); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterName: [, __expectString, `clusterName`], + ClusterType: [, __expectString, `clusterType`], + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1488,10 +1495,9 @@ const de_CreateClusterV2CommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1511,21 +1517,14 @@ export const de_CreateConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.latestRevision != null) { - contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreationTime: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1565,10 +1564,9 @@ const de_CreateConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1588,12 +1586,11 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1624,10 +1621,9 @@ const de_DeleteClusterCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1647,12 +1643,11 @@ export const de_DeleteConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1683,10 +1678,9 @@ const de_DeleteConfigurationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1706,9 +1700,10 @@ export const de_DescribeClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterInfo != null) { - contents.ClusterInfo = de_ClusterInfo(data.clusterInfo, context); - } + const doc = take(data, { + ClusterInfo: [, (_) => de_ClusterInfo(_, context), `clusterInfo`], + }); + Object.assign(contents, doc); return contents; }; @@ -1742,10 +1737,9 @@ const de_DescribeClusterCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1765,9 +1759,10 @@ export const de_DescribeClusterOperationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterOperationInfo != null) { - contents.ClusterOperationInfo = de_ClusterOperationInfo(data.clusterOperationInfo, context); - } + const doc = take(data, { + ClusterOperationInfo: [, (_) => de_ClusterOperationInfo(_, context), `clusterOperationInfo`], + }); + Object.assign(contents, doc); return contents; }; @@ -1801,10 +1796,9 @@ const de_DescribeClusterOperationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1824,9 +1818,10 @@ export const de_DescribeClusterV2Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterInfo != null) { - contents.ClusterInfo = de_Cluster(data.clusterInfo, context); - } + const doc = take(data, { + ClusterInfo: [, (_) => de_Cluster(_, context), `clusterInfo`], + }); + Object.assign(contents, doc); return contents; }; @@ -1860,10 +1855,9 @@ const de_DescribeClusterV2CommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1883,27 +1877,16 @@ export const de_DescribeConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.kafkaVersions != null) { - contents.KafkaVersions = de___listOf__string(data.kafkaVersions, context); - } - if (data.latestRevision != null) { - contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreationTime: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + Description: [, __expectString, `description`], + KafkaVersions: [, _json, `kafkaVersions`], + LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + State: [, __expectString, `state`], + }); + Object.assign(contents, doc); return contents; }; @@ -1940,10 +1923,9 @@ const de_DescribeConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1963,21 +1945,14 @@ export const de_DescribeConfigurationRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.revision != null) { - contents.Revision = __expectLong(data.revision); - } - if (data.serverProperties != null) { - contents.ServerProperties = context.base64Decoder(data.serverProperties); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreationTime: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + Description: [, __expectString, `description`], + Revision: [, __expectLong, `revision`], + ServerProperties: [, context.base64Decoder, `serverProperties`], + }); + Object.assign(contents, doc); return contents; }; @@ -2014,10 +1989,9 @@ const de_DescribeConfigurationRevisionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2037,27 +2011,16 @@ export const de_GetBootstrapBrokersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bootstrapBrokerString != null) { - contents.BootstrapBrokerString = __expectString(data.bootstrapBrokerString); - } - if (data.bootstrapBrokerStringPublicSaslIam != null) { - contents.BootstrapBrokerStringPublicSaslIam = __expectString(data.bootstrapBrokerStringPublicSaslIam); - } - if (data.bootstrapBrokerStringPublicSaslScram != null) { - contents.BootstrapBrokerStringPublicSaslScram = __expectString(data.bootstrapBrokerStringPublicSaslScram); - } - if (data.bootstrapBrokerStringPublicTls != null) { - contents.BootstrapBrokerStringPublicTls = __expectString(data.bootstrapBrokerStringPublicTls); - } - if (data.bootstrapBrokerStringSaslIam != null) { - contents.BootstrapBrokerStringSaslIam = __expectString(data.bootstrapBrokerStringSaslIam); - } - if (data.bootstrapBrokerStringSaslScram != null) { - contents.BootstrapBrokerStringSaslScram = __expectString(data.bootstrapBrokerStringSaslScram); - } - if (data.bootstrapBrokerStringTls != null) { - contents.BootstrapBrokerStringTls = __expectString(data.bootstrapBrokerStringTls); - } + const doc = take(data, { + BootstrapBrokerString: [, __expectString, `bootstrapBrokerString`], + BootstrapBrokerStringPublicSaslIam: [, __expectString, `bootstrapBrokerStringPublicSaslIam`], + BootstrapBrokerStringPublicSaslScram: [, __expectString, `bootstrapBrokerStringPublicSaslScram`], + BootstrapBrokerStringPublicTls: [, __expectString, `bootstrapBrokerStringPublicTls`], + BootstrapBrokerStringSaslIam: [, __expectString, `bootstrapBrokerStringSaslIam`], + BootstrapBrokerStringSaslScram: [, __expectString, `bootstrapBrokerStringSaslScram`], + BootstrapBrokerStringTls: [, __expectString, `bootstrapBrokerStringTls`], + }); + Object.assign(contents, doc); return contents; }; @@ -2091,10 +2054,9 @@ const de_GetBootstrapBrokersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2114,9 +2076,10 @@ export const de_GetCompatibleKafkaVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.compatibleKafkaVersions != null) { - contents.CompatibleKafkaVersions = de___listOfCompatibleKafkaVersion(data.compatibleKafkaVersions, context); - } + const doc = take(data, { + CompatibleKafkaVersions: [, (_) => de___listOfCompatibleKafkaVersion(_, context), `compatibleKafkaVersions`], + }); + Object.assign(contents, doc); return contents; }; @@ -2156,10 +2119,9 @@ const de_GetCompatibleKafkaVersionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2179,12 +2141,11 @@ export const de_ListClusterOperationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterOperationInfoList != null) { - contents.ClusterOperationInfoList = de___listOfClusterOperationInfo(data.clusterOperationInfoList, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + ClusterOperationInfoList: [, (_) => de___listOfClusterOperationInfo(_, context), `clusterOperationInfoList`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2215,10 +2176,9 @@ const de_ListClusterOperationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2238,12 +2198,11 @@ export const de_ListClustersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterInfoList != null) { - contents.ClusterInfoList = de___listOfClusterInfo(data.clusterInfoList, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + ClusterInfoList: [, (_) => de___listOfClusterInfo(_, context), `clusterInfoList`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2274,10 +2233,9 @@ const de_ListClustersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2297,12 +2255,11 @@ export const de_ListClustersV2Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterInfoList != null) { - contents.ClusterInfoList = de___listOfCluster(data.clusterInfoList, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + ClusterInfoList: [, (_) => de___listOfCluster(_, context), `clusterInfoList`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2333,10 +2290,9 @@ const de_ListClustersV2CommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2356,12 +2312,11 @@ export const de_ListConfigurationRevisionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.revisions != null) { - contents.Revisions = de___listOfConfigurationRevision(data.revisions, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Revisions: [, (_) => de___listOfConfigurationRevision(_, context), `revisions`], + }); + Object.assign(contents, doc); return contents; }; @@ -2398,10 +2353,9 @@ const de_ListConfigurationRevisionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2421,12 +2375,11 @@ export const de_ListConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurations != null) { - contents.Configurations = de___listOfConfiguration(data.configurations, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Configurations: [, (_) => de___listOfConfiguration(_, context), `configurations`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2460,10 +2413,9 @@ const de_ListConfigurationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2483,12 +2435,11 @@ export const de_ListKafkaVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.kafkaVersions != null) { - contents.KafkaVersions = de___listOfKafkaVersion(data.kafkaVersions, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + KafkaVersions: [, (_) => de___listOfKafkaVersion(_, context), `kafkaVersions`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2519,10 +2470,9 @@ const de_ListKafkaVersionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2542,12 +2492,11 @@ export const de_ListNodesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.nodeInfoList != null) { - contents.NodeInfoList = de___listOfNodeInfo(data.nodeInfoList, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + NodeInfoList: [, (_) => de___listOfNodeInfo(_, context), `nodeInfoList`], + }); + Object.assign(contents, doc); return contents; }; @@ -2578,10 +2527,9 @@ const de_ListNodesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2601,12 +2549,11 @@ export const de_ListScramSecretsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.secretArnList != null) { - contents.SecretArnList = de___listOf__string(data.secretArnList, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + SecretArnList: [, _json, `secretArnList`], + }); + Object.assign(contents, doc); return contents; }; @@ -2646,10 +2593,9 @@ const de_ListScramSecretsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2669,9 +2615,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2699,10 +2646,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2722,12 +2668,11 @@ export const de_RebootBrokerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -2767,10 +2712,9 @@ const de_RebootBrokerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2817,10 +2761,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2867,10 +2810,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2890,12 +2832,11 @@ export const de_UpdateBrokerCountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -2929,10 +2870,9 @@ const de_UpdateBrokerCountCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2952,12 +2892,11 @@ export const de_UpdateBrokerStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -2991,10 +2930,9 @@ const de_UpdateBrokerStorageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3014,12 +2952,11 @@ export const de_UpdateBrokerTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3059,10 +2996,9 @@ const de_UpdateBrokerTypeCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3082,12 +3018,11 @@ export const de_UpdateClusterConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3124,10 +3059,9 @@ const de_UpdateClusterConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3147,12 +3081,11 @@ export const de_UpdateClusterKafkaVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3192,10 +3125,9 @@ const de_UpdateClusterKafkaVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3215,12 +3147,11 @@ export const de_UpdateConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.latestRevision != null) { - contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`], + }); + Object.assign(contents, doc); return contents; }; @@ -3257,10 +3188,9 @@ const de_UpdateConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3280,12 +3210,11 @@ export const de_UpdateConnectivityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3322,10 +3251,9 @@ const de_UpdateConnectivityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3345,12 +3273,11 @@ export const de_UpdateMonitoringCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3384,10 +3311,9 @@ const de_UpdateMonitoringCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3407,12 +3333,11 @@ export const de_UpdateSecurityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3452,10 +3377,9 @@ const de_UpdateSecurityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3475,12 +3399,11 @@ export const de_UpdateStorageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clusterArn != null) { - contents.ClusterArn = __expectString(data.clusterArn); - } - if (data.clusterOperationArn != null) { - contents.ClusterOperationArn = __expectString(data.clusterOperationArn); - } + const doc = take(data, { + ClusterArn: [, __expectString, `clusterArn`], + ClusterOperationArn: [, __expectString, `clusterOperationArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3520,28 +3443,26 @@ const de_UpdateStorageCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3555,12 +3476,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3574,12 +3494,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3596,12 +3515,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3615,12 +3533,11 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3637,12 +3554,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3659,12 +3575,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3681,12 +3596,11 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.invalidParameter != null) { - contents.InvalidParameter = __expectString(data.invalidParameter); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + InvalidParameter: [, __expectString, `invalidParameter`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3694,16 +3608,7 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfBrokerEBSVolumeInfo @@ -3727,362 +3632,322 @@ const se___listOfVpcConfig = (input: VpcConfig[], context: __SerdeContext): any }); }; -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. /** * serializeAws_restJson1BrokerEBSVolumeInfo */ const se_BrokerEBSVolumeInfo = (input: BrokerEBSVolumeInfo, context: __SerdeContext): any => { - return { - ...(input.KafkaBrokerNodeId != null && { kafkaBrokerNodeId: input.KafkaBrokerNodeId }), - ...(input.ProvisionedThroughput != null && { - provisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.VolumeSizeGB != null && { volumeSizeGB: input.VolumeSizeGB }), - }; + return take(input, { + kafkaBrokerNodeId: [, , `KafkaBrokerNodeId`], + provisionedThroughput: [, (_) => se_ProvisionedThroughput(_, context), `ProvisionedThroughput`], + volumeSizeGB: [, , `VolumeSizeGB`], + }); }; /** * serializeAws_restJson1BrokerLogs */ const se_BrokerLogs = (input: BrokerLogs, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogs != null && { cloudWatchLogs: se_CloudWatchLogs(input.CloudWatchLogs, context) }), - ...(input.Firehose != null && { firehose: se_Firehose(input.Firehose, context) }), - ...(input.S3 != null && { s3: se_S3(input.S3, context) }), - }; + return take(input, { + cloudWatchLogs: [, (_) => se_CloudWatchLogs(_, context), `CloudWatchLogs`], + firehose: [, (_) => se_Firehose(_, context), `Firehose`], + s3: [, (_) => se_S3(_, context), `S3`], + }); }; /** * serializeAws_restJson1BrokerNodeGroupInfo */ const se_BrokerNodeGroupInfo = (input: BrokerNodeGroupInfo, context: __SerdeContext): any => { - return { - ...(input.BrokerAZDistribution != null && { brokerAZDistribution: input.BrokerAZDistribution }), - ...(input.ClientSubnets != null && { clientSubnets: se___listOf__string(input.ClientSubnets, context) }), - ...(input.ConnectivityInfo != null && { connectivityInfo: se_ConnectivityInfo(input.ConnectivityInfo, context) }), - ...(input.InstanceType != null && { instanceType: input.InstanceType }), - ...(input.SecurityGroups != null && { securityGroups: se___listOf__string(input.SecurityGroups, context) }), - ...(input.StorageInfo != null && { storageInfo: se_StorageInfo(input.StorageInfo, context) }), - }; + return take(input, { + brokerAZDistribution: [, , `BrokerAZDistribution`], + clientSubnets: [, _json, `ClientSubnets`], + connectivityInfo: [, (_) => se_ConnectivityInfo(_, context), `ConnectivityInfo`], + instanceType: [, , `InstanceType`], + securityGroups: [, _json, `SecurityGroups`], + storageInfo: [, (_) => se_StorageInfo(_, context), `StorageInfo`], + }); }; /** * serializeAws_restJson1ClientAuthentication */ const se_ClientAuthentication = (input: ClientAuthentication, context: __SerdeContext): any => { - return { - ...(input.Sasl != null && { sasl: se_Sasl(input.Sasl, context) }), - ...(input.Tls != null && { tls: se_Tls(input.Tls, context) }), - ...(input.Unauthenticated != null && { unauthenticated: se_Unauthenticated(input.Unauthenticated, context) }), - }; + return take(input, { + sasl: [, (_) => se_Sasl(_, context), `Sasl`], + tls: [, (_) => se_Tls(_, context), `Tls`], + unauthenticated: [, (_) => se_Unauthenticated(_, context), `Unauthenticated`], + }); }; /** * serializeAws_restJson1CloudWatchLogs */ const se_CloudWatchLogs = (input: CloudWatchLogs, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { enabled: input.Enabled }), - ...(input.LogGroup != null && { logGroup: input.LogGroup }), - }; + return take(input, { + enabled: [, , `Enabled`], + logGroup: [, , `LogGroup`], + }); }; /** * serializeAws_restJson1ConfigurationInfo */ const se_ConfigurationInfo = (input: ConfigurationInfo, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { arn: input.Arn }), - ...(input.Revision != null && { revision: input.Revision }), - }; + return take(input, { + arn: [, , `Arn`], + revision: [, , `Revision`], + }); }; /** * serializeAws_restJson1ConnectivityInfo */ const se_ConnectivityInfo = (input: ConnectivityInfo, context: __SerdeContext): any => { - return { - ...(input.PublicAccess != null && { publicAccess: se_PublicAccess(input.PublicAccess, context) }), - }; + return take(input, { + publicAccess: [, (_) => se_PublicAccess(_, context), `PublicAccess`], + }); }; /** * serializeAws_restJson1EBSStorageInfo */ const se_EBSStorageInfo = (input: EBSStorageInfo, context: __SerdeContext): any => { - return { - ...(input.ProvisionedThroughput != null && { - provisionedThroughput: se_ProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.VolumeSize != null && { volumeSize: input.VolumeSize }), - }; + return take(input, { + provisionedThroughput: [, (_) => se_ProvisionedThroughput(_, context), `ProvisionedThroughput`], + volumeSize: [, , `VolumeSize`], + }); }; /** * serializeAws_restJson1EncryptionAtRest */ const se_EncryptionAtRest = (input: EncryptionAtRest, context: __SerdeContext): any => { - return { - ...(input.DataVolumeKMSKeyId != null && { dataVolumeKMSKeyId: input.DataVolumeKMSKeyId }), - }; + return take(input, { + dataVolumeKMSKeyId: [, , `DataVolumeKMSKeyId`], + }); }; /** * serializeAws_restJson1EncryptionInfo */ const se_EncryptionInfo = (input: EncryptionInfo, context: __SerdeContext): any => { - return { - ...(input.EncryptionAtRest != null && { encryptionAtRest: se_EncryptionAtRest(input.EncryptionAtRest, context) }), - ...(input.EncryptionInTransit != null && { - encryptionInTransit: se_EncryptionInTransit(input.EncryptionInTransit, context), - }), - }; + return take(input, { + encryptionAtRest: [, (_) => se_EncryptionAtRest(_, context), `EncryptionAtRest`], + encryptionInTransit: [, (_) => se_EncryptionInTransit(_, context), `EncryptionInTransit`], + }); }; /** * serializeAws_restJson1EncryptionInTransit */ const se_EncryptionInTransit = (input: EncryptionInTransit, context: __SerdeContext): any => { - return { - ...(input.ClientBroker != null && { clientBroker: input.ClientBroker }), - ...(input.InCluster != null && { inCluster: input.InCluster }), - }; + return take(input, { + clientBroker: [, , `ClientBroker`], + inCluster: [, , `InCluster`], + }); }; /** * serializeAws_restJson1Firehose */ const se_Firehose = (input: Firehose, context: __SerdeContext): any => { - return { - ...(input.DeliveryStream != null && { deliveryStream: input.DeliveryStream }), - ...(input.Enabled != null && { enabled: input.Enabled }), - }; + return take(input, { + deliveryStream: [, , `DeliveryStream`], + enabled: [, , `Enabled`], + }); }; /** * serializeAws_restJson1Iam */ const se_Iam = (input: Iam, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { enabled: input.Enabled }), - }; + return take(input, { + enabled: [, , `Enabled`], + }); }; /** * serializeAws_restJson1JmxExporterInfo */ const se_JmxExporterInfo = (input: JmxExporterInfo, context: __SerdeContext): any => { - return { - ...(input.EnabledInBroker != null && { enabledInBroker: input.EnabledInBroker }), - }; + return take(input, { + enabledInBroker: [, , `EnabledInBroker`], + }); }; /** * serializeAws_restJson1LoggingInfo */ const se_LoggingInfo = (input: LoggingInfo, context: __SerdeContext): any => { - return { - ...(input.BrokerLogs != null && { brokerLogs: se_BrokerLogs(input.BrokerLogs, context) }), - }; + return take(input, { + brokerLogs: [, (_) => se_BrokerLogs(_, context), `BrokerLogs`], + }); }; /** * serializeAws_restJson1NodeExporterInfo */ const se_NodeExporterInfo = (input: NodeExporterInfo, context: __SerdeContext): any => { - return { - ...(input.EnabledInBroker != null && { enabledInBroker: input.EnabledInBroker }), - }; + return take(input, { + enabledInBroker: [, , `EnabledInBroker`], + }); }; /** * serializeAws_restJson1OpenMonitoringInfo */ const se_OpenMonitoringInfo = (input: OpenMonitoringInfo, context: __SerdeContext): any => { - return { - ...(input.Prometheus != null && { prometheus: se_PrometheusInfo(input.Prometheus, context) }), - }; + return take(input, { + prometheus: [, (_) => se_PrometheusInfo(_, context), `Prometheus`], + }); }; /** * serializeAws_restJson1PrometheusInfo */ const se_PrometheusInfo = (input: PrometheusInfo, context: __SerdeContext): any => { - return { - ...(input.JmxExporter != null && { jmxExporter: se_JmxExporterInfo(input.JmxExporter, context) }), - ...(input.NodeExporter != null && { nodeExporter: se_NodeExporterInfo(input.NodeExporter, context) }), - }; + return take(input, { + jmxExporter: [, (_) => se_JmxExporterInfo(_, context), `JmxExporter`], + nodeExporter: [, (_) => se_NodeExporterInfo(_, context), `NodeExporter`], + }); }; /** * serializeAws_restJson1ProvisionedRequest */ const se_ProvisionedRequest = (input: ProvisionedRequest, context: __SerdeContext): any => { - return { - ...(input.BrokerNodeGroupInfo != null && { - brokerNodeGroupInfo: se_BrokerNodeGroupInfo(input.BrokerNodeGroupInfo, context), - }), - ...(input.ClientAuthentication != null && { - clientAuthentication: se_ClientAuthentication(input.ClientAuthentication, context), - }), - ...(input.ConfigurationInfo != null && { - configurationInfo: se_ConfigurationInfo(input.ConfigurationInfo, context), - }), - ...(input.EncryptionInfo != null && { encryptionInfo: se_EncryptionInfo(input.EncryptionInfo, context) }), - ...(input.EnhancedMonitoring != null && { enhancedMonitoring: input.EnhancedMonitoring }), - ...(input.KafkaVersion != null && { kafkaVersion: input.KafkaVersion }), - ...(input.LoggingInfo != null && { loggingInfo: se_LoggingInfo(input.LoggingInfo, context) }), - ...(input.NumberOfBrokerNodes != null && { numberOfBrokerNodes: input.NumberOfBrokerNodes }), - ...(input.OpenMonitoring != null && { openMonitoring: se_OpenMonitoringInfo(input.OpenMonitoring, context) }), - ...(input.StorageMode != null && { storageMode: input.StorageMode }), - }; + return take(input, { + brokerNodeGroupInfo: [, (_) => se_BrokerNodeGroupInfo(_, context), `BrokerNodeGroupInfo`], + clientAuthentication: [, (_) => se_ClientAuthentication(_, context), `ClientAuthentication`], + configurationInfo: [, (_) => se_ConfigurationInfo(_, context), `ConfigurationInfo`], + encryptionInfo: [, (_) => se_EncryptionInfo(_, context), `EncryptionInfo`], + enhancedMonitoring: [, , `EnhancedMonitoring`], + kafkaVersion: [, , `KafkaVersion`], + loggingInfo: [, (_) => se_LoggingInfo(_, context), `LoggingInfo`], + numberOfBrokerNodes: [, , `NumberOfBrokerNodes`], + openMonitoring: [, (_) => se_OpenMonitoringInfo(_, context), `OpenMonitoring`], + storageMode: [, , `StorageMode`], + }); }; /** * serializeAws_restJson1ProvisionedThroughput */ const se_ProvisionedThroughput = (input: ProvisionedThroughput, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { enabled: input.Enabled }), - ...(input.VolumeThroughput != null && { volumeThroughput: input.VolumeThroughput }), - }; + return take(input, { + enabled: [, , `Enabled`], + volumeThroughput: [, , `VolumeThroughput`], + }); }; /** * serializeAws_restJson1PublicAccess */ const se_PublicAccess = (input: PublicAccess, context: __SerdeContext): any => { - return { - ...(input.Type != null && { type: input.Type }), - }; + return take(input, { + type: [, , `Type`], + }); }; /** * serializeAws_restJson1S3 */ const se_S3 = (input: S3, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { bucket: input.Bucket }), - ...(input.Enabled != null && { enabled: input.Enabled }), - ...(input.Prefix != null && { prefix: input.Prefix }), - }; + return take(input, { + bucket: [, , `Bucket`], + enabled: [, , `Enabled`], + prefix: [, , `Prefix`], + }); }; /** * serializeAws_restJson1Sasl */ const se_Sasl = (input: Sasl, context: __SerdeContext): any => { - return { - ...(input.Iam != null && { iam: se_Iam(input.Iam, context) }), - ...(input.Scram != null && { scram: se_Scram(input.Scram, context) }), - }; + return take(input, { + iam: [, (_) => se_Iam(_, context), `Iam`], + scram: [, (_) => se_Scram(_, context), `Scram`], + }); }; /** * serializeAws_restJson1Scram */ const se_Scram = (input: Scram, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { enabled: input.Enabled }), - }; + return take(input, { + enabled: [, , `Enabled`], + }); }; /** * serializeAws_restJson1ServerlessClientAuthentication */ const se_ServerlessClientAuthentication = (input: ServerlessClientAuthentication, context: __SerdeContext): any => { - return { - ...(input.Sasl != null && { sasl: se_ServerlessSasl(input.Sasl, context) }), - }; + return take(input, { + sasl: [, (_) => se_ServerlessSasl(_, context), `Sasl`], + }); }; /** * serializeAws_restJson1ServerlessRequest */ const se_ServerlessRequest = (input: ServerlessRequest, context: __SerdeContext): any => { - return { - ...(input.ClientAuthentication != null && { - clientAuthentication: se_ServerlessClientAuthentication(input.ClientAuthentication, context), - }), - ...(input.VpcConfigs != null && { vpcConfigs: se___listOfVpcConfig(input.VpcConfigs, context) }), - }; + return take(input, { + clientAuthentication: [, (_) => se_ServerlessClientAuthentication(_, context), `ClientAuthentication`], + vpcConfigs: [, (_) => se___listOfVpcConfig(_, context), `VpcConfigs`], + }); }; /** * serializeAws_restJson1ServerlessSasl */ const se_ServerlessSasl = (input: ServerlessSasl, context: __SerdeContext): any => { - return { - ...(input.Iam != null && { iam: se_Iam(input.Iam, context) }), - }; + return take(input, { + iam: [, (_) => se_Iam(_, context), `Iam`], + }); }; /** * serializeAws_restJson1StorageInfo */ const se_StorageInfo = (input: StorageInfo, context: __SerdeContext): any => { - return { - ...(input.EbsStorageInfo != null && { ebsStorageInfo: se_EBSStorageInfo(input.EbsStorageInfo, context) }), - }; + return take(input, { + ebsStorageInfo: [, (_) => se_EBSStorageInfo(_, context), `EbsStorageInfo`], + }); }; /** * serializeAws_restJson1Tls */ const se_Tls = (input: Tls, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArnList != null && { - certificateAuthorityArnList: se___listOf__string(input.CertificateAuthorityArnList, context), - }), - ...(input.Enabled != null && { enabled: input.Enabled }), - }; + return take(input, { + certificateAuthorityArnList: [, _json, `CertificateAuthorityArnList`], + enabled: [, , `Enabled`], + }); }; /** * serializeAws_restJson1Unauthenticated */ const se_Unauthenticated = (input: Unauthenticated, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { enabled: input.Enabled }), - }; + return take(input, { + enabled: [, , `Enabled`], + }); }; /** * serializeAws_restJson1VpcConfig */ const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { securityGroupIds: se___listOf__string(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { subnetIds: se___listOf__string(input.SubnetIds, context) }), - }; + return take(input, { + securityGroupIds: [, _json, `SecurityGroupIds`], + subnetIds: [, _json, `SubnetIds`], + }); }; -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfBrokerEBSVolumeInfo @@ -4091,9 +3956,6 @@ const de___listOfBrokerEBSVolumeInfo = (output: any, context: __SerdeContext): B const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BrokerEBSVolumeInfo(entry, context); }); return retVal; @@ -4106,9 +3968,6 @@ const de___listOfCluster = (output: any, context: __SerdeContext): Cluster[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Cluster(entry, context); }); return retVal; @@ -4121,9 +3980,6 @@ const de___listOfClusterInfo = (output: any, context: __SerdeContext): ClusterIn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ClusterInfo(entry, context); }); return retVal; @@ -4136,9 +3992,6 @@ const de___listOfClusterOperationInfo = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ClusterOperationInfo(entry, context); }); return retVal; @@ -4151,9 +4004,6 @@ const de___listOfClusterOperationStep = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ClusterOperationStep(entry, context); }); return retVal; @@ -4166,9 +4016,6 @@ const de___listOfCompatibleKafkaVersion = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CompatibleKafkaVersion(entry, context); }); return retVal; @@ -4181,9 +4028,6 @@ const de___listOfConfiguration = (output: any, context: __SerdeContext): Configu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Configuration(entry, context); }); return retVal; @@ -4196,9 +4040,6 @@ const de___listOfConfigurationRevision = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigurationRevision(entry, context); }); return retVal; @@ -4211,9 +4052,6 @@ const de___listOfKafkaVersion = (output: any, context: __SerdeContext): KafkaVer const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_KafkaVersion(entry, context); }); return retVal; @@ -4226,9 +4064,6 @@ const de___listOfNodeInfo = (output: any, context: __SerdeContext): NodeInfo[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NodeInfo(entry, context); }); return retVal; @@ -4241,9 +4076,6 @@ const de___listOfUnprocessedScramSecret = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UnprocessedScramSecret(entry, context); }); return retVal; @@ -4256,654 +4088,595 @@ const de___listOfVpcConfig = (output: any, context: __SerdeContext): VpcConfig[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VpcConfig(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. /** * deserializeAws_restJson1BrokerEBSVolumeInfo */ const de_BrokerEBSVolumeInfo = (output: any, context: __SerdeContext): BrokerEBSVolumeInfo => { - return { - KafkaBrokerNodeId: __expectString(output.kafkaBrokerNodeId), - ProvisionedThroughput: - output.provisionedThroughput != null - ? de_ProvisionedThroughput(output.provisionedThroughput, context) - : undefined, - VolumeSizeGB: __expectInt32(output.volumeSizeGB), - } as any; + return take(output, { + KafkaBrokerNodeId: [, __expectString, `kafkaBrokerNodeId`], + ProvisionedThroughput: (_) => [, de_ProvisionedThroughput(_, context), `provisionedThroughput`], + VolumeSizeGB: [, __expectInt32, `volumeSizeGB`], + }) as any; }; /** * deserializeAws_restJson1BrokerLogs */ const de_BrokerLogs = (output: any, context: __SerdeContext): BrokerLogs => { - return { - CloudWatchLogs: output.cloudWatchLogs != null ? de_CloudWatchLogs(output.cloudWatchLogs, context) : undefined, - Firehose: output.firehose != null ? de_Firehose(output.firehose, context) : undefined, - S3: output.s3 != null ? de_S3(output.s3, context) : undefined, - } as any; + return take(output, { + CloudWatchLogs: (_) => [, de_CloudWatchLogs(_, context), `cloudWatchLogs`], + Firehose: (_) => [, de_Firehose(_, context), `firehose`], + S3: (_) => [, de_S3(_, context), `s3`], + }) as any; }; /** * deserializeAws_restJson1BrokerNodeGroupInfo */ const de_BrokerNodeGroupInfo = (output: any, context: __SerdeContext): BrokerNodeGroupInfo => { - return { - BrokerAZDistribution: __expectString(output.brokerAZDistribution), - ClientSubnets: output.clientSubnets != null ? de___listOf__string(output.clientSubnets, context) : undefined, - ConnectivityInfo: - output.connectivityInfo != null ? de_ConnectivityInfo(output.connectivityInfo, context) : undefined, - InstanceType: __expectString(output.instanceType), - SecurityGroups: output.securityGroups != null ? de___listOf__string(output.securityGroups, context) : undefined, - StorageInfo: output.storageInfo != null ? de_StorageInfo(output.storageInfo, context) : undefined, - } as any; + return take(output, { + BrokerAZDistribution: [, __expectString, `brokerAZDistribution`], + ClientSubnets: [, _json, `clientSubnets`], + ConnectivityInfo: (_) => [, de_ConnectivityInfo(_, context), `connectivityInfo`], + InstanceType: [, __expectString, `instanceType`], + SecurityGroups: [, _json, `securityGroups`], + StorageInfo: (_) => [, de_StorageInfo(_, context), `storageInfo`], + }) as any; }; /** * deserializeAws_restJson1BrokerNodeInfo */ const de_BrokerNodeInfo = (output: any, context: __SerdeContext): BrokerNodeInfo => { - return { - AttachedENIId: __expectString(output.attachedENIId), - BrokerId: __limitedParseDouble(output.brokerId), - ClientSubnet: __expectString(output.clientSubnet), - ClientVpcIpAddress: __expectString(output.clientVpcIpAddress), - CurrentBrokerSoftwareInfo: - output.currentBrokerSoftwareInfo != null - ? de_BrokerSoftwareInfo(output.currentBrokerSoftwareInfo, context) - : undefined, - Endpoints: output.endpoints != null ? de___listOf__string(output.endpoints, context) : undefined, - } as any; + return take(output, { + AttachedENIId: [, __expectString, `attachedENIId`], + BrokerId: [, __limitedParseDouble, `brokerId`], + ClientSubnet: [, __expectString, `clientSubnet`], + ClientVpcIpAddress: [, __expectString, `clientVpcIpAddress`], + CurrentBrokerSoftwareInfo: (_) => [, de_BrokerSoftwareInfo(_, context), `currentBrokerSoftwareInfo`], + Endpoints: [, _json, `endpoints`], + }) as any; }; /** * deserializeAws_restJson1BrokerSoftwareInfo */ const de_BrokerSoftwareInfo = (output: any, context: __SerdeContext): BrokerSoftwareInfo => { - return { - ConfigurationArn: __expectString(output.configurationArn), - ConfigurationRevision: __expectLong(output.configurationRevision), - KafkaVersion: __expectString(output.kafkaVersion), - } as any; + return take(output, { + ConfigurationArn: [, __expectString, `configurationArn`], + ConfigurationRevision: [, __expectLong, `configurationRevision`], + KafkaVersion: [, __expectString, `kafkaVersion`], + }) as any; }; /** * deserializeAws_restJson1ClientAuthentication */ const de_ClientAuthentication = (output: any, context: __SerdeContext): ClientAuthentication => { - return { - Sasl: output.sasl != null ? de_Sasl(output.sasl, context) : undefined, - Tls: output.tls != null ? de_Tls(output.tls, context) : undefined, - Unauthenticated: output.unauthenticated != null ? de_Unauthenticated(output.unauthenticated, context) : undefined, - } as any; + return take(output, { + Sasl: (_) => [, de_Sasl(_, context), `sasl`], + Tls: (_) => [, de_Tls(_, context), `tls`], + Unauthenticated: (_) => [, de_Unauthenticated(_, context), `unauthenticated`], + }) as any; }; /** * deserializeAws_restJson1CloudWatchLogs */ const de_CloudWatchLogs = (output: any, context: __SerdeContext): CloudWatchLogs => { - return { - Enabled: __expectBoolean(output.enabled), - LogGroup: __expectString(output.logGroup), - } as any; + return take(output, { + Enabled: [, __expectBoolean, `enabled`], + LogGroup: [, __expectString, `logGroup`], + }) as any; }; /** * deserializeAws_restJson1Cluster */ const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - ActiveOperationArn: __expectString(output.activeOperationArn), - ClusterArn: __expectString(output.clusterArn), - ClusterName: __expectString(output.clusterName), - ClusterType: __expectString(output.clusterType), - CreationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - CurrentVersion: __expectString(output.currentVersion), - Provisioned: output.provisioned != null ? de_Provisioned(output.provisioned, context) : undefined, - Serverless: output.serverless != null ? de_Serverless(output.serverless, context) : undefined, - State: __expectString(output.state), - StateInfo: output.stateInfo != null ? de_StateInfo(output.stateInfo, context) : undefined, - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + ActiveOperationArn: [, __expectString, `activeOperationArn`], + ClusterArn: [, __expectString, `clusterArn`], + ClusterName: [, __expectString, `clusterName`], + ClusterType: [, __expectString, `clusterType`], + CreationTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + CurrentVersion: [, __expectString, `currentVersion`], + Provisioned: (_) => [, de_Provisioned(_, context), `provisioned`], + Serverless: (_) => [, de_Serverless(_, context), `serverless`], + State: [, __expectString, `state`], + StateInfo: (_) => [, de_StateInfo(_, context), `stateInfo`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1ClusterInfo */ const de_ClusterInfo = (output: any, context: __SerdeContext): ClusterInfo => { - return { - ActiveOperationArn: __expectString(output.activeOperationArn), - BrokerNodeGroupInfo: - output.brokerNodeGroupInfo != null ? de_BrokerNodeGroupInfo(output.brokerNodeGroupInfo, context) : undefined, - ClientAuthentication: - output.clientAuthentication != null ? de_ClientAuthentication(output.clientAuthentication, context) : undefined, - ClusterArn: __expectString(output.clusterArn), - ClusterName: __expectString(output.clusterName), - CreationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - CurrentBrokerSoftwareInfo: - output.currentBrokerSoftwareInfo != null - ? de_BrokerSoftwareInfo(output.currentBrokerSoftwareInfo, context) - : undefined, - CurrentVersion: __expectString(output.currentVersion), - EncryptionInfo: output.encryptionInfo != null ? de_EncryptionInfo(output.encryptionInfo, context) : undefined, - EnhancedMonitoring: __expectString(output.enhancedMonitoring), - LoggingInfo: output.loggingInfo != null ? de_LoggingInfo(output.loggingInfo, context) : undefined, - NumberOfBrokerNodes: __expectInt32(output.numberOfBrokerNodes), - OpenMonitoring: output.openMonitoring != null ? de_OpenMonitoring(output.openMonitoring, context) : undefined, - State: __expectString(output.state), - StateInfo: output.stateInfo != null ? de_StateInfo(output.stateInfo, context) : undefined, - StorageMode: __expectString(output.storageMode), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - ZookeeperConnectString: __expectString(output.zookeeperConnectString), - ZookeeperConnectStringTls: __expectString(output.zookeeperConnectStringTls), - } as any; + return take(output, { + ActiveOperationArn: [, __expectString, `activeOperationArn`], + BrokerNodeGroupInfo: (_) => [, de_BrokerNodeGroupInfo(_, context), `brokerNodeGroupInfo`], + ClientAuthentication: (_) => [, de_ClientAuthentication(_, context), `clientAuthentication`], + ClusterArn: [, __expectString, `clusterArn`], + ClusterName: [, __expectString, `clusterName`], + CreationTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + CurrentBrokerSoftwareInfo: (_) => [, de_BrokerSoftwareInfo(_, context), `currentBrokerSoftwareInfo`], + CurrentVersion: [, __expectString, `currentVersion`], + EncryptionInfo: (_) => [, de_EncryptionInfo(_, context), `encryptionInfo`], + EnhancedMonitoring: [, __expectString, `enhancedMonitoring`], + LoggingInfo: (_) => [, de_LoggingInfo(_, context), `loggingInfo`], + NumberOfBrokerNodes: [, __expectInt32, `numberOfBrokerNodes`], + OpenMonitoring: (_) => [, de_OpenMonitoring(_, context), `openMonitoring`], + State: [, __expectString, `state`], + StateInfo: (_) => [, de_StateInfo(_, context), `stateInfo`], + StorageMode: [, __expectString, `storageMode`], + Tags: [, _json, `tags`], + ZookeeperConnectString: [, __expectString, `zookeeperConnectString`], + ZookeeperConnectStringTls: [, __expectString, `zookeeperConnectStringTls`], + }) as any; }; /** * deserializeAws_restJson1ClusterOperationInfo */ const de_ClusterOperationInfo = (output: any, context: __SerdeContext): ClusterOperationInfo => { - return { - ClientRequestId: __expectString(output.clientRequestId), - ClusterArn: __expectString(output.clusterArn), - CreationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - EndTime: output.endTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endTime)) : undefined, - ErrorInfo: output.errorInfo != null ? de_ErrorInfo(output.errorInfo, context) : undefined, - OperationArn: __expectString(output.operationArn), - OperationState: __expectString(output.operationState), - OperationSteps: - output.operationSteps != null ? de___listOfClusterOperationStep(output.operationSteps, context) : undefined, - OperationType: __expectString(output.operationType), - SourceClusterInfo: - output.sourceClusterInfo != null ? de_MutableClusterInfo(output.sourceClusterInfo, context) : undefined, - TargetClusterInfo: - output.targetClusterInfo != null ? de_MutableClusterInfo(output.targetClusterInfo, context) : undefined, - } as any; + return take(output, { + ClientRequestId: [, __expectString, `clientRequestId`], + ClusterArn: [, __expectString, `clusterArn`], + CreationTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + EndTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `endTime`], + ErrorInfo: (_) => [, de_ErrorInfo(_, context), `errorInfo`], + OperationArn: [, __expectString, `operationArn`], + OperationState: [, __expectString, `operationState`], + OperationSteps: (_) => [, de___listOfClusterOperationStep(_, context), `operationSteps`], + OperationType: [, __expectString, `operationType`], + SourceClusterInfo: (_) => [, de_MutableClusterInfo(_, context), `sourceClusterInfo`], + TargetClusterInfo: (_) => [, de_MutableClusterInfo(_, context), `targetClusterInfo`], + }) as any; }; /** * deserializeAws_restJson1ClusterOperationStep */ const de_ClusterOperationStep = (output: any, context: __SerdeContext): ClusterOperationStep => { - return { - StepInfo: output.stepInfo != null ? de_ClusterOperationStepInfo(output.stepInfo, context) : undefined, - StepName: __expectString(output.stepName), - } as any; + return take(output, { + StepInfo: (_) => [, de_ClusterOperationStepInfo(_, context), `stepInfo`], + StepName: [, __expectString, `stepName`], + }) as any; }; /** * deserializeAws_restJson1ClusterOperationStepInfo */ const de_ClusterOperationStepInfo = (output: any, context: __SerdeContext): ClusterOperationStepInfo => { - return { - StepStatus: __expectString(output.stepStatus), - } as any; + return take(output, { + StepStatus: [, __expectString, `stepStatus`], + }) as any; }; /** * deserializeAws_restJson1CompatibleKafkaVersion */ const de_CompatibleKafkaVersion = (output: any, context: __SerdeContext): CompatibleKafkaVersion => { - return { - SourceVersion: __expectString(output.sourceVersion), - TargetVersions: output.targetVersions != null ? de___listOf__string(output.targetVersions, context) : undefined, - } as any; + return take(output, { + SourceVersion: [, __expectString, `sourceVersion`], + TargetVersions: [, _json, `targetVersions`], + }) as any; }; /** * deserializeAws_restJson1Configuration */ const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - Arn: __expectString(output.arn), - CreationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - Description: __expectString(output.description), - KafkaVersions: output.kafkaVersions != null ? de___listOf__string(output.kafkaVersions, context) : undefined, - LatestRevision: - output.latestRevision != null ? de_ConfigurationRevision(output.latestRevision, context) : undefined, - Name: __expectString(output.name), - State: __expectString(output.state), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CreationTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + Description: [, __expectString, `description`], + KafkaVersions: [, _json, `kafkaVersions`], + LatestRevision: (_) => [, de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + State: [, __expectString, `state`], + }) as any; }; /** * deserializeAws_restJson1ConfigurationInfo */ const de_ConfigurationInfo = (output: any, context: __SerdeContext): ConfigurationInfo => { - return { - Arn: __expectString(output.arn), - Revision: __expectLong(output.revision), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Revision: [, __expectLong, `revision`], + }) as any; }; /** * deserializeAws_restJson1ConfigurationRevision */ const de_ConfigurationRevision = (output: any, context: __SerdeContext): ConfigurationRevision => { - return { - CreationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - Description: __expectString(output.description), - Revision: __expectLong(output.revision), - } as any; + return take(output, { + CreationTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationTime`], + Description: [, __expectString, `description`], + Revision: [, __expectLong, `revision`], + }) as any; }; /** * deserializeAws_restJson1ConnectivityInfo */ const de_ConnectivityInfo = (output: any, context: __SerdeContext): ConnectivityInfo => { - return { - PublicAccess: output.publicAccess != null ? de_PublicAccess(output.publicAccess, context) : undefined, - } as any; + return take(output, { + PublicAccess: (_) => [, de_PublicAccess(_, context), `publicAccess`], + }) as any; }; /** * deserializeAws_restJson1EBSStorageInfo */ const de_EBSStorageInfo = (output: any, context: __SerdeContext): EBSStorageInfo => { - return { - ProvisionedThroughput: - output.provisionedThroughput != null - ? de_ProvisionedThroughput(output.provisionedThroughput, context) - : undefined, - VolumeSize: __expectInt32(output.volumeSize), - } as any; + return take(output, { + ProvisionedThroughput: (_) => [, de_ProvisionedThroughput(_, context), `provisionedThroughput`], + VolumeSize: [, __expectInt32, `volumeSize`], + }) as any; }; /** * deserializeAws_restJson1EncryptionAtRest */ const de_EncryptionAtRest = (output: any, context: __SerdeContext): EncryptionAtRest => { - return { - DataVolumeKMSKeyId: __expectString(output.dataVolumeKMSKeyId), - } as any; + return take(output, { + DataVolumeKMSKeyId: [, __expectString, `dataVolumeKMSKeyId`], + }) as any; }; /** * deserializeAws_restJson1EncryptionInfo */ const de_EncryptionInfo = (output: any, context: __SerdeContext): EncryptionInfo => { - return { - EncryptionAtRest: - output.encryptionAtRest != null ? de_EncryptionAtRest(output.encryptionAtRest, context) : undefined, - EncryptionInTransit: - output.encryptionInTransit != null ? de_EncryptionInTransit(output.encryptionInTransit, context) : undefined, - } as any; + return take(output, { + EncryptionAtRest: (_) => [, de_EncryptionAtRest(_, context), `encryptionAtRest`], + EncryptionInTransit: (_) => [, de_EncryptionInTransit(_, context), `encryptionInTransit`], + }) as any; }; /** * deserializeAws_restJson1EncryptionInTransit */ const de_EncryptionInTransit = (output: any, context: __SerdeContext): EncryptionInTransit => { - return { - ClientBroker: __expectString(output.clientBroker), - InCluster: __expectBoolean(output.inCluster), - } as any; + return take(output, { + ClientBroker: [, __expectString, `clientBroker`], + InCluster: [, __expectBoolean, `inCluster`], + }) as any; }; /** * deserializeAws_restJson1ErrorInfo */ const de_ErrorInfo = (output: any, context: __SerdeContext): ErrorInfo => { - return { - ErrorCode: __expectString(output.errorCode), - ErrorString: __expectString(output.errorString), - } as any; + return take(output, { + ErrorCode: [, __expectString, `errorCode`], + ErrorString: [, __expectString, `errorString`], + }) as any; }; /** * deserializeAws_restJson1Firehose */ const de_Firehose = (output: any, context: __SerdeContext): Firehose => { - return { - DeliveryStream: __expectString(output.deliveryStream), - Enabled: __expectBoolean(output.enabled), - } as any; + return take(output, { + DeliveryStream: [, __expectString, `deliveryStream`], + Enabled: [, __expectBoolean, `enabled`], + }) as any; }; /** * deserializeAws_restJson1Iam */ const de_Iam = (output: any, context: __SerdeContext): Iam => { - return { - Enabled: __expectBoolean(output.enabled), - } as any; + return take(output, { + Enabled: [, __expectBoolean, `enabled`], + }) as any; }; /** * deserializeAws_restJson1JmxExporter */ const de_JmxExporter = (output: any, context: __SerdeContext): JmxExporter => { - return { - EnabledInBroker: __expectBoolean(output.enabledInBroker), - } as any; + return take(output, { + EnabledInBroker: [, __expectBoolean, `enabledInBroker`], + }) as any; }; /** * deserializeAws_restJson1JmxExporterInfo */ const de_JmxExporterInfo = (output: any, context: __SerdeContext): JmxExporterInfo => { - return { - EnabledInBroker: __expectBoolean(output.enabledInBroker), - } as any; + return take(output, { + EnabledInBroker: [, __expectBoolean, `enabledInBroker`], + }) as any; }; /** * deserializeAws_restJson1KafkaVersion */ const de_KafkaVersion = (output: any, context: __SerdeContext): KafkaVersion => { - return { - Status: __expectString(output.status), - Version: __expectString(output.version), - } as any; + return take(output, { + Status: [, __expectString, `status`], + Version: [, __expectString, `version`], + }) as any; }; /** * deserializeAws_restJson1LoggingInfo */ const de_LoggingInfo = (output: any, context: __SerdeContext): LoggingInfo => { - return { - BrokerLogs: output.brokerLogs != null ? de_BrokerLogs(output.brokerLogs, context) : undefined, - } as any; + return take(output, { + BrokerLogs: (_) => [, de_BrokerLogs(_, context), `brokerLogs`], + }) as any; }; /** * deserializeAws_restJson1MutableClusterInfo */ const de_MutableClusterInfo = (output: any, context: __SerdeContext): MutableClusterInfo => { - return { - BrokerEBSVolumeInfo: - output.brokerEBSVolumeInfo != null - ? de___listOfBrokerEBSVolumeInfo(output.brokerEBSVolumeInfo, context) - : undefined, - ClientAuthentication: - output.clientAuthentication != null ? de_ClientAuthentication(output.clientAuthentication, context) : undefined, - ConfigurationInfo: - output.configurationInfo != null ? de_ConfigurationInfo(output.configurationInfo, context) : undefined, - ConnectivityInfo: - output.connectivityInfo != null ? de_ConnectivityInfo(output.connectivityInfo, context) : undefined, - EncryptionInfo: output.encryptionInfo != null ? de_EncryptionInfo(output.encryptionInfo, context) : undefined, - EnhancedMonitoring: __expectString(output.enhancedMonitoring), - InstanceType: __expectString(output.instanceType), - KafkaVersion: __expectString(output.kafkaVersion), - LoggingInfo: output.loggingInfo != null ? de_LoggingInfo(output.loggingInfo, context) : undefined, - NumberOfBrokerNodes: __expectInt32(output.numberOfBrokerNodes), - OpenMonitoring: output.openMonitoring != null ? de_OpenMonitoring(output.openMonitoring, context) : undefined, - StorageMode: __expectString(output.storageMode), - } as any; + return take(output, { + BrokerEBSVolumeInfo: (_) => [, de___listOfBrokerEBSVolumeInfo(_, context), `brokerEBSVolumeInfo`], + ClientAuthentication: (_) => [, de_ClientAuthentication(_, context), `clientAuthentication`], + ConfigurationInfo: (_) => [, de_ConfigurationInfo(_, context), `configurationInfo`], + ConnectivityInfo: (_) => [, de_ConnectivityInfo(_, context), `connectivityInfo`], + EncryptionInfo: (_) => [, de_EncryptionInfo(_, context), `encryptionInfo`], + EnhancedMonitoring: [, __expectString, `enhancedMonitoring`], + InstanceType: [, __expectString, `instanceType`], + KafkaVersion: [, __expectString, `kafkaVersion`], + LoggingInfo: (_) => [, de_LoggingInfo(_, context), `loggingInfo`], + NumberOfBrokerNodes: [, __expectInt32, `numberOfBrokerNodes`], + OpenMonitoring: (_) => [, de_OpenMonitoring(_, context), `openMonitoring`], + StorageMode: [, __expectString, `storageMode`], + }) as any; }; /** * deserializeAws_restJson1NodeExporter */ const de_NodeExporter = (output: any, context: __SerdeContext): NodeExporter => { - return { - EnabledInBroker: __expectBoolean(output.enabledInBroker), - } as any; + return take(output, { + EnabledInBroker: [, __expectBoolean, `enabledInBroker`], + }) as any; }; /** * deserializeAws_restJson1NodeExporterInfo */ const de_NodeExporterInfo = (output: any, context: __SerdeContext): NodeExporterInfo => { - return { - EnabledInBroker: __expectBoolean(output.enabledInBroker), - } as any; + return take(output, { + EnabledInBroker: [, __expectBoolean, `enabledInBroker`], + }) as any; }; /** * deserializeAws_restJson1NodeInfo */ const de_NodeInfo = (output: any, context: __SerdeContext): NodeInfo => { - return { - AddedToClusterTime: __expectString(output.addedToClusterTime), - BrokerNodeInfo: output.brokerNodeInfo != null ? de_BrokerNodeInfo(output.brokerNodeInfo, context) : undefined, - InstanceType: __expectString(output.instanceType), - NodeARN: __expectString(output.nodeARN), - NodeType: __expectString(output.nodeType), - ZookeeperNodeInfo: - output.zookeeperNodeInfo != null ? de_ZookeeperNodeInfo(output.zookeeperNodeInfo, context) : undefined, - } as any; + return take(output, { + AddedToClusterTime: [, __expectString, `addedToClusterTime`], + BrokerNodeInfo: (_) => [, de_BrokerNodeInfo(_, context), `brokerNodeInfo`], + InstanceType: [, __expectString, `instanceType`], + NodeARN: [, __expectString, `nodeARN`], + NodeType: [, __expectString, `nodeType`], + ZookeeperNodeInfo: (_) => [, de_ZookeeperNodeInfo(_, context), `zookeeperNodeInfo`], + }) as any; }; /** * deserializeAws_restJson1OpenMonitoring */ const de_OpenMonitoring = (output: any, context: __SerdeContext): OpenMonitoring => { - return { - Prometheus: output.prometheus != null ? de_Prometheus(output.prometheus, context) : undefined, - } as any; + return take(output, { + Prometheus: (_) => [, de_Prometheus(_, context), `prometheus`], + }) as any; }; /** * deserializeAws_restJson1OpenMonitoringInfo */ const de_OpenMonitoringInfo = (output: any, context: __SerdeContext): OpenMonitoringInfo => { - return { - Prometheus: output.prometheus != null ? de_PrometheusInfo(output.prometheus, context) : undefined, - } as any; + return take(output, { + Prometheus: (_) => [, de_PrometheusInfo(_, context), `prometheus`], + }) as any; }; /** * deserializeAws_restJson1Prometheus */ const de_Prometheus = (output: any, context: __SerdeContext): Prometheus => { - return { - JmxExporter: output.jmxExporter != null ? de_JmxExporter(output.jmxExporter, context) : undefined, - NodeExporter: output.nodeExporter != null ? de_NodeExporter(output.nodeExporter, context) : undefined, - } as any; + return take(output, { + JmxExporter: (_) => [, de_JmxExporter(_, context), `jmxExporter`], + NodeExporter: (_) => [, de_NodeExporter(_, context), `nodeExporter`], + }) as any; }; /** * deserializeAws_restJson1PrometheusInfo */ const de_PrometheusInfo = (output: any, context: __SerdeContext): PrometheusInfo => { - return { - JmxExporter: output.jmxExporter != null ? de_JmxExporterInfo(output.jmxExporter, context) : undefined, - NodeExporter: output.nodeExporter != null ? de_NodeExporterInfo(output.nodeExporter, context) : undefined, - } as any; + return take(output, { + JmxExporter: (_) => [, de_JmxExporterInfo(_, context), `jmxExporter`], + NodeExporter: (_) => [, de_NodeExporterInfo(_, context), `nodeExporter`], + }) as any; }; /** * deserializeAws_restJson1Provisioned */ const de_Provisioned = (output: any, context: __SerdeContext): Provisioned => { - return { - BrokerNodeGroupInfo: - output.brokerNodeGroupInfo != null ? de_BrokerNodeGroupInfo(output.brokerNodeGroupInfo, context) : undefined, - ClientAuthentication: - output.clientAuthentication != null ? de_ClientAuthentication(output.clientAuthentication, context) : undefined, - CurrentBrokerSoftwareInfo: - output.currentBrokerSoftwareInfo != null - ? de_BrokerSoftwareInfo(output.currentBrokerSoftwareInfo, context) - : undefined, - EncryptionInfo: output.encryptionInfo != null ? de_EncryptionInfo(output.encryptionInfo, context) : undefined, - EnhancedMonitoring: __expectString(output.enhancedMonitoring), - LoggingInfo: output.loggingInfo != null ? de_LoggingInfo(output.loggingInfo, context) : undefined, - NumberOfBrokerNodes: __expectInt32(output.numberOfBrokerNodes), - OpenMonitoring: output.openMonitoring != null ? de_OpenMonitoringInfo(output.openMonitoring, context) : undefined, - StorageMode: __expectString(output.storageMode), - ZookeeperConnectString: __expectString(output.zookeeperConnectString), - ZookeeperConnectStringTls: __expectString(output.zookeeperConnectStringTls), - } as any; + return take(output, { + BrokerNodeGroupInfo: (_) => [, de_BrokerNodeGroupInfo(_, context), `brokerNodeGroupInfo`], + ClientAuthentication: (_) => [, de_ClientAuthentication(_, context), `clientAuthentication`], + CurrentBrokerSoftwareInfo: (_) => [, de_BrokerSoftwareInfo(_, context), `currentBrokerSoftwareInfo`], + EncryptionInfo: (_) => [, de_EncryptionInfo(_, context), `encryptionInfo`], + EnhancedMonitoring: [, __expectString, `enhancedMonitoring`], + LoggingInfo: (_) => [, de_LoggingInfo(_, context), `loggingInfo`], + NumberOfBrokerNodes: [, __expectInt32, `numberOfBrokerNodes`], + OpenMonitoring: (_) => [, de_OpenMonitoringInfo(_, context), `openMonitoring`], + StorageMode: [, __expectString, `storageMode`], + ZookeeperConnectString: [, __expectString, `zookeeperConnectString`], + ZookeeperConnectStringTls: [, __expectString, `zookeeperConnectStringTls`], + }) as any; }; /** * deserializeAws_restJson1ProvisionedThroughput */ const de_ProvisionedThroughput = (output: any, context: __SerdeContext): ProvisionedThroughput => { - return { - Enabled: __expectBoolean(output.enabled), - VolumeThroughput: __expectInt32(output.volumeThroughput), - } as any; + return take(output, { + Enabled: [, __expectBoolean, `enabled`], + VolumeThroughput: [, __expectInt32, `volumeThroughput`], + }) as any; }; /** * deserializeAws_restJson1PublicAccess */ const de_PublicAccess = (output: any, context: __SerdeContext): PublicAccess => { - return { - Type: __expectString(output.type), - } as any; + return take(output, { + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1S3 */ const de_S3 = (output: any, context: __SerdeContext): S3 => { - return { - Bucket: __expectString(output.bucket), - Enabled: __expectBoolean(output.enabled), - Prefix: __expectString(output.prefix), - } as any; + return take(output, { + Bucket: [, __expectString, `bucket`], + Enabled: [, __expectBoolean, `enabled`], + Prefix: [, __expectString, `prefix`], + }) as any; }; /** * deserializeAws_restJson1Sasl */ const de_Sasl = (output: any, context: __SerdeContext): Sasl => { - return { - Iam: output.iam != null ? de_Iam(output.iam, context) : undefined, - Scram: output.scram != null ? de_Scram(output.scram, context) : undefined, - } as any; + return take(output, { + Iam: (_) => [, de_Iam(_, context), `iam`], + Scram: (_) => [, de_Scram(_, context), `scram`], + }) as any; }; /** * deserializeAws_restJson1Scram */ const de_Scram = (output: any, context: __SerdeContext): Scram => { - return { - Enabled: __expectBoolean(output.enabled), - } as any; + return take(output, { + Enabled: [, __expectBoolean, `enabled`], + }) as any; }; /** * deserializeAws_restJson1Serverless */ const de_Serverless = (output: any, context: __SerdeContext): Serverless => { - return { - ClientAuthentication: - output.clientAuthentication != null - ? de_ServerlessClientAuthentication(output.clientAuthentication, context) - : undefined, - VpcConfigs: output.vpcConfigs != null ? de___listOfVpcConfig(output.vpcConfigs, context) : undefined, - } as any; + return take(output, { + ClientAuthentication: (_) => [, de_ServerlessClientAuthentication(_, context), `clientAuthentication`], + VpcConfigs: (_) => [, de___listOfVpcConfig(_, context), `vpcConfigs`], + }) as any; }; /** * deserializeAws_restJson1ServerlessClientAuthentication */ const de_ServerlessClientAuthentication = (output: any, context: __SerdeContext): ServerlessClientAuthentication => { - return { - Sasl: output.sasl != null ? de_ServerlessSasl(output.sasl, context) : undefined, - } as any; + return take(output, { + Sasl: (_) => [, de_ServerlessSasl(_, context), `sasl`], + }) as any; }; /** * deserializeAws_restJson1ServerlessSasl */ const de_ServerlessSasl = (output: any, context: __SerdeContext): ServerlessSasl => { - return { - Iam: output.iam != null ? de_Iam(output.iam, context) : undefined, - } as any; + return take(output, { + Iam: (_) => [, de_Iam(_, context), `iam`], + }) as any; }; /** * deserializeAws_restJson1StateInfo */ const de_StateInfo = (output: any, context: __SerdeContext): StateInfo => { - return { - Code: __expectString(output.code), - Message: __expectString(output.message), - } as any; + return take(output, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + }) as any; }; /** * deserializeAws_restJson1StorageInfo */ const de_StorageInfo = (output: any, context: __SerdeContext): StorageInfo => { - return { - EbsStorageInfo: output.ebsStorageInfo != null ? de_EBSStorageInfo(output.ebsStorageInfo, context) : undefined, - } as any; + return take(output, { + EbsStorageInfo: (_) => [, de_EBSStorageInfo(_, context), `ebsStorageInfo`], + }) as any; }; /** * deserializeAws_restJson1Tls */ const de_Tls = (output: any, context: __SerdeContext): Tls => { - return { - CertificateAuthorityArnList: - output.certificateAuthorityArnList != null - ? de___listOf__string(output.certificateAuthorityArnList, context) - : undefined, - Enabled: __expectBoolean(output.enabled), - } as any; + return take(output, { + CertificateAuthorityArnList: [, _json, `certificateAuthorityArnList`], + Enabled: [, __expectBoolean, `enabled`], + }) as any; }; /** * deserializeAws_restJson1Unauthenticated */ const de_Unauthenticated = (output: any, context: __SerdeContext): Unauthenticated => { - return { - Enabled: __expectBoolean(output.enabled), - } as any; + return take(output, { + Enabled: [, __expectBoolean, `enabled`], + }) as any; }; /** * deserializeAws_restJson1UnprocessedScramSecret */ const de_UnprocessedScramSecret = (output: any, context: __SerdeContext): UnprocessedScramSecret => { - return { - ErrorCode: __expectString(output.errorCode), - ErrorMessage: __expectString(output.errorMessage), - SecretArn: __expectString(output.secretArn), - } as any; + return take(output, { + ErrorCode: [, __expectString, `errorCode`], + ErrorMessage: [, __expectString, `errorMessage`], + SecretArn: [, __expectString, `secretArn`], + }) as any; }; /** * deserializeAws_restJson1VpcConfig */ const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { - return { - SecurityGroupIds: - output.securityGroupIds != null ? de___listOf__string(output.securityGroupIds, context) : undefined, - SubnetIds: output.subnetIds != null ? de___listOf__string(output.subnetIds, context) : undefined, - } as any; + return take(output, { + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetIds: [, _json, `subnetIds`], + }) as any; }; /** * deserializeAws_restJson1ZookeeperNodeInfo */ const de_ZookeeperNodeInfo = (output: any, context: __SerdeContext): ZookeeperNodeInfo => { - return { - AttachedENIId: __expectString(output.attachedENIId), - ClientVpcIpAddress: __expectString(output.clientVpcIpAddress), - Endpoints: output.endpoints != null ? de___listOf__string(output.endpoints, context) : undefined, - ZookeeperId: __limitedParseDouble(output.zookeeperId), - ZookeeperVersion: __expectString(output.zookeeperVersion), - } as any; + return take(output, { + AttachedENIId: [, __expectString, `attachedENIId`], + ClientVpcIpAddress: [, __expectString, `clientVpcIpAddress`], + Endpoints: [, _json, `endpoints`], + ZookeeperId: [, __limitedParseDouble, `zookeeperId`], + ZookeeperVersion: [, __expectString, `zookeeperVersion`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-kafkaconnect/src/protocols/Aws_restJson1.ts b/clients/client-kafkaconnect/src/protocols/Aws_restJson1.ts index c17533d1fa37..3e431c158605 100644 --- a/clients/client-kafkaconnect/src/protocols/Aws_restJson1.ts +++ b/clients/client-kafkaconnect/src/protocols/Aws_restJson1.ts @@ -1,18 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -47,66 +47,44 @@ import { UpdateConnectorCommandInput, UpdateConnectorCommandOutput } from "../co import { KafkaConnectServiceException as __BaseException } from "../models/KafkaConnectServiceException"; import { ApacheKafkaCluster, - ApacheKafkaClusterDescription, AutoScaling, - AutoScalingDescription, AutoScalingUpdate, BadRequestException, Capacity, - CapacityDescription, CapacityUpdate, CloudWatchLogsLogDelivery, - CloudWatchLogsLogDeliveryDescription, ConflictException, ConnectorSummary, CustomPlugin, - CustomPluginDescription, - CustomPluginFileDescription, CustomPluginLocation, - CustomPluginLocationDescription, CustomPluginRevisionSummary, CustomPluginSummary, FirehoseLogDelivery, - FirehoseLogDeliveryDescription, ForbiddenException, InternalServerErrorException, KafkaCluster, KafkaClusterClientAuthentication, - KafkaClusterClientAuthenticationDescription, - KafkaClusterDescription, KafkaClusterEncryptionInTransit, - KafkaClusterEncryptionInTransitDescription, LogDelivery, - LogDeliveryDescription, NotFoundException, Plugin, - PluginDescription, ProvisionedCapacity, - ProvisionedCapacityDescription, ProvisionedCapacityUpdate, S3Location, - S3LocationDescription, S3LogDelivery, - S3LogDeliveryDescription, ScaleInPolicy, - ScaleInPolicyDescription, ScaleInPolicyUpdate, ScaleOutPolicy, - ScaleOutPolicyDescription, ScaleOutPolicyUpdate, ServiceUnavailableException, - StateDescription, TooManyRequestsException, UnauthorizedException, Vpc, - VpcDescription, WorkerConfiguration, - WorkerConfigurationDescription, WorkerConfigurationRevisionDescription, WorkerConfigurationRevisionSummary, WorkerConfigurationSummary, WorkerLogDelivery, - WorkerLogDeliveryDescription, } from "../models/models_0"; /** @@ -122,34 +100,22 @@ export const se_CreateConnectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/connectors"; let body: any; - body = JSON.stringify({ - ...(input.capacity != null && { capacity: se_Capacity(input.capacity, context) }), - ...(input.connectorConfiguration != null && { - connectorConfiguration: se___sensitive__mapOf__string(input.connectorConfiguration, context), - }), - ...(input.connectorDescription != null && { connectorDescription: input.connectorDescription }), - ...(input.connectorName != null && { connectorName: input.connectorName }), - ...(input.kafkaCluster != null && { kafkaCluster: se_KafkaCluster(input.kafkaCluster, context) }), - ...(input.kafkaClusterClientAuthentication != null && { - kafkaClusterClientAuthentication: se_KafkaClusterClientAuthentication( - input.kafkaClusterClientAuthentication, - context - ), - }), - ...(input.kafkaClusterEncryptionInTransit != null && { - kafkaClusterEncryptionInTransit: se_KafkaClusterEncryptionInTransit( - input.kafkaClusterEncryptionInTransit, - context - ), - }), - ...(input.kafkaConnectVersion != null && { kafkaConnectVersion: input.kafkaConnectVersion }), - ...(input.logDelivery != null && { logDelivery: se_LogDelivery(input.logDelivery, context) }), - ...(input.plugins != null && { plugins: se___listOfPlugin(input.plugins, context) }), - ...(input.serviceExecutionRoleArn != null && { serviceExecutionRoleArn: input.serviceExecutionRoleArn }), - ...(input.workerConfiguration != null && { - workerConfiguration: se_WorkerConfiguration(input.workerConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + capacity: (_) => _json(_), + connectorConfiguration: (_) => _json(_), + connectorDescription: [], + connectorName: [], + kafkaCluster: (_) => _json(_), + kafkaClusterClientAuthentication: (_) => _json(_), + kafkaClusterEncryptionInTransit: (_) => _json(_), + kafkaConnectVersion: [], + logDelivery: (_) => _json(_), + plugins: (_) => _json(_), + serviceExecutionRoleArn: [], + workerConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -174,12 +140,14 @@ export const se_CreateCustomPluginCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/custom-plugins"; let body: any; - body = JSON.stringify({ - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.description != null && { description: input.description }), - ...(input.location != null && { location: se_CustomPluginLocation(input.location, context) }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + contentType: [], + description: [], + location: (_) => _json(_), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -205,11 +173,13 @@ export const se_CreateWorkerConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/worker-configurations"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.propertiesFileContent != null && { propertiesFileContent: input.propertiesFileContent }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + propertiesFileContent: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -489,9 +459,11 @@ export const se_UpdateConnectorCommand = async ( currentVersion: [, __expectNonNull(input.currentVersion!, `currentVersion`)], }); let body: any; - body = JSON.stringify({ - ...(input.capacity != null && { capacity: se_CapacityUpdate(input.capacity, context) }), - }); + body = JSON.stringify( + take(input, { + capacity: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -518,15 +490,12 @@ export const de_CreateConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorArn != null) { - contents.connectorArn = __expectString(data.connectorArn); - } - if (data.connectorName != null) { - contents.connectorName = __expectString(data.connectorName); - } - if (data.connectorState != null) { - contents.connectorState = __expectString(data.connectorState); - } + const doc = take(data, { + connectorArn: __expectString, + connectorName: __expectString, + connectorState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -569,10 +538,9 @@ const de_CreateConnectorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -592,18 +560,13 @@ export const de_CreateCustomPluginCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customPluginArn != null) { - contents.customPluginArn = __expectString(data.customPluginArn); - } - if (data.customPluginState != null) { - contents.customPluginState = __expectString(data.customPluginState); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.revision != null) { - contents.revision = __expectLong(data.revision); - } + const doc = take(data, { + customPluginArn: __expectString, + customPluginState: __expectString, + name: __expectString, + revision: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -646,10 +609,9 @@ const de_CreateCustomPluginCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -669,18 +631,13 @@ export const de_CreateWorkerConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.latestRevision != null) { - contents.latestRevision = de_WorkerConfigurationRevisionSummary(data.latestRevision, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.workerConfigurationArn != null) { - contents.workerConfigurationArn = __expectString(data.workerConfigurationArn); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + latestRevision: (_) => de_WorkerConfigurationRevisionSummary(_, context), + name: __expectString, + workerConfigurationArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -723,10 +680,9 @@ const de_CreateWorkerConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -746,12 +702,11 @@ export const de_DeleteConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorArn != null) { - contents.connectorArn = __expectString(data.connectorArn); - } - if (data.connectorState != null) { - contents.connectorState = __expectString(data.connectorState); - } + const doc = take(data, { + connectorArn: __expectString, + connectorState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -791,10 +746,9 @@ const de_DeleteConnectorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -814,12 +768,11 @@ export const de_DeleteCustomPluginCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customPluginArn != null) { - contents.customPluginArn = __expectString(data.customPluginArn); - } - if (data.customPluginState != null) { - contents.customPluginState = __expectString(data.customPluginState); - } + const doc = take(data, { + customPluginArn: __expectString, + customPluginState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -859,10 +812,9 @@ const de_DeleteCustomPluginCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -882,63 +834,26 @@ export const de_DescribeConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.capacity != null) { - contents.capacity = de_CapacityDescription(data.capacity, context); - } - if (data.connectorArn != null) { - contents.connectorArn = __expectString(data.connectorArn); - } - if (data.connectorConfiguration != null) { - contents.connectorConfiguration = de___sensitive__mapOf__string(data.connectorConfiguration, context); - } - if (data.connectorDescription != null) { - contents.connectorDescription = __expectString(data.connectorDescription); - } - if (data.connectorName != null) { - contents.connectorName = __expectString(data.connectorName); - } - if (data.connectorState != null) { - contents.connectorState = __expectString(data.connectorState); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.currentVersion != null) { - contents.currentVersion = __expectString(data.currentVersion); - } - if (data.kafkaCluster != null) { - contents.kafkaCluster = de_KafkaClusterDescription(data.kafkaCluster, context); - } - if (data.kafkaClusterClientAuthentication != null) { - contents.kafkaClusterClientAuthentication = de_KafkaClusterClientAuthenticationDescription( - data.kafkaClusterClientAuthentication, - context - ); - } - if (data.kafkaClusterEncryptionInTransit != null) { - contents.kafkaClusterEncryptionInTransit = de_KafkaClusterEncryptionInTransitDescription( - data.kafkaClusterEncryptionInTransit, - context - ); - } - if (data.kafkaConnectVersion != null) { - contents.kafkaConnectVersion = __expectString(data.kafkaConnectVersion); - } - if (data.logDelivery != null) { - contents.logDelivery = de_LogDeliveryDescription(data.logDelivery, context); - } - if (data.plugins != null) { - contents.plugins = de___listOfPluginDescription(data.plugins, context); - } - if (data.serviceExecutionRoleArn != null) { - contents.serviceExecutionRoleArn = __expectString(data.serviceExecutionRoleArn); - } - if (data.stateDescription != null) { - contents.stateDescription = de_StateDescription(data.stateDescription, context); - } - if (data.workerConfiguration != null) { - contents.workerConfiguration = de_WorkerConfigurationDescription(data.workerConfiguration, context); - } + const doc = take(data, { + capacity: _json, + connectorArn: __expectString, + connectorConfiguration: _json, + connectorDescription: __expectString, + connectorName: __expectString, + connectorState: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + currentVersion: __expectString, + kafkaCluster: _json, + kafkaClusterClientAuthentication: _json, + kafkaClusterEncryptionInTransit: _json, + kafkaConnectVersion: __expectString, + logDelivery: _json, + plugins: _json, + serviceExecutionRoleArn: __expectString, + stateDescription: _json, + workerConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -978,10 +893,9 @@ const de_DescribeConnectorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1001,27 +915,16 @@ export const de_DescribeCustomPluginCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.customPluginArn != null) { - contents.customPluginArn = __expectString(data.customPluginArn); - } - if (data.customPluginState != null) { - contents.customPluginState = __expectString(data.customPluginState); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.latestRevision != null) { - contents.latestRevision = de_CustomPluginRevisionSummary(data.latestRevision, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stateDescription != null) { - contents.stateDescription = de_StateDescription(data.stateDescription, context); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + customPluginArn: __expectString, + customPluginState: __expectString, + description: __expectString, + latestRevision: (_) => de_CustomPluginRevisionSummary(_, context), + name: __expectString, + stateDescription: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1061,10 +964,9 @@ const de_DescribeCustomPluginCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1084,21 +986,14 @@ export const de_DescribeWorkerConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.latestRevision != null) { - contents.latestRevision = de_WorkerConfigurationRevisionDescription(data.latestRevision, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.workerConfigurationArn != null) { - contents.workerConfigurationArn = __expectString(data.workerConfigurationArn); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + latestRevision: (_) => de_WorkerConfigurationRevisionDescription(_, context), + name: __expectString, + workerConfigurationArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1138,10 +1033,9 @@ const de_DescribeWorkerConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1161,12 +1055,11 @@ export const de_ListConnectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectors != null) { - contents.connectors = de___listOfConnectorSummary(data.connectors, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + connectors: (_) => de___listOfConnectorSummary(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1206,10 +1099,9 @@ const de_ListConnectorsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,12 +1121,11 @@ export const de_ListCustomPluginsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customPlugins != null) { - contents.customPlugins = de___listOfCustomPluginSummary(data.customPlugins, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + customPlugins: (_) => de___listOfCustomPluginSummary(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1274,10 +1165,9 @@ const de_ListCustomPluginsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1297,12 +1187,11 @@ export const de_ListWorkerConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workerConfigurations != null) { - contents.workerConfigurations = de___listOfWorkerConfigurationSummary(data.workerConfigurations, context); - } + const doc = take(data, { + nextToken: __expectString, + workerConfigurations: (_) => de___listOfWorkerConfigurationSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1342,10 +1231,9 @@ const de_ListWorkerConfigurationsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1365,12 +1253,11 @@ export const de_UpdateConnectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.connectorArn != null) { - contents.connectorArn = __expectString(data.connectorArn); - } - if (data.connectorState != null) { - contents.connectorState = __expectString(data.connectorState); - } + const doc = take(data, { + connectorArn: __expectString, + connectorState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1410,25 +1297,25 @@ const de_UpdateConnectorCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1442,9 +1329,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1458,9 +1346,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1477,9 +1366,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1493,9 +1383,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1512,9 +1403,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1531,9 +1423,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1550,9 +1443,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1560,314 +1454,63 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. -/** - * serializeAws_restJson1__listOfPlugin - */ -const se___listOfPlugin = (input: Plugin[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Plugin(entry, context); - }); -}; +// se___listOfPlugin omitted. -/** - * serializeAws_restJson1__sensitive__mapOf__string - */ -const se___sensitive__mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___sensitive__mapOf__string omitted. -/** - * serializeAws_restJson1ApacheKafkaCluster - */ -const se_ApacheKafkaCluster = (input: ApacheKafkaCluster, context: __SerdeContext): any => { - return { - ...(input.bootstrapServers != null && { bootstrapServers: input.bootstrapServers }), - ...(input.vpc != null && { vpc: se_Vpc(input.vpc, context) }), - }; -}; +// se_ApacheKafkaCluster omitted. -/** - * serializeAws_restJson1AutoScaling - */ -const se_AutoScaling = (input: AutoScaling, context: __SerdeContext): any => { - return { - ...(input.maxWorkerCount != null && { maxWorkerCount: input.maxWorkerCount }), - ...(input.mcuCount != null && { mcuCount: input.mcuCount }), - ...(input.minWorkerCount != null && { minWorkerCount: input.minWorkerCount }), - ...(input.scaleInPolicy != null && { scaleInPolicy: se_ScaleInPolicy(input.scaleInPolicy, context) }), - ...(input.scaleOutPolicy != null && { scaleOutPolicy: se_ScaleOutPolicy(input.scaleOutPolicy, context) }), - }; -}; +// se_AutoScaling omitted. -/** - * serializeAws_restJson1AutoScalingUpdate - */ -const se_AutoScalingUpdate = (input: AutoScalingUpdate, context: __SerdeContext): any => { - return { - ...(input.maxWorkerCount != null && { maxWorkerCount: input.maxWorkerCount }), - ...(input.mcuCount != null && { mcuCount: input.mcuCount }), - ...(input.minWorkerCount != null && { minWorkerCount: input.minWorkerCount }), - ...(input.scaleInPolicy != null && { scaleInPolicy: se_ScaleInPolicyUpdate(input.scaleInPolicy, context) }), - ...(input.scaleOutPolicy != null && { scaleOutPolicy: se_ScaleOutPolicyUpdate(input.scaleOutPolicy, context) }), - }; -}; +// se_AutoScalingUpdate omitted. -/** - * serializeAws_restJson1Capacity - */ -const se_Capacity = (input: Capacity, context: __SerdeContext): any => { - return { - ...(input.autoScaling != null && { autoScaling: se_AutoScaling(input.autoScaling, context) }), - ...(input.provisionedCapacity != null && { - provisionedCapacity: se_ProvisionedCapacity(input.provisionedCapacity, context), - }), - }; -}; +// se_Capacity omitted. -/** - * serializeAws_restJson1CapacityUpdate - */ -const se_CapacityUpdate = (input: CapacityUpdate, context: __SerdeContext): any => { - return { - ...(input.autoScaling != null && { autoScaling: se_AutoScalingUpdate(input.autoScaling, context) }), - ...(input.provisionedCapacity != null && { - provisionedCapacity: se_ProvisionedCapacityUpdate(input.provisionedCapacity, context), - }), - }; -}; +// se_CapacityUpdate omitted. -/** - * serializeAws_restJson1CloudWatchLogsLogDelivery - */ -const se_CloudWatchLogsLogDelivery = (input: CloudWatchLogsLogDelivery, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.logGroup != null && { logGroup: input.logGroup }), - }; -}; +// se_CloudWatchLogsLogDelivery omitted. -/** - * serializeAws_restJson1CustomPlugin - */ -const se_CustomPlugin = (input: CustomPlugin, context: __SerdeContext): any => { - return { - ...(input.customPluginArn != null && { customPluginArn: input.customPluginArn }), - ...(input.revision != null && { revision: input.revision }), - }; -}; +// se_CustomPlugin omitted. -/** - * serializeAws_restJson1CustomPluginLocation - */ -const se_CustomPluginLocation = (input: CustomPluginLocation, context: __SerdeContext): any => { - return { - ...(input.s3Location != null && { s3Location: se_S3Location(input.s3Location, context) }), - }; -}; +// se_CustomPluginLocation omitted. -/** - * serializeAws_restJson1FirehoseLogDelivery - */ -const se_FirehoseLogDelivery = (input: FirehoseLogDelivery, context: __SerdeContext): any => { - return { - ...(input.deliveryStream != null && { deliveryStream: input.deliveryStream }), - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; +// se_FirehoseLogDelivery omitted. -/** - * serializeAws_restJson1KafkaCluster - */ -const se_KafkaCluster = (input: KafkaCluster, context: __SerdeContext): any => { - return { - ...(input.apacheKafkaCluster != null && { - apacheKafkaCluster: se_ApacheKafkaCluster(input.apacheKafkaCluster, context), - }), - }; -}; +// se_KafkaCluster omitted. -/** - * serializeAws_restJson1KafkaClusterClientAuthentication - */ -const se_KafkaClusterClientAuthentication = (input: KafkaClusterClientAuthentication, context: __SerdeContext): any => { - return { - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - }; -}; +// se_KafkaClusterClientAuthentication omitted. -/** - * serializeAws_restJson1KafkaClusterEncryptionInTransit - */ -const se_KafkaClusterEncryptionInTransit = (input: KafkaClusterEncryptionInTransit, context: __SerdeContext): any => { - return { - ...(input.encryptionType != null && { encryptionType: input.encryptionType }), - }; -}; +// se_KafkaClusterEncryptionInTransit omitted. -/** - * serializeAws_restJson1LogDelivery - */ -const se_LogDelivery = (input: LogDelivery, context: __SerdeContext): any => { - return { - ...(input.workerLogDelivery != null && { - workerLogDelivery: se_WorkerLogDelivery(input.workerLogDelivery, context), - }), - }; -}; +// se_LogDelivery omitted. -/** - * serializeAws_restJson1Plugin - */ -const se_Plugin = (input: Plugin, context: __SerdeContext): any => { - return { - ...(input.customPlugin != null && { customPlugin: se_CustomPlugin(input.customPlugin, context) }), - }; -}; +// se_Plugin omitted. -/** - * serializeAws_restJson1ProvisionedCapacity - */ -const se_ProvisionedCapacity = (input: ProvisionedCapacity, context: __SerdeContext): any => { - return { - ...(input.mcuCount != null && { mcuCount: input.mcuCount }), - ...(input.workerCount != null && { workerCount: input.workerCount }), - }; -}; +// se_ProvisionedCapacity omitted. -/** - * serializeAws_restJson1ProvisionedCapacityUpdate - */ -const se_ProvisionedCapacityUpdate = (input: ProvisionedCapacityUpdate, context: __SerdeContext): any => { - return { - ...(input.mcuCount != null && { mcuCount: input.mcuCount }), - ...(input.workerCount != null && { workerCount: input.workerCount }), - }; -}; +// se_ProvisionedCapacityUpdate omitted. -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.bucketArn != null && { bucketArn: input.bucketArn }), - ...(input.fileKey != null && { fileKey: input.fileKey }), - ...(input.objectVersion != null && { objectVersion: input.objectVersion }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1S3LogDelivery - */ -const se_S3LogDelivery = (input: S3LogDelivery, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3LogDelivery omitted. -/** - * serializeAws_restJson1ScaleInPolicy - */ -const se_ScaleInPolicy = (input: ScaleInPolicy, context: __SerdeContext): any => { - return { - ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }), - }; -}; +// se_ScaleInPolicy omitted. -/** - * serializeAws_restJson1ScaleInPolicyUpdate - */ -const se_ScaleInPolicyUpdate = (input: ScaleInPolicyUpdate, context: __SerdeContext): any => { - return { - ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }), - }; -}; +// se_ScaleInPolicyUpdate omitted. -/** - * serializeAws_restJson1ScaleOutPolicy - */ -const se_ScaleOutPolicy = (input: ScaleOutPolicy, context: __SerdeContext): any => { - return { - ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }), - }; -}; +// se_ScaleOutPolicy omitted. -/** - * serializeAws_restJson1ScaleOutPolicyUpdate - */ -const se_ScaleOutPolicyUpdate = (input: ScaleOutPolicyUpdate, context: __SerdeContext): any => { - return { - ...(input.cpuUtilizationPercentage != null && { cpuUtilizationPercentage: input.cpuUtilizationPercentage }), - }; -}; +// se_ScaleOutPolicyUpdate omitted. -/** - * serializeAws_restJson1Vpc - */ -const se_Vpc = (input: Vpc, context: __SerdeContext): any => { - return { - ...(input.securityGroups != null && { securityGroups: se___listOf__string(input.securityGroups, context) }), - ...(input.subnets != null && { subnets: se___listOf__string(input.subnets, context) }), - }; -}; +// se_Vpc omitted. -/** - * serializeAws_restJson1WorkerConfiguration - */ -const se_WorkerConfiguration = (input: WorkerConfiguration, context: __SerdeContext): any => { - return { - ...(input.revision != null && { revision: input.revision }), - ...(input.workerConfigurationArn != null && { workerConfigurationArn: input.workerConfigurationArn }), - }; -}; +// se_WorkerConfiguration omitted. -/** - * serializeAws_restJson1WorkerLogDelivery - */ -const se_WorkerLogDelivery = (input: WorkerLogDelivery, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogs != null && { - cloudWatchLogs: se_CloudWatchLogsLogDelivery(input.cloudWatchLogs, context), - }), - ...(input.firehose != null && { firehose: se_FirehoseLogDelivery(input.firehose, context) }), - ...(input.s3 != null && { s3: se_S3LogDelivery(input.s3, context) }), - }; -}; +// se_WorkerLogDelivery omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfConnectorSummary @@ -1876,9 +1519,6 @@ const de___listOfConnectorSummary = (output: any, context: __SerdeContext): Conn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConnectorSummary(entry, context); }); return retVal; @@ -1891,28 +1531,12 @@ const de___listOfCustomPluginSummary = (output: any, context: __SerdeContext): C const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CustomPluginSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfPluginDescription - */ -const de___listOfPluginDescription = (output: any, context: __SerdeContext): PluginDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PluginDescription(entry, context); - }); - return retVal; -}; +// de___listOfPluginDescription omitted. /** * deserializeAws_restJson1__listOfWorkerConfigurationSummary @@ -1921,316 +1545,105 @@ const de___listOfWorkerConfigurationSummary = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkerConfigurationSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__sensitive__mapOf__string - */ -const de___sensitive__mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___sensitive__mapOf__string omitted. -/** - * deserializeAws_restJson1ApacheKafkaClusterDescription - */ -const de_ApacheKafkaClusterDescription = (output: any, context: __SerdeContext): ApacheKafkaClusterDescription => { - return { - bootstrapServers: __expectString(output.bootstrapServers), - vpc: output.vpc != null ? de_VpcDescription(output.vpc, context) : undefined, - } as any; -}; +// de_ApacheKafkaClusterDescription omitted. -/** - * deserializeAws_restJson1AutoScalingDescription - */ -const de_AutoScalingDescription = (output: any, context: __SerdeContext): AutoScalingDescription => { - return { - maxWorkerCount: __expectInt32(output.maxWorkerCount), - mcuCount: __expectInt32(output.mcuCount), - minWorkerCount: __expectInt32(output.minWorkerCount), - scaleInPolicy: - output.scaleInPolicy != null ? de_ScaleInPolicyDescription(output.scaleInPolicy, context) : undefined, - scaleOutPolicy: - output.scaleOutPolicy != null ? de_ScaleOutPolicyDescription(output.scaleOutPolicy, context) : undefined, - } as any; -}; +// de_AutoScalingDescription omitted. -/** - * deserializeAws_restJson1CapacityDescription - */ -const de_CapacityDescription = (output: any, context: __SerdeContext): CapacityDescription => { - return { - autoScaling: output.autoScaling != null ? de_AutoScalingDescription(output.autoScaling, context) : undefined, - provisionedCapacity: - output.provisionedCapacity != null - ? de_ProvisionedCapacityDescription(output.provisionedCapacity, context) - : undefined, - } as any; -}; +// de_CapacityDescription omitted. -/** - * deserializeAws_restJson1CloudWatchLogsLogDeliveryDescription - */ -const de_CloudWatchLogsLogDeliveryDescription = ( - output: any, - context: __SerdeContext -): CloudWatchLogsLogDeliveryDescription => { - return { - enabled: __expectBoolean(output.enabled), - logGroup: __expectString(output.logGroup), - } as any; -}; +// de_CloudWatchLogsLogDeliveryDescription omitted. /** * deserializeAws_restJson1ConnectorSummary */ const de_ConnectorSummary = (output: any, context: __SerdeContext): ConnectorSummary => { - return { - capacity: output.capacity != null ? de_CapacityDescription(output.capacity, context) : undefined, - connectorArn: __expectString(output.connectorArn), - connectorDescription: __expectString(output.connectorDescription), - connectorName: __expectString(output.connectorName), - connectorState: __expectString(output.connectorState), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - currentVersion: __expectString(output.currentVersion), - kafkaCluster: output.kafkaCluster != null ? de_KafkaClusterDescription(output.kafkaCluster, context) : undefined, - kafkaClusterClientAuthentication: - output.kafkaClusterClientAuthentication != null - ? de_KafkaClusterClientAuthenticationDescription(output.kafkaClusterClientAuthentication, context) - : undefined, - kafkaClusterEncryptionInTransit: - output.kafkaClusterEncryptionInTransit != null - ? de_KafkaClusterEncryptionInTransitDescription(output.kafkaClusterEncryptionInTransit, context) - : undefined, - kafkaConnectVersion: __expectString(output.kafkaConnectVersion), - logDelivery: output.logDelivery != null ? de_LogDeliveryDescription(output.logDelivery, context) : undefined, - plugins: output.plugins != null ? de___listOfPluginDescription(output.plugins, context) : undefined, - serviceExecutionRoleArn: __expectString(output.serviceExecutionRoleArn), - workerConfiguration: - output.workerConfiguration != null - ? de_WorkerConfigurationDescription(output.workerConfiguration, context) - : undefined, - } as any; + return take(output, { + capacity: _json, + connectorArn: __expectString, + connectorDescription: __expectString, + connectorName: __expectString, + connectorState: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + currentVersion: __expectString, + kafkaCluster: _json, + kafkaClusterClientAuthentication: _json, + kafkaClusterEncryptionInTransit: _json, + kafkaConnectVersion: __expectString, + logDelivery: _json, + plugins: _json, + serviceExecutionRoleArn: __expectString, + workerConfiguration: _json, + }) as any; }; -/** - * deserializeAws_restJson1CustomPluginDescription - */ -const de_CustomPluginDescription = (output: any, context: __SerdeContext): CustomPluginDescription => { - return { - customPluginArn: __expectString(output.customPluginArn), - revision: __expectLong(output.revision), - } as any; -}; +// de_CustomPluginDescription omitted. -/** - * deserializeAws_restJson1CustomPluginFileDescription - */ -const de_CustomPluginFileDescription = (output: any, context: __SerdeContext): CustomPluginFileDescription => { - return { - fileMd5: __expectString(output.fileMd5), - fileSize: __expectLong(output.fileSize), - } as any; -}; +// de_CustomPluginFileDescription omitted. -/** - * deserializeAws_restJson1CustomPluginLocationDescription - */ -const de_CustomPluginLocationDescription = (output: any, context: __SerdeContext): CustomPluginLocationDescription => { - return { - s3Location: output.s3Location != null ? de_S3LocationDescription(output.s3Location, context) : undefined, - } as any; -}; +// de_CustomPluginLocationDescription omitted. /** * deserializeAws_restJson1CustomPluginRevisionSummary */ const de_CustomPluginRevisionSummary = (output: any, context: __SerdeContext): CustomPluginRevisionSummary => { - return { - contentType: __expectString(output.contentType), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - fileDescription: - output.fileDescription != null ? de_CustomPluginFileDescription(output.fileDescription, context) : undefined, - location: output.location != null ? de_CustomPluginLocationDescription(output.location, context) : undefined, - revision: __expectLong(output.revision), - } as any; + return take(output, { + contentType: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + fileDescription: _json, + location: _json, + revision: __expectLong, + }) as any; }; /** * deserializeAws_restJson1CustomPluginSummary */ const de_CustomPluginSummary = (output: any, context: __SerdeContext): CustomPluginSummary => { - return { - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - customPluginArn: __expectString(output.customPluginArn), - customPluginState: __expectString(output.customPluginState), - description: __expectString(output.description), - latestRevision: - output.latestRevision != null ? de_CustomPluginRevisionSummary(output.latestRevision, context) : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + customPluginArn: __expectString, + customPluginState: __expectString, + description: __expectString, + latestRevision: (_: any) => de_CustomPluginRevisionSummary(_, context), + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1FirehoseLogDeliveryDescription - */ -const de_FirehoseLogDeliveryDescription = (output: any, context: __SerdeContext): FirehoseLogDeliveryDescription => { - return { - deliveryStream: __expectString(output.deliveryStream), - enabled: __expectBoolean(output.enabled), - } as any; -}; +// de_FirehoseLogDeliveryDescription omitted. -/** - * deserializeAws_restJson1KafkaClusterClientAuthenticationDescription - */ -const de_KafkaClusterClientAuthenticationDescription = ( - output: any, - context: __SerdeContext -): KafkaClusterClientAuthenticationDescription => { - return { - authenticationType: __expectString(output.authenticationType), - } as any; -}; +// de_KafkaClusterClientAuthenticationDescription omitted. -/** - * deserializeAws_restJson1KafkaClusterDescription - */ -const de_KafkaClusterDescription = (output: any, context: __SerdeContext): KafkaClusterDescription => { - return { - apacheKafkaCluster: - output.apacheKafkaCluster != null - ? de_ApacheKafkaClusterDescription(output.apacheKafkaCluster, context) - : undefined, - } as any; -}; +// de_KafkaClusterDescription omitted. -/** - * deserializeAws_restJson1KafkaClusterEncryptionInTransitDescription - */ -const de_KafkaClusterEncryptionInTransitDescription = ( - output: any, - context: __SerdeContext -): KafkaClusterEncryptionInTransitDescription => { - return { - encryptionType: __expectString(output.encryptionType), - } as any; -}; +// de_KafkaClusterEncryptionInTransitDescription omitted. -/** - * deserializeAws_restJson1LogDeliveryDescription - */ -const de_LogDeliveryDescription = (output: any, context: __SerdeContext): LogDeliveryDescription => { - return { - workerLogDelivery: - output.workerLogDelivery != null ? de_WorkerLogDeliveryDescription(output.workerLogDelivery, context) : undefined, - } as any; -}; +// de_LogDeliveryDescription omitted. -/** - * deserializeAws_restJson1PluginDescription - */ -const de_PluginDescription = (output: any, context: __SerdeContext): PluginDescription => { - return { - customPlugin: output.customPlugin != null ? de_CustomPluginDescription(output.customPlugin, context) : undefined, - } as any; -}; +// de_PluginDescription omitted. -/** - * deserializeAws_restJson1ProvisionedCapacityDescription - */ -const de_ProvisionedCapacityDescription = (output: any, context: __SerdeContext): ProvisionedCapacityDescription => { - return { - mcuCount: __expectInt32(output.mcuCount), - workerCount: __expectInt32(output.workerCount), - } as any; -}; +// de_ProvisionedCapacityDescription omitted. -/** - * deserializeAws_restJson1S3LocationDescription - */ -const de_S3LocationDescription = (output: any, context: __SerdeContext): S3LocationDescription => { - return { - bucketArn: __expectString(output.bucketArn), - fileKey: __expectString(output.fileKey), - objectVersion: __expectString(output.objectVersion), - } as any; -}; +// de_S3LocationDescription omitted. -/** - * deserializeAws_restJson1S3LogDeliveryDescription - */ -const de_S3LogDeliveryDescription = (output: any, context: __SerdeContext): S3LogDeliveryDescription => { - return { - bucket: __expectString(output.bucket), - enabled: __expectBoolean(output.enabled), - prefix: __expectString(output.prefix), - } as any; -}; +// de_S3LogDeliveryDescription omitted. -/** - * deserializeAws_restJson1ScaleInPolicyDescription - */ -const de_ScaleInPolicyDescription = (output: any, context: __SerdeContext): ScaleInPolicyDescription => { - return { - cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage), - } as any; -}; +// de_ScaleInPolicyDescription omitted. -/** - * deserializeAws_restJson1ScaleOutPolicyDescription - */ -const de_ScaleOutPolicyDescription = (output: any, context: __SerdeContext): ScaleOutPolicyDescription => { - return { - cpuUtilizationPercentage: __expectInt32(output.cpuUtilizationPercentage), - } as any; -}; +// de_ScaleOutPolicyDescription omitted. -/** - * deserializeAws_restJson1StateDescription - */ -const de_StateDescription = (output: any, context: __SerdeContext): StateDescription => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_StateDescription omitted. -/** - * deserializeAws_restJson1VpcDescription - */ -const de_VpcDescription = (output: any, context: __SerdeContext): VpcDescription => { - return { - securityGroups: output.securityGroups != null ? de___listOf__string(output.securityGroups, context) : undefined, - subnets: output.subnets != null ? de___listOf__string(output.subnets, context) : undefined, - } as any; -}; +// de_VpcDescription omitted. -/** - * deserializeAws_restJson1WorkerConfigurationDescription - */ -const de_WorkerConfigurationDescription = (output: any, context: __SerdeContext): WorkerConfigurationDescription => { - return { - revision: __expectLong(output.revision), - workerConfigurationArn: __expectString(output.workerConfigurationArn), - } as any; -}; +// de_WorkerConfigurationDescription omitted. /** * deserializeAws_restJson1WorkerConfigurationRevisionDescription @@ -2239,13 +1652,12 @@ const de_WorkerConfigurationRevisionDescription = ( output: any, context: __SerdeContext ): WorkerConfigurationRevisionDescription => { - return { - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - propertiesFileContent: __expectString(output.propertiesFileContent), - revision: __expectLong(output.revision), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + propertiesFileContent: __expectString, + revision: __expectLong, + }) as any; }; /** @@ -2255,42 +1667,27 @@ const de_WorkerConfigurationRevisionSummary = ( output: any, context: __SerdeContext ): WorkerConfigurationRevisionSummary => { - return { - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - revision: __expectLong(output.revision), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + revision: __expectLong, + }) as any; }; /** * deserializeAws_restJson1WorkerConfigurationSummary */ const de_WorkerConfigurationSummary = (output: any, context: __SerdeContext): WorkerConfigurationSummary => { - return { - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - latestRevision: - output.latestRevision != null ? de_WorkerConfigurationRevisionSummary(output.latestRevision, context) : undefined, - name: __expectString(output.name), - workerConfigurationArn: __expectString(output.workerConfigurationArn), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + latestRevision: (_: any) => de_WorkerConfigurationRevisionSummary(_, context), + name: __expectString, + workerConfigurationArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1WorkerLogDeliveryDescription - */ -const de_WorkerLogDeliveryDescription = (output: any, context: __SerdeContext): WorkerLogDeliveryDescription => { - return { - cloudWatchLogs: - output.cloudWatchLogs != null - ? de_CloudWatchLogsLogDeliveryDescription(output.cloudWatchLogs, context) - : undefined, - firehose: output.firehose != null ? de_FirehoseLogDeliveryDescription(output.firehose, context) : undefined, - s3: output.s3 != null ? de_S3LogDeliveryDescription(output.s3, context) : undefined, - } as any; -}; +// de_WorkerLogDeliveryDescription omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-kendra-ranking/src/protocols/Aws_json1_0.ts b/clients/client-kendra-ranking/src/protocols/Aws_json1_0.ts index 2f1f1d9ce079..8a531ce9cf34 100644 --- a/clients/client-kendra-ranking/src/protocols/Aws_json1_0.ts +++ b/clients/client-kendra-ranking/src/protocols/Aws_json1_0.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -52,7 +53,6 @@ import { CapacityUnitsConfiguration, ConflictException, CreateRescoreExecutionPlanRequest, - CreateRescoreExecutionPlanResponse, DeleteRescoreExecutionPlanRequest, DescribeRescoreExecutionPlanRequest, DescribeRescoreExecutionPlanResponse, @@ -61,7 +61,6 @@ import { ListRescoreExecutionPlansRequest, ListRescoreExecutionPlansResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, RescoreExecutionPlanSummary, RescoreRequest, RescoreResult, @@ -71,10 +70,8 @@ import { ServiceQuotaExceededException, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, UntagResourceRequest, - UntagResourceResponse, UpdateRescoreExecutionPlanRequest, ValidationException, } from "../models/models_0"; @@ -101,7 +98,7 @@ export const se_DeleteRescoreExecutionPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRescoreExecutionPlan"); let body: any; - body = JSON.stringify(se_DeleteRescoreExecutionPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -114,7 +111,7 @@ export const se_DescribeRescoreExecutionPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRescoreExecutionPlan"); let body: any; - body = JSON.stringify(se_DescribeRescoreExecutionPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -127,7 +124,7 @@ export const se_ListRescoreExecutionPlansCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRescoreExecutionPlans"); let body: any; - body = JSON.stringify(se_ListRescoreExecutionPlansRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -140,7 +137,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -166,7 +163,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -179,7 +176,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -192,7 +189,7 @@ export const se_UpdateRescoreExecutionPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRescoreExecutionPlan"); let body: any; - body = JSON.stringify(se_UpdateRescoreExecutionPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -208,12 +205,12 @@ export const de_CreateRescoreExecutionPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRescoreExecutionPlanResponse(data, context); + contents = _json(data); const response: CreateRescoreExecutionPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -249,10 +246,9 @@ const de_CreateRescoreExecutionPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -272,7 +268,7 @@ export const de_DeleteRescoreExecutionPlanCommand = async ( const response: DeleteRescoreExecutionPlanCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -308,10 +304,9 @@ const de_DeleteRescoreExecutionPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -334,7 +329,7 @@ export const de_DescribeRescoreExecutionPlanCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -367,10 +362,9 @@ const de_DescribeRescoreExecutionPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -393,7 +387,7 @@ export const de_ListRescoreExecutionPlansCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -423,10 +417,9 @@ const de_ListRescoreExecutionPlansCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -444,12 +437,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -482,10 +475,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -508,7 +500,7 @@ export const de_RescoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -544,10 +536,9 @@ const de_RescoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -565,12 +556,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -603,10 +594,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -624,12 +614,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -662,10 +652,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -685,7 +674,7 @@ export const de_UpdateRescoreExecutionPlanCommand = async ( const response: UpdateRescoreExecutionPlanCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -724,10 +713,9 @@ const de_UpdateRescoreExecutionPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -741,7 +729,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -754,7 +742,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -770,7 +758,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -786,7 +774,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -802,7 +790,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -818,7 +806,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -831,7 +819,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -844,7 +832,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -852,25 +840,9 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0BodyTokensList - */ -const se_BodyTokensList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BodyTokensList omitted. -/** - * serializeAws_json1_0CapacityUnitsConfiguration - */ -const se_CapacityUnitsConfiguration = (input: CapacityUnitsConfiguration, context: __SerdeContext): any => { - return { - ...(input.RescoreCapacityUnits != null && { RescoreCapacityUnits: input.RescoreCapacityUnits }), - }; -}; +// se_CapacityUnitsConfiguration omitted. /** * serializeAws_json1_0CreateRescoreExecutionPlanRequest @@ -879,52 +851,32 @@ const se_CreateRescoreExecutionPlanRequest = ( input: CreateRescoreExecutionPlanRequest, context: __SerdeContext ): any => { - return { - ...(input.CapacityUnits != null && { CapacityUnits: se_CapacityUnitsConfiguration(input.CapacityUnits, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CapacityUnits: _json, + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_0DeleteRescoreExecutionPlanRequest - */ -const se_DeleteRescoreExecutionPlanRequest = ( - input: DeleteRescoreExecutionPlanRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteRescoreExecutionPlanRequest omitted. -/** - * serializeAws_json1_0DescribeRescoreExecutionPlanRequest - */ -const se_DescribeRescoreExecutionPlanRequest = ( - input: DescribeRescoreExecutionPlanRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DescribeRescoreExecutionPlanRequest omitted. /** * serializeAws_json1_0Document */ const se_Document = (input: Document, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.Id != null && { Id: input.Id }), - ...(input.OriginalScore != null && { OriginalScore: __serializeFloat(input.OriginalScore) }), - ...(input.Title != null && { Title: input.Title }), - ...(input.TokenizedBody != null && { TokenizedBody: se_BodyTokensList(input.TokenizedBody, context) }), - ...(input.TokenizedTitle != null && { TokenizedTitle: se_TitleTokensList(input.TokenizedTitle, context) }), - }; + return take(input, { + Body: [], + GroupId: [], + Id: [], + OriginalScore: __serializeFloat, + Title: [], + TokenizedBody: _json, + TokenizedTitle: _json, + }); }; /** @@ -938,153 +890,42 @@ const se_DocumentList = (input: Document[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_json1_0ListRescoreExecutionPlansRequest - */ -const se_ListRescoreExecutionPlansRequest = (input: ListRescoreExecutionPlansRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListRescoreExecutionPlansRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. /** * serializeAws_json1_0RescoreRequest */ const se_RescoreRequest = (input: RescoreRequest, context: __SerdeContext): any => { - return { - ...(input.Documents != null && { Documents: se_DocumentList(input.Documents, context) }), - ...(input.RescoreExecutionPlanId != null && { RescoreExecutionPlanId: input.RescoreExecutionPlanId }), - ...(input.SearchQuery != null && { SearchQuery: input.SearchQuery }), - }; + return take(input, { + Documents: (_) => se_DocumentList(_, context), + RescoreExecutionPlanId: [], + SearchQuery: [], + }); }; -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0TitleTokensList - */ -const se_TitleTokensList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TitleTokensList omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateRescoreExecutionPlanRequest - */ -const se_UpdateRescoreExecutionPlanRequest = ( - input: UpdateRescoreExecutionPlanRequest, - context: __SerdeContext -): any => { - return { - ...(input.CapacityUnits != null && { CapacityUnits: se_CapacityUnitsConfiguration(input.CapacityUnits, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_UpdateRescoreExecutionPlanRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0CapacityUnitsConfiguration - */ -const de_CapacityUnitsConfiguration = (output: any, context: __SerdeContext): CapacityUnitsConfiguration => { - return { - RescoreCapacityUnits: __expectInt32(output.RescoreCapacityUnits), - } as any; -}; +// de_CapacityUnitsConfiguration omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateRescoreExecutionPlanResponse - */ -const de_CreateRescoreExecutionPlanResponse = ( - output: any, - context: __SerdeContext -): CreateRescoreExecutionPlanResponse => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; -}; +// de_CreateRescoreExecutionPlanResponse omitted. /** * deserializeAws_json1_0DescribeRescoreExecutionPlanResponse @@ -1093,30 +934,20 @@ const de_DescribeRescoreExecutionPlanResponse = ( output: any, context: __SerdeContext ): DescribeRescoreExecutionPlanResponse => { - return { - Arn: __expectString(output.Arn), - CapacityUnits: - output.CapacityUnits != null ? de_CapacityUnitsConfiguration(output.CapacityUnits, context) : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CapacityUnits: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ErrorMessage: __expectString, + Id: __expectString, + Name: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. /** * deserializeAws_json1_0ListRescoreExecutionPlansResponse @@ -1125,35 +956,25 @@ const de_ListRescoreExecutionPlansResponse = ( output: any, context: __SerdeContext ): ListRescoreExecutionPlansResponse => { - return { - NextToken: __expectString(output.NextToken), - SummaryItems: - output.SummaryItems != null ? de_RescoreExecutionPlanSummaryList(output.SummaryItems, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SummaryItems: (_: any) => de_RescoreExecutionPlanSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_0RescoreExecutionPlanSummary */ const de_RescoreExecutionPlanSummary = (output: any, context: __SerdeContext): RescoreExecutionPlanSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Name: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1163,9 +984,6 @@ const de_RescoreExecutionPlanSummaryList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RescoreExecutionPlanSummary(entry, context); }); return retVal; @@ -1175,20 +993,20 @@ const de_RescoreExecutionPlanSummaryList = (output: any, context: __SerdeContext * deserializeAws_json1_0RescoreResult */ const de_RescoreResult = (output: any, context: __SerdeContext): RescoreResult => { - return { - RescoreId: __expectString(output.RescoreId), - ResultItems: output.ResultItems != null ? de_RescoreResultItemList(output.ResultItems, context) : undefined, - } as any; + return take(output, { + RescoreId: __expectString, + ResultItems: (_: any) => de_RescoreResultItemList(_, context), + }) as any; }; /** * deserializeAws_json1_0RescoreResultItem */ const de_RescoreResultItem = (output: any, context: __SerdeContext): RescoreResultItem => { - return { - DocumentId: __expectString(output.DocumentId), - Score: __limitedParseFloat32(output.Score), - } as any; + return take(output, { + DocumentId: __expectString, + Score: __limitedParseFloat32, + }) as any; }; /** @@ -1198,97 +1016,28 @@ const de_RescoreResultItemList = (output: any, context: __SerdeContext): Rescore const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RescoreResultItem(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceUnavailableException omitted. -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1310,6 +1059,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-kendra/src/protocols/Aws_json1_1.ts b/clients/client-kendra/src/protocols/Aws_json1_1.ts index a80e4b8ca18a..18f91d9e3fdd 100644 --- a/clients/client-kendra/src/protocols/Aws_json1_1.ts +++ b/clients/client-kendra/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -191,38 +193,24 @@ import { import { UpdateThesaurusCommandInput, UpdateThesaurusCommandOutput } from "../commands/UpdateThesaurusCommand"; import { KendraServiceException as __BaseException } from "../models/KendraServiceException"; import { - AccessControlConfigurationSummary, AccessControlListConfiguration, AccessDeniedException, AclConfiguration, - AdditionalResultAttribute, - AdditionalResultAttributeValue, AlfrescoConfiguration, AlfrescoEntity, AssociateEntitiesToExperienceRequest, - AssociateEntitiesToExperienceResponse, AssociatePersonasToEntitiesRequest, - AssociatePersonasToEntitiesResponse, AuthenticationConfiguration, BasicAuthenticationConfiguration, BatchDeleteDocumentRequest, - BatchDeleteDocumentResponse, - BatchDeleteDocumentResponseFailedDocument, - BatchDeleteFeaturedResultsSetError, BatchDeleteFeaturedResultsSetRequest, - BatchDeleteFeaturedResultsSetResponse, BatchGetDocumentStatusRequest, - BatchGetDocumentStatusResponse, - BatchGetDocumentStatusResponseError, BatchPutDocumentRequest, - BatchPutDocumentResponse, - BatchPutDocumentResponseFailedDocument, BoxConfiguration, CapacityUnitsConfiguration, ClearQuerySuggestionsRequest, ColumnConfiguration, ConflictException, - ConflictingItem, ConfluenceAttachmentConfiguration, ConfluenceAttachmentToIndexFieldMapping, ConfluenceBlogConfiguration, @@ -234,45 +222,32 @@ import { ConfluenceSpaceToIndexFieldMapping, ConnectionConfiguration, ContentSourceConfiguration, - Correction, CreateAccessControlConfigurationRequest, - CreateAccessControlConfigurationResponse, CreateDataSourceRequest, - CreateDataSourceResponse, CreateExperienceRequest, - CreateExperienceResponse, CreateFaqRequest, - CreateFaqResponse, CreateFeaturedResultsSetRequest, - CreateFeaturedResultsSetResponse, CreateIndexRequest, - CreateIndexResponse, CreateQuerySuggestionsBlockListRequest, - CreateQuerySuggestionsBlockListResponse, CreateThesaurusRequest, - CreateThesaurusResponse, CustomDocumentEnrichmentConfiguration, DatabaseConfiguration, DataSourceConfiguration, DataSourceGroup, DataSourceSummary, DataSourceSyncJob, - DataSourceSyncJobMetrics, DataSourceSyncJobMetricTarget, DataSourceToIndexFieldMapping, DataSourceVpcConfiguration, DeleteAccessControlConfigurationRequest, - DeleteAccessControlConfigurationResponse, DeleteDataSourceRequest, DeleteExperienceRequest, - DeleteExperienceResponse, DeleteFaqRequest, DeleteIndexRequest, DeletePrincipalMappingRequest, DeleteQuerySuggestionsBlockListRequest, DeleteThesaurusRequest, DescribeAccessControlConfigurationRequest, - DescribeAccessControlConfigurationResponse, DescribeDataSourceRequest, DescribeDataSourceResponse, DescribeExperienceRequest, @@ -280,7 +255,6 @@ import { DescribeFaqRequest, DescribeFaqResponse, DescribeFeaturedResultsSetRequest, - DescribeFeaturedResultsSetResponse, DescribeIndexRequest, DescribeIndexResponse, DescribePrincipalMappingRequest, @@ -292,9 +266,7 @@ import { DescribeThesaurusRequest, DescribeThesaurusResponse, DisassociateEntitiesFromExperienceRequest, - DisassociateEntitiesFromExperienceResponse, DisassociatePersonasFromEntitiesRequest, - DisassociatePersonasFromEntitiesResponse, Document, DocumentAttribute, DocumentAttributeCondition, @@ -305,25 +277,15 @@ import { DocumentRelevanceConfiguration, DocumentsMetadataConfiguration, EntityConfiguration, - EntityDisplayData, EntityPersonaConfiguration, ExperienceConfiguration, - ExperienceEndpoint, - ExperienceEntitiesSummary, ExperiencesSummary, - FailedEntity, - FaqStatistics, FaqSummary, FeaturedDocument, - FeaturedDocumentMissing, - FeaturedDocumentWithMetadata, FeaturedResultsConflictException, FeaturedResultsItem, - FeaturedResultsSet, - FeaturedResultsSetSummary, FsxConfiguration, GetQuerySuggestionsRequest, - GetQuerySuggestionsResponse, GetSnapshotsRequest, GetSnapshotsResponse, GitHubConfiguration, @@ -331,12 +293,9 @@ import { GoogleDriveConfiguration, GroupMembers, GroupOrderingIdSummary, - GroupSummary, HierarchicalPrincipal, - Highlight, HookConfiguration, IndexConfigurationSummary, - IndexStatistics, InlineCustomDocumentEnrichmentConfiguration, InternalServerException, InvalidRequestException, @@ -345,7 +304,6 @@ import { JsonTokenTypeConfiguration, JwtTokenTypeConfiguration, ListAccessControlConfigurationsRequest, - ListAccessControlConfigurationsResponse, ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourceSyncJobsRequest, @@ -353,21 +311,17 @@ import { ListEntityPersonasRequest, ListEntityPersonasResponse, ListExperienceEntitiesRequest, - ListExperienceEntitiesResponse, ListExperiencesRequest, ListExperiencesResponse, ListFaqsRequest, ListFaqsResponse, ListFeaturedResultsSetsRequest, - ListFeaturedResultsSetsResponse, ListGroupsOlderThanOrderingIdRequest, - ListGroupsOlderThanOrderingIdResponse, ListIndicesRequest, ListIndicesResponse, ListQuerySuggestionsBlockListsRequest, ListQuerySuggestionsBlockListsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListThesauriRequest, ListThesauriResponse, MemberGroup, @@ -398,7 +352,6 @@ import { SalesforceStandardKnowledgeArticleTypeConfiguration, SalesforceStandardObjectAttachmentConfiguration, SalesforceStandardObjectConfiguration, - ScoreAttributes, Search, SeedUrlConfiguration, ServerSideEncryptionConfiguration, @@ -411,21 +364,10 @@ import { SlackConfiguration, SlackEntity, SortingConfiguration, - SpellCorrectedQuery, SpellCorrectionConfiguration, SqlConfiguration, - Status, - Suggestion, - SuggestionHighlight, - SuggestionTextWithHighlights, - SuggestionValue, - TableCell, - TableExcerpt, - TableRow, Tag, TemplateConfiguration, - TextDocumentStatistics, - TextWithHighlights, ThesaurusSummary, ThrottlingException, TimeRange, @@ -435,7 +377,6 @@ import { UserIdentityConfiguration, UserTokenConfiguration, ValidationException, - Warning, WebCrawlerConfiguration, WorkDocsConfiguration, } from "../models/models_0"; @@ -450,19 +391,14 @@ import { RelevanceFeedback, ResourceInUseException, StartDataSourceSyncJobRequest, - StartDataSourceSyncJobResponse, StopDataSourceSyncJobRequest, SubmitFeedbackRequest, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateAccessControlConfigurationRequest, - UpdateAccessControlConfigurationResponse, UpdateDataSourceRequest, UpdateExperienceRequest, UpdateFeaturedResultsSetRequest, - UpdateFeaturedResultsSetResponse, UpdateIndexRequest, UpdateQuerySuggestionsBlockListRequest, UpdateQuerySuggestionsConfigRequest, @@ -478,7 +414,7 @@ export const se_AssociateEntitiesToExperienceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateEntitiesToExperience"); let body: any; - body = JSON.stringify(se_AssociateEntitiesToExperienceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -491,7 +427,7 @@ export const se_AssociatePersonasToEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociatePersonasToEntities"); let body: any; - body = JSON.stringify(se_AssociatePersonasToEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -504,7 +440,7 @@ export const se_BatchDeleteDocumentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteDocument"); let body: any; - body = JSON.stringify(se_BatchDeleteDocumentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -517,7 +453,7 @@ export const se_BatchDeleteFeaturedResultsSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDeleteFeaturedResultsSet"); let body: any; - body = JSON.stringify(se_BatchDeleteFeaturedResultsSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +492,7 @@ export const se_ClearQuerySuggestionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ClearQuerySuggestions"); let body: any; - body = JSON.stringify(se_ClearQuerySuggestionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -621,7 +557,7 @@ export const se_CreateFeaturedResultsSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFeaturedResultsSet"); let body: any; - body = JSON.stringify(se_CreateFeaturedResultsSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -673,7 +609,7 @@ export const se_DeleteAccessControlConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAccessControlConfiguration"); let body: any; - body = JSON.stringify(se_DeleteAccessControlConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -686,7 +622,7 @@ export const se_DeleteDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataSource"); let body: any; - body = JSON.stringify(se_DeleteDataSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -699,7 +635,7 @@ export const se_DeleteExperienceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteExperience"); let body: any; - body = JSON.stringify(se_DeleteExperienceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -712,7 +648,7 @@ export const se_DeleteFaqCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFaq"); let body: any; - body = JSON.stringify(se_DeleteFaqRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -725,7 +661,7 @@ export const se_DeleteIndexCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIndex"); let body: any; - body = JSON.stringify(se_DeleteIndexRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -738,7 +674,7 @@ export const se_DeletePrincipalMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePrincipalMapping"); let body: any; - body = JSON.stringify(se_DeletePrincipalMappingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -751,7 +687,7 @@ export const se_DeleteQuerySuggestionsBlockListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteQuerySuggestionsBlockList"); let body: any; - body = JSON.stringify(se_DeleteQuerySuggestionsBlockListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -764,7 +700,7 @@ export const se_DeleteThesaurusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteThesaurus"); let body: any; - body = JSON.stringify(se_DeleteThesaurusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -777,7 +713,7 @@ export const se_DescribeAccessControlConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccessControlConfiguration"); let body: any; - body = JSON.stringify(se_DescribeAccessControlConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -790,7 +726,7 @@ export const se_DescribeDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataSource"); let body: any; - body = JSON.stringify(se_DescribeDataSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,7 +739,7 @@ export const se_DescribeExperienceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExperience"); let body: any; - body = JSON.stringify(se_DescribeExperienceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -816,7 +752,7 @@ export const se_DescribeFaqCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFaq"); let body: any; - body = JSON.stringify(se_DescribeFaqRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -829,7 +765,7 @@ export const se_DescribeFeaturedResultsSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFeaturedResultsSet"); let body: any; - body = JSON.stringify(se_DescribeFeaturedResultsSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -842,7 +778,7 @@ export const se_DescribeIndexCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeIndex"); let body: any; - body = JSON.stringify(se_DescribeIndexRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -855,7 +791,7 @@ export const se_DescribePrincipalMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePrincipalMapping"); let body: any; - body = JSON.stringify(se_DescribePrincipalMappingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -868,7 +804,7 @@ export const se_DescribeQuerySuggestionsBlockListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeQuerySuggestionsBlockList"); let body: any; - body = JSON.stringify(se_DescribeQuerySuggestionsBlockListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -881,7 +817,7 @@ export const se_DescribeQuerySuggestionsConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeQuerySuggestionsConfig"); let body: any; - body = JSON.stringify(se_DescribeQuerySuggestionsConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -894,7 +830,7 @@ export const se_DescribeThesaurusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeThesaurus"); let body: any; - body = JSON.stringify(se_DescribeThesaurusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -907,7 +843,7 @@ export const se_DisassociateEntitiesFromExperienceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateEntitiesFromExperience"); let body: any; - body = JSON.stringify(se_DisassociateEntitiesFromExperienceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -920,7 +856,7 @@ export const se_DisassociatePersonasFromEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociatePersonasFromEntities"); let body: any; - body = JSON.stringify(se_DisassociatePersonasFromEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -933,7 +869,7 @@ export const se_GetQuerySuggestionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQuerySuggestions"); let body: any; - body = JSON.stringify(se_GetQuerySuggestionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -946,7 +882,7 @@ export const se_GetSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSnapshots"); let body: any; - body = JSON.stringify(se_GetSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -959,7 +895,7 @@ export const se_ListAccessControlConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccessControlConfigurations"); let body: any; - body = JSON.stringify(se_ListAccessControlConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -972,7 +908,7 @@ export const se_ListDataSourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDataSources"); let body: any; - body = JSON.stringify(se_ListDataSourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -998,7 +934,7 @@ export const se_ListEntityPersonasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEntityPersonas"); let body: any; - body = JSON.stringify(se_ListEntityPersonasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1011,7 +947,7 @@ export const se_ListExperienceEntitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExperienceEntities"); let body: any; - body = JSON.stringify(se_ListExperienceEntitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1024,7 +960,7 @@ export const se_ListExperiencesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExperiences"); let body: any; - body = JSON.stringify(se_ListExperiencesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1037,7 +973,7 @@ export const se_ListFaqsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFaqs"); let body: any; - body = JSON.stringify(se_ListFaqsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1050,7 +986,7 @@ export const se_ListFeaturedResultsSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFeaturedResultsSets"); let body: any; - body = JSON.stringify(se_ListFeaturedResultsSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1063,7 +999,7 @@ export const se_ListGroupsOlderThanOrderingIdCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroupsOlderThanOrderingId"); let body: any; - body = JSON.stringify(se_ListGroupsOlderThanOrderingIdRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1076,7 +1012,7 @@ export const se_ListIndicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIndices"); let body: any; - body = JSON.stringify(se_ListIndicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1089,7 +1025,7 @@ export const se_ListQuerySuggestionsBlockListsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListQuerySuggestionsBlockLists"); let body: any; - body = JSON.stringify(se_ListQuerySuggestionsBlockListsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1102,7 +1038,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1115,7 +1051,7 @@ export const se_ListThesauriCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListThesauri"); let body: any; - body = JSON.stringify(se_ListThesauriRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1128,7 +1064,7 @@ export const se_PutPrincipalMappingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPrincipalMapping"); let body: any; - body = JSON.stringify(se_PutPrincipalMappingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1151,7 +1087,7 @@ export const se_StartDataSourceSyncJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDataSourceSyncJob"); let body: any; - body = JSON.stringify(se_StartDataSourceSyncJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1164,7 +1100,7 @@ export const se_StopDataSourceSyncJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopDataSourceSyncJob"); let body: any; - body = JSON.stringify(se_StopDataSourceSyncJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1190,7 +1126,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1203,7 +1139,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1216,7 +1152,7 @@ export const se_UpdateAccessControlConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAccessControlConfiguration"); let body: any; - body = JSON.stringify(se_UpdateAccessControlConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1242,7 +1178,7 @@ export const se_UpdateExperienceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateExperience"); let body: any; - body = JSON.stringify(se_UpdateExperienceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1255,7 +1191,7 @@ export const se_UpdateFeaturedResultsSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFeaturedResultsSet"); let body: any; - body = JSON.stringify(se_UpdateFeaturedResultsSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1268,7 +1204,7 @@ export const se_UpdateIndexCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateIndex"); let body: any; - body = JSON.stringify(se_UpdateIndexRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1281,7 +1217,7 @@ export const se_UpdateQuerySuggestionsBlockListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateQuerySuggestionsBlockList"); let body: any; - body = JSON.stringify(se_UpdateQuerySuggestionsBlockListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1294,7 +1230,7 @@ export const se_UpdateQuerySuggestionsConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateQuerySuggestionsConfig"); let body: any; - body = JSON.stringify(se_UpdateQuerySuggestionsConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1307,7 +1243,7 @@ export const se_UpdateThesaurusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateThesaurus"); let body: any; - body = JSON.stringify(se_UpdateThesaurusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1323,12 +1259,12 @@ export const de_AssociateEntitiesToExperienceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateEntitiesToExperienceResponse(data, context); + contents = _json(data); const response: AssociateEntitiesToExperienceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1364,10 +1300,9 @@ const de_AssociateEntitiesToExperienceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1385,12 +1320,12 @@ export const de_AssociatePersonasToEntitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociatePersonasToEntitiesResponse(data, context); + contents = _json(data); const response: AssociatePersonasToEntitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1426,10 +1361,9 @@ const de_AssociatePersonasToEntitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1447,12 +1381,12 @@ export const de_BatchDeleteDocumentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteDocumentResponse(data, context); + contents = _json(data); const response: BatchDeleteDocumentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1488,10 +1422,9 @@ const de_BatchDeleteDocumentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1509,12 +1442,12 @@ export const de_BatchDeleteFeaturedResultsSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDeleteFeaturedResultsSetResponse(data, context); + contents = _json(data); const response: BatchDeleteFeaturedResultsSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1547,10 +1480,9 @@ const de_BatchDeleteFeaturedResultsSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1568,12 +1500,12 @@ export const de_BatchGetDocumentStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetDocumentStatusResponse(data, context); + contents = _json(data); const response: BatchGetDocumentStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1609,10 +1541,9 @@ const de_BatchGetDocumentStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1630,12 +1561,12 @@ export const de_BatchPutDocumentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchPutDocumentResponse(data, context); + contents = _json(data); const response: BatchPutDocumentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1674,10 +1605,9 @@ const de_BatchPutDocumentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1697,7 +1627,7 @@ export const de_ClearQuerySuggestionsCommand = async ( const response: ClearQuerySuggestionsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1733,10 +1663,9 @@ const de_ClearQuerySuggestionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1754,12 +1683,12 @@ export const de_CreateAccessControlConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAccessControlConfigurationResponse(data, context); + contents = _json(data); const response: CreateAccessControlConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1798,10 +1727,9 @@ const de_CreateAccessControlConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1819,12 +1747,12 @@ export const de_CreateDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataSourceResponse(data, context); + contents = _json(data); const response: CreateDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1866,10 +1794,9 @@ const de_CreateDataSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1887,12 +1814,12 @@ export const de_CreateExperienceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateExperienceResponse(data, context); + contents = _json(data); const response: CreateExperienceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1931,10 +1858,9 @@ const de_CreateExperienceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1952,12 +1878,12 @@ export const de_CreateFaqCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFaqResponse(data, context); + contents = _json(data); const response: CreateFaqCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1996,10 +1922,9 @@ const de_CreateFaqCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2017,12 +1942,12 @@ export const de_CreateFeaturedResultsSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFeaturedResultsSetResponse(data, context); + contents = _json(data); const response: CreateFeaturedResultsSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2061,10 +1986,9 @@ const de_CreateFeaturedResultsSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2082,12 +2006,12 @@ export const de_CreateIndexCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateIndexResponse(data, context); + contents = _json(data); const response: CreateIndexCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2126,10 +2050,9 @@ const de_CreateIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2147,12 +2070,12 @@ export const de_CreateQuerySuggestionsBlockListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateQuerySuggestionsBlockListResponse(data, context); + contents = _json(data); const response: CreateQuerySuggestionsBlockListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2191,10 +2114,9 @@ const de_CreateQuerySuggestionsBlockListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2212,12 +2134,12 @@ export const de_CreateThesaurusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateThesaurusResponse(data, context); + contents = _json(data); const response: CreateThesaurusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2256,10 +2178,9 @@ const de_CreateThesaurusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2277,12 +2198,12 @@ export const de_DeleteAccessControlConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAccessControlConfigurationResponse(data, context); + contents = _json(data); const response: DeleteAccessControlConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2318,10 +2239,9 @@ const de_DeleteAccessControlConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2341,7 +2261,7 @@ export const de_DeleteDataSourceCommand = async ( const response: DeleteDataSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2377,10 +2297,9 @@ const de_DeleteDataSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2398,12 +2317,12 @@ export const de_DeleteExperienceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteExperienceResponse(data, context); + contents = _json(data); const response: DeleteExperienceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2439,10 +2358,9 @@ const de_DeleteExperienceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2462,7 +2380,7 @@ export const de_DeleteFaqCommand = async ( const response: DeleteFaqCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2498,10 +2416,9 @@ const de_DeleteFaqCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2521,7 +2438,7 @@ export const de_DeleteIndexCommand = async ( const response: DeleteIndexCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2557,10 +2474,9 @@ const de_DeleteIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2580,7 +2496,7 @@ export const de_DeletePrincipalMappingCommand = async ( const response: DeletePrincipalMappingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2616,10 +2532,9 @@ const de_DeletePrincipalMappingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2639,7 +2554,7 @@ export const de_DeleteQuerySuggestionsBlockListCommand = async ( const response: DeleteQuerySuggestionsBlockListCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2675,10 +2590,9 @@ const de_DeleteQuerySuggestionsBlockListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2698,7 +2612,7 @@ export const de_DeleteThesaurusCommand = async ( const response: DeleteThesaurusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2734,10 +2648,9 @@ const de_DeleteThesaurusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,12 +2668,12 @@ export const de_DescribeAccessControlConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccessControlConfigurationResponse(data, context); + contents = _json(data); const response: DescribeAccessControlConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2793,10 +2706,9 @@ const de_DescribeAccessControlConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2819,7 +2731,7 @@ export const de_DescribeDataSourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2852,10 +2764,9 @@ const de_DescribeDataSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2878,7 +2789,7 @@ export const de_DescribeExperienceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2911,10 +2822,9 @@ const de_DescribeExperienceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2937,7 +2847,7 @@ export const de_DescribeFaqCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2970,10 +2880,9 @@ const de_DescribeFaqCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2991,12 +2900,12 @@ export const de_DescribeFeaturedResultsSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFeaturedResultsSetResponse(data, context); + contents = _json(data); const response: DescribeFeaturedResultsSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3029,10 +2938,9 @@ const de_DescribeFeaturedResultsSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3055,7 +2963,7 @@ export const de_DescribeIndexCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3088,10 +2996,9 @@ const de_DescribeIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3114,7 +3021,7 @@ export const de_DescribePrincipalMappingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3147,10 +3054,9 @@ const de_DescribePrincipalMappingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3173,7 +3079,7 @@ export const de_DescribeQuerySuggestionsBlockListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3206,10 +3112,9 @@ const de_DescribeQuerySuggestionsBlockListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3232,7 +3137,7 @@ export const de_DescribeQuerySuggestionsConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3265,10 +3170,9 @@ const de_DescribeQuerySuggestionsConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3291,7 +3195,7 @@ export const de_DescribeThesaurusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3324,10 +3228,9 @@ const de_DescribeThesaurusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3345,12 +3248,12 @@ export const de_DisassociateEntitiesFromExperienceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateEntitiesFromExperienceResponse(data, context); + contents = _json(data); const response: DisassociateEntitiesFromExperienceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3383,10 +3286,9 @@ const de_DisassociateEntitiesFromExperienceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3404,12 +3306,12 @@ export const de_DisassociatePersonasFromEntitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociatePersonasFromEntitiesResponse(data, context); + contents = _json(data); const response: DisassociatePersonasFromEntitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3442,10 +3344,9 @@ const de_DisassociatePersonasFromEntitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3463,12 +3364,12 @@ export const de_GetQuerySuggestionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetQuerySuggestionsResponse(data, context); + contents = _json(data); const response: GetQuerySuggestionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3507,10 +3408,9 @@ const de_GetQuerySuggestionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3533,7 +3433,7 @@ export const de_GetSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3563,10 +3463,9 @@ const de_GetSnapshotsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3584,12 +3483,12 @@ export const de_ListAccessControlConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAccessControlConfigurationsResponse(data, context); + contents = _json(data); const response: ListAccessControlConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3622,10 +3521,9 @@ const de_ListAccessControlConfigurationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3648,7 +3546,7 @@ export const de_ListDataSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3681,10 +3579,9 @@ const de_ListDataSourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3707,7 +3604,7 @@ export const de_ListDataSourceSyncJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3743,10 +3640,9 @@ const de_ListDataSourceSyncJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3769,7 +3665,7 @@ export const de_ListEntityPersonasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3802,10 +3698,9 @@ const de_ListEntityPersonasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3823,12 +3718,12 @@ export const de_ListExperienceEntitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListExperienceEntitiesResponse(data, context); + contents = _json(data); const response: ListExperienceEntitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3861,10 +3756,9 @@ const de_ListExperienceEntitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3887,7 +3781,7 @@ export const de_ListExperiencesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3920,10 +3814,9 @@ const de_ListExperiencesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3946,7 +3839,7 @@ export const de_ListFaqsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3979,10 +3872,9 @@ const de_ListFaqsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4000,12 +3892,12 @@ export const de_ListFeaturedResultsSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFeaturedResultsSetsResponse(data, context); + contents = _json(data); const response: ListFeaturedResultsSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4038,10 +3930,9 @@ const de_ListFeaturedResultsSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4059,12 +3950,12 @@ export const de_ListGroupsOlderThanOrderingIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGroupsOlderThanOrderingIdResponse(data, context); + contents = _json(data); const response: ListGroupsOlderThanOrderingIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4100,10 +3991,9 @@ const de_ListGroupsOlderThanOrderingIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4126,7 +4016,7 @@ export const de_ListIndicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4156,10 +4046,9 @@ const de_ListIndicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4182,7 +4071,7 @@ export const de_ListQuerySuggestionsBlockListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4215,10 +4104,9 @@ const de_ListQuerySuggestionsBlockListsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4236,12 +4124,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4274,10 +4162,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4300,7 +4187,7 @@ export const de_ListThesauriCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4333,10 +4220,9 @@ const de_ListThesauriCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4356,7 +4242,7 @@ export const de_PutPrincipalMappingCommand = async ( const response: PutPrincipalMappingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4395,10 +4281,9 @@ const de_PutPrincipalMappingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4418,7 +4303,7 @@ export const de_QueryCommand = async (output: __HttpResponse, context: __SerdeCo $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4454,10 +4339,9 @@ const de_QueryCommandError = async (output: __HttpResponse, context: __SerdeCont throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4475,12 +4359,12 @@ export const de_StartDataSourceSyncJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDataSourceSyncJobResponse(data, context); + contents = _json(data); const response: StartDataSourceSyncJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4519,10 +4403,9 @@ const de_StartDataSourceSyncJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4542,7 +4425,7 @@ export const de_StopDataSourceSyncJobCommand = async ( const response: StopDataSourceSyncJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4575,10 +4458,9 @@ const de_StopDataSourceSyncJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4598,7 +4480,7 @@ export const de_SubmitFeedbackCommand = async ( const response: SubmitFeedbackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4634,10 +4516,9 @@ const de_SubmitFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4655,12 +4536,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4693,10 +4574,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4714,12 +4594,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4752,10 +4632,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4773,12 +4652,12 @@ export const de_UpdateAccessControlConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAccessControlConfigurationResponse(data, context); + contents = _json(data); const response: UpdateAccessControlConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4817,10 +4696,9 @@ const de_UpdateAccessControlConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4840,7 +4718,7 @@ export const de_UpdateDataSourceCommand = async ( const response: UpdateDataSourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4876,10 +4754,9 @@ const de_UpdateDataSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4899,7 +4776,7 @@ export const de_UpdateExperienceCommand = async ( const response: UpdateExperienceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4935,10 +4812,9 @@ const de_UpdateExperienceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4956,12 +4832,12 @@ export const de_UpdateFeaturedResultsSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFeaturedResultsSetResponse(data, context); + contents = _json(data); const response: UpdateFeaturedResultsSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4997,10 +4873,9 @@ const de_UpdateFeaturedResultsSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5020,7 +4895,7 @@ export const de_UpdateIndexCommand = async ( const response: UpdateIndexCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5059,10 +4934,9 @@ const de_UpdateIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5082,7 +4956,7 @@ export const de_UpdateQuerySuggestionsBlockListCommand = async ( const response: UpdateQuerySuggestionsBlockListCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5118,10 +4992,9 @@ const de_UpdateQuerySuggestionsBlockListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5141,7 +5014,7 @@ export const de_UpdateQuerySuggestionsConfigCommand = async ( const response: UpdateQuerySuggestionsConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5177,10 +5050,9 @@ const de_UpdateQuerySuggestionsConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5200,7 +5072,7 @@ export const de_UpdateThesaurusCommand = async ( const response: UpdateThesaurusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5236,10 +5108,9 @@ const de_UpdateThesaurusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5253,7 +5124,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5266,7 +5137,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5282,7 +5153,7 @@ const de_FeaturedResultsConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FeaturedResultsConflictException(body, context); + const deserialized: any = _json(body); const exception = new FeaturedResultsConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5298,7 +5169,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5314,7 +5185,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5330,7 +5201,7 @@ const de_ResourceAlreadyExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5346,7 +5217,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5362,7 +5233,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5378,7 +5249,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5394,7 +5265,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5407,7 +5278,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5420,7 +5291,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5428,114 +5299,34 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccessControlListConfiguration - */ -const se_AccessControlListConfiguration = (input: AccessControlListConfiguration, context: __SerdeContext): any => { - return { - ...(input.KeyPath != null && { KeyPath: input.KeyPath }), - }; -}; +// se_AccessControlListConfiguration omitted. -/** - * serializeAws_json1_1AclConfiguration - */ -const se_AclConfiguration = (input: AclConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowedGroupsColumnName != null && { AllowedGroupsColumnName: input.AllowedGroupsColumnName }), - }; -}; +// se_AclConfiguration omitted. -/** - * serializeAws_json1_1AlfrescoConfiguration - */ -const se_AlfrescoConfiguration = (input: AlfrescoConfiguration, context: __SerdeContext): any => { - return { - ...(input.BlogFieldMappings != null && { - BlogFieldMappings: se_DataSourceToIndexFieldMappingList(input.BlogFieldMappings, context), - }), - ...(input.CrawlComments != null && { CrawlComments: input.CrawlComments }), - ...(input.CrawlSystemFolders != null && { CrawlSystemFolders: input.CrawlSystemFolders }), - ...(input.DocumentLibraryFieldMappings != null && { - DocumentLibraryFieldMappings: se_DataSourceToIndexFieldMappingList(input.DocumentLibraryFieldMappings, context), - }), - ...(input.EntityFilter != null && { EntityFilter: se_EntityFilter(input.EntityFilter, context) }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.SiteId != null && { SiteId: input.SiteId }), - ...(input.SiteUrl != null && { SiteUrl: input.SiteUrl }), - ...(input.SslCertificateS3Path != null && { SslCertificateS3Path: se_S3Path(input.SslCertificateS3Path, context) }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - ...(input.WikiFieldMappings != null && { - WikiFieldMappings: se_DataSourceToIndexFieldMappingList(input.WikiFieldMappings, context), - }), - }; -}; - -/** - * serializeAws_json1_1AssociateEntitiesToExperienceRequest - */ -const se_AssociateEntitiesToExperienceRequest = ( - input: AssociateEntitiesToExperienceRequest, - context: __SerdeContext -): any => { - return { - ...(input.EntityList != null && { EntityList: se_AssociateEntityList(input.EntityList, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_AlfrescoConfiguration omitted. -/** - * serializeAws_json1_1AssociateEntityList - */ -const se_AssociateEntityList = (input: EntityConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntityConfiguration(entry, context); - }); -}; +// se_AssociateEntitiesToExperienceRequest omitted. -/** - * serializeAws_json1_1AssociatePersonasToEntitiesRequest - */ -const se_AssociatePersonasToEntitiesRequest = ( - input: AssociatePersonasToEntitiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Personas != null && { Personas: se_EntityPersonaConfigurationList(input.Personas, context) }), - }; -}; +// se_AssociateEntityList omitted. + +// se_AssociatePersonasToEntitiesRequest omitted. /** * serializeAws_json1_1AttributeFilter */ const se_AttributeFilter = (input: AttributeFilter, context: __SerdeContext): any => { - return { - ...(input.AndAllFilters != null && { AndAllFilters: se_AttributeFilterList(input.AndAllFilters, context) }), - ...(input.ContainsAll != null && { ContainsAll: se_DocumentAttribute(input.ContainsAll, context) }), - ...(input.ContainsAny != null && { ContainsAny: se_DocumentAttribute(input.ContainsAny, context) }), - ...(input.EqualsTo != null && { EqualsTo: se_DocumentAttribute(input.EqualsTo, context) }), - ...(input.GreaterThan != null && { GreaterThan: se_DocumentAttribute(input.GreaterThan, context) }), - ...(input.GreaterThanOrEquals != null && { - GreaterThanOrEquals: se_DocumentAttribute(input.GreaterThanOrEquals, context), - }), - ...(input.LessThan != null && { LessThan: se_DocumentAttribute(input.LessThan, context) }), - ...(input.LessThanOrEquals != null && { LessThanOrEquals: se_DocumentAttribute(input.LessThanOrEquals, context) }), - ...(input.NotFilter != null && { NotFilter: se_AttributeFilter(input.NotFilter, context) }), - ...(input.OrAllFilters != null && { OrAllFilters: se_AttributeFilterList(input.OrAllFilters, context) }), - }; + return take(input, { + AndAllFilters: (_) => se_AttributeFilterList(_, context), + ContainsAll: (_) => se_DocumentAttribute(_, context), + ContainsAny: (_) => se_DocumentAttribute(_, context), + EqualsTo: (_) => se_DocumentAttribute(_, context), + GreaterThan: (_) => se_DocumentAttribute(_, context), + GreaterThanOrEquals: (_) => se_DocumentAttribute(_, context), + LessThan: (_) => se_DocumentAttribute(_, context), + LessThanOrEquals: (_) => se_DocumentAttribute(_, context), + NotFilter: (_) => se_AttributeFilter(_, context), + OrAllFilters: (_) => se_AttributeFilterList(_, context), + }); }; /** @@ -5549,170 +5340,54 @@ const se_AttributeFilterList = (input: AttributeFilter[], context: __SerdeContex }); }; -/** - * serializeAws_json1_1AuthenticationConfiguration - */ -const se_AuthenticationConfiguration = (input: AuthenticationConfiguration, context: __SerdeContext): any => { - return { - ...(input.BasicAuthentication != null && { - BasicAuthentication: se_BasicAuthenticationConfigurationList(input.BasicAuthentication, context), - }), - }; -}; +// se_AuthenticationConfiguration omitted. -/** - * serializeAws_json1_1BasicAuthenticationConfiguration - */ -const se_BasicAuthenticationConfiguration = (input: BasicAuthenticationConfiguration, context: __SerdeContext): any => { - return { - ...(input.Credentials != null && { Credentials: input.Credentials }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; +// se_BasicAuthenticationConfiguration omitted. -/** - * serializeAws_json1_1BasicAuthenticationConfigurationList - */ -const se_BasicAuthenticationConfigurationList = ( - input: BasicAuthenticationConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BasicAuthenticationConfiguration(entry, context); - }); -}; +// se_BasicAuthenticationConfigurationList omitted. -/** - * serializeAws_json1_1BatchDeleteDocumentRequest - */ -const se_BatchDeleteDocumentRequest = (input: BatchDeleteDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.DataSourceSyncJobMetricTarget != null && { - DataSourceSyncJobMetricTarget: se_DataSourceSyncJobMetricTarget(input.DataSourceSyncJobMetricTarget, context), - }), - ...(input.DocumentIdList != null && { DocumentIdList: se_DocumentIdList(input.DocumentIdList, context) }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_BatchDeleteDocumentRequest omitted. -/** - * serializeAws_json1_1BatchDeleteFeaturedResultsSetRequest - */ -const se_BatchDeleteFeaturedResultsSetRequest = ( - input: BatchDeleteFeaturedResultsSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.FeaturedResultsSetIds != null && { - FeaturedResultsSetIds: se_FeaturedResultsSetIdList(input.FeaturedResultsSetIds, context), - }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_BatchDeleteFeaturedResultsSetRequest omitted. /** * serializeAws_json1_1BatchGetDocumentStatusRequest */ const se_BatchGetDocumentStatusRequest = (input: BatchGetDocumentStatusRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentInfoList != null && { DocumentInfoList: se_DocumentInfoList(input.DocumentInfoList, context) }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; + return take(input, { + DocumentInfoList: (_) => se_DocumentInfoList(_, context), + IndexId: [], + }); }; /** * serializeAws_json1_1BatchPutDocumentRequest */ const se_BatchPutDocumentRequest = (input: BatchPutDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.CustomDocumentEnrichmentConfiguration != null && { - CustomDocumentEnrichmentConfiguration: se_CustomDocumentEnrichmentConfiguration( - input.CustomDocumentEnrichmentConfiguration, - context - ), - }), - ...(input.Documents != null && { Documents: se_DocumentList(input.Documents, context) }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; + return take(input, { + CustomDocumentEnrichmentConfiguration: (_) => se_CustomDocumentEnrichmentConfiguration(_, context), + Documents: (_) => se_DocumentList(_, context), + IndexId: [], + RoleArn: [], + }); }; -/** - * serializeAws_json1_1BoxConfiguration - */ -const se_BoxConfiguration = (input: BoxConfiguration, context: __SerdeContext): any => { - return { - ...(input.CommentFieldMappings != null && { - CommentFieldMappings: se_DataSourceToIndexFieldMappingList(input.CommentFieldMappings, context), - }), - ...(input.CrawlComments != null && { CrawlComments: input.CrawlComments }), - ...(input.CrawlTasks != null && { CrawlTasks: input.CrawlTasks }), - ...(input.CrawlWebLinks != null && { CrawlWebLinks: input.CrawlWebLinks }), - ...(input.EnterpriseId != null && { EnterpriseId: input.EnterpriseId }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FileFieldMappings != null && { - FileFieldMappings: se_DataSourceToIndexFieldMappingList(input.FileFieldMappings, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.TaskFieldMappings != null && { - TaskFieldMappings: se_DataSourceToIndexFieldMappingList(input.TaskFieldMappings, context), - }), - ...(input.UseChangeLog != null && { UseChangeLog: input.UseChangeLog }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - ...(input.WebLinkFieldMappings != null && { - WebLinkFieldMappings: se_DataSourceToIndexFieldMappingList(input.WebLinkFieldMappings, context), - }), - }; -}; - -/** - * serializeAws_json1_1CapacityUnitsConfiguration - */ -const se_CapacityUnitsConfiguration = (input: CapacityUnitsConfiguration, context: __SerdeContext): any => { - return { - ...(input.QueryCapacityUnits != null && { QueryCapacityUnits: input.QueryCapacityUnits }), - ...(input.StorageCapacityUnits != null && { StorageCapacityUnits: input.StorageCapacityUnits }), - }; -}; +// se_BoxConfiguration omitted. -/** - * serializeAws_json1_1ChangeDetectingColumns - */ -const se_ChangeDetectingColumns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CapacityUnitsConfiguration omitted. -/** - * serializeAws_json1_1ClearQuerySuggestionsRequest - */ -const se_ClearQuerySuggestionsRequest = (input: ClearQuerySuggestionsRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_ChangeDetectingColumns omitted. + +// se_ClearQuerySuggestionsRequest omitted. /** * serializeAws_json1_1ClickFeedback */ const se_ClickFeedback = (input: ClickFeedback, context: __SerdeContext): any => { - return { - ...(input.ClickTime != null && { ClickTime: Math.round(input.ClickTime.getTime() / 1000) }), - ...(input.ResultId != null && { ResultId: input.ResultId }), - }; + return take(input, { + ClickTime: (_) => Math.round(_.getTime() / 1000), + ResultId: [], + }); }; /** @@ -5726,257 +5401,39 @@ const se_ClickFeedbackList = (input: ClickFeedback[], context: __SerdeContext): }); }; -/** - * serializeAws_json1_1ColumnConfiguration - */ -const se_ColumnConfiguration = (input: ColumnConfiguration, context: __SerdeContext): any => { - return { - ...(input.ChangeDetectingColumns != null && { - ChangeDetectingColumns: se_ChangeDetectingColumns(input.ChangeDetectingColumns, context), - }), - ...(input.DocumentDataColumnName != null && { DocumentDataColumnName: input.DocumentDataColumnName }), - ...(input.DocumentIdColumnName != null && { DocumentIdColumnName: input.DocumentIdColumnName }), - ...(input.DocumentTitleColumnName != null && { DocumentTitleColumnName: input.DocumentTitleColumnName }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - }; -}; +// se_ColumnConfiguration omitted. -/** - * serializeAws_json1_1ConfluenceAttachmentConfiguration - */ -const se_ConfluenceAttachmentConfiguration = ( - input: ConfluenceAttachmentConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AttachmentFieldMappings != null && { - AttachmentFieldMappings: se_ConfluenceAttachmentFieldMappingsList(input.AttachmentFieldMappings, context), - }), - ...(input.CrawlAttachments != null && { CrawlAttachments: input.CrawlAttachments }), - }; -}; +// se_ConfluenceAttachmentConfiguration omitted. -/** - * serializeAws_json1_1ConfluenceAttachmentFieldMappingsList - */ -const se_ConfluenceAttachmentFieldMappingsList = ( - input: ConfluenceAttachmentToIndexFieldMapping[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConfluenceAttachmentToIndexFieldMapping(entry, context); - }); -}; +// se_ConfluenceAttachmentFieldMappingsList omitted. -/** - * serializeAws_json1_1ConfluenceAttachmentToIndexFieldMapping - */ -const se_ConfluenceAttachmentToIndexFieldMapping = ( - input: ConfluenceAttachmentToIndexFieldMapping, - context: __SerdeContext -): any => { - return { - ...(input.DataSourceFieldName != null && { DataSourceFieldName: input.DataSourceFieldName }), - ...(input.DateFieldFormat != null && { DateFieldFormat: input.DateFieldFormat }), - ...(input.IndexFieldName != null && { IndexFieldName: input.IndexFieldName }), - }; -}; +// se_ConfluenceAttachmentToIndexFieldMapping omitted. -/** - * serializeAws_json1_1ConfluenceBlogConfiguration - */ -const se_ConfluenceBlogConfiguration = (input: ConfluenceBlogConfiguration, context: __SerdeContext): any => { - return { - ...(input.BlogFieldMappings != null && { - BlogFieldMappings: se_ConfluenceBlogFieldMappingsList(input.BlogFieldMappings, context), - }), - }; -}; +// se_ConfluenceBlogConfiguration omitted. -/** - * serializeAws_json1_1ConfluenceBlogFieldMappingsList - */ -const se_ConfluenceBlogFieldMappingsList = ( - input: ConfluenceBlogToIndexFieldMapping[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConfluenceBlogToIndexFieldMapping(entry, context); - }); -}; +// se_ConfluenceBlogFieldMappingsList omitted. -/** - * serializeAws_json1_1ConfluenceBlogToIndexFieldMapping - */ -const se_ConfluenceBlogToIndexFieldMapping = ( - input: ConfluenceBlogToIndexFieldMapping, - context: __SerdeContext -): any => { - return { - ...(input.DataSourceFieldName != null && { DataSourceFieldName: input.DataSourceFieldName }), - ...(input.DateFieldFormat != null && { DateFieldFormat: input.DateFieldFormat }), - ...(input.IndexFieldName != null && { IndexFieldName: input.IndexFieldName }), - }; -}; +// se_ConfluenceBlogToIndexFieldMapping omitted. -/** - * serializeAws_json1_1ConfluenceConfiguration - */ -const se_ConfluenceConfiguration = (input: ConfluenceConfiguration, context: __SerdeContext): any => { - return { - ...(input.AttachmentConfiguration != null && { - AttachmentConfiguration: se_ConfluenceAttachmentConfiguration(input.AttachmentConfiguration, context), - }), - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.BlogConfiguration != null && { - BlogConfiguration: se_ConfluenceBlogConfiguration(input.BlogConfiguration, context), - }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.PageConfiguration != null && { - PageConfiguration: se_ConfluencePageConfiguration(input.PageConfiguration, context), - }), - ...(input.ProxyConfiguration != null && { - ProxyConfiguration: se_ProxyConfiguration(input.ProxyConfiguration, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.ServerUrl != null && { ServerUrl: input.ServerUrl }), - ...(input.SpaceConfiguration != null && { - SpaceConfiguration: se_ConfluenceSpaceConfiguration(input.SpaceConfiguration, context), - }), - ...(input.Version != null && { Version: input.Version }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1ConfluencePageConfiguration - */ -const se_ConfluencePageConfiguration = (input: ConfluencePageConfiguration, context: __SerdeContext): any => { - return { - ...(input.PageFieldMappings != null && { - PageFieldMappings: se_ConfluencePageFieldMappingsList(input.PageFieldMappings, context), - }), - }; -}; +// se_ConfluenceConfiguration omitted. -/** - * serializeAws_json1_1ConfluencePageFieldMappingsList - */ -const se_ConfluencePageFieldMappingsList = ( - input: ConfluencePageToIndexFieldMapping[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConfluencePageToIndexFieldMapping(entry, context); - }); -}; +// se_ConfluencePageConfiguration omitted. -/** - * serializeAws_json1_1ConfluencePageToIndexFieldMapping - */ -const se_ConfluencePageToIndexFieldMapping = ( - input: ConfluencePageToIndexFieldMapping, - context: __SerdeContext -): any => { - return { - ...(input.DataSourceFieldName != null && { DataSourceFieldName: input.DataSourceFieldName }), - ...(input.DateFieldFormat != null && { DateFieldFormat: input.DateFieldFormat }), - ...(input.IndexFieldName != null && { IndexFieldName: input.IndexFieldName }), - }; -}; +// se_ConfluencePageFieldMappingsList omitted. -/** - * serializeAws_json1_1ConfluenceSpaceConfiguration - */ -const se_ConfluenceSpaceConfiguration = (input: ConfluenceSpaceConfiguration, context: __SerdeContext): any => { - return { - ...(input.CrawlArchivedSpaces != null && { CrawlArchivedSpaces: input.CrawlArchivedSpaces }), - ...(input.CrawlPersonalSpaces != null && { CrawlPersonalSpaces: input.CrawlPersonalSpaces }), - ...(input.ExcludeSpaces != null && { ExcludeSpaces: se_ConfluenceSpaceList(input.ExcludeSpaces, context) }), - ...(input.IncludeSpaces != null && { IncludeSpaces: se_ConfluenceSpaceList(input.IncludeSpaces, context) }), - ...(input.SpaceFieldMappings != null && { - SpaceFieldMappings: se_ConfluenceSpaceFieldMappingsList(input.SpaceFieldMappings, context), - }), - }; -}; +// se_ConfluencePageToIndexFieldMapping omitted. -/** - * serializeAws_json1_1ConfluenceSpaceFieldMappingsList - */ -const se_ConfluenceSpaceFieldMappingsList = ( - input: ConfluenceSpaceToIndexFieldMapping[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConfluenceSpaceToIndexFieldMapping(entry, context); - }); -}; +// se_ConfluenceSpaceConfiguration omitted. -/** - * serializeAws_json1_1ConfluenceSpaceList - */ -const se_ConfluenceSpaceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConfluenceSpaceFieldMappingsList omitted. -/** - * serializeAws_json1_1ConfluenceSpaceToIndexFieldMapping - */ -const se_ConfluenceSpaceToIndexFieldMapping = ( - input: ConfluenceSpaceToIndexFieldMapping, - context: __SerdeContext -): any => { - return { - ...(input.DataSourceFieldName != null && { DataSourceFieldName: input.DataSourceFieldName }), - ...(input.DateFieldFormat != null && { DateFieldFormat: input.DateFieldFormat }), - ...(input.IndexFieldName != null && { IndexFieldName: input.IndexFieldName }), - }; -}; +// se_ConfluenceSpaceList omitted. -/** - * serializeAws_json1_1ConnectionConfiguration - */ -const se_ConnectionConfiguration = (input: ConnectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.DatabaseHost != null && { DatabaseHost: input.DatabaseHost }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DatabasePort != null && { DatabasePort: input.DatabasePort }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_ConfluenceSpaceToIndexFieldMapping omitted. -/** - * serializeAws_json1_1ContentSourceConfiguration - */ -const se_ContentSourceConfiguration = (input: ContentSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataSourceIds != null && { DataSourceIds: se_DataSourceIdList(input.DataSourceIds, context) }), - ...(input.DirectPutContent != null && { DirectPutContent: input.DirectPutContent }), - ...(input.FaqIds != null && { FaqIds: se_FaqIdsList(input.FaqIds, context) }), - }; -}; +// se_ConnectionConfiguration omitted. + +// se_ContentSourceConfiguration omitted. /** * serializeAws_json1_1CreateAccessControlConfigurationRequest @@ -5985,122 +5442,85 @@ const se_CreateAccessControlConfigurationRequest = ( input: CreateAccessControlConfigurationRequest, context: __SerdeContext ): any => { - return { - ...(input.AccessControlList != null && { AccessControlList: se_PrincipalList(input.AccessControlList, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.HierarchicalAccessControlList != null && { - HierarchicalAccessControlList: se_HierarchicalPrincipalList(input.HierarchicalAccessControlList, context), - }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + AccessControlList: _json, + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + HierarchicalAccessControlList: _json, + IndexId: [], + Name: [], + }); }; /** * serializeAws_json1_1CreateDataSourceRequest */ const se_CreateDataSourceRequest = (input: CreateDataSourceRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Configuration != null && { Configuration: se_DataSourceConfiguration(input.Configuration, context) }), - ...(input.CustomDocumentEnrichmentConfiguration != null && { - CustomDocumentEnrichmentConfiguration: se_CustomDocumentEnrichmentConfiguration( - input.CustomDocumentEnrichmentConfiguration, - context - ), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Configuration: (_) => se_DataSourceConfiguration(_, context), + CustomDocumentEnrichmentConfiguration: (_) => se_CustomDocumentEnrichmentConfiguration(_, context), + Description: [], + IndexId: [], + LanguageCode: [], + Name: [], + RoleArn: [], + Schedule: [], + Tags: _json, + Type: [], + VpcConfiguration: _json, + }); }; /** * serializeAws_json1_1CreateExperienceRequest */ const se_CreateExperienceRequest = (input: CreateExperienceRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Configuration != null && { Configuration: se_ExperienceConfiguration(input.Configuration, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Configuration: _json, + Description: [], + IndexId: [], + Name: [], + RoleArn: [], + }); }; /** * serializeAws_json1_1CreateFaqRequest */ const se_CreateFaqRequest = (input: CreateFaqRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.FileFormat != null && { FileFormat: input.FileFormat }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.S3Path != null && { S3Path: se_S3Path(input.S3Path, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + FileFormat: [], + IndexId: [], + LanguageCode: [], + Name: [], + RoleArn: [], + S3Path: _json, + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateFeaturedResultsSetRequest - */ -const se_CreateFeaturedResultsSetRequest = (input: CreateFeaturedResultsSetRequest, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FeaturedDocuments != null && { - FeaturedDocuments: se_FeaturedDocumentList(input.FeaturedDocuments, context), - }), - ...(input.FeaturedResultsSetName != null && { FeaturedResultsSetName: input.FeaturedResultsSetName }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.QueryTexts != null && { QueryTexts: se_QueryTextList(input.QueryTexts, context) }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateFeaturedResultsSetRequest omitted. /** * serializeAws_json1_1CreateIndexRequest */ const se_CreateIndexRequest = (input: CreateIndexRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Edition != null && { Edition: input.Edition }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.ServerSideEncryptionConfiguration != null && { - ServerSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration( - input.ServerSideEncryptionConfiguration, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserContextPolicy != null && { UserContextPolicy: input.UserContextPolicy }), - ...(input.UserGroupResolutionConfiguration != null && { - UserGroupResolutionConfiguration: se_UserGroupResolutionConfiguration( - input.UserGroupResolutionConfiguration, - context - ), - }), - ...(input.UserTokenConfigurations != null && { - UserTokenConfigurations: se_UserTokenConfigurationList(input.UserTokenConfigurations, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Edition: [], + Name: [], + RoleArn: [], + ServerSideEncryptionConfiguration: _json, + Tags: _json, + UserContextPolicy: [], + UserGroupResolutionConfiguration: _json, + UserTokenConfigurations: _json, + }); }; /** @@ -6110,30 +5530,30 @@ const se_CreateQuerySuggestionsBlockListRequest = ( input: CreateQuerySuggestionsBlockListRequest, context: __SerdeContext ): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SourceS3Path != null && { SourceS3Path: se_S3Path(input.SourceS3Path, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + IndexId: [], + Name: [], + RoleArn: [], + SourceS3Path: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateThesaurusRequest */ const se_CreateThesaurusRequest = (input: CreateThesaurusRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SourceS3Path != null && { SourceS3Path: se_S3Path(input.SourceS3Path, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + IndexId: [], + Name: [], + RoleArn: [], + SourceS3Path: _json, + Tags: _json, + }); }; /** @@ -6143,478 +5563,139 @@ const se_CustomDocumentEnrichmentConfiguration = ( input: CustomDocumentEnrichmentConfiguration, context: __SerdeContext ): any => { - return { - ...(input.InlineConfigurations != null && { - InlineConfigurations: se_InlineCustomDocumentEnrichmentConfigurationList(input.InlineConfigurations, context), - }), - ...(input.PostExtractionHookConfiguration != null && { - PostExtractionHookConfiguration: se_HookConfiguration(input.PostExtractionHookConfiguration, context), - }), - ...(input.PreExtractionHookConfiguration != null && { - PreExtractionHookConfiguration: se_HookConfiguration(input.PreExtractionHookConfiguration, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; + return take(input, { + InlineConfigurations: (_) => se_InlineCustomDocumentEnrichmentConfigurationList(_, context), + PostExtractionHookConfiguration: (_) => se_HookConfiguration(_, context), + PreExtractionHookConfiguration: (_) => se_HookConfiguration(_, context), + RoleArn: [], + }); }; -/** - * serializeAws_json1_1DatabaseConfiguration - */ -const se_DatabaseConfiguration = (input: DatabaseConfiguration, context: __SerdeContext): any => { - return { - ...(input.AclConfiguration != null && { AclConfiguration: se_AclConfiguration(input.AclConfiguration, context) }), - ...(input.ColumnConfiguration != null && { - ColumnConfiguration: se_ColumnConfiguration(input.ColumnConfiguration, context), - }), - ...(input.ConnectionConfiguration != null && { - ConnectionConfiguration: se_ConnectionConfiguration(input.ConnectionConfiguration, context), - }), - ...(input.DatabaseEngineType != null && { DatabaseEngineType: input.DatabaseEngineType }), - ...(input.SqlConfiguration != null && { SqlConfiguration: se_SqlConfiguration(input.SqlConfiguration, context) }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; +// se_DatabaseConfiguration omitted. /** * serializeAws_json1_1DataSourceConfiguration */ const se_DataSourceConfiguration = (input: DataSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.AlfrescoConfiguration != null && { - AlfrescoConfiguration: se_AlfrescoConfiguration(input.AlfrescoConfiguration, context), - }), - ...(input.BoxConfiguration != null && { BoxConfiguration: se_BoxConfiguration(input.BoxConfiguration, context) }), - ...(input.ConfluenceConfiguration != null && { - ConfluenceConfiguration: se_ConfluenceConfiguration(input.ConfluenceConfiguration, context), - }), - ...(input.DatabaseConfiguration != null && { - DatabaseConfiguration: se_DatabaseConfiguration(input.DatabaseConfiguration, context), - }), - ...(input.FsxConfiguration != null && { FsxConfiguration: se_FsxConfiguration(input.FsxConfiguration, context) }), - ...(input.GitHubConfiguration != null && { - GitHubConfiguration: se_GitHubConfiguration(input.GitHubConfiguration, context), - }), - ...(input.GoogleDriveConfiguration != null && { - GoogleDriveConfiguration: se_GoogleDriveConfiguration(input.GoogleDriveConfiguration, context), - }), - ...(input.JiraConfiguration != null && { - JiraConfiguration: se_JiraConfiguration(input.JiraConfiguration, context), - }), - ...(input.OneDriveConfiguration != null && { - OneDriveConfiguration: se_OneDriveConfiguration(input.OneDriveConfiguration, context), - }), - ...(input.QuipConfiguration != null && { - QuipConfiguration: se_QuipConfiguration(input.QuipConfiguration, context), - }), - ...(input.S3Configuration != null && { - S3Configuration: se_S3DataSourceConfiguration(input.S3Configuration, context), - }), - ...(input.SalesforceConfiguration != null && { - SalesforceConfiguration: se_SalesforceConfiguration(input.SalesforceConfiguration, context), - }), - ...(input.ServiceNowConfiguration != null && { - ServiceNowConfiguration: se_ServiceNowConfiguration(input.ServiceNowConfiguration, context), - }), - ...(input.SharePointConfiguration != null && { - SharePointConfiguration: se_SharePointConfiguration(input.SharePointConfiguration, context), - }), - ...(input.SlackConfiguration != null && { - SlackConfiguration: se_SlackConfiguration(input.SlackConfiguration, context), - }), - ...(input.TemplateConfiguration != null && { - TemplateConfiguration: se_TemplateConfiguration(input.TemplateConfiguration, context), - }), - ...(input.WebCrawlerConfiguration != null && { - WebCrawlerConfiguration: se_WebCrawlerConfiguration(input.WebCrawlerConfiguration, context), - }), - ...(input.WorkDocsConfiguration != null && { - WorkDocsConfiguration: se_WorkDocsConfiguration(input.WorkDocsConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1DataSourceGroup - */ -const se_DataSourceGroup = (input: DataSourceGroup, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - }; + return take(input, { + AlfrescoConfiguration: _json, + BoxConfiguration: _json, + ConfluenceConfiguration: _json, + DatabaseConfiguration: _json, + FsxConfiguration: _json, + GitHubConfiguration: _json, + GoogleDriveConfiguration: _json, + JiraConfiguration: _json, + OneDriveConfiguration: _json, + QuipConfiguration: _json, + S3Configuration: _json, + SalesforceConfiguration: _json, + ServiceNowConfiguration: _json, + SharePointConfiguration: _json, + SlackConfiguration: _json, + TemplateConfiguration: (_) => se_TemplateConfiguration(_, context), + WebCrawlerConfiguration: (_) => se_WebCrawlerConfiguration(_, context), + WorkDocsConfiguration: _json, + }); }; -/** - * serializeAws_json1_1DataSourceGroups - */ -const se_DataSourceGroups = (input: DataSourceGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSourceGroup(entry, context); - }); -}; +// se_DataSourceGroup omitted. -/** - * serializeAws_json1_1DataSourceIdList - */ -const se_DataSourceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataSourceGroups omitted. -/** - * serializeAws_json1_1DataSourceInclusionsExclusionsStrings - */ -const se_DataSourceInclusionsExclusionsStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DataSourceIdList omitted. -/** - * serializeAws_json1_1DataSourceSyncJobMetricTarget - */ -const se_DataSourceSyncJobMetricTarget = (input: DataSourceSyncJobMetricTarget, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.DataSourceSyncJobId != null && { DataSourceSyncJobId: input.DataSourceSyncJobId }), - }; -}; +// se_DataSourceInclusionsExclusionsStrings omitted. -/** - * serializeAws_json1_1DataSourceToIndexFieldMapping - */ -const se_DataSourceToIndexFieldMapping = (input: DataSourceToIndexFieldMapping, context: __SerdeContext): any => { - return { - ...(input.DataSourceFieldName != null && { DataSourceFieldName: input.DataSourceFieldName }), - ...(input.DateFieldFormat != null && { DateFieldFormat: input.DateFieldFormat }), - ...(input.IndexFieldName != null && { IndexFieldName: input.IndexFieldName }), - }; -}; +// se_DataSourceSyncJobMetricTarget omitted. -/** - * serializeAws_json1_1DataSourceToIndexFieldMappingList - */ -const se_DataSourceToIndexFieldMappingList = (input: DataSourceToIndexFieldMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSourceToIndexFieldMapping(entry, context); - }); -}; +// se_DataSourceToIndexFieldMapping omitted. -/** - * serializeAws_json1_1DataSourceVpcConfiguration - */ -const se_DataSourceVpcConfiguration = (input: DataSourceVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdList(input.SecurityGroupIds, context), - }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdList(input.SubnetIds, context) }), - }; -}; +// se_DataSourceToIndexFieldMappingList omitted. -/** - * serializeAws_json1_1DeleteAccessControlConfigurationRequest - */ -const se_DeleteAccessControlConfigurationRequest = ( - input: DeleteAccessControlConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DataSourceVpcConfiguration omitted. -/** - * serializeAws_json1_1DeleteDataSourceRequest - */ -const se_DeleteDataSourceRequest = (input: DeleteDataSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DeleteAccessControlConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteExperienceRequest - */ -const se_DeleteExperienceRequest = (input: DeleteExperienceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DeleteDataSourceRequest omitted. -/** - * serializeAws_json1_1DeleteFaqRequest - */ -const se_DeleteFaqRequest = (input: DeleteFaqRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DeleteExperienceRequest omitted. -/** - * serializeAws_json1_1DeleteIndexRequest - */ -const se_DeleteIndexRequest = (input: DeleteIndexRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteFaqRequest omitted. -/** - * serializeAws_json1_1DeletePrincipalMappingRequest - */ -const se_DeletePrincipalMappingRequest = (input: DeletePrincipalMappingRequest, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.OrderingId != null && { OrderingId: input.OrderingId }), - }; -}; +// se_DeleteIndexRequest omitted. -/** - * serializeAws_json1_1DeleteQuerySuggestionsBlockListRequest - */ -const se_DeleteQuerySuggestionsBlockListRequest = ( - input: DeleteQuerySuggestionsBlockListRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DeletePrincipalMappingRequest omitted. -/** - * serializeAws_json1_1DeleteThesaurusRequest - */ -const se_DeleteThesaurusRequest = (input: DeleteThesaurusRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DeleteQuerySuggestionsBlockListRequest omitted. -/** - * serializeAws_json1_1DescribeAccessControlConfigurationRequest - */ -const se_DescribeAccessControlConfigurationRequest = ( - input: DescribeAccessControlConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DeleteThesaurusRequest omitted. -/** - * serializeAws_json1_1DescribeDataSourceRequest - */ -const se_DescribeDataSourceRequest = (input: DescribeDataSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeAccessControlConfigurationRequest omitted. -/** - * serializeAws_json1_1DescribeExperienceRequest - */ -const se_DescribeExperienceRequest = (input: DescribeExperienceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeDataSourceRequest omitted. -/** - * serializeAws_json1_1DescribeFaqRequest - */ -const se_DescribeFaqRequest = (input: DescribeFaqRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeExperienceRequest omitted. -/** - * serializeAws_json1_1DescribeFeaturedResultsSetRequest - */ -const se_DescribeFeaturedResultsSetRequest = ( - input: DescribeFeaturedResultsSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.FeaturedResultsSetId != null && { FeaturedResultsSetId: input.FeaturedResultsSetId }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeFaqRequest omitted. -/** - * serializeAws_json1_1DescribeIndexRequest - */ -const se_DescribeIndexRequest = (input: DescribeIndexRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DescribeFeaturedResultsSetRequest omitted. -/** - * serializeAws_json1_1DescribePrincipalMappingRequest - */ -const se_DescribePrincipalMappingRequest = (input: DescribePrincipalMappingRequest, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeIndexRequest omitted. -/** - * serializeAws_json1_1DescribeQuerySuggestionsBlockListRequest - */ -const se_DescribeQuerySuggestionsBlockListRequest = ( - input: DescribeQuerySuggestionsBlockListRequest, - context: __SerdeContext -): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribePrincipalMappingRequest omitted. -/** - * serializeAws_json1_1DescribeQuerySuggestionsConfigRequest - */ -const se_DescribeQuerySuggestionsConfigRequest = ( - input: DescribeQuerySuggestionsConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeQuerySuggestionsBlockListRequest omitted. -/** - * serializeAws_json1_1DescribeThesaurusRequest - */ -const se_DescribeThesaurusRequest = (input: DescribeThesaurusRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeQuerySuggestionsConfigRequest omitted. -/** - * serializeAws_json1_1DisassociateEntitiesFromExperienceRequest - */ -const se_DisassociateEntitiesFromExperienceRequest = ( - input: DisassociateEntitiesFromExperienceRequest, - context: __SerdeContext -): any => { - return { - ...(input.EntityList != null && { EntityList: se_DisassociateEntityList(input.EntityList, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DescribeThesaurusRequest omitted. -/** - * serializeAws_json1_1DisassociateEntityList - */ -const se_DisassociateEntityList = (input: EntityConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntityConfiguration(entry, context); - }); -}; +// se_DisassociateEntitiesFromExperienceRequest omitted. -/** - * serializeAws_json1_1DisassociatePersonasFromEntitiesRequest - */ -const se_DisassociatePersonasFromEntitiesRequest = ( - input: DisassociatePersonasFromEntitiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.EntityIds != null && { EntityIds: se_EntityIdsList(input.EntityIds, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; +// se_DisassociateEntityList omitted. + +// se_DisassociatePersonasFromEntitiesRequest omitted. /** * serializeAws_json1_1Document */ const se_Document = (input: Document, context: __SerdeContext): any => { - return { - ...(input.AccessControlConfigurationId != null && { - AccessControlConfigurationId: input.AccessControlConfigurationId, - }), - ...(input.AccessControlList != null && { AccessControlList: se_PrincipalList(input.AccessControlList, context) }), - ...(input.Attributes != null && { Attributes: se_DocumentAttributeList(input.Attributes, context) }), - ...(input.Blob != null && { Blob: context.base64Encoder(input.Blob) }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.HierarchicalAccessControlList != null && { - HierarchicalAccessControlList: se_HierarchicalPrincipalList(input.HierarchicalAccessControlList, context), - }), - ...(input.Id != null && { Id: input.Id }), - ...(input.S3Path != null && { S3Path: se_S3Path(input.S3Path, context) }), - ...(input.Title != null && { Title: input.Title }), - }; + return take(input, { + AccessControlConfigurationId: [], + AccessControlList: _json, + Attributes: (_) => se_DocumentAttributeList(_, context), + Blob: context.base64Encoder, + ContentType: [], + HierarchicalAccessControlList: _json, + Id: [], + S3Path: _json, + Title: [], + }); }; /** * serializeAws_json1_1DocumentAttribute */ const se_DocumentAttribute = (input: DocumentAttribute, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: se_DocumentAttributeValue(input.Value, context) }), - }; + return take(input, { + Key: [], + Value: (_) => se_DocumentAttributeValue(_, context), + }); }; /** * serializeAws_json1_1DocumentAttributeCondition */ const se_DocumentAttributeCondition = (input: DocumentAttributeCondition, context: __SerdeContext): any => { - return { - ...(input.ConditionDocumentAttributeKey != null && { - ConditionDocumentAttributeKey: input.ConditionDocumentAttributeKey, - }), - ...(input.ConditionOnValue != null && { - ConditionOnValue: se_DocumentAttributeValue(input.ConditionOnValue, context), - }), - ...(input.Operator != null && { Operator: input.Operator }), - }; + return take(input, { + ConditionDocumentAttributeKey: [], + ConditionOnValue: (_) => se_DocumentAttributeValue(_, context), + Operator: [], + }); }; -/** - * serializeAws_json1_1DocumentAttributeKeyList - */ -const se_DocumentAttributeKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DocumentAttributeKeyList omitted. /** * serializeAws_json1_1DocumentAttributeList @@ -6627,65 +5708,41 @@ const se_DocumentAttributeList = (input: DocumentAttribute[], context: __SerdeCo }); }; -/** - * serializeAws_json1_1DocumentAttributeStringListValue - */ -const se_DocumentAttributeStringListValue = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DocumentAttributeStringListValue omitted. /** * serializeAws_json1_1DocumentAttributeTarget */ const se_DocumentAttributeTarget = (input: DocumentAttributeTarget, context: __SerdeContext): any => { - return { - ...(input.TargetDocumentAttributeKey != null && { TargetDocumentAttributeKey: input.TargetDocumentAttributeKey }), - ...(input.TargetDocumentAttributeValue != null && { - TargetDocumentAttributeValue: se_DocumentAttributeValue(input.TargetDocumentAttributeValue, context), - }), - ...(input.TargetDocumentAttributeValueDeletion != null && { - TargetDocumentAttributeValueDeletion: input.TargetDocumentAttributeValueDeletion, - }), - }; + return take(input, { + TargetDocumentAttributeKey: [], + TargetDocumentAttributeValue: (_) => se_DocumentAttributeValue(_, context), + TargetDocumentAttributeValueDeletion: [], + }); }; /** * serializeAws_json1_1DocumentAttributeValue */ const se_DocumentAttributeValue = (input: DocumentAttributeValue, context: __SerdeContext): any => { - return { - ...(input.DateValue != null && { DateValue: Math.round(input.DateValue.getTime() / 1000) }), - ...(input.LongValue != null && { LongValue: input.LongValue }), - ...(input.StringListValue != null && { - StringListValue: se_DocumentAttributeStringListValue(input.StringListValue, context), - }), - ...(input.StringValue != null && { StringValue: input.StringValue }), - }; + return take(input, { + DateValue: (_) => Math.round(_.getTime() / 1000), + LongValue: [], + StringListValue: _json, + StringValue: [], + }); }; -/** - * serializeAws_json1_1DocumentIdList - */ -const se_DocumentIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DocumentIdList omitted. /** * serializeAws_json1_1DocumentInfo */ const se_DocumentInfo = (input: DocumentInfo, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_DocumentAttributeList(input.Attributes, context) }), - ...(input.DocumentId != null && { DocumentId: input.DocumentId }), - }; + return take(input, { + Attributes: (_) => se_DocumentAttributeList(_, context), + DocumentId: [], + }); }; /** @@ -6710,5933 +5767,1556 @@ const se_DocumentList = (input: Document[], context: __SerdeContext): any => { }); }; +// se_DocumentMetadataConfiguration omitted. + +// se_DocumentMetadataConfigurationList omitted. + +// se_DocumentRelevanceConfiguration omitted. + +// se_DocumentRelevanceOverrideConfigurationList omitted. + +// se_DocumentsMetadataConfiguration omitted. + +// se_EntityConfiguration omitted. + +// se_EntityFilter omitted. + +// se_EntityIdsList omitted. + +// se_EntityPersonaConfiguration omitted. + +// se_EntityPersonaConfigurationList omitted. + +// se_ExcludeMimeTypesList omitted. + +// se_ExcludeSharedDrivesList omitted. + +// se_ExcludeUserAccountsList omitted. + +// se_ExperienceConfiguration omitted. + /** - * serializeAws_json1_1DocumentMetadataConfiguration + * serializeAws_json1_1Facet */ -const se_DocumentMetadataConfiguration = (input: DocumentMetadataConfiguration, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Relevance != null && { Relevance: se_Relevance(input.Relevance, context) }), - ...(input.Search != null && { Search: se_Search(input.Search, context) }), - ...(input.Type != null && { Type: input.Type }), - }; +const se_Facet = (input: Facet, context: __SerdeContext): any => { + return take(input, { + DocumentAttributeKey: [], + Facets: (_) => se_FacetList(_, context), + MaxResults: [], + }); }; /** - * serializeAws_json1_1DocumentMetadataConfigurationList + * serializeAws_json1_1FacetList */ -const se_DocumentMetadataConfigurationList = (input: DocumentMetadataConfiguration[], context: __SerdeContext): any => { +const se_FacetList = (input: Facet[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DocumentMetadataConfiguration(entry, context); + return se_Facet(entry, context); }); }; +// se_FaqIdsList omitted. + +// se_FeaturedDocument omitted. + +// se_FeaturedDocumentList omitted. + +// se_FeaturedResultsSetIdList omitted. + +// se_FolderIdList omitted. + +// se_FsxConfiguration omitted. + +// se_GetQuerySuggestionsRequest omitted. + +// se_GetSnapshotsRequest omitted. + +// se_GitHubConfiguration omitted. + +// se_GitHubDocumentCrawlProperties omitted. + +// se_GoogleDriveConfiguration omitted. + +// se_GroupMembers omitted. + +// se_Groups omitted. + +// se_HierarchicalPrincipal omitted. + +// se_HierarchicalPrincipalList omitted. + +/** + * serializeAws_json1_1HookConfiguration + */ +const se_HookConfiguration = (input: HookConfiguration, context: __SerdeContext): any => { + return take(input, { + InvocationCondition: (_) => se_DocumentAttributeCondition(_, context), + LambdaArn: [], + S3Bucket: [], + }); +}; + /** - * serializeAws_json1_1DocumentRelevanceConfiguration + * serializeAws_json1_1InlineCustomDocumentEnrichmentConfiguration */ -const se_DocumentRelevanceConfiguration = (input: DocumentRelevanceConfiguration, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Relevance != null && { Relevance: se_Relevance(input.Relevance, context) }), - }; +const se_InlineCustomDocumentEnrichmentConfiguration = ( + input: InlineCustomDocumentEnrichmentConfiguration, + context: __SerdeContext +): any => { + return take(input, { + Condition: (_) => se_DocumentAttributeCondition(_, context), + DocumentContentDeletion: [], + Target: (_) => se_DocumentAttributeTarget(_, context), + }); }; /** - * serializeAws_json1_1DocumentRelevanceOverrideConfigurationList + * serializeAws_json1_1InlineCustomDocumentEnrichmentConfigurationList */ -const se_DocumentRelevanceOverrideConfigurationList = ( - input: DocumentRelevanceConfiguration[], +const se_InlineCustomDocumentEnrichmentConfigurationList = ( + input: InlineCustomDocumentEnrichmentConfiguration[], context: __SerdeContext ): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DocumentRelevanceConfiguration(entry, context); + return se_InlineCustomDocumentEnrichmentConfiguration(entry, context); }); }; -/** - * serializeAws_json1_1DocumentsMetadataConfiguration - */ -const se_DocumentsMetadataConfiguration = (input: DocumentsMetadataConfiguration, context: __SerdeContext): any => { - return { - ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }), - }; -}; +// se_IssueSubEntityFilter omitted. -/** - * serializeAws_json1_1EntityConfiguration - */ -const se_EntityConfiguration = (input: EntityConfiguration, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.EntityType != null && { EntityType: input.EntityType }), - }; -}; +// se_IssueType omitted. -/** - * serializeAws_json1_1EntityFilter - */ -const se_EntityFilter = (input: (AlfrescoEntity | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_JiraConfiguration omitted. -/** - * serializeAws_json1_1EntityIdsList - */ -const se_EntityIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_JiraStatus omitted. -/** - * serializeAws_json1_1EntityPersonaConfiguration - */ -const se_EntityPersonaConfiguration = (input: EntityPersonaConfiguration, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.Persona != null && { Persona: input.Persona }), - }; -}; +// se_JsonTokenTypeConfiguration omitted. -/** - * serializeAws_json1_1EntityPersonaConfigurationList - */ -const se_EntityPersonaConfigurationList = (input: EntityPersonaConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntityPersonaConfiguration(entry, context); - }); -}; +// se_JwtTokenTypeConfiguration omitted. -/** - * serializeAws_json1_1ExcludeMimeTypesList - */ -const se_ExcludeMimeTypesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListAccessControlConfigurationsRequest omitted. -/** - * serializeAws_json1_1ExcludeSharedDrivesList - */ -const se_ExcludeSharedDrivesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListDataSourcesRequest omitted. /** - * serializeAws_json1_1ExcludeUserAccountsList + * serializeAws_json1_1ListDataSourceSyncJobsRequest */ -const se_ExcludeUserAccountsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_ListDataSourceSyncJobsRequest = (input: ListDataSourceSyncJobsRequest, context: __SerdeContext): any => { + return take(input, { + Id: [], + IndexId: [], + MaxResults: [], + NextToken: [], + StartTimeFilter: (_) => se_TimeRange(_, context), + StatusFilter: [], + }); }; -/** - * serializeAws_json1_1ExperienceConfiguration - */ -const se_ExperienceConfiguration = (input: ExperienceConfiguration, context: __SerdeContext): any => { - return { - ...(input.ContentSourceConfiguration != null && { - ContentSourceConfiguration: se_ContentSourceConfiguration(input.ContentSourceConfiguration, context), - }), - ...(input.UserIdentityConfiguration != null && { - UserIdentityConfiguration: se_UserIdentityConfiguration(input.UserIdentityConfiguration, context), - }), - }; -}; +// se_ListEntityPersonasRequest omitted. -/** - * serializeAws_json1_1Facet - */ -const se_Facet = (input: Facet, context: __SerdeContext): any => { - return { - ...(input.DocumentAttributeKey != null && { DocumentAttributeKey: input.DocumentAttributeKey }), - ...(input.Facets != null && { Facets: se_FacetList(input.Facets, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - }; -}; +// se_ListExperienceEntitiesRequest omitted. -/** - * serializeAws_json1_1FacetList - */ -const se_FacetList = (input: Facet[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Facet(entry, context); - }); -}; +// se_ListExperiencesRequest omitted. -/** - * serializeAws_json1_1FaqIdsList - */ -const se_FaqIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListFaqsRequest omitted. -/** - * serializeAws_json1_1FeaturedDocument - */ -const se_FeaturedDocument = (input: FeaturedDocument, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_ListFeaturedResultsSetsRequest omitted. -/** - * serializeAws_json1_1FeaturedDocumentList - */ -const se_FeaturedDocumentList = (input: FeaturedDocument[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FeaturedDocument(entry, context); - }); -}; +// se_ListGroupsOlderThanOrderingIdRequest omitted. -/** - * serializeAws_json1_1FeaturedResultsSetIdList - */ -const se_FeaturedResultsSetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListIndicesRequest omitted. -/** - * serializeAws_json1_1FolderIdList - */ -const se_FolderIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListQuerySuggestionsBlockListsRequest omitted. -/** - * serializeAws_json1_1FsxConfiguration - */ -const se_FsxConfiguration = (input: FsxConfiguration, context: __SerdeContext): any => { - return { - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.FileSystemType != null && { FileSystemType: input.FileSystemType }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1GetQuerySuggestionsRequest - */ -const se_GetQuerySuggestionsRequest = (input: GetQuerySuggestionsRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxSuggestionsCount != null && { MaxSuggestionsCount: input.MaxSuggestionsCount }), - ...(input.QueryText != null && { QueryText: input.QueryText }), - }; -}; +// se_ListThesauriRequest omitted. -/** - * serializeAws_json1_1GetSnapshotsRequest - */ -const se_GetSnapshotsRequest = (input: GetSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MetricType != null && { MetricType: input.MetricType }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_MemberGroup omitted. -/** - * serializeAws_json1_1GitHubConfiguration - */ -const se_GitHubConfiguration = (input: GitHubConfiguration, context: __SerdeContext): any => { - return { - ...(input.ExclusionFileNamePatterns != null && { - ExclusionFileNamePatterns: se_StringList(input.ExclusionFileNamePatterns, context), - }), - ...(input.ExclusionFileTypePatterns != null && { - ExclusionFileTypePatterns: se_StringList(input.ExclusionFileTypePatterns, context), - }), - ...(input.ExclusionFolderNamePatterns != null && { - ExclusionFolderNamePatterns: se_StringList(input.ExclusionFolderNamePatterns, context), - }), - ...(input.GitHubCommitConfigurationFieldMappings != null && { - GitHubCommitConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubCommitConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubDocumentCrawlProperties != null && { - GitHubDocumentCrawlProperties: se_GitHubDocumentCrawlProperties(input.GitHubDocumentCrawlProperties, context), - }), - ...(input.GitHubIssueAttachmentConfigurationFieldMappings != null && { - GitHubIssueAttachmentConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubIssueAttachmentConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubIssueCommentConfigurationFieldMappings != null && { - GitHubIssueCommentConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubIssueCommentConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubIssueDocumentConfigurationFieldMappings != null && { - GitHubIssueDocumentConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubIssueDocumentConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubPullRequestCommentConfigurationFieldMappings != null && { - GitHubPullRequestCommentConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubPullRequestCommentConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings != null && { - GitHubPullRequestDocumentAttachmentConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubPullRequestDocumentConfigurationFieldMappings != null && { - GitHubPullRequestDocumentConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubPullRequestDocumentConfigurationFieldMappings, - context - ), - }), - ...(input.GitHubRepositoryConfigurationFieldMappings != null && { - GitHubRepositoryConfigurationFieldMappings: se_DataSourceToIndexFieldMappingList( - input.GitHubRepositoryConfigurationFieldMappings, - context - ), - }), - ...(input.InclusionFileNamePatterns != null && { - InclusionFileNamePatterns: se_StringList(input.InclusionFileNamePatterns, context), - }), - ...(input.InclusionFileTypePatterns != null && { - InclusionFileTypePatterns: se_StringList(input.InclusionFileTypePatterns, context), - }), - ...(input.InclusionFolderNamePatterns != null && { - InclusionFolderNamePatterns: se_StringList(input.InclusionFolderNamePatterns, context), - }), - ...(input.OnPremiseConfiguration != null && { - OnPremiseConfiguration: se_OnPremiseConfiguration(input.OnPremiseConfiguration, context), - }), - ...(input.RepositoryFilter != null && { RepositoryFilter: se_RepositoryNames(input.RepositoryFilter, context) }), - ...(input.SaaSConfiguration != null && { - SaaSConfiguration: se_SaaSConfiguration(input.SaaSConfiguration, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.Type != null && { Type: input.Type }), - ...(input.UseChangeLog != null && { UseChangeLog: input.UseChangeLog }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1GitHubDocumentCrawlProperties - */ -const se_GitHubDocumentCrawlProperties = (input: GitHubDocumentCrawlProperties, context: __SerdeContext): any => { - return { - ...(input.CrawlIssue != null && { CrawlIssue: input.CrawlIssue }), - ...(input.CrawlIssueComment != null && { CrawlIssueComment: input.CrawlIssueComment }), - ...(input.CrawlIssueCommentAttachment != null && { - CrawlIssueCommentAttachment: input.CrawlIssueCommentAttachment, - }), - ...(input.CrawlPullRequest != null && { CrawlPullRequest: input.CrawlPullRequest }), - ...(input.CrawlPullRequestComment != null && { CrawlPullRequestComment: input.CrawlPullRequestComment }), - ...(input.CrawlPullRequestCommentAttachment != null && { - CrawlPullRequestCommentAttachment: input.CrawlPullRequestCommentAttachment, - }), - ...(input.CrawlRepositoryDocuments != null && { CrawlRepositoryDocuments: input.CrawlRepositoryDocuments }), - }; -}; +// se_MemberGroups omitted. + +// se_MemberUser omitted. + +// se_MemberUsers omitted. + +// se_OneDriveConfiguration omitted. + +// se_OneDriveUserList omitted. + +// se_OneDriveUsers omitted. + +// se_OnPremiseConfiguration omitted. + +// se_Principal omitted. + +// se_PrincipalList omitted. + +// se_PrivateChannelFilter omitted. + +// se_Project omitted. + +// se_ProxyConfiguration omitted. + +// se_PublicChannelFilter omitted. + +// se_PutPrincipalMappingRequest omitted. /** - * serializeAws_json1_1GoogleDriveConfiguration + * serializeAws_json1_1QueryRequest */ -const se_GoogleDriveConfiguration = (input: GoogleDriveConfiguration, context: __SerdeContext): any => { - return { - ...(input.ExcludeMimeTypes != null && { - ExcludeMimeTypes: se_ExcludeMimeTypesList(input.ExcludeMimeTypes, context), - }), - ...(input.ExcludeSharedDrives != null && { - ExcludeSharedDrives: se_ExcludeSharedDrivesList(input.ExcludeSharedDrives, context), - }), - ...(input.ExcludeUserAccounts != null && { - ExcludeUserAccounts: se_ExcludeUserAccountsList(input.ExcludeUserAccounts, context), - }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - }; -}; - -/** - * serializeAws_json1_1GroupMembers - */ -const se_GroupMembers = (input: GroupMembers, context: __SerdeContext): any => { - return { - ...(input.MemberGroups != null && { MemberGroups: se_MemberGroups(input.MemberGroups, context) }), - ...(input.MemberUsers != null && { MemberUsers: se_MemberUsers(input.MemberUsers, context) }), - ...(input.S3PathforGroupMembers != null && { - S3PathforGroupMembers: se_S3Path(input.S3PathforGroupMembers, context), - }), - }; +const se_QueryRequest = (input: QueryRequest, context: __SerdeContext): any => { + return take(input, { + AttributeFilter: (_) => se_AttributeFilter(_, context), + DocumentRelevanceOverrideConfigurations: _json, + Facets: (_) => se_FacetList(_, context), + IndexId: [], + PageNumber: [], + PageSize: [], + QueryResultTypeFilter: [], + QueryText: [], + RequestedDocumentAttributes: _json, + SortingConfiguration: _json, + SpellCorrectionConfiguration: _json, + UserContext: _json, + VisitorId: [], + }); }; +// se_QueryTextList omitted. + +// se_QuipConfiguration omitted. + +// se_Relevance omitted. + +// se_RelevanceFeedback omitted. + +// se_RelevanceFeedbackList omitted. + +// se_RepositoryNames omitted. + +// se_S3DataSourceConfiguration omitted. + +// se_S3Path omitted. + +// se_SaaSConfiguration omitted. + +// se_SalesforceChatterFeedConfiguration omitted. + +// se_SalesforceChatterFeedIncludeFilterTypes omitted. + +// se_SalesforceConfiguration omitted. + +// se_SalesforceCustomKnowledgeArticleTypeConfiguration omitted. + +// se_SalesforceCustomKnowledgeArticleTypeConfigurationList omitted. + +// se_SalesforceKnowledgeArticleConfiguration omitted. + +// se_SalesforceKnowledgeArticleStateList omitted. + +// se_SalesforceStandardKnowledgeArticleTypeConfiguration omitted. + +// se_SalesforceStandardObjectAttachmentConfiguration omitted. + +// se_SalesforceStandardObjectConfiguration omitted. + +// se_SalesforceStandardObjectConfigurationList omitted. + +// se_Search omitted. + +// se_SecurityGroupIdList omitted. + +// se_SeedUrlConfiguration omitted. + +// se_SeedUrlList omitted. + +// se_ServerSideEncryptionConfiguration omitted. + +// se_ServiceNowConfiguration omitted. + +// se_ServiceNowKnowledgeArticleConfiguration omitted. + +// se_ServiceNowServiceCatalogConfiguration omitted. + +// se_SharePointConfiguration omitted. + +// se_SharePointUrlList omitted. + +// se_SiteMapsConfiguration omitted. + +// se_SiteMapsList omitted. + +// se_SlackConfiguration omitted. + +// se_SlackEntityList omitted. + +// se_SortingConfiguration omitted. + +// se_SpellCorrectionConfiguration omitted. + +// se_SqlConfiguration omitted. + +// se_StartDataSourceSyncJobRequest omitted. + +// se_StopDataSourceSyncJobRequest omitted. + +// se_StringList omitted. + /** - * serializeAws_json1_1Groups + * serializeAws_json1_1SubmitFeedbackRequest */ -const se_Groups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_SubmitFeedbackRequest = (input: SubmitFeedbackRequest, context: __SerdeContext): any => { + return take(input, { + ClickFeedbackItems: (_) => se_ClickFeedbackList(_, context), + IndexId: [], + QueryId: [], + RelevanceFeedbackItems: _json, + }); }; +// se_SubnetIdList omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + /** - * serializeAws_json1_1HierarchicalPrincipal + * serializeAws_json1_1Template */ -const se_HierarchicalPrincipal = (input: HierarchicalPrincipal, context: __SerdeContext): any => { - return { - ...(input.PrincipalList != null && { PrincipalList: se_PrincipalList(input.PrincipalList, context) }), - }; +const se_Template = (input: __DocumentType, context: __SerdeContext): any => { + return input; }; /** - * serializeAws_json1_1HierarchicalPrincipalList + * serializeAws_json1_1TemplateConfiguration */ -const se_HierarchicalPrincipalList = (input: HierarchicalPrincipal[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HierarchicalPrincipal(entry, context); - }); +const se_TemplateConfiguration = (input: TemplateConfiguration, context: __SerdeContext): any => { + return take(input, { + Template: (_) => se_Template(_, context), + }); }; /** - * serializeAws_json1_1HookConfiguration + * serializeAws_json1_1TimeRange */ -const se_HookConfiguration = (input: HookConfiguration, context: __SerdeContext): any => { - return { - ...(input.InvocationCondition != null && { - InvocationCondition: se_DocumentAttributeCondition(input.InvocationCondition, context), - }), - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - }; +const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_UntagResourceRequest omitted. + +// se_UpdateAccessControlConfigurationRequest omitted. + /** - * serializeAws_json1_1InlineCustomDocumentEnrichmentConfiguration + * serializeAws_json1_1UpdateDataSourceRequest */ -const se_InlineCustomDocumentEnrichmentConfiguration = ( - input: InlineCustomDocumentEnrichmentConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Condition != null && { Condition: se_DocumentAttributeCondition(input.Condition, context) }), - ...(input.DocumentContentDeletion != null && { DocumentContentDeletion: input.DocumentContentDeletion }), - ...(input.Target != null && { Target: se_DocumentAttributeTarget(input.Target, context) }), - }; +const se_UpdateDataSourceRequest = (input: UpdateDataSourceRequest, context: __SerdeContext): any => { + return take(input, { + Configuration: (_) => se_DataSourceConfiguration(_, context), + CustomDocumentEnrichmentConfiguration: (_) => se_CustomDocumentEnrichmentConfiguration(_, context), + Description: [], + Id: [], + IndexId: [], + LanguageCode: [], + Name: [], + RoleArn: [], + Schedule: [], + VpcConfiguration: _json, + }); }; +// se_UpdateExperienceRequest omitted. + +// se_UpdateFeaturedResultsSetRequest omitted. + +// se_UpdateIndexRequest omitted. + +// se_UpdateQuerySuggestionsBlockListRequest omitted. + +// se_UpdateQuerySuggestionsConfigRequest omitted. + +// se_UpdateThesaurusRequest omitted. + +// se_Urls omitted. + +// se_UserContext omitted. + +// se_UserGroupResolutionConfiguration omitted. + +// se_UserIdentityConfiguration omitted. + +// se_UserTokenConfiguration omitted. + +// se_UserTokenConfigurationList omitted. + +// se_ValueImportanceMap omitted. + /** - * serializeAws_json1_1InlineCustomDocumentEnrichmentConfigurationList + * serializeAws_json1_1WebCrawlerConfiguration */ -const se_InlineCustomDocumentEnrichmentConfigurationList = ( - input: InlineCustomDocumentEnrichmentConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InlineCustomDocumentEnrichmentConfiguration(entry, context); - }); +const se_WebCrawlerConfiguration = (input: WebCrawlerConfiguration, context: __SerdeContext): any => { + return take(input, { + AuthenticationConfiguration: _json, + CrawlDepth: [], + MaxContentSizePerPageInMegaBytes: __serializeFloat, + MaxLinksPerPage: [], + MaxUrlsPerMinuteCrawlRate: [], + ProxyConfiguration: _json, + UrlExclusionPatterns: _json, + UrlInclusionPatterns: _json, + Urls: _json, + }); }; -/** - * serializeAws_json1_1IssueSubEntityFilter - */ -const se_IssueSubEntityFilter = (input: (IssueSubEntity | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_WorkDocsConfiguration omitted. -/** - * serializeAws_json1_1IssueType - */ -const se_IssueType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_AccessControlConfigurationSummary omitted. -/** - * serializeAws_json1_1JiraConfiguration - */ -const se_JiraConfiguration = (input: JiraConfiguration, context: __SerdeContext): any => { - return { - ...(input.AttachmentFieldMappings != null && { - AttachmentFieldMappings: se_DataSourceToIndexFieldMappingList(input.AttachmentFieldMappings, context), - }), - ...(input.CommentFieldMappings != null && { - CommentFieldMappings: se_DataSourceToIndexFieldMappingList(input.CommentFieldMappings, context), - }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.IssueFieldMappings != null && { - IssueFieldMappings: se_DataSourceToIndexFieldMappingList(input.IssueFieldMappings, context), - }), - ...(input.IssueSubEntityFilter != null && { - IssueSubEntityFilter: se_IssueSubEntityFilter(input.IssueSubEntityFilter, context), - }), - ...(input.IssueType != null && { IssueType: se_IssueType(input.IssueType, context) }), - ...(input.JiraAccountUrl != null && { JiraAccountUrl: input.JiraAccountUrl }), - ...(input.Project != null && { Project: se_Project(input.Project, context) }), - ...(input.ProjectFieldMappings != null && { - ProjectFieldMappings: se_DataSourceToIndexFieldMappingList(input.ProjectFieldMappings, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.Status != null && { Status: se_JiraStatus(input.Status, context) }), - ...(input.UseChangeLog != null && { UseChangeLog: input.UseChangeLog }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - ...(input.WorkLogFieldMappings != null && { - WorkLogFieldMappings: se_DataSourceToIndexFieldMappingList(input.WorkLogFieldMappings, context), - }), - }; -}; - -/** - * serializeAws_json1_1JiraStatus - */ -const se_JiraStatus = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_AccessControlConfigurationSummaryList omitted. -/** - * serializeAws_json1_1JsonTokenTypeConfiguration - */ -const se_JsonTokenTypeConfiguration = (input: JsonTokenTypeConfiguration, context: __SerdeContext): any => { - return { - ...(input.GroupAttributeField != null && { GroupAttributeField: input.GroupAttributeField }), - ...(input.UserNameAttributeField != null && { UserNameAttributeField: input.UserNameAttributeField }), - }; -}; +// de_AccessControlListConfiguration omitted. -/** - * serializeAws_json1_1JwtTokenTypeConfiguration - */ -const se_JwtTokenTypeConfiguration = (input: JwtTokenTypeConfiguration, context: __SerdeContext): any => { - return { - ...(input.ClaimRegex != null && { ClaimRegex: input.ClaimRegex }), - ...(input.GroupAttributeField != null && { GroupAttributeField: input.GroupAttributeField }), - ...(input.Issuer != null && { Issuer: input.Issuer }), - ...(input.KeyLocation != null && { KeyLocation: input.KeyLocation }), - ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }), - ...(input.URL != null && { URL: input.URL }), - ...(input.UserNameAttributeField != null && { UserNameAttributeField: input.UserNameAttributeField }), - }; -}; +// de_AccessDeniedException omitted. -/** - * serializeAws_json1_1ListAccessControlConfigurationsRequest - */ -const se_ListAccessControlConfigurationsRequest = ( - input: ListAccessControlConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AclConfiguration omitted. -/** - * serializeAws_json1_1ListDataSourcesRequest - */ -const se_ListDataSourcesRequest = (input: ListDataSourcesRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AdditionalResultAttribute omitted. -/** - * serializeAws_json1_1ListDataSourceSyncJobsRequest - */ -const se_ListDataSourceSyncJobsRequest = (input: ListDataSourceSyncJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTimeFilter != null && { StartTimeFilter: se_TimeRange(input.StartTimeFilter, context) }), - ...(input.StatusFilter != null && { StatusFilter: input.StatusFilter }), - }; -}; +// de_AdditionalResultAttributeList omitted. -/** - * serializeAws_json1_1ListEntityPersonasRequest - */ -const se_ListEntityPersonasRequest = (input: ListEntityPersonasRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AdditionalResultAttributeValue omitted. -/** - * serializeAws_json1_1ListExperienceEntitiesRequest - */ -const se_ListExperienceEntitiesRequest = (input: ListExperienceEntitiesRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AlfrescoConfiguration omitted. -/** - * serializeAws_json1_1ListExperiencesRequest - */ -const se_ListExperiencesRequest = (input: ListExperiencesRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AssociateEntitiesToExperienceFailedEntityList omitted. -/** - * serializeAws_json1_1ListFaqsRequest - */ -const se_ListFaqsRequest = (input: ListFaqsRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AssociateEntitiesToExperienceResponse omitted. -/** - * serializeAws_json1_1ListFeaturedResultsSetsRequest - */ -const se_ListFeaturedResultsSetsRequest = (input: ListFeaturedResultsSetsRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_AssociatePersonasToEntitiesResponse omitted. -/** - * serializeAws_json1_1ListGroupsOlderThanOrderingIdRequest - */ -const se_ListGroupsOlderThanOrderingIdRequest = ( - input: ListGroupsOlderThanOrderingIdRequest, - context: __SerdeContext -): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrderingId != null && { OrderingId: input.OrderingId }), - }; -}; +// de_AuthenticationConfiguration omitted. -/** - * serializeAws_json1_1ListIndicesRequest - */ -const se_ListIndicesRequest = (input: ListIndicesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_BasicAuthenticationConfiguration omitted. -/** - * serializeAws_json1_1ListQuerySuggestionsBlockListsRequest - */ -const se_ListQuerySuggestionsBlockListsRequest = ( - input: ListQuerySuggestionsBlockListsRequest, - context: __SerdeContext -): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_BasicAuthenticationConfigurationList omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// de_BatchDeleteDocumentResponse omitted. -/** - * serializeAws_json1_1ListThesauriRequest - */ -const se_ListThesauriRequest = (input: ListThesauriRequest, context: __SerdeContext): any => { - return { - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// de_BatchDeleteDocumentResponseFailedDocument omitted. -/** - * serializeAws_json1_1MemberGroup - */ -const se_MemberGroup = (input: MemberGroup, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - }; -}; +// de_BatchDeleteDocumentResponseFailedDocuments omitted. -/** - * serializeAws_json1_1MemberGroups - */ -const se_MemberGroups = (input: MemberGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MemberGroup(entry, context); - }); -}; +// de_BatchDeleteFeaturedResultsSetError omitted. -/** - * serializeAws_json1_1MemberUser - */ -const se_MemberUser = (input: MemberUser, context: __SerdeContext): any => { - return { - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// de_BatchDeleteFeaturedResultsSetErrors omitted. -/** - * serializeAws_json1_1MemberUsers - */ -const se_MemberUsers = (input: MemberUser[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MemberUser(entry, context); - }); -}; +// de_BatchDeleteFeaturedResultsSetResponse omitted. -/** - * serializeAws_json1_1OneDriveConfiguration - */ -const se_OneDriveConfiguration = (input: OneDriveConfiguration, context: __SerdeContext): any => { - return { - ...(input.DisableLocalGroups != null && { DisableLocalGroups: input.DisableLocalGroups }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.OneDriveUsers != null && { OneDriveUsers: se_OneDriveUsers(input.OneDriveUsers, context) }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.TenantDomain != null && { TenantDomain: input.TenantDomain }), - }; -}; +// de_BatchGetDocumentStatusResponse omitted. -/** - * serializeAws_json1_1OneDriveUserList - */ -const se_OneDriveUserList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_BatchGetDocumentStatusResponseError omitted. -/** - * serializeAws_json1_1OneDriveUsers - */ -const se_OneDriveUsers = (input: OneDriveUsers, context: __SerdeContext): any => { - return { - ...(input.OneDriveUserList != null && { OneDriveUserList: se_OneDriveUserList(input.OneDriveUserList, context) }), - ...(input.OneDriveUserS3Path != null && { OneDriveUserS3Path: se_S3Path(input.OneDriveUserS3Path, context) }), - }; -}; +// de_BatchGetDocumentStatusResponseErrors omitted. -/** - * serializeAws_json1_1OnPremiseConfiguration - */ -const se_OnPremiseConfiguration = (input: OnPremiseConfiguration, context: __SerdeContext): any => { - return { - ...(input.HostUrl != null && { HostUrl: input.HostUrl }), - ...(input.OrganizationName != null && { OrganizationName: input.OrganizationName }), - ...(input.SslCertificateS3Path != null && { SslCertificateS3Path: se_S3Path(input.SslCertificateS3Path, context) }), - }; -}; +// de_BatchPutDocumentResponse omitted. -/** - * serializeAws_json1_1Principal - */ -const se_Principal = (input: Principal, context: __SerdeContext): any => { - return { - ...(input.Access != null && { Access: input.Access }), - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// de_BatchPutDocumentResponseFailedDocument omitted. -/** - * serializeAws_json1_1PrincipalList - */ -const se_PrincipalList = (input: Principal[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Principal(entry, context); - }); -}; +// de_BatchPutDocumentResponseFailedDocuments omitted. -/** - * serializeAws_json1_1PrivateChannelFilter - */ -const se_PrivateChannelFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_BoxConfiguration omitted. -/** - * serializeAws_json1_1Project - */ -const se_Project = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_CapacityUnitsConfiguration omitted. -/** - * serializeAws_json1_1ProxyConfiguration - */ -const se_ProxyConfiguration = (input: ProxyConfiguration, context: __SerdeContext): any => { - return { - ...(input.Credentials != null && { Credentials: input.Credentials }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; +// de_ChangeDetectingColumns omitted. -/** - * serializeAws_json1_1PublicChannelFilter - */ -const se_PublicChannelFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_ColumnConfiguration omitted. -/** - * serializeAws_json1_1PutPrincipalMappingRequest - */ -const se_PutPrincipalMappingRequest = (input: PutPrincipalMappingRequest, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.GroupMembers != null && { GroupMembers: se_GroupMembers(input.GroupMembers, context) }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.OrderingId != null && { OrderingId: input.OrderingId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// de_ConflictException omitted. -/** - * serializeAws_json1_1QueryRequest - */ -const se_QueryRequest = (input: QueryRequest, context: __SerdeContext): any => { - return { - ...(input.AttributeFilter != null && { AttributeFilter: se_AttributeFilter(input.AttributeFilter, context) }), - ...(input.DocumentRelevanceOverrideConfigurations != null && { - DocumentRelevanceOverrideConfigurations: se_DocumentRelevanceOverrideConfigurationList( - input.DocumentRelevanceOverrideConfigurations, - context - ), - }), - ...(input.Facets != null && { Facets: se_FacetList(input.Facets, context) }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.PageNumber != null && { PageNumber: input.PageNumber }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.QueryResultTypeFilter != null && { QueryResultTypeFilter: input.QueryResultTypeFilter }), - ...(input.QueryText != null && { QueryText: input.QueryText }), - ...(input.RequestedDocumentAttributes != null && { - RequestedDocumentAttributes: se_DocumentAttributeKeyList(input.RequestedDocumentAttributes, context), - }), - ...(input.SortingConfiguration != null && { - SortingConfiguration: se_SortingConfiguration(input.SortingConfiguration, context), - }), - ...(input.SpellCorrectionConfiguration != null && { - SpellCorrectionConfiguration: se_SpellCorrectionConfiguration(input.SpellCorrectionConfiguration, context), - }), - ...(input.UserContext != null && { UserContext: se_UserContext(input.UserContext, context) }), - ...(input.VisitorId != null && { VisitorId: input.VisitorId }), - }; -}; - -/** - * serializeAws_json1_1QueryTextList - */ -const se_QueryTextList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_ConflictingItem omitted. -/** - * serializeAws_json1_1QuipConfiguration - */ -const se_QuipConfiguration = (input: QuipConfiguration, context: __SerdeContext): any => { - return { - ...(input.AttachmentFieldMappings != null && { - AttachmentFieldMappings: se_DataSourceToIndexFieldMappingList(input.AttachmentFieldMappings, context), - }), - ...(input.CrawlAttachments != null && { CrawlAttachments: input.CrawlAttachments }), - ...(input.CrawlChatRooms != null && { CrawlChatRooms: input.CrawlChatRooms }), - ...(input.CrawlFileComments != null && { CrawlFileComments: input.CrawlFileComments }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FolderIds != null && { FolderIds: se_FolderIdList(input.FolderIds, context) }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.MessageFieldMappings != null && { - MessageFieldMappings: se_DataSourceToIndexFieldMappingList(input.MessageFieldMappings, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.ThreadFieldMappings != null && { - ThreadFieldMappings: se_DataSourceToIndexFieldMappingList(input.ThreadFieldMappings, context), - }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1Relevance - */ -const se_Relevance = (input: Relevance, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.Freshness != null && { Freshness: input.Freshness }), - ...(input.Importance != null && { Importance: input.Importance }), - ...(input.RankOrder != null && { RankOrder: input.RankOrder }), - ...(input.ValueImportanceMap != null && { - ValueImportanceMap: se_ValueImportanceMap(input.ValueImportanceMap, context), - }), - }; -}; +// de_ConflictingItems omitted. -/** - * serializeAws_json1_1RelevanceFeedback - */ -const se_RelevanceFeedback = (input: RelevanceFeedback, context: __SerdeContext): any => { - return { - ...(input.RelevanceValue != null && { RelevanceValue: input.RelevanceValue }), - ...(input.ResultId != null && { ResultId: input.ResultId }), - }; -}; +// de_ConfluenceAttachmentConfiguration omitted. -/** - * serializeAws_json1_1RelevanceFeedbackList - */ -const se_RelevanceFeedbackList = (input: RelevanceFeedback[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RelevanceFeedback(entry, context); - }); -}; +// de_ConfluenceAttachmentFieldMappingsList omitted. -/** - * serializeAws_json1_1RepositoryNames - */ -const se_RepositoryNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_ConfluenceAttachmentToIndexFieldMapping omitted. -/** - * serializeAws_json1_1S3DataSourceConfiguration - */ -const se_S3DataSourceConfiguration = (input: S3DataSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.AccessControlListConfiguration != null && { - AccessControlListConfiguration: se_AccessControlListConfiguration(input.AccessControlListConfiguration, context), - }), - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.DocumentsMetadataConfiguration != null && { - DocumentsMetadataConfiguration: se_DocumentsMetadataConfiguration(input.DocumentsMetadataConfiguration, context), - }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.InclusionPrefixes != null && { - InclusionPrefixes: se_DataSourceInclusionsExclusionsStrings(input.InclusionPrefixes, context), - }), - }; -}; +// de_ConfluenceBlogConfiguration omitted. -/** - * serializeAws_json1_1S3Path - */ -const se_S3Path = (input: S3Path, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - }; -}; +// de_ConfluenceBlogFieldMappingsList omitted. -/** - * serializeAws_json1_1SaaSConfiguration - */ -const se_SaaSConfiguration = (input: SaaSConfiguration, context: __SerdeContext): any => { - return { - ...(input.HostUrl != null && { HostUrl: input.HostUrl }), - ...(input.OrganizationName != null && { OrganizationName: input.OrganizationName }), - }; -}; +// de_ConfluenceBlogToIndexFieldMapping omitted. -/** - * serializeAws_json1_1SalesforceChatterFeedConfiguration - */ -const se_SalesforceChatterFeedConfiguration = ( - input: SalesforceChatterFeedConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DocumentDataFieldName != null && { DocumentDataFieldName: input.DocumentDataFieldName }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.IncludeFilterTypes != null && { - IncludeFilterTypes: se_SalesforceChatterFeedIncludeFilterTypes(input.IncludeFilterTypes, context), - }), - }; -}; +// de_ConfluenceConfiguration omitted. -/** - * serializeAws_json1_1SalesforceChatterFeedIncludeFilterTypes - */ -const se_SalesforceChatterFeedIncludeFilterTypes = ( - input: (SalesforceChatterFeedIncludeFilterType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SalesforceConfiguration - */ -const se_SalesforceConfiguration = (input: SalesforceConfiguration, context: __SerdeContext): any => { - return { - ...(input.ChatterFeedConfiguration != null && { - ChatterFeedConfiguration: se_SalesforceChatterFeedConfiguration(input.ChatterFeedConfiguration, context), - }), - ...(input.CrawlAttachments != null && { CrawlAttachments: input.CrawlAttachments }), - ...(input.ExcludeAttachmentFilePatterns != null && { - ExcludeAttachmentFilePatterns: se_DataSourceInclusionsExclusionsStrings( - input.ExcludeAttachmentFilePatterns, - context - ), - }), - ...(input.IncludeAttachmentFilePatterns != null && { - IncludeAttachmentFilePatterns: se_DataSourceInclusionsExclusionsStrings( - input.IncludeAttachmentFilePatterns, - context - ), - }), - ...(input.KnowledgeArticleConfiguration != null && { - KnowledgeArticleConfiguration: se_SalesforceKnowledgeArticleConfiguration( - input.KnowledgeArticleConfiguration, - context - ), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.ServerUrl != null && { ServerUrl: input.ServerUrl }), - ...(input.StandardObjectAttachmentConfiguration != null && { - StandardObjectAttachmentConfiguration: se_SalesforceStandardObjectAttachmentConfiguration( - input.StandardObjectAttachmentConfiguration, - context - ), - }), - ...(input.StandardObjectConfigurations != null && { - StandardObjectConfigurations: se_SalesforceStandardObjectConfigurationList( - input.StandardObjectConfigurations, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1SalesforceCustomKnowledgeArticleTypeConfiguration - */ -const se_SalesforceCustomKnowledgeArticleTypeConfiguration = ( - input: SalesforceCustomKnowledgeArticleTypeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DocumentDataFieldName != null && { DocumentDataFieldName: input.DocumentDataFieldName }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SalesforceCustomKnowledgeArticleTypeConfigurationList - */ -const se_SalesforceCustomKnowledgeArticleTypeConfigurationList = ( - input: SalesforceCustomKnowledgeArticleTypeConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SalesforceCustomKnowledgeArticleTypeConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1SalesforceKnowledgeArticleConfiguration - */ -const se_SalesforceKnowledgeArticleConfiguration = ( - input: SalesforceKnowledgeArticleConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomKnowledgeArticleTypeConfigurations != null && { - CustomKnowledgeArticleTypeConfigurations: se_SalesforceCustomKnowledgeArticleTypeConfigurationList( - input.CustomKnowledgeArticleTypeConfigurations, - context - ), - }), - ...(input.IncludedStates != null && { - IncludedStates: se_SalesforceKnowledgeArticleStateList(input.IncludedStates, context), - }), - ...(input.StandardKnowledgeArticleTypeConfiguration != null && { - StandardKnowledgeArticleTypeConfiguration: se_SalesforceStandardKnowledgeArticleTypeConfiguration( - input.StandardKnowledgeArticleTypeConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1SalesforceKnowledgeArticleStateList - */ -const se_SalesforceKnowledgeArticleStateList = ( - input: (SalesforceKnowledgeArticleState | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SalesforceStandardKnowledgeArticleTypeConfiguration - */ -const se_SalesforceStandardKnowledgeArticleTypeConfiguration = ( - input: SalesforceStandardKnowledgeArticleTypeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DocumentDataFieldName != null && { DocumentDataFieldName: input.DocumentDataFieldName }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - }; -}; - -/** - * serializeAws_json1_1SalesforceStandardObjectAttachmentConfiguration - */ -const se_SalesforceStandardObjectAttachmentConfiguration = ( - input: SalesforceStandardObjectAttachmentConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - }; -}; - -/** - * serializeAws_json1_1SalesforceStandardObjectConfiguration - */ -const se_SalesforceStandardObjectConfiguration = ( - input: SalesforceStandardObjectConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DocumentDataFieldName != null && { DocumentDataFieldName: input.DocumentDataFieldName }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SalesforceStandardObjectConfigurationList - */ -const se_SalesforceStandardObjectConfigurationList = ( - input: SalesforceStandardObjectConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SalesforceStandardObjectConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1Search - */ -const se_Search = (input: Search, context: __SerdeContext): any => { - return { - ...(input.Displayable != null && { Displayable: input.Displayable }), - ...(input.Facetable != null && { Facetable: input.Facetable }), - ...(input.Searchable != null && { Searchable: input.Searchable }), - ...(input.Sortable != null && { Sortable: input.Sortable }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SeedUrlConfiguration - */ -const se_SeedUrlConfiguration = (input: SeedUrlConfiguration, context: __SerdeContext): any => { - return { - ...(input.SeedUrls != null && { SeedUrls: se_SeedUrlList(input.SeedUrls, context) }), - ...(input.WebCrawlerMode != null && { WebCrawlerMode: input.WebCrawlerMode }), - }; -}; - -/** - * serializeAws_json1_1SeedUrlList - */ -const se_SeedUrlList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ServerSideEncryptionConfiguration - */ -const se_ServerSideEncryptionConfiguration = ( - input: ServerSideEncryptionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1ServiceNowConfiguration - */ -const se_ServiceNowConfiguration = (input: ServiceNowConfiguration, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.HostUrl != null && { HostUrl: input.HostUrl }), - ...(input.KnowledgeArticleConfiguration != null && { - KnowledgeArticleConfiguration: se_ServiceNowKnowledgeArticleConfiguration( - input.KnowledgeArticleConfiguration, - context - ), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.ServiceCatalogConfiguration != null && { - ServiceCatalogConfiguration: se_ServiceNowServiceCatalogConfiguration(input.ServiceCatalogConfiguration, context), - }), - ...(input.ServiceNowBuildVersion != null && { ServiceNowBuildVersion: input.ServiceNowBuildVersion }), - }; -}; - -/** - * serializeAws_json1_1ServiceNowKnowledgeArticleConfiguration - */ -const se_ServiceNowKnowledgeArticleConfiguration = ( - input: ServiceNowKnowledgeArticleConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CrawlAttachments != null && { CrawlAttachments: input.CrawlAttachments }), - ...(input.DocumentDataFieldName != null && { DocumentDataFieldName: input.DocumentDataFieldName }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.ExcludeAttachmentFilePatterns != null && { - ExcludeAttachmentFilePatterns: se_DataSourceInclusionsExclusionsStrings( - input.ExcludeAttachmentFilePatterns, - context - ), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.FilterQuery != null && { FilterQuery: input.FilterQuery }), - ...(input.IncludeAttachmentFilePatterns != null && { - IncludeAttachmentFilePatterns: se_DataSourceInclusionsExclusionsStrings( - input.IncludeAttachmentFilePatterns, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1ServiceNowServiceCatalogConfiguration - */ -const se_ServiceNowServiceCatalogConfiguration = ( - input: ServiceNowServiceCatalogConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CrawlAttachments != null && { CrawlAttachments: input.CrawlAttachments }), - ...(input.DocumentDataFieldName != null && { DocumentDataFieldName: input.DocumentDataFieldName }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.ExcludeAttachmentFilePatterns != null && { - ExcludeAttachmentFilePatterns: se_DataSourceInclusionsExclusionsStrings( - input.ExcludeAttachmentFilePatterns, - context - ), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.IncludeAttachmentFilePatterns != null && { - IncludeAttachmentFilePatterns: se_DataSourceInclusionsExclusionsStrings( - input.IncludeAttachmentFilePatterns, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1SharePointConfiguration - */ -const se_SharePointConfiguration = (input: SharePointConfiguration, context: __SerdeContext): any => { - return { - ...(input.AuthenticationType != null && { AuthenticationType: input.AuthenticationType }), - ...(input.CrawlAttachments != null && { CrawlAttachments: input.CrawlAttachments }), - ...(input.DisableLocalGroups != null && { DisableLocalGroups: input.DisableLocalGroups }), - ...(input.DocumentTitleFieldName != null && { DocumentTitleFieldName: input.DocumentTitleFieldName }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.ProxyConfiguration != null && { - ProxyConfiguration: se_ProxyConfiguration(input.ProxyConfiguration, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.SharePointVersion != null && { SharePointVersion: input.SharePointVersion }), - ...(input.SslCertificateS3Path != null && { SslCertificateS3Path: se_S3Path(input.SslCertificateS3Path, context) }), - ...(input.Urls != null && { Urls: se_SharePointUrlList(input.Urls, context) }), - ...(input.UseChangeLog != null && { UseChangeLog: input.UseChangeLog }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1SharePointUrlList - */ -const se_SharePointUrlList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SiteMapsConfiguration - */ -const se_SiteMapsConfiguration = (input: SiteMapsConfiguration, context: __SerdeContext): any => { - return { - ...(input.SiteMaps != null && { SiteMaps: se_SiteMapsList(input.SiteMaps, context) }), - }; -}; - -/** - * serializeAws_json1_1SiteMapsList - */ -const se_SiteMapsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SlackConfiguration - */ -const se_SlackConfiguration = (input: SlackConfiguration, context: __SerdeContext): any => { - return { - ...(input.CrawlBotMessage != null && { CrawlBotMessage: input.CrawlBotMessage }), - ...(input.ExcludeArchived != null && { ExcludeArchived: input.ExcludeArchived }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.LookBackPeriod != null && { LookBackPeriod: input.LookBackPeriod }), - ...(input.PrivateChannelFilter != null && { - PrivateChannelFilter: se_PrivateChannelFilter(input.PrivateChannelFilter, context), - }), - ...(input.PublicChannelFilter != null && { - PublicChannelFilter: se_PublicChannelFilter(input.PublicChannelFilter, context), - }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.SinceCrawlDate != null && { SinceCrawlDate: input.SinceCrawlDate }), - ...(input.SlackEntityList != null && { SlackEntityList: se_SlackEntityList(input.SlackEntityList, context) }), - ...(input.TeamId != null && { TeamId: input.TeamId }), - ...(input.UseChangeLog != null && { UseChangeLog: input.UseChangeLog }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1SlackEntityList - */ -const se_SlackEntityList = (input: (SlackEntity | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SortingConfiguration - */ -const se_SortingConfiguration = (input: SortingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DocumentAttributeKey != null && { DocumentAttributeKey: input.DocumentAttributeKey }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1SpellCorrectionConfiguration - */ -const se_SpellCorrectionConfiguration = (input: SpellCorrectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.IncludeQuerySpellCheckSuggestions != null && { - IncludeQuerySpellCheckSuggestions: input.IncludeQuerySpellCheckSuggestions, - }), - }; -}; - -/** - * serializeAws_json1_1SqlConfiguration - */ -const se_SqlConfiguration = (input: SqlConfiguration, context: __SerdeContext): any => { - return { - ...(input.QueryIdentifiersEnclosingOption != null && { - QueryIdentifiersEnclosingOption: input.QueryIdentifiersEnclosingOption, - }), - }; -}; - -/** - * serializeAws_json1_1StartDataSourceSyncJobRequest - */ -const se_StartDataSourceSyncJobRequest = (input: StartDataSourceSyncJobRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; - -/** - * serializeAws_json1_1StopDataSourceSyncJobRequest - */ -const se_StopDataSourceSyncJobRequest = (input: StopDataSourceSyncJobRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SubmitFeedbackRequest - */ -const se_SubmitFeedbackRequest = (input: SubmitFeedbackRequest, context: __SerdeContext): any => { - return { - ...(input.ClickFeedbackItems != null && { - ClickFeedbackItems: se_ClickFeedbackList(input.ClickFeedbackItems, context), - }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.QueryId != null && { QueryId: input.QueryId }), - ...(input.RelevanceFeedbackItems != null && { - RelevanceFeedbackItems: se_RelevanceFeedbackList(input.RelevanceFeedbackItems, context), - }), - }; -}; - -/** - * serializeAws_json1_1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Template - */ -const se_Template = (input: __DocumentType, context: __SerdeContext): any => { - return input; -}; - -/** - * serializeAws_json1_1TemplateConfiguration - */ -const se_TemplateConfiguration = (input: TemplateConfiguration, context: __SerdeContext): any => { - return { - ...(input.Template != null && { Template: se_Template(input.Template, context) }), - }; -}; - -/** - * serializeAws_json1_1TimeRange - */ -const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAccessControlConfigurationRequest - */ -const se_UpdateAccessControlConfigurationRequest = ( - input: UpdateAccessControlConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccessControlList != null && { AccessControlList: se_PrincipalList(input.AccessControlList, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HierarchicalAccessControlList != null && { - HierarchicalAccessControlList: se_HierarchicalPrincipalList(input.HierarchicalAccessControlList, context), - }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateDataSourceRequest - */ -const se_UpdateDataSourceRequest = (input: UpdateDataSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: se_DataSourceConfiguration(input.Configuration, context) }), - ...(input.CustomDocumentEnrichmentConfiguration != null && { - CustomDocumentEnrichmentConfiguration: se_CustomDocumentEnrichmentConfiguration( - input.CustomDocumentEnrichmentConfiguration, - context - ), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.VpcConfiguration != null && { - VpcConfiguration: se_DataSourceVpcConfiguration(input.VpcConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateExperienceRequest - */ -const se_UpdateExperienceRequest = (input: UpdateExperienceRequest, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: se_ExperienceConfiguration(input.Configuration, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_json1_1UpdateFeaturedResultsSetRequest - */ -const se_UpdateFeaturedResultsSetRequest = (input: UpdateFeaturedResultsSetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FeaturedDocuments != null && { - FeaturedDocuments: se_FeaturedDocumentList(input.FeaturedDocuments, context), - }), - ...(input.FeaturedResultsSetId != null && { FeaturedResultsSetId: input.FeaturedResultsSetId }), - ...(input.FeaturedResultsSetName != null && { FeaturedResultsSetName: input.FeaturedResultsSetName }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.QueryTexts != null && { QueryTexts: se_QueryTextList(input.QueryTexts, context) }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_json1_1UpdateIndexRequest - */ -const se_UpdateIndexRequest = (input: UpdateIndexRequest, context: __SerdeContext): any => { - return { - ...(input.CapacityUnits != null && { CapacityUnits: se_CapacityUnitsConfiguration(input.CapacityUnits, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DocumentMetadataConfigurationUpdates != null && { - DocumentMetadataConfigurationUpdates: se_DocumentMetadataConfigurationList( - input.DocumentMetadataConfigurationUpdates, - context - ), - }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UserContextPolicy != null && { UserContextPolicy: input.UserContextPolicy }), - ...(input.UserGroupResolutionConfiguration != null && { - UserGroupResolutionConfiguration: se_UserGroupResolutionConfiguration( - input.UserGroupResolutionConfiguration, - context - ), - }), - ...(input.UserTokenConfigurations != null && { - UserTokenConfigurations: se_UserTokenConfigurationList(input.UserTokenConfigurations, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateQuerySuggestionsBlockListRequest - */ -const se_UpdateQuerySuggestionsBlockListRequest = ( - input: UpdateQuerySuggestionsBlockListRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SourceS3Path != null && { SourceS3Path: se_S3Path(input.SourceS3Path, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateQuerySuggestionsConfigRequest - */ -const se_UpdateQuerySuggestionsConfigRequest = ( - input: UpdateQuerySuggestionsConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.IncludeQueriesWithoutUserInformation != null && { - IncludeQueriesWithoutUserInformation: input.IncludeQueriesWithoutUserInformation, - }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.MinimumNumberOfQueryingUsers != null && { - MinimumNumberOfQueryingUsers: input.MinimumNumberOfQueryingUsers, - }), - ...(input.MinimumQueryCount != null && { MinimumQueryCount: input.MinimumQueryCount }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.QueryLogLookBackWindowInDays != null && { - QueryLogLookBackWindowInDays: input.QueryLogLookBackWindowInDays, - }), - }; -}; - -/** - * serializeAws_json1_1UpdateThesaurusRequest - */ -const se_UpdateThesaurusRequest = (input: UpdateThesaurusRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.IndexId != null && { IndexId: input.IndexId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SourceS3Path != null && { SourceS3Path: se_S3Path(input.SourceS3Path, context) }), - }; -}; - -/** - * serializeAws_json1_1Urls - */ -const se_Urls = (input: Urls, context: __SerdeContext): any => { - return { - ...(input.SeedUrlConfiguration != null && { - SeedUrlConfiguration: se_SeedUrlConfiguration(input.SeedUrlConfiguration, context), - }), - ...(input.SiteMapsConfiguration != null && { - SiteMapsConfiguration: se_SiteMapsConfiguration(input.SiteMapsConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1UserContext - */ -const se_UserContext = (input: UserContext, context: __SerdeContext): any => { - return { - ...(input.DataSourceGroups != null && { DataSourceGroups: se_DataSourceGroups(input.DataSourceGroups, context) }), - ...(input.Groups != null && { Groups: se_Groups(input.Groups, context) }), - ...(input.Token != null && { Token: input.Token }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; - -/** - * serializeAws_json1_1UserGroupResolutionConfiguration - */ -const se_UserGroupResolutionConfiguration = (input: UserGroupResolutionConfiguration, context: __SerdeContext): any => { - return { - ...(input.UserGroupResolutionMode != null && { UserGroupResolutionMode: input.UserGroupResolutionMode }), - }; -}; - -/** - * serializeAws_json1_1UserIdentityConfiguration - */ -const se_UserIdentityConfiguration = (input: UserIdentityConfiguration, context: __SerdeContext): any => { - return { - ...(input.IdentityAttributeName != null && { IdentityAttributeName: input.IdentityAttributeName }), - }; -}; - -/** - * serializeAws_json1_1UserTokenConfiguration - */ -const se_UserTokenConfiguration = (input: UserTokenConfiguration, context: __SerdeContext): any => { - return { - ...(input.JsonTokenTypeConfiguration != null && { - JsonTokenTypeConfiguration: se_JsonTokenTypeConfiguration(input.JsonTokenTypeConfiguration, context), - }), - ...(input.JwtTokenTypeConfiguration != null && { - JwtTokenTypeConfiguration: se_JwtTokenTypeConfiguration(input.JwtTokenTypeConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1UserTokenConfigurationList - */ -const se_UserTokenConfigurationList = (input: UserTokenConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UserTokenConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1ValueImportanceMap - */ -const se_ValueImportanceMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1WebCrawlerConfiguration - */ -const se_WebCrawlerConfiguration = (input: WebCrawlerConfiguration, context: __SerdeContext): any => { - return { - ...(input.AuthenticationConfiguration != null && { - AuthenticationConfiguration: se_AuthenticationConfiguration(input.AuthenticationConfiguration, context), - }), - ...(input.CrawlDepth != null && { CrawlDepth: input.CrawlDepth }), - ...(input.MaxContentSizePerPageInMegaBytes != null && { - MaxContentSizePerPageInMegaBytes: __serializeFloat(input.MaxContentSizePerPageInMegaBytes), - }), - ...(input.MaxLinksPerPage != null && { MaxLinksPerPage: input.MaxLinksPerPage }), - ...(input.MaxUrlsPerMinuteCrawlRate != null && { MaxUrlsPerMinuteCrawlRate: input.MaxUrlsPerMinuteCrawlRate }), - ...(input.ProxyConfiguration != null && { - ProxyConfiguration: se_ProxyConfiguration(input.ProxyConfiguration, context), - }), - ...(input.UrlExclusionPatterns != null && { - UrlExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.UrlExclusionPatterns, context), - }), - ...(input.UrlInclusionPatterns != null && { - UrlInclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.UrlInclusionPatterns, context), - }), - ...(input.Urls != null && { Urls: se_Urls(input.Urls, context) }), - }; -}; - -/** - * serializeAws_json1_1WorkDocsConfiguration - */ -const se_WorkDocsConfiguration = (input: WorkDocsConfiguration, context: __SerdeContext): any => { - return { - ...(input.CrawlComments != null && { CrawlComments: input.CrawlComments }), - ...(input.ExclusionPatterns != null && { - ExclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.ExclusionPatterns, context), - }), - ...(input.FieldMappings != null && { - FieldMappings: se_DataSourceToIndexFieldMappingList(input.FieldMappings, context), - }), - ...(input.InclusionPatterns != null && { - InclusionPatterns: se_DataSourceInclusionsExclusionsStrings(input.InclusionPatterns, context), - }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UseChangeLog != null && { UseChangeLog: input.UseChangeLog }), - }; -}; - -/** - * deserializeAws_json1_1AccessControlConfigurationSummary - */ -const de_AccessControlConfigurationSummary = ( - output: any, - context: __SerdeContext -): AccessControlConfigurationSummary => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1AccessControlConfigurationSummaryList - */ -const de_AccessControlConfigurationSummaryList = ( - output: any, - context: __SerdeContext -): AccessControlConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessControlConfigurationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AccessControlListConfiguration - */ -const de_AccessControlListConfiguration = (output: any, context: __SerdeContext): AccessControlListConfiguration => { - return { - KeyPath: __expectString(output.KeyPath), - } as any; -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AclConfiguration - */ -const de_AclConfiguration = (output: any, context: __SerdeContext): AclConfiguration => { - return { - AllowedGroupsColumnName: __expectString(output.AllowedGroupsColumnName), - } as any; -}; - -/** - * deserializeAws_json1_1AdditionalResultAttribute - */ -const de_AdditionalResultAttribute = (output: any, context: __SerdeContext): AdditionalResultAttribute => { - return { - Key: __expectString(output.Key), - Value: output.Value != null ? de_AdditionalResultAttributeValue(output.Value, context) : undefined, - ValueType: __expectString(output.ValueType), - } as any; -}; - -/** - * deserializeAws_json1_1AdditionalResultAttributeList - */ -const de_AdditionalResultAttributeList = (output: any, context: __SerdeContext): AdditionalResultAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalResultAttribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AdditionalResultAttributeValue - */ -const de_AdditionalResultAttributeValue = (output: any, context: __SerdeContext): AdditionalResultAttributeValue => { - return { - TextWithHighlightsValue: - output.TextWithHighlightsValue != null - ? de_TextWithHighlights(output.TextWithHighlightsValue, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AlfrescoConfiguration - */ -const de_AlfrescoConfiguration = (output: any, context: __SerdeContext): AlfrescoConfiguration => { - return { - BlogFieldMappings: - output.BlogFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.BlogFieldMappings, context) - : undefined, - CrawlComments: __expectBoolean(output.CrawlComments), - CrawlSystemFolders: __expectBoolean(output.CrawlSystemFolders), - DocumentLibraryFieldMappings: - output.DocumentLibraryFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.DocumentLibraryFieldMappings, context) - : undefined, - EntityFilter: output.EntityFilter != null ? de_EntityFilter(output.EntityFilter, context) : undefined, - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - SiteId: __expectString(output.SiteId), - SiteUrl: __expectString(output.SiteUrl), - SslCertificateS3Path: - output.SslCertificateS3Path != null ? de_S3Path(output.SslCertificateS3Path, context) : undefined, - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - WikiFieldMappings: - output.WikiFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.WikiFieldMappings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociateEntitiesToExperienceFailedEntityList - */ -const de_AssociateEntitiesToExperienceFailedEntityList = (output: any, context: __SerdeContext): FailedEntity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedEntity(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociateEntitiesToExperienceResponse - */ -const de_AssociateEntitiesToExperienceResponse = ( - output: any, - context: __SerdeContext -): AssociateEntitiesToExperienceResponse => { - return { - FailedEntityList: - output.FailedEntityList != null - ? de_AssociateEntitiesToExperienceFailedEntityList(output.FailedEntityList, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociatePersonasToEntitiesResponse - */ -const de_AssociatePersonasToEntitiesResponse = ( - output: any, - context: __SerdeContext -): AssociatePersonasToEntitiesResponse => { - return { - FailedEntityList: - output.FailedEntityList != null ? de_FailedEntityList(output.FailedEntityList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AuthenticationConfiguration - */ -const de_AuthenticationConfiguration = (output: any, context: __SerdeContext): AuthenticationConfiguration => { - return { - BasicAuthentication: - output.BasicAuthentication != null - ? de_BasicAuthenticationConfigurationList(output.BasicAuthentication, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BasicAuthenticationConfiguration - */ -const de_BasicAuthenticationConfiguration = ( - output: any, - context: __SerdeContext -): BasicAuthenticationConfiguration => { - return { - Credentials: __expectString(output.Credentials), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; - -/** - * deserializeAws_json1_1BasicAuthenticationConfigurationList - */ -const de_BasicAuthenticationConfigurationList = ( - output: any, - context: __SerdeContext -): BasicAuthenticationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BasicAuthenticationConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchDeleteDocumentResponse - */ -const de_BatchDeleteDocumentResponse = (output: any, context: __SerdeContext): BatchDeleteDocumentResponse => { - return { - FailedDocuments: - output.FailedDocuments != null - ? de_BatchDeleteDocumentResponseFailedDocuments(output.FailedDocuments, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteDocumentResponseFailedDocument - */ -const de_BatchDeleteDocumentResponseFailedDocument = ( - output: any, - context: __SerdeContext -): BatchDeleteDocumentResponseFailedDocument => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteDocumentResponseFailedDocuments - */ -const de_BatchDeleteDocumentResponseFailedDocuments = ( - output: any, - context: __SerdeContext -): BatchDeleteDocumentResponseFailedDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteDocumentResponseFailedDocument(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchDeleteFeaturedResultsSetError - */ -const de_BatchDeleteFeaturedResultsSetError = ( - output: any, - context: __SerdeContext -): BatchDeleteFeaturedResultsSetError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDeleteFeaturedResultsSetErrors - */ -const de_BatchDeleteFeaturedResultsSetErrors = ( - output: any, - context: __SerdeContext -): BatchDeleteFeaturedResultsSetError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteFeaturedResultsSetError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchDeleteFeaturedResultsSetResponse - */ -const de_BatchDeleteFeaturedResultsSetResponse = ( - output: any, - context: __SerdeContext -): BatchDeleteFeaturedResultsSetResponse => { - return { - Errors: output.Errors != null ? de_BatchDeleteFeaturedResultsSetErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDocumentStatusResponse - */ -const de_BatchGetDocumentStatusResponse = (output: any, context: __SerdeContext): BatchGetDocumentStatusResponse => { - return { - DocumentStatusList: - output.DocumentStatusList != null ? de_DocumentStatusList(output.DocumentStatusList, context) : undefined, - Errors: output.Errors != null ? de_BatchGetDocumentStatusResponseErrors(output.Errors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDocumentStatusResponseError - */ -const de_BatchGetDocumentStatusResponseError = ( - output: any, - context: __SerdeContext -): BatchGetDocumentStatusResponseError => { - return { - DocumentId: __expectString(output.DocumentId), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1BatchGetDocumentStatusResponseErrors - */ -const de_BatchGetDocumentStatusResponseErrors = ( - output: any, - context: __SerdeContext -): BatchGetDocumentStatusResponseError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetDocumentStatusResponseError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BatchPutDocumentResponse - */ -const de_BatchPutDocumentResponse = (output: any, context: __SerdeContext): BatchPutDocumentResponse => { - return { - FailedDocuments: - output.FailedDocuments != null - ? de_BatchPutDocumentResponseFailedDocuments(output.FailedDocuments, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchPutDocumentResponseFailedDocument - */ -const de_BatchPutDocumentResponseFailedDocument = ( - output: any, - context: __SerdeContext -): BatchPutDocumentResponseFailedDocument => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1BatchPutDocumentResponseFailedDocuments - */ -const de_BatchPutDocumentResponseFailedDocuments = ( - output: any, - context: __SerdeContext -): BatchPutDocumentResponseFailedDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutDocumentResponseFailedDocument(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BoxConfiguration - */ -const de_BoxConfiguration = (output: any, context: __SerdeContext): BoxConfiguration => { - return { - CommentFieldMappings: - output.CommentFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.CommentFieldMappings, context) - : undefined, - CrawlComments: __expectBoolean(output.CrawlComments), - CrawlTasks: __expectBoolean(output.CrawlTasks), - CrawlWebLinks: __expectBoolean(output.CrawlWebLinks), - EnterpriseId: __expectString(output.EnterpriseId), - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FileFieldMappings: - output.FileFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.FileFieldMappings, context) - : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - TaskFieldMappings: - output.TaskFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.TaskFieldMappings, context) - : undefined, - UseChangeLog: __expectBoolean(output.UseChangeLog), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - WebLinkFieldMappings: - output.WebLinkFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.WebLinkFieldMappings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CapacityUnitsConfiguration - */ -const de_CapacityUnitsConfiguration = (output: any, context: __SerdeContext): CapacityUnitsConfiguration => { - return { - QueryCapacityUnits: __expectInt32(output.QueryCapacityUnits), - StorageCapacityUnits: __expectInt32(output.StorageCapacityUnits), - } as any; -}; - -/** - * deserializeAws_json1_1ChangeDetectingColumns - */ -const de_ChangeDetectingColumns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ColumnConfiguration - */ -const de_ColumnConfiguration = (output: any, context: __SerdeContext): ColumnConfiguration => { - return { - ChangeDetectingColumns: - output.ChangeDetectingColumns != null - ? de_ChangeDetectingColumns(output.ChangeDetectingColumns, context) - : undefined, - DocumentDataColumnName: __expectString(output.DocumentDataColumnName), - DocumentIdColumnName: __expectString(output.DocumentIdColumnName), - DocumentTitleColumnName: __expectString(output.DocumentTitleColumnName), - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConflictingItem - */ -const de_ConflictingItem = (output: any, context: __SerdeContext): ConflictingItem => { - return { - QueryText: __expectString(output.QueryText), - SetId: __expectString(output.SetId), - SetName: __expectString(output.SetName), - } as any; -}; - -/** - * deserializeAws_json1_1ConflictingItems - */ -const de_ConflictingItems = (output: any, context: __SerdeContext): ConflictingItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConflictingItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfluenceAttachmentConfiguration - */ -const de_ConfluenceAttachmentConfiguration = ( - output: any, - context: __SerdeContext -): ConfluenceAttachmentConfiguration => { - return { - AttachmentFieldMappings: - output.AttachmentFieldMappings != null - ? de_ConfluenceAttachmentFieldMappingsList(output.AttachmentFieldMappings, context) - : undefined, - CrawlAttachments: __expectBoolean(output.CrawlAttachments), - } as any; -}; - -/** - * deserializeAws_json1_1ConfluenceAttachmentFieldMappingsList - */ -const de_ConfluenceAttachmentFieldMappingsList = ( - output: any, - context: __SerdeContext -): ConfluenceAttachmentToIndexFieldMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfluenceAttachmentToIndexFieldMapping(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfluenceAttachmentToIndexFieldMapping - */ -const de_ConfluenceAttachmentToIndexFieldMapping = ( - output: any, - context: __SerdeContext -): ConfluenceAttachmentToIndexFieldMapping => { - return { - DataSourceFieldName: __expectString(output.DataSourceFieldName), - DateFieldFormat: __expectString(output.DateFieldFormat), - IndexFieldName: __expectString(output.IndexFieldName), - } as any; -}; - -/** - * deserializeAws_json1_1ConfluenceBlogConfiguration - */ -const de_ConfluenceBlogConfiguration = (output: any, context: __SerdeContext): ConfluenceBlogConfiguration => { - return { - BlogFieldMappings: - output.BlogFieldMappings != null - ? de_ConfluenceBlogFieldMappingsList(output.BlogFieldMappings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfluenceBlogFieldMappingsList - */ -const de_ConfluenceBlogFieldMappingsList = ( - output: any, - context: __SerdeContext -): ConfluenceBlogToIndexFieldMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfluenceBlogToIndexFieldMapping(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfluenceBlogToIndexFieldMapping - */ -const de_ConfluenceBlogToIndexFieldMapping = ( - output: any, - context: __SerdeContext -): ConfluenceBlogToIndexFieldMapping => { - return { - DataSourceFieldName: __expectString(output.DataSourceFieldName), - DateFieldFormat: __expectString(output.DateFieldFormat), - IndexFieldName: __expectString(output.IndexFieldName), - } as any; -}; - -/** - * deserializeAws_json1_1ConfluenceConfiguration - */ -const de_ConfluenceConfiguration = (output: any, context: __SerdeContext): ConfluenceConfiguration => { - return { - AttachmentConfiguration: - output.AttachmentConfiguration != null - ? de_ConfluenceAttachmentConfiguration(output.AttachmentConfiguration, context) - : undefined, - AuthenticationType: __expectString(output.AuthenticationType), - BlogConfiguration: - output.BlogConfiguration != null ? de_ConfluenceBlogConfiguration(output.BlogConfiguration, context) : undefined, - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - PageConfiguration: - output.PageConfiguration != null ? de_ConfluencePageConfiguration(output.PageConfiguration, context) : undefined, - ProxyConfiguration: - output.ProxyConfiguration != null ? de_ProxyConfiguration(output.ProxyConfiguration, context) : undefined, - SecretArn: __expectString(output.SecretArn), - ServerUrl: __expectString(output.ServerUrl), - SpaceConfiguration: - output.SpaceConfiguration != null - ? de_ConfluenceSpaceConfiguration(output.SpaceConfiguration, context) - : undefined, - Version: __expectString(output.Version), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfluencePageConfiguration - */ -const de_ConfluencePageConfiguration = (output: any, context: __SerdeContext): ConfluencePageConfiguration => { - return { - PageFieldMappings: - output.PageFieldMappings != null - ? de_ConfluencePageFieldMappingsList(output.PageFieldMappings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfluencePageFieldMappingsList - */ -const de_ConfluencePageFieldMappingsList = ( - output: any, - context: __SerdeContext -): ConfluencePageToIndexFieldMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfluencePageToIndexFieldMapping(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfluencePageToIndexFieldMapping - */ -const de_ConfluencePageToIndexFieldMapping = ( - output: any, - context: __SerdeContext -): ConfluencePageToIndexFieldMapping => { - return { - DataSourceFieldName: __expectString(output.DataSourceFieldName), - DateFieldFormat: __expectString(output.DateFieldFormat), - IndexFieldName: __expectString(output.IndexFieldName), - } as any; -}; - -/** - * deserializeAws_json1_1ConfluenceSpaceConfiguration - */ -const de_ConfluenceSpaceConfiguration = (output: any, context: __SerdeContext): ConfluenceSpaceConfiguration => { - return { - CrawlArchivedSpaces: __expectBoolean(output.CrawlArchivedSpaces), - CrawlPersonalSpaces: __expectBoolean(output.CrawlPersonalSpaces), - ExcludeSpaces: output.ExcludeSpaces != null ? de_ConfluenceSpaceList(output.ExcludeSpaces, context) : undefined, - IncludeSpaces: output.IncludeSpaces != null ? de_ConfluenceSpaceList(output.IncludeSpaces, context) : undefined, - SpaceFieldMappings: - output.SpaceFieldMappings != null - ? de_ConfluenceSpaceFieldMappingsList(output.SpaceFieldMappings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ConfluenceSpaceFieldMappingsList - */ -const de_ConfluenceSpaceFieldMappingsList = ( - output: any, - context: __SerdeContext -): ConfluenceSpaceToIndexFieldMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfluenceSpaceToIndexFieldMapping(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfluenceSpaceList - */ -const de_ConfluenceSpaceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConfluenceSpaceToIndexFieldMapping - */ -const de_ConfluenceSpaceToIndexFieldMapping = ( - output: any, - context: __SerdeContext -): ConfluenceSpaceToIndexFieldMapping => { - return { - DataSourceFieldName: __expectString(output.DataSourceFieldName), - DateFieldFormat: __expectString(output.DateFieldFormat), - IndexFieldName: __expectString(output.IndexFieldName), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionConfiguration - */ -const de_ConnectionConfiguration = (output: any, context: __SerdeContext): ConnectionConfiguration => { - return { - DatabaseHost: __expectString(output.DatabaseHost), - DatabaseName: __expectString(output.DatabaseName), - DatabasePort: __expectInt32(output.DatabasePort), - SecretArn: __expectString(output.SecretArn), - TableName: __expectString(output.TableName), - } as any; -}; - -/** - * deserializeAws_json1_1ContentSourceConfiguration - */ -const de_ContentSourceConfiguration = (output: any, context: __SerdeContext): ContentSourceConfiguration => { - return { - DataSourceIds: output.DataSourceIds != null ? de_DataSourceIdList(output.DataSourceIds, context) : undefined, - DirectPutContent: __expectBoolean(output.DirectPutContent), - FaqIds: output.FaqIds != null ? de_FaqIdsList(output.FaqIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Correction - */ -const de_Correction = (output: any, context: __SerdeContext): Correction => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - CorrectedTerm: __expectString(output.CorrectedTerm), - EndOffset: __expectInt32(output.EndOffset), - Term: __expectString(output.Term), - } as any; -}; - -/** - * deserializeAws_json1_1CorrectionList - */ -const de_CorrectionList = (output: any, context: __SerdeContext): Correction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Correction(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateAccessControlConfigurationResponse - */ -const de_CreateAccessControlConfigurationResponse = ( - output: any, - context: __SerdeContext -): CreateAccessControlConfigurationResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDataSourceResponse - */ -const de_CreateDataSourceResponse = (output: any, context: __SerdeContext): CreateDataSourceResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CreateExperienceResponse - */ -const de_CreateExperienceResponse = (output: any, context: __SerdeContext): CreateExperienceResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CreateFaqResponse - */ -const de_CreateFaqResponse = (output: any, context: __SerdeContext): CreateFaqResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CreateFeaturedResultsSetResponse - */ -const de_CreateFeaturedResultsSetResponse = ( - output: any, - context: __SerdeContext -): CreateFeaturedResultsSetResponse => { - return { - FeaturedResultsSet: - output.FeaturedResultsSet != null ? de_FeaturedResultsSet(output.FeaturedResultsSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateIndexResponse - */ -const de_CreateIndexResponse = (output: any, context: __SerdeContext): CreateIndexResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CreateQuerySuggestionsBlockListResponse - */ -const de_CreateQuerySuggestionsBlockListResponse = ( - output: any, - context: __SerdeContext -): CreateQuerySuggestionsBlockListResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CreateThesaurusResponse - */ -const de_CreateThesaurusResponse = (output: any, context: __SerdeContext): CreateThesaurusResponse => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1CustomDocumentEnrichmentConfiguration - */ -const de_CustomDocumentEnrichmentConfiguration = ( - output: any, - context: __SerdeContext -): CustomDocumentEnrichmentConfiguration => { - return { - InlineConfigurations: - output.InlineConfigurations != null - ? de_InlineCustomDocumentEnrichmentConfigurationList(output.InlineConfigurations, context) - : undefined, - PostExtractionHookConfiguration: - output.PostExtractionHookConfiguration != null - ? de_HookConfiguration(output.PostExtractionHookConfiguration, context) - : undefined, - PreExtractionHookConfiguration: - output.PreExtractionHookConfiguration != null - ? de_HookConfiguration(output.PreExtractionHookConfiguration, context) - : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DatabaseConfiguration - */ -const de_DatabaseConfiguration = (output: any, context: __SerdeContext): DatabaseConfiguration => { - return { - AclConfiguration: - output.AclConfiguration != null ? de_AclConfiguration(output.AclConfiguration, context) : undefined, - ColumnConfiguration: - output.ColumnConfiguration != null ? de_ColumnConfiguration(output.ColumnConfiguration, context) : undefined, - ConnectionConfiguration: - output.ConnectionConfiguration != null - ? de_ConnectionConfiguration(output.ConnectionConfiguration, context) - : undefined, - DatabaseEngineType: __expectString(output.DatabaseEngineType), - SqlConfiguration: - output.SqlConfiguration != null ? de_SqlConfiguration(output.SqlConfiguration, context) : undefined, - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataSourceConfiguration - */ -const de_DataSourceConfiguration = (output: any, context: __SerdeContext): DataSourceConfiguration => { - return { - AlfrescoConfiguration: - output.AlfrescoConfiguration != null - ? de_AlfrescoConfiguration(output.AlfrescoConfiguration, context) - : undefined, - BoxConfiguration: - output.BoxConfiguration != null ? de_BoxConfiguration(output.BoxConfiguration, context) : undefined, - ConfluenceConfiguration: - output.ConfluenceConfiguration != null - ? de_ConfluenceConfiguration(output.ConfluenceConfiguration, context) - : undefined, - DatabaseConfiguration: - output.DatabaseConfiguration != null - ? de_DatabaseConfiguration(output.DatabaseConfiguration, context) - : undefined, - FsxConfiguration: - output.FsxConfiguration != null ? de_FsxConfiguration(output.FsxConfiguration, context) : undefined, - GitHubConfiguration: - output.GitHubConfiguration != null ? de_GitHubConfiguration(output.GitHubConfiguration, context) : undefined, - GoogleDriveConfiguration: - output.GoogleDriveConfiguration != null - ? de_GoogleDriveConfiguration(output.GoogleDriveConfiguration, context) - : undefined, - JiraConfiguration: - output.JiraConfiguration != null ? de_JiraConfiguration(output.JiraConfiguration, context) : undefined, - OneDriveConfiguration: - output.OneDriveConfiguration != null - ? de_OneDriveConfiguration(output.OneDriveConfiguration, context) - : undefined, - QuipConfiguration: - output.QuipConfiguration != null ? de_QuipConfiguration(output.QuipConfiguration, context) : undefined, - S3Configuration: - output.S3Configuration != null ? de_S3DataSourceConfiguration(output.S3Configuration, context) : undefined, - SalesforceConfiguration: - output.SalesforceConfiguration != null - ? de_SalesforceConfiguration(output.SalesforceConfiguration, context) - : undefined, - ServiceNowConfiguration: - output.ServiceNowConfiguration != null - ? de_ServiceNowConfiguration(output.ServiceNowConfiguration, context) - : undefined, - SharePointConfiguration: - output.SharePointConfiguration != null - ? de_SharePointConfiguration(output.SharePointConfiguration, context) - : undefined, - SlackConfiguration: - output.SlackConfiguration != null ? de_SlackConfiguration(output.SlackConfiguration, context) : undefined, - TemplateConfiguration: - output.TemplateConfiguration != null - ? de_TemplateConfiguration(output.TemplateConfiguration, context) - : undefined, - WebCrawlerConfiguration: - output.WebCrawlerConfiguration != null - ? de_WebCrawlerConfiguration(output.WebCrawlerConfiguration, context) - : undefined, - WorkDocsConfiguration: - output.WorkDocsConfiguration != null - ? de_WorkDocsConfiguration(output.WorkDocsConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataSourceIdList - */ -const de_DataSourceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataSourceInclusionsExclusionsStrings - */ -const de_DataSourceInclusionsExclusionsStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataSourceSummary - */ -const de_DataSourceSummary = (output: any, context: __SerdeContext): DataSourceSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Id: __expectString(output.Id), - LanguageCode: __expectString(output.LanguageCode), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataSourceSummaryList - */ -const de_DataSourceSummaryList = (output: any, context: __SerdeContext): DataSourceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSourceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataSourceSyncJob - */ -const de_DataSourceSyncJob = (output: any, context: __SerdeContext): DataSourceSyncJob => { - return { - DataSourceErrorCode: __expectString(output.DataSourceErrorCode), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ExecutionId: __expectString(output.ExecutionId), - Metrics: output.Metrics != null ? de_DataSourceSyncJobMetrics(output.Metrics, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DataSourceSyncJobHistoryList - */ -const de_DataSourceSyncJobHistoryList = (output: any, context: __SerdeContext): DataSourceSyncJob[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSourceSyncJob(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataSourceSyncJobMetrics - */ -const de_DataSourceSyncJobMetrics = (output: any, context: __SerdeContext): DataSourceSyncJobMetrics => { - return { - DocumentsAdded: __expectString(output.DocumentsAdded), - DocumentsDeleted: __expectString(output.DocumentsDeleted), - DocumentsFailed: __expectString(output.DocumentsFailed), - DocumentsModified: __expectString(output.DocumentsModified), - DocumentsScanned: __expectString(output.DocumentsScanned), - } as any; -}; - -/** - * deserializeAws_json1_1DataSourceToIndexFieldMapping - */ -const de_DataSourceToIndexFieldMapping = (output: any, context: __SerdeContext): DataSourceToIndexFieldMapping => { - return { - DataSourceFieldName: __expectString(output.DataSourceFieldName), - DateFieldFormat: __expectString(output.DateFieldFormat), - IndexFieldName: __expectString(output.IndexFieldName), - } as any; -}; - -/** - * deserializeAws_json1_1DataSourceToIndexFieldMappingList - */ -const de_DataSourceToIndexFieldMappingList = ( - output: any, - context: __SerdeContext -): DataSourceToIndexFieldMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSourceToIndexFieldMapping(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataSourceVpcConfiguration - */ -const de_DataSourceVpcConfiguration = (output: any, context: __SerdeContext): DataSourceVpcConfiguration => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIdList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIdList(output.SubnetIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteAccessControlConfigurationResponse - */ -const de_DeleteAccessControlConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteAccessControlConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteExperienceResponse - */ -const de_DeleteExperienceResponse = (output: any, context: __SerdeContext): DeleteExperienceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeAccessControlConfigurationResponse - */ -const de_DescribeAccessControlConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeAccessControlConfigurationResponse => { - return { - AccessControlList: - output.AccessControlList != null ? de_PrincipalList(output.AccessControlList, context) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - HierarchicalAccessControlList: - output.HierarchicalAccessControlList != null - ? de_HierarchicalPrincipalList(output.HierarchicalAccessControlList, context) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDataSourceResponse - */ -const de_DescribeDataSourceResponse = (output: any, context: __SerdeContext): DescribeDataSourceResponse => { - return { - Configuration: output.Configuration != null ? de_DataSourceConfiguration(output.Configuration, context) : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CustomDocumentEnrichmentConfiguration: - output.CustomDocumentEnrichmentConfiguration != null - ? de_CustomDocumentEnrichmentConfiguration(output.CustomDocumentEnrichmentConfiguration, context) - : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - IndexId: __expectString(output.IndexId), - LanguageCode: __expectString(output.LanguageCode), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - Schedule: __expectString(output.Schedule), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeExperienceResponse - */ -const de_DescribeExperienceResponse = (output: any, context: __SerdeContext): DescribeExperienceResponse => { - return { - Configuration: output.Configuration != null ? de_ExperienceConfiguration(output.Configuration, context) : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - Endpoints: output.Endpoints != null ? de_ExperienceEndpoints(output.Endpoints, context) : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - IndexId: __expectString(output.IndexId), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFaqResponse - */ -const de_DescribeFaqResponse = (output: any, context: __SerdeContext): DescribeFaqResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - FileFormat: __expectString(output.FileFormat), - Id: __expectString(output.Id), - IndexId: __expectString(output.IndexId), - LanguageCode: __expectString(output.LanguageCode), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - S3Path: output.S3Path != null ? de_S3Path(output.S3Path, context) : undefined, - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFeaturedResultsSetResponse - */ -const de_DescribeFeaturedResultsSetResponse = ( - output: any, - context: __SerdeContext -): DescribeFeaturedResultsSetResponse => { - return { - CreationTimestamp: __expectLong(output.CreationTimestamp), - Description: __expectString(output.Description), - FeaturedDocumentsMissing: - output.FeaturedDocumentsMissing != null - ? de_FeaturedDocumentMissingList(output.FeaturedDocumentsMissing, context) - : undefined, - FeaturedDocumentsWithMetadata: - output.FeaturedDocumentsWithMetadata != null - ? de_FeaturedDocumentWithMetadataList(output.FeaturedDocumentsWithMetadata, context) - : undefined, - FeaturedResultsSetId: __expectString(output.FeaturedResultsSetId), - FeaturedResultsSetName: __expectString(output.FeaturedResultsSetName), - LastUpdatedTimestamp: __expectLong(output.LastUpdatedTimestamp), - QueryTexts: output.QueryTexts != null ? de_QueryTextList(output.QueryTexts, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeIndexResponse - */ -const de_DescribeIndexResponse = (output: any, context: __SerdeContext): DescribeIndexResponse => { - return { - CapacityUnits: - output.CapacityUnits != null ? de_CapacityUnitsConfiguration(output.CapacityUnits, context) : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - DocumentMetadataConfigurations: - output.DocumentMetadataConfigurations != null - ? de_DocumentMetadataConfigurationList(output.DocumentMetadataConfigurations, context) - : undefined, - Edition: __expectString(output.Edition), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - IndexStatistics: output.IndexStatistics != null ? de_IndexStatistics(output.IndexStatistics, context) : undefined, - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - ServerSideEncryptionConfiguration: - output.ServerSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) - : undefined, - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - UserContextPolicy: __expectString(output.UserContextPolicy), - UserGroupResolutionConfiguration: - output.UserGroupResolutionConfiguration != null - ? de_UserGroupResolutionConfiguration(output.UserGroupResolutionConfiguration, context) - : undefined, - UserTokenConfigurations: - output.UserTokenConfigurations != null - ? de_UserTokenConfigurationList(output.UserTokenConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePrincipalMappingResponse - */ -const de_DescribePrincipalMappingResponse = ( - output: any, - context: __SerdeContext -): DescribePrincipalMappingResponse => { - return { - DataSourceId: __expectString(output.DataSourceId), - GroupId: __expectString(output.GroupId), - GroupOrderingIdSummaries: - output.GroupOrderingIdSummaries != null - ? de_GroupOrderingIdSummaries(output.GroupOrderingIdSummaries, context) - : undefined, - IndexId: __expectString(output.IndexId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeQuerySuggestionsBlockListResponse - */ -const de_DescribeQuerySuggestionsBlockListResponse = ( - output: any, - context: __SerdeContext -): DescribeQuerySuggestionsBlockListResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - FileSizeBytes: __expectLong(output.FileSizeBytes), - Id: __expectString(output.Id), - IndexId: __expectString(output.IndexId), - ItemCount: __expectInt32(output.ItemCount), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - SourceS3Path: output.SourceS3Path != null ? de_S3Path(output.SourceS3Path, context) : undefined, - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeQuerySuggestionsConfigResponse - */ -const de_DescribeQuerySuggestionsConfigResponse = ( - output: any, - context: __SerdeContext -): DescribeQuerySuggestionsConfigResponse => { - return { - IncludeQueriesWithoutUserInformation: __expectBoolean(output.IncludeQueriesWithoutUserInformation), - LastClearTime: - output.LastClearTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastClearTime))) - : undefined, - LastSuggestionsBuildTime: - output.LastSuggestionsBuildTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuggestionsBuildTime))) - : undefined, - MinimumNumberOfQueryingUsers: __expectInt32(output.MinimumNumberOfQueryingUsers), - MinimumQueryCount: __expectInt32(output.MinimumQueryCount), - Mode: __expectString(output.Mode), - QueryLogLookBackWindowInDays: __expectInt32(output.QueryLogLookBackWindowInDays), - Status: __expectString(output.Status), - TotalSuggestionsCount: __expectInt32(output.TotalSuggestionsCount), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeThesaurusResponse - */ -const de_DescribeThesaurusResponse = (output: any, context: __SerdeContext): DescribeThesaurusResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - ErrorMessage: __expectString(output.ErrorMessage), - FileSizeBytes: __expectLong(output.FileSizeBytes), - Id: __expectString(output.Id), - IndexId: __expectString(output.IndexId), - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - SourceS3Path: output.SourceS3Path != null ? de_S3Path(output.SourceS3Path, context) : undefined, - Status: __expectString(output.Status), - SynonymRuleCount: __expectLong(output.SynonymRuleCount), - TermCount: __expectLong(output.TermCount), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisassociateEntitiesFromExperienceResponse - */ -const de_DisassociateEntitiesFromExperienceResponse = ( - output: any, - context: __SerdeContext -): DisassociateEntitiesFromExperienceResponse => { - return { - FailedEntityList: - output.FailedEntityList != null ? de_FailedEntityList(output.FailedEntityList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisassociatePersonasFromEntitiesResponse - */ -const de_DisassociatePersonasFromEntitiesResponse = ( - output: any, - context: __SerdeContext -): DisassociatePersonasFromEntitiesResponse => { - return { - FailedEntityList: - output.FailedEntityList != null ? de_FailedEntityList(output.FailedEntityList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DocumentAttribute - */ -const de_DocumentAttribute = (output: any, context: __SerdeContext): DocumentAttribute => { - return { - Key: __expectString(output.Key), - Value: output.Value != null ? de_DocumentAttributeValue(output.Value, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DocumentAttributeCondition - */ -const de_DocumentAttributeCondition = (output: any, context: __SerdeContext): DocumentAttributeCondition => { - return { - ConditionDocumentAttributeKey: __expectString(output.ConditionDocumentAttributeKey), - ConditionOnValue: - output.ConditionOnValue != null ? de_DocumentAttributeValue(output.ConditionOnValue, context) : undefined, - Operator: __expectString(output.Operator), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentAttributeList - */ -const de_DocumentAttributeList = (output: any, context: __SerdeContext): DocumentAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentAttribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentAttributeStringListValue - */ -const de_DocumentAttributeStringListValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentAttributeTarget - */ -const de_DocumentAttributeTarget = (output: any, context: __SerdeContext): DocumentAttributeTarget => { - return { - TargetDocumentAttributeKey: __expectString(output.TargetDocumentAttributeKey), - TargetDocumentAttributeValue: - output.TargetDocumentAttributeValue != null - ? de_DocumentAttributeValue(output.TargetDocumentAttributeValue, context) - : undefined, - TargetDocumentAttributeValueDeletion: __expectBoolean(output.TargetDocumentAttributeValueDeletion), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentAttributeValue - */ -const de_DocumentAttributeValue = (output: any, context: __SerdeContext): DocumentAttributeValue => { - return { - DateValue: - output.DateValue != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateValue))) : undefined, - LongValue: __expectLong(output.LongValue), - StringListValue: - output.StringListValue != null ? de_DocumentAttributeStringListValue(output.StringListValue, context) : undefined, - StringValue: __expectString(output.StringValue), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentAttributeValueCountPair - */ -const de_DocumentAttributeValueCountPair = (output: any, context: __SerdeContext): DocumentAttributeValueCountPair => { - return { - Count: __expectInt32(output.Count), - DocumentAttributeValue: - output.DocumentAttributeValue != null - ? de_DocumentAttributeValue(output.DocumentAttributeValue, context) - : undefined, - FacetResults: output.FacetResults != null ? de_FacetResultList(output.FacetResults, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DocumentAttributeValueCountPairList - */ -const de_DocumentAttributeValueCountPairList = ( - output: any, - context: __SerdeContext -): DocumentAttributeValueCountPair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentAttributeValueCountPair(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentMetadataConfiguration - */ -const de_DocumentMetadataConfiguration = (output: any, context: __SerdeContext): DocumentMetadataConfiguration => { - return { - Name: __expectString(output.Name), - Relevance: output.Relevance != null ? de_Relevance(output.Relevance, context) : undefined, - Search: output.Search != null ? de_Search(output.Search, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentMetadataConfigurationList - */ -const de_DocumentMetadataConfigurationList = ( - output: any, - context: __SerdeContext -): DocumentMetadataConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentMetadataConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentsMetadataConfiguration - */ -const de_DocumentsMetadataConfiguration = (output: any, context: __SerdeContext): DocumentsMetadataConfiguration => { - return { - S3Prefix: __expectString(output.S3Prefix), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentStatusList - */ -const de_DocumentStatusList = (output: any, context: __SerdeContext): Status[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Status(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EntityDisplayData - */ -const de_EntityDisplayData = (output: any, context: __SerdeContext): EntityDisplayData => { - return { - FirstName: __expectString(output.FirstName), - GroupName: __expectString(output.GroupName), - IdentifiedUserName: __expectString(output.IdentifiedUserName), - LastName: __expectString(output.LastName), - UserName: __expectString(output.UserName), - } as any; -}; - -/** - * deserializeAws_json1_1EntityFilter - */ -const de_EntityFilter = (output: any, context: __SerdeContext): (AlfrescoEntity | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExcludeMimeTypesList - */ -const de_ExcludeMimeTypesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExcludeSharedDrivesList - */ -const de_ExcludeSharedDrivesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExcludeUserAccountsList - */ -const de_ExcludeUserAccountsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExperienceConfiguration - */ -const de_ExperienceConfiguration = (output: any, context: __SerdeContext): ExperienceConfiguration => { - return { - ContentSourceConfiguration: - output.ContentSourceConfiguration != null - ? de_ContentSourceConfiguration(output.ContentSourceConfiguration, context) - : undefined, - UserIdentityConfiguration: - output.UserIdentityConfiguration != null - ? de_UserIdentityConfiguration(output.UserIdentityConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExperienceEndpoint - */ -const de_ExperienceEndpoint = (output: any, context: __SerdeContext): ExperienceEndpoint => { - return { - Endpoint: __expectString(output.Endpoint), - EndpointType: __expectString(output.EndpointType), - } as any; -}; - -/** - * deserializeAws_json1_1ExperienceEndpoints - */ -const de_ExperienceEndpoints = (output: any, context: __SerdeContext): ExperienceEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperienceEndpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExperienceEntitiesSummary - */ -const de_ExperienceEntitiesSummary = (output: any, context: __SerdeContext): ExperienceEntitiesSummary => { - return { - DisplayData: output.DisplayData != null ? de_EntityDisplayData(output.DisplayData, context) : undefined, - EntityId: __expectString(output.EntityId), - EntityType: __expectString(output.EntityType), - } as any; -}; - -/** - * deserializeAws_json1_1ExperienceEntitiesSummaryList - */ -const de_ExperienceEntitiesSummaryList = (output: any, context: __SerdeContext): ExperienceEntitiesSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperienceEntitiesSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExperiencesSummary - */ -const de_ExperiencesSummary = (output: any, context: __SerdeContext): ExperiencesSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Endpoints: output.Endpoints != null ? de_ExperienceEndpoints(output.Endpoints, context) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ExperiencesSummaryList - */ -const de_ExperiencesSummaryList = (output: any, context: __SerdeContext): ExperiencesSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperiencesSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FacetResult - */ -const de_FacetResult = (output: any, context: __SerdeContext): FacetResult => { - return { - DocumentAttributeKey: __expectString(output.DocumentAttributeKey), - DocumentAttributeValueCountPairs: - output.DocumentAttributeValueCountPairs != null - ? de_DocumentAttributeValueCountPairList(output.DocumentAttributeValueCountPairs, context) - : undefined, - DocumentAttributeValueType: __expectString(output.DocumentAttributeValueType), - } as any; -}; - -/** - * deserializeAws_json1_1FacetResultList - */ -const de_FacetResultList = (output: any, context: __SerdeContext): FacetResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FacetResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailedEntity - */ -const de_FailedEntity = (output: any, context: __SerdeContext): FailedEntity => { - return { - EntityId: __expectString(output.EntityId), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; - -/** - * deserializeAws_json1_1FailedEntityList - */ -const de_FailedEntityList = (output: any, context: __SerdeContext): FailedEntity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedEntity(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FaqIdsList - */ -const de_FaqIdsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FaqStatistics - */ -const de_FaqStatistics = (output: any, context: __SerdeContext): FaqStatistics => { - return { - IndexedQuestionAnswersCount: __expectInt32(output.IndexedQuestionAnswersCount), - } as any; -}; - -/** - * deserializeAws_json1_1FaqSummary - */ -const de_FaqSummary = (output: any, context: __SerdeContext): FaqSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - FileFormat: __expectString(output.FileFormat), - Id: __expectString(output.Id), - LanguageCode: __expectString(output.LanguageCode), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FaqSummaryItems - */ -const de_FaqSummaryItems = (output: any, context: __SerdeContext): FaqSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FaqSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FeaturedDocument - */ -const de_FeaturedDocument = (output: any, context: __SerdeContext): FeaturedDocument => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedDocumentList - */ -const de_FeaturedDocumentList = (output: any, context: __SerdeContext): FeaturedDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeaturedDocument(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FeaturedDocumentMissing - */ -const de_FeaturedDocumentMissing = (output: any, context: __SerdeContext): FeaturedDocumentMissing => { - return { - Id: __expectString(output.Id), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedDocumentMissingList - */ -const de_FeaturedDocumentMissingList = (output: any, context: __SerdeContext): FeaturedDocumentMissing[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeaturedDocumentMissing(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FeaturedDocumentWithMetadata - */ -const de_FeaturedDocumentWithMetadata = (output: any, context: __SerdeContext): FeaturedDocumentWithMetadata => { - return { - Id: __expectString(output.Id), - Title: __expectString(output.Title), - URI: __expectString(output.URI), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedDocumentWithMetadataList - */ -const de_FeaturedDocumentWithMetadataList = (output: any, context: __SerdeContext): FeaturedDocumentWithMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeaturedDocumentWithMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FeaturedResultsConflictException - */ -const de_FeaturedResultsConflictException = ( - output: any, - context: __SerdeContext -): FeaturedResultsConflictException => { - return { - ConflictingItems: - output.ConflictingItems != null ? de_ConflictingItems(output.ConflictingItems, context) : undefined, - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedResultsItem - */ -const de_FeaturedResultsItem = (output: any, context: __SerdeContext): FeaturedResultsItem => { - return { - AdditionalAttributes: - output.AdditionalAttributes != null - ? de_AdditionalResultAttributeList(output.AdditionalAttributes, context) - : undefined, - DocumentAttributes: - output.DocumentAttributes != null ? de_DocumentAttributeList(output.DocumentAttributes, context) : undefined, - DocumentExcerpt: - output.DocumentExcerpt != null ? de_TextWithHighlights(output.DocumentExcerpt, context) : undefined, - DocumentId: __expectString(output.DocumentId), - DocumentTitle: output.DocumentTitle != null ? de_TextWithHighlights(output.DocumentTitle, context) : undefined, - DocumentURI: __expectString(output.DocumentURI), - FeedbackToken: __expectString(output.FeedbackToken), - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedResultsItemList - */ -const de_FeaturedResultsItemList = (output: any, context: __SerdeContext): FeaturedResultsItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeaturedResultsItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FeaturedResultsSet - */ -const de_FeaturedResultsSet = (output: any, context: __SerdeContext): FeaturedResultsSet => { - return { - CreationTimestamp: __expectLong(output.CreationTimestamp), - Description: __expectString(output.Description), - FeaturedDocuments: - output.FeaturedDocuments != null ? de_FeaturedDocumentList(output.FeaturedDocuments, context) : undefined, - FeaturedResultsSetId: __expectString(output.FeaturedResultsSetId), - FeaturedResultsSetName: __expectString(output.FeaturedResultsSetName), - LastUpdatedTimestamp: __expectLong(output.LastUpdatedTimestamp), - QueryTexts: output.QueryTexts != null ? de_QueryTextList(output.QueryTexts, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedResultsSetSummary - */ -const de_FeaturedResultsSetSummary = (output: any, context: __SerdeContext): FeaturedResultsSetSummary => { - return { - CreationTimestamp: __expectLong(output.CreationTimestamp), - FeaturedResultsSetId: __expectString(output.FeaturedResultsSetId), - FeaturedResultsSetName: __expectString(output.FeaturedResultsSetName), - LastUpdatedTimestamp: __expectLong(output.LastUpdatedTimestamp), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1FeaturedResultsSetSummaryItems - */ -const de_FeaturedResultsSetSummaryItems = (output: any, context: __SerdeContext): FeaturedResultsSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeaturedResultsSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FolderIdList - */ -const de_FolderIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FsxConfiguration - */ -const de_FsxConfiguration = (output: any, context: __SerdeContext): FsxConfiguration => { - return { - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - FileSystemId: __expectString(output.FileSystemId), - FileSystemType: __expectString(output.FileSystemType), - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetQuerySuggestionsResponse - */ -const de_GetQuerySuggestionsResponse = (output: any, context: __SerdeContext): GetQuerySuggestionsResponse => { - return { - QuerySuggestionsId: __expectString(output.QuerySuggestionsId), - Suggestions: output.Suggestions != null ? de_SuggestionList(output.Suggestions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSnapshotsResponse - */ -const de_GetSnapshotsResponse = (output: any, context: __SerdeContext): GetSnapshotsResponse => { - return { - NextToken: __expectString(output.NextToken), - SnapShotTimeFilter: - output.SnapShotTimeFilter != null ? de_TimeRange(output.SnapShotTimeFilter, context) : undefined, - SnapshotsData: output.SnapshotsData != null ? de_SnapshotsDataRecords(output.SnapshotsData, context) : undefined, - SnapshotsDataHeader: - output.SnapshotsDataHeader != null - ? de_SnapshotsDataHeaderFields(output.SnapshotsDataHeader, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GitHubConfiguration - */ -const de_GitHubConfiguration = (output: any, context: __SerdeContext): GitHubConfiguration => { - return { - ExclusionFileNamePatterns: - output.ExclusionFileNamePatterns != null ? de_StringList(output.ExclusionFileNamePatterns, context) : undefined, - ExclusionFileTypePatterns: - output.ExclusionFileTypePatterns != null ? de_StringList(output.ExclusionFileTypePatterns, context) : undefined, - ExclusionFolderNamePatterns: - output.ExclusionFolderNamePatterns != null - ? de_StringList(output.ExclusionFolderNamePatterns, context) - : undefined, - GitHubCommitConfigurationFieldMappings: - output.GitHubCommitConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubCommitConfigurationFieldMappings, context) - : undefined, - GitHubDocumentCrawlProperties: - output.GitHubDocumentCrawlProperties != null - ? de_GitHubDocumentCrawlProperties(output.GitHubDocumentCrawlProperties, context) - : undefined, - GitHubIssueAttachmentConfigurationFieldMappings: - output.GitHubIssueAttachmentConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubIssueAttachmentConfigurationFieldMappings, context) - : undefined, - GitHubIssueCommentConfigurationFieldMappings: - output.GitHubIssueCommentConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubIssueCommentConfigurationFieldMappings, context) - : undefined, - GitHubIssueDocumentConfigurationFieldMappings: - output.GitHubIssueDocumentConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubIssueDocumentConfigurationFieldMappings, context) - : undefined, - GitHubPullRequestCommentConfigurationFieldMappings: - output.GitHubPullRequestCommentConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubPullRequestCommentConfigurationFieldMappings, context) - : undefined, - GitHubPullRequestDocumentAttachmentConfigurationFieldMappings: - output.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList( - output.GitHubPullRequestDocumentAttachmentConfigurationFieldMappings, - context - ) - : undefined, - GitHubPullRequestDocumentConfigurationFieldMappings: - output.GitHubPullRequestDocumentConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubPullRequestDocumentConfigurationFieldMappings, context) - : undefined, - GitHubRepositoryConfigurationFieldMappings: - output.GitHubRepositoryConfigurationFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.GitHubRepositoryConfigurationFieldMappings, context) - : undefined, - InclusionFileNamePatterns: - output.InclusionFileNamePatterns != null ? de_StringList(output.InclusionFileNamePatterns, context) : undefined, - InclusionFileTypePatterns: - output.InclusionFileTypePatterns != null ? de_StringList(output.InclusionFileTypePatterns, context) : undefined, - InclusionFolderNamePatterns: - output.InclusionFolderNamePatterns != null - ? de_StringList(output.InclusionFolderNamePatterns, context) - : undefined, - OnPremiseConfiguration: - output.OnPremiseConfiguration != null - ? de_OnPremiseConfiguration(output.OnPremiseConfiguration, context) - : undefined, - RepositoryFilter: - output.RepositoryFilter != null ? de_RepositoryNames(output.RepositoryFilter, context) : undefined, - SaaSConfiguration: - output.SaaSConfiguration != null ? de_SaaSConfiguration(output.SaaSConfiguration, context) : undefined, - SecretArn: __expectString(output.SecretArn), - Type: __expectString(output.Type), - UseChangeLog: __expectBoolean(output.UseChangeLog), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GitHubDocumentCrawlProperties - */ -const de_GitHubDocumentCrawlProperties = (output: any, context: __SerdeContext): GitHubDocumentCrawlProperties => { - return { - CrawlIssue: __expectBoolean(output.CrawlIssue), - CrawlIssueComment: __expectBoolean(output.CrawlIssueComment), - CrawlIssueCommentAttachment: __expectBoolean(output.CrawlIssueCommentAttachment), - CrawlPullRequest: __expectBoolean(output.CrawlPullRequest), - CrawlPullRequestComment: __expectBoolean(output.CrawlPullRequestComment), - CrawlPullRequestCommentAttachment: __expectBoolean(output.CrawlPullRequestCommentAttachment), - CrawlRepositoryDocuments: __expectBoolean(output.CrawlRepositoryDocuments), - } as any; -}; - -/** - * deserializeAws_json1_1GoogleDriveConfiguration - */ -const de_GoogleDriveConfiguration = (output: any, context: __SerdeContext): GoogleDriveConfiguration => { - return { - ExcludeMimeTypes: - output.ExcludeMimeTypes != null ? de_ExcludeMimeTypesList(output.ExcludeMimeTypes, context) : undefined, - ExcludeSharedDrives: - output.ExcludeSharedDrives != null ? de_ExcludeSharedDrivesList(output.ExcludeSharedDrives, context) : undefined, - ExcludeUserAccounts: - output.ExcludeUserAccounts != null ? de_ExcludeUserAccountsList(output.ExcludeUserAccounts, context) : undefined, - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - } as any; -}; - -/** - * deserializeAws_json1_1GroupOrderingIdSummaries - */ -const de_GroupOrderingIdSummaries = (output: any, context: __SerdeContext): GroupOrderingIdSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupOrderingIdSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GroupOrderingIdSummary - */ -const de_GroupOrderingIdSummary = (output: any, context: __SerdeContext): GroupOrderingIdSummary => { - return { - FailureReason: __expectString(output.FailureReason), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - OrderingId: __expectLong(output.OrderingId), - ReceivedAt: - output.ReceivedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReceivedAt))) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1GroupSummary - */ -const de_GroupSummary = (output: any, context: __SerdeContext): GroupSummary => { - return { - GroupId: __expectString(output.GroupId), - OrderingId: __expectLong(output.OrderingId), - } as any; -}; - -/** - * deserializeAws_json1_1HierarchicalPrincipal - */ -const de_HierarchicalPrincipal = (output: any, context: __SerdeContext): HierarchicalPrincipal => { - return { - PrincipalList: output.PrincipalList != null ? de_PrincipalList(output.PrincipalList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HierarchicalPrincipalList - */ -const de_HierarchicalPrincipalList = (output: any, context: __SerdeContext): HierarchicalPrincipal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HierarchicalPrincipal(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Highlight - */ -const de_Highlight = (output: any, context: __SerdeContext): Highlight => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - TopAnswer: __expectBoolean(output.TopAnswer), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1HighlightList - */ -const de_HighlightList = (output: any, context: __SerdeContext): Highlight[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Highlight(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1HookConfiguration - */ -const de_HookConfiguration = (output: any, context: __SerdeContext): HookConfiguration => { - return { - InvocationCondition: - output.InvocationCondition != null - ? de_DocumentAttributeCondition(output.InvocationCondition, context) - : undefined, - LambdaArn: __expectString(output.LambdaArn), - S3Bucket: __expectString(output.S3Bucket), - } as any; -}; - -/** - * deserializeAws_json1_1IndexConfigurationSummary - */ -const de_IndexConfigurationSummary = (output: any, context: __SerdeContext): IndexConfigurationSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Edition: __expectString(output.Edition), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1IndexConfigurationSummaryList - */ -const de_IndexConfigurationSummaryList = (output: any, context: __SerdeContext): IndexConfigurationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IndexConfigurationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IndexStatistics - */ -const de_IndexStatistics = (output: any, context: __SerdeContext): IndexStatistics => { - return { - FaqStatistics: output.FaqStatistics != null ? de_FaqStatistics(output.FaqStatistics, context) : undefined, - TextDocumentStatistics: - output.TextDocumentStatistics != null - ? de_TextDocumentStatistics(output.TextDocumentStatistics, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InlineCustomDocumentEnrichmentConfiguration - */ -const de_InlineCustomDocumentEnrichmentConfiguration = ( - output: any, - context: __SerdeContext -): InlineCustomDocumentEnrichmentConfiguration => { - return { - Condition: output.Condition != null ? de_DocumentAttributeCondition(output.Condition, context) : undefined, - DocumentContentDeletion: __expectBoolean(output.DocumentContentDeletion), - Target: output.Target != null ? de_DocumentAttributeTarget(output.Target, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InlineCustomDocumentEnrichmentConfigurationList - */ -const de_InlineCustomDocumentEnrichmentConfigurationList = ( - output: any, - context: __SerdeContext -): InlineCustomDocumentEnrichmentConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InlineCustomDocumentEnrichmentConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1IssueSubEntityFilter - */ -const de_IssueSubEntityFilter = (output: any, context: __SerdeContext): (IssueSubEntity | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IssueType - */ -const de_IssueType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1JiraConfiguration - */ -const de_JiraConfiguration = (output: any, context: __SerdeContext): JiraConfiguration => { - return { - AttachmentFieldMappings: - output.AttachmentFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.AttachmentFieldMappings, context) - : undefined, - CommentFieldMappings: - output.CommentFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.CommentFieldMappings, context) - : undefined, - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - IssueFieldMappings: - output.IssueFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.IssueFieldMappings, context) - : undefined, - IssueSubEntityFilter: - output.IssueSubEntityFilter != null ? de_IssueSubEntityFilter(output.IssueSubEntityFilter, context) : undefined, - IssueType: output.IssueType != null ? de_IssueType(output.IssueType, context) : undefined, - JiraAccountUrl: __expectString(output.JiraAccountUrl), - Project: output.Project != null ? de_Project(output.Project, context) : undefined, - ProjectFieldMappings: - output.ProjectFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.ProjectFieldMappings, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - Status: output.Status != null ? de_JiraStatus(output.Status, context) : undefined, - UseChangeLog: __expectBoolean(output.UseChangeLog), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - WorkLogFieldMappings: - output.WorkLogFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.WorkLogFieldMappings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1JiraStatus - */ -const de_JiraStatus = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1JsonTokenTypeConfiguration - */ -const de_JsonTokenTypeConfiguration = (output: any, context: __SerdeContext): JsonTokenTypeConfiguration => { - return { - GroupAttributeField: __expectString(output.GroupAttributeField), - UserNameAttributeField: __expectString(output.UserNameAttributeField), - } as any; -}; - -/** - * deserializeAws_json1_1JwtTokenTypeConfiguration - */ -const de_JwtTokenTypeConfiguration = (output: any, context: __SerdeContext): JwtTokenTypeConfiguration => { - return { - ClaimRegex: __expectString(output.ClaimRegex), - GroupAttributeField: __expectString(output.GroupAttributeField), - Issuer: __expectString(output.Issuer), - KeyLocation: __expectString(output.KeyLocation), - SecretManagerArn: __expectString(output.SecretManagerArn), - URL: __expectString(output.URL), - UserNameAttributeField: __expectString(output.UserNameAttributeField), - } as any; -}; - -/** - * deserializeAws_json1_1ListAccessControlConfigurationsResponse - */ -const de_ListAccessControlConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListAccessControlConfigurationsResponse => { - return { - AccessControlConfigurations: - output.AccessControlConfigurations != null - ? de_AccessControlConfigurationSummaryList(output.AccessControlConfigurations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListDataSourcesResponse - */ -const de_ListDataSourcesResponse = (output: any, context: __SerdeContext): ListDataSourcesResponse => { - return { - NextToken: __expectString(output.NextToken), - SummaryItems: output.SummaryItems != null ? de_DataSourceSummaryList(output.SummaryItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListDataSourceSyncJobsResponse - */ -const de_ListDataSourceSyncJobsResponse = (output: any, context: __SerdeContext): ListDataSourceSyncJobsResponse => { - return { - History: output.History != null ? de_DataSourceSyncJobHistoryList(output.History, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListEntityPersonasResponse - */ -const de_ListEntityPersonasResponse = (output: any, context: __SerdeContext): ListEntityPersonasResponse => { - return { - NextToken: __expectString(output.NextToken), - SummaryItems: output.SummaryItems != null ? de_PersonasSummaryList(output.SummaryItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListExperienceEntitiesResponse - */ -const de_ListExperienceEntitiesResponse = (output: any, context: __SerdeContext): ListExperienceEntitiesResponse => { - return { - NextToken: __expectString(output.NextToken), - SummaryItems: - output.SummaryItems != null ? de_ExperienceEntitiesSummaryList(output.SummaryItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListExperiencesResponse - */ -const de_ListExperiencesResponse = (output: any, context: __SerdeContext): ListExperiencesResponse => { - return { - NextToken: __expectString(output.NextToken), - SummaryItems: output.SummaryItems != null ? de_ExperiencesSummaryList(output.SummaryItems, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListFaqsResponse - */ -const de_ListFaqsResponse = (output: any, context: __SerdeContext): ListFaqsResponse => { - return { - FaqSummaryItems: output.FaqSummaryItems != null ? de_FaqSummaryItems(output.FaqSummaryItems, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListFeaturedResultsSetsResponse - */ -const de_ListFeaturedResultsSetsResponse = (output: any, context: __SerdeContext): ListFeaturedResultsSetsResponse => { - return { - FeaturedResultsSetSummaryItems: - output.FeaturedResultsSetSummaryItems != null - ? de_FeaturedResultsSetSummaryItems(output.FeaturedResultsSetSummaryItems, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListGroupsOlderThanOrderingIdResponse - */ -const de_ListGroupsOlderThanOrderingIdResponse = ( - output: any, - context: __SerdeContext -): ListGroupsOlderThanOrderingIdResponse => { - return { - GroupsSummaries: - output.GroupsSummaries != null ? de_ListOfGroupSummaries(output.GroupsSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ConfluencePageConfiguration omitted. -/** - * deserializeAws_json1_1ListIndicesResponse - */ -const de_ListIndicesResponse = (output: any, context: __SerdeContext): ListIndicesResponse => { - return { - IndexConfigurationSummaryItems: - output.IndexConfigurationSummaryItems != null - ? de_IndexConfigurationSummaryList(output.IndexConfigurationSummaryItems, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListOfGroupSummaries - */ -const de_ListOfGroupSummaries = (output: any, context: __SerdeContext): GroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupSummary(entry, context); - }); - return retVal; -}; +// de_ConfluencePageFieldMappingsList omitted. -/** - * deserializeAws_json1_1ListQuerySuggestionsBlockListsResponse - */ -const de_ListQuerySuggestionsBlockListsResponse = ( - output: any, - context: __SerdeContext -): ListQuerySuggestionsBlockListsResponse => { - return { - BlockListSummaryItems: - output.BlockListSummaryItems != null - ? de_QuerySuggestionsBlockListSummaryItems(output.BlockListSummaryItems, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ConfluencePageToIndexFieldMapping omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ConfluenceSpaceConfiguration omitted. -/** - * deserializeAws_json1_1ListThesauriResponse - */ -const de_ListThesauriResponse = (output: any, context: __SerdeContext): ListThesauriResponse => { - return { - NextToken: __expectString(output.NextToken), - ThesaurusSummaryItems: - output.ThesaurusSummaryItems != null - ? de_ThesaurusSummaryItems(output.ThesaurusSummaryItems, context) - : undefined, - } as any; -}; +// de_ConfluenceSpaceFieldMappingsList omitted. -/** - * deserializeAws_json1_1OneDriveConfiguration - */ -const de_OneDriveConfiguration = (output: any, context: __SerdeContext): OneDriveConfiguration => { - return { - DisableLocalGroups: __expectBoolean(output.DisableLocalGroups), - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - OneDriveUsers: output.OneDriveUsers != null ? de_OneDriveUsers(output.OneDriveUsers, context) : undefined, - SecretArn: __expectString(output.SecretArn), - TenantDomain: __expectString(output.TenantDomain), - } as any; -}; - -/** - * deserializeAws_json1_1OneDriveUserList - */ -const de_OneDriveUserList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConfluenceSpaceList omitted. -/** - * deserializeAws_json1_1OneDriveUsers - */ -const de_OneDriveUsers = (output: any, context: __SerdeContext): OneDriveUsers => { - return { - OneDriveUserList: - output.OneDriveUserList != null ? de_OneDriveUserList(output.OneDriveUserList, context) : undefined, - OneDriveUserS3Path: output.OneDriveUserS3Path != null ? de_S3Path(output.OneDriveUserS3Path, context) : undefined, - } as any; -}; +// de_ConfluenceSpaceToIndexFieldMapping omitted. -/** - * deserializeAws_json1_1OnPremiseConfiguration - */ -const de_OnPremiseConfiguration = (output: any, context: __SerdeContext): OnPremiseConfiguration => { - return { - HostUrl: __expectString(output.HostUrl), - OrganizationName: __expectString(output.OrganizationName), - SslCertificateS3Path: - output.SslCertificateS3Path != null ? de_S3Path(output.SslCertificateS3Path, context) : undefined, - } as any; -}; +// de_ConnectionConfiguration omitted. -/** - * deserializeAws_json1_1PersonasSummary - */ -const de_PersonasSummary = (output: any, context: __SerdeContext): PersonasSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EntityId: __expectString(output.EntityId), - Persona: __expectString(output.Persona), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; +// de_ContentSourceConfiguration omitted. -/** - * deserializeAws_json1_1PersonasSummaryList - */ -const de_PersonasSummaryList = (output: any, context: __SerdeContext): PersonasSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PersonasSummary(entry, context); - }); - return retVal; -}; +// de_Correction omitted. -/** - * deserializeAws_json1_1Principal - */ -const de_Principal = (output: any, context: __SerdeContext): Principal => { - return { - Access: __expectString(output.Access), - DataSourceId: __expectString(output.DataSourceId), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_CorrectionList omitted. -/** - * deserializeAws_json1_1PrincipalList - */ -const de_PrincipalList = (output: any, context: __SerdeContext): Principal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Principal(entry, context); - }); - return retVal; -}; +// de_CreateAccessControlConfigurationResponse omitted. -/** - * deserializeAws_json1_1PrivateChannelFilter - */ -const de_PrivateChannelFilter = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CreateDataSourceResponse omitted. -/** - * deserializeAws_json1_1Project - */ -const de_Project = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CreateExperienceResponse omitted. -/** - * deserializeAws_json1_1ProxyConfiguration - */ -const de_ProxyConfiguration = (output: any, context: __SerdeContext): ProxyConfiguration => { - return { - Credentials: __expectString(output.Credentials), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; +// de_CreateFaqResponse omitted. -/** - * deserializeAws_json1_1PublicChannelFilter - */ -const de_PublicChannelFilter = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CreateFeaturedResultsSetResponse omitted. -/** - * deserializeAws_json1_1QueryResult - */ -const de_QueryResult = (output: any, context: __SerdeContext): QueryResult => { - return { - FacetResults: output.FacetResults != null ? de_FacetResultList(output.FacetResults, context) : undefined, - FeaturedResultsItems: - output.FeaturedResultsItems != null - ? de_FeaturedResultsItemList(output.FeaturedResultsItems, context) - : undefined, - QueryId: __expectString(output.QueryId), - ResultItems: output.ResultItems != null ? de_QueryResultItemList(output.ResultItems, context) : undefined, - SpellCorrectedQueries: - output.SpellCorrectedQueries != null - ? de_SpellCorrectedQueryList(output.SpellCorrectedQueries, context) - : undefined, - TotalNumberOfResults: __expectInt32(output.TotalNumberOfResults), - Warnings: output.Warnings != null ? de_WarningList(output.Warnings, context) : undefined, - } as any; -}; +// de_CreateIndexResponse omitted. -/** - * deserializeAws_json1_1QueryResultItem - */ -const de_QueryResultItem = (output: any, context: __SerdeContext): QueryResultItem => { - return { - AdditionalAttributes: - output.AdditionalAttributes != null - ? de_AdditionalResultAttributeList(output.AdditionalAttributes, context) - : undefined, - DocumentAttributes: - output.DocumentAttributes != null ? de_DocumentAttributeList(output.DocumentAttributes, context) : undefined, - DocumentExcerpt: - output.DocumentExcerpt != null ? de_TextWithHighlights(output.DocumentExcerpt, context) : undefined, - DocumentId: __expectString(output.DocumentId), - DocumentTitle: output.DocumentTitle != null ? de_TextWithHighlights(output.DocumentTitle, context) : undefined, - DocumentURI: __expectString(output.DocumentURI), - FeedbackToken: __expectString(output.FeedbackToken), - Format: __expectString(output.Format), - Id: __expectString(output.Id), - ScoreAttributes: output.ScoreAttributes != null ? de_ScoreAttributes(output.ScoreAttributes, context) : undefined, - TableExcerpt: output.TableExcerpt != null ? de_TableExcerpt(output.TableExcerpt, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_CreateQuerySuggestionsBlockListResponse omitted. -/** - * deserializeAws_json1_1QueryResultItemList - */ -const de_QueryResultItemList = (output: any, context: __SerdeContext): QueryResultItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryResultItem(entry, context); - }); - return retVal; -}; +// de_CreateThesaurusResponse omitted. /** - * deserializeAws_json1_1QuerySuggestionsBlockListSummary + * deserializeAws_json1_1CustomDocumentEnrichmentConfiguration */ -const de_QuerySuggestionsBlockListSummary = ( +const de_CustomDocumentEnrichmentConfiguration = ( output: any, context: __SerdeContext -): QuerySuggestionsBlockListSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Id: __expectString(output.Id), - ItemCount: __expectInt32(output.ItemCount), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; +): CustomDocumentEnrichmentConfiguration => { + return take(output, { + InlineConfigurations: (_: any) => de_InlineCustomDocumentEnrichmentConfigurationList(_, context), + PostExtractionHookConfiguration: (_: any) => de_HookConfiguration(_, context), + PreExtractionHookConfiguration: (_: any) => de_HookConfiguration(_, context), + RoleArn: __expectString, + }) as any; }; +// de_DatabaseConfiguration omitted. + /** - * deserializeAws_json1_1QuerySuggestionsBlockListSummaryItems + * deserializeAws_json1_1DataSourceConfiguration */ -const de_QuerySuggestionsBlockListSummaryItems = ( - output: any, - context: __SerdeContext -): QuerySuggestionsBlockListSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QuerySuggestionsBlockListSummary(entry, context); - }); - return retVal; +const de_DataSourceConfiguration = (output: any, context: __SerdeContext): DataSourceConfiguration => { + return take(output, { + AlfrescoConfiguration: _json, + BoxConfiguration: _json, + ConfluenceConfiguration: _json, + DatabaseConfiguration: _json, + FsxConfiguration: _json, + GitHubConfiguration: _json, + GoogleDriveConfiguration: _json, + JiraConfiguration: _json, + OneDriveConfiguration: _json, + QuipConfiguration: _json, + S3Configuration: _json, + SalesforceConfiguration: _json, + ServiceNowConfiguration: _json, + SharePointConfiguration: _json, + SlackConfiguration: _json, + TemplateConfiguration: (_: any) => de_TemplateConfiguration(_, context), + WebCrawlerConfiguration: (_: any) => de_WebCrawlerConfiguration(_, context), + WorkDocsConfiguration: _json, + }) as any; +}; + +// de_DataSourceIdList omitted. + +// de_DataSourceInclusionsExclusionsStrings omitted. + +/** + * deserializeAws_json1_1DataSourceSummary + */ +const de_DataSourceSummary = (output: any, context: __SerdeContext): DataSourceSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + LanguageCode: __expectString, + Name: __expectString, + Status: __expectString, + Type: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1QueryTextList + * deserializeAws_json1_1DataSourceSummaryList */ -const de_QueryTextList = (output: any, context: __SerdeContext): string[] => { +const de_DataSourceSummaryList = (output: any, context: __SerdeContext): DataSourceSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DataSourceSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1QuipConfiguration + * deserializeAws_json1_1DataSourceSyncJob */ -const de_QuipConfiguration = (output: any, context: __SerdeContext): QuipConfiguration => { - return { - AttachmentFieldMappings: - output.AttachmentFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.AttachmentFieldMappings, context) - : undefined, - CrawlAttachments: __expectBoolean(output.CrawlAttachments), - CrawlChatRooms: __expectBoolean(output.CrawlChatRooms), - CrawlFileComments: __expectBoolean(output.CrawlFileComments), - Domain: __expectString(output.Domain), - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FolderIds: output.FolderIds != null ? de_FolderIdList(output.FolderIds, context) : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - MessageFieldMappings: - output.MessageFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.MessageFieldMappings, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - ThreadFieldMappings: - output.ThreadFieldMappings != null - ? de_DataSourceToIndexFieldMappingList(output.ThreadFieldMappings, context) - : undefined, - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Relevance - */ -const de_Relevance = (output: any, context: __SerdeContext): Relevance => { - return { - Duration: __expectString(output.Duration), - Freshness: __expectBoolean(output.Freshness), - Importance: __expectInt32(output.Importance), - RankOrder: __expectString(output.RankOrder), - ValueImportanceMap: - output.ValueImportanceMap != null ? de_ValueImportanceMap(output.ValueImportanceMap, context) : undefined, - } as any; +const de_DataSourceSyncJob = (output: any, context: __SerdeContext): DataSourceSyncJob => { + return take(output, { + DataSourceErrorCode: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorCode: __expectString, + ErrorMessage: __expectString, + ExecutionId: __expectString, + Metrics: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RepositoryNames + * deserializeAws_json1_1DataSourceSyncJobHistoryList */ -const de_RepositoryNames = (output: any, context: __SerdeContext): string[] => { +const de_DataSourceSyncJobHistoryList = (output: any, context: __SerdeContext): DataSourceSyncJob[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DataSourceSyncJob(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceAlreadyExistException - */ -const de_ResourceAlreadyExistException = (output: any, context: __SerdeContext): ResourceAlreadyExistException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DataSourceSyncJobMetrics omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DataSourceToIndexFieldMapping omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DataSourceToIndexFieldMappingList omitted. -/** - * deserializeAws_json1_1ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DataSourceVpcConfiguration omitted. + +// de_DeleteAccessControlConfigurationResponse omitted. + +// de_DeleteExperienceResponse omitted. + +// de_DescribeAccessControlConfigurationResponse omitted. /** - * deserializeAws_json1_1S3DataSourceConfiguration + * deserializeAws_json1_1DescribeDataSourceResponse */ -const de_S3DataSourceConfiguration = (output: any, context: __SerdeContext): S3DataSourceConfiguration => { - return { - AccessControlListConfiguration: - output.AccessControlListConfiguration != null - ? de_AccessControlListConfiguration(output.AccessControlListConfiguration, context) - : undefined, - BucketName: __expectString(output.BucketName), - DocumentsMetadataConfiguration: - output.DocumentsMetadataConfiguration != null - ? de_DocumentsMetadataConfiguration(output.DocumentsMetadataConfiguration, context) - : undefined, - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - InclusionPrefixes: - output.InclusionPrefixes != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPrefixes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1S3Path - */ -const de_S3Path = (output: any, context: __SerdeContext): S3Path => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; +const de_DescribeDataSourceResponse = (output: any, context: __SerdeContext): DescribeDataSourceResponse => { + return take(output, { + Configuration: (_: any) => de_DataSourceConfiguration(_, context), + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomDocumentEnrichmentConfiguration: (_: any) => de_CustomDocumentEnrichmentConfiguration(_, context), + Description: __expectString, + ErrorMessage: __expectString, + Id: __expectString, + IndexId: __expectString, + LanguageCode: __expectString, + Name: __expectString, + RoleArn: __expectString, + Schedule: __expectString, + Status: __expectString, + Type: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VpcConfiguration: _json, + }) as any; }; /** - * deserializeAws_json1_1SaaSConfiguration + * deserializeAws_json1_1DescribeExperienceResponse */ -const de_SaaSConfiguration = (output: any, context: __SerdeContext): SaaSConfiguration => { - return { - HostUrl: __expectString(output.HostUrl), - OrganizationName: __expectString(output.OrganizationName), - } as any; +const de_DescribeExperienceResponse = (output: any, context: __SerdeContext): DescribeExperienceResponse => { + return take(output, { + Configuration: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Endpoints: _json, + ErrorMessage: __expectString, + Id: __expectString, + IndexId: __expectString, + Name: __expectString, + RoleArn: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1SalesforceChatterFeedConfiguration + * deserializeAws_json1_1DescribeFaqResponse */ -const de_SalesforceChatterFeedConfiguration = ( - output: any, - context: __SerdeContext -): SalesforceChatterFeedConfiguration => { - return { - DocumentDataFieldName: __expectString(output.DocumentDataFieldName), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - IncludeFilterTypes: - output.IncludeFilterTypes != null - ? de_SalesforceChatterFeedIncludeFilterTypes(output.IncludeFilterTypes, context) - : undefined, - } as any; +const de_DescribeFaqResponse = (output: any, context: __SerdeContext): DescribeFaqResponse => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ErrorMessage: __expectString, + FileFormat: __expectString, + Id: __expectString, + IndexId: __expectString, + LanguageCode: __expectString, + Name: __expectString, + RoleArn: __expectString, + S3Path: _json, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DescribeFeaturedResultsSetResponse omitted. + /** - * deserializeAws_json1_1SalesforceChatterFeedIncludeFilterTypes + * deserializeAws_json1_1DescribeIndexResponse */ -const de_SalesforceChatterFeedIncludeFilterTypes = ( - output: any, - context: __SerdeContext -): (SalesforceChatterFeedIncludeFilterType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeIndexResponse = (output: any, context: __SerdeContext): DescribeIndexResponse => { + return take(output, { + CapacityUnits: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DocumentMetadataConfigurations: _json, + Edition: __expectString, + ErrorMessage: __expectString, + Id: __expectString, + IndexStatistics: _json, + Name: __expectString, + RoleArn: __expectString, + ServerSideEncryptionConfiguration: _json, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UserContextPolicy: __expectString, + UserGroupResolutionConfiguration: _json, + UserTokenConfigurations: _json, + }) as any; }; /** - * deserializeAws_json1_1SalesforceConfiguration + * deserializeAws_json1_1DescribePrincipalMappingResponse */ -const de_SalesforceConfiguration = (output: any, context: __SerdeContext): SalesforceConfiguration => { - return { - ChatterFeedConfiguration: - output.ChatterFeedConfiguration != null - ? de_SalesforceChatterFeedConfiguration(output.ChatterFeedConfiguration, context) - : undefined, - CrawlAttachments: __expectBoolean(output.CrawlAttachments), - ExcludeAttachmentFilePatterns: - output.ExcludeAttachmentFilePatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExcludeAttachmentFilePatterns, context) - : undefined, - IncludeAttachmentFilePatterns: - output.IncludeAttachmentFilePatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.IncludeAttachmentFilePatterns, context) - : undefined, - KnowledgeArticleConfiguration: - output.KnowledgeArticleConfiguration != null - ? de_SalesforceKnowledgeArticleConfiguration(output.KnowledgeArticleConfiguration, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - ServerUrl: __expectString(output.ServerUrl), - StandardObjectAttachmentConfiguration: - output.StandardObjectAttachmentConfiguration != null - ? de_SalesforceStandardObjectAttachmentConfiguration(output.StandardObjectAttachmentConfiguration, context) - : undefined, - StandardObjectConfigurations: - output.StandardObjectConfigurations != null - ? de_SalesforceStandardObjectConfigurationList(output.StandardObjectConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SalesforceCustomKnowledgeArticleTypeConfiguration - */ -const de_SalesforceCustomKnowledgeArticleTypeConfiguration = ( +const de_DescribePrincipalMappingResponse = ( output: any, context: __SerdeContext -): SalesforceCustomKnowledgeArticleTypeConfiguration => { - return { - DocumentDataFieldName: __expectString(output.DocumentDataFieldName), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - Name: __expectString(output.Name), - } as any; +): DescribePrincipalMappingResponse => { + return take(output, { + DataSourceId: __expectString, + GroupId: __expectString, + GroupOrderingIdSummaries: (_: any) => de_GroupOrderingIdSummaries(_, context), + IndexId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SalesforceCustomKnowledgeArticleTypeConfigurationList + * deserializeAws_json1_1DescribeQuerySuggestionsBlockListResponse */ -const de_SalesforceCustomKnowledgeArticleTypeConfigurationList = ( +const de_DescribeQuerySuggestionsBlockListResponse = ( output: any, context: __SerdeContext -): SalesforceCustomKnowledgeArticleTypeConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SalesforceCustomKnowledgeArticleTypeConfiguration(entry, context); - }); - return retVal; +): DescribeQuerySuggestionsBlockListResponse => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ErrorMessage: __expectString, + FileSizeBytes: __expectLong, + Id: __expectString, + IndexId: __expectString, + ItemCount: __expectInt32, + Name: __expectString, + RoleArn: __expectString, + SourceS3Path: _json, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1SalesforceKnowledgeArticleConfiguration + * deserializeAws_json1_1DescribeQuerySuggestionsConfigResponse */ -const de_SalesforceKnowledgeArticleConfiguration = ( - output: any, - context: __SerdeContext -): SalesforceKnowledgeArticleConfiguration => { - return { - CustomKnowledgeArticleTypeConfigurations: - output.CustomKnowledgeArticleTypeConfigurations != null - ? de_SalesforceCustomKnowledgeArticleTypeConfigurationList( - output.CustomKnowledgeArticleTypeConfigurations, - context - ) - : undefined, - IncludedStates: - output.IncludedStates != null - ? de_SalesforceKnowledgeArticleStateList(output.IncludedStates, context) - : undefined, - StandardKnowledgeArticleTypeConfiguration: - output.StandardKnowledgeArticleTypeConfiguration != null - ? de_SalesforceStandardKnowledgeArticleTypeConfiguration( - output.StandardKnowledgeArticleTypeConfiguration, - context - ) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SalesforceKnowledgeArticleStateList - */ -const de_SalesforceKnowledgeArticleStateList = ( +const de_DescribeQuerySuggestionsConfigResponse = ( output: any, context: __SerdeContext -): (SalesforceKnowledgeArticleState | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +): DescribeQuerySuggestionsConfigResponse => { + return take(output, { + IncludeQueriesWithoutUserInformation: __expectBoolean, + LastClearTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuggestionsBuildTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MinimumNumberOfQueryingUsers: __expectInt32, + MinimumQueryCount: __expectInt32, + Mode: __expectString, + QueryLogLookBackWindowInDays: __expectInt32, + Status: __expectString, + TotalSuggestionsCount: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1SalesforceStandardKnowledgeArticleTypeConfiguration + * deserializeAws_json1_1DescribeThesaurusResponse */ -const de_SalesforceStandardKnowledgeArticleTypeConfiguration = ( - output: any, - context: __SerdeContext -): SalesforceStandardKnowledgeArticleTypeConfiguration => { - return { - DocumentDataFieldName: __expectString(output.DocumentDataFieldName), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - } as any; +const de_DescribeThesaurusResponse = (output: any, context: __SerdeContext): DescribeThesaurusResponse => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ErrorMessage: __expectString, + FileSizeBytes: __expectLong, + Id: __expectString, + IndexId: __expectString, + Name: __expectString, + RoleArn: __expectString, + SourceS3Path: _json, + Status: __expectString, + SynonymRuleCount: __expectLong, + TermCount: __expectLong, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DisassociateEntitiesFromExperienceResponse omitted. + +// de_DisassociatePersonasFromEntitiesResponse omitted. + /** - * deserializeAws_json1_1SalesforceStandardObjectAttachmentConfiguration + * deserializeAws_json1_1DocumentAttribute */ -const de_SalesforceStandardObjectAttachmentConfiguration = ( - output: any, - context: __SerdeContext -): SalesforceStandardObjectAttachmentConfiguration => { - return { - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - } as any; +const de_DocumentAttribute = (output: any, context: __SerdeContext): DocumentAttribute => { + return take(output, { + Key: __expectString, + Value: (_: any) => de_DocumentAttributeValue(_, context), + }) as any; }; /** - * deserializeAws_json1_1SalesforceStandardObjectConfiguration + * deserializeAws_json1_1DocumentAttributeCondition */ -const de_SalesforceStandardObjectConfiguration = ( - output: any, - context: __SerdeContext -): SalesforceStandardObjectConfiguration => { - return { - DocumentDataFieldName: __expectString(output.DocumentDataFieldName), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - Name: __expectString(output.Name), - } as any; +const de_DocumentAttributeCondition = (output: any, context: __SerdeContext): DocumentAttributeCondition => { + return take(output, { + ConditionDocumentAttributeKey: __expectString, + ConditionOnValue: (_: any) => de_DocumentAttributeValue(_, context), + Operator: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SalesforceStandardObjectConfigurationList + * deserializeAws_json1_1DocumentAttributeList */ -const de_SalesforceStandardObjectConfigurationList = ( - output: any, - context: __SerdeContext -): SalesforceStandardObjectConfiguration[] => { +const de_DocumentAttributeList = (output: any, context: __SerdeContext): DocumentAttribute[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SalesforceStandardObjectConfiguration(entry, context); + return de_DocumentAttribute(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ScoreAttributes - */ -const de_ScoreAttributes = (output: any, context: __SerdeContext): ScoreAttributes => { - return { - ScoreConfidence: __expectString(output.ScoreConfidence), - } as any; -}; +// de_DocumentAttributeStringListValue omitted. /** - * deserializeAws_json1_1Search + * deserializeAws_json1_1DocumentAttributeTarget */ -const de_Search = (output: any, context: __SerdeContext): Search => { - return { - Displayable: __expectBoolean(output.Displayable), - Facetable: __expectBoolean(output.Facetable), - Searchable: __expectBoolean(output.Searchable), - Sortable: __expectBoolean(output.Sortable), - } as any; +const de_DocumentAttributeTarget = (output: any, context: __SerdeContext): DocumentAttributeTarget => { + return take(output, { + TargetDocumentAttributeKey: __expectString, + TargetDocumentAttributeValue: (_: any) => de_DocumentAttributeValue(_, context), + TargetDocumentAttributeValueDeletion: __expectBoolean, + }) as any; }; /** - * deserializeAws_json1_1SecurityGroupIdList + * deserializeAws_json1_1DocumentAttributeValue */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DocumentAttributeValue = (output: any, context: __SerdeContext): DocumentAttributeValue => { + return take(output, { + DateValue: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LongValue: __expectLong, + StringListValue: _json, + StringValue: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SeedUrlConfiguration + * deserializeAws_json1_1DocumentAttributeValueCountPair */ -const de_SeedUrlConfiguration = (output: any, context: __SerdeContext): SeedUrlConfiguration => { - return { - SeedUrls: output.SeedUrls != null ? de_SeedUrlList(output.SeedUrls, context) : undefined, - WebCrawlerMode: __expectString(output.WebCrawlerMode), - } as any; +const de_DocumentAttributeValueCountPair = (output: any, context: __SerdeContext): DocumentAttributeValueCountPair => { + return take(output, { + Count: __expectInt32, + DocumentAttributeValue: (_: any) => de_DocumentAttributeValue(_, context), + FacetResults: (_: any) => de_FacetResultList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SeedUrlList + * deserializeAws_json1_1DocumentAttributeValueCountPairList */ -const de_SeedUrlList = (output: any, context: __SerdeContext): string[] => { +const de_DocumentAttributeValueCountPairList = ( + output: any, + context: __SerdeContext +): DocumentAttributeValueCountPair[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DocumentAttributeValueCountPair(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ServerSideEncryptionConfiguration - */ -const de_ServerSideEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): ServerSideEncryptionConfiguration => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// de_DocumentMetadataConfiguration omitted. -/** - * deserializeAws_json1_1ServiceNowConfiguration - */ -const de_ServiceNowConfiguration = (output: any, context: __SerdeContext): ServiceNowConfiguration => { - return { - AuthenticationType: __expectString(output.AuthenticationType), - HostUrl: __expectString(output.HostUrl), - KnowledgeArticleConfiguration: - output.KnowledgeArticleConfiguration != null - ? de_ServiceNowKnowledgeArticleConfiguration(output.KnowledgeArticleConfiguration, context) - : undefined, - SecretArn: __expectString(output.SecretArn), - ServiceCatalogConfiguration: - output.ServiceCatalogConfiguration != null - ? de_ServiceNowServiceCatalogConfiguration(output.ServiceCatalogConfiguration, context) - : undefined, - ServiceNowBuildVersion: __expectString(output.ServiceNowBuildVersion), - } as any; -}; +// de_DocumentMetadataConfigurationList omitted. + +// de_DocumentsMetadataConfiguration omitted. + +// de_DocumentStatusList omitted. + +// de_EntityDisplayData omitted. + +// de_EntityFilter omitted. + +// de_ExcludeMimeTypesList omitted. + +// de_ExcludeSharedDrivesList omitted. + +// de_ExcludeUserAccountsList omitted. + +// de_ExperienceConfiguration omitted. + +// de_ExperienceEndpoint omitted. + +// de_ExperienceEndpoints omitted. + +// de_ExperienceEntitiesSummary omitted. + +// de_ExperienceEntitiesSummaryList omitted. /** - * deserializeAws_json1_1ServiceNowKnowledgeArticleConfiguration + * deserializeAws_json1_1ExperiencesSummary */ -const de_ServiceNowKnowledgeArticleConfiguration = ( - output: any, - context: __SerdeContext -): ServiceNowKnowledgeArticleConfiguration => { - return { - CrawlAttachments: __expectBoolean(output.CrawlAttachments), - DocumentDataFieldName: __expectString(output.DocumentDataFieldName), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - ExcludeAttachmentFilePatterns: - output.ExcludeAttachmentFilePatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExcludeAttachmentFilePatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - FilterQuery: __expectString(output.FilterQuery), - IncludeAttachmentFilePatterns: - output.IncludeAttachmentFilePatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.IncludeAttachmentFilePatterns, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ServiceNowServiceCatalogConfiguration - */ -const de_ServiceNowServiceCatalogConfiguration = ( - output: any, - context: __SerdeContext -): ServiceNowServiceCatalogConfiguration => { - return { - CrawlAttachments: __expectBoolean(output.CrawlAttachments), - DocumentDataFieldName: __expectString(output.DocumentDataFieldName), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - ExcludeAttachmentFilePatterns: - output.ExcludeAttachmentFilePatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExcludeAttachmentFilePatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - IncludeAttachmentFilePatterns: - output.IncludeAttachmentFilePatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.IncludeAttachmentFilePatterns, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ExperiencesSummary = (output: any, context: __SerdeContext): ExperiencesSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Endpoints: _json, + Id: __expectString, + Name: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SharePointConfiguration + * deserializeAws_json1_1ExperiencesSummaryList */ -const de_SharePointConfiguration = (output: any, context: __SerdeContext): SharePointConfiguration => { - return { - AuthenticationType: __expectString(output.AuthenticationType), - CrawlAttachments: __expectBoolean(output.CrawlAttachments), - DisableLocalGroups: __expectBoolean(output.DisableLocalGroups), - DocumentTitleFieldName: __expectString(output.DocumentTitleFieldName), - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - ProxyConfiguration: - output.ProxyConfiguration != null ? de_ProxyConfiguration(output.ProxyConfiguration, context) : undefined, - SecretArn: __expectString(output.SecretArn), - SharePointVersion: __expectString(output.SharePointVersion), - SslCertificateS3Path: - output.SslCertificateS3Path != null ? de_S3Path(output.SslCertificateS3Path, context) : undefined, - Urls: output.Urls != null ? de_SharePointUrlList(output.Urls, context) : undefined, - UseChangeLog: __expectBoolean(output.UseChangeLog), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SharePointUrlList - */ -const de_SharePointUrlList = (output: any, context: __SerdeContext): string[] => { +const de_ExperiencesSummaryList = (output: any, context: __SerdeContext): ExperiencesSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ExperiencesSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SiteMapsConfiguration + * deserializeAws_json1_1FacetResult */ -const de_SiteMapsConfiguration = (output: any, context: __SerdeContext): SiteMapsConfiguration => { - return { - SiteMaps: output.SiteMaps != null ? de_SiteMapsList(output.SiteMaps, context) : undefined, - } as any; +const de_FacetResult = (output: any, context: __SerdeContext): FacetResult => { + return take(output, { + DocumentAttributeKey: __expectString, + DocumentAttributeValueCountPairs: (_: any) => de_DocumentAttributeValueCountPairList(_, context), + DocumentAttributeValueType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SiteMapsList + * deserializeAws_json1_1FacetResultList */ -const de_SiteMapsList = (output: any, context: __SerdeContext): string[] => { +const de_FacetResultList = (output: any, context: __SerdeContext): FacetResult[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_FacetResult(entry, context); }); return retVal; }; +// de_FailedEntity omitted. + +// de_FailedEntityList omitted. + +// de_FaqIdsList omitted. + +// de_FaqStatistics omitted. + /** - * deserializeAws_json1_1SlackConfiguration + * deserializeAws_json1_1FaqSummary */ -const de_SlackConfiguration = (output: any, context: __SerdeContext): SlackConfiguration => { - return { - CrawlBotMessage: __expectBoolean(output.CrawlBotMessage), - ExcludeArchived: __expectBoolean(output.ExcludeArchived), - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - LookBackPeriod: __expectInt32(output.LookBackPeriod), - PrivateChannelFilter: - output.PrivateChannelFilter != null ? de_PrivateChannelFilter(output.PrivateChannelFilter, context) : undefined, - PublicChannelFilter: - output.PublicChannelFilter != null ? de_PublicChannelFilter(output.PublicChannelFilter, context) : undefined, - SecretArn: __expectString(output.SecretArn), - SinceCrawlDate: __expectString(output.SinceCrawlDate), - SlackEntityList: output.SlackEntityList != null ? de_SlackEntityList(output.SlackEntityList, context) : undefined, - TeamId: __expectString(output.TeamId), - UseChangeLog: __expectBoolean(output.UseChangeLog), - VpcConfiguration: - output.VpcConfiguration != null ? de_DataSourceVpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SlackEntityList - */ -const de_SlackEntityList = (output: any, context: __SerdeContext): (SlackEntity | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_FaqSummary = (output: any, context: __SerdeContext): FaqSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FileFormat: __expectString, + Id: __expectString, + LanguageCode: __expectString, + Name: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1SnapshotsDataHeaderFields + * deserializeAws_json1_1FaqSummaryItems */ -const de_SnapshotsDataHeaderFields = (output: any, context: __SerdeContext): string[] => { +const de_FaqSummaryItems = (output: any, context: __SerdeContext): FaqSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_FaqSummary(entry, context); }); return retVal; }; +// de_FeaturedDocument omitted. + +// de_FeaturedDocumentList omitted. + +// de_FeaturedDocumentMissing omitted. + +// de_FeaturedDocumentMissingList omitted. + +// de_FeaturedDocumentWithMetadata omitted. + +// de_FeaturedDocumentWithMetadataList omitted. + +// de_FeaturedResultsConflictException omitted. + /** - * deserializeAws_json1_1SnapshotsDataRecord + * deserializeAws_json1_1FeaturedResultsItem */ -const de_SnapshotsDataRecord = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_FeaturedResultsItem = (output: any, context: __SerdeContext): FeaturedResultsItem => { + return take(output, { + AdditionalAttributes: _json, + DocumentAttributes: (_: any) => de_DocumentAttributeList(_, context), + DocumentExcerpt: _json, + DocumentId: __expectString, + DocumentTitle: _json, + DocumentURI: __expectString, + FeedbackToken: __expectString, + Id: __expectString, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SnapshotsDataRecords + * deserializeAws_json1_1FeaturedResultsItemList */ -const de_SnapshotsDataRecords = (output: any, context: __SerdeContext): string[][] => { +const de_FeaturedResultsItemList = (output: any, context: __SerdeContext): FeaturedResultsItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SnapshotsDataRecord(entry, context); + return de_FeaturedResultsItem(entry, context); }); return retVal; }; +// de_FeaturedResultsSet omitted. + +// de_FeaturedResultsSetSummary omitted. + +// de_FeaturedResultsSetSummaryItems omitted. + +// de_FolderIdList omitted. + +// de_FsxConfiguration omitted. + +// de_GetQuerySuggestionsResponse omitted. + /** - * deserializeAws_json1_1SpellCorrectedQuery + * deserializeAws_json1_1GetSnapshotsResponse */ -const de_SpellCorrectedQuery = (output: any, context: __SerdeContext): SpellCorrectedQuery => { - return { - Corrections: output.Corrections != null ? de_CorrectionList(output.Corrections, context) : undefined, - SuggestedQueryText: __expectString(output.SuggestedQueryText), - } as any; +const de_GetSnapshotsResponse = (output: any, context: __SerdeContext): GetSnapshotsResponse => { + return take(output, { + NextToken: __expectString, + SnapShotTimeFilter: (_: any) => de_TimeRange(_, context), + SnapshotsData: _json, + SnapshotsDataHeader: _json, + }) as any; }; +// de_GitHubConfiguration omitted. + +// de_GitHubDocumentCrawlProperties omitted. + +// de_GoogleDriveConfiguration omitted. + /** - * deserializeAws_json1_1SpellCorrectedQueryList + * deserializeAws_json1_1GroupOrderingIdSummaries */ -const de_SpellCorrectedQueryList = (output: any, context: __SerdeContext): SpellCorrectedQuery[] => { +const de_GroupOrderingIdSummaries = (output: any, context: __SerdeContext): GroupOrderingIdSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SpellCorrectedQuery(entry, context); + return de_GroupOrderingIdSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SqlConfiguration + * deserializeAws_json1_1GroupOrderingIdSummary */ -const de_SqlConfiguration = (output: any, context: __SerdeContext): SqlConfiguration => { - return { - QueryIdentifiersEnclosingOption: __expectString(output.QueryIdentifiersEnclosingOption), - } as any; +const de_GroupOrderingIdSummary = (output: any, context: __SerdeContext): GroupOrderingIdSummary => { + return take(output, { + FailureReason: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrderingId: __expectLong, + ReceivedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; +// de_GroupSummary omitted. + +// de_HierarchicalPrincipal omitted. + +// de_HierarchicalPrincipalList omitted. + +// de_Highlight omitted. + +// de_HighlightList omitted. + /** - * deserializeAws_json1_1StartDataSourceSyncJobResponse + * deserializeAws_json1_1HookConfiguration */ -const de_StartDataSourceSyncJobResponse = (output: any, context: __SerdeContext): StartDataSourceSyncJobResponse => { - return { - ExecutionId: __expectString(output.ExecutionId), - } as any; +const de_HookConfiguration = (output: any, context: __SerdeContext): HookConfiguration => { + return take(output, { + InvocationCondition: (_: any) => de_DocumentAttributeCondition(_, context), + LambdaArn: __expectString, + S3Bucket: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Status + * deserializeAws_json1_1IndexConfigurationSummary */ -const de_Status = (output: any, context: __SerdeContext): Status => { - return { - DocumentId: __expectString(output.DocumentId), - DocumentStatus: __expectString(output.DocumentStatus), - FailureCode: __expectString(output.FailureCode), - FailureReason: __expectString(output.FailureReason), - } as any; +const de_IndexConfigurationSummary = (output: any, context: __SerdeContext): IndexConfigurationSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Edition: __expectString, + Id: __expectString, + Name: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1IndexConfigurationSummaryList */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { +const de_IndexConfigurationSummaryList = (output: any, context: __SerdeContext): IndexConfigurationSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_IndexConfigurationSummary(entry, context); }); return retVal; }; +// de_IndexStatistics omitted. + +/** + * deserializeAws_json1_1InlineCustomDocumentEnrichmentConfiguration + */ +const de_InlineCustomDocumentEnrichmentConfiguration = ( + output: any, + context: __SerdeContext +): InlineCustomDocumentEnrichmentConfiguration => { + return take(output, { + Condition: (_: any) => de_DocumentAttributeCondition(_, context), + DocumentContentDeletion: __expectBoolean, + Target: (_: any) => de_DocumentAttributeTarget(_, context), + }) as any; +}; + /** - * deserializeAws_json1_1SubnetIdList + * deserializeAws_json1_1InlineCustomDocumentEnrichmentConfigurationList */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { +const de_InlineCustomDocumentEnrichmentConfigurationList = ( + output: any, + context: __SerdeContext +): InlineCustomDocumentEnrichmentConfiguration[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_InlineCustomDocumentEnrichmentConfiguration(entry, context); }); return retVal; }; +// de_InternalServerException omitted. + +// de_InvalidRequestException omitted. + +// de_IssueSubEntityFilter omitted. + +// de_IssueType omitted. + +// de_JiraConfiguration omitted. + +// de_JiraStatus omitted. + +// de_JsonTokenTypeConfiguration omitted. + +// de_JwtTokenTypeConfiguration omitted. + +// de_ListAccessControlConfigurationsResponse omitted. + /** - * deserializeAws_json1_1Suggestion + * deserializeAws_json1_1ListDataSourcesResponse */ -const de_Suggestion = (output: any, context: __SerdeContext): Suggestion => { - return { - Id: __expectString(output.Id), - Value: output.Value != null ? de_SuggestionValue(output.Value, context) : undefined, - } as any; +const de_ListDataSourcesResponse = (output: any, context: __SerdeContext): ListDataSourcesResponse => { + return take(output, { + NextToken: __expectString, + SummaryItems: (_: any) => de_DataSourceSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SuggestionHighlight + * deserializeAws_json1_1ListDataSourceSyncJobsResponse */ -const de_SuggestionHighlight = (output: any, context: __SerdeContext): SuggestionHighlight => { - return { - BeginOffset: __expectInt32(output.BeginOffset), - EndOffset: __expectInt32(output.EndOffset), - } as any; +const de_ListDataSourceSyncJobsResponse = (output: any, context: __SerdeContext): ListDataSourceSyncJobsResponse => { + return take(output, { + History: (_: any) => de_DataSourceSyncJobHistoryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SuggestionHighlightList + * deserializeAws_json1_1ListEntityPersonasResponse */ -const de_SuggestionHighlightList = (output: any, context: __SerdeContext): SuggestionHighlight[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SuggestionHighlight(entry, context); - }); - return retVal; +const de_ListEntityPersonasResponse = (output: any, context: __SerdeContext): ListEntityPersonasResponse => { + return take(output, { + NextToken: __expectString, + SummaryItems: (_: any) => de_PersonasSummaryList(_, context), + }) as any; }; +// de_ListExperienceEntitiesResponse omitted. + /** - * deserializeAws_json1_1SuggestionList + * deserializeAws_json1_1ListExperiencesResponse */ -const de_SuggestionList = (output: any, context: __SerdeContext): Suggestion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Suggestion(entry, context); - }); - return retVal; +const de_ListExperiencesResponse = (output: any, context: __SerdeContext): ListExperiencesResponse => { + return take(output, { + NextToken: __expectString, + SummaryItems: (_: any) => de_ExperiencesSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SuggestionTextWithHighlights + * deserializeAws_json1_1ListFaqsResponse */ -const de_SuggestionTextWithHighlights = (output: any, context: __SerdeContext): SuggestionTextWithHighlights => { - return { - Highlights: output.Highlights != null ? de_SuggestionHighlightList(output.Highlights, context) : undefined, - Text: __expectString(output.Text), - } as any; +const de_ListFaqsResponse = (output: any, context: __SerdeContext): ListFaqsResponse => { + return take(output, { + FaqSummaryItems: (_: any) => de_FaqSummaryItems(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListFeaturedResultsSetsResponse omitted. + +// de_ListGroupsOlderThanOrderingIdResponse omitted. + /** - * deserializeAws_json1_1SuggestionValue + * deserializeAws_json1_1ListIndicesResponse */ -const de_SuggestionValue = (output: any, context: __SerdeContext): SuggestionValue => { - return { - Text: output.Text != null ? de_SuggestionTextWithHighlights(output.Text, context) : undefined, - } as any; +const de_ListIndicesResponse = (output: any, context: __SerdeContext): ListIndicesResponse => { + return take(output, { + IndexConfigurationSummaryItems: (_: any) => de_IndexConfigurationSummaryList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListOfGroupSummaries omitted. + /** - * deserializeAws_json1_1TableCell + * deserializeAws_json1_1ListQuerySuggestionsBlockListsResponse */ -const de_TableCell = (output: any, context: __SerdeContext): TableCell => { - return { - Header: __expectBoolean(output.Header), - Highlighted: __expectBoolean(output.Highlighted), - TopAnswer: __expectBoolean(output.TopAnswer), - Value: __expectString(output.Value), - } as any; +const de_ListQuerySuggestionsBlockListsResponse = ( + output: any, + context: __SerdeContext +): ListQuerySuggestionsBlockListsResponse => { + return take(output, { + BlockListSummaryItems: (_: any) => de_QuerySuggestionsBlockListSummaryItems(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_ListTagsForResourceResponse omitted. + +/** + * deserializeAws_json1_1ListThesauriResponse + */ +const de_ListThesauriResponse = (output: any, context: __SerdeContext): ListThesauriResponse => { + return take(output, { + NextToken: __expectString, + ThesaurusSummaryItems: (_: any) => de_ThesaurusSummaryItems(_, context), + }) as any; +}; + +// de_OneDriveConfiguration omitted. + +// de_OneDriveUserList omitted. + +// de_OneDriveUsers omitted. + +// de_OnPremiseConfiguration omitted. + +/** + * deserializeAws_json1_1PersonasSummary + */ +const de_PersonasSummary = (output: any, context: __SerdeContext): PersonasSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EntityId: __expectString, + Persona: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1TableCellList + * deserializeAws_json1_1PersonasSummaryList */ -const de_TableCellList = (output: any, context: __SerdeContext): TableCell[] => { +const de_PersonasSummaryList = (output: any, context: __SerdeContext): PersonasSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableCell(entry, context); + return de_PersonasSummary(entry, context); }); return retVal; }; +// de_Principal omitted. + +// de_PrincipalList omitted. + +// de_PrivateChannelFilter omitted. + +// de_Project omitted. + +// de_ProxyConfiguration omitted. + +// de_PublicChannelFilter omitted. + /** - * deserializeAws_json1_1TableExcerpt + * deserializeAws_json1_1QueryResult */ -const de_TableExcerpt = (output: any, context: __SerdeContext): TableExcerpt => { - return { - Rows: output.Rows != null ? de_TableRowList(output.Rows, context) : undefined, - TotalNumberOfRows: __expectInt32(output.TotalNumberOfRows), - } as any; +const de_QueryResult = (output: any, context: __SerdeContext): QueryResult => { + return take(output, { + FacetResults: (_: any) => de_FacetResultList(_, context), + FeaturedResultsItems: (_: any) => de_FeaturedResultsItemList(_, context), + QueryId: __expectString, + ResultItems: (_: any) => de_QueryResultItemList(_, context), + SpellCorrectedQueries: _json, + TotalNumberOfResults: __expectInt32, + Warnings: _json, + }) as any; }; /** - * deserializeAws_json1_1TableRow + * deserializeAws_json1_1QueryResultItem */ -const de_TableRow = (output: any, context: __SerdeContext): TableRow => { - return { - Cells: output.Cells != null ? de_TableCellList(output.Cells, context) : undefined, - } as any; +const de_QueryResultItem = (output: any, context: __SerdeContext): QueryResultItem => { + return take(output, { + AdditionalAttributes: _json, + DocumentAttributes: (_: any) => de_DocumentAttributeList(_, context), + DocumentExcerpt: _json, + DocumentId: __expectString, + DocumentTitle: _json, + DocumentURI: __expectString, + FeedbackToken: __expectString, + Format: __expectString, + Id: __expectString, + ScoreAttributes: _json, + TableExcerpt: _json, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TableRowList + * deserializeAws_json1_1QueryResultItemList */ -const de_TableRowList = (output: any, context: __SerdeContext): TableRow[] => { +const de_QueryResultItemList = (output: any, context: __SerdeContext): QueryResultItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableRow(entry, context); + return de_QueryResultItem(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1QuerySuggestionsBlockListSummary */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_QuerySuggestionsBlockListSummary = ( + output: any, + context: __SerdeContext +): QuerySuggestionsBlockListSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + ItemCount: __expectInt32, + Name: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1QuerySuggestionsBlockListSummaryItems */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_QuerySuggestionsBlockListSummaryItems = ( + output: any, + context: __SerdeContext +): QuerySuggestionsBlockListSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_QuerySuggestionsBlockListSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_QueryTextList omitted. + +// de_QuipConfiguration omitted. + +// de_Relevance omitted. + +// de_RepositoryNames omitted. + +// de_ResourceAlreadyExistException omitted. + +// de_ResourceInUseException omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceUnavailableException omitted. + +// de_S3DataSourceConfiguration omitted. + +// de_S3Path omitted. + +// de_SaaSConfiguration omitted. + +// de_SalesforceChatterFeedConfiguration omitted. + +// de_SalesforceChatterFeedIncludeFilterTypes omitted. + +// de_SalesforceConfiguration omitted. + +// de_SalesforceCustomKnowledgeArticleTypeConfiguration omitted. + +// de_SalesforceCustomKnowledgeArticleTypeConfigurationList omitted. + +// de_SalesforceKnowledgeArticleConfiguration omitted. + +// de_SalesforceKnowledgeArticleStateList omitted. + +// de_SalesforceStandardKnowledgeArticleTypeConfiguration omitted. + +// de_SalesforceStandardObjectAttachmentConfiguration omitted. + +// de_SalesforceStandardObjectConfiguration omitted. + +// de_SalesforceStandardObjectConfigurationList omitted. + +// de_ScoreAttributes omitted. + +// de_Search omitted. + +// de_SecurityGroupIdList omitted. + +// de_SeedUrlConfiguration omitted. + +// de_SeedUrlList omitted. + +// de_ServerSideEncryptionConfiguration omitted. + +// de_ServiceNowConfiguration omitted. + +// de_ServiceNowKnowledgeArticleConfiguration omitted. + +// de_ServiceNowServiceCatalogConfiguration omitted. + +// de_ServiceQuotaExceededException omitted. + +// de_SharePointConfiguration omitted. + +// de_SharePointUrlList omitted. + +// de_SiteMapsConfiguration omitted. + +// de_SiteMapsList omitted. + +// de_SlackConfiguration omitted. + +// de_SlackEntityList omitted. + +// de_SnapshotsDataHeaderFields omitted. + +// de_SnapshotsDataRecord omitted. + +// de_SnapshotsDataRecords omitted. + +// de_SpellCorrectedQuery omitted. + +// de_SpellCorrectedQueryList omitted. + +// de_SqlConfiguration omitted. + +// de_StartDataSourceSyncJobResponse omitted. + +// de_Status omitted. + +// de_StringList omitted. + +// de_SubnetIdList omitted. + +// de_Suggestion omitted. + +// de_SuggestionHighlight omitted. + +// de_SuggestionHighlightList omitted. + +// de_SuggestionList omitted. + +// de_SuggestionTextWithHighlights omitted. + +// de_SuggestionValue omitted. + +// de_TableCell omitted. + +// de_TableCellList omitted. + +// de_TableExcerpt omitted. + +// de_TableRow omitted. + +// de_TableRowList omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1Template @@ -12649,44 +7329,26 @@ const de_Template = (output: any, context: __SerdeContext): __DocumentType => { * deserializeAws_json1_1TemplateConfiguration */ const de_TemplateConfiguration = (output: any, context: __SerdeContext): TemplateConfiguration => { - return { - Template: output.Template != null ? de_Template(output.Template, context) : undefined, - } as any; + return take(output, { + Template: (_: any) => de_Template(_, context), + }) as any; }; -/** - * deserializeAws_json1_1TextDocumentStatistics - */ -const de_TextDocumentStatistics = (output: any, context: __SerdeContext): TextDocumentStatistics => { - return { - IndexedTextBytes: __expectLong(output.IndexedTextBytes), - IndexedTextDocumentsCount: __expectInt32(output.IndexedTextDocumentsCount), - } as any; -}; +// de_TextDocumentStatistics omitted. -/** - * deserializeAws_json1_1TextWithHighlights - */ -const de_TextWithHighlights = (output: any, context: __SerdeContext): TextWithHighlights => { - return { - Highlights: output.Highlights != null ? de_HighlightList(output.Highlights, context) : undefined, - Text: __expectString(output.Text), - } as any; -}; +// de_TextWithHighlights omitted. /** * deserializeAws_json1_1ThesaurusSummary */ const de_ThesaurusSummary = (output: any, context: __SerdeContext): ThesaurusSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Name: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -12696,226 +7358,66 @@ const de_ThesaurusSummaryItems = (output: any, context: __SerdeContext): Thesaur const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThesaurusSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. /** * deserializeAws_json1_1TimeRange */ const de_TimeRange = (output: any, context: __SerdeContext): TimeRange => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateAccessControlConfigurationResponse - */ -const de_UpdateAccessControlConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateAccessControlConfigurationResponse => { - return {} as any; -}; +// de_UpdateAccessControlConfigurationResponse omitted. -/** - * deserializeAws_json1_1UpdateFeaturedResultsSetResponse - */ -const de_UpdateFeaturedResultsSetResponse = ( - output: any, - context: __SerdeContext -): UpdateFeaturedResultsSetResponse => { - return { - FeaturedResultsSet: - output.FeaturedResultsSet != null ? de_FeaturedResultsSet(output.FeaturedResultsSet, context) : undefined, - } as any; -}; +// de_UpdateFeaturedResultsSetResponse omitted. -/** - * deserializeAws_json1_1Urls - */ -const de_Urls = (output: any, context: __SerdeContext): Urls => { - return { - SeedUrlConfiguration: - output.SeedUrlConfiguration != null ? de_SeedUrlConfiguration(output.SeedUrlConfiguration, context) : undefined, - SiteMapsConfiguration: - output.SiteMapsConfiguration != null - ? de_SiteMapsConfiguration(output.SiteMapsConfiguration, context) - : undefined, - } as any; -}; +// de_Urls omitted. -/** - * deserializeAws_json1_1UserGroupResolutionConfiguration - */ -const de_UserGroupResolutionConfiguration = ( - output: any, - context: __SerdeContext -): UserGroupResolutionConfiguration => { - return { - UserGroupResolutionMode: __expectString(output.UserGroupResolutionMode), - } as any; -}; +// de_UserGroupResolutionConfiguration omitted. -/** - * deserializeAws_json1_1UserIdentityConfiguration - */ -const de_UserIdentityConfiguration = (output: any, context: __SerdeContext): UserIdentityConfiguration => { - return { - IdentityAttributeName: __expectString(output.IdentityAttributeName), - } as any; -}; +// de_UserIdentityConfiguration omitted. -/** - * deserializeAws_json1_1UserTokenConfiguration - */ -const de_UserTokenConfiguration = (output: any, context: __SerdeContext): UserTokenConfiguration => { - return { - JsonTokenTypeConfiguration: - output.JsonTokenTypeConfiguration != null - ? de_JsonTokenTypeConfiguration(output.JsonTokenTypeConfiguration, context) - : undefined, - JwtTokenTypeConfiguration: - output.JwtTokenTypeConfiguration != null - ? de_JwtTokenTypeConfiguration(output.JwtTokenTypeConfiguration, context) - : undefined, - } as any; -}; +// de_UserTokenConfiguration omitted. -/** - * deserializeAws_json1_1UserTokenConfigurationList - */ -const de_UserTokenConfigurationList = (output: any, context: __SerdeContext): UserTokenConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserTokenConfiguration(entry, context); - }); - return retVal; -}; +// de_UserTokenConfigurationList omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1ValueImportanceMap - */ -const de_ValueImportanceMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_ValueImportanceMap omitted. -/** - * deserializeAws_json1_1Warning - */ -const de_Warning = (output: any, context: __SerdeContext): Warning => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_Warning omitted. -/** - * deserializeAws_json1_1WarningList - */ -const de_WarningList = (output: any, context: __SerdeContext): Warning[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Warning(entry, context); - }); - return retVal; -}; +// de_WarningList omitted. /** * deserializeAws_json1_1WebCrawlerConfiguration */ const de_WebCrawlerConfiguration = (output: any, context: __SerdeContext): WebCrawlerConfiguration => { - return { - AuthenticationConfiguration: - output.AuthenticationConfiguration != null - ? de_AuthenticationConfiguration(output.AuthenticationConfiguration, context) - : undefined, - CrawlDepth: __expectInt32(output.CrawlDepth), - MaxContentSizePerPageInMegaBytes: __limitedParseFloat32(output.MaxContentSizePerPageInMegaBytes), - MaxLinksPerPage: __expectInt32(output.MaxLinksPerPage), - MaxUrlsPerMinuteCrawlRate: __expectInt32(output.MaxUrlsPerMinuteCrawlRate), - ProxyConfiguration: - output.ProxyConfiguration != null ? de_ProxyConfiguration(output.ProxyConfiguration, context) : undefined, - UrlExclusionPatterns: - output.UrlExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.UrlExclusionPatterns, context) - : undefined, - UrlInclusionPatterns: - output.UrlInclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.UrlInclusionPatterns, context) - : undefined, - Urls: output.Urls != null ? de_Urls(output.Urls, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1WorkDocsConfiguration - */ -const de_WorkDocsConfiguration = (output: any, context: __SerdeContext): WorkDocsConfiguration => { - return { - CrawlComments: __expectBoolean(output.CrawlComments), - ExclusionPatterns: - output.ExclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.ExclusionPatterns, context) - : undefined, - FieldMappings: - output.FieldMappings != null ? de_DataSourceToIndexFieldMappingList(output.FieldMappings, context) : undefined, - InclusionPatterns: - output.InclusionPatterns != null - ? de_DataSourceInclusionsExclusionsStrings(output.InclusionPatterns, context) - : undefined, - OrganizationId: __expectString(output.OrganizationId), - UseChangeLog: __expectBoolean(output.UseChangeLog), - } as any; + return take(output, { + AuthenticationConfiguration: _json, + CrawlDepth: __expectInt32, + MaxContentSizePerPageInMegaBytes: __limitedParseFloat32, + MaxLinksPerPage: __expectInt32, + MaxUrlsPerMinuteCrawlRate: __expectInt32, + ProxyConfiguration: _json, + UrlExclusionPatterns: _json, + UrlInclusionPatterns: _json, + Urls: _json, + }) as any; }; +// de_WorkDocsConfiguration omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -12936,6 +7438,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-keyspaces/src/protocols/Aws_json1_0.ts b/clients/client-keyspaces/src/protocols/Aws_json1_0.ts index cd4bcf82e0d3..9205a13dca67 100644 --- a/clients/client-keyspaces/src/protocols/Aws_json1_0.ts +++ b/clients/client-keyspaces/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -44,44 +46,30 @@ import { Comment, ConflictException, CreateKeyspaceRequest, - CreateKeyspaceResponse, CreateTableRequest, - CreateTableResponse, DeleteKeyspaceRequest, - DeleteKeyspaceResponse, DeleteTableRequest, - DeleteTableResponse, EncryptionSpecification, GetKeyspaceRequest, - GetKeyspaceResponse, GetTableRequest, GetTableResponse, InternalServerException, - KeyspaceSummary, ListKeyspacesRequest, - ListKeyspacesResponse, ListTablesRequest, - ListTablesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, PartitionKey, PointInTimeRecovery, PointInTimeRecoverySummary, ResourceNotFoundException, RestoreTableRequest, - RestoreTableResponse, SchemaDefinition, ServiceQuotaExceededException, StaticColumn, - TableSummary, Tag, TagResourceRequest, - TagResourceResponse, TimeToLive, UntagResourceRequest, - UntagResourceResponse, UpdateTableRequest, - UpdateTableResponse, ValidationException, } from "../models/models_0"; @@ -94,7 +82,7 @@ export const se_CreateKeyspaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateKeyspace"); let body: any; - body = JSON.stringify(se_CreateKeyspaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -107,7 +95,7 @@ export const se_CreateTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTable"); let body: any; - body = JSON.stringify(se_CreateTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -120,7 +108,7 @@ export const se_DeleteKeyspaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteKeyspace"); let body: any; - body = JSON.stringify(se_DeleteKeyspaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -133,7 +121,7 @@ export const se_DeleteTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTable"); let body: any; - body = JSON.stringify(se_DeleteTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -146,7 +134,7 @@ export const se_GetKeyspaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetKeyspace"); let body: any; - body = JSON.stringify(se_GetKeyspaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -159,7 +147,7 @@ export const se_GetTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTable"); let body: any; - body = JSON.stringify(se_GetTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -172,7 +160,7 @@ export const se_ListKeyspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListKeyspaces"); let body: any; - body = JSON.stringify(se_ListKeyspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -185,7 +173,7 @@ export const se_ListTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTables"); let body: any; - body = JSON.stringify(se_ListTablesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -198,7 +186,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -224,7 +212,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -237,7 +225,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -250,7 +238,7 @@ export const se_UpdateTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTable"); let body: any; - body = JSON.stringify(se_UpdateTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -266,12 +254,12 @@ export const de_CreateKeyspaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateKeyspaceResponse(data, context); + contents = _json(data); const response: CreateKeyspaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -304,10 +292,9 @@ const de_CreateKeyspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -325,12 +312,12 @@ export const de_CreateTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTableResponse(data, context); + contents = _json(data); const response: CreateTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -366,10 +353,9 @@ const de_CreateTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -387,12 +373,12 @@ export const de_DeleteKeyspaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteKeyspaceResponse(data, context); + contents = _json(data); const response: DeleteKeyspaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -428,10 +414,9 @@ const de_DeleteKeyspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -449,12 +434,12 @@ export const de_DeleteTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTableResponse(data, context); + contents = _json(data); const response: DeleteTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -490,10 +475,9 @@ const de_DeleteTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -511,12 +495,12 @@ export const de_GetKeyspaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetKeyspaceResponse(data, context); + contents = _json(data); const response: GetKeyspaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -549,10 +533,9 @@ const de_GetKeyspaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -575,7 +558,7 @@ export const de_GetTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -608,10 +591,9 @@ const de_GetTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -629,12 +611,12 @@ export const de_ListKeyspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListKeyspacesResponse(data, context); + contents = _json(data); const response: ListKeyspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -667,10 +649,9 @@ const de_ListKeyspacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -688,12 +669,12 @@ export const de_ListTablesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTablesResponse(data, context); + contents = _json(data); const response: ListTablesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -726,10 +707,9 @@ const de_ListTablesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -747,12 +727,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -785,10 +765,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -806,12 +785,12 @@ export const de_RestoreTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RestoreTableResponse(data, context); + contents = _json(data); const response: RestoreTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -847,10 +826,9 @@ const de_RestoreTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -868,12 +846,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -906,10 +884,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -927,12 +904,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -968,10 +945,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -989,12 +965,12 @@ export const de_UpdateTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTableResponse(data, context); + contents = _json(data); const response: UpdateTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1030,10 +1006,9 @@ const de_UpdateTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1047,7 +1022,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1060,7 +1035,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1076,7 +1051,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1092,7 +1067,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1108,7 +1083,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1121,7 +1096,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1129,797 +1104,197 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0CapacitySpecification - */ -const se_CapacitySpecification = (input: CapacitySpecification, context: __SerdeContext): any => { - return { - ...(input.readCapacityUnits != null && { readCapacityUnits: input.readCapacityUnits }), - ...(input.throughputMode != null && { throughputMode: input.throughputMode }), - ...(input.writeCapacityUnits != null && { writeCapacityUnits: input.writeCapacityUnits }), - }; -}; +// se_CapacitySpecification omitted. -/** - * serializeAws_json1_0ClientSideTimestamps - */ -const se_ClientSideTimestamps = (input: ClientSideTimestamps, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_ClientSideTimestamps omitted. -/** - * serializeAws_json1_0ClusteringKey - */ -const se_ClusteringKey = (input: ClusteringKey, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; -}; +// se_ClusteringKey omitted. -/** - * serializeAws_json1_0ClusteringKeyList - */ -const se_ClusteringKeyList = (input: ClusteringKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ClusteringKey(entry, context); - }); -}; +// se_ClusteringKeyList omitted. -/** - * serializeAws_json1_0ColumnDefinition - */ -const se_ColumnDefinition = (input: ColumnDefinition, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ColumnDefinition omitted. -/** - * serializeAws_json1_0ColumnDefinitionList - */ -const se_ColumnDefinitionList = (input: ColumnDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnDefinition(entry, context); - }); -}; +// se_ColumnDefinitionList omitted. -/** - * serializeAws_json1_0Comment - */ -const se_Comment = (input: Comment, context: __SerdeContext): any => { - return { - ...(input.message != null && { message: input.message }), - }; -}; +// se_Comment omitted. -/** - * serializeAws_json1_0CreateKeyspaceRequest - */ -const se_CreateKeyspaceRequest = (input: CreateKeyspaceRequest, context: __SerdeContext): any => { - return { - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateKeyspaceRequest omitted. -/** - * serializeAws_json1_0CreateTableRequest - */ -const se_CreateTableRequest = (input: CreateTableRequest, context: __SerdeContext): any => { - return { - ...(input.capacitySpecification != null && { - capacitySpecification: se_CapacitySpecification(input.capacitySpecification, context), - }), - ...(input.clientSideTimestamps != null && { - clientSideTimestamps: se_ClientSideTimestamps(input.clientSideTimestamps, context), - }), - ...(input.comment != null && { comment: se_Comment(input.comment, context) }), - ...(input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive }), - ...(input.encryptionSpecification != null && { - encryptionSpecification: se_EncryptionSpecification(input.encryptionSpecification, context), - }), - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - ...(input.pointInTimeRecovery != null && { - pointInTimeRecovery: se_PointInTimeRecovery(input.pointInTimeRecovery, context), - }), - ...(input.schemaDefinition != null && { schemaDefinition: se_SchemaDefinition(input.schemaDefinition, context) }), - ...(input.tableName != null && { tableName: input.tableName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.ttl != null && { ttl: se_TimeToLive(input.ttl, context) }), - }; -}; +// se_CreateTableRequest omitted. -/** - * serializeAws_json1_0DeleteKeyspaceRequest - */ -const se_DeleteKeyspaceRequest = (input: DeleteKeyspaceRequest, context: __SerdeContext): any => { - return { - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - }; -}; +// se_DeleteKeyspaceRequest omitted. -/** - * serializeAws_json1_0DeleteTableRequest - */ -const se_DeleteTableRequest = (input: DeleteTableRequest, context: __SerdeContext): any => { - return { - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; +// se_DeleteTableRequest omitted. -/** - * serializeAws_json1_0EncryptionSpecification - */ -const se_EncryptionSpecification = (input: EncryptionSpecification, context: __SerdeContext): any => { - return { - ...(input.kmsKeyIdentifier != null && { kmsKeyIdentifier: input.kmsKeyIdentifier }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_EncryptionSpecification omitted. -/** - * serializeAws_json1_0GetKeyspaceRequest - */ -const se_GetKeyspaceRequest = (input: GetKeyspaceRequest, context: __SerdeContext): any => { - return { - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - }; -}; +// se_GetKeyspaceRequest omitted. -/** - * serializeAws_json1_0GetTableRequest - */ -const se_GetTableRequest = (input: GetTableRequest, context: __SerdeContext): any => { - return { - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - ...(input.tableName != null && { tableName: input.tableName }), - }; -}; +// se_GetTableRequest omitted. -/** - * serializeAws_json1_0ListKeyspacesRequest - */ -const se_ListKeyspacesRequest = (input: ListKeyspacesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListKeyspacesRequest omitted. -/** - * serializeAws_json1_0ListTablesRequest - */ -const se_ListTablesRequest = (input: ListTablesRequest, context: __SerdeContext): any => { - return { - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListTablesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0PartitionKey - */ -const se_PartitionKey = (input: PartitionKey, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_PartitionKey omitted. -/** - * serializeAws_json1_0PartitionKeyList - */ -const se_PartitionKeyList = (input: PartitionKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PartitionKey(entry, context); - }); -}; +// se_PartitionKeyList omitted. -/** - * serializeAws_json1_0PointInTimeRecovery - */ -const se_PointInTimeRecovery = (input: PointInTimeRecovery, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_PointInTimeRecovery omitted. /** * serializeAws_json1_0RestoreTableRequest */ const se_RestoreTableRequest = (input: RestoreTableRequest, context: __SerdeContext): any => { - return { - ...(input.capacitySpecificationOverride != null && { - capacitySpecificationOverride: se_CapacitySpecification(input.capacitySpecificationOverride, context), - }), - ...(input.encryptionSpecificationOverride != null && { - encryptionSpecificationOverride: se_EncryptionSpecification(input.encryptionSpecificationOverride, context), - }), - ...(input.pointInTimeRecoveryOverride != null && { - pointInTimeRecoveryOverride: se_PointInTimeRecovery(input.pointInTimeRecoveryOverride, context), - }), - ...(input.restoreTimestamp != null && { restoreTimestamp: Math.round(input.restoreTimestamp.getTime() / 1000) }), - ...(input.sourceKeyspaceName != null && { sourceKeyspaceName: input.sourceKeyspaceName }), - ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }), - ...(input.tagsOverride != null && { tagsOverride: se_TagList(input.tagsOverride, context) }), - ...(input.targetKeyspaceName != null && { targetKeyspaceName: input.targetKeyspaceName }), - ...(input.targetTableName != null && { targetTableName: input.targetTableName }), - }; + return take(input, { + capacitySpecificationOverride: _json, + encryptionSpecificationOverride: _json, + pointInTimeRecoveryOverride: _json, + restoreTimestamp: (_) => Math.round(_.getTime() / 1000), + sourceKeyspaceName: [], + sourceTableName: [], + tagsOverride: _json, + targetKeyspaceName: [], + targetTableName: [], + }); }; -/** - * serializeAws_json1_0SchemaDefinition - */ -const se_SchemaDefinition = (input: SchemaDefinition, context: __SerdeContext): any => { - return { - ...(input.allColumns != null && { allColumns: se_ColumnDefinitionList(input.allColumns, context) }), - ...(input.clusteringKeys != null && { clusteringKeys: se_ClusteringKeyList(input.clusteringKeys, context) }), - ...(input.partitionKeys != null && { partitionKeys: se_PartitionKeyList(input.partitionKeys, context) }), - ...(input.staticColumns != null && { staticColumns: se_StaticColumnList(input.staticColumns, context) }), - }; -}; +// se_SchemaDefinition omitted. -/** - * serializeAws_json1_0StaticColumn - */ -const se_StaticColumn = (input: StaticColumn, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_StaticColumn omitted. -/** - * serializeAws_json1_0StaticColumnList - */ -const se_StaticColumnList = (input: StaticColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StaticColumn(entry, context); - }); -}; +// se_StaticColumnList omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0TimeToLive - */ -const se_TimeToLive = (input: TimeToLive, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_TimeToLive omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateTableRequest - */ -const se_UpdateTableRequest = (input: UpdateTableRequest, context: __SerdeContext): any => { - return { - ...(input.addColumns != null && { addColumns: se_ColumnDefinitionList(input.addColumns, context) }), - ...(input.capacitySpecification != null && { - capacitySpecification: se_CapacitySpecification(input.capacitySpecification, context), - }), - ...(input.clientSideTimestamps != null && { - clientSideTimestamps: se_ClientSideTimestamps(input.clientSideTimestamps, context), - }), - ...(input.defaultTimeToLive != null && { defaultTimeToLive: input.defaultTimeToLive }), - ...(input.encryptionSpecification != null && { - encryptionSpecification: se_EncryptionSpecification(input.encryptionSpecification, context), - }), - ...(input.keyspaceName != null && { keyspaceName: input.keyspaceName }), - ...(input.pointInTimeRecovery != null && { - pointInTimeRecovery: se_PointInTimeRecovery(input.pointInTimeRecovery, context), - }), - ...(input.tableName != null && { tableName: input.tableName }), - ...(input.ttl != null && { ttl: se_TimeToLive(input.ttl, context) }), - }; -}; +// se_UpdateTableRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_0CapacitySpecificationSummary */ const de_CapacitySpecificationSummary = (output: any, context: __SerdeContext): CapacitySpecificationSummary => { - return { - lastUpdateToPayPerRequestTimestamp: - output.lastUpdateToPayPerRequestTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdateToPayPerRequestTimestamp))) - : undefined, - readCapacityUnits: __expectLong(output.readCapacityUnits), - throughputMode: __expectString(output.throughputMode), - writeCapacityUnits: __expectLong(output.writeCapacityUnits), - } as any; + return take(output, { + lastUpdateToPayPerRequestTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + readCapacityUnits: __expectLong, + throughputMode: __expectString, + writeCapacityUnits: __expectLong, + }) as any; }; -/** - * deserializeAws_json1_0ClientSideTimestamps - */ -const de_ClientSideTimestamps = (output: any, context: __SerdeContext): ClientSideTimestamps => { - return { - status: __expectString(output.status), - } as any; -}; +// de_ClientSideTimestamps omitted. -/** - * deserializeAws_json1_0ClusteringKey - */ -const de_ClusteringKey = (output: any, context: __SerdeContext): ClusteringKey => { - return { - name: __expectString(output.name), - orderBy: __expectString(output.orderBy), - } as any; -}; +// de_ClusteringKey omitted. -/** - * deserializeAws_json1_0ClusteringKeyList - */ -const de_ClusteringKeyList = (output: any, context: __SerdeContext): ClusteringKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusteringKey(entry, context); - }); - return retVal; -}; +// de_ClusteringKeyList omitted. -/** - * deserializeAws_json1_0ColumnDefinition - */ -const de_ColumnDefinition = (output: any, context: __SerdeContext): ColumnDefinition => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_ColumnDefinition omitted. -/** - * deserializeAws_json1_0ColumnDefinitionList - */ -const de_ColumnDefinitionList = (output: any, context: __SerdeContext): ColumnDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnDefinition(entry, context); - }); - return retVal; -}; +// de_ColumnDefinitionList omitted. -/** - * deserializeAws_json1_0Comment - */ -const de_Comment = (output: any, context: __SerdeContext): Comment => { - return { - message: __expectString(output.message), - } as any; -}; +// de_Comment omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateKeyspaceResponse - */ -const de_CreateKeyspaceResponse = (output: any, context: __SerdeContext): CreateKeyspaceResponse => { - return { - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_CreateKeyspaceResponse omitted. -/** - * deserializeAws_json1_0CreateTableResponse - */ -const de_CreateTableResponse = (output: any, context: __SerdeContext): CreateTableResponse => { - return { - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_CreateTableResponse omitted. -/** - * deserializeAws_json1_0DeleteKeyspaceResponse - */ -const de_DeleteKeyspaceResponse = (output: any, context: __SerdeContext): DeleteKeyspaceResponse => { - return {} as any; -}; +// de_DeleteKeyspaceResponse omitted. -/** - * deserializeAws_json1_0DeleteTableResponse - */ -const de_DeleteTableResponse = (output: any, context: __SerdeContext): DeleteTableResponse => { - return {} as any; -}; +// de_DeleteTableResponse omitted. -/** - * deserializeAws_json1_0EncryptionSpecification - */ -const de_EncryptionSpecification = (output: any, context: __SerdeContext): EncryptionSpecification => { - return { - kmsKeyIdentifier: __expectString(output.kmsKeyIdentifier), - type: __expectString(output.type), - } as any; -}; +// de_EncryptionSpecification omitted. -/** - * deserializeAws_json1_0GetKeyspaceResponse - */ -const de_GetKeyspaceResponse = (output: any, context: __SerdeContext): GetKeyspaceResponse => { - return { - keyspaceName: __expectString(output.keyspaceName), - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_GetKeyspaceResponse omitted. /** * deserializeAws_json1_0GetTableResponse */ const de_GetTableResponse = (output: any, context: __SerdeContext): GetTableResponse => { - return { - capacitySpecification: - output.capacitySpecification != null - ? de_CapacitySpecificationSummary(output.capacitySpecification, context) - : undefined, - clientSideTimestamps: - output.clientSideTimestamps != null ? de_ClientSideTimestamps(output.clientSideTimestamps, context) : undefined, - comment: output.comment != null ? de_Comment(output.comment, context) : undefined, - creationTimestamp: - output.creationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTimestamp))) - : undefined, - defaultTimeToLive: __expectInt32(output.defaultTimeToLive), - encryptionSpecification: - output.encryptionSpecification != null - ? de_EncryptionSpecification(output.encryptionSpecification, context) - : undefined, - keyspaceName: __expectString(output.keyspaceName), - pointInTimeRecovery: - output.pointInTimeRecovery != null - ? de_PointInTimeRecoverySummary(output.pointInTimeRecovery, context) - : undefined, - resourceArn: __expectString(output.resourceArn), - schemaDefinition: - output.schemaDefinition != null ? de_SchemaDefinition(output.schemaDefinition, context) : undefined, - status: __expectString(output.status), - tableName: __expectString(output.tableName), - ttl: output.ttl != null ? de_TimeToLive(output.ttl, context) : undefined, - } as any; + return take(output, { + capacitySpecification: (_: any) => de_CapacitySpecificationSummary(_, context), + clientSideTimestamps: _json, + comment: _json, + creationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultTimeToLive: __expectInt32, + encryptionSpecification: _json, + keyspaceName: __expectString, + pointInTimeRecovery: (_: any) => de_PointInTimeRecoverySummary(_, context), + resourceArn: __expectString, + schemaDefinition: _json, + status: __expectString, + tableName: __expectString, + ttl: _json, + }) as any; }; -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0KeyspaceSummary - */ -const de_KeyspaceSummary = (output: any, context: __SerdeContext): KeyspaceSummary => { - return { - keyspaceName: __expectString(output.keyspaceName), - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_KeyspaceSummary omitted. -/** - * deserializeAws_json1_0KeyspaceSummaryList - */ -const de_KeyspaceSummaryList = (output: any, context: __SerdeContext): KeyspaceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyspaceSummary(entry, context); - }); - return retVal; -}; +// de_KeyspaceSummaryList omitted. -/** - * deserializeAws_json1_0ListKeyspacesResponse - */ -const de_ListKeyspacesResponse = (output: any, context: __SerdeContext): ListKeyspacesResponse => { - return { - keyspaces: output.keyspaces != null ? de_KeyspaceSummaryList(output.keyspaces, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListKeyspacesResponse omitted. -/** - * deserializeAws_json1_0ListTablesResponse - */ -const de_ListTablesResponse = (output: any, context: __SerdeContext): ListTablesResponse => { - return { - nextToken: __expectString(output.nextToken), - tables: output.tables != null ? de_TableSummaryList(output.tables, context) : undefined, - } as any; -}; +// de_ListTablesResponse omitted. -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0PartitionKey - */ -const de_PartitionKey = (output: any, context: __SerdeContext): PartitionKey => { - return { - name: __expectString(output.name), - } as any; -}; +// de_PartitionKey omitted. -/** - * deserializeAws_json1_0PartitionKeyList - */ -const de_PartitionKeyList = (output: any, context: __SerdeContext): PartitionKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartitionKey(entry, context); - }); - return retVal; -}; +// de_PartitionKeyList omitted. /** * deserializeAws_json1_0PointInTimeRecoverySummary */ const de_PointInTimeRecoverySummary = (output: any, context: __SerdeContext): PointInTimeRecoverySummary => { - return { - earliestRestorableTimestamp: - output.earliestRestorableTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.earliestRestorableTimestamp))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + earliestRestorableTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0RestoreTableResponse - */ -const de_RestoreTableResponse = (output: any, context: __SerdeContext): RestoreTableResponse => { - return { - restoredTableARN: __expectString(output.restoredTableARN), - } as any; -}; +// de_RestoreTableResponse omitted. -/** - * deserializeAws_json1_0SchemaDefinition - */ -const de_SchemaDefinition = (output: any, context: __SerdeContext): SchemaDefinition => { - return { - allColumns: output.allColumns != null ? de_ColumnDefinitionList(output.allColumns, context) : undefined, - clusteringKeys: output.clusteringKeys != null ? de_ClusteringKeyList(output.clusteringKeys, context) : undefined, - partitionKeys: output.partitionKeys != null ? de_PartitionKeyList(output.partitionKeys, context) : undefined, - staticColumns: output.staticColumns != null ? de_StaticColumnList(output.staticColumns, context) : undefined, - } as any; -}; +// de_SchemaDefinition omitted. -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_0StaticColumn - */ -const de_StaticColumn = (output: any, context: __SerdeContext): StaticColumn => { - return { - name: __expectString(output.name), - } as any; -}; +// de_StaticColumn omitted. -/** - * deserializeAws_json1_0StaticColumnList - */ -const de_StaticColumnList = (output: any, context: __SerdeContext): StaticColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StaticColumn(entry, context); - }); - return retVal; -}; +// de_StaticColumnList omitted. -/** - * deserializeAws_json1_0TableSummary - */ -const de_TableSummary = (output: any, context: __SerdeContext): TableSummary => { - return { - keyspaceName: __expectString(output.keyspaceName), - resourceArn: __expectString(output.resourceArn), - tableName: __expectString(output.tableName), - } as any; -}; +// de_TableSummary omitted. -/** - * deserializeAws_json1_0TableSummaryList - */ -const de_TableSummaryList = (output: any, context: __SerdeContext): TableSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableSummary(entry, context); - }); - return retVal; -}; +// de_TableSummaryList omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0TimeToLive - */ -const de_TimeToLive = (output: any, context: __SerdeContext): TimeToLive => { - return { - status: __expectString(output.status), - } as any; -}; +// de_TimeToLive omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_0UpdateTableResponse - */ -const de_UpdateTableResponse = (output: any, context: __SerdeContext): UpdateTableResponse => { - return { - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_UpdateTableResponse omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1941,6 +1316,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-kinesis-analytics-v2/src/protocols/Aws_json1_1.ts b/clients/client-kinesis-analytics-v2/src/protocols/Aws_json1_1.ts index d3abd3611ba4..800ea9be35c5 100644 --- a/clients/client-kinesis-analytics-v2/src/protocols/Aws_json1_1.ts +++ b/clients/client-kinesis-analytics-v2/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -121,71 +121,44 @@ import { import { KinesisAnalyticsV2ServiceException as __BaseException } from "../models/KinesisAnalyticsV2ServiceException"; import { AddApplicationCloudWatchLoggingOptionRequest, - AddApplicationCloudWatchLoggingOptionResponse, AddApplicationInputProcessingConfigurationRequest, - AddApplicationInputProcessingConfigurationResponse, AddApplicationInputRequest, - AddApplicationInputResponse, AddApplicationOutputRequest, - AddApplicationOutputResponse, AddApplicationReferenceDataSourceRequest, - AddApplicationReferenceDataSourceResponse, AddApplicationVpcConfigurationRequest, - AddApplicationVpcConfigurationResponse, ApplicationCodeConfiguration, - ApplicationCodeConfigurationDescription, ApplicationCodeConfigurationUpdate, ApplicationConfiguration, - ApplicationConfigurationDescription, ApplicationConfigurationUpdate, ApplicationDetail, - ApplicationMaintenanceConfigurationDescription, ApplicationMaintenanceConfigurationUpdate, ApplicationRestoreConfiguration, ApplicationSnapshotConfiguration, - ApplicationSnapshotConfigurationDescription, ApplicationSnapshotConfigurationUpdate, - ApplicationSummary, - ApplicationVersionSummary, CatalogConfiguration, - CatalogConfigurationDescription, CatalogConfigurationUpdate, CheckpointConfiguration, - CheckpointConfigurationDescription, CheckpointConfigurationUpdate, CloudWatchLoggingOption, - CloudWatchLoggingOptionDescription, CloudWatchLoggingOptionUpdate, CodeContent, - CodeContentDescription, CodeContentUpdate, CodeValidationException, ConcurrentModificationException, CreateApplicationPresignedUrlRequest, - CreateApplicationPresignedUrlResponse, CreateApplicationRequest, CreateApplicationResponse, CreateApplicationSnapshotRequest, - CreateApplicationSnapshotResponse, CSVMappingParameters, CustomArtifactConfiguration, - CustomArtifactConfigurationDescription, DeleteApplicationCloudWatchLoggingOptionRequest, - DeleteApplicationCloudWatchLoggingOptionResponse, DeleteApplicationInputProcessingConfigurationRequest, - DeleteApplicationInputProcessingConfigurationResponse, DeleteApplicationOutputRequest, - DeleteApplicationOutputResponse, DeleteApplicationReferenceDataSourceRequest, - DeleteApplicationReferenceDataSourceResponse, DeleteApplicationRequest, - DeleteApplicationResponse, DeleteApplicationSnapshotRequest, - DeleteApplicationSnapshotResponse, DeleteApplicationVpcConfigurationRequest, - DeleteApplicationVpcConfigurationResponse, DeployAsApplicationConfiguration, - DeployAsApplicationConfigurationDescription, DeployAsApplicationConfigurationUpdate, DescribeApplicationRequest, DescribeApplicationResponse, @@ -195,26 +168,19 @@ import { DescribeApplicationVersionResponse, DestinationSchema, DiscoverInputSchemaRequest, - DiscoverInputSchemaResponse, EnvironmentProperties, - EnvironmentPropertyDescriptions, EnvironmentPropertyUpdates, FlinkApplicationConfiguration, - FlinkApplicationConfigurationDescription, FlinkApplicationConfigurationUpdate, FlinkRunConfiguration, GlueDataCatalogConfiguration, - GlueDataCatalogConfigurationDescription, GlueDataCatalogConfigurationUpdate, Input, - InputDescription, InputLambdaProcessor, - InputLambdaProcessorDescription, InputLambdaProcessorUpdate, InputParallelism, InputParallelismUpdate, InputProcessingConfiguration, - InputProcessingConfigurationDescription, InputProcessingConfigurationUpdate, InputSchemaUpdate, InputStartingPositionConfiguration, @@ -224,45 +190,33 @@ import { InvalidRequestException, JSONMappingParameters, KinesisFirehoseInput, - KinesisFirehoseInputDescription, KinesisFirehoseInputUpdate, KinesisFirehoseOutput, - KinesisFirehoseOutputDescription, KinesisFirehoseOutputUpdate, KinesisStreamsInput, - KinesisStreamsInputDescription, KinesisStreamsInputUpdate, KinesisStreamsOutput, - KinesisStreamsOutputDescription, KinesisStreamsOutputUpdate, LambdaOutput, - LambdaOutputDescription, LambdaOutputUpdate, LimitExceededException, ListApplicationSnapshotsRequest, ListApplicationSnapshotsResponse, ListApplicationsRequest, - ListApplicationsResponse, ListApplicationVersionsRequest, - ListApplicationVersionsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MappingParameters, MavenReference, MonitoringConfiguration, - MonitoringConfigurationDescription, MonitoringConfigurationUpdate, Output, - OutputDescription, OutputUpdate, ParallelismConfiguration, - ParallelismConfigurationDescription, ParallelismConfigurationUpdate, PropertyGroup, RecordColumn, RecordFormat, ReferenceDataSource, - ReferenceDataSourceDescription, ReferenceDataSourceUpdate, ResourceInUseException, ResourceNotFoundException, @@ -270,49 +224,36 @@ import { RollbackApplicationRequest, RollbackApplicationResponse, RunConfiguration, - RunConfigurationDescription, RunConfigurationUpdate, - S3ApplicationCodeLocationDescription, S3Configuration, S3ContentBaseLocation, - S3ContentBaseLocationDescription, S3ContentBaseLocationUpdate, S3ContentLocation, S3ContentLocationUpdate, S3ReferenceDataSource, - S3ReferenceDataSourceDescription, S3ReferenceDataSourceUpdate, ServiceUnavailableException, SnapshotDetails, SourceSchema, SqlApplicationConfiguration, - SqlApplicationConfigurationDescription, SqlApplicationConfigurationUpdate, SqlRunConfiguration, StartApplicationRequest, - StartApplicationResponse, StopApplicationRequest, - StopApplicationResponse, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagsException, UnableToDetectSchemaException, UnsupportedOperationException, UntagResourceRequest, - UntagResourceResponse, UpdateApplicationMaintenanceConfigurationRequest, - UpdateApplicationMaintenanceConfigurationResponse, UpdateApplicationRequest, UpdateApplicationResponse, VpcConfiguration, - VpcConfigurationDescription, VpcConfigurationUpdate, ZeppelinApplicationConfiguration, - ZeppelinApplicationConfigurationDescription, ZeppelinApplicationConfigurationUpdate, ZeppelinMonitoringConfiguration, - ZeppelinMonitoringConfigurationDescription, ZeppelinMonitoringConfigurationUpdate, } from "../models/models_0"; @@ -325,7 +266,7 @@ export const se_AddApplicationCloudWatchLoggingOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationCloudWatchLoggingOption"); let body: any; - body = JSON.stringify(se_AddApplicationCloudWatchLoggingOptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -338,7 +279,7 @@ export const se_AddApplicationInputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationInput"); let body: any; - body = JSON.stringify(se_AddApplicationInputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -351,7 +292,7 @@ export const se_AddApplicationInputProcessingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationInputProcessingConfiguration"); let body: any; - body = JSON.stringify(se_AddApplicationInputProcessingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -364,7 +305,7 @@ export const se_AddApplicationOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationOutput"); let body: any; - body = JSON.stringify(se_AddApplicationOutputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +318,7 @@ export const se_AddApplicationReferenceDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationReferenceDataSource"); let body: any; - body = JSON.stringify(se_AddApplicationReferenceDataSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +331,7 @@ export const se_AddApplicationVpcConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationVpcConfiguration"); let body: any; - body = JSON.stringify(se_AddApplicationVpcConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -416,7 +357,7 @@ export const se_CreateApplicationPresignedUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplicationPresignedUrl"); let body: any; - body = JSON.stringify(se_CreateApplicationPresignedUrlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -429,7 +370,7 @@ export const se_CreateApplicationSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplicationSnapshot"); let body: any; - body = JSON.stringify(se_CreateApplicationSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -455,7 +396,7 @@ export const se_DeleteApplicationCloudWatchLoggingOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationCloudWatchLoggingOption"); let body: any; - body = JSON.stringify(se_DeleteApplicationCloudWatchLoggingOptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -468,7 +409,7 @@ export const se_DeleteApplicationInputProcessingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationInputProcessingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteApplicationInputProcessingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -481,7 +422,7 @@ export const se_DeleteApplicationOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationOutput"); let body: any; - body = JSON.stringify(se_DeleteApplicationOutputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -494,7 +435,7 @@ export const se_DeleteApplicationReferenceDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationReferenceDataSource"); let body: any; - body = JSON.stringify(se_DeleteApplicationReferenceDataSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -520,7 +461,7 @@ export const se_DeleteApplicationVpcConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationVpcConfiguration"); let body: any; - body = JSON.stringify(se_DeleteApplicationVpcConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -533,7 +474,7 @@ export const se_DescribeApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplication"); let body: any; - body = JSON.stringify(se_DescribeApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -546,7 +487,7 @@ export const se_DescribeApplicationSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplicationSnapshot"); let body: any; - body = JSON.stringify(se_DescribeApplicationSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -559,7 +500,7 @@ export const se_DescribeApplicationVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplicationVersion"); let body: any; - body = JSON.stringify(se_DescribeApplicationVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -572,7 +513,7 @@ export const se_DiscoverInputSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DiscoverInputSchema"); let body: any; - body = JSON.stringify(se_DiscoverInputSchemaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -585,7 +526,7 @@ export const se_ListApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplications"); let body: any; - body = JSON.stringify(se_ListApplicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -598,7 +539,7 @@ export const se_ListApplicationSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplicationSnapshots"); let body: any; - body = JSON.stringify(se_ListApplicationSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -611,7 +552,7 @@ export const se_ListApplicationVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplicationVersions"); let body: any; - body = JSON.stringify(se_ListApplicationVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -624,7 +565,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -637,7 +578,7 @@ export const se_RollbackApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RollbackApplication"); let body: any; - body = JSON.stringify(se_RollbackApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -650,7 +591,7 @@ export const se_StartApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartApplication"); let body: any; - body = JSON.stringify(se_StartApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -663,7 +604,7 @@ export const se_StopApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopApplication"); let body: any; - body = JSON.stringify(se_StopApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -676,7 +617,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -689,7 +630,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -715,7 +656,7 @@ export const se_UpdateApplicationMaintenanceConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplicationMaintenanceConfiguration"); let body: any; - body = JSON.stringify(se_UpdateApplicationMaintenanceConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -731,12 +672,12 @@ export const de_AddApplicationCloudWatchLoggingOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationCloudWatchLoggingOptionResponse(data, context); + contents = _json(data); const response: AddApplicationCloudWatchLoggingOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -772,10 +713,9 @@ const de_AddApplicationCloudWatchLoggingOptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -793,12 +733,12 @@ export const de_AddApplicationInputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationInputResponse(data, context); + contents = _json(data); const response: AddApplicationInputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -834,10 +774,9 @@ const de_AddApplicationInputCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -855,12 +794,12 @@ export const de_AddApplicationInputProcessingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationInputProcessingConfigurationResponse(data, context); + contents = _json(data); const response: AddApplicationInputProcessingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -893,10 +832,9 @@ const de_AddApplicationInputProcessingConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -914,12 +852,12 @@ export const de_AddApplicationOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationOutputResponse(data, context); + contents = _json(data); const response: AddApplicationOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -952,10 +890,9 @@ const de_AddApplicationOutputCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -973,12 +910,12 @@ export const de_AddApplicationReferenceDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationReferenceDataSourceResponse(data, context); + contents = _json(data); const response: AddApplicationReferenceDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1011,10 +948,9 @@ const de_AddApplicationReferenceDataSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1032,12 +968,12 @@ export const de_AddApplicationVpcConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationVpcConfigurationResponse(data, context); + contents = _json(data); const response: AddApplicationVpcConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1070,10 +1006,9 @@ const de_AddApplicationVpcConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,7 +1031,7 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1138,10 +1073,9 @@ const de_CreateApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1159,12 +1093,12 @@ export const de_CreateApplicationPresignedUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateApplicationPresignedUrlResponse(data, context); + contents = _json(data); const response: CreateApplicationPresignedUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1191,10 +1125,9 @@ const de_CreateApplicationPresignedUrlCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1212,12 +1145,12 @@ export const de_CreateApplicationSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateApplicationSnapshotResponse(data, context); + contents = _json(data); const response: CreateApplicationSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1256,10 +1189,9 @@ const de_CreateApplicationSnapshotCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1277,12 +1209,12 @@ export const de_DeleteApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationResponse(data, context); + contents = _json(data); const response: DeleteApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1318,10 +1250,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1339,12 +1270,12 @@ export const de_DeleteApplicationCloudWatchLoggingOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationCloudWatchLoggingOptionResponse(data, context); + contents = _json(data); const response: DeleteApplicationCloudWatchLoggingOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1380,10 +1311,9 @@ const de_DeleteApplicationCloudWatchLoggingOptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1401,12 +1331,12 @@ export const de_DeleteApplicationInputProcessingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationInputProcessingConfigurationResponse(data, context); + contents = _json(data); const response: DeleteApplicationInputProcessingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1439,10 +1369,9 @@ const de_DeleteApplicationInputProcessingConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1460,12 +1389,12 @@ export const de_DeleteApplicationOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationOutputResponse(data, context); + contents = _json(data); const response: DeleteApplicationOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1498,10 +1427,9 @@ const de_DeleteApplicationOutputCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1519,12 +1447,12 @@ export const de_DeleteApplicationReferenceDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationReferenceDataSourceResponse(data, context); + contents = _json(data); const response: DeleteApplicationReferenceDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1557,10 +1485,9 @@ const de_DeleteApplicationReferenceDataSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1578,12 +1505,12 @@ export const de_DeleteApplicationSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationSnapshotResponse(data, context); + contents = _json(data); const response: DeleteApplicationSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1619,10 +1546,9 @@ const de_DeleteApplicationSnapshotCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1640,12 +1566,12 @@ export const de_DeleteApplicationVpcConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationVpcConfigurationResponse(data, context); + contents = _json(data); const response: DeleteApplicationVpcConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1678,10 +1604,9 @@ const de_DeleteApplicationVpcConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1704,7 +1629,7 @@ export const de_DescribeApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1731,10 +1656,9 @@ const de_DescribeApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1757,7 +1681,7 @@ export const de_DescribeApplicationSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1784,10 +1708,9 @@ const de_DescribeApplicationSnapshotCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1810,7 +1733,7 @@ export const de_DescribeApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1837,10 +1760,9 @@ const de_DescribeApplicationVersionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1858,12 +1780,12 @@ export const de_DiscoverInputSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DiscoverInputSchemaResponse(data, context); + contents = _json(data); const response: DiscoverInputSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1899,10 +1821,9 @@ const de_DiscoverInputSchemaCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1920,12 +1841,12 @@ export const de_ListApplicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationsResponse(data, context); + contents = _json(data); const response: ListApplicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1946,10 +1867,9 @@ const de_ListApplicationsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1972,7 +1892,7 @@ export const de_ListApplicationSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1996,10 +1916,9 @@ const de_ListApplicationSnapshotsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2017,12 +1936,12 @@ export const de_ListApplicationVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationVersionsResponse(data, context); + contents = _json(data); const response: ListApplicationVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2049,10 +1968,9 @@ const de_ListApplicationVersionsCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2070,12 +1988,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2102,10 +2020,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2128,7 +2045,7 @@ export const de_RollbackApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2164,10 +2081,9 @@ const de_RollbackApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2185,12 +2101,12 @@ export const de_StartApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartApplicationResponse(data, context); + contents = _json(data); const response: StartApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2223,10 +2139,9 @@ const de_StartApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2244,12 +2159,12 @@ export const de_StopApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopApplicationResponse(data, context); + contents = _json(data); const response: StopApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2285,10 +2200,9 @@ const de_StopApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2306,12 +2220,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2344,10 +2258,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2365,12 +2278,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2403,10 +2316,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2429,7 +2341,7 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2471,10 +2383,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2492,12 +2403,12 @@ export const de_UpdateApplicationMaintenanceConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateApplicationMaintenanceConfigurationResponse(data, context); + contents = _json(data); const response: UpdateApplicationMaintenanceConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2530,10 +2441,9 @@ const de_UpdateApplicationMaintenanceConfigurationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2547,7 +2457,7 @@ const de_CodeValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CodeValidationException(body, context); + const deserialized: any = _json(body); const exception = new CodeValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2563,7 +2473,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2579,7 +2489,7 @@ const de_InvalidApplicationConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApplicationConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApplicationConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2595,7 +2505,7 @@ const de_InvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2611,7 +2521,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2627,7 +2537,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2643,7 +2553,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2659,7 +2569,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2675,7 +2585,7 @@ const de_ResourceProvisionedThroughputExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceProvisionedThroughputExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceProvisionedThroughputExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2691,7 +2601,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2707,7 +2617,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2723,7 +2633,7 @@ const de_UnableToDetectSchemaExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnableToDetectSchemaException(body, context); + const deserialized: any = _json(body); const exception = new UnableToDetectSchemaException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2739,7 +2649,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2747,113 +2657,26 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddApplicationCloudWatchLoggingOptionRequest - */ -const se_AddApplicationCloudWatchLoggingOptionRequest = ( - input: AddApplicationCloudWatchLoggingOptionRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOption != null && { - CloudWatchLoggingOption: se_CloudWatchLoggingOption(input.CloudWatchLoggingOption, context), - }), - ...(input.ConditionalToken != null && { ConditionalToken: input.ConditionalToken }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - }; -}; +// se_AddApplicationCloudWatchLoggingOptionRequest omitted. -/** - * serializeAws_json1_1AddApplicationInputProcessingConfigurationRequest - */ -const se_AddApplicationInputProcessingConfigurationRequest = ( - input: AddApplicationInputProcessingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.InputId != null && { InputId: input.InputId }), - ...(input.InputProcessingConfiguration != null && { - InputProcessingConfiguration: se_InputProcessingConfiguration(input.InputProcessingConfiguration, context), - }), - }; -}; +// se_AddApplicationInputProcessingConfigurationRequest omitted. -/** - * serializeAws_json1_1AddApplicationInputRequest - */ -const se_AddApplicationInputRequest = (input: AddApplicationInputRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.Input != null && { Input: se_Input(input.Input, context) }), - }; -}; +// se_AddApplicationInputRequest omitted. -/** - * serializeAws_json1_1AddApplicationOutputRequest - */ -const se_AddApplicationOutputRequest = (input: AddApplicationOutputRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.Output != null && { Output: se_Output(input.Output, context) }), - }; -}; +// se_AddApplicationOutputRequest omitted. -/** - * serializeAws_json1_1AddApplicationReferenceDataSourceRequest - */ -const se_AddApplicationReferenceDataSourceRequest = ( - input: AddApplicationReferenceDataSourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.ReferenceDataSource != null && { - ReferenceDataSource: se_ReferenceDataSource(input.ReferenceDataSource, context), - }), - }; -}; +// se_AddApplicationReferenceDataSourceRequest omitted. -/** - * serializeAws_json1_1AddApplicationVpcConfigurationRequest - */ -const se_AddApplicationVpcConfigurationRequest = ( - input: AddApplicationVpcConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.ConditionalToken != null && { ConditionalToken: input.ConditionalToken }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; +// se_AddApplicationVpcConfigurationRequest omitted. /** * serializeAws_json1_1ApplicationCodeConfiguration */ const se_ApplicationCodeConfiguration = (input: ApplicationCodeConfiguration, context: __SerdeContext): any => { - return { - ...(input.CodeContent != null && { CodeContent: se_CodeContent(input.CodeContent, context) }), - ...(input.CodeContentType != null && { CodeContentType: input.CodeContentType }), - }; + return take(input, { + CodeContent: (_) => se_CodeContent(_, context), + CodeContentType: [], + }); }; /** @@ -2863,2939 +2686,625 @@ const se_ApplicationCodeConfigurationUpdate = ( input: ApplicationCodeConfigurationUpdate, context: __SerdeContext ): any => { - return { - ...(input.CodeContentTypeUpdate != null && { CodeContentTypeUpdate: input.CodeContentTypeUpdate }), - ...(input.CodeContentUpdate != null && { - CodeContentUpdate: se_CodeContentUpdate(input.CodeContentUpdate, context), - }), - }; + return take(input, { + CodeContentTypeUpdate: [], + CodeContentUpdate: (_) => se_CodeContentUpdate(_, context), + }); }; /** * serializeAws_json1_1ApplicationConfiguration */ const se_ApplicationConfiguration = (input: ApplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.ApplicationCodeConfiguration != null && { - ApplicationCodeConfiguration: se_ApplicationCodeConfiguration(input.ApplicationCodeConfiguration, context), - }), - ...(input.ApplicationSnapshotConfiguration != null && { - ApplicationSnapshotConfiguration: se_ApplicationSnapshotConfiguration( - input.ApplicationSnapshotConfiguration, - context - ), - }), - ...(input.EnvironmentProperties != null && { - EnvironmentProperties: se_EnvironmentProperties(input.EnvironmentProperties, context), - }), - ...(input.FlinkApplicationConfiguration != null && { - FlinkApplicationConfiguration: se_FlinkApplicationConfiguration(input.FlinkApplicationConfiguration, context), - }), - ...(input.SqlApplicationConfiguration != null && { - SqlApplicationConfiguration: se_SqlApplicationConfiguration(input.SqlApplicationConfiguration, context), - }), - ...(input.VpcConfigurations != null && { - VpcConfigurations: se_VpcConfigurations(input.VpcConfigurations, context), - }), - ...(input.ZeppelinApplicationConfiguration != null && { - ZeppelinApplicationConfiguration: se_ZeppelinApplicationConfiguration( - input.ZeppelinApplicationConfiguration, - context - ), - }), - }; + return take(input, { + ApplicationCodeConfiguration: (_) => se_ApplicationCodeConfiguration(_, context), + ApplicationSnapshotConfiguration: _json, + EnvironmentProperties: _json, + FlinkApplicationConfiguration: _json, + SqlApplicationConfiguration: _json, + VpcConfigurations: _json, + ZeppelinApplicationConfiguration: _json, + }); }; /** * serializeAws_json1_1ApplicationConfigurationUpdate */ const se_ApplicationConfigurationUpdate = (input: ApplicationConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.ApplicationCodeConfigurationUpdate != null && { - ApplicationCodeConfigurationUpdate: se_ApplicationCodeConfigurationUpdate( - input.ApplicationCodeConfigurationUpdate, - context - ), - }), - ...(input.ApplicationSnapshotConfigurationUpdate != null && { - ApplicationSnapshotConfigurationUpdate: se_ApplicationSnapshotConfigurationUpdate( - input.ApplicationSnapshotConfigurationUpdate, - context - ), - }), - ...(input.EnvironmentPropertyUpdates != null && { - EnvironmentPropertyUpdates: se_EnvironmentPropertyUpdates(input.EnvironmentPropertyUpdates, context), - }), - ...(input.FlinkApplicationConfigurationUpdate != null && { - FlinkApplicationConfigurationUpdate: se_FlinkApplicationConfigurationUpdate( - input.FlinkApplicationConfigurationUpdate, - context - ), - }), - ...(input.SqlApplicationConfigurationUpdate != null && { - SqlApplicationConfigurationUpdate: se_SqlApplicationConfigurationUpdate( - input.SqlApplicationConfigurationUpdate, - context - ), - }), - ...(input.VpcConfigurationUpdates != null && { - VpcConfigurationUpdates: se_VpcConfigurationUpdates(input.VpcConfigurationUpdates, context), - }), - ...(input.ZeppelinApplicationConfigurationUpdate != null && { - ZeppelinApplicationConfigurationUpdate: se_ZeppelinApplicationConfigurationUpdate( - input.ZeppelinApplicationConfigurationUpdate, - context - ), - }), - }; + return take(input, { + ApplicationCodeConfigurationUpdate: (_) => se_ApplicationCodeConfigurationUpdate(_, context), + ApplicationSnapshotConfigurationUpdate: _json, + EnvironmentPropertyUpdates: _json, + FlinkApplicationConfigurationUpdate: _json, + SqlApplicationConfigurationUpdate: _json, + VpcConfigurationUpdates: _json, + ZeppelinApplicationConfigurationUpdate: _json, + }); }; -/** - * serializeAws_json1_1ApplicationMaintenanceConfigurationUpdate - */ -const se_ApplicationMaintenanceConfigurationUpdate = ( - input: ApplicationMaintenanceConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationMaintenanceWindowStartTimeUpdate != null && { - ApplicationMaintenanceWindowStartTimeUpdate: input.ApplicationMaintenanceWindowStartTimeUpdate, - }), - }; -}; +// se_ApplicationMaintenanceConfigurationUpdate omitted. -/** - * serializeAws_json1_1ApplicationRestoreConfiguration - */ -const se_ApplicationRestoreConfiguration = (input: ApplicationRestoreConfiguration, context: __SerdeContext): any => { - return { - ...(input.ApplicationRestoreType != null && { ApplicationRestoreType: input.ApplicationRestoreType }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - }; -}; +// se_ApplicationRestoreConfiguration omitted. -/** - * serializeAws_json1_1ApplicationSnapshotConfiguration - */ -const se_ApplicationSnapshotConfiguration = (input: ApplicationSnapshotConfiguration, context: __SerdeContext): any => { - return { - ...(input.SnapshotsEnabled != null && { SnapshotsEnabled: input.SnapshotsEnabled }), - }; -}; +// se_ApplicationSnapshotConfiguration omitted. -/** - * serializeAws_json1_1ApplicationSnapshotConfigurationUpdate - */ -const se_ApplicationSnapshotConfigurationUpdate = ( - input: ApplicationSnapshotConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.SnapshotsEnabledUpdate != null && { SnapshotsEnabledUpdate: input.SnapshotsEnabledUpdate }), - }; -}; +// se_ApplicationSnapshotConfigurationUpdate omitted. -/** - * serializeAws_json1_1CatalogConfiguration - */ -const se_CatalogConfiguration = (input: CatalogConfiguration, context: __SerdeContext): any => { - return { - ...(input.GlueDataCatalogConfiguration != null && { - GlueDataCatalogConfiguration: se_GlueDataCatalogConfiguration(input.GlueDataCatalogConfiguration, context), - }), - }; -}; +// se_CatalogConfiguration omitted. -/** - * serializeAws_json1_1CatalogConfigurationUpdate - */ -const se_CatalogConfigurationUpdate = (input: CatalogConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.GlueDataCatalogConfigurationUpdate != null && { - GlueDataCatalogConfigurationUpdate: se_GlueDataCatalogConfigurationUpdate( - input.GlueDataCatalogConfigurationUpdate, - context - ), - }), - }; -}; +// se_CatalogConfigurationUpdate omitted. -/** - * serializeAws_json1_1CheckpointConfiguration - */ -const se_CheckpointConfiguration = (input: CheckpointConfiguration, context: __SerdeContext): any => { - return { - ...(input.CheckpointInterval != null && { CheckpointInterval: input.CheckpointInterval }), - ...(input.CheckpointingEnabled != null && { CheckpointingEnabled: input.CheckpointingEnabled }), - ...(input.ConfigurationType != null && { ConfigurationType: input.ConfigurationType }), - ...(input.MinPauseBetweenCheckpoints != null && { MinPauseBetweenCheckpoints: input.MinPauseBetweenCheckpoints }), - }; -}; +// se_CheckpointConfiguration omitted. -/** - * serializeAws_json1_1CheckpointConfigurationUpdate - */ -const se_CheckpointConfigurationUpdate = (input: CheckpointConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.CheckpointIntervalUpdate != null && { CheckpointIntervalUpdate: input.CheckpointIntervalUpdate }), - ...(input.CheckpointingEnabledUpdate != null && { CheckpointingEnabledUpdate: input.CheckpointingEnabledUpdate }), - ...(input.ConfigurationTypeUpdate != null && { ConfigurationTypeUpdate: input.ConfigurationTypeUpdate }), - ...(input.MinPauseBetweenCheckpointsUpdate != null && { - MinPauseBetweenCheckpointsUpdate: input.MinPauseBetweenCheckpointsUpdate, - }), - }; -}; +// se_CheckpointConfigurationUpdate omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOption - */ -const se_CloudWatchLoggingOption = (input: CloudWatchLoggingOption, context: __SerdeContext): any => { - return { - ...(input.LogStreamARN != null && { LogStreamARN: input.LogStreamARN }), - }; -}; +// se_CloudWatchLoggingOption omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptions - */ -const se_CloudWatchLoggingOptions = (input: CloudWatchLoggingOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchLoggingOption(entry, context); - }); -}; +// se_CloudWatchLoggingOptions omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptionUpdate - */ -const se_CloudWatchLoggingOptionUpdate = (input: CloudWatchLoggingOptionUpdate, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLoggingOptionId != null && { CloudWatchLoggingOptionId: input.CloudWatchLoggingOptionId }), - ...(input.LogStreamARNUpdate != null && { LogStreamARNUpdate: input.LogStreamARNUpdate }), - }; -}; +// se_CloudWatchLoggingOptionUpdate omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptionUpdates - */ -const se_CloudWatchLoggingOptionUpdates = (input: CloudWatchLoggingOptionUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchLoggingOptionUpdate(entry, context); - }); -}; +// se_CloudWatchLoggingOptionUpdates omitted. /** * serializeAws_json1_1CodeContent */ const se_CodeContent = (input: CodeContent, context: __SerdeContext): any => { - return { - ...(input.S3ContentLocation != null && { - S3ContentLocation: se_S3ContentLocation(input.S3ContentLocation, context), - }), - ...(input.TextContent != null && { TextContent: input.TextContent }), - ...(input.ZipFileContent != null && { ZipFileContent: context.base64Encoder(input.ZipFileContent) }), - }; + return take(input, { + S3ContentLocation: _json, + TextContent: [], + ZipFileContent: context.base64Encoder, + }); }; /** * serializeAws_json1_1CodeContentUpdate */ const se_CodeContentUpdate = (input: CodeContentUpdate, context: __SerdeContext): any => { - return { - ...(input.S3ContentLocationUpdate != null && { - S3ContentLocationUpdate: se_S3ContentLocationUpdate(input.S3ContentLocationUpdate, context), - }), - ...(input.TextContentUpdate != null && { TextContentUpdate: input.TextContentUpdate }), - ...(input.ZipFileContentUpdate != null && { - ZipFileContentUpdate: context.base64Encoder(input.ZipFileContentUpdate), - }), - }; + return take(input, { + S3ContentLocationUpdate: _json, + TextContentUpdate: [], + ZipFileContentUpdate: context.base64Encoder, + }); }; -/** - * serializeAws_json1_1CreateApplicationPresignedUrlRequest - */ -const se_CreateApplicationPresignedUrlRequest = ( - input: CreateApplicationPresignedUrlRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.SessionExpirationDurationInSeconds != null && { - SessionExpirationDurationInSeconds: input.SessionExpirationDurationInSeconds, - }), - ...(input.UrlType != null && { UrlType: input.UrlType }), - }; -}; +// se_CreateApplicationPresignedUrlRequest omitted. /** * serializeAws_json1_1CreateApplicationRequest */ const se_CreateApplicationRequest = (input: CreateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationConfiguration != null && { - ApplicationConfiguration: se_ApplicationConfiguration(input.ApplicationConfiguration, context), - }), - ...(input.ApplicationDescription != null && { ApplicationDescription: input.ApplicationDescription }), - ...(input.ApplicationMode != null && { ApplicationMode: input.ApplicationMode }), - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.RuntimeEnvironment != null && { RuntimeEnvironment: input.RuntimeEnvironment }), - ...(input.ServiceExecutionRole != null && { ServiceExecutionRole: input.ServiceExecutionRole }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + ApplicationConfiguration: (_) => se_ApplicationConfiguration(_, context), + ApplicationDescription: [], + ApplicationMode: [], + ApplicationName: [], + CloudWatchLoggingOptions: _json, + RuntimeEnvironment: [], + ServiceExecutionRole: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateApplicationSnapshotRequest - */ -const se_CreateApplicationSnapshotRequest = (input: CreateApplicationSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - }; -}; +// se_CreateApplicationSnapshotRequest omitted. -/** - * serializeAws_json1_1CSVMappingParameters - */ -const se_CSVMappingParameters = (input: CSVMappingParameters, context: __SerdeContext): any => { - return { - ...(input.RecordColumnDelimiter != null && { RecordColumnDelimiter: input.RecordColumnDelimiter }), - ...(input.RecordRowDelimiter != null && { RecordRowDelimiter: input.RecordRowDelimiter }), - }; -}; +// se_CSVMappingParameters omitted. -/** - * serializeAws_json1_1CustomArtifactConfiguration - */ -const se_CustomArtifactConfiguration = (input: CustomArtifactConfiguration, context: __SerdeContext): any => { - return { - ...(input.ArtifactType != null && { ArtifactType: input.ArtifactType }), - ...(input.MavenReference != null && { MavenReference: se_MavenReference(input.MavenReference, context) }), - ...(input.S3ContentLocation != null && { - S3ContentLocation: se_S3ContentLocation(input.S3ContentLocation, context), - }), - }; -}; +// se_CustomArtifactConfiguration omitted. -/** - * serializeAws_json1_1CustomArtifactsConfigurationList - */ -const se_CustomArtifactsConfigurationList = (input: CustomArtifactConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomArtifactConfiguration(entry, context); - }); -}; +// se_CustomArtifactsConfigurationList omitted. -/** - * serializeAws_json1_1DeleteApplicationCloudWatchLoggingOptionRequest - */ -const se_DeleteApplicationCloudWatchLoggingOptionRequest = ( - input: DeleteApplicationCloudWatchLoggingOptionRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOptionId != null && { CloudWatchLoggingOptionId: input.CloudWatchLoggingOptionId }), - ...(input.ConditionalToken != null && { ConditionalToken: input.ConditionalToken }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - }; -}; +// se_DeleteApplicationCloudWatchLoggingOptionRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationInputProcessingConfigurationRequest - */ -const se_DeleteApplicationInputProcessingConfigurationRequest = ( - input: DeleteApplicationInputProcessingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.InputId != null && { InputId: input.InputId }), - }; -}; +// se_DeleteApplicationInputProcessingConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationOutputRequest - */ -const se_DeleteApplicationOutputRequest = (input: DeleteApplicationOutputRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.OutputId != null && { OutputId: input.OutputId }), - }; -}; +// se_DeleteApplicationOutputRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationReferenceDataSourceRequest - */ -const se_DeleteApplicationReferenceDataSourceRequest = ( - input: DeleteApplicationReferenceDataSourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - }; -}; +// se_DeleteApplicationReferenceDataSourceRequest omitted. /** * serializeAws_json1_1DeleteApplicationRequest */ const se_DeleteApplicationRequest = (input: DeleteApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CreateTimestamp != null && { CreateTimestamp: Math.round(input.CreateTimestamp.getTime() / 1000) }), - }; + return take(input, { + ApplicationName: [], + CreateTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1DeleteApplicationSnapshotRequest */ const se_DeleteApplicationSnapshotRequest = (input: DeleteApplicationSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.SnapshotCreationTimestamp != null && { - SnapshotCreationTimestamp: Math.round(input.SnapshotCreationTimestamp.getTime() / 1000), - }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - }; + return take(input, { + ApplicationName: [], + SnapshotCreationTimestamp: (_) => Math.round(_.getTime() / 1000), + SnapshotName: [], + }); }; -/** - * serializeAws_json1_1DeleteApplicationVpcConfigurationRequest - */ -const se_DeleteApplicationVpcConfigurationRequest = ( - input: DeleteApplicationVpcConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.ConditionalToken != null && { ConditionalToken: input.ConditionalToken }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.VpcConfigurationId != null && { VpcConfigurationId: input.VpcConfigurationId }), - }; -}; +// se_DeleteApplicationVpcConfigurationRequest omitted. -/** - * serializeAws_json1_1DeployAsApplicationConfiguration - */ -const se_DeployAsApplicationConfiguration = (input: DeployAsApplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.S3ContentLocation != null && { - S3ContentLocation: se_S3ContentBaseLocation(input.S3ContentLocation, context), - }), - }; -}; +// se_DeployAsApplicationConfiguration omitted. -/** - * serializeAws_json1_1DeployAsApplicationConfigurationUpdate - */ -const se_DeployAsApplicationConfigurationUpdate = ( - input: DeployAsApplicationConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.S3ContentLocationUpdate != null && { - S3ContentLocationUpdate: se_S3ContentBaseLocationUpdate(input.S3ContentLocationUpdate, context), - }), - }; -}; +// se_DeployAsApplicationConfigurationUpdate omitted. -/** - * serializeAws_json1_1DescribeApplicationRequest - */ -const se_DescribeApplicationRequest = (input: DescribeApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.IncludeAdditionalDetails != null && { IncludeAdditionalDetails: input.IncludeAdditionalDetails }), - }; -}; +// se_DescribeApplicationRequest omitted. -/** - * serializeAws_json1_1DescribeApplicationSnapshotRequest - */ -const se_DescribeApplicationSnapshotRequest = ( - input: DescribeApplicationSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - }; -}; +// se_DescribeApplicationSnapshotRequest omitted. -/** - * serializeAws_json1_1DescribeApplicationVersionRequest - */ -const se_DescribeApplicationVersionRequest = ( - input: DescribeApplicationVersionRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.ApplicationVersionId != null && { ApplicationVersionId: input.ApplicationVersionId }), - }; -}; +// se_DescribeApplicationVersionRequest omitted. -/** - * serializeAws_json1_1DestinationSchema - */ -const se_DestinationSchema = (input: DestinationSchema, context: __SerdeContext): any => { - return { - ...(input.RecordFormatType != null && { RecordFormatType: input.RecordFormatType }), - }; -}; +// se_DestinationSchema omitted. -/** - * serializeAws_json1_1DiscoverInputSchemaRequest - */ -const se_DiscoverInputSchemaRequest = (input: DiscoverInputSchemaRequest, context: __SerdeContext): any => { - return { - ...(input.InputProcessingConfiguration != null && { - InputProcessingConfiguration: se_InputProcessingConfiguration(input.InputProcessingConfiguration, context), - }), - ...(input.InputStartingPositionConfiguration != null && { - InputStartingPositionConfiguration: se_InputStartingPositionConfiguration( - input.InputStartingPositionConfiguration, - context - ), - }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }), - ...(input.ServiceExecutionRole != null && { ServiceExecutionRole: input.ServiceExecutionRole }), - }; -}; +// se_DiscoverInputSchemaRequest omitted. -/** - * serializeAws_json1_1EnvironmentProperties - */ -const se_EnvironmentProperties = (input: EnvironmentProperties, context: __SerdeContext): any => { - return { - ...(input.PropertyGroups != null && { PropertyGroups: se_PropertyGroups(input.PropertyGroups, context) }), - }; -}; +// se_EnvironmentProperties omitted. -/** - * serializeAws_json1_1EnvironmentPropertyUpdates - */ -const se_EnvironmentPropertyUpdates = (input: EnvironmentPropertyUpdates, context: __SerdeContext): any => { - return { - ...(input.PropertyGroups != null && { PropertyGroups: se_PropertyGroups(input.PropertyGroups, context) }), - }; -}; +// se_EnvironmentPropertyUpdates omitted. -/** - * serializeAws_json1_1FlinkApplicationConfiguration - */ -const se_FlinkApplicationConfiguration = (input: FlinkApplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.CheckpointConfiguration != null && { - CheckpointConfiguration: se_CheckpointConfiguration(input.CheckpointConfiguration, context), - }), - ...(input.MonitoringConfiguration != null && { - MonitoringConfiguration: se_MonitoringConfiguration(input.MonitoringConfiguration, context), - }), - ...(input.ParallelismConfiguration != null && { - ParallelismConfiguration: se_ParallelismConfiguration(input.ParallelismConfiguration, context), - }), - }; -}; +// se_FlinkApplicationConfiguration omitted. -/** - * serializeAws_json1_1FlinkApplicationConfigurationUpdate - */ -const se_FlinkApplicationConfigurationUpdate = ( - input: FlinkApplicationConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.CheckpointConfigurationUpdate != null && { - CheckpointConfigurationUpdate: se_CheckpointConfigurationUpdate(input.CheckpointConfigurationUpdate, context), - }), - ...(input.MonitoringConfigurationUpdate != null && { - MonitoringConfigurationUpdate: se_MonitoringConfigurationUpdate(input.MonitoringConfigurationUpdate, context), - }), - ...(input.ParallelismConfigurationUpdate != null && { - ParallelismConfigurationUpdate: se_ParallelismConfigurationUpdate(input.ParallelismConfigurationUpdate, context), - }), - }; -}; +// se_FlinkApplicationConfigurationUpdate omitted. -/** - * serializeAws_json1_1FlinkRunConfiguration - */ -const se_FlinkRunConfiguration = (input: FlinkRunConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowNonRestoredState != null && { AllowNonRestoredState: input.AllowNonRestoredState }), - }; -}; +// se_FlinkRunConfiguration omitted. -/** - * serializeAws_json1_1GlueDataCatalogConfiguration - */ -const se_GlueDataCatalogConfiguration = (input: GlueDataCatalogConfiguration, context: __SerdeContext): any => { - return { - ...(input.DatabaseARN != null && { DatabaseARN: input.DatabaseARN }), - }; -}; +// se_GlueDataCatalogConfiguration omitted. -/** - * serializeAws_json1_1GlueDataCatalogConfigurationUpdate - */ -const se_GlueDataCatalogConfigurationUpdate = ( - input: GlueDataCatalogConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.DatabaseARNUpdate != null && { DatabaseARNUpdate: input.DatabaseARNUpdate }), - }; -}; +// se_GlueDataCatalogConfigurationUpdate omitted. -/** - * serializeAws_json1_1Input - */ -const se_Input = (input: Input, context: __SerdeContext): any => { - return { - ...(input.InputParallelism != null && { InputParallelism: se_InputParallelism(input.InputParallelism, context) }), - ...(input.InputProcessingConfiguration != null && { - InputProcessingConfiguration: se_InputProcessingConfiguration(input.InputProcessingConfiguration, context), - }), - ...(input.InputSchema != null && { InputSchema: se_SourceSchema(input.InputSchema, context) }), - ...(input.KinesisFirehoseInput != null && { - KinesisFirehoseInput: se_KinesisFirehoseInput(input.KinesisFirehoseInput, context), - }), - ...(input.KinesisStreamsInput != null && { - KinesisStreamsInput: se_KinesisStreamsInput(input.KinesisStreamsInput, context), - }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - }; -}; +// se_Input omitted. -/** - * serializeAws_json1_1InputLambdaProcessor - */ -const se_InputLambdaProcessor = (input: InputLambdaProcessor, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_InputLambdaProcessor omitted. -/** - * serializeAws_json1_1InputLambdaProcessorUpdate - */ -const se_InputLambdaProcessorUpdate = (input: InputLambdaProcessorUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - }; -}; +// se_InputLambdaProcessorUpdate omitted. -/** - * serializeAws_json1_1InputParallelism - */ -const se_InputParallelism = (input: InputParallelism, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: input.Count }), - }; -}; +// se_InputParallelism omitted. -/** - * serializeAws_json1_1InputParallelismUpdate - */ -const se_InputParallelismUpdate = (input: InputParallelismUpdate, context: __SerdeContext): any => { - return { - ...(input.CountUpdate != null && { CountUpdate: input.CountUpdate }), - }; -}; +// se_InputParallelismUpdate omitted. -/** - * serializeAws_json1_1InputProcessingConfiguration - */ -const se_InputProcessingConfiguration = (input: InputProcessingConfiguration, context: __SerdeContext): any => { - return { - ...(input.InputLambdaProcessor != null && { - InputLambdaProcessor: se_InputLambdaProcessor(input.InputLambdaProcessor, context), - }), - }; -}; +// se_InputProcessingConfiguration omitted. -/** - * serializeAws_json1_1InputProcessingConfigurationUpdate - */ -const se_InputProcessingConfigurationUpdate = ( - input: InputProcessingConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.InputLambdaProcessorUpdate != null && { - InputLambdaProcessorUpdate: se_InputLambdaProcessorUpdate(input.InputLambdaProcessorUpdate, context), - }), - }; -}; +// se_InputProcessingConfigurationUpdate omitted. -/** - * serializeAws_json1_1Inputs - */ -const se_Inputs = (input: Input[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Input(entry, context); - }); -}; +// se_Inputs omitted. -/** - * serializeAws_json1_1InputSchemaUpdate - */ -const se_InputSchemaUpdate = (input: InputSchemaUpdate, context: __SerdeContext): any => { - return { - ...(input.RecordColumnUpdates != null && { - RecordColumnUpdates: se_RecordColumns(input.RecordColumnUpdates, context), - }), - ...(input.RecordEncodingUpdate != null && { RecordEncodingUpdate: input.RecordEncodingUpdate }), - ...(input.RecordFormatUpdate != null && { RecordFormatUpdate: se_RecordFormat(input.RecordFormatUpdate, context) }), - }; -}; +// se_InputSchemaUpdate omitted. -/** - * serializeAws_json1_1InputStartingPositionConfiguration - */ -const se_InputStartingPositionConfiguration = ( - input: InputStartingPositionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InputStartingPosition != null && { InputStartingPosition: input.InputStartingPosition }), - }; -}; +// se_InputStartingPositionConfiguration omitted. -/** - * serializeAws_json1_1InputUpdate - */ -const se_InputUpdate = (input: InputUpdate, context: __SerdeContext): any => { - return { - ...(input.InputId != null && { InputId: input.InputId }), - ...(input.InputParallelismUpdate != null && { - InputParallelismUpdate: se_InputParallelismUpdate(input.InputParallelismUpdate, context), - }), - ...(input.InputProcessingConfigurationUpdate != null && { - InputProcessingConfigurationUpdate: se_InputProcessingConfigurationUpdate( - input.InputProcessingConfigurationUpdate, - context - ), - }), - ...(input.InputSchemaUpdate != null && { - InputSchemaUpdate: se_InputSchemaUpdate(input.InputSchemaUpdate, context), - }), - ...(input.KinesisFirehoseInputUpdate != null && { - KinesisFirehoseInputUpdate: se_KinesisFirehoseInputUpdate(input.KinesisFirehoseInputUpdate, context), - }), - ...(input.KinesisStreamsInputUpdate != null && { - KinesisStreamsInputUpdate: se_KinesisStreamsInputUpdate(input.KinesisStreamsInputUpdate, context), - }), - ...(input.NamePrefixUpdate != null && { NamePrefixUpdate: input.NamePrefixUpdate }), - }; -}; +// se_InputUpdate omitted. -/** - * serializeAws_json1_1InputUpdates - */ -const se_InputUpdates = (input: InputUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputUpdate(entry, context); - }); -}; +// se_InputUpdates omitted. -/** - * serializeAws_json1_1JSONMappingParameters - */ -const se_JSONMappingParameters = (input: JSONMappingParameters, context: __SerdeContext): any => { - return { - ...(input.RecordRowPath != null && { RecordRowPath: input.RecordRowPath }), - }; -}; +// se_JSONMappingParameters omitted. -/** - * serializeAws_json1_1KinesisFirehoseInput - */ -const se_KinesisFirehoseInput = (input: KinesisFirehoseInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_KinesisFirehoseInput omitted. -/** - * serializeAws_json1_1KinesisFirehoseInputUpdate - */ -const se_KinesisFirehoseInputUpdate = (input: KinesisFirehoseInputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - }; -}; +// se_KinesisFirehoseInputUpdate omitted. -/** - * serializeAws_json1_1KinesisFirehoseOutput - */ -const se_KinesisFirehoseOutput = (input: KinesisFirehoseOutput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_KinesisFirehoseOutput omitted. -/** - * serializeAws_json1_1KinesisFirehoseOutputUpdate - */ -const se_KinesisFirehoseOutputUpdate = (input: KinesisFirehoseOutputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - }; -}; +// se_KinesisFirehoseOutputUpdate omitted. -/** - * serializeAws_json1_1KinesisStreamsInput - */ -const se_KinesisStreamsInput = (input: KinesisStreamsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_KinesisStreamsInput omitted. -/** - * serializeAws_json1_1KinesisStreamsInputUpdate - */ -const se_KinesisStreamsInputUpdate = (input: KinesisStreamsInputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - }; -}; +// se_KinesisStreamsInputUpdate omitted. -/** - * serializeAws_json1_1KinesisStreamsOutput - */ -const se_KinesisStreamsOutput = (input: KinesisStreamsOutput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_KinesisStreamsOutput omitted. -/** - * serializeAws_json1_1KinesisStreamsOutputUpdate - */ -const se_KinesisStreamsOutputUpdate = (input: KinesisStreamsOutputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - }; -}; +// se_KinesisStreamsOutputUpdate omitted. -/** - * serializeAws_json1_1LambdaOutput - */ -const se_LambdaOutput = (input: LambdaOutput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_LambdaOutput omitted. -/** - * serializeAws_json1_1LambdaOutputUpdate - */ -const se_LambdaOutputUpdate = (input: LambdaOutputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - }; -}; +// se_LambdaOutputUpdate omitted. -/** - * serializeAws_json1_1ListApplicationSnapshotsRequest - */ -const se_ListApplicationSnapshotsRequest = (input: ListApplicationSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListApplicationSnapshotsRequest omitted. -/** - * serializeAws_json1_1ListApplicationsRequest - */ -const se_ListApplicationsRequest = (input: ListApplicationsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListApplicationsRequest omitted. -/** - * serializeAws_json1_1ListApplicationVersionsRequest - */ -const se_ListApplicationVersionsRequest = (input: ListApplicationVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListApplicationVersionsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1MappingParameters - */ -const se_MappingParameters = (input: MappingParameters, context: __SerdeContext): any => { - return { - ...(input.CSVMappingParameters != null && { - CSVMappingParameters: se_CSVMappingParameters(input.CSVMappingParameters, context), - }), - ...(input.JSONMappingParameters != null && { - JSONMappingParameters: se_JSONMappingParameters(input.JSONMappingParameters, context), - }), - }; -}; +// se_MappingParameters omitted. -/** - * serializeAws_json1_1MavenReference - */ -const se_MavenReference = (input: MavenReference, context: __SerdeContext): any => { - return { - ...(input.ArtifactId != null && { ArtifactId: input.ArtifactId }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_MavenReference omitted. -/** - * serializeAws_json1_1MonitoringConfiguration - */ -const se_MonitoringConfiguration = (input: MonitoringConfiguration, context: __SerdeContext): any => { - return { - ...(input.ConfigurationType != null && { ConfigurationType: input.ConfigurationType }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - ...(input.MetricsLevel != null && { MetricsLevel: input.MetricsLevel }), - }; -}; +// se_MonitoringConfiguration omitted. -/** - * serializeAws_json1_1MonitoringConfigurationUpdate - */ -const se_MonitoringConfigurationUpdate = (input: MonitoringConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.ConfigurationTypeUpdate != null && { ConfigurationTypeUpdate: input.ConfigurationTypeUpdate }), - ...(input.LogLevelUpdate != null && { LogLevelUpdate: input.LogLevelUpdate }), - ...(input.MetricsLevelUpdate != null && { MetricsLevelUpdate: input.MetricsLevelUpdate }), - }; -}; +// se_MonitoringConfigurationUpdate omitted. -/** - * serializeAws_json1_1Output - */ -const se_Output = (input: Output, context: __SerdeContext): any => { - return { - ...(input.DestinationSchema != null && { - DestinationSchema: se_DestinationSchema(input.DestinationSchema, context), - }), - ...(input.KinesisFirehoseOutput != null && { - KinesisFirehoseOutput: se_KinesisFirehoseOutput(input.KinesisFirehoseOutput, context), - }), - ...(input.KinesisStreamsOutput != null && { - KinesisStreamsOutput: se_KinesisStreamsOutput(input.KinesisStreamsOutput, context), - }), - ...(input.LambdaOutput != null && { LambdaOutput: se_LambdaOutput(input.LambdaOutput, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_Output omitted. -/** - * serializeAws_json1_1Outputs - */ -const se_Outputs = (input: Output[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Output(entry, context); - }); -}; +// se_Outputs omitted. -/** - * serializeAws_json1_1OutputUpdate - */ -const se_OutputUpdate = (input: OutputUpdate, context: __SerdeContext): any => { - return { - ...(input.DestinationSchemaUpdate != null && { - DestinationSchemaUpdate: se_DestinationSchema(input.DestinationSchemaUpdate, context), - }), - ...(input.KinesisFirehoseOutputUpdate != null && { - KinesisFirehoseOutputUpdate: se_KinesisFirehoseOutputUpdate(input.KinesisFirehoseOutputUpdate, context), - }), - ...(input.KinesisStreamsOutputUpdate != null && { - KinesisStreamsOutputUpdate: se_KinesisStreamsOutputUpdate(input.KinesisStreamsOutputUpdate, context), - }), - ...(input.LambdaOutputUpdate != null && { - LambdaOutputUpdate: se_LambdaOutputUpdate(input.LambdaOutputUpdate, context), - }), - ...(input.NameUpdate != null && { NameUpdate: input.NameUpdate }), - ...(input.OutputId != null && { OutputId: input.OutputId }), - }; -}; +// se_OutputUpdate omitted. -/** - * serializeAws_json1_1OutputUpdates - */ -const se_OutputUpdates = (input: OutputUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OutputUpdate(entry, context); - }); -}; +// se_OutputUpdates omitted. -/** - * serializeAws_json1_1ParallelismConfiguration - */ -const se_ParallelismConfiguration = (input: ParallelismConfiguration, context: __SerdeContext): any => { - return { - ...(input.AutoScalingEnabled != null && { AutoScalingEnabled: input.AutoScalingEnabled }), - ...(input.ConfigurationType != null && { ConfigurationType: input.ConfigurationType }), - ...(input.Parallelism != null && { Parallelism: input.Parallelism }), - ...(input.ParallelismPerKPU != null && { ParallelismPerKPU: input.ParallelismPerKPU }), - }; -}; +// se_ParallelismConfiguration omitted. -/** - * serializeAws_json1_1ParallelismConfigurationUpdate - */ -const se_ParallelismConfigurationUpdate = (input: ParallelismConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.AutoScalingEnabledUpdate != null && { AutoScalingEnabledUpdate: input.AutoScalingEnabledUpdate }), - ...(input.ConfigurationTypeUpdate != null && { ConfigurationTypeUpdate: input.ConfigurationTypeUpdate }), - ...(input.ParallelismPerKPUUpdate != null && { ParallelismPerKPUUpdate: input.ParallelismPerKPUUpdate }), - ...(input.ParallelismUpdate != null && { ParallelismUpdate: input.ParallelismUpdate }), - }; -}; +// se_ParallelismConfigurationUpdate omitted. -/** - * serializeAws_json1_1PropertyGroup - */ -const se_PropertyGroup = (input: PropertyGroup, context: __SerdeContext): any => { - return { - ...(input.PropertyGroupId != null && { PropertyGroupId: input.PropertyGroupId }), - ...(input.PropertyMap != null && { PropertyMap: se_PropertyMap(input.PropertyMap, context) }), - }; -}; +// se_PropertyGroup omitted. -/** - * serializeAws_json1_1PropertyGroups - */ -const se_PropertyGroups = (input: PropertyGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PropertyGroup(entry, context); - }); -}; +// se_PropertyGroups omitted. -/** - * serializeAws_json1_1PropertyMap - */ -const se_PropertyMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PropertyMap omitted. -/** - * serializeAws_json1_1RecordColumn - */ -const se_RecordColumn = (input: RecordColumn, context: __SerdeContext): any => { - return { - ...(input.Mapping != null && { Mapping: input.Mapping }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SqlType != null && { SqlType: input.SqlType }), - }; -}; +// se_RecordColumn omitted. -/** - * serializeAws_json1_1RecordColumns - */ -const se_RecordColumns = (input: RecordColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecordColumn(entry, context); - }); -}; +// se_RecordColumns omitted. -/** - * serializeAws_json1_1RecordFormat - */ -const se_RecordFormat = (input: RecordFormat, context: __SerdeContext): any => { - return { - ...(input.MappingParameters != null && { - MappingParameters: se_MappingParameters(input.MappingParameters, context), - }), - ...(input.RecordFormatType != null && { RecordFormatType: input.RecordFormatType }), - }; -}; +// se_RecordFormat omitted. -/** - * serializeAws_json1_1ReferenceDataSource - */ -const se_ReferenceDataSource = (input: ReferenceDataSource, context: __SerdeContext): any => { - return { - ...(input.ReferenceSchema != null && { ReferenceSchema: se_SourceSchema(input.ReferenceSchema, context) }), - ...(input.S3ReferenceDataSource != null && { - S3ReferenceDataSource: se_S3ReferenceDataSource(input.S3ReferenceDataSource, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_ReferenceDataSource omitted. -/** - * serializeAws_json1_1ReferenceDataSources - */ -const se_ReferenceDataSources = (input: ReferenceDataSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReferenceDataSource(entry, context); - }); -}; +// se_ReferenceDataSources omitted. -/** - * serializeAws_json1_1ReferenceDataSourceUpdate - */ -const se_ReferenceDataSourceUpdate = (input: ReferenceDataSourceUpdate, context: __SerdeContext): any => { - return { - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.ReferenceSchemaUpdate != null && { - ReferenceSchemaUpdate: se_SourceSchema(input.ReferenceSchemaUpdate, context), - }), - ...(input.S3ReferenceDataSourceUpdate != null && { - S3ReferenceDataSourceUpdate: se_S3ReferenceDataSourceUpdate(input.S3ReferenceDataSourceUpdate, context), - }), - ...(input.TableNameUpdate != null && { TableNameUpdate: input.TableNameUpdate }), - }; -}; +// se_ReferenceDataSourceUpdate omitted. -/** - * serializeAws_json1_1ReferenceDataSourceUpdates - */ -const se_ReferenceDataSourceUpdates = (input: ReferenceDataSourceUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReferenceDataSourceUpdate(entry, context); - }); -}; +// se_ReferenceDataSourceUpdates omitted. -/** - * serializeAws_json1_1RollbackApplicationRequest - */ -const se_RollbackApplicationRequest = (input: RollbackApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - }; -}; +// se_RollbackApplicationRequest omitted. -/** - * serializeAws_json1_1RunConfiguration - */ -const se_RunConfiguration = (input: RunConfiguration, context: __SerdeContext): any => { - return { - ...(input.ApplicationRestoreConfiguration != null && { - ApplicationRestoreConfiguration: se_ApplicationRestoreConfiguration( - input.ApplicationRestoreConfiguration, - context - ), - }), - ...(input.FlinkRunConfiguration != null && { - FlinkRunConfiguration: se_FlinkRunConfiguration(input.FlinkRunConfiguration, context), - }), - ...(input.SqlRunConfigurations != null && { - SqlRunConfigurations: se_SqlRunConfigurations(input.SqlRunConfigurations, context), - }), - }; -}; +// se_RunConfiguration omitted. -/** - * serializeAws_json1_1RunConfigurationUpdate - */ -const se_RunConfigurationUpdate = (input: RunConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.ApplicationRestoreConfiguration != null && { - ApplicationRestoreConfiguration: se_ApplicationRestoreConfiguration( - input.ApplicationRestoreConfiguration, - context - ), - }), - ...(input.FlinkRunConfiguration != null && { - FlinkRunConfiguration: se_FlinkRunConfiguration(input.FlinkRunConfiguration, context), - }), - }; -}; +// se_RunConfigurationUpdate omitted. -/** - * serializeAws_json1_1S3Configuration - */ -const se_S3Configuration = (input: S3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.FileKey != null && { FileKey: input.FileKey }), - }; -}; +// se_S3Configuration omitted. -/** - * serializeAws_json1_1S3ContentBaseLocation - */ -const se_S3ContentBaseLocation = (input: S3ContentBaseLocation, context: __SerdeContext): any => { - return { - ...(input.BasePath != null && { BasePath: input.BasePath }), - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - }; -}; +// se_S3ContentBaseLocation omitted. -/** - * serializeAws_json1_1S3ContentBaseLocationUpdate - */ -const se_S3ContentBaseLocationUpdate = (input: S3ContentBaseLocationUpdate, context: __SerdeContext): any => { - return { - ...(input.BasePathUpdate != null && { BasePathUpdate: input.BasePathUpdate }), - ...(input.BucketARNUpdate != null && { BucketARNUpdate: input.BucketARNUpdate }), - }; -}; +// se_S3ContentBaseLocationUpdate omitted. -/** - * serializeAws_json1_1S3ContentLocation - */ -const se_S3ContentLocation = (input: S3ContentLocation, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.FileKey != null && { FileKey: input.FileKey }), - ...(input.ObjectVersion != null && { ObjectVersion: input.ObjectVersion }), - }; -}; +// se_S3ContentLocation omitted. -/** - * serializeAws_json1_1S3ContentLocationUpdate - */ -const se_S3ContentLocationUpdate = (input: S3ContentLocationUpdate, context: __SerdeContext): any => { - return { - ...(input.BucketARNUpdate != null && { BucketARNUpdate: input.BucketARNUpdate }), - ...(input.FileKeyUpdate != null && { FileKeyUpdate: input.FileKeyUpdate }), - ...(input.ObjectVersionUpdate != null && { ObjectVersionUpdate: input.ObjectVersionUpdate }), - }; -}; +// se_S3ContentLocationUpdate omitted. -/** - * serializeAws_json1_1S3ReferenceDataSource - */ -const se_S3ReferenceDataSource = (input: S3ReferenceDataSource, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.FileKey != null && { FileKey: input.FileKey }), - }; -}; +// se_S3ReferenceDataSource omitted. -/** - * serializeAws_json1_1S3ReferenceDataSourceUpdate - */ -const se_S3ReferenceDataSourceUpdate = (input: S3ReferenceDataSourceUpdate, context: __SerdeContext): any => { - return { - ...(input.BucketARNUpdate != null && { BucketARNUpdate: input.BucketARNUpdate }), - ...(input.FileKeyUpdate != null && { FileKeyUpdate: input.FileKeyUpdate }), - }; -}; +// se_S3ReferenceDataSourceUpdate omitted. -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_json1_1SourceSchema - */ -const se_SourceSchema = (input: SourceSchema, context: __SerdeContext): any => { - return { - ...(input.RecordColumns != null && { RecordColumns: se_RecordColumns(input.RecordColumns, context) }), - ...(input.RecordEncoding != null && { RecordEncoding: input.RecordEncoding }), - ...(input.RecordFormat != null && { RecordFormat: se_RecordFormat(input.RecordFormat, context) }), - }; -}; +// se_SourceSchema omitted. -/** - * serializeAws_json1_1SqlApplicationConfiguration - */ -const se_SqlApplicationConfiguration = (input: SqlApplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.Inputs != null && { Inputs: se_Inputs(input.Inputs, context) }), - ...(input.Outputs != null && { Outputs: se_Outputs(input.Outputs, context) }), - ...(input.ReferenceDataSources != null && { - ReferenceDataSources: se_ReferenceDataSources(input.ReferenceDataSources, context), - }), - }; -}; +// se_SqlApplicationConfiguration omitted. -/** - * serializeAws_json1_1SqlApplicationConfigurationUpdate - */ -const se_SqlApplicationConfigurationUpdate = ( - input: SqlApplicationConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.InputUpdates != null && { InputUpdates: se_InputUpdates(input.InputUpdates, context) }), - ...(input.OutputUpdates != null && { OutputUpdates: se_OutputUpdates(input.OutputUpdates, context) }), - ...(input.ReferenceDataSourceUpdates != null && { - ReferenceDataSourceUpdates: se_ReferenceDataSourceUpdates(input.ReferenceDataSourceUpdates, context), - }), - }; -}; +// se_SqlApplicationConfigurationUpdate omitted. -/** - * serializeAws_json1_1SqlRunConfiguration - */ -const se_SqlRunConfiguration = (input: SqlRunConfiguration, context: __SerdeContext): any => { - return { - ...(input.InputId != null && { InputId: input.InputId }), - ...(input.InputStartingPositionConfiguration != null && { - InputStartingPositionConfiguration: se_InputStartingPositionConfiguration( - input.InputStartingPositionConfiguration, - context - ), - }), - }; -}; +// se_SqlRunConfiguration omitted. -/** - * serializeAws_json1_1SqlRunConfigurations - */ -const se_SqlRunConfigurations = (input: SqlRunConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SqlRunConfiguration(entry, context); - }); -}; +// se_SqlRunConfigurations omitted. -/** - * serializeAws_json1_1StartApplicationRequest - */ -const se_StartApplicationRequest = (input: StartApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.RunConfiguration != null && { RunConfiguration: se_RunConfiguration(input.RunConfiguration, context) }), - }; -}; +// se_StartApplicationRequest omitted. -/** - * serializeAws_json1_1StopApplicationRequest - */ -const se_StopApplicationRequest = (input: StopApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.Force != null && { Force: input.Force }), - }; -}; +// se_StopApplicationRequest omitted. -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateApplicationMaintenanceConfigurationRequest - */ -const se_UpdateApplicationMaintenanceConfigurationRequest = ( - input: UpdateApplicationMaintenanceConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationMaintenanceConfigurationUpdate != null && { - ApplicationMaintenanceConfigurationUpdate: se_ApplicationMaintenanceConfigurationUpdate( - input.ApplicationMaintenanceConfigurationUpdate, - context - ), - }), - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - }; -}; +// se_UpdateApplicationMaintenanceConfigurationRequest omitted. /** * serializeAws_json1_1UpdateApplicationRequest */ const se_UpdateApplicationRequest = (input: UpdateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationConfigurationUpdate != null && { - ApplicationConfigurationUpdate: se_ApplicationConfigurationUpdate(input.ApplicationConfigurationUpdate, context), - }), - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOptionUpdates != null && { - CloudWatchLoggingOptionUpdates: se_CloudWatchLoggingOptionUpdates(input.CloudWatchLoggingOptionUpdates, context), - }), - ...(input.ConditionalToken != null && { ConditionalToken: input.ConditionalToken }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.RunConfigurationUpdate != null && { - RunConfigurationUpdate: se_RunConfigurationUpdate(input.RunConfigurationUpdate, context), - }), - ...(input.ServiceExecutionRoleUpdate != null && { ServiceExecutionRoleUpdate: input.ServiceExecutionRoleUpdate }), - }; -}; - -/** - * serializeAws_json1_1VpcConfiguration - */ -const se_VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - }; -}; - -/** - * serializeAws_json1_1VpcConfigurations - */ -const se_VpcConfigurations = (input: VpcConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VpcConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1VpcConfigurationUpdate - */ -const se_VpcConfigurationUpdate = (input: VpcConfigurationUpdate, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIdUpdates != null && { - SecurityGroupIdUpdates: se_SecurityGroupIds(input.SecurityGroupIdUpdates, context), - }), - ...(input.SubnetIdUpdates != null && { SubnetIdUpdates: se_SubnetIds(input.SubnetIdUpdates, context) }), - ...(input.VpcConfigurationId != null && { VpcConfigurationId: input.VpcConfigurationId }), - }; -}; - -/** - * serializeAws_json1_1VpcConfigurationUpdates - */ -const se_VpcConfigurationUpdates = (input: VpcConfigurationUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VpcConfigurationUpdate(entry, context); - }); -}; - -/** - * serializeAws_json1_1ZeppelinApplicationConfiguration - */ -const se_ZeppelinApplicationConfiguration = (input: ZeppelinApplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.CatalogConfiguration != null && { - CatalogConfiguration: se_CatalogConfiguration(input.CatalogConfiguration, context), - }), - ...(input.CustomArtifactsConfiguration != null && { - CustomArtifactsConfiguration: se_CustomArtifactsConfigurationList(input.CustomArtifactsConfiguration, context), - }), - ...(input.DeployAsApplicationConfiguration != null && { - DeployAsApplicationConfiguration: se_DeployAsApplicationConfiguration( - input.DeployAsApplicationConfiguration, - context - ), - }), - ...(input.MonitoringConfiguration != null && { - MonitoringConfiguration: se_ZeppelinMonitoringConfiguration(input.MonitoringConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1ZeppelinApplicationConfigurationUpdate - */ -const se_ZeppelinApplicationConfigurationUpdate = ( - input: ZeppelinApplicationConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.CatalogConfigurationUpdate != null && { - CatalogConfigurationUpdate: se_CatalogConfigurationUpdate(input.CatalogConfigurationUpdate, context), - }), - ...(input.CustomArtifactsConfigurationUpdate != null && { - CustomArtifactsConfigurationUpdate: se_CustomArtifactsConfigurationList( - input.CustomArtifactsConfigurationUpdate, - context - ), - }), - ...(input.DeployAsApplicationConfigurationUpdate != null && { - DeployAsApplicationConfigurationUpdate: se_DeployAsApplicationConfigurationUpdate( - input.DeployAsApplicationConfigurationUpdate, - context - ), - }), - ...(input.MonitoringConfigurationUpdate != null && { - MonitoringConfigurationUpdate: se_ZeppelinMonitoringConfigurationUpdate( - input.MonitoringConfigurationUpdate, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1ZeppelinMonitoringConfiguration - */ -const se_ZeppelinMonitoringConfiguration = (input: ZeppelinMonitoringConfiguration, context: __SerdeContext): any => { - return { - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - }; -}; - -/** - * serializeAws_json1_1ZeppelinMonitoringConfigurationUpdate - */ -const se_ZeppelinMonitoringConfigurationUpdate = ( - input: ZeppelinMonitoringConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.LogLevelUpdate != null && { LogLevelUpdate: input.LogLevelUpdate }), - }; + return take(input, { + ApplicationConfigurationUpdate: (_) => se_ApplicationConfigurationUpdate(_, context), + ApplicationName: [], + CloudWatchLoggingOptionUpdates: _json, + ConditionalToken: [], + CurrentApplicationVersionId: [], + RunConfigurationUpdate: _json, + ServiceExecutionRoleUpdate: [], + }); }; -/** - * deserializeAws_json1_1AddApplicationCloudWatchLoggingOptionResponse - */ -const de_AddApplicationCloudWatchLoggingOptionResponse = ( - output: any, - context: __SerdeContext -): AddApplicationCloudWatchLoggingOptionResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - CloudWatchLoggingOptionDescriptions: - output.CloudWatchLoggingOptionDescriptions != null - ? de_CloudWatchLoggingOptionDescriptions(output.CloudWatchLoggingOptionDescriptions, context) - : undefined, - } as any; -}; +// se_VpcConfiguration omitted. -/** - * deserializeAws_json1_1AddApplicationInputProcessingConfigurationResponse - */ -const de_AddApplicationInputProcessingConfigurationResponse = ( - output: any, - context: __SerdeContext -): AddApplicationInputProcessingConfigurationResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - InputId: __expectString(output.InputId), - InputProcessingConfigurationDescription: - output.InputProcessingConfigurationDescription != null - ? de_InputProcessingConfigurationDescription(output.InputProcessingConfigurationDescription, context) - : undefined, - } as any; -}; +// se_VpcConfigurations omitted. -/** - * deserializeAws_json1_1AddApplicationInputResponse - */ -const de_AddApplicationInputResponse = (output: any, context: __SerdeContext): AddApplicationInputResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - InputDescriptions: - output.InputDescriptions != null ? de_InputDescriptions(output.InputDescriptions, context) : undefined, - } as any; -}; +// se_VpcConfigurationUpdate omitted. -/** - * deserializeAws_json1_1AddApplicationOutputResponse - */ -const de_AddApplicationOutputResponse = (output: any, context: __SerdeContext): AddApplicationOutputResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - OutputDescriptions: - output.OutputDescriptions != null ? de_OutputDescriptions(output.OutputDescriptions, context) : undefined, - } as any; -}; +// se_VpcConfigurationUpdates omitted. -/** - * deserializeAws_json1_1AddApplicationReferenceDataSourceResponse - */ -const de_AddApplicationReferenceDataSourceResponse = ( - output: any, - context: __SerdeContext -): AddApplicationReferenceDataSourceResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - ReferenceDataSourceDescriptions: - output.ReferenceDataSourceDescriptions != null - ? de_ReferenceDataSourceDescriptions(output.ReferenceDataSourceDescriptions, context) - : undefined, - } as any; -}; +// se_ZeppelinApplicationConfiguration omitted. -/** - * deserializeAws_json1_1AddApplicationVpcConfigurationResponse - */ -const de_AddApplicationVpcConfigurationResponse = ( - output: any, - context: __SerdeContext -): AddApplicationVpcConfigurationResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - VpcConfigurationDescription: - output.VpcConfigurationDescription != null - ? de_VpcConfigurationDescription(output.VpcConfigurationDescription, context) - : undefined, - } as any; -}; +// se_ZeppelinApplicationConfigurationUpdate omitted. -/** - * deserializeAws_json1_1ApplicationCodeConfigurationDescription - */ -const de_ApplicationCodeConfigurationDescription = ( - output: any, - context: __SerdeContext -): ApplicationCodeConfigurationDescription => { - return { - CodeContentDescription: - output.CodeContentDescription != null - ? de_CodeContentDescription(output.CodeContentDescription, context) - : undefined, - CodeContentType: __expectString(output.CodeContentType), - } as any; -}; +// se_ZeppelinMonitoringConfiguration omitted. -/** - * deserializeAws_json1_1ApplicationConfigurationDescription - */ -const de_ApplicationConfigurationDescription = ( - output: any, - context: __SerdeContext -): ApplicationConfigurationDescription => { - return { - ApplicationCodeConfigurationDescription: - output.ApplicationCodeConfigurationDescription != null - ? de_ApplicationCodeConfigurationDescription(output.ApplicationCodeConfigurationDescription, context) - : undefined, - ApplicationSnapshotConfigurationDescription: - output.ApplicationSnapshotConfigurationDescription != null - ? de_ApplicationSnapshotConfigurationDescription(output.ApplicationSnapshotConfigurationDescription, context) - : undefined, - EnvironmentPropertyDescriptions: - output.EnvironmentPropertyDescriptions != null - ? de_EnvironmentPropertyDescriptions(output.EnvironmentPropertyDescriptions, context) - : undefined, - FlinkApplicationConfigurationDescription: - output.FlinkApplicationConfigurationDescription != null - ? de_FlinkApplicationConfigurationDescription(output.FlinkApplicationConfigurationDescription, context) - : undefined, - RunConfigurationDescription: - output.RunConfigurationDescription != null - ? de_RunConfigurationDescription(output.RunConfigurationDescription, context) - : undefined, - SqlApplicationConfigurationDescription: - output.SqlApplicationConfigurationDescription != null - ? de_SqlApplicationConfigurationDescription(output.SqlApplicationConfigurationDescription, context) - : undefined, - VpcConfigurationDescriptions: - output.VpcConfigurationDescriptions != null - ? de_VpcConfigurationDescriptions(output.VpcConfigurationDescriptions, context) - : undefined, - ZeppelinApplicationConfigurationDescription: - output.ZeppelinApplicationConfigurationDescription != null - ? de_ZeppelinApplicationConfigurationDescription(output.ZeppelinApplicationConfigurationDescription, context) - : undefined, - } as any; -}; +// se_ZeppelinMonitoringConfigurationUpdate omitted. -/** - * deserializeAws_json1_1ApplicationDetail - */ -const de_ApplicationDetail = (output: any, context: __SerdeContext): ApplicationDetail => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationConfigurationDescription: - output.ApplicationConfigurationDescription != null - ? de_ApplicationConfigurationDescription(output.ApplicationConfigurationDescription, context) - : undefined, - ApplicationDescription: __expectString(output.ApplicationDescription), - ApplicationMaintenanceConfigurationDescription: - output.ApplicationMaintenanceConfigurationDescription != null - ? de_ApplicationMaintenanceConfigurationDescription( - output.ApplicationMaintenanceConfigurationDescription, - context - ) - : undefined, - ApplicationMode: __expectString(output.ApplicationMode), - ApplicationName: __expectString(output.ApplicationName), - ApplicationStatus: __expectString(output.ApplicationStatus), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - ApplicationVersionRolledBackFrom: __expectLong(output.ApplicationVersionRolledBackFrom), - ApplicationVersionRolledBackTo: __expectLong(output.ApplicationVersionRolledBackTo), - ApplicationVersionUpdatedFrom: __expectLong(output.ApplicationVersionUpdatedFrom), - CloudWatchLoggingOptionDescriptions: - output.CloudWatchLoggingOptionDescriptions != null - ? de_CloudWatchLoggingOptionDescriptions(output.CloudWatchLoggingOptionDescriptions, context) - : undefined, - ConditionalToken: __expectString(output.ConditionalToken), - CreateTimestamp: - output.CreateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp))) - : undefined, - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - RuntimeEnvironment: __expectString(output.RuntimeEnvironment), - ServiceExecutionRole: __expectString(output.ServiceExecutionRole), - } as any; -}; +// de_AddApplicationCloudWatchLoggingOptionResponse omitted. -/** - * deserializeAws_json1_1ApplicationMaintenanceConfigurationDescription - */ -const de_ApplicationMaintenanceConfigurationDescription = ( - output: any, - context: __SerdeContext -): ApplicationMaintenanceConfigurationDescription => { - return { - ApplicationMaintenanceWindowEndTime: __expectString(output.ApplicationMaintenanceWindowEndTime), - ApplicationMaintenanceWindowStartTime: __expectString(output.ApplicationMaintenanceWindowStartTime), - } as any; -}; +// de_AddApplicationInputProcessingConfigurationResponse omitted. -/** - * deserializeAws_json1_1ApplicationRestoreConfiguration - */ -const de_ApplicationRestoreConfiguration = (output: any, context: __SerdeContext): ApplicationRestoreConfiguration => { - return { - ApplicationRestoreType: __expectString(output.ApplicationRestoreType), - SnapshotName: __expectString(output.SnapshotName), - } as any; -}; +// de_AddApplicationInputResponse omitted. -/** - * deserializeAws_json1_1ApplicationSnapshotConfigurationDescription - */ -const de_ApplicationSnapshotConfigurationDescription = ( - output: any, - context: __SerdeContext -): ApplicationSnapshotConfigurationDescription => { - return { - SnapshotsEnabled: __expectBoolean(output.SnapshotsEnabled), - } as any; -}; +// de_AddApplicationOutputResponse omitted. -/** - * deserializeAws_json1_1ApplicationSummaries - */ -const de_ApplicationSummaries = (output: any, context: __SerdeContext): ApplicationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationSummary(entry, context); - }); - return retVal; -}; +// de_AddApplicationReferenceDataSourceResponse omitted. -/** - * deserializeAws_json1_1ApplicationSummary - */ -const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationMode: __expectString(output.ApplicationMode), - ApplicationName: __expectString(output.ApplicationName), - ApplicationStatus: __expectString(output.ApplicationStatus), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - RuntimeEnvironment: __expectString(output.RuntimeEnvironment), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationVersionSummaries - */ -const de_ApplicationVersionSummaries = (output: any, context: __SerdeContext): ApplicationVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationVersionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApplicationVersionSummary - */ -const de_ApplicationVersionSummary = (output: any, context: __SerdeContext): ApplicationVersionSummary => { - return { - ApplicationStatus: __expectString(output.ApplicationStatus), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - } as any; -}; - -/** - * deserializeAws_json1_1CatalogConfigurationDescription - */ -const de_CatalogConfigurationDescription = (output: any, context: __SerdeContext): CatalogConfigurationDescription => { - return { - GlueDataCatalogConfigurationDescription: - output.GlueDataCatalogConfigurationDescription != null - ? de_GlueDataCatalogConfigurationDescription(output.GlueDataCatalogConfigurationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CheckpointConfigurationDescription - */ -const de_CheckpointConfigurationDescription = ( - output: any, - context: __SerdeContext -): CheckpointConfigurationDescription => { - return { - CheckpointInterval: __expectLong(output.CheckpointInterval), - CheckpointingEnabled: __expectBoolean(output.CheckpointingEnabled), - ConfigurationType: __expectString(output.ConfigurationType), - MinPauseBetweenCheckpoints: __expectLong(output.MinPauseBetweenCheckpoints), - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchLoggingOptionDescription - */ -const de_CloudWatchLoggingOptionDescription = ( - output: any, - context: __SerdeContext -): CloudWatchLoggingOptionDescription => { - return { - CloudWatchLoggingOptionId: __expectString(output.CloudWatchLoggingOptionId), - LogStreamARN: __expectString(output.LogStreamARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchLoggingOptionDescriptions - */ -const de_CloudWatchLoggingOptionDescriptions = ( - output: any, - context: __SerdeContext -): CloudWatchLoggingOptionDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchLoggingOptionDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CodeContentDescription - */ -const de_CodeContentDescription = (output: any, context: __SerdeContext): CodeContentDescription => { - return { - CodeMD5: __expectString(output.CodeMD5), - CodeSize: __expectLong(output.CodeSize), - S3ApplicationCodeLocationDescription: - output.S3ApplicationCodeLocationDescription != null - ? de_S3ApplicationCodeLocationDescription(output.S3ApplicationCodeLocationDescription, context) - : undefined, - TextContent: __expectString(output.TextContent), - } as any; -}; - -/** - * deserializeAws_json1_1CodeValidationException - */ -const de_CodeValidationException = (output: any, context: __SerdeContext): CodeValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CreateApplicationPresignedUrlResponse - */ -const de_CreateApplicationPresignedUrlResponse = ( - output: any, - context: __SerdeContext -): CreateApplicationPresignedUrlResponse => { - return { - AuthorizedUrl: __expectString(output.AuthorizedUrl), - } as any; -}; - -/** - * deserializeAws_json1_1CreateApplicationResponse - */ -const de_CreateApplicationResponse = (output: any, context: __SerdeContext): CreateApplicationResponse => { - return { - ApplicationDetail: - output.ApplicationDetail != null ? de_ApplicationDetail(output.ApplicationDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateApplicationSnapshotResponse - */ -const de_CreateApplicationSnapshotResponse = ( - output: any, - context: __SerdeContext -): CreateApplicationSnapshotResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CSVMappingParameters - */ -const de_CSVMappingParameters = (output: any, context: __SerdeContext): CSVMappingParameters => { - return { - RecordColumnDelimiter: __expectString(output.RecordColumnDelimiter), - RecordRowDelimiter: __expectString(output.RecordRowDelimiter), - } as any; -}; - -/** - * deserializeAws_json1_1CustomArtifactConfigurationDescription - */ -const de_CustomArtifactConfigurationDescription = ( - output: any, - context: __SerdeContext -): CustomArtifactConfigurationDescription => { - return { - ArtifactType: __expectString(output.ArtifactType), - MavenReferenceDescription: - output.MavenReferenceDescription != null - ? de_MavenReference(output.MavenReferenceDescription, context) - : undefined, - S3ContentLocationDescription: - output.S3ContentLocationDescription != null - ? de_S3ContentLocation(output.S3ContentLocationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomArtifactsConfigurationDescriptionList - */ -const de_CustomArtifactsConfigurationDescriptionList = ( - output: any, - context: __SerdeContext -): CustomArtifactConfigurationDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomArtifactConfigurationDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeleteApplicationCloudWatchLoggingOptionResponse - */ -const de_DeleteApplicationCloudWatchLoggingOptionResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationCloudWatchLoggingOptionResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - CloudWatchLoggingOptionDescriptions: - output.CloudWatchLoggingOptionDescriptions != null - ? de_CloudWatchLoggingOptionDescriptions(output.CloudWatchLoggingOptionDescriptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteApplicationInputProcessingConfigurationResponse - */ -const de_DeleteApplicationInputProcessingConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationInputProcessingConfigurationResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteApplicationOutputResponse - */ -const de_DeleteApplicationOutputResponse = (output: any, context: __SerdeContext): DeleteApplicationOutputResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteApplicationReferenceDataSourceResponse - */ -const de_DeleteApplicationReferenceDataSourceResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationReferenceDataSourceResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteApplicationResponse - */ -const de_DeleteApplicationResponse = (output: any, context: __SerdeContext): DeleteApplicationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteApplicationSnapshotResponse - */ -const de_DeleteApplicationSnapshotResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationSnapshotResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteApplicationVpcConfigurationResponse - */ -const de_DeleteApplicationVpcConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationVpcConfigurationResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - } as any; -}; - -/** - * deserializeAws_json1_1DeployAsApplicationConfigurationDescription - */ -const de_DeployAsApplicationConfigurationDescription = ( - output: any, - context: __SerdeContext -): DeployAsApplicationConfigurationDescription => { - return { - S3ContentLocationDescription: - output.S3ContentLocationDescription != null - ? de_S3ContentBaseLocationDescription(output.S3ContentLocationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeApplicationResponse - */ -const de_DescribeApplicationResponse = (output: any, context: __SerdeContext): DescribeApplicationResponse => { - return { - ApplicationDetail: - output.ApplicationDetail != null ? de_ApplicationDetail(output.ApplicationDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeApplicationSnapshotResponse - */ -const de_DescribeApplicationSnapshotResponse = ( - output: any, - context: __SerdeContext -): DescribeApplicationSnapshotResponse => { - return { - SnapshotDetails: output.SnapshotDetails != null ? de_SnapshotDetails(output.SnapshotDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeApplicationVersionResponse - */ -const de_DescribeApplicationVersionResponse = ( - output: any, - context: __SerdeContext -): DescribeApplicationVersionResponse => { - return { - ApplicationVersionDetail: - output.ApplicationVersionDetail != null - ? de_ApplicationDetail(output.ApplicationVersionDetail, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DestinationSchema - */ -const de_DestinationSchema = (output: any, context: __SerdeContext): DestinationSchema => { - return { - RecordFormatType: __expectString(output.RecordFormatType), - } as any; -}; - -/** - * deserializeAws_json1_1DiscoverInputSchemaResponse - */ -const de_DiscoverInputSchemaResponse = (output: any, context: __SerdeContext): DiscoverInputSchemaResponse => { - return { - InputSchema: output.InputSchema != null ? de_SourceSchema(output.InputSchema, context) : undefined, - ParsedInputRecords: - output.ParsedInputRecords != null ? de_ParsedInputRecords(output.ParsedInputRecords, context) : undefined, - ProcessedInputRecords: - output.ProcessedInputRecords != null - ? de_ProcessedInputRecords(output.ProcessedInputRecords, context) - : undefined, - RawInputRecords: output.RawInputRecords != null ? de_RawInputRecords(output.RawInputRecords, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EnvironmentPropertyDescriptions - */ -const de_EnvironmentPropertyDescriptions = (output: any, context: __SerdeContext): EnvironmentPropertyDescriptions => { - return { - PropertyGroupDescriptions: - output.PropertyGroupDescriptions != null - ? de_PropertyGroups(output.PropertyGroupDescriptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FlinkApplicationConfigurationDescription - */ -const de_FlinkApplicationConfigurationDescription = ( - output: any, - context: __SerdeContext -): FlinkApplicationConfigurationDescription => { - return { - CheckpointConfigurationDescription: - output.CheckpointConfigurationDescription != null - ? de_CheckpointConfigurationDescription(output.CheckpointConfigurationDescription, context) - : undefined, - JobPlanDescription: __expectString(output.JobPlanDescription), - MonitoringConfigurationDescription: - output.MonitoringConfigurationDescription != null - ? de_MonitoringConfigurationDescription(output.MonitoringConfigurationDescription, context) - : undefined, - ParallelismConfigurationDescription: - output.ParallelismConfigurationDescription != null - ? de_ParallelismConfigurationDescription(output.ParallelismConfigurationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FlinkRunConfiguration - */ -const de_FlinkRunConfiguration = (output: any, context: __SerdeContext): FlinkRunConfiguration => { - return { - AllowNonRestoredState: __expectBoolean(output.AllowNonRestoredState), - } as any; -}; - -/** - * deserializeAws_json1_1GlueDataCatalogConfigurationDescription - */ -const de_GlueDataCatalogConfigurationDescription = ( - output: any, - context: __SerdeContext -): GlueDataCatalogConfigurationDescription => { - return { - DatabaseARN: __expectString(output.DatabaseARN), - } as any; -}; - -/** - * deserializeAws_json1_1InAppStreamNames - */ -const de_InAppStreamNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InputDescription - */ -const de_InputDescription = (output: any, context: __SerdeContext): InputDescription => { - return { - InAppStreamNames: - output.InAppStreamNames != null ? de_InAppStreamNames(output.InAppStreamNames, context) : undefined, - InputId: __expectString(output.InputId), - InputParallelism: - output.InputParallelism != null ? de_InputParallelism(output.InputParallelism, context) : undefined, - InputProcessingConfigurationDescription: - output.InputProcessingConfigurationDescription != null - ? de_InputProcessingConfigurationDescription(output.InputProcessingConfigurationDescription, context) - : undefined, - InputSchema: output.InputSchema != null ? de_SourceSchema(output.InputSchema, context) : undefined, - InputStartingPositionConfiguration: - output.InputStartingPositionConfiguration != null - ? de_InputStartingPositionConfiguration(output.InputStartingPositionConfiguration, context) - : undefined, - KinesisFirehoseInputDescription: - output.KinesisFirehoseInputDescription != null - ? de_KinesisFirehoseInputDescription(output.KinesisFirehoseInputDescription, context) - : undefined, - KinesisStreamsInputDescription: - output.KinesisStreamsInputDescription != null - ? de_KinesisStreamsInputDescription(output.KinesisStreamsInputDescription, context) - : undefined, - NamePrefix: __expectString(output.NamePrefix), - } as any; -}; - -/** - * deserializeAws_json1_1InputDescriptions - */ -const de_InputDescriptions = (output: any, context: __SerdeContext): InputDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InputLambdaProcessorDescription - */ -const de_InputLambdaProcessorDescription = (output: any, context: __SerdeContext): InputLambdaProcessorDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1InputParallelism - */ -const de_InputParallelism = (output: any, context: __SerdeContext): InputParallelism => { - return { - Count: __expectInt32(output.Count), - } as any; -}; - -/** - * deserializeAws_json1_1InputProcessingConfigurationDescription - */ -const de_InputProcessingConfigurationDescription = ( - output: any, - context: __SerdeContext -): InputProcessingConfigurationDescription => { - return { - InputLambdaProcessorDescription: - output.InputLambdaProcessorDescription != null - ? de_InputLambdaProcessorDescription(output.InputLambdaProcessorDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InputStartingPositionConfiguration - */ -const de_InputStartingPositionConfiguration = ( - output: any, - context: __SerdeContext -): InputStartingPositionConfiguration => { - return { - InputStartingPosition: __expectString(output.InputStartingPosition), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidApplicationConfigurationException - */ -const de_InvalidApplicationConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidApplicationConfigurationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidArgumentException - */ -const de_InvalidArgumentException = (output: any, context: __SerdeContext): InvalidArgumentException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1JSONMappingParameters - */ -const de_JSONMappingParameters = (output: any, context: __SerdeContext): JSONMappingParameters => { - return { - RecordRowPath: __expectString(output.RecordRowPath), - } as any; -}; - -/** - * deserializeAws_json1_1KinesisFirehoseInputDescription - */ -const de_KinesisFirehoseInputDescription = (output: any, context: __SerdeContext): KinesisFirehoseInputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1KinesisFirehoseOutputDescription - */ -const de_KinesisFirehoseOutputDescription = ( - output: any, - context: __SerdeContext -): KinesisFirehoseOutputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1KinesisStreamsInputDescription - */ -const de_KinesisStreamsInputDescription = (output: any, context: __SerdeContext): KinesisStreamsInputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1KinesisStreamsOutputDescription - */ -const de_KinesisStreamsOutputDescription = (output: any, context: __SerdeContext): KinesisStreamsOutputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1LambdaOutputDescription - */ -const de_LambdaOutputDescription = (output: any, context: __SerdeContext): LambdaOutputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; - -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ListApplicationSnapshotsResponse - */ -const de_ListApplicationSnapshotsResponse = ( - output: any, - context: __SerdeContext -): ListApplicationSnapshotsResponse => { - return { - NextToken: __expectString(output.NextToken), - SnapshotSummaries: - output.SnapshotSummaries != null ? de_SnapshotSummaries(output.SnapshotSummaries, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListApplicationsResponse - */ -const de_ListApplicationsResponse = (output: any, context: __SerdeContext): ListApplicationsResponse => { - return { - ApplicationSummaries: - output.ApplicationSummaries != null ? de_ApplicationSummaries(output.ApplicationSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListApplicationVersionsResponse - */ -const de_ListApplicationVersionsResponse = (output: any, context: __SerdeContext): ListApplicationVersionsResponse => { - return { - ApplicationVersionSummaries: - output.ApplicationVersionSummaries != null - ? de_ApplicationVersionSummaries(output.ApplicationVersionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MappingParameters - */ -const de_MappingParameters = (output: any, context: __SerdeContext): MappingParameters => { - return { - CSVMappingParameters: - output.CSVMappingParameters != null ? de_CSVMappingParameters(output.CSVMappingParameters, context) : undefined, - JSONMappingParameters: - output.JSONMappingParameters != null - ? de_JSONMappingParameters(output.JSONMappingParameters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MavenReference - */ -const de_MavenReference = (output: any, context: __SerdeContext): MavenReference => { - return { - ArtifactId: __expectString(output.ArtifactId), - GroupId: __expectString(output.GroupId), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1MonitoringConfigurationDescription - */ -const de_MonitoringConfigurationDescription = ( - output: any, - context: __SerdeContext -): MonitoringConfigurationDescription => { - return { - ConfigurationType: __expectString(output.ConfigurationType), - LogLevel: __expectString(output.LogLevel), - MetricsLevel: __expectString(output.MetricsLevel), - } as any; -}; - -/** - * deserializeAws_json1_1OutputDescription - */ -const de_OutputDescription = (output: any, context: __SerdeContext): OutputDescription => { - return { - DestinationSchema: - output.DestinationSchema != null ? de_DestinationSchema(output.DestinationSchema, context) : undefined, - KinesisFirehoseOutputDescription: - output.KinesisFirehoseOutputDescription != null - ? de_KinesisFirehoseOutputDescription(output.KinesisFirehoseOutputDescription, context) - : undefined, - KinesisStreamsOutputDescription: - output.KinesisStreamsOutputDescription != null - ? de_KinesisStreamsOutputDescription(output.KinesisStreamsOutputDescription, context) - : undefined, - LambdaOutputDescription: - output.LambdaOutputDescription != null - ? de_LambdaOutputDescription(output.LambdaOutputDescription, context) - : undefined, - Name: __expectString(output.Name), - OutputId: __expectString(output.OutputId), - } as any; -}; - -/** - * deserializeAws_json1_1OutputDescriptions - */ -const de_OutputDescriptions = (output: any, context: __SerdeContext): OutputDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ParallelismConfigurationDescription - */ -const de_ParallelismConfigurationDescription = ( - output: any, - context: __SerdeContext -): ParallelismConfigurationDescription => { - return { - AutoScalingEnabled: __expectBoolean(output.AutoScalingEnabled), - ConfigurationType: __expectString(output.ConfigurationType), - CurrentParallelism: __expectInt32(output.CurrentParallelism), - Parallelism: __expectInt32(output.Parallelism), - ParallelismPerKPU: __expectInt32(output.ParallelismPerKPU), - } as any; -}; - -/** - * deserializeAws_json1_1ParsedInputRecord - */ -const de_ParsedInputRecord = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ParsedInputRecords - */ -const de_ParsedInputRecords = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParsedInputRecord(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProcessedInputRecords - */ -const de_ProcessedInputRecords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AddApplicationVpcConfigurationResponse omitted. -/** - * deserializeAws_json1_1PropertyGroup - */ -const de_PropertyGroup = (output: any, context: __SerdeContext): PropertyGroup => { - return { - PropertyGroupId: __expectString(output.PropertyGroupId), - PropertyMap: output.PropertyMap != null ? de_PropertyMap(output.PropertyMap, context) : undefined, - } as any; -}; +// de_ApplicationCodeConfigurationDescription omitted. -/** - * deserializeAws_json1_1PropertyGroups - */ -const de_PropertyGroups = (output: any, context: __SerdeContext): PropertyGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PropertyGroup(entry, context); - }); - return retVal; -}; +// de_ApplicationConfigurationDescription omitted. /** - * deserializeAws_json1_1PropertyMap + * deserializeAws_json1_1ApplicationDetail */ -const de_PropertyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_ApplicationDetail = (output: any, context: __SerdeContext): ApplicationDetail => { + return take(output, { + ApplicationARN: __expectString, + ApplicationConfigurationDescription: _json, + ApplicationDescription: __expectString, + ApplicationMaintenanceConfigurationDescription: _json, + ApplicationMode: __expectString, + ApplicationName: __expectString, + ApplicationStatus: __expectString, + ApplicationVersionId: __expectLong, + ApplicationVersionRolledBackFrom: __expectLong, + ApplicationVersionRolledBackTo: __expectLong, + ApplicationVersionUpdatedFrom: __expectLong, + CloudWatchLoggingOptionDescriptions: _json, + ConditionalToken: __expectString, + CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuntimeEnvironment: __expectString, + ServiceExecutionRole: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RawInputRecords - */ -const de_RawInputRecords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ApplicationMaintenanceConfigurationDescription omitted. -/** - * deserializeAws_json1_1RecordColumn - */ -const de_RecordColumn = (output: any, context: __SerdeContext): RecordColumn => { - return { - Mapping: __expectString(output.Mapping), - Name: __expectString(output.Name), - SqlType: __expectString(output.SqlType), - } as any; -}; +// de_ApplicationRestoreConfiguration omitted. -/** - * deserializeAws_json1_1RecordColumns - */ -const de_RecordColumns = (output: any, context: __SerdeContext): RecordColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordColumn(entry, context); - }); - return retVal; -}; +// de_ApplicationSnapshotConfigurationDescription omitted. -/** - * deserializeAws_json1_1RecordFormat - */ -const de_RecordFormat = (output: any, context: __SerdeContext): RecordFormat => { - return { - MappingParameters: - output.MappingParameters != null ? de_MappingParameters(output.MappingParameters, context) : undefined, - RecordFormatType: __expectString(output.RecordFormatType), - } as any; -}; +// de_ApplicationSummaries omitted. -/** - * deserializeAws_json1_1ReferenceDataSourceDescription - */ -const de_ReferenceDataSourceDescription = (output: any, context: __SerdeContext): ReferenceDataSourceDescription => { - return { - ReferenceId: __expectString(output.ReferenceId), - ReferenceSchema: output.ReferenceSchema != null ? de_SourceSchema(output.ReferenceSchema, context) : undefined, - S3ReferenceDataSourceDescription: - output.S3ReferenceDataSourceDescription != null - ? de_S3ReferenceDataSourceDescription(output.S3ReferenceDataSourceDescription, context) - : undefined, - TableName: __expectString(output.TableName), - } as any; -}; +// de_ApplicationSummary omitted. -/** - * deserializeAws_json1_1ReferenceDataSourceDescriptions - */ -const de_ReferenceDataSourceDescriptions = (output: any, context: __SerdeContext): ReferenceDataSourceDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReferenceDataSourceDescription(entry, context); - }); - return retVal; -}; +// de_ApplicationVersionSummaries omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ApplicationVersionSummary omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CatalogConfigurationDescription omitted. -/** - * deserializeAws_json1_1ResourceProvisionedThroughputExceededException - */ -const de_ResourceProvisionedThroughputExceededException = ( - output: any, - context: __SerdeContext -): ResourceProvisionedThroughputExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CheckpointConfigurationDescription omitted. + +// de_CloudWatchLoggingOptionDescription omitted. + +// de_CloudWatchLoggingOptionDescriptions omitted. + +// de_CodeContentDescription omitted. + +// de_CodeValidationException omitted. + +// de_ConcurrentModificationException omitted. + +// de_CreateApplicationPresignedUrlResponse omitted. /** - * deserializeAws_json1_1RollbackApplicationResponse + * deserializeAws_json1_1CreateApplicationResponse */ -const de_RollbackApplicationResponse = (output: any, context: __SerdeContext): RollbackApplicationResponse => { - return { - ApplicationDetail: - output.ApplicationDetail != null ? de_ApplicationDetail(output.ApplicationDetail, context) : undefined, - } as any; +const de_CreateApplicationResponse = (output: any, context: __SerdeContext): CreateApplicationResponse => { + return take(output, { + ApplicationDetail: (_: any) => de_ApplicationDetail(_, context), + }) as any; }; +// de_CreateApplicationSnapshotResponse omitted. + +// de_CSVMappingParameters omitted. + +// de_CustomArtifactConfigurationDescription omitted. + +// de_CustomArtifactsConfigurationDescriptionList omitted. + +// de_DeleteApplicationCloudWatchLoggingOptionResponse omitted. + +// de_DeleteApplicationInputProcessingConfigurationResponse omitted. + +// de_DeleteApplicationOutputResponse omitted. + +// de_DeleteApplicationReferenceDataSourceResponse omitted. + +// de_DeleteApplicationResponse omitted. + +// de_DeleteApplicationSnapshotResponse omitted. + +// de_DeleteApplicationVpcConfigurationResponse omitted. + +// de_DeployAsApplicationConfigurationDescription omitted. + /** - * deserializeAws_json1_1RunConfigurationDescription + * deserializeAws_json1_1DescribeApplicationResponse */ -const de_RunConfigurationDescription = (output: any, context: __SerdeContext): RunConfigurationDescription => { - return { - ApplicationRestoreConfigurationDescription: - output.ApplicationRestoreConfigurationDescription != null - ? de_ApplicationRestoreConfiguration(output.ApplicationRestoreConfigurationDescription, context) - : undefined, - FlinkRunConfigurationDescription: - output.FlinkRunConfigurationDescription != null - ? de_FlinkRunConfiguration(output.FlinkRunConfigurationDescription, context) - : undefined, - } as any; +const de_DescribeApplicationResponse = (output: any, context: __SerdeContext): DescribeApplicationResponse => { + return take(output, { + ApplicationDetail: (_: any) => de_ApplicationDetail(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3ApplicationCodeLocationDescription + * deserializeAws_json1_1DescribeApplicationSnapshotResponse */ -const de_S3ApplicationCodeLocationDescription = ( +const de_DescribeApplicationSnapshotResponse = ( output: any, context: __SerdeContext -): S3ApplicationCodeLocationDescription => { - return { - BucketARN: __expectString(output.BucketARN), - FileKey: __expectString(output.FileKey), - ObjectVersion: __expectString(output.ObjectVersion), - } as any; +): DescribeApplicationSnapshotResponse => { + return take(output, { + SnapshotDetails: (_: any) => de_SnapshotDetails(_, context), + }) as any; }; /** - * deserializeAws_json1_1S3ContentBaseLocationDescription + * deserializeAws_json1_1DescribeApplicationVersionResponse */ -const de_S3ContentBaseLocationDescription = ( +const de_DescribeApplicationVersionResponse = ( output: any, context: __SerdeContext -): S3ContentBaseLocationDescription => { - return { - BasePath: __expectString(output.BasePath), - BucketARN: __expectString(output.BucketARN), - } as any; +): DescribeApplicationVersionResponse => { + return take(output, { + ApplicationVersionDetail: (_: any) => de_ApplicationDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1S3ContentLocation - */ -const de_S3ContentLocation = (output: any, context: __SerdeContext): S3ContentLocation => { - return { - BucketARN: __expectString(output.BucketARN), - FileKey: __expectString(output.FileKey), - ObjectVersion: __expectString(output.ObjectVersion), - } as any; -}; +// de_DestinationSchema omitted. + +// de_DiscoverInputSchemaResponse omitted. + +// de_EnvironmentPropertyDescriptions omitted. + +// de_FlinkApplicationConfigurationDescription omitted. + +// de_FlinkRunConfiguration omitted. + +// de_GlueDataCatalogConfigurationDescription omitted. + +// de_InAppStreamNames omitted. + +// de_InputDescription omitted. + +// de_InputDescriptions omitted. + +// de_InputLambdaProcessorDescription omitted. + +// de_InputParallelism omitted. + +// de_InputProcessingConfigurationDescription omitted. + +// de_InputStartingPositionConfiguration omitted. + +// de_InvalidApplicationConfigurationException omitted. + +// de_InvalidArgumentException omitted. + +// de_InvalidRequestException omitted. + +// de_JSONMappingParameters omitted. + +// de_KinesisFirehoseInputDescription omitted. + +// de_KinesisFirehoseOutputDescription omitted. + +// de_KinesisStreamsInputDescription omitted. + +// de_KinesisStreamsOutputDescription omitted. + +// de_LambdaOutputDescription omitted. + +// de_LimitExceededException omitted. /** - * deserializeAws_json1_1S3ReferenceDataSourceDescription + * deserializeAws_json1_1ListApplicationSnapshotsResponse */ -const de_S3ReferenceDataSourceDescription = ( +const de_ListApplicationSnapshotsResponse = ( output: any, context: __SerdeContext -): S3ReferenceDataSourceDescription => { - return { - BucketARN: __expectString(output.BucketARN), - FileKey: __expectString(output.FileKey), - ReferenceRoleARN: __expectString(output.ReferenceRoleARN), - } as any; +): ListApplicationSnapshotsResponse => { + return take(output, { + NextToken: __expectString, + SnapshotSummaries: (_: any) => de_SnapshotSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListApplicationsResponse omitted. + +// de_ListApplicationVersionsResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_MappingParameters omitted. + +// de_MavenReference omitted. + +// de_MonitoringConfigurationDescription omitted. + +// de_OutputDescription omitted. + +// de_OutputDescriptions omitted. + +// de_ParallelismConfigurationDescription omitted. + +// de_ParsedInputRecord omitted. + +// de_ParsedInputRecords omitted. + +// de_ProcessedInputRecords omitted. + +// de_PropertyGroup omitted. + +// de_PropertyGroups omitted. + +// de_PropertyMap omitted. + +// de_RawInputRecords omitted. + +// de_RecordColumn omitted. + +// de_RecordColumns omitted. + +// de_RecordFormat omitted. + +// de_ReferenceDataSourceDescription omitted. + +// de_ReferenceDataSourceDescriptions omitted. + +// de_ResourceInUseException omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceProvisionedThroughputExceededException omitted. /** - * deserializeAws_json1_1ServiceUnavailableException + * deserializeAws_json1_1RollbackApplicationResponse */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; +const de_RollbackApplicationResponse = (output: any, context: __SerdeContext): RollbackApplicationResponse => { + return take(output, { + ApplicationDetail: (_: any) => de_ApplicationDetail(_, context), + }) as any; }; +// de_RunConfigurationDescription omitted. + +// de_S3ApplicationCodeLocationDescription omitted. + +// de_S3ContentBaseLocationDescription omitted. + +// de_S3ContentLocation omitted. + +// de_S3ReferenceDataSourceDescription omitted. + +// de_SecurityGroupIds omitted. + +// de_ServiceUnavailableException omitted. + /** * deserializeAws_json1_1SnapshotDetails */ const de_SnapshotDetails = (output: any, context: __SerdeContext): SnapshotDetails => { - return { - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - SnapshotCreationTimestamp: - output.SnapshotCreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SnapshotCreationTimestamp))) - : undefined, - SnapshotName: __expectString(output.SnapshotName), - SnapshotStatus: __expectString(output.SnapshotStatus), - } as any; + return take(output, { + ApplicationVersionId: __expectLong, + SnapshotCreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SnapshotName: __expectString, + SnapshotStatus: __expectString, + }) as any; }; /** @@ -5805,239 +3314,53 @@ const de_SnapshotSummaries = (output: any, context: __SerdeContext): SnapshotDet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SnapshotDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SourceSchema - */ -const de_SourceSchema = (output: any, context: __SerdeContext): SourceSchema => { - return { - RecordColumns: output.RecordColumns != null ? de_RecordColumns(output.RecordColumns, context) : undefined, - RecordEncoding: __expectString(output.RecordEncoding), - RecordFormat: output.RecordFormat != null ? de_RecordFormat(output.RecordFormat, context) : undefined, - } as any; -}; +// de_SourceSchema omitted. -/** - * deserializeAws_json1_1SqlApplicationConfigurationDescription - */ -const de_SqlApplicationConfigurationDescription = ( - output: any, - context: __SerdeContext -): SqlApplicationConfigurationDescription => { - return { - InputDescriptions: - output.InputDescriptions != null ? de_InputDescriptions(output.InputDescriptions, context) : undefined, - OutputDescriptions: - output.OutputDescriptions != null ? de_OutputDescriptions(output.OutputDescriptions, context) : undefined, - ReferenceDataSourceDescriptions: - output.ReferenceDataSourceDescriptions != null - ? de_ReferenceDataSourceDescriptions(output.ReferenceDataSourceDescriptions, context) - : undefined, - } as any; -}; +// de_SqlApplicationConfigurationDescription omitted. -/** - * deserializeAws_json1_1StartApplicationResponse - */ -const de_StartApplicationResponse = (output: any, context: __SerdeContext): StartApplicationResponse => { - return {} as any; -}; +// de_StartApplicationResponse omitted. -/** - * deserializeAws_json1_1StopApplicationResponse - */ -const de_StopApplicationResponse = (output: any, context: __SerdeContext): StopApplicationResponse => { - return {} as any; -}; +// de_StopApplicationResponse omitted. -/** - * deserializeAws_json1_1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UnableToDetectSchemaException - */ -const de_UnableToDetectSchemaException = (output: any, context: __SerdeContext): UnableToDetectSchemaException => { - return { - Message: __expectString(output.Message), - ProcessedInputRecords: - output.ProcessedInputRecords != null - ? de_ProcessedInputRecords(output.ProcessedInputRecords, context) - : undefined, - RawInputRecords: output.RawInputRecords != null ? de_RawInputRecords(output.RawInputRecords, context) : undefined, - } as any; -}; +// de_UnableToDetectSchemaException omitted. -/** - * deserializeAws_json1_1UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedOperationException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateApplicationMaintenanceConfigurationResponse - */ -const de_UpdateApplicationMaintenanceConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateApplicationMaintenanceConfigurationResponse => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationMaintenanceConfigurationDescription: - output.ApplicationMaintenanceConfigurationDescription != null - ? de_ApplicationMaintenanceConfigurationDescription( - output.ApplicationMaintenanceConfigurationDescription, - context - ) - : undefined, - } as any; -}; +// de_UpdateApplicationMaintenanceConfigurationResponse omitted. /** * deserializeAws_json1_1UpdateApplicationResponse */ const de_UpdateApplicationResponse = (output: any, context: __SerdeContext): UpdateApplicationResponse => { - return { - ApplicationDetail: - output.ApplicationDetail != null ? de_ApplicationDetail(output.ApplicationDetail, context) : undefined, - } as any; + return take(output, { + ApplicationDetail: (_: any) => de_ApplicationDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1VpcConfigurationDescription - */ -const de_VpcConfigurationDescription = (output: any, context: __SerdeContext): VpcConfigurationDescription => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcConfigurationId: __expectString(output.VpcConfigurationId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_VpcConfigurationDescription omitted. -/** - * deserializeAws_json1_1VpcConfigurationDescriptions - */ -const de_VpcConfigurationDescriptions = (output: any, context: __SerdeContext): VpcConfigurationDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcConfigurationDescription(entry, context); - }); - return retVal; -}; +// de_VpcConfigurationDescriptions omitted. -/** - * deserializeAws_json1_1ZeppelinApplicationConfigurationDescription - */ -const de_ZeppelinApplicationConfigurationDescription = ( - output: any, - context: __SerdeContext -): ZeppelinApplicationConfigurationDescription => { - return { - CatalogConfigurationDescription: - output.CatalogConfigurationDescription != null - ? de_CatalogConfigurationDescription(output.CatalogConfigurationDescription, context) - : undefined, - CustomArtifactsConfigurationDescription: - output.CustomArtifactsConfigurationDescription != null - ? de_CustomArtifactsConfigurationDescriptionList(output.CustomArtifactsConfigurationDescription, context) - : undefined, - DeployAsApplicationConfigurationDescription: - output.DeployAsApplicationConfigurationDescription != null - ? de_DeployAsApplicationConfigurationDescription(output.DeployAsApplicationConfigurationDescription, context) - : undefined, - MonitoringConfigurationDescription: - output.MonitoringConfigurationDescription != null - ? de_ZeppelinMonitoringConfigurationDescription(output.MonitoringConfigurationDescription, context) - : undefined, - } as any; -}; +// de_ZeppelinApplicationConfigurationDescription omitted. -/** - * deserializeAws_json1_1ZeppelinMonitoringConfigurationDescription - */ -const de_ZeppelinMonitoringConfigurationDescription = ( - output: any, - context: __SerdeContext -): ZeppelinMonitoringConfigurationDescription => { - return { - LogLevel: __expectString(output.LogLevel), - } as any; -}; +// de_ZeppelinMonitoringConfigurationDescription omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -6059,6 +3382,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-kinesis-analytics/src/protocols/Aws_json1_1.ts b/clients/client-kinesis-analytics/src/protocols/Aws_json1_1.ts index a7f725b82ce1..5f54d2aba737 100644 --- a/clients/client-kinesis-analytics/src/protocols/Aws_json1_1.ts +++ b/clients/client-kinesis-analytics/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -77,51 +77,34 @@ import { UpdateApplicationCommandInput, UpdateApplicationCommandOutput } from ". import { KinesisAnalyticsServiceException as __BaseException } from "../models/KinesisAnalyticsServiceException"; import { AddApplicationCloudWatchLoggingOptionRequest, - AddApplicationCloudWatchLoggingOptionResponse, AddApplicationInputProcessingConfigurationRequest, - AddApplicationInputProcessingConfigurationResponse, AddApplicationInputRequest, - AddApplicationInputResponse, AddApplicationOutputRequest, - AddApplicationOutputResponse, AddApplicationReferenceDataSourceRequest, - AddApplicationReferenceDataSourceResponse, ApplicationDetail, - ApplicationSummary, ApplicationUpdate, CloudWatchLoggingOption, - CloudWatchLoggingOptionDescription, CloudWatchLoggingOptionUpdate, CodeValidationException, ConcurrentModificationException, CreateApplicationRequest, - CreateApplicationResponse, CSVMappingParameters, DeleteApplicationCloudWatchLoggingOptionRequest, - DeleteApplicationCloudWatchLoggingOptionResponse, DeleteApplicationInputProcessingConfigurationRequest, - DeleteApplicationInputProcessingConfigurationResponse, DeleteApplicationOutputRequest, - DeleteApplicationOutputResponse, DeleteApplicationReferenceDataSourceRequest, - DeleteApplicationReferenceDataSourceResponse, DeleteApplicationRequest, - DeleteApplicationResponse, DescribeApplicationRequest, DescribeApplicationResponse, DestinationSchema, DiscoverInputSchemaRequest, - DiscoverInputSchemaResponse, Input, InputConfiguration, - InputDescription, InputLambdaProcessor, - InputLambdaProcessorDescription, InputLambdaProcessorUpdate, InputParallelism, InputParallelismUpdate, InputProcessingConfiguration, - InputProcessingConfigurationDescription, InputProcessingConfigurationUpdate, InputSchemaUpdate, InputStartingPositionConfiguration, @@ -130,57 +113,42 @@ import { InvalidArgumentException, JSONMappingParameters, KinesisFirehoseInput, - KinesisFirehoseInputDescription, KinesisFirehoseInputUpdate, KinesisFirehoseOutput, - KinesisFirehoseOutputDescription, KinesisFirehoseOutputUpdate, KinesisStreamsInput, - KinesisStreamsInputDescription, KinesisStreamsInputUpdate, KinesisStreamsOutput, - KinesisStreamsOutputDescription, KinesisStreamsOutputUpdate, LambdaOutput, - LambdaOutputDescription, LambdaOutputUpdate, LimitExceededException, ListApplicationsRequest, - ListApplicationsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MappingParameters, Output, - OutputDescription, OutputUpdate, RecordColumn, RecordFormat, ReferenceDataSource, - ReferenceDataSourceDescription, ReferenceDataSourceUpdate, ResourceInUseException, ResourceNotFoundException, ResourceProvisionedThroughputExceededException, S3Configuration, S3ReferenceDataSource, - S3ReferenceDataSourceDescription, S3ReferenceDataSourceUpdate, ServiceUnavailableException, SourceSchema, StartApplicationRequest, - StartApplicationResponse, StopApplicationRequest, - StopApplicationResponse, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagsException, UnableToDetectSchemaException, UnsupportedOperationException, UntagResourceRequest, - UntagResourceResponse, UpdateApplicationRequest, - UpdateApplicationResponse, } from "../models/models_0"; /** @@ -192,7 +160,7 @@ export const se_AddApplicationCloudWatchLoggingOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationCloudWatchLoggingOption"); let body: any; - body = JSON.stringify(se_AddApplicationCloudWatchLoggingOptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -205,7 +173,7 @@ export const se_AddApplicationInputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationInput"); let body: any; - body = JSON.stringify(se_AddApplicationInputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -218,7 +186,7 @@ export const se_AddApplicationInputProcessingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationInputProcessingConfiguration"); let body: any; - body = JSON.stringify(se_AddApplicationInputProcessingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -231,7 +199,7 @@ export const se_AddApplicationOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationOutput"); let body: any; - body = JSON.stringify(se_AddApplicationOutputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -244,7 +212,7 @@ export const se_AddApplicationReferenceDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddApplicationReferenceDataSource"); let body: any; - body = JSON.stringify(se_AddApplicationReferenceDataSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -257,7 +225,7 @@ export const se_CreateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApplication"); let body: any; - body = JSON.stringify(se_CreateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -283,7 +251,7 @@ export const se_DeleteApplicationCloudWatchLoggingOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationCloudWatchLoggingOption"); let body: any; - body = JSON.stringify(se_DeleteApplicationCloudWatchLoggingOptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -296,7 +264,7 @@ export const se_DeleteApplicationInputProcessingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationInputProcessingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteApplicationInputProcessingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -309,7 +277,7 @@ export const se_DeleteApplicationOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationOutput"); let body: any; - body = JSON.stringify(se_DeleteApplicationOutputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -322,7 +290,7 @@ export const se_DeleteApplicationReferenceDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApplicationReferenceDataSource"); let body: any; - body = JSON.stringify(se_DeleteApplicationReferenceDataSourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -335,7 +303,7 @@ export const se_DescribeApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplication"); let body: any; - body = JSON.stringify(se_DescribeApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -348,7 +316,7 @@ export const se_DiscoverInputSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DiscoverInputSchema"); let body: any; - body = JSON.stringify(se_DiscoverInputSchemaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -361,7 +329,7 @@ export const se_ListApplicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplications"); let body: any; - body = JSON.stringify(se_ListApplicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -374,7 +342,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -387,7 +355,7 @@ export const se_StartApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartApplication"); let body: any; - body = JSON.stringify(se_StartApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -400,7 +368,7 @@ export const se_StopApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopApplication"); let body: any; - body = JSON.stringify(se_StopApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -413,7 +381,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -426,7 +394,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -439,7 +407,7 @@ export const se_UpdateApplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplication"); let body: any; - body = JSON.stringify(se_UpdateApplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -455,12 +423,12 @@ export const de_AddApplicationCloudWatchLoggingOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationCloudWatchLoggingOptionResponse(data, context); + contents = _json(data); const response: AddApplicationCloudWatchLoggingOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -493,10 +461,9 @@ const de_AddApplicationCloudWatchLoggingOptionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -514,12 +481,12 @@ export const de_AddApplicationInputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationInputResponse(data, context); + contents = _json(data); const response: AddApplicationInputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -555,10 +522,9 @@ const de_AddApplicationInputCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -576,12 +542,12 @@ export const de_AddApplicationInputProcessingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationInputProcessingConfigurationResponse(data, context); + contents = _json(data); const response: AddApplicationInputProcessingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -614,10 +580,9 @@ const de_AddApplicationInputProcessingConfigurationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -635,12 +600,12 @@ export const de_AddApplicationOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationOutputResponse(data, context); + contents = _json(data); const response: AddApplicationOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -673,10 +638,9 @@ const de_AddApplicationOutputCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -694,12 +658,12 @@ export const de_AddApplicationReferenceDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddApplicationReferenceDataSourceResponse(data, context); + contents = _json(data); const response: AddApplicationReferenceDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -732,10 +696,9 @@ const de_AddApplicationReferenceDataSourceCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -753,12 +716,12 @@ export const de_CreateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateApplicationResponse(data, context); + contents = _json(data); const response: CreateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -794,10 +757,9 @@ const de_CreateApplicationCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -815,12 +777,12 @@ export const de_DeleteApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationResponse(data, context); + contents = _json(data); const response: DeleteApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -850,10 +812,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -871,12 +832,12 @@ export const de_DeleteApplicationCloudWatchLoggingOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationCloudWatchLoggingOptionResponse(data, context); + contents = _json(data); const response: DeleteApplicationCloudWatchLoggingOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -909,10 +870,9 @@ const de_DeleteApplicationCloudWatchLoggingOptionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -930,12 +890,12 @@ export const de_DeleteApplicationInputProcessingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationInputProcessingConfigurationResponse(data, context); + contents = _json(data); const response: DeleteApplicationInputProcessingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -968,10 +928,9 @@ const de_DeleteApplicationInputProcessingConfigurationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -989,12 +948,12 @@ export const de_DeleteApplicationOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationOutputResponse(data, context); + contents = _json(data); const response: DeleteApplicationOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1027,10 +986,9 @@ const de_DeleteApplicationOutputCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1048,12 +1006,12 @@ export const de_DeleteApplicationReferenceDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteApplicationReferenceDataSourceResponse(data, context); + contents = _json(data); const response: DeleteApplicationReferenceDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1086,10 +1044,9 @@ const de_DeleteApplicationReferenceDataSourceCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1112,7 +1069,7 @@ export const de_DescribeApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1136,10 +1093,9 @@ const de_DescribeApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1157,12 +1113,12 @@ export const de_DiscoverInputSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DiscoverInputSchemaResponse(data, context); + contents = _json(data); const response: DiscoverInputSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1192,10 +1148,9 @@ const de_DiscoverInputSchemaCommandError = async ( throw await de_UnableToDetectSchemaExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1213,12 +1168,12 @@ export const de_ListApplicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListApplicationsResponse(data, context); + contents = _json(data); const response: ListApplicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1234,10 +1189,9 @@ const de_ListApplicationsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1254,12 +1208,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1286,10 +1240,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1307,12 +1260,12 @@ export const de_StartApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartApplicationResponse(data, context); + contents = _json(data); const response: StartApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1345,10 +1298,9 @@ const de_StartApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1366,12 +1318,12 @@ export const de_StopApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopApplicationResponse(data, context); + contents = _json(data); const response: StopApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1398,10 +1350,9 @@ const de_StopApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1419,12 +1370,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1457,10 +1408,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,12 +1428,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1516,10 +1466,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1537,12 +1486,12 @@ export const de_UpdateApplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateApplicationResponse(data, context); + contents = _json(data); const response: UpdateApplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1578,10 +1527,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1595,7 +1543,7 @@ const de_CodeValidationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CodeValidationException(body, context); + const deserialized: any = _json(body); const exception = new CodeValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1611,7 +1559,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1627,7 +1575,7 @@ const de_InvalidApplicationConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidApplicationConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidApplicationConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1643,7 +1591,7 @@ const de_InvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1659,7 +1607,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1675,7 +1623,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1691,7 +1639,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1707,7 +1655,7 @@ const de_ResourceProvisionedThroughputExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceProvisionedThroughputExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceProvisionedThroughputExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1723,7 +1671,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1739,7 +1687,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1755,7 +1703,7 @@ const de_UnableToDetectSchemaExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnableToDetectSchemaException(body, context); + const deserialized: any = _json(body); const exception = new UnableToDetectSchemaException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1771,7 +1719,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1779,1687 +1727,314 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddApplicationCloudWatchLoggingOptionRequest - */ -const se_AddApplicationCloudWatchLoggingOptionRequest = ( - input: AddApplicationCloudWatchLoggingOptionRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOption != null && { - CloudWatchLoggingOption: se_CloudWatchLoggingOption(input.CloudWatchLoggingOption, context), - }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - }; -}; +// se_AddApplicationCloudWatchLoggingOptionRequest omitted. -/** - * serializeAws_json1_1AddApplicationInputProcessingConfigurationRequest - */ -const se_AddApplicationInputProcessingConfigurationRequest = ( - input: AddApplicationInputProcessingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.InputId != null && { InputId: input.InputId }), - ...(input.InputProcessingConfiguration != null && { - InputProcessingConfiguration: se_InputProcessingConfiguration(input.InputProcessingConfiguration, context), - }), - }; -}; +// se_AddApplicationInputProcessingConfigurationRequest omitted. -/** - * serializeAws_json1_1AddApplicationInputRequest - */ -const se_AddApplicationInputRequest = (input: AddApplicationInputRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.Input != null && { Input: se_Input(input.Input, context) }), - }; -}; +// se_AddApplicationInputRequest omitted. -/** - * serializeAws_json1_1AddApplicationOutputRequest - */ -const se_AddApplicationOutputRequest = (input: AddApplicationOutputRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.Output != null && { Output: se_Output(input.Output, context) }), - }; -}; +// se_AddApplicationOutputRequest omitted. -/** - * serializeAws_json1_1AddApplicationReferenceDataSourceRequest - */ -const se_AddApplicationReferenceDataSourceRequest = ( - input: AddApplicationReferenceDataSourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.ReferenceDataSource != null && { - ReferenceDataSource: se_ReferenceDataSource(input.ReferenceDataSource, context), - }), - }; -}; +// se_AddApplicationReferenceDataSourceRequest omitted. -/** - * serializeAws_json1_1ApplicationUpdate - */ -const se_ApplicationUpdate = (input: ApplicationUpdate, context: __SerdeContext): any => { - return { - ...(input.ApplicationCodeUpdate != null && { ApplicationCodeUpdate: input.ApplicationCodeUpdate }), - ...(input.CloudWatchLoggingOptionUpdates != null && { - CloudWatchLoggingOptionUpdates: se_CloudWatchLoggingOptionUpdates(input.CloudWatchLoggingOptionUpdates, context), - }), - ...(input.InputUpdates != null && { InputUpdates: se_InputUpdates(input.InputUpdates, context) }), - ...(input.OutputUpdates != null && { OutputUpdates: se_OutputUpdates(input.OutputUpdates, context) }), - ...(input.ReferenceDataSourceUpdates != null && { - ReferenceDataSourceUpdates: se_ReferenceDataSourceUpdates(input.ReferenceDataSourceUpdates, context), - }), - }; -}; +// se_ApplicationUpdate omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOption - */ -const se_CloudWatchLoggingOption = (input: CloudWatchLoggingOption, context: __SerdeContext): any => { - return { - ...(input.LogStreamARN != null && { LogStreamARN: input.LogStreamARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_CloudWatchLoggingOption omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptions - */ -const se_CloudWatchLoggingOptions = (input: CloudWatchLoggingOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchLoggingOption(entry, context); - }); -}; +// se_CloudWatchLoggingOptions omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptionUpdate - */ -const se_CloudWatchLoggingOptionUpdate = (input: CloudWatchLoggingOptionUpdate, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLoggingOptionId != null && { CloudWatchLoggingOptionId: input.CloudWatchLoggingOptionId }), - ...(input.LogStreamARNUpdate != null && { LogStreamARNUpdate: input.LogStreamARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_CloudWatchLoggingOptionUpdate omitted. -/** - * serializeAws_json1_1CloudWatchLoggingOptionUpdates - */ -const se_CloudWatchLoggingOptionUpdates = (input: CloudWatchLoggingOptionUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchLoggingOptionUpdate(entry, context); - }); -}; +// se_CloudWatchLoggingOptionUpdates omitted. -/** - * serializeAws_json1_1CreateApplicationRequest - */ -const se_CreateApplicationRequest = (input: CreateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationCode != null && { ApplicationCode: input.ApplicationCode }), - ...(input.ApplicationDescription != null && { ApplicationDescription: input.ApplicationDescription }), - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOptions != null && { - CloudWatchLoggingOptions: se_CloudWatchLoggingOptions(input.CloudWatchLoggingOptions, context), - }), - ...(input.Inputs != null && { Inputs: se_Inputs(input.Inputs, context) }), - ...(input.Outputs != null && { Outputs: se_Outputs(input.Outputs, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateApplicationRequest omitted. -/** - * serializeAws_json1_1CSVMappingParameters - */ -const se_CSVMappingParameters = (input: CSVMappingParameters, context: __SerdeContext): any => { - return { - ...(input.RecordColumnDelimiter != null && { RecordColumnDelimiter: input.RecordColumnDelimiter }), - ...(input.RecordRowDelimiter != null && { RecordRowDelimiter: input.RecordRowDelimiter }), - }; -}; +// se_CSVMappingParameters omitted. -/** - * serializeAws_json1_1DeleteApplicationCloudWatchLoggingOptionRequest - */ -const se_DeleteApplicationCloudWatchLoggingOptionRequest = ( - input: DeleteApplicationCloudWatchLoggingOptionRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CloudWatchLoggingOptionId != null && { CloudWatchLoggingOptionId: input.CloudWatchLoggingOptionId }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - }; -}; +// se_DeleteApplicationCloudWatchLoggingOptionRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationInputProcessingConfigurationRequest - */ -const se_DeleteApplicationInputProcessingConfigurationRequest = ( - input: DeleteApplicationInputProcessingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.InputId != null && { InputId: input.InputId }), - }; -}; +// se_DeleteApplicationInputProcessingConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationOutputRequest - */ -const se_DeleteApplicationOutputRequest = (input: DeleteApplicationOutputRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.OutputId != null && { OutputId: input.OutputId }), - }; -}; +// se_DeleteApplicationOutputRequest omitted. -/** - * serializeAws_json1_1DeleteApplicationReferenceDataSourceRequest - */ -const se_DeleteApplicationReferenceDataSourceRequest = ( - input: DeleteApplicationReferenceDataSourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - }; -}; +// se_DeleteApplicationReferenceDataSourceRequest omitted. /** * serializeAws_json1_1DeleteApplicationRequest */ const se_DeleteApplicationRequest = (input: DeleteApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.CreateTimestamp != null && { CreateTimestamp: Math.round(input.CreateTimestamp.getTime() / 1000) }), - }; + return take(input, { + ApplicationName: [], + CreateTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DescribeApplicationRequest - */ -const se_DescribeApplicationRequest = (input: DescribeApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - }; -}; +// se_DescribeApplicationRequest omitted. -/** - * serializeAws_json1_1DestinationSchema - */ -const se_DestinationSchema = (input: DestinationSchema, context: __SerdeContext): any => { - return { - ...(input.RecordFormatType != null && { RecordFormatType: input.RecordFormatType }), - }; -}; +// se_DestinationSchema omitted. -/** - * serializeAws_json1_1DiscoverInputSchemaRequest - */ -const se_DiscoverInputSchemaRequest = (input: DiscoverInputSchemaRequest, context: __SerdeContext): any => { - return { - ...(input.InputProcessingConfiguration != null && { - InputProcessingConfiguration: se_InputProcessingConfiguration(input.InputProcessingConfiguration, context), - }), - ...(input.InputStartingPositionConfiguration != null && { - InputStartingPositionConfiguration: se_InputStartingPositionConfiguration( - input.InputStartingPositionConfiguration, - context - ), - }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }), - }; -}; +// se_DiscoverInputSchemaRequest omitted. -/** - * serializeAws_json1_1Input - */ -const se_Input = (input: Input, context: __SerdeContext): any => { - return { - ...(input.InputParallelism != null && { InputParallelism: se_InputParallelism(input.InputParallelism, context) }), - ...(input.InputProcessingConfiguration != null && { - InputProcessingConfiguration: se_InputProcessingConfiguration(input.InputProcessingConfiguration, context), - }), - ...(input.InputSchema != null && { InputSchema: se_SourceSchema(input.InputSchema, context) }), - ...(input.KinesisFirehoseInput != null && { - KinesisFirehoseInput: se_KinesisFirehoseInput(input.KinesisFirehoseInput, context), - }), - ...(input.KinesisStreamsInput != null && { - KinesisStreamsInput: se_KinesisStreamsInput(input.KinesisStreamsInput, context), - }), - ...(input.NamePrefix != null && { NamePrefix: input.NamePrefix }), - }; -}; +// se_Input omitted. -/** - * serializeAws_json1_1InputConfiguration - */ -const se_InputConfiguration = (input: InputConfiguration, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.InputStartingPositionConfiguration != null && { - InputStartingPositionConfiguration: se_InputStartingPositionConfiguration( - input.InputStartingPositionConfiguration, - context - ), - }), - }; -}; +// se_InputConfiguration omitted. -/** - * serializeAws_json1_1InputConfigurations - */ -const se_InputConfigurations = (input: InputConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputConfiguration(entry, context); - }); -}; +// se_InputConfigurations omitted. -/** - * serializeAws_json1_1InputLambdaProcessor - */ -const se_InputLambdaProcessor = (input: InputLambdaProcessor, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_InputLambdaProcessor omitted. -/** - * serializeAws_json1_1InputLambdaProcessorUpdate - */ -const se_InputLambdaProcessorUpdate = (input: InputLambdaProcessorUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_InputLambdaProcessorUpdate omitted. -/** - * serializeAws_json1_1InputParallelism - */ -const se_InputParallelism = (input: InputParallelism, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: input.Count }), - }; -}; +// se_InputParallelism omitted. -/** - * serializeAws_json1_1InputParallelismUpdate - */ -const se_InputParallelismUpdate = (input: InputParallelismUpdate, context: __SerdeContext): any => { - return { - ...(input.CountUpdate != null && { CountUpdate: input.CountUpdate }), - }; -}; +// se_InputParallelismUpdate omitted. -/** - * serializeAws_json1_1InputProcessingConfiguration - */ -const se_InputProcessingConfiguration = (input: InputProcessingConfiguration, context: __SerdeContext): any => { - return { - ...(input.InputLambdaProcessor != null && { - InputLambdaProcessor: se_InputLambdaProcessor(input.InputLambdaProcessor, context), - }), - }; -}; +// se_InputProcessingConfiguration omitted. -/** - * serializeAws_json1_1InputProcessingConfigurationUpdate - */ -const se_InputProcessingConfigurationUpdate = ( - input: InputProcessingConfigurationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.InputLambdaProcessorUpdate != null && { - InputLambdaProcessorUpdate: se_InputLambdaProcessorUpdate(input.InputLambdaProcessorUpdate, context), - }), - }; -}; +// se_InputProcessingConfigurationUpdate omitted. -/** - * serializeAws_json1_1Inputs - */ -const se_Inputs = (input: Input[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Input(entry, context); - }); -}; +// se_Inputs omitted. -/** - * serializeAws_json1_1InputSchemaUpdate - */ -const se_InputSchemaUpdate = (input: InputSchemaUpdate, context: __SerdeContext): any => { - return { - ...(input.RecordColumnUpdates != null && { - RecordColumnUpdates: se_RecordColumns(input.RecordColumnUpdates, context), - }), - ...(input.RecordEncodingUpdate != null && { RecordEncodingUpdate: input.RecordEncodingUpdate }), - ...(input.RecordFormatUpdate != null && { RecordFormatUpdate: se_RecordFormat(input.RecordFormatUpdate, context) }), - }; -}; +// se_InputSchemaUpdate omitted. -/** - * serializeAws_json1_1InputStartingPositionConfiguration - */ -const se_InputStartingPositionConfiguration = ( - input: InputStartingPositionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InputStartingPosition != null && { InputStartingPosition: input.InputStartingPosition }), - }; -}; +// se_InputStartingPositionConfiguration omitted. -/** - * serializeAws_json1_1InputUpdate - */ -const se_InputUpdate = (input: InputUpdate, context: __SerdeContext): any => { - return { - ...(input.InputId != null && { InputId: input.InputId }), - ...(input.InputParallelismUpdate != null && { - InputParallelismUpdate: se_InputParallelismUpdate(input.InputParallelismUpdate, context), - }), - ...(input.InputProcessingConfigurationUpdate != null && { - InputProcessingConfigurationUpdate: se_InputProcessingConfigurationUpdate( - input.InputProcessingConfigurationUpdate, - context - ), - }), - ...(input.InputSchemaUpdate != null && { - InputSchemaUpdate: se_InputSchemaUpdate(input.InputSchemaUpdate, context), - }), - ...(input.KinesisFirehoseInputUpdate != null && { - KinesisFirehoseInputUpdate: se_KinesisFirehoseInputUpdate(input.KinesisFirehoseInputUpdate, context), - }), - ...(input.KinesisStreamsInputUpdate != null && { - KinesisStreamsInputUpdate: se_KinesisStreamsInputUpdate(input.KinesisStreamsInputUpdate, context), - }), - ...(input.NamePrefixUpdate != null && { NamePrefixUpdate: input.NamePrefixUpdate }), - }; -}; +// se_InputUpdate omitted. -/** - * serializeAws_json1_1InputUpdates - */ -const se_InputUpdates = (input: InputUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputUpdate(entry, context); - }); -}; +// se_InputUpdates omitted. -/** - * serializeAws_json1_1JSONMappingParameters - */ -const se_JSONMappingParameters = (input: JSONMappingParameters, context: __SerdeContext): any => { - return { - ...(input.RecordRowPath != null && { RecordRowPath: input.RecordRowPath }), - }; -}; +// se_JSONMappingParameters omitted. -/** - * serializeAws_json1_1KinesisFirehoseInput - */ -const se_KinesisFirehoseInput = (input: KinesisFirehoseInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_KinesisFirehoseInput omitted. -/** - * serializeAws_json1_1KinesisFirehoseInputUpdate - */ -const se_KinesisFirehoseInputUpdate = (input: KinesisFirehoseInputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_KinesisFirehoseInputUpdate omitted. -/** - * serializeAws_json1_1KinesisFirehoseOutput - */ -const se_KinesisFirehoseOutput = (input: KinesisFirehoseOutput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_KinesisFirehoseOutput omitted. -/** - * serializeAws_json1_1KinesisFirehoseOutputUpdate - */ -const se_KinesisFirehoseOutputUpdate = (input: KinesisFirehoseOutputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_KinesisFirehoseOutputUpdate omitted. -/** - * serializeAws_json1_1KinesisStreamsInput - */ -const se_KinesisStreamsInput = (input: KinesisStreamsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_KinesisStreamsInput omitted. -/** - * serializeAws_json1_1KinesisStreamsInputUpdate - */ -const se_KinesisStreamsInputUpdate = (input: KinesisStreamsInputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_KinesisStreamsInputUpdate omitted. -/** - * serializeAws_json1_1KinesisStreamsOutput - */ -const se_KinesisStreamsOutput = (input: KinesisStreamsOutput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; - -/** - * serializeAws_json1_1KinesisStreamsOutputUpdate - */ -const se_KinesisStreamsOutputUpdate = (input: KinesisStreamsOutputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_KinesisStreamsOutput omitted. -/** - * serializeAws_json1_1LambdaOutput - */ -const se_LambdaOutput = (input: LambdaOutput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_KinesisStreamsOutputUpdate omitted. -/** - * serializeAws_json1_1LambdaOutputUpdate - */ -const se_LambdaOutputUpdate = (input: LambdaOutputUpdate, context: __SerdeContext): any => { - return { - ...(input.ResourceARNUpdate != null && { ResourceARNUpdate: input.ResourceARNUpdate }), - ...(input.RoleARNUpdate != null && { RoleARNUpdate: input.RoleARNUpdate }), - }; -}; +// se_LambdaOutput omitted. -/** - * serializeAws_json1_1ListApplicationsRequest - */ -const se_ListApplicationsRequest = (input: ListApplicationsRequest, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartApplicationName != null && { - ExclusiveStartApplicationName: input.ExclusiveStartApplicationName, - }), - ...(input.Limit != null && { Limit: input.Limit }), - }; -}; +// se_LambdaOutputUpdate omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListApplicationsRequest omitted. -/** - * serializeAws_json1_1MappingParameters - */ -const se_MappingParameters = (input: MappingParameters, context: __SerdeContext): any => { - return { - ...(input.CSVMappingParameters != null && { - CSVMappingParameters: se_CSVMappingParameters(input.CSVMappingParameters, context), - }), - ...(input.JSONMappingParameters != null && { - JSONMappingParameters: se_JSONMappingParameters(input.JSONMappingParameters, context), - }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1Output - */ -const se_Output = (input: Output, context: __SerdeContext): any => { - return { - ...(input.DestinationSchema != null && { - DestinationSchema: se_DestinationSchema(input.DestinationSchema, context), - }), - ...(input.KinesisFirehoseOutput != null && { - KinesisFirehoseOutput: se_KinesisFirehoseOutput(input.KinesisFirehoseOutput, context), - }), - ...(input.KinesisStreamsOutput != null && { - KinesisStreamsOutput: se_KinesisStreamsOutput(input.KinesisStreamsOutput, context), - }), - ...(input.LambdaOutput != null && { LambdaOutput: se_LambdaOutput(input.LambdaOutput, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_MappingParameters omitted. -/** - * serializeAws_json1_1Outputs - */ -const se_Outputs = (input: Output[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Output(entry, context); - }); -}; +// se_Output omitted. -/** - * serializeAws_json1_1OutputUpdate - */ -const se_OutputUpdate = (input: OutputUpdate, context: __SerdeContext): any => { - return { - ...(input.DestinationSchemaUpdate != null && { - DestinationSchemaUpdate: se_DestinationSchema(input.DestinationSchemaUpdate, context), - }), - ...(input.KinesisFirehoseOutputUpdate != null && { - KinesisFirehoseOutputUpdate: se_KinesisFirehoseOutputUpdate(input.KinesisFirehoseOutputUpdate, context), - }), - ...(input.KinesisStreamsOutputUpdate != null && { - KinesisStreamsOutputUpdate: se_KinesisStreamsOutputUpdate(input.KinesisStreamsOutputUpdate, context), - }), - ...(input.LambdaOutputUpdate != null && { - LambdaOutputUpdate: se_LambdaOutputUpdate(input.LambdaOutputUpdate, context), - }), - ...(input.NameUpdate != null && { NameUpdate: input.NameUpdate }), - ...(input.OutputId != null && { OutputId: input.OutputId }), - }; -}; +// se_Outputs omitted. -/** - * serializeAws_json1_1OutputUpdates - */ -const se_OutputUpdates = (input: OutputUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OutputUpdate(entry, context); - }); -}; +// se_OutputUpdate omitted. -/** - * serializeAws_json1_1RecordColumn - */ -const se_RecordColumn = (input: RecordColumn, context: __SerdeContext): any => { - return { - ...(input.Mapping != null && { Mapping: input.Mapping }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SqlType != null && { SqlType: input.SqlType }), - }; -}; +// se_OutputUpdates omitted. -/** - * serializeAws_json1_1RecordColumns - */ -const se_RecordColumns = (input: RecordColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecordColumn(entry, context); - }); -}; +// se_RecordColumn omitted. -/** - * serializeAws_json1_1RecordFormat - */ -const se_RecordFormat = (input: RecordFormat, context: __SerdeContext): any => { - return { - ...(input.MappingParameters != null && { - MappingParameters: se_MappingParameters(input.MappingParameters, context), - }), - ...(input.RecordFormatType != null && { RecordFormatType: input.RecordFormatType }), - }; -}; +// se_RecordColumns omitted. -/** - * serializeAws_json1_1ReferenceDataSource - */ -const se_ReferenceDataSource = (input: ReferenceDataSource, context: __SerdeContext): any => { - return { - ...(input.ReferenceSchema != null && { ReferenceSchema: se_SourceSchema(input.ReferenceSchema, context) }), - ...(input.S3ReferenceDataSource != null && { - S3ReferenceDataSource: se_S3ReferenceDataSource(input.S3ReferenceDataSource, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_RecordFormat omitted. -/** - * serializeAws_json1_1ReferenceDataSourceUpdate - */ -const se_ReferenceDataSourceUpdate = (input: ReferenceDataSourceUpdate, context: __SerdeContext): any => { - return { - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.ReferenceSchemaUpdate != null && { - ReferenceSchemaUpdate: se_SourceSchema(input.ReferenceSchemaUpdate, context), - }), - ...(input.S3ReferenceDataSourceUpdate != null && { - S3ReferenceDataSourceUpdate: se_S3ReferenceDataSourceUpdate(input.S3ReferenceDataSourceUpdate, context), - }), - ...(input.TableNameUpdate != null && { TableNameUpdate: input.TableNameUpdate }), - }; -}; +// se_ReferenceDataSource omitted. -/** - * serializeAws_json1_1ReferenceDataSourceUpdates - */ -const se_ReferenceDataSourceUpdates = (input: ReferenceDataSourceUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReferenceDataSourceUpdate(entry, context); - }); -}; +// se_ReferenceDataSourceUpdate omitted. -/** - * serializeAws_json1_1S3Configuration - */ -const se_S3Configuration = (input: S3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.FileKey != null && { FileKey: input.FileKey }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_ReferenceDataSourceUpdates omitted. -/** - * serializeAws_json1_1S3ReferenceDataSource - */ -const se_S3ReferenceDataSource = (input: S3ReferenceDataSource, context: __SerdeContext): any => { - return { - ...(input.BucketARN != null && { BucketARN: input.BucketARN }), - ...(input.FileKey != null && { FileKey: input.FileKey }), - ...(input.ReferenceRoleARN != null && { ReferenceRoleARN: input.ReferenceRoleARN }), - }; -}; +// se_S3Configuration omitted. -/** - * serializeAws_json1_1S3ReferenceDataSourceUpdate - */ -const se_S3ReferenceDataSourceUpdate = (input: S3ReferenceDataSourceUpdate, context: __SerdeContext): any => { - return { - ...(input.BucketARNUpdate != null && { BucketARNUpdate: input.BucketARNUpdate }), - ...(input.FileKeyUpdate != null && { FileKeyUpdate: input.FileKeyUpdate }), - ...(input.ReferenceRoleARNUpdate != null && { ReferenceRoleARNUpdate: input.ReferenceRoleARNUpdate }), - }; -}; +// se_S3ReferenceDataSource omitted. -/** - * serializeAws_json1_1SourceSchema - */ -const se_SourceSchema = (input: SourceSchema, context: __SerdeContext): any => { - return { - ...(input.RecordColumns != null && { RecordColumns: se_RecordColumns(input.RecordColumns, context) }), - ...(input.RecordEncoding != null && { RecordEncoding: input.RecordEncoding }), - ...(input.RecordFormat != null && { RecordFormat: se_RecordFormat(input.RecordFormat, context) }), - }; -}; +// se_S3ReferenceDataSourceUpdate omitted. -/** - * serializeAws_json1_1StartApplicationRequest - */ -const se_StartApplicationRequest = (input: StartApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.InputConfigurations != null && { - InputConfigurations: se_InputConfigurations(input.InputConfigurations, context), - }), - }; -}; +// se_SourceSchema omitted. -/** - * serializeAws_json1_1StopApplicationRequest - */ -const se_StopApplicationRequest = (input: StopApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - }; -}; +// se_StartApplicationRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_StopApplicationRequest omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_Tags omitted. -/** - * serializeAws_json1_1UpdateApplicationRequest - */ -const se_UpdateApplicationRequest = (input: UpdateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.ApplicationUpdate != null && { - ApplicationUpdate: se_ApplicationUpdate(input.ApplicationUpdate, context), - }), - ...(input.CurrentApplicationVersionId != null && { - CurrentApplicationVersionId: input.CurrentApplicationVersionId, - }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1AddApplicationCloudWatchLoggingOptionResponse - */ -const de_AddApplicationCloudWatchLoggingOptionResponse = ( - output: any, - context: __SerdeContext -): AddApplicationCloudWatchLoggingOptionResponse => { - return {} as any; -}; +// se_UpdateApplicationRequest omitted. -/** - * deserializeAws_json1_1AddApplicationInputProcessingConfigurationResponse - */ -const de_AddApplicationInputProcessingConfigurationResponse = ( - output: any, - context: __SerdeContext -): AddApplicationInputProcessingConfigurationResponse => { - return {} as any; -}; +// de_AddApplicationCloudWatchLoggingOptionResponse omitted. -/** - * deserializeAws_json1_1AddApplicationInputResponse - */ -const de_AddApplicationInputResponse = (output: any, context: __SerdeContext): AddApplicationInputResponse => { - return {} as any; -}; +// de_AddApplicationInputProcessingConfigurationResponse omitted. -/** - * deserializeAws_json1_1AddApplicationOutputResponse - */ -const de_AddApplicationOutputResponse = (output: any, context: __SerdeContext): AddApplicationOutputResponse => { - return {} as any; -}; +// de_AddApplicationInputResponse omitted. -/** - * deserializeAws_json1_1AddApplicationReferenceDataSourceResponse - */ -const de_AddApplicationReferenceDataSourceResponse = ( - output: any, - context: __SerdeContext -): AddApplicationReferenceDataSourceResponse => { - return {} as any; -}; +// de_AddApplicationOutputResponse omitted. + +// de_AddApplicationReferenceDataSourceResponse omitted. /** * deserializeAws_json1_1ApplicationDetail */ const de_ApplicationDetail = (output: any, context: __SerdeContext): ApplicationDetail => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationCode: __expectString(output.ApplicationCode), - ApplicationDescription: __expectString(output.ApplicationDescription), - ApplicationName: __expectString(output.ApplicationName), - ApplicationStatus: __expectString(output.ApplicationStatus), - ApplicationVersionId: __expectLong(output.ApplicationVersionId), - CloudWatchLoggingOptionDescriptions: - output.CloudWatchLoggingOptionDescriptions != null - ? de_CloudWatchLoggingOptionDescriptions(output.CloudWatchLoggingOptionDescriptions, context) - : undefined, - CreateTimestamp: - output.CreateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp))) - : undefined, - InputDescriptions: - output.InputDescriptions != null ? de_InputDescriptions(output.InputDescriptions, context) : undefined, - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - OutputDescriptions: - output.OutputDescriptions != null ? de_OutputDescriptions(output.OutputDescriptions, context) : undefined, - ReferenceDataSourceDescriptions: - output.ReferenceDataSourceDescriptions != null - ? de_ReferenceDataSourceDescriptions(output.ReferenceDataSourceDescriptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationSummaries - */ -const de_ApplicationSummaries = (output: any, context: __SerdeContext): ApplicationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ApplicationSummary - */ -const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - ApplicationARN: __expectString(output.ApplicationARN), - ApplicationName: __expectString(output.ApplicationName), - ApplicationStatus: __expectString(output.ApplicationStatus), - } as any; + return take(output, { + ApplicationARN: __expectString, + ApplicationCode: __expectString, + ApplicationDescription: __expectString, + ApplicationName: __expectString, + ApplicationStatus: __expectString, + ApplicationVersionId: __expectLong, + CloudWatchLoggingOptionDescriptions: _json, + CreateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDescriptions: _json, + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OutputDescriptions: _json, + ReferenceDataSourceDescriptions: _json, + }) as any; }; -/** - * deserializeAws_json1_1CloudWatchLoggingOptionDescription - */ -const de_CloudWatchLoggingOptionDescription = ( - output: any, - context: __SerdeContext -): CloudWatchLoggingOptionDescription => { - return { - CloudWatchLoggingOptionId: __expectString(output.CloudWatchLoggingOptionId), - LogStreamARN: __expectString(output.LogStreamARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_ApplicationSummaries omitted. -/** - * deserializeAws_json1_1CloudWatchLoggingOptionDescriptions - */ -const de_CloudWatchLoggingOptionDescriptions = ( - output: any, - context: __SerdeContext -): CloudWatchLoggingOptionDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchLoggingOptionDescription(entry, context); - }); - return retVal; -}; +// de_ApplicationSummary omitted. -/** - * deserializeAws_json1_1CodeValidationException - */ -const de_CodeValidationException = (output: any, context: __SerdeContext): CodeValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CloudWatchLoggingOptionDescription omitted. -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CloudWatchLoggingOptionDescriptions omitted. -/** - * deserializeAws_json1_1CreateApplicationResponse - */ -const de_CreateApplicationResponse = (output: any, context: __SerdeContext): CreateApplicationResponse => { - return { - ApplicationSummary: - output.ApplicationSummary != null ? de_ApplicationSummary(output.ApplicationSummary, context) : undefined, - } as any; -}; +// de_CodeValidationException omitted. -/** - * deserializeAws_json1_1CSVMappingParameters - */ -const de_CSVMappingParameters = (output: any, context: __SerdeContext): CSVMappingParameters => { - return { - RecordColumnDelimiter: __expectString(output.RecordColumnDelimiter), - RecordRowDelimiter: __expectString(output.RecordRowDelimiter), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1DeleteApplicationCloudWatchLoggingOptionResponse - */ -const de_DeleteApplicationCloudWatchLoggingOptionResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationCloudWatchLoggingOptionResponse => { - return {} as any; -}; +// de_CreateApplicationResponse omitted. -/** - * deserializeAws_json1_1DeleteApplicationInputProcessingConfigurationResponse - */ -const de_DeleteApplicationInputProcessingConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationInputProcessingConfigurationResponse => { - return {} as any; -}; +// de_CSVMappingParameters omitted. -/** - * deserializeAws_json1_1DeleteApplicationOutputResponse - */ -const de_DeleteApplicationOutputResponse = (output: any, context: __SerdeContext): DeleteApplicationOutputResponse => { - return {} as any; -}; +// de_DeleteApplicationCloudWatchLoggingOptionResponse omitted. -/** - * deserializeAws_json1_1DeleteApplicationReferenceDataSourceResponse - */ -const de_DeleteApplicationReferenceDataSourceResponse = ( - output: any, - context: __SerdeContext -): DeleteApplicationReferenceDataSourceResponse => { - return {} as any; -}; +// de_DeleteApplicationInputProcessingConfigurationResponse omitted. -/** - * deserializeAws_json1_1DeleteApplicationResponse - */ -const de_DeleteApplicationResponse = (output: any, context: __SerdeContext): DeleteApplicationResponse => { - return {} as any; -}; +// de_DeleteApplicationOutputResponse omitted. + +// de_DeleteApplicationReferenceDataSourceResponse omitted. + +// de_DeleteApplicationResponse omitted. /** * deserializeAws_json1_1DescribeApplicationResponse */ const de_DescribeApplicationResponse = (output: any, context: __SerdeContext): DescribeApplicationResponse => { - return { - ApplicationDetail: - output.ApplicationDetail != null ? de_ApplicationDetail(output.ApplicationDetail, context) : undefined, - } as any; + return take(output, { + ApplicationDetail: (_: any) => de_ApplicationDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DestinationSchema - */ -const de_DestinationSchema = (output: any, context: __SerdeContext): DestinationSchema => { - return { - RecordFormatType: __expectString(output.RecordFormatType), - } as any; -}; +// de_DestinationSchema omitted. -/** - * deserializeAws_json1_1DiscoverInputSchemaResponse - */ -const de_DiscoverInputSchemaResponse = (output: any, context: __SerdeContext): DiscoverInputSchemaResponse => { - return { - InputSchema: output.InputSchema != null ? de_SourceSchema(output.InputSchema, context) : undefined, - ParsedInputRecords: - output.ParsedInputRecords != null ? de_ParsedInputRecords(output.ParsedInputRecords, context) : undefined, - ProcessedInputRecords: - output.ProcessedInputRecords != null - ? de_ProcessedInputRecords(output.ProcessedInputRecords, context) - : undefined, - RawInputRecords: output.RawInputRecords != null ? de_RawInputRecords(output.RawInputRecords, context) : undefined, - } as any; -}; +// de_DiscoverInputSchemaResponse omitted. -/** - * deserializeAws_json1_1InAppStreamNames - */ -const de_InAppStreamNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InAppStreamNames omitted. -/** - * deserializeAws_json1_1InputDescription - */ -const de_InputDescription = (output: any, context: __SerdeContext): InputDescription => { - return { - InAppStreamNames: - output.InAppStreamNames != null ? de_InAppStreamNames(output.InAppStreamNames, context) : undefined, - InputId: __expectString(output.InputId), - InputParallelism: - output.InputParallelism != null ? de_InputParallelism(output.InputParallelism, context) : undefined, - InputProcessingConfigurationDescription: - output.InputProcessingConfigurationDescription != null - ? de_InputProcessingConfigurationDescription(output.InputProcessingConfigurationDescription, context) - : undefined, - InputSchema: output.InputSchema != null ? de_SourceSchema(output.InputSchema, context) : undefined, - InputStartingPositionConfiguration: - output.InputStartingPositionConfiguration != null - ? de_InputStartingPositionConfiguration(output.InputStartingPositionConfiguration, context) - : undefined, - KinesisFirehoseInputDescription: - output.KinesisFirehoseInputDescription != null - ? de_KinesisFirehoseInputDescription(output.KinesisFirehoseInputDescription, context) - : undefined, - KinesisStreamsInputDescription: - output.KinesisStreamsInputDescription != null - ? de_KinesisStreamsInputDescription(output.KinesisStreamsInputDescription, context) - : undefined, - NamePrefix: __expectString(output.NamePrefix), - } as any; -}; - -/** - * deserializeAws_json1_1InputDescriptions - */ -const de_InputDescriptions = (output: any, context: __SerdeContext): InputDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InputLambdaProcessorDescription - */ -const de_InputLambdaProcessorDescription = (output: any, context: __SerdeContext): InputLambdaProcessorDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_InputDescription omitted. -/** - * deserializeAws_json1_1InputParallelism - */ -const de_InputParallelism = (output: any, context: __SerdeContext): InputParallelism => { - return { - Count: __expectInt32(output.Count), - } as any; -}; +// de_InputDescriptions omitted. -/** - * deserializeAws_json1_1InputProcessingConfigurationDescription - */ -const de_InputProcessingConfigurationDescription = ( - output: any, - context: __SerdeContext -): InputProcessingConfigurationDescription => { - return { - InputLambdaProcessorDescription: - output.InputLambdaProcessorDescription != null - ? de_InputLambdaProcessorDescription(output.InputLambdaProcessorDescription, context) - : undefined, - } as any; -}; +// de_InputLambdaProcessorDescription omitted. -/** - * deserializeAws_json1_1InputStartingPositionConfiguration - */ -const de_InputStartingPositionConfiguration = ( - output: any, - context: __SerdeContext -): InputStartingPositionConfiguration => { - return { - InputStartingPosition: __expectString(output.InputStartingPosition), - } as any; -}; +// de_InputParallelism omitted. -/** - * deserializeAws_json1_1InvalidApplicationConfigurationException - */ -const de_InvalidApplicationConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidApplicationConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InputProcessingConfigurationDescription omitted. -/** - * deserializeAws_json1_1InvalidArgumentException - */ -const de_InvalidArgumentException = (output: any, context: __SerdeContext): InvalidArgumentException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InputStartingPositionConfiguration omitted. -/** - * deserializeAws_json1_1JSONMappingParameters - */ -const de_JSONMappingParameters = (output: any, context: __SerdeContext): JSONMappingParameters => { - return { - RecordRowPath: __expectString(output.RecordRowPath), - } as any; -}; +// de_InvalidApplicationConfigurationException omitted. -/** - * deserializeAws_json1_1KinesisFirehoseInputDescription - */ -const de_KinesisFirehoseInputDescription = (output: any, context: __SerdeContext): KinesisFirehoseInputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_InvalidArgumentException omitted. -/** - * deserializeAws_json1_1KinesisFirehoseOutputDescription - */ -const de_KinesisFirehoseOutputDescription = ( - output: any, - context: __SerdeContext -): KinesisFirehoseOutputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_JSONMappingParameters omitted. -/** - * deserializeAws_json1_1KinesisStreamsInputDescription - */ -const de_KinesisStreamsInputDescription = (output: any, context: __SerdeContext): KinesisStreamsInputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_KinesisFirehoseInputDescription omitted. -/** - * deserializeAws_json1_1KinesisStreamsOutputDescription - */ -const de_KinesisStreamsOutputDescription = (output: any, context: __SerdeContext): KinesisStreamsOutputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_KinesisFirehoseOutputDescription omitted. -/** - * deserializeAws_json1_1LambdaOutputDescription - */ -const de_LambdaOutputDescription = (output: any, context: __SerdeContext): LambdaOutputDescription => { - return { - ResourceARN: __expectString(output.ResourceARN), - RoleARN: __expectString(output.RoleARN), - } as any; -}; +// de_KinesisStreamsInputDescription omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KinesisStreamsOutputDescription omitted. -/** - * deserializeAws_json1_1ListApplicationsResponse - */ -const de_ListApplicationsResponse = (output: any, context: __SerdeContext): ListApplicationsResponse => { - return { - ApplicationSummaries: - output.ApplicationSummaries != null ? de_ApplicationSummaries(output.ApplicationSummaries, context) : undefined, - HasMoreApplications: __expectBoolean(output.HasMoreApplications), - } as any; -}; +// de_LambdaOutputDescription omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1MappingParameters - */ -const de_MappingParameters = (output: any, context: __SerdeContext): MappingParameters => { - return { - CSVMappingParameters: - output.CSVMappingParameters != null ? de_CSVMappingParameters(output.CSVMappingParameters, context) : undefined, - JSONMappingParameters: - output.JSONMappingParameters != null - ? de_JSONMappingParameters(output.JSONMappingParameters, context) - : undefined, - } as any; -}; +// de_ListApplicationsResponse omitted. -/** - * deserializeAws_json1_1OutputDescription - */ -const de_OutputDescription = (output: any, context: __SerdeContext): OutputDescription => { - return { - DestinationSchema: - output.DestinationSchema != null ? de_DestinationSchema(output.DestinationSchema, context) : undefined, - KinesisFirehoseOutputDescription: - output.KinesisFirehoseOutputDescription != null - ? de_KinesisFirehoseOutputDescription(output.KinesisFirehoseOutputDescription, context) - : undefined, - KinesisStreamsOutputDescription: - output.KinesisStreamsOutputDescription != null - ? de_KinesisStreamsOutputDescription(output.KinesisStreamsOutputDescription, context) - : undefined, - LambdaOutputDescription: - output.LambdaOutputDescription != null - ? de_LambdaOutputDescription(output.LambdaOutputDescription, context) - : undefined, - Name: __expectString(output.Name), - OutputId: __expectString(output.OutputId), - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1OutputDescriptions - */ -const de_OutputDescriptions = (output: any, context: __SerdeContext): OutputDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputDescription(entry, context); - }); - return retVal; -}; +// de_MappingParameters omitted. -/** - * deserializeAws_json1_1ParsedInputRecord - */ -const de_ParsedInputRecord = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OutputDescription omitted. -/** - * deserializeAws_json1_1ParsedInputRecords - */ -const de_ParsedInputRecords = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParsedInputRecord(entry, context); - }); - return retVal; -}; +// de_OutputDescriptions omitted. -/** - * deserializeAws_json1_1ProcessedInputRecords - */ -const de_ProcessedInputRecords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ParsedInputRecord omitted. -/** - * deserializeAws_json1_1RawInputRecords - */ -const de_RawInputRecords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ParsedInputRecords omitted. -/** - * deserializeAws_json1_1RecordColumn - */ -const de_RecordColumn = (output: any, context: __SerdeContext): RecordColumn => { - return { - Mapping: __expectString(output.Mapping), - Name: __expectString(output.Name), - SqlType: __expectString(output.SqlType), - } as any; -}; +// de_ProcessedInputRecords omitted. -/** - * deserializeAws_json1_1RecordColumns - */ -const de_RecordColumns = (output: any, context: __SerdeContext): RecordColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordColumn(entry, context); - }); - return retVal; -}; +// de_RawInputRecords omitted. -/** - * deserializeAws_json1_1RecordFormat - */ -const de_RecordFormat = (output: any, context: __SerdeContext): RecordFormat => { - return { - MappingParameters: - output.MappingParameters != null ? de_MappingParameters(output.MappingParameters, context) : undefined, - RecordFormatType: __expectString(output.RecordFormatType), - } as any; -}; +// de_RecordColumn omitted. -/** - * deserializeAws_json1_1ReferenceDataSourceDescription - */ -const de_ReferenceDataSourceDescription = (output: any, context: __SerdeContext): ReferenceDataSourceDescription => { - return { - ReferenceId: __expectString(output.ReferenceId), - ReferenceSchema: output.ReferenceSchema != null ? de_SourceSchema(output.ReferenceSchema, context) : undefined, - S3ReferenceDataSourceDescription: - output.S3ReferenceDataSourceDescription != null - ? de_S3ReferenceDataSourceDescription(output.S3ReferenceDataSourceDescription, context) - : undefined, - TableName: __expectString(output.TableName), - } as any; -}; +// de_RecordColumns omitted. -/** - * deserializeAws_json1_1ReferenceDataSourceDescriptions - */ -const de_ReferenceDataSourceDescriptions = (output: any, context: __SerdeContext): ReferenceDataSourceDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReferenceDataSourceDescription(entry, context); - }); - return retVal; -}; +// de_RecordFormat omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReferenceDataSourceDescription omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReferenceDataSourceDescriptions omitted. -/** - * deserializeAws_json1_1ResourceProvisionedThroughputExceededException - */ -const de_ResourceProvisionedThroughputExceededException = ( - output: any, - context: __SerdeContext -): ResourceProvisionedThroughputExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1S3ReferenceDataSourceDescription - */ -const de_S3ReferenceDataSourceDescription = ( - output: any, - context: __SerdeContext -): S3ReferenceDataSourceDescription => { - return { - BucketARN: __expectString(output.BucketARN), - FileKey: __expectString(output.FileKey), - ReferenceRoleARN: __expectString(output.ReferenceRoleARN), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceProvisionedThroughputExceededException omitted. -/** - * deserializeAws_json1_1SourceSchema - */ -const de_SourceSchema = (output: any, context: __SerdeContext): SourceSchema => { - return { - RecordColumns: output.RecordColumns != null ? de_RecordColumns(output.RecordColumns, context) : undefined, - RecordEncoding: __expectString(output.RecordEncoding), - RecordFormat: output.RecordFormat != null ? de_RecordFormat(output.RecordFormat, context) : undefined, - } as any; -}; +// de_S3ReferenceDataSourceDescription omitted. -/** - * deserializeAws_json1_1StartApplicationResponse - */ -const de_StartApplicationResponse = (output: any, context: __SerdeContext): StartApplicationResponse => { - return {} as any; -}; +// de_ServiceUnavailableException omitted. -/** - * deserializeAws_json1_1StopApplicationResponse - */ -const de_StopApplicationResponse = (output: any, context: __SerdeContext): StopApplicationResponse => { - return {} as any; -}; +// de_SourceSchema omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_StartApplicationResponse omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_StopApplicationResponse omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1UnableToDetectSchemaException - */ -const de_UnableToDetectSchemaException = (output: any, context: __SerdeContext): UnableToDetectSchemaException => { - return { - ProcessedInputRecords: - output.ProcessedInputRecords != null - ? de_ProcessedInputRecords(output.ProcessedInputRecords, context) - : undefined, - RawInputRecords: output.RawInputRecords != null ? de_RawInputRecords(output.RawInputRecords, context) : undefined, - message: __expectString(output.message), - } as any; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UnableToDetectSchemaException omitted. -/** - * deserializeAws_json1_1UpdateApplicationResponse - */ -const de_UpdateApplicationResponse = (output: any, context: __SerdeContext): UpdateApplicationResponse => { - return {} as any; -}; +// de_UnsupportedOperationException omitted. + +// de_UntagResourceResponse omitted. + +// de_UpdateApplicationResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3481,6 +2056,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-kinesis-video-archived-media/src/protocols/Aws_restJson1.ts b/clients/client-kinesis-video-archived-media/src/protocols/Aws_restJson1.ts index acde436dad6f..6f56374c3d2d 100644 --- a/clients/client-kinesis-video-archived-media/src/protocols/Aws_restJson1.ts +++ b/clients/client-kinesis-video-archived-media/src/protocols/Aws_restJson1.ts @@ -1,15 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -40,7 +42,6 @@ import { ClipTimestampRange, DASHFragmentSelector, DASHTimestampRange, - FormatConfigKey, Fragment, FragmentSelector, HLSFragmentSelector, @@ -70,13 +71,13 @@ export const se_GetClipCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getClip"; let body: any; - body = JSON.stringify({ - ...(input.ClipFragmentSelector != null && { - ClipFragmentSelector: se_ClipFragmentSelector(input.ClipFragmentSelector, context), - }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + ClipFragmentSelector: (_) => se_ClipFragmentSelector(_, context), + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -102,18 +103,18 @@ export const se_GetDASHStreamingSessionURLCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getDASHStreamingSessionURL"; let body: any; - body = JSON.stringify({ - ...(input.DASHFragmentSelector != null && { - DASHFragmentSelector: se_DASHFragmentSelector(input.DASHFragmentSelector, context), - }), - ...(input.DisplayFragmentNumber != null && { DisplayFragmentNumber: input.DisplayFragmentNumber }), - ...(input.DisplayFragmentTimestamp != null && { DisplayFragmentTimestamp: input.DisplayFragmentTimestamp }), - ...(input.Expires != null && { Expires: input.Expires }), - ...(input.MaxManifestFragmentResults != null && { MaxManifestFragmentResults: input.MaxManifestFragmentResults }), - ...(input.PlaybackMode != null && { PlaybackMode: input.PlaybackMode }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + DASHFragmentSelector: (_) => se_DASHFragmentSelector(_, context), + DisplayFragmentNumber: [], + DisplayFragmentTimestamp: [], + Expires: [], + MaxManifestFragmentResults: [], + PlaybackMode: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -139,21 +140,19 @@ export const se_GetHLSStreamingSessionURLCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getHLSStreamingSessionURL"; let body: any; - body = JSON.stringify({ - ...(input.ContainerFormat != null && { ContainerFormat: input.ContainerFormat }), - ...(input.DiscontinuityMode != null && { DiscontinuityMode: input.DiscontinuityMode }), - ...(input.DisplayFragmentTimestamp != null && { DisplayFragmentTimestamp: input.DisplayFragmentTimestamp }), - ...(input.Expires != null && { Expires: input.Expires }), - ...(input.HLSFragmentSelector != null && { - HLSFragmentSelector: se_HLSFragmentSelector(input.HLSFragmentSelector, context), - }), - ...(input.MaxMediaPlaylistFragmentResults != null && { - MaxMediaPlaylistFragmentResults: input.MaxMediaPlaylistFragmentResults, - }), - ...(input.PlaybackMode != null && { PlaybackMode: input.PlaybackMode }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + ContainerFormat: [], + DiscontinuityMode: [], + DisplayFragmentTimestamp: [], + Expires: [], + HLSFragmentSelector: (_) => se_HLSFragmentSelector(_, context), + MaxMediaPlaylistFragmentResults: [], + PlaybackMode: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -178,20 +177,22 @@ export const se_GetImagesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getImages"; let body: any; - body = JSON.stringify({ - ...(input.EndTimestamp != null && { EndTimestamp: Math.round(input.EndTimestamp.getTime() / 1000) }), - ...(input.Format != null && { Format: input.Format }), - ...(input.FormatConfig != null && { FormatConfig: se_FormatConfig(input.FormatConfig, context) }), - ...(input.HeightPixels != null && { HeightPixels: input.HeightPixels }), - ...(input.ImageSelectorType != null && { ImageSelectorType: input.ImageSelectorType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SamplingInterval != null && { SamplingInterval: input.SamplingInterval }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.WidthPixels != null && { WidthPixels: input.WidthPixels }), - }); + body = JSON.stringify( + take(input, { + EndTimestamp: (_) => Math.round(_.getTime() / 1000), + Format: [], + FormatConfig: (_) => _json(_), + HeightPixels: [], + ImageSelectorType: [], + MaxResults: [], + NextToken: [], + SamplingInterval: [], + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + StreamARN: [], + StreamName: [], + WidthPixels: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -217,11 +218,13 @@ export const se_GetMediaForFragmentListCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getMediaForFragmentList"; let body: any; - body = JSON.stringify({ - ...(input.Fragments != null && { Fragments: se_FragmentNumberList(input.Fragments, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + Fragments: (_) => _json(_), + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -246,13 +249,15 @@ export const se_ListFragmentsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listFragments"; let body: any; - body = JSON.stringify({ - ...(input.FragmentSelector != null && { FragmentSelector: se_FragmentSelector(input.FragmentSelector, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + FragmentSelector: (_) => se_FragmentSelector(_, context), + MaxResults: [], + NextToken: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -326,10 +331,9 @@ const de_GetClipCommandError = async ( throw await de_UnsupportedStreamMediaTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -349,9 +353,10 @@ export const de_GetDASHStreamingSessionURLCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DASHStreamingSessionURL != null) { - contents.DASHStreamingSessionURL = __expectString(data.DASHStreamingSessionURL); - } + const doc = take(data, { + DASHStreamingSessionURL: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -394,10 +399,9 @@ const de_GetDASHStreamingSessionURLCommandError = async ( throw await de_UnsupportedStreamMediaTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -417,9 +421,10 @@ export const de_GetHLSStreamingSessionURLCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HLSStreamingSessionURL != null) { - contents.HLSStreamingSessionURL = __expectString(data.HLSStreamingSessionURL); - } + const doc = take(data, { + HLSStreamingSessionURL: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -462,10 +467,9 @@ const de_GetHLSStreamingSessionURLCommandError = async ( throw await de_UnsupportedStreamMediaTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -485,12 +489,11 @@ export const de_GetImagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Images != null) { - contents.Images = de_Images(data.Images, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Images: (_) => de_Images(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -521,10 +524,9 @@ const de_GetImagesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -577,10 +579,9 @@ const de_GetMediaForFragmentListCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -600,12 +601,11 @@ export const de_ListFragmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Fragments != null) { - contents.Fragments = de_FragmentList(data.Fragments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Fragments: (_) => de_FragmentList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -636,16 +636,15 @@ const de_ListFragmentsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ClientLimitExceededExceptionRes */ @@ -655,9 +654,10 @@ const de_ClientLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -674,9 +674,10 @@ const de_InvalidArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -693,9 +694,10 @@ const de_InvalidCodecPrivateDataExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidCodecPrivateDataException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -712,9 +714,10 @@ const de_InvalidMediaFrameExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidMediaFrameException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -731,9 +734,10 @@ const de_MissingCodecPrivateDataExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new MissingCodecPrivateDataException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -750,9 +754,10 @@ const de_NoDataRetentionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NoDataRetentionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -769,9 +774,10 @@ const de_NotAuthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -788,9 +794,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -807,9 +814,10 @@ const de_UnsupportedStreamMediaTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedStreamMediaTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -821,123 +829,97 @@ const de_UnsupportedStreamMediaTypeExceptionRes = async ( * serializeAws_restJson1ClipFragmentSelector */ const se_ClipFragmentSelector = (input: ClipFragmentSelector, context: __SerdeContext): any => { - return { - ...(input.FragmentSelectorType != null && { FragmentSelectorType: input.FragmentSelectorType }), - ...(input.TimestampRange != null && { TimestampRange: se_ClipTimestampRange(input.TimestampRange, context) }), - }; + return take(input, { + FragmentSelectorType: [], + TimestampRange: (_) => se_ClipTimestampRange(_, context), + }); }; /** * serializeAws_restJson1ClipTimestampRange */ const se_ClipTimestampRange = (input: ClipTimestampRange, context: __SerdeContext): any => { - return { - ...(input.EndTimestamp != null && { EndTimestamp: Math.round(input.EndTimestamp.getTime() / 1000) }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - }; + return take(input, { + EndTimestamp: (_) => Math.round(_.getTime() / 1000), + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_restJson1DASHFragmentSelector */ const se_DASHFragmentSelector = (input: DASHFragmentSelector, context: __SerdeContext): any => { - return { - ...(input.FragmentSelectorType != null && { FragmentSelectorType: input.FragmentSelectorType }), - ...(input.TimestampRange != null && { TimestampRange: se_DASHTimestampRange(input.TimestampRange, context) }), - }; + return take(input, { + FragmentSelectorType: [], + TimestampRange: (_) => se_DASHTimestampRange(_, context), + }); }; /** * serializeAws_restJson1DASHTimestampRange */ const se_DASHTimestampRange = (input: DASHTimestampRange, context: __SerdeContext): any => { - return { - ...(input.EndTimestamp != null && { EndTimestamp: Math.round(input.EndTimestamp.getTime() / 1000) }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - }; + return take(input, { + EndTimestamp: (_) => Math.round(_.getTime() / 1000), + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1FormatConfig - */ -const se_FormatConfig = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [FormatConfigKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FormatConfig omitted. -/** - * serializeAws_restJson1FragmentNumberList - */ -const se_FragmentNumberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FragmentNumberList omitted. /** * serializeAws_restJson1FragmentSelector */ const se_FragmentSelector = (input: FragmentSelector, context: __SerdeContext): any => { - return { - ...(input.FragmentSelectorType != null && { FragmentSelectorType: input.FragmentSelectorType }), - ...(input.TimestampRange != null && { TimestampRange: se_TimestampRange(input.TimestampRange, context) }), - }; + return take(input, { + FragmentSelectorType: [], + TimestampRange: (_) => se_TimestampRange(_, context), + }); }; /** * serializeAws_restJson1HLSFragmentSelector */ const se_HLSFragmentSelector = (input: HLSFragmentSelector, context: __SerdeContext): any => { - return { - ...(input.FragmentSelectorType != null && { FragmentSelectorType: input.FragmentSelectorType }), - ...(input.TimestampRange != null && { TimestampRange: se_HLSTimestampRange(input.TimestampRange, context) }), - }; + return take(input, { + FragmentSelectorType: [], + TimestampRange: (_) => se_HLSTimestampRange(_, context), + }); }; /** * serializeAws_restJson1HLSTimestampRange */ const se_HLSTimestampRange = (input: HLSTimestampRange, context: __SerdeContext): any => { - return { - ...(input.EndTimestamp != null && { EndTimestamp: Math.round(input.EndTimestamp.getTime() / 1000) }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - }; + return take(input, { + EndTimestamp: (_) => Math.round(_.getTime() / 1000), + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_restJson1TimestampRange */ const se_TimestampRange = (input: TimestampRange, context: __SerdeContext): any => { - return { - ...(input.EndTimestamp != null && { EndTimestamp: Math.round(input.EndTimestamp.getTime() / 1000) }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - }; + return take(input, { + EndTimestamp: (_) => Math.round(_.getTime() / 1000), + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** * deserializeAws_restJson1Fragment */ const de_Fragment = (output: any, context: __SerdeContext): Fragment => { - return { - FragmentLengthInMilliseconds: __expectLong(output.FragmentLengthInMilliseconds), - FragmentNumber: __expectString(output.FragmentNumber), - FragmentSizeInBytes: __expectLong(output.FragmentSizeInBytes), - ProducerTimestamp: - output.ProducerTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ProducerTimestamp))) - : undefined, - ServerTimestamp: - output.ServerTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ServerTimestamp))) - : undefined, - } as any; + return take(output, { + FragmentLengthInMilliseconds: __expectLong, + FragmentNumber: __expectString, + FragmentSizeInBytes: __expectLong, + ProducerTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServerTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -947,9 +929,6 @@ const de_FragmentList = (output: any, context: __SerdeContext): Fragment[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Fragment(entry, context); }); return retVal; @@ -959,12 +938,11 @@ const de_FragmentList = (output: any, context: __SerdeContext): Fragment[] => { * deserializeAws_restJson1Image */ const de_Image = (output: any, context: __SerdeContext): Image => { - return { - Error: __expectString(output.Error), - ImageContent: __expectString(output.ImageContent), - TimeStamp: - output.TimeStamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TimeStamp))) : undefined, - } as any; + return take(output, { + Error: __expectString, + ImageContent: __expectString, + TimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -974,9 +952,6 @@ const de_Images = (output: any, context: __SerdeContext): Image[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Image(entry, context); }); return retVal; diff --git a/clients/client-kinesis-video-media/src/protocols/Aws_restJson1.ts b/clients/client-kinesis-video-media/src/protocols/Aws_restJson1.ts index 593d6a387161..df0806ea8f1d 100644 --- a/clients/client-kinesis-video-media/src/protocols/Aws_restJson1.ts +++ b/clients/client-kinesis-video-media/src/protocols/Aws_restJson1.ts @@ -1,10 +1,12 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -38,11 +40,13 @@ export const se_GetMediaCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getMedia"; let body: any; - body = JSON.stringify({ - ...(input.StartSelector != null && { StartSelector: se_StartSelector(input.StartSelector, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + StartSelector: (_) => se_StartSelector(_, context), + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -107,16 +111,15 @@ const de_GetMediaCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ClientLimitExceededExceptionRes */ @@ -126,9 +129,10 @@ const de_ClientLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -145,9 +149,10 @@ const de_ConnectionLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConnectionLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -164,9 +169,10 @@ const de_InvalidArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -183,9 +189,10 @@ const de_InvalidEndpointExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidEndpointException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -202,9 +209,10 @@ const de_NotAuthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -221,9 +229,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -235,12 +244,12 @@ const de_ResourceNotFoundExceptionRes = async ( * serializeAws_restJson1StartSelector */ const se_StartSelector = (input: StartSelector, context: __SerdeContext): any => { - return { - ...(input.AfterFragmentNumber != null && { AfterFragmentNumber: input.AfterFragmentNumber }), - ...(input.ContinuationToken != null && { ContinuationToken: input.ContinuationToken }), - ...(input.StartSelectorType != null && { StartSelectorType: input.StartSelectorType }), - ...(input.StartTimestamp != null && { StartTimestamp: Math.round(input.StartTimestamp.getTime() / 1000) }), - }; + return take(input, { + AfterFragmentNumber: [], + ContinuationToken: [], + StartSelectorType: [], + StartTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-kinesis-video-signaling/src/protocols/Aws_restJson1.ts b/clients/client-kinesis-video-signaling/src/protocols/Aws_restJson1.ts index 6d8882d5efcd..7ae8a30b67a3 100644 --- a/clients/client-kinesis-video-signaling/src/protocols/Aws_restJson1.ts +++ b/clients/client-kinesis-video-signaling/src/protocols/Aws_restJson1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -23,7 +24,6 @@ import { import { KinesisVideoSignalingServiceException as __BaseException } from "../models/KinesisVideoSignalingServiceException"; import { ClientLimitExceededException, - IceServer, InvalidArgumentException, InvalidClientException, NotAuthorizedException, @@ -45,12 +45,14 @@ export const se_GetIceServerConfigCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/get-ice-server-config"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.Service != null && { Service: input.Service }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + ClientId: [], + Service: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -76,11 +78,13 @@ export const se_SendAlexaOfferToMasterCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/send-alexa-offer-to-master"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.MessagePayload != null && { MessagePayload: input.MessagePayload }), - ...(input.SenderClientId != null && { SenderClientId: input.SenderClientId }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + MessagePayload: [], + SenderClientId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -106,9 +110,10 @@ export const de_GetIceServerConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IceServerList != null) { - contents.IceServerList = de_IceServerList(data.IceServerList, context); - } + const doc = take(data, { + IceServerList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -145,10 +150,9 @@ const de_GetIceServerConfigCommandError = async ( throw await de_SessionExpiredExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -168,9 +172,10 @@ export const de_SendAlexaOfferToMasterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Answer != null) { - contents.Answer = __expectString(data.Answer); - } + const doc = take(data, { + Answer: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -201,16 +206,15 @@ const de_SendAlexaOfferToMasterCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ClientLimitExceededExceptionRes */ @@ -220,9 +224,10 @@ const de_ClientLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -239,9 +244,10 @@ const de_InvalidArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -258,9 +264,10 @@ const de_InvalidClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -277,9 +284,10 @@ const de_NotAuthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -296,9 +304,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -315,9 +324,10 @@ const de_SessionExpiredExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SessionExpiredException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -325,47 +335,11 @@ const de_SessionExpiredExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1IceServer - */ -const de_IceServer = (output: any, context: __SerdeContext): IceServer => { - return { - Password: __expectString(output.Password), - Ttl: __expectInt32(output.Ttl), - Uris: output.Uris != null ? de_Uris(output.Uris, context) : undefined, - Username: __expectString(output.Username), - } as any; -}; +// de_IceServer omitted. -/** - * deserializeAws_restJson1IceServerList - */ -const de_IceServerList = (output: any, context: __SerdeContext): IceServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IceServer(entry, context); - }); - return retVal; -}; +// de_IceServerList omitted. -/** - * deserializeAws_restJson1Uris - */ -const de_Uris = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Uris omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-kinesis-video-webrtc-storage/src/protocols/Aws_restJson1.ts b/clients/client-kinesis-video-webrtc-storage/src/protocols/Aws_restJson1.ts index a531a747a5b8..7e866f355ccb 100644 --- a/clients/client-kinesis-video-webrtc-storage/src/protocols/Aws_restJson1.ts +++ b/clients/client-kinesis-video-webrtc-storage/src/protocols/Aws_restJson1.ts @@ -1,10 +1,12 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -34,9 +36,11 @@ export const se_JoinStorageSessionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/joinStorageSession"; let body: any; - body = JSON.stringify({ - ...(input.channelArn != null && { channelArn: input.channelArn }), - }); + body = JSON.stringify( + take(input, { + channelArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -92,16 +96,15 @@ const de_JoinStorageSessionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -111,9 +114,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -130,9 +134,10 @@ const de_ClientLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -149,9 +154,10 @@ const de_InvalidArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -168,9 +174,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, diff --git a/clients/client-kinesis-video/src/protocols/Aws_restJson1.ts b/clients/client-kinesis-video/src/protocols/Aws_restJson1.ts index 353e67a1ebbd..1ebdcae6fbf6 100644 --- a/clients/client-kinesis-video/src/protocols/Aws_restJson1.ts +++ b/clients/client-kinesis-video/src/protocols/Aws_restJson1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -109,14 +110,12 @@ import { DeletionConfig, DeviceStreamLimitExceededException, EdgeConfig, - FormatConfigKey, ImageGenerationConfiguration, ImageGenerationDestinationConfig, InvalidArgumentException, InvalidDeviceException, InvalidResourceFormatException, LocalSizeConfig, - MappedResourceConfigurationListItem, MediaSourceConfig, MediaStorageConfiguration, NoDataRetentionException, @@ -124,7 +123,6 @@ import { NotificationConfiguration, NotificationDestinationConfig, RecorderConfig, - ResourceEndpointListItem, ResourceInUseException, ResourceNotFoundException, ScheduleConfig, @@ -153,14 +151,14 @@ export const se_CreateSignalingChannelCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createSignalingChannel"; let body: any; - body = JSON.stringify({ - ...(input.ChannelName != null && { ChannelName: input.ChannelName }), - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.SingleMasterConfiguration != null && { - SingleMasterConfiguration: se_SingleMasterConfiguration(input.SingleMasterConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagOnCreateList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ChannelName: [], + ChannelType: [], + SingleMasterConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -185,14 +183,16 @@ export const se_CreateStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createStream"; let body: any; - body = JSON.stringify({ - ...(input.DataRetentionInHours != null && { DataRetentionInHours: input.DataRetentionInHours }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MediaType != null && { MediaType: input.MediaType }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.Tags != null && { Tags: se_ResourceTags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DataRetentionInHours: [], + DeviceName: [], + KmsKeyId: [], + MediaType: [], + StreamName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -218,10 +218,12 @@ export const se_DeleteSignalingChannelCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteSignalingChannel"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + CurrentVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -246,10 +248,12 @@ export const se_DeleteStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteStream"; let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - }); + body = JSON.stringify( + take(input, { + CurrentVersion: [], + StreamARN: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -275,10 +279,12 @@ export const se_DescribeEdgeConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeEdgeConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -304,10 +310,12 @@ export const se_DescribeImageGenerationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeImageGenerationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -333,12 +341,14 @@ export const se_DescribeMappedResourceConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeMappedResourceConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -364,10 +374,12 @@ export const se_DescribeMediaStorageConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeMediaStorageConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.ChannelName != null && { ChannelName: input.ChannelName }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + ChannelName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -393,10 +405,12 @@ export const se_DescribeNotificationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeNotificationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -422,10 +436,12 @@ export const se_DescribeSignalingChannelCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeSignalingChannel"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.ChannelName != null && { ChannelName: input.ChannelName }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + ChannelName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -450,10 +466,12 @@ export const se_DescribeStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeStream"; let body: any; - body = JSON.stringify({ - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -478,11 +496,13 @@ export const se_GetDataEndpointCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getDataEndpoint"; let body: any; - body = JSON.stringify({ - ...(input.APIName != null && { APIName: input.APIName }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + APIName: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -508,15 +528,12 @@ export const se_GetSignalingChannelEndpointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getSignalingChannelEndpoint"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.SingleMasterChannelEndpointConfiguration != null && { - SingleMasterChannelEndpointConfiguration: se_SingleMasterChannelEndpointConfiguration( - input.SingleMasterChannelEndpointConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + SingleMasterChannelEndpointConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -541,13 +558,13 @@ export const se_ListSignalingChannelsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listSignalingChannels"; let body: any; - body = JSON.stringify({ - ...(input.ChannelNameCondition != null && { - ChannelNameCondition: se_ChannelNameCondition(input.ChannelNameCondition, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + ChannelNameCondition: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -572,13 +589,13 @@ export const se_ListStreamsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listStreams"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StreamNameCondition != null && { - StreamNameCondition: se_StreamNameCondition(input.StreamNameCondition, context), - }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + StreamNameCondition: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -603,10 +620,12 @@ export const se_ListTagsForResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + ResourceARN: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -631,11 +650,13 @@ export const se_ListTagsForStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTagsForStream"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -661,11 +682,13 @@ export const se_StartEdgeConfigurationUpdateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startEdgeConfigurationUpdate"; let body: any; - body = JSON.stringify({ - ...(input.EdgeConfig != null && { EdgeConfig: se_EdgeConfig(input.EdgeConfig, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + EdgeConfig: (_) => _json(_), + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -690,10 +713,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -718,11 +743,13 @@ export const se_TagStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagStream"; let body: any; - body = JSON.stringify({ - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.Tags != null && { Tags: se_ResourceTags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + StreamARN: [], + StreamName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -747,10 +774,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeyList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -775,11 +804,13 @@ export const se_UntagStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untagStream"; let body: any; - body = JSON.stringify({ - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.TagKeyList != null && { TagKeyList: se_TagKeyList(input.TagKeyList, context) }), - }); + body = JSON.stringify( + take(input, { + StreamARN: [], + StreamName: [], + TagKeyList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -804,13 +835,15 @@ export const se_UpdateDataRetentionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDataRetention"; let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - ...(input.DataRetentionChangeInHours != null && { DataRetentionChangeInHours: input.DataRetentionChangeInHours }), - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + CurrentVersion: [], + DataRetentionChangeInHours: [], + Operation: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -836,13 +869,13 @@ export const se_UpdateImageGenerationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateImageGenerationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.ImageGenerationConfiguration != null && { - ImageGenerationConfiguration: se_ImageGenerationConfiguration(input.ImageGenerationConfiguration, context), - }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + ImageGenerationConfiguration: (_) => _json(_), + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -868,12 +901,12 @@ export const se_UpdateMediaStorageConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateMediaStorageConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.MediaStorageConfiguration != null && { - MediaStorageConfiguration: se_MediaStorageConfiguration(input.MediaStorageConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + MediaStorageConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -899,13 +932,13 @@ export const se_UpdateNotificationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateNotificationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.NotificationConfiguration != null && { - NotificationConfiguration: se_NotificationConfiguration(input.NotificationConfiguration, context), - }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + NotificationConfiguration: (_) => _json(_), + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -931,13 +964,13 @@ export const se_UpdateSignalingChannelCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateSignalingChannel"; let body: any; - body = JSON.stringify({ - ...(input.ChannelARN != null && { ChannelARN: input.ChannelARN }), - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - ...(input.SingleMasterConfiguration != null && { - SingleMasterConfiguration: se_SingleMasterConfiguration(input.SingleMasterConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + ChannelARN: [], + CurrentVersion: [], + SingleMasterConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -962,13 +995,15 @@ export const se_UpdateStreamCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateStream"; let body: any; - body = JSON.stringify({ - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.MediaType != null && { MediaType: input.MediaType }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }); + body = JSON.stringify( + take(input, { + CurrentVersion: [], + DeviceName: [], + MediaType: [], + StreamARN: [], + StreamName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -994,9 +1029,10 @@ export const de_CreateSignalingChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelARN != null) { - contents.ChannelARN = __expectString(data.ChannelARN); - } + const doc = take(data, { + ChannelARN: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1033,10 +1069,9 @@ const de_CreateSignalingChannelCommandError = async ( throw await de_TagsPerResourceExceededLimitExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1056,9 +1091,10 @@ export const de_CreateStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamARN != null) { - contents.StreamARN = __expectString(data.StreamARN); - } + const doc = take(data, { + StreamARN: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1098,10 +1134,9 @@ const de_CreateStreamCommandError = async ( throw await de_TagsPerResourceExceededLimitExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1157,10 +1192,9 @@ const de_DeleteSignalingChannelCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1216,10 +1250,9 @@ const de_DeleteStreamCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1239,27 +1272,16 @@ export const de_DescribeEdgeConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.EdgeConfig != null) { - contents.EdgeConfig = de_EdgeConfig(data.EdgeConfig, context); - } - if (data.FailedStatusDetails != null) { - contents.FailedStatusDetails = __expectString(data.FailedStatusDetails); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.StreamARN != null) { - contents.StreamARN = __expectString(data.StreamARN); - } - if (data.StreamName != null) { - contents.StreamName = __expectString(data.StreamName); - } - if (data.SyncStatus != null) { - contents.SyncStatus = __expectString(data.SyncStatus); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeConfig: _json, + FailedStatusDetails: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamARN: __expectString, + StreamName: __expectString, + SyncStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1293,10 +1315,9 @@ const de_DescribeEdgeConfigurationCommandError = async ( throw await de_StreamEdgeConfigurationNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1316,9 +1337,10 @@ export const de_DescribeImageGenerationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ImageGenerationConfiguration != null) { - contents.ImageGenerationConfiguration = de_ImageGenerationConfiguration(data.ImageGenerationConfiguration, context); - } + const doc = take(data, { + ImageGenerationConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1349,10 +1371,9 @@ const de_DescribeImageGenerationConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1372,15 +1393,11 @@ export const de_DescribeMappedResourceConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MappedResourceConfigurationList != null) { - contents.MappedResourceConfigurationList = de_MappedResourceConfigurationList( - data.MappedResourceConfigurationList, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MappedResourceConfigurationList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1411,10 +1428,9 @@ const de_DescribeMappedResourceConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1434,9 +1450,10 @@ export const de_DescribeMediaStorageConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MediaStorageConfiguration != null) { - contents.MediaStorageConfiguration = de_MediaStorageConfiguration(data.MediaStorageConfiguration, context); - } + const doc = take(data, { + MediaStorageConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1467,10 +1484,9 @@ const de_DescribeMediaStorageConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1490,9 +1506,10 @@ export const de_DescribeNotificationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NotificationConfiguration != null) { - contents.NotificationConfiguration = de_NotificationConfiguration(data.NotificationConfiguration, context); - } + const doc = take(data, { + NotificationConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1523,10 +1540,9 @@ const de_DescribeNotificationConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,9 +1562,10 @@ export const de_DescribeSignalingChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelInfo != null) { - contents.ChannelInfo = de_ChannelInfo(data.ChannelInfo, context); - } + const doc = take(data, { + ChannelInfo: (_) => de_ChannelInfo(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1579,10 +1596,9 @@ const de_DescribeSignalingChannelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1602,9 +1618,10 @@ export const de_DescribeStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamInfo != null) { - contents.StreamInfo = de_StreamInfo(data.StreamInfo, context); - } + const doc = take(data, { + StreamInfo: (_) => de_StreamInfo(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1635,10 +1652,9 @@ const de_DescribeStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1658,9 +1674,10 @@ export const de_GetDataEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataEndpoint != null) { - contents.DataEndpoint = __expectString(data.DataEndpoint); - } + const doc = take(data, { + DataEndpoint: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1691,10 +1708,9 @@ const de_GetDataEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1714,9 +1730,10 @@ export const de_GetSignalingChannelEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceEndpointList != null) { - contents.ResourceEndpointList = de_ResourceEndpointList(data.ResourceEndpointList, context); - } + const doc = take(data, { + ResourceEndpointList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1750,10 +1767,9 @@ const de_GetSignalingChannelEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1773,12 +1789,11 @@ export const de_ListSignalingChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelInfoList != null) { - contents.ChannelInfoList = de_ChannelInfoList(data.ChannelInfoList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChannelInfoList: (_) => de_ChannelInfoList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1806,10 +1821,9 @@ const de_ListSignalingChannelsCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1829,12 +1843,11 @@ export const de_ListStreamsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.StreamInfoList != null) { - contents.StreamInfoList = de_StreamInfoList(data.StreamInfoList, context); - } + const doc = take(data, { + NextToken: __expectString, + StreamInfoList: (_) => de_StreamInfoList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1859,10 +1872,9 @@ const de_ListStreamsCommandError = async ( throw await de_InvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1882,12 +1894,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Tags != null) { - contents.Tags = de_ResourceTags(data.Tags, context); - } + const doc = take(data, { + NextToken: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1918,10 +1929,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1941,12 +1951,11 @@ export const de_ListTagsForStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Tags != null) { - contents.Tags = de_ResourceTags(data.Tags, context); - } + const doc = take(data, { + NextToken: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1980,10 +1989,9 @@ const de_ListTagsForStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2003,27 +2011,16 @@ export const de_StartEdgeConfigurationUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.EdgeConfig != null) { - contents.EdgeConfig = de_EdgeConfig(data.EdgeConfig, context); - } - if (data.FailedStatusDetails != null) { - contents.FailedStatusDetails = __expectString(data.FailedStatusDetails); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.StreamARN != null) { - contents.StreamARN = __expectString(data.StreamARN); - } - if (data.StreamName != null) { - contents.StreamName = __expectString(data.StreamName); - } - if (data.SyncStatus != null) { - contents.SyncStatus = __expectString(data.SyncStatus); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeConfig: _json, + FailedStatusDetails: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamARN: __expectString, + StreamName: __expectString, + SyncStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2060,10 +2057,9 @@ const de_StartEdgeConfigurationUpdateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2116,10 +2112,9 @@ const de_TagResourceCommandError = async ( throw await de_TagsPerResourceExceededLimitExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2175,10 +2170,9 @@ const de_TagStreamCommandError = async ( throw await de_TagsPerResourceExceededLimitExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2228,10 +2222,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2284,10 +2277,9 @@ const de_UntagStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2343,10 +2335,9 @@ const de_UpdateDataRetentionCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2402,10 +2393,9 @@ const de_UpdateImageGenerationConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2461,10 +2451,9 @@ const de_UpdateMediaStorageConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2520,10 +2509,9 @@ const de_UpdateNotificationConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2579,10 +2567,9 @@ const de_UpdateSignalingChannelCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2638,16 +2625,15 @@ const de_UpdateStreamCommandError = async ( throw await de_VersionMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2657,9 +2643,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2676,9 +2663,10 @@ const de_AccountChannelLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccountChannelLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2695,9 +2683,10 @@ const de_AccountStreamLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccountStreamLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2714,9 +2703,10 @@ const de_ClientLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ClientLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2733,9 +2723,10 @@ const de_DeviceStreamLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DeviceStreamLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2752,9 +2743,10 @@ const de_InvalidArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2771,9 +2763,10 @@ const de_InvalidDeviceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidDeviceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2790,9 +2783,10 @@ const de_InvalidResourceFormatExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidResourceFormatException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2809,9 +2803,10 @@ const de_NoDataRetentionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NoDataRetentionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2828,9 +2823,10 @@ const de_NotAuthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2847,9 +2843,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2866,9 +2863,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2885,9 +2883,10 @@ const de_StreamEdgeConfigurationNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new StreamEdgeConfigurationNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2904,9 +2903,10 @@ const de_TagsPerResourceExceededLimitExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TagsPerResourceExceededLimitException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2923,9 +2923,10 @@ const de_VersionMismatchExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new VersionMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2933,280 +2934,65 @@ const de_VersionMismatchExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ChannelNameCondition - */ -const se_ChannelNameCondition = (input: ChannelNameCondition, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.ComparisonValue != null && { ComparisonValue: input.ComparisonValue }), - }; -}; +// se_ChannelNameCondition omitted. -/** - * serializeAws_restJson1DeletionConfig - */ -const se_DeletionConfig = (input: DeletionConfig, context: __SerdeContext): any => { - return { - ...(input.DeleteAfterUpload != null && { DeleteAfterUpload: input.DeleteAfterUpload }), - ...(input.EdgeRetentionInHours != null && { EdgeRetentionInHours: input.EdgeRetentionInHours }), - ...(input.LocalSizeConfig != null && { LocalSizeConfig: se_LocalSizeConfig(input.LocalSizeConfig, context) }), - }; -}; +// se_DeletionConfig omitted. -/** - * serializeAws_restJson1EdgeConfig - */ -const se_EdgeConfig = (input: EdgeConfig, context: __SerdeContext): any => { - return { - ...(input.DeletionConfig != null && { DeletionConfig: se_DeletionConfig(input.DeletionConfig, context) }), - ...(input.HubDeviceArn != null && { HubDeviceArn: input.HubDeviceArn }), - ...(input.RecorderConfig != null && { RecorderConfig: se_RecorderConfig(input.RecorderConfig, context) }), - ...(input.UploaderConfig != null && { UploaderConfig: se_UploaderConfig(input.UploaderConfig, context) }), - }; -}; +// se_EdgeConfig omitted. -/** - * serializeAws_restJson1FormatConfig - */ -const se_FormatConfig = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [FormatConfigKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1ImageGenerationConfiguration - */ -const se_ImageGenerationConfiguration = (input: ImageGenerationConfiguration, context: __SerdeContext): any => { - return { - ...(input.DestinationConfig != null && { - DestinationConfig: se_ImageGenerationDestinationConfig(input.DestinationConfig, context), - }), - ...(input.Format != null && { Format: input.Format }), - ...(input.FormatConfig != null && { FormatConfig: se_FormatConfig(input.FormatConfig, context) }), - ...(input.HeightPixels != null && { HeightPixels: input.HeightPixels }), - ...(input.ImageSelectorType != null && { ImageSelectorType: input.ImageSelectorType }), - ...(input.SamplingInterval != null && { SamplingInterval: input.SamplingInterval }), - ...(input.Status != null && { Status: input.Status }), - ...(input.WidthPixels != null && { WidthPixels: input.WidthPixels }), - }; -}; +// se_FormatConfig omitted. -/** - * serializeAws_restJson1ImageGenerationDestinationConfig - */ -const se_ImageGenerationDestinationConfig = (input: ImageGenerationDestinationConfig, context: __SerdeContext): any => { - return { - ...(input.DestinationRegion != null && { DestinationRegion: input.DestinationRegion }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; +// se_ImageGenerationConfiguration omitted. -/** - * serializeAws_restJson1ListOfProtocols - */ -const se_ListOfProtocols = (input: (ChannelProtocol | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ImageGenerationDestinationConfig omitted. -/** - * serializeAws_restJson1LocalSizeConfig - */ -const se_LocalSizeConfig = (input: LocalSizeConfig, context: __SerdeContext): any => { - return { - ...(input.MaxLocalMediaSizeInMB != null && { MaxLocalMediaSizeInMB: input.MaxLocalMediaSizeInMB }), - ...(input.StrategyOnFullSize != null && { StrategyOnFullSize: input.StrategyOnFullSize }), - }; -}; +// se_ListOfProtocols omitted. -/** - * serializeAws_restJson1MediaSourceConfig - */ -const se_MediaSourceConfig = (input: MediaSourceConfig, context: __SerdeContext): any => { - return { - ...(input.MediaUriSecretArn != null && { MediaUriSecretArn: input.MediaUriSecretArn }), - ...(input.MediaUriType != null && { MediaUriType: input.MediaUriType }), - }; -}; +// se_LocalSizeConfig omitted. -/** - * serializeAws_restJson1MediaStorageConfiguration - */ -const se_MediaStorageConfiguration = (input: MediaStorageConfiguration, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - }; -}; +// se_MediaSourceConfig omitted. -/** - * serializeAws_restJson1NotificationConfiguration - */ -const se_NotificationConfiguration = (input: NotificationConfiguration, context: __SerdeContext): any => { - return { - ...(input.DestinationConfig != null && { - DestinationConfig: se_NotificationDestinationConfig(input.DestinationConfig, context), - }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_MediaStorageConfiguration omitted. -/** - * serializeAws_restJson1NotificationDestinationConfig - */ -const se_NotificationDestinationConfig = (input: NotificationDestinationConfig, context: __SerdeContext): any => { - return { - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; +// se_NotificationConfiguration omitted. -/** - * serializeAws_restJson1RecorderConfig - */ -const se_RecorderConfig = (input: RecorderConfig, context: __SerdeContext): any => { - return { - ...(input.MediaSourceConfig != null && { - MediaSourceConfig: se_MediaSourceConfig(input.MediaSourceConfig, context), - }), - ...(input.ScheduleConfig != null && { ScheduleConfig: se_ScheduleConfig(input.ScheduleConfig, context) }), - }; -}; +// se_NotificationDestinationConfig omitted. -/** - * serializeAws_restJson1ResourceTags - */ -const se_ResourceTags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_RecorderConfig omitted. -/** - * serializeAws_restJson1ScheduleConfig - */ -const se_ScheduleConfig = (input: ScheduleConfig, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - }; -}; +// se_ResourceTags omitted. -/** - * serializeAws_restJson1SingleMasterChannelEndpointConfiguration - */ -const se_SingleMasterChannelEndpointConfiguration = ( - input: SingleMasterChannelEndpointConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Protocols != null && { Protocols: se_ListOfProtocols(input.Protocols, context) }), - ...(input.Role != null && { Role: input.Role }), - }; -}; +// se_ScheduleConfig omitted. -/** - * serializeAws_restJson1SingleMasterConfiguration - */ -const se_SingleMasterConfiguration = (input: SingleMasterConfiguration, context: __SerdeContext): any => { - return { - ...(input.MessageTtlSeconds != null && { MessageTtlSeconds: input.MessageTtlSeconds }), - }; -}; +// se_SingleMasterChannelEndpointConfiguration omitted. -/** - * serializeAws_restJson1StreamNameCondition - */ -const se_StreamNameCondition = (input: StreamNameCondition, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.ComparisonValue != null && { ComparisonValue: input.ComparisonValue }), - }; -}; +// se_SingleMasterConfiguration omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_StreamNameCondition omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagOnCreateList - */ -const se_TagOnCreateList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1UploaderConfig - */ -const se_UploaderConfig = (input: UploaderConfig, context: __SerdeContext): any => { - return { - ...(input.ScheduleConfig != null && { ScheduleConfig: se_ScheduleConfig(input.ScheduleConfig, context) }), - }; -}; +// se_TagOnCreateList omitted. + +// se_UploaderConfig omitted. /** * deserializeAws_restJson1ChannelInfo */ const de_ChannelInfo = (output: any, context: __SerdeContext): ChannelInfo => { - return { - ChannelARN: __expectString(output.ChannelARN), - ChannelName: __expectString(output.ChannelName), - ChannelStatus: __expectString(output.ChannelStatus), - ChannelType: __expectString(output.ChannelType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - SingleMasterConfiguration: - output.SingleMasterConfiguration != null - ? de_SingleMasterConfiguration(output.SingleMasterConfiguration, context) - : undefined, - Version: __expectString(output.Version), - } as any; + return take(output, { + ChannelARN: __expectString, + ChannelName: __expectString, + ChannelStatus: __expectString, + ChannelType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SingleMasterConfiguration: _json, + Version: __expectString, + }) as any; }; /** @@ -3216,251 +3002,62 @@ const de_ChannelInfoList = (output: any, context: __SerdeContext): ChannelInfo[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DeletionConfig - */ -const de_DeletionConfig = (output: any, context: __SerdeContext): DeletionConfig => { - return { - DeleteAfterUpload: __expectBoolean(output.DeleteAfterUpload), - EdgeRetentionInHours: __expectInt32(output.EdgeRetentionInHours), - LocalSizeConfig: output.LocalSizeConfig != null ? de_LocalSizeConfig(output.LocalSizeConfig, context) : undefined, - } as any; -}; +// de_DeletionConfig omitted. -/** - * deserializeAws_restJson1EdgeConfig - */ -const de_EdgeConfig = (output: any, context: __SerdeContext): EdgeConfig => { - return { - DeletionConfig: output.DeletionConfig != null ? de_DeletionConfig(output.DeletionConfig, context) : undefined, - HubDeviceArn: __expectString(output.HubDeviceArn), - RecorderConfig: output.RecorderConfig != null ? de_RecorderConfig(output.RecorderConfig, context) : undefined, - UploaderConfig: output.UploaderConfig != null ? de_UploaderConfig(output.UploaderConfig, context) : undefined, - } as any; -}; +// de_EdgeConfig omitted. -/** - * deserializeAws_restJson1FormatConfig - */ -const de_FormatConfig = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [FormatConfigKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FormatConfig omitted. -/** - * deserializeAws_restJson1ImageGenerationConfiguration - */ -const de_ImageGenerationConfiguration = (output: any, context: __SerdeContext): ImageGenerationConfiguration => { - return { - DestinationConfig: - output.DestinationConfig != null - ? de_ImageGenerationDestinationConfig(output.DestinationConfig, context) - : undefined, - Format: __expectString(output.Format), - FormatConfig: output.FormatConfig != null ? de_FormatConfig(output.FormatConfig, context) : undefined, - HeightPixels: __expectInt32(output.HeightPixels), - ImageSelectorType: __expectString(output.ImageSelectorType), - SamplingInterval: __expectInt32(output.SamplingInterval), - Status: __expectString(output.Status), - WidthPixels: __expectInt32(output.WidthPixels), - } as any; -}; +// de_ImageGenerationConfiguration omitted. -/** - * deserializeAws_restJson1ImageGenerationDestinationConfig - */ -const de_ImageGenerationDestinationConfig = ( - output: any, - context: __SerdeContext -): ImageGenerationDestinationConfig => { - return { - DestinationRegion: __expectString(output.DestinationRegion), - Uri: __expectString(output.Uri), - } as any; -}; +// de_ImageGenerationDestinationConfig omitted. -/** - * deserializeAws_restJson1LocalSizeConfig - */ -const de_LocalSizeConfig = (output: any, context: __SerdeContext): LocalSizeConfig => { - return { - MaxLocalMediaSizeInMB: __expectInt32(output.MaxLocalMediaSizeInMB), - StrategyOnFullSize: __expectString(output.StrategyOnFullSize), - } as any; -}; +// de_LocalSizeConfig omitted. -/** - * deserializeAws_restJson1MappedResourceConfigurationList - */ -const de_MappedResourceConfigurationList = ( - output: any, - context: __SerdeContext -): MappedResourceConfigurationListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MappedResourceConfigurationListItem(entry, context); - }); - return retVal; -}; +// de_MappedResourceConfigurationList omitted. -/** - * deserializeAws_restJson1MappedResourceConfigurationListItem - */ -const de_MappedResourceConfigurationListItem = ( - output: any, - context: __SerdeContext -): MappedResourceConfigurationListItem => { - return { - ARN: __expectString(output.ARN), - Type: __expectString(output.Type), - } as any; -}; +// de_MappedResourceConfigurationListItem omitted. -/** - * deserializeAws_restJson1MediaSourceConfig - */ -const de_MediaSourceConfig = (output: any, context: __SerdeContext): MediaSourceConfig => { - return { - MediaUriSecretArn: __expectString(output.MediaUriSecretArn), - MediaUriType: __expectString(output.MediaUriType), - } as any; -}; +// de_MediaSourceConfig omitted. -/** - * deserializeAws_restJson1MediaStorageConfiguration - */ -const de_MediaStorageConfiguration = (output: any, context: __SerdeContext): MediaStorageConfiguration => { - return { - Status: __expectString(output.Status), - StreamARN: __expectString(output.StreamARN), - } as any; -}; +// de_MediaStorageConfiguration omitted. -/** - * deserializeAws_restJson1NotificationConfiguration - */ -const de_NotificationConfiguration = (output: any, context: __SerdeContext): NotificationConfiguration => { - return { - DestinationConfig: - output.DestinationConfig != null - ? de_NotificationDestinationConfig(output.DestinationConfig, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; +// de_NotificationConfiguration omitted. -/** - * deserializeAws_restJson1NotificationDestinationConfig - */ -const de_NotificationDestinationConfig = (output: any, context: __SerdeContext): NotificationDestinationConfig => { - return { - Uri: __expectString(output.Uri), - } as any; -}; +// de_NotificationDestinationConfig omitted. -/** - * deserializeAws_restJson1RecorderConfig - */ -const de_RecorderConfig = (output: any, context: __SerdeContext): RecorderConfig => { - return { - MediaSourceConfig: - output.MediaSourceConfig != null ? de_MediaSourceConfig(output.MediaSourceConfig, context) : undefined, - ScheduleConfig: output.ScheduleConfig != null ? de_ScheduleConfig(output.ScheduleConfig, context) : undefined, - } as any; -}; +// de_RecorderConfig omitted. -/** - * deserializeAws_restJson1ResourceEndpointList - */ -const de_ResourceEndpointList = (output: any, context: __SerdeContext): ResourceEndpointListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceEndpointListItem(entry, context); - }); - return retVal; -}; +// de_ResourceEndpointList omitted. -/** - * deserializeAws_restJson1ResourceEndpointListItem - */ -const de_ResourceEndpointListItem = (output: any, context: __SerdeContext): ResourceEndpointListItem => { - return { - Protocol: __expectString(output.Protocol), - ResourceEndpoint: __expectString(output.ResourceEndpoint), - } as any; -}; +// de_ResourceEndpointListItem omitted. -/** - * deserializeAws_restJson1ResourceTags - */ -const de_ResourceTags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ResourceTags omitted. -/** - * deserializeAws_restJson1ScheduleConfig - */ -const de_ScheduleConfig = (output: any, context: __SerdeContext): ScheduleConfig => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - ScheduleExpression: __expectString(output.ScheduleExpression), - } as any; -}; +// de_ScheduleConfig omitted. -/** - * deserializeAws_restJson1SingleMasterConfiguration - */ -const de_SingleMasterConfiguration = (output: any, context: __SerdeContext): SingleMasterConfiguration => { - return { - MessageTtlSeconds: __expectInt32(output.MessageTtlSeconds), - } as any; -}; +// de_SingleMasterConfiguration omitted. /** * deserializeAws_restJson1StreamInfo */ const de_StreamInfo = (output: any, context: __SerdeContext): StreamInfo => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataRetentionInHours: __expectInt32(output.DataRetentionInHours), - DeviceName: __expectString(output.DeviceName), - KmsKeyId: __expectString(output.KmsKeyId), - MediaType: __expectString(output.MediaType), - Status: __expectString(output.Status), - StreamARN: __expectString(output.StreamARN), - StreamName: __expectString(output.StreamName), - Version: __expectString(output.Version), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataRetentionInHours: __expectInt32, + DeviceName: __expectString, + KmsKeyId: __expectString, + MediaType: __expectString, + Status: __expectString, + StreamARN: __expectString, + StreamName: __expectString, + Version: __expectString, + }) as any; }; /** @@ -3470,22 +3067,12 @@ const de_StreamInfoList = (output: any, context: __SerdeContext): StreamInfo[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1UploaderConfig - */ -const de_UploaderConfig = (output: any, context: __SerdeContext): UploaderConfig => { - return { - ScheduleConfig: output.ScheduleConfig != null ? de_ScheduleConfig(output.ScheduleConfig, context) : undefined, - } as any; -}; +// de_UploaderConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-kinesis/src/protocols/Aws_json1_1.ts b/clients/client-kinesis/src/protocols/Aws_json1_1.ts index 67185489041e..871f6fdd5828 100644 --- a/clients/client-kinesis/src/protocols/Aws_json1_1.ts +++ b/clients/client-kinesis/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -89,7 +91,6 @@ import { _Record, AccessDeniedException, AddTagsToStreamInput, - ChildShard, Consumer, ConsumerDescription, CreateStreamInput, @@ -97,7 +98,6 @@ import { DeleteStreamInput, DeregisterStreamConsumerInput, DescribeLimitsInput, - DescribeLimitsOutput, DescribeStreamConsumerInput, DescribeStreamConsumerOutput, DescribeStreamInput, @@ -106,15 +106,11 @@ import { DescribeStreamSummaryOutput, DisableEnhancedMonitoringInput, EnableEnhancedMonitoringInput, - EnhancedMetrics, - EnhancedMonitoringOutput, ExpiredIteratorException, ExpiredNextTokenException, GetRecordsInput, GetRecordsOutput, GetShardIteratorInput, - GetShardIteratorOutput, - HashKeyRange, IncreaseStreamRetentionPeriodInput, InternalFailureException, InvalidArgumentException, @@ -126,29 +122,22 @@ import { KMSThrottlingException, LimitExceededException, ListShardsInput, - ListShardsOutput, ListStreamConsumersInput, ListStreamConsumersOutput, ListStreamsInput, ListStreamsOutput, ListTagsForStreamInput, - ListTagsForStreamOutput, MergeShardsInput, MetricsName, ProvisionedThroughputExceededException, PutRecordInput, - PutRecordOutput, PutRecordsInput, - PutRecordsOutput, PutRecordsRequestEntry, - PutRecordsResultEntry, RegisterStreamConsumerInput, RegisterStreamConsumerOutput, RemoveTagsFromStreamInput, ResourceInUseException, ResourceNotFoundException, - SequenceNumberRange, - Shard, ShardFilter, SplitShardInput, StartingPosition, @@ -161,9 +150,7 @@ import { SubscribeToShardEvent, SubscribeToShardEventStream, SubscribeToShardInput, - Tag, UpdateShardCountInput, - UpdateShardCountOutput, UpdateStreamModeInput, ValidationException, } from "../models/models_0"; @@ -177,7 +164,7 @@ export const se_AddTagsToStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToStream"); let body: any; - body = JSON.stringify(se_AddTagsToStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -190,7 +177,7 @@ export const se_CreateStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStream"); let body: any; - body = JSON.stringify(se_CreateStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -203,7 +190,7 @@ export const se_DecreaseStreamRetentionPeriodCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DecreaseStreamRetentionPeriod"); let body: any; - body = JSON.stringify(se_DecreaseStreamRetentionPeriodInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -216,7 +203,7 @@ export const se_DeleteStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStream"); let body: any; - body = JSON.stringify(se_DeleteStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -229,7 +216,7 @@ export const se_DeregisterStreamConsumerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterStreamConsumer"); let body: any; - body = JSON.stringify(se_DeregisterStreamConsumerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -242,7 +229,7 @@ export const se_DescribeLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLimits"); let body: any; - body = JSON.stringify(se_DescribeLimitsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -255,7 +242,7 @@ export const se_DescribeStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStream"); let body: any; - body = JSON.stringify(se_DescribeStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -268,7 +255,7 @@ export const se_DescribeStreamConsumerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStreamConsumer"); let body: any; - body = JSON.stringify(se_DescribeStreamConsumerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +268,7 @@ export const se_DescribeStreamSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStreamSummary"); let body: any; - body = JSON.stringify(se_DescribeStreamSummaryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -294,7 +281,7 @@ export const se_DisableEnhancedMonitoringCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableEnhancedMonitoring"); let body: any; - body = JSON.stringify(se_DisableEnhancedMonitoringInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -307,7 +294,7 @@ export const se_EnableEnhancedMonitoringCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableEnhancedMonitoring"); let body: any; - body = JSON.stringify(se_EnableEnhancedMonitoringInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -320,7 +307,7 @@ export const se_GetRecordsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRecords"); let body: any; - body = JSON.stringify(se_GetRecordsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -346,7 +333,7 @@ export const se_IncreaseStreamRetentionPeriodCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("IncreaseStreamRetentionPeriod"); let body: any; - body = JSON.stringify(se_IncreaseStreamRetentionPeriodInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -385,7 +372,7 @@ export const se_ListStreamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStreams"); let body: any; - body = JSON.stringify(se_ListStreamsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -398,7 +385,7 @@ export const se_ListTagsForStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForStream"); let body: any; - body = JSON.stringify(se_ListTagsForStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -411,7 +398,7 @@ export const se_MergeShardsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MergeShards"); let body: any; - body = JSON.stringify(se_MergeShardsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -450,7 +437,7 @@ export const se_RegisterStreamConsumerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterStreamConsumer"); let body: any; - body = JSON.stringify(se_RegisterStreamConsumerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -463,7 +450,7 @@ export const se_RemoveTagsFromStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromStream"); let body: any; - body = JSON.stringify(se_RemoveTagsFromStreamInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -476,7 +463,7 @@ export const se_SplitShardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SplitShard"); let body: any; - body = JSON.stringify(se_SplitShardInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -489,7 +476,7 @@ export const se_StartStreamEncryptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartStreamEncryption"); let body: any; - body = JSON.stringify(se_StartStreamEncryptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -502,7 +489,7 @@ export const se_StopStreamEncryptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopStreamEncryption"); let body: any; - body = JSON.stringify(se_StopStreamEncryptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -528,7 +515,7 @@ export const se_UpdateShardCountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateShardCount"); let body: any; - body = JSON.stringify(se_UpdateShardCountInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -541,7 +528,7 @@ export const se_UpdateStreamModeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateStreamMode"); let body: any; - body = JSON.stringify(se_UpdateStreamModeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -559,7 +546,7 @@ export const de_AddTagsToStreamCommand = async ( const response: AddTagsToStreamCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -592,10 +579,9 @@ const de_AddTagsToStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -615,7 +601,7 @@ export const de_CreateStreamCommand = async ( const response: CreateStreamCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -642,10 +628,9 @@ const de_CreateStreamCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -665,7 +650,7 @@ export const de_DecreaseStreamRetentionPeriodCommand = async ( const response: DecreaseStreamRetentionPeriodCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -698,10 +683,9 @@ const de_DecreaseStreamRetentionPeriodCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -721,7 +705,7 @@ export const de_DeleteStreamCommand = async ( const response: DeleteStreamCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -754,10 +738,9 @@ const de_DeleteStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -777,7 +760,7 @@ export const de_DeregisterStreamConsumerCommand = async ( const response: DeregisterStreamConsumerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -804,10 +787,9 @@ const de_DeregisterStreamConsumerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -825,12 +807,12 @@ export const de_DescribeLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLimitsOutput(data, context); + contents = _json(data); const response: DescribeLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -851,10 +833,9 @@ const de_DescribeLimitsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -877,7 +858,7 @@ export const de_DescribeStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -907,10 +888,9 @@ const de_DescribeStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -933,7 +913,7 @@ export const de_DescribeStreamConsumerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -960,10 +940,9 @@ const de_DescribeStreamConsumerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -986,7 +965,7 @@ export const de_DescribeStreamSummaryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1016,10 +995,9 @@ const de_DescribeStreamSummaryCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1037,12 +1015,12 @@ export const de_DisableEnhancedMonitoringCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnhancedMonitoringOutput(data, context); + contents = _json(data); const response: DisableEnhancedMonitoringCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1075,10 +1053,9 @@ const de_DisableEnhancedMonitoringCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,12 +1073,12 @@ export const de_EnableEnhancedMonitoringCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnhancedMonitoringOutput(data, context); + contents = _json(data); const response: EnableEnhancedMonitoringCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1134,10 +1111,9 @@ const de_EnableEnhancedMonitoringCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1160,7 +1136,7 @@ export const de_GetRecordsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1211,10 +1187,9 @@ const de_GetRecordsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1232,12 +1207,12 @@ export const de_GetShardIteratorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetShardIteratorOutput(data, context); + contents = _json(data); const response: GetShardIteratorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1267,10 +1242,9 @@ const de_GetShardIteratorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1290,7 +1264,7 @@ export const de_IncreaseStreamRetentionPeriodCommand = async ( const response: IncreaseStreamRetentionPeriodCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1323,10 +1297,9 @@ const de_IncreaseStreamRetentionPeriodCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1344,12 +1317,12 @@ export const de_ListShardsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListShardsOutput(data, context); + contents = _json(data); const response: ListShardsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1385,10 +1358,9 @@ const de_ListShardsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1411,7 +1383,7 @@ export const de_ListStreamConsumersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1444,10 +1416,9 @@ const de_ListStreamConsumersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1470,7 +1441,7 @@ export const de_ListStreamsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1497,10 +1468,9 @@ const de_ListStreamsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1518,12 +1488,12 @@ export const de_ListTagsForStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForStreamOutput(data, context); + contents = _json(data); const response: ListTagsForStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1553,10 +1523,9 @@ const de_ListTagsForStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1576,7 +1545,7 @@ export const de_MergeShardsCommand = async ( const response: MergeShardsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1612,10 +1581,9 @@ const de_MergeShardsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1633,12 +1601,12 @@ export const de_PutRecordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRecordOutput(data, context); + contents = _json(data); const response: PutRecordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1686,10 +1654,9 @@ const de_PutRecordCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1707,12 +1674,12 @@ export const de_PutRecordsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRecordsOutput(data, context); + contents = _json(data); const response: PutRecordsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1760,10 +1727,9 @@ const de_PutRecordsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1786,7 +1752,7 @@ export const de_RegisterStreamConsumerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1816,10 +1782,9 @@ const de_RegisterStreamConsumerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1839,7 +1804,7 @@ export const de_RemoveTagsFromStreamCommand = async ( const response: RemoveTagsFromStreamCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1872,10 +1837,9 @@ const de_RemoveTagsFromStreamCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1895,7 +1859,7 @@ export const de_SplitShardCommand = async ( const response: SplitShardCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1931,10 +1895,9 @@ const de_SplitShardCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1954,7 +1917,7 @@ export const de_StartStreamEncryptionCommand = async ( const response: StartStreamEncryptionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2005,10 +1968,9 @@ const de_StartStreamEncryptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,7 +1990,7 @@ export const de_StopStreamEncryptionCommand = async ( const response: StopStreamEncryptionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2061,10 +2023,9 @@ const de_StopStreamEncryptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2085,7 +2046,7 @@ export const de_SubscribeToShardCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2118,10 +2079,9 @@ const de_SubscribeToShardCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2139,12 +2099,12 @@ export const de_UpdateShardCountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateShardCountOutput(data, context); + contents = _json(data); const response: UpdateShardCountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2180,10 +2140,9 @@ const de_UpdateShardCountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2203,7 +2162,7 @@ export const de_UpdateStreamModeCommand = async ( const response: UpdateStreamModeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2233,10 +2192,9 @@ const de_UpdateStreamModeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2250,7 +2208,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2266,7 +2224,7 @@ const de_ExpiredIteratorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredIteratorException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredIteratorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2282,7 +2240,7 @@ const de_ExpiredNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2298,7 +2256,7 @@ const de_InvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2314,7 +2272,7 @@ const de_KMSAccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSAccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new KMSAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2330,7 +2288,7 @@ const de_KMSDisabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSDisabledException(body, context); + const deserialized: any = _json(body); const exception = new KMSDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2346,7 +2304,7 @@ const de_KMSInvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSInvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new KMSInvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2362,7 +2320,7 @@ const de_KMSNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new KMSNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2375,7 +2333,7 @@ const de_KMSNotFoundExceptionRes = async ( */ const de_KMSOptInRequiredRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSOptInRequired(body, context); + const deserialized: any = _json(body); const exception = new KMSOptInRequired({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2391,7 +2349,7 @@ const de_KMSThrottlingExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new KMSThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2407,7 +2365,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2423,7 +2381,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProvisionedThroughputExceededException(body, context); + const deserialized: any = _json(body); const exception = new ProvisionedThroughputExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2439,7 +2397,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2455,7 +2413,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2468,7 +2426,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2635,7 +2593,7 @@ const de_InternalFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalFailureException(body, context); + const deserialized: any = _json(body); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2643,278 +2601,115 @@ const de_InternalFailureExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsToStreamInput - */ -const se_AddTagsToStreamInput = (input: AddTagsToStreamInput, context: __SerdeContext): any => { - return { - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; -}; +// se_AddTagsToStreamInput omitted. -/** - * serializeAws_json1_1CreateStreamInput - */ -const se_CreateStreamInput = (input: CreateStreamInput, context: __SerdeContext): any => { - return { - ...(input.ShardCount != null && { ShardCount: input.ShardCount }), - ...(input.StreamModeDetails != null && { - StreamModeDetails: se_StreamModeDetails(input.StreamModeDetails, context), - }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_CreateStreamInput omitted. -/** - * serializeAws_json1_1DecreaseStreamRetentionPeriodInput - */ -const se_DecreaseStreamRetentionPeriodInput = ( - input: DecreaseStreamRetentionPeriodInput, - context: __SerdeContext -): any => { - return { - ...(input.RetentionPeriodHours != null && { RetentionPeriodHours: input.RetentionPeriodHours }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_DecreaseStreamRetentionPeriodInput omitted. -/** - * serializeAws_json1_1DeleteStreamInput - */ -const se_DeleteStreamInput = (input: DeleteStreamInput, context: __SerdeContext): any => { - return { - ...(input.EnforceConsumerDeletion != null && { EnforceConsumerDeletion: input.EnforceConsumerDeletion }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_DeleteStreamInput omitted. -/** - * serializeAws_json1_1DeregisterStreamConsumerInput - */ -const se_DeregisterStreamConsumerInput = (input: DeregisterStreamConsumerInput, context: __SerdeContext): any => { - return { - ...(input.ConsumerARN != null && { ConsumerARN: input.ConsumerARN }), - ...(input.ConsumerName != null && { ConsumerName: input.ConsumerName }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - }; -}; +// se_DeregisterStreamConsumerInput omitted. -/** - * serializeAws_json1_1DescribeLimitsInput - */ -const se_DescribeLimitsInput = (input: DescribeLimitsInput, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeLimitsInput omitted. -/** - * serializeAws_json1_1DescribeStreamConsumerInput - */ -const se_DescribeStreamConsumerInput = (input: DescribeStreamConsumerInput, context: __SerdeContext): any => { - return { - ...(input.ConsumerARN != null && { ConsumerARN: input.ConsumerARN }), - ...(input.ConsumerName != null && { ConsumerName: input.ConsumerName }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - }; -}; +// se_DescribeStreamConsumerInput omitted. -/** - * serializeAws_json1_1DescribeStreamInput - */ -const se_DescribeStreamInput = (input: DescribeStreamInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_DescribeStreamInput omitted. -/** - * serializeAws_json1_1DescribeStreamSummaryInput - */ -const se_DescribeStreamSummaryInput = (input: DescribeStreamSummaryInput, context: __SerdeContext): any => { - return { - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_DescribeStreamSummaryInput omitted. -/** - * serializeAws_json1_1DisableEnhancedMonitoringInput - */ -const se_DisableEnhancedMonitoringInput = (input: DisableEnhancedMonitoringInput, context: __SerdeContext): any => { - return { - ...(input.ShardLevelMetrics != null && { ShardLevelMetrics: se_MetricsNameList(input.ShardLevelMetrics, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_DisableEnhancedMonitoringInput omitted. -/** - * serializeAws_json1_1EnableEnhancedMonitoringInput - */ -const se_EnableEnhancedMonitoringInput = (input: EnableEnhancedMonitoringInput, context: __SerdeContext): any => { - return { - ...(input.ShardLevelMetrics != null && { ShardLevelMetrics: se_MetricsNameList(input.ShardLevelMetrics, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_EnableEnhancedMonitoringInput omitted. -/** - * serializeAws_json1_1GetRecordsInput - */ -const se_GetRecordsInput = (input: GetRecordsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.ShardIterator != null && { ShardIterator: input.ShardIterator }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - }; -}; +// se_GetRecordsInput omitted. /** * serializeAws_json1_1GetShardIteratorInput */ const se_GetShardIteratorInput = (input: GetShardIteratorInput, context: __SerdeContext): any => { - return { - ...(input.ShardId != null && { ShardId: input.ShardId }), - ...(input.ShardIteratorType != null && { ShardIteratorType: input.ShardIteratorType }), - ...(input.StartingSequenceNumber != null && { StartingSequenceNumber: input.StartingSequenceNumber }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - }; + return take(input, { + ShardId: [], + ShardIteratorType: [], + StartingSequenceNumber: [], + StreamARN: [], + StreamName: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1IncreaseStreamRetentionPeriodInput - */ -const se_IncreaseStreamRetentionPeriodInput = ( - input: IncreaseStreamRetentionPeriodInput, - context: __SerdeContext -): any => { - return { - ...(input.RetentionPeriodHours != null && { RetentionPeriodHours: input.RetentionPeriodHours }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_IncreaseStreamRetentionPeriodInput omitted. /** * serializeAws_json1_1ListShardsInput */ const se_ListShardsInput = (input: ListShardsInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartShardId != null && { ExclusiveStartShardId: input.ExclusiveStartShardId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ShardFilter != null && { ShardFilter: se_ShardFilter(input.ShardFilter, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamCreationTimestamp != null && { - StreamCreationTimestamp: Math.round(input.StreamCreationTimestamp.getTime() / 1000), - }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; + return take(input, { + ExclusiveStartShardId: [], + MaxResults: [], + NextToken: [], + ShardFilter: (_) => se_ShardFilter(_, context), + StreamARN: [], + StreamCreationTimestamp: (_) => Math.round(_.getTime() / 1000), + StreamName: [], + }); }; /** * serializeAws_json1_1ListStreamConsumersInput */ const se_ListStreamConsumersInput = (input: ListStreamConsumersInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamCreationTimestamp != null && { - StreamCreationTimestamp: Math.round(input.StreamCreationTimestamp.getTime() / 1000), - }), - }; + return take(input, { + MaxResults: [], + NextToken: [], + StreamARN: [], + StreamCreationTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListStreamsInput - */ -const se_ListStreamsInput = (input: ListStreamsInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartStreamName != null && { ExclusiveStartStreamName: input.ExclusiveStartStreamName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListStreamsInput omitted. -/** - * serializeAws_json1_1ListTagsForStreamInput - */ -const se_ListTagsForStreamInput = (input: ListTagsForStreamInput, context: __SerdeContext): any => { - return { - ...(input.ExclusiveStartTagKey != null && { ExclusiveStartTagKey: input.ExclusiveStartTagKey }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_ListTagsForStreamInput omitted. -/** - * serializeAws_json1_1MergeShardsInput - */ -const se_MergeShardsInput = (input: MergeShardsInput, context: __SerdeContext): any => { - return { - ...(input.AdjacentShardToMerge != null && { AdjacentShardToMerge: input.AdjacentShardToMerge }), - ...(input.ShardToMerge != null && { ShardToMerge: input.ShardToMerge }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_MergeShardsInput omitted. -/** - * serializeAws_json1_1MetricsNameList - */ -const se_MetricsNameList = (input: (MetricsName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MetricsNameList omitted. /** * serializeAws_json1_1PutRecordInput */ const se_PutRecordInput = (input: PutRecordInput, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: context.base64Encoder(input.Data) }), - ...(input.ExplicitHashKey != null && { ExplicitHashKey: input.ExplicitHashKey }), - ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }), - ...(input.SequenceNumberForOrdering != null && { SequenceNumberForOrdering: input.SequenceNumberForOrdering }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; + return take(input, { + Data: context.base64Encoder, + ExplicitHashKey: [], + PartitionKey: [], + SequenceNumberForOrdering: [], + StreamARN: [], + StreamName: [], + }); }; /** * serializeAws_json1_1PutRecordsInput */ const se_PutRecordsInput = (input: PutRecordsInput, context: __SerdeContext): any => { - return { - ...(input.Records != null && { Records: se_PutRecordsRequestEntryList(input.Records, context) }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; + return take(input, { + Records: (_) => se_PutRecordsRequestEntryList(_, context), + StreamARN: [], + StreamName: [], + }); }; /** * serializeAws_json1_1PutRecordsRequestEntry */ const se_PutRecordsRequestEntry = (input: PutRecordsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: context.base64Encoder(input.Data) }), - ...(input.ExplicitHashKey != null && { ExplicitHashKey: input.ExplicitHashKey }), - ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }), - }; + return take(input, { + Data: context.base64Encoder, + ExplicitHashKey: [], + PartitionKey: [], + }); }; /** @@ -2928,217 +2723,88 @@ const se_PutRecordsRequestEntryList = (input: PutRecordsRequestEntry[], context: }); }; -/** - * serializeAws_json1_1RegisterStreamConsumerInput - */ -const se_RegisterStreamConsumerInput = (input: RegisterStreamConsumerInput, context: __SerdeContext): any => { - return { - ...(input.ConsumerName != null && { ConsumerName: input.ConsumerName }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - }; -}; +// se_RegisterStreamConsumerInput omitted. -/** - * serializeAws_json1_1RemoveTagsFromStreamInput - */ -const se_RemoveTagsFromStreamInput = (input: RemoveTagsFromStreamInput, context: __SerdeContext): any => { - return { - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_RemoveTagsFromStreamInput omitted. /** * serializeAws_json1_1ShardFilter */ const se_ShardFilter = (input: ShardFilter, context: __SerdeContext): any => { - return { - ...(input.ShardId != null && { ShardId: input.ShardId }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + ShardId: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + Type: [], + }); }; -/** - * serializeAws_json1_1SplitShardInput - */ -const se_SplitShardInput = (input: SplitShardInput, context: __SerdeContext): any => { - return { - ...(input.NewStartingHashKey != null && { NewStartingHashKey: input.NewStartingHashKey }), - ...(input.ShardToSplit != null && { ShardToSplit: input.ShardToSplit }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_SplitShardInput omitted. /** * serializeAws_json1_1StartingPosition */ const se_StartingPosition = (input: StartingPosition, context: __SerdeContext): any => { - return { - ...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + SequenceNumber: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + Type: [], + }); }; -/** - * serializeAws_json1_1StartStreamEncryptionInput - */ -const se_StartStreamEncryptionInput = (input: StartStreamEncryptionInput, context: __SerdeContext): any => { - return { - ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_StartStreamEncryptionInput omitted. -/** - * serializeAws_json1_1StopStreamEncryptionInput - */ -const se_StopStreamEncryptionInput = (input: StopStreamEncryptionInput, context: __SerdeContext): any => { - return { - ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_StopStreamEncryptionInput omitted. -/** - * serializeAws_json1_1StreamModeDetails - */ -const se_StreamModeDetails = (input: StreamModeDetails, context: __SerdeContext): any => { - return { - ...(input.StreamMode != null && { StreamMode: input.StreamMode }), - }; -}; +// se_StreamModeDetails omitted. /** * serializeAws_json1_1SubscribeToShardInput */ const se_SubscribeToShardInput = (input: SubscribeToShardInput, context: __SerdeContext): any => { - return { - ...(input.ConsumerARN != null && { ConsumerARN: input.ConsumerARN }), - ...(input.ShardId != null && { ShardId: input.ShardId }), - ...(input.StartingPosition != null && { StartingPosition: se_StartingPosition(input.StartingPosition, context) }), - }; + return take(input, { + ConsumerARN: [], + ShardId: [], + StartingPosition: (_) => se_StartingPosition(_, context), + }); }; -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_json1_1UpdateShardCountInput - */ -const se_UpdateShardCountInput = (input: UpdateShardCountInput, context: __SerdeContext): any => { - return { - ...(input.ScalingType != null && { ScalingType: input.ScalingType }), - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.TargetShardCount != null && { TargetShardCount: input.TargetShardCount }), - }; -}; +// se_UpdateShardCountInput omitted. -/** - * serializeAws_json1_1UpdateStreamModeInput - */ -const se_UpdateStreamModeInput = (input: UpdateStreamModeInput, context: __SerdeContext): any => { - return { - ...(input.StreamARN != null && { StreamARN: input.StreamARN }), - ...(input.StreamModeDetails != null && { - StreamModeDetails: se_StreamModeDetails(input.StreamModeDetails, context), - }), - }; -}; +// se_UpdateStreamModeInput omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1ChildShard - */ -const de_ChildShard = (output: any, context: __SerdeContext): ChildShard => { - return { - HashKeyRange: output.HashKeyRange != null ? de_HashKeyRange(output.HashKeyRange, context) : undefined, - ParentShards: output.ParentShards != null ? de_ShardIdList(output.ParentShards, context) : undefined, - ShardId: __expectString(output.ShardId), - } as any; -}; +// de_ChildShard omitted. -/** - * deserializeAws_json1_1ChildShardList - */ -const de_ChildShardList = (output: any, context: __SerdeContext): ChildShard[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChildShard(entry, context); - }); - return retVal; -}; +// de_ChildShardList omitted. /** * deserializeAws_json1_1Consumer */ const de_Consumer = (output: any, context: __SerdeContext): Consumer => { - return { - ConsumerARN: __expectString(output.ConsumerARN), - ConsumerCreationTimestamp: - output.ConsumerCreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConsumerCreationTimestamp))) - : undefined, - ConsumerName: __expectString(output.ConsumerName), - ConsumerStatus: __expectString(output.ConsumerStatus), - } as any; + return take(output, { + ConsumerARN: __expectString, + ConsumerCreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ConsumerName: __expectString, + ConsumerStatus: __expectString, + }) as any; }; /** * deserializeAws_json1_1ConsumerDescription */ const de_ConsumerDescription = (output: any, context: __SerdeContext): ConsumerDescription => { - return { - ConsumerARN: __expectString(output.ConsumerARN), - ConsumerCreationTimestamp: - output.ConsumerCreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConsumerCreationTimestamp))) - : undefined, - ConsumerName: __expectString(output.ConsumerName), - ConsumerStatus: __expectString(output.ConsumerStatus), - StreamARN: __expectString(output.StreamARN), - } as any; + return take(output, { + ConsumerARN: __expectString, + ConsumerCreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ConsumerName: __expectString, + ConsumerStatus: __expectString, + StreamARN: __expectString, + }) as any; }; /** @@ -3148,363 +2814,133 @@ const de_ConsumerList = (output: any, context: __SerdeContext): Consumer[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Consumer(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DescribeLimitsOutput - */ -const de_DescribeLimitsOutput = (output: any, context: __SerdeContext): DescribeLimitsOutput => { - return { - OnDemandStreamCount: __expectInt32(output.OnDemandStreamCount), - OnDemandStreamCountLimit: __expectInt32(output.OnDemandStreamCountLimit), - OpenShardCount: __expectInt32(output.OpenShardCount), - ShardLimit: __expectInt32(output.ShardLimit), - } as any; -}; +// de_DescribeLimitsOutput omitted. /** * deserializeAws_json1_1DescribeStreamConsumerOutput */ const de_DescribeStreamConsumerOutput = (output: any, context: __SerdeContext): DescribeStreamConsumerOutput => { - return { - ConsumerDescription: - output.ConsumerDescription != null ? de_ConsumerDescription(output.ConsumerDescription, context) : undefined, - } as any; + return take(output, { + ConsumerDescription: (_: any) => de_ConsumerDescription(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeStreamOutput */ const de_DescribeStreamOutput = (output: any, context: __SerdeContext): DescribeStreamOutput => { - return { - StreamDescription: - output.StreamDescription != null ? de_StreamDescription(output.StreamDescription, context) : undefined, - } as any; + return take(output, { + StreamDescription: (_: any) => de_StreamDescription(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeStreamSummaryOutput */ const de_DescribeStreamSummaryOutput = (output: any, context: __SerdeContext): DescribeStreamSummaryOutput => { - return { - StreamDescriptionSummary: - output.StreamDescriptionSummary != null - ? de_StreamDescriptionSummary(output.StreamDescriptionSummary, context) - : undefined, - } as any; + return take(output, { + StreamDescriptionSummary: (_: any) => de_StreamDescriptionSummary(_, context), + }) as any; }; -/** - * deserializeAws_json1_1EnhancedMetrics - */ -const de_EnhancedMetrics = (output: any, context: __SerdeContext): EnhancedMetrics => { - return { - ShardLevelMetrics: - output.ShardLevelMetrics != null ? de_MetricsNameList(output.ShardLevelMetrics, context) : undefined, - } as any; -}; +// de_EnhancedMetrics omitted. -/** - * deserializeAws_json1_1EnhancedMonitoringList - */ -const de_EnhancedMonitoringList = (output: any, context: __SerdeContext): EnhancedMetrics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnhancedMetrics(entry, context); - }); - return retVal; -}; +// de_EnhancedMonitoringList omitted. -/** - * deserializeAws_json1_1EnhancedMonitoringOutput - */ -const de_EnhancedMonitoringOutput = (output: any, context: __SerdeContext): EnhancedMonitoringOutput => { - return { - CurrentShardLevelMetrics: - output.CurrentShardLevelMetrics != null - ? de_MetricsNameList(output.CurrentShardLevelMetrics, context) - : undefined, - DesiredShardLevelMetrics: - output.DesiredShardLevelMetrics != null - ? de_MetricsNameList(output.DesiredShardLevelMetrics, context) - : undefined, - StreamARN: __expectString(output.StreamARN), - StreamName: __expectString(output.StreamName), - } as any; -}; +// de_EnhancedMonitoringOutput omitted. -/** - * deserializeAws_json1_1ExpiredIteratorException - */ -const de_ExpiredIteratorException = (output: any, context: __SerdeContext): ExpiredIteratorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ExpiredIteratorException omitted. -/** - * deserializeAws_json1_1ExpiredNextTokenException - */ -const de_ExpiredNextTokenException = (output: any, context: __SerdeContext): ExpiredNextTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ExpiredNextTokenException omitted. /** * deserializeAws_json1_1GetRecordsOutput */ const de_GetRecordsOutput = (output: any, context: __SerdeContext): GetRecordsOutput => { - return { - ChildShards: output.ChildShards != null ? de_ChildShardList(output.ChildShards, context) : undefined, - MillisBehindLatest: __expectLong(output.MillisBehindLatest), - NextShardIterator: __expectString(output.NextShardIterator), - Records: output.Records != null ? de_RecordList(output.Records, context) : undefined, - } as any; + return take(output, { + ChildShards: _json, + MillisBehindLatest: __expectLong, + NextShardIterator: __expectString, + Records: (_: any) => de_RecordList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetShardIteratorOutput - */ -const de_GetShardIteratorOutput = (output: any, context: __SerdeContext): GetShardIteratorOutput => { - return { - ShardIterator: __expectString(output.ShardIterator), - } as any; -}; +// de_GetShardIteratorOutput omitted. -/** - * deserializeAws_json1_1HashKeyRange - */ -const de_HashKeyRange = (output: any, context: __SerdeContext): HashKeyRange => { - return { - EndingHashKey: __expectString(output.EndingHashKey), - StartingHashKey: __expectString(output.StartingHashKey), - } as any; -}; +// de_HashKeyRange omitted. -/** - * deserializeAws_json1_1InternalFailureException - */ -const de_InternalFailureException = (output: any, context: __SerdeContext): InternalFailureException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalFailureException omitted. -/** - * deserializeAws_json1_1InvalidArgumentException - */ -const de_InvalidArgumentException = (output: any, context: __SerdeContext): InvalidArgumentException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidArgumentException omitted. -/** - * deserializeAws_json1_1KMSAccessDeniedException - */ -const de_KMSAccessDeniedException = (output: any, context: __SerdeContext): KMSAccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KMSAccessDeniedException omitted. -/** - * deserializeAws_json1_1KMSDisabledException - */ -const de_KMSDisabledException = (output: any, context: __SerdeContext): KMSDisabledException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KMSDisabledException omitted. -/** - * deserializeAws_json1_1KMSInvalidStateException - */ -const de_KMSInvalidStateException = (output: any, context: __SerdeContext): KMSInvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KMSInvalidStateException omitted. -/** - * deserializeAws_json1_1KMSNotFoundException - */ -const de_KMSNotFoundException = (output: any, context: __SerdeContext): KMSNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KMSNotFoundException omitted. -/** - * deserializeAws_json1_1KMSOptInRequired - */ -const de_KMSOptInRequired = (output: any, context: __SerdeContext): KMSOptInRequired => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KMSOptInRequired omitted. -/** - * deserializeAws_json1_1KMSThrottlingException - */ -const de_KMSThrottlingException = (output: any, context: __SerdeContext): KMSThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_KMSThrottlingException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListShardsOutput - */ -const de_ListShardsOutput = (output: any, context: __SerdeContext): ListShardsOutput => { - return { - NextToken: __expectString(output.NextToken), - Shards: output.Shards != null ? de_ShardList(output.Shards, context) : undefined, - } as any; -}; +// de_ListShardsOutput omitted. /** * deserializeAws_json1_1ListStreamConsumersOutput */ const de_ListStreamConsumersOutput = (output: any, context: __SerdeContext): ListStreamConsumersOutput => { - return { - Consumers: output.Consumers != null ? de_ConsumerList(output.Consumers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Consumers: (_: any) => de_ConsumerList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListStreamsOutput */ const de_ListStreamsOutput = (output: any, context: __SerdeContext): ListStreamsOutput => { - return { - HasMoreStreams: __expectBoolean(output.HasMoreStreams), - NextToken: __expectString(output.NextToken), - StreamNames: output.StreamNames != null ? de_StreamNameList(output.StreamNames, context) : undefined, - StreamSummaries: output.StreamSummaries != null ? de_StreamSummaryList(output.StreamSummaries, context) : undefined, - } as any; + return take(output, { + HasMoreStreams: __expectBoolean, + NextToken: __expectString, + StreamNames: _json, + StreamSummaries: (_: any) => de_StreamSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForStreamOutput - */ -const de_ListTagsForStreamOutput = (output: any, context: __SerdeContext): ListTagsForStreamOutput => { - return { - HasMoreTags: __expectBoolean(output.HasMoreTags), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForStreamOutput omitted. -/** - * deserializeAws_json1_1MetricsNameList - */ -const de_MetricsNameList = (output: any, context: __SerdeContext): (MetricsName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MetricsNameList omitted. -/** - * deserializeAws_json1_1ProvisionedThroughputExceededException - */ -const de_ProvisionedThroughputExceededException = ( - output: any, - context: __SerdeContext -): ProvisionedThroughputExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ProvisionedThroughputExceededException omitted. -/** - * deserializeAws_json1_1PutRecordOutput - */ -const de_PutRecordOutput = (output: any, context: __SerdeContext): PutRecordOutput => { - return { - EncryptionType: __expectString(output.EncryptionType), - SequenceNumber: __expectString(output.SequenceNumber), - ShardId: __expectString(output.ShardId), - } as any; -}; +// de_PutRecordOutput omitted. -/** - * deserializeAws_json1_1PutRecordsOutput - */ -const de_PutRecordsOutput = (output: any, context: __SerdeContext): PutRecordsOutput => { - return { - EncryptionType: __expectString(output.EncryptionType), - FailedRecordCount: __expectInt32(output.FailedRecordCount), - Records: output.Records != null ? de_PutRecordsResultEntryList(output.Records, context) : undefined, - } as any; -}; +// de_PutRecordsOutput omitted. -/** - * deserializeAws_json1_1PutRecordsResultEntry - */ -const de_PutRecordsResultEntry = (output: any, context: __SerdeContext): PutRecordsResultEntry => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - SequenceNumber: __expectString(output.SequenceNumber), - ShardId: __expectString(output.ShardId), - } as any; -}; +// de_PutRecordsResultEntry omitted. -/** - * deserializeAws_json1_1PutRecordsResultEntryList - */ -const de_PutRecordsResultEntryList = (output: any, context: __SerdeContext): PutRecordsResultEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PutRecordsResultEntry(entry, context); - }); - return retVal; -}; +// de_PutRecordsResultEntryList omitted. /** * deserializeAws_json1_1_Record */ const de__Record = (output: any, context: __SerdeContext): _Record => { - return { - ApproximateArrivalTimestamp: - output.ApproximateArrivalTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApproximateArrivalTimestamp))) - : undefined, - Data: output.Data != null ? context.base64Decoder(output.Data) : undefined, - EncryptionType: __expectString(output.EncryptionType), - PartitionKey: __expectString(output.PartitionKey), - SequenceNumber: __expectString(output.SequenceNumber), - } as any; + return take(output, { + ApproximateArrivalTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Data: context.base64Decoder, + EncryptionType: __expectString, + PartitionKey: __expectString, + SequenceNumber: __expectString, + }) as any; }; /** @@ -3514,9 +2950,6 @@ const de_RecordList = (output: any, context: __SerdeContext): _Record[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de__Record(entry, context); }); return retVal; @@ -3526,170 +2959,76 @@ const de_RecordList = (output: any, context: __SerdeContext): _Record[] => { * deserializeAws_json1_1RegisterStreamConsumerOutput */ const de_RegisterStreamConsumerOutput = (output: any, context: __SerdeContext): RegisterStreamConsumerOutput => { - return { - Consumer: output.Consumer != null ? de_Consumer(output.Consumer, context) : undefined, - } as any; + return take(output, { + Consumer: (_: any) => de_Consumer(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1SequenceNumberRange - */ -const de_SequenceNumberRange = (output: any, context: __SerdeContext): SequenceNumberRange => { - return { - EndingSequenceNumber: __expectString(output.EndingSequenceNumber), - StartingSequenceNumber: __expectString(output.StartingSequenceNumber), - } as any; -}; +// de_SequenceNumberRange omitted. -/** - * deserializeAws_json1_1Shard - */ -const de_Shard = (output: any, context: __SerdeContext): Shard => { - return { - AdjacentParentShardId: __expectString(output.AdjacentParentShardId), - HashKeyRange: output.HashKeyRange != null ? de_HashKeyRange(output.HashKeyRange, context) : undefined, - ParentShardId: __expectString(output.ParentShardId), - SequenceNumberRange: - output.SequenceNumberRange != null ? de_SequenceNumberRange(output.SequenceNumberRange, context) : undefined, - ShardId: __expectString(output.ShardId), - } as any; -}; +// de_Shard omitted. -/** - * deserializeAws_json1_1ShardIdList - */ -const de_ShardIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ShardIdList omitted. -/** - * deserializeAws_json1_1ShardList - */ -const de_ShardList = (output: any, context: __SerdeContext): Shard[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Shard(entry, context); - }); - return retVal; -}; +// de_ShardList omitted. /** * deserializeAws_json1_1StreamDescription */ const de_StreamDescription = (output: any, context: __SerdeContext): StreamDescription => { - return { - EncryptionType: __expectString(output.EncryptionType), - EnhancedMonitoring: - output.EnhancedMonitoring != null ? de_EnhancedMonitoringList(output.EnhancedMonitoring, context) : undefined, - HasMoreShards: __expectBoolean(output.HasMoreShards), - KeyId: __expectString(output.KeyId), - RetentionPeriodHours: __expectInt32(output.RetentionPeriodHours), - Shards: output.Shards != null ? de_ShardList(output.Shards, context) : undefined, - StreamARN: __expectString(output.StreamARN), - StreamCreationTimestamp: - output.StreamCreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StreamCreationTimestamp))) - : undefined, - StreamModeDetails: - output.StreamModeDetails != null ? de_StreamModeDetails(output.StreamModeDetails, context) : undefined, - StreamName: __expectString(output.StreamName), - StreamStatus: __expectString(output.StreamStatus), - } as any; + return take(output, { + EncryptionType: __expectString, + EnhancedMonitoring: _json, + HasMoreShards: __expectBoolean, + KeyId: __expectString, + RetentionPeriodHours: __expectInt32, + Shards: _json, + StreamARN: __expectString, + StreamCreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamModeDetails: _json, + StreamName: __expectString, + StreamStatus: __expectString, + }) as any; }; /** * deserializeAws_json1_1StreamDescriptionSummary */ const de_StreamDescriptionSummary = (output: any, context: __SerdeContext): StreamDescriptionSummary => { - return { - ConsumerCount: __expectInt32(output.ConsumerCount), - EncryptionType: __expectString(output.EncryptionType), - EnhancedMonitoring: - output.EnhancedMonitoring != null ? de_EnhancedMonitoringList(output.EnhancedMonitoring, context) : undefined, - KeyId: __expectString(output.KeyId), - OpenShardCount: __expectInt32(output.OpenShardCount), - RetentionPeriodHours: __expectInt32(output.RetentionPeriodHours), - StreamARN: __expectString(output.StreamARN), - StreamCreationTimestamp: - output.StreamCreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StreamCreationTimestamp))) - : undefined, - StreamModeDetails: - output.StreamModeDetails != null ? de_StreamModeDetails(output.StreamModeDetails, context) : undefined, - StreamName: __expectString(output.StreamName), - StreamStatus: __expectString(output.StreamStatus), - } as any; -}; - -/** - * deserializeAws_json1_1StreamModeDetails - */ -const de_StreamModeDetails = (output: any, context: __SerdeContext): StreamModeDetails => { - return { - StreamMode: __expectString(output.StreamMode), - } as any; + return take(output, { + ConsumerCount: __expectInt32, + EncryptionType: __expectString, + EnhancedMonitoring: _json, + KeyId: __expectString, + OpenShardCount: __expectInt32, + RetentionPeriodHours: __expectInt32, + StreamARN: __expectString, + StreamCreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamModeDetails: _json, + StreamName: __expectString, + StreamStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1StreamNameList - */ -const de_StreamNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StreamModeDetails omitted. + +// de_StreamNameList omitted. /** * deserializeAws_json1_1StreamSummary */ const de_StreamSummary = (output: any, context: __SerdeContext): StreamSummary => { - return { - StreamARN: __expectString(output.StreamARN), - StreamCreationTimestamp: - output.StreamCreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StreamCreationTimestamp))) - : undefined, - StreamModeDetails: - output.StreamModeDetails != null ? de_StreamModeDetails(output.StreamModeDetails, context) : undefined, - StreamName: __expectString(output.StreamName), - StreamStatus: __expectString(output.StreamStatus), - } as any; + return take(output, { + StreamARN: __expectString, + StreamCreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StreamModeDetails: _json, + StreamName: __expectString, + StreamStatus: __expectString, + }) as any; }; /** @@ -3699,9 +3038,6 @@ const de_StreamSummaryList = (output: any, context: __SerdeContext): StreamSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamSummary(entry, context); }); return retVal; @@ -3711,59 +3047,21 @@ const de_StreamSummaryList = (output: any, context: __SerdeContext): StreamSumma * deserializeAws_json1_1SubscribeToShardEvent */ const de_SubscribeToShardEvent = (output: any, context: __SerdeContext): SubscribeToShardEvent => { - return { - ChildShards: output.ChildShards != null ? de_ChildShardList(output.ChildShards, context) : undefined, - ContinuationSequenceNumber: __expectString(output.ContinuationSequenceNumber), - MillisBehindLatest: __expectLong(output.MillisBehindLatest), - Records: output.Records != null ? de_RecordList(output.Records, context) : undefined, - } as any; + return take(output, { + ChildShards: _json, + ContinuationSequenceNumber: __expectString, + MillisBehindLatest: __expectLong, + Records: (_: any) => de_RecordList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1UpdateShardCountOutput - */ -const de_UpdateShardCountOutput = (output: any, context: __SerdeContext): UpdateShardCountOutput => { - return { - CurrentShardCount: __expectInt32(output.CurrentShardCount), - StreamARN: __expectString(output.StreamARN), - StreamName: __expectString(output.StreamName), - TargetShardCount: __expectInt32(output.TargetShardCount), - } as any; -}; +// de_UpdateShardCountOutput omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3785,6 +3083,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-kms/src/protocols/Aws_json1_1.ts b/clients/client-kms/src/protocols/Aws_json1_1.ts index b55f1056cbb9..7144eed84041 100644 --- a/clients/client-kms/src/protocols/Aws_json1_1.ts +++ b/clients/client-kms/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -120,19 +122,15 @@ import { AliasListEntry, AlreadyExistsException, CancelKeyDeletionRequest, - CancelKeyDeletionResponse, CloudHsmClusterInUseException, CloudHsmClusterInvalidConfigurationException, CloudHsmClusterNotActiveException, CloudHsmClusterNotFoundException, CloudHsmClusterNotRelatedException, ConnectCustomKeyStoreRequest, - ConnectCustomKeyStoreResponse, CreateAliasRequest, CreateCustomKeyStoreRequest, - CreateCustomKeyStoreResponse, CreateGrantRequest, - CreateGrantResponse, CreateKeyRequest, CreateKeyResponse, CustomKeyStoreHasCMKsException, @@ -144,7 +142,6 @@ import { DecryptResponse, DeleteAliasRequest, DeleteCustomKeyStoreRequest, - DeleteCustomKeyStoreResponse, DeleteImportedKeyMaterialRequest, DependencyTimeoutException, DescribeCustomKeyStoresRequest, @@ -155,10 +152,8 @@ import { DisableKeyRequest, DisableKeyRotationRequest, DisconnectCustomKeyStoreRequest, - DisconnectCustomKeyStoreResponse, EnableKeyRequest, EnableKeyRotationRequest, - EncryptionAlgorithmSpec, EncryptRequest, EncryptResponse, ExpiredImportTokenException, @@ -175,9 +170,7 @@ import { GenerateRandomRequest, GenerateRandomResponse, GetKeyPolicyRequest, - GetKeyPolicyResponse, GetKeyRotationStatusRequest, - GetKeyRotationStatusResponse, GetParametersForImportRequest, GetParametersForImportResponse, GetPublicKeyRequest, @@ -186,7 +179,6 @@ import { GrantListEntry, GrantOperation, ImportKeyMaterialRequest, - ImportKeyMaterialResponse, IncorrectKeyException, IncorrectKeyMaterialException, IncorrectTrustAnchorException, @@ -198,7 +190,6 @@ import { InvalidImportTokenException, InvalidKeyUsageException, InvalidMarkerException, - KeyListEntry, KeyMetadata, KeyUnavailableException, KMSInternalException, @@ -211,16 +202,10 @@ import { ListGrantsRequest, ListGrantsResponse, ListKeyPoliciesRequest, - ListKeyPoliciesResponse, ListKeysRequest, - ListKeysResponse, ListResourceTagsRequest, - ListResourceTagsResponse, ListRetirableGrantsRequest, - MacAlgorithmSpec, MalformedPolicyDocumentException, - MultiRegionConfiguration, - MultiRegionKey, NotFoundException, PutKeyPolicyRequest, ReEncryptRequest, @@ -231,7 +216,6 @@ import { RevokeGrantRequest, ScheduleKeyDeletionRequest, ScheduleKeyDeletionResponse, - SigningAlgorithmSpec, SignRequest, SignResponse, Tag, @@ -241,19 +225,14 @@ import { UntagResourceRequest, UpdateAliasRequest, UpdateCustomKeyStoreRequest, - UpdateCustomKeyStoreResponse, UpdateKeyDescriptionRequest, UpdatePrimaryRegionRequest, VerifyMacRequest, - VerifyMacResponse, VerifyRequest, - VerifyResponse, XksKeyAlreadyInUseException, - XksKeyConfigurationType, XksKeyInvalidConfigurationException, XksKeyNotFoundException, XksProxyAuthenticationCredentialType, - XksProxyConfigurationType, XksProxyIncorrectAuthenticationCredentialException, XksProxyInvalidConfigurationException, XksProxyInvalidResponseException, @@ -274,7 +253,7 @@ export const se_CancelKeyDeletionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelKeyDeletion"); let body: any; - body = JSON.stringify(se_CancelKeyDeletionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -287,7 +266,7 @@ export const se_ConnectCustomKeyStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConnectCustomKeyStore"); let body: any; - body = JSON.stringify(se_ConnectCustomKeyStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -300,7 +279,7 @@ export const se_CreateAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAlias"); let body: any; - body = JSON.stringify(se_CreateAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -313,7 +292,7 @@ export const se_CreateCustomKeyStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCustomKeyStore"); let body: any; - body = JSON.stringify(se_CreateCustomKeyStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -326,7 +305,7 @@ export const se_CreateGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGrant"); let body: any; - body = JSON.stringify(se_CreateGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -339,7 +318,7 @@ export const se_CreateKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateKey"); let body: any; - body = JSON.stringify(se_CreateKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -365,7 +344,7 @@ export const se_DeleteAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAlias"); let body: any; - body = JSON.stringify(se_DeleteAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -378,7 +357,7 @@ export const se_DeleteCustomKeyStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCustomKeyStore"); let body: any; - body = JSON.stringify(se_DeleteCustomKeyStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -391,7 +370,7 @@ export const se_DeleteImportedKeyMaterialCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImportedKeyMaterial"); let body: any; - body = JSON.stringify(se_DeleteImportedKeyMaterialRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -404,7 +383,7 @@ export const se_DescribeCustomKeyStoresCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCustomKeyStores"); let body: any; - body = JSON.stringify(se_DescribeCustomKeyStoresRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -417,7 +396,7 @@ export const se_DescribeKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeKey"); let body: any; - body = JSON.stringify(se_DescribeKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -430,7 +409,7 @@ export const se_DisableKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableKey"); let body: any; - body = JSON.stringify(se_DisableKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -443,7 +422,7 @@ export const se_DisableKeyRotationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableKeyRotation"); let body: any; - body = JSON.stringify(se_DisableKeyRotationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -456,7 +435,7 @@ export const se_DisconnectCustomKeyStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisconnectCustomKeyStore"); let body: any; - body = JSON.stringify(se_DisconnectCustomKeyStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -469,7 +448,7 @@ export const se_EnableKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableKey"); let body: any; - body = JSON.stringify(se_EnableKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -482,7 +461,7 @@ export const se_EnableKeyRotationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableKeyRotation"); let body: any; - body = JSON.stringify(se_EnableKeyRotationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -508,7 +487,7 @@ export const se_GenerateDataKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateDataKey"); let body: any; - body = JSON.stringify(se_GenerateDataKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -521,7 +500,7 @@ export const se_GenerateDataKeyPairCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateDataKeyPair"); let body: any; - body = JSON.stringify(se_GenerateDataKeyPairRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -534,7 +513,7 @@ export const se_GenerateDataKeyPairWithoutPlaintextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateDataKeyPairWithoutPlaintext"); let body: any; - body = JSON.stringify(se_GenerateDataKeyPairWithoutPlaintextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -547,7 +526,7 @@ export const se_GenerateDataKeyWithoutPlaintextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateDataKeyWithoutPlaintext"); let body: any; - body = JSON.stringify(se_GenerateDataKeyWithoutPlaintextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -573,7 +552,7 @@ export const se_GenerateRandomCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateRandom"); let body: any; - body = JSON.stringify(se_GenerateRandomRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -586,7 +565,7 @@ export const se_GetKeyPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetKeyPolicy"); let body: any; - body = JSON.stringify(se_GetKeyPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -599,7 +578,7 @@ export const se_GetKeyRotationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetKeyRotationStatus"); let body: any; - body = JSON.stringify(se_GetKeyRotationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -612,7 +591,7 @@ export const se_GetParametersForImportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetParametersForImport"); let body: any; - body = JSON.stringify(se_GetParametersForImportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -625,7 +604,7 @@ export const se_GetPublicKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPublicKey"); let body: any; - body = JSON.stringify(se_GetPublicKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -651,7 +630,7 @@ export const se_ListAliasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAliases"); let body: any; - body = JSON.stringify(se_ListAliasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -664,7 +643,7 @@ export const se_ListGrantsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGrants"); let body: any; - body = JSON.stringify(se_ListGrantsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -677,7 +656,7 @@ export const se_ListKeyPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListKeyPolicies"); let body: any; - body = JSON.stringify(se_ListKeyPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -690,7 +669,7 @@ export const se_ListKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListKeys"); let body: any; - body = JSON.stringify(se_ListKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -703,7 +682,7 @@ export const se_ListResourceTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceTags"); let body: any; - body = JSON.stringify(se_ListResourceTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -716,7 +695,7 @@ export const se_ListRetirableGrantsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRetirableGrants"); let body: any; - body = JSON.stringify(se_ListRetirableGrantsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -729,7 +708,7 @@ export const se_PutKeyPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutKeyPolicy"); let body: any; - body = JSON.stringify(se_PutKeyPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -755,7 +734,7 @@ export const se_ReplicateKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReplicateKey"); let body: any; - body = JSON.stringify(se_ReplicateKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -768,7 +747,7 @@ export const se_RetireGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetireGrant"); let body: any; - body = JSON.stringify(se_RetireGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -781,7 +760,7 @@ export const se_RevokeGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RevokeGrant"); let body: any; - body = JSON.stringify(se_RevokeGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -794,7 +773,7 @@ export const se_ScheduleKeyDeletionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ScheduleKeyDeletion"); let body: any; - body = JSON.stringify(se_ScheduleKeyDeletionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -817,7 +796,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -830,7 +809,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -843,7 +822,7 @@ export const se_UpdateAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAlias"); let body: any; - body = JSON.stringify(se_UpdateAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -856,7 +835,7 @@ export const se_UpdateCustomKeyStoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCustomKeyStore"); let body: any; - body = JSON.stringify(se_UpdateCustomKeyStoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -869,7 +848,7 @@ export const se_UpdateKeyDescriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateKeyDescription"); let body: any; - body = JSON.stringify(se_UpdateKeyDescriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -882,7 +861,7 @@ export const se_UpdatePrimaryRegionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePrimaryRegion"); let body: any; - body = JSON.stringify(se_UpdatePrimaryRegionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -921,12 +900,12 @@ export const de_CancelKeyDeletionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelKeyDeletionResponse(data, context); + contents = _json(data); const response: CancelKeyDeletionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -959,10 +938,9 @@ const de_CancelKeyDeletionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -980,12 +958,12 @@ export const de_ConnectCustomKeyStoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ConnectCustomKeyStoreResponse(data, context); + contents = _json(data); const response: ConnectCustomKeyStoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1018,10 +996,9 @@ const de_ConnectCustomKeyStoreCommandError = async ( throw await de_KMSInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1041,7 +1018,7 @@ export const de_CreateAliasCommand = async ( const response: CreateAliasCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1080,10 +1057,9 @@ const de_CreateAliasCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1101,12 +1077,12 @@ export const de_CreateCustomKeyStoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCustomKeyStoreResponse(data, context); + contents = _json(data); const response: CreateCustomKeyStoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1175,10 +1151,9 @@ const de_CreateCustomKeyStoreCommandError = async ( throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1196,12 +1171,12 @@ export const de_CreateGrantCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGrantResponse(data, context); + contents = _json(data); const response: CreateGrantCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1243,10 +1218,9 @@ const de_CreateGrantCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1269,7 +1243,7 @@ export const de_CreateKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1326,10 +1300,9 @@ const de_CreateKeyCommandError = async ( throw await de_XksKeyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1352,7 +1325,7 @@ export const de_DecryptCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1400,10 +1373,9 @@ const de_DecryptCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1423,7 +1395,7 @@ export const de_DeleteAliasCommand = async ( const response: DeleteAliasCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1453,10 +1425,9 @@ const de_DeleteAliasCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1474,12 +1445,12 @@ export const de_DeleteCustomKeyStoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCustomKeyStoreResponse(data, context); + contents = _json(data); const response: DeleteCustomKeyStoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1509,10 +1480,9 @@ const de_DeleteCustomKeyStoreCommandError = async ( throw await de_KMSInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1532,7 +1502,7 @@ export const de_DeleteImportedKeyMaterialCommand = async ( const response: DeleteImportedKeyMaterialCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1568,10 +1538,9 @@ const de_DeleteImportedKeyMaterialCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1594,7 +1563,7 @@ export const de_DescribeCustomKeyStoresCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1621,10 +1590,9 @@ const de_DescribeCustomKeyStoresCommandError = async ( throw await de_KMSInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1647,7 +1615,7 @@ export const de_DescribeKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1677,10 +1645,9 @@ const de_DescribeKeyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1700,7 +1667,7 @@ export const de_DisableKeyCommand = async ( const response: DisableKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1733,10 +1700,9 @@ const de_DisableKeyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1756,7 +1722,7 @@ export const de_DisableKeyRotationCommand = async ( const response: DisableKeyRotationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1795,10 +1761,9 @@ const de_DisableKeyRotationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1816,12 +1781,12 @@ export const de_DisconnectCustomKeyStoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisconnectCustomKeyStoreResponse(data, context); + contents = _json(data); const response: DisconnectCustomKeyStoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1848,10 +1813,9 @@ const de_DisconnectCustomKeyStoreCommandError = async ( throw await de_KMSInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1871,7 +1835,7 @@ export const de_EnableKeyCommand = async ( const response: EnableKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1907,10 +1871,9 @@ const de_EnableKeyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1930,7 +1893,7 @@ export const de_EnableKeyRotationCommand = async ( const response: EnableKeyRotationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1969,10 +1932,9 @@ const de_EnableKeyRotationCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1995,7 +1957,7 @@ export const de_EncryptCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2037,10 +1999,9 @@ const de_EncryptCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2063,7 +2024,7 @@ export const de_GenerateDataKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2105,10 +2066,9 @@ const de_GenerateDataKeyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2131,7 +2091,7 @@ export const de_GenerateDataKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2176,10 +2136,9 @@ const de_GenerateDataKeyPairCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2202,7 +2161,7 @@ export const de_GenerateDataKeyPairWithoutPlaintextCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2247,10 +2206,9 @@ const de_GenerateDataKeyPairWithoutPlaintextCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2273,7 +2231,7 @@ export const de_GenerateDataKeyWithoutPlaintextCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2315,10 +2273,9 @@ const de_GenerateDataKeyWithoutPlaintextCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2341,7 +2298,7 @@ export const de_GenerateMacCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2380,10 +2337,9 @@ const de_GenerateMacCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2406,7 +2362,7 @@ export const de_GenerateRandomCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2439,10 +2395,9 @@ const de_GenerateRandomCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2460,12 +2415,12 @@ export const de_GetKeyPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetKeyPolicyResponse(data, context); + contents = _json(data); const response: GetKeyPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2498,10 +2453,9 @@ const de_GetKeyPolicyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,12 +2473,12 @@ export const de_GetKeyRotationStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetKeyRotationStatusResponse(data, context); + contents = _json(data); const response: GetKeyRotationStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2560,10 +2514,9 @@ const de_GetKeyRotationStatusCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2586,7 +2539,7 @@ export const de_GetParametersForImportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2622,10 +2575,9 @@ const de_GetParametersForImportCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2648,7 +2600,7 @@ export const de_GetPublicKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2696,10 +2648,9 @@ const de_GetPublicKeyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2717,12 +2668,12 @@ export const de_ImportKeyMaterialCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportKeyMaterialResponse(data, context); + contents = _json(data); const response: ImportKeyMaterialCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2770,10 +2721,9 @@ const de_ImportKeyMaterialCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2796,7 +2746,7 @@ export const de_ListAliasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2829,10 +2779,9 @@ const de_ListAliasesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2855,7 +2804,7 @@ export const de_ListGrantsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2894,10 +2843,9 @@ const de_ListGrantsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2915,12 +2863,12 @@ export const de_ListKeyPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListKeyPoliciesResponse(data, context); + contents = _json(data); const response: ListKeyPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2953,10 +2901,9 @@ const de_ListKeyPoliciesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2974,12 +2921,12 @@ export const de_ListKeysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListKeysResponse(data, context); + contents = _json(data); const response: ListKeysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3006,10 +2953,9 @@ const de_ListKeysCommandError = async ( throw await de_KMSInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3027,12 +2973,12 @@ export const de_ListResourceTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourceTagsResponse(data, context); + contents = _json(data); const response: ListResourceTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3062,10 +3008,9 @@ const de_ListResourceTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3088,7 +3033,7 @@ export const de_ListRetirableGrantsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3121,10 +3066,9 @@ const de_ListRetirableGrantsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3144,7 +3088,7 @@ export const de_PutKeyPolicyCommand = async ( const response: PutKeyPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3186,10 +3130,9 @@ const de_PutKeyPolicyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3212,7 +3155,7 @@ export const de_ReEncryptCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3260,10 +3203,9 @@ const de_ReEncryptCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3286,7 +3228,7 @@ export const de_ReplicateKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3334,10 +3276,9 @@ const de_ReplicateKeyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3357,7 +3298,7 @@ export const de_RetireGrantCommand = async ( const response: RetireGrantCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3396,10 +3337,9 @@ const de_RetireGrantCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3419,7 +3359,7 @@ export const de_RevokeGrantCommand = async ( const response: RevokeGrantCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3455,10 +3395,9 @@ const de_RevokeGrantCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3481,7 +3420,7 @@ export const de_ScheduleKeyDeletionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3514,10 +3453,9 @@ const de_ScheduleKeyDeletionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3537,7 +3475,7 @@ export const de_SignCommand = async (output: __HttpResponse, context: __SerdeCon $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3576,10 +3514,9 @@ const de_SignCommandError = async (output: __HttpResponse, context: __SerdeConte throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3599,7 +3536,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3635,10 +3572,9 @@ const de_TagResourceCommandError = async ( throw await de_TagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3658,7 +3594,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3691,10 +3627,9 @@ const de_UntagResourceCommandError = async ( throw await de_TagExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3714,7 +3649,7 @@ export const de_UpdateAliasCommand = async ( const response: UpdateAliasCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3747,10 +3682,9 @@ const de_UpdateAliasCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3768,12 +3702,12 @@ export const de_UpdateCustomKeyStoreCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCustomKeyStoreResponse(data, context); + contents = _json(data); const response: UpdateCustomKeyStoreCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3842,10 +3776,9 @@ const de_UpdateCustomKeyStoreCommandError = async ( throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3865,7 +3798,7 @@ export const de_UpdateKeyDescriptionCommand = async ( const response: UpdateKeyDescriptionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3898,10 +3831,9 @@ const de_UpdateKeyDescriptionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3921,7 +3853,7 @@ export const de_UpdatePrimaryRegionCommand = async ( const response: UpdatePrimaryRegionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3957,10 +3889,9 @@ const de_UpdatePrimaryRegionCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3978,12 +3909,12 @@ export const de_VerifyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VerifyResponse(data, context); + contents = _json(data); const response: VerifyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4025,10 +3956,9 @@ const de_VerifyCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4046,12 +3976,12 @@ export const de_VerifyMacCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_VerifyMacResponse(data, context); + contents = _json(data); const response: VerifyMacCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4093,10 +4023,9 @@ const de_VerifyMacCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4110,7 +4039,7 @@ const de_AlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4126,7 +4055,7 @@ const de_CloudHsmClusterInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmClusterInUseException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmClusterInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4142,7 +4071,7 @@ const de_CloudHsmClusterInvalidConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmClusterInvalidConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmClusterInvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4158,7 +4087,7 @@ const de_CloudHsmClusterNotActiveExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmClusterNotActiveException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmClusterNotActiveException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4174,7 +4103,7 @@ const de_CloudHsmClusterNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmClusterNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmClusterNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4190,7 +4119,7 @@ const de_CloudHsmClusterNotRelatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CloudHsmClusterNotRelatedException(body, context); + const deserialized: any = _json(body); const exception = new CloudHsmClusterNotRelatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4206,7 +4135,7 @@ const de_CustomKeyStoreHasCMKsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomKeyStoreHasCMKsException(body, context); + const deserialized: any = _json(body); const exception = new CustomKeyStoreHasCMKsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4222,7 +4151,7 @@ const de_CustomKeyStoreInvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomKeyStoreInvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new CustomKeyStoreInvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4238,7 +4167,7 @@ const de_CustomKeyStoreNameInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomKeyStoreNameInUseException(body, context); + const deserialized: any = _json(body); const exception = new CustomKeyStoreNameInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4254,7 +4183,7 @@ const de_CustomKeyStoreNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomKeyStoreNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new CustomKeyStoreNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4270,7 +4199,7 @@ const de_DependencyTimeoutExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DependencyTimeoutException(body, context); + const deserialized: any = _json(body); const exception = new DependencyTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4283,7 +4212,7 @@ const de_DependencyTimeoutExceptionRes = async ( */ const de_DisabledExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DisabledException(body, context); + const deserialized: any = _json(body); const exception = new DisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4299,7 +4228,7 @@ const de_ExpiredImportTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredImportTokenException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredImportTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4315,7 +4244,7 @@ const de_IncorrectKeyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncorrectKeyException(body, context); + const deserialized: any = _json(body); const exception = new IncorrectKeyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4331,7 +4260,7 @@ const de_IncorrectKeyMaterialExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncorrectKeyMaterialException(body, context); + const deserialized: any = _json(body); const exception = new IncorrectKeyMaterialException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4347,7 +4276,7 @@ const de_IncorrectTrustAnchorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncorrectTrustAnchorException(body, context); + const deserialized: any = _json(body); const exception = new IncorrectTrustAnchorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4363,7 +4292,7 @@ const de_InvalidAliasNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAliasNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAliasNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4376,7 +4305,7 @@ const de_InvalidAliasNameExceptionRes = async ( */ const de_InvalidArnExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArnException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArnException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4392,7 +4321,7 @@ const de_InvalidCiphertextExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCiphertextException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCiphertextException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4408,7 +4337,7 @@ const de_InvalidGrantIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGrantIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidGrantIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4424,7 +4353,7 @@ const de_InvalidGrantTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGrantTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidGrantTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4440,7 +4369,7 @@ const de_InvalidImportTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidImportTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidImportTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4456,7 +4385,7 @@ const de_InvalidKeyUsageExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKeyUsageException(body, context); + const deserialized: any = _json(body); const exception = new InvalidKeyUsageException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4472,7 +4401,7 @@ const de_InvalidMarkerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidMarkerException(body, context); + const deserialized: any = _json(body); const exception = new InvalidMarkerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4488,7 +4417,7 @@ const de_KeyUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KeyUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new KeyUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4504,7 +4433,7 @@ const de_KMSInternalExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSInternalException(body, context); + const deserialized: any = _json(body); const exception = new KMSInternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4520,7 +4449,7 @@ const de_KMSInvalidMacExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSInvalidMacException(body, context); + const deserialized: any = _json(body); const exception = new KMSInvalidMacException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4536,7 +4465,7 @@ const de_KMSInvalidSignatureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSInvalidSignatureException(body, context); + const deserialized: any = _json(body); const exception = new KMSInvalidSignatureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4552,7 +4481,7 @@ const de_KMSInvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSInvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new KMSInvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4568,7 +4497,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4584,7 +4513,7 @@ const de_MalformedPolicyDocumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedPolicyDocumentException(body, context); + const deserialized: any = _json(body); const exception = new MalformedPolicyDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4597,7 +4526,7 @@ const de_MalformedPolicyDocumentExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4610,7 +4539,7 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex */ const de_TagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagException(body, context); + const deserialized: any = _json(body); const exception = new TagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4626,7 +4555,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4642,7 +4571,7 @@ const de_XksKeyAlreadyInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksKeyAlreadyInUseException(body, context); + const deserialized: any = _json(body); const exception = new XksKeyAlreadyInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4658,7 +4587,7 @@ const de_XksKeyInvalidConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksKeyInvalidConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new XksKeyInvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4674,7 +4603,7 @@ const de_XksKeyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksKeyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new XksKeyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4690,7 +4619,7 @@ const de_XksProxyIncorrectAuthenticationCredentialExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyIncorrectAuthenticationCredentialException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyIncorrectAuthenticationCredentialException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4706,7 +4635,7 @@ const de_XksProxyInvalidConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyInvalidConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyInvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4722,7 +4651,7 @@ const de_XksProxyInvalidResponseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyInvalidResponseException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyInvalidResponseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4738,7 +4667,7 @@ const de_XksProxyUriEndpointInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyUriEndpointInUseException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyUriEndpointInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4754,7 +4683,7 @@ const de_XksProxyUriInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyUriInUseException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyUriInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4770,7 +4699,7 @@ const de_XksProxyUriUnreachableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyUriUnreachableException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyUriUnreachableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4786,7 +4715,7 @@ const de_XksProxyVpcEndpointServiceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyVpcEndpointServiceInUseException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyVpcEndpointServiceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4802,7 +4731,7 @@ const de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyVpcEndpointServiceInvalidConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyVpcEndpointServiceInvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4818,7 +4747,7 @@ const de_XksProxyVpcEndpointServiceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_XksProxyVpcEndpointServiceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new XksProxyVpcEndpointServiceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4826,1916 +4755,701 @@ const de_XksProxyVpcEndpointServiceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CancelKeyDeletionRequest - */ -const se_CancelKeyDeletionRequest = (input: CancelKeyDeletionRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_CancelKeyDeletionRequest omitted. -/** - * serializeAws_json1_1ConnectCustomKeyStoreRequest - */ -const se_ConnectCustomKeyStoreRequest = (input: ConnectCustomKeyStoreRequest, context: __SerdeContext): any => { - return { - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - }; -}; +// se_ConnectCustomKeyStoreRequest omitted. -/** - * serializeAws_json1_1CreateAliasRequest - */ -const se_CreateAliasRequest = (input: CreateAliasRequest, context: __SerdeContext): any => { - return { - ...(input.AliasName != null && { AliasName: input.AliasName }), - ...(input.TargetKeyId != null && { TargetKeyId: input.TargetKeyId }), - }; -}; +// se_CreateAliasRequest omitted. -/** - * serializeAws_json1_1CreateCustomKeyStoreRequest - */ -const se_CreateCustomKeyStoreRequest = (input: CreateCustomKeyStoreRequest, context: __SerdeContext): any => { - return { - ...(input.CloudHsmClusterId != null && { CloudHsmClusterId: input.CloudHsmClusterId }), - ...(input.CustomKeyStoreName != null && { CustomKeyStoreName: input.CustomKeyStoreName }), - ...(input.CustomKeyStoreType != null && { CustomKeyStoreType: input.CustomKeyStoreType }), - ...(input.KeyStorePassword != null && { KeyStorePassword: input.KeyStorePassword }), - ...(input.TrustAnchorCertificate != null && { TrustAnchorCertificate: input.TrustAnchorCertificate }), - ...(input.XksProxyAuthenticationCredential != null && { - XksProxyAuthenticationCredential: se_XksProxyAuthenticationCredentialType( - input.XksProxyAuthenticationCredential, - context - ), - }), - ...(input.XksProxyConnectivity != null && { XksProxyConnectivity: input.XksProxyConnectivity }), - ...(input.XksProxyUriEndpoint != null && { XksProxyUriEndpoint: input.XksProxyUriEndpoint }), - ...(input.XksProxyUriPath != null && { XksProxyUriPath: input.XksProxyUriPath }), - ...(input.XksProxyVpcEndpointServiceName != null && { - XksProxyVpcEndpointServiceName: input.XksProxyVpcEndpointServiceName, - }), - }; -}; +// se_CreateCustomKeyStoreRequest omitted. -/** - * serializeAws_json1_1CreateGrantRequest - */ -const se_CreateGrantRequest = (input: CreateGrantRequest, context: __SerdeContext): any => { - return { - ...(input.Constraints != null && { Constraints: se_GrantConstraints(input.Constraints, context) }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.GranteePrincipal != null && { GranteePrincipal: input.GranteePrincipal }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Operations != null && { Operations: se_GrantOperationList(input.Operations, context) }), - ...(input.RetiringPrincipal != null && { RetiringPrincipal: input.RetiringPrincipal }), - }; -}; +// se_CreateGrantRequest omitted. -/** - * serializeAws_json1_1CreateKeyRequest - */ -const se_CreateKeyRequest = (input: CreateKeyRequest, context: __SerdeContext): any => { - return { - ...(input.BypassPolicyLockoutSafetyCheck != null && { - BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck, - }), - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - ...(input.CustomerMasterKeySpec != null && { CustomerMasterKeySpec: input.CustomerMasterKeySpec }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KeySpec != null && { KeySpec: input.KeySpec }), - ...(input.KeyUsage != null && { KeyUsage: input.KeyUsage }), - ...(input.MultiRegion != null && { MultiRegion: input.MultiRegion }), - ...(input.Origin != null && { Origin: input.Origin }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.XksKeyId != null && { XksKeyId: input.XksKeyId }), - }; -}; +// se_CreateKeyRequest omitted. /** * serializeAws_json1_1DecryptRequest */ const se_DecryptRequest = (input: DecryptRequest, context: __SerdeContext): any => { - return { - ...(input.CiphertextBlob != null && { CiphertextBlob: context.base64Encoder(input.CiphertextBlob) }), - ...(input.EncryptionAlgorithm != null && { EncryptionAlgorithm: input.EncryptionAlgorithm }), - ...(input.EncryptionContext != null && { - EncryptionContext: se_EncryptionContextType(input.EncryptionContext, context), - }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; + return take(input, { + CiphertextBlob: context.base64Encoder, + EncryptionAlgorithm: [], + EncryptionContext: _json, + GrantTokens: _json, + KeyId: [], + }); }; -/** - * serializeAws_json1_1DeleteAliasRequest - */ -const se_DeleteAliasRequest = (input: DeleteAliasRequest, context: __SerdeContext): any => { - return { - ...(input.AliasName != null && { AliasName: input.AliasName }), - }; -}; +// se_DeleteAliasRequest omitted. -/** - * serializeAws_json1_1DeleteCustomKeyStoreRequest - */ -const se_DeleteCustomKeyStoreRequest = (input: DeleteCustomKeyStoreRequest, context: __SerdeContext): any => { - return { - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - }; -}; +// se_DeleteCustomKeyStoreRequest omitted. -/** - * serializeAws_json1_1DeleteImportedKeyMaterialRequest - */ -const se_DeleteImportedKeyMaterialRequest = (input: DeleteImportedKeyMaterialRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_DeleteImportedKeyMaterialRequest omitted. -/** - * serializeAws_json1_1DescribeCustomKeyStoresRequest - */ -const se_DescribeCustomKeyStoresRequest = (input: DescribeCustomKeyStoresRequest, context: __SerdeContext): any => { - return { - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - ...(input.CustomKeyStoreName != null && { CustomKeyStoreName: input.CustomKeyStoreName }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_DescribeCustomKeyStoresRequest omitted. -/** - * serializeAws_json1_1DescribeKeyRequest - */ -const se_DescribeKeyRequest = (input: DescribeKeyRequest, context: __SerdeContext): any => { - return { - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_DescribeKeyRequest omitted. -/** - * serializeAws_json1_1DisableKeyRequest - */ -const se_DisableKeyRequest = (input: DisableKeyRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_DisableKeyRequest omitted. -/** - * serializeAws_json1_1DisableKeyRotationRequest - */ -const se_DisableKeyRotationRequest = (input: DisableKeyRotationRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_DisableKeyRotationRequest omitted. -/** - * serializeAws_json1_1DisconnectCustomKeyStoreRequest - */ -const se_DisconnectCustomKeyStoreRequest = (input: DisconnectCustomKeyStoreRequest, context: __SerdeContext): any => { - return { - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - }; -}; +// se_DisconnectCustomKeyStoreRequest omitted. -/** - * serializeAws_json1_1EnableKeyRequest - */ -const se_EnableKeyRequest = (input: EnableKeyRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_EnableKeyRequest omitted. -/** - * serializeAws_json1_1EnableKeyRotationRequest - */ -const se_EnableKeyRotationRequest = (input: EnableKeyRotationRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_EnableKeyRotationRequest omitted. -/** - * serializeAws_json1_1EncryptionContextType - */ -const se_EncryptionContextType = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EncryptionContextType omitted. /** * serializeAws_json1_1EncryptRequest */ const se_EncryptRequest = (input: EncryptRequest, context: __SerdeContext): any => { - return { - ...(input.EncryptionAlgorithm != null && { EncryptionAlgorithm: input.EncryptionAlgorithm }), - ...(input.EncryptionContext != null && { - EncryptionContext: se_EncryptionContextType(input.EncryptionContext, context), - }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Plaintext != null && { Plaintext: context.base64Encoder(input.Plaintext) }), - }; -}; - -/** - * serializeAws_json1_1GenerateDataKeyPairRequest - */ -const se_GenerateDataKeyPairRequest = (input: GenerateDataKeyPairRequest, context: __SerdeContext): any => { - return { - ...(input.EncryptionContext != null && { - EncryptionContext: se_EncryptionContextType(input.EncryptionContext, context), - }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.KeyPairSpec != null && { KeyPairSpec: input.KeyPairSpec }), - }; -}; - -/** - * serializeAws_json1_1GenerateDataKeyPairWithoutPlaintextRequest - */ -const se_GenerateDataKeyPairWithoutPlaintextRequest = ( - input: GenerateDataKeyPairWithoutPlaintextRequest, - context: __SerdeContext -): any => { - return { - ...(input.EncryptionContext != null && { - EncryptionContext: se_EncryptionContextType(input.EncryptionContext, context), - }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.KeyPairSpec != null && { KeyPairSpec: input.KeyPairSpec }), - }; -}; - -/** - * serializeAws_json1_1GenerateDataKeyRequest - */ -const se_GenerateDataKeyRequest = (input: GenerateDataKeyRequest, context: __SerdeContext): any => { - return { - ...(input.EncryptionContext != null && { - EncryptionContext: se_EncryptionContextType(input.EncryptionContext, context), - }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.KeySpec != null && { KeySpec: input.KeySpec }), - ...(input.NumberOfBytes != null && { NumberOfBytes: input.NumberOfBytes }), - }; -}; - -/** - * serializeAws_json1_1GenerateDataKeyWithoutPlaintextRequest - */ -const se_GenerateDataKeyWithoutPlaintextRequest = ( - input: GenerateDataKeyWithoutPlaintextRequest, - context: __SerdeContext -): any => { - return { - ...(input.EncryptionContext != null && { - EncryptionContext: se_EncryptionContextType(input.EncryptionContext, context), - }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.KeySpec != null && { KeySpec: input.KeySpec }), - ...(input.NumberOfBytes != null && { NumberOfBytes: input.NumberOfBytes }), - }; -}; - -/** - * serializeAws_json1_1GenerateMacRequest - */ -const se_GenerateMacRequest = (input: GenerateMacRequest, context: __SerdeContext): any => { - return { - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.MacAlgorithm != null && { MacAlgorithm: input.MacAlgorithm }), - ...(input.Message != null && { Message: context.base64Encoder(input.Message) }), - }; -}; - -/** - * serializeAws_json1_1GenerateRandomRequest - */ -const se_GenerateRandomRequest = (input: GenerateRandomRequest, context: __SerdeContext): any => { - return { - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - ...(input.NumberOfBytes != null && { NumberOfBytes: input.NumberOfBytes }), - }; -}; - -/** - * serializeAws_json1_1GetKeyPolicyRequest - */ -const se_GetKeyPolicyRequest = (input: GetKeyPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_json1_1GetKeyRotationStatusRequest - */ -const se_GetKeyRotationStatusRequest = (input: GetKeyRotationStatusRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; - -/** - * serializeAws_json1_1GetParametersForImportRequest - */ -const se_GetParametersForImportRequest = (input: GetParametersForImportRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.WrappingAlgorithm != null && { WrappingAlgorithm: input.WrappingAlgorithm }), - ...(input.WrappingKeySpec != null && { WrappingKeySpec: input.WrappingKeySpec }), - }; -}; - -/** - * serializeAws_json1_1GetPublicKeyRequest - */ -const se_GetPublicKeyRequest = (input: GetPublicKeyRequest, context: __SerdeContext): any => { - return { - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; - -/** - * serializeAws_json1_1GrantConstraints - */ -const se_GrantConstraints = (input: GrantConstraints, context: __SerdeContext): any => { - return { - ...(input.EncryptionContextEquals != null && { - EncryptionContextEquals: se_EncryptionContextType(input.EncryptionContextEquals, context), - }), - ...(input.EncryptionContextSubset != null && { - EncryptionContextSubset: se_EncryptionContextType(input.EncryptionContextSubset, context), - }), - }; -}; - -/** - * serializeAws_json1_1GrantOperationList - */ -const se_GrantOperationList = (input: (GrantOperation | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1GrantTokenList - */ -const se_GrantTokenList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ImportKeyMaterialRequest - */ -const se_ImportKeyMaterialRequest = (input: ImportKeyMaterialRequest, context: __SerdeContext): any => { - return { - ...(input.EncryptedKeyMaterial != null && { - EncryptedKeyMaterial: context.base64Encoder(input.EncryptedKeyMaterial), - }), - ...(input.ExpirationModel != null && { ExpirationModel: input.ExpirationModel }), - ...(input.ImportToken != null && { ImportToken: context.base64Encoder(input.ImportToken) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.ValidTo != null && { ValidTo: Math.round(input.ValidTo.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1ListAliasesRequest - */ -const se_ListAliasesRequest = (input: ListAliasesRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; - -/** - * serializeAws_json1_1ListGrantsRequest - */ -const se_ListGrantsRequest = (input: ListGrantsRequest, context: __SerdeContext): any => { - return { - ...(input.GrantId != null && { GrantId: input.GrantId }), - ...(input.GranteePrincipal != null && { GranteePrincipal: input.GranteePrincipal }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; - -/** - * serializeAws_json1_1ListKeyPoliciesRequest - */ -const se_ListKeyPoliciesRequest = (input: ListKeyPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; - -/** - * serializeAws_json1_1ListKeysRequest - */ -const se_ListKeysRequest = (input: ListKeysRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; - -/** - * serializeAws_json1_1ListResourceTagsRequest - */ -const se_ListResourceTagsRequest = (input: ListResourceTagsRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; - -/** - * serializeAws_json1_1ListRetirableGrantsRequest - */ -const se_ListRetirableGrantsRequest = (input: ListRetirableGrantsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.RetiringPrincipal != null && { RetiringPrincipal: input.RetiringPrincipal }), - }; -}; - -/** - * serializeAws_json1_1PutKeyPolicyRequest - */ -const se_PutKeyPolicyRequest = (input: PutKeyPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.BypassPolicyLockoutSafetyCheck != null && { - BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck, - }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_json1_1ReEncryptRequest - */ -const se_ReEncryptRequest = (input: ReEncryptRequest, context: __SerdeContext): any => { - return { - ...(input.CiphertextBlob != null && { CiphertextBlob: context.base64Encoder(input.CiphertextBlob) }), - ...(input.DestinationEncryptionAlgorithm != null && { - DestinationEncryptionAlgorithm: input.DestinationEncryptionAlgorithm, - }), - ...(input.DestinationEncryptionContext != null && { - DestinationEncryptionContext: se_EncryptionContextType(input.DestinationEncryptionContext, context), - }), - ...(input.DestinationKeyId != null && { DestinationKeyId: input.DestinationKeyId }), - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.SourceEncryptionAlgorithm != null && { SourceEncryptionAlgorithm: input.SourceEncryptionAlgorithm }), - ...(input.SourceEncryptionContext != null && { - SourceEncryptionContext: se_EncryptionContextType(input.SourceEncryptionContext, context), - }), - ...(input.SourceKeyId != null && { SourceKeyId: input.SourceKeyId }), - }; -}; - -/** - * serializeAws_json1_1ReplicateKeyRequest - */ -const se_ReplicateKeyRequest = (input: ReplicateKeyRequest, context: __SerdeContext): any => { - return { - ...(input.BypassPolicyLockoutSafetyCheck != null && { - BypassPolicyLockoutSafetyCheck: input.BypassPolicyLockoutSafetyCheck, - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ReplicaRegion != null && { ReplicaRegion: input.ReplicaRegion }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1RetireGrantRequest - */ -const se_RetireGrantRequest = (input: RetireGrantRequest, context: __SerdeContext): any => { - return { - ...(input.GrantId != null && { GrantId: input.GrantId }), - ...(input.GrantToken != null && { GrantToken: input.GrantToken }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; + return take(input, { + EncryptionAlgorithm: [], + EncryptionContext: _json, + GrantTokens: _json, + KeyId: [], + Plaintext: context.base64Encoder, + }); }; -/** - * serializeAws_json1_1RevokeGrantRequest - */ -const se_RevokeGrantRequest = (input: RevokeGrantRequest, context: __SerdeContext): any => { - return { - ...(input.GrantId != null && { GrantId: input.GrantId }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; +// se_GenerateDataKeyPairRequest omitted. -/** - * serializeAws_json1_1ScheduleKeyDeletionRequest - */ -const se_ScheduleKeyDeletionRequest = (input: ScheduleKeyDeletionRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.PendingWindowInDays != null && { PendingWindowInDays: input.PendingWindowInDays }), - }; -}; +// se_GenerateDataKeyPairWithoutPlaintextRequest omitted. -/** - * serializeAws_json1_1SignRequest - */ -const se_SignRequest = (input: SignRequest, context: __SerdeContext): any => { - return { - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Message != null && { Message: context.base64Encoder(input.Message) }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValue != null && { TagValue: input.TagValue }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAliasRequest - */ -const se_UpdateAliasRequest = (input: UpdateAliasRequest, context: __SerdeContext): any => { - return { - ...(input.AliasName != null && { AliasName: input.AliasName }), - ...(input.TargetKeyId != null && { TargetKeyId: input.TargetKeyId }), - }; -}; - -/** - * serializeAws_json1_1UpdateCustomKeyStoreRequest - */ -const se_UpdateCustomKeyStoreRequest = (input: UpdateCustomKeyStoreRequest, context: __SerdeContext): any => { - return { - ...(input.CloudHsmClusterId != null && { CloudHsmClusterId: input.CloudHsmClusterId }), - ...(input.CustomKeyStoreId != null && { CustomKeyStoreId: input.CustomKeyStoreId }), - ...(input.KeyStorePassword != null && { KeyStorePassword: input.KeyStorePassword }), - ...(input.NewCustomKeyStoreName != null && { NewCustomKeyStoreName: input.NewCustomKeyStoreName }), - ...(input.XksProxyAuthenticationCredential != null && { - XksProxyAuthenticationCredential: se_XksProxyAuthenticationCredentialType( - input.XksProxyAuthenticationCredential, - context - ), - }), - ...(input.XksProxyConnectivity != null && { XksProxyConnectivity: input.XksProxyConnectivity }), - ...(input.XksProxyUriEndpoint != null && { XksProxyUriEndpoint: input.XksProxyUriEndpoint }), - ...(input.XksProxyUriPath != null && { XksProxyUriPath: input.XksProxyUriPath }), - ...(input.XksProxyVpcEndpointServiceName != null && { - XksProxyVpcEndpointServiceName: input.XksProxyVpcEndpointServiceName, - }), - }; -}; - -/** - * serializeAws_json1_1UpdateKeyDescriptionRequest - */ -const se_UpdateKeyDescriptionRequest = (input: UpdateKeyDescriptionRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; - -/** - * serializeAws_json1_1UpdatePrimaryRegionRequest - */ -const se_UpdatePrimaryRegionRequest = (input: UpdatePrimaryRegionRequest, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.PrimaryRegion != null && { PrimaryRegion: input.PrimaryRegion }), - }; -}; - -/** - * serializeAws_json1_1VerifyMacRequest - */ -const se_VerifyMacRequest = (input: VerifyMacRequest, context: __SerdeContext): any => { - return { - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Mac != null && { Mac: context.base64Encoder(input.Mac) }), - ...(input.MacAlgorithm != null && { MacAlgorithm: input.MacAlgorithm }), - ...(input.Message != null && { Message: context.base64Encoder(input.Message) }), - }; -}; - -/** - * serializeAws_json1_1VerifyRequest - */ -const se_VerifyRequest = (input: VerifyRequest, context: __SerdeContext): any => { - return { - ...(input.GrantTokens != null && { GrantTokens: se_GrantTokenList(input.GrantTokens, context) }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Message != null && { Message: context.base64Encoder(input.Message) }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.Signature != null && { Signature: context.base64Encoder(input.Signature) }), - ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }), - }; -}; - -/** - * serializeAws_json1_1XksProxyAuthenticationCredentialType - */ -const se_XksProxyAuthenticationCredentialType = ( - input: XksProxyAuthenticationCredentialType, - context: __SerdeContext -): any => { - return { - ...(input.AccessKeyId != null && { AccessKeyId: input.AccessKeyId }), - ...(input.RawSecretAccessKey != null && { RawSecretAccessKey: input.RawSecretAccessKey }), - }; -}; - -/** - * deserializeAws_json1_1AliasList - */ -const de_AliasList = (output: any, context: __SerdeContext): AliasListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AliasListEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AliasListEntry - */ -const de_AliasListEntry = (output: any, context: __SerdeContext): AliasListEntry => { - return { - AliasArn: __expectString(output.AliasArn), - AliasName: __expectString(output.AliasName), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - LastUpdatedDate: - output.LastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDate))) - : undefined, - TargetKeyId: __expectString(output.TargetKeyId), - } as any; -}; - -/** - * deserializeAws_json1_1AlreadyExistsException - */ -const de_AlreadyExistsException = (output: any, context: __SerdeContext): AlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CancelKeyDeletionResponse - */ -const de_CancelKeyDeletionResponse = (output: any, context: __SerdeContext): CancelKeyDeletionResponse => { - return { - KeyId: __expectString(output.KeyId), - } as any; -}; - -/** - * deserializeAws_json1_1CloudHsmClusterInUseException - */ -const de_CloudHsmClusterInUseException = (output: any, context: __SerdeContext): CloudHsmClusterInUseException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudHsmClusterInvalidConfigurationException - */ -const de_CloudHsmClusterInvalidConfigurationException = ( - output: any, - context: __SerdeContext -): CloudHsmClusterInvalidConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudHsmClusterNotActiveException - */ -const de_CloudHsmClusterNotActiveException = ( - output: any, - context: __SerdeContext -): CloudHsmClusterNotActiveException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudHsmClusterNotFoundException - */ -const de_CloudHsmClusterNotFoundException = ( - output: any, - context: __SerdeContext -): CloudHsmClusterNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CloudHsmClusterNotRelatedException - */ -const de_CloudHsmClusterNotRelatedException = ( - output: any, - context: __SerdeContext -): CloudHsmClusterNotRelatedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectCustomKeyStoreResponse - */ -const de_ConnectCustomKeyStoreResponse = (output: any, context: __SerdeContext): ConnectCustomKeyStoreResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateCustomKeyStoreResponse - */ -const de_CreateCustomKeyStoreResponse = (output: any, context: __SerdeContext): CreateCustomKeyStoreResponse => { - return { - CustomKeyStoreId: __expectString(output.CustomKeyStoreId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateGrantResponse - */ -const de_CreateGrantResponse = (output: any, context: __SerdeContext): CreateGrantResponse => { - return { - GrantId: __expectString(output.GrantId), - GrantToken: __expectString(output.GrantToken), - } as any; -}; - -/** - * deserializeAws_json1_1CreateKeyResponse - */ -const de_CreateKeyResponse = (output: any, context: __SerdeContext): CreateKeyResponse => { - return { - KeyMetadata: output.KeyMetadata != null ? de_KeyMetadata(output.KeyMetadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomKeyStoreHasCMKsException - */ -const de_CustomKeyStoreHasCMKsException = (output: any, context: __SerdeContext): CustomKeyStoreHasCMKsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CustomKeyStoreInvalidStateException - */ -const de_CustomKeyStoreInvalidStateException = ( - output: any, - context: __SerdeContext -): CustomKeyStoreInvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CustomKeyStoreNameInUseException - */ -const de_CustomKeyStoreNameInUseException = ( - output: any, - context: __SerdeContext -): CustomKeyStoreNameInUseException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CustomKeyStoreNotFoundException - */ -const de_CustomKeyStoreNotFoundException = (output: any, context: __SerdeContext): CustomKeyStoreNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1CustomKeyStoresList - */ -const de_CustomKeyStoresList = (output: any, context: __SerdeContext): CustomKeyStoresListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomKeyStoresListEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomKeyStoresListEntry - */ -const de_CustomKeyStoresListEntry = (output: any, context: __SerdeContext): CustomKeyStoresListEntry => { - return { - CloudHsmClusterId: __expectString(output.CloudHsmClusterId), - ConnectionErrorCode: __expectString(output.ConnectionErrorCode), - ConnectionState: __expectString(output.ConnectionState), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - CustomKeyStoreId: __expectString(output.CustomKeyStoreId), - CustomKeyStoreName: __expectString(output.CustomKeyStoreName), - CustomKeyStoreType: __expectString(output.CustomKeyStoreType), - TrustAnchorCertificate: __expectString(output.TrustAnchorCertificate), - XksProxyConfiguration: - output.XksProxyConfiguration != null - ? de_XksProxyConfigurationType(output.XksProxyConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DecryptResponse - */ -const de_DecryptResponse = (output: any, context: __SerdeContext): DecryptResponse => { - return { - EncryptionAlgorithm: __expectString(output.EncryptionAlgorithm), - KeyId: __expectString(output.KeyId), - Plaintext: output.Plaintext != null ? context.base64Decoder(output.Plaintext) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteCustomKeyStoreResponse - */ -const de_DeleteCustomKeyStoreResponse = (output: any, context: __SerdeContext): DeleteCustomKeyStoreResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DependencyTimeoutException - */ -const de_DependencyTimeoutException = (output: any, context: __SerdeContext): DependencyTimeoutException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCustomKeyStoresResponse - */ -const de_DescribeCustomKeyStoresResponse = (output: any, context: __SerdeContext): DescribeCustomKeyStoresResponse => { - return { - CustomKeyStores: - output.CustomKeyStores != null ? de_CustomKeyStoresList(output.CustomKeyStores, context) : undefined, - NextMarker: __expectString(output.NextMarker), - Truncated: __expectBoolean(output.Truncated), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeKeyResponse - */ -const de_DescribeKeyResponse = (output: any, context: __SerdeContext): DescribeKeyResponse => { - return { - KeyMetadata: output.KeyMetadata != null ? de_KeyMetadata(output.KeyMetadata, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisabledException - */ -const de_DisabledException = (output: any, context: __SerdeContext): DisabledException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1DisconnectCustomKeyStoreResponse - */ -const de_DisconnectCustomKeyStoreResponse = ( - output: any, - context: __SerdeContext -): DisconnectCustomKeyStoreResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1EncryptionAlgorithmSpecList - */ -const de_EncryptionAlgorithmSpecList = (output: any, context: __SerdeContext): (EncryptionAlgorithmSpec | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EncryptionContextType - */ -const de_EncryptionContextType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1EncryptResponse - */ -const de_EncryptResponse = (output: any, context: __SerdeContext): EncryptResponse => { - return { - CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined, - EncryptionAlgorithm: __expectString(output.EncryptionAlgorithm), - KeyId: __expectString(output.KeyId), - } as any; -}; - -/** - * deserializeAws_json1_1ExpiredImportTokenException - */ -const de_ExpiredImportTokenException = (output: any, context: __SerdeContext): ExpiredImportTokenException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1GenerateDataKeyPairResponse - */ -const de_GenerateDataKeyPairResponse = (output: any, context: __SerdeContext): GenerateDataKeyPairResponse => { - return { - KeyId: __expectString(output.KeyId), - KeyPairSpec: __expectString(output.KeyPairSpec), - PrivateKeyCiphertextBlob: - output.PrivateKeyCiphertextBlob != null ? context.base64Decoder(output.PrivateKeyCiphertextBlob) : undefined, - PrivateKeyPlaintext: - output.PrivateKeyPlaintext != null ? context.base64Decoder(output.PrivateKeyPlaintext) : undefined, - PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GenerateDataKeyPairWithoutPlaintextResponse - */ -const de_GenerateDataKeyPairWithoutPlaintextResponse = ( - output: any, - context: __SerdeContext -): GenerateDataKeyPairWithoutPlaintextResponse => { - return { - KeyId: __expectString(output.KeyId), - KeyPairSpec: __expectString(output.KeyPairSpec), - PrivateKeyCiphertextBlob: - output.PrivateKeyCiphertextBlob != null ? context.base64Decoder(output.PrivateKeyCiphertextBlob) : undefined, - PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GenerateDataKeyResponse - */ -const de_GenerateDataKeyResponse = (output: any, context: __SerdeContext): GenerateDataKeyResponse => { - return { - CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined, - KeyId: __expectString(output.KeyId), - Plaintext: output.Plaintext != null ? context.base64Decoder(output.Plaintext) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GenerateDataKeyWithoutPlaintextResponse - */ -const de_GenerateDataKeyWithoutPlaintextResponse = ( - output: any, - context: __SerdeContext -): GenerateDataKeyWithoutPlaintextResponse => { - return { - CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined, - KeyId: __expectString(output.KeyId), - } as any; -}; - -/** - * deserializeAws_json1_1GenerateMacResponse - */ -const de_GenerateMacResponse = (output: any, context: __SerdeContext): GenerateMacResponse => { - return { - KeyId: __expectString(output.KeyId), - Mac: output.Mac != null ? context.base64Decoder(output.Mac) : undefined, - MacAlgorithm: __expectString(output.MacAlgorithm), - } as any; -}; - -/** - * deserializeAws_json1_1GenerateRandomResponse - */ -const de_GenerateRandomResponse = (output: any, context: __SerdeContext): GenerateRandomResponse => { - return { - Plaintext: output.Plaintext != null ? context.base64Decoder(output.Plaintext) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetKeyPolicyResponse - */ -const de_GetKeyPolicyResponse = (output: any, context: __SerdeContext): GetKeyPolicyResponse => { - return { - Policy: __expectString(output.Policy), - } as any; -}; - -/** - * deserializeAws_json1_1GetKeyRotationStatusResponse - */ -const de_GetKeyRotationStatusResponse = (output: any, context: __SerdeContext): GetKeyRotationStatusResponse => { - return { - KeyRotationEnabled: __expectBoolean(output.KeyRotationEnabled), - } as any; -}; - -/** - * deserializeAws_json1_1GetParametersForImportResponse - */ -const de_GetParametersForImportResponse = (output: any, context: __SerdeContext): GetParametersForImportResponse => { - return { - ImportToken: output.ImportToken != null ? context.base64Decoder(output.ImportToken) : undefined, - KeyId: __expectString(output.KeyId), - ParametersValidTo: - output.ParametersValidTo != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ParametersValidTo))) - : undefined, - PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPublicKeyResponse - */ -const de_GetPublicKeyResponse = (output: any, context: __SerdeContext): GetPublicKeyResponse => { - return { - CustomerMasterKeySpec: __expectString(output.CustomerMasterKeySpec), - EncryptionAlgorithms: - output.EncryptionAlgorithms != null - ? de_EncryptionAlgorithmSpecList(output.EncryptionAlgorithms, context) - : undefined, - KeyId: __expectString(output.KeyId), - KeySpec: __expectString(output.KeySpec), - KeyUsage: __expectString(output.KeyUsage), - PublicKey: output.PublicKey != null ? context.base64Decoder(output.PublicKey) : undefined, - SigningAlgorithms: - output.SigningAlgorithms != null ? de_SigningAlgorithmSpecList(output.SigningAlgorithms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GrantConstraints - */ -const de_GrantConstraints = (output: any, context: __SerdeContext): GrantConstraints => { - return { - EncryptionContextEquals: - output.EncryptionContextEquals != null - ? de_EncryptionContextType(output.EncryptionContextEquals, context) - : undefined, - EncryptionContextSubset: - output.EncryptionContextSubset != null - ? de_EncryptionContextType(output.EncryptionContextSubset, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GrantList - */ -const de_GrantList = (output: any, context: __SerdeContext): GrantListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GrantListEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GrantListEntry - */ -const de_GrantListEntry = (output: any, context: __SerdeContext): GrantListEntry => { - return { - Constraints: output.Constraints != null ? de_GrantConstraints(output.Constraints, context) : undefined, - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - GrantId: __expectString(output.GrantId), - GranteePrincipal: __expectString(output.GranteePrincipal), - IssuingAccount: __expectString(output.IssuingAccount), - KeyId: __expectString(output.KeyId), - Name: __expectString(output.Name), - Operations: output.Operations != null ? de_GrantOperationList(output.Operations, context) : undefined, - RetiringPrincipal: __expectString(output.RetiringPrincipal), - } as any; -}; - -/** - * deserializeAws_json1_1GrantOperationList - */ -const de_GrantOperationList = (output: any, context: __SerdeContext): (GrantOperation | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ImportKeyMaterialResponse - */ -const de_ImportKeyMaterialResponse = (output: any, context: __SerdeContext): ImportKeyMaterialResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1IncorrectKeyException - */ -const de_IncorrectKeyException = (output: any, context: __SerdeContext): IncorrectKeyException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1IncorrectKeyMaterialException - */ -const de_IncorrectKeyMaterialException = (output: any, context: __SerdeContext): IncorrectKeyMaterialException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1IncorrectTrustAnchorException - */ -const de_IncorrectTrustAnchorException = (output: any, context: __SerdeContext): IncorrectTrustAnchorException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidAliasNameException - */ -const de_InvalidAliasNameException = (output: any, context: __SerdeContext): InvalidAliasNameException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidArnException - */ -const de_InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCiphertextException - */ -const de_InvalidCiphertextException = (output: any, context: __SerdeContext): InvalidCiphertextException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidGrantIdException - */ -const de_InvalidGrantIdException = (output: any, context: __SerdeContext): InvalidGrantIdException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidGrantTokenException - */ -const de_InvalidGrantTokenException = (output: any, context: __SerdeContext): InvalidGrantTokenException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidImportTokenException - */ -const de_InvalidImportTokenException = (output: any, context: __SerdeContext): InvalidImportTokenException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidKeyUsageException - */ -const de_InvalidKeyUsageException = (output: any, context: __SerdeContext): InvalidKeyUsageException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidMarkerException - */ -const de_InvalidMarkerException = (output: any, context: __SerdeContext): InvalidMarkerException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1KeyList - */ -const de_KeyList = (output: any, context: __SerdeContext): KeyListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyListEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1KeyListEntry - */ -const de_KeyListEntry = (output: any, context: __SerdeContext): KeyListEntry => { - return { - KeyArn: __expectString(output.KeyArn), - KeyId: __expectString(output.KeyId), - } as any; -}; - -/** - * deserializeAws_json1_1KeyMetadata - */ -const de_KeyMetadata = (output: any, context: __SerdeContext): KeyMetadata => { - return { - AWSAccountId: __expectString(output.AWSAccountId), - Arn: __expectString(output.Arn), - CloudHsmClusterId: __expectString(output.CloudHsmClusterId), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - CustomKeyStoreId: __expectString(output.CustomKeyStoreId), - CustomerMasterKeySpec: __expectString(output.CustomerMasterKeySpec), - DeletionDate: - output.DeletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletionDate))) - : undefined, - Description: __expectString(output.Description), - Enabled: __expectBoolean(output.Enabled), - EncryptionAlgorithms: - output.EncryptionAlgorithms != null - ? de_EncryptionAlgorithmSpecList(output.EncryptionAlgorithms, context) - : undefined, - ExpirationModel: __expectString(output.ExpirationModel), - KeyId: __expectString(output.KeyId), - KeyManager: __expectString(output.KeyManager), - KeySpec: __expectString(output.KeySpec), - KeyState: __expectString(output.KeyState), - KeyUsage: __expectString(output.KeyUsage), - MacAlgorithms: output.MacAlgorithms != null ? de_MacAlgorithmSpecList(output.MacAlgorithms, context) : undefined, - MultiRegion: __expectBoolean(output.MultiRegion), - MultiRegionConfiguration: - output.MultiRegionConfiguration != null - ? de_MultiRegionConfiguration(output.MultiRegionConfiguration, context) - : undefined, - Origin: __expectString(output.Origin), - PendingDeletionWindowInDays: __expectInt32(output.PendingDeletionWindowInDays), - SigningAlgorithms: - output.SigningAlgorithms != null ? de_SigningAlgorithmSpecList(output.SigningAlgorithms, context) : undefined, - ValidTo: - output.ValidTo != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ValidTo))) : undefined, - XksKeyConfiguration: - output.XksKeyConfiguration != null ? de_XksKeyConfigurationType(output.XksKeyConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1KeyUnavailableException - */ -const de_KeyUnavailableException = (output: any, context: __SerdeContext): KeyUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1KMSInternalException - */ -const de_KMSInternalException = (output: any, context: __SerdeContext): KMSInternalException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1KMSInvalidMacException - */ -const de_KMSInvalidMacException = (output: any, context: __SerdeContext): KMSInvalidMacException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1KMSInvalidSignatureException - */ -const de_KMSInvalidSignatureException = (output: any, context: __SerdeContext): KMSInvalidSignatureException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1KMSInvalidStateException - */ -const de_KMSInvalidStateException = (output: any, context: __SerdeContext): KMSInvalidStateException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ListAliasesResponse - */ -const de_ListAliasesResponse = (output: any, context: __SerdeContext): ListAliasesResponse => { - return { - Aliases: output.Aliases != null ? de_AliasList(output.Aliases, context) : undefined, - NextMarker: __expectString(output.NextMarker), - Truncated: __expectBoolean(output.Truncated), - } as any; -}; - -/** - * deserializeAws_json1_1ListGrantsResponse - */ -const de_ListGrantsResponse = (output: any, context: __SerdeContext): ListGrantsResponse => { - return { - Grants: output.Grants != null ? de_GrantList(output.Grants, context) : undefined, - NextMarker: __expectString(output.NextMarker), - Truncated: __expectBoolean(output.Truncated), - } as any; -}; - -/** - * deserializeAws_json1_1ListKeyPoliciesResponse - */ -const de_ListKeyPoliciesResponse = (output: any, context: __SerdeContext): ListKeyPoliciesResponse => { - return { - NextMarker: __expectString(output.NextMarker), - PolicyNames: output.PolicyNames != null ? de_PolicyNameList(output.PolicyNames, context) : undefined, - Truncated: __expectBoolean(output.Truncated), - } as any; -}; - -/** - * deserializeAws_json1_1ListKeysResponse - */ -const de_ListKeysResponse = (output: any, context: __SerdeContext): ListKeysResponse => { - return { - Keys: output.Keys != null ? de_KeyList(output.Keys, context) : undefined, - NextMarker: __expectString(output.NextMarker), - Truncated: __expectBoolean(output.Truncated), - } as any; -}; - -/** - * deserializeAws_json1_1ListResourceTagsResponse - */ -const de_ListResourceTagsResponse = (output: any, context: __SerdeContext): ListResourceTagsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Truncated: __expectBoolean(output.Truncated), - } as any; -}; +// se_GenerateDataKeyRequest omitted. + +// se_GenerateDataKeyWithoutPlaintextRequest omitted. /** - * deserializeAws_json1_1MacAlgorithmSpecList + * serializeAws_json1_1GenerateMacRequest */ -const de_MacAlgorithmSpecList = (output: any, context: __SerdeContext): (MacAlgorithmSpec | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_GenerateMacRequest = (input: GenerateMacRequest, context: __SerdeContext): any => { + return take(input, { + GrantTokens: _json, + KeyId: [], + MacAlgorithm: [], + Message: context.base64Encoder, + }); }; +// se_GenerateRandomRequest omitted. + +// se_GetKeyPolicyRequest omitted. + +// se_GetKeyRotationStatusRequest omitted. + +// se_GetParametersForImportRequest omitted. + +// se_GetPublicKeyRequest omitted. + +// se_GrantConstraints omitted. + +// se_GrantOperationList omitted. + +// se_GrantTokenList omitted. + /** - * deserializeAws_json1_1MalformedPolicyDocumentException + * serializeAws_json1_1ImportKeyMaterialRequest */ -const de_MalformedPolicyDocumentException = ( - output: any, - context: __SerdeContext -): MalformedPolicyDocumentException => { - return { - message: __expectString(output.message), - } as any; +const se_ImportKeyMaterialRequest = (input: ImportKeyMaterialRequest, context: __SerdeContext): any => { + return take(input, { + EncryptedKeyMaterial: context.base64Encoder, + ExpirationModel: [], + ImportToken: context.base64Encoder, + KeyId: [], + ValidTo: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_ListAliasesRequest omitted. + +// se_ListGrantsRequest omitted. + +// se_ListKeyPoliciesRequest omitted. + +// se_ListKeysRequest omitted. + +// se_ListResourceTagsRequest omitted. + +// se_ListRetirableGrantsRequest omitted. + +// se_PutKeyPolicyRequest omitted. + /** - * deserializeAws_json1_1MultiRegionConfiguration + * serializeAws_json1_1ReEncryptRequest */ -const de_MultiRegionConfiguration = (output: any, context: __SerdeContext): MultiRegionConfiguration => { - return { - MultiRegionKeyType: __expectString(output.MultiRegionKeyType), - PrimaryKey: output.PrimaryKey != null ? de_MultiRegionKey(output.PrimaryKey, context) : undefined, - ReplicaKeys: output.ReplicaKeys != null ? de_MultiRegionKeyList(output.ReplicaKeys, context) : undefined, - } as any; +const se_ReEncryptRequest = (input: ReEncryptRequest, context: __SerdeContext): any => { + return take(input, { + CiphertextBlob: context.base64Encoder, + DestinationEncryptionAlgorithm: [], + DestinationEncryptionContext: _json, + DestinationKeyId: [], + GrantTokens: _json, + SourceEncryptionAlgorithm: [], + SourceEncryptionContext: _json, + SourceKeyId: [], + }); }; +// se_ReplicateKeyRequest omitted. + +// se_RetireGrantRequest omitted. + +// se_RevokeGrantRequest omitted. + +// se_ScheduleKeyDeletionRequest omitted. + /** - * deserializeAws_json1_1MultiRegionKey + * serializeAws_json1_1SignRequest */ -const de_MultiRegionKey = (output: any, context: __SerdeContext): MultiRegionKey => { - return { - Arn: __expectString(output.Arn), - Region: __expectString(output.Region), - } as any; +const se_SignRequest = (input: SignRequest, context: __SerdeContext): any => { + return take(input, { + GrantTokens: _json, + KeyId: [], + Message: context.base64Encoder, + MessageType: [], + SigningAlgorithm: [], + }); }; +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateAliasRequest omitted. + +// se_UpdateCustomKeyStoreRequest omitted. + +// se_UpdateKeyDescriptionRequest omitted. + +// se_UpdatePrimaryRegionRequest omitted. + /** - * deserializeAws_json1_1MultiRegionKeyList + * serializeAws_json1_1VerifyMacRequest */ -const de_MultiRegionKeyList = (output: any, context: __SerdeContext): MultiRegionKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MultiRegionKey(entry, context); - }); - return retVal; +const se_VerifyMacRequest = (input: VerifyMacRequest, context: __SerdeContext): any => { + return take(input, { + GrantTokens: _json, + KeyId: [], + Mac: context.base64Encoder, + MacAlgorithm: [], + Message: context.base64Encoder, + }); }; /** - * deserializeAws_json1_1NotFoundException + * serializeAws_json1_1VerifyRequest */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - message: __expectString(output.message), - } as any; +const se_VerifyRequest = (input: VerifyRequest, context: __SerdeContext): any => { + return take(input, { + GrantTokens: _json, + KeyId: [], + Message: context.base64Encoder, + MessageType: [], + Signature: context.base64Encoder, + SigningAlgorithm: [], + }); }; +// se_XksProxyAuthenticationCredentialType omitted. + /** - * deserializeAws_json1_1PolicyNameList + * deserializeAws_json1_1AliasList */ -const de_PolicyNameList = (output: any, context: __SerdeContext): string[] => { +const de_AliasList = (output: any, context: __SerdeContext): AliasListEntry[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AliasListEntry(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ReEncryptResponse + * deserializeAws_json1_1AliasListEntry */ -const de_ReEncryptResponse = (output: any, context: __SerdeContext): ReEncryptResponse => { - return { - CiphertextBlob: output.CiphertextBlob != null ? context.base64Decoder(output.CiphertextBlob) : undefined, - DestinationEncryptionAlgorithm: __expectString(output.DestinationEncryptionAlgorithm), - KeyId: __expectString(output.KeyId), - SourceEncryptionAlgorithm: __expectString(output.SourceEncryptionAlgorithm), - SourceKeyId: __expectString(output.SourceKeyId), - } as any; +const de_AliasListEntry = (output: any, context: __SerdeContext): AliasListEntry => { + return take(output, { + AliasArn: __expectString, + AliasName: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TargetKeyId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ReplicateKeyResponse - */ -const de_ReplicateKeyResponse = (output: any, context: __SerdeContext): ReplicateKeyResponse => { - return { - ReplicaKeyMetadata: - output.ReplicaKeyMetadata != null ? de_KeyMetadata(output.ReplicaKeyMetadata, context) : undefined, - ReplicaPolicy: __expectString(output.ReplicaPolicy), - ReplicaTags: output.ReplicaTags != null ? de_TagList(output.ReplicaTags, context) : undefined, - } as any; -}; +// de_AlreadyExistsException omitted. + +// de_CancelKeyDeletionResponse omitted. + +// de_CloudHsmClusterInUseException omitted. + +// de_CloudHsmClusterInvalidConfigurationException omitted. + +// de_CloudHsmClusterNotActiveException omitted. + +// de_CloudHsmClusterNotFoundException omitted. + +// de_CloudHsmClusterNotRelatedException omitted. + +// de_ConnectCustomKeyStoreResponse omitted. + +// de_CreateCustomKeyStoreResponse omitted. + +// de_CreateGrantResponse omitted. /** - * deserializeAws_json1_1ScheduleKeyDeletionResponse + * deserializeAws_json1_1CreateKeyResponse */ -const de_ScheduleKeyDeletionResponse = (output: any, context: __SerdeContext): ScheduleKeyDeletionResponse => { - return { - DeletionDate: - output.DeletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletionDate))) - : undefined, - KeyId: __expectString(output.KeyId), - KeyState: __expectString(output.KeyState), - PendingWindowInDays: __expectInt32(output.PendingWindowInDays), - } as any; +const de_CreateKeyResponse = (output: any, context: __SerdeContext): CreateKeyResponse => { + return take(output, { + KeyMetadata: (_: any) => de_KeyMetadata(_, context), + }) as any; }; +// de_CustomKeyStoreHasCMKsException omitted. + +// de_CustomKeyStoreInvalidStateException omitted. + +// de_CustomKeyStoreNameInUseException omitted. + +// de_CustomKeyStoreNotFoundException omitted. + /** - * deserializeAws_json1_1SigningAlgorithmSpecList + * deserializeAws_json1_1CustomKeyStoresList */ -const de_SigningAlgorithmSpecList = (output: any, context: __SerdeContext): (SigningAlgorithmSpec | string)[] => { +const de_CustomKeyStoresList = (output: any, context: __SerdeContext): CustomKeyStoresListEntry[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_CustomKeyStoresListEntry(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SignResponse + * deserializeAws_json1_1CustomKeyStoresListEntry */ -const de_SignResponse = (output: any, context: __SerdeContext): SignResponse => { - return { - KeyId: __expectString(output.KeyId), - Signature: output.Signature != null ? context.base64Decoder(output.Signature) : undefined, - SigningAlgorithm: __expectString(output.SigningAlgorithm), - } as any; +const de_CustomKeyStoresListEntry = (output: any, context: __SerdeContext): CustomKeyStoresListEntry => { + return take(output, { + CloudHsmClusterId: __expectString, + ConnectionErrorCode: __expectString, + ConnectionState: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomKeyStoreId: __expectString, + CustomKeyStoreName: __expectString, + CustomKeyStoreType: __expectString, + TrustAnchorCertificate: __expectString, + XksProxyConfiguration: _json, + }) as any; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1DecryptResponse */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - TagKey: __expectString(output.TagKey), - TagValue: __expectString(output.TagValue), - } as any; +const de_DecryptResponse = (output: any, context: __SerdeContext): DecryptResponse => { + return take(output, { + EncryptionAlgorithm: __expectString, + KeyId: __expectString, + Plaintext: context.base64Decoder, + }) as any; }; +// de_DeleteCustomKeyStoreResponse omitted. + +// de_DependencyTimeoutException omitted. + /** - * deserializeAws_json1_1TagException + * deserializeAws_json1_1DescribeCustomKeyStoresResponse */ -const de_TagException = (output: any, context: __SerdeContext): TagException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeCustomKeyStoresResponse = (output: any, context: __SerdeContext): DescribeCustomKeyStoresResponse => { + return take(output, { + CustomKeyStores: (_: any) => de_CustomKeyStoresList(_, context), + NextMarker: __expectString, + Truncated: __expectBoolean, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1DescribeKeyResponse */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_DescribeKeyResponse = (output: any, context: __SerdeContext): DescribeKeyResponse => { + return take(output, { + KeyMetadata: (_: any) => de_KeyMetadata(_, context), + }) as any; }; +// de_DisabledException omitted. + +// de_DisconnectCustomKeyStoreResponse omitted. + +// de_EncryptionAlgorithmSpecList omitted. + +// de_EncryptionContextType omitted. + /** - * deserializeAws_json1_1UnsupportedOperationException + * deserializeAws_json1_1EncryptResponse */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - message: __expectString(output.message), - } as any; +const de_EncryptResponse = (output: any, context: __SerdeContext): EncryptResponse => { + return take(output, { + CiphertextBlob: context.base64Decoder, + EncryptionAlgorithm: __expectString, + KeyId: __expectString, + }) as any; }; +// de_ExpiredImportTokenException omitted. + /** - * deserializeAws_json1_1UpdateCustomKeyStoreResponse + * deserializeAws_json1_1GenerateDataKeyPairResponse */ -const de_UpdateCustomKeyStoreResponse = (output: any, context: __SerdeContext): UpdateCustomKeyStoreResponse => { - return {} as any; +const de_GenerateDataKeyPairResponse = (output: any, context: __SerdeContext): GenerateDataKeyPairResponse => { + return take(output, { + KeyId: __expectString, + KeyPairSpec: __expectString, + PrivateKeyCiphertextBlob: context.base64Decoder, + PrivateKeyPlaintext: context.base64Decoder, + PublicKey: context.base64Decoder, + }) as any; }; /** - * deserializeAws_json1_1VerifyMacResponse + * deserializeAws_json1_1GenerateDataKeyPairWithoutPlaintextResponse */ -const de_VerifyMacResponse = (output: any, context: __SerdeContext): VerifyMacResponse => { - return { - KeyId: __expectString(output.KeyId), - MacAlgorithm: __expectString(output.MacAlgorithm), - MacValid: __expectBoolean(output.MacValid), - } as any; +const de_GenerateDataKeyPairWithoutPlaintextResponse = ( + output: any, + context: __SerdeContext +): GenerateDataKeyPairWithoutPlaintextResponse => { + return take(output, { + KeyId: __expectString, + KeyPairSpec: __expectString, + PrivateKeyCiphertextBlob: context.base64Decoder, + PublicKey: context.base64Decoder, + }) as any; }; /** - * deserializeAws_json1_1VerifyResponse + * deserializeAws_json1_1GenerateDataKeyResponse */ -const de_VerifyResponse = (output: any, context: __SerdeContext): VerifyResponse => { - return { - KeyId: __expectString(output.KeyId), - SignatureValid: __expectBoolean(output.SignatureValid), - SigningAlgorithm: __expectString(output.SigningAlgorithm), - } as any; +const de_GenerateDataKeyResponse = (output: any, context: __SerdeContext): GenerateDataKeyResponse => { + return take(output, { + CiphertextBlob: context.base64Decoder, + KeyId: __expectString, + Plaintext: context.base64Decoder, + }) as any; }; /** - * deserializeAws_json1_1XksKeyAlreadyInUseException + * deserializeAws_json1_1GenerateDataKeyWithoutPlaintextResponse */ -const de_XksKeyAlreadyInUseException = (output: any, context: __SerdeContext): XksKeyAlreadyInUseException => { - return { - message: __expectString(output.message), - } as any; +const de_GenerateDataKeyWithoutPlaintextResponse = ( + output: any, + context: __SerdeContext +): GenerateDataKeyWithoutPlaintextResponse => { + return take(output, { + CiphertextBlob: context.base64Decoder, + KeyId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1XksKeyConfigurationType + * deserializeAws_json1_1GenerateMacResponse */ -const de_XksKeyConfigurationType = (output: any, context: __SerdeContext): XksKeyConfigurationType => { - return { - Id: __expectString(output.Id), - } as any; +const de_GenerateMacResponse = (output: any, context: __SerdeContext): GenerateMacResponse => { + return take(output, { + KeyId: __expectString, + Mac: context.base64Decoder, + MacAlgorithm: __expectString, + }) as any; }; /** - * deserializeAws_json1_1XksKeyInvalidConfigurationException + * deserializeAws_json1_1GenerateRandomResponse */ -const de_XksKeyInvalidConfigurationException = ( - output: any, - context: __SerdeContext -): XksKeyInvalidConfigurationException => { - return { - message: __expectString(output.message), - } as any; +const de_GenerateRandomResponse = (output: any, context: __SerdeContext): GenerateRandomResponse => { + return take(output, { + Plaintext: context.base64Decoder, + }) as any; }; +// de_GetKeyPolicyResponse omitted. + +// de_GetKeyRotationStatusResponse omitted. + /** - * deserializeAws_json1_1XksKeyNotFoundException + * deserializeAws_json1_1GetParametersForImportResponse */ -const de_XksKeyNotFoundException = (output: any, context: __SerdeContext): XksKeyNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_GetParametersForImportResponse = (output: any, context: __SerdeContext): GetParametersForImportResponse => { + return take(output, { + ImportToken: context.base64Decoder, + KeyId: __expectString, + ParametersValidTo: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PublicKey: context.base64Decoder, + }) as any; }; /** - * deserializeAws_json1_1XksProxyConfigurationType + * deserializeAws_json1_1GetPublicKeyResponse */ -const de_XksProxyConfigurationType = (output: any, context: __SerdeContext): XksProxyConfigurationType => { - return { - AccessKeyId: __expectString(output.AccessKeyId), - Connectivity: __expectString(output.Connectivity), - UriEndpoint: __expectString(output.UriEndpoint), - UriPath: __expectString(output.UriPath), - VpcEndpointServiceName: __expectString(output.VpcEndpointServiceName), - } as any; +const de_GetPublicKeyResponse = (output: any, context: __SerdeContext): GetPublicKeyResponse => { + return take(output, { + CustomerMasterKeySpec: __expectString, + EncryptionAlgorithms: _json, + KeyId: __expectString, + KeySpec: __expectString, + KeyUsage: __expectString, + PublicKey: context.base64Decoder, + SigningAlgorithms: _json, + }) as any; }; +// de_GrantConstraints omitted. + /** - * deserializeAws_json1_1XksProxyIncorrectAuthenticationCredentialException + * deserializeAws_json1_1GrantList */ -const de_XksProxyIncorrectAuthenticationCredentialException = ( - output: any, - context: __SerdeContext -): XksProxyIncorrectAuthenticationCredentialException => { - return { - message: __expectString(output.message), - } as any; +const de_GrantList = (output: any, context: __SerdeContext): GrantListEntry[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_GrantListEntry(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1XksProxyInvalidConfigurationException + * deserializeAws_json1_1GrantListEntry */ -const de_XksProxyInvalidConfigurationException = ( - output: any, - context: __SerdeContext -): XksProxyInvalidConfigurationException => { - return { - message: __expectString(output.message), - } as any; +const de_GrantListEntry = (output: any, context: __SerdeContext): GrantListEntry => { + return take(output, { + Constraints: _json, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GrantId: __expectString, + GranteePrincipal: __expectString, + IssuingAccount: __expectString, + KeyId: __expectString, + Name: __expectString, + Operations: _json, + RetiringPrincipal: __expectString, + }) as any; }; +// de_GrantOperationList omitted. + +// de_ImportKeyMaterialResponse omitted. + +// de_IncorrectKeyException omitted. + +// de_IncorrectKeyMaterialException omitted. + +// de_IncorrectTrustAnchorException omitted. + +// de_InvalidAliasNameException omitted. + +// de_InvalidArnException omitted. + +// de_InvalidCiphertextException omitted. + +// de_InvalidGrantIdException omitted. + +// de_InvalidGrantTokenException omitted. + +// de_InvalidImportTokenException omitted. + +// de_InvalidKeyUsageException omitted. + +// de_InvalidMarkerException omitted. + +// de_KeyList omitted. + +// de_KeyListEntry omitted. + /** - * deserializeAws_json1_1XksProxyInvalidResponseException + * deserializeAws_json1_1KeyMetadata */ -const de_XksProxyInvalidResponseException = ( - output: any, - context: __SerdeContext -): XksProxyInvalidResponseException => { - return { - message: __expectString(output.message), - } as any; -}; +const de_KeyMetadata = (output: any, context: __SerdeContext): KeyMetadata => { + return take(output, { + AWSAccountId: __expectString, + Arn: __expectString, + CloudHsmClusterId: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomKeyStoreId: __expectString, + CustomerMasterKeySpec: __expectString, + DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Enabled: __expectBoolean, + EncryptionAlgorithms: _json, + ExpirationModel: __expectString, + KeyId: __expectString, + KeyManager: __expectString, + KeySpec: __expectString, + KeyState: __expectString, + KeyUsage: __expectString, + MacAlgorithms: _json, + MultiRegion: __expectBoolean, + MultiRegionConfiguration: _json, + Origin: __expectString, + PendingDeletionWindowInDays: __expectInt32, + SigningAlgorithms: _json, + ValidTo: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + XksKeyConfiguration: _json, + }) as any; +}; + +// de_KeyUnavailableException omitted. + +// de_KMSInternalException omitted. + +// de_KMSInvalidMacException omitted. + +// de_KMSInvalidSignatureException omitted. + +// de_KMSInvalidStateException omitted. + +// de_LimitExceededException omitted. /** - * deserializeAws_json1_1XksProxyUriEndpointInUseException + * deserializeAws_json1_1ListAliasesResponse */ -const de_XksProxyUriEndpointInUseException = ( - output: any, - context: __SerdeContext -): XksProxyUriEndpointInUseException => { - return { - message: __expectString(output.message), - } as any; +const de_ListAliasesResponse = (output: any, context: __SerdeContext): ListAliasesResponse => { + return take(output, { + Aliases: (_: any) => de_AliasList(_, context), + NextMarker: __expectString, + Truncated: __expectBoolean, + }) as any; }; /** - * deserializeAws_json1_1XksProxyUriInUseException + * deserializeAws_json1_1ListGrantsResponse */ -const de_XksProxyUriInUseException = (output: any, context: __SerdeContext): XksProxyUriInUseException => { - return { - message: __expectString(output.message), - } as any; +const de_ListGrantsResponse = (output: any, context: __SerdeContext): ListGrantsResponse => { + return take(output, { + Grants: (_: any) => de_GrantList(_, context), + NextMarker: __expectString, + Truncated: __expectBoolean, + }) as any; }; +// de_ListKeyPoliciesResponse omitted. + +// de_ListKeysResponse omitted. + +// de_ListResourceTagsResponse omitted. + +// de_MacAlgorithmSpecList omitted. + +// de_MalformedPolicyDocumentException omitted. + +// de_MultiRegionConfiguration omitted. + +// de_MultiRegionKey omitted. + +// de_MultiRegionKeyList omitted. + +// de_NotFoundException omitted. + +// de_PolicyNameList omitted. + /** - * deserializeAws_json1_1XksProxyUriUnreachableException + * deserializeAws_json1_1ReEncryptResponse */ -const de_XksProxyUriUnreachableException = (output: any, context: __SerdeContext): XksProxyUriUnreachableException => { - return { - message: __expectString(output.message), - } as any; +const de_ReEncryptResponse = (output: any, context: __SerdeContext): ReEncryptResponse => { + return take(output, { + CiphertextBlob: context.base64Decoder, + DestinationEncryptionAlgorithm: __expectString, + KeyId: __expectString, + SourceEncryptionAlgorithm: __expectString, + SourceKeyId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1XksProxyVpcEndpointServiceInUseException + * deserializeAws_json1_1ReplicateKeyResponse */ -const de_XksProxyVpcEndpointServiceInUseException = ( - output: any, - context: __SerdeContext -): XksProxyVpcEndpointServiceInUseException => { - return { - message: __expectString(output.message), - } as any; +const de_ReplicateKeyResponse = (output: any, context: __SerdeContext): ReplicateKeyResponse => { + return take(output, { + ReplicaKeyMetadata: (_: any) => de_KeyMetadata(_, context), + ReplicaPolicy: __expectString, + ReplicaTags: _json, + }) as any; }; /** - * deserializeAws_json1_1XksProxyVpcEndpointServiceInvalidConfigurationException + * deserializeAws_json1_1ScheduleKeyDeletionResponse */ -const de_XksProxyVpcEndpointServiceInvalidConfigurationException = ( - output: any, - context: __SerdeContext -): XksProxyVpcEndpointServiceInvalidConfigurationException => { - return { - message: __expectString(output.message), - } as any; +const de_ScheduleKeyDeletionResponse = (output: any, context: __SerdeContext): ScheduleKeyDeletionResponse => { + return take(output, { + DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KeyId: __expectString, + KeyState: __expectString, + PendingWindowInDays: __expectInt32, + }) as any; }; +// de_SigningAlgorithmSpecList omitted. + /** - * deserializeAws_json1_1XksProxyVpcEndpointServiceNotFoundException + * deserializeAws_json1_1SignResponse */ -const de_XksProxyVpcEndpointServiceNotFoundException = ( - output: any, - context: __SerdeContext -): XksProxyVpcEndpointServiceNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_SignResponse = (output: any, context: __SerdeContext): SignResponse => { + return take(output, { + KeyId: __expectString, + Signature: context.base64Decoder, + SigningAlgorithm: __expectString, + }) as any; }; +// de_Tag omitted. + +// de_TagException omitted. + +// de_TagList omitted. + +// de_UnsupportedOperationException omitted. + +// de_UpdateCustomKeyStoreResponse omitted. + +// de_VerifyMacResponse omitted. + +// de_VerifyResponse omitted. + +// de_XksKeyAlreadyInUseException omitted. + +// de_XksKeyConfigurationType omitted. + +// de_XksKeyInvalidConfigurationException omitted. + +// de_XksKeyNotFoundException omitted. + +// de_XksProxyConfigurationType omitted. + +// de_XksProxyIncorrectAuthenticationCredentialException omitted. + +// de_XksProxyInvalidConfigurationException omitted. + +// de_XksProxyInvalidResponseException omitted. + +// de_XksProxyUriEndpointInUseException omitted. + +// de_XksProxyUriInUseException omitted. + +// de_XksProxyUriUnreachableException omitted. + +// de_XksProxyVpcEndpointServiceInUseException omitted. + +// de_XksProxyVpcEndpointServiceInvalidConfigurationException omitted. + +// de_XksProxyVpcEndpointServiceNotFoundException omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -6756,6 +5470,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-lakeformation/src/protocols/Aws_restJson1.ts b/clients/client-lakeformation/src/protocols/Aws_restJson1.ts index 787888717a66..94a1e9a662b1 100644 --- a/clients/client-lakeformation/src/protocols/Aws_restJson1.ts +++ b/clients/client-lakeformation/src/protocols/Aws_restJson1.ts @@ -5,17 +5,18 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -138,10 +139,8 @@ import { AllRowsWildcard, AlreadyExistsException, AuditContext, - BatchPermissionsFailureEntry, BatchPermissionsRequestEntry, CatalogResource, - ColumnLFTag, ColumnWildcard, ConcurrentModificationException, DatabaseResource, @@ -151,30 +150,22 @@ import { DataLakeSettings, DataLocationResource, DeleteObjectInput, - DetailsMap, EntityNotFoundException, - ErrorDetail, - ExecutionStatistics, ExpiredException, FilterCondition, GlueEncryptionException, InternalServiceException, InvalidInputException, LFTag, - LFTagError, LFTagKeyResource, LFTagPair, LFTagPolicyResource, OperationTimeoutException, - OptimizerType, - PartitionObjects, PartitionValueList, Permission, PermissionType, PermissionTypeMismatchException, - PlanningStatistics, PrincipalPermissions, - PrincipalResourcePermissions, QueryPlanningContext, Resource, ResourceInfo, @@ -182,20 +173,15 @@ import { ResourceNumberLimitExceededException, RowFilter, StatisticsNotReadyYetException, - StorageOptimizer, - TableObject, TableResource, TableWildcard, TableWithColumnsResource, - TaggedDatabase, - TaggedTable, ThrottledException, TransactionCanceledException, TransactionCommitInProgressException, TransactionCommittedException, TransactionDescription, VirtualObject, - WorkUnitRange, WorkUnitsNotReadyYetException, WriteOperation, } from "../models/models_0"; @@ -213,11 +199,13 @@ export const se_AddLFTagsToResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/AddLFTagsToResource"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.LFTags != null && { LFTags: se_LFTagsList(input.LFTags, context) }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + LFTags: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -243,12 +231,14 @@ export const se_AssumeDecoratedRoleWithSAMLCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/AssumeDecoratedRoleWithSAML"; let body: any; - body = JSON.stringify({ - ...(input.DurationSeconds != null && { DurationSeconds: input.DurationSeconds }), - ...(input.PrincipalArn != null && { PrincipalArn: input.PrincipalArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SAMLAssertion != null && { SAMLAssertion: input.SAMLAssertion }), - }); + body = JSON.stringify( + take(input, { + DurationSeconds: [], + PrincipalArn: [], + RoleArn: [], + SAMLAssertion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -273,10 +263,12 @@ export const se_BatchGrantPermissionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGrantPermissions"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Entries != null && { Entries: se_BatchPermissionsRequestEntryList(input.Entries, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Entries: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -302,10 +294,12 @@ export const se_BatchRevokePermissionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchRevokePermissions"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Entries != null && { Entries: se_BatchPermissionsRequestEntryList(input.Entries, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Entries: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -330,9 +324,11 @@ export const se_CancelTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CancelTransaction"; let body: any; - body = JSON.stringify({ - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -357,9 +353,11 @@ export const se_CommitTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CommitTransaction"; let body: any; - body = JSON.stringify({ - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -384,9 +382,11 @@ export const se_CreateDataCellsFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateDataCellsFilter"; let body: any; - body = JSON.stringify({ - ...(input.TableData != null && { TableData: se_DataCellsFilter(input.TableData, context) }), - }); + body = JSON.stringify( + take(input, { + TableData: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -411,11 +411,13 @@ export const se_CreateLFTagCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLFTag"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValues != null && { TagValues: se_TagValueList(input.TagValues, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + TagKey: [], + TagValues: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -440,12 +442,14 @@ export const se_DeleteDataCellsFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteDataCellsFilter"; let body: any; - body = JSON.stringify({ - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TableCatalogId != null && { TableCatalogId: input.TableCatalogId }), - ...(input.TableName != null && { TableName: input.TableName }), - }); + body = JSON.stringify( + take(input, { + DatabaseName: [], + Name: [], + TableCatalogId: [], + TableName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -470,10 +474,12 @@ export const se_DeleteLFTagCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLFTag"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + TagKey: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -498,13 +504,15 @@ export const se_DeleteObjectsOnCancelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteObjectsOnCancel"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Objects != null && { Objects: se_VirtualObjectList(input.Objects, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + DatabaseName: [], + Objects: (_) => _json(_), + TableName: [], + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -529,9 +537,11 @@ export const se_DeregisterResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeregisterResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -556,9 +566,11 @@ export const se_DescribeResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -583,9 +595,11 @@ export const se_DescribeTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeTransaction"; let body: any; - body = JSON.stringify({ - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -610,9 +624,11 @@ export const se_ExtendTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ExtendTransaction"; let body: any; - body = JSON.stringify({ - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -637,12 +653,14 @@ export const se_GetDataCellsFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDataCellsFilter"; let body: any; - body = JSON.stringify({ - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TableCatalogId != null && { TableCatalogId: input.TableCatalogId }), - ...(input.TableName != null && { TableName: input.TableName }), - }); + body = JSON.stringify( + take(input, { + DatabaseName: [], + Name: [], + TableCatalogId: [], + TableName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -667,9 +685,11 @@ export const se_GetDataLakeSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDataLakeSettings"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -695,12 +715,14 @@ export const se_GetEffectivePermissionsForPathCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetEffectivePermissionsForPath"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + MaxResults: [], + NextToken: [], + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -725,10 +747,12 @@ export const se_GetLFTagCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLFTag"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + TagKey: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -753,9 +777,11 @@ export const se_GetQueryStateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetQueryState"; let body: any; - body = JSON.stringify({ - ...(input.QueryId != null && { QueryId: input.QueryId }), - }); + body = JSON.stringify( + take(input, { + QueryId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "query-" + resolvedHostname; @@ -787,9 +813,11 @@ export const se_GetQueryStatisticsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetQueryStatistics"; let body: any; - body = JSON.stringify({ - ...(input.QueryId != null && { QueryId: input.QueryId }), - }); + body = JSON.stringify( + take(input, { + QueryId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "query-" + resolvedHostname; @@ -821,11 +849,13 @@ export const se_GetResourceLFTagsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetResourceLFTags"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - ...(input.ShowAssignedLFTags != null && { ShowAssignedLFTags: input.ShowAssignedLFTags }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Resource: (_) => _json(_), + ShowAssignedLFTags: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -850,16 +880,18 @@ export const se_GetTableObjectsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetTableObjects"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PartitionPredicate != null && { PartitionPredicate: input.PartitionPredicate }), - ...(input.QueryAsOfTime != null && { QueryAsOfTime: Math.round(input.QueryAsOfTime.getTime() / 1000) }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + DatabaseName: [], + MaxResults: [], + NextToken: [], + PartitionPredicate: [], + QueryAsOfTime: (_) => Math.round(_.getTime() / 1000), + TableName: [], + TransactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -885,16 +917,16 @@ export const se_GetTemporaryGluePartitionCredentialsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetTemporaryGluePartitionCredentials"; let body: any; - body = JSON.stringify({ - ...(input.AuditContext != null && { AuditContext: se_AuditContext(input.AuditContext, context) }), - ...(input.DurationSeconds != null && { DurationSeconds: input.DurationSeconds }), - ...(input.Partition != null && { Partition: se_PartitionValueList(input.Partition, context) }), - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.SupportedPermissionTypes != null && { - SupportedPermissionTypes: se_PermissionTypeList(input.SupportedPermissionTypes, context), - }), - ...(input.TableArn != null && { TableArn: input.TableArn }), - }); + body = JSON.stringify( + take(input, { + AuditContext: (_) => _json(_), + DurationSeconds: [], + Partition: (_) => _json(_), + Permissions: (_) => _json(_), + SupportedPermissionTypes: (_) => _json(_), + TableArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -920,15 +952,15 @@ export const se_GetTemporaryGlueTableCredentialsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetTemporaryGlueTableCredentials"; let body: any; - body = JSON.stringify({ - ...(input.AuditContext != null && { AuditContext: se_AuditContext(input.AuditContext, context) }), - ...(input.DurationSeconds != null && { DurationSeconds: input.DurationSeconds }), - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.SupportedPermissionTypes != null && { - SupportedPermissionTypes: se_PermissionTypeList(input.SupportedPermissionTypes, context), - }), - ...(input.TableArn != null && { TableArn: input.TableArn }), - }); + body = JSON.stringify( + take(input, { + AuditContext: (_) => _json(_), + DurationSeconds: [], + Permissions: (_) => _json(_), + SupportedPermissionTypes: (_) => _json(_), + TableArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -953,11 +985,13 @@ export const se_GetWorkUnitResultsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetWorkUnitResults"; let body: any; - body = JSON.stringify({ - ...(input.QueryId != null && { QueryId: input.QueryId }), - ...(input.WorkUnitId != null && { WorkUnitId: input.WorkUnitId }), - ...(input.WorkUnitToken != null && { WorkUnitToken: input.WorkUnitToken }), - }); + body = JSON.stringify( + take(input, { + QueryId: [], + WorkUnitId: [], + WorkUnitToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data-" + resolvedHostname; @@ -989,11 +1023,13 @@ export const se_GetWorkUnitsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetWorkUnits"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.QueryId != null && { QueryId: input.QueryId }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + PageSize: [], + QueryId: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "query-" + resolvedHostname; @@ -1025,15 +1061,15 @@ export const se_GrantPermissionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GrantPermissions"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.PermissionsWithGrantOption != null && { - PermissionsWithGrantOption: se_PermissionList(input.PermissionsWithGrantOption, context), - }), - ...(input.Principal != null && { Principal: se_DataLakePrincipal(input.Principal, context) }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Permissions: (_) => _json(_), + PermissionsWithGrantOption: (_) => _json(_), + Principal: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1058,11 +1094,13 @@ export const se_ListDataCellsFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListDataCellsFilter"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Table != null && { Table: se_TableResource(input.Table, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + Table: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1087,12 +1125,14 @@ export const se_ListLFTagsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLFTags"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceShareType != null && { ResourceShareType: input.ResourceShareType }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + MaxResults: [], + NextToken: [], + ResourceShareType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1117,15 +1157,17 @@ export const se_ListPermissionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListPermissions"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.IncludeRelated != null && { IncludeRelated: input.IncludeRelated }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Principal != null && { Principal: se_DataLakePrincipal(input.Principal, context) }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + IncludeRelated: [], + MaxResults: [], + NextToken: [], + Principal: (_) => _json(_), + Resource: (_) => _json(_), + ResourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1150,13 +1192,13 @@ export const se_ListResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListResources"; let body: any; - body = JSON.stringify({ - ...(input.FilterConditionList != null && { - FilterConditionList: se_FilterConditionList(input.FilterConditionList, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + FilterConditionList: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1182,14 +1224,16 @@ export const se_ListTableStorageOptimizersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTableStorageOptimizers"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StorageOptimizerType != null && { StorageOptimizerType: input.StorageOptimizerType }), - ...(input.TableName != null && { TableName: input.TableName }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + DatabaseName: [], + MaxResults: [], + NextToken: [], + StorageOptimizerType: [], + TableName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1214,12 +1258,14 @@ export const se_ListTransactionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTransactions"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StatusFilter != null && { StatusFilter: input.StatusFilter }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + MaxResults: [], + NextToken: [], + StatusFilter: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1244,10 +1290,12 @@ export const se_PutDataLakeSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutDataLakeSettings"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DataLakeSettings != null && { DataLakeSettings: se_DataLakeSettings(input.DataLakeSettings, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + DataLakeSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1272,12 +1320,14 @@ export const se_RegisterResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RegisterResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UseServiceLinkedRole != null && { UseServiceLinkedRole: input.UseServiceLinkedRole }), - ...(input.WithFederation != null && { WithFederation: input.WithFederation }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + RoleArn: [], + UseServiceLinkedRole: [], + WithFederation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1303,11 +1353,13 @@ export const se_RemoveLFTagsFromResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RemoveLFTagsFromResource"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.LFTags != null && { LFTags: se_LFTagsList(input.LFTags, context) }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + LFTags: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1332,15 +1384,15 @@ export const se_RevokePermissionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RevokePermissions"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.PermissionsWithGrantOption != null && { - PermissionsWithGrantOption: se_PermissionList(input.PermissionsWithGrantOption, context), - }), - ...(input.Principal != null && { Principal: se_DataLakePrincipal(input.Principal, context) }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Permissions: (_) => _json(_), + PermissionsWithGrantOption: (_) => _json(_), + Principal: (_) => _json(_), + Resource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1366,12 +1418,14 @@ export const se_SearchDatabasesByLFTagsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SearchDatabasesByLFTags"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Expression != null && { Expression: se_Expression(input.Expression, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Expression: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1396,12 +1450,14 @@ export const se_SearchTablesByLFTagsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SearchTablesByLFTags"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Expression != null && { Expression: se_Expression(input.Expression, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + Expression: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1426,12 +1482,12 @@ export const se_StartQueryPlanningCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartQueryPlanning"; let body: any; - body = JSON.stringify({ - ...(input.QueryPlanningContext != null && { - QueryPlanningContext: se_QueryPlanningContext(input.QueryPlanningContext, context), - }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - }); + body = JSON.stringify( + take(input, { + QueryPlanningContext: (_) => se_QueryPlanningContext(_, context), + QueryString: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "query-" + resolvedHostname; @@ -1463,9 +1519,11 @@ export const se_StartTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartTransaction"; let body: any; - body = JSON.stringify({ - ...(input.TransactionType != null && { TransactionType: input.TransactionType }), - }); + body = JSON.stringify( + take(input, { + TransactionType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1490,9 +1548,11 @@ export const se_UpdateDataCellsFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateDataCellsFilter"; let body: any; - body = JSON.stringify({ - ...(input.TableData != null && { TableData: se_DataCellsFilter(input.TableData, context) }), - }); + body = JSON.stringify( + take(input, { + TableData: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1517,12 +1577,14 @@ export const se_UpdateLFTagCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLFTag"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValuesToAdd != null && { TagValuesToAdd: se_TagValueList(input.TagValuesToAdd, context) }), - ...(input.TagValuesToDelete != null && { TagValuesToDelete: se_TagValueList(input.TagValuesToDelete, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + TagKey: [], + TagValuesToAdd: (_) => _json(_), + TagValuesToDelete: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1547,11 +1609,13 @@ export const se_UpdateResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.WithFederation != null && { WithFederation: input.WithFederation }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + RoleArn: [], + WithFederation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1576,13 +1640,15 @@ export const se_UpdateTableObjectsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateTableObjects"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - ...(input.WriteOperations != null && { WriteOperations: se_WriteOperationList(input.WriteOperations, context) }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + DatabaseName: [], + TableName: [], + TransactionId: [], + WriteOperations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1608,14 +1674,14 @@ export const se_UpdateTableStorageOptimizerCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateTableStorageOptimizer"; let body: any; - body = JSON.stringify({ - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.StorageOptimizerConfig != null && { - StorageOptimizerConfig: se_StorageOptimizerConfigMap(input.StorageOptimizerConfig, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }); + body = JSON.stringify( + take(input, { + CatalogId: [], + DatabaseName: [], + StorageOptimizerConfig: (_) => _json(_), + TableName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1641,9 +1707,10 @@ export const de_AddLFTagsToResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Failures != null) { - contents.Failures = de_LFTagErrors(data.Failures, context); - } + const doc = take(data, { + Failures: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1680,10 +1747,9 @@ const de_AddLFTagsToResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1703,18 +1769,13 @@ export const de_AssumeDecoratedRoleWithSAMLCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessKeyId != null) { - contents.AccessKeyId = __expectString(data.AccessKeyId); - } - if (data.Expiration != null) { - contents.Expiration = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.Expiration))); - } - if (data.SecretAccessKey != null) { - contents.SecretAccessKey = __expectString(data.SecretAccessKey); - } - if (data.SessionToken != null) { - contents.SessionToken = __expectString(data.SessionToken); - } + const doc = take(data, { + AccessKeyId: __expectString, + Expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SecretAccessKey: __expectString, + SessionToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1748,10 +1809,9 @@ const de_AssumeDecoratedRoleWithSAMLCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1771,9 +1831,10 @@ export const de_BatchGrantPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Failures != null) { - contents.Failures = de_BatchPermissionsFailureList(data.Failures, context); - } + const doc = take(data, { + Failures: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1798,10 +1859,9 @@ const de_BatchGrantPermissionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1821,9 +1881,10 @@ export const de_BatchRevokePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Failures != null) { - contents.Failures = de_BatchPermissionsFailureList(data.Failures, context); - } + const doc = take(data, { + Failures: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1848,10 +1909,9 @@ const de_BatchRevokePermissionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1910,10 +1970,9 @@ const de_CancelTransactionCommandError = async ( throw await de_TransactionCommittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1933,9 +1992,10 @@ export const de_CommitTransactionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransactionStatus != null) { - contents.TransactionStatus = __expectString(data.TransactionStatus); - } + const doc = take(data, { + TransactionStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1972,10 +2032,9 @@ const de_CommitTransactionCommandError = async ( throw await de_TransactionCanceledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2034,10 +2093,9 @@ const de_CreateDataCellsFilterCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2093,10 +2151,9 @@ const de_CreateLFTagCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2149,10 +2206,9 @@ const de_DeleteDataCellsFilterCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2205,10 +2261,9 @@ const de_DeleteLFTagCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2270,10 +2325,9 @@ const de_DeleteObjectsOnCancelCommandError = async ( throw await de_TransactionCommittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2323,10 +2377,9 @@ const de_DeregisterResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2346,9 +2399,10 @@ export const de_DescribeResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceInfo != null) { - contents.ResourceInfo = de_ResourceInfo(data.ResourceInfo, context); - } + const doc = take(data, { + ResourceInfo: (_) => de_ResourceInfo(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2379,10 +2433,9 @@ const de_DescribeResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2402,9 +2455,10 @@ export const de_DescribeTransactionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransactionDescription != null) { - contents.TransactionDescription = de_TransactionDescription(data.TransactionDescription, context); - } + const doc = take(data, { + TransactionDescription: (_) => de_TransactionDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2435,10 +2489,9 @@ const de_DescribeTransactionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,10 +2550,9 @@ const de_ExtendTransactionCommandError = async ( throw await de_TransactionCommittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2520,9 +2572,10 @@ export const de_GetDataCellsFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataCellsFilter != null) { - contents.DataCellsFilter = de_DataCellsFilter(data.DataCellsFilter, context); - } + const doc = take(data, { + DataCellsFilter: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2556,10 +2609,9 @@ const de_GetDataCellsFilterCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2579,9 +2631,10 @@ export const de_GetDataLakeSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataLakeSettings != null) { - contents.DataLakeSettings = de_DataLakeSettings(data.DataLakeSettings, context); - } + const doc = take(data, { + DataLakeSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2609,10 +2662,9 @@ const de_GetDataLakeSettingsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2632,12 +2684,11 @@ export const de_GetEffectivePermissionsForPathCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Permissions != null) { - contents.Permissions = de_PrincipalResourcePermissionsList(data.Permissions, context); - } + const doc = take(data, { + NextToken: __expectString, + Permissions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2668,10 +2719,9 @@ const de_GetEffectivePermissionsForPathCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2691,15 +2741,12 @@ export const de_GetLFTagCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CatalogId != null) { - contents.CatalogId = __expectString(data.CatalogId); - } - if (data.TagKey != null) { - contents.TagKey = __expectString(data.TagKey); - } - if (data.TagValues != null) { - contents.TagValues = de_TagValueList(data.TagValues, context); - } + const doc = take(data, { + CatalogId: __expectString, + TagKey: __expectString, + TagValues: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2733,10 +2780,9 @@ const de_GetLFTagCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2756,12 +2802,11 @@ export const de_GetQueryStateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Error != null) { - contents.Error = __expectString(data.Error); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Error: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2789,10 +2834,9 @@ const de_GetQueryStateCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2812,15 +2856,12 @@ export const de_GetQueryStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ExecutionStatistics != null) { - contents.ExecutionStatistics = de_ExecutionStatistics(data.ExecutionStatistics, context); - } - if (data.PlanningStatistics != null) { - contents.PlanningStatistics = de_PlanningStatistics(data.PlanningStatistics, context); - } - if (data.QuerySubmissionTime != null) { - contents.QuerySubmissionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.QuerySubmissionTime)); - } + const doc = take(data, { + ExecutionStatistics: _json, + PlanningStatistics: _json, + QuerySubmissionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2857,10 +2898,9 @@ const de_GetQueryStatisticsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2880,15 +2920,12 @@ export const de_GetResourceLFTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LFTagOnDatabase != null) { - contents.LFTagOnDatabase = de_LFTagsList(data.LFTagOnDatabase, context); - } - if (data.LFTagsOnColumns != null) { - contents.LFTagsOnColumns = de_ColumnLFTagsList(data.LFTagsOnColumns, context); - } - if (data.LFTagsOnTable != null) { - contents.LFTagsOnTable = de_LFTagsList(data.LFTagsOnTable, context); - } + const doc = take(data, { + LFTagOnDatabase: _json, + LFTagsOnColumns: _json, + LFTagsOnTable: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2925,10 +2962,9 @@ const de_GetResourceLFTagsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2948,12 +2984,11 @@ export const de_GetTableObjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Objects != null) { - contents.Objects = de_PartitionedTableObjectsList(data.Objects, context); - } + const doc = take(data, { + NextToken: __expectString, + Objects: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2993,10 +3028,9 @@ const de_GetTableObjectsCommandError = async ( throw await de_TransactionCommittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3016,18 +3050,13 @@ export const de_GetTemporaryGluePartitionCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessKeyId != null) { - contents.AccessKeyId = __expectString(data.AccessKeyId); - } - if (data.Expiration != null) { - contents.Expiration = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.Expiration))); - } - if (data.SecretAccessKey != null) { - contents.SecretAccessKey = __expectString(data.SecretAccessKey); - } - if (data.SessionToken != null) { - contents.SessionToken = __expectString(data.SessionToken); - } + const doc = take(data, { + AccessKeyId: __expectString, + Expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SecretAccessKey: __expectString, + SessionToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3064,10 +3093,9 @@ const de_GetTemporaryGluePartitionCredentialsCommandError = async ( throw await de_PermissionTypeMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3087,18 +3115,13 @@ export const de_GetTemporaryGlueTableCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessKeyId != null) { - contents.AccessKeyId = __expectString(data.AccessKeyId); - } - if (data.Expiration != null) { - contents.Expiration = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.Expiration))); - } - if (data.SecretAccessKey != null) { - contents.SecretAccessKey = __expectString(data.SecretAccessKey); - } - if (data.SessionToken != null) { - contents.SessionToken = __expectString(data.SessionToken); - } + const doc = take(data, { + AccessKeyId: __expectString, + Expiration: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SecretAccessKey: __expectString, + SessionToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3135,10 +3158,9 @@ const de_GetTemporaryGlueTableCredentialsCommandError = async ( throw await de_PermissionTypeMismatchExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3193,10 +3215,9 @@ const de_GetWorkUnitResultsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3216,15 +3237,12 @@ export const de_GetWorkUnitsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.QueryId != null) { - contents.QueryId = __expectString(data.QueryId); - } - if (data.WorkUnitRanges != null) { - contents.WorkUnitRanges = de_WorkUnitRangeList(data.WorkUnitRanges, context); - } + const doc = take(data, { + NextToken: __expectString, + QueryId: __expectString, + WorkUnitRanges: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3258,10 +3276,9 @@ const de_GetWorkUnitsCommandError = async ( throw await de_WorkUnitsNotReadyYetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3308,10 +3325,9 @@ const de_GrantPermissionsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3331,12 +3347,11 @@ export const de_ListDataCellsFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataCellsFilters != null) { - contents.DataCellsFilters = de_DataCellsFilterList(data.DataCellsFilters, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DataCellsFilters: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3367,10 +3382,9 @@ const de_ListDataCellsFilterCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3390,12 +3404,11 @@ export const de_ListLFTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LFTags != null) { - contents.LFTags = de_LFTagsList(data.LFTags, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LFTags: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3429,10 +3442,9 @@ const de_ListLFTagsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3452,15 +3464,11 @@ export const de_ListPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PrincipalResourcePermissions != null) { - contents.PrincipalResourcePermissions = de_PrincipalResourcePermissionsList( - data.PrincipalResourcePermissions, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + PrincipalResourcePermissions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3488,10 +3496,9 @@ const de_ListPermissionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3511,12 +3518,11 @@ export const de_ListResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ResourceInfoList != null) { - contents.ResourceInfoList = de_ResourceInfoList(data.ResourceInfoList, context); - } + const doc = take(data, { + NextToken: __expectString, + ResourceInfoList: (_) => de_ResourceInfoList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3544,10 +3550,9 @@ const de_ListResourcesCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3567,12 +3572,11 @@ export const de_ListTableStorageOptimizersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.StorageOptimizerList != null) { - contents.StorageOptimizerList = de_StorageOptimizerList(data.StorageOptimizerList, context); - } + const doc = take(data, { + NextToken: __expectString, + StorageOptimizerList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3603,10 +3607,9 @@ const de_ListTableStorageOptimizersCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,12 +3629,11 @@ export const de_ListTransactionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Transactions != null) { - contents.Transactions = de_TransactionDescriptionList(data.Transactions, context); - } + const doc = take(data, { + NextToken: __expectString, + Transactions: (_) => de_TransactionDescriptionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3659,10 +3661,9 @@ const de_ListTransactionsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3706,10 +3707,9 @@ const de_PutDataLakeSettingsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3768,10 +3768,9 @@ const de_RegisterResourceCommandError = async ( throw await de_ResourceNumberLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3791,9 +3790,10 @@ export const de_RemoveLFTagsFromResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Failures != null) { - contents.Failures = de_LFTagErrors(data.Failures, context); - } + const doc = take(data, { + Failures: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3833,10 +3833,9 @@ const de_RemoveLFTagsFromResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3883,10 +3882,9 @@ const de_RevokePermissionsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3906,12 +3904,11 @@ export const de_SearchDatabasesByLFTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DatabaseList != null) { - contents.DatabaseList = de_DatabaseLFTagsList(data.DatabaseList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DatabaseList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3948,10 +3945,9 @@ const de_SearchDatabasesByLFTagsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3971,12 +3967,11 @@ export const de_SearchTablesByLFTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TableList != null) { - contents.TableList = de_TableLFTagsList(data.TableList, context); - } + const doc = take(data, { + NextToken: __expectString, + TableList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4013,10 +4008,9 @@ const de_SearchTablesByLFTagsCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4036,9 +4030,10 @@ export const de_StartQueryPlanningCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.QueryId != null) { - contents.QueryId = __expectString(data.QueryId); - } + const doc = take(data, { + QueryId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4069,10 +4064,9 @@ const de_StartQueryPlanningCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4092,9 +4086,10 @@ export const de_StartTransactionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransactionId != null) { - contents.TransactionId = __expectString(data.TransactionId); - } + const doc = take(data, { + TransactionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4119,10 +4114,9 @@ const de_StartTransactionCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4178,10 +4172,9 @@ const de_UpdateDataCellsFilterCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4237,10 +4230,9 @@ const de_UpdateLFTagCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4290,10 +4282,9 @@ const de_UpdateResourceCommandError = async ( throw await de_OperationTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4358,10 +4349,9 @@ const de_UpdateTableObjectsCommandError = async ( throw await de_TransactionCommittedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4381,9 +4371,10 @@ export const de_UpdateTableStorageOptimizerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Result != null) { - contents.Result = __expectString(data.Result); - } + const doc = take(data, { + Result: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4414,16 +4405,15 @@ const de_UpdateTableStorageOptimizerCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4433,9 +4423,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4452,9 +4443,10 @@ const de_AlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4471,9 +4463,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4490,9 +4483,10 @@ const de_EntityNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new EntityNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4506,9 +4500,10 @@ const de_EntityNotFoundExceptionRes = async ( const de_ExpiredExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ExpiredException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4525,9 +4520,10 @@ const de_GlueEncryptionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new GlueEncryptionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4544,9 +4540,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4563,9 +4560,10 @@ const de_InvalidInputExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4582,9 +4580,10 @@ const de_OperationTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new OperationTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4601,9 +4600,10 @@ const de_PermissionTypeMismatchExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new PermissionTypeMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4620,9 +4620,10 @@ const de_ResourceNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4639,9 +4640,10 @@ const de_ResourceNumberLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNumberLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4658,9 +4660,10 @@ const de_StatisticsNotReadyYetExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new StatisticsNotReadyYetException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4674,9 +4677,10 @@ const de_StatisticsNotReadyYetExceptionRes = async ( const de_ThrottledExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4693,9 +4697,10 @@ const de_TransactionCanceledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TransactionCanceledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4712,9 +4717,10 @@ const de_TransactionCommitInProgressExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TransactionCommitInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4731,9 +4737,10 @@ const de_TransactionCommittedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TransactionCommittedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4750,9 +4757,10 @@ const de_WorkUnitsNotReadyYetExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new WorkUnitsNotReadyYetException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4760,1121 +4768,207 @@ const de_WorkUnitsNotReadyYetExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AddObjectInput - */ -const se_AddObjectInput = (input: AddObjectInput, context: __SerdeContext): any => { - return { - ...(input.ETag != null && { ETag: input.ETag }), - ...(input.PartitionValues != null && { PartitionValues: se_PartitionValuesList(input.PartitionValues, context) }), - ...(input.Size != null && { Size: input.Size }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; +// se_AddObjectInput omitted. -/** - * serializeAws_restJson1AllRowsWildcard - */ -const se_AllRowsWildcard = (input: AllRowsWildcard, context: __SerdeContext): any => { - return {}; -}; +// se_AllRowsWildcard omitted. -/** - * serializeAws_restJson1AuditContext - */ -const se_AuditContext = (input: AuditContext, context: __SerdeContext): any => { - return { - ...(input.AdditionalAuditContext != null && { AdditionalAuditContext: input.AdditionalAuditContext }), - }; -}; +// se_AuditContext omitted. -/** - * serializeAws_restJson1AuthorizedSessionTagValueList - */ -const se_AuthorizedSessionTagValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AuthorizedSessionTagValueList omitted. -/** - * serializeAws_restJson1BatchPermissionsRequestEntry - */ -const se_BatchPermissionsRequestEntry = (input: BatchPermissionsRequestEntry, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.PermissionsWithGrantOption != null && { - PermissionsWithGrantOption: se_PermissionList(input.PermissionsWithGrantOption, context), - }), - ...(input.Principal != null && { Principal: se_DataLakePrincipal(input.Principal, context) }), - ...(input.Resource != null && { Resource: se_Resource(input.Resource, context) }), - }; -}; +// se_BatchPermissionsRequestEntry omitted. -/** - * serializeAws_restJson1BatchPermissionsRequestEntryList - */ -const se_BatchPermissionsRequestEntryList = (input: BatchPermissionsRequestEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BatchPermissionsRequestEntry(entry, context); - }); -}; +// se_BatchPermissionsRequestEntryList omitted. -/** - * serializeAws_restJson1CatalogResource - */ -const se_CatalogResource = (input: CatalogResource, context: __SerdeContext): any => { - return {}; -}; +// se_CatalogResource omitted. -/** - * serializeAws_restJson1ColumnNames - */ -const se_ColumnNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ColumnNames omitted. -/** - * serializeAws_restJson1ColumnWildcard - */ -const se_ColumnWildcard = (input: ColumnWildcard, context: __SerdeContext): any => { - return { - ...(input.ExcludedColumnNames != null && { - ExcludedColumnNames: se_ColumnNames(input.ExcludedColumnNames, context), - }), - }; -}; +// se_ColumnWildcard omitted. -/** - * serializeAws_restJson1DatabaseResource - */ -const se_DatabaseResource = (input: DatabaseResource, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DatabaseResource omitted. -/** - * serializeAws_restJson1DataCellsFilter - */ -const se_DataCellsFilter = (input: DataCellsFilter, context: __SerdeContext): any => { - return { - ...(input.ColumnNames != null && { ColumnNames: se_ColumnNames(input.ColumnNames, context) }), - ...(input.ColumnWildcard != null && { ColumnWildcard: se_ColumnWildcard(input.ColumnWildcard, context) }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RowFilter != null && { RowFilter: se_RowFilter(input.RowFilter, context) }), - ...(input.TableCatalogId != null && { TableCatalogId: input.TableCatalogId }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; +// se_DataCellsFilter omitted. -/** - * serializeAws_restJson1DataCellsFilterResource - */ -const se_DataCellsFilterResource = (input: DataCellsFilterResource, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TableCatalogId != null && { TableCatalogId: input.TableCatalogId }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DataCellsFilterResource omitted. -/** - * serializeAws_restJson1DataLakePrincipal - */ -const se_DataLakePrincipal = (input: DataLakePrincipal, context: __SerdeContext): any => { - return { - ...(input.DataLakePrincipalIdentifier != null && { - DataLakePrincipalIdentifier: input.DataLakePrincipalIdentifier, - }), - }; -}; +// se_DataLakePrincipal omitted. -/** - * serializeAws_restJson1DataLakePrincipalList - */ -const se_DataLakePrincipalList = (input: DataLakePrincipal[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataLakePrincipal(entry, context); - }); -}; +// se_DataLakePrincipalList omitted. -/** - * serializeAws_restJson1DataLakeSettings - */ -const se_DataLakeSettings = (input: DataLakeSettings, context: __SerdeContext): any => { - return { - ...(input.AllowExternalDataFiltering != null && { AllowExternalDataFiltering: input.AllowExternalDataFiltering }), - ...(input.AuthorizedSessionTagValueList != null && { - AuthorizedSessionTagValueList: se_AuthorizedSessionTagValueList(input.AuthorizedSessionTagValueList, context), - }), - ...(input.CreateDatabaseDefaultPermissions != null && { - CreateDatabaseDefaultPermissions: se_PrincipalPermissionsList(input.CreateDatabaseDefaultPermissions, context), - }), - ...(input.CreateTableDefaultPermissions != null && { - CreateTableDefaultPermissions: se_PrincipalPermissionsList(input.CreateTableDefaultPermissions, context), - }), - ...(input.DataLakeAdmins != null && { DataLakeAdmins: se_DataLakePrincipalList(input.DataLakeAdmins, context) }), - ...(input.ExternalDataFilteringAllowList != null && { - ExternalDataFilteringAllowList: se_DataLakePrincipalList(input.ExternalDataFilteringAllowList, context), - }), - ...(input.Parameters != null && { Parameters: se_ParametersMap(input.Parameters, context) }), - ...(input.TrustedResourceOwners != null && { - TrustedResourceOwners: se_TrustedResourceOwners(input.TrustedResourceOwners, context), - }), - }; -}; +// se_DataLakeSettings omitted. -/** - * serializeAws_restJson1DataLocationResource - */ -const se_DataLocationResource = (input: DataLocationResource, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DataLocationResource omitted. -/** - * serializeAws_restJson1DeleteObjectInput - */ -const se_DeleteObjectInput = (input: DeleteObjectInput, context: __SerdeContext): any => { - return { - ...(input.ETag != null && { ETag: input.ETag }), - ...(input.PartitionValues != null && { PartitionValues: se_PartitionValuesList(input.PartitionValues, context) }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; +// se_DeleteObjectInput omitted. -/** - * serializeAws_restJson1Expression - */ -const se_Expression = (input: LFTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LFTag(entry, context); - }); -}; +// se_Expression omitted. -/** - * serializeAws_restJson1FilterCondition - */ -const se_FilterCondition = (input: FilterCondition, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.Field != null && { Field: input.Field }), - ...(input.StringValueList != null && { StringValueList: se_StringValueList(input.StringValueList, context) }), - }; -}; +// se_FilterCondition omitted. -/** - * serializeAws_restJson1FilterConditionList - */ -const se_FilterConditionList = (input: FilterCondition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterCondition(entry, context); - }); -}; +// se_FilterConditionList omitted. -/** - * serializeAws_restJson1LFTag - */ -const se_LFTag = (input: LFTag, context: __SerdeContext): any => { - return { - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValues != null && { TagValues: se_TagValueList(input.TagValues, context) }), - }; -}; +// se_LFTag omitted. -/** - * serializeAws_restJson1LFTagKeyResource - */ -const se_LFTagKeyResource = (input: LFTagKeyResource, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValues != null && { TagValues: se_TagValueList(input.TagValues, context) }), - }; -}; +// se_LFTagKeyResource omitted. -/** - * serializeAws_restJson1LFTagPair - */ -const se_LFTagPair = (input: LFTagPair, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagValues != null && { TagValues: se_TagValueList(input.TagValues, context) }), - }; -}; +// se_LFTagPair omitted. -/** - * serializeAws_restJson1LFTagPolicyResource - */ -const se_LFTagPolicyResource = (input: LFTagPolicyResource, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.Expression != null && { Expression: se_Expression(input.Expression, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_LFTagPolicyResource omitted. -/** - * serializeAws_restJson1LFTagsList - */ -const se_LFTagsList = (input: LFTagPair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LFTagPair(entry, context); - }); -}; +// se_LFTagsList omitted. -/** - * serializeAws_restJson1ParametersMap - */ -const se_ParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ParametersMap omitted. -/** - * serializeAws_restJson1PartitionValueList - */ -const se_PartitionValueList = (input: PartitionValueList, context: __SerdeContext): any => { - return { - ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }), - }; -}; +// se_PartitionValueList omitted. -/** - * serializeAws_restJson1PartitionValuesList - */ -const se_PartitionValuesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PartitionValuesList omitted. -/** - * serializeAws_restJson1PermissionList - */ -const se_PermissionList = (input: (Permission | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PermissionList omitted. -/** - * serializeAws_restJson1PermissionTypeList - */ -const se_PermissionTypeList = (input: (PermissionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PermissionTypeList omitted. -/** - * serializeAws_restJson1PrincipalPermissions - */ -const se_PrincipalPermissions = (input: PrincipalPermissions, context: __SerdeContext): any => { - return { - ...(input.Permissions != null && { Permissions: se_PermissionList(input.Permissions, context) }), - ...(input.Principal != null && { Principal: se_DataLakePrincipal(input.Principal, context) }), - }; -}; +// se_PrincipalPermissions omitted. -/** - * serializeAws_restJson1PrincipalPermissionsList - */ -const se_PrincipalPermissionsList = (input: PrincipalPermissions[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PrincipalPermissions(entry, context); - }); -}; +// se_PrincipalPermissionsList omitted. -/** - * serializeAws_restJson1QueryParameterMap - */ -const se_QueryParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_QueryParameterMap omitted. /** * serializeAws_restJson1QueryPlanningContext */ const se_QueryPlanningContext = (input: QueryPlanningContext, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.QueryAsOfTime != null && { QueryAsOfTime: Math.round(input.QueryAsOfTime.getTime() / 1000) }), - ...(input.QueryParameters != null && { QueryParameters: se_QueryParameterMap(input.QueryParameters, context) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; + return take(input, { + CatalogId: [], + DatabaseName: [], + QueryAsOfTime: (_) => Math.round(_.getTime() / 1000), + QueryParameters: _json, + TransactionId: [], + }); }; -/** - * serializeAws_restJson1Resource - */ -const se_Resource = (input: Resource, context: __SerdeContext): any => { - return { - ...(input.Catalog != null && { Catalog: se_CatalogResource(input.Catalog, context) }), - ...(input.DataCellsFilter != null && { - DataCellsFilter: se_DataCellsFilterResource(input.DataCellsFilter, context), - }), - ...(input.DataLocation != null && { DataLocation: se_DataLocationResource(input.DataLocation, context) }), - ...(input.Database != null && { Database: se_DatabaseResource(input.Database, context) }), - ...(input.LFTag != null && { LFTag: se_LFTagKeyResource(input.LFTag, context) }), - ...(input.LFTagPolicy != null && { LFTagPolicy: se_LFTagPolicyResource(input.LFTagPolicy, context) }), - ...(input.Table != null && { Table: se_TableResource(input.Table, context) }), - ...(input.TableWithColumns != null && { - TableWithColumns: se_TableWithColumnsResource(input.TableWithColumns, context), - }), - }; -}; +// se_Resource omitted. -/** - * serializeAws_restJson1RowFilter - */ -const se_RowFilter = (input: RowFilter, context: __SerdeContext): any => { - return { - ...(input.AllRowsWildcard != null && { AllRowsWildcard: se_AllRowsWildcard(input.AllRowsWildcard, context) }), - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - }; -}; +// se_RowFilter omitted. -/** - * serializeAws_restJson1StorageOptimizerConfig - */ -const se_StorageOptimizerConfig = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StorageOptimizerConfig omitted. -/** - * serializeAws_restJson1StorageOptimizerConfigMap - */ -const se_StorageOptimizerConfigMap = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [OptimizerType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_StorageOptimizerConfig(value, context); - return acc; - }, {}); -}; +// se_StorageOptimizerConfigMap omitted. -/** - * serializeAws_restJson1StringValueList - */ -const se_StringValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringValueList omitted. -/** - * serializeAws_restJson1TableResource - */ -const se_TableResource = (input: TableResource, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TableWildcard != null && { TableWildcard: se_TableWildcard(input.TableWildcard, context) }), - }; -}; +// se_TableResource omitted. -/** - * serializeAws_restJson1TableWildcard - */ -const se_TableWildcard = (input: TableWildcard, context: __SerdeContext): any => { - return {}; -}; +// se_TableWildcard omitted. -/** - * serializeAws_restJson1TableWithColumnsResource - */ -const se_TableWithColumnsResource = (input: TableWithColumnsResource, context: __SerdeContext): any => { - return { - ...(input.CatalogId != null && { CatalogId: input.CatalogId }), - ...(input.ColumnNames != null && { ColumnNames: se_ColumnNames(input.ColumnNames, context) }), - ...(input.ColumnWildcard != null && { ColumnWildcard: se_ColumnWildcard(input.ColumnWildcard, context) }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_TableWithColumnsResource omitted. -/** - * serializeAws_restJson1TagValueList - */ -const se_TagValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagValueList omitted. -/** - * serializeAws_restJson1TrustedResourceOwners - */ -const se_TrustedResourceOwners = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TrustedResourceOwners omitted. -/** - * serializeAws_restJson1ValueStringList - */ -const se_ValueStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ValueStringList omitted. -/** - * serializeAws_restJson1VirtualObject - */ -const se_VirtualObject = (input: VirtualObject, context: __SerdeContext): any => { - return { - ...(input.ETag != null && { ETag: input.ETag }), - ...(input.Uri != null && { Uri: input.Uri }), - }; -}; +// se_VirtualObject omitted. -/** - * serializeAws_restJson1VirtualObjectList - */ -const se_VirtualObjectList = (input: VirtualObject[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VirtualObject(entry, context); - }); -}; +// se_VirtualObjectList omitted. -/** - * serializeAws_restJson1WriteOperation - */ -const se_WriteOperation = (input: WriteOperation, context: __SerdeContext): any => { - return { - ...(input.AddObject != null && { AddObject: se_AddObjectInput(input.AddObject, context) }), - ...(input.DeleteObject != null && { DeleteObject: se_DeleteObjectInput(input.DeleteObject, context) }), - }; -}; +// se_WriteOperation omitted. -/** - * serializeAws_restJson1WriteOperationList - */ -const se_WriteOperationList = (input: WriteOperation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WriteOperation(entry, context); - }); -}; +// se_WriteOperationList omitted. -/** - * deserializeAws_restJson1AllRowsWildcard - */ -const de_AllRowsWildcard = (output: any, context: __SerdeContext): AllRowsWildcard => { - return {} as any; -}; +// de_AllRowsWildcard omitted. -/** - * deserializeAws_restJson1AuthorizedSessionTagValueList - */ -const de_AuthorizedSessionTagValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AuthorizedSessionTagValueList omitted. -/** - * deserializeAws_restJson1BatchPermissionsFailureEntry - */ -const de_BatchPermissionsFailureEntry = (output: any, context: __SerdeContext): BatchPermissionsFailureEntry => { - return { - Error: output.Error != null ? de_ErrorDetail(output.Error, context) : undefined, - RequestEntry: - output.RequestEntry != null ? de_BatchPermissionsRequestEntry(output.RequestEntry, context) : undefined, - } as any; -}; +// de_BatchPermissionsFailureEntry omitted. -/** - * deserializeAws_restJson1BatchPermissionsFailureList - */ -const de_BatchPermissionsFailureList = (output: any, context: __SerdeContext): BatchPermissionsFailureEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPermissionsFailureEntry(entry, context); - }); - return retVal; -}; +// de_BatchPermissionsFailureList omitted. -/** - * deserializeAws_restJson1BatchPermissionsRequestEntry - */ -const de_BatchPermissionsRequestEntry = (output: any, context: __SerdeContext): BatchPermissionsRequestEntry => { - return { - Id: __expectString(output.Id), - Permissions: output.Permissions != null ? de_PermissionList(output.Permissions, context) : undefined, - PermissionsWithGrantOption: - output.PermissionsWithGrantOption != null - ? de_PermissionList(output.PermissionsWithGrantOption, context) - : undefined, - Principal: output.Principal != null ? de_DataLakePrincipal(output.Principal, context) : undefined, - Resource: output.Resource != null ? de_Resource(output.Resource, context) : undefined, - } as any; -}; +// de_BatchPermissionsRequestEntry omitted. -/** - * deserializeAws_restJson1CatalogResource - */ -const de_CatalogResource = (output: any, context: __SerdeContext): CatalogResource => { - return {} as any; -}; +// de_CatalogResource omitted. -/** - * deserializeAws_restJson1ColumnLFTag - */ -const de_ColumnLFTag = (output: any, context: __SerdeContext): ColumnLFTag => { - return { - LFTags: output.LFTags != null ? de_LFTagsList(output.LFTags, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_ColumnLFTag omitted. -/** - * deserializeAws_restJson1ColumnLFTagsList - */ -const de_ColumnLFTagsList = (output: any, context: __SerdeContext): ColumnLFTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnLFTag(entry, context); - }); - return retVal; -}; +// de_ColumnLFTagsList omitted. -/** - * deserializeAws_restJson1ColumnNames - */ -const de_ColumnNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ColumnNames omitted. -/** - * deserializeAws_restJson1ColumnWildcard - */ -const de_ColumnWildcard = (output: any, context: __SerdeContext): ColumnWildcard => { - return { - ExcludedColumnNames: - output.ExcludedColumnNames != null ? de_ColumnNames(output.ExcludedColumnNames, context) : undefined, - } as any; -}; +// de_ColumnWildcard omitted. -/** - * deserializeAws_restJson1DatabaseLFTagsList - */ -const de_DatabaseLFTagsList = (output: any, context: __SerdeContext): TaggedDatabase[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaggedDatabase(entry, context); - }); - return retVal; -}; +// de_DatabaseLFTagsList omitted. -/** - * deserializeAws_restJson1DatabaseResource - */ -const de_DatabaseResource = (output: any, context: __SerdeContext): DatabaseResource => { - return { - CatalogId: __expectString(output.CatalogId), - Name: __expectString(output.Name), - } as any; -}; +// de_DatabaseResource omitted. -/** - * deserializeAws_restJson1DataCellsFilter - */ -const de_DataCellsFilter = (output: any, context: __SerdeContext): DataCellsFilter => { - return { - ColumnNames: output.ColumnNames != null ? de_ColumnNames(output.ColumnNames, context) : undefined, - ColumnWildcard: output.ColumnWildcard != null ? de_ColumnWildcard(output.ColumnWildcard, context) : undefined, - DatabaseName: __expectString(output.DatabaseName), - Name: __expectString(output.Name), - RowFilter: output.RowFilter != null ? de_RowFilter(output.RowFilter, context) : undefined, - TableCatalogId: __expectString(output.TableCatalogId), - TableName: __expectString(output.TableName), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_DataCellsFilter omitted. -/** - * deserializeAws_restJson1DataCellsFilterList - */ -const de_DataCellsFilterList = (output: any, context: __SerdeContext): DataCellsFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataCellsFilter(entry, context); - }); - return retVal; -}; +// de_DataCellsFilterList omitted. -/** - * deserializeAws_restJson1DataCellsFilterResource - */ -const de_DataCellsFilterResource = (output: any, context: __SerdeContext): DataCellsFilterResource => { - return { - DatabaseName: __expectString(output.DatabaseName), - Name: __expectString(output.Name), - TableCatalogId: __expectString(output.TableCatalogId), - TableName: __expectString(output.TableName), - } as any; -}; +// de_DataCellsFilterResource omitted. -/** - * deserializeAws_restJson1DataLakePrincipal - */ -const de_DataLakePrincipal = (output: any, context: __SerdeContext): DataLakePrincipal => { - return { - DataLakePrincipalIdentifier: __expectString(output.DataLakePrincipalIdentifier), - } as any; -}; +// de_DataLakePrincipal omitted. -/** - * deserializeAws_restJson1DataLakePrincipalList - */ -const de_DataLakePrincipalList = (output: any, context: __SerdeContext): DataLakePrincipal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataLakePrincipal(entry, context); - }); - return retVal; -}; +// de_DataLakePrincipalList omitted. -/** - * deserializeAws_restJson1DataLakeSettings - */ -const de_DataLakeSettings = (output: any, context: __SerdeContext): DataLakeSettings => { - return { - AllowExternalDataFiltering: __expectBoolean(output.AllowExternalDataFiltering), - AuthorizedSessionTagValueList: - output.AuthorizedSessionTagValueList != null - ? de_AuthorizedSessionTagValueList(output.AuthorizedSessionTagValueList, context) - : undefined, - CreateDatabaseDefaultPermissions: - output.CreateDatabaseDefaultPermissions != null - ? de_PrincipalPermissionsList(output.CreateDatabaseDefaultPermissions, context) - : undefined, - CreateTableDefaultPermissions: - output.CreateTableDefaultPermissions != null - ? de_PrincipalPermissionsList(output.CreateTableDefaultPermissions, context) - : undefined, - DataLakeAdmins: - output.DataLakeAdmins != null ? de_DataLakePrincipalList(output.DataLakeAdmins, context) : undefined, - ExternalDataFilteringAllowList: - output.ExternalDataFilteringAllowList != null - ? de_DataLakePrincipalList(output.ExternalDataFilteringAllowList, context) - : undefined, - Parameters: output.Parameters != null ? de_ParametersMap(output.Parameters, context) : undefined, - TrustedResourceOwners: - output.TrustedResourceOwners != null - ? de_TrustedResourceOwners(output.TrustedResourceOwners, context) - : undefined, - } as any; -}; +// de_DataLakeSettings omitted. -/** - * deserializeAws_restJson1DataLocationResource - */ -const de_DataLocationResource = (output: any, context: __SerdeContext): DataLocationResource => { - return { - CatalogId: __expectString(output.CatalogId), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_DataLocationResource omitted. -/** - * deserializeAws_restJson1DetailsMap - */ -const de_DetailsMap = (output: any, context: __SerdeContext): DetailsMap => { - return { - ResourceShare: output.ResourceShare != null ? de_ResourceShareList(output.ResourceShare, context) : undefined, - } as any; -}; +// de_DetailsMap omitted. -/** - * deserializeAws_restJson1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; +// de_ErrorDetail omitted. -/** - * deserializeAws_restJson1ExecutionStatistics - */ -const de_ExecutionStatistics = (output: any, context: __SerdeContext): ExecutionStatistics => { - return { - AverageExecutionTimeMillis: __expectLong(output.AverageExecutionTimeMillis), - DataScannedBytes: __expectLong(output.DataScannedBytes), - WorkUnitsExecutedCount: __expectLong(output.WorkUnitsExecutedCount), - } as any; -}; +// de_ExecutionStatistics omitted. -/** - * deserializeAws_restJson1Expression - */ -const de_Expression = (output: any, context: __SerdeContext): LFTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LFTag(entry, context); - }); - return retVal; -}; +// de_Expression omitted. -/** - * deserializeAws_restJson1LFTag - */ -const de_LFTag = (output: any, context: __SerdeContext): LFTag => { - return { - TagKey: __expectString(output.TagKey), - TagValues: output.TagValues != null ? de_TagValueList(output.TagValues, context) : undefined, - } as any; -}; +// de_LFTag omitted. -/** - * deserializeAws_restJson1LFTagError - */ -const de_LFTagError = (output: any, context: __SerdeContext): LFTagError => { - return { - Error: output.Error != null ? de_ErrorDetail(output.Error, context) : undefined, - LFTag: output.LFTag != null ? de_LFTagPair(output.LFTag, context) : undefined, - } as any; -}; +// de_LFTagError omitted. -/** - * deserializeAws_restJson1LFTagErrors - */ -const de_LFTagErrors = (output: any, context: __SerdeContext): LFTagError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LFTagError(entry, context); - }); - return retVal; -}; +// de_LFTagErrors omitted. -/** - * deserializeAws_restJson1LFTagKeyResource - */ -const de_LFTagKeyResource = (output: any, context: __SerdeContext): LFTagKeyResource => { - return { - CatalogId: __expectString(output.CatalogId), - TagKey: __expectString(output.TagKey), - TagValues: output.TagValues != null ? de_TagValueList(output.TagValues, context) : undefined, - } as any; -}; +// de_LFTagKeyResource omitted. -/** - * deserializeAws_restJson1LFTagPair - */ -const de_LFTagPair = (output: any, context: __SerdeContext): LFTagPair => { - return { - CatalogId: __expectString(output.CatalogId), - TagKey: __expectString(output.TagKey), - TagValues: output.TagValues != null ? de_TagValueList(output.TagValues, context) : undefined, - } as any; -}; +// de_LFTagPair omitted. -/** - * deserializeAws_restJson1LFTagPolicyResource - */ -const de_LFTagPolicyResource = (output: any, context: __SerdeContext): LFTagPolicyResource => { - return { - CatalogId: __expectString(output.CatalogId), - Expression: output.Expression != null ? de_Expression(output.Expression, context) : undefined, - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_LFTagPolicyResource omitted. -/** - * deserializeAws_restJson1LFTagsList - */ -const de_LFTagsList = (output: any, context: __SerdeContext): LFTagPair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LFTagPair(entry, context); - }); - return retVal; -}; +// de_LFTagsList omitted. -/** - * deserializeAws_restJson1ParametersMap - */ -const de_ParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ParametersMap omitted. -/** - * deserializeAws_restJson1PartitionedTableObjectsList - */ -const de_PartitionedTableObjectsList = (output: any, context: __SerdeContext): PartitionObjects[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PartitionObjects(entry, context); - }); - return retVal; -}; +// de_PartitionedTableObjectsList omitted. -/** - * deserializeAws_restJson1PartitionObjects - */ -const de_PartitionObjects = (output: any, context: __SerdeContext): PartitionObjects => { - return { - Objects: output.Objects != null ? de_TableObjectList(output.Objects, context) : undefined, - PartitionValues: - output.PartitionValues != null ? de_PartitionValuesList(output.PartitionValues, context) : undefined, - } as any; -}; +// de_PartitionObjects omitted. -/** - * deserializeAws_restJson1PartitionValuesList - */ -const de_PartitionValuesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PartitionValuesList omitted. -/** - * deserializeAws_restJson1PermissionList - */ -const de_PermissionList = (output: any, context: __SerdeContext): (Permission | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PermissionList omitted. -/** - * deserializeAws_restJson1PlanningStatistics - */ -const de_PlanningStatistics = (output: any, context: __SerdeContext): PlanningStatistics => { - return { - EstimatedDataToScanBytes: __expectLong(output.EstimatedDataToScanBytes), - PlanningTimeMillis: __expectLong(output.PlanningTimeMillis), - QueueTimeMillis: __expectLong(output.QueueTimeMillis), - WorkUnitsGeneratedCount: __expectLong(output.WorkUnitsGeneratedCount), - } as any; -}; +// de_PlanningStatistics omitted. -/** - * deserializeAws_restJson1PrincipalPermissions - */ -const de_PrincipalPermissions = (output: any, context: __SerdeContext): PrincipalPermissions => { - return { - Permissions: output.Permissions != null ? de_PermissionList(output.Permissions, context) : undefined, - Principal: output.Principal != null ? de_DataLakePrincipal(output.Principal, context) : undefined, - } as any; -}; +// de_PrincipalPermissions omitted. -/** - * deserializeAws_restJson1PrincipalPermissionsList - */ -const de_PrincipalPermissionsList = (output: any, context: __SerdeContext): PrincipalPermissions[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PrincipalPermissions(entry, context); - }); - return retVal; -}; +// de_PrincipalPermissionsList omitted. -/** - * deserializeAws_restJson1PrincipalResourcePermissions - */ -const de_PrincipalResourcePermissions = (output: any, context: __SerdeContext): PrincipalResourcePermissions => { - return { - AdditionalDetails: output.AdditionalDetails != null ? de_DetailsMap(output.AdditionalDetails, context) : undefined, - Permissions: output.Permissions != null ? de_PermissionList(output.Permissions, context) : undefined, - PermissionsWithGrantOption: - output.PermissionsWithGrantOption != null - ? de_PermissionList(output.PermissionsWithGrantOption, context) - : undefined, - Principal: output.Principal != null ? de_DataLakePrincipal(output.Principal, context) : undefined, - Resource: output.Resource != null ? de_Resource(output.Resource, context) : undefined, - } as any; -}; +// de_PrincipalResourcePermissions omitted. -/** - * deserializeAws_restJson1PrincipalResourcePermissionsList - */ -const de_PrincipalResourcePermissionsList = (output: any, context: __SerdeContext): PrincipalResourcePermissions[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PrincipalResourcePermissions(entry, context); - }); - return retVal; -}; +// de_PrincipalResourcePermissionsList omitted. -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - Catalog: output.Catalog != null ? de_CatalogResource(output.Catalog, context) : undefined, - DataCellsFilter: - output.DataCellsFilter != null ? de_DataCellsFilterResource(output.DataCellsFilter, context) : undefined, - DataLocation: output.DataLocation != null ? de_DataLocationResource(output.DataLocation, context) : undefined, - Database: output.Database != null ? de_DatabaseResource(output.Database, context) : undefined, - LFTag: output.LFTag != null ? de_LFTagKeyResource(output.LFTag, context) : undefined, - LFTagPolicy: output.LFTagPolicy != null ? de_LFTagPolicyResource(output.LFTagPolicy, context) : undefined, - Table: output.Table != null ? de_TableResource(output.Table, context) : undefined, - TableWithColumns: - output.TableWithColumns != null ? de_TableWithColumnsResource(output.TableWithColumns, context) : undefined, - } as any; -}; +// de_Resource omitted. /** * deserializeAws_restJson1ResourceInfo */ const de_ResourceInfo = (output: any, context: __SerdeContext): ResourceInfo => { - return { - LastModified: - output.LastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified))) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - RoleArn: __expectString(output.RoleArn), - WithFederation: __expectBoolean(output.WithFederation), - } as any; + return take(output, { + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + RoleArn: __expectString, + WithFederation: __expectBoolean, + }) as any; }; /** @@ -5884,206 +4978,49 @@ const de_ResourceInfoList = (output: any, context: __SerdeContext): ResourceInfo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ResourceShareList - */ -const de_ResourceShareList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceShareList omitted. -/** - * deserializeAws_restJson1RowFilter - */ -const de_RowFilter = (output: any, context: __SerdeContext): RowFilter => { - return { - AllRowsWildcard: output.AllRowsWildcard != null ? de_AllRowsWildcard(output.AllRowsWildcard, context) : undefined, - FilterExpression: __expectString(output.FilterExpression), - } as any; -}; +// de_RowFilter omitted. -/** - * deserializeAws_restJson1StorageOptimizer - */ -const de_StorageOptimizer = (output: any, context: __SerdeContext): StorageOptimizer => { - return { - Config: output.Config != null ? de_StorageOptimizerConfig(output.Config, context) : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - LastRunDetails: __expectString(output.LastRunDetails), - StorageOptimizerType: __expectString(output.StorageOptimizerType), - Warnings: __expectString(output.Warnings), - } as any; -}; +// de_StorageOptimizer omitted. -/** - * deserializeAws_restJson1StorageOptimizerConfig - */ -const de_StorageOptimizerConfig = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StorageOptimizerConfig omitted. -/** - * deserializeAws_restJson1StorageOptimizerList - */ -const de_StorageOptimizerList = (output: any, context: __SerdeContext): StorageOptimizer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StorageOptimizer(entry, context); - }); - return retVal; -}; +// de_StorageOptimizerList omitted. -/** - * deserializeAws_restJson1TableLFTagsList - */ -const de_TableLFTagsList = (output: any, context: __SerdeContext): TaggedTable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaggedTable(entry, context); - }); - return retVal; -}; +// de_TableLFTagsList omitted. -/** - * deserializeAws_restJson1TableObject - */ -const de_TableObject = (output: any, context: __SerdeContext): TableObject => { - return { - ETag: __expectString(output.ETag), - Size: __expectLong(output.Size), - Uri: __expectString(output.Uri), - } as any; -}; +// de_TableObject omitted. -/** - * deserializeAws_restJson1TableObjectList - */ -const de_TableObjectList = (output: any, context: __SerdeContext): TableObject[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableObject(entry, context); - }); - return retVal; -}; +// de_TableObjectList omitted. -/** - * deserializeAws_restJson1TableResource - */ -const de_TableResource = (output: any, context: __SerdeContext): TableResource => { - return { - CatalogId: __expectString(output.CatalogId), - DatabaseName: __expectString(output.DatabaseName), - Name: __expectString(output.Name), - TableWildcard: output.TableWildcard != null ? de_TableWildcard(output.TableWildcard, context) : undefined, - } as any; -}; +// de_TableResource omitted. -/** - * deserializeAws_restJson1TableWildcard - */ -const de_TableWildcard = (output: any, context: __SerdeContext): TableWildcard => { - return {} as any; -}; +// de_TableWildcard omitted. -/** - * deserializeAws_restJson1TableWithColumnsResource - */ -const de_TableWithColumnsResource = (output: any, context: __SerdeContext): TableWithColumnsResource => { - return { - CatalogId: __expectString(output.CatalogId), - ColumnNames: output.ColumnNames != null ? de_ColumnNames(output.ColumnNames, context) : undefined, - ColumnWildcard: output.ColumnWildcard != null ? de_ColumnWildcard(output.ColumnWildcard, context) : undefined, - DatabaseName: __expectString(output.DatabaseName), - Name: __expectString(output.Name), - } as any; -}; +// de_TableWithColumnsResource omitted. -/** - * deserializeAws_restJson1TaggedDatabase - */ -const de_TaggedDatabase = (output: any, context: __SerdeContext): TaggedDatabase => { - return { - Database: output.Database != null ? de_DatabaseResource(output.Database, context) : undefined, - LFTags: output.LFTags != null ? de_LFTagsList(output.LFTags, context) : undefined, - } as any; -}; +// de_TaggedDatabase omitted. -/** - * deserializeAws_restJson1TaggedTable - */ -const de_TaggedTable = (output: any, context: __SerdeContext): TaggedTable => { - return { - LFTagOnDatabase: output.LFTagOnDatabase != null ? de_LFTagsList(output.LFTagOnDatabase, context) : undefined, - LFTagsOnColumns: output.LFTagsOnColumns != null ? de_ColumnLFTagsList(output.LFTagsOnColumns, context) : undefined, - LFTagsOnTable: output.LFTagsOnTable != null ? de_LFTagsList(output.LFTagsOnTable, context) : undefined, - Table: output.Table != null ? de_TableResource(output.Table, context) : undefined, - } as any; -}; +// de_TaggedTable omitted. -/** - * deserializeAws_restJson1TagValueList - */ -const de_TagValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagValueList omitted. /** * deserializeAws_restJson1TransactionDescription */ const de_TransactionDescription = (output: any, context: __SerdeContext): TransactionDescription => { - return { - TransactionEndTime: - output.TransactionEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransactionEndTime))) - : undefined, - TransactionId: __expectString(output.TransactionId), - TransactionStartTime: - output.TransactionStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransactionStartTime))) - : undefined, - TransactionStatus: __expectString(output.TransactionStatus), - } as any; + return take(output, { + TransactionEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransactionId: __expectString, + TransactionStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransactionStatus: __expectString, + }) as any; }; /** @@ -6093,54 +5030,16 @@ const de_TransactionDescriptionList = (output: any, context: __SerdeContext): Tr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TransactionDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TrustedResourceOwners - */ -const de_TrustedResourceOwners = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TrustedResourceOwners omitted. -/** - * deserializeAws_restJson1WorkUnitRange - */ -const de_WorkUnitRange = (output: any, context: __SerdeContext): WorkUnitRange => { - return { - WorkUnitIdMax: __expectLong(output.WorkUnitIdMax), - WorkUnitIdMin: __expectLong(output.WorkUnitIdMin), - WorkUnitToken: __expectString(output.WorkUnitToken), - } as any; -}; +// de_WorkUnitRange omitted. -/** - * deserializeAws_restJson1WorkUnitRangeList - */ -const de_WorkUnitRangeList = (output: any, context: __SerdeContext): WorkUnitRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkUnitRange(entry, context); - }); - return retVal; -}; +// de_WorkUnitRangeList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-lambda/src/protocols/Aws_restJson1.ts b/clients/client-lambda/src/protocols/Aws_restJson1.ts index 6b13d16184b7..fbac7915b518 100644 --- a/clients/client-lambda/src/protocols/Aws_restJson1.ts +++ b/clients/client-lambda/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,11 +12,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -218,19 +220,15 @@ import { } from "../commands/UpdateFunctionUrlConfigCommand"; import { LambdaServiceException as __BaseException } from "../models/LambdaServiceException"; import { - AccountLimit, - AccountUsage, AliasConfiguration, AliasRoutingConfiguration, AllowedPublishers, AmazonManagedKafkaEventSourceConfig, Architecture, - CodeSigningConfig, CodeSigningConfigNotFoundException, CodeSigningPolicies, CodeStorageExceededException, CodeVerificationFailedException, - Concurrency, Cors, DeadLetterConfig, DestinationConfig, @@ -242,25 +240,17 @@ import { EFSMountConnectivityException, EFSMountFailureException, EFSMountTimeoutException, - EndPointType, ENILimitReachedException, Environment, - EnvironmentError, - EnvironmentResponse, EphemeralStorage, EventSourceMappingConfiguration, FileSystemConfig, Filter, FilterCriteria, FunctionCode, - FunctionCodeLocation, - FunctionConfiguration, FunctionEventInvokeConfig, FunctionResponseType, - FunctionUrlConfig, ImageConfig, - ImageConfigError, - ImageConfigResponse, InvalidCodeSignatureException, InvalidParameterValueException, InvalidRequestContentException, @@ -275,16 +265,11 @@ import { KMSDisabledException, KMSInvalidStateException, KMSNotFoundException, - Layer, - LayersListItem, LayerVersionContentInput, - LayerVersionContentOutput, - LayerVersionsListItem, OnFailure, OnSuccess, PolicyLengthExceededException, PreconditionFailedException, - ProvisionedConcurrencyConfigListItem, ProvisionedConcurrencyConfigNotFoundException, RequestTooLargeException, ResourceConflictException, @@ -292,8 +277,6 @@ import { ResourceNotFoundException, ResourceNotReadyException, Runtime, - RuntimeVersionConfig, - RuntimeVersionError, ScalingConfig, SelfManagedEventSource, SelfManagedKafkaEventSourceConfig, @@ -301,16 +284,13 @@ import { SnapStart, SnapStartException, SnapStartNotReadyException, - SnapStartResponse, SnapStartTimeoutException, SourceAccessConfiguration, SubnetIPAddressLimitReachedException, TooManyRequestsException, TracingConfig, - TracingConfigResponse, UnsupportedMediaTypeException, VpcConfig, - VpcConfigResponse, } from "../models/models_0"; /** @@ -340,12 +320,14 @@ export const se_AddLayerVersionPermissionCommand = async ( RevisionId: [, input.RevisionId!], }); let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: input.Action }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Principal != null && { Principal: input.Principal }), - ...(input.StatementId != null && { StatementId: input.StatementId }), - }); + body = JSON.stringify( + take(input, { + Action: [], + OrganizationId: [], + Principal: [], + StatementId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -384,17 +366,19 @@ export const se_AddPermissionCommand = async ( Qualifier: [, input.Qualifier!], }); let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: input.Action }), - ...(input.EventSourceToken != null && { EventSourceToken: input.EventSourceToken }), - ...(input.FunctionUrlAuthType != null && { FunctionUrlAuthType: input.FunctionUrlAuthType }), - ...(input.Principal != null && { Principal: input.Principal }), - ...(input.PrincipalOrgID != null && { PrincipalOrgID: input.PrincipalOrgID }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.SourceAccount != null && { SourceAccount: input.SourceAccount }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.StatementId != null && { StatementId: input.StatementId }), - }); + body = JSON.stringify( + take(input, { + Action: [], + EventSourceToken: [], + FunctionUrlAuthType: [], + Principal: [], + PrincipalOrgID: [], + RevisionId: [], + SourceAccount: [], + SourceArn: [], + StatementId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -430,12 +414,14 @@ export const se_CreateAliasCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.FunctionVersion != null && { FunctionVersion: input.FunctionVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoutingConfig != null && { RoutingConfig: se_AliasRoutingConfiguration(input.RoutingConfig, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + FunctionVersion: [], + Name: [], + RoutingConfig: (_) => se_AliasRoutingConfiguration(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -461,15 +447,13 @@ export const se_CreateCodeSigningConfigCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-04-22/code-signing-configs"; let body: any; - body = JSON.stringify({ - ...(input.AllowedPublishers != null && { - AllowedPublishers: se_AllowedPublishers(input.AllowedPublishers, context), - }), - ...(input.CodeSigningPolicies != null && { - CodeSigningPolicies: se_CodeSigningPolicies(input.CodeSigningPolicies, context), - }), - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + AllowedPublishers: (_) => _json(_), + CodeSigningPolicies: (_) => _json(_), + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -495,55 +479,33 @@ export const se_CreateEventSourceMappingCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-03-31/event-source-mappings"; let body: any; - body = JSON.stringify({ - ...(input.AmazonManagedKafkaEventSourceConfig != null && { - AmazonManagedKafkaEventSourceConfig: se_AmazonManagedKafkaEventSourceConfig( - input.AmazonManagedKafkaEventSourceConfig, - context - ), - }), - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.BisectBatchOnFunctionError != null && { BisectBatchOnFunctionError: input.BisectBatchOnFunctionError }), - ...(input.DestinationConfig != null && { - DestinationConfig: se_DestinationConfig(input.DestinationConfig, context), - }), - ...(input.DocumentDBEventSourceConfig != null && { - DocumentDBEventSourceConfig: se_DocumentDBEventSourceConfig(input.DocumentDBEventSourceConfig, context), - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.EventSourceArn != null && { EventSourceArn: input.EventSourceArn }), - ...(input.FilterCriteria != null && { FilterCriteria: se_FilterCriteria(input.FilterCriteria, context) }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - ...(input.FunctionResponseTypes != null && { - FunctionResponseTypes: se_FunctionResponseTypeList(input.FunctionResponseTypes, context), - }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }), - ...(input.Queues != null && { Queues: se_Queues(input.Queues, context) }), - ...(input.ScalingConfig != null && { ScalingConfig: se_ScalingConfig(input.ScalingConfig, context) }), - ...(input.SelfManagedEventSource != null && { - SelfManagedEventSource: se_SelfManagedEventSource(input.SelfManagedEventSource, context), - }), - ...(input.SelfManagedKafkaEventSourceConfig != null && { - SelfManagedKafkaEventSourceConfig: se_SelfManagedKafkaEventSourceConfig( - input.SelfManagedKafkaEventSourceConfig, - context - ), - }), - ...(input.SourceAccessConfigurations != null && { - SourceAccessConfigurations: se_SourceAccessConfigurations(input.SourceAccessConfigurations, context), - }), - ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }), - ...(input.StartingPositionTimestamp != null && { - StartingPositionTimestamp: Math.round(input.StartingPositionTimestamp.getTime() / 1000), - }), - ...(input.Topics != null && { Topics: se_Topics(input.Topics, context) }), - ...(input.TumblingWindowInSeconds != null && { TumblingWindowInSeconds: input.TumblingWindowInSeconds }), - }); + body = JSON.stringify( + take(input, { + AmazonManagedKafkaEventSourceConfig: (_) => _json(_), + BatchSize: [], + BisectBatchOnFunctionError: [], + DestinationConfig: (_) => _json(_), + DocumentDBEventSourceConfig: (_) => _json(_), + Enabled: [], + EventSourceArn: [], + FilterCriteria: (_) => _json(_), + FunctionName: [], + FunctionResponseTypes: (_) => _json(_), + MaximumBatchingWindowInSeconds: [], + MaximumRecordAgeInSeconds: [], + MaximumRetryAttempts: [], + ParallelizationFactor: [], + Queues: (_) => _json(_), + ScalingConfig: (_) => _json(_), + SelfManagedEventSource: (_) => _json(_), + SelfManagedKafkaEventSourceConfig: (_) => _json(_), + SourceAccessConfigurations: (_) => _json(_), + StartingPosition: [], + StartingPositionTimestamp: (_) => Math.round(_.getTime() / 1000), + Topics: (_) => _json(_), + TumblingWindowInSeconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -568,33 +530,33 @@ export const se_CreateFunctionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-03-31/functions"; let body: any; - body = JSON.stringify({ - ...(input.Architectures != null && { Architectures: se_ArchitecturesList(input.Architectures, context) }), - ...(input.Code != null && { Code: se_FunctionCode(input.Code, context) }), - ...(input.CodeSigningConfigArn != null && { CodeSigningConfigArn: input.CodeSigningConfigArn }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Environment != null && { Environment: se_Environment(input.Environment, context) }), - ...(input.EphemeralStorage != null && { EphemeralStorage: se_EphemeralStorage(input.EphemeralStorage, context) }), - ...(input.FileSystemConfigs != null && { - FileSystemConfigs: se_FileSystemConfigList(input.FileSystemConfigs, context), - }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - ...(input.Handler != null && { Handler: input.Handler }), - ...(input.ImageConfig != null && { ImageConfig: se_ImageConfig(input.ImageConfig, context) }), - ...(input.KMSKeyArn != null && { KMSKeyArn: input.KMSKeyArn }), - ...(input.Layers != null && { Layers: se_LayerList(input.Layers, context) }), - ...(input.MemorySize != null && { MemorySize: input.MemorySize }), - ...(input.PackageType != null && { PackageType: input.PackageType }), - ...(input.Publish != null && { Publish: input.Publish }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Runtime != null && { Runtime: input.Runtime }), - ...(input.SnapStart != null && { SnapStart: se_SnapStart(input.SnapStart, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.TracingConfig != null && { TracingConfig: se_TracingConfig(input.TracingConfig, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }); + body = JSON.stringify( + take(input, { + Architectures: (_) => _json(_), + Code: (_) => se_FunctionCode(_, context), + CodeSigningConfigArn: [], + DeadLetterConfig: (_) => _json(_), + Description: [], + Environment: (_) => _json(_), + EphemeralStorage: (_) => _json(_), + FileSystemConfigs: (_) => _json(_), + FunctionName: [], + Handler: [], + ImageConfig: (_) => _json(_), + KMSKeyArn: [], + Layers: (_) => _json(_), + MemorySize: [], + PackageType: [], + Publish: [], + Role: [], + Runtime: [], + SnapStart: (_) => _json(_), + Tags: (_) => _json(_), + Timeout: [], + TracingConfig: (_) => _json(_), + VpcConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -631,11 +593,13 @@ export const se_CreateFunctionUrlConfigCommand = async ( Qualifier: [, input.Qualifier!], }); let body: any; - body = JSON.stringify({ - ...(input.AuthType != null && { AuthType: input.AuthType }), - ...(input.Cors != null && { Cors: se_Cors(input.Cors, context) }), - ...(input.InvokeMode != null && { InvokeMode: input.InvokeMode }), - }); + body = JSON.stringify( + take(input, { + AuthType: [], + Cors: (_) => _json(_), + InvokeMode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2029,17 +1993,15 @@ export const se_PublishLayerVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2018-10-31/layers/{LayerName}/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "LayerName", () => input.LayerName!, "{LayerName}", false); let body: any; - body = JSON.stringify({ - ...(input.CompatibleArchitectures != null && { - CompatibleArchitectures: se_CompatibleArchitectures(input.CompatibleArchitectures, context), - }), - ...(input.CompatibleRuntimes != null && { - CompatibleRuntimes: se_CompatibleRuntimes(input.CompatibleRuntimes, context), - }), - ...(input.Content != null && { Content: se_LayerVersionContentInput(input.Content, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LicenseInfo != null && { LicenseInfo: input.LicenseInfo }), - }); + body = JSON.stringify( + take(input, { + CompatibleArchitectures: (_) => _json(_), + CompatibleRuntimes: (_) => _json(_), + Content: (_) => se_LayerVersionContentInput(_, context), + Description: [], + LicenseInfo: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2074,11 +2036,13 @@ export const se_PublishVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CodeSha256 != null && { CodeSha256: input.CodeSha256 }), - ...(input.Description != null && { Description: input.Description }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }); + body = JSON.stringify( + take(input, { + CodeSha256: [], + Description: [], + RevisionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2113,9 +2077,11 @@ export const se_PutFunctionCodeSigningConfigCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CodeSigningConfigArn != null && { CodeSigningConfigArn: input.CodeSigningConfigArn }), - }); + body = JSON.stringify( + take(input, { + CodeSigningConfigArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2150,11 +2116,11 @@ export const se_PutFunctionConcurrencyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ReservedConcurrentExecutions != null && { - ReservedConcurrentExecutions: input.ReservedConcurrentExecutions, - }), - }); + body = JSON.stringify( + take(input, { + ReservedConcurrentExecutions: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2192,13 +2158,13 @@ export const se_PutFunctionEventInvokeConfigCommand = async ( Qualifier: [, input.Qualifier!], }); let body: any; - body = JSON.stringify({ - ...(input.DestinationConfig != null && { - DestinationConfig: se_DestinationConfig(input.DestinationConfig, context), - }), - ...(input.MaximumEventAgeInSeconds != null && { MaximumEventAgeInSeconds: input.MaximumEventAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - }); + body = JSON.stringify( + take(input, { + DestinationConfig: (_) => _json(_), + MaximumEventAgeInSeconds: [], + MaximumRetryAttempts: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2237,11 +2203,11 @@ export const se_PutProvisionedConcurrencyConfigCommand = async ( Qualifier: [, __expectNonNull(input.Qualifier!, `Qualifier`)], }); let body: any; - body = JSON.stringify({ - ...(input.ProvisionedConcurrentExecutions != null && { - ProvisionedConcurrentExecutions: input.ProvisionedConcurrentExecutions, - }), - }); + body = JSON.stringify( + take(input, { + ProvisionedConcurrentExecutions: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2280,10 +2246,12 @@ export const se_PutRuntimeManagementConfigCommand = async ( Qualifier: [, input.Qualifier!], }); let body: any; - body = JSON.stringify({ - ...(input.RuntimeVersionArn != null && { RuntimeVersionArn: input.RuntimeVersionArn }), - ...(input.UpdateRuntimeOn != null && { UpdateRuntimeOn: input.UpdateRuntimeOn }), - }); + body = JSON.stringify( + take(input, { + RuntimeVersionArn: [], + UpdateRuntimeOn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2387,9 +2355,11 @@ export const se_TagResourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-03-31/tags/{Resource}"; resolvedPath = __resolvedPath(resolvedPath, input, "Resource", () => input.Resource!, "{Resource}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2456,12 +2426,14 @@ export const se_UpdateAliasCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.FunctionVersion != null && { FunctionVersion: input.FunctionVersion }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.RoutingConfig != null && { RoutingConfig: se_AliasRoutingConfiguration(input.RoutingConfig, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + FunctionVersion: [], + RevisionId: [], + RoutingConfig: (_) => se_AliasRoutingConfiguration(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2496,15 +2468,13 @@ export const se_UpdateCodeSigningConfigCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AllowedPublishers != null && { - AllowedPublishers: se_AllowedPublishers(input.AllowedPublishers, context), - }), - ...(input.CodeSigningPolicies != null && { - CodeSigningPolicies: se_CodeSigningPolicies(input.CodeSigningPolicies, context), - }), - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + AllowedPublishers: (_) => _json(_), + CodeSigningPolicies: (_) => _json(_), + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2531,33 +2501,25 @@ export const se_UpdateEventSourceMappingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2015-03-31/event-source-mappings/{UUID}"; resolvedPath = __resolvedPath(resolvedPath, input, "UUID", () => input.UUID!, "{UUID}", false); let body: any; - body = JSON.stringify({ - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.BisectBatchOnFunctionError != null && { BisectBatchOnFunctionError: input.BisectBatchOnFunctionError }), - ...(input.DestinationConfig != null && { - DestinationConfig: se_DestinationConfig(input.DestinationConfig, context), - }), - ...(input.DocumentDBEventSourceConfig != null && { - DocumentDBEventSourceConfig: se_DocumentDBEventSourceConfig(input.DocumentDBEventSourceConfig, context), - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.FilterCriteria != null && { FilterCriteria: se_FilterCriteria(input.FilterCriteria, context) }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - ...(input.FunctionResponseTypes != null && { - FunctionResponseTypes: se_FunctionResponseTypeList(input.FunctionResponseTypes, context), - }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }), - ...(input.ScalingConfig != null && { ScalingConfig: se_ScalingConfig(input.ScalingConfig, context) }), - ...(input.SourceAccessConfigurations != null && { - SourceAccessConfigurations: se_SourceAccessConfigurations(input.SourceAccessConfigurations, context), - }), - ...(input.TumblingWindowInSeconds != null && { TumblingWindowInSeconds: input.TumblingWindowInSeconds }), - }); + body = JSON.stringify( + take(input, { + BatchSize: [], + BisectBatchOnFunctionError: [], + DestinationConfig: (_) => _json(_), + DocumentDBEventSourceConfig: (_) => _json(_), + Enabled: [], + FilterCriteria: (_) => _json(_), + FunctionName: [], + FunctionResponseTypes: (_) => _json(_), + MaximumBatchingWindowInSeconds: [], + MaximumRecordAgeInSeconds: [], + MaximumRetryAttempts: [], + ParallelizationFactor: [], + ScalingConfig: (_) => _json(_), + SourceAccessConfigurations: (_) => _json(_), + TumblingWindowInSeconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2591,17 +2553,19 @@ export const se_UpdateFunctionCodeCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Architectures != null && { Architectures: se_ArchitecturesList(input.Architectures, context) }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - ...(input.Publish != null && { Publish: input.Publish }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - ...(input.S3ObjectVersion != null && { S3ObjectVersion: input.S3ObjectVersion }), - ...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }), - }); + body = JSON.stringify( + take(input, { + Architectures: (_) => _json(_), + DryRun: [], + ImageUri: [], + Publish: [], + RevisionId: [], + S3Bucket: [], + S3Key: [], + S3ObjectVersion: [], + ZipFile: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2636,27 +2600,27 @@ export const se_UpdateFunctionConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Environment != null && { Environment: se_Environment(input.Environment, context) }), - ...(input.EphemeralStorage != null && { EphemeralStorage: se_EphemeralStorage(input.EphemeralStorage, context) }), - ...(input.FileSystemConfigs != null && { - FileSystemConfigs: se_FileSystemConfigList(input.FileSystemConfigs, context), - }), - ...(input.Handler != null && { Handler: input.Handler }), - ...(input.ImageConfig != null && { ImageConfig: se_ImageConfig(input.ImageConfig, context) }), - ...(input.KMSKeyArn != null && { KMSKeyArn: input.KMSKeyArn }), - ...(input.Layers != null && { Layers: se_LayerList(input.Layers, context) }), - ...(input.MemorySize != null && { MemorySize: input.MemorySize }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Runtime != null && { Runtime: input.Runtime }), - ...(input.SnapStart != null && { SnapStart: se_SnapStart(input.SnapStart, context) }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.TracingConfig != null && { TracingConfig: se_TracingConfig(input.TracingConfig, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }); + body = JSON.stringify( + take(input, { + DeadLetterConfig: (_) => _json(_), + Description: [], + Environment: (_) => _json(_), + EphemeralStorage: (_) => _json(_), + FileSystemConfigs: (_) => _json(_), + Handler: [], + ImageConfig: (_) => _json(_), + KMSKeyArn: [], + Layers: (_) => _json(_), + MemorySize: [], + RevisionId: [], + Role: [], + Runtime: [], + SnapStart: (_) => _json(_), + Timeout: [], + TracingConfig: (_) => _json(_), + VpcConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2694,13 +2658,13 @@ export const se_UpdateFunctionEventInvokeConfigCommand = async ( Qualifier: [, input.Qualifier!], }); let body: any; - body = JSON.stringify({ - ...(input.DestinationConfig != null && { - DestinationConfig: se_DestinationConfig(input.DestinationConfig, context), - }), - ...(input.MaximumEventAgeInSeconds != null && { MaximumEventAgeInSeconds: input.MaximumEventAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - }); + body = JSON.stringify( + take(input, { + DestinationConfig: (_) => _json(_), + MaximumEventAgeInSeconds: [], + MaximumRetryAttempts: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2738,11 +2702,13 @@ export const se_UpdateFunctionUrlConfigCommand = async ( Qualifier: [, input.Qualifier!], }); let body: any; - body = JSON.stringify({ - ...(input.AuthType != null && { AuthType: input.AuthType }), - ...(input.Cors != null && { Cors: se_Cors(input.Cors, context) }), - ...(input.InvokeMode != null && { InvokeMode: input.InvokeMode }), - }); + body = JSON.stringify( + take(input, { + AuthType: [], + Cors: (_) => _json(_), + InvokeMode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2769,12 +2735,11 @@ export const de_AddLayerVersionPermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.Statement != null) { - contents.Statement = __expectString(data.Statement); - } + const doc = take(data, { + RevisionId: __expectString, + Statement: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2814,10 +2779,9 @@ const de_AddLayerVersionPermissionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2837,9 +2801,10 @@ export const de_AddPermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Statement != null) { - contents.Statement = __expectString(data.Statement); - } + const doc = take(data, { + Statement: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2879,10 +2844,9 @@ const de_AddPermissionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2902,24 +2866,15 @@ export const de_CreateAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AliasArn != null) { - contents.AliasArn = __expectString(data.AliasArn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FunctionVersion != null) { - contents.FunctionVersion = __expectString(data.FunctionVersion); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.RoutingConfig != null) { - contents.RoutingConfig = de_AliasRoutingConfiguration(data.RoutingConfig, context); - } + const doc = take(data, { + AliasArn: __expectString, + Description: __expectString, + FunctionVersion: __expectString, + Name: __expectString, + RevisionId: __expectString, + RoutingConfig: (_) => de_AliasRoutingConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2953,10 +2908,9 @@ const de_CreateAliasCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2976,9 +2930,10 @@ export const de_CreateCodeSigningConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeSigningConfig != null) { - contents.CodeSigningConfig = de_CodeSigningConfig(data.CodeSigningConfig, context); - } + const doc = take(data, { + CodeSigningConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3003,10 +2958,9 @@ const de_CreateCodeSigningConfigCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3026,95 +2980,36 @@ export const de_CreateEventSourceMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AmazonManagedKafkaEventSourceConfig != null) { - contents.AmazonManagedKafkaEventSourceConfig = de_AmazonManagedKafkaEventSourceConfig( - data.AmazonManagedKafkaEventSourceConfig, - context - ); - } - if (data.BatchSize != null) { - contents.BatchSize = __expectInt32(data.BatchSize); - } - if (data.BisectBatchOnFunctionError != null) { - contents.BisectBatchOnFunctionError = __expectBoolean(data.BisectBatchOnFunctionError); - } - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.DocumentDBEventSourceConfig != null) { - contents.DocumentDBEventSourceConfig = de_DocumentDBEventSourceConfig(data.DocumentDBEventSourceConfig, context); - } - if (data.EventSourceArn != null) { - contents.EventSourceArn = __expectString(data.EventSourceArn); - } - if (data.FilterCriteria != null) { - contents.FilterCriteria = de_FilterCriteria(data.FilterCriteria, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionResponseTypes != null) { - contents.FunctionResponseTypes = de_FunctionResponseTypeList(data.FunctionResponseTypes, context); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.LastProcessingResult != null) { - contents.LastProcessingResult = __expectString(data.LastProcessingResult); - } - if (data.MaximumBatchingWindowInSeconds != null) { - contents.MaximumBatchingWindowInSeconds = __expectInt32(data.MaximumBatchingWindowInSeconds); - } - if (data.MaximumRecordAgeInSeconds != null) { - contents.MaximumRecordAgeInSeconds = __expectInt32(data.MaximumRecordAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } - if (data.ParallelizationFactor != null) { - contents.ParallelizationFactor = __expectInt32(data.ParallelizationFactor); - } - if (data.Queues != null) { - contents.Queues = de_Queues(data.Queues, context); - } - if (data.ScalingConfig != null) { - contents.ScalingConfig = de_ScalingConfig(data.ScalingConfig, context); - } - if (data.SelfManagedEventSource != null) { - contents.SelfManagedEventSource = de_SelfManagedEventSource(data.SelfManagedEventSource, context); - } - if (data.SelfManagedKafkaEventSourceConfig != null) { - contents.SelfManagedKafkaEventSourceConfig = de_SelfManagedKafkaEventSourceConfig( - data.SelfManagedKafkaEventSourceConfig, - context - ); - } - if (data.SourceAccessConfigurations != null) { - contents.SourceAccessConfigurations = de_SourceAccessConfigurations(data.SourceAccessConfigurations, context); - } - if (data.StartingPosition != null) { - contents.StartingPosition = __expectString(data.StartingPosition); - } - if (data.StartingPositionTimestamp != null) { - contents.StartingPositionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.StartingPositionTimestamp)) - ); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateTransitionReason != null) { - contents.StateTransitionReason = __expectString(data.StateTransitionReason); - } - if (data.Topics != null) { - contents.Topics = de_Topics(data.Topics, context); - } - if (data.TumblingWindowInSeconds != null) { - contents.TumblingWindowInSeconds = __expectInt32(data.TumblingWindowInSeconds); - } - if (data.UUID != null) { - contents.UUID = __expectString(data.UUID); - } + const doc = take(data, { + AmazonManagedKafkaEventSourceConfig: _json, + BatchSize: __expectInt32, + BisectBatchOnFunctionError: __expectBoolean, + DestinationConfig: _json, + DocumentDBEventSourceConfig: _json, + EventSourceArn: __expectString, + FilterCriteria: _json, + FunctionArn: __expectString, + FunctionResponseTypes: _json, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastProcessingResult: __expectString, + MaximumBatchingWindowInSeconds: __expectInt32, + MaximumRecordAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + ParallelizationFactor: __expectInt32, + Queues: _json, + ScalingConfig: _json, + SelfManagedEventSource: _json, + SelfManagedKafkaEventSourceConfig: _json, + SourceAccessConfigurations: _json, + StartingPosition: __expectString, + StartingPositionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateTransitionReason: __expectString, + Topics: _json, + TumblingWindowInSeconds: __expectInt32, + UUID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3148,10 +3043,9 @@ const de_CreateEventSourceMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3171,111 +3065,44 @@ export const de_CreateFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Architectures != null) { - contents.Architectures = de_ArchitecturesList(data.Architectures, context); - } - if (data.CodeSha256 != null) { - contents.CodeSha256 = __expectString(data.CodeSha256); - } - if (data.CodeSize != null) { - contents.CodeSize = __expectLong(data.CodeSize); - } - if (data.DeadLetterConfig != null) { - contents.DeadLetterConfig = de_DeadLetterConfig(data.DeadLetterConfig, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Environment != null) { - contents.Environment = de_EnvironmentResponse(data.Environment, context); - } - if (data.EphemeralStorage != null) { - contents.EphemeralStorage = de_EphemeralStorage(data.EphemeralStorage, context); - } - if (data.FileSystemConfigs != null) { - contents.FileSystemConfigs = de_FileSystemConfigList(data.FileSystemConfigs, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } - if (data.Handler != null) { - contents.Handler = __expectString(data.Handler); - } - if (data.ImageConfigResponse != null) { - contents.ImageConfigResponse = de_ImageConfigResponse(data.ImageConfigResponse, context); - } - if (data.KMSKeyArn != null) { - contents.KMSKeyArn = __expectString(data.KMSKeyArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.LastUpdateStatus != null) { - contents.LastUpdateStatus = __expectString(data.LastUpdateStatus); - } - if (data.LastUpdateStatusReason != null) { - contents.LastUpdateStatusReason = __expectString(data.LastUpdateStatusReason); - } - if (data.LastUpdateStatusReasonCode != null) { - contents.LastUpdateStatusReasonCode = __expectString(data.LastUpdateStatusReasonCode); - } - if (data.Layers != null) { - contents.Layers = de_LayersReferenceList(data.Layers, context); - } - if (data.MasterArn != null) { - contents.MasterArn = __expectString(data.MasterArn); - } - if (data.MemorySize != null) { - contents.MemorySize = __expectInt32(data.MemorySize); - } - if (data.PackageType != null) { - contents.PackageType = __expectString(data.PackageType); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.Role != null) { - contents.Role = __expectString(data.Role); - } - if (data.Runtime != null) { - contents.Runtime = __expectString(data.Runtime); - } - if (data.RuntimeVersionConfig != null) { - contents.RuntimeVersionConfig = de_RuntimeVersionConfig(data.RuntimeVersionConfig, context); - } - if (data.SigningJobArn != null) { - contents.SigningJobArn = __expectString(data.SigningJobArn); - } - if (data.SigningProfileVersionArn != null) { - contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn); - } - if (data.SnapStart != null) { - contents.SnapStart = de_SnapStartResponse(data.SnapStart, context); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateReason != null) { - contents.StateReason = __expectString(data.StateReason); - } - if (data.StateReasonCode != null) { - contents.StateReasonCode = __expectString(data.StateReasonCode); - } - if (data.Timeout != null) { - contents.Timeout = __expectInt32(data.Timeout); - } - if (data.TracingConfig != null) { - contents.TracingConfig = de_TracingConfigResponse(data.TracingConfig, context); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } - if (data.VpcConfig != null) { - contents.VpcConfig = de_VpcConfigResponse(data.VpcConfig, context); - } + const doc = take(data, { + Architectures: _json, + CodeSha256: __expectString, + CodeSize: __expectLong, + DeadLetterConfig: _json, + Description: __expectString, + Environment: _json, + EphemeralStorage: _json, + FileSystemConfigs: _json, + FunctionArn: __expectString, + FunctionName: __expectString, + Handler: __expectString, + ImageConfigResponse: _json, + KMSKeyArn: __expectString, + LastModified: __expectString, + LastUpdateStatus: __expectString, + LastUpdateStatusReason: __expectString, + LastUpdateStatusReasonCode: __expectString, + Layers: _json, + MasterArn: __expectString, + MemorySize: __expectInt32, + PackageType: __expectString, + RevisionId: __expectString, + Role: __expectString, + Runtime: __expectString, + RuntimeVersionConfig: _json, + SigningJobArn: __expectString, + SigningProfileVersionArn: __expectString, + SnapStart: _json, + State: __expectString, + StateReason: __expectString, + StateReasonCode: __expectString, + Timeout: __expectInt32, + TracingConfig: _json, + Version: __expectString, + VpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3321,10 +3148,9 @@ const de_CreateFunctionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3344,24 +3170,15 @@ export const de_CreateFunctionUrlConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthType != null) { - contents.AuthType = __expectString(data.AuthType); - } - if (data.Cors != null) { - contents.Cors = de_Cors(data.Cors, context); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectString(data.CreationTime); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionUrl != null) { - contents.FunctionUrl = __expectString(data.FunctionUrl); - } - if (data.InvokeMode != null) { - contents.InvokeMode = __expectString(data.InvokeMode); - } + const doc = take(data, { + AuthType: __expectString, + Cors: _json, + CreationTime: __expectString, + FunctionArn: __expectString, + FunctionUrl: __expectString, + InvokeMode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3395,10 +3212,9 @@ const de_CreateFunctionUrlConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3448,10 +3264,9 @@ const de_DeleteAliasCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3501,10 +3316,9 @@ const de_DeleteCodeSigningConfigCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3524,95 +3338,36 @@ export const de_DeleteEventSourceMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AmazonManagedKafkaEventSourceConfig != null) { - contents.AmazonManagedKafkaEventSourceConfig = de_AmazonManagedKafkaEventSourceConfig( - data.AmazonManagedKafkaEventSourceConfig, - context - ); - } - if (data.BatchSize != null) { - contents.BatchSize = __expectInt32(data.BatchSize); - } - if (data.BisectBatchOnFunctionError != null) { - contents.BisectBatchOnFunctionError = __expectBoolean(data.BisectBatchOnFunctionError); - } - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.DocumentDBEventSourceConfig != null) { - contents.DocumentDBEventSourceConfig = de_DocumentDBEventSourceConfig(data.DocumentDBEventSourceConfig, context); - } - if (data.EventSourceArn != null) { - contents.EventSourceArn = __expectString(data.EventSourceArn); - } - if (data.FilterCriteria != null) { - contents.FilterCriteria = de_FilterCriteria(data.FilterCriteria, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionResponseTypes != null) { - contents.FunctionResponseTypes = de_FunctionResponseTypeList(data.FunctionResponseTypes, context); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.LastProcessingResult != null) { - contents.LastProcessingResult = __expectString(data.LastProcessingResult); - } - if (data.MaximumBatchingWindowInSeconds != null) { - contents.MaximumBatchingWindowInSeconds = __expectInt32(data.MaximumBatchingWindowInSeconds); - } - if (data.MaximumRecordAgeInSeconds != null) { - contents.MaximumRecordAgeInSeconds = __expectInt32(data.MaximumRecordAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } - if (data.ParallelizationFactor != null) { - contents.ParallelizationFactor = __expectInt32(data.ParallelizationFactor); - } - if (data.Queues != null) { - contents.Queues = de_Queues(data.Queues, context); - } - if (data.ScalingConfig != null) { - contents.ScalingConfig = de_ScalingConfig(data.ScalingConfig, context); - } - if (data.SelfManagedEventSource != null) { - contents.SelfManagedEventSource = de_SelfManagedEventSource(data.SelfManagedEventSource, context); - } - if (data.SelfManagedKafkaEventSourceConfig != null) { - contents.SelfManagedKafkaEventSourceConfig = de_SelfManagedKafkaEventSourceConfig( - data.SelfManagedKafkaEventSourceConfig, - context - ); - } - if (data.SourceAccessConfigurations != null) { - contents.SourceAccessConfigurations = de_SourceAccessConfigurations(data.SourceAccessConfigurations, context); - } - if (data.StartingPosition != null) { - contents.StartingPosition = __expectString(data.StartingPosition); - } - if (data.StartingPositionTimestamp != null) { - contents.StartingPositionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.StartingPositionTimestamp)) - ); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateTransitionReason != null) { - contents.StateTransitionReason = __expectString(data.StateTransitionReason); - } - if (data.Topics != null) { - contents.Topics = de_Topics(data.Topics, context); - } - if (data.TumblingWindowInSeconds != null) { - contents.TumblingWindowInSeconds = __expectInt32(data.TumblingWindowInSeconds); - } - if (data.UUID != null) { - contents.UUID = __expectString(data.UUID); - } + const doc = take(data, { + AmazonManagedKafkaEventSourceConfig: _json, + BatchSize: __expectInt32, + BisectBatchOnFunctionError: __expectBoolean, + DestinationConfig: _json, + DocumentDBEventSourceConfig: _json, + EventSourceArn: __expectString, + FilterCriteria: _json, + FunctionArn: __expectString, + FunctionResponseTypes: _json, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastProcessingResult: __expectString, + MaximumBatchingWindowInSeconds: __expectInt32, + MaximumRecordAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + ParallelizationFactor: __expectInt32, + Queues: _json, + ScalingConfig: _json, + SelfManagedEventSource: _json, + SelfManagedKafkaEventSourceConfig: _json, + SourceAccessConfigurations: _json, + StartingPosition: __expectString, + StartingPositionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateTransitionReason: __expectString, + Topics: _json, + TumblingWindowInSeconds: __expectInt32, + UUID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3646,10 +3401,9 @@ const de_DeleteEventSourceMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3702,10 +3456,9 @@ const de_DeleteFunctionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3761,10 +3514,9 @@ const de_DeleteFunctionCodeSigningConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3817,10 +3569,9 @@ const de_DeleteFunctionConcurrencyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3873,10 +3624,9 @@ const de_DeleteFunctionEventInvokeConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3926,10 +3676,9 @@ const de_DeleteFunctionUrlConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3973,10 +3722,9 @@ const de_DeleteLayerVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4029,10 +3777,9 @@ const de_DeleteProvisionedConcurrencyConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4052,12 +3799,11 @@ export const de_GetAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountLimit != null) { - contents.AccountLimit = de_AccountLimit(data.AccountLimit, context); - } - if (data.AccountUsage != null) { - contents.AccountUsage = de_AccountUsage(data.AccountUsage, context); - } + const doc = take(data, { + AccountLimit: _json, + AccountUsage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4082,10 +3828,9 @@ const de_GetAccountSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4105,24 +3850,15 @@ export const de_GetAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AliasArn != null) { - contents.AliasArn = __expectString(data.AliasArn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FunctionVersion != null) { - contents.FunctionVersion = __expectString(data.FunctionVersion); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.RoutingConfig != null) { - contents.RoutingConfig = de_AliasRoutingConfiguration(data.RoutingConfig, context); - } + const doc = take(data, { + AliasArn: __expectString, + Description: __expectString, + FunctionVersion: __expectString, + Name: __expectString, + RevisionId: __expectString, + RoutingConfig: (_) => de_AliasRoutingConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4153,10 +3889,9 @@ const de_GetAliasCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4176,9 +3911,10 @@ export const de_GetCodeSigningConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeSigningConfig != null) { - contents.CodeSigningConfig = de_CodeSigningConfig(data.CodeSigningConfig, context); - } + const doc = take(data, { + CodeSigningConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4206,10 +3942,9 @@ const de_GetCodeSigningConfigCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4229,95 +3964,36 @@ export const de_GetEventSourceMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AmazonManagedKafkaEventSourceConfig != null) { - contents.AmazonManagedKafkaEventSourceConfig = de_AmazonManagedKafkaEventSourceConfig( - data.AmazonManagedKafkaEventSourceConfig, - context - ); - } - if (data.BatchSize != null) { - contents.BatchSize = __expectInt32(data.BatchSize); - } - if (data.BisectBatchOnFunctionError != null) { - contents.BisectBatchOnFunctionError = __expectBoolean(data.BisectBatchOnFunctionError); - } - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.DocumentDBEventSourceConfig != null) { - contents.DocumentDBEventSourceConfig = de_DocumentDBEventSourceConfig(data.DocumentDBEventSourceConfig, context); - } - if (data.EventSourceArn != null) { - contents.EventSourceArn = __expectString(data.EventSourceArn); - } - if (data.FilterCriteria != null) { - contents.FilterCriteria = de_FilterCriteria(data.FilterCriteria, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionResponseTypes != null) { - contents.FunctionResponseTypes = de_FunctionResponseTypeList(data.FunctionResponseTypes, context); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.LastProcessingResult != null) { - contents.LastProcessingResult = __expectString(data.LastProcessingResult); - } - if (data.MaximumBatchingWindowInSeconds != null) { - contents.MaximumBatchingWindowInSeconds = __expectInt32(data.MaximumBatchingWindowInSeconds); - } - if (data.MaximumRecordAgeInSeconds != null) { - contents.MaximumRecordAgeInSeconds = __expectInt32(data.MaximumRecordAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } - if (data.ParallelizationFactor != null) { - contents.ParallelizationFactor = __expectInt32(data.ParallelizationFactor); - } - if (data.Queues != null) { - contents.Queues = de_Queues(data.Queues, context); - } - if (data.ScalingConfig != null) { - contents.ScalingConfig = de_ScalingConfig(data.ScalingConfig, context); - } - if (data.SelfManagedEventSource != null) { - contents.SelfManagedEventSource = de_SelfManagedEventSource(data.SelfManagedEventSource, context); - } - if (data.SelfManagedKafkaEventSourceConfig != null) { - contents.SelfManagedKafkaEventSourceConfig = de_SelfManagedKafkaEventSourceConfig( - data.SelfManagedKafkaEventSourceConfig, - context - ); - } - if (data.SourceAccessConfigurations != null) { - contents.SourceAccessConfigurations = de_SourceAccessConfigurations(data.SourceAccessConfigurations, context); - } - if (data.StartingPosition != null) { - contents.StartingPosition = __expectString(data.StartingPosition); - } - if (data.StartingPositionTimestamp != null) { - contents.StartingPositionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.StartingPositionTimestamp)) - ); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateTransitionReason != null) { - contents.StateTransitionReason = __expectString(data.StateTransitionReason); - } - if (data.Topics != null) { - contents.Topics = de_Topics(data.Topics, context); - } - if (data.TumblingWindowInSeconds != null) { - contents.TumblingWindowInSeconds = __expectInt32(data.TumblingWindowInSeconds); - } - if (data.UUID != null) { - contents.UUID = __expectString(data.UUID); - } + const doc = take(data, { + AmazonManagedKafkaEventSourceConfig: _json, + BatchSize: __expectInt32, + BisectBatchOnFunctionError: __expectBoolean, + DestinationConfig: _json, + DocumentDBEventSourceConfig: _json, + EventSourceArn: __expectString, + FilterCriteria: _json, + FunctionArn: __expectString, + FunctionResponseTypes: _json, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastProcessingResult: __expectString, + MaximumBatchingWindowInSeconds: __expectInt32, + MaximumRecordAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + ParallelizationFactor: __expectInt32, + Queues: _json, + ScalingConfig: _json, + SelfManagedEventSource: _json, + SelfManagedKafkaEventSourceConfig: _json, + SourceAccessConfigurations: _json, + StartingPosition: __expectString, + StartingPositionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateTransitionReason: __expectString, + Topics: _json, + TumblingWindowInSeconds: __expectInt32, + UUID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4348,10 +4024,9 @@ const de_GetEventSourceMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4371,18 +4046,13 @@ export const de_GetFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Code != null) { - contents.Code = de_FunctionCodeLocation(data.Code, context); - } - if (data.Concurrency != null) { - contents.Concurrency = de_Concurrency(data.Concurrency, context); - } - if (data.Configuration != null) { - contents.Configuration = de_FunctionConfiguration(data.Configuration, context); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Code: _json, + Concurrency: _json, + Configuration: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4413,10 +4083,9 @@ const de_GetFunctionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4436,12 +4105,11 @@ export const de_GetFunctionCodeSigningConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeSigningConfigArn != null) { - contents.CodeSigningConfigArn = __expectString(data.CodeSigningConfigArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } + const doc = take(data, { + CodeSigningConfigArn: __expectString, + FunctionName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4472,10 +4140,9 @@ const de_GetFunctionCodeSigningConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4495,9 +4162,10 @@ export const de_GetFunctionConcurrencyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReservedConcurrentExecutions != null) { - contents.ReservedConcurrentExecutions = __expectInt32(data.ReservedConcurrentExecutions); - } + const doc = take(data, { + ReservedConcurrentExecutions: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -4528,10 +4196,9 @@ const de_GetFunctionConcurrencyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4551,111 +4218,44 @@ export const de_GetFunctionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Architectures != null) { - contents.Architectures = de_ArchitecturesList(data.Architectures, context); - } - if (data.CodeSha256 != null) { - contents.CodeSha256 = __expectString(data.CodeSha256); - } - if (data.CodeSize != null) { - contents.CodeSize = __expectLong(data.CodeSize); - } - if (data.DeadLetterConfig != null) { - contents.DeadLetterConfig = de_DeadLetterConfig(data.DeadLetterConfig, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Environment != null) { - contents.Environment = de_EnvironmentResponse(data.Environment, context); - } - if (data.EphemeralStorage != null) { - contents.EphemeralStorage = de_EphemeralStorage(data.EphemeralStorage, context); - } - if (data.FileSystemConfigs != null) { - contents.FileSystemConfigs = de_FileSystemConfigList(data.FileSystemConfigs, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } - if (data.Handler != null) { - contents.Handler = __expectString(data.Handler); - } - if (data.ImageConfigResponse != null) { - contents.ImageConfigResponse = de_ImageConfigResponse(data.ImageConfigResponse, context); - } - if (data.KMSKeyArn != null) { - contents.KMSKeyArn = __expectString(data.KMSKeyArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.LastUpdateStatus != null) { - contents.LastUpdateStatus = __expectString(data.LastUpdateStatus); - } - if (data.LastUpdateStatusReason != null) { - contents.LastUpdateStatusReason = __expectString(data.LastUpdateStatusReason); - } - if (data.LastUpdateStatusReasonCode != null) { - contents.LastUpdateStatusReasonCode = __expectString(data.LastUpdateStatusReasonCode); - } - if (data.Layers != null) { - contents.Layers = de_LayersReferenceList(data.Layers, context); - } - if (data.MasterArn != null) { - contents.MasterArn = __expectString(data.MasterArn); - } - if (data.MemorySize != null) { - contents.MemorySize = __expectInt32(data.MemorySize); - } - if (data.PackageType != null) { - contents.PackageType = __expectString(data.PackageType); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.Role != null) { - contents.Role = __expectString(data.Role); - } - if (data.Runtime != null) { - contents.Runtime = __expectString(data.Runtime); - } - if (data.RuntimeVersionConfig != null) { - contents.RuntimeVersionConfig = de_RuntimeVersionConfig(data.RuntimeVersionConfig, context); - } - if (data.SigningJobArn != null) { - contents.SigningJobArn = __expectString(data.SigningJobArn); - } - if (data.SigningProfileVersionArn != null) { - contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn); - } - if (data.SnapStart != null) { - contents.SnapStart = de_SnapStartResponse(data.SnapStart, context); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateReason != null) { - contents.StateReason = __expectString(data.StateReason); - } - if (data.StateReasonCode != null) { - contents.StateReasonCode = __expectString(data.StateReasonCode); - } - if (data.Timeout != null) { - contents.Timeout = __expectInt32(data.Timeout); - } - if (data.TracingConfig != null) { - contents.TracingConfig = de_TracingConfigResponse(data.TracingConfig, context); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } - if (data.VpcConfig != null) { - contents.VpcConfig = de_VpcConfigResponse(data.VpcConfig, context); - } + const doc = take(data, { + Architectures: _json, + CodeSha256: __expectString, + CodeSize: __expectLong, + DeadLetterConfig: _json, + Description: __expectString, + Environment: _json, + EphemeralStorage: _json, + FileSystemConfigs: _json, + FunctionArn: __expectString, + FunctionName: __expectString, + Handler: __expectString, + ImageConfigResponse: _json, + KMSKeyArn: __expectString, + LastModified: __expectString, + LastUpdateStatus: __expectString, + LastUpdateStatusReason: __expectString, + LastUpdateStatusReasonCode: __expectString, + Layers: _json, + MasterArn: __expectString, + MemorySize: __expectInt32, + PackageType: __expectString, + RevisionId: __expectString, + Role: __expectString, + Runtime: __expectString, + RuntimeVersionConfig: _json, + SigningJobArn: __expectString, + SigningProfileVersionArn: __expectString, + SnapStart: _json, + State: __expectString, + StateReason: __expectString, + StateReasonCode: __expectString, + Timeout: __expectInt32, + TracingConfig: _json, + Version: __expectString, + VpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4686,10 +4286,9 @@ const de_GetFunctionConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4709,21 +4308,14 @@ export const de_GetFunctionEventInvokeConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.MaximumEventAgeInSeconds != null) { - contents.MaximumEventAgeInSeconds = __expectInt32(data.MaximumEventAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } + const doc = take(data, { + DestinationConfig: _json, + FunctionArn: __expectString, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaximumEventAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -4754,10 +4346,9 @@ const de_GetFunctionEventInvokeConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4777,27 +4368,16 @@ export const de_GetFunctionUrlConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthType != null) { - contents.AuthType = __expectString(data.AuthType); - } - if (data.Cors != null) { - contents.Cors = de_Cors(data.Cors, context); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectString(data.CreationTime); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionUrl != null) { - contents.FunctionUrl = __expectString(data.FunctionUrl); - } - if (data.InvokeMode != null) { - contents.InvokeMode = __expectString(data.InvokeMode); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectString(data.LastModifiedTime); - } + const doc = take(data, { + AuthType: __expectString, + Cors: _json, + CreationTime: __expectString, + FunctionArn: __expectString, + FunctionUrl: __expectString, + InvokeMode: __expectString, + LastModifiedTime: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4828,10 +4408,9 @@ const de_GetFunctionUrlConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4851,33 +4430,18 @@ export const de_GetLayerVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompatibleArchitectures != null) { - contents.CompatibleArchitectures = de_CompatibleArchitectures(data.CompatibleArchitectures, context); - } - if (data.CompatibleRuntimes != null) { - contents.CompatibleRuntimes = de_CompatibleRuntimes(data.CompatibleRuntimes, context); - } - if (data.Content != null) { - contents.Content = de_LayerVersionContentOutput(data.Content, context); - } - if (data.CreatedDate != null) { - contents.CreatedDate = __expectString(data.CreatedDate); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LayerArn != null) { - contents.LayerArn = __expectString(data.LayerArn); - } - if (data.LayerVersionArn != null) { - contents.LayerVersionArn = __expectString(data.LayerVersionArn); - } - if (data.LicenseInfo != null) { - contents.LicenseInfo = __expectString(data.LicenseInfo); - } - if (data.Version != null) { - contents.Version = __expectLong(data.Version); - } + const doc = take(data, { + CompatibleArchitectures: _json, + CompatibleRuntimes: _json, + Content: _json, + CreatedDate: __expectString, + Description: __expectString, + LayerArn: __expectString, + LayerVersionArn: __expectString, + LicenseInfo: __expectString, + Version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -4908,10 +4472,9 @@ const de_GetLayerVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4931,33 +4494,18 @@ export const de_GetLayerVersionByArnCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompatibleArchitectures != null) { - contents.CompatibleArchitectures = de_CompatibleArchitectures(data.CompatibleArchitectures, context); - } - if (data.CompatibleRuntimes != null) { - contents.CompatibleRuntimes = de_CompatibleRuntimes(data.CompatibleRuntimes, context); - } - if (data.Content != null) { - contents.Content = de_LayerVersionContentOutput(data.Content, context); - } - if (data.CreatedDate != null) { - contents.CreatedDate = __expectString(data.CreatedDate); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LayerArn != null) { - contents.LayerArn = __expectString(data.LayerArn); - } - if (data.LayerVersionArn != null) { - contents.LayerVersionArn = __expectString(data.LayerVersionArn); - } - if (data.LicenseInfo != null) { - contents.LicenseInfo = __expectString(data.LicenseInfo); - } - if (data.Version != null) { - contents.Version = __expectLong(data.Version); - } + const doc = take(data, { + CompatibleArchitectures: _json, + CompatibleRuntimes: _json, + Content: _json, + CreatedDate: __expectString, + Description: __expectString, + LayerArn: __expectString, + LayerVersionArn: __expectString, + LicenseInfo: __expectString, + Version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -4988,10 +4536,9 @@ const de_GetLayerVersionByArnCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5011,12 +4558,11 @@ export const de_GetLayerVersionPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } + const doc = take(data, { + Policy: __expectString, + RevisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5047,10 +4593,9 @@ const de_GetLayerVersionPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5070,12 +4615,11 @@ export const de_GetPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } + const doc = take(data, { + Policy: __expectString, + RevisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5106,10 +4650,9 @@ const de_GetPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5129,24 +4672,15 @@ export const de_GetProvisionedConcurrencyConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AllocatedProvisionedConcurrentExecutions != null) { - contents.AllocatedProvisionedConcurrentExecutions = __expectInt32(data.AllocatedProvisionedConcurrentExecutions); - } - if (data.AvailableProvisionedConcurrentExecutions != null) { - contents.AvailableProvisionedConcurrentExecutions = __expectInt32(data.AvailableProvisionedConcurrentExecutions); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.RequestedProvisionedConcurrentExecutions != null) { - contents.RequestedProvisionedConcurrentExecutions = __expectInt32(data.RequestedProvisionedConcurrentExecutions); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusReason != null) { - contents.StatusReason = __expectString(data.StatusReason); - } + const doc = take(data, { + AllocatedProvisionedConcurrentExecutions: __expectInt32, + AvailableProvisionedConcurrentExecutions: __expectInt32, + LastModified: __expectString, + RequestedProvisionedConcurrentExecutions: __expectInt32, + Status: __expectString, + StatusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5180,10 +4714,9 @@ const de_GetProvisionedConcurrencyConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5203,15 +4736,12 @@ export const de_GetRuntimeManagementConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.RuntimeVersionArn != null) { - contents.RuntimeVersionArn = __expectString(data.RuntimeVersionArn); - } - if (data.UpdateRuntimeOn != null) { - contents.UpdateRuntimeOn = __expectString(data.UpdateRuntimeOn); - } + const doc = take(data, { + FunctionArn: __expectString, + RuntimeVersionArn: __expectString, + UpdateRuntimeOn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5242,10 +4772,9 @@ const de_GetRuntimeManagementConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5374,10 +4903,9 @@ const de_InvokeCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5433,10 +4961,9 @@ const de_InvokeAsyncCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5567,10 +5094,9 @@ const de_InvokeWithResponseStreamCommandError = async ( throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5590,12 +5116,11 @@ export const de_ListAliasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Aliases != null) { - contents.Aliases = de_AliasList(data.Aliases, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + Aliases: (_) => de_AliasList(_, context), + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5626,10 +5151,9 @@ const de_ListAliasesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5649,12 +5173,11 @@ export const de_ListCodeSigningConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeSigningConfigs != null) { - contents.CodeSigningConfigs = de_CodeSigningConfigList(data.CodeSigningConfigs, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + CodeSigningConfigs: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5679,10 +5202,9 @@ const de_ListCodeSigningConfigsCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5702,12 +5224,11 @@ export const de_ListEventSourceMappingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventSourceMappings != null) { - contents.EventSourceMappings = de_EventSourceMappingsList(data.EventSourceMappings, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + EventSourceMappings: (_) => de_EventSourceMappingsList(_, context), + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5738,10 +5259,9 @@ const de_ListEventSourceMappingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5761,12 +5281,11 @@ export const de_ListFunctionEventInvokeConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FunctionEventInvokeConfigs != null) { - contents.FunctionEventInvokeConfigs = de_FunctionEventInvokeConfigList(data.FunctionEventInvokeConfigs, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + FunctionEventInvokeConfigs: (_) => de_FunctionEventInvokeConfigList(_, context), + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5797,10 +5316,9 @@ const de_ListFunctionEventInvokeConfigsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5820,12 +5338,11 @@ export const de_ListFunctionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Functions != null) { - contents.Functions = de_FunctionList(data.Functions, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + Functions: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5853,10 +5370,9 @@ const de_ListFunctionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5876,12 +5392,11 @@ export const de_ListFunctionsByCodeSigningConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FunctionArns != null) { - contents.FunctionArns = de_FunctionArnList(data.FunctionArns, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + FunctionArns: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5909,10 +5424,9 @@ const de_ListFunctionsByCodeSigningConfigCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5932,12 +5446,11 @@ export const de_ListFunctionUrlConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FunctionUrlConfigs != null) { - contents.FunctionUrlConfigs = de_FunctionUrlConfigList(data.FunctionUrlConfigs, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + FunctionUrlConfigs: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5968,10 +5481,9 @@ const de_ListFunctionUrlConfigsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5991,12 +5503,11 @@ export const de_ListLayersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Layers != null) { - contents.Layers = de_LayersList(data.Layers, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + Layers: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6024,10 +5535,9 @@ const de_ListLayersCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6047,12 +5557,11 @@ export const de_ListLayerVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LayerVersions != null) { - contents.LayerVersions = de_LayerVersionsList(data.LayerVersions, context); - } - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } + const doc = take(data, { + LayerVersions: _json, + NextMarker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6083,10 +5592,9 @@ const de_ListLayerVersionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6106,15 +5614,11 @@ export const de_ListProvisionedConcurrencyConfigsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } - if (data.ProvisionedConcurrencyConfigs != null) { - contents.ProvisionedConcurrencyConfigs = de_ProvisionedConcurrencyConfigList( - data.ProvisionedConcurrencyConfigs, - context - ); - } + const doc = take(data, { + NextMarker: __expectString, + ProvisionedConcurrencyConfigs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6145,10 +5649,9 @@ const de_ListProvisionedConcurrencyConfigsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6168,9 +5671,10 @@ export const de_ListTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6201,10 +5705,9 @@ const de_ListTagsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6224,12 +5727,11 @@ export const de_ListVersionsByFunctionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextMarker != null) { - contents.NextMarker = __expectString(data.NextMarker); - } - if (data.Versions != null) { - contents.Versions = de_FunctionList(data.Versions, context); - } + const doc = take(data, { + NextMarker: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6260,10 +5762,9 @@ const de_ListVersionsByFunctionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6283,33 +5784,18 @@ export const de_PublishLayerVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompatibleArchitectures != null) { - contents.CompatibleArchitectures = de_CompatibleArchitectures(data.CompatibleArchitectures, context); - } - if (data.CompatibleRuntimes != null) { - contents.CompatibleRuntimes = de_CompatibleRuntimes(data.CompatibleRuntimes, context); - } - if (data.Content != null) { - contents.Content = de_LayerVersionContentOutput(data.Content, context); - } - if (data.CreatedDate != null) { - contents.CreatedDate = __expectString(data.CreatedDate); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LayerArn != null) { - contents.LayerArn = __expectString(data.LayerArn); - } - if (data.LayerVersionArn != null) { - contents.LayerVersionArn = __expectString(data.LayerVersionArn); - } - if (data.LicenseInfo != null) { - contents.LicenseInfo = __expectString(data.LicenseInfo); - } - if (data.Version != null) { - contents.Version = __expectLong(data.Version); - } + const doc = take(data, { + CompatibleArchitectures: _json, + CompatibleRuntimes: _json, + Content: _json, + CreatedDate: __expectString, + Description: __expectString, + LayerArn: __expectString, + LayerVersionArn: __expectString, + LicenseInfo: __expectString, + Version: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -6343,10 +5829,9 @@ const de_PublishLayerVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6366,111 +5851,44 @@ export const de_PublishVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Architectures != null) { - contents.Architectures = de_ArchitecturesList(data.Architectures, context); - } - if (data.CodeSha256 != null) { - contents.CodeSha256 = __expectString(data.CodeSha256); - } - if (data.CodeSize != null) { - contents.CodeSize = __expectLong(data.CodeSize); - } - if (data.DeadLetterConfig != null) { - contents.DeadLetterConfig = de_DeadLetterConfig(data.DeadLetterConfig, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Environment != null) { - contents.Environment = de_EnvironmentResponse(data.Environment, context); - } - if (data.EphemeralStorage != null) { - contents.EphemeralStorage = de_EphemeralStorage(data.EphemeralStorage, context); - } - if (data.FileSystemConfigs != null) { - contents.FileSystemConfigs = de_FileSystemConfigList(data.FileSystemConfigs, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } - if (data.Handler != null) { - contents.Handler = __expectString(data.Handler); - } - if (data.ImageConfigResponse != null) { - contents.ImageConfigResponse = de_ImageConfigResponse(data.ImageConfigResponse, context); - } - if (data.KMSKeyArn != null) { - contents.KMSKeyArn = __expectString(data.KMSKeyArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.LastUpdateStatus != null) { - contents.LastUpdateStatus = __expectString(data.LastUpdateStatus); - } - if (data.LastUpdateStatusReason != null) { - contents.LastUpdateStatusReason = __expectString(data.LastUpdateStatusReason); - } - if (data.LastUpdateStatusReasonCode != null) { - contents.LastUpdateStatusReasonCode = __expectString(data.LastUpdateStatusReasonCode); - } - if (data.Layers != null) { - contents.Layers = de_LayersReferenceList(data.Layers, context); - } - if (data.MasterArn != null) { - contents.MasterArn = __expectString(data.MasterArn); - } - if (data.MemorySize != null) { - contents.MemorySize = __expectInt32(data.MemorySize); - } - if (data.PackageType != null) { - contents.PackageType = __expectString(data.PackageType); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.Role != null) { - contents.Role = __expectString(data.Role); - } - if (data.Runtime != null) { - contents.Runtime = __expectString(data.Runtime); - } - if (data.RuntimeVersionConfig != null) { - contents.RuntimeVersionConfig = de_RuntimeVersionConfig(data.RuntimeVersionConfig, context); - } - if (data.SigningJobArn != null) { - contents.SigningJobArn = __expectString(data.SigningJobArn); - } - if (data.SigningProfileVersionArn != null) { - contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn); - } - if (data.SnapStart != null) { - contents.SnapStart = de_SnapStartResponse(data.SnapStart, context); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateReason != null) { - contents.StateReason = __expectString(data.StateReason); - } - if (data.StateReasonCode != null) { - contents.StateReasonCode = __expectString(data.StateReasonCode); - } - if (data.Timeout != null) { - contents.Timeout = __expectInt32(data.Timeout); - } - if (data.TracingConfig != null) { - contents.TracingConfig = de_TracingConfigResponse(data.TracingConfig, context); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } - if (data.VpcConfig != null) { - contents.VpcConfig = de_VpcConfigResponse(data.VpcConfig, context); - } + const doc = take(data, { + Architectures: _json, + CodeSha256: __expectString, + CodeSize: __expectLong, + DeadLetterConfig: _json, + Description: __expectString, + Environment: _json, + EphemeralStorage: _json, + FileSystemConfigs: _json, + FunctionArn: __expectString, + FunctionName: __expectString, + Handler: __expectString, + ImageConfigResponse: _json, + KMSKeyArn: __expectString, + LastModified: __expectString, + LastUpdateStatus: __expectString, + LastUpdateStatusReason: __expectString, + LastUpdateStatusReasonCode: __expectString, + Layers: _json, + MasterArn: __expectString, + MemorySize: __expectInt32, + PackageType: __expectString, + RevisionId: __expectString, + Role: __expectString, + Runtime: __expectString, + RuntimeVersionConfig: _json, + SigningJobArn: __expectString, + SigningProfileVersionArn: __expectString, + SnapStart: _json, + State: __expectString, + StateReason: __expectString, + StateReasonCode: __expectString, + Timeout: __expectInt32, + TracingConfig: _json, + Version: __expectString, + VpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6510,10 +5928,9 @@ const de_PublishVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6533,12 +5950,11 @@ export const de_PutFunctionCodeSigningConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeSigningConfigArn != null) { - contents.CodeSigningConfigArn = __expectString(data.CodeSigningConfigArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } + const doc = take(data, { + CodeSigningConfigArn: __expectString, + FunctionName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6575,10 +5991,9 @@ const de_PutFunctionCodeSigningConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6598,9 +6013,10 @@ export const de_PutFunctionConcurrencyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReservedConcurrentExecutions != null) { - contents.ReservedConcurrentExecutions = __expectInt32(data.ReservedConcurrentExecutions); - } + const doc = take(data, { + ReservedConcurrentExecutions: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -6634,10 +6050,9 @@ const de_PutFunctionConcurrencyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6657,21 +6072,14 @@ export const de_PutFunctionEventInvokeConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.MaximumEventAgeInSeconds != null) { - contents.MaximumEventAgeInSeconds = __expectInt32(data.MaximumEventAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } + const doc = take(data, { + DestinationConfig: _json, + FunctionArn: __expectString, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaximumEventAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -6705,10 +6113,9 @@ const de_PutFunctionEventInvokeConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6728,24 +6135,15 @@ export const de_PutProvisionedConcurrencyConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AllocatedProvisionedConcurrentExecutions != null) { - contents.AllocatedProvisionedConcurrentExecutions = __expectInt32(data.AllocatedProvisionedConcurrentExecutions); - } - if (data.AvailableProvisionedConcurrentExecutions != null) { - contents.AvailableProvisionedConcurrentExecutions = __expectInt32(data.AvailableProvisionedConcurrentExecutions); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.RequestedProvisionedConcurrentExecutions != null) { - contents.RequestedProvisionedConcurrentExecutions = __expectInt32(data.RequestedProvisionedConcurrentExecutions); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusReason != null) { - contents.StatusReason = __expectString(data.StatusReason); - } + const doc = take(data, { + AllocatedProvisionedConcurrentExecutions: __expectInt32, + AvailableProvisionedConcurrentExecutions: __expectInt32, + LastModified: __expectString, + RequestedProvisionedConcurrentExecutions: __expectInt32, + Status: __expectString, + StatusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6779,10 +6177,9 @@ const de_PutProvisionedConcurrencyConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6802,15 +6199,12 @@ export const de_PutRuntimeManagementConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.RuntimeVersionArn != null) { - contents.RuntimeVersionArn = __expectString(data.RuntimeVersionArn); - } - if (data.UpdateRuntimeOn != null) { - contents.UpdateRuntimeOn = __expectString(data.UpdateRuntimeOn); - } + const doc = take(data, { + FunctionArn: __expectString, + RuntimeVersionArn: __expectString, + UpdateRuntimeOn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6844,10 +6238,9 @@ const de_PutRuntimeManagementConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6900,10 +6293,9 @@ const de_RemoveLayerVersionPermissionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6956,10 +6348,9 @@ const de_RemovePermissionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7012,10 +6403,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7068,10 +6458,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7091,24 +6480,15 @@ export const de_UpdateAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AliasArn != null) { - contents.AliasArn = __expectString(data.AliasArn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.FunctionVersion != null) { - contents.FunctionVersion = __expectString(data.FunctionVersion); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.RoutingConfig != null) { - contents.RoutingConfig = de_AliasRoutingConfiguration(data.RoutingConfig, context); - } + const doc = take(data, { + AliasArn: __expectString, + Description: __expectString, + FunctionVersion: __expectString, + Name: __expectString, + RevisionId: __expectString, + RoutingConfig: (_) => de_AliasRoutingConfiguration(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7145,10 +6525,9 @@ const de_UpdateAliasCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7168,9 +6547,10 @@ export const de_UpdateCodeSigningConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CodeSigningConfig != null) { - contents.CodeSigningConfig = de_CodeSigningConfig(data.CodeSigningConfig, context); - } + const doc = take(data, { + CodeSigningConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7198,10 +6578,9 @@ const de_UpdateCodeSigningConfigCommandError = async ( throw await de_ServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7221,95 +6600,36 @@ export const de_UpdateEventSourceMappingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AmazonManagedKafkaEventSourceConfig != null) { - contents.AmazonManagedKafkaEventSourceConfig = de_AmazonManagedKafkaEventSourceConfig( - data.AmazonManagedKafkaEventSourceConfig, - context - ); - } - if (data.BatchSize != null) { - contents.BatchSize = __expectInt32(data.BatchSize); - } - if (data.BisectBatchOnFunctionError != null) { - contents.BisectBatchOnFunctionError = __expectBoolean(data.BisectBatchOnFunctionError); - } - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.DocumentDBEventSourceConfig != null) { - contents.DocumentDBEventSourceConfig = de_DocumentDBEventSourceConfig(data.DocumentDBEventSourceConfig, context); - } - if (data.EventSourceArn != null) { - contents.EventSourceArn = __expectString(data.EventSourceArn); - } - if (data.FilterCriteria != null) { - contents.FilterCriteria = de_FilterCriteria(data.FilterCriteria, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionResponseTypes != null) { - contents.FunctionResponseTypes = de_FunctionResponseTypeList(data.FunctionResponseTypes, context); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.LastProcessingResult != null) { - contents.LastProcessingResult = __expectString(data.LastProcessingResult); - } - if (data.MaximumBatchingWindowInSeconds != null) { - contents.MaximumBatchingWindowInSeconds = __expectInt32(data.MaximumBatchingWindowInSeconds); - } - if (data.MaximumRecordAgeInSeconds != null) { - contents.MaximumRecordAgeInSeconds = __expectInt32(data.MaximumRecordAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } - if (data.ParallelizationFactor != null) { - contents.ParallelizationFactor = __expectInt32(data.ParallelizationFactor); - } - if (data.Queues != null) { - contents.Queues = de_Queues(data.Queues, context); - } - if (data.ScalingConfig != null) { - contents.ScalingConfig = de_ScalingConfig(data.ScalingConfig, context); - } - if (data.SelfManagedEventSource != null) { - contents.SelfManagedEventSource = de_SelfManagedEventSource(data.SelfManagedEventSource, context); - } - if (data.SelfManagedKafkaEventSourceConfig != null) { - contents.SelfManagedKafkaEventSourceConfig = de_SelfManagedKafkaEventSourceConfig( - data.SelfManagedKafkaEventSourceConfig, - context - ); - } - if (data.SourceAccessConfigurations != null) { - contents.SourceAccessConfigurations = de_SourceAccessConfigurations(data.SourceAccessConfigurations, context); - } - if (data.StartingPosition != null) { - contents.StartingPosition = __expectString(data.StartingPosition); - } - if (data.StartingPositionTimestamp != null) { - contents.StartingPositionTimestamp = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.StartingPositionTimestamp)) - ); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateTransitionReason != null) { - contents.StateTransitionReason = __expectString(data.StateTransitionReason); - } - if (data.Topics != null) { - contents.Topics = de_Topics(data.Topics, context); - } - if (data.TumblingWindowInSeconds != null) { - contents.TumblingWindowInSeconds = __expectInt32(data.TumblingWindowInSeconds); - } - if (data.UUID != null) { - contents.UUID = __expectString(data.UUID); - } + const doc = take(data, { + AmazonManagedKafkaEventSourceConfig: _json, + BatchSize: __expectInt32, + BisectBatchOnFunctionError: __expectBoolean, + DestinationConfig: _json, + DocumentDBEventSourceConfig: _json, + EventSourceArn: __expectString, + FilterCriteria: _json, + FunctionArn: __expectString, + FunctionResponseTypes: _json, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastProcessingResult: __expectString, + MaximumBatchingWindowInSeconds: __expectInt32, + MaximumRecordAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + ParallelizationFactor: __expectInt32, + Queues: _json, + ScalingConfig: _json, + SelfManagedEventSource: _json, + SelfManagedKafkaEventSourceConfig: _json, + SourceAccessConfigurations: _json, + StartingPosition: __expectString, + StartingPositionTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateTransitionReason: __expectString, + Topics: _json, + TumblingWindowInSeconds: __expectInt32, + UUID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7346,10 +6666,9 @@ const de_UpdateEventSourceMappingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7369,111 +6688,44 @@ export const de_UpdateFunctionCodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Architectures != null) { - contents.Architectures = de_ArchitecturesList(data.Architectures, context); - } - if (data.CodeSha256 != null) { - contents.CodeSha256 = __expectString(data.CodeSha256); - } - if (data.CodeSize != null) { - contents.CodeSize = __expectLong(data.CodeSize); - } - if (data.DeadLetterConfig != null) { - contents.DeadLetterConfig = de_DeadLetterConfig(data.DeadLetterConfig, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Environment != null) { - contents.Environment = de_EnvironmentResponse(data.Environment, context); - } - if (data.EphemeralStorage != null) { - contents.EphemeralStorage = de_EphemeralStorage(data.EphemeralStorage, context); - } - if (data.FileSystemConfigs != null) { - contents.FileSystemConfigs = de_FileSystemConfigList(data.FileSystemConfigs, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } - if (data.Handler != null) { - contents.Handler = __expectString(data.Handler); - } - if (data.ImageConfigResponse != null) { - contents.ImageConfigResponse = de_ImageConfigResponse(data.ImageConfigResponse, context); - } - if (data.KMSKeyArn != null) { - contents.KMSKeyArn = __expectString(data.KMSKeyArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.LastUpdateStatus != null) { - contents.LastUpdateStatus = __expectString(data.LastUpdateStatus); - } - if (data.LastUpdateStatusReason != null) { - contents.LastUpdateStatusReason = __expectString(data.LastUpdateStatusReason); - } - if (data.LastUpdateStatusReasonCode != null) { - contents.LastUpdateStatusReasonCode = __expectString(data.LastUpdateStatusReasonCode); - } - if (data.Layers != null) { - contents.Layers = de_LayersReferenceList(data.Layers, context); - } - if (data.MasterArn != null) { - contents.MasterArn = __expectString(data.MasterArn); - } - if (data.MemorySize != null) { - contents.MemorySize = __expectInt32(data.MemorySize); - } - if (data.PackageType != null) { - contents.PackageType = __expectString(data.PackageType); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.Role != null) { - contents.Role = __expectString(data.Role); - } - if (data.Runtime != null) { - contents.Runtime = __expectString(data.Runtime); - } - if (data.RuntimeVersionConfig != null) { - contents.RuntimeVersionConfig = de_RuntimeVersionConfig(data.RuntimeVersionConfig, context); - } - if (data.SigningJobArn != null) { - contents.SigningJobArn = __expectString(data.SigningJobArn); - } - if (data.SigningProfileVersionArn != null) { - contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn); - } - if (data.SnapStart != null) { - contents.SnapStart = de_SnapStartResponse(data.SnapStart, context); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateReason != null) { - contents.StateReason = __expectString(data.StateReason); - } - if (data.StateReasonCode != null) { - contents.StateReasonCode = __expectString(data.StateReasonCode); - } - if (data.Timeout != null) { - contents.Timeout = __expectInt32(data.Timeout); - } - if (data.TracingConfig != null) { - contents.TracingConfig = de_TracingConfigResponse(data.TracingConfig, context); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } - if (data.VpcConfig != null) { - contents.VpcConfig = de_VpcConfigResponse(data.VpcConfig, context); - } + const doc = take(data, { + Architectures: _json, + CodeSha256: __expectString, + CodeSize: __expectLong, + DeadLetterConfig: _json, + Description: __expectString, + Environment: _json, + EphemeralStorage: _json, + FileSystemConfigs: _json, + FunctionArn: __expectString, + FunctionName: __expectString, + Handler: __expectString, + ImageConfigResponse: _json, + KMSKeyArn: __expectString, + LastModified: __expectString, + LastUpdateStatus: __expectString, + LastUpdateStatusReason: __expectString, + LastUpdateStatusReasonCode: __expectString, + Layers: _json, + MasterArn: __expectString, + MemorySize: __expectInt32, + PackageType: __expectString, + RevisionId: __expectString, + Role: __expectString, + Runtime: __expectString, + RuntimeVersionConfig: _json, + SigningJobArn: __expectString, + SigningProfileVersionArn: __expectString, + SnapStart: _json, + State: __expectString, + StateReason: __expectString, + StateReasonCode: __expectString, + Timeout: __expectInt32, + TracingConfig: _json, + Version: __expectString, + VpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7522,10 +6774,9 @@ const de_UpdateFunctionCodeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7545,111 +6796,44 @@ export const de_UpdateFunctionConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Architectures != null) { - contents.Architectures = de_ArchitecturesList(data.Architectures, context); - } - if (data.CodeSha256 != null) { - contents.CodeSha256 = __expectString(data.CodeSha256); - } - if (data.CodeSize != null) { - contents.CodeSize = __expectLong(data.CodeSize); - } - if (data.DeadLetterConfig != null) { - contents.DeadLetterConfig = de_DeadLetterConfig(data.DeadLetterConfig, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Environment != null) { - contents.Environment = de_EnvironmentResponse(data.Environment, context); - } - if (data.EphemeralStorage != null) { - contents.EphemeralStorage = de_EphemeralStorage(data.EphemeralStorage, context); - } - if (data.FileSystemConfigs != null) { - contents.FileSystemConfigs = de_FileSystemConfigList(data.FileSystemConfigs, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionName != null) { - contents.FunctionName = __expectString(data.FunctionName); - } - if (data.Handler != null) { - contents.Handler = __expectString(data.Handler); - } - if (data.ImageConfigResponse != null) { - contents.ImageConfigResponse = de_ImageConfigResponse(data.ImageConfigResponse, context); - } - if (data.KMSKeyArn != null) { - contents.KMSKeyArn = __expectString(data.KMSKeyArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectString(data.LastModified); - } - if (data.LastUpdateStatus != null) { - contents.LastUpdateStatus = __expectString(data.LastUpdateStatus); - } - if (data.LastUpdateStatusReason != null) { - contents.LastUpdateStatusReason = __expectString(data.LastUpdateStatusReason); - } - if (data.LastUpdateStatusReasonCode != null) { - contents.LastUpdateStatusReasonCode = __expectString(data.LastUpdateStatusReasonCode); - } - if (data.Layers != null) { - contents.Layers = de_LayersReferenceList(data.Layers, context); - } - if (data.MasterArn != null) { - contents.MasterArn = __expectString(data.MasterArn); - } - if (data.MemorySize != null) { - contents.MemorySize = __expectInt32(data.MemorySize); - } - if (data.PackageType != null) { - contents.PackageType = __expectString(data.PackageType); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } - if (data.Role != null) { - contents.Role = __expectString(data.Role); - } - if (data.Runtime != null) { - contents.Runtime = __expectString(data.Runtime); - } - if (data.RuntimeVersionConfig != null) { - contents.RuntimeVersionConfig = de_RuntimeVersionConfig(data.RuntimeVersionConfig, context); - } - if (data.SigningJobArn != null) { - contents.SigningJobArn = __expectString(data.SigningJobArn); - } - if (data.SigningProfileVersionArn != null) { - contents.SigningProfileVersionArn = __expectString(data.SigningProfileVersionArn); - } - if (data.SnapStart != null) { - contents.SnapStart = de_SnapStartResponse(data.SnapStart, context); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.StateReason != null) { - contents.StateReason = __expectString(data.StateReason); - } - if (data.StateReasonCode != null) { - contents.StateReasonCode = __expectString(data.StateReasonCode); - } - if (data.Timeout != null) { - contents.Timeout = __expectInt32(data.Timeout); - } - if (data.TracingConfig != null) { - contents.TracingConfig = de_TracingConfigResponse(data.TracingConfig, context); - } - if (data.Version != null) { - contents.Version = __expectString(data.Version); - } - if (data.VpcConfig != null) { - contents.VpcConfig = de_VpcConfigResponse(data.VpcConfig, context); - } + const doc = take(data, { + Architectures: _json, + CodeSha256: __expectString, + CodeSize: __expectLong, + DeadLetterConfig: _json, + Description: __expectString, + Environment: _json, + EphemeralStorage: _json, + FileSystemConfigs: _json, + FunctionArn: __expectString, + FunctionName: __expectString, + Handler: __expectString, + ImageConfigResponse: _json, + KMSKeyArn: __expectString, + LastModified: __expectString, + LastUpdateStatus: __expectString, + LastUpdateStatusReason: __expectString, + LastUpdateStatusReasonCode: __expectString, + Layers: _json, + MasterArn: __expectString, + MemorySize: __expectInt32, + PackageType: __expectString, + RevisionId: __expectString, + Role: __expectString, + Runtime: __expectString, + RuntimeVersionConfig: _json, + SigningJobArn: __expectString, + SigningProfileVersionArn: __expectString, + SnapStart: _json, + State: __expectString, + StateReason: __expectString, + StateReasonCode: __expectString, + Timeout: __expectInt32, + TracingConfig: _json, + Version: __expectString, + VpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7695,10 +6879,9 @@ const de_UpdateFunctionConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7718,21 +6901,14 @@ export const de_UpdateFunctionEventInvokeConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DestinationConfig != null) { - contents.DestinationConfig = de_DestinationConfig(data.DestinationConfig, context); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModified))); - } - if (data.MaximumEventAgeInSeconds != null) { - contents.MaximumEventAgeInSeconds = __expectInt32(data.MaximumEventAgeInSeconds); - } - if (data.MaximumRetryAttempts != null) { - contents.MaximumRetryAttempts = __expectInt32(data.MaximumRetryAttempts); - } + const doc = take(data, { + DestinationConfig: _json, + FunctionArn: __expectString, + LastModified: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaximumEventAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -7766,10 +6942,9 @@ const de_UpdateFunctionEventInvokeConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7789,27 +6964,16 @@ export const de_UpdateFunctionUrlConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthType != null) { - contents.AuthType = __expectString(data.AuthType); - } - if (data.Cors != null) { - contents.Cors = de_Cors(data.Cors, context); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectString(data.CreationTime); - } - if (data.FunctionArn != null) { - contents.FunctionArn = __expectString(data.FunctionArn); - } - if (data.FunctionUrl != null) { - contents.FunctionUrl = __expectString(data.FunctionUrl); - } - if (data.InvokeMode != null) { - contents.InvokeMode = __expectString(data.InvokeMode); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectString(data.LastModifiedTime); - } + const doc = take(data, { + AuthType: __expectString, + Cors: _json, + CreationTime: __expectString, + FunctionArn: __expectString, + FunctionUrl: __expectString, + InvokeMode: __expectString, + LastModifiedTime: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7843,16 +7007,15 @@ const de_UpdateFunctionUrlConfigCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1CodeSigningConfigNotFoundExceptionRes */ @@ -7862,12 +7025,11 @@ const de_CodeSigningConfigNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new CodeSigningConfigNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7884,12 +7046,11 @@ const de_CodeStorageExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new CodeStorageExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7906,12 +7067,11 @@ const de_CodeVerificationFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new CodeVerificationFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7928,12 +7088,11 @@ const de_EC2AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EC2AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7950,12 +7109,11 @@ const de_EC2ThrottledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EC2ThrottledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7972,15 +7130,12 @@ const de_EC2UnexpectedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.EC2ErrorCode != null) { - contents.EC2ErrorCode = __expectString(data.EC2ErrorCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + EC2ErrorCode: __expectString, + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EC2UnexpectedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7994,12 +7149,11 @@ const de_EC2UnexpectedExceptionRes = async ( const de_EFSIOExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EFSIOException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8016,12 +7170,11 @@ const de_EFSMountConnectivityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EFSMountConnectivityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8038,12 +7191,11 @@ const de_EFSMountFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EFSMountFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8060,12 +7212,11 @@ const de_EFSMountTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new EFSMountTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8082,12 +7233,11 @@ const de_ENILimitReachedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ENILimitReachedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8104,12 +7254,11 @@ const de_InvalidCodeSignatureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidCodeSignatureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8126,12 +7275,11 @@ const de_InvalidParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8148,12 +7296,11 @@ const de_InvalidRequestContentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestContentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8170,12 +7317,11 @@ const de_InvalidRuntimeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRuntimeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8192,12 +7338,11 @@ const de_InvalidSecurityGroupIDExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidSecurityGroupIDException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8214,12 +7359,11 @@ const de_InvalidSubnetIDExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidSubnetIDException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8236,12 +7380,11 @@ const de_InvalidZipFileExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidZipFileException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8258,12 +7401,11 @@ const de_KMSAccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new KMSAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8280,12 +7422,11 @@ const de_KMSDisabledExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new KMSDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8302,12 +7443,11 @@ const de_KMSInvalidStateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new KMSInvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8324,12 +7464,11 @@ const de_KMSNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new KMSNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8346,12 +7485,11 @@ const de_PolicyLengthExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PolicyLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8368,12 +7506,11 @@ const de_PreconditionFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PreconditionFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8390,12 +7527,11 @@ const de_ProvisionedConcurrencyConfigNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ProvisionedConcurrencyConfigNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8412,12 +7548,11 @@ const de_RequestTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8434,12 +7569,11 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8456,12 +7590,11 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8478,12 +7611,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8500,12 +7632,11 @@ const de_ResourceNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8519,12 +7650,11 @@ const de_ResourceNotReadyExceptionRes = async ( const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8538,12 +7668,11 @@ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext const de_SnapStartExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new SnapStartException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8560,12 +7689,11 @@ const de_SnapStartNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new SnapStartNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8582,12 +7710,11 @@ const de_SnapStartTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new SnapStartTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8604,12 +7731,11 @@ const de_SubnetIPAddressLimitReachedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Message: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); const exception = new SubnetIPAddressLimitReachedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8628,15 +7754,12 @@ const de_TooManyRequestsExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Reason: __expectString, + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8653,12 +7776,11 @@ const de_UnsupportedMediaTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + Type: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedMediaTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8701,7 +7823,7 @@ const de_InvokeWithResponseStreamCompleteEvent_event = async ( ): Promise => { const contents: InvokeWithResponseStreamCompleteEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_InvokeWithResponseStreamCompleteEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; /** @@ -8721,1059 +7843,290 @@ const se_AdditionalVersionWeights = (input: Record, context: __S * serializeAws_restJson1AliasRoutingConfiguration */ const se_AliasRoutingConfiguration = (input: AliasRoutingConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdditionalVersionWeights != null && { - AdditionalVersionWeights: se_AdditionalVersionWeights(input.AdditionalVersionWeights, context), - }), - }; + return take(input, { + AdditionalVersionWeights: (_) => se_AdditionalVersionWeights(_, context), + }); }; -/** - * serializeAws_restJson1AllowedPublishers - */ -const se_AllowedPublishers = (input: AllowedPublishers, context: __SerdeContext): any => { - return { - ...(input.SigningProfileVersionArns != null && { - SigningProfileVersionArns: se_SigningProfileVersionArns(input.SigningProfileVersionArns, context), - }), - }; -}; +// se_AllowedPublishers omitted. -/** - * serializeAws_restJson1AllowMethodsList - */ -const se_AllowMethodsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowMethodsList omitted. -/** - * serializeAws_restJson1AllowOriginsList - */ -const se_AllowOriginsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowOriginsList omitted. -/** - * serializeAws_restJson1AmazonManagedKafkaEventSourceConfig - */ -const se_AmazonManagedKafkaEventSourceConfig = ( - input: AmazonManagedKafkaEventSourceConfig, - context: __SerdeContext -): any => { - return { - ...(input.ConsumerGroupId != null && { ConsumerGroupId: input.ConsumerGroupId }), - }; -}; +// se_AmazonManagedKafkaEventSourceConfig omitted. -/** - * serializeAws_restJson1ArchitecturesList - */ -const se_ArchitecturesList = (input: (Architecture | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArchitecturesList omitted. -/** - * serializeAws_restJson1CodeSigningPolicies - */ -const se_CodeSigningPolicies = (input: CodeSigningPolicies, context: __SerdeContext): any => { - return { - ...(input.UntrustedArtifactOnDeployment != null && { - UntrustedArtifactOnDeployment: input.UntrustedArtifactOnDeployment, - }), - }; -}; +// se_CodeSigningPolicies omitted. -/** - * serializeAws_restJson1CompatibleArchitectures - */ -const se_CompatibleArchitectures = (input: (Architecture | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CompatibleArchitectures omitted. -/** - * serializeAws_restJson1CompatibleRuntimes - */ -const se_CompatibleRuntimes = (input: (Runtime | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CompatibleRuntimes omitted. -/** - * serializeAws_restJson1Cors - */ -const se_Cors = (input: Cors, context: __SerdeContext): any => { - return { - ...(input.AllowCredentials != null && { AllowCredentials: input.AllowCredentials }), - ...(input.AllowHeaders != null && { AllowHeaders: se_HeadersList(input.AllowHeaders, context) }), - ...(input.AllowMethods != null && { AllowMethods: se_AllowMethodsList(input.AllowMethods, context) }), - ...(input.AllowOrigins != null && { AllowOrigins: se_AllowOriginsList(input.AllowOrigins, context) }), - ...(input.ExposeHeaders != null && { ExposeHeaders: se_HeadersList(input.ExposeHeaders, context) }), - ...(input.MaxAge != null && { MaxAge: input.MaxAge }), - }; -}; +// se_Cors omitted. -/** - * serializeAws_restJson1DeadLetterConfig - */ -const se_DeadLetterConfig = (input: DeadLetterConfig, context: __SerdeContext): any => { - return { - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }; -}; +// se_DeadLetterConfig omitted. -/** - * serializeAws_restJson1DestinationConfig - */ -const se_DestinationConfig = (input: DestinationConfig, context: __SerdeContext): any => { - return { - ...(input.OnFailure != null && { OnFailure: se_OnFailure(input.OnFailure, context) }), - ...(input.OnSuccess != null && { OnSuccess: se_OnSuccess(input.OnSuccess, context) }), - }; -}; +// se_DestinationConfig omitted. -/** - * serializeAws_restJson1DocumentDBEventSourceConfig - */ -const se_DocumentDBEventSourceConfig = (input: DocumentDBEventSourceConfig, context: __SerdeContext): any => { - return { - ...(input.CollectionName != null && { CollectionName: input.CollectionName }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.FullDocument != null && { FullDocument: input.FullDocument }), - }; -}; +// se_DocumentDBEventSourceConfig omitted. -/** - * serializeAws_restJson1EndpointLists - */ -const se_EndpointLists = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EndpointLists omitted. + +// se_Endpoints omitted. + +// se_Environment omitted. + +// se_EnvironmentVariables omitted. + +// se_EphemeralStorage omitted. + +// se_FileSystemConfig omitted. + +// se_FileSystemConfigList omitted. + +// se_Filter omitted. + +// se_FilterCriteria omitted. + +// se_FilterList omitted. /** - * serializeAws_restJson1Endpoints + * serializeAws_restJson1FunctionCode */ -const se_Endpoints = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [EndPointType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_EndpointLists(value, context); - return acc; - }, {}); +const se_FunctionCode = (input: FunctionCode, context: __SerdeContext): any => { + return take(input, { + ImageUri: [], + S3Bucket: [], + S3Key: [], + S3ObjectVersion: [], + ZipFile: context.base64Encoder, + }); }; +// se_FunctionResponseTypeList omitted. + +// se_HeadersList omitted. + +// se_ImageConfig omitted. + +// se_LayerList omitted. + /** - * serializeAws_restJson1Environment + * serializeAws_restJson1LayerVersionContentInput */ -const se_Environment = (input: Environment, context: __SerdeContext): any => { - return { - ...(input.Variables != null && { Variables: se_EnvironmentVariables(input.Variables, context) }), - }; +const se_LayerVersionContentInput = (input: LayerVersionContentInput, context: __SerdeContext): any => { + return take(input, { + S3Bucket: [], + S3Key: [], + S3ObjectVersion: [], + ZipFile: context.base64Encoder, + }); }; +// se_OnFailure omitted. + +// se_OnSuccess omitted. + +// se_Queues omitted. + +// se_ScalingConfig omitted. + +// se_SecurityGroupIds omitted. + +// se_SelfManagedEventSource omitted. + +// se_SelfManagedKafkaEventSourceConfig omitted. + +// se_SigningProfileVersionArns omitted. + +// se_SnapStart omitted. + +// se_SourceAccessConfiguration omitted. + +// se_SourceAccessConfigurations omitted. + +// se_StringList omitted. + +// se_SubnetIds omitted. + +// se_Tags omitted. + +// se_Topics omitted. + +// se_TracingConfig omitted. + +// se_VpcConfig omitted. + +// de_AccountLimit omitted. + +// de_AccountUsage omitted. + /** - * serializeAws_restJson1EnvironmentVariables + * deserializeAws_restJson1AdditionalVersionWeights */ -const se_EnvironmentVariables = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { +const de_AdditionalVersionWeights = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { if (value === null) { return acc; } - acc[key] = value; + acc[key] = __limitedParseDouble(value) as any; return acc; }, {}); }; /** - * serializeAws_restJson1EphemeralStorage - */ -const se_EphemeralStorage = (input: EphemeralStorage, context: __SerdeContext): any => { - return { - ...(input.Size != null && { Size: input.Size }), - }; -}; - -/** - * serializeAws_restJson1FileSystemConfig + * deserializeAws_restJson1AliasConfiguration */ -const se_FileSystemConfig = (input: FileSystemConfig, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.LocalMountPath != null && { LocalMountPath: input.LocalMountPath }), - }; +const de_AliasConfiguration = (output: any, context: __SerdeContext): AliasConfiguration => { + return take(output, { + AliasArn: __expectString, + Description: __expectString, + FunctionVersion: __expectString, + Name: __expectString, + RevisionId: __expectString, + RoutingConfig: (_: any) => de_AliasRoutingConfiguration(_, context), + }) as any; }; /** - * serializeAws_restJson1FileSystemConfigList + * deserializeAws_restJson1AliasList */ -const se_FileSystemConfigList = (input: FileSystemConfig[], context: __SerdeContext): any => { - return input +const de_AliasList = (output: any, context: __SerdeContext): AliasConfiguration[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_FileSystemConfig(entry, context); + .map((entry: any) => { + return de_AliasConfiguration(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1Filter + * deserializeAws_restJson1AliasRoutingConfiguration */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Pattern != null && { Pattern: input.Pattern }), - }; +const de_AliasRoutingConfiguration = (output: any, context: __SerdeContext): AliasRoutingConfiguration => { + return take(output, { + AdditionalVersionWeights: (_: any) => de_AdditionalVersionWeights(_, context), + }) as any; }; +// de_AllowedPublishers omitted. + +// de_AllowMethodsList omitted. + +// de_AllowOriginsList omitted. + +// de_AmazonManagedKafkaEventSourceConfig omitted. + +// de_ArchitecturesList omitted. + +// de_CodeSigningConfig omitted. + +// de_CodeSigningConfigList omitted. + +// de_CodeSigningPolicies omitted. + +// de_CompatibleArchitectures omitted. + +// de_CompatibleRuntimes omitted. + +// de_Concurrency omitted. + +// de_Cors omitted. + +// de_DeadLetterConfig omitted. + +// de_DestinationConfig omitted. + +// de_DocumentDBEventSourceConfig omitted. + +// de_EndpointLists omitted. + +// de_Endpoints omitted. + +// de_EnvironmentError omitted. + +// de_EnvironmentResponse omitted. + +// de_EnvironmentVariables omitted. + +// de_EphemeralStorage omitted. + /** - * serializeAws_restJson1FilterCriteria + * deserializeAws_restJson1EventSourceMappingConfiguration */ -const se_FilterCriteria = (input: FilterCriteria, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - }; +const de_EventSourceMappingConfiguration = (output: any, context: __SerdeContext): EventSourceMappingConfiguration => { + return take(output, { + AmazonManagedKafkaEventSourceConfig: _json, + BatchSize: __expectInt32, + BisectBatchOnFunctionError: __expectBoolean, + DestinationConfig: _json, + DocumentDBEventSourceConfig: _json, + EventSourceArn: __expectString, + FilterCriteria: _json, + FunctionArn: __expectString, + FunctionResponseTypes: _json, + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastProcessingResult: __expectString, + MaximumBatchingWindowInSeconds: __expectInt32, + MaximumRecordAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + ParallelizationFactor: __expectInt32, + Queues: _json, + ScalingConfig: _json, + SelfManagedEventSource: _json, + SelfManagedKafkaEventSourceConfig: _json, + SourceAccessConfigurations: _json, + StartingPosition: __expectString, + StartingPositionTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + StateTransitionReason: __expectString, + Topics: _json, + TumblingWindowInSeconds: __expectInt32, + UUID: __expectString, + }) as any; }; /** - * serializeAws_restJson1FilterList + * deserializeAws_restJson1EventSourceMappingsList */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input +const de_EventSourceMappingsList = (output: any, context: __SerdeContext): EventSourceMappingConfiguration[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); + .map((entry: any) => { + return de_EventSourceMappingConfiguration(entry, context); }); + return retVal; }; -/** - * serializeAws_restJson1FunctionCode - */ -const se_FunctionCode = (input: FunctionCode, context: __SerdeContext): any => { - return { - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - ...(input.S3ObjectVersion != null && { S3ObjectVersion: input.S3ObjectVersion }), - ...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }), - }; -}; - -/** - * serializeAws_restJson1FunctionResponseTypeList - */ -const se_FunctionResponseTypeList = (input: (FunctionResponseType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1HeadersList - */ -const se_HeadersList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ImageConfig - */ -const se_ImageConfig = (input: ImageConfig, context: __SerdeContext): any => { - return { - ...(input.Command != null && { Command: se_StringList(input.Command, context) }), - ...(input.EntryPoint != null && { EntryPoint: se_StringList(input.EntryPoint, context) }), - ...(input.WorkingDirectory != null && { WorkingDirectory: input.WorkingDirectory }), - }; -}; - -/** - * serializeAws_restJson1LayerList - */ -const se_LayerList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1LayerVersionContentInput - */ -const se_LayerVersionContentInput = (input: LayerVersionContentInput, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - ...(input.S3ObjectVersion != null && { S3ObjectVersion: input.S3ObjectVersion }), - ...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }), - }; -}; - -/** - * serializeAws_restJson1OnFailure - */ -const se_OnFailure = (input: OnFailure, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - }; -}; - -/** - * serializeAws_restJson1OnSuccess - */ -const se_OnSuccess = (input: OnSuccess, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - }; -}; - -/** - * serializeAws_restJson1Queues - */ -const se_Queues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ScalingConfig - */ -const se_ScalingConfig = (input: ScalingConfig, context: __SerdeContext): any => { - return { - ...(input.MaximumConcurrency != null && { MaximumConcurrency: input.MaximumConcurrency }), - }; -}; - -/** - * serializeAws_restJson1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SelfManagedEventSource - */ -const se_SelfManagedEventSource = (input: SelfManagedEventSource, context: __SerdeContext): any => { - return { - ...(input.Endpoints != null && { Endpoints: se_Endpoints(input.Endpoints, context) }), - }; -}; - -/** - * serializeAws_restJson1SelfManagedKafkaEventSourceConfig - */ -const se_SelfManagedKafkaEventSourceConfig = ( - input: SelfManagedKafkaEventSourceConfig, - context: __SerdeContext -): any => { - return { - ...(input.ConsumerGroupId != null && { ConsumerGroupId: input.ConsumerGroupId }), - }; -}; - -/** - * serializeAws_restJson1SigningProfileVersionArns - */ -const se_SigningProfileVersionArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SnapStart - */ -const se_SnapStart = (input: SnapStart, context: __SerdeContext): any => { - return { - ...(input.ApplyOn != null && { ApplyOn: input.ApplyOn }), - }; -}; - -/** - * serializeAws_restJson1SourceAccessConfiguration - */ -const se_SourceAccessConfiguration = (input: SourceAccessConfiguration, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.URI != null && { URI: input.URI }), - }; -}; - -/** - * serializeAws_restJson1SourceAccessConfigurations - */ -const se_SourceAccessConfigurations = (input: SourceAccessConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceAccessConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Topics - */ -const se_Topics = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TracingConfig - */ -const se_TracingConfig = (input: TracingConfig, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; - -/** - * serializeAws_restJson1VpcConfig - */ -const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - }; -}; - -/** - * deserializeAws_restJson1AccountLimit - */ -const de_AccountLimit = (output: any, context: __SerdeContext): AccountLimit => { - return { - CodeSizeUnzipped: __expectLong(output.CodeSizeUnzipped), - CodeSizeZipped: __expectLong(output.CodeSizeZipped), - ConcurrentExecutions: __expectInt32(output.ConcurrentExecutions), - TotalCodeSize: __expectLong(output.TotalCodeSize), - UnreservedConcurrentExecutions: __expectInt32(output.UnreservedConcurrentExecutions), - } as any; -}; - -/** - * deserializeAws_restJson1AccountUsage - */ -const de_AccountUsage = (output: any, context: __SerdeContext): AccountUsage => { - return { - FunctionCount: __expectLong(output.FunctionCount), - TotalCodeSize: __expectLong(output.TotalCodeSize), - } as any; -}; - -/** - * deserializeAws_restJson1AdditionalVersionWeights - */ -const de_AdditionalVersionWeights = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __limitedParseDouble(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AliasConfiguration - */ -const de_AliasConfiguration = (output: any, context: __SerdeContext): AliasConfiguration => { - return { - AliasArn: __expectString(output.AliasArn), - Description: __expectString(output.Description), - FunctionVersion: __expectString(output.FunctionVersion), - Name: __expectString(output.Name), - RevisionId: __expectString(output.RevisionId), - RoutingConfig: - output.RoutingConfig != null ? de_AliasRoutingConfiguration(output.RoutingConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AliasList - */ -const de_AliasList = (output: any, context: __SerdeContext): AliasConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AliasConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AliasRoutingConfiguration - */ -const de_AliasRoutingConfiguration = (output: any, context: __SerdeContext): AliasRoutingConfiguration => { - return { - AdditionalVersionWeights: - output.AdditionalVersionWeights != null - ? de_AdditionalVersionWeights(output.AdditionalVersionWeights, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AllowedPublishers - */ -const de_AllowedPublishers = (output: any, context: __SerdeContext): AllowedPublishers => { - return { - SigningProfileVersionArns: - output.SigningProfileVersionArns != null - ? de_SigningProfileVersionArns(output.SigningProfileVersionArns, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AllowMethodsList - */ -const de_AllowMethodsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AllowOriginsList - */ -const de_AllowOriginsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AmazonManagedKafkaEventSourceConfig - */ -const de_AmazonManagedKafkaEventSourceConfig = ( - output: any, - context: __SerdeContext -): AmazonManagedKafkaEventSourceConfig => { - return { - ConsumerGroupId: __expectString(output.ConsumerGroupId), - } as any; -}; - -/** - * deserializeAws_restJson1ArchitecturesList - */ -const de_ArchitecturesList = (output: any, context: __SerdeContext): (Architecture | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CodeSigningConfig - */ -const de_CodeSigningConfig = (output: any, context: __SerdeContext): CodeSigningConfig => { - return { - AllowedPublishers: - output.AllowedPublishers != null ? de_AllowedPublishers(output.AllowedPublishers, context) : undefined, - CodeSigningConfigArn: __expectString(output.CodeSigningConfigArn), - CodeSigningConfigId: __expectString(output.CodeSigningConfigId), - CodeSigningPolicies: - output.CodeSigningPolicies != null ? de_CodeSigningPolicies(output.CodeSigningPolicies, context) : undefined, - Description: __expectString(output.Description), - LastModified: __expectString(output.LastModified), - } as any; -}; - -/** - * deserializeAws_restJson1CodeSigningConfigList - */ -const de_CodeSigningConfigList = (output: any, context: __SerdeContext): CodeSigningConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeSigningConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CodeSigningPolicies - */ -const de_CodeSigningPolicies = (output: any, context: __SerdeContext): CodeSigningPolicies => { - return { - UntrustedArtifactOnDeployment: __expectString(output.UntrustedArtifactOnDeployment), - } as any; -}; - -/** - * deserializeAws_restJson1CompatibleArchitectures - */ -const de_CompatibleArchitectures = (output: any, context: __SerdeContext): (Architecture | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CompatibleRuntimes - */ -const de_CompatibleRuntimes = (output: any, context: __SerdeContext): (Runtime | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Concurrency - */ -const de_Concurrency = (output: any, context: __SerdeContext): Concurrency => { - return { - ReservedConcurrentExecutions: __expectInt32(output.ReservedConcurrentExecutions), - } as any; -}; - -/** - * deserializeAws_restJson1Cors - */ -const de_Cors = (output: any, context: __SerdeContext): Cors => { - return { - AllowCredentials: __expectBoolean(output.AllowCredentials), - AllowHeaders: output.AllowHeaders != null ? de_HeadersList(output.AllowHeaders, context) : undefined, - AllowMethods: output.AllowMethods != null ? de_AllowMethodsList(output.AllowMethods, context) : undefined, - AllowOrigins: output.AllowOrigins != null ? de_AllowOriginsList(output.AllowOrigins, context) : undefined, - ExposeHeaders: output.ExposeHeaders != null ? de_HeadersList(output.ExposeHeaders, context) : undefined, - MaxAge: __expectInt32(output.MaxAge), - } as any; -}; - -/** - * deserializeAws_restJson1DeadLetterConfig - */ -const de_DeadLetterConfig = (output: any, context: __SerdeContext): DeadLetterConfig => { - return { - TargetArn: __expectString(output.TargetArn), - } as any; -}; - -/** - * deserializeAws_restJson1DestinationConfig - */ -const de_DestinationConfig = (output: any, context: __SerdeContext): DestinationConfig => { - return { - OnFailure: output.OnFailure != null ? de_OnFailure(output.OnFailure, context) : undefined, - OnSuccess: output.OnSuccess != null ? de_OnSuccess(output.OnSuccess, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DocumentDBEventSourceConfig - */ -const de_DocumentDBEventSourceConfig = (output: any, context: __SerdeContext): DocumentDBEventSourceConfig => { - return { - CollectionName: __expectString(output.CollectionName), - DatabaseName: __expectString(output.DatabaseName), - FullDocument: __expectString(output.FullDocument), - } as any; -}; - -/** - * deserializeAws_restJson1EndpointLists - */ -const de_EndpointLists = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Endpoints - */ -const de_Endpoints = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [EndPointType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_EndpointLists(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1EnvironmentError - */ -const de_EnvironmentError = (output: any, context: __SerdeContext): EnvironmentError => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_restJson1EnvironmentResponse - */ -const de_EnvironmentResponse = (output: any, context: __SerdeContext): EnvironmentResponse => { - return { - Error: output.Error != null ? de_EnvironmentError(output.Error, context) : undefined, - Variables: output.Variables != null ? de_EnvironmentVariables(output.Variables, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EnvironmentVariables - */ -const de_EnvironmentVariables = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FileSystemConfig omitted. -/** - * deserializeAws_restJson1EphemeralStorage - */ -const de_EphemeralStorage = (output: any, context: __SerdeContext): EphemeralStorage => { - return { - Size: __expectInt32(output.Size), - } as any; -}; - -/** - * deserializeAws_restJson1EventSourceMappingConfiguration - */ -const de_EventSourceMappingConfiguration = (output: any, context: __SerdeContext): EventSourceMappingConfiguration => { - return { - AmazonManagedKafkaEventSourceConfig: - output.AmazonManagedKafkaEventSourceConfig != null - ? de_AmazonManagedKafkaEventSourceConfig(output.AmazonManagedKafkaEventSourceConfig, context) - : undefined, - BatchSize: __expectInt32(output.BatchSize), - BisectBatchOnFunctionError: __expectBoolean(output.BisectBatchOnFunctionError), - DestinationConfig: - output.DestinationConfig != null ? de_DestinationConfig(output.DestinationConfig, context) : undefined, - DocumentDBEventSourceConfig: - output.DocumentDBEventSourceConfig != null - ? de_DocumentDBEventSourceConfig(output.DocumentDBEventSourceConfig, context) - : undefined, - EventSourceArn: __expectString(output.EventSourceArn), - FilterCriteria: output.FilterCriteria != null ? de_FilterCriteria(output.FilterCriteria, context) : undefined, - FunctionArn: __expectString(output.FunctionArn), - FunctionResponseTypes: - output.FunctionResponseTypes != null - ? de_FunctionResponseTypeList(output.FunctionResponseTypes, context) - : undefined, - LastModified: - output.LastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified))) - : undefined, - LastProcessingResult: __expectString(output.LastProcessingResult), - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - MaximumRecordAgeInSeconds: __expectInt32(output.MaximumRecordAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - ParallelizationFactor: __expectInt32(output.ParallelizationFactor), - Queues: output.Queues != null ? de_Queues(output.Queues, context) : undefined, - ScalingConfig: output.ScalingConfig != null ? de_ScalingConfig(output.ScalingConfig, context) : undefined, - SelfManagedEventSource: - output.SelfManagedEventSource != null - ? de_SelfManagedEventSource(output.SelfManagedEventSource, context) - : undefined, - SelfManagedKafkaEventSourceConfig: - output.SelfManagedKafkaEventSourceConfig != null - ? de_SelfManagedKafkaEventSourceConfig(output.SelfManagedKafkaEventSourceConfig, context) - : undefined, - SourceAccessConfigurations: - output.SourceAccessConfigurations != null - ? de_SourceAccessConfigurations(output.SourceAccessConfigurations, context) - : undefined, - StartingPosition: __expectString(output.StartingPosition), - StartingPositionTimestamp: - output.StartingPositionTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartingPositionTimestamp))) - : undefined, - State: __expectString(output.State), - StateTransitionReason: __expectString(output.StateTransitionReason), - Topics: output.Topics != null ? de_Topics(output.Topics, context) : undefined, - TumblingWindowInSeconds: __expectInt32(output.TumblingWindowInSeconds), - UUID: __expectString(output.UUID), - } as any; -}; - -/** - * deserializeAws_restJson1EventSourceMappingsList - */ -const de_EventSourceMappingsList = (output: any, context: __SerdeContext): EventSourceMappingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventSourceMappingConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FileSystemConfig - */ -const de_FileSystemConfig = (output: any, context: __SerdeContext): FileSystemConfig => { - return { - Arn: __expectString(output.Arn), - LocalMountPath: __expectString(output.LocalMountPath), - } as any; -}; +// de_FileSystemConfigList omitted. -/** - * deserializeAws_restJson1FileSystemConfigList - */ -const de_FileSystemConfigList = (output: any, context: __SerdeContext): FileSystemConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileSystemConfig(entry, context); - }); - return retVal; -}; +// de_Filter omitted. -/** - * deserializeAws_restJson1Filter - */ -const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - Pattern: __expectString(output.Pattern), - } as any; -}; +// de_FilterCriteria omitted. -/** - * deserializeAws_restJson1FilterCriteria - */ -const de_FilterCriteria = (output: any, context: __SerdeContext): FilterCriteria => { - return { - Filters: output.Filters != null ? de_FilterList(output.Filters, context) : undefined, - } as any; -}; +// de_FilterList omitted. -/** - * deserializeAws_restJson1FilterList - */ -const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Filter(entry, context); - }); - return retVal; -}; +// de_FunctionArnList omitted. -/** - * deserializeAws_restJson1FunctionArnList - */ -const de_FunctionArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FunctionCodeLocation omitted. -/** - * deserializeAws_restJson1FunctionCodeLocation - */ -const de_FunctionCodeLocation = (output: any, context: __SerdeContext): FunctionCodeLocation => { - return { - ImageUri: __expectString(output.ImageUri), - Location: __expectString(output.Location), - RepositoryType: __expectString(output.RepositoryType), - ResolvedImageUri: __expectString(output.ResolvedImageUri), - } as any; -}; - -/** - * deserializeAws_restJson1FunctionConfiguration - */ -const de_FunctionConfiguration = (output: any, context: __SerdeContext): FunctionConfiguration => { - return { - Architectures: output.Architectures != null ? de_ArchitecturesList(output.Architectures, context) : undefined, - CodeSha256: __expectString(output.CodeSha256), - CodeSize: __expectLong(output.CodeSize), - DeadLetterConfig: - output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined, - Description: __expectString(output.Description), - Environment: output.Environment != null ? de_EnvironmentResponse(output.Environment, context) : undefined, - EphemeralStorage: - output.EphemeralStorage != null ? de_EphemeralStorage(output.EphemeralStorage, context) : undefined, - FileSystemConfigs: - output.FileSystemConfigs != null ? de_FileSystemConfigList(output.FileSystemConfigs, context) : undefined, - FunctionArn: __expectString(output.FunctionArn), - FunctionName: __expectString(output.FunctionName), - Handler: __expectString(output.Handler), - ImageConfigResponse: - output.ImageConfigResponse != null ? de_ImageConfigResponse(output.ImageConfigResponse, context) : undefined, - KMSKeyArn: __expectString(output.KMSKeyArn), - LastModified: __expectString(output.LastModified), - LastUpdateStatus: __expectString(output.LastUpdateStatus), - LastUpdateStatusReason: __expectString(output.LastUpdateStatusReason), - LastUpdateStatusReasonCode: __expectString(output.LastUpdateStatusReasonCode), - Layers: output.Layers != null ? de_LayersReferenceList(output.Layers, context) : undefined, - MasterArn: __expectString(output.MasterArn), - MemorySize: __expectInt32(output.MemorySize), - PackageType: __expectString(output.PackageType), - RevisionId: __expectString(output.RevisionId), - Role: __expectString(output.Role), - Runtime: __expectString(output.Runtime), - RuntimeVersionConfig: - output.RuntimeVersionConfig != null ? de_RuntimeVersionConfig(output.RuntimeVersionConfig, context) : undefined, - SigningJobArn: __expectString(output.SigningJobArn), - SigningProfileVersionArn: __expectString(output.SigningProfileVersionArn), - SnapStart: output.SnapStart != null ? de_SnapStartResponse(output.SnapStart, context) : undefined, - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - StateReasonCode: __expectString(output.StateReasonCode), - Timeout: __expectInt32(output.Timeout), - TracingConfig: output.TracingConfig != null ? de_TracingConfigResponse(output.TracingConfig, context) : undefined, - Version: __expectString(output.Version), - VpcConfig: output.VpcConfig != null ? de_VpcConfigResponse(output.VpcConfig, context) : undefined, - } as any; -}; +// de_FunctionConfiguration omitted. /** * deserializeAws_restJson1FunctionEventInvokeConfig */ const de_FunctionEventInvokeConfig = (output: any, context: __SerdeContext): FunctionEventInvokeConfig => { - return { - DestinationConfig: - output.DestinationConfig != null ? de_DestinationConfig(output.DestinationConfig, context) : undefined, - FunctionArn: __expectString(output.FunctionArn), - LastModified: - output.LastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified))) - : undefined, - MaximumEventAgeInSeconds: __expectInt32(output.MaximumEventAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - } as any; + return take(output, { + DestinationConfig: _json, + FunctionArn: __expectString, + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaximumEventAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + }) as any; }; /** @@ -9783,499 +8136,84 @@ const de_FunctionEventInvokeConfigList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FunctionEventInvokeConfig(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FunctionList - */ -const de_FunctionList = (output: any, context: __SerdeContext): FunctionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FunctionConfiguration(entry, context); - }); - return retVal; -}; +// de_FunctionList omitted. -/** - * deserializeAws_restJson1FunctionResponseTypeList - */ -const de_FunctionResponseTypeList = (output: any, context: __SerdeContext): (FunctionResponseType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FunctionResponseTypeList omitted. -/** - * deserializeAws_restJson1FunctionUrlConfig - */ -const de_FunctionUrlConfig = (output: any, context: __SerdeContext): FunctionUrlConfig => { - return { - AuthType: __expectString(output.AuthType), - Cors: output.Cors != null ? de_Cors(output.Cors, context) : undefined, - CreationTime: __expectString(output.CreationTime), - FunctionArn: __expectString(output.FunctionArn), - FunctionUrl: __expectString(output.FunctionUrl), - InvokeMode: __expectString(output.InvokeMode), - LastModifiedTime: __expectString(output.LastModifiedTime), - } as any; -}; +// de_FunctionUrlConfig omitted. -/** - * deserializeAws_restJson1FunctionUrlConfigList - */ -const de_FunctionUrlConfigList = (output: any, context: __SerdeContext): FunctionUrlConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FunctionUrlConfig(entry, context); - }); - return retVal; -}; +// de_FunctionUrlConfigList omitted. -/** - * deserializeAws_restJson1HeadersList - */ -const de_HeadersList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HeadersList omitted. -/** - * deserializeAws_restJson1ImageConfig - */ -const de_ImageConfig = (output: any, context: __SerdeContext): ImageConfig => { - return { - Command: output.Command != null ? de_StringList(output.Command, context) : undefined, - EntryPoint: output.EntryPoint != null ? de_StringList(output.EntryPoint, context) : undefined, - WorkingDirectory: __expectString(output.WorkingDirectory), - } as any; -}; +// de_ImageConfig omitted. -/** - * deserializeAws_restJson1ImageConfigError - */ -const de_ImageConfigError = (output: any, context: __SerdeContext): ImageConfigError => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_ImageConfigError omitted. -/** - * deserializeAws_restJson1ImageConfigResponse - */ -const de_ImageConfigResponse = (output: any, context: __SerdeContext): ImageConfigResponse => { - return { - Error: output.Error != null ? de_ImageConfigError(output.Error, context) : undefined, - ImageConfig: output.ImageConfig != null ? de_ImageConfig(output.ImageConfig, context) : undefined, - } as any; -}; +// de_ImageConfigResponse omitted. -/** - * deserializeAws_restJson1InvokeWithResponseStreamCompleteEvent - */ -const de_InvokeWithResponseStreamCompleteEvent = ( - output: any, - context: __SerdeContext -): InvokeWithResponseStreamCompleteEvent => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorDetails: __expectString(output.ErrorDetails), - LogResult: __expectString(output.LogResult), - } as any; -}; +// de_InvokeWithResponseStreamCompleteEvent omitted. -/** - * deserializeAws_restJson1Layer - */ -const de_Layer = (output: any, context: __SerdeContext): Layer => { - return { - Arn: __expectString(output.Arn), - CodeSize: __expectLong(output.CodeSize), - SigningJobArn: __expectString(output.SigningJobArn), - SigningProfileVersionArn: __expectString(output.SigningProfileVersionArn), - } as any; -}; +// de_Layer omitted. -/** - * deserializeAws_restJson1LayersList - */ -const de_LayersList = (output: any, context: __SerdeContext): LayersListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LayersListItem(entry, context); - }); - return retVal; -}; +// de_LayersList omitted. -/** - * deserializeAws_restJson1LayersListItem - */ -const de_LayersListItem = (output: any, context: __SerdeContext): LayersListItem => { - return { - LatestMatchingVersion: - output.LatestMatchingVersion != null - ? de_LayerVersionsListItem(output.LatestMatchingVersion, context) - : undefined, - LayerArn: __expectString(output.LayerArn), - LayerName: __expectString(output.LayerName), - } as any; -}; +// de_LayersListItem omitted. -/** - * deserializeAws_restJson1LayersReferenceList - */ -const de_LayersReferenceList = (output: any, context: __SerdeContext): Layer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Layer(entry, context); - }); - return retVal; -}; +// de_LayersReferenceList omitted. -/** - * deserializeAws_restJson1LayerVersionContentOutput - */ -const de_LayerVersionContentOutput = (output: any, context: __SerdeContext): LayerVersionContentOutput => { - return { - CodeSha256: __expectString(output.CodeSha256), - CodeSize: __expectLong(output.CodeSize), - Location: __expectString(output.Location), - SigningJobArn: __expectString(output.SigningJobArn), - SigningProfileVersionArn: __expectString(output.SigningProfileVersionArn), - } as any; -}; +// de_LayerVersionContentOutput omitted. -/** - * deserializeAws_restJson1LayerVersionsList - */ -const de_LayerVersionsList = (output: any, context: __SerdeContext): LayerVersionsListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LayerVersionsListItem(entry, context); - }); - return retVal; -}; +// de_LayerVersionsList omitted. -/** - * deserializeAws_restJson1LayerVersionsListItem - */ -const de_LayerVersionsListItem = (output: any, context: __SerdeContext): LayerVersionsListItem => { - return { - CompatibleArchitectures: - output.CompatibleArchitectures != null - ? de_CompatibleArchitectures(output.CompatibleArchitectures, context) - : undefined, - CompatibleRuntimes: - output.CompatibleRuntimes != null ? de_CompatibleRuntimes(output.CompatibleRuntimes, context) : undefined, - CreatedDate: __expectString(output.CreatedDate), - Description: __expectString(output.Description), - LayerVersionArn: __expectString(output.LayerVersionArn), - LicenseInfo: __expectString(output.LicenseInfo), - Version: __expectLong(output.Version), - } as any; -}; +// de_LayerVersionsListItem omitted. -/** - * deserializeAws_restJson1OnFailure - */ -const de_OnFailure = (output: any, context: __SerdeContext): OnFailure => { - return { - Destination: __expectString(output.Destination), - } as any; -}; +// de_OnFailure omitted. -/** - * deserializeAws_restJson1OnSuccess - */ -const de_OnSuccess = (output: any, context: __SerdeContext): OnSuccess => { - return { - Destination: __expectString(output.Destination), - } as any; -}; +// de_OnSuccess omitted. -/** - * deserializeAws_restJson1ProvisionedConcurrencyConfigList - */ -const de_ProvisionedConcurrencyConfigList = ( - output: any, - context: __SerdeContext -): ProvisionedConcurrencyConfigListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisionedConcurrencyConfigListItem(entry, context); - }); - return retVal; -}; +// de_ProvisionedConcurrencyConfigList omitted. -/** - * deserializeAws_restJson1ProvisionedConcurrencyConfigListItem - */ -const de_ProvisionedConcurrencyConfigListItem = ( - output: any, - context: __SerdeContext -): ProvisionedConcurrencyConfigListItem => { - return { - AllocatedProvisionedConcurrentExecutions: __expectInt32(output.AllocatedProvisionedConcurrentExecutions), - AvailableProvisionedConcurrentExecutions: __expectInt32(output.AvailableProvisionedConcurrentExecutions), - FunctionArn: __expectString(output.FunctionArn), - LastModified: __expectString(output.LastModified), - RequestedProvisionedConcurrentExecutions: __expectInt32(output.RequestedProvisionedConcurrentExecutions), - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - } as any; -}; +// de_ProvisionedConcurrencyConfigListItem omitted. -/** - * deserializeAws_restJson1Queues - */ -const de_Queues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Queues omitted. -/** - * deserializeAws_restJson1RuntimeVersionConfig - */ -const de_RuntimeVersionConfig = (output: any, context: __SerdeContext): RuntimeVersionConfig => { - return { - Error: output.Error != null ? de_RuntimeVersionError(output.Error, context) : undefined, - RuntimeVersionArn: __expectString(output.RuntimeVersionArn), - } as any; -}; +// de_RuntimeVersionConfig omitted. -/** - * deserializeAws_restJson1RuntimeVersionError - */ -const de_RuntimeVersionError = (output: any, context: __SerdeContext): RuntimeVersionError => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_RuntimeVersionError omitted. -/** - * deserializeAws_restJson1ScalingConfig - */ -const de_ScalingConfig = (output: any, context: __SerdeContext): ScalingConfig => { - return { - MaximumConcurrency: __expectInt32(output.MaximumConcurrency), - } as any; -}; +// de_ScalingConfig omitted. -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1SelfManagedEventSource - */ -const de_SelfManagedEventSource = (output: any, context: __SerdeContext): SelfManagedEventSource => { - return { - Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined, - } as any; -}; +// de_SelfManagedEventSource omitted. -/** - * deserializeAws_restJson1SelfManagedKafkaEventSourceConfig - */ -const de_SelfManagedKafkaEventSourceConfig = ( - output: any, - context: __SerdeContext -): SelfManagedKafkaEventSourceConfig => { - return { - ConsumerGroupId: __expectString(output.ConsumerGroupId), - } as any; -}; +// de_SelfManagedKafkaEventSourceConfig omitted. -/** - * deserializeAws_restJson1SigningProfileVersionArns - */ -const de_SigningProfileVersionArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SigningProfileVersionArns omitted. -/** - * deserializeAws_restJson1SnapStartResponse - */ -const de_SnapStartResponse = (output: any, context: __SerdeContext): SnapStartResponse => { - return { - ApplyOn: __expectString(output.ApplyOn), - OptimizationStatus: __expectString(output.OptimizationStatus), - } as any; -}; +// de_SnapStartResponse omitted. -/** - * deserializeAws_restJson1SourceAccessConfiguration - */ -const de_SourceAccessConfiguration = (output: any, context: __SerdeContext): SourceAccessConfiguration => { - return { - Type: __expectString(output.Type), - URI: __expectString(output.URI), - } as any; -}; +// de_SourceAccessConfiguration omitted. -/** - * deserializeAws_restJson1SourceAccessConfigurations - */ -const de_SourceAccessConfigurations = (output: any, context: __SerdeContext): SourceAccessConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceAccessConfiguration(entry, context); - }); - return retVal; -}; +// de_SourceAccessConfigurations omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1Topics - */ -const de_Topics = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Topics omitted. -/** - * deserializeAws_restJson1TracingConfigResponse - */ -const de_TracingConfigResponse = (output: any, context: __SerdeContext): TracingConfigResponse => { - return { - Mode: __expectString(output.Mode), - } as any; -}; +// de_TracingConfigResponse omitted. -/** - * deserializeAws_restJson1VpcConfigResponse - */ -const de_VpcConfigResponse = (output: any, context: __SerdeContext): VpcConfigResponse => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_VpcConfigResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-lex-model-building-service/src/protocols/Aws_restJson1.ts b/clients/client-lex-model-building-service/src/protocols/Aws_restJson1.ts index a724d52f7165..713f6acadf8a 100644 --- a/clients/client-lex-model-building-service/src/protocols/Aws_restJson1.ts +++ b/clients/client-lex-model-building-service/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,11 +11,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -101,13 +103,9 @@ import { BotAliasMetadata, BotChannelAssociation, BotMetadata, - BuiltinIntentMetadata, - BuiltinIntentSlot, - BuiltinSlotTypeMetadata, CodeHook, ConflictException, ConversationLogsRequest, - ConversationLogsResponse, EnumerationValue, FollowUpPrompt, FulfillmentActivity, @@ -117,18 +115,14 @@ import { InternalFailureException, KendraConfiguration, LimitExceededException, - Locale, LogSettingsRequest, - LogSettingsResponse, Message, - MigrationAlert, MigrationSummary, NotFoundException, OutputContext, PreconditionFailedException, Prompt, ResourceInUseException, - ResourceReference, Slot, SlotDefaultValue, SlotDefaultValueSpec, @@ -155,9 +149,11 @@ export const se_CreateBotVersionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{name}/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.checksum != null && { checksum: input.checksum }), - }); + body = JSON.stringify( + take(input, { + checksum: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -183,9 +179,11 @@ export const se_CreateIntentVersionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/intents/{name}/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.checksum != null && { checksum: input.checksum }), - }); + body = JSON.stringify( + take(input, { + checksum: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -212,9 +210,11 @@ export const se_CreateSlotTypeVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/slottypes/{name}/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.checksum != null && { checksum: input.checksum }), - }); + body = JSON.stringify( + take(input, { + checksum: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1065,25 +1065,25 @@ export const se_PutBotCommand = async (input: PutBotCommandInput, context: __Ser `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{name}/versions/$LATEST"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.abortStatement != null && { abortStatement: se_Statement(input.abortStatement, context) }), - ...(input.checksum != null && { checksum: input.checksum }), - ...(input.childDirected != null && { childDirected: input.childDirected }), - ...(input.clarificationPrompt != null && { clarificationPrompt: se_Prompt(input.clarificationPrompt, context) }), - ...(input.createVersion != null && { createVersion: input.createVersion }), - ...(input.description != null && { description: input.description }), - ...(input.detectSentiment != null && { detectSentiment: input.detectSentiment }), - ...(input.enableModelImprovements != null && { enableModelImprovements: input.enableModelImprovements }), - ...(input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds }), - ...(input.intents != null && { intents: se_IntentList(input.intents, context) }), - ...(input.locale != null && { locale: input.locale }), - ...(input.nluIntentConfidenceThreshold != null && { - nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold), - }), - ...(input.processBehavior != null && { processBehavior: input.processBehavior }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.voiceId != null && { voiceId: input.voiceId }), - }); + body = JSON.stringify( + take(input, { + abortStatement: (_) => _json(_), + checksum: [], + childDirected: [], + clarificationPrompt: (_) => _json(_), + createVersion: [], + description: [], + detectSentiment: [], + enableModelImprovements: [], + idleSessionTTLInSeconds: [], + intents: (_) => _json(_), + locale: [], + nluIntentConfidenceThreshold: (_) => __serializeFloat(_), + processBehavior: [], + tags: (_) => _json(_), + voiceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1111,15 +1111,15 @@ export const se_PutBotAliasCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); resolvedPath = __resolvedPath(resolvedPath, input, "botName", () => input.botName!, "{botName}", false); let body: any; - body = JSON.stringify({ - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.checksum != null && { checksum: input.checksum }), - ...(input.conversationLogs != null && { - conversationLogs: se_ConversationLogsRequest(input.conversationLogs, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + botVersion: [], + checksum: [], + conversationLogs: (_) => _json(_), + description: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1146,29 +1146,25 @@ export const se_PutIntentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/intents/{name}/versions/$LATEST"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.checksum != null && { checksum: input.checksum }), - ...(input.conclusionStatement != null && { conclusionStatement: se_Statement(input.conclusionStatement, context) }), - ...(input.confirmationPrompt != null && { confirmationPrompt: se_Prompt(input.confirmationPrompt, context) }), - ...(input.createVersion != null && { createVersion: input.createVersion }), - ...(input.description != null && { description: input.description }), - ...(input.dialogCodeHook != null && { dialogCodeHook: se_CodeHook(input.dialogCodeHook, context) }), - ...(input.followUpPrompt != null && { followUpPrompt: se_FollowUpPrompt(input.followUpPrompt, context) }), - ...(input.fulfillmentActivity != null && { - fulfillmentActivity: se_FulfillmentActivity(input.fulfillmentActivity, context), - }), - ...(input.inputContexts != null && { inputContexts: se_InputContextList(input.inputContexts, context) }), - ...(input.kendraConfiguration != null && { - kendraConfiguration: se_KendraConfiguration(input.kendraConfiguration, context), - }), - ...(input.outputContexts != null && { outputContexts: se_OutputContextList(input.outputContexts, context) }), - ...(input.parentIntentSignature != null && { parentIntentSignature: input.parentIntentSignature }), - ...(input.rejectionStatement != null && { rejectionStatement: se_Statement(input.rejectionStatement, context) }), - ...(input.sampleUtterances != null && { - sampleUtterances: se_IntentUtteranceList(input.sampleUtterances, context), - }), - ...(input.slots != null && { slots: se_SlotList(input.slots, context) }), - }); + body = JSON.stringify( + take(input, { + checksum: [], + conclusionStatement: (_) => _json(_), + confirmationPrompt: (_) => _json(_), + createVersion: [], + description: [], + dialogCodeHook: (_) => _json(_), + followUpPrompt: (_) => _json(_), + fulfillmentActivity: (_) => _json(_), + inputContexts: (_) => _json(_), + kendraConfiguration: (_) => _json(_), + outputContexts: (_) => _json(_), + parentIntentSignature: [], + rejectionStatement: (_) => _json(_), + sampleUtterances: (_) => _json(_), + slots: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1195,19 +1191,17 @@ export const se_PutSlotTypeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/slottypes/{name}/versions/$LATEST"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.checksum != null && { checksum: input.checksum }), - ...(input.createVersion != null && { createVersion: input.createVersion }), - ...(input.description != null && { description: input.description }), - ...(input.enumerationValues != null && { - enumerationValues: se_EnumerationValues(input.enumerationValues, context), - }), - ...(input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature }), - ...(input.slotTypeConfigurations != null && { - slotTypeConfigurations: se_SlotTypeConfigurations(input.slotTypeConfigurations, context), - }), - ...(input.valueSelectionStrategy != null && { valueSelectionStrategy: input.valueSelectionStrategy }), - }); + body = JSON.stringify( + take(input, { + checksum: [], + createVersion: [], + description: [], + enumerationValues: (_) => _json(_), + parentSlotTypeSignature: [], + slotTypeConfigurations: (_) => _json(_), + valueSelectionStrategy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1232,12 +1226,14 @@ export const se_StartImportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/imports"; let body: any; - body = JSON.stringify({ - ...(input.mergeStrategy != null && { mergeStrategy: input.mergeStrategy }), - ...(input.payload != null && { payload: context.base64Encoder(input.payload) }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + mergeStrategy: [], + payload: (_) => context.base64Encoder(_), + resourceType: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1262,13 +1258,15 @@ export const se_StartMigrationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrations"; let body: any; - body = JSON.stringify({ - ...(input.migrationStrategy != null && { migrationStrategy: input.migrationStrategy }), - ...(input.v1BotName != null && { v1BotName: input.v1BotName }), - ...(input.v1BotVersion != null && { v1BotVersion: input.v1BotVersion }), - ...(input.v2BotName != null && { v2BotName: input.v2BotName }), - ...(input.v2BotRole != null && { v2BotRole: input.v2BotRole }), - }); + body = JSON.stringify( + take(input, { + migrationStrategy: [], + v1BotName: [], + v1BotVersion: [], + v2BotName: [], + v2BotRole: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1294,9 +1292,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1352,57 +1352,26 @@ export const de_CreateBotVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.abortStatement != null) { - contents.abortStatement = de_Statement(data.abortStatement, context); - } - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.childDirected != null) { - contents.childDirected = __expectBoolean(data.childDirected); - } - if (data.clarificationPrompt != null) { - contents.clarificationPrompt = de_Prompt(data.clarificationPrompt, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.detectSentiment != null) { - contents.detectSentiment = __expectBoolean(data.detectSentiment); - } - if (data.enableModelImprovements != null) { - contents.enableModelImprovements = __expectBoolean(data.enableModelImprovements); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.intents != null) { - contents.intents = de_IntentList(data.intents, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.locale != null) { - contents.locale = __expectString(data.locale); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.voiceId != null) { - contents.voiceId = __expectString(data.voiceId); - } + const doc = take(data, { + abortStatement: _json, + checksum: __expectString, + childDirected: __expectBoolean, + clarificationPrompt: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + detectSentiment: __expectBoolean, + enableModelImprovements: __expectBoolean, + failureReason: __expectString, + idleSessionTTLInSeconds: __expectInt32, + intents: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + locale: __expectString, + name: __expectString, + status: __expectString, + version: __expectString, + voiceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1439,10 +1408,9 @@ const de_CreateBotVersionCommandError = async ( throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1462,60 +1430,27 @@ export const de_CreateIntentVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.conclusionStatement != null) { - contents.conclusionStatement = de_Statement(data.conclusionStatement, context); - } - if (data.confirmationPrompt != null) { - contents.confirmationPrompt = de_Prompt(data.confirmationPrompt, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.dialogCodeHook != null) { - contents.dialogCodeHook = de_CodeHook(data.dialogCodeHook, context); - } - if (data.followUpPrompt != null) { - contents.followUpPrompt = de_FollowUpPrompt(data.followUpPrompt, context); - } - if (data.fulfillmentActivity != null) { - contents.fulfillmentActivity = de_FulfillmentActivity(data.fulfillmentActivity, context); - } - if (data.inputContexts != null) { - contents.inputContexts = de_InputContextList(data.inputContexts, context); - } - if (data.kendraConfiguration != null) { - contents.kendraConfiguration = de_KendraConfiguration(data.kendraConfiguration, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.outputContexts != null) { - contents.outputContexts = de_OutputContextList(data.outputContexts, context); - } - if (data.parentIntentSignature != null) { - contents.parentIntentSignature = __expectString(data.parentIntentSignature); - } - if (data.rejectionStatement != null) { - contents.rejectionStatement = de_Statement(data.rejectionStatement, context); - } - if (data.sampleUtterances != null) { - contents.sampleUtterances = de_IntentUtteranceList(data.sampleUtterances, context); - } - if (data.slots != null) { - contents.slots = de_SlotList(data.slots, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + checksum: __expectString, + conclusionStatement: _json, + confirmationPrompt: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + dialogCodeHook: _json, + followUpPrompt: _json, + fulfillmentActivity: _json, + inputContexts: _json, + kendraConfiguration: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + outputContexts: _json, + parentIntentSignature: __expectString, + rejectionStatement: _json, + sampleUtterances: _json, + slots: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1552,10 +1487,9 @@ const de_CreateIntentVersionCommandError = async ( throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1575,36 +1509,19 @@ export const de_CreateSlotTypeVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enumerationValues != null) { - contents.enumerationValues = de_EnumerationValues(data.enumerationValues, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.parentSlotTypeSignature != null) { - contents.parentSlotTypeSignature = __expectString(data.parentSlotTypeSignature); - } - if (data.slotTypeConfigurations != null) { - contents.slotTypeConfigurations = de_SlotTypeConfigurations(data.slotTypeConfigurations, context); - } - if (data.valueSelectionStrategy != null) { - contents.valueSelectionStrategy = __expectString(data.valueSelectionStrategy); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + checksum: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + enumerationValues: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + parentSlotTypeSignature: __expectString, + slotTypeConfigurations: _json, + valueSelectionStrategy: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1641,10 +1558,9 @@ const de_CreateSlotTypeVersionCommandError = async ( throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1700,10 +1616,9 @@ const de_DeleteBotCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1759,10 +1674,9 @@ const de_DeleteBotAliasCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1815,10 +1729,9 @@ const de_DeleteBotChannelAssociationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1874,10 +1787,9 @@ const de_DeleteBotVersionCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1933,10 +1845,9 @@ const de_DeleteIntentCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1992,10 +1903,9 @@ const de_DeleteIntentVersionCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2051,10 +1961,9 @@ const de_DeleteSlotTypeCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2110,10 +2019,9 @@ const de_DeleteSlotTypeVersionCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2163,10 +2071,9 @@ const de_DeleteUtterancesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2186,60 +2093,27 @@ export const de_GetBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.abortStatement != null) { - contents.abortStatement = de_Statement(data.abortStatement, context); - } - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.childDirected != null) { - contents.childDirected = __expectBoolean(data.childDirected); - } - if (data.clarificationPrompt != null) { - contents.clarificationPrompt = de_Prompt(data.clarificationPrompt, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.detectSentiment != null) { - contents.detectSentiment = __expectBoolean(data.detectSentiment); - } - if (data.enableModelImprovements != null) { - contents.enableModelImprovements = __expectBoolean(data.enableModelImprovements); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.intents != null) { - contents.intents = de_IntentList(data.intents, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.locale != null) { - contents.locale = __expectString(data.locale); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.nluIntentConfidenceThreshold != null) { - contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.voiceId != null) { - contents.voiceId = __expectString(data.voiceId); - } + const doc = take(data, { + abortStatement: _json, + checksum: __expectString, + childDirected: __expectBoolean, + clarificationPrompt: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + detectSentiment: __expectBoolean, + enableModelImprovements: __expectBoolean, + failureReason: __expectString, + idleSessionTTLInSeconds: __expectInt32, + intents: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + locale: __expectString, + name: __expectString, + nluIntentConfidenceThreshold: __limitedParseDouble, + status: __expectString, + version: __expectString, + voiceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2267,10 +2141,9 @@ const de_GetBotCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2290,30 +2163,17 @@ export const de_GetBotAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.conversationLogs != null) { - contents.conversationLogs = de_ConversationLogsResponse(data.conversationLogs, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + botName: __expectString, + botVersion: __expectString, + checksum: __expectString, + conversationLogs: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2344,10 +2204,9 @@ const de_GetBotAliasCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2367,12 +2226,11 @@ export const de_GetBotAliasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BotAliases != null) { - contents.BotAliases = de_BotAliasMetadataList(data.BotAliases, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + BotAliases: (_) => de_BotAliasMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2400,10 +2258,9 @@ const de_GetBotAliasesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2423,33 +2280,18 @@ export const de_GetBotChannelAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAlias != null) { - contents.botAlias = __expectString(data.botAlias); - } - if (data.botConfiguration != null) { - contents.botConfiguration = de_ChannelConfigurationMap(data.botConfiguration, context); - } - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + botAlias: __expectString, + botConfiguration: _json, + botName: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + failureReason: __expectString, + name: __expectString, + status: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2480,10 +2322,9 @@ const de_GetBotChannelAssociationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2503,12 +2344,11 @@ export const de_GetBotChannelAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botChannelAssociations != null) { - contents.botChannelAssociations = de_BotChannelAssociationList(data.botChannelAssociations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botChannelAssociations: (_) => de_BotChannelAssociationList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2536,10 +2376,9 @@ const de_GetBotChannelAssociationsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2559,12 +2398,11 @@ export const de_GetBotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bots != null) { - contents.bots = de_BotMetadataList(data.bots, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + bots: (_) => de_BotMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2595,10 +2433,9 @@ const de_GetBotsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,12 +2455,11 @@ export const de_GetBotVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bots != null) { - contents.bots = de_BotMetadataList(data.bots, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + bots: (_) => de_BotMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2654,10 +2490,9 @@ const de_GetBotVersionsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2677,15 +2512,12 @@ export const de_GetBuiltinIntentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.signature != null) { - contents.signature = __expectString(data.signature); - } - if (data.slots != null) { - contents.slots = de_BuiltinIntentSlotList(data.slots, context); - } - if (data.supportedLocales != null) { - contents.supportedLocales = de_LocaleList(data.supportedLocales, context); - } + const doc = take(data, { + signature: __expectString, + slots: _json, + supportedLocales: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2716,10 +2548,9 @@ const de_GetBuiltinIntentCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2739,12 +2570,11 @@ export const de_GetBuiltinIntentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.intents != null) { - contents.intents = de_BuiltinIntentMetadataList(data.intents, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + intents: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2772,10 +2602,9 @@ const de_GetBuiltinIntentsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2795,12 +2624,11 @@ export const de_GetBuiltinSlotTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slotTypes != null) { - contents.slotTypes = de_BuiltinSlotTypeMetadataList(data.slotTypes, context); - } + const doc = take(data, { + nextToken: __expectString, + slotTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2828,10 +2656,9 @@ const de_GetBuiltinSlotTypesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2851,27 +2678,16 @@ export const de_GetExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.exportStatus != null) { - contents.exportStatus = __expectString(data.exportStatus); - } - if (data.exportType != null) { - contents.exportType = __expectString(data.exportType); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.url != null) { - contents.url = __expectString(data.url); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + exportStatus: __expectString, + exportType: __expectString, + failureReason: __expectString, + name: __expectString, + resourceType: __expectString, + url: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2902,10 +2718,9 @@ const de_GetExportCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2925,27 +2740,16 @@ export const de_GetImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.failureReason != null) { - contents.failureReason = de_StringList(data.failureReason, context); - } - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } - if (data.importStatus != null) { - contents.importStatus = __expectString(data.importStatus); - } - if (data.mergeStrategy != null) { - contents.mergeStrategy = __expectString(data.mergeStrategy); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: _json, + importId: __expectString, + importStatus: __expectString, + mergeStrategy: __expectString, + name: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2976,10 +2780,9 @@ const de_GetImportCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2999,60 +2802,27 @@ export const de_GetIntentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.conclusionStatement != null) { - contents.conclusionStatement = de_Statement(data.conclusionStatement, context); - } - if (data.confirmationPrompt != null) { - contents.confirmationPrompt = de_Prompt(data.confirmationPrompt, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.dialogCodeHook != null) { - contents.dialogCodeHook = de_CodeHook(data.dialogCodeHook, context); - } - if (data.followUpPrompt != null) { - contents.followUpPrompt = de_FollowUpPrompt(data.followUpPrompt, context); - } - if (data.fulfillmentActivity != null) { - contents.fulfillmentActivity = de_FulfillmentActivity(data.fulfillmentActivity, context); - } - if (data.inputContexts != null) { - contents.inputContexts = de_InputContextList(data.inputContexts, context); - } - if (data.kendraConfiguration != null) { - contents.kendraConfiguration = de_KendraConfiguration(data.kendraConfiguration, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.outputContexts != null) { - contents.outputContexts = de_OutputContextList(data.outputContexts, context); - } - if (data.parentIntentSignature != null) { - contents.parentIntentSignature = __expectString(data.parentIntentSignature); - } - if (data.rejectionStatement != null) { - contents.rejectionStatement = de_Statement(data.rejectionStatement, context); - } - if (data.sampleUtterances != null) { - contents.sampleUtterances = de_IntentUtteranceList(data.sampleUtterances, context); - } - if (data.slots != null) { - contents.slots = de_SlotList(data.slots, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + checksum: __expectString, + conclusionStatement: _json, + confirmationPrompt: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + dialogCodeHook: _json, + followUpPrompt: _json, + fulfillmentActivity: _json, + inputContexts: _json, + kendraConfiguration: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + outputContexts: _json, + parentIntentSignature: __expectString, + rejectionStatement: _json, + sampleUtterances: _json, + slots: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3083,10 +2853,9 @@ const de_GetIntentCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3106,12 +2875,11 @@ export const de_GetIntentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.intents != null) { - contents.intents = de_IntentMetadataList(data.intents, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + intents: (_) => de_IntentMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3142,10 +2910,9 @@ const de_GetIntentsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3165,12 +2932,11 @@ export const de_GetIntentVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.intents != null) { - contents.intents = de_IntentMetadataList(data.intents, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + intents: (_) => de_IntentMetadataList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3201,10 +2967,9 @@ const de_GetIntentVersionsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3224,36 +2989,19 @@ export const de_GetMigrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alerts != null) { - contents.alerts = de_MigrationAlerts(data.alerts, context); - } - if (data.migrationId != null) { - contents.migrationId = __expectString(data.migrationId); - } - if (data.migrationStatus != null) { - contents.migrationStatus = __expectString(data.migrationStatus); - } - if (data.migrationStrategy != null) { - contents.migrationStrategy = __expectString(data.migrationStrategy); - } - if (data.migrationTimestamp != null) { - contents.migrationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.migrationTimestamp))); - } - if (data.v1BotLocale != null) { - contents.v1BotLocale = __expectString(data.v1BotLocale); - } - if (data.v1BotName != null) { - contents.v1BotName = __expectString(data.v1BotName); - } - if (data.v1BotVersion != null) { - contents.v1BotVersion = __expectString(data.v1BotVersion); - } - if (data.v2BotId != null) { - contents.v2BotId = __expectString(data.v2BotId); - } - if (data.v2BotRole != null) { - contents.v2BotRole = __expectString(data.v2BotRole); - } + const doc = take(data, { + alerts: _json, + migrationId: __expectString, + migrationStatus: __expectString, + migrationStrategy: __expectString, + migrationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + v1BotLocale: __expectString, + v1BotName: __expectString, + v1BotVersion: __expectString, + v2BotId: __expectString, + v2BotRole: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3284,10 +3032,9 @@ const de_GetMigrationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3307,12 +3054,11 @@ export const de_GetMigrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.migrationSummaries != null) { - contents.migrationSummaries = de_MigrationSummaryList(data.migrationSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + migrationSummaries: (_) => de_MigrationSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3340,10 +3086,9 @@ const de_GetMigrationsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3363,36 +3108,19 @@ export const de_GetSlotTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enumerationValues != null) { - contents.enumerationValues = de_EnumerationValues(data.enumerationValues, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.parentSlotTypeSignature != null) { - contents.parentSlotTypeSignature = __expectString(data.parentSlotTypeSignature); - } - if (data.slotTypeConfigurations != null) { - contents.slotTypeConfigurations = de_SlotTypeConfigurations(data.slotTypeConfigurations, context); - } - if (data.valueSelectionStrategy != null) { - contents.valueSelectionStrategy = __expectString(data.valueSelectionStrategy); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + checksum: __expectString, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + enumerationValues: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + parentSlotTypeSignature: __expectString, + slotTypeConfigurations: _json, + valueSelectionStrategy: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3423,10 +3151,9 @@ const de_GetSlotTypeCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3446,12 +3173,11 @@ export const de_GetSlotTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slotTypes != null) { - contents.slotTypes = de_SlotTypeMetadataList(data.slotTypes, context); - } + const doc = take(data, { + nextToken: __expectString, + slotTypes: (_) => de_SlotTypeMetadataList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3482,10 +3208,9 @@ const de_GetSlotTypesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3505,12 +3230,11 @@ export const de_GetSlotTypeVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slotTypes != null) { - contents.slotTypes = de_SlotTypeMetadataList(data.slotTypes, context); - } + const doc = take(data, { + nextToken: __expectString, + slotTypes: (_) => de_SlotTypeMetadataList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3541,10 +3265,9 @@ const de_GetSlotTypeVersionsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3564,12 +3287,11 @@ export const de_GetUtterancesViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.utterances != null) { - contents.utterances = de_ListsOfUtterances(data.utterances, context); - } + const doc = take(data, { + botName: __expectString, + utterances: (_) => de_ListsOfUtterances(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3597,10 +3319,9 @@ const de_GetUtterancesViewCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3620,9 +3341,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3653,10 +3375,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3676,66 +3397,29 @@ export const de_PutBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.abortStatement != null) { - contents.abortStatement = de_Statement(data.abortStatement, context); - } - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.childDirected != null) { - contents.childDirected = __expectBoolean(data.childDirected); - } - if (data.clarificationPrompt != null) { - contents.clarificationPrompt = de_Prompt(data.clarificationPrompt, context); - } - if (data.createVersion != null) { - contents.createVersion = __expectBoolean(data.createVersion); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.detectSentiment != null) { - contents.detectSentiment = __expectBoolean(data.detectSentiment); - } - if (data.enableModelImprovements != null) { - contents.enableModelImprovements = __expectBoolean(data.enableModelImprovements); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.intents != null) { - contents.intents = de_IntentList(data.intents, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.locale != null) { - contents.locale = __expectString(data.locale); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.nluIntentConfidenceThreshold != null) { - contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } - if (data.voiceId != null) { - contents.voiceId = __expectString(data.voiceId); - } + const doc = take(data, { + abortStatement: _json, + checksum: __expectString, + childDirected: __expectBoolean, + clarificationPrompt: _json, + createVersion: __expectBoolean, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + detectSentiment: __expectBoolean, + enableModelImprovements: __expectBoolean, + failureReason: __expectString, + idleSessionTTLInSeconds: __expectInt32, + intents: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + locale: __expectString, + name: __expectString, + nluIntentConfidenceThreshold: __limitedParseDouble, + status: __expectString, + tags: _json, + version: __expectString, + voiceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3766,10 +3450,9 @@ const de_PutBotCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3789,33 +3472,18 @@ export const de_PutBotAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.conversationLogs != null) { - contents.conversationLogs = de_ConversationLogsResponse(data.conversationLogs, context); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + botName: __expectString, + botVersion: __expectString, + checksum: __expectString, + conversationLogs: _json, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3849,10 +3517,9 @@ const de_PutBotAliasCommandError = async ( throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3872,63 +3539,28 @@ export const de_PutIntentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.conclusionStatement != null) { - contents.conclusionStatement = de_Statement(data.conclusionStatement, context); - } - if (data.confirmationPrompt != null) { - contents.confirmationPrompt = de_Prompt(data.confirmationPrompt, context); - } - if (data.createVersion != null) { - contents.createVersion = __expectBoolean(data.createVersion); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.dialogCodeHook != null) { - contents.dialogCodeHook = de_CodeHook(data.dialogCodeHook, context); - } - if (data.followUpPrompt != null) { - contents.followUpPrompt = de_FollowUpPrompt(data.followUpPrompt, context); - } - if (data.fulfillmentActivity != null) { - contents.fulfillmentActivity = de_FulfillmentActivity(data.fulfillmentActivity, context); - } - if (data.inputContexts != null) { - contents.inputContexts = de_InputContextList(data.inputContexts, context); - } - if (data.kendraConfiguration != null) { - contents.kendraConfiguration = de_KendraConfiguration(data.kendraConfiguration, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.outputContexts != null) { - contents.outputContexts = de_OutputContextList(data.outputContexts, context); - } - if (data.parentIntentSignature != null) { - contents.parentIntentSignature = __expectString(data.parentIntentSignature); - } - if (data.rejectionStatement != null) { - contents.rejectionStatement = de_Statement(data.rejectionStatement, context); - } - if (data.sampleUtterances != null) { - contents.sampleUtterances = de_IntentUtteranceList(data.sampleUtterances, context); - } - if (data.slots != null) { - contents.slots = de_SlotList(data.slots, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + checksum: __expectString, + conclusionStatement: _json, + confirmationPrompt: _json, + createVersion: __expectBoolean, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + dialogCodeHook: _json, + followUpPrompt: _json, + fulfillmentActivity: _json, + inputContexts: _json, + kendraConfiguration: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + outputContexts: _json, + parentIntentSignature: __expectString, + rejectionStatement: _json, + sampleUtterances: _json, + slots: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3962,10 +3594,9 @@ const de_PutIntentCommandError = async ( throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3985,39 +3616,20 @@ export const de_PutSlotTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.checksum != null) { - contents.checksum = __expectString(data.checksum); - } - if (data.createVersion != null) { - contents.createVersion = __expectBoolean(data.createVersion); - } - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.enumerationValues != null) { - contents.enumerationValues = de_EnumerationValues(data.enumerationValues, context); - } - if (data.lastUpdatedDate != null) { - contents.lastUpdatedDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDate))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.parentSlotTypeSignature != null) { - contents.parentSlotTypeSignature = __expectString(data.parentSlotTypeSignature); - } - if (data.slotTypeConfigurations != null) { - contents.slotTypeConfigurations = de_SlotTypeConfigurations(data.slotTypeConfigurations, context); - } - if (data.valueSelectionStrategy != null) { - contents.valueSelectionStrategy = __expectString(data.valueSelectionStrategy); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + checksum: __expectString, + createVersion: __expectBoolean, + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + enumerationValues: _json, + lastUpdatedDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + parentSlotTypeSignature: __expectString, + slotTypeConfigurations: _json, + valueSelectionStrategy: __expectString, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4051,10 +3663,9 @@ const de_PutSlotTypeCommandError = async ( throw await de_PreconditionFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4074,27 +3685,16 @@ export const de_StartImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdDate != null) { - contents.createdDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdDate))); - } - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } - if (data.importStatus != null) { - contents.importStatus = __expectString(data.importStatus); - } - if (data.mergeStrategy != null) { - contents.mergeStrategy = __expectString(data.mergeStrategy); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + createdDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + importId: __expectString, + importStatus: __expectString, + mergeStrategy: __expectString, + name: __expectString, + resourceType: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4122,10 +3722,9 @@ const de_StartImportCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4145,30 +3744,17 @@ export const de_StartMigrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.migrationId != null) { - contents.migrationId = __expectString(data.migrationId); - } - if (data.migrationStrategy != null) { - contents.migrationStrategy = __expectString(data.migrationStrategy); - } - if (data.migrationTimestamp != null) { - contents.migrationTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.migrationTimestamp))); - } - if (data.v1BotLocale != null) { - contents.v1BotLocale = __expectString(data.v1BotLocale); - } - if (data.v1BotName != null) { - contents.v1BotName = __expectString(data.v1BotName); - } - if (data.v1BotVersion != null) { - contents.v1BotVersion = __expectString(data.v1BotVersion); - } - if (data.v2BotId != null) { - contents.v2BotId = __expectString(data.v2BotId); - } - if (data.v2BotRole != null) { - contents.v2BotRole = __expectString(data.v2BotRole); - } + const doc = take(data, { + migrationId: __expectString, + migrationStrategy: __expectString, + migrationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + v1BotLocale: __expectString, + v1BotName: __expectString, + v1BotVersion: __expectString, + v2BotId: __expectString, + v2BotRole: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4202,10 +3788,9 @@ const de_StartMigrationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4258,10 +3843,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4314,16 +3898,15 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4333,9 +3916,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4349,9 +3933,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4365,9 +3950,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4384,9 +3970,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4405,9 +3992,10 @@ const de_LimitExceededExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4421,9 +4009,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4440,9 +4029,10 @@ const de_PreconditionFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PreconditionFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4459,12 +4049,11 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.exampleReference != null) { - contents.exampleReference = de_ResourceReference(data.exampleReference, context); - } - if (data.referenceType != null) { - contents.referenceType = __expectString(data.referenceType); - } + const doc = take(data, { + exampleReference: _json, + referenceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4472,378 +4061,84 @@ const de_ResourceInUseExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CodeHook - */ -const se_CodeHook = (input: CodeHook, context: __SerdeContext): any => { - return { - ...(input.messageVersion != null && { messageVersion: input.messageVersion }), - ...(input.uri != null && { uri: input.uri }), - }; -}; +// se_CodeHook omitted. -/** - * serializeAws_restJson1ConversationLogsRequest - */ -const se_ConversationLogsRequest = (input: ConversationLogsRequest, context: __SerdeContext): any => { - return { - ...(input.iamRoleArn != null && { iamRoleArn: input.iamRoleArn }), - ...(input.logSettings != null && { logSettings: se_LogSettingsRequestList(input.logSettings, context) }), - }; -}; +// se_ConversationLogsRequest omitted. -/** - * serializeAws_restJson1EnumerationValue - */ -const se_EnumerationValue = (input: EnumerationValue, context: __SerdeContext): any => { - return { - ...(input.synonyms != null && { synonyms: se_SynonymList(input.synonyms, context) }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_EnumerationValue omitted. -/** - * serializeAws_restJson1EnumerationValues - */ -const se_EnumerationValues = (input: EnumerationValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnumerationValue(entry, context); - }); -}; +// se_EnumerationValues omitted. -/** - * serializeAws_restJson1FollowUpPrompt - */ -const se_FollowUpPrompt = (input: FollowUpPrompt, context: __SerdeContext): any => { - return { - ...(input.prompt != null && { prompt: se_Prompt(input.prompt, context) }), - ...(input.rejectionStatement != null && { rejectionStatement: se_Statement(input.rejectionStatement, context) }), - }; -}; +// se_FollowUpPrompt omitted. -/** - * serializeAws_restJson1FulfillmentActivity - */ -const se_FulfillmentActivity = (input: FulfillmentActivity, context: __SerdeContext): any => { - return { - ...(input.codeHook != null && { codeHook: se_CodeHook(input.codeHook, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_FulfillmentActivity omitted. -/** - * serializeAws_restJson1InputContext - */ -const se_InputContext = (input: InputContext, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_InputContext omitted. -/** - * serializeAws_restJson1InputContextList - */ -const se_InputContextList = (input: InputContext[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputContext(entry, context); - }); -}; +// se_InputContextList omitted. -/** - * serializeAws_restJson1Intent - */ -const se_Intent = (input: Intent, context: __SerdeContext): any => { - return { - ...(input.intentName != null && { intentName: input.intentName }), - ...(input.intentVersion != null && { intentVersion: input.intentVersion }), - }; -}; +// se_Intent omitted. -/** - * serializeAws_restJson1IntentList - */ -const se_IntentList = (input: Intent[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Intent(entry, context); - }); -}; +// se_IntentList omitted. -/** - * serializeAws_restJson1IntentUtteranceList - */ -const se_IntentUtteranceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IntentUtteranceList omitted. -/** - * serializeAws_restJson1KendraConfiguration - */ -const se_KendraConfiguration = (input: KendraConfiguration, context: __SerdeContext): any => { - return { - ...(input.kendraIndex != null && { kendraIndex: input.kendraIndex }), - ...(input.queryFilterString != null && { queryFilterString: input.queryFilterString }), - ...(input.role != null && { role: input.role }), - }; -}; +// se_KendraConfiguration omitted. -/** - * serializeAws_restJson1LogSettingsRequest - */ -const se_LogSettingsRequest = (input: LogSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: input.destination }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.logType != null && { logType: input.logType }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_LogSettingsRequest omitted. -/** - * serializeAws_restJson1LogSettingsRequestList - */ -const se_LogSettingsRequestList = (input: LogSettingsRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LogSettingsRequest(entry, context); - }); -}; +// se_LogSettingsRequestList omitted. -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.content != null && { content: input.content }), - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.groupNumber != null && { groupNumber: input.groupNumber }), - }; -}; +// se_Message omitted. -/** - * serializeAws_restJson1MessageList - */ -const se_MessageList = (input: Message[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Message(entry, context); - }); -}; +// se_MessageList omitted. -/** - * serializeAws_restJson1OutputContext - */ -const se_OutputContext = (input: OutputContext, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }), - ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }), - }; -}; +// se_OutputContext omitted. -/** - * serializeAws_restJson1OutputContextList - */ -const se_OutputContextList = (input: OutputContext[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OutputContext(entry, context); - }); -}; +// se_OutputContextList omitted. -/** - * serializeAws_restJson1Prompt - */ -const se_Prompt = (input: Prompt, context: __SerdeContext): any => { - return { - ...(input.maxAttempts != null && { maxAttempts: input.maxAttempts }), - ...(input.messages != null && { messages: se_MessageList(input.messages, context) }), - ...(input.responseCard != null && { responseCard: input.responseCard }), - }; -}; +// se_Prompt omitted. -/** - * serializeAws_restJson1Slot - */ -const se_Slot = (input: Slot, context: __SerdeContext): any => { - return { - ...(input.defaultValueSpec != null && { - defaultValueSpec: se_SlotDefaultValueSpec(input.defaultValueSpec, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.obfuscationSetting != null && { obfuscationSetting: input.obfuscationSetting }), - ...(input.priority != null && { priority: input.priority }), - ...(input.responseCard != null && { responseCard: input.responseCard }), - ...(input.sampleUtterances != null && { sampleUtterances: se_SlotUtteranceList(input.sampleUtterances, context) }), - ...(input.slotConstraint != null && { slotConstraint: input.slotConstraint }), - ...(input.slotType != null && { slotType: input.slotType }), - ...(input.slotTypeVersion != null && { slotTypeVersion: input.slotTypeVersion }), - ...(input.valueElicitationPrompt != null && { - valueElicitationPrompt: se_Prompt(input.valueElicitationPrompt, context), - }), - }; -}; +// se_Slot omitted. -/** - * serializeAws_restJson1SlotDefaultValue - */ -const se_SlotDefaultValue = (input: SlotDefaultValue, context: __SerdeContext): any => { - return { - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - }; -}; +// se_SlotDefaultValue omitted. -/** - * serializeAws_restJson1SlotDefaultValueList - */ -const se_SlotDefaultValueList = (input: SlotDefaultValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotDefaultValue(entry, context); - }); -}; +// se_SlotDefaultValueList omitted. -/** - * serializeAws_restJson1SlotDefaultValueSpec - */ -const se_SlotDefaultValueSpec = (input: SlotDefaultValueSpec, context: __SerdeContext): any => { - return { - ...(input.defaultValueList != null && { - defaultValueList: se_SlotDefaultValueList(input.defaultValueList, context), - }), - }; -}; +// se_SlotDefaultValueSpec omitted. -/** - * serializeAws_restJson1SlotList - */ -const se_SlotList = (input: Slot[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Slot(entry, context); - }); -}; +// se_SlotList omitted. -/** - * serializeAws_restJson1SlotTypeConfiguration - */ -const se_SlotTypeConfiguration = (input: SlotTypeConfiguration, context: __SerdeContext): any => { - return { - ...(input.regexConfiguration != null && { - regexConfiguration: se_SlotTypeRegexConfiguration(input.regexConfiguration, context), - }), - }; -}; +// se_SlotTypeConfiguration omitted. -/** - * serializeAws_restJson1SlotTypeConfigurations - */ -const se_SlotTypeConfigurations = (input: SlotTypeConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotTypeConfiguration(entry, context); - }); -}; +// se_SlotTypeConfigurations omitted. -/** - * serializeAws_restJson1SlotTypeRegexConfiguration - */ -const se_SlotTypeRegexConfiguration = (input: SlotTypeRegexConfiguration, context: __SerdeContext): any => { - return { - ...(input.pattern != null && { pattern: input.pattern }), - }; -}; +// se_SlotTypeRegexConfiguration omitted. -/** - * serializeAws_restJson1SlotUtteranceList - */ -const se_SlotUtteranceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SlotUtteranceList omitted. -/** - * serializeAws_restJson1Statement - */ -const se_Statement = (input: Statement, context: __SerdeContext): any => { - return { - ...(input.messages != null && { messages: se_MessageList(input.messages, context) }), - ...(input.responseCard != null && { responseCard: input.responseCard }), - }; -}; +// se_Statement omitted. -/** - * serializeAws_restJson1SynonymList - */ -const se_SynonymList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SynonymList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. /** * deserializeAws_restJson1BotAliasMetadata */ const de_BotAliasMetadata = (output: any, context: __SerdeContext): BotAliasMetadata => { - return { - botName: __expectString(output.botName), - botVersion: __expectString(output.botVersion), - checksum: __expectString(output.checksum), - conversationLogs: - output.conversationLogs != null ? de_ConversationLogsResponse(output.conversationLogs, context) : undefined, - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + botName: __expectString, + botVersion: __expectString, + checksum: __expectString, + conversationLogs: _json, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** @@ -4853,9 +4148,6 @@ const de_BotAliasMetadataList = (output: any, context: __SerdeContext): BotAlias const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BotAliasMetadata(entry, context); }); return retVal; @@ -4865,21 +4157,17 @@ const de_BotAliasMetadataList = (output: any, context: __SerdeContext): BotAlias * deserializeAws_restJson1BotChannelAssociation */ const de_BotChannelAssociation = (output: any, context: __SerdeContext): BotChannelAssociation => { - return { - botAlias: __expectString(output.botAlias), - botConfiguration: - output.botConfiguration != null ? de_ChannelConfigurationMap(output.botConfiguration, context) : undefined, - botName: __expectString(output.botName), - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - failureReason: __expectString(output.failureReason), - name: __expectString(output.name), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; + return take(output, { + botAlias: __expectString, + botConfiguration: _json, + botName: __expectString, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + failureReason: __expectString, + name: __expectString, + status: __expectString, + type: __expectString, + }) as any; }; /** @@ -4889,9 +4177,6 @@ const de_BotChannelAssociationList = (output: any, context: __SerdeContext): Bot const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BotChannelAssociation(entry, context); }); return retVal; @@ -4901,20 +4186,14 @@ const de_BotChannelAssociationList = (output: any, context: __SerdeContext): Bot * deserializeAws_restJson1BotMetadata */ const de_BotMetadata = (output: any, context: __SerdeContext): BotMetadata => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - version: __expectString(output.version), - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + version: __expectString, + }) as any; }; /** @@ -4924,233 +4203,56 @@ const de_BotMetadataList = (output: any, context: __SerdeContext): BotMetadata[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BotMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1BuiltinIntentMetadata - */ -const de_BuiltinIntentMetadata = (output: any, context: __SerdeContext): BuiltinIntentMetadata => { - return { - signature: __expectString(output.signature), - supportedLocales: output.supportedLocales != null ? de_LocaleList(output.supportedLocales, context) : undefined, - } as any; -}; +// de_BuiltinIntentMetadata omitted. -/** - * deserializeAws_restJson1BuiltinIntentMetadataList - */ -const de_BuiltinIntentMetadataList = (output: any, context: __SerdeContext): BuiltinIntentMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuiltinIntentMetadata(entry, context); - }); - return retVal; -}; +// de_BuiltinIntentMetadataList omitted. -/** - * deserializeAws_restJson1BuiltinIntentSlot - */ -const de_BuiltinIntentSlot = (output: any, context: __SerdeContext): BuiltinIntentSlot => { - return { - name: __expectString(output.name), - } as any; -}; +// de_BuiltinIntentSlot omitted. -/** - * deserializeAws_restJson1BuiltinIntentSlotList - */ -const de_BuiltinIntentSlotList = (output: any, context: __SerdeContext): BuiltinIntentSlot[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuiltinIntentSlot(entry, context); - }); - return retVal; -}; +// de_BuiltinIntentSlotList omitted. -/** - * deserializeAws_restJson1BuiltinSlotTypeMetadata - */ -const de_BuiltinSlotTypeMetadata = (output: any, context: __SerdeContext): BuiltinSlotTypeMetadata => { - return { - signature: __expectString(output.signature), - supportedLocales: output.supportedLocales != null ? de_LocaleList(output.supportedLocales, context) : undefined, - } as any; -}; +// de_BuiltinSlotTypeMetadata omitted. -/** - * deserializeAws_restJson1BuiltinSlotTypeMetadataList - */ -const de_BuiltinSlotTypeMetadataList = (output: any, context: __SerdeContext): BuiltinSlotTypeMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuiltinSlotTypeMetadata(entry, context); - }); - return retVal; -}; +// de_BuiltinSlotTypeMetadataList omitted. -/** - * deserializeAws_restJson1ChannelConfigurationMap - */ -const de_ChannelConfigurationMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ChannelConfigurationMap omitted. -/** - * deserializeAws_restJson1CodeHook - */ -const de_CodeHook = (output: any, context: __SerdeContext): CodeHook => { - return { - messageVersion: __expectString(output.messageVersion), - uri: __expectString(output.uri), - } as any; -}; +// de_CodeHook omitted. -/** - * deserializeAws_restJson1ConversationLogsResponse - */ -const de_ConversationLogsResponse = (output: any, context: __SerdeContext): ConversationLogsResponse => { - return { - iamRoleArn: __expectString(output.iamRoleArn), - logSettings: output.logSettings != null ? de_LogSettingsResponseList(output.logSettings, context) : undefined, - } as any; -}; +// de_ConversationLogsResponse omitted. -/** - * deserializeAws_restJson1EnumerationValue - */ -const de_EnumerationValue = (output: any, context: __SerdeContext): EnumerationValue => { - return { - synonyms: output.synonyms != null ? de_SynonymList(output.synonyms, context) : undefined, - value: __expectString(output.value), - } as any; -}; +// de_EnumerationValue omitted. -/** - * deserializeAws_restJson1EnumerationValues - */ -const de_EnumerationValues = (output: any, context: __SerdeContext): EnumerationValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnumerationValue(entry, context); - }); - return retVal; -}; +// de_EnumerationValues omitted. -/** - * deserializeAws_restJson1FollowUpPrompt - */ -const de_FollowUpPrompt = (output: any, context: __SerdeContext): FollowUpPrompt => { - return { - prompt: output.prompt != null ? de_Prompt(output.prompt, context) : undefined, - rejectionStatement: - output.rejectionStatement != null ? de_Statement(output.rejectionStatement, context) : undefined, - } as any; -}; +// de_FollowUpPrompt omitted. -/** - * deserializeAws_restJson1FulfillmentActivity - */ -const de_FulfillmentActivity = (output: any, context: __SerdeContext): FulfillmentActivity => { - return { - codeHook: output.codeHook != null ? de_CodeHook(output.codeHook, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_FulfillmentActivity omitted. -/** - * deserializeAws_restJson1InputContext - */ -const de_InputContext = (output: any, context: __SerdeContext): InputContext => { - return { - name: __expectString(output.name), - } as any; -}; +// de_InputContext omitted. -/** - * deserializeAws_restJson1InputContextList - */ -const de_InputContextList = (output: any, context: __SerdeContext): InputContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputContext(entry, context); - }); - return retVal; -}; +// de_InputContextList omitted. -/** - * deserializeAws_restJson1Intent - */ -const de_Intent = (output: any, context: __SerdeContext): Intent => { - return { - intentName: __expectString(output.intentName), - intentVersion: __expectString(output.intentVersion), - } as any; -}; +// de_Intent omitted. -/** - * deserializeAws_restJson1IntentList - */ -const de_IntentList = (output: any, context: __SerdeContext): Intent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Intent(entry, context); - }); - return retVal; -}; +// de_IntentList omitted. /** * deserializeAws_restJson1IntentMetadata */ const de_IntentMetadata = (output: any, context: __SerdeContext): IntentMetadata => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - name: __expectString(output.name), - version: __expectString(output.version), - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + version: __expectString, + }) as any; }; /** @@ -5160,39 +4262,14 @@ const de_IntentMetadataList = (output: any, context: __SerdeContext): IntentMeta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IntentMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IntentUtteranceList - */ -const de_IntentUtteranceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IntentUtteranceList omitted. -/** - * deserializeAws_restJson1KendraConfiguration - */ -const de_KendraConfiguration = (output: any, context: __SerdeContext): KendraConfiguration => { - return { - kendraIndex: __expectString(output.kendraIndex), - queryFilterString: __expectString(output.queryFilterString), - role: __expectString(output.role), - } as any; -}; +// de_KendraConfiguration omitted. /** * deserializeAws_restJson1ListOfUtterance @@ -5201,9 +4278,6 @@ const de_ListOfUtterance = (output: any, context: __SerdeContext): UtteranceData const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UtteranceData(entry, context); }); return retVal; @@ -5216,159 +4290,44 @@ const de_ListsOfUtterances = (output: any, context: __SerdeContext): UtteranceLi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UtteranceList(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LocaleList - */ -const de_LocaleList = (output: any, context: __SerdeContext): (Locale | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LocaleList omitted. -/** - * deserializeAws_restJson1LogSettingsResponse - */ -const de_LogSettingsResponse = (output: any, context: __SerdeContext): LogSettingsResponse => { - return { - destination: __expectString(output.destination), - kmsKeyArn: __expectString(output.kmsKeyArn), - logType: __expectString(output.logType), - resourceArn: __expectString(output.resourceArn), - resourcePrefix: __expectString(output.resourcePrefix), - } as any; -}; +// de_LogSettingsResponse omitted. -/** - * deserializeAws_restJson1LogSettingsResponseList - */ -const de_LogSettingsResponseList = (output: any, context: __SerdeContext): LogSettingsResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogSettingsResponse(entry, context); - }); - return retVal; -}; +// de_LogSettingsResponseList omitted. -/** - * deserializeAws_restJson1Message - */ -const de_Message = (output: any, context: __SerdeContext): Message => { - return { - content: __expectString(output.content), - contentType: __expectString(output.contentType), - groupNumber: __expectInt32(output.groupNumber), - } as any; -}; +// de_Message omitted. -/** - * deserializeAws_restJson1MessageList - */ -const de_MessageList = (output: any, context: __SerdeContext): Message[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Message(entry, context); - }); - return retVal; -}; +// de_MessageList omitted. -/** - * deserializeAws_restJson1MigrationAlert - */ -const de_MigrationAlert = (output: any, context: __SerdeContext): MigrationAlert => { - return { - details: output.details != null ? de_MigrationAlertDetails(output.details, context) : undefined, - message: __expectString(output.message), - referenceURLs: - output.referenceURLs != null ? de_MigrationAlertReferenceURLs(output.referenceURLs, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_MigrationAlert omitted. -/** - * deserializeAws_restJson1MigrationAlertDetails - */ -const de_MigrationAlertDetails = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MigrationAlertDetails omitted. -/** - * deserializeAws_restJson1MigrationAlertReferenceURLs - */ -const de_MigrationAlertReferenceURLs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MigrationAlertReferenceURLs omitted. -/** - * deserializeAws_restJson1MigrationAlerts - */ -const de_MigrationAlerts = (output: any, context: __SerdeContext): MigrationAlert[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MigrationAlert(entry, context); - }); - return retVal; -}; +// de_MigrationAlerts omitted. /** * deserializeAws_restJson1MigrationSummary */ const de_MigrationSummary = (output: any, context: __SerdeContext): MigrationSummary => { - return { - migrationId: __expectString(output.migrationId), - migrationStatus: __expectString(output.migrationStatus), - migrationStrategy: __expectString(output.migrationStrategy), - migrationTimestamp: - output.migrationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.migrationTimestamp))) - : undefined, - v1BotLocale: __expectString(output.v1BotLocale), - v1BotName: __expectString(output.v1BotName), - v1BotVersion: __expectString(output.v1BotVersion), - v2BotId: __expectString(output.v2BotId), - v2BotRole: __expectString(output.v2BotRole), - } as any; + return take(output, { + migrationId: __expectString, + migrationStatus: __expectString, + migrationStrategy: __expectString, + migrationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + v1BotLocale: __expectString, + v1BotName: __expectString, + v1BotVersion: __expectString, + v2BotId: __expectString, + v2BotRole: __expectString, + }) as any; }; /** @@ -5378,174 +4337,44 @@ const de_MigrationSummaryList = (output: any, context: __SerdeContext): Migratio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MigrationSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1OutputContext - */ -const de_OutputContext = (output: any, context: __SerdeContext): OutputContext => { - return { - name: __expectString(output.name), - timeToLiveInSeconds: __expectInt32(output.timeToLiveInSeconds), - turnsToLive: __expectInt32(output.turnsToLive), - } as any; -}; +// de_OutputContext omitted. -/** - * deserializeAws_restJson1OutputContextList - */ -const de_OutputContextList = (output: any, context: __SerdeContext): OutputContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputContext(entry, context); - }); - return retVal; -}; +// de_OutputContextList omitted. -/** - * deserializeAws_restJson1Prompt - */ -const de_Prompt = (output: any, context: __SerdeContext): Prompt => { - return { - maxAttempts: __expectInt32(output.maxAttempts), - messages: output.messages != null ? de_MessageList(output.messages, context) : undefined, - responseCard: __expectString(output.responseCard), - } as any; -}; +// de_Prompt omitted. -/** - * deserializeAws_restJson1ResourceReference - */ -const de_ResourceReference = (output: any, context: __SerdeContext): ResourceReference => { - return { - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; +// de_ResourceReference omitted. -/** - * deserializeAws_restJson1Slot - */ -const de_Slot = (output: any, context: __SerdeContext): Slot => { - return { - defaultValueSpec: - output.defaultValueSpec != null ? de_SlotDefaultValueSpec(output.defaultValueSpec, context) : undefined, - description: __expectString(output.description), - name: __expectString(output.name), - obfuscationSetting: __expectString(output.obfuscationSetting), - priority: __expectInt32(output.priority), - responseCard: __expectString(output.responseCard), - sampleUtterances: - output.sampleUtterances != null ? de_SlotUtteranceList(output.sampleUtterances, context) : undefined, - slotConstraint: __expectString(output.slotConstraint), - slotType: __expectString(output.slotType), - slotTypeVersion: __expectString(output.slotTypeVersion), - valueElicitationPrompt: - output.valueElicitationPrompt != null ? de_Prompt(output.valueElicitationPrompt, context) : undefined, - } as any; -}; +// de_Slot omitted. -/** - * deserializeAws_restJson1SlotDefaultValue - */ -const de_SlotDefaultValue = (output: any, context: __SerdeContext): SlotDefaultValue => { - return { - defaultValue: __expectString(output.defaultValue), - } as any; -}; +// de_SlotDefaultValue omitted. -/** - * deserializeAws_restJson1SlotDefaultValueList - */ -const de_SlotDefaultValueList = (output: any, context: __SerdeContext): SlotDefaultValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlotDefaultValue(entry, context); - }); - return retVal; -}; +// de_SlotDefaultValueList omitted. -/** - * deserializeAws_restJson1SlotDefaultValueSpec - */ -const de_SlotDefaultValueSpec = (output: any, context: __SerdeContext): SlotDefaultValueSpec => { - return { - defaultValueList: - output.defaultValueList != null ? de_SlotDefaultValueList(output.defaultValueList, context) : undefined, - } as any; -}; +// de_SlotDefaultValueSpec omitted. -/** - * deserializeAws_restJson1SlotList - */ -const de_SlotList = (output: any, context: __SerdeContext): Slot[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Slot(entry, context); - }); - return retVal; -}; +// de_SlotList omitted. -/** - * deserializeAws_restJson1SlotTypeConfiguration - */ -const de_SlotTypeConfiguration = (output: any, context: __SerdeContext): SlotTypeConfiguration => { - return { - regexConfiguration: - output.regexConfiguration != null ? de_SlotTypeRegexConfiguration(output.regexConfiguration, context) : undefined, - } as any; -}; +// de_SlotTypeConfiguration omitted. -/** - * deserializeAws_restJson1SlotTypeConfigurations - */ -const de_SlotTypeConfigurations = (output: any, context: __SerdeContext): SlotTypeConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlotTypeConfiguration(entry, context); - }); - return retVal; -}; +// de_SlotTypeConfigurations omitted. /** * deserializeAws_restJson1SlotTypeMetadata */ const de_SlotTypeMetadata = (output: any, context: __SerdeContext): SlotTypeMetadata => { - return { - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - description: __expectString(output.description), - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - name: __expectString(output.name), - version: __expectString(output.version), - } as any; + return take(output, { + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + version: __expectString, + }) as any; }; /** @@ -5555,130 +4384,46 @@ const de_SlotTypeMetadataList = (output: any, context: __SerdeContext): SlotType const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SlotTypeMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SlotTypeRegexConfiguration - */ -const de_SlotTypeRegexConfiguration = (output: any, context: __SerdeContext): SlotTypeRegexConfiguration => { - return { - pattern: __expectString(output.pattern), - } as any; -}; +// de_SlotTypeRegexConfiguration omitted. -/** - * deserializeAws_restJson1SlotUtteranceList - */ -const de_SlotUtteranceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SlotUtteranceList omitted. -/** - * deserializeAws_restJson1Statement - */ -const de_Statement = (output: any, context: __SerdeContext): Statement => { - return { - messages: output.messages != null ? de_MessageList(output.messages, context) : undefined, - responseCard: __expectString(output.responseCard), - } as any; -}; +// de_Statement omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1SynonymList - */ -const de_SynonymList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SynonymList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1UtteranceData */ const de_UtteranceData = (output: any, context: __SerdeContext): UtteranceData => { - return { - count: __expectInt32(output.count), - distinctUsers: __expectInt32(output.distinctUsers), - firstUtteredDate: - output.firstUtteredDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.firstUtteredDate))) - : undefined, - lastUtteredDate: - output.lastUtteredDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUtteredDate))) - : undefined, - utteranceString: __expectString(output.utteranceString), - } as any; + return take(output, { + count: __expectInt32, + distinctUsers: __expectInt32, + firstUtteredDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUtteredDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + utteranceString: __expectString, + }) as any; }; /** * deserializeAws_restJson1UtteranceList */ const de_UtteranceList = (output: any, context: __SerdeContext): UtteranceList => { - return { - botVersion: __expectString(output.botVersion), - utterances: output.utterances != null ? de_ListOfUtterance(output.utterances, context) : undefined, - } as any; + return take(output, { + botVersion: __expectString, + utterances: (_: any) => de_ListOfUtterance(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts b/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts index a4ad786f1230..e40cbe01d26f 100644 --- a/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts +++ b/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,12 +11,13 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -167,7 +169,6 @@ import { AggregatedUtterancesSortBy, AggregatedUtterancesSummary, AllowedInputTypes, - AssociatedTranscript, AssociatedTranscriptFilter, AudioAndDTMFInputSpecification, AudioLogDestination, @@ -186,8 +187,6 @@ import { BotLocaleSortBy, BotLocaleSummary, BotMember, - BotRecommendationResults, - BotRecommendationResultStatistics, BotRecommendationSummary, BotSortBy, BotSummary, @@ -195,9 +194,7 @@ import { BotVersionSortBy, BotVersionSummary, BuiltInIntentSortBy, - BuiltInIntentSummary, BuiltInSlotTypeSortBy, - BuiltInSlotTypeSummary, Button, CloudWatchLogGroupLogDestination, CodeHookSpecification, @@ -222,7 +219,6 @@ import { ExportSortBy, ExportSummary, ExternalSourceSetting, - FailedCustomVocabularyItem, FulfillmentStartResponseSpecification, FulfillmentUpdateResponseSpecification, FulfillmentUpdatesSpecification, @@ -236,7 +232,6 @@ import { InputContext, IntentFilter, IntentSortBy, - IntentStatistics, IntentSummary, InternalServerException, KendraConfiguration, @@ -248,15 +243,12 @@ import { NewCustomVocabularyItem, ObfuscationSetting, OutputContext, - ParentBotNetwork, PathFormat, PlainTextMessage, PreconditionFailedException, Principal, - PromptAttempt, PromptAttemptSpecification, PromptSpecification, - RecommendedIntentSummary, RelativeAggregationDuration, ResourceNotFoundException, ResponseSpecification, @@ -274,7 +266,6 @@ import { SlotSummary, SlotTypeFilter, SlotTypeSortBy, - SlotTypeStatistics, SlotTypeSummary, SlotTypeValue, SlotValue, @@ -333,11 +324,11 @@ export const se_BatchCreateCustomVocabularyItemCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.customVocabularyItemList != null && { - customVocabularyItemList: se_CreateCustomVocabularyItemsList(input.customVocabularyItemList, context), - }), - }); + body = JSON.stringify( + take(input, { + customVocabularyItemList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -367,11 +358,11 @@ export const se_BatchDeleteCustomVocabularyItemCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.customVocabularyItemList != null && { - customVocabularyItemList: se_DeleteCustomVocabularyItemsList(input.customVocabularyItemList, context), - }), - }); + body = JSON.stringify( + take(input, { + customVocabularyItemList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -401,11 +392,11 @@ export const se_BatchUpdateCustomVocabularyItemCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.customVocabularyItemList != null && { - customVocabularyItemList: se_UpdateCustomVocabularyItemsList(input.customVocabularyItemList, context), - }), - }); + body = JSON.stringify( + take(input, { + customVocabularyItemList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -457,17 +448,19 @@ export const se_CreateBotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots"; let body: any; - body = JSON.stringify({ - ...(input.botMembers != null && { botMembers: se_BotMembers(input.botMembers, context) }), - ...(input.botName != null && { botName: input.botName }), - ...(input.botTags != null && { botTags: se_TagMap(input.botTags, context) }), - ...(input.botType != null && { botType: input.botType }), - ...(input.dataPrivacy != null && { dataPrivacy: se_DataPrivacy(input.dataPrivacy, context) }), - ...(input.description != null && { description: input.description }), - ...(input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.testBotAliasTags != null && { testBotAliasTags: se_TagMap(input.testBotAliasTags, context) }), - }); + body = JSON.stringify( + take(input, { + botMembers: (_) => _json(_), + botName: [], + botTags: (_) => _json(_), + botType: [], + dataPrivacy: (_) => _json(_), + description: [], + idleSessionTTLInSeconds: [], + roleArn: [], + testBotAliasTags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -493,21 +486,17 @@ export const se_CreateBotAliasCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}/botaliases"; resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.botAliasLocaleSettings != null && { - botAliasLocaleSettings: se_BotAliasLocaleSettingsMap(input.botAliasLocaleSettings, context), - }), - ...(input.botAliasName != null && { botAliasName: input.botAliasName }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.conversationLogSettings != null && { - conversationLogSettings: se_ConversationLogSettings(input.conversationLogSettings, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.sentimentAnalysisSettings != null && { - sentimentAnalysisSettings: se_SentimentAnalysisSettings(input.sentimentAnalysisSettings, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + botAliasLocaleSettings: (_) => _json(_), + botAliasName: [], + botVersion: [], + conversationLogSettings: (_) => _json(_), + description: [], + sentimentAnalysisSettings: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -536,14 +525,14 @@ export const se_CreateBotLocaleCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.localeId != null && { localeId: input.localeId }), - ...(input.nluIntentConfidenceThreshold != null && { - nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold), - }), - ...(input.voiceSettings != null && { voiceSettings: se_VoiceSettings(input.voiceSettings, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + localeId: [], + nluIntentConfidenceThreshold: (_) => __serializeFloat(_), + voiceSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -570,12 +559,12 @@ export const se_CreateBotVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}/botversions"; resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.botVersionLocaleSpecification != null && { - botVersionLocaleSpecification: se_BotVersionLocaleSpecification(input.botVersionLocaleSpecification, context), - }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + botVersionLocaleSpecification: (_) => _json(_), + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -600,13 +589,13 @@ export const se_CreateExportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/exports"; let body: any; - body = JSON.stringify({ - ...(input.fileFormat != null && { fileFormat: input.fileFormat }), - ...(input.filePassword != null && { filePassword: input.filePassword }), - ...(input.resourceSpecification != null && { - resourceSpecification: se_ExportResourceSpecification(input.resourceSpecification, context), - }), - }); + body = JSON.stringify( + take(input, { + fileFormat: [], + filePassword: [], + resourceSpecification: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -636,32 +625,22 @@ export const se_CreateIntentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.dialogCodeHook != null && { dialogCodeHook: se_DialogCodeHookSettings(input.dialogCodeHook, context) }), - ...(input.fulfillmentCodeHook != null && { - fulfillmentCodeHook: se_FulfillmentCodeHookSettings(input.fulfillmentCodeHook, context), - }), - ...(input.initialResponseSetting != null && { - initialResponseSetting: se_InitialResponseSetting(input.initialResponseSetting, context), - }), - ...(input.inputContexts != null && { inputContexts: se_InputContextsList(input.inputContexts, context) }), - ...(input.intentClosingSetting != null && { - intentClosingSetting: se_IntentClosingSetting(input.intentClosingSetting, context), - }), - ...(input.intentConfirmationSetting != null && { - intentConfirmationSetting: se_IntentConfirmationSetting(input.intentConfirmationSetting, context), - }), - ...(input.intentName != null && { intentName: input.intentName }), - ...(input.kendraConfiguration != null && { - kendraConfiguration: se_KendraConfiguration(input.kendraConfiguration, context), - }), - ...(input.outputContexts != null && { outputContexts: se_OutputContextsList(input.outputContexts, context) }), - ...(input.parentIntentSignature != null && { parentIntentSignature: input.parentIntentSignature }), - ...(input.sampleUtterances != null && { - sampleUtterances: se_SampleUtterancesList(input.sampleUtterances, context), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + dialogCodeHook: (_) => _json(_), + fulfillmentCodeHook: (_) => se_FulfillmentCodeHookSettings(_, context), + initialResponseSetting: (_) => se_InitialResponseSetting(_, context), + inputContexts: (_) => _json(_), + intentClosingSetting: (_) => se_IntentClosingSetting(_, context), + intentConfirmationSetting: (_) => se_IntentConfirmationSetting(_, context), + intentName: [], + kendraConfiguration: (_) => _json(_), + outputContexts: (_) => _json(_), + parentIntentSignature: [], + sampleUtterances: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -687,9 +666,11 @@ export const se_CreateResourcePolicyCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/policy/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -719,13 +700,15 @@ export const se_CreateResourcePolicyStatementCommand = async ( expectedRevisionId: [, input.expectedRevisionId!], }); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: se_OperationList(input.action, context) }), - ...(input.condition != null && { condition: se_ConditionMap(input.condition, context) }), - ...(input.effect != null && { effect: input.effect }), - ...(input.principal != null && { principal: se_PrincipalList(input.principal, context) }), - ...(input.statementId != null && { statementId: input.statementId }), - }); + body = JSON.stringify( + take(input, { + action: (_) => _json(_), + condition: (_) => _json(_), + effect: [], + principal: (_) => _json(_), + statementId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -757,21 +740,17 @@ export const se_CreateSlotCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "intentId", () => input.intentId!, "{intentId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.multipleValuesSetting != null && { - multipleValuesSetting: se_MultipleValuesSetting(input.multipleValuesSetting, context), - }), - ...(input.obfuscationSetting != null && { - obfuscationSetting: se_ObfuscationSetting(input.obfuscationSetting, context), - }), - ...(input.slotName != null && { slotName: input.slotName }), - ...(input.slotTypeId != null && { slotTypeId: input.slotTypeId }), - ...(input.subSlotSetting != null && { subSlotSetting: se_SubSlotSetting(input.subSlotSetting, context) }), - ...(input.valueElicitationSetting != null && { - valueElicitationSetting: se_SlotValueElicitationSetting(input.valueElicitationSetting, context), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + multipleValuesSetting: (_) => _json(_), + obfuscationSetting: (_) => _json(_), + slotName: [], + slotTypeId: [], + subSlotSetting: (_) => se_SubSlotSetting(_, context), + valueElicitationSetting: (_) => se_SlotValueElicitationSetting(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -801,21 +780,17 @@ export const se_CreateSlotTypeCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.compositeSlotTypeSetting != null && { - compositeSlotTypeSetting: se_CompositeSlotTypeSetting(input.compositeSlotTypeSetting, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.externalSourceSetting != null && { - externalSourceSetting: se_ExternalSourceSetting(input.externalSourceSetting, context), - }), - ...(input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature }), - ...(input.slotTypeName != null && { slotTypeName: input.slotTypeName }), - ...(input.slotTypeValues != null && { slotTypeValues: se_SlotTypeValues(input.slotTypeValues, context) }), - ...(input.valueSelectionSetting != null && { - valueSelectionSetting: se_SlotValueSelectionSetting(input.valueSelectionSetting, context), - }), - }); + body = JSON.stringify( + take(input, { + compositeSlotTypeSetting: (_) => _json(_), + description: [], + externalSourceSetting: (_) => _json(_), + parentSlotTypeSignature: [], + slotTypeName: [], + slotTypeValues: (_) => _json(_), + valueSelectionSetting: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1554,18 +1529,18 @@ export const se_ListAggregatedUtterancesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}/aggregatedutterances"; resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.aggregationDuration != null && { - aggregationDuration: se_UtteranceAggregationDuration(input.aggregationDuration, context), - }), - ...(input.botAliasId != null && { botAliasId: input.botAliasId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.filters != null && { filters: se_AggregatedUtterancesFilters(input.filters, context) }), - ...(input.localeId != null && { localeId: input.localeId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_AggregatedUtterancesSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + aggregationDuration: (_) => _json(_), + botAliasId: [], + botVersion: [], + filters: (_) => _json(_), + localeId: [], + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1591,10 +1566,12 @@ export const se_ListBotAliasesCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}/botaliases"; resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1623,12 +1600,14 @@ export const se_ListBotLocalesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_BotLocaleFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_BotLocaleSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1658,10 +1637,12 @@ export const se_ListBotRecommendationsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1686,12 +1667,14 @@ export const se_ListBotsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_BotFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_BotSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1718,11 +1701,13 @@ export const se_ListBotVersionsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}/botversions"; resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_BotVersionSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1749,11 +1734,13 @@ export const se_ListBuiltInIntentsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/builtins/locales/{localeId}/intents"; resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_BuiltInIntentSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1780,11 +1767,13 @@ export const se_ListBuiltInSlotTypesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/builtins/locales/{localeId}/slottypes"; resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_BuiltInSlotTypeSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1814,10 +1803,12 @@ export const se_ListCustomVocabularyItemsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1842,15 +1833,17 @@ export const se_ListExportsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/exports"; let body: any; - body = JSON.stringify({ - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.filters != null && { filters: se_ExportFilters(input.filters, context) }), - ...(input.localeId != null && { localeId: input.localeId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_ExportSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + botId: [], + botVersion: [], + filters: (_) => _json(_), + localeId: [], + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1875,15 +1868,17 @@ export const se_ListImportsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/imports"; let body: any; - body = JSON.stringify({ - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.filters != null && { filters: se_ImportFilters(input.filters, context) }), - ...(input.localeId != null && { localeId: input.localeId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_ImportSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + botId: [], + botVersion: [], + filters: (_) => _json(_), + localeId: [], + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1913,12 +1908,14 @@ export const se_ListIntentsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_IntentFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_IntentSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1956,10 +1953,12 @@ export const se_ListRecommendedIntentsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1990,12 +1989,14 @@ export const se_ListSlotsCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "intentId", () => input.intentId!, "{intentId}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SlotFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_SlotSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2025,12 +2026,14 @@ export const se_ListSlotTypesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SlotTypeFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_SlotTypeSortBy(input.sortBy, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + sortBy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2091,12 +2094,14 @@ export const se_SearchAssociatedTranscriptsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_AssociatedTranscriptFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextIndex != null && { nextIndex: input.nextIndex }), - ...(input.searchOrder != null && { searchOrder: input.searchOrder }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextIndex: [], + searchOrder: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2126,14 +2131,12 @@ export const se_StartBotRecommendationCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.encryptionSetting != null && { - encryptionSetting: se_EncryptionSetting(input.encryptionSetting, context), - }), - ...(input.transcriptSourceSetting != null && { - transcriptSourceSetting: se_TranscriptSourceSetting(input.transcriptSourceSetting, context), - }), - }); + body = JSON.stringify( + take(input, { + encryptionSetting: (_) => _json(_), + transcriptSourceSetting: (_) => se_TranscriptSourceSetting(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2158,14 +2161,14 @@ export const se_StartImportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/imports"; let body: any; - body = JSON.stringify({ - ...(input.filePassword != null && { filePassword: input.filePassword }), - ...(input.importId != null && { importId: input.importId }), - ...(input.mergeStrategy != null && { mergeStrategy: input.mergeStrategy }), - ...(input.resourceSpecification != null && { - resourceSpecification: se_ImportResourceSpecification(input.resourceSpecification, context), - }), - }); + body = JSON.stringify( + take(input, { + filePassword: [], + importId: [], + mergeStrategy: [], + resourceSpecification: (_) => se_ImportResourceSpecification(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2226,9 +2229,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceARN}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceARN", () => input.resourceARN!, "{resourceARN}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2284,15 +2289,17 @@ export const se_UpdateBotCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/bots/{botId}"; resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.botMembers != null && { botMembers: se_BotMembers(input.botMembers, context) }), - ...(input.botName != null && { botName: input.botName }), - ...(input.botType != null && { botType: input.botType }), - ...(input.dataPrivacy != null && { dataPrivacy: se_DataPrivacy(input.dataPrivacy, context) }), - ...(input.description != null && { description: input.description }), - ...(input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }); + body = JSON.stringify( + take(input, { + botMembers: (_) => _json(_), + botName: [], + botType: [], + dataPrivacy: (_) => _json(_), + description: [], + idleSessionTTLInSeconds: [], + roleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2320,20 +2327,16 @@ export const se_UpdateBotAliasCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botAliasId", () => input.botAliasId!, "{botAliasId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "botId", () => input.botId!, "{botId}", false); let body: any; - body = JSON.stringify({ - ...(input.botAliasLocaleSettings != null && { - botAliasLocaleSettings: se_BotAliasLocaleSettingsMap(input.botAliasLocaleSettings, context), - }), - ...(input.botAliasName != null && { botAliasName: input.botAliasName }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.conversationLogSettings != null && { - conversationLogSettings: se_ConversationLogSettings(input.conversationLogSettings, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.sentimentAnalysisSettings != null && { - sentimentAnalysisSettings: se_SentimentAnalysisSettings(input.sentimentAnalysisSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + botAliasLocaleSettings: (_) => _json(_), + botAliasName: [], + botVersion: [], + conversationLogSettings: (_) => _json(_), + description: [], + sentimentAnalysisSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2363,13 +2366,13 @@ export const se_UpdateBotLocaleCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.nluIntentConfidenceThreshold != null && { - nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold), - }), - ...(input.voiceSettings != null && { voiceSettings: se_VoiceSettings(input.voiceSettings, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + nluIntentConfidenceThreshold: (_) => __serializeFloat(_), + voiceSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2407,11 +2410,11 @@ export const se_UpdateBotRecommendationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.encryptionSetting != null && { - encryptionSetting: se_EncryptionSetting(input.encryptionSetting, context), - }), - }); + body = JSON.stringify( + take(input, { + encryptionSetting: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2437,9 +2440,11 @@ export const se_UpdateExportCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/exports/{exportId}"; resolvedPath = __resolvedPath(resolvedPath, input, "exportId", () => input.exportId!, "{exportId}", false); let body: any; - body = JSON.stringify({ - ...(input.filePassword != null && { filePassword: input.filePassword }), - }); + body = JSON.stringify( + take(input, { + filePassword: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2470,33 +2475,23 @@ export const se_UpdateIntentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.dialogCodeHook != null && { dialogCodeHook: se_DialogCodeHookSettings(input.dialogCodeHook, context) }), - ...(input.fulfillmentCodeHook != null && { - fulfillmentCodeHook: se_FulfillmentCodeHookSettings(input.fulfillmentCodeHook, context), - }), - ...(input.initialResponseSetting != null && { - initialResponseSetting: se_InitialResponseSetting(input.initialResponseSetting, context), - }), - ...(input.inputContexts != null && { inputContexts: se_InputContextsList(input.inputContexts, context) }), - ...(input.intentClosingSetting != null && { - intentClosingSetting: se_IntentClosingSetting(input.intentClosingSetting, context), - }), - ...(input.intentConfirmationSetting != null && { - intentConfirmationSetting: se_IntentConfirmationSetting(input.intentConfirmationSetting, context), - }), - ...(input.intentName != null && { intentName: input.intentName }), - ...(input.kendraConfiguration != null && { - kendraConfiguration: se_KendraConfiguration(input.kendraConfiguration, context), - }), - ...(input.outputContexts != null && { outputContexts: se_OutputContextsList(input.outputContexts, context) }), - ...(input.parentIntentSignature != null && { parentIntentSignature: input.parentIntentSignature }), - ...(input.sampleUtterances != null && { - sampleUtterances: se_SampleUtterancesList(input.sampleUtterances, context), - }), - ...(input.slotPriorities != null && { slotPriorities: se_SlotPrioritiesList(input.slotPriorities, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + dialogCodeHook: (_) => _json(_), + fulfillmentCodeHook: (_) => se_FulfillmentCodeHookSettings(_, context), + initialResponseSetting: (_) => se_InitialResponseSetting(_, context), + inputContexts: (_) => _json(_), + intentClosingSetting: (_) => se_IntentClosingSetting(_, context), + intentConfirmationSetting: (_) => se_IntentConfirmationSetting(_, context), + intentName: [], + kendraConfiguration: (_) => _json(_), + outputContexts: (_) => _json(_), + parentIntentSignature: [], + sampleUtterances: (_) => _json(_), + slotPriorities: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2525,9 +2520,11 @@ export const se_UpdateResourcePolicyCommand = async ( expectedRevisionId: [, input.expectedRevisionId!], }); let body: any; - body = JSON.stringify({ - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2560,21 +2557,17 @@ export const se_UpdateSlotCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "intentId", () => input.intentId!, "{intentId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.multipleValuesSetting != null && { - multipleValuesSetting: se_MultipleValuesSetting(input.multipleValuesSetting, context), - }), - ...(input.obfuscationSetting != null && { - obfuscationSetting: se_ObfuscationSetting(input.obfuscationSetting, context), - }), - ...(input.slotName != null && { slotName: input.slotName }), - ...(input.slotTypeId != null && { slotTypeId: input.slotTypeId }), - ...(input.subSlotSetting != null && { subSlotSetting: se_SubSlotSetting(input.subSlotSetting, context) }), - ...(input.valueElicitationSetting != null && { - valueElicitationSetting: se_SlotValueElicitationSetting(input.valueElicitationSetting, context), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + multipleValuesSetting: (_) => _json(_), + obfuscationSetting: (_) => _json(_), + slotName: [], + slotTypeId: [], + subSlotSetting: (_) => se_SubSlotSetting(_, context), + valueElicitationSetting: (_) => se_SlotValueElicitationSetting(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2605,21 +2598,17 @@ export const se_UpdateSlotTypeCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botVersion", () => input.botVersion!, "{botVersion}", false); resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); let body: any; - body = JSON.stringify({ - ...(input.compositeSlotTypeSetting != null && { - compositeSlotTypeSetting: se_CompositeSlotTypeSetting(input.compositeSlotTypeSetting, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.externalSourceSetting != null && { - externalSourceSetting: se_ExternalSourceSetting(input.externalSourceSetting, context), - }), - ...(input.parentSlotTypeSignature != null && { parentSlotTypeSignature: input.parentSlotTypeSignature }), - ...(input.slotTypeName != null && { slotTypeName: input.slotTypeName }), - ...(input.slotTypeValues != null && { slotTypeValues: se_SlotTypeValues(input.slotTypeValues, context) }), - ...(input.valueSelectionSetting != null && { - valueSelectionSetting: se_SlotValueSelectionSetting(input.valueSelectionSetting, context), - }), - }); + body = JSON.stringify( + take(input, { + compositeSlotTypeSetting: (_) => _json(_), + description: [], + externalSourceSetting: (_) => _json(_), + parentSlotTypeSignature: [], + slotTypeName: [], + slotTypeValues: (_) => _json(_), + valueSelectionSetting: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2645,21 +2634,14 @@ export const de_BatchCreateCustomVocabularyItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.errors != null) { - contents.errors = de_FailedCustomVocabularyItems(data.errors, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.resources != null) { - contents.resources = de_CustomVocabularyItems(data.resources, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + errors: _json, + localeId: __expectString, + resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2693,10 +2675,9 @@ const de_BatchCreateCustomVocabularyItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2716,21 +2697,14 @@ export const de_BatchDeleteCustomVocabularyItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.errors != null) { - contents.errors = de_FailedCustomVocabularyItems(data.errors, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.resources != null) { - contents.resources = de_CustomVocabularyItems(data.resources, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + errors: _json, + localeId: __expectString, + resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2764,10 +2738,9 @@ const de_BatchDeleteCustomVocabularyItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2787,21 +2760,14 @@ export const de_BatchUpdateCustomVocabularyItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.errors != null) { - contents.errors = de_FailedCustomVocabularyItems(data.errors, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.resources != null) { - contents.resources = de_CustomVocabularyItems(data.resources, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + errors: _json, + localeId: __expectString, + resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2835,10 +2801,9 @@ const de_BatchUpdateCustomVocabularyItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2858,23 +2823,14 @@ export const de_BuildBotLocaleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botLocaleStatus != null) { - contents.botLocaleStatus = __expectString(data.botLocaleStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.lastBuildSubmittedDateTime != null) { - contents.lastBuildSubmittedDateTime = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.lastBuildSubmittedDateTime)) - ); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } + const doc = take(data, { + botId: __expectString, + botLocaleStatus: __expectString, + botVersion: __expectString, + lastBuildSubmittedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2911,10 +2867,9 @@ const de_BuildBotLocaleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2934,42 +2889,21 @@ export const de_CreateBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botMembers != null) { - contents.botMembers = de_BotMembers(data.botMembers, context); - } - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } - if (data.botTags != null) { - contents.botTags = de_TagMap(data.botTags, context); - } - if (data.botType != null) { - contents.botType = __expectString(data.botType); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.dataPrivacy != null) { - contents.dataPrivacy = de_DataPrivacy(data.dataPrivacy, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.testBotAliasTags != null) { - contents.testBotAliasTags = de_TagMap(data.testBotAliasTags, context); - } + const doc = take(data, { + botId: __expectString, + botMembers: _json, + botName: __expectString, + botStatus: __expectString, + botTags: _json, + botType: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataPrivacy: _json, + description: __expectString, + idleSessionTTLInSeconds: __expectInt32, + roleArn: __expectString, + testBotAliasTags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3006,10 +2940,9 @@ const de_CreateBotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3029,39 +2962,20 @@ export const de_CreateBotAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAliasId != null) { - contents.botAliasId = __expectString(data.botAliasId); - } - if (data.botAliasLocaleSettings != null) { - contents.botAliasLocaleSettings = de_BotAliasLocaleSettingsMap(data.botAliasLocaleSettings, context); - } - if (data.botAliasName != null) { - contents.botAliasName = __expectString(data.botAliasName); - } - if (data.botAliasStatus != null) { - contents.botAliasStatus = __expectString(data.botAliasStatus); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.conversationLogSettings != null) { - contents.conversationLogSettings = de_ConversationLogSettings(data.conversationLogSettings, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.sentimentAnalysisSettings != null) { - contents.sentimentAnalysisSettings = de_SentimentAnalysisSettings(data.sentimentAnalysisSettings, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + botAliasId: __expectString, + botAliasLocaleSettings: _json, + botAliasName: __expectString, + botAliasStatus: __expectString, + botId: __expectString, + botVersion: __expectString, + conversationLogSettings: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + sentimentAnalysisSettings: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3098,10 +3012,9 @@ const de_CreateBotAliasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3121,33 +3034,18 @@ export const de_CreateBotLocaleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botLocaleStatus != null) { - contents.botLocaleStatus = __expectString(data.botLocaleStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.localeName != null) { - contents.localeName = __expectString(data.localeName); - } - if (data.nluIntentConfidenceThreshold != null) { - contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold); - } - if (data.voiceSettings != null) { - contents.voiceSettings = de_VoiceSettings(data.voiceSettings, context); - } + const doc = take(data, { + botId: __expectString, + botLocaleStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + localeId: __expectString, + localeName: __expectString, + nluIntentConfidenceThreshold: __limitedParseDouble, + voiceSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3184,10 +3082,9 @@ const de_CreateBotLocaleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3207,27 +3104,15 @@ export const de_CreateBotVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.botVersionLocaleSpecification != null) { - contents.botVersionLocaleSpecification = de_BotVersionLocaleSpecification( - data.botVersionLocaleSpecification, - context - ); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } + const doc = take(data, { + botId: __expectString, + botStatus: __expectString, + botVersion: __expectString, + botVersionLocaleSpecification: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3264,10 +3149,9 @@ const de_CreateBotVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3287,21 +3171,14 @@ export const de_CreateExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.exportId != null) { - contents.exportId = __expectString(data.exportId); - } - if (data.exportStatus != null) { - contents.exportStatus = __expectString(data.exportStatus); - } - if (data.fileFormat != null) { - contents.fileFormat = __expectString(data.fileFormat); - } - if (data.resourceSpecification != null) { - contents.resourceSpecification = de_ExportResourceSpecification(data.resourceSpecification, context); - } + const doc = take(data, { + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + exportId: __expectString, + exportStatus: __expectString, + fileFormat: __expectString, + resourceSpecification: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3338,10 +3215,9 @@ const de_CreateExportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3361,57 +3237,26 @@ export const de_CreateIntentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.dialogCodeHook != null) { - contents.dialogCodeHook = de_DialogCodeHookSettings(data.dialogCodeHook, context); - } - if (data.fulfillmentCodeHook != null) { - contents.fulfillmentCodeHook = de_FulfillmentCodeHookSettings(data.fulfillmentCodeHook, context); - } - if (data.initialResponseSetting != null) { - contents.initialResponseSetting = de_InitialResponseSetting(data.initialResponseSetting, context); - } - if (data.inputContexts != null) { - contents.inputContexts = de_InputContextsList(data.inputContexts, context); - } - if (data.intentClosingSetting != null) { - contents.intentClosingSetting = de_IntentClosingSetting(data.intentClosingSetting, context); - } - if (data.intentConfirmationSetting != null) { - contents.intentConfirmationSetting = de_IntentConfirmationSetting(data.intentConfirmationSetting, context); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.intentName != null) { - contents.intentName = __expectString(data.intentName); - } - if (data.kendraConfiguration != null) { - contents.kendraConfiguration = de_KendraConfiguration(data.kendraConfiguration, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.outputContexts != null) { - contents.outputContexts = de_OutputContextsList(data.outputContexts, context); - } - if (data.parentIntentSignature != null) { - contents.parentIntentSignature = __expectString(data.parentIntentSignature); - } - if (data.sampleUtterances != null) { - contents.sampleUtterances = de_SampleUtterancesList(data.sampleUtterances, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + dialogCodeHook: _json, + fulfillmentCodeHook: (_) => de_FulfillmentCodeHookSettings(_, context), + initialResponseSetting: (_) => de_InitialResponseSetting(_, context), + inputContexts: _json, + intentClosingSetting: (_) => de_IntentClosingSetting(_, context), + intentConfirmationSetting: (_) => de_IntentConfirmationSetting(_, context), + intentId: __expectString, + intentName: __expectString, + kendraConfiguration: _json, + localeId: __expectString, + outputContexts: _json, + parentIntentSignature: __expectString, + sampleUtterances: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3448,10 +3293,9 @@ const de_CreateIntentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3471,12 +3315,11 @@ export const de_CreateResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + resourceArn: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3513,10 +3356,9 @@ const de_CreateResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3536,12 +3378,11 @@ export const de_CreateResourcePolicyStatementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + resourceArn: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3581,10 +3422,9 @@ const de_CreateResourcePolicyStatementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3604,45 +3444,22 @@ export const de_CreateSlotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.multipleValuesSetting != null) { - contents.multipleValuesSetting = de_MultipleValuesSetting(data.multipleValuesSetting, context); - } - if (data.obfuscationSetting != null) { - contents.obfuscationSetting = de_ObfuscationSetting(data.obfuscationSetting, context); - } - if (data.slotId != null) { - contents.slotId = __expectString(data.slotId); - } - if (data.slotName != null) { - contents.slotName = __expectString(data.slotName); - } - if (data.slotTypeId != null) { - contents.slotTypeId = __expectString(data.slotTypeId); - } - if (data.subSlotSetting != null) { - contents.subSlotSetting = de_SubSlotSetting(data.subSlotSetting, context); - } - if (data.valueElicitationSetting != null) { - contents.valueElicitationSetting = de_SlotValueElicitationSetting(data.valueElicitationSetting, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + intentId: __expectString, + localeId: __expectString, + multipleValuesSetting: _json, + obfuscationSetting: _json, + slotId: __expectString, + slotName: __expectString, + slotTypeId: __expectString, + subSlotSetting: (_) => de_SubSlotSetting(_, context), + valueElicitationSetting: (_) => de_SlotValueElicitationSetting(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3679,10 +3496,9 @@ const de_CreateSlotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3702,42 +3518,21 @@ export const de_CreateSlotTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.compositeSlotTypeSetting != null) { - contents.compositeSlotTypeSetting = de_CompositeSlotTypeSetting(data.compositeSlotTypeSetting, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.externalSourceSetting != null) { - contents.externalSourceSetting = de_ExternalSourceSetting(data.externalSourceSetting, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.parentSlotTypeSignature != null) { - contents.parentSlotTypeSignature = __expectString(data.parentSlotTypeSignature); - } - if (data.slotTypeId != null) { - contents.slotTypeId = __expectString(data.slotTypeId); - } - if (data.slotTypeName != null) { - contents.slotTypeName = __expectString(data.slotTypeName); - } - if (data.slotTypeValues != null) { - contents.slotTypeValues = de_SlotTypeValues(data.slotTypeValues, context); - } - if (data.valueSelectionSetting != null) { - contents.valueSelectionSetting = de_SlotValueSelectionSetting(data.valueSelectionSetting, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + compositeSlotTypeSetting: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + externalSourceSetting: _json, + localeId: __expectString, + parentSlotTypeSignature: __expectString, + slotTypeId: __expectString, + slotTypeName: __expectString, + slotTypeValues: _json, + valueSelectionSetting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3774,10 +3569,9 @@ const de_CreateSlotTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3797,12 +3591,11 @@ export const de_CreateUploadUrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } - if (data.uploadUrl != null) { - contents.uploadUrl = __expectString(data.uploadUrl); - } + const doc = take(data, { + importId: __expectString, + uploadUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3836,10 +3629,9 @@ const de_CreateUploadUrlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3859,12 +3651,11 @@ export const de_DeleteBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } + const doc = take(data, { + botId: __expectString, + botStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3901,10 +3692,9 @@ const de_DeleteBotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3924,15 +3714,12 @@ export const de_DeleteBotAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAliasId != null) { - contents.botAliasId = __expectString(data.botAliasId); - } - if (data.botAliasStatus != null) { - contents.botAliasStatus = __expectString(data.botAliasStatus); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } + const doc = take(data, { + botAliasId: __expectString, + botAliasStatus: __expectString, + botId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3969,10 +3756,9 @@ const de_DeleteBotAliasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3992,18 +3778,13 @@ export const de_DeleteBotLocaleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botLocaleStatus != null) { - contents.botLocaleStatus = __expectString(data.botLocaleStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } + const doc = take(data, { + botId: __expectString, + botLocaleStatus: __expectString, + botVersion: __expectString, + localeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4040,10 +3821,9 @@ const de_DeleteBotLocaleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4063,15 +3843,12 @@ export const de_DeleteBotVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } + const doc = take(data, { + botId: __expectString, + botStatus: __expectString, + botVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4108,10 +3885,9 @@ const de_DeleteBotVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4131,18 +3907,13 @@ export const de_DeleteCustomVocabularyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.customVocabularyStatus != null) { - contents.customVocabularyStatus = __expectString(data.customVocabularyStatus); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + customVocabularyStatus: __expectString, + localeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4179,10 +3950,9 @@ const de_DeleteCustomVocabularyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4202,12 +3972,11 @@ export const de_DeleteExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.exportId != null) { - contents.exportId = __expectString(data.exportId); - } - if (data.exportStatus != null) { - contents.exportStatus = __expectString(data.exportStatus); - } + const doc = take(data, { + exportId: __expectString, + exportStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4241,10 +4010,9 @@ const de_DeleteExportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4264,12 +4032,11 @@ export const de_DeleteImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } - if (data.importStatus != null) { - contents.importStatus = __expectString(data.importStatus); - } + const doc = take(data, { + importId: __expectString, + importStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4303,10 +4070,9 @@ const de_DeleteImportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4362,10 +4128,9 @@ const de_DeleteIntentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4385,12 +4150,11 @@ export const de_DeleteResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + resourceArn: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4421,10 +4185,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4444,12 +4207,11 @@ export const de_DeleteResourcePolicyStatementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + resourceArn: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4480,10 +4242,9 @@ const de_DeleteResourcePolicyStatementCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4539,10 +4300,9 @@ const de_DeleteSlotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4598,10 +4358,9 @@ const de_DeleteSlotTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4648,10 +4407,9 @@ const de_DeleteUtterancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4671,42 +4429,21 @@ export const de_DescribeBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botMembers != null) { - contents.botMembers = de_BotMembers(data.botMembers, context); - } - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } - if (data.botType != null) { - contents.botType = __expectString(data.botType); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.dataPrivacy != null) { - contents.dataPrivacy = de_DataPrivacy(data.dataPrivacy, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + botId: __expectString, + botMembers: _json, + botName: __expectString, + botStatus: __expectString, + botType: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataPrivacy: _json, + description: __expectString, + failureReasons: _json, + idleSessionTTLInSeconds: __expectInt32, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4740,10 +4477,9 @@ const de_DescribeBotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4763,45 +4499,22 @@ export const de_DescribeBotAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAliasHistoryEvents != null) { - contents.botAliasHistoryEvents = de_BotAliasHistoryEventsList(data.botAliasHistoryEvents, context); - } - if (data.botAliasId != null) { - contents.botAliasId = __expectString(data.botAliasId); - } - if (data.botAliasLocaleSettings != null) { - contents.botAliasLocaleSettings = de_BotAliasLocaleSettingsMap(data.botAliasLocaleSettings, context); - } - if (data.botAliasName != null) { - contents.botAliasName = __expectString(data.botAliasName); - } - if (data.botAliasStatus != null) { - contents.botAliasStatus = __expectString(data.botAliasStatus); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.conversationLogSettings != null) { - contents.conversationLogSettings = de_ConversationLogSettings(data.conversationLogSettings, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.parentBotNetworks != null) { - contents.parentBotNetworks = de_ParentBotNetworks(data.parentBotNetworks, context); - } - if (data.sentimentAnalysisSettings != null) { - contents.sentimentAnalysisSettings = de_SentimentAnalysisSettings(data.sentimentAnalysisSettings, context); - } + const doc = take(data, { + botAliasHistoryEvents: (_) => de_BotAliasHistoryEventsList(_, context), + botAliasId: __expectString, + botAliasLocaleSettings: _json, + botAliasName: __expectString, + botAliasStatus: __expectString, + botId: __expectString, + botVersion: __expectString, + conversationLogSettings: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + parentBotNetworks: _json, + sentimentAnalysisSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4835,10 +4548,9 @@ const de_DescribeBotAliasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4858,56 +4570,25 @@ export const de_DescribeBotLocaleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botLocaleHistoryEvents != null) { - contents.botLocaleHistoryEvents = de_BotLocaleHistoryEventsList(data.botLocaleHistoryEvents, context); - } - if (data.botLocaleStatus != null) { - contents.botLocaleStatus = __expectString(data.botLocaleStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.intentsCount != null) { - contents.intentsCount = __expectInt32(data.intentsCount); - } - if (data.lastBuildSubmittedDateTime != null) { - contents.lastBuildSubmittedDateTime = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.lastBuildSubmittedDateTime)) - ); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.localeName != null) { - contents.localeName = __expectString(data.localeName); - } - if (data.nluIntentConfidenceThreshold != null) { - contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold); - } - if (data.recommendedActions != null) { - contents.recommendedActions = de_RecommendedActions(data.recommendedActions, context); - } - if (data.slotTypesCount != null) { - contents.slotTypesCount = __expectInt32(data.slotTypesCount); - } - if (data.voiceSettings != null) { - contents.voiceSettings = de_VoiceSettings(data.voiceSettings, context); - } + const doc = take(data, { + botId: __expectString, + botLocaleHistoryEvents: (_) => de_BotLocaleHistoryEventsList(_, context), + botLocaleStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + failureReasons: _json, + intentsCount: __expectInt32, + lastBuildSubmittedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + localeName: __expectString, + nluIntentConfidenceThreshold: __limitedParseDouble, + recommendedActions: _json, + slotTypesCount: __expectInt32, + voiceSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4941,10 +4622,9 @@ const de_DescribeBotLocaleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4964,39 +4644,20 @@ export const de_DescribeBotRecommendationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationId != null) { - contents.botRecommendationId = __expectString(data.botRecommendationId); - } - if (data.botRecommendationResults != null) { - contents.botRecommendationResults = de_BotRecommendationResults(data.botRecommendationResults, context); - } - if (data.botRecommendationStatus != null) { - contents.botRecommendationStatus = __expectString(data.botRecommendationStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.encryptionSetting != null) { - contents.encryptionSetting = de_EncryptionSetting(data.encryptionSetting, context); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.transcriptSourceSetting != null) { - contents.transcriptSourceSetting = de_TranscriptSourceSetting(data.transcriptSourceSetting, context); - } + const doc = take(data, { + botId: __expectString, + botRecommendationId: __expectString, + botRecommendationResults: _json, + botRecommendationStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionSetting: _json, + failureReasons: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + transcriptSourceSetting: (_) => de_TranscriptSourceSetting(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5027,10 +4688,9 @@ const de_DescribeBotRecommendationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5050,45 +4710,22 @@ export const de_DescribeBotVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botMembers != null) { - contents.botMembers = de_BotMembers(data.botMembers, context); - } - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } - if (data.botType != null) { - contents.botType = __expectString(data.botType); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.dataPrivacy != null) { - contents.dataPrivacy = de_DataPrivacy(data.dataPrivacy, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.parentBotNetworks != null) { - contents.parentBotNetworks = de_ParentBotNetworks(data.parentBotNetworks, context); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + botId: __expectString, + botMembers: _json, + botName: __expectString, + botStatus: __expectString, + botType: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataPrivacy: _json, + description: __expectString, + failureReasons: _json, + idleSessionTTLInSeconds: __expectInt32, + parentBotNetworks: _json, + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5122,10 +4759,9 @@ const de_DescribeBotVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5145,24 +4781,15 @@ export const de_DescribeCustomVocabularyMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.customVocabularyStatus != null) { - contents.customVocabularyStatus = __expectString(data.customVocabularyStatus); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + customVocabularyStatus: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5196,10 +4823,9 @@ const de_DescribeCustomVocabularyMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5219,30 +4845,17 @@ export const de_DescribeExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.downloadUrl != null) { - contents.downloadUrl = __expectString(data.downloadUrl); - } - if (data.exportId != null) { - contents.exportId = __expectString(data.exportId); - } - if (data.exportStatus != null) { - contents.exportStatus = __expectString(data.exportStatus); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.fileFormat != null) { - contents.fileFormat = __expectString(data.fileFormat); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.resourceSpecification != null) { - contents.resourceSpecification = de_ExportResourceSpecification(data.resourceSpecification, context); - } + const doc = take(data, { + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + downloadUrl: __expectString, + exportId: __expectString, + exportStatus: __expectString, + failureReasons: _json, + fileFormat: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceSpecification: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5273,10 +4886,9 @@ const de_DescribeExportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5296,33 +4908,18 @@ export const de_DescribeImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } - if (data.importStatus != null) { - contents.importStatus = __expectString(data.importStatus); - } - if (data.importedResourceId != null) { - contents.importedResourceId = __expectString(data.importedResourceId); - } - if (data.importedResourceName != null) { - contents.importedResourceName = __expectString(data.importedResourceName); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.mergeStrategy != null) { - contents.mergeStrategy = __expectString(data.mergeStrategy); - } - if (data.resourceSpecification != null) { - contents.resourceSpecification = de_ImportResourceSpecification(data.resourceSpecification, context); - } + const doc = take(data, { + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReasons: _json, + importId: __expectString, + importStatus: __expectString, + importedResourceId: __expectString, + importedResourceName: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + mergeStrategy: __expectString, + resourceSpecification: (_) => de_ImportResourceSpecification(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5353,10 +4950,9 @@ const de_DescribeImportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5376,63 +4972,28 @@ export const de_DescribeIntentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.dialogCodeHook != null) { - contents.dialogCodeHook = de_DialogCodeHookSettings(data.dialogCodeHook, context); - } - if (data.fulfillmentCodeHook != null) { - contents.fulfillmentCodeHook = de_FulfillmentCodeHookSettings(data.fulfillmentCodeHook, context); - } - if (data.initialResponseSetting != null) { - contents.initialResponseSetting = de_InitialResponseSetting(data.initialResponseSetting, context); - } - if (data.inputContexts != null) { - contents.inputContexts = de_InputContextsList(data.inputContexts, context); - } - if (data.intentClosingSetting != null) { - contents.intentClosingSetting = de_IntentClosingSetting(data.intentClosingSetting, context); - } - if (data.intentConfirmationSetting != null) { - contents.intentConfirmationSetting = de_IntentConfirmationSetting(data.intentConfirmationSetting, context); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.intentName != null) { - contents.intentName = __expectString(data.intentName); - } - if (data.kendraConfiguration != null) { - contents.kendraConfiguration = de_KendraConfiguration(data.kendraConfiguration, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.outputContexts != null) { - contents.outputContexts = de_OutputContextsList(data.outputContexts, context); - } - if (data.parentIntentSignature != null) { - contents.parentIntentSignature = __expectString(data.parentIntentSignature); - } - if (data.sampleUtterances != null) { - contents.sampleUtterances = de_SampleUtterancesList(data.sampleUtterances, context); - } - if (data.slotPriorities != null) { - contents.slotPriorities = de_SlotPrioritiesList(data.slotPriorities, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + dialogCodeHook: _json, + fulfillmentCodeHook: (_) => de_FulfillmentCodeHookSettings(_, context), + initialResponseSetting: (_) => de_InitialResponseSetting(_, context), + inputContexts: _json, + intentClosingSetting: (_) => de_IntentClosingSetting(_, context), + intentConfirmationSetting: (_) => de_IntentConfirmationSetting(_, context), + intentId: __expectString, + intentName: __expectString, + kendraConfiguration: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + outputContexts: _json, + parentIntentSignature: __expectString, + sampleUtterances: _json, + slotPriorities: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5466,10 +5027,9 @@ const de_DescribeIntentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5489,15 +5049,12 @@ export const de_DescribeResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + policy: __expectString, + resourceArn: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5525,10 +5082,9 @@ const de_DescribeResourcePolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5548,48 +5104,23 @@ export const de_DescribeSlotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.multipleValuesSetting != null) { - contents.multipleValuesSetting = de_MultipleValuesSetting(data.multipleValuesSetting, context); - } - if (data.obfuscationSetting != null) { - contents.obfuscationSetting = de_ObfuscationSetting(data.obfuscationSetting, context); - } - if (data.slotId != null) { - contents.slotId = __expectString(data.slotId); - } - if (data.slotName != null) { - contents.slotName = __expectString(data.slotName); - } - if (data.slotTypeId != null) { - contents.slotTypeId = __expectString(data.slotTypeId); - } - if (data.subSlotSetting != null) { - contents.subSlotSetting = de_SubSlotSetting(data.subSlotSetting, context); - } - if (data.valueElicitationSetting != null) { - contents.valueElicitationSetting = de_SlotValueElicitationSetting(data.valueElicitationSetting, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + intentId: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + multipleValuesSetting: _json, + obfuscationSetting: _json, + slotId: __expectString, + slotName: __expectString, + slotTypeId: __expectString, + subSlotSetting: (_) => de_SubSlotSetting(_, context), + valueElicitationSetting: (_) => de_SlotValueElicitationSetting(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5623,10 +5154,9 @@ const de_DescribeSlotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5646,45 +5176,22 @@ export const de_DescribeSlotTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.compositeSlotTypeSetting != null) { - contents.compositeSlotTypeSetting = de_CompositeSlotTypeSetting(data.compositeSlotTypeSetting, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.externalSourceSetting != null) { - contents.externalSourceSetting = de_ExternalSourceSetting(data.externalSourceSetting, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.parentSlotTypeSignature != null) { - contents.parentSlotTypeSignature = __expectString(data.parentSlotTypeSignature); - } - if (data.slotTypeId != null) { - contents.slotTypeId = __expectString(data.slotTypeId); - } - if (data.slotTypeName != null) { - contents.slotTypeName = __expectString(data.slotTypeName); - } - if (data.slotTypeValues != null) { - contents.slotTypeValues = de_SlotTypeValues(data.slotTypeValues, context); - } - if (data.valueSelectionSetting != null) { - contents.valueSelectionSetting = de_SlotValueSelectionSetting(data.valueSelectionSetting, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + compositeSlotTypeSetting: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + externalSourceSetting: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + parentSlotTypeSignature: __expectString, + slotTypeId: __expectString, + slotTypeName: __expectString, + slotTypeValues: _json, + valueSelectionSetting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5718,10 +5225,9 @@ const de_DescribeSlotTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5741,45 +5247,19 @@ export const de_ListAggregatedUtterancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.aggregatedUtterancesSummaries != null) { - contents.aggregatedUtterancesSummaries = de_AggregatedUtterancesSummaryList( - data.aggregatedUtterancesSummaries, - context - ); - } - if (data.aggregationDuration != null) { - contents.aggregationDuration = de_UtteranceAggregationDuration(data.aggregationDuration, context); - } - if (data.aggregationLastRefreshedDateTime != null) { - contents.aggregationLastRefreshedDateTime = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.aggregationLastRefreshedDateTime)) - ); - } - if (data.aggregationWindowEndTime != null) { - contents.aggregationWindowEndTime = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.aggregationWindowEndTime)) - ); - } - if (data.aggregationWindowStartTime != null) { - contents.aggregationWindowStartTime = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.aggregationWindowStartTime)) - ); - } - if (data.botAliasId != null) { - contents.botAliasId = __expectString(data.botAliasId); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + aggregatedUtterancesSummaries: (_) => de_AggregatedUtterancesSummaryList(_, context), + aggregationDuration: _json, + aggregationLastRefreshedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + aggregationWindowEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + aggregationWindowStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + botAliasId: __expectString, + botId: __expectString, + botVersion: __expectString, + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5810,10 +5290,9 @@ const de_ListAggregatedUtterancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5833,15 +5312,12 @@ export const de_ListBotAliasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAliasSummaries != null) { - contents.botAliasSummaries = de_BotAliasSummaryList(data.botAliasSummaries, context); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botAliasSummaries: (_) => de_BotAliasSummaryList(_, context), + botId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5872,10 +5348,9 @@ const de_ListBotAliasesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5895,18 +5370,13 @@ export const de_ListBotLocalesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botLocaleSummaries != null) { - contents.botLocaleSummaries = de_BotLocaleSummaryList(data.botLocaleSummaries, context); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botLocaleSummaries: (_) => de_BotLocaleSummaryList(_, context), + botVersion: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5937,10 +5407,9 @@ const de_ListBotLocalesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5960,21 +5429,14 @@ export const de_ListBotRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationSummaries != null) { - contents.botRecommendationSummaries = de_BotRecommendationSummaryList(data.botRecommendationSummaries, context); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botRecommendationSummaries: (_) => de_BotRecommendationSummaryList(_, context), + botVersion: __expectString, + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6005,10 +5467,9 @@ const de_ListBotRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6028,12 +5489,11 @@ export const de_ListBotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botSummaries != null) { - contents.botSummaries = de_BotSummaryList(data.botSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botSummaries: (_) => de_BotSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6064,10 +5524,9 @@ const de_ListBotsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6087,15 +5546,12 @@ export const de_ListBotVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersionSummaries != null) { - contents.botVersionSummaries = de_BotVersionSummaryList(data.botVersionSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botVersionSummaries: (_) => de_BotVersionSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6126,10 +5582,9 @@ const de_ListBotVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6149,15 +5604,12 @@ export const de_ListBuiltInIntentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.builtInIntentSummaries != null) { - contents.builtInIntentSummaries = de_BuiltInIntentSummaryList(data.builtInIntentSummaries, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + builtInIntentSummaries: _json, + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6188,10 +5640,9 @@ const de_ListBuiltInIntentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6211,15 +5662,12 @@ export const de_ListBuiltInSlotTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.builtInSlotTypeSummaries != null) { - contents.builtInSlotTypeSummaries = de_BuiltInSlotTypeSummaryList(data.builtInSlotTypeSummaries, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + builtInSlotTypeSummaries: _json, + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6250,10 +5698,9 @@ const de_ListBuiltInSlotTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6273,21 +5720,14 @@ export const de_ListCustomVocabularyItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.customVocabularyItems != null) { - contents.customVocabularyItems = de_CustomVocabularyItems(data.customVocabularyItems, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + customVocabularyItems: _json, + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6321,10 +5761,9 @@ const de_ListCustomVocabularyItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6344,21 +5783,14 @@ export const de_ListExportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.exportSummaries != null) { - contents.exportSummaries = de_ExportSummaryList(data.exportSummaries, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + exportSummaries: (_) => de_ExportSummaryList(_, context), + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6386,10 +5818,9 @@ const de_ListExportsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6409,21 +5840,14 @@ export const de_ListImportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.importSummaries != null) { - contents.importSummaries = de_ImportSummaryList(data.importSummaries, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + importSummaries: (_) => de_ImportSummaryList(_, context), + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6451,10 +5875,9 @@ const de_ListImportsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6474,21 +5897,14 @@ export const de_ListIntentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.intentSummaries != null) { - contents.intentSummaries = de_IntentSummaryList(data.intentSummaries, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + intentSummaries: (_) => de_IntentSummaryList(_, context), + localeId: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6519,10 +5935,9 @@ const de_ListIntentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6542,24 +5957,15 @@ export const de_ListRecommendedIntentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationId != null) { - contents.botRecommendationId = __expectString(data.botRecommendationId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.summaryList != null) { - contents.summaryList = de_RecommendedIntentSummaryList(data.summaryList, context); - } + const doc = take(data, { + botId: __expectString, + botRecommendationId: __expectString, + botVersion: __expectString, + localeId: __expectString, + nextToken: __expectString, + summaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6593,10 +5999,9 @@ const de_ListRecommendedIntentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6616,24 +6021,15 @@ export const de_ListSlotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slotSummaries != null) { - contents.slotSummaries = de_SlotSummaryList(data.slotSummaries, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + intentId: __expectString, + localeId: __expectString, + nextToken: __expectString, + slotSummaries: (_) => de_SlotSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6664,10 +6060,9 @@ const de_ListSlotsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6687,21 +6082,14 @@ export const de_ListSlotTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slotTypeSummaries != null) { - contents.slotTypeSummaries = de_SlotTypeSummaryList(data.slotTypeSummaries, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + localeId: __expectString, + nextToken: __expectString, + slotTypeSummaries: (_) => de_SlotTypeSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6732,10 +6120,9 @@ const de_ListSlotTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6755,9 +6142,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6788,10 +6176,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6811,27 +6198,16 @@ export const de_SearchAssociatedTranscriptsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associatedTranscripts != null) { - contents.associatedTranscripts = de_AssociatedTranscriptList(data.associatedTranscripts, context); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationId != null) { - contents.botRecommendationId = __expectString(data.botRecommendationId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.nextIndex != null) { - contents.nextIndex = __expectInt32(data.nextIndex); - } - if (data.totalResults != null) { - contents.totalResults = __expectInt32(data.totalResults); - } + const doc = take(data, { + associatedTranscripts: _json, + botId: __expectString, + botRecommendationId: __expectString, + botVersion: __expectString, + localeId: __expectString, + nextIndex: __expectInt32, + totalResults: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -6865,10 +6241,9 @@ const de_SearchAssociatedTranscriptsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6888,30 +6263,17 @@ export const de_StartBotRecommendationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationId != null) { - contents.botRecommendationId = __expectString(data.botRecommendationId); - } - if (data.botRecommendationStatus != null) { - contents.botRecommendationStatus = __expectString(data.botRecommendationStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.encryptionSetting != null) { - contents.encryptionSetting = de_EncryptionSetting(data.encryptionSetting, context); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.transcriptSourceSetting != null) { - contents.transcriptSourceSetting = de_TranscriptSourceSetting(data.transcriptSourceSetting, context); - } + const doc = take(data, { + botId: __expectString, + botRecommendationId: __expectString, + botRecommendationStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionSetting: _json, + localeId: __expectString, + transcriptSourceSetting: (_) => de_TranscriptSourceSetting(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6951,10 +6313,9 @@ const de_StartBotRecommendationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6974,21 +6335,14 @@ export const de_StartImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.importId != null) { - contents.importId = __expectString(data.importId); - } - if (data.importStatus != null) { - contents.importStatus = __expectString(data.importStatus); - } - if (data.mergeStrategy != null) { - contents.mergeStrategy = __expectString(data.mergeStrategy); - } - if (data.resourceSpecification != null) { - contents.resourceSpecification = de_ImportResourceSpecification(data.resourceSpecification, context); - } + const doc = take(data, { + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + importId: __expectString, + importStatus: __expectString, + mergeStrategy: __expectString, + resourceSpecification: (_) => de_ImportResourceSpecification(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7025,10 +6379,9 @@ const de_StartImportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7048,21 +6401,14 @@ export const de_StopBotRecommendationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationId != null) { - contents.botRecommendationId = __expectString(data.botRecommendationId); - } - if (data.botRecommendationStatus != null) { - contents.botRecommendationStatus = __expectString(data.botRecommendationStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } + const doc = take(data, { + botId: __expectString, + botRecommendationId: __expectString, + botRecommendationStatus: __expectString, + botVersion: __expectString, + localeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7102,10 +6448,9 @@ const de_StopBotRecommendationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7155,10 +6500,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7208,10 +6552,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7231,39 +6574,20 @@ export const de_UpdateBotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botMembers != null) { - contents.botMembers = de_BotMembers(data.botMembers, context); - } - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.botStatus != null) { - contents.botStatus = __expectString(data.botStatus); - } - if (data.botType != null) { - contents.botType = __expectString(data.botType); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.dataPrivacy != null) { - contents.dataPrivacy = de_DataPrivacy(data.dataPrivacy, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.idleSessionTTLInSeconds != null) { - contents.idleSessionTTLInSeconds = __expectInt32(data.idleSessionTTLInSeconds); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } + const doc = take(data, { + botId: __expectString, + botMembers: _json, + botName: __expectString, + botStatus: __expectString, + botType: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataPrivacy: _json, + description: __expectString, + idleSessionTTLInSeconds: __expectInt32, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7300,10 +6624,9 @@ const de_UpdateBotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7323,39 +6646,20 @@ export const de_UpdateBotAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAliasId != null) { - contents.botAliasId = __expectString(data.botAliasId); - } - if (data.botAliasLocaleSettings != null) { - contents.botAliasLocaleSettings = de_BotAliasLocaleSettingsMap(data.botAliasLocaleSettings, context); - } - if (data.botAliasName != null) { - contents.botAliasName = __expectString(data.botAliasName); - } - if (data.botAliasStatus != null) { - contents.botAliasStatus = __expectString(data.botAliasStatus); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.conversationLogSettings != null) { - contents.conversationLogSettings = de_ConversationLogSettings(data.conversationLogSettings, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.sentimentAnalysisSettings != null) { - contents.sentimentAnalysisSettings = de_SentimentAnalysisSettings(data.sentimentAnalysisSettings, context); - } + const doc = take(data, { + botAliasId: __expectString, + botAliasLocaleSettings: _json, + botAliasName: __expectString, + botAliasStatus: __expectString, + botId: __expectString, + botVersion: __expectString, + conversationLogSettings: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + sentimentAnalysisSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7392,10 +6696,9 @@ const de_UpdateBotAliasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7415,42 +6718,21 @@ export const de_UpdateBotLocaleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botLocaleStatus != null) { - contents.botLocaleStatus = __expectString(data.botLocaleStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.failureReasons != null) { - contents.failureReasons = de_FailureReasons(data.failureReasons, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.localeName != null) { - contents.localeName = __expectString(data.localeName); - } - if (data.nluIntentConfidenceThreshold != null) { - contents.nluIntentConfidenceThreshold = __limitedParseDouble(data.nluIntentConfidenceThreshold); - } - if (data.recommendedActions != null) { - contents.recommendedActions = de_RecommendedActions(data.recommendedActions, context); - } - if (data.voiceSettings != null) { - contents.voiceSettings = de_VoiceSettings(data.voiceSettings, context); - } + const doc = take(data, { + botId: __expectString, + botLocaleStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + failureReasons: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + localeName: __expectString, + nluIntentConfidenceThreshold: __limitedParseDouble, + recommendedActions: _json, + voiceSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7487,10 +6769,9 @@ const de_UpdateBotLocaleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7510,33 +6791,18 @@ export const de_UpdateBotRecommendationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botRecommendationId != null) { - contents.botRecommendationId = __expectString(data.botRecommendationId); - } - if (data.botRecommendationStatus != null) { - contents.botRecommendationStatus = __expectString(data.botRecommendationStatus); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.encryptionSetting != null) { - contents.encryptionSetting = de_EncryptionSetting(data.encryptionSetting, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.transcriptSourceSetting != null) { - contents.transcriptSourceSetting = de_TranscriptSourceSetting(data.transcriptSourceSetting, context); - } + const doc = take(data, { + botId: __expectString, + botRecommendationId: __expectString, + botRecommendationStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + encryptionSetting: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + transcriptSourceSetting: (_) => de_TranscriptSourceSetting(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7576,10 +6842,9 @@ const de_UpdateBotRecommendationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7599,24 +6864,15 @@ export const de_UpdateExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.exportId != null) { - contents.exportId = __expectString(data.exportId); - } - if (data.exportStatus != null) { - contents.exportStatus = __expectString(data.exportStatus); - } - if (data.fileFormat != null) { - contents.fileFormat = __expectString(data.fileFormat); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.resourceSpecification != null) { - contents.resourceSpecification = de_ExportResourceSpecification(data.resourceSpecification, context); - } + const doc = take(data, { + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + exportId: __expectString, + exportStatus: __expectString, + fileFormat: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceSpecification: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7653,10 +6909,9 @@ const de_UpdateExportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7676,63 +6931,28 @@ export const de_UpdateIntentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.dialogCodeHook != null) { - contents.dialogCodeHook = de_DialogCodeHookSettings(data.dialogCodeHook, context); - } - if (data.fulfillmentCodeHook != null) { - contents.fulfillmentCodeHook = de_FulfillmentCodeHookSettings(data.fulfillmentCodeHook, context); - } - if (data.initialResponseSetting != null) { - contents.initialResponseSetting = de_InitialResponseSetting(data.initialResponseSetting, context); - } - if (data.inputContexts != null) { - contents.inputContexts = de_InputContextsList(data.inputContexts, context); - } - if (data.intentClosingSetting != null) { - contents.intentClosingSetting = de_IntentClosingSetting(data.intentClosingSetting, context); - } - if (data.intentConfirmationSetting != null) { - contents.intentConfirmationSetting = de_IntentConfirmationSetting(data.intentConfirmationSetting, context); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.intentName != null) { - contents.intentName = __expectString(data.intentName); - } - if (data.kendraConfiguration != null) { - contents.kendraConfiguration = de_KendraConfiguration(data.kendraConfiguration, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.outputContexts != null) { - contents.outputContexts = de_OutputContextsList(data.outputContexts, context); - } - if (data.parentIntentSignature != null) { - contents.parentIntentSignature = __expectString(data.parentIntentSignature); - } - if (data.sampleUtterances != null) { - contents.sampleUtterances = de_SampleUtterancesList(data.sampleUtterances, context); - } - if (data.slotPriorities != null) { - contents.slotPriorities = de_SlotPrioritiesList(data.slotPriorities, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + dialogCodeHook: _json, + fulfillmentCodeHook: (_) => de_FulfillmentCodeHookSettings(_, context), + initialResponseSetting: (_) => de_InitialResponseSetting(_, context), + inputContexts: _json, + intentClosingSetting: (_) => de_IntentClosingSetting(_, context), + intentConfirmationSetting: (_) => de_IntentConfirmationSetting(_, context), + intentId: __expectString, + intentName: __expectString, + kendraConfiguration: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + outputContexts: _json, + parentIntentSignature: __expectString, + sampleUtterances: _json, + slotPriorities: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7769,10 +6989,9 @@ const de_UpdateIntentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7792,12 +7011,11 @@ export const de_UpdateResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + resourceArn: __expectString, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7834,10 +7052,9 @@ const de_UpdateResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7857,48 +7074,23 @@ export const de_UpdateSlotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.intentId != null) { - contents.intentId = __expectString(data.intentId); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.multipleValuesSetting != null) { - contents.multipleValuesSetting = de_MultipleValuesSetting(data.multipleValuesSetting, context); - } - if (data.obfuscationSetting != null) { - contents.obfuscationSetting = de_ObfuscationSetting(data.obfuscationSetting, context); - } - if (data.slotId != null) { - contents.slotId = __expectString(data.slotId); - } - if (data.slotName != null) { - contents.slotName = __expectString(data.slotName); - } - if (data.slotTypeId != null) { - contents.slotTypeId = __expectString(data.slotTypeId); - } - if (data.subSlotSetting != null) { - contents.subSlotSetting = de_SubSlotSetting(data.subSlotSetting, context); - } - if (data.valueElicitationSetting != null) { - contents.valueElicitationSetting = de_SlotValueElicitationSetting(data.valueElicitationSetting, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + intentId: __expectString, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + multipleValuesSetting: _json, + obfuscationSetting: _json, + slotId: __expectString, + slotName: __expectString, + slotTypeId: __expectString, + subSlotSetting: (_) => de_SubSlotSetting(_, context), + valueElicitationSetting: (_) => de_SlotValueElicitationSetting(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7935,10 +7127,9 @@ const de_UpdateSlotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7958,45 +7149,22 @@ export const de_UpdateSlotTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.compositeSlotTypeSetting != null) { - contents.compositeSlotTypeSetting = de_CompositeSlotTypeSetting(data.compositeSlotTypeSetting, context); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationDateTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.externalSourceSetting != null) { - contents.externalSourceSetting = de_ExternalSourceSetting(data.externalSourceSetting, context); - } - if (data.lastUpdatedDateTime != null) { - contents.lastUpdatedDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedDateTime))); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.parentSlotTypeSignature != null) { - contents.parentSlotTypeSignature = __expectString(data.parentSlotTypeSignature); - } - if (data.slotTypeId != null) { - contents.slotTypeId = __expectString(data.slotTypeId); - } - if (data.slotTypeName != null) { - contents.slotTypeName = __expectString(data.slotTypeName); - } - if (data.slotTypeValues != null) { - contents.slotTypeValues = de_SlotTypeValues(data.slotTypeValues, context); - } - if (data.valueSelectionSetting != null) { - contents.valueSelectionSetting = de_SlotValueSelectionSetting(data.valueSelectionSetting, context); - } + const doc = take(data, { + botId: __expectString, + botVersion: __expectString, + compositeSlotTypeSetting: _json, + creationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + externalSourceSetting: _json, + lastUpdatedDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + parentSlotTypeSignature: __expectString, + slotTypeId: __expectString, + slotTypeName: __expectString, + slotTypeValues: _json, + valueSelectionSetting: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -8033,25 +7201,25 @@ const de_UpdateSlotTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8068,9 +7236,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8087,9 +7256,10 @@ const de_PreconditionFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PreconditionFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8106,9 +7276,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8125,9 +7296,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8146,9 +7318,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8162,9 +7335,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8172,3338 +7346,1215 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +// se_AdvancedRecognitionSetting omitted. + +// se_AggregatedUtterancesFilter omitted. + +// se_AggregatedUtterancesFilters omitted. + +// se_AggregatedUtterancesSortBy omitted. + +// se_AllowedInputTypes omitted. + +// se_AssociatedTranscriptFilter omitted. + +// se_AssociatedTranscriptFilters omitted. + +// se_AudioAndDTMFInputSpecification omitted. + +// se_AudioLogDestination omitted. + +// se_AudioLogSetting omitted. + +// se_AudioLogSettingsList omitted. + +// se_AudioSpecification omitted. + +// se_BotAliasLocaleSettings omitted. + +// se_BotAliasLocaleSettingsMap omitted. + +// se_BotExportSpecification omitted. + +// se_BotFilter omitted. + +// se_BotFilters omitted. + +// se_BotImportSpecification omitted. + +// se_BotLocaleExportSpecification omitted. + +// se_BotLocaleFilter omitted. + +// se_BotLocaleFilters omitted. + /** - * serializeAws_restJson1AdvancedRecognitionSetting + * serializeAws_restJson1BotLocaleImportSpecification */ -const se_AdvancedRecognitionSetting = (input: AdvancedRecognitionSetting, context: __SerdeContext): any => { - return { - ...(input.audioRecognitionStrategy != null && { audioRecognitionStrategy: input.audioRecognitionStrategy }), - }; +const se_BotLocaleImportSpecification = (input: BotLocaleImportSpecification, context: __SerdeContext): any => { + return take(input, { + botId: [], + botVersion: [], + localeId: [], + nluIntentConfidenceThreshold: __serializeFloat, + voiceSettings: _json, + }); }; +// se_BotLocaleSortBy omitted. + +// se_BotMember omitted. + +// se_BotMembers omitted. + +// se_BotSortBy omitted. + +// se_BotVersionLocaleDetails omitted. + +// se_BotVersionLocaleSpecification omitted. + +// se_BotVersionSortBy omitted. + +// se_BuiltInIntentSortBy omitted. + +// se_BuiltInSlotTypeSortBy omitted. + +// se_Button omitted. + +// se_ButtonsList omitted. + +// se_CloudWatchLogGroupLogDestination omitted. + +// se_CodeHookSpecification omitted. + +// se_CompositeSlotTypeSetting omitted. + +// se_Condition omitted. + /** - * serializeAws_restJson1AggregatedUtterancesFilter + * serializeAws_restJson1ConditionalBranch */ -const se_AggregatedUtterancesFilter = (input: AggregatedUtterancesFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; +const se_ConditionalBranch = (input: ConditionalBranch, context: __SerdeContext): any => { + return take(input, { + condition: _json, + name: [], + nextStep: (_) => se_DialogState(_, context), + response: _json, + }); }; /** - * serializeAws_restJson1AggregatedUtterancesFilters + * serializeAws_restJson1ConditionalBranches */ -const se_AggregatedUtterancesFilters = (input: AggregatedUtterancesFilter[], context: __SerdeContext): any => { +const se_ConditionalBranches = (input: ConditionalBranch[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_AggregatedUtterancesFilter(entry, context); + return se_ConditionalBranch(entry, context); }); }; /** - * serializeAws_restJson1AggregatedUtterancesSortBy + * serializeAws_restJson1ConditionalSpecification */ -const se_AggregatedUtterancesSortBy = (input: AggregatedUtterancesSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; +const se_ConditionalSpecification = (input: ConditionalSpecification, context: __SerdeContext): any => { + return take(input, { + active: [], + conditionalBranches: (_) => se_ConditionalBranches(_, context), + defaultBranch: (_) => se_DefaultConditionalBranch(_, context), + }); }; +// se_ConditionKeyValueMap omitted. + +// se_ConditionMap omitted. + +// se_ConversationLogSettings omitted. + +// se_CreateCustomVocabularyItemsList omitted. + +// se_CustomPayload omitted. + +// se_CustomVocabularyEntryId omitted. + +// se_CustomVocabularyExportSpecification omitted. + +// se_CustomVocabularyImportSpecification omitted. + +// se_CustomVocabularyItem omitted. + +// se_DataPrivacy omitted. + /** - * serializeAws_restJson1AllowedInputTypes + * serializeAws_restJson1DateRangeFilter */ -const se_AllowedInputTypes = (input: AllowedInputTypes, context: __SerdeContext): any => { - return { - ...(input.allowAudioInput != null && { allowAudioInput: input.allowAudioInput }), - ...(input.allowDTMFInput != null && { allowDTMFInput: input.allowDTMFInput }), - }; +const se_DateRangeFilter = (input: DateRangeFilter, context: __SerdeContext): any => { + return take(input, { + endDateTime: (_) => Math.round(_.getTime() / 1000), + startDateTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * serializeAws_restJson1AssociatedTranscriptFilter + * serializeAws_restJson1DefaultConditionalBranch */ -const se_AssociatedTranscriptFilter = (input: AssociatedTranscriptFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; +const se_DefaultConditionalBranch = (input: DefaultConditionalBranch, context: __SerdeContext): any => { + return take(input, { + nextStep: (_) => se_DialogState(_, context), + response: _json, + }); }; +// se_DeleteCustomVocabularyItemsList omitted. + +// se_DialogAction omitted. + /** - * serializeAws_restJson1AssociatedTranscriptFilters + * serializeAws_restJson1DialogCodeHookInvocationSetting */ -const se_AssociatedTranscriptFilters = (input: AssociatedTranscriptFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociatedTranscriptFilter(entry, context); - }); +const se_DialogCodeHookInvocationSetting = (input: DialogCodeHookInvocationSetting, context: __SerdeContext): any => { + return take(input, { + active: [], + enableCodeHookInvocation: [], + invocationLabel: [], + postCodeHookSpecification: (_) => se_PostDialogCodeHookInvocationSpecification(_, context), + }); }; +// se_DialogCodeHookSettings omitted. + /** - * serializeAws_restJson1AudioAndDTMFInputSpecification + * serializeAws_restJson1DialogState */ -const se_AudioAndDTMFInputSpecification = (input: AudioAndDTMFInputSpecification, context: __SerdeContext): any => { - return { - ...(input.audioSpecification != null && { - audioSpecification: se_AudioSpecification(input.audioSpecification, context), - }), - ...(input.dtmfSpecification != null && { - dtmfSpecification: se_DTMFSpecification(input.dtmfSpecification, context), - }), - ...(input.startTimeoutMs != null && { startTimeoutMs: input.startTimeoutMs }), - }; +const se_DialogState = (input: DialogState, context: __SerdeContext): any => { + return take(input, { + dialogAction: _json, + intent: (_) => se_IntentOverride(_, context), + sessionAttributes: _json, + }); }; +// se_DTMFSpecification omitted. + +// se_ElicitationCodeHookInvocationSetting omitted. + +// se_EncryptionSetting omitted. + +// se_ExportFilter omitted. + +// se_ExportFilters omitted. + +// se_ExportResourceSpecification omitted. + +// se_ExportSortBy omitted. + +// se_ExternalSourceSetting omitted. + +// se_FilterValues omitted. + /** - * serializeAws_restJson1AudioLogDestination + * serializeAws_restJson1FulfillmentCodeHookSettings */ -const se_AudioLogDestination = (input: AudioLogDestination, context: __SerdeContext): any => { - return { - ...(input.s3Bucket != null && { s3Bucket: se_S3BucketLogDestination(input.s3Bucket, context) }), - }; +const se_FulfillmentCodeHookSettings = (input: FulfillmentCodeHookSettings, context: __SerdeContext): any => { + return take(input, { + active: [], + enabled: [], + fulfillmentUpdatesSpecification: _json, + postFulfillmentStatusSpecification: (_) => se_PostFulfillmentStatusSpecification(_, context), + }); }; +// se_FulfillmentStartResponseSpecification omitted. + +// se_FulfillmentUpdateResponseSpecification omitted. + +// se_FulfillmentUpdatesSpecification omitted. + +// se_GrammarSlotTypeSetting omitted. + +// se_GrammarSlotTypeSource omitted. + +// se_ImageResponseCard omitted. + +// se_ImportFilter omitted. + +// se_ImportFilters omitted. + /** - * serializeAws_restJson1AudioLogSetting + * serializeAws_restJson1ImportResourceSpecification */ -const se_AudioLogSetting = (input: AudioLogSetting, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: se_AudioLogDestination(input.destination, context) }), - ...(input.enabled != null && { enabled: input.enabled }), - }; +const se_ImportResourceSpecification = (input: ImportResourceSpecification, context: __SerdeContext): any => { + return take(input, { + botImportSpecification: _json, + botLocaleImportSpecification: (_) => se_BotLocaleImportSpecification(_, context), + customVocabularyImportSpecification: _json, + }); }; +// se_ImportSortBy omitted. + /** - * serializeAws_restJson1AudioLogSettingsList + * serializeAws_restJson1InitialResponseSetting */ -const se_AudioLogSettingsList = (input: AudioLogSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AudioLogSetting(entry, context); - }); +const se_InitialResponseSetting = (input: InitialResponseSetting, context: __SerdeContext): any => { + return take(input, { + codeHook: (_) => se_DialogCodeHookInvocationSetting(_, context), + conditional: (_) => se_ConditionalSpecification(_, context), + initialResponse: _json, + nextStep: (_) => se_DialogState(_, context), + }); }; +// se_InputContext omitted. + +// se_InputContextsList omitted. + /** - * serializeAws_restJson1AudioSpecification + * serializeAws_restJson1IntentClosingSetting */ -const se_AudioSpecification = (input: AudioSpecification, context: __SerdeContext): any => { - return { - ...(input.endTimeoutMs != null && { endTimeoutMs: input.endTimeoutMs }), - ...(input.maxLengthMs != null && { maxLengthMs: input.maxLengthMs }), - }; +const se_IntentClosingSetting = (input: IntentClosingSetting, context: __SerdeContext): any => { + return take(input, { + active: [], + closingResponse: _json, + conditional: (_) => se_ConditionalSpecification(_, context), + nextStep: (_) => se_DialogState(_, context), + }); }; /** - * serializeAws_restJson1BotAliasLocaleSettings + * serializeAws_restJson1IntentConfirmationSetting */ -const se_BotAliasLocaleSettings = (input: BotAliasLocaleSettings, context: __SerdeContext): any => { - return { - ...(input.codeHookSpecification != null && { - codeHookSpecification: se_CodeHookSpecification(input.codeHookSpecification, context), - }), - ...(input.enabled != null && { enabled: input.enabled }), - }; +const se_IntentConfirmationSetting = (input: IntentConfirmationSetting, context: __SerdeContext): any => { + return take(input, { + active: [], + codeHook: (_) => se_DialogCodeHookInvocationSetting(_, context), + confirmationConditional: (_) => se_ConditionalSpecification(_, context), + confirmationNextStep: (_) => se_DialogState(_, context), + confirmationResponse: _json, + declinationConditional: (_) => se_ConditionalSpecification(_, context), + declinationNextStep: (_) => se_DialogState(_, context), + declinationResponse: _json, + elicitationCodeHook: _json, + failureConditional: (_) => se_ConditionalSpecification(_, context), + failureNextStep: (_) => se_DialogState(_, context), + failureResponse: _json, + promptSpecification: _json, + }); }; +// se_IntentFilter omitted. + +// se_IntentFilters omitted. + /** - * serializeAws_restJson1BotAliasLocaleSettingsMap + * serializeAws_restJson1IntentOverride */ -const se_BotAliasLocaleSettingsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_BotAliasLocaleSettings(value, context); - return acc; - }, {}); +const se_IntentOverride = (input: IntentOverride, context: __SerdeContext): any => { + return take(input, { + name: [], + slots: (_) => se_SlotValueOverrideMap(_, context), + }); }; +// se_IntentSortBy omitted. + +// se_KendraConfiguration omitted. + +// se_LambdaCodeHook omitted. + /** - * serializeAws_restJson1BotExportSpecification + * serializeAws_restJson1LexTranscriptFilter */ -const se_BotExportSpecification = (input: BotExportSpecification, context: __SerdeContext): any => { - return { - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - }; +const se_LexTranscriptFilter = (input: LexTranscriptFilter, context: __SerdeContext): any => { + return take(input, { + dateRangeFilter: (_) => se_DateRangeFilter(_, context), + }); }; +// se_Message omitted. + +// se_MessageGroup omitted. + +// se_MessageGroupsList omitted. + +// se_MessageVariationsList omitted. + +// se_MultipleValuesSetting omitted. + +// se_NewCustomVocabularyItem omitted. + +// se_ObfuscationSetting omitted. + +// se_ObjectPrefixes omitted. + +// se_OperationList omitted. + +// se_OutputContext omitted. + +// se_OutputContextsList omitted. + +// se_PathFormat omitted. + +// se_PlainTextMessage omitted. + /** - * serializeAws_restJson1BotFilter + * serializeAws_restJson1PostDialogCodeHookInvocationSpecification */ -const se_BotFilter = (input: BotFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; +const se_PostDialogCodeHookInvocationSpecification = ( + input: PostDialogCodeHookInvocationSpecification, + context: __SerdeContext +): any => { + return take(input, { + failureConditional: (_) => se_ConditionalSpecification(_, context), + failureNextStep: (_) => se_DialogState(_, context), + failureResponse: _json, + successConditional: (_) => se_ConditionalSpecification(_, context), + successNextStep: (_) => se_DialogState(_, context), + successResponse: _json, + timeoutConditional: (_) => se_ConditionalSpecification(_, context), + timeoutNextStep: (_) => se_DialogState(_, context), + timeoutResponse: _json, + }); }; /** - * serializeAws_restJson1BotFilters + * serializeAws_restJson1PostFulfillmentStatusSpecification */ -const se_BotFilters = (input: BotFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BotFilter(entry, context); - }); +const se_PostFulfillmentStatusSpecification = ( + input: PostFulfillmentStatusSpecification, + context: __SerdeContext +): any => { + return take(input, { + failureConditional: (_) => se_ConditionalSpecification(_, context), + failureNextStep: (_) => se_DialogState(_, context), + failureResponse: _json, + successConditional: (_) => se_ConditionalSpecification(_, context), + successNextStep: (_) => se_DialogState(_, context), + successResponse: _json, + timeoutConditional: (_) => se_ConditionalSpecification(_, context), + timeoutNextStep: (_) => se_DialogState(_, context), + timeoutResponse: _json, + }); }; +// se_Principal omitted. + +// se_PrincipalList omitted. + +// se_PromptAttemptSpecification omitted. + +// se_PromptAttemptsSpecificationMap omitted. + +// se_PromptSpecification omitted. + +// se_RelativeAggregationDuration omitted. + +// se_ResponseSpecification omitted. + +// se_S3BucketLogDestination omitted. + /** - * serializeAws_restJson1BotImportSpecification + * serializeAws_restJson1S3BucketTranscriptSource */ -const se_BotImportSpecification = (input: BotImportSpecification, context: __SerdeContext): any => { - return { - ...(input.botName != null && { botName: input.botName }), - ...(input.botTags != null && { botTags: se_TagMap(input.botTags, context) }), - ...(input.dataPrivacy != null && { dataPrivacy: se_DataPrivacy(input.dataPrivacy, context) }), - ...(input.idleSessionTTLInSeconds != null && { idleSessionTTLInSeconds: input.idleSessionTTLInSeconds }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.testBotAliasTags != null && { testBotAliasTags: se_TagMap(input.testBotAliasTags, context) }), - }; +const se_S3BucketTranscriptSource = (input: S3BucketTranscriptSource, context: __SerdeContext): any => { + return take(input, { + kmsKeyArn: [], + pathFormat: _json, + s3BucketName: [], + transcriptFilter: (_) => se_TranscriptFilter(_, context), + transcriptFormat: [], + }); }; -/** - * serializeAws_restJson1BotLocaleExportSpecification - */ -const se_BotLocaleExportSpecification = (input: BotLocaleExportSpecification, context: __SerdeContext): any => { - return { - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.localeId != null && { localeId: input.localeId }), - }; -}; - -/** - * serializeAws_restJson1BotLocaleFilter - */ -const se_BotLocaleFilter = (input: BotLocaleFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1BotLocaleFilters - */ -const se_BotLocaleFilters = (input: BotLocaleFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BotLocaleFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1BotLocaleImportSpecification - */ -const se_BotLocaleImportSpecification = (input: BotLocaleImportSpecification, context: __SerdeContext): any => { - return { - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.localeId != null && { localeId: input.localeId }), - ...(input.nluIntentConfidenceThreshold != null && { - nluIntentConfidenceThreshold: __serializeFloat(input.nluIntentConfidenceThreshold), - }), - ...(input.voiceSettings != null && { voiceSettings: se_VoiceSettings(input.voiceSettings, context) }), - }; -}; - -/** - * serializeAws_restJson1BotLocaleSortBy - */ -const se_BotLocaleSortBy = (input: BotLocaleSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1BotMember - */ -const se_BotMember = (input: BotMember, context: __SerdeContext): any => { - return { - ...(input.botMemberAliasId != null && { botMemberAliasId: input.botMemberAliasId }), - ...(input.botMemberAliasName != null && { botMemberAliasName: input.botMemberAliasName }), - ...(input.botMemberId != null && { botMemberId: input.botMemberId }), - ...(input.botMemberName != null && { botMemberName: input.botMemberName }), - ...(input.botMemberVersion != null && { botMemberVersion: input.botMemberVersion }), - }; -}; - -/** - * serializeAws_restJson1BotMembers - */ -const se_BotMembers = (input: BotMember[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BotMember(entry, context); - }); -}; - -/** - * serializeAws_restJson1BotSortBy - */ -const se_BotSortBy = (input: BotSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1BotVersionLocaleDetails - */ -const se_BotVersionLocaleDetails = (input: BotVersionLocaleDetails, context: __SerdeContext): any => { - return { - ...(input.sourceBotVersion != null && { sourceBotVersion: input.sourceBotVersion }), - }; -}; - -/** - * serializeAws_restJson1BotVersionLocaleSpecification - */ -const se_BotVersionLocaleSpecification = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_BotVersionLocaleDetails(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1BotVersionSortBy - */ -const se_BotVersionSortBy = (input: BotVersionSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1BuiltInIntentSortBy - */ -const se_BuiltInIntentSortBy = (input: BuiltInIntentSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1BuiltInSlotTypeSortBy - */ -const se_BuiltInSlotTypeSortBy = (input: BuiltInSlotTypeSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1Button - */ -const se_Button = (input: Button, context: __SerdeContext): any => { - return { - ...(input.text != null && { text: input.text }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1ButtonsList - */ -const se_ButtonsList = (input: Button[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Button(entry, context); - }); -}; - -/** - * serializeAws_restJson1CloudWatchLogGroupLogDestination - */ -const se_CloudWatchLogGroupLogDestination = (input: CloudWatchLogGroupLogDestination, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogGroupArn != null && { cloudWatchLogGroupArn: input.cloudWatchLogGroupArn }), - ...(input.logPrefix != null && { logPrefix: input.logPrefix }), - }; -}; - -/** - * serializeAws_restJson1CodeHookSpecification - */ -const se_CodeHookSpecification = (input: CodeHookSpecification, context: __SerdeContext): any => { - return { - ...(input.lambdaCodeHook != null && { lambdaCodeHook: se_LambdaCodeHook(input.lambdaCodeHook, context) }), - }; -}; - -/** - * serializeAws_restJson1CompositeSlotTypeSetting - */ -const se_CompositeSlotTypeSetting = (input: CompositeSlotTypeSetting, context: __SerdeContext): any => { - return { - ...(input.subSlots != null && { subSlots: se_SubSlotTypeList(input.subSlots, context) }), - }; -}; - -/** - * serializeAws_restJson1Condition - */ -const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.expressionString != null && { expressionString: input.expressionString }), - }; -}; - -/** - * serializeAws_restJson1ConditionalBranch - */ -const se_ConditionalBranch = (input: ConditionalBranch, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: se_Condition(input.condition, context) }), - ...(input.name != null && { name: input.name }), - ...(input.nextStep != null && { nextStep: se_DialogState(input.nextStep, context) }), - ...(input.response != null && { response: se_ResponseSpecification(input.response, context) }), - }; -}; - -/** - * serializeAws_restJson1ConditionalBranches - */ -const se_ConditionalBranches = (input: ConditionalBranch[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConditionalBranch(entry, context); - }); -}; - -/** - * serializeAws_restJson1ConditionalSpecification - */ -const se_ConditionalSpecification = (input: ConditionalSpecification, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.conditionalBranches != null && { - conditionalBranches: se_ConditionalBranches(input.conditionalBranches, context), - }), - ...(input.defaultBranch != null && { defaultBranch: se_DefaultConditionalBranch(input.defaultBranch, context) }), - }; -}; - -/** - * serializeAws_restJson1ConditionKeyValueMap - */ -const se_ConditionKeyValueMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1ConditionMap - */ -const se_ConditionMap = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ConditionKeyValueMap(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1ConversationLogSettings - */ -const se_ConversationLogSettings = (input: ConversationLogSettings, context: __SerdeContext): any => { - return { - ...(input.audioLogSettings != null && { - audioLogSettings: se_AudioLogSettingsList(input.audioLogSettings, context), - }), - ...(input.textLogSettings != null && { textLogSettings: se_TextLogSettingsList(input.textLogSettings, context) }), - }; -}; - -/** - * serializeAws_restJson1CreateCustomVocabularyItemsList - */ -const se_CreateCustomVocabularyItemsList = (input: NewCustomVocabularyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NewCustomVocabularyItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1CustomPayload - */ -const se_CustomPayload = (input: CustomPayload, context: __SerdeContext): any => { - return { - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1CustomVocabularyEntryId - */ -const se_CustomVocabularyEntryId = (input: CustomVocabularyEntryId, context: __SerdeContext): any => { - return { - ...(input.itemId != null && { itemId: input.itemId }), - }; -}; - -/** - * serializeAws_restJson1CustomVocabularyExportSpecification - */ -const se_CustomVocabularyExportSpecification = ( - input: CustomVocabularyExportSpecification, - context: __SerdeContext -): any => { - return { - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.localeId != null && { localeId: input.localeId }), - }; -}; - -/** - * serializeAws_restJson1CustomVocabularyImportSpecification - */ -const se_CustomVocabularyImportSpecification = ( - input: CustomVocabularyImportSpecification, - context: __SerdeContext -): any => { - return { - ...(input.botId != null && { botId: input.botId }), - ...(input.botVersion != null && { botVersion: input.botVersion }), - ...(input.localeId != null && { localeId: input.localeId }), - }; -}; - -/** - * serializeAws_restJson1CustomVocabularyItem - */ -const se_CustomVocabularyItem = (input: CustomVocabularyItem, context: __SerdeContext): any => { - return { - ...(input.displayAs != null && { displayAs: input.displayAs }), - ...(input.itemId != null && { itemId: input.itemId }), - ...(input.phrase != null && { phrase: input.phrase }), - ...(input.weight != null && { weight: input.weight }), - }; -}; - -/** - * serializeAws_restJson1DataPrivacy - */ -const se_DataPrivacy = (input: DataPrivacy, context: __SerdeContext): any => { - return { - ...(input.childDirected != null && { childDirected: input.childDirected }), - }; -}; - -/** - * serializeAws_restJson1DateRangeFilter - */ -const se_DateRangeFilter = (input: DateRangeFilter, context: __SerdeContext): any => { - return { - ...(input.endDateTime != null && { endDateTime: Math.round(input.endDateTime.getTime() / 1000) }), - ...(input.startDateTime != null && { startDateTime: Math.round(input.startDateTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_restJson1DefaultConditionalBranch - */ -const se_DefaultConditionalBranch = (input: DefaultConditionalBranch, context: __SerdeContext): any => { - return { - ...(input.nextStep != null && { nextStep: se_DialogState(input.nextStep, context) }), - ...(input.response != null && { response: se_ResponseSpecification(input.response, context) }), - }; -}; - -/** - * serializeAws_restJson1DeleteCustomVocabularyItemsList - */ -const se_DeleteCustomVocabularyItemsList = (input: CustomVocabularyEntryId[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomVocabularyEntryId(entry, context); - }); -}; - -/** - * serializeAws_restJson1DialogAction - */ -const se_DialogAction = (input: DialogAction, context: __SerdeContext): any => { - return { - ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }), - ...(input.suppressNextMessage != null && { suppressNextMessage: input.suppressNextMessage }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_restJson1DialogCodeHookInvocationSetting - */ -const se_DialogCodeHookInvocationSetting = (input: DialogCodeHookInvocationSetting, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.enableCodeHookInvocation != null && { enableCodeHookInvocation: input.enableCodeHookInvocation }), - ...(input.invocationLabel != null && { invocationLabel: input.invocationLabel }), - ...(input.postCodeHookSpecification != null && { - postCodeHookSpecification: se_PostDialogCodeHookInvocationSpecification(input.postCodeHookSpecification, context), - }), - }; -}; - -/** - * serializeAws_restJson1DialogCodeHookSettings - */ -const se_DialogCodeHookSettings = (input: DialogCodeHookSettings, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; - -/** - * serializeAws_restJson1DialogState - */ -const se_DialogState = (input: DialogState, context: __SerdeContext): any => { - return { - ...(input.dialogAction != null && { dialogAction: se_DialogAction(input.dialogAction, context) }), - ...(input.intent != null && { intent: se_IntentOverride(input.intent, context) }), - ...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }), - }; -}; - -/** - * serializeAws_restJson1DTMFSpecification - */ -const se_DTMFSpecification = (input: DTMFSpecification, context: __SerdeContext): any => { - return { - ...(input.deletionCharacter != null && { deletionCharacter: input.deletionCharacter }), - ...(input.endCharacter != null && { endCharacter: input.endCharacter }), - ...(input.endTimeoutMs != null && { endTimeoutMs: input.endTimeoutMs }), - ...(input.maxLength != null && { maxLength: input.maxLength }), - }; -}; - -/** - * serializeAws_restJson1ElicitationCodeHookInvocationSetting - */ -const se_ElicitationCodeHookInvocationSetting = ( - input: ElicitationCodeHookInvocationSetting, - context: __SerdeContext -): any => { - return { - ...(input.enableCodeHookInvocation != null && { enableCodeHookInvocation: input.enableCodeHookInvocation }), - ...(input.invocationLabel != null && { invocationLabel: input.invocationLabel }), - }; -}; - -/** - * serializeAws_restJson1EncryptionSetting - */ -const se_EncryptionSetting = (input: EncryptionSetting, context: __SerdeContext): any => { - return { - ...(input.associatedTranscriptsPassword != null && { - associatedTranscriptsPassword: input.associatedTranscriptsPassword, - }), - ...(input.botLocaleExportPassword != null && { botLocaleExportPassword: input.botLocaleExportPassword }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - }; -}; - -/** - * serializeAws_restJson1ExportFilter - */ -const se_ExportFilter = (input: ExportFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1ExportFilters - */ -const se_ExportFilters = (input: ExportFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExportFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1ExportResourceSpecification - */ -const se_ExportResourceSpecification = (input: ExportResourceSpecification, context: __SerdeContext): any => { - return { - ...(input.botExportSpecification != null && { - botExportSpecification: se_BotExportSpecification(input.botExportSpecification, context), - }), - ...(input.botLocaleExportSpecification != null && { - botLocaleExportSpecification: se_BotLocaleExportSpecification(input.botLocaleExportSpecification, context), - }), - ...(input.customVocabularyExportSpecification != null && { - customVocabularyExportSpecification: se_CustomVocabularyExportSpecification( - input.customVocabularyExportSpecification, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1ExportSortBy - */ -const se_ExportSortBy = (input: ExportSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1ExternalSourceSetting - */ -const se_ExternalSourceSetting = (input: ExternalSourceSetting, context: __SerdeContext): any => { - return { - ...(input.grammarSlotTypeSetting != null && { - grammarSlotTypeSetting: se_GrammarSlotTypeSetting(input.grammarSlotTypeSetting, context), - }), - }; -}; - -/** - * serializeAws_restJson1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1FulfillmentCodeHookSettings - */ -const se_FulfillmentCodeHookSettings = (input: FulfillmentCodeHookSettings, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.fulfillmentUpdatesSpecification != null && { - fulfillmentUpdatesSpecification: se_FulfillmentUpdatesSpecification( - input.fulfillmentUpdatesSpecification, - context - ), - }), - ...(input.postFulfillmentStatusSpecification != null && { - postFulfillmentStatusSpecification: se_PostFulfillmentStatusSpecification( - input.postFulfillmentStatusSpecification, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1FulfillmentStartResponseSpecification - */ -const se_FulfillmentStartResponseSpecification = ( - input: FulfillmentStartResponseSpecification, - context: __SerdeContext -): any => { - return { - ...(input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt }), - ...(input.delayInSeconds != null && { delayInSeconds: input.delayInSeconds }), - ...(input.messageGroups != null && { messageGroups: se_MessageGroupsList(input.messageGroups, context) }), - }; -}; - -/** - * serializeAws_restJson1FulfillmentUpdateResponseSpecification - */ -const se_FulfillmentUpdateResponseSpecification = ( - input: FulfillmentUpdateResponseSpecification, - context: __SerdeContext -): any => { - return { - ...(input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt }), - ...(input.frequencyInSeconds != null && { frequencyInSeconds: input.frequencyInSeconds }), - ...(input.messageGroups != null && { messageGroups: se_MessageGroupsList(input.messageGroups, context) }), - }; -}; - -/** - * serializeAws_restJson1FulfillmentUpdatesSpecification - */ -const se_FulfillmentUpdatesSpecification = (input: FulfillmentUpdatesSpecification, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.startResponse != null && { - startResponse: se_FulfillmentStartResponseSpecification(input.startResponse, context), - }), - ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }), - ...(input.updateResponse != null && { - updateResponse: se_FulfillmentUpdateResponseSpecification(input.updateResponse, context), - }), - }; -}; - -/** - * serializeAws_restJson1GrammarSlotTypeSetting - */ -const se_GrammarSlotTypeSetting = (input: GrammarSlotTypeSetting, context: __SerdeContext): any => { - return { - ...(input.source != null && { source: se_GrammarSlotTypeSource(input.source, context) }), - }; -}; - -/** - * serializeAws_restJson1GrammarSlotTypeSource - */ -const se_GrammarSlotTypeSource = (input: GrammarSlotTypeSource, context: __SerdeContext): any => { - return { - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.s3BucketName != null && { s3BucketName: input.s3BucketName }), - ...(input.s3ObjectKey != null && { s3ObjectKey: input.s3ObjectKey }), - }; -}; - -/** - * serializeAws_restJson1ImageResponseCard - */ -const se_ImageResponseCard = (input: ImageResponseCard, context: __SerdeContext): any => { - return { - ...(input.buttons != null && { buttons: se_ButtonsList(input.buttons, context) }), - ...(input.imageUrl != null && { imageUrl: input.imageUrl }), - ...(input.subtitle != null && { subtitle: input.subtitle }), - ...(input.title != null && { title: input.title }), - }; -}; - -/** - * serializeAws_restJson1ImportFilter - */ -const se_ImportFilter = (input: ImportFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1ImportFilters - */ -const se_ImportFilters = (input: ImportFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ImportFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1ImportResourceSpecification - */ -const se_ImportResourceSpecification = (input: ImportResourceSpecification, context: __SerdeContext): any => { - return { - ...(input.botImportSpecification != null && { - botImportSpecification: se_BotImportSpecification(input.botImportSpecification, context), - }), - ...(input.botLocaleImportSpecification != null && { - botLocaleImportSpecification: se_BotLocaleImportSpecification(input.botLocaleImportSpecification, context), - }), - ...(input.customVocabularyImportSpecification != null && { - customVocabularyImportSpecification: se_CustomVocabularyImportSpecification( - input.customVocabularyImportSpecification, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1ImportSortBy - */ -const se_ImportSortBy = (input: ImportSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1InitialResponseSetting - */ -const se_InitialResponseSetting = (input: InitialResponseSetting, context: __SerdeContext): any => { - return { - ...(input.codeHook != null && { codeHook: se_DialogCodeHookInvocationSetting(input.codeHook, context) }), - ...(input.conditional != null && { conditional: se_ConditionalSpecification(input.conditional, context) }), - ...(input.initialResponse != null && { initialResponse: se_ResponseSpecification(input.initialResponse, context) }), - ...(input.nextStep != null && { nextStep: se_DialogState(input.nextStep, context) }), - }; -}; - -/** - * serializeAws_restJson1InputContext - */ -const se_InputContext = (input: InputContext, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_restJson1InputContextsList - */ -const se_InputContextsList = (input: InputContext[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputContext(entry, context); - }); -}; - -/** - * serializeAws_restJson1IntentClosingSetting - */ -const se_IntentClosingSetting = (input: IntentClosingSetting, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.closingResponse != null && { closingResponse: se_ResponseSpecification(input.closingResponse, context) }), - ...(input.conditional != null && { conditional: se_ConditionalSpecification(input.conditional, context) }), - ...(input.nextStep != null && { nextStep: se_DialogState(input.nextStep, context) }), - }; -}; - -/** - * serializeAws_restJson1IntentConfirmationSetting - */ -const se_IntentConfirmationSetting = (input: IntentConfirmationSetting, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.codeHook != null && { codeHook: se_DialogCodeHookInvocationSetting(input.codeHook, context) }), - ...(input.confirmationConditional != null && { - confirmationConditional: se_ConditionalSpecification(input.confirmationConditional, context), - }), - ...(input.confirmationNextStep != null && { - confirmationNextStep: se_DialogState(input.confirmationNextStep, context), - }), - ...(input.confirmationResponse != null && { - confirmationResponse: se_ResponseSpecification(input.confirmationResponse, context), - }), - ...(input.declinationConditional != null && { - declinationConditional: se_ConditionalSpecification(input.declinationConditional, context), - }), - ...(input.declinationNextStep != null && { - declinationNextStep: se_DialogState(input.declinationNextStep, context), - }), - ...(input.declinationResponse != null && { - declinationResponse: se_ResponseSpecification(input.declinationResponse, context), - }), - ...(input.elicitationCodeHook != null && { - elicitationCodeHook: se_ElicitationCodeHookInvocationSetting(input.elicitationCodeHook, context), - }), - ...(input.failureConditional != null && { - failureConditional: se_ConditionalSpecification(input.failureConditional, context), - }), - ...(input.failureNextStep != null && { failureNextStep: se_DialogState(input.failureNextStep, context) }), - ...(input.failureResponse != null && { failureResponse: se_ResponseSpecification(input.failureResponse, context) }), - ...(input.promptSpecification != null && { - promptSpecification: se_PromptSpecification(input.promptSpecification, context), - }), - }; -}; - -/** - * serializeAws_restJson1IntentFilter - */ -const se_IntentFilter = (input: IntentFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1IntentFilters - */ -const se_IntentFilters = (input: IntentFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IntentFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1IntentOverride - */ -const se_IntentOverride = (input: IntentOverride, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.slots != null && { slots: se_SlotValueOverrideMap(input.slots, context) }), - }; -}; - -/** - * serializeAws_restJson1IntentSortBy - */ -const se_IntentSortBy = (input: IntentSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1KendraConfiguration - */ -const se_KendraConfiguration = (input: KendraConfiguration, context: __SerdeContext): any => { - return { - ...(input.kendraIndex != null && { kendraIndex: input.kendraIndex }), - ...(input.queryFilterString != null && { queryFilterString: input.queryFilterString }), - ...(input.queryFilterStringEnabled != null && { queryFilterStringEnabled: input.queryFilterStringEnabled }), - }; -}; - -/** - * serializeAws_restJson1LambdaCodeHook - */ -const se_LambdaCodeHook = (input: LambdaCodeHook, context: __SerdeContext): any => { - return { - ...(input.codeHookInterfaceVersion != null && { codeHookInterfaceVersion: input.codeHookInterfaceVersion }), - ...(input.lambdaARN != null && { lambdaARN: input.lambdaARN }), - }; -}; - -/** - * serializeAws_restJson1LexTranscriptFilter - */ -const se_LexTranscriptFilter = (input: LexTranscriptFilter, context: __SerdeContext): any => { - return { - ...(input.dateRangeFilter != null && { dateRangeFilter: se_DateRangeFilter(input.dateRangeFilter, context) }), - }; -}; - -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.customPayload != null && { customPayload: se_CustomPayload(input.customPayload, context) }), - ...(input.imageResponseCard != null && { - imageResponseCard: se_ImageResponseCard(input.imageResponseCard, context), - }), - ...(input.plainTextMessage != null && { plainTextMessage: se_PlainTextMessage(input.plainTextMessage, context) }), - ...(input.ssmlMessage != null && { ssmlMessage: se_SSMLMessage(input.ssmlMessage, context) }), - }; -}; - -/** - * serializeAws_restJson1MessageGroup - */ -const se_MessageGroup = (input: MessageGroup, context: __SerdeContext): any => { - return { - ...(input.message != null && { message: se_Message(input.message, context) }), - ...(input.variations != null && { variations: se_MessageVariationsList(input.variations, context) }), - }; -}; - -/** - * serializeAws_restJson1MessageGroupsList - */ -const se_MessageGroupsList = (input: MessageGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MessageGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1MessageVariationsList - */ -const se_MessageVariationsList = (input: Message[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Message(entry, context); - }); -}; - -/** - * serializeAws_restJson1MultipleValuesSetting - */ -const se_MultipleValuesSetting = (input: MultipleValuesSetting, context: __SerdeContext): any => { - return { - ...(input.allowMultipleValues != null && { allowMultipleValues: input.allowMultipleValues }), - }; -}; - -/** - * serializeAws_restJson1NewCustomVocabularyItem - */ -const se_NewCustomVocabularyItem = (input: NewCustomVocabularyItem, context: __SerdeContext): any => { - return { - ...(input.displayAs != null && { displayAs: input.displayAs }), - ...(input.phrase != null && { phrase: input.phrase }), - ...(input.weight != null && { weight: input.weight }), - }; -}; - -/** - * serializeAws_restJson1ObfuscationSetting - */ -const se_ObfuscationSetting = (input: ObfuscationSetting, context: __SerdeContext): any => { - return { - ...(input.obfuscationSettingType != null && { obfuscationSettingType: input.obfuscationSettingType }), - }; -}; - -/** - * serializeAws_restJson1ObjectPrefixes - */ -const se_ObjectPrefixes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1OperationList - */ -const se_OperationList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1OutputContext - */ -const se_OutputContext = (input: OutputContext, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }), - ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }), - }; -}; - -/** - * serializeAws_restJson1OutputContextsList - */ -const se_OutputContextsList = (input: OutputContext[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OutputContext(entry, context); - }); -}; - -/** - * serializeAws_restJson1PathFormat - */ -const se_PathFormat = (input: PathFormat, context: __SerdeContext): any => { - return { - ...(input.objectPrefixes != null && { objectPrefixes: se_ObjectPrefixes(input.objectPrefixes, context) }), - }; -}; - -/** - * serializeAws_restJson1PlainTextMessage - */ -const se_PlainTextMessage = (input: PlainTextMessage, context: __SerdeContext): any => { - return { - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1PostDialogCodeHookInvocationSpecification - */ -const se_PostDialogCodeHookInvocationSpecification = ( - input: PostDialogCodeHookInvocationSpecification, - context: __SerdeContext -): any => { - return { - ...(input.failureConditional != null && { - failureConditional: se_ConditionalSpecification(input.failureConditional, context), - }), - ...(input.failureNextStep != null && { failureNextStep: se_DialogState(input.failureNextStep, context) }), - ...(input.failureResponse != null && { failureResponse: se_ResponseSpecification(input.failureResponse, context) }), - ...(input.successConditional != null && { - successConditional: se_ConditionalSpecification(input.successConditional, context), - }), - ...(input.successNextStep != null && { successNextStep: se_DialogState(input.successNextStep, context) }), - ...(input.successResponse != null && { successResponse: se_ResponseSpecification(input.successResponse, context) }), - ...(input.timeoutConditional != null && { - timeoutConditional: se_ConditionalSpecification(input.timeoutConditional, context), - }), - ...(input.timeoutNextStep != null && { timeoutNextStep: se_DialogState(input.timeoutNextStep, context) }), - ...(input.timeoutResponse != null && { timeoutResponse: se_ResponseSpecification(input.timeoutResponse, context) }), - }; -}; - -/** - * serializeAws_restJson1PostFulfillmentStatusSpecification - */ -const se_PostFulfillmentStatusSpecification = ( - input: PostFulfillmentStatusSpecification, - context: __SerdeContext -): any => { - return { - ...(input.failureConditional != null && { - failureConditional: se_ConditionalSpecification(input.failureConditional, context), - }), - ...(input.failureNextStep != null && { failureNextStep: se_DialogState(input.failureNextStep, context) }), - ...(input.failureResponse != null && { failureResponse: se_ResponseSpecification(input.failureResponse, context) }), - ...(input.successConditional != null && { - successConditional: se_ConditionalSpecification(input.successConditional, context), - }), - ...(input.successNextStep != null && { successNextStep: se_DialogState(input.successNextStep, context) }), - ...(input.successResponse != null && { successResponse: se_ResponseSpecification(input.successResponse, context) }), - ...(input.timeoutConditional != null && { - timeoutConditional: se_ConditionalSpecification(input.timeoutConditional, context), - }), - ...(input.timeoutNextStep != null && { timeoutNextStep: se_DialogState(input.timeoutNextStep, context) }), - ...(input.timeoutResponse != null && { timeoutResponse: se_ResponseSpecification(input.timeoutResponse, context) }), - }; -}; - -/** - * serializeAws_restJson1Principal - */ -const se_Principal = (input: Principal, context: __SerdeContext): any => { - return { - ...(input.arn != null && { arn: input.arn }), - ...(input.service != null && { service: input.service }), - }; -}; - -/** - * serializeAws_restJson1PrincipalList - */ -const se_PrincipalList = (input: Principal[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Principal(entry, context); - }); -}; - -/** - * serializeAws_restJson1PromptAttemptSpecification - */ -const se_PromptAttemptSpecification = (input: PromptAttemptSpecification, context: __SerdeContext): any => { - return { - ...(input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt }), - ...(input.allowedInputTypes != null && { - allowedInputTypes: se_AllowedInputTypes(input.allowedInputTypes, context), - }), - ...(input.audioAndDTMFInputSpecification != null && { - audioAndDTMFInputSpecification: se_AudioAndDTMFInputSpecification(input.audioAndDTMFInputSpecification, context), - }), - ...(input.textInputSpecification != null && { - textInputSpecification: se_TextInputSpecification(input.textInputSpecification, context), - }), - }; -}; - -/** - * serializeAws_restJson1PromptAttemptsSpecificationMap - */ -const se_PromptAttemptsSpecificationMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [PromptAttempt | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_PromptAttemptSpecification(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1PromptSpecification - */ -const se_PromptSpecification = (input: PromptSpecification, context: __SerdeContext): any => { - return { - ...(input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt }), - ...(input.maxRetries != null && { maxRetries: input.maxRetries }), - ...(input.messageGroups != null && { messageGroups: se_MessageGroupsList(input.messageGroups, context) }), - ...(input.messageSelectionStrategy != null && { messageSelectionStrategy: input.messageSelectionStrategy }), - ...(input.promptAttemptsSpecification != null && { - promptAttemptsSpecification: se_PromptAttemptsSpecificationMap(input.promptAttemptsSpecification, context), - }), - }; -}; - -/** - * serializeAws_restJson1RelativeAggregationDuration - */ -const se_RelativeAggregationDuration = (input: RelativeAggregationDuration, context: __SerdeContext): any => { - return { - ...(input.timeDimension != null && { timeDimension: input.timeDimension }), - ...(input.timeValue != null && { timeValue: input.timeValue }), - }; -}; - -/** - * serializeAws_restJson1ResponseSpecification - */ -const se_ResponseSpecification = (input: ResponseSpecification, context: __SerdeContext): any => { - return { - ...(input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt }), - ...(input.messageGroups != null && { messageGroups: se_MessageGroupsList(input.messageGroups, context) }), - }; -}; - -/** - * serializeAws_restJson1S3BucketLogDestination - */ -const se_S3BucketLogDestination = (input: S3BucketLogDestination, context: __SerdeContext): any => { - return { - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.logPrefix != null && { logPrefix: input.logPrefix }), - ...(input.s3BucketArn != null && { s3BucketArn: input.s3BucketArn }), - }; -}; - -/** - * serializeAws_restJson1S3BucketTranscriptSource - */ -const se_S3BucketTranscriptSource = (input: S3BucketTranscriptSource, context: __SerdeContext): any => { - return { - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.pathFormat != null && { pathFormat: se_PathFormat(input.pathFormat, context) }), - ...(input.s3BucketName != null && { s3BucketName: input.s3BucketName }), - ...(input.transcriptFilter != null && { transcriptFilter: se_TranscriptFilter(input.transcriptFilter, context) }), - ...(input.transcriptFormat != null && { transcriptFormat: input.transcriptFormat }), - }; -}; - -/** - * serializeAws_restJson1SampleUtterance - */ -const se_SampleUtterance = (input: SampleUtterance, context: __SerdeContext): any => { - return { - ...(input.utterance != null && { utterance: input.utterance }), - }; -}; - -/** - * serializeAws_restJson1SampleUtterancesList - */ -const se_SampleUtterancesList = (input: SampleUtterance[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SampleUtterance(entry, context); - }); -}; - -/** - * serializeAws_restJson1SampleValue - */ -const se_SampleValue = (input: SampleValue, context: __SerdeContext): any => { - return { - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1SentimentAnalysisSettings - */ -const se_SentimentAnalysisSettings = (input: SentimentAnalysisSettings, context: __SerdeContext): any => { - return { - ...(input.detectSentiment != null && { detectSentiment: input.detectSentiment }), - }; -}; - -/** - * serializeAws_restJson1SlotCaptureSetting - */ -const se_SlotCaptureSetting = (input: SlotCaptureSetting, context: __SerdeContext): any => { - return { - ...(input.captureConditional != null && { - captureConditional: se_ConditionalSpecification(input.captureConditional, context), - }), - ...(input.captureNextStep != null && { captureNextStep: se_DialogState(input.captureNextStep, context) }), - ...(input.captureResponse != null && { captureResponse: se_ResponseSpecification(input.captureResponse, context) }), - ...(input.codeHook != null && { codeHook: se_DialogCodeHookInvocationSetting(input.codeHook, context) }), - ...(input.elicitationCodeHook != null && { - elicitationCodeHook: se_ElicitationCodeHookInvocationSetting(input.elicitationCodeHook, context), - }), - ...(input.failureConditional != null && { - failureConditional: se_ConditionalSpecification(input.failureConditional, context), - }), - ...(input.failureNextStep != null && { failureNextStep: se_DialogState(input.failureNextStep, context) }), - ...(input.failureResponse != null && { failureResponse: se_ResponseSpecification(input.failureResponse, context) }), - }; -}; - -/** - * serializeAws_restJson1SlotDefaultValue - */ -const se_SlotDefaultValue = (input: SlotDefaultValue, context: __SerdeContext): any => { - return { - ...(input.defaultValue != null && { defaultValue: input.defaultValue }), - }; -}; - -/** - * serializeAws_restJson1SlotDefaultValueList - */ -const se_SlotDefaultValueList = (input: SlotDefaultValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotDefaultValue(entry, context); - }); -}; - -/** - * serializeAws_restJson1SlotDefaultValueSpecification - */ -const se_SlotDefaultValueSpecification = (input: SlotDefaultValueSpecification, context: __SerdeContext): any => { - return { - ...(input.defaultValueList != null && { - defaultValueList: se_SlotDefaultValueList(input.defaultValueList, context), - }), - }; -}; - -/** - * serializeAws_restJson1SlotFilter - */ -const se_SlotFilter = (input: SlotFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1SlotFilters - */ -const se_SlotFilters = (input: SlotFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1SlotPrioritiesList - */ -const se_SlotPrioritiesList = (input: SlotPriority[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotPriority(entry, context); - }); -}; - -/** - * serializeAws_restJson1SlotPriority - */ -const se_SlotPriority = (input: SlotPriority, context: __SerdeContext): any => { - return { - ...(input.priority != null && { priority: input.priority }), - ...(input.slotId != null && { slotId: input.slotId }), - }; -}; - -/** - * serializeAws_restJson1SlotSortBy - */ -const se_SlotSortBy = (input: SlotSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1SlotTypeFilter - */ -const se_SlotTypeFilter = (input: SlotTypeFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.operator != null && { operator: input.operator }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1SlotTypeFilters - */ -const se_SlotTypeFilters = (input: SlotTypeFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotTypeFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1SlotTypeSortBy - */ -const se_SlotTypeSortBy = (input: SlotTypeSortBy, context: __SerdeContext): any => { - return { - ...(input.attribute != null && { attribute: input.attribute }), - ...(input.order != null && { order: input.order }), - }; -}; - -/** - * serializeAws_restJson1SlotTypeValue - */ -const se_SlotTypeValue = (input: SlotTypeValue, context: __SerdeContext): any => { - return { - ...(input.sampleValue != null && { sampleValue: se_SampleValue(input.sampleValue, context) }), - ...(input.synonyms != null && { synonyms: se_SynonymList(input.synonyms, context) }), - }; -}; - -/** - * serializeAws_restJson1SlotTypeValues - */ -const se_SlotTypeValues = (input: SlotTypeValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotTypeValue(entry, context); - }); -}; - -/** - * serializeAws_restJson1SlotValue - */ -const se_SlotValue = (input: SlotValue, context: __SerdeContext): any => { - return { - ...(input.interpretedValue != null && { interpretedValue: input.interpretedValue }), - }; -}; - -/** - * serializeAws_restJson1SlotValueElicitationSetting - */ -const se_SlotValueElicitationSetting = (input: SlotValueElicitationSetting, context: __SerdeContext): any => { - return { - ...(input.defaultValueSpecification != null && { - defaultValueSpecification: se_SlotDefaultValueSpecification(input.defaultValueSpecification, context), - }), - ...(input.promptSpecification != null && { - promptSpecification: se_PromptSpecification(input.promptSpecification, context), - }), - ...(input.sampleUtterances != null && { - sampleUtterances: se_SampleUtterancesList(input.sampleUtterances, context), - }), - ...(input.slotCaptureSetting != null && { - slotCaptureSetting: se_SlotCaptureSetting(input.slotCaptureSetting, context), - }), - ...(input.slotConstraint != null && { slotConstraint: input.slotConstraint }), - ...(input.waitAndContinueSpecification != null && { - waitAndContinueSpecification: se_WaitAndContinueSpecification(input.waitAndContinueSpecification, context), - }), - }; -}; - -/** - * serializeAws_restJson1SlotValueOverride - */ -const se_SlotValueOverride = (input: SlotValueOverride, context: __SerdeContext): any => { - return { - ...(input.shape != null && { shape: input.shape }), - ...(input.value != null && { value: se_SlotValue(input.value, context) }), - ...(input.values != null && { values: se_SlotValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1SlotValueOverrideMap - */ -const se_SlotValueOverrideMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SlotValueOverride(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SlotValueRegexFilter - */ -const se_SlotValueRegexFilter = (input: SlotValueRegexFilter, context: __SerdeContext): any => { - return { - ...(input.pattern != null && { pattern: input.pattern }), - }; -}; - -/** - * serializeAws_restJson1SlotValues - */ -const se_SlotValues = (input: SlotValueOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SlotValueOverride(entry, context); - }); -}; - -/** - * serializeAws_restJson1SlotValueSelectionSetting - */ -const se_SlotValueSelectionSetting = (input: SlotValueSelectionSetting, context: __SerdeContext): any => { - return { - ...(input.advancedRecognitionSetting != null && { - advancedRecognitionSetting: se_AdvancedRecognitionSetting(input.advancedRecognitionSetting, context), - }), - ...(input.regexFilter != null && { regexFilter: se_SlotValueRegexFilter(input.regexFilter, context) }), - ...(input.resolutionStrategy != null && { resolutionStrategy: input.resolutionStrategy }), - }; -}; - -/** - * serializeAws_restJson1Specifications - */ -const se_Specifications = (input: Specifications, context: __SerdeContext): any => { - return { - ...(input.slotTypeId != null && { slotTypeId: input.slotTypeId }), - ...(input.valueElicitationSetting != null && { - valueElicitationSetting: se_SubSlotValueElicitationSetting(input.valueElicitationSetting, context), - }), - }; -}; - -/** - * serializeAws_restJson1SSMLMessage - */ -const se_SSMLMessage = (input: SSMLMessage, context: __SerdeContext): any => { - return { - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_restJson1StillWaitingResponseSpecification - */ -const se_StillWaitingResponseSpecification = ( - input: StillWaitingResponseSpecification, - context: __SerdeContext -): any => { - return { - ...(input.allowInterrupt != null && { allowInterrupt: input.allowInterrupt }), - ...(input.frequencyInSeconds != null && { frequencyInSeconds: input.frequencyInSeconds }), - ...(input.messageGroups != null && { messageGroups: se_MessageGroupsList(input.messageGroups, context) }), - ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }), - }; -}; - -/** - * serializeAws_restJson1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SubSlotSetting - */ -const se_SubSlotSetting = (input: SubSlotSetting, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.slotSpecifications != null && { - slotSpecifications: se_SubSlotSpecificationMap(input.slotSpecifications, context), - }), - }; -}; - -/** - * serializeAws_restJson1SubSlotSpecificationMap - */ -const se_SubSlotSpecificationMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Specifications(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SubSlotTypeComposition - */ -const se_SubSlotTypeComposition = (input: SubSlotTypeComposition, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.slotTypeId != null && { slotTypeId: input.slotTypeId }), - }; -}; - -/** - * serializeAws_restJson1SubSlotTypeList - */ -const se_SubSlotTypeList = (input: SubSlotTypeComposition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SubSlotTypeComposition(entry, context); - }); -}; - -/** - * serializeAws_restJson1SubSlotValueElicitationSetting - */ -const se_SubSlotValueElicitationSetting = (input: SubSlotValueElicitationSetting, context: __SerdeContext): any => { - return { - ...(input.defaultValueSpecification != null && { - defaultValueSpecification: se_SlotDefaultValueSpecification(input.defaultValueSpecification, context), - }), - ...(input.promptSpecification != null && { - promptSpecification: se_PromptSpecification(input.promptSpecification, context), - }), - ...(input.sampleUtterances != null && { - sampleUtterances: se_SampleUtterancesList(input.sampleUtterances, context), - }), - ...(input.waitAndContinueSpecification != null && { - waitAndContinueSpecification: se_WaitAndContinueSpecification(input.waitAndContinueSpecification, context), - }), - }; -}; - -/** - * serializeAws_restJson1SynonymList - */ -const se_SynonymList = (input: SampleValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SampleValue(entry, context); - }); -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TextInputSpecification - */ -const se_TextInputSpecification = (input: TextInputSpecification, context: __SerdeContext): any => { - return { - ...(input.startTimeoutMs != null && { startTimeoutMs: input.startTimeoutMs }), - }; -}; - -/** - * serializeAws_restJson1TextLogDestination - */ -const se_TextLogDestination = (input: TextLogDestination, context: __SerdeContext): any => { - return { - ...(input.cloudWatch != null && { cloudWatch: se_CloudWatchLogGroupLogDestination(input.cloudWatch, context) }), - }; -}; - -/** - * serializeAws_restJson1TextLogSetting - */ -const se_TextLogSetting = (input: TextLogSetting, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: se_TextLogDestination(input.destination, context) }), - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; - -/** - * serializeAws_restJson1TextLogSettingsList - */ -const se_TextLogSettingsList = (input: TextLogSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TextLogSetting(entry, context); - }); -}; - -/** - * serializeAws_restJson1TranscriptFilter - */ -const se_TranscriptFilter = (input: TranscriptFilter, context: __SerdeContext): any => { - return { - ...(input.lexTranscriptFilter != null && { - lexTranscriptFilter: se_LexTranscriptFilter(input.lexTranscriptFilter, context), - }), - }; -}; - -/** - * serializeAws_restJson1TranscriptSourceSetting - */ -const se_TranscriptSourceSetting = (input: TranscriptSourceSetting, context: __SerdeContext): any => { - return { - ...(input.s3BucketTranscriptSource != null && { - s3BucketTranscriptSource: se_S3BucketTranscriptSource(input.s3BucketTranscriptSource, context), - }), - }; -}; - -/** - * serializeAws_restJson1UpdateCustomVocabularyItemsList - */ -const se_UpdateCustomVocabularyItemsList = (input: CustomVocabularyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomVocabularyItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1UtteranceAggregationDuration - */ -const se_UtteranceAggregationDuration = (input: UtteranceAggregationDuration, context: __SerdeContext): any => { - return { - ...(input.relativeAggregationDuration != null && { - relativeAggregationDuration: se_RelativeAggregationDuration(input.relativeAggregationDuration, context), - }), - }; -}; - -/** - * serializeAws_restJson1VoiceSettings - */ -const se_VoiceSettings = (input: VoiceSettings, context: __SerdeContext): any => { - return { - ...(input.engine != null && { engine: input.engine }), - ...(input.voiceId != null && { voiceId: input.voiceId }), - }; -}; - -/** - * serializeAws_restJson1WaitAndContinueSpecification - */ -const se_WaitAndContinueSpecification = (input: WaitAndContinueSpecification, context: __SerdeContext): any => { - return { - ...(input.active != null && { active: input.active }), - ...(input.continueResponse != null && { - continueResponse: se_ResponseSpecification(input.continueResponse, context), - }), - ...(input.stillWaitingResponse != null && { - stillWaitingResponse: se_StillWaitingResponseSpecification(input.stillWaitingResponse, context), - }), - ...(input.waitingResponse != null && { waitingResponse: se_ResponseSpecification(input.waitingResponse, context) }), - }; -}; - -/** - * deserializeAws_restJson1AdvancedRecognitionSetting - */ -const de_AdvancedRecognitionSetting = (output: any, context: __SerdeContext): AdvancedRecognitionSetting => { - return { - audioRecognitionStrategy: __expectString(output.audioRecognitionStrategy), - } as any; -}; - -/** - * deserializeAws_restJson1AggregatedUtterancesSummary - */ -const de_AggregatedUtterancesSummary = (output: any, context: __SerdeContext): AggregatedUtterancesSummary => { - return { - containsDataFromDeletedResources: __expectBoolean(output.containsDataFromDeletedResources), - hitCount: __expectInt32(output.hitCount), - missedCount: __expectInt32(output.missedCount), - utterance: __expectString(output.utterance), - utteranceFirstRecordedInAggregationDuration: - output.utteranceFirstRecordedInAggregationDuration != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.utteranceFirstRecordedInAggregationDuration))) - : undefined, - utteranceLastRecordedInAggregationDuration: - output.utteranceLastRecordedInAggregationDuration != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.utteranceLastRecordedInAggregationDuration))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AggregatedUtterancesSummaryList - */ -const de_AggregatedUtterancesSummaryList = (output: any, context: __SerdeContext): AggregatedUtterancesSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregatedUtterancesSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AllowedInputTypes - */ -const de_AllowedInputTypes = (output: any, context: __SerdeContext): AllowedInputTypes => { - return { - allowAudioInput: __expectBoolean(output.allowAudioInput), - allowDTMFInput: __expectBoolean(output.allowDTMFInput), - } as any; -}; - -/** - * deserializeAws_restJson1AssociatedTranscript - */ -const de_AssociatedTranscript = (output: any, context: __SerdeContext): AssociatedTranscript => { - return { - transcript: __expectString(output.transcript), - } as any; -}; - -/** - * deserializeAws_restJson1AssociatedTranscriptList - */ -const de_AssociatedTranscriptList = (output: any, context: __SerdeContext): AssociatedTranscript[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociatedTranscript(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AudioAndDTMFInputSpecification - */ -const de_AudioAndDTMFInputSpecification = (output: any, context: __SerdeContext): AudioAndDTMFInputSpecification => { - return { - audioSpecification: - output.audioSpecification != null ? de_AudioSpecification(output.audioSpecification, context) : undefined, - dtmfSpecification: - output.dtmfSpecification != null ? de_DTMFSpecification(output.dtmfSpecification, context) : undefined, - startTimeoutMs: __expectInt32(output.startTimeoutMs), - } as any; -}; - -/** - * deserializeAws_restJson1AudioLogDestination - */ -const de_AudioLogDestination = (output: any, context: __SerdeContext): AudioLogDestination => { - return { - s3Bucket: output.s3Bucket != null ? de_S3BucketLogDestination(output.s3Bucket, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AudioLogSetting - */ -const de_AudioLogSetting = (output: any, context: __SerdeContext): AudioLogSetting => { - return { - destination: output.destination != null ? de_AudioLogDestination(output.destination, context) : undefined, - enabled: __expectBoolean(output.enabled), - } as any; -}; - -/** - * deserializeAws_restJson1AudioLogSettingsList - */ -const de_AudioLogSettingsList = (output: any, context: __SerdeContext): AudioLogSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AudioLogSetting(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AudioSpecification - */ -const de_AudioSpecification = (output: any, context: __SerdeContext): AudioSpecification => { - return { - endTimeoutMs: __expectInt32(output.endTimeoutMs), - maxLengthMs: __expectInt32(output.maxLengthMs), - } as any; -}; - -/** - * deserializeAws_restJson1BotAliasHistoryEvent - */ -const de_BotAliasHistoryEvent = (output: any, context: __SerdeContext): BotAliasHistoryEvent => { - return { - botVersion: __expectString(output.botVersion), - endDate: - output.endDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDate))) : undefined, - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotAliasHistoryEventsList - */ -const de_BotAliasHistoryEventsList = (output: any, context: __SerdeContext): BotAliasHistoryEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotAliasHistoryEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BotAliasLocaleSettings - */ -const de_BotAliasLocaleSettings = (output: any, context: __SerdeContext): BotAliasLocaleSettings => { - return { - codeHookSpecification: - output.codeHookSpecification != null - ? de_CodeHookSpecification(output.codeHookSpecification, context) - : undefined, - enabled: __expectBoolean(output.enabled), - } as any; -}; - -/** - * deserializeAws_restJson1BotAliasLocaleSettingsMap - */ -const de_BotAliasLocaleSettingsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_BotAliasLocaleSettings(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1BotAliasSummary - */ -const de_BotAliasSummary = (output: any, context: __SerdeContext): BotAliasSummary => { - return { - botAliasId: __expectString(output.botAliasId), - botAliasName: __expectString(output.botAliasName), - botAliasStatus: __expectString(output.botAliasStatus), - botVersion: __expectString(output.botVersion), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotAliasSummaryList - */ -const de_BotAliasSummaryList = (output: any, context: __SerdeContext): BotAliasSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotAliasSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BotExportSpecification - */ -const de_BotExportSpecification = (output: any, context: __SerdeContext): BotExportSpecification => { - return { - botId: __expectString(output.botId), - botVersion: __expectString(output.botVersion), - } as any; -}; - -/** - * deserializeAws_restJson1BotImportSpecification - */ -const de_BotImportSpecification = (output: any, context: __SerdeContext): BotImportSpecification => { - return { - botName: __expectString(output.botName), - botTags: output.botTags != null ? de_TagMap(output.botTags, context) : undefined, - dataPrivacy: output.dataPrivacy != null ? de_DataPrivacy(output.dataPrivacy, context) : undefined, - idleSessionTTLInSeconds: __expectInt32(output.idleSessionTTLInSeconds), - roleArn: __expectString(output.roleArn), - testBotAliasTags: output.testBotAliasTags != null ? de_TagMap(output.testBotAliasTags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotLocaleExportSpecification - */ -const de_BotLocaleExportSpecification = (output: any, context: __SerdeContext): BotLocaleExportSpecification => { - return { - botId: __expectString(output.botId), - botVersion: __expectString(output.botVersion), - localeId: __expectString(output.localeId), - } as any; -}; - -/** - * deserializeAws_restJson1BotLocaleHistoryEvent - */ -const de_BotLocaleHistoryEvent = (output: any, context: __SerdeContext): BotLocaleHistoryEvent => { - return { - event: __expectString(output.event), - eventDate: - output.eventDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventDate))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotLocaleHistoryEventsList - */ -const de_BotLocaleHistoryEventsList = (output: any, context: __SerdeContext): BotLocaleHistoryEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotLocaleHistoryEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BotLocaleImportSpecification - */ -const de_BotLocaleImportSpecification = (output: any, context: __SerdeContext): BotLocaleImportSpecification => { - return { - botId: __expectString(output.botId), - botVersion: __expectString(output.botVersion), - localeId: __expectString(output.localeId), - nluIntentConfidenceThreshold: __limitedParseDouble(output.nluIntentConfidenceThreshold), - voiceSettings: output.voiceSettings != null ? de_VoiceSettings(output.voiceSettings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotLocaleSummary - */ -const de_BotLocaleSummary = (output: any, context: __SerdeContext): BotLocaleSummary => { - return { - botLocaleStatus: __expectString(output.botLocaleStatus), - description: __expectString(output.description), - lastBuildSubmittedDateTime: - output.lastBuildSubmittedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastBuildSubmittedDateTime))) - : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - localeId: __expectString(output.localeId), - localeName: __expectString(output.localeName), - } as any; -}; - -/** - * deserializeAws_restJson1BotLocaleSummaryList - */ -const de_BotLocaleSummaryList = (output: any, context: __SerdeContext): BotLocaleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotLocaleSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BotMember - */ -const de_BotMember = (output: any, context: __SerdeContext): BotMember => { - return { - botMemberAliasId: __expectString(output.botMemberAliasId), - botMemberAliasName: __expectString(output.botMemberAliasName), - botMemberId: __expectString(output.botMemberId), - botMemberName: __expectString(output.botMemberName), - botMemberVersion: __expectString(output.botMemberVersion), - } as any; -}; - -/** - * deserializeAws_restJson1BotMembers - */ -const de_BotMembers = (output: any, context: __SerdeContext): BotMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotMember(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BotRecommendationResults - */ -const de_BotRecommendationResults = (output: any, context: __SerdeContext): BotRecommendationResults => { - return { - associatedTranscriptsUrl: __expectString(output.associatedTranscriptsUrl), - botLocaleExportUrl: __expectString(output.botLocaleExportUrl), - statistics: - output.statistics != null ? de_BotRecommendationResultStatistics(output.statistics, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotRecommendationResultStatistics - */ -const de_BotRecommendationResultStatistics = ( - output: any, - context: __SerdeContext -): BotRecommendationResultStatistics => { - return { - intents: output.intents != null ? de_IntentStatistics(output.intents, context) : undefined, - slotTypes: output.slotTypes != null ? de_SlotTypeStatistics(output.slotTypes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotRecommendationSummary - */ -const de_BotRecommendationSummary = (output: any, context: __SerdeContext): BotRecommendationSummary => { - return { - botRecommendationId: __expectString(output.botRecommendationId), - botRecommendationStatus: __expectString(output.botRecommendationStatus), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BotRecommendationSummaryList - */ -const de_BotRecommendationSummaryList = (output: any, context: __SerdeContext): BotRecommendationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotRecommendationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BotSummary - */ -const de_BotSummary = (output: any, context: __SerdeContext): BotSummary => { - return { - botId: __expectString(output.botId), - botName: __expectString(output.botName), - botStatus: __expectString(output.botStatus), - botType: __expectString(output.botType), - description: __expectString(output.description), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - latestBotVersion: __expectString(output.latestBotVersion), - } as any; -}; - -/** - * deserializeAws_restJson1BotSummaryList - */ -const de_BotSummaryList = (output: any, context: __SerdeContext): BotSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotSummary(entry, context); - }); - return retVal; -}; +// se_SampleUtterance omitted. -/** - * deserializeAws_restJson1BotVersionLocaleDetails - */ -const de_BotVersionLocaleDetails = (output: any, context: __SerdeContext): BotVersionLocaleDetails => { - return { - sourceBotVersion: __expectString(output.sourceBotVersion), - } as any; -}; +// se_SampleUtterancesList omitted. -/** - * deserializeAws_restJson1BotVersionLocaleSpecification - */ -const de_BotVersionLocaleSpecification = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_BotVersionLocaleDetails(value, context); - return acc; - }, {}); -}; +// se_SampleValue omitted. -/** - * deserializeAws_restJson1BotVersionSummary - */ -const de_BotVersionSummary = (output: any, context: __SerdeContext): BotVersionSummary => { - return { - botName: __expectString(output.botName), - botStatus: __expectString(output.botStatus), - botVersion: __expectString(output.botVersion), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - } as any; -}; +// se_SentimentAnalysisSettings omitted. /** - * deserializeAws_restJson1BotVersionSummaryList + * serializeAws_restJson1SlotCaptureSetting */ -const de_BotVersionSummaryList = (output: any, context: __SerdeContext): BotVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BotVersionSummary(entry, context); - }); - return retVal; +const se_SlotCaptureSetting = (input: SlotCaptureSetting, context: __SerdeContext): any => { + return take(input, { + captureConditional: (_) => se_ConditionalSpecification(_, context), + captureNextStep: (_) => se_DialogState(_, context), + captureResponse: _json, + codeHook: (_) => se_DialogCodeHookInvocationSetting(_, context), + elicitationCodeHook: _json, + failureConditional: (_) => se_ConditionalSpecification(_, context), + failureNextStep: (_) => se_DialogState(_, context), + failureResponse: _json, + }); }; -/** - * deserializeAws_restJson1BuiltInIntentSummary - */ -const de_BuiltInIntentSummary = (output: any, context: __SerdeContext): BuiltInIntentSummary => { - return { - description: __expectString(output.description), - intentSignature: __expectString(output.intentSignature), - } as any; -}; +// se_SlotDefaultValue omitted. -/** - * deserializeAws_restJson1BuiltInIntentSummaryList - */ -const de_BuiltInIntentSummaryList = (output: any, context: __SerdeContext): BuiltInIntentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuiltInIntentSummary(entry, context); - }); - return retVal; -}; +// se_SlotDefaultValueList omitted. -/** - * deserializeAws_restJson1BuiltInSlotTypeSummary - */ -const de_BuiltInSlotTypeSummary = (output: any, context: __SerdeContext): BuiltInSlotTypeSummary => { - return { - description: __expectString(output.description), - slotTypeSignature: __expectString(output.slotTypeSignature), - } as any; -}; +// se_SlotDefaultValueSpecification omitted. -/** - * deserializeAws_restJson1BuiltInSlotTypeSummaryList - */ -const de_BuiltInSlotTypeSummaryList = (output: any, context: __SerdeContext): BuiltInSlotTypeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BuiltInSlotTypeSummary(entry, context); - }); - return retVal; -}; +// se_SlotFilter omitted. -/** - * deserializeAws_restJson1Button - */ -const de_Button = (output: any, context: __SerdeContext): Button => { - return { - text: __expectString(output.text), - value: __expectString(output.value), - } as any; -}; +// se_SlotFilters omitted. -/** - * deserializeAws_restJson1ButtonsList - */ -const de_ButtonsList = (output: any, context: __SerdeContext): Button[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Button(entry, context); - }); - return retVal; -}; +// se_SlotPrioritiesList omitted. -/** - * deserializeAws_restJson1CloudWatchLogGroupLogDestination - */ -const de_CloudWatchLogGroupLogDestination = ( - output: any, - context: __SerdeContext -): CloudWatchLogGroupLogDestination => { - return { - cloudWatchLogGroupArn: __expectString(output.cloudWatchLogGroupArn), - logPrefix: __expectString(output.logPrefix), - } as any; -}; +// se_SlotPriority omitted. -/** - * deserializeAws_restJson1CodeHookSpecification - */ -const de_CodeHookSpecification = (output: any, context: __SerdeContext): CodeHookSpecification => { - return { - lambdaCodeHook: output.lambdaCodeHook != null ? de_LambdaCodeHook(output.lambdaCodeHook, context) : undefined, - } as any; -}; +// se_SlotSortBy omitted. -/** - * deserializeAws_restJson1CompositeSlotTypeSetting - */ -const de_CompositeSlotTypeSetting = (output: any, context: __SerdeContext): CompositeSlotTypeSetting => { - return { - subSlots: output.subSlots != null ? de_SubSlotTypeList(output.subSlots, context) : undefined, - } as any; -}; +// se_SlotTypeFilter omitted. -/** - * deserializeAws_restJson1Condition - */ -const de_Condition = (output: any, context: __SerdeContext): Condition => { - return { - expressionString: __expectString(output.expressionString), - } as any; -}; +// se_SlotTypeFilters omitted. -/** - * deserializeAws_restJson1ConditionalBranch - */ -const de_ConditionalBranch = (output: any, context: __SerdeContext): ConditionalBranch => { - return { - condition: output.condition != null ? de_Condition(output.condition, context) : undefined, - name: __expectString(output.name), - nextStep: output.nextStep != null ? de_DialogState(output.nextStep, context) : undefined, - response: output.response != null ? de_ResponseSpecification(output.response, context) : undefined, - } as any; -}; +// se_SlotTypeSortBy omitted. -/** - * deserializeAws_restJson1ConditionalBranches - */ -const de_ConditionalBranches = (output: any, context: __SerdeContext): ConditionalBranch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConditionalBranch(entry, context); - }); - return retVal; -}; +// se_SlotTypeValue omitted. -/** - * deserializeAws_restJson1ConditionalSpecification - */ -const de_ConditionalSpecification = (output: any, context: __SerdeContext): ConditionalSpecification => { - return { - active: __expectBoolean(output.active), - conditionalBranches: - output.conditionalBranches != null ? de_ConditionalBranches(output.conditionalBranches, context) : undefined, - defaultBranch: - output.defaultBranch != null ? de_DefaultConditionalBranch(output.defaultBranch, context) : undefined, - } as any; -}; +// se_SlotTypeValues omitted. -/** - * deserializeAws_restJson1ConversationLogSettings - */ -const de_ConversationLogSettings = (output: any, context: __SerdeContext): ConversationLogSettings => { - return { - audioLogSettings: - output.audioLogSettings != null ? de_AudioLogSettingsList(output.audioLogSettings, context) : undefined, - textLogSettings: - output.textLogSettings != null ? de_TextLogSettingsList(output.textLogSettings, context) : undefined, - } as any; -}; +// se_SlotValue omitted. /** - * deserializeAws_restJson1CustomPayload + * serializeAws_restJson1SlotValueElicitationSetting */ -const de_CustomPayload = (output: any, context: __SerdeContext): CustomPayload => { - return { - value: __expectString(output.value), - } as any; +const se_SlotValueElicitationSetting = (input: SlotValueElicitationSetting, context: __SerdeContext): any => { + return take(input, { + defaultValueSpecification: _json, + promptSpecification: _json, + sampleUtterances: _json, + slotCaptureSetting: (_) => se_SlotCaptureSetting(_, context), + slotConstraint: [], + waitAndContinueSpecification: _json, + }); }; /** - * deserializeAws_restJson1CustomVocabularyExportSpecification + * serializeAws_restJson1SlotValueOverride */ -const de_CustomVocabularyExportSpecification = ( - output: any, - context: __SerdeContext -): CustomVocabularyExportSpecification => { - return { - botId: __expectString(output.botId), - botVersion: __expectString(output.botVersion), - localeId: __expectString(output.localeId), - } as any; +const se_SlotValueOverride = (input: SlotValueOverride, context: __SerdeContext): any => { + return take(input, { + shape: [], + value: _json, + values: (_) => se_SlotValues(_, context), + }); }; /** - * deserializeAws_restJson1CustomVocabularyImportSpecification + * serializeAws_restJson1SlotValueOverrideMap */ -const de_CustomVocabularyImportSpecification = ( - output: any, - context: __SerdeContext -): CustomVocabularyImportSpecification => { - return { - botId: __expectString(output.botId), - botVersion: __expectString(output.botVersion), - localeId: __expectString(output.localeId), - } as any; +const se_SlotValueOverrideMap = (input: Record, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_SlotValueOverride(value, context); + return acc; + }, {}); }; -/** - * deserializeAws_restJson1CustomVocabularyItem - */ -const de_CustomVocabularyItem = (output: any, context: __SerdeContext): CustomVocabularyItem => { - return { - displayAs: __expectString(output.displayAs), - itemId: __expectString(output.itemId), - phrase: __expectString(output.phrase), - weight: __expectInt32(output.weight), - } as any; -}; +// se_SlotValueRegexFilter omitted. /** - * deserializeAws_restJson1CustomVocabularyItems + * serializeAws_restJson1SlotValues */ -const de_CustomVocabularyItems = (output: any, context: __SerdeContext): CustomVocabularyItem[] => { - const retVal = (output || []) +const se_SlotValues = (input: SlotValueOverride[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomVocabularyItem(entry, context); + .map((entry) => { + return se_SlotValueOverride(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1DataPrivacy - */ -const de_DataPrivacy = (output: any, context: __SerdeContext): DataPrivacy => { - return { - childDirected: __expectBoolean(output.childDirected), - } as any; -}; +// se_SlotValueSelectionSetting omitted. /** - * deserializeAws_restJson1DateRangeFilter + * serializeAws_restJson1Specifications */ -const de_DateRangeFilter = (output: any, context: __SerdeContext): DateRangeFilter => { - return { - endDateTime: - output.endDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endDateTime))) - : undefined, - startDateTime: - output.startDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDateTime))) - : undefined, - } as any; +const se_Specifications = (input: Specifications, context: __SerdeContext): any => { + return take(input, { + slotTypeId: [], + valueElicitationSetting: _json, + }); }; -/** - * deserializeAws_restJson1DefaultConditionalBranch - */ -const de_DefaultConditionalBranch = (output: any, context: __SerdeContext): DefaultConditionalBranch => { - return { - nextStep: output.nextStep != null ? de_DialogState(output.nextStep, context) : undefined, - response: output.response != null ? de_ResponseSpecification(output.response, context) : undefined, - } as any; -}; +// se_SSMLMessage omitted. -/** - * deserializeAws_restJson1DialogAction - */ -const de_DialogAction = (output: any, context: __SerdeContext): DialogAction => { - return { - slotToElicit: __expectString(output.slotToElicit), - suppressNextMessage: __expectBoolean(output.suppressNextMessage), - type: __expectString(output.type), - } as any; -}; +// se_StillWaitingResponseSpecification omitted. -/** - * deserializeAws_restJson1DialogCodeHookInvocationSetting - */ -const de_DialogCodeHookInvocationSetting = (output: any, context: __SerdeContext): DialogCodeHookInvocationSetting => { - return { - active: __expectBoolean(output.active), - enableCodeHookInvocation: __expectBoolean(output.enableCodeHookInvocation), - invocationLabel: __expectString(output.invocationLabel), - postCodeHookSpecification: - output.postCodeHookSpecification != null - ? de_PostDialogCodeHookInvocationSpecification(output.postCodeHookSpecification, context) - : undefined, - } as any; -}; +// se_StringMap omitted. /** - * deserializeAws_restJson1DialogCodeHookSettings + * serializeAws_restJson1SubSlotSetting */ -const de_DialogCodeHookSettings = (output: any, context: __SerdeContext): DialogCodeHookSettings => { - return { - enabled: __expectBoolean(output.enabled), - } as any; +const se_SubSlotSetting = (input: SubSlotSetting, context: __SerdeContext): any => { + return take(input, { + expression: [], + slotSpecifications: (_) => se_SubSlotSpecificationMap(_, context), + }); }; /** - * deserializeAws_restJson1DialogState + * serializeAws_restJson1SubSlotSpecificationMap */ -const de_DialogState = (output: any, context: __SerdeContext): DialogState => { - return { - dialogAction: output.dialogAction != null ? de_DialogAction(output.dialogAction, context) : undefined, - intent: output.intent != null ? de_IntentOverride(output.intent, context) : undefined, - sessionAttributes: output.sessionAttributes != null ? de_StringMap(output.sessionAttributes, context) : undefined, - } as any; +const se_SubSlotSpecificationMap = (input: Record, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_Specifications(value, context); + return acc; + }, {}); }; +// se_SubSlotTypeComposition omitted. + +// se_SubSlotTypeList omitted. + +// se_SubSlotValueElicitationSetting omitted. + +// se_SynonymList omitted. + +// se_TagMap omitted. + +// se_TextInputSpecification omitted. + +// se_TextLogDestination omitted. + +// se_TextLogSetting omitted. + +// se_TextLogSettingsList omitted. + /** - * deserializeAws_restJson1DTMFSpecification + * serializeAws_restJson1TranscriptFilter */ -const de_DTMFSpecification = (output: any, context: __SerdeContext): DTMFSpecification => { - return { - deletionCharacter: __expectString(output.deletionCharacter), - endCharacter: __expectString(output.endCharacter), - endTimeoutMs: __expectInt32(output.endTimeoutMs), - maxLength: __expectInt32(output.maxLength), - } as any; +const se_TranscriptFilter = (input: TranscriptFilter, context: __SerdeContext): any => { + return take(input, { + lexTranscriptFilter: (_) => se_LexTranscriptFilter(_, context), + }); }; /** - * deserializeAws_restJson1ElicitationCodeHookInvocationSetting + * serializeAws_restJson1TranscriptSourceSetting */ -const de_ElicitationCodeHookInvocationSetting = ( - output: any, - context: __SerdeContext -): ElicitationCodeHookInvocationSetting => { - return { - enableCodeHookInvocation: __expectBoolean(output.enableCodeHookInvocation), - invocationLabel: __expectString(output.invocationLabel), - } as any; +const se_TranscriptSourceSetting = (input: TranscriptSourceSetting, context: __SerdeContext): any => { + return take(input, { + s3BucketTranscriptSource: (_) => se_S3BucketTranscriptSource(_, context), + }); }; +// se_UpdateCustomVocabularyItemsList omitted. + +// se_UtteranceAggregationDuration omitted. + +// se_VoiceSettings omitted. + +// se_WaitAndContinueSpecification omitted. + +// de_AdvancedRecognitionSetting omitted. + /** - * deserializeAws_restJson1EncryptionSetting + * deserializeAws_restJson1AggregatedUtterancesSummary */ -const de_EncryptionSetting = (output: any, context: __SerdeContext): EncryptionSetting => { - return { - associatedTranscriptsPassword: __expectString(output.associatedTranscriptsPassword), - botLocaleExportPassword: __expectString(output.botLocaleExportPassword), - kmsKeyArn: __expectString(output.kmsKeyArn), - } as any; +const de_AggregatedUtterancesSummary = (output: any, context: __SerdeContext): AggregatedUtterancesSummary => { + return take(output, { + containsDataFromDeletedResources: __expectBoolean, + hitCount: __expectInt32, + missedCount: __expectInt32, + utterance: __expectString, + utteranceFirstRecordedInAggregationDuration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + utteranceLastRecordedInAggregationDuration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1ExportResourceSpecification + * deserializeAws_restJson1AggregatedUtterancesSummaryList */ -const de_ExportResourceSpecification = (output: any, context: __SerdeContext): ExportResourceSpecification => { - return { - botExportSpecification: - output.botExportSpecification != null - ? de_BotExportSpecification(output.botExportSpecification, context) - : undefined, - botLocaleExportSpecification: - output.botLocaleExportSpecification != null - ? de_BotLocaleExportSpecification(output.botLocaleExportSpecification, context) - : undefined, - customVocabularyExportSpecification: - output.customVocabularyExportSpecification != null - ? de_CustomVocabularyExportSpecification(output.customVocabularyExportSpecification, context) - : undefined, - } as any; +const de_AggregatedUtterancesSummaryList = (output: any, context: __SerdeContext): AggregatedUtterancesSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AggregatedUtterancesSummary(entry, context); + }); + return retVal; }; +// de_AllowedInputTypes omitted. + +// de_AssociatedTranscript omitted. + +// de_AssociatedTranscriptList omitted. + +// de_AudioAndDTMFInputSpecification omitted. + +// de_AudioLogDestination omitted. + +// de_AudioLogSetting omitted. + +// de_AudioLogSettingsList omitted. + +// de_AudioSpecification omitted. + /** - * deserializeAws_restJson1ExportSummary + * deserializeAws_restJson1BotAliasHistoryEvent */ -const de_ExportSummary = (output: any, context: __SerdeContext): ExportSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - exportId: __expectString(output.exportId), - exportStatus: __expectString(output.exportStatus), - fileFormat: __expectString(output.fileFormat), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - resourceSpecification: - output.resourceSpecification != null - ? de_ExportResourceSpecification(output.resourceSpecification, context) - : undefined, - } as any; +const de_BotAliasHistoryEvent = (output: any, context: __SerdeContext): BotAliasHistoryEvent => { + return take(output, { + botVersion: __expectString, + endDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1ExportSummaryList + * deserializeAws_restJson1BotAliasHistoryEventsList */ -const de_ExportSummaryList = (output: any, context: __SerdeContext): ExportSummary[] => { +const de_BotAliasHistoryEventsList = (output: any, context: __SerdeContext): BotAliasHistoryEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportSummary(entry, context); + return de_BotAliasHistoryEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExternalSourceSetting - */ -const de_ExternalSourceSetting = (output: any, context: __SerdeContext): ExternalSourceSetting => { - return { - grammarSlotTypeSetting: - output.grammarSlotTypeSetting != null - ? de_GrammarSlotTypeSetting(output.grammarSlotTypeSetting, context) - : undefined, - } as any; -}; +// de_BotAliasLocaleSettings omitted. + +// de_BotAliasLocaleSettingsMap omitted. /** - * deserializeAws_restJson1FailedCustomVocabularyItem + * deserializeAws_restJson1BotAliasSummary */ -const de_FailedCustomVocabularyItem = (output: any, context: __SerdeContext): FailedCustomVocabularyItem => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - itemId: __expectString(output.itemId), - } as any; +const de_BotAliasSummary = (output: any, context: __SerdeContext): BotAliasSummary => { + return take(output, { + botAliasId: __expectString, + botAliasName: __expectString, + botAliasStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1FailedCustomVocabularyItems + * deserializeAws_restJson1BotAliasSummaryList */ -const de_FailedCustomVocabularyItems = (output: any, context: __SerdeContext): FailedCustomVocabularyItem[] => { +const de_BotAliasSummaryList = (output: any, context: __SerdeContext): BotAliasSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedCustomVocabularyItem(entry, context); + return de_BotAliasSummary(entry, context); }); return retVal; }; +// de_BotExportSpecification omitted. + +// de_BotImportSpecification omitted. + +// de_BotLocaleExportSpecification omitted. + +/** + * deserializeAws_restJson1BotLocaleHistoryEvent + */ +const de_BotLocaleHistoryEvent = (output: any, context: __SerdeContext): BotLocaleHistoryEvent => { + return take(output, { + event: __expectString, + eventDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + /** - * deserializeAws_restJson1FailureReasons + * deserializeAws_restJson1BotLocaleHistoryEventsList */ -const de_FailureReasons = (output: any, context: __SerdeContext): string[] => { +const de_BotLocaleHistoryEventsList = (output: any, context: __SerdeContext): BotLocaleHistoryEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_BotLocaleHistoryEvent(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1FulfillmentCodeHookSettings + * deserializeAws_restJson1BotLocaleImportSpecification */ -const de_FulfillmentCodeHookSettings = (output: any, context: __SerdeContext): FulfillmentCodeHookSettings => { - return { - active: __expectBoolean(output.active), - enabled: __expectBoolean(output.enabled), - fulfillmentUpdatesSpecification: - output.fulfillmentUpdatesSpecification != null - ? de_FulfillmentUpdatesSpecification(output.fulfillmentUpdatesSpecification, context) - : undefined, - postFulfillmentStatusSpecification: - output.postFulfillmentStatusSpecification != null - ? de_PostFulfillmentStatusSpecification(output.postFulfillmentStatusSpecification, context) - : undefined, - } as any; +const de_BotLocaleImportSpecification = (output: any, context: __SerdeContext): BotLocaleImportSpecification => { + return take(output, { + botId: __expectString, + botVersion: __expectString, + localeId: __expectString, + nluIntentConfidenceThreshold: __limitedParseDouble, + voiceSettings: _json, + }) as any; }; /** - * deserializeAws_restJson1FulfillmentStartResponseSpecification + * deserializeAws_restJson1BotLocaleSummary */ -const de_FulfillmentStartResponseSpecification = ( - output: any, - context: __SerdeContext -): FulfillmentStartResponseSpecification => { - return { - allowInterrupt: __expectBoolean(output.allowInterrupt), - delayInSeconds: __expectInt32(output.delayInSeconds), - messageGroups: output.messageGroups != null ? de_MessageGroupsList(output.messageGroups, context) : undefined, - } as any; +const de_BotLocaleSummary = (output: any, context: __SerdeContext): BotLocaleSummary => { + return take(output, { + botLocaleStatus: __expectString, + description: __expectString, + lastBuildSubmittedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + localeId: __expectString, + localeName: __expectString, + }) as any; }; /** - * deserializeAws_restJson1FulfillmentUpdateResponseSpecification + * deserializeAws_restJson1BotLocaleSummaryList */ -const de_FulfillmentUpdateResponseSpecification = ( - output: any, - context: __SerdeContext -): FulfillmentUpdateResponseSpecification => { - return { - allowInterrupt: __expectBoolean(output.allowInterrupt), - frequencyInSeconds: __expectInt32(output.frequencyInSeconds), - messageGroups: output.messageGroups != null ? de_MessageGroupsList(output.messageGroups, context) : undefined, - } as any; +const de_BotLocaleSummaryList = (output: any, context: __SerdeContext): BotLocaleSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_BotLocaleSummary(entry, context); + }); + return retVal; }; -/** - * deserializeAws_restJson1FulfillmentUpdatesSpecification - */ -const de_FulfillmentUpdatesSpecification = (output: any, context: __SerdeContext): FulfillmentUpdatesSpecification => { - return { - active: __expectBoolean(output.active), - startResponse: - output.startResponse != null - ? de_FulfillmentStartResponseSpecification(output.startResponse, context) - : undefined, - timeoutInSeconds: __expectInt32(output.timeoutInSeconds), - updateResponse: - output.updateResponse != null - ? de_FulfillmentUpdateResponseSpecification(output.updateResponse, context) - : undefined, - } as any; -}; +// de_BotMember omitted. + +// de_BotMembers omitted. + +// de_BotRecommendationResults omitted. + +// de_BotRecommendationResultStatistics omitted. /** - * deserializeAws_restJson1GrammarSlotTypeSetting + * deserializeAws_restJson1BotRecommendationSummary */ -const de_GrammarSlotTypeSetting = (output: any, context: __SerdeContext): GrammarSlotTypeSetting => { - return { - source: output.source != null ? de_GrammarSlotTypeSource(output.source, context) : undefined, - } as any; +const de_BotRecommendationSummary = (output: any, context: __SerdeContext): BotRecommendationSummary => { + return take(output, { + botRecommendationId: __expectString, + botRecommendationStatus: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1GrammarSlotTypeSource + * deserializeAws_restJson1BotRecommendationSummaryList */ -const de_GrammarSlotTypeSource = (output: any, context: __SerdeContext): GrammarSlotTypeSource => { - return { - kmsKeyArn: __expectString(output.kmsKeyArn), - s3BucketName: __expectString(output.s3BucketName), - s3ObjectKey: __expectString(output.s3ObjectKey), - } as any; +const de_BotRecommendationSummaryList = (output: any, context: __SerdeContext): BotRecommendationSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_BotRecommendationSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1ImageResponseCard + * deserializeAws_restJson1BotSummary */ -const de_ImageResponseCard = (output: any, context: __SerdeContext): ImageResponseCard => { - return { - buttons: output.buttons != null ? de_ButtonsList(output.buttons, context) : undefined, - imageUrl: __expectString(output.imageUrl), - subtitle: __expectString(output.subtitle), - title: __expectString(output.title), - } as any; +const de_BotSummary = (output: any, context: __SerdeContext): BotSummary => { + return take(output, { + botId: __expectString, + botName: __expectString, + botStatus: __expectString, + botType: __expectString, + description: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestBotVersion: __expectString, + }) as any; }; /** - * deserializeAws_restJson1ImportResourceSpecification + * deserializeAws_restJson1BotSummaryList */ -const de_ImportResourceSpecification = (output: any, context: __SerdeContext): ImportResourceSpecification => { - return { - botImportSpecification: - output.botImportSpecification != null - ? de_BotImportSpecification(output.botImportSpecification, context) - : undefined, - botLocaleImportSpecification: - output.botLocaleImportSpecification != null - ? de_BotLocaleImportSpecification(output.botLocaleImportSpecification, context) - : undefined, - customVocabularyImportSpecification: - output.customVocabularyImportSpecification != null - ? de_CustomVocabularyImportSpecification(output.customVocabularyImportSpecification, context) - : undefined, - } as any; +const de_BotSummaryList = (output: any, context: __SerdeContext): BotSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_BotSummary(entry, context); + }); + return retVal; }; +// de_BotVersionLocaleDetails omitted. + +// de_BotVersionLocaleSpecification omitted. + /** - * deserializeAws_restJson1ImportSummary + * deserializeAws_restJson1BotVersionSummary */ -const de_ImportSummary = (output: any, context: __SerdeContext): ImportSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - importId: __expectString(output.importId), - importStatus: __expectString(output.importStatus), - importedResourceId: __expectString(output.importedResourceId), - importedResourceName: __expectString(output.importedResourceName), - importedResourceType: __expectString(output.importedResourceType), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - mergeStrategy: __expectString(output.mergeStrategy), - } as any; +const de_BotVersionSummary = (output: any, context: __SerdeContext): BotVersionSummary => { + return take(output, { + botName: __expectString, + botStatus: __expectString, + botVersion: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + }) as any; }; /** - * deserializeAws_restJson1ImportSummaryList + * deserializeAws_restJson1BotVersionSummaryList */ -const de_ImportSummaryList = (output: any, context: __SerdeContext): ImportSummary[] => { +const de_BotVersionSummaryList = (output: any, context: __SerdeContext): BotVersionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportSummary(entry, context); + return de_BotVersionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InitialResponseSetting - */ -const de_InitialResponseSetting = (output: any, context: __SerdeContext): InitialResponseSetting => { - return { - codeHook: output.codeHook != null ? de_DialogCodeHookInvocationSetting(output.codeHook, context) : undefined, - conditional: output.conditional != null ? de_ConditionalSpecification(output.conditional, context) : undefined, - initialResponse: - output.initialResponse != null ? de_ResponseSpecification(output.initialResponse, context) : undefined, - nextStep: output.nextStep != null ? de_DialogState(output.nextStep, context) : undefined, - } as any; -}; +// de_BuiltInIntentSummary omitted. + +// de_BuiltInIntentSummaryList omitted. + +// de_BuiltInSlotTypeSummary omitted. + +// de_BuiltInSlotTypeSummaryList omitted. + +// de_Button omitted. + +// de_ButtonsList omitted. + +// de_CloudWatchLogGroupLogDestination omitted. + +// de_CodeHookSpecification omitted. + +// de_CompositeSlotTypeSetting omitted. + +// de_Condition omitted. /** - * deserializeAws_restJson1InputContext + * deserializeAws_restJson1ConditionalBranch */ -const de_InputContext = (output: any, context: __SerdeContext): InputContext => { - return { - name: __expectString(output.name), - } as any; +const de_ConditionalBranch = (output: any, context: __SerdeContext): ConditionalBranch => { + return take(output, { + condition: _json, + name: __expectString, + nextStep: (_: any) => de_DialogState(_, context), + response: _json, + }) as any; }; /** - * deserializeAws_restJson1InputContextsList + * deserializeAws_restJson1ConditionalBranches */ -const de_InputContextsList = (output: any, context: __SerdeContext): InputContext[] => { +const de_ConditionalBranches = (output: any, context: __SerdeContext): ConditionalBranch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputContext(entry, context); + return de_ConditionalBranch(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1IntentClosingSetting + * deserializeAws_restJson1ConditionalSpecification */ -const de_IntentClosingSetting = (output: any, context: __SerdeContext): IntentClosingSetting => { - return { - active: __expectBoolean(output.active), - closingResponse: - output.closingResponse != null ? de_ResponseSpecification(output.closingResponse, context) : undefined, - conditional: output.conditional != null ? de_ConditionalSpecification(output.conditional, context) : undefined, - nextStep: output.nextStep != null ? de_DialogState(output.nextStep, context) : undefined, - } as any; +const de_ConditionalSpecification = (output: any, context: __SerdeContext): ConditionalSpecification => { + return take(output, { + active: __expectBoolean, + conditionalBranches: (_: any) => de_ConditionalBranches(_, context), + defaultBranch: (_: any) => de_DefaultConditionalBranch(_, context), + }) as any; +}; + +// de_ConversationLogSettings omitted. + +// de_CustomPayload omitted. + +// de_CustomVocabularyExportSpecification omitted. + +// de_CustomVocabularyImportSpecification omitted. + +// de_CustomVocabularyItem omitted. + +// de_CustomVocabularyItems omitted. + +// de_DataPrivacy omitted. + +/** + * deserializeAws_restJson1DateRangeFilter + */ +const de_DateRangeFilter = (output: any, context: __SerdeContext): DateRangeFilter => { + return take(output, { + endDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1IntentConfirmationSetting + * deserializeAws_restJson1DefaultConditionalBranch */ -const de_IntentConfirmationSetting = (output: any, context: __SerdeContext): IntentConfirmationSetting => { - return { - active: __expectBoolean(output.active), - codeHook: output.codeHook != null ? de_DialogCodeHookInvocationSetting(output.codeHook, context) : undefined, - confirmationConditional: - output.confirmationConditional != null - ? de_ConditionalSpecification(output.confirmationConditional, context) - : undefined, - confirmationNextStep: - output.confirmationNextStep != null ? de_DialogState(output.confirmationNextStep, context) : undefined, - confirmationResponse: - output.confirmationResponse != null ? de_ResponseSpecification(output.confirmationResponse, context) : undefined, - declinationConditional: - output.declinationConditional != null - ? de_ConditionalSpecification(output.declinationConditional, context) - : undefined, - declinationNextStep: - output.declinationNextStep != null ? de_DialogState(output.declinationNextStep, context) : undefined, - declinationResponse: - output.declinationResponse != null ? de_ResponseSpecification(output.declinationResponse, context) : undefined, - elicitationCodeHook: - output.elicitationCodeHook != null - ? de_ElicitationCodeHookInvocationSetting(output.elicitationCodeHook, context) - : undefined, - failureConditional: - output.failureConditional != null ? de_ConditionalSpecification(output.failureConditional, context) : undefined, - failureNextStep: output.failureNextStep != null ? de_DialogState(output.failureNextStep, context) : undefined, - failureResponse: - output.failureResponse != null ? de_ResponseSpecification(output.failureResponse, context) : undefined, - promptSpecification: - output.promptSpecification != null ? de_PromptSpecification(output.promptSpecification, context) : undefined, - } as any; +const de_DefaultConditionalBranch = (output: any, context: __SerdeContext): DefaultConditionalBranch => { + return take(output, { + nextStep: (_: any) => de_DialogState(_, context), + response: _json, + }) as any; }; +// de_DialogAction omitted. + /** - * deserializeAws_restJson1IntentOverride + * deserializeAws_restJson1DialogCodeHookInvocationSetting */ -const de_IntentOverride = (output: any, context: __SerdeContext): IntentOverride => { - return { - name: __expectString(output.name), - slots: output.slots != null ? de_SlotValueOverrideMap(output.slots, context) : undefined, - } as any; +const de_DialogCodeHookInvocationSetting = (output: any, context: __SerdeContext): DialogCodeHookInvocationSetting => { + return take(output, { + active: __expectBoolean, + enableCodeHookInvocation: __expectBoolean, + invocationLabel: __expectString, + postCodeHookSpecification: (_: any) => de_PostDialogCodeHookInvocationSpecification(_, context), + }) as any; }; +// de_DialogCodeHookSettings omitted. + /** - * deserializeAws_restJson1IntentStatistics + * deserializeAws_restJson1DialogState */ -const de_IntentStatistics = (output: any, context: __SerdeContext): IntentStatistics => { - return { - discoveredIntentCount: __expectInt32(output.discoveredIntentCount), - } as any; +const de_DialogState = (output: any, context: __SerdeContext): DialogState => { + return take(output, { + dialogAction: _json, + intent: (_: any) => de_IntentOverride(_, context), + sessionAttributes: _json, + }) as any; }; +// de_DTMFSpecification omitted. + +// de_ElicitationCodeHookInvocationSetting omitted. + +// de_EncryptionSetting omitted. + +// de_ExportResourceSpecification omitted. + /** - * deserializeAws_restJson1IntentSummary + * deserializeAws_restJson1ExportSummary */ -const de_IntentSummary = (output: any, context: __SerdeContext): IntentSummary => { - return { - description: __expectString(output.description), - inputContexts: output.inputContexts != null ? de_InputContextsList(output.inputContexts, context) : undefined, - intentId: __expectString(output.intentId), - intentName: __expectString(output.intentName), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - outputContexts: output.outputContexts != null ? de_OutputContextsList(output.outputContexts, context) : undefined, - parentIntentSignature: __expectString(output.parentIntentSignature), - } as any; +const de_ExportSummary = (output: any, context: __SerdeContext): ExportSummary => { + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + exportId: __expectString, + exportStatus: __expectString, + fileFormat: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceSpecification: _json, + }) as any; }; /** - * deserializeAws_restJson1IntentSummaryList + * deserializeAws_restJson1ExportSummaryList */ -const de_IntentSummaryList = (output: any, context: __SerdeContext): IntentSummary[] => { +const de_ExportSummaryList = (output: any, context: __SerdeContext): ExportSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IntentSummary(entry, context); + return de_ExportSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1KendraConfiguration - */ -const de_KendraConfiguration = (output: any, context: __SerdeContext): KendraConfiguration => { - return { - kendraIndex: __expectString(output.kendraIndex), - queryFilterString: __expectString(output.queryFilterString), - queryFilterStringEnabled: __expectBoolean(output.queryFilterStringEnabled), - } as any; -}; +// de_ExternalSourceSetting omitted. -/** - * deserializeAws_restJson1LambdaCodeHook - */ -const de_LambdaCodeHook = (output: any, context: __SerdeContext): LambdaCodeHook => { - return { - codeHookInterfaceVersion: __expectString(output.codeHookInterfaceVersion), - lambdaARN: __expectString(output.lambdaARN), - } as any; -}; +// de_FailedCustomVocabularyItem omitted. -/** - * deserializeAws_restJson1LexTranscriptFilter - */ -const de_LexTranscriptFilter = (output: any, context: __SerdeContext): LexTranscriptFilter => { - return { - dateRangeFilter: output.dateRangeFilter != null ? de_DateRangeFilter(output.dateRangeFilter, context) : undefined, - } as any; -}; +// de_FailedCustomVocabularyItems omitted. + +// de_FailureReasons omitted. /** - * deserializeAws_restJson1Message + * deserializeAws_restJson1FulfillmentCodeHookSettings */ -const de_Message = (output: any, context: __SerdeContext): Message => { - return { - customPayload: output.customPayload != null ? de_CustomPayload(output.customPayload, context) : undefined, - imageResponseCard: - output.imageResponseCard != null ? de_ImageResponseCard(output.imageResponseCard, context) : undefined, - plainTextMessage: - output.plainTextMessage != null ? de_PlainTextMessage(output.plainTextMessage, context) : undefined, - ssmlMessage: output.ssmlMessage != null ? de_SSMLMessage(output.ssmlMessage, context) : undefined, - } as any; +const de_FulfillmentCodeHookSettings = (output: any, context: __SerdeContext): FulfillmentCodeHookSettings => { + return take(output, { + active: __expectBoolean, + enabled: __expectBoolean, + fulfillmentUpdatesSpecification: _json, + postFulfillmentStatusSpecification: (_: any) => de_PostFulfillmentStatusSpecification(_, context), + }) as any; }; +// de_FulfillmentStartResponseSpecification omitted. + +// de_FulfillmentUpdateResponseSpecification omitted. + +// de_FulfillmentUpdatesSpecification omitted. + +// de_GrammarSlotTypeSetting omitted. + +// de_GrammarSlotTypeSource omitted. + +// de_ImageResponseCard omitted. + /** - * deserializeAws_restJson1MessageGroup + * deserializeAws_restJson1ImportResourceSpecification */ -const de_MessageGroup = (output: any, context: __SerdeContext): MessageGroup => { - return { - message: output.message != null ? de_Message(output.message, context) : undefined, - variations: output.variations != null ? de_MessageVariationsList(output.variations, context) : undefined, - } as any; +const de_ImportResourceSpecification = (output: any, context: __SerdeContext): ImportResourceSpecification => { + return take(output, { + botImportSpecification: _json, + botLocaleImportSpecification: (_: any) => de_BotLocaleImportSpecification(_, context), + customVocabularyImportSpecification: _json, + }) as any; }; /** - * deserializeAws_restJson1MessageGroupsList + * deserializeAws_restJson1ImportSummary */ -const de_MessageGroupsList = (output: any, context: __SerdeContext): MessageGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MessageGroup(entry, context); - }); - return retVal; +const de_ImportSummary = (output: any, context: __SerdeContext): ImportSummary => { + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + importId: __expectString, + importStatus: __expectString, + importedResourceId: __expectString, + importedResourceName: __expectString, + importedResourceType: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + mergeStrategy: __expectString, + }) as any; }; /** - * deserializeAws_restJson1MessageVariationsList + * deserializeAws_restJson1ImportSummaryList */ -const de_MessageVariationsList = (output: any, context: __SerdeContext): Message[] => { +const de_ImportSummaryList = (output: any, context: __SerdeContext): ImportSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Message(entry, context); + return de_ImportSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1MultipleValuesSetting + * deserializeAws_restJson1InitialResponseSetting */ -const de_MultipleValuesSetting = (output: any, context: __SerdeContext): MultipleValuesSetting => { - return { - allowMultipleValues: __expectBoolean(output.allowMultipleValues), - } as any; +const de_InitialResponseSetting = (output: any, context: __SerdeContext): InitialResponseSetting => { + return take(output, { + codeHook: (_: any) => de_DialogCodeHookInvocationSetting(_, context), + conditional: (_: any) => de_ConditionalSpecification(_, context), + initialResponse: _json, + nextStep: (_: any) => de_DialogState(_, context), + }) as any; }; -/** - * deserializeAws_restJson1ObfuscationSetting - */ -const de_ObfuscationSetting = (output: any, context: __SerdeContext): ObfuscationSetting => { - return { - obfuscationSettingType: __expectString(output.obfuscationSettingType), - } as any; -}; +// de_InputContext omitted. + +// de_InputContextsList omitted. /** - * deserializeAws_restJson1ObjectPrefixes + * deserializeAws_restJson1IntentClosingSetting */ -const de_ObjectPrefixes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_IntentClosingSetting = (output: any, context: __SerdeContext): IntentClosingSetting => { + return take(output, { + active: __expectBoolean, + closingResponse: _json, + conditional: (_: any) => de_ConditionalSpecification(_, context), + nextStep: (_: any) => de_DialogState(_, context), + }) as any; }; /** - * deserializeAws_restJson1OutputContext + * deserializeAws_restJson1IntentConfirmationSetting */ -const de_OutputContext = (output: any, context: __SerdeContext): OutputContext => { - return { - name: __expectString(output.name), - timeToLiveInSeconds: __expectInt32(output.timeToLiveInSeconds), - turnsToLive: __expectInt32(output.turnsToLive), - } as any; +const de_IntentConfirmationSetting = (output: any, context: __SerdeContext): IntentConfirmationSetting => { + return take(output, { + active: __expectBoolean, + codeHook: (_: any) => de_DialogCodeHookInvocationSetting(_, context), + confirmationConditional: (_: any) => de_ConditionalSpecification(_, context), + confirmationNextStep: (_: any) => de_DialogState(_, context), + confirmationResponse: _json, + declinationConditional: (_: any) => de_ConditionalSpecification(_, context), + declinationNextStep: (_: any) => de_DialogState(_, context), + declinationResponse: _json, + elicitationCodeHook: _json, + failureConditional: (_: any) => de_ConditionalSpecification(_, context), + failureNextStep: (_: any) => de_DialogState(_, context), + failureResponse: _json, + promptSpecification: _json, + }) as any; }; /** - * deserializeAws_restJson1OutputContextsList + * deserializeAws_restJson1IntentOverride */ -const de_OutputContextsList = (output: any, context: __SerdeContext): OutputContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputContext(entry, context); - }); - return retVal; +const de_IntentOverride = (output: any, context: __SerdeContext): IntentOverride => { + return take(output, { + name: __expectString, + slots: (_: any) => de_SlotValueOverrideMap(_, context), + }) as any; }; +// de_IntentStatistics omitted. + /** - * deserializeAws_restJson1ParentBotNetwork + * deserializeAws_restJson1IntentSummary */ -const de_ParentBotNetwork = (output: any, context: __SerdeContext): ParentBotNetwork => { - return { - botId: __expectString(output.botId), - botVersion: __expectString(output.botVersion), - } as any; +const de_IntentSummary = (output: any, context: __SerdeContext): IntentSummary => { + return take(output, { + description: __expectString, + inputContexts: _json, + intentId: __expectString, + intentName: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + outputContexts: _json, + parentIntentSignature: __expectString, + }) as any; }; /** - * deserializeAws_restJson1ParentBotNetworks + * deserializeAws_restJson1IntentSummaryList */ -const de_ParentBotNetworks = (output: any, context: __SerdeContext): ParentBotNetwork[] => { +const de_IntentSummaryList = (output: any, context: __SerdeContext): IntentSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParentBotNetwork(entry, context); + return de_IntentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PathFormat - */ -const de_PathFormat = (output: any, context: __SerdeContext): PathFormat => { - return { - objectPrefixes: output.objectPrefixes != null ? de_ObjectPrefixes(output.objectPrefixes, context) : undefined, - } as any; -}; +// de_KendraConfiguration omitted. + +// de_LambdaCodeHook omitted. /** - * deserializeAws_restJson1PlainTextMessage + * deserializeAws_restJson1LexTranscriptFilter */ -const de_PlainTextMessage = (output: any, context: __SerdeContext): PlainTextMessage => { - return { - value: __expectString(output.value), - } as any; +const de_LexTranscriptFilter = (output: any, context: __SerdeContext): LexTranscriptFilter => { + return take(output, { + dateRangeFilter: (_: any) => de_DateRangeFilter(_, context), + }) as any; }; +// de_Message omitted. + +// de_MessageGroup omitted. + +// de_MessageGroupsList omitted. + +// de_MessageVariationsList omitted. + +// de_MultipleValuesSetting omitted. + +// de_ObfuscationSetting omitted. + +// de_ObjectPrefixes omitted. + +// de_OutputContext omitted. + +// de_OutputContextsList omitted. + +// de_ParentBotNetwork omitted. + +// de_ParentBotNetworks omitted. + +// de_PathFormat omitted. + +// de_PlainTextMessage omitted. + /** * deserializeAws_restJson1PostDialogCodeHookInvocationSpecification */ @@ -11511,23 +8562,17 @@ const de_PostDialogCodeHookInvocationSpecification = ( output: any, context: __SerdeContext ): PostDialogCodeHookInvocationSpecification => { - return { - failureConditional: - output.failureConditional != null ? de_ConditionalSpecification(output.failureConditional, context) : undefined, - failureNextStep: output.failureNextStep != null ? de_DialogState(output.failureNextStep, context) : undefined, - failureResponse: - output.failureResponse != null ? de_ResponseSpecification(output.failureResponse, context) : undefined, - successConditional: - output.successConditional != null ? de_ConditionalSpecification(output.successConditional, context) : undefined, - successNextStep: output.successNextStep != null ? de_DialogState(output.successNextStep, context) : undefined, - successResponse: - output.successResponse != null ? de_ResponseSpecification(output.successResponse, context) : undefined, - timeoutConditional: - output.timeoutConditional != null ? de_ConditionalSpecification(output.timeoutConditional, context) : undefined, - timeoutNextStep: output.timeoutNextStep != null ? de_DialogState(output.timeoutNextStep, context) : undefined, - timeoutResponse: - output.timeoutResponse != null ? de_ResponseSpecification(output.timeoutResponse, context) : undefined, - } as any; + return take(output, { + failureConditional: (_: any) => de_ConditionalSpecification(_, context), + failureNextStep: (_: any) => de_DialogState(_, context), + failureResponse: _json, + successConditional: (_: any) => de_ConditionalSpecification(_, context), + successNextStep: (_: any) => de_DialogState(_, context), + successResponse: _json, + timeoutConditional: (_: any) => de_ConditionalSpecification(_, context), + timeoutNextStep: (_: any) => de_DialogState(_, context), + timeoutResponse: _json, + }) as any; }; /** @@ -11537,308 +8582,97 @@ const de_PostFulfillmentStatusSpecification = ( output: any, context: __SerdeContext ): PostFulfillmentStatusSpecification => { - return { - failureConditional: - output.failureConditional != null ? de_ConditionalSpecification(output.failureConditional, context) : undefined, - failureNextStep: output.failureNextStep != null ? de_DialogState(output.failureNextStep, context) : undefined, - failureResponse: - output.failureResponse != null ? de_ResponseSpecification(output.failureResponse, context) : undefined, - successConditional: - output.successConditional != null ? de_ConditionalSpecification(output.successConditional, context) : undefined, - successNextStep: output.successNextStep != null ? de_DialogState(output.successNextStep, context) : undefined, - successResponse: - output.successResponse != null ? de_ResponseSpecification(output.successResponse, context) : undefined, - timeoutConditional: - output.timeoutConditional != null ? de_ConditionalSpecification(output.timeoutConditional, context) : undefined, - timeoutNextStep: output.timeoutNextStep != null ? de_DialogState(output.timeoutNextStep, context) : undefined, - timeoutResponse: - output.timeoutResponse != null ? de_ResponseSpecification(output.timeoutResponse, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1PromptAttemptSpecification - */ -const de_PromptAttemptSpecification = (output: any, context: __SerdeContext): PromptAttemptSpecification => { - return { - allowInterrupt: __expectBoolean(output.allowInterrupt), - allowedInputTypes: - output.allowedInputTypes != null ? de_AllowedInputTypes(output.allowedInputTypes, context) : undefined, - audioAndDTMFInputSpecification: - output.audioAndDTMFInputSpecification != null - ? de_AudioAndDTMFInputSpecification(output.audioAndDTMFInputSpecification, context) - : undefined, - textInputSpecification: - output.textInputSpecification != null - ? de_TextInputSpecification(output.textInputSpecification, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1PromptAttemptsSpecificationMap - */ -const de_PromptAttemptsSpecificationMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [PromptAttempt | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PromptAttemptSpecification(value, context); - return acc; - }, - {} - ); + return take(output, { + failureConditional: (_: any) => de_ConditionalSpecification(_, context), + failureNextStep: (_: any) => de_DialogState(_, context), + failureResponse: _json, + successConditional: (_: any) => de_ConditionalSpecification(_, context), + successNextStep: (_: any) => de_DialogState(_, context), + successResponse: _json, + timeoutConditional: (_: any) => de_ConditionalSpecification(_, context), + timeoutNextStep: (_: any) => de_DialogState(_, context), + timeoutResponse: _json, + }) as any; }; -/** - * deserializeAws_restJson1PromptSpecification - */ -const de_PromptSpecification = (output: any, context: __SerdeContext): PromptSpecification => { - return { - allowInterrupt: __expectBoolean(output.allowInterrupt), - maxRetries: __expectInt32(output.maxRetries), - messageGroups: output.messageGroups != null ? de_MessageGroupsList(output.messageGroups, context) : undefined, - messageSelectionStrategy: __expectString(output.messageSelectionStrategy), - promptAttemptsSpecification: - output.promptAttemptsSpecification != null - ? de_PromptAttemptsSpecificationMap(output.promptAttemptsSpecification, context) - : undefined, - } as any; -}; +// de_PromptAttemptSpecification omitted. -/** - * deserializeAws_restJson1RecommendedActions - */ -const de_RecommendedActions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PromptAttemptsSpecificationMap omitted. -/** - * deserializeAws_restJson1RecommendedIntentSummary - */ -const de_RecommendedIntentSummary = (output: any, context: __SerdeContext): RecommendedIntentSummary => { - return { - intentId: __expectString(output.intentId), - intentName: __expectString(output.intentName), - sampleUtterancesCount: __expectInt32(output.sampleUtterancesCount), - } as any; -}; +// de_PromptSpecification omitted. -/** - * deserializeAws_restJson1RecommendedIntentSummaryList - */ -const de_RecommendedIntentSummaryList = (output: any, context: __SerdeContext): RecommendedIntentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendedIntentSummary(entry, context); - }); - return retVal; -}; +// de_RecommendedActions omitted. -/** - * deserializeAws_restJson1RelativeAggregationDuration - */ -const de_RelativeAggregationDuration = (output: any, context: __SerdeContext): RelativeAggregationDuration => { - return { - timeDimension: __expectString(output.timeDimension), - timeValue: __expectInt32(output.timeValue), - } as any; -}; +// de_RecommendedIntentSummary omitted. -/** - * deserializeAws_restJson1ResponseSpecification - */ -const de_ResponseSpecification = (output: any, context: __SerdeContext): ResponseSpecification => { - return { - allowInterrupt: __expectBoolean(output.allowInterrupt), - messageGroups: output.messageGroups != null ? de_MessageGroupsList(output.messageGroups, context) : undefined, - } as any; -}; +// de_RecommendedIntentSummaryList omitted. -/** - * deserializeAws_restJson1S3BucketLogDestination - */ -const de_S3BucketLogDestination = (output: any, context: __SerdeContext): S3BucketLogDestination => { - return { - kmsKeyArn: __expectString(output.kmsKeyArn), - logPrefix: __expectString(output.logPrefix), - s3BucketArn: __expectString(output.s3BucketArn), - } as any; -}; +// de_RelativeAggregationDuration omitted. + +// de_ResponseSpecification omitted. + +// de_S3BucketLogDestination omitted. /** * deserializeAws_restJson1S3BucketTranscriptSource */ const de_S3BucketTranscriptSource = (output: any, context: __SerdeContext): S3BucketTranscriptSource => { - return { - kmsKeyArn: __expectString(output.kmsKeyArn), - pathFormat: output.pathFormat != null ? de_PathFormat(output.pathFormat, context) : undefined, - s3BucketName: __expectString(output.s3BucketName), - transcriptFilter: - output.transcriptFilter != null ? de_TranscriptFilter(output.transcriptFilter, context) : undefined, - transcriptFormat: __expectString(output.transcriptFormat), - } as any; + return take(output, { + kmsKeyArn: __expectString, + pathFormat: _json, + s3BucketName: __expectString, + transcriptFilter: (_: any) => de_TranscriptFilter(_, context), + transcriptFormat: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SampleUtterance - */ -const de_SampleUtterance = (output: any, context: __SerdeContext): SampleUtterance => { - return { - utterance: __expectString(output.utterance), - } as any; -}; +// de_SampleUtterance omitted. -/** - * deserializeAws_restJson1SampleUtterancesList - */ -const de_SampleUtterancesList = (output: any, context: __SerdeContext): SampleUtterance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SampleUtterance(entry, context); - }); - return retVal; -}; +// de_SampleUtterancesList omitted. -/** - * deserializeAws_restJson1SampleValue - */ -const de_SampleValue = (output: any, context: __SerdeContext): SampleValue => { - return { - value: __expectString(output.value), - } as any; -}; +// de_SampleValue omitted. -/** - * deserializeAws_restJson1SentimentAnalysisSettings - */ -const de_SentimentAnalysisSettings = (output: any, context: __SerdeContext): SentimentAnalysisSettings => { - return { - detectSentiment: __expectBoolean(output.detectSentiment), - } as any; -}; +// de_SentimentAnalysisSettings omitted. /** * deserializeAws_restJson1SlotCaptureSetting */ const de_SlotCaptureSetting = (output: any, context: __SerdeContext): SlotCaptureSetting => { - return { - captureConditional: - output.captureConditional != null ? de_ConditionalSpecification(output.captureConditional, context) : undefined, - captureNextStep: output.captureNextStep != null ? de_DialogState(output.captureNextStep, context) : undefined, - captureResponse: - output.captureResponse != null ? de_ResponseSpecification(output.captureResponse, context) : undefined, - codeHook: output.codeHook != null ? de_DialogCodeHookInvocationSetting(output.codeHook, context) : undefined, - elicitationCodeHook: - output.elicitationCodeHook != null - ? de_ElicitationCodeHookInvocationSetting(output.elicitationCodeHook, context) - : undefined, - failureConditional: - output.failureConditional != null ? de_ConditionalSpecification(output.failureConditional, context) : undefined, - failureNextStep: output.failureNextStep != null ? de_DialogState(output.failureNextStep, context) : undefined, - failureResponse: - output.failureResponse != null ? de_ResponseSpecification(output.failureResponse, context) : undefined, - } as any; + return take(output, { + captureConditional: (_: any) => de_ConditionalSpecification(_, context), + captureNextStep: (_: any) => de_DialogState(_, context), + captureResponse: _json, + codeHook: (_: any) => de_DialogCodeHookInvocationSetting(_, context), + elicitationCodeHook: _json, + failureConditional: (_: any) => de_ConditionalSpecification(_, context), + failureNextStep: (_: any) => de_DialogState(_, context), + failureResponse: _json, + }) as any; }; -/** - * deserializeAws_restJson1SlotDefaultValue - */ -const de_SlotDefaultValue = (output: any, context: __SerdeContext): SlotDefaultValue => { - return { - defaultValue: __expectString(output.defaultValue), - } as any; -}; +// de_SlotDefaultValue omitted. -/** - * deserializeAws_restJson1SlotDefaultValueList - */ -const de_SlotDefaultValueList = (output: any, context: __SerdeContext): SlotDefaultValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlotDefaultValue(entry, context); - }); - return retVal; -}; +// de_SlotDefaultValueList omitted. -/** - * deserializeAws_restJson1SlotDefaultValueSpecification - */ -const de_SlotDefaultValueSpecification = (output: any, context: __SerdeContext): SlotDefaultValueSpecification => { - return { - defaultValueList: - output.defaultValueList != null ? de_SlotDefaultValueList(output.defaultValueList, context) : undefined, - } as any; -}; +// de_SlotDefaultValueSpecification omitted. -/** - * deserializeAws_restJson1SlotPrioritiesList - */ -const de_SlotPrioritiesList = (output: any, context: __SerdeContext): SlotPriority[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlotPriority(entry, context); - }); - return retVal; -}; +// de_SlotPrioritiesList omitted. -/** - * deserializeAws_restJson1SlotPriority - */ -const de_SlotPriority = (output: any, context: __SerdeContext): SlotPriority => { - return { - priority: __expectInt32(output.priority), - slotId: __expectString(output.slotId), - } as any; -}; +// de_SlotPriority omitted. /** * deserializeAws_restJson1SlotSummary */ const de_SlotSummary = (output: any, context: __SerdeContext): SlotSummary => { - return { - description: __expectString(output.description), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - slotConstraint: __expectString(output.slotConstraint), - slotId: __expectString(output.slotId), - slotName: __expectString(output.slotName), - slotTypeId: __expectString(output.slotTypeId), - valueElicitationPromptSpecification: - output.valueElicitationPromptSpecification != null - ? de_PromptSpecification(output.valueElicitationPromptSpecification, context) - : undefined, - } as any; + return take(output, { + description: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + slotConstraint: __expectString, + slotId: __expectString, + slotName: __expectString, + slotTypeId: __expectString, + valueElicitationPromptSpecification: _json, + }) as any; }; /** @@ -11848,38 +8682,25 @@ const de_SlotSummaryList = (output: any, context: __SerdeContext): SlotSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SlotSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SlotTypeStatistics - */ -const de_SlotTypeStatistics = (output: any, context: __SerdeContext): SlotTypeStatistics => { - return { - discoveredSlotTypeCount: __expectInt32(output.discoveredSlotTypeCount), - } as any; -}; +// de_SlotTypeStatistics omitted. /** * deserializeAws_restJson1SlotTypeSummary */ const de_SlotTypeSummary = (output: any, context: __SerdeContext): SlotTypeSummary => { - return { - description: __expectString(output.description), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - parentSlotTypeSignature: __expectString(output.parentSlotTypeSignature), - slotTypeCategory: __expectString(output.slotTypeCategory), - slotTypeId: __expectString(output.slotTypeId), - slotTypeName: __expectString(output.slotTypeName), - } as any; + return take(output, { + description: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + parentSlotTypeSignature: __expectString, + slotTypeCategory: __expectString, + slotTypeId: __expectString, + slotTypeName: __expectString, + }) as any; }; /** @@ -11889,80 +8710,40 @@ const de_SlotTypeSummaryList = (output: any, context: __SerdeContext): SlotTypeS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SlotTypeSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SlotTypeValue - */ -const de_SlotTypeValue = (output: any, context: __SerdeContext): SlotTypeValue => { - return { - sampleValue: output.sampleValue != null ? de_SampleValue(output.sampleValue, context) : undefined, - synonyms: output.synonyms != null ? de_SynonymList(output.synonyms, context) : undefined, - } as any; -}; +// de_SlotTypeValue omitted. -/** - * deserializeAws_restJson1SlotTypeValues - */ -const de_SlotTypeValues = (output: any, context: __SerdeContext): SlotTypeValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlotTypeValue(entry, context); - }); - return retVal; -}; +// de_SlotTypeValues omitted. -/** - * deserializeAws_restJson1SlotValue - */ -const de_SlotValue = (output: any, context: __SerdeContext): SlotValue => { - return { - interpretedValue: __expectString(output.interpretedValue), - } as any; -}; +// de_SlotValue omitted. /** * deserializeAws_restJson1SlotValueElicitationSetting */ const de_SlotValueElicitationSetting = (output: any, context: __SerdeContext): SlotValueElicitationSetting => { - return { - defaultValueSpecification: - output.defaultValueSpecification != null - ? de_SlotDefaultValueSpecification(output.defaultValueSpecification, context) - : undefined, - promptSpecification: - output.promptSpecification != null ? de_PromptSpecification(output.promptSpecification, context) : undefined, - sampleUtterances: - output.sampleUtterances != null ? de_SampleUtterancesList(output.sampleUtterances, context) : undefined, - slotCaptureSetting: - output.slotCaptureSetting != null ? de_SlotCaptureSetting(output.slotCaptureSetting, context) : undefined, - slotConstraint: __expectString(output.slotConstraint), - waitAndContinueSpecification: - output.waitAndContinueSpecification != null - ? de_WaitAndContinueSpecification(output.waitAndContinueSpecification, context) - : undefined, - } as any; + return take(output, { + defaultValueSpecification: _json, + promptSpecification: _json, + sampleUtterances: _json, + slotCaptureSetting: (_: any) => de_SlotCaptureSetting(_, context), + slotConstraint: __expectString, + waitAndContinueSpecification: _json, + }) as any; }; /** * deserializeAws_restJson1SlotValueOverride */ const de_SlotValueOverride = (output: any, context: __SerdeContext): SlotValueOverride => { - return { - shape: __expectString(output.shape), - value: output.value != null ? de_SlotValue(output.value, context) : undefined, - values: output.values != null ? de_SlotValues(output.values, context) : undefined, - } as any; + return take(output, { + shape: __expectString, + value: _json, + values: (_: any) => de_SlotValues(_, context), + }) as any; }; /** @@ -11978,14 +8759,7 @@ const de_SlotValueOverrideMap = (output: any, context: __SerdeContext): Record { - return { - pattern: __expectString(output.pattern), - } as any; -}; +// de_SlotValueRegexFilter omitted. /** * deserializeAws_restJson1SlotValues @@ -11994,87 +8768,37 @@ const de_SlotValues = (output: any, context: __SerdeContext): SlotValueOverride[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SlotValueOverride(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SlotValueSelectionSetting - */ -const de_SlotValueSelectionSetting = (output: any, context: __SerdeContext): SlotValueSelectionSetting => { - return { - advancedRecognitionSetting: - output.advancedRecognitionSetting != null - ? de_AdvancedRecognitionSetting(output.advancedRecognitionSetting, context) - : undefined, - regexFilter: output.regexFilter != null ? de_SlotValueRegexFilter(output.regexFilter, context) : undefined, - resolutionStrategy: __expectString(output.resolutionStrategy), - } as any; -}; +// de_SlotValueSelectionSetting omitted. /** * deserializeAws_restJson1Specifications */ const de_Specifications = (output: any, context: __SerdeContext): Specifications => { - return { - slotTypeId: __expectString(output.slotTypeId), - valueElicitationSetting: - output.valueElicitationSetting != null - ? de_SubSlotValueElicitationSetting(output.valueElicitationSetting, context) - : undefined, - } as any; + return take(output, { + slotTypeId: __expectString, + valueElicitationSetting: _json, + }) as any; }; -/** - * deserializeAws_restJson1SSMLMessage - */ -const de_SSMLMessage = (output: any, context: __SerdeContext): SSMLMessage => { - return { - value: __expectString(output.value), - } as any; -}; +// de_SSMLMessage omitted. -/** - * deserializeAws_restJson1StillWaitingResponseSpecification - */ -const de_StillWaitingResponseSpecification = ( - output: any, - context: __SerdeContext -): StillWaitingResponseSpecification => { - return { - allowInterrupt: __expectBoolean(output.allowInterrupt), - frequencyInSeconds: __expectInt32(output.frequencyInSeconds), - messageGroups: output.messageGroups != null ? de_MessageGroupsList(output.messageGroups, context) : undefined, - timeoutInSeconds: __expectInt32(output.timeoutInSeconds), - } as any; -}; +// de_StillWaitingResponseSpecification omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. /** * deserializeAws_restJson1SubSlotSetting */ const de_SubSlotSetting = (output: any, context: __SerdeContext): SubSlotSetting => { - return { - expression: __expectString(output.expression), - slotSpecifications: - output.slotSpecifications != null ? de_SubSlotSpecificationMap(output.slotSpecifications, context) : undefined, - } as any; + return take(output, { + expression: __expectString, + slotSpecifications: (_: any) => de_SubSlotSpecificationMap(_, context), + }) as any; }; /** @@ -12090,182 +8814,47 @@ const de_SubSlotSpecificationMap = (output: any, context: __SerdeContext): Recor }, {}); }; -/** - * deserializeAws_restJson1SubSlotTypeComposition - */ -const de_SubSlotTypeComposition = (output: any, context: __SerdeContext): SubSlotTypeComposition => { - return { - name: __expectString(output.name), - slotTypeId: __expectString(output.slotTypeId), - } as any; -}; +// de_SubSlotTypeComposition omitted. -/** - * deserializeAws_restJson1SubSlotTypeList - */ -const de_SubSlotTypeList = (output: any, context: __SerdeContext): SubSlotTypeComposition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubSlotTypeComposition(entry, context); - }); - return retVal; -}; +// de_SubSlotTypeList omitted. -/** - * deserializeAws_restJson1SubSlotValueElicitationSetting - */ -const de_SubSlotValueElicitationSetting = (output: any, context: __SerdeContext): SubSlotValueElicitationSetting => { - return { - defaultValueSpecification: - output.defaultValueSpecification != null - ? de_SlotDefaultValueSpecification(output.defaultValueSpecification, context) - : undefined, - promptSpecification: - output.promptSpecification != null ? de_PromptSpecification(output.promptSpecification, context) : undefined, - sampleUtterances: - output.sampleUtterances != null ? de_SampleUtterancesList(output.sampleUtterances, context) : undefined, - waitAndContinueSpecification: - output.waitAndContinueSpecification != null - ? de_WaitAndContinueSpecification(output.waitAndContinueSpecification, context) - : undefined, - } as any; -}; +// de_SubSlotValueElicitationSetting omitted. -/** - * deserializeAws_restJson1SynonymList - */ -const de_SynonymList = (output: any, context: __SerdeContext): SampleValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SampleValue(entry, context); - }); - return retVal; -}; +// de_SynonymList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TextInputSpecification - */ -const de_TextInputSpecification = (output: any, context: __SerdeContext): TextInputSpecification => { - return { - startTimeoutMs: __expectInt32(output.startTimeoutMs), - } as any; -}; +// de_TextInputSpecification omitted. -/** - * deserializeAws_restJson1TextLogDestination - */ -const de_TextLogDestination = (output: any, context: __SerdeContext): TextLogDestination => { - return { - cloudWatch: output.cloudWatch != null ? de_CloudWatchLogGroupLogDestination(output.cloudWatch, context) : undefined, - } as any; -}; +// de_TextLogDestination omitted. -/** - * deserializeAws_restJson1TextLogSetting - */ -const de_TextLogSetting = (output: any, context: __SerdeContext): TextLogSetting => { - return { - destination: output.destination != null ? de_TextLogDestination(output.destination, context) : undefined, - enabled: __expectBoolean(output.enabled), - } as any; -}; +// de_TextLogSetting omitted. -/** - * deserializeAws_restJson1TextLogSettingsList - */ -const de_TextLogSettingsList = (output: any, context: __SerdeContext): TextLogSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TextLogSetting(entry, context); - }); - return retVal; -}; +// de_TextLogSettingsList omitted. /** * deserializeAws_restJson1TranscriptFilter */ const de_TranscriptFilter = (output: any, context: __SerdeContext): TranscriptFilter => { - return { - lexTranscriptFilter: - output.lexTranscriptFilter != null ? de_LexTranscriptFilter(output.lexTranscriptFilter, context) : undefined, - } as any; + return take(output, { + lexTranscriptFilter: (_: any) => de_LexTranscriptFilter(_, context), + }) as any; }; /** * deserializeAws_restJson1TranscriptSourceSetting */ const de_TranscriptSourceSetting = (output: any, context: __SerdeContext): TranscriptSourceSetting => { - return { - s3BucketTranscriptSource: - output.s3BucketTranscriptSource != null - ? de_S3BucketTranscriptSource(output.s3BucketTranscriptSource, context) - : undefined, - } as any; + return take(output, { + s3BucketTranscriptSource: (_: any) => de_S3BucketTranscriptSource(_, context), + }) as any; }; -/** - * deserializeAws_restJson1UtteranceAggregationDuration - */ -const de_UtteranceAggregationDuration = (output: any, context: __SerdeContext): UtteranceAggregationDuration => { - return { - relativeAggregationDuration: - output.relativeAggregationDuration != null - ? de_RelativeAggregationDuration(output.relativeAggregationDuration, context) - : undefined, - } as any; -}; +// de_UtteranceAggregationDuration omitted. -/** - * deserializeAws_restJson1VoiceSettings - */ -const de_VoiceSettings = (output: any, context: __SerdeContext): VoiceSettings => { - return { - engine: __expectString(output.engine), - voiceId: __expectString(output.voiceId), - } as any; -}; +// de_VoiceSettings omitted. -/** - * deserializeAws_restJson1WaitAndContinueSpecification - */ -const de_WaitAndContinueSpecification = (output: any, context: __SerdeContext): WaitAndContinueSpecification => { - return { - active: __expectBoolean(output.active), - continueResponse: - output.continueResponse != null ? de_ResponseSpecification(output.continueResponse, context) : undefined, - stillWaitingResponse: - output.stillWaitingResponse != null - ? de_StillWaitingResponseSpecification(output.stillWaitingResponse, context) - : undefined, - waitingResponse: - output.waitingResponse != null ? de_ResponseSpecification(output.waitingResponse, context) : undefined, - } as any; -}; +// de_WaitAndContinueSpecification omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-lex-runtime-service/src/protocols/Aws_restJson1.ts b/clients/client-lex-runtime-service/src/protocols/Aws_restJson1.ts index b3da2b45c7db..32de0a870d53 100644 --- a/clients/client-lex-runtime-service/src/protocols/Aws_restJson1.ts +++ b/clients/client-lex-runtime-service/src/protocols/Aws_restJson1.ts @@ -1,17 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -31,11 +32,9 @@ import { ActiveContextTimeToLive, BadGatewayException, BadRequestException, - Button, ConflictException, DependencyFailedException, DialogAction, - GenericAttachment, IntentConfidence, IntentSummary, InternalFailureException, @@ -45,8 +44,6 @@ import { NotFoundException, PredictedIntent, RequestTimeoutException, - ResponseCard, - SentimentResponse, UnsupportedMediaTypeException, } from "../models/models_0"; @@ -172,12 +169,14 @@ export const se_PostTextCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botAlias", () => input.botAlias!, "{botAlias}", false); resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - ...(input.activeContexts != null && { activeContexts: se_ActiveContextsList(input.activeContexts, context) }), - ...(input.inputText != null && { inputText: input.inputText }), - ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }), - ...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }), - }); + body = JSON.stringify( + take(input, { + activeContexts: (_) => _json(_), + inputText: [], + requestAttributes: (_) => _json(_), + sessionAttributes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -208,14 +207,14 @@ export const se_PutSessionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "botAlias", () => input.botAlias!, "{botAlias}", false); resolvedPath = __resolvedPath(resolvedPath, input, "userId", () => input.userId!, "{userId}", false); let body: any; - body = JSON.stringify({ - ...(input.activeContexts != null && { activeContexts: se_ActiveContextsList(input.activeContexts, context) }), - ...(input.dialogAction != null && { dialogAction: se_DialogAction(input.dialogAction, context) }), - ...(input.recentIntentSummaryView != null && { - recentIntentSummaryView: se_IntentSummaryList(input.recentIntentSummaryView, context), - }), - ...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }), - }); + body = JSON.stringify( + take(input, { + activeContexts: (_) => _json(_), + dialogAction: (_) => _json(_), + recentIntentSummaryView: (_) => _json(_), + sessionAttributes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -241,18 +240,13 @@ export const de_DeleteSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAlias != null) { - contents.botAlias = __expectString(data.botAlias); - } - if (data.botName != null) { - contents.botName = __expectString(data.botName); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } - if (data.userId != null) { - contents.userId = __expectString(data.userId); - } + const doc = take(data, { + botAlias: __expectString, + botName: __expectString, + sessionId: __expectString, + userId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -286,10 +280,9 @@ const de_DeleteSessionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -309,21 +302,14 @@ export const de_GetSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.activeContexts != null) { - contents.activeContexts = de_ActiveContextsList(data.activeContexts, context); - } - if (data.dialogAction != null) { - contents.dialogAction = de_DialogAction(data.dialogAction, context); - } - if (data.recentIntentSummaryView != null) { - contents.recentIntentSummaryView = de_IntentSummaryList(data.recentIntentSummaryView, context); - } - if (data.sessionAttributes != null) { - contents.sessionAttributes = de_StringMap(data.sessionAttributes, context); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } + const doc = take(data, { + activeContexts: _json, + dialogAction: _json, + recentIntentSummaryView: _json, + sessionAttributes: _json, + sessionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -354,10 +340,9 @@ const de_GetSessionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -475,10 +460,9 @@ const de_PostContentCommandError = async ( throw await de_UnsupportedMediaTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -498,48 +482,23 @@ export const de_PostTextCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.activeContexts != null) { - contents.activeContexts = de_ActiveContextsList(data.activeContexts, context); - } - if (data.alternativeIntents != null) { - contents.alternativeIntents = de_IntentList(data.alternativeIntents, context); - } - if (data.botVersion != null) { - contents.botVersion = __expectString(data.botVersion); - } - if (data.dialogState != null) { - contents.dialogState = __expectString(data.dialogState); - } - if (data.intentName != null) { - contents.intentName = __expectString(data.intentName); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.messageFormat != null) { - contents.messageFormat = __expectString(data.messageFormat); - } - if (data.nluIntentConfidence != null) { - contents.nluIntentConfidence = de_IntentConfidence(data.nluIntentConfidence, context); - } - if (data.responseCard != null) { - contents.responseCard = de_ResponseCard(data.responseCard, context); - } - if (data.sentimentResponse != null) { - contents.sentimentResponse = de_SentimentResponse(data.sentimentResponse, context); - } - if (data.sessionAttributes != null) { - contents.sessionAttributes = de_StringMap(data.sessionAttributes, context); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } - if (data.slotToElicit != null) { - contents.slotToElicit = __expectString(data.slotToElicit); - } - if (data.slots != null) { - contents.slots = de_StringMap(data.slots, context); - } + const doc = take(data, { + activeContexts: _json, + alternativeIntents: (_) => de_IntentList(_, context), + botVersion: __expectString, + dialogState: __expectString, + intentName: __expectString, + message: __expectString, + messageFormat: __expectString, + nluIntentConfidence: (_) => de_IntentConfidence(_, context), + responseCard: _json, + sentimentResponse: _json, + sessionAttributes: _json, + sessionId: __expectString, + slotToElicit: __expectString, + slots: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -582,10 +541,9 @@ const de_PostTextCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -676,25 +634,25 @@ const de_PutSessionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadGatewayExceptionRes */ const de_BadGatewayExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadGatewayException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -708,9 +666,10 @@ const de_BadGatewayExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -724,9 +683,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -743,9 +703,10 @@ const de_DependencyFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DependencyFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -762,9 +723,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -783,9 +745,10 @@ const de_LimitExceededExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -802,9 +765,10 @@ const de_LoopDetectedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LoopDetectedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -821,9 +785,10 @@ const de_NotAcceptableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotAcceptableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -837,9 +802,10 @@ const de_NotAcceptableExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -856,9 +822,10 @@ const de_RequestTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -875,9 +842,10 @@ const de_UnsupportedMediaTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedMediaTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -885,214 +853,45 @@ const de_UnsupportedMediaTypeExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ActiveContext - */ -const se_ActiveContext = (input: ActiveContext, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.parameters != null && { parameters: se_ActiveContextParametersMap(input.parameters, context) }), - ...(input.timeToLive != null && { timeToLive: se_ActiveContextTimeToLive(input.timeToLive, context) }), - }; -}; +// se_ActiveContext omitted. -/** - * serializeAws_restJson1ActiveContextParametersMap - */ -const se_ActiveContextParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ActiveContextParametersMap omitted. -/** - * serializeAws_restJson1ActiveContextsList - */ -const se_ActiveContextsList = (input: ActiveContext[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ActiveContext(entry, context); - }); -}; +// se_ActiveContextsList omitted. -/** - * serializeAws_restJson1ActiveContextTimeToLive - */ -const se_ActiveContextTimeToLive = (input: ActiveContextTimeToLive, context: __SerdeContext): any => { - return { - ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }), - ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }), - }; -}; +// se_ActiveContextTimeToLive omitted. -/** - * serializeAws_restJson1DialogAction - */ -const se_DialogAction = (input: DialogAction, context: __SerdeContext): any => { - return { - ...(input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState }), - ...(input.intentName != null && { intentName: input.intentName }), - ...(input.message != null && { message: input.message }), - ...(input.messageFormat != null && { messageFormat: input.messageFormat }), - ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }), - ...(input.slots != null && { slots: se_StringMap(input.slots, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_DialogAction omitted. -/** - * serializeAws_restJson1IntentSummary - */ -const se_IntentSummary = (input: IntentSummary, context: __SerdeContext): any => { - return { - ...(input.checkpointLabel != null && { checkpointLabel: input.checkpointLabel }), - ...(input.confirmationStatus != null && { confirmationStatus: input.confirmationStatus }), - ...(input.dialogActionType != null && { dialogActionType: input.dialogActionType }), - ...(input.fulfillmentState != null && { fulfillmentState: input.fulfillmentState }), - ...(input.intentName != null && { intentName: input.intentName }), - ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }), - ...(input.slots != null && { slots: se_StringMap(input.slots, context) }), - }; -}; +// se_IntentSummary omitted. -/** - * serializeAws_restJson1IntentSummaryList - */ -const se_IntentSummaryList = (input: IntentSummary[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IntentSummary(entry, context); - }); -}; +// se_IntentSummaryList omitted. -/** - * serializeAws_restJson1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StringMap omitted. -/** - * deserializeAws_restJson1ActiveContext - */ -const de_ActiveContext = (output: any, context: __SerdeContext): ActiveContext => { - return { - name: __expectString(output.name), - parameters: output.parameters != null ? de_ActiveContextParametersMap(output.parameters, context) : undefined, - timeToLive: output.timeToLive != null ? de_ActiveContextTimeToLive(output.timeToLive, context) : undefined, - } as any; -}; +// de_ActiveContext omitted. -/** - * deserializeAws_restJson1ActiveContextParametersMap - */ -const de_ActiveContextParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ActiveContextParametersMap omitted. -/** - * deserializeAws_restJson1ActiveContextsList - */ -const de_ActiveContextsList = (output: any, context: __SerdeContext): ActiveContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActiveContext(entry, context); - }); - return retVal; -}; +// de_ActiveContextsList omitted. -/** - * deserializeAws_restJson1ActiveContextTimeToLive - */ -const de_ActiveContextTimeToLive = (output: any, context: __SerdeContext): ActiveContextTimeToLive => { - return { - timeToLiveInSeconds: __expectInt32(output.timeToLiveInSeconds), - turnsToLive: __expectInt32(output.turnsToLive), - } as any; -}; +// de_ActiveContextTimeToLive omitted. -/** - * deserializeAws_restJson1Button - */ -const de_Button = (output: any, context: __SerdeContext): Button => { - return { - text: __expectString(output.text), - value: __expectString(output.value), - } as any; -}; +// de_Button omitted. -/** - * deserializeAws_restJson1DialogAction - */ -const de_DialogAction = (output: any, context: __SerdeContext): DialogAction => { - return { - fulfillmentState: __expectString(output.fulfillmentState), - intentName: __expectString(output.intentName), - message: __expectString(output.message), - messageFormat: __expectString(output.messageFormat), - slotToElicit: __expectString(output.slotToElicit), - slots: output.slots != null ? de_StringMap(output.slots, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_DialogAction omitted. -/** - * deserializeAws_restJson1GenericAttachment - */ -const de_GenericAttachment = (output: any, context: __SerdeContext): GenericAttachment => { - return { - attachmentLinkUrl: __expectString(output.attachmentLinkUrl), - buttons: output.buttons != null ? de_listOfButtons(output.buttons, context) : undefined, - imageUrl: __expectString(output.imageUrl), - subTitle: __expectString(output.subTitle), - title: __expectString(output.title), - } as any; -}; +// de_GenericAttachment omitted. -/** - * deserializeAws_restJson1genericAttachmentList - */ -const de_genericAttachmentList = (output: any, context: __SerdeContext): GenericAttachment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GenericAttachment(entry, context); - }); - return retVal; -}; +// de_genericAttachmentList omitted. /** * deserializeAws_restJson1IntentConfidence */ const de_IntentConfidence = (output: any, context: __SerdeContext): IntentConfidence => { - return { - score: __limitedParseDouble(output.score), - } as any; + return take(output, { + score: __limitedParseDouble, + }) as any; }; /** @@ -1102,105 +901,33 @@ const de_IntentList = (output: any, context: __SerdeContext): PredictedIntent[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PredictedIntent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IntentSummary - */ -const de_IntentSummary = (output: any, context: __SerdeContext): IntentSummary => { - return { - checkpointLabel: __expectString(output.checkpointLabel), - confirmationStatus: __expectString(output.confirmationStatus), - dialogActionType: __expectString(output.dialogActionType), - fulfillmentState: __expectString(output.fulfillmentState), - intentName: __expectString(output.intentName), - slotToElicit: __expectString(output.slotToElicit), - slots: output.slots != null ? de_StringMap(output.slots, context) : undefined, - } as any; -}; +// de_IntentSummary omitted. -/** - * deserializeAws_restJson1IntentSummaryList - */ -const de_IntentSummaryList = (output: any, context: __SerdeContext): IntentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IntentSummary(entry, context); - }); - return retVal; -}; +// de_IntentSummaryList omitted. -/** - * deserializeAws_restJson1listOfButtons - */ -const de_listOfButtons = (output: any, context: __SerdeContext): Button[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Button(entry, context); - }); - return retVal; -}; +// de_listOfButtons omitted. /** * deserializeAws_restJson1PredictedIntent */ const de_PredictedIntent = (output: any, context: __SerdeContext): PredictedIntent => { - return { - intentName: __expectString(output.intentName), - nluIntentConfidence: - output.nluIntentConfidence != null ? de_IntentConfidence(output.nluIntentConfidence, context) : undefined, - slots: output.slots != null ? de_StringMap(output.slots, context) : undefined, - } as any; + return take(output, { + intentName: __expectString, + nluIntentConfidence: (_: any) => de_IntentConfidence(_, context), + slots: _json, + }) as any; }; -/** - * deserializeAws_restJson1ResponseCard - */ -const de_ResponseCard = (output: any, context: __SerdeContext): ResponseCard => { - return { - contentType: __expectString(output.contentType), - genericAttachments: - output.genericAttachments != null ? de_genericAttachmentList(output.genericAttachments, context) : undefined, - version: __expectString(output.version), - } as any; -}; +// de_ResponseCard omitted. -/** - * deserializeAws_restJson1SentimentResponse - */ -const de_SentimentResponse = (output: any, context: __SerdeContext): SentimentResponse => { - return { - sentimentLabel: __expectString(output.sentimentLabel), - sentimentScore: __expectString(output.sentimentScore), - } as any; -}; +// de_SentimentResponse omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts b/clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts index 61e6747a49fa..4a5d060193b1 100644 --- a/clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts +++ b/clients/client-lex-runtime-v2/src/protocols/Aws_restJson1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -53,7 +54,6 @@ import { Message, PlaybackCompletionEvent, PlaybackInterruptionEvent, - RecognizedBotMember, ResourceNotFoundException, RuntimeHintDetails, RuntimeHints, @@ -148,11 +148,13 @@ export const se_PutSessionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); let body: any; - body = JSON.stringify({ - ...(input.messages != null && { messages: se_Messages(input.messages, context) }), - ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }), - ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }), - }); + body = JSON.stringify( + take(input, { + messages: (_) => _json(_), + requestAttributes: (_) => _json(_), + sessionState: (_) => se_SessionState(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -183,11 +185,13 @@ export const se_RecognizeTextCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "localeId", () => input.localeId!, "{localeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); let body: any; - body = JSON.stringify({ - ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }), - ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }), - ...(input.text != null && { text: input.text }), - }); + body = JSON.stringify( + take(input, { + requestAttributes: (_) => _json(_), + sessionState: (_) => se_SessionState(_, context), + text: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -283,18 +287,13 @@ export const de_DeleteSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.botAliasId != null) { - contents.botAliasId = __expectString(data.botAliasId); - } - if (data.botId != null) { - contents.botId = __expectString(data.botId); - } - if (data.localeId != null) { - contents.localeId = __expectString(data.localeId); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } + const doc = take(data, { + botAliasId: __expectString, + botId: __expectString, + localeId: __expectString, + sessionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -331,10 +330,9 @@ const de_DeleteSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -354,18 +352,13 @@ export const de_GetSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.interpretations != null) { - contents.interpretations = de_Interpretations(data.interpretations, context); - } - if (data.messages != null) { - contents.messages = de_Messages(data.messages, context); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } - if (data.sessionState != null) { - contents.sessionState = de_SessionState(data.sessionState, context); - } + const doc = take(data, { + interpretations: (_) => de_Interpretations(_, context), + messages: _json, + sessionId: __expectString, + sessionState: (_) => de_SessionState(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -399,10 +392,9 @@ const de_GetSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -471,10 +463,9 @@ const de_PutSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -494,24 +485,15 @@ export const de_RecognizeTextCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.interpretations != null) { - contents.interpretations = de_Interpretations(data.interpretations, context); - } - if (data.messages != null) { - contents.messages = de_Messages(data.messages, context); - } - if (data.recognizedBotMember != null) { - contents.recognizedBotMember = de_RecognizedBotMember(data.recognizedBotMember, context); - } - if (data.requestAttributes != null) { - contents.requestAttributes = de_StringMap(data.requestAttributes, context); - } - if (data.sessionId != null) { - contents.sessionId = __expectString(data.sessionId); - } - if (data.sessionState != null) { - contents.sessionState = de_SessionState(data.sessionState, context); - } + const doc = take(data, { + interpretations: (_) => de_Interpretations(_, context), + messages: _json, + recognizedBotMember: _json, + requestAttributes: _json, + sessionId: __expectString, + sessionState: (_) => de_SessionState(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -554,10 +536,9 @@ const de_RecognizeTextCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -630,10 +611,9 @@ const de_RecognizeUtteranceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -684,16 +664,15 @@ const de_StartConversationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -703,9 +682,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -719,9 +699,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadGatewayExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadGatewayException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -735,9 +716,10 @@ const de_BadGatewayExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -754,9 +736,10 @@ const de_DependencyFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DependencyFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -773,9 +756,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -792,9 +776,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -808,9 +793,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -824,9 +810,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -882,7 +869,7 @@ const se_DisconnectionEvent_event = (input: DisconnectionEvent, context: __Serde ":content-type": { type: "string", value: "application/json" }, }; let body = new Uint8Array(); - body = se_DisconnectionEvent(input, context); + body = _json(input); body = context.utf8Decoder(JSON.stringify(body)); return { headers, body }; }; @@ -893,7 +880,7 @@ const se_DTMFInputEvent_event = (input: DTMFInputEvent, context: __SerdeContext) ":content-type": { type: "string", value: "application/json" }, }; let body = new Uint8Array(); - body = se_DTMFInputEvent(input, context); + body = _json(input); body = context.utf8Decoder(JSON.stringify(body)); return { headers, body }; }; @@ -904,7 +891,7 @@ const se_PlaybackCompletionEvent_event = (input: PlaybackCompletionEvent, contex ":content-type": { type: "string", value: "application/json" }, }; let body = new Uint8Array(); - body = se_PlaybackCompletionEvent(input, context); + body = _json(input); body = context.utf8Decoder(JSON.stringify(body)); return { headers, body }; }; @@ -915,7 +902,7 @@ const se_TextInputEvent_event = (input: TextInputEvent, context: __SerdeContext) ":content-type": { type: "string", value: "application/json" }, }; let body = new Uint8Array(); - body = se_TextInputEvent(input, context); + body = _json(input); body = context.utf8Decoder(JSON.stringify(body)); return { headers, body }; }; @@ -1049,7 +1036,7 @@ const de_DependencyFailedException_event = async ( const de_HeartbeatEvent_event = async (output: any, context: __SerdeContext): Promise => { const contents: HeartbeatEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_HeartbeatEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; const de_IntentResultEvent_event = async (output: any, context: __SerdeContext): Promise => { @@ -1074,7 +1061,7 @@ const de_PlaybackInterruptionEvent_event = async ( ): Promise => { const contents: PlaybackInterruptionEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_PlaybackInterruptionEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; const de_ResourceNotFoundException_event = async ( @@ -1090,7 +1077,7 @@ const de_ResourceNotFoundException_event = async ( const de_TextResponseEvent_event = async (output: any, context: __SerdeContext): Promise => { const contents: TextResponseEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_TextResponseEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; const de_ThrottlingException_event = async (output: any, context: __SerdeContext): Promise => { @@ -1103,7 +1090,7 @@ const de_ThrottlingException_event = async (output: any, context: __SerdeContext const de_TranscriptEvent_event = async (output: any, context: __SerdeContext): Promise => { const contents: TranscriptEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_TranscriptEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; const de_ValidationException_event = async (output: any, context: __SerdeContext): Promise => { @@ -1113,267 +1100,138 @@ const de_ValidationException_event = async (output: any, context: __SerdeContext }; return de_ValidationExceptionRes(parsedOutput, context); }; -/** - * serializeAws_restJson1ActiveContext - */ -const se_ActiveContext = (input: ActiveContext, context: __SerdeContext): any => { - return { - ...(input.contextAttributes != null && { - contextAttributes: se_ActiveContextParametersMap(input.contextAttributes, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.timeToLive != null && { timeToLive: se_ActiveContextTimeToLive(input.timeToLive, context) }), - }; -}; +// se_ActiveContext omitted. -/** - * serializeAws_restJson1ActiveContextParametersMap - */ -const se_ActiveContextParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ActiveContextParametersMap omitted. -/** - * serializeAws_restJson1ActiveContextsList - */ -const se_ActiveContextsList = (input: ActiveContext[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ActiveContext(entry, context); - }); -}; +// se_ActiveContextsList omitted. -/** - * serializeAws_restJson1ActiveContextTimeToLive - */ -const se_ActiveContextTimeToLive = (input: ActiveContextTimeToLive, context: __SerdeContext): any => { - return { - ...(input.timeToLiveInSeconds != null && { timeToLiveInSeconds: input.timeToLiveInSeconds }), - ...(input.turnsToLive != null && { turnsToLive: input.turnsToLive }), - }; -}; +// se_ActiveContextTimeToLive omitted. /** * serializeAws_restJson1AudioInputEvent */ const se_AudioInputEvent = (input: AudioInputEvent, context: __SerdeContext): any => { - return { - ...(input.audioChunk != null && { audioChunk: context.base64Encoder(input.audioChunk) }), - ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }), - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.eventId != null && { eventId: input.eventId }), - }; + return take(input, { + audioChunk: context.base64Encoder, + clientTimestampMillis: [], + contentType: [], + eventId: [], + }); }; -/** - * serializeAws_restJson1Button - */ -const se_Button = (input: Button, context: __SerdeContext): any => { - return { - ...(input.text != null && { text: input.text }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Button omitted. -/** - * serializeAws_restJson1ButtonsList - */ -const se_ButtonsList = (input: Button[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Button(entry, context); - }); -}; +// se_ButtonsList omitted. /** * serializeAws_restJson1ConfigurationEvent */ const se_ConfigurationEvent = (input: ConfigurationEvent, context: __SerdeContext): any => { - return { - ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }), - ...(input.disablePlayback != null && { disablePlayback: input.disablePlayback }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.requestAttributes != null && { requestAttributes: se_StringMap(input.requestAttributes, context) }), - ...(input.responseContentType != null && { responseContentType: input.responseContentType }), - ...(input.sessionState != null && { sessionState: se_SessionState(input.sessionState, context) }), - ...(input.welcomeMessages != null && { welcomeMessages: se_Messages(input.welcomeMessages, context) }), - }; + return take(input, { + clientTimestampMillis: [], + disablePlayback: [], + eventId: [], + requestAttributes: _json, + responseContentType: [], + sessionState: (_) => se_SessionState(_, context), + welcomeMessages: _json, + }); }; /** * serializeAws_restJson1DialogAction */ const se_DialogAction = (input: DialogAction, context: __SerdeContext): any => { - return { - ...(input.slotElicitationStyle != null && { slotElicitationStyle: input.slotElicitationStyle }), - ...(input.slotToElicit != null && { slotToElicit: input.slotToElicit }), - ...(input.subSlotToElicit != null && { subSlotToElicit: se_ElicitSubSlot(input.subSlotToElicit, context) }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + slotElicitationStyle: [], + slotToElicit: [], + subSlotToElicit: (_) => se_ElicitSubSlot(_, context), + type: [], + }); }; -/** - * serializeAws_restJson1DisconnectionEvent - */ -const se_DisconnectionEvent = (input: DisconnectionEvent, context: __SerdeContext): any => { - return { - ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }), - ...(input.eventId != null && { eventId: input.eventId }), - }; -}; +// se_DisconnectionEvent omitted. -/** - * serializeAws_restJson1DTMFInputEvent - */ -const se_DTMFInputEvent = (input: DTMFInputEvent, context: __SerdeContext): any => { - return { - ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.inputCharacter != null && { inputCharacter: input.inputCharacter }), - }; -}; +// se_DTMFInputEvent omitted. /** * serializeAws_restJson1ElicitSubSlot */ const se_ElicitSubSlot = (input: ElicitSubSlot, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.subSlotToElicit != null && { subSlotToElicit: se_ElicitSubSlot(input.subSlotToElicit, context) }), - }; + return take(input, { + name: [], + subSlotToElicit: (_) => se_ElicitSubSlot(_, context), + }); }; -/** - * serializeAws_restJson1ImageResponseCard - */ -const se_ImageResponseCard = (input: ImageResponseCard, context: __SerdeContext): any => { - return { - ...(input.buttons != null && { buttons: se_ButtonsList(input.buttons, context) }), - ...(input.imageUrl != null && { imageUrl: input.imageUrl }), - ...(input.subtitle != null && { subtitle: input.subtitle }), - ...(input.title != null && { title: input.title }), - }; -}; +// se_ImageResponseCard omitted. /** * serializeAws_restJson1Intent */ const se_Intent = (input: Intent, context: __SerdeContext): any => { - return { - ...(input.confirmationState != null && { confirmationState: input.confirmationState }), - ...(input.name != null && { name: input.name }), - ...(input.slots != null && { slots: se_Slots(input.slots, context) }), - ...(input.state != null && { state: input.state }), - }; + return take(input, { + confirmationState: [], + name: [], + slots: (_) => se_Slots(_, context), + state: [], + }); }; -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.content != null && { content: input.content }), - ...(input.contentType != null && { contentType: input.contentType }), - ...(input.imageResponseCard != null && { - imageResponseCard: se_ImageResponseCard(input.imageResponseCard, context), - }), - }; -}; +// se_Message omitted. -/** - * serializeAws_restJson1Messages - */ -const se_Messages = (input: Message[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Message(entry, context); - }); -}; +// se_Messages omitted. -/** - * serializeAws_restJson1PlaybackCompletionEvent - */ -const se_PlaybackCompletionEvent = (input: PlaybackCompletionEvent, context: __SerdeContext): any => { - return { - ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }), - ...(input.eventId != null && { eventId: input.eventId }), - }; -}; +// se_PlaybackCompletionEvent omitted. /** * serializeAws_restJson1RuntimeHintDetails */ const se_RuntimeHintDetails = (input: RuntimeHintDetails, context: __SerdeContext): any => { - return { - ...(input.runtimeHintValues != null && { - runtimeHintValues: se_RuntimeHintValuesList(input.runtimeHintValues, context), - }), - ...(input.subSlotHints != null && { subSlotHints: se_SlotHintsSlotMap(input.subSlotHints, context) }), - }; + return take(input, { + runtimeHintValues: _json, + subSlotHints: (_) => se_SlotHintsSlotMap(_, context), + }); }; /** * serializeAws_restJson1RuntimeHints */ const se_RuntimeHints = (input: RuntimeHints, context: __SerdeContext): any => { - return { - ...(input.slotHints != null && { slotHints: se_SlotHintsIntentMap(input.slotHints, context) }), - }; + return take(input, { + slotHints: (_) => se_SlotHintsIntentMap(_, context), + }); }; -/** - * serializeAws_restJson1RuntimeHintValue - */ -const se_RuntimeHintValue = (input: RuntimeHintValue, context: __SerdeContext): any => { - return { - ...(input.phrase != null && { phrase: input.phrase }), - }; -}; +// se_RuntimeHintValue omitted. -/** - * serializeAws_restJson1RuntimeHintValuesList - */ -const se_RuntimeHintValuesList = (input: RuntimeHintValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuntimeHintValue(entry, context); - }); -}; +// se_RuntimeHintValuesList omitted. /** * serializeAws_restJson1SessionState */ const se_SessionState = (input: SessionState, context: __SerdeContext): any => { - return { - ...(input.activeContexts != null && { activeContexts: se_ActiveContextsList(input.activeContexts, context) }), - ...(input.dialogAction != null && { dialogAction: se_DialogAction(input.dialogAction, context) }), - ...(input.intent != null && { intent: se_Intent(input.intent, context) }), - ...(input.originatingRequestId != null && { originatingRequestId: input.originatingRequestId }), - ...(input.runtimeHints != null && { runtimeHints: se_RuntimeHints(input.runtimeHints, context) }), - ...(input.sessionAttributes != null && { sessionAttributes: se_StringMap(input.sessionAttributes, context) }), - }; + return take(input, { + activeContexts: _json, + dialogAction: (_) => se_DialogAction(_, context), + intent: (_) => se_Intent(_, context), + originatingRequestId: [], + runtimeHints: (_) => se_RuntimeHints(_, context), + sessionAttributes: _json, + }); }; /** * serializeAws_restJson1Slot */ const se_Slot = (input: Slot, context: __SerdeContext): any => { - return { - ...(input.shape != null && { shape: input.shape }), - ...(input.subSlots != null && { subSlots: se_Slots(input.subSlots, context) }), - ...(input.value != null && { value: se_Value(input.value, context) }), - ...(input.values != null && { values: se_Values(input.values, context) }), - }; + return take(input, { + shape: [], + subSlots: (_) => se_Slots(_, context), + value: _json, + values: (_) => se_Values(_, context), + }); }; /** @@ -1418,51 +1276,13 @@ const se_Slots = (input: Record, context: __SerdeContext): any => }, {}); }; -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StringMap omitted. -/** - * serializeAws_restJson1TextInputEvent - */ -const se_TextInputEvent = (input: TextInputEvent, context: __SerdeContext): any => { - return { - ...(input.clientTimestampMillis != null && { clientTimestampMillis: input.clientTimestampMillis }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.text != null && { text: input.text }), - }; -}; +// se_TextInputEvent omitted. -/** - * serializeAws_restJson1Value - */ -const se_Value = (input: Value, context: __SerdeContext): any => { - return { - ...(input.interpretedValue != null && { interpretedValue: input.interpretedValue }), - ...(input.originalValue != null && { originalValue: input.originalValue }), - ...(input.resolvedValues != null && { resolvedValues: se_StringList(input.resolvedValues, context) }), - }; -}; +// se_Value omitted. /** * serializeAws_restJson1Values @@ -1475,182 +1295,100 @@ const se_Values = (input: Slot[], context: __SerdeContext): any => { }); }; -/** - * deserializeAws_restJson1ActiveContext - */ -const de_ActiveContext = (output: any, context: __SerdeContext): ActiveContext => { - return { - contextAttributes: - output.contextAttributes != null ? de_ActiveContextParametersMap(output.contextAttributes, context) : undefined, - name: __expectString(output.name), - timeToLive: output.timeToLive != null ? de_ActiveContextTimeToLive(output.timeToLive, context) : undefined, - } as any; -}; +// de_ActiveContext omitted. -/** - * deserializeAws_restJson1ActiveContextParametersMap - */ -const de_ActiveContextParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ActiveContextParametersMap omitted. -/** - * deserializeAws_restJson1ActiveContextsList - */ -const de_ActiveContextsList = (output: any, context: __SerdeContext): ActiveContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActiveContext(entry, context); - }); - return retVal; -}; +// de_ActiveContextsList omitted. -/** - * deserializeAws_restJson1ActiveContextTimeToLive - */ -const de_ActiveContextTimeToLive = (output: any, context: __SerdeContext): ActiveContextTimeToLive => { - return { - timeToLiveInSeconds: __expectInt32(output.timeToLiveInSeconds), - turnsToLive: __expectInt32(output.turnsToLive), - } as any; -}; +// de_ActiveContextTimeToLive omitted. /** * deserializeAws_restJson1AudioResponseEvent */ const de_AudioResponseEvent = (output: any, context: __SerdeContext): AudioResponseEvent => { - return { - audioChunk: output.audioChunk != null ? context.base64Decoder(output.audioChunk) : undefined, - contentType: __expectString(output.contentType), - eventId: __expectString(output.eventId), - } as any; + return take(output, { + audioChunk: context.base64Decoder, + contentType: __expectString, + eventId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Button - */ -const de_Button = (output: any, context: __SerdeContext): Button => { - return { - text: __expectString(output.text), - value: __expectString(output.value), - } as any; -}; +// de_Button omitted. -/** - * deserializeAws_restJson1ButtonsList - */ -const de_ButtonsList = (output: any, context: __SerdeContext): Button[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Button(entry, context); - }); - return retVal; -}; +// de_ButtonsList omitted. /** * deserializeAws_restJson1ConfidenceScore */ const de_ConfidenceScore = (output: any, context: __SerdeContext): ConfidenceScore => { - return { - score: __limitedParseDouble(output.score), - } as any; + return take(output, { + score: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1DialogAction */ const de_DialogAction = (output: any, context: __SerdeContext): DialogAction => { - return { - slotElicitationStyle: __expectString(output.slotElicitationStyle), - slotToElicit: __expectString(output.slotToElicit), - subSlotToElicit: output.subSlotToElicit != null ? de_ElicitSubSlot(output.subSlotToElicit, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + slotElicitationStyle: __expectString, + slotToElicit: __expectString, + subSlotToElicit: (_: any) => de_ElicitSubSlot(_, context), + type: __expectString, + }) as any; }; /** * deserializeAws_restJson1ElicitSubSlot */ const de_ElicitSubSlot = (output: any, context: __SerdeContext): ElicitSubSlot => { - return { - name: __expectString(output.name), - subSlotToElicit: output.subSlotToElicit != null ? de_ElicitSubSlot(output.subSlotToElicit, context) : undefined, - } as any; + return take(output, { + name: __expectString, + subSlotToElicit: (_: any) => de_ElicitSubSlot(_, context), + }) as any; }; -/** - * deserializeAws_restJson1HeartbeatEvent - */ -const de_HeartbeatEvent = (output: any, context: __SerdeContext): HeartbeatEvent => { - return { - eventId: __expectString(output.eventId), - } as any; -}; +// de_HeartbeatEvent omitted. -/** - * deserializeAws_restJson1ImageResponseCard - */ -const de_ImageResponseCard = (output: any, context: __SerdeContext): ImageResponseCard => { - return { - buttons: output.buttons != null ? de_ButtonsList(output.buttons, context) : undefined, - imageUrl: __expectString(output.imageUrl), - subtitle: __expectString(output.subtitle), - title: __expectString(output.title), - } as any; -}; +// de_ImageResponseCard omitted. /** * deserializeAws_restJson1Intent */ const de_Intent = (output: any, context: __SerdeContext): Intent => { - return { - confirmationState: __expectString(output.confirmationState), - name: __expectString(output.name), - slots: output.slots != null ? de_Slots(output.slots, context) : undefined, - state: __expectString(output.state), - } as any; + return take(output, { + confirmationState: __expectString, + name: __expectString, + slots: (_: any) => de_Slots(_, context), + state: __expectString, + }) as any; }; /** * deserializeAws_restJson1IntentResultEvent */ const de_IntentResultEvent = (output: any, context: __SerdeContext): IntentResultEvent => { - return { - eventId: __expectString(output.eventId), - inputMode: __expectString(output.inputMode), - interpretations: output.interpretations != null ? de_Interpretations(output.interpretations, context) : undefined, - recognizedBotMember: - output.recognizedBotMember != null ? de_RecognizedBotMember(output.recognizedBotMember, context) : undefined, - requestAttributes: output.requestAttributes != null ? de_StringMap(output.requestAttributes, context) : undefined, - sessionId: __expectString(output.sessionId), - sessionState: output.sessionState != null ? de_SessionState(output.sessionState, context) : undefined, - } as any; + return take(output, { + eventId: __expectString, + inputMode: __expectString, + interpretations: (_: any) => de_Interpretations(_, context), + recognizedBotMember: _json, + requestAttributes: _json, + sessionId: __expectString, + sessionState: (_: any) => de_SessionState(_, context), + }) as any; }; /** * deserializeAws_restJson1Interpretation */ const de_Interpretation = (output: any, context: __SerdeContext): Interpretation => { - return { - intent: output.intent != null ? de_Intent(output.intent, context) : undefined, - nluConfidence: output.nluConfidence != null ? de_ConfidenceScore(output.nluConfidence, context) : undefined, - sentimentResponse: - output.sentimentResponse != null ? de_SentimentResponse(output.sentimentResponse, context) : undefined, - } as any; + return take(output, { + intent: (_: any) => de_Intent(_, context), + nluConfidence: (_: any) => de_ConfidenceScore(_, context), + sentimentResponse: (_: any) => de_SentimentResponse(_, context), + }) as any; }; /** @@ -1660,152 +1398,88 @@ const de_Interpretations = (output: any, context: __SerdeContext): Interpretatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Interpretation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Message - */ -const de_Message = (output: any, context: __SerdeContext): Message => { - return { - content: __expectString(output.content), - contentType: __expectString(output.contentType), - imageResponseCard: - output.imageResponseCard != null ? de_ImageResponseCard(output.imageResponseCard, context) : undefined, - } as any; -}; +// de_Message omitted. -/** - * deserializeAws_restJson1Messages - */ -const de_Messages = (output: any, context: __SerdeContext): Message[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Message(entry, context); - }); - return retVal; -}; +// de_Messages omitted. -/** - * deserializeAws_restJson1PlaybackInterruptionEvent - */ -const de_PlaybackInterruptionEvent = (output: any, context: __SerdeContext): PlaybackInterruptionEvent => { - return { - causedByEventId: __expectString(output.causedByEventId), - eventId: __expectString(output.eventId), - eventReason: __expectString(output.eventReason), - } as any; -}; +// de_PlaybackInterruptionEvent omitted. -/** - * deserializeAws_restJson1RecognizedBotMember - */ -const de_RecognizedBotMember = (output: any, context: __SerdeContext): RecognizedBotMember => { - return { - botId: __expectString(output.botId), - botName: __expectString(output.botName), - } as any; -}; +// de_RecognizedBotMember omitted. /** * deserializeAws_restJson1RuntimeHintDetails */ const de_RuntimeHintDetails = (output: any, context: __SerdeContext): RuntimeHintDetails => { - return { - runtimeHintValues: - output.runtimeHintValues != null ? de_RuntimeHintValuesList(output.runtimeHintValues, context) : undefined, - subSlotHints: output.subSlotHints != null ? de_SlotHintsSlotMap(output.subSlotHints, context) : undefined, - } as any; + return take(output, { + runtimeHintValues: _json, + subSlotHints: (_: any) => de_SlotHintsSlotMap(_, context), + }) as any; }; /** * deserializeAws_restJson1RuntimeHints */ const de_RuntimeHints = (output: any, context: __SerdeContext): RuntimeHints => { - return { - slotHints: output.slotHints != null ? de_SlotHintsIntentMap(output.slotHints, context) : undefined, - } as any; + return take(output, { + slotHints: (_: any) => de_SlotHintsIntentMap(_, context), + }) as any; }; -/** - * deserializeAws_restJson1RuntimeHintValue - */ -const de_RuntimeHintValue = (output: any, context: __SerdeContext): RuntimeHintValue => { - return { - phrase: __expectString(output.phrase), - } as any; -}; +// de_RuntimeHintValue omitted. -/** - * deserializeAws_restJson1RuntimeHintValuesList - */ -const de_RuntimeHintValuesList = (output: any, context: __SerdeContext): RuntimeHintValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuntimeHintValue(entry, context); - }); - return retVal; -}; +// de_RuntimeHintValuesList omitted. /** * deserializeAws_restJson1SentimentResponse */ const de_SentimentResponse = (output: any, context: __SerdeContext): SentimentResponse => { - return { - sentiment: __expectString(output.sentiment), - sentimentScore: output.sentimentScore != null ? de_SentimentScore(output.sentimentScore, context) : undefined, - } as any; + return take(output, { + sentiment: __expectString, + sentimentScore: (_: any) => de_SentimentScore(_, context), + }) as any; }; /** * deserializeAws_restJson1SentimentScore */ const de_SentimentScore = (output: any, context: __SerdeContext): SentimentScore => { - return { - mixed: __limitedParseDouble(output.mixed), - negative: __limitedParseDouble(output.negative), - neutral: __limitedParseDouble(output.neutral), - positive: __limitedParseDouble(output.positive), - } as any; + return take(output, { + mixed: __limitedParseDouble, + negative: __limitedParseDouble, + neutral: __limitedParseDouble, + positive: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1SessionState */ const de_SessionState = (output: any, context: __SerdeContext): SessionState => { - return { - activeContexts: output.activeContexts != null ? de_ActiveContextsList(output.activeContexts, context) : undefined, - dialogAction: output.dialogAction != null ? de_DialogAction(output.dialogAction, context) : undefined, - intent: output.intent != null ? de_Intent(output.intent, context) : undefined, - originatingRequestId: __expectString(output.originatingRequestId), - runtimeHints: output.runtimeHints != null ? de_RuntimeHints(output.runtimeHints, context) : undefined, - sessionAttributes: output.sessionAttributes != null ? de_StringMap(output.sessionAttributes, context) : undefined, - } as any; + return take(output, { + activeContexts: _json, + dialogAction: (_: any) => de_DialogAction(_, context), + intent: (_: any) => de_Intent(_, context), + originatingRequestId: __expectString, + runtimeHints: (_: any) => de_RuntimeHints(_, context), + sessionAttributes: _json, + }) as any; }; /** * deserializeAws_restJson1Slot */ const de_Slot = (output: any, context: __SerdeContext): Slot => { - return { - shape: __expectString(output.shape), - subSlots: output.subSlots != null ? de_Slots(output.subSlots, context) : undefined, - value: output.value != null ? de_Value(output.value, context) : undefined, - values: output.values != null ? de_Values(output.values, context) : undefined, - } as any; + return take(output, { + shape: __expectString, + subSlots: (_: any) => de_Slots(_, context), + value: _json, + values: (_: any) => de_Values(_, context), + }) as any; }; /** @@ -1853,64 +1527,15 @@ const de_Slots = (output: any, context: __SerdeContext): Record => }, {}); }; -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. -/** - * deserializeAws_restJson1TextResponseEvent - */ -const de_TextResponseEvent = (output: any, context: __SerdeContext): TextResponseEvent => { - return { - eventId: __expectString(output.eventId), - messages: output.messages != null ? de_Messages(output.messages, context) : undefined, - } as any; -}; +// de_TextResponseEvent omitted. -/** - * deserializeAws_restJson1TranscriptEvent - */ -const de_TranscriptEvent = (output: any, context: __SerdeContext): TranscriptEvent => { - return { - eventId: __expectString(output.eventId), - transcript: __expectString(output.transcript), - } as any; -}; +// de_TranscriptEvent omitted. -/** - * deserializeAws_restJson1Value - */ -const de_Value = (output: any, context: __SerdeContext): Value => { - return { - interpretedValue: __expectString(output.interpretedValue), - originalValue: __expectString(output.originalValue), - resolvedValues: output.resolvedValues != null ? de_StringList(output.resolvedValues, context) : undefined, - } as any; -}; +// de_Value omitted. /** * deserializeAws_restJson1Values @@ -1919,9 +1544,6 @@ const de_Values = (output: any, context: __SerdeContext): Slot[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Slot(entry, context); }); return retVal; diff --git a/clients/client-license-manager-linux-subscriptions/src/protocols/Aws_restJson1.ts b/clients/client-license-manager-linux-subscriptions/src/protocols/Aws_restJson1.ts index 2e76371f2fcf..26667f09aa9d 100644 --- a/clients/client-license-manager-linux-subscriptions/src/protocols/Aws_restJson1.ts +++ b/clients/client-license-manager-linux-subscriptions/src/protocols/Aws_restJson1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -31,10 +32,8 @@ import { import { LicenseManagerLinuxSubscriptionsServiceException as __BaseException } from "../models/LicenseManagerLinuxSubscriptionsServiceException"; import { Filter, - Instance, InternalServerException, LinuxSubscriptionsDiscoverySettings, - Subscription, ThrottlingException, ValidationException, } from "../models/models_0"; @@ -80,11 +79,13 @@ export const se_ListLinuxSubscriptionInstancesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/ListLinuxSubscriptionInstances"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -110,11 +111,13 @@ export const se_ListLinuxSubscriptionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/ListLinuxSubscriptions"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -140,18 +143,13 @@ export const se_UpdateServiceSettingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/subscription/UpdateServiceSettings"; let body: any; - body = JSON.stringify({ - ...(input.AllowUpdate != null && { AllowUpdate: input.AllowUpdate }), - ...(input.LinuxSubscriptionsDiscovery != null && { - LinuxSubscriptionsDiscovery: input.LinuxSubscriptionsDiscovery, - }), - ...(input.LinuxSubscriptionsDiscoverySettings != null && { - LinuxSubscriptionsDiscoverySettings: se_LinuxSubscriptionsDiscoverySettings( - input.LinuxSubscriptionsDiscoverySettings, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + AllowUpdate: [], + LinuxSubscriptionsDiscovery: [], + LinuxSubscriptionsDiscoverySettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -177,24 +175,14 @@ export const de_GetServiceSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HomeRegions != null) { - contents.HomeRegions = de_StringList(data.HomeRegions, context); - } - if (data.LinuxSubscriptionsDiscovery != null) { - contents.LinuxSubscriptionsDiscovery = __expectString(data.LinuxSubscriptionsDiscovery); - } - if (data.LinuxSubscriptionsDiscoverySettings != null) { - contents.LinuxSubscriptionsDiscoverySettings = de_LinuxSubscriptionsDiscoverySettings( - data.LinuxSubscriptionsDiscoverySettings, - context - ); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusMessage != null) { - contents.StatusMessage = de_StringMap(data.StatusMessage, context); - } + const doc = take(data, { + HomeRegions: _json, + LinuxSubscriptionsDiscovery: __expectString, + LinuxSubscriptionsDiscoverySettings: _json, + Status: __expectString, + StatusMessage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -222,10 +210,9 @@ const de_GetServiceSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -245,12 +232,11 @@ export const de_ListLinuxSubscriptionInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Instances != null) { - contents.Instances = de_InstanceList(data.Instances, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Instances: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -278,10 +264,9 @@ const de_ListLinuxSubscriptionInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -301,12 +286,11 @@ export const de_ListLinuxSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Subscriptions != null) { - contents.Subscriptions = de_SubscriptionList(data.Subscriptions, context); - } + const doc = take(data, { + NextToken: __expectString, + Subscriptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -334,10 +318,9 @@ const de_ListLinuxSubscriptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -357,24 +340,14 @@ export const de_UpdateServiceSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HomeRegions != null) { - contents.HomeRegions = de_StringList(data.HomeRegions, context); - } - if (data.LinuxSubscriptionsDiscovery != null) { - contents.LinuxSubscriptionsDiscovery = __expectString(data.LinuxSubscriptionsDiscovery); - } - if (data.LinuxSubscriptionsDiscoverySettings != null) { - contents.LinuxSubscriptionsDiscoverySettings = de_LinuxSubscriptionsDiscoverySettings( - data.LinuxSubscriptionsDiscoverySettings, - context - ); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusMessage != null) { - contents.StatusMessage = de_StringMap(data.StatusMessage, context); - } + const doc = take(data, { + HomeRegions: _json, + LinuxSubscriptionsDiscovery: __expectString, + LinuxSubscriptionsDiscoverySettings: _json, + Status: __expectString, + StatusMessage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -402,16 +375,15 @@ const de_UpdateServiceSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServerExceptionRes */ @@ -421,9 +393,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -437,9 +410,10 @@ const de_InternalServerExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -453,9 +427,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -463,166 +438,29 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_StringList(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1LinuxSubscriptionsDiscoverySettings - */ -const se_LinuxSubscriptionsDiscoverySettings = ( - input: LinuxSubscriptionsDiscoverySettings, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationIntegration != null && { OrganizationIntegration: input.OrganizationIntegration }), - ...(input.SourceRegions != null && { SourceRegions: se_StringList(input.SourceRegions, context) }), - }; -}; +// se_LinuxSubscriptionsDiscoverySettings omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * deserializeAws_restJson1Instance - */ -const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - AccountID: __expectString(output.AccountID), - AmiId: __expectString(output.AmiId), - InstanceID: __expectString(output.InstanceID), - InstanceType: __expectString(output.InstanceType), - LastUpdatedTime: __expectString(output.LastUpdatedTime), - ProductCode: output.ProductCode != null ? de_ProductCodeList(output.ProductCode, context) : undefined, - Region: __expectString(output.Region), - Status: __expectString(output.Status), - SubscriptionName: __expectString(output.SubscriptionName), - UsageOperation: __expectString(output.UsageOperation), - } as any; -}; +// de_Instance omitted. -/** - * deserializeAws_restJson1InstanceList - */ -const de_InstanceList = (output: any, context: __SerdeContext): Instance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Instance(entry, context); - }); - return retVal; -}; +// de_InstanceList omitted. -/** - * deserializeAws_restJson1LinuxSubscriptionsDiscoverySettings - */ -const de_LinuxSubscriptionsDiscoverySettings = ( - output: any, - context: __SerdeContext -): LinuxSubscriptionsDiscoverySettings => { - return { - OrganizationIntegration: __expectString(output.OrganizationIntegration), - SourceRegions: output.SourceRegions != null ? de_StringList(output.SourceRegions, context) : undefined, - } as any; -}; +// de_LinuxSubscriptionsDiscoverySettings omitted. -/** - * deserializeAws_restJson1ProductCodeList - */ -const de_ProductCodeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ProductCodeList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. -/** - * deserializeAws_restJson1Subscription - */ -const de_Subscription = (output: any, context: __SerdeContext): Subscription => { - return { - InstanceCount: __expectLong(output.InstanceCount), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_Subscription omitted. -/** - * deserializeAws_restJson1SubscriptionList - */ -const de_SubscriptionList = (output: any, context: __SerdeContext): Subscription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subscription(entry, context); - }); - return retVal; -}; +// de_SubscriptionList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-license-manager-user-subscriptions/src/protocols/Aws_restJson1.ts b/clients/client-license-manager-user-subscriptions/src/protocols/Aws_restJson1.ts index 66eb4ace051a..83fc860b0938 100644 --- a/clients/client-license-manager-user-subscriptions/src/protocols/Aws_restJson1.ts +++ b/clients/client-license-manager-user-subscriptions/src/protocols/Aws_restJson1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -57,11 +58,7 @@ import { ConflictException, Filter, IdentityProvider, - IdentityProviderSummary, - InstanceSummary, - InstanceUserSummary, InternalServerException, - ProductUserSummary, ResourceNotFoundException, ServiceQuotaExceededException, Settings, @@ -83,12 +80,14 @@ export const se_AssociateUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/AssociateUser"; let body: any; - body = JSON.stringify({ - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + Domain: [], + IdentityProvider: (_) => _json(_), + InstanceId: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -115,10 +114,12 @@ export const se_DeregisterIdentityProviderCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identity-provider/DeregisterIdentityProvider"; let body: any; - body = JSON.stringify({ - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.Product != null && { Product: input.Product }), - }); + body = JSON.stringify( + take(input, { + IdentityProvider: (_) => _json(_), + Product: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -143,12 +144,14 @@ export const se_DisassociateUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/DisassociateUser"; let body: any; - body = JSON.stringify({ - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + Domain: [], + IdentityProvider: (_) => _json(_), + InstanceId: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -174,10 +177,12 @@ export const se_ListIdentityProvidersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identity-provider/ListIdentityProviders"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -203,11 +208,13 @@ export const se_ListInstancesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/instance/ListInstances"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -233,13 +240,15 @@ export const se_ListProductSubscriptionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/ListProductSubscriptions"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Product != null && { Product: input.Product }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + IdentityProvider: (_) => _json(_), + MaxResults: [], + NextToken: [], + Product: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -265,13 +274,15 @@ export const se_ListUserAssociationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/ListUserAssociations"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + IdentityProvider: (_) => _json(_), + InstanceId: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -298,11 +309,13 @@ export const se_RegisterIdentityProviderCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identity-provider/RegisterIdentityProvider"; let body: any; - body = JSON.stringify({ - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.Product != null && { Product: input.Product }), - ...(input.Settings != null && { Settings: se_Settings(input.Settings, context) }), - }); + body = JSON.stringify( + take(input, { + IdentityProvider: (_) => _json(_), + Product: [], + Settings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,12 +341,14 @@ export const se_StartProductSubscriptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/StartProductSubscription"; let body: any; - body = JSON.stringify({ - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.Product != null && { Product: input.Product }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + Domain: [], + IdentityProvider: (_) => _json(_), + Product: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -359,12 +374,14 @@ export const se_StopProductSubscriptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/user/StopProductSubscription"; let body: any; - body = JSON.stringify({ - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.Product != null && { Product: input.Product }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + Domain: [], + IdentityProvider: (_) => _json(_), + Product: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -391,11 +408,13 @@ export const se_UpdateIdentityProviderSettingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identity-provider/UpdateIdentityProviderSettings"; let body: any; - body = JSON.stringify({ - ...(input.IdentityProvider != null && { IdentityProvider: se_IdentityProvider(input.IdentityProvider, context) }), - ...(input.Product != null && { Product: input.Product }), - ...(input.UpdateSettings != null && { UpdateSettings: se_UpdateSettings(input.UpdateSettings, context) }), - }); + body = JSON.stringify( + take(input, { + IdentityProvider: (_) => _json(_), + Product: [], + UpdateSettings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -421,9 +440,10 @@ export const de_AssociateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceUserSummary != null) { - contents.InstanceUserSummary = de_InstanceUserSummary(data.InstanceUserSummary, context); - } + const doc = take(data, { + InstanceUserSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -463,10 +483,9 @@ const de_AssociateUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -486,9 +505,10 @@ export const de_DeregisterIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityProviderSummary != null) { - contents.IdentityProviderSummary = de_IdentityProviderSummary(data.IdentityProviderSummary, context); - } + const doc = take(data, { + IdentityProviderSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -528,10 +548,9 @@ const de_DeregisterIdentityProviderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -551,9 +570,10 @@ export const de_DisassociateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceUserSummary != null) { - contents.InstanceUserSummary = de_InstanceUserSummary(data.InstanceUserSummary, context); - } + const doc = take(data, { + InstanceUserSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -593,10 +613,9 @@ const de_DisassociateUserCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -616,12 +635,11 @@ export const de_ListIdentityProvidersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityProviderSummaries != null) { - contents.IdentityProviderSummaries = de_IdentityProviderSummaryList(data.IdentityProviderSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + IdentityProviderSummaries: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -661,10 +679,9 @@ const de_ListIdentityProvidersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -684,12 +701,11 @@ export const de_ListInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceSummaries != null) { - contents.InstanceSummaries = de_InstanceSummaryList(data.InstanceSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InstanceSummaries: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -729,10 +745,9 @@ const de_ListInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -752,12 +767,11 @@ export const de_ListProductSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProductUserSummaries != null) { - contents.ProductUserSummaries = de_ProductUserSummaryList(data.ProductUserSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + ProductUserSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -797,10 +811,9 @@ const de_ListProductSubscriptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -820,12 +833,11 @@ export const de_ListUserAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceUserSummaries != null) { - contents.InstanceUserSummaries = de_InstanceUserSummaryList(data.InstanceUserSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InstanceUserSummaries: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -865,10 +877,9 @@ const de_ListUserAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -888,9 +899,10 @@ export const de_RegisterIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityProviderSummary != null) { - contents.IdentityProviderSummary = de_IdentityProviderSummary(data.IdentityProviderSummary, context); - } + const doc = take(data, { + IdentityProviderSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -930,10 +942,9 @@ const de_RegisterIdentityProviderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -953,9 +964,10 @@ export const de_StartProductSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProductUserSummary != null) { - contents.ProductUserSummary = de_ProductUserSummary(data.ProductUserSummary, context); - } + const doc = take(data, { + ProductUserSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -995,10 +1007,9 @@ const de_StartProductSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1018,9 +1029,10 @@ export const de_StopProductSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProductUserSummary != null) { - contents.ProductUserSummary = de_ProductUserSummary(data.ProductUserSummary, context); - } + const doc = take(data, { + ProductUserSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1060,10 +1072,9 @@ const de_StopProductSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1083,9 +1094,10 @@ export const de_UpdateIdentityProviderSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityProviderSummary != null) { - contents.IdentityProviderSummary = de_IdentityProviderSummary(data.IdentityProviderSummary, context); - } + const doc = take(data, { + IdentityProviderSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1116,16 +1128,15 @@ const de_UpdateIdentityProviderSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1135,9 +1146,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1151,9 +1163,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1170,9 +1183,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1189,9 +1203,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1208,9 +1223,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1224,9 +1240,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1240,9 +1257,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1250,271 +1268,45 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ActiveDirectoryIdentityProvider - */ -const se_ActiveDirectoryIdentityProvider = (input: ActiveDirectoryIdentityProvider, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_ActiveDirectoryIdentityProvider omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Attribute != null && { Attribute: input.Attribute }), - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1IdentityProvider - */ -const se_IdentityProvider = (input: IdentityProvider, context: __SerdeContext): any => { - return IdentityProvider.visit(input, { - ActiveDirectoryIdentityProvider: (value) => ({ - ActiveDirectoryIdentityProvider: se_ActiveDirectoryIdentityProvider(value, context), - }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_IdentityProvider omitted. -/** - * serializeAws_restJson1Settings - */ -const se_Settings = (input: Settings, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupId != null && { SecurityGroupId: input.SecurityGroupId }), - ...(input.Subnets != null && { Subnets: se_Subnets(input.Subnets, context) }), - }; -}; +// se_Settings omitted. -/** - * serializeAws_restJson1Subnets - */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Subnets omitted. -/** - * serializeAws_restJson1UpdateSettings - */ -const se_UpdateSettings = (input: UpdateSettings, context: __SerdeContext): any => { - return { - ...(input.AddSubnets != null && { AddSubnets: se_Subnets(input.AddSubnets, context) }), - ...(input.RemoveSubnets != null && { RemoveSubnets: se_Subnets(input.RemoveSubnets, context) }), - ...(input.SecurityGroupId != null && { SecurityGroupId: input.SecurityGroupId }), - }; -}; +// se_UpdateSettings omitted. -/** - * deserializeAws_restJson1ActiveDirectoryIdentityProvider - */ -const de_ActiveDirectoryIdentityProvider = (output: any, context: __SerdeContext): ActiveDirectoryIdentityProvider => { - return { - DirectoryId: __expectString(output.DirectoryId), - } as any; -}; +// de_ActiveDirectoryIdentityProvider omitted. -/** - * deserializeAws_restJson1IdentityProvider - */ -const de_IdentityProvider = (output: any, context: __SerdeContext): IdentityProvider => { - if (output.ActiveDirectoryIdentityProvider != null) { - return { - ActiveDirectoryIdentityProvider: de_ActiveDirectoryIdentityProvider( - output.ActiveDirectoryIdentityProvider, - context - ), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_IdentityProvider omitted. -/** - * deserializeAws_restJson1IdentityProviderSummary - */ -const de_IdentityProviderSummary = (output: any, context: __SerdeContext): IdentityProviderSummary => { - return { - FailureMessage: __expectString(output.FailureMessage), - IdentityProvider: - output.IdentityProvider != null - ? de_IdentityProvider(__expectUnion(output.IdentityProvider), context) - : undefined, - Product: __expectString(output.Product), - Settings: output.Settings != null ? de_Settings(output.Settings, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; +// de_IdentityProviderSummary omitted. -/** - * deserializeAws_restJson1IdentityProviderSummaryList - */ -const de_IdentityProviderSummaryList = (output: any, context: __SerdeContext): IdentityProviderSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdentityProviderSummary(entry, context); - }); - return retVal; -}; +// de_IdentityProviderSummaryList omitted. -/** - * deserializeAws_restJson1InstanceSummary - */ -const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { - return { - InstanceId: __expectString(output.InstanceId), - LastStatusCheckDate: __expectString(output.LastStatusCheckDate), - Products: output.Products != null ? de_StringList(output.Products, context) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_InstanceSummary omitted. -/** - * deserializeAws_restJson1InstanceSummaryList - */ -const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceSummary(entry, context); - }); - return retVal; -}; +// de_InstanceSummaryList omitted. -/** - * deserializeAws_restJson1InstanceUserSummary - */ -const de_InstanceUserSummary = (output: any, context: __SerdeContext): InstanceUserSummary => { - return { - AssociationDate: __expectString(output.AssociationDate), - DisassociationDate: __expectString(output.DisassociationDate), - Domain: __expectString(output.Domain), - IdentityProvider: - output.IdentityProvider != null - ? de_IdentityProvider(__expectUnion(output.IdentityProvider), context) - : undefined, - InstanceId: __expectString(output.InstanceId), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Username: __expectString(output.Username), - } as any; -}; +// de_InstanceUserSummary omitted. -/** - * deserializeAws_restJson1InstanceUserSummaryList - */ -const de_InstanceUserSummaryList = (output: any, context: __SerdeContext): InstanceUserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceUserSummary(entry, context); - }); - return retVal; -}; +// de_InstanceUserSummaryList omitted. -/** - * deserializeAws_restJson1ProductUserSummary - */ -const de_ProductUserSummary = (output: any, context: __SerdeContext): ProductUserSummary => { - return { - Domain: __expectString(output.Domain), - IdentityProvider: - output.IdentityProvider != null - ? de_IdentityProvider(__expectUnion(output.IdentityProvider), context) - : undefined, - Product: __expectString(output.Product), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - SubscriptionEndDate: __expectString(output.SubscriptionEndDate), - SubscriptionStartDate: __expectString(output.SubscriptionStartDate), - Username: __expectString(output.Username), - } as any; -}; +// de_ProductUserSummary omitted. -/** - * deserializeAws_restJson1ProductUserSummaryList - */ -const de_ProductUserSummaryList = (output: any, context: __SerdeContext): ProductUserSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductUserSummary(entry, context); - }); - return retVal; -}; +// de_ProductUserSummaryList omitted. -/** - * deserializeAws_restJson1Settings - */ -const de_Settings = (output: any, context: __SerdeContext): Settings => { - return { - SecurityGroupId: __expectString(output.SecurityGroupId), - Subnets: output.Subnets != null ? de_Subnets(output.Subnets, context) : undefined, - } as any; -}; +// de_Settings omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1Subnets - */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Subnets omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-license-manager/src/protocols/Aws_json1_1.ts b/clients/client-license-manager/src/protocols/Aws_json1_1.ts index e07519553edb..20fa15dc8cf7 100644 --- a/clients/client-license-manager/src/protocols/Aws_json1_1.ts +++ b/clients/client-license-manager/src/protocols/Aws_json1_1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -158,81 +159,51 @@ import { import { LicenseManagerServiceException as __BaseException } from "../models/LicenseManagerServiceException"; import { AcceptGrantRequest, - AcceptGrantResponse, AccessDeniedException, AllowedOperation, AuthorizationException, AutomatedDiscoveryInformation, BorrowConfiguration, CheckInLicenseRequest, - CheckInLicenseResponse, CheckoutBorrowLicenseRequest, - CheckoutBorrowLicenseResponse, CheckoutLicenseRequest, - CheckoutLicenseResponse, ConflictException, - ConsumedLicenseSummary, ConsumptionConfiguration, CreateGrantRequest, - CreateGrantResponse, CreateGrantVersionRequest, - CreateGrantVersionResponse, CreateLicenseConfigurationRequest, - CreateLicenseConfigurationResponse, CreateLicenseConversionTaskForResourceRequest, - CreateLicenseConversionTaskForResourceResponse, CreateLicenseManagerReportGeneratorRequest, - CreateLicenseManagerReportGeneratorResponse, CreateLicenseRequest, - CreateLicenseResponse, CreateLicenseVersionRequest, - CreateLicenseVersionResponse, CreateTokenRequest, - CreateTokenResponse, DatetimeRange, DeleteGrantRequest, - DeleteGrantResponse, DeleteLicenseConfigurationRequest, - DeleteLicenseConfigurationResponse, DeleteLicenseManagerReportGeneratorRequest, - DeleteLicenseManagerReportGeneratorResponse, DeleteLicenseRequest, - DeleteLicenseResponse, DeleteTokenRequest, - DeleteTokenResponse, Entitlement, EntitlementData, EntitlementNotAllowedException, - EntitlementUsage, ExtendLicenseConsumptionRequest, - ExtendLicenseConsumptionResponse, FailedDependencyException, Filter, FilterLimitExceededException, GetAccessTokenRequest, - GetAccessTokenResponse, GetGrantRequest, - GetGrantResponse, GetLicenseConfigurationRequest, GetLicenseConfigurationResponse, GetLicenseConversionTaskRequest, GetLicenseConversionTaskResponse, GetLicenseManagerReportGeneratorRequest, - GetLicenseManagerReportGeneratorResponse, GetLicenseRequest, - GetLicenseResponse, GetLicenseUsageRequest, - GetLicenseUsageResponse, GetServiceSettingsRequest, - GetServiceSettingsResponse, - Grant, - GrantedLicense, InvalidParameterValueException, InvalidResourceStateException, InventoryFilter, Issuer, - IssuerDetails, - License, LicenseConfiguration, LicenseConfigurationAssociation, LicenseConfigurationUsage, @@ -240,12 +211,10 @@ import { LicenseConversionTask, LicenseOperationFailure, LicenseSpecification, - LicenseUsage, LicenseUsageException, ListAssociationsForLicenseConfigurationRequest, ListAssociationsForLicenseConfigurationResponse, ListDistributedGrantsRequest, - ListDistributedGrantsResponse, ListFailuresForLicenseConfigurationOperationsRequest, ListFailuresForLicenseConfigurationOperationsResponse, ListLicenseConfigurationsRequest, @@ -253,30 +222,18 @@ import { ListLicenseConversionTasksRequest, ListLicenseConversionTasksResponse, ListLicenseManagerReportGeneratorsRequest, - ListLicenseManagerReportGeneratorsResponse, ListLicenseSpecificationsForResourceRequest, - ListLicenseSpecificationsForResourceResponse, ListLicensesRequest, - ListLicensesResponse, ListLicenseVersionsRequest, - ListLicenseVersionsResponse, ListReceivedGrantsForOrganizationRequest, - ListReceivedGrantsForOrganizationResponse, ListReceivedGrantsRequest, - ListReceivedGrantsResponse, ListReceivedLicensesForOrganizationRequest, - ListReceivedLicensesForOrganizationResponse, ListReceivedLicensesRequest, - ListReceivedLicensesResponse, ListResourceInventoryRequest, - ListResourceInventoryResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTokensRequest, - ListTokensResponse, ListUsageForLicenseConfigurationRequest, ListUsageForLicenseConfigurationResponse, - ManagedResourceSummary, Metadata, NoEntitlementsAllowedException, Options, @@ -285,34 +242,22 @@ import { ProductInformationFilter, ProvisionalConfiguration, RateLimitExceededException, - ReceivedMetadata, RedirectException, RejectGrantRequest, - RejectGrantResponse, ReportContext, ReportFrequency, - ReportGenerator, ReportType, - ResourceInventory, ResourceLimitExceededException, ResourceNotFoundException, - S3Location, ServerInternalException, Tag, TagResourceRequest, - TagResourceResponse, - TokenData, UnsupportedDigitalSignatureMethodException, UntagResourceRequest, - UntagResourceResponse, UpdateLicenseConfigurationRequest, - UpdateLicenseConfigurationResponse, UpdateLicenseManagerReportGeneratorRequest, - UpdateLicenseManagerReportGeneratorResponse, UpdateLicenseSpecificationsForResourceRequest, - UpdateLicenseSpecificationsForResourceResponse, UpdateServiceSettingsRequest, - UpdateServiceSettingsResponse, ValidationException, } from "../models/models_0"; @@ -325,7 +270,7 @@ export const se_AcceptGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptGrant"); let body: any; - body = JSON.stringify(se_AcceptGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -338,7 +283,7 @@ export const se_CheckInLicenseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CheckInLicense"); let body: any; - body = JSON.stringify(se_CheckInLicenseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -351,7 +296,7 @@ export const se_CheckoutBorrowLicenseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CheckoutBorrowLicense"); let body: any; - body = JSON.stringify(se_CheckoutBorrowLicenseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -364,7 +309,7 @@ export const se_CheckoutLicenseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CheckoutLicense"); let body: any; - body = JSON.stringify(se_CheckoutLicenseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +322,7 @@ export const se_CreateGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGrant"); let body: any; - body = JSON.stringify(se_CreateGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +335,7 @@ export const se_CreateGrantVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGrantVersion"); let body: any; - body = JSON.stringify(se_CreateGrantVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -403,7 +348,7 @@ export const se_CreateLicenseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLicense"); let body: any; - body = JSON.stringify(se_CreateLicenseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -416,7 +361,7 @@ export const se_CreateLicenseConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLicenseConfiguration"); let body: any; - body = JSON.stringify(se_CreateLicenseConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -429,7 +374,7 @@ export const se_CreateLicenseConversionTaskForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLicenseConversionTaskForResource"); let body: any; - body = JSON.stringify(se_CreateLicenseConversionTaskForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -442,7 +387,7 @@ export const se_CreateLicenseManagerReportGeneratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLicenseManagerReportGenerator"); let body: any; - body = JSON.stringify(se_CreateLicenseManagerReportGeneratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -455,7 +400,7 @@ export const se_CreateLicenseVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLicenseVersion"); let body: any; - body = JSON.stringify(se_CreateLicenseVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -468,7 +413,7 @@ export const se_CreateTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateToken"); let body: any; - body = JSON.stringify(se_CreateTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -481,7 +426,7 @@ export const se_DeleteGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGrant"); let body: any; - body = JSON.stringify(se_DeleteGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -494,7 +439,7 @@ export const se_DeleteLicenseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLicense"); let body: any; - body = JSON.stringify(se_DeleteLicenseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -507,7 +452,7 @@ export const se_DeleteLicenseConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLicenseConfiguration"); let body: any; - body = JSON.stringify(se_DeleteLicenseConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -520,7 +465,7 @@ export const se_DeleteLicenseManagerReportGeneratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLicenseManagerReportGenerator"); let body: any; - body = JSON.stringify(se_DeleteLicenseManagerReportGeneratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -533,7 +478,7 @@ export const se_DeleteTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteToken"); let body: any; - body = JSON.stringify(se_DeleteTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -546,7 +491,7 @@ export const se_ExtendLicenseConsumptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExtendLicenseConsumption"); let body: any; - body = JSON.stringify(se_ExtendLicenseConsumptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -559,7 +504,7 @@ export const se_GetAccessTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccessToken"); let body: any; - body = JSON.stringify(se_GetAccessTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -572,7 +517,7 @@ export const se_GetGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGrant"); let body: any; - body = JSON.stringify(se_GetGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -585,7 +530,7 @@ export const se_GetLicenseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLicense"); let body: any; - body = JSON.stringify(se_GetLicenseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -598,7 +543,7 @@ export const se_GetLicenseConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLicenseConfiguration"); let body: any; - body = JSON.stringify(se_GetLicenseConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -611,7 +556,7 @@ export const se_GetLicenseConversionTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLicenseConversionTask"); let body: any; - body = JSON.stringify(se_GetLicenseConversionTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -624,7 +569,7 @@ export const se_GetLicenseManagerReportGeneratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLicenseManagerReportGenerator"); let body: any; - body = JSON.stringify(se_GetLicenseManagerReportGeneratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -637,7 +582,7 @@ export const se_GetLicenseUsageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLicenseUsage"); let body: any; - body = JSON.stringify(se_GetLicenseUsageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -650,7 +595,7 @@ export const se_GetServiceSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceSettings"); let body: any; - body = JSON.stringify(se_GetServiceSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -663,7 +608,7 @@ export const se_ListAssociationsForLicenseConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssociationsForLicenseConfiguration"); let body: any; - body = JSON.stringify(se_ListAssociationsForLicenseConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -676,7 +621,7 @@ export const se_ListDistributedGrantsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDistributedGrants"); let body: any; - body = JSON.stringify(se_ListDistributedGrantsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -689,7 +634,7 @@ export const se_ListFailuresForLicenseConfigurationOperationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFailuresForLicenseConfigurationOperations"); let body: any; - body = JSON.stringify(se_ListFailuresForLicenseConfigurationOperationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -702,7 +647,7 @@ export const se_ListLicenseConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLicenseConfigurations"); let body: any; - body = JSON.stringify(se_ListLicenseConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -715,7 +660,7 @@ export const se_ListLicenseConversionTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLicenseConversionTasks"); let body: any; - body = JSON.stringify(se_ListLicenseConversionTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -728,7 +673,7 @@ export const se_ListLicenseManagerReportGeneratorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLicenseManagerReportGenerators"); let body: any; - body = JSON.stringify(se_ListLicenseManagerReportGeneratorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -741,7 +686,7 @@ export const se_ListLicensesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLicenses"); let body: any; - body = JSON.stringify(se_ListLicensesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -754,7 +699,7 @@ export const se_ListLicenseSpecificationsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLicenseSpecificationsForResource"); let body: any; - body = JSON.stringify(se_ListLicenseSpecificationsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -767,7 +712,7 @@ export const se_ListLicenseVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLicenseVersions"); let body: any; - body = JSON.stringify(se_ListLicenseVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -780,7 +725,7 @@ export const se_ListReceivedGrantsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReceivedGrants"); let body: any; - body = JSON.stringify(se_ListReceivedGrantsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -793,7 +738,7 @@ export const se_ListReceivedGrantsForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReceivedGrantsForOrganization"); let body: any; - body = JSON.stringify(se_ListReceivedGrantsForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -806,7 +751,7 @@ export const se_ListReceivedLicensesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReceivedLicenses"); let body: any; - body = JSON.stringify(se_ListReceivedLicensesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -819,7 +764,7 @@ export const se_ListReceivedLicensesForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReceivedLicensesForOrganization"); let body: any; - body = JSON.stringify(se_ListReceivedLicensesForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -832,7 +777,7 @@ export const se_ListResourceInventoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceInventory"); let body: any; - body = JSON.stringify(se_ListResourceInventoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -845,7 +790,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -858,7 +803,7 @@ export const se_ListTokensCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTokens"); let body: any; - body = JSON.stringify(se_ListTokensRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -871,7 +816,7 @@ export const se_ListUsageForLicenseConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsageForLicenseConfiguration"); let body: any; - body = JSON.stringify(se_ListUsageForLicenseConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -884,7 +829,7 @@ export const se_RejectGrantCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectGrant"); let body: any; - body = JSON.stringify(se_RejectGrantRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -897,7 +842,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -910,7 +855,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -923,7 +868,7 @@ export const se_UpdateLicenseConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLicenseConfiguration"); let body: any; - body = JSON.stringify(se_UpdateLicenseConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -936,7 +881,7 @@ export const se_UpdateLicenseManagerReportGeneratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLicenseManagerReportGenerator"); let body: any; - body = JSON.stringify(se_UpdateLicenseManagerReportGeneratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -949,7 +894,7 @@ export const se_UpdateLicenseSpecificationsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLicenseSpecificationsForResource"); let body: any; - body = JSON.stringify(se_UpdateLicenseSpecificationsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -962,7 +907,7 @@ export const se_UpdateServiceSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceSettings"); let body: any; - body = JSON.stringify(se_UpdateServiceSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -978,12 +923,12 @@ export const de_AcceptGrantCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptGrantResponse(data, context); + contents = _json(data); const response: AcceptGrantCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1022,10 +967,9 @@ const de_AcceptGrantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1043,12 +987,12 @@ export const de_CheckInLicenseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckInLicenseResponse(data, context); + contents = _json(data); const response: CheckInLicenseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1090,10 +1034,9 @@ const de_CheckInLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1111,12 +1054,12 @@ export const de_CheckoutBorrowLicenseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckoutBorrowLicenseResponse(data, context); + contents = _json(data); const response: CheckoutBorrowLicenseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1167,10 +1110,9 @@ const de_CheckoutBorrowLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1188,12 +1130,12 @@ export const de_CheckoutLicenseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckoutLicenseResponse(data, context); + contents = _json(data); const response: CheckoutLicenseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1241,10 +1183,9 @@ const de_CheckoutLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1262,12 +1203,12 @@ export const de_CreateGrantCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGrantResponse(data, context); + contents = _json(data); const response: CreateGrantCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1306,10 +1247,9 @@ const de_CreateGrantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1327,12 +1267,12 @@ export const de_CreateGrantVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGrantVersionResponse(data, context); + contents = _json(data); const response: CreateGrantVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1371,10 +1311,9 @@ const de_CreateGrantVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1392,12 +1331,12 @@ export const de_CreateLicenseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLicenseResponse(data, context); + contents = _json(data); const response: CreateLicenseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1436,10 +1375,9 @@ const de_CreateLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1457,12 +1395,12 @@ export const de_CreateLicenseConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLicenseConfigurationResponse(data, context); + contents = _json(data); const response: CreateLicenseConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1498,10 +1436,9 @@ const de_CreateLicenseConfigurationCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1519,12 +1456,12 @@ export const de_CreateLicenseConversionTaskForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLicenseConversionTaskForResourceResponse(data, context); + contents = _json(data); const response: CreateLicenseConversionTaskForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1560,10 +1497,9 @@ const de_CreateLicenseConversionTaskForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1581,12 +1517,12 @@ export const de_CreateLicenseManagerReportGeneratorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLicenseManagerReportGeneratorResponse(data, context); + contents = _json(data); const response: CreateLicenseManagerReportGeneratorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1628,10 +1564,9 @@ const de_CreateLicenseManagerReportGeneratorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1649,12 +1584,12 @@ export const de_CreateLicenseVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLicenseVersionResponse(data, context); + contents = _json(data); const response: CreateLicenseVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1696,10 +1631,9 @@ const de_CreateLicenseVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1717,12 +1651,12 @@ export const de_CreateTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTokenResponse(data, context); + contents = _json(data); const response: CreateTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1764,10 +1698,9 @@ const de_CreateTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1785,12 +1718,12 @@ export const de_DeleteGrantCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGrantResponse(data, context); + contents = _json(data); const response: DeleteGrantCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1829,10 +1762,9 @@ const de_DeleteGrantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1850,12 +1782,12 @@ export const de_DeleteLicenseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLicenseResponse(data, context); + contents = _json(data); const response: DeleteLicenseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1897,10 +1829,9 @@ const de_DeleteLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1918,12 +1849,12 @@ export const de_DeleteLicenseConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLicenseConfigurationResponse(data, context); + contents = _json(data); const response: DeleteLicenseConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1956,10 +1887,9 @@ const de_DeleteLicenseConfigurationCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1977,12 +1907,12 @@ export const de_DeleteLicenseManagerReportGeneratorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLicenseManagerReportGeneratorResponse(data, context); + contents = _json(data); const response: DeleteLicenseManagerReportGeneratorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2024,10 +1954,9 @@ const de_DeleteLicenseManagerReportGeneratorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2045,12 +1974,12 @@ export const de_DeleteTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTokenResponse(data, context); + contents = _json(data); const response: DeleteTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2089,10 +2018,9 @@ const de_DeleteTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2110,12 +2038,12 @@ export const de_ExtendLicenseConsumptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExtendLicenseConsumptionResponse(data, context); + contents = _json(data); const response: ExtendLicenseConsumptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2154,10 +2082,9 @@ const de_ExtendLicenseConsumptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2175,12 +2102,12 @@ export const de_GetAccessTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAccessTokenResponse(data, context); + contents = _json(data); const response: GetAccessTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2213,10 +2140,9 @@ const de_GetAccessTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2234,12 +2160,12 @@ export const de_GetGrantCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGrantResponse(data, context); + contents = _json(data); const response: GetGrantCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2278,10 +2204,9 @@ const de_GetGrantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2299,12 +2224,12 @@ export const de_GetLicenseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLicenseResponse(data, context); + contents = _json(data); const response: GetLicenseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2340,10 +2265,9 @@ const de_GetLicenseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2366,7 +2290,7 @@ export const de_GetLicenseConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2399,10 +2323,9 @@ const de_GetLicenseConfigurationCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2425,7 +2348,7 @@ export const de_GetLicenseConversionTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2458,10 +2381,9 @@ const de_GetLicenseConversionTaskCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2479,12 +2401,12 @@ export const de_GetLicenseManagerReportGeneratorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLicenseManagerReportGeneratorResponse(data, context); + contents = _json(data); const response: GetLicenseManagerReportGeneratorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2526,10 +2448,9 @@ const de_GetLicenseManagerReportGeneratorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2547,12 +2468,12 @@ export const de_GetLicenseUsageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLicenseUsageResponse(data, context); + contents = _json(data); const response: GetLicenseUsageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2588,10 +2509,9 @@ const de_GetLicenseUsageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2609,12 +2529,12 @@ export const de_GetServiceSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetServiceSettingsResponse(data, context); + contents = _json(data); const response: GetServiceSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2644,10 +2564,9 @@ const de_GetServiceSettingsCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2670,7 +2589,7 @@ export const de_ListAssociationsForLicenseConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2706,10 +2625,9 @@ const de_ListAssociationsForLicenseConfigurationCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2727,12 +2645,12 @@ export const de_ListDistributedGrantsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDistributedGrantsResponse(data, context); + contents = _json(data); const response: ListDistributedGrantsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2771,10 +2689,9 @@ const de_ListDistributedGrantsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2797,7 +2714,7 @@ export const de_ListFailuresForLicenseConfigurationOperationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2830,10 +2747,9 @@ const de_ListFailuresForLicenseConfigurationOperationsCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2856,7 +2772,7 @@ export const de_ListLicenseConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2892,10 +2808,9 @@ const de_ListLicenseConfigurationsCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2918,7 +2833,7 @@ export const de_ListLicenseConversionTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2951,10 +2866,9 @@ const de_ListLicenseConversionTasksCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2972,12 +2886,12 @@ export const de_ListLicenseManagerReportGeneratorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLicenseManagerReportGeneratorsResponse(data, context); + contents = _json(data); const response: ListLicenseManagerReportGeneratorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3019,10 +2933,9 @@ const de_ListLicenseManagerReportGeneratorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3040,12 +2953,12 @@ export const de_ListLicensesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLicensesResponse(data, context); + contents = _json(data); const response: ListLicensesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3081,10 +2994,9 @@ const de_ListLicensesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3102,12 +3014,12 @@ export const de_ListLicenseSpecificationsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLicenseSpecificationsForResourceResponse(data, context); + contents = _json(data); const response: ListLicenseSpecificationsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3140,10 +3052,9 @@ const de_ListLicenseSpecificationsForResourceCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3161,12 +3072,12 @@ export const de_ListLicenseVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLicenseVersionsResponse(data, context); + contents = _json(data); const response: ListLicenseVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3199,10 +3110,9 @@ const de_ListLicenseVersionsCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3220,12 +3130,12 @@ export const de_ListReceivedGrantsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReceivedGrantsResponse(data, context); + contents = _json(data); const response: ListReceivedGrantsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3264,10 +3174,9 @@ const de_ListReceivedGrantsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3285,12 +3194,12 @@ export const de_ListReceivedGrantsForOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReceivedGrantsForOrganizationResponse(data, context); + contents = _json(data); const response: ListReceivedGrantsForOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3329,10 +3238,9 @@ const de_ListReceivedGrantsForOrganizationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3350,12 +3258,12 @@ export const de_ListReceivedLicensesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReceivedLicensesResponse(data, context); + contents = _json(data); const response: ListReceivedLicensesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3394,10 +3302,9 @@ const de_ListReceivedLicensesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3415,12 +3322,12 @@ export const de_ListReceivedLicensesForOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListReceivedLicensesForOrganizationResponse(data, context); + contents = _json(data); const response: ListReceivedLicensesForOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3459,10 +3366,9 @@ const de_ListReceivedLicensesForOrganizationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3480,12 +3386,12 @@ export const de_ListResourceInventoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourceInventoryResponse(data, context); + contents = _json(data); const response: ListResourceInventoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3524,10 +3430,9 @@ const de_ListResourceInventoryCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3545,12 +3450,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3583,10 +3488,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3604,12 +3508,12 @@ export const de_ListTokensCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTokensResponse(data, context); + contents = _json(data); const response: ListTokensCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3642,10 +3546,9 @@ const de_ListTokensCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3668,7 +3571,7 @@ export const de_ListUsageForLicenseConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3704,10 +3607,9 @@ const de_ListUsageForLicenseConfigurationCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3725,12 +3627,12 @@ export const de_RejectGrantCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectGrantResponse(data, context); + contents = _json(data); const response: RejectGrantCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3769,10 +3671,9 @@ const de_RejectGrantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3790,12 +3691,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3828,10 +3729,9 @@ const de_TagResourceCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3849,12 +3749,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3887,10 +3787,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3908,12 +3807,12 @@ export const de_UpdateLicenseConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLicenseConfigurationResponse(data, context); + contents = _json(data); const response: UpdateLicenseConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3949,10 +3848,9 @@ const de_UpdateLicenseConfigurationCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3970,12 +3868,12 @@ export const de_UpdateLicenseManagerReportGeneratorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLicenseManagerReportGeneratorResponse(data, context); + contents = _json(data); const response: UpdateLicenseManagerReportGeneratorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4017,10 +3915,9 @@ const de_UpdateLicenseManagerReportGeneratorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4038,12 +3935,12 @@ export const de_UpdateLicenseSpecificationsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLicenseSpecificationsForResourceResponse(data, context); + contents = _json(data); const response: UpdateLicenseSpecificationsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4082,10 +3979,9 @@ const de_UpdateLicenseSpecificationsForResourceCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4103,12 +3999,12 @@ export const de_UpdateServiceSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateServiceSettingsResponse(data, context); + contents = _json(data); const response: UpdateServiceSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4141,10 +4037,9 @@ const de_UpdateServiceSettingsCommandError = async ( throw await de_ServerInternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4158,7 +4053,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4174,7 +4069,7 @@ const de_AuthorizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AuthorizationException(body, context); + const deserialized: any = _json(body); const exception = new AuthorizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4187,7 +4082,7 @@ const de_AuthorizationExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4203,7 +4098,7 @@ const de_EntitlementNotAllowedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntitlementNotAllowedException(body, context); + const deserialized: any = _json(body); const exception = new EntitlementNotAllowedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4219,7 +4114,7 @@ const de_FailedDependencyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FailedDependencyException(body, context); + const deserialized: any = _json(body); const exception = new FailedDependencyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4235,7 +4130,7 @@ const de_FilterLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FilterLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new FilterLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4251,7 +4146,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4267,7 +4162,7 @@ const de_InvalidResourceStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4283,7 +4178,7 @@ const de_LicenseUsageExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LicenseUsageException(body, context); + const deserialized: any = _json(body); const exception = new LicenseUsageException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4299,7 +4194,7 @@ const de_NoEntitlementsAllowedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoEntitlementsAllowedException(body, context); + const deserialized: any = _json(body); const exception = new NoEntitlementsAllowedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4315,7 +4210,7 @@ const de_RateLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RateLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new RateLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4328,7 +4223,7 @@ const de_RateLimitExceededExceptionRes = async ( */ const de_RedirectExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RedirectException(body, context); + const deserialized: any = _json(body); const exception = new RedirectException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4344,7 +4239,7 @@ const de_ResourceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4360,7 +4255,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4376,7 +4271,7 @@ const de_ServerInternalExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServerInternalException(body, context); + const deserialized: any = _json(body); const exception = new ServerInternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4392,7 +4287,7 @@ const de_UnsupportedDigitalSignatureMethodExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedDigitalSignatureMethodException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedDigitalSignatureMethodException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4405,7 +4300,7 @@ const de_UnsupportedDigitalSignatureMethodExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4413,2741 +4308,666 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptGrantRequest - */ -const se_AcceptGrantRequest = (input: AcceptGrantRequest, context: __SerdeContext): any => { - return { - ...(input.GrantArn != null && { GrantArn: input.GrantArn }), - }; -}; +// se_AcceptGrantRequest omitted. -/** - * serializeAws_json1_1AllowedOperationList - */ -const se_AllowedOperationList = (input: (AllowedOperation | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedOperationList omitted. -/** - * serializeAws_json1_1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArnList omitted. -/** - * serializeAws_json1_1BorrowConfiguration - */ -const se_BorrowConfiguration = (input: BorrowConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowEarlyCheckIn != null && { AllowEarlyCheckIn: input.AllowEarlyCheckIn }), - ...(input.MaxTimeToLiveInMinutes != null && { MaxTimeToLiveInMinutes: input.MaxTimeToLiveInMinutes }), - }; -}; +// se_BorrowConfiguration omitted. -/** - * serializeAws_json1_1CheckInLicenseRequest - */ -const se_CheckInLicenseRequest = (input: CheckInLicenseRequest, context: __SerdeContext): any => { - return { - ...(input.Beneficiary != null && { Beneficiary: input.Beneficiary }), - ...(input.LicenseConsumptionToken != null && { LicenseConsumptionToken: input.LicenseConsumptionToken }), - }; -}; +// se_CheckInLicenseRequest omitted. -/** - * serializeAws_json1_1CheckoutBorrowLicenseRequest - */ -const se_CheckoutBorrowLicenseRequest = (input: CheckoutBorrowLicenseRequest, context: __SerdeContext): any => { - return { - ...(input.CheckoutMetadata != null && { CheckoutMetadata: se_MetadataList(input.CheckoutMetadata, context) }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DigitalSignatureMethod != null && { DigitalSignatureMethod: input.DigitalSignatureMethod }), - ...(input.Entitlements != null && { Entitlements: se_EntitlementDataList(input.Entitlements, context) }), - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.NodeId != null && { NodeId: input.NodeId }), - }; -}; +// se_CheckoutBorrowLicenseRequest omitted. -/** - * serializeAws_json1_1CheckoutLicenseRequest - */ -const se_CheckoutLicenseRequest = (input: CheckoutLicenseRequest, context: __SerdeContext): any => { - return { - ...(input.Beneficiary != null && { Beneficiary: input.Beneficiary }), - ...(input.CheckoutType != null && { CheckoutType: input.CheckoutType }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Entitlements != null && { Entitlements: se_EntitlementDataList(input.Entitlements, context) }), - ...(input.KeyFingerprint != null && { KeyFingerprint: input.KeyFingerprint }), - ...(input.NodeId != null && { NodeId: input.NodeId }), - ...(input.ProductSKU != null && { ProductSKU: input.ProductSKU }), - }; -}; +// se_CheckoutLicenseRequest omitted. -/** - * serializeAws_json1_1ConsumptionConfiguration - */ -const se_ConsumptionConfiguration = (input: ConsumptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.BorrowConfiguration != null && { - BorrowConfiguration: se_BorrowConfiguration(input.BorrowConfiguration, context), - }), - ...(input.ProvisionalConfiguration != null && { - ProvisionalConfiguration: se_ProvisionalConfiguration(input.ProvisionalConfiguration, context), - }), - ...(input.RenewType != null && { RenewType: input.RenewType }), - }; -}; +// se_ConsumptionConfiguration omitted. -/** - * serializeAws_json1_1CreateGrantRequest - */ -const se_CreateGrantRequest = (input: CreateGrantRequest, context: __SerdeContext): any => { - return { - ...(input.AllowedOperations != null && { - AllowedOperations: se_AllowedOperationList(input.AllowedOperations, context), - }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.GrantName != null && { GrantName: input.GrantName }), - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.Principals != null && { Principals: se_PrincipalArnList(input.Principals, context) }), - }; -}; +// se_CreateGrantRequest omitted. -/** - * serializeAws_json1_1CreateGrantVersionRequest - */ -const se_CreateGrantVersionRequest = (input: CreateGrantVersionRequest, context: __SerdeContext): any => { - return { - ...(input.AllowedOperations != null && { - AllowedOperations: se_AllowedOperationList(input.AllowedOperations, context), - }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.GrantArn != null && { GrantArn: input.GrantArn }), - ...(input.GrantName != null && { GrantName: input.GrantName }), - ...(input.Options != null && { Options: se_Options(input.Options, context) }), - ...(input.SourceVersion != null && { SourceVersion: input.SourceVersion }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusReason != null && { StatusReason: input.StatusReason }), - }; -}; +// se_CreateGrantVersionRequest omitted. -/** - * serializeAws_json1_1CreateLicenseConfigurationRequest - */ -const se_CreateLicenseConfigurationRequest = ( - input: CreateLicenseConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisassociateWhenNotFound != null && { DisassociateWhenNotFound: input.DisassociateWhenNotFound }), - ...(input.LicenseCount != null && { LicenseCount: input.LicenseCount }), - ...(input.LicenseCountHardLimit != null && { LicenseCountHardLimit: input.LicenseCountHardLimit }), - ...(input.LicenseCountingType != null && { LicenseCountingType: input.LicenseCountingType }), - ...(input.LicenseRules != null && { LicenseRules: se_StringList(input.LicenseRules, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ProductInformationList != null && { - ProductInformationList: se_ProductInformationList(input.ProductInformationList, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateLicenseConfigurationRequest omitted. -/** - * serializeAws_json1_1CreateLicenseConversionTaskForResourceRequest - */ -const se_CreateLicenseConversionTaskForResourceRequest = ( - input: CreateLicenseConversionTaskForResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.DestinationLicenseContext != null && { - DestinationLicenseContext: se_LicenseConversionContext(input.DestinationLicenseContext, context), - }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.SourceLicenseContext != null && { - SourceLicenseContext: se_LicenseConversionContext(input.SourceLicenseContext, context), - }), - }; -}; +// se_CreateLicenseConversionTaskForResourceRequest omitted. -/** - * serializeAws_json1_1CreateLicenseManagerReportGeneratorRequest - */ -const se_CreateLicenseManagerReportGeneratorRequest = ( - input: CreateLicenseManagerReportGeneratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ReportContext != null && { ReportContext: se_ReportContext(input.ReportContext, context) }), - ...(input.ReportFrequency != null && { ReportFrequency: se_ReportFrequency(input.ReportFrequency, context) }), - ...(input.ReportGeneratorName != null && { ReportGeneratorName: input.ReportGeneratorName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: se_ReportTypeList(input.Type, context) }), - }; -}; +// se_CreateLicenseManagerReportGeneratorRequest omitted. -/** - * serializeAws_json1_1CreateLicenseRequest - */ -const se_CreateLicenseRequest = (input: CreateLicenseRequest, context: __SerdeContext): any => { - return { - ...(input.Beneficiary != null && { Beneficiary: input.Beneficiary }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.ConsumptionConfiguration != null && { - ConsumptionConfiguration: se_ConsumptionConfiguration(input.ConsumptionConfiguration, context), - }), - ...(input.Entitlements != null && { Entitlements: se_EntitlementList(input.Entitlements, context) }), - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.Issuer != null && { Issuer: se_Issuer(input.Issuer, context) }), - ...(input.LicenseMetadata != null && { LicenseMetadata: se_MetadataList(input.LicenseMetadata, context) }), - ...(input.LicenseName != null && { LicenseName: input.LicenseName }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ...(input.ProductSKU != null && { ProductSKU: input.ProductSKU }), - ...(input.Validity != null && { Validity: se_DatetimeRange(input.Validity, context) }), - }; -}; +// se_CreateLicenseRequest omitted. -/** - * serializeAws_json1_1CreateLicenseVersionRequest - */ -const se_CreateLicenseVersionRequest = (input: CreateLicenseVersionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.ConsumptionConfiguration != null && { - ConsumptionConfiguration: se_ConsumptionConfiguration(input.ConsumptionConfiguration, context), - }), - ...(input.Entitlements != null && { Entitlements: se_EntitlementList(input.Entitlements, context) }), - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.Issuer != null && { Issuer: se_Issuer(input.Issuer, context) }), - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.LicenseMetadata != null && { LicenseMetadata: se_MetadataList(input.LicenseMetadata, context) }), - ...(input.LicenseName != null && { LicenseName: input.LicenseName }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ...(input.SourceVersion != null && { SourceVersion: input.SourceVersion }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Validity != null && { Validity: se_DatetimeRange(input.Validity, context) }), - }; -}; +// se_CreateLicenseVersionRequest omitted. -/** - * serializeAws_json1_1CreateTokenRequest - */ -const se_CreateTokenRequest = (input: CreateTokenRequest, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.ExpirationInDays != null && { ExpirationInDays: input.ExpirationInDays }), - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.RoleArns != null && { RoleArns: se_ArnList(input.RoleArns, context) }), - ...(input.TokenProperties != null && { TokenProperties: se_MaxSize3StringList(input.TokenProperties, context) }), - }; -}; +// se_CreateTokenRequest omitted. -/** - * serializeAws_json1_1DatetimeRange - */ -const se_DatetimeRange = (input: DatetimeRange, context: __SerdeContext): any => { - return { - ...(input.Begin != null && { Begin: input.Begin }), - ...(input.End != null && { End: input.End }), - }; -}; +// se_DatetimeRange omitted. -/** - * serializeAws_json1_1DeleteGrantRequest - */ -const se_DeleteGrantRequest = (input: DeleteGrantRequest, context: __SerdeContext): any => { - return { - ...(input.GrantArn != null && { GrantArn: input.GrantArn }), - ...(input.StatusReason != null && { StatusReason: input.StatusReason }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_DeleteGrantRequest omitted. -/** - * serializeAws_json1_1DeleteLicenseConfigurationRequest - */ -const se_DeleteLicenseConfigurationRequest = ( - input: DeleteLicenseConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - }; -}; +// se_DeleteLicenseConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteLicenseManagerReportGeneratorRequest - */ -const se_DeleteLicenseManagerReportGeneratorRequest = ( - input: DeleteLicenseManagerReportGeneratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.LicenseManagerReportGeneratorArn != null && { - LicenseManagerReportGeneratorArn: input.LicenseManagerReportGeneratorArn, - }), - }; -}; +// se_DeleteLicenseManagerReportGeneratorRequest omitted. -/** - * serializeAws_json1_1DeleteLicenseRequest - */ -const se_DeleteLicenseRequest = (input: DeleteLicenseRequest, context: __SerdeContext): any => { - return { - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.SourceVersion != null && { SourceVersion: input.SourceVersion }), - }; -}; +// se_DeleteLicenseRequest omitted. -/** - * serializeAws_json1_1DeleteTokenRequest - */ -const se_DeleteTokenRequest = (input: DeleteTokenRequest, context: __SerdeContext): any => { - return { - ...(input.TokenId != null && { TokenId: input.TokenId }), - }; -}; +// se_DeleteTokenRequest omitted. -/** - * serializeAws_json1_1Entitlement - */ -const se_Entitlement = (input: Entitlement, context: __SerdeContext): any => { - return { - ...(input.AllowCheckIn != null && { AllowCheckIn: input.AllowCheckIn }), - ...(input.MaxCount != null && { MaxCount: input.MaxCount }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Overage != null && { Overage: input.Overage }), - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Entitlement omitted. -/** - * serializeAws_json1_1EntitlementData - */ -const se_EntitlementData = (input: EntitlementData, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_EntitlementData omitted. -/** - * serializeAws_json1_1EntitlementDataList - */ -const se_EntitlementDataList = (input: EntitlementData[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EntitlementData(entry, context); - }); -}; +// se_EntitlementDataList omitted. -/** - * serializeAws_json1_1EntitlementList - */ -const se_EntitlementList = (input: Entitlement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Entitlement(entry, context); - }); -}; +// se_EntitlementList omitted. -/** - * serializeAws_json1_1ExtendLicenseConsumptionRequest - */ -const se_ExtendLicenseConsumptionRequest = (input: ExtendLicenseConsumptionRequest, context: __SerdeContext): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.LicenseConsumptionToken != null && { LicenseConsumptionToken: input.LicenseConsumptionToken }), - }; -}; +// se_ExtendLicenseConsumptionRequest omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_1GetAccessTokenRequest - */ -const se_GetAccessTokenRequest = (input: GetAccessTokenRequest, context: __SerdeContext): any => { - return { - ...(input.Token != null && { Token: input.Token }), - ...(input.TokenProperties != null && { TokenProperties: se_MaxSize3StringList(input.TokenProperties, context) }), - }; -}; +// se_GetAccessTokenRequest omitted. -/** - * serializeAws_json1_1GetGrantRequest - */ -const se_GetGrantRequest = (input: GetGrantRequest, context: __SerdeContext): any => { - return { - ...(input.GrantArn != null && { GrantArn: input.GrantArn }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_GetGrantRequest omitted. -/** - * serializeAws_json1_1GetLicenseConfigurationRequest - */ -const se_GetLicenseConfigurationRequest = (input: GetLicenseConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - }; -}; +// se_GetLicenseConfigurationRequest omitted. -/** - * serializeAws_json1_1GetLicenseConversionTaskRequest - */ -const se_GetLicenseConversionTaskRequest = (input: GetLicenseConversionTaskRequest, context: __SerdeContext): any => { - return { - ...(input.LicenseConversionTaskId != null && { LicenseConversionTaskId: input.LicenseConversionTaskId }), - }; -}; +// se_GetLicenseConversionTaskRequest omitted. -/** - * serializeAws_json1_1GetLicenseManagerReportGeneratorRequest - */ -const se_GetLicenseManagerReportGeneratorRequest = ( - input: GetLicenseManagerReportGeneratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.LicenseManagerReportGeneratorArn != null && { - LicenseManagerReportGeneratorArn: input.LicenseManagerReportGeneratorArn, - }), - }; -}; +// se_GetLicenseManagerReportGeneratorRequest omitted. -/** - * serializeAws_json1_1GetLicenseRequest - */ -const se_GetLicenseRequest = (input: GetLicenseRequest, context: __SerdeContext): any => { - return { - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_GetLicenseRequest omitted. -/** - * serializeAws_json1_1GetLicenseUsageRequest - */ -const se_GetLicenseUsageRequest = (input: GetLicenseUsageRequest, context: __SerdeContext): any => { - return { - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - }; -}; +// se_GetLicenseUsageRequest omitted. -/** - * serializeAws_json1_1GetServiceSettingsRequest - */ -const se_GetServiceSettingsRequest = (input: GetServiceSettingsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetServiceSettingsRequest omitted. -/** - * serializeAws_json1_1InventoryFilter - */ -const se_InventoryFilter = (input: InventoryFilter, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_InventoryFilter omitted. -/** - * serializeAws_json1_1InventoryFilterList - */ -const se_InventoryFilterList = (input: InventoryFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InventoryFilter(entry, context); - }); -}; +// se_InventoryFilterList omitted. -/** - * serializeAws_json1_1Issuer - */ -const se_Issuer = (input: Issuer, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SignKey != null && { SignKey: input.SignKey }), - }; -}; +// se_Issuer omitted. -/** - * serializeAws_json1_1LicenseConversionContext - */ -const se_LicenseConversionContext = (input: LicenseConversionContext, context: __SerdeContext): any => { - return { - ...(input.UsageOperation != null && { UsageOperation: input.UsageOperation }), - }; -}; +// se_LicenseConversionContext omitted. -/** - * serializeAws_json1_1LicenseSpecification - */ -const se_LicenseSpecification = (input: LicenseSpecification, context: __SerdeContext): any => { - return { - ...(input.AmiAssociationScope != null && { AmiAssociationScope: input.AmiAssociationScope }), - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - }; -}; +// se_LicenseSpecification omitted. -/** - * serializeAws_json1_1LicenseSpecifications - */ -const se_LicenseSpecifications = (input: LicenseSpecification[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LicenseSpecification(entry, context); - }); -}; +// se_LicenseSpecifications omitted. -/** - * serializeAws_json1_1ListAssociationsForLicenseConfigurationRequest - */ -const se_ListAssociationsForLicenseConfigurationRequest = ( - input: ListAssociationsForLicenseConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAssociationsForLicenseConfigurationRequest omitted. -/** - * serializeAws_json1_1ListDistributedGrantsRequest - */ -const se_ListDistributedGrantsRequest = (input: ListDistributedGrantsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.GrantArns != null && { GrantArns: se_ArnList(input.GrantArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDistributedGrantsRequest omitted. -/** - * serializeAws_json1_1ListFailuresForLicenseConfigurationOperationsRequest - */ -const se_ListFailuresForLicenseConfigurationOperationsRequest = ( - input: ListFailuresForLicenseConfigurationOperationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFailuresForLicenseConfigurationOperationsRequest omitted. -/** - * serializeAws_json1_1ListLicenseConfigurationsRequest - */ -const se_ListLicenseConfigurationsRequest = (input: ListLicenseConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.LicenseConfigurationArns != null && { - LicenseConfigurationArns: se_StringList(input.LicenseConfigurationArns, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLicenseConfigurationsRequest omitted. -/** - * serializeAws_json1_1ListLicenseConversionTasksRequest - */ -const se_ListLicenseConversionTasksRequest = ( - input: ListLicenseConversionTasksRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLicenseConversionTasksRequest omitted. -/** - * serializeAws_json1_1ListLicenseManagerReportGeneratorsRequest - */ -const se_ListLicenseManagerReportGeneratorsRequest = ( - input: ListLicenseManagerReportGeneratorsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLicenseManagerReportGeneratorsRequest omitted. -/** - * serializeAws_json1_1ListLicenseSpecificationsForResourceRequest - */ -const se_ListLicenseSpecificationsForResourceRequest = ( - input: ListLicenseSpecificationsForResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListLicenseSpecificationsForResourceRequest omitted. -/** - * serializeAws_json1_1ListLicensesRequest - */ -const se_ListLicensesRequest = (input: ListLicensesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.LicenseArns != null && { LicenseArns: se_ArnList(input.LicenseArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLicensesRequest omitted. -/** - * serializeAws_json1_1ListLicenseVersionsRequest - */ -const se_ListLicenseVersionsRequest = (input: ListLicenseVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLicenseVersionsRequest omitted. -/** - * serializeAws_json1_1ListReceivedGrantsForOrganizationRequest - */ -const se_ListReceivedGrantsForOrganizationRequest = ( - input: ListReceivedGrantsForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.LicenseArn != null && { LicenseArn: input.LicenseArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListReceivedGrantsForOrganizationRequest omitted. -/** - * serializeAws_json1_1ListReceivedGrantsRequest - */ -const se_ListReceivedGrantsRequest = (input: ListReceivedGrantsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.GrantArns != null && { GrantArns: se_ArnList(input.GrantArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListReceivedGrantsRequest omitted. -/** - * serializeAws_json1_1ListReceivedLicensesForOrganizationRequest - */ -const se_ListReceivedLicensesForOrganizationRequest = ( - input: ListReceivedLicensesForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListReceivedLicensesForOrganizationRequest omitted. -/** - * serializeAws_json1_1ListReceivedLicensesRequest - */ -const se_ListReceivedLicensesRequest = (input: ListReceivedLicensesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.LicenseArns != null && { LicenseArns: se_ArnList(input.LicenseArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListReceivedLicensesRequest omitted. -/** - * serializeAws_json1_1ListResourceInventoryRequest - */ -const se_ListResourceInventoryRequest = (input: ListResourceInventoryRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_InventoryFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResourceInventoryRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListTokensRequest - */ -const se_ListTokensRequest = (input: ListTokensRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TokenIds != null && { TokenIds: se_StringList(input.TokenIds, context) }), - }; -}; +// se_ListTokensRequest omitted. -/** - * serializeAws_json1_1ListUsageForLicenseConfigurationRequest - */ -const se_ListUsageForLicenseConfigurationRequest = ( - input: ListUsageForLicenseConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListUsageForLicenseConfigurationRequest omitted. -/** - * serializeAws_json1_1MaxSize3StringList - */ -const se_MaxSize3StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MaxSize3StringList omitted. -/** - * serializeAws_json1_1Metadata - */ -const se_Metadata = (input: Metadata, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Metadata omitted. -/** - * serializeAws_json1_1MetadataList - */ -const se_MetadataList = (input: Metadata[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Metadata(entry, context); - }); -}; +// se_MetadataList omitted. -/** - * serializeAws_json1_1Options - */ -const se_Options = (input: Options, context: __SerdeContext): any => { - return { - ...(input.ActivationOverrideBehavior != null && { ActivationOverrideBehavior: input.ActivationOverrideBehavior }), - }; -}; +// se_Options omitted. -/** - * serializeAws_json1_1OrganizationConfiguration - */ -const se_OrganizationConfiguration = (input: OrganizationConfiguration, context: __SerdeContext): any => { - return { - ...(input.EnableIntegration != null && { EnableIntegration: input.EnableIntegration }), - }; -}; +// se_OrganizationConfiguration omitted. -/** - * serializeAws_json1_1PrincipalArnList - */ -const se_PrincipalArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PrincipalArnList omitted. -/** - * serializeAws_json1_1ProductInformation - */ -const se_ProductInformation = (input: ProductInformation, context: __SerdeContext): any => { - return { - ...(input.ProductInformationFilterList != null && { - ProductInformationFilterList: se_ProductInformationFilterList(input.ProductInformationFilterList, context), - }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_ProductInformation omitted. -/** - * serializeAws_json1_1ProductInformationFilter - */ -const se_ProductInformationFilter = (input: ProductInformationFilter, context: __SerdeContext): any => { - return { - ...(input.ProductInformationFilterComparator != null && { - ProductInformationFilterComparator: input.ProductInformationFilterComparator, - }), - ...(input.ProductInformationFilterName != null && { - ProductInformationFilterName: input.ProductInformationFilterName, - }), - ...(input.ProductInformationFilterValue != null && { - ProductInformationFilterValue: se_StringList(input.ProductInformationFilterValue, context), - }), - }; -}; +// se_ProductInformationFilter omitted. -/** - * serializeAws_json1_1ProductInformationFilterList - */ -const se_ProductInformationFilterList = (input: ProductInformationFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProductInformationFilter(entry, context); - }); -}; +// se_ProductInformationFilterList omitted. -/** - * serializeAws_json1_1ProductInformationList - */ -const se_ProductInformationList = (input: ProductInformation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProductInformation(entry, context); - }); -}; +// se_ProductInformationList omitted. -/** - * serializeAws_json1_1ProvisionalConfiguration - */ -const se_ProvisionalConfiguration = (input: ProvisionalConfiguration, context: __SerdeContext): any => { - return { - ...(input.MaxTimeToLiveInMinutes != null && { MaxTimeToLiveInMinutes: input.MaxTimeToLiveInMinutes }), - }; -}; +// se_ProvisionalConfiguration omitted. -/** - * serializeAws_json1_1RejectGrantRequest - */ -const se_RejectGrantRequest = (input: RejectGrantRequest, context: __SerdeContext): any => { - return { - ...(input.GrantArn != null && { GrantArn: input.GrantArn }), - }; -}; +// se_RejectGrantRequest omitted. -/** - * serializeAws_json1_1ReportContext - */ -const se_ReportContext = (input: ReportContext, context: __SerdeContext): any => { - return { - ...(input.licenseConfigurationArns != null && { - licenseConfigurationArns: se_ArnList(input.licenseConfigurationArns, context), - }), - }; -}; +// se_ReportContext omitted. -/** - * serializeAws_json1_1ReportFrequency - */ -const se_ReportFrequency = (input: ReportFrequency, context: __SerdeContext): any => { - return { - ...(input.period != null && { period: input.period }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ReportFrequency omitted. -/** - * serializeAws_json1_1ReportTypeList - */ -const se_ReportTypeList = (input: (ReportType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ReportTypeList omitted. -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateLicenseConfigurationRequest - */ -const se_UpdateLicenseConfigurationRequest = ( - input: UpdateLicenseConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisassociateWhenNotFound != null && { DisassociateWhenNotFound: input.DisassociateWhenNotFound }), - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - ...(input.LicenseConfigurationStatus != null && { LicenseConfigurationStatus: input.LicenseConfigurationStatus }), - ...(input.LicenseCount != null && { LicenseCount: input.LicenseCount }), - ...(input.LicenseCountHardLimit != null && { LicenseCountHardLimit: input.LicenseCountHardLimit }), - ...(input.LicenseRules != null && { LicenseRules: se_StringList(input.LicenseRules, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ProductInformationList != null && { - ProductInformationList: se_ProductInformationList(input.ProductInformationList, context), - }), - }; -}; +// se_UpdateLicenseConfigurationRequest omitted. -/** - * serializeAws_json1_1UpdateLicenseManagerReportGeneratorRequest - */ -const se_UpdateLicenseManagerReportGeneratorRequest = ( - input: UpdateLicenseManagerReportGeneratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LicenseManagerReportGeneratorArn != null && { - LicenseManagerReportGeneratorArn: input.LicenseManagerReportGeneratorArn, - }), - ...(input.ReportContext != null && { ReportContext: se_ReportContext(input.ReportContext, context) }), - ...(input.ReportFrequency != null && { ReportFrequency: se_ReportFrequency(input.ReportFrequency, context) }), - ...(input.ReportGeneratorName != null && { ReportGeneratorName: input.ReportGeneratorName }), - ...(input.Type != null && { Type: se_ReportTypeList(input.Type, context) }), - }; -}; +// se_UpdateLicenseManagerReportGeneratorRequest omitted. -/** - * serializeAws_json1_1UpdateLicenseSpecificationsForResourceRequest - */ -const se_UpdateLicenseSpecificationsForResourceRequest = ( - input: UpdateLicenseSpecificationsForResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.AddLicenseSpecifications != null && { - AddLicenseSpecifications: se_LicenseSpecifications(input.AddLicenseSpecifications, context), - }), - ...(input.RemoveLicenseSpecifications != null && { - RemoveLicenseSpecifications: se_LicenseSpecifications(input.RemoveLicenseSpecifications, context), - }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_UpdateLicenseSpecificationsForResourceRequest omitted. -/** - * serializeAws_json1_1UpdateServiceSettingsRequest - */ -const se_UpdateServiceSettingsRequest = (input: UpdateServiceSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.EnableCrossAccountsDiscovery != null && { - EnableCrossAccountsDiscovery: input.EnableCrossAccountsDiscovery, - }), - ...(input.OrganizationConfiguration != null && { - OrganizationConfiguration: se_OrganizationConfiguration(input.OrganizationConfiguration, context), - }), - ...(input.S3BucketArn != null && { S3BucketArn: input.S3BucketArn }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - }; -}; +// se_UpdateServiceSettingsRequest omitted. -/** - * deserializeAws_json1_1AcceptGrantResponse - */ -const de_AcceptGrantResponse = (output: any, context: __SerdeContext): AcceptGrantResponse => { - return { - GrantArn: __expectString(output.GrantArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; +// de_AcceptGrantResponse omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AllowedOperationList - */ -const de_AllowedOperationList = (output: any, context: __SerdeContext): (AllowedOperation | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AllowedOperationList omitted. -/** - * deserializeAws_json1_1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArnList omitted. -/** - * deserializeAws_json1_1AuthorizationException - */ -const de_AuthorizationException = (output: any, context: __SerdeContext): AuthorizationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AuthorizationException omitted. /** * deserializeAws_json1_1AutomatedDiscoveryInformation */ const de_AutomatedDiscoveryInformation = (output: any, context: __SerdeContext): AutomatedDiscoveryInformation => { - return { - LastRunTime: - output.LastRunTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRunTime))) - : undefined, - } as any; + return take(output, { + LastRunTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1BorrowConfiguration - */ -const de_BorrowConfiguration = (output: any, context: __SerdeContext): BorrowConfiguration => { - return { - AllowEarlyCheckIn: __expectBoolean(output.AllowEarlyCheckIn), - MaxTimeToLiveInMinutes: __expectInt32(output.MaxTimeToLiveInMinutes), - } as any; -}; +// de_BorrowConfiguration omitted. -/** - * deserializeAws_json1_1CheckInLicenseResponse - */ -const de_CheckInLicenseResponse = (output: any, context: __SerdeContext): CheckInLicenseResponse => { - return {} as any; -}; +// de_CheckInLicenseResponse omitted. -/** - * deserializeAws_json1_1CheckoutBorrowLicenseResponse - */ -const de_CheckoutBorrowLicenseResponse = (output: any, context: __SerdeContext): CheckoutBorrowLicenseResponse => { - return { - CheckoutMetadata: output.CheckoutMetadata != null ? de_MetadataList(output.CheckoutMetadata, context) : undefined, - EntitlementsAllowed: - output.EntitlementsAllowed != null ? de_EntitlementDataList(output.EntitlementsAllowed, context) : undefined, - Expiration: __expectString(output.Expiration), - IssuedAt: __expectString(output.IssuedAt), - LicenseArn: __expectString(output.LicenseArn), - LicenseConsumptionToken: __expectString(output.LicenseConsumptionToken), - NodeId: __expectString(output.NodeId), - SignedToken: __expectString(output.SignedToken), - } as any; -}; +// de_CheckoutBorrowLicenseResponse omitted. -/** - * deserializeAws_json1_1CheckoutLicenseResponse - */ -const de_CheckoutLicenseResponse = (output: any, context: __SerdeContext): CheckoutLicenseResponse => { - return { - CheckoutType: __expectString(output.CheckoutType), - EntitlementsAllowed: - output.EntitlementsAllowed != null ? de_EntitlementDataList(output.EntitlementsAllowed, context) : undefined, - Expiration: __expectString(output.Expiration), - IssuedAt: __expectString(output.IssuedAt), - LicenseArn: __expectString(output.LicenseArn), - LicenseConsumptionToken: __expectString(output.LicenseConsumptionToken), - NodeId: __expectString(output.NodeId), - SignedToken: __expectString(output.SignedToken), - } as any; -}; +// de_CheckoutLicenseResponse omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1ConsumedLicenseSummary - */ -const de_ConsumedLicenseSummary = (output: any, context: __SerdeContext): ConsumedLicenseSummary => { - return { - ConsumedLicenses: __expectLong(output.ConsumedLicenses), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ConsumedLicenseSummary omitted. -/** - * deserializeAws_json1_1ConsumedLicenseSummaryList - */ -const de_ConsumedLicenseSummaryList = (output: any, context: __SerdeContext): ConsumedLicenseSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConsumedLicenseSummary(entry, context); - }); - return retVal; -}; +// de_ConsumedLicenseSummaryList omitted. -/** - * deserializeAws_json1_1ConsumptionConfiguration - */ -const de_ConsumptionConfiguration = (output: any, context: __SerdeContext): ConsumptionConfiguration => { - return { - BorrowConfiguration: - output.BorrowConfiguration != null ? de_BorrowConfiguration(output.BorrowConfiguration, context) : undefined, - ProvisionalConfiguration: - output.ProvisionalConfiguration != null - ? de_ProvisionalConfiguration(output.ProvisionalConfiguration, context) - : undefined, - RenewType: __expectString(output.RenewType), - } as any; -}; - -/** - * deserializeAws_json1_1CreateGrantResponse - */ -const de_CreateGrantResponse = (output: any, context: __SerdeContext): CreateGrantResponse => { - return { - GrantArn: __expectString(output.GrantArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1CreateGrantVersionResponse - */ -const de_CreateGrantVersionResponse = (output: any, context: __SerdeContext): CreateGrantVersionResponse => { - return { - GrantArn: __expectString(output.GrantArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1CreateLicenseConfigurationResponse - */ -const de_CreateLicenseConfigurationResponse = ( - output: any, - context: __SerdeContext -): CreateLicenseConfigurationResponse => { - return { - LicenseConfigurationArn: __expectString(output.LicenseConfigurationArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateLicenseConversionTaskForResourceResponse - */ -const de_CreateLicenseConversionTaskForResourceResponse = ( - output: any, - context: __SerdeContext -): CreateLicenseConversionTaskForResourceResponse => { - return { - LicenseConversionTaskId: __expectString(output.LicenseConversionTaskId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateLicenseManagerReportGeneratorResponse - */ -const de_CreateLicenseManagerReportGeneratorResponse = ( - output: any, - context: __SerdeContext -): CreateLicenseManagerReportGeneratorResponse => { - return { - LicenseManagerReportGeneratorArn: __expectString(output.LicenseManagerReportGeneratorArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateLicenseResponse - */ -const de_CreateLicenseResponse = (output: any, context: __SerdeContext): CreateLicenseResponse => { - return { - LicenseArn: __expectString(output.LicenseArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1CreateLicenseVersionResponse - */ -const de_CreateLicenseVersionResponse = (output: any, context: __SerdeContext): CreateLicenseVersionResponse => { - return { - LicenseArn: __expectString(output.LicenseArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1CreateTokenResponse - */ -const de_CreateTokenResponse = (output: any, context: __SerdeContext): CreateTokenResponse => { - return { - Token: __expectString(output.Token), - TokenId: __expectString(output.TokenId), - TokenType: __expectString(output.TokenType), - } as any; -}; - -/** - * deserializeAws_json1_1DatetimeRange - */ -const de_DatetimeRange = (output: any, context: __SerdeContext): DatetimeRange => { - return { - Begin: __expectString(output.Begin), - End: __expectString(output.End), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteGrantResponse - */ -const de_DeleteGrantResponse = (output: any, context: __SerdeContext): DeleteGrantResponse => { - return { - GrantArn: __expectString(output.GrantArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteLicenseConfigurationResponse - */ -const de_DeleteLicenseConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteLicenseConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteLicenseManagerReportGeneratorResponse - */ -const de_DeleteLicenseManagerReportGeneratorResponse = ( - output: any, - context: __SerdeContext -): DeleteLicenseManagerReportGeneratorResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteLicenseResponse - */ -const de_DeleteLicenseResponse = (output: any, context: __SerdeContext): DeleteLicenseResponse => { - return { - DeletionDate: __expectString(output.DeletionDate), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTokenResponse - */ -const de_DeleteTokenResponse = (output: any, context: __SerdeContext): DeleteTokenResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1Entitlement - */ -const de_Entitlement = (output: any, context: __SerdeContext): Entitlement => { - return { - AllowCheckIn: __expectBoolean(output.AllowCheckIn), - MaxCount: __expectLong(output.MaxCount), - Name: __expectString(output.Name), - Overage: __expectBoolean(output.Overage), - Unit: __expectString(output.Unit), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1EntitlementData - */ -const de_EntitlementData = (output: any, context: __SerdeContext): EntitlementData => { - return { - Name: __expectString(output.Name), - Unit: __expectString(output.Unit), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1EntitlementDataList - */ -const de_EntitlementDataList = (output: any, context: __SerdeContext): EntitlementData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntitlementData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EntitlementList - */ -const de_EntitlementList = (output: any, context: __SerdeContext): Entitlement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Entitlement(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EntitlementNotAllowedException - */ -const de_EntitlementNotAllowedException = (output: any, context: __SerdeContext): EntitlementNotAllowedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConsumptionConfiguration omitted. -/** - * deserializeAws_json1_1EntitlementUsage - */ -const de_EntitlementUsage = (output: any, context: __SerdeContext): EntitlementUsage => { - return { - ConsumedValue: __expectString(output.ConsumedValue), - MaxCount: __expectString(output.MaxCount), - Name: __expectString(output.Name), - Unit: __expectString(output.Unit), - } as any; -}; +// de_CreateGrantResponse omitted. -/** - * deserializeAws_json1_1EntitlementUsageList - */ -const de_EntitlementUsageList = (output: any, context: __SerdeContext): EntitlementUsage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntitlementUsage(entry, context); - }); - return retVal; -}; +// de_CreateGrantVersionResponse omitted. -/** - * deserializeAws_json1_1ExtendLicenseConsumptionResponse - */ -const de_ExtendLicenseConsumptionResponse = ( - output: any, - context: __SerdeContext -): ExtendLicenseConsumptionResponse => { - return { - Expiration: __expectString(output.Expiration), - LicenseConsumptionToken: __expectString(output.LicenseConsumptionToken), - } as any; -}; +// de_CreateLicenseConfigurationResponse omitted. -/** - * deserializeAws_json1_1FailedDependencyException - */ -const de_FailedDependencyException = (output: any, context: __SerdeContext): FailedDependencyException => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_CreateLicenseConversionTaskForResourceResponse omitted. -/** - * deserializeAws_json1_1FilterLimitExceededException - */ -const de_FilterLimitExceededException = (output: any, context: __SerdeContext): FilterLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CreateLicenseManagerReportGeneratorResponse omitted. -/** - * deserializeAws_json1_1GetAccessTokenResponse - */ -const de_GetAccessTokenResponse = (output: any, context: __SerdeContext): GetAccessTokenResponse => { - return { - AccessToken: __expectString(output.AccessToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetGrantResponse - */ -const de_GetGrantResponse = (output: any, context: __SerdeContext): GetGrantResponse => { - return { - Grant: output.Grant != null ? de_Grant(output.Grant, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetLicenseConfigurationResponse - */ -const de_GetLicenseConfigurationResponse = (output: any, context: __SerdeContext): GetLicenseConfigurationResponse => { - return { - AutomatedDiscoveryInformation: - output.AutomatedDiscoveryInformation != null - ? de_AutomatedDiscoveryInformation(output.AutomatedDiscoveryInformation, context) - : undefined, - ConsumedLicenseSummaryList: - output.ConsumedLicenseSummaryList != null - ? de_ConsumedLicenseSummaryList(output.ConsumedLicenseSummaryList, context) - : undefined, - ConsumedLicenses: __expectLong(output.ConsumedLicenses), - Description: __expectString(output.Description), - DisassociateWhenNotFound: __expectBoolean(output.DisassociateWhenNotFound), - LicenseConfigurationArn: __expectString(output.LicenseConfigurationArn), - LicenseConfigurationId: __expectString(output.LicenseConfigurationId), - LicenseCount: __expectLong(output.LicenseCount), - LicenseCountHardLimit: __expectBoolean(output.LicenseCountHardLimit), - LicenseCountingType: __expectString(output.LicenseCountingType), - LicenseRules: output.LicenseRules != null ? de_StringList(output.LicenseRules, context) : undefined, - ManagedResourceSummaryList: - output.ManagedResourceSummaryList != null - ? de_ManagedResourceSummaryList(output.ManagedResourceSummaryList, context) - : undefined, - Name: __expectString(output.Name), - OwnerAccountId: __expectString(output.OwnerAccountId), - ProductInformationList: - output.ProductInformationList != null - ? de_ProductInformationList(output.ProductInformationList, context) - : undefined, - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetLicenseConversionTaskResponse - */ -const de_GetLicenseConversionTaskResponse = ( - output: any, - context: __SerdeContext -): GetLicenseConversionTaskResponse => { - return { - DestinationLicenseContext: - output.DestinationLicenseContext != null - ? de_LicenseConversionContext(output.DestinationLicenseContext, context) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - LicenseConversionTaskId: __expectString(output.LicenseConversionTaskId), - LicenseConversionTime: - output.LicenseConversionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LicenseConversionTime))) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - SourceLicenseContext: - output.SourceLicenseContext != null - ? de_LicenseConversionContext(output.SourceLicenseContext, context) - : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_json1_1GetLicenseManagerReportGeneratorResponse - */ -const de_GetLicenseManagerReportGeneratorResponse = ( - output: any, - context: __SerdeContext -): GetLicenseManagerReportGeneratorResponse => { - return { - ReportGenerator: output.ReportGenerator != null ? de_ReportGenerator(output.ReportGenerator, context) : undefined, - } as any; -}; +// de_CreateLicenseResponse omitted. -/** - * deserializeAws_json1_1GetLicenseResponse - */ -const de_GetLicenseResponse = (output: any, context: __SerdeContext): GetLicenseResponse => { - return { - License: output.License != null ? de_License(output.License, context) : undefined, - } as any; -}; +// de_CreateLicenseVersionResponse omitted. -/** - * deserializeAws_json1_1GetLicenseUsageResponse - */ -const de_GetLicenseUsageResponse = (output: any, context: __SerdeContext): GetLicenseUsageResponse => { - return { - LicenseUsage: output.LicenseUsage != null ? de_LicenseUsage(output.LicenseUsage, context) : undefined, - } as any; -}; +// de_CreateTokenResponse omitted. -/** - * deserializeAws_json1_1GetServiceSettingsResponse - */ -const de_GetServiceSettingsResponse = (output: any, context: __SerdeContext): GetServiceSettingsResponse => { - return { - EnableCrossAccountsDiscovery: __expectBoolean(output.EnableCrossAccountsDiscovery), - LicenseManagerResourceShareArn: __expectString(output.LicenseManagerResourceShareArn), - OrganizationConfiguration: - output.OrganizationConfiguration != null - ? de_OrganizationConfiguration(output.OrganizationConfiguration, context) - : undefined, - S3BucketArn: __expectString(output.S3BucketArn), - SnsTopicArn: __expectString(output.SnsTopicArn), - } as any; -}; +// de_DatetimeRange omitted. -/** - * deserializeAws_json1_1Grant - */ -const de_Grant = (output: any, context: __SerdeContext): Grant => { - return { - GrantArn: __expectString(output.GrantArn), - GrantName: __expectString(output.GrantName), - GrantStatus: __expectString(output.GrantStatus), - GrantedOperations: - output.GrantedOperations != null ? de_AllowedOperationList(output.GrantedOperations, context) : undefined, - GranteePrincipalArn: __expectString(output.GranteePrincipalArn), - HomeRegion: __expectString(output.HomeRegion), - LicenseArn: __expectString(output.LicenseArn), - Options: output.Options != null ? de_Options(output.Options, context) : undefined, - ParentArn: __expectString(output.ParentArn), - StatusReason: __expectString(output.StatusReason), - Version: __expectString(output.Version), - } as any; -}; +// de_DeleteGrantResponse omitted. -/** - * deserializeAws_json1_1GrantedLicense - */ -const de_GrantedLicense = (output: any, context: __SerdeContext): GrantedLicense => { - return { - Beneficiary: __expectString(output.Beneficiary), - ConsumptionConfiguration: - output.ConsumptionConfiguration != null - ? de_ConsumptionConfiguration(output.ConsumptionConfiguration, context) - : undefined, - CreateTime: __expectString(output.CreateTime), - Entitlements: output.Entitlements != null ? de_EntitlementList(output.Entitlements, context) : undefined, - HomeRegion: __expectString(output.HomeRegion), - Issuer: output.Issuer != null ? de_IssuerDetails(output.Issuer, context) : undefined, - LicenseArn: __expectString(output.LicenseArn), - LicenseMetadata: output.LicenseMetadata != null ? de_MetadataList(output.LicenseMetadata, context) : undefined, - LicenseName: __expectString(output.LicenseName), - ProductName: __expectString(output.ProductName), - ProductSKU: __expectString(output.ProductSKU), - ReceivedMetadata: - output.ReceivedMetadata != null ? de_ReceivedMetadata(output.ReceivedMetadata, context) : undefined, - Status: __expectString(output.Status), - Validity: output.Validity != null ? de_DatetimeRange(output.Validity, context) : undefined, - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1GrantedLicenseList - */ -const de_GrantedLicenseList = (output: any, context: __SerdeContext): GrantedLicense[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GrantedLicense(entry, context); - }); - return retVal; -}; +// de_DeleteLicenseConfigurationResponse omitted. -/** - * deserializeAws_json1_1GrantList - */ -const de_GrantList = (output: any, context: __SerdeContext): Grant[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Grant(entry, context); - }); - return retVal; -}; +// de_DeleteLicenseManagerReportGeneratorResponse omitted. -/** - * deserializeAws_json1_1InvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DeleteLicenseResponse omitted. -/** - * deserializeAws_json1_1InvalidResourceStateException - */ -const de_InvalidResourceStateException = (output: any, context: __SerdeContext): InvalidResourceStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DeleteTokenResponse omitted. -/** - * deserializeAws_json1_1IssuerDetails - */ -const de_IssuerDetails = (output: any, context: __SerdeContext): IssuerDetails => { - return { - KeyFingerprint: __expectString(output.KeyFingerprint), - Name: __expectString(output.Name), - SignKey: __expectString(output.SignKey), - } as any; -}; +// de_Entitlement omitted. -/** - * deserializeAws_json1_1License - */ -const de_License = (output: any, context: __SerdeContext): License => { - return { - Beneficiary: __expectString(output.Beneficiary), - ConsumptionConfiguration: - output.ConsumptionConfiguration != null - ? de_ConsumptionConfiguration(output.ConsumptionConfiguration, context) - : undefined, - CreateTime: __expectString(output.CreateTime), - Entitlements: output.Entitlements != null ? de_EntitlementList(output.Entitlements, context) : undefined, - HomeRegion: __expectString(output.HomeRegion), - Issuer: output.Issuer != null ? de_IssuerDetails(output.Issuer, context) : undefined, - LicenseArn: __expectString(output.LicenseArn), - LicenseMetadata: output.LicenseMetadata != null ? de_MetadataList(output.LicenseMetadata, context) : undefined, - LicenseName: __expectString(output.LicenseName), - ProductName: __expectString(output.ProductName), - ProductSKU: __expectString(output.ProductSKU), - Status: __expectString(output.Status), - Validity: output.Validity != null ? de_DatetimeRange(output.Validity, context) : undefined, - Version: __expectString(output.Version), - } as any; -}; +// de_EntitlementData omitted. -/** - * deserializeAws_json1_1LicenseConfiguration - */ -const de_LicenseConfiguration = (output: any, context: __SerdeContext): LicenseConfiguration => { - return { - AutomatedDiscoveryInformation: - output.AutomatedDiscoveryInformation != null - ? de_AutomatedDiscoveryInformation(output.AutomatedDiscoveryInformation, context) - : undefined, - ConsumedLicenseSummaryList: - output.ConsumedLicenseSummaryList != null - ? de_ConsumedLicenseSummaryList(output.ConsumedLicenseSummaryList, context) - : undefined, - ConsumedLicenses: __expectLong(output.ConsumedLicenses), - Description: __expectString(output.Description), - DisassociateWhenNotFound: __expectBoolean(output.DisassociateWhenNotFound), - LicenseConfigurationArn: __expectString(output.LicenseConfigurationArn), - LicenseConfigurationId: __expectString(output.LicenseConfigurationId), - LicenseCount: __expectLong(output.LicenseCount), - LicenseCountHardLimit: __expectBoolean(output.LicenseCountHardLimit), - LicenseCountingType: __expectString(output.LicenseCountingType), - LicenseRules: output.LicenseRules != null ? de_StringList(output.LicenseRules, context) : undefined, - ManagedResourceSummaryList: - output.ManagedResourceSummaryList != null - ? de_ManagedResourceSummaryList(output.ManagedResourceSummaryList, context) - : undefined, - Name: __expectString(output.Name), - OwnerAccountId: __expectString(output.OwnerAccountId), - ProductInformationList: - output.ProductInformationList != null - ? de_ProductInformationList(output.ProductInformationList, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseConfigurationAssociation - */ -const de_LicenseConfigurationAssociation = (output: any, context: __SerdeContext): LicenseConfigurationAssociation => { - return { - AmiAssociationScope: __expectString(output.AmiAssociationScope), - AssociationTime: - output.AssociationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AssociationTime))) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - ResourceOwnerId: __expectString(output.ResourceOwnerId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseConfigurationAssociations - */ -const de_LicenseConfigurationAssociations = ( - output: any, - context: __SerdeContext -): LicenseConfigurationAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseConfigurationAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseConfigurations - */ -const de_LicenseConfigurations = (output: any, context: __SerdeContext): LicenseConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseConfigurationUsage - */ -const de_LicenseConfigurationUsage = (output: any, context: __SerdeContext): LicenseConfigurationUsage => { - return { - AssociationTime: - output.AssociationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AssociationTime))) - : undefined, - ConsumedLicenses: __expectLong(output.ConsumedLicenses), - ResourceArn: __expectString(output.ResourceArn), - ResourceOwnerId: __expectString(output.ResourceOwnerId), - ResourceStatus: __expectString(output.ResourceStatus), - ResourceType: __expectString(output.ResourceType), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseConfigurationUsageList - */ -const de_LicenseConfigurationUsageList = (output: any, context: __SerdeContext): LicenseConfigurationUsage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseConfigurationUsage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseConversionContext - */ -const de_LicenseConversionContext = (output: any, context: __SerdeContext): LicenseConversionContext => { - return { - UsageOperation: __expectString(output.UsageOperation), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseConversionTask - */ -const de_LicenseConversionTask = (output: any, context: __SerdeContext): LicenseConversionTask => { - return { - DestinationLicenseContext: - output.DestinationLicenseContext != null - ? de_LicenseConversionContext(output.DestinationLicenseContext, context) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - LicenseConversionTaskId: __expectString(output.LicenseConversionTaskId), - LicenseConversionTime: - output.LicenseConversionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LicenseConversionTime))) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - SourceLicenseContext: - output.SourceLicenseContext != null - ? de_LicenseConversionContext(output.SourceLicenseContext, context) - : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseConversionTasks - */ -const de_LicenseConversionTasks = (output: any, context: __SerdeContext): LicenseConversionTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseConversionTask(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseList - */ -const de_LicenseList = (output: any, context: __SerdeContext): License[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_License(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseOperationFailure - */ -const de_LicenseOperationFailure = (output: any, context: __SerdeContext): LicenseOperationFailure => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - FailureTime: - output.FailureTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FailureTime))) - : undefined, - MetadataList: output.MetadataList != null ? de_MetadataList(output.MetadataList, context) : undefined, - OperationName: __expectString(output.OperationName), - OperationRequestedBy: __expectString(output.OperationRequestedBy), - ResourceArn: __expectString(output.ResourceArn), - ResourceOwnerId: __expectString(output.ResourceOwnerId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseOperationFailureList - */ -const de_LicenseOperationFailureList = (output: any, context: __SerdeContext): LicenseOperationFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseOperationFailure(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseSpecification - */ -const de_LicenseSpecification = (output: any, context: __SerdeContext): LicenseSpecification => { - return { - AmiAssociationScope: __expectString(output.AmiAssociationScope), - LicenseConfigurationArn: __expectString(output.LicenseConfigurationArn), - } as any; -}; - -/** - * deserializeAws_json1_1LicenseSpecifications - */ -const de_LicenseSpecifications = (output: any, context: __SerdeContext): LicenseSpecification[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LicenseSpecification(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LicenseUsage - */ -const de_LicenseUsage = (output: any, context: __SerdeContext): LicenseUsage => { - return { - EntitlementUsages: - output.EntitlementUsages != null ? de_EntitlementUsageList(output.EntitlementUsages, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LicenseUsageException - */ -const de_LicenseUsageException = (output: any, context: __SerdeContext): LicenseUsageException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ListAssociationsForLicenseConfigurationResponse - */ -const de_ListAssociationsForLicenseConfigurationResponse = ( - output: any, - context: __SerdeContext -): ListAssociationsForLicenseConfigurationResponse => { - return { - LicenseConfigurationAssociations: - output.LicenseConfigurationAssociations != null - ? de_LicenseConfigurationAssociations(output.LicenseConfigurationAssociations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListDistributedGrantsResponse - */ -const de_ListDistributedGrantsResponse = (output: any, context: __SerdeContext): ListDistributedGrantsResponse => { - return { - Grants: output.Grants != null ? de_GrantList(output.Grants, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListFailuresForLicenseConfigurationOperationsResponse - */ -const de_ListFailuresForLicenseConfigurationOperationsResponse = ( - output: any, - context: __SerdeContext -): ListFailuresForLicenseConfigurationOperationsResponse => { - return { - LicenseOperationFailureList: - output.LicenseOperationFailureList != null - ? de_LicenseOperationFailureList(output.LicenseOperationFailureList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLicenseConfigurationsResponse - */ -const de_ListLicenseConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListLicenseConfigurationsResponse => { - return { - LicenseConfigurations: - output.LicenseConfigurations != null - ? de_LicenseConfigurations(output.LicenseConfigurations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLicenseConversionTasksResponse - */ -const de_ListLicenseConversionTasksResponse = ( - output: any, - context: __SerdeContext -): ListLicenseConversionTasksResponse => { - return { - LicenseConversionTasks: - output.LicenseConversionTasks != null - ? de_LicenseConversionTasks(output.LicenseConversionTasks, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLicenseManagerReportGeneratorsResponse - */ -const de_ListLicenseManagerReportGeneratorsResponse = ( - output: any, - context: __SerdeContext -): ListLicenseManagerReportGeneratorsResponse => { - return { - NextToken: __expectString(output.NextToken), - ReportGenerators: - output.ReportGenerators != null ? de_ReportGeneratorList(output.ReportGenerators, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListLicenseSpecificationsForResourceResponse - */ -const de_ListLicenseSpecificationsForResourceResponse = ( - output: any, - context: __SerdeContext -): ListLicenseSpecificationsForResourceResponse => { - return { - LicenseSpecifications: - output.LicenseSpecifications != null - ? de_LicenseSpecifications(output.LicenseSpecifications, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLicensesResponse - */ -const de_ListLicensesResponse = (output: any, context: __SerdeContext): ListLicensesResponse => { - return { - Licenses: output.Licenses != null ? de_LicenseList(output.Licenses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLicenseVersionsResponse - */ -const de_ListLicenseVersionsResponse = (output: any, context: __SerdeContext): ListLicenseVersionsResponse => { - return { - Licenses: output.Licenses != null ? de_LicenseList(output.Licenses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListReceivedGrantsForOrganizationResponse - */ -const de_ListReceivedGrantsForOrganizationResponse = ( - output: any, - context: __SerdeContext -): ListReceivedGrantsForOrganizationResponse => { - return { - Grants: output.Grants != null ? de_GrantList(output.Grants, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListReceivedGrantsResponse - */ -const de_ListReceivedGrantsResponse = (output: any, context: __SerdeContext): ListReceivedGrantsResponse => { - return { - Grants: output.Grants != null ? de_GrantList(output.Grants, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListReceivedLicensesForOrganizationResponse - */ -const de_ListReceivedLicensesForOrganizationResponse = ( - output: any, - context: __SerdeContext -): ListReceivedLicensesForOrganizationResponse => { - return { - Licenses: output.Licenses != null ? de_GrantedLicenseList(output.Licenses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_EntitlementDataList omitted. -/** - * deserializeAws_json1_1ListReceivedLicensesResponse - */ -const de_ListReceivedLicensesResponse = (output: any, context: __SerdeContext): ListReceivedLicensesResponse => { - return { - Licenses: output.Licenses != null ? de_GrantedLicenseList(output.Licenses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_EntitlementList omitted. -/** - * deserializeAws_json1_1ListResourceInventoryResponse - */ -const de_ListResourceInventoryResponse = (output: any, context: __SerdeContext): ListResourceInventoryResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceInventoryList: - output.ResourceInventoryList != null - ? de_ResourceInventoryList(output.ResourceInventoryList, context) - : undefined, - } as any; -}; +// de_EntitlementNotAllowedException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_EntitlementUsage omitted. -/** - * deserializeAws_json1_1ListTokensResponse - */ -const de_ListTokensResponse = (output: any, context: __SerdeContext): ListTokensResponse => { - return { - NextToken: __expectString(output.NextToken), - Tokens: output.Tokens != null ? de_TokenList(output.Tokens, context) : undefined, - } as any; -}; +// de_EntitlementUsageList omitted. -/** - * deserializeAws_json1_1ListUsageForLicenseConfigurationResponse - */ -const de_ListUsageForLicenseConfigurationResponse = ( - output: any, - context: __SerdeContext -): ListUsageForLicenseConfigurationResponse => { - return { - LicenseConfigurationUsageList: - output.LicenseConfigurationUsageList != null - ? de_LicenseConfigurationUsageList(output.LicenseConfigurationUsageList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ExtendLicenseConsumptionResponse omitted. -/** - * deserializeAws_json1_1ManagedResourceSummary - */ -const de_ManagedResourceSummary = (output: any, context: __SerdeContext): ManagedResourceSummary => { - return { - AssociationCount: __expectLong(output.AssociationCount), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_FailedDependencyException omitted. -/** - * deserializeAws_json1_1ManagedResourceSummaryList - */ -const de_ManagedResourceSummaryList = (output: any, context: __SerdeContext): ManagedResourceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedResourceSummary(entry, context); - }); - return retVal; -}; +// de_FilterLimitExceededException omitted. -/** - * deserializeAws_json1_1MaxSize3StringList - */ -const de_MaxSize3StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GetAccessTokenResponse omitted. -/** - * deserializeAws_json1_1Metadata - */ -const de_Metadata = (output: any, context: __SerdeContext): Metadata => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_GetGrantResponse omitted. /** - * deserializeAws_json1_1MetadataList + * deserializeAws_json1_1GetLicenseConfigurationResponse */ -const de_MetadataList = (output: any, context: __SerdeContext): Metadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Metadata(entry, context); - }); - return retVal; +const de_GetLicenseConfigurationResponse = (output: any, context: __SerdeContext): GetLicenseConfigurationResponse => { + return take(output, { + AutomatedDiscoveryInformation: (_: any) => de_AutomatedDiscoveryInformation(_, context), + ConsumedLicenseSummaryList: _json, + ConsumedLicenses: __expectLong, + Description: __expectString, + DisassociateWhenNotFound: __expectBoolean, + LicenseConfigurationArn: __expectString, + LicenseConfigurationId: __expectString, + LicenseCount: __expectLong, + LicenseCountHardLimit: __expectBoolean, + LicenseCountingType: __expectString, + LicenseRules: _json, + ManagedResourceSummaryList: _json, + Name: __expectString, + OwnerAccountId: __expectString, + ProductInformationList: _json, + Status: __expectString, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1NoEntitlementsAllowedException + * deserializeAws_json1_1GetLicenseConversionTaskResponse */ -const de_NoEntitlementsAllowedException = (output: any, context: __SerdeContext): NoEntitlementsAllowedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_GetLicenseConversionTaskResponse = ( + output: any, + context: __SerdeContext +): GetLicenseConversionTaskResponse => { + return take(output, { + DestinationLicenseContext: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LicenseConversionTaskId: __expectString, + LicenseConversionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + SourceLicenseContext: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1Options - */ -const de_Options = (output: any, context: __SerdeContext): Options => { - return { - ActivationOverrideBehavior: __expectString(output.ActivationOverrideBehavior), - } as any; -}; +// de_GetLicenseManagerReportGeneratorResponse omitted. -/** - * deserializeAws_json1_1OrganizationConfiguration - */ -const de_OrganizationConfiguration = (output: any, context: __SerdeContext): OrganizationConfiguration => { - return { - EnableIntegration: __expectBoolean(output.EnableIntegration), - } as any; -}; +// de_GetLicenseResponse omitted. -/** - * deserializeAws_json1_1ProductInformation - */ -const de_ProductInformation = (output: any, context: __SerdeContext): ProductInformation => { - return { - ProductInformationFilterList: - output.ProductInformationFilterList != null - ? de_ProductInformationFilterList(output.ProductInformationFilterList, context) - : undefined, - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_GetLicenseUsageResponse omitted. -/** - * deserializeAws_json1_1ProductInformationFilter - */ -const de_ProductInformationFilter = (output: any, context: __SerdeContext): ProductInformationFilter => { - return { - ProductInformationFilterComparator: __expectString(output.ProductInformationFilterComparator), - ProductInformationFilterName: __expectString(output.ProductInformationFilterName), - ProductInformationFilterValue: - output.ProductInformationFilterValue != null - ? de_StringList(output.ProductInformationFilterValue, context) - : undefined, - } as any; -}; +// de_GetServiceSettingsResponse omitted. -/** - * deserializeAws_json1_1ProductInformationFilterList - */ -const de_ProductInformationFilterList = (output: any, context: __SerdeContext): ProductInformationFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductInformationFilter(entry, context); - }); - return retVal; -}; +// de_Grant omitted. -/** - * deserializeAws_json1_1ProductInformationList - */ -const de_ProductInformationList = (output: any, context: __SerdeContext): ProductInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductInformation(entry, context); - }); - return retVal; -}; +// de_GrantedLicense omitted. -/** - * deserializeAws_json1_1ProvisionalConfiguration - */ -const de_ProvisionalConfiguration = (output: any, context: __SerdeContext): ProvisionalConfiguration => { - return { - MaxTimeToLiveInMinutes: __expectInt32(output.MaxTimeToLiveInMinutes), - } as any; -}; +// de_GrantedLicenseList omitted. -/** - * deserializeAws_json1_1RateLimitExceededException - */ -const de_RateLimitExceededException = (output: any, context: __SerdeContext): RateLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_GrantList omitted. -/** - * deserializeAws_json1_1ReceivedMetadata - */ -const de_ReceivedMetadata = (output: any, context: __SerdeContext): ReceivedMetadata => { - return { - AllowedOperations: - output.AllowedOperations != null ? de_AllowedOperationList(output.AllowedOperations, context) : undefined, - ReceivedStatus: __expectString(output.ReceivedStatus), - ReceivedStatusReason: __expectString(output.ReceivedStatusReason), - } as any; -}; +// de_InvalidParameterValueException omitted. -/** - * deserializeAws_json1_1RedirectException - */ -const de_RedirectException = (output: any, context: __SerdeContext): RedirectException => { - return { - Location: __expectString(output.Location), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidResourceStateException omitted. -/** - * deserializeAws_json1_1RejectGrantResponse - */ -const de_RejectGrantResponse = (output: any, context: __SerdeContext): RejectGrantResponse => { - return { - GrantArn: __expectString(output.GrantArn), - Status: __expectString(output.Status), - Version: __expectString(output.Version), - } as any; -}; +// de_IssuerDetails omitted. + +// de_License omitted. /** - * deserializeAws_json1_1ReportContext + * deserializeAws_json1_1LicenseConfiguration */ -const de_ReportContext = (output: any, context: __SerdeContext): ReportContext => { - return { - licenseConfigurationArns: - output.licenseConfigurationArns != null ? de_ArnList(output.licenseConfigurationArns, context) : undefined, - } as any; +const de_LicenseConfiguration = (output: any, context: __SerdeContext): LicenseConfiguration => { + return take(output, { + AutomatedDiscoveryInformation: (_: any) => de_AutomatedDiscoveryInformation(_, context), + ConsumedLicenseSummaryList: _json, + ConsumedLicenses: __expectLong, + Description: __expectString, + DisassociateWhenNotFound: __expectBoolean, + LicenseConfigurationArn: __expectString, + LicenseConfigurationId: __expectString, + LicenseCount: __expectLong, + LicenseCountHardLimit: __expectBoolean, + LicenseCountingType: __expectString, + LicenseRules: _json, + ManagedResourceSummaryList: _json, + Name: __expectString, + OwnerAccountId: __expectString, + ProductInformationList: _json, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ReportFrequency + * deserializeAws_json1_1LicenseConfigurationAssociation */ -const de_ReportFrequency = (output: any, context: __SerdeContext): ReportFrequency => { - return { - period: __expectString(output.period), - value: __expectInt32(output.value), - } as any; +const de_LicenseConfigurationAssociation = (output: any, context: __SerdeContext): LicenseConfigurationAssociation => { + return take(output, { + AmiAssociationScope: __expectString, + AssociationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + ResourceOwnerId: __expectString, + ResourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ReportGenerator + * deserializeAws_json1_1LicenseConfigurationAssociations */ -const de_ReportGenerator = (output: any, context: __SerdeContext): ReportGenerator => { - return { - CreateTime: __expectString(output.CreateTime), - Description: __expectString(output.Description), - LastReportGenerationTime: __expectString(output.LastReportGenerationTime), - LastRunFailureReason: __expectString(output.LastRunFailureReason), - LastRunStatus: __expectString(output.LastRunStatus), - LicenseManagerReportGeneratorArn: __expectString(output.LicenseManagerReportGeneratorArn), - ReportContext: output.ReportContext != null ? de_ReportContext(output.ReportContext, context) : undefined, - ReportCreatorAccount: __expectString(output.ReportCreatorAccount), - ReportFrequency: output.ReportFrequency != null ? de_ReportFrequency(output.ReportFrequency, context) : undefined, - ReportGeneratorName: __expectString(output.ReportGeneratorName), - ReportType: output.ReportType != null ? de_ReportTypeList(output.ReportType, context) : undefined, - S3Location: output.S3Location != null ? de_S3Location(output.S3Location, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ReportGeneratorList - */ -const de_ReportGeneratorList = (output: any, context: __SerdeContext): ReportGenerator[] => { +const de_LicenseConfigurationAssociations = ( + output: any, + context: __SerdeContext +): LicenseConfigurationAssociation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReportGenerator(entry, context); + return de_LicenseConfigurationAssociation(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ReportTypeList + * deserializeAws_json1_1LicenseConfigurations */ -const de_ReportTypeList = (output: any, context: __SerdeContext): (ReportType | string)[] => { +const de_LicenseConfigurations = (output: any, context: __SerdeContext): LicenseConfiguration[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_LicenseConfiguration(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceInventory + * deserializeAws_json1_1LicenseConfigurationUsage */ -const de_ResourceInventory = (output: any, context: __SerdeContext): ResourceInventory => { - return { - Platform: __expectString(output.Platform), - PlatformVersion: __expectString(output.PlatformVersion), - ResourceArn: __expectString(output.ResourceArn), - ResourceId: __expectString(output.ResourceId), - ResourceOwningAccountId: __expectString(output.ResourceOwningAccountId), - ResourceType: __expectString(output.ResourceType), - } as any; +const de_LicenseConfigurationUsage = (output: any, context: __SerdeContext): LicenseConfigurationUsage => { + return take(output, { + AssociationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ConsumedLicenses: __expectLong, + ResourceArn: __expectString, + ResourceOwnerId: __expectString, + ResourceStatus: __expectString, + ResourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceInventoryList + * deserializeAws_json1_1LicenseConfigurationUsageList */ -const de_ResourceInventoryList = (output: any, context: __SerdeContext): ResourceInventory[] => { +const de_LicenseConfigurationUsageList = (output: any, context: __SerdeContext): LicenseConfigurationUsage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceInventory(entry, context); + return de_LicenseConfigurationUsage(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceLimitExceededException - */ -const de_ResourceLimitExceededException = (output: any, context: __SerdeContext): ResourceLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - keyPrefix: __expectString(output.keyPrefix), - } as any; -}; +// de_LicenseConversionContext omitted. /** - * deserializeAws_json1_1ServerInternalException + * deserializeAws_json1_1LicenseConversionTask */ -const de_ServerInternalException = (output: any, context: __SerdeContext): ServerInternalException => { - return { - Message: __expectString(output.Message), - } as any; +const de_LicenseConversionTask = (output: any, context: __SerdeContext): LicenseConversionTask => { + return take(output, { + DestinationLicenseContext: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LicenseConversionTaskId: __expectString, + LicenseConversionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + SourceLicenseContext: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StringList + * deserializeAws_json1_1LicenseConversionTasks */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { +const de_LicenseConversionTasks = (output: any, context: __SerdeContext): LicenseConversionTask[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_LicenseConversionTask(entry, context); }); return retVal; }; +// de_LicenseList omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1LicenseOperationFailure */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_LicenseOperationFailure = (output: any, context: __SerdeContext): LicenseOperationFailure => { + return take(output, { + ErrorMessage: __expectString, + FailureTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetadataList: _json, + OperationName: __expectString, + OperationRequestedBy: __expectString, + ResourceArn: __expectString, + ResourceOwnerId: __expectString, + ResourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1LicenseOperationFailureList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_LicenseOperationFailureList = (output: any, context: __SerdeContext): LicenseOperationFailure[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_LicenseOperationFailure(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_LicenseSpecification omitted. -/** - * deserializeAws_json1_1TokenData - */ -const de_TokenData = (output: any, context: __SerdeContext): TokenData => { - return { - ExpirationTime: __expectString(output.ExpirationTime), - LicenseArn: __expectString(output.LicenseArn), - RoleArns: output.RoleArns != null ? de_ArnList(output.RoleArns, context) : undefined, - Status: __expectString(output.Status), - TokenId: __expectString(output.TokenId), - TokenProperties: - output.TokenProperties != null ? de_MaxSize3StringList(output.TokenProperties, context) : undefined, - TokenType: __expectString(output.TokenType), - } as any; -}; +// de_LicenseSpecifications omitted. -/** - * deserializeAws_json1_1TokenList - */ -const de_TokenList = (output: any, context: __SerdeContext): TokenData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TokenData(entry, context); - }); - return retVal; -}; +// de_LicenseUsage omitted. + +// de_LicenseUsageException omitted. /** - * deserializeAws_json1_1UnsupportedDigitalSignatureMethodException + * deserializeAws_json1_1ListAssociationsForLicenseConfigurationResponse */ -const de_UnsupportedDigitalSignatureMethodException = ( +const de_ListAssociationsForLicenseConfigurationResponse = ( output: any, context: __SerdeContext -): UnsupportedDigitalSignatureMethodException => { - return { - Message: __expectString(output.Message), - } as any; +): ListAssociationsForLicenseConfigurationResponse => { + return take(output, { + LicenseConfigurationAssociations: (_: any) => de_LicenseConfigurationAssociations(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_ListDistributedGrantsResponse omitted. /** - * deserializeAws_json1_1UpdateLicenseConfigurationResponse + * deserializeAws_json1_1ListFailuresForLicenseConfigurationOperationsResponse */ -const de_UpdateLicenseConfigurationResponse = ( +const de_ListFailuresForLicenseConfigurationOperationsResponse = ( output: any, context: __SerdeContext -): UpdateLicenseConfigurationResponse => { - return {} as any; +): ListFailuresForLicenseConfigurationOperationsResponse => { + return take(output, { + LicenseOperationFailureList: (_: any) => de_LicenseOperationFailureList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UpdateLicenseManagerReportGeneratorResponse + * deserializeAws_json1_1ListLicenseConfigurationsResponse */ -const de_UpdateLicenseManagerReportGeneratorResponse = ( +const de_ListLicenseConfigurationsResponse = ( output: any, context: __SerdeContext -): UpdateLicenseManagerReportGeneratorResponse => { - return {} as any; +): ListLicenseConfigurationsResponse => { + return take(output, { + LicenseConfigurations: (_: any) => de_LicenseConfigurations(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UpdateLicenseSpecificationsForResourceResponse + * deserializeAws_json1_1ListLicenseConversionTasksResponse */ -const de_UpdateLicenseSpecificationsForResourceResponse = ( +const de_ListLicenseConversionTasksResponse = ( output: any, context: __SerdeContext -): UpdateLicenseSpecificationsForResourceResponse => { - return {} as any; +): ListLicenseConversionTasksResponse => { + return take(output, { + LicenseConversionTasks: (_: any) => de_LicenseConversionTasks(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateServiceSettingsResponse - */ -const de_UpdateServiceSettingsResponse = (output: any, context: __SerdeContext): UpdateServiceSettingsResponse => { - return {} as any; -}; +// de_ListLicenseManagerReportGeneratorsResponse omitted. + +// de_ListLicenseSpecificationsForResourceResponse omitted. + +// de_ListLicensesResponse omitted. + +// de_ListLicenseVersionsResponse omitted. + +// de_ListReceivedGrantsForOrganizationResponse omitted. + +// de_ListReceivedGrantsResponse omitted. + +// de_ListReceivedLicensesForOrganizationResponse omitted. + +// de_ListReceivedLicensesResponse omitted. + +// de_ListResourceInventoryResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListTokensResponse omitted. /** - * deserializeAws_json1_1ValidationException + * deserializeAws_json1_1ListUsageForLicenseConfigurationResponse */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListUsageForLicenseConfigurationResponse = ( + output: any, + context: __SerdeContext +): ListUsageForLicenseConfigurationResponse => { + return take(output, { + LicenseConfigurationUsageList: (_: any) => de_LicenseConfigurationUsageList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ManagedResourceSummary omitted. + +// de_ManagedResourceSummaryList omitted. + +// de_MaxSize3StringList omitted. + +// de_Metadata omitted. + +// de_MetadataList omitted. + +// de_NoEntitlementsAllowedException omitted. + +// de_Options omitted. + +// de_OrganizationConfiguration omitted. + +// de_ProductInformation omitted. + +// de_ProductInformationFilter omitted. + +// de_ProductInformationFilterList omitted. + +// de_ProductInformationList omitted. + +// de_ProvisionalConfiguration omitted. + +// de_RateLimitExceededException omitted. + +// de_ReceivedMetadata omitted. + +// de_RedirectException omitted. + +// de_RejectGrantResponse omitted. + +// de_ReportContext omitted. + +// de_ReportFrequency omitted. + +// de_ReportGenerator omitted. + +// de_ReportGeneratorList omitted. + +// de_ReportTypeList omitted. + +// de_ResourceInventory omitted. + +// de_ResourceInventoryList omitted. + +// de_ResourceLimitExceededException omitted. + +// de_ResourceNotFoundException omitted. + +// de_S3Location omitted. + +// de_ServerInternalException omitted. + +// de_StringList omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_TokenData omitted. + +// de_TokenList omitted. + +// de_UnsupportedDigitalSignatureMethodException omitted. + +// de_UntagResourceResponse omitted. + +// de_UpdateLicenseConfigurationResponse omitted. + +// de_UpdateLicenseManagerReportGeneratorResponse omitted. + +// de_UpdateLicenseSpecificationsForResourceResponse omitted. + +// de_UpdateServiceSettingsResponse omitted. + +// de_ValidationException omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -7168,6 +4988,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-lightsail/src/protocols/Aws_json1_1.ts b/clients/client-lightsail/src/protocols/Aws_json1_1.ts index 43b6e1d44f99..fe40d5daecdc 100644 --- a/clients/client-lightsail/src/protocols/Aws_json1_1.ts +++ b/clients/client-lightsail/src/protocols/Aws_json1_1.ts @@ -1,10 +1,10 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, @@ -12,7 +12,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -422,18 +423,15 @@ import { AccessRules, AccountLevelBpaSync, AccountSetupInProgressException, - AddOn, AddOnRequest, Alarm, AlarmState, AllocateStaticIpRequest, AllocateStaticIpResult, - AppCategory, AttachCertificateToDistributionRequest, AttachCertificateToDistributionResult, AttachDiskRequest, AttachDiskResult, - AttachedDisk, AttachInstancesToLoadBalancerRequest, AttachInstancesToLoadBalancerResult, AttachLoadBalancerTlsCertificateRequest, @@ -442,12 +440,9 @@ import { AttachStaticIpResult, AutoSnapshotAddOnRequest, AutoSnapshotDetails, - AvailabilityZone, - Blueprint, Bucket, BucketAccessLogConfig, BucketBundle, - BucketState, Bundle, CacheBehavior, CacheBehaviorPerPath, @@ -458,7 +453,6 @@ import { CloseInstancePublicPortsRequest, CloseInstancePublicPortsResult, CloudFormationStackRecord, - CloudFormationStackRecordSourceInfo, ContactMethod, ContactProtocol, Container, @@ -466,16 +460,13 @@ import { ContainerService, ContainerServiceDeployment, ContainerServiceDeploymentRequest, - ContainerServiceECRImagePullerRole, ContainerServiceECRImagePullerRoleRequest, - ContainerServiceEndpoint, ContainerServiceHealthCheckConfig, ContainerServiceLogEvent, ContainerServicePower, ContainerServiceProtocol, ContainerServiceRegistryLogin, ContainerServicesListResult, - ContainerServiceStateDetail, CookieObject, CopySnapshotRequest, CopySnapshotResult, @@ -509,7 +500,6 @@ import { CreateDomainRequest, CreateDomainResult, CreateGUISessionAccessDetailsRequest, - CreateGUISessionAccessDetailsResult, CreateInstancesFromSnapshotRequest, CreateInstancesFromSnapshotResult, CreateInstanceSnapshotRequest, @@ -541,9 +531,7 @@ import { DeleteContactMethodRequest, DeleteContactMethodResult, DeleteContainerImageRequest, - DeleteContainerImageResult, DeleteContainerServiceRequest, - DeleteContainerServiceResult, DeleteDiskRequest, DeleteDiskResult, DeleteDiskSnapshotRequest, @@ -570,7 +558,6 @@ import { DeleteRelationalDatabaseResult, DeleteRelationalDatabaseSnapshotRequest, DeleteRelationalDatabaseSnapshotResult, - DestinationInfo, DetachCertificateFromDistributionRequest, DetachCertificateFromDistributionResult, DetachDiskRequest, @@ -582,15 +569,11 @@ import { DisableAddOnRequest, DisableAddOnResult, Disk, - DiskInfo, DiskMap, DiskSnapshot, - DiskSnapshotInfo, DistributionBundle, - DnsRecordCreationState, Domain, DomainEntry, - DomainValidationRecord, DownloadDefaultKeyPairRequest, DownloadDefaultKeyPairResult, EnableAddOnRequest, @@ -602,13 +585,11 @@ import { ExportSnapshotRequest, ExportSnapshotResult, GetActiveNamesRequest, - GetActiveNamesResult, GetAlarmsRequest, GetAlarmsResult, GetAutoSnapshotsRequest, GetAutoSnapshotsResult, GetBlueprintsRequest, - GetBlueprintsResult, GetBucketAccessKeysRequest, GetBucketAccessKeysResult, GetBucketBundlesRequest, @@ -626,7 +607,6 @@ import { GetContactMethodsRequest, GetContactMethodsResult, GetContainerAPIMetadataRequest, - GetContainerAPIMetadataResult, GetContainerImagesRequest, GetContainerImagesResult, GetContainerLogRequest, @@ -642,31 +622,19 @@ import { HeaderObject, InputOrigin, InstanceEntry, - InstancePlatform, - InstanceSnapshotInfo, InvalidInputException, KeyPair, LightsailDistribution, MetricDatapoint, MetricStatistic, - MonitoredResourceInfo, - NameServersUpdateState, NotFoundException, Operation, OperationFailureException, - Origin, PortInfo, - PrivateRegistryAccess, PrivateRegistryAccessRequest, QueryStringObject, - R53HostedZoneDeletionState, - RegisteredDomainDelegationInfo, RenewalSummary, - ResourceLocation, - ResourceReceivingAccess, - ResourceRecord, ServiceException, - Session, StopInstanceOnIdleRequest, Tag, TimePeriod, @@ -702,7 +670,6 @@ import { GetInstanceMetricDataRequest, GetInstanceMetricDataResult, GetInstancePortStatesRequest, - GetInstancePortStatesResult, GetInstanceRequest, GetInstanceResult, GetInstanceSnapshotRequest, @@ -712,7 +679,6 @@ import { GetInstancesRequest, GetInstancesResult, GetInstanceStateRequest, - GetInstanceStateResult, GetKeyPairRequest, GetKeyPairResult, GetKeyPairsRequest, @@ -726,7 +692,6 @@ import { GetLoadBalancerTlsCertificatesRequest, GetLoadBalancerTlsCertificatesResult, GetLoadBalancerTlsPoliciesRequest, - GetLoadBalancerTlsPoliciesResult, GetOperationRequest, GetOperationResult, GetOperationsForResourceRequest, @@ -734,9 +699,7 @@ import { GetOperationsRequest, GetOperationsResult, GetRegionsRequest, - GetRegionsResult, GetRelationalDatabaseBlueprintsRequest, - GetRelationalDatabaseBlueprintsResult, GetRelationalDatabaseBundlesRequest, GetRelationalDatabaseBundlesResult, GetRelationalDatabaseEventsRequest, @@ -744,13 +707,11 @@ import { GetRelationalDatabaseLogEventsRequest, GetRelationalDatabaseLogEventsResult, GetRelationalDatabaseLogStreamsRequest, - GetRelationalDatabaseLogStreamsResult, GetRelationalDatabaseMasterUserPasswordRequest, GetRelationalDatabaseMasterUserPasswordResult, GetRelationalDatabaseMetricDataRequest, GetRelationalDatabaseMetricDataResult, GetRelationalDatabaseParametersRequest, - GetRelationalDatabaseParametersResult, GetRelationalDatabaseRequest, GetRelationalDatabaseResult, GetRelationalDatabaseSnapshotRequest, @@ -769,33 +730,16 @@ import { Instance, InstanceAccessDetails, InstanceHardware, - InstanceHealthSummary, - InstanceMetadataOptions, - InstanceNetworking, - InstancePortInfo, - InstancePortState, InstanceSnapshot, - InstanceState, IsVpcPeeredRequest, - IsVpcPeeredResult, LoadBalancer, - LoadBalancerAttributeName, LoadBalancerTlsCertificate, - LoadBalancerTlsCertificateDnsRecordCreationState, - LoadBalancerTlsCertificateDomainValidationOption, - LoadBalancerTlsCertificateDomainValidationRecord, - LoadBalancerTlsCertificateRenewalSummary, - LoadBalancerTlsCertificateSummary, - LoadBalancerTlsPolicy, LogEvent, - MonthlyTransfer, OpenInstancePublicPortsRequest, OpenInstancePublicPortsResult, - PasswordData, PeerVpcRequest, PeerVpcResult, PendingMaintenanceAction, - PendingModifiedRelationalDatabaseValues, PutAlarmRequest, PutAlarmResult, PutInstancePublicPortsRequest, @@ -804,13 +748,10 @@ import { RebootInstanceResult, RebootRelationalDatabaseRequest, RebootRelationalDatabaseResult, - Region, RegisterContainerImageRequest, RegisterContainerImageResult, RelationalDatabase, - RelationalDatabaseBlueprint, RelationalDatabaseBundle, - RelationalDatabaseEndpoint, RelationalDatabaseEvent, RelationalDatabaseHardware, RelationalDatabaseParameter, @@ -878,7 +819,7 @@ export const se_AllocateStaticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AllocateStaticIp"); let body: any; - body = JSON.stringify(se_AllocateStaticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -891,7 +832,7 @@ export const se_AttachCertificateToDistributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachCertificateToDistribution"); let body: any; - body = JSON.stringify(se_AttachCertificateToDistributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -904,7 +845,7 @@ export const se_AttachDiskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachDisk"); let body: any; - body = JSON.stringify(se_AttachDiskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -917,7 +858,7 @@ export const se_AttachInstancesToLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachInstancesToLoadBalancer"); let body: any; - body = JSON.stringify(se_AttachInstancesToLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -930,7 +871,7 @@ export const se_AttachLoadBalancerTlsCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachLoadBalancerTlsCertificate"); let body: any; - body = JSON.stringify(se_AttachLoadBalancerTlsCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -943,7 +884,7 @@ export const se_AttachStaticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachStaticIp"); let body: any; - body = JSON.stringify(se_AttachStaticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -956,7 +897,7 @@ export const se_CloseInstancePublicPortsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CloseInstancePublicPorts"); let body: any; - body = JSON.stringify(se_CloseInstancePublicPortsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -969,7 +910,7 @@ export const se_CopySnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CopySnapshot"); let body: any; - body = JSON.stringify(se_CopySnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -982,7 +923,7 @@ export const se_CreateBucketCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBucket"); let body: any; - body = JSON.stringify(se_CreateBucketRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -995,7 +936,7 @@ export const se_CreateBucketAccessKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBucketAccessKey"); let body: any; - body = JSON.stringify(se_CreateBucketAccessKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1008,7 +949,7 @@ export const se_CreateCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCertificate"); let body: any; - body = JSON.stringify(se_CreateCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1021,7 +962,7 @@ export const se_CreateCloudFormationStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCloudFormationStack"); let body: any; - body = JSON.stringify(se_CreateCloudFormationStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1034,7 +975,7 @@ export const se_CreateContactMethodCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateContactMethod"); let body: any; - body = JSON.stringify(se_CreateContactMethodRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1047,7 +988,7 @@ export const se_CreateContainerServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateContainerService"); let body: any; - body = JSON.stringify(se_CreateContainerServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1060,7 +1001,7 @@ export const se_CreateContainerServiceDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateContainerServiceDeployment"); let body: any; - body = JSON.stringify(se_CreateContainerServiceDeploymentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1073,7 +1014,7 @@ export const se_CreateContainerServiceRegistryLoginCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateContainerServiceRegistryLogin"); let body: any; - body = JSON.stringify(se_CreateContainerServiceRegistryLoginRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1086,7 +1027,7 @@ export const se_CreateDiskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDisk"); let body: any; - body = JSON.stringify(se_CreateDiskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1099,7 +1040,7 @@ export const se_CreateDiskFromSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDiskFromSnapshot"); let body: any; - body = JSON.stringify(se_CreateDiskFromSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1112,7 +1053,7 @@ export const se_CreateDiskSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDiskSnapshot"); let body: any; - body = JSON.stringify(se_CreateDiskSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1125,7 +1066,7 @@ export const se_CreateDistributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDistribution"); let body: any; - body = JSON.stringify(se_CreateDistributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1138,7 +1079,7 @@ export const se_CreateDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDomain"); let body: any; - body = JSON.stringify(se_CreateDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1151,7 +1092,7 @@ export const se_CreateDomainEntryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDomainEntry"); let body: any; - body = JSON.stringify(se_CreateDomainEntryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1164,7 +1105,7 @@ export const se_CreateGUISessionAccessDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGUISessionAccessDetails"); let body: any; - body = JSON.stringify(se_CreateGUISessionAccessDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1177,7 +1118,7 @@ export const se_CreateInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInstances"); let body: any; - body = JSON.stringify(se_CreateInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1190,7 +1131,7 @@ export const se_CreateInstancesFromSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInstancesFromSnapshot"); let body: any; - body = JSON.stringify(se_CreateInstancesFromSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1203,7 +1144,7 @@ export const se_CreateInstanceSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInstanceSnapshot"); let body: any; - body = JSON.stringify(se_CreateInstanceSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1216,7 +1157,7 @@ export const se_CreateKeyPairCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateKeyPair"); let body: any; - body = JSON.stringify(se_CreateKeyPairRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1229,7 +1170,7 @@ export const se_CreateLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLoadBalancer"); let body: any; - body = JSON.stringify(se_CreateLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1242,7 +1183,7 @@ export const se_CreateLoadBalancerTlsCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLoadBalancerTlsCertificate"); let body: any; - body = JSON.stringify(se_CreateLoadBalancerTlsCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1255,7 +1196,7 @@ export const se_CreateRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRelationalDatabase"); let body: any; - body = JSON.stringify(se_CreateRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1281,7 +1222,7 @@ export const se_CreateRelationalDatabaseSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRelationalDatabaseSnapshot"); let body: any; - body = JSON.stringify(se_CreateRelationalDatabaseSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1294,7 +1235,7 @@ export const se_DeleteAlarmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAlarm"); let body: any; - body = JSON.stringify(se_DeleteAlarmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1307,7 +1248,7 @@ export const se_DeleteAutoSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAutoSnapshot"); let body: any; - body = JSON.stringify(se_DeleteAutoSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1320,7 +1261,7 @@ export const se_DeleteBucketCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBucket"); let body: any; - body = JSON.stringify(se_DeleteBucketRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1333,7 +1274,7 @@ export const se_DeleteBucketAccessKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBucketAccessKey"); let body: any; - body = JSON.stringify(se_DeleteBucketAccessKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1346,7 +1287,7 @@ export const se_DeleteCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCertificate"); let body: any; - body = JSON.stringify(se_DeleteCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1359,7 +1300,7 @@ export const se_DeleteContactMethodCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContactMethod"); let body: any; - body = JSON.stringify(se_DeleteContactMethodRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1372,7 +1313,7 @@ export const se_DeleteContainerImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContainerImage"); let body: any; - body = JSON.stringify(se_DeleteContainerImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1385,7 +1326,7 @@ export const se_DeleteContainerServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContainerService"); let body: any; - body = JSON.stringify(se_DeleteContainerServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1398,7 +1339,7 @@ export const se_DeleteDiskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDisk"); let body: any; - body = JSON.stringify(se_DeleteDiskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1411,7 +1352,7 @@ export const se_DeleteDiskSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDiskSnapshot"); let body: any; - body = JSON.stringify(se_DeleteDiskSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1424,7 +1365,7 @@ export const se_DeleteDistributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDistribution"); let body: any; - body = JSON.stringify(se_DeleteDistributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1437,7 +1378,7 @@ export const se_DeleteDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDomain"); let body: any; - body = JSON.stringify(se_DeleteDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1450,7 +1391,7 @@ export const se_DeleteDomainEntryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDomainEntry"); let body: any; - body = JSON.stringify(se_DeleteDomainEntryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1463,7 +1404,7 @@ export const se_DeleteInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInstance"); let body: any; - body = JSON.stringify(se_DeleteInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1476,7 +1417,7 @@ export const se_DeleteInstanceSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInstanceSnapshot"); let body: any; - body = JSON.stringify(se_DeleteInstanceSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1489,7 +1430,7 @@ export const se_DeleteKeyPairCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteKeyPair"); let body: any; - body = JSON.stringify(se_DeleteKeyPairRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1502,7 +1443,7 @@ export const se_DeleteKnownHostKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteKnownHostKeys"); let body: any; - body = JSON.stringify(se_DeleteKnownHostKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1515,7 +1456,7 @@ export const se_DeleteLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLoadBalancer"); let body: any; - body = JSON.stringify(se_DeleteLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1528,7 +1469,7 @@ export const se_DeleteLoadBalancerTlsCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLoadBalancerTlsCertificate"); let body: any; - body = JSON.stringify(se_DeleteLoadBalancerTlsCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1541,7 +1482,7 @@ export const se_DeleteRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRelationalDatabase"); let body: any; - body = JSON.stringify(se_DeleteRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1554,7 +1495,7 @@ export const se_DeleteRelationalDatabaseSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRelationalDatabaseSnapshot"); let body: any; - body = JSON.stringify(se_DeleteRelationalDatabaseSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1567,7 +1508,7 @@ export const se_DetachCertificateFromDistributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachCertificateFromDistribution"); let body: any; - body = JSON.stringify(se_DetachCertificateFromDistributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1580,7 +1521,7 @@ export const se_DetachDiskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachDisk"); let body: any; - body = JSON.stringify(se_DetachDiskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1593,7 +1534,7 @@ export const se_DetachInstancesFromLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachInstancesFromLoadBalancer"); let body: any; - body = JSON.stringify(se_DetachInstancesFromLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1606,7 +1547,7 @@ export const se_DetachStaticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachStaticIp"); let body: any; - body = JSON.stringify(se_DetachStaticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1619,7 +1560,7 @@ export const se_DisableAddOnCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableAddOn"); let body: any; - body = JSON.stringify(se_DisableAddOnRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1632,7 +1573,7 @@ export const se_DownloadDefaultKeyPairCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DownloadDefaultKeyPair"); let body: any; - body = JSON.stringify(se_DownloadDefaultKeyPairRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1645,7 +1586,7 @@ export const se_EnableAddOnCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableAddOn"); let body: any; - body = JSON.stringify(se_EnableAddOnRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1658,7 +1599,7 @@ export const se_ExportSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportSnapshot"); let body: any; - body = JSON.stringify(se_ExportSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1671,7 +1612,7 @@ export const se_GetActiveNamesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetActiveNames"); let body: any; - body = JSON.stringify(se_GetActiveNamesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1684,7 +1625,7 @@ export const se_GetAlarmsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAlarms"); let body: any; - body = JSON.stringify(se_GetAlarmsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1697,7 +1638,7 @@ export const se_GetAutoSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAutoSnapshots"); let body: any; - body = JSON.stringify(se_GetAutoSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1710,7 +1651,7 @@ export const se_GetBlueprintsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBlueprints"); let body: any; - body = JSON.stringify(se_GetBlueprintsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1723,7 +1664,7 @@ export const se_GetBucketAccessKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBucketAccessKeys"); let body: any; - body = JSON.stringify(se_GetBucketAccessKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1736,7 +1677,7 @@ export const se_GetBucketBundlesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBucketBundles"); let body: any; - body = JSON.stringify(se_GetBucketBundlesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1762,7 +1703,7 @@ export const se_GetBucketsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBuckets"); let body: any; - body = JSON.stringify(se_GetBucketsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1775,7 +1716,7 @@ export const se_GetBundlesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBundles"); let body: any; - body = JSON.stringify(se_GetBundlesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1788,7 +1729,7 @@ export const se_GetCertificatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCertificates"); let body: any; - body = JSON.stringify(se_GetCertificatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1801,7 +1742,7 @@ export const se_GetCloudFormationStackRecordsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCloudFormationStackRecords"); let body: any; - body = JSON.stringify(se_GetCloudFormationStackRecordsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1814,7 +1755,7 @@ export const se_GetContactMethodsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContactMethods"); let body: any; - body = JSON.stringify(se_GetContactMethodsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1827,7 +1768,7 @@ export const se_GetContainerAPIMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContainerAPIMetadata"); let body: any; - body = JSON.stringify(se_GetContainerAPIMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1840,7 +1781,7 @@ export const se_GetContainerImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContainerImages"); let body: any; - body = JSON.stringify(se_GetContainerImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1866,7 +1807,7 @@ export const se_GetContainerServiceDeploymentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContainerServiceDeployments"); let body: any; - body = JSON.stringify(se_GetContainerServiceDeploymentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1892,7 +1833,7 @@ export const se_GetContainerServicePowersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContainerServicePowers"); let body: any; - body = JSON.stringify(se_GetContainerServicePowersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1905,7 +1846,7 @@ export const se_GetContainerServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContainerServices"); let body: any; - body = JSON.stringify(se_GetContainerServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1931,7 +1872,7 @@ export const se_GetDiskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDisk"); let body: any; - body = JSON.stringify(se_GetDiskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1944,7 +1885,7 @@ export const se_GetDisksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDisks"); let body: any; - body = JSON.stringify(se_GetDisksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1957,7 +1898,7 @@ export const se_GetDiskSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDiskSnapshot"); let body: any; - body = JSON.stringify(se_GetDiskSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1970,7 +1911,7 @@ export const se_GetDiskSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDiskSnapshots"); let body: any; - body = JSON.stringify(se_GetDiskSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1983,7 +1924,7 @@ export const se_GetDistributionBundlesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDistributionBundles"); let body: any; - body = JSON.stringify(se_GetDistributionBundlesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1996,7 +1937,7 @@ export const se_GetDistributionLatestCacheResetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDistributionLatestCacheReset"); let body: any; - body = JSON.stringify(se_GetDistributionLatestCacheResetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2022,7 +1963,7 @@ export const se_GetDistributionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDistributions"); let body: any; - body = JSON.stringify(se_GetDistributionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2035,7 +1976,7 @@ export const se_GetDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDomain"); let body: any; - body = JSON.stringify(se_GetDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2048,7 +1989,7 @@ export const se_GetDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDomains"); let body: any; - body = JSON.stringify(se_GetDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2061,7 +2002,7 @@ export const se_GetExportSnapshotRecordsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetExportSnapshotRecords"); let body: any; - body = JSON.stringify(se_GetExportSnapshotRecordsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2074,7 +2015,7 @@ export const se_GetInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstance"); let body: any; - body = JSON.stringify(se_GetInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2087,7 +2028,7 @@ export const se_GetInstanceAccessDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstanceAccessDetails"); let body: any; - body = JSON.stringify(se_GetInstanceAccessDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2113,7 +2054,7 @@ export const se_GetInstancePortStatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstancePortStates"); let body: any; - body = JSON.stringify(se_GetInstancePortStatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2126,7 +2067,7 @@ export const se_GetInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstances"); let body: any; - body = JSON.stringify(se_GetInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2139,7 +2080,7 @@ export const se_GetInstanceSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstanceSnapshot"); let body: any; - body = JSON.stringify(se_GetInstanceSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2152,7 +2093,7 @@ export const se_GetInstanceSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstanceSnapshots"); let body: any; - body = JSON.stringify(se_GetInstanceSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2165,7 +2106,7 @@ export const se_GetInstanceStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstanceState"); let body: any; - body = JSON.stringify(se_GetInstanceStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2178,7 +2119,7 @@ export const se_GetKeyPairCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetKeyPair"); let body: any; - body = JSON.stringify(se_GetKeyPairRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2191,7 +2132,7 @@ export const se_GetKeyPairsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetKeyPairs"); let body: any; - body = JSON.stringify(se_GetKeyPairsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2204,7 +2145,7 @@ export const se_GetLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoadBalancer"); let body: any; - body = JSON.stringify(se_GetLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2230,7 +2171,7 @@ export const se_GetLoadBalancersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoadBalancers"); let body: any; - body = JSON.stringify(se_GetLoadBalancersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2243,7 +2184,7 @@ export const se_GetLoadBalancerTlsCertificatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoadBalancerTlsCertificates"); let body: any; - body = JSON.stringify(se_GetLoadBalancerTlsCertificatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2256,7 +2197,7 @@ export const se_GetLoadBalancerTlsPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoadBalancerTlsPolicies"); let body: any; - body = JSON.stringify(se_GetLoadBalancerTlsPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2269,7 +2210,7 @@ export const se_GetOperationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOperation"); let body: any; - body = JSON.stringify(se_GetOperationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2282,7 +2223,7 @@ export const se_GetOperationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOperations"); let body: any; - body = JSON.stringify(se_GetOperationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2295,7 +2236,7 @@ export const se_GetOperationsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOperationsForResource"); let body: any; - body = JSON.stringify(se_GetOperationsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2308,7 +2249,7 @@ export const se_GetRegionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegions"); let body: any; - body = JSON.stringify(se_GetRegionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2321,7 +2262,7 @@ export const se_GetRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabase"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2334,7 +2275,7 @@ export const se_GetRelationalDatabaseBlueprintsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseBlueprints"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseBlueprintsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2347,7 +2288,7 @@ export const se_GetRelationalDatabaseBundlesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseBundles"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseBundlesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2360,7 +2301,7 @@ export const se_GetRelationalDatabaseEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseEvents"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2386,7 +2327,7 @@ export const se_GetRelationalDatabaseLogStreamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseLogStreams"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseLogStreamsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2399,7 +2340,7 @@ export const se_GetRelationalDatabaseMasterUserPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseMasterUserPassword"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseMasterUserPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2425,7 +2366,7 @@ export const se_GetRelationalDatabaseParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseParameters"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2438,7 +2379,7 @@ export const se_GetRelationalDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabases"); let body: any; - body = JSON.stringify(se_GetRelationalDatabasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2451,7 +2392,7 @@ export const se_GetRelationalDatabaseSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseSnapshot"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2464,7 +2405,7 @@ export const se_GetRelationalDatabaseSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRelationalDatabaseSnapshots"); let body: any; - body = JSON.stringify(se_GetRelationalDatabaseSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2477,7 +2418,7 @@ export const se_GetStaticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetStaticIp"); let body: any; - body = JSON.stringify(se_GetStaticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2490,7 +2431,7 @@ export const se_GetStaticIpsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetStaticIps"); let body: any; - body = JSON.stringify(se_GetStaticIpsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2503,7 +2444,7 @@ export const se_ImportKeyPairCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportKeyPair"); let body: any; - body = JSON.stringify(se_ImportKeyPairRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2516,7 +2457,7 @@ export const se_IsVpcPeeredCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("IsVpcPeered"); let body: any; - body = JSON.stringify(se_IsVpcPeeredRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2529,7 +2470,7 @@ export const se_OpenInstancePublicPortsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("OpenInstancePublicPorts"); let body: any; - body = JSON.stringify(se_OpenInstancePublicPortsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2542,7 +2483,7 @@ export const se_PeerVpcCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PeerVpc"); let body: any; - body = JSON.stringify(se_PeerVpcRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2568,7 +2509,7 @@ export const se_PutInstancePublicPortsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutInstancePublicPorts"); let body: any; - body = JSON.stringify(se_PutInstancePublicPortsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2581,7 +2522,7 @@ export const se_RebootInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebootInstance"); let body: any; - body = JSON.stringify(se_RebootInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2594,7 +2535,7 @@ export const se_RebootRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebootRelationalDatabase"); let body: any; - body = JSON.stringify(se_RebootRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2607,7 +2548,7 @@ export const se_RegisterContainerImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterContainerImage"); let body: any; - body = JSON.stringify(se_RegisterContainerImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2620,7 +2561,7 @@ export const se_ReleaseStaticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReleaseStaticIp"); let body: any; - body = JSON.stringify(se_ReleaseStaticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2633,7 +2574,7 @@ export const se_ResetDistributionCacheCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetDistributionCache"); let body: any; - body = JSON.stringify(se_ResetDistributionCacheRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2646,7 +2587,7 @@ export const se_SendContactMethodVerificationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendContactMethodVerification"); let body: any; - body = JSON.stringify(se_SendContactMethodVerificationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2659,7 +2600,7 @@ export const se_SetIpAddressTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetIpAddressType"); let body: any; - body = JSON.stringify(se_SetIpAddressTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2672,7 +2613,7 @@ export const se_SetResourceAccessForBucketCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetResourceAccessForBucket"); let body: any; - body = JSON.stringify(se_SetResourceAccessForBucketRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2685,7 +2626,7 @@ export const se_StartGUISessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartGUISession"); let body: any; - body = JSON.stringify(se_StartGUISessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2698,7 +2639,7 @@ export const se_StartInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartInstance"); let body: any; - body = JSON.stringify(se_StartInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2711,7 +2652,7 @@ export const se_StartRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartRelationalDatabase"); let body: any; - body = JSON.stringify(se_StartRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2724,7 +2665,7 @@ export const se_StopGUISessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopGUISession"); let body: any; - body = JSON.stringify(se_StopGUISessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2737,7 +2678,7 @@ export const se_StopInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopInstance"); let body: any; - body = JSON.stringify(se_StopInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2750,7 +2691,7 @@ export const se_StopRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopRelationalDatabase"); let body: any; - body = JSON.stringify(se_StopRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2763,7 +2704,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2776,7 +2717,7 @@ export const se_TestAlarmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestAlarm"); let body: any; - body = JSON.stringify(se_TestAlarmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2789,7 +2730,7 @@ export const se_UnpeerVpcCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnpeerVpc"); let body: any; - body = JSON.stringify(se_UnpeerVpcRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2802,7 +2743,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2815,7 +2756,7 @@ export const se_UpdateBucketCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBucket"); let body: any; - body = JSON.stringify(se_UpdateBucketRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2828,7 +2769,7 @@ export const se_UpdateBucketBundleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBucketBundle"); let body: any; - body = JSON.stringify(se_UpdateBucketBundleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2841,7 +2782,7 @@ export const se_UpdateContainerServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContainerService"); let body: any; - body = JSON.stringify(se_UpdateContainerServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2854,7 +2795,7 @@ export const se_UpdateDistributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDistribution"); let body: any; - body = JSON.stringify(se_UpdateDistributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2867,7 +2808,7 @@ export const se_UpdateDistributionBundleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDistributionBundle"); let body: any; - body = JSON.stringify(se_UpdateDistributionBundleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2880,7 +2821,7 @@ export const se_UpdateDomainEntryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDomainEntry"); let body: any; - body = JSON.stringify(se_UpdateDomainEntryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2893,7 +2834,7 @@ export const se_UpdateInstanceMetadataOptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateInstanceMetadataOptions"); let body: any; - body = JSON.stringify(se_UpdateInstanceMetadataOptionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2906,7 +2847,7 @@ export const se_UpdateLoadBalancerAttributeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLoadBalancerAttribute"); let body: any; - body = JSON.stringify(se_UpdateLoadBalancerAttributeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2919,7 +2860,7 @@ export const se_UpdateRelationalDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRelationalDatabase"); let body: any; - body = JSON.stringify(se_UpdateRelationalDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2932,7 +2873,7 @@ export const se_UpdateRelationalDatabaseParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRelationalDatabaseParameters"); let body: any; - body = JSON.stringify(se_UpdateRelationalDatabaseParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2953,7 +2894,7 @@ export const de_AllocateStaticIpCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2992,10 +2933,9 @@ const de_AllocateStaticIpCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3018,7 +2958,7 @@ export const de_AttachCertificateToDistributionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3054,10 +2994,9 @@ const de_AttachCertificateToDistributionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3080,7 +3019,7 @@ export const de_AttachDiskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3119,10 +3058,9 @@ const de_AttachDiskCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3145,7 +3083,7 @@ export const de_AttachInstancesToLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3184,10 +3122,9 @@ const de_AttachInstancesToLoadBalancerCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3210,7 +3147,7 @@ export const de_AttachLoadBalancerTlsCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3249,10 +3186,9 @@ const de_AttachLoadBalancerTlsCertificateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3275,7 +3211,7 @@ export const de_AttachStaticIpCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3314,10 +3250,9 @@ const de_AttachStaticIpCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3340,7 +3275,7 @@ export const de_CloseInstancePublicPortsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3379,10 +3314,9 @@ const de_CloseInstancePublicPortsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3405,7 +3339,7 @@ export const de_CopySnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3444,10 +3378,9 @@ const de_CopySnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3470,7 +3403,7 @@ export const de_CreateBucketCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3500,10 +3433,9 @@ const de_CreateBucketCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3526,7 +3458,7 @@ export const de_CreateBucketAccessKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3559,10 +3491,9 @@ const de_CreateBucketAccessKeyCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3585,7 +3516,7 @@ export const de_CreateCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3618,10 +3549,9 @@ const de_CreateCertificateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3644,7 +3574,7 @@ export const de_CreateCloudFormationStackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3683,10 +3613,9 @@ const de_CreateCloudFormationStackCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3709,7 +3638,7 @@ export const de_CreateContactMethodCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3745,10 +3674,9 @@ const de_CreateContactMethodCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3771,7 +3699,7 @@ export const de_CreateContainerServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3804,10 +3732,9 @@ const de_CreateContainerServiceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3830,7 +3757,7 @@ export const de_CreateContainerServiceDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3863,10 +3790,9 @@ const de_CreateContainerServiceDeploymentCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3889,7 +3815,7 @@ export const de_CreateContainerServiceRegistryLoginCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3922,10 +3848,9 @@ const de_CreateContainerServiceRegistryLoginCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,7 +3873,7 @@ export const de_CreateDiskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3987,10 +3912,9 @@ const de_CreateDiskCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4013,7 +3937,7 @@ export const de_CreateDiskFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4052,10 +3976,9 @@ const de_CreateDiskFromSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4078,7 +4001,7 @@ export const de_CreateDiskSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4117,10 +4040,9 @@ const de_CreateDiskSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4143,7 +4065,7 @@ export const de_CreateDistributionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4179,10 +4101,9 @@ const de_CreateDistributionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4205,7 +4126,7 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4244,10 +4165,9 @@ const de_CreateDomainCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4270,7 +4190,7 @@ export const de_CreateDomainEntryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4309,10 +4229,9 @@ const de_CreateDomainEntryCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4330,12 +4249,12 @@ export const de_CreateGUISessionAccessDetailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGUISessionAccessDetailsResult(data, context); + contents = _json(data); const response: CreateGUISessionAccessDetailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4368,10 +4287,9 @@ const de_CreateGUISessionAccessDetailsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4394,7 +4312,7 @@ export const de_CreateInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4433,10 +4351,9 @@ const de_CreateInstancesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4459,7 +4376,7 @@ export const de_CreateInstancesFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4498,10 +4415,9 @@ const de_CreateInstancesFromSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4524,7 +4440,7 @@ export const de_CreateInstanceSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4563,10 +4479,9 @@ const de_CreateInstanceSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4589,7 +4504,7 @@ export const de_CreateKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4628,10 +4543,9 @@ const de_CreateKeyPairCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4654,7 +4568,7 @@ export const de_CreateLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4693,10 +4607,9 @@ const de_CreateLoadBalancerCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4719,7 +4632,7 @@ export const de_CreateLoadBalancerTlsCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4758,10 +4671,9 @@ const de_CreateLoadBalancerTlsCertificateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4784,7 +4696,7 @@ export const de_CreateRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4823,10 +4735,9 @@ const de_CreateRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4849,7 +4760,7 @@ export const de_CreateRelationalDatabaseFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4888,10 +4799,9 @@ const de_CreateRelationalDatabaseFromSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4914,7 +4824,7 @@ export const de_CreateRelationalDatabaseSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4953,10 +4863,9 @@ const de_CreateRelationalDatabaseSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4979,7 +4888,7 @@ export const de_DeleteAlarmCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5015,10 +4924,9 @@ const de_DeleteAlarmCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5041,7 +4949,7 @@ export const de_DeleteAutoSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5077,10 +4985,9 @@ const de_DeleteAutoSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5103,7 +5010,7 @@ export const de_DeleteBucketCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5136,10 +5043,9 @@ const de_DeleteBucketCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5162,7 +5068,7 @@ export const de_DeleteBucketAccessKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5195,10 +5101,9 @@ const de_DeleteBucketAccessKeyCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5221,7 +5126,7 @@ export const de_DeleteCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5254,10 +5159,9 @@ const de_DeleteCertificateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5280,7 +5184,7 @@ export const de_DeleteContactMethodCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5316,10 +5220,9 @@ const de_DeleteContactMethodCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5337,12 +5240,12 @@ export const de_DeleteContainerImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContainerImageResult(data, context); + contents = _json(data); const response: DeleteContainerImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5375,10 +5278,9 @@ const de_DeleteContainerImageCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5396,12 +5298,12 @@ export const de_DeleteContainerServiceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContainerServiceResult(data, context); + contents = _json(data); const response: DeleteContainerServiceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5434,10 +5336,9 @@ const de_DeleteContainerServiceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5460,7 +5361,7 @@ export const de_DeleteDiskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5499,10 +5400,9 @@ const de_DeleteDiskCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5525,7 +5425,7 @@ export const de_DeleteDiskSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5564,10 +5464,9 @@ const de_DeleteDiskSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5590,7 +5489,7 @@ export const de_DeleteDistributionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5626,10 +5525,9 @@ const de_DeleteDistributionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5652,7 +5550,7 @@ export const de_DeleteDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5691,10 +5589,9 @@ const de_DeleteDomainCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5717,7 +5614,7 @@ export const de_DeleteDomainEntryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5756,10 +5653,9 @@ const de_DeleteDomainEntryCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5782,7 +5678,7 @@ export const de_DeleteInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5821,10 +5717,9 @@ const de_DeleteInstanceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5847,7 +5742,7 @@ export const de_DeleteInstanceSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5886,10 +5781,9 @@ const de_DeleteInstanceSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5912,7 +5806,7 @@ export const de_DeleteKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5951,10 +5845,9 @@ const de_DeleteKeyPairCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5977,7 +5870,7 @@ export const de_DeleteKnownHostKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6016,10 +5909,9 @@ const de_DeleteKnownHostKeysCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6042,7 +5934,7 @@ export const de_DeleteLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6081,10 +5973,9 @@ const de_DeleteLoadBalancerCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6107,7 +5998,7 @@ export const de_DeleteLoadBalancerTlsCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6146,10 +6037,9 @@ const de_DeleteLoadBalancerTlsCertificateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6172,7 +6062,7 @@ export const de_DeleteRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6211,10 +6101,9 @@ const de_DeleteRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6237,7 +6126,7 @@ export const de_DeleteRelationalDatabaseSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6276,10 +6165,9 @@ const de_DeleteRelationalDatabaseSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6302,7 +6190,7 @@ export const de_DetachCertificateFromDistributionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6338,10 +6226,9 @@ const de_DetachCertificateFromDistributionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6364,7 +6251,7 @@ export const de_DetachDiskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6403,10 +6290,9 @@ const de_DetachDiskCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6429,7 +6315,7 @@ export const de_DetachInstancesFromLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6468,10 +6354,9 @@ const de_DetachInstancesFromLoadBalancerCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6494,7 +6379,7 @@ export const de_DetachStaticIpCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6533,10 +6418,9 @@ const de_DetachStaticIpCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6559,7 +6443,7 @@ export const de_DisableAddOnCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6595,10 +6479,9 @@ const de_DisableAddOnCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6621,7 +6504,7 @@ export const de_DownloadDefaultKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6660,10 +6543,9 @@ const de_DownloadDefaultKeyPairCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6686,7 +6568,7 @@ export const de_EnableAddOnCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6722,10 +6604,9 @@ const de_EnableAddOnCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6748,7 +6629,7 @@ export const de_ExportSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6787,10 +6668,9 @@ const de_ExportSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6808,12 +6688,12 @@ export const de_GetActiveNamesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetActiveNamesResult(data, context); + contents = _json(data); const response: GetActiveNamesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6852,10 +6732,9 @@ const de_GetActiveNamesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6878,7 +6757,7 @@ export const de_GetAlarmsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6914,10 +6793,9 @@ const de_GetAlarmsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6940,7 +6818,7 @@ export const de_GetAutoSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6976,10 +6854,9 @@ const de_GetAutoSnapshotsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6997,12 +6874,12 @@ export const de_GetBlueprintsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetBlueprintsResult(data, context); + contents = _json(data); const response: GetBlueprintsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7041,10 +6918,9 @@ const de_GetBlueprintsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7067,7 +6943,7 @@ export const de_GetBucketAccessKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7100,10 +6976,9 @@ const de_GetBucketAccessKeysCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7126,7 +7001,7 @@ export const de_GetBucketBundlesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7156,10 +7031,9 @@ const de_GetBucketBundlesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7182,7 +7056,7 @@ export const de_GetBucketMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7215,10 +7089,9 @@ const de_GetBucketMetricDataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7241,7 +7114,7 @@ export const de_GetBucketsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7274,10 +7147,9 @@ const de_GetBucketsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7300,7 +7172,7 @@ export const de_GetBundlesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7339,10 +7211,9 @@ const de_GetBundlesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7365,7 +7236,7 @@ export const de_GetCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7398,10 +7269,9 @@ const de_GetCertificatesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7424,7 +7294,7 @@ export const de_GetCloudFormationStackRecordsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7463,10 +7333,9 @@ const de_GetCloudFormationStackRecordsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7489,7 +7358,7 @@ export const de_GetContactMethodsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7525,10 +7394,9 @@ const de_GetContactMethodsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7546,12 +7414,12 @@ export const de_GetContainerAPIMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContainerAPIMetadataResult(data, context); + contents = _json(data); const response: GetContainerAPIMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7578,10 +7446,9 @@ const de_GetContainerAPIMetadataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7604,7 +7471,7 @@ export const de_GetContainerImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7637,10 +7504,9 @@ const de_GetContainerImagesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7663,7 +7529,7 @@ export const de_GetContainerLogCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7696,10 +7562,9 @@ const de_GetContainerLogCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7722,7 +7587,7 @@ export const de_GetContainerServiceDeploymentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7755,10 +7620,9 @@ const de_GetContainerServiceDeploymentsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7781,7 +7645,7 @@ export const de_GetContainerServiceMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7814,10 +7678,9 @@ const de_GetContainerServiceMetricDataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7840,7 +7703,7 @@ export const de_GetContainerServicePowersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7873,10 +7736,9 @@ const de_GetContainerServicePowersCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7899,7 +7761,7 @@ export const de_GetContainerServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7932,10 +7794,9 @@ const de_GetContainerServicesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7958,7 +7819,7 @@ export const de_GetCostEstimateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7991,10 +7852,9 @@ const de_GetCostEstimateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8017,7 +7877,7 @@ export const de_GetDiskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8056,10 +7916,9 @@ const de_GetDiskCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8082,7 +7941,7 @@ export const de_GetDisksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8121,10 +7980,9 @@ const de_GetDisksCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8147,7 +8005,7 @@ export const de_GetDiskSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8186,10 +8044,9 @@ const de_GetDiskSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8212,7 +8069,7 @@ export const de_GetDiskSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8251,10 +8108,9 @@ const de_GetDiskSnapshotsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8277,7 +8133,7 @@ export const de_GetDistributionBundlesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8313,10 +8169,9 @@ const de_GetDistributionBundlesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8339,7 +8194,7 @@ export const de_GetDistributionLatestCacheResetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8375,10 +8230,9 @@ const de_GetDistributionLatestCacheResetCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8401,7 +8255,7 @@ export const de_GetDistributionMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8437,10 +8291,9 @@ const de_GetDistributionMetricDataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8463,7 +8316,7 @@ export const de_GetDistributionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8499,10 +8352,9 @@ const de_GetDistributionsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8525,7 +8377,7 @@ export const de_GetDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8564,10 +8416,9 @@ const de_GetDomainCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8590,7 +8441,7 @@ export const de_GetDomainsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8629,10 +8480,9 @@ const de_GetDomainsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8655,7 +8505,7 @@ export const de_GetExportSnapshotRecordsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8694,10 +8544,9 @@ const de_GetExportSnapshotRecordsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8720,7 +8569,7 @@ export const de_GetInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8759,10 +8608,9 @@ const de_GetInstanceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8785,7 +8633,7 @@ export const de_GetInstanceAccessDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8824,10 +8672,9 @@ const de_GetInstanceAccessDetailsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8850,7 +8697,7 @@ export const de_GetInstanceMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8889,10 +8736,9 @@ const de_GetInstanceMetricDataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8910,12 +8756,12 @@ export const de_GetInstancePortStatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInstancePortStatesResult(data, context); + contents = _json(data); const response: GetInstancePortStatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8954,10 +8800,9 @@ const de_GetInstancePortStatesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8980,7 +8825,7 @@ export const de_GetInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9019,10 +8864,9 @@ const de_GetInstancesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9045,7 +8889,7 @@ export const de_GetInstanceSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9084,10 +8928,9 @@ const de_GetInstanceSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9110,7 +8953,7 @@ export const de_GetInstanceSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9149,10 +8992,9 @@ const de_GetInstanceSnapshotsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9170,12 +9012,12 @@ export const de_GetInstanceStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInstanceStateResult(data, context); + contents = _json(data); const response: GetInstanceStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9214,10 +9056,9 @@ const de_GetInstanceStateCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9240,7 +9081,7 @@ export const de_GetKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9279,10 +9120,9 @@ const de_GetKeyPairCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9305,7 +9145,7 @@ export const de_GetKeyPairsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9344,10 +9184,9 @@ const de_GetKeyPairsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9370,7 +9209,7 @@ export const de_GetLoadBalancerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9409,10 +9248,9 @@ const de_GetLoadBalancerCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9435,7 +9273,7 @@ export const de_GetLoadBalancerMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9474,10 +9312,9 @@ const de_GetLoadBalancerMetricDataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9500,7 +9337,7 @@ export const de_GetLoadBalancersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9539,10 +9376,9 @@ const de_GetLoadBalancersCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9565,7 +9401,7 @@ export const de_GetLoadBalancerTlsCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9604,10 +9440,9 @@ const de_GetLoadBalancerTlsCertificatesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9625,12 +9460,12 @@ export const de_GetLoadBalancerTlsPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLoadBalancerTlsPoliciesResult(data, context); + contents = _json(data); const response: GetLoadBalancerTlsPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9663,10 +9498,9 @@ const de_GetLoadBalancerTlsPoliciesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9689,7 +9523,7 @@ export const de_GetOperationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9728,10 +9562,9 @@ const de_GetOperationCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9754,7 +9587,7 @@ export const de_GetOperationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9793,10 +9626,9 @@ const de_GetOperationsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9819,7 +9651,7 @@ export const de_GetOperationsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9858,10 +9690,9 @@ const de_GetOperationsForResourceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9879,12 +9710,12 @@ export const de_GetRegionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegionsResult(data, context); + contents = _json(data); const response: GetRegionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9923,10 +9754,9 @@ const de_GetRegionsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9949,7 +9779,7 @@ export const de_GetRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9988,10 +9818,9 @@ const de_GetRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10009,12 +9838,12 @@ export const de_GetRelationalDatabaseBlueprintsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRelationalDatabaseBlueprintsResult(data, context); + contents = _json(data); const response: GetRelationalDatabaseBlueprintsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10053,10 +9882,9 @@ const de_GetRelationalDatabaseBlueprintsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10079,7 +9907,7 @@ export const de_GetRelationalDatabaseBundlesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10118,10 +9946,9 @@ const de_GetRelationalDatabaseBundlesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10144,7 +9971,7 @@ export const de_GetRelationalDatabaseEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10183,10 +10010,9 @@ const de_GetRelationalDatabaseEventsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10209,7 +10035,7 @@ export const de_GetRelationalDatabaseLogEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10248,10 +10074,9 @@ const de_GetRelationalDatabaseLogEventsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10269,12 +10094,12 @@ export const de_GetRelationalDatabaseLogStreamsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRelationalDatabaseLogStreamsResult(data, context); + contents = _json(data); const response: GetRelationalDatabaseLogStreamsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10313,10 +10138,9 @@ const de_GetRelationalDatabaseLogStreamsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10339,7 +10163,7 @@ export const de_GetRelationalDatabaseMasterUserPasswordCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10378,10 +10202,9 @@ const de_GetRelationalDatabaseMasterUserPasswordCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10404,7 +10227,7 @@ export const de_GetRelationalDatabaseMetricDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10443,10 +10266,9 @@ const de_GetRelationalDatabaseMetricDataCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10464,12 +10286,12 @@ export const de_GetRelationalDatabaseParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRelationalDatabaseParametersResult(data, context); + contents = _json(data); const response: GetRelationalDatabaseParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10508,10 +10330,9 @@ const de_GetRelationalDatabaseParametersCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10534,7 +10355,7 @@ export const de_GetRelationalDatabasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10573,10 +10394,9 @@ const de_GetRelationalDatabasesCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10599,7 +10419,7 @@ export const de_GetRelationalDatabaseSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10638,10 +10458,9 @@ const de_GetRelationalDatabaseSnapshotCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10664,7 +10483,7 @@ export const de_GetRelationalDatabaseSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10703,10 +10522,9 @@ const de_GetRelationalDatabaseSnapshotsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10729,7 +10547,7 @@ export const de_GetStaticIpCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10768,10 +10586,9 @@ const de_GetStaticIpCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10794,7 +10611,7 @@ export const de_GetStaticIpsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10833,10 +10650,9 @@ const de_GetStaticIpsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10859,7 +10675,7 @@ export const de_ImportKeyPairCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10898,10 +10714,9 @@ const de_ImportKeyPairCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10919,12 +10734,12 @@ export const de_IsVpcPeeredCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_IsVpcPeeredResult(data, context); + contents = _json(data); const response: IsVpcPeeredCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10963,10 +10778,9 @@ const de_IsVpcPeeredCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10989,7 +10803,7 @@ export const de_OpenInstancePublicPortsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11028,10 +10842,9 @@ const de_OpenInstancePublicPortsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11054,7 +10867,7 @@ export const de_PeerVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11093,10 +10906,9 @@ const de_PeerVpcCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11119,7 +10931,7 @@ export const de_PutAlarmCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11155,10 +10967,9 @@ const de_PutAlarmCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11181,7 +10992,7 @@ export const de_PutInstancePublicPortsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11220,10 +11031,9 @@ const de_PutInstancePublicPortsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11246,7 +11056,7 @@ export const de_RebootInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11285,10 +11095,9 @@ const de_RebootInstanceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11311,7 +11120,7 @@ export const de_RebootRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11350,10 +11159,9 @@ const de_RebootRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11376,7 +11184,7 @@ export const de_RegisterContainerImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11409,10 +11217,9 @@ const de_RegisterContainerImageCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11435,7 +11242,7 @@ export const de_ReleaseStaticIpCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11474,10 +11281,9 @@ const de_ReleaseStaticIpCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11500,7 +11306,7 @@ export const de_ResetDistributionCacheCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11536,10 +11342,9 @@ const de_ResetDistributionCacheCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11562,7 +11367,7 @@ export const de_SendContactMethodVerificationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11598,10 +11403,9 @@ const de_SendContactMethodVerificationCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11624,7 +11428,7 @@ export const de_SetIpAddressTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11663,10 +11467,9 @@ const de_SetIpAddressTypeCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11689,7 +11492,7 @@ export const de_SetResourceAccessForBucketCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11722,10 +11525,9 @@ const de_SetResourceAccessForBucketCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11748,7 +11550,7 @@ export const de_StartGUISessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11781,10 +11583,9 @@ const de_StartGUISessionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11807,7 +11608,7 @@ export const de_StartInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11846,10 +11647,9 @@ const de_StartInstanceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11872,7 +11672,7 @@ export const de_StartRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11911,10 +11711,9 @@ const de_StartRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11937,7 +11736,7 @@ export const de_StopGUISessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11970,10 +11769,9 @@ const de_StopGUISessionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11996,7 +11794,7 @@ export const de_StopInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12035,10 +11833,9 @@ const de_StopInstanceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12061,7 +11858,7 @@ export const de_StopRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12100,10 +11897,9 @@ const de_StopRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12126,7 +11922,7 @@ export const de_TagResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12165,10 +11961,9 @@ const de_TagResourceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12191,7 +11986,7 @@ export const de_TestAlarmCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12227,10 +12022,9 @@ const de_TestAlarmCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12253,7 +12047,7 @@ export const de_UnpeerVpcCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12292,10 +12086,9 @@ const de_UnpeerVpcCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12318,7 +12111,7 @@ export const de_UntagResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12357,10 +12150,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12383,7 +12175,7 @@ export const de_UpdateBucketCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12416,10 +12208,9 @@ const de_UpdateBucketCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12442,7 +12233,7 @@ export const de_UpdateBucketBundleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12475,10 +12266,9 @@ const de_UpdateBucketBundleCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12501,7 +12291,7 @@ export const de_UpdateContainerServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12534,10 +12324,9 @@ const de_UpdateContainerServiceCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12560,7 +12349,7 @@ export const de_UpdateDistributionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12596,10 +12385,9 @@ const de_UpdateDistributionCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12622,7 +12410,7 @@ export const de_UpdateDistributionBundleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12658,10 +12446,9 @@ const de_UpdateDistributionBundleCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12684,7 +12471,7 @@ export const de_UpdateDomainEntryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12723,10 +12510,9 @@ const de_UpdateDomainEntryCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12749,7 +12535,7 @@ export const de_UpdateInstanceMetadataOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12788,10 +12574,9 @@ const de_UpdateInstanceMetadataOptionsCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12814,7 +12599,7 @@ export const de_UpdateLoadBalancerAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12853,10 +12638,9 @@ const de_UpdateLoadBalancerAttributeCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12879,7 +12663,7 @@ export const de_UpdateRelationalDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12918,10 +12702,9 @@ const de_UpdateRelationalDatabaseCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12944,7 +12727,7 @@ export const de_UpdateRelationalDatabaseParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12983,10 +12766,9 @@ const de_UpdateRelationalDatabaseParametersCommandError = async ( throw await de_UnauthenticatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13000,7 +12782,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13016,7 +12798,7 @@ const de_AccountSetupInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountSetupInProgressException(body, context); + const deserialized: any = _json(body); const exception = new AccountSetupInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13032,7 +12814,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13045,7 +12827,7 @@ const de_InvalidInputExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13061,7 +12843,7 @@ const de_OperationFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationFailureException(body, context); + const deserialized: any = _json(body); const exception = new OperationFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13074,7 +12856,7 @@ const de_OperationFailureExceptionRes = async ( */ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceException(body, context); + const deserialized: any = _json(body); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13090,7 +12872,7 @@ const de_UnauthenticatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnauthenticatedException(body, context); + const deserialized: any = _json(body); const exception = new UnauthenticatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -13098,2444 +12880,600 @@ const de_UnauthenticatedExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccessRules - */ -const se_AccessRules = (input: AccessRules, context: __SerdeContext): any => { - return { - ...(input.allowPublicOverrides != null && { allowPublicOverrides: input.allowPublicOverrides }), - ...(input.getObject != null && { getObject: input.getObject }), - }; -}; - -/** - * serializeAws_json1_1AddOnRequest - */ -const se_AddOnRequest = (input: AddOnRequest, context: __SerdeContext): any => { - return { - ...(input.addOnType != null && { addOnType: input.addOnType }), - ...(input.autoSnapshotAddOnRequest != null && { - autoSnapshotAddOnRequest: se_AutoSnapshotAddOnRequest(input.autoSnapshotAddOnRequest, context), - }), - ...(input.stopInstanceOnIdleRequest != null && { - stopInstanceOnIdleRequest: se_StopInstanceOnIdleRequest(input.stopInstanceOnIdleRequest, context), - }), - }; -}; - -/** - * serializeAws_json1_1AddOnRequestList - */ -const se_AddOnRequestList = (input: AddOnRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AddOnRequest(entry, context); - }); -}; +// se_AccessRules omitted. -/** - * serializeAws_json1_1AllocateStaticIpRequest - */ -const se_AllocateStaticIpRequest = (input: AllocateStaticIpRequest, context: __SerdeContext): any => { - return { - ...(input.staticIpName != null && { staticIpName: input.staticIpName }), - }; -}; +// se_AddOnRequest omitted. -/** - * serializeAws_json1_1AttachCertificateToDistributionRequest - */ -const se_AttachCertificateToDistributionRequest = ( - input: AttachCertificateToDistributionRequest, - context: __SerdeContext -): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.distributionName != null && { distributionName: input.distributionName }), - }; -}; +// se_AddOnRequestList omitted. -/** - * serializeAws_json1_1AttachDiskRequest - */ -const se_AttachDiskRequest = (input: AttachDiskRequest, context: __SerdeContext): any => { - return { - ...(input.autoMounting != null && { autoMounting: input.autoMounting }), - ...(input.diskName != null && { diskName: input.diskName }), - ...(input.diskPath != null && { diskPath: input.diskPath }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; +// se_AllocateStaticIpRequest omitted. -/** - * serializeAws_json1_1AttachedDiskMap - */ -const se_AttachedDiskMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_DiskMapList(value, context); - return acc; - }, {}); -}; +// se_AttachCertificateToDistributionRequest omitted. -/** - * serializeAws_json1_1AttachInstancesToLoadBalancerRequest - */ -const se_AttachInstancesToLoadBalancerRequest = ( - input: AttachInstancesToLoadBalancerRequest, - context: __SerdeContext -): any => { - return { - ...(input.instanceNames != null && { instanceNames: se_ResourceNameList(input.instanceNames, context) }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; +// se_AttachDiskRequest omitted. -/** - * serializeAws_json1_1AttachLoadBalancerTlsCertificateRequest - */ -const se_AttachLoadBalancerTlsCertificateRequest = ( - input: AttachLoadBalancerTlsCertificateRequest, - context: __SerdeContext -): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; +// se_AttachedDiskMap omitted. -/** - * serializeAws_json1_1AttachStaticIpRequest - */ -const se_AttachStaticIpRequest = (input: AttachStaticIpRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.staticIpName != null && { staticIpName: input.staticIpName }), - }; -}; +// se_AttachInstancesToLoadBalancerRequest omitted. -/** - * serializeAws_json1_1AutoSnapshotAddOnRequest - */ -const se_AutoSnapshotAddOnRequest = (input: AutoSnapshotAddOnRequest, context: __SerdeContext): any => { - return { - ...(input.snapshotTimeOfDay != null && { snapshotTimeOfDay: input.snapshotTimeOfDay }), - }; -}; +// se_AttachLoadBalancerTlsCertificateRequest omitted. -/** - * serializeAws_json1_1BucketAccessLogConfig - */ -const se_BucketAccessLogConfig = (input: BucketAccessLogConfig, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: input.destination }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_AttachStaticIpRequest omitted. -/** - * serializeAws_json1_1CacheBehavior - */ -const se_CacheBehavior = (input: CacheBehavior, context: __SerdeContext): any => { - return { - ...(input.behavior != null && { behavior: input.behavior }), - }; -}; +// se_AutoSnapshotAddOnRequest omitted. -/** - * serializeAws_json1_1CacheBehaviorList - */ -const se_CacheBehaviorList = (input: CacheBehaviorPerPath[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CacheBehaviorPerPath(entry, context); - }); -}; +// se_BucketAccessLogConfig omitted. -/** - * serializeAws_json1_1CacheBehaviorPerPath - */ -const se_CacheBehaviorPerPath = (input: CacheBehaviorPerPath, context: __SerdeContext): any => { - return { - ...(input.behavior != null && { behavior: input.behavior }), - ...(input.path != null && { path: input.path }), - }; -}; +// se_CacheBehavior omitted. -/** - * serializeAws_json1_1CacheSettings - */ -const se_CacheSettings = (input: CacheSettings, context: __SerdeContext): any => { - return { - ...(input.allowedHTTPMethods != null && { allowedHTTPMethods: input.allowedHTTPMethods }), - ...(input.cachedHTTPMethods != null && { cachedHTTPMethods: input.cachedHTTPMethods }), - ...(input.defaultTTL != null && { defaultTTL: input.defaultTTL }), - ...(input.forwardedCookies != null && { forwardedCookies: se_CookieObject(input.forwardedCookies, context) }), - ...(input.forwardedHeaders != null && { forwardedHeaders: se_HeaderObject(input.forwardedHeaders, context) }), - ...(input.forwardedQueryStrings != null && { - forwardedQueryStrings: se_QueryStringObject(input.forwardedQueryStrings, context), - }), - ...(input.maximumTTL != null && { maximumTTL: input.maximumTTL }), - ...(input.minimumTTL != null && { minimumTTL: input.minimumTTL }), - }; -}; +// se_CacheBehaviorList omitted. -/** - * serializeAws_json1_1CertificateStatusList - */ -const se_CertificateStatusList = (input: (CertificateStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CacheBehaviorPerPath omitted. -/** - * serializeAws_json1_1CloseInstancePublicPortsRequest - */ -const se_CloseInstancePublicPortsRequest = (input: CloseInstancePublicPortsRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.portInfo != null && { portInfo: se_PortInfo(input.portInfo, context) }), - }; -}; +// se_CacheSettings omitted. -/** - * serializeAws_json1_1ContactProtocolsList - */ -const se_ContactProtocolsList = (input: (ContactProtocol | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CertificateStatusList omitted. -/** - * serializeAws_json1_1Container - */ -const se_Container = (input: Container, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_StringList(input.command, context) }), - ...(input.environment != null && { environment: se_Environment(input.environment, context) }), - ...(input.image != null && { image: input.image }), - ...(input.ports != null && { ports: se_PortMap(input.ports, context) }), - }; -}; +// se_CloseInstancePublicPortsRequest omitted. -/** - * serializeAws_json1_1ContainerMap - */ -const se_ContainerMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Container(value, context); - return acc; - }, {}); -}; +// se_ContactProtocolsList omitted. -/** - * serializeAws_json1_1ContainerServiceDeploymentRequest - */ -const se_ContainerServiceDeploymentRequest = ( - input: ContainerServiceDeploymentRequest, - context: __SerdeContext -): any => { - return { - ...(input.containers != null && { containers: se_ContainerMap(input.containers, context) }), - ...(input.publicEndpoint != null && { publicEndpoint: se_EndpointRequest(input.publicEndpoint, context) }), - }; -}; +// se_Container omitted. -/** - * serializeAws_json1_1ContainerServiceECRImagePullerRoleRequest - */ -const se_ContainerServiceECRImagePullerRoleRequest = ( - input: ContainerServiceECRImagePullerRoleRequest, - context: __SerdeContext -): any => { - return { - ...(input.isActive != null && { isActive: input.isActive }), - }; -}; +// se_ContainerMap omitted. -/** - * serializeAws_json1_1ContainerServiceHealthCheckConfig - */ -const se_ContainerServiceHealthCheckConfig = ( - input: ContainerServiceHealthCheckConfig, - context: __SerdeContext -): any => { - return { - ...(input.healthyThreshold != null && { healthyThreshold: input.healthyThreshold }), - ...(input.intervalSeconds != null && { intervalSeconds: input.intervalSeconds }), - ...(input.path != null && { path: input.path }), - ...(input.successCodes != null && { successCodes: input.successCodes }), - ...(input.timeoutSeconds != null && { timeoutSeconds: input.timeoutSeconds }), - ...(input.unhealthyThreshold != null && { unhealthyThreshold: input.unhealthyThreshold }), - }; -}; +// se_ContainerServiceDeploymentRequest omitted. -/** - * serializeAws_json1_1ContainerServicePublicDomains - */ -const se_ContainerServicePublicDomains = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ContainerServicePublicDomainsList(value, context); - return acc; - }, {}); -}; +// se_ContainerServiceECRImagePullerRoleRequest omitted. -/** - * serializeAws_json1_1ContainerServicePublicDomainsList - */ -const se_ContainerServicePublicDomainsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ContainerServiceHealthCheckConfig omitted. -/** - * serializeAws_json1_1CookieObject - */ -const se_CookieObject = (input: CookieObject, context: __SerdeContext): any => { - return { - ...(input.cookiesAllowList != null && { cookiesAllowList: se_StringList(input.cookiesAllowList, context) }), - ...(input.option != null && { option: input.option }), - }; -}; +// se_ContainerServicePublicDomains omitted. -/** - * serializeAws_json1_1CopySnapshotRequest - */ -const se_CopySnapshotRequest = (input: CopySnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.restoreDate != null && { restoreDate: input.restoreDate }), - ...(input.sourceRegion != null && { sourceRegion: input.sourceRegion }), - ...(input.sourceResourceName != null && { sourceResourceName: input.sourceResourceName }), - ...(input.sourceSnapshotName != null && { sourceSnapshotName: input.sourceSnapshotName }), - ...(input.targetSnapshotName != null && { targetSnapshotName: input.targetSnapshotName }), - ...(input.useLatestRestorableAutoSnapshot != null && { - useLatestRestorableAutoSnapshot: input.useLatestRestorableAutoSnapshot, - }), - }; -}; +// se_ContainerServicePublicDomainsList omitted. -/** - * serializeAws_json1_1CreateBucketAccessKeyRequest - */ -const se_CreateBucketAccessKeyRequest = (input: CreateBucketAccessKeyRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - }; -}; +// se_CookieObject omitted. -/** - * serializeAws_json1_1CreateBucketRequest - */ -const se_CreateBucketRequest = (input: CreateBucketRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bundleId != null && { bundleId: input.bundleId }), - ...(input.enableObjectVersioning != null && { enableObjectVersioning: input.enableObjectVersioning }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CopySnapshotRequest omitted. -/** - * serializeAws_json1_1CreateCertificateRequest - */ -const se_CreateCertificateRequest = (input: CreateCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.subjectAlternativeNames != null && { - subjectAlternativeNames: se_SubjectAlternativeNameList(input.subjectAlternativeNames, context), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateBucketAccessKeyRequest omitted. -/** - * serializeAws_json1_1CreateCloudFormationStackRequest - */ -const se_CreateCloudFormationStackRequest = (input: CreateCloudFormationStackRequest, context: __SerdeContext): any => { - return { - ...(input.instances != null && { instances: se_InstanceEntryList(input.instances, context) }), - }; -}; +// se_CreateBucketRequest omitted. -/** - * serializeAws_json1_1CreateContactMethodRequest - */ -const se_CreateContactMethodRequest = (input: CreateContactMethodRequest, context: __SerdeContext): any => { - return { - ...(input.contactEndpoint != null && { contactEndpoint: input.contactEndpoint }), - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; +// se_CreateCertificateRequest omitted. -/** - * serializeAws_json1_1CreateContainerServiceDeploymentRequest - */ -const se_CreateContainerServiceDeploymentRequest = ( - input: CreateContainerServiceDeploymentRequest, - context: __SerdeContext -): any => { - return { - ...(input.containers != null && { containers: se_ContainerMap(input.containers, context) }), - ...(input.publicEndpoint != null && { publicEndpoint: se_EndpointRequest(input.publicEndpoint, context) }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_CreateCloudFormationStackRequest omitted. -/** - * serializeAws_json1_1CreateContainerServiceRegistryLoginRequest - */ -const se_CreateContainerServiceRegistryLoginRequest = ( - input: CreateContainerServiceRegistryLoginRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_CreateContactMethodRequest omitted. -/** - * serializeAws_json1_1CreateContainerServiceRequest - */ -const se_CreateContainerServiceRequest = (input: CreateContainerServiceRequest, context: __SerdeContext): any => { - return { - ...(input.deployment != null && { deployment: se_ContainerServiceDeploymentRequest(input.deployment, context) }), - ...(input.power != null && { power: input.power }), - ...(input.privateRegistryAccess != null && { - privateRegistryAccess: se_PrivateRegistryAccessRequest(input.privateRegistryAccess, context), - }), - ...(input.publicDomainNames != null && { - publicDomainNames: se_ContainerServicePublicDomains(input.publicDomainNames, context), - }), - ...(input.scale != null && { scale: input.scale }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateContainerServiceDeploymentRequest omitted. -/** - * serializeAws_json1_1CreateDiskFromSnapshotRequest - */ -const se_CreateDiskFromSnapshotRequest = (input: CreateDiskFromSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.addOns != null && { addOns: se_AddOnRequestList(input.addOns, context) }), - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.diskName != null && { diskName: input.diskName }), - ...(input.diskSnapshotName != null && { diskSnapshotName: input.diskSnapshotName }), - ...(input.restoreDate != null && { restoreDate: input.restoreDate }), - ...(input.sizeInGb != null && { sizeInGb: input.sizeInGb }), - ...(input.sourceDiskName != null && { sourceDiskName: input.sourceDiskName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.useLatestRestorableAutoSnapshot != null && { - useLatestRestorableAutoSnapshot: input.useLatestRestorableAutoSnapshot, - }), - }; -}; +// se_CreateContainerServiceRegistryLoginRequest omitted. -/** - * serializeAws_json1_1CreateDiskRequest - */ -const se_CreateDiskRequest = (input: CreateDiskRequest, context: __SerdeContext): any => { - return { - ...(input.addOns != null && { addOns: se_AddOnRequestList(input.addOns, context) }), - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.diskName != null && { diskName: input.diskName }), - ...(input.sizeInGb != null && { sizeInGb: input.sizeInGb }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateContainerServiceRequest omitted. -/** - * serializeAws_json1_1CreateDiskSnapshotRequest - */ -const se_CreateDiskSnapshotRequest = (input: CreateDiskSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.diskName != null && { diskName: input.diskName }), - ...(input.diskSnapshotName != null && { diskSnapshotName: input.diskSnapshotName }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateDiskFromSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateDistributionRequest - */ -const se_CreateDistributionRequest = (input: CreateDistributionRequest, context: __SerdeContext): any => { - return { - ...(input.bundleId != null && { bundleId: input.bundleId }), - ...(input.cacheBehaviorSettings != null && { - cacheBehaviorSettings: se_CacheSettings(input.cacheBehaviorSettings, context), - }), - ...(input.cacheBehaviors != null && { cacheBehaviors: se_CacheBehaviorList(input.cacheBehaviors, context) }), - ...(input.defaultCacheBehavior != null && { - defaultCacheBehavior: se_CacheBehavior(input.defaultCacheBehavior, context), - }), - ...(input.distributionName != null && { distributionName: input.distributionName }), - ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }), - ...(input.origin != null && { origin: se_InputOrigin(input.origin, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateDiskRequest omitted. -/** - * serializeAws_json1_1CreateDomainEntryRequest - */ -const se_CreateDomainEntryRequest = (input: CreateDomainEntryRequest, context: __SerdeContext): any => { - return { - ...(input.domainEntry != null && { domainEntry: se_DomainEntry(input.domainEntry, context) }), - ...(input.domainName != null && { domainName: input.domainName }), - }; -}; +// se_CreateDiskSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateDomainRequest - */ -const se_CreateDomainRequest = (input: CreateDomainRequest, context: __SerdeContext): any => { - return { - ...(input.domainName != null && { domainName: input.domainName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateDistributionRequest omitted. -/** - * serializeAws_json1_1CreateGUISessionAccessDetailsRequest - */ -const se_CreateGUISessionAccessDetailsRequest = ( - input: CreateGUISessionAccessDetailsRequest, - context: __SerdeContext -): any => { - return { - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; +// se_CreateDomainEntryRequest omitted. -/** - * serializeAws_json1_1CreateInstancesFromSnapshotRequest - */ -const se_CreateInstancesFromSnapshotRequest = ( - input: CreateInstancesFromSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.addOns != null && { addOns: se_AddOnRequestList(input.addOns, context) }), - ...(input.attachedDiskMapping != null && { - attachedDiskMapping: se_AttachedDiskMap(input.attachedDiskMapping, context), - }), - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.bundleId != null && { bundleId: input.bundleId }), - ...(input.instanceNames != null && { instanceNames: se_StringList(input.instanceNames, context) }), - ...(input.instanceSnapshotName != null && { instanceSnapshotName: input.instanceSnapshotName }), - ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }), - ...(input.keyPairName != null && { keyPairName: input.keyPairName }), - ...(input.restoreDate != null && { restoreDate: input.restoreDate }), - ...(input.sourceInstanceName != null && { sourceInstanceName: input.sourceInstanceName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.useLatestRestorableAutoSnapshot != null && { - useLatestRestorableAutoSnapshot: input.useLatestRestorableAutoSnapshot, - }), - ...(input.userData != null && { userData: input.userData }), - }; -}; - -/** - * serializeAws_json1_1CreateInstanceSnapshotRequest - */ -const se_CreateInstanceSnapshotRequest = (input: CreateInstanceSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.instanceSnapshotName != null && { instanceSnapshotName: input.instanceSnapshotName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateDomainRequest omitted. -/** - * serializeAws_json1_1CreateInstancesRequest - */ -const se_CreateInstancesRequest = (input: CreateInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.addOns != null && { addOns: se_AddOnRequestList(input.addOns, context) }), - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.blueprintId != null && { blueprintId: input.blueprintId }), - ...(input.bundleId != null && { bundleId: input.bundleId }), - ...(input.customImageName != null && { customImageName: input.customImageName }), - ...(input.instanceNames != null && { instanceNames: se_StringList(input.instanceNames, context) }), - ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }), - ...(input.keyPairName != null && { keyPairName: input.keyPairName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.userData != null && { userData: input.userData }), - }; -}; +// se_CreateGUISessionAccessDetailsRequest omitted. -/** - * serializeAws_json1_1CreateKeyPairRequest - */ -const se_CreateKeyPairRequest = (input: CreateKeyPairRequest, context: __SerdeContext): any => { - return { - ...(input.keyPairName != null && { keyPairName: input.keyPairName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateInstancesFromSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateLoadBalancerRequest - */ -const se_CreateLoadBalancerRequest = (input: CreateLoadBalancerRequest, context: __SerdeContext): any => { - return { - ...(input.certificateAlternativeNames != null && { - certificateAlternativeNames: se_DomainNameList(input.certificateAlternativeNames, context), - }), - ...(input.certificateDomainName != null && { certificateDomainName: input.certificateDomainName }), - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.healthCheckPath != null && { healthCheckPath: input.healthCheckPath }), - ...(input.instancePort != null && { instancePort: input.instancePort }), - ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.tlsPolicyName != null && { tlsPolicyName: input.tlsPolicyName }), - }; -}; +// se_CreateInstanceSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateLoadBalancerTlsCertificateRequest - */ -const se_CreateLoadBalancerTlsCertificateRequest = ( - input: CreateLoadBalancerTlsCertificateRequest, - context: __SerdeContext -): any => { - return { - ...(input.certificateAlternativeNames != null && { - certificateAlternativeNames: se_DomainNameList(input.certificateAlternativeNames, context), - }), - ...(input.certificateDomainName != null && { certificateDomainName: input.certificateDomainName }), - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateRelationalDatabaseFromSnapshotRequest - */ -const se_CreateRelationalDatabaseFromSnapshotRequest = ( - input: CreateRelationalDatabaseFromSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }), - ...(input.relationalDatabaseBundleId != null && { relationalDatabaseBundleId: input.relationalDatabaseBundleId }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.relationalDatabaseSnapshotName != null && { - relationalDatabaseSnapshotName: input.relationalDatabaseSnapshotName, - }), - ...(input.restoreTime != null && { restoreTime: Math.round(input.restoreTime.getTime() / 1000) }), - ...(input.sourceRelationalDatabaseName != null && { - sourceRelationalDatabaseName: input.sourceRelationalDatabaseName, - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.useLatestRestorableTime != null && { useLatestRestorableTime: input.useLatestRestorableTime }), - }; -}; - -/** - * serializeAws_json1_1CreateRelationalDatabaseRequest - */ -const se_CreateRelationalDatabaseRequest = (input: CreateRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.masterDatabaseName != null && { masterDatabaseName: input.masterDatabaseName }), - ...(input.masterUserPassword != null && { masterUserPassword: input.masterUserPassword }), - ...(input.masterUsername != null && { masterUsername: input.masterUsername }), - ...(input.preferredBackupWindow != null && { preferredBackupWindow: input.preferredBackupWindow }), - ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }), - ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }), - ...(input.relationalDatabaseBlueprintId != null && { - relationalDatabaseBlueprintId: input.relationalDatabaseBlueprintId, - }), - ...(input.relationalDatabaseBundleId != null && { relationalDatabaseBundleId: input.relationalDatabaseBundleId }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateRelationalDatabaseSnapshotRequest - */ -const se_CreateRelationalDatabaseSnapshotRequest = ( - input: CreateRelationalDatabaseSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.relationalDatabaseSnapshotName != null && { - relationalDatabaseSnapshotName: input.relationalDatabaseSnapshotName, - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteAlarmRequest - */ -const se_DeleteAlarmRequest = (input: DeleteAlarmRequest, context: __SerdeContext): any => { - return { - ...(input.alarmName != null && { alarmName: input.alarmName }), - }; -}; - -/** - * serializeAws_json1_1DeleteAutoSnapshotRequest - */ -const se_DeleteAutoSnapshotRequest = (input: DeleteAutoSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.date != null && { date: input.date }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteBucketAccessKeyRequest - */ -const se_DeleteBucketAccessKeyRequest = (input: DeleteBucketAccessKeyRequest, context: __SerdeContext): any => { - return { - ...(input.accessKeyId != null && { accessKeyId: input.accessKeyId }), - ...(input.bucketName != null && { bucketName: input.bucketName }), - }; -}; - -/** - * serializeAws_json1_1DeleteBucketRequest - */ -const se_DeleteBucketRequest = (input: DeleteBucketRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.forceDelete != null && { forceDelete: input.forceDelete }), - }; -}; - -/** - * serializeAws_json1_1DeleteCertificateRequest - */ -const se_DeleteCertificateRequest = (input: DeleteCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - }; -}; - -/** - * serializeAws_json1_1DeleteContactMethodRequest - */ -const se_DeleteContactMethodRequest = (input: DeleteContactMethodRequest, context: __SerdeContext): any => { - return { - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; - -/** - * serializeAws_json1_1DeleteContainerImageRequest - */ -const se_DeleteContainerImageRequest = (input: DeleteContainerImageRequest, context: __SerdeContext): any => { - return { - ...(input.image != null && { image: input.image }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteContainerServiceRequest - */ -const se_DeleteContainerServiceRequest = (input: DeleteContainerServiceRequest, context: __SerdeContext): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDiskRequest - */ -const se_DeleteDiskRequest = (input: DeleteDiskRequest, context: __SerdeContext): any => { - return { - ...(input.diskName != null && { diskName: input.diskName }), - ...(input.forceDeleteAddOns != null && { forceDeleteAddOns: input.forceDeleteAddOns }), - }; -}; - -/** - * serializeAws_json1_1DeleteDiskSnapshotRequest - */ -const se_DeleteDiskSnapshotRequest = (input: DeleteDiskSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.diskSnapshotName != null && { diskSnapshotName: input.diskSnapshotName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDistributionRequest - */ -const se_DeleteDistributionRequest = (input: DeleteDistributionRequest, context: __SerdeContext): any => { - return { - ...(input.distributionName != null && { distributionName: input.distributionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDomainEntryRequest - */ -const se_DeleteDomainEntryRequest = (input: DeleteDomainEntryRequest, context: __SerdeContext): any => { - return { - ...(input.domainEntry != null && { domainEntry: se_DomainEntry(input.domainEntry, context) }), - ...(input.domainName != null && { domainName: input.domainName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDomainRequest - */ -const se_DeleteDomainRequest = (input: DeleteDomainRequest, context: __SerdeContext): any => { - return { - ...(input.domainName != null && { domainName: input.domainName }), - }; -}; - -/** - * serializeAws_json1_1DeleteInstanceRequest - */ -const se_DeleteInstanceRequest = (input: DeleteInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.forceDeleteAddOns != null && { forceDeleteAddOns: input.forceDeleteAddOns }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteInstanceSnapshotRequest - */ -const se_DeleteInstanceSnapshotRequest = (input: DeleteInstanceSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.instanceSnapshotName != null && { instanceSnapshotName: input.instanceSnapshotName }), - }; -}; - -/** - * serializeAws_json1_1DeleteKeyPairRequest - */ -const se_DeleteKeyPairRequest = (input: DeleteKeyPairRequest, context: __SerdeContext): any => { - return { - ...(input.expectedFingerprint != null && { expectedFingerprint: input.expectedFingerprint }), - ...(input.keyPairName != null && { keyPairName: input.keyPairName }), - }; -}; - -/** - * serializeAws_json1_1DeleteKnownHostKeysRequest - */ -const se_DeleteKnownHostKeysRequest = (input: DeleteKnownHostKeysRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteLoadBalancerRequest - */ -const se_DeleteLoadBalancerRequest = (input: DeleteLoadBalancerRequest, context: __SerdeContext): any => { - return { - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; - -/** - * serializeAws_json1_1DeleteLoadBalancerTlsCertificateRequest - */ -const se_DeleteLoadBalancerTlsCertificateRequest = ( - input: DeleteLoadBalancerTlsCertificateRequest, - context: __SerdeContext -): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.force != null && { force: input.force }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; - -/** - * serializeAws_json1_1DeleteRelationalDatabaseRequest - */ -const se_DeleteRelationalDatabaseRequest = (input: DeleteRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.finalRelationalDatabaseSnapshotName != null && { - finalRelationalDatabaseSnapshotName: input.finalRelationalDatabaseSnapshotName, - }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.skipFinalSnapshot != null && { skipFinalSnapshot: input.skipFinalSnapshot }), - }; -}; - -/** - * serializeAws_json1_1DeleteRelationalDatabaseSnapshotRequest - */ -const se_DeleteRelationalDatabaseSnapshotRequest = ( - input: DeleteRelationalDatabaseSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.relationalDatabaseSnapshotName != null && { - relationalDatabaseSnapshotName: input.relationalDatabaseSnapshotName, - }), - }; -}; - -/** - * serializeAws_json1_1DetachCertificateFromDistributionRequest - */ -const se_DetachCertificateFromDistributionRequest = ( - input: DetachCertificateFromDistributionRequest, - context: __SerdeContext -): any => { - return { - ...(input.distributionName != null && { distributionName: input.distributionName }), - }; -}; - -/** - * serializeAws_json1_1DetachDiskRequest - */ -const se_DetachDiskRequest = (input: DetachDiskRequest, context: __SerdeContext): any => { - return { - ...(input.diskName != null && { diskName: input.diskName }), - }; -}; - -/** - * serializeAws_json1_1DetachInstancesFromLoadBalancerRequest - */ -const se_DetachInstancesFromLoadBalancerRequest = ( - input: DetachInstancesFromLoadBalancerRequest, - context: __SerdeContext -): any => { - return { - ...(input.instanceNames != null && { instanceNames: se_ResourceNameList(input.instanceNames, context) }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; - -/** - * serializeAws_json1_1DetachStaticIpRequest - */ -const se_DetachStaticIpRequest = (input: DetachStaticIpRequest, context: __SerdeContext): any => { - return { - ...(input.staticIpName != null && { staticIpName: input.staticIpName }), - }; -}; - -/** - * serializeAws_json1_1DisableAddOnRequest - */ -const se_DisableAddOnRequest = (input: DisableAddOnRequest, context: __SerdeContext): any => { - return { - ...(input.addOnType != null && { addOnType: input.addOnType }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; - -/** - * serializeAws_json1_1DiskMap - */ -const se_DiskMap = (input: DiskMap, context: __SerdeContext): any => { - return { - ...(input.newDiskName != null && { newDiskName: input.newDiskName }), - ...(input.originalDiskPath != null && { originalDiskPath: input.originalDiskPath }), - }; -}; - -/** - * serializeAws_json1_1DiskMapList - */ -const se_DiskMapList = (input: DiskMap[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DiskMap(entry, context); - }); -}; - -/** - * serializeAws_json1_1DomainEntry - */ -const se_DomainEntry = (input: DomainEntry, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.isAlias != null && { isAlias: input.isAlias }), - ...(input.name != null && { name: input.name }), - ...(input.options != null && { options: se_DomainEntryOptions(input.options, context) }), - ...(input.target != null && { target: input.target }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1DomainEntryOptions - */ -const se_DomainEntryOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1DomainNameList - */ -const se_DomainNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1DownloadDefaultKeyPairRequest - */ -const se_DownloadDefaultKeyPairRequest = (input: DownloadDefaultKeyPairRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1EnableAddOnRequest - */ -const se_EnableAddOnRequest = (input: EnableAddOnRequest, context: __SerdeContext): any => { - return { - ...(input.addOnRequest != null && { addOnRequest: se_AddOnRequest(input.addOnRequest, context) }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; - -/** - * serializeAws_json1_1EndpointRequest - */ -const se_EndpointRequest = (input: EndpointRequest, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.containerPort != null && { containerPort: input.containerPort }), - ...(input.healthCheck != null && { healthCheck: se_ContainerServiceHealthCheckConfig(input.healthCheck, context) }), - }; -}; - -/** - * serializeAws_json1_1Environment - */ -const se_Environment = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ExportSnapshotRequest - */ -const se_ExportSnapshotRequest = (input: ExportSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.sourceSnapshotName != null && { sourceSnapshotName: input.sourceSnapshotName }), - }; -}; - -/** - * serializeAws_json1_1GetActiveNamesRequest - */ -const se_GetActiveNamesRequest = (input: GetActiveNamesRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetAlarmsRequest - */ -const se_GetAlarmsRequest = (input: GetAlarmsRequest, context: __SerdeContext): any => { - return { - ...(input.alarmName != null && { alarmName: input.alarmName }), - ...(input.monitoredResourceName != null && { monitoredResourceName: input.monitoredResourceName }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetAutoSnapshotsRequest - */ -const se_GetAutoSnapshotsRequest = (input: GetAutoSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; - -/** - * serializeAws_json1_1GetBlueprintsRequest - */ -const se_GetBlueprintsRequest = (input: GetBlueprintsRequest, context: __SerdeContext): any => { - return { - ...(input.appCategory != null && { appCategory: input.appCategory }), - ...(input.includeInactive != null && { includeInactive: input.includeInactive }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetBucketAccessKeysRequest - */ -const se_GetBucketAccessKeysRequest = (input: GetBucketAccessKeysRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - }; -}; - -/** - * serializeAws_json1_1GetBucketBundlesRequest - */ -const se_GetBucketBundlesRequest = (input: GetBucketBundlesRequest, context: __SerdeContext): any => { - return { - ...(input.includeInactive != null && { includeInactive: input.includeInactive }), - }; -}; - -/** - * serializeAws_json1_1GetBucketMetricDataRequest - */ -const se_GetBucketMetricDataRequest = (input: GetBucketMetricDataRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.period != null && { period: input.period }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statistics != null && { statistics: se_MetricStatisticList(input.statistics, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; - -/** - * serializeAws_json1_1GetBucketsRequest - */ -const se_GetBucketsRequest = (input: GetBucketsRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.includeConnectedResources != null && { includeConnectedResources: input.includeConnectedResources }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetBundlesRequest - */ -const se_GetBundlesRequest = (input: GetBundlesRequest, context: __SerdeContext): any => { - return { - ...(input.appCategory != null && { appCategory: input.appCategory }), - ...(input.includeInactive != null && { includeInactive: input.includeInactive }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetCertificatesRequest - */ -const se_GetCertificatesRequest = (input: GetCertificatesRequest, context: __SerdeContext): any => { - return { - ...(input.certificateName != null && { certificateName: input.certificateName }), - ...(input.certificateStatuses != null && { - certificateStatuses: se_CertificateStatusList(input.certificateStatuses, context), - }), - ...(input.includeCertificateDetails != null && { includeCertificateDetails: input.includeCertificateDetails }), - }; -}; - -/** - * serializeAws_json1_1GetCloudFormationStackRecordsRequest - */ -const se_GetCloudFormationStackRecordsRequest = ( - input: GetCloudFormationStackRecordsRequest, - context: __SerdeContext -): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetContactMethodsRequest - */ -const se_GetContactMethodsRequest = (input: GetContactMethodsRequest, context: __SerdeContext): any => { - return { - ...(input.protocols != null && { protocols: se_ContactProtocolsList(input.protocols, context) }), - }; -}; - -/** - * serializeAws_json1_1GetContainerAPIMetadataRequest - */ -const se_GetContainerAPIMetadataRequest = (input: GetContainerAPIMetadataRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetContainerImagesRequest - */ -const se_GetContainerImagesRequest = (input: GetContainerImagesRequest, context: __SerdeContext): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; - -/** - * serializeAws_json1_1GetContainerLogRequest - */ -const se_GetContainerLogRequest = (input: GetContainerLogRequest, context: __SerdeContext): any => { - return { - ...(input.containerName != null && { containerName: input.containerName }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.filterPattern != null && { filterPattern: input.filterPattern }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1GetContainerServiceDeploymentsRequest - */ -const se_GetContainerServiceDeploymentsRequest = ( - input: GetContainerServiceDeploymentsRequest, - context: __SerdeContext -): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; - -/** - * serializeAws_json1_1GetContainerServiceMetricDataRequest - */ -const se_GetContainerServiceMetricDataRequest = ( - input: GetContainerServiceMetricDataRequest, - context: __SerdeContext -): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.period != null && { period: input.period }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statistics != null && { statistics: se_MetricStatisticList(input.statistics, context) }), - }; -}; - -/** - * serializeAws_json1_1GetContainerServicePowersRequest - */ -const se_GetContainerServicePowersRequest = (input: GetContainerServicePowersRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetContainerServicesRequest - */ -const se_GetContainerServicesRequest = (input: GetContainerServicesRequest, context: __SerdeContext): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; - -/** - * serializeAws_json1_1GetCostEstimateRequest - */ -const se_GetCostEstimateRequest = (input: GetCostEstimateRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1GetDiskRequest - */ -const se_GetDiskRequest = (input: GetDiskRequest, context: __SerdeContext): any => { - return { - ...(input.diskName != null && { diskName: input.diskName }), - }; -}; - -/** - * serializeAws_json1_1GetDiskSnapshotRequest - */ -const se_GetDiskSnapshotRequest = (input: GetDiskSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.diskSnapshotName != null && { diskSnapshotName: input.diskSnapshotName }), - }; -}; - -/** - * serializeAws_json1_1GetDiskSnapshotsRequest - */ -const se_GetDiskSnapshotsRequest = (input: GetDiskSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetDisksRequest - */ -const se_GetDisksRequest = (input: GetDisksRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetDistributionBundlesRequest - */ -const se_GetDistributionBundlesRequest = (input: GetDistributionBundlesRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetDistributionLatestCacheResetRequest - */ -const se_GetDistributionLatestCacheResetRequest = ( - input: GetDistributionLatestCacheResetRequest, - context: __SerdeContext -): any => { - return { - ...(input.distributionName != null && { distributionName: input.distributionName }), - }; -}; - -/** - * serializeAws_json1_1GetDistributionMetricDataRequest - */ -const se_GetDistributionMetricDataRequest = (input: GetDistributionMetricDataRequest, context: __SerdeContext): any => { - return { - ...(input.distributionName != null && { distributionName: input.distributionName }), - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.period != null && { period: input.period }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statistics != null && { statistics: se_MetricStatisticList(input.statistics, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; - -/** - * serializeAws_json1_1GetDistributionsRequest - */ -const se_GetDistributionsRequest = (input: GetDistributionsRequest, context: __SerdeContext): any => { - return { - ...(input.distributionName != null && { distributionName: input.distributionName }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetDomainRequest - */ -const se_GetDomainRequest = (input: GetDomainRequest, context: __SerdeContext): any => { - return { - ...(input.domainName != null && { domainName: input.domainName }), - }; -}; - -/** - * serializeAws_json1_1GetDomainsRequest - */ -const se_GetDomainsRequest = (input: GetDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetExportSnapshotRecordsRequest - */ -const se_GetExportSnapshotRecordsRequest = (input: GetExportSnapshotRecordsRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceAccessDetailsRequest - */ -const se_GetInstanceAccessDetailsRequest = (input: GetInstanceAccessDetailsRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceMetricDataRequest - */ -const se_GetInstanceMetricDataRequest = (input: GetInstanceMetricDataRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.period != null && { period: input.period }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statistics != null && { statistics: se_MetricStatisticList(input.statistics, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; - -/** - * serializeAws_json1_1GetInstancePortStatesRequest - */ -const se_GetInstancePortStatesRequest = (input: GetInstancePortStatesRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceRequest - */ -const se_GetInstanceRequest = (input: GetInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceSnapshotRequest - */ -const se_GetInstanceSnapshotRequest = (input: GetInstanceSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.instanceSnapshotName != null && { instanceSnapshotName: input.instanceSnapshotName }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceSnapshotsRequest - */ -const se_GetInstanceSnapshotsRequest = (input: GetInstanceSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetInstancesRequest - */ -const se_GetInstancesRequest = (input: GetInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetInstanceStateRequest - */ -const se_GetInstanceStateRequest = (input: GetInstanceStateRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; - -/** - * serializeAws_json1_1GetKeyPairRequest - */ -const se_GetKeyPairRequest = (input: GetKeyPairRequest, context: __SerdeContext): any => { - return { - ...(input.keyPairName != null && { keyPairName: input.keyPairName }), - }; -}; - -/** - * serializeAws_json1_1GetKeyPairsRequest - */ -const se_GetKeyPairsRequest = (input: GetKeyPairsRequest, context: __SerdeContext): any => { - return { - ...(input.includeDefaultKeyPair != null && { includeDefaultKeyPair: input.includeDefaultKeyPair }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetLoadBalancerMetricDataRequest - */ -const se_GetLoadBalancerMetricDataRequest = (input: GetLoadBalancerMetricDataRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.period != null && { period: input.period }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statistics != null && { statistics: se_MetricStatisticList(input.statistics, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; - -/** - * serializeAws_json1_1GetLoadBalancerRequest - */ -const se_GetLoadBalancerRequest = (input: GetLoadBalancerRequest, context: __SerdeContext): any => { - return { - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; - -/** - * serializeAws_json1_1GetLoadBalancersRequest - */ -const se_GetLoadBalancersRequest = (input: GetLoadBalancersRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetLoadBalancerTlsCertificatesRequest - */ -const se_GetLoadBalancerTlsCertificatesRequest = ( - input: GetLoadBalancerTlsCertificatesRequest, - context: __SerdeContext -): any => { - return { - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; -}; - -/** - * serializeAws_json1_1GetLoadBalancerTlsPoliciesRequest - */ -const se_GetLoadBalancerTlsPoliciesRequest = ( - input: GetLoadBalancerTlsPoliciesRequest, - context: __SerdeContext -): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetOperationRequest - */ -const se_GetOperationRequest = (input: GetOperationRequest, context: __SerdeContext): any => { - return { - ...(input.operationId != null && { operationId: input.operationId }), - }; -}; - -/** - * serializeAws_json1_1GetOperationsForResourceRequest - */ -const se_GetOperationsForResourceRequest = (input: GetOperationsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; - -/** - * serializeAws_json1_1GetOperationsRequest - */ -const se_GetOperationsRequest = (input: GetOperationsRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetRegionsRequest - */ -const se_GetRegionsRequest = (input: GetRegionsRequest, context: __SerdeContext): any => { - return { - ...(input.includeAvailabilityZones != null && { includeAvailabilityZones: input.includeAvailabilityZones }), - ...(input.includeRelationalDatabaseAvailabilityZones != null && { - includeRelationalDatabaseAvailabilityZones: input.includeRelationalDatabaseAvailabilityZones, - }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseBlueprintsRequest - */ -const se_GetRelationalDatabaseBlueprintsRequest = ( - input: GetRelationalDatabaseBlueprintsRequest, - context: __SerdeContext -): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseBundlesRequest - */ -const se_GetRelationalDatabaseBundlesRequest = ( - input: GetRelationalDatabaseBundlesRequest, - context: __SerdeContext -): any => { - return { - ...(input.includeInactive != null && { includeInactive: input.includeInactive }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseEventsRequest - */ -const se_GetRelationalDatabaseEventsRequest = ( - input: GetRelationalDatabaseEventsRequest, - context: __SerdeContext -): any => { - return { - ...(input.durationInMinutes != null && { durationInMinutes: input.durationInMinutes }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseLogEventsRequest - */ -const se_GetRelationalDatabaseLogEventsRequest = ( - input: GetRelationalDatabaseLogEventsRequest, - context: __SerdeContext -): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.logStreamName != null && { logStreamName: input.logStreamName }), - ...(input.pageToken != null && { pageToken: input.pageToken }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.startFromHead != null && { startFromHead: input.startFromHead }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseLogStreamsRequest - */ -const se_GetRelationalDatabaseLogStreamsRequest = ( - input: GetRelationalDatabaseLogStreamsRequest, - context: __SerdeContext -): any => { - return { - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseMasterUserPasswordRequest - */ -const se_GetRelationalDatabaseMasterUserPasswordRequest = ( - input: GetRelationalDatabaseMasterUserPasswordRequest, - context: __SerdeContext -): any => { - return { - ...(input.passwordVersion != null && { passwordVersion: input.passwordVersion }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseMetricDataRequest - */ -const se_GetRelationalDatabaseMetricDataRequest = ( - input: GetRelationalDatabaseMetricDataRequest, - context: __SerdeContext -): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.period != null && { period: input.period }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - ...(input.statistics != null && { statistics: se_MetricStatisticList(input.statistics, context) }), - ...(input.unit != null && { unit: input.unit }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseParametersRequest - */ -const se_GetRelationalDatabaseParametersRequest = ( - input: GetRelationalDatabaseParametersRequest, - context: __SerdeContext -): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseRequest - */ -const se_GetRelationalDatabaseRequest = (input: GetRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseSnapshotRequest - */ -const se_GetRelationalDatabaseSnapshotRequest = ( - input: GetRelationalDatabaseSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.relationalDatabaseSnapshotName != null && { - relationalDatabaseSnapshotName: input.relationalDatabaseSnapshotName, - }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabaseSnapshotsRequest - */ -const se_GetRelationalDatabaseSnapshotsRequest = ( - input: GetRelationalDatabaseSnapshotsRequest, - context: __SerdeContext -): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetRelationalDatabasesRequest - */ -const se_GetRelationalDatabasesRequest = (input: GetRelationalDatabasesRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; - -/** - * serializeAws_json1_1GetStaticIpRequest - */ -const se_GetStaticIpRequest = (input: GetStaticIpRequest, context: __SerdeContext): any => { - return { - ...(input.staticIpName != null && { staticIpName: input.staticIpName }), - }; -}; +// se_CreateInstancesRequest omitted. -/** - * serializeAws_json1_1GetStaticIpsRequest - */ -const se_GetStaticIpsRequest = (input: GetStaticIpsRequest, context: __SerdeContext): any => { - return { - ...(input.pageToken != null && { pageToken: input.pageToken }), - }; -}; +// se_CreateKeyPairRequest omitted. -/** - * serializeAws_json1_1HeaderForwardList - */ -const se_HeaderForwardList = (input: (HeaderEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CreateLoadBalancerRequest omitted. -/** - * serializeAws_json1_1HeaderObject - */ -const se_HeaderObject = (input: HeaderObject, context: __SerdeContext): any => { - return { - ...(input.headersAllowList != null && { headersAllowList: se_HeaderForwardList(input.headersAllowList, context) }), - ...(input.option != null && { option: input.option }), - }; -}; +// se_CreateLoadBalancerTlsCertificateRequest omitted. /** - * serializeAws_json1_1ImportKeyPairRequest + * serializeAws_json1_1CreateRelationalDatabaseFromSnapshotRequest */ -const se_ImportKeyPairRequest = (input: ImportKeyPairRequest, context: __SerdeContext): any => { - return { - ...(input.keyPairName != null && { keyPairName: input.keyPairName }), - ...(input.publicKeyBase64 != null && { publicKeyBase64: input.publicKeyBase64 }), - }; +const se_CreateRelationalDatabaseFromSnapshotRequest = ( + input: CreateRelationalDatabaseFromSnapshotRequest, + context: __SerdeContext +): any => { + return take(input, { + availabilityZone: [], + publiclyAccessible: [], + relationalDatabaseBundleId: [], + relationalDatabaseName: [], + relationalDatabaseSnapshotName: [], + restoreTime: (_) => Math.round(_.getTime() / 1000), + sourceRelationalDatabaseName: [], + tags: _json, + useLatestRestorableTime: [], + }); }; -/** - * serializeAws_json1_1InputOrigin - */ -const se_InputOrigin = (input: InputOrigin, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.protocolPolicy != null && { protocolPolicy: input.protocolPolicy }), - ...(input.regionName != null && { regionName: input.regionName }), - }; -}; +// se_CreateRelationalDatabaseRequest omitted. -/** - * serializeAws_json1_1InstanceEntry - */ -const se_InstanceEntry = (input: InstanceEntry, context: __SerdeContext): any => { - return { - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.portInfoSource != null && { portInfoSource: input.portInfoSource }), - ...(input.sourceName != null && { sourceName: input.sourceName }), - ...(input.userData != null && { userData: input.userData }), - }; -}; +// se_CreateRelationalDatabaseSnapshotRequest omitted. -/** - * serializeAws_json1_1InstanceEntryList - */ -const se_InstanceEntryList = (input: InstanceEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceEntry(entry, context); - }); -}; +// se_DeleteAlarmRequest omitted. -/** - * serializeAws_json1_1IsVpcPeeredRequest - */ -const se_IsVpcPeeredRequest = (input: IsVpcPeeredRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DeleteAutoSnapshotRequest omitted. -/** - * serializeAws_json1_1MetricStatisticList - */ -const se_MetricStatisticList = (input: (MetricStatistic | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteBucketAccessKeyRequest omitted. -/** - * serializeAws_json1_1NotificationTriggerList - */ -const se_NotificationTriggerList = (input: (AlarmState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteBucketRequest omitted. -/** - * serializeAws_json1_1OpenInstancePublicPortsRequest - */ -const se_OpenInstancePublicPortsRequest = (input: OpenInstancePublicPortsRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.portInfo != null && { portInfo: se_PortInfo(input.portInfo, context) }), - }; -}; +// se_DeleteCertificateRequest omitted. -/** - * serializeAws_json1_1PartnerIdList - */ -const se_PartnerIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteContactMethodRequest omitted. -/** - * serializeAws_json1_1PeerVpcRequest - */ -const se_PeerVpcRequest = (input: PeerVpcRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DeleteContainerImageRequest omitted. -/** - * serializeAws_json1_1PortInfo - */ -const se_PortInfo = (input: PortInfo, context: __SerdeContext): any => { - return { - ...(input.cidrListAliases != null && { cidrListAliases: se_StringList(input.cidrListAliases, context) }), - ...(input.cidrs != null && { cidrs: se_StringList(input.cidrs, context) }), - ...(input.fromPort != null && { fromPort: input.fromPort }), - ...(input.ipv6Cidrs != null && { ipv6Cidrs: se_StringList(input.ipv6Cidrs, context) }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.toPort != null && { toPort: input.toPort }), - }; -}; +// se_DeleteContainerServiceRequest omitted. -/** - * serializeAws_json1_1PortInfoList - */ -const se_PortInfoList = (input: PortInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortInfo(entry, context); - }); -}; +// se_DeleteDiskRequest omitted. -/** - * serializeAws_json1_1PortMap - */ -const se_PortMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DeleteDiskSnapshotRequest omitted. -/** - * serializeAws_json1_1PrivateRegistryAccessRequest - */ -const se_PrivateRegistryAccessRequest = (input: PrivateRegistryAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ecrImagePullerRole != null && { - ecrImagePullerRole: se_ContainerServiceECRImagePullerRoleRequest(input.ecrImagePullerRole, context), - }), - }; -}; +// se_DeleteDistributionRequest omitted. -/** - * serializeAws_json1_1PutAlarmRequest - */ -const se_PutAlarmRequest = (input: PutAlarmRequest, context: __SerdeContext): any => { - return { - ...(input.alarmName != null && { alarmName: input.alarmName }), - ...(input.comparisonOperator != null && { comparisonOperator: input.comparisonOperator }), - ...(input.contactProtocols != null && { - contactProtocols: se_ContactProtocolsList(input.contactProtocols, context), - }), - ...(input.datapointsToAlarm != null && { datapointsToAlarm: input.datapointsToAlarm }), - ...(input.evaluationPeriods != null && { evaluationPeriods: input.evaluationPeriods }), - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.monitoredResourceName != null && { monitoredResourceName: input.monitoredResourceName }), - ...(input.notificationEnabled != null && { notificationEnabled: input.notificationEnabled }), - ...(input.notificationTriggers != null && { - notificationTriggers: se_NotificationTriggerList(input.notificationTriggers, context), - }), - ...(input.threshold != null && { threshold: __serializeFloat(input.threshold) }), - ...(input.treatMissingData != null && { treatMissingData: input.treatMissingData }), - }; -}; +// se_DeleteDomainEntryRequest omitted. -/** - * serializeAws_json1_1PutInstancePublicPortsRequest - */ -const se_PutInstancePublicPortsRequest = (input: PutInstancePublicPortsRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - ...(input.portInfos != null && { portInfos: se_PortInfoList(input.portInfos, context) }), - }; -}; +// se_DeleteDomainRequest omitted. -/** - * serializeAws_json1_1QueryStringObject - */ -const se_QueryStringObject = (input: QueryStringObject, context: __SerdeContext): any => { - return { - ...(input.option != null && { option: input.option }), - ...(input.queryStringsAllowList != null && { - queryStringsAllowList: se_StringList(input.queryStringsAllowList, context), - }), - }; -}; +// se_DeleteInstanceRequest omitted. -/** - * serializeAws_json1_1RebootInstanceRequest - */ -const se_RebootInstanceRequest = (input: RebootInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; +// se_DeleteInstanceSnapshotRequest omitted. -/** - * serializeAws_json1_1RebootRelationalDatabaseRequest - */ -const se_RebootRelationalDatabaseRequest = (input: RebootRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; +// se_DeleteKeyPairRequest omitted. -/** - * serializeAws_json1_1RegisterContainerImageRequest - */ -const se_RegisterContainerImageRequest = (input: RegisterContainerImageRequest, context: __SerdeContext): any => { - return { - ...(input.digest != null && { digest: input.digest }), - ...(input.label != null && { label: input.label }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_DeleteKnownHostKeysRequest omitted. -/** - * serializeAws_json1_1RelationalDatabaseParameter - */ -const se_RelationalDatabaseParameter = (input: RelationalDatabaseParameter, context: __SerdeContext): any => { - return { - ...(input.allowedValues != null && { allowedValues: input.allowedValues }), - ...(input.applyMethod != null && { applyMethod: input.applyMethod }), - ...(input.applyType != null && { applyType: input.applyType }), - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.description != null && { description: input.description }), - ...(input.isModifiable != null && { isModifiable: input.isModifiable }), - ...(input.parameterName != null && { parameterName: input.parameterName }), - ...(input.parameterValue != null && { parameterValue: input.parameterValue }), - }; -}; +// se_DeleteLoadBalancerRequest omitted. -/** - * serializeAws_json1_1RelationalDatabaseParameterList - */ -const se_RelationalDatabaseParameterList = (input: RelationalDatabaseParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RelationalDatabaseParameter(entry, context); - }); -}; +// se_DeleteLoadBalancerTlsCertificateRequest omitted. -/** - * serializeAws_json1_1ReleaseStaticIpRequest - */ -const se_ReleaseStaticIpRequest = (input: ReleaseStaticIpRequest, context: __SerdeContext): any => { - return { - ...(input.staticIpName != null && { staticIpName: input.staticIpName }), - }; -}; +// se_DeleteRelationalDatabaseRequest omitted. -/** - * serializeAws_json1_1ResetDistributionCacheRequest - */ -const se_ResetDistributionCacheRequest = (input: ResetDistributionCacheRequest, context: __SerdeContext): any => { - return { - ...(input.distributionName != null && { distributionName: input.distributionName }), - }; -}; +// se_DeleteRelationalDatabaseSnapshotRequest omitted. -/** - * serializeAws_json1_1ResourceNameList - */ -const se_ResourceNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DetachCertificateFromDistributionRequest omitted. -/** - * serializeAws_json1_1SendContactMethodVerificationRequest - */ -const se_SendContactMethodVerificationRequest = ( - input: SendContactMethodVerificationRequest, - context: __SerdeContext -): any => { - return { - ...(input.protocol != null && { protocol: input.protocol }), - }; -}; +// se_DetachDiskRequest omitted. -/** - * serializeAws_json1_1SetIpAddressTypeRequest - */ -const se_SetIpAddressTypeRequest = (input: SetIpAddressTypeRequest, context: __SerdeContext): any => { - return { - ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }; -}; +// se_DetachInstancesFromLoadBalancerRequest omitted. -/** - * serializeAws_json1_1SetResourceAccessForBucketRequest - */ -const se_SetResourceAccessForBucketRequest = ( - input: SetResourceAccessForBucketRequest, - context: __SerdeContext -): any => { - return { - ...(input.access != null && { access: input.access }), - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; +// se_DetachStaticIpRequest omitted. -/** - * serializeAws_json1_1StartGUISessionRequest - */ -const se_StartGUISessionRequest = (input: StartGUISessionRequest, context: __SerdeContext): any => { - return { - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; +// se_DisableAddOnRequest omitted. -/** - * serializeAws_json1_1StartInstanceRequest - */ -const se_StartInstanceRequest = (input: StartInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; +// se_DiskMap omitted. -/** - * serializeAws_json1_1StartRelationalDatabaseRequest - */ -const se_StartRelationalDatabaseRequest = (input: StartRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; -}; +// se_DiskMapList omitted. -/** - * serializeAws_json1_1StopGUISessionRequest - */ -const se_StopGUISessionRequest = (input: StopGUISessionRequest, context: __SerdeContext): any => { - return { - ...(input.resourceName != null && { resourceName: input.resourceName }), - }; -}; +// se_DomainEntry omitted. -/** - * serializeAws_json1_1StopInstanceOnIdleRequest - */ -const se_StopInstanceOnIdleRequest = (input: StopInstanceOnIdleRequest, context: __SerdeContext): any => { - return { - ...(input.duration != null && { duration: input.duration }), - ...(input.threshold != null && { threshold: input.threshold }), - }; -}; +// se_DomainEntryOptions omitted. -/** - * serializeAws_json1_1StopInstanceRequest - */ -const se_StopInstanceRequest = (input: StopInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.force != null && { force: input.force }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; -}; +// se_DomainNameList omitted. -/** - * serializeAws_json1_1StopRelationalDatabaseRequest - */ -const se_StopRelationalDatabaseRequest = (input: StopRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.relationalDatabaseSnapshotName != null && { - relationalDatabaseSnapshotName: input.relationalDatabaseSnapshotName, - }), - }; -}; +// se_DownloadDefaultKeyPairRequest omitted. -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EnableAddOnRequest omitted. -/** - * serializeAws_json1_1SubjectAlternativeNameList - */ -const se_SubjectAlternativeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EndpointRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Environment omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExportSnapshotRequest omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_GetActiveNamesRequest omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_GetAlarmsRequest omitted. -/** - * serializeAws_json1_1TestAlarmRequest - */ -const se_TestAlarmRequest = (input: TestAlarmRequest, context: __SerdeContext): any => { - return { - ...(input.alarmName != null && { alarmName: input.alarmName }), - ...(input.state != null && { state: input.state }), - }; -}; +// se_GetAutoSnapshotsRequest omitted. -/** - * serializeAws_json1_1UnpeerVpcRequest - */ -const se_UnpeerVpcRequest = (input: UnpeerVpcRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetBlueprintsRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_GetBucketAccessKeysRequest omitted. + +// se_GetBucketBundlesRequest omitted. /** - * serializeAws_json1_1UpdateBucketBundleRequest + * serializeAws_json1_1GetBucketMetricDataRequest */ -const se_UpdateBucketBundleRequest = (input: UpdateBucketBundleRequest, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.bundleId != null && { bundleId: input.bundleId }), - }; +const se_GetBucketMetricDataRequest = (input: GetBucketMetricDataRequest, context: __SerdeContext): any => { + return take(input, { + bucketName: [], + endTime: (_) => Math.round(_.getTime() / 1000), + metricName: [], + period: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statistics: _json, + unit: [], + }); }; +// se_GetBucketsRequest omitted. + +// se_GetBundlesRequest omitted. + +// se_GetCertificatesRequest omitted. + +// se_GetCloudFormationStackRecordsRequest omitted. + +// se_GetContactMethodsRequest omitted. + +// se_GetContainerAPIMetadataRequest omitted. + +// se_GetContainerImagesRequest omitted. + /** - * serializeAws_json1_1UpdateBucketRequest + * serializeAws_json1_1GetContainerLogRequest */ -const se_UpdateBucketRequest = (input: UpdateBucketRequest, context: __SerdeContext): any => { - return { - ...(input.accessLogConfig != null && { accessLogConfig: se_BucketAccessLogConfig(input.accessLogConfig, context) }), - ...(input.accessRules != null && { accessRules: se_AccessRules(input.accessRules, context) }), - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.readonlyAccessAccounts != null && { - readonlyAccessAccounts: se_PartnerIdList(input.readonlyAccessAccounts, context), - }), - ...(input.versioning != null && { versioning: input.versioning }), - }; +const se_GetContainerLogRequest = (input: GetContainerLogRequest, context: __SerdeContext): any => { + return take(input, { + containerName: [], + endTime: (_) => Math.round(_.getTime() / 1000), + filterPattern: [], + pageToken: [], + serviceName: [], + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_GetContainerServiceDeploymentsRequest omitted. + /** - * serializeAws_json1_1UpdateContainerServiceRequest + * serializeAws_json1_1GetContainerServiceMetricDataRequest */ -const se_UpdateContainerServiceRequest = (input: UpdateContainerServiceRequest, context: __SerdeContext): any => { - return { - ...(input.isDisabled != null && { isDisabled: input.isDisabled }), - ...(input.power != null && { power: input.power }), - ...(input.privateRegistryAccess != null && { - privateRegistryAccess: se_PrivateRegistryAccessRequest(input.privateRegistryAccess, context), - }), - ...(input.publicDomainNames != null && { - publicDomainNames: se_ContainerServicePublicDomains(input.publicDomainNames, context), - }), - ...(input.scale != null && { scale: input.scale }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; +const se_GetContainerServiceMetricDataRequest = ( + input: GetContainerServiceMetricDataRequest, + context: __SerdeContext +): any => { + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + metricName: [], + period: [], + serviceName: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statistics: _json, + }); }; +// se_GetContainerServicePowersRequest omitted. + +// se_GetContainerServicesRequest omitted. + /** - * serializeAws_json1_1UpdateDistributionBundleRequest + * serializeAws_json1_1GetCostEstimateRequest */ -const se_UpdateDistributionBundleRequest = (input: UpdateDistributionBundleRequest, context: __SerdeContext): any => { - return { - ...(input.bundleId != null && { bundleId: input.bundleId }), - ...(input.distributionName != null && { distributionName: input.distributionName }), - }; +const se_GetCostEstimateRequest = (input: GetCostEstimateRequest, context: __SerdeContext): any => { + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + resourceName: [], + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_GetDiskRequest omitted. + +// se_GetDiskSnapshotRequest omitted. + +// se_GetDiskSnapshotsRequest omitted. + +// se_GetDisksRequest omitted. + +// se_GetDistributionBundlesRequest omitted. + +// se_GetDistributionLatestCacheResetRequest omitted. + /** - * serializeAws_json1_1UpdateDistributionRequest + * serializeAws_json1_1GetDistributionMetricDataRequest */ -const se_UpdateDistributionRequest = (input: UpdateDistributionRequest, context: __SerdeContext): any => { - return { - ...(input.cacheBehaviorSettings != null && { - cacheBehaviorSettings: se_CacheSettings(input.cacheBehaviorSettings, context), - }), - ...(input.cacheBehaviors != null && { cacheBehaviors: se_CacheBehaviorList(input.cacheBehaviors, context) }), - ...(input.defaultCacheBehavior != null && { - defaultCacheBehavior: se_CacheBehavior(input.defaultCacheBehavior, context), - }), - ...(input.distributionName != null && { distributionName: input.distributionName }), - ...(input.isEnabled != null && { isEnabled: input.isEnabled }), - ...(input.origin != null && { origin: se_InputOrigin(input.origin, context) }), - }; +const se_GetDistributionMetricDataRequest = (input: GetDistributionMetricDataRequest, context: __SerdeContext): any => { + return take(input, { + distributionName: [], + endTime: (_) => Math.round(_.getTime() / 1000), + metricName: [], + period: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statistics: _json, + unit: [], + }); }; +// se_GetDistributionsRequest omitted. + +// se_GetDomainRequest omitted. + +// se_GetDomainsRequest omitted. + +// se_GetExportSnapshotRecordsRequest omitted. + +// se_GetInstanceAccessDetailsRequest omitted. + /** - * serializeAws_json1_1UpdateDomainEntryRequest + * serializeAws_json1_1GetInstanceMetricDataRequest */ -const se_UpdateDomainEntryRequest = (input: UpdateDomainEntryRequest, context: __SerdeContext): any => { - return { - ...(input.domainEntry != null && { domainEntry: se_DomainEntry(input.domainEntry, context) }), - ...(input.domainName != null && { domainName: input.domainName }), - }; +const se_GetInstanceMetricDataRequest = (input: GetInstanceMetricDataRequest, context: __SerdeContext): any => { + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + instanceName: [], + metricName: [], + period: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statistics: _json, + unit: [], + }); }; +// se_GetInstancePortStatesRequest omitted. + +// se_GetInstanceRequest omitted. + +// se_GetInstanceSnapshotRequest omitted. + +// se_GetInstanceSnapshotsRequest omitted. + +// se_GetInstancesRequest omitted. + +// se_GetInstanceStateRequest omitted. + +// se_GetKeyPairRequest omitted. + +// se_GetKeyPairsRequest omitted. + /** - * serializeAws_json1_1UpdateInstanceMetadataOptionsRequest + * serializeAws_json1_1GetLoadBalancerMetricDataRequest */ -const se_UpdateInstanceMetadataOptionsRequest = ( - input: UpdateInstanceMetadataOptionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.httpEndpoint != null && { httpEndpoint: input.httpEndpoint }), - ...(input.httpProtocolIpv6 != null && { httpProtocolIpv6: input.httpProtocolIpv6 }), - ...(input.httpPutResponseHopLimit != null && { httpPutResponseHopLimit: input.httpPutResponseHopLimit }), - ...(input.httpTokens != null && { httpTokens: input.httpTokens }), - ...(input.instanceName != null && { instanceName: input.instanceName }), - }; +const se_GetLoadBalancerMetricDataRequest = (input: GetLoadBalancerMetricDataRequest, context: __SerdeContext): any => { + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + loadBalancerName: [], + metricName: [], + period: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statistics: _json, + unit: [], + }); }; +// se_GetLoadBalancerRequest omitted. + +// se_GetLoadBalancersRequest omitted. + +// se_GetLoadBalancerTlsCertificatesRequest omitted. + +// se_GetLoadBalancerTlsPoliciesRequest omitted. + +// se_GetOperationRequest omitted. + +// se_GetOperationsForResourceRequest omitted. + +// se_GetOperationsRequest omitted. + +// se_GetRegionsRequest omitted. + +// se_GetRelationalDatabaseBlueprintsRequest omitted. + +// se_GetRelationalDatabaseBundlesRequest omitted. + +// se_GetRelationalDatabaseEventsRequest omitted. + /** - * serializeAws_json1_1UpdateLoadBalancerAttributeRequest + * serializeAws_json1_1GetRelationalDatabaseLogEventsRequest */ -const se_UpdateLoadBalancerAttributeRequest = ( - input: UpdateLoadBalancerAttributeRequest, +const se_GetRelationalDatabaseLogEventsRequest = ( + input: GetRelationalDatabaseLogEventsRequest, context: __SerdeContext ): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.attributeValue != null && { attributeValue: input.attributeValue }), - ...(input.loadBalancerName != null && { loadBalancerName: input.loadBalancerName }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + logStreamName: [], + pageToken: [], + relationalDatabaseName: [], + startFromHead: [], + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_GetRelationalDatabaseLogStreamsRequest omitted. + +// se_GetRelationalDatabaseMasterUserPasswordRequest omitted. + /** - * serializeAws_json1_1UpdateRelationalDatabaseParametersRequest + * serializeAws_json1_1GetRelationalDatabaseMetricDataRequest */ -const se_UpdateRelationalDatabaseParametersRequest = ( - input: UpdateRelationalDatabaseParametersRequest, +const se_GetRelationalDatabaseMetricDataRequest = ( + input: GetRelationalDatabaseMetricDataRequest, context: __SerdeContext ): any => { - return { - ...(input.parameters != null && { parameters: se_RelationalDatabaseParameterList(input.parameters, context) }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + metricName: [], + period: [], + relationalDatabaseName: [], + startTime: (_) => Math.round(_.getTime() / 1000), + statistics: _json, + unit: [], + }); }; -/** - * serializeAws_json1_1UpdateRelationalDatabaseRequest - */ -const se_UpdateRelationalDatabaseRequest = (input: UpdateRelationalDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.applyImmediately != null && { applyImmediately: input.applyImmediately }), - ...(input.caCertificateIdentifier != null && { caCertificateIdentifier: input.caCertificateIdentifier }), - ...(input.disableBackupRetention != null && { disableBackupRetention: input.disableBackupRetention }), - ...(input.enableBackupRetention != null && { enableBackupRetention: input.enableBackupRetention }), - ...(input.masterUserPassword != null && { masterUserPassword: input.masterUserPassword }), - ...(input.preferredBackupWindow != null && { preferredBackupWindow: input.preferredBackupWindow }), - ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }), - ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }), - ...(input.relationalDatabaseName != null && { relationalDatabaseName: input.relationalDatabaseName }), - ...(input.rotateMasterUserPassword != null && { rotateMasterUserPassword: input.rotateMasterUserPassword }), - }; -}; +// se_GetRelationalDatabaseParametersRequest omitted. + +// se_GetRelationalDatabaseRequest omitted. + +// se_GetRelationalDatabaseSnapshotRequest omitted. + +// se_GetRelationalDatabaseSnapshotsRequest omitted. + +// se_GetRelationalDatabasesRequest omitted. + +// se_GetStaticIpRequest omitted. + +// se_GetStaticIpsRequest omitted. + +// se_HeaderForwardList omitted. + +// se_HeaderObject omitted. + +// se_ImportKeyPairRequest omitted. + +// se_InputOrigin omitted. + +// se_InstanceEntry omitted. + +// se_InstanceEntryList omitted. + +// se_IsVpcPeeredRequest omitted. + +// se_MetricStatisticList omitted. + +// se_NotificationTriggerList omitted. + +// se_OpenInstancePublicPortsRequest omitted. + +// se_PartnerIdList omitted. + +// se_PeerVpcRequest omitted. + +// se_PortInfo omitted. + +// se_PortInfoList omitted. + +// se_PortMap omitted. + +// se_PrivateRegistryAccessRequest omitted. /** - * deserializeAws_json1_1AccessDeniedException + * serializeAws_json1_1PutAlarmRequest */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; +const se_PutAlarmRequest = (input: PutAlarmRequest, context: __SerdeContext): any => { + return take(input, { + alarmName: [], + comparisonOperator: [], + contactProtocols: _json, + datapointsToAlarm: [], + evaluationPeriods: [], + metricName: [], + monitoredResourceName: [], + notificationEnabled: [], + notificationTriggers: _json, + threshold: __serializeFloat, + treatMissingData: [], + }); }; +// se_PutInstancePublicPortsRequest omitted. + +// se_QueryStringObject omitted. + +// se_RebootInstanceRequest omitted. + +// se_RebootRelationalDatabaseRequest omitted. + +// se_RegisterContainerImageRequest omitted. + +// se_RelationalDatabaseParameter omitted. + +// se_RelationalDatabaseParameterList omitted. + +// se_ReleaseStaticIpRequest omitted. + +// se_ResetDistributionCacheRequest omitted. + +// se_ResourceNameList omitted. + +// se_SendContactMethodVerificationRequest omitted. + +// se_SetIpAddressTypeRequest omitted. + +// se_SetResourceAccessForBucketRequest omitted. + +// se_StartGUISessionRequest omitted. + +// se_StartInstanceRequest omitted. + +// se_StartRelationalDatabaseRequest omitted. + +// se_StopGUISessionRequest omitted. + +// se_StopInstanceOnIdleRequest omitted. + +// se_StopInstanceRequest omitted. + +// se_StopRelationalDatabaseRequest omitted. + +// se_StringList omitted. + +// se_SubjectAlternativeNameList omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_TestAlarmRequest omitted. + +// se_UnpeerVpcRequest omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateBucketBundleRequest omitted. + +// se_UpdateBucketRequest omitted. + +// se_UpdateContainerServiceRequest omitted. + +// se_UpdateDistributionBundleRequest omitted. + +// se_UpdateDistributionRequest omitted. + +// se_UpdateDomainEntryRequest omitted. + +// se_UpdateInstanceMetadataOptionsRequest omitted. + +// se_UpdateLoadBalancerAttributeRequest omitted. + +// se_UpdateRelationalDatabaseParametersRequest omitted. + +// se_UpdateRelationalDatabaseRequest omitted. + +// de_AccessDeniedException omitted. + /** * deserializeAws_json1_1AccessKey */ const de_AccessKey = (output: any, context: __SerdeContext): AccessKey => { - return { - accessKeyId: __expectString(output.accessKeyId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUsed: output.lastUsed != null ? de_AccessKeyLastUsed(output.lastUsed, context) : undefined, - secretAccessKey: __expectString(output.secretAccessKey), - status: __expectString(output.status), - } as any; + return take(output, { + accessKeyId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUsed: (_: any) => de_AccessKeyLastUsed(_, context), + secretAccessKey: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1AccessKeyLastUsed */ const de_AccessKeyLastUsed = (output: any, context: __SerdeContext): AccessKeyLastUsed => { - return { - lastUsedDate: - output.lastUsedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUsedDate))) - : undefined, - region: __expectString(output.region), - serviceName: __expectString(output.serviceName), - } as any; + return take(output, { + lastUsedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + region: __expectString, + serviceName: __expectString, + }) as any; }; /** @@ -15545,129 +13483,59 @@ const de_AccessKeyList = (output: any, context: __SerdeContext): AccessKey[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccessKey(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1AccessReceiverList - */ -const de_AccessReceiverList = (output: any, context: __SerdeContext): ResourceReceivingAccess[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceReceivingAccess(entry, context); - }); - return retVal; -}; +// de_AccessReceiverList omitted. -/** - * deserializeAws_json1_1AccessRules - */ -const de_AccessRules = (output: any, context: __SerdeContext): AccessRules => { - return { - allowPublicOverrides: __expectBoolean(output.allowPublicOverrides), - getObject: __expectString(output.getObject), - } as any; -}; +// de_AccessRules omitted. /** * deserializeAws_json1_1AccountLevelBpaSync */ const de_AccountLevelBpaSync = (output: any, context: __SerdeContext): AccountLevelBpaSync => { - return { - bpaImpactsLightsail: __expectBoolean(output.bpaImpactsLightsail), - lastSyncedAt: - output.lastSyncedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastSyncedAt))) - : undefined, - message: __expectString(output.message), - status: __expectString(output.status), - } as any; + return take(output, { + bpaImpactsLightsail: __expectBoolean, + lastSyncedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1AccountSetupInProgressException - */ -const de_AccountSetupInProgressException = (output: any, context: __SerdeContext): AccountSetupInProgressException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; -}; +// de_AccountSetupInProgressException omitted. -/** - * deserializeAws_json1_1AddOn - */ -const de_AddOn = (output: any, context: __SerdeContext): AddOn => { - return { - duration: __expectString(output.duration), - name: __expectString(output.name), - nextSnapshotTimeOfDay: __expectString(output.nextSnapshotTimeOfDay), - snapshotTimeOfDay: __expectString(output.snapshotTimeOfDay), - status: __expectString(output.status), - threshold: __expectString(output.threshold), - } as any; -}; +// de_AddOn omitted. -/** - * deserializeAws_json1_1AddOnList - */ -const de_AddOnList = (output: any, context: __SerdeContext): AddOn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AddOn(entry, context); - }); - return retVal; -}; +// de_AddOnList omitted. /** * deserializeAws_json1_1Alarm */ const de_Alarm = (output: any, context: __SerdeContext): Alarm => { - return { - arn: __expectString(output.arn), - comparisonOperator: __expectString(output.comparisonOperator), - contactProtocols: - output.contactProtocols != null ? de_ContactProtocolsList(output.contactProtocols, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - datapointsToAlarm: __expectInt32(output.datapointsToAlarm), - evaluationPeriods: __expectInt32(output.evaluationPeriods), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - metricName: __expectString(output.metricName), - monitoredResourceInfo: - output.monitoredResourceInfo != null - ? de_MonitoredResourceInfo(output.monitoredResourceInfo, context) - : undefined, - name: __expectString(output.name), - notificationEnabled: __expectBoolean(output.notificationEnabled), - notificationTriggers: - output.notificationTriggers != null - ? de_NotificationTriggerList(output.notificationTriggers, context) - : undefined, - period: __expectInt32(output.period), - resourceType: __expectString(output.resourceType), - state: __expectString(output.state), - statistic: __expectString(output.statistic), - supportCode: __expectString(output.supportCode), - threshold: __limitedParseDouble(output.threshold), - treatMissingData: __expectString(output.treatMissingData), - unit: __expectString(output.unit), - } as any; + return take(output, { + arn: __expectString, + comparisonOperator: __expectString, + contactProtocols: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datapointsToAlarm: __expectInt32, + evaluationPeriods: __expectInt32, + location: _json, + metricName: __expectString, + monitoredResourceInfo: _json, + name: __expectString, + notificationEnabled: __expectBoolean, + notificationTriggers: _json, + period: __expectInt32, + resourceType: __expectString, + state: __expectString, + statistic: __expectString, + supportCode: __expectString, + threshold: __limitedParseDouble, + treatMissingData: __expectString, + unit: __expectString, + }) as any; }; /** @@ -15677,9 +13545,6 @@ const de_AlarmsList = (output: any, context: __SerdeContext): Alarm[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Alarm(entry, context); }); return retVal; @@ -15689,25 +13554,12 @@ const de_AlarmsList = (output: any, context: __SerdeContext): Alarm[] => { * deserializeAws_json1_1AllocateStaticIpResult */ const de_AllocateStaticIpResult = (output: any, context: __SerdeContext): AllocateStaticIpResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1AppCategoryList - */ -const de_AppCategoryList = (output: any, context: __SerdeContext): (AppCategory | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AppCategoryList omitted. /** * deserializeAws_json1_1AttachCertificateToDistributionResult @@ -15716,44 +13568,23 @@ const de_AttachCertificateToDistributionResult = ( output: any, context: __SerdeContext ): AttachCertificateToDistributionResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1AttachDiskResult */ const de_AttachDiskResult = (output: any, context: __SerdeContext): AttachDiskResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1AttachedDisk - */ -const de_AttachedDisk = (output: any, context: __SerdeContext): AttachedDisk => { - return { - path: __expectString(output.path), - sizeInGb: __expectInt32(output.sizeInGb), - } as any; -}; +// de_AttachedDisk omitted. -/** - * deserializeAws_json1_1AttachedDiskList - */ -const de_AttachedDiskList = (output: any, context: __SerdeContext): AttachedDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttachedDisk(entry, context); - }); - return retVal; -}; +// de_AttachedDiskList omitted. /** * deserializeAws_json1_1AttachInstancesToLoadBalancerResult @@ -15762,9 +13593,9 @@ const de_AttachInstancesToLoadBalancerResult = ( output: any, context: __SerdeContext ): AttachInstancesToLoadBalancerResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -15774,32 +13605,30 @@ const de_AttachLoadBalancerTlsCertificateResult = ( output: any, context: __SerdeContext ): AttachLoadBalancerTlsCertificateResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1AttachStaticIpResult */ const de_AttachStaticIpResult = (output: any, context: __SerdeContext): AttachStaticIpResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1AutoSnapshotDetails */ const de_AutoSnapshotDetails = (output: any, context: __SerdeContext): AutoSnapshotDetails => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - date: __expectString(output.date), - fromAttachedDisks: - output.fromAttachedDisks != null ? de_AttachedDiskList(output.fromAttachedDisks, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + date: __expectString, + fromAttachedDisks: _json, + status: __expectString, + }) as any; }; /** @@ -15809,128 +13638,57 @@ const de_AutoSnapshotDetailsList = (output: any, context: __SerdeContext): AutoS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutoSnapshotDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1AvailabilityZone - */ -const de_AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => { - return { - state: __expectString(output.state), - zoneName: __expectString(output.zoneName), - } as any; -}; +// de_AvailabilityZone omitted. -/** - * deserializeAws_json1_1AvailabilityZoneList - */ -const de_AvailabilityZoneList = (output: any, context: __SerdeContext): AvailabilityZone[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AvailabilityZone(entry, context); - }); - return retVal; -}; +// de_AvailabilityZoneList omitted. -/** - * deserializeAws_json1_1Blueprint - */ -const de_Blueprint = (output: any, context: __SerdeContext): Blueprint => { - return { - appCategory: __expectString(output.appCategory), - blueprintId: __expectString(output.blueprintId), - description: __expectString(output.description), - group: __expectString(output.group), - isActive: __expectBoolean(output.isActive), - licenseUrl: __expectString(output.licenseUrl), - minPower: __expectInt32(output.minPower), - name: __expectString(output.name), - platform: __expectString(output.platform), - productUrl: __expectString(output.productUrl), - type: __expectString(output.type), - version: __expectString(output.version), - versionCode: __expectString(output.versionCode), - } as any; -}; - -/** - * deserializeAws_json1_1BlueprintList - */ -const de_BlueprintList = (output: any, context: __SerdeContext): Blueprint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Blueprint(entry, context); - }); - return retVal; -}; +// de_Blueprint omitted. + +// de_BlueprintList omitted. /** * deserializeAws_json1_1Bucket */ const de_Bucket = (output: any, context: __SerdeContext): Bucket => { - return { - ableToUpdateBundle: __expectBoolean(output.ableToUpdateBundle), - accessLogConfig: - output.accessLogConfig != null ? de_BucketAccessLogConfig(output.accessLogConfig, context) : undefined, - accessRules: output.accessRules != null ? de_AccessRules(output.accessRules, context) : undefined, - arn: __expectString(output.arn), - bundleId: __expectString(output.bundleId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - objectVersioning: __expectString(output.objectVersioning), - readonlyAccessAccounts: - output.readonlyAccessAccounts != null ? de_PartnerIdList(output.readonlyAccessAccounts, context) : undefined, - resourceType: __expectString(output.resourceType), - resourcesReceivingAccess: - output.resourcesReceivingAccess != null - ? de_AccessReceiverList(output.resourcesReceivingAccess, context) - : undefined, - state: output.state != null ? de_BucketState(output.state, context) : undefined, - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - url: __expectString(output.url), - } as any; -}; - -/** - * deserializeAws_json1_1BucketAccessLogConfig - */ -const de_BucketAccessLogConfig = (output: any, context: __SerdeContext): BucketAccessLogConfig => { - return { - destination: __expectString(output.destination), - enabled: __expectBoolean(output.enabled), - prefix: __expectString(output.prefix), - } as any; -}; + return take(output, { + ableToUpdateBundle: __expectBoolean, + accessLogConfig: _json, + accessRules: _json, + arn: __expectString, + bundleId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + location: _json, + name: __expectString, + objectVersioning: __expectString, + readonlyAccessAccounts: _json, + resourceType: __expectString, + resourcesReceivingAccess: _json, + state: _json, + supportCode: __expectString, + tags: _json, + url: __expectString, + }) as any; +}; + +// de_BucketAccessLogConfig omitted. /** * deserializeAws_json1_1BucketBundle */ const de_BucketBundle = (output: any, context: __SerdeContext): BucketBundle => { - return { - bundleId: __expectString(output.bundleId), - isActive: __expectBoolean(output.isActive), - name: __expectString(output.name), - price: __limitedParseFloat32(output.price), - storagePerMonthInGb: __expectInt32(output.storagePerMonthInGb), - transferPerMonthInGb: __expectInt32(output.transferPerMonthInGb), - } as any; + return take(output, { + bundleId: __expectString, + isActive: __expectBoolean, + name: __expectString, + price: __limitedParseFloat32, + storagePerMonthInGb: __expectInt32, + transferPerMonthInGb: __expectInt32, + }) as any; }; /** @@ -15940,9 +13698,6 @@ const de_BucketBundleList = (output: any, context: __SerdeContext): BucketBundle const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BucketBundle(entry, context); }); return retVal; @@ -15955,163 +13710,93 @@ const de_BucketList = (output: any, context: __SerdeContext): Bucket[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Bucket(entry, context); }); return retVal; }; +// de_BucketState omitted. + /** - * deserializeAws_json1_1BucketState - */ -const de_BucketState = (output: any, context: __SerdeContext): BucketState => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1Bundle - */ -const de_Bundle = (output: any, context: __SerdeContext): Bundle => { - return { - bundleId: __expectString(output.bundleId), - cpuCount: __expectInt32(output.cpuCount), - diskSizeInGb: __expectInt32(output.diskSizeInGb), - instanceType: __expectString(output.instanceType), - isActive: __expectBoolean(output.isActive), - name: __expectString(output.name), - power: __expectInt32(output.power), - price: __limitedParseFloat32(output.price), - ramSizeInGb: __limitedParseFloat32(output.ramSizeInGb), - supportedAppCategories: - output.supportedAppCategories != null ? de_AppCategoryList(output.supportedAppCategories, context) : undefined, - supportedPlatforms: - output.supportedPlatforms != null ? de_InstancePlatformList(output.supportedPlatforms, context) : undefined, - transferPerMonthInGb: __expectInt32(output.transferPerMonthInGb), - } as any; -}; - -/** - * deserializeAws_json1_1BundleList - */ -const de_BundleList = (output: any, context: __SerdeContext): Bundle[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Bundle(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CacheBehavior + * deserializeAws_json1_1Bundle */ -const de_CacheBehavior = (output: any, context: __SerdeContext): CacheBehavior => { - return { - behavior: __expectString(output.behavior), - } as any; +const de_Bundle = (output: any, context: __SerdeContext): Bundle => { + return take(output, { + bundleId: __expectString, + cpuCount: __expectInt32, + diskSizeInGb: __expectInt32, + instanceType: __expectString, + isActive: __expectBoolean, + name: __expectString, + power: __expectInt32, + price: __limitedParseFloat32, + ramSizeInGb: __limitedParseFloat32, + supportedAppCategories: _json, + supportedPlatforms: _json, + transferPerMonthInGb: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1CacheBehaviorList + * deserializeAws_json1_1BundleList */ -const de_CacheBehaviorList = (output: any, context: __SerdeContext): CacheBehaviorPerPath[] => { +const de_BundleList = (output: any, context: __SerdeContext): Bundle[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CacheBehaviorPerPath(entry, context); + return de_Bundle(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CacheBehaviorPerPath - */ -const de_CacheBehaviorPerPath = (output: any, context: __SerdeContext): CacheBehaviorPerPath => { - return { - behavior: __expectString(output.behavior), - path: __expectString(output.path), - } as any; -}; +// de_CacheBehavior omitted. -/** - * deserializeAws_json1_1CacheSettings - */ -const de_CacheSettings = (output: any, context: __SerdeContext): CacheSettings => { - return { - allowedHTTPMethods: __expectString(output.allowedHTTPMethods), - cachedHTTPMethods: __expectString(output.cachedHTTPMethods), - defaultTTL: __expectLong(output.defaultTTL), - forwardedCookies: output.forwardedCookies != null ? de_CookieObject(output.forwardedCookies, context) : undefined, - forwardedHeaders: output.forwardedHeaders != null ? de_HeaderObject(output.forwardedHeaders, context) : undefined, - forwardedQueryStrings: - output.forwardedQueryStrings != null ? de_QueryStringObject(output.forwardedQueryStrings, context) : undefined, - maximumTTL: __expectLong(output.maximumTTL), - minimumTTL: __expectLong(output.minimumTTL), - } as any; -}; +// de_CacheBehaviorList omitted. + +// de_CacheBehaviorPerPath omitted. + +// de_CacheSettings omitted. /** * deserializeAws_json1_1Certificate */ const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - domainName: __expectString(output.domainName), - domainValidationRecords: - output.domainValidationRecords != null - ? de_DomainValidationRecordList(output.domainValidationRecords, context) - : undefined, - eligibleToRenew: __expectString(output.eligibleToRenew), - inUseResourceCount: __expectInt32(output.inUseResourceCount), - issuedAt: - output.issuedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.issuedAt))) : undefined, - issuerCA: __expectString(output.issuerCA), - keyAlgorithm: __expectString(output.keyAlgorithm), - name: __expectString(output.name), - notAfter: - output.notAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notAfter))) : undefined, - notBefore: - output.notBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notBefore))) : undefined, - renewalSummary: output.renewalSummary != null ? de_RenewalSummary(output.renewalSummary, context) : undefined, - requestFailureReason: __expectString(output.requestFailureReason), - revocationReason: __expectString(output.revocationReason), - revokedAt: - output.revokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revokedAt))) : undefined, - serialNumber: __expectString(output.serialNumber), - status: __expectString(output.status), - subjectAlternativeNames: - output.subjectAlternativeNames != null - ? de_SubjectAlternativeNameList(output.subjectAlternativeNames, context) - : undefined, - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + domainName: __expectString, + domainValidationRecords: _json, + eligibleToRenew: __expectString, + inUseResourceCount: __expectInt32, + issuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + issuerCA: __expectString, + keyAlgorithm: __expectString, + name: __expectString, + notAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + renewalSummary: (_: any) => de_RenewalSummary(_, context), + requestFailureReason: __expectString, + revocationReason: __expectString, + revokedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + serialNumber: __expectString, + status: __expectString, + subjectAlternativeNames: _json, + supportCode: __expectString, + tags: _json, + }) as any; }; /** * deserializeAws_json1_1CertificateSummary */ const de_CertificateSummary = (output: any, context: __SerdeContext): CertificateSummary => { - return { - certificateArn: __expectString(output.certificateArn), - certificateDetail: output.certificateDetail != null ? de_Certificate(output.certificateDetail, context) : undefined, - certificateName: __expectString(output.certificateName), - domainName: __expectString(output.domainName), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; + return take(output, { + certificateArn: __expectString, + certificateDetail: (_: any) => de_Certificate(_, context), + certificateName: __expectString, + domainName: __expectString, + tags: _json, + }) as any; }; /** @@ -16121,9 +13806,6 @@ const de_CertificateSummaryList = (output: any, context: __SerdeContext): Certif const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CertificateSummary(entry, context); }); return retVal; @@ -16133,27 +13815,25 @@ const de_CertificateSummaryList = (output: any, context: __SerdeContext): Certif * deserializeAws_json1_1CloseInstancePublicPortsResult */ const de_CloseInstancePublicPortsResult = (output: any, context: __SerdeContext): CloseInstancePublicPortsResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1CloudFormationStackRecord */ const de_CloudFormationStackRecord = (output: any, context: __SerdeContext): CloudFormationStackRecord => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - destinationInfo: output.destinationInfo != null ? de_DestinationInfo(output.destinationInfo, context) : undefined, - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - sourceInfo: - output.sourceInfo != null ? de_CloudFormationStackRecordSourceInfoList(output.sourceInfo, context) : undefined, - state: __expectString(output.state), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + destinationInfo: _json, + location: _json, + name: __expectString, + resourceType: __expectString, + sourceInfo: _json, + state: __expectString, + }) as any; }; /** @@ -16163,62 +13843,30 @@ const de_CloudFormationStackRecordList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CloudFormationStackRecord(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CloudFormationStackRecordSourceInfo - */ -const de_CloudFormationStackRecordSourceInfo = ( - output: any, - context: __SerdeContext -): CloudFormationStackRecordSourceInfo => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_CloudFormationStackRecordSourceInfo omitted. -/** - * deserializeAws_json1_1CloudFormationStackRecordSourceInfoList - */ -const de_CloudFormationStackRecordSourceInfoList = ( - output: any, - context: __SerdeContext -): CloudFormationStackRecordSourceInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudFormationStackRecordSourceInfo(entry, context); - }); - return retVal; -}; +// de_CloudFormationStackRecordSourceInfoList omitted. /** * deserializeAws_json1_1ContactMethod */ const de_ContactMethod = (output: any, context: __SerdeContext): ContactMethod => { - return { - arn: __expectString(output.arn), - contactEndpoint: __expectString(output.contactEndpoint), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - protocol: __expectString(output.protocol), - resourceType: __expectString(output.resourceType), - status: __expectString(output.status), - supportCode: __expectString(output.supportCode), - } as any; + return take(output, { + arn: __expectString, + contactEndpoint: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + location: _json, + name: __expectString, + protocol: __expectString, + resourceType: __expectString, + status: __expectString, + supportCode: __expectString, + }) as any; }; /** @@ -16228,51 +13876,24 @@ const de_ContactMethodsList = (output: any, context: __SerdeContext): ContactMet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContactMethod(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ContactProtocolsList - */ -const de_ContactProtocolsList = (output: any, context: __SerdeContext): (ContactProtocol | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ContactProtocolsList omitted. -/** - * deserializeAws_json1_1Container - */ -const de_Container = (output: any, context: __SerdeContext): Container => { - return { - command: output.command != null ? de_StringList(output.command, context) : undefined, - environment: output.environment != null ? de_Environment(output.environment, context) : undefined, - image: __expectString(output.image), - ports: output.ports != null ? de_PortMap(output.ports, context) : undefined, - } as any; -}; +// de_Container omitted. /** * deserializeAws_json1_1ContainerImage */ const de_ContainerImage = (output: any, context: __SerdeContext): ContainerImage => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - digest: __expectString(output.digest), - image: __expectString(output.image), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + digest: __expectString, + image: __expectString, + }) as any; }; /** @@ -16282,76 +13903,51 @@ const de_ContainerImageList = (output: any, context: __SerdeContext): ContainerI const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContainerImage(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ContainerMap - */ -const de_ContainerMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Container(value, context); - return acc; - }, {}); -}; +// de_ContainerMap omitted. /** * deserializeAws_json1_1ContainerService */ const de_ContainerService = (output: any, context: __SerdeContext): ContainerService => { - return { - arn: __expectString(output.arn), - containerServiceName: __expectString(output.containerServiceName), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - currentDeployment: - output.currentDeployment != null ? de_ContainerServiceDeployment(output.currentDeployment, context) : undefined, - isDisabled: __expectBoolean(output.isDisabled), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - nextDeployment: - output.nextDeployment != null ? de_ContainerServiceDeployment(output.nextDeployment, context) : undefined, - power: __expectString(output.power), - powerId: __expectString(output.powerId), - principalArn: __expectString(output.principalArn), - privateDomainName: __expectString(output.privateDomainName), - privateRegistryAccess: - output.privateRegistryAccess != null - ? de_PrivateRegistryAccess(output.privateRegistryAccess, context) - : undefined, - publicDomainNames: - output.publicDomainNames != null - ? de_ContainerServicePublicDomains(output.publicDomainNames, context) - : undefined, - resourceType: __expectString(output.resourceType), - scale: __expectInt32(output.scale), - state: __expectString(output.state), - stateDetail: output.stateDetail != null ? de_ContainerServiceStateDetail(output.stateDetail, context) : undefined, - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - url: __expectString(output.url), - } as any; + return take(output, { + arn: __expectString, + containerServiceName: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + currentDeployment: (_: any) => de_ContainerServiceDeployment(_, context), + isDisabled: __expectBoolean, + location: _json, + nextDeployment: (_: any) => de_ContainerServiceDeployment(_, context), + power: __expectString, + powerId: __expectString, + principalArn: __expectString, + privateDomainName: __expectString, + privateRegistryAccess: _json, + publicDomainNames: _json, + resourceType: __expectString, + scale: __expectInt32, + state: __expectString, + stateDetail: _json, + tags: _json, + url: __expectString, + }) as any; }; /** * deserializeAws_json1_1ContainerServiceDeployment */ const de_ContainerServiceDeployment = (output: any, context: __SerdeContext): ContainerServiceDeployment => { - return { - containers: output.containers != null ? de_ContainerMap(output.containers, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - publicEndpoint: - output.publicEndpoint != null ? de_ContainerServiceEndpoint(output.publicEndpoint, context) : undefined, - state: __expectString(output.state), - version: __expectInt32(output.version), - } as any; + return take(output, { + containers: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + publicEndpoint: _json, + state: __expectString, + version: __expectInt32, + }) as any; }; /** @@ -16361,55 +13957,16 @@ const de_ContainerServiceDeploymentList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContainerServiceDeployment(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ContainerServiceECRImagePullerRole - */ -const de_ContainerServiceECRImagePullerRole = ( - output: any, - context: __SerdeContext -): ContainerServiceECRImagePullerRole => { - return { - isActive: __expectBoolean(output.isActive), - principalArn: __expectString(output.principalArn), - } as any; -}; +// de_ContainerServiceECRImagePullerRole omitted. -/** - * deserializeAws_json1_1ContainerServiceEndpoint - */ -const de_ContainerServiceEndpoint = (output: any, context: __SerdeContext): ContainerServiceEndpoint => { - return { - containerName: __expectString(output.containerName), - containerPort: __expectInt32(output.containerPort), - healthCheck: - output.healthCheck != null ? de_ContainerServiceHealthCheckConfig(output.healthCheck, context) : undefined, - } as any; -}; +// de_ContainerServiceEndpoint omitted. -/** - * deserializeAws_json1_1ContainerServiceHealthCheckConfig - */ -const de_ContainerServiceHealthCheckConfig = ( - output: any, - context: __SerdeContext -): ContainerServiceHealthCheckConfig => { - return { - healthyThreshold: __expectInt32(output.healthyThreshold), - intervalSeconds: __expectInt32(output.intervalSeconds), - path: __expectString(output.path), - successCodes: __expectString(output.successCodes), - timeoutSeconds: __expectInt32(output.timeoutSeconds), - unhealthyThreshold: __expectInt32(output.unhealthyThreshold), - } as any; -}; +// de_ContainerServiceHealthCheckConfig omitted. /** * deserializeAws_json1_1ContainerServiceList @@ -16418,9 +13975,6 @@ const de_ContainerServiceList = (output: any, context: __SerdeContext): Containe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContainerService(entry, context); }); return retVal; @@ -16430,11 +13984,10 @@ const de_ContainerServiceList = (output: any, context: __SerdeContext): Containe * deserializeAws_json1_1ContainerServiceLogEvent */ const de_ContainerServiceLogEvent = (output: any, context: __SerdeContext): ContainerServiceLogEvent => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - message: __expectString(output.message), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + }) as any; }; /** @@ -16444,54 +13997,27 @@ const de_ContainerServiceLogEventList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContainerServiceLogEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ContainerServiceMetadataEntry - */ -const de_ContainerServiceMetadataEntry = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ContainerServiceMetadataEntry omitted. -/** - * deserializeAws_json1_1ContainerServiceMetadataEntryList - */ -const de_ContainerServiceMetadataEntryList = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerServiceMetadataEntry(entry, context); - }); - return retVal; -}; +// de_ContainerServiceMetadataEntryList omitted. /** * deserializeAws_json1_1ContainerServicePower */ const de_ContainerServicePower = (output: any, context: __SerdeContext): ContainerServicePower => { - return { - cpuCount: __limitedParseFloat32(output.cpuCount), - isActive: __expectBoolean(output.isActive), - name: __expectString(output.name), - powerId: __expectString(output.powerId), - price: __limitedParseFloat32(output.price), - ramSizeInGb: __limitedParseFloat32(output.ramSizeInGb), - } as any; + return take(output, { + cpuCount: __limitedParseFloat32, + isActive: __expectBoolean, + name: __expectString, + powerId: __expectString, + price: __limitedParseFloat32, + ramSizeInGb: __limitedParseFloat32, + }) as any; }; /** @@ -16501,102 +14027,57 @@ const de_ContainerServicePowerList = (output: any, context: __SerdeContext): Con const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContainerServicePower(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ContainerServicePublicDomains - */ -const de_ContainerServicePublicDomains = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ContainerServicePublicDomainsList(value, context); - return acc; - }, {}); -}; +// de_ContainerServicePublicDomains omitted. -/** - * deserializeAws_json1_1ContainerServicePublicDomainsList - */ -const de_ContainerServicePublicDomainsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ContainerServicePublicDomainsList omitted. /** * deserializeAws_json1_1ContainerServiceRegistryLogin */ const de_ContainerServiceRegistryLogin = (output: any, context: __SerdeContext): ContainerServiceRegistryLogin => { - return { - expiresAt: - output.expiresAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiresAt))) : undefined, - password: __expectString(output.password), - registry: __expectString(output.registry), - username: __expectString(output.username), - } as any; + return take(output, { + expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + password: __expectString, + registry: __expectString, + username: __expectString, + }) as any; }; /** * deserializeAws_json1_1ContainerServicesListResult */ const de_ContainerServicesListResult = (output: any, context: __SerdeContext): ContainerServicesListResult => { - return { - containerServices: - output.containerServices != null ? de_ContainerServiceList(output.containerServices, context) : undefined, - } as any; + return take(output, { + containerServices: (_: any) => de_ContainerServiceList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ContainerServiceStateDetail - */ -const de_ContainerServiceStateDetail = (output: any, context: __SerdeContext): ContainerServiceStateDetail => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ContainerServiceStateDetail omitted. -/** - * deserializeAws_json1_1CookieObject - */ -const de_CookieObject = (output: any, context: __SerdeContext): CookieObject => { - return { - cookiesAllowList: output.cookiesAllowList != null ? de_StringList(output.cookiesAllowList, context) : undefined, - option: __expectString(output.option), - } as any; -}; +// de_CookieObject omitted. /** * deserializeAws_json1_1CopySnapshotResult */ const de_CopySnapshotResult = (output: any, context: __SerdeContext): CopySnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CostEstimate */ const de_CostEstimate = (output: any, context: __SerdeContext): CostEstimate => { - return { - resultsByTime: output.resultsByTime != null ? de_EstimatesByTime(output.resultsByTime, context) : undefined, - usageType: __expectString(output.usageType), - } as any; + return take(output, { + resultsByTime: (_: any) => de_EstimatesByTime(_, context), + usageType: __expectString, + }) as any; }; /** @@ -16606,9 +14087,6 @@ const de_CostEstimates = (output: any, context: __SerdeContext): CostEstimate[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CostEstimate(entry, context); }); return retVal; @@ -16618,48 +14096,48 @@ const de_CostEstimates = (output: any, context: __SerdeContext): CostEstimate[] * deserializeAws_json1_1CreateBucketAccessKeyResult */ const de_CreateBucketAccessKeyResult = (output: any, context: __SerdeContext): CreateBucketAccessKeyResult => { - return { - accessKey: output.accessKey != null ? de_AccessKey(output.accessKey, context) : undefined, - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + accessKey: (_: any) => de_AccessKey(_, context), + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateBucketResult */ const de_CreateBucketResult = (output: any, context: __SerdeContext): CreateBucketResult => { - return { - bucket: output.bucket != null ? de_Bucket(output.bucket, context) : undefined, - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + bucket: (_: any) => de_Bucket(_, context), + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateCertificateResult */ const de_CreateCertificateResult = (output: any, context: __SerdeContext): CreateCertificateResult => { - return { - certificate: output.certificate != null ? de_CertificateSummary(output.certificate, context) : undefined, - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + certificate: (_: any) => de_CertificateSummary(_, context), + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateCloudFormationStackResult */ const de_CreateCloudFormationStackResult = (output: any, context: __SerdeContext): CreateCloudFormationStackResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateContactMethodResult */ const de_CreateContactMethodResult = (output: any, context: __SerdeContext): CreateContactMethodResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -16669,10 +14147,9 @@ const de_CreateContainerServiceDeploymentResult = ( output: any, context: __SerdeContext ): CreateContainerServiceDeploymentResult => { - return { - containerService: - output.containerService != null ? de_ContainerService(output.containerService, context) : undefined, - } as any; + return take(output, { + containerService: (_: any) => de_ContainerService(_, context), + }) as any; }; /** @@ -16682,92 +14159,76 @@ const de_CreateContainerServiceRegistryLoginResult = ( output: any, context: __SerdeContext ): CreateContainerServiceRegistryLoginResult => { - return { - registryLogin: - output.registryLogin != null ? de_ContainerServiceRegistryLogin(output.registryLogin, context) : undefined, - } as any; + return take(output, { + registryLogin: (_: any) => de_ContainerServiceRegistryLogin(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateContainerServiceResult */ const de_CreateContainerServiceResult = (output: any, context: __SerdeContext): CreateContainerServiceResult => { - return { - containerService: - output.containerService != null ? de_ContainerService(output.containerService, context) : undefined, - } as any; + return take(output, { + containerService: (_: any) => de_ContainerService(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateDiskFromSnapshotResult */ const de_CreateDiskFromSnapshotResult = (output: any, context: __SerdeContext): CreateDiskFromSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateDiskResult */ const de_CreateDiskResult = (output: any, context: __SerdeContext): CreateDiskResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateDiskSnapshotResult */ const de_CreateDiskSnapshotResult = (output: any, context: __SerdeContext): CreateDiskSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateDistributionResult */ const de_CreateDistributionResult = (output: any, context: __SerdeContext): CreateDistributionResult => { - return { - distribution: output.distribution != null ? de_LightsailDistribution(output.distribution, context) : undefined, - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + distribution: (_: any) => de_LightsailDistribution(_, context), + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateDomainEntryResult */ const de_CreateDomainEntryResult = (output: any, context: __SerdeContext): CreateDomainEntryResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateDomainResult */ const de_CreateDomainResult = (output: any, context: __SerdeContext): CreateDomainResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateGUISessionAccessDetailsResult - */ -const de_CreateGUISessionAccessDetailsResult = ( - output: any, - context: __SerdeContext -): CreateGUISessionAccessDetailsResult => { - return { - failureReason: __expectString(output.failureReason), - percentageComplete: __expectInt32(output.percentageComplete), - resourceName: __expectString(output.resourceName), - sessions: output.sessions != null ? de_Sessions(output.sessions, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_CreateGUISessionAccessDetailsResult omitted. /** * deserializeAws_json1_1CreateInstancesFromSnapshotResult @@ -16776,48 +14237,48 @@ const de_CreateInstancesFromSnapshotResult = ( output: any, context: __SerdeContext ): CreateInstancesFromSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateInstanceSnapshotResult */ const de_CreateInstanceSnapshotResult = (output: any, context: __SerdeContext): CreateInstanceSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateInstancesResult */ const de_CreateInstancesResult = (output: any, context: __SerdeContext): CreateInstancesResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateKeyPairResult */ const de_CreateKeyPairResult = (output: any, context: __SerdeContext): CreateKeyPairResult => { - return { - keyPair: output.keyPair != null ? de_KeyPair(output.keyPair, context) : undefined, - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - privateKeyBase64: __expectString(output.privateKeyBase64), - publicKeyBase64: __expectString(output.publicKeyBase64), - } as any; + return take(output, { + keyPair: (_: any) => de_KeyPair(_, context), + operation: (_: any) => de_Operation(_, context), + privateKeyBase64: __expectString, + publicKeyBase64: __expectString, + }) as any; }; /** * deserializeAws_json1_1CreateLoadBalancerResult */ const de_CreateLoadBalancerResult = (output: any, context: __SerdeContext): CreateLoadBalancerResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -16827,9 +14288,9 @@ const de_CreateLoadBalancerTlsCertificateResult = ( output: any, context: __SerdeContext ): CreateLoadBalancerTlsCertificateResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -16839,18 +14300,18 @@ const de_CreateRelationalDatabaseFromSnapshotResult = ( output: any, context: __SerdeContext ): CreateRelationalDatabaseFromSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateRelationalDatabaseResult */ const de_CreateRelationalDatabaseResult = (output: any, context: __SerdeContext): CreateRelationalDatabaseResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -16860,167 +14321,157 @@ const de_CreateRelationalDatabaseSnapshotResult = ( output: any, context: __SerdeContext ): CreateRelationalDatabaseSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteAlarmResult */ const de_DeleteAlarmResult = (output: any, context: __SerdeContext): DeleteAlarmResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteAutoSnapshotResult */ const de_DeleteAutoSnapshotResult = (output: any, context: __SerdeContext): DeleteAutoSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteBucketAccessKeyResult */ const de_DeleteBucketAccessKeyResult = (output: any, context: __SerdeContext): DeleteBucketAccessKeyResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteBucketResult */ const de_DeleteBucketResult = (output: any, context: __SerdeContext): DeleteBucketResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteCertificateResult */ const de_DeleteCertificateResult = (output: any, context: __SerdeContext): DeleteCertificateResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteContactMethodResult */ const de_DeleteContactMethodResult = (output: any, context: __SerdeContext): DeleteContactMethodResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteContainerImageResult - */ -const de_DeleteContainerImageResult = (output: any, context: __SerdeContext): DeleteContainerImageResult => { - return {} as any; -}; +// de_DeleteContainerImageResult omitted. -/** - * deserializeAws_json1_1DeleteContainerServiceResult - */ -const de_DeleteContainerServiceResult = (output: any, context: __SerdeContext): DeleteContainerServiceResult => { - return {} as any; -}; +// de_DeleteContainerServiceResult omitted. /** * deserializeAws_json1_1DeleteDiskResult */ const de_DeleteDiskResult = (output: any, context: __SerdeContext): DeleteDiskResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteDiskSnapshotResult */ const de_DeleteDiskSnapshotResult = (output: any, context: __SerdeContext): DeleteDiskSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteDistributionResult */ const de_DeleteDistributionResult = (output: any, context: __SerdeContext): DeleteDistributionResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteDomainEntryResult */ const de_DeleteDomainEntryResult = (output: any, context: __SerdeContext): DeleteDomainEntryResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteDomainResult */ const de_DeleteDomainResult = (output: any, context: __SerdeContext): DeleteDomainResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteInstanceResult */ const de_DeleteInstanceResult = (output: any, context: __SerdeContext): DeleteInstanceResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteInstanceSnapshotResult */ const de_DeleteInstanceSnapshotResult = (output: any, context: __SerdeContext): DeleteInstanceSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteKeyPairResult */ const de_DeleteKeyPairResult = (output: any, context: __SerdeContext): DeleteKeyPairResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteKnownHostKeysResult */ const de_DeleteKnownHostKeysResult = (output: any, context: __SerdeContext): DeleteKnownHostKeysResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteLoadBalancerResult */ const de_DeleteLoadBalancerResult = (output: any, context: __SerdeContext): DeleteLoadBalancerResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -17030,18 +14481,18 @@ const de_DeleteLoadBalancerTlsCertificateResult = ( output: any, context: __SerdeContext ): DeleteLoadBalancerTlsCertificateResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteRelationalDatabaseResult */ const de_DeleteRelationalDatabaseResult = (output: any, context: __SerdeContext): DeleteRelationalDatabaseResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -17051,20 +14502,12 @@ const de_DeleteRelationalDatabaseSnapshotResult = ( output: any, context: __SerdeContext ): DeleteRelationalDatabaseSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DestinationInfo - */ -const de_DestinationInfo = (output: any, context: __SerdeContext): DestinationInfo => { - return { - id: __expectString(output.id), - service: __expectString(output.service), - } as any; -}; +// de_DestinationInfo omitted. /** * deserializeAws_json1_1DetachCertificateFromDistributionResult @@ -17073,18 +14516,18 @@ const de_DetachCertificateFromDistributionResult = ( output: any, context: __SerdeContext ): DetachCertificateFromDistributionResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1DetachDiskResult */ const de_DetachDiskResult = (output: any, context: __SerdeContext): DetachDiskResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -17094,82 +14537,58 @@ const de_DetachInstancesFromLoadBalancerResult = ( output: any, context: __SerdeContext ): DetachInstancesFromLoadBalancerResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DetachStaticIpResult */ const de_DetachStaticIpResult = (output: any, context: __SerdeContext): DetachStaticIpResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1DisableAddOnResult */ const de_DisableAddOnResult = (output: any, context: __SerdeContext): DisableAddOnResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1Disk */ const de_Disk = (output: any, context: __SerdeContext): Disk => { - return { - addOns: output.addOns != null ? de_AddOnList(output.addOns, context) : undefined, - arn: __expectString(output.arn), - attachedTo: __expectString(output.attachedTo), - attachmentState: __expectString(output.attachmentState), - autoMountStatus: __expectString(output.autoMountStatus), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - gbInUse: __expectInt32(output.gbInUse), - iops: __expectInt32(output.iops), - isAttached: __expectBoolean(output.isAttached), - isSystemDisk: __expectBoolean(output.isSystemDisk), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - path: __expectString(output.path), - resourceType: __expectString(output.resourceType), - sizeInGb: __expectInt32(output.sizeInGb), - state: __expectString(output.state), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DiskInfo - */ -const de_DiskInfo = (output: any, context: __SerdeContext): DiskInfo => { - return { - isSystemDisk: __expectBoolean(output.isSystemDisk), - name: __expectString(output.name), - path: __expectString(output.path), - sizeInGb: __expectInt32(output.sizeInGb), - } as any; -}; - -/** - * deserializeAws_json1_1DiskInfoList - */ -const de_DiskInfoList = (output: any, context: __SerdeContext): DiskInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DiskInfo(entry, context); - }); - return retVal; -}; + return take(output, { + addOns: _json, + arn: __expectString, + attachedTo: __expectString, + attachmentState: __expectString, + autoMountStatus: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + gbInUse: __expectInt32, + iops: __expectInt32, + isAttached: __expectBoolean, + isSystemDisk: __expectBoolean, + location: _json, + name: __expectString, + path: __expectString, + resourceType: __expectString, + sizeInGb: __expectInt32, + state: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; +}; + +// de_DiskInfo omitted. + +// de_DiskInfoList omitted. /** * deserializeAws_json1_1DiskList @@ -17178,9 +14597,6 @@ const de_DiskList = (output: any, context: __SerdeContext): Disk[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Disk(entry, context); }); return retVal; @@ -17190,34 +14606,26 @@ const de_DiskList = (output: any, context: __SerdeContext): Disk[] => { * deserializeAws_json1_1DiskSnapshot */ const de_DiskSnapshot = (output: any, context: __SerdeContext): DiskSnapshot => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - fromDiskArn: __expectString(output.fromDiskArn), - fromDiskName: __expectString(output.fromDiskName), - fromInstanceArn: __expectString(output.fromInstanceArn), - fromInstanceName: __expectString(output.fromInstanceName), - isFromAutoSnapshot: __expectBoolean(output.isFromAutoSnapshot), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - progress: __expectString(output.progress), - resourceType: __expectString(output.resourceType), - sizeInGb: __expectInt32(output.sizeInGb), - state: __expectString(output.state), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DiskSnapshotInfo - */ -const de_DiskSnapshotInfo = (output: any, context: __SerdeContext): DiskSnapshotInfo => { - return { - sizeInGb: __expectInt32(output.sizeInGb), - } as any; -}; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fromDiskArn: __expectString, + fromDiskName: __expectString, + fromInstanceArn: __expectString, + fromInstanceName: __expectString, + isFromAutoSnapshot: __expectBoolean, + location: _json, + name: __expectString, + progress: __expectString, + resourceType: __expectString, + sizeInGb: __expectInt32, + state: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; +}; + +// de_DiskSnapshotInfo omitted. /** * deserializeAws_json1_1DiskSnapshotList @@ -17226,9 +14634,6 @@ const de_DiskSnapshotList = (output: any, context: __SerdeContext): DiskSnapshot const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DiskSnapshot(entry, context); }); return retVal; @@ -17238,13 +14643,13 @@ const de_DiskSnapshotList = (output: any, context: __SerdeContext): DiskSnapshot * deserializeAws_json1_1DistributionBundle */ const de_DistributionBundle = (output: any, context: __SerdeContext): DistributionBundle => { - return { - bundleId: __expectString(output.bundleId), - isActive: __expectBoolean(output.isActive), - name: __expectString(output.name), - price: __limitedParseFloat32(output.price), - transferPerMonthInGb: __expectInt32(output.transferPerMonthInGb), - } as any; + return take(output, { + bundleId: __expectString, + isActive: __expectBoolean, + name: __expectString, + price: __limitedParseFloat32, + transferPerMonthInGb: __expectInt32, + }) as any; }; /** @@ -17254,9 +14659,6 @@ const de_DistributionBundleList = (output: any, context: __SerdeContext): Distri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DistributionBundle(entry, context); }); return retVal; @@ -17269,86 +14671,35 @@ const de_DistributionList = (output: any, context: __SerdeContext): LightsailDis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LightsailDistribution(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DnsRecordCreationState - */ -const de_DnsRecordCreationState = (output: any, context: __SerdeContext): DnsRecordCreationState => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_DnsRecordCreationState omitted. /** * deserializeAws_json1_1Domain */ const de_Domain = (output: any, context: __SerdeContext): Domain => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - domainEntries: output.domainEntries != null ? de_DomainEntryList(output.domainEntries, context) : undefined, - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - registeredDomainDelegationInfo: - output.registeredDomainDelegationInfo != null - ? de_RegisteredDomainDelegationInfo(output.registeredDomainDelegationInfo, context) - : undefined, - resourceType: __expectString(output.resourceType), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DomainEntry - */ -const de_DomainEntry = (output: any, context: __SerdeContext): DomainEntry => { - return { - id: __expectString(output.id), - isAlias: __expectBoolean(output.isAlias), - name: __expectString(output.name), - options: output.options != null ? de_DomainEntryOptions(output.options, context) : undefined, - target: __expectString(output.target), - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + domainEntries: _json, + location: _json, + name: __expectString, + registeredDomainDelegationInfo: _json, + resourceType: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_json1_1DomainEntryList - */ -const de_DomainEntryList = (output: any, context: __SerdeContext): DomainEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainEntry(entry, context); - }); - return retVal; -}; +// de_DomainEntry omitted. -/** - * deserializeAws_json1_1DomainEntryOptions - */ -const de_DomainEntryOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DomainEntryList omitted. + +// de_DomainEntryOptions omitted. /** * deserializeAws_json1_1DomainList @@ -17357,89 +14708,48 @@ const de_DomainList = (output: any, context: __SerdeContext): Domain[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Domain(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DomainValidationRecord - */ -const de_DomainValidationRecord = (output: any, context: __SerdeContext): DomainValidationRecord => { - return { - dnsRecordCreationState: - output.dnsRecordCreationState != null - ? de_DnsRecordCreationState(output.dnsRecordCreationState, context) - : undefined, - domainName: __expectString(output.domainName), - resourceRecord: output.resourceRecord != null ? de_ResourceRecord(output.resourceRecord, context) : undefined, - validationStatus: __expectString(output.validationStatus), - } as any; -}; +// de_DomainValidationRecord omitted. -/** - * deserializeAws_json1_1DomainValidationRecordList - */ -const de_DomainValidationRecordList = (output: any, context: __SerdeContext): DomainValidationRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainValidationRecord(entry, context); - }); - return retVal; -}; +// de_DomainValidationRecordList omitted. /** * deserializeAws_json1_1DownloadDefaultKeyPairResult */ const de_DownloadDefaultKeyPairResult = (output: any, context: __SerdeContext): DownloadDefaultKeyPairResult => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - privateKeyBase64: __expectString(output.privateKeyBase64), - publicKeyBase64: __expectString(output.publicKeyBase64), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + privateKeyBase64: __expectString, + publicKeyBase64: __expectString, + }) as any; }; /** * deserializeAws_json1_1EnableAddOnResult */ const de_EnableAddOnResult = (output: any, context: __SerdeContext): EnableAddOnResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Environment - */ -const de_Environment = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Environment omitted. /** * deserializeAws_json1_1EstimateByTime */ const de_EstimateByTime = (output: any, context: __SerdeContext): EstimateByTime => { - return { - currency: __expectString(output.currency), - pricingUnit: __expectString(output.pricingUnit), - timePeriod: output.timePeriod != null ? de_TimePeriod(output.timePeriod, context) : undefined, - unit: __limitedParseDouble(output.unit), - usageCost: __limitedParseDouble(output.usageCost), - } as any; + return take(output, { + currency: __expectString, + pricingUnit: __expectString, + timePeriod: (_: any) => de_TimePeriod(_, context), + unit: __limitedParseDouble, + usageCost: __limitedParseDouble, + }) as any; }; /** @@ -17449,9 +14759,6 @@ const de_EstimatesByTime = (output: any, context: __SerdeContext): EstimateByTim const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EstimateByTime(entry, context); }); return retVal; @@ -17461,17 +14768,16 @@ const de_EstimatesByTime = (output: any, context: __SerdeContext): EstimateByTim * deserializeAws_json1_1ExportSnapshotRecord */ const de_ExportSnapshotRecord = (output: any, context: __SerdeContext): ExportSnapshotRecord => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - destinationInfo: output.destinationInfo != null ? de_DestinationInfo(output.destinationInfo, context) : undefined, - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - sourceInfo: output.sourceInfo != null ? de_ExportSnapshotRecordSourceInfo(output.sourceInfo, context) : undefined, - state: __expectString(output.state), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + destinationInfo: _json, + location: _json, + name: __expectString, + resourceType: __expectString, + sourceInfo: (_: any) => de_ExportSnapshotRecordSourceInfo(_, context), + state: __expectString, + }) as any; }; /** @@ -17481,9 +14787,6 @@ const de_ExportSnapshotRecordList = (output: any, context: __SerdeContext): Expo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExportSnapshotRecord(entry, context); }); return retVal; @@ -17493,128 +14796,108 @@ const de_ExportSnapshotRecordList = (output: any, context: __SerdeContext): Expo * deserializeAws_json1_1ExportSnapshotRecordSourceInfo */ const de_ExportSnapshotRecordSourceInfo = (output: any, context: __SerdeContext): ExportSnapshotRecordSourceInfo => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - diskSnapshotInfo: - output.diskSnapshotInfo != null ? de_DiskSnapshotInfo(output.diskSnapshotInfo, context) : undefined, - fromResourceArn: __expectString(output.fromResourceArn), - fromResourceName: __expectString(output.fromResourceName), - instanceSnapshotInfo: - output.instanceSnapshotInfo != null ? de_InstanceSnapshotInfo(output.instanceSnapshotInfo, context) : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + diskSnapshotInfo: _json, + fromResourceArn: __expectString, + fromResourceName: __expectString, + instanceSnapshotInfo: _json, + name: __expectString, + resourceType: __expectString, + }) as any; }; /** * deserializeAws_json1_1ExportSnapshotResult */ const de_ExportSnapshotResult = (output: any, context: __SerdeContext): ExportSnapshotResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetActiveNamesResult - */ -const de_GetActiveNamesResult = (output: any, context: __SerdeContext): GetActiveNamesResult => { - return { - activeNames: output.activeNames != null ? de_StringList(output.activeNames, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; -}; +// de_GetActiveNamesResult omitted. /** * deserializeAws_json1_1GetAlarmsResult */ const de_GetAlarmsResult = (output: any, context: __SerdeContext): GetAlarmsResult => { - return { - alarms: output.alarms != null ? de_AlarmsList(output.alarms, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + alarms: (_: any) => de_AlarmsList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetAutoSnapshotsResult */ const de_GetAutoSnapshotsResult = (output: any, context: __SerdeContext): GetAutoSnapshotsResult => { - return { - autoSnapshots: output.autoSnapshots != null ? de_AutoSnapshotDetailsList(output.autoSnapshots, context) : undefined, - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - } as any; + return take(output, { + autoSnapshots: (_: any) => de_AutoSnapshotDetailsList(_, context), + resourceName: __expectString, + resourceType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetBlueprintsResult - */ -const de_GetBlueprintsResult = (output: any, context: __SerdeContext): GetBlueprintsResult => { - return { - blueprints: output.blueprints != null ? de_BlueprintList(output.blueprints, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; -}; +// de_GetBlueprintsResult omitted. /** * deserializeAws_json1_1GetBucketAccessKeysResult */ const de_GetBucketAccessKeysResult = (output: any, context: __SerdeContext): GetBucketAccessKeysResult => { - return { - accessKeys: output.accessKeys != null ? de_AccessKeyList(output.accessKeys, context) : undefined, - } as any; + return take(output, { + accessKeys: (_: any) => de_AccessKeyList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetBucketBundlesResult */ const de_GetBucketBundlesResult = (output: any, context: __SerdeContext): GetBucketBundlesResult => { - return { - bundles: output.bundles != null ? de_BucketBundleList(output.bundles, context) : undefined, - } as any; + return take(output, { + bundles: (_: any) => de_BucketBundleList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetBucketMetricDataResult */ const de_GetBucketMetricDataResult = (output: any, context: __SerdeContext): GetBucketMetricDataResult => { - return { - metricData: output.metricData != null ? de_MetricDatapointList(output.metricData, context) : undefined, - metricName: __expectString(output.metricName), - } as any; + return take(output, { + metricData: (_: any) => de_MetricDatapointList(_, context), + metricName: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetBucketsResult */ const de_GetBucketsResult = (output: any, context: __SerdeContext): GetBucketsResult => { - return { - accountLevelBpaSync: - output.accountLevelBpaSync != null ? de_AccountLevelBpaSync(output.accountLevelBpaSync, context) : undefined, - buckets: output.buckets != null ? de_BucketList(output.buckets, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + accountLevelBpaSync: (_: any) => de_AccountLevelBpaSync(_, context), + buckets: (_: any) => de_BucketList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetBundlesResult */ const de_GetBundlesResult = (output: any, context: __SerdeContext): GetBundlesResult => { - return { - bundles: output.bundles != null ? de_BundleList(output.bundles, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + bundles: (_: any) => de_BundleList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetCertificatesResult */ const de_GetCertificatesResult = (output: any, context: __SerdeContext): GetCertificatesResult => { - return { - certificates: output.certificates != null ? de_CertificateSummaryList(output.certificates, context) : undefined, - } as any; + return take(output, { + certificates: (_: any) => de_CertificateSummaryList(_, context), + }) as any; }; /** @@ -17624,51 +14907,40 @@ const de_GetCloudFormationStackRecordsResult = ( output: any, context: __SerdeContext ): GetCloudFormationStackRecordsResult => { - return { - cloudFormationStackRecords: - output.cloudFormationStackRecords != null - ? de_CloudFormationStackRecordList(output.cloudFormationStackRecords, context) - : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + cloudFormationStackRecords: (_: any) => de_CloudFormationStackRecordList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetContactMethodsResult */ const de_GetContactMethodsResult = (output: any, context: __SerdeContext): GetContactMethodsResult => { - return { - contactMethods: output.contactMethods != null ? de_ContactMethodsList(output.contactMethods, context) : undefined, - } as any; + return take(output, { + contactMethods: (_: any) => de_ContactMethodsList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetContainerAPIMetadataResult - */ -const de_GetContainerAPIMetadataResult = (output: any, context: __SerdeContext): GetContainerAPIMetadataResult => { - return { - metadata: output.metadata != null ? de_ContainerServiceMetadataEntryList(output.metadata, context) : undefined, - } as any; -}; +// de_GetContainerAPIMetadataResult omitted. /** * deserializeAws_json1_1GetContainerImagesResult */ const de_GetContainerImagesResult = (output: any, context: __SerdeContext): GetContainerImagesResult => { - return { - containerImages: - output.containerImages != null ? de_ContainerImageList(output.containerImages, context) : undefined, - } as any; + return take(output, { + containerImages: (_: any) => de_ContainerImageList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetContainerLogResult */ const de_GetContainerLogResult = (output: any, context: __SerdeContext): GetContainerLogResult => { - return { - logEvents: output.logEvents != null ? de_ContainerServiceLogEventList(output.logEvents, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + logEvents: (_: any) => de_ContainerServiceLogEventList(_, context), + nextPageToken: __expectString, + }) as any; }; /** @@ -17678,10 +14950,9 @@ const de_GetContainerServiceDeploymentsResult = ( output: any, context: __SerdeContext ): GetContainerServiceDeploymentsResult => { - return { - deployments: - output.deployments != null ? de_ContainerServiceDeploymentList(output.deployments, context) : undefined, - } as any; + return take(output, { + deployments: (_: any) => de_ContainerServiceDeploymentList(_, context), + }) as any; }; /** @@ -17691,78 +14962,75 @@ const de_GetContainerServiceMetricDataResult = ( output: any, context: __SerdeContext ): GetContainerServiceMetricDataResult => { - return { - metricData: output.metricData != null ? de_MetricDatapointList(output.metricData, context) : undefined, - metricName: __expectString(output.metricName), - } as any; + return take(output, { + metricData: (_: any) => de_MetricDatapointList(_, context), + metricName: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetContainerServicePowersResult */ const de_GetContainerServicePowersResult = (output: any, context: __SerdeContext): GetContainerServicePowersResult => { - return { - powers: output.powers != null ? de_ContainerServicePowerList(output.powers, context) : undefined, - } as any; + return take(output, { + powers: (_: any) => de_ContainerServicePowerList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetCostEstimateResult */ const de_GetCostEstimateResult = (output: any, context: __SerdeContext): GetCostEstimateResult => { - return { - resourcesBudgetEstimate: - output.resourcesBudgetEstimate != null - ? de_ResourcesBudgetEstimate(output.resourcesBudgetEstimate, context) - : undefined, - } as any; + return take(output, { + resourcesBudgetEstimate: (_: any) => de_ResourcesBudgetEstimate(_, context), + }) as any; }; /** * deserializeAws_json1_1GetDiskResult */ const de_GetDiskResult = (output: any, context: __SerdeContext): GetDiskResult => { - return { - disk: output.disk != null ? de_Disk(output.disk, context) : undefined, - } as any; + return take(output, { + disk: (_: any) => de_Disk(_, context), + }) as any; }; /** * deserializeAws_json1_1GetDiskSnapshotResult */ const de_GetDiskSnapshotResult = (output: any, context: __SerdeContext): GetDiskSnapshotResult => { - return { - diskSnapshot: output.diskSnapshot != null ? de_DiskSnapshot(output.diskSnapshot, context) : undefined, - } as any; + return take(output, { + diskSnapshot: (_: any) => de_DiskSnapshot(_, context), + }) as any; }; /** * deserializeAws_json1_1GetDiskSnapshotsResult */ const de_GetDiskSnapshotsResult = (output: any, context: __SerdeContext): GetDiskSnapshotsResult => { - return { - diskSnapshots: output.diskSnapshots != null ? de_DiskSnapshotList(output.diskSnapshots, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + diskSnapshots: (_: any) => de_DiskSnapshotList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetDisksResult */ const de_GetDisksResult = (output: any, context: __SerdeContext): GetDisksResult => { - return { - disks: output.disks != null ? de_DiskList(output.disks, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + disks: (_: any) => de_DiskList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetDistributionBundlesResult */ const de_GetDistributionBundlesResult = (output: any, context: __SerdeContext): GetDistributionBundlesResult => { - return { - bundles: output.bundles != null ? de_DistributionBundleList(output.bundles, context) : undefined, - } as any; + return take(output, { + bundles: (_: any) => de_DistributionBundleList(_, context), + }) as any; }; /** @@ -17772,188 +15040,168 @@ const de_GetDistributionLatestCacheResetResult = ( output: any, context: __SerdeContext ): GetDistributionLatestCacheResetResult => { - return { - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetDistributionMetricDataResult */ const de_GetDistributionMetricDataResult = (output: any, context: __SerdeContext): GetDistributionMetricDataResult => { - return { - metricData: output.metricData != null ? de_MetricDatapointList(output.metricData, context) : undefined, - metricName: __expectString(output.metricName), - } as any; + return take(output, { + metricData: (_: any) => de_MetricDatapointList(_, context), + metricName: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetDistributionsResult */ const de_GetDistributionsResult = (output: any, context: __SerdeContext): GetDistributionsResult => { - return { - distributions: output.distributions != null ? de_DistributionList(output.distributions, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + distributions: (_: any) => de_DistributionList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetDomainResult */ const de_GetDomainResult = (output: any, context: __SerdeContext): GetDomainResult => { - return { - domain: output.domain != null ? de_Domain(output.domain, context) : undefined, - } as any; + return take(output, { + domain: (_: any) => de_Domain(_, context), + }) as any; }; /** * deserializeAws_json1_1GetDomainsResult */ const de_GetDomainsResult = (output: any, context: __SerdeContext): GetDomainsResult => { - return { - domains: output.domains != null ? de_DomainList(output.domains, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + domains: (_: any) => de_DomainList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetExportSnapshotRecordsResult */ const de_GetExportSnapshotRecordsResult = (output: any, context: __SerdeContext): GetExportSnapshotRecordsResult => { - return { - exportSnapshotRecords: - output.exportSnapshotRecords != null - ? de_ExportSnapshotRecordList(output.exportSnapshotRecords, context) - : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + exportSnapshotRecords: (_: any) => de_ExportSnapshotRecordList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetInstanceAccessDetailsResult */ const de_GetInstanceAccessDetailsResult = (output: any, context: __SerdeContext): GetInstanceAccessDetailsResult => { - return { - accessDetails: output.accessDetails != null ? de_InstanceAccessDetails(output.accessDetails, context) : undefined, - } as any; + return take(output, { + accessDetails: (_: any) => de_InstanceAccessDetails(_, context), + }) as any; }; /** * deserializeAws_json1_1GetInstanceMetricDataResult */ const de_GetInstanceMetricDataResult = (output: any, context: __SerdeContext): GetInstanceMetricDataResult => { - return { - metricData: output.metricData != null ? de_MetricDatapointList(output.metricData, context) : undefined, - metricName: __expectString(output.metricName), - } as any; + return take(output, { + metricData: (_: any) => de_MetricDatapointList(_, context), + metricName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetInstancePortStatesResult - */ -const de_GetInstancePortStatesResult = (output: any, context: __SerdeContext): GetInstancePortStatesResult => { - return { - portStates: output.portStates != null ? de_InstancePortStateList(output.portStates, context) : undefined, - } as any; -}; +// de_GetInstancePortStatesResult omitted. /** * deserializeAws_json1_1GetInstanceResult */ const de_GetInstanceResult = (output: any, context: __SerdeContext): GetInstanceResult => { - return { - instance: output.instance != null ? de_Instance(output.instance, context) : undefined, - } as any; + return take(output, { + instance: (_: any) => de_Instance(_, context), + }) as any; }; /** * deserializeAws_json1_1GetInstanceSnapshotResult */ const de_GetInstanceSnapshotResult = (output: any, context: __SerdeContext): GetInstanceSnapshotResult => { - return { - instanceSnapshot: - output.instanceSnapshot != null ? de_InstanceSnapshot(output.instanceSnapshot, context) : undefined, - } as any; + return take(output, { + instanceSnapshot: (_: any) => de_InstanceSnapshot(_, context), + }) as any; }; /** * deserializeAws_json1_1GetInstanceSnapshotsResult */ const de_GetInstanceSnapshotsResult = (output: any, context: __SerdeContext): GetInstanceSnapshotsResult => { - return { - instanceSnapshots: - output.instanceSnapshots != null ? de_InstanceSnapshotList(output.instanceSnapshots, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + instanceSnapshots: (_: any) => de_InstanceSnapshotList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetInstancesResult */ const de_GetInstancesResult = (output: any, context: __SerdeContext): GetInstancesResult => { - return { - instances: output.instances != null ? de_InstanceList(output.instances, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + instances: (_: any) => de_InstanceList(_, context), + nextPageToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetInstanceStateResult - */ -const de_GetInstanceStateResult = (output: any, context: __SerdeContext): GetInstanceStateResult => { - return { - state: output.state != null ? de_InstanceState(output.state, context) : undefined, - } as any; -}; +// de_GetInstanceStateResult omitted. /** * deserializeAws_json1_1GetKeyPairResult */ const de_GetKeyPairResult = (output: any, context: __SerdeContext): GetKeyPairResult => { - return { - keyPair: output.keyPair != null ? de_KeyPair(output.keyPair, context) : undefined, - } as any; + return take(output, { + keyPair: (_: any) => de_KeyPair(_, context), + }) as any; }; /** * deserializeAws_json1_1GetKeyPairsResult */ const de_GetKeyPairsResult = (output: any, context: __SerdeContext): GetKeyPairsResult => { - return { - keyPairs: output.keyPairs != null ? de_KeyPairList(output.keyPairs, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + keyPairs: (_: any) => de_KeyPairList(_, context), + nextPageToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetLoadBalancerMetricDataResult */ const de_GetLoadBalancerMetricDataResult = (output: any, context: __SerdeContext): GetLoadBalancerMetricDataResult => { - return { - metricData: output.metricData != null ? de_MetricDatapointList(output.metricData, context) : undefined, - metricName: __expectString(output.metricName), - } as any; + return take(output, { + metricData: (_: any) => de_MetricDatapointList(_, context), + metricName: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetLoadBalancerResult */ const de_GetLoadBalancerResult = (output: any, context: __SerdeContext): GetLoadBalancerResult => { - return { - loadBalancer: output.loadBalancer != null ? de_LoadBalancer(output.loadBalancer, context) : undefined, - } as any; + return take(output, { + loadBalancer: (_: any) => de_LoadBalancer(_, context), + }) as any; }; /** * deserializeAws_json1_1GetLoadBalancersResult */ const de_GetLoadBalancersResult = (output: any, context: __SerdeContext): GetLoadBalancersResult => { - return { - loadBalancers: output.loadBalancers != null ? de_LoadBalancerList(output.loadBalancers, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + loadBalancers: (_: any) => de_LoadBalancerList(_, context), + nextPageToken: __expectString, + }) as any; }; /** @@ -17963,76 +15211,46 @@ const de_GetLoadBalancerTlsCertificatesResult = ( output: any, context: __SerdeContext ): GetLoadBalancerTlsCertificatesResult => { - return { - tlsCertificates: - output.tlsCertificates != null ? de_LoadBalancerTlsCertificateList(output.tlsCertificates, context) : undefined, - } as any; + return take(output, { + tlsCertificates: (_: any) => de_LoadBalancerTlsCertificateList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetLoadBalancerTlsPoliciesResult - */ -const de_GetLoadBalancerTlsPoliciesResult = ( - output: any, - context: __SerdeContext -): GetLoadBalancerTlsPoliciesResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - tlsPolicies: output.tlsPolicies != null ? de_LoadBalancerTlsPolicyList(output.tlsPolicies, context) : undefined, - } as any; -}; +// de_GetLoadBalancerTlsPoliciesResult omitted. /** * deserializeAws_json1_1GetOperationResult */ const de_GetOperationResult = (output: any, context: __SerdeContext): GetOperationResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1GetOperationsForResourceResult */ const de_GetOperationsForResourceResult = (output: any, context: __SerdeContext): GetOperationsForResourceResult => { - return { - nextPageCount: __expectString(output.nextPageCount), - nextPageToken: __expectString(output.nextPageToken), - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + nextPageCount: __expectString, + nextPageToken: __expectString, + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetOperationsResult */ const de_GetOperationsResult = (output: any, context: __SerdeContext): GetOperationsResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + nextPageToken: __expectString, + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetRegionsResult - */ -const de_GetRegionsResult = (output: any, context: __SerdeContext): GetRegionsResult => { - return { - regions: output.regions != null ? de_RegionList(output.regions, context) : undefined, - } as any; -}; +// de_GetRegionsResult omitted. -/** - * deserializeAws_json1_1GetRelationalDatabaseBlueprintsResult - */ -const de_GetRelationalDatabaseBlueprintsResult = ( - output: any, - context: __SerdeContext -): GetRelationalDatabaseBlueprintsResult => { - return { - blueprints: output.blueprints != null ? de_RelationalDatabaseBlueprintList(output.blueprints, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; -}; +// de_GetRelationalDatabaseBlueprintsResult omitted. /** * deserializeAws_json1_1GetRelationalDatabaseBundlesResult @@ -18041,10 +15259,10 @@ const de_GetRelationalDatabaseBundlesResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseBundlesResult => { - return { - bundles: output.bundles != null ? de_RelationalDatabaseBundleList(output.bundles, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + bundles: (_: any) => de_RelationalDatabaseBundleList(_, context), + nextPageToken: __expectString, + }) as any; }; /** @@ -18054,13 +15272,10 @@ const de_GetRelationalDatabaseEventsResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseEventsResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - relationalDatabaseEvents: - output.relationalDatabaseEvents != null - ? de_RelationalDatabaseEventList(output.relationalDatabaseEvents, context) - : undefined, - } as any; + return take(output, { + nextPageToken: __expectString, + relationalDatabaseEvents: (_: any) => de_RelationalDatabaseEventList(_, context), + }) as any; }; /** @@ -18070,25 +15285,14 @@ const de_GetRelationalDatabaseLogEventsResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseLogEventsResult => { - return { - nextBackwardToken: __expectString(output.nextBackwardToken), - nextForwardToken: __expectString(output.nextForwardToken), - resourceLogEvents: - output.resourceLogEvents != null ? de_LogEventList(output.resourceLogEvents, context) : undefined, - } as any; + return take(output, { + nextBackwardToken: __expectString, + nextForwardToken: __expectString, + resourceLogEvents: (_: any) => de_LogEventList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetRelationalDatabaseLogStreamsResult - */ -const de_GetRelationalDatabaseLogStreamsResult = ( - output: any, - context: __SerdeContext -): GetRelationalDatabaseLogStreamsResult => { - return { - logStreams: output.logStreams != null ? de_StringList(output.logStreams, context) : undefined, - } as any; -}; +// de_GetRelationalDatabaseLogStreamsResult omitted. /** * deserializeAws_json1_1GetRelationalDatabaseMasterUserPasswordResult @@ -18097,11 +15301,10 @@ const de_GetRelationalDatabaseMasterUserPasswordResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseMasterUserPasswordResult => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - masterUserPassword: __expectString(output.masterUserPassword), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + masterUserPassword: __expectString, + }) as any; }; /** @@ -18111,33 +15314,21 @@ const de_GetRelationalDatabaseMetricDataResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseMetricDataResult => { - return { - metricData: output.metricData != null ? de_MetricDatapointList(output.metricData, context) : undefined, - metricName: __expectString(output.metricName), - } as any; + return take(output, { + metricData: (_: any) => de_MetricDatapointList(_, context), + metricName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1GetRelationalDatabaseParametersResult - */ -const de_GetRelationalDatabaseParametersResult = ( - output: any, - context: __SerdeContext -): GetRelationalDatabaseParametersResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - parameters: output.parameters != null ? de_RelationalDatabaseParameterList(output.parameters, context) : undefined, - } as any; -}; +// de_GetRelationalDatabaseParametersResult omitted. /** * deserializeAws_json1_1GetRelationalDatabaseResult */ const de_GetRelationalDatabaseResult = (output: any, context: __SerdeContext): GetRelationalDatabaseResult => { - return { - relationalDatabase: - output.relationalDatabase != null ? de_RelationalDatabase(output.relationalDatabase, context) : undefined, - } as any; + return take(output, { + relationalDatabase: (_: any) => de_RelationalDatabase(_, context), + }) as any; }; /** @@ -18147,12 +15338,9 @@ const de_GetRelationalDatabaseSnapshotResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseSnapshotResult => { - return { - relationalDatabaseSnapshot: - output.relationalDatabaseSnapshot != null - ? de_RelationalDatabaseSnapshot(output.relationalDatabaseSnapshot, context) - : undefined, - } as any; + return take(output, { + relationalDatabaseSnapshot: (_: any) => de_RelationalDatabaseSnapshot(_, context), + }) as any; }; /** @@ -18162,93 +15350,58 @@ const de_GetRelationalDatabaseSnapshotsResult = ( output: any, context: __SerdeContext ): GetRelationalDatabaseSnapshotsResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - relationalDatabaseSnapshots: - output.relationalDatabaseSnapshots != null - ? de_RelationalDatabaseSnapshotList(output.relationalDatabaseSnapshots, context) - : undefined, - } as any; + return take(output, { + nextPageToken: __expectString, + relationalDatabaseSnapshots: (_: any) => de_RelationalDatabaseSnapshotList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetRelationalDatabasesResult */ const de_GetRelationalDatabasesResult = (output: any, context: __SerdeContext): GetRelationalDatabasesResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - relationalDatabases: - output.relationalDatabases != null ? de_RelationalDatabaseList(output.relationalDatabases, context) : undefined, - } as any; + return take(output, { + nextPageToken: __expectString, + relationalDatabases: (_: any) => de_RelationalDatabaseList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetStaticIpResult */ const de_GetStaticIpResult = (output: any, context: __SerdeContext): GetStaticIpResult => { - return { - staticIp: output.staticIp != null ? de_StaticIp(output.staticIp, context) : undefined, - } as any; + return take(output, { + staticIp: (_: any) => de_StaticIp(_, context), + }) as any; }; /** * deserializeAws_json1_1GetStaticIpsResult */ const de_GetStaticIpsResult = (output: any, context: __SerdeContext): GetStaticIpsResult => { - return { - nextPageToken: __expectString(output.nextPageToken), - staticIps: output.staticIps != null ? de_StaticIpList(output.staticIps, context) : undefined, - } as any; + return take(output, { + nextPageToken: __expectString, + staticIps: (_: any) => de_StaticIpList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1HeaderForwardList - */ -const de_HeaderForwardList = (output: any, context: __SerdeContext): (HeaderEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HeaderForwardList omitted. -/** - * deserializeAws_json1_1HeaderObject - */ -const de_HeaderObject = (output: any, context: __SerdeContext): HeaderObject => { - return { - headersAllowList: - output.headersAllowList != null ? de_HeaderForwardList(output.headersAllowList, context) : undefined, - option: __expectString(output.option), - } as any; -}; +// de_HeaderObject omitted. /** * deserializeAws_json1_1HostKeyAttributes */ const de_HostKeyAttributes = (output: any, context: __SerdeContext): HostKeyAttributes => { - return { - algorithm: __expectString(output.algorithm), - fingerprintSHA1: __expectString(output.fingerprintSHA1), - fingerprintSHA256: __expectString(output.fingerprintSHA256), - notValidAfter: - output.notValidAfter != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notValidAfter))) - : undefined, - notValidBefore: - output.notValidBefore != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notValidBefore))) - : undefined, - publicKey: __expectString(output.publicKey), - witnessedAt: - output.witnessedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.witnessedAt))) - : undefined, - } as any; + return take(output, { + algorithm: __expectString, + fingerprintSHA1: __expectString, + fingerprintSHA256: __expectString, + notValidAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notValidBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + publicKey: __expectString, + witnessedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -18258,9 +15411,6 @@ const de_HostKeysList = (output: any, context: __SerdeContext): HostKeyAttribute const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HostKeyAttributes(entry, context); }); return retVal; @@ -18270,98 +15420,73 @@ const de_HostKeysList = (output: any, context: __SerdeContext): HostKeyAttribute * deserializeAws_json1_1ImportKeyPairResult */ const de_ImportKeyPairResult = (output: any, context: __SerdeContext): ImportKeyPairResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1Instance */ const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - addOns: output.addOns != null ? de_AddOnList(output.addOns, context) : undefined, - arn: __expectString(output.arn), - blueprintId: __expectString(output.blueprintId), - blueprintName: __expectString(output.blueprintName), - bundleId: __expectString(output.bundleId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - hardware: output.hardware != null ? de_InstanceHardware(output.hardware, context) : undefined, - ipAddressType: __expectString(output.ipAddressType), - ipv6Addresses: output.ipv6Addresses != null ? de_Ipv6AddressList(output.ipv6Addresses, context) : undefined, - isStaticIp: __expectBoolean(output.isStaticIp), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - metadataOptions: - output.metadataOptions != null ? de_InstanceMetadataOptions(output.metadataOptions, context) : undefined, - name: __expectString(output.name), - networking: output.networking != null ? de_InstanceNetworking(output.networking, context) : undefined, - privateIpAddress: __expectString(output.privateIpAddress), - publicIpAddress: __expectString(output.publicIpAddress), - resourceType: __expectString(output.resourceType), - sshKeyName: __expectString(output.sshKeyName), - state: output.state != null ? de_InstanceState(output.state, context) : undefined, - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - username: __expectString(output.username), - } as any; + return take(output, { + addOns: _json, + arn: __expectString, + blueprintId: __expectString, + blueprintName: __expectString, + bundleId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + hardware: (_: any) => de_InstanceHardware(_, context), + ipAddressType: __expectString, + ipv6Addresses: _json, + isStaticIp: __expectBoolean, + location: _json, + metadataOptions: _json, + name: __expectString, + networking: _json, + privateIpAddress: __expectString, + publicIpAddress: __expectString, + resourceType: __expectString, + sshKeyName: __expectString, + state: _json, + supportCode: __expectString, + tags: _json, + username: __expectString, + }) as any; }; /** * deserializeAws_json1_1InstanceAccessDetails */ const de_InstanceAccessDetails = (output: any, context: __SerdeContext): InstanceAccessDetails => { - return { - certKey: __expectString(output.certKey), - expiresAt: - output.expiresAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiresAt))) : undefined, - hostKeys: output.hostKeys != null ? de_HostKeysList(output.hostKeys, context) : undefined, - instanceName: __expectString(output.instanceName), - ipAddress: __expectString(output.ipAddress), - password: __expectString(output.password), - passwordData: output.passwordData != null ? de_PasswordData(output.passwordData, context) : undefined, - privateKey: __expectString(output.privateKey), - protocol: __expectString(output.protocol), - username: __expectString(output.username), - } as any; + return take(output, { + certKey: __expectString, + expiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + hostKeys: (_: any) => de_HostKeysList(_, context), + instanceName: __expectString, + ipAddress: __expectString, + password: __expectString, + passwordData: _json, + privateKey: __expectString, + protocol: __expectString, + username: __expectString, + }) as any; }; /** * deserializeAws_json1_1InstanceHardware */ const de_InstanceHardware = (output: any, context: __SerdeContext): InstanceHardware => { - return { - cpuCount: __expectInt32(output.cpuCount), - disks: output.disks != null ? de_DiskList(output.disks, context) : undefined, - ramSizeInGb: __limitedParseFloat32(output.ramSizeInGb), - } as any; + return take(output, { + cpuCount: __expectInt32, + disks: (_: any) => de_DiskList(_, context), + ramSizeInGb: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1InstanceHealthSummary - */ -const de_InstanceHealthSummary = (output: any, context: __SerdeContext): InstanceHealthSummary => { - return { - instanceHealth: __expectString(output.instanceHealth), - instanceHealthReason: __expectString(output.instanceHealthReason), - instanceName: __expectString(output.instanceName), - } as any; -}; +// de_InstanceHealthSummary omitted. -/** - * deserializeAws_json1_1InstanceHealthSummaryList - */ -const de_InstanceHealthSummaryList = (output: any, context: __SerdeContext): InstanceHealthSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceHealthSummary(entry, context); - }); - return retVal; -}; +// de_InstanceHealthSummaryList omitted. /** * deserializeAws_json1_1InstanceList @@ -18370,150 +15495,50 @@ const de_InstanceList = (output: any, context: __SerdeContext): Instance[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Instance(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InstanceMetadataOptions - */ -const de_InstanceMetadataOptions = (output: any, context: __SerdeContext): InstanceMetadataOptions => { - return { - httpEndpoint: __expectString(output.httpEndpoint), - httpProtocolIpv6: __expectString(output.httpProtocolIpv6), - httpPutResponseHopLimit: __expectInt32(output.httpPutResponseHopLimit), - httpTokens: __expectString(output.httpTokens), - state: __expectString(output.state), - } as any; -}; +// de_InstanceMetadataOptions omitted. -/** - * deserializeAws_json1_1InstanceNetworking - */ -const de_InstanceNetworking = (output: any, context: __SerdeContext): InstanceNetworking => { - return { - monthlyTransfer: output.monthlyTransfer != null ? de_MonthlyTransfer(output.monthlyTransfer, context) : undefined, - ports: output.ports != null ? de_InstancePortInfoList(output.ports, context) : undefined, - } as any; -}; +// de_InstanceNetworking omitted. -/** - * deserializeAws_json1_1InstancePlatformList - */ -const de_InstancePlatformList = (output: any, context: __SerdeContext): (InstancePlatform | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InstancePlatformList omitted. -/** - * deserializeAws_json1_1InstancePortInfo - */ -const de_InstancePortInfo = (output: any, context: __SerdeContext): InstancePortInfo => { - return { - accessDirection: __expectString(output.accessDirection), - accessFrom: __expectString(output.accessFrom), - accessType: __expectString(output.accessType), - cidrListAliases: output.cidrListAliases != null ? de_StringList(output.cidrListAliases, context) : undefined, - cidrs: output.cidrs != null ? de_StringList(output.cidrs, context) : undefined, - commonName: __expectString(output.commonName), - fromPort: __expectInt32(output.fromPort), - ipv6Cidrs: output.ipv6Cidrs != null ? de_StringList(output.ipv6Cidrs, context) : undefined, - protocol: __expectString(output.protocol), - toPort: __expectInt32(output.toPort), - } as any; -}; +// de_InstancePortInfo omitted. -/** - * deserializeAws_json1_1InstancePortInfoList - */ -const de_InstancePortInfoList = (output: any, context: __SerdeContext): InstancePortInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstancePortInfo(entry, context); - }); - return retVal; -}; +// de_InstancePortInfoList omitted. -/** - * deserializeAws_json1_1InstancePortState - */ -const de_InstancePortState = (output: any, context: __SerdeContext): InstancePortState => { - return { - cidrListAliases: output.cidrListAliases != null ? de_StringList(output.cidrListAliases, context) : undefined, - cidrs: output.cidrs != null ? de_StringList(output.cidrs, context) : undefined, - fromPort: __expectInt32(output.fromPort), - ipv6Cidrs: output.ipv6Cidrs != null ? de_StringList(output.ipv6Cidrs, context) : undefined, - protocol: __expectString(output.protocol), - state: __expectString(output.state), - toPort: __expectInt32(output.toPort), - } as any; -}; +// de_InstancePortState omitted. -/** - * deserializeAws_json1_1InstancePortStateList - */ -const de_InstancePortStateList = (output: any, context: __SerdeContext): InstancePortState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstancePortState(entry, context); - }); - return retVal; -}; +// de_InstancePortStateList omitted. /** * deserializeAws_json1_1InstanceSnapshot */ const de_InstanceSnapshot = (output: any, context: __SerdeContext): InstanceSnapshot => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - fromAttachedDisks: output.fromAttachedDisks != null ? de_DiskList(output.fromAttachedDisks, context) : undefined, - fromBlueprintId: __expectString(output.fromBlueprintId), - fromBundleId: __expectString(output.fromBundleId), - fromInstanceArn: __expectString(output.fromInstanceArn), - fromInstanceName: __expectString(output.fromInstanceName), - isFromAutoSnapshot: __expectBoolean(output.isFromAutoSnapshot), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - progress: __expectString(output.progress), - resourceType: __expectString(output.resourceType), - sizeInGb: __expectInt32(output.sizeInGb), - state: __expectString(output.state), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InstanceSnapshotInfo - */ -const de_InstanceSnapshotInfo = (output: any, context: __SerdeContext): InstanceSnapshotInfo => { - return { - fromBlueprintId: __expectString(output.fromBlueprintId), - fromBundleId: __expectString(output.fromBundleId), - fromDiskInfo: output.fromDiskInfo != null ? de_DiskInfoList(output.fromDiskInfo, context) : undefined, - } as any; -}; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fromAttachedDisks: (_: any) => de_DiskList(_, context), + fromBlueprintId: __expectString, + fromBundleId: __expectString, + fromInstanceArn: __expectString, + fromInstanceName: __expectString, + isFromAutoSnapshot: __expectBoolean, + location: _json, + name: __expectString, + progress: __expectString, + resourceType: __expectString, + sizeInGb: __expectInt32, + state: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; +}; + +// de_InstanceSnapshotInfo omitted. /** * deserializeAws_json1_1InstanceSnapshotList @@ -18522,418 +15547,189 @@ const de_InstanceSnapshotList = (output: any, context: __SerdeContext): Instance const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstanceSnapshot(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InstanceState - */ -const de_InstanceState = (output: any, context: __SerdeContext): InstanceState => { - return { - code: __expectInt32(output.code), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; -}; - -/** - * deserializeAws_json1_1Ipv6AddressList - */ -const de_Ipv6AddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IsVpcPeeredResult - */ -const de_IsVpcPeeredResult = (output: any, context: __SerdeContext): IsVpcPeeredResult => { - return { - isPeered: __expectBoolean(output.isPeered), - } as any; -}; - -/** - * deserializeAws_json1_1KeyPair - */ -const de_KeyPair = (output: any, context: __SerdeContext): KeyPair => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - fingerprint: __expectString(output.fingerprint), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1KeyPairList - */ -const de_KeyPairList = (output: any, context: __SerdeContext): KeyPair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeyPair(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LightsailDistribution - */ -const de_LightsailDistribution = (output: any, context: __SerdeContext): LightsailDistribution => { - return { - ableToUpdateBundle: __expectBoolean(output.ableToUpdateBundle), - alternativeDomainNames: - output.alternativeDomainNames != null ? de_StringList(output.alternativeDomainNames, context) : undefined, - arn: __expectString(output.arn), - bundleId: __expectString(output.bundleId), - cacheBehaviorSettings: - output.cacheBehaviorSettings != null ? de_CacheSettings(output.cacheBehaviorSettings, context) : undefined, - cacheBehaviors: output.cacheBehaviors != null ? de_CacheBehaviorList(output.cacheBehaviors, context) : undefined, - certificateName: __expectString(output.certificateName), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - defaultCacheBehavior: - output.defaultCacheBehavior != null ? de_CacheBehavior(output.defaultCacheBehavior, context) : undefined, - domainName: __expectString(output.domainName), - ipAddressType: __expectString(output.ipAddressType), - isEnabled: __expectBoolean(output.isEnabled), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - origin: output.origin != null ? de_Origin(output.origin, context) : undefined, - originPublicDNS: __expectString(output.originPublicDNS), - resourceType: __expectString(output.resourceType), - status: __expectString(output.status), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LoadBalancer - */ -const de_LoadBalancer = (output: any, context: __SerdeContext): LoadBalancer => { - return { - arn: __expectString(output.arn), - configurationOptions: - output.configurationOptions != null - ? de_LoadBalancerConfigurationOptions(output.configurationOptions, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - dnsName: __expectString(output.dnsName), - healthCheckPath: __expectString(output.healthCheckPath), - httpsRedirectionEnabled: __expectBoolean(output.httpsRedirectionEnabled), - instanceHealthSummary: - output.instanceHealthSummary != null - ? de_InstanceHealthSummaryList(output.instanceHealthSummary, context) - : undefined, - instancePort: __expectInt32(output.instancePort), - ipAddressType: __expectString(output.ipAddressType), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - protocol: __expectString(output.protocol), - publicPorts: output.publicPorts != null ? de_PortList(output.publicPorts, context) : undefined, - resourceType: __expectString(output.resourceType), - state: __expectString(output.state), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - tlsCertificateSummaries: - output.tlsCertificateSummaries != null - ? de_LoadBalancerTlsCertificateSummaryList(output.tlsCertificateSummaries, context) - : undefined, - tlsPolicyName: __expectString(output.tlsPolicyName), - } as any; -}; - -/** - * deserializeAws_json1_1LoadBalancerConfigurationOptions - */ -const de_LoadBalancerConfigurationOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [LoadBalancerAttributeName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1LoadBalancerList - */ -const de_LoadBalancerList = (output: any, context: __SerdeContext): LoadBalancer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancer(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LoadBalancerTlsCertificate - */ -const de_LoadBalancerTlsCertificate = (output: any, context: __SerdeContext): LoadBalancerTlsCertificate => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - domainName: __expectString(output.domainName), - domainValidationRecords: - output.domainValidationRecords != null - ? de_LoadBalancerTlsCertificateDomainValidationRecordList(output.domainValidationRecords, context) - : undefined, - failureReason: __expectString(output.failureReason), - isAttached: __expectBoolean(output.isAttached), - issuedAt: - output.issuedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.issuedAt))) : undefined, - issuer: __expectString(output.issuer), - keyAlgorithm: __expectString(output.keyAlgorithm), - loadBalancerName: __expectString(output.loadBalancerName), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - notAfter: - output.notAfter != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notAfter))) : undefined, - notBefore: - output.notBefore != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notBefore))) : undefined, - renewalSummary: - output.renewalSummary != null - ? de_LoadBalancerTlsCertificateRenewalSummary(output.renewalSummary, context) - : undefined, - resourceType: __expectString(output.resourceType), - revocationReason: __expectString(output.revocationReason), - revokedAt: - output.revokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revokedAt))) : undefined, - serial: __expectString(output.serial), - signatureAlgorithm: __expectString(output.signatureAlgorithm), - status: __expectString(output.status), - subject: __expectString(output.subject), - subjectAlternativeNames: - output.subjectAlternativeNames != null ? de_StringList(output.subjectAlternativeNames, context) : undefined, - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LoadBalancerTlsCertificateDnsRecordCreationState - */ -const de_LoadBalancerTlsCertificateDnsRecordCreationState = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateDnsRecordCreationState => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_InstanceState omitted. -/** - * deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationOption - */ -const de_LoadBalancerTlsCertificateDomainValidationOption = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateDomainValidationOption => { - return { - domainName: __expectString(output.domainName), - validationStatus: __expectString(output.validationStatus), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationOptionList - */ -const de_LoadBalancerTlsCertificateDomainValidationOptionList = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateDomainValidationOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancerTlsCertificateDomainValidationOption(entry, context); - }); - return retVal; -}; +// de_Ipv6AddressList omitted. -/** - * deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationRecord - */ -const de_LoadBalancerTlsCertificateDomainValidationRecord = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateDomainValidationRecord => { - return { - dnsRecordCreationState: - output.dnsRecordCreationState != null - ? de_LoadBalancerTlsCertificateDnsRecordCreationState(output.dnsRecordCreationState, context) - : undefined, - domainName: __expectString(output.domainName), - name: __expectString(output.name), - type: __expectString(output.type), - validationStatus: __expectString(output.validationStatus), - value: __expectString(output.value), - } as any; -}; +// de_IsVpcPeeredResult omitted. /** - * deserializeAws_json1_1LoadBalancerTlsCertificateDomainValidationRecordList - */ -const de_LoadBalancerTlsCertificateDomainValidationRecordList = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateDomainValidationRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancerTlsCertificateDomainValidationRecord(entry, context); - }); - return retVal; + * deserializeAws_json1_1KeyPair + */ +const de_KeyPair = (output: any, context: __SerdeContext): KeyPair => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fingerprint: __expectString, + location: _json, + name: __expectString, + resourceType: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; }; /** - * deserializeAws_json1_1LoadBalancerTlsCertificateList + * deserializeAws_json1_1KeyPairList */ -const de_LoadBalancerTlsCertificateList = (output: any, context: __SerdeContext): LoadBalancerTlsCertificate[] => { +const de_KeyPairList = (output: any, context: __SerdeContext): KeyPair[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancerTlsCertificate(entry, context); + return de_KeyPair(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1LoadBalancerTlsCertificateRenewalSummary + * deserializeAws_json1_1LightsailDistribution */ -const de_LoadBalancerTlsCertificateRenewalSummary = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateRenewalSummary => { - return { - domainValidationOptions: - output.domainValidationOptions != null - ? de_LoadBalancerTlsCertificateDomainValidationOptionList(output.domainValidationOptions, context) - : undefined, - renewalStatus: __expectString(output.renewalStatus), - } as any; +const de_LightsailDistribution = (output: any, context: __SerdeContext): LightsailDistribution => { + return take(output, { + ableToUpdateBundle: __expectBoolean, + alternativeDomainNames: _json, + arn: __expectString, + bundleId: __expectString, + cacheBehaviorSettings: _json, + cacheBehaviors: _json, + certificateName: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultCacheBehavior: _json, + domainName: __expectString, + ipAddressType: __expectString, + isEnabled: __expectBoolean, + location: _json, + name: __expectString, + origin: _json, + originPublicDNS: __expectString, + resourceType: __expectString, + status: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; }; /** - * deserializeAws_json1_1LoadBalancerTlsCertificateSummary + * deserializeAws_json1_1LoadBalancer */ -const de_LoadBalancerTlsCertificateSummary = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateSummary => { - return { - isAttached: __expectBoolean(output.isAttached), - name: __expectString(output.name), - } as any; -}; +const de_LoadBalancer = (output: any, context: __SerdeContext): LoadBalancer => { + return take(output, { + arn: __expectString, + configurationOptions: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dnsName: __expectString, + healthCheckPath: __expectString, + httpsRedirectionEnabled: __expectBoolean, + instanceHealthSummary: _json, + instancePort: __expectInt32, + ipAddressType: __expectString, + location: _json, + name: __expectString, + protocol: __expectString, + publicPorts: _json, + resourceType: __expectString, + state: __expectString, + supportCode: __expectString, + tags: _json, + tlsCertificateSummaries: _json, + tlsPolicyName: __expectString, + }) as any; +}; + +// de_LoadBalancerConfigurationOptions omitted. /** - * deserializeAws_json1_1LoadBalancerTlsCertificateSummaryList + * deserializeAws_json1_1LoadBalancerList */ -const de_LoadBalancerTlsCertificateSummaryList = ( - output: any, - context: __SerdeContext -): LoadBalancerTlsCertificateSummary[] => { +const de_LoadBalancerList = (output: any, context: __SerdeContext): LoadBalancer[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancerTlsCertificateSummary(entry, context); + return de_LoadBalancer(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1LoadBalancerTlsPolicy + * deserializeAws_json1_1LoadBalancerTlsCertificate */ -const de_LoadBalancerTlsPolicy = (output: any, context: __SerdeContext): LoadBalancerTlsPolicy => { - return { - ciphers: output.ciphers != null ? de_StringList(output.ciphers, context) : undefined, - description: __expectString(output.description), - isDefault: __expectBoolean(output.isDefault), - name: __expectString(output.name), - protocols: output.protocols != null ? de_StringList(output.protocols, context) : undefined, - } as any; -}; +const de_LoadBalancerTlsCertificate = (output: any, context: __SerdeContext): LoadBalancerTlsCertificate => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + domainName: __expectString, + domainValidationRecords: _json, + failureReason: __expectString, + isAttached: __expectBoolean, + issuedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + issuer: __expectString, + keyAlgorithm: __expectString, + loadBalancerName: __expectString, + location: _json, + name: __expectString, + notAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + renewalSummary: _json, + resourceType: __expectString, + revocationReason: __expectString, + revokedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + serial: __expectString, + signatureAlgorithm: __expectString, + status: __expectString, + subject: __expectString, + subjectAlternativeNames: _json, + supportCode: __expectString, + tags: _json, + }) as any; +}; + +// de_LoadBalancerTlsCertificateDnsRecordCreationState omitted. + +// de_LoadBalancerTlsCertificateDomainValidationOption omitted. + +// de_LoadBalancerTlsCertificateDomainValidationOptionList omitted. + +// de_LoadBalancerTlsCertificateDomainValidationRecord omitted. + +// de_LoadBalancerTlsCertificateDomainValidationRecordList omitted. /** - * deserializeAws_json1_1LoadBalancerTlsPolicyList + * deserializeAws_json1_1LoadBalancerTlsCertificateList */ -const de_LoadBalancerTlsPolicyList = (output: any, context: __SerdeContext): LoadBalancerTlsPolicy[] => { +const de_LoadBalancerTlsCertificateList = (output: any, context: __SerdeContext): LoadBalancerTlsCertificate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoadBalancerTlsPolicy(entry, context); + return de_LoadBalancerTlsCertificate(entry, context); }); return retVal; }; +// de_LoadBalancerTlsCertificateRenewalSummary omitted. + +// de_LoadBalancerTlsCertificateSummary omitted. + +// de_LoadBalancerTlsCertificateSummaryList omitted. + +// de_LoadBalancerTlsPolicy omitted. + +// de_LoadBalancerTlsPolicyList omitted. + /** * deserializeAws_json1_1LogEvent */ const de_LogEvent = (output: any, context: __SerdeContext): LogEvent => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - message: __expectString(output.message), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + message: __expectString, + }) as any; }; /** @@ -18943,9 +15739,6 @@ const de_LogEventList = (output: any, context: __SerdeContext): LogEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LogEvent(entry, context); }); return retVal; @@ -18955,16 +15748,15 @@ const de_LogEventList = (output: any, context: __SerdeContext): LogEvent[] => { * deserializeAws_json1_1MetricDatapoint */ const de_MetricDatapoint = (output: any, context: __SerdeContext): MetricDatapoint => { - return { - average: __limitedParseDouble(output.average), - maximum: __limitedParseDouble(output.maximum), - minimum: __limitedParseDouble(output.minimum), - sampleCount: __limitedParseDouble(output.sampleCount), - sum: __limitedParseDouble(output.sum), - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - unit: __expectString(output.unit), - } as any; + return take(output, { + average: __limitedParseDouble, + maximum: __limitedParseDouble, + minimum: __limitedParseDouble, + sampleCount: __limitedParseDouble, + sum: __limitedParseDouble, + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + unit: __expectString, + }) as any; }; /** @@ -18974,116 +15766,52 @@ const de_MetricDatapointList = (output: any, context: __SerdeContext): MetricDat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricDatapoint(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1MonitoredResourceInfo - */ -const de_MonitoredResourceInfo = (output: any, context: __SerdeContext): MonitoredResourceInfo => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_MonitoredResourceInfo omitted. -/** - * deserializeAws_json1_1MonthlyTransfer - */ -const de_MonthlyTransfer = (output: any, context: __SerdeContext): MonthlyTransfer => { - return { - gbPerMonthAllocated: __expectInt32(output.gbPerMonthAllocated), - } as any; -}; +// de_MonthlyTransfer omitted. -/** - * deserializeAws_json1_1NameServersUpdateState - */ -const de_NameServersUpdateState = (output: any, context: __SerdeContext): NameServersUpdateState => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_NameServersUpdateState omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; -}; +// de_NotFoundException omitted. -/** - * deserializeAws_json1_1NotificationTriggerList - */ -const de_NotificationTriggerList = (output: any, context: __SerdeContext): (AlarmState | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotificationTriggerList omitted. /** * deserializeAws_json1_1OpenInstancePublicPortsResult */ const de_OpenInstancePublicPortsResult = (output: any, context: __SerdeContext): OpenInstancePublicPortsResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1Operation */ const de_Operation = (output: any, context: __SerdeContext): Operation => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - errorCode: __expectString(output.errorCode), - errorDetails: __expectString(output.errorDetails), - id: __expectString(output.id), - isTerminal: __expectBoolean(output.isTerminal), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - operationDetails: __expectString(output.operationDetails), - operationType: __expectString(output.operationType), - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - status: __expectString(output.status), - statusChangedAt: - output.statusChangedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.statusChangedAt))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1OperationFailureException - */ -const de_OperationFailureException = (output: any, context: __SerdeContext): OperationFailureException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + errorCode: __expectString, + errorDetails: __expectString, + id: __expectString, + isTerminal: __expectBoolean, + location: _json, + operationDetails: __expectString, + operationType: __expectString, + resourceName: __expectString, + resourceType: __expectString, + status: __expectString, + statusChangedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_OperationFailureException omitted. + /** * deserializeAws_json1_1OperationList */ @@ -19091,72 +15819,35 @@ const de_OperationList = (output: any, context: __SerdeContext): Operation[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Operation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Origin - */ -const de_Origin = (output: any, context: __SerdeContext): Origin => { - return { - name: __expectString(output.name), - protocolPolicy: __expectString(output.protocolPolicy), - regionName: __expectString(output.regionName), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_Origin omitted. -/** - * deserializeAws_json1_1PartnerIdList - */ -const de_PartnerIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PartnerIdList omitted. -/** - * deserializeAws_json1_1PasswordData - */ -const de_PasswordData = (output: any, context: __SerdeContext): PasswordData => { - return { - ciphertext: __expectString(output.ciphertext), - keyPairName: __expectString(output.keyPairName), - } as any; -}; +// de_PasswordData omitted. /** * deserializeAws_json1_1PeerVpcResult */ const de_PeerVpcResult = (output: any, context: __SerdeContext): PeerVpcResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1PendingMaintenanceAction */ const de_PendingMaintenanceAction = (output: any, context: __SerdeContext): PendingMaintenanceAction => { - return { - action: __expectString(output.action), - currentApplyDate: - output.currentApplyDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.currentApplyDate))) - : undefined, - description: __expectString(output.description), - } as any; + return take(output, { + action: __expectString, + currentApplyDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + }) as any; }; /** @@ -19166,275 +15857,127 @@ const de_PendingMaintenanceActionList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PendingMaintenanceAction(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PendingModifiedRelationalDatabaseValues - */ -const de_PendingModifiedRelationalDatabaseValues = ( - output: any, - context: __SerdeContext -): PendingModifiedRelationalDatabaseValues => { - return { - backupRetentionEnabled: __expectBoolean(output.backupRetentionEnabled), - engineVersion: __expectString(output.engineVersion), - masterUserPassword: __expectString(output.masterUserPassword), - } as any; -}; +// de_PendingModifiedRelationalDatabaseValues omitted. -/** - * deserializeAws_json1_1PortList - */ -const de_PortList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_PortList omitted. -/** - * deserializeAws_json1_1PortMap - */ -const de_PortMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_PortMap omitted. -/** - * deserializeAws_json1_1PrivateRegistryAccess - */ -const de_PrivateRegistryAccess = (output: any, context: __SerdeContext): PrivateRegistryAccess => { - return { - ecrImagePullerRole: - output.ecrImagePullerRole != null - ? de_ContainerServiceECRImagePullerRole(output.ecrImagePullerRole, context) - : undefined, - } as any; -}; +// de_PrivateRegistryAccess omitted. /** * deserializeAws_json1_1PutAlarmResult */ const de_PutAlarmResult = (output: any, context: __SerdeContext): PutAlarmResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1PutInstancePublicPortsResult */ const de_PutInstancePublicPortsResult = (output: any, context: __SerdeContext): PutInstancePublicPortsResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; -/** - * deserializeAws_json1_1QueryStringObject - */ -const de_QueryStringObject = (output: any, context: __SerdeContext): QueryStringObject => { - return { - option: __expectBoolean(output.option), - queryStringsAllowList: - output.queryStringsAllowList != null ? de_StringList(output.queryStringsAllowList, context) : undefined, - } as any; -}; +// de_QueryStringObject omitted. -/** - * deserializeAws_json1_1R53HostedZoneDeletionState - */ -const de_R53HostedZoneDeletionState = (output: any, context: __SerdeContext): R53HostedZoneDeletionState => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_R53HostedZoneDeletionState omitted. /** * deserializeAws_json1_1RebootInstanceResult */ const de_RebootInstanceResult = (output: any, context: __SerdeContext): RebootInstanceResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1RebootRelationalDatabaseResult */ const de_RebootRelationalDatabaseResult = (output: any, context: __SerdeContext): RebootRelationalDatabaseResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Region - */ -const de_Region = (output: any, context: __SerdeContext): Region => { - return { - availabilityZones: - output.availabilityZones != null ? de_AvailabilityZoneList(output.availabilityZones, context) : undefined, - continentCode: __expectString(output.continentCode), - description: __expectString(output.description), - displayName: __expectString(output.displayName), - name: __expectString(output.name), - relationalDatabaseAvailabilityZones: - output.relationalDatabaseAvailabilityZones != null - ? de_AvailabilityZoneList(output.relationalDatabaseAvailabilityZones, context) - : undefined, - } as any; -}; +// de_Region omitted. -/** - * deserializeAws_json1_1RegionList - */ -const de_RegionList = (output: any, context: __SerdeContext): Region[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Region(entry, context); - }); - return retVal; -}; +// de_RegionList omitted. /** * deserializeAws_json1_1RegisterContainerImageResult */ const de_RegisterContainerImageResult = (output: any, context: __SerdeContext): RegisterContainerImageResult => { - return { - containerImage: output.containerImage != null ? de_ContainerImage(output.containerImage, context) : undefined, - } as any; + return take(output, { + containerImage: (_: any) => de_ContainerImage(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RegisteredDomainDelegationInfo - */ -const de_RegisteredDomainDelegationInfo = (output: any, context: __SerdeContext): RegisteredDomainDelegationInfo => { - return { - nameServersUpdateState: - output.nameServersUpdateState != null - ? de_NameServersUpdateState(output.nameServersUpdateState, context) - : undefined, - r53HostedZoneDeletionState: - output.r53HostedZoneDeletionState != null - ? de_R53HostedZoneDeletionState(output.r53HostedZoneDeletionState, context) - : undefined, - } as any; -}; +// de_RegisteredDomainDelegationInfo omitted. /** * deserializeAws_json1_1RelationalDatabase */ const de_RelationalDatabase = (output: any, context: __SerdeContext): RelationalDatabase => { - return { - arn: __expectString(output.arn), - backupRetentionEnabled: __expectBoolean(output.backupRetentionEnabled), - caCertificateIdentifier: __expectString(output.caCertificateIdentifier), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - engine: __expectString(output.engine), - engineVersion: __expectString(output.engineVersion), - hardware: output.hardware != null ? de_RelationalDatabaseHardware(output.hardware, context) : undefined, - latestRestorableTime: - output.latestRestorableTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.latestRestorableTime))) - : undefined, - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - masterDatabaseName: __expectString(output.masterDatabaseName), - masterEndpoint: - output.masterEndpoint != null ? de_RelationalDatabaseEndpoint(output.masterEndpoint, context) : undefined, - masterUsername: __expectString(output.masterUsername), - name: __expectString(output.name), - parameterApplyStatus: __expectString(output.parameterApplyStatus), - pendingMaintenanceActions: - output.pendingMaintenanceActions != null - ? de_PendingMaintenanceActionList(output.pendingMaintenanceActions, context) - : undefined, - pendingModifiedValues: - output.pendingModifiedValues != null - ? de_PendingModifiedRelationalDatabaseValues(output.pendingModifiedValues, context) - : undefined, - preferredBackupWindow: __expectString(output.preferredBackupWindow), - preferredMaintenanceWindow: __expectString(output.preferredMaintenanceWindow), - publiclyAccessible: __expectBoolean(output.publiclyAccessible), - relationalDatabaseBlueprintId: __expectString(output.relationalDatabaseBlueprintId), - relationalDatabaseBundleId: __expectString(output.relationalDatabaseBundleId), - resourceType: __expectString(output.resourceType), - secondaryAvailabilityZone: __expectString(output.secondaryAvailabilityZone), - state: __expectString(output.state), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RelationalDatabaseBlueprint - */ -const de_RelationalDatabaseBlueprint = (output: any, context: __SerdeContext): RelationalDatabaseBlueprint => { - return { - blueprintId: __expectString(output.blueprintId), - engine: __expectString(output.engine), - engineDescription: __expectString(output.engineDescription), - engineVersion: __expectString(output.engineVersion), - engineVersionDescription: __expectString(output.engineVersionDescription), - isEngineDefault: __expectBoolean(output.isEngineDefault), - } as any; -}; - -/** - * deserializeAws_json1_1RelationalDatabaseBlueprintList - */ -const de_RelationalDatabaseBlueprintList = (output: any, context: __SerdeContext): RelationalDatabaseBlueprint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelationalDatabaseBlueprint(entry, context); - }); - return retVal; -}; + return take(output, { + arn: __expectString, + backupRetentionEnabled: __expectBoolean, + caCertificateIdentifier: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + engine: __expectString, + engineVersion: __expectString, + hardware: (_: any) => de_RelationalDatabaseHardware(_, context), + latestRestorableTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + location: _json, + masterDatabaseName: __expectString, + masterEndpoint: _json, + masterUsername: __expectString, + name: __expectString, + parameterApplyStatus: __expectString, + pendingMaintenanceActions: (_: any) => de_PendingMaintenanceActionList(_, context), + pendingModifiedValues: _json, + preferredBackupWindow: __expectString, + preferredMaintenanceWindow: __expectString, + publiclyAccessible: __expectBoolean, + relationalDatabaseBlueprintId: __expectString, + relationalDatabaseBundleId: __expectString, + resourceType: __expectString, + secondaryAvailabilityZone: __expectString, + state: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; +}; + +// de_RelationalDatabaseBlueprint omitted. + +// de_RelationalDatabaseBlueprintList omitted. /** * deserializeAws_json1_1RelationalDatabaseBundle */ const de_RelationalDatabaseBundle = (output: any, context: __SerdeContext): RelationalDatabaseBundle => { - return { - bundleId: __expectString(output.bundleId), - cpuCount: __expectInt32(output.cpuCount), - diskSizeInGb: __expectInt32(output.diskSizeInGb), - isActive: __expectBoolean(output.isActive), - isEncrypted: __expectBoolean(output.isEncrypted), - name: __expectString(output.name), - price: __limitedParseFloat32(output.price), - ramSizeInGb: __limitedParseFloat32(output.ramSizeInGb), - transferPerMonthInGb: __expectInt32(output.transferPerMonthInGb), - } as any; + return take(output, { + bundleId: __expectString, + cpuCount: __expectInt32, + diskSizeInGb: __expectInt32, + isActive: __expectBoolean, + isEncrypted: __expectBoolean, + name: __expectString, + price: __limitedParseFloat32, + ramSizeInGb: __limitedParseFloat32, + transferPerMonthInGb: __expectInt32, + }) as any; }; /** @@ -19444,35 +15987,23 @@ const de_RelationalDatabaseBundleList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RelationalDatabaseBundle(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RelationalDatabaseEndpoint - */ -const de_RelationalDatabaseEndpoint = (output: any, context: __SerdeContext): RelationalDatabaseEndpoint => { - return { - address: __expectString(output.address), - port: __expectInt32(output.port), - } as any; -}; +// de_RelationalDatabaseEndpoint omitted. /** * deserializeAws_json1_1RelationalDatabaseEvent */ const de_RelationalDatabaseEvent = (output: any, context: __SerdeContext): RelationalDatabaseEvent => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - eventCategories: output.eventCategories != null ? de_StringList(output.eventCategories, context) : undefined, - message: __expectString(output.message), - resource: __expectString(output.resource), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventCategories: _json, + message: __expectString, + resource: __expectString, + }) as any; }; /** @@ -19482,9 +16013,6 @@ const de_RelationalDatabaseEventList = (output: any, context: __SerdeContext): R const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RelationalDatabaseEvent(entry, context); }); return retVal; @@ -19494,11 +16022,11 @@ const de_RelationalDatabaseEventList = (output: any, context: __SerdeContext): R * deserializeAws_json1_1RelationalDatabaseHardware */ const de_RelationalDatabaseHardware = (output: any, context: __SerdeContext): RelationalDatabaseHardware => { - return { - cpuCount: __expectInt32(output.cpuCount), - diskSizeInGb: __expectInt32(output.diskSizeInGb), - ramSizeInGb: __limitedParseFloat32(output.ramSizeInGb), - } as any; + return take(output, { + cpuCount: __expectInt32, + diskSizeInGb: __expectInt32, + ramSizeInGb: __limitedParseFloat32, + }) as any; }; /** @@ -19508,67 +16036,36 @@ const de_RelationalDatabaseList = (output: any, context: __SerdeContext): Relati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RelationalDatabase(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RelationalDatabaseParameter - */ -const de_RelationalDatabaseParameter = (output: any, context: __SerdeContext): RelationalDatabaseParameter => { - return { - allowedValues: __expectString(output.allowedValues), - applyMethod: __expectString(output.applyMethod), - applyType: __expectString(output.applyType), - dataType: __expectString(output.dataType), - description: __expectString(output.description), - isModifiable: __expectBoolean(output.isModifiable), - parameterName: __expectString(output.parameterName), - parameterValue: __expectString(output.parameterValue), - } as any; -}; +// de_RelationalDatabaseParameter omitted. -/** - * deserializeAws_json1_1RelationalDatabaseParameterList - */ -const de_RelationalDatabaseParameterList = (output: any, context: __SerdeContext): RelationalDatabaseParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelationalDatabaseParameter(entry, context); - }); - return retVal; -}; +// de_RelationalDatabaseParameterList omitted. /** * deserializeAws_json1_1RelationalDatabaseSnapshot */ const de_RelationalDatabaseSnapshot = (output: any, context: __SerdeContext): RelationalDatabaseSnapshot => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - engine: __expectString(output.engine), - engineVersion: __expectString(output.engineVersion), - fromRelationalDatabaseArn: __expectString(output.fromRelationalDatabaseArn), - fromRelationalDatabaseBlueprintId: __expectString(output.fromRelationalDatabaseBlueprintId), - fromRelationalDatabaseBundleId: __expectString(output.fromRelationalDatabaseBundleId), - fromRelationalDatabaseName: __expectString(output.fromRelationalDatabaseName), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - sizeInGb: __expectInt32(output.sizeInGb), - state: __expectString(output.state), - supportCode: __expectString(output.supportCode), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + engine: __expectString, + engineVersion: __expectString, + fromRelationalDatabaseArn: __expectString, + fromRelationalDatabaseBlueprintId: __expectString, + fromRelationalDatabaseBundleId: __expectString, + fromRelationalDatabaseName: __expectString, + location: _json, + name: __expectString, + resourceType: __expectString, + sizeInGb: __expectInt32, + state: __expectString, + supportCode: __expectString, + tags: _json, + }) as any; }; /** @@ -19578,9 +16075,6 @@ const de_RelationalDatabaseSnapshotList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RelationalDatabaseSnapshot(entry, context); }); return retVal; @@ -19590,84 +16084,52 @@ const de_RelationalDatabaseSnapshotList = (output: any, context: __SerdeContext) * deserializeAws_json1_1ReleaseStaticIpResult */ const de_ReleaseStaticIpResult = (output: any, context: __SerdeContext): ReleaseStaticIpResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1RenewalSummary */ const de_RenewalSummary = (output: any, context: __SerdeContext): RenewalSummary => { - return { - domainValidationRecords: - output.domainValidationRecords != null - ? de_DomainValidationRecordList(output.domainValidationRecords, context) - : undefined, - renewalStatus: __expectString(output.renewalStatus), - renewalStatusReason: __expectString(output.renewalStatusReason), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + domainValidationRecords: _json, + renewalStatus: __expectString, + renewalStatusReason: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1ResetDistributionCacheResult */ const de_ResetDistributionCacheResult = (output: any, context: __SerdeContext): ResetDistributionCacheResult => { - return { - createTime: - output.createTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createTime))) : undefined, - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + operation: (_: any) => de_Operation(_, context), + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1ResourceBudgetEstimate */ const de_ResourceBudgetEstimate = (output: any, context: __SerdeContext): ResourceBudgetEstimate => { - return { - costEstimates: output.costEstimates != null ? de_CostEstimates(output.costEstimates, context) : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; + return take(output, { + costEstimates: (_: any) => de_CostEstimates(_, context), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceName: __expectString, + resourceType: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1ResourceLocation - */ -const de_ResourceLocation = (output: any, context: __SerdeContext): ResourceLocation => { - return { - availabilityZone: __expectString(output.availabilityZone), - regionName: __expectString(output.regionName), - } as any; -}; +// de_ResourceLocation omitted. -/** - * deserializeAws_json1_1ResourceReceivingAccess - */ -const de_ResourceReceivingAccess = (output: any, context: __SerdeContext): ResourceReceivingAccess => { - return { - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ResourceReceivingAccess omitted. -/** - * deserializeAws_json1_1ResourceRecord - */ -const de_ResourceRecord = (output: any, context: __SerdeContext): ResourceRecord => { - return { - name: __expectString(output.name), - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// de_ResourceRecord omitted. /** * deserializeAws_json1_1ResourcesBudgetEstimate @@ -19676,9 +16138,6 @@ const de_ResourcesBudgetEstimate = (output: any, context: __SerdeContext): Resou const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceBudgetEstimate(entry, context); }); return retVal; @@ -19691,56 +16150,24 @@ const de_SendContactMethodVerificationResult = ( output: any, context: __SerdeContext ): SendContactMethodVerificationResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ServiceException - */ -const de_ServiceException = (output: any, context: __SerdeContext): ServiceException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; -}; +// de_ServiceException omitted. -/** - * deserializeAws_json1_1Session - */ -const de_Session = (output: any, context: __SerdeContext): Session => { - return { - isPrimary: __expectBoolean(output.isPrimary), - name: __expectString(output.name), - url: __expectString(output.url), - } as any; -}; +// de_Session omitted. -/** - * deserializeAws_json1_1Sessions - */ -const de_Sessions = (output: any, context: __SerdeContext): Session[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Session(entry, context); - }); - return retVal; -}; +// de_Sessions omitted. /** * deserializeAws_json1_1SetIpAddressTypeResult */ const de_SetIpAddressTypeResult = (output: any, context: __SerdeContext): SetIpAddressTypeResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -19750,54 +16177,53 @@ const de_SetResourceAccessForBucketResult = ( output: any, context: __SerdeContext ): SetResourceAccessForBucketResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1StartGUISessionResult */ const de_StartGUISessionResult = (output: any, context: __SerdeContext): StartGUISessionResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1StartInstanceResult */ const de_StartInstanceResult = (output: any, context: __SerdeContext): StartInstanceResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1StartRelationalDatabaseResult */ const de_StartRelationalDatabaseResult = (output: any, context: __SerdeContext): StartRelationalDatabaseResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1StaticIp */ const de_StaticIp = (output: any, context: __SerdeContext): StaticIp => { - return { - arn: __expectString(output.arn), - attachedTo: __expectString(output.attachedTo), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - ipAddress: __expectString(output.ipAddress), - isAttached: __expectBoolean(output.isAttached), - location: output.location != null ? de_ResourceLocation(output.location, context) : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - supportCode: __expectString(output.supportCode), - } as any; + return take(output, { + arn: __expectString, + attachedTo: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ipAddress: __expectString, + isAttached: __expectBoolean, + location: _json, + name: __expectString, + resourceType: __expectString, + supportCode: __expectString, + }) as any; }; /** @@ -19807,9 +16233,6 @@ const de_StaticIpList = (output: any, context: __SerdeContext): StaticIp[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StaticIp(entry, context); }); return retVal; @@ -19819,196 +16242,138 @@ const de_StaticIpList = (output: any, context: __SerdeContext): StaticIp[] => { * deserializeAws_json1_1StopGUISessionResult */ const de_StopGUISessionResult = (output: any, context: __SerdeContext): StopGUISessionResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1StopInstanceResult */ const de_StopInstanceResult = (output: any, context: __SerdeContext): StopInstanceResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1StopRelationalDatabaseResult */ const de_StopRelationalDatabaseResult = (output: any, context: __SerdeContext): StopRelationalDatabaseResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1SubjectAlternativeNameList - */ -const de_SubjectAlternativeNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubjectAlternativeNameList omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_json1_1TagResourceResult */ const de_TagResourceResult = (output: any, context: __SerdeContext): TagResourceResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1TestAlarmResult */ const de_TestAlarmResult = (output: any, context: __SerdeContext): TestAlarmResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1TimePeriod */ const de_TimePeriod = (output: any, context: __SerdeContext): TimePeriod => { - return { - end: output.end != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.end))) : undefined, - start: output.start != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.start))) : undefined, - } as any; + return take(output, { + end: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + start: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1UnauthenticatedException - */ -const de_UnauthenticatedException = (output: any, context: __SerdeContext): UnauthenticatedException => { - return { - code: __expectString(output.code), - docs: __expectString(output.docs), - message: __expectString(output.message), - tip: __expectString(output.tip), - } as any; -}; +// de_UnauthenticatedException omitted. /** * deserializeAws_json1_1UnpeerVpcResult */ const de_UnpeerVpcResult = (output: any, context: __SerdeContext): UnpeerVpcResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1UntagResourceResult */ const de_UntagResourceResult = (output: any, context: __SerdeContext): UntagResourceResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateBucketBundleResult */ const de_UpdateBucketBundleResult = (output: any, context: __SerdeContext): UpdateBucketBundleResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateBucketResult */ const de_UpdateBucketResult = (output: any, context: __SerdeContext): UpdateBucketResult => { - return { - bucket: output.bucket != null ? de_Bucket(output.bucket, context) : undefined, - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + bucket: (_: any) => de_Bucket(_, context), + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateContainerServiceResult */ const de_UpdateContainerServiceResult = (output: any, context: __SerdeContext): UpdateContainerServiceResult => { - return { - containerService: - output.containerService != null ? de_ContainerService(output.containerService, context) : undefined, - } as any; + return take(output, { + containerService: (_: any) => de_ContainerService(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateDistributionBundleResult */ const de_UpdateDistributionBundleResult = (output: any, context: __SerdeContext): UpdateDistributionBundleResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateDistributionResult */ const de_UpdateDistributionResult = (output: any, context: __SerdeContext): UpdateDistributionResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateDomainEntryResult */ const de_UpdateDomainEntryResult = (output: any, context: __SerdeContext): UpdateDomainEntryResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -20018,9 +16383,9 @@ const de_UpdateInstanceMetadataOptionsResult = ( output: any, context: __SerdeContext ): UpdateInstanceMetadataOptionsResult => { - return { - operation: output.operation != null ? de_Operation(output.operation, context) : undefined, - } as any; + return take(output, { + operation: (_: any) => de_Operation(_, context), + }) as any; }; /** @@ -20030,9 +16395,9 @@ const de_UpdateLoadBalancerAttributeResult = ( output: any, context: __SerdeContext ): UpdateLoadBalancerAttributeResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** @@ -20042,18 +16407,18 @@ const de_UpdateRelationalDatabaseParametersResult = ( output: any, context: __SerdeContext ): UpdateRelationalDatabaseParametersResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateRelationalDatabaseResult */ const de_UpdateRelationalDatabaseResult = (output: any, context: __SerdeContext): UpdateRelationalDatabaseResult => { - return { - operations: output.operations != null ? de_OperationList(output.operations, context) : undefined, - } as any; + return take(output, { + operations: (_: any) => de_OperationList(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -20076,6 +16441,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-location/src/protocols/Aws_restJson1.ts b/clients/client-location/src/protocols/Aws_restJson1.ts index f22fc15c366d..da61e2ca0ce6 100644 --- a/clients/client-location/src/protocols/Aws_restJson1.ts +++ b/clients/client-location/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -13,11 +14,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -166,17 +168,11 @@ import { AccessDeniedException, ApiKeyFilter, ApiKeyRestrictions, - BatchDeleteDevicePositionHistoryError, - BatchDeleteGeofenceError, BatchEvaluateGeofencesError, - BatchGetDevicePositionError, - BatchItemError, - BatchPutGeofenceError, BatchPutGeofenceRequestEntry, BatchPutGeofenceSuccess, BatchUpdateDevicePositionError, CalculateRouteCarModeOptions, - CalculateRouteMatrixSummary, CalculateRouteSummary, CalculateRouteTruckModeOptions, Circle, @@ -202,9 +198,7 @@ import { PositionalAccuracy, ResourceNotFoundException, RouteMatrixEntry, - RouteMatrixEntryError, SearchForPositionResult, - SearchForSuggestionsResult, SearchForTextResult, SearchPlaceIndexForPositionSummary, SearchPlaceIndexForSuggestionsSummary, @@ -212,7 +206,6 @@ import { ServiceQuotaExceededException, Step, ThrottlingException, - TimeZone, TruckDimensions, TruckWeight, ValidationException, @@ -235,9 +228,11 @@ export const se_AssociateTrackerConsumerCommand = async ( "/tracking/v0/trackers/{TrackerName}/consumers"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.ConsumerArn != null && { ConsumerArn: input.ConsumerArn }), - }); + body = JSON.stringify( + take(input, { + ConsumerArn: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -272,9 +267,11 @@ export const se_BatchDeleteDevicePositionHistoryCommand = async ( "/tracking/v0/trackers/{TrackerName}/delete-positions"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.DeviceIds != null && { DeviceIds: se_DeviceIdsList(input.DeviceIds, context) }), - }); + body = JSON.stringify( + take(input, { + DeviceIds: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -316,9 +313,11 @@ export const se_BatchDeleteGeofenceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.GeofenceIds != null && { GeofenceIds: se_IdList(input.GeofenceIds, context) }), - }); + body = JSON.stringify( + take(input, { + GeofenceIds: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -360,11 +359,11 @@ export const se_BatchEvaluateGeofencesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DevicePositionUpdates != null && { - DevicePositionUpdates: se_DevicePositionUpdateList(input.DevicePositionUpdates, context), - }), - }); + body = JSON.stringify( + take(input, { + DevicePositionUpdates: (_) => se_DevicePositionUpdateList(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -399,9 +398,11 @@ export const se_BatchGetDevicePositionCommand = async ( "/tracking/v0/trackers/{TrackerName}/get-positions"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.DeviceIds != null && { DeviceIds: se_IdList(input.DeviceIds, context) }), - }); + body = JSON.stringify( + take(input, { + DeviceIds: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -443,9 +444,11 @@ export const se_BatchPutGeofenceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Entries != null && { Entries: se_BatchPutGeofenceRequestEntryList(input.Entries, context) }), - }); + body = JSON.stringify( + take(input, { + Entries: (_) => se_BatchPutGeofenceRequestEntryList(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -480,9 +483,11 @@ export const se_BatchUpdateDevicePositionCommand = async ( "/tracking/v0/trackers/{TrackerName}/positions"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.Updates != null && { Updates: se_DevicePositionUpdateList(input.Updates, context) }), - }); + body = JSON.stringify( + take(input, { + Updates: (_) => se_DevicePositionUpdateList(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -524,24 +529,20 @@ export const se_CalculateRouteCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CarModeOptions != null && { - CarModeOptions: se_CalculateRouteCarModeOptions(input.CarModeOptions, context), - }), - ...(input.DepartNow != null && { DepartNow: input.DepartNow }), - ...(input.DeparturePosition != null && { DeparturePosition: se_Position(input.DeparturePosition, context) }), - ...(input.DepartureTime != null && { DepartureTime: input.DepartureTime.toISOString().split(".")[0] + "Z" }), - ...(input.DestinationPosition != null && { DestinationPosition: se_Position(input.DestinationPosition, context) }), - ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }), - ...(input.IncludeLegGeometry != null && { IncludeLegGeometry: input.IncludeLegGeometry }), - ...(input.TravelMode != null && { TravelMode: input.TravelMode }), - ...(input.TruckModeOptions != null && { - TruckModeOptions: se_CalculateRouteTruckModeOptions(input.TruckModeOptions, context), - }), - ...(input.WaypointPositions != null && { - WaypointPositions: se_WaypointPositionList(input.WaypointPositions, context), - }), - }); + body = JSON.stringify( + take(input, { + CarModeOptions: (_) => _json(_), + DepartNow: [], + DeparturePosition: (_) => se_Position(_, context), + DepartureTime: (_) => _.toISOString().split(".")[0] + "Z", + DestinationPosition: (_) => se_Position(_, context), + DistanceUnit: [], + IncludeLegGeometry: [], + TravelMode: [], + TruckModeOptions: (_) => se_CalculateRouteTruckModeOptions(_, context), + WaypointPositions: (_) => se_WaypointPositionList(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "routes." + resolvedHostname; @@ -583,22 +584,18 @@ export const se_CalculateRouteMatrixCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CarModeOptions != null && { - CarModeOptions: se_CalculateRouteCarModeOptions(input.CarModeOptions, context), - }), - ...(input.DepartNow != null && { DepartNow: input.DepartNow }), - ...(input.DeparturePositions != null && { DeparturePositions: se_PositionList(input.DeparturePositions, context) }), - ...(input.DepartureTime != null && { DepartureTime: input.DepartureTime.toISOString().split(".")[0] + "Z" }), - ...(input.DestinationPositions != null && { - DestinationPositions: se_PositionList(input.DestinationPositions, context), - }), - ...(input.DistanceUnit != null && { DistanceUnit: input.DistanceUnit }), - ...(input.TravelMode != null && { TravelMode: input.TravelMode }), - ...(input.TruckModeOptions != null && { - TruckModeOptions: se_CalculateRouteTruckModeOptions(input.TruckModeOptions, context), - }), - }); + body = JSON.stringify( + take(input, { + CarModeOptions: (_) => _json(_), + DepartNow: [], + DeparturePositions: (_) => se_PositionList(_, context), + DepartureTime: (_) => _.toISOString().split(".")[0] + "Z", + DestinationPositions: (_) => se_PositionList(_, context), + DistanceUnit: [], + TravelMode: [], + TruckModeOptions: (_) => se_CalculateRouteTruckModeOptions(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "routes." + resolvedHostname; @@ -631,14 +628,16 @@ export const se_CreateGeofenceCollectionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/geofencing/v0/collections"; let body: any; - body = JSON.stringify({ - ...(input.CollectionName != null && { CollectionName: input.CollectionName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + CollectionName: [], + Description: [], + KmsKeyId: [], + PricingPlan: [], + PricingPlanDataSource: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -670,14 +669,16 @@ export const se_CreateKeyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.ExpireTime != null && { ExpireTime: input.ExpireTime.toISOString().split(".")[0] + "Z" }), - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.NoExpiry != null && { NoExpiry: input.NoExpiry }), - ...(input.Restrictions != null && { Restrictions: se_ApiKeyRestrictions(input.Restrictions, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + ExpireTime: (_) => _.toISOString().split(".")[0] + "Z", + KeyName: [], + NoExpiry: [], + Restrictions: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "metadata." + resolvedHostname; @@ -709,13 +710,15 @@ export const se_CreateMapCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/maps"; let body: any; - body = JSON.stringify({ - ...(input.Configuration != null && { Configuration: se_MapConfiguration(input.Configuration, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.MapName != null && { MapName: input.MapName }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Configuration: (_) => _json(_), + Description: [], + MapName: [], + PricingPlan: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "maps." + resolvedHostname; @@ -747,16 +750,16 @@ export const se_CreatePlaceIndexCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/places/v0/indexes"; let body: any; - body = JSON.stringify({ - ...(input.DataSource != null && { DataSource: input.DataSource }), - ...(input.DataSourceConfiguration != null && { - DataSourceConfiguration: se_DataSourceConfiguration(input.DataSourceConfiguration, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DataSource: [], + DataSourceConfiguration: (_) => _json(_), + Description: [], + IndexName: [], + PricingPlan: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "places." + resolvedHostname; @@ -788,13 +791,15 @@ export const se_CreateRouteCalculatorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routes/v0/calculators"; let body: any; - body = JSON.stringify({ - ...(input.CalculatorName != null && { CalculatorName: input.CalculatorName }), - ...(input.DataSource != null && { DataSource: input.DataSource }), - ...(input.Description != null && { Description: input.Description }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + CalculatorName: [], + DataSource: [], + Description: [], + PricingPlan: [], + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "routes." + resolvedHostname; @@ -826,15 +831,17 @@ export const se_CreateTrackerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tracking/v0/trackers"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.PositionFiltering != null && { PositionFiltering: input.PositionFiltering }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TrackerName != null && { TrackerName: input.TrackerName }), - }); + body = JSON.stringify( + take(input, { + Description: [], + KmsKeyId: [], + PositionFiltering: [], + PricingPlan: [], + PricingPlanDataSource: [], + Tags: (_) => _json(_), + TrackerName: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -1336,16 +1343,14 @@ export const se_GetDevicePositionHistoryCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId!, "{DeviceId}", false); let body: any; - body = JSON.stringify({ - ...(input.EndTimeExclusive != null && { - EndTimeExclusive: input.EndTimeExclusive.toISOString().split(".")[0] + "Z", - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTimeInclusive != null && { - StartTimeInclusive: input.StartTimeInclusive.toISOString().split(".")[0] + "Z", - }), - }); + body = JSON.stringify( + take(input, { + EndTimeExclusive: (_) => _.toISOString().split(".")[0] + "Z", + MaxResults: [], + NextToken: [], + StartTimeInclusive: (_) => _.toISOString().split(".")[0] + "Z", + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -1612,10 +1617,12 @@ export const se_ListDevicePositionsCommand = async ( "/tracking/v0/trackers/{TrackerName}/list-positions"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -1648,10 +1655,12 @@ export const se_ListGeofenceCollectionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/geofencing/v0/list-collections"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -1693,10 +1702,12 @@ export const se_ListGeofencesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -1728,11 +1739,13 @@ export const se_ListKeysCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/list-keys"; let body: any; - body = JSON.stringify({ - ...(input.Filter != null && { Filter: se_ApiKeyFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filter: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "metadata." + resolvedHostname; @@ -1764,10 +1777,12 @@ export const se_ListMapsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/list-maps"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "maps." + resolvedHostname; @@ -1800,10 +1815,12 @@ export const se_ListPlaceIndexesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/places/v0/list-indexes"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "places." + resolvedHostname; @@ -1836,10 +1853,12 @@ export const se_ListRouteCalculatorsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routes/v0/list-calculators"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "routes." + resolvedHostname; @@ -1904,10 +1923,12 @@ export const se_ListTrackerConsumersCommand = async ( "/tracking/v0/trackers/{TrackerName}/list-consumers"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -1940,10 +1961,12 @@ export const se_ListTrackersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tracking/v0/list-trackers"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -1986,9 +2009,11 @@ export const se_PutGeofenceCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "GeofenceId", () => input.GeofenceId!, "{GeofenceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Geometry != null && { Geometry: se_GeofenceGeometry(input.Geometry, context) }), - }); + body = JSON.stringify( + take(input, { + Geometry: (_) => se_GeofenceGeometry(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -2023,11 +2048,13 @@ export const se_SearchPlaceIndexForPositionCommand = async ( "/places/v0/indexes/{IndexName}/search/position"; resolvedPath = __resolvedPath(resolvedPath, input, "IndexName", () => input.IndexName!, "{IndexName}", false); let body: any; - body = JSON.stringify({ - ...(input.Language != null && { Language: input.Language }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Position != null && { Position: se_Position(input.Position, context) }), - }); + body = JSON.stringify( + take(input, { + Language: [], + MaxResults: [], + Position: (_) => se_Position(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "places." + resolvedHostname; @@ -2062,14 +2089,16 @@ export const se_SearchPlaceIndexForSuggestionsCommand = async ( "/places/v0/indexes/{IndexName}/search/suggestions"; resolvedPath = __resolvedPath(resolvedPath, input, "IndexName", () => input.IndexName!, "{IndexName}", false); let body: any; - body = JSON.stringify({ - ...(input.BiasPosition != null && { BiasPosition: se_Position(input.BiasPosition, context) }), - ...(input.FilterBBox != null && { FilterBBox: se_BoundingBox(input.FilterBBox, context) }), - ...(input.FilterCountries != null && { FilterCountries: se_CountryCodeList(input.FilterCountries, context) }), - ...(input.Language != null && { Language: input.Language }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Text != null && { Text: input.Text }), - }); + body = JSON.stringify( + take(input, { + BiasPosition: (_) => se_Position(_, context), + FilterBBox: (_) => se_BoundingBox(_, context), + FilterCountries: (_) => _json(_), + Language: [], + MaxResults: [], + Text: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "places." + resolvedHostname; @@ -2104,14 +2133,16 @@ export const se_SearchPlaceIndexForTextCommand = async ( "/places/v0/indexes/{IndexName}/search/text"; resolvedPath = __resolvedPath(resolvedPath, input, "IndexName", () => input.IndexName!, "{IndexName}", false); let body: any; - body = JSON.stringify({ - ...(input.BiasPosition != null && { BiasPosition: se_Position(input.BiasPosition, context) }), - ...(input.FilterBBox != null && { FilterBBox: se_BoundingBox(input.FilterBBox, context) }), - ...(input.FilterCountries != null && { FilterCountries: se_CountryCodeList(input.FilterCountries, context) }), - ...(input.Language != null && { Language: input.Language }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Text != null && { Text: input.Text }), - }); + body = JSON.stringify( + take(input, { + BiasPosition: (_) => se_Position(_, context), + FilterBBox: (_) => se_BoundingBox(_, context), + FilterCountries: (_) => _json(_), + Language: [], + MaxResults: [], + Text: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "places." + resolvedHostname; @@ -2144,9 +2175,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "metadata." + resolvedHostname; @@ -2225,11 +2258,13 @@ export const se_UpdateGeofenceCollectionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }), - }); + body = JSON.stringify( + take(input, { + Description: [], + PricingPlan: [], + PricingPlanDataSource: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "geofencing." + resolvedHostname; @@ -2263,13 +2298,15 @@ export const se_UpdateKeyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metadata/v0/keys/{KeyName}"; resolvedPath = __resolvedPath(resolvedPath, input, "KeyName", () => input.KeyName!, "{KeyName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.ExpireTime != null && { ExpireTime: input.ExpireTime.toISOString().split(".")[0] + "Z" }), - ...(input.ForceUpdate != null && { ForceUpdate: input.ForceUpdate }), - ...(input.NoExpiry != null && { NoExpiry: input.NoExpiry }), - ...(input.Restrictions != null && { Restrictions: se_ApiKeyRestrictions(input.Restrictions, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + ExpireTime: (_) => _.toISOString().split(".")[0] + "Z", + ForceUpdate: [], + NoExpiry: [], + Restrictions: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "metadata." + resolvedHostname; @@ -2302,10 +2339,12 @@ export const se_UpdateMapCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/maps/v0/maps/{MapName}"; resolvedPath = __resolvedPath(resolvedPath, input, "MapName", () => input.MapName!, "{MapName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - }); + body = JSON.stringify( + take(input, { + Description: [], + PricingPlan: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "maps." + resolvedHostname; @@ -2339,13 +2378,13 @@ export const se_UpdatePlaceIndexCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/places/v0/indexes/{IndexName}"; resolvedPath = __resolvedPath(resolvedPath, input, "IndexName", () => input.IndexName!, "{IndexName}", false); let body: any; - body = JSON.stringify({ - ...(input.DataSourceConfiguration != null && { - DataSourceConfiguration: se_DataSourceConfiguration(input.DataSourceConfiguration, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - }); + body = JSON.stringify( + take(input, { + DataSourceConfiguration: (_) => _json(_), + Description: [], + PricingPlan: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "places." + resolvedHostname; @@ -2386,10 +2425,12 @@ export const se_UpdateRouteCalculatorCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - }); + body = JSON.stringify( + take(input, { + Description: [], + PricingPlan: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "routes." + resolvedHostname; @@ -2423,12 +2464,14 @@ export const se_UpdateTrackerCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tracking/v0/trackers/{TrackerName}"; resolvedPath = __resolvedPath(resolvedPath, input, "TrackerName", () => input.TrackerName!, "{TrackerName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.PositionFiltering != null && { PositionFiltering: input.PositionFiltering }), - ...(input.PricingPlan != null && { PricingPlan: input.PricingPlan }), - ...(input.PricingPlanDataSource != null && { PricingPlanDataSource: input.PricingPlanDataSource }), - }); + body = JSON.stringify( + take(input, { + Description: [], + PositionFiltering: [], + PricingPlan: [], + PricingPlanDataSource: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tracking." + resolvedHostname; @@ -2500,10 +2543,9 @@ const de_AssociateTrackerConsumerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2523,9 +2565,10 @@ export const de_BatchDeleteDevicePositionHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchDeleteDevicePositionHistoryErrorList(data.Errors, context); - } + const doc = take(data, { + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2559,10 +2602,9 @@ const de_BatchDeleteDevicePositionHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2582,9 +2624,10 @@ export const de_BatchDeleteGeofenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchDeleteGeofenceErrorList(data.Errors, context); - } + const doc = take(data, { + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2618,10 +2661,9 @@ const de_BatchDeleteGeofenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2641,9 +2683,10 @@ export const de_BatchEvaluateGeofencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchEvaluateGeofencesErrorList(data.Errors, context); - } + const doc = take(data, { + Errors: (_) => de_BatchEvaluateGeofencesErrorList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2677,10 +2720,9 @@ const de_BatchEvaluateGeofencesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2700,12 +2742,11 @@ export const de_BatchGetDevicePositionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DevicePositions != null) { - contents.DevicePositions = de_DevicePositionList(data.DevicePositions, context); - } - if (data.Errors != null) { - contents.Errors = de_BatchGetDevicePositionErrorList(data.Errors, context); - } + const doc = take(data, { + DevicePositions: (_) => de_DevicePositionList(_, context), + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2739,10 +2780,9 @@ const de_BatchGetDevicePositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2762,12 +2802,11 @@ export const de_BatchPutGeofenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchPutGeofenceErrorList(data.Errors, context); - } - if (data.Successes != null) { - contents.Successes = de_BatchPutGeofenceSuccessList(data.Successes, context); - } + const doc = take(data, { + Errors: _json, + Successes: (_) => de_BatchPutGeofenceSuccessList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2801,10 +2840,9 @@ const de_BatchPutGeofenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2824,9 +2862,10 @@ export const de_BatchUpdateDevicePositionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchUpdateDevicePositionErrorList(data.Errors, context); - } + const doc = take(data, { + Errors: (_) => de_BatchUpdateDevicePositionErrorList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2860,10 +2899,9 @@ const de_BatchUpdateDevicePositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2883,12 +2921,11 @@ export const de_CalculateRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Legs != null) { - contents.Legs = de_LegList(data.Legs, context); - } - if (data.Summary != null) { - contents.Summary = de_CalculateRouteSummary(data.Summary, context); - } + const doc = take(data, { + Legs: (_) => de_LegList(_, context), + Summary: (_) => de_CalculateRouteSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2922,10 +2959,9 @@ const de_CalculateRouteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2945,18 +2981,13 @@ export const de_CalculateRouteMatrixCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RouteMatrix != null) { - contents.RouteMatrix = de_RouteMatrix(data.RouteMatrix, context); - } - if (data.SnappedDeparturePositions != null) { - contents.SnappedDeparturePositions = de_PositionList(data.SnappedDeparturePositions, context); - } - if (data.SnappedDestinationPositions != null) { - contents.SnappedDestinationPositions = de_PositionList(data.SnappedDestinationPositions, context); - } - if (data.Summary != null) { - contents.Summary = de_CalculateRouteMatrixSummary(data.Summary, context); - } + const doc = take(data, { + RouteMatrix: (_) => de_RouteMatrix(_, context), + SnappedDeparturePositions: (_) => de_PositionList(_, context), + SnappedDestinationPositions: (_) => de_PositionList(_, context), + Summary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2990,10 +3021,9 @@ const de_CalculateRouteMatrixCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3013,15 +3043,12 @@ export const de_CreateGeofenceCollectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CollectionArn != null) { - contents.CollectionArn = __expectString(data.CollectionArn); - } - if (data.CollectionName != null) { - contents.CollectionName = __expectString(data.CollectionName); - } - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } + const doc = take(data, { + CollectionArn: __expectString, + CollectionName: __expectString, + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3058,10 +3085,9 @@ const de_CreateGeofenceCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3081,18 +3107,13 @@ export const de_CreateKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.Key != null) { - contents.Key = __expectString(data.Key); - } - if (data.KeyArn != null) { - contents.KeyArn = __expectString(data.KeyArn); - } - if (data.KeyName != null) { - contents.KeyName = __expectString(data.KeyName); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Key: __expectString, + KeyArn: __expectString, + KeyName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3129,10 +3150,9 @@ const de_CreateKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3152,15 +3172,12 @@ export const de_CreateMapCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.MapArn != null) { - contents.MapArn = __expectString(data.MapArn); - } - if (data.MapName != null) { - contents.MapName = __expectString(data.MapName); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MapArn: __expectString, + MapName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3197,10 +3214,9 @@ const de_CreateMapCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3220,15 +3236,12 @@ export const de_CreatePlaceIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.IndexArn != null) { - contents.IndexArn = __expectString(data.IndexArn); - } - if (data.IndexName != null) { - contents.IndexName = __expectString(data.IndexName); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + IndexArn: __expectString, + IndexName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3265,10 +3278,9 @@ const de_CreatePlaceIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3288,15 +3300,12 @@ export const de_CreateRouteCalculatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CalculatorArn != null) { - contents.CalculatorArn = __expectString(data.CalculatorArn); - } - if (data.CalculatorName != null) { - contents.CalculatorName = __expectString(data.CalculatorName); - } - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } + const doc = take(data, { + CalculatorArn: __expectString, + CalculatorName: __expectString, + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3333,10 +3342,9 @@ const de_CreateRouteCalculatorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3356,15 +3364,12 @@ export const de_CreateTrackerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.TrackerArn != null) { - contents.TrackerArn = __expectString(data.TrackerArn); - } - if (data.TrackerName != null) { - contents.TrackerName = __expectString(data.TrackerName); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + TrackerArn: __expectString, + TrackerName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3398,10 +3403,9 @@ const de_CreateTrackerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3454,10 +3458,9 @@ const de_DeleteGeofenceCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3510,10 +3513,9 @@ const de_DeleteKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3566,10 +3568,9 @@ const de_DeleteMapCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3622,10 +3623,9 @@ const de_DeletePlaceIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3678,10 +3678,9 @@ const de_DeleteRouteCalculatorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3734,10 +3733,9 @@ const de_DeleteTrackerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3757,33 +3755,18 @@ export const de_DescribeGeofenceCollectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CollectionArn != null) { - contents.CollectionArn = __expectString(data.CollectionArn); - } - if (data.CollectionName != null) { - contents.CollectionName = __expectString(data.CollectionName); - } - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.PricingPlan != null) { - contents.PricingPlan = __expectString(data.PricingPlan); - } - if (data.PricingPlanDataSource != null) { - contents.PricingPlanDataSource = __expectString(data.PricingPlanDataSource); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CollectionArn: __expectString, + CollectionName: __expectString, + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + KmsKeyId: __expectString, + PricingPlan: __expectString, + PricingPlanDataSource: __expectString, + Tags: _json, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3817,10 +3800,9 @@ const de_DescribeGeofenceCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3840,33 +3822,18 @@ export const de_DescribeKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.ExpireTime != null) { - contents.ExpireTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.ExpireTime)); - } - if (data.Key != null) { - contents.Key = __expectString(data.Key); - } - if (data.KeyArn != null) { - contents.KeyArn = __expectString(data.KeyArn); - } - if (data.KeyName != null) { - contents.KeyName = __expectString(data.KeyName); - } - if (data.Restrictions != null) { - contents.Restrictions = de_ApiKeyRestrictions(data.Restrictions, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + ExpireTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Key: __expectString, + KeyArn: __expectString, + KeyName: __expectString, + Restrictions: _json, + Tags: _json, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3900,10 +3867,9 @@ const de_DescribeKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3923,33 +3889,18 @@ export const de_DescribeMapCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Configuration != null) { - contents.Configuration = de_MapConfiguration(data.Configuration, context); - } - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.DataSource != null) { - contents.DataSource = __expectString(data.DataSource); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.MapArn != null) { - contents.MapArn = __expectString(data.MapArn); - } - if (data.MapName != null) { - contents.MapName = __expectString(data.MapName); - } - if (data.PricingPlan != null) { - contents.PricingPlan = __expectString(data.PricingPlan); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + Configuration: _json, + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSource: __expectString, + Description: __expectString, + MapArn: __expectString, + MapName: __expectString, + PricingPlan: __expectString, + Tags: _json, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3983,10 +3934,9 @@ const de_DescribeMapCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4006,33 +3956,18 @@ export const de_DescribePlaceIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.DataSource != null) { - contents.DataSource = __expectString(data.DataSource); - } - if (data.DataSourceConfiguration != null) { - contents.DataSourceConfiguration = de_DataSourceConfiguration(data.DataSourceConfiguration, context); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.IndexArn != null) { - contents.IndexArn = __expectString(data.IndexArn); - } - if (data.IndexName != null) { - contents.IndexName = __expectString(data.IndexName); - } - if (data.PricingPlan != null) { - contents.PricingPlan = __expectString(data.PricingPlan); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSource: __expectString, + DataSourceConfiguration: _json, + Description: __expectString, + IndexArn: __expectString, + IndexName: __expectString, + PricingPlan: __expectString, + Tags: _json, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4066,10 +4001,9 @@ const de_DescribePlaceIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4089,30 +4023,17 @@ export const de_DescribeRouteCalculatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CalculatorArn != null) { - contents.CalculatorArn = __expectString(data.CalculatorArn); - } - if (data.CalculatorName != null) { - contents.CalculatorName = __expectString(data.CalculatorName); - } - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.DataSource != null) { - contents.DataSource = __expectString(data.DataSource); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.PricingPlan != null) { - contents.PricingPlan = __expectString(data.PricingPlan); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CalculatorArn: __expectString, + CalculatorName: __expectString, + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSource: __expectString, + Description: __expectString, + PricingPlan: __expectString, + Tags: _json, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4146,10 +4067,9 @@ const de_DescribeRouteCalculatorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4169,36 +4089,19 @@ export const de_DescribeTrackerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.PositionFiltering != null) { - contents.PositionFiltering = __expectString(data.PositionFiltering); - } - if (data.PricingPlan != null) { - contents.PricingPlan = __expectString(data.PricingPlan); - } - if (data.PricingPlanDataSource != null) { - contents.PricingPlanDataSource = __expectString(data.PricingPlanDataSource); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.TrackerArn != null) { - contents.TrackerArn = __expectString(data.TrackerArn); - } - if (data.TrackerName != null) { - contents.TrackerName = __expectString(data.TrackerName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + KmsKeyId: __expectString, + PositionFiltering: __expectString, + PricingPlan: __expectString, + PricingPlanDataSource: __expectString, + Tags: _json, + TrackerArn: __expectString, + TrackerName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4232,10 +4135,9 @@ const de_DescribeTrackerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4288,10 +4190,9 @@ const de_DisassociateTrackerConsumerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4311,24 +4212,15 @@ export const de_GetDevicePositionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Accuracy != null) { - contents.Accuracy = de_PositionalAccuracy(data.Accuracy, context); - } - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } - if (data.Position != null) { - contents.Position = de_Position(data.Position, context); - } - if (data.PositionProperties != null) { - contents.PositionProperties = de_PropertyMap(data.PositionProperties, context); - } - if (data.ReceivedTime != null) { - contents.ReceivedTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.ReceivedTime)); - } - if (data.SampleTime != null) { - contents.SampleTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.SampleTime)); - } + const doc = take(data, { + Accuracy: (_) => de_PositionalAccuracy(_, context), + DeviceId: __expectString, + Position: (_) => de_Position(_, context), + PositionProperties: _json, + ReceivedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SampleTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4362,10 +4254,9 @@ const de_GetDevicePositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4385,12 +4276,11 @@ export const de_GetDevicePositionHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DevicePositions != null) { - contents.DevicePositions = de_DevicePositionList(data.DevicePositions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DevicePositions: (_) => de_DevicePositionList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4424,10 +4314,9 @@ const de_GetDevicePositionHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4447,21 +4336,14 @@ export const de_GetGeofenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.GeofenceId != null) { - contents.GeofenceId = __expectString(data.GeofenceId); - } - if (data.Geometry != null) { - contents.Geometry = de_GeofenceGeometry(data.Geometry, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + GeofenceId: __expectString, + Geometry: (_) => de_GeofenceGeometry(_, context), + Status: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4495,10 +4377,9 @@ const de_GetGeofenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4554,10 +4435,9 @@ const de_GetMapGlyphsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4613,10 +4493,9 @@ const de_GetMapSpritesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4672,10 +4551,9 @@ const de_GetMapStyleDescriptorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4731,10 +4609,9 @@ const de_GetMapTileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4754,9 +4631,10 @@ export const de_GetPlaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Place != null) { - contents.Place = de_Place(data.Place, context); - } + const doc = take(data, { + Place: (_) => de_Place(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4790,10 +4668,9 @@ const de_GetPlaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4813,12 +4690,11 @@ export const de_ListDevicePositionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListDevicePositionsResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListDevicePositionsResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4849,10 +4725,9 @@ const de_ListDevicePositionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4872,12 +4747,11 @@ export const de_ListGeofenceCollectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListGeofenceCollectionsResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListGeofenceCollectionsResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4908,10 +4782,9 @@ const de_ListGeofenceCollectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4931,12 +4804,11 @@ export const de_ListGeofencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListGeofenceResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListGeofenceResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4970,10 +4842,9 @@ const de_ListGeofencesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4993,12 +4864,11 @@ export const de_ListKeysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListKeysResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListKeysResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5029,10 +4899,9 @@ const de_ListKeysCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5052,12 +4921,11 @@ export const de_ListMapsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListMapsResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListMapsResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5088,10 +4956,9 @@ const de_ListMapsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5111,12 +4978,11 @@ export const de_ListPlaceIndexesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListPlaceIndexesResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListPlaceIndexesResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5147,10 +5013,9 @@ const de_ListPlaceIndexesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5170,12 +5035,11 @@ export const de_ListRouteCalculatorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListRouteCalculatorsResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListRouteCalculatorsResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5206,10 +5070,9 @@ const de_ListRouteCalculatorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5229,9 +5092,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5265,10 +5129,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5288,12 +5151,11 @@ export const de_ListTrackerConsumersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConsumerArns != null) { - contents.ConsumerArns = de_ArnList(data.ConsumerArns, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ConsumerArns: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5327,10 +5189,9 @@ const de_ListTrackerConsumersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5350,12 +5211,11 @@ export const de_ListTrackersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Entries != null) { - contents.Entries = de_ListTrackersResponseEntryList(data.Entries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Entries: (_) => de_ListTrackersResponseEntryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5386,10 +5246,9 @@ const de_ListTrackersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5409,15 +5268,12 @@ export const de_PutGeofenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreateTime != null) { - contents.CreateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreateTime)); - } - if (data.GeofenceId != null) { - contents.GeofenceId = __expectString(data.GeofenceId); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CreateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + GeofenceId: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5454,10 +5310,9 @@ const de_PutGeofenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5477,12 +5332,11 @@ export const de_SearchPlaceIndexForPositionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Results != null) { - contents.Results = de_SearchForPositionResultList(data.Results, context); - } - if (data.Summary != null) { - contents.Summary = de_SearchPlaceIndexForPositionSummary(data.Summary, context); - } + const doc = take(data, { + Results: (_) => de_SearchForPositionResultList(_, context), + Summary: (_) => de_SearchPlaceIndexForPositionSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5516,10 +5370,9 @@ const de_SearchPlaceIndexForPositionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5539,12 +5392,11 @@ export const de_SearchPlaceIndexForSuggestionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Results != null) { - contents.Results = de_SearchForSuggestionsResultList(data.Results, context); - } - if (data.Summary != null) { - contents.Summary = de_SearchPlaceIndexForSuggestionsSummary(data.Summary, context); - } + const doc = take(data, { + Results: _json, + Summary: (_) => de_SearchPlaceIndexForSuggestionsSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5578,10 +5430,9 @@ const de_SearchPlaceIndexForSuggestionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5601,12 +5452,11 @@ export const de_SearchPlaceIndexForTextCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Results != null) { - contents.Results = de_SearchForTextResultList(data.Results, context); - } - if (data.Summary != null) { - contents.Summary = de_SearchPlaceIndexForTextSummary(data.Summary, context); - } + const doc = take(data, { + Results: (_) => de_SearchForTextResultList(_, context), + Summary: (_) => de_SearchPlaceIndexForTextSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5640,10 +5490,9 @@ const de_SearchPlaceIndexForTextCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5696,10 +5545,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5752,10 +5600,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5775,15 +5622,12 @@ export const de_UpdateGeofenceCollectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CollectionArn != null) { - contents.CollectionArn = __expectString(data.CollectionArn); - } - if (data.CollectionName != null) { - contents.CollectionName = __expectString(data.CollectionName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CollectionArn: __expectString, + CollectionName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5817,10 +5661,9 @@ const de_UpdateGeofenceCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5840,15 +5683,12 @@ export const de_UpdateKeyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.KeyArn != null) { - contents.KeyArn = __expectString(data.KeyArn); - } - if (data.KeyName != null) { - contents.KeyName = __expectString(data.KeyName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + KeyArn: __expectString, + KeyName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5882,10 +5722,9 @@ const de_UpdateKeyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5905,15 +5744,12 @@ export const de_UpdateMapCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MapArn != null) { - contents.MapArn = __expectString(data.MapArn); - } - if (data.MapName != null) { - contents.MapName = __expectString(data.MapName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + MapArn: __expectString, + MapName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5947,10 +5783,9 @@ const de_UpdateMapCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5970,15 +5805,12 @@ export const de_UpdatePlaceIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IndexArn != null) { - contents.IndexArn = __expectString(data.IndexArn); - } - if (data.IndexName != null) { - contents.IndexName = __expectString(data.IndexName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + IndexArn: __expectString, + IndexName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -6012,10 +5844,9 @@ const de_UpdatePlaceIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6035,15 +5866,12 @@ export const de_UpdateRouteCalculatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CalculatorArn != null) { - contents.CalculatorArn = __expectString(data.CalculatorArn); - } - if (data.CalculatorName != null) { - contents.CalculatorName = __expectString(data.CalculatorName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + CalculatorArn: __expectString, + CalculatorName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -6077,10 +5905,9 @@ const de_UpdateRouteCalculatorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6100,15 +5927,12 @@ export const de_UpdateTrackerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TrackerArn != null) { - contents.TrackerArn = __expectString(data.TrackerArn); - } - if (data.TrackerName != null) { - contents.TrackerName = __expectString(data.TrackerName); - } - if (data.UpdateTime != null) { - contents.UpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.UpdateTime)); - } + const doc = take(data, { + TrackerArn: __expectString, + TrackerName: __expectString, + UpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -6142,16 +5966,15 @@ const de_UpdateTrackerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -6161,9 +5984,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6177,9 +6001,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6196,9 +6021,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6215,9 +6041,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6234,9 +6061,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6250,9 +6078,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6266,15 +6095,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.FieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.reason != null) { - contents.Reason = __expectString(data.reason); - } + const doc = take(data, { + FieldList: [, (_) => de_ValidationExceptionFieldList(_, context), `fieldList`], + Message: [, __expectString, `message`], + Reason: [, __expectString, `reason`], + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6282,45 +6108,20 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApiKeyActionList - */ -const se_ApiKeyActionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApiKeyActionList omitted. -/** - * serializeAws_restJson1ApiKeyFilter - */ -const se_ApiKeyFilter = (input: ApiKeyFilter, context: __SerdeContext): any => { - return { - ...(input.KeyStatus != null && { KeyStatus: input.KeyStatus }), - }; -}; +// se_ApiKeyFilter omitted. -/** - * serializeAws_restJson1ApiKeyRestrictions - */ -const se_ApiKeyRestrictions = (input: ApiKeyRestrictions, context: __SerdeContext): any => { - return { - ...(input.AllowActions != null && { AllowActions: se_ApiKeyActionList(input.AllowActions, context) }), - ...(input.AllowReferers != null && { AllowReferers: se_RefererPatternList(input.AllowReferers, context) }), - ...(input.AllowResources != null && { AllowResources: se_GeoArnList(input.AllowResources, context) }), - }; -}; +// se_ApiKeyRestrictions omitted. /** * serializeAws_restJson1BatchPutGeofenceRequestEntry */ const se_BatchPutGeofenceRequestEntry = (input: BatchPutGeofenceRequestEntry, context: __SerdeContext): any => { - return { - ...(input.GeofenceId != null && { GeofenceId: input.GeofenceId }), - ...(input.Geometry != null && { Geometry: se_GeofenceGeometry(input.Geometry, context) }), - }; + return take(input, { + GeofenceId: [], + Geometry: (_) => se_GeofenceGeometry(_, context), + }); }; /** @@ -6345,80 +6146,47 @@ const se_BoundingBox = (input: number[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1CalculateRouteCarModeOptions - */ -const se_CalculateRouteCarModeOptions = (input: CalculateRouteCarModeOptions, context: __SerdeContext): any => { - return { - ...(input.AvoidFerries != null && { AvoidFerries: input.AvoidFerries }), - ...(input.AvoidTolls != null && { AvoidTolls: input.AvoidTolls }), - }; -}; +// se_CalculateRouteCarModeOptions omitted. /** * serializeAws_restJson1CalculateRouteTruckModeOptions */ const se_CalculateRouteTruckModeOptions = (input: CalculateRouteTruckModeOptions, context: __SerdeContext): any => { - return { - ...(input.AvoidFerries != null && { AvoidFerries: input.AvoidFerries }), - ...(input.AvoidTolls != null && { AvoidTolls: input.AvoidTolls }), - ...(input.Dimensions != null && { Dimensions: se_TruckDimensions(input.Dimensions, context) }), - ...(input.Weight != null && { Weight: se_TruckWeight(input.Weight, context) }), - }; + return take(input, { + AvoidFerries: [], + AvoidTolls: [], + Dimensions: (_) => se_TruckDimensions(_, context), + Weight: (_) => se_TruckWeight(_, context), + }); }; /** * serializeAws_restJson1Circle */ const se_Circle = (input: Circle, context: __SerdeContext): any => { - return { - ...(input.Center != null && { Center: se_Position(input.Center, context) }), - ...(input.Radius != null && { Radius: __serializeFloat(input.Radius) }), - }; + return take(input, { + Center: (_) => se_Position(_, context), + Radius: __serializeFloat, + }); }; -/** - * serializeAws_restJson1CountryCodeList - */ -const se_CountryCodeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CountryCodeList omitted. -/** - * serializeAws_restJson1DataSourceConfiguration - */ -const se_DataSourceConfiguration = (input: DataSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.IntendedUse != null && { IntendedUse: input.IntendedUse }), - }; -}; +// se_DataSourceConfiguration omitted. -/** - * serializeAws_restJson1DeviceIdsList - */ -const se_DeviceIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceIdsList omitted. /** * serializeAws_restJson1DevicePositionUpdate */ const se_DevicePositionUpdate = (input: DevicePositionUpdate, context: __SerdeContext): any => { - return { - ...(input.Accuracy != null && { Accuracy: se_PositionalAccuracy(input.Accuracy, context) }), - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.Position != null && { Position: se_Position(input.Position, context) }), - ...(input.PositionProperties != null && { PositionProperties: se_PropertyMap(input.PositionProperties, context) }), - ...(input.SampleTime != null && { SampleTime: input.SampleTime.toISOString().split(".")[0] + "Z" }), - }; + return take(input, { + Accuracy: (_) => se_PositionalAccuracy(_, context), + DeviceId: [], + Position: (_) => se_Position(_, context), + PositionProperties: _json, + SampleTime: (_) => _.toISOString().split(".")[0] + "Z", + }); }; /** @@ -6432,37 +6200,19 @@ const se_DevicePositionUpdateList = (input: DevicePositionUpdate[], context: __S }); }; -/** - * serializeAws_restJson1GeoArnList - */ -const se_GeoArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GeoArnList omitted. /** * serializeAws_restJson1GeofenceGeometry */ const se_GeofenceGeometry = (input: GeofenceGeometry, context: __SerdeContext): any => { - return { - ...(input.Circle != null && { Circle: se_Circle(input.Circle, context) }), - ...(input.Polygon != null && { Polygon: se_LinearRings(input.Polygon, context) }), - }; + return take(input, { + Circle: (_) => se_Circle(_, context), + Polygon: (_) => se_LinearRings(_, context), + }); }; -/** - * serializeAws_restJson1IdList - */ -const se_IdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdList omitted. /** * serializeAws_restJson1LinearRing @@ -6486,14 +6236,7 @@ const se_LinearRings = (input: number[][][], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1MapConfiguration - */ -const se_MapConfiguration = (input: MapConfiguration, context: __SerdeContext): any => { - return { - ...(input.Style != null && { Style: input.Style }), - }; -}; +// se_MapConfiguration omitted. /** * serializeAws_restJson1Position @@ -6510,9 +6253,9 @@ const se_Position = (input: number[], context: __SerdeContext): any => { * serializeAws_restJson1PositionalAccuracy */ const se_PositionalAccuracy = (input: PositionalAccuracy, context: __SerdeContext): any => { - return { - ...(input.Horizontal != null && { Horizontal: __serializeFloat(input.Horizontal) }), - }; + return take(input, { + Horizontal: __serializeFloat, + }); }; /** @@ -6526,63 +6269,32 @@ const se_PositionList = (input: number[][], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1PropertyMap - */ -const se_PropertyMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_PropertyMap omitted. -/** - * serializeAws_restJson1RefererPatternList - */ -const se_RefererPatternList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RefererPatternList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * serializeAws_restJson1TruckDimensions */ const se_TruckDimensions = (input: TruckDimensions, context: __SerdeContext): any => { - return { - ...(input.Height != null && { Height: __serializeFloat(input.Height) }), - ...(input.Length != null && { Length: __serializeFloat(input.Length) }), - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Width != null && { Width: __serializeFloat(input.Width) }), - }; + return take(input, { + Height: __serializeFloat, + Length: __serializeFloat, + Unit: [], + Width: __serializeFloat, + }); }; /** * serializeAws_restJson1TruckWeight */ const se_TruckWeight = (input: TruckWeight, context: __SerdeContext): any => { - return { - ...(input.Total != null && { Total: __serializeFloat(input.Total) }), - ...(input.Unit != null && { Unit: input.Unit }), - }; + return take(input, { + Total: __serializeFloat, + Unit: [], + }); }; /** @@ -6596,113 +6308,29 @@ const se_WaypointPositionList = (input: number[][], context: __SerdeContext): an }); }; -/** - * deserializeAws_restJson1ApiKeyActionList - */ -const de_ApiKeyActionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ApiKeyActionList omitted. -/** - * deserializeAws_restJson1ApiKeyRestrictions - */ -const de_ApiKeyRestrictions = (output: any, context: __SerdeContext): ApiKeyRestrictions => { - return { - AllowActions: output.AllowActions != null ? de_ApiKeyActionList(output.AllowActions, context) : undefined, - AllowReferers: output.AllowReferers != null ? de_RefererPatternList(output.AllowReferers, context) : undefined, - AllowResources: output.AllowResources != null ? de_GeoArnList(output.AllowResources, context) : undefined, - } as any; -}; +// de_ApiKeyRestrictions omitted. -/** - * deserializeAws_restJson1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArnList omitted. -/** - * deserializeAws_restJson1BatchDeleteDevicePositionHistoryError - */ -const de_BatchDeleteDevicePositionHistoryError = ( - output: any, - context: __SerdeContext -): BatchDeleteDevicePositionHistoryError => { - return { - DeviceId: __expectString(output.DeviceId), - Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined, - } as any; -}; +// de_BatchDeleteDevicePositionHistoryError omitted. -/** - * deserializeAws_restJson1BatchDeleteDevicePositionHistoryErrorList - */ -const de_BatchDeleteDevicePositionHistoryErrorList = ( - output: any, - context: __SerdeContext -): BatchDeleteDevicePositionHistoryError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteDevicePositionHistoryError(entry, context); - }); - return retVal; -}; +// de_BatchDeleteDevicePositionHistoryErrorList omitted. -/** - * deserializeAws_restJson1BatchDeleteGeofenceError - */ -const de_BatchDeleteGeofenceError = (output: any, context: __SerdeContext): BatchDeleteGeofenceError => { - return { - Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined, - GeofenceId: __expectString(output.GeofenceId), - } as any; -}; +// de_BatchDeleteGeofenceError omitted. -/** - * deserializeAws_restJson1BatchDeleteGeofenceErrorList - */ -const de_BatchDeleteGeofenceErrorList = (output: any, context: __SerdeContext): BatchDeleteGeofenceError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteGeofenceError(entry, context); - }); - return retVal; -}; +// de_BatchDeleteGeofenceErrorList omitted. /** * deserializeAws_restJson1BatchEvaluateGeofencesError */ const de_BatchEvaluateGeofencesError = (output: any, context: __SerdeContext): BatchEvaluateGeofencesError => { - return { - DeviceId: __expectString(output.DeviceId), - Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined, - SampleTime: - output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SampleTime)) : undefined, - } as any; + return take(output, { + DeviceId: __expectString, + Error: _json, + SampleTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -6712,85 +6340,30 @@ const de_BatchEvaluateGeofencesErrorList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchEvaluateGeofencesError(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1BatchGetDevicePositionError - */ -const de_BatchGetDevicePositionError = (output: any, context: __SerdeContext): BatchGetDevicePositionError => { - return { - DeviceId: __expectString(output.DeviceId), - Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined, - } as any; -}; +// de_BatchGetDevicePositionError omitted. -/** - * deserializeAws_restJson1BatchGetDevicePositionErrorList - */ -const de_BatchGetDevicePositionErrorList = (output: any, context: __SerdeContext): BatchGetDevicePositionError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetDevicePositionError(entry, context); - }); - return retVal; -}; +// de_BatchGetDevicePositionErrorList omitted. -/** - * deserializeAws_restJson1BatchItemError - */ -const de_BatchItemError = (output: any, context: __SerdeContext): BatchItemError => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_BatchItemError omitted. -/** - * deserializeAws_restJson1BatchPutGeofenceError - */ -const de_BatchPutGeofenceError = (output: any, context: __SerdeContext): BatchPutGeofenceError => { - return { - Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined, - GeofenceId: __expectString(output.GeofenceId), - } as any; -}; +// de_BatchPutGeofenceError omitted. -/** - * deserializeAws_restJson1BatchPutGeofenceErrorList - */ -const de_BatchPutGeofenceErrorList = (output: any, context: __SerdeContext): BatchPutGeofenceError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutGeofenceError(entry, context); - }); - return retVal; -}; +// de_BatchPutGeofenceErrorList omitted. /** * deserializeAws_restJson1BatchPutGeofenceSuccess */ const de_BatchPutGeofenceSuccess = (output: any, context: __SerdeContext): BatchPutGeofenceSuccess => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - GeofenceId: __expectString(output.GeofenceId), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + GeofenceId: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -6800,9 +6373,6 @@ const de_BatchPutGeofenceSuccessList = (output: any, context: __SerdeContext): B const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchPutGeofenceSuccess(entry, context); }); return retVal; @@ -6812,12 +6382,11 @@ const de_BatchPutGeofenceSuccessList = (output: any, context: __SerdeContext): B * deserializeAws_restJson1BatchUpdateDevicePositionError */ const de_BatchUpdateDevicePositionError = (output: any, context: __SerdeContext): BatchUpdateDevicePositionError => { - return { - DeviceId: __expectString(output.DeviceId), - Error: output.Error != null ? de_BatchItemError(output.Error, context) : undefined, - SampleTime: - output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SampleTime)) : undefined, - } as any; + return take(output, { + DeviceId: __expectString, + Error: _json, + SampleTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -6830,9 +6399,6 @@ const de_BatchUpdateDevicePositionErrorList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchUpdateDevicePositionError(entry, context); }); return retVal; @@ -6845,88 +6411,52 @@ const de_BoundingBox = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_restJson1CalculateRouteMatrixSummary - */ -const de_CalculateRouteMatrixSummary = (output: any, context: __SerdeContext): CalculateRouteMatrixSummary => { - return { - DataSource: __expectString(output.DataSource), - DistanceUnit: __expectString(output.DistanceUnit), - ErrorCount: __expectInt32(output.ErrorCount), - RouteCount: __expectInt32(output.RouteCount), - } as any; -}; +// de_CalculateRouteMatrixSummary omitted. /** * deserializeAws_restJson1CalculateRouteSummary */ const de_CalculateRouteSummary = (output: any, context: __SerdeContext): CalculateRouteSummary => { - return { - DataSource: __expectString(output.DataSource), - Distance: __limitedParseDouble(output.Distance), - DistanceUnit: __expectString(output.DistanceUnit), - DurationSeconds: __limitedParseDouble(output.DurationSeconds), - RouteBBox: output.RouteBBox != null ? de_BoundingBox(output.RouteBBox, context) : undefined, - } as any; + return take(output, { + DataSource: __expectString, + Distance: __limitedParseDouble, + DistanceUnit: __expectString, + DurationSeconds: __limitedParseDouble, + RouteBBox: (_: any) => de_BoundingBox(_, context), + }) as any; }; /** * deserializeAws_restJson1Circle */ const de_Circle = (output: any, context: __SerdeContext): Circle => { - return { - Center: output.Center != null ? de_Position(output.Center, context) : undefined, - Radius: __limitedParseDouble(output.Radius), - } as any; + return take(output, { + Center: (_: any) => de_Position(_, context), + Radius: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1CountryCodeList - */ -const de_CountryCodeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CountryCodeList omitted. -/** - * deserializeAws_restJson1DataSourceConfiguration - */ -const de_DataSourceConfiguration = (output: any, context: __SerdeContext): DataSourceConfiguration => { - return { - IntendedUse: __expectString(output.IntendedUse), - } as any; -}; +// de_DataSourceConfiguration omitted. /** * deserializeAws_restJson1DevicePosition */ const de_DevicePosition = (output: any, context: __SerdeContext): DevicePosition => { - return { - Accuracy: output.Accuracy != null ? de_PositionalAccuracy(output.Accuracy, context) : undefined, - DeviceId: __expectString(output.DeviceId), - Position: output.Position != null ? de_Position(output.Position, context) : undefined, - PositionProperties: - output.PositionProperties != null ? de_PropertyMap(output.PositionProperties, context) : undefined, - ReceivedTime: - output.ReceivedTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ReceivedTime)) : undefined, - SampleTime: - output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SampleTime)) : undefined, - } as any; + return take(output, { + Accuracy: (_: any) => de_PositionalAccuracy(_, context), + DeviceId: __expectString, + Position: (_: any) => de_Position(_, context), + PositionProperties: _json, + ReceivedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SampleTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -6936,60 +6466,44 @@ const de_DevicePositionList = (output: any, context: __SerdeContext): DevicePosi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DevicePosition(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1GeoArnList - */ -const de_GeoArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GeoArnList omitted. /** * deserializeAws_restJson1GeofenceGeometry */ const de_GeofenceGeometry = (output: any, context: __SerdeContext): GeofenceGeometry => { - return { - Circle: output.Circle != null ? de_Circle(output.Circle, context) : undefined, - Polygon: output.Polygon != null ? de_LinearRings(output.Polygon, context) : undefined, - } as any; + return take(output, { + Circle: (_: any) => de_Circle(_, context), + Polygon: (_: any) => de_LinearRings(_, context), + }) as any; }; /** * deserializeAws_restJson1Leg */ const de_Leg = (output: any, context: __SerdeContext): Leg => { - return { - Distance: __limitedParseDouble(output.Distance), - DurationSeconds: __limitedParseDouble(output.DurationSeconds), - EndPosition: output.EndPosition != null ? de_Position(output.EndPosition, context) : undefined, - Geometry: output.Geometry != null ? de_LegGeometry(output.Geometry, context) : undefined, - StartPosition: output.StartPosition != null ? de_Position(output.StartPosition, context) : undefined, - Steps: output.Steps != null ? de_StepList(output.Steps, context) : undefined, - } as any; + return take(output, { + Distance: __limitedParseDouble, + DurationSeconds: __limitedParseDouble, + EndPosition: (_: any) => de_Position(_, context), + Geometry: (_: any) => de_LegGeometry(_, context), + StartPosition: (_: any) => de_Position(_, context), + Steps: (_: any) => de_StepList(_, context), + }) as any; }; /** * deserializeAws_restJson1LegGeometry */ const de_LegGeometry = (output: any, context: __SerdeContext): LegGeometry => { - return { - LineString: output.LineString != null ? de_LineString(output.LineString, context) : undefined, - } as any; + return take(output, { + LineString: (_: any) => de_LineString(_, context), + }) as any; }; /** @@ -6999,9 +6513,6 @@ const de_LegList = (output: any, context: __SerdeContext): Leg[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Leg(entry, context); }); return retVal; @@ -7014,9 +6525,6 @@ const de_LinearRing = (output: any, context: __SerdeContext): number[][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Position(entry, context); }); return retVal; @@ -7029,9 +6537,6 @@ const de_LinearRings = (output: any, context: __SerdeContext): number[][][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LinearRing(entry, context); }); return retVal; @@ -7044,9 +6549,6 @@ const de_LineString = (output: any, context: __SerdeContext): number[][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Position(entry, context); }); return retVal; @@ -7059,15 +6561,13 @@ const de_ListDevicePositionsResponseEntry = ( output: any, context: __SerdeContext ): ListDevicePositionsResponseEntry => { - return { - Accuracy: output.Accuracy != null ? de_PositionalAccuracy(output.Accuracy, context) : undefined, - DeviceId: __expectString(output.DeviceId), - Position: output.Position != null ? de_Position(output.Position, context) : undefined, - PositionProperties: - output.PositionProperties != null ? de_PropertyMap(output.PositionProperties, context) : undefined, - SampleTime: - output.SampleTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.SampleTime)) : undefined, - } as any; + return take(output, { + Accuracy: (_: any) => de_PositionalAccuracy(_, context), + DeviceId: __expectString, + Position: (_: any) => de_Position(_, context), + PositionProperties: _json, + SampleTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7080,9 +6580,6 @@ const de_ListDevicePositionsResponseEntryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListDevicePositionsResponseEntry(entry, context); }); return retVal; @@ -7095,16 +6592,14 @@ const de_ListGeofenceCollectionsResponseEntry = ( output: any, context: __SerdeContext ): ListGeofenceCollectionsResponseEntry => { - return { - CollectionName: __expectString(output.CollectionName), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - Description: __expectString(output.Description), - PricingPlan: __expectString(output.PricingPlan), - PricingPlanDataSource: __expectString(output.PricingPlanDataSource), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CollectionName: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + PricingPlan: __expectString, + PricingPlanDataSource: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7117,9 +6612,6 @@ const de_ListGeofenceCollectionsResponseEntryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListGeofenceCollectionsResponseEntry(entry, context); }); return retVal; @@ -7129,15 +6621,13 @@ const de_ListGeofenceCollectionsResponseEntryList = ( * deserializeAws_restJson1ListGeofenceResponseEntry */ const de_ListGeofenceResponseEntry = (output: any, context: __SerdeContext): ListGeofenceResponseEntry => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - GeofenceId: __expectString(output.GeofenceId), - Geometry: output.Geometry != null ? de_GeofenceGeometry(output.Geometry, context) : undefined, - Status: __expectString(output.Status), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + GeofenceId: __expectString, + Geometry: (_: any) => de_GeofenceGeometry(_, context), + Status: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7147,9 +6637,6 @@ const de_ListGeofenceResponseEntryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListGeofenceResponseEntry(entry, context); }); return retVal; @@ -7159,17 +6646,14 @@ const de_ListGeofenceResponseEntryList = (output: any, context: __SerdeContext): * deserializeAws_restJson1ListKeysResponseEntry */ const de_ListKeysResponseEntry = (output: any, context: __SerdeContext): ListKeysResponseEntry => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - Description: __expectString(output.Description), - ExpireTime: - output.ExpireTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpireTime)) : undefined, - KeyName: __expectString(output.KeyName), - Restrictions: output.Restrictions != null ? de_ApiKeyRestrictions(output.Restrictions, context) : undefined, - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + ExpireTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + KeyName: __expectString, + Restrictions: _json, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7179,9 +6663,6 @@ const de_ListKeysResponseEntryList = (output: any, context: __SerdeContext): Lis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListKeysResponseEntry(entry, context); }); return retVal; @@ -7191,16 +6672,14 @@ const de_ListKeysResponseEntryList = (output: any, context: __SerdeContext): Lis * deserializeAws_restJson1ListMapsResponseEntry */ const de_ListMapsResponseEntry = (output: any, context: __SerdeContext): ListMapsResponseEntry => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - DataSource: __expectString(output.DataSource), - Description: __expectString(output.Description), - MapName: __expectString(output.MapName), - PricingPlan: __expectString(output.PricingPlan), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSource: __expectString, + Description: __expectString, + MapName: __expectString, + PricingPlan: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7210,9 +6689,6 @@ const de_ListMapsResponseEntryList = (output: any, context: __SerdeContext): Lis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListMapsResponseEntry(entry, context); }); return retVal; @@ -7222,16 +6698,14 @@ const de_ListMapsResponseEntryList = (output: any, context: __SerdeContext): Lis * deserializeAws_restJson1ListPlaceIndexesResponseEntry */ const de_ListPlaceIndexesResponseEntry = (output: any, context: __SerdeContext): ListPlaceIndexesResponseEntry => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - DataSource: __expectString(output.DataSource), - Description: __expectString(output.Description), - IndexName: __expectString(output.IndexName), - PricingPlan: __expectString(output.PricingPlan), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSource: __expectString, + Description: __expectString, + IndexName: __expectString, + PricingPlan: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7244,9 +6718,6 @@ const de_ListPlaceIndexesResponseEntryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListPlaceIndexesResponseEntry(entry, context); }); return retVal; @@ -7259,16 +6730,14 @@ const de_ListRouteCalculatorsResponseEntry = ( output: any, context: __SerdeContext ): ListRouteCalculatorsResponseEntry => { - return { - CalculatorName: __expectString(output.CalculatorName), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - DataSource: __expectString(output.DataSource), - Description: __expectString(output.Description), - PricingPlan: __expectString(output.PricingPlan), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CalculatorName: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DataSource: __expectString, + Description: __expectString, + PricingPlan: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7281,9 +6750,6 @@ const de_ListRouteCalculatorsResponseEntryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListRouteCalculatorsResponseEntry(entry, context); }); return retVal; @@ -7293,16 +6759,14 @@ const de_ListRouteCalculatorsResponseEntryList = ( * deserializeAws_restJson1ListTrackersResponseEntry */ const de_ListTrackersResponseEntry = (output: any, context: __SerdeContext): ListTrackersResponseEntry => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreateTime)) : undefined, - Description: __expectString(output.Description), - PricingPlan: __expectString(output.PricingPlan), - PricingPlanDataSource: __expectString(output.PricingPlanDataSource), - TrackerName: __expectString(output.TrackerName), - UpdateTime: - output.UpdateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdateTime)) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + PricingPlan: __expectString, + PricingPlanDataSource: __expectString, + TrackerName: __expectString, + UpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -7312,52 +6776,42 @@ const de_ListTrackersResponseEntryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListTrackersResponseEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MapConfiguration - */ -const de_MapConfiguration = (output: any, context: __SerdeContext): MapConfiguration => { - return { - Style: __expectString(output.Style), - } as any; -}; +// de_MapConfiguration omitted. /** * deserializeAws_restJson1Place */ const de_Place = (output: any, context: __SerdeContext): Place => { - return { - AddressNumber: __expectString(output.AddressNumber), - Country: __expectString(output.Country), - Geometry: output.Geometry != null ? de_PlaceGeometry(output.Geometry, context) : undefined, - Interpolated: __expectBoolean(output.Interpolated), - Label: __expectString(output.Label), - Municipality: __expectString(output.Municipality), - Neighborhood: __expectString(output.Neighborhood), - PostalCode: __expectString(output.PostalCode), - Region: __expectString(output.Region), - Street: __expectString(output.Street), - SubRegion: __expectString(output.SubRegion), - TimeZone: output.TimeZone != null ? de_TimeZone(output.TimeZone, context) : undefined, - UnitNumber: __expectString(output.UnitNumber), - UnitType: __expectString(output.UnitType), - } as any; + return take(output, { + AddressNumber: __expectString, + Country: __expectString, + Geometry: (_: any) => de_PlaceGeometry(_, context), + Interpolated: __expectBoolean, + Label: __expectString, + Municipality: __expectString, + Neighborhood: __expectString, + PostalCode: __expectString, + Region: __expectString, + Street: __expectString, + SubRegion: __expectString, + TimeZone: _json, + UnitNumber: __expectString, + UnitType: __expectString, + }) as any; }; /** * deserializeAws_restJson1PlaceGeometry */ const de_PlaceGeometry = (output: any, context: __SerdeContext): PlaceGeometry => { - return { - Point: output.Point != null ? de_Position(output.Point, context) : undefined, - } as any; + return take(output, { + Point: (_: any) => de_Position(_, context), + }) as any; }; /** @@ -7367,9 +6821,6 @@ const de_Position = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; @@ -7379,9 +6830,9 @@ const de_Position = (output: any, context: __SerdeContext): number[] => { * deserializeAws_restJson1PositionalAccuracy */ const de_PositionalAccuracy = (output: any, context: __SerdeContext): PositionalAccuracy => { - return { - Horizontal: __limitedParseDouble(output.Horizontal), - } as any; + return take(output, { + Horizontal: __limitedParseDouble, + }) as any; }; /** @@ -7391,41 +6842,14 @@ const de_PositionList = (output: any, context: __SerdeContext): number[][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Position(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PropertyMap - */ -const de_PropertyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PropertyMap omitted. -/** - * deserializeAws_restJson1RefererPatternList - */ -const de_RefererPatternList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RefererPatternList omitted. /** * deserializeAws_restJson1RouteMatrix @@ -7434,9 +6858,6 @@ const de_RouteMatrix = (output: any, context: __SerdeContext): RouteMatrixEntry[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RouteMatrixRow(entry, context); }); return retVal; @@ -7446,22 +6867,14 @@ const de_RouteMatrix = (output: any, context: __SerdeContext): RouteMatrixEntry[ * deserializeAws_restJson1RouteMatrixEntry */ const de_RouteMatrixEntry = (output: any, context: __SerdeContext): RouteMatrixEntry => { - return { - Distance: __limitedParseDouble(output.Distance), - DurationSeconds: __limitedParseDouble(output.DurationSeconds), - Error: output.Error != null ? de_RouteMatrixEntryError(output.Error, context) : undefined, - } as any; + return take(output, { + Distance: __limitedParseDouble, + DurationSeconds: __limitedParseDouble, + Error: _json, + }) as any; }; -/** - * deserializeAws_restJson1RouteMatrixEntryError - */ -const de_RouteMatrixEntryError = (output: any, context: __SerdeContext): RouteMatrixEntryError => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_RouteMatrixEntryError omitted. /** * deserializeAws_restJson1RouteMatrixRow @@ -7470,9 +6883,6 @@ const de_RouteMatrixRow = (output: any, context: __SerdeContext): RouteMatrixEnt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RouteMatrixEntry(entry, context); }); return retVal; @@ -7482,11 +6892,11 @@ const de_RouteMatrixRow = (output: any, context: __SerdeContext): RouteMatrixEnt * deserializeAws_restJson1SearchForPositionResult */ const de_SearchForPositionResult = (output: any, context: __SerdeContext): SearchForPositionResult => { - return { - Distance: __limitedParseDouble(output.Distance), - Place: output.Place != null ? de_Place(output.Place, context) : undefined, - PlaceId: __expectString(output.PlaceId), - } as any; + return take(output, { + Distance: __limitedParseDouble, + Place: (_: any) => de_Place(_, context), + PlaceId: __expectString, + }) as any; }; /** @@ -7496,49 +6906,25 @@ const de_SearchForPositionResultList = (output: any, context: __SerdeContext): S const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SearchForPositionResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SearchForSuggestionsResult - */ -const de_SearchForSuggestionsResult = (output: any, context: __SerdeContext): SearchForSuggestionsResult => { - return { - PlaceId: __expectString(output.PlaceId), - Text: __expectString(output.Text), - } as any; -}; +// de_SearchForSuggestionsResult omitted. -/** - * deserializeAws_restJson1SearchForSuggestionsResultList - */ -const de_SearchForSuggestionsResultList = (output: any, context: __SerdeContext): SearchForSuggestionsResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SearchForSuggestionsResult(entry, context); - }); - return retVal; -}; +// de_SearchForSuggestionsResultList omitted. /** * deserializeAws_restJson1SearchForTextResult */ const de_SearchForTextResult = (output: any, context: __SerdeContext): SearchForTextResult => { - return { - Distance: __limitedParseDouble(output.Distance), - Place: output.Place != null ? de_Place(output.Place, context) : undefined, - PlaceId: __expectString(output.PlaceId), - Relevance: __limitedParseDouble(output.Relevance), - } as any; + return take(output, { + Distance: __limitedParseDouble, + Place: (_: any) => de_Place(_, context), + PlaceId: __expectString, + Relevance: __limitedParseDouble, + }) as any; }; /** @@ -7548,9 +6934,6 @@ const de_SearchForTextResultList = (output: any, context: __SerdeContext): Searc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SearchForTextResult(entry, context); }); return retVal; @@ -7563,12 +6946,12 @@ const de_SearchPlaceIndexForPositionSummary = ( output: any, context: __SerdeContext ): SearchPlaceIndexForPositionSummary => { - return { - DataSource: __expectString(output.DataSource), - Language: __expectString(output.Language), - MaxResults: __expectInt32(output.MaxResults), - Position: output.Position != null ? de_Position(output.Position, context) : undefined, - } as any; + return take(output, { + DataSource: __expectString, + Language: __expectString, + MaxResults: __expectInt32, + Position: (_: any) => de_Position(_, context), + }) as any; }; /** @@ -7578,44 +6961,44 @@ const de_SearchPlaceIndexForSuggestionsSummary = ( output: any, context: __SerdeContext ): SearchPlaceIndexForSuggestionsSummary => { - return { - BiasPosition: output.BiasPosition != null ? de_Position(output.BiasPosition, context) : undefined, - DataSource: __expectString(output.DataSource), - FilterBBox: output.FilterBBox != null ? de_BoundingBox(output.FilterBBox, context) : undefined, - FilterCountries: output.FilterCountries != null ? de_CountryCodeList(output.FilterCountries, context) : undefined, - Language: __expectString(output.Language), - MaxResults: __expectInt32(output.MaxResults), - Text: __expectString(output.Text), - } as any; + return take(output, { + BiasPosition: (_: any) => de_Position(_, context), + DataSource: __expectString, + FilterBBox: (_: any) => de_BoundingBox(_, context), + FilterCountries: _json, + Language: __expectString, + MaxResults: __expectInt32, + Text: __expectString, + }) as any; }; /** * deserializeAws_restJson1SearchPlaceIndexForTextSummary */ const de_SearchPlaceIndexForTextSummary = (output: any, context: __SerdeContext): SearchPlaceIndexForTextSummary => { - return { - BiasPosition: output.BiasPosition != null ? de_Position(output.BiasPosition, context) : undefined, - DataSource: __expectString(output.DataSource), - FilterBBox: output.FilterBBox != null ? de_BoundingBox(output.FilterBBox, context) : undefined, - FilterCountries: output.FilterCountries != null ? de_CountryCodeList(output.FilterCountries, context) : undefined, - Language: __expectString(output.Language), - MaxResults: __expectInt32(output.MaxResults), - ResultBBox: output.ResultBBox != null ? de_BoundingBox(output.ResultBBox, context) : undefined, - Text: __expectString(output.Text), - } as any; + return take(output, { + BiasPosition: (_: any) => de_Position(_, context), + DataSource: __expectString, + FilterBBox: (_: any) => de_BoundingBox(_, context), + FilterCountries: _json, + Language: __expectString, + MaxResults: __expectInt32, + ResultBBox: (_: any) => de_BoundingBox(_, context), + Text: __expectString, + }) as any; }; /** * deserializeAws_restJson1Step */ const de_Step = (output: any, context: __SerdeContext): Step => { - return { - Distance: __limitedParseDouble(output.Distance), - DurationSeconds: __limitedParseDouble(output.DurationSeconds), - EndPosition: output.EndPosition != null ? de_Position(output.EndPosition, context) : undefined, - GeometryOffset: __expectInt32(output.GeometryOffset), - StartPosition: output.StartPosition != null ? de_Position(output.StartPosition, context) : undefined, - } as any; + return take(output, { + Distance: __limitedParseDouble, + DurationSeconds: __limitedParseDouble, + EndPosition: (_: any) => de_Position(_, context), + GeometryOffset: __expectInt32, + StartPosition: (_: any) => de_Position(_, context), + }) as any; }; /** @@ -7625,45 +7008,23 @@ const de_StepList = (output: any, context: __SerdeContext): Step[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Step(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TimeZone - */ -const de_TimeZone = (output: any, context: __SerdeContext): TimeZone => { - return { - Name: __expectString(output.Name), - Offset: __expectInt32(output.Offset), - } as any; -}; +// de_TimeZone omitted. /** * deserializeAws_restJson1ValidationExceptionField */ const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.message), - Name: __expectString(output.name), - } as any; + return take(output, { + Message: [, __expectString, `message`], + Name: [, __expectString, `name`], + }) as any; }; /** @@ -7673,9 +7034,6 @@ const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ValidationExceptionField(entry, context); }); return retVal; diff --git a/clients/client-lookoutequipment/src/protocols/Aws_json1_0.ts b/clients/client-lookoutequipment/src/protocols/Aws_json1_0.ts index 44467f7b7607..a263df54b479 100644 --- a/clients/client-lookoutequipment/src/protocols/Aws_json1_0.ts +++ b/clients/client-lookoutequipment/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -99,22 +101,14 @@ import { UpdateLabelGroupCommandInput, UpdateLabelGroupCommandOutput } from "../ import { LookoutEquipmentServiceException as __BaseException } from "../models/LookoutEquipmentServiceException"; import { AccessDeniedException, - CategoricalValues, ConflictException, CountPercent, CreateDatasetRequest, - CreateDatasetResponse, CreateInferenceSchedulerRequest, - CreateInferenceSchedulerResponse, CreateLabelGroupRequest, - CreateLabelGroupResponse, CreateLabelRequest, - CreateLabelResponse, CreateModelRequest, - CreateModelResponse, - DataIngestionJobSummary, DataPreProcessingConfiguration, - DataQualitySummary, DatasetSchema, DatasetSummary, DeleteDatasetRequest, @@ -134,7 +128,6 @@ import { DescribeLabelResponse, DescribeModelRequest, DescribeModelResponse, - DuplicateTimestamps, InferenceEventSummary, InferenceExecutionSummary, InferenceInputConfiguration, @@ -142,20 +135,14 @@ import { InferenceOutputConfiguration, InferenceS3InputConfiguration, InferenceS3OutputConfiguration, - InferenceSchedulerSummary, - IngestedFilesSummary, IngestionInputConfiguration, IngestionS3InputConfiguration, - InsufficientSensorData, InternalServerException, - InvalidSensorData, LabelGroupSummary, LabelsInputConfiguration, LabelsS3InputConfiguration, LabelSummary, - LargeTimestampGaps, ListDataIngestionJobsRequest, - ListDataIngestionJobsResponse, ListDatasetsRequest, ListDatasetsResponse, ListInferenceEventsRequest, @@ -163,7 +150,6 @@ import { ListInferenceExecutionsRequest, ListInferenceExecutionsResponse, ListInferenceSchedulersRequest, - ListInferenceSchedulersResponse, ListLabelGroupsRequest, ListLabelGroupsResponse, ListLabelsRequest, @@ -173,30 +159,17 @@ import { ListSensorStatisticsRequest, ListSensorStatisticsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, - MissingCompleteSensorData, - MissingSensorData, ModelSummary, - MonotonicValues, - MultipleOperatingModes, ResourceNotFoundException, - S3Object, SensorStatisticsSummary, - SensorsWithShortDateRange, ServiceQuotaExceededException, StartDataIngestionJobRequest, - StartDataIngestionJobResponse, StartInferenceSchedulerRequest, - StartInferenceSchedulerResponse, StopInferenceSchedulerRequest, - StopInferenceSchedulerResponse, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, - UnsupportedTimestamps, UntagResourceRequest, - UntagResourceResponse, UpdateInferenceSchedulerRequest, UpdateLabelGroupRequest, ValidationException, @@ -276,7 +249,7 @@ export const se_DeleteDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataset"); let body: any; - body = JSON.stringify(se_DeleteDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,7 +262,7 @@ export const se_DeleteInferenceSchedulerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInferenceScheduler"); let body: any; - body = JSON.stringify(se_DeleteInferenceSchedulerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +275,7 @@ export const se_DeleteLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLabel"); let body: any; - body = JSON.stringify(se_DeleteLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +288,7 @@ export const se_DeleteLabelGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLabelGroup"); let body: any; - body = JSON.stringify(se_DeleteLabelGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +301,7 @@ export const se_DeleteModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModel"); let body: any; - body = JSON.stringify(se_DeleteModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -341,7 +314,7 @@ export const se_DescribeDataIngestionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataIngestionJob"); let body: any; - body = JSON.stringify(se_DescribeDataIngestionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +327,7 @@ export const se_DescribeDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataset"); let body: any; - body = JSON.stringify(se_DescribeDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +340,7 @@ export const se_DescribeInferenceSchedulerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInferenceScheduler"); let body: any; - body = JSON.stringify(se_DescribeInferenceSchedulerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -380,7 +353,7 @@ export const se_DescribeLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLabel"); let body: any; - body = JSON.stringify(se_DescribeLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -393,7 +366,7 @@ export const se_DescribeLabelGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLabelGroup"); let body: any; - body = JSON.stringify(se_DescribeLabelGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -406,7 +379,7 @@ export const se_DescribeModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModel"); let body: any; - body = JSON.stringify(se_DescribeModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -419,7 +392,7 @@ export const se_ListDataIngestionJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDataIngestionJobs"); let body: any; - body = JSON.stringify(se_ListDataIngestionJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -432,7 +405,7 @@ export const se_ListDatasetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasets"); let body: any; - body = JSON.stringify(se_ListDatasetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -471,7 +444,7 @@ export const se_ListInferenceSchedulersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInferenceSchedulers"); let body: any; - body = JSON.stringify(se_ListInferenceSchedulersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -484,7 +457,7 @@ export const se_ListLabelGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLabelGroups"); let body: any; - body = JSON.stringify(se_ListLabelGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -510,7 +483,7 @@ export const se_ListModelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListModels"); let body: any; - body = JSON.stringify(se_ListModelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -523,7 +496,7 @@ export const se_ListSensorStatisticsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSensorStatistics"); let body: any; - body = JSON.stringify(se_ListSensorStatisticsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -536,7 +509,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -562,7 +535,7 @@ export const se_StartInferenceSchedulerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartInferenceScheduler"); let body: any; - body = JSON.stringify(se_StartInferenceSchedulerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -575,7 +548,7 @@ export const se_StopInferenceSchedulerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopInferenceScheduler"); let body: any; - body = JSON.stringify(se_StopInferenceSchedulerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -588,7 +561,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -601,7 +574,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -614,7 +587,7 @@ export const se_UpdateInferenceSchedulerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateInferenceScheduler"); let body: any; - body = JSON.stringify(se_UpdateInferenceSchedulerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -627,7 +600,7 @@ export const se_UpdateLabelGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLabelGroup"); let body: any; - body = JSON.stringify(se_UpdateLabelGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -643,12 +616,12 @@ export const de_CreateDatasetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetResponse(data, context); + contents = _json(data); const response: CreateDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -684,10 +657,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -705,12 +677,12 @@ export const de_CreateInferenceSchedulerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateInferenceSchedulerResponse(data, context); + contents = _json(data); const response: CreateInferenceSchedulerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -749,10 +721,9 @@ const de_CreateInferenceSchedulerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -770,12 +741,12 @@ export const de_CreateLabelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLabelResponse(data, context); + contents = _json(data); const response: CreateLabelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -814,10 +785,9 @@ const de_CreateLabelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -835,12 +805,12 @@ export const de_CreateLabelGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLabelGroupResponse(data, context); + contents = _json(data); const response: CreateLabelGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -876,10 +846,9 @@ const de_CreateLabelGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -897,12 +866,12 @@ export const de_CreateModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelResponse(data, context); + contents = _json(data); const response: CreateModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -941,10 +910,9 @@ const de_CreateModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -964,7 +932,7 @@ export const de_DeleteDatasetCommand = async ( const response: DeleteDatasetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1000,10 +968,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1023,7 +990,7 @@ export const de_DeleteInferenceSchedulerCommand = async ( const response: DeleteInferenceSchedulerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1059,10 +1026,9 @@ const de_DeleteInferenceSchedulerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1082,7 +1048,7 @@ export const de_DeleteLabelCommand = async ( const response: DeleteLabelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1118,10 +1084,9 @@ const de_DeleteLabelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1141,7 +1106,7 @@ export const de_DeleteLabelGroupCommand = async ( const response: DeleteLabelGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1177,10 +1142,9 @@ const de_DeleteLabelGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,7 +1164,7 @@ export const de_DeleteModelCommand = async ( const response: DeleteModelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1236,10 +1200,9 @@ const de_DeleteModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1262,7 +1225,7 @@ export const de_DescribeDataIngestionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1295,10 +1258,9 @@ const de_DescribeDataIngestionJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1321,7 +1283,7 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1354,10 +1316,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1380,7 +1341,7 @@ export const de_DescribeInferenceSchedulerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1413,10 +1374,9 @@ const de_DescribeInferenceSchedulerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1439,7 +1399,7 @@ export const de_DescribeLabelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1472,10 +1432,9 @@ const de_DescribeLabelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1498,7 +1457,7 @@ export const de_DescribeLabelGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1531,10 +1490,9 @@ const de_DescribeLabelGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1557,7 +1515,7 @@ export const de_DescribeModelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1590,10 +1548,9 @@ const de_DescribeModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1611,12 +1568,12 @@ export const de_ListDataIngestionJobsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDataIngestionJobsResponse(data, context); + contents = _json(data); const response: ListDataIngestionJobsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1646,10 +1603,9 @@ const de_ListDataIngestionJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1672,7 +1628,7 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1702,10 +1658,9 @@ const de_ListDatasetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1728,7 +1683,7 @@ export const de_ListInferenceEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1761,10 +1716,9 @@ const de_ListInferenceEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1787,7 +1741,7 @@ export const de_ListInferenceExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1820,10 +1774,9 @@ const de_ListInferenceExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1841,12 +1794,12 @@ export const de_ListInferenceSchedulersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListInferenceSchedulersResponse(data, context); + contents = _json(data); const response: ListInferenceSchedulersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1876,10 +1829,9 @@ const de_ListInferenceSchedulersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1902,7 +1854,7 @@ export const de_ListLabelGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1932,10 +1884,9 @@ const de_ListLabelGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,7 +1909,7 @@ export const de_ListLabelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1988,10 +1939,9 @@ const de_ListLabelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2014,7 +1964,7 @@ export const de_ListModelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2044,10 +1994,9 @@ const de_ListModelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2070,7 +2019,7 @@ export const de_ListSensorStatisticsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2103,10 +2052,9 @@ const de_ListSensorStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2124,12 +2072,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2162,10 +2110,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2183,12 +2130,12 @@ export const de_StartDataIngestionJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDataIngestionJobResponse(data, context); + contents = _json(data); const response: StartDataIngestionJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2227,10 +2174,9 @@ const de_StartDataIngestionJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2248,12 +2194,12 @@ export const de_StartInferenceSchedulerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartInferenceSchedulerResponse(data, context); + contents = _json(data); const response: StartInferenceSchedulerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2289,10 +2235,9 @@ const de_StartInferenceSchedulerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2310,12 +2255,12 @@ export const de_StopInferenceSchedulerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopInferenceSchedulerResponse(data, context); + contents = _json(data); const response: StopInferenceSchedulerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2351,10 +2296,9 @@ const de_StopInferenceSchedulerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2372,12 +2316,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2413,10 +2357,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2434,12 +2377,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2472,10 +2415,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2495,7 +2437,7 @@ export const de_UpdateInferenceSchedulerCommand = async ( const response: UpdateInferenceSchedulerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2531,10 +2473,9 @@ const de_UpdateInferenceSchedulerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2554,7 +2495,7 @@ export const de_UpdateLabelGroupCommand = async ( const response: UpdateLabelGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2590,10 +2531,9 @@ const de_UpdateLabelGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2607,7 +2547,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2620,7 +2560,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2636,7 +2576,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2652,7 +2592,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2668,7 +2608,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2681,7 +2621,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2694,7 +2634,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2706,730 +2646,255 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_0CreateDatasetRequest */ const se_CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.DatasetSchema != null && { DatasetSchema: se_DatasetSchema(input.DatasetSchema, context) }), - ...(input.ServerSideKmsKeyId != null && { ServerSideKmsKeyId: input.ServerSideKmsKeyId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DatasetName: [], + DatasetSchema: (_) => se_DatasetSchema(_, context), + ServerSideKmsKeyId: [], + Tags: _json, + }); }; /** * serializeAws_json1_0CreateInferenceSchedulerRequest */ const se_CreateInferenceSchedulerRequest = (input: CreateInferenceSchedulerRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataDelayOffsetInMinutes != null && { DataDelayOffsetInMinutes: input.DataDelayOffsetInMinutes }), - ...(input.DataInputConfiguration != null && { - DataInputConfiguration: se_InferenceInputConfiguration(input.DataInputConfiguration, context), - }), - ...(input.DataOutputConfiguration != null && { - DataOutputConfiguration: se_InferenceOutputConfiguration(input.DataOutputConfiguration, context), - }), - ...(input.DataUploadFrequency != null && { DataUploadFrequency: input.DataUploadFrequency }), - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.ServerSideKmsKeyId != null && { ServerSideKmsKeyId: input.ServerSideKmsKeyId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataDelayOffsetInMinutes: [], + DataInputConfiguration: _json, + DataOutputConfiguration: _json, + DataUploadFrequency: [], + InferenceSchedulerName: [], + ModelName: [], + RoleArn: [], + ServerSideKmsKeyId: [], + Tags: _json, + }); }; /** * serializeAws_json1_0CreateLabelGroupRequest */ const se_CreateLabelGroupRequest = (input: CreateLabelGroupRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.FaultCodes != null && { FaultCodes: se_FaultCodes(input.FaultCodes, context) }), - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + FaultCodes: _json, + LabelGroupName: [], + Tags: _json, + }); }; /** * serializeAws_json1_0CreateLabelRequest */ const se_CreateLabelRequest = (input: CreateLabelRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.Equipment != null && { Equipment: input.Equipment }), - ...(input.FaultCode != null && { FaultCode: input.FaultCode }), - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.Rating != null && { Rating: input.Rating }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + EndTime: (_) => Math.round(_.getTime() / 1000), + Equipment: [], + FaultCode: [], + LabelGroupName: [], + Notes: [], + Rating: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_0CreateModelRequest */ const se_CreateModelRequest = (input: CreateModelRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataPreProcessingConfiguration != null && { - DataPreProcessingConfiguration: se_DataPreProcessingConfiguration(input.DataPreProcessingConfiguration, context), - }), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.DatasetSchema != null && { DatasetSchema: se_DatasetSchema(input.DatasetSchema, context) }), - ...(input.EvaluationDataEndTime != null && { - EvaluationDataEndTime: Math.round(input.EvaluationDataEndTime.getTime() / 1000), - }), - ...(input.EvaluationDataStartTime != null && { - EvaluationDataStartTime: Math.round(input.EvaluationDataStartTime.getTime() / 1000), - }), - ...(input.LabelsInputConfiguration != null && { - LabelsInputConfiguration: se_LabelsInputConfiguration(input.LabelsInputConfiguration, context), - }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.OffCondition != null && { OffCondition: input.OffCondition }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.ServerSideKmsKeyId != null && { ServerSideKmsKeyId: input.ServerSideKmsKeyId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrainingDataEndTime != null && { - TrainingDataEndTime: Math.round(input.TrainingDataEndTime.getTime() / 1000), - }), - ...(input.TrainingDataStartTime != null && { - TrainingDataStartTime: Math.round(input.TrainingDataStartTime.getTime() / 1000), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataPreProcessingConfiguration: _json, + DatasetName: [], + DatasetSchema: (_) => se_DatasetSchema(_, context), + EvaluationDataEndTime: (_) => Math.round(_.getTime() / 1000), + EvaluationDataStartTime: (_) => Math.round(_.getTime() / 1000), + LabelsInputConfiguration: _json, + ModelName: [], + OffCondition: [], + RoleArn: [], + ServerSideKmsKeyId: [], + Tags: _json, + TrainingDataEndTime: (_) => Math.round(_.getTime() / 1000), + TrainingDataStartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_0DataPreProcessingConfiguration - */ -const se_DataPreProcessingConfiguration = (input: DataPreProcessingConfiguration, context: __SerdeContext): any => { - return { - ...(input.TargetSamplingRate != null && { TargetSamplingRate: input.TargetSamplingRate }), - }; -}; +// se_DataPreProcessingConfiguration omitted. /** * serializeAws_json1_0DatasetSchema */ const se_DatasetSchema = (input: DatasetSchema, context: __SerdeContext): any => { - return { - ...(input.InlineDataSchema != null && { InlineDataSchema: __LazyJsonString.fromObject(input.InlineDataSchema) }), - }; + return take(input, { + InlineDataSchema: __LazyJsonString.fromObject, + }); }; -/** - * serializeAws_json1_0DeleteDatasetRequest - */ -const se_DeleteDatasetRequest = (input: DeleteDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - }; -}; +// se_DeleteDatasetRequest omitted. -/** - * serializeAws_json1_0DeleteInferenceSchedulerRequest - */ -const se_DeleteInferenceSchedulerRequest = (input: DeleteInferenceSchedulerRequest, context: __SerdeContext): any => { - return { - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - }; -}; +// se_DeleteInferenceSchedulerRequest omitted. -/** - * serializeAws_json1_0DeleteLabelGroupRequest - */ -const se_DeleteLabelGroupRequest = (input: DeleteLabelGroupRequest, context: __SerdeContext): any => { - return { - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - }; -}; +// se_DeleteLabelGroupRequest omitted. -/** - * serializeAws_json1_0DeleteLabelRequest - */ -const se_DeleteLabelRequest = (input: DeleteLabelRequest, context: __SerdeContext): any => { - return { - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - ...(input.LabelId != null && { LabelId: input.LabelId }), - }; -}; +// se_DeleteLabelRequest omitted. -/** - * serializeAws_json1_0DeleteModelRequest - */ -const se_DeleteModelRequest = (input: DeleteModelRequest, context: __SerdeContext): any => { - return { - ...(input.ModelName != null && { ModelName: input.ModelName }), - }; -}; +// se_DeleteModelRequest omitted. -/** - * serializeAws_json1_0DescribeDataIngestionJobRequest - */ -const se_DescribeDataIngestionJobRequest = (input: DescribeDataIngestionJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeDataIngestionJobRequest omitted. -/** - * serializeAws_json1_0DescribeDatasetRequest - */ -const se_DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - }; -}; +// se_DescribeDatasetRequest omitted. -/** - * serializeAws_json1_0DescribeInferenceSchedulerRequest - */ -const se_DescribeInferenceSchedulerRequest = ( - input: DescribeInferenceSchedulerRequest, - context: __SerdeContext -): any => { - return { - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - }; -}; +// se_DescribeInferenceSchedulerRequest omitted. -/** - * serializeAws_json1_0DescribeLabelGroupRequest - */ -const se_DescribeLabelGroupRequest = (input: DescribeLabelGroupRequest, context: __SerdeContext): any => { - return { - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - }; -}; +// se_DescribeLabelGroupRequest omitted. -/** - * serializeAws_json1_0DescribeLabelRequest - */ -const se_DescribeLabelRequest = (input: DescribeLabelRequest, context: __SerdeContext): any => { - return { - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - ...(input.LabelId != null && { LabelId: input.LabelId }), - }; -}; +// se_DescribeLabelRequest omitted. -/** - * serializeAws_json1_0DescribeModelRequest - */ -const se_DescribeModelRequest = (input: DescribeModelRequest, context: __SerdeContext): any => { - return { - ...(input.ModelName != null && { ModelName: input.ModelName }), - }; -}; +// se_DescribeModelRequest omitted. -/** - * serializeAws_json1_0FaultCodes - */ -const se_FaultCodes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FaultCodes omitted. -/** - * serializeAws_json1_0InferenceInputConfiguration - */ -const se_InferenceInputConfiguration = (input: InferenceInputConfiguration, context: __SerdeContext): any => { - return { - ...(input.InferenceInputNameConfiguration != null && { - InferenceInputNameConfiguration: se_InferenceInputNameConfiguration( - input.InferenceInputNameConfiguration, - context - ), - }), - ...(input.InputTimeZoneOffset != null && { InputTimeZoneOffset: input.InputTimeZoneOffset }), - ...(input.S3InputConfiguration != null && { - S3InputConfiguration: se_InferenceS3InputConfiguration(input.S3InputConfiguration, context), - }), - }; -}; +// se_InferenceInputConfiguration omitted. -/** - * serializeAws_json1_0InferenceInputNameConfiguration - */ -const se_InferenceInputNameConfiguration = (input: InferenceInputNameConfiguration, context: __SerdeContext): any => { - return { - ...(input.ComponentTimestampDelimiter != null && { - ComponentTimestampDelimiter: input.ComponentTimestampDelimiter, - }), - ...(input.TimestampFormat != null && { TimestampFormat: input.TimestampFormat }), - }; -}; +// se_InferenceInputNameConfiguration omitted. -/** - * serializeAws_json1_0InferenceOutputConfiguration - */ -const se_InferenceOutputConfiguration = (input: InferenceOutputConfiguration, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputConfiguration != null && { - S3OutputConfiguration: se_InferenceS3OutputConfiguration(input.S3OutputConfiguration, context), - }), - }; -}; +// se_InferenceOutputConfiguration omitted. -/** - * serializeAws_json1_0InferenceS3InputConfiguration - */ -const se_InferenceS3InputConfiguration = (input: InferenceS3InputConfiguration, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_InferenceS3InputConfiguration omitted. -/** - * serializeAws_json1_0InferenceS3OutputConfiguration - */ -const se_InferenceS3OutputConfiguration = (input: InferenceS3OutputConfiguration, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_InferenceS3OutputConfiguration omitted. -/** - * serializeAws_json1_0IngestionInputConfiguration - */ -const se_IngestionInputConfiguration = (input: IngestionInputConfiguration, context: __SerdeContext): any => { - return { - ...(input.S3InputConfiguration != null && { - S3InputConfiguration: se_IngestionS3InputConfiguration(input.S3InputConfiguration, context), - }), - }; -}; +// se_IngestionInputConfiguration omitted. -/** - * serializeAws_json1_0IngestionS3InputConfiguration - */ -const se_IngestionS3InputConfiguration = (input: IngestionS3InputConfiguration, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.KeyPattern != null && { KeyPattern: input.KeyPattern }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_IngestionS3InputConfiguration omitted. -/** - * serializeAws_json1_0LabelsInputConfiguration - */ -const se_LabelsInputConfiguration = (input: LabelsInputConfiguration, context: __SerdeContext): any => { - return { - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - ...(input.S3InputConfiguration != null && { - S3InputConfiguration: se_LabelsS3InputConfiguration(input.S3InputConfiguration, context), - }), - }; -}; +// se_LabelsInputConfiguration omitted. -/** - * serializeAws_json1_0LabelsS3InputConfiguration - */ -const se_LabelsS3InputConfiguration = (input: LabelsS3InputConfiguration, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_LabelsS3InputConfiguration omitted. -/** - * serializeAws_json1_0ListDataIngestionJobsRequest - */ -const se_ListDataIngestionJobsRequest = (input: ListDataIngestionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListDataIngestionJobsRequest omitted. -/** - * serializeAws_json1_0ListDatasetsRequest - */ -const se_ListDatasetsRequest = (input: ListDatasetsRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetNameBeginsWith != null && { DatasetNameBeginsWith: input.DatasetNameBeginsWith }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatasetsRequest omitted. /** * serializeAws_json1_0ListInferenceEventsRequest */ const se_ListInferenceEventsRequest = (input: ListInferenceEventsRequest, context: __SerdeContext): any => { - return { - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - ...(input.IntervalEndTime != null && { IntervalEndTime: Math.round(input.IntervalEndTime.getTime() / 1000) }), - ...(input.IntervalStartTime != null && { IntervalStartTime: Math.round(input.IntervalStartTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + InferenceSchedulerName: [], + IntervalEndTime: (_) => Math.round(_.getTime() / 1000), + IntervalStartTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + }); }; /** * serializeAws_json1_0ListInferenceExecutionsRequest */ const se_ListInferenceExecutionsRequest = (input: ListInferenceExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.DataEndTimeBefore != null && { DataEndTimeBefore: Math.round(input.DataEndTimeBefore.getTime() / 1000) }), - ...(input.DataStartTimeAfter != null && { - DataStartTimeAfter: Math.round(input.DataStartTimeAfter.getTime() / 1000), - }), - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; + return take(input, { + DataEndTimeBefore: (_) => Math.round(_.getTime() / 1000), + DataStartTimeAfter: (_) => Math.round(_.getTime() / 1000), + InferenceSchedulerName: [], + MaxResults: [], + NextToken: [], + Status: [], + }); }; -/** - * serializeAws_json1_0ListInferenceSchedulersRequest - */ -const se_ListInferenceSchedulersRequest = (input: ListInferenceSchedulersRequest, context: __SerdeContext): any => { - return { - ...(input.InferenceSchedulerNameBeginsWith != null && { - InferenceSchedulerNameBeginsWith: input.InferenceSchedulerNameBeginsWith, - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListInferenceSchedulersRequest omitted. -/** - * serializeAws_json1_0ListLabelGroupsRequest - */ -const se_ListLabelGroupsRequest = (input: ListLabelGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.LabelGroupNameBeginsWith != null && { LabelGroupNameBeginsWith: input.LabelGroupNameBeginsWith }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLabelGroupsRequest omitted. /** * serializeAws_json1_0ListLabelsRequest */ const se_ListLabelsRequest = (input: ListLabelsRequest, context: __SerdeContext): any => { - return { - ...(input.Equipment != null && { Equipment: input.Equipment }), - ...(input.FaultCode != null && { FaultCode: input.FaultCode }), - ...(input.IntervalEndTime != null && { IntervalEndTime: Math.round(input.IntervalEndTime.getTime() / 1000) }), - ...(input.IntervalStartTime != null && { IntervalStartTime: Math.round(input.IntervalStartTime.getTime() / 1000) }), - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Equipment: [], + FaultCode: [], + IntervalEndTime: (_) => Math.round(_.getTime() / 1000), + IntervalStartTime: (_) => Math.round(_.getTime() / 1000), + LabelGroupName: [], + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_0ListModelsRequest - */ -const se_ListModelsRequest = (input: ListModelsRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetNameBeginsWith != null && { DatasetNameBeginsWith: input.DatasetNameBeginsWith }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelNameBeginsWith != null && { ModelNameBeginsWith: input.ModelNameBeginsWith }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListModelsRequest omitted. -/** - * serializeAws_json1_0ListSensorStatisticsRequest - */ -const se_ListSensorStatisticsRequest = (input: ListSensorStatisticsRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.IngestionJobId != null && { IngestionJobId: input.IngestionJobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListSensorStatisticsRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. /** * serializeAws_json1_0StartDataIngestionJobRequest */ const se_StartDataIngestionJobRequest = (input: StartDataIngestionJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DatasetName != null && { DatasetName: input.DatasetName }), - ...(input.IngestionInputConfiguration != null && { - IngestionInputConfiguration: se_IngestionInputConfiguration(input.IngestionInputConfiguration, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DatasetName: [], + IngestionInputConfiguration: _json, + RoleArn: [], + }); }; -/** - * serializeAws_json1_0StartInferenceSchedulerRequest - */ -const se_StartInferenceSchedulerRequest = (input: StartInferenceSchedulerRequest, context: __SerdeContext): any => { - return { - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - }; -}; +// se_StartInferenceSchedulerRequest omitted. -/** - * serializeAws_json1_0StopInferenceSchedulerRequest - */ -const se_StopInferenceSchedulerRequest = (input: StopInferenceSchedulerRequest, context: __SerdeContext): any => { - return { - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - }; -}; +// se_StopInferenceSchedulerRequest omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateInferenceSchedulerRequest - */ -const se_UpdateInferenceSchedulerRequest = (input: UpdateInferenceSchedulerRequest, context: __SerdeContext): any => { - return { - ...(input.DataDelayOffsetInMinutes != null && { DataDelayOffsetInMinutes: input.DataDelayOffsetInMinutes }), - ...(input.DataInputConfiguration != null && { - DataInputConfiguration: se_InferenceInputConfiguration(input.DataInputConfiguration, context), - }), - ...(input.DataOutputConfiguration != null && { - DataOutputConfiguration: se_InferenceOutputConfiguration(input.DataOutputConfiguration, context), - }), - ...(input.DataUploadFrequency != null && { DataUploadFrequency: input.DataUploadFrequency }), - ...(input.InferenceSchedulerName != null && { InferenceSchedulerName: input.InferenceSchedulerName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_UpdateInferenceSchedulerRequest omitted. -/** - * serializeAws_json1_0UpdateLabelGroupRequest - */ -const se_UpdateLabelGroupRequest = (input: UpdateLabelGroupRequest, context: __SerdeContext): any => { - return { - ...(input.FaultCodes != null && { FaultCodes: se_FaultCodes(input.FaultCodes, context) }), - ...(input.LabelGroupName != null && { LabelGroupName: input.LabelGroupName }), - }; -}; +// se_UpdateLabelGroupRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0CategoricalValues - */ -const de_CategoricalValues = (output: any, context: __SerdeContext): CategoricalValues => { - return { - NumberOfCategory: __expectInt32(output.NumberOfCategory), - Status: __expectString(output.Status), - } as any; -}; +// de_CategoricalValues omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. /** * deserializeAws_json1_0CountPercent */ const de_CountPercent = (output: any, context: __SerdeContext): CountPercent => { - return { - Count: __expectInt32(output.Count), - Percentage: __limitedParseFloat32(output.Percentage), - } as any; + return take(output, { + Count: __expectInt32, + Percentage: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_0CreateDatasetResponse - */ -const de_CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => { - return { - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - Status: __expectString(output.Status), - } as any; -}; +// de_CreateDatasetResponse omitted. -/** - * deserializeAws_json1_0CreateInferenceSchedulerResponse - */ -const de_CreateInferenceSchedulerResponse = ( - output: any, - context: __SerdeContext -): CreateInferenceSchedulerResponse => { - return { - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - Status: __expectString(output.Status), - } as any; -}; +// de_CreateInferenceSchedulerResponse omitted. -/** - * deserializeAws_json1_0CreateLabelGroupResponse - */ -const de_CreateLabelGroupResponse = (output: any, context: __SerdeContext): CreateLabelGroupResponse => { - return { - LabelGroupArn: __expectString(output.LabelGroupArn), - LabelGroupName: __expectString(output.LabelGroupName), - } as any; -}; +// de_CreateLabelGroupResponse omitted. -/** - * deserializeAws_json1_0CreateLabelResponse - */ -const de_CreateLabelResponse = (output: any, context: __SerdeContext): CreateLabelResponse => { - return { - LabelId: __expectString(output.LabelId), - } as any; -}; +// de_CreateLabelResponse omitted. -/** - * deserializeAws_json1_0CreateModelResponse - */ -const de_CreateModelResponse = (output: any, context: __SerdeContext): CreateModelResponse => { - return { - ModelArn: __expectString(output.ModelArn), - Status: __expectString(output.Status), - } as any; -}; +// de_CreateModelResponse omitted. -/** - * deserializeAws_json1_0DataIngestionJobSummaries - */ -const de_DataIngestionJobSummaries = (output: any, context: __SerdeContext): DataIngestionJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataIngestionJobSummary(entry, context); - }); - return retVal; -}; +// de_DataIngestionJobSummaries omitted. -/** - * deserializeAws_json1_0DataIngestionJobSummary - */ -const de_DataIngestionJobSummary = (output: any, context: __SerdeContext): DataIngestionJobSummary => { - return { - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - IngestionInputConfiguration: - output.IngestionInputConfiguration != null - ? de_IngestionInputConfiguration(output.IngestionInputConfiguration, context) - : undefined, - JobId: __expectString(output.JobId), - Status: __expectString(output.Status), - } as any; -}; +// de_DataIngestionJobSummary omitted. -/** - * deserializeAws_json1_0DataPreProcessingConfiguration - */ -const de_DataPreProcessingConfiguration = (output: any, context: __SerdeContext): DataPreProcessingConfiguration => { - return { - TargetSamplingRate: __expectString(output.TargetSamplingRate), - } as any; -}; +// de_DataPreProcessingConfiguration omitted. -/** - * deserializeAws_json1_0DataQualitySummary - */ -const de_DataQualitySummary = (output: any, context: __SerdeContext): DataQualitySummary => { - return { - DuplicateTimestamps: - output.DuplicateTimestamps != null ? de_DuplicateTimestamps(output.DuplicateTimestamps, context) : undefined, - InsufficientSensorData: - output.InsufficientSensorData != null - ? de_InsufficientSensorData(output.InsufficientSensorData, context) - : undefined, - InvalidSensorData: - output.InvalidSensorData != null ? de_InvalidSensorData(output.InvalidSensorData, context) : undefined, - MissingSensorData: - output.MissingSensorData != null ? de_MissingSensorData(output.MissingSensorData, context) : undefined, - UnsupportedTimestamps: - output.UnsupportedTimestamps != null - ? de_UnsupportedTimestamps(output.UnsupportedTimestamps, context) - : undefined, - } as any; -}; +// de_DataQualitySummary omitted. /** * deserializeAws_json1_0DatasetSummaries @@ -3438,9 +2903,6 @@ const de_DatasetSummaries = (output: any, context: __SerdeContext): DatasetSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetSummary(entry, context); }); return retVal; @@ -3450,13 +2912,12 @@ const de_DatasetSummaries = (output: any, context: __SerdeContext): DatasetSumma * deserializeAws_json1_0DatasetSummary */ const de_DatasetSummary = (output: any, context: __SerdeContext): DatasetSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + DatasetName: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3466,69 +2927,42 @@ const de_DescribeDataIngestionJobResponse = ( output: any, context: __SerdeContext ): DescribeDataIngestionJobResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DataEndTime: - output.DataEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataEndTime))) - : undefined, - DataQualitySummary: - output.DataQualitySummary != null ? de_DataQualitySummary(output.DataQualitySummary, context) : undefined, - DataStartTime: - output.DataStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataStartTime))) - : undefined, - DatasetArn: __expectString(output.DatasetArn), - FailedReason: __expectString(output.FailedReason), - IngestedDataSize: __expectLong(output.IngestedDataSize), - IngestedFilesSummary: - output.IngestedFilesSummary != null ? de_IngestedFilesSummary(output.IngestedFilesSummary, context) : undefined, - IngestionInputConfiguration: - output.IngestionInputConfiguration != null - ? de_IngestionInputConfiguration(output.IngestionInputConfiguration, context) - : undefined, - JobId: __expectString(output.JobId), - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - StatusDetail: __expectString(output.StatusDetail), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataQualitySummary: _json, + DataStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + FailedReason: __expectString, + IngestedDataSize: __expectLong, + IngestedFilesSummary: _json, + IngestionInputConfiguration: _json, + JobId: __expectString, + RoleArn: __expectString, + Status: __expectString, + StatusDetail: __expectString, + }) as any; }; /** * deserializeAws_json1_0DescribeDatasetResponse */ const de_DescribeDatasetResponse = (output: any, context: __SerdeContext): DescribeDatasetResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DataEndTime: - output.DataEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataEndTime))) - : undefined, - DataQualitySummary: - output.DataQualitySummary != null ? de_DataQualitySummary(output.DataQualitySummary, context) : undefined, - DataStartTime: - output.DataStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataStartTime))) - : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - IngestedFilesSummary: - output.IngestedFilesSummary != null ? de_IngestedFilesSummary(output.IngestedFilesSummary, context) : undefined, - IngestionInputConfiguration: - output.IngestionInputConfiguration != null - ? de_IngestionInputConfiguration(output.IngestionInputConfiguration, context) - : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - RoleArn: __expectString(output.RoleArn), - Schema: output.Schema != null ? new __LazyJsonString(output.Schema) : undefined, - ServerSideKmsKeyId: __expectString(output.ServerSideKmsKeyId), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataQualitySummary: _json, + DataStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + DatasetName: __expectString, + IngestedFilesSummary: _json, + IngestionInputConfiguration: _json, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + Schema: (_: any) => new __LazyJsonString(_), + ServerSideKmsKeyId: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3538,148 +2972,87 @@ const de_DescribeInferenceSchedulerResponse = ( output: any, context: __SerdeContext ): DescribeInferenceSchedulerResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DataDelayOffsetInMinutes: __expectLong(output.DataDelayOffsetInMinutes), - DataInputConfiguration: - output.DataInputConfiguration != null - ? de_InferenceInputConfiguration(output.DataInputConfiguration, context) - : undefined, - DataOutputConfiguration: - output.DataOutputConfiguration != null - ? de_InferenceOutputConfiguration(output.DataOutputConfiguration, context) - : undefined, - DataUploadFrequency: __expectString(output.DataUploadFrequency), - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - LatestInferenceResult: __expectString(output.LatestInferenceResult), - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - RoleArn: __expectString(output.RoleArn), - ServerSideKmsKeyId: __expectString(output.ServerSideKmsKeyId), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataDelayOffsetInMinutes: __expectLong, + DataInputConfiguration: _json, + DataOutputConfiguration: _json, + DataUploadFrequency: __expectString, + InferenceSchedulerArn: __expectString, + InferenceSchedulerName: __expectString, + LatestInferenceResult: __expectString, + ModelArn: __expectString, + ModelName: __expectString, + RoleArn: __expectString, + ServerSideKmsKeyId: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0DescribeLabelGroupResponse */ const de_DescribeLabelGroupResponse = (output: any, context: __SerdeContext): DescribeLabelGroupResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - FaultCodes: output.FaultCodes != null ? de_FaultCodes(output.FaultCodes, context) : undefined, - LabelGroupArn: __expectString(output.LabelGroupArn), - LabelGroupName: __expectString(output.LabelGroupName), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FaultCodes: _json, + LabelGroupArn: __expectString, + LabelGroupName: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0DescribeLabelResponse */ const de_DescribeLabelResponse = (output: any, context: __SerdeContext): DescribeLabelResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Equipment: __expectString(output.Equipment), - FaultCode: __expectString(output.FaultCode), - LabelGroupArn: __expectString(output.LabelGroupArn), - LabelGroupName: __expectString(output.LabelGroupName), - LabelId: __expectString(output.LabelId), - Notes: __expectString(output.Notes), - Rating: __expectString(output.Rating), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Equipment: __expectString, + FaultCode: __expectString, + LabelGroupArn: __expectString, + LabelGroupName: __expectString, + LabelId: __expectString, + Notes: __expectString, + Rating: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0DescribeModelResponse */ const de_DescribeModelResponse = (output: any, context: __SerdeContext): DescribeModelResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DataPreProcessingConfiguration: - output.DataPreProcessingConfiguration != null - ? de_DataPreProcessingConfiguration(output.DataPreProcessingConfiguration, context) - : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - EvaluationDataEndTime: - output.EvaluationDataEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationDataEndTime))) - : undefined, - EvaluationDataStartTime: - output.EvaluationDataStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationDataStartTime))) - : undefined, - FailedReason: __expectString(output.FailedReason), - LabelsInputConfiguration: - output.LabelsInputConfiguration != null - ? de_LabelsInputConfiguration(output.LabelsInputConfiguration, context) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - ModelArn: __expectString(output.ModelArn), - ModelMetrics: output.ModelMetrics != null ? new __LazyJsonString(output.ModelMetrics) : undefined, - ModelName: __expectString(output.ModelName), - OffCondition: __expectString(output.OffCondition), - RoleArn: __expectString(output.RoleArn), - Schema: output.Schema != null ? new __LazyJsonString(output.Schema) : undefined, - ServerSideKmsKeyId: __expectString(output.ServerSideKmsKeyId), - Status: __expectString(output.Status), - TrainingDataEndTime: - output.TrainingDataEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingDataEndTime))) - : undefined, - TrainingDataStartTime: - output.TrainingDataStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingDataStartTime))) - : undefined, - TrainingExecutionEndTime: - output.TrainingExecutionEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingExecutionEndTime))) - : undefined, - TrainingExecutionStartTime: - output.TrainingExecutionStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingExecutionStartTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DuplicateTimestamps - */ -const de_DuplicateTimestamps = (output: any, context: __SerdeContext): DuplicateTimestamps => { - return { - TotalNumberOfDuplicateTimestamps: __expectInt32(output.TotalNumberOfDuplicateTimestamps), - } as any; -}; - -/** - * deserializeAws_json1_0FaultCodes - */ -const de_FaultCodes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataPreProcessingConfiguration: _json, + DatasetArn: __expectString, + DatasetName: __expectString, + EvaluationDataEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationDataStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailedReason: __expectString, + LabelsInputConfiguration: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelArn: __expectString, + ModelMetrics: (_: any) => new __LazyJsonString(_), + ModelName: __expectString, + OffCondition: __expectString, + RoleArn: __expectString, + Schema: (_: any) => new __LazyJsonString(_), + ServerSideKmsKeyId: __expectString, + Status: __expectString, + TrainingDataEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingDataStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingExecutionEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingExecutionStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_DuplicateTimestamps omitted. + +// de_FaultCodes omitted. /** * deserializeAws_json1_0InferenceEventSummaries @@ -3688,9 +3061,6 @@ const de_InferenceEventSummaries = (output: any, context: __SerdeContext): Infer const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InferenceEventSummary(entry, context); }); return retVal; @@ -3700,20 +3070,14 @@ const de_InferenceEventSummaries = (output: any, context: __SerdeContext): Infer * deserializeAws_json1_0InferenceEventSummary */ const de_InferenceEventSummary = (output: any, context: __SerdeContext): InferenceEventSummary => { - return { - Diagnostics: __expectString(output.Diagnostics), - EventDurationInSeconds: __expectLong(output.EventDurationInSeconds), - EventEndTime: - output.EventEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventEndTime))) - : undefined, - EventStartTime: - output.EventStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventStartTime))) - : undefined, - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - } as any; + return take(output, { + Diagnostics: __expectString, + EventDurationInSeconds: __expectLong, + EventEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EventStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InferenceSchedulerArn: __expectString, + InferenceSchedulerName: __expectString, + }) as any; }; /** @@ -3723,9 +3087,6 @@ const de_InferenceExecutionSummaries = (output: any, context: __SerdeContext): I const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InferenceExecutionSummary(entry, context); }); return retVal; @@ -3735,197 +3096,47 @@ const de_InferenceExecutionSummaries = (output: any, context: __SerdeContext): I * deserializeAws_json1_0InferenceExecutionSummary */ const de_InferenceExecutionSummary = (output: any, context: __SerdeContext): InferenceExecutionSummary => { - return { - CustomerResultObject: - output.CustomerResultObject != null ? de_S3Object(output.CustomerResultObject, context) : undefined, - DataEndTime: - output.DataEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataEndTime))) - : undefined, - DataInputConfiguration: - output.DataInputConfiguration != null - ? de_InferenceInputConfiguration(output.DataInputConfiguration, context) - : undefined, - DataOutputConfiguration: - output.DataOutputConfiguration != null - ? de_InferenceOutputConfiguration(output.DataOutputConfiguration, context) - : undefined, - DataStartTime: - output.DataStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataStartTime))) - : undefined, - FailedReason: __expectString(output.FailedReason), - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - ScheduledStartTime: - output.ScheduledStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledStartTime))) - : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_0InferenceInputConfiguration - */ -const de_InferenceInputConfiguration = (output: any, context: __SerdeContext): InferenceInputConfiguration => { - return { - InferenceInputNameConfiguration: - output.InferenceInputNameConfiguration != null - ? de_InferenceInputNameConfiguration(output.InferenceInputNameConfiguration, context) - : undefined, - InputTimeZoneOffset: __expectString(output.InputTimeZoneOffset), - S3InputConfiguration: - output.S3InputConfiguration != null - ? de_InferenceS3InputConfiguration(output.S3InputConfiguration, context) - : undefined, - } as any; + return take(output, { + CustomerResultObject: _json, + DataEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataInputConfiguration: _json, + DataOutputConfiguration: _json, + DataStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailedReason: __expectString, + InferenceSchedulerArn: __expectString, + InferenceSchedulerName: __expectString, + ModelArn: __expectString, + ModelName: __expectString, + ScheduledStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0InferenceInputNameConfiguration - */ -const de_InferenceInputNameConfiguration = (output: any, context: __SerdeContext): InferenceInputNameConfiguration => { - return { - ComponentTimestampDelimiter: __expectString(output.ComponentTimestampDelimiter), - TimestampFormat: __expectString(output.TimestampFormat), - } as any; -}; +// de_InferenceInputConfiguration omitted. -/** - * deserializeAws_json1_0InferenceOutputConfiguration - */ -const de_InferenceOutputConfiguration = (output: any, context: __SerdeContext): InferenceOutputConfiguration => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputConfiguration: - output.S3OutputConfiguration != null - ? de_InferenceS3OutputConfiguration(output.S3OutputConfiguration, context) - : undefined, - } as any; -}; +// de_InferenceInputNameConfiguration omitted. -/** - * deserializeAws_json1_0InferenceS3InputConfiguration - */ -const de_InferenceS3InputConfiguration = (output: any, context: __SerdeContext): InferenceS3InputConfiguration => { - return { - Bucket: __expectString(output.Bucket), - Prefix: __expectString(output.Prefix), - } as any; -}; +// de_InferenceOutputConfiguration omitted. -/** - * deserializeAws_json1_0InferenceS3OutputConfiguration - */ -const de_InferenceS3OutputConfiguration = (output: any, context: __SerdeContext): InferenceS3OutputConfiguration => { - return { - Bucket: __expectString(output.Bucket), - Prefix: __expectString(output.Prefix), - } as any; -}; +// de_InferenceS3InputConfiguration omitted. -/** - * deserializeAws_json1_0InferenceSchedulerSummaries - */ -const de_InferenceSchedulerSummaries = (output: any, context: __SerdeContext): InferenceSchedulerSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceSchedulerSummary(entry, context); - }); - return retVal; -}; +// de_InferenceS3OutputConfiguration omitted. -/** - * deserializeAws_json1_0InferenceSchedulerSummary - */ -const de_InferenceSchedulerSummary = (output: any, context: __SerdeContext): InferenceSchedulerSummary => { - return { - DataDelayOffsetInMinutes: __expectLong(output.DataDelayOffsetInMinutes), - DataUploadFrequency: __expectString(output.DataUploadFrequency), - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - LatestInferenceResult: __expectString(output.LatestInferenceResult), - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - Status: __expectString(output.Status), - } as any; -}; +// de_InferenceSchedulerSummaries omitted. -/** - * deserializeAws_json1_0IngestedFilesSummary - */ -const de_IngestedFilesSummary = (output: any, context: __SerdeContext): IngestedFilesSummary => { - return { - DiscardedFiles: output.DiscardedFiles != null ? de_ListOfDiscardedFiles(output.DiscardedFiles, context) : undefined, - IngestedNumberOfFiles: __expectInt32(output.IngestedNumberOfFiles), - TotalNumberOfFiles: __expectInt32(output.TotalNumberOfFiles), - } as any; -}; +// de_InferenceSchedulerSummary omitted. -/** - * deserializeAws_json1_0IngestionInputConfiguration - */ -const de_IngestionInputConfiguration = (output: any, context: __SerdeContext): IngestionInputConfiguration => { - return { - S3InputConfiguration: - output.S3InputConfiguration != null - ? de_IngestionS3InputConfiguration(output.S3InputConfiguration, context) - : undefined, - } as any; -}; +// de_IngestedFilesSummary omitted. -/** - * deserializeAws_json1_0IngestionS3InputConfiguration - */ -const de_IngestionS3InputConfiguration = (output: any, context: __SerdeContext): IngestionS3InputConfiguration => { - return { - Bucket: __expectString(output.Bucket), - KeyPattern: __expectString(output.KeyPattern), - Prefix: __expectString(output.Prefix), - } as any; -}; +// de_IngestionInputConfiguration omitted. -/** - * deserializeAws_json1_0InsufficientSensorData - */ -const de_InsufficientSensorData = (output: any, context: __SerdeContext): InsufficientSensorData => { - return { - MissingCompleteSensorData: - output.MissingCompleteSensorData != null - ? de_MissingCompleteSensorData(output.MissingCompleteSensorData, context) - : undefined, - SensorsWithShortDateRange: - output.SensorsWithShortDateRange != null - ? de_SensorsWithShortDateRange(output.SensorsWithShortDateRange, context) - : undefined, - } as any; -}; +// de_IngestionS3InputConfiguration omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InsufficientSensorData omitted. -/** - * deserializeAws_json1_0InvalidSensorData - */ -const de_InvalidSensorData = (output: any, context: __SerdeContext): InvalidSensorData => { - return { - AffectedSensorCount: __expectInt32(output.AffectedSensorCount), - TotalNumberOfInvalidValues: __expectInt32(output.TotalNumberOfInvalidValues), - } as any; -}; +// de_InternalServerException omitted. + +// de_InvalidSensorData omitted. /** * deserializeAws_json1_0LabelGroupSummaries @@ -3934,9 +3145,6 @@ const de_LabelGroupSummaries = (output: any, context: __SerdeContext): LabelGrou const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LabelGroupSummary(entry, context); }); return retVal; @@ -3946,38 +3154,17 @@ const de_LabelGroupSummaries = (output: any, context: __SerdeContext): LabelGrou * deserializeAws_json1_0LabelGroupSummary */ const de_LabelGroupSummary = (output: any, context: __SerdeContext): LabelGroupSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - LabelGroupArn: __expectString(output.LabelGroupArn), - LabelGroupName: __expectString(output.LabelGroupName), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LabelGroupArn: __expectString, + LabelGroupName: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_0LabelsInputConfiguration - */ -const de_LabelsInputConfiguration = (output: any, context: __SerdeContext): LabelsInputConfiguration => { - return { - LabelGroupName: __expectString(output.LabelGroupName), - S3InputConfiguration: - output.S3InputConfiguration != null - ? de_LabelsS3InputConfiguration(output.S3InputConfiguration, context) - : undefined, - } as any; -}; +// de_LabelsInputConfiguration omitted. -/** - * deserializeAws_json1_0LabelsS3InputConfiguration - */ -const de_LabelsS3InputConfiguration = (output: any, context: __SerdeContext): LabelsS3InputConfiguration => { - return { - Bucket: __expectString(output.Bucket), - Prefix: __expectString(output.Prefix), - } as any; -}; +// de_LabelsS3InputConfiguration omitted. /** * deserializeAws_json1_0LabelSummaries @@ -3986,9 +3173,6 @@ const de_LabelSummaries = (output: any, context: __SerdeContext): LabelSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LabelSummary(entry, context); }); return retVal; @@ -3998,182 +3182,102 @@ const de_LabelSummaries = (output: any, context: __SerdeContext): LabelSummary[] * deserializeAws_json1_0LabelSummary */ const de_LabelSummary = (output: any, context: __SerdeContext): LabelSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Equipment: __expectString(output.Equipment), - FaultCode: __expectString(output.FaultCode), - LabelGroupArn: __expectString(output.LabelGroupArn), - LabelGroupName: __expectString(output.LabelGroupName), - LabelId: __expectString(output.LabelId), - Rating: __expectString(output.Rating), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Equipment: __expectString, + FaultCode: __expectString, + LabelGroupArn: __expectString, + LabelGroupName: __expectString, + LabelId: __expectString, + Rating: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_0LargeTimestampGaps - */ -const de_LargeTimestampGaps = (output: any, context: __SerdeContext): LargeTimestampGaps => { - return { - MaxTimestampGapInDays: __expectInt32(output.MaxTimestampGapInDays), - NumberOfLargeTimestampGaps: __expectInt32(output.NumberOfLargeTimestampGaps), - Status: __expectString(output.Status), - } as any; -}; +// de_LargeTimestampGaps omitted. -/** - * deserializeAws_json1_0ListDataIngestionJobsResponse - */ -const de_ListDataIngestionJobsResponse = (output: any, context: __SerdeContext): ListDataIngestionJobsResponse => { - return { - DataIngestionJobSummaries: - output.DataIngestionJobSummaries != null - ? de_DataIngestionJobSummaries(output.DataIngestionJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDataIngestionJobsResponse omitted. /** * deserializeAws_json1_0ListDatasetsResponse */ const de_ListDatasetsResponse = (output: any, context: __SerdeContext): ListDatasetsResponse => { - return { - DatasetSummaries: - output.DatasetSummaries != null ? de_DatasetSummaries(output.DatasetSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DatasetSummaries: (_: any) => de_DatasetSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListInferenceEventsResponse */ const de_ListInferenceEventsResponse = (output: any, context: __SerdeContext): ListInferenceEventsResponse => { - return { - InferenceEventSummaries: - output.InferenceEventSummaries != null - ? de_InferenceEventSummaries(output.InferenceEventSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + InferenceEventSummaries: (_: any) => de_InferenceEventSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListInferenceExecutionsResponse */ const de_ListInferenceExecutionsResponse = (output: any, context: __SerdeContext): ListInferenceExecutionsResponse => { - return { - InferenceExecutionSummaries: - output.InferenceExecutionSummaries != null - ? de_InferenceExecutionSummaries(output.InferenceExecutionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + InferenceExecutionSummaries: (_: any) => de_InferenceExecutionSummaries(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListInferenceSchedulersResponse - */ -const de_ListInferenceSchedulersResponse = (output: any, context: __SerdeContext): ListInferenceSchedulersResponse => { - return { - InferenceSchedulerSummaries: - output.InferenceSchedulerSummaries != null - ? de_InferenceSchedulerSummaries(output.InferenceSchedulerSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListInferenceSchedulersResponse omitted. /** * deserializeAws_json1_0ListLabelGroupsResponse */ const de_ListLabelGroupsResponse = (output: any, context: __SerdeContext): ListLabelGroupsResponse => { - return { - LabelGroupSummaries: - output.LabelGroupSummaries != null ? de_LabelGroupSummaries(output.LabelGroupSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + LabelGroupSummaries: (_: any) => de_LabelGroupSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListLabelsResponse */ const de_ListLabelsResponse = (output: any, context: __SerdeContext): ListLabelsResponse => { - return { - LabelSummaries: output.LabelSummaries != null ? de_LabelSummaries(output.LabelSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + LabelSummaries: (_: any) => de_LabelSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListModelsResponse */ const de_ListModelsResponse = (output: any, context: __SerdeContext): ListModelsResponse => { - return { - ModelSummaries: output.ModelSummaries != null ? de_ModelSummaries(output.ModelSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ModelSummaries: (_: any) => de_ModelSummaries(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListOfDiscardedFiles - */ -const de_ListOfDiscardedFiles = (output: any, context: __SerdeContext): S3Object[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3Object(entry, context); - }); - return retVal; -}; +// de_ListOfDiscardedFiles omitted. /** * deserializeAws_json1_0ListSensorStatisticsResponse */ const de_ListSensorStatisticsResponse = (output: any, context: __SerdeContext): ListSensorStatisticsResponse => { - return { - NextToken: __expectString(output.NextToken), - SensorStatisticsSummaries: - output.SensorStatisticsSummaries != null - ? de_SensorStatisticsSummaries(output.SensorStatisticsSummaries, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SensorStatisticsSummaries: (_: any) => de_SensorStatisticsSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0MissingCompleteSensorData - */ -const de_MissingCompleteSensorData = (output: any, context: __SerdeContext): MissingCompleteSensorData => { - return { - AffectedSensorCount: __expectInt32(output.AffectedSensorCount), - } as any; -}; +// de_MissingCompleteSensorData omitted. -/** - * deserializeAws_json1_0MissingSensorData - */ -const de_MissingSensorData = (output: any, context: __SerdeContext): MissingSensorData => { - return { - AffectedSensorCount: __expectInt32(output.AffectedSensorCount), - TotalNumberOfMissingValues: __expectInt32(output.TotalNumberOfMissingValues), - } as any; -}; +// de_MissingSensorData omitted. /** * deserializeAws_json1_0ModelSummaries @@ -4182,9 +3286,6 @@ const de_ModelSummaries = (output: any, context: __SerdeContext): ModelSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelSummary(entry, context); }); return retVal; @@ -4194,54 +3295,23 @@ const de_ModelSummaries = (output: any, context: __SerdeContext): ModelSummary[] * deserializeAws_json1_0ModelSummary */ const de_ModelSummary = (output: any, context: __SerdeContext): ModelSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetName: __expectString(output.DatasetName), - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + DatasetName: __expectString, + ModelArn: __expectString, + ModelName: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0MonotonicValues - */ -const de_MonotonicValues = (output: any, context: __SerdeContext): MonotonicValues => { - return { - Monotonicity: __expectString(output.Monotonicity), - Status: __expectString(output.Status), - } as any; -}; +// de_MonotonicValues omitted. -/** - * deserializeAws_json1_0MultipleOperatingModes - */ -const de_MultipleOperatingModes = (output: any, context: __SerdeContext): MultipleOperatingModes => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_MultipleOperatingModes omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0S3Object - */ -const de_S3Object = (output: any, context: __SerdeContext): S3Object => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; -}; +// de_S3Object omitted. /** * deserializeAws_json1_0SensorStatisticsSummaries @@ -4250,9 +3320,6 @@ const de_SensorStatisticsSummaries = (output: any, context: __SerdeContext): Sen const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SensorStatisticsSummary(entry, context); }); return retVal; @@ -4262,155 +3329,46 @@ const de_SensorStatisticsSummaries = (output: any, context: __SerdeContext): Sen * deserializeAws_json1_0SensorStatisticsSummary */ const de_SensorStatisticsSummary = (output: any, context: __SerdeContext): SensorStatisticsSummary => { - return { - CategoricalValues: - output.CategoricalValues != null ? de_CategoricalValues(output.CategoricalValues, context) : undefined, - ComponentName: __expectString(output.ComponentName), - DataEndTime: - output.DataEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataEndTime))) - : undefined, - DataExists: __expectBoolean(output.DataExists), - DataStartTime: - output.DataStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DataStartTime))) - : undefined, - DuplicateTimestamps: - output.DuplicateTimestamps != null ? de_CountPercent(output.DuplicateTimestamps, context) : undefined, - InvalidDateEntries: - output.InvalidDateEntries != null ? de_CountPercent(output.InvalidDateEntries, context) : undefined, - InvalidValues: output.InvalidValues != null ? de_CountPercent(output.InvalidValues, context) : undefined, - LargeTimestampGaps: - output.LargeTimestampGaps != null ? de_LargeTimestampGaps(output.LargeTimestampGaps, context) : undefined, - MissingValues: output.MissingValues != null ? de_CountPercent(output.MissingValues, context) : undefined, - MonotonicValues: output.MonotonicValues != null ? de_MonotonicValues(output.MonotonicValues, context) : undefined, - MultipleOperatingModes: - output.MultipleOperatingModes != null - ? de_MultipleOperatingModes(output.MultipleOperatingModes, context) - : undefined, - SensorName: __expectString(output.SensorName), - } as any; -}; - -/** - * deserializeAws_json1_0SensorsWithShortDateRange - */ -const de_SensorsWithShortDateRange = (output: any, context: __SerdeContext): SensorsWithShortDateRange => { - return { - AffectedSensorCount: __expectInt32(output.AffectedSensorCount), - } as any; + return take(output, { + CategoricalValues: _json, + ComponentName: __expectString, + DataEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataExists: __expectBoolean, + DataStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DuplicateTimestamps: (_: any) => de_CountPercent(_, context), + InvalidDateEntries: (_: any) => de_CountPercent(_, context), + InvalidValues: (_: any) => de_CountPercent(_, context), + LargeTimestampGaps: _json, + MissingValues: (_: any) => de_CountPercent(_, context), + MonotonicValues: _json, + MultipleOperatingModes: _json, + SensorName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_SensorsWithShortDateRange omitted. -/** - * deserializeAws_json1_0StartDataIngestionJobResponse - */ -const de_StartDataIngestionJobResponse = (output: any, context: __SerdeContext): StartDataIngestionJobResponse => { - return { - JobId: __expectString(output.JobId), - Status: __expectString(output.Status), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_0StartInferenceSchedulerResponse - */ -const de_StartInferenceSchedulerResponse = (output: any, context: __SerdeContext): StartInferenceSchedulerResponse => { - return { - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - Status: __expectString(output.Status), - } as any; -}; +// de_StartDataIngestionJobResponse omitted. -/** - * deserializeAws_json1_0StopInferenceSchedulerResponse - */ -const de_StopInferenceSchedulerResponse = (output: any, context: __SerdeContext): StopInferenceSchedulerResponse => { - return { - InferenceSchedulerArn: __expectString(output.InferenceSchedulerArn), - InferenceSchedulerName: __expectString(output.InferenceSchedulerName), - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - Status: __expectString(output.Status), - } as any; -}; +// de_StartInferenceSchedulerResponse omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_StopInferenceSchedulerResponse omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0UnsupportedTimestamps - */ -const de_UnsupportedTimestamps = (output: any, context: __SerdeContext): UnsupportedTimestamps => { - return { - TotalNumberOfUnsupportedTimestamps: __expectInt32(output.TotalNumberOfUnsupportedTimestamps), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UnsupportedTimestamps omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UntagResourceResponse omitted. + +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4432,6 +3390,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-lookoutmetrics/src/protocols/Aws_restJson1.ts b/clients/client-lookoutmetrics/src/protocols/Aws_restJson1.ts index 8b93abdb7ab2..c8738c55ff31 100644 --- a/clients/client-lookoutmetrics/src/protocols/Aws_restJson1.ts +++ b/clients/client-lookoutmetrics/src/protocols/Aws_restJson1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -10,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -104,17 +105,14 @@ import { AlertFilters, AlertSummary, AnomalyDetectorConfig, - AnomalyDetectorConfigSummary, AnomalyDetectorDataQualityMetric, AnomalyDetectorSummary, AnomalyGroup, - AnomalyGroupStatistics, AnomalyGroupSummary, AnomalyGroupTimeSeries, AnomalyGroupTimeSeriesFeedback, AppFlowConfig, AthenaSourceConfig, - AttributeValue, AutoDetectionMetricSource, AutoDetectionS3SourceConfig, BackTestConfiguration, @@ -123,23 +121,13 @@ import { ContributionMatrix, CsvFormatDescriptor, DataQualityMetric, - DetectedCsvFormatDescriptor, - DetectedField, - DetectedFileFormatDescriptor, - DetectedJsonFormatDescriptor, - DetectedMetricSetConfig, - DetectedMetricSource, - DetectedS3SourceConfig, DimensionContribution, DimensionFilter, - DimensionNameValue, DimensionValueContribution, - ExecutionStatus, FileFormatDescriptor, Filter, InterMetricImpactDetails, InternalServerException, - ItemizedMetricStats, JsonFormatDescriptor, LambdaConfiguration, Metric, @@ -156,11 +144,9 @@ import { ServiceQuotaExceededException, SNSConfiguration, TimeSeries, - TimeSeriesFeedback, TimestampColumn, TooManyRequestsException, ValidationException, - ValidationExceptionField, VpcConfiguration, } from "../models/models_0"; @@ -178,9 +164,11 @@ export const se_ActivateAnomalyDetectorCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ActivateAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -206,9 +194,11 @@ export const se_BackTestAnomalyDetectorCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BackTestAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -233,15 +223,17 @@ export const se_CreateAlertCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateAlert"; let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: se_Action(input.Action, context) }), - ...(input.AlertDescription != null && { AlertDescription: input.AlertDescription }), - ...(input.AlertFilters != null && { AlertFilters: se_AlertFilters(input.AlertFilters, context) }), - ...(input.AlertName != null && { AlertName: input.AlertName }), - ...(input.AlertSensitivityThreshold != null && { AlertSensitivityThreshold: input.AlertSensitivityThreshold }), - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Action: (_) => _json(_), + AlertDescription: [], + AlertFilters: (_) => _json(_), + AlertName: [], + AlertSensitivityThreshold: [], + AnomalyDetectorArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -266,15 +258,15 @@ export const se_CreateAnomalyDetectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorConfig != null && { - AnomalyDetectorConfig: se_AnomalyDetectorConfig(input.AnomalyDetectorConfig, context), - }), - ...(input.AnomalyDetectorDescription != null && { AnomalyDetectorDescription: input.AnomalyDetectorDescription }), - ...(input.AnomalyDetectorName != null && { AnomalyDetectorName: input.AnomalyDetectorName }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorConfig: (_) => _json(_), + AnomalyDetectorDescription: [], + AnomalyDetectorName: [], + KmsKeyArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -299,22 +291,22 @@ export const se_CreateMetricSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateMetricSet"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.DimensionFilterList != null && { - DimensionFilterList: se_MetricSetDimensionFilterList(input.DimensionFilterList, context), - }), - ...(input.DimensionList != null && { DimensionList: se_DimensionList(input.DimensionList, context) }), - ...(input.MetricList != null && { MetricList: se_MetricList(input.MetricList, context) }), - ...(input.MetricSetDescription != null && { MetricSetDescription: input.MetricSetDescription }), - ...(input.MetricSetFrequency != null && { MetricSetFrequency: input.MetricSetFrequency }), - ...(input.MetricSetName != null && { MetricSetName: input.MetricSetName }), - ...(input.MetricSource != null && { MetricSource: se_MetricSource(input.MetricSource, context) }), - ...(input.Offset != null && { Offset: input.Offset }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TimestampColumn != null && { TimestampColumn: se_TimestampColumn(input.TimestampColumn, context) }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + DimensionFilterList: (_) => _json(_), + DimensionList: (_) => _json(_), + MetricList: (_) => _json(_), + MetricSetDescription: [], + MetricSetFrequency: [], + MetricSetName: [], + MetricSource: (_) => _json(_), + Offset: [], + Tags: (_) => _json(_), + TimestampColumn: (_) => _json(_), + Timezone: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -340,9 +332,11 @@ export const se_DeactivateAnomalyDetectorCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeactivateAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -367,9 +361,11 @@ export const se_DeleteAlertCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteAlert"; let body: any; - body = JSON.stringify({ - ...(input.AlertArn != null && { AlertArn: input.AlertArn }), - }); + body = JSON.stringify( + take(input, { + AlertArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -394,9 +390,11 @@ export const se_DeleteAnomalyDetectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -421,9 +419,11 @@ export const se_DescribeAlertCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeAlert"; let body: any; - body = JSON.stringify({ - ...(input.AlertArn != null && { AlertArn: input.AlertArn }), - }); + body = JSON.stringify( + take(input, { + AlertArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -449,12 +449,14 @@ export const se_DescribeAnomalyDetectionExecutionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeAnomalyDetectionExecutions"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Timestamp != null && { Timestamp: input.Timestamp }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + MaxResults: [], + NextToken: [], + Timestamp: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -480,9 +482,11 @@ export const se_DescribeAnomalyDetectorCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -507,9 +511,11 @@ export const se_DescribeMetricSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeMetricSet"; let body: any; - body = JSON.stringify({ - ...(input.MetricSetArn != null && { MetricSetArn: input.MetricSetArn }), - }); + body = JSON.stringify( + take(input, { + MetricSetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -534,12 +540,12 @@ export const se_DetectMetricSetConfigCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DetectMetricSetConfig"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AutoDetectionMetricSource != null && { - AutoDetectionMetricSource: se_AutoDetectionMetricSource(input.AutoDetectionMetricSource, context), - }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AutoDetectionMetricSource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -564,10 +570,12 @@ export const se_GetAnomalyGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetAnomalyGroup"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AnomalyGroupId != null && { AnomalyGroupId: input.AnomalyGroupId }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AnomalyGroupId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -592,10 +600,12 @@ export const se_GetDataQualityMetricsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDataQualityMetrics"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.MetricSetArn != null && { MetricSetArn: input.MetricSetArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + MetricSetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -620,14 +630,14 @@ export const se_GetFeedbackCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetFeedback"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AnomalyGroupTimeSeriesFeedback != null && { - AnomalyGroupTimeSeriesFeedback: se_AnomalyGroupTimeSeries(input.AnomalyGroupTimeSeriesFeedback, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AnomalyGroupTimeSeriesFeedback: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -652,9 +662,11 @@ export const se_GetSampleDataCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetSampleData"; let body: any; - body = JSON.stringify({ - ...(input.S3SourceConfig != null && { S3SourceConfig: se_SampleDataS3SourceConfig(input.S3SourceConfig, context) }), - }); + body = JSON.stringify( + take(input, { + S3SourceConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -679,11 +691,13 @@ export const se_ListAlertsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListAlerts"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -708,10 +722,12 @@ export const se_ListAnomalyDetectorsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListAnomalyDetectors"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -737,13 +753,15 @@ export const se_ListAnomalyGroupRelatedMetricsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListAnomalyGroupRelatedMetrics"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AnomalyGroupId != null && { AnomalyGroupId: input.AnomalyGroupId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RelationshipTypeFilter != null && { RelationshipTypeFilter: input.RelationshipTypeFilter }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AnomalyGroupId: [], + MaxResults: [], + NextToken: [], + RelationshipTypeFilter: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -769,12 +787,14 @@ export const se_ListAnomalyGroupSummariesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListAnomalyGroupSummaries"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SensitivityThreshold != null && { SensitivityThreshold: input.SensitivityThreshold }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + MaxResults: [], + NextToken: [], + SensitivityThreshold: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -800,13 +820,15 @@ export const se_ListAnomalyGroupTimeSeriesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListAnomalyGroupTimeSeries"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AnomalyGroupId != null && { AnomalyGroupId: input.AnomalyGroupId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AnomalyGroupId: [], + MaxResults: [], + MetricName: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -831,11 +853,13 @@ export const se_ListMetricSetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListMetricSets"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -883,12 +907,12 @@ export const se_PutFeedbackCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutFeedback"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AnomalyGroupTimeSeriesFeedback != null && { - AnomalyGroupTimeSeriesFeedback: se_AnomalyGroupTimeSeriesFeedback(input.AnomalyGroupTimeSeriesFeedback, context), - }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AnomalyGroupTimeSeriesFeedback: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -914,9 +938,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -971,13 +997,15 @@ export const se_UpdateAlertCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateAlert"; let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: se_Action(input.Action, context) }), - ...(input.AlertArn != null && { AlertArn: input.AlertArn }), - ...(input.AlertDescription != null && { AlertDescription: input.AlertDescription }), - ...(input.AlertFilters != null && { AlertFilters: se_AlertFilters(input.AlertFilters, context) }), - ...(input.AlertSensitivityThreshold != null && { AlertSensitivityThreshold: input.AlertSensitivityThreshold }), - }); + body = JSON.stringify( + take(input, { + Action: (_) => _json(_), + AlertArn: [], + AlertDescription: [], + AlertFilters: (_) => _json(_), + AlertSensitivityThreshold: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1002,14 +1030,14 @@ export const se_UpdateAnomalyDetectorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateAnomalyDetector"; let body: any; - body = JSON.stringify({ - ...(input.AnomalyDetectorArn != null && { AnomalyDetectorArn: input.AnomalyDetectorArn }), - ...(input.AnomalyDetectorConfig != null && { - AnomalyDetectorConfig: se_AnomalyDetectorConfig(input.AnomalyDetectorConfig, context), - }), - ...(input.AnomalyDetectorDescription != null && { AnomalyDetectorDescription: input.AnomalyDetectorDescription }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }); + body = JSON.stringify( + take(input, { + AnomalyDetectorArn: [], + AnomalyDetectorConfig: (_) => _json(_), + AnomalyDetectorDescription: [], + KmsKeyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1034,19 +1062,19 @@ export const se_UpdateMetricSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateMetricSet"; let body: any; - body = JSON.stringify({ - ...(input.DimensionFilterList != null && { - DimensionFilterList: se_MetricSetDimensionFilterList(input.DimensionFilterList, context), - }), - ...(input.DimensionList != null && { DimensionList: se_DimensionList(input.DimensionList, context) }), - ...(input.MetricList != null && { MetricList: se_MetricList(input.MetricList, context) }), - ...(input.MetricSetArn != null && { MetricSetArn: input.MetricSetArn }), - ...(input.MetricSetDescription != null && { MetricSetDescription: input.MetricSetDescription }), - ...(input.MetricSetFrequency != null && { MetricSetFrequency: input.MetricSetFrequency }), - ...(input.MetricSource != null && { MetricSource: se_MetricSource(input.MetricSource, context) }), - ...(input.Offset != null && { Offset: input.Offset }), - ...(input.TimestampColumn != null && { TimestampColumn: se_TimestampColumn(input.TimestampColumn, context) }), - }); + body = JSON.stringify( + take(input, { + DimensionFilterList: (_) => _json(_), + DimensionList: (_) => _json(_), + MetricList: (_) => _json(_), + MetricSetArn: [], + MetricSetDescription: [], + MetricSetFrequency: [], + MetricSource: (_) => _json(_), + Offset: [], + TimestampColumn: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1108,10 +1136,9 @@ const de_ActivateAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1164,10 +1191,9 @@ const de_BackTestAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1187,9 +1213,10 @@ export const de_CreateAlertCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AlertArn != null) { - contents.AlertArn = __expectString(data.AlertArn); - } + const doc = take(data, { + AlertArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1229,10 +1256,9 @@ const de_CreateAlertCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1252,9 +1278,10 @@ export const de_CreateAnomalyDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyDetectorArn != null) { - contents.AnomalyDetectorArn = __expectString(data.AnomalyDetectorArn); - } + const doc = take(data, { + AnomalyDetectorArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1291,10 +1318,9 @@ const de_CreateAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1314,9 +1340,10 @@ export const de_CreateMetricSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricSetArn != null) { - contents.MetricSetArn = __expectString(data.MetricSetArn); - } + const doc = take(data, { + MetricSetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1356,10 +1383,9 @@ const de_CreateMetricSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1415,10 +1441,9 @@ const de_DeactivateAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1471,10 +1496,9 @@ const de_DeleteAlertCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1530,10 +1554,9 @@ const de_DeleteAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1553,9 +1576,10 @@ export const de_DescribeAlertCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Alert != null) { - contents.Alert = de_Alert(data.Alert, context); - } + const doc = take(data, { + Alert: (_) => de_Alert(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1589,10 +1613,9 @@ const de_DescribeAlertCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1612,12 +1635,11 @@ export const de_DescribeAnomalyDetectionExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ExecutionList != null) { - contents.ExecutionList = de_ExecutionList(data.ExecutionList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ExecutionList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1651,10 +1673,9 @@ const de_DescribeAnomalyDetectionExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1674,36 +1695,19 @@ export const de_DescribeAnomalyDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyDetectorArn != null) { - contents.AnomalyDetectorArn = __expectString(data.AnomalyDetectorArn); - } - if (data.AnomalyDetectorConfig != null) { - contents.AnomalyDetectorConfig = de_AnomalyDetectorConfigSummary(data.AnomalyDetectorConfig, context); - } - if (data.AnomalyDetectorDescription != null) { - contents.AnomalyDetectorDescription = __expectString(data.AnomalyDetectorDescription); - } - if (data.AnomalyDetectorName != null) { - contents.AnomalyDetectorName = __expectString(data.AnomalyDetectorName); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.FailureReason != null) { - contents.FailureReason = __expectString(data.FailureReason); - } - if (data.FailureType != null) { - contents.FailureType = __expectString(data.FailureType); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.LastModificationTime != null) { - contents.LastModificationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModificationTime))); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + AnomalyDetectorArn: __expectString, + AnomalyDetectorConfig: _json, + AnomalyDetectorDescription: __expectString, + AnomalyDetectorName: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + FailureType: __expectString, + KmsKeyArn: __expectString, + LastModificationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1737,10 +1741,9 @@ const de_DescribeAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1760,48 +1763,23 @@ export const de_DescribeMetricSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyDetectorArn != null) { - contents.AnomalyDetectorArn = __expectString(data.AnomalyDetectorArn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DimensionFilterList != null) { - contents.DimensionFilterList = de_MetricSetDimensionFilterList(data.DimensionFilterList, context); - } - if (data.DimensionList != null) { - contents.DimensionList = de_DimensionList(data.DimensionList, context); - } - if (data.LastModificationTime != null) { - contents.LastModificationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModificationTime))); - } - if (data.MetricList != null) { - contents.MetricList = de_MetricList(data.MetricList, context); - } - if (data.MetricSetArn != null) { - contents.MetricSetArn = __expectString(data.MetricSetArn); - } - if (data.MetricSetDescription != null) { - contents.MetricSetDescription = __expectString(data.MetricSetDescription); - } - if (data.MetricSetFrequency != null) { - contents.MetricSetFrequency = __expectString(data.MetricSetFrequency); - } - if (data.MetricSetName != null) { - contents.MetricSetName = __expectString(data.MetricSetName); - } - if (data.MetricSource != null) { - contents.MetricSource = de_MetricSource(data.MetricSource, context); - } - if (data.Offset != null) { - contents.Offset = __expectInt32(data.Offset); - } - if (data.TimestampColumn != null) { - contents.TimestampColumn = de_TimestampColumn(data.TimestampColumn, context); - } - if (data.Timezone != null) { - contents.Timezone = __expectString(data.Timezone); - } + const doc = take(data, { + AnomalyDetectorArn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DimensionFilterList: _json, + DimensionList: _json, + LastModificationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetricList: _json, + MetricSetArn: __expectString, + MetricSetDescription: __expectString, + MetricSetFrequency: __expectString, + MetricSetName: __expectString, + MetricSource: _json, + Offset: __expectInt32, + TimestampColumn: _json, + Timezone: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1835,10 +1813,9 @@ const de_DescribeMetricSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1858,9 +1835,10 @@ export const de_DetectMetricSetConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DetectedMetricSetConfig != null) { - contents.DetectedMetricSetConfig = de_DetectedMetricSetConfig(data.DetectedMetricSetConfig, context); - } + const doc = take(data, { + DetectedMetricSetConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1894,10 +1872,9 @@ const de_DetectMetricSetConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1917,9 +1894,10 @@ export const de_GetAnomalyGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyGroup != null) { - contents.AnomalyGroup = de_AnomalyGroup(data.AnomalyGroup, context); - } + const doc = take(data, { + AnomalyGroup: (_) => de_AnomalyGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1953,10 +1931,9 @@ const de_GetAnomalyGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1976,12 +1953,10 @@ export const de_GetDataQualityMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyDetectorDataQualityMetricList != null) { - contents.AnomalyDetectorDataQualityMetricList = de_AnomalyDetectorDataQualityMetricList( - data.AnomalyDetectorDataQualityMetricList, - context - ); - } + const doc = take(data, { + AnomalyDetectorDataQualityMetricList: (_) => de_AnomalyDetectorDataQualityMetricList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2015,10 +1990,9 @@ const de_GetDataQualityMetricsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2038,12 +2012,11 @@ export const de_GetFeedbackCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyGroupTimeSeriesFeedback != null) { - contents.AnomalyGroupTimeSeriesFeedback = de_TimeSeriesFeedbackList(data.AnomalyGroupTimeSeriesFeedback, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AnomalyGroupTimeSeriesFeedback: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2077,10 +2050,9 @@ const de_GetFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2100,12 +2072,11 @@ export const de_GetSampleDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HeaderValues != null) { - contents.HeaderValues = de_HeaderValueList(data.HeaderValues, context); - } - if (data.SampleRows != null) { - contents.SampleRows = de_SampleRows(data.SampleRows, context); - } + const doc = take(data, { + HeaderValues: _json, + SampleRows: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2139,10 +2110,9 @@ const de_GetSampleDataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2162,12 +2132,11 @@ export const de_ListAlertsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AlertSummaryList != null) { - contents.AlertSummaryList = de_AlertSummaryList(data.AlertSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AlertSummaryList: (_) => de_AlertSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2201,10 +2170,9 @@ const de_ListAlertsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2224,12 +2192,11 @@ export const de_ListAnomalyDetectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyDetectorSummaryList != null) { - contents.AnomalyDetectorSummaryList = de_AnomalyDetectorSummaryList(data.AnomalyDetectorSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AnomalyDetectorSummaryList: (_) => de_AnomalyDetectorSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2263,10 +2230,9 @@ const de_ListAnomalyDetectorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2286,12 +2252,11 @@ export const de_ListAnomalyGroupRelatedMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InterMetricImpactList != null) { - contents.InterMetricImpactList = de_InterMetricImpactList(data.InterMetricImpactList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InterMetricImpactList: (_) => de_InterMetricImpactList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2325,10 +2290,9 @@ const de_ListAnomalyGroupRelatedMetricsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2348,15 +2312,12 @@ export const de_ListAnomalyGroupSummariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyGroupStatistics != null) { - contents.AnomalyGroupStatistics = de_AnomalyGroupStatistics(data.AnomalyGroupStatistics, context); - } - if (data.AnomalyGroupSummaryList != null) { - contents.AnomalyGroupSummaryList = de_AnomalyGroupSummaryList(data.AnomalyGroupSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AnomalyGroupStatistics: _json, + AnomalyGroupSummaryList: (_) => de_AnomalyGroupSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2390,10 +2351,9 @@ const de_ListAnomalyGroupSummariesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2413,21 +2373,14 @@ export const de_ListAnomalyGroupTimeSeriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyGroupId != null) { - contents.AnomalyGroupId = __expectString(data.AnomalyGroupId); - } - if (data.MetricName != null) { - contents.MetricName = __expectString(data.MetricName); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TimeSeriesList != null) { - contents.TimeSeriesList = de_TimeSeriesList(data.TimeSeriesList, context); - } - if (data.TimestampList != null) { - contents.TimestampList = de_TimestampList(data.TimestampList, context); - } + const doc = take(data, { + AnomalyGroupId: __expectString, + MetricName: __expectString, + NextToken: __expectString, + TimeSeriesList: (_) => de_TimeSeriesList(_, context), + TimestampList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2461,10 +2414,9 @@ const de_ListAnomalyGroupTimeSeriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2484,12 +2436,11 @@ export const de_ListMetricSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricSetSummaryList != null) { - contents.MetricSetSummaryList = de_MetricSetSummaryList(data.MetricSetSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MetricSetSummaryList: (_) => de_MetricSetSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2523,10 +2474,9 @@ const de_ListMetricSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2546,9 +2496,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: [, _json, `Tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2576,10 +2527,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2632,10 +2582,9 @@ const de_PutFeedbackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2682,10 +2631,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,10 +2680,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,9 +2702,10 @@ export const de_UpdateAlertCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AlertArn != null) { - contents.AlertArn = __expectString(data.AlertArn); - } + const doc = take(data, { + AlertArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2791,10 +2739,9 @@ const de_UpdateAlertCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2814,9 +2761,10 @@ export const de_UpdateAnomalyDetectorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnomalyDetectorArn != null) { - contents.AnomalyDetectorArn = __expectString(data.AnomalyDetectorArn); - } + const doc = take(data, { + AnomalyDetectorArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2850,10 +2798,9 @@ const de_UpdateAnomalyDetectorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2873,9 +2820,10 @@ export const de_UpdateMetricSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricSetArn != null) { - contents.MetricSetArn = __expectString(data.MetricSetArn); - } + const doc = take(data, { + MetricSetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2912,16 +2860,15 @@ const de_UpdateMetricSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2931,9 +2878,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2947,15 +2895,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2972,9 +2917,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2991,15 +2937,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3016,21 +2959,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3047,9 +2983,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3063,15 +3000,12 @@ const de_TooManyRequestsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Fields != null) { - contents.Fields = de_ValidationExceptionFieldList(data.Fields, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Fields: _json, + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3079,830 +3013,269 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Action - */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.LambdaConfiguration != null && { - LambdaConfiguration: se_LambdaConfiguration(input.LambdaConfiguration, context), - }), - ...(input.SNSConfiguration != null && { SNSConfiguration: se_SNSConfiguration(input.SNSConfiguration, context) }), - }; -}; +// se_Action omitted. -/** - * serializeAws_restJson1AlertFilters - */ -const se_AlertFilters = (input: AlertFilters, context: __SerdeContext): any => { - return { - ...(input.DimensionFilterList != null && { - DimensionFilterList: se_DimensionFilterList(input.DimensionFilterList, context), - }), - ...(input.MetricList != null && { MetricList: se_MetricNameList(input.MetricList, context) }), - }; -}; +// se_AlertFilters omitted. -/** - * serializeAws_restJson1AnomalyDetectorConfig - */ -const se_AnomalyDetectorConfig = (input: AnomalyDetectorConfig, context: __SerdeContext): any => { - return { - ...(input.AnomalyDetectorFrequency != null && { AnomalyDetectorFrequency: input.AnomalyDetectorFrequency }), - }; -}; +// se_AnomalyDetectorConfig omitted. -/** - * serializeAws_restJson1AnomalyGroupTimeSeries - */ -const se_AnomalyGroupTimeSeries = (input: AnomalyGroupTimeSeries, context: __SerdeContext): any => { - return { - ...(input.AnomalyGroupId != null && { AnomalyGroupId: input.AnomalyGroupId }), - ...(input.TimeSeriesId != null && { TimeSeriesId: input.TimeSeriesId }), - }; -}; +// se_AnomalyGroupTimeSeries omitted. -/** - * serializeAws_restJson1AnomalyGroupTimeSeriesFeedback - */ -const se_AnomalyGroupTimeSeriesFeedback = (input: AnomalyGroupTimeSeriesFeedback, context: __SerdeContext): any => { - return { - ...(input.AnomalyGroupId != null && { AnomalyGroupId: input.AnomalyGroupId }), - ...(input.IsAnomaly != null && { IsAnomaly: input.IsAnomaly }), - ...(input.TimeSeriesId != null && { TimeSeriesId: input.TimeSeriesId }), - }; -}; +// se_AnomalyGroupTimeSeriesFeedback omitted. -/** - * serializeAws_restJson1AppFlowConfig - */ -const se_AppFlowConfig = (input: AppFlowConfig, context: __SerdeContext): any => { - return { - ...(input.FlowName != null && { FlowName: input.FlowName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_AppFlowConfig omitted. -/** - * serializeAws_restJson1AthenaSourceConfig - */ -const se_AthenaSourceConfig = (input: AthenaSourceConfig, context: __SerdeContext): any => { - return { - ...(input.BackTestConfiguration != null && { - BackTestConfiguration: se_BackTestConfiguration(input.BackTestConfiguration, context), - }), - ...(input.DataCatalog != null && { DataCatalog: input.DataCatalog }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.S3ResultsPath != null && { S3ResultsPath: input.S3ResultsPath }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.WorkGroupName != null && { WorkGroupName: input.WorkGroupName }), - }; -}; +// se_AthenaSourceConfig omitted. -/** - * serializeAws_restJson1AutoDetectionMetricSource - */ -const se_AutoDetectionMetricSource = (input: AutoDetectionMetricSource, context: __SerdeContext): any => { - return { - ...(input.S3SourceConfig != null && { - S3SourceConfig: se_AutoDetectionS3SourceConfig(input.S3SourceConfig, context), - }), - }; -}; +// se_AutoDetectionMetricSource omitted. -/** - * serializeAws_restJson1AutoDetectionS3SourceConfig - */ -const se_AutoDetectionS3SourceConfig = (input: AutoDetectionS3SourceConfig, context: __SerdeContext): any => { - return { - ...(input.HistoricalDataPathList != null && { - HistoricalDataPathList: se_HistoricalDataPathList(input.HistoricalDataPathList, context), - }), - ...(input.TemplatedPathList != null && { - TemplatedPathList: se_TemplatedPathList(input.TemplatedPathList, context), - }), - }; -}; +// se_AutoDetectionS3SourceConfig omitted. + +// se_BackTestConfiguration omitted. + +// se_CloudWatchConfig omitted. + +// se_CsvFormatDescriptor omitted. + +// se_DimensionFilter omitted. + +// se_DimensionFilterList omitted. + +// se_DimensionList omitted. + +// se_DimensionValueList omitted. + +// se_FileFormatDescriptor omitted. + +// se_Filter omitted. + +// se_FilterList omitted. + +// se_HeaderList omitted. + +// se_HistoricalDataPathList omitted. + +// se_JsonFormatDescriptor omitted. + +// se_LambdaConfiguration omitted. + +// se_Metric omitted. + +// se_MetricList omitted. + +// se_MetricNameList omitted. + +// se_MetricSetDimensionFilter omitted. + +// se_MetricSetDimensionFilterList omitted. + +// se_MetricSource omitted. + +// se_RDSSourceConfig omitted. + +// se_RedshiftSourceConfig omitted. + +// se_S3SourceConfig omitted. + +// se_SampleDataS3SourceConfig omitted. + +// se_SecurityGroupIdList omitted. + +// se_SNSConfiguration omitted. + +// se_SubnetIdList omitted. + +// se_TagMap omitted. + +// se_TemplatedPathList omitted. + +// se_TimestampColumn omitted. + +// se_VpcConfiguration omitted. + +// de_Action omitted. /** - * serializeAws_restJson1BackTestConfiguration + * deserializeAws_restJson1Alert */ -const se_BackTestConfiguration = (input: BackTestConfiguration, context: __SerdeContext): any => { - return { - ...(input.RunBackTestMode != null && { RunBackTestMode: input.RunBackTestMode }), - }; +const de_Alert = (output: any, context: __SerdeContext): Alert => { + return take(output, { + Action: _json, + AlertArn: __expectString, + AlertDescription: __expectString, + AlertFilters: _json, + AlertName: __expectString, + AlertSensitivityThreshold: __expectInt32, + AlertStatus: __expectString, + AlertType: __expectString, + AnomalyDetectorArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_AlertFilters omitted. + /** - * serializeAws_restJson1CloudWatchConfig + * deserializeAws_restJson1AlertSummary */ -const se_CloudWatchConfig = (input: CloudWatchConfig, context: __SerdeContext): any => { - return { - ...(input.BackTestConfiguration != null && { - BackTestConfiguration: se_BackTestConfiguration(input.BackTestConfiguration, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; +const de_AlertSummary = (output: any, context: __SerdeContext): AlertSummary => { + return take(output, { + AlertArn: __expectString, + AlertName: __expectString, + AlertSensitivityThreshold: __expectInt32, + AlertStatus: __expectString, + AlertType: __expectString, + AnomalyDetectorArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + }) as any; }; /** - * serializeAws_restJson1CsvFormatDescriptor + * deserializeAws_restJson1AlertSummaryList */ -const se_CsvFormatDescriptor = (input: CsvFormatDescriptor, context: __SerdeContext): any => { - return { - ...(input.Charset != null && { Charset: input.Charset }), - ...(input.ContainsHeader != null && { ContainsHeader: input.ContainsHeader }), - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.FileCompression != null && { FileCompression: input.FileCompression }), - ...(input.HeaderList != null && { HeaderList: se_HeaderList(input.HeaderList, context) }), - ...(input.QuoteSymbol != null && { QuoteSymbol: input.QuoteSymbol }), - }; +const de_AlertSummaryList = (output: any, context: __SerdeContext): AlertSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AlertSummary(entry, context); + }); + return retVal; }; +// de_AnomalyDetectorConfigSummary omitted. + /** - * serializeAws_restJson1DimensionFilter + * deserializeAws_restJson1AnomalyDetectorDataQualityMetric */ -const se_DimensionFilter = (input: DimensionFilter, context: __SerdeContext): any => { - return { - ...(input.DimensionName != null && { DimensionName: input.DimensionName }), - ...(input.DimensionValueList != null && { - DimensionValueList: se_DimensionValueList(input.DimensionValueList, context), - }), - }; +const de_AnomalyDetectorDataQualityMetric = ( + output: any, + context: __SerdeContext +): AnomalyDetectorDataQualityMetric => { + return take(output, { + MetricSetDataQualityMetricList: (_: any) => de_MetricSetDataQualityMetricList(_, context), + StartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * serializeAws_restJson1DimensionFilterList + * deserializeAws_restJson1AnomalyDetectorDataQualityMetricList */ -const se_DimensionFilterList = (input: DimensionFilter[], context: __SerdeContext): any => { - return input +const de_AnomalyDetectorDataQualityMetricList = ( + output: any, + context: __SerdeContext +): AnomalyDetectorDataQualityMetric[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionFilter(entry, context); + .map((entry: any) => { + return de_AnomalyDetectorDataQualityMetric(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1DimensionList + * deserializeAws_restJson1AnomalyDetectorSummary */ -const se_DimensionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_AnomalyDetectorSummary = (output: any, context: __SerdeContext): AnomalyDetectorSummary => { + return take(output, { + AnomalyDetectorArn: __expectString, + AnomalyDetectorDescription: __expectString, + AnomalyDetectorName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Tags: _json, + }) as any; }; /** - * serializeAws_restJson1DimensionValueList + * deserializeAws_restJson1AnomalyDetectorSummaryList */ -const se_DimensionValueList = (input: string[], context: __SerdeContext): any => { - return input +const de_AnomalyDetectorSummaryList = (output: any, context: __SerdeContext): AnomalyDetectorSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_AnomalyDetectorSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1FileFormatDescriptor + * deserializeAws_restJson1AnomalyGroup */ -const se_FileFormatDescriptor = (input: FileFormatDescriptor, context: __SerdeContext): any => { - return { - ...(input.CsvFormatDescriptor != null && { - CsvFormatDescriptor: se_CsvFormatDescriptor(input.CsvFormatDescriptor, context), - }), - ...(input.JsonFormatDescriptor != null && { - JsonFormatDescriptor: se_JsonFormatDescriptor(input.JsonFormatDescriptor, context), - }), - }; +const de_AnomalyGroup = (output: any, context: __SerdeContext): AnomalyGroup => { + return take(output, { + AnomalyGroupId: __expectString, + AnomalyGroupScore: __limitedParseDouble, + EndTime: __expectString, + MetricLevelImpactList: (_: any) => de_MetricLevelImpactList(_, context), + PrimaryMetricName: __expectString, + StartTime: __expectString, + }) as any; }; -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.DimensionValue != null && { DimensionValue: input.DimensionValue }), - ...(input.FilterOperation != null && { FilterOperation: input.FilterOperation }), - }; -}; +// de_AnomalyGroupStatistics omitted. /** - * serializeAws_restJson1FilterList + * deserializeAws_restJson1AnomalyGroupSummary */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); +const de_AnomalyGroupSummary = (output: any, context: __SerdeContext): AnomalyGroupSummary => { + return take(output, { + AnomalyGroupId: __expectString, + AnomalyGroupScore: __limitedParseDouble, + EndTime: __expectString, + PrimaryMetricName: __expectString, + StartTime: __expectString, + }) as any; }; /** - * serializeAws_restJson1HeaderList + * deserializeAws_restJson1AnomalyGroupSummaryList */ -const se_HeaderList = (input: string[], context: __SerdeContext): any => { - return input +const de_AnomalyGroupSummaryList = (output: any, context: __SerdeContext): AnomalyGroupSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_AnomalyGroupSummary(entry, context); }); + return retVal; }; -/** - * serializeAws_restJson1HistoricalDataPathList - */ -const se_HistoricalDataPathList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1JsonFormatDescriptor - */ -const se_JsonFormatDescriptor = (input: JsonFormatDescriptor, context: __SerdeContext): any => { - return { - ...(input.Charset != null && { Charset: input.Charset }), - ...(input.FileCompression != null && { FileCompression: input.FileCompression }), - }; -}; - -/** - * serializeAws_restJson1LambdaConfiguration - */ -const se_LambdaConfiguration = (input: LambdaConfiguration, context: __SerdeContext): any => { - return { - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_restJson1Metric - */ -const se_Metric = (input: Metric, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { AggregationFunction: input.AggregationFunction }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - }; -}; - -/** - * serializeAws_restJson1MetricList - */ -const se_MetricList = (input: Metric[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Metric(entry, context); - }); -}; - -/** - * serializeAws_restJson1MetricNameList - */ -const se_MetricNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1MetricSetDimensionFilter - */ -const se_MetricSetDimensionFilter = (input: MetricSetDimensionFilter, context: __SerdeContext): any => { - return { - ...(input.FilterList != null && { FilterList: se_FilterList(input.FilterList, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1MetricSetDimensionFilterList - */ -const se_MetricSetDimensionFilterList = (input: MetricSetDimensionFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricSetDimensionFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1MetricSource - */ -const se_MetricSource = (input: MetricSource, context: __SerdeContext): any => { - return { - ...(input.AppFlowConfig != null && { AppFlowConfig: se_AppFlowConfig(input.AppFlowConfig, context) }), - ...(input.AthenaSourceConfig != null && { - AthenaSourceConfig: se_AthenaSourceConfig(input.AthenaSourceConfig, context), - }), - ...(input.CloudWatchConfig != null && { CloudWatchConfig: se_CloudWatchConfig(input.CloudWatchConfig, context) }), - ...(input.RDSSourceConfig != null && { RDSSourceConfig: se_RDSSourceConfig(input.RDSSourceConfig, context) }), - ...(input.RedshiftSourceConfig != null && { - RedshiftSourceConfig: se_RedshiftSourceConfig(input.RedshiftSourceConfig, context), - }), - ...(input.S3SourceConfig != null && { S3SourceConfig: se_S3SourceConfig(input.S3SourceConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1RDSSourceConfig - */ -const se_RDSSourceConfig = (input: RDSSourceConfig, context: __SerdeContext): any => { - return { - ...(input.DBInstanceIdentifier != null && { DBInstanceIdentifier: input.DBInstanceIdentifier }), - ...(input.DatabaseHost != null && { DatabaseHost: input.DatabaseHost }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DatabasePort != null && { DatabasePort: input.DatabasePort }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; - -/** - * serializeAws_restJson1RedshiftSourceConfig - */ -const se_RedshiftSourceConfig = (input: RedshiftSourceConfig, context: __SerdeContext): any => { - return { - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.DatabaseHost != null && { DatabaseHost: input.DatabaseHost }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DatabasePort != null && { DatabasePort: input.DatabasePort }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.VpcConfiguration != null && { VpcConfiguration: se_VpcConfiguration(input.VpcConfiguration, context) }), - }; -}; - -/** - * serializeAws_restJson1S3SourceConfig - */ -const se_S3SourceConfig = (input: S3SourceConfig, context: __SerdeContext): any => { - return { - ...(input.FileFormatDescriptor != null && { - FileFormatDescriptor: se_FileFormatDescriptor(input.FileFormatDescriptor, context), - }), - ...(input.HistoricalDataPathList != null && { - HistoricalDataPathList: se_HistoricalDataPathList(input.HistoricalDataPathList, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TemplatedPathList != null && { - TemplatedPathList: se_TemplatedPathList(input.TemplatedPathList, context), - }), - }; -}; - -/** - * serializeAws_restJson1SampleDataS3SourceConfig - */ -const se_SampleDataS3SourceConfig = (input: SampleDataS3SourceConfig, context: __SerdeContext): any => { - return { - ...(input.FileFormatDescriptor != null && { - FileFormatDescriptor: se_FileFormatDescriptor(input.FileFormatDescriptor, context), - }), - ...(input.HistoricalDataPathList != null && { - HistoricalDataPathList: se_HistoricalDataPathList(input.HistoricalDataPathList, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.TemplatedPathList != null && { - TemplatedPathList: se_TemplatedPathList(input.TemplatedPathList, context), - }), - }; -}; - -/** - * serializeAws_restJson1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SNSConfiguration - */ -const se_SNSConfiguration = (input: SNSConfiguration, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SnsFormat != null && { SnsFormat: input.SnsFormat }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - }; -}; - -/** - * serializeAws_restJson1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TemplatedPathList - */ -const se_TemplatedPathList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TimestampColumn - */ -const se_TimestampColumn = (input: TimestampColumn, context: __SerdeContext): any => { - return { - ...(input.ColumnFormat != null && { ColumnFormat: input.ColumnFormat }), - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - }; -}; - -/** - * serializeAws_restJson1VpcConfiguration - */ -const se_VpcConfiguration = (input: VpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIdList != null && { - SecurityGroupIdList: se_SecurityGroupIdList(input.SecurityGroupIdList, context), - }), - ...(input.SubnetIdList != null && { SubnetIdList: se_SubnetIdList(input.SubnetIdList, context) }), - }; -}; - -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - LambdaConfiguration: - output.LambdaConfiguration != null ? de_LambdaConfiguration(output.LambdaConfiguration, context) : undefined, - SNSConfiguration: - output.SNSConfiguration != null ? de_SNSConfiguration(output.SNSConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Alert - */ -const de_Alert = (output: any, context: __SerdeContext): Alert => { - return { - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - AlertArn: __expectString(output.AlertArn), - AlertDescription: __expectString(output.AlertDescription), - AlertFilters: output.AlertFilters != null ? de_AlertFilters(output.AlertFilters, context) : undefined, - AlertName: __expectString(output.AlertName), - AlertSensitivityThreshold: __expectInt32(output.AlertSensitivityThreshold), - AlertStatus: __expectString(output.AlertStatus), - AlertType: __expectString(output.AlertType), - AnomalyDetectorArn: __expectString(output.AnomalyDetectorArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlertFilters - */ -const de_AlertFilters = (output: any, context: __SerdeContext): AlertFilters => { - return { - DimensionFilterList: - output.DimensionFilterList != null ? de_DimensionFilterList(output.DimensionFilterList, context) : undefined, - MetricList: output.MetricList != null ? de_MetricNameList(output.MetricList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlertSummary - */ -const de_AlertSummary = (output: any, context: __SerdeContext): AlertSummary => { - return { - AlertArn: __expectString(output.AlertArn), - AlertName: __expectString(output.AlertName), - AlertSensitivityThreshold: __expectInt32(output.AlertSensitivityThreshold), - AlertStatus: __expectString(output.AlertStatus), - AlertType: __expectString(output.AlertType), - AnomalyDetectorArn: __expectString(output.AnomalyDetectorArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AlertSummaryList - */ -const de_AlertSummaryList = (output: any, context: __SerdeContext): AlertSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlertSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnomalyDetectorConfigSummary - */ -const de_AnomalyDetectorConfigSummary = (output: any, context: __SerdeContext): AnomalyDetectorConfigSummary => { - return { - AnomalyDetectorFrequency: __expectString(output.AnomalyDetectorFrequency), - } as any; -}; - -/** - * deserializeAws_restJson1AnomalyDetectorDataQualityMetric - */ -const de_AnomalyDetectorDataQualityMetric = ( - output: any, - context: __SerdeContext -): AnomalyDetectorDataQualityMetric => { - return { - MetricSetDataQualityMetricList: - output.MetricSetDataQualityMetricList != null - ? de_MetricSetDataQualityMetricList(output.MetricSetDataQualityMetricList, context) - : undefined, - StartTimestamp: - output.StartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp))) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnomalyDetectorDataQualityMetricList - */ -const de_AnomalyDetectorDataQualityMetricList = ( - output: any, - context: __SerdeContext -): AnomalyDetectorDataQualityMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalyDetectorDataQualityMetric(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnomalyDetectorSummary - */ -const de_AnomalyDetectorSummary = (output: any, context: __SerdeContext): AnomalyDetectorSummary => { - return { - AnomalyDetectorArn: __expectString(output.AnomalyDetectorArn), - AnomalyDetectorDescription: __expectString(output.AnomalyDetectorDescription), - AnomalyDetectorName: __expectString(output.AnomalyDetectorName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnomalyDetectorSummaryList - */ -const de_AnomalyDetectorSummaryList = (output: any, context: __SerdeContext): AnomalyDetectorSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalyDetectorSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnomalyGroup - */ -const de_AnomalyGroup = (output: any, context: __SerdeContext): AnomalyGroup => { - return { - AnomalyGroupId: __expectString(output.AnomalyGroupId), - AnomalyGroupScore: __limitedParseDouble(output.AnomalyGroupScore), - EndTime: __expectString(output.EndTime), - MetricLevelImpactList: - output.MetricLevelImpactList != null - ? de_MetricLevelImpactList(output.MetricLevelImpactList, context) - : undefined, - PrimaryMetricName: __expectString(output.PrimaryMetricName), - StartTime: __expectString(output.StartTime), - } as any; -}; - -/** - * deserializeAws_restJson1AnomalyGroupStatistics - */ -const de_AnomalyGroupStatistics = (output: any, context: __SerdeContext): AnomalyGroupStatistics => { - return { - EvaluationStartDate: __expectString(output.EvaluationStartDate), - ItemizedMetricStatsList: - output.ItemizedMetricStatsList != null - ? de_ItemizedMetricStatsList(output.ItemizedMetricStatsList, context) - : undefined, - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; - -/** - * deserializeAws_restJson1AnomalyGroupSummary - */ -const de_AnomalyGroupSummary = (output: any, context: __SerdeContext): AnomalyGroupSummary => { - return { - AnomalyGroupId: __expectString(output.AnomalyGroupId), - AnomalyGroupScore: __limitedParseDouble(output.AnomalyGroupScore), - EndTime: __expectString(output.EndTime), - PrimaryMetricName: __expectString(output.PrimaryMetricName), - StartTime: __expectString(output.StartTime), - } as any; -}; +// de_AppFlowConfig omitted. -/** - * deserializeAws_restJson1AnomalyGroupSummaryList - */ -const de_AnomalyGroupSummaryList = (output: any, context: __SerdeContext): AnomalyGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalyGroupSummary(entry, context); - }); - return retVal; -}; +// de_AthenaSourceConfig omitted. -/** - * deserializeAws_restJson1AppFlowConfig - */ -const de_AppFlowConfig = (output: any, context: __SerdeContext): AppFlowConfig => { - return { - FlowName: __expectString(output.FlowName), - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_AttributeValue omitted. -/** - * deserializeAws_restJson1AthenaSourceConfig - */ -const de_AthenaSourceConfig = (output: any, context: __SerdeContext): AthenaSourceConfig => { - return { - BackTestConfiguration: - output.BackTestConfiguration != null - ? de_BackTestConfiguration(output.BackTestConfiguration, context) - : undefined, - DataCatalog: __expectString(output.DataCatalog), - DatabaseName: __expectString(output.DatabaseName), - RoleArn: __expectString(output.RoleArn), - S3ResultsPath: __expectString(output.S3ResultsPath), - TableName: __expectString(output.TableName), - WorkGroupName: __expectString(output.WorkGroupName), - } as any; -}; +// de_BackTestConfiguration omitted. -/** - * deserializeAws_restJson1AttributeValue - */ -const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue => { - return { - B: __expectString(output.B), - BS: output.BS != null ? de_BinaryListAttributeValue(output.BS, context) : undefined, - N: __expectString(output.N), - NS: output.NS != null ? de_NumberListAttributeValue(output.NS, context) : undefined, - S: __expectString(output.S), - SS: output.SS != null ? de_StringListAttributeValue(output.SS, context) : undefined, - } as any; -}; +// de_BinaryListAttributeValue omitted. -/** - * deserializeAws_restJson1BackTestConfiguration - */ -const de_BackTestConfiguration = (output: any, context: __SerdeContext): BackTestConfiguration => { - return { - RunBackTestMode: __expectBoolean(output.RunBackTestMode), - } as any; -}; - -/** - * deserializeAws_restJson1BinaryListAttributeValue - */ -const de_BinaryListAttributeValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CloudWatchConfig - */ -const de_CloudWatchConfig = (output: any, context: __SerdeContext): CloudWatchConfig => { - return { - BackTestConfiguration: - output.BackTestConfiguration != null - ? de_BackTestConfiguration(output.BackTestConfiguration, context) - : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_CloudWatchConfig omitted. /** * deserializeAws_restJson1ContributionMatrix */ const de_ContributionMatrix = (output: any, context: __SerdeContext): ContributionMatrix => { - return { - DimensionContributionList: - output.DimensionContributionList != null - ? de_DimensionContributionList(output.DimensionContributionList, context) - : undefined, - } as any; + return take(output, { + DimensionContributionList: (_: any) => de_DimensionContributionList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1CsvFormatDescriptor - */ -const de_CsvFormatDescriptor = (output: any, context: __SerdeContext): CsvFormatDescriptor => { - return { - Charset: __expectString(output.Charset), - ContainsHeader: __expectBoolean(output.ContainsHeader), - Delimiter: __expectString(output.Delimiter), - FileCompression: __expectString(output.FileCompression), - HeaderList: output.HeaderList != null ? de_HeaderList(output.HeaderList, context) : undefined, - QuoteSymbol: __expectString(output.QuoteSymbol), - } as any; -}; +// de_CsvFormatDescriptor omitted. /** * deserializeAws_restJson1DataQualityMetric */ const de_DataQualityMetric = (output: any, context: __SerdeContext): DataQualityMetric => { - return { - MetricDescription: __expectString(output.MetricDescription), - MetricType: __expectString(output.MetricType), - MetricValue: __limitedParseDouble(output.MetricValue), - RelatedColumnName: __expectString(output.RelatedColumnName), - } as any; + return take(output, { + MetricDescription: __expectString, + MetricType: __expectString, + MetricValue: __limitedParseDouble, + RelatedColumnName: __expectString, + }) as any; }; /** @@ -3912,110 +3285,33 @@ const de_DataQualityMetricList = (output: any, context: __SerdeContext): DataQua const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataQualityMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DetectedCsvFormatDescriptor - */ -const de_DetectedCsvFormatDescriptor = (output: any, context: __SerdeContext): DetectedCsvFormatDescriptor => { - return { - Charset: output.Charset != null ? de_DetectedField(output.Charset, context) : undefined, - ContainsHeader: output.ContainsHeader != null ? de_DetectedField(output.ContainsHeader, context) : undefined, - Delimiter: output.Delimiter != null ? de_DetectedField(output.Delimiter, context) : undefined, - FileCompression: output.FileCompression != null ? de_DetectedField(output.FileCompression, context) : undefined, - HeaderList: output.HeaderList != null ? de_DetectedField(output.HeaderList, context) : undefined, - QuoteSymbol: output.QuoteSymbol != null ? de_DetectedField(output.QuoteSymbol, context) : undefined, - } as any; -}; +// de_DetectedCsvFormatDescriptor omitted. -/** - * deserializeAws_restJson1DetectedField - */ -const de_DetectedField = (output: any, context: __SerdeContext): DetectedField => { - return { - Confidence: __expectString(output.Confidence), - Message: __expectString(output.Message), - Value: output.Value != null ? de_AttributeValue(output.Value, context) : undefined, - } as any; -}; +// de_DetectedField omitted. -/** - * deserializeAws_restJson1DetectedFileFormatDescriptor - */ -const de_DetectedFileFormatDescriptor = (output: any, context: __SerdeContext): DetectedFileFormatDescriptor => { - return { - CsvFormatDescriptor: - output.CsvFormatDescriptor != null - ? de_DetectedCsvFormatDescriptor(output.CsvFormatDescriptor, context) - : undefined, - JsonFormatDescriptor: - output.JsonFormatDescriptor != null - ? de_DetectedJsonFormatDescriptor(output.JsonFormatDescriptor, context) - : undefined, - } as any; -}; +// de_DetectedFileFormatDescriptor omitted. -/** - * deserializeAws_restJson1DetectedJsonFormatDescriptor - */ -const de_DetectedJsonFormatDescriptor = (output: any, context: __SerdeContext): DetectedJsonFormatDescriptor => { - return { - Charset: output.Charset != null ? de_DetectedField(output.Charset, context) : undefined, - FileCompression: output.FileCompression != null ? de_DetectedField(output.FileCompression, context) : undefined, - } as any; -}; +// de_DetectedJsonFormatDescriptor omitted. -/** - * deserializeAws_restJson1DetectedMetricSetConfig - */ -const de_DetectedMetricSetConfig = (output: any, context: __SerdeContext): DetectedMetricSetConfig => { - return { - MetricSetFrequency: - output.MetricSetFrequency != null ? de_DetectedField(output.MetricSetFrequency, context) : undefined, - MetricSource: output.MetricSource != null ? de_DetectedMetricSource(output.MetricSource, context) : undefined, - Offset: output.Offset != null ? de_DetectedField(output.Offset, context) : undefined, - } as any; -}; +// de_DetectedMetricSetConfig omitted. -/** - * deserializeAws_restJson1DetectedMetricSource - */ -const de_DetectedMetricSource = (output: any, context: __SerdeContext): DetectedMetricSource => { - return { - S3SourceConfig: - output.S3SourceConfig != null ? de_DetectedS3SourceConfig(output.S3SourceConfig, context) : undefined, - } as any; -}; +// de_DetectedMetricSource omitted. -/** - * deserializeAws_restJson1DetectedS3SourceConfig - */ -const de_DetectedS3SourceConfig = (output: any, context: __SerdeContext): DetectedS3SourceConfig => { - return { - FileFormatDescriptor: - output.FileFormatDescriptor != null - ? de_DetectedFileFormatDescriptor(output.FileFormatDescriptor, context) - : undefined, - } as any; -}; +// de_DetectedS3SourceConfig omitted. /** * deserializeAws_restJson1DimensionContribution */ const de_DimensionContribution = (output: any, context: __SerdeContext): DimensionContribution => { - return { - DimensionName: __expectString(output.DimensionName), - DimensionValueContributionList: - output.DimensionValueContributionList != null - ? de_DimensionValueContributionList(output.DimensionValueContributionList, context) - : undefined, - } as any; + return take(output, { + DimensionName: __expectString, + DimensionValueContributionList: (_: any) => de_DimensionValueContributionList(_, context), + }) as any; }; /** @@ -4025,88 +3321,29 @@ const de_DimensionContributionList = (output: any, context: __SerdeContext): Dim const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DimensionContribution(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DimensionFilter - */ -const de_DimensionFilter = (output: any, context: __SerdeContext): DimensionFilter => { - return { - DimensionName: __expectString(output.DimensionName), - DimensionValueList: - output.DimensionValueList != null ? de_DimensionValueList(output.DimensionValueList, context) : undefined, - } as any; -}; +// de_DimensionFilter omitted. -/** - * deserializeAws_restJson1DimensionFilterList - */ -const de_DimensionFilterList = (output: any, context: __SerdeContext): DimensionFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionFilter(entry, context); - }); - return retVal; -}; +// de_DimensionFilterList omitted. -/** - * deserializeAws_restJson1DimensionList - */ -const de_DimensionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DimensionList omitted. -/** - * deserializeAws_restJson1DimensionNameValue - */ -const de_DimensionNameValue = (output: any, context: __SerdeContext): DimensionNameValue => { - return { - DimensionName: __expectString(output.DimensionName), - DimensionValue: __expectString(output.DimensionValue), - } as any; -}; +// de_DimensionNameValue omitted. -/** - * deserializeAws_restJson1DimensionNameValueList - */ -const de_DimensionNameValueList = (output: any, context: __SerdeContext): DimensionNameValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionNameValue(entry, context); - }); - return retVal; -}; +// de_DimensionNameValueList omitted. /** * deserializeAws_restJson1DimensionValueContribution */ const de_DimensionValueContribution = (output: any, context: __SerdeContext): DimensionValueContribution => { - return { - ContributionScore: __limitedParseDouble(output.ContributionScore), - DimensionValue: __expectString(output.DimensionValue), - } as any; + return take(output, { + ContributionScore: __limitedParseDouble, + DimensionValue: __expectString, + }) as any; }; /** @@ -4116,147 +3353,39 @@ const de_DimensionValueContributionList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DimensionValueContribution(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DimensionValueList - */ -const de_DimensionValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DimensionValueList omitted. -/** - * deserializeAws_restJson1ExecutionList - */ -const de_ExecutionList = (output: any, context: __SerdeContext): ExecutionStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutionStatus(entry, context); - }); - return retVal; -}; +// de_ExecutionList omitted. -/** - * deserializeAws_restJson1ExecutionStatus - */ -const de_ExecutionStatus = (output: any, context: __SerdeContext): ExecutionStatus => { - return { - FailureReason: __expectString(output.FailureReason), - Status: __expectString(output.Status), - Timestamp: __expectString(output.Timestamp), - } as any; -}; +// de_ExecutionStatus omitted. -/** - * deserializeAws_restJson1FileFormatDescriptor - */ -const de_FileFormatDescriptor = (output: any, context: __SerdeContext): FileFormatDescriptor => { - return { - CsvFormatDescriptor: - output.CsvFormatDescriptor != null ? de_CsvFormatDescriptor(output.CsvFormatDescriptor, context) : undefined, - JsonFormatDescriptor: - output.JsonFormatDescriptor != null ? de_JsonFormatDescriptor(output.JsonFormatDescriptor, context) : undefined, - } as any; -}; +// de_FileFormatDescriptor omitted. -/** - * deserializeAws_restJson1Filter - */ -const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - DimensionValue: __expectString(output.DimensionValue), - FilterOperation: __expectString(output.FilterOperation), - } as any; -}; +// de_Filter omitted. -/** - * deserializeAws_restJson1FilterList - */ -const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Filter(entry, context); - }); - return retVal; -}; +// de_FilterList omitted. -/** - * deserializeAws_restJson1HeaderList - */ -const de_HeaderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HeaderList omitted. -/** - * deserializeAws_restJson1HeaderValueList - */ -const de_HeaderValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HeaderValueList omitted. -/** - * deserializeAws_restJson1HistoricalDataPathList - */ -const de_HistoricalDataPathList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HistoricalDataPathList omitted. /** * deserializeAws_restJson1InterMetricImpactDetails */ const de_InterMetricImpactDetails = (output: any, context: __SerdeContext): InterMetricImpactDetails => { - return { - AnomalyGroupId: __expectString(output.AnomalyGroupId), - ContributionPercentage: __limitedParseDouble(output.ContributionPercentage), - MetricName: __expectString(output.MetricName), - RelationshipType: __expectString(output.RelationshipType), - } as any; + return take(output, { + AnomalyGroupId: __expectString, + ContributionPercentage: __limitedParseDouble, + MetricName: __expectString, + RelationshipType: __expectString, + }) as any; }; /** @@ -4266,80 +3395,30 @@ const de_InterMetricImpactList = (output: any, context: __SerdeContext): InterMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InterMetricImpactDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ItemizedMetricStats - */ -const de_ItemizedMetricStats = (output: any, context: __SerdeContext): ItemizedMetricStats => { - return { - MetricName: __expectString(output.MetricName), - OccurrenceCount: __expectInt32(output.OccurrenceCount), - } as any; -}; +// de_ItemizedMetricStats omitted. -/** - * deserializeAws_restJson1ItemizedMetricStatsList - */ -const de_ItemizedMetricStatsList = (output: any, context: __SerdeContext): ItemizedMetricStats[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ItemizedMetricStats(entry, context); - }); - return retVal; -}; +// de_ItemizedMetricStatsList omitted. -/** - * deserializeAws_restJson1JsonFormatDescriptor - */ -const de_JsonFormatDescriptor = (output: any, context: __SerdeContext): JsonFormatDescriptor => { - return { - Charset: __expectString(output.Charset), - FileCompression: __expectString(output.FileCompression), - } as any; -}; +// de_JsonFormatDescriptor omitted. -/** - * deserializeAws_restJson1LambdaConfiguration - */ -const de_LambdaConfiguration = (output: any, context: __SerdeContext): LambdaConfiguration => { - return { - LambdaArn: __expectString(output.LambdaArn), - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_LambdaConfiguration omitted. -/** - * deserializeAws_restJson1Metric - */ -const de_Metric = (output: any, context: __SerdeContext): Metric => { - return { - AggregationFunction: __expectString(output.AggregationFunction), - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - } as any; -}; +// de_Metric omitted. /** * deserializeAws_restJson1MetricLevelImpact */ const de_MetricLevelImpact = (output: any, context: __SerdeContext): MetricLevelImpact => { - return { - ContributionMatrix: - output.ContributionMatrix != null ? de_ContributionMatrix(output.ContributionMatrix, context) : undefined, - MetricName: __expectString(output.MetricName), - NumTimeSeries: __expectInt32(output.NumTimeSeries), - } as any; + return take(output, { + ContributionMatrix: (_: any) => de_ContributionMatrix(_, context), + MetricName: __expectString, + NumTimeSeries: __expectInt32, + }) as any; }; /** @@ -4349,55 +3428,23 @@ const de_MetricLevelImpactList = (output: any, context: __SerdeContext): MetricL const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricLevelImpact(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MetricList - */ -const de_MetricList = (output: any, context: __SerdeContext): Metric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Metric(entry, context); - }); - return retVal; -}; +// de_MetricList omitted. -/** - * deserializeAws_restJson1MetricNameList - */ -const de_MetricNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MetricNameList omitted. /** * deserializeAws_restJson1MetricSetDataQualityMetric */ const de_MetricSetDataQualityMetric = (output: any, context: __SerdeContext): MetricSetDataQualityMetric => { - return { - DataQualityMetricList: - output.DataQualityMetricList != null - ? de_DataQualityMetricList(output.DataQualityMetricList, context) - : undefined, - MetricSetArn: __expectString(output.MetricSetArn), - } as any; + return take(output, { + DataQualityMetricList: (_: any) => de_DataQualityMetricList(_, context), + MetricSetArn: __expectString, + }) as any; }; /** @@ -4407,58 +3454,28 @@ const de_MetricSetDataQualityMetricList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricSetDataQualityMetric(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MetricSetDimensionFilter - */ -const de_MetricSetDimensionFilter = (output: any, context: __SerdeContext): MetricSetDimensionFilter => { - return { - FilterList: output.FilterList != null ? de_FilterList(output.FilterList, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_MetricSetDimensionFilter omitted. -/** - * deserializeAws_restJson1MetricSetDimensionFilterList - */ -const de_MetricSetDimensionFilterList = (output: any, context: __SerdeContext): MetricSetDimensionFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricSetDimensionFilter(entry, context); - }); - return retVal; -}; +// de_MetricSetDimensionFilterList omitted. /** * deserializeAws_restJson1MetricSetSummary */ const de_MetricSetSummary = (output: any, context: __SerdeContext): MetricSetSummary => { - return { - AnomalyDetectorArn: __expectString(output.AnomalyDetectorArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModificationTime: - output.LastModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationTime))) - : undefined, - MetricSetArn: __expectString(output.MetricSetArn), - MetricSetDescription: __expectString(output.MetricSetDescription), - MetricSetName: __expectString(output.MetricSetName), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + AnomalyDetectorArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetricSetArn: __expectString, + MetricSetDescription: __expectString, + MetricSetName: __expectString, + Tags: _json, + }) as any; }; /** @@ -4468,30 +3485,12 @@ const de_MetricSetSummaryList = (output: any, context: __SerdeContext): MetricSe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricSetSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MetricSource - */ -const de_MetricSource = (output: any, context: __SerdeContext): MetricSource => { - return { - AppFlowConfig: output.AppFlowConfig != null ? de_AppFlowConfig(output.AppFlowConfig, context) : undefined, - AthenaSourceConfig: - output.AthenaSourceConfig != null ? de_AthenaSourceConfig(output.AthenaSourceConfig, context) : undefined, - CloudWatchConfig: - output.CloudWatchConfig != null ? de_CloudWatchConfig(output.CloudWatchConfig, context) : undefined, - RDSSourceConfig: output.RDSSourceConfig != null ? de_RDSSourceConfig(output.RDSSourceConfig, context) : undefined, - RedshiftSourceConfig: - output.RedshiftSourceConfig != null ? de_RedshiftSourceConfig(output.RedshiftSourceConfig, context) : undefined, - S3SourceConfig: output.S3SourceConfig != null ? de_S3SourceConfig(output.S3SourceConfig, context) : undefined, - } as any; -}; +// de_MetricSource omitted. /** * deserializeAws_restJson1MetricValueList @@ -4500,229 +3499,49 @@ const de_MetricValueList = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_restJson1NumberListAttributeValue - */ -const de_NumberListAttributeValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NumberListAttributeValue omitted. -/** - * deserializeAws_restJson1RDSSourceConfig - */ -const de_RDSSourceConfig = (output: any, context: __SerdeContext): RDSSourceConfig => { - return { - DBInstanceIdentifier: __expectString(output.DBInstanceIdentifier), - DatabaseHost: __expectString(output.DatabaseHost), - DatabaseName: __expectString(output.DatabaseName), - DatabasePort: __expectInt32(output.DatabasePort), - RoleArn: __expectString(output.RoleArn), - SecretManagerArn: __expectString(output.SecretManagerArn), - TableName: __expectString(output.TableName), - VpcConfiguration: - output.VpcConfiguration != null ? de_VpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; +// de_RDSSourceConfig omitted. -/** - * deserializeAws_restJson1RedshiftSourceConfig - */ -const de_RedshiftSourceConfig = (output: any, context: __SerdeContext): RedshiftSourceConfig => { - return { - ClusterIdentifier: __expectString(output.ClusterIdentifier), - DatabaseHost: __expectString(output.DatabaseHost), - DatabaseName: __expectString(output.DatabaseName), - DatabasePort: __expectInt32(output.DatabasePort), - RoleArn: __expectString(output.RoleArn), - SecretManagerArn: __expectString(output.SecretManagerArn), - TableName: __expectString(output.TableName), - VpcConfiguration: - output.VpcConfiguration != null ? de_VpcConfiguration(output.VpcConfiguration, context) : undefined, - } as any; -}; +// de_RedshiftSourceConfig omitted. -/** - * deserializeAws_restJson1S3SourceConfig - */ -const de_S3SourceConfig = (output: any, context: __SerdeContext): S3SourceConfig => { - return { - FileFormatDescriptor: - output.FileFormatDescriptor != null ? de_FileFormatDescriptor(output.FileFormatDescriptor, context) : undefined, - HistoricalDataPathList: - output.HistoricalDataPathList != null - ? de_HistoricalDataPathList(output.HistoricalDataPathList, context) - : undefined, - RoleArn: __expectString(output.RoleArn), - TemplatedPathList: - output.TemplatedPathList != null ? de_TemplatedPathList(output.TemplatedPathList, context) : undefined, - } as any; -}; +// de_S3SourceConfig omitted. -/** - * deserializeAws_restJson1SampleRow - */ -const de_SampleRow = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SampleRow omitted. -/** - * deserializeAws_restJson1SampleRows - */ -const de_SampleRows = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SampleRow(entry, context); - }); - return retVal; -}; +// de_SampleRows omitted. -/** - * deserializeAws_restJson1SecurityGroupIdList - */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIdList omitted. -/** - * deserializeAws_restJson1SNSConfiguration - */ -const de_SNSConfiguration = (output: any, context: __SerdeContext): SNSConfiguration => { - return { - RoleArn: __expectString(output.RoleArn), - SnsFormat: __expectString(output.SnsFormat), - SnsTopicArn: __expectString(output.SnsTopicArn), - } as any; -}; +// de_SNSConfiguration omitted. -/** - * deserializeAws_restJson1StringListAttributeValue - */ -const de_StringListAttributeValue = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringListAttributeValue omitted. -/** - * deserializeAws_restJson1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIdList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TemplatedPathList - */ -const de_TemplatedPathList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TemplatedPathList omitted. /** * deserializeAws_restJson1TimeSeries */ const de_TimeSeries = (output: any, context: __SerdeContext): TimeSeries => { - return { - DimensionList: output.DimensionList != null ? de_DimensionNameValueList(output.DimensionList, context) : undefined, - MetricValueList: output.MetricValueList != null ? de_MetricValueList(output.MetricValueList, context) : undefined, - TimeSeriesId: __expectString(output.TimeSeriesId), - } as any; + return take(output, { + DimensionList: _json, + MetricValueList: (_: any) => de_MetricValueList(_, context), + TimeSeriesId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TimeSeriesFeedback - */ -const de_TimeSeriesFeedback = (output: any, context: __SerdeContext): TimeSeriesFeedback => { - return { - IsAnomaly: __expectBoolean(output.IsAnomaly), - TimeSeriesId: __expectString(output.TimeSeriesId), - } as any; -}; +// de_TimeSeriesFeedback omitted. -/** - * deserializeAws_restJson1TimeSeriesFeedbackList - */ -const de_TimeSeriesFeedbackList = (output: any, context: __SerdeContext): TimeSeriesFeedback[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TimeSeriesFeedback(entry, context); - }); - return retVal; -}; +// de_TimeSeriesFeedbackList omitted. /** * deserializeAws_restJson1TimeSeriesList @@ -4731,74 +3550,20 @@ const de_TimeSeriesList = (output: any, context: __SerdeContext): TimeSeries[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimeSeries(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TimestampColumn - */ -const de_TimestampColumn = (output: any, context: __SerdeContext): TimestampColumn => { - return { - ColumnFormat: __expectString(output.ColumnFormat), - ColumnName: __expectString(output.ColumnName), - } as any; -}; +// de_TimestampColumn omitted. -/** - * deserializeAws_restJson1TimestampList - */ -const de_TimestampList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TimestampList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1VpcConfiguration - */ -const de_VpcConfiguration = (output: any, context: __SerdeContext): VpcConfiguration => { - return { - SecurityGroupIdList: - output.SecurityGroupIdList != null ? de_SecurityGroupIdList(output.SecurityGroupIdList, context) : undefined, - SubnetIdList: output.SubnetIdList != null ? de_SubnetIdList(output.SubnetIdList, context) : undefined, - } as any; -}; +// de_VpcConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-lookoutvision/src/protocols/Aws_restJson1.ts b/clients/client-lookoutvision/src/protocols/Aws_restJson1.ts index 4b98d2eae1a5..fae611a3b7e3 100644 --- a/clients/client-lookoutvision/src/protocols/Aws_restJson1.ts +++ b/clients/client-lookoutvision/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,11 +11,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -67,13 +69,10 @@ import { ConflictException, DatasetDescription, DatasetGroundTruthManifest, - DatasetImageStats, DatasetMetadata, DatasetSource, DetectAnomalyResult, GreengrassConfiguration, - GreengrassOutputDetails, - ImageSource, InputS3Object, InternalServerException, ModelDescription, @@ -81,10 +80,8 @@ import { ModelPackagingConfiguration, ModelPackagingDescription, ModelPackagingJobMetadata, - ModelPackagingOutputDetails, ModelPerformance, OutputConfig, - OutputS3Object, PixelAnomaly, ProjectDescription, ProjectMetadata, @@ -114,10 +111,12 @@ export const se_CreateDatasetCommand = async ( "/2020-11-20/projects/{ProjectName}/datasets"; resolvedPath = __resolvedPath(resolvedPath, input, "ProjectName", () => input.ProjectName!, "{ProjectName}", false); let body: any; - body = JSON.stringify({ - ...(input.DatasetSource != null && { DatasetSource: se_DatasetSource(input.DatasetSource, context) }), - ...(input.DatasetType != null && { DatasetType: input.DatasetType }), - }); + body = JSON.stringify( + take(input, { + DatasetSource: (_) => _json(_), + DatasetType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -145,12 +144,14 @@ export const se_CreateModelCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-11-20/projects/{ProjectName}/models"; resolvedPath = __resolvedPath(resolvedPath, input, "ProjectName", () => input.ProjectName!, "{ProjectName}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + KmsKeyId: [], + OutputConfig: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -176,9 +177,11 @@ export const se_CreateProjectCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-11-20/projects"; let body: any; - body = JSON.stringify({ - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - }); + body = JSON.stringify( + take(input, { + ProjectName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -603,10 +606,12 @@ export const se_StartModelCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MaxInferenceUnits != null && { MaxInferenceUnits: input.MaxInferenceUnits }), - ...(input.MinInferenceUnits != null && { MinInferenceUnits: input.MinInferenceUnits }), - }); + body = JSON.stringify( + take(input, { + MaxInferenceUnits: [], + MinInferenceUnits: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -635,12 +640,14 @@ export const se_StartModelPackagingJobCommand = async ( "/2020-11-20/projects/{ProjectName}/modelpackagingjobs"; resolvedPath = __resolvedPath(resolvedPath, input, "ProjectName", () => input.ProjectName!, "{ProjectName}", false); let body: any; - body = JSON.stringify({ - ...(input.Configuration != null && { Configuration: se_ModelPackagingConfiguration(input.Configuration, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }), - }); + body = JSON.stringify( + take(input, { + Configuration: (_) => _json(_), + Description: [], + JobName: [], + ModelVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -702,9 +709,11 @@ export const se_TagResourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-11-20/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -765,9 +774,11 @@ export const se_UpdateDatasetEntriesCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ProjectName", () => input.ProjectName!, "{ProjectName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "DatasetType", () => input.DatasetType!, "{DatasetType}", false); let body: any; - body = JSON.stringify({ - ...(input.Changes != null && { Changes: context.base64Encoder(input.Changes) }), - }); + body = JSON.stringify( + take(input, { + Changes: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -793,9 +804,10 @@ export const de_CreateDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DatasetMetadata != null) { - contents.DatasetMetadata = de_DatasetMetadata(data.DatasetMetadata, context); - } + const doc = take(data, { + DatasetMetadata: (_) => de_DatasetMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -835,10 +847,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -858,9 +869,10 @@ export const de_CreateModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ModelMetadata != null) { - contents.ModelMetadata = de_ModelMetadata(data.ModelMetadata, context); - } + const doc = take(data, { + ModelMetadata: (_) => de_ModelMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -900,10 +912,9 @@ const de_CreateModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -923,9 +934,10 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProjectMetadata != null) { - contents.ProjectMetadata = de_ProjectMetadata(data.ProjectMetadata, context); - } + const doc = take(data, { + ProjectMetadata: (_) => de_ProjectMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -965,10 +977,9 @@ const de_CreateProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1024,10 +1035,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1047,9 +1057,10 @@ export const de_DeleteModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ModelArn != null) { - contents.ModelArn = __expectString(data.ModelArn); - } + const doc = take(data, { + ModelArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1086,10 +1097,9 @@ const de_DeleteModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1109,9 +1119,10 @@ export const de_DeleteProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProjectArn != null) { - contents.ProjectArn = __expectString(data.ProjectArn); - } + const doc = take(data, { + ProjectArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1148,10 +1159,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1171,9 +1181,10 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DatasetDescription != null) { - contents.DatasetDescription = de_DatasetDescription(data.DatasetDescription, context); - } + const doc = take(data, { + DatasetDescription: (_) => de_DatasetDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1210,10 +1221,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1233,9 +1243,10 @@ export const de_DescribeModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ModelDescription != null) { - contents.ModelDescription = de_ModelDescription(data.ModelDescription, context); - } + const doc = take(data, { + ModelDescription: (_) => de_ModelDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1272,10 +1283,9 @@ const de_DescribeModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1295,9 +1305,10 @@ export const de_DescribeModelPackagingJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ModelPackagingDescription != null) { - contents.ModelPackagingDescription = de_ModelPackagingDescription(data.ModelPackagingDescription, context); - } + const doc = take(data, { + ModelPackagingDescription: (_) => de_ModelPackagingDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1331,10 +1342,9 @@ const de_DescribeModelPackagingJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1354,9 +1364,10 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProjectDescription != null) { - contents.ProjectDescription = de_ProjectDescription(data.ProjectDescription, context); - } + const doc = take(data, { + ProjectDescription: (_) => de_ProjectDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1393,10 +1404,9 @@ const de_DescribeProjectCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1416,9 +1426,10 @@ export const de_DetectAnomaliesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DetectAnomalyResult != null) { - contents.DetectAnomalyResult = de_DetectAnomalyResult(data.DetectAnomalyResult, context); - } + const doc = take(data, { + DetectAnomalyResult: (_) => de_DetectAnomalyResult(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1455,10 +1466,9 @@ const de_DetectAnomaliesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,12 +1488,11 @@ export const de_ListDatasetEntriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DatasetEntries != null) { - contents.DatasetEntries = de_DatasetEntryList(data.DatasetEntries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DatasetEntries: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1520,10 +1529,9 @@ const de_ListDatasetEntriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1543,12 +1551,11 @@ export const de_ListModelPackagingJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ModelPackagingJobs != null) { - contents.ModelPackagingJobs = de_ModelPackagingJobsList(data.ModelPackagingJobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ModelPackagingJobs: (_) => de_ModelPackagingJobsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1582,10 +1589,9 @@ const de_ListModelPackagingJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1605,12 +1611,11 @@ export const de_ListModelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Models != null) { - contents.Models = de_ModelMetadataList(data.Models, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Models: (_) => de_ModelMetadataList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1647,10 +1652,9 @@ const de_ListModelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1670,12 +1674,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Projects != null) { - contents.Projects = de_ProjectMetadataList(data.Projects, context); - } + const doc = take(data, { + NextToken: __expectString, + Projects: (_) => de_ProjectMetadataList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1712,10 +1715,9 @@ const de_ListProjectsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1735,9 +1737,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1774,10 +1777,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1797,9 +1799,10 @@ export const de_StartModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1839,10 +1842,9 @@ const de_StartModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,9 +1864,10 @@ export const de_StartModelPackagingJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JobName != null) { - contents.JobName = __expectString(data.JobName); - } + const doc = take(data, { + JobName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1904,10 +1907,9 @@ const de_StartModelPackagingJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1927,9 +1929,10 @@ export const de_StopModelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1966,10 +1969,9 @@ const de_StopModelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,10 +2030,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2087,10 +2088,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2110,9 +2110,10 @@ export const de_UpdateDatasetEntriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2149,16 +2150,15 @@ const de_UpdateDatasetEntriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2168,9 +2168,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2184,15 +2185,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2214,9 +2212,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2233,15 +2232,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2258,21 +2254,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2291,15 +2280,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2313,9 +2299,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2323,121 +2310,34 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DatasetGroundTruthManifest - */ -const se_DatasetGroundTruthManifest = (input: DatasetGroundTruthManifest, context: __SerdeContext): any => { - return { - ...(input.S3Object != null && { S3Object: se_InputS3Object(input.S3Object, context) }), - }; -}; +// se_DatasetGroundTruthManifest omitted. -/** - * serializeAws_restJson1DatasetSource - */ -const se_DatasetSource = (input: DatasetSource, context: __SerdeContext): any => { - return { - ...(input.GroundTruthManifest != null && { - GroundTruthManifest: se_DatasetGroundTruthManifest(input.GroundTruthManifest, context), - }), - }; -}; +// se_DatasetSource omitted. -/** - * serializeAws_restJson1GreengrassConfiguration - */ -const se_GreengrassConfiguration = (input: GreengrassConfiguration, context: __SerdeContext): any => { - return { - ...(input.CompilerOptions != null && { CompilerOptions: input.CompilerOptions }), - ...(input.ComponentDescription != null && { ComponentDescription: input.ComponentDescription }), - ...(input.ComponentName != null && { ComponentName: input.ComponentName }), - ...(input.ComponentVersion != null && { ComponentVersion: input.ComponentVersion }), - ...(input.S3OutputLocation != null && { S3OutputLocation: se_S3Location(input.S3OutputLocation, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetDevice != null && { TargetDevice: input.TargetDevice }), - ...(input.TargetPlatform != null && { TargetPlatform: se_TargetPlatform(input.TargetPlatform, context) }), - }; -}; +// se_GreengrassConfiguration omitted. -/** - * serializeAws_restJson1InputS3Object - */ -const se_InputS3Object = (input: InputS3Object, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; +// se_InputS3Object omitted. -/** - * serializeAws_restJson1ModelPackagingConfiguration - */ -const se_ModelPackagingConfiguration = (input: ModelPackagingConfiguration, context: __SerdeContext): any => { - return { - ...(input.Greengrass != null && { Greengrass: se_GreengrassConfiguration(input.Greengrass, context) }), - }; -}; +// se_ModelPackagingConfiguration omitted. -/** - * serializeAws_restJson1OutputConfig - */ -const se_OutputConfig = (input: OutputConfig, context: __SerdeContext): any => { - return { - ...(input.S3Location != null && { S3Location: se_S3Location(input.S3Location, context) }), - }; -}; +// se_OutputConfig omitted. -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1TargetPlatform - */ -const se_TargetPlatform = (input: TargetPlatform, context: __SerdeContext): any => { - return { - ...(input.Accelerator != null && { Accelerator: input.Accelerator }), - ...(input.Arch != null && { Arch: input.Arch }), - ...(input.Os != null && { Os: input.Os }), - }; -}; +// se_TargetPlatform omitted. /** * deserializeAws_restJson1Anomaly */ const de_Anomaly = (output: any, context: __SerdeContext): Anomaly => { - return { - Name: __expectString(output.Name), - PixelAnomaly: output.PixelAnomaly != null ? de_PixelAnomaly(output.PixelAnomaly, context) : undefined, - } as any; + return take(output, { + Name: __expectString, + PixelAnomaly: (_: any) => de_PixelAnomaly(_, context), + }) as any; }; /** @@ -2447,9 +2347,6 @@ const de_AnomalyList = (output: any, context: __SerdeContext): Anomaly[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Anomaly(entry, context); }); return retVal; @@ -2459,63 +2356,31 @@ const de_AnomalyList = (output: any, context: __SerdeContext): Anomaly[] => { * deserializeAws_restJson1DatasetDescription */ const de_DatasetDescription = (output: any, context: __SerdeContext): DatasetDescription => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - DatasetType: __expectString(output.DatasetType), - ImageStats: output.ImageStats != null ? de_DatasetImageStats(output.ImageStats, context) : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - ProjectName: __expectString(output.ProjectName), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1DatasetEntryList - */ -const de_DatasetEntryList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetType: __expectString, + ImageStats: _json, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectName: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DatasetImageStats - */ -const de_DatasetImageStats = (output: any, context: __SerdeContext): DatasetImageStats => { - return { - Anomaly: __expectInt32(output.Anomaly), - Labeled: __expectInt32(output.Labeled), - Normal: __expectInt32(output.Normal), - Total: __expectInt32(output.Total), - } as any; -}; +// de_DatasetEntryList omitted. + +// de_DatasetImageStats omitted. /** * deserializeAws_restJson1DatasetMetadata */ const de_DatasetMetadata = (output: any, context: __SerdeContext): DatasetMetadata => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - DatasetType: __expectString(output.DatasetType), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetType: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -2525,9 +2390,6 @@ const de_DatasetMetadataList = (output: any, context: __SerdeContext): DatasetMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetMetadata(entry, context); }); return retVal; @@ -2537,96 +2399,56 @@ const de_DatasetMetadataList = (output: any, context: __SerdeContext): DatasetMe * deserializeAws_restJson1DetectAnomalyResult */ const de_DetectAnomalyResult = (output: any, context: __SerdeContext): DetectAnomalyResult => { - return { - Anomalies: output.Anomalies != null ? de_AnomalyList(output.Anomalies, context) : undefined, - AnomalyMask: output.AnomalyMask != null ? context.base64Decoder(output.AnomalyMask) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - IsAnomalous: __expectBoolean(output.IsAnomalous), - Source: output.Source != null ? de_ImageSource(output.Source, context) : undefined, - } as any; + return take(output, { + Anomalies: (_: any) => de_AnomalyList(_, context), + AnomalyMask: context.base64Decoder, + Confidence: __limitedParseFloat32, + IsAnomalous: __expectBoolean, + Source: _json, + }) as any; }; -/** - * deserializeAws_restJson1GreengrassConfiguration - */ -const de_GreengrassConfiguration = (output: any, context: __SerdeContext): GreengrassConfiguration => { - return { - CompilerOptions: __expectString(output.CompilerOptions), - ComponentDescription: __expectString(output.ComponentDescription), - ComponentName: __expectString(output.ComponentName), - ComponentVersion: __expectString(output.ComponentVersion), - S3OutputLocation: output.S3OutputLocation != null ? de_S3Location(output.S3OutputLocation, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TargetDevice: __expectString(output.TargetDevice), - TargetPlatform: output.TargetPlatform != null ? de_TargetPlatform(output.TargetPlatform, context) : undefined, - } as any; -}; +// de_GreengrassConfiguration omitted. -/** - * deserializeAws_restJson1GreengrassOutputDetails - */ -const de_GreengrassOutputDetails = (output: any, context: __SerdeContext): GreengrassOutputDetails => { - return { - ComponentName: __expectString(output.ComponentName), - ComponentVersion: __expectString(output.ComponentVersion), - ComponentVersionArn: __expectString(output.ComponentVersionArn), - } as any; -}; +// de_GreengrassOutputDetails omitted. -/** - * deserializeAws_restJson1ImageSource - */ -const de_ImageSource = (output: any, context: __SerdeContext): ImageSource => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_ImageSource omitted. /** * deserializeAws_restJson1ModelDescription */ const de_ModelDescription = (output: any, context: __SerdeContext): ModelDescription => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - Description: __expectString(output.Description), - EvaluationEndTimestamp: - output.EvaluationEndTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EvaluationEndTimestamp))) - : undefined, - EvaluationManifest: - output.EvaluationManifest != null ? de_OutputS3Object(output.EvaluationManifest, context) : undefined, - EvaluationResult: output.EvaluationResult != null ? de_OutputS3Object(output.EvaluationResult, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - MaxInferenceUnits: __expectInt32(output.MaxInferenceUnits), - MinInferenceUnits: __expectInt32(output.MinInferenceUnits), - ModelArn: __expectString(output.ModelArn), - ModelVersion: __expectString(output.ModelVersion), - OutputConfig: output.OutputConfig != null ? de_OutputConfig(output.OutputConfig, context) : undefined, - Performance: output.Performance != null ? de_ModelPerformance(output.Performance, context) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EvaluationEndTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationManifest: _json, + EvaluationResult: _json, + KmsKeyId: __expectString, + MaxInferenceUnits: __expectInt32, + MinInferenceUnits: __expectInt32, + ModelArn: __expectString, + ModelVersion: __expectString, + OutputConfig: _json, + Performance: (_: any) => de_ModelPerformance(_, context), + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** * deserializeAws_restJson1ModelMetadata */ const de_ModelMetadata = (output: any, context: __SerdeContext): ModelMetadata => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - Description: __expectString(output.Description), - ModelArn: __expectString(output.ModelArn), - ModelVersion: __expectString(output.ModelVersion), - Performance: output.Performance != null ? de_ModelPerformance(output.Performance, context) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ModelArn: __expectString, + ModelVersion: __expectString, + Performance: (_: any) => de_ModelPerformance(_, context), + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -2636,75 +2458,47 @@ const de_ModelMetadataList = (output: any, context: __SerdeContext): ModelMetada const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ModelPackagingConfiguration - */ -const de_ModelPackagingConfiguration = (output: any, context: __SerdeContext): ModelPackagingConfiguration => { - return { - Greengrass: output.Greengrass != null ? de_GreengrassConfiguration(output.Greengrass, context) : undefined, - } as any; -}; +// de_ModelPackagingConfiguration omitted. /** * deserializeAws_restJson1ModelPackagingDescription */ const de_ModelPackagingDescription = (output: any, context: __SerdeContext): ModelPackagingDescription => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - JobName: __expectString(output.JobName), - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - ModelPackagingConfiguration: - output.ModelPackagingConfiguration != null - ? de_ModelPackagingConfiguration(output.ModelPackagingConfiguration, context) - : undefined, - ModelPackagingJobDescription: __expectString(output.ModelPackagingJobDescription), - ModelPackagingMethod: __expectString(output.ModelPackagingMethod), - ModelPackagingOutputDetails: - output.ModelPackagingOutputDetails != null - ? de_ModelPackagingOutputDetails(output.ModelPackagingOutputDetails, context) - : undefined, - ModelVersion: __expectString(output.ModelVersion), - ProjectName: __expectString(output.ProjectName), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobName: __expectString, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelPackagingConfiguration: _json, + ModelPackagingJobDescription: __expectString, + ModelPackagingMethod: __expectString, + ModelPackagingOutputDetails: _json, + ModelVersion: __expectString, + ProjectName: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** * deserializeAws_restJson1ModelPackagingJobMetadata */ const de_ModelPackagingJobMetadata = (output: any, context: __SerdeContext): ModelPackagingJobMetadata => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - JobName: __expectString(output.JobName), - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - ModelPackagingJobDescription: __expectString(output.ModelPackagingJobDescription), - ModelPackagingMethod: __expectString(output.ModelPackagingMethod), - ModelVersion: __expectString(output.ModelVersion), - ProjectName: __expectString(output.ProjectName), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobName: __expectString, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelPackagingJobDescription: __expectString, + ModelPackagingMethod: __expectString, + ModelVersion: __expectString, + ProjectName: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; /** @@ -2714,90 +2508,59 @@ const de_ModelPackagingJobsList = (output: any, context: __SerdeContext): ModelP const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModelPackagingJobMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ModelPackagingOutputDetails - */ -const de_ModelPackagingOutputDetails = (output: any, context: __SerdeContext): ModelPackagingOutputDetails => { - return { - Greengrass: output.Greengrass != null ? de_GreengrassOutputDetails(output.Greengrass, context) : undefined, - } as any; -}; +// de_ModelPackagingOutputDetails omitted. /** * deserializeAws_restJson1ModelPerformance */ const de_ModelPerformance = (output: any, context: __SerdeContext): ModelPerformance => { - return { - F1Score: __limitedParseFloat32(output.F1Score), - Precision: __limitedParseFloat32(output.Precision), - Recall: __limitedParseFloat32(output.Recall), - } as any; + return take(output, { + F1Score: __limitedParseFloat32, + Precision: __limitedParseFloat32, + Recall: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_restJson1OutputConfig - */ -const de_OutputConfig = (output: any, context: __SerdeContext): OutputConfig => { - return { - S3Location: output.S3Location != null ? de_S3Location(output.S3Location, context) : undefined, - } as any; -}; +// de_OutputConfig omitted. -/** - * deserializeAws_restJson1OutputS3Object - */ -const de_OutputS3Object = (output: any, context: __SerdeContext): OutputS3Object => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; -}; +// de_OutputS3Object omitted. /** * deserializeAws_restJson1PixelAnomaly */ const de_PixelAnomaly = (output: any, context: __SerdeContext): PixelAnomaly => { - return { - Color: __expectString(output.Color), - TotalPercentageArea: __limitedParseFloat32(output.TotalPercentageArea), - } as any; + return take(output, { + Color: __expectString, + TotalPercentageArea: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_restJson1ProjectDescription */ const de_ProjectDescription = (output: any, context: __SerdeContext): ProjectDescription => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - Datasets: output.Datasets != null ? de_DatasetMetadataList(output.Datasets, context) : undefined, - ProjectArn: __expectString(output.ProjectArn), - ProjectName: __expectString(output.ProjectName), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Datasets: (_: any) => de_DatasetMetadataList(_, context), + ProjectArn: __expectString, + ProjectName: __expectString, + }) as any; }; /** * deserializeAws_restJson1ProjectMetadata */ const de_ProjectMetadata = (output: any, context: __SerdeContext): ProjectMetadata => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - ProjectArn: __expectString(output.ProjectArn), - ProjectName: __expectString(output.ProjectName), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectArn: __expectString, + ProjectName: __expectString, + }) as any; }; /** @@ -2807,59 +2570,18 @@ const de_ProjectMetadataList = (output: any, context: __SerdeContext): ProjectMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - Bucket: __expectString(output.Bucket), - Prefix: __expectString(output.Prefix), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TargetPlatform - */ -const de_TargetPlatform = (output: any, context: __SerdeContext): TargetPlatform => { - return { - Accelerator: __expectString(output.Accelerator), - Arch: __expectString(output.Arch), - Os: __expectString(output.Os), - } as any; -}; +// de_TargetPlatform omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-m2/src/protocols/Aws_restJson1.ts b/clients/client-m2/src/protocols/Aws_restJson1.ts index 2d39a9d3599f..c141085c68fe 100644 --- a/clients/client-m2/src/protocols/Aws_restJson1.ts +++ b/clients/client-m2/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,11 +11,12 @@ import { expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -94,47 +96,35 @@ import { AlternateKey, ApplicationSummary, ApplicationVersionSummary, - BatchJobDefinition, BatchJobExecutionSummary, BatchJobIdentifier, ConflictException, DataSet, - DatasetDetailOrgAttributes, DataSetImportConfig, DataSetImportItem, - DataSetImportSummary, - DataSetImportTask, DatasetOrgAttributes, DataSetSummary, Definition, - DeployedVersionSummary, DeploymentSummary, EfsStorageConfiguration, - EngineVersionsSummary, EnvironmentSummary, ExternalLocation, - FileBatchJobDefinition, FileBatchJobIdentifier, FsxStorageConfiguration, GdgAttributes, - GdgDetailAttributes, HighAvailabilityConfig, InternalServerException, - LogGroupSummary, MaintenanceSchedule, PendingMaintenance, PrimaryKey, RecordLength, ResourceNotFoundException, - ScriptBatchJobDefinition, ScriptBatchJobIdentifier, ServiceQuotaExceededException, StorageConfiguration, ThrottlingException, ValidationException, - ValidationExceptionField, VsamAttributes, - VsamDetailAttributes, } from "../models/models_0"; /** @@ -183,15 +173,17 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.definition != null && { definition: se_Definition(input.definition, context) }), - ...(input.description != null && { description: input.description }), - ...(input.engineType != null && { engineType: input.engineType }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + definition: (_) => _json(_), + description: [], + engineType: [], + kmsKeyId: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -226,10 +218,12 @@ export const se_CreateDataSetImportTaskCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.importConfig != null && { importConfig: se_DataSetImportConfig(input.importConfig, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + importConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -263,11 +257,13 @@ export const se_CreateDeploymentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.environmentId != null && { environmentId: input.environmentId }), - }); + body = JSON.stringify( + take(input, { + applicationVersion: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + environmentId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -292,26 +288,24 @@ export const se_CreateEnvironmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.engineType != null && { engineType: input.engineType }), - ...(input.engineVersion != null && { engineVersion: input.engineVersion }), - ...(input.highAvailabilityConfig != null && { - highAvailabilityConfig: se_HighAvailabilityConfig(input.highAvailabilityConfig, context), - }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.name != null && { name: input.name }), - ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }), - ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }), - ...(input.securityGroupIds != null && { securityGroupIds: se_String50List(input.securityGroupIds, context) }), - ...(input.storageConfigurations != null && { - storageConfigurations: se_StorageConfigurationList(input.storageConfigurations, context), - }), - ...(input.subnetIds != null && { subnetIds: se_String50List(input.subnetIds, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + engineType: [], + engineVersion: [], + highAvailabilityConfig: (_) => _json(_), + instanceType: [], + kmsKeyId: [], + name: [], + preferredMaintenanceWindow: [], + publiclyAccessible: [], + securityGroupIds: (_) => _json(_), + storageConfigurations: (_) => se_StorageConfigurationList(_, context), + subnetIds: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1063,12 +1057,12 @@ export const se_StartBatchJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.batchJobIdentifier != null && { - batchJobIdentifier: se_BatchJobIdentifier(input.batchJobIdentifier, context), - }), - ...(input.jobParams != null && { jobParams: se_BatchJobParametersMap(input.jobParams, context) }), - }); + body = JSON.stringify( + take(input, { + batchJobIdentifier: (_) => _json(_), + jobParams: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1102,9 +1096,11 @@ export const se_StopApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.forceStop != null && { forceStop: input.forceStop }), - }); + body = JSON.stringify( + take(input, { + forceStop: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1130,9 +1126,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1196,11 +1194,13 @@ export const se_UpdateApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.currentApplicationVersion != null && { currentApplicationVersion: input.currentApplicationVersion }), - ...(input.definition != null && { definition: se_Definition(input.definition, context) }), - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + currentApplicationVersion: [], + definition: (_) => _json(_), + description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1234,15 +1234,15 @@ export const se_UpdateEnvironmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.applyDuringMaintenanceWindow != null && { - applyDuringMaintenanceWindow: input.applyDuringMaintenanceWindow, - }), - ...(input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity }), - ...(input.engineVersion != null && { engineVersion: input.engineVersion }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.preferredMaintenanceWindow != null && { preferredMaintenanceWindow: input.preferredMaintenanceWindow }), - }); + body = JSON.stringify( + take(input, { + applyDuringMaintenanceWindow: [], + desiredCapacity: [], + engineVersion: [], + instanceType: [], + preferredMaintenanceWindow: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1304,10 +1304,9 @@ const de_CancelBatchJobExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1327,15 +1326,12 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.applicationVersion != null) { - contents.applicationVersion = __expectInt32(data.applicationVersion); - } + const doc = take(data, { + applicationArn: __expectString, + applicationId: __expectString, + applicationVersion: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -1372,10 +1368,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1395,9 +1390,10 @@ export const de_CreateDataSetImportTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1437,10 +1433,9 @@ const de_CreateDataSetImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1460,9 +1455,10 @@ export const de_CreateDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } + const doc = take(data, { + deploymentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1502,10 +1498,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1525,9 +1520,10 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environmentId != null) { - contents.environmentId = __expectString(data.environmentId); - } + const doc = take(data, { + environmentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1564,10 +1560,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1620,10 +1615,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1679,10 +1673,9 @@ const de_DeleteApplicationFromEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1735,10 +1728,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1758,63 +1750,28 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.deployedVersion != null) { - contents.deployedVersion = de_DeployedVersionSummary(data.deployedVersion, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.engineType != null) { - contents.engineType = __expectString(data.engineType); - } - if (data.environmentId != null) { - contents.environmentId = __expectString(data.environmentId); - } - if (data.kmsKeyId != null) { - contents.kmsKeyId = __expectString(data.kmsKeyId); - } - if (data.lastStartTime != null) { - contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime))); - } - if (data.latestVersion != null) { - contents.latestVersion = de_ApplicationVersionSummary(data.latestVersion, context); - } - if (data.listenerArns != null) { - contents.listenerArns = de_ArnList(data.listenerArns, context); - } - if (data.listenerPorts != null) { - contents.listenerPorts = de_PortList(data.listenerPorts, context); - } - if (data.loadBalancerDnsName != null) { - contents.loadBalancerDnsName = __expectString(data.loadBalancerDnsName); - } - if (data.logGroups != null) { - contents.logGroups = de_LogGroupSummaries(data.logGroups, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.targetGroupArns != null) { - contents.targetGroupArns = de_ArnList(data.targetGroupArns, context); - } + const doc = take(data, { + applicationArn: __expectString, + applicationId: __expectString, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deployedVersion: _json, + description: __expectString, + engineType: __expectString, + environmentId: __expectString, + kmsKeyId: __expectString, + lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestVersion: (_) => de_ApplicationVersionSummary(_, context), + listenerArns: _json, + listenerPorts: _json, + loadBalancerDnsName: __expectString, + logGroups: _json, + name: __expectString, + status: __expectString, + statusReason: __expectString, + tags: _json, + targetGroupArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1848,10 +1805,9 @@ const de_GetApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1871,27 +1827,16 @@ export const de_GetApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationVersion != null) { - contents.applicationVersion = __expectInt32(data.applicationVersion); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.definitionContent != null) { - contents.definitionContent = __expectString(data.definitionContent); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } + const doc = take(data, { + applicationVersion: __expectInt32, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + definitionContent: __expectString, + description: __expectString, + name: __expectString, + status: __expectString, + statusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1925,10 +1870,9 @@ const de_GetApplicationVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1948,42 +1892,21 @@ export const de_GetBatchJobExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.batchJobIdentifier != null) { - contents.batchJobIdentifier = de_BatchJobIdentifier(__expectUnion(data.batchJobIdentifier), context); - } - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.executionId != null) { - contents.executionId = __expectString(data.executionId); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobName != null) { - contents.jobName = __expectString(data.jobName); - } - if (data.jobType != null) { - contents.jobType = __expectString(data.jobType); - } - if (data.jobUser != null) { - contents.jobUser = __expectString(data.jobUser); - } - if (data.returnCode != null) { - contents.returnCode = __expectString(data.returnCode); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } + const doc = take(data, { + applicationId: __expectString, + batchJobIdentifier: (_) => _json(__expectUnion(_)), + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + executionId: __expectString, + jobId: __expectString, + jobName: __expectString, + jobType: __expectString, + jobUser: __expectString, + returnCode: __expectString, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2017,10 +1940,9 @@ const de_GetBatchJobExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2040,30 +1962,17 @@ export const de_GetDataSetDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.blocksize != null) { - contents.blocksize = __expectInt32(data.blocksize); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.dataSetName != null) { - contents.dataSetName = __expectString(data.dataSetName); - } - if (data.dataSetOrg != null) { - contents.dataSetOrg = de_DatasetDetailOrgAttributes(__expectUnion(data.dataSetOrg), context); - } - if (data.lastReferencedTime != null) { - contents.lastReferencedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastReferencedTime))); - } - if (data.lastUpdatedTime != null) { - contents.lastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedTime))); - } - if (data.location != null) { - contents.location = __expectString(data.location); - } - if (data.recordLength != null) { - contents.recordLength = __expectInt32(data.recordLength); - } + const doc = take(data, { + blocksize: __expectInt32, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataSetName: __expectString, + dataSetOrg: (_) => _json(__expectUnion(_)), + lastReferencedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + location: __expectString, + recordLength: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2097,10 +2006,9 @@ const de_GetDataSetDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2120,15 +2028,12 @@ export const de_GetDataSetImportTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.summary != null) { - contents.summary = de_DataSetImportSummary(data.summary, context); - } - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + status: __expectString, + summary: _json, + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2162,10 +2067,9 @@ const de_GetDataSetImportTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2185,27 +2089,16 @@ export const de_GetDeploymentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.applicationId = __expectString(data.applicationId); - } - if (data.applicationVersion != null) { - contents.applicationVersion = __expectInt32(data.applicationVersion); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.deploymentId != null) { - contents.deploymentId = __expectString(data.deploymentId); - } - if (data.environmentId != null) { - contents.environmentId = __expectString(data.environmentId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } + const doc = take(data, { + applicationId: __expectString, + applicationVersion: __expectInt32, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + environmentId: __expectString, + status: __expectString, + statusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2239,10 +2132,9 @@ const de_GetDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2262,72 +2154,31 @@ export const de_GetEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actualCapacity != null) { - contents.actualCapacity = __expectInt32(data.actualCapacity); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.engineType != null) { - contents.engineType = __expectString(data.engineType); - } - if (data.engineVersion != null) { - contents.engineVersion = __expectString(data.engineVersion); - } - if (data.environmentArn != null) { - contents.environmentArn = __expectString(data.environmentArn); - } - if (data.environmentId != null) { - contents.environmentId = __expectString(data.environmentId); - } - if (data.highAvailabilityConfig != null) { - contents.highAvailabilityConfig = de_HighAvailabilityConfig(data.highAvailabilityConfig, context); - } - if (data.instanceType != null) { - contents.instanceType = __expectString(data.instanceType); - } - if (data.kmsKeyId != null) { - contents.kmsKeyId = __expectString(data.kmsKeyId); - } - if (data.loadBalancerArn != null) { - contents.loadBalancerArn = __expectString(data.loadBalancerArn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.pendingMaintenance != null) { - contents.pendingMaintenance = de_PendingMaintenance(data.pendingMaintenance, context); - } - if (data.preferredMaintenanceWindow != null) { - contents.preferredMaintenanceWindow = __expectString(data.preferredMaintenanceWindow); - } - if (data.publiclyAccessible != null) { - contents.publiclyAccessible = __expectBoolean(data.publiclyAccessible); - } - if (data.securityGroupIds != null) { - contents.securityGroupIds = de_String50List(data.securityGroupIds, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } - if (data.storageConfigurations != null) { - contents.storageConfigurations = de_StorageConfigurationList(data.storageConfigurations, context); - } - if (data.subnetIds != null) { - contents.subnetIds = de_String50List(data.subnetIds, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.vpcId != null) { - contents.vpcId = __expectString(data.vpcId); - } + const doc = take(data, { + actualCapacity: __expectInt32, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + engineType: __expectString, + engineVersion: __expectString, + environmentArn: __expectString, + environmentId: __expectString, + highAvailabilityConfig: _json, + instanceType: __expectString, + kmsKeyId: __expectString, + loadBalancerArn: __expectString, + name: __expectString, + pendingMaintenance: (_) => de_PendingMaintenance(_, context), + preferredMaintenanceWindow: __expectString, + publiclyAccessible: __expectBoolean, + securityGroupIds: _json, + status: __expectString, + statusReason: __expectString, + storageConfigurations: (_) => de_StorageConfigurationList(_, context), + subnetIds: _json, + tags: _json, + vpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2361,10 +2212,9 @@ const de_GetEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2384,12 +2234,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applications != null) { - contents.applications = de_ApplicationSummaryList(data.applications, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + applications: (_) => de_ApplicationSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2420,10 +2269,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2443,12 +2291,11 @@ export const de_ListApplicationVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationVersions != null) { - contents.applicationVersions = de_ApplicationVersionSummaryList(data.applicationVersions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + applicationVersions: (_) => de_ApplicationVersionSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2482,10 +2329,9 @@ const de_ListApplicationVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,12 +2351,11 @@ export const de_ListBatchJobDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.batchJobDefinitions != null) { - contents.batchJobDefinitions = de_BatchJobDefinitions(data.batchJobDefinitions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + batchJobDefinitions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2544,10 +2389,9 @@ const de_ListBatchJobDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2567,12 +2411,11 @@ export const de_ListBatchJobExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.batchJobExecutions != null) { - contents.batchJobExecutions = de_BatchJobExecutionSummaryList(data.batchJobExecutions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + batchJobExecutions: (_) => de_BatchJobExecutionSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2606,10 +2449,9 @@ const de_ListBatchJobExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2629,12 +2471,11 @@ export const de_ListDataSetImportHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataSetImportTasks != null) { - contents.dataSetImportTasks = de_DataSetImportTaskList(data.dataSetImportTasks, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dataSetImportTasks: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2668,10 +2509,9 @@ const de_ListDataSetImportHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2691,12 +2531,11 @@ export const de_ListDataSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dataSets != null) { - contents.dataSets = de_DataSetsSummaryList(data.dataSets, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + dataSets: (_) => de_DataSetsSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2730,10 +2569,9 @@ const de_ListDataSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2753,12 +2591,11 @@ export const de_ListDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deployments != null) { - contents.deployments = de_DeploymentList(data.deployments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + deployments: (_) => de_DeploymentList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2792,10 +2629,9 @@ const de_ListDeploymentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2815,12 +2651,11 @@ export const de_ListEngineVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.engineVersions != null) { - contents.engineVersions = de_EngineVersionsSummaryList(data.engineVersions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + engineVersions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2851,10 +2686,9 @@ const de_ListEngineVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2874,12 +2708,11 @@ export const de_ListEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environments != null) { - contents.environments = de_EnvironmentSummaryList(data.environments, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + environments: (_) => de_EnvironmentSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2910,10 +2743,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2933,9 +2765,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2969,10 +2802,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3028,10 +2860,9 @@ const de_StartApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3051,9 +2882,10 @@ export const de_StartBatchJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executionId != null) { - contents.executionId = __expectString(data.executionId); - } + const doc = take(data, { + executionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3090,10 +2922,9 @@ const de_StartBatchJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3149,10 +2980,9 @@ const de_StopApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3208,10 +3038,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3264,10 +3093,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3287,9 +3115,10 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationVersion != null) { - contents.applicationVersion = __expectInt32(data.applicationVersion); - } + const doc = take(data, { + applicationVersion: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -3326,10 +3155,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3349,9 +3177,10 @@ export const de_UpdateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.environmentId != null) { - contents.environmentId = __expectString(data.environmentId); - } + const doc = take(data, { + environmentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3391,16 +3220,15 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3410,9 +3238,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3426,15 +3255,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3456,9 +3282,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3475,15 +3302,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3500,21 +3324,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3533,15 +3350,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3555,15 +3369,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3571,208 +3382,59 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AlternateKey - */ -const se_AlternateKey = (input: AlternateKey, context: __SerdeContext): any => { - return { - ...(input.allowDuplicates != null && { allowDuplicates: input.allowDuplicates }), - ...(input.length != null && { length: input.length }), - ...(input.name != null && { name: input.name }), - ...(input.offset != null && { offset: input.offset }), - }; -}; +// se_AlternateKey omitted. -/** - * serializeAws_restJson1AlternateKeyList - */ -const se_AlternateKeyList = (input: AlternateKey[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AlternateKey(entry, context); - }); -}; +// se_AlternateKeyList omitted. -/** - * serializeAws_restJson1BatchJobIdentifier - */ -const se_BatchJobIdentifier = (input: BatchJobIdentifier, context: __SerdeContext): any => { - return BatchJobIdentifier.visit(input, { - fileBatchJobIdentifier: (value) => ({ fileBatchJobIdentifier: se_FileBatchJobIdentifier(value, context) }), - scriptBatchJobIdentifier: (value) => ({ scriptBatchJobIdentifier: se_ScriptBatchJobIdentifier(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_BatchJobIdentifier omitted. -/** - * serializeAws_restJson1BatchJobParametersMap - */ -const se_BatchJobParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_BatchJobParametersMap omitted. -/** - * serializeAws_restJson1DataSet - */ -const se_DataSet = (input: DataSet, context: __SerdeContext): any => { - return { - ...(input.datasetName != null && { datasetName: input.datasetName }), - ...(input.datasetOrg != null && { datasetOrg: se_DatasetOrgAttributes(input.datasetOrg, context) }), - ...(input.recordLength != null && { recordLength: se_RecordLength(input.recordLength, context) }), - ...(input.relativePath != null && { relativePath: input.relativePath }), - ...(input.storageType != null && { storageType: input.storageType }), - }; -}; +// se_DataSet omitted. -/** - * serializeAws_restJson1DataSetImportConfig - */ -const se_DataSetImportConfig = (input: DataSetImportConfig, context: __SerdeContext): any => { - return DataSetImportConfig.visit(input, { - dataSets: (value) => ({ dataSets: se_DataSetImportList(value, context) }), - s3Location: (value) => ({ s3Location: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_DataSetImportConfig omitted. -/** - * serializeAws_restJson1DataSetImportItem - */ -const se_DataSetImportItem = (input: DataSetImportItem, context: __SerdeContext): any => { - return { - ...(input.dataSet != null && { dataSet: se_DataSet(input.dataSet, context) }), - ...(input.externalLocation != null && { externalLocation: se_ExternalLocation(input.externalLocation, context) }), - }; -}; +// se_DataSetImportItem omitted. -/** - * serializeAws_restJson1DataSetImportList - */ -const se_DataSetImportList = (input: DataSetImportItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSetImportItem(entry, context); - }); -}; +// se_DataSetImportList omitted. -/** - * serializeAws_restJson1DatasetOrgAttributes - */ -const se_DatasetOrgAttributes = (input: DatasetOrgAttributes, context: __SerdeContext): any => { - return DatasetOrgAttributes.visit(input, { - gdg: (value) => ({ gdg: se_GdgAttributes(value, context) }), - vsam: (value) => ({ vsam: se_VsamAttributes(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_DatasetOrgAttributes omitted. -/** - * serializeAws_restJson1Definition - */ -const se_Definition = (input: Definition, context: __SerdeContext): any => { - return Definition.visit(input, { - content: (value) => ({ content: value }), - s3Location: (value) => ({ s3Location: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Definition omitted. /** * serializeAws_restJson1EfsStorageConfiguration */ const se_EfsStorageConfiguration = (input: EfsStorageConfiguration, context: __SerdeContext): any => { - return { - ...(input.fileSystemId != null && { "file-system-id": input.fileSystemId }), - ...(input.mountPoint != null && { "mount-point": input.mountPoint }), - }; -}; - -/** - * serializeAws_restJson1ExternalLocation - */ -const se_ExternalLocation = (input: ExternalLocation, context: __SerdeContext): any => { - return ExternalLocation.visit(input, { - s3Location: (value) => ({ s3Location: value }), - _: (name, value) => ({ name: value } as any), + return take(input, { + "file-system-id": [, , `fileSystemId`], + "mount-point": [, , `mountPoint`], }); }; -/** - * serializeAws_restJson1FileBatchJobIdentifier - */ -const se_FileBatchJobIdentifier = (input: FileBatchJobIdentifier, context: __SerdeContext): any => { - return { - ...(input.fileName != null && { fileName: input.fileName }), - ...(input.folderPath != null && { folderPath: input.folderPath }), - }; -}; +// se_ExternalLocation omitted. + +// se_FileBatchJobIdentifier omitted. /** * serializeAws_restJson1FsxStorageConfiguration */ const se_FsxStorageConfiguration = (input: FsxStorageConfiguration, context: __SerdeContext): any => { - return { - ...(input.fileSystemId != null && { "file-system-id": input.fileSystemId }), - ...(input.mountPoint != null && { "mount-point": input.mountPoint }), - }; + return take(input, { + "file-system-id": [, , `fileSystemId`], + "mount-point": [, , `mountPoint`], + }); }; -/** - * serializeAws_restJson1GdgAttributes - */ -const se_GdgAttributes = (input: GdgAttributes, context: __SerdeContext): any => { - return { - ...(input.limit != null && { limit: input.limit }), - ...(input.rollDisposition != null && { rollDisposition: input.rollDisposition }), - }; -}; +// se_GdgAttributes omitted. -/** - * serializeAws_restJson1HighAvailabilityConfig - */ -const se_HighAvailabilityConfig = (input: HighAvailabilityConfig, context: __SerdeContext): any => { - return { - ...(input.desiredCapacity != null && { desiredCapacity: input.desiredCapacity }), - }; -}; +// se_HighAvailabilityConfig omitted. -/** - * serializeAws_restJson1PrimaryKey - */ -const se_PrimaryKey = (input: PrimaryKey, context: __SerdeContext): any => { - return { - ...(input.length != null && { length: input.length }), - ...(input.name != null && { name: input.name }), - ...(input.offset != null && { offset: input.offset }), - }; -}; +// se_PrimaryKey omitted. -/** - * serializeAws_restJson1RecordLength - */ -const se_RecordLength = (input: RecordLength, context: __SerdeContext): any => { - return { - ...(input.max != null && { max: input.max }), - ...(input.min != null && { min: input.min }), - }; -}; +// se_RecordLength omitted. -/** - * serializeAws_restJson1ScriptBatchJobIdentifier - */ -const se_ScriptBatchJobIdentifier = (input: ScriptBatchJobIdentifier, context: __SerdeContext): any => { - return { - ...(input.scriptName != null && { scriptName: input.scriptName }), - }; -}; +// se_ScriptBatchJobIdentifier omitted. /** * serializeAws_restJson1StorageConfiguration @@ -3796,94 +3458,34 @@ const se_StorageConfigurationList = (input: StorageConfiguration[], context: __S }); }; -/** - * serializeAws_restJson1String50List - */ -const se_String50List = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_String50List omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1VsamAttributes - */ -const se_VsamAttributes = (input: VsamAttributes, context: __SerdeContext): any => { - return { - ...(input.alternateKeys != null && { alternateKeys: se_AlternateKeyList(input.alternateKeys, context) }), - ...(input.compressed != null && { compressed: input.compressed }), - ...(input.encoding != null && { encoding: input.encoding }), - ...(input.format != null && { format: input.format }), - ...(input.primaryKey != null && { primaryKey: se_PrimaryKey(input.primaryKey, context) }), - }; -}; +// se_VsamAttributes omitted. -/** - * deserializeAws_restJson1AlternateKey - */ -const de_AlternateKey = (output: any, context: __SerdeContext): AlternateKey => { - return { - allowDuplicates: __expectBoolean(output.allowDuplicates), - length: __expectInt32(output.length), - name: __expectString(output.name), - offset: __expectInt32(output.offset), - } as any; -}; +// de_AlternateKey omitted. -/** - * deserializeAws_restJson1AlternateKeyList - */ -const de_AlternateKeyList = (output: any, context: __SerdeContext): AlternateKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlternateKey(entry, context); - }); - return retVal; -}; +// de_AlternateKeyList omitted. /** * deserializeAws_restJson1ApplicationSummary */ const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - applicationArn: __expectString(output.applicationArn), - applicationId: __expectString(output.applicationId), - applicationVersion: __expectInt32(output.applicationVersion), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - description: __expectString(output.description), - engineType: __expectString(output.engineType), - environmentId: __expectString(output.environmentId), - lastStartTime: - output.lastStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStartTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - versionStatus: __expectString(output.versionStatus), - } as any; + return take(output, { + applicationArn: __expectString, + applicationId: __expectString, + applicationVersion: __expectInt32, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + description: __expectString, + engineType: __expectString, + environmentId: __expectString, + lastStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + versionStatus: __expectString, + }) as any; }; /** @@ -3893,9 +3495,6 @@ const de_ApplicationSummaryList = (output: any, context: __SerdeContext): Applic const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationSummary(entry, context); }); return retVal; @@ -3905,15 +3504,12 @@ const de_ApplicationSummaryList = (output: any, context: __SerdeContext): Applic * deserializeAws_restJson1ApplicationVersionSummary */ const de_ApplicationVersionSummary = (output: any, context: __SerdeContext): ApplicationVersionSummary => { - return { - applicationVersion: __expectInt32(output.applicationVersion), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + applicationVersion: __expectInt32, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReason: __expectString, + }) as any; }; /** @@ -3923,82 +3519,33 @@ const de_ApplicationVersionSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationVersionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArnList omitted. -/** - * deserializeAws_restJson1BatchJobDefinition - */ -const de_BatchJobDefinition = (output: any, context: __SerdeContext): BatchJobDefinition => { - if (output.fileBatchJobDefinition != null) { - return { - fileBatchJobDefinition: de_FileBatchJobDefinition(output.fileBatchJobDefinition, context), - }; - } - if (output.scriptBatchJobDefinition != null) { - return { - scriptBatchJobDefinition: de_ScriptBatchJobDefinition(output.scriptBatchJobDefinition, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_BatchJobDefinition omitted. -/** - * deserializeAws_restJson1BatchJobDefinitions - */ -const de_BatchJobDefinitions = (output: any, context: __SerdeContext): BatchJobDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchJobDefinition(__expectUnion(entry), context); - }); - return retVal; -}; +// de_BatchJobDefinitions omitted. /** * deserializeAws_restJson1BatchJobExecutionSummary */ const de_BatchJobExecutionSummary = (output: any, context: __SerdeContext): BatchJobExecutionSummary => { - return { - applicationId: __expectString(output.applicationId), - batchJobIdentifier: - output.batchJobIdentifier != null - ? de_BatchJobIdentifier(__expectUnion(output.batchJobIdentifier), context) - : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - executionId: __expectString(output.executionId), - jobId: __expectString(output.jobId), - jobName: __expectString(output.jobName), - jobType: __expectString(output.jobType), - returnCode: __expectString(output.returnCode), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + applicationId: __expectString, + batchJobIdentifier: (_: any) => _json(__expectUnion(_)), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + executionId: __expectString, + jobId: __expectString, + jobName: __expectString, + jobType: __expectString, + returnCode: __expectString, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** @@ -4008,86 +3555,20 @@ const de_BatchJobExecutionSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchJobExecutionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1BatchJobIdentifier - */ -const de_BatchJobIdentifier = (output: any, context: __SerdeContext): BatchJobIdentifier => { - if (output.fileBatchJobIdentifier != null) { - return { - fileBatchJobIdentifier: de_FileBatchJobIdentifier(output.fileBatchJobIdentifier, context), - }; - } - if (output.scriptBatchJobIdentifier != null) { - return { - scriptBatchJobIdentifier: de_ScriptBatchJobIdentifier(output.scriptBatchJobIdentifier, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_BatchJobIdentifier omitted. -/** - * deserializeAws_restJson1DatasetDetailOrgAttributes - */ -const de_DatasetDetailOrgAttributes = (output: any, context: __SerdeContext): DatasetDetailOrgAttributes => { - if (output.gdg != null) { - return { - gdg: de_GdgDetailAttributes(output.gdg, context), - }; - } - if (output.vsam != null) { - return { - vsam: de_VsamDetailAttributes(output.vsam, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_DatasetDetailOrgAttributes omitted. -/** - * deserializeAws_restJson1DataSetImportSummary - */ -const de_DataSetImportSummary = (output: any, context: __SerdeContext): DataSetImportSummary => { - return { - failed: __expectInt32(output.failed), - inProgress: __expectInt32(output.inProgress), - pending: __expectInt32(output.pending), - succeeded: __expectInt32(output.succeeded), - total: __expectInt32(output.total), - } as any; -}; +// de_DataSetImportSummary omitted. -/** - * deserializeAws_restJson1DataSetImportTask - */ -const de_DataSetImportTask = (output: any, context: __SerdeContext): DataSetImportTask => { - return { - status: __expectString(output.status), - summary: output.summary != null ? de_DataSetImportSummary(output.summary, context) : undefined, - taskId: __expectString(output.taskId), - } as any; -}; +// de_DataSetImportTask omitted. -/** - * deserializeAws_restJson1DataSetImportTaskList - */ -const de_DataSetImportTaskList = (output: any, context: __SerdeContext): DataSetImportTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSetImportTask(entry, context); - }); - return retVal; -}; +// de_DataSetImportTaskList omitted. /** * deserializeAws_restJson1DataSetsSummaryList @@ -4096,9 +3577,6 @@ const de_DataSetsSummaryList = (output: any, context: __SerdeContext): DataSetSu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataSetSummary(entry, context); }); return retVal; @@ -4108,35 +3586,17 @@ const de_DataSetsSummaryList = (output: any, context: __SerdeContext): DataSetSu * deserializeAws_restJson1DataSetSummary */ const de_DataSetSummary = (output: any, context: __SerdeContext): DataSetSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - dataSetName: __expectString(output.dataSetName), - dataSetOrg: __expectString(output.dataSetOrg), - format: __expectString(output.format), - lastReferencedTime: - output.lastReferencedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastReferencedTime))) - : undefined, - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataSetName: __expectString, + dataSetOrg: __expectString, + format: __expectString, + lastReferencedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1DeployedVersionSummary - */ -const de_DeployedVersionSummary = (output: any, context: __SerdeContext): DeployedVersionSummary => { - return { - applicationVersion: __expectInt32(output.applicationVersion), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; -}; +// de_DeployedVersionSummary omitted. /** * deserializeAws_restJson1DeploymentList @@ -4145,9 +3605,6 @@ const de_DeploymentList = (output: any, context: __SerdeContext): DeploymentSumm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeploymentSummary(entry, context); }); return retVal; @@ -4157,72 +3614,45 @@ const de_DeploymentList = (output: any, context: __SerdeContext): DeploymentSumm * deserializeAws_restJson1DeploymentSummary */ const de_DeploymentSummary = (output: any, context: __SerdeContext): DeploymentSummary => { - return { - applicationId: __expectString(output.applicationId), - applicationVersion: __expectInt32(output.applicationVersion), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - deploymentId: __expectString(output.deploymentId), - environmentId: __expectString(output.environmentId), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + applicationId: __expectString, + applicationVersion: __expectInt32, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentId: __expectString, + environmentId: __expectString, + status: __expectString, + statusReason: __expectString, + }) as any; }; /** * deserializeAws_restJson1EfsStorageConfiguration */ const de_EfsStorageConfiguration = (output: any, context: __SerdeContext): EfsStorageConfiguration => { - return { - fileSystemId: __expectString(output["file-system-id"]), - mountPoint: __expectString(output["mount-point"]), - } as any; + return take(output, { + fileSystemId: [, __expectString, `file-system-id`], + mountPoint: [, __expectString, `mount-point`], + }) as any; }; -/** - * deserializeAws_restJson1EngineVersionsSummary - */ -const de_EngineVersionsSummary = (output: any, context: __SerdeContext): EngineVersionsSummary => { - return { - engineType: __expectString(output.engineType), - engineVersion: __expectString(output.engineVersion), - } as any; -}; +// de_EngineVersionsSummary omitted. -/** - * deserializeAws_restJson1EngineVersionsSummaryList - */ -const de_EngineVersionsSummaryList = (output: any, context: __SerdeContext): EngineVersionsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EngineVersionsSummary(entry, context); - }); - return retVal; -}; +// de_EngineVersionsSummaryList omitted. /** * deserializeAws_restJson1EnvironmentSummary */ const de_EnvironmentSummary = (output: any, context: __SerdeContext): EnvironmentSummary => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - engineType: __expectString(output.engineType), - engineVersion: __expectString(output.engineVersion), - environmentArn: __expectString(output.environmentArn), - environmentId: __expectString(output.environmentId), - instanceType: __expectString(output.instanceType), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + engineType: __expectString, + engineVersion: __expectString, + environmentArn: __expectString, + environmentId: __expectString, + instanceType: __expectString, + name: __expectString, + status: __expectString, + }) as any; }; /** @@ -4232,153 +3662,60 @@ const de_EnvironmentSummaryList = (output: any, context: __SerdeContext): Enviro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FileBatchJobDefinition - */ -const de_FileBatchJobDefinition = (output: any, context: __SerdeContext): FileBatchJobDefinition => { - return { - fileName: __expectString(output.fileName), - folderPath: __expectString(output.folderPath), - } as any; -}; +// de_FileBatchJobDefinition omitted. -/** - * deserializeAws_restJson1FileBatchJobIdentifier - */ -const de_FileBatchJobIdentifier = (output: any, context: __SerdeContext): FileBatchJobIdentifier => { - return { - fileName: __expectString(output.fileName), - folderPath: __expectString(output.folderPath), - } as any; -}; +// de_FileBatchJobIdentifier omitted. /** * deserializeAws_restJson1FsxStorageConfiguration */ const de_FsxStorageConfiguration = (output: any, context: __SerdeContext): FsxStorageConfiguration => { - return { - fileSystemId: __expectString(output["file-system-id"]), - mountPoint: __expectString(output["mount-point"]), - } as any; + return take(output, { + fileSystemId: [, __expectString, `file-system-id`], + mountPoint: [, __expectString, `mount-point`], + }) as any; }; -/** - * deserializeAws_restJson1GdgDetailAttributes - */ -const de_GdgDetailAttributes = (output: any, context: __SerdeContext): GdgDetailAttributes => { - return { - limit: __expectInt32(output.limit), - rollDisposition: __expectString(output.rollDisposition), - } as any; -}; +// de_GdgDetailAttributes omitted. -/** - * deserializeAws_restJson1HighAvailabilityConfig - */ -const de_HighAvailabilityConfig = (output: any, context: __SerdeContext): HighAvailabilityConfig => { - return { - desiredCapacity: __expectInt32(output.desiredCapacity), - } as any; -}; +// de_HighAvailabilityConfig omitted. -/** - * deserializeAws_restJson1LogGroupSummaries - */ -const de_LogGroupSummaries = (output: any, context: __SerdeContext): LogGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogGroupSummary(entry, context); - }); - return retVal; -}; +// de_LogGroupSummaries omitted. -/** - * deserializeAws_restJson1LogGroupSummary - */ -const de_LogGroupSummary = (output: any, context: __SerdeContext): LogGroupSummary => { - return { - logGroupName: __expectString(output.logGroupName), - logType: __expectString(output.logType), - } as any; -}; +// de_LogGroupSummary omitted. /** * deserializeAws_restJson1MaintenanceSchedule */ const de_MaintenanceSchedule = (output: any, context: __SerdeContext): MaintenanceSchedule => { - return { - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; + return take(output, { + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1PendingMaintenance */ const de_PendingMaintenance = (output: any, context: __SerdeContext): PendingMaintenance => { - return { - engineVersion: __expectString(output.engineVersion), - schedule: output.schedule != null ? de_MaintenanceSchedule(output.schedule, context) : undefined, - } as any; + return take(output, { + engineVersion: __expectString, + schedule: (_: any) => de_MaintenanceSchedule(_, context), + }) as any; }; -/** - * deserializeAws_restJson1PortList - */ -const de_PortList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_PortList omitted. -/** - * deserializeAws_restJson1PrimaryKey - */ -const de_PrimaryKey = (output: any, context: __SerdeContext): PrimaryKey => { - return { - length: __expectInt32(output.length), - name: __expectString(output.name), - offset: __expectInt32(output.offset), - } as any; -}; +// de_PrimaryKey omitted. -/** - * deserializeAws_restJson1ScriptBatchJobDefinition - */ -const de_ScriptBatchJobDefinition = (output: any, context: __SerdeContext): ScriptBatchJobDefinition => { - return { - scriptName: __expectString(output.scriptName), - } as any; -}; +// de_ScriptBatchJobDefinition omitted. -/** - * deserializeAws_restJson1ScriptBatchJobIdentifier - */ -const de_ScriptBatchJobIdentifier = (output: any, context: __SerdeContext): ScriptBatchJobIdentifier => { - return { - scriptName: __expectString(output.scriptName), - } as any; -}; +// de_ScriptBatchJobIdentifier omitted. /** * deserializeAws_restJson1StorageConfiguration @@ -4404,80 +3741,20 @@ const de_StorageConfigurationList = (output: any, context: __SerdeContext): Stor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StorageConfiguration(__expectUnion(entry), context); }); return retVal; }; -/** - * deserializeAws_restJson1String50List - */ -const de_String50List = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_String50List omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1VsamDetailAttributes - */ -const de_VsamDetailAttributes = (output: any, context: __SerdeContext): VsamDetailAttributes => { - return { - alternateKeys: output.alternateKeys != null ? de_AlternateKeyList(output.alternateKeys, context) : undefined, - cacheAtStartup: __expectBoolean(output.cacheAtStartup), - compressed: __expectBoolean(output.compressed), - encoding: __expectString(output.encoding), - primaryKey: output.primaryKey != null ? de_PrimaryKey(output.primaryKey, context) : undefined, - recordFormat: __expectString(output.recordFormat), - } as any; -}; +// de_VsamDetailAttributes omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-machine-learning/src/protocols/Aws_json1_1.ts b/clients/client-machine-learning/src/protocols/Aws_json1_1.ts index 57523e1c04d9..3bb8334d6ee4 100644 --- a/clients/client-machine-learning/src/protocols/Aws_json1_1.ts +++ b/clients/client-machine-learning/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -84,35 +86,23 @@ import { UpdateMLModelCommandInput, UpdateMLModelCommandOutput } from "../comman import { MachineLearningServiceException as __BaseException } from "../models/MachineLearningServiceException"; import { AddTagsInput, - AddTagsOutput, BatchPrediction, CreateBatchPredictionInput, - CreateBatchPredictionOutput, CreateDataSourceFromRDSInput, - CreateDataSourceFromRDSOutput, CreateDataSourceFromRedshiftInput, - CreateDataSourceFromRedshiftOutput, CreateDataSourceFromS3Input, - CreateDataSourceFromS3Output, CreateEvaluationInput, - CreateEvaluationOutput, CreateMLModelInput, - CreateMLModelOutput, CreateRealtimeEndpointInput, CreateRealtimeEndpointOutput, DataSource, DeleteBatchPredictionInput, - DeleteBatchPredictionOutput, DeleteDataSourceInput, - DeleteDataSourceOutput, DeleteEvaluationInput, - DeleteEvaluationOutput, DeleteMLModelInput, - DeleteMLModelOutput, DeleteRealtimeEndpointInput, DeleteRealtimeEndpointOutput, DeleteTagsInput, - DeleteTagsOutput, DescribeBatchPredictionsInput, DescribeBatchPredictionsOutput, DescribeDataSourcesInput, @@ -122,8 +112,6 @@ import { DescribeMLModelsInput, DescribeMLModelsOutput, DescribeTagsInput, - DescribeTagsOutput, - DetailsAttributes, Evaluation, GetBatchPredictionInput, GetBatchPredictionOutput, @@ -139,7 +127,6 @@ import { InvalidTagException, LimitExceededException, MLModel, - PerformanceMetrics, PredictInput, Prediction, PredictorNotMountedException, @@ -147,24 +134,18 @@ import { RDSDatabase, RDSDatabaseCredentials, RDSDataSpec, - RDSMetadata, RealtimeEndpointInfo, RedshiftDatabase, RedshiftDatabaseCredentials, RedshiftDataSpec, - RedshiftMetadata, ResourceNotFoundException, S3DataSpec, Tag, TagLimitExceededException, UpdateBatchPredictionInput, - UpdateBatchPredictionOutput, UpdateDataSourceInput, - UpdateDataSourceOutput, UpdateEvaluationInput, - UpdateEvaluationOutput, UpdateMLModelInput, - UpdateMLModelOutput, } from "../models/models_0"; /** @@ -176,7 +157,7 @@ export const se_AddTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTags"); let body: any; - body = JSON.stringify(se_AddTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -189,7 +170,7 @@ export const se_CreateBatchPredictionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBatchPrediction"); let body: any; - body = JSON.stringify(se_CreateBatchPredictionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -202,7 +183,7 @@ export const se_CreateDataSourceFromRDSCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataSourceFromRDS"); let body: any; - body = JSON.stringify(se_CreateDataSourceFromRDSInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -215,7 +196,7 @@ export const se_CreateDataSourceFromRedshiftCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataSourceFromRedshift"); let body: any; - body = JSON.stringify(se_CreateDataSourceFromRedshiftInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -228,7 +209,7 @@ export const se_CreateDataSourceFromS3Command = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataSourceFromS3"); let body: any; - body = JSON.stringify(se_CreateDataSourceFromS3Input(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -241,7 +222,7 @@ export const se_CreateEvaluationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEvaluation"); let body: any; - body = JSON.stringify(se_CreateEvaluationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -254,7 +235,7 @@ export const se_CreateMLModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMLModel"); let body: any; - body = JSON.stringify(se_CreateMLModelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -267,7 +248,7 @@ export const se_CreateRealtimeEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRealtimeEndpoint"); let body: any; - body = JSON.stringify(se_CreateRealtimeEndpointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -280,7 +261,7 @@ export const se_DeleteBatchPredictionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBatchPrediction"); let body: any; - body = JSON.stringify(se_DeleteBatchPredictionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -293,7 +274,7 @@ export const se_DeleteDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataSource"); let body: any; - body = JSON.stringify(se_DeleteDataSourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -306,7 +287,7 @@ export const se_DeleteEvaluationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEvaluation"); let body: any; - body = JSON.stringify(se_DeleteEvaluationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -319,7 +300,7 @@ export const se_DeleteMLModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMLModel"); let body: any; - body = JSON.stringify(se_DeleteMLModelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -332,7 +313,7 @@ export const se_DeleteRealtimeEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRealtimeEndpoint"); let body: any; - body = JSON.stringify(se_DeleteRealtimeEndpointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -345,7 +326,7 @@ export const se_DeleteTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTags"); let body: any; - body = JSON.stringify(se_DeleteTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -358,7 +339,7 @@ export const se_DescribeBatchPredictionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBatchPredictions"); let body: any; - body = JSON.stringify(se_DescribeBatchPredictionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -371,7 +352,7 @@ export const se_DescribeDataSourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataSources"); let body: any; - body = JSON.stringify(se_DescribeDataSourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -384,7 +365,7 @@ export const se_DescribeEvaluationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEvaluations"); let body: any; - body = JSON.stringify(se_DescribeEvaluationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -397,7 +378,7 @@ export const se_DescribeMLModelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMLModels"); let body: any; - body = JSON.stringify(se_DescribeMLModelsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -410,7 +391,7 @@ export const se_DescribeTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTags"); let body: any; - body = JSON.stringify(se_DescribeTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -423,7 +404,7 @@ export const se_GetBatchPredictionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetBatchPrediction"); let body: any; - body = JSON.stringify(se_GetBatchPredictionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -436,7 +417,7 @@ export const se_GetDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDataSource"); let body: any; - body = JSON.stringify(se_GetDataSourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -449,7 +430,7 @@ export const se_GetEvaluationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEvaluation"); let body: any; - body = JSON.stringify(se_GetEvaluationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -462,7 +443,7 @@ export const se_GetMLModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMLModel"); let body: any; - body = JSON.stringify(se_GetMLModelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -475,7 +456,7 @@ export const se_PredictCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("Predict"); let body: any; - body = JSON.stringify(se_PredictInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -488,7 +469,7 @@ export const se_UpdateBatchPredictionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBatchPrediction"); let body: any; - body = JSON.stringify(se_UpdateBatchPredictionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -501,7 +482,7 @@ export const se_UpdateDataSourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDataSource"); let body: any; - body = JSON.stringify(se_UpdateDataSourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -514,7 +495,7 @@ export const se_UpdateEvaluationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEvaluation"); let body: any; - body = JSON.stringify(se_UpdateEvaluationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,12 +524,12 @@ export const de_AddTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsOutput(data, context); + contents = _json(data); const response: AddTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -581,10 +562,9 @@ const de_AddTagsCommandError = async ( throw await de_TagLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -602,12 +582,12 @@ export const de_CreateBatchPredictionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBatchPredictionOutput(data, context); + contents = _json(data); const response: CreateBatchPredictionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -634,10 +614,9 @@ const de_CreateBatchPredictionCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -655,12 +634,12 @@ export const de_CreateDataSourceFromRDSCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataSourceFromRDSOutput(data, context); + contents = _json(data); const response: CreateDataSourceFromRDSCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -687,10 +666,9 @@ const de_CreateDataSourceFromRDSCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -708,12 +686,12 @@ export const de_CreateDataSourceFromRedshiftCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataSourceFromRedshiftOutput(data, context); + contents = _json(data); const response: CreateDataSourceFromRedshiftCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -740,10 +718,9 @@ const de_CreateDataSourceFromRedshiftCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -761,12 +738,12 @@ export const de_CreateDataSourceFromS3Command = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataSourceFromS3Output(data, context); + contents = _json(data); const response: CreateDataSourceFromS3CommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -793,10 +770,9 @@ const de_CreateDataSourceFromS3CommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -814,12 +790,12 @@ export const de_CreateEvaluationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEvaluationOutput(data, context); + contents = _json(data); const response: CreateEvaluationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -846,10 +822,9 @@ const de_CreateEvaluationCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -867,12 +842,12 @@ export const de_CreateMLModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMLModelOutput(data, context); + contents = _json(data); const response: CreateMLModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -899,10 +874,9 @@ const de_CreateMLModelCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -925,7 +899,7 @@ export const de_CreateRealtimeEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -952,10 +926,9 @@ const de_CreateRealtimeEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -973,12 +946,12 @@ export const de_DeleteBatchPredictionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBatchPredictionOutput(data, context); + contents = _json(data); const response: DeleteBatchPredictionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1005,10 +978,9 @@ const de_DeleteBatchPredictionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1026,12 +998,12 @@ export const de_DeleteDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDataSourceOutput(data, context); + contents = _json(data); const response: DeleteDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1058,10 +1030,9 @@ const de_DeleteDataSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1079,12 +1050,12 @@ export const de_DeleteEvaluationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEvaluationOutput(data, context); + contents = _json(data); const response: DeleteEvaluationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1111,10 +1082,9 @@ const de_DeleteEvaluationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1132,12 +1102,12 @@ export const de_DeleteMLModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMLModelOutput(data, context); + contents = _json(data); const response: DeleteMLModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1164,10 +1134,9 @@ const de_DeleteMLModelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1190,7 +1159,7 @@ export const de_DeleteRealtimeEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1217,10 +1186,9 @@ const de_DeleteRealtimeEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1238,12 +1206,12 @@ export const de_DeleteTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTagsOutput(data, context); + contents = _json(data); const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1273,10 +1241,9 @@ const de_DeleteTagsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1299,7 +1266,7 @@ export const de_DescribeBatchPredictionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1323,10 +1290,9 @@ const de_DescribeBatchPredictionsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1349,7 +1315,7 @@ export const de_DescribeDataSourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1373,10 +1339,9 @@ const de_DescribeDataSourcesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1399,7 +1364,7 @@ export const de_DescribeEvaluationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1423,10 +1388,9 @@ const de_DescribeEvaluationsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,7 +1413,7 @@ export const de_DescribeMLModelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1473,10 +1437,9 @@ const de_DescribeMLModelsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1494,12 +1457,12 @@ export const de_DescribeTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTagsOutput(data, context); + contents = _json(data); const response: DescribeTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1526,10 +1489,9 @@ const de_DescribeTagsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1552,7 +1514,7 @@ export const de_GetBatchPredictionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1579,10 +1541,9 @@ const de_GetBatchPredictionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1605,7 +1566,7 @@ export const de_GetDataSourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1632,10 +1593,9 @@ const de_GetDataSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1658,7 +1618,7 @@ export const de_GetEvaluationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1685,10 +1645,9 @@ const de_GetEvaluationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1711,7 +1670,7 @@ export const de_GetMLModelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1738,10 +1697,9 @@ const de_GetMLModelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1764,7 +1722,7 @@ export const de_PredictCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1797,10 +1755,9 @@ const de_PredictCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1818,12 +1775,12 @@ export const de_UpdateBatchPredictionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateBatchPredictionOutput(data, context); + contents = _json(data); const response: UpdateBatchPredictionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1850,10 +1807,9 @@ const de_UpdateBatchPredictionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1871,12 +1827,12 @@ export const de_UpdateDataSourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDataSourceOutput(data, context); + contents = _json(data); const response: UpdateDataSourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1903,10 +1859,9 @@ const de_UpdateDataSourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1924,12 +1879,12 @@ export const de_UpdateEvaluationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEvaluationOutput(data, context); + contents = _json(data); const response: UpdateEvaluationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1956,10 +1911,9 @@ const de_UpdateEvaluationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1977,12 +1931,12 @@ export const de_UpdateMLModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMLModelOutput(data, context); + contents = _json(data); const response: UpdateMLModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2009,10 +1963,9 @@ const de_UpdateMLModelCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2026,7 +1979,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2042,7 +1995,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2058,7 +2011,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2071,7 +2024,7 @@ const de_InvalidInputExceptionRes = async ( */ const de_InvalidTagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2087,7 +2040,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2103,7 +2056,7 @@ const de_PredictorNotMountedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PredictorNotMountedException(body, context); + const deserialized: any = _json(body); const exception = new PredictorNotMountedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2119,7 +2072,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2135,7 +2088,7 @@ const de_TagLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TagLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2143,544 +2096,121 @@ const de_TagLimitExceededExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddTagsInput - */ -const se_AddTagsInput = (input: AddTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AddTagsInput omitted. -/** - * serializeAws_json1_1CreateBatchPredictionInput - */ -const se_CreateBatchPredictionInput = (input: CreateBatchPredictionInput, context: __SerdeContext): any => { - return { - ...(input.BatchPredictionDataSourceId != null && { - BatchPredictionDataSourceId: input.BatchPredictionDataSourceId, - }), - ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }), - ...(input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }), - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - ...(input.OutputUri != null && { OutputUri: input.OutputUri }), - }; -}; +// se_CreateBatchPredictionInput omitted. -/** - * serializeAws_json1_1CreateDataSourceFromRDSInput - */ -const se_CreateDataSourceFromRDSInput = (input: CreateDataSourceFromRDSInput, context: __SerdeContext): any => { - return { - ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }), - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }), - ...(input.RDSData != null && { RDSData: se_RDSDataSpec(input.RDSData, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_CreateDataSourceFromRDSInput omitted. -/** - * serializeAws_json1_1CreateDataSourceFromRedshiftInput - */ -const se_CreateDataSourceFromRedshiftInput = ( - input: CreateDataSourceFromRedshiftInput, - context: __SerdeContext -): any => { - return { - ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }), - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }), - ...(input.DataSpec != null && { DataSpec: se_RedshiftDataSpec(input.DataSpec, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - }; -}; +// se_CreateDataSourceFromRedshiftInput omitted. -/** - * serializeAws_json1_1CreateDataSourceFromS3Input - */ -const se_CreateDataSourceFromS3Input = (input: CreateDataSourceFromS3Input, context: __SerdeContext): any => { - return { - ...(input.ComputeStatistics != null && { ComputeStatistics: input.ComputeStatistics }), - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }), - ...(input.DataSpec != null && { DataSpec: se_S3DataSpec(input.DataSpec, context) }), - }; -}; +// se_CreateDataSourceFromS3Input omitted. -/** - * serializeAws_json1_1CreateEvaluationInput - */ -const se_CreateEvaluationInput = (input: CreateEvaluationInput, context: __SerdeContext): any => { - return { - ...(input.EvaluationDataSourceId != null && { EvaluationDataSourceId: input.EvaluationDataSourceId }), - ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }), - ...(input.EvaluationName != null && { EvaluationName: input.EvaluationName }), - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - }; -}; +// se_CreateEvaluationInput omitted. -/** - * serializeAws_json1_1CreateMLModelInput - */ -const se_CreateMLModelInput = (input: CreateMLModelInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - ...(input.MLModelName != null && { MLModelName: input.MLModelName }), - ...(input.MLModelType != null && { MLModelType: input.MLModelType }), - ...(input.Parameters != null && { Parameters: se_TrainingParameters(input.Parameters, context) }), - ...(input.Recipe != null && { Recipe: input.Recipe }), - ...(input.RecipeUri != null && { RecipeUri: input.RecipeUri }), - ...(input.TrainingDataSourceId != null && { TrainingDataSourceId: input.TrainingDataSourceId }), - }; -}; +// se_CreateMLModelInput omitted. -/** - * serializeAws_json1_1CreateRealtimeEndpointInput - */ -const se_CreateRealtimeEndpointInput = (input: CreateRealtimeEndpointInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - }; -}; +// se_CreateRealtimeEndpointInput omitted. -/** - * serializeAws_json1_1DeleteBatchPredictionInput - */ -const se_DeleteBatchPredictionInput = (input: DeleteBatchPredictionInput, context: __SerdeContext): any => { - return { - ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }), - }; -}; +// se_DeleteBatchPredictionInput omitted. -/** - * serializeAws_json1_1DeleteDataSourceInput - */ -const se_DeleteDataSourceInput = (input: DeleteDataSourceInput, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - }; -}; +// se_DeleteDataSourceInput omitted. -/** - * serializeAws_json1_1DeleteEvaluationInput - */ -const se_DeleteEvaluationInput = (input: DeleteEvaluationInput, context: __SerdeContext): any => { - return { - ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }), - }; -}; +// se_DeleteEvaluationInput omitted. -/** - * serializeAws_json1_1DeleteMLModelInput - */ -const se_DeleteMLModelInput = (input: DeleteMLModelInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - }; -}; +// se_DeleteMLModelInput omitted. -/** - * serializeAws_json1_1DeleteRealtimeEndpointInput - */ -const se_DeleteRealtimeEndpointInput = (input: DeleteRealtimeEndpointInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - }; -}; +// se_DeleteRealtimeEndpointInput omitted. -/** - * serializeAws_json1_1DeleteTagsInput - */ -const se_DeleteTagsInput = (input: DeleteTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_DeleteTagsInput omitted. -/** - * serializeAws_json1_1DescribeBatchPredictionsInput - */ -const se_DescribeBatchPredictionsInput = (input: DescribeBatchPredictionsInput, context: __SerdeContext): any => { - return { - ...(input.EQ != null && { EQ: input.EQ }), - ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }), - ...(input.GE != null && { GE: input.GE }), - ...(input.GT != null && { GT: input.GT }), - ...(input.LE != null && { LE: input.LE }), - ...(input.LT != null && { LT: input.LT }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NE != null && { NE: input.NE }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_DescribeBatchPredictionsInput omitted. -/** - * serializeAws_json1_1DescribeDataSourcesInput - */ -const se_DescribeDataSourcesInput = (input: DescribeDataSourcesInput, context: __SerdeContext): any => { - return { - ...(input.EQ != null && { EQ: input.EQ }), - ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }), - ...(input.GE != null && { GE: input.GE }), - ...(input.GT != null && { GT: input.GT }), - ...(input.LE != null && { LE: input.LE }), - ...(input.LT != null && { LT: input.LT }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NE != null && { NE: input.NE }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_DescribeDataSourcesInput omitted. -/** - * serializeAws_json1_1DescribeEvaluationsInput - */ -const se_DescribeEvaluationsInput = (input: DescribeEvaluationsInput, context: __SerdeContext): any => { - return { - ...(input.EQ != null && { EQ: input.EQ }), - ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }), - ...(input.GE != null && { GE: input.GE }), - ...(input.GT != null && { GT: input.GT }), - ...(input.LE != null && { LE: input.LE }), - ...(input.LT != null && { LT: input.LT }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NE != null && { NE: input.NE }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_DescribeEvaluationsInput omitted. -/** - * serializeAws_json1_1DescribeMLModelsInput - */ -const se_DescribeMLModelsInput = (input: DescribeMLModelsInput, context: __SerdeContext): any => { - return { - ...(input.EQ != null && { EQ: input.EQ }), - ...(input.FilterVariable != null && { FilterVariable: input.FilterVariable }), - ...(input.GE != null && { GE: input.GE }), - ...(input.GT != null && { GT: input.GT }), - ...(input.LE != null && { LE: input.LE }), - ...(input.LT != null && { LT: input.LT }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NE != null && { NE: input.NE }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_DescribeMLModelsInput omitted. -/** - * serializeAws_json1_1DescribeTagsInput - */ -const se_DescribeTagsInput = (input: DescribeTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_DescribeTagsInput omitted. -/** - * serializeAws_json1_1EDPSecurityGroupIds - */ -const se_EDPSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EDPSecurityGroupIds omitted. -/** - * serializeAws_json1_1GetBatchPredictionInput - */ -const se_GetBatchPredictionInput = (input: GetBatchPredictionInput, context: __SerdeContext): any => { - return { - ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }), - }; -}; +// se_GetBatchPredictionInput omitted. -/** - * serializeAws_json1_1GetDataSourceInput - */ -const se_GetDataSourceInput = (input: GetDataSourceInput, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.Verbose != null && { Verbose: input.Verbose }), - }; -}; +// se_GetDataSourceInput omitted. -/** - * serializeAws_json1_1GetEvaluationInput - */ -const se_GetEvaluationInput = (input: GetEvaluationInput, context: __SerdeContext): any => { - return { - ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }), - }; -}; +// se_GetEvaluationInput omitted. -/** - * serializeAws_json1_1GetMLModelInput - */ -const se_GetMLModelInput = (input: GetMLModelInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - ...(input.Verbose != null && { Verbose: input.Verbose }), - }; -}; +// se_GetMLModelInput omitted. -/** - * serializeAws_json1_1PredictInput - */ -const se_PredictInput = (input: PredictInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - ...(input.PredictEndpoint != null && { PredictEndpoint: input.PredictEndpoint }), - ...(input.Record != null && { Record: se_Record(input.Record, context) }), - }; -}; +// se_PredictInput omitted. -/** - * serializeAws_json1_1RDSDatabase - */ -const se_RDSDatabase = (input: RDSDatabase, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.InstanceIdentifier != null && { InstanceIdentifier: input.InstanceIdentifier }), - }; -}; +// se_RDSDatabase omitted. -/** - * serializeAws_json1_1RDSDatabaseCredentials - */ -const se_RDSDatabaseCredentials = (input: RDSDatabaseCredentials, context: __SerdeContext): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_RDSDatabaseCredentials omitted. -/** - * serializeAws_json1_1RDSDataSpec - */ -const se_RDSDataSpec = (input: RDSDataSpec, context: __SerdeContext): any => { - return { - ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }), - ...(input.DataSchema != null && { DataSchema: input.DataSchema }), - ...(input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri }), - ...(input.DatabaseCredentials != null && { - DatabaseCredentials: se_RDSDatabaseCredentials(input.DatabaseCredentials, context), - }), - ...(input.DatabaseInformation != null && { - DatabaseInformation: se_RDSDatabase(input.DatabaseInformation, context), - }), - ...(input.ResourceRole != null && { ResourceRole: input.ResourceRole }), - ...(input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_EDPSecurityGroupIds(input.SecurityGroupIds, context), - }), - ...(input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }), - ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; +// se_RDSDataSpec omitted. -/** - * serializeAws_json1_1Record - */ -const se_Record = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Record omitted. -/** - * serializeAws_json1_1RedshiftDatabase - */ -const se_RedshiftDatabase = (input: RedshiftDatabase, context: __SerdeContext): any => { - return { - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - }; -}; +// se_RedshiftDatabase omitted. -/** - * serializeAws_json1_1RedshiftDatabaseCredentials - */ -const se_RedshiftDatabaseCredentials = (input: RedshiftDatabaseCredentials, context: __SerdeContext): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_RedshiftDatabaseCredentials omitted. -/** - * serializeAws_json1_1RedshiftDataSpec - */ -const se_RedshiftDataSpec = (input: RedshiftDataSpec, context: __SerdeContext): any => { - return { - ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }), - ...(input.DataSchema != null && { DataSchema: input.DataSchema }), - ...(input.DataSchemaUri != null && { DataSchemaUri: input.DataSchemaUri }), - ...(input.DatabaseCredentials != null && { - DatabaseCredentials: se_RedshiftDatabaseCredentials(input.DatabaseCredentials, context), - }), - ...(input.DatabaseInformation != null && { - DatabaseInformation: se_RedshiftDatabase(input.DatabaseInformation, context), - }), - ...(input.S3StagingLocation != null && { S3StagingLocation: input.S3StagingLocation }), - ...(input.SelectSqlQuery != null && { SelectSqlQuery: input.SelectSqlQuery }), - }; -}; +// se_RedshiftDataSpec omitted. -/** - * serializeAws_json1_1S3DataSpec - */ -const se_S3DataSpec = (input: S3DataSpec, context: __SerdeContext): any => { - return { - ...(input.DataLocationS3 != null && { DataLocationS3: input.DataLocationS3 }), - ...(input.DataRearrangement != null && { DataRearrangement: input.DataRearrangement }), - ...(input.DataSchema != null && { DataSchema: input.DataSchema }), - ...(input.DataSchemaLocationS3 != null && { DataSchemaLocationS3: input.DataSchemaLocationS3 }), - }; -}; +// se_S3DataSpec omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TrainingParameters - */ -const se_TrainingParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TrainingParameters omitted. -/** - * serializeAws_json1_1UpdateBatchPredictionInput - */ -const se_UpdateBatchPredictionInput = (input: UpdateBatchPredictionInput, context: __SerdeContext): any => { - return { - ...(input.BatchPredictionId != null && { BatchPredictionId: input.BatchPredictionId }), - ...(input.BatchPredictionName != null && { BatchPredictionName: input.BatchPredictionName }), - }; -}; +// se_UpdateBatchPredictionInput omitted. -/** - * serializeAws_json1_1UpdateDataSourceInput - */ -const se_UpdateDataSourceInput = (input: UpdateDataSourceInput, context: __SerdeContext): any => { - return { - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.DataSourceName != null && { DataSourceName: input.DataSourceName }), - }; -}; +// se_UpdateDataSourceInput omitted. -/** - * serializeAws_json1_1UpdateEvaluationInput - */ -const se_UpdateEvaluationInput = (input: UpdateEvaluationInput, context: __SerdeContext): any => { - return { - ...(input.EvaluationId != null && { EvaluationId: input.EvaluationId }), - ...(input.EvaluationName != null && { EvaluationName: input.EvaluationName }), - }; -}; +// se_UpdateEvaluationInput omitted. /** * serializeAws_json1_1UpdateMLModelInput */ const se_UpdateMLModelInput = (input: UpdateMLModelInput, context: __SerdeContext): any => { - return { - ...(input.MLModelId != null && { MLModelId: input.MLModelId }), - ...(input.MLModelName != null && { MLModelName: input.MLModelName }), - ...(input.ScoreThreshold != null && { ScoreThreshold: __serializeFloat(input.ScoreThreshold) }), - }; + return take(input, { + MLModelId: [], + MLModelName: [], + ScoreThreshold: __serializeFloat, + }); }; -/** - * deserializeAws_json1_1AddTagsOutput - */ -const de_AddTagsOutput = (output: any, context: __SerdeContext): AddTagsOutput => { - return { - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_AddTagsOutput omitted. /** * deserializeAws_json1_1BatchPrediction */ const de_BatchPrediction = (output: any, context: __SerdeContext): BatchPrediction => { - return { - BatchPredictionDataSourceId: __expectString(output.BatchPredictionDataSourceId), - BatchPredictionId: __expectString(output.BatchPredictionId), - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - InputDataLocationS3: __expectString(output.InputDataLocationS3), - InvalidRecordCount: __expectLong(output.InvalidRecordCount), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - MLModelId: __expectString(output.MLModelId), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - OutputUri: __expectString(output.OutputUri), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - TotalRecordCount: __expectLong(output.TotalRecordCount), - } as any; + return take(output, { + BatchPredictionDataSourceId: __expectString, + BatchPredictionId: __expectString, + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataLocationS3: __expectString, + InvalidRecordCount: __expectLong, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MLModelId: __expectString, + Message: __expectString, + Name: __expectString, + OutputUri: __expectString, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TotalRecordCount: __expectLong, + }) as any; }; /** @@ -2690,113 +2220,57 @@ const de_BatchPredictions = (output: any, context: __SerdeContext): BatchPredict const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchPrediction(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CreateBatchPredictionOutput - */ -const de_CreateBatchPredictionOutput = (output: any, context: __SerdeContext): CreateBatchPredictionOutput => { - return { - BatchPredictionId: __expectString(output.BatchPredictionId), - } as any; -}; +// de_CreateBatchPredictionOutput omitted. -/** - * deserializeAws_json1_1CreateDataSourceFromRDSOutput - */ -const de_CreateDataSourceFromRDSOutput = (output: any, context: __SerdeContext): CreateDataSourceFromRDSOutput => { - return { - DataSourceId: __expectString(output.DataSourceId), - } as any; -}; +// de_CreateDataSourceFromRDSOutput omitted. -/** - * deserializeAws_json1_1CreateDataSourceFromRedshiftOutput - */ -const de_CreateDataSourceFromRedshiftOutput = ( - output: any, - context: __SerdeContext -): CreateDataSourceFromRedshiftOutput => { - return { - DataSourceId: __expectString(output.DataSourceId), - } as any; -}; +// de_CreateDataSourceFromRedshiftOutput omitted. -/** - * deserializeAws_json1_1CreateDataSourceFromS3Output - */ -const de_CreateDataSourceFromS3Output = (output: any, context: __SerdeContext): CreateDataSourceFromS3Output => { - return { - DataSourceId: __expectString(output.DataSourceId), - } as any; -}; +// de_CreateDataSourceFromS3Output omitted. -/** - * deserializeAws_json1_1CreateEvaluationOutput - */ -const de_CreateEvaluationOutput = (output: any, context: __SerdeContext): CreateEvaluationOutput => { - return { - EvaluationId: __expectString(output.EvaluationId), - } as any; -}; +// de_CreateEvaluationOutput omitted. -/** - * deserializeAws_json1_1CreateMLModelOutput - */ -const de_CreateMLModelOutput = (output: any, context: __SerdeContext): CreateMLModelOutput => { - return { - MLModelId: __expectString(output.MLModelId), - } as any; -}; +// de_CreateMLModelOutput omitted. /** * deserializeAws_json1_1CreateRealtimeEndpointOutput */ const de_CreateRealtimeEndpointOutput = (output: any, context: __SerdeContext): CreateRealtimeEndpointOutput => { - return { - MLModelId: __expectString(output.MLModelId), - RealtimeEndpointInfo: - output.RealtimeEndpointInfo != null ? de_RealtimeEndpointInfo(output.RealtimeEndpointInfo, context) : undefined, - } as any; + return take(output, { + MLModelId: __expectString, + RealtimeEndpointInfo: (_: any) => de_RealtimeEndpointInfo(_, context), + }) as any; }; /** * deserializeAws_json1_1DataSource */ const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - ComputeStatistics: __expectBoolean(output.ComputeStatistics), - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - DataLocationS3: __expectString(output.DataLocationS3), - DataRearrangement: __expectString(output.DataRearrangement), - DataSizeInBytes: __expectLong(output.DataSizeInBytes), - DataSourceId: __expectString(output.DataSourceId), - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - Message: __expectString(output.Message), - Name: __expectString(output.Name), - NumberOfFiles: __expectLong(output.NumberOfFiles), - RDSMetadata: output.RDSMetadata != null ? de_RDSMetadata(output.RDSMetadata, context) : undefined, - RedshiftMetadata: - output.RedshiftMetadata != null ? de_RedshiftMetadata(output.RedshiftMetadata, context) : undefined, - RoleARN: __expectString(output.RoleARN), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + ComputeStatistics: __expectBoolean, + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + DataLocationS3: __expectString, + DataRearrangement: __expectString, + DataSizeInBytes: __expectLong, + DataSourceId: __expectString, + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Name: __expectString, + NumberOfFiles: __expectLong, + RDSMetadata: _json, + RedshiftMetadata: _json, + RoleARN: __expectString, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** @@ -2806,165 +2280,95 @@ const de_DataSources = (output: any, context: __SerdeContext): DataSource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataSource(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DeleteBatchPredictionOutput - */ -const de_DeleteBatchPredictionOutput = (output: any, context: __SerdeContext): DeleteBatchPredictionOutput => { - return { - BatchPredictionId: __expectString(output.BatchPredictionId), - } as any; -}; +// de_DeleteBatchPredictionOutput omitted. -/** - * deserializeAws_json1_1DeleteDataSourceOutput - */ -const de_DeleteDataSourceOutput = (output: any, context: __SerdeContext): DeleteDataSourceOutput => { - return { - DataSourceId: __expectString(output.DataSourceId), - } as any; -}; +// de_DeleteDataSourceOutput omitted. -/** - * deserializeAws_json1_1DeleteEvaluationOutput - */ -const de_DeleteEvaluationOutput = (output: any, context: __SerdeContext): DeleteEvaluationOutput => { - return { - EvaluationId: __expectString(output.EvaluationId), - } as any; -}; +// de_DeleteEvaluationOutput omitted. -/** - * deserializeAws_json1_1DeleteMLModelOutput - */ -const de_DeleteMLModelOutput = (output: any, context: __SerdeContext): DeleteMLModelOutput => { - return { - MLModelId: __expectString(output.MLModelId), - } as any; -}; +// de_DeleteMLModelOutput omitted. /** * deserializeAws_json1_1DeleteRealtimeEndpointOutput */ const de_DeleteRealtimeEndpointOutput = (output: any, context: __SerdeContext): DeleteRealtimeEndpointOutput => { - return { - MLModelId: __expectString(output.MLModelId), - RealtimeEndpointInfo: - output.RealtimeEndpointInfo != null ? de_RealtimeEndpointInfo(output.RealtimeEndpointInfo, context) : undefined, - } as any; + return take(output, { + MLModelId: __expectString, + RealtimeEndpointInfo: (_: any) => de_RealtimeEndpointInfo(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteTagsOutput - */ -const de_DeleteTagsOutput = (output: any, context: __SerdeContext): DeleteTagsOutput => { - return { - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_DeleteTagsOutput omitted. /** * deserializeAws_json1_1DescribeBatchPredictionsOutput */ const de_DescribeBatchPredictionsOutput = (output: any, context: __SerdeContext): DescribeBatchPredictionsOutput => { - return { - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_BatchPredictions(output.Results, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Results: (_: any) => de_BatchPredictions(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeDataSourcesOutput */ const de_DescribeDataSourcesOutput = (output: any, context: __SerdeContext): DescribeDataSourcesOutput => { - return { - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_DataSources(output.Results, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Results: (_: any) => de_DataSources(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeEvaluationsOutput */ const de_DescribeEvaluationsOutput = (output: any, context: __SerdeContext): DescribeEvaluationsOutput => { - return { - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_Evaluations(output.Results, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Results: (_: any) => de_Evaluations(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeMLModelsOutput */ const de_DescribeMLModelsOutput = (output: any, context: __SerdeContext): DescribeMLModelsOutput => { - return { - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_MLModels(output.Results, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Results: (_: any) => de_MLModels(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeTagsOutput - */ -const de_DescribeTagsOutput = (output: any, context: __SerdeContext): DescribeTagsOutput => { - return { - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_DescribeTagsOutput omitted. -/** - * deserializeAws_json1_1DetailsMap - */ -const de_DetailsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DetailsAttributes | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_DetailsMap omitted. /** * deserializeAws_json1_1Evaluation */ const de_Evaluation = (output: any, context: __SerdeContext): Evaluation => { - return { - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - EvaluationDataSourceId: __expectString(output.EvaluationDataSourceId), - EvaluationId: __expectString(output.EvaluationId), - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - InputDataLocationS3: __expectString(output.InputDataLocationS3), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - MLModelId: __expectString(output.MLModelId), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - PerformanceMetrics: - output.PerformanceMetrics != null ? de_PerformanceMetrics(output.PerformanceMetrics, context) : undefined, - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + EvaluationDataSourceId: __expectString, + EvaluationId: __expectString, + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataLocationS3: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MLModelId: __expectString, + Message: __expectString, + Name: __expectString, + PerformanceMetrics: _json, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** @@ -2974,9 +2378,6 @@ const de_Evaluations = (output: any, context: __SerdeContext): Evaluation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Evaluation(entry, context); }); return retVal; @@ -2986,224 +2387,142 @@ const de_Evaluations = (output: any, context: __SerdeContext): Evaluation[] => { * deserializeAws_json1_1GetBatchPredictionOutput */ const de_GetBatchPredictionOutput = (output: any, context: __SerdeContext): GetBatchPredictionOutput => { - return { - BatchPredictionDataSourceId: __expectString(output.BatchPredictionDataSourceId), - BatchPredictionId: __expectString(output.BatchPredictionId), - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - InputDataLocationS3: __expectString(output.InputDataLocationS3), - InvalidRecordCount: __expectLong(output.InvalidRecordCount), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - LogUri: __expectString(output.LogUri), - MLModelId: __expectString(output.MLModelId), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - OutputUri: __expectString(output.OutputUri), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - TotalRecordCount: __expectLong(output.TotalRecordCount), - } as any; + return take(output, { + BatchPredictionDataSourceId: __expectString, + BatchPredictionId: __expectString, + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataLocationS3: __expectString, + InvalidRecordCount: __expectLong, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogUri: __expectString, + MLModelId: __expectString, + Message: __expectString, + Name: __expectString, + OutputUri: __expectString, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TotalRecordCount: __expectLong, + }) as any; }; /** * deserializeAws_json1_1GetDataSourceOutput */ const de_GetDataSourceOutput = (output: any, context: __SerdeContext): GetDataSourceOutput => { - return { - ComputeStatistics: __expectBoolean(output.ComputeStatistics), - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - DataLocationS3: __expectString(output.DataLocationS3), - DataRearrangement: __expectString(output.DataRearrangement), - DataSizeInBytes: __expectLong(output.DataSizeInBytes), - DataSourceId: __expectString(output.DataSourceId), - DataSourceSchema: __expectString(output.DataSourceSchema), - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - LogUri: __expectString(output.LogUri), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - NumberOfFiles: __expectLong(output.NumberOfFiles), - RDSMetadata: output.RDSMetadata != null ? de_RDSMetadata(output.RDSMetadata, context) : undefined, - RedshiftMetadata: - output.RedshiftMetadata != null ? de_RedshiftMetadata(output.RedshiftMetadata, context) : undefined, - RoleARN: __expectString(output.RoleARN), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + ComputeStatistics: __expectBoolean, + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + DataLocationS3: __expectString, + DataRearrangement: __expectString, + DataSizeInBytes: __expectLong, + DataSourceId: __expectString, + DataSourceSchema: __expectString, + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogUri: __expectString, + Message: __expectString, + Name: __expectString, + NumberOfFiles: __expectLong, + RDSMetadata: _json, + RedshiftMetadata: _json, + RoleARN: __expectString, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetEvaluationOutput */ const de_GetEvaluationOutput = (output: any, context: __SerdeContext): GetEvaluationOutput => { - return { - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - EvaluationDataSourceId: __expectString(output.EvaluationDataSourceId), - EvaluationId: __expectString(output.EvaluationId), - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - InputDataLocationS3: __expectString(output.InputDataLocationS3), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - LogUri: __expectString(output.LogUri), - MLModelId: __expectString(output.MLModelId), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - PerformanceMetrics: - output.PerformanceMetrics != null ? de_PerformanceMetrics(output.PerformanceMetrics, context) : undefined, - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + EvaluationDataSourceId: __expectString, + EvaluationId: __expectString, + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataLocationS3: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogUri: __expectString, + MLModelId: __expectString, + Message: __expectString, + Name: __expectString, + PerformanceMetrics: _json, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetMLModelOutput */ const de_GetMLModelOutput = (output: any, context: __SerdeContext): GetMLModelOutput => { - return { - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - EndpointInfo: output.EndpointInfo != null ? de_RealtimeEndpointInfo(output.EndpointInfo, context) : undefined, - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - InputDataLocationS3: __expectString(output.InputDataLocationS3), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - LogUri: __expectString(output.LogUri), - MLModelId: __expectString(output.MLModelId), - MLModelType: __expectString(output.MLModelType), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - Recipe: __expectString(output.Recipe), - Schema: __expectString(output.Schema), - ScoreThreshold: __limitedParseFloat32(output.ScoreThreshold), - ScoreThresholdLastUpdatedAt: - output.ScoreThresholdLastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScoreThresholdLastUpdatedAt))) - : undefined, - SizeInBytes: __expectLong(output.SizeInBytes), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - TrainingDataSourceId: __expectString(output.TrainingDataSourceId), - TrainingParameters: - output.TrainingParameters != null ? de_TrainingParameters(output.TrainingParameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1IdempotentParameterMismatchException - */ -const de_IdempotentParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotentParameterMismatchException => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidTagException - */ -const de_InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; + return take(output, { + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + EndpointInfo: (_: any) => de_RealtimeEndpointInfo(_, context), + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataLocationS3: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogUri: __expectString, + MLModelId: __expectString, + MLModelType: __expectString, + Message: __expectString, + Name: __expectString, + Recipe: __expectString, + Schema: __expectString, + ScoreThreshold: __limitedParseFloat32, + ScoreThresholdLastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SizeInBytes: __expectLong, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TrainingDataSourceId: __expectString, + TrainingParameters: _json, + }) as any; +}; + +// de_IdempotentParameterMismatchException omitted. + +// de_InternalServerException omitted. + +// de_InvalidInputException omitted. + +// de_InvalidTagException omitted. + +// de_LimitExceededException omitted. /** * deserializeAws_json1_1MLModel */ const de_MLModel = (output: any, context: __SerdeContext): MLModel => { - return { - Algorithm: __expectString(output.Algorithm), - ComputeTime: __expectLong(output.ComputeTime), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CreatedByIamUser: __expectString(output.CreatedByIamUser), - EndpointInfo: output.EndpointInfo != null ? de_RealtimeEndpointInfo(output.EndpointInfo, context) : undefined, - FinishedAt: - output.FinishedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FinishedAt))) : undefined, - InputDataLocationS3: __expectString(output.InputDataLocationS3), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - MLModelId: __expectString(output.MLModelId), - MLModelType: __expectString(output.MLModelType), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - ScoreThreshold: __limitedParseFloat32(output.ScoreThreshold), - ScoreThresholdLastUpdatedAt: - output.ScoreThresholdLastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScoreThresholdLastUpdatedAt))) - : undefined, - SizeInBytes: __expectLong(output.SizeInBytes), - StartedAt: - output.StartedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartedAt))) : undefined, - Status: __expectString(output.Status), - TrainingDataSourceId: __expectString(output.TrainingDataSourceId), - TrainingParameters: - output.TrainingParameters != null ? de_TrainingParameters(output.TrainingParameters, context) : undefined, - } as any; + return take(output, { + Algorithm: __expectString, + ComputeTime: __expectLong, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedByIamUser: __expectString, + EndpointInfo: (_: any) => de_RealtimeEndpointInfo(_, context), + FinishedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataLocationS3: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MLModelId: __expectString, + MLModelType: __expectString, + Message: __expectString, + Name: __expectString, + ScoreThreshold: __limitedParseFloat32, + ScoreThresholdLastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SizeInBytes: __expectLong, + StartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TrainingDataSourceId: __expectString, + TrainingParameters: _json, + }) as any; }; /** @@ -3213,135 +2532,59 @@ const de_MLModels = (output: any, context: __SerdeContext): MLModel[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MLModel(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PerformanceMetrics - */ -const de_PerformanceMetrics = (output: any, context: __SerdeContext): PerformanceMetrics => { - return { - Properties: output.Properties != null ? de_PerformanceMetricsProperties(output.Properties, context) : undefined, - } as any; -}; +// de_PerformanceMetrics omitted. -/** - * deserializeAws_json1_1PerformanceMetricsProperties - */ -const de_PerformanceMetricsProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PerformanceMetricsProperties omitted. /** * deserializeAws_json1_1Prediction */ const de_Prediction = (output: any, context: __SerdeContext): Prediction => { - return { - details: output.details != null ? de_DetailsMap(output.details, context) : undefined, - predictedLabel: __expectString(output.predictedLabel), - predictedScores: - output.predictedScores != null ? de_ScoreValuePerLabelMap(output.predictedScores, context) : undefined, - predictedValue: __limitedParseFloat32(output.predictedValue), - } as any; + return take(output, { + details: _json, + predictedLabel: __expectString, + predictedScores: (_: any) => de_ScoreValuePerLabelMap(_, context), + predictedValue: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1PredictorNotMountedException - */ -const de_PredictorNotMountedException = (output: any, context: __SerdeContext): PredictorNotMountedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PredictorNotMountedException omitted. /** * deserializeAws_json1_1PredictOutput */ const de_PredictOutput = (output: any, context: __SerdeContext): PredictOutput => { - return { - Prediction: output.Prediction != null ? de_Prediction(output.Prediction, context) : undefined, - } as any; + return take(output, { + Prediction: (_: any) => de_Prediction(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RDSDatabase - */ -const de_RDSDatabase = (output: any, context: __SerdeContext): RDSDatabase => { - return { - DatabaseName: __expectString(output.DatabaseName), - InstanceIdentifier: __expectString(output.InstanceIdentifier), - } as any; -}; +// de_RDSDatabase omitted. -/** - * deserializeAws_json1_1RDSMetadata - */ -const de_RDSMetadata = (output: any, context: __SerdeContext): RDSMetadata => { - return { - DataPipelineId: __expectString(output.DataPipelineId), - Database: output.Database != null ? de_RDSDatabase(output.Database, context) : undefined, - DatabaseUserName: __expectString(output.DatabaseUserName), - ResourceRole: __expectString(output.ResourceRole), - SelectSqlQuery: __expectString(output.SelectSqlQuery), - ServiceRole: __expectString(output.ServiceRole), - } as any; -}; +// de_RDSMetadata omitted. /** * deserializeAws_json1_1RealtimeEndpointInfo */ const de_RealtimeEndpointInfo = (output: any, context: __SerdeContext): RealtimeEndpointInfo => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EndpointStatus: __expectString(output.EndpointStatus), - EndpointUrl: __expectString(output.EndpointUrl), - PeakRequestsPerSecond: __expectInt32(output.PeakRequestsPerSecond), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointStatus: __expectString, + EndpointUrl: __expectString, + PeakRequestsPerSecond: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_1RedshiftDatabase - */ -const de_RedshiftDatabase = (output: any, context: __SerdeContext): RedshiftDatabase => { - return { - ClusterIdentifier: __expectString(output.ClusterIdentifier), - DatabaseName: __expectString(output.DatabaseName), - } as any; -}; +// de_RedshiftDatabase omitted. -/** - * deserializeAws_json1_1RedshiftMetadata - */ -const de_RedshiftMetadata = (output: any, context: __SerdeContext): RedshiftMetadata => { - return { - DatabaseUserName: __expectString(output.DatabaseUserName), - RedshiftDatabase: - output.RedshiftDatabase != null ? de_RedshiftDatabase(output.RedshiftDatabase, context) : undefined, - SelectSqlQuery: __expectString(output.SelectSqlQuery), - } as any; -}; +// de_RedshiftMetadata omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - code: __expectInt32(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1ScoreValuePerLabelMap @@ -3356,88 +2599,21 @@ const de_ScoreValuePerLabelMap = (output: any, context: __SerdeContext): Record< }, {}); }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagLimitExceededException - */ -const de_TagLimitExceededException = (output: any, context: __SerdeContext): TagLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagLimitExceededException omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TrainingParameters - */ -const de_TrainingParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TrainingParameters omitted. -/** - * deserializeAws_json1_1UpdateBatchPredictionOutput - */ -const de_UpdateBatchPredictionOutput = (output: any, context: __SerdeContext): UpdateBatchPredictionOutput => { - return { - BatchPredictionId: __expectString(output.BatchPredictionId), - } as any; -}; +// de_UpdateBatchPredictionOutput omitted. -/** - * deserializeAws_json1_1UpdateDataSourceOutput - */ -const de_UpdateDataSourceOutput = (output: any, context: __SerdeContext): UpdateDataSourceOutput => { - return { - DataSourceId: __expectString(output.DataSourceId), - } as any; -}; +// de_UpdateDataSourceOutput omitted. -/** - * deserializeAws_json1_1UpdateEvaluationOutput - */ -const de_UpdateEvaluationOutput = (output: any, context: __SerdeContext): UpdateEvaluationOutput => { - return { - EvaluationId: __expectString(output.EvaluationId), - } as any; -}; +// de_UpdateEvaluationOutput omitted. -/** - * deserializeAws_json1_1UpdateMLModelOutput - */ -const de_UpdateMLModelOutput = (output: any, context: __SerdeContext): UpdateMLModelOutput => { - return { - MLModelId: __expectString(output.MLModelId), - } as any; -}; +// de_UpdateMLModelOutput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3459,6 +2635,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-macie/src/protocols/Aws_json1_1.ts b/clients/client-macie/src/protocols/Aws_json1_1.ts index 23bfa2152999..e71b8c944d74 100644 --- a/clients/client-macie/src/protocols/Aws_json1_1.ts +++ b/clients/client-macie/src/protocols/Aws_json1_1.ts @@ -1,9 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -36,26 +36,19 @@ import { AccessDeniedException, AssociateMemberAccountRequest, AssociateS3ResourcesRequest, - AssociateS3ResourcesResult, ClassificationType, ClassificationTypeUpdate, DisassociateMemberAccountRequest, DisassociateS3ResourcesRequest, - DisassociateS3ResourcesResult, - FailedS3Resource, InternalException, InvalidInputException, LimitExceededException, ListMemberAccountsRequest, - ListMemberAccountsResult, ListS3ResourcesRequest, - ListS3ResourcesResult, - MemberAccount, S3Resource, S3ResourceClassification, S3ResourceClassificationUpdate, UpdateS3ResourcesRequest, - UpdateS3ResourcesResult, } from "../models/models_0"; /** @@ -67,7 +60,7 @@ export const se_AssociateMemberAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateMemberAccount"); let body: any; - body = JSON.stringify(se_AssociateMemberAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -80,7 +73,7 @@ export const se_AssociateS3ResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateS3Resources"); let body: any; - body = JSON.stringify(se_AssociateS3ResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -93,7 +86,7 @@ export const se_DisassociateMemberAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateMemberAccount"); let body: any; - body = JSON.stringify(se_DisassociateMemberAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -106,7 +99,7 @@ export const se_DisassociateS3ResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateS3Resources"); let body: any; - body = JSON.stringify(se_DisassociateS3ResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -119,7 +112,7 @@ export const se_ListMemberAccountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMemberAccounts"); let body: any; - body = JSON.stringify(se_ListMemberAccountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -132,7 +125,7 @@ export const se_ListS3ResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListS3Resources"); let body: any; - body = JSON.stringify(se_ListS3ResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -145,7 +138,7 @@ export const se_UpdateS3ResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateS3Resources"); let body: any; - body = JSON.stringify(se_UpdateS3ResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -163,7 +156,7 @@ export const de_AssociateMemberAccountCommand = async ( const response: AssociateMemberAccountCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -190,10 +183,9 @@ const de_AssociateMemberAccountCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -211,12 +203,12 @@ export const de_AssociateS3ResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateS3ResourcesResult(data, context); + contents = _json(data); const response: AssociateS3ResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -246,10 +238,9 @@ const de_AssociateS3ResourcesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -269,7 +260,7 @@ export const de_DisassociateMemberAccountCommand = async ( const response: DisassociateMemberAccountCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -293,10 +284,9 @@ const de_DisassociateMemberAccountCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -314,12 +304,12 @@ export const de_DisassociateS3ResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateS3ResourcesResult(data, context); + contents = _json(data); const response: DisassociateS3ResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -346,10 +336,9 @@ const de_DisassociateS3ResourcesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -367,12 +356,12 @@ export const de_ListMemberAccountsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListMemberAccountsResult(data, context); + contents = _json(data); const response: ListMemberAccountsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -396,10 +385,9 @@ const de_ListMemberAccountsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -417,12 +405,12 @@ export const de_ListS3ResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListS3ResourcesResult(data, context); + contents = _json(data); const response: ListS3ResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -449,10 +437,9 @@ const de_ListS3ResourcesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -470,12 +457,12 @@ export const de_UpdateS3ResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateS3ResourcesResult(data, context); + contents = _json(data); const response: UpdateS3ResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -502,10 +489,9 @@ const de_UpdateS3ResourcesCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -519,7 +505,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -532,7 +518,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalException(body, context); + const deserialized: any = _json(body); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -548,7 +534,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -564,7 +550,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -572,356 +558,69 @@ const de_LimitExceededExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateMemberAccountRequest - */ -const se_AssociateMemberAccountRequest = (input: AssociateMemberAccountRequest, context: __SerdeContext): any => { - return { - ...(input.memberAccountId != null && { memberAccountId: input.memberAccountId }), - }; -}; +// se_AssociateMemberAccountRequest omitted. -/** - * serializeAws_json1_1AssociateS3ResourcesRequest - */ -const se_AssociateS3ResourcesRequest = (input: AssociateS3ResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.memberAccountId != null && { memberAccountId: input.memberAccountId }), - ...(input.s3Resources != null && { s3Resources: se_S3ResourcesClassification(input.s3Resources, context) }), - }; -}; +// se_AssociateS3ResourcesRequest omitted. -/** - * serializeAws_json1_1ClassificationType - */ -const se_ClassificationType = (input: ClassificationType, context: __SerdeContext): any => { - return { - ...(input.continuous != null && { continuous: input.continuous }), - ...(input.oneTime != null && { oneTime: input.oneTime }), - }; -}; +// se_ClassificationType omitted. -/** - * serializeAws_json1_1ClassificationTypeUpdate - */ -const se_ClassificationTypeUpdate = (input: ClassificationTypeUpdate, context: __SerdeContext): any => { - return { - ...(input.continuous != null && { continuous: input.continuous }), - ...(input.oneTime != null && { oneTime: input.oneTime }), - }; -}; +// se_ClassificationTypeUpdate omitted. -/** - * serializeAws_json1_1DisassociateMemberAccountRequest - */ -const se_DisassociateMemberAccountRequest = (input: DisassociateMemberAccountRequest, context: __SerdeContext): any => { - return { - ...(input.memberAccountId != null && { memberAccountId: input.memberAccountId }), - }; -}; +// se_DisassociateMemberAccountRequest omitted. -/** - * serializeAws_json1_1DisassociateS3ResourcesRequest - */ -const se_DisassociateS3ResourcesRequest = (input: DisassociateS3ResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.associatedS3Resources != null && { - associatedS3Resources: se_S3Resources(input.associatedS3Resources, context), - }), - ...(input.memberAccountId != null && { memberAccountId: input.memberAccountId }), - }; -}; +// se_DisassociateS3ResourcesRequest omitted. -/** - * serializeAws_json1_1ListMemberAccountsRequest - */ -const se_ListMemberAccountsRequest = (input: ListMemberAccountsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListMemberAccountsRequest omitted. -/** - * serializeAws_json1_1ListS3ResourcesRequest - */ -const se_ListS3ResourcesRequest = (input: ListS3ResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.memberAccountId != null && { memberAccountId: input.memberAccountId }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListS3ResourcesRequest omitted. -/** - * serializeAws_json1_1S3Resource - */ -const se_S3Resource = (input: S3Resource, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3Resource omitted. -/** - * serializeAws_json1_1S3ResourceClassification - */ -const se_S3ResourceClassification = (input: S3ResourceClassification, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.classificationType != null && { - classificationType: se_ClassificationType(input.classificationType, context), - }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3ResourceClassification omitted. -/** - * serializeAws_json1_1S3ResourceClassificationUpdate - */ -const se_S3ResourceClassificationUpdate = (input: S3ResourceClassificationUpdate, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.classificationTypeUpdate != null && { - classificationTypeUpdate: se_ClassificationTypeUpdate(input.classificationTypeUpdate, context), - }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3ResourceClassificationUpdate omitted. -/** - * serializeAws_json1_1S3Resources - */ -const se_S3Resources = (input: S3Resource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3Resource(entry, context); - }); -}; +// se_S3Resources omitted. -/** - * serializeAws_json1_1S3ResourcesClassification - */ -const se_S3ResourcesClassification = (input: S3ResourceClassification[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3ResourceClassification(entry, context); - }); -}; +// se_S3ResourcesClassification omitted. -/** - * serializeAws_json1_1S3ResourcesClassificationUpdate - */ -const se_S3ResourcesClassificationUpdate = (input: S3ResourceClassificationUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3ResourceClassificationUpdate(entry, context); - }); -}; +// se_S3ResourcesClassificationUpdate omitted. -/** - * serializeAws_json1_1UpdateS3ResourcesRequest - */ -const se_UpdateS3ResourcesRequest = (input: UpdateS3ResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.memberAccountId != null && { memberAccountId: input.memberAccountId }), - ...(input.s3ResourcesUpdate != null && { - s3ResourcesUpdate: se_S3ResourcesClassificationUpdate(input.s3ResourcesUpdate, context), - }), - }; -}; +// se_UpdateS3ResourcesRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AssociateS3ResourcesResult - */ -const de_AssociateS3ResourcesResult = (output: any, context: __SerdeContext): AssociateS3ResourcesResult => { - return { - failedS3Resources: - output.failedS3Resources != null ? de_FailedS3Resources(output.failedS3Resources, context) : undefined, - } as any; -}; +// de_AssociateS3ResourcesResult omitted. -/** - * deserializeAws_json1_1ClassificationType - */ -const de_ClassificationType = (output: any, context: __SerdeContext): ClassificationType => { - return { - continuous: __expectString(output.continuous), - oneTime: __expectString(output.oneTime), - } as any; -}; +// de_ClassificationType omitted. -/** - * deserializeAws_json1_1DisassociateS3ResourcesResult - */ -const de_DisassociateS3ResourcesResult = (output: any, context: __SerdeContext): DisassociateS3ResourcesResult => { - return { - failedS3Resources: - output.failedS3Resources != null ? de_FailedS3Resources(output.failedS3Resources, context) : undefined, - } as any; -}; +// de_DisassociateS3ResourcesResult omitted. -/** - * deserializeAws_json1_1FailedS3Resource - */ -const de_FailedS3Resource = (output: any, context: __SerdeContext): FailedS3Resource => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - failedItem: output.failedItem != null ? de_S3Resource(output.failedItem, context) : undefined, - } as any; -}; +// de_FailedS3Resource omitted. -/** - * deserializeAws_json1_1FailedS3Resources - */ -const de_FailedS3Resources = (output: any, context: __SerdeContext): FailedS3Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedS3Resource(entry, context); - }); - return retVal; -}; +// de_FailedS3Resources omitted. -/** - * deserializeAws_json1_1InternalException - */ -const de_InternalException = (output: any, context: __SerdeContext): InternalException => { - return { - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - } as any; -}; +// de_InternalException omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - errorCode: __expectString(output.errorCode), - fieldName: __expectString(output.fieldName), - message: __expectString(output.message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - errorCode: __expectString(output.errorCode), - message: __expectString(output.message), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListMemberAccountsResult - */ -const de_ListMemberAccountsResult = (output: any, context: __SerdeContext): ListMemberAccountsResult => { - return { - memberAccounts: output.memberAccounts != null ? de_MemberAccounts(output.memberAccounts, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListMemberAccountsResult omitted. -/** - * deserializeAws_json1_1ListS3ResourcesResult - */ -const de_ListS3ResourcesResult = (output: any, context: __SerdeContext): ListS3ResourcesResult => { - return { - nextToken: __expectString(output.nextToken), - s3Resources: output.s3Resources != null ? de_S3ResourcesClassification(output.s3Resources, context) : undefined, - } as any; -}; +// de_ListS3ResourcesResult omitted. -/** - * deserializeAws_json1_1MemberAccount - */ -const de_MemberAccount = (output: any, context: __SerdeContext): MemberAccount => { - return { - accountId: __expectString(output.accountId), - } as any; -}; +// de_MemberAccount omitted. -/** - * deserializeAws_json1_1MemberAccounts - */ -const de_MemberAccounts = (output: any, context: __SerdeContext): MemberAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MemberAccount(entry, context); - }); - return retVal; -}; +// de_MemberAccounts omitted. -/** - * deserializeAws_json1_1S3Resource - */ -const de_S3Resource = (output: any, context: __SerdeContext): S3Resource => { - return { - bucketName: __expectString(output.bucketName), - prefix: __expectString(output.prefix), - } as any; -}; +// de_S3Resource omitted. -/** - * deserializeAws_json1_1S3ResourceClassification - */ -const de_S3ResourceClassification = (output: any, context: __SerdeContext): S3ResourceClassification => { - return { - bucketName: __expectString(output.bucketName), - classificationType: - output.classificationType != null ? de_ClassificationType(output.classificationType, context) : undefined, - prefix: __expectString(output.prefix), - } as any; -}; +// de_S3ResourceClassification omitted. -/** - * deserializeAws_json1_1S3ResourcesClassification - */ -const de_S3ResourcesClassification = (output: any, context: __SerdeContext): S3ResourceClassification[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3ResourceClassification(entry, context); - }); - return retVal; -}; +// de_S3ResourcesClassification omitted. -/** - * deserializeAws_json1_1UpdateS3ResourcesResult - */ -const de_UpdateS3ResourcesResult = (output: any, context: __SerdeContext): UpdateS3ResourcesResult => { - return { - failedS3Resources: - output.failedS3Resources != null ? de_FailedS3Resources(output.failedS3Resources, context) : undefined, - } as any; -}; +// de_UpdateS3ResourcesResult omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -943,6 +642,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-macie2/src/protocols/Aws_restJson1.ts b/clients/client-macie2/src/protocols/Aws_restJson1.ts index c4c00fe23bde..efeda1b0d2c5 100644 --- a/clients/client-macie2/src/protocols/Aws_restJson1.ts +++ b/clients/client-macie2/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,10 +11,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -379,7 +381,6 @@ import { TagScopeTerm, TagValuePair, ThrottlingException, - UnavailabilityReasonCode, UnprocessableEntityException, UnprocessedAccount, UsageByAccount, @@ -414,11 +415,13 @@ export const se_AcceptInvitationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/accept"; let body: any; - body = JSON.stringify({ - ...(input.administratorAccountId != null && { administratorAccountId: input.administratorAccountId }), - ...(input.invitationId != null && { invitationId: input.invitationId }), - ...(input.masterAccount != null && { masterAccount: input.masterAccount }), - }); + body = JSON.stringify( + take(input, { + administratorAccountId: [, , `administratorAccountId`], + invitationId: [, , `invitationId`], + masterAccount: [, , `masterAccount`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -444,9 +447,11 @@ export const se_BatchGetCustomDataIdentifiersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-data-identifiers/get"; let body: any; - body = JSON.stringify({ - ...(input.ids != null && { ids: se___listOf__string(input.ids, context) }), - }); + body = JSON.stringify( + take(input, { + ids: [, (_) => _json(_), `ids`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -471,13 +476,15 @@ export const se_CreateAllowListCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/allow-lists"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.criteria != null && { criteria: se_AllowListCriteria(input.criteria, context) }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + criteria: [, (_) => se_AllowListCriteria(_, context), `criteria`], + description: [, , `description`], + name: [, , `name`], + tags: [, (_) => _json(_), `tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -502,29 +509,23 @@ export const se_CreateClassificationJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs"; let body: any; - body = JSON.stringify({ - ...(input.allowListIds != null && { allowListIds: se___listOf__string(input.allowListIds, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.customDataIdentifierIds != null && { - customDataIdentifierIds: se___listOf__string(input.customDataIdentifierIds, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.initialRun != null && { initialRun: input.initialRun }), - ...(input.jobType != null && { jobType: input.jobType }), - ...(input.managedDataIdentifierIds != null && { - managedDataIdentifierIds: se___listOf__string(input.managedDataIdentifierIds, context), - }), - ...(input.managedDataIdentifierSelector != null && { - managedDataIdentifierSelector: input.managedDataIdentifierSelector, - }), - ...(input.name != null && { name: input.name }), - ...(input.s3JobDefinition != null && { s3JobDefinition: se_S3JobDefinition(input.s3JobDefinition, context) }), - ...(input.samplingPercentage != null && { samplingPercentage: input.samplingPercentage }), - ...(input.scheduleFrequency != null && { - scheduleFrequency: se_JobScheduleFrequency(input.scheduleFrequency, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + allowListIds: [, (_) => _json(_), `allowListIds`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + customDataIdentifierIds: [, (_) => _json(_), `customDataIdentifierIds`], + description: [, , `description`], + initialRun: [, , `initialRun`], + jobType: [, , `jobType`], + managedDataIdentifierIds: [, (_) => _json(_), `managedDataIdentifierIds`], + managedDataIdentifierSelector: [, , `managedDataIdentifierSelector`], + name: [, , `name`], + s3JobDefinition: [, (_) => se_S3JobDefinition(_, context), `s3JobDefinition`], + samplingPercentage: [, , `samplingPercentage`], + scheduleFrequency: [, (_) => se_JobScheduleFrequency(_, context), `scheduleFrequency`], + tags: [, (_) => _json(_), `tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -550,17 +551,19 @@ export const se_CreateCustomDataIdentifierCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-data-identifiers"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.ignoreWords != null && { ignoreWords: se___listOf__string(input.ignoreWords, context) }), - ...(input.keywords != null && { keywords: se___listOf__string(input.keywords, context) }), - ...(input.maximumMatchDistance != null && { maximumMatchDistance: input.maximumMatchDistance }), - ...(input.name != null && { name: input.name }), - ...(input.regex != null && { regex: input.regex }), - ...(input.severityLevels != null && { severityLevels: se_SeverityLevelList(input.severityLevels, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + description: [, , `description`], + ignoreWords: [, (_) => _json(_), `ignoreWords`], + keywords: [, (_) => _json(_), `keywords`], + maximumMatchDistance: [, , `maximumMatchDistance`], + name: [, , `name`], + regex: [, , `regex`], + severityLevels: [, (_) => se_SeverityLevelList(_, context), `severityLevels`], + tags: [, (_) => _json(_), `tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -585,15 +588,17 @@ export const se_CreateFindingsFilterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingsfilters"; let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.findingCriteria != null && { findingCriteria: se_FindingCriteria(input.findingCriteria, context) }), - ...(input.name != null && { name: input.name }), - ...(input.position != null && { position: input.position }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + action: [, , `action`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + description: [, , `description`], + findingCriteria: [, (_) => se_FindingCriteria(_, context), `findingCriteria`], + name: [, , `name`], + position: [, , `position`], + tags: [, (_) => _json(_), `tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -618,11 +623,13 @@ export const se_CreateInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se___listOf__string(input.accountIds, context) }), - ...(input.disableEmailNotification != null && { disableEmailNotification: input.disableEmailNotification }), - ...(input.message != null && { message: input.message }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `accountIds`], + disableEmailNotification: [, , `disableEmailNotification`], + message: [, , `message`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -647,10 +654,12 @@ export const se_CreateMemberCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members"; let body: any; - body = JSON.stringify({ - ...(input.account != null && { account: se_AccountDetail(input.account, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + account: [, (_) => se_AccountDetail(_, context), `account`], + tags: [, (_) => _json(_), `tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -675,9 +684,11 @@ export const se_CreateSampleFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/sample"; let body: any; - body = JSON.stringify({ - ...(input.findingTypes != null && { findingTypes: se___listOfFindingType(input.findingTypes, context) }), - }); + body = JSON.stringify( + take(input, { + findingTypes: [, (_) => _json(_), `findingTypes`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -702,9 +713,11 @@ export const se_DeclineInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/decline"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se___listOf__string(input.accountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `accountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -803,9 +816,11 @@ export const se_DeleteInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/delete"; let body: any; - body = JSON.stringify({ - ...(input.accountIds != null && { accountIds: se___listOf__string(input.accountIds, context) }), - }); + body = JSON.stringify( + take(input, { + accountIds: [, (_) => _json(_), `accountIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -853,12 +868,14 @@ export const se_DescribeBucketsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasources/s3"; let body: any; - body = JSON.stringify({ - ...(input.criteria != null && { criteria: se_BucketCriteria(input.criteria, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortCriteria != null && { sortCriteria: se_BucketSortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + criteria: [, (_) => se_BucketCriteria(_, context), `criteria`], + maxResults: [, , `maxResults`], + nextToken: [, , `nextToken`], + sortCriteria: [, (_) => se_BucketSortCriteria(_, context), `sortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1057,11 +1074,13 @@ export const se_EnableMacieCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/macie"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.findingPublishingFrequency != null && { findingPublishingFrequency: input.findingPublishingFrequency }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + findingPublishingFrequency: [, , `findingPublishingFrequency`], + status: [, , `status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1086,10 +1105,12 @@ export const se_EnableOrganizationAdminAccountCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/admin"; let body: any; - body = JSON.stringify({ - ...(input.adminAccountId != null && { adminAccountId: input.adminAccountId }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + adminAccountId: [, , `adminAccountId`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1189,9 +1210,11 @@ export const se_GetBucketStatisticsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasources/s3/statistics"; let body: any; - body = JSON.stringify({ - ...(input.accountId != null && { accountId: input.accountId }), - }); + body = JSON.stringify( + take(input, { + accountId: [, , `accountId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1290,10 +1313,12 @@ export const se_GetFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/describe"; let body: any; - body = JSON.stringify({ - ...(input.findingIds != null && { findingIds: se___listOf__string(input.findingIds, context) }), - ...(input.sortCriteria != null && { sortCriteria: se_SortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + findingIds: [, (_) => _json(_), `findingIds`], + sortCriteria: [, (_) => se_SortCriteria(_, context), `sortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1367,12 +1392,14 @@ export const se_GetFindingStatisticsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/statistics"; let body: any; - body = JSON.stringify({ - ...(input.findingCriteria != null && { findingCriteria: se_FindingCriteria(input.findingCriteria, context) }), - ...(input.groupBy != null && { groupBy: input.groupBy }), - ...(input.size != null && { size: input.size }), - ...(input.sortCriteria != null && { sortCriteria: se_FindingStatisticsSortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + findingCriteria: [, (_) => se_FindingCriteria(_, context), `findingCriteria`], + groupBy: [, , `groupBy`], + size: [, , `size`], + sortCriteria: [, (_) => se_FindingStatisticsSortCriteria(_, context), `sortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1618,13 +1645,15 @@ export const se_GetUsageStatisticsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usage/statistics"; let body: any; - body = JSON.stringify({ - ...(input.filterBy != null && { filterBy: se___listOfUsageStatisticsFilter(input.filterBy, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: se_UsageStatisticsSortBy(input.sortBy, context) }), - ...(input.timeRange != null && { timeRange: input.timeRange }), - }); + body = JSON.stringify( + take(input, { + filterBy: [, (_) => se___listOfUsageStatisticsFilter(_, context), `filterBy`], + maxResults: [, , `maxResults`], + nextToken: [, , `nextToken`], + sortBy: [, (_) => se_UsageStatisticsSortBy(_, context), `sortBy`], + timeRange: [, , `timeRange`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1702,12 +1731,14 @@ export const se_ListClassificationJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs/list"; let body: any; - body = JSON.stringify({ - ...(input.filterCriteria != null && { filterCriteria: se_ListJobsFilterCriteria(input.filterCriteria, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortCriteria != null && { sortCriteria: se_ListJobsSortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + filterCriteria: [, (_) => se_ListJobsFilterCriteria(_, context), `filterCriteria`], + maxResults: [, , `maxResults`], + nextToken: [, , `nextToken`], + sortCriteria: [, (_) => se_ListJobsSortCriteria(_, context), `sortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1760,10 +1791,12 @@ export const se_ListCustomDataIdentifiersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-data-identifiers/list"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [, , `maxResults`], + nextToken: [, , `nextToken`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1788,12 +1821,14 @@ export const se_ListFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings"; let body: any; - body = JSON.stringify({ - ...(input.findingCriteria != null && { findingCriteria: se_FindingCriteria(input.findingCriteria, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortCriteria != null && { sortCriteria: se_SortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + findingCriteria: [, (_) => se_FindingCriteria(_, context), `findingCriteria`], + maxResults: [, , `maxResults`], + nextToken: [, , `nextToken`], + sortCriteria: [, (_) => se_SortCriteria(_, context), `sortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1873,9 +1908,11 @@ export const se_ListManagedDataIdentifiersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/managed-data-identifiers/list"; let body: any; - body = JSON.stringify({ - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + nextToken: [, , `nextToken`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2064,11 +2101,11 @@ export const se_PutClassificationExportConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/classification-export-configuration"; let body: any; - body = JSON.stringify({ - ...(input.configuration != null && { - configuration: se_ClassificationExportConfiguration(input.configuration, context), - }), - }); + body = JSON.stringify( + take(input, { + configuration: [, (_) => se_ClassificationExportConfiguration(_, context), `configuration`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2094,12 +2131,12 @@ export const se_PutFindingsPublicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings-publication-configuration"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.securityHubConfiguration != null && { - securityHubConfiguration: se_SecurityHubConfiguration(input.securityHubConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + securityHubConfiguration: [, (_) => se_SecurityHubConfiguration(_, context), `securityHubConfiguration`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2125,14 +2162,14 @@ export const se_SearchResourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/datasources/search-resources"; let body: any; - body = JSON.stringify({ - ...(input.bucketCriteria != null && { - bucketCriteria: se_SearchResourcesBucketCriteria(input.bucketCriteria, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortCriteria != null && { sortCriteria: se_SearchResourcesSortCriteria(input.sortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + bucketCriteria: [, (_) => se_SearchResourcesBucketCriteria(_, context), `bucketCriteria`], + maxResults: [, , `maxResults`], + nextToken: [, , `nextToken`], + sortCriteria: [, (_) => se_SearchResourcesSortCriteria(_, context), `sortCriteria`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2158,9 +2195,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2186,13 +2225,15 @@ export const se_TestCustomDataIdentifierCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/custom-data-identifiers/test"; let body: any; - body = JSON.stringify({ - ...(input.ignoreWords != null && { ignoreWords: se___listOf__string(input.ignoreWords, context) }), - ...(input.keywords != null && { keywords: se___listOf__string(input.keywords, context) }), - ...(input.maximumMatchDistance != null && { maximumMatchDistance: input.maximumMatchDistance }), - ...(input.regex != null && { regex: input.regex }), - ...(input.sampleText != null && { sampleText: input.sampleText }), - }); + body = JSON.stringify( + take(input, { + ignoreWords: [, (_) => _json(_), `ignoreWords`], + keywords: [, (_) => _json(_), `keywords`], + maximumMatchDistance: [, , `maximumMatchDistance`], + regex: [, , `regex`], + sampleText: [, , `sampleText`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2248,11 +2289,13 @@ export const se_UpdateAllowListCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/allow-lists/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.criteria != null && { criteria: se_AllowListCriteria(input.criteria, context) }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + criteria: [, (_) => se_AllowListCriteria(_, context), `criteria`], + description: [, , `description`], + name: [, , `name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2278,9 +2321,11 @@ export const se_UpdateAutomatedDiscoveryConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/automated-discovery/configuration"; let body: any; - body = JSON.stringify({ - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + status: [, , `status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2306,9 +2351,11 @@ export const se_UpdateClassificationJobCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs/{jobId}"; resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId!, "{jobId}", false); let body: any; - body = JSON.stringify({ - ...(input.jobStatus != null && { jobStatus: input.jobStatus }), - }); + body = JSON.stringify( + take(input, { + jobStatus: [, , `jobStatus`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2335,9 +2382,11 @@ export const se_UpdateClassificationScopeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/classification-scopes/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.s3 != null && { s3: se_S3ClassificationScopeUpdate(input.s3, context) }), - }); + body = JSON.stringify( + take(input, { + s3: [, (_) => se_S3ClassificationScopeUpdate(_, context), `s3`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2363,14 +2412,16 @@ export const se_UpdateFindingsFilterCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingsfilters/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.findingCriteria != null && { findingCriteria: se_FindingCriteria(input.findingCriteria, context) }), - ...(input.name != null && { name: input.name }), - ...(input.position != null && { position: input.position }), - }); + body = JSON.stringify( + take(input, { + action: [, , `action`], + clientToken: [, (_) => _ ?? generateIdempotencyToken(), `clientToken`], + description: [, , `description`], + findingCriteria: [, (_) => se_FindingCriteria(_, context), `findingCriteria`], + name: [, , `name`], + position: [, , `position`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2395,10 +2446,12 @@ export const se_UpdateMacieSessionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/macie"; let body: any; - body = JSON.stringify({ - ...(input.findingPublishingFrequency != null && { findingPublishingFrequency: input.findingPublishingFrequency }), - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + findingPublishingFrequency: [, , `findingPublishingFrequency`], + status: [, , `status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2424,9 +2477,11 @@ export const se_UpdateMemberSessionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/macie/members/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.status != null && { status: input.status }), - }); + body = JSON.stringify( + take(input, { + status: [, , `status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2451,9 +2506,11 @@ export const se_UpdateOrganizationConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/admin/configuration"; let body: any; - body = JSON.stringify({ - ...(input.autoEnable != null && { autoEnable: input.autoEnable }), - }); + body = JSON.stringify( + take(input, { + autoEnable: [, , `autoEnable`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2481,9 +2538,11 @@ export const se_UpdateResourceProfileCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.sensitivityScoreOverride != null && { sensitivityScoreOverride: input.sensitivityScoreOverride }), - }); + body = JSON.stringify( + take(input, { + sensitivityScoreOverride: [, , `sensitivityScoreOverride`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2513,11 +2572,11 @@ export const se_UpdateResourceProfileDetectionsCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.suppressDataIdentifiers != null && { - suppressDataIdentifiers: se___listOfSuppressDataIdentifier(input.suppressDataIdentifiers, context), - }), - }); + body = JSON.stringify( + take(input, { + suppressDataIdentifiers: [, (_) => se___listOfSuppressDataIdentifier(_, context), `suppressDataIdentifiers`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2543,9 +2602,11 @@ export const se_UpdateRevealConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reveal-configuration"; let body: any; - body = JSON.stringify({ - ...(input.configuration != null && { configuration: se_RevealConfiguration(input.configuration, context) }), - }); + body = JSON.stringify( + take(input, { + configuration: [, (_) => se_RevealConfiguration(_, context), `configuration`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2572,11 +2633,13 @@ export const se_UpdateSensitivityInspectionTemplateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/templates/sensitivity-inspections/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.excludes != null && { excludes: se_SensitivityInspectionTemplateExcludes(input.excludes, context) }), - ...(input.includes != null && { includes: se_SensitivityInspectionTemplateIncludes(input.includes, context) }), - }); + body = JSON.stringify( + take(input, { + description: [, , `description`], + excludes: [, (_) => se_SensitivityInspectionTemplateExcludes(_, context), `excludes`], + includes: [, (_) => se_SensitivityInspectionTemplateIncludes(_, context), `includes`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2641,10 +2704,9 @@ const de_AcceptInvitationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2664,15 +2726,15 @@ export const de_BatchGetCustomDataIdentifiersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customDataIdentifiers != null) { - contents.customDataIdentifiers = de___listOfBatchGetCustomDataIdentifierSummary( - data.customDataIdentifiers, - context - ); - } - if (data.notFoundIdentifierIds != null) { - contents.notFoundIdentifierIds = de___listOf__string(data.notFoundIdentifierIds, context); - } + const doc = take(data, { + customDataIdentifiers: [ + , + (_) => de___listOfBatchGetCustomDataIdentifierSummary(_, context), + `customDataIdentifiers`, + ], + notFoundIdentifierIds: [, _json, `notFoundIdentifierIds`], + }); + Object.assign(contents, doc); return contents; }; @@ -2712,10 +2774,9 @@ const de_BatchGetCustomDataIdentifiersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2735,12 +2796,11 @@ export const de_CreateAllowListCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + id: [, __expectString, `id`], + }); + Object.assign(contents, doc); return contents; }; @@ -2780,10 +2840,9 @@ const de_CreateAllowListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2803,12 +2862,11 @@ export const de_CreateClassificationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + jobArn: [, __expectString, `jobArn`], + jobId: [, __expectString, `jobId`], + }); + Object.assign(contents, doc); return contents; }; @@ -2848,10 +2906,9 @@ const de_CreateClassificationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2871,9 +2928,10 @@ export const de_CreateCustomDataIdentifierCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customDataIdentifierId != null) { - contents.customDataIdentifierId = __expectString(data.customDataIdentifierId); - } + const doc = take(data, { + customDataIdentifierId: [, __expectString, `customDataIdentifierId`], + }); + Object.assign(contents, doc); return contents; }; @@ -2913,10 +2971,9 @@ const de_CreateCustomDataIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2936,12 +2993,11 @@ export const de_CreateFindingsFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + id: [, __expectString, `id`], + }); + Object.assign(contents, doc); return contents; }; @@ -2981,10 +3037,9 @@ const de_CreateFindingsFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3004,9 +3059,10 @@ export const de_CreateInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.unprocessedAccounts = de___listOfUnprocessedAccount(data.unprocessedAccounts, context); - } + const doc = take(data, { + unprocessedAccounts: [, (_) => de___listOfUnprocessedAccount(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -3046,10 +3102,9 @@ const de_CreateInvitationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3069,9 +3124,10 @@ export const de_CreateMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3111,10 +3167,9 @@ const de_CreateMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3173,10 +3228,9 @@ const de_CreateSampleFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3196,9 +3250,10 @@ export const de_DeclineInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.unprocessedAccounts = de___listOfUnprocessedAccount(data.unprocessedAccounts, context); - } + const doc = take(data, { + unprocessedAccounts: [, (_) => de___listOfUnprocessedAccount(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -3238,10 +3293,9 @@ const de_DeclineInvitationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3294,10 +3348,9 @@ const de_DeleteAllowListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3356,10 +3409,9 @@ const de_DeleteCustomDataIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3418,10 +3470,9 @@ const de_DeleteFindingsFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3441,9 +3492,10 @@ export const de_DeleteInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedAccounts != null) { - contents.unprocessedAccounts = de___listOfUnprocessedAccount(data.unprocessedAccounts, context); - } + const doc = take(data, { + unprocessedAccounts: [, (_) => de___listOfUnprocessedAccount(_, context), `unprocessedAccounts`], + }); + Object.assign(contents, doc); return contents; }; @@ -3483,10 +3535,9 @@ const de_DeleteInvitationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3545,10 +3596,9 @@ const de_DeleteMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3568,12 +3618,11 @@ export const de_DescribeBucketsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.buckets != null) { - contents.buckets = de___listOfBucketMetadata(data.buckets, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + buckets: [, (_) => de___listOfBucketMetadata(_, context), `buckets`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3613,10 +3662,9 @@ const de_DescribeBucketsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3636,69 +3684,30 @@ export const de_DescribeClassificationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.allowListIds != null) { - contents.allowListIds = de___listOf__string(data.allowListIds, context); - } - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.customDataIdentifierIds != null) { - contents.customDataIdentifierIds = de___listOf__string(data.customDataIdentifierIds, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.initialRun != null) { - contents.initialRun = __expectBoolean(data.initialRun); - } - if (data.jobArn != null) { - contents.jobArn = __expectString(data.jobArn); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobStatus != null) { - contents.jobStatus = __expectString(data.jobStatus); - } - if (data.jobType != null) { - contents.jobType = __expectString(data.jobType); - } - if (data.lastRunErrorStatus != null) { - contents.lastRunErrorStatus = de_LastRunErrorStatus(data.lastRunErrorStatus, context); - } - if (data.lastRunTime != null) { - contents.lastRunTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastRunTime)); - } - if (data.managedDataIdentifierIds != null) { - contents.managedDataIdentifierIds = de___listOf__string(data.managedDataIdentifierIds, context); - } - if (data.managedDataIdentifierSelector != null) { - contents.managedDataIdentifierSelector = __expectString(data.managedDataIdentifierSelector); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.s3JobDefinition != null) { - contents.s3JobDefinition = de_S3JobDefinition(data.s3JobDefinition, context); - } - if (data.samplingPercentage != null) { - contents.samplingPercentage = __expectInt32(data.samplingPercentage); - } - if (data.scheduleFrequency != null) { - contents.scheduleFrequency = de_JobScheduleFrequency(data.scheduleFrequency, context); - } - if (data.statistics != null) { - contents.statistics = de_Statistics(data.statistics, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.userPausedDetails != null) { - contents.userPausedDetails = de_UserPausedDetails(data.userPausedDetails, context); - } + const doc = take(data, { + allowListIds: [, _json, `allowListIds`], + clientToken: [, __expectString, `clientToken`], + createdAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + customDataIdentifierIds: [, _json, `customDataIdentifierIds`], + description: [, __expectString, `description`], + initialRun: [, __expectBoolean, `initialRun`], + jobArn: [, __expectString, `jobArn`], + jobId: [, __expectString, `jobId`], + jobStatus: [, __expectString, `jobStatus`], + jobType: [, __expectString, `jobType`], + lastRunErrorStatus: [, (_) => de_LastRunErrorStatus(_, context), `lastRunErrorStatus`], + lastRunTime: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastRunTime`], + managedDataIdentifierIds: [, _json, `managedDataIdentifierIds`], + managedDataIdentifierSelector: [, __expectString, `managedDataIdentifierSelector`], + name: [, __expectString, `name`], + s3JobDefinition: [, (_) => de_S3JobDefinition(_, context), `s3JobDefinition`], + samplingPercentage: [, __expectInt32, `samplingPercentage`], + scheduleFrequency: [, (_) => de_JobScheduleFrequency(_, context), `scheduleFrequency`], + statistics: [, (_) => de_Statistics(_, context), `statistics`], + tags: [, _json, `tags`], + userPausedDetails: [, (_) => de_UserPausedDetails(_, context), `userPausedDetails`], + }); + Object.assign(contents, doc); return contents; }; @@ -3738,10 +3747,9 @@ const de_DescribeClassificationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3761,12 +3769,11 @@ export const de_DescribeOrganizationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoEnable != null) { - contents.autoEnable = __expectBoolean(data.autoEnable); - } - if (data.maxAccountLimitReached != null) { - contents.maxAccountLimitReached = __expectBoolean(data.maxAccountLimitReached); - } + const doc = take(data, { + autoEnable: [, __expectBoolean, `autoEnable`], + maxAccountLimitReached: [, __expectBoolean, `maxAccountLimitReached`], + }); + Object.assign(contents, doc); return contents; }; @@ -3806,10 +3813,9 @@ const de_DescribeOrganizationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3868,10 +3874,9 @@ const de_DisableMacieCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3930,10 +3935,9 @@ const de_DisableOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3992,10 +3996,9 @@ const de_DisassociateFromAdministratorAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4054,10 +4057,9 @@ const de_DisassociateFromMasterAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4116,10 +4118,9 @@ const de_DisassociateMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4178,10 +4179,9 @@ const de_EnableMacieCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4240,10 +4240,9 @@ const de_EnableOrganizationAdminAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4263,9 +4262,10 @@ export const de_GetAdministratorAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.administrator != null) { - contents.administrator = de_Invitation(data.administrator, context); - } + const doc = take(data, { + administrator: [, (_) => de_Invitation(_, context), `administrator`], + }); + Object.assign(contents, doc); return contents; }; @@ -4305,10 +4305,9 @@ const de_GetAdministratorAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4328,33 +4327,18 @@ export const de_GetAllowListCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.criteria != null) { - contents.criteria = de_AllowListCriteria(data.criteria, context); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = de_AllowListStatus(data.status, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updatedAt)); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + createdAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + criteria: [, (_) => de_AllowListCriteria(_, context), `criteria`], + description: [, __expectString, `description`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + status: [, (_) => de_AllowListStatus(_, context), `status`], + tags: [, _json, `tags`], + updatedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `updatedAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -4388,10 +4372,9 @@ const de_GetAllowListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4411,24 +4394,15 @@ export const de_GetAutomatedDiscoveryConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.classificationScopeId != null) { - contents.classificationScopeId = __expectString(data.classificationScopeId); - } - if (data.disabledAt != null) { - contents.disabledAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.disabledAt)); - } - if (data.firstEnabledAt != null) { - contents.firstEnabledAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.firstEnabledAt)); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.sensitivityInspectionTemplateId != null) { - contents.sensitivityInspectionTemplateId = __expectString(data.sensitivityInspectionTemplateId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + classificationScopeId: [, __expectString, `classificationScopeId`], + disabledAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `disabledAt`], + firstEnabledAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `firstEnabledAt`], + lastUpdatedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdatedAt`], + sensitivityInspectionTemplateId: [, __expectString, `sensitivityInspectionTemplateId`], + status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -4459,10 +4433,9 @@ const de_GetAutomatedDiscoveryConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4482,60 +4455,39 @@ export const de_GetBucketStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bucketCount != null) { - contents.bucketCount = __expectLong(data.bucketCount); - } - if (data.bucketCountByEffectivePermission != null) { - contents.bucketCountByEffectivePermission = de_BucketCountByEffectivePermission( - data.bucketCountByEffectivePermission, - context - ); - } - if (data.bucketCountByEncryptionType != null) { - contents.bucketCountByEncryptionType = de_BucketCountByEncryptionType(data.bucketCountByEncryptionType, context); - } - if (data.bucketCountByObjectEncryptionRequirement != null) { - contents.bucketCountByObjectEncryptionRequirement = de_BucketCountPolicyAllowsUnencryptedObjectUploads( - data.bucketCountByObjectEncryptionRequirement, - context - ); - } - if (data.bucketCountBySharedAccessType != null) { - contents.bucketCountBySharedAccessType = de_BucketCountBySharedAccessType( - data.bucketCountBySharedAccessType, - context - ); - } - if (data.bucketStatisticsBySensitivity != null) { - contents.bucketStatisticsBySensitivity = de_BucketStatisticsBySensitivity( - data.bucketStatisticsBySensitivity, - context - ); - } - if (data.classifiableObjectCount != null) { - contents.classifiableObjectCount = __expectLong(data.classifiableObjectCount); - } - if (data.classifiableSizeInBytes != null) { - contents.classifiableSizeInBytes = __expectLong(data.classifiableSizeInBytes); - } - if (data.lastUpdated != null) { - contents.lastUpdated = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdated)); - } - if (data.objectCount != null) { - contents.objectCount = __expectLong(data.objectCount); - } - if (data.sizeInBytes != null) { - contents.sizeInBytes = __expectLong(data.sizeInBytes); - } - if (data.sizeInBytesCompressed != null) { - contents.sizeInBytesCompressed = __expectLong(data.sizeInBytesCompressed); - } - if (data.unclassifiableObjectCount != null) { - contents.unclassifiableObjectCount = de_ObjectLevelStatistics(data.unclassifiableObjectCount, context); - } - if (data.unclassifiableObjectSizeInBytes != null) { - contents.unclassifiableObjectSizeInBytes = de_ObjectLevelStatistics(data.unclassifiableObjectSizeInBytes, context); - } + const doc = take(data, { + bucketCount: [, __expectLong, `bucketCount`], + bucketCountByEffectivePermission: [ + , + (_) => de_BucketCountByEffectivePermission(_, context), + `bucketCountByEffectivePermission`, + ], + bucketCountByEncryptionType: [, (_) => de_BucketCountByEncryptionType(_, context), `bucketCountByEncryptionType`], + bucketCountByObjectEncryptionRequirement: [ + , + (_) => de_BucketCountPolicyAllowsUnencryptedObjectUploads(_, context), + `bucketCountByObjectEncryptionRequirement`, + ], + bucketCountBySharedAccessType: [ + , + (_) => de_BucketCountBySharedAccessType(_, context), + `bucketCountBySharedAccessType`, + ], + bucketStatisticsBySensitivity: [ + , + (_) => de_BucketStatisticsBySensitivity(_, context), + `bucketStatisticsBySensitivity`, + ], + classifiableObjectCount: [, __expectLong, `classifiableObjectCount`], + classifiableSizeInBytes: [, __expectLong, `classifiableSizeInBytes`], + lastUpdated: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdated`], + objectCount: [, __expectLong, `objectCount`], + sizeInBytes: [, __expectLong, `sizeInBytes`], + sizeInBytesCompressed: [, __expectLong, `sizeInBytesCompressed`], + unclassifiableObjectCount: [, (_) => de_ObjectLevelStatistics(_, context), `unclassifiableObjectCount`], + unclassifiableObjectSizeInBytes: [, (_) => de_ObjectLevelStatistics(_, context), `unclassifiableObjectSizeInBytes`], + }); + Object.assign(contents, doc); return contents; }; @@ -4575,10 +4527,9 @@ const de_GetBucketStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4598,9 +4549,10 @@ export const de_GetClassificationExportConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuration != null) { - contents.configuration = de_ClassificationExportConfiguration(data.configuration, context); - } + const doc = take(data, { + configuration: [, (_) => de_ClassificationExportConfiguration(_, context), `configuration`], + }); + Object.assign(contents, doc); return contents; }; @@ -4640,10 +4592,9 @@ const de_GetClassificationExportConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4663,15 +4614,12 @@ export const de_GetClassificationScopeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.s3 != null) { - contents.s3 = de_S3ClassificationScope(data.s3, context); - } + const doc = take(data, { + id: [, __expectString, `id`], + name: [, __expectString, `name`], + s3: [, (_) => de_S3ClassificationScope(_, context), `s3`], + }); + Object.assign(contents, doc); return contents; }; @@ -4705,10 +4653,9 @@ const de_GetClassificationScopeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4728,42 +4675,21 @@ export const de_GetCustomDataIdentifierCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.deleted != null) { - contents.deleted = __expectBoolean(data.deleted); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.ignoreWords != null) { - contents.ignoreWords = de___listOf__string(data.ignoreWords, context); - } - if (data.keywords != null) { - contents.keywords = de___listOf__string(data.keywords, context); - } - if (data.maximumMatchDistance != null) { - contents.maximumMatchDistance = __expectInt32(data.maximumMatchDistance); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.regex != null) { - contents.regex = __expectString(data.regex); - } - if (data.severityLevels != null) { - contents.severityLevels = de_SeverityLevelList(data.severityLevels, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + createdAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + deleted: [, __expectBoolean, `deleted`], + description: [, __expectString, `description`], + id: [, __expectString, `id`], + ignoreWords: [, _json, `ignoreWords`], + keywords: [, _json, `keywords`], + maximumMatchDistance: [, __expectInt32, `maximumMatchDistance`], + name: [, __expectString, `name`], + regex: [, __expectString, `regex`], + severityLevels: [, (_) => de_SeverityLevelList(_, context), `severityLevels`], + tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -4803,10 +4729,9 @@ const de_GetCustomDataIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4826,9 +4751,10 @@ export const de_GetFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findings != null) { - contents.findings = de___listOfFinding(data.findings, context); - } + const doc = take(data, { + findings: [, (_) => de___listOfFinding(_, context), `findings`], + }); + Object.assign(contents, doc); return contents; }; @@ -4868,10 +4794,9 @@ const de_GetFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4891,30 +4816,17 @@ export const de_GetFindingsFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = __expectString(data.action); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.findingCriteria != null) { - contents.findingCriteria = de_FindingCriteria(data.findingCriteria, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.position != null) { - contents.position = __expectInt32(data.position); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + action: [, __expectString, `action`], + arn: [, __expectString, `arn`], + description: [, __expectString, `description`], + findingCriteria: [, (_) => de_FindingCriteria(_, context), `findingCriteria`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + position: [, __expectInt32, `position`], + tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -4954,10 +4866,9 @@ const de_GetFindingsFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4977,9 +4888,10 @@ export const de_GetFindingsPublicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.securityHubConfiguration != null) { - contents.securityHubConfiguration = de_SecurityHubConfiguration(data.securityHubConfiguration, context); - } + const doc = take(data, { + securityHubConfiguration: [, (_) => de_SecurityHubConfiguration(_, context), `securityHubConfiguration`], + }); + Object.assign(contents, doc); return contents; }; @@ -5019,10 +4931,9 @@ const de_GetFindingsPublicationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5042,9 +4953,10 @@ export const de_GetFindingStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.countsByGroup != null) { - contents.countsByGroup = de___listOfGroupCount(data.countsByGroup, context); - } + const doc = take(data, { + countsByGroup: [, (_) => de___listOfGroupCount(_, context), `countsByGroup`], + }); + Object.assign(contents, doc); return contents; }; @@ -5084,10 +4996,9 @@ const de_GetFindingStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5107,9 +5018,10 @@ export const de_GetInvitationsCountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.invitationsCount != null) { - contents.invitationsCount = __expectLong(data.invitationsCount); - } + const doc = take(data, { + invitationsCount: [, __expectLong, `invitationsCount`], + }); + Object.assign(contents, doc); return contents; }; @@ -5149,10 +5061,9 @@ const de_GetInvitationsCountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5172,21 +5083,14 @@ export const de_GetMacieSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.findingPublishingFrequency != null) { - contents.findingPublishingFrequency = __expectString(data.findingPublishingFrequency); - } - if (data.serviceRole != null) { - contents.serviceRole = __expectString(data.serviceRole); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updatedAt)); - } + const doc = take(data, { + createdAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + findingPublishingFrequency: [, __expectString, `findingPublishingFrequency`], + serviceRole: [, __expectString, `serviceRole`], + status: [, __expectString, `status`], + updatedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `updatedAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -5226,10 +5130,9 @@ const de_GetMacieSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5249,9 +5152,10 @@ export const de_GetMasterAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.master != null) { - contents.master = de_Invitation(data.master, context); - } + const doc = take(data, { + master: [, (_) => de_Invitation(_, context), `master`], + }); + Object.assign(contents, doc); return contents; }; @@ -5291,10 +5195,9 @@ const de_GetMasterAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5314,33 +5217,18 @@ export const de_GetMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountId != null) { - contents.accountId = __expectString(data.accountId); - } - if (data.administratorAccountId != null) { - contents.administratorAccountId = __expectString(data.administratorAccountId); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.email != null) { - contents.email = __expectString(data.email); - } - if (data.invitedAt != null) { - contents.invitedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.invitedAt)); - } - if (data.masterAccountId != null) { - contents.masterAccountId = __expectString(data.masterAccountId); - } - if (data.relationshipStatus != null) { - contents.relationshipStatus = __expectString(data.relationshipStatus); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.updatedAt != null) { - contents.updatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updatedAt)); - } + const doc = take(data, { + accountId: [, __expectString, `accountId`], + administratorAccountId: [, __expectString, `administratorAccountId`], + arn: [, __expectString, `arn`], + email: [, __expectString, `email`], + invitedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `invitedAt`], + masterAccountId: [, __expectString, `masterAccountId`], + relationshipStatus: [, __expectString, `relationshipStatus`], + tags: [, _json, `tags`], + updatedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `updatedAt`], + }); + Object.assign(contents, doc); return contents; }; @@ -5380,10 +5268,9 @@ const de_GetMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5403,18 +5290,13 @@ export const de_GetResourceProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profileUpdatedAt != null) { - contents.profileUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.profileUpdatedAt)); - } - if (data.sensitivityScore != null) { - contents.sensitivityScore = __expectInt32(data.sensitivityScore); - } - if (data.sensitivityScoreOverridden != null) { - contents.sensitivityScoreOverridden = __expectBoolean(data.sensitivityScoreOverridden); - } - if (data.statistics != null) { - contents.statistics = de_ResourceStatistics(data.statistics, context); - } + const doc = take(data, { + profileUpdatedAt: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `profileUpdatedAt`], + sensitivityScore: [, __expectInt32, `sensitivityScore`], + sensitivityScoreOverridden: [, __expectBoolean, `sensitivityScoreOverridden`], + statistics: [, (_) => de_ResourceStatistics(_, context), `statistics`], + }); + Object.assign(contents, doc); return contents; }; @@ -5451,10 +5333,9 @@ const de_GetResourceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5474,9 +5355,10 @@ export const de_GetRevealConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuration != null) { - contents.configuration = de_RevealConfiguration(data.configuration, context); - } + const doc = take(data, { + configuration: [, (_) => de_RevealConfiguration(_, context), `configuration`], + }); + Object.assign(contents, doc); return contents; }; @@ -5507,10 +5389,9 @@ const de_GetRevealConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5530,15 +5411,12 @@ export const de_GetSensitiveDataOccurrencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.sensitiveDataOccurrences != null) { - contents.sensitiveDataOccurrences = de_SensitiveDataOccurrences(data.sensitiveDataOccurrences, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + error: [, __expectString, `error`], + sensitiveDataOccurrences: [, (_) => de_SensitiveDataOccurrences(_, context), `sensitiveDataOccurrences`], + status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -5575,10 +5453,9 @@ const de_GetSensitiveDataOccurrencesCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5598,12 +5475,11 @@ export const de_GetSensitiveDataOccurrencesAvailabilityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.reasons != null) { - contents.reasons = de___listOfUnavailabilityReasonCode(data.reasons, context); - } + const doc = take(data, { + code: [, __expectString, `code`], + reasons: [, _json, `reasons`], + }); + Object.assign(contents, doc); return contents; }; @@ -5634,10 +5510,9 @@ const de_GetSensitiveDataOccurrencesAvailabilityCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5657,21 +5532,14 @@ export const de_GetSensitivityInspectionTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.excludes != null) { - contents.excludes = de_SensitivityInspectionTemplateExcludes(data.excludes, context); - } - if (data.includes != null) { - contents.includes = de_SensitivityInspectionTemplateIncludes(data.includes, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sensitivityInspectionTemplateId != null) { - contents.sensitivityInspectionTemplateId = __expectString(data.sensitivityInspectionTemplateId); - } + const doc = take(data, { + description: [, __expectString, `description`], + excludes: [, (_) => de_SensitivityInspectionTemplateExcludes(_, context), `excludes`], + includes: [, (_) => de_SensitivityInspectionTemplateIncludes(_, context), `includes`], + name: [, __expectString, `name`], + sensitivityInspectionTemplateId: [, __expectString, `sensitivityInspectionTemplateId`], + }); + Object.assign(contents, doc); return contents; }; @@ -5705,10 +5573,9 @@ const de_GetSensitivityInspectionTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5728,15 +5595,12 @@ export const de_GetUsageStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.records != null) { - contents.records = de___listOfUsageRecord(data.records, context); - } - if (data.timeRange != null) { - contents.timeRange = __expectString(data.timeRange); - } + const doc = take(data, { + nextToken: [, __expectString, `nextToken`], + records: [, (_) => de___listOfUsageRecord(_, context), `records`], + timeRange: [, __expectString, `timeRange`], + }); + Object.assign(contents, doc); return contents; }; @@ -5776,10 +5640,9 @@ const de_GetUsageStatisticsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5799,12 +5662,11 @@ export const de_GetUsageTotalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.timeRange != null) { - contents.timeRange = __expectString(data.timeRange); - } - if (data.usageTotals != null) { - contents.usageTotals = de___listOfUsageTotal(data.usageTotals, context); - } + const doc = take(data, { + timeRange: [, __expectString, `timeRange`], + usageTotals: [, (_) => de___listOfUsageTotal(_, context), `usageTotals`], + }); + Object.assign(contents, doc); return contents; }; @@ -5844,10 +5706,9 @@ const de_GetUsageTotalsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5867,12 +5728,11 @@ export const de_ListAllowListsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.allowLists != null) { - contents.allowLists = de___listOfAllowListSummary(data.allowLists, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + allowLists: [, (_) => de___listOfAllowListSummary(_, context), `allowLists`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5903,10 +5763,9 @@ const de_ListAllowListsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5926,12 +5785,11 @@ export const de_ListClassificationJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de___listOfJobSummary(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: [, (_) => de___listOfJobSummary(_, context), `items`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5971,10 +5829,9 @@ const de_ListClassificationJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5994,12 +5851,11 @@ export const de_ListClassificationScopesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.classificationScopes != null) { - contents.classificationScopes = de___listOfClassificationScopeSummary(data.classificationScopes, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + classificationScopes: [, (_) => de___listOfClassificationScopeSummary(_, context), `classificationScopes`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6030,10 +5886,9 @@ const de_ListClassificationScopesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6053,12 +5908,11 @@ export const de_ListCustomDataIdentifiersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de___listOfCustomDataIdentifierSummary(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: [, (_) => de___listOfCustomDataIdentifierSummary(_, context), `items`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6098,10 +5952,9 @@ const de_ListCustomDataIdentifiersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6121,12 +5974,11 @@ export const de_ListFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findingIds != null) { - contents.findingIds = de___listOf__string(data.findingIds, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findingIds: [, _json, `findingIds`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6166,10 +6018,9 @@ const de_ListFindingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6189,12 +6040,11 @@ export const de_ListFindingsFiltersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.findingsFilterListItems != null) { - contents.findingsFilterListItems = de___listOfFindingsFilterListItem(data.findingsFilterListItems, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + findingsFilterListItems: [, (_) => de___listOfFindingsFilterListItem(_, context), `findingsFilterListItems`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6234,10 +6084,9 @@ const de_ListFindingsFiltersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6257,12 +6106,11 @@ export const de_ListInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.invitations != null) { - contents.invitations = de___listOfInvitation(data.invitations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + invitations: [, (_) => de___listOfInvitation(_, context), `invitations`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6302,10 +6150,9 @@ const de_ListInvitationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6325,12 +6172,11 @@ export const de_ListManagedDataIdentifiersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de___listOfManagedDataIdentifierSummary(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: [, (_) => de___listOfManagedDataIdentifierSummary(_, context), `items`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6347,10 +6193,9 @@ const de_ListManagedDataIdentifiersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6369,12 +6214,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.members = de___listOfMember(data.members, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + members: [, (_) => de___listOfMember(_, context), `members`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6414,10 +6258,9 @@ const de_ListMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6437,12 +6280,11 @@ export const de_ListOrganizationAdminAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adminAccounts != null) { - contents.adminAccounts = de___listOfAdminAccount(data.adminAccounts, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + adminAccounts: [, (_) => de___listOfAdminAccount(_, context), `adminAccounts`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6482,10 +6324,9 @@ const de_ListOrganizationAdminAccountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6505,12 +6346,11 @@ export const de_ListResourceProfileArtifactsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.artifacts != null) { - contents.artifacts = de___listOfResourceProfileArtifact(data.artifacts, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + artifacts: [, (_) => de___listOfResourceProfileArtifact(_, context), `artifacts`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6544,10 +6384,9 @@ const de_ListResourceProfileArtifactsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6567,12 +6406,11 @@ export const de_ListResourceProfileDetectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.detections != null) { - contents.detections = de___listOfDetection(data.detections, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + detections: [, (_) => de___listOfDetection(_, context), `detections`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6609,10 +6447,9 @@ const de_ListResourceProfileDetectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6632,15 +6469,15 @@ export const de_ListSensitivityInspectionTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sensitivityInspectionTemplates != null) { - contents.sensitivityInspectionTemplates = de___listOfSensitivityInspectionTemplatesEntry( - data.sensitivityInspectionTemplates, - context - ); - } + const doc = take(data, { + nextToken: [, __expectString, `nextToken`], + sensitivityInspectionTemplates: [ + , + (_) => de___listOfSensitivityInspectionTemplatesEntry(_, context), + `sensitivityInspectionTemplates`, + ], + }); + Object.assign(contents, doc); return contents; }; @@ -6674,10 +6511,9 @@ const de_ListSensitivityInspectionTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6697,9 +6533,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -6716,10 +6553,9 @@ const de_ListTagsForResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6738,9 +6574,10 @@ export const de_PutClassificationExportConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuration != null) { - contents.configuration = de_ClassificationExportConfiguration(data.configuration, context); - } + const doc = take(data, { + configuration: [, (_) => de_ClassificationExportConfiguration(_, context), `configuration`], + }); + Object.assign(contents, doc); return contents; }; @@ -6780,10 +6617,9 @@ const de_PutClassificationExportConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6842,10 +6678,9 @@ const de_PutFindingsPublicationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6865,12 +6700,11 @@ export const de_SearchResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.matchingResources != null) { - contents.matchingResources = de___listOfMatchingResource(data.matchingResources, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + matchingResources: [, (_) => de___listOfMatchingResource(_, context), `matchingResources`], + nextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -6910,10 +6744,9 @@ const de_SearchResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6949,10 +6782,9 @@ const de_TagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6971,9 +6803,10 @@ export const de_TestCustomDataIdentifierCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.matchCount != null) { - contents.matchCount = __expectInt32(data.matchCount); - } + const doc = take(data, { + matchCount: [, __expectInt32, `matchCount`], + }); + Object.assign(contents, doc); return contents; }; @@ -7013,10 +6846,9 @@ const de_TestCustomDataIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7052,10 +6884,9 @@ const de_UntagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7074,12 +6905,11 @@ export const de_UpdateAllowListCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + id: [, __expectString, `id`], + }); + Object.assign(contents, doc); return contents; }; @@ -7113,10 +6943,9 @@ const de_UpdateAllowListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7166,10 +6995,9 @@ const de_UpdateAutomatedDiscoveryConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7228,10 +7056,9 @@ const de_UpdateClassificationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7284,10 +7111,9 @@ const de_UpdateClassificationScopeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7307,12 +7133,11 @@ export const de_UpdateFindingsFilterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + arn: [, __expectString, `arn`], + id: [, __expectString, `id`], + }); + Object.assign(contents, doc); return contents; }; @@ -7352,10 +7177,9 @@ const de_UpdateFindingsFilterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7414,10 +7238,9 @@ const de_UpdateMacieSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7476,10 +7299,9 @@ const de_UpdateMemberSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7538,10 +7360,9 @@ const de_UpdateOrganizationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7597,10 +7418,9 @@ const de_UpdateResourceProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7656,10 +7476,9 @@ const de_UpdateResourceProfileDetectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7679,9 +7498,10 @@ export const de_UpdateRevealConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuration != null) { - contents.configuration = de_RevealConfiguration(data.configuration, context); - } + const doc = take(data, { + configuration: [, (_) => de_RevealConfiguration(_, context), `configuration`], + }); + Object.assign(contents, doc); return contents; }; @@ -7712,10 +7532,9 @@ const de_UpdateRevealConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7768,16 +7587,15 @@ const de_UpdateSensitivityInspectionTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -7787,9 +7605,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7803,9 +7622,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7822,9 +7642,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7841,9 +7662,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7860,9 +7682,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7876,9 +7699,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7895,9 +7719,10 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7911,9 +7736,10 @@ const de_UnprocessableEntityExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7921,16 +7747,7 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfCriteriaForJob @@ -7943,16 +7760,7 @@ const se___listOfCriteriaForJob = (input: CriteriaForJob[], context: __SerdeCont }); }; -/** - * serializeAws_restJson1__listOfFindingType - */ -const se___listOfFindingType = (input: (FindingType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfFindingType omitted. /** * serializeAws_restJson1__listOfJobScopeTerm @@ -7987,16 +7795,7 @@ const se___listOfS3BucketDefinitionForJob = (input: S3BucketDefinitionForJob[], }); }; -/** - * serializeAws_restJson1__listOfS3BucketName - */ -const se___listOfS3BucketName = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfS3BucketName omitted. /** * serializeAws_restJson1__listOfSearchResourcesCriteria @@ -8071,20 +7870,20 @@ const se___listOfUsageStatisticsFilter = (input: UsageStatisticsFilter[], contex * serializeAws_restJson1AccountDetail */ const se_AccountDetail = (input: AccountDetail, context: __SerdeContext): any => { - return { - ...(input.accountId != null && { accountId: input.accountId }), - ...(input.email != null && { email: input.email }), - }; + return take(input, { + accountId: [, , `accountId`], + email: [, , `email`], + }); }; /** * serializeAws_restJson1AllowListCriteria */ const se_AllowListCriteria = (input: AllowListCriteria, context: __SerdeContext): any => { - return { - ...(input.regex != null && { regex: input.regex }), - ...(input.s3WordsList != null && { s3WordsList: se_S3WordsList(input.s3WordsList, context) }), - }; + return take(input, { + regex: [, , `regex`], + s3WordsList: [, (_) => se_S3WordsList(_, context), `s3WordsList`], + }); }; /** @@ -8107,25 +7906,25 @@ const se_BucketCriteriaAdditionalProperties = ( input: BucketCriteriaAdditionalProperties, context: __SerdeContext ): any => { - return { - ...(input.eq != null && { eq: se___listOf__string(input.eq, context) }), - ...(input.gt != null && { gt: input.gt }), - ...(input.gte != null && { gte: input.gte }), - ...(input.lt != null && { lt: input.lt }), - ...(input.lte != null && { lte: input.lte }), - ...(input.neq != null && { neq: se___listOf__string(input.neq, context) }), - ...(input.prefix != null && { prefix: input.prefix }), - }; + return take(input, { + eq: [, _json, `eq`], + gt: [, , `gt`], + gte: [, , `gte`], + lt: [, , `lt`], + lte: [, , `lte`], + neq: [, _json, `neq`], + prefix: [, , `prefix`], + }); }; /** * serializeAws_restJson1BucketSortCriteria */ const se_BucketSortCriteria = (input: BucketSortCriteria, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; + return take(input, { + attributeName: [, , `attributeName`], + orderBy: [, , `orderBy`], + }); }; /** @@ -8135,28 +7934,28 @@ const se_ClassificationExportConfiguration = ( input: ClassificationExportConfiguration, context: __SerdeContext ): any => { - return { - ...(input.s3Destination != null && { s3Destination: se_S3Destination(input.s3Destination, context) }), - }; + return take(input, { + s3Destination: [, (_) => se_S3Destination(_, context), `s3Destination`], + }); }; /** * serializeAws_restJson1CriteriaBlockForJob */ const se_CriteriaBlockForJob = (input: CriteriaBlockForJob, context: __SerdeContext): any => { - return { - ...(input.and != null && { and: se___listOfCriteriaForJob(input.and, context) }), - }; + return take(input, { + and: [, (_) => se___listOfCriteriaForJob(_, context), `and`], + }); }; /** * serializeAws_restJson1CriteriaForJob */ const se_CriteriaForJob = (input: CriteriaForJob, context: __SerdeContext): any => { - return { - ...(input.simpleCriterion != null && { simpleCriterion: se_SimpleCriterionForJob(input.simpleCriterion, context) }), - ...(input.tagCriterion != null && { tagCriterion: se_TagCriterionForJob(input.tagCriterion, context) }), - }; + return take(input, { + simpleCriterion: [, (_) => se_SimpleCriterionForJob(_, context), `simpleCriterion`], + tagCriterion: [, (_) => se_TagCriterionForJob(_, context), `tagCriterion`], + }); }; /** @@ -8176,141 +7975,136 @@ const se_Criterion = (input: Record, cont * serializeAws_restJson1CriterionAdditionalProperties */ const se_CriterionAdditionalProperties = (input: CriterionAdditionalProperties, context: __SerdeContext): any => { - return { - ...(input.eq != null && { eq: se___listOf__string(input.eq, context) }), - ...(input.eqExactMatch != null && { eqExactMatch: se___listOf__string(input.eqExactMatch, context) }), - ...(input.gt != null && { gt: input.gt }), - ...(input.gte != null && { gte: input.gte }), - ...(input.lt != null && { lt: input.lt }), - ...(input.lte != null && { lte: input.lte }), - ...(input.neq != null && { neq: se___listOf__string(input.neq, context) }), - }; + return take(input, { + eq: [, _json, `eq`], + eqExactMatch: [, _json, `eqExactMatch`], + gt: [, , `gt`], + gte: [, , `gte`], + lt: [, , `lt`], + lte: [, , `lte`], + neq: [, _json, `neq`], + }); }; -/** - * serializeAws_restJson1DailySchedule - */ -const se_DailySchedule = (input: DailySchedule, context: __SerdeContext): any => { - return {}; -}; +// se_DailySchedule omitted. /** * serializeAws_restJson1FindingCriteria */ const se_FindingCriteria = (input: FindingCriteria, context: __SerdeContext): any => { - return { - ...(input.criterion != null && { criterion: se_Criterion(input.criterion, context) }), - }; + return take(input, { + criterion: [, (_) => se_Criterion(_, context), `criterion`], + }); }; /** * serializeAws_restJson1FindingStatisticsSortCriteria */ const se_FindingStatisticsSortCriteria = (input: FindingStatisticsSortCriteria, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; + return take(input, { + attributeName: [, , `attributeName`], + orderBy: [, , `orderBy`], + }); }; /** * serializeAws_restJson1JobScheduleFrequency */ const se_JobScheduleFrequency = (input: JobScheduleFrequency, context: __SerdeContext): any => { - return { - ...(input.dailySchedule != null && { dailySchedule: se_DailySchedule(input.dailySchedule, context) }), - ...(input.monthlySchedule != null && { monthlySchedule: se_MonthlySchedule(input.monthlySchedule, context) }), - ...(input.weeklySchedule != null && { weeklySchedule: se_WeeklySchedule(input.weeklySchedule, context) }), - }; + return take(input, { + dailySchedule: [, _json, `dailySchedule`], + monthlySchedule: [, (_) => se_MonthlySchedule(_, context), `monthlySchedule`], + weeklySchedule: [, (_) => se_WeeklySchedule(_, context), `weeklySchedule`], + }); }; /** * serializeAws_restJson1JobScopeTerm */ const se_JobScopeTerm = (input: JobScopeTerm, context: __SerdeContext): any => { - return { - ...(input.simpleScopeTerm != null && { simpleScopeTerm: se_SimpleScopeTerm(input.simpleScopeTerm, context) }), - ...(input.tagScopeTerm != null && { tagScopeTerm: se_TagScopeTerm(input.tagScopeTerm, context) }), - }; + return take(input, { + simpleScopeTerm: [, (_) => se_SimpleScopeTerm(_, context), `simpleScopeTerm`], + tagScopeTerm: [, (_) => se_TagScopeTerm(_, context), `tagScopeTerm`], + }); }; /** * serializeAws_restJson1JobScopingBlock */ const se_JobScopingBlock = (input: JobScopingBlock, context: __SerdeContext): any => { - return { - ...(input.and != null && { and: se___listOfJobScopeTerm(input.and, context) }), - }; + return take(input, { + and: [, (_) => se___listOfJobScopeTerm(_, context), `and`], + }); }; /** * serializeAws_restJson1ListJobsFilterCriteria */ const se_ListJobsFilterCriteria = (input: ListJobsFilterCriteria, context: __SerdeContext): any => { - return { - ...(input.excludes != null && { excludes: se___listOfListJobsFilterTerm(input.excludes, context) }), - ...(input.includes != null && { includes: se___listOfListJobsFilterTerm(input.includes, context) }), - }; + return take(input, { + excludes: [, (_) => se___listOfListJobsFilterTerm(_, context), `excludes`], + includes: [, (_) => se___listOfListJobsFilterTerm(_, context), `includes`], + }); }; /** * serializeAws_restJson1ListJobsFilterTerm */ const se_ListJobsFilterTerm = (input: ListJobsFilterTerm, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se___listOf__string(input.values, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + key: [, , `key`], + values: [, _json, `values`], + }); }; /** * serializeAws_restJson1ListJobsSortCriteria */ const se_ListJobsSortCriteria = (input: ListJobsSortCriteria, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; + return take(input, { + attributeName: [, , `attributeName`], + orderBy: [, , `orderBy`], + }); }; /** * serializeAws_restJson1MonthlySchedule */ const se_MonthlySchedule = (input: MonthlySchedule, context: __SerdeContext): any => { - return { - ...(input.dayOfMonth != null && { dayOfMonth: input.dayOfMonth }), - }; + return take(input, { + dayOfMonth: [, , `dayOfMonth`], + }); }; /** * serializeAws_restJson1RevealConfiguration */ const se_RevealConfiguration = (input: RevealConfiguration, context: __SerdeContext): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.status != null && { status: input.status }), - }; + return take(input, { + kmsKeyId: [, , `kmsKeyId`], + status: [, , `status`], + }); }; /** * serializeAws_restJson1S3BucketCriteriaForJob */ const se_S3BucketCriteriaForJob = (input: S3BucketCriteriaForJob, context: __SerdeContext): any => { - return { - ...(input.excludes != null && { excludes: se_CriteriaBlockForJob(input.excludes, context) }), - ...(input.includes != null && { includes: se_CriteriaBlockForJob(input.includes, context) }), - }; + return take(input, { + excludes: [, (_) => se_CriteriaBlockForJob(_, context), `excludes`], + includes: [, (_) => se_CriteriaBlockForJob(_, context), `includes`], + }); }; /** * serializeAws_restJson1S3BucketDefinitionForJob */ const se_S3BucketDefinitionForJob = (input: S3BucketDefinitionForJob, context: __SerdeContext): any => { - return { - ...(input.accountId != null && { accountId: input.accountId }), - ...(input.buckets != null && { buckets: se___listOf__string(input.buckets, context) }), - }; + return take(input, { + accountId: [, , `accountId`], + buckets: [, _json, `buckets`], + }); }; /** @@ -8320,147 +8114,141 @@ const se_S3ClassificationScopeExclusionUpdate = ( input: S3ClassificationScopeExclusionUpdate, context: __SerdeContext ): any => { - return { - ...(input.bucketNames != null && { bucketNames: se___listOfS3BucketName(input.bucketNames, context) }), - ...(input.operation != null && { operation: input.operation }), - }; + return take(input, { + bucketNames: [, _json, `bucketNames`], + operation: [, , `operation`], + }); }; /** * serializeAws_restJson1S3ClassificationScopeUpdate */ const se_S3ClassificationScopeUpdate = (input: S3ClassificationScopeUpdate, context: __SerdeContext): any => { - return { - ...(input.excludes != null && { excludes: se_S3ClassificationScopeExclusionUpdate(input.excludes, context) }), - }; + return take(input, { + excludes: [, (_) => se_S3ClassificationScopeExclusionUpdate(_, context), `excludes`], + }); }; /** * serializeAws_restJson1S3Destination */ const se_S3Destination = (input: S3Destination, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.keyPrefix != null && { keyPrefix: input.keyPrefix }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - }; + return take(input, { + bucketName: [, , `bucketName`], + keyPrefix: [, , `keyPrefix`], + kmsKeyArn: [, , `kmsKeyArn`], + }); }; /** * serializeAws_restJson1S3JobDefinition */ const se_S3JobDefinition = (input: S3JobDefinition, context: __SerdeContext): any => { - return { - ...(input.bucketCriteria != null && { bucketCriteria: se_S3BucketCriteriaForJob(input.bucketCriteria, context) }), - ...(input.bucketDefinitions != null && { - bucketDefinitions: se___listOfS3BucketDefinitionForJob(input.bucketDefinitions, context), - }), - ...(input.scoping != null && { scoping: se_Scoping(input.scoping, context) }), - }; + return take(input, { + bucketCriteria: [, (_) => se_S3BucketCriteriaForJob(_, context), `bucketCriteria`], + bucketDefinitions: [, (_) => se___listOfS3BucketDefinitionForJob(_, context), `bucketDefinitions`], + scoping: [, (_) => se_Scoping(_, context), `scoping`], + }); }; /** * serializeAws_restJson1S3WordsList */ const se_S3WordsList = (input: S3WordsList, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.objectKey != null && { objectKey: input.objectKey }), - }; + return take(input, { + bucketName: [, , `bucketName`], + objectKey: [, , `objectKey`], + }); }; /** * serializeAws_restJson1Scoping */ const se_Scoping = (input: Scoping, context: __SerdeContext): any => { - return { - ...(input.excludes != null && { excludes: se_JobScopingBlock(input.excludes, context) }), - ...(input.includes != null && { includes: se_JobScopingBlock(input.includes, context) }), - }; + return take(input, { + excludes: [, (_) => se_JobScopingBlock(_, context), `excludes`], + includes: [, (_) => se_JobScopingBlock(_, context), `includes`], + }); }; /** * serializeAws_restJson1SearchResourcesBucketCriteria */ const se_SearchResourcesBucketCriteria = (input: SearchResourcesBucketCriteria, context: __SerdeContext): any => { - return { - ...(input.excludes != null && { excludes: se_SearchResourcesCriteriaBlock(input.excludes, context) }), - ...(input.includes != null && { includes: se_SearchResourcesCriteriaBlock(input.includes, context) }), - }; + return take(input, { + excludes: [, (_) => se_SearchResourcesCriteriaBlock(_, context), `excludes`], + includes: [, (_) => se_SearchResourcesCriteriaBlock(_, context), `includes`], + }); }; /** * serializeAws_restJson1SearchResourcesCriteria */ const se_SearchResourcesCriteria = (input: SearchResourcesCriteria, context: __SerdeContext): any => { - return { - ...(input.simpleCriterion != null && { - simpleCriterion: se_SearchResourcesSimpleCriterion(input.simpleCriterion, context), - }), - ...(input.tagCriterion != null && { tagCriterion: se_SearchResourcesTagCriterion(input.tagCriterion, context) }), - }; + return take(input, { + simpleCriterion: [, (_) => se_SearchResourcesSimpleCriterion(_, context), `simpleCriterion`], + tagCriterion: [, (_) => se_SearchResourcesTagCriterion(_, context), `tagCriterion`], + }); }; /** * serializeAws_restJson1SearchResourcesCriteriaBlock */ const se_SearchResourcesCriteriaBlock = (input: SearchResourcesCriteriaBlock, context: __SerdeContext): any => { - return { - ...(input.and != null && { and: se___listOfSearchResourcesCriteria(input.and, context) }), - }; + return take(input, { + and: [, (_) => se___listOfSearchResourcesCriteria(_, context), `and`], + }); }; /** * serializeAws_restJson1SearchResourcesSimpleCriterion */ const se_SearchResourcesSimpleCriterion = (input: SearchResourcesSimpleCriterion, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se___listOf__string(input.values, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + key: [, , `key`], + values: [, _json, `values`], + }); }; /** * serializeAws_restJson1SearchResourcesSortCriteria */ const se_SearchResourcesSortCriteria = (input: SearchResourcesSortCriteria, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; + return take(input, { + attributeName: [, , `attributeName`], + orderBy: [, , `orderBy`], + }); }; /** * serializeAws_restJson1SearchResourcesTagCriterion */ const se_SearchResourcesTagCriterion = (input: SearchResourcesTagCriterion, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.tagValues != null && { tagValues: se___listOfSearchResourcesTagCriterionPair(input.tagValues, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + tagValues: [, (_) => se___listOfSearchResourcesTagCriterionPair(_, context), `tagValues`], + }); }; /** * serializeAws_restJson1SearchResourcesTagCriterionPair */ const se_SearchResourcesTagCriterionPair = (input: SearchResourcesTagCriterionPair, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; + return take(input, { + key: [, , `key`], + value: [, , `value`], + }); }; /** * serializeAws_restJson1SecurityHubConfiguration */ const se_SecurityHubConfiguration = (input: SecurityHubConfiguration, context: __SerdeContext): any => { - return { - ...(input.publishClassificationFindings != null && { - publishClassificationFindings: input.publishClassificationFindings, - }), - ...(input.publishPolicyFindings != null && { publishPolicyFindings: input.publishPolicyFindings }), - }; + return take(input, { + publishClassificationFindings: [, , `publishClassificationFindings`], + publishPolicyFindings: [, , `publishPolicyFindings`], + }); }; /** @@ -8470,11 +8258,9 @@ const se_SensitivityInspectionTemplateExcludes = ( input: SensitivityInspectionTemplateExcludes, context: __SerdeContext ): any => { - return { - ...(input.managedDataIdentifierIds != null && { - managedDataIdentifierIds: se___listOf__string(input.managedDataIdentifierIds, context), - }), - }; + return take(input, { + managedDataIdentifierIds: [, _json, `managedDataIdentifierIds`], + }); }; /** @@ -8484,25 +8270,21 @@ const se_SensitivityInspectionTemplateIncludes = ( input: SensitivityInspectionTemplateIncludes, context: __SerdeContext ): any => { - return { - ...(input.allowListIds != null && { allowListIds: se___listOf__string(input.allowListIds, context) }), - ...(input.customDataIdentifierIds != null && { - customDataIdentifierIds: se___listOf__string(input.customDataIdentifierIds, context), - }), - ...(input.managedDataIdentifierIds != null && { - managedDataIdentifierIds: se___listOf__string(input.managedDataIdentifierIds, context), - }), - }; + return take(input, { + allowListIds: [, _json, `allowListIds`], + customDataIdentifierIds: [, _json, `customDataIdentifierIds`], + managedDataIdentifierIds: [, _json, `managedDataIdentifierIds`], + }); }; /** * serializeAws_restJson1SeverityLevel */ const se_SeverityLevel = (input: SeverityLevel, context: __SerdeContext): any => { - return { - ...(input.occurrencesThreshold != null && { occurrencesThreshold: input.occurrencesThreshold }), - ...(input.severity != null && { severity: input.severity }), - }; + return take(input, { + occurrencesThreshold: [, , `occurrencesThreshold`], + severity: [, , `severity`], + }); }; /** @@ -8520,143 +8302,119 @@ const se_SeverityLevelList = (input: SeverityLevel[], context: __SerdeContext): * serializeAws_restJson1SimpleCriterionForJob */ const se_SimpleCriterionForJob = (input: SimpleCriterionForJob, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se___listOf__string(input.values, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + key: [, , `key`], + values: [, _json, `values`], + }); }; /** * serializeAws_restJson1SimpleScopeTerm */ const se_SimpleScopeTerm = (input: SimpleScopeTerm, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se___listOf__string(input.values, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + key: [, , `key`], + values: [, _json, `values`], + }); }; /** * serializeAws_restJson1SortCriteria */ const se_SortCriteria = (input: SortCriteria, context: __SerdeContext): any => { - return { - ...(input.attributeName != null && { attributeName: input.attributeName }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; + return take(input, { + attributeName: [, , `attributeName`], + orderBy: [, , `orderBy`], + }); }; /** * serializeAws_restJson1SuppressDataIdentifier */ const se_SuppressDataIdentifier = (input: SuppressDataIdentifier, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + id: [, , `id`], + type: [, , `type`], + }); }; /** * serializeAws_restJson1TagCriterionForJob */ const se_TagCriterionForJob = (input: TagCriterionForJob, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.tagValues != null && { tagValues: se___listOfTagCriterionPairForJob(input.tagValues, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + tagValues: [, (_) => se___listOfTagCriterionPairForJob(_, context), `tagValues`], + }); }; /** * serializeAws_restJson1TagCriterionPairForJob */ const se_TagCriterionPairForJob = (input: TagCriterionPairForJob, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; + return take(input, { + key: [, , `key`], + value: [, , `value`], + }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * serializeAws_restJson1TagScopeTerm */ const se_TagScopeTerm = (input: TagScopeTerm, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.key != null && { key: input.key }), - ...(input.tagValues != null && { tagValues: se___listOfTagValuePair(input.tagValues, context) }), - ...(input.target != null && { target: input.target }), - }; + return take(input, { + comparator: [, , `comparator`], + key: [, , `key`], + tagValues: [, (_) => se___listOfTagValuePair(_, context), `tagValues`], + target: [, , `target`], + }); }; /** * serializeAws_restJson1TagValuePair */ const se_TagValuePair = (input: TagValuePair, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; + return take(input, { + key: [, , `key`], + value: [, , `value`], + }); }; /** * serializeAws_restJson1UsageStatisticsFilter */ const se_UsageStatisticsFilter = (input: UsageStatisticsFilter, context: __SerdeContext): any => { - return { - ...(input.comparator != null && { comparator: input.comparator }), - ...(input.key != null && { key: input.key }), - ...(input.values != null && { values: se___listOf__string(input.values, context) }), - }; + return take(input, { + comparator: [, , `comparator`], + key: [, , `key`], + values: [, _json, `values`], + }); }; /** * serializeAws_restJson1UsageStatisticsSortBy */ const se_UsageStatisticsSortBy = (input: UsageStatisticsSortBy, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.orderBy != null && { orderBy: input.orderBy }), - }; + return take(input, { + key: [, , `key`], + orderBy: [, , `orderBy`], + }); }; /** * serializeAws_restJson1WeeklySchedule */ const se_WeeklySchedule = (input: WeeklySchedule, context: __SerdeContext): any => { - return { - ...(input.dayOfWeek != null && { dayOfWeek: input.dayOfWeek }), - }; + return take(input, { + dayOfWeek: [, , `dayOfWeek`], + }); }; -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfAdminAccount @@ -8665,9 +8423,6 @@ const de___listOfAdminAccount = (output: any, context: __SerdeContext): AdminAcc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AdminAccount(entry, context); }); return retVal; @@ -8680,9 +8435,6 @@ const de___listOfAllowListSummary = (output: any, context: __SerdeContext): Allo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AllowListSummary(entry, context); }); return retVal; @@ -8698,9 +8450,6 @@ const de___listOfBatchGetCustomDataIdentifierSummary = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchGetCustomDataIdentifierSummary(entry, context); }); return retVal; @@ -8713,9 +8462,6 @@ const de___listOfBucketMetadata = (output: any, context: __SerdeContext): Bucket const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BucketMetadata(entry, context); }); return retVal; @@ -8728,9 +8474,6 @@ const de___listOfClassificationScopeSummary = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ClassificationScopeSummary(entry, context); }); return retVal; @@ -8743,9 +8486,6 @@ const de___listOfCriteriaForJob = (output: any, context: __SerdeContext): Criter const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CriteriaForJob(entry, context); }); return retVal; @@ -8761,9 +8501,6 @@ const de___listOfCustomDataIdentifierSummary = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CustomDataIdentifierSummary(entry, context); }); return retVal; @@ -8776,9 +8513,6 @@ const de___listOfDetectedDataDetails = (output: any, context: __SerdeContext): D const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DetectedDataDetails(entry, context); }); return retVal; @@ -8791,9 +8525,6 @@ const de___listOfDetection = (output: any, context: __SerdeContext): Detection[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Detection(entry, context); }); return retVal; @@ -8806,9 +8537,6 @@ const de___listOfFinding = (output: any, context: __SerdeContext): Finding[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Finding(entry, context); }); return retVal; @@ -8821,9 +8549,6 @@ const de___listOfFindingsFilterListItem = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FindingsFilterListItem(entry, context); }); return retVal; @@ -8836,9 +8561,6 @@ const de___listOfGroupCount = (output: any, context: __SerdeContext): GroupCount const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GroupCount(entry, context); }); return retVal; @@ -8851,9 +8573,6 @@ const de___listOfInvitation = (output: any, context: __SerdeContext): Invitation const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Invitation(entry, context); }); return retVal; @@ -8866,9 +8585,6 @@ const de___listOfJobScopeTerm = (output: any, context: __SerdeContext): JobScope const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobScopeTerm(entry, context); }); return retVal; @@ -8881,9 +8597,6 @@ const de___listOfJobSummary = (output: any, context: __SerdeContext): JobSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobSummary(entry, context); }); return retVal; @@ -8896,9 +8609,6 @@ const de___listOfKeyValuePair = (output: any, context: __SerdeContext): KeyValue const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_KeyValuePair(entry, context); }); return retVal; @@ -8914,9 +8624,6 @@ const de___listOfManagedDataIdentifierSummary = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ManagedDataIdentifierSummary(entry, context); }); return retVal; @@ -8929,9 +8636,6 @@ const de___listOfMatchingResource = (output: any, context: __SerdeContext): Matc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MatchingResource(entry, context); }); return retVal; @@ -8944,9 +8648,6 @@ const de___listOfMember = (output: any, context: __SerdeContext): Member[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Member(entry, context); }); return retVal; @@ -8959,9 +8660,6 @@ const de___listOfResourceProfileArtifact = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceProfileArtifact(entry, context); }); return retVal; @@ -8974,28 +8672,12 @@ const de___listOfS3BucketDefinitionForJob = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_S3BucketDefinitionForJob(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfS3BucketName - */ -const de___listOfS3BucketName = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfS3BucketName omitted. /** * deserializeAws_restJson1__listOfSensitivityInspectionTemplatesEntry @@ -9007,9 +8689,6 @@ const de___listOfSensitivityInspectionTemplatesEntry = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SensitivityInspectionTemplatesEntry(entry, context); }); return retVal; @@ -9022,9 +8701,6 @@ const de___listOfTagCriterionPairForJob = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TagCriterionPairForJob(entry, context); }); return retVal; @@ -9037,31 +8713,12 @@ const de___listOfTagValuePair = (output: any, context: __SerdeContext): TagValue const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TagValuePair(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfUnavailabilityReasonCode - */ -const de___listOfUnavailabilityReasonCode = ( - output: any, - context: __SerdeContext -): (UnavailabilityReasonCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfUnavailabilityReasonCode omitted. /** * deserializeAws_restJson1__listOfUnprocessedAccount @@ -9070,9 +8727,6 @@ const de___listOfUnprocessedAccount = (output: any, context: __SerdeContext): Un const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UnprocessedAccount(entry, context); }); return retVal; @@ -9085,9 +8739,6 @@ const de___listOfUsageByAccount = (output: any, context: __SerdeContext): UsageB const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageByAccount(entry, context); }); return retVal; @@ -9100,9 +8751,6 @@ const de___listOfUsageRecord = (output: any, context: __SerdeContext): UsageReco const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageRecord(entry, context); }); return retVal; @@ -9115,9 +8763,6 @@ const de___listOfUsageTotal = (output: any, context: __SerdeContext): UsageTotal const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageTotal(entry, context); }); return retVal; @@ -9127,111 +8772,107 @@ const de___listOfUsageTotal = (output: any, context: __SerdeContext): UsageTotal * deserializeAws_restJson1AccessControlList */ const de_AccessControlList = (output: any, context: __SerdeContext): AccessControlList => { - return { - allowsPublicReadAccess: __expectBoolean(output.allowsPublicReadAccess), - allowsPublicWriteAccess: __expectBoolean(output.allowsPublicWriteAccess), - } as any; + return take(output, { + allowsPublicReadAccess: [, __expectBoolean, `allowsPublicReadAccess`], + allowsPublicWriteAccess: [, __expectBoolean, `allowsPublicWriteAccess`], + }) as any; }; /** * deserializeAws_restJson1AccountLevelPermissions */ const de_AccountLevelPermissions = (output: any, context: __SerdeContext): AccountLevelPermissions => { - return { - blockPublicAccess: - output.blockPublicAccess != null ? de_BlockPublicAccess(output.blockPublicAccess, context) : undefined, - } as any; + return take(output, { + blockPublicAccess: (_) => [, de_BlockPublicAccess(_, context), `blockPublicAccess`], + }) as any; }; /** * deserializeAws_restJson1AdminAccount */ const de_AdminAccount = (output: any, context: __SerdeContext): AdminAccount => { - return { - accountId: __expectString(output.accountId), - status: __expectString(output.status), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1AllowListCriteria */ const de_AllowListCriteria = (output: any, context: __SerdeContext): AllowListCriteria => { - return { - regex: __expectString(output.regex), - s3WordsList: output.s3WordsList != null ? de_S3WordsList(output.s3WordsList, context) : undefined, - } as any; + return take(output, { + regex: [, __expectString, `regex`], + s3WordsList: (_) => [, de_S3WordsList(_, context), `s3WordsList`], + }) as any; }; /** * deserializeAws_restJson1AllowListStatus */ const de_AllowListStatus = (output: any, context: __SerdeContext): AllowListStatus => { - return { - code: __expectString(output.code), - description: __expectString(output.description), - } as any; + return take(output, { + code: [, __expectString, `code`], + description: [, __expectString, `description`], + }) as any; }; /** * deserializeAws_restJson1AllowListSummary */ const de_AllowListSummary = (output: any, context: __SerdeContext): AllowListSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + arn: [, __expectString, `arn`], + createdAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + description: [, __expectString, `description`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + updatedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `updatedAt`], + }) as any; }; /** * deserializeAws_restJson1ApiCallDetails */ const de_ApiCallDetails = (output: any, context: __SerdeContext): ApiCallDetails => { - return { - api: __expectString(output.api), - apiServiceName: __expectString(output.apiServiceName), - firstSeen: - output.firstSeen != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.firstSeen)) : undefined, - lastSeen: output.lastSeen != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastSeen)) : undefined, - } as any; + return take(output, { + api: [, __expectString, `api`], + apiServiceName: [, __expectString, `apiServiceName`], + firstSeen: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `firstSeen`], + lastSeen: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastSeen`], + }) as any; }; /** * deserializeAws_restJson1AssumedRole */ const de_AssumedRole = (output: any, context: __SerdeContext): AssumedRole => { - return { - accessKeyId: __expectString(output.accessKeyId), - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - principalId: __expectString(output.principalId), - sessionContext: output.sessionContext != null ? de_SessionContext(output.sessionContext, context) : undefined, - } as any; + return take(output, { + accessKeyId: [, __expectString, `accessKeyId`], + accountId: [, __expectString, `accountId`], + arn: [, __expectString, `arn`], + principalId: [, __expectString, `principalId`], + sessionContext: (_) => [, de_SessionContext(_, context), `sessionContext`], + }) as any; }; /** * deserializeAws_restJson1AwsAccount */ const de_AwsAccount = (output: any, context: __SerdeContext): AwsAccount => { - return { - accountId: __expectString(output.accountId), - principalId: __expectString(output.principalId), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + principalId: [, __expectString, `principalId`], + }) as any; }; /** * deserializeAws_restJson1AwsService */ const de_AwsService = (output: any, context: __SerdeContext): AwsService => { - return { - invokedBy: __expectString(output.invokedBy), - } as any; + return take(output, { + invokedBy: [, __expectString, `invokedBy`], + }) as any; }; /** @@ -9241,27 +8882,26 @@ const de_BatchGetCustomDataIdentifierSummary = ( output: any, context: __SerdeContext ): BatchGetCustomDataIdentifierSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - deleted: __expectBoolean(output.deleted), - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; + return take(output, { + arn: [, __expectString, `arn`], + createdAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + deleted: [, __expectBoolean, `deleted`], + description: [, __expectString, `description`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1BlockPublicAccess */ const de_BlockPublicAccess = (output: any, context: __SerdeContext): BlockPublicAccess => { - return { - blockPublicAcls: __expectBoolean(output.blockPublicAcls), - blockPublicPolicy: __expectBoolean(output.blockPublicPolicy), - ignorePublicAcls: __expectBoolean(output.ignorePublicAcls), - restrictPublicBuckets: __expectBoolean(output.restrictPublicBuckets), - } as any; + return take(output, { + blockPublicAcls: [, __expectBoolean, `blockPublicAcls`], + blockPublicPolicy: [, __expectBoolean, `blockPublicPolicy`], + ignorePublicAcls: [, __expectBoolean, `ignorePublicAcls`], + restrictPublicBuckets: [, __expectBoolean, `restrictPublicBuckets`], + }) as any; }; /** @@ -9271,36 +8911,36 @@ const de_BucketCountByEffectivePermission = ( output: any, context: __SerdeContext ): BucketCountByEffectivePermission => { - return { - publiclyAccessible: __expectLong(output.publiclyAccessible), - publiclyReadable: __expectLong(output.publiclyReadable), - publiclyWritable: __expectLong(output.publiclyWritable), - unknown: __expectLong(output.unknown), - } as any; + return take(output, { + publiclyAccessible: [, __expectLong, `publiclyAccessible`], + publiclyReadable: [, __expectLong, `publiclyReadable`], + publiclyWritable: [, __expectLong, `publiclyWritable`], + unknown: [, __expectLong, `unknown`], + }) as any; }; /** * deserializeAws_restJson1BucketCountByEncryptionType */ const de_BucketCountByEncryptionType = (output: any, context: __SerdeContext): BucketCountByEncryptionType => { - return { - kmsManaged: __expectLong(output.kmsManaged), - s3Managed: __expectLong(output.s3Managed), - unencrypted: __expectLong(output.unencrypted), - unknown: __expectLong(output.unknown), - } as any; + return take(output, { + kmsManaged: [, __expectLong, `kmsManaged`], + s3Managed: [, __expectLong, `s3Managed`], + unencrypted: [, __expectLong, `unencrypted`], + unknown: [, __expectLong, `unknown`], + }) as any; }; /** * deserializeAws_restJson1BucketCountBySharedAccessType */ const de_BucketCountBySharedAccessType = (output: any, context: __SerdeContext): BucketCountBySharedAccessType => { - return { - external: __expectLong(output.external), - internal: __expectLong(output.internal), - notShared: __expectLong(output.notShared), - unknown: __expectLong(output.unknown), - } as any; + return take(output, { + external: [, __expectLong, `external`], + internal: [, __expectLong, `internal`], + notShared: [, __expectLong, `notShared`], + unknown: [, __expectLong, `unknown`], + }) as any; }; /** @@ -9310,152 +8950,124 @@ const de_BucketCountPolicyAllowsUnencryptedObjectUploads = ( output: any, context: __SerdeContext ): BucketCountPolicyAllowsUnencryptedObjectUploads => { - return { - allowsUnencryptedObjectUploads: __expectLong(output.allowsUnencryptedObjectUploads), - deniesUnencryptedObjectUploads: __expectLong(output.deniesUnencryptedObjectUploads), - unknown: __expectLong(output.unknown), - } as any; + return take(output, { + allowsUnencryptedObjectUploads: [, __expectLong, `allowsUnencryptedObjectUploads`], + deniesUnencryptedObjectUploads: [, __expectLong, `deniesUnencryptedObjectUploads`], + unknown: [, __expectLong, `unknown`], + }) as any; }; /** * deserializeAws_restJson1BucketLevelPermissions */ const de_BucketLevelPermissions = (output: any, context: __SerdeContext): BucketLevelPermissions => { - return { - accessControlList: - output.accessControlList != null ? de_AccessControlList(output.accessControlList, context) : undefined, - blockPublicAccess: - output.blockPublicAccess != null ? de_BlockPublicAccess(output.blockPublicAccess, context) : undefined, - bucketPolicy: output.bucketPolicy != null ? de_BucketPolicy(output.bucketPolicy, context) : undefined, - } as any; + return take(output, { + accessControlList: (_) => [, de_AccessControlList(_, context), `accessControlList`], + blockPublicAccess: (_) => [, de_BlockPublicAccess(_, context), `blockPublicAccess`], + bucketPolicy: (_) => [, de_BucketPolicy(_, context), `bucketPolicy`], + }) as any; }; /** * deserializeAws_restJson1BucketMetadata */ const de_BucketMetadata = (output: any, context: __SerdeContext): BucketMetadata => { - return { - accountId: __expectString(output.accountId), - allowsUnencryptedObjectUploads: __expectString(output.allowsUnencryptedObjectUploads), - bucketArn: __expectString(output.bucketArn), - bucketCreatedAt: - output.bucketCreatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.bucketCreatedAt)) - : undefined, - bucketName: __expectString(output.bucketName), - classifiableObjectCount: __expectLong(output.classifiableObjectCount), - classifiableSizeInBytes: __expectLong(output.classifiableSizeInBytes), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - jobDetails: output.jobDetails != null ? de_JobDetails(output.jobDetails, context) : undefined, - lastAutomatedDiscoveryTime: - output.lastAutomatedDiscoveryTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastAutomatedDiscoveryTime)) - : undefined, - lastUpdated: - output.lastUpdated != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdated)) : undefined, - objectCount: __expectLong(output.objectCount), - objectCountByEncryptionType: - output.objectCountByEncryptionType != null - ? de_ObjectCountByEncryptionType(output.objectCountByEncryptionType, context) - : undefined, - publicAccess: output.publicAccess != null ? de_BucketPublicAccess(output.publicAccess, context) : undefined, - region: __expectString(output.region), - replicationDetails: - output.replicationDetails != null ? de_ReplicationDetails(output.replicationDetails, context) : undefined, - sensitivityScore: __expectInt32(output.sensitivityScore), - serverSideEncryption: - output.serverSideEncryption != null - ? de_BucketServerSideEncryption(output.serverSideEncryption, context) - : undefined, - sharedAccess: __expectString(output.sharedAccess), - sizeInBytes: __expectLong(output.sizeInBytes), - sizeInBytesCompressed: __expectLong(output.sizeInBytesCompressed), - tags: output.tags != null ? de___listOfKeyValuePair(output.tags, context) : undefined, - unclassifiableObjectCount: - output.unclassifiableObjectCount != null - ? de_ObjectLevelStatistics(output.unclassifiableObjectCount, context) - : undefined, - unclassifiableObjectSizeInBytes: - output.unclassifiableObjectSizeInBytes != null - ? de_ObjectLevelStatistics(output.unclassifiableObjectSizeInBytes, context) - : undefined, - versioning: __expectBoolean(output.versioning), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + allowsUnencryptedObjectUploads: [, __expectString, `allowsUnencryptedObjectUploads`], + bucketArn: [, __expectString, `bucketArn`], + bucketCreatedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `bucketCreatedAt`], + bucketName: [, __expectString, `bucketName`], + classifiableObjectCount: [, __expectLong, `classifiableObjectCount`], + classifiableSizeInBytes: [, __expectLong, `classifiableSizeInBytes`], + errorCode: [, __expectString, `errorCode`], + errorMessage: [, __expectString, `errorMessage`], + jobDetails: (_) => [, de_JobDetails(_, context), `jobDetails`], + lastAutomatedDiscoveryTime: (_) => [ + , + __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + `lastAutomatedDiscoveryTime`, + ], + lastUpdated: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastUpdated`], + objectCount: [, __expectLong, `objectCount`], + objectCountByEncryptionType: (_) => [, de_ObjectCountByEncryptionType(_, context), `objectCountByEncryptionType`], + publicAccess: (_) => [, de_BucketPublicAccess(_, context), `publicAccess`], + region: [, __expectString, `region`], + replicationDetails: (_) => [, de_ReplicationDetails(_, context), `replicationDetails`], + sensitivityScore: [, __expectInt32, `sensitivityScore`], + serverSideEncryption: (_) => [, de_BucketServerSideEncryption(_, context), `serverSideEncryption`], + sharedAccess: [, __expectString, `sharedAccess`], + sizeInBytes: [, __expectLong, `sizeInBytes`], + sizeInBytesCompressed: [, __expectLong, `sizeInBytesCompressed`], + tags: (_) => [, de___listOfKeyValuePair(_, context), `tags`], + unclassifiableObjectCount: (_) => [, de_ObjectLevelStatistics(_, context), `unclassifiableObjectCount`], + unclassifiableObjectSizeInBytes: (_) => [, de_ObjectLevelStatistics(_, context), `unclassifiableObjectSizeInBytes`], + versioning: [, __expectBoolean, `versioning`], + }) as any; }; /** * deserializeAws_restJson1BucketPermissionConfiguration */ const de_BucketPermissionConfiguration = (output: any, context: __SerdeContext): BucketPermissionConfiguration => { - return { - accountLevelPermissions: - output.accountLevelPermissions != null - ? de_AccountLevelPermissions(output.accountLevelPermissions, context) - : undefined, - bucketLevelPermissions: - output.bucketLevelPermissions != null - ? de_BucketLevelPermissions(output.bucketLevelPermissions, context) - : undefined, - } as any; + return take(output, { + accountLevelPermissions: (_) => [, de_AccountLevelPermissions(_, context), `accountLevelPermissions`], + bucketLevelPermissions: (_) => [, de_BucketLevelPermissions(_, context), `bucketLevelPermissions`], + }) as any; }; /** * deserializeAws_restJson1BucketPolicy */ const de_BucketPolicy = (output: any, context: __SerdeContext): BucketPolicy => { - return { - allowsPublicReadAccess: __expectBoolean(output.allowsPublicReadAccess), - allowsPublicWriteAccess: __expectBoolean(output.allowsPublicWriteAccess), - } as any; + return take(output, { + allowsPublicReadAccess: [, __expectBoolean, `allowsPublicReadAccess`], + allowsPublicWriteAccess: [, __expectBoolean, `allowsPublicWriteAccess`], + }) as any; }; /** * deserializeAws_restJson1BucketPublicAccess */ const de_BucketPublicAccess = (output: any, context: __SerdeContext): BucketPublicAccess => { - return { - effectivePermission: __expectString(output.effectivePermission), - permissionConfiguration: - output.permissionConfiguration != null - ? de_BucketPermissionConfiguration(output.permissionConfiguration, context) - : undefined, - } as any; + return take(output, { + effectivePermission: [, __expectString, `effectivePermission`], + permissionConfiguration: (_) => [, de_BucketPermissionConfiguration(_, context), `permissionConfiguration`], + }) as any; }; /** * deserializeAws_restJson1BucketServerSideEncryption */ const de_BucketServerSideEncryption = (output: any, context: __SerdeContext): BucketServerSideEncryption => { - return { - kmsMasterKeyId: __expectString(output.kmsMasterKeyId), - type: __expectString(output.type), - } as any; + return take(output, { + kmsMasterKeyId: [, __expectString, `kmsMasterKeyId`], + type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1BucketStatisticsBySensitivity */ const de_BucketStatisticsBySensitivity = (output: any, context: __SerdeContext): BucketStatisticsBySensitivity => { - return { - classificationError: - output.classificationError != null ? de_SensitivityAggregations(output.classificationError, context) : undefined, - notClassified: output.notClassified != null ? de_SensitivityAggregations(output.notClassified, context) : undefined, - notSensitive: output.notSensitive != null ? de_SensitivityAggregations(output.notSensitive, context) : undefined, - sensitive: output.sensitive != null ? de_SensitivityAggregations(output.sensitive, context) : undefined, - } as any; + return take(output, { + classificationError: (_) => [, de_SensitivityAggregations(_, context), `classificationError`], + notClassified: (_) => [, de_SensitivityAggregations(_, context), `notClassified`], + notSensitive: (_) => [, de_SensitivityAggregations(_, context), `notSensitive`], + sensitive: (_) => [, de_SensitivityAggregations(_, context), `sensitive`], + }) as any; }; /** * deserializeAws_restJson1Cell */ const de_Cell = (output: any, context: __SerdeContext): Cell => { - return { - cellReference: __expectString(output.cellReference), - column: __expectLong(output.column), - columnName: __expectString(output.columnName), - row: __expectLong(output.row), - } as any; + return take(output, { + cellReference: [, __expectString, `cellReference`], + column: [, __expectLong, `column`], + columnName: [, __expectString, `columnName`], + row: [, __expectLong, `row`], + }) as any; }; /** @@ -9465,9 +9077,6 @@ const de_Cells = (output: any, context: __SerdeContext): Cell[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Cell(entry, context); }); return retVal; @@ -9477,13 +9086,13 @@ const de_Cells = (output: any, context: __SerdeContext): Cell[] => { * deserializeAws_restJson1ClassificationDetails */ const de_ClassificationDetails = (output: any, context: __SerdeContext): ClassificationDetails => { - return { - detailedResultsLocation: __expectString(output.detailedResultsLocation), - jobArn: __expectString(output.jobArn), - jobId: __expectString(output.jobId), - originType: __expectString(output.originType), - result: output.result != null ? de_ClassificationResult(output.result, context) : undefined, - } as any; + return take(output, { + detailedResultsLocation: [, __expectString, `detailedResultsLocation`], + jobArn: [, __expectString, `jobArn`], + jobId: [, __expectString, `jobId`], + originType: [, __expectString, `originType`], + result: (_) => [, de_ClassificationResult(_, context), `result`], + }) as any; }; /** @@ -9493,66 +9102,62 @@ const de_ClassificationExportConfiguration = ( output: any, context: __SerdeContext ): ClassificationExportConfiguration => { - return { - s3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - } as any; + return take(output, { + s3Destination: (_) => [, de_S3Destination(_, context), `s3Destination`], + }) as any; }; /** * deserializeAws_restJson1ClassificationResult */ const de_ClassificationResult = (output: any, context: __SerdeContext): ClassificationResult => { - return { - additionalOccurrences: __expectBoolean(output.additionalOccurrences), - customDataIdentifiers: - output.customDataIdentifiers != null - ? de_CustomDataIdentifiers(output.customDataIdentifiers, context) - : undefined, - mimeType: __expectString(output.mimeType), - sensitiveData: output.sensitiveData != null ? de_SensitiveData(output.sensitiveData, context) : undefined, - sizeClassified: __expectLong(output.sizeClassified), - status: output.status != null ? de_ClassificationResultStatus(output.status, context) : undefined, - } as any; + return take(output, { + additionalOccurrences: [, __expectBoolean, `additionalOccurrences`], + customDataIdentifiers: (_) => [, de_CustomDataIdentifiers(_, context), `customDataIdentifiers`], + mimeType: [, __expectString, `mimeType`], + sensitiveData: (_) => [, de_SensitiveData(_, context), `sensitiveData`], + sizeClassified: [, __expectLong, `sizeClassified`], + status: (_) => [, de_ClassificationResultStatus(_, context), `status`], + }) as any; }; /** * deserializeAws_restJson1ClassificationResultStatus */ const de_ClassificationResultStatus = (output: any, context: __SerdeContext): ClassificationResultStatus => { - return { - code: __expectString(output.code), - reason: __expectString(output.reason), - } as any; + return take(output, { + code: [, __expectString, `code`], + reason: [, __expectString, `reason`], + }) as any; }; /** * deserializeAws_restJson1ClassificationScopeSummary */ const de_ClassificationScopeSummary = (output: any, context: __SerdeContext): ClassificationScopeSummary => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - } as any; + return take(output, { + id: [, __expectString, `id`], + name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1CriteriaBlockForJob */ const de_CriteriaBlockForJob = (output: any, context: __SerdeContext): CriteriaBlockForJob => { - return { - and: output.and != null ? de___listOfCriteriaForJob(output.and, context) : undefined, - } as any; + return take(output, { + and: (_) => [, de___listOfCriteriaForJob(_, context), `and`], + }) as any; }; /** * deserializeAws_restJson1CriteriaForJob */ const de_CriteriaForJob = (output: any, context: __SerdeContext): CriteriaForJob => { - return { - simpleCriterion: - output.simpleCriterion != null ? de_SimpleCriterionForJob(output.simpleCriterion, context) : undefined, - tagCriterion: output.tagCriterion != null ? de_TagCriterionForJob(output.tagCriterion, context) : undefined, - } as any; + return take(output, { + simpleCriterion: (_) => [, de_SimpleCriterionForJob(_, context), `simpleCriterion`], + tagCriterion: (_) => [, de_TagCriterionForJob(_, context), `tagCriterion`], + }) as any; }; /** @@ -9575,51 +9180,50 @@ const de_Criterion = (output: any, context: __SerdeContext): Record { - return { - eq: output.eq != null ? de___listOf__string(output.eq, context) : undefined, - eqExactMatch: output.eqExactMatch != null ? de___listOf__string(output.eqExactMatch, context) : undefined, - gt: __expectLong(output.gt), - gte: __expectLong(output.gte), - lt: __expectLong(output.lt), - lte: __expectLong(output.lte), - neq: output.neq != null ? de___listOf__string(output.neq, context) : undefined, - } as any; + return take(output, { + eq: [, _json, `eq`], + eqExactMatch: [, _json, `eqExactMatch`], + gt: [, __expectLong, `gt`], + gte: [, __expectLong, `gte`], + lt: [, __expectLong, `lt`], + lte: [, __expectLong, `lte`], + neq: [, _json, `neq`], + }) as any; }; /** * deserializeAws_restJson1CustomDataIdentifiers */ const de_CustomDataIdentifiers = (output: any, context: __SerdeContext): CustomDataIdentifiers => { - return { - detections: output.detections != null ? de_CustomDetections(output.detections, context) : undefined, - totalCount: __expectLong(output.totalCount), - } as any; + return take(output, { + detections: (_) => [, de_CustomDetections(_, context), `detections`], + totalCount: [, __expectLong, `totalCount`], + }) as any; }; /** * deserializeAws_restJson1CustomDataIdentifierSummary */ const de_CustomDataIdentifierSummary = (output: any, context: __SerdeContext): CustomDataIdentifierSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; + return take(output, { + arn: [, __expectString, `arn`], + createdAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + description: [, __expectString, `description`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1CustomDetection */ const de_CustomDetection = (output: any, context: __SerdeContext): CustomDetection => { - return { - arn: __expectString(output.arn), - count: __expectLong(output.count), - name: __expectString(output.name), - occurrences: output.occurrences != null ? de_Occurrences(output.occurrences, context) : undefined, - } as any; + return take(output, { + arn: [, __expectString, `arn`], + count: [, __expectLong, `count`], + name: [, __expectString, `name`], + occurrences: (_) => [, de_Occurrences(_, context), `occurrences`], + }) as any; }; /** @@ -9629,30 +9233,22 @@ const de_CustomDetections = (output: any, context: __SerdeContext): CustomDetect const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CustomDetection(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DailySchedule - */ -const de_DailySchedule = (output: any, context: __SerdeContext): DailySchedule => { - return {} as any; -}; +// de_DailySchedule omitted. /** * deserializeAws_restJson1DefaultDetection */ const de_DefaultDetection = (output: any, context: __SerdeContext): DefaultDetection => { - return { - count: __expectLong(output.count), - occurrences: output.occurrences != null ? de_Occurrences(output.occurrences, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + count: [, __expectLong, `count`], + occurrences: (_) => [, de_Occurrences(_, context), `occurrences`], + type: [, __expectString, `type`], + }) as any; }; /** @@ -9662,9 +9258,6 @@ const de_DefaultDetections = (output: any, context: __SerdeContext): DefaultDete const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DefaultDetection(entry, context); }); return retVal; @@ -9674,289 +9267,271 @@ const de_DefaultDetections = (output: any, context: __SerdeContext): DefaultDete * deserializeAws_restJson1DetectedDataDetails */ const de_DetectedDataDetails = (output: any, context: __SerdeContext): DetectedDataDetails => { - return { - value: __expectString(output.value), - } as any; + return take(output, { + value: [, __expectString, `value`], + }) as any; }; /** * deserializeAws_restJson1Detection */ const de_Detection = (output: any, context: __SerdeContext): Detection => { - return { - arn: __expectString(output.arn), - count: __expectLong(output.count), - id: __expectString(output.id), - name: __expectString(output.name), - suppressed: __expectBoolean(output.suppressed), - type: __expectString(output.type), - } as any; + return take(output, { + arn: [, __expectString, `arn`], + count: [, __expectLong, `count`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + suppressed: [, __expectBoolean, `suppressed`], + type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1DomainDetails */ const de_DomainDetails = (output: any, context: __SerdeContext): DomainDetails => { - return { - domainName: __expectString(output.domainName), - } as any; + return take(output, { + domainName: [, __expectString, `domainName`], + }) as any; }; /** * deserializeAws_restJson1FederatedUser */ const de_FederatedUser = (output: any, context: __SerdeContext): FederatedUser => { - return { - accessKeyId: __expectString(output.accessKeyId), - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - principalId: __expectString(output.principalId), - sessionContext: output.sessionContext != null ? de_SessionContext(output.sessionContext, context) : undefined, - } as any; + return take(output, { + accessKeyId: [, __expectString, `accessKeyId`], + accountId: [, __expectString, `accountId`], + arn: [, __expectString, `arn`], + principalId: [, __expectString, `principalId`], + sessionContext: (_) => [, de_SessionContext(_, context), `sessionContext`], + }) as any; }; /** * deserializeAws_restJson1Finding */ const de_Finding = (output: any, context: __SerdeContext): Finding => { - return { - accountId: __expectString(output.accountId), - archived: __expectBoolean(output.archived), - category: __expectString(output.category), - classificationDetails: - output.classificationDetails != null - ? de_ClassificationDetails(output.classificationDetails, context) - : undefined, - count: __expectLong(output.count), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - partition: __expectString(output.partition), - policyDetails: output.policyDetails != null ? de_PolicyDetails(output.policyDetails, context) : undefined, - region: __expectString(output.region), - resourcesAffected: - output.resourcesAffected != null ? de_ResourcesAffected(output.resourcesAffected, context) : undefined, - sample: __expectBoolean(output.sample), - schemaVersion: __expectString(output.schemaVersion), - severity: output.severity != null ? de_Severity(output.severity, context) : undefined, - title: __expectString(output.title), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + archived: [, __expectBoolean, `archived`], + category: [, __expectString, `category`], + classificationDetails: (_) => [, de_ClassificationDetails(_, context), `classificationDetails`], + count: [, __expectLong, `count`], + createdAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + description: [, __expectString, `description`], + id: [, __expectString, `id`], + partition: [, __expectString, `partition`], + policyDetails: (_) => [, de_PolicyDetails(_, context), `policyDetails`], + region: [, __expectString, `region`], + resourcesAffected: (_) => [, de_ResourcesAffected(_, context), `resourcesAffected`], + sample: [, __expectBoolean, `sample`], + schemaVersion: [, __expectString, `schemaVersion`], + severity: (_) => [, de_Severity(_, context), `severity`], + title: [, __expectString, `title`], + type: [, __expectString, `type`], + updatedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `updatedAt`], + }) as any; }; /** * deserializeAws_restJson1FindingAction */ const de_FindingAction = (output: any, context: __SerdeContext): FindingAction => { - return { - actionType: __expectString(output.actionType), - apiCallDetails: output.apiCallDetails != null ? de_ApiCallDetails(output.apiCallDetails, context) : undefined, - } as any; + return take(output, { + actionType: [, __expectString, `actionType`], + apiCallDetails: (_) => [, de_ApiCallDetails(_, context), `apiCallDetails`], + }) as any; }; /** * deserializeAws_restJson1FindingActor */ const de_FindingActor = (output: any, context: __SerdeContext): FindingActor => { - return { - domainDetails: output.domainDetails != null ? de_DomainDetails(output.domainDetails, context) : undefined, - ipAddressDetails: - output.ipAddressDetails != null ? de_IpAddressDetails(output.ipAddressDetails, context) : undefined, - userIdentity: output.userIdentity != null ? de_UserIdentity(output.userIdentity, context) : undefined, - } as any; + return take(output, { + domainDetails: (_) => [, de_DomainDetails(_, context), `domainDetails`], + ipAddressDetails: (_) => [, de_IpAddressDetails(_, context), `ipAddressDetails`], + userIdentity: (_) => [, de_UserIdentity(_, context), `userIdentity`], + }) as any; }; /** * deserializeAws_restJson1FindingCriteria */ const de_FindingCriteria = (output: any, context: __SerdeContext): FindingCriteria => { - return { - criterion: output.criterion != null ? de_Criterion(output.criterion, context) : undefined, - } as any; + return take(output, { + criterion: (_) => [, de_Criterion(_, context), `criterion`], + }) as any; }; /** * deserializeAws_restJson1FindingsFilterListItem */ const de_FindingsFilterListItem = (output: any, context: __SerdeContext): FindingsFilterListItem => { - return { - action: __expectString(output.action), - arn: __expectString(output.arn), - id: __expectString(output.id), - name: __expectString(output.name), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + action: [, __expectString, `action`], + arn: [, __expectString, `arn`], + id: [, __expectString, `id`], + name: [, __expectString, `name`], + tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1GroupCount */ const de_GroupCount = (output: any, context: __SerdeContext): GroupCount => { - return { - count: __expectLong(output.count), - groupKey: __expectString(output.groupKey), - } as any; + return take(output, { + count: [, __expectLong, `count`], + groupKey: [, __expectString, `groupKey`], + }) as any; }; /** * deserializeAws_restJson1IamUser */ const de_IamUser = (output: any, context: __SerdeContext): IamUser => { - return { - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - principalId: __expectString(output.principalId), - userName: __expectString(output.userName), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + arn: [, __expectString, `arn`], + principalId: [, __expectString, `principalId`], + userName: [, __expectString, `userName`], + }) as any; }; /** * deserializeAws_restJson1Invitation */ const de_Invitation = (output: any, context: __SerdeContext): Invitation => { - return { - accountId: __expectString(output.accountId), - invitationId: __expectString(output.invitationId), - invitedAt: - output.invitedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.invitedAt)) : undefined, - relationshipStatus: __expectString(output.relationshipStatus), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + invitationId: [, __expectString, `invitationId`], + invitedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `invitedAt`], + relationshipStatus: [, __expectString, `relationshipStatus`], + }) as any; }; /** * deserializeAws_restJson1IpAddressDetails */ const de_IpAddressDetails = (output: any, context: __SerdeContext): IpAddressDetails => { - return { - ipAddressV4: __expectString(output.ipAddressV4), - ipCity: output.ipCity != null ? de_IpCity(output.ipCity, context) : undefined, - ipCountry: output.ipCountry != null ? de_IpCountry(output.ipCountry, context) : undefined, - ipGeoLocation: output.ipGeoLocation != null ? de_IpGeoLocation(output.ipGeoLocation, context) : undefined, - ipOwner: output.ipOwner != null ? de_IpOwner(output.ipOwner, context) : undefined, - } as any; + return take(output, { + ipAddressV4: [, __expectString, `ipAddressV4`], + ipCity: (_) => [, de_IpCity(_, context), `ipCity`], + ipCountry: (_) => [, de_IpCountry(_, context), `ipCountry`], + ipGeoLocation: (_) => [, de_IpGeoLocation(_, context), `ipGeoLocation`], + ipOwner: (_) => [, de_IpOwner(_, context), `ipOwner`], + }) as any; }; /** * deserializeAws_restJson1IpCity */ const de_IpCity = (output: any, context: __SerdeContext): IpCity => { - return { - name: __expectString(output.name), - } as any; + return take(output, { + name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1IpCountry */ const de_IpCountry = (output: any, context: __SerdeContext): IpCountry => { - return { - code: __expectString(output.code), - name: __expectString(output.name), - } as any; + return take(output, { + code: [, __expectString, `code`], + name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1IpGeoLocation */ const de_IpGeoLocation = (output: any, context: __SerdeContext): IpGeoLocation => { - return { - lat: __limitedParseDouble(output.lat), - lon: __limitedParseDouble(output.lon), - } as any; + return take(output, { + lat: [, __limitedParseDouble, `lat`], + lon: [, __limitedParseDouble, `lon`], + }) as any; }; /** * deserializeAws_restJson1IpOwner */ const de_IpOwner = (output: any, context: __SerdeContext): IpOwner => { - return { - asn: __expectString(output.asn), - asnOrg: __expectString(output.asnOrg), - isp: __expectString(output.isp), - org: __expectString(output.org), - } as any; + return take(output, { + asn: [, __expectString, `asn`], + asnOrg: [, __expectString, `asnOrg`], + isp: [, __expectString, `isp`], + org: [, __expectString, `org`], + }) as any; }; /** * deserializeAws_restJson1JobDetails */ const de_JobDetails = (output: any, context: __SerdeContext): JobDetails => { - return { - isDefinedInJob: __expectString(output.isDefinedInJob), - isMonitoredByJob: __expectString(output.isMonitoredByJob), - lastJobId: __expectString(output.lastJobId), - lastJobRunTime: - output.lastJobRunTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastJobRunTime)) - : undefined, - } as any; + return take(output, { + isDefinedInJob: [, __expectString, `isDefinedInJob`], + isMonitoredByJob: [, __expectString, `isMonitoredByJob`], + lastJobId: [, __expectString, `lastJobId`], + lastJobRunTime: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastJobRunTime`], + }) as any; }; /** * deserializeAws_restJson1JobScheduleFrequency */ const de_JobScheduleFrequency = (output: any, context: __SerdeContext): JobScheduleFrequency => { - return { - dailySchedule: output.dailySchedule != null ? de_DailySchedule(output.dailySchedule, context) : undefined, - monthlySchedule: output.monthlySchedule != null ? de_MonthlySchedule(output.monthlySchedule, context) : undefined, - weeklySchedule: output.weeklySchedule != null ? de_WeeklySchedule(output.weeklySchedule, context) : undefined, - } as any; + return take(output, { + dailySchedule: [, _json, `dailySchedule`], + monthlySchedule: (_) => [, de_MonthlySchedule(_, context), `monthlySchedule`], + weeklySchedule: (_) => [, de_WeeklySchedule(_, context), `weeklySchedule`], + }) as any; }; /** * deserializeAws_restJson1JobScopeTerm */ const de_JobScopeTerm = (output: any, context: __SerdeContext): JobScopeTerm => { - return { - simpleScopeTerm: output.simpleScopeTerm != null ? de_SimpleScopeTerm(output.simpleScopeTerm, context) : undefined, - tagScopeTerm: output.tagScopeTerm != null ? de_TagScopeTerm(output.tagScopeTerm, context) : undefined, - } as any; + return take(output, { + simpleScopeTerm: (_) => [, de_SimpleScopeTerm(_, context), `simpleScopeTerm`], + tagScopeTerm: (_) => [, de_TagScopeTerm(_, context), `tagScopeTerm`], + }) as any; }; /** * deserializeAws_restJson1JobScopingBlock */ const de_JobScopingBlock = (output: any, context: __SerdeContext): JobScopingBlock => { - return { - and: output.and != null ? de___listOfJobScopeTerm(output.and, context) : undefined, - } as any; + return take(output, { + and: (_) => [, de___listOfJobScopeTerm(_, context), `and`], + }) as any; }; /** * deserializeAws_restJson1JobSummary */ const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => { - return { - bucketCriteria: - output.bucketCriteria != null ? de_S3BucketCriteriaForJob(output.bucketCriteria, context) : undefined, - bucketDefinitions: - output.bucketDefinitions != null - ? de___listOfS3BucketDefinitionForJob(output.bucketDefinitions, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - jobId: __expectString(output.jobId), - jobStatus: __expectString(output.jobStatus), - jobType: __expectString(output.jobType), - lastRunErrorStatus: - output.lastRunErrorStatus != null ? de_LastRunErrorStatus(output.lastRunErrorStatus, context) : undefined, - name: __expectString(output.name), - userPausedDetails: - output.userPausedDetails != null ? de_UserPausedDetails(output.userPausedDetails, context) : undefined, - } as any; + return take(output, { + bucketCriteria: (_) => [, de_S3BucketCriteriaForJob(_, context), `bucketCriteria`], + bucketDefinitions: (_) => [, de___listOfS3BucketDefinitionForJob(_, context), `bucketDefinitions`], + createdAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + jobId: [, __expectString, `jobId`], + jobStatus: [, __expectString, `jobStatus`], + jobType: [, __expectString, `jobType`], + lastRunErrorStatus: (_) => [, de_LastRunErrorStatus(_, context), `lastRunErrorStatus`], + name: [, __expectString, `name`], + userPausedDetails: (_) => [, de_UserPausedDetails(_, context), `userPausedDetails`], + }) as any; }; /** * deserializeAws_restJson1KeyValuePair */ const de_KeyValuePair = (output: any, context: __SerdeContext): KeyValuePair => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; + return take(output, { + key: [, __expectString, `key`], + value: [, __expectString, `value`], + }) as any; }; /** @@ -9966,9 +9541,6 @@ const de_KeyValuePairList = (output: any, context: __SerdeContext): KeyValuePair const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_KeyValuePair(entry, context); }); return retVal; @@ -9978,139 +9550,129 @@ const de_KeyValuePairList = (output: any, context: __SerdeContext): KeyValuePair * deserializeAws_restJson1LastRunErrorStatus */ const de_LastRunErrorStatus = (output: any, context: __SerdeContext): LastRunErrorStatus => { - return { - code: __expectString(output.code), - } as any; + return take(output, { + code: [, __expectString, `code`], + }) as any; }; /** * deserializeAws_restJson1ManagedDataIdentifierSummary */ const de_ManagedDataIdentifierSummary = (output: any, context: __SerdeContext): ManagedDataIdentifierSummary => { - return { - category: __expectString(output.category), - id: __expectString(output.id), - } as any; + return take(output, { + category: [, __expectString, `category`], + id: [, __expectString, `id`], + }) as any; }; /** * deserializeAws_restJson1MatchingBucket */ const de_MatchingBucket = (output: any, context: __SerdeContext): MatchingBucket => { - return { - accountId: __expectString(output.accountId), - bucketName: __expectString(output.bucketName), - classifiableObjectCount: __expectLong(output.classifiableObjectCount), - classifiableSizeInBytes: __expectLong(output.classifiableSizeInBytes), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - jobDetails: output.jobDetails != null ? de_JobDetails(output.jobDetails, context) : undefined, - lastAutomatedDiscoveryTime: - output.lastAutomatedDiscoveryTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastAutomatedDiscoveryTime)) - : undefined, - objectCount: __expectLong(output.objectCount), - objectCountByEncryptionType: - output.objectCountByEncryptionType != null - ? de_ObjectCountByEncryptionType(output.objectCountByEncryptionType, context) - : undefined, - sensitivityScore: __expectInt32(output.sensitivityScore), - sizeInBytes: __expectLong(output.sizeInBytes), - sizeInBytesCompressed: __expectLong(output.sizeInBytesCompressed), - unclassifiableObjectCount: - output.unclassifiableObjectCount != null - ? de_ObjectLevelStatistics(output.unclassifiableObjectCount, context) - : undefined, - unclassifiableObjectSizeInBytes: - output.unclassifiableObjectSizeInBytes != null - ? de_ObjectLevelStatistics(output.unclassifiableObjectSizeInBytes, context) - : undefined, - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + bucketName: [, __expectString, `bucketName`], + classifiableObjectCount: [, __expectLong, `classifiableObjectCount`], + classifiableSizeInBytes: [, __expectLong, `classifiableSizeInBytes`], + errorCode: [, __expectString, `errorCode`], + errorMessage: [, __expectString, `errorMessage`], + jobDetails: (_) => [, de_JobDetails(_, context), `jobDetails`], + lastAutomatedDiscoveryTime: (_) => [ + , + __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + `lastAutomatedDiscoveryTime`, + ], + objectCount: [, __expectLong, `objectCount`], + objectCountByEncryptionType: (_) => [, de_ObjectCountByEncryptionType(_, context), `objectCountByEncryptionType`], + sensitivityScore: [, __expectInt32, `sensitivityScore`], + sizeInBytes: [, __expectLong, `sizeInBytes`], + sizeInBytesCompressed: [, __expectLong, `sizeInBytesCompressed`], + unclassifiableObjectCount: (_) => [, de_ObjectLevelStatistics(_, context), `unclassifiableObjectCount`], + unclassifiableObjectSizeInBytes: (_) => [, de_ObjectLevelStatistics(_, context), `unclassifiableObjectSizeInBytes`], + }) as any; }; /** * deserializeAws_restJson1MatchingResource */ const de_MatchingResource = (output: any, context: __SerdeContext): MatchingResource => { - return { - matchingBucket: output.matchingBucket != null ? de_MatchingBucket(output.matchingBucket, context) : undefined, - } as any; + return take(output, { + matchingBucket: (_) => [, de_MatchingBucket(_, context), `matchingBucket`], + }) as any; }; /** * deserializeAws_restJson1Member */ const de_Member = (output: any, context: __SerdeContext): Member => { - return { - accountId: __expectString(output.accountId), - administratorAccountId: __expectString(output.administratorAccountId), - arn: __expectString(output.arn), - email: __expectString(output.email), - invitedAt: - output.invitedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.invitedAt)) : undefined, - masterAccountId: __expectString(output.masterAccountId), - relationshipStatus: __expectString(output.relationshipStatus), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + administratorAccountId: [, __expectString, `administratorAccountId`], + arn: [, __expectString, `arn`], + email: [, __expectString, `email`], + invitedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `invitedAt`], + masterAccountId: [, __expectString, `masterAccountId`], + relationshipStatus: [, __expectString, `relationshipStatus`], + tags: [, _json, `tags`], + updatedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `updatedAt`], + }) as any; }; /** * deserializeAws_restJson1MonthlySchedule */ const de_MonthlySchedule = (output: any, context: __SerdeContext): MonthlySchedule => { - return { - dayOfMonth: __expectInt32(output.dayOfMonth), - } as any; + return take(output, { + dayOfMonth: [, __expectInt32, `dayOfMonth`], + }) as any; }; /** * deserializeAws_restJson1ObjectCountByEncryptionType */ const de_ObjectCountByEncryptionType = (output: any, context: __SerdeContext): ObjectCountByEncryptionType => { - return { - customerManaged: __expectLong(output.customerManaged), - kmsManaged: __expectLong(output.kmsManaged), - s3Managed: __expectLong(output.s3Managed), - unencrypted: __expectLong(output.unencrypted), - unknown: __expectLong(output.unknown), - } as any; + return take(output, { + customerManaged: [, __expectLong, `customerManaged`], + kmsManaged: [, __expectLong, `kmsManaged`], + s3Managed: [, __expectLong, `s3Managed`], + unencrypted: [, __expectLong, `unencrypted`], + unknown: [, __expectLong, `unknown`], + }) as any; }; /** * deserializeAws_restJson1ObjectLevelStatistics */ const de_ObjectLevelStatistics = (output: any, context: __SerdeContext): ObjectLevelStatistics => { - return { - fileType: __expectLong(output.fileType), - storageClass: __expectLong(output.storageClass), - total: __expectLong(output.total), - } as any; + return take(output, { + fileType: [, __expectLong, `fileType`], + storageClass: [, __expectLong, `storageClass`], + total: [, __expectLong, `total`], + }) as any; }; /** * deserializeAws_restJson1Occurrences */ const de_Occurrences = (output: any, context: __SerdeContext): Occurrences => { - return { - cells: output.cells != null ? de_Cells(output.cells, context) : undefined, - lineRanges: output.lineRanges != null ? de_Ranges(output.lineRanges, context) : undefined, - offsetRanges: output.offsetRanges != null ? de_Ranges(output.offsetRanges, context) : undefined, - pages: output.pages != null ? de_Pages(output.pages, context) : undefined, - records: output.records != null ? de_Records(output.records, context) : undefined, - } as any; + return take(output, { + cells: (_) => [, de_Cells(_, context), `cells`], + lineRanges: (_) => [, de_Ranges(_, context), `lineRanges`], + offsetRanges: (_) => [, de_Ranges(_, context), `offsetRanges`], + pages: (_) => [, de_Pages(_, context), `pages`], + records: (_) => [, de_Records(_, context), `records`], + }) as any; }; /** * deserializeAws_restJson1Page */ const de_Page = (output: any, context: __SerdeContext): Page => { - return { - lineRange: output.lineRange != null ? de_Range(output.lineRange, context) : undefined, - offsetRange: output.offsetRange != null ? de_Range(output.offsetRange, context) : undefined, - pageNumber: __expectLong(output.pageNumber), - } as any; + return take(output, { + lineRange: (_) => [, de_Range(_, context), `lineRange`], + offsetRange: (_) => [, de_Range(_, context), `offsetRange`], + pageNumber: [, __expectLong, `pageNumber`], + }) as any; }; /** @@ -10120,9 +9682,6 @@ const de_Pages = (output: any, context: __SerdeContext): Page[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Page(entry, context); }); return retVal; @@ -10132,21 +9691,21 @@ const de_Pages = (output: any, context: __SerdeContext): Page[] => { * deserializeAws_restJson1PolicyDetails */ const de_PolicyDetails = (output: any, context: __SerdeContext): PolicyDetails => { - return { - action: output.action != null ? de_FindingAction(output.action, context) : undefined, - actor: output.actor != null ? de_FindingActor(output.actor, context) : undefined, - } as any; + return take(output, { + action: (_) => [, de_FindingAction(_, context), `action`], + actor: (_) => [, de_FindingActor(_, context), `actor`], + }) as any; }; /** * deserializeAws_restJson1Range */ const de_Range = (output: any, context: __SerdeContext): Range => { - return { - end: __expectLong(output.end), - start: __expectLong(output.start), - startColumn: __expectLong(output.startColumn), - } as any; + return take(output, { + end: [, __expectLong, `end`], + start: [, __expectLong, `start`], + startColumn: [, __expectLong, `startColumn`], + }) as any; }; /** @@ -10156,9 +9715,6 @@ const de_Ranges = (output: any, context: __SerdeContext): Range[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Range(entry, context); }); return retVal; @@ -10168,10 +9724,10 @@ const de_Ranges = (output: any, context: __SerdeContext): Range[] => { * deserializeAws_restJson1_Record */ const de__Record = (output: any, context: __SerdeContext): _Record => { - return { - jsonPath: __expectString(output.jsonPath), - recordIndex: __expectLong(output.recordIndex), - } as any; + return take(output, { + jsonPath: [, __expectString, `jsonPath`], + recordIndex: [, __expectLong, `recordIndex`], + }) as any; }; /** @@ -10181,9 +9737,6 @@ const de_Records = (output: any, context: __SerdeContext): _Record[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de__Record(entry, context); }); return retVal; @@ -10193,206 +9746,195 @@ const de_Records = (output: any, context: __SerdeContext): _Record[] => { * deserializeAws_restJson1ReplicationDetails */ const de_ReplicationDetails = (output: any, context: __SerdeContext): ReplicationDetails => { - return { - replicated: __expectBoolean(output.replicated), - replicatedExternally: __expectBoolean(output.replicatedExternally), - replicationAccounts: - output.replicationAccounts != null ? de___listOf__string(output.replicationAccounts, context) : undefined, - } as any; + return take(output, { + replicated: [, __expectBoolean, `replicated`], + replicatedExternally: [, __expectBoolean, `replicatedExternally`], + replicationAccounts: [, _json, `replicationAccounts`], + }) as any; }; /** * deserializeAws_restJson1ResourceProfileArtifact */ const de_ResourceProfileArtifact = (output: any, context: __SerdeContext): ResourceProfileArtifact => { - return { - arn: __expectString(output.arn), - classificationResultStatus: __expectString(output.classificationResultStatus), - sensitive: __expectBoolean(output.sensitive), - } as any; + return take(output, { + arn: [, __expectString, `arn`], + classificationResultStatus: [, __expectString, `classificationResultStatus`], + sensitive: [, __expectBoolean, `sensitive`], + }) as any; }; /** * deserializeAws_restJson1ResourcesAffected */ const de_ResourcesAffected = (output: any, context: __SerdeContext): ResourcesAffected => { - return { - s3Bucket: output.s3Bucket != null ? de_S3Bucket(output.s3Bucket, context) : undefined, - s3Object: output.s3Object != null ? de_S3Object(output.s3Object, context) : undefined, - } as any; + return take(output, { + s3Bucket: (_) => [, de_S3Bucket(_, context), `s3Bucket`], + s3Object: (_) => [, de_S3Object(_, context), `s3Object`], + }) as any; }; /** * deserializeAws_restJson1ResourceStatistics */ const de_ResourceStatistics = (output: any, context: __SerdeContext): ResourceStatistics => { - return { - totalBytesClassified: __expectLong(output.totalBytesClassified), - totalDetections: __expectLong(output.totalDetections), - totalDetectionsSuppressed: __expectLong(output.totalDetectionsSuppressed), - totalItemsClassified: __expectLong(output.totalItemsClassified), - totalItemsSensitive: __expectLong(output.totalItemsSensitive), - totalItemsSkipped: __expectLong(output.totalItemsSkipped), - totalItemsSkippedInvalidEncryption: __expectLong(output.totalItemsSkippedInvalidEncryption), - totalItemsSkippedInvalidKms: __expectLong(output.totalItemsSkippedInvalidKms), - totalItemsSkippedPermissionDenied: __expectLong(output.totalItemsSkippedPermissionDenied), - } as any; + return take(output, { + totalBytesClassified: [, __expectLong, `totalBytesClassified`], + totalDetections: [, __expectLong, `totalDetections`], + totalDetectionsSuppressed: [, __expectLong, `totalDetectionsSuppressed`], + totalItemsClassified: [, __expectLong, `totalItemsClassified`], + totalItemsSensitive: [, __expectLong, `totalItemsSensitive`], + totalItemsSkipped: [, __expectLong, `totalItemsSkipped`], + totalItemsSkippedInvalidEncryption: [, __expectLong, `totalItemsSkippedInvalidEncryption`], + totalItemsSkippedInvalidKms: [, __expectLong, `totalItemsSkippedInvalidKms`], + totalItemsSkippedPermissionDenied: [, __expectLong, `totalItemsSkippedPermissionDenied`], + }) as any; }; /** * deserializeAws_restJson1RevealConfiguration */ const de_RevealConfiguration = (output: any, context: __SerdeContext): RevealConfiguration => { - return { - kmsKeyId: __expectString(output.kmsKeyId), - status: __expectString(output.status), - } as any; + return take(output, { + kmsKeyId: [, __expectString, `kmsKeyId`], + status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1S3Bucket */ const de_S3Bucket = (output: any, context: __SerdeContext): S3Bucket => { - return { - allowsUnencryptedObjectUploads: __expectString(output.allowsUnencryptedObjectUploads), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - defaultServerSideEncryption: - output.defaultServerSideEncryption != null - ? de_ServerSideEncryption(output.defaultServerSideEncryption, context) - : undefined, - name: __expectString(output.name), - owner: output.owner != null ? de_S3BucketOwner(output.owner, context) : undefined, - publicAccess: output.publicAccess != null ? de_BucketPublicAccess(output.publicAccess, context) : undefined, - tags: output.tags != null ? de_KeyValuePairList(output.tags, context) : undefined, - } as any; + return take(output, { + allowsUnencryptedObjectUploads: [, __expectString, `allowsUnencryptedObjectUploads`], + arn: [, __expectString, `arn`], + createdAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `createdAt`], + defaultServerSideEncryption: (_) => [, de_ServerSideEncryption(_, context), `defaultServerSideEncryption`], + name: [, __expectString, `name`], + owner: (_) => [, de_S3BucketOwner(_, context), `owner`], + publicAccess: (_) => [, de_BucketPublicAccess(_, context), `publicAccess`], + tags: (_) => [, de_KeyValuePairList(_, context), `tags`], + }) as any; }; /** * deserializeAws_restJson1S3BucketCriteriaForJob */ const de_S3BucketCriteriaForJob = (output: any, context: __SerdeContext): S3BucketCriteriaForJob => { - return { - excludes: output.excludes != null ? de_CriteriaBlockForJob(output.excludes, context) : undefined, - includes: output.includes != null ? de_CriteriaBlockForJob(output.includes, context) : undefined, - } as any; + return take(output, { + excludes: (_) => [, de_CriteriaBlockForJob(_, context), `excludes`], + includes: (_) => [, de_CriteriaBlockForJob(_, context), `includes`], + }) as any; }; /** * deserializeAws_restJson1S3BucketDefinitionForJob */ const de_S3BucketDefinitionForJob = (output: any, context: __SerdeContext): S3BucketDefinitionForJob => { - return { - accountId: __expectString(output.accountId), - buckets: output.buckets != null ? de___listOf__string(output.buckets, context) : undefined, - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + buckets: [, _json, `buckets`], + }) as any; }; /** * deserializeAws_restJson1S3BucketOwner */ const de_S3BucketOwner = (output: any, context: __SerdeContext): S3BucketOwner => { - return { - displayName: __expectString(output.displayName), - id: __expectString(output.id), - } as any; + return take(output, { + displayName: [, __expectString, `displayName`], + id: [, __expectString, `id`], + }) as any; }; /** * deserializeAws_restJson1S3ClassificationScope */ const de_S3ClassificationScope = (output: any, context: __SerdeContext): S3ClassificationScope => { - return { - excludes: output.excludes != null ? de_S3ClassificationScopeExclusion(output.excludes, context) : undefined, - } as any; + return take(output, { + excludes: (_) => [, de_S3ClassificationScopeExclusion(_, context), `excludes`], + }) as any; }; /** * deserializeAws_restJson1S3ClassificationScopeExclusion */ const de_S3ClassificationScopeExclusion = (output: any, context: __SerdeContext): S3ClassificationScopeExclusion => { - return { - bucketNames: output.bucketNames != null ? de___listOfS3BucketName(output.bucketNames, context) : undefined, - } as any; + return take(output, { + bucketNames: [, _json, `bucketNames`], + }) as any; }; /** * deserializeAws_restJson1S3Destination */ const de_S3Destination = (output: any, context: __SerdeContext): S3Destination => { - return { - bucketName: __expectString(output.bucketName), - keyPrefix: __expectString(output.keyPrefix), - kmsKeyArn: __expectString(output.kmsKeyArn), - } as any; + return take(output, { + bucketName: [, __expectString, `bucketName`], + keyPrefix: [, __expectString, `keyPrefix`], + kmsKeyArn: [, __expectString, `kmsKeyArn`], + }) as any; }; /** * deserializeAws_restJson1S3JobDefinition */ const de_S3JobDefinition = (output: any, context: __SerdeContext): S3JobDefinition => { - return { - bucketCriteria: - output.bucketCriteria != null ? de_S3BucketCriteriaForJob(output.bucketCriteria, context) : undefined, - bucketDefinitions: - output.bucketDefinitions != null - ? de___listOfS3BucketDefinitionForJob(output.bucketDefinitions, context) - : undefined, - scoping: output.scoping != null ? de_Scoping(output.scoping, context) : undefined, - } as any; + return take(output, { + bucketCriteria: (_) => [, de_S3BucketCriteriaForJob(_, context), `bucketCriteria`], + bucketDefinitions: (_) => [, de___listOfS3BucketDefinitionForJob(_, context), `bucketDefinitions`], + scoping: (_) => [, de_Scoping(_, context), `scoping`], + }) as any; }; /** * deserializeAws_restJson1S3Object */ const de_S3Object = (output: any, context: __SerdeContext): S3Object => { - return { - bucketArn: __expectString(output.bucketArn), - eTag: __expectString(output.eTag), - extension: __expectString(output.extension), - key: __expectString(output.key), - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - path: __expectString(output.path), - publicAccess: __expectBoolean(output.publicAccess), - serverSideEncryption: - output.serverSideEncryption != null ? de_ServerSideEncryption(output.serverSideEncryption, context) : undefined, - size: __expectLong(output.size), - storageClass: __expectString(output.storageClass), - tags: output.tags != null ? de_KeyValuePairList(output.tags, context) : undefined, - versionId: __expectString(output.versionId), - } as any; + return take(output, { + bucketArn: [, __expectString, `bucketArn`], + eTag: [, __expectString, `eTag`], + extension: [, __expectString, `extension`], + key: [, __expectString, `key`], + lastModified: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastModified`], + path: [, __expectString, `path`], + publicAccess: [, __expectBoolean, `publicAccess`], + serverSideEncryption: (_) => [, de_ServerSideEncryption(_, context), `serverSideEncryption`], + size: [, __expectLong, `size`], + storageClass: [, __expectString, `storageClass`], + tags: (_) => [, de_KeyValuePairList(_, context), `tags`], + versionId: [, __expectString, `versionId`], + }) as any; }; /** * deserializeAws_restJson1S3WordsList */ const de_S3WordsList = (output: any, context: __SerdeContext): S3WordsList => { - return { - bucketName: __expectString(output.bucketName), - objectKey: __expectString(output.objectKey), - } as any; + return take(output, { + bucketName: [, __expectString, `bucketName`], + objectKey: [, __expectString, `objectKey`], + }) as any; }; /** * deserializeAws_restJson1Scoping */ const de_Scoping = (output: any, context: __SerdeContext): Scoping => { - return { - excludes: output.excludes != null ? de_JobScopingBlock(output.excludes, context) : undefined, - includes: output.includes != null ? de_JobScopingBlock(output.includes, context) : undefined, - } as any; + return take(output, { + excludes: (_) => [, de_JobScopingBlock(_, context), `excludes`], + includes: (_) => [, de_JobScopingBlock(_, context), `includes`], + }) as any; }; /** * deserializeAws_restJson1SecurityHubConfiguration */ const de_SecurityHubConfiguration = (output: any, context: __SerdeContext): SecurityHubConfiguration => { - return { - publishClassificationFindings: __expectBoolean(output.publishClassificationFindings), - publishPolicyFindings: __expectBoolean(output.publishPolicyFindings), - } as any; + return take(output, { + publishClassificationFindings: [, __expectBoolean, `publishClassificationFindings`], + publishPolicyFindings: [, __expectBoolean, `publishPolicyFindings`], + }) as any; }; /** @@ -10402,9 +9944,6 @@ const de_SensitiveData = (output: any, context: __SerdeContext): SensitiveDataIt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SensitiveDataItem(entry, context); }); return retVal; @@ -10414,11 +9953,11 @@ const de_SensitiveData = (output: any, context: __SerdeContext): SensitiveDataIt * deserializeAws_restJson1SensitiveDataItem */ const de_SensitiveDataItem = (output: any, context: __SerdeContext): SensitiveDataItem => { - return { - category: __expectString(output.category), - detections: output.detections != null ? de_DefaultDetections(output.detections, context) : undefined, - totalCount: __expectLong(output.totalCount), - } as any; + return take(output, { + category: [, __expectString, `category`], + detections: (_) => [, de_DefaultDetections(_, context), `detections`], + totalCount: [, __expectLong, `totalCount`], + }) as any; }; /** @@ -10438,12 +9977,12 @@ const de_SensitiveDataOccurrences = (output: any, context: __SerdeContext): Reco * deserializeAws_restJson1SensitivityAggregations */ const de_SensitivityAggregations = (output: any, context: __SerdeContext): SensitivityAggregations => { - return { - classifiableSizeInBytes: __expectLong(output.classifiableSizeInBytes), - publiclyAccessibleCount: __expectLong(output.publiclyAccessibleCount), - totalCount: __expectLong(output.totalCount), - totalSizeInBytes: __expectLong(output.totalSizeInBytes), - } as any; + return take(output, { + classifiableSizeInBytes: [, __expectLong, `classifiableSizeInBytes`], + publiclyAccessibleCount: [, __expectLong, `publiclyAccessibleCount`], + totalCount: [, __expectLong, `totalCount`], + totalSizeInBytes: [, __expectLong, `totalSizeInBytes`], + }) as any; }; /** @@ -10453,12 +9992,9 @@ const de_SensitivityInspectionTemplateExcludes = ( output: any, context: __SerdeContext ): SensitivityInspectionTemplateExcludes => { - return { - managedDataIdentifierIds: - output.managedDataIdentifierIds != null - ? de___listOf__string(output.managedDataIdentifierIds, context) - : undefined, - } as any; + return take(output, { + managedDataIdentifierIds: [, _json, `managedDataIdentifierIds`], + }) as any; }; /** @@ -10468,15 +10004,11 @@ const de_SensitivityInspectionTemplateIncludes = ( output: any, context: __SerdeContext ): SensitivityInspectionTemplateIncludes => { - return { - allowListIds: output.allowListIds != null ? de___listOf__string(output.allowListIds, context) : undefined, - customDataIdentifierIds: - output.customDataIdentifierIds != null ? de___listOf__string(output.customDataIdentifierIds, context) : undefined, - managedDataIdentifierIds: - output.managedDataIdentifierIds != null - ? de___listOf__string(output.managedDataIdentifierIds, context) - : undefined, - } as any; + return take(output, { + allowListIds: [, _json, `allowListIds`], + customDataIdentifierIds: [, _json, `customDataIdentifierIds`], + managedDataIdentifierIds: [, _json, `managedDataIdentifierIds`], + }) as any; }; /** @@ -10486,85 +10018,84 @@ const de_SensitivityInspectionTemplatesEntry = ( output: any, context: __SerdeContext ): SensitivityInspectionTemplatesEntry => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - } as any; + return take(output, { + id: [, __expectString, `id`], + name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1ServerSideEncryption */ const de_ServerSideEncryption = (output: any, context: __SerdeContext): ServerSideEncryption => { - return { - encryptionType: __expectString(output.encryptionType), - kmsMasterKeyId: __expectString(output.kmsMasterKeyId), - } as any; + return take(output, { + encryptionType: [, __expectString, `encryptionType`], + kmsMasterKeyId: [, __expectString, `kmsMasterKeyId`], + }) as any; }; /** * deserializeAws_restJson1ServiceLimit */ const de_ServiceLimit = (output: any, context: __SerdeContext): ServiceLimit => { - return { - isServiceLimited: __expectBoolean(output.isServiceLimited), - unit: __expectString(output.unit), - value: __expectLong(output.value), - } as any; + return take(output, { + isServiceLimited: [, __expectBoolean, `isServiceLimited`], + unit: [, __expectString, `unit`], + value: [, __expectLong, `value`], + }) as any; }; /** * deserializeAws_restJson1SessionContext */ const de_SessionContext = (output: any, context: __SerdeContext): SessionContext => { - return { - attributes: output.attributes != null ? de_SessionContextAttributes(output.attributes, context) : undefined, - sessionIssuer: output.sessionIssuer != null ? de_SessionIssuer(output.sessionIssuer, context) : undefined, - } as any; + return take(output, { + attributes: (_) => [, de_SessionContextAttributes(_, context), `attributes`], + sessionIssuer: (_) => [, de_SessionIssuer(_, context), `sessionIssuer`], + }) as any; }; /** * deserializeAws_restJson1SessionContextAttributes */ const de_SessionContextAttributes = (output: any, context: __SerdeContext): SessionContextAttributes => { - return { - creationDate: - output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined, - mfaAuthenticated: __expectBoolean(output.mfaAuthenticated), - } as any; + return take(output, { + creationDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `creationDate`], + mfaAuthenticated: [, __expectBoolean, `mfaAuthenticated`], + }) as any; }; /** * deserializeAws_restJson1SessionIssuer */ const de_SessionIssuer = (output: any, context: __SerdeContext): SessionIssuer => { - return { - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - principalId: __expectString(output.principalId), - type: __expectString(output.type), - userName: __expectString(output.userName), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + arn: [, __expectString, `arn`], + principalId: [, __expectString, `principalId`], + type: [, __expectString, `type`], + userName: [, __expectString, `userName`], + }) as any; }; /** * deserializeAws_restJson1Severity */ const de_Severity = (output: any, context: __SerdeContext): Severity => { - return { - description: __expectString(output.description), - score: __expectLong(output.score), - } as any; + return take(output, { + description: [, __expectString, `description`], + score: [, __expectLong, `score`], + }) as any; }; /** * deserializeAws_restJson1SeverityLevel */ const de_SeverityLevel = (output: any, context: __SerdeContext): SeverityLevel => { - return { - occurrencesThreshold: __expectLong(output.occurrencesThreshold), - severity: __expectString(output.severity), - } as any; + return take(output, { + occurrencesThreshold: [, __expectLong, `occurrencesThreshold`], + severity: [, __expectString, `severity`], + }) as any; }; /** @@ -10574,9 +10105,6 @@ const de_SeverityLevelList = (output: any, context: __SerdeContext): SeverityLev const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SeverityLevel(entry, context); }); return retVal; @@ -10586,187 +10114,172 @@ const de_SeverityLevelList = (output: any, context: __SerdeContext): SeverityLev * deserializeAws_restJson1SimpleCriterionForJob */ const de_SimpleCriterionForJob = (output: any, context: __SerdeContext): SimpleCriterionForJob => { - return { - comparator: __expectString(output.comparator), - key: __expectString(output.key), - values: output.values != null ? de___listOf__string(output.values, context) : undefined, - } as any; + return take(output, { + comparator: [, __expectString, `comparator`], + key: [, __expectString, `key`], + values: [, _json, `values`], + }) as any; }; /** * deserializeAws_restJson1SimpleScopeTerm */ const de_SimpleScopeTerm = (output: any, context: __SerdeContext): SimpleScopeTerm => { - return { - comparator: __expectString(output.comparator), - key: __expectString(output.key), - values: output.values != null ? de___listOf__string(output.values, context) : undefined, - } as any; + return take(output, { + comparator: [, __expectString, `comparator`], + key: [, __expectString, `key`], + values: [, _json, `values`], + }) as any; }; /** * deserializeAws_restJson1Statistics */ const de_Statistics = (output: any, context: __SerdeContext): Statistics => { - return { - approximateNumberOfObjectsToProcess: __limitedParseDouble(output.approximateNumberOfObjectsToProcess), - numberOfRuns: __limitedParseDouble(output.numberOfRuns), - } as any; + return take(output, { + approximateNumberOfObjectsToProcess: [, __limitedParseDouble, `approximateNumberOfObjectsToProcess`], + numberOfRuns: [, __limitedParseDouble, `numberOfRuns`], + }) as any; }; /** * deserializeAws_restJson1TagCriterionForJob */ const de_TagCriterionForJob = (output: any, context: __SerdeContext): TagCriterionForJob => { - return { - comparator: __expectString(output.comparator), - tagValues: output.tagValues != null ? de___listOfTagCriterionPairForJob(output.tagValues, context) : undefined, - } as any; + return take(output, { + comparator: [, __expectString, `comparator`], + tagValues: (_) => [, de___listOfTagCriterionPairForJob(_, context), `tagValues`], + }) as any; }; /** * deserializeAws_restJson1TagCriterionPairForJob */ const de_TagCriterionPairForJob = (output: any, context: __SerdeContext): TagCriterionPairForJob => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; + return take(output, { + key: [, __expectString, `key`], + value: [, __expectString, `value`], + }) as any; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1TagScopeTerm */ const de_TagScopeTerm = (output: any, context: __SerdeContext): TagScopeTerm => { - return { - comparator: __expectString(output.comparator), - key: __expectString(output.key), - tagValues: output.tagValues != null ? de___listOfTagValuePair(output.tagValues, context) : undefined, - target: __expectString(output.target), - } as any; + return take(output, { + comparator: [, __expectString, `comparator`], + key: [, __expectString, `key`], + tagValues: (_) => [, de___listOfTagValuePair(_, context), `tagValues`], + target: [, __expectString, `target`], + }) as any; }; /** * deserializeAws_restJson1TagValuePair */ const de_TagValuePair = (output: any, context: __SerdeContext): TagValuePair => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; + return take(output, { + key: [, __expectString, `key`], + value: [, __expectString, `value`], + }) as any; }; /** * deserializeAws_restJson1UnprocessedAccount */ const de_UnprocessedAccount = (output: any, context: __SerdeContext): UnprocessedAccount => { - return { - accountId: __expectString(output.accountId), - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + errorCode: [, __expectString, `errorCode`], + errorMessage: [, __expectString, `errorMessage`], + }) as any; }; /** * deserializeAws_restJson1UsageByAccount */ const de_UsageByAccount = (output: any, context: __SerdeContext): UsageByAccount => { - return { - currency: __expectString(output.currency), - estimatedCost: __expectString(output.estimatedCost), - serviceLimit: output.serviceLimit != null ? de_ServiceLimit(output.serviceLimit, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + currency: [, __expectString, `currency`], + estimatedCost: [, __expectString, `estimatedCost`], + serviceLimit: (_) => [, de_ServiceLimit(_, context), `serviceLimit`], + type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1UsageRecord */ const de_UsageRecord = (output: any, context: __SerdeContext): UsageRecord => { - return { - accountId: __expectString(output.accountId), - automatedDiscoveryFreeTrialStartDate: - output.automatedDiscoveryFreeTrialStartDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.automatedDiscoveryFreeTrialStartDate)) - : undefined, - freeTrialStartDate: - output.freeTrialStartDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.freeTrialStartDate)) - : undefined, - usage: output.usage != null ? de___listOfUsageByAccount(output.usage, context) : undefined, - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + automatedDiscoveryFreeTrialStartDate: (_) => [ + , + __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + `automatedDiscoveryFreeTrialStartDate`, + ], + freeTrialStartDate: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `freeTrialStartDate`], + usage: (_) => [, de___listOfUsageByAccount(_, context), `usage`], + }) as any; }; /** * deserializeAws_restJson1UsageTotal */ const de_UsageTotal = (output: any, context: __SerdeContext): UsageTotal => { - return { - currency: __expectString(output.currency), - estimatedCost: __expectString(output.estimatedCost), - type: __expectString(output.type), - } as any; + return take(output, { + currency: [, __expectString, `currency`], + estimatedCost: [, __expectString, `estimatedCost`], + type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1UserIdentity */ const de_UserIdentity = (output: any, context: __SerdeContext): UserIdentity => { - return { - assumedRole: output.assumedRole != null ? de_AssumedRole(output.assumedRole, context) : undefined, - awsAccount: output.awsAccount != null ? de_AwsAccount(output.awsAccount, context) : undefined, - awsService: output.awsService != null ? de_AwsService(output.awsService, context) : undefined, - federatedUser: output.federatedUser != null ? de_FederatedUser(output.federatedUser, context) : undefined, - iamUser: output.iamUser != null ? de_IamUser(output.iamUser, context) : undefined, - root: output.root != null ? de_UserIdentityRoot(output.root, context) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + assumedRole: (_) => [, de_AssumedRole(_, context), `assumedRole`], + awsAccount: (_) => [, de_AwsAccount(_, context), `awsAccount`], + awsService: (_) => [, de_AwsService(_, context), `awsService`], + federatedUser: (_) => [, de_FederatedUser(_, context), `federatedUser`], + iamUser: (_) => [, de_IamUser(_, context), `iamUser`], + root: (_) => [, de_UserIdentityRoot(_, context), `root`], + type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1UserIdentityRoot */ const de_UserIdentityRoot = (output: any, context: __SerdeContext): UserIdentityRoot => { - return { - accountId: __expectString(output.accountId), - arn: __expectString(output.arn), - principalId: __expectString(output.principalId), - } as any; + return take(output, { + accountId: [, __expectString, `accountId`], + arn: [, __expectString, `arn`], + principalId: [, __expectString, `principalId`], + }) as any; }; /** * deserializeAws_restJson1UserPausedDetails */ const de_UserPausedDetails = (output: any, context: __SerdeContext): UserPausedDetails => { - return { - jobExpiresAt: - output.jobExpiresAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.jobExpiresAt)) : undefined, - jobImminentExpirationHealthEventArn: __expectString(output.jobImminentExpirationHealthEventArn), - jobPausedAt: - output.jobPausedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.jobPausedAt)) : undefined, - } as any; + return take(output, { + jobExpiresAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `jobExpiresAt`], + jobImminentExpirationHealthEventArn: [, __expectString, `jobImminentExpirationHealthEventArn`], + jobPausedAt: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `jobPausedAt`], + }) as any; }; /** * deserializeAws_restJson1WeeklySchedule */ const de_WeeklySchedule = (output: any, context: __SerdeContext): WeeklySchedule => { - return { - dayOfWeek: __expectString(output.dayOfWeek), - } as any; + return take(output, { + dayOfWeek: [, __expectString, `dayOfWeek`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-managedblockchain/src/protocols/Aws_restJson1.ts b/clients/client-managedblockchain/src/protocols/Aws_restJson1.ts index cea923889e23..2a72cc318d0a 100644 --- a/clients/client-managedblockchain/src/protocols/Aws_restJson1.ts +++ b/clients/client-managedblockchain/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -65,26 +67,18 @@ import { LogConfigurations, Member, MemberConfiguration, - MemberFabricAttributes, MemberFabricConfiguration, MemberFabricLogPublishingConfiguration, - MemberFrameworkAttributes, MemberFrameworkConfiguration, MemberLogPublishingConfiguration, MemberSummary, Network, - NetworkEthereumAttributes, - NetworkFabricAttributes, NetworkFabricConfiguration, - NetworkFrameworkAttributes, NetworkFrameworkConfiguration, NetworkSummary, Node, NodeConfiguration, - NodeEthereumAttributes, - NodeFabricAttributes, NodeFabricLogPublishingConfiguration, - NodeFrameworkAttributes, NodeLogPublishingConfiguration, NodeSummary, Proposal, @@ -97,7 +91,6 @@ import { ResourceNotReadyException, ThrottlingException, TooManyTagsException, - VoteSummary, VotingPolicy, } from "../models/models_0"; @@ -114,11 +107,13 @@ export const se_CreateAccessorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accessors"; let body: any; - body = JSON.stringify({ - ...(input.AccessorType != null && { AccessorType: input.AccessorType }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AccessorType: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -145,13 +140,13 @@ export const se_CreateMemberCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/members"; resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId!, "{NetworkId}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.InvitationId != null && { InvitationId: input.InvitationId }), - ...(input.MemberConfiguration != null && { - MemberConfiguration: se_MemberConfiguration(input.MemberConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + InvitationId: [], + MemberConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -176,21 +171,19 @@ export const se_CreateNetworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Framework != null && { Framework: input.Framework }), - ...(input.FrameworkConfiguration != null && { - FrameworkConfiguration: se_NetworkFrameworkConfiguration(input.FrameworkConfiguration, context), - }), - ...(input.FrameworkVersion != null && { FrameworkVersion: input.FrameworkVersion }), - ...(input.MemberConfiguration != null && { - MemberConfiguration: se_MemberConfiguration(input.MemberConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }), - ...(input.VotingPolicy != null && { VotingPolicy: se_VotingPolicy(input.VotingPolicy, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Framework: [], + FrameworkConfiguration: (_) => _json(_), + FrameworkVersion: [], + MemberConfiguration: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + VotingPolicy: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -217,14 +210,14 @@ export const se_CreateNodeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/nodes"; resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId!, "{NetworkId}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.MemberId != null && { MemberId: input.MemberId }), - ...(input.NodeConfiguration != null && { - NodeConfiguration: se_NodeConfiguration(input.NodeConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + MemberId: [], + NodeConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -251,13 +244,15 @@ export const se_CreateProposalCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networks/{NetworkId}/proposals"; resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId!, "{NetworkId}", false); let body: any; - body = JSON.stringify({ - ...(input.Actions != null && { Actions: se_ProposalActions(input.Actions, context) }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.MemberId != null && { MemberId: input.MemberId }), - ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Actions: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + MemberId: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -747,9 +742,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -807,11 +804,11 @@ export const se_UpdateMemberCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId!, "{NetworkId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "MemberId", () => input.MemberId!, "{MemberId}", false); let body: any; - body = JSON.stringify({ - ...(input.LogPublishingConfiguration != null && { - LogPublishingConfiguration: se_MemberLogPublishingConfiguration(input.LogPublishingConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + LogPublishingConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -839,12 +836,12 @@ export const se_UpdateNodeCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId!, "{NetworkId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "NodeId", () => input.NodeId!, "{NodeId}", false); let body: any; - body = JSON.stringify({ - ...(input.LogPublishingConfiguration != null && { - LogPublishingConfiguration: se_NodeLogPublishingConfiguration(input.LogPublishingConfiguration, context), - }), - ...(input.MemberId != null && { MemberId: input.MemberId }), - }); + body = JSON.stringify( + take(input, { + LogPublishingConfiguration: (_) => _json(_), + MemberId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -873,10 +870,12 @@ export const se_VoteOnProposalCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "NetworkId", () => input.NetworkId!, "{NetworkId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ProposalId", () => input.ProposalId!, "{ProposalId}", false); let body: any; - body = JSON.stringify({ - ...(input.Vote != null && { Vote: input.Vote }), - ...(input.VoterMemberId != null && { VoterMemberId: input.VoterMemberId }), - }); + body = JSON.stringify( + take(input, { + Vote: [], + VoterMemberId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -902,12 +901,11 @@ export const de_CreateAccessorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessorId != null) { - contents.AccessorId = __expectString(data.AccessorId); - } - if (data.BillingToken != null) { - contents.BillingToken = __expectString(data.BillingToken); - } + const doc = take(data, { + AccessorId: __expectString, + BillingToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -947,10 +945,9 @@ const de_CreateAccessorCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -970,9 +967,10 @@ export const de_CreateMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MemberId != null) { - contents.MemberId = __expectString(data.MemberId); - } + const doc = take(data, { + MemberId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1018,10 +1016,9 @@ const de_CreateMemberCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1041,12 +1038,11 @@ export const de_CreateNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MemberId != null) { - contents.MemberId = __expectString(data.MemberId); - } - if (data.NetworkId != null) { - contents.NetworkId = __expectString(data.NetworkId); - } + const doc = take(data, { + MemberId: __expectString, + NetworkId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1086,10 +1082,9 @@ const de_CreateNetworkCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1109,9 +1104,10 @@ export const de_CreateNodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NodeId != null) { - contents.NodeId = __expectString(data.NodeId); - } + const doc = take(data, { + NodeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1157,10 +1153,9 @@ const de_CreateNodeCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1180,9 +1175,10 @@ export const de_CreateProposalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProposalId != null) { - contents.ProposalId = __expectString(data.ProposalId); - } + const doc = take(data, { + ProposalId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1222,10 +1218,9 @@ const de_CreateProposalCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1278,10 +1273,9 @@ const de_DeleteAccessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1337,10 +1331,9 @@ const de_DeleteMemberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1396,10 +1389,9 @@ const de_DeleteNodeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1419,9 +1411,10 @@ export const de_GetAccessorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Accessor != null) { - contents.Accessor = de_Accessor(data.Accessor, context); - } + const doc = take(data, { + Accessor: (_) => de_Accessor(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1455,10 +1448,9 @@ const de_GetAccessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,9 +1470,10 @@ export const de_GetMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Member != null) { - contents.Member = de_Member(data.Member, context); - } + const doc = take(data, { + Member: (_) => de_Member(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1514,10 +1507,9 @@ const de_GetMemberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1537,9 +1529,10 @@ export const de_GetNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Network != null) { - contents.Network = de_Network(data.Network, context); - } + const doc = take(data, { + Network: (_) => de_Network(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1573,10 +1566,9 @@ const de_GetNetworkCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1596,9 +1588,10 @@ export const de_GetNodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Node != null) { - contents.Node = de_Node(data.Node, context); - } + const doc = take(data, { + Node: (_) => de_Node(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1632,10 +1625,9 @@ const de_GetNodeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1655,9 +1647,10 @@ export const de_GetProposalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Proposal != null) { - contents.Proposal = de_Proposal(data.Proposal, context); - } + const doc = take(data, { + Proposal: (_) => de_Proposal(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1691,10 +1684,9 @@ const de_GetProposalCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1714,12 +1706,11 @@ export const de_ListAccessorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Accessors != null) { - contents.Accessors = de_AccessorSummaryList(data.Accessors, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Accessors: (_) => de_AccessorSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1750,10 +1741,9 @@ const de_ListAccessorsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1773,12 +1763,11 @@ export const de_ListInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Invitations != null) { - contents.Invitations = de_InvitationList(data.Invitations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Invitations: (_) => de_InvitationList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1815,10 +1804,9 @@ const de_ListInvitationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1838,12 +1826,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Members != null) { - contents.Members = de_MemberSummaryList(data.Members, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Members: (_) => de_MemberSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1874,10 +1861,9 @@ const de_ListMembersCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1897,12 +1883,11 @@ export const de_ListNetworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Networks != null) { - contents.Networks = de_NetworkSummaryList(data.Networks, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Networks: (_) => de_NetworkSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1933,10 +1918,9 @@ const de_ListNetworksCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1956,12 +1940,11 @@ export const de_ListNodesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Nodes != null) { - contents.Nodes = de_NodeSummaryList(data.Nodes, context); - } + const doc = take(data, { + NextToken: __expectString, + Nodes: (_) => de_NodeSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1992,10 +1975,9 @@ const de_ListNodesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2015,12 +1997,11 @@ export const de_ListProposalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Proposals != null) { - contents.Proposals = de_ProposalSummaryList(data.Proposals, context); - } + const doc = take(data, { + NextToken: __expectString, + Proposals: (_) => de_ProposalSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2054,10 +2035,9 @@ const de_ListProposalsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2077,12 +2057,11 @@ export const de_ListProposalVotesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProposalVotes != null) { - contents.ProposalVotes = de_ProposalVoteList(data.ProposalVotes, context); - } + const doc = take(data, { + NextToken: __expectString, + ProposalVotes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2113,10 +2092,9 @@ const de_ListProposalVotesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2136,9 +2114,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_OutputTagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2169,10 +2148,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotReadyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2228,10 +2206,9 @@ const de_RejectInvitationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2284,10 +2261,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2337,10 +2313,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotReadyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2393,10 +2368,9 @@ const de_UpdateMemberCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2449,10 +2423,9 @@ const de_UpdateNodeCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2508,16 +2481,15 @@ const de_VoteOnProposalCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2527,9 +2499,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2546,9 +2519,10 @@ const de_IllegalActionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IllegalActionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2565,6 +2539,8 @@ const de_InternalServiceErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2581,9 +2557,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2600,9 +2577,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2619,9 +2597,10 @@ const de_ResourceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2638,12 +2617,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2660,9 +2638,10 @@ const de_ResourceNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2676,6 +2655,8 @@ const de_ResourceNotReadyExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2692,12 +2673,11 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2705,249 +2685,72 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApprovalThresholdPolicy - */ -const se_ApprovalThresholdPolicy = (input: ApprovalThresholdPolicy, context: __SerdeContext): any => { - return { - ...(input.ProposalDurationInHours != null && { ProposalDurationInHours: input.ProposalDurationInHours }), - ...(input.ThresholdComparator != null && { ThresholdComparator: input.ThresholdComparator }), - ...(input.ThresholdPercentage != null && { ThresholdPercentage: input.ThresholdPercentage }), - }; -}; +// se_ApprovalThresholdPolicy omitted. -/** - * serializeAws_restJson1InputTagMap - */ -const se_InputTagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_InputTagMap omitted. -/** - * serializeAws_restJson1InviteAction - */ -const se_InviteAction = (input: InviteAction, context: __SerdeContext): any => { - return { - ...(input.Principal != null && { Principal: input.Principal }), - }; -}; +// se_InviteAction omitted. -/** - * serializeAws_restJson1InviteActionList - */ -const se_InviteActionList = (input: InviteAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InviteAction(entry, context); - }); -}; +// se_InviteActionList omitted. -/** - * serializeAws_restJson1LogConfiguration - */ -const se_LogConfiguration = (input: LogConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_LogConfiguration omitted. -/** - * serializeAws_restJson1LogConfigurations - */ -const se_LogConfigurations = (input: LogConfigurations, context: __SerdeContext): any => { - return { - ...(input.Cloudwatch != null && { Cloudwatch: se_LogConfiguration(input.Cloudwatch, context) }), - }; -}; +// se_LogConfigurations omitted. -/** - * serializeAws_restJson1MemberConfiguration - */ -const se_MemberConfiguration = (input: MemberConfiguration, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FrameworkConfiguration != null && { - FrameworkConfiguration: se_MemberFrameworkConfiguration(input.FrameworkConfiguration, context), - }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.LogPublishingConfiguration != null && { - LogPublishingConfiguration: se_MemberLogPublishingConfiguration(input.LogPublishingConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_InputTagMap(input.Tags, context) }), - }; -}; +// se_MemberConfiguration omitted. -/** - * serializeAws_restJson1MemberFabricConfiguration - */ -const se_MemberFabricConfiguration = (input: MemberFabricConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdminPassword != null && { AdminPassword: input.AdminPassword }), - ...(input.AdminUsername != null && { AdminUsername: input.AdminUsername }), - }; -}; +// se_MemberFabricConfiguration omitted. -/** - * serializeAws_restJson1MemberFabricLogPublishingConfiguration - */ -const se_MemberFabricLogPublishingConfiguration = ( - input: MemberFabricLogPublishingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CaLogs != null && { CaLogs: se_LogConfigurations(input.CaLogs, context) }), - }; -}; +// se_MemberFabricLogPublishingConfiguration omitted. -/** - * serializeAws_restJson1MemberFrameworkConfiguration - */ -const se_MemberFrameworkConfiguration = (input: MemberFrameworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.Fabric != null && { Fabric: se_MemberFabricConfiguration(input.Fabric, context) }), - }; -}; +// se_MemberFrameworkConfiguration omitted. -/** - * serializeAws_restJson1MemberLogPublishingConfiguration - */ -const se_MemberLogPublishingConfiguration = (input: MemberLogPublishingConfiguration, context: __SerdeContext): any => { - return { - ...(input.Fabric != null && { Fabric: se_MemberFabricLogPublishingConfiguration(input.Fabric, context) }), - }; -}; +// se_MemberLogPublishingConfiguration omitted. -/** - * serializeAws_restJson1NetworkFabricConfiguration - */ -const se_NetworkFabricConfiguration = (input: NetworkFabricConfiguration, context: __SerdeContext): any => { - return { - ...(input.Edition != null && { Edition: input.Edition }), - }; -}; +// se_NetworkFabricConfiguration omitted. -/** - * serializeAws_restJson1NetworkFrameworkConfiguration - */ -const se_NetworkFrameworkConfiguration = (input: NetworkFrameworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.Fabric != null && { Fabric: se_NetworkFabricConfiguration(input.Fabric, context) }), - }; -}; +// se_NetworkFrameworkConfiguration omitted. -/** - * serializeAws_restJson1NodeConfiguration - */ -const se_NodeConfiguration = (input: NodeConfiguration, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LogPublishingConfiguration != null && { - LogPublishingConfiguration: se_NodeLogPublishingConfiguration(input.LogPublishingConfiguration, context), - }), - ...(input.StateDB != null && { StateDB: input.StateDB }), - }; -}; +// se_NodeConfiguration omitted. -/** - * serializeAws_restJson1NodeFabricLogPublishingConfiguration - */ -const se_NodeFabricLogPublishingConfiguration = ( - input: NodeFabricLogPublishingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ChaincodeLogs != null && { ChaincodeLogs: se_LogConfigurations(input.ChaincodeLogs, context) }), - ...(input.PeerLogs != null && { PeerLogs: se_LogConfigurations(input.PeerLogs, context) }), - }; -}; +// se_NodeFabricLogPublishingConfiguration omitted. -/** - * serializeAws_restJson1NodeLogPublishingConfiguration - */ -const se_NodeLogPublishingConfiguration = (input: NodeLogPublishingConfiguration, context: __SerdeContext): any => { - return { - ...(input.Fabric != null && { Fabric: se_NodeFabricLogPublishingConfiguration(input.Fabric, context) }), - }; -}; +// se_NodeLogPublishingConfiguration omitted. -/** - * serializeAws_restJson1ProposalActions - */ -const se_ProposalActions = (input: ProposalActions, context: __SerdeContext): any => { - return { - ...(input.Invitations != null && { Invitations: se_InviteActionList(input.Invitations, context) }), - ...(input.Removals != null && { Removals: se_RemoveActionList(input.Removals, context) }), - }; -}; +// se_ProposalActions omitted. -/** - * serializeAws_restJson1RemoveAction - */ -const se_RemoveAction = (input: RemoveAction, context: __SerdeContext): any => { - return { - ...(input.MemberId != null && { MemberId: input.MemberId }), - }; -}; +// se_RemoveAction omitted. -/** - * serializeAws_restJson1RemoveActionList - */ -const se_RemoveActionList = (input: RemoveAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RemoveAction(entry, context); - }); -}; +// se_RemoveActionList omitted. -/** - * serializeAws_restJson1VotingPolicy - */ -const se_VotingPolicy = (input: VotingPolicy, context: __SerdeContext): any => { - return { - ...(input.ApprovalThresholdPolicy != null && { - ApprovalThresholdPolicy: se_ApprovalThresholdPolicy(input.ApprovalThresholdPolicy, context), - }), - }; -}; +// se_VotingPolicy omitted. /** * deserializeAws_restJson1Accessor */ const de_Accessor = (output: any, context: __SerdeContext): Accessor => { - return { - Arn: __expectString(output.Arn), - BillingToken: __expectString(output.BillingToken), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Id: __expectString(output.Id), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Arn: __expectString, + BillingToken: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Id: __expectString, + Status: __expectString, + Tags: _json, + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1AccessorSummary */ const de_AccessorSummary = (output: any, context: __SerdeContext): AccessorSummary => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Id: __expectString(output.Id), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Id: __expectString, + Status: __expectString, + Type: __expectString, + }) as any; }; /** @@ -2957,41 +2760,25 @@ const de_AccessorSummaryList = (output: any, context: __SerdeContext): AccessorS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccessorSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ApprovalThresholdPolicy - */ -const de_ApprovalThresholdPolicy = (output: any, context: __SerdeContext): ApprovalThresholdPolicy => { - return { - ProposalDurationInHours: __expectInt32(output.ProposalDurationInHours), - ThresholdComparator: __expectString(output.ThresholdComparator), - ThresholdPercentage: __expectInt32(output.ThresholdPercentage), - } as any; -}; +// de_ApprovalThresholdPolicy omitted. /** * deserializeAws_restJson1Invitation */ const de_Invitation = (output: any, context: __SerdeContext): Invitation => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationDate)) - : undefined, - InvitationId: __expectString(output.InvitationId), - NetworkSummary: output.NetworkSummary != null ? de_NetworkSummary(output.NetworkSummary, context) : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExpirationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + InvitationId: __expectString, + NetworkSummary: (_: any) => de_NetworkSummary(_, context), + Status: __expectString, + }) as any; }; /** @@ -3001,139 +2788,59 @@ const de_InvitationList = (output: any, context: __SerdeContext): Invitation[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Invitation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InviteAction - */ -const de_InviteAction = (output: any, context: __SerdeContext): InviteAction => { - return { - Principal: __expectString(output.Principal), - } as any; -}; +// de_InviteAction omitted. -/** - * deserializeAws_restJson1InviteActionList - */ -const de_InviteActionList = (output: any, context: __SerdeContext): InviteAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InviteAction(entry, context); - }); - return retVal; -}; +// de_InviteActionList omitted. -/** - * deserializeAws_restJson1LogConfiguration - */ -const de_LogConfiguration = (output: any, context: __SerdeContext): LogConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_LogConfiguration omitted. -/** - * deserializeAws_restJson1LogConfigurations - */ -const de_LogConfigurations = (output: any, context: __SerdeContext): LogConfigurations => { - return { - Cloudwatch: output.Cloudwatch != null ? de_LogConfiguration(output.Cloudwatch, context) : undefined, - } as any; -}; +// de_LogConfigurations omitted. /** * deserializeAws_restJson1Member */ const de_Member = (output: any, context: __SerdeContext): Member => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Description: __expectString(output.Description), - FrameworkAttributes: - output.FrameworkAttributes != null - ? de_MemberFrameworkAttributes(output.FrameworkAttributes, context) - : undefined, - Id: __expectString(output.Id), - KmsKeyArn: __expectString(output.KmsKeyArn), - LogPublishingConfiguration: - output.LogPublishingConfiguration != null - ? de_MemberLogPublishingConfiguration(output.LogPublishingConfiguration, context) - : undefined, - Name: __expectString(output.Name), - NetworkId: __expectString(output.NetworkId), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + FrameworkAttributes: _json, + Id: __expectString, + KmsKeyArn: __expectString, + LogPublishingConfiguration: _json, + Name: __expectString, + NetworkId: __expectString, + Status: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1MemberFabricAttributes - */ -const de_MemberFabricAttributes = (output: any, context: __SerdeContext): MemberFabricAttributes => { - return { - AdminUsername: __expectString(output.AdminUsername), - CaEndpoint: __expectString(output.CaEndpoint), - } as any; -}; +// de_MemberFabricAttributes omitted. -/** - * deserializeAws_restJson1MemberFabricLogPublishingConfiguration - */ -const de_MemberFabricLogPublishingConfiguration = ( - output: any, - context: __SerdeContext -): MemberFabricLogPublishingConfiguration => { - return { - CaLogs: output.CaLogs != null ? de_LogConfigurations(output.CaLogs, context) : undefined, - } as any; -}; +// de_MemberFabricLogPublishingConfiguration omitted. -/** - * deserializeAws_restJson1MemberFrameworkAttributes - */ -const de_MemberFrameworkAttributes = (output: any, context: __SerdeContext): MemberFrameworkAttributes => { - return { - Fabric: output.Fabric != null ? de_MemberFabricAttributes(output.Fabric, context) : undefined, - } as any; -}; +// de_MemberFrameworkAttributes omitted. -/** - * deserializeAws_restJson1MemberLogPublishingConfiguration - */ -const de_MemberLogPublishingConfiguration = ( - output: any, - context: __SerdeContext -): MemberLogPublishingConfiguration => { - return { - Fabric: output.Fabric != null ? de_MemberFabricLogPublishingConfiguration(output.Fabric, context) : undefined, - } as any; -}; +// de_MemberLogPublishingConfiguration omitted. /** * deserializeAws_restJson1MemberSummary */ const de_MemberSummary = (output: any, context: __SerdeContext): MemberSummary => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - IsOwned: __expectBoolean(output.IsOwned), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Id: __expectString, + IsOwned: __expectBoolean, + Name: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3143,9 +2850,6 @@ const de_MemberSummaryList = (output: any, context: __SerdeContext): MemberSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MemberSummary(entry, context); }); return retVal; @@ -3155,70 +2859,42 @@ const de_MemberSummaryList = (output: any, context: __SerdeContext): MemberSumma * deserializeAws_restJson1Network */ const de_Network = (output: any, context: __SerdeContext): Network => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Description: __expectString(output.Description), - Framework: __expectString(output.Framework), - FrameworkAttributes: - output.FrameworkAttributes != null - ? de_NetworkFrameworkAttributes(output.FrameworkAttributes, context) - : undefined, - FrameworkVersion: __expectString(output.FrameworkVersion), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined, - VotingPolicy: output.VotingPolicy != null ? de_VotingPolicy(output.VotingPolicy, context) : undefined, - VpcEndpointServiceName: __expectString(output.VpcEndpointServiceName), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Framework: __expectString, + FrameworkAttributes: _json, + FrameworkVersion: __expectString, + Id: __expectString, + Name: __expectString, + Status: __expectString, + Tags: _json, + VotingPolicy: _json, + VpcEndpointServiceName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1NetworkEthereumAttributes - */ -const de_NetworkEthereumAttributes = (output: any, context: __SerdeContext): NetworkEthereumAttributes => { - return { - ChainId: __expectString(output.ChainId), - } as any; -}; +// de_NetworkEthereumAttributes omitted. -/** - * deserializeAws_restJson1NetworkFabricAttributes - */ -const de_NetworkFabricAttributes = (output: any, context: __SerdeContext): NetworkFabricAttributes => { - return { - Edition: __expectString(output.Edition), - OrderingServiceEndpoint: __expectString(output.OrderingServiceEndpoint), - } as any; -}; +// de_NetworkFabricAttributes omitted. -/** - * deserializeAws_restJson1NetworkFrameworkAttributes - */ -const de_NetworkFrameworkAttributes = (output: any, context: __SerdeContext): NetworkFrameworkAttributes => { - return { - Ethereum: output.Ethereum != null ? de_NetworkEthereumAttributes(output.Ethereum, context) : undefined, - Fabric: output.Fabric != null ? de_NetworkFabricAttributes(output.Fabric, context) : undefined, - } as any; -}; +// de_NetworkFrameworkAttributes omitted. /** * deserializeAws_restJson1NetworkSummary */ const de_NetworkSummary = (output: any, context: __SerdeContext): NetworkSummary => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Description: __expectString(output.Description), - Framework: __expectString(output.Framework), - FrameworkVersion: __expectString(output.FrameworkVersion), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + Framework: __expectString, + FrameworkVersion: __expectString, + Id: __expectString, + Name: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3228,9 +2904,6 @@ const de_NetworkSummaryList = (output: any, context: __SerdeContext): NetworkSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NetworkSummary(entry, context); }); return retVal; @@ -3240,93 +2913,45 @@ const de_NetworkSummaryList = (output: any, context: __SerdeContext): NetworkSum * deserializeAws_restJson1Node */ const de_Node = (output: any, context: __SerdeContext): Node => { - return { - Arn: __expectString(output.Arn), - AvailabilityZone: __expectString(output.AvailabilityZone), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - FrameworkAttributes: - output.FrameworkAttributes != null ? de_NodeFrameworkAttributes(output.FrameworkAttributes, context) : undefined, - Id: __expectString(output.Id), - InstanceType: __expectString(output.InstanceType), - KmsKeyArn: __expectString(output.KmsKeyArn), - LogPublishingConfiguration: - output.LogPublishingConfiguration != null - ? de_NodeLogPublishingConfiguration(output.LogPublishingConfiguration, context) - : undefined, - MemberId: __expectString(output.MemberId), - NetworkId: __expectString(output.NetworkId), - StateDB: __expectString(output.StateDB), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + AvailabilityZone: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + FrameworkAttributes: _json, + Id: __expectString, + InstanceType: __expectString, + KmsKeyArn: __expectString, + LogPublishingConfiguration: _json, + MemberId: __expectString, + NetworkId: __expectString, + StateDB: __expectString, + Status: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1NodeEthereumAttributes - */ -const de_NodeEthereumAttributes = (output: any, context: __SerdeContext): NodeEthereumAttributes => { - return { - HttpEndpoint: __expectString(output.HttpEndpoint), - WebSocketEndpoint: __expectString(output.WebSocketEndpoint), - } as any; -}; +// de_NodeEthereumAttributes omitted. -/** - * deserializeAws_restJson1NodeFabricAttributes - */ -const de_NodeFabricAttributes = (output: any, context: __SerdeContext): NodeFabricAttributes => { - return { - PeerEndpoint: __expectString(output.PeerEndpoint), - PeerEventEndpoint: __expectString(output.PeerEventEndpoint), - } as any; -}; +// de_NodeFabricAttributes omitted. -/** - * deserializeAws_restJson1NodeFabricLogPublishingConfiguration - */ -const de_NodeFabricLogPublishingConfiguration = ( - output: any, - context: __SerdeContext -): NodeFabricLogPublishingConfiguration => { - return { - ChaincodeLogs: output.ChaincodeLogs != null ? de_LogConfigurations(output.ChaincodeLogs, context) : undefined, - PeerLogs: output.PeerLogs != null ? de_LogConfigurations(output.PeerLogs, context) : undefined, - } as any; -}; +// de_NodeFabricLogPublishingConfiguration omitted. -/** - * deserializeAws_restJson1NodeFrameworkAttributes - */ -const de_NodeFrameworkAttributes = (output: any, context: __SerdeContext): NodeFrameworkAttributes => { - return { - Ethereum: output.Ethereum != null ? de_NodeEthereumAttributes(output.Ethereum, context) : undefined, - Fabric: output.Fabric != null ? de_NodeFabricAttributes(output.Fabric, context) : undefined, - } as any; -}; +// de_NodeFrameworkAttributes omitted. -/** - * deserializeAws_restJson1NodeLogPublishingConfiguration - */ -const de_NodeLogPublishingConfiguration = (output: any, context: __SerdeContext): NodeLogPublishingConfiguration => { - return { - Fabric: output.Fabric != null ? de_NodeFabricLogPublishingConfiguration(output.Fabric, context) : undefined, - } as any; -}; +// de_NodeLogPublishingConfiguration omitted. /** * deserializeAws_restJson1NodeSummary */ const de_NodeSummary = (output: any, context: __SerdeContext): NodeSummary => { - return { - Arn: __expectString(output.Arn), - AvailabilityZone: __expectString(output.AvailabilityZone), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Id: __expectString(output.Id), - InstanceType: __expectString(output.InstanceType), - Status: __expectString(output.Status), - } as any; + return take(output, { + Arn: __expectString, + AvailabilityZone: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Id: __expectString, + InstanceType: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3336,81 +2961,51 @@ const de_NodeSummaryList = (output: any, context: __SerdeContext): NodeSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NodeSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1OutputTagMap - */ -const de_OutputTagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_OutputTagMap omitted. /** * deserializeAws_restJson1Proposal */ const de_Proposal = (output: any, context: __SerdeContext): Proposal => { - return { - Actions: output.Actions != null ? de_ProposalActions(output.Actions, context) : undefined, - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Description: __expectString(output.Description), - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationDate)) - : undefined, - NetworkId: __expectString(output.NetworkId), - NoVoteCount: __expectInt32(output.NoVoteCount), - OutstandingVoteCount: __expectInt32(output.OutstandingVoteCount), - ProposalId: __expectString(output.ProposalId), - ProposedByMemberId: __expectString(output.ProposedByMemberId), - ProposedByMemberName: __expectString(output.ProposedByMemberName), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_OutputTagMap(output.Tags, context) : undefined, - YesVoteCount: __expectInt32(output.YesVoteCount), - } as any; -}; - -/** - * deserializeAws_restJson1ProposalActions - */ -const de_ProposalActions = (output: any, context: __SerdeContext): ProposalActions => { - return { - Invitations: output.Invitations != null ? de_InviteActionList(output.Invitations, context) : undefined, - Removals: output.Removals != null ? de_RemoveActionList(output.Removals, context) : undefined, - } as any; -}; + return take(output, { + Actions: _json, + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + ExpirationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + NetworkId: __expectString, + NoVoteCount: __expectInt32, + OutstandingVoteCount: __expectInt32, + ProposalId: __expectString, + ProposedByMemberId: __expectString, + ProposedByMemberName: __expectString, + Status: __expectString, + Tags: _json, + YesVoteCount: __expectInt32, + }) as any; +}; + +// de_ProposalActions omitted. /** * deserializeAws_restJson1ProposalSummary */ const de_ProposalSummary = (output: any, context: __SerdeContext): ProposalSummary => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationDate)) : undefined, - Description: __expectString(output.Description), - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ExpirationDate)) - : undefined, - ProposalId: __expectString(output.ProposalId), - ProposedByMemberId: __expectString(output.ProposedByMemberId), - ProposedByMemberName: __expectString(output.ProposedByMemberName), - Status: __expectString(output.Status), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + ExpirationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ProposalId: __expectString, + ProposedByMemberId: __expectString, + ProposedByMemberName: __expectString, + Status: __expectString, + }) as any; }; /** @@ -3420,75 +3015,20 @@ const de_ProposalSummaryList = (output: any, context: __SerdeContext): ProposalS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProposalSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ProposalVoteList - */ -const de_ProposalVoteList = (output: any, context: __SerdeContext): VoteSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VoteSummary(entry, context); - }); - return retVal; -}; +// de_ProposalVoteList omitted. -/** - * deserializeAws_restJson1RemoveAction - */ -const de_RemoveAction = (output: any, context: __SerdeContext): RemoveAction => { - return { - MemberId: __expectString(output.MemberId), - } as any; -}; +// de_RemoveAction omitted. -/** - * deserializeAws_restJson1RemoveActionList - */ -const de_RemoveActionList = (output: any, context: __SerdeContext): RemoveAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RemoveAction(entry, context); - }); - return retVal; -}; +// de_RemoveActionList omitted. -/** - * deserializeAws_restJson1VoteSummary - */ -const de_VoteSummary = (output: any, context: __SerdeContext): VoteSummary => { - return { - MemberId: __expectString(output.MemberId), - MemberName: __expectString(output.MemberName), - Vote: __expectString(output.Vote), - } as any; -}; +// de_VoteSummary omitted. -/** - * deserializeAws_restJson1VotingPolicy - */ -const de_VotingPolicy = (output: any, context: __SerdeContext): VotingPolicy => { - return { - ApprovalThresholdPolicy: - output.ApprovalThresholdPolicy != null - ? de_ApprovalThresholdPolicy(output.ApprovalThresholdPolicy, context) - : undefined, - } as any; -}; +// de_VotingPolicy omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-marketplace-catalog/src/protocols/Aws_restJson1.ts b/clients/client-marketplace-catalog/src/protocols/Aws_restJson1.ts index 06c8bf324a1c..b095c4d06966 100644 --- a/clients/client-marketplace-catalog/src/protocols/Aws_restJson1.ts +++ b/clients/client-marketplace-catalog/src/protocols/Aws_restJson1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -38,11 +40,7 @@ import { MarketplaceCatalogServiceException as __BaseException } from "../models import { AccessDeniedException, Change, - ChangeSetSummaryListItem, - ChangeSummary, Entity, - EntitySummary, - ErrorDetail, Filter, InternalServiceException, ResourceInUseException, @@ -201,13 +199,15 @@ export const se_ListChangeSetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListChangeSets"; let body: any; - body = JSON.stringify({ - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.FilterList != null && { FilterList: se_FilterList(input.FilterList, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Sort != null && { Sort: se_Sort(input.Sort, context) }), - }); + body = JSON.stringify( + take(input, { + Catalog: [], + FilterList: (_) => _json(_), + MaxResults: [], + NextToken: [], + Sort: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -232,15 +232,17 @@ export const se_ListEntitiesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListEntities"; let body: any; - body = JSON.stringify({ - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.EntityType != null && { EntityType: input.EntityType }), - ...(input.FilterList != null && { FilterList: se_FilterList(input.FilterList, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OwnershipType != null && { OwnershipType: input.OwnershipType }), - ...(input.Sort != null && { Sort: se_Sort(input.Sort, context) }), - }); + body = JSON.stringify( + take(input, { + Catalog: [], + EntityType: [], + FilterList: (_) => _json(_), + MaxResults: [], + NextToken: [], + OwnershipType: [], + Sort: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -265,9 +267,11 @@ export const se_ListTagsForResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -292,10 +296,12 @@ export const se_PutResourcePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutResourcePolicy"; let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -320,13 +326,15 @@ export const se_StartChangeSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartChangeSet"; let body: any; - body = JSON.stringify({ - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.ChangeSet != null && { ChangeSet: se_RequestedChangeList(input.ChangeSet, context) }), - ...(input.ChangeSetName != null && { ChangeSetName: input.ChangeSetName }), - ...(input.ChangeSetTags != null && { ChangeSetTags: se_TagList(input.ChangeSetTags, context) }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + Catalog: [], + ChangeSet: (_) => _json(_), + ChangeSetName: [], + ChangeSetTags: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -351,10 +359,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -379,10 +389,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -408,12 +420,11 @@ export const de_CancelChangeSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeSetArn != null) { - contents.ChangeSetArn = __expectString(data.ChangeSetArn); - } - if (data.ChangeSetId != null) { - contents.ChangeSetId = __expectString(data.ChangeSetId); - } + const doc = take(data, { + ChangeSetArn: __expectString, + ChangeSetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -450,10 +461,9 @@ const de_CancelChangeSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -506,10 +516,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -529,33 +538,18 @@ export const de_DescribeChangeSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeSet != null) { - contents.ChangeSet = de_ChangeSetDescription(data.ChangeSet, context); - } - if (data.ChangeSetArn != null) { - contents.ChangeSetArn = __expectString(data.ChangeSetArn); - } - if (data.ChangeSetId != null) { - contents.ChangeSetId = __expectString(data.ChangeSetId); - } - if (data.ChangeSetName != null) { - contents.ChangeSetName = __expectString(data.ChangeSetName); - } - if (data.EndTime != null) { - contents.EndTime = __expectString(data.EndTime); - } - if (data.FailureCode != null) { - contents.FailureCode = __expectString(data.FailureCode); - } - if (data.FailureDescription != null) { - contents.FailureDescription = __expectString(data.FailureDescription); - } - if (data.StartTime != null) { - contents.StartTime = __expectString(data.StartTime); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + ChangeSet: _json, + ChangeSetArn: __expectString, + ChangeSetId: __expectString, + ChangeSetName: __expectString, + EndTime: __expectString, + FailureCode: __expectString, + FailureDescription: __expectString, + StartTime: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -589,10 +583,9 @@ const de_DescribeChangeSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -612,21 +605,14 @@ export const de_DescribeEntityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Details != null) { - contents.Details = __expectString(data.Details); - } - if (data.EntityArn != null) { - contents.EntityArn = __expectString(data.EntityArn); - } - if (data.EntityIdentifier != null) { - contents.EntityIdentifier = __expectString(data.EntityIdentifier); - } - if (data.EntityType != null) { - contents.EntityType = __expectString(data.EntityType); - } - if (data.LastModifiedDate != null) { - contents.LastModifiedDate = __expectString(data.LastModifiedDate); - } + const doc = take(data, { + Details: __expectString, + EntityArn: __expectString, + EntityIdentifier: __expectString, + EntityType: __expectString, + LastModifiedDate: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -663,10 +649,9 @@ const de_DescribeEntityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -686,9 +671,10 @@ export const de_GetResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -722,10 +708,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -745,12 +730,11 @@ export const de_ListChangeSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeSetSummaryList != null) { - contents.ChangeSetSummaryList = de_ChangeSetSummaryList(data.ChangeSetSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ChangeSetSummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -781,10 +765,9 @@ const de_ListChangeSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -804,12 +787,11 @@ export const de_ListEntitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EntitySummaryList != null) { - contents.EntitySummaryList = de_EntitySummaryList(data.EntitySummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EntitySummaryList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -843,10 +825,9 @@ const de_ListEntitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -866,12 +847,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + ResourceArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -905,10 +885,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -961,10 +940,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -984,12 +962,11 @@ export const de_StartChangeSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeSetArn != null) { - contents.ChangeSetArn = __expectString(data.ChangeSetArn); - } - if (data.ChangeSetId != null) { - contents.ChangeSetId = __expectString(data.ChangeSetId); - } + const doc = take(data, { + ChangeSetArn: __expectString, + ChangeSetId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1029,10 +1006,9 @@ const de_StartChangeSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1085,10 +1061,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1141,16 +1116,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1160,9 +1134,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1179,9 +1154,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1198,9 +1174,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1217,9 +1194,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1236,9 +1214,10 @@ const de_ResourceNotSupportedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1255,9 +1234,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1271,9 +1251,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1287,9 +1268,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1297,276 +1279,49 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Change - */ -const se_Change = (input: Change, context: __SerdeContext): any => { - return { - ...(input.ChangeName != null && { ChangeName: input.ChangeName }), - ...(input.ChangeType != null && { ChangeType: input.ChangeType }), - ...(input.Details != null && { Details: input.Details }), - ...(input.Entity != null && { Entity: se_Entity(input.Entity, context) }), - ...(input.EntityTags != null && { EntityTags: se_TagList(input.EntityTags, context) }), - }; -}; +// se_Change omitted. -/** - * serializeAws_restJson1Entity - */ -const se_Entity = (input: Entity, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Entity omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ValueList != null && { ValueList: se_ValueList(input.ValueList, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1RequestedChangeList - */ -const se_RequestedChangeList = (input: Change[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Change(entry, context); - }); -}; +// se_RequestedChangeList omitted. -/** - * serializeAws_restJson1Sort - */ -const se_Sort = (input: Sort, context: __SerdeContext): any => { - return { - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_Sort omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1ValueList - */ -const se_ValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ValueList omitted. -/** - * deserializeAws_restJson1ChangeSetDescription - */ -const de_ChangeSetDescription = (output: any, context: __SerdeContext): ChangeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChangeSummary(entry, context); - }); - return retVal; -}; +// de_ChangeSetDescription omitted. -/** - * deserializeAws_restJson1ChangeSetSummaryList - */ -const de_ChangeSetSummaryList = (output: any, context: __SerdeContext): ChangeSetSummaryListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChangeSetSummaryListItem(entry, context); - }); - return retVal; -}; +// de_ChangeSetSummaryList omitted. -/** - * deserializeAws_restJson1ChangeSetSummaryListItem - */ -const de_ChangeSetSummaryListItem = (output: any, context: __SerdeContext): ChangeSetSummaryListItem => { - return { - ChangeSetArn: __expectString(output.ChangeSetArn), - ChangeSetId: __expectString(output.ChangeSetId), - ChangeSetName: __expectString(output.ChangeSetName), - EndTime: __expectString(output.EndTime), - EntityIdList: output.EntityIdList != null ? de_ResourceIdList(output.EntityIdList, context) : undefined, - FailureCode: __expectString(output.FailureCode), - StartTime: __expectString(output.StartTime), - Status: __expectString(output.Status), - } as any; -}; +// de_ChangeSetSummaryListItem omitted. -/** - * deserializeAws_restJson1ChangeSummary - */ -const de_ChangeSummary = (output: any, context: __SerdeContext): ChangeSummary => { - return { - ChangeName: __expectString(output.ChangeName), - ChangeType: __expectString(output.ChangeType), - Details: __expectString(output.Details), - Entity: output.Entity != null ? de_Entity(output.Entity, context) : undefined, - ErrorDetailList: output.ErrorDetailList != null ? de_ErrorDetailList(output.ErrorDetailList, context) : undefined, - } as any; -}; +// de_ChangeSummary omitted. -/** - * deserializeAws_restJson1Entity - */ -const de_Entity = (output: any, context: __SerdeContext): Entity => { - return { - Identifier: __expectString(output.Identifier), - Type: __expectString(output.Type), - } as any; -}; +// de_Entity omitted. -/** - * deserializeAws_restJson1EntitySummary - */ -const de_EntitySummary = (output: any, context: __SerdeContext): EntitySummary => { - return { - EntityArn: __expectString(output.EntityArn), - EntityId: __expectString(output.EntityId), - EntityType: __expectString(output.EntityType), - LastModifiedDate: __expectString(output.LastModifiedDate), - Name: __expectString(output.Name), - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_EntitySummary omitted. -/** - * deserializeAws_restJson1EntitySummaryList - */ -const de_EntitySummaryList = (output: any, context: __SerdeContext): EntitySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EntitySummary(entry, context); - }); - return retVal; -}; +// de_EntitySummaryList omitted. -/** - * deserializeAws_restJson1ErrorDetail - */ -const de_ErrorDetail = (output: any, context: __SerdeContext): ErrorDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; +// de_ErrorDetail omitted. -/** - * deserializeAws_restJson1ErrorDetailList - */ -const de_ErrorDetailList = (output: any, context: __SerdeContext): ErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorDetail(entry, context); - }); - return retVal; -}; +// de_ErrorDetailList omitted. -/** - * deserializeAws_restJson1ResourceIdList - */ -const de_ResourceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceIdList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-marketplace-commerce-analytics/src/protocols/Aws_json1_1.ts b/clients/client-marketplace-commerce-analytics/src/protocols/Aws_json1_1.ts index 6f51079ed1ec..125f3edfdd65 100644 --- a/clients/client-marketplace-commerce-analytics/src/protocols/Aws_json1_1.ts +++ b/clients/client-marketplace-commerce-analytics/src/protocols/Aws_json1_1.ts @@ -1,9 +1,10 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectString as __expectString, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -20,10 +21,8 @@ import { import { MarketplaceCommerceAnalyticsServiceException as __BaseException } from "../models/MarketplaceCommerceAnalyticsServiceException"; import { GenerateDataSetRequest, - GenerateDataSetResult, MarketplaceCommerceAnalyticsException, StartSupportDataExportRequest, - StartSupportDataExportResult, } from "../models/models_0"; /** @@ -64,12 +63,12 @@ export const de_GenerateDataSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GenerateDataSetResult(data, context); + contents = _json(data); const response: GenerateDataSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -90,10 +89,9 @@ const de_GenerateDataSetCommandError = async ( throw await de_MarketplaceCommerceAnalyticsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -111,12 +109,12 @@ export const de_StartSupportDataExportCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSupportDataExportResult(data, context); + contents = _json(data); const response: StartSupportDataExportCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -137,10 +135,9 @@ const de_StartSupportDataExportCommandError = async ( throw await de_MarketplaceCommerceAnalyticsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -154,7 +151,7 @@ const de_MarketplaceCommerceAnalyticsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MarketplaceCommerceAnalyticsException(body, context); + const deserialized: any = _json(body); const exception = new MarketplaceCommerceAnalyticsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -162,84 +159,43 @@ const de_MarketplaceCommerceAnalyticsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CustomerDefinedValues - */ -const se_CustomerDefinedValues = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CustomerDefinedValues omitted. /** * serializeAws_json1_1GenerateDataSetRequest */ const se_GenerateDataSetRequest = (input: GenerateDataSetRequest, context: __SerdeContext): any => { - return { - ...(input.customerDefinedValues != null && { - customerDefinedValues: se_CustomerDefinedValues(input.customerDefinedValues, context), - }), - ...(input.dataSetPublicationDate != null && { - dataSetPublicationDate: Math.round(input.dataSetPublicationDate.getTime() / 1000), - }), - ...(input.dataSetType != null && { dataSetType: input.dataSetType }), - ...(input.destinationS3BucketName != null && { destinationS3BucketName: input.destinationS3BucketName }), - ...(input.destinationS3Prefix != null && { destinationS3Prefix: input.destinationS3Prefix }), - ...(input.roleNameArn != null && { roleNameArn: input.roleNameArn }), - ...(input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }), - }; + return take(input, { + customerDefinedValues: _json, + dataSetPublicationDate: (_) => Math.round(_.getTime() / 1000), + dataSetType: [], + destinationS3BucketName: [], + destinationS3Prefix: [], + roleNameArn: [], + snsTopicArn: [], + }); }; /** * serializeAws_json1_1StartSupportDataExportRequest */ const se_StartSupportDataExportRequest = (input: StartSupportDataExportRequest, context: __SerdeContext): any => { - return { - ...(input.customerDefinedValues != null && { - customerDefinedValues: se_CustomerDefinedValues(input.customerDefinedValues, context), - }), - ...(input.dataSetType != null && { dataSetType: input.dataSetType }), - ...(input.destinationS3BucketName != null && { destinationS3BucketName: input.destinationS3BucketName }), - ...(input.destinationS3Prefix != null && { destinationS3Prefix: input.destinationS3Prefix }), - ...(input.fromDate != null && { fromDate: Math.round(input.fromDate.getTime() / 1000) }), - ...(input.roleNameArn != null && { roleNameArn: input.roleNameArn }), - ...(input.snsTopicArn != null && { snsTopicArn: input.snsTopicArn }), - }; + return take(input, { + customerDefinedValues: _json, + dataSetType: [], + destinationS3BucketName: [], + destinationS3Prefix: [], + fromDate: (_) => Math.round(_.getTime() / 1000), + roleNameArn: [], + snsTopicArn: [], + }); }; -/** - * deserializeAws_json1_1GenerateDataSetResult - */ -const de_GenerateDataSetResult = (output: any, context: __SerdeContext): GenerateDataSetResult => { - return { - dataSetRequestId: __expectString(output.dataSetRequestId), - } as any; -}; +// de_GenerateDataSetResult omitted. -/** - * deserializeAws_json1_1MarketplaceCommerceAnalyticsException - */ -const de_MarketplaceCommerceAnalyticsException = ( - output: any, - context: __SerdeContext -): MarketplaceCommerceAnalyticsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MarketplaceCommerceAnalyticsException omitted. -/** - * deserializeAws_json1_1StartSupportDataExportResult - */ -const de_StartSupportDataExportResult = (output: any, context: __SerdeContext): StartSupportDataExportResult => { - return { - dataSetRequestId: __expectString(output.dataSetRequestId), - } as any; -}; +// de_StartSupportDataExportResult omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -261,6 +217,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-marketplace-entitlement-service/src/protocols/Aws_json1_1.ts b/clients/client-marketplace-entitlement-service/src/protocols/Aws_json1_1.ts index 87eb3e7af86f..41bbdd5a7d51 100644 --- a/clients/client-marketplace-entitlement-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-marketplace-entitlement-service/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -23,7 +25,6 @@ import { MarketplaceEntitlementServiceServiceException as __BaseException } from import { Entitlement, EntitlementValue, - GetEntitlementFilterName, GetEntitlementsRequest, GetEntitlementsResult, InternalServiceErrorException, @@ -40,7 +41,7 @@ export const se_GetEntitlementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEntitlements"); let body: any; - body = JSON.stringify(se_GetEntitlementsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -61,7 +62,7 @@ export const de_GetEntitlementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -88,10 +89,9 @@ const de_GetEntitlementsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -105,7 +105,7 @@ const de_InternalServiceErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -121,7 +121,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -134,7 +134,7 @@ const de_InvalidParameterExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -142,59 +142,23 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1FilterValueList - */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValueList omitted. -/** - * serializeAws_json1_1GetEntitlementFilters - */ -const se_GetEntitlementFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [GetEntitlementFilterName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FilterValueList(value, context); - return acc; - }, - {} - ); -}; +// se_GetEntitlementFilters omitted. -/** - * serializeAws_json1_1GetEntitlementsRequest - */ -const se_GetEntitlementsRequest = (input: GetEntitlementsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_GetEntitlementFilters(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProductCode != null && { ProductCode: input.ProductCode }), - }; -}; +// se_GetEntitlementsRequest omitted. /** * deserializeAws_json1_1Entitlement */ const de_Entitlement = (output: any, context: __SerdeContext): Entitlement => { - return { - CustomerIdentifier: __expectString(output.CustomerIdentifier), - Dimension: __expectString(output.Dimension), - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationDate))) - : undefined, - ProductCode: __expectString(output.ProductCode), - Value: output.Value != null ? de_EntitlementValue(output.Value, context) : undefined, - } as any; + return take(output, { + CustomerIdentifier: __expectString, + Dimension: __expectString, + ExpirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProductCode: __expectString, + Value: (_: any) => de_EntitlementValue(_, context), + }) as any; }; /** @@ -204,9 +168,6 @@ const de_EntitlementList = (output: any, context: __SerdeContext): Entitlement[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Entitlement(entry, context); }); return retVal; @@ -216,50 +177,29 @@ const de_EntitlementList = (output: any, context: __SerdeContext): Entitlement[] * deserializeAws_json1_1EntitlementValue */ const de_EntitlementValue = (output: any, context: __SerdeContext): EntitlementValue => { - return { - BooleanValue: __expectBoolean(output.BooleanValue), - DoubleValue: __limitedParseDouble(output.DoubleValue), - IntegerValue: __expectInt32(output.IntegerValue), - StringValue: __expectString(output.StringValue), - } as any; + return take(output, { + BooleanValue: __expectBoolean, + DoubleValue: __limitedParseDouble, + IntegerValue: __expectInt32, + StringValue: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetEntitlementsResult */ const de_GetEntitlementsResult = (output: any, context: __SerdeContext): GetEntitlementsResult => { - return { - Entitlements: output.Entitlements != null ? de_EntitlementList(output.Entitlements, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Entitlements: (_: any) => de_EntitlementList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InternalServiceErrorException - */ -const de_InternalServiceErrorException = (output: any, context: __SerdeContext): InternalServiceErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServiceErrorException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -281,6 +221,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-marketplace-metering/src/protocols/Aws_json1_1.ts b/clients/client-marketplace-metering/src/protocols/Aws_json1_1.ts index 34196c0ef5b1..aaabcb60509b 100644 --- a/clients/client-marketplace-metering/src/protocols/Aws_json1_1.ts +++ b/clients/client-marketplace-metering/src/protocols/Aws_json1_1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -39,12 +41,10 @@ import { InvalidUsageAllocationsException, InvalidUsageDimensionException, MeterUsageRequest, - MeterUsageResult, PlatformNotSupportedException, RegisterUsageRequest, RegisterUsageResult, ResolveCustomerRequest, - ResolveCustomerResult, Tag, ThrottlingException, TimestampOutOfBoundsException, @@ -88,7 +88,7 @@ export const se_RegisterUsageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterUsage"); let body: any; - body = JSON.stringify(se_RegisterUsageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -101,7 +101,7 @@ export const se_ResolveCustomerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResolveCustomer"); let body: any; - body = JSON.stringify(se_ResolveCustomerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -122,7 +122,7 @@ export const de_BatchMeterUsageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -167,10 +167,9 @@ const de_BatchMeterUsageCommandError = async ( throw await de_TimestampOutOfBoundsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -188,12 +187,12 @@ export const de_MeterUsageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_MeterUsageResult(data, context); + contents = _json(data); const response: MeterUsageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -241,10 +240,9 @@ const de_MeterUsageCommandError = async ( throw await de_TimestampOutOfBoundsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -267,7 +265,7 @@ export const de_RegisterUsageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -309,10 +307,9 @@ const de_RegisterUsageCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -330,12 +327,12 @@ export const de_ResolveCustomerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResolveCustomerResult(data, context); + contents = _json(data); const response: ResolveCustomerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -368,10 +365,9 @@ const de_ResolveCustomerCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -385,7 +381,7 @@ const de_CustomerNotEntitledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomerNotEntitledException(body, context); + const deserialized: any = _json(body); const exception = new CustomerNotEntitledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -401,7 +397,7 @@ const de_DisabledApiExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DisabledApiException(body, context); + const deserialized: any = _json(body); const exception = new DisabledApiException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -417,7 +413,7 @@ const de_DuplicateRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateRequestException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -433,7 +429,7 @@ const de_ExpiredTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredTokenException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -449,7 +445,7 @@ const de_InternalServiceErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -465,7 +461,7 @@ const de_InvalidCustomerIdentifierExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCustomerIdentifierException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCustomerIdentifierException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -481,7 +477,7 @@ const de_InvalidEndpointRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEndpointRegionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEndpointRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -497,7 +493,7 @@ const de_InvalidProductCodeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidProductCodeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidProductCodeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -513,7 +509,7 @@ const de_InvalidPublicKeyVersionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPublicKeyVersionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPublicKeyVersionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -529,7 +525,7 @@ const de_InvalidRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRegionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -542,7 +538,7 @@ const de_InvalidRegionExceptionRes = async ( */ const de_InvalidTagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -558,7 +554,7 @@ const de_InvalidTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -574,7 +570,7 @@ const de_InvalidUsageAllocationsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUsageAllocationsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidUsageAllocationsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -590,7 +586,7 @@ const de_InvalidUsageDimensionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUsageDimensionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidUsageDimensionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -606,7 +602,7 @@ const de_PlatformNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PlatformNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new PlatformNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -619,7 +615,7 @@ const de_PlatformNotSupportedExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -635,7 +631,7 @@ const de_TimestampOutOfBoundsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TimestampOutOfBoundsException(body, context); + const deserialized: any = _json(body); const exception = new TimestampOutOfBoundsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -647,99 +643,49 @@ const de_TimestampOutOfBoundsExceptionRes = async ( * serializeAws_json1_1BatchMeterUsageRequest */ const se_BatchMeterUsageRequest = (input: BatchMeterUsageRequest, context: __SerdeContext): any => { - return { - ...(input.ProductCode != null && { ProductCode: input.ProductCode }), - ...(input.UsageRecords != null && { UsageRecords: se_UsageRecordList(input.UsageRecords, context) }), - }; + return take(input, { + ProductCode: [], + UsageRecords: (_) => se_UsageRecordList(_, context), + }); }; /** * serializeAws_json1_1MeterUsageRequest */ const se_MeterUsageRequest = (input: MeterUsageRequest, context: __SerdeContext): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.ProductCode != null && { ProductCode: input.ProductCode }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.UsageAllocations != null && { UsageAllocations: se_UsageAllocations(input.UsageAllocations, context) }), - ...(input.UsageDimension != null && { UsageDimension: input.UsageDimension }), - ...(input.UsageQuantity != null && { UsageQuantity: input.UsageQuantity }), - }; + return take(input, { + DryRun: [], + ProductCode: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + UsageAllocations: _json, + UsageDimension: [], + UsageQuantity: [], + }); }; -/** - * serializeAws_json1_1RegisterUsageRequest - */ -const se_RegisterUsageRequest = (input: RegisterUsageRequest, context: __SerdeContext): any => { - return { - ...(input.Nonce != null && { Nonce: input.Nonce }), - ...(input.ProductCode != null && { ProductCode: input.ProductCode }), - ...(input.PublicKeyVersion != null && { PublicKeyVersion: input.PublicKeyVersion }), - }; -}; +// se_RegisterUsageRequest omitted. -/** - * serializeAws_json1_1ResolveCustomerRequest - */ -const se_ResolveCustomerRequest = (input: ResolveCustomerRequest, context: __SerdeContext): any => { - return { - ...(input.RegistrationToken != null && { RegistrationToken: input.RegistrationToken }), - }; -}; +// se_ResolveCustomerRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1UsageAllocation - */ -const se_UsageAllocation = (input: UsageAllocation, context: __SerdeContext): any => { - return { - ...(input.AllocatedUsageQuantity != null && { AllocatedUsageQuantity: input.AllocatedUsageQuantity }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_UsageAllocation omitted. -/** - * serializeAws_json1_1UsageAllocations - */ -const se_UsageAllocations = (input: UsageAllocation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UsageAllocation(entry, context); - }); -}; +// se_UsageAllocations omitted. /** * serializeAws_json1_1UsageRecord */ const se_UsageRecord = (input: UsageRecord, context: __SerdeContext): any => { - return { - ...(input.CustomerIdentifier != null && { CustomerIdentifier: input.CustomerIdentifier }), - ...(input.Dimension != null && { Dimension: input.Dimension }), - ...(input.Quantity != null && { Quantity: input.Quantity }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.UsageAllocations != null && { UsageAllocations: se_UsageAllocations(input.UsageAllocations, context) }), - }; + return take(input, { + CustomerIdentifier: [], + Dimension: [], + Quantity: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + UsageAllocations: _json, + }); }; /** @@ -757,271 +703,79 @@ const se_UsageRecordList = (input: UsageRecord[], context: __SerdeContext): any * deserializeAws_json1_1BatchMeterUsageResult */ const de_BatchMeterUsageResult = (output: any, context: __SerdeContext): BatchMeterUsageResult => { - return { - Results: output.Results != null ? de_UsageRecordResultList(output.Results, context) : undefined, - UnprocessedRecords: - output.UnprocessedRecords != null ? de_UsageRecordList(output.UnprocessedRecords, context) : undefined, - } as any; + return take(output, { + Results: (_: any) => de_UsageRecordResultList(_, context), + UnprocessedRecords: (_: any) => de_UsageRecordList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CustomerNotEntitledException - */ -const de_CustomerNotEntitledException = (output: any, context: __SerdeContext): CustomerNotEntitledException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CustomerNotEntitledException omitted. -/** - * deserializeAws_json1_1DisabledApiException - */ -const de_DisabledApiException = (output: any, context: __SerdeContext): DisabledApiException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DisabledApiException omitted. -/** - * deserializeAws_json1_1DuplicateRequestException - */ -const de_DuplicateRequestException = (output: any, context: __SerdeContext): DuplicateRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DuplicateRequestException omitted. -/** - * deserializeAws_json1_1ExpiredTokenException - */ -const de_ExpiredTokenException = (output: any, context: __SerdeContext): ExpiredTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ExpiredTokenException omitted. -/** - * deserializeAws_json1_1InternalServiceErrorException - */ -const de_InternalServiceErrorException = (output: any, context: __SerdeContext): InternalServiceErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServiceErrorException omitted. -/** - * deserializeAws_json1_1InvalidCustomerIdentifierException - */ -const de_InvalidCustomerIdentifierException = ( - output: any, - context: __SerdeContext -): InvalidCustomerIdentifierException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidCustomerIdentifierException omitted. -/** - * deserializeAws_json1_1InvalidEndpointRegionException - */ -const de_InvalidEndpointRegionException = (output: any, context: __SerdeContext): InvalidEndpointRegionException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidEndpointRegionException omitted. -/** - * deserializeAws_json1_1InvalidProductCodeException - */ -const de_InvalidProductCodeException = (output: any, context: __SerdeContext): InvalidProductCodeException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidProductCodeException omitted. -/** - * deserializeAws_json1_1InvalidPublicKeyVersionException - */ -const de_InvalidPublicKeyVersionException = ( - output: any, - context: __SerdeContext -): InvalidPublicKeyVersionException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPublicKeyVersionException omitted. -/** - * deserializeAws_json1_1InvalidRegionException - */ -const de_InvalidRegionException = (output: any, context: __SerdeContext): InvalidRegionException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidRegionException omitted. -/** - * deserializeAws_json1_1InvalidTagException - */ -const de_InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTagException omitted. -/** - * deserializeAws_json1_1InvalidTokenException - */ -const de_InvalidTokenException = (output: any, context: __SerdeContext): InvalidTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidTokenException omitted. -/** - * deserializeAws_json1_1InvalidUsageAllocationsException - */ -const de_InvalidUsageAllocationsException = ( - output: any, - context: __SerdeContext -): InvalidUsageAllocationsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidUsageAllocationsException omitted. -/** - * deserializeAws_json1_1InvalidUsageDimensionException - */ -const de_InvalidUsageDimensionException = (output: any, context: __SerdeContext): InvalidUsageDimensionException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidUsageDimensionException omitted. -/** - * deserializeAws_json1_1MeterUsageResult - */ -const de_MeterUsageResult = (output: any, context: __SerdeContext): MeterUsageResult => { - return { - MeteringRecordId: __expectString(output.MeteringRecordId), - } as any; -}; +// de_MeterUsageResult omitted. -/** - * deserializeAws_json1_1PlatformNotSupportedException - */ -const de_PlatformNotSupportedException = (output: any, context: __SerdeContext): PlatformNotSupportedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PlatformNotSupportedException omitted. /** * deserializeAws_json1_1RegisterUsageResult */ const de_RegisterUsageResult = (output: any, context: __SerdeContext): RegisterUsageResult => { - return { - PublicKeyRotationTimestamp: - output.PublicKeyRotationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PublicKeyRotationTimestamp))) - : undefined, - Signature: __expectString(output.Signature), - } as any; + return take(output, { + PublicKeyRotationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Signature: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResolveCustomerResult - */ -const de_ResolveCustomerResult = (output: any, context: __SerdeContext): ResolveCustomerResult => { - return { - CustomerAWSAccountId: __expectString(output.CustomerAWSAccountId), - CustomerIdentifier: __expectString(output.CustomerIdentifier), - ProductCode: __expectString(output.ProductCode), - } as any; -}; +// de_ResolveCustomerResult omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1TimestampOutOfBoundsException - */ -const de_TimestampOutOfBoundsException = (output: any, context: __SerdeContext): TimestampOutOfBoundsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TimestampOutOfBoundsException omitted. -/** - * deserializeAws_json1_1UsageAllocation - */ -const de_UsageAllocation = (output: any, context: __SerdeContext): UsageAllocation => { - return { - AllocatedUsageQuantity: __expectInt32(output.AllocatedUsageQuantity), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_UsageAllocation omitted. -/** - * deserializeAws_json1_1UsageAllocations - */ -const de_UsageAllocations = (output: any, context: __SerdeContext): UsageAllocation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UsageAllocation(entry, context); - }); - return retVal; -}; +// de_UsageAllocations omitted. /** * deserializeAws_json1_1UsageRecord */ const de_UsageRecord = (output: any, context: __SerdeContext): UsageRecord => { - return { - CustomerIdentifier: __expectString(output.CustomerIdentifier), - Dimension: __expectString(output.Dimension), - Quantity: __expectInt32(output.Quantity), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - UsageAllocations: - output.UsageAllocations != null ? de_UsageAllocations(output.UsageAllocations, context) : undefined, - } as any; + return take(output, { + CustomerIdentifier: __expectString, + Dimension: __expectString, + Quantity: __expectInt32, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UsageAllocations: _json, + }) as any; }; /** @@ -1031,9 +785,6 @@ const de_UsageRecordList = (output: any, context: __SerdeContext): UsageRecord[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageRecord(entry, context); }); return retVal; @@ -1043,11 +794,11 @@ const de_UsageRecordList = (output: any, context: __SerdeContext): UsageRecord[] * deserializeAws_json1_1UsageRecordResult */ const de_UsageRecordResult = (output: any, context: __SerdeContext): UsageRecordResult => { - return { - MeteringRecordId: __expectString(output.MeteringRecordId), - Status: __expectString(output.Status), - UsageRecord: output.UsageRecord != null ? de_UsageRecord(output.UsageRecord, context) : undefined, - } as any; + return take(output, { + MeteringRecordId: __expectString, + Status: __expectString, + UsageRecord: (_: any) => de_UsageRecord(_, context), + }) as any; }; /** @@ -1057,9 +808,6 @@ const de_UsageRecordResultList = (output: any, context: __SerdeContext): UsageRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UsageRecordResult(entry, context); }); return retVal; @@ -1085,6 +833,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-mediaconnect/src/protocols/Aws_restJson1.ts b/clients/client-mediaconnect/src/protocols/Aws_restJson1.ts index 2ac941b8a1b9..d632ff981c87 100644 --- a/clients/client-mediaconnect/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediaconnect/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -216,9 +218,11 @@ export const se_AddBridgeOutputsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/bridges/{BridgeArn}/outputs"; resolvedPath = __resolvedPath(resolvedPath, input, "BridgeArn", () => input.BridgeArn!, "{BridgeArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Outputs != null && { outputs: se___listOfAddBridgeOutputRequest(input.Outputs, context) }), - }); + body = JSON.stringify( + take(input, { + outputs: [, (_) => se___listOfAddBridgeOutputRequest(_, context), `Outputs`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -245,9 +249,11 @@ export const se_AddBridgeSourcesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/bridges/{BridgeArn}/sources"; resolvedPath = __resolvedPath(resolvedPath, input, "BridgeArn", () => input.BridgeArn!, "{BridgeArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Sources != null && { sources: se___listOfAddBridgeSourceRequest(input.Sources, context) }), - }); + body = JSON.stringify( + take(input, { + sources: [, (_) => se___listOfAddBridgeSourceRequest(_, context), `Sources`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -274,9 +280,11 @@ export const se_AddFlowMediaStreamsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows/{FlowArn}/mediaStreams"; resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.MediaStreams != null && { mediaStreams: se___listOfAddMediaStreamRequest(input.MediaStreams, context) }), - }); + body = JSON.stringify( + take(input, { + mediaStreams: [, (_) => se___listOfAddMediaStreamRequest(_, context), `MediaStreams`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -303,9 +311,11 @@ export const se_AddFlowOutputsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows/{FlowArn}/outputs"; resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Outputs != null && { outputs: se___listOfAddOutputRequest(input.Outputs, context) }), - }); + body = JSON.stringify( + take(input, { + outputs: [, (_) => se___listOfAddOutputRequest(_, context), `Outputs`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -332,9 +342,11 @@ export const se_AddFlowSourcesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows/{FlowArn}/source"; resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Sources != null && { sources: se___listOfSetSourceRequest(input.Sources, context) }), - }); + body = JSON.stringify( + take(input, { + sources: [, (_) => se___listOfSetSourceRequest(_, context), `Sources`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -361,9 +373,11 @@ export const se_AddFlowVpcInterfacesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows/{FlowArn}/vpcInterfaces"; resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.VpcInterfaces != null && { vpcInterfaces: se___listOfVpcInterfaceRequest(input.VpcInterfaces, context) }), - }); + body = JSON.stringify( + take(input, { + vpcInterfaces: [, (_) => se___listOfVpcInterfaceRequest(_, context), `VpcInterfaces`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -388,21 +402,17 @@ export const se_CreateBridgeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/bridges"; let body: any; - body = JSON.stringify({ - ...(input.EgressGatewayBridge != null && { - egressGatewayBridge: se_AddEgressGatewayBridgeRequest(input.EgressGatewayBridge, context), - }), - ...(input.IngressGatewayBridge != null && { - ingressGatewayBridge: se_AddIngressGatewayBridgeRequest(input.IngressGatewayBridge, context), - }), - ...(input.Name != null && { name: input.Name }), - ...(input.Outputs != null && { outputs: se___listOfAddBridgeOutputRequest(input.Outputs, context) }), - ...(input.PlacementArn != null && { placementArn: input.PlacementArn }), - ...(input.SourceFailoverConfig != null && { - sourceFailoverConfig: se_FailoverConfig(input.SourceFailoverConfig, context), - }), - ...(input.Sources != null && { sources: se___listOfAddBridgeSourceRequest(input.Sources, context) }), - }); + body = JSON.stringify( + take(input, { + egressGatewayBridge: [, (_) => se_AddEgressGatewayBridgeRequest(_, context), `EgressGatewayBridge`], + ingressGatewayBridge: [, (_) => se_AddIngressGatewayBridgeRequest(_, context), `IngressGatewayBridge`], + name: [, , `Name`], + outputs: [, (_) => se___listOfAddBridgeOutputRequest(_, context), `Outputs`], + placementArn: [, , `PlacementArn`], + sourceFailoverConfig: [, (_) => se_FailoverConfig(_, context), `SourceFailoverConfig`], + sources: [, (_) => se___listOfAddBridgeSourceRequest(_, context), `Sources`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -427,22 +437,20 @@ export const se_CreateFlowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows"; let body: any; - body = JSON.stringify({ - ...(input.AvailabilityZone != null && { availabilityZone: input.AvailabilityZone }), - ...(input.Entitlements != null && { - entitlements: se___listOfGrantEntitlementRequest(input.Entitlements, context), - }), - ...(input.Maintenance != null && { maintenance: se_AddMaintenance(input.Maintenance, context) }), - ...(input.MediaStreams != null && { mediaStreams: se___listOfAddMediaStreamRequest(input.MediaStreams, context) }), - ...(input.Name != null && { name: input.Name }), - ...(input.Outputs != null && { outputs: se___listOfAddOutputRequest(input.Outputs, context) }), - ...(input.Source != null && { source: se_SetSourceRequest(input.Source, context) }), - ...(input.SourceFailoverConfig != null && { - sourceFailoverConfig: se_FailoverConfig(input.SourceFailoverConfig, context), - }), - ...(input.Sources != null && { sources: se___listOfSetSourceRequest(input.Sources, context) }), - ...(input.VpcInterfaces != null && { vpcInterfaces: se___listOfVpcInterfaceRequest(input.VpcInterfaces, context) }), - }); + body = JSON.stringify( + take(input, { + availabilityZone: [, , `AvailabilityZone`], + entitlements: [, (_) => se___listOfGrantEntitlementRequest(_, context), `Entitlements`], + maintenance: [, (_) => se_AddMaintenance(_, context), `Maintenance`], + mediaStreams: [, (_) => se___listOfAddMediaStreamRequest(_, context), `MediaStreams`], + name: [, , `Name`], + outputs: [, (_) => se___listOfAddOutputRequest(_, context), `Outputs`], + source: [, (_) => se_SetSourceRequest(_, context), `Source`], + sourceFailoverConfig: [, (_) => se_FailoverConfig(_, context), `SourceFailoverConfig`], + sources: [, (_) => se___listOfSetSourceRequest(_, context), `Sources`], + vpcInterfaces: [, (_) => se___listOfVpcInterfaceRequest(_, context), `VpcInterfaces`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -467,11 +475,13 @@ export const se_CreateGatewayCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/gateways"; let body: any; - body = JSON.stringify({ - ...(input.EgressCidrBlocks != null && { egressCidrBlocks: se___listOf__string(input.EgressCidrBlocks, context) }), - ...(input.Name != null && { name: input.Name }), - ...(input.Networks != null && { networks: se___listOfGatewayNetwork(input.Networks, context) }), - }); + body = JSON.stringify( + take(input, { + egressCidrBlocks: [, (_) => _json(_), `EgressCidrBlocks`], + name: [, , `Name`], + networks: [, (_) => se___listOfGatewayNetwork(_, context), `Networks`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -761,11 +771,11 @@ export const se_GrantFlowEntitlementsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows/{FlowArn}/entitlements"; resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Entitlements != null && { - entitlements: se___listOfGrantEntitlementRequest(input.Entitlements, context), - }), - }); + body = JSON.stringify( + take(input, { + entitlements: [, (_) => se___listOfGrantEntitlementRequest(_, context), `Entitlements`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1006,10 +1016,12 @@ export const se_PurchaseOfferingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/offerings/{OfferingArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "OfferingArn", () => input.OfferingArn!, "{OfferingArn}", false); let body: any; - body = JSON.stringify({ - ...(input.ReservationName != null && { reservationName: input.ReservationName }), - ...(input.Start != null && { start: input.Start }), - }); + body = JSON.stringify( + take(input, { + reservationName: [, , `ReservationName`], + start: [, , `Start`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1283,9 +1295,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1341,17 +1355,13 @@ export const se_UpdateBridgeCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/bridges/{BridgeArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "BridgeArn", () => input.BridgeArn!, "{BridgeArn}", false); let body: any; - body = JSON.stringify({ - ...(input.EgressGatewayBridge != null && { - egressGatewayBridge: se_UpdateEgressGatewayBridgeRequest(input.EgressGatewayBridge, context), - }), - ...(input.IngressGatewayBridge != null && { - ingressGatewayBridge: se_UpdateIngressGatewayBridgeRequest(input.IngressGatewayBridge, context), - }), - ...(input.SourceFailoverConfig != null && { - sourceFailoverConfig: se_UpdateFailoverConfig(input.SourceFailoverConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + egressGatewayBridge: [, (_) => se_UpdateEgressGatewayBridgeRequest(_, context), `EgressGatewayBridge`], + ingressGatewayBridge: [, (_) => se_UpdateIngressGatewayBridgeRequest(_, context), `IngressGatewayBridge`], + sourceFailoverConfig: [, (_) => se_UpdateFailoverConfig(_, context), `SourceFailoverConfig`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1380,11 +1390,11 @@ export const se_UpdateBridgeOutputCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "BridgeArn", () => input.BridgeArn!, "{BridgeArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "OutputName", () => input.OutputName!, "{OutputName}", false); let body: any; - body = JSON.stringify({ - ...(input.NetworkOutput != null && { - networkOutput: se_UpdateBridgeNetworkOutputRequest(input.NetworkOutput, context), - }), - }); + body = JSON.stringify( + take(input, { + networkOutput: [, (_) => se_UpdateBridgeNetworkOutputRequest(_, context), `NetworkOutput`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1413,12 +1423,12 @@ export const se_UpdateBridgeSourceCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "BridgeArn", () => input.BridgeArn!, "{BridgeArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "SourceName", () => input.SourceName!, "{SourceName}", false); let body: any; - body = JSON.stringify({ - ...(input.FlowSource != null && { flowSource: se_UpdateBridgeFlowSourceRequest(input.FlowSource, context) }), - ...(input.NetworkSource != null && { - networkSource: se_UpdateBridgeNetworkSourceRequest(input.NetworkSource, context), - }), - }); + body = JSON.stringify( + take(input, { + flowSource: [, (_) => se_UpdateBridgeFlowSourceRequest(_, context), `FlowSource`], + networkSource: [, (_) => se_UpdateBridgeNetworkSourceRequest(_, context), `NetworkSource`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1445,9 +1455,11 @@ export const se_UpdateBridgeStateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/bridges/{BridgeArn}/state"; resolvedPath = __resolvedPath(resolvedPath, input, "BridgeArn", () => input.BridgeArn!, "{BridgeArn}", false); let body: any; - body = JSON.stringify({ - ...(input.DesiredState != null && { desiredState: input.DesiredState }), - }); + body = JSON.stringify( + take(input, { + desiredState: [, , `DesiredState`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1473,12 +1485,12 @@ export const se_UpdateFlowCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/flows/{FlowArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Maintenance != null && { maintenance: se_UpdateMaintenance(input.Maintenance, context) }), - ...(input.SourceFailoverConfig != null && { - sourceFailoverConfig: se_UpdateFailoverConfig(input.SourceFailoverConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + maintenance: [, (_) => se_UpdateMaintenance(_, context), `Maintenance`], + sourceFailoverConfig: [, (_) => se_UpdateFailoverConfig(_, context), `SourceFailoverConfig`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1514,12 +1526,14 @@ export const se_UpdateFlowEntitlementCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.Encryption != null && { encryption: se_UpdateEncryption(input.Encryption, context) }), - ...(input.EntitlementStatus != null && { entitlementStatus: input.EntitlementStatus }), - ...(input.Subscribers != null && { subscribers: se___listOf__string(input.Subscribers, context) }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + encryption: [, (_) => se_UpdateEncryption(_, context), `Encryption`], + entitlementStatus: [, , `EntitlementStatus`], + subscribers: [, (_) => _json(_), `Subscribers`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1555,13 +1569,15 @@ export const se_UpdateFlowMediaStreamCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Attributes != null && { attributes: se_MediaStreamAttributesRequest(input.Attributes, context) }), - ...(input.ClockRate != null && { clockRate: input.ClockRate }), - ...(input.Description != null && { description: input.Description }), - ...(input.MediaStreamType != null && { mediaStreamType: input.MediaStreamType }), - ...(input.VideoFormat != null && { videoFormat: input.VideoFormat }), - }); + body = JSON.stringify( + take(input, { + attributes: [, (_) => se_MediaStreamAttributesRequest(_, context), `Attributes`], + clockRate: [, , `ClockRate`], + description: [, , `Description`], + mediaStreamType: [, , `MediaStreamType`], + videoFormat: [, , `VideoFormat`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1589,30 +1605,29 @@ export const se_UpdateFlowOutputCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "OutputArn", () => input.OutputArn!, "{OutputArn}", false); let body: any; - body = JSON.stringify({ - ...(input.CidrAllowList != null && { cidrAllowList: se___listOf__string(input.CidrAllowList, context) }), - ...(input.Description != null && { description: input.Description }), - ...(input.Destination != null && { destination: input.Destination }), - ...(input.Encryption != null && { encryption: se_UpdateEncryption(input.Encryption, context) }), - ...(input.MaxLatency != null && { maxLatency: input.MaxLatency }), - ...(input.MediaStreamOutputConfigurations != null && { - mediaStreamOutputConfigurations: se___listOfMediaStreamOutputConfigurationRequest( - input.MediaStreamOutputConfigurations, - context - ), - }), - ...(input.MinLatency != null && { minLatency: input.MinLatency }), - ...(input.Port != null && { port: input.Port }), - ...(input.Protocol != null && { protocol: input.Protocol }), - ...(input.RemoteId != null && { remoteId: input.RemoteId }), - ...(input.SenderControlPort != null && { senderControlPort: input.SenderControlPort }), - ...(input.SenderIpAddress != null && { senderIpAddress: input.SenderIpAddress }), - ...(input.SmoothingLatency != null && { smoothingLatency: input.SmoothingLatency }), - ...(input.StreamId != null && { streamId: input.StreamId }), - ...(input.VpcInterfaceAttachment != null && { - vpcInterfaceAttachment: se_VpcInterfaceAttachment(input.VpcInterfaceAttachment, context), - }), - }); + body = JSON.stringify( + take(input, { + cidrAllowList: [, (_) => _json(_), `CidrAllowList`], + description: [, , `Description`], + destination: [, , `Destination`], + encryption: [, (_) => se_UpdateEncryption(_, context), `Encryption`], + maxLatency: [, , `MaxLatency`], + mediaStreamOutputConfigurations: [ + , + (_) => se___listOfMediaStreamOutputConfigurationRequest(_, context), + `MediaStreamOutputConfigurations`, + ], + minLatency: [, , `MinLatency`], + port: [, , `Port`], + protocol: [, , `Protocol`], + remoteId: [, , `RemoteId`], + senderControlPort: [, , `SenderControlPort`], + senderIpAddress: [, , `SenderIpAddress`], + smoothingLatency: [, , `SmoothingLatency`], + streamId: [, , `StreamId`], + vpcInterfaceAttachment: [, (_) => se_VpcInterfaceAttachment(_, context), `VpcInterfaceAttachment`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1640,33 +1655,32 @@ export const se_UpdateFlowSourceCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "FlowArn", () => input.FlowArn!, "{FlowArn}", false); resolvedPath = __resolvedPath(resolvedPath, input, "SourceArn", () => input.SourceArn!, "{SourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Decryption != null && { decryption: se_UpdateEncryption(input.Decryption, context) }), - ...(input.Description != null && { description: input.Description }), - ...(input.EntitlementArn != null && { entitlementArn: input.EntitlementArn }), - ...(input.GatewayBridgeSource != null && { - gatewayBridgeSource: se_UpdateGatewayBridgeSourceRequest(input.GatewayBridgeSource, context), - }), - ...(input.IngestPort != null && { ingestPort: input.IngestPort }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MaxLatency != null && { maxLatency: input.MaxLatency }), - ...(input.MaxSyncBuffer != null && { maxSyncBuffer: input.MaxSyncBuffer }), - ...(input.MediaStreamSourceConfigurations != null && { - mediaStreamSourceConfigurations: se___listOfMediaStreamSourceConfigurationRequest( - input.MediaStreamSourceConfigurations, - context - ), - }), - ...(input.MinLatency != null && { minLatency: input.MinLatency }), - ...(input.Protocol != null && { protocol: input.Protocol }), - ...(input.SenderControlPort != null && { senderControlPort: input.SenderControlPort }), - ...(input.SenderIpAddress != null && { senderIpAddress: input.SenderIpAddress }), - ...(input.SourceListenerAddress != null && { sourceListenerAddress: input.SourceListenerAddress }), - ...(input.SourceListenerPort != null && { sourceListenerPort: input.SourceListenerPort }), - ...(input.StreamId != null && { streamId: input.StreamId }), - ...(input.VpcInterfaceName != null && { vpcInterfaceName: input.VpcInterfaceName }), - ...(input.WhitelistCidr != null && { whitelistCidr: input.WhitelistCidr }), - }); + body = JSON.stringify( + take(input, { + decryption: [, (_) => se_UpdateEncryption(_, context), `Decryption`], + description: [, , `Description`], + entitlementArn: [, , `EntitlementArn`], + gatewayBridgeSource: [, (_) => se_UpdateGatewayBridgeSourceRequest(_, context), `GatewayBridgeSource`], + ingestPort: [, , `IngestPort`], + maxBitrate: [, , `MaxBitrate`], + maxLatency: [, , `MaxLatency`], + maxSyncBuffer: [, , `MaxSyncBuffer`], + mediaStreamSourceConfigurations: [ + , + (_) => se___listOfMediaStreamSourceConfigurationRequest(_, context), + `MediaStreamSourceConfigurations`, + ], + minLatency: [, , `MinLatency`], + protocol: [, , `Protocol`], + senderControlPort: [, , `SenderControlPort`], + senderIpAddress: [, , `SenderIpAddress`], + sourceListenerAddress: [, , `SourceListenerAddress`], + sourceListenerPort: [, , `SourceListenerPort`], + streamId: [, , `StreamId`], + vpcInterfaceName: [, , `VpcInterfaceName`], + whitelistCidr: [, , `WhitelistCidr`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1701,9 +1715,11 @@ export const se_UpdateGatewayInstanceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BridgePlacement != null && { bridgePlacement: input.BridgePlacement }), - }); + body = JSON.stringify( + take(input, { + bridgePlacement: [, , `BridgePlacement`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1729,12 +1745,11 @@ export const de_AddBridgeOutputsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.outputs != null) { - contents.Outputs = de___listOfBridgeOutput(data.outputs, context); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + Outputs: [, (_) => de___listOfBridgeOutput(_, context), `outputs`], + }); + Object.assign(contents, doc); return contents; }; @@ -1774,10 +1789,9 @@ const de_AddBridgeOutputsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1797,12 +1811,11 @@ export const de_AddBridgeSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.sources != null) { - contents.Sources = de___listOfBridgeSource(data.sources, context); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + Sources: [, (_) => de___listOfBridgeSource(_, context), `sources`], + }); + Object.assign(contents, doc); return contents; }; @@ -1842,10 +1855,9 @@ const de_AddBridgeSourcesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1865,12 +1877,11 @@ export const de_AddFlowMediaStreamsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.mediaStreams != null) { - contents.MediaStreams = de___listOfMediaStream(data.mediaStreams, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + MediaStreams: [, (_) => de___listOfMediaStream(_, context), `mediaStreams`], + }); + Object.assign(contents, doc); return contents; }; @@ -1907,10 +1918,9 @@ const de_AddFlowMediaStreamsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1930,12 +1940,11 @@ export const de_AddFlowOutputsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.outputs != null) { - contents.Outputs = de___listOfOutput(data.outputs, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Outputs: [, (_) => de___listOfOutput(_, context), `outputs`], + }); + Object.assign(contents, doc); return contents; }; @@ -1975,10 +1984,9 @@ const de_AddFlowOutputsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1998,12 +2006,11 @@ export const de_AddFlowSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.sources != null) { - contents.Sources = de___listOfSource(data.sources, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Sources: [, (_) => de___listOfSource(_, context), `sources`], + }); + Object.assign(contents, doc); return contents; }; @@ -2040,10 +2047,9 @@ const de_AddFlowSourcesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2063,12 +2069,11 @@ export const de_AddFlowVpcInterfacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.vpcInterfaces != null) { - contents.VpcInterfaces = de___listOfVpcInterface(data.vpcInterfaces, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + VpcInterfaces: [, (_) => de___listOfVpcInterface(_, context), `vpcInterfaces`], + }); + Object.assign(contents, doc); return contents; }; @@ -2105,10 +2110,9 @@ const de_AddFlowVpcInterfacesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2128,9 +2132,10 @@ export const de_CreateBridgeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridge != null) { - contents.Bridge = de_Bridge(data.bridge, context); - } + const doc = take(data, { + Bridge: [, (_) => de_Bridge(_, context), `bridge`], + }); + Object.assign(contents, doc); return contents; }; @@ -2170,10 +2175,9 @@ const de_CreateBridgeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2193,9 +2197,10 @@ export const de_CreateFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flow != null) { - contents.Flow = de_Flow(data.flow, context); - } + const doc = take(data, { + Flow: [, (_) => de_Flow(_, context), `flow`], + }); + Object.assign(contents, doc); return contents; }; @@ -2232,10 +2237,9 @@ const de_CreateFlowCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2255,9 +2259,10 @@ export const de_CreateGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gateway != null) { - contents.Gateway = de_Gateway(data.gateway, context); - } + const doc = take(data, { + Gateway: [, (_) => de_Gateway(_, context), `gateway`], + }); + Object.assign(contents, doc); return contents; }; @@ -2297,10 +2302,9 @@ const de_CreateGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2320,9 +2324,10 @@ export const de_DeleteBridgeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -2362,10 +2367,9 @@ const de_DeleteBridgeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2385,12 +2389,11 @@ export const de_DeleteFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -2427,10 +2430,9 @@ const de_DeleteFlowCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2450,9 +2452,10 @@ export const de_DeleteGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gatewayArn != null) { - contents.GatewayArn = __expectString(data.gatewayArn); - } + const doc = take(data, { + GatewayArn: [, __expectString, `gatewayArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -2492,10 +2495,9 @@ const de_DeleteGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2515,12 +2517,11 @@ export const de_DeregisterGatewayInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gatewayInstanceArn != null) { - contents.GatewayInstanceArn = __expectString(data.gatewayInstanceArn); - } - if (data.instanceState != null) { - contents.InstanceState = __expectString(data.instanceState); - } + const doc = take(data, { + GatewayInstanceArn: [, __expectString, `gatewayInstanceArn`], + InstanceState: [, __expectString, `instanceState`], + }); + Object.assign(contents, doc); return contents; }; @@ -2560,10 +2561,9 @@ const de_DeregisterGatewayInstanceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2583,9 +2583,10 @@ export const de_DescribeBridgeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridge != null) { - contents.Bridge = de_Bridge(data.bridge, context); - } + const doc = take(data, { + Bridge: [, (_) => de_Bridge(_, context), `bridge`], + }); + Object.assign(contents, doc); return contents; }; @@ -2625,10 +2626,9 @@ const de_DescribeBridgeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2648,12 +2648,11 @@ export const de_DescribeFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flow != null) { - contents.Flow = de_Flow(data.flow, context); - } - if (data.messages != null) { - contents.Messages = de_Messages(data.messages, context); - } + const doc = take(data, { + Flow: [, (_) => de_Flow(_, context), `flow`], + Messages: [, (_) => de_Messages(_, context), `messages`], + }); + Object.assign(contents, doc); return contents; }; @@ -2690,10 +2689,9 @@ const de_DescribeFlowCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2713,9 +2711,10 @@ export const de_DescribeGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gateway != null) { - contents.Gateway = de_Gateway(data.gateway, context); - } + const doc = take(data, { + Gateway: [, (_) => de_Gateway(_, context), `gateway`], + }); + Object.assign(contents, doc); return contents; }; @@ -2755,10 +2754,9 @@ const de_DescribeGatewayCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2778,9 +2776,10 @@ export const de_DescribeGatewayInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gatewayInstance != null) { - contents.GatewayInstance = de_GatewayInstance(data.gatewayInstance, context); - } + const doc = take(data, { + GatewayInstance: [, (_) => de_GatewayInstance(_, context), `gatewayInstance`], + }); + Object.assign(contents, doc); return contents; }; @@ -2820,10 +2819,9 @@ const de_DescribeGatewayInstanceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2843,9 +2841,10 @@ export const de_DescribeOfferingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.offering != null) { - contents.Offering = de_Offering(data.offering, context); - } + const doc = take(data, { + Offering: [, (_) => de_Offering(_, context), `offering`], + }); + Object.assign(contents, doc); return contents; }; @@ -2879,10 +2878,9 @@ const de_DescribeOfferingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2902,9 +2900,10 @@ export const de_DescribeReservationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reservation != null) { - contents.Reservation = de_Reservation(data.reservation, context); - } + const doc = take(data, { + Reservation: [, (_) => de_Reservation(_, context), `reservation`], + }); + Object.assign(contents, doc); return contents; }; @@ -2938,10 +2937,9 @@ const de_DescribeReservationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2961,12 +2959,11 @@ export const de_GrantFlowEntitlementsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entitlements != null) { - contents.Entitlements = de___listOfEntitlement(data.entitlements, context); - } - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } + const doc = take(data, { + Entitlements: [, (_) => de___listOfEntitlement(_, context), `entitlements`], + FlowArn: [, __expectString, `flowArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3006,10 +3003,9 @@ const de_GrantFlowEntitlementsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3029,12 +3025,11 @@ export const de_ListBridgesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridges != null) { - contents.Bridges = de___listOfListedBridge(data.bridges, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Bridges: [, (_) => de___listOfListedBridge(_, context), `bridges`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3068,10 +3063,9 @@ const de_ListBridgesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3091,12 +3085,11 @@ export const de_ListEntitlementsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entitlements != null) { - contents.Entitlements = de___listOfListedEntitlement(data.entitlements, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Entitlements: [, (_) => de___listOfListedEntitlement(_, context), `entitlements`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3127,10 +3120,9 @@ const de_ListEntitlementsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3150,12 +3142,11 @@ export const de_ListFlowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flows != null) { - contents.Flows = de___listOfListedFlow(data.flows, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Flows: [, (_) => de___listOfListedFlow(_, context), `flows`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3186,10 +3177,9 @@ const de_ListFlowsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3209,12 +3199,11 @@ export const de_ListGatewayInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.instances != null) { - contents.Instances = de___listOfListedGatewayInstance(data.instances, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Instances: [, (_) => de___listOfListedGatewayInstance(_, context), `instances`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3248,10 +3237,9 @@ const de_ListGatewayInstancesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3271,12 +3259,11 @@ export const de_ListGatewaysCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.gateways != null) { - contents.Gateways = de___listOfListedGateway(data.gateways, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Gateways: [, (_) => de___listOfListedGateway(_, context), `gateways`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -3310,10 +3297,9 @@ const de_ListGatewaysCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3333,12 +3319,11 @@ export const de_ListOfferingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.offerings != null) { - contents.Offerings = de___listOfOffering(data.offerings, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Offerings: [, (_) => de___listOfOffering(_, context), `offerings`], + }); + Object.assign(contents, doc); return contents; }; @@ -3369,10 +3354,9 @@ const de_ListOfferingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3392,12 +3376,11 @@ export const de_ListReservationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.reservations != null) { - contents.Reservations = de___listOfReservation(data.reservations, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Reservations: [, (_) => de___listOfReservation(_, context), `reservations`], + }); + Object.assign(contents, doc); return contents; }; @@ -3428,10 +3411,9 @@ const de_ListReservationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3451,9 +3433,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3481,10 +3464,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3504,9 +3486,10 @@ export const de_PurchaseOfferingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reservation != null) { - contents.Reservation = de_Reservation(data.reservation, context); - } + const doc = take(data, { + Reservation: [, (_) => de_Reservation(_, context), `reservation`], + }); + Object.assign(contents, doc); return contents; }; @@ -3543,10 +3526,9 @@ const de_PurchaseOfferingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3566,12 +3548,11 @@ export const de_RemoveBridgeOutputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.outputName != null) { - contents.OutputName = __expectString(data.outputName); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + OutputName: [, __expectString, `outputName`], + }); + Object.assign(contents, doc); return contents; }; @@ -3611,10 +3592,9 @@ const de_RemoveBridgeOutputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3634,12 +3614,11 @@ export const de_RemoveBridgeSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.sourceName != null) { - contents.SourceName = __expectString(data.sourceName); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + SourceName: [, __expectString, `sourceName`], + }); + Object.assign(contents, doc); return contents; }; @@ -3679,10 +3658,9 @@ const de_RemoveBridgeSourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3702,12 +3680,11 @@ export const de_RemoveFlowMediaStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.mediaStreamName != null) { - contents.MediaStreamName = __expectString(data.mediaStreamName); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + MediaStreamName: [, __expectString, `mediaStreamName`], + }); + Object.assign(contents, doc); return contents; }; @@ -3744,10 +3721,9 @@ const de_RemoveFlowMediaStreamCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3767,12 +3743,11 @@ export const de_RemoveFlowOutputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.outputArn != null) { - contents.OutputArn = __expectString(data.outputArn); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + OutputArn: [, __expectString, `outputArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3809,10 +3784,9 @@ const de_RemoveFlowOutputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3832,12 +3806,11 @@ export const de_RemoveFlowSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.sourceArn != null) { - contents.SourceArn = __expectString(data.sourceArn); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + SourceArn: [, __expectString, `sourceArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -3874,10 +3847,9 @@ const de_RemoveFlowSourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3897,15 +3869,12 @@ export const de_RemoveFlowVpcInterfaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.nonDeletedNetworkInterfaceIds != null) { - contents.NonDeletedNetworkInterfaceIds = de___listOf__string(data.nonDeletedNetworkInterfaceIds, context); - } - if (data.vpcInterfaceName != null) { - contents.VpcInterfaceName = __expectString(data.vpcInterfaceName); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + NonDeletedNetworkInterfaceIds: [, _json, `nonDeletedNetworkInterfaceIds`], + VpcInterfaceName: [, __expectString, `vpcInterfaceName`], + }); + Object.assign(contents, doc); return contents; }; @@ -3942,10 +3911,9 @@ const de_RemoveFlowVpcInterfaceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3965,12 +3933,11 @@ export const de_RevokeFlowEntitlementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entitlementArn != null) { - contents.EntitlementArn = __expectString(data.entitlementArn); - } - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } + const doc = take(data, { + EntitlementArn: [, __expectString, `entitlementArn`], + FlowArn: [, __expectString, `flowArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -4007,10 +3974,9 @@ const de_RevokeFlowEntitlementCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4030,12 +3996,11 @@ export const de_StartFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -4072,10 +4037,9 @@ const de_StartFlowCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4095,12 +4059,11 @@ export const de_StopFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -4137,10 +4100,9 @@ const de_StopFlowCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4187,10 +4149,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4237,10 +4198,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4260,9 +4220,10 @@ export const de_UpdateBridgeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridge != null) { - contents.Bridge = de_Bridge(data.bridge, context); - } + const doc = take(data, { + Bridge: [, (_) => de_Bridge(_, context), `bridge`], + }); + Object.assign(contents, doc); return contents; }; @@ -4302,10 +4263,9 @@ const de_UpdateBridgeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4325,12 +4285,11 @@ export const de_UpdateBridgeOutputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.output != null) { - contents.Output = de_BridgeOutput(data.output, context); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + Output: [, (_) => de_BridgeOutput(_, context), `output`], + }); + Object.assign(contents, doc); return contents; }; @@ -4370,10 +4329,9 @@ const de_UpdateBridgeOutputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4393,12 +4351,11 @@ export const de_UpdateBridgeSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.source != null) { - contents.Source = de_BridgeSource(data.source, context); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + Source: [, (_) => de_BridgeSource(_, context), `source`], + }); + Object.assign(contents, doc); return contents; }; @@ -4438,10 +4395,9 @@ const de_UpdateBridgeSourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4461,12 +4417,11 @@ export const de_UpdateBridgeStateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgeArn != null) { - contents.BridgeArn = __expectString(data.bridgeArn); - } - if (data.desiredState != null) { - contents.DesiredState = __expectString(data.desiredState); - } + const doc = take(data, { + BridgeArn: [, __expectString, `bridgeArn`], + DesiredState: [, __expectString, `desiredState`], + }); + Object.assign(contents, doc); return contents; }; @@ -4506,10 +4461,9 @@ const de_UpdateBridgeStateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4529,9 +4483,10 @@ export const de_UpdateFlowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flow != null) { - contents.Flow = de_Flow(data.flow, context); - } + const doc = take(data, { + Flow: [, (_) => de_Flow(_, context), `flow`], + }); + Object.assign(contents, doc); return contents; }; @@ -4568,10 +4523,9 @@ const de_UpdateFlowCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4591,12 +4545,11 @@ export const de_UpdateFlowEntitlementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.entitlement != null) { - contents.Entitlement = de_Entitlement(data.entitlement, context); - } - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } + const doc = take(data, { + Entitlement: [, (_) => de_Entitlement(_, context), `entitlement`], + FlowArn: [, __expectString, `flowArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -4633,10 +4586,9 @@ const de_UpdateFlowEntitlementCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4656,12 +4608,11 @@ export const de_UpdateFlowMediaStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.mediaStream != null) { - contents.MediaStream = de_MediaStream(data.mediaStream, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + MediaStream: [, (_) => de_MediaStream(_, context), `mediaStream`], + }); + Object.assign(contents, doc); return contents; }; @@ -4698,10 +4649,9 @@ const de_UpdateFlowMediaStreamCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4721,12 +4671,11 @@ export const de_UpdateFlowOutputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.output != null) { - contents.Output = de_Output(data.output, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Output: [, (_) => de_Output(_, context), `output`], + }); + Object.assign(contents, doc); return contents; }; @@ -4763,10 +4712,9 @@ const de_UpdateFlowOutputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4786,12 +4734,11 @@ export const de_UpdateFlowSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.flowArn != null) { - contents.FlowArn = __expectString(data.flowArn); - } - if (data.source != null) { - contents.Source = de_Source(data.source, context); - } + const doc = take(data, { + FlowArn: [, __expectString, `flowArn`], + Source: [, (_) => de_Source(_, context), `source`], + }); + Object.assign(contents, doc); return contents; }; @@ -4828,10 +4775,9 @@ const de_UpdateFlowSourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4851,12 +4797,11 @@ export const de_UpdateGatewayInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bridgePlacement != null) { - contents.BridgePlacement = __expectString(data.bridgePlacement); - } - if (data.gatewayInstanceArn != null) { - contents.GatewayInstanceArn = __expectString(data.gatewayInstanceArn); - } + const doc = take(data, { + BridgePlacement: [, __expectString, `bridgePlacement`], + GatewayInstanceArn: [, __expectString, `gatewayInstanceArn`], + }); + Object.assign(contents, doc); return contents; }; @@ -4896,16 +4841,15 @@ const de_UpdateGatewayInstanceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AddFlowOutputs420ExceptionRes */ @@ -4915,9 +4859,10 @@ const de_AddFlowOutputs420ExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new AddFlowOutputs420Exception({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4931,9 +4876,10 @@ const de_AddFlowOutputs420ExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4947,9 +4893,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4966,9 +4913,10 @@ const de_CreateBridge420ExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new CreateBridge420Exception({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4985,9 +4933,10 @@ const de_CreateFlow420ExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new CreateFlow420Exception({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5004,9 +4953,10 @@ const de_CreateGateway420ExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new CreateGateway420Exception({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5020,9 +4970,10 @@ const de_CreateGateway420ExceptionRes = async ( const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5039,9 +4990,10 @@ const de_GrantFlowEntitlements420ExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new GrantFlowEntitlements420Exception({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5058,9 +5010,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5074,9 +5027,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5093,9 +5047,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5112,9 +5067,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5122,16 +5078,7 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfAddBridgeOutputRequest @@ -5274,276 +5221,252 @@ const se___listOfVpcInterfaceRequest = (input: VpcInterfaceRequest[], context: _ }); }; -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. /** * serializeAws_restJson1AddBridgeFlowSourceRequest */ const se_AddBridgeFlowSourceRequest = (input: AddBridgeFlowSourceRequest, context: __SerdeContext): any => { - return { - ...(input.FlowArn != null && { flowArn: input.FlowArn }), - ...(input.FlowVpcInterfaceAttachment != null && { - flowVpcInterfaceAttachment: se_VpcInterfaceAttachment(input.FlowVpcInterfaceAttachment, context), - }), - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + flowArn: [, , `FlowArn`], + flowVpcInterfaceAttachment: [, (_) => se_VpcInterfaceAttachment(_, context), `FlowVpcInterfaceAttachment`], + name: [, , `Name`], + }); }; /** * serializeAws_restJson1AddBridgeNetworkOutputRequest */ const se_AddBridgeNetworkOutputRequest = (input: AddBridgeNetworkOutputRequest, context: __SerdeContext): any => { - return { - ...(input.IpAddress != null && { ipAddress: input.IpAddress }), - ...(input.Name != null && { name: input.Name }), - ...(input.NetworkName != null && { networkName: input.NetworkName }), - ...(input.Port != null && { port: input.Port }), - ...(input.Protocol != null && { protocol: input.Protocol }), - ...(input.Ttl != null && { ttl: input.Ttl }), - }; + return take(input, { + ipAddress: [, , `IpAddress`], + name: [, , `Name`], + networkName: [, , `NetworkName`], + port: [, , `Port`], + protocol: [, , `Protocol`], + ttl: [, , `Ttl`], + }); }; /** * serializeAws_restJson1AddBridgeNetworkSourceRequest */ const se_AddBridgeNetworkSourceRequest = (input: AddBridgeNetworkSourceRequest, context: __SerdeContext): any => { - return { - ...(input.MulticastIp != null && { multicastIp: input.MulticastIp }), - ...(input.Name != null && { name: input.Name }), - ...(input.NetworkName != null && { networkName: input.NetworkName }), - ...(input.Port != null && { port: input.Port }), - ...(input.Protocol != null && { protocol: input.Protocol }), - }; + return take(input, { + multicastIp: [, , `MulticastIp`], + name: [, , `Name`], + networkName: [, , `NetworkName`], + port: [, , `Port`], + protocol: [, , `Protocol`], + }); }; /** * serializeAws_restJson1AddBridgeOutputRequest */ const se_AddBridgeOutputRequest = (input: AddBridgeOutputRequest, context: __SerdeContext): any => { - return { - ...(input.NetworkOutput != null && { - networkOutput: se_AddBridgeNetworkOutputRequest(input.NetworkOutput, context), - }), - }; + return take(input, { + networkOutput: [, (_) => se_AddBridgeNetworkOutputRequest(_, context), `NetworkOutput`], + }); }; /** * serializeAws_restJson1AddBridgeSourceRequest */ const se_AddBridgeSourceRequest = (input: AddBridgeSourceRequest, context: __SerdeContext): any => { - return { - ...(input.FlowSource != null && { flowSource: se_AddBridgeFlowSourceRequest(input.FlowSource, context) }), - ...(input.NetworkSource != null && { - networkSource: se_AddBridgeNetworkSourceRequest(input.NetworkSource, context), - }), - }; + return take(input, { + flowSource: [, (_) => se_AddBridgeFlowSourceRequest(_, context), `FlowSource`], + networkSource: [, (_) => se_AddBridgeNetworkSourceRequest(_, context), `NetworkSource`], + }); }; /** * serializeAws_restJson1AddEgressGatewayBridgeRequest */ const se_AddEgressGatewayBridgeRequest = (input: AddEgressGatewayBridgeRequest, context: __SerdeContext): any => { - return { - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - }; + return take(input, { + maxBitrate: [, , `MaxBitrate`], + }); }; /** * serializeAws_restJson1AddIngressGatewayBridgeRequest */ const se_AddIngressGatewayBridgeRequest = (input: AddIngressGatewayBridgeRequest, context: __SerdeContext): any => { - return { - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MaxOutputs != null && { maxOutputs: input.MaxOutputs }), - }; + return take(input, { + maxBitrate: [, , `MaxBitrate`], + maxOutputs: [, , `MaxOutputs`], + }); }; /** * serializeAws_restJson1AddMaintenance */ const se_AddMaintenance = (input: AddMaintenance, context: __SerdeContext): any => { - return { - ...(input.MaintenanceDay != null && { maintenanceDay: input.MaintenanceDay }), - ...(input.MaintenanceStartHour != null && { maintenanceStartHour: input.MaintenanceStartHour }), - }; + return take(input, { + maintenanceDay: [, , `MaintenanceDay`], + maintenanceStartHour: [, , `MaintenanceStartHour`], + }); }; /** * serializeAws_restJson1AddMediaStreamRequest */ const se_AddMediaStreamRequest = (input: AddMediaStreamRequest, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { attributes: se_MediaStreamAttributesRequest(input.Attributes, context) }), - ...(input.ClockRate != null && { clockRate: input.ClockRate }), - ...(input.Description != null && { description: input.Description }), - ...(input.MediaStreamId != null && { mediaStreamId: input.MediaStreamId }), - ...(input.MediaStreamName != null && { mediaStreamName: input.MediaStreamName }), - ...(input.MediaStreamType != null && { mediaStreamType: input.MediaStreamType }), - ...(input.VideoFormat != null && { videoFormat: input.VideoFormat }), - }; + return take(input, { + attributes: [, (_) => se_MediaStreamAttributesRequest(_, context), `Attributes`], + clockRate: [, , `ClockRate`], + description: [, , `Description`], + mediaStreamId: [, , `MediaStreamId`], + mediaStreamName: [, , `MediaStreamName`], + mediaStreamType: [, , `MediaStreamType`], + videoFormat: [, , `VideoFormat`], + }); }; /** * serializeAws_restJson1AddOutputRequest */ const se_AddOutputRequest = (input: AddOutputRequest, context: __SerdeContext): any => { - return { - ...(input.CidrAllowList != null && { cidrAllowList: se___listOf__string(input.CidrAllowList, context) }), - ...(input.Description != null && { description: input.Description }), - ...(input.Destination != null && { destination: input.Destination }), - ...(input.Encryption != null && { encryption: se_Encryption(input.Encryption, context) }), - ...(input.MaxLatency != null && { maxLatency: input.MaxLatency }), - ...(input.MediaStreamOutputConfigurations != null && { - mediaStreamOutputConfigurations: se___listOfMediaStreamOutputConfigurationRequest( - input.MediaStreamOutputConfigurations, - context - ), - }), - ...(input.MinLatency != null && { minLatency: input.MinLatency }), - ...(input.Name != null && { name: input.Name }), - ...(input.Port != null && { port: input.Port }), - ...(input.Protocol != null && { protocol: input.Protocol }), - ...(input.RemoteId != null && { remoteId: input.RemoteId }), - ...(input.SenderControlPort != null && { senderControlPort: input.SenderControlPort }), - ...(input.SmoothingLatency != null && { smoothingLatency: input.SmoothingLatency }), - ...(input.StreamId != null && { streamId: input.StreamId }), - ...(input.VpcInterfaceAttachment != null && { - vpcInterfaceAttachment: se_VpcInterfaceAttachment(input.VpcInterfaceAttachment, context), - }), - }; + return take(input, { + cidrAllowList: [, _json, `CidrAllowList`], + description: [, , `Description`], + destination: [, , `Destination`], + encryption: [, (_) => se_Encryption(_, context), `Encryption`], + maxLatency: [, , `MaxLatency`], + mediaStreamOutputConfigurations: [ + , + (_) => se___listOfMediaStreamOutputConfigurationRequest(_, context), + `MediaStreamOutputConfigurations`, + ], + minLatency: [, , `MinLatency`], + name: [, , `Name`], + port: [, , `Port`], + protocol: [, , `Protocol`], + remoteId: [, , `RemoteId`], + senderControlPort: [, , `SenderControlPort`], + smoothingLatency: [, , `SmoothingLatency`], + streamId: [, , `StreamId`], + vpcInterfaceAttachment: [, (_) => se_VpcInterfaceAttachment(_, context), `VpcInterfaceAttachment`], + }); }; /** * serializeAws_restJson1DestinationConfigurationRequest */ const se_DestinationConfigurationRequest = (input: DestinationConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.DestinationIp != null && { destinationIp: input.DestinationIp }), - ...(input.DestinationPort != null && { destinationPort: input.DestinationPort }), - ...(input.Interface != null && { interface: se_InterfaceRequest(input.Interface, context) }), - }; + return take(input, { + destinationIp: [, , `DestinationIp`], + destinationPort: [, , `DestinationPort`], + interface: [, (_) => se_InterfaceRequest(_, context), `Interface`], + }); }; /** * serializeAws_restJson1EncodingParametersRequest */ const se_EncodingParametersRequest = (input: EncodingParametersRequest, context: __SerdeContext): any => { - return { - ...(input.CompressionFactor != null && { compressionFactor: __serializeFloat(input.CompressionFactor) }), - ...(input.EncoderProfile != null && { encoderProfile: input.EncoderProfile }), - }; + return take(input, { + compressionFactor: [, __serializeFloat, `CompressionFactor`], + encoderProfile: [, , `EncoderProfile`], + }); }; /** * serializeAws_restJson1Encryption */ const se_Encryption = (input: Encryption, context: __SerdeContext): any => { - return { - ...(input.Algorithm != null && { algorithm: input.Algorithm }), - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.DeviceId != null && { deviceId: input.DeviceId }), - ...(input.KeyType != null && { keyType: input.KeyType }), - ...(input.Region != null && { region: input.Region }), - ...(input.ResourceId != null && { resourceId: input.ResourceId }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.SecretArn != null && { secretArn: input.SecretArn }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + algorithm: [, , `Algorithm`], + constantInitializationVector: [, , `ConstantInitializationVector`], + deviceId: [, , `DeviceId`], + keyType: [, , `KeyType`], + region: [, , `Region`], + resourceId: [, , `ResourceId`], + roleArn: [, , `RoleArn`], + secretArn: [, , `SecretArn`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1FailoverConfig */ const se_FailoverConfig = (input: FailoverConfig, context: __SerdeContext): any => { - return { - ...(input.FailoverMode != null && { failoverMode: input.FailoverMode }), - ...(input.RecoveryWindow != null && { recoveryWindow: input.RecoveryWindow }), - ...(input.SourcePriority != null && { sourcePriority: se_SourcePriority(input.SourcePriority, context) }), - ...(input.State != null && { state: input.State }), - }; + return take(input, { + failoverMode: [, , `FailoverMode`], + recoveryWindow: [, , `RecoveryWindow`], + sourcePriority: [, (_) => se_SourcePriority(_, context), `SourcePriority`], + state: [, , `State`], + }); }; /** * serializeAws_restJson1FmtpRequest */ const se_FmtpRequest = (input: FmtpRequest, context: __SerdeContext): any => { - return { - ...(input.ChannelOrder != null && { channelOrder: input.ChannelOrder }), - ...(input.Colorimetry != null && { colorimetry: input.Colorimetry }), - ...(input.ExactFramerate != null && { exactFramerate: input.ExactFramerate }), - ...(input.Par != null && { par: input.Par }), - ...(input.Range != null && { range: input.Range }), - ...(input.ScanMode != null && { scanMode: input.ScanMode }), - ...(input.Tcs != null && { tcs: input.Tcs }), - }; + return take(input, { + channelOrder: [, , `ChannelOrder`], + colorimetry: [, , `Colorimetry`], + exactFramerate: [, , `ExactFramerate`], + par: [, , `Par`], + range: [, , `Range`], + scanMode: [, , `ScanMode`], + tcs: [, , `Tcs`], + }); }; /** * serializeAws_restJson1GatewayNetwork */ const se_GatewayNetwork = (input: GatewayNetwork, context: __SerdeContext): any => { - return { - ...(input.CidrBlock != null && { cidrBlock: input.CidrBlock }), - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + cidrBlock: [, , `CidrBlock`], + name: [, , `Name`], + }); }; /** * serializeAws_restJson1GrantEntitlementRequest */ const se_GrantEntitlementRequest = (input: GrantEntitlementRequest, context: __SerdeContext): any => { - return { - ...(input.DataTransferSubscriberFeePercent != null && { - dataTransferSubscriberFeePercent: input.DataTransferSubscriberFeePercent, - }), - ...(input.Description != null && { description: input.Description }), - ...(input.Encryption != null && { encryption: se_Encryption(input.Encryption, context) }), - ...(input.EntitlementStatus != null && { entitlementStatus: input.EntitlementStatus }), - ...(input.Name != null && { name: input.Name }), - ...(input.Subscribers != null && { subscribers: se___listOf__string(input.Subscribers, context) }), - }; + return take(input, { + dataTransferSubscriberFeePercent: [, , `DataTransferSubscriberFeePercent`], + description: [, , `Description`], + encryption: [, (_) => se_Encryption(_, context), `Encryption`], + entitlementStatus: [, , `EntitlementStatus`], + name: [, , `Name`], + subscribers: [, _json, `Subscribers`], + }); }; /** * serializeAws_restJson1InputConfigurationRequest */ const se_InputConfigurationRequest = (input: InputConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.InputPort != null && { inputPort: input.InputPort }), - ...(input.Interface != null && { interface: se_InterfaceRequest(input.Interface, context) }), - }; + return take(input, { + inputPort: [, , `InputPort`], + interface: [, (_) => se_InterfaceRequest(_, context), `Interface`], + }); }; /** * serializeAws_restJson1InterfaceRequest */ const se_InterfaceRequest = (input: InterfaceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + name: [, , `Name`], + }); }; /** * serializeAws_restJson1MediaStreamAttributesRequest */ const se_MediaStreamAttributesRequest = (input: MediaStreamAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.Fmtp != null && { fmtp: se_FmtpRequest(input.Fmtp, context) }), - ...(input.Lang != null && { lang: input.Lang }), - }; + return take(input, { + fmtp: [, (_) => se_FmtpRequest(_, context), `Fmtp`], + lang: [, , `Lang`], + }); }; /** @@ -5553,16 +5476,16 @@ const se_MediaStreamOutputConfigurationRequest = ( input: MediaStreamOutputConfigurationRequest, context: __SerdeContext ): any => { - return { - ...(input.DestinationConfigurations != null && { - destinationConfigurations: se___listOfDestinationConfigurationRequest(input.DestinationConfigurations, context), - }), - ...(input.EncodingName != null && { encodingName: input.EncodingName }), - ...(input.EncodingParameters != null && { - encodingParameters: se_EncodingParametersRequest(input.EncodingParameters, context), - }), - ...(input.MediaStreamName != null && { mediaStreamName: input.MediaStreamName }), - }; + return take(input, { + destinationConfigurations: [ + , + (_) => se___listOfDestinationConfigurationRequest(_, context), + `DestinationConfigurations`, + ], + encodingName: [, , `EncodingName`], + encodingParameters: [, (_) => se_EncodingParametersRequest(_, context), `EncodingParameters`], + mediaStreamName: [, , `MediaStreamName`], + }); }; /** @@ -5572,157 +5495,144 @@ const se_MediaStreamSourceConfigurationRequest = ( input: MediaStreamSourceConfigurationRequest, context: __SerdeContext ): any => { - return { - ...(input.EncodingName != null && { encodingName: input.EncodingName }), - ...(input.InputConfigurations != null && { - inputConfigurations: se___listOfInputConfigurationRequest(input.InputConfigurations, context), - }), - ...(input.MediaStreamName != null && { mediaStreamName: input.MediaStreamName }), - }; + return take(input, { + encodingName: [, , `EncodingName`], + inputConfigurations: [, (_) => se___listOfInputConfigurationRequest(_, context), `InputConfigurations`], + mediaStreamName: [, , `MediaStreamName`], + }); }; /** * serializeAws_restJson1SetGatewayBridgeSourceRequest */ const se_SetGatewayBridgeSourceRequest = (input: SetGatewayBridgeSourceRequest, context: __SerdeContext): any => { - return { - ...(input.BridgeArn != null && { bridgeArn: input.BridgeArn }), - ...(input.VpcInterfaceAttachment != null && { - vpcInterfaceAttachment: se_VpcInterfaceAttachment(input.VpcInterfaceAttachment, context), - }), - }; + return take(input, { + bridgeArn: [, , `BridgeArn`], + vpcInterfaceAttachment: [, (_) => se_VpcInterfaceAttachment(_, context), `VpcInterfaceAttachment`], + }); }; /** * serializeAws_restJson1SetSourceRequest */ const se_SetSourceRequest = (input: SetSourceRequest, context: __SerdeContext): any => { - return { - ...(input.Decryption != null && { decryption: se_Encryption(input.Decryption, context) }), - ...(input.Description != null && { description: input.Description }), - ...(input.EntitlementArn != null && { entitlementArn: input.EntitlementArn }), - ...(input.GatewayBridgeSource != null && { - gatewayBridgeSource: se_SetGatewayBridgeSourceRequest(input.GatewayBridgeSource, context), - }), - ...(input.IngestPort != null && { ingestPort: input.IngestPort }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MaxLatency != null && { maxLatency: input.MaxLatency }), - ...(input.MaxSyncBuffer != null && { maxSyncBuffer: input.MaxSyncBuffer }), - ...(input.MediaStreamSourceConfigurations != null && { - mediaStreamSourceConfigurations: se___listOfMediaStreamSourceConfigurationRequest( - input.MediaStreamSourceConfigurations, - context - ), - }), - ...(input.MinLatency != null && { minLatency: input.MinLatency }), - ...(input.Name != null && { name: input.Name }), - ...(input.Protocol != null && { protocol: input.Protocol }), - ...(input.SenderControlPort != null && { senderControlPort: input.SenderControlPort }), - ...(input.SenderIpAddress != null && { senderIpAddress: input.SenderIpAddress }), - ...(input.SourceListenerAddress != null && { sourceListenerAddress: input.SourceListenerAddress }), - ...(input.SourceListenerPort != null && { sourceListenerPort: input.SourceListenerPort }), - ...(input.StreamId != null && { streamId: input.StreamId }), - ...(input.VpcInterfaceName != null && { vpcInterfaceName: input.VpcInterfaceName }), - ...(input.WhitelistCidr != null && { whitelistCidr: input.WhitelistCidr }), - }; + return take(input, { + decryption: [, (_) => se_Encryption(_, context), `Decryption`], + description: [, , `Description`], + entitlementArn: [, , `EntitlementArn`], + gatewayBridgeSource: [, (_) => se_SetGatewayBridgeSourceRequest(_, context), `GatewayBridgeSource`], + ingestPort: [, , `IngestPort`], + maxBitrate: [, , `MaxBitrate`], + maxLatency: [, , `MaxLatency`], + maxSyncBuffer: [, , `MaxSyncBuffer`], + mediaStreamSourceConfigurations: [ + , + (_) => se___listOfMediaStreamSourceConfigurationRequest(_, context), + `MediaStreamSourceConfigurations`, + ], + minLatency: [, , `MinLatency`], + name: [, , `Name`], + protocol: [, , `Protocol`], + senderControlPort: [, , `SenderControlPort`], + senderIpAddress: [, , `SenderIpAddress`], + sourceListenerAddress: [, , `SourceListenerAddress`], + sourceListenerPort: [, , `SourceListenerPort`], + streamId: [, , `StreamId`], + vpcInterfaceName: [, , `VpcInterfaceName`], + whitelistCidr: [, , `WhitelistCidr`], + }); }; /** * serializeAws_restJson1SourcePriority */ const se_SourcePriority = (input: SourcePriority, context: __SerdeContext): any => { - return { - ...(input.PrimarySource != null && { primarySource: input.PrimarySource }), - }; + return take(input, { + primarySource: [, , `PrimarySource`], + }); }; /** * serializeAws_restJson1UpdateBridgeFlowSourceRequest */ const se_UpdateBridgeFlowSourceRequest = (input: UpdateBridgeFlowSourceRequest, context: __SerdeContext): any => { - return { - ...(input.FlowArn != null && { flowArn: input.FlowArn }), - ...(input.FlowVpcInterfaceAttachment != null && { - flowVpcInterfaceAttachment: se_VpcInterfaceAttachment(input.FlowVpcInterfaceAttachment, context), - }), - }; + return take(input, { + flowArn: [, , `FlowArn`], + flowVpcInterfaceAttachment: [, (_) => se_VpcInterfaceAttachment(_, context), `FlowVpcInterfaceAttachment`], + }); }; /** * serializeAws_restJson1UpdateBridgeNetworkOutputRequest */ const se_UpdateBridgeNetworkOutputRequest = (input: UpdateBridgeNetworkOutputRequest, context: __SerdeContext): any => { - return { - ...(input.IpAddress != null && { ipAddress: input.IpAddress }), - ...(input.NetworkName != null && { networkName: input.NetworkName }), - ...(input.Port != null && { port: input.Port }), - ...(input.Protocol != null && { protocol: input.Protocol }), - ...(input.Ttl != null && { ttl: input.Ttl }), - }; + return take(input, { + ipAddress: [, , `IpAddress`], + networkName: [, , `NetworkName`], + port: [, , `Port`], + protocol: [, , `Protocol`], + ttl: [, , `Ttl`], + }); }; /** * serializeAws_restJson1UpdateBridgeNetworkSourceRequest */ const se_UpdateBridgeNetworkSourceRequest = (input: UpdateBridgeNetworkSourceRequest, context: __SerdeContext): any => { - return { - ...(input.MulticastIp != null && { multicastIp: input.MulticastIp }), - ...(input.NetworkName != null && { networkName: input.NetworkName }), - ...(input.Port != null && { port: input.Port }), - ...(input.Protocol != null && { protocol: input.Protocol }), - }; + return take(input, { + multicastIp: [, , `MulticastIp`], + networkName: [, , `NetworkName`], + port: [, , `Port`], + protocol: [, , `Protocol`], + }); }; /** * serializeAws_restJson1UpdateEgressGatewayBridgeRequest */ const se_UpdateEgressGatewayBridgeRequest = (input: UpdateEgressGatewayBridgeRequest, context: __SerdeContext): any => { - return { - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - }; + return take(input, { + maxBitrate: [, , `MaxBitrate`], + }); }; /** * serializeAws_restJson1UpdateEncryption */ const se_UpdateEncryption = (input: UpdateEncryption, context: __SerdeContext): any => { - return { - ...(input.Algorithm != null && { algorithm: input.Algorithm }), - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.DeviceId != null && { deviceId: input.DeviceId }), - ...(input.KeyType != null && { keyType: input.KeyType }), - ...(input.Region != null && { region: input.Region }), - ...(input.ResourceId != null && { resourceId: input.ResourceId }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.SecretArn != null && { secretArn: input.SecretArn }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + algorithm: [, , `Algorithm`], + constantInitializationVector: [, , `ConstantInitializationVector`], + deviceId: [, , `DeviceId`], + keyType: [, , `KeyType`], + region: [, , `Region`], + resourceId: [, , `ResourceId`], + roleArn: [, , `RoleArn`], + secretArn: [, , `SecretArn`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1UpdateFailoverConfig */ const se_UpdateFailoverConfig = (input: UpdateFailoverConfig, context: __SerdeContext): any => { - return { - ...(input.FailoverMode != null && { failoverMode: input.FailoverMode }), - ...(input.RecoveryWindow != null && { recoveryWindow: input.RecoveryWindow }), - ...(input.SourcePriority != null && { sourcePriority: se_SourcePriority(input.SourcePriority, context) }), - ...(input.State != null && { state: input.State }), - }; + return take(input, { + failoverMode: [, , `FailoverMode`], + recoveryWindow: [, , `RecoveryWindow`], + sourcePriority: [, (_) => se_SourcePriority(_, context), `SourcePriority`], + state: [, , `State`], + }); }; /** * serializeAws_restJson1UpdateGatewayBridgeSourceRequest */ const se_UpdateGatewayBridgeSourceRequest = (input: UpdateGatewayBridgeSourceRequest, context: __SerdeContext): any => { - return { - ...(input.BridgeArn != null && { bridgeArn: input.BridgeArn }), - ...(input.VpcInterfaceAttachment != null && { - vpcInterfaceAttachment: se_VpcInterfaceAttachment(input.VpcInterfaceAttachment, context), - }), - }; + return take(input, { + bridgeArn: [, , `BridgeArn`], + vpcInterfaceAttachment: [, (_) => se_VpcInterfaceAttachment(_, context), `VpcInterfaceAttachment`], + }); }; /** @@ -5732,74 +5642,48 @@ const se_UpdateIngressGatewayBridgeRequest = ( input: UpdateIngressGatewayBridgeRequest, context: __SerdeContext ): any => { - return { - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MaxOutputs != null && { maxOutputs: input.MaxOutputs }), - }; + return take(input, { + maxBitrate: [, , `MaxBitrate`], + maxOutputs: [, , `MaxOutputs`], + }); }; /** * serializeAws_restJson1UpdateMaintenance */ const se_UpdateMaintenance = (input: UpdateMaintenance, context: __SerdeContext): any => { - return { - ...(input.MaintenanceDay != null && { maintenanceDay: input.MaintenanceDay }), - ...(input.MaintenanceScheduledDate != null && { maintenanceScheduledDate: input.MaintenanceScheduledDate }), - ...(input.MaintenanceStartHour != null && { maintenanceStartHour: input.MaintenanceStartHour }), - }; + return take(input, { + maintenanceDay: [, , `MaintenanceDay`], + maintenanceScheduledDate: [, , `MaintenanceScheduledDate`], + maintenanceStartHour: [, , `MaintenanceStartHour`], + }); }; /** * serializeAws_restJson1VpcInterfaceAttachment */ const se_VpcInterfaceAttachment = (input: VpcInterfaceAttachment, context: __SerdeContext): any => { - return { - ...(input.VpcInterfaceName != null && { vpcInterfaceName: input.VpcInterfaceName }), - }; + return take(input, { + vpcInterfaceName: [, , `VpcInterfaceName`], + }); }; /** * serializeAws_restJson1VpcInterfaceRequest */ const se_VpcInterfaceRequest = (input: VpcInterfaceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - ...(input.NetworkInterfaceType != null && { networkInterfaceType: input.NetworkInterfaceType }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.SecurityGroupIds != null && { securityGroupIds: se___listOf__string(input.SecurityGroupIds, context) }), - ...(input.SubnetId != null && { subnetId: input.SubnetId }), - }; + return take(input, { + name: [, , `Name`], + networkInterfaceType: [, , `NetworkInterfaceType`], + roleArn: [, , `RoleArn`], + securityGroupIds: [, _json, `SecurityGroupIds`], + subnetId: [, , `SubnetId`], + }); }; -/** - * deserializeAws_restJson1__listOf__integer - */ -const de___listOf__integer = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de___listOf__integer omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfBridgeOutput @@ -5808,9 +5692,6 @@ const de___listOfBridgeOutput = (output: any, context: __SerdeContext): BridgeOu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BridgeOutput(entry, context); }); return retVal; @@ -5823,9 +5704,6 @@ const de___listOfBridgeSource = (output: any, context: __SerdeContext): BridgeSo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BridgeSource(entry, context); }); return retVal; @@ -5838,9 +5716,6 @@ const de___listOfDestinationConfiguration = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DestinationConfiguration(entry, context); }); return retVal; @@ -5853,9 +5728,6 @@ const de___listOfEntitlement = (output: any, context: __SerdeContext): Entitleme const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Entitlement(entry, context); }); return retVal; @@ -5868,9 +5740,6 @@ const de___listOfGatewayNetwork = (output: any, context: __SerdeContext): Gatewa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GatewayNetwork(entry, context); }); return retVal; @@ -5883,9 +5752,6 @@ const de___listOfInputConfiguration = (output: any, context: __SerdeContext): In const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputConfiguration(entry, context); }); return retVal; @@ -5898,9 +5764,6 @@ const de___listOfListedBridge = (output: any, context: __SerdeContext): ListedBr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListedBridge(entry, context); }); return retVal; @@ -5913,9 +5776,6 @@ const de___listOfListedEntitlement = (output: any, context: __SerdeContext): Lis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListedEntitlement(entry, context); }); return retVal; @@ -5928,9 +5788,6 @@ const de___listOfListedFlow = (output: any, context: __SerdeContext): ListedFlow const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListedFlow(entry, context); }); return retVal; @@ -5943,9 +5800,6 @@ const de___listOfListedGateway = (output: any, context: __SerdeContext): ListedG const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListedGateway(entry, context); }); return retVal; @@ -5958,9 +5812,6 @@ const de___listOfListedGatewayInstance = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListedGatewayInstance(entry, context); }); return retVal; @@ -5973,9 +5824,6 @@ const de___listOfMediaStream = (output: any, context: __SerdeContext): MediaStre const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MediaStream(entry, context); }); return retVal; @@ -5991,9 +5839,6 @@ const de___listOfMediaStreamOutputConfiguration = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MediaStreamOutputConfiguration(entry, context); }); return retVal; @@ -6009,9 +5854,6 @@ const de___listOfMediaStreamSourceConfiguration = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MediaStreamSourceConfiguration(entry, context); }); return retVal; @@ -6024,9 +5866,6 @@ const de___listOfMessageDetail = (output: any, context: __SerdeContext): Message const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MessageDetail(entry, context); }); return retVal; @@ -6039,9 +5878,6 @@ const de___listOfOffering = (output: any, context: __SerdeContext): Offering[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Offering(entry, context); }); return retVal; @@ -6054,9 +5890,6 @@ const de___listOfOutput = (output: any, context: __SerdeContext): Output[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Output(entry, context); }); return retVal; @@ -6069,9 +5902,6 @@ const de___listOfReservation = (output: any, context: __SerdeContext): Reservati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Reservation(entry, context); }); return retVal; @@ -6084,9 +5914,6 @@ const de___listOfSource = (output: any, context: __SerdeContext): Source[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Source(entry, context); }); return retVal; @@ -6099,635 +5926,590 @@ const de___listOfVpcInterface = (output: any, context: __SerdeContext): VpcInter const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VpcInterface(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. /** * deserializeAws_restJson1Bridge */ const de_Bridge = (output: any, context: __SerdeContext): Bridge => { - return { - BridgeArn: __expectString(output.bridgeArn), - BridgeMessages: - output.bridgeMessages != null ? de___listOfMessageDetail(output.bridgeMessages, context) : undefined, - BridgeState: __expectString(output.bridgeState), - EgressGatewayBridge: - output.egressGatewayBridge != null ? de_EgressGatewayBridge(output.egressGatewayBridge, context) : undefined, - IngressGatewayBridge: - output.ingressGatewayBridge != null ? de_IngressGatewayBridge(output.ingressGatewayBridge, context) : undefined, - Name: __expectString(output.name), - Outputs: output.outputs != null ? de___listOfBridgeOutput(output.outputs, context) : undefined, - PlacementArn: __expectString(output.placementArn), - SourceFailoverConfig: - output.sourceFailoverConfig != null ? de_FailoverConfig(output.sourceFailoverConfig, context) : undefined, - Sources: output.sources != null ? de___listOfBridgeSource(output.sources, context) : undefined, - } as any; + return take(output, { + BridgeArn: [, __expectString, `bridgeArn`], + BridgeMessages: (_) => [, de___listOfMessageDetail(_, context), `bridgeMessages`], + BridgeState: [, __expectString, `bridgeState`], + EgressGatewayBridge: (_) => [, de_EgressGatewayBridge(_, context), `egressGatewayBridge`], + IngressGatewayBridge: (_) => [, de_IngressGatewayBridge(_, context), `ingressGatewayBridge`], + Name: [, __expectString, `name`], + Outputs: (_) => [, de___listOfBridgeOutput(_, context), `outputs`], + PlacementArn: [, __expectString, `placementArn`], + SourceFailoverConfig: (_) => [, de_FailoverConfig(_, context), `sourceFailoverConfig`], + Sources: (_) => [, de___listOfBridgeSource(_, context), `sources`], + }) as any; }; /** * deserializeAws_restJson1BridgeFlowOutput */ const de_BridgeFlowOutput = (output: any, context: __SerdeContext): BridgeFlowOutput => { - return { - FlowArn: __expectString(output.flowArn), - FlowSourceArn: __expectString(output.flowSourceArn), - Name: __expectString(output.name), - } as any; + return take(output, { + FlowArn: [, __expectString, `flowArn`], + FlowSourceArn: [, __expectString, `flowSourceArn`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1BridgeFlowSource */ const de_BridgeFlowSource = (output: any, context: __SerdeContext): BridgeFlowSource => { - return { - FlowArn: __expectString(output.flowArn), - FlowVpcInterfaceAttachment: - output.flowVpcInterfaceAttachment != null - ? de_VpcInterfaceAttachment(output.flowVpcInterfaceAttachment, context) - : undefined, - Name: __expectString(output.name), - OutputArn: __expectString(output.outputArn), - } as any; + return take(output, { + FlowArn: [, __expectString, `flowArn`], + FlowVpcInterfaceAttachment: (_) => [, de_VpcInterfaceAttachment(_, context), `flowVpcInterfaceAttachment`], + Name: [, __expectString, `name`], + OutputArn: [, __expectString, `outputArn`], + }) as any; }; /** * deserializeAws_restJson1BridgeNetworkOutput */ const de_BridgeNetworkOutput = (output: any, context: __SerdeContext): BridgeNetworkOutput => { - return { - IpAddress: __expectString(output.ipAddress), - Name: __expectString(output.name), - NetworkName: __expectString(output.networkName), - Port: __expectInt32(output.port), - Protocol: __expectString(output.protocol), - Ttl: __expectInt32(output.ttl), - } as any; + return take(output, { + IpAddress: [, __expectString, `ipAddress`], + Name: [, __expectString, `name`], + NetworkName: [, __expectString, `networkName`], + Port: [, __expectInt32, `port`], + Protocol: [, __expectString, `protocol`], + Ttl: [, __expectInt32, `ttl`], + }) as any; }; /** * deserializeAws_restJson1BridgeNetworkSource */ const de_BridgeNetworkSource = (output: any, context: __SerdeContext): BridgeNetworkSource => { - return { - MulticastIp: __expectString(output.multicastIp), - Name: __expectString(output.name), - NetworkName: __expectString(output.networkName), - Port: __expectInt32(output.port), - Protocol: __expectString(output.protocol), - } as any; + return take(output, { + MulticastIp: [, __expectString, `multicastIp`], + Name: [, __expectString, `name`], + NetworkName: [, __expectString, `networkName`], + Port: [, __expectInt32, `port`], + Protocol: [, __expectString, `protocol`], + }) as any; }; /** * deserializeAws_restJson1BridgeOutput */ const de_BridgeOutput = (output: any, context: __SerdeContext): BridgeOutput => { - return { - FlowOutput: output.flowOutput != null ? de_BridgeFlowOutput(output.flowOutput, context) : undefined, - NetworkOutput: output.networkOutput != null ? de_BridgeNetworkOutput(output.networkOutput, context) : undefined, - } as any; + return take(output, { + FlowOutput: (_) => [, de_BridgeFlowOutput(_, context), `flowOutput`], + NetworkOutput: (_) => [, de_BridgeNetworkOutput(_, context), `networkOutput`], + }) as any; }; /** * deserializeAws_restJson1BridgeSource */ const de_BridgeSource = (output: any, context: __SerdeContext): BridgeSource => { - return { - FlowSource: output.flowSource != null ? de_BridgeFlowSource(output.flowSource, context) : undefined, - NetworkSource: output.networkSource != null ? de_BridgeNetworkSource(output.networkSource, context) : undefined, - } as any; + return take(output, { + FlowSource: (_) => [, de_BridgeFlowSource(_, context), `flowSource`], + NetworkSource: (_) => [, de_BridgeNetworkSource(_, context), `networkSource`], + }) as any; }; /** * deserializeAws_restJson1DestinationConfiguration */ const de_DestinationConfiguration = (output: any, context: __SerdeContext): DestinationConfiguration => { - return { - DestinationIp: __expectString(output.destinationIp), - DestinationPort: __expectInt32(output.destinationPort), - Interface: output.interface != null ? de_Interface(output.interface, context) : undefined, - OutboundIp: __expectString(output.outboundIp), - } as any; + return take(output, { + DestinationIp: [, __expectString, `destinationIp`], + DestinationPort: [, __expectInt32, `destinationPort`], + Interface: (_) => [, de_Interface(_, context), `interface`], + OutboundIp: [, __expectString, `outboundIp`], + }) as any; }; /** * deserializeAws_restJson1EgressGatewayBridge */ const de_EgressGatewayBridge = (output: any, context: __SerdeContext): EgressGatewayBridge => { - return { - InstanceId: __expectString(output.instanceId), - MaxBitrate: __expectInt32(output.maxBitrate), - } as any; + return take(output, { + InstanceId: [, __expectString, `instanceId`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + }) as any; }; /** * deserializeAws_restJson1EncodingParameters */ const de_EncodingParameters = (output: any, context: __SerdeContext): EncodingParameters => { - return { - CompressionFactor: __limitedParseDouble(output.compressionFactor), - EncoderProfile: __expectString(output.encoderProfile), - } as any; + return take(output, { + CompressionFactor: [, __limitedParseDouble, `compressionFactor`], + EncoderProfile: [, __expectString, `encoderProfile`], + }) as any; }; /** * deserializeAws_restJson1Encryption */ const de_Encryption = (output: any, context: __SerdeContext): Encryption => { - return { - Algorithm: __expectString(output.algorithm), - ConstantInitializationVector: __expectString(output.constantInitializationVector), - DeviceId: __expectString(output.deviceId), - KeyType: __expectString(output.keyType), - Region: __expectString(output.region), - ResourceId: __expectString(output.resourceId), - RoleArn: __expectString(output.roleArn), - SecretArn: __expectString(output.secretArn), - Url: __expectString(output.url), - } as any; + return take(output, { + Algorithm: [, __expectString, `algorithm`], + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + DeviceId: [, __expectString, `deviceId`], + KeyType: [, __expectString, `keyType`], + Region: [, __expectString, `region`], + ResourceId: [, __expectString, `resourceId`], + RoleArn: [, __expectString, `roleArn`], + SecretArn: [, __expectString, `secretArn`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1Entitlement */ const de_Entitlement = (output: any, context: __SerdeContext): Entitlement => { - return { - DataTransferSubscriberFeePercent: __expectInt32(output.dataTransferSubscriberFeePercent), - Description: __expectString(output.description), - Encryption: output.encryption != null ? de_Encryption(output.encryption, context) : undefined, - EntitlementArn: __expectString(output.entitlementArn), - EntitlementStatus: __expectString(output.entitlementStatus), - Name: __expectString(output.name), - Subscribers: output.subscribers != null ? de___listOf__string(output.subscribers, context) : undefined, - } as any; + return take(output, { + DataTransferSubscriberFeePercent: [, __expectInt32, `dataTransferSubscriberFeePercent`], + Description: [, __expectString, `description`], + Encryption: (_) => [, de_Encryption(_, context), `encryption`], + EntitlementArn: [, __expectString, `entitlementArn`], + EntitlementStatus: [, __expectString, `entitlementStatus`], + Name: [, __expectString, `name`], + Subscribers: [, _json, `subscribers`], + }) as any; }; /** * deserializeAws_restJson1FailoverConfig */ const de_FailoverConfig = (output: any, context: __SerdeContext): FailoverConfig => { - return { - FailoverMode: __expectString(output.failoverMode), - RecoveryWindow: __expectInt32(output.recoveryWindow), - SourcePriority: output.sourcePriority != null ? de_SourcePriority(output.sourcePriority, context) : undefined, - State: __expectString(output.state), - } as any; + return take(output, { + FailoverMode: [, __expectString, `failoverMode`], + RecoveryWindow: [, __expectInt32, `recoveryWindow`], + SourcePriority: (_) => [, de_SourcePriority(_, context), `sourcePriority`], + State: [, __expectString, `state`], + }) as any; }; /** * deserializeAws_restJson1Flow */ const de_Flow = (output: any, context: __SerdeContext): Flow => { - return { - AvailabilityZone: __expectString(output.availabilityZone), - Description: __expectString(output.description), - EgressIp: __expectString(output.egressIp), - Entitlements: output.entitlements != null ? de___listOfEntitlement(output.entitlements, context) : undefined, - FlowArn: __expectString(output.flowArn), - Maintenance: output.maintenance != null ? de_Maintenance(output.maintenance, context) : undefined, - MediaStreams: output.mediaStreams != null ? de___listOfMediaStream(output.mediaStreams, context) : undefined, - Name: __expectString(output.name), - Outputs: output.outputs != null ? de___listOfOutput(output.outputs, context) : undefined, - Source: output.source != null ? de_Source(output.source, context) : undefined, - SourceFailoverConfig: - output.sourceFailoverConfig != null ? de_FailoverConfig(output.sourceFailoverConfig, context) : undefined, - Sources: output.sources != null ? de___listOfSource(output.sources, context) : undefined, - Status: __expectString(output.status), - VpcInterfaces: output.vpcInterfaces != null ? de___listOfVpcInterface(output.vpcInterfaces, context) : undefined, - } as any; + return take(output, { + AvailabilityZone: [, __expectString, `availabilityZone`], + Description: [, __expectString, `description`], + EgressIp: [, __expectString, `egressIp`], + Entitlements: (_) => [, de___listOfEntitlement(_, context), `entitlements`], + FlowArn: [, __expectString, `flowArn`], + Maintenance: (_) => [, de_Maintenance(_, context), `maintenance`], + MediaStreams: (_) => [, de___listOfMediaStream(_, context), `mediaStreams`], + Name: [, __expectString, `name`], + Outputs: (_) => [, de___listOfOutput(_, context), `outputs`], + Source: (_) => [, de_Source(_, context), `source`], + SourceFailoverConfig: (_) => [, de_FailoverConfig(_, context), `sourceFailoverConfig`], + Sources: (_) => [, de___listOfSource(_, context), `sources`], + Status: [, __expectString, `status`], + VpcInterfaces: (_) => [, de___listOfVpcInterface(_, context), `vpcInterfaces`], + }) as any; }; /** * deserializeAws_restJson1Fmtp */ const de_Fmtp = (output: any, context: __SerdeContext): Fmtp => { - return { - ChannelOrder: __expectString(output.channelOrder), - Colorimetry: __expectString(output.colorimetry), - ExactFramerate: __expectString(output.exactFramerate), - Par: __expectString(output.par), - Range: __expectString(output.range), - ScanMode: __expectString(output.scanMode), - Tcs: __expectString(output.tcs), - } as any; + return take(output, { + ChannelOrder: [, __expectString, `channelOrder`], + Colorimetry: [, __expectString, `colorimetry`], + ExactFramerate: [, __expectString, `exactFramerate`], + Par: [, __expectString, `par`], + Range: [, __expectString, `range`], + ScanMode: [, __expectString, `scanMode`], + Tcs: [, __expectString, `tcs`], + }) as any; }; /** * deserializeAws_restJson1Gateway */ const de_Gateway = (output: any, context: __SerdeContext): Gateway => { - return { - EgressCidrBlocks: - output.egressCidrBlocks != null ? de___listOf__string(output.egressCidrBlocks, context) : undefined, - GatewayArn: __expectString(output.gatewayArn), - GatewayMessages: - output.gatewayMessages != null ? de___listOfMessageDetail(output.gatewayMessages, context) : undefined, - GatewayState: __expectString(output.gatewayState), - Name: __expectString(output.name), - Networks: output.networks != null ? de___listOfGatewayNetwork(output.networks, context) : undefined, - } as any; + return take(output, { + EgressCidrBlocks: [, _json, `egressCidrBlocks`], + GatewayArn: [, __expectString, `gatewayArn`], + GatewayMessages: (_) => [, de___listOfMessageDetail(_, context), `gatewayMessages`], + GatewayState: [, __expectString, `gatewayState`], + Name: [, __expectString, `name`], + Networks: (_) => [, de___listOfGatewayNetwork(_, context), `networks`], + }) as any; }; /** * deserializeAws_restJson1GatewayBridgeSource */ const de_GatewayBridgeSource = (output: any, context: __SerdeContext): GatewayBridgeSource => { - return { - BridgeArn: __expectString(output.bridgeArn), - VpcInterfaceAttachment: - output.vpcInterfaceAttachment != null - ? de_VpcInterfaceAttachment(output.vpcInterfaceAttachment, context) - : undefined, - } as any; + return take(output, { + BridgeArn: [, __expectString, `bridgeArn`], + VpcInterfaceAttachment: (_) => [, de_VpcInterfaceAttachment(_, context), `vpcInterfaceAttachment`], + }) as any; }; /** * deserializeAws_restJson1GatewayInstance */ const de_GatewayInstance = (output: any, context: __SerdeContext): GatewayInstance => { - return { - BridgePlacement: __expectString(output.bridgePlacement), - ConnectionStatus: __expectString(output.connectionStatus), - GatewayArn: __expectString(output.gatewayArn), - GatewayInstanceArn: __expectString(output.gatewayInstanceArn), - InstanceId: __expectString(output.instanceId), - InstanceMessages: - output.instanceMessages != null ? de___listOfMessageDetail(output.instanceMessages, context) : undefined, - InstanceState: __expectString(output.instanceState), - RunningBridgeCount: __expectInt32(output.runningBridgeCount), - } as any; + return take(output, { + BridgePlacement: [, __expectString, `bridgePlacement`], + ConnectionStatus: [, __expectString, `connectionStatus`], + GatewayArn: [, __expectString, `gatewayArn`], + GatewayInstanceArn: [, __expectString, `gatewayInstanceArn`], + InstanceId: [, __expectString, `instanceId`], + InstanceMessages: (_) => [, de___listOfMessageDetail(_, context), `instanceMessages`], + InstanceState: [, __expectString, `instanceState`], + RunningBridgeCount: [, __expectInt32, `runningBridgeCount`], + }) as any; }; /** * deserializeAws_restJson1GatewayNetwork */ const de_GatewayNetwork = (output: any, context: __SerdeContext): GatewayNetwork => { - return { - CidrBlock: __expectString(output.cidrBlock), - Name: __expectString(output.name), - } as any; + return take(output, { + CidrBlock: [, __expectString, `cidrBlock`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1IngressGatewayBridge */ const de_IngressGatewayBridge = (output: any, context: __SerdeContext): IngressGatewayBridge => { - return { - InstanceId: __expectString(output.instanceId), - MaxBitrate: __expectInt32(output.maxBitrate), - MaxOutputs: __expectInt32(output.maxOutputs), - } as any; + return take(output, { + InstanceId: [, __expectString, `instanceId`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MaxOutputs: [, __expectInt32, `maxOutputs`], + }) as any; }; /** * deserializeAws_restJson1InputConfiguration */ const de_InputConfiguration = (output: any, context: __SerdeContext): InputConfiguration => { - return { - InputIp: __expectString(output.inputIp), - InputPort: __expectInt32(output.inputPort), - Interface: output.interface != null ? de_Interface(output.interface, context) : undefined, - } as any; + return take(output, { + InputIp: [, __expectString, `inputIp`], + InputPort: [, __expectInt32, `inputPort`], + Interface: (_) => [, de_Interface(_, context), `interface`], + }) as any; }; /** * deserializeAws_restJson1Interface */ const de_Interface = (output: any, context: __SerdeContext): Interface => { - return { - Name: __expectString(output.name), - } as any; + return take(output, { + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1ListedBridge */ const de_ListedBridge = (output: any, context: __SerdeContext): ListedBridge => { - return { - BridgeArn: __expectString(output.bridgeArn), - BridgeState: __expectString(output.bridgeState), - BridgeType: __expectString(output.bridgeType), - Name: __expectString(output.name), - PlacementArn: __expectString(output.placementArn), - } as any; + return take(output, { + BridgeArn: [, __expectString, `bridgeArn`], + BridgeState: [, __expectString, `bridgeState`], + BridgeType: [, __expectString, `bridgeType`], + Name: [, __expectString, `name`], + PlacementArn: [, __expectString, `placementArn`], + }) as any; }; /** * deserializeAws_restJson1ListedEntitlement */ const de_ListedEntitlement = (output: any, context: __SerdeContext): ListedEntitlement => { - return { - DataTransferSubscriberFeePercent: __expectInt32(output.dataTransferSubscriberFeePercent), - EntitlementArn: __expectString(output.entitlementArn), - EntitlementName: __expectString(output.entitlementName), - } as any; + return take(output, { + DataTransferSubscriberFeePercent: [, __expectInt32, `dataTransferSubscriberFeePercent`], + EntitlementArn: [, __expectString, `entitlementArn`], + EntitlementName: [, __expectString, `entitlementName`], + }) as any; }; /** * deserializeAws_restJson1ListedFlow */ const de_ListedFlow = (output: any, context: __SerdeContext): ListedFlow => { - return { - AvailabilityZone: __expectString(output.availabilityZone), - Description: __expectString(output.description), - FlowArn: __expectString(output.flowArn), - Maintenance: output.maintenance != null ? de_Maintenance(output.maintenance, context) : undefined, - Name: __expectString(output.name), - SourceType: __expectString(output.sourceType), - Status: __expectString(output.status), - } as any; + return take(output, { + AvailabilityZone: [, __expectString, `availabilityZone`], + Description: [, __expectString, `description`], + FlowArn: [, __expectString, `flowArn`], + Maintenance: (_) => [, de_Maintenance(_, context), `maintenance`], + Name: [, __expectString, `name`], + SourceType: [, __expectString, `sourceType`], + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1ListedGateway */ const de_ListedGateway = (output: any, context: __SerdeContext): ListedGateway => { - return { - GatewayArn: __expectString(output.gatewayArn), - GatewayState: __expectString(output.gatewayState), - Name: __expectString(output.name), - } as any; + return take(output, { + GatewayArn: [, __expectString, `gatewayArn`], + GatewayState: [, __expectString, `gatewayState`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1ListedGatewayInstance */ const de_ListedGatewayInstance = (output: any, context: __SerdeContext): ListedGatewayInstance => { - return { - GatewayArn: __expectString(output.gatewayArn), - GatewayInstanceArn: __expectString(output.gatewayInstanceArn), - InstanceId: __expectString(output.instanceId), - InstanceState: __expectString(output.instanceState), - } as any; + return take(output, { + GatewayArn: [, __expectString, `gatewayArn`], + GatewayInstanceArn: [, __expectString, `gatewayInstanceArn`], + InstanceId: [, __expectString, `instanceId`], + InstanceState: [, __expectString, `instanceState`], + }) as any; }; /** * deserializeAws_restJson1Maintenance */ const de_Maintenance = (output: any, context: __SerdeContext): Maintenance => { - return { - MaintenanceDay: __expectString(output.maintenanceDay), - MaintenanceDeadline: __expectString(output.maintenanceDeadline), - MaintenanceScheduledDate: __expectString(output.maintenanceScheduledDate), - MaintenanceStartHour: __expectString(output.maintenanceStartHour), - } as any; + return take(output, { + MaintenanceDay: [, __expectString, `maintenanceDay`], + MaintenanceDeadline: [, __expectString, `maintenanceDeadline`], + MaintenanceScheduledDate: [, __expectString, `maintenanceScheduledDate`], + MaintenanceStartHour: [, __expectString, `maintenanceStartHour`], + }) as any; }; /** * deserializeAws_restJson1MediaStream */ const de_MediaStream = (output: any, context: __SerdeContext): MediaStream => { - return { - Attributes: output.attributes != null ? de_MediaStreamAttributes(output.attributes, context) : undefined, - ClockRate: __expectInt32(output.clockRate), - Description: __expectString(output.description), - Fmt: __expectInt32(output.fmt), - MediaStreamId: __expectInt32(output.mediaStreamId), - MediaStreamName: __expectString(output.mediaStreamName), - MediaStreamType: __expectString(output.mediaStreamType), - VideoFormat: __expectString(output.videoFormat), - } as any; + return take(output, { + Attributes: (_) => [, de_MediaStreamAttributes(_, context), `attributes`], + ClockRate: [, __expectInt32, `clockRate`], + Description: [, __expectString, `description`], + Fmt: [, __expectInt32, `fmt`], + MediaStreamId: [, __expectInt32, `mediaStreamId`], + MediaStreamName: [, __expectString, `mediaStreamName`], + MediaStreamType: [, __expectString, `mediaStreamType`], + VideoFormat: [, __expectString, `videoFormat`], + }) as any; }; /** * deserializeAws_restJson1MediaStreamAttributes */ const de_MediaStreamAttributes = (output: any, context: __SerdeContext): MediaStreamAttributes => { - return { - Fmtp: output.fmtp != null ? de_Fmtp(output.fmtp, context) : undefined, - Lang: __expectString(output.lang), - } as any; + return take(output, { + Fmtp: (_) => [, de_Fmtp(_, context), `fmtp`], + Lang: [, __expectString, `lang`], + }) as any; }; /** * deserializeAws_restJson1MediaStreamOutputConfiguration */ const de_MediaStreamOutputConfiguration = (output: any, context: __SerdeContext): MediaStreamOutputConfiguration => { - return { - DestinationConfigurations: - output.destinationConfigurations != null - ? de___listOfDestinationConfiguration(output.destinationConfigurations, context) - : undefined, - EncodingName: __expectString(output.encodingName), - EncodingParameters: - output.encodingParameters != null ? de_EncodingParameters(output.encodingParameters, context) : undefined, - MediaStreamName: __expectString(output.mediaStreamName), - } as any; + return take(output, { + DestinationConfigurations: (_) => [, de___listOfDestinationConfiguration(_, context), `destinationConfigurations`], + EncodingName: [, __expectString, `encodingName`], + EncodingParameters: (_) => [, de_EncodingParameters(_, context), `encodingParameters`], + MediaStreamName: [, __expectString, `mediaStreamName`], + }) as any; }; /** * deserializeAws_restJson1MediaStreamSourceConfiguration */ const de_MediaStreamSourceConfiguration = (output: any, context: __SerdeContext): MediaStreamSourceConfiguration => { - return { - EncodingName: __expectString(output.encodingName), - InputConfigurations: - output.inputConfigurations != null - ? de___listOfInputConfiguration(output.inputConfigurations, context) - : undefined, - MediaStreamName: __expectString(output.mediaStreamName), - } as any; + return take(output, { + EncodingName: [, __expectString, `encodingName`], + InputConfigurations: (_) => [, de___listOfInputConfiguration(_, context), `inputConfigurations`], + MediaStreamName: [, __expectString, `mediaStreamName`], + }) as any; }; /** * deserializeAws_restJson1MessageDetail */ const de_MessageDetail = (output: any, context: __SerdeContext): MessageDetail => { - return { - Code: __expectString(output.code), - Message: __expectString(output.message), - ResourceName: __expectString(output.resourceName), - } as any; + return take(output, { + Code: [, __expectString, `code`], + Message: [, __expectString, `message`], + ResourceName: [, __expectString, `resourceName`], + }) as any; }; /** * deserializeAws_restJson1Messages */ const de_Messages = (output: any, context: __SerdeContext): Messages => { - return { - Errors: output.errors != null ? de___listOf__string(output.errors, context) : undefined, - } as any; + return take(output, { + Errors: [, _json, `errors`], + }) as any; }; /** * deserializeAws_restJson1Offering */ const de_Offering = (output: any, context: __SerdeContext): Offering => { - return { - CurrencyCode: __expectString(output.currencyCode), - Duration: __expectInt32(output.duration), - DurationUnits: __expectString(output.durationUnits), - OfferingArn: __expectString(output.offeringArn), - OfferingDescription: __expectString(output.offeringDescription), - PricePerUnit: __expectString(output.pricePerUnit), - PriceUnits: __expectString(output.priceUnits), - ResourceSpecification: - output.resourceSpecification != null - ? de_ResourceSpecification(output.resourceSpecification, context) - : undefined, - } as any; + return take(output, { + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + OfferingArn: [, __expectString, `offeringArn`], + OfferingDescription: [, __expectString, `offeringDescription`], + PricePerUnit: [, __expectString, `pricePerUnit`], + PriceUnits: [, __expectString, `priceUnits`], + ResourceSpecification: (_) => [, de_ResourceSpecification(_, context), `resourceSpecification`], + }) as any; }; /** * deserializeAws_restJson1Output */ const de_Output = (output: any, context: __SerdeContext): Output => { - return { - BridgeArn: __expectString(output.bridgeArn), - BridgePorts: output.bridgePorts != null ? de___listOf__integer(output.bridgePorts, context) : undefined, - DataTransferSubscriberFeePercent: __expectInt32(output.dataTransferSubscriberFeePercent), - Description: __expectString(output.description), - Destination: __expectString(output.destination), - Encryption: output.encryption != null ? de_Encryption(output.encryption, context) : undefined, - EntitlementArn: __expectString(output.entitlementArn), - ListenerAddress: __expectString(output.listenerAddress), - MediaLiveInputArn: __expectString(output.mediaLiveInputArn), - MediaStreamOutputConfigurations: - output.mediaStreamOutputConfigurations != null - ? de___listOfMediaStreamOutputConfiguration(output.mediaStreamOutputConfigurations, context) - : undefined, - Name: __expectString(output.name), - OutputArn: __expectString(output.outputArn), - Port: __expectInt32(output.port), - Transport: output.transport != null ? de_Transport(output.transport, context) : undefined, - VpcInterfaceAttachment: - output.vpcInterfaceAttachment != null - ? de_VpcInterfaceAttachment(output.vpcInterfaceAttachment, context) - : undefined, - } as any; + return take(output, { + BridgeArn: [, __expectString, `bridgeArn`], + BridgePorts: [, _json, `bridgePorts`], + DataTransferSubscriberFeePercent: [, __expectInt32, `dataTransferSubscriberFeePercent`], + Description: [, __expectString, `description`], + Destination: [, __expectString, `destination`], + Encryption: (_) => [, de_Encryption(_, context), `encryption`], + EntitlementArn: [, __expectString, `entitlementArn`], + ListenerAddress: [, __expectString, `listenerAddress`], + MediaLiveInputArn: [, __expectString, `mediaLiveInputArn`], + MediaStreamOutputConfigurations: (_) => [ + , + de___listOfMediaStreamOutputConfiguration(_, context), + `mediaStreamOutputConfigurations`, + ], + Name: [, __expectString, `name`], + OutputArn: [, __expectString, `outputArn`], + Port: [, __expectInt32, `port`], + Transport: (_) => [, de_Transport(_, context), `transport`], + VpcInterfaceAttachment: (_) => [, de_VpcInterfaceAttachment(_, context), `vpcInterfaceAttachment`], + }) as any; }; /** * deserializeAws_restJson1Reservation */ const de_Reservation = (output: any, context: __SerdeContext): Reservation => { - return { - CurrencyCode: __expectString(output.currencyCode), - Duration: __expectInt32(output.duration), - DurationUnits: __expectString(output.durationUnits), - End: __expectString(output.end), - OfferingArn: __expectString(output.offeringArn), - OfferingDescription: __expectString(output.offeringDescription), - PricePerUnit: __expectString(output.pricePerUnit), - PriceUnits: __expectString(output.priceUnits), - ReservationArn: __expectString(output.reservationArn), - ReservationName: __expectString(output.reservationName), - ReservationState: __expectString(output.reservationState), - ResourceSpecification: - output.resourceSpecification != null - ? de_ResourceSpecification(output.resourceSpecification, context) - : undefined, - Start: __expectString(output.start), - } as any; + return take(output, { + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + End: [, __expectString, `end`], + OfferingArn: [, __expectString, `offeringArn`], + OfferingDescription: [, __expectString, `offeringDescription`], + PricePerUnit: [, __expectString, `pricePerUnit`], + PriceUnits: [, __expectString, `priceUnits`], + ReservationArn: [, __expectString, `reservationArn`], + ReservationName: [, __expectString, `reservationName`], + ReservationState: [, __expectString, `reservationState`], + ResourceSpecification: (_) => [, de_ResourceSpecification(_, context), `resourceSpecification`], + Start: [, __expectString, `start`], + }) as any; }; /** * deserializeAws_restJson1ResourceSpecification */ const de_ResourceSpecification = (output: any, context: __SerdeContext): ResourceSpecification => { - return { - ReservedBitrate: __expectInt32(output.reservedBitrate), - ResourceType: __expectString(output.resourceType), - } as any; + return take(output, { + ReservedBitrate: [, __expectInt32, `reservedBitrate`], + ResourceType: [, __expectString, `resourceType`], + }) as any; }; /** * deserializeAws_restJson1Source */ const de_Source = (output: any, context: __SerdeContext): Source => { - return { - DataTransferSubscriberFeePercent: __expectInt32(output.dataTransferSubscriberFeePercent), - Decryption: output.decryption != null ? de_Encryption(output.decryption, context) : undefined, - Description: __expectString(output.description), - EntitlementArn: __expectString(output.entitlementArn), - GatewayBridgeSource: - output.gatewayBridgeSource != null ? de_GatewayBridgeSource(output.gatewayBridgeSource, context) : undefined, - IngestIp: __expectString(output.ingestIp), - IngestPort: __expectInt32(output.ingestPort), - MediaStreamSourceConfigurations: - output.mediaStreamSourceConfigurations != null - ? de___listOfMediaStreamSourceConfiguration(output.mediaStreamSourceConfigurations, context) - : undefined, - Name: __expectString(output.name), - SenderControlPort: __expectInt32(output.senderControlPort), - SenderIpAddress: __expectString(output.senderIpAddress), - SourceArn: __expectString(output.sourceArn), - Transport: output.transport != null ? de_Transport(output.transport, context) : undefined, - VpcInterfaceName: __expectString(output.vpcInterfaceName), - WhitelistCidr: __expectString(output.whitelistCidr), - } as any; + return take(output, { + DataTransferSubscriberFeePercent: [, __expectInt32, `dataTransferSubscriberFeePercent`], + Decryption: (_) => [, de_Encryption(_, context), `decryption`], + Description: [, __expectString, `description`], + EntitlementArn: [, __expectString, `entitlementArn`], + GatewayBridgeSource: (_) => [, de_GatewayBridgeSource(_, context), `gatewayBridgeSource`], + IngestIp: [, __expectString, `ingestIp`], + IngestPort: [, __expectInt32, `ingestPort`], + MediaStreamSourceConfigurations: (_) => [ + , + de___listOfMediaStreamSourceConfiguration(_, context), + `mediaStreamSourceConfigurations`, + ], + Name: [, __expectString, `name`], + SenderControlPort: [, __expectInt32, `senderControlPort`], + SenderIpAddress: [, __expectString, `senderIpAddress`], + SourceArn: [, __expectString, `sourceArn`], + Transport: (_) => [, de_Transport(_, context), `transport`], + VpcInterfaceName: [, __expectString, `vpcInterfaceName`], + WhitelistCidr: [, __expectString, `whitelistCidr`], + }) as any; }; /** * deserializeAws_restJson1SourcePriority */ const de_SourcePriority = (output: any, context: __SerdeContext): SourcePriority => { - return { - PrimarySource: __expectString(output.primarySource), - } as any; + return take(output, { + PrimarySource: [, __expectString, `primarySource`], + }) as any; }; /** * deserializeAws_restJson1Transport */ const de_Transport = (output: any, context: __SerdeContext): Transport => { - return { - CidrAllowList: output.cidrAllowList != null ? de___listOf__string(output.cidrAllowList, context) : undefined, - MaxBitrate: __expectInt32(output.maxBitrate), - MaxLatency: __expectInt32(output.maxLatency), - MaxSyncBuffer: __expectInt32(output.maxSyncBuffer), - MinLatency: __expectInt32(output.minLatency), - Protocol: __expectString(output.protocol), - RemoteId: __expectString(output.remoteId), - SenderControlPort: __expectInt32(output.senderControlPort), - SenderIpAddress: __expectString(output.senderIpAddress), - SmoothingLatency: __expectInt32(output.smoothingLatency), - SourceListenerAddress: __expectString(output.sourceListenerAddress), - SourceListenerPort: __expectInt32(output.sourceListenerPort), - StreamId: __expectString(output.streamId), - } as any; + return take(output, { + CidrAllowList: [, _json, `cidrAllowList`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MaxLatency: [, __expectInt32, `maxLatency`], + MaxSyncBuffer: [, __expectInt32, `maxSyncBuffer`], + MinLatency: [, __expectInt32, `minLatency`], + Protocol: [, __expectString, `protocol`], + RemoteId: [, __expectString, `remoteId`], + SenderControlPort: [, __expectInt32, `senderControlPort`], + SenderIpAddress: [, __expectString, `senderIpAddress`], + SmoothingLatency: [, __expectInt32, `smoothingLatency`], + SourceListenerAddress: [, __expectString, `sourceListenerAddress`], + SourceListenerPort: [, __expectInt32, `sourceListenerPort`], + StreamId: [, __expectString, `streamId`], + }) as any; }; /** * deserializeAws_restJson1VpcInterface */ const de_VpcInterface = (output: any, context: __SerdeContext): VpcInterface => { - return { - Name: __expectString(output.name), - NetworkInterfaceIds: - output.networkInterfaceIds != null ? de___listOf__string(output.networkInterfaceIds, context) : undefined, - NetworkInterfaceType: __expectString(output.networkInterfaceType), - RoleArn: __expectString(output.roleArn), - SecurityGroupIds: - output.securityGroupIds != null ? de___listOf__string(output.securityGroupIds, context) : undefined, - SubnetId: __expectString(output.subnetId), - } as any; + return take(output, { + Name: [, __expectString, `name`], + NetworkInterfaceIds: [, _json, `networkInterfaceIds`], + NetworkInterfaceType: [, __expectString, `networkInterfaceType`], + RoleArn: [, __expectString, `roleArn`], + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetId: [, __expectString, `subnetId`], + }) as any; }; /** * deserializeAws_restJson1VpcInterfaceAttachment */ const de_VpcInterfaceAttachment = (output: any, context: __SerdeContext): VpcInterfaceAttachment => { - return { - VpcInterfaceName: __expectString(output.vpcInterfaceName), - } as any; + return take(output, { + VpcInterfaceName: [, __expectString, `vpcInterfaceName`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-mediaconvert/src/protocols/Aws_restJson1.ts b/clients/client-mediaconvert/src/protocols/Aws_restJson1.ts index 8aa0c297d754..0a18eca0cbf1 100644 --- a/clients/client-mediaconvert/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediaconvert/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -9,11 +10,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -260,9 +262,11 @@ export const se_AssociateCertificateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/certificates"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + arn: [, , `Arn`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -310,25 +314,23 @@ export const se_CreateJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/jobs"; let body: any; - body = JSON.stringify({ - ...(input.AccelerationSettings != null && { - accelerationSettings: se_AccelerationSettings(input.AccelerationSettings, context), - }), - ...(input.BillingTagsSource != null && { billingTagsSource: input.BillingTagsSource }), - clientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.HopDestinations != null && { - hopDestinations: se___listOfHopDestination(input.HopDestinations, context), - }), - ...(input.JobTemplate != null && { jobTemplate: input.JobTemplate }), - ...(input.Priority != null && { priority: input.Priority }), - ...(input.Queue != null && { queue: input.Queue }), - ...(input.Role != null && { role: input.Role }), - ...(input.Settings != null && { settings: se_JobSettings(input.Settings, context) }), - ...(input.SimulateReservedQueue != null && { simulateReservedQueue: input.SimulateReservedQueue }), - ...(input.StatusUpdateInterval != null && { statusUpdateInterval: input.StatusUpdateInterval }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - ...(input.UserMetadata != null && { userMetadata: se___mapOf__string(input.UserMetadata, context) }), - }); + body = JSON.stringify( + take(input, { + accelerationSettings: [, (_) => se_AccelerationSettings(_, context), `AccelerationSettings`], + billingTagsSource: [, , `BillingTagsSource`], + clientRequestToken: [, (_) => _ ?? generateIdempotencyToken(), `ClientRequestToken`], + hopDestinations: [, (_) => se___listOfHopDestination(_, context), `HopDestinations`], + jobTemplate: [, , `JobTemplate`], + priority: [, , `Priority`], + queue: [, , `Queue`], + role: [, , `Role`], + settings: [, (_) => se_JobSettings(_, context), `Settings`], + simulateReservedQueue: [, , `SimulateReservedQueue`], + statusUpdateInterval: [, , `StatusUpdateInterval`], + tags: [, (_) => _json(_), `Tags`], + userMetadata: [, (_) => _json(_), `UserMetadata`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -354,22 +356,20 @@ export const se_CreateJobTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/jobTemplates"; let body: any; - body = JSON.stringify({ - ...(input.AccelerationSettings != null && { - accelerationSettings: se_AccelerationSettings(input.AccelerationSettings, context), - }), - ...(input.Category != null && { category: input.Category }), - ...(input.Description != null && { description: input.Description }), - ...(input.HopDestinations != null && { - hopDestinations: se___listOfHopDestination(input.HopDestinations, context), - }), - ...(input.Name != null && { name: input.Name }), - ...(input.Priority != null && { priority: input.Priority }), - ...(input.Queue != null && { queue: input.Queue }), - ...(input.Settings != null && { settings: se_JobTemplateSettings(input.Settings, context) }), - ...(input.StatusUpdateInterval != null && { statusUpdateInterval: input.StatusUpdateInterval }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + accelerationSettings: [, (_) => se_AccelerationSettings(_, context), `AccelerationSettings`], + category: [, , `Category`], + description: [, , `Description`], + hopDestinations: [, (_) => se___listOfHopDestination(_, context), `HopDestinations`], + name: [, , `Name`], + priority: [, , `Priority`], + queue: [, , `Queue`], + settings: [, (_) => se_JobTemplateSettings(_, context), `Settings`], + statusUpdateInterval: [, , `StatusUpdateInterval`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -394,13 +394,15 @@ export const se_CreatePresetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/presets"; let body: any; - body = JSON.stringify({ - ...(input.Category != null && { category: input.Category }), - ...(input.Description != null && { description: input.Description }), - ...(input.Name != null && { name: input.Name }), - ...(input.Settings != null && { settings: se_PresetSettings(input.Settings, context) }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + category: [, , `Category`], + description: [, , `Description`], + name: [, , `Name`], + settings: [, (_) => se_PresetSettings(_, context), `Settings`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -425,16 +427,16 @@ export const se_CreateQueueCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/queues"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.Name != null && { name: input.Name }), - ...(input.PricingPlan != null && { pricingPlan: input.PricingPlan }), - ...(input.ReservationPlanSettings != null && { - reservationPlanSettings: se_ReservationPlanSettings(input.ReservationPlanSettings, context), - }), - ...(input.Status != null && { status: input.Status }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + name: [, , `Name`], + pricingPlan: [, , `PricingPlan`], + reservationPlanSettings: [, (_) => se_ReservationPlanSettings(_, context), `ReservationPlanSettings`], + status: [, , `Status`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -556,11 +558,13 @@ export const se_DescribeEndpointsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/endpoints"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { maxResults: input.MaxResults }), - ...(input.Mode != null && { mode: input.Mode }), - ...(input.NextToken != null && { nextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [, , `MaxResults`], + mode: [, , `Mode`], + nextToken: [, , `NextToken`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -869,9 +873,11 @@ export const se_PutPolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/policy"; let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { policy: se_Policy(input.Policy, context) }), - }); + body = JSON.stringify( + take(input, { + policy: [, (_) => se_Policy(_, context), `Policy`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -896,10 +902,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/tags"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { arn: input.Arn }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + arn: [, , `Arn`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -925,9 +933,11 @@ export const se_UntagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/tags/{Arn}"; resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn!, "{Arn}", false); let body: any; - body = JSON.stringify({ - ...(input.TagKeys != null && { tagKeys: se___listOf__string(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + tagKeys: [, (_) => _json(_), `TagKeys`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -954,20 +964,18 @@ export const se_UpdateJobTemplateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/jobTemplates/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.AccelerationSettings != null && { - accelerationSettings: se_AccelerationSettings(input.AccelerationSettings, context), - }), - ...(input.Category != null && { category: input.Category }), - ...(input.Description != null && { description: input.Description }), - ...(input.HopDestinations != null && { - hopDestinations: se___listOfHopDestination(input.HopDestinations, context), - }), - ...(input.Priority != null && { priority: input.Priority }), - ...(input.Queue != null && { queue: input.Queue }), - ...(input.Settings != null && { settings: se_JobTemplateSettings(input.Settings, context) }), - ...(input.StatusUpdateInterval != null && { statusUpdateInterval: input.StatusUpdateInterval }), - }); + body = JSON.stringify( + take(input, { + accelerationSettings: [, (_) => se_AccelerationSettings(_, context), `AccelerationSettings`], + category: [, , `Category`], + description: [, , `Description`], + hopDestinations: [, (_) => se___listOfHopDestination(_, context), `HopDestinations`], + priority: [, , `Priority`], + queue: [, , `Queue`], + settings: [, (_) => se_JobTemplateSettings(_, context), `Settings`], + statusUpdateInterval: [, , `StatusUpdateInterval`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -994,11 +1002,13 @@ export const se_UpdatePresetCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/presets/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Category != null && { category: input.Category }), - ...(input.Description != null && { description: input.Description }), - ...(input.Settings != null && { settings: se_PresetSettings(input.Settings, context) }), - }); + body = JSON.stringify( + take(input, { + category: [, , `Category`], + description: [, , `Description`], + settings: [, (_) => se_PresetSettings(_, context), `Settings`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1025,13 +1035,13 @@ export const se_UpdateQueueCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2017-08-29/queues/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.ReservationPlanSettings != null && { - reservationPlanSettings: se_ReservationPlanSettings(input.ReservationPlanSettings, context), - }), - ...(input.Status != null && { status: input.Status }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + reservationPlanSettings: [, (_) => se_ReservationPlanSettings(_, context), `ReservationPlanSettings`], + status: [, , `Status`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1093,10 +1103,9 @@ const de_AssociateCertificateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1152,10 +1161,9 @@ const de_CancelJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1175,9 +1183,10 @@ export const de_CreateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.Job = de_Job(data.job, context); - } + const doc = take(data, { + Job: [, (_) => de_Job(_, context), `job`], + }); + Object.assign(contents, doc); return contents; }; @@ -1214,10 +1223,9 @@ const de_CreateJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1237,9 +1245,10 @@ export const de_CreateJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplate != null) { - contents.JobTemplate = de_JobTemplate(data.jobTemplate, context); - } + const doc = take(data, { + JobTemplate: [, (_) => de_JobTemplate(_, context), `jobTemplate`], + }); + Object.assign(contents, doc); return contents; }; @@ -1276,10 +1285,9 @@ const de_CreateJobTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1299,9 +1307,10 @@ export const de_CreatePresetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.preset != null) { - contents.Preset = de_Preset(data.preset, context); - } + const doc = take(data, { + Preset: [, (_) => de_Preset(_, context), `preset`], + }); + Object.assign(contents, doc); return contents; }; @@ -1338,10 +1347,9 @@ const de_CreatePresetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1361,9 +1369,10 @@ export const de_CreateQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.queue != null) { - contents.Queue = de_Queue(data.queue, context); - } + const doc = take(data, { + Queue: [, (_) => de_Queue(_, context), `queue`], + }); + Object.assign(contents, doc); return contents; }; @@ -1400,10 +1409,9 @@ const de_CreateQueueCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1459,10 +1467,9 @@ const de_DeleteJobTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1518,10 +1525,9 @@ const de_DeletePolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1577,10 +1583,9 @@ const de_DeletePresetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1636,10 +1641,9 @@ const de_DeleteQueueCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1659,12 +1663,11 @@ export const de_DescribeEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.endpoints != null) { - contents.Endpoints = de___listOfEndpoint(data.endpoints, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Endpoints: [, (_) => de___listOfEndpoint(_, context), `endpoints`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1701,10 +1704,9 @@ const de_DescribeEndpointsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1760,10 +1762,9 @@ const de_DisassociateCertificateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1783,9 +1784,10 @@ export const de_GetJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.Job = de_Job(data.job, context); - } + const doc = take(data, { + Job: [, (_) => de_Job(_, context), `job`], + }); + Object.assign(contents, doc); return contents; }; @@ -1819,10 +1821,9 @@ const de_GetJobCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1842,9 +1843,10 @@ export const de_GetJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplate != null) { - contents.JobTemplate = de_JobTemplate(data.jobTemplate, context); - } + const doc = take(data, { + JobTemplate: [, (_) => de_JobTemplate(_, context), `jobTemplate`], + }); + Object.assign(contents, doc); return contents; }; @@ -1881,10 +1883,9 @@ const de_GetJobTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1904,9 +1905,10 @@ export const de_GetPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.Policy = de_Policy(data.policy, context); - } + const doc = take(data, { + Policy: [, (_) => de_Policy(_, context), `policy`], + }); + Object.assign(contents, doc); return contents; }; @@ -1943,10 +1945,9 @@ const de_GetPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1966,9 +1967,10 @@ export const de_GetPresetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.preset != null) { - contents.Preset = de_Preset(data.preset, context); - } + const doc = take(data, { + Preset: [, (_) => de_Preset(_, context), `preset`], + }); + Object.assign(contents, doc); return contents; }; @@ -2005,10 +2007,9 @@ const de_GetPresetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,9 +2029,10 @@ export const de_GetQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.queue != null) { - contents.Queue = de_Queue(data.queue, context); - } + const doc = take(data, { + Queue: [, (_) => de_Queue(_, context), `queue`], + }); + Object.assign(contents, doc); return contents; }; @@ -2067,10 +2069,9 @@ const de_GetQueueCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2090,12 +2091,11 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.Jobs = de___listOfJob(data.jobs, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Jobs: [, (_) => de___listOfJob(_, context), `jobs`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2132,10 +2132,9 @@ const de_ListJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2155,12 +2154,11 @@ export const de_ListJobTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplates != null) { - contents.JobTemplates = de___listOfJobTemplate(data.jobTemplates, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + JobTemplates: [, (_) => de___listOfJobTemplate(_, context), `jobTemplates`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2197,10 +2195,9 @@ const de_ListJobTemplatesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2220,12 +2217,11 @@ export const de_ListPresetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.presets != null) { - contents.Presets = de___listOfPreset(data.presets, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Presets: [, (_) => de___listOfPreset(_, context), `presets`], + }); + Object.assign(contents, doc); return contents; }; @@ -2262,10 +2258,9 @@ const de_ListPresetsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2285,12 +2280,11 @@ export const de_ListQueuesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.queues != null) { - contents.Queues = de___listOfQueue(data.queues, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Queues: [, (_) => de___listOfQueue(_, context), `queues`], + }); + Object.assign(contents, doc); return contents; }; @@ -2327,10 +2321,9 @@ const de_ListQueuesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2350,9 +2343,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceTags != null) { - contents.ResourceTags = de_ResourceTags(data.resourceTags, context); - } + const doc = take(data, { + ResourceTags: [, (_) => de_ResourceTags(_, context), `resourceTags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2389,10 +2383,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2412,9 +2405,10 @@ export const de_PutPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.Policy = de_Policy(data.policy, context); - } + const doc = take(data, { + Policy: [, (_) => de_Policy(_, context), `policy`], + }); + Object.assign(contents, doc); return contents; }; @@ -2451,10 +2445,9 @@ const de_PutPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2510,10 +2503,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2569,10 +2561,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2592,9 +2583,10 @@ export const de_UpdateJobTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobTemplate != null) { - contents.JobTemplate = de_JobTemplate(data.jobTemplate, context); - } + const doc = take(data, { + JobTemplate: [, (_) => de_JobTemplate(_, context), `jobTemplate`], + }); + Object.assign(contents, doc); return contents; }; @@ -2631,10 +2623,9 @@ const de_UpdateJobTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2654,9 +2645,10 @@ export const de_UpdatePresetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.preset != null) { - contents.Preset = de_Preset(data.preset, context); - } + const doc = take(data, { + Preset: [, (_) => de_Preset(_, context), `preset`], + }); + Object.assign(contents, doc); return contents; }; @@ -2693,10 +2685,9 @@ const de_UpdatePresetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2716,9 +2707,10 @@ export const de_UpdateQueueCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.queue != null) { - contents.Queue = de_Queue(data.queue, context); - } + const doc = take(data, { + Queue: [, (_) => de_Queue(_, context), `queue`], + }); + Object.assign(contents, doc); return contents; }; @@ -2755,25 +2747,25 @@ const de_UpdateQueueCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2787,9 +2779,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2803,9 +2796,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2822,9 +2816,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2838,9 +2833,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2857,9 +2853,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2878,99 +2875,21 @@ const se___listOf__doubleMinNegative60Max6 = (input: number[], context: __SerdeC }); }; -/** - * serializeAws_restJson1__listOf__integerMin1Max2147483647 - */ -const se___listOf__integerMin1Max2147483647 = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__integerMin1Max2147483647 omitted. -/** - * serializeAws_restJson1__listOf__integerMin32Max8182 - */ -const se___listOf__integerMin32Max8182 = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__integerMin32Max8182 omitted. -/** - * serializeAws_restJson1__listOf__integerMinNegative60Max6 - */ -const se___listOf__integerMinNegative60Max6 = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__integerMinNegative60Max6 omitted. -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. -/** - * serializeAws_restJson1__listOf__stringMin1 - */ -const se___listOf__stringMin1 = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__stringMin1 omitted. -/** - * serializeAws_restJson1__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 - */ -const se___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 = ( - input: string[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 omitted. -/** - * serializeAws_restJson1__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 - */ -const se___listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 = ( - input: string[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 omitted. -/** - * serializeAws_restJson1__listOf__stringPatternS3ASSETMAPXml - */ -const se___listOf__stringPatternS3ASSETMAPXml = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__stringPatternS3ASSETMAPXml omitted. /** * serializeAws_restJson1__listOfAllowedRenditionSize @@ -3071,16 +2990,7 @@ const se___listOfHlsAdditionalManifest = (input: HlsAdditionalManifest[], contex }); }; -/** - * serializeAws_restJson1__listOfHlsAdMarkers - */ -const se___listOfHlsAdMarkers = (input: (HlsAdMarkers | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfHlsAdMarkers omitted. /** * serializeAws_restJson1__listOfHlsCaptionLanguageMapping @@ -3203,29 +3113,9 @@ const se___listOfOutputGroup = (input: OutputGroup[], context: __SerdeContext): }); }; -/** - * serializeAws_restJson1__listOfTeletextPageType - */ -const se___listOfTeletextPageType = (input: (TeletextPageType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfTeletextPageType omitted. -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. /** * serializeAws_restJson1__mapOfAudioSelector @@ -3270,706 +3160,596 @@ const se___mapOfCaptionSelector = (input: Record, conte * serializeAws_restJson1AacSettings */ const se_AacSettings = (input: AacSettings, context: __SerdeContext): any => { - return { - ...(input.AudioDescriptionBroadcasterMix != null && { - audioDescriptionBroadcasterMix: input.AudioDescriptionBroadcasterMix, - }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.CodecProfile != null && { codecProfile: input.CodecProfile }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.RawFormat != null && { rawFormat: input.RawFormat }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - ...(input.Specification != null && { specification: input.Specification }), - ...(input.VbrQuality != null && { vbrQuality: input.VbrQuality }), - }; + return take(input, { + audioDescriptionBroadcasterMix: [, , `AudioDescriptionBroadcasterMix`], + bitrate: [, , `Bitrate`], + codecProfile: [, , `CodecProfile`], + codingMode: [, , `CodingMode`], + rateControlMode: [, , `RateControlMode`], + rawFormat: [, , `RawFormat`], + sampleRate: [, , `SampleRate`], + specification: [, , `Specification`], + vbrQuality: [, , `VbrQuality`], + }); }; /** * serializeAws_restJson1Ac3Settings */ const se_Ac3Settings = (input: Ac3Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BitstreamMode != null && { bitstreamMode: input.BitstreamMode }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.Dialnorm != null && { dialnorm: input.Dialnorm }), - ...(input.DynamicRangeCompressionLine != null && { - dynamicRangeCompressionLine: input.DynamicRangeCompressionLine, - }), - ...(input.DynamicRangeCompressionProfile != null && { - dynamicRangeCompressionProfile: input.DynamicRangeCompressionProfile, - }), - ...(input.DynamicRangeCompressionRf != null && { dynamicRangeCompressionRf: input.DynamicRangeCompressionRf }), - ...(input.LfeFilter != null && { lfeFilter: input.LfeFilter }), - ...(input.MetadataControl != null && { metadataControl: input.MetadataControl }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + bitstreamMode: [, , `BitstreamMode`], + codingMode: [, , `CodingMode`], + dialnorm: [, , `Dialnorm`], + dynamicRangeCompressionLine: [, , `DynamicRangeCompressionLine`], + dynamicRangeCompressionProfile: [, , `DynamicRangeCompressionProfile`], + dynamicRangeCompressionRf: [, , `DynamicRangeCompressionRf`], + lfeFilter: [, , `LfeFilter`], + metadataControl: [, , `MetadataControl`], + sampleRate: [, , `SampleRate`], + }); }; /** * serializeAws_restJson1AccelerationSettings */ const se_AccelerationSettings = (input: AccelerationSettings, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { mode: input.Mode }), - }; + return take(input, { + mode: [, , `Mode`], + }); }; /** * serializeAws_restJson1AiffSettings */ const se_AiffSettings = (input: AiffSettings, context: __SerdeContext): any => { - return { - ...(input.BitDepth != null && { bitDepth: input.BitDepth }), - ...(input.Channels != null && { channels: input.Channels }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - }; + return take(input, { + bitDepth: [, , `BitDepth`], + channels: [, , `Channels`], + sampleRate: [, , `SampleRate`], + }); }; /** * serializeAws_restJson1AllowedRenditionSize */ const se_AllowedRenditionSize = (input: AllowedRenditionSize, context: __SerdeContext): any => { - return { - ...(input.Height != null && { height: input.Height }), - ...(input.Required != null && { required: input.Required }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + height: [, , `Height`], + required: [, , `Required`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1AncillarySourceSettings */ const se_AncillarySourceSettings = (input: AncillarySourceSettings, context: __SerdeContext): any => { - return { - ...(input.Convert608To708 != null && { convert608To708: input.Convert608To708 }), - ...(input.SourceAncillaryChannelNumber != null && { - sourceAncillaryChannelNumber: input.SourceAncillaryChannelNumber, - }), - ...(input.TerminateCaptions != null && { terminateCaptions: input.TerminateCaptions }), - }; + return take(input, { + convert608To708: [, , `Convert608To708`], + sourceAncillaryChannelNumber: [, , `SourceAncillaryChannelNumber`], + terminateCaptions: [, , `TerminateCaptions`], + }); }; /** * serializeAws_restJson1AudioChannelTaggingSettings */ const se_AudioChannelTaggingSettings = (input: AudioChannelTaggingSettings, context: __SerdeContext): any => { - return { - ...(input.ChannelTag != null && { channelTag: input.ChannelTag }), - }; + return take(input, { + channelTag: [, , `ChannelTag`], + }); }; /** * serializeAws_restJson1AudioCodecSettings */ const se_AudioCodecSettings = (input: AudioCodecSettings, context: __SerdeContext): any => { - return { - ...(input.AacSettings != null && { aacSettings: se_AacSettings(input.AacSettings, context) }), - ...(input.Ac3Settings != null && { ac3Settings: se_Ac3Settings(input.Ac3Settings, context) }), - ...(input.AiffSettings != null && { aiffSettings: se_AiffSettings(input.AiffSettings, context) }), - ...(input.Codec != null && { codec: input.Codec }), - ...(input.Eac3AtmosSettings != null && { - eac3AtmosSettings: se_Eac3AtmosSettings(input.Eac3AtmosSettings, context), - }), - ...(input.Eac3Settings != null && { eac3Settings: se_Eac3Settings(input.Eac3Settings, context) }), - ...(input.Mp2Settings != null && { mp2Settings: se_Mp2Settings(input.Mp2Settings, context) }), - ...(input.Mp3Settings != null && { mp3Settings: se_Mp3Settings(input.Mp3Settings, context) }), - ...(input.OpusSettings != null && { opusSettings: se_OpusSettings(input.OpusSettings, context) }), - ...(input.VorbisSettings != null && { vorbisSettings: se_VorbisSettings(input.VorbisSettings, context) }), - ...(input.WavSettings != null && { wavSettings: se_WavSettings(input.WavSettings, context) }), - }; + return take(input, { + aacSettings: [, (_) => se_AacSettings(_, context), `AacSettings`], + ac3Settings: [, (_) => se_Ac3Settings(_, context), `Ac3Settings`], + aiffSettings: [, (_) => se_AiffSettings(_, context), `AiffSettings`], + codec: [, , `Codec`], + eac3AtmosSettings: [, (_) => se_Eac3AtmosSettings(_, context), `Eac3AtmosSettings`], + eac3Settings: [, (_) => se_Eac3Settings(_, context), `Eac3Settings`], + mp2Settings: [, (_) => se_Mp2Settings(_, context), `Mp2Settings`], + mp3Settings: [, (_) => se_Mp3Settings(_, context), `Mp3Settings`], + opusSettings: [, (_) => se_OpusSettings(_, context), `OpusSettings`], + vorbisSettings: [, (_) => se_VorbisSettings(_, context), `VorbisSettings`], + wavSettings: [, (_) => se_WavSettings(_, context), `WavSettings`], + }); }; /** * serializeAws_restJson1AudioDescription */ const se_AudioDescription = (input: AudioDescription, context: __SerdeContext): any => { - return { - ...(input.AudioChannelTaggingSettings != null && { - audioChannelTaggingSettings: se_AudioChannelTaggingSettings(input.AudioChannelTaggingSettings, context), - }), - ...(input.AudioNormalizationSettings != null && { - audioNormalizationSettings: se_AudioNormalizationSettings(input.AudioNormalizationSettings, context), - }), - ...(input.AudioSourceName != null && { audioSourceName: input.AudioSourceName }), - ...(input.AudioType != null && { audioType: input.AudioType }), - ...(input.AudioTypeControl != null && { audioTypeControl: input.AudioTypeControl }), - ...(input.CodecSettings != null && { codecSettings: se_AudioCodecSettings(input.CodecSettings, context) }), - ...(input.CustomLanguageCode != null && { customLanguageCode: input.CustomLanguageCode }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageCodeControl != null && { languageCodeControl: input.LanguageCodeControl }), - ...(input.RemixSettings != null && { remixSettings: se_RemixSettings(input.RemixSettings, context) }), - ...(input.StreamName != null && { streamName: input.StreamName }), - }; + return take(input, { + audioChannelTaggingSettings: [, (_) => se_AudioChannelTaggingSettings(_, context), `AudioChannelTaggingSettings`], + audioNormalizationSettings: [, (_) => se_AudioNormalizationSettings(_, context), `AudioNormalizationSettings`], + audioSourceName: [, , `AudioSourceName`], + audioType: [, , `AudioType`], + audioTypeControl: [, , `AudioTypeControl`], + codecSettings: [, (_) => se_AudioCodecSettings(_, context), `CodecSettings`], + customLanguageCode: [, , `CustomLanguageCode`], + languageCode: [, , `LanguageCode`], + languageCodeControl: [, , `LanguageCodeControl`], + remixSettings: [, (_) => se_RemixSettings(_, context), `RemixSettings`], + streamName: [, , `StreamName`], + }); }; /** * serializeAws_restJson1AudioNormalizationSettings */ const se_AudioNormalizationSettings = (input: AudioNormalizationSettings, context: __SerdeContext): any => { - return { - ...(input.Algorithm != null && { algorithm: input.Algorithm }), - ...(input.AlgorithmControl != null && { algorithmControl: input.AlgorithmControl }), - ...(input.CorrectionGateLevel != null && { correctionGateLevel: input.CorrectionGateLevel }), - ...(input.LoudnessLogging != null && { loudnessLogging: input.LoudnessLogging }), - ...(input.PeakCalculation != null && { peakCalculation: input.PeakCalculation }), - ...(input.TargetLkfs != null && { targetLkfs: __serializeFloat(input.TargetLkfs) }), - ...(input.TruePeakLimiterThreshold != null && { - truePeakLimiterThreshold: __serializeFloat(input.TruePeakLimiterThreshold), - }), - }; + return take(input, { + algorithm: [, , `Algorithm`], + algorithmControl: [, , `AlgorithmControl`], + correctionGateLevel: [, , `CorrectionGateLevel`], + loudnessLogging: [, , `LoudnessLogging`], + peakCalculation: [, , `PeakCalculation`], + targetLkfs: [, __serializeFloat, `TargetLkfs`], + truePeakLimiterThreshold: [, __serializeFloat, `TruePeakLimiterThreshold`], + }); }; /** * serializeAws_restJson1AudioSelector */ const se_AudioSelector = (input: AudioSelector, context: __SerdeContext): any => { - return { - ...(input.AudioDurationCorrection != null && { audioDurationCorrection: input.AudioDurationCorrection }), - ...(input.CustomLanguageCode != null && { customLanguageCode: input.CustomLanguageCode }), - ...(input.DefaultSelection != null && { defaultSelection: input.DefaultSelection }), - ...(input.ExternalAudioFileInput != null && { externalAudioFileInput: input.ExternalAudioFileInput }), - ...(input.HlsRenditionGroupSettings != null && { - hlsRenditionGroupSettings: se_HlsRenditionGroupSettings(input.HlsRenditionGroupSettings, context), - }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.Offset != null && { offset: input.Offset }), - ...(input.Pids != null && { pids: se___listOf__integerMin1Max2147483647(input.Pids, context) }), - ...(input.ProgramSelection != null && { programSelection: input.ProgramSelection }), - ...(input.RemixSettings != null && { remixSettings: se_RemixSettings(input.RemixSettings, context) }), - ...(input.SelectorType != null && { selectorType: input.SelectorType }), - ...(input.Tracks != null && { tracks: se___listOf__integerMin1Max2147483647(input.Tracks, context) }), - }; + return take(input, { + audioDurationCorrection: [, , `AudioDurationCorrection`], + customLanguageCode: [, , `CustomLanguageCode`], + defaultSelection: [, , `DefaultSelection`], + externalAudioFileInput: [, , `ExternalAudioFileInput`], + hlsRenditionGroupSettings: [, (_) => se_HlsRenditionGroupSettings(_, context), `HlsRenditionGroupSettings`], + languageCode: [, , `LanguageCode`], + offset: [, , `Offset`], + pids: [, _json, `Pids`], + programSelection: [, , `ProgramSelection`], + remixSettings: [, (_) => se_RemixSettings(_, context), `RemixSettings`], + selectorType: [, , `SelectorType`], + tracks: [, _json, `Tracks`], + }); }; /** * serializeAws_restJson1AudioSelectorGroup */ const se_AudioSelectorGroup = (input: AudioSelectorGroup, context: __SerdeContext): any => { - return { - ...(input.AudioSelectorNames != null && { - audioSelectorNames: se___listOf__stringMin1(input.AudioSelectorNames, context), - }), - }; + return take(input, { + audioSelectorNames: [, _json, `AudioSelectorNames`], + }); }; /** * serializeAws_restJson1AutomatedAbrRule */ const se_AutomatedAbrRule = (input: AutomatedAbrRule, context: __SerdeContext): any => { - return { - ...(input.AllowedRenditions != null && { - allowedRenditions: se___listOfAllowedRenditionSize(input.AllowedRenditions, context), - }), - ...(input.ForceIncludeRenditions != null && { - forceIncludeRenditions: se___listOfForceIncludeRenditionSize(input.ForceIncludeRenditions, context), - }), - ...(input.MinBottomRenditionSize != null && { - minBottomRenditionSize: se_MinBottomRenditionSize(input.MinBottomRenditionSize, context), - }), - ...(input.MinTopRenditionSize != null && { - minTopRenditionSize: se_MinTopRenditionSize(input.MinTopRenditionSize, context), - }), - ...(input.Type != null && { type: input.Type }), - }; + return take(input, { + allowedRenditions: [, (_) => se___listOfAllowedRenditionSize(_, context), `AllowedRenditions`], + forceIncludeRenditions: [, (_) => se___listOfForceIncludeRenditionSize(_, context), `ForceIncludeRenditions`], + minBottomRenditionSize: [, (_) => se_MinBottomRenditionSize(_, context), `MinBottomRenditionSize`], + minTopRenditionSize: [, (_) => se_MinTopRenditionSize(_, context), `MinTopRenditionSize`], + type: [, , `Type`], + }); }; /** * serializeAws_restJson1AutomatedAbrSettings */ const se_AutomatedAbrSettings = (input: AutomatedAbrSettings, context: __SerdeContext): any => { - return { - ...(input.MaxAbrBitrate != null && { maxAbrBitrate: input.MaxAbrBitrate }), - ...(input.MaxRenditions != null && { maxRenditions: input.MaxRenditions }), - ...(input.MinAbrBitrate != null && { minAbrBitrate: input.MinAbrBitrate }), - ...(input.Rules != null && { rules: se___listOfAutomatedAbrRule(input.Rules, context) }), - }; + return take(input, { + maxAbrBitrate: [, , `MaxAbrBitrate`], + maxRenditions: [, , `MaxRenditions`], + minAbrBitrate: [, , `MinAbrBitrate`], + rules: [, (_) => se___listOfAutomatedAbrRule(_, context), `Rules`], + }); }; /** * serializeAws_restJson1AutomatedEncodingSettings */ const se_AutomatedEncodingSettings = (input: AutomatedEncodingSettings, context: __SerdeContext): any => { - return { - ...(input.AbrSettings != null && { abrSettings: se_AutomatedAbrSettings(input.AbrSettings, context) }), - }; + return take(input, { + abrSettings: [, (_) => se_AutomatedAbrSettings(_, context), `AbrSettings`], + }); }; /** * serializeAws_restJson1Av1QvbrSettings */ const se_Av1QvbrSettings = (input: Av1QvbrSettings, context: __SerdeContext): any => { - return { - ...(input.QvbrQualityLevel != null && { qvbrQualityLevel: input.QvbrQualityLevel }), - ...(input.QvbrQualityLevelFineTune != null && { - qvbrQualityLevelFineTune: __serializeFloat(input.QvbrQualityLevelFineTune), - }), - }; + return take(input, { + qvbrQualityLevel: [, , `QvbrQualityLevel`], + qvbrQualityLevelFineTune: [, __serializeFloat, `QvbrQualityLevelFineTune`], + }); }; /** * serializeAws_restJson1Av1Settings */ const se_Av1Settings = (input: Av1Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.BitDepth != null && { bitDepth: input.BitDepth }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.NumberBFramesBetweenReferenceFrames != null && { - numberBFramesBetweenReferenceFrames: input.NumberBFramesBetweenReferenceFrames, - }), - ...(input.QvbrSettings != null && { qvbrSettings: se_Av1QvbrSettings(input.QvbrSettings, context) }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.Slices != null && { slices: input.Slices }), - ...(input.SpatialAdaptiveQuantization != null && { - spatialAdaptiveQuantization: input.SpatialAdaptiveQuantization, - }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + bitDepth: [, , `BitDepth`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopSize: [, __serializeFloat, `GopSize`], + maxBitrate: [, , `MaxBitrate`], + numberBFramesBetweenReferenceFrames: [, , `NumberBFramesBetweenReferenceFrames`], + qvbrSettings: [, (_) => se_Av1QvbrSettings(_, context), `QvbrSettings`], + rateControlMode: [, , `RateControlMode`], + slices: [, , `Slices`], + spatialAdaptiveQuantization: [, , `SpatialAdaptiveQuantization`], + }); }; /** * serializeAws_restJson1AvailBlanking */ const se_AvailBlanking = (input: AvailBlanking, context: __SerdeContext): any => { - return { - ...(input.AvailBlankingImage != null && { availBlankingImage: input.AvailBlankingImage }), - }; + return take(input, { + availBlankingImage: [, , `AvailBlankingImage`], + }); }; /** * serializeAws_restJson1AvcIntraSettings */ const se_AvcIntraSettings = (input: AvcIntraSettings, context: __SerdeContext): any => { - return { - ...(input.AvcIntraClass != null && { avcIntraClass: input.AvcIntraClass }), - ...(input.AvcIntraUhdSettings != null && { - avcIntraUhdSettings: se_AvcIntraUhdSettings(input.AvcIntraUhdSettings, context), - }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.ScanTypeConversionMode != null && { scanTypeConversionMode: input.ScanTypeConversionMode }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.Telecine != null && { telecine: input.Telecine }), - }; + return take(input, { + avcIntraClass: [, , `AvcIntraClass`], + avcIntraUhdSettings: [, (_) => se_AvcIntraUhdSettings(_, context), `AvcIntraUhdSettings`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + interlaceMode: [, , `InterlaceMode`], + scanTypeConversionMode: [, , `ScanTypeConversionMode`], + slowPal: [, , `SlowPal`], + telecine: [, , `Telecine`], + }); }; /** * serializeAws_restJson1AvcIntraUhdSettings */ const se_AvcIntraUhdSettings = (input: AvcIntraUhdSettings, context: __SerdeContext): any => { - return { - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - }; + return take(input, { + qualityTuningLevel: [, , `QualityTuningLevel`], + }); }; /** * serializeAws_restJson1BandwidthReductionFilter */ const se_BandwidthReductionFilter = (input: BandwidthReductionFilter, context: __SerdeContext): any => { - return { - ...(input.Sharpening != null && { sharpening: input.Sharpening }), - ...(input.Strength != null && { strength: input.Strength }), - }; + return take(input, { + sharpening: [, , `Sharpening`], + strength: [, , `Strength`], + }); }; /** * serializeAws_restJson1BurninDestinationSettings */ const se_BurninDestinationSettings = (input: BurninDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Alignment != null && { alignment: input.Alignment }), - ...(input.ApplyFontColor != null && { applyFontColor: input.ApplyFontColor }), - ...(input.BackgroundColor != null && { backgroundColor: input.BackgroundColor }), - ...(input.BackgroundOpacity != null && { backgroundOpacity: input.BackgroundOpacity }), - ...(input.FallbackFont != null && { fallbackFont: input.FallbackFont }), - ...(input.FontColor != null && { fontColor: input.FontColor }), - ...(input.FontOpacity != null && { fontOpacity: input.FontOpacity }), - ...(input.FontResolution != null && { fontResolution: input.FontResolution }), - ...(input.FontScript != null && { fontScript: input.FontScript }), - ...(input.FontSize != null && { fontSize: input.FontSize }), - ...(input.HexFontColor != null && { hexFontColor: input.HexFontColor }), - ...(input.OutlineColor != null && { outlineColor: input.OutlineColor }), - ...(input.OutlineSize != null && { outlineSize: input.OutlineSize }), - ...(input.ShadowColor != null && { shadowColor: input.ShadowColor }), - ...(input.ShadowOpacity != null && { shadowOpacity: input.ShadowOpacity }), - ...(input.ShadowXOffset != null && { shadowXOffset: input.ShadowXOffset }), - ...(input.ShadowYOffset != null && { shadowYOffset: input.ShadowYOffset }), - ...(input.StylePassthrough != null && { stylePassthrough: input.StylePassthrough }), - ...(input.TeletextSpacing != null && { teletextSpacing: input.TeletextSpacing }), - ...(input.XPosition != null && { xPosition: input.XPosition }), - ...(input.YPosition != null && { yPosition: input.YPosition }), - }; + return take(input, { + alignment: [, , `Alignment`], + applyFontColor: [, , `ApplyFontColor`], + backgroundColor: [, , `BackgroundColor`], + backgroundOpacity: [, , `BackgroundOpacity`], + fallbackFont: [, , `FallbackFont`], + fontColor: [, , `FontColor`], + fontOpacity: [, , `FontOpacity`], + fontResolution: [, , `FontResolution`], + fontScript: [, , `FontScript`], + fontSize: [, , `FontSize`], + hexFontColor: [, , `HexFontColor`], + outlineColor: [, , `OutlineColor`], + outlineSize: [, , `OutlineSize`], + shadowColor: [, , `ShadowColor`], + shadowOpacity: [, , `ShadowOpacity`], + shadowXOffset: [, , `ShadowXOffset`], + shadowYOffset: [, , `ShadowYOffset`], + stylePassthrough: [, , `StylePassthrough`], + teletextSpacing: [, , `TeletextSpacing`], + xPosition: [, , `XPosition`], + yPosition: [, , `YPosition`], + }); }; /** * serializeAws_restJson1CaptionDescription */ const se_CaptionDescription = (input: CaptionDescription, context: __SerdeContext): any => { - return { - ...(input.CaptionSelectorName != null && { captionSelectorName: input.CaptionSelectorName }), - ...(input.CustomLanguageCode != null && { customLanguageCode: input.CustomLanguageCode }), - ...(input.DestinationSettings != null && { - destinationSettings: se_CaptionDestinationSettings(input.DestinationSettings, context), - }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageDescription != null && { languageDescription: input.LanguageDescription }), - }; + return take(input, { + captionSelectorName: [, , `CaptionSelectorName`], + customLanguageCode: [, , `CustomLanguageCode`], + destinationSettings: [, (_) => se_CaptionDestinationSettings(_, context), `DestinationSettings`], + languageCode: [, , `LanguageCode`], + languageDescription: [, , `LanguageDescription`], + }); }; /** * serializeAws_restJson1CaptionDescriptionPreset */ const se_CaptionDescriptionPreset = (input: CaptionDescriptionPreset, context: __SerdeContext): any => { - return { - ...(input.CustomLanguageCode != null && { customLanguageCode: input.CustomLanguageCode }), - ...(input.DestinationSettings != null && { - destinationSettings: se_CaptionDestinationSettings(input.DestinationSettings, context), - }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageDescription != null && { languageDescription: input.LanguageDescription }), - }; + return take(input, { + customLanguageCode: [, , `CustomLanguageCode`], + destinationSettings: [, (_) => se_CaptionDestinationSettings(_, context), `DestinationSettings`], + languageCode: [, , `LanguageCode`], + languageDescription: [, , `LanguageDescription`], + }); }; /** * serializeAws_restJson1CaptionDestinationSettings */ const se_CaptionDestinationSettings = (input: CaptionDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.BurninDestinationSettings != null && { - burninDestinationSettings: se_BurninDestinationSettings(input.BurninDestinationSettings, context), - }), - ...(input.DestinationType != null && { destinationType: input.DestinationType }), - ...(input.DvbSubDestinationSettings != null && { - dvbSubDestinationSettings: se_DvbSubDestinationSettings(input.DvbSubDestinationSettings, context), - }), - ...(input.EmbeddedDestinationSettings != null && { - embeddedDestinationSettings: se_EmbeddedDestinationSettings(input.EmbeddedDestinationSettings, context), - }), - ...(input.ImscDestinationSettings != null && { - imscDestinationSettings: se_ImscDestinationSettings(input.ImscDestinationSettings, context), - }), - ...(input.SccDestinationSettings != null && { - sccDestinationSettings: se_SccDestinationSettings(input.SccDestinationSettings, context), - }), - ...(input.SrtDestinationSettings != null && { - srtDestinationSettings: se_SrtDestinationSettings(input.SrtDestinationSettings, context), - }), - ...(input.TeletextDestinationSettings != null && { - teletextDestinationSettings: se_TeletextDestinationSettings(input.TeletextDestinationSettings, context), - }), - ...(input.TtmlDestinationSettings != null && { - ttmlDestinationSettings: se_TtmlDestinationSettings(input.TtmlDestinationSettings, context), - }), - ...(input.WebvttDestinationSettings != null && { - webvttDestinationSettings: se_WebvttDestinationSettings(input.WebvttDestinationSettings, context), - }), - }; + return take(input, { + burninDestinationSettings: [, (_) => se_BurninDestinationSettings(_, context), `BurninDestinationSettings`], + destinationType: [, , `DestinationType`], + dvbSubDestinationSettings: [, (_) => se_DvbSubDestinationSettings(_, context), `DvbSubDestinationSettings`], + embeddedDestinationSettings: [, (_) => se_EmbeddedDestinationSettings(_, context), `EmbeddedDestinationSettings`], + imscDestinationSettings: [, (_) => se_ImscDestinationSettings(_, context), `ImscDestinationSettings`], + sccDestinationSettings: [, (_) => se_SccDestinationSettings(_, context), `SccDestinationSettings`], + srtDestinationSettings: [, (_) => se_SrtDestinationSettings(_, context), `SrtDestinationSettings`], + teletextDestinationSettings: [, (_) => se_TeletextDestinationSettings(_, context), `TeletextDestinationSettings`], + ttmlDestinationSettings: [, (_) => se_TtmlDestinationSettings(_, context), `TtmlDestinationSettings`], + webvttDestinationSettings: [, (_) => se_WebvttDestinationSettings(_, context), `WebvttDestinationSettings`], + }); }; /** * serializeAws_restJson1CaptionSelector */ const se_CaptionSelector = (input: CaptionSelector, context: __SerdeContext): any => { - return { - ...(input.CustomLanguageCode != null && { customLanguageCode: input.CustomLanguageCode }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.SourceSettings != null && { sourceSettings: se_CaptionSourceSettings(input.SourceSettings, context) }), - }; + return take(input, { + customLanguageCode: [, , `CustomLanguageCode`], + languageCode: [, , `LanguageCode`], + sourceSettings: [, (_) => se_CaptionSourceSettings(_, context), `SourceSettings`], + }); }; /** * serializeAws_restJson1CaptionSourceFramerate */ const se_CaptionSourceFramerate = (input: CaptionSourceFramerate, context: __SerdeContext): any => { - return { - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - }; + return take(input, { + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + }); }; /** * serializeAws_restJson1CaptionSourceSettings */ const se_CaptionSourceSettings = (input: CaptionSourceSettings, context: __SerdeContext): any => { - return { - ...(input.AncillarySourceSettings != null && { - ancillarySourceSettings: se_AncillarySourceSettings(input.AncillarySourceSettings, context), - }), - ...(input.DvbSubSourceSettings != null && { - dvbSubSourceSettings: se_DvbSubSourceSettings(input.DvbSubSourceSettings, context), - }), - ...(input.EmbeddedSourceSettings != null && { - embeddedSourceSettings: se_EmbeddedSourceSettings(input.EmbeddedSourceSettings, context), - }), - ...(input.FileSourceSettings != null && { - fileSourceSettings: se_FileSourceSettings(input.FileSourceSettings, context), - }), - ...(input.SourceType != null && { sourceType: input.SourceType }), - ...(input.TeletextSourceSettings != null && { - teletextSourceSettings: se_TeletextSourceSettings(input.TeletextSourceSettings, context), - }), - ...(input.TrackSourceSettings != null && { - trackSourceSettings: se_TrackSourceSettings(input.TrackSourceSettings, context), - }), - ...(input.WebvttHlsSourceSettings != null && { - webvttHlsSourceSettings: se_WebvttHlsSourceSettings(input.WebvttHlsSourceSettings, context), - }), - }; + return take(input, { + ancillarySourceSettings: [, (_) => se_AncillarySourceSettings(_, context), `AncillarySourceSettings`], + dvbSubSourceSettings: [, (_) => se_DvbSubSourceSettings(_, context), `DvbSubSourceSettings`], + embeddedSourceSettings: [, (_) => se_EmbeddedSourceSettings(_, context), `EmbeddedSourceSettings`], + fileSourceSettings: [, (_) => se_FileSourceSettings(_, context), `FileSourceSettings`], + sourceType: [, , `SourceType`], + teletextSourceSettings: [, (_) => se_TeletextSourceSettings(_, context), `TeletextSourceSettings`], + trackSourceSettings: [, (_) => se_TrackSourceSettings(_, context), `TrackSourceSettings`], + webvttHlsSourceSettings: [, (_) => se_WebvttHlsSourceSettings(_, context), `WebvttHlsSourceSettings`], + }); }; /** * serializeAws_restJson1ChannelMapping */ const se_ChannelMapping = (input: ChannelMapping, context: __SerdeContext): any => { - return { - ...(input.OutputChannels != null && { - outputChannels: se___listOfOutputChannelMapping(input.OutputChannels, context), - }), - }; + return take(input, { + outputChannels: [, (_) => se___listOfOutputChannelMapping(_, context), `OutputChannels`], + }); }; /** * serializeAws_restJson1ClipLimits */ const se_ClipLimits = (input: ClipLimits, context: __SerdeContext): any => { - return { - ...(input.MaximumRGBTolerance != null && { maximumRGBTolerance: input.MaximumRGBTolerance }), - ...(input.MaximumYUV != null && { maximumYUV: input.MaximumYUV }), - ...(input.MinimumRGBTolerance != null && { minimumRGBTolerance: input.MinimumRGBTolerance }), - ...(input.MinimumYUV != null && { minimumYUV: input.MinimumYUV }), - }; + return take(input, { + maximumRGBTolerance: [, , `MaximumRGBTolerance`], + maximumYUV: [, , `MaximumYUV`], + minimumRGBTolerance: [, , `MinimumRGBTolerance`], + minimumYUV: [, , `MinimumYUV`], + }); }; /** * serializeAws_restJson1CmafAdditionalManifest */ const se_CmafAdditionalManifest = (input: CmafAdditionalManifest, context: __SerdeContext): any => { - return { - ...(input.ManifestNameModifier != null && { manifestNameModifier: input.ManifestNameModifier }), - ...(input.SelectedOutputs != null && { selectedOutputs: se___listOf__stringMin1(input.SelectedOutputs, context) }), - }; + return take(input, { + manifestNameModifier: [, , `ManifestNameModifier`], + selectedOutputs: [, _json, `SelectedOutputs`], + }); }; /** * serializeAws_restJson1CmafEncryptionSettings */ const se_CmafEncryptionSettings = (input: CmafEncryptionSettings, context: __SerdeContext): any => { - return { - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }), - ...(input.InitializationVectorInManifest != null && { - initializationVectorInManifest: input.InitializationVectorInManifest, - }), - ...(input.SpekeKeyProvider != null && { - spekeKeyProvider: se_SpekeKeyProviderCmaf(input.SpekeKeyProvider, context), - }), - ...(input.StaticKeyProvider != null && { - staticKeyProvider: se_StaticKeyProvider(input.StaticKeyProvider, context), - }), - ...(input.Type != null && { type: input.Type }), - }; + return take(input, { + constantInitializationVector: [, , `ConstantInitializationVector`], + encryptionMethod: [, , `EncryptionMethod`], + initializationVectorInManifest: [, , `InitializationVectorInManifest`], + spekeKeyProvider: [, (_) => se_SpekeKeyProviderCmaf(_, context), `SpekeKeyProvider`], + staticKeyProvider: [, (_) => se_StaticKeyProvider(_, context), `StaticKeyProvider`], + type: [, , `Type`], + }); }; /** * serializeAws_restJson1CmafGroupSettings */ const se_CmafGroupSettings = (input: CmafGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AdditionalManifests != null && { - additionalManifests: se___listOfCmafAdditionalManifest(input.AdditionalManifests, context), - }), - ...(input.BaseUrl != null && { baseUrl: input.BaseUrl }), - ...(input.ClientCache != null && { clientCache: input.ClientCache }), - ...(input.CodecSpecification != null && { codecSpecification: input.CodecSpecification }), - ...(input.DashManifestStyle != null && { dashManifestStyle: input.DashManifestStyle }), - ...(input.Destination != null && { destination: input.Destination }), - ...(input.DestinationSettings != null && { - destinationSettings: se_DestinationSettings(input.DestinationSettings, context), - }), - ...(input.Encryption != null && { encryption: se_CmafEncryptionSettings(input.Encryption, context) }), - ...(input.FragmentLength != null && { fragmentLength: input.FragmentLength }), - ...(input.ImageBasedTrickPlay != null && { imageBasedTrickPlay: input.ImageBasedTrickPlay }), - ...(input.ImageBasedTrickPlaySettings != null && { - imageBasedTrickPlaySettings: se_CmafImageBasedTrickPlaySettings(input.ImageBasedTrickPlaySettings, context), - }), - ...(input.ManifestCompression != null && { manifestCompression: input.ManifestCompression }), - ...(input.ManifestDurationFormat != null && { manifestDurationFormat: input.ManifestDurationFormat }), - ...(input.MinBufferTime != null && { minBufferTime: input.MinBufferTime }), - ...(input.MinFinalSegmentLength != null && { - minFinalSegmentLength: __serializeFloat(input.MinFinalSegmentLength), - }), - ...(input.MpdManifestBandwidthType != null && { mpdManifestBandwidthType: input.MpdManifestBandwidthType }), - ...(input.MpdProfile != null && { mpdProfile: input.MpdProfile }), - ...(input.PtsOffsetHandlingForBFrames != null && { - ptsOffsetHandlingForBFrames: input.PtsOffsetHandlingForBFrames, - }), - ...(input.SegmentControl != null && { segmentControl: input.SegmentControl }), - ...(input.SegmentLength != null && { segmentLength: input.SegmentLength }), - ...(input.SegmentLengthControl != null && { segmentLengthControl: input.SegmentLengthControl }), - ...(input.StreamInfResolution != null && { streamInfResolution: input.StreamInfResolution }), - ...(input.TargetDurationCompatibilityMode != null && { - targetDurationCompatibilityMode: input.TargetDurationCompatibilityMode, - }), - ...(input.VideoCompositionOffsets != null && { videoCompositionOffsets: input.VideoCompositionOffsets }), - ...(input.WriteDashManifest != null && { writeDashManifest: input.WriteDashManifest }), - ...(input.WriteHlsManifest != null && { writeHlsManifest: input.WriteHlsManifest }), - ...(input.WriteSegmentTimelineInRepresentation != null && { - writeSegmentTimelineInRepresentation: input.WriteSegmentTimelineInRepresentation, - }), - }; + return take(input, { + additionalManifests: [, (_) => se___listOfCmafAdditionalManifest(_, context), `AdditionalManifests`], + baseUrl: [, , `BaseUrl`], + clientCache: [, , `ClientCache`], + codecSpecification: [, , `CodecSpecification`], + dashManifestStyle: [, , `DashManifestStyle`], + destination: [, , `Destination`], + destinationSettings: [, (_) => se_DestinationSettings(_, context), `DestinationSettings`], + encryption: [, (_) => se_CmafEncryptionSettings(_, context), `Encryption`], + fragmentLength: [, , `FragmentLength`], + imageBasedTrickPlay: [, , `ImageBasedTrickPlay`], + imageBasedTrickPlaySettings: [ + , + (_) => se_CmafImageBasedTrickPlaySettings(_, context), + `ImageBasedTrickPlaySettings`, + ], + manifestCompression: [, , `ManifestCompression`], + manifestDurationFormat: [, , `ManifestDurationFormat`], + minBufferTime: [, , `MinBufferTime`], + minFinalSegmentLength: [, __serializeFloat, `MinFinalSegmentLength`], + mpdManifestBandwidthType: [, , `MpdManifestBandwidthType`], + mpdProfile: [, , `MpdProfile`], + ptsOffsetHandlingForBFrames: [, , `PtsOffsetHandlingForBFrames`], + segmentControl: [, , `SegmentControl`], + segmentLength: [, , `SegmentLength`], + segmentLengthControl: [, , `SegmentLengthControl`], + streamInfResolution: [, , `StreamInfResolution`], + targetDurationCompatibilityMode: [, , `TargetDurationCompatibilityMode`], + videoCompositionOffsets: [, , `VideoCompositionOffsets`], + writeDashManifest: [, , `WriteDashManifest`], + writeHlsManifest: [, , `WriteHlsManifest`], + writeSegmentTimelineInRepresentation: [, , `WriteSegmentTimelineInRepresentation`], + }); }; /** * serializeAws_restJson1CmafImageBasedTrickPlaySettings */ const se_CmafImageBasedTrickPlaySettings = (input: CmafImageBasedTrickPlaySettings, context: __SerdeContext): any => { - return { - ...(input.IntervalCadence != null && { intervalCadence: input.IntervalCadence }), - ...(input.ThumbnailHeight != null && { thumbnailHeight: input.ThumbnailHeight }), - ...(input.ThumbnailInterval != null && { thumbnailInterval: __serializeFloat(input.ThumbnailInterval) }), - ...(input.ThumbnailWidth != null && { thumbnailWidth: input.ThumbnailWidth }), - ...(input.TileHeight != null && { tileHeight: input.TileHeight }), - ...(input.TileWidth != null && { tileWidth: input.TileWidth }), - }; + return take(input, { + intervalCadence: [, , `IntervalCadence`], + thumbnailHeight: [, , `ThumbnailHeight`], + thumbnailInterval: [, __serializeFloat, `ThumbnailInterval`], + thumbnailWidth: [, , `ThumbnailWidth`], + tileHeight: [, , `TileHeight`], + tileWidth: [, , `TileWidth`], + }); }; /** * serializeAws_restJson1CmfcSettings */ const se_CmfcSettings = (input: CmfcSettings, context: __SerdeContext): any => { - return { - ...(input.AudioDuration != null && { audioDuration: input.AudioDuration }), - ...(input.AudioGroupId != null && { audioGroupId: input.AudioGroupId }), - ...(input.AudioRenditionSets != null && { audioRenditionSets: input.AudioRenditionSets }), - ...(input.AudioTrackType != null && { audioTrackType: input.AudioTrackType }), - ...(input.DescriptiveVideoServiceFlag != null && { - descriptiveVideoServiceFlag: input.DescriptiveVideoServiceFlag, - }), - ...(input.IFrameOnlyManifest != null && { iFrameOnlyManifest: input.IFrameOnlyManifest }), - ...(input.KlvMetadata != null && { klvMetadata: input.KlvMetadata }), - ...(input.ManifestMetadataSignaling != null && { manifestMetadataSignaling: input.ManifestMetadataSignaling }), - ...(input.Scte35Esam != null && { scte35Esam: input.Scte35Esam }), - ...(input.Scte35Source != null && { scte35Source: input.Scte35Source }), - ...(input.TimedMetadata != null && { timedMetadata: input.TimedMetadata }), - ...(input.TimedMetadataBoxVersion != null && { timedMetadataBoxVersion: input.TimedMetadataBoxVersion }), - ...(input.TimedMetadataSchemeIdUri != null && { timedMetadataSchemeIdUri: input.TimedMetadataSchemeIdUri }), - ...(input.TimedMetadataValue != null && { timedMetadataValue: input.TimedMetadataValue }), - }; + return take(input, { + audioDuration: [, , `AudioDuration`], + audioGroupId: [, , `AudioGroupId`], + audioRenditionSets: [, , `AudioRenditionSets`], + audioTrackType: [, , `AudioTrackType`], + descriptiveVideoServiceFlag: [, , `DescriptiveVideoServiceFlag`], + iFrameOnlyManifest: [, , `IFrameOnlyManifest`], + klvMetadata: [, , `KlvMetadata`], + manifestMetadataSignaling: [, , `ManifestMetadataSignaling`], + scte35Esam: [, , `Scte35Esam`], + scte35Source: [, , `Scte35Source`], + timedMetadata: [, , `TimedMetadata`], + timedMetadataBoxVersion: [, , `TimedMetadataBoxVersion`], + timedMetadataSchemeIdUri: [, , `TimedMetadataSchemeIdUri`], + timedMetadataValue: [, , `TimedMetadataValue`], + }); }; /** * serializeAws_restJson1ColorCorrector */ const se_ColorCorrector = (input: ColorCorrector, context: __SerdeContext): any => { - return { - ...(input.Brightness != null && { brightness: input.Brightness }), - ...(input.ClipLimits != null && { clipLimits: se_ClipLimits(input.ClipLimits, context) }), - ...(input.ColorSpaceConversion != null && { colorSpaceConversion: input.ColorSpaceConversion }), - ...(input.Contrast != null && { contrast: input.Contrast }), - ...(input.Hdr10Metadata != null && { hdr10Metadata: se_Hdr10Metadata(input.Hdr10Metadata, context) }), - ...(input.HdrToSdrToneMapper != null && { hdrToSdrToneMapper: input.HdrToSdrToneMapper }), - ...(input.Hue != null && { hue: input.Hue }), - ...(input.SampleRangeConversion != null && { sampleRangeConversion: input.SampleRangeConversion }), - ...(input.Saturation != null && { saturation: input.Saturation }), - ...(input.SdrReferenceWhiteLevel != null && { sdrReferenceWhiteLevel: input.SdrReferenceWhiteLevel }), - }; + return take(input, { + brightness: [, , `Brightness`], + clipLimits: [, (_) => se_ClipLimits(_, context), `ClipLimits`], + colorSpaceConversion: [, , `ColorSpaceConversion`], + contrast: [, , `Contrast`], + hdr10Metadata: [, (_) => se_Hdr10Metadata(_, context), `Hdr10Metadata`], + hdrToSdrToneMapper: [, , `HdrToSdrToneMapper`], + hue: [, , `Hue`], + sampleRangeConversion: [, , `SampleRangeConversion`], + saturation: [, , `Saturation`], + sdrReferenceWhiteLevel: [, , `SdrReferenceWhiteLevel`], + }); }; /** * serializeAws_restJson1ContainerSettings */ const se_ContainerSettings = (input: ContainerSettings, context: __SerdeContext): any => { - return { - ...(input.CmfcSettings != null && { cmfcSettings: se_CmfcSettings(input.CmfcSettings, context) }), - ...(input.Container != null && { container: input.Container }), - ...(input.F4vSettings != null && { f4vSettings: se_F4vSettings(input.F4vSettings, context) }), - ...(input.M2tsSettings != null && { m2tsSettings: se_M2tsSettings(input.M2tsSettings, context) }), - ...(input.M3u8Settings != null && { m3u8Settings: se_M3u8Settings(input.M3u8Settings, context) }), - ...(input.MovSettings != null && { movSettings: se_MovSettings(input.MovSettings, context) }), - ...(input.Mp4Settings != null && { mp4Settings: se_Mp4Settings(input.Mp4Settings, context) }), - ...(input.MpdSettings != null && { mpdSettings: se_MpdSettings(input.MpdSettings, context) }), - ...(input.MxfSettings != null && { mxfSettings: se_MxfSettings(input.MxfSettings, context) }), - }; + return take(input, { + cmfcSettings: [, (_) => se_CmfcSettings(_, context), `CmfcSettings`], + container: [, , `Container`], + f4vSettings: [, (_) => se_F4vSettings(_, context), `F4vSettings`], + m2tsSettings: [, (_) => se_M2tsSettings(_, context), `M2tsSettings`], + m3u8Settings: [, (_) => se_M3u8Settings(_, context), `M3u8Settings`], + movSettings: [, (_) => se_MovSettings(_, context), `MovSettings`], + mp4Settings: [, (_) => se_Mp4Settings(_, context), `Mp4Settings`], + mpdSettings: [, (_) => se_MpdSettings(_, context), `MpdSettings`], + mxfSettings: [, (_) => se_MxfSettings(_, context), `MxfSettings`], + }); }; /** * serializeAws_restJson1DashAdditionalManifest */ const se_DashAdditionalManifest = (input: DashAdditionalManifest, context: __SerdeContext): any => { - return { - ...(input.ManifestNameModifier != null && { manifestNameModifier: input.ManifestNameModifier }), - ...(input.SelectedOutputs != null && { selectedOutputs: se___listOf__stringMin1(input.SelectedOutputs, context) }), - }; + return take(input, { + manifestNameModifier: [, , `ManifestNameModifier`], + selectedOutputs: [, _json, `SelectedOutputs`], + }); }; /** * serializeAws_restJson1DashIsoEncryptionSettings */ const se_DashIsoEncryptionSettings = (input: DashIsoEncryptionSettings, context: __SerdeContext): any => { - return { - ...(input.PlaybackDeviceCompatibility != null && { - playbackDeviceCompatibility: input.PlaybackDeviceCompatibility, - }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + playbackDeviceCompatibility: [, , `PlaybackDeviceCompatibility`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1DashIsoGroupSettings */ const se_DashIsoGroupSettings = (input: DashIsoGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AdditionalManifests != null && { - additionalManifests: se___listOfDashAdditionalManifest(input.AdditionalManifests, context), - }), - ...(input.AudioChannelConfigSchemeIdUri != null && { - audioChannelConfigSchemeIdUri: input.AudioChannelConfigSchemeIdUri, - }), - ...(input.BaseUrl != null && { baseUrl: input.BaseUrl }), - ...(input.DashManifestStyle != null && { dashManifestStyle: input.DashManifestStyle }), - ...(input.Destination != null && { destination: input.Destination }), - ...(input.DestinationSettings != null && { - destinationSettings: se_DestinationSettings(input.DestinationSettings, context), - }), - ...(input.Encryption != null && { encryption: se_DashIsoEncryptionSettings(input.Encryption, context) }), - ...(input.FragmentLength != null && { fragmentLength: input.FragmentLength }), - ...(input.HbbtvCompliance != null && { hbbtvCompliance: input.HbbtvCompliance }), - ...(input.ImageBasedTrickPlay != null && { imageBasedTrickPlay: input.ImageBasedTrickPlay }), - ...(input.ImageBasedTrickPlaySettings != null && { - imageBasedTrickPlaySettings: se_DashIsoImageBasedTrickPlaySettings(input.ImageBasedTrickPlaySettings, context), - }), - ...(input.MinBufferTime != null && { minBufferTime: input.MinBufferTime }), - ...(input.MinFinalSegmentLength != null && { - minFinalSegmentLength: __serializeFloat(input.MinFinalSegmentLength), - }), - ...(input.MpdManifestBandwidthType != null && { mpdManifestBandwidthType: input.MpdManifestBandwidthType }), - ...(input.MpdProfile != null && { mpdProfile: input.MpdProfile }), - ...(input.PtsOffsetHandlingForBFrames != null && { - ptsOffsetHandlingForBFrames: input.PtsOffsetHandlingForBFrames, - }), - ...(input.SegmentControl != null && { segmentControl: input.SegmentControl }), - ...(input.SegmentLength != null && { segmentLength: input.SegmentLength }), - ...(input.SegmentLengthControl != null && { segmentLengthControl: input.SegmentLengthControl }), - ...(input.VideoCompositionOffsets != null && { videoCompositionOffsets: input.VideoCompositionOffsets }), - ...(input.WriteSegmentTimelineInRepresentation != null && { - writeSegmentTimelineInRepresentation: input.WriteSegmentTimelineInRepresentation, - }), - }; + return take(input, { + additionalManifests: [, (_) => se___listOfDashAdditionalManifest(_, context), `AdditionalManifests`], + audioChannelConfigSchemeIdUri: [, , `AudioChannelConfigSchemeIdUri`], + baseUrl: [, , `BaseUrl`], + dashManifestStyle: [, , `DashManifestStyle`], + destination: [, , `Destination`], + destinationSettings: [, (_) => se_DestinationSettings(_, context), `DestinationSettings`], + encryption: [, (_) => se_DashIsoEncryptionSettings(_, context), `Encryption`], + fragmentLength: [, , `FragmentLength`], + hbbtvCompliance: [, , `HbbtvCompliance`], + imageBasedTrickPlay: [, , `ImageBasedTrickPlay`], + imageBasedTrickPlaySettings: [ + , + (_) => se_DashIsoImageBasedTrickPlaySettings(_, context), + `ImageBasedTrickPlaySettings`, + ], + minBufferTime: [, , `MinBufferTime`], + minFinalSegmentLength: [, __serializeFloat, `MinFinalSegmentLength`], + mpdManifestBandwidthType: [, , `MpdManifestBandwidthType`], + mpdProfile: [, , `MpdProfile`], + ptsOffsetHandlingForBFrames: [, , `PtsOffsetHandlingForBFrames`], + segmentControl: [, , `SegmentControl`], + segmentLength: [, , `SegmentLength`], + segmentLengthControl: [, , `SegmentLengthControl`], + videoCompositionOffsets: [, , `VideoCompositionOffsets`], + writeSegmentTimelineInRepresentation: [, , `WriteSegmentTimelineInRepresentation`], + }); }; /** @@ -3979,216 +3759,208 @@ const se_DashIsoImageBasedTrickPlaySettings = ( input: DashIsoImageBasedTrickPlaySettings, context: __SerdeContext ): any => { - return { - ...(input.IntervalCadence != null && { intervalCadence: input.IntervalCadence }), - ...(input.ThumbnailHeight != null && { thumbnailHeight: input.ThumbnailHeight }), - ...(input.ThumbnailInterval != null && { thumbnailInterval: __serializeFloat(input.ThumbnailInterval) }), - ...(input.ThumbnailWidth != null && { thumbnailWidth: input.ThumbnailWidth }), - ...(input.TileHeight != null && { tileHeight: input.TileHeight }), - ...(input.TileWidth != null && { tileWidth: input.TileWidth }), - }; + return take(input, { + intervalCadence: [, , `IntervalCadence`], + thumbnailHeight: [, , `ThumbnailHeight`], + thumbnailInterval: [, __serializeFloat, `ThumbnailInterval`], + thumbnailWidth: [, , `ThumbnailWidth`], + tileHeight: [, , `TileHeight`], + tileWidth: [, , `TileWidth`], + }); }; /** * serializeAws_restJson1Deinterlacer */ const se_Deinterlacer = (input: Deinterlacer, context: __SerdeContext): any => { - return { - ...(input.Algorithm != null && { algorithm: input.Algorithm }), - ...(input.Control != null && { control: input.Control }), - ...(input.Mode != null && { mode: input.Mode }), - }; + return take(input, { + algorithm: [, , `Algorithm`], + control: [, , `Control`], + mode: [, , `Mode`], + }); }; /** * serializeAws_restJson1DestinationSettings */ const se_DestinationSettings = (input: DestinationSettings, context: __SerdeContext): any => { - return { - ...(input.S3Settings != null && { s3Settings: se_S3DestinationSettings(input.S3Settings, context) }), - }; + return take(input, { + s3Settings: [, (_) => se_S3DestinationSettings(_, context), `S3Settings`], + }); }; /** * serializeAws_restJson1DolbyVision */ const se_DolbyVision = (input: DolbyVision, context: __SerdeContext): any => { - return { - ...(input.L6Metadata != null && { l6Metadata: se_DolbyVisionLevel6Metadata(input.L6Metadata, context) }), - ...(input.L6Mode != null && { l6Mode: input.L6Mode }), - ...(input.Mapping != null && { mapping: input.Mapping }), - ...(input.Profile != null && { profile: input.Profile }), - }; + return take(input, { + l6Metadata: [, (_) => se_DolbyVisionLevel6Metadata(_, context), `L6Metadata`], + l6Mode: [, , `L6Mode`], + mapping: [, , `Mapping`], + profile: [, , `Profile`], + }); }; /** * serializeAws_restJson1DolbyVisionLevel6Metadata */ const se_DolbyVisionLevel6Metadata = (input: DolbyVisionLevel6Metadata, context: __SerdeContext): any => { - return { - ...(input.MaxCll != null && { maxCll: input.MaxCll }), - ...(input.MaxFall != null && { maxFall: input.MaxFall }), - }; + return take(input, { + maxCll: [, , `MaxCll`], + maxFall: [, , `MaxFall`], + }); }; /** * serializeAws_restJson1DvbNitSettings */ const se_DvbNitSettings = (input: DvbNitSettings, context: __SerdeContext): any => { - return { - ...(input.NetworkId != null && { networkId: input.NetworkId }), - ...(input.NetworkName != null && { networkName: input.NetworkName }), - ...(input.NitInterval != null && { nitInterval: input.NitInterval }), - }; + return take(input, { + networkId: [, , `NetworkId`], + networkName: [, , `NetworkName`], + nitInterval: [, , `NitInterval`], + }); }; /** * serializeAws_restJson1DvbSdtSettings */ const se_DvbSdtSettings = (input: DvbSdtSettings, context: __SerdeContext): any => { - return { - ...(input.OutputSdt != null && { outputSdt: input.OutputSdt }), - ...(input.SdtInterval != null && { sdtInterval: input.SdtInterval }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - ...(input.ServiceProviderName != null && { serviceProviderName: input.ServiceProviderName }), - }; + return take(input, { + outputSdt: [, , `OutputSdt`], + sdtInterval: [, , `SdtInterval`], + serviceName: [, , `ServiceName`], + serviceProviderName: [, , `ServiceProviderName`], + }); }; /** * serializeAws_restJson1DvbSubDestinationSettings */ const se_DvbSubDestinationSettings = (input: DvbSubDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Alignment != null && { alignment: input.Alignment }), - ...(input.ApplyFontColor != null && { applyFontColor: input.ApplyFontColor }), - ...(input.BackgroundColor != null && { backgroundColor: input.BackgroundColor }), - ...(input.BackgroundOpacity != null && { backgroundOpacity: input.BackgroundOpacity }), - ...(input.DdsHandling != null && { ddsHandling: input.DdsHandling }), - ...(input.DdsXCoordinate != null && { ddsXCoordinate: input.DdsXCoordinate }), - ...(input.DdsYCoordinate != null && { ddsYCoordinate: input.DdsYCoordinate }), - ...(input.FallbackFont != null && { fallbackFont: input.FallbackFont }), - ...(input.FontColor != null && { fontColor: input.FontColor }), - ...(input.FontOpacity != null && { fontOpacity: input.FontOpacity }), - ...(input.FontResolution != null && { fontResolution: input.FontResolution }), - ...(input.FontScript != null && { fontScript: input.FontScript }), - ...(input.FontSize != null && { fontSize: input.FontSize }), - ...(input.Height != null && { height: input.Height }), - ...(input.HexFontColor != null && { hexFontColor: input.HexFontColor }), - ...(input.OutlineColor != null && { outlineColor: input.OutlineColor }), - ...(input.OutlineSize != null && { outlineSize: input.OutlineSize }), - ...(input.ShadowColor != null && { shadowColor: input.ShadowColor }), - ...(input.ShadowOpacity != null && { shadowOpacity: input.ShadowOpacity }), - ...(input.ShadowXOffset != null && { shadowXOffset: input.ShadowXOffset }), - ...(input.ShadowYOffset != null && { shadowYOffset: input.ShadowYOffset }), - ...(input.StylePassthrough != null && { stylePassthrough: input.StylePassthrough }), - ...(input.SubtitlingType != null && { subtitlingType: input.SubtitlingType }), - ...(input.TeletextSpacing != null && { teletextSpacing: input.TeletextSpacing }), - ...(input.Width != null && { width: input.Width }), - ...(input.XPosition != null && { xPosition: input.XPosition }), - ...(input.YPosition != null && { yPosition: input.YPosition }), - }; + return take(input, { + alignment: [, , `Alignment`], + applyFontColor: [, , `ApplyFontColor`], + backgroundColor: [, , `BackgroundColor`], + backgroundOpacity: [, , `BackgroundOpacity`], + ddsHandling: [, , `DdsHandling`], + ddsXCoordinate: [, , `DdsXCoordinate`], + ddsYCoordinate: [, , `DdsYCoordinate`], + fallbackFont: [, , `FallbackFont`], + fontColor: [, , `FontColor`], + fontOpacity: [, , `FontOpacity`], + fontResolution: [, , `FontResolution`], + fontScript: [, , `FontScript`], + fontSize: [, , `FontSize`], + height: [, , `Height`], + hexFontColor: [, , `HexFontColor`], + outlineColor: [, , `OutlineColor`], + outlineSize: [, , `OutlineSize`], + shadowColor: [, , `ShadowColor`], + shadowOpacity: [, , `ShadowOpacity`], + shadowXOffset: [, , `ShadowXOffset`], + shadowYOffset: [, , `ShadowYOffset`], + stylePassthrough: [, , `StylePassthrough`], + subtitlingType: [, , `SubtitlingType`], + teletextSpacing: [, , `TeletextSpacing`], + width: [, , `Width`], + xPosition: [, , `XPosition`], + yPosition: [, , `YPosition`], + }); }; /** * serializeAws_restJson1DvbSubSourceSettings */ const se_DvbSubSourceSettings = (input: DvbSubSourceSettings, context: __SerdeContext): any => { - return { - ...(input.Pid != null && { pid: input.Pid }), - }; + return take(input, { + pid: [, , `Pid`], + }); }; /** * serializeAws_restJson1DvbTdtSettings */ const se_DvbTdtSettings = (input: DvbTdtSettings, context: __SerdeContext): any => { - return { - ...(input.TdtInterval != null && { tdtInterval: input.TdtInterval }), - }; + return take(input, { + tdtInterval: [, , `TdtInterval`], + }); }; /** * serializeAws_restJson1Eac3AtmosSettings */ const se_Eac3AtmosSettings = (input: Eac3AtmosSettings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BitstreamMode != null && { bitstreamMode: input.BitstreamMode }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.DialogueIntelligence != null && { dialogueIntelligence: input.DialogueIntelligence }), - ...(input.DownmixControl != null && { downmixControl: input.DownmixControl }), - ...(input.DynamicRangeCompressionLine != null && { - dynamicRangeCompressionLine: input.DynamicRangeCompressionLine, - }), - ...(input.DynamicRangeCompressionRf != null && { dynamicRangeCompressionRf: input.DynamicRangeCompressionRf }), - ...(input.DynamicRangeControl != null && { dynamicRangeControl: input.DynamicRangeControl }), - ...(input.LoRoCenterMixLevel != null && { loRoCenterMixLevel: __serializeFloat(input.LoRoCenterMixLevel) }), - ...(input.LoRoSurroundMixLevel != null && { loRoSurroundMixLevel: __serializeFloat(input.LoRoSurroundMixLevel) }), - ...(input.LtRtCenterMixLevel != null && { ltRtCenterMixLevel: __serializeFloat(input.LtRtCenterMixLevel) }), - ...(input.LtRtSurroundMixLevel != null && { ltRtSurroundMixLevel: __serializeFloat(input.LtRtSurroundMixLevel) }), - ...(input.MeteringMode != null && { meteringMode: input.MeteringMode }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - ...(input.SpeechThreshold != null && { speechThreshold: input.SpeechThreshold }), - ...(input.StereoDownmix != null && { stereoDownmix: input.StereoDownmix }), - ...(input.SurroundExMode != null && { surroundExMode: input.SurroundExMode }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + bitstreamMode: [, , `BitstreamMode`], + codingMode: [, , `CodingMode`], + dialogueIntelligence: [, , `DialogueIntelligence`], + downmixControl: [, , `DownmixControl`], + dynamicRangeCompressionLine: [, , `DynamicRangeCompressionLine`], + dynamicRangeCompressionRf: [, , `DynamicRangeCompressionRf`], + dynamicRangeControl: [, , `DynamicRangeControl`], + loRoCenterMixLevel: [, __serializeFloat, `LoRoCenterMixLevel`], + loRoSurroundMixLevel: [, __serializeFloat, `LoRoSurroundMixLevel`], + ltRtCenterMixLevel: [, __serializeFloat, `LtRtCenterMixLevel`], + ltRtSurroundMixLevel: [, __serializeFloat, `LtRtSurroundMixLevel`], + meteringMode: [, , `MeteringMode`], + sampleRate: [, , `SampleRate`], + speechThreshold: [, , `SpeechThreshold`], + stereoDownmix: [, , `StereoDownmix`], + surroundExMode: [, , `SurroundExMode`], + }); }; /** * serializeAws_restJson1Eac3Settings */ const se_Eac3Settings = (input: Eac3Settings, context: __SerdeContext): any => { - return { - ...(input.AttenuationControl != null && { attenuationControl: input.AttenuationControl }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BitstreamMode != null && { bitstreamMode: input.BitstreamMode }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.DcFilter != null && { dcFilter: input.DcFilter }), - ...(input.Dialnorm != null && { dialnorm: input.Dialnorm }), - ...(input.DynamicRangeCompressionLine != null && { - dynamicRangeCompressionLine: input.DynamicRangeCompressionLine, - }), - ...(input.DynamicRangeCompressionRf != null && { dynamicRangeCompressionRf: input.DynamicRangeCompressionRf }), - ...(input.LfeControl != null && { lfeControl: input.LfeControl }), - ...(input.LfeFilter != null && { lfeFilter: input.LfeFilter }), - ...(input.LoRoCenterMixLevel != null && { loRoCenterMixLevel: __serializeFloat(input.LoRoCenterMixLevel) }), - ...(input.LoRoSurroundMixLevel != null && { loRoSurroundMixLevel: __serializeFloat(input.LoRoSurroundMixLevel) }), - ...(input.LtRtCenterMixLevel != null && { ltRtCenterMixLevel: __serializeFloat(input.LtRtCenterMixLevel) }), - ...(input.LtRtSurroundMixLevel != null && { ltRtSurroundMixLevel: __serializeFloat(input.LtRtSurroundMixLevel) }), - ...(input.MetadataControl != null && { metadataControl: input.MetadataControl }), - ...(input.PassthroughControl != null && { passthroughControl: input.PassthroughControl }), - ...(input.PhaseControl != null && { phaseControl: input.PhaseControl }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - ...(input.StereoDownmix != null && { stereoDownmix: input.StereoDownmix }), - ...(input.SurroundExMode != null && { surroundExMode: input.SurroundExMode }), - ...(input.SurroundMode != null && { surroundMode: input.SurroundMode }), - }; + return take(input, { + attenuationControl: [, , `AttenuationControl`], + bitrate: [, , `Bitrate`], + bitstreamMode: [, , `BitstreamMode`], + codingMode: [, , `CodingMode`], + dcFilter: [, , `DcFilter`], + dialnorm: [, , `Dialnorm`], + dynamicRangeCompressionLine: [, , `DynamicRangeCompressionLine`], + dynamicRangeCompressionRf: [, , `DynamicRangeCompressionRf`], + lfeControl: [, , `LfeControl`], + lfeFilter: [, , `LfeFilter`], + loRoCenterMixLevel: [, __serializeFloat, `LoRoCenterMixLevel`], + loRoSurroundMixLevel: [, __serializeFloat, `LoRoSurroundMixLevel`], + ltRtCenterMixLevel: [, __serializeFloat, `LtRtCenterMixLevel`], + ltRtSurroundMixLevel: [, __serializeFloat, `LtRtSurroundMixLevel`], + metadataControl: [, , `MetadataControl`], + passthroughControl: [, , `PassthroughControl`], + phaseControl: [, , `PhaseControl`], + sampleRate: [, , `SampleRate`], + stereoDownmix: [, , `StereoDownmix`], + surroundExMode: [, , `SurroundExMode`], + surroundMode: [, , `SurroundMode`], + }); }; /** * serializeAws_restJson1EmbeddedDestinationSettings */ const se_EmbeddedDestinationSettings = (input: EmbeddedDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Destination608ChannelNumber != null && { - destination608ChannelNumber: input.Destination608ChannelNumber, - }), - ...(input.Destination708ServiceNumber != null && { - destination708ServiceNumber: input.Destination708ServiceNumber, - }), - }; + return take(input, { + destination608ChannelNumber: [, , `Destination608ChannelNumber`], + destination708ServiceNumber: [, , `Destination708ServiceNumber`], + }); }; /** * serializeAws_restJson1EmbeddedSourceSettings */ const se_EmbeddedSourceSettings = (input: EmbeddedSourceSettings, context: __SerdeContext): any => { - return { - ...(input.Convert608To708 != null && { convert608To708: input.Convert608To708 }), - ...(input.Source608ChannelNumber != null && { source608ChannelNumber: input.Source608ChannelNumber }), - ...(input.Source608TrackNumber != null && { source608TrackNumber: input.Source608TrackNumber }), - ...(input.TerminateCaptions != null && { terminateCaptions: input.TerminateCaptions }), - }; + return take(input, { + convert608To708: [, , `Convert608To708`], + source608ChannelNumber: [, , `Source608ChannelNumber`], + source608TrackNumber: [, , `Source608TrackNumber`], + terminateCaptions: [, , `TerminateCaptions`], + }); }; /** @@ -4198,1019 +3970,906 @@ const se_EsamManifestConfirmConditionNotification = ( input: EsamManifestConfirmConditionNotification, context: __SerdeContext ): any => { - return { - ...(input.MccXml != null && { mccXml: input.MccXml }), - }; + return take(input, { + mccXml: [, , `MccXml`], + }); }; /** * serializeAws_restJson1EsamSettings */ const se_EsamSettings = (input: EsamSettings, context: __SerdeContext): any => { - return { - ...(input.ManifestConfirmConditionNotification != null && { - manifestConfirmConditionNotification: se_EsamManifestConfirmConditionNotification( - input.ManifestConfirmConditionNotification, - context - ), - }), - ...(input.ResponseSignalPreroll != null && { responseSignalPreroll: input.ResponseSignalPreroll }), - ...(input.SignalProcessingNotification != null && { - signalProcessingNotification: se_EsamSignalProcessingNotification(input.SignalProcessingNotification, context), - }), - }; + return take(input, { + manifestConfirmConditionNotification: [ + , + (_) => se_EsamManifestConfirmConditionNotification(_, context), + `ManifestConfirmConditionNotification`, + ], + responseSignalPreroll: [, , `ResponseSignalPreroll`], + signalProcessingNotification: [ + , + (_) => se_EsamSignalProcessingNotification(_, context), + `SignalProcessingNotification`, + ], + }); }; /** * serializeAws_restJson1EsamSignalProcessingNotification */ const se_EsamSignalProcessingNotification = (input: EsamSignalProcessingNotification, context: __SerdeContext): any => { - return { - ...(input.SccXml != null && { sccXml: input.SccXml }), - }; + return take(input, { + sccXml: [, , `SccXml`], + }); }; /** * serializeAws_restJson1ExtendedDataServices */ const se_ExtendedDataServices = (input: ExtendedDataServices, context: __SerdeContext): any => { - return { - ...(input.CopyProtectionAction != null && { copyProtectionAction: input.CopyProtectionAction }), - ...(input.VchipAction != null && { vchipAction: input.VchipAction }), - }; + return take(input, { + copyProtectionAction: [, , `CopyProtectionAction`], + vchipAction: [, , `VchipAction`], + }); }; /** * serializeAws_restJson1F4vSettings */ const se_F4vSettings = (input: F4vSettings, context: __SerdeContext): any => { - return { - ...(input.MoovPlacement != null && { moovPlacement: input.MoovPlacement }), - }; + return take(input, { + moovPlacement: [, , `MoovPlacement`], + }); }; /** * serializeAws_restJson1FileGroupSettings */ const se_FileGroupSettings = (input: FileGroupSettings, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { destination: input.Destination }), - ...(input.DestinationSettings != null && { - destinationSettings: se_DestinationSettings(input.DestinationSettings, context), - }), - }; + return take(input, { + destination: [, , `Destination`], + destinationSettings: [, (_) => se_DestinationSettings(_, context), `DestinationSettings`], + }); }; /** * serializeAws_restJson1FileSourceSettings */ const se_FileSourceSettings = (input: FileSourceSettings, context: __SerdeContext): any => { - return { - ...(input.Convert608To708 != null && { convert608To708: input.Convert608To708 }), - ...(input.Framerate != null && { framerate: se_CaptionSourceFramerate(input.Framerate, context) }), - ...(input.SourceFile != null && { sourceFile: input.SourceFile }), - ...(input.TimeDelta != null && { timeDelta: input.TimeDelta }), - ...(input.TimeDeltaUnits != null && { timeDeltaUnits: input.TimeDeltaUnits }), - }; + return take(input, { + convert608To708: [, , `Convert608To708`], + framerate: [, (_) => se_CaptionSourceFramerate(_, context), `Framerate`], + sourceFile: [, , `SourceFile`], + timeDelta: [, , `TimeDelta`], + timeDeltaUnits: [, , `TimeDeltaUnits`], + }); }; /** * serializeAws_restJson1ForceIncludeRenditionSize */ const se_ForceIncludeRenditionSize = (input: ForceIncludeRenditionSize, context: __SerdeContext): any => { - return { - ...(input.Height != null && { height: input.Height }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + height: [, , `Height`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1FrameCaptureSettings */ const se_FrameCaptureSettings = (input: FrameCaptureSettings, context: __SerdeContext): any => { - return { - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.MaxCaptures != null && { maxCaptures: input.MaxCaptures }), - ...(input.Quality != null && { quality: input.Quality }), - }; + return take(input, { + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + maxCaptures: [, , `MaxCaptures`], + quality: [, , `Quality`], + }); }; /** * serializeAws_restJson1H264QvbrSettings */ const se_H264QvbrSettings = (input: H264QvbrSettings, context: __SerdeContext): any => { - return { - ...(input.MaxAverageBitrate != null && { maxAverageBitrate: input.MaxAverageBitrate }), - ...(input.QvbrQualityLevel != null && { qvbrQualityLevel: input.QvbrQualityLevel }), - ...(input.QvbrQualityLevelFineTune != null && { - qvbrQualityLevelFineTune: __serializeFloat(input.QvbrQualityLevelFineTune), - }), - }; + return take(input, { + maxAverageBitrate: [, , `MaxAverageBitrate`], + qvbrQualityLevel: [, , `QvbrQualityLevel`], + qvbrQualityLevelFineTune: [, __serializeFloat, `QvbrQualityLevelFineTune`], + }); }; /** * serializeAws_restJson1H264Settings */ const se_H264Settings = (input: H264Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.BandwidthReductionFilter != null && { - bandwidthReductionFilter: se_BandwidthReductionFilter(input.BandwidthReductionFilter, context), - }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.CodecLevel != null && { codecLevel: input.CodecLevel }), - ...(input.CodecProfile != null && { codecProfile: input.CodecProfile }), - ...(input.DynamicSubGop != null && { dynamicSubGop: input.DynamicSubGop }), - ...(input.EntropyEncoding != null && { entropyEncoding: input.EntropyEncoding }), - ...(input.FieldEncoding != null && { fieldEncoding: input.FieldEncoding }), - ...(input.FlickerAdaptiveQuantization != null && { - flickerAdaptiveQuantization: input.FlickerAdaptiveQuantization, - }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopBReference != null && { gopBReference: input.GopBReference }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.GopSizeUnits != null && { gopSizeUnits: input.GopSizeUnits }), - ...(input.HrdBufferFinalFillPercentage != null && { - hrdBufferFinalFillPercentage: input.HrdBufferFinalFillPercentage, - }), - ...(input.HrdBufferInitialFillPercentage != null && { - hrdBufferInitialFillPercentage: input.HrdBufferInitialFillPercentage, - }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MinIInterval != null && { minIInterval: input.MinIInterval }), - ...(input.NumberBFramesBetweenReferenceFrames != null && { - numberBFramesBetweenReferenceFrames: input.NumberBFramesBetweenReferenceFrames, - }), - ...(input.NumberReferenceFrames != null && { numberReferenceFrames: input.NumberReferenceFrames }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.QvbrSettings != null && { qvbrSettings: se_H264QvbrSettings(input.QvbrSettings, context) }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.RepeatPps != null && { repeatPps: input.RepeatPps }), - ...(input.ScanTypeConversionMode != null && { scanTypeConversionMode: input.ScanTypeConversionMode }), - ...(input.SceneChangeDetect != null && { sceneChangeDetect: input.SceneChangeDetect }), - ...(input.Slices != null && { slices: input.Slices }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.Softness != null && { softness: input.Softness }), - ...(input.SpatialAdaptiveQuantization != null && { - spatialAdaptiveQuantization: input.SpatialAdaptiveQuantization, - }), - ...(input.Syntax != null && { syntax: input.Syntax }), - ...(input.Telecine != null && { telecine: input.Telecine }), - ...(input.TemporalAdaptiveQuantization != null && { - temporalAdaptiveQuantization: input.TemporalAdaptiveQuantization, - }), - ...(input.UnregisteredSeiTimecode != null && { unregisteredSeiTimecode: input.UnregisteredSeiTimecode }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + bandwidthReductionFilter: [, (_) => se_BandwidthReductionFilter(_, context), `BandwidthReductionFilter`], + bitrate: [, , `Bitrate`], + codecLevel: [, , `CodecLevel`], + codecProfile: [, , `CodecProfile`], + dynamicSubGop: [, , `DynamicSubGop`], + entropyEncoding: [, , `EntropyEncoding`], + fieldEncoding: [, , `FieldEncoding`], + flickerAdaptiveQuantization: [, , `FlickerAdaptiveQuantization`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopBReference: [, , `GopBReference`], + gopClosedCadence: [, , `GopClosedCadence`], + gopSize: [, __serializeFloat, `GopSize`], + gopSizeUnits: [, , `GopSizeUnits`], + hrdBufferFinalFillPercentage: [, , `HrdBufferFinalFillPercentage`], + hrdBufferInitialFillPercentage: [, , `HrdBufferInitialFillPercentage`], + hrdBufferSize: [, , `HrdBufferSize`], + interlaceMode: [, , `InterlaceMode`], + maxBitrate: [, , `MaxBitrate`], + minIInterval: [, , `MinIInterval`], + numberBFramesBetweenReferenceFrames: [, , `NumberBFramesBetweenReferenceFrames`], + numberReferenceFrames: [, , `NumberReferenceFrames`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + qualityTuningLevel: [, , `QualityTuningLevel`], + qvbrSettings: [, (_) => se_H264QvbrSettings(_, context), `QvbrSettings`], + rateControlMode: [, , `RateControlMode`], + repeatPps: [, , `RepeatPps`], + scanTypeConversionMode: [, , `ScanTypeConversionMode`], + sceneChangeDetect: [, , `SceneChangeDetect`], + slices: [, , `Slices`], + slowPal: [, , `SlowPal`], + softness: [, , `Softness`], + spatialAdaptiveQuantization: [, , `SpatialAdaptiveQuantization`], + syntax: [, , `Syntax`], + telecine: [, , `Telecine`], + temporalAdaptiveQuantization: [, , `TemporalAdaptiveQuantization`], + unregisteredSeiTimecode: [, , `UnregisteredSeiTimecode`], + }); }; /** * serializeAws_restJson1H265QvbrSettings */ const se_H265QvbrSettings = (input: H265QvbrSettings, context: __SerdeContext): any => { - return { - ...(input.MaxAverageBitrate != null && { maxAverageBitrate: input.MaxAverageBitrate }), - ...(input.QvbrQualityLevel != null && { qvbrQualityLevel: input.QvbrQualityLevel }), - ...(input.QvbrQualityLevelFineTune != null && { - qvbrQualityLevelFineTune: __serializeFloat(input.QvbrQualityLevelFineTune), - }), - }; + return take(input, { + maxAverageBitrate: [, , `MaxAverageBitrate`], + qvbrQualityLevel: [, , `QvbrQualityLevel`], + qvbrQualityLevelFineTune: [, __serializeFloat, `QvbrQualityLevelFineTune`], + }); }; /** * serializeAws_restJson1H265Settings */ const se_H265Settings = (input: H265Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.AlternateTransferFunctionSei != null && { - alternateTransferFunctionSei: input.AlternateTransferFunctionSei, - }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.CodecLevel != null && { codecLevel: input.CodecLevel }), - ...(input.CodecProfile != null && { codecProfile: input.CodecProfile }), - ...(input.DynamicSubGop != null && { dynamicSubGop: input.DynamicSubGop }), - ...(input.FlickerAdaptiveQuantization != null && { - flickerAdaptiveQuantization: input.FlickerAdaptiveQuantization, - }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopBReference != null && { gopBReference: input.GopBReference }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.GopSizeUnits != null && { gopSizeUnits: input.GopSizeUnits }), - ...(input.HrdBufferFinalFillPercentage != null && { - hrdBufferFinalFillPercentage: input.HrdBufferFinalFillPercentage, - }), - ...(input.HrdBufferInitialFillPercentage != null && { - hrdBufferInitialFillPercentage: input.HrdBufferInitialFillPercentage, - }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MinIInterval != null && { minIInterval: input.MinIInterval }), - ...(input.NumberBFramesBetweenReferenceFrames != null && { - numberBFramesBetweenReferenceFrames: input.NumberBFramesBetweenReferenceFrames, - }), - ...(input.NumberReferenceFrames != null && { numberReferenceFrames: input.NumberReferenceFrames }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.QvbrSettings != null && { qvbrSettings: se_H265QvbrSettings(input.QvbrSettings, context) }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.SampleAdaptiveOffsetFilterMode != null && { - sampleAdaptiveOffsetFilterMode: input.SampleAdaptiveOffsetFilterMode, - }), - ...(input.ScanTypeConversionMode != null && { scanTypeConversionMode: input.ScanTypeConversionMode }), - ...(input.SceneChangeDetect != null && { sceneChangeDetect: input.SceneChangeDetect }), - ...(input.Slices != null && { slices: input.Slices }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.SpatialAdaptiveQuantization != null && { - spatialAdaptiveQuantization: input.SpatialAdaptiveQuantization, - }), - ...(input.Telecine != null && { telecine: input.Telecine }), - ...(input.TemporalAdaptiveQuantization != null && { - temporalAdaptiveQuantization: input.TemporalAdaptiveQuantization, - }), - ...(input.TemporalIds != null && { temporalIds: input.TemporalIds }), - ...(input.Tiles != null && { tiles: input.Tiles }), - ...(input.UnregisteredSeiTimecode != null && { unregisteredSeiTimecode: input.UnregisteredSeiTimecode }), - ...(input.WriteMp4PackagingType != null && { writeMp4PackagingType: input.WriteMp4PackagingType }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + alternateTransferFunctionSei: [, , `AlternateTransferFunctionSei`], + bitrate: [, , `Bitrate`], + codecLevel: [, , `CodecLevel`], + codecProfile: [, , `CodecProfile`], + dynamicSubGop: [, , `DynamicSubGop`], + flickerAdaptiveQuantization: [, , `FlickerAdaptiveQuantization`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopBReference: [, , `GopBReference`], + gopClosedCadence: [, , `GopClosedCadence`], + gopSize: [, __serializeFloat, `GopSize`], + gopSizeUnits: [, , `GopSizeUnits`], + hrdBufferFinalFillPercentage: [, , `HrdBufferFinalFillPercentage`], + hrdBufferInitialFillPercentage: [, , `HrdBufferInitialFillPercentage`], + hrdBufferSize: [, , `HrdBufferSize`], + interlaceMode: [, , `InterlaceMode`], + maxBitrate: [, , `MaxBitrate`], + minIInterval: [, , `MinIInterval`], + numberBFramesBetweenReferenceFrames: [, , `NumberBFramesBetweenReferenceFrames`], + numberReferenceFrames: [, , `NumberReferenceFrames`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + qualityTuningLevel: [, , `QualityTuningLevel`], + qvbrSettings: [, (_) => se_H265QvbrSettings(_, context), `QvbrSettings`], + rateControlMode: [, , `RateControlMode`], + sampleAdaptiveOffsetFilterMode: [, , `SampleAdaptiveOffsetFilterMode`], + scanTypeConversionMode: [, , `ScanTypeConversionMode`], + sceneChangeDetect: [, , `SceneChangeDetect`], + slices: [, , `Slices`], + slowPal: [, , `SlowPal`], + spatialAdaptiveQuantization: [, , `SpatialAdaptiveQuantization`], + telecine: [, , `Telecine`], + temporalAdaptiveQuantization: [, , `TemporalAdaptiveQuantization`], + temporalIds: [, , `TemporalIds`], + tiles: [, , `Tiles`], + unregisteredSeiTimecode: [, , `UnregisteredSeiTimecode`], + writeMp4PackagingType: [, , `WriteMp4PackagingType`], + }); }; /** * serializeAws_restJson1Hdr10Metadata */ const se_Hdr10Metadata = (input: Hdr10Metadata, context: __SerdeContext): any => { - return { - ...(input.BluePrimaryX != null && { bluePrimaryX: input.BluePrimaryX }), - ...(input.BluePrimaryY != null && { bluePrimaryY: input.BluePrimaryY }), - ...(input.GreenPrimaryX != null && { greenPrimaryX: input.GreenPrimaryX }), - ...(input.GreenPrimaryY != null && { greenPrimaryY: input.GreenPrimaryY }), - ...(input.MaxContentLightLevel != null && { maxContentLightLevel: input.MaxContentLightLevel }), - ...(input.MaxFrameAverageLightLevel != null && { maxFrameAverageLightLevel: input.MaxFrameAverageLightLevel }), - ...(input.MaxLuminance != null && { maxLuminance: input.MaxLuminance }), - ...(input.MinLuminance != null && { minLuminance: input.MinLuminance }), - ...(input.RedPrimaryX != null && { redPrimaryX: input.RedPrimaryX }), - ...(input.RedPrimaryY != null && { redPrimaryY: input.RedPrimaryY }), - ...(input.WhitePointX != null && { whitePointX: input.WhitePointX }), - ...(input.WhitePointY != null && { whitePointY: input.WhitePointY }), - }; + return take(input, { + bluePrimaryX: [, , `BluePrimaryX`], + bluePrimaryY: [, , `BluePrimaryY`], + greenPrimaryX: [, , `GreenPrimaryX`], + greenPrimaryY: [, , `GreenPrimaryY`], + maxContentLightLevel: [, , `MaxContentLightLevel`], + maxFrameAverageLightLevel: [, , `MaxFrameAverageLightLevel`], + maxLuminance: [, , `MaxLuminance`], + minLuminance: [, , `MinLuminance`], + redPrimaryX: [, , `RedPrimaryX`], + redPrimaryY: [, , `RedPrimaryY`], + whitePointX: [, , `WhitePointX`], + whitePointY: [, , `WhitePointY`], + }); }; /** * serializeAws_restJson1Hdr10Plus */ const se_Hdr10Plus = (input: Hdr10Plus, context: __SerdeContext): any => { - return { - ...(input.MasteringMonitorNits != null && { masteringMonitorNits: input.MasteringMonitorNits }), - ...(input.TargetMonitorNits != null && { targetMonitorNits: input.TargetMonitorNits }), - }; + return take(input, { + masteringMonitorNits: [, , `MasteringMonitorNits`], + targetMonitorNits: [, , `TargetMonitorNits`], + }); }; /** * serializeAws_restJson1HlsAdditionalManifest */ const se_HlsAdditionalManifest = (input: HlsAdditionalManifest, context: __SerdeContext): any => { - return { - ...(input.ManifestNameModifier != null && { manifestNameModifier: input.ManifestNameModifier }), - ...(input.SelectedOutputs != null && { selectedOutputs: se___listOf__stringMin1(input.SelectedOutputs, context) }), - }; + return take(input, { + manifestNameModifier: [, , `ManifestNameModifier`], + selectedOutputs: [, _json, `SelectedOutputs`], + }); }; /** * serializeAws_restJson1HlsCaptionLanguageMapping */ const se_HlsCaptionLanguageMapping = (input: HlsCaptionLanguageMapping, context: __SerdeContext): any => { - return { - ...(input.CaptionChannel != null && { captionChannel: input.CaptionChannel }), - ...(input.CustomLanguageCode != null && { customLanguageCode: input.CustomLanguageCode }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageDescription != null && { languageDescription: input.LanguageDescription }), - }; + return take(input, { + captionChannel: [, , `CaptionChannel`], + customLanguageCode: [, , `CustomLanguageCode`], + languageCode: [, , `LanguageCode`], + languageDescription: [, , `LanguageDescription`], + }); }; /** * serializeAws_restJson1HlsEncryptionSettings */ const se_HlsEncryptionSettings = (input: HlsEncryptionSettings, context: __SerdeContext): any => { - return { - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }), - ...(input.InitializationVectorInManifest != null && { - initializationVectorInManifest: input.InitializationVectorInManifest, - }), - ...(input.OfflineEncrypted != null && { offlineEncrypted: input.OfflineEncrypted }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - ...(input.StaticKeyProvider != null && { - staticKeyProvider: se_StaticKeyProvider(input.StaticKeyProvider, context), - }), - ...(input.Type != null && { type: input.Type }), - }; + return take(input, { + constantInitializationVector: [, , `ConstantInitializationVector`], + encryptionMethod: [, , `EncryptionMethod`], + initializationVectorInManifest: [, , `InitializationVectorInManifest`], + offlineEncrypted: [, , `OfflineEncrypted`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + staticKeyProvider: [, (_) => se_StaticKeyProvider(_, context), `StaticKeyProvider`], + type: [, , `Type`], + }); }; /** * serializeAws_restJson1HlsGroupSettings */ const se_HlsGroupSettings = (input: HlsGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AdMarkers != null && { adMarkers: se___listOfHlsAdMarkers(input.AdMarkers, context) }), - ...(input.AdditionalManifests != null && { - additionalManifests: se___listOfHlsAdditionalManifest(input.AdditionalManifests, context), - }), - ...(input.AudioOnlyHeader != null && { audioOnlyHeader: input.AudioOnlyHeader }), - ...(input.BaseUrl != null && { baseUrl: input.BaseUrl }), - ...(input.CaptionLanguageMappings != null && { - captionLanguageMappings: se___listOfHlsCaptionLanguageMapping(input.CaptionLanguageMappings, context), - }), - ...(input.CaptionLanguageSetting != null && { captionLanguageSetting: input.CaptionLanguageSetting }), - ...(input.CaptionSegmentLengthControl != null && { - captionSegmentLengthControl: input.CaptionSegmentLengthControl, - }), - ...(input.ClientCache != null && { clientCache: input.ClientCache }), - ...(input.CodecSpecification != null && { codecSpecification: input.CodecSpecification }), - ...(input.Destination != null && { destination: input.Destination }), - ...(input.DestinationSettings != null && { - destinationSettings: se_DestinationSettings(input.DestinationSettings, context), - }), - ...(input.DirectoryStructure != null && { directoryStructure: input.DirectoryStructure }), - ...(input.Encryption != null && { encryption: se_HlsEncryptionSettings(input.Encryption, context) }), - ...(input.ImageBasedTrickPlay != null && { imageBasedTrickPlay: input.ImageBasedTrickPlay }), - ...(input.ImageBasedTrickPlaySettings != null && { - imageBasedTrickPlaySettings: se_HlsImageBasedTrickPlaySettings(input.ImageBasedTrickPlaySettings, context), - }), - ...(input.ManifestCompression != null && { manifestCompression: input.ManifestCompression }), - ...(input.ManifestDurationFormat != null && { manifestDurationFormat: input.ManifestDurationFormat }), - ...(input.MinFinalSegmentLength != null && { - minFinalSegmentLength: __serializeFloat(input.MinFinalSegmentLength), - }), - ...(input.MinSegmentLength != null && { minSegmentLength: input.MinSegmentLength }), - ...(input.OutputSelection != null && { outputSelection: input.OutputSelection }), - ...(input.ProgramDateTime != null && { programDateTime: input.ProgramDateTime }), - ...(input.ProgramDateTimePeriod != null && { programDateTimePeriod: input.ProgramDateTimePeriod }), - ...(input.SegmentControl != null && { segmentControl: input.SegmentControl }), - ...(input.SegmentLength != null && { segmentLength: input.SegmentLength }), - ...(input.SegmentLengthControl != null && { segmentLengthControl: input.SegmentLengthControl }), - ...(input.SegmentsPerSubdirectory != null && { segmentsPerSubdirectory: input.SegmentsPerSubdirectory }), - ...(input.StreamInfResolution != null && { streamInfResolution: input.StreamInfResolution }), - ...(input.TargetDurationCompatibilityMode != null && { - targetDurationCompatibilityMode: input.TargetDurationCompatibilityMode, - }), - ...(input.TimedMetadataId3Frame != null && { timedMetadataId3Frame: input.TimedMetadataId3Frame }), - ...(input.TimedMetadataId3Period != null && { timedMetadataId3Period: input.TimedMetadataId3Period }), - ...(input.TimestampDeltaMilliseconds != null && { timestampDeltaMilliseconds: input.TimestampDeltaMilliseconds }), - }; + return take(input, { + adMarkers: [, _json, `AdMarkers`], + additionalManifests: [, (_) => se___listOfHlsAdditionalManifest(_, context), `AdditionalManifests`], + audioOnlyHeader: [, , `AudioOnlyHeader`], + baseUrl: [, , `BaseUrl`], + captionLanguageMappings: [, (_) => se___listOfHlsCaptionLanguageMapping(_, context), `CaptionLanguageMappings`], + captionLanguageSetting: [, , `CaptionLanguageSetting`], + captionSegmentLengthControl: [, , `CaptionSegmentLengthControl`], + clientCache: [, , `ClientCache`], + codecSpecification: [, , `CodecSpecification`], + destination: [, , `Destination`], + destinationSettings: [, (_) => se_DestinationSettings(_, context), `DestinationSettings`], + directoryStructure: [, , `DirectoryStructure`], + encryption: [, (_) => se_HlsEncryptionSettings(_, context), `Encryption`], + imageBasedTrickPlay: [, , `ImageBasedTrickPlay`], + imageBasedTrickPlaySettings: [ + , + (_) => se_HlsImageBasedTrickPlaySettings(_, context), + `ImageBasedTrickPlaySettings`, + ], + manifestCompression: [, , `ManifestCompression`], + manifestDurationFormat: [, , `ManifestDurationFormat`], + minFinalSegmentLength: [, __serializeFloat, `MinFinalSegmentLength`], + minSegmentLength: [, , `MinSegmentLength`], + outputSelection: [, , `OutputSelection`], + programDateTime: [, , `ProgramDateTime`], + programDateTimePeriod: [, , `ProgramDateTimePeriod`], + segmentControl: [, , `SegmentControl`], + segmentLength: [, , `SegmentLength`], + segmentLengthControl: [, , `SegmentLengthControl`], + segmentsPerSubdirectory: [, , `SegmentsPerSubdirectory`], + streamInfResolution: [, , `StreamInfResolution`], + targetDurationCompatibilityMode: [, , `TargetDurationCompatibilityMode`], + timedMetadataId3Frame: [, , `TimedMetadataId3Frame`], + timedMetadataId3Period: [, , `TimedMetadataId3Period`], + timestampDeltaMilliseconds: [, , `TimestampDeltaMilliseconds`], + }); }; /** * serializeAws_restJson1HlsImageBasedTrickPlaySettings */ const se_HlsImageBasedTrickPlaySettings = (input: HlsImageBasedTrickPlaySettings, context: __SerdeContext): any => { - return { - ...(input.IntervalCadence != null && { intervalCadence: input.IntervalCadence }), - ...(input.ThumbnailHeight != null && { thumbnailHeight: input.ThumbnailHeight }), - ...(input.ThumbnailInterval != null && { thumbnailInterval: __serializeFloat(input.ThumbnailInterval) }), - ...(input.ThumbnailWidth != null && { thumbnailWidth: input.ThumbnailWidth }), - ...(input.TileHeight != null && { tileHeight: input.TileHeight }), - ...(input.TileWidth != null && { tileWidth: input.TileWidth }), - }; + return take(input, { + intervalCadence: [, , `IntervalCadence`], + thumbnailHeight: [, , `ThumbnailHeight`], + thumbnailInterval: [, __serializeFloat, `ThumbnailInterval`], + thumbnailWidth: [, , `ThumbnailWidth`], + tileHeight: [, , `TileHeight`], + tileWidth: [, , `TileWidth`], + }); }; /** * serializeAws_restJson1HlsRenditionGroupSettings */ const se_HlsRenditionGroupSettings = (input: HlsRenditionGroupSettings, context: __SerdeContext): any => { - return { - ...(input.RenditionGroupId != null && { renditionGroupId: input.RenditionGroupId }), - ...(input.RenditionLanguageCode != null && { renditionLanguageCode: input.RenditionLanguageCode }), - ...(input.RenditionName != null && { renditionName: input.RenditionName }), - }; + return take(input, { + renditionGroupId: [, , `RenditionGroupId`], + renditionLanguageCode: [, , `RenditionLanguageCode`], + renditionName: [, , `RenditionName`], + }); }; /** * serializeAws_restJson1HlsSettings */ const se_HlsSettings = (input: HlsSettings, context: __SerdeContext): any => { - return { - ...(input.AudioGroupId != null && { audioGroupId: input.AudioGroupId }), - ...(input.AudioOnlyContainer != null && { audioOnlyContainer: input.AudioOnlyContainer }), - ...(input.AudioRenditionSets != null && { audioRenditionSets: input.AudioRenditionSets }), - ...(input.AudioTrackType != null && { audioTrackType: input.AudioTrackType }), - ...(input.DescriptiveVideoServiceFlag != null && { - descriptiveVideoServiceFlag: input.DescriptiveVideoServiceFlag, - }), - ...(input.IFrameOnlyManifest != null && { iFrameOnlyManifest: input.IFrameOnlyManifest }), - ...(input.SegmentModifier != null && { segmentModifier: input.SegmentModifier }), - }; + return take(input, { + audioGroupId: [, , `AudioGroupId`], + audioOnlyContainer: [, , `AudioOnlyContainer`], + audioRenditionSets: [, , `AudioRenditionSets`], + audioTrackType: [, , `AudioTrackType`], + descriptiveVideoServiceFlag: [, , `DescriptiveVideoServiceFlag`], + iFrameOnlyManifest: [, , `IFrameOnlyManifest`], + segmentModifier: [, , `SegmentModifier`], + }); }; /** * serializeAws_restJson1HopDestination */ const se_HopDestination = (input: HopDestination, context: __SerdeContext): any => { - return { - ...(input.Priority != null && { priority: input.Priority }), - ...(input.Queue != null && { queue: input.Queue }), - ...(input.WaitMinutes != null && { waitMinutes: input.WaitMinutes }), - }; + return take(input, { + priority: [, , `Priority`], + queue: [, , `Queue`], + waitMinutes: [, , `WaitMinutes`], + }); }; /** * serializeAws_restJson1Id3Insertion */ const se_Id3Insertion = (input: Id3Insertion, context: __SerdeContext): any => { - return { - ...(input.Id3 != null && { id3: input.Id3 }), - ...(input.Timecode != null && { timecode: input.Timecode }), - }; + return take(input, { + id3: [, , `Id3`], + timecode: [, , `Timecode`], + }); }; /** * serializeAws_restJson1ImageInserter */ const se_ImageInserter = (input: ImageInserter, context: __SerdeContext): any => { - return { - ...(input.InsertableImages != null && { - insertableImages: se___listOfInsertableImage(input.InsertableImages, context), - }), - ...(input.SdrReferenceWhiteLevel != null && { sdrReferenceWhiteLevel: input.SdrReferenceWhiteLevel }), - }; + return take(input, { + insertableImages: [, (_) => se___listOfInsertableImage(_, context), `InsertableImages`], + sdrReferenceWhiteLevel: [, , `SdrReferenceWhiteLevel`], + }); }; /** * serializeAws_restJson1ImscDestinationSettings */ const se_ImscDestinationSettings = (input: ImscDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Accessibility != null && { accessibility: input.Accessibility }), - ...(input.StylePassthrough != null && { stylePassthrough: input.StylePassthrough }), - }; + return take(input, { + accessibility: [, , `Accessibility`], + stylePassthrough: [, , `StylePassthrough`], + }); }; /** * serializeAws_restJson1Input */ const se_Input = (input: Input, context: __SerdeContext): any => { - return { - ...(input.AudioSelectorGroups != null && { - audioSelectorGroups: se___mapOfAudioSelectorGroup(input.AudioSelectorGroups, context), - }), - ...(input.AudioSelectors != null && { audioSelectors: se___mapOfAudioSelector(input.AudioSelectors, context) }), - ...(input.CaptionSelectors != null && { - captionSelectors: se___mapOfCaptionSelector(input.CaptionSelectors, context), - }), - ...(input.Crop != null && { crop: se_Rectangle(input.Crop, context) }), - ...(input.DeblockFilter != null && { deblockFilter: input.DeblockFilter }), - ...(input.DecryptionSettings != null && { - decryptionSettings: se_InputDecryptionSettings(input.DecryptionSettings, context), - }), - ...(input.DenoiseFilter != null && { denoiseFilter: input.DenoiseFilter }), - ...(input.DolbyVisionMetadataXml != null && { dolbyVisionMetadataXml: input.DolbyVisionMetadataXml }), - ...(input.FileInput != null && { fileInput: input.FileInput }), - ...(input.FilterEnable != null && { filterEnable: input.FilterEnable }), - ...(input.FilterStrength != null && { filterStrength: input.FilterStrength }), - ...(input.ImageInserter != null && { imageInserter: se_ImageInserter(input.ImageInserter, context) }), - ...(input.InputClippings != null && { inputClippings: se___listOfInputClipping(input.InputClippings, context) }), - ...(input.InputScanType != null && { inputScanType: input.InputScanType }), - ...(input.Position != null && { position: se_Rectangle(input.Position, context) }), - ...(input.ProgramNumber != null && { programNumber: input.ProgramNumber }), - ...(input.PsiControl != null && { psiControl: input.PsiControl }), - ...(input.SupplementalImps != null && { - supplementalImps: se___listOf__stringPatternS3ASSETMAPXml(input.SupplementalImps, context), - }), - ...(input.TimecodeSource != null && { timecodeSource: input.TimecodeSource }), - ...(input.TimecodeStart != null && { timecodeStart: input.TimecodeStart }), - ...(input.VideoGenerator != null && { videoGenerator: se_InputVideoGenerator(input.VideoGenerator, context) }), - ...(input.VideoSelector != null && { videoSelector: se_VideoSelector(input.VideoSelector, context) }), - }; + return take(input, { + audioSelectorGroups: [, (_) => se___mapOfAudioSelectorGroup(_, context), `AudioSelectorGroups`], + audioSelectors: [, (_) => se___mapOfAudioSelector(_, context), `AudioSelectors`], + captionSelectors: [, (_) => se___mapOfCaptionSelector(_, context), `CaptionSelectors`], + crop: [, (_) => se_Rectangle(_, context), `Crop`], + deblockFilter: [, , `DeblockFilter`], + decryptionSettings: [, (_) => se_InputDecryptionSettings(_, context), `DecryptionSettings`], + denoiseFilter: [, , `DenoiseFilter`], + dolbyVisionMetadataXml: [, , `DolbyVisionMetadataXml`], + fileInput: [, , `FileInput`], + filterEnable: [, , `FilterEnable`], + filterStrength: [, , `FilterStrength`], + imageInserter: [, (_) => se_ImageInserter(_, context), `ImageInserter`], + inputClippings: [, (_) => se___listOfInputClipping(_, context), `InputClippings`], + inputScanType: [, , `InputScanType`], + position: [, (_) => se_Rectangle(_, context), `Position`], + programNumber: [, , `ProgramNumber`], + psiControl: [, , `PsiControl`], + supplementalImps: [, _json, `SupplementalImps`], + timecodeSource: [, , `TimecodeSource`], + timecodeStart: [, , `TimecodeStart`], + videoGenerator: [, (_) => se_InputVideoGenerator(_, context), `VideoGenerator`], + videoSelector: [, (_) => se_VideoSelector(_, context), `VideoSelector`], + }); }; /** * serializeAws_restJson1InputClipping */ const se_InputClipping = (input: InputClipping, context: __SerdeContext): any => { - return { - ...(input.EndTimecode != null && { endTimecode: input.EndTimecode }), - ...(input.StartTimecode != null && { startTimecode: input.StartTimecode }), - }; + return take(input, { + endTimecode: [, , `EndTimecode`], + startTimecode: [, , `StartTimecode`], + }); }; /** * serializeAws_restJson1InputDecryptionSettings */ const se_InputDecryptionSettings = (input: InputDecryptionSettings, context: __SerdeContext): any => { - return { - ...(input.DecryptionMode != null && { decryptionMode: input.DecryptionMode }), - ...(input.EncryptedDecryptionKey != null && { encryptedDecryptionKey: input.EncryptedDecryptionKey }), - ...(input.InitializationVector != null && { initializationVector: input.InitializationVector }), - ...(input.KmsKeyRegion != null && { kmsKeyRegion: input.KmsKeyRegion }), - }; + return take(input, { + decryptionMode: [, , `DecryptionMode`], + encryptedDecryptionKey: [, , `EncryptedDecryptionKey`], + initializationVector: [, , `InitializationVector`], + kmsKeyRegion: [, , `KmsKeyRegion`], + }); }; /** * serializeAws_restJson1InputTemplate */ const se_InputTemplate = (input: InputTemplate, context: __SerdeContext): any => { - return { - ...(input.AudioSelectorGroups != null && { - audioSelectorGroups: se___mapOfAudioSelectorGroup(input.AudioSelectorGroups, context), - }), - ...(input.AudioSelectors != null && { audioSelectors: se___mapOfAudioSelector(input.AudioSelectors, context) }), - ...(input.CaptionSelectors != null && { - captionSelectors: se___mapOfCaptionSelector(input.CaptionSelectors, context), - }), - ...(input.Crop != null && { crop: se_Rectangle(input.Crop, context) }), - ...(input.DeblockFilter != null && { deblockFilter: input.DeblockFilter }), - ...(input.DenoiseFilter != null && { denoiseFilter: input.DenoiseFilter }), - ...(input.DolbyVisionMetadataXml != null && { dolbyVisionMetadataXml: input.DolbyVisionMetadataXml }), - ...(input.FilterEnable != null && { filterEnable: input.FilterEnable }), - ...(input.FilterStrength != null && { filterStrength: input.FilterStrength }), - ...(input.ImageInserter != null && { imageInserter: se_ImageInserter(input.ImageInserter, context) }), - ...(input.InputClippings != null && { inputClippings: se___listOfInputClipping(input.InputClippings, context) }), - ...(input.InputScanType != null && { inputScanType: input.InputScanType }), - ...(input.Position != null && { position: se_Rectangle(input.Position, context) }), - ...(input.ProgramNumber != null && { programNumber: input.ProgramNumber }), - ...(input.PsiControl != null && { psiControl: input.PsiControl }), - ...(input.TimecodeSource != null && { timecodeSource: input.TimecodeSource }), - ...(input.TimecodeStart != null && { timecodeStart: input.TimecodeStart }), - ...(input.VideoSelector != null && { videoSelector: se_VideoSelector(input.VideoSelector, context) }), - }; + return take(input, { + audioSelectorGroups: [, (_) => se___mapOfAudioSelectorGroup(_, context), `AudioSelectorGroups`], + audioSelectors: [, (_) => se___mapOfAudioSelector(_, context), `AudioSelectors`], + captionSelectors: [, (_) => se___mapOfCaptionSelector(_, context), `CaptionSelectors`], + crop: [, (_) => se_Rectangle(_, context), `Crop`], + deblockFilter: [, , `DeblockFilter`], + denoiseFilter: [, , `DenoiseFilter`], + dolbyVisionMetadataXml: [, , `DolbyVisionMetadataXml`], + filterEnable: [, , `FilterEnable`], + filterStrength: [, , `FilterStrength`], + imageInserter: [, (_) => se_ImageInserter(_, context), `ImageInserter`], + inputClippings: [, (_) => se___listOfInputClipping(_, context), `InputClippings`], + inputScanType: [, , `InputScanType`], + position: [, (_) => se_Rectangle(_, context), `Position`], + programNumber: [, , `ProgramNumber`], + psiControl: [, , `PsiControl`], + timecodeSource: [, , `TimecodeSource`], + timecodeStart: [, , `TimecodeStart`], + videoSelector: [, (_) => se_VideoSelector(_, context), `VideoSelector`], + }); }; /** * serializeAws_restJson1InputVideoGenerator */ const se_InputVideoGenerator = (input: InputVideoGenerator, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { duration: input.Duration }), - }; + return take(input, { + duration: [, , `Duration`], + }); }; /** * serializeAws_restJson1InsertableImage */ const se_InsertableImage = (input: InsertableImage, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { duration: input.Duration }), - ...(input.FadeIn != null && { fadeIn: input.FadeIn }), - ...(input.FadeOut != null && { fadeOut: input.FadeOut }), - ...(input.Height != null && { height: input.Height }), - ...(input.ImageInserterInput != null && { imageInserterInput: input.ImageInserterInput }), - ...(input.ImageX != null && { imageX: input.ImageX }), - ...(input.ImageY != null && { imageY: input.ImageY }), - ...(input.Layer != null && { layer: input.Layer }), - ...(input.Opacity != null && { opacity: input.Opacity }), - ...(input.StartTime != null && { startTime: input.StartTime }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + duration: [, , `Duration`], + fadeIn: [, , `FadeIn`], + fadeOut: [, , `FadeOut`], + height: [, , `Height`], + imageInserterInput: [, , `ImageInserterInput`], + imageX: [, , `ImageX`], + imageY: [, , `ImageY`], + layer: [, , `Layer`], + opacity: [, , `Opacity`], + startTime: [, , `StartTime`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1JobSettings */ const se_JobSettings = (input: JobSettings, context: __SerdeContext): any => { - return { - ...(input.AdAvailOffset != null && { adAvailOffset: input.AdAvailOffset }), - ...(input.AvailBlanking != null && { availBlanking: se_AvailBlanking(input.AvailBlanking, context) }), - ...(input.Esam != null && { esam: se_EsamSettings(input.Esam, context) }), - ...(input.ExtendedDataServices != null && { - extendedDataServices: se_ExtendedDataServices(input.ExtendedDataServices, context), - }), - ...(input.Inputs != null && { inputs: se___listOfInput(input.Inputs, context) }), - ...(input.KantarWatermark != null && { - kantarWatermark: se_KantarWatermarkSettings(input.KantarWatermark, context), - }), - ...(input.MotionImageInserter != null && { - motionImageInserter: se_MotionImageInserter(input.MotionImageInserter, context), - }), - ...(input.NielsenConfiguration != null && { - nielsenConfiguration: se_NielsenConfiguration(input.NielsenConfiguration, context), - }), - ...(input.NielsenNonLinearWatermark != null && { - nielsenNonLinearWatermark: se_NielsenNonLinearWatermarkSettings(input.NielsenNonLinearWatermark, context), - }), - ...(input.OutputGroups != null && { outputGroups: se___listOfOutputGroup(input.OutputGroups, context) }), - ...(input.TimecodeConfig != null && { timecodeConfig: se_TimecodeConfig(input.TimecodeConfig, context) }), - ...(input.TimedMetadataInsertion != null && { - timedMetadataInsertion: se_TimedMetadataInsertion(input.TimedMetadataInsertion, context), - }), - }; + return take(input, { + adAvailOffset: [, , `AdAvailOffset`], + availBlanking: [, (_) => se_AvailBlanking(_, context), `AvailBlanking`], + esam: [, (_) => se_EsamSettings(_, context), `Esam`], + extendedDataServices: [, (_) => se_ExtendedDataServices(_, context), `ExtendedDataServices`], + inputs: [, (_) => se___listOfInput(_, context), `Inputs`], + kantarWatermark: [, (_) => se_KantarWatermarkSettings(_, context), `KantarWatermark`], + motionImageInserter: [, (_) => se_MotionImageInserter(_, context), `MotionImageInserter`], + nielsenConfiguration: [, (_) => se_NielsenConfiguration(_, context), `NielsenConfiguration`], + nielsenNonLinearWatermark: [, (_) => se_NielsenNonLinearWatermarkSettings(_, context), `NielsenNonLinearWatermark`], + outputGroups: [, (_) => se___listOfOutputGroup(_, context), `OutputGroups`], + timecodeConfig: [, (_) => se_TimecodeConfig(_, context), `TimecodeConfig`], + timedMetadataInsertion: [, (_) => se_TimedMetadataInsertion(_, context), `TimedMetadataInsertion`], + }); }; /** * serializeAws_restJson1JobTemplateSettings */ const se_JobTemplateSettings = (input: JobTemplateSettings, context: __SerdeContext): any => { - return { - ...(input.AdAvailOffset != null && { adAvailOffset: input.AdAvailOffset }), - ...(input.AvailBlanking != null && { availBlanking: se_AvailBlanking(input.AvailBlanking, context) }), - ...(input.Esam != null && { esam: se_EsamSettings(input.Esam, context) }), - ...(input.ExtendedDataServices != null && { - extendedDataServices: se_ExtendedDataServices(input.ExtendedDataServices, context), - }), - ...(input.Inputs != null && { inputs: se___listOfInputTemplate(input.Inputs, context) }), - ...(input.KantarWatermark != null && { - kantarWatermark: se_KantarWatermarkSettings(input.KantarWatermark, context), - }), - ...(input.MotionImageInserter != null && { - motionImageInserter: se_MotionImageInserter(input.MotionImageInserter, context), - }), - ...(input.NielsenConfiguration != null && { - nielsenConfiguration: se_NielsenConfiguration(input.NielsenConfiguration, context), - }), - ...(input.NielsenNonLinearWatermark != null && { - nielsenNonLinearWatermark: se_NielsenNonLinearWatermarkSettings(input.NielsenNonLinearWatermark, context), - }), - ...(input.OutputGroups != null && { outputGroups: se___listOfOutputGroup(input.OutputGroups, context) }), - ...(input.TimecodeConfig != null && { timecodeConfig: se_TimecodeConfig(input.TimecodeConfig, context) }), - ...(input.TimedMetadataInsertion != null && { - timedMetadataInsertion: se_TimedMetadataInsertion(input.TimedMetadataInsertion, context), - }), - }; + return take(input, { + adAvailOffset: [, , `AdAvailOffset`], + availBlanking: [, (_) => se_AvailBlanking(_, context), `AvailBlanking`], + esam: [, (_) => se_EsamSettings(_, context), `Esam`], + extendedDataServices: [, (_) => se_ExtendedDataServices(_, context), `ExtendedDataServices`], + inputs: [, (_) => se___listOfInputTemplate(_, context), `Inputs`], + kantarWatermark: [, (_) => se_KantarWatermarkSettings(_, context), `KantarWatermark`], + motionImageInserter: [, (_) => se_MotionImageInserter(_, context), `MotionImageInserter`], + nielsenConfiguration: [, (_) => se_NielsenConfiguration(_, context), `NielsenConfiguration`], + nielsenNonLinearWatermark: [, (_) => se_NielsenNonLinearWatermarkSettings(_, context), `NielsenNonLinearWatermark`], + outputGroups: [, (_) => se___listOfOutputGroup(_, context), `OutputGroups`], + timecodeConfig: [, (_) => se_TimecodeConfig(_, context), `TimecodeConfig`], + timedMetadataInsertion: [, (_) => se_TimedMetadataInsertion(_, context), `TimedMetadataInsertion`], + }); }; /** * serializeAws_restJson1KantarWatermarkSettings */ const se_KantarWatermarkSettings = (input: KantarWatermarkSettings, context: __SerdeContext): any => { - return { - ...(input.ChannelName != null && { channelName: input.ChannelName }), - ...(input.ContentReference != null && { contentReference: input.ContentReference }), - ...(input.CredentialsSecretName != null && { credentialsSecretName: input.CredentialsSecretName }), - ...(input.FileOffset != null && { fileOffset: __serializeFloat(input.FileOffset) }), - ...(input.KantarLicenseId != null && { kantarLicenseId: input.KantarLicenseId }), - ...(input.KantarServerUrl != null && { kantarServerUrl: input.KantarServerUrl }), - ...(input.LogDestination != null && { logDestination: input.LogDestination }), - ...(input.Metadata3 != null && { metadata3: input.Metadata3 }), - ...(input.Metadata4 != null && { metadata4: input.Metadata4 }), - ...(input.Metadata5 != null && { metadata5: input.Metadata5 }), - ...(input.Metadata6 != null && { metadata6: input.Metadata6 }), - ...(input.Metadata7 != null && { metadata7: input.Metadata7 }), - ...(input.Metadata8 != null && { metadata8: input.Metadata8 }), - }; + return take(input, { + channelName: [, , `ChannelName`], + contentReference: [, , `ContentReference`], + credentialsSecretName: [, , `CredentialsSecretName`], + fileOffset: [, __serializeFloat, `FileOffset`], + kantarLicenseId: [, , `KantarLicenseId`], + kantarServerUrl: [, , `KantarServerUrl`], + logDestination: [, , `LogDestination`], + metadata3: [, , `Metadata3`], + metadata4: [, , `Metadata4`], + metadata5: [, , `Metadata5`], + metadata6: [, , `Metadata6`], + metadata7: [, , `Metadata7`], + metadata8: [, , `Metadata8`], + }); }; /** * serializeAws_restJson1M2tsScte35Esam */ const se_M2tsScte35Esam = (input: M2tsScte35Esam, context: __SerdeContext): any => { - return { - ...(input.Scte35EsamPid != null && { scte35EsamPid: input.Scte35EsamPid }), - }; + return take(input, { + scte35EsamPid: [, , `Scte35EsamPid`], + }); }; /** * serializeAws_restJson1M2tsSettings */ const se_M2tsSettings = (input: M2tsSettings, context: __SerdeContext): any => { - return { - ...(input.AudioBufferModel != null && { audioBufferModel: input.AudioBufferModel }), - ...(input.AudioDuration != null && { audioDuration: input.AudioDuration }), - ...(input.AudioFramesPerPes != null && { audioFramesPerPes: input.AudioFramesPerPes }), - ...(input.AudioPids != null && { audioPids: se___listOf__integerMin32Max8182(input.AudioPids, context) }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BufferModel != null && { bufferModel: input.BufferModel }), - ...(input.DataPTSControl != null && { dataPTSControl: input.DataPTSControl }), - ...(input.DvbNitSettings != null && { dvbNitSettings: se_DvbNitSettings(input.DvbNitSettings, context) }), - ...(input.DvbSdtSettings != null && { dvbSdtSettings: se_DvbSdtSettings(input.DvbSdtSettings, context) }), - ...(input.DvbSubPids != null && { dvbSubPids: se___listOf__integerMin32Max8182(input.DvbSubPids, context) }), - ...(input.DvbTdtSettings != null && { dvbTdtSettings: se_DvbTdtSettings(input.DvbTdtSettings, context) }), - ...(input.DvbTeletextPid != null && { dvbTeletextPid: input.DvbTeletextPid }), - ...(input.EbpAudioInterval != null && { ebpAudioInterval: input.EbpAudioInterval }), - ...(input.EbpPlacement != null && { ebpPlacement: input.EbpPlacement }), - ...(input.EsRateInPes != null && { esRateInPes: input.EsRateInPes }), - ...(input.ForceTsVideoEbpOrder != null && { forceTsVideoEbpOrder: input.ForceTsVideoEbpOrder }), - ...(input.FragmentTime != null && { fragmentTime: __serializeFloat(input.FragmentTime) }), - ...(input.KlvMetadata != null && { klvMetadata: input.KlvMetadata }), - ...(input.MaxPcrInterval != null && { maxPcrInterval: input.MaxPcrInterval }), - ...(input.MinEbpInterval != null && { minEbpInterval: input.MinEbpInterval }), - ...(input.NielsenId3 != null && { nielsenId3: input.NielsenId3 }), - ...(input.NullPacketBitrate != null && { nullPacketBitrate: __serializeFloat(input.NullPacketBitrate) }), - ...(input.PatInterval != null && { patInterval: input.PatInterval }), - ...(input.PcrControl != null && { pcrControl: input.PcrControl }), - ...(input.PcrPid != null && { pcrPid: input.PcrPid }), - ...(input.PmtInterval != null && { pmtInterval: input.PmtInterval }), - ...(input.PmtPid != null && { pmtPid: input.PmtPid }), - ...(input.PrivateMetadataPid != null && { privateMetadataPid: input.PrivateMetadataPid }), - ...(input.ProgramNumber != null && { programNumber: input.ProgramNumber }), - ...(input.RateMode != null && { rateMode: input.RateMode }), - ...(input.Scte35Esam != null && { scte35Esam: se_M2tsScte35Esam(input.Scte35Esam, context) }), - ...(input.Scte35Pid != null && { scte35Pid: input.Scte35Pid }), - ...(input.Scte35Source != null && { scte35Source: input.Scte35Source }), - ...(input.SegmentationMarkers != null && { segmentationMarkers: input.SegmentationMarkers }), - ...(input.SegmentationStyle != null && { segmentationStyle: input.SegmentationStyle }), - ...(input.SegmentationTime != null && { segmentationTime: __serializeFloat(input.SegmentationTime) }), - ...(input.TimedMetadataPid != null && { timedMetadataPid: input.TimedMetadataPid }), - ...(input.TransportStreamId != null && { transportStreamId: input.TransportStreamId }), - ...(input.VideoPid != null && { videoPid: input.VideoPid }), - }; + return take(input, { + audioBufferModel: [, , `AudioBufferModel`], + audioDuration: [, , `AudioDuration`], + audioFramesPerPes: [, , `AudioFramesPerPes`], + audioPids: [, _json, `AudioPids`], + bitrate: [, , `Bitrate`], + bufferModel: [, , `BufferModel`], + dataPTSControl: [, , `DataPTSControl`], + dvbNitSettings: [, (_) => se_DvbNitSettings(_, context), `DvbNitSettings`], + dvbSdtSettings: [, (_) => se_DvbSdtSettings(_, context), `DvbSdtSettings`], + dvbSubPids: [, _json, `DvbSubPids`], + dvbTdtSettings: [, (_) => se_DvbTdtSettings(_, context), `DvbTdtSettings`], + dvbTeletextPid: [, , `DvbTeletextPid`], + ebpAudioInterval: [, , `EbpAudioInterval`], + ebpPlacement: [, , `EbpPlacement`], + esRateInPes: [, , `EsRateInPes`], + forceTsVideoEbpOrder: [, , `ForceTsVideoEbpOrder`], + fragmentTime: [, __serializeFloat, `FragmentTime`], + klvMetadata: [, , `KlvMetadata`], + maxPcrInterval: [, , `MaxPcrInterval`], + minEbpInterval: [, , `MinEbpInterval`], + nielsenId3: [, , `NielsenId3`], + nullPacketBitrate: [, __serializeFloat, `NullPacketBitrate`], + patInterval: [, , `PatInterval`], + pcrControl: [, , `PcrControl`], + pcrPid: [, , `PcrPid`], + pmtInterval: [, , `PmtInterval`], + pmtPid: [, , `PmtPid`], + privateMetadataPid: [, , `PrivateMetadataPid`], + programNumber: [, , `ProgramNumber`], + rateMode: [, , `RateMode`], + scte35Esam: [, (_) => se_M2tsScte35Esam(_, context), `Scte35Esam`], + scte35Pid: [, , `Scte35Pid`], + scte35Source: [, , `Scte35Source`], + segmentationMarkers: [, , `SegmentationMarkers`], + segmentationStyle: [, , `SegmentationStyle`], + segmentationTime: [, __serializeFloat, `SegmentationTime`], + timedMetadataPid: [, , `TimedMetadataPid`], + transportStreamId: [, , `TransportStreamId`], + videoPid: [, , `VideoPid`], + }); }; /** * serializeAws_restJson1M3u8Settings */ const se_M3u8Settings = (input: M3u8Settings, context: __SerdeContext): any => { - return { - ...(input.AudioDuration != null && { audioDuration: input.AudioDuration }), - ...(input.AudioFramesPerPes != null && { audioFramesPerPes: input.AudioFramesPerPes }), - ...(input.AudioPids != null && { audioPids: se___listOf__integerMin32Max8182(input.AudioPids, context) }), - ...(input.DataPTSControl != null && { dataPTSControl: input.DataPTSControl }), - ...(input.MaxPcrInterval != null && { maxPcrInterval: input.MaxPcrInterval }), - ...(input.NielsenId3 != null && { nielsenId3: input.NielsenId3 }), - ...(input.PatInterval != null && { patInterval: input.PatInterval }), - ...(input.PcrControl != null && { pcrControl: input.PcrControl }), - ...(input.PcrPid != null && { pcrPid: input.PcrPid }), - ...(input.PmtInterval != null && { pmtInterval: input.PmtInterval }), - ...(input.PmtPid != null && { pmtPid: input.PmtPid }), - ...(input.PrivateMetadataPid != null && { privateMetadataPid: input.PrivateMetadataPid }), - ...(input.ProgramNumber != null && { programNumber: input.ProgramNumber }), - ...(input.Scte35Pid != null && { scte35Pid: input.Scte35Pid }), - ...(input.Scte35Source != null && { scte35Source: input.Scte35Source }), - ...(input.TimedMetadata != null && { timedMetadata: input.TimedMetadata }), - ...(input.TimedMetadataPid != null && { timedMetadataPid: input.TimedMetadataPid }), - ...(input.TransportStreamId != null && { transportStreamId: input.TransportStreamId }), - ...(input.VideoPid != null && { videoPid: input.VideoPid }), - }; + return take(input, { + audioDuration: [, , `AudioDuration`], + audioFramesPerPes: [, , `AudioFramesPerPes`], + audioPids: [, _json, `AudioPids`], + dataPTSControl: [, , `DataPTSControl`], + maxPcrInterval: [, , `MaxPcrInterval`], + nielsenId3: [, , `NielsenId3`], + patInterval: [, , `PatInterval`], + pcrControl: [, , `PcrControl`], + pcrPid: [, , `PcrPid`], + pmtInterval: [, , `PmtInterval`], + pmtPid: [, , `PmtPid`], + privateMetadataPid: [, , `PrivateMetadataPid`], + programNumber: [, , `ProgramNumber`], + scte35Pid: [, , `Scte35Pid`], + scte35Source: [, , `Scte35Source`], + timedMetadata: [, , `TimedMetadata`], + timedMetadataPid: [, , `TimedMetadataPid`], + transportStreamId: [, , `TransportStreamId`], + videoPid: [, , `VideoPid`], + }); }; /** * serializeAws_restJson1MinBottomRenditionSize */ const se_MinBottomRenditionSize = (input: MinBottomRenditionSize, context: __SerdeContext): any => { - return { - ...(input.Height != null && { height: input.Height }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + height: [, , `Height`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1MinTopRenditionSize */ const se_MinTopRenditionSize = (input: MinTopRenditionSize, context: __SerdeContext): any => { - return { - ...(input.Height != null && { height: input.Height }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + height: [, , `Height`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1MotionImageInserter */ const se_MotionImageInserter = (input: MotionImageInserter, context: __SerdeContext): any => { - return { - ...(input.Framerate != null && { framerate: se_MotionImageInsertionFramerate(input.Framerate, context) }), - ...(input.Input != null && { input: input.Input }), - ...(input.InsertionMode != null && { insertionMode: input.InsertionMode }), - ...(input.Offset != null && { offset: se_MotionImageInsertionOffset(input.Offset, context) }), - ...(input.Playback != null && { playback: input.Playback }), - ...(input.StartTime != null && { startTime: input.StartTime }), - }; + return take(input, { + framerate: [, (_) => se_MotionImageInsertionFramerate(_, context), `Framerate`], + input: [, , `Input`], + insertionMode: [, , `InsertionMode`], + offset: [, (_) => se_MotionImageInsertionOffset(_, context), `Offset`], + playback: [, , `Playback`], + startTime: [, , `StartTime`], + }); }; /** * serializeAws_restJson1MotionImageInsertionFramerate */ const se_MotionImageInsertionFramerate = (input: MotionImageInsertionFramerate, context: __SerdeContext): any => { - return { - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - }; + return take(input, { + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + }); }; /** * serializeAws_restJson1MotionImageInsertionOffset */ const se_MotionImageInsertionOffset = (input: MotionImageInsertionOffset, context: __SerdeContext): any => { - return { - ...(input.ImageX != null && { imageX: input.ImageX }), - ...(input.ImageY != null && { imageY: input.ImageY }), - }; + return take(input, { + imageX: [, , `ImageX`], + imageY: [, , `ImageY`], + }); }; /** * serializeAws_restJson1MovSettings */ const se_MovSettings = (input: MovSettings, context: __SerdeContext): any => { - return { - ...(input.ClapAtom != null && { clapAtom: input.ClapAtom }), - ...(input.CslgAtom != null && { cslgAtom: input.CslgAtom }), - ...(input.Mpeg2FourCCControl != null && { mpeg2FourCCControl: input.Mpeg2FourCCControl }), - ...(input.PaddingControl != null && { paddingControl: input.PaddingControl }), - ...(input.Reference != null && { reference: input.Reference }), - }; + return take(input, { + clapAtom: [, , `ClapAtom`], + cslgAtom: [, , `CslgAtom`], + mpeg2FourCCControl: [, , `Mpeg2FourCCControl`], + paddingControl: [, , `PaddingControl`], + reference: [, , `Reference`], + }); }; /** * serializeAws_restJson1Mp2Settings */ const se_Mp2Settings = (input: Mp2Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.Channels != null && { channels: input.Channels }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + channels: [, , `Channels`], + sampleRate: [, , `SampleRate`], + }); }; /** * serializeAws_restJson1Mp3Settings */ const se_Mp3Settings = (input: Mp3Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.Channels != null && { channels: input.Channels }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - ...(input.VbrQuality != null && { vbrQuality: input.VbrQuality }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + channels: [, , `Channels`], + rateControlMode: [, , `RateControlMode`], + sampleRate: [, , `SampleRate`], + vbrQuality: [, , `VbrQuality`], + }); }; /** * serializeAws_restJson1Mp4Settings */ const se_Mp4Settings = (input: Mp4Settings, context: __SerdeContext): any => { - return { - ...(input.AudioDuration != null && { audioDuration: input.AudioDuration }), - ...(input.CslgAtom != null && { cslgAtom: input.CslgAtom }), - ...(input.CttsVersion != null && { cttsVersion: input.CttsVersion }), - ...(input.FreeSpaceBox != null && { freeSpaceBox: input.FreeSpaceBox }), - ...(input.MoovPlacement != null && { moovPlacement: input.MoovPlacement }), - ...(input.Mp4MajorBrand != null && { mp4MajorBrand: input.Mp4MajorBrand }), - }; + return take(input, { + audioDuration: [, , `AudioDuration`], + cslgAtom: [, , `CslgAtom`], + cttsVersion: [, , `CttsVersion`], + freeSpaceBox: [, , `FreeSpaceBox`], + moovPlacement: [, , `MoovPlacement`], + mp4MajorBrand: [, , `Mp4MajorBrand`], + }); }; /** * serializeAws_restJson1MpdSettings */ const se_MpdSettings = (input: MpdSettings, context: __SerdeContext): any => { - return { - ...(input.AccessibilityCaptionHints != null && { accessibilityCaptionHints: input.AccessibilityCaptionHints }), - ...(input.AudioDuration != null && { audioDuration: input.AudioDuration }), - ...(input.CaptionContainerType != null && { captionContainerType: input.CaptionContainerType }), - ...(input.KlvMetadata != null && { klvMetadata: input.KlvMetadata }), - ...(input.ManifestMetadataSignaling != null && { manifestMetadataSignaling: input.ManifestMetadataSignaling }), - ...(input.Scte35Esam != null && { scte35Esam: input.Scte35Esam }), - ...(input.Scte35Source != null && { scte35Source: input.Scte35Source }), - ...(input.TimedMetadata != null && { timedMetadata: input.TimedMetadata }), - ...(input.TimedMetadataBoxVersion != null && { timedMetadataBoxVersion: input.TimedMetadataBoxVersion }), - ...(input.TimedMetadataSchemeIdUri != null && { timedMetadataSchemeIdUri: input.TimedMetadataSchemeIdUri }), - ...(input.TimedMetadataValue != null && { timedMetadataValue: input.TimedMetadataValue }), - }; + return take(input, { + accessibilityCaptionHints: [, , `AccessibilityCaptionHints`], + audioDuration: [, , `AudioDuration`], + captionContainerType: [, , `CaptionContainerType`], + klvMetadata: [, , `KlvMetadata`], + manifestMetadataSignaling: [, , `ManifestMetadataSignaling`], + scte35Esam: [, , `Scte35Esam`], + scte35Source: [, , `Scte35Source`], + timedMetadata: [, , `TimedMetadata`], + timedMetadataBoxVersion: [, , `TimedMetadataBoxVersion`], + timedMetadataSchemeIdUri: [, , `TimedMetadataSchemeIdUri`], + timedMetadataValue: [, , `TimedMetadataValue`], + }); }; /** * serializeAws_restJson1Mpeg2Settings */ const se_Mpeg2Settings = (input: Mpeg2Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.CodecLevel != null && { codecLevel: input.CodecLevel }), - ...(input.CodecProfile != null && { codecProfile: input.CodecProfile }), - ...(input.DynamicSubGop != null && { dynamicSubGop: input.DynamicSubGop }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.GopSizeUnits != null && { gopSizeUnits: input.GopSizeUnits }), - ...(input.HrdBufferFinalFillPercentage != null && { - hrdBufferFinalFillPercentage: input.HrdBufferFinalFillPercentage, - }), - ...(input.HrdBufferInitialFillPercentage != null && { - hrdBufferInitialFillPercentage: input.HrdBufferInitialFillPercentage, - }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.IntraDcPrecision != null && { intraDcPrecision: input.IntraDcPrecision }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MinIInterval != null && { minIInterval: input.MinIInterval }), - ...(input.NumberBFramesBetweenReferenceFrames != null && { - numberBFramesBetweenReferenceFrames: input.NumberBFramesBetweenReferenceFrames, - }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.ScanTypeConversionMode != null && { scanTypeConversionMode: input.ScanTypeConversionMode }), - ...(input.SceneChangeDetect != null && { sceneChangeDetect: input.SceneChangeDetect }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.Softness != null && { softness: input.Softness }), - ...(input.SpatialAdaptiveQuantization != null && { - spatialAdaptiveQuantization: input.SpatialAdaptiveQuantization, - }), - ...(input.Syntax != null && { syntax: input.Syntax }), - ...(input.Telecine != null && { telecine: input.Telecine }), - ...(input.TemporalAdaptiveQuantization != null && { - temporalAdaptiveQuantization: input.TemporalAdaptiveQuantization, - }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + bitrate: [, , `Bitrate`], + codecLevel: [, , `CodecLevel`], + codecProfile: [, , `CodecProfile`], + dynamicSubGop: [, , `DynamicSubGop`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopClosedCadence: [, , `GopClosedCadence`], + gopSize: [, __serializeFloat, `GopSize`], + gopSizeUnits: [, , `GopSizeUnits`], + hrdBufferFinalFillPercentage: [, , `HrdBufferFinalFillPercentage`], + hrdBufferInitialFillPercentage: [, , `HrdBufferInitialFillPercentage`], + hrdBufferSize: [, , `HrdBufferSize`], + interlaceMode: [, , `InterlaceMode`], + intraDcPrecision: [, , `IntraDcPrecision`], + maxBitrate: [, , `MaxBitrate`], + minIInterval: [, , `MinIInterval`], + numberBFramesBetweenReferenceFrames: [, , `NumberBFramesBetweenReferenceFrames`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + qualityTuningLevel: [, , `QualityTuningLevel`], + rateControlMode: [, , `RateControlMode`], + scanTypeConversionMode: [, , `ScanTypeConversionMode`], + sceneChangeDetect: [, , `SceneChangeDetect`], + slowPal: [, , `SlowPal`], + softness: [, , `Softness`], + spatialAdaptiveQuantization: [, , `SpatialAdaptiveQuantization`], + syntax: [, , `Syntax`], + telecine: [, , `Telecine`], + temporalAdaptiveQuantization: [, , `TemporalAdaptiveQuantization`], + }); }; /** * serializeAws_restJson1MsSmoothAdditionalManifest */ const se_MsSmoothAdditionalManifest = (input: MsSmoothAdditionalManifest, context: __SerdeContext): any => { - return { - ...(input.ManifestNameModifier != null && { manifestNameModifier: input.ManifestNameModifier }), - ...(input.SelectedOutputs != null && { selectedOutputs: se___listOf__stringMin1(input.SelectedOutputs, context) }), - }; + return take(input, { + manifestNameModifier: [, , `ManifestNameModifier`], + selectedOutputs: [, _json, `SelectedOutputs`], + }); }; /** * serializeAws_restJson1MsSmoothEncryptionSettings */ const se_MsSmoothEncryptionSettings = (input: MsSmoothEncryptionSettings, context: __SerdeContext): any => { - return { - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1MsSmoothGroupSettings */ const se_MsSmoothGroupSettings = (input: MsSmoothGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AdditionalManifests != null && { - additionalManifests: se___listOfMsSmoothAdditionalManifest(input.AdditionalManifests, context), - }), - ...(input.AudioDeduplication != null && { audioDeduplication: input.AudioDeduplication }), - ...(input.Destination != null && { destination: input.Destination }), - ...(input.DestinationSettings != null && { - destinationSettings: se_DestinationSettings(input.DestinationSettings, context), - }), - ...(input.Encryption != null && { encryption: se_MsSmoothEncryptionSettings(input.Encryption, context) }), - ...(input.FragmentLength != null && { fragmentLength: input.FragmentLength }), - ...(input.FragmentLengthControl != null && { fragmentLengthControl: input.FragmentLengthControl }), - ...(input.ManifestEncoding != null && { manifestEncoding: input.ManifestEncoding }), - }; + return take(input, { + additionalManifests: [, (_) => se___listOfMsSmoothAdditionalManifest(_, context), `AdditionalManifests`], + audioDeduplication: [, , `AudioDeduplication`], + destination: [, , `Destination`], + destinationSettings: [, (_) => se_DestinationSettings(_, context), `DestinationSettings`], + encryption: [, (_) => se_MsSmoothEncryptionSettings(_, context), `Encryption`], + fragmentLength: [, , `FragmentLength`], + fragmentLengthControl: [, , `FragmentLengthControl`], + manifestEncoding: [, , `ManifestEncoding`], + }); }; /** * serializeAws_restJson1MxfSettings */ const se_MxfSettings = (input: MxfSettings, context: __SerdeContext): any => { - return { - ...(input.AfdSignaling != null && { afdSignaling: input.AfdSignaling }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.XavcProfileSettings != null && { - xavcProfileSettings: se_MxfXavcProfileSettings(input.XavcProfileSettings, context), - }), - }; + return take(input, { + afdSignaling: [, , `AfdSignaling`], + profile: [, , `Profile`], + xavcProfileSettings: [, (_) => se_MxfXavcProfileSettings(_, context), `XavcProfileSettings`], + }); }; /** * serializeAws_restJson1MxfXavcProfileSettings */ const se_MxfXavcProfileSettings = (input: MxfXavcProfileSettings, context: __SerdeContext): any => { - return { - ...(input.DurationMode != null && { durationMode: input.DurationMode }), - ...(input.MaxAncDataSize != null && { maxAncDataSize: input.MaxAncDataSize }), - }; + return take(input, { + durationMode: [, , `DurationMode`], + maxAncDataSize: [, , `MaxAncDataSize`], + }); }; /** * serializeAws_restJson1NexGuardFileMarkerSettings */ const se_NexGuardFileMarkerSettings = (input: NexGuardFileMarkerSettings, context: __SerdeContext): any => { - return { - ...(input.License != null && { license: input.License }), - ...(input.Payload != null && { payload: input.Payload }), - ...(input.Preset != null && { preset: input.Preset }), - ...(input.Strength != null && { strength: input.Strength }), - }; + return take(input, { + license: [, , `License`], + payload: [, , `Payload`], + preset: [, , `Preset`], + strength: [, , `Strength`], + }); }; /** * serializeAws_restJson1NielsenConfiguration */ const se_NielsenConfiguration = (input: NielsenConfiguration, context: __SerdeContext): any => { - return { - ...(input.BreakoutCode != null && { breakoutCode: input.BreakoutCode }), - ...(input.DistributorId != null && { distributorId: input.DistributorId }), - }; + return take(input, { + breakoutCode: [, , `BreakoutCode`], + distributorId: [, , `DistributorId`], + }); }; /** @@ -5220,46 +4879,40 @@ const se_NielsenNonLinearWatermarkSettings = ( input: NielsenNonLinearWatermarkSettings, context: __SerdeContext ): any => { - return { - ...(input.ActiveWatermarkProcess != null && { activeWatermarkProcess: input.ActiveWatermarkProcess }), - ...(input.AdiFilename != null && { adiFilename: input.AdiFilename }), - ...(input.AssetId != null && { assetId: input.AssetId }), - ...(input.AssetName != null && { assetName: input.AssetName }), - ...(input.CbetSourceId != null && { cbetSourceId: input.CbetSourceId }), - ...(input.EpisodeId != null && { episodeId: input.EpisodeId }), - ...(input.MetadataDestination != null && { metadataDestination: input.MetadataDestination }), - ...(input.SourceId != null && { sourceId: input.SourceId }), - ...(input.SourceWatermarkStatus != null && { sourceWatermarkStatus: input.SourceWatermarkStatus }), - ...(input.TicServerUrl != null && { ticServerUrl: input.TicServerUrl }), - ...(input.UniqueTicPerAudioTrack != null && { uniqueTicPerAudioTrack: input.UniqueTicPerAudioTrack }), - }; + return take(input, { + activeWatermarkProcess: [, , `ActiveWatermarkProcess`], + adiFilename: [, , `AdiFilename`], + assetId: [, , `AssetId`], + assetName: [, , `AssetName`], + cbetSourceId: [, , `CbetSourceId`], + episodeId: [, , `EpisodeId`], + metadataDestination: [, , `MetadataDestination`], + sourceId: [, , `SourceId`], + sourceWatermarkStatus: [, , `SourceWatermarkStatus`], + ticServerUrl: [, , `TicServerUrl`], + uniqueTicPerAudioTrack: [, , `UniqueTicPerAudioTrack`], + }); }; /** * serializeAws_restJson1NoiseReducer */ const se_NoiseReducer = (input: NoiseReducer, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { filter: input.Filter }), - ...(input.FilterSettings != null && { - filterSettings: se_NoiseReducerFilterSettings(input.FilterSettings, context), - }), - ...(input.SpatialFilterSettings != null && { - spatialFilterSettings: se_NoiseReducerSpatialFilterSettings(input.SpatialFilterSettings, context), - }), - ...(input.TemporalFilterSettings != null && { - temporalFilterSettings: se_NoiseReducerTemporalFilterSettings(input.TemporalFilterSettings, context), - }), - }; + return take(input, { + filter: [, , `Filter`], + filterSettings: [, (_) => se_NoiseReducerFilterSettings(_, context), `FilterSettings`], + spatialFilterSettings: [, (_) => se_NoiseReducerSpatialFilterSettings(_, context), `SpatialFilterSettings`], + temporalFilterSettings: [, (_) => se_NoiseReducerTemporalFilterSettings(_, context), `TemporalFilterSettings`], + }); }; /** * serializeAws_restJson1NoiseReducerFilterSettings */ const se_NoiseReducerFilterSettings = (input: NoiseReducerFilterSettings, context: __SerdeContext): any => { - return { - ...(input.Strength != null && { strength: input.Strength }), - }; + return take(input, { + strength: [, , `Strength`], + }); }; /** @@ -5269,11 +4922,11 @@ const se_NoiseReducerSpatialFilterSettings = ( input: NoiseReducerSpatialFilterSettings, context: __SerdeContext ): any => { - return { - ...(input.PostFilterSharpenStrength != null && { postFilterSharpenStrength: input.PostFilterSharpenStrength }), - ...(input.Speed != null && { speed: input.Speed }), - ...(input.Strength != null && { strength: input.Strength }), - }; + return take(input, { + postFilterSharpenStrength: [, , `PostFilterSharpenStrength`], + speed: [, , `Speed`], + strength: [, , `Strength`], + }); }; /** @@ -5283,669 +4936,603 @@ const se_NoiseReducerTemporalFilterSettings = ( input: NoiseReducerTemporalFilterSettings, context: __SerdeContext ): any => { - return { - ...(input.AggressiveMode != null && { aggressiveMode: input.AggressiveMode }), - ...(input.PostTemporalSharpening != null && { postTemporalSharpening: input.PostTemporalSharpening }), - ...(input.PostTemporalSharpeningStrength != null && { - postTemporalSharpeningStrength: input.PostTemporalSharpeningStrength, - }), - ...(input.Speed != null && { speed: input.Speed }), - ...(input.Strength != null && { strength: input.Strength }), - }; + return take(input, { + aggressiveMode: [, , `AggressiveMode`], + postTemporalSharpening: [, , `PostTemporalSharpening`], + postTemporalSharpeningStrength: [, , `PostTemporalSharpeningStrength`], + speed: [, , `Speed`], + strength: [, , `Strength`], + }); }; /** * serializeAws_restJson1OpusSettings */ const se_OpusSettings = (input: OpusSettings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.Channels != null && { channels: input.Channels }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + channels: [, , `Channels`], + sampleRate: [, , `SampleRate`], + }); }; /** * serializeAws_restJson1Output */ const se_Output = (input: Output, context: __SerdeContext): any => { - return { - ...(input.AudioDescriptions != null && { - audioDescriptions: se___listOfAudioDescription(input.AudioDescriptions, context), - }), - ...(input.CaptionDescriptions != null && { - captionDescriptions: se___listOfCaptionDescription(input.CaptionDescriptions, context), - }), - ...(input.ContainerSettings != null && { - containerSettings: se_ContainerSettings(input.ContainerSettings, context), - }), - ...(input.Extension != null && { extension: input.Extension }), - ...(input.NameModifier != null && { nameModifier: input.NameModifier }), - ...(input.OutputSettings != null && { outputSettings: se_OutputSettings(input.OutputSettings, context) }), - ...(input.Preset != null && { preset: input.Preset }), - ...(input.VideoDescription != null && { videoDescription: se_VideoDescription(input.VideoDescription, context) }), - }; + return take(input, { + audioDescriptions: [, (_) => se___listOfAudioDescription(_, context), `AudioDescriptions`], + captionDescriptions: [, (_) => se___listOfCaptionDescription(_, context), `CaptionDescriptions`], + containerSettings: [, (_) => se_ContainerSettings(_, context), `ContainerSettings`], + extension: [, , `Extension`], + nameModifier: [, , `NameModifier`], + outputSettings: [, (_) => se_OutputSettings(_, context), `OutputSettings`], + preset: [, , `Preset`], + videoDescription: [, (_) => se_VideoDescription(_, context), `VideoDescription`], + }); }; /** * serializeAws_restJson1OutputChannelMapping */ const se_OutputChannelMapping = (input: OutputChannelMapping, context: __SerdeContext): any => { - return { - ...(input.InputChannels != null && { - inputChannels: se___listOf__integerMinNegative60Max6(input.InputChannels, context), - }), - ...(input.InputChannelsFineTune != null && { - inputChannelsFineTune: se___listOf__doubleMinNegative60Max6(input.InputChannelsFineTune, context), - }), - }; + return take(input, { + inputChannels: [, _json, `InputChannels`], + inputChannelsFineTune: [, (_) => se___listOf__doubleMinNegative60Max6(_, context), `InputChannelsFineTune`], + }); }; /** * serializeAws_restJson1OutputGroup */ const se_OutputGroup = (input: OutputGroup, context: __SerdeContext): any => { - return { - ...(input.AutomatedEncodingSettings != null && { - automatedEncodingSettings: se_AutomatedEncodingSettings(input.AutomatedEncodingSettings, context), - }), - ...(input.CustomName != null && { customName: input.CustomName }), - ...(input.Name != null && { name: input.Name }), - ...(input.OutputGroupSettings != null && { - outputGroupSettings: se_OutputGroupSettings(input.OutputGroupSettings, context), - }), - ...(input.Outputs != null && { outputs: se___listOfOutput(input.Outputs, context) }), - }; + return take(input, { + automatedEncodingSettings: [, (_) => se_AutomatedEncodingSettings(_, context), `AutomatedEncodingSettings`], + customName: [, , `CustomName`], + name: [, , `Name`], + outputGroupSettings: [, (_) => se_OutputGroupSettings(_, context), `OutputGroupSettings`], + outputs: [, (_) => se___listOfOutput(_, context), `Outputs`], + }); }; /** * serializeAws_restJson1OutputGroupSettings */ const se_OutputGroupSettings = (input: OutputGroupSettings, context: __SerdeContext): any => { - return { - ...(input.CmafGroupSettings != null && { - cmafGroupSettings: se_CmafGroupSettings(input.CmafGroupSettings, context), - }), - ...(input.DashIsoGroupSettings != null && { - dashIsoGroupSettings: se_DashIsoGroupSettings(input.DashIsoGroupSettings, context), - }), - ...(input.FileGroupSettings != null && { - fileGroupSettings: se_FileGroupSettings(input.FileGroupSettings, context), - }), - ...(input.HlsGroupSettings != null && { hlsGroupSettings: se_HlsGroupSettings(input.HlsGroupSettings, context) }), - ...(input.MsSmoothGroupSettings != null && { - msSmoothGroupSettings: se_MsSmoothGroupSettings(input.MsSmoothGroupSettings, context), - }), - ...(input.Type != null && { type: input.Type }), - }; + return take(input, { + cmafGroupSettings: [, (_) => se_CmafGroupSettings(_, context), `CmafGroupSettings`], + dashIsoGroupSettings: [, (_) => se_DashIsoGroupSettings(_, context), `DashIsoGroupSettings`], + fileGroupSettings: [, (_) => se_FileGroupSettings(_, context), `FileGroupSettings`], + hlsGroupSettings: [, (_) => se_HlsGroupSettings(_, context), `HlsGroupSettings`], + msSmoothGroupSettings: [, (_) => se_MsSmoothGroupSettings(_, context), `MsSmoothGroupSettings`], + type: [, , `Type`], + }); }; /** * serializeAws_restJson1OutputSettings */ const se_OutputSettings = (input: OutputSettings, context: __SerdeContext): any => { - return { - ...(input.HlsSettings != null && { hlsSettings: se_HlsSettings(input.HlsSettings, context) }), - }; + return take(input, { + hlsSettings: [, (_) => se_HlsSettings(_, context), `HlsSettings`], + }); }; /** * serializeAws_restJson1PartnerWatermarking */ const se_PartnerWatermarking = (input: PartnerWatermarking, context: __SerdeContext): any => { - return { - ...(input.NexguardFileMarkerSettings != null && { - nexguardFileMarkerSettings: se_NexGuardFileMarkerSettings(input.NexguardFileMarkerSettings, context), - }), - }; + return take(input, { + nexguardFileMarkerSettings: [, (_) => se_NexGuardFileMarkerSettings(_, context), `NexguardFileMarkerSettings`], + }); }; /** * serializeAws_restJson1Policy */ const se_Policy = (input: Policy, context: __SerdeContext): any => { - return { - ...(input.HttpInputs != null && { httpInputs: input.HttpInputs }), - ...(input.HttpsInputs != null && { httpsInputs: input.HttpsInputs }), - ...(input.S3Inputs != null && { s3Inputs: input.S3Inputs }), - }; + return take(input, { + httpInputs: [, , `HttpInputs`], + httpsInputs: [, , `HttpsInputs`], + s3Inputs: [, , `S3Inputs`], + }); }; /** * serializeAws_restJson1PresetSettings */ const se_PresetSettings = (input: PresetSettings, context: __SerdeContext): any => { - return { - ...(input.AudioDescriptions != null && { - audioDescriptions: se___listOfAudioDescription(input.AudioDescriptions, context), - }), - ...(input.CaptionDescriptions != null && { - captionDescriptions: se___listOfCaptionDescriptionPreset(input.CaptionDescriptions, context), - }), - ...(input.ContainerSettings != null && { - containerSettings: se_ContainerSettings(input.ContainerSettings, context), - }), - ...(input.VideoDescription != null && { videoDescription: se_VideoDescription(input.VideoDescription, context) }), - }; + return take(input, { + audioDescriptions: [, (_) => se___listOfAudioDescription(_, context), `AudioDescriptions`], + captionDescriptions: [, (_) => se___listOfCaptionDescriptionPreset(_, context), `CaptionDescriptions`], + containerSettings: [, (_) => se_ContainerSettings(_, context), `ContainerSettings`], + videoDescription: [, (_) => se_VideoDescription(_, context), `VideoDescription`], + }); }; /** * serializeAws_restJson1ProresSettings */ const se_ProresSettings = (input: ProresSettings, context: __SerdeContext): any => { - return { - ...(input.ChromaSampling != null && { chromaSampling: input.ChromaSampling }), - ...(input.CodecProfile != null && { codecProfile: input.CodecProfile }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.ScanTypeConversionMode != null && { scanTypeConversionMode: input.ScanTypeConversionMode }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.Telecine != null && { telecine: input.Telecine }), - }; + return take(input, { + chromaSampling: [, , `ChromaSampling`], + codecProfile: [, , `CodecProfile`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + interlaceMode: [, , `InterlaceMode`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + scanTypeConversionMode: [, , `ScanTypeConversionMode`], + slowPal: [, , `SlowPal`], + telecine: [, , `Telecine`], + }); }; /** * serializeAws_restJson1Rectangle */ const se_Rectangle = (input: Rectangle, context: __SerdeContext): any => { - return { - ...(input.Height != null && { height: input.Height }), - ...(input.Width != null && { width: input.Width }), - ...(input.X != null && { x: input.X }), - ...(input.Y != null && { y: input.Y }), - }; + return take(input, { + height: [, , `Height`], + width: [, , `Width`], + x: [, , `X`], + y: [, , `Y`], + }); }; /** * serializeAws_restJson1RemixSettings */ const se_RemixSettings = (input: RemixSettings, context: __SerdeContext): any => { - return { - ...(input.ChannelMapping != null && { channelMapping: se_ChannelMapping(input.ChannelMapping, context) }), - ...(input.ChannelsIn != null && { channelsIn: input.ChannelsIn }), - ...(input.ChannelsOut != null && { channelsOut: input.ChannelsOut }), - }; + return take(input, { + channelMapping: [, (_) => se_ChannelMapping(_, context), `ChannelMapping`], + channelsIn: [, , `ChannelsIn`], + channelsOut: [, , `ChannelsOut`], + }); }; /** * serializeAws_restJson1ReservationPlanSettings */ const se_ReservationPlanSettings = (input: ReservationPlanSettings, context: __SerdeContext): any => { - return { - ...(input.Commitment != null && { commitment: input.Commitment }), - ...(input.RenewalType != null && { renewalType: input.RenewalType }), - ...(input.ReservedSlots != null && { reservedSlots: input.ReservedSlots }), - }; + return take(input, { + commitment: [, , `Commitment`], + renewalType: [, , `RenewalType`], + reservedSlots: [, , `ReservedSlots`], + }); }; /** * serializeAws_restJson1S3DestinationAccessControl */ const se_S3DestinationAccessControl = (input: S3DestinationAccessControl, context: __SerdeContext): any => { - return { - ...(input.CannedAcl != null && { cannedAcl: input.CannedAcl }), - }; + return take(input, { + cannedAcl: [, , `CannedAcl`], + }); }; /** * serializeAws_restJson1S3DestinationSettings */ const se_S3DestinationSettings = (input: S3DestinationSettings, context: __SerdeContext): any => { - return { - ...(input.AccessControl != null && { accessControl: se_S3DestinationAccessControl(input.AccessControl, context) }), - ...(input.Encryption != null && { encryption: se_S3EncryptionSettings(input.Encryption, context) }), - }; + return take(input, { + accessControl: [, (_) => se_S3DestinationAccessControl(_, context), `AccessControl`], + encryption: [, (_) => se_S3EncryptionSettings(_, context), `Encryption`], + }); }; /** * serializeAws_restJson1S3EncryptionSettings */ const se_S3EncryptionSettings = (input: S3EncryptionSettings, context: __SerdeContext): any => { - return { - ...(input.EncryptionType != null && { encryptionType: input.EncryptionType }), - ...(input.KmsEncryptionContext != null && { kmsEncryptionContext: input.KmsEncryptionContext }), - ...(input.KmsKeyArn != null && { kmsKeyArn: input.KmsKeyArn }), - }; + return take(input, { + encryptionType: [, , `EncryptionType`], + kmsEncryptionContext: [, , `KmsEncryptionContext`], + kmsKeyArn: [, , `KmsKeyArn`], + }); }; /** * serializeAws_restJson1SccDestinationSettings */ const se_SccDestinationSettings = (input: SccDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Framerate != null && { framerate: input.Framerate }), - }; + return take(input, { + framerate: [, , `Framerate`], + }); }; /** * serializeAws_restJson1SpekeKeyProvider */ const se_SpekeKeyProvider = (input: SpekeKeyProvider, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }), - ...(input.ResourceId != null && { resourceId: input.ResourceId }), - ...(input.SystemIds != null && { - systemIds: se___listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12(input.SystemIds, context), - }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + certificateArn: [, , `CertificateArn`], + resourceId: [, , `ResourceId`], + systemIds: [, _json, `SystemIds`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1SpekeKeyProviderCmaf */ const se_SpekeKeyProviderCmaf = (input: SpekeKeyProviderCmaf, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }), - ...(input.DashSignaledSystemIds != null && { - dashSignaledSystemIds: se___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12( - input.DashSignaledSystemIds, - context - ), - }), - ...(input.HlsSignaledSystemIds != null && { - hlsSignaledSystemIds: se___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12( - input.HlsSignaledSystemIds, - context - ), - }), - ...(input.ResourceId != null && { resourceId: input.ResourceId }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + certificateArn: [, , `CertificateArn`], + dashSignaledSystemIds: [, _json, `DashSignaledSystemIds`], + hlsSignaledSystemIds: [, _json, `HlsSignaledSystemIds`], + resourceId: [, , `ResourceId`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1SrtDestinationSettings */ const se_SrtDestinationSettings = (input: SrtDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.StylePassthrough != null && { stylePassthrough: input.StylePassthrough }), - }; + return take(input, { + stylePassthrough: [, , `StylePassthrough`], + }); }; /** * serializeAws_restJson1StaticKeyProvider */ const se_StaticKeyProvider = (input: StaticKeyProvider, context: __SerdeContext): any => { - return { - ...(input.KeyFormat != null && { keyFormat: input.KeyFormat }), - ...(input.KeyFormatVersions != null && { keyFormatVersions: input.KeyFormatVersions }), - ...(input.StaticKeyValue != null && { staticKeyValue: input.StaticKeyValue }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + keyFormat: [, , `KeyFormat`], + keyFormatVersions: [, , `KeyFormatVersions`], + staticKeyValue: [, , `StaticKeyValue`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1TeletextDestinationSettings */ const se_TeletextDestinationSettings = (input: TeletextDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.PageNumber != null && { pageNumber: input.PageNumber }), - ...(input.PageTypes != null && { pageTypes: se___listOfTeletextPageType(input.PageTypes, context) }), - }; + return take(input, { + pageNumber: [, , `PageNumber`], + pageTypes: [, _json, `PageTypes`], + }); }; /** * serializeAws_restJson1TeletextSourceSettings */ const se_TeletextSourceSettings = (input: TeletextSourceSettings, context: __SerdeContext): any => { - return { - ...(input.PageNumber != null && { pageNumber: input.PageNumber }), - }; + return take(input, { + pageNumber: [, , `PageNumber`], + }); }; /** * serializeAws_restJson1TimecodeBurnin */ const se_TimecodeBurnin = (input: TimecodeBurnin, context: __SerdeContext): any => { - return { - ...(input.FontSize != null && { fontSize: input.FontSize }), - ...(input.Position != null && { position: input.Position }), - ...(input.Prefix != null && { prefix: input.Prefix }), - }; + return take(input, { + fontSize: [, , `FontSize`], + position: [, , `Position`], + prefix: [, , `Prefix`], + }); }; /** * serializeAws_restJson1TimecodeConfig */ const se_TimecodeConfig = (input: TimecodeConfig, context: __SerdeContext): any => { - return { - ...(input.Anchor != null && { anchor: input.Anchor }), - ...(input.Source != null && { source: input.Source }), - ...(input.Start != null && { start: input.Start }), - ...(input.TimestampOffset != null && { timestampOffset: input.TimestampOffset }), - }; + return take(input, { + anchor: [, , `Anchor`], + source: [, , `Source`], + start: [, , `Start`], + timestampOffset: [, , `TimestampOffset`], + }); }; /** * serializeAws_restJson1TimedMetadataInsertion */ const se_TimedMetadataInsertion = (input: TimedMetadataInsertion, context: __SerdeContext): any => { - return { - ...(input.Id3Insertions != null && { id3Insertions: se___listOfId3Insertion(input.Id3Insertions, context) }), - }; + return take(input, { + id3Insertions: [, (_) => se___listOfId3Insertion(_, context), `Id3Insertions`], + }); }; /** * serializeAws_restJson1TrackSourceSettings */ const se_TrackSourceSettings = (input: TrackSourceSettings, context: __SerdeContext): any => { - return { - ...(input.TrackNumber != null && { trackNumber: input.TrackNumber }), - }; + return take(input, { + trackNumber: [, , `TrackNumber`], + }); }; /** * serializeAws_restJson1TtmlDestinationSettings */ const se_TtmlDestinationSettings = (input: TtmlDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.StylePassthrough != null && { stylePassthrough: input.StylePassthrough }), - }; + return take(input, { + stylePassthrough: [, , `StylePassthrough`], + }); }; /** * serializeAws_restJson1Vc3Settings */ const se_Vc3Settings = (input: Vc3Settings, context: __SerdeContext): any => { - return { - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.ScanTypeConversionMode != null && { scanTypeConversionMode: input.ScanTypeConversionMode }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.Telecine != null && { telecine: input.Telecine }), - ...(input.Vc3Class != null && { vc3Class: input.Vc3Class }), - }; + return take(input, { + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + interlaceMode: [, , `InterlaceMode`], + scanTypeConversionMode: [, , `ScanTypeConversionMode`], + slowPal: [, , `SlowPal`], + telecine: [, , `Telecine`], + vc3Class: [, , `Vc3Class`], + }); }; /** * serializeAws_restJson1VideoCodecSettings */ const se_VideoCodecSettings = (input: VideoCodecSettings, context: __SerdeContext): any => { - return { - ...(input.Av1Settings != null && { av1Settings: se_Av1Settings(input.Av1Settings, context) }), - ...(input.AvcIntraSettings != null && { avcIntraSettings: se_AvcIntraSettings(input.AvcIntraSettings, context) }), - ...(input.Codec != null && { codec: input.Codec }), - ...(input.FrameCaptureSettings != null && { - frameCaptureSettings: se_FrameCaptureSettings(input.FrameCaptureSettings, context), - }), - ...(input.H264Settings != null && { h264Settings: se_H264Settings(input.H264Settings, context) }), - ...(input.H265Settings != null && { h265Settings: se_H265Settings(input.H265Settings, context) }), - ...(input.Mpeg2Settings != null && { mpeg2Settings: se_Mpeg2Settings(input.Mpeg2Settings, context) }), - ...(input.ProresSettings != null && { proresSettings: se_ProresSettings(input.ProresSettings, context) }), - ...(input.Vc3Settings != null && { vc3Settings: se_Vc3Settings(input.Vc3Settings, context) }), - ...(input.Vp8Settings != null && { vp8Settings: se_Vp8Settings(input.Vp8Settings, context) }), - ...(input.Vp9Settings != null && { vp9Settings: se_Vp9Settings(input.Vp9Settings, context) }), - ...(input.XavcSettings != null && { xavcSettings: se_XavcSettings(input.XavcSettings, context) }), - }; + return take(input, { + av1Settings: [, (_) => se_Av1Settings(_, context), `Av1Settings`], + avcIntraSettings: [, (_) => se_AvcIntraSettings(_, context), `AvcIntraSettings`], + codec: [, , `Codec`], + frameCaptureSettings: [, (_) => se_FrameCaptureSettings(_, context), `FrameCaptureSettings`], + h264Settings: [, (_) => se_H264Settings(_, context), `H264Settings`], + h265Settings: [, (_) => se_H265Settings(_, context), `H265Settings`], + mpeg2Settings: [, (_) => se_Mpeg2Settings(_, context), `Mpeg2Settings`], + proresSettings: [, (_) => se_ProresSettings(_, context), `ProresSettings`], + vc3Settings: [, (_) => se_Vc3Settings(_, context), `Vc3Settings`], + vp8Settings: [, (_) => se_Vp8Settings(_, context), `Vp8Settings`], + vp9Settings: [, (_) => se_Vp9Settings(_, context), `Vp9Settings`], + xavcSettings: [, (_) => se_XavcSettings(_, context), `XavcSettings`], + }); }; /** * serializeAws_restJson1VideoDescription */ const se_VideoDescription = (input: VideoDescription, context: __SerdeContext): any => { - return { - ...(input.AfdSignaling != null && { afdSignaling: input.AfdSignaling }), - ...(input.AntiAlias != null && { antiAlias: input.AntiAlias }), - ...(input.CodecSettings != null && { codecSettings: se_VideoCodecSettings(input.CodecSettings, context) }), - ...(input.ColorMetadata != null && { colorMetadata: input.ColorMetadata }), - ...(input.Crop != null && { crop: se_Rectangle(input.Crop, context) }), - ...(input.DropFrameTimecode != null && { dropFrameTimecode: input.DropFrameTimecode }), - ...(input.FixedAfd != null && { fixedAfd: input.FixedAfd }), - ...(input.Height != null && { height: input.Height }), - ...(input.Position != null && { position: se_Rectangle(input.Position, context) }), - ...(input.RespondToAfd != null && { respondToAfd: input.RespondToAfd }), - ...(input.ScalingBehavior != null && { scalingBehavior: input.ScalingBehavior }), - ...(input.Sharpness != null && { sharpness: input.Sharpness }), - ...(input.TimecodeInsertion != null && { timecodeInsertion: input.TimecodeInsertion }), - ...(input.VideoPreprocessors != null && { - videoPreprocessors: se_VideoPreprocessor(input.VideoPreprocessors, context), - }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + afdSignaling: [, , `AfdSignaling`], + antiAlias: [, , `AntiAlias`], + codecSettings: [, (_) => se_VideoCodecSettings(_, context), `CodecSettings`], + colorMetadata: [, , `ColorMetadata`], + crop: [, (_) => se_Rectangle(_, context), `Crop`], + dropFrameTimecode: [, , `DropFrameTimecode`], + fixedAfd: [, , `FixedAfd`], + height: [, , `Height`], + position: [, (_) => se_Rectangle(_, context), `Position`], + respondToAfd: [, , `RespondToAfd`], + scalingBehavior: [, , `ScalingBehavior`], + sharpness: [, , `Sharpness`], + timecodeInsertion: [, , `TimecodeInsertion`], + videoPreprocessors: [, (_) => se_VideoPreprocessor(_, context), `VideoPreprocessors`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1VideoPreprocessor */ const se_VideoPreprocessor = (input: VideoPreprocessor, context: __SerdeContext): any => { - return { - ...(input.ColorCorrector != null && { colorCorrector: se_ColorCorrector(input.ColorCorrector, context) }), - ...(input.Deinterlacer != null && { deinterlacer: se_Deinterlacer(input.Deinterlacer, context) }), - ...(input.DolbyVision != null && { dolbyVision: se_DolbyVision(input.DolbyVision, context) }), - ...(input.Hdr10Plus != null && { hdr10Plus: se_Hdr10Plus(input.Hdr10Plus, context) }), - ...(input.ImageInserter != null && { imageInserter: se_ImageInserter(input.ImageInserter, context) }), - ...(input.NoiseReducer != null && { noiseReducer: se_NoiseReducer(input.NoiseReducer, context) }), - ...(input.PartnerWatermarking != null && { - partnerWatermarking: se_PartnerWatermarking(input.PartnerWatermarking, context), - }), - ...(input.TimecodeBurnin != null && { timecodeBurnin: se_TimecodeBurnin(input.TimecodeBurnin, context) }), - }; + return take(input, { + colorCorrector: [, (_) => se_ColorCorrector(_, context), `ColorCorrector`], + deinterlacer: [, (_) => se_Deinterlacer(_, context), `Deinterlacer`], + dolbyVision: [, (_) => se_DolbyVision(_, context), `DolbyVision`], + hdr10Plus: [, (_) => se_Hdr10Plus(_, context), `Hdr10Plus`], + imageInserter: [, (_) => se_ImageInserter(_, context), `ImageInserter`], + noiseReducer: [, (_) => se_NoiseReducer(_, context), `NoiseReducer`], + partnerWatermarking: [, (_) => se_PartnerWatermarking(_, context), `PartnerWatermarking`], + timecodeBurnin: [, (_) => se_TimecodeBurnin(_, context), `TimecodeBurnin`], + }); }; /** * serializeAws_restJson1VideoSelector */ const se_VideoSelector = (input: VideoSelector, context: __SerdeContext): any => { - return { - ...(input.AlphaBehavior != null && { alphaBehavior: input.AlphaBehavior }), - ...(input.ColorSpace != null && { colorSpace: input.ColorSpace }), - ...(input.ColorSpaceUsage != null && { colorSpaceUsage: input.ColorSpaceUsage }), - ...(input.EmbeddedTimecodeOverride != null && { embeddedTimecodeOverride: input.EmbeddedTimecodeOverride }), - ...(input.Hdr10Metadata != null && { hdr10Metadata: se_Hdr10Metadata(input.Hdr10Metadata, context) }), - ...(input.PadVideo != null && { padVideo: input.PadVideo }), - ...(input.Pid != null && { pid: input.Pid }), - ...(input.ProgramNumber != null && { programNumber: input.ProgramNumber }), - ...(input.Rotate != null && { rotate: input.Rotate }), - ...(input.SampleRange != null && { sampleRange: input.SampleRange }), - }; + return take(input, { + alphaBehavior: [, , `AlphaBehavior`], + colorSpace: [, , `ColorSpace`], + colorSpaceUsage: [, , `ColorSpaceUsage`], + embeddedTimecodeOverride: [, , `EmbeddedTimecodeOverride`], + hdr10Metadata: [, (_) => se_Hdr10Metadata(_, context), `Hdr10Metadata`], + padVideo: [, , `PadVideo`], + pid: [, , `Pid`], + programNumber: [, , `ProgramNumber`], + rotate: [, , `Rotate`], + sampleRange: [, , `SampleRange`], + }); }; /** * serializeAws_restJson1VorbisSettings */ const se_VorbisSettings = (input: VorbisSettings, context: __SerdeContext): any => { - return { - ...(input.Channels != null && { channels: input.Channels }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - ...(input.VbrQuality != null && { vbrQuality: input.VbrQuality }), - }; + return take(input, { + channels: [, , `Channels`], + sampleRate: [, , `SampleRate`], + vbrQuality: [, , `VbrQuality`], + }); }; /** * serializeAws_restJson1Vp8Settings */ const se_Vp8Settings = (input: Vp8Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopSize: [, __serializeFloat, `GopSize`], + hrdBufferSize: [, , `HrdBufferSize`], + maxBitrate: [, , `MaxBitrate`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + qualityTuningLevel: [, , `QualityTuningLevel`], + rateControlMode: [, , `RateControlMode`], + }); }; /** * serializeAws_restJson1Vp9Settings */ const se_Vp9Settings = (input: Vp9Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - }; + return take(input, { + bitrate: [, , `Bitrate`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopSize: [, __serializeFloat, `GopSize`], + hrdBufferSize: [, , `HrdBufferSize`], + maxBitrate: [, , `MaxBitrate`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + qualityTuningLevel: [, , `QualityTuningLevel`], + rateControlMode: [, , `RateControlMode`], + }); }; /** * serializeAws_restJson1WavSettings */ const se_WavSettings = (input: WavSettings, context: __SerdeContext): any => { - return { - ...(input.BitDepth != null && { bitDepth: input.BitDepth }), - ...(input.Channels != null && { channels: input.Channels }), - ...(input.Format != null && { format: input.Format }), - ...(input.SampleRate != null && { sampleRate: input.SampleRate }), - }; + return take(input, { + bitDepth: [, , `BitDepth`], + channels: [, , `Channels`], + format: [, , `Format`], + sampleRate: [, , `SampleRate`], + }); }; /** * serializeAws_restJson1WebvttDestinationSettings */ const se_WebvttDestinationSettings = (input: WebvttDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Accessibility != null && { accessibility: input.Accessibility }), - ...(input.StylePassthrough != null && { stylePassthrough: input.StylePassthrough }), - }; + return take(input, { + accessibility: [, , `Accessibility`], + stylePassthrough: [, , `StylePassthrough`], + }); }; /** * serializeAws_restJson1WebvttHlsSourceSettings */ const se_WebvttHlsSourceSettings = (input: WebvttHlsSourceSettings, context: __SerdeContext): any => { - return { - ...(input.RenditionGroupId != null && { renditionGroupId: input.RenditionGroupId }), - ...(input.RenditionLanguageCode != null && { renditionLanguageCode: input.RenditionLanguageCode }), - ...(input.RenditionName != null && { renditionName: input.RenditionName }), - }; + return take(input, { + renditionGroupId: [, , `RenditionGroupId`], + renditionLanguageCode: [, , `RenditionLanguageCode`], + renditionName: [, , `RenditionName`], + }); }; /** * serializeAws_restJson1Xavc4kIntraCbgProfileSettings */ const se_Xavc4kIntraCbgProfileSettings = (input: Xavc4kIntraCbgProfileSettings, context: __SerdeContext): any => { - return { - ...(input.XavcClass != null && { xavcClass: input.XavcClass }), - }; + return take(input, { + xavcClass: [, , `XavcClass`], + }); }; /** * serializeAws_restJson1Xavc4kIntraVbrProfileSettings */ const se_Xavc4kIntraVbrProfileSettings = (input: Xavc4kIntraVbrProfileSettings, context: __SerdeContext): any => { - return { - ...(input.XavcClass != null && { xavcClass: input.XavcClass }), - }; + return take(input, { + xavcClass: [, , `XavcClass`], + }); }; /** * serializeAws_restJson1Xavc4kProfileSettings */ const se_Xavc4kProfileSettings = (input: Xavc4kProfileSettings, context: __SerdeContext): any => { - return { - ...(input.BitrateClass != null && { bitrateClass: input.BitrateClass }), - ...(input.CodecProfile != null && { codecProfile: input.CodecProfile }), - ...(input.FlickerAdaptiveQuantization != null && { - flickerAdaptiveQuantization: input.FlickerAdaptiveQuantization, - }), - ...(input.GopBReference != null && { gopBReference: input.GopBReference }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.Slices != null && { slices: input.Slices }), - }; + return take(input, { + bitrateClass: [, , `BitrateClass`], + codecProfile: [, , `CodecProfile`], + flickerAdaptiveQuantization: [, , `FlickerAdaptiveQuantization`], + gopBReference: [, , `GopBReference`], + gopClosedCadence: [, , `GopClosedCadence`], + hrdBufferSize: [, , `HrdBufferSize`], + qualityTuningLevel: [, , `QualityTuningLevel`], + slices: [, , `Slices`], + }); }; /** * serializeAws_restJson1XavcHdIntraCbgProfileSettings */ const se_XavcHdIntraCbgProfileSettings = (input: XavcHdIntraCbgProfileSettings, context: __SerdeContext): any => { - return { - ...(input.XavcClass != null && { xavcClass: input.XavcClass }), - }; + return take(input, { + xavcClass: [, , `XavcClass`], + }); }; /** * serializeAws_restJson1XavcHdProfileSettings */ const se_XavcHdProfileSettings = (input: XavcHdProfileSettings, context: __SerdeContext): any => { - return { - ...(input.BitrateClass != null && { bitrateClass: input.BitrateClass }), - ...(input.FlickerAdaptiveQuantization != null && { - flickerAdaptiveQuantization: input.FlickerAdaptiveQuantization, - }), - ...(input.GopBReference != null && { gopBReference: input.GopBReference }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.HrdBufferSize != null && { hrdBufferSize: input.HrdBufferSize }), - ...(input.InterlaceMode != null && { interlaceMode: input.InterlaceMode }), - ...(input.QualityTuningLevel != null && { qualityTuningLevel: input.QualityTuningLevel }), - ...(input.Slices != null && { slices: input.Slices }), - ...(input.Telecine != null && { telecine: input.Telecine }), - }; + return take(input, { + bitrateClass: [, , `BitrateClass`], + flickerAdaptiveQuantization: [, , `FlickerAdaptiveQuantization`], + gopBReference: [, , `GopBReference`], + gopClosedCadence: [, , `GopClosedCadence`], + hrdBufferSize: [, , `HrdBufferSize`], + interlaceMode: [, , `InterlaceMode`], + qualityTuningLevel: [, , `QualityTuningLevel`], + slices: [, , `Slices`], + telecine: [, , `Telecine`], + }); }; /** * serializeAws_restJson1XavcSettings */ const se_XavcSettings = (input: XavcSettings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.EntropyEncoding != null && { entropyEncoding: input.EntropyEncoding }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateConversionAlgorithm != null && { - framerateConversionAlgorithm: input.FramerateConversionAlgorithm, - }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.SlowPal != null && { slowPal: input.SlowPal }), - ...(input.Softness != null && { softness: input.Softness }), - ...(input.SpatialAdaptiveQuantization != null && { - spatialAdaptiveQuantization: input.SpatialAdaptiveQuantization, - }), - ...(input.TemporalAdaptiveQuantization != null && { - temporalAdaptiveQuantization: input.TemporalAdaptiveQuantization, - }), - ...(input.Xavc4kIntraCbgProfileSettings != null && { - xavc4kIntraCbgProfileSettings: se_Xavc4kIntraCbgProfileSettings(input.Xavc4kIntraCbgProfileSettings, context), - }), - ...(input.Xavc4kIntraVbrProfileSettings != null && { - xavc4kIntraVbrProfileSettings: se_Xavc4kIntraVbrProfileSettings(input.Xavc4kIntraVbrProfileSettings, context), - }), - ...(input.Xavc4kProfileSettings != null && { - xavc4kProfileSettings: se_Xavc4kProfileSettings(input.Xavc4kProfileSettings, context), - }), - ...(input.XavcHdIntraCbgProfileSettings != null && { - xavcHdIntraCbgProfileSettings: se_XavcHdIntraCbgProfileSettings(input.XavcHdIntraCbgProfileSettings, context), - }), - ...(input.XavcHdProfileSettings != null && { - xavcHdProfileSettings: se_XavcHdProfileSettings(input.XavcHdProfileSettings, context), - }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + entropyEncoding: [, , `EntropyEncoding`], + framerateControl: [, , `FramerateControl`], + framerateConversionAlgorithm: [, , `FramerateConversionAlgorithm`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + profile: [, , `Profile`], + slowPal: [, , `SlowPal`], + softness: [, , `Softness`], + spatialAdaptiveQuantization: [, , `SpatialAdaptiveQuantization`], + temporalAdaptiveQuantization: [, , `TemporalAdaptiveQuantization`], + xavc4kIntraCbgProfileSettings: [ + , + (_) => se_Xavc4kIntraCbgProfileSettings(_, context), + `Xavc4kIntraCbgProfileSettings`, + ], + xavc4kIntraVbrProfileSettings: [ + , + (_) => se_Xavc4kIntraVbrProfileSettings(_, context), + `Xavc4kIntraVbrProfileSettings`, + ], + xavc4kProfileSettings: [, (_) => se_Xavc4kProfileSettings(_, context), `Xavc4kProfileSettings`], + xavcHdIntraCbgProfileSettings: [ + , + (_) => se_XavcHdIntraCbgProfileSettings(_, context), + `XavcHdIntraCbgProfileSettings`, + ], + xavcHdProfileSettings: [, (_) => se_XavcHdProfileSettings(_, context), `XavcHdProfileSettings`], + }); }; /** @@ -5955,139 +5542,26 @@ const de___listOf__doubleMinNegative60Max6 = (output: any, context: __SerdeConte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_restJson1__listOf__integerMin1Max2147483647 - */ -const de___listOf__integerMin1Max2147483647 = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de___listOf__integerMin1Max2147483647 omitted. -/** - * deserializeAws_restJson1__listOf__integerMin32Max8182 - */ -const de___listOf__integerMin32Max8182 = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de___listOf__integerMin32Max8182 omitted. -/** - * deserializeAws_restJson1__listOf__integerMinNegative60Max6 - */ -const de___listOf__integerMinNegative60Max6 = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de___listOf__integerMinNegative60Max6 omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. -/** - * deserializeAws_restJson1__listOf__stringMin1 - */ -const de___listOf__stringMin1 = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__stringMin1 omitted. -/** - * deserializeAws_restJson1__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 - */ -const de___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 = ( - output: any, - context: __SerdeContext -): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12 omitted. -/** - * deserializeAws_restJson1__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 - */ -const de___listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 = ( - output: any, - context: __SerdeContext -): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12 omitted. -/** - * deserializeAws_restJson1__listOf__stringPatternS3ASSETMAPXml - */ -const de___listOf__stringPatternS3ASSETMAPXml = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__stringPatternS3ASSETMAPXml omitted. /** * deserializeAws_restJson1__listOfAllowedRenditionSize @@ -6096,9 +5570,6 @@ const de___listOfAllowedRenditionSize = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AllowedRenditionSize(entry, context); }); return retVal; @@ -6111,9 +5582,6 @@ const de___listOfAudioDescription = (output: any, context: __SerdeContext): Audi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AudioDescription(entry, context); }); return retVal; @@ -6126,9 +5594,6 @@ const de___listOfAutomatedAbrRule = (output: any, context: __SerdeContext): Auto const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutomatedAbrRule(entry, context); }); return retVal; @@ -6141,9 +5606,6 @@ const de___listOfCaptionDescription = (output: any, context: __SerdeContext): Ca const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CaptionDescription(entry, context); }); return retVal; @@ -6156,9 +5618,6 @@ const de___listOfCaptionDescriptionPreset = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CaptionDescriptionPreset(entry, context); }); return retVal; @@ -6171,9 +5630,6 @@ const de___listOfCmafAdditionalManifest = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CmafAdditionalManifest(entry, context); }); return retVal; @@ -6186,9 +5642,6 @@ const de___listOfDashAdditionalManifest = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DashAdditionalManifest(entry, context); }); return retVal; @@ -6201,9 +5654,6 @@ const de___listOfEndpoint = (output: any, context: __SerdeContext): Endpoint[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Endpoint(entry, context); }); return retVal; @@ -6216,9 +5666,6 @@ const de___listOfForceIncludeRenditionSize = (output: any, context: __SerdeConte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ForceIncludeRenditionSize(entry, context); }); return retVal; @@ -6231,28 +5678,12 @@ const de___listOfHlsAdditionalManifest = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HlsAdditionalManifest(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfHlsAdMarkers - */ -const de___listOfHlsAdMarkers = (output: any, context: __SerdeContext): (HlsAdMarkers | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfHlsAdMarkers omitted. /** * deserializeAws_restJson1__listOfHlsCaptionLanguageMapping @@ -6261,9 +5692,6 @@ const de___listOfHlsCaptionLanguageMapping = (output: any, context: __SerdeConte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HlsCaptionLanguageMapping(entry, context); }); return retVal; @@ -6276,9 +5704,6 @@ const de___listOfHopDestination = (output: any, context: __SerdeContext): HopDes const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HopDestination(entry, context); }); return retVal; @@ -6291,9 +5716,6 @@ const de___listOfId3Insertion = (output: any, context: __SerdeContext): Id3Inser const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Id3Insertion(entry, context); }); return retVal; @@ -6306,9 +5728,6 @@ const de___listOfInput = (output: any, context: __SerdeContext): Input[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Input(entry, context); }); return retVal; @@ -6321,9 +5740,6 @@ const de___listOfInputClipping = (output: any, context: __SerdeContext): InputCl const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputClipping(entry, context); }); return retVal; @@ -6336,9 +5752,6 @@ const de___listOfInputTemplate = (output: any, context: __SerdeContext): InputTe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputTemplate(entry, context); }); return retVal; @@ -6351,9 +5764,6 @@ const de___listOfInsertableImage = (output: any, context: __SerdeContext): Inser const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InsertableImage(entry, context); }); return retVal; @@ -6366,9 +5776,6 @@ const de___listOfJob = (output: any, context: __SerdeContext): Job[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Job(entry, context); }); return retVal; @@ -6381,9 +5788,6 @@ const de___listOfJobTemplate = (output: any, context: __SerdeContext): JobTempla const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobTemplate(entry, context); }); return retVal; @@ -6396,9 +5800,6 @@ const de___listOfMsSmoothAdditionalManifest = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MsSmoothAdditionalManifest(entry, context); }); return retVal; @@ -6411,9 +5812,6 @@ const de___listOfOutput = (output: any, context: __SerdeContext): Output[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Output(entry, context); }); return retVal; @@ -6426,9 +5824,6 @@ const de___listOfOutputChannelMapping = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputChannelMapping(entry, context); }); return retVal; @@ -6441,9 +5836,6 @@ const de___listOfOutputDetail = (output: any, context: __SerdeContext): OutputDe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputDetail(entry, context); }); return retVal; @@ -6456,9 +5848,6 @@ const de___listOfOutputGroup = (output: any, context: __SerdeContext): OutputGro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputGroup(entry, context); }); return retVal; @@ -6471,9 +5860,6 @@ const de___listOfOutputGroupDetail = (output: any, context: __SerdeContext): Out const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputGroupDetail(entry, context); }); return retVal; @@ -6486,9 +5872,6 @@ const de___listOfPreset = (output: any, context: __SerdeContext): Preset[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Preset(entry, context); }); return retVal; @@ -6501,9 +5884,6 @@ const de___listOfQueue = (output: any, context: __SerdeContext): Queue[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Queue(entry, context); }); return retVal; @@ -6516,28 +5896,12 @@ const de___listOfQueueTransition = (output: any, context: __SerdeContext): Queue const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QueueTransition(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfTeletextPageType - */ -const de___listOfTeletextPageType = (output: any, context: __SerdeContext): (TeletextPageType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfTeletextPageType omitted. /** * deserializeAws_restJson1__listOfWarningGroup @@ -6546,26 +5910,12 @@ const de___listOfWarningGroup = (output: any, context: __SerdeContext): WarningG const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WarningGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. /** * deserializeAws_restJson1__mapOfAudioSelector @@ -6610,677 +5960,596 @@ const de___mapOfCaptionSelector = (output: any, context: __SerdeContext): Record * deserializeAws_restJson1AacSettings */ const de_AacSettings = (output: any, context: __SerdeContext): AacSettings => { - return { - AudioDescriptionBroadcasterMix: __expectString(output.audioDescriptionBroadcasterMix), - Bitrate: __expectInt32(output.bitrate), - CodecProfile: __expectString(output.codecProfile), - CodingMode: __expectString(output.codingMode), - RateControlMode: __expectString(output.rateControlMode), - RawFormat: __expectString(output.rawFormat), - SampleRate: __expectInt32(output.sampleRate), - Specification: __expectString(output.specification), - VbrQuality: __expectString(output.vbrQuality), - } as any; + return take(output, { + AudioDescriptionBroadcasterMix: [, __expectString, `audioDescriptionBroadcasterMix`], + Bitrate: [, __expectInt32, `bitrate`], + CodecProfile: [, __expectString, `codecProfile`], + CodingMode: [, __expectString, `codingMode`], + RateControlMode: [, __expectString, `rateControlMode`], + RawFormat: [, __expectString, `rawFormat`], + SampleRate: [, __expectInt32, `sampleRate`], + Specification: [, __expectString, `specification`], + VbrQuality: [, __expectString, `vbrQuality`], + }) as any; }; /** * deserializeAws_restJson1Ac3Settings */ const de_Ac3Settings = (output: any, context: __SerdeContext): Ac3Settings => { - return { - Bitrate: __expectInt32(output.bitrate), - BitstreamMode: __expectString(output.bitstreamMode), - CodingMode: __expectString(output.codingMode), - Dialnorm: __expectInt32(output.dialnorm), - DynamicRangeCompressionLine: __expectString(output.dynamicRangeCompressionLine), - DynamicRangeCompressionProfile: __expectString(output.dynamicRangeCompressionProfile), - DynamicRangeCompressionRf: __expectString(output.dynamicRangeCompressionRf), - LfeFilter: __expectString(output.lfeFilter), - MetadataControl: __expectString(output.metadataControl), - SampleRate: __expectInt32(output.sampleRate), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + BitstreamMode: [, __expectString, `bitstreamMode`], + CodingMode: [, __expectString, `codingMode`], + Dialnorm: [, __expectInt32, `dialnorm`], + DynamicRangeCompressionLine: [, __expectString, `dynamicRangeCompressionLine`], + DynamicRangeCompressionProfile: [, __expectString, `dynamicRangeCompressionProfile`], + DynamicRangeCompressionRf: [, __expectString, `dynamicRangeCompressionRf`], + LfeFilter: [, __expectString, `lfeFilter`], + MetadataControl: [, __expectString, `metadataControl`], + SampleRate: [, __expectInt32, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1AccelerationSettings */ const de_AccelerationSettings = (output: any, context: __SerdeContext): AccelerationSettings => { - return { - Mode: __expectString(output.mode), - } as any; + return take(output, { + Mode: [, __expectString, `mode`], + }) as any; }; /** * deserializeAws_restJson1AiffSettings */ const de_AiffSettings = (output: any, context: __SerdeContext): AiffSettings => { - return { - BitDepth: __expectInt32(output.bitDepth), - Channels: __expectInt32(output.channels), - SampleRate: __expectInt32(output.sampleRate), - } as any; + return take(output, { + BitDepth: [, __expectInt32, `bitDepth`], + Channels: [, __expectInt32, `channels`], + SampleRate: [, __expectInt32, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1AllowedRenditionSize */ const de_AllowedRenditionSize = (output: any, context: __SerdeContext): AllowedRenditionSize => { - return { - Height: __expectInt32(output.height), - Required: __expectString(output.required), - Width: __expectInt32(output.width), - } as any; + return take(output, { + Height: [, __expectInt32, `height`], + Required: [, __expectString, `required`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1AncillarySourceSettings */ const de_AncillarySourceSettings = (output: any, context: __SerdeContext): AncillarySourceSettings => { - return { - Convert608To708: __expectString(output.convert608To708), - SourceAncillaryChannelNumber: __expectInt32(output.sourceAncillaryChannelNumber), - TerminateCaptions: __expectString(output.terminateCaptions), - } as any; + return take(output, { + Convert608To708: [, __expectString, `convert608To708`], + SourceAncillaryChannelNumber: [, __expectInt32, `sourceAncillaryChannelNumber`], + TerminateCaptions: [, __expectString, `terminateCaptions`], + }) as any; }; /** * deserializeAws_restJson1AudioChannelTaggingSettings */ const de_AudioChannelTaggingSettings = (output: any, context: __SerdeContext): AudioChannelTaggingSettings => { - return { - ChannelTag: __expectString(output.channelTag), - } as any; + return take(output, { + ChannelTag: [, __expectString, `channelTag`], + }) as any; }; /** * deserializeAws_restJson1AudioCodecSettings */ const de_AudioCodecSettings = (output: any, context: __SerdeContext): AudioCodecSettings => { - return { - AacSettings: output.aacSettings != null ? de_AacSettings(output.aacSettings, context) : undefined, - Ac3Settings: output.ac3Settings != null ? de_Ac3Settings(output.ac3Settings, context) : undefined, - AiffSettings: output.aiffSettings != null ? de_AiffSettings(output.aiffSettings, context) : undefined, - Codec: __expectString(output.codec), - Eac3AtmosSettings: - output.eac3AtmosSettings != null ? de_Eac3AtmosSettings(output.eac3AtmosSettings, context) : undefined, - Eac3Settings: output.eac3Settings != null ? de_Eac3Settings(output.eac3Settings, context) : undefined, - Mp2Settings: output.mp2Settings != null ? de_Mp2Settings(output.mp2Settings, context) : undefined, - Mp3Settings: output.mp3Settings != null ? de_Mp3Settings(output.mp3Settings, context) : undefined, - OpusSettings: output.opusSettings != null ? de_OpusSettings(output.opusSettings, context) : undefined, - VorbisSettings: output.vorbisSettings != null ? de_VorbisSettings(output.vorbisSettings, context) : undefined, - WavSettings: output.wavSettings != null ? de_WavSettings(output.wavSettings, context) : undefined, - } as any; + return take(output, { + AacSettings: (_) => [, de_AacSettings(_, context), `aacSettings`], + Ac3Settings: (_) => [, de_Ac3Settings(_, context), `ac3Settings`], + AiffSettings: (_) => [, de_AiffSettings(_, context), `aiffSettings`], + Codec: [, __expectString, `codec`], + Eac3AtmosSettings: (_) => [, de_Eac3AtmosSettings(_, context), `eac3AtmosSettings`], + Eac3Settings: (_) => [, de_Eac3Settings(_, context), `eac3Settings`], + Mp2Settings: (_) => [, de_Mp2Settings(_, context), `mp2Settings`], + Mp3Settings: (_) => [, de_Mp3Settings(_, context), `mp3Settings`], + OpusSettings: (_) => [, de_OpusSettings(_, context), `opusSettings`], + VorbisSettings: (_) => [, de_VorbisSettings(_, context), `vorbisSettings`], + WavSettings: (_) => [, de_WavSettings(_, context), `wavSettings`], + }) as any; }; /** * deserializeAws_restJson1AudioDescription */ const de_AudioDescription = (output: any, context: __SerdeContext): AudioDescription => { - return { - AudioChannelTaggingSettings: - output.audioChannelTaggingSettings != null - ? de_AudioChannelTaggingSettings(output.audioChannelTaggingSettings, context) - : undefined, - AudioNormalizationSettings: - output.audioNormalizationSettings != null - ? de_AudioNormalizationSettings(output.audioNormalizationSettings, context) - : undefined, - AudioSourceName: __expectString(output.audioSourceName), - AudioType: __expectInt32(output.audioType), - AudioTypeControl: __expectString(output.audioTypeControl), - CodecSettings: output.codecSettings != null ? de_AudioCodecSettings(output.codecSettings, context) : undefined, - CustomLanguageCode: __expectString(output.customLanguageCode), - LanguageCode: __expectString(output.languageCode), - LanguageCodeControl: __expectString(output.languageCodeControl), - RemixSettings: output.remixSettings != null ? de_RemixSettings(output.remixSettings, context) : undefined, - StreamName: __expectString(output.streamName), - } as any; + return take(output, { + AudioChannelTaggingSettings: (_) => [, de_AudioChannelTaggingSettings(_, context), `audioChannelTaggingSettings`], + AudioNormalizationSettings: (_) => [, de_AudioNormalizationSettings(_, context), `audioNormalizationSettings`], + AudioSourceName: [, __expectString, `audioSourceName`], + AudioType: [, __expectInt32, `audioType`], + AudioTypeControl: [, __expectString, `audioTypeControl`], + CodecSettings: (_) => [, de_AudioCodecSettings(_, context), `codecSettings`], + CustomLanguageCode: [, __expectString, `customLanguageCode`], + LanguageCode: [, __expectString, `languageCode`], + LanguageCodeControl: [, __expectString, `languageCodeControl`], + RemixSettings: (_) => [, de_RemixSettings(_, context), `remixSettings`], + StreamName: [, __expectString, `streamName`], + }) as any; }; /** * deserializeAws_restJson1AudioNormalizationSettings */ const de_AudioNormalizationSettings = (output: any, context: __SerdeContext): AudioNormalizationSettings => { - return { - Algorithm: __expectString(output.algorithm), - AlgorithmControl: __expectString(output.algorithmControl), - CorrectionGateLevel: __expectInt32(output.correctionGateLevel), - LoudnessLogging: __expectString(output.loudnessLogging), - PeakCalculation: __expectString(output.peakCalculation), - TargetLkfs: __limitedParseDouble(output.targetLkfs), - TruePeakLimiterThreshold: __limitedParseDouble(output.truePeakLimiterThreshold), - } as any; + return take(output, { + Algorithm: [, __expectString, `algorithm`], + AlgorithmControl: [, __expectString, `algorithmControl`], + CorrectionGateLevel: [, __expectInt32, `correctionGateLevel`], + LoudnessLogging: [, __expectString, `loudnessLogging`], + PeakCalculation: [, __expectString, `peakCalculation`], + TargetLkfs: [, __limitedParseDouble, `targetLkfs`], + TruePeakLimiterThreshold: [, __limitedParseDouble, `truePeakLimiterThreshold`], + }) as any; }; /** * deserializeAws_restJson1AudioSelector */ const de_AudioSelector = (output: any, context: __SerdeContext): AudioSelector => { - return { - AudioDurationCorrection: __expectString(output.audioDurationCorrection), - CustomLanguageCode: __expectString(output.customLanguageCode), - DefaultSelection: __expectString(output.defaultSelection), - ExternalAudioFileInput: __expectString(output.externalAudioFileInput), - HlsRenditionGroupSettings: - output.hlsRenditionGroupSettings != null - ? de_HlsRenditionGroupSettings(output.hlsRenditionGroupSettings, context) - : undefined, - LanguageCode: __expectString(output.languageCode), - Offset: __expectInt32(output.offset), - Pids: output.pids != null ? de___listOf__integerMin1Max2147483647(output.pids, context) : undefined, - ProgramSelection: __expectInt32(output.programSelection), - RemixSettings: output.remixSettings != null ? de_RemixSettings(output.remixSettings, context) : undefined, - SelectorType: __expectString(output.selectorType), - Tracks: output.tracks != null ? de___listOf__integerMin1Max2147483647(output.tracks, context) : undefined, - } as any; + return take(output, { + AudioDurationCorrection: [, __expectString, `audioDurationCorrection`], + CustomLanguageCode: [, __expectString, `customLanguageCode`], + DefaultSelection: [, __expectString, `defaultSelection`], + ExternalAudioFileInput: [, __expectString, `externalAudioFileInput`], + HlsRenditionGroupSettings: (_) => [, de_HlsRenditionGroupSettings(_, context), `hlsRenditionGroupSettings`], + LanguageCode: [, __expectString, `languageCode`], + Offset: [, __expectInt32, `offset`], + Pids: [, _json, `pids`], + ProgramSelection: [, __expectInt32, `programSelection`], + RemixSettings: (_) => [, de_RemixSettings(_, context), `remixSettings`], + SelectorType: [, __expectString, `selectorType`], + Tracks: [, _json, `tracks`], + }) as any; }; /** * deserializeAws_restJson1AudioSelectorGroup */ const de_AudioSelectorGroup = (output: any, context: __SerdeContext): AudioSelectorGroup => { - return { - AudioSelectorNames: - output.audioSelectorNames != null ? de___listOf__stringMin1(output.audioSelectorNames, context) : undefined, - } as any; + return take(output, { + AudioSelectorNames: [, _json, `audioSelectorNames`], + }) as any; }; /** * deserializeAws_restJson1AutomatedAbrRule */ const de_AutomatedAbrRule = (output: any, context: __SerdeContext): AutomatedAbrRule => { - return { - AllowedRenditions: - output.allowedRenditions != null ? de___listOfAllowedRenditionSize(output.allowedRenditions, context) : undefined, - ForceIncludeRenditions: - output.forceIncludeRenditions != null - ? de___listOfForceIncludeRenditionSize(output.forceIncludeRenditions, context) - : undefined, - MinBottomRenditionSize: - output.minBottomRenditionSize != null - ? de_MinBottomRenditionSize(output.minBottomRenditionSize, context) - : undefined, - MinTopRenditionSize: - output.minTopRenditionSize != null ? de_MinTopRenditionSize(output.minTopRenditionSize, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + AllowedRenditions: (_) => [, de___listOfAllowedRenditionSize(_, context), `allowedRenditions`], + ForceIncludeRenditions: (_) => [, de___listOfForceIncludeRenditionSize(_, context), `forceIncludeRenditions`], + MinBottomRenditionSize: (_) => [, de_MinBottomRenditionSize(_, context), `minBottomRenditionSize`], + MinTopRenditionSize: (_) => [, de_MinTopRenditionSize(_, context), `minTopRenditionSize`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1AutomatedAbrSettings */ const de_AutomatedAbrSettings = (output: any, context: __SerdeContext): AutomatedAbrSettings => { - return { - MaxAbrBitrate: __expectInt32(output.maxAbrBitrate), - MaxRenditions: __expectInt32(output.maxRenditions), - MinAbrBitrate: __expectInt32(output.minAbrBitrate), - Rules: output.rules != null ? de___listOfAutomatedAbrRule(output.rules, context) : undefined, - } as any; + return take(output, { + MaxAbrBitrate: [, __expectInt32, `maxAbrBitrate`], + MaxRenditions: [, __expectInt32, `maxRenditions`], + MinAbrBitrate: [, __expectInt32, `minAbrBitrate`], + Rules: (_) => [, de___listOfAutomatedAbrRule(_, context), `rules`], + }) as any; }; /** * deserializeAws_restJson1AutomatedEncodingSettings */ const de_AutomatedEncodingSettings = (output: any, context: __SerdeContext): AutomatedEncodingSettings => { - return { - AbrSettings: output.abrSettings != null ? de_AutomatedAbrSettings(output.abrSettings, context) : undefined, - } as any; + return take(output, { + AbrSettings: (_) => [, de_AutomatedAbrSettings(_, context), `abrSettings`], + }) as any; }; /** * deserializeAws_restJson1Av1QvbrSettings */ const de_Av1QvbrSettings = (output: any, context: __SerdeContext): Av1QvbrSettings => { - return { - QvbrQualityLevel: __expectInt32(output.qvbrQualityLevel), - QvbrQualityLevelFineTune: __limitedParseDouble(output.qvbrQualityLevelFineTune), - } as any; + return take(output, { + QvbrQualityLevel: [, __expectInt32, `qvbrQualityLevel`], + QvbrQualityLevelFineTune: [, __limitedParseDouble, `qvbrQualityLevelFineTune`], + }) as any; }; /** * deserializeAws_restJson1Av1Settings */ const de_Av1Settings = (output: any, context: __SerdeContext): Av1Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - BitDepth: __expectString(output.bitDepth), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopSize: __limitedParseDouble(output.gopSize), - MaxBitrate: __expectInt32(output.maxBitrate), - NumberBFramesBetweenReferenceFrames: __expectInt32(output.numberBFramesBetweenReferenceFrames), - QvbrSettings: output.qvbrSettings != null ? de_Av1QvbrSettings(output.qvbrSettings, context) : undefined, - RateControlMode: __expectString(output.rateControlMode), - Slices: __expectInt32(output.slices), - SpatialAdaptiveQuantization: __expectString(output.spatialAdaptiveQuantization), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + BitDepth: [, __expectString, `bitDepth`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopSize: [, __limitedParseDouble, `gopSize`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + NumberBFramesBetweenReferenceFrames: [, __expectInt32, `numberBFramesBetweenReferenceFrames`], + QvbrSettings: (_) => [, de_Av1QvbrSettings(_, context), `qvbrSettings`], + RateControlMode: [, __expectString, `rateControlMode`], + Slices: [, __expectInt32, `slices`], + SpatialAdaptiveQuantization: [, __expectString, `spatialAdaptiveQuantization`], + }) as any; }; /** * deserializeAws_restJson1AvailBlanking */ const de_AvailBlanking = (output: any, context: __SerdeContext): AvailBlanking => { - return { - AvailBlankingImage: __expectString(output.availBlankingImage), - } as any; + return take(output, { + AvailBlankingImage: [, __expectString, `availBlankingImage`], + }) as any; }; /** * deserializeAws_restJson1AvcIntraSettings */ const de_AvcIntraSettings = (output: any, context: __SerdeContext): AvcIntraSettings => { - return { - AvcIntraClass: __expectString(output.avcIntraClass), - AvcIntraUhdSettings: - output.avcIntraUhdSettings != null ? de_AvcIntraUhdSettings(output.avcIntraUhdSettings, context) : undefined, - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - InterlaceMode: __expectString(output.interlaceMode), - ScanTypeConversionMode: __expectString(output.scanTypeConversionMode), - SlowPal: __expectString(output.slowPal), - Telecine: __expectString(output.telecine), - } as any; + return take(output, { + AvcIntraClass: [, __expectString, `avcIntraClass`], + AvcIntraUhdSettings: (_) => [, de_AvcIntraUhdSettings(_, context), `avcIntraUhdSettings`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + InterlaceMode: [, __expectString, `interlaceMode`], + ScanTypeConversionMode: [, __expectString, `scanTypeConversionMode`], + SlowPal: [, __expectString, `slowPal`], + Telecine: [, __expectString, `telecine`], + }) as any; }; /** * deserializeAws_restJson1AvcIntraUhdSettings */ const de_AvcIntraUhdSettings = (output: any, context: __SerdeContext): AvcIntraUhdSettings => { - return { - QualityTuningLevel: __expectString(output.qualityTuningLevel), - } as any; + return take(output, { + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + }) as any; }; /** * deserializeAws_restJson1BandwidthReductionFilter */ const de_BandwidthReductionFilter = (output: any, context: __SerdeContext): BandwidthReductionFilter => { - return { - Sharpening: __expectString(output.sharpening), - Strength: __expectString(output.strength), - } as any; + return take(output, { + Sharpening: [, __expectString, `sharpening`], + Strength: [, __expectString, `strength`], + }) as any; }; /** * deserializeAws_restJson1BurninDestinationSettings */ const de_BurninDestinationSettings = (output: any, context: __SerdeContext): BurninDestinationSettings => { - return { - Alignment: __expectString(output.alignment), - ApplyFontColor: __expectString(output.applyFontColor), - BackgroundColor: __expectString(output.backgroundColor), - BackgroundOpacity: __expectInt32(output.backgroundOpacity), - FallbackFont: __expectString(output.fallbackFont), - FontColor: __expectString(output.fontColor), - FontOpacity: __expectInt32(output.fontOpacity), - FontResolution: __expectInt32(output.fontResolution), - FontScript: __expectString(output.fontScript), - FontSize: __expectInt32(output.fontSize), - HexFontColor: __expectString(output.hexFontColor), - OutlineColor: __expectString(output.outlineColor), - OutlineSize: __expectInt32(output.outlineSize), - ShadowColor: __expectString(output.shadowColor), - ShadowOpacity: __expectInt32(output.shadowOpacity), - ShadowXOffset: __expectInt32(output.shadowXOffset), - ShadowYOffset: __expectInt32(output.shadowYOffset), - StylePassthrough: __expectString(output.stylePassthrough), - TeletextSpacing: __expectString(output.teletextSpacing), - XPosition: __expectInt32(output.xPosition), - YPosition: __expectInt32(output.yPosition), - } as any; + return take(output, { + Alignment: [, __expectString, `alignment`], + ApplyFontColor: [, __expectString, `applyFontColor`], + BackgroundColor: [, __expectString, `backgroundColor`], + BackgroundOpacity: [, __expectInt32, `backgroundOpacity`], + FallbackFont: [, __expectString, `fallbackFont`], + FontColor: [, __expectString, `fontColor`], + FontOpacity: [, __expectInt32, `fontOpacity`], + FontResolution: [, __expectInt32, `fontResolution`], + FontScript: [, __expectString, `fontScript`], + FontSize: [, __expectInt32, `fontSize`], + HexFontColor: [, __expectString, `hexFontColor`], + OutlineColor: [, __expectString, `outlineColor`], + OutlineSize: [, __expectInt32, `outlineSize`], + ShadowColor: [, __expectString, `shadowColor`], + ShadowOpacity: [, __expectInt32, `shadowOpacity`], + ShadowXOffset: [, __expectInt32, `shadowXOffset`], + ShadowYOffset: [, __expectInt32, `shadowYOffset`], + StylePassthrough: [, __expectString, `stylePassthrough`], + TeletextSpacing: [, __expectString, `teletextSpacing`], + XPosition: [, __expectInt32, `xPosition`], + YPosition: [, __expectInt32, `yPosition`], + }) as any; }; /** * deserializeAws_restJson1CaptionDescription */ const de_CaptionDescription = (output: any, context: __SerdeContext): CaptionDescription => { - return { - CaptionSelectorName: __expectString(output.captionSelectorName), - CustomLanguageCode: __expectString(output.customLanguageCode), - DestinationSettings: - output.destinationSettings != null - ? de_CaptionDestinationSettings(output.destinationSettings, context) - : undefined, - LanguageCode: __expectString(output.languageCode), - LanguageDescription: __expectString(output.languageDescription), - } as any; + return take(output, { + CaptionSelectorName: [, __expectString, `captionSelectorName`], + CustomLanguageCode: [, __expectString, `customLanguageCode`], + DestinationSettings: (_) => [, de_CaptionDestinationSettings(_, context), `destinationSettings`], + LanguageCode: [, __expectString, `languageCode`], + LanguageDescription: [, __expectString, `languageDescription`], + }) as any; }; /** * deserializeAws_restJson1CaptionDescriptionPreset */ const de_CaptionDescriptionPreset = (output: any, context: __SerdeContext): CaptionDescriptionPreset => { - return { - CustomLanguageCode: __expectString(output.customLanguageCode), - DestinationSettings: - output.destinationSettings != null - ? de_CaptionDestinationSettings(output.destinationSettings, context) - : undefined, - LanguageCode: __expectString(output.languageCode), - LanguageDescription: __expectString(output.languageDescription), - } as any; + return take(output, { + CustomLanguageCode: [, __expectString, `customLanguageCode`], + DestinationSettings: (_) => [, de_CaptionDestinationSettings(_, context), `destinationSettings`], + LanguageCode: [, __expectString, `languageCode`], + LanguageDescription: [, __expectString, `languageDescription`], + }) as any; }; /** * deserializeAws_restJson1CaptionDestinationSettings */ const de_CaptionDestinationSettings = (output: any, context: __SerdeContext): CaptionDestinationSettings => { - return { - BurninDestinationSettings: - output.burninDestinationSettings != null - ? de_BurninDestinationSettings(output.burninDestinationSettings, context) - : undefined, - DestinationType: __expectString(output.destinationType), - DvbSubDestinationSettings: - output.dvbSubDestinationSettings != null - ? de_DvbSubDestinationSettings(output.dvbSubDestinationSettings, context) - : undefined, - EmbeddedDestinationSettings: - output.embeddedDestinationSettings != null - ? de_EmbeddedDestinationSettings(output.embeddedDestinationSettings, context) - : undefined, - ImscDestinationSettings: - output.imscDestinationSettings != null - ? de_ImscDestinationSettings(output.imscDestinationSettings, context) - : undefined, - SccDestinationSettings: - output.sccDestinationSettings != null - ? de_SccDestinationSettings(output.sccDestinationSettings, context) - : undefined, - SrtDestinationSettings: - output.srtDestinationSettings != null - ? de_SrtDestinationSettings(output.srtDestinationSettings, context) - : undefined, - TeletextDestinationSettings: - output.teletextDestinationSettings != null - ? de_TeletextDestinationSettings(output.teletextDestinationSettings, context) - : undefined, - TtmlDestinationSettings: - output.ttmlDestinationSettings != null - ? de_TtmlDestinationSettings(output.ttmlDestinationSettings, context) - : undefined, - WebvttDestinationSettings: - output.webvttDestinationSettings != null - ? de_WebvttDestinationSettings(output.webvttDestinationSettings, context) - : undefined, - } as any; + return take(output, { + BurninDestinationSettings: (_) => [, de_BurninDestinationSettings(_, context), `burninDestinationSettings`], + DestinationType: [, __expectString, `destinationType`], + DvbSubDestinationSettings: (_) => [, de_DvbSubDestinationSettings(_, context), `dvbSubDestinationSettings`], + EmbeddedDestinationSettings: (_) => [, de_EmbeddedDestinationSettings(_, context), `embeddedDestinationSettings`], + ImscDestinationSettings: (_) => [, de_ImscDestinationSettings(_, context), `imscDestinationSettings`], + SccDestinationSettings: (_) => [, de_SccDestinationSettings(_, context), `sccDestinationSettings`], + SrtDestinationSettings: (_) => [, de_SrtDestinationSettings(_, context), `srtDestinationSettings`], + TeletextDestinationSettings: (_) => [, de_TeletextDestinationSettings(_, context), `teletextDestinationSettings`], + TtmlDestinationSettings: (_) => [, de_TtmlDestinationSettings(_, context), `ttmlDestinationSettings`], + WebvttDestinationSettings: (_) => [, de_WebvttDestinationSettings(_, context), `webvttDestinationSettings`], + }) as any; }; /** * deserializeAws_restJson1CaptionSelector */ const de_CaptionSelector = (output: any, context: __SerdeContext): CaptionSelector => { - return { - CustomLanguageCode: __expectString(output.customLanguageCode), - LanguageCode: __expectString(output.languageCode), - SourceSettings: - output.sourceSettings != null ? de_CaptionSourceSettings(output.sourceSettings, context) : undefined, - } as any; + return take(output, { + CustomLanguageCode: [, __expectString, `customLanguageCode`], + LanguageCode: [, __expectString, `languageCode`], + SourceSettings: (_) => [, de_CaptionSourceSettings(_, context), `sourceSettings`], + }) as any; }; /** * deserializeAws_restJson1CaptionSourceFramerate */ const de_CaptionSourceFramerate = (output: any, context: __SerdeContext): CaptionSourceFramerate => { - return { - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - } as any; + return take(output, { + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + }) as any; }; /** * deserializeAws_restJson1CaptionSourceSettings */ const de_CaptionSourceSettings = (output: any, context: __SerdeContext): CaptionSourceSettings => { - return { - AncillarySourceSettings: - output.ancillarySourceSettings != null - ? de_AncillarySourceSettings(output.ancillarySourceSettings, context) - : undefined, - DvbSubSourceSettings: - output.dvbSubSourceSettings != null ? de_DvbSubSourceSettings(output.dvbSubSourceSettings, context) : undefined, - EmbeddedSourceSettings: - output.embeddedSourceSettings != null - ? de_EmbeddedSourceSettings(output.embeddedSourceSettings, context) - : undefined, - FileSourceSettings: - output.fileSourceSettings != null ? de_FileSourceSettings(output.fileSourceSettings, context) : undefined, - SourceType: __expectString(output.sourceType), - TeletextSourceSettings: - output.teletextSourceSettings != null - ? de_TeletextSourceSettings(output.teletextSourceSettings, context) - : undefined, - TrackSourceSettings: - output.trackSourceSettings != null ? de_TrackSourceSettings(output.trackSourceSettings, context) : undefined, - WebvttHlsSourceSettings: - output.webvttHlsSourceSettings != null - ? de_WebvttHlsSourceSettings(output.webvttHlsSourceSettings, context) - : undefined, - } as any; + return take(output, { + AncillarySourceSettings: (_) => [, de_AncillarySourceSettings(_, context), `ancillarySourceSettings`], + DvbSubSourceSettings: (_) => [, de_DvbSubSourceSettings(_, context), `dvbSubSourceSettings`], + EmbeddedSourceSettings: (_) => [, de_EmbeddedSourceSettings(_, context), `embeddedSourceSettings`], + FileSourceSettings: (_) => [, de_FileSourceSettings(_, context), `fileSourceSettings`], + SourceType: [, __expectString, `sourceType`], + TeletextSourceSettings: (_) => [, de_TeletextSourceSettings(_, context), `teletextSourceSettings`], + TrackSourceSettings: (_) => [, de_TrackSourceSettings(_, context), `trackSourceSettings`], + WebvttHlsSourceSettings: (_) => [, de_WebvttHlsSourceSettings(_, context), `webvttHlsSourceSettings`], + }) as any; }; /** * deserializeAws_restJson1ChannelMapping */ const de_ChannelMapping = (output: any, context: __SerdeContext): ChannelMapping => { - return { - OutputChannels: - output.outputChannels != null ? de___listOfOutputChannelMapping(output.outputChannels, context) : undefined, - } as any; + return take(output, { + OutputChannels: (_) => [, de___listOfOutputChannelMapping(_, context), `outputChannels`], + }) as any; }; /** * deserializeAws_restJson1ClipLimits */ const de_ClipLimits = (output: any, context: __SerdeContext): ClipLimits => { - return { - MaximumRGBTolerance: __expectInt32(output.maximumRGBTolerance), - MaximumYUV: __expectInt32(output.maximumYUV), - MinimumRGBTolerance: __expectInt32(output.minimumRGBTolerance), - MinimumYUV: __expectInt32(output.minimumYUV), - } as any; + return take(output, { + MaximumRGBTolerance: [, __expectInt32, `maximumRGBTolerance`], + MaximumYUV: [, __expectInt32, `maximumYUV`], + MinimumRGBTolerance: [, __expectInt32, `minimumRGBTolerance`], + MinimumYUV: [, __expectInt32, `minimumYUV`], + }) as any; }; /** * deserializeAws_restJson1CmafAdditionalManifest */ const de_CmafAdditionalManifest = (output: any, context: __SerdeContext): CmafAdditionalManifest => { - return { - ManifestNameModifier: __expectString(output.manifestNameModifier), - SelectedOutputs: - output.selectedOutputs != null ? de___listOf__stringMin1(output.selectedOutputs, context) : undefined, - } as any; + return take(output, { + ManifestNameModifier: [, __expectString, `manifestNameModifier`], + SelectedOutputs: [, _json, `selectedOutputs`], + }) as any; }; /** * deserializeAws_restJson1CmafEncryptionSettings */ const de_CmafEncryptionSettings = (output: any, context: __SerdeContext): CmafEncryptionSettings => { - return { - ConstantInitializationVector: __expectString(output.constantInitializationVector), - EncryptionMethod: __expectString(output.encryptionMethod), - InitializationVectorInManifest: __expectString(output.initializationVectorInManifest), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProviderCmaf(output.spekeKeyProvider, context) : undefined, - StaticKeyProvider: - output.staticKeyProvider != null ? de_StaticKeyProvider(output.staticKeyProvider, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + EncryptionMethod: [, __expectString, `encryptionMethod`], + InitializationVectorInManifest: [, __expectString, `initializationVectorInManifest`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProviderCmaf(_, context), `spekeKeyProvider`], + StaticKeyProvider: (_) => [, de_StaticKeyProvider(_, context), `staticKeyProvider`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1CmafGroupSettings */ const de_CmafGroupSettings = (output: any, context: __SerdeContext): CmafGroupSettings => { - return { - AdditionalManifests: - output.additionalManifests != null - ? de___listOfCmafAdditionalManifest(output.additionalManifests, context) - : undefined, - BaseUrl: __expectString(output.baseUrl), - ClientCache: __expectString(output.clientCache), - CodecSpecification: __expectString(output.codecSpecification), - DashManifestStyle: __expectString(output.dashManifestStyle), - Destination: __expectString(output.destination), - DestinationSettings: - output.destinationSettings != null ? de_DestinationSettings(output.destinationSettings, context) : undefined, - Encryption: output.encryption != null ? de_CmafEncryptionSettings(output.encryption, context) : undefined, - FragmentLength: __expectInt32(output.fragmentLength), - ImageBasedTrickPlay: __expectString(output.imageBasedTrickPlay), - ImageBasedTrickPlaySettings: - output.imageBasedTrickPlaySettings != null - ? de_CmafImageBasedTrickPlaySettings(output.imageBasedTrickPlaySettings, context) - : undefined, - ManifestCompression: __expectString(output.manifestCompression), - ManifestDurationFormat: __expectString(output.manifestDurationFormat), - MinBufferTime: __expectInt32(output.minBufferTime), - MinFinalSegmentLength: __limitedParseDouble(output.minFinalSegmentLength), - MpdManifestBandwidthType: __expectString(output.mpdManifestBandwidthType), - MpdProfile: __expectString(output.mpdProfile), - PtsOffsetHandlingForBFrames: __expectString(output.ptsOffsetHandlingForBFrames), - SegmentControl: __expectString(output.segmentControl), - SegmentLength: __expectInt32(output.segmentLength), - SegmentLengthControl: __expectString(output.segmentLengthControl), - StreamInfResolution: __expectString(output.streamInfResolution), - TargetDurationCompatibilityMode: __expectString(output.targetDurationCompatibilityMode), - VideoCompositionOffsets: __expectString(output.videoCompositionOffsets), - WriteDashManifest: __expectString(output.writeDashManifest), - WriteHlsManifest: __expectString(output.writeHlsManifest), - WriteSegmentTimelineInRepresentation: __expectString(output.writeSegmentTimelineInRepresentation), - } as any; + return take(output, { + AdditionalManifests: (_) => [, de___listOfCmafAdditionalManifest(_, context), `additionalManifests`], + BaseUrl: [, __expectString, `baseUrl`], + ClientCache: [, __expectString, `clientCache`], + CodecSpecification: [, __expectString, `codecSpecification`], + DashManifestStyle: [, __expectString, `dashManifestStyle`], + Destination: [, __expectString, `destination`], + DestinationSettings: (_) => [, de_DestinationSettings(_, context), `destinationSettings`], + Encryption: (_) => [, de_CmafEncryptionSettings(_, context), `encryption`], + FragmentLength: [, __expectInt32, `fragmentLength`], + ImageBasedTrickPlay: [, __expectString, `imageBasedTrickPlay`], + ImageBasedTrickPlaySettings: (_) => [ + , + de_CmafImageBasedTrickPlaySettings(_, context), + `imageBasedTrickPlaySettings`, + ], + ManifestCompression: [, __expectString, `manifestCompression`], + ManifestDurationFormat: [, __expectString, `manifestDurationFormat`], + MinBufferTime: [, __expectInt32, `minBufferTime`], + MinFinalSegmentLength: [, __limitedParseDouble, `minFinalSegmentLength`], + MpdManifestBandwidthType: [, __expectString, `mpdManifestBandwidthType`], + MpdProfile: [, __expectString, `mpdProfile`], + PtsOffsetHandlingForBFrames: [, __expectString, `ptsOffsetHandlingForBFrames`], + SegmentControl: [, __expectString, `segmentControl`], + SegmentLength: [, __expectInt32, `segmentLength`], + SegmentLengthControl: [, __expectString, `segmentLengthControl`], + StreamInfResolution: [, __expectString, `streamInfResolution`], + TargetDurationCompatibilityMode: [, __expectString, `targetDurationCompatibilityMode`], + VideoCompositionOffsets: [, __expectString, `videoCompositionOffsets`], + WriteDashManifest: [, __expectString, `writeDashManifest`], + WriteHlsManifest: [, __expectString, `writeHlsManifest`], + WriteSegmentTimelineInRepresentation: [, __expectString, `writeSegmentTimelineInRepresentation`], + }) as any; }; /** * deserializeAws_restJson1CmafImageBasedTrickPlaySettings */ const de_CmafImageBasedTrickPlaySettings = (output: any, context: __SerdeContext): CmafImageBasedTrickPlaySettings => { - return { - IntervalCadence: __expectString(output.intervalCadence), - ThumbnailHeight: __expectInt32(output.thumbnailHeight), - ThumbnailInterval: __limitedParseDouble(output.thumbnailInterval), - ThumbnailWidth: __expectInt32(output.thumbnailWidth), - TileHeight: __expectInt32(output.tileHeight), - TileWidth: __expectInt32(output.tileWidth), - } as any; + return take(output, { + IntervalCadence: [, __expectString, `intervalCadence`], + ThumbnailHeight: [, __expectInt32, `thumbnailHeight`], + ThumbnailInterval: [, __limitedParseDouble, `thumbnailInterval`], + ThumbnailWidth: [, __expectInt32, `thumbnailWidth`], + TileHeight: [, __expectInt32, `tileHeight`], + TileWidth: [, __expectInt32, `tileWidth`], + }) as any; }; /** * deserializeAws_restJson1CmfcSettings */ const de_CmfcSettings = (output: any, context: __SerdeContext): CmfcSettings => { - return { - AudioDuration: __expectString(output.audioDuration), - AudioGroupId: __expectString(output.audioGroupId), - AudioRenditionSets: __expectString(output.audioRenditionSets), - AudioTrackType: __expectString(output.audioTrackType), - DescriptiveVideoServiceFlag: __expectString(output.descriptiveVideoServiceFlag), - IFrameOnlyManifest: __expectString(output.iFrameOnlyManifest), - KlvMetadata: __expectString(output.klvMetadata), - ManifestMetadataSignaling: __expectString(output.manifestMetadataSignaling), - Scte35Esam: __expectString(output.scte35Esam), - Scte35Source: __expectString(output.scte35Source), - TimedMetadata: __expectString(output.timedMetadata), - TimedMetadataBoxVersion: __expectString(output.timedMetadataBoxVersion), - TimedMetadataSchemeIdUri: __expectString(output.timedMetadataSchemeIdUri), - TimedMetadataValue: __expectString(output.timedMetadataValue), - } as any; + return take(output, { + AudioDuration: [, __expectString, `audioDuration`], + AudioGroupId: [, __expectString, `audioGroupId`], + AudioRenditionSets: [, __expectString, `audioRenditionSets`], + AudioTrackType: [, __expectString, `audioTrackType`], + DescriptiveVideoServiceFlag: [, __expectString, `descriptiveVideoServiceFlag`], + IFrameOnlyManifest: [, __expectString, `iFrameOnlyManifest`], + KlvMetadata: [, __expectString, `klvMetadata`], + ManifestMetadataSignaling: [, __expectString, `manifestMetadataSignaling`], + Scte35Esam: [, __expectString, `scte35Esam`], + Scte35Source: [, __expectString, `scte35Source`], + TimedMetadata: [, __expectString, `timedMetadata`], + TimedMetadataBoxVersion: [, __expectString, `timedMetadataBoxVersion`], + TimedMetadataSchemeIdUri: [, __expectString, `timedMetadataSchemeIdUri`], + TimedMetadataValue: [, __expectString, `timedMetadataValue`], + }) as any; }; /** * deserializeAws_restJson1ColorCorrector */ const de_ColorCorrector = (output: any, context: __SerdeContext): ColorCorrector => { - return { - Brightness: __expectInt32(output.brightness), - ClipLimits: output.clipLimits != null ? de_ClipLimits(output.clipLimits, context) : undefined, - ColorSpaceConversion: __expectString(output.colorSpaceConversion), - Contrast: __expectInt32(output.contrast), - Hdr10Metadata: output.hdr10Metadata != null ? de_Hdr10Metadata(output.hdr10Metadata, context) : undefined, - HdrToSdrToneMapper: __expectString(output.hdrToSdrToneMapper), - Hue: __expectInt32(output.hue), - SampleRangeConversion: __expectString(output.sampleRangeConversion), - Saturation: __expectInt32(output.saturation), - SdrReferenceWhiteLevel: __expectInt32(output.sdrReferenceWhiteLevel), - } as any; + return take(output, { + Brightness: [, __expectInt32, `brightness`], + ClipLimits: (_) => [, de_ClipLimits(_, context), `clipLimits`], + ColorSpaceConversion: [, __expectString, `colorSpaceConversion`], + Contrast: [, __expectInt32, `contrast`], + Hdr10Metadata: (_) => [, de_Hdr10Metadata(_, context), `hdr10Metadata`], + HdrToSdrToneMapper: [, __expectString, `hdrToSdrToneMapper`], + Hue: [, __expectInt32, `hue`], + SampleRangeConversion: [, __expectString, `sampleRangeConversion`], + Saturation: [, __expectInt32, `saturation`], + SdrReferenceWhiteLevel: [, __expectInt32, `sdrReferenceWhiteLevel`], + }) as any; }; /** * deserializeAws_restJson1ContainerSettings */ const de_ContainerSettings = (output: any, context: __SerdeContext): ContainerSettings => { - return { - CmfcSettings: output.cmfcSettings != null ? de_CmfcSettings(output.cmfcSettings, context) : undefined, - Container: __expectString(output.container), - F4vSettings: output.f4vSettings != null ? de_F4vSettings(output.f4vSettings, context) : undefined, - M2tsSettings: output.m2tsSettings != null ? de_M2tsSettings(output.m2tsSettings, context) : undefined, - M3u8Settings: output.m3u8Settings != null ? de_M3u8Settings(output.m3u8Settings, context) : undefined, - MovSettings: output.movSettings != null ? de_MovSettings(output.movSettings, context) : undefined, - Mp4Settings: output.mp4Settings != null ? de_Mp4Settings(output.mp4Settings, context) : undefined, - MpdSettings: output.mpdSettings != null ? de_MpdSettings(output.mpdSettings, context) : undefined, - MxfSettings: output.mxfSettings != null ? de_MxfSettings(output.mxfSettings, context) : undefined, - } as any; + return take(output, { + CmfcSettings: (_) => [, de_CmfcSettings(_, context), `cmfcSettings`], + Container: [, __expectString, `container`], + F4vSettings: (_) => [, de_F4vSettings(_, context), `f4vSettings`], + M2tsSettings: (_) => [, de_M2tsSettings(_, context), `m2tsSettings`], + M3u8Settings: (_) => [, de_M3u8Settings(_, context), `m3u8Settings`], + MovSettings: (_) => [, de_MovSettings(_, context), `movSettings`], + Mp4Settings: (_) => [, de_Mp4Settings(_, context), `mp4Settings`], + MpdSettings: (_) => [, de_MpdSettings(_, context), `mpdSettings`], + MxfSettings: (_) => [, de_MxfSettings(_, context), `mxfSettings`], + }) as any; }; /** * deserializeAws_restJson1DashAdditionalManifest */ const de_DashAdditionalManifest = (output: any, context: __SerdeContext): DashAdditionalManifest => { - return { - ManifestNameModifier: __expectString(output.manifestNameModifier), - SelectedOutputs: - output.selectedOutputs != null ? de___listOf__stringMin1(output.selectedOutputs, context) : undefined, - } as any; + return take(output, { + ManifestNameModifier: [, __expectString, `manifestNameModifier`], + SelectedOutputs: [, _json, `selectedOutputs`], + }) as any; }; /** * deserializeAws_restJson1DashIsoEncryptionSettings */ const de_DashIsoEncryptionSettings = (output: any, context: __SerdeContext): DashIsoEncryptionSettings => { - return { - PlaybackDeviceCompatibility: __expectString(output.playbackDeviceCompatibility), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + PlaybackDeviceCompatibility: [, __expectString, `playbackDeviceCompatibility`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1DashIsoGroupSettings */ const de_DashIsoGroupSettings = (output: any, context: __SerdeContext): DashIsoGroupSettings => { - return { - AdditionalManifests: - output.additionalManifests != null - ? de___listOfDashAdditionalManifest(output.additionalManifests, context) - : undefined, - AudioChannelConfigSchemeIdUri: __expectString(output.audioChannelConfigSchemeIdUri), - BaseUrl: __expectString(output.baseUrl), - DashManifestStyle: __expectString(output.dashManifestStyle), - Destination: __expectString(output.destination), - DestinationSettings: - output.destinationSettings != null ? de_DestinationSettings(output.destinationSettings, context) : undefined, - Encryption: output.encryption != null ? de_DashIsoEncryptionSettings(output.encryption, context) : undefined, - FragmentLength: __expectInt32(output.fragmentLength), - HbbtvCompliance: __expectString(output.hbbtvCompliance), - ImageBasedTrickPlay: __expectString(output.imageBasedTrickPlay), - ImageBasedTrickPlaySettings: - output.imageBasedTrickPlaySettings != null - ? de_DashIsoImageBasedTrickPlaySettings(output.imageBasedTrickPlaySettings, context) - : undefined, - MinBufferTime: __expectInt32(output.minBufferTime), - MinFinalSegmentLength: __limitedParseDouble(output.minFinalSegmentLength), - MpdManifestBandwidthType: __expectString(output.mpdManifestBandwidthType), - MpdProfile: __expectString(output.mpdProfile), - PtsOffsetHandlingForBFrames: __expectString(output.ptsOffsetHandlingForBFrames), - SegmentControl: __expectString(output.segmentControl), - SegmentLength: __expectInt32(output.segmentLength), - SegmentLengthControl: __expectString(output.segmentLengthControl), - VideoCompositionOffsets: __expectString(output.videoCompositionOffsets), - WriteSegmentTimelineInRepresentation: __expectString(output.writeSegmentTimelineInRepresentation), - } as any; + return take(output, { + AdditionalManifests: (_) => [, de___listOfDashAdditionalManifest(_, context), `additionalManifests`], + AudioChannelConfigSchemeIdUri: [, __expectString, `audioChannelConfigSchemeIdUri`], + BaseUrl: [, __expectString, `baseUrl`], + DashManifestStyle: [, __expectString, `dashManifestStyle`], + Destination: [, __expectString, `destination`], + DestinationSettings: (_) => [, de_DestinationSettings(_, context), `destinationSettings`], + Encryption: (_) => [, de_DashIsoEncryptionSettings(_, context), `encryption`], + FragmentLength: [, __expectInt32, `fragmentLength`], + HbbtvCompliance: [, __expectString, `hbbtvCompliance`], + ImageBasedTrickPlay: [, __expectString, `imageBasedTrickPlay`], + ImageBasedTrickPlaySettings: (_) => [ + , + de_DashIsoImageBasedTrickPlaySettings(_, context), + `imageBasedTrickPlaySettings`, + ], + MinBufferTime: [, __expectInt32, `minBufferTime`], + MinFinalSegmentLength: [, __limitedParseDouble, `minFinalSegmentLength`], + MpdManifestBandwidthType: [, __expectString, `mpdManifestBandwidthType`], + MpdProfile: [, __expectString, `mpdProfile`], + PtsOffsetHandlingForBFrames: [, __expectString, `ptsOffsetHandlingForBFrames`], + SegmentControl: [, __expectString, `segmentControl`], + SegmentLength: [, __expectInt32, `segmentLength`], + SegmentLengthControl: [, __expectString, `segmentLengthControl`], + VideoCompositionOffsets: [, __expectString, `videoCompositionOffsets`], + WriteSegmentTimelineInRepresentation: [, __expectString, `writeSegmentTimelineInRepresentation`], + }) as any; }; /** @@ -7290,217 +6559,217 @@ const de_DashIsoImageBasedTrickPlaySettings = ( output: any, context: __SerdeContext ): DashIsoImageBasedTrickPlaySettings => { - return { - IntervalCadence: __expectString(output.intervalCadence), - ThumbnailHeight: __expectInt32(output.thumbnailHeight), - ThumbnailInterval: __limitedParseDouble(output.thumbnailInterval), - ThumbnailWidth: __expectInt32(output.thumbnailWidth), - TileHeight: __expectInt32(output.tileHeight), - TileWidth: __expectInt32(output.tileWidth), - } as any; + return take(output, { + IntervalCadence: [, __expectString, `intervalCadence`], + ThumbnailHeight: [, __expectInt32, `thumbnailHeight`], + ThumbnailInterval: [, __limitedParseDouble, `thumbnailInterval`], + ThumbnailWidth: [, __expectInt32, `thumbnailWidth`], + TileHeight: [, __expectInt32, `tileHeight`], + TileWidth: [, __expectInt32, `tileWidth`], + }) as any; }; /** * deserializeAws_restJson1Deinterlacer */ const de_Deinterlacer = (output: any, context: __SerdeContext): Deinterlacer => { - return { - Algorithm: __expectString(output.algorithm), - Control: __expectString(output.control), - Mode: __expectString(output.mode), - } as any; + return take(output, { + Algorithm: [, __expectString, `algorithm`], + Control: [, __expectString, `control`], + Mode: [, __expectString, `mode`], + }) as any; }; /** * deserializeAws_restJson1DestinationSettings */ const de_DestinationSettings = (output: any, context: __SerdeContext): DestinationSettings => { - return { - S3Settings: output.s3Settings != null ? de_S3DestinationSettings(output.s3Settings, context) : undefined, - } as any; + return take(output, { + S3Settings: (_) => [, de_S3DestinationSettings(_, context), `s3Settings`], + }) as any; }; /** * deserializeAws_restJson1DolbyVision */ const de_DolbyVision = (output: any, context: __SerdeContext): DolbyVision => { - return { - L6Metadata: output.l6Metadata != null ? de_DolbyVisionLevel6Metadata(output.l6Metadata, context) : undefined, - L6Mode: __expectString(output.l6Mode), - Mapping: __expectString(output.mapping), - Profile: __expectString(output.profile), - } as any; + return take(output, { + L6Metadata: (_) => [, de_DolbyVisionLevel6Metadata(_, context), `l6Metadata`], + L6Mode: [, __expectString, `l6Mode`], + Mapping: [, __expectString, `mapping`], + Profile: [, __expectString, `profile`], + }) as any; }; /** * deserializeAws_restJson1DolbyVisionLevel6Metadata */ const de_DolbyVisionLevel6Metadata = (output: any, context: __SerdeContext): DolbyVisionLevel6Metadata => { - return { - MaxCll: __expectInt32(output.maxCll), - MaxFall: __expectInt32(output.maxFall), - } as any; + return take(output, { + MaxCll: [, __expectInt32, `maxCll`], + MaxFall: [, __expectInt32, `maxFall`], + }) as any; }; /** * deserializeAws_restJson1DvbNitSettings */ const de_DvbNitSettings = (output: any, context: __SerdeContext): DvbNitSettings => { - return { - NetworkId: __expectInt32(output.networkId), - NetworkName: __expectString(output.networkName), - NitInterval: __expectInt32(output.nitInterval), - } as any; + return take(output, { + NetworkId: [, __expectInt32, `networkId`], + NetworkName: [, __expectString, `networkName`], + NitInterval: [, __expectInt32, `nitInterval`], + }) as any; }; /** * deserializeAws_restJson1DvbSdtSettings */ const de_DvbSdtSettings = (output: any, context: __SerdeContext): DvbSdtSettings => { - return { - OutputSdt: __expectString(output.outputSdt), - SdtInterval: __expectInt32(output.sdtInterval), - ServiceName: __expectString(output.serviceName), - ServiceProviderName: __expectString(output.serviceProviderName), - } as any; + return take(output, { + OutputSdt: [, __expectString, `outputSdt`], + SdtInterval: [, __expectInt32, `sdtInterval`], + ServiceName: [, __expectString, `serviceName`], + ServiceProviderName: [, __expectString, `serviceProviderName`], + }) as any; }; /** * deserializeAws_restJson1DvbSubDestinationSettings */ const de_DvbSubDestinationSettings = (output: any, context: __SerdeContext): DvbSubDestinationSettings => { - return { - Alignment: __expectString(output.alignment), - ApplyFontColor: __expectString(output.applyFontColor), - BackgroundColor: __expectString(output.backgroundColor), - BackgroundOpacity: __expectInt32(output.backgroundOpacity), - DdsHandling: __expectString(output.ddsHandling), - DdsXCoordinate: __expectInt32(output.ddsXCoordinate), - DdsYCoordinate: __expectInt32(output.ddsYCoordinate), - FallbackFont: __expectString(output.fallbackFont), - FontColor: __expectString(output.fontColor), - FontOpacity: __expectInt32(output.fontOpacity), - FontResolution: __expectInt32(output.fontResolution), - FontScript: __expectString(output.fontScript), - FontSize: __expectInt32(output.fontSize), - Height: __expectInt32(output.height), - HexFontColor: __expectString(output.hexFontColor), - OutlineColor: __expectString(output.outlineColor), - OutlineSize: __expectInt32(output.outlineSize), - ShadowColor: __expectString(output.shadowColor), - ShadowOpacity: __expectInt32(output.shadowOpacity), - ShadowXOffset: __expectInt32(output.shadowXOffset), - ShadowYOffset: __expectInt32(output.shadowYOffset), - StylePassthrough: __expectString(output.stylePassthrough), - SubtitlingType: __expectString(output.subtitlingType), - TeletextSpacing: __expectString(output.teletextSpacing), - Width: __expectInt32(output.width), - XPosition: __expectInt32(output.xPosition), - YPosition: __expectInt32(output.yPosition), - } as any; + return take(output, { + Alignment: [, __expectString, `alignment`], + ApplyFontColor: [, __expectString, `applyFontColor`], + BackgroundColor: [, __expectString, `backgroundColor`], + BackgroundOpacity: [, __expectInt32, `backgroundOpacity`], + DdsHandling: [, __expectString, `ddsHandling`], + DdsXCoordinate: [, __expectInt32, `ddsXCoordinate`], + DdsYCoordinate: [, __expectInt32, `ddsYCoordinate`], + FallbackFont: [, __expectString, `fallbackFont`], + FontColor: [, __expectString, `fontColor`], + FontOpacity: [, __expectInt32, `fontOpacity`], + FontResolution: [, __expectInt32, `fontResolution`], + FontScript: [, __expectString, `fontScript`], + FontSize: [, __expectInt32, `fontSize`], + Height: [, __expectInt32, `height`], + HexFontColor: [, __expectString, `hexFontColor`], + OutlineColor: [, __expectString, `outlineColor`], + OutlineSize: [, __expectInt32, `outlineSize`], + ShadowColor: [, __expectString, `shadowColor`], + ShadowOpacity: [, __expectInt32, `shadowOpacity`], + ShadowXOffset: [, __expectInt32, `shadowXOffset`], + ShadowYOffset: [, __expectInt32, `shadowYOffset`], + StylePassthrough: [, __expectString, `stylePassthrough`], + SubtitlingType: [, __expectString, `subtitlingType`], + TeletextSpacing: [, __expectString, `teletextSpacing`], + Width: [, __expectInt32, `width`], + XPosition: [, __expectInt32, `xPosition`], + YPosition: [, __expectInt32, `yPosition`], + }) as any; }; /** * deserializeAws_restJson1DvbSubSourceSettings */ const de_DvbSubSourceSettings = (output: any, context: __SerdeContext): DvbSubSourceSettings => { - return { - Pid: __expectInt32(output.pid), - } as any; + return take(output, { + Pid: [, __expectInt32, `pid`], + }) as any; }; /** * deserializeAws_restJson1DvbTdtSettings */ const de_DvbTdtSettings = (output: any, context: __SerdeContext): DvbTdtSettings => { - return { - TdtInterval: __expectInt32(output.tdtInterval), - } as any; + return take(output, { + TdtInterval: [, __expectInt32, `tdtInterval`], + }) as any; }; /** * deserializeAws_restJson1Eac3AtmosSettings */ const de_Eac3AtmosSettings = (output: any, context: __SerdeContext): Eac3AtmosSettings => { - return { - Bitrate: __expectInt32(output.bitrate), - BitstreamMode: __expectString(output.bitstreamMode), - CodingMode: __expectString(output.codingMode), - DialogueIntelligence: __expectString(output.dialogueIntelligence), - DownmixControl: __expectString(output.downmixControl), - DynamicRangeCompressionLine: __expectString(output.dynamicRangeCompressionLine), - DynamicRangeCompressionRf: __expectString(output.dynamicRangeCompressionRf), - DynamicRangeControl: __expectString(output.dynamicRangeControl), - LoRoCenterMixLevel: __limitedParseDouble(output.loRoCenterMixLevel), - LoRoSurroundMixLevel: __limitedParseDouble(output.loRoSurroundMixLevel), - LtRtCenterMixLevel: __limitedParseDouble(output.ltRtCenterMixLevel), - LtRtSurroundMixLevel: __limitedParseDouble(output.ltRtSurroundMixLevel), - MeteringMode: __expectString(output.meteringMode), - SampleRate: __expectInt32(output.sampleRate), - SpeechThreshold: __expectInt32(output.speechThreshold), - StereoDownmix: __expectString(output.stereoDownmix), - SurroundExMode: __expectString(output.surroundExMode), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + BitstreamMode: [, __expectString, `bitstreamMode`], + CodingMode: [, __expectString, `codingMode`], + DialogueIntelligence: [, __expectString, `dialogueIntelligence`], + DownmixControl: [, __expectString, `downmixControl`], + DynamicRangeCompressionLine: [, __expectString, `dynamicRangeCompressionLine`], + DynamicRangeCompressionRf: [, __expectString, `dynamicRangeCompressionRf`], + DynamicRangeControl: [, __expectString, `dynamicRangeControl`], + LoRoCenterMixLevel: [, __limitedParseDouble, `loRoCenterMixLevel`], + LoRoSurroundMixLevel: [, __limitedParseDouble, `loRoSurroundMixLevel`], + LtRtCenterMixLevel: [, __limitedParseDouble, `ltRtCenterMixLevel`], + LtRtSurroundMixLevel: [, __limitedParseDouble, `ltRtSurroundMixLevel`], + MeteringMode: [, __expectString, `meteringMode`], + SampleRate: [, __expectInt32, `sampleRate`], + SpeechThreshold: [, __expectInt32, `speechThreshold`], + StereoDownmix: [, __expectString, `stereoDownmix`], + SurroundExMode: [, __expectString, `surroundExMode`], + }) as any; }; /** * deserializeAws_restJson1Eac3Settings */ const de_Eac3Settings = (output: any, context: __SerdeContext): Eac3Settings => { - return { - AttenuationControl: __expectString(output.attenuationControl), - Bitrate: __expectInt32(output.bitrate), - BitstreamMode: __expectString(output.bitstreamMode), - CodingMode: __expectString(output.codingMode), - DcFilter: __expectString(output.dcFilter), - Dialnorm: __expectInt32(output.dialnorm), - DynamicRangeCompressionLine: __expectString(output.dynamicRangeCompressionLine), - DynamicRangeCompressionRf: __expectString(output.dynamicRangeCompressionRf), - LfeControl: __expectString(output.lfeControl), - LfeFilter: __expectString(output.lfeFilter), - LoRoCenterMixLevel: __limitedParseDouble(output.loRoCenterMixLevel), - LoRoSurroundMixLevel: __limitedParseDouble(output.loRoSurroundMixLevel), - LtRtCenterMixLevel: __limitedParseDouble(output.ltRtCenterMixLevel), - LtRtSurroundMixLevel: __limitedParseDouble(output.ltRtSurroundMixLevel), - MetadataControl: __expectString(output.metadataControl), - PassthroughControl: __expectString(output.passthroughControl), - PhaseControl: __expectString(output.phaseControl), - SampleRate: __expectInt32(output.sampleRate), - StereoDownmix: __expectString(output.stereoDownmix), - SurroundExMode: __expectString(output.surroundExMode), - SurroundMode: __expectString(output.surroundMode), - } as any; + return take(output, { + AttenuationControl: [, __expectString, `attenuationControl`], + Bitrate: [, __expectInt32, `bitrate`], + BitstreamMode: [, __expectString, `bitstreamMode`], + CodingMode: [, __expectString, `codingMode`], + DcFilter: [, __expectString, `dcFilter`], + Dialnorm: [, __expectInt32, `dialnorm`], + DynamicRangeCompressionLine: [, __expectString, `dynamicRangeCompressionLine`], + DynamicRangeCompressionRf: [, __expectString, `dynamicRangeCompressionRf`], + LfeControl: [, __expectString, `lfeControl`], + LfeFilter: [, __expectString, `lfeFilter`], + LoRoCenterMixLevel: [, __limitedParseDouble, `loRoCenterMixLevel`], + LoRoSurroundMixLevel: [, __limitedParseDouble, `loRoSurroundMixLevel`], + LtRtCenterMixLevel: [, __limitedParseDouble, `ltRtCenterMixLevel`], + LtRtSurroundMixLevel: [, __limitedParseDouble, `ltRtSurroundMixLevel`], + MetadataControl: [, __expectString, `metadataControl`], + PassthroughControl: [, __expectString, `passthroughControl`], + PhaseControl: [, __expectString, `phaseControl`], + SampleRate: [, __expectInt32, `sampleRate`], + StereoDownmix: [, __expectString, `stereoDownmix`], + SurroundExMode: [, __expectString, `surroundExMode`], + SurroundMode: [, __expectString, `surroundMode`], + }) as any; }; /** * deserializeAws_restJson1EmbeddedDestinationSettings */ const de_EmbeddedDestinationSettings = (output: any, context: __SerdeContext): EmbeddedDestinationSettings => { - return { - Destination608ChannelNumber: __expectInt32(output.destination608ChannelNumber), - Destination708ServiceNumber: __expectInt32(output.destination708ServiceNumber), - } as any; + return take(output, { + Destination608ChannelNumber: [, __expectInt32, `destination608ChannelNumber`], + Destination708ServiceNumber: [, __expectInt32, `destination708ServiceNumber`], + }) as any; }; /** * deserializeAws_restJson1EmbeddedSourceSettings */ const de_EmbeddedSourceSettings = (output: any, context: __SerdeContext): EmbeddedSourceSettings => { - return { - Convert608To708: __expectString(output.convert608To708), - Source608ChannelNumber: __expectInt32(output.source608ChannelNumber), - Source608TrackNumber: __expectInt32(output.source608TrackNumber), - TerminateCaptions: __expectString(output.terminateCaptions), - } as any; + return take(output, { + Convert608To708: [, __expectString, `convert608To708`], + Source608ChannelNumber: [, __expectInt32, `source608ChannelNumber`], + Source608TrackNumber: [, __expectInt32, `source608TrackNumber`], + TerminateCaptions: [, __expectString, `terminateCaptions`], + }) as any; }; /** * deserializeAws_restJson1Endpoint */ const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Url: __expectString(output.url), - } as any; + return take(output, { + Url: [, __expectString, `url`], + }) as any; }; /** @@ -7510,26 +6779,28 @@ const de_EsamManifestConfirmConditionNotification = ( output: any, context: __SerdeContext ): EsamManifestConfirmConditionNotification => { - return { - MccXml: __expectString(output.mccXml), - } as any; + return take(output, { + MccXml: [, __expectString, `mccXml`], + }) as any; }; /** * deserializeAws_restJson1EsamSettings */ const de_EsamSettings = (output: any, context: __SerdeContext): EsamSettings => { - return { - ManifestConfirmConditionNotification: - output.manifestConfirmConditionNotification != null - ? de_EsamManifestConfirmConditionNotification(output.manifestConfirmConditionNotification, context) - : undefined, - ResponseSignalPreroll: __expectInt32(output.responseSignalPreroll), - SignalProcessingNotification: - output.signalProcessingNotification != null - ? de_EsamSignalProcessingNotification(output.signalProcessingNotification, context) - : undefined, - } as any; + return take(output, { + ManifestConfirmConditionNotification: (_) => [ + , + de_EsamManifestConfirmConditionNotification(_, context), + `manifestConfirmConditionNotification`, + ], + ResponseSignalPreroll: [, __expectInt32, `responseSignalPreroll`], + SignalProcessingNotification: (_) => [ + , + de_EsamSignalProcessingNotification(_, context), + `signalProcessingNotification`, + ], + }) as any; }; /** @@ -7539,1010 +6810,944 @@ const de_EsamSignalProcessingNotification = ( output: any, context: __SerdeContext ): EsamSignalProcessingNotification => { - return { - SccXml: __expectString(output.sccXml), - } as any; + return take(output, { + SccXml: [, __expectString, `sccXml`], + }) as any; }; /** * deserializeAws_restJson1ExtendedDataServices */ const de_ExtendedDataServices = (output: any, context: __SerdeContext): ExtendedDataServices => { - return { - CopyProtectionAction: __expectString(output.copyProtectionAction), - VchipAction: __expectString(output.vchipAction), - } as any; + return take(output, { + CopyProtectionAction: [, __expectString, `copyProtectionAction`], + VchipAction: [, __expectString, `vchipAction`], + }) as any; }; /** * deserializeAws_restJson1F4vSettings */ const de_F4vSettings = (output: any, context: __SerdeContext): F4vSettings => { - return { - MoovPlacement: __expectString(output.moovPlacement), - } as any; + return take(output, { + MoovPlacement: [, __expectString, `moovPlacement`], + }) as any; }; /** * deserializeAws_restJson1FileGroupSettings */ const de_FileGroupSettings = (output: any, context: __SerdeContext): FileGroupSettings => { - return { - Destination: __expectString(output.destination), - DestinationSettings: - output.destinationSettings != null ? de_DestinationSettings(output.destinationSettings, context) : undefined, - } as any; + return take(output, { + Destination: [, __expectString, `destination`], + DestinationSettings: (_) => [, de_DestinationSettings(_, context), `destinationSettings`], + }) as any; }; /** * deserializeAws_restJson1FileSourceSettings */ const de_FileSourceSettings = (output: any, context: __SerdeContext): FileSourceSettings => { - return { - Convert608To708: __expectString(output.convert608To708), - Framerate: output.framerate != null ? de_CaptionSourceFramerate(output.framerate, context) : undefined, - SourceFile: __expectString(output.sourceFile), - TimeDelta: __expectInt32(output.timeDelta), - TimeDeltaUnits: __expectString(output.timeDeltaUnits), - } as any; + return take(output, { + Convert608To708: [, __expectString, `convert608To708`], + Framerate: (_) => [, de_CaptionSourceFramerate(_, context), `framerate`], + SourceFile: [, __expectString, `sourceFile`], + TimeDelta: [, __expectInt32, `timeDelta`], + TimeDeltaUnits: [, __expectString, `timeDeltaUnits`], + }) as any; }; /** * deserializeAws_restJson1ForceIncludeRenditionSize */ const de_ForceIncludeRenditionSize = (output: any, context: __SerdeContext): ForceIncludeRenditionSize => { - return { - Height: __expectInt32(output.height), - Width: __expectInt32(output.width), - } as any; + return take(output, { + Height: [, __expectInt32, `height`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1FrameCaptureSettings */ const de_FrameCaptureSettings = (output: any, context: __SerdeContext): FrameCaptureSettings => { - return { - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - MaxCaptures: __expectInt32(output.maxCaptures), - Quality: __expectInt32(output.quality), - } as any; + return take(output, { + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + MaxCaptures: [, __expectInt32, `maxCaptures`], + Quality: [, __expectInt32, `quality`], + }) as any; }; /** * deserializeAws_restJson1H264QvbrSettings */ const de_H264QvbrSettings = (output: any, context: __SerdeContext): H264QvbrSettings => { - return { - MaxAverageBitrate: __expectInt32(output.maxAverageBitrate), - QvbrQualityLevel: __expectInt32(output.qvbrQualityLevel), - QvbrQualityLevelFineTune: __limitedParseDouble(output.qvbrQualityLevelFineTune), - } as any; + return take(output, { + MaxAverageBitrate: [, __expectInt32, `maxAverageBitrate`], + QvbrQualityLevel: [, __expectInt32, `qvbrQualityLevel`], + QvbrQualityLevelFineTune: [, __limitedParseDouble, `qvbrQualityLevelFineTune`], + }) as any; }; /** * deserializeAws_restJson1H264Settings */ const de_H264Settings = (output: any, context: __SerdeContext): H264Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - BandwidthReductionFilter: - output.bandwidthReductionFilter != null - ? de_BandwidthReductionFilter(output.bandwidthReductionFilter, context) - : undefined, - Bitrate: __expectInt32(output.bitrate), - CodecLevel: __expectString(output.codecLevel), - CodecProfile: __expectString(output.codecProfile), - DynamicSubGop: __expectString(output.dynamicSubGop), - EntropyEncoding: __expectString(output.entropyEncoding), - FieldEncoding: __expectString(output.fieldEncoding), - FlickerAdaptiveQuantization: __expectString(output.flickerAdaptiveQuantization), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopBReference: __expectString(output.gopBReference), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - GopSize: __limitedParseDouble(output.gopSize), - GopSizeUnits: __expectString(output.gopSizeUnits), - HrdBufferFinalFillPercentage: __expectInt32(output.hrdBufferFinalFillPercentage), - HrdBufferInitialFillPercentage: __expectInt32(output.hrdBufferInitialFillPercentage), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - InterlaceMode: __expectString(output.interlaceMode), - MaxBitrate: __expectInt32(output.maxBitrate), - MinIInterval: __expectInt32(output.minIInterval), - NumberBFramesBetweenReferenceFrames: __expectInt32(output.numberBFramesBetweenReferenceFrames), - NumberReferenceFrames: __expectInt32(output.numberReferenceFrames), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - QvbrSettings: output.qvbrSettings != null ? de_H264QvbrSettings(output.qvbrSettings, context) : undefined, - RateControlMode: __expectString(output.rateControlMode), - RepeatPps: __expectString(output.repeatPps), - ScanTypeConversionMode: __expectString(output.scanTypeConversionMode), - SceneChangeDetect: __expectString(output.sceneChangeDetect), - Slices: __expectInt32(output.slices), - SlowPal: __expectString(output.slowPal), - Softness: __expectInt32(output.softness), - SpatialAdaptiveQuantization: __expectString(output.spatialAdaptiveQuantization), - Syntax: __expectString(output.syntax), - Telecine: __expectString(output.telecine), - TemporalAdaptiveQuantization: __expectString(output.temporalAdaptiveQuantization), - UnregisteredSeiTimecode: __expectString(output.unregisteredSeiTimecode), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + BandwidthReductionFilter: (_) => [, de_BandwidthReductionFilter(_, context), `bandwidthReductionFilter`], + Bitrate: [, __expectInt32, `bitrate`], + CodecLevel: [, __expectString, `codecLevel`], + CodecProfile: [, __expectString, `codecProfile`], + DynamicSubGop: [, __expectString, `dynamicSubGop`], + EntropyEncoding: [, __expectString, `entropyEncoding`], + FieldEncoding: [, __expectString, `fieldEncoding`], + FlickerAdaptiveQuantization: [, __expectString, `flickerAdaptiveQuantization`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopBReference: [, __expectString, `gopBReference`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + GopSize: [, __limitedParseDouble, `gopSize`], + GopSizeUnits: [, __expectString, `gopSizeUnits`], + HrdBufferFinalFillPercentage: [, __expectInt32, `hrdBufferFinalFillPercentage`], + HrdBufferInitialFillPercentage: [, __expectInt32, `hrdBufferInitialFillPercentage`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + InterlaceMode: [, __expectString, `interlaceMode`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MinIInterval: [, __expectInt32, `minIInterval`], + NumberBFramesBetweenReferenceFrames: [, __expectInt32, `numberBFramesBetweenReferenceFrames`], + NumberReferenceFrames: [, __expectInt32, `numberReferenceFrames`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + QvbrSettings: (_) => [, de_H264QvbrSettings(_, context), `qvbrSettings`], + RateControlMode: [, __expectString, `rateControlMode`], + RepeatPps: [, __expectString, `repeatPps`], + ScanTypeConversionMode: [, __expectString, `scanTypeConversionMode`], + SceneChangeDetect: [, __expectString, `sceneChangeDetect`], + Slices: [, __expectInt32, `slices`], + SlowPal: [, __expectString, `slowPal`], + Softness: [, __expectInt32, `softness`], + SpatialAdaptiveQuantization: [, __expectString, `spatialAdaptiveQuantization`], + Syntax: [, __expectString, `syntax`], + Telecine: [, __expectString, `telecine`], + TemporalAdaptiveQuantization: [, __expectString, `temporalAdaptiveQuantization`], + UnregisteredSeiTimecode: [, __expectString, `unregisteredSeiTimecode`], + }) as any; }; /** * deserializeAws_restJson1H265QvbrSettings */ const de_H265QvbrSettings = (output: any, context: __SerdeContext): H265QvbrSettings => { - return { - MaxAverageBitrate: __expectInt32(output.maxAverageBitrate), - QvbrQualityLevel: __expectInt32(output.qvbrQualityLevel), - QvbrQualityLevelFineTune: __limitedParseDouble(output.qvbrQualityLevelFineTune), - } as any; + return take(output, { + MaxAverageBitrate: [, __expectInt32, `maxAverageBitrate`], + QvbrQualityLevel: [, __expectInt32, `qvbrQualityLevel`], + QvbrQualityLevelFineTune: [, __limitedParseDouble, `qvbrQualityLevelFineTune`], + }) as any; }; /** * deserializeAws_restJson1H265Settings */ const de_H265Settings = (output: any, context: __SerdeContext): H265Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - AlternateTransferFunctionSei: __expectString(output.alternateTransferFunctionSei), - Bitrate: __expectInt32(output.bitrate), - CodecLevel: __expectString(output.codecLevel), - CodecProfile: __expectString(output.codecProfile), - DynamicSubGop: __expectString(output.dynamicSubGop), - FlickerAdaptiveQuantization: __expectString(output.flickerAdaptiveQuantization), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopBReference: __expectString(output.gopBReference), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - GopSize: __limitedParseDouble(output.gopSize), - GopSizeUnits: __expectString(output.gopSizeUnits), - HrdBufferFinalFillPercentage: __expectInt32(output.hrdBufferFinalFillPercentage), - HrdBufferInitialFillPercentage: __expectInt32(output.hrdBufferInitialFillPercentage), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - InterlaceMode: __expectString(output.interlaceMode), - MaxBitrate: __expectInt32(output.maxBitrate), - MinIInterval: __expectInt32(output.minIInterval), - NumberBFramesBetweenReferenceFrames: __expectInt32(output.numberBFramesBetweenReferenceFrames), - NumberReferenceFrames: __expectInt32(output.numberReferenceFrames), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - QvbrSettings: output.qvbrSettings != null ? de_H265QvbrSettings(output.qvbrSettings, context) : undefined, - RateControlMode: __expectString(output.rateControlMode), - SampleAdaptiveOffsetFilterMode: __expectString(output.sampleAdaptiveOffsetFilterMode), - ScanTypeConversionMode: __expectString(output.scanTypeConversionMode), - SceneChangeDetect: __expectString(output.sceneChangeDetect), - Slices: __expectInt32(output.slices), - SlowPal: __expectString(output.slowPal), - SpatialAdaptiveQuantization: __expectString(output.spatialAdaptiveQuantization), - Telecine: __expectString(output.telecine), - TemporalAdaptiveQuantization: __expectString(output.temporalAdaptiveQuantization), - TemporalIds: __expectString(output.temporalIds), - Tiles: __expectString(output.tiles), - UnregisteredSeiTimecode: __expectString(output.unregisteredSeiTimecode), - WriteMp4PackagingType: __expectString(output.writeMp4PackagingType), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + AlternateTransferFunctionSei: [, __expectString, `alternateTransferFunctionSei`], + Bitrate: [, __expectInt32, `bitrate`], + CodecLevel: [, __expectString, `codecLevel`], + CodecProfile: [, __expectString, `codecProfile`], + DynamicSubGop: [, __expectString, `dynamicSubGop`], + FlickerAdaptiveQuantization: [, __expectString, `flickerAdaptiveQuantization`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopBReference: [, __expectString, `gopBReference`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + GopSize: [, __limitedParseDouble, `gopSize`], + GopSizeUnits: [, __expectString, `gopSizeUnits`], + HrdBufferFinalFillPercentage: [, __expectInt32, `hrdBufferFinalFillPercentage`], + HrdBufferInitialFillPercentage: [, __expectInt32, `hrdBufferInitialFillPercentage`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + InterlaceMode: [, __expectString, `interlaceMode`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MinIInterval: [, __expectInt32, `minIInterval`], + NumberBFramesBetweenReferenceFrames: [, __expectInt32, `numberBFramesBetweenReferenceFrames`], + NumberReferenceFrames: [, __expectInt32, `numberReferenceFrames`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + QvbrSettings: (_) => [, de_H265QvbrSettings(_, context), `qvbrSettings`], + RateControlMode: [, __expectString, `rateControlMode`], + SampleAdaptiveOffsetFilterMode: [, __expectString, `sampleAdaptiveOffsetFilterMode`], + ScanTypeConversionMode: [, __expectString, `scanTypeConversionMode`], + SceneChangeDetect: [, __expectString, `sceneChangeDetect`], + Slices: [, __expectInt32, `slices`], + SlowPal: [, __expectString, `slowPal`], + SpatialAdaptiveQuantization: [, __expectString, `spatialAdaptiveQuantization`], + Telecine: [, __expectString, `telecine`], + TemporalAdaptiveQuantization: [, __expectString, `temporalAdaptiveQuantization`], + TemporalIds: [, __expectString, `temporalIds`], + Tiles: [, __expectString, `tiles`], + UnregisteredSeiTimecode: [, __expectString, `unregisteredSeiTimecode`], + WriteMp4PackagingType: [, __expectString, `writeMp4PackagingType`], + }) as any; }; /** * deserializeAws_restJson1Hdr10Metadata */ const de_Hdr10Metadata = (output: any, context: __SerdeContext): Hdr10Metadata => { - return { - BluePrimaryX: __expectInt32(output.bluePrimaryX), - BluePrimaryY: __expectInt32(output.bluePrimaryY), - GreenPrimaryX: __expectInt32(output.greenPrimaryX), - GreenPrimaryY: __expectInt32(output.greenPrimaryY), - MaxContentLightLevel: __expectInt32(output.maxContentLightLevel), - MaxFrameAverageLightLevel: __expectInt32(output.maxFrameAverageLightLevel), - MaxLuminance: __expectInt32(output.maxLuminance), - MinLuminance: __expectInt32(output.minLuminance), - RedPrimaryX: __expectInt32(output.redPrimaryX), - RedPrimaryY: __expectInt32(output.redPrimaryY), - WhitePointX: __expectInt32(output.whitePointX), - WhitePointY: __expectInt32(output.whitePointY), - } as any; + return take(output, { + BluePrimaryX: [, __expectInt32, `bluePrimaryX`], + BluePrimaryY: [, __expectInt32, `bluePrimaryY`], + GreenPrimaryX: [, __expectInt32, `greenPrimaryX`], + GreenPrimaryY: [, __expectInt32, `greenPrimaryY`], + MaxContentLightLevel: [, __expectInt32, `maxContentLightLevel`], + MaxFrameAverageLightLevel: [, __expectInt32, `maxFrameAverageLightLevel`], + MaxLuminance: [, __expectInt32, `maxLuminance`], + MinLuminance: [, __expectInt32, `minLuminance`], + RedPrimaryX: [, __expectInt32, `redPrimaryX`], + RedPrimaryY: [, __expectInt32, `redPrimaryY`], + WhitePointX: [, __expectInt32, `whitePointX`], + WhitePointY: [, __expectInt32, `whitePointY`], + }) as any; }; /** * deserializeAws_restJson1Hdr10Plus */ const de_Hdr10Plus = (output: any, context: __SerdeContext): Hdr10Plus => { - return { - MasteringMonitorNits: __expectInt32(output.masteringMonitorNits), - TargetMonitorNits: __expectInt32(output.targetMonitorNits), - } as any; + return take(output, { + MasteringMonitorNits: [, __expectInt32, `masteringMonitorNits`], + TargetMonitorNits: [, __expectInt32, `targetMonitorNits`], + }) as any; }; /** * deserializeAws_restJson1HlsAdditionalManifest */ const de_HlsAdditionalManifest = (output: any, context: __SerdeContext): HlsAdditionalManifest => { - return { - ManifestNameModifier: __expectString(output.manifestNameModifier), - SelectedOutputs: - output.selectedOutputs != null ? de___listOf__stringMin1(output.selectedOutputs, context) : undefined, - } as any; + return take(output, { + ManifestNameModifier: [, __expectString, `manifestNameModifier`], + SelectedOutputs: [, _json, `selectedOutputs`], + }) as any; }; /** * deserializeAws_restJson1HlsCaptionLanguageMapping */ const de_HlsCaptionLanguageMapping = (output: any, context: __SerdeContext): HlsCaptionLanguageMapping => { - return { - CaptionChannel: __expectInt32(output.captionChannel), - CustomLanguageCode: __expectString(output.customLanguageCode), - LanguageCode: __expectString(output.languageCode), - LanguageDescription: __expectString(output.languageDescription), - } as any; + return take(output, { + CaptionChannel: [, __expectInt32, `captionChannel`], + CustomLanguageCode: [, __expectString, `customLanguageCode`], + LanguageCode: [, __expectString, `languageCode`], + LanguageDescription: [, __expectString, `languageDescription`], + }) as any; }; /** * deserializeAws_restJson1HlsEncryptionSettings */ const de_HlsEncryptionSettings = (output: any, context: __SerdeContext): HlsEncryptionSettings => { - return { - ConstantInitializationVector: __expectString(output.constantInitializationVector), - EncryptionMethod: __expectString(output.encryptionMethod), - InitializationVectorInManifest: __expectString(output.initializationVectorInManifest), - OfflineEncrypted: __expectString(output.offlineEncrypted), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - StaticKeyProvider: - output.staticKeyProvider != null ? de_StaticKeyProvider(output.staticKeyProvider, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + EncryptionMethod: [, __expectString, `encryptionMethod`], + InitializationVectorInManifest: [, __expectString, `initializationVectorInManifest`], + OfflineEncrypted: [, __expectString, `offlineEncrypted`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + StaticKeyProvider: (_) => [, de_StaticKeyProvider(_, context), `staticKeyProvider`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1HlsGroupSettings */ const de_HlsGroupSettings = (output: any, context: __SerdeContext): HlsGroupSettings => { - return { - AdMarkers: output.adMarkers != null ? de___listOfHlsAdMarkers(output.adMarkers, context) : undefined, - AdditionalManifests: - output.additionalManifests != null - ? de___listOfHlsAdditionalManifest(output.additionalManifests, context) - : undefined, - AudioOnlyHeader: __expectString(output.audioOnlyHeader), - BaseUrl: __expectString(output.baseUrl), - CaptionLanguageMappings: - output.captionLanguageMappings != null - ? de___listOfHlsCaptionLanguageMapping(output.captionLanguageMappings, context) - : undefined, - CaptionLanguageSetting: __expectString(output.captionLanguageSetting), - CaptionSegmentLengthControl: __expectString(output.captionSegmentLengthControl), - ClientCache: __expectString(output.clientCache), - CodecSpecification: __expectString(output.codecSpecification), - Destination: __expectString(output.destination), - DestinationSettings: - output.destinationSettings != null ? de_DestinationSettings(output.destinationSettings, context) : undefined, - DirectoryStructure: __expectString(output.directoryStructure), - Encryption: output.encryption != null ? de_HlsEncryptionSettings(output.encryption, context) : undefined, - ImageBasedTrickPlay: __expectString(output.imageBasedTrickPlay), - ImageBasedTrickPlaySettings: - output.imageBasedTrickPlaySettings != null - ? de_HlsImageBasedTrickPlaySettings(output.imageBasedTrickPlaySettings, context) - : undefined, - ManifestCompression: __expectString(output.manifestCompression), - ManifestDurationFormat: __expectString(output.manifestDurationFormat), - MinFinalSegmentLength: __limitedParseDouble(output.minFinalSegmentLength), - MinSegmentLength: __expectInt32(output.minSegmentLength), - OutputSelection: __expectString(output.outputSelection), - ProgramDateTime: __expectString(output.programDateTime), - ProgramDateTimePeriod: __expectInt32(output.programDateTimePeriod), - SegmentControl: __expectString(output.segmentControl), - SegmentLength: __expectInt32(output.segmentLength), - SegmentLengthControl: __expectString(output.segmentLengthControl), - SegmentsPerSubdirectory: __expectInt32(output.segmentsPerSubdirectory), - StreamInfResolution: __expectString(output.streamInfResolution), - TargetDurationCompatibilityMode: __expectString(output.targetDurationCompatibilityMode), - TimedMetadataId3Frame: __expectString(output.timedMetadataId3Frame), - TimedMetadataId3Period: __expectInt32(output.timedMetadataId3Period), - TimestampDeltaMilliseconds: __expectInt32(output.timestampDeltaMilliseconds), - } as any; + return take(output, { + AdMarkers: [, _json, `adMarkers`], + AdditionalManifests: (_) => [, de___listOfHlsAdditionalManifest(_, context), `additionalManifests`], + AudioOnlyHeader: [, __expectString, `audioOnlyHeader`], + BaseUrl: [, __expectString, `baseUrl`], + CaptionLanguageMappings: (_) => [, de___listOfHlsCaptionLanguageMapping(_, context), `captionLanguageMappings`], + CaptionLanguageSetting: [, __expectString, `captionLanguageSetting`], + CaptionSegmentLengthControl: [, __expectString, `captionSegmentLengthControl`], + ClientCache: [, __expectString, `clientCache`], + CodecSpecification: [, __expectString, `codecSpecification`], + Destination: [, __expectString, `destination`], + DestinationSettings: (_) => [, de_DestinationSettings(_, context), `destinationSettings`], + DirectoryStructure: [, __expectString, `directoryStructure`], + Encryption: (_) => [, de_HlsEncryptionSettings(_, context), `encryption`], + ImageBasedTrickPlay: [, __expectString, `imageBasedTrickPlay`], + ImageBasedTrickPlaySettings: (_) => [ + , + de_HlsImageBasedTrickPlaySettings(_, context), + `imageBasedTrickPlaySettings`, + ], + ManifestCompression: [, __expectString, `manifestCompression`], + ManifestDurationFormat: [, __expectString, `manifestDurationFormat`], + MinFinalSegmentLength: [, __limitedParseDouble, `minFinalSegmentLength`], + MinSegmentLength: [, __expectInt32, `minSegmentLength`], + OutputSelection: [, __expectString, `outputSelection`], + ProgramDateTime: [, __expectString, `programDateTime`], + ProgramDateTimePeriod: [, __expectInt32, `programDateTimePeriod`], + SegmentControl: [, __expectString, `segmentControl`], + SegmentLength: [, __expectInt32, `segmentLength`], + SegmentLengthControl: [, __expectString, `segmentLengthControl`], + SegmentsPerSubdirectory: [, __expectInt32, `segmentsPerSubdirectory`], + StreamInfResolution: [, __expectString, `streamInfResolution`], + TargetDurationCompatibilityMode: [, __expectString, `targetDurationCompatibilityMode`], + TimedMetadataId3Frame: [, __expectString, `timedMetadataId3Frame`], + TimedMetadataId3Period: [, __expectInt32, `timedMetadataId3Period`], + TimestampDeltaMilliseconds: [, __expectInt32, `timestampDeltaMilliseconds`], + }) as any; }; /** * deserializeAws_restJson1HlsImageBasedTrickPlaySettings */ const de_HlsImageBasedTrickPlaySettings = (output: any, context: __SerdeContext): HlsImageBasedTrickPlaySettings => { - return { - IntervalCadence: __expectString(output.intervalCadence), - ThumbnailHeight: __expectInt32(output.thumbnailHeight), - ThumbnailInterval: __limitedParseDouble(output.thumbnailInterval), - ThumbnailWidth: __expectInt32(output.thumbnailWidth), - TileHeight: __expectInt32(output.tileHeight), - TileWidth: __expectInt32(output.tileWidth), - } as any; + return take(output, { + IntervalCadence: [, __expectString, `intervalCadence`], + ThumbnailHeight: [, __expectInt32, `thumbnailHeight`], + ThumbnailInterval: [, __limitedParseDouble, `thumbnailInterval`], + ThumbnailWidth: [, __expectInt32, `thumbnailWidth`], + TileHeight: [, __expectInt32, `tileHeight`], + TileWidth: [, __expectInt32, `tileWidth`], + }) as any; }; /** * deserializeAws_restJson1HlsRenditionGroupSettings */ const de_HlsRenditionGroupSettings = (output: any, context: __SerdeContext): HlsRenditionGroupSettings => { - return { - RenditionGroupId: __expectString(output.renditionGroupId), - RenditionLanguageCode: __expectString(output.renditionLanguageCode), - RenditionName: __expectString(output.renditionName), - } as any; + return take(output, { + RenditionGroupId: [, __expectString, `renditionGroupId`], + RenditionLanguageCode: [, __expectString, `renditionLanguageCode`], + RenditionName: [, __expectString, `renditionName`], + }) as any; }; /** * deserializeAws_restJson1HlsSettings */ const de_HlsSettings = (output: any, context: __SerdeContext): HlsSettings => { - return { - AudioGroupId: __expectString(output.audioGroupId), - AudioOnlyContainer: __expectString(output.audioOnlyContainer), - AudioRenditionSets: __expectString(output.audioRenditionSets), - AudioTrackType: __expectString(output.audioTrackType), - DescriptiveVideoServiceFlag: __expectString(output.descriptiveVideoServiceFlag), - IFrameOnlyManifest: __expectString(output.iFrameOnlyManifest), - SegmentModifier: __expectString(output.segmentModifier), - } as any; + return take(output, { + AudioGroupId: [, __expectString, `audioGroupId`], + AudioOnlyContainer: [, __expectString, `audioOnlyContainer`], + AudioRenditionSets: [, __expectString, `audioRenditionSets`], + AudioTrackType: [, __expectString, `audioTrackType`], + DescriptiveVideoServiceFlag: [, __expectString, `descriptiveVideoServiceFlag`], + IFrameOnlyManifest: [, __expectString, `iFrameOnlyManifest`], + SegmentModifier: [, __expectString, `segmentModifier`], + }) as any; }; /** * deserializeAws_restJson1HopDestination */ const de_HopDestination = (output: any, context: __SerdeContext): HopDestination => { - return { - Priority: __expectInt32(output.priority), - Queue: __expectString(output.queue), - WaitMinutes: __expectInt32(output.waitMinutes), - } as any; + return take(output, { + Priority: [, __expectInt32, `priority`], + Queue: [, __expectString, `queue`], + WaitMinutes: [, __expectInt32, `waitMinutes`], + }) as any; }; /** * deserializeAws_restJson1Id3Insertion */ const de_Id3Insertion = (output: any, context: __SerdeContext): Id3Insertion => { - return { - Id3: __expectString(output.id3), - Timecode: __expectString(output.timecode), - } as any; + return take(output, { + Id3: [, __expectString, `id3`], + Timecode: [, __expectString, `timecode`], + }) as any; }; /** * deserializeAws_restJson1ImageInserter */ const de_ImageInserter = (output: any, context: __SerdeContext): ImageInserter => { - return { - InsertableImages: - output.insertableImages != null ? de___listOfInsertableImage(output.insertableImages, context) : undefined, - SdrReferenceWhiteLevel: __expectInt32(output.sdrReferenceWhiteLevel), - } as any; + return take(output, { + InsertableImages: (_) => [, de___listOfInsertableImage(_, context), `insertableImages`], + SdrReferenceWhiteLevel: [, __expectInt32, `sdrReferenceWhiteLevel`], + }) as any; }; /** * deserializeAws_restJson1ImscDestinationSettings */ const de_ImscDestinationSettings = (output: any, context: __SerdeContext): ImscDestinationSettings => { - return { - Accessibility: __expectString(output.accessibility), - StylePassthrough: __expectString(output.stylePassthrough), - } as any; + return take(output, { + Accessibility: [, __expectString, `accessibility`], + StylePassthrough: [, __expectString, `stylePassthrough`], + }) as any; }; /** * deserializeAws_restJson1Input */ const de_Input = (output: any, context: __SerdeContext): Input => { - return { - AudioSelectorGroups: - output.audioSelectorGroups != null - ? de___mapOfAudioSelectorGroup(output.audioSelectorGroups, context) - : undefined, - AudioSelectors: output.audioSelectors != null ? de___mapOfAudioSelector(output.audioSelectors, context) : undefined, - CaptionSelectors: - output.captionSelectors != null ? de___mapOfCaptionSelector(output.captionSelectors, context) : undefined, - Crop: output.crop != null ? de_Rectangle(output.crop, context) : undefined, - DeblockFilter: __expectString(output.deblockFilter), - DecryptionSettings: - output.decryptionSettings != null ? de_InputDecryptionSettings(output.decryptionSettings, context) : undefined, - DenoiseFilter: __expectString(output.denoiseFilter), - DolbyVisionMetadataXml: __expectString(output.dolbyVisionMetadataXml), - FileInput: __expectString(output.fileInput), - FilterEnable: __expectString(output.filterEnable), - FilterStrength: __expectInt32(output.filterStrength), - ImageInserter: output.imageInserter != null ? de_ImageInserter(output.imageInserter, context) : undefined, - InputClippings: - output.inputClippings != null ? de___listOfInputClipping(output.inputClippings, context) : undefined, - InputScanType: __expectString(output.inputScanType), - Position: output.position != null ? de_Rectangle(output.position, context) : undefined, - ProgramNumber: __expectInt32(output.programNumber), - PsiControl: __expectString(output.psiControl), - SupplementalImps: - output.supplementalImps != null - ? de___listOf__stringPatternS3ASSETMAPXml(output.supplementalImps, context) - : undefined, - TimecodeSource: __expectString(output.timecodeSource), - TimecodeStart: __expectString(output.timecodeStart), - VideoGenerator: output.videoGenerator != null ? de_InputVideoGenerator(output.videoGenerator, context) : undefined, - VideoSelector: output.videoSelector != null ? de_VideoSelector(output.videoSelector, context) : undefined, - } as any; + return take(output, { + AudioSelectorGroups: (_) => [, de___mapOfAudioSelectorGroup(_, context), `audioSelectorGroups`], + AudioSelectors: (_) => [, de___mapOfAudioSelector(_, context), `audioSelectors`], + CaptionSelectors: (_) => [, de___mapOfCaptionSelector(_, context), `captionSelectors`], + Crop: (_) => [, de_Rectangle(_, context), `crop`], + DeblockFilter: [, __expectString, `deblockFilter`], + DecryptionSettings: (_) => [, de_InputDecryptionSettings(_, context), `decryptionSettings`], + DenoiseFilter: [, __expectString, `denoiseFilter`], + DolbyVisionMetadataXml: [, __expectString, `dolbyVisionMetadataXml`], + FileInput: [, __expectString, `fileInput`], + FilterEnable: [, __expectString, `filterEnable`], + FilterStrength: [, __expectInt32, `filterStrength`], + ImageInserter: (_) => [, de_ImageInserter(_, context), `imageInserter`], + InputClippings: (_) => [, de___listOfInputClipping(_, context), `inputClippings`], + InputScanType: [, __expectString, `inputScanType`], + Position: (_) => [, de_Rectangle(_, context), `position`], + ProgramNumber: [, __expectInt32, `programNumber`], + PsiControl: [, __expectString, `psiControl`], + SupplementalImps: [, _json, `supplementalImps`], + TimecodeSource: [, __expectString, `timecodeSource`], + TimecodeStart: [, __expectString, `timecodeStart`], + VideoGenerator: (_) => [, de_InputVideoGenerator(_, context), `videoGenerator`], + VideoSelector: (_) => [, de_VideoSelector(_, context), `videoSelector`], + }) as any; }; /** * deserializeAws_restJson1InputClipping */ const de_InputClipping = (output: any, context: __SerdeContext): InputClipping => { - return { - EndTimecode: __expectString(output.endTimecode), - StartTimecode: __expectString(output.startTimecode), - } as any; + return take(output, { + EndTimecode: [, __expectString, `endTimecode`], + StartTimecode: [, __expectString, `startTimecode`], + }) as any; }; /** * deserializeAws_restJson1InputDecryptionSettings */ const de_InputDecryptionSettings = (output: any, context: __SerdeContext): InputDecryptionSettings => { - return { - DecryptionMode: __expectString(output.decryptionMode), - EncryptedDecryptionKey: __expectString(output.encryptedDecryptionKey), - InitializationVector: __expectString(output.initializationVector), - KmsKeyRegion: __expectString(output.kmsKeyRegion), - } as any; + return take(output, { + DecryptionMode: [, __expectString, `decryptionMode`], + EncryptedDecryptionKey: [, __expectString, `encryptedDecryptionKey`], + InitializationVector: [, __expectString, `initializationVector`], + KmsKeyRegion: [, __expectString, `kmsKeyRegion`], + }) as any; }; /** * deserializeAws_restJson1InputTemplate */ const de_InputTemplate = (output: any, context: __SerdeContext): InputTemplate => { - return { - AudioSelectorGroups: - output.audioSelectorGroups != null - ? de___mapOfAudioSelectorGroup(output.audioSelectorGroups, context) - : undefined, - AudioSelectors: output.audioSelectors != null ? de___mapOfAudioSelector(output.audioSelectors, context) : undefined, - CaptionSelectors: - output.captionSelectors != null ? de___mapOfCaptionSelector(output.captionSelectors, context) : undefined, - Crop: output.crop != null ? de_Rectangle(output.crop, context) : undefined, - DeblockFilter: __expectString(output.deblockFilter), - DenoiseFilter: __expectString(output.denoiseFilter), - DolbyVisionMetadataXml: __expectString(output.dolbyVisionMetadataXml), - FilterEnable: __expectString(output.filterEnable), - FilterStrength: __expectInt32(output.filterStrength), - ImageInserter: output.imageInserter != null ? de_ImageInserter(output.imageInserter, context) : undefined, - InputClippings: - output.inputClippings != null ? de___listOfInputClipping(output.inputClippings, context) : undefined, - InputScanType: __expectString(output.inputScanType), - Position: output.position != null ? de_Rectangle(output.position, context) : undefined, - ProgramNumber: __expectInt32(output.programNumber), - PsiControl: __expectString(output.psiControl), - TimecodeSource: __expectString(output.timecodeSource), - TimecodeStart: __expectString(output.timecodeStart), - VideoSelector: output.videoSelector != null ? de_VideoSelector(output.videoSelector, context) : undefined, - } as any; + return take(output, { + AudioSelectorGroups: (_) => [, de___mapOfAudioSelectorGroup(_, context), `audioSelectorGroups`], + AudioSelectors: (_) => [, de___mapOfAudioSelector(_, context), `audioSelectors`], + CaptionSelectors: (_) => [, de___mapOfCaptionSelector(_, context), `captionSelectors`], + Crop: (_) => [, de_Rectangle(_, context), `crop`], + DeblockFilter: [, __expectString, `deblockFilter`], + DenoiseFilter: [, __expectString, `denoiseFilter`], + DolbyVisionMetadataXml: [, __expectString, `dolbyVisionMetadataXml`], + FilterEnable: [, __expectString, `filterEnable`], + FilterStrength: [, __expectInt32, `filterStrength`], + ImageInserter: (_) => [, de_ImageInserter(_, context), `imageInserter`], + InputClippings: (_) => [, de___listOfInputClipping(_, context), `inputClippings`], + InputScanType: [, __expectString, `inputScanType`], + Position: (_) => [, de_Rectangle(_, context), `position`], + ProgramNumber: [, __expectInt32, `programNumber`], + PsiControl: [, __expectString, `psiControl`], + TimecodeSource: [, __expectString, `timecodeSource`], + TimecodeStart: [, __expectString, `timecodeStart`], + VideoSelector: (_) => [, de_VideoSelector(_, context), `videoSelector`], + }) as any; }; /** * deserializeAws_restJson1InputVideoGenerator */ const de_InputVideoGenerator = (output: any, context: __SerdeContext): InputVideoGenerator => { - return { - Duration: __expectInt32(output.duration), - } as any; + return take(output, { + Duration: [, __expectInt32, `duration`], + }) as any; }; /** * deserializeAws_restJson1InsertableImage */ const de_InsertableImage = (output: any, context: __SerdeContext): InsertableImage => { - return { - Duration: __expectInt32(output.duration), - FadeIn: __expectInt32(output.fadeIn), - FadeOut: __expectInt32(output.fadeOut), - Height: __expectInt32(output.height), - ImageInserterInput: __expectString(output.imageInserterInput), - ImageX: __expectInt32(output.imageX), - ImageY: __expectInt32(output.imageY), - Layer: __expectInt32(output.layer), - Opacity: __expectInt32(output.opacity), - StartTime: __expectString(output.startTime), - Width: __expectInt32(output.width), - } as any; + return take(output, { + Duration: [, __expectInt32, `duration`], + FadeIn: [, __expectInt32, `fadeIn`], + FadeOut: [, __expectInt32, `fadeOut`], + Height: [, __expectInt32, `height`], + ImageInserterInput: [, __expectString, `imageInserterInput`], + ImageX: [, __expectInt32, `imageX`], + ImageY: [, __expectInt32, `imageY`], + Layer: [, __expectInt32, `layer`], + Opacity: [, __expectInt32, `opacity`], + StartTime: [, __expectString, `startTime`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1Job */ const de_Job = (output: any, context: __SerdeContext): Job => { - return { - AccelerationSettings: - output.accelerationSettings != null ? de_AccelerationSettings(output.accelerationSettings, context) : undefined, - AccelerationStatus: __expectString(output.accelerationStatus), - Arn: __expectString(output.arn), - BillingTagsSource: __expectString(output.billingTagsSource), - ClientRequestToken: __expectString(output.clientRequestToken), - CreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - CurrentPhase: __expectString(output.currentPhase), - ErrorCode: __expectInt32(output.errorCode), - ErrorMessage: __expectString(output.errorMessage), - HopDestinations: - output.hopDestinations != null ? de___listOfHopDestination(output.hopDestinations, context) : undefined, - Id: __expectString(output.id), - JobPercentComplete: __expectInt32(output.jobPercentComplete), - JobTemplate: __expectString(output.jobTemplate), - Messages: output.messages != null ? de_JobMessages(output.messages, context) : undefined, - OutputGroupDetails: - output.outputGroupDetails != null ? de___listOfOutputGroupDetail(output.outputGroupDetails, context) : undefined, - Priority: __expectInt32(output.priority), - Queue: __expectString(output.queue), - QueueTransitions: - output.queueTransitions != null ? de___listOfQueueTransition(output.queueTransitions, context) : undefined, - RetryCount: __expectInt32(output.retryCount), - Role: __expectString(output.role), - Settings: output.settings != null ? de_JobSettings(output.settings, context) : undefined, - SimulateReservedQueue: __expectString(output.simulateReservedQueue), - Status: __expectString(output.status), - StatusUpdateInterval: __expectString(output.statusUpdateInterval), - Timing: output.timing != null ? de_Timing(output.timing, context) : undefined, - UserMetadata: output.userMetadata != null ? de___mapOf__string(output.userMetadata, context) : undefined, - Warnings: output.warnings != null ? de___listOfWarningGroup(output.warnings, context) : undefined, - } as any; + return take(output, { + AccelerationSettings: (_) => [, de_AccelerationSettings(_, context), `accelerationSettings`], + AccelerationStatus: [, __expectString, `accelerationStatus`], + Arn: [, __expectString, `arn`], + BillingTagsSource: [, __expectString, `billingTagsSource`], + ClientRequestToken: [, __expectString, `clientRequestToken`], + CreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + CurrentPhase: [, __expectString, `currentPhase`], + ErrorCode: [, __expectInt32, `errorCode`], + ErrorMessage: [, __expectString, `errorMessage`], + HopDestinations: (_) => [, de___listOfHopDestination(_, context), `hopDestinations`], + Id: [, __expectString, `id`], + JobPercentComplete: [, __expectInt32, `jobPercentComplete`], + JobTemplate: [, __expectString, `jobTemplate`], + Messages: (_) => [, de_JobMessages(_, context), `messages`], + OutputGroupDetails: (_) => [, de___listOfOutputGroupDetail(_, context), `outputGroupDetails`], + Priority: [, __expectInt32, `priority`], + Queue: [, __expectString, `queue`], + QueueTransitions: (_) => [, de___listOfQueueTransition(_, context), `queueTransitions`], + RetryCount: [, __expectInt32, `retryCount`], + Role: [, __expectString, `role`], + Settings: (_) => [, de_JobSettings(_, context), `settings`], + SimulateReservedQueue: [, __expectString, `simulateReservedQueue`], + Status: [, __expectString, `status`], + StatusUpdateInterval: [, __expectString, `statusUpdateInterval`], + Timing: (_) => [, de_Timing(_, context), `timing`], + UserMetadata: [, _json, `userMetadata`], + Warnings: (_) => [, de___listOfWarningGroup(_, context), `warnings`], + }) as any; }; /** * deserializeAws_restJson1JobMessages */ const de_JobMessages = (output: any, context: __SerdeContext): JobMessages => { - return { - Info: output.info != null ? de___listOf__string(output.info, context) : undefined, - Warning: output.warning != null ? de___listOf__string(output.warning, context) : undefined, - } as any; + return take(output, { + Info: [, _json, `info`], + Warning: [, _json, `warning`], + }) as any; }; /** * deserializeAws_restJson1JobSettings */ const de_JobSettings = (output: any, context: __SerdeContext): JobSettings => { - return { - AdAvailOffset: __expectInt32(output.adAvailOffset), - AvailBlanking: output.availBlanking != null ? de_AvailBlanking(output.availBlanking, context) : undefined, - Esam: output.esam != null ? de_EsamSettings(output.esam, context) : undefined, - ExtendedDataServices: - output.extendedDataServices != null ? de_ExtendedDataServices(output.extendedDataServices, context) : undefined, - Inputs: output.inputs != null ? de___listOfInput(output.inputs, context) : undefined, - KantarWatermark: - output.kantarWatermark != null ? de_KantarWatermarkSettings(output.kantarWatermark, context) : undefined, - MotionImageInserter: - output.motionImageInserter != null ? de_MotionImageInserter(output.motionImageInserter, context) : undefined, - NielsenConfiguration: - output.nielsenConfiguration != null ? de_NielsenConfiguration(output.nielsenConfiguration, context) : undefined, - NielsenNonLinearWatermark: - output.nielsenNonLinearWatermark != null - ? de_NielsenNonLinearWatermarkSettings(output.nielsenNonLinearWatermark, context) - : undefined, - OutputGroups: output.outputGroups != null ? de___listOfOutputGroup(output.outputGroups, context) : undefined, - TimecodeConfig: output.timecodeConfig != null ? de_TimecodeConfig(output.timecodeConfig, context) : undefined, - TimedMetadataInsertion: - output.timedMetadataInsertion != null - ? de_TimedMetadataInsertion(output.timedMetadataInsertion, context) - : undefined, - } as any; + return take(output, { + AdAvailOffset: [, __expectInt32, `adAvailOffset`], + AvailBlanking: (_) => [, de_AvailBlanking(_, context), `availBlanking`], + Esam: (_) => [, de_EsamSettings(_, context), `esam`], + ExtendedDataServices: (_) => [, de_ExtendedDataServices(_, context), `extendedDataServices`], + Inputs: (_) => [, de___listOfInput(_, context), `inputs`], + KantarWatermark: (_) => [, de_KantarWatermarkSettings(_, context), `kantarWatermark`], + MotionImageInserter: (_) => [, de_MotionImageInserter(_, context), `motionImageInserter`], + NielsenConfiguration: (_) => [, de_NielsenConfiguration(_, context), `nielsenConfiguration`], + NielsenNonLinearWatermark: (_) => [, de_NielsenNonLinearWatermarkSettings(_, context), `nielsenNonLinearWatermark`], + OutputGroups: (_) => [, de___listOfOutputGroup(_, context), `outputGroups`], + TimecodeConfig: (_) => [, de_TimecodeConfig(_, context), `timecodeConfig`], + TimedMetadataInsertion: (_) => [, de_TimedMetadataInsertion(_, context), `timedMetadataInsertion`], + }) as any; }; /** * deserializeAws_restJson1JobTemplate */ const de_JobTemplate = (output: any, context: __SerdeContext): JobTemplate => { - return { - AccelerationSettings: - output.accelerationSettings != null ? de_AccelerationSettings(output.accelerationSettings, context) : undefined, - Arn: __expectString(output.arn), - Category: __expectString(output.category), - CreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - Description: __expectString(output.description), - HopDestinations: - output.hopDestinations != null ? de___listOfHopDestination(output.hopDestinations, context) : undefined, - LastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - Name: __expectString(output.name), - Priority: __expectInt32(output.priority), - Queue: __expectString(output.queue), - Settings: output.settings != null ? de_JobTemplateSettings(output.settings, context) : undefined, - StatusUpdateInterval: __expectString(output.statusUpdateInterval), - Type: __expectString(output.type), - } as any; + return take(output, { + AccelerationSettings: (_) => [, de_AccelerationSettings(_, context), `accelerationSettings`], + Arn: [, __expectString, `arn`], + Category: [, __expectString, `category`], + CreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + Description: [, __expectString, `description`], + HopDestinations: (_) => [, de___listOfHopDestination(_, context), `hopDestinations`], + LastUpdated: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `lastUpdated`], + Name: [, __expectString, `name`], + Priority: [, __expectInt32, `priority`], + Queue: [, __expectString, `queue`], + Settings: (_) => [, de_JobTemplateSettings(_, context), `settings`], + StatusUpdateInterval: [, __expectString, `statusUpdateInterval`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1JobTemplateSettings */ const de_JobTemplateSettings = (output: any, context: __SerdeContext): JobTemplateSettings => { - return { - AdAvailOffset: __expectInt32(output.adAvailOffset), - AvailBlanking: output.availBlanking != null ? de_AvailBlanking(output.availBlanking, context) : undefined, - Esam: output.esam != null ? de_EsamSettings(output.esam, context) : undefined, - ExtendedDataServices: - output.extendedDataServices != null ? de_ExtendedDataServices(output.extendedDataServices, context) : undefined, - Inputs: output.inputs != null ? de___listOfInputTemplate(output.inputs, context) : undefined, - KantarWatermark: - output.kantarWatermark != null ? de_KantarWatermarkSettings(output.kantarWatermark, context) : undefined, - MotionImageInserter: - output.motionImageInserter != null ? de_MotionImageInserter(output.motionImageInserter, context) : undefined, - NielsenConfiguration: - output.nielsenConfiguration != null ? de_NielsenConfiguration(output.nielsenConfiguration, context) : undefined, - NielsenNonLinearWatermark: - output.nielsenNonLinearWatermark != null - ? de_NielsenNonLinearWatermarkSettings(output.nielsenNonLinearWatermark, context) - : undefined, - OutputGroups: output.outputGroups != null ? de___listOfOutputGroup(output.outputGroups, context) : undefined, - TimecodeConfig: output.timecodeConfig != null ? de_TimecodeConfig(output.timecodeConfig, context) : undefined, - TimedMetadataInsertion: - output.timedMetadataInsertion != null - ? de_TimedMetadataInsertion(output.timedMetadataInsertion, context) - : undefined, - } as any; + return take(output, { + AdAvailOffset: [, __expectInt32, `adAvailOffset`], + AvailBlanking: (_) => [, de_AvailBlanking(_, context), `availBlanking`], + Esam: (_) => [, de_EsamSettings(_, context), `esam`], + ExtendedDataServices: (_) => [, de_ExtendedDataServices(_, context), `extendedDataServices`], + Inputs: (_) => [, de___listOfInputTemplate(_, context), `inputs`], + KantarWatermark: (_) => [, de_KantarWatermarkSettings(_, context), `kantarWatermark`], + MotionImageInserter: (_) => [, de_MotionImageInserter(_, context), `motionImageInserter`], + NielsenConfiguration: (_) => [, de_NielsenConfiguration(_, context), `nielsenConfiguration`], + NielsenNonLinearWatermark: (_) => [, de_NielsenNonLinearWatermarkSettings(_, context), `nielsenNonLinearWatermark`], + OutputGroups: (_) => [, de___listOfOutputGroup(_, context), `outputGroups`], + TimecodeConfig: (_) => [, de_TimecodeConfig(_, context), `timecodeConfig`], + TimedMetadataInsertion: (_) => [, de_TimedMetadataInsertion(_, context), `timedMetadataInsertion`], + }) as any; }; /** * deserializeAws_restJson1KantarWatermarkSettings */ const de_KantarWatermarkSettings = (output: any, context: __SerdeContext): KantarWatermarkSettings => { - return { - ChannelName: __expectString(output.channelName), - ContentReference: __expectString(output.contentReference), - CredentialsSecretName: __expectString(output.credentialsSecretName), - FileOffset: __limitedParseDouble(output.fileOffset), - KantarLicenseId: __expectInt32(output.kantarLicenseId), - KantarServerUrl: __expectString(output.kantarServerUrl), - LogDestination: __expectString(output.logDestination), - Metadata3: __expectString(output.metadata3), - Metadata4: __expectString(output.metadata4), - Metadata5: __expectString(output.metadata5), - Metadata6: __expectString(output.metadata6), - Metadata7: __expectString(output.metadata7), - Metadata8: __expectString(output.metadata8), - } as any; + return take(output, { + ChannelName: [, __expectString, `channelName`], + ContentReference: [, __expectString, `contentReference`], + CredentialsSecretName: [, __expectString, `credentialsSecretName`], + FileOffset: [, __limitedParseDouble, `fileOffset`], + KantarLicenseId: [, __expectInt32, `kantarLicenseId`], + KantarServerUrl: [, __expectString, `kantarServerUrl`], + LogDestination: [, __expectString, `logDestination`], + Metadata3: [, __expectString, `metadata3`], + Metadata4: [, __expectString, `metadata4`], + Metadata5: [, __expectString, `metadata5`], + Metadata6: [, __expectString, `metadata6`], + Metadata7: [, __expectString, `metadata7`], + Metadata8: [, __expectString, `metadata8`], + }) as any; }; /** * deserializeAws_restJson1M2tsScte35Esam */ const de_M2tsScte35Esam = (output: any, context: __SerdeContext): M2tsScte35Esam => { - return { - Scte35EsamPid: __expectInt32(output.scte35EsamPid), - } as any; + return take(output, { + Scte35EsamPid: [, __expectInt32, `scte35EsamPid`], + }) as any; }; /** * deserializeAws_restJson1M2tsSettings */ const de_M2tsSettings = (output: any, context: __SerdeContext): M2tsSettings => { - return { - AudioBufferModel: __expectString(output.audioBufferModel), - AudioDuration: __expectString(output.audioDuration), - AudioFramesPerPes: __expectInt32(output.audioFramesPerPes), - AudioPids: output.audioPids != null ? de___listOf__integerMin32Max8182(output.audioPids, context) : undefined, - Bitrate: __expectInt32(output.bitrate), - BufferModel: __expectString(output.bufferModel), - DataPTSControl: __expectString(output.dataPTSControl), - DvbNitSettings: output.dvbNitSettings != null ? de_DvbNitSettings(output.dvbNitSettings, context) : undefined, - DvbSdtSettings: output.dvbSdtSettings != null ? de_DvbSdtSettings(output.dvbSdtSettings, context) : undefined, - DvbSubPids: output.dvbSubPids != null ? de___listOf__integerMin32Max8182(output.dvbSubPids, context) : undefined, - DvbTdtSettings: output.dvbTdtSettings != null ? de_DvbTdtSettings(output.dvbTdtSettings, context) : undefined, - DvbTeletextPid: __expectInt32(output.dvbTeletextPid), - EbpAudioInterval: __expectString(output.ebpAudioInterval), - EbpPlacement: __expectString(output.ebpPlacement), - EsRateInPes: __expectString(output.esRateInPes), - ForceTsVideoEbpOrder: __expectString(output.forceTsVideoEbpOrder), - FragmentTime: __limitedParseDouble(output.fragmentTime), - KlvMetadata: __expectString(output.klvMetadata), - MaxPcrInterval: __expectInt32(output.maxPcrInterval), - MinEbpInterval: __expectInt32(output.minEbpInterval), - NielsenId3: __expectString(output.nielsenId3), - NullPacketBitrate: __limitedParseDouble(output.nullPacketBitrate), - PatInterval: __expectInt32(output.patInterval), - PcrControl: __expectString(output.pcrControl), - PcrPid: __expectInt32(output.pcrPid), - PmtInterval: __expectInt32(output.pmtInterval), - PmtPid: __expectInt32(output.pmtPid), - PrivateMetadataPid: __expectInt32(output.privateMetadataPid), - ProgramNumber: __expectInt32(output.programNumber), - RateMode: __expectString(output.rateMode), - Scte35Esam: output.scte35Esam != null ? de_M2tsScte35Esam(output.scte35Esam, context) : undefined, - Scte35Pid: __expectInt32(output.scte35Pid), - Scte35Source: __expectString(output.scte35Source), - SegmentationMarkers: __expectString(output.segmentationMarkers), - SegmentationStyle: __expectString(output.segmentationStyle), - SegmentationTime: __limitedParseDouble(output.segmentationTime), - TimedMetadataPid: __expectInt32(output.timedMetadataPid), - TransportStreamId: __expectInt32(output.transportStreamId), - VideoPid: __expectInt32(output.videoPid), - } as any; + return take(output, { + AudioBufferModel: [, __expectString, `audioBufferModel`], + AudioDuration: [, __expectString, `audioDuration`], + AudioFramesPerPes: [, __expectInt32, `audioFramesPerPes`], + AudioPids: [, _json, `audioPids`], + Bitrate: [, __expectInt32, `bitrate`], + BufferModel: [, __expectString, `bufferModel`], + DataPTSControl: [, __expectString, `dataPTSControl`], + DvbNitSettings: (_) => [, de_DvbNitSettings(_, context), `dvbNitSettings`], + DvbSdtSettings: (_) => [, de_DvbSdtSettings(_, context), `dvbSdtSettings`], + DvbSubPids: [, _json, `dvbSubPids`], + DvbTdtSettings: (_) => [, de_DvbTdtSettings(_, context), `dvbTdtSettings`], + DvbTeletextPid: [, __expectInt32, `dvbTeletextPid`], + EbpAudioInterval: [, __expectString, `ebpAudioInterval`], + EbpPlacement: [, __expectString, `ebpPlacement`], + EsRateInPes: [, __expectString, `esRateInPes`], + ForceTsVideoEbpOrder: [, __expectString, `forceTsVideoEbpOrder`], + FragmentTime: [, __limitedParseDouble, `fragmentTime`], + KlvMetadata: [, __expectString, `klvMetadata`], + MaxPcrInterval: [, __expectInt32, `maxPcrInterval`], + MinEbpInterval: [, __expectInt32, `minEbpInterval`], + NielsenId3: [, __expectString, `nielsenId3`], + NullPacketBitrate: [, __limitedParseDouble, `nullPacketBitrate`], + PatInterval: [, __expectInt32, `patInterval`], + PcrControl: [, __expectString, `pcrControl`], + PcrPid: [, __expectInt32, `pcrPid`], + PmtInterval: [, __expectInt32, `pmtInterval`], + PmtPid: [, __expectInt32, `pmtPid`], + PrivateMetadataPid: [, __expectInt32, `privateMetadataPid`], + ProgramNumber: [, __expectInt32, `programNumber`], + RateMode: [, __expectString, `rateMode`], + Scte35Esam: (_) => [, de_M2tsScte35Esam(_, context), `scte35Esam`], + Scte35Pid: [, __expectInt32, `scte35Pid`], + Scte35Source: [, __expectString, `scte35Source`], + SegmentationMarkers: [, __expectString, `segmentationMarkers`], + SegmentationStyle: [, __expectString, `segmentationStyle`], + SegmentationTime: [, __limitedParseDouble, `segmentationTime`], + TimedMetadataPid: [, __expectInt32, `timedMetadataPid`], + TransportStreamId: [, __expectInt32, `transportStreamId`], + VideoPid: [, __expectInt32, `videoPid`], + }) as any; }; /** * deserializeAws_restJson1M3u8Settings */ const de_M3u8Settings = (output: any, context: __SerdeContext): M3u8Settings => { - return { - AudioDuration: __expectString(output.audioDuration), - AudioFramesPerPes: __expectInt32(output.audioFramesPerPes), - AudioPids: output.audioPids != null ? de___listOf__integerMin32Max8182(output.audioPids, context) : undefined, - DataPTSControl: __expectString(output.dataPTSControl), - MaxPcrInterval: __expectInt32(output.maxPcrInterval), - NielsenId3: __expectString(output.nielsenId3), - PatInterval: __expectInt32(output.patInterval), - PcrControl: __expectString(output.pcrControl), - PcrPid: __expectInt32(output.pcrPid), - PmtInterval: __expectInt32(output.pmtInterval), - PmtPid: __expectInt32(output.pmtPid), - PrivateMetadataPid: __expectInt32(output.privateMetadataPid), - ProgramNumber: __expectInt32(output.programNumber), - Scte35Pid: __expectInt32(output.scte35Pid), - Scte35Source: __expectString(output.scte35Source), - TimedMetadata: __expectString(output.timedMetadata), - TimedMetadataPid: __expectInt32(output.timedMetadataPid), - TransportStreamId: __expectInt32(output.transportStreamId), - VideoPid: __expectInt32(output.videoPid), - } as any; + return take(output, { + AudioDuration: [, __expectString, `audioDuration`], + AudioFramesPerPes: [, __expectInt32, `audioFramesPerPes`], + AudioPids: [, _json, `audioPids`], + DataPTSControl: [, __expectString, `dataPTSControl`], + MaxPcrInterval: [, __expectInt32, `maxPcrInterval`], + NielsenId3: [, __expectString, `nielsenId3`], + PatInterval: [, __expectInt32, `patInterval`], + PcrControl: [, __expectString, `pcrControl`], + PcrPid: [, __expectInt32, `pcrPid`], + PmtInterval: [, __expectInt32, `pmtInterval`], + PmtPid: [, __expectInt32, `pmtPid`], + PrivateMetadataPid: [, __expectInt32, `privateMetadataPid`], + ProgramNumber: [, __expectInt32, `programNumber`], + Scte35Pid: [, __expectInt32, `scte35Pid`], + Scte35Source: [, __expectString, `scte35Source`], + TimedMetadata: [, __expectString, `timedMetadata`], + TimedMetadataPid: [, __expectInt32, `timedMetadataPid`], + TransportStreamId: [, __expectInt32, `transportStreamId`], + VideoPid: [, __expectInt32, `videoPid`], + }) as any; }; /** * deserializeAws_restJson1MinBottomRenditionSize */ const de_MinBottomRenditionSize = (output: any, context: __SerdeContext): MinBottomRenditionSize => { - return { - Height: __expectInt32(output.height), - Width: __expectInt32(output.width), - } as any; + return take(output, { + Height: [, __expectInt32, `height`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1MinTopRenditionSize */ const de_MinTopRenditionSize = (output: any, context: __SerdeContext): MinTopRenditionSize => { - return { - Height: __expectInt32(output.height), - Width: __expectInt32(output.width), - } as any; + return take(output, { + Height: [, __expectInt32, `height`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1MotionImageInserter */ const de_MotionImageInserter = (output: any, context: __SerdeContext): MotionImageInserter => { - return { - Framerate: output.framerate != null ? de_MotionImageInsertionFramerate(output.framerate, context) : undefined, - Input: __expectString(output.input), - InsertionMode: __expectString(output.insertionMode), - Offset: output.offset != null ? de_MotionImageInsertionOffset(output.offset, context) : undefined, - Playback: __expectString(output.playback), - StartTime: __expectString(output.startTime), - } as any; + return take(output, { + Framerate: (_) => [, de_MotionImageInsertionFramerate(_, context), `framerate`], + Input: [, __expectString, `input`], + InsertionMode: [, __expectString, `insertionMode`], + Offset: (_) => [, de_MotionImageInsertionOffset(_, context), `offset`], + Playback: [, __expectString, `playback`], + StartTime: [, __expectString, `startTime`], + }) as any; }; /** * deserializeAws_restJson1MotionImageInsertionFramerate */ const de_MotionImageInsertionFramerate = (output: any, context: __SerdeContext): MotionImageInsertionFramerate => { - return { - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - } as any; + return take(output, { + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + }) as any; }; /** * deserializeAws_restJson1MotionImageInsertionOffset */ const de_MotionImageInsertionOffset = (output: any, context: __SerdeContext): MotionImageInsertionOffset => { - return { - ImageX: __expectInt32(output.imageX), - ImageY: __expectInt32(output.imageY), - } as any; + return take(output, { + ImageX: [, __expectInt32, `imageX`], + ImageY: [, __expectInt32, `imageY`], + }) as any; }; /** * deserializeAws_restJson1MovSettings */ const de_MovSettings = (output: any, context: __SerdeContext): MovSettings => { - return { - ClapAtom: __expectString(output.clapAtom), - CslgAtom: __expectString(output.cslgAtom), - Mpeg2FourCCControl: __expectString(output.mpeg2FourCCControl), - PaddingControl: __expectString(output.paddingControl), - Reference: __expectString(output.reference), - } as any; + return take(output, { + ClapAtom: [, __expectString, `clapAtom`], + CslgAtom: [, __expectString, `cslgAtom`], + Mpeg2FourCCControl: [, __expectString, `mpeg2FourCCControl`], + PaddingControl: [, __expectString, `paddingControl`], + Reference: [, __expectString, `reference`], + }) as any; }; /** * deserializeAws_restJson1Mp2Settings */ const de_Mp2Settings = (output: any, context: __SerdeContext): Mp2Settings => { - return { - Bitrate: __expectInt32(output.bitrate), - Channels: __expectInt32(output.channels), - SampleRate: __expectInt32(output.sampleRate), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + Channels: [, __expectInt32, `channels`], + SampleRate: [, __expectInt32, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1Mp3Settings */ const de_Mp3Settings = (output: any, context: __SerdeContext): Mp3Settings => { - return { - Bitrate: __expectInt32(output.bitrate), - Channels: __expectInt32(output.channels), - RateControlMode: __expectString(output.rateControlMode), - SampleRate: __expectInt32(output.sampleRate), - VbrQuality: __expectInt32(output.vbrQuality), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + Channels: [, __expectInt32, `channels`], + RateControlMode: [, __expectString, `rateControlMode`], + SampleRate: [, __expectInt32, `sampleRate`], + VbrQuality: [, __expectInt32, `vbrQuality`], + }) as any; }; /** * deserializeAws_restJson1Mp4Settings */ const de_Mp4Settings = (output: any, context: __SerdeContext): Mp4Settings => { - return { - AudioDuration: __expectString(output.audioDuration), - CslgAtom: __expectString(output.cslgAtom), - CttsVersion: __expectInt32(output.cttsVersion), - FreeSpaceBox: __expectString(output.freeSpaceBox), - MoovPlacement: __expectString(output.moovPlacement), - Mp4MajorBrand: __expectString(output.mp4MajorBrand), - } as any; + return take(output, { + AudioDuration: [, __expectString, `audioDuration`], + CslgAtom: [, __expectString, `cslgAtom`], + CttsVersion: [, __expectInt32, `cttsVersion`], + FreeSpaceBox: [, __expectString, `freeSpaceBox`], + MoovPlacement: [, __expectString, `moovPlacement`], + Mp4MajorBrand: [, __expectString, `mp4MajorBrand`], + }) as any; }; /** * deserializeAws_restJson1MpdSettings */ const de_MpdSettings = (output: any, context: __SerdeContext): MpdSettings => { - return { - AccessibilityCaptionHints: __expectString(output.accessibilityCaptionHints), - AudioDuration: __expectString(output.audioDuration), - CaptionContainerType: __expectString(output.captionContainerType), - KlvMetadata: __expectString(output.klvMetadata), - ManifestMetadataSignaling: __expectString(output.manifestMetadataSignaling), - Scte35Esam: __expectString(output.scte35Esam), - Scte35Source: __expectString(output.scte35Source), - TimedMetadata: __expectString(output.timedMetadata), - TimedMetadataBoxVersion: __expectString(output.timedMetadataBoxVersion), - TimedMetadataSchemeIdUri: __expectString(output.timedMetadataSchemeIdUri), - TimedMetadataValue: __expectString(output.timedMetadataValue), - } as any; + return take(output, { + AccessibilityCaptionHints: [, __expectString, `accessibilityCaptionHints`], + AudioDuration: [, __expectString, `audioDuration`], + CaptionContainerType: [, __expectString, `captionContainerType`], + KlvMetadata: [, __expectString, `klvMetadata`], + ManifestMetadataSignaling: [, __expectString, `manifestMetadataSignaling`], + Scte35Esam: [, __expectString, `scte35Esam`], + Scte35Source: [, __expectString, `scte35Source`], + TimedMetadata: [, __expectString, `timedMetadata`], + TimedMetadataBoxVersion: [, __expectString, `timedMetadataBoxVersion`], + TimedMetadataSchemeIdUri: [, __expectString, `timedMetadataSchemeIdUri`], + TimedMetadataValue: [, __expectString, `timedMetadataValue`], + }) as any; }; /** * deserializeAws_restJson1Mpeg2Settings */ const de_Mpeg2Settings = (output: any, context: __SerdeContext): Mpeg2Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - Bitrate: __expectInt32(output.bitrate), - CodecLevel: __expectString(output.codecLevel), - CodecProfile: __expectString(output.codecProfile), - DynamicSubGop: __expectString(output.dynamicSubGop), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - GopSize: __limitedParseDouble(output.gopSize), - GopSizeUnits: __expectString(output.gopSizeUnits), - HrdBufferFinalFillPercentage: __expectInt32(output.hrdBufferFinalFillPercentage), - HrdBufferInitialFillPercentage: __expectInt32(output.hrdBufferInitialFillPercentage), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - InterlaceMode: __expectString(output.interlaceMode), - IntraDcPrecision: __expectString(output.intraDcPrecision), - MaxBitrate: __expectInt32(output.maxBitrate), - MinIInterval: __expectInt32(output.minIInterval), - NumberBFramesBetweenReferenceFrames: __expectInt32(output.numberBFramesBetweenReferenceFrames), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - RateControlMode: __expectString(output.rateControlMode), - ScanTypeConversionMode: __expectString(output.scanTypeConversionMode), - SceneChangeDetect: __expectString(output.sceneChangeDetect), - SlowPal: __expectString(output.slowPal), - Softness: __expectInt32(output.softness), - SpatialAdaptiveQuantization: __expectString(output.spatialAdaptiveQuantization), - Syntax: __expectString(output.syntax), - Telecine: __expectString(output.telecine), - TemporalAdaptiveQuantization: __expectString(output.temporalAdaptiveQuantization), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + Bitrate: [, __expectInt32, `bitrate`], + CodecLevel: [, __expectString, `codecLevel`], + CodecProfile: [, __expectString, `codecProfile`], + DynamicSubGop: [, __expectString, `dynamicSubGop`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + GopSize: [, __limitedParseDouble, `gopSize`], + GopSizeUnits: [, __expectString, `gopSizeUnits`], + HrdBufferFinalFillPercentage: [, __expectInt32, `hrdBufferFinalFillPercentage`], + HrdBufferInitialFillPercentage: [, __expectInt32, `hrdBufferInitialFillPercentage`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + InterlaceMode: [, __expectString, `interlaceMode`], + IntraDcPrecision: [, __expectString, `intraDcPrecision`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MinIInterval: [, __expectInt32, `minIInterval`], + NumberBFramesBetweenReferenceFrames: [, __expectInt32, `numberBFramesBetweenReferenceFrames`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + RateControlMode: [, __expectString, `rateControlMode`], + ScanTypeConversionMode: [, __expectString, `scanTypeConversionMode`], + SceneChangeDetect: [, __expectString, `sceneChangeDetect`], + SlowPal: [, __expectString, `slowPal`], + Softness: [, __expectInt32, `softness`], + SpatialAdaptiveQuantization: [, __expectString, `spatialAdaptiveQuantization`], + Syntax: [, __expectString, `syntax`], + Telecine: [, __expectString, `telecine`], + TemporalAdaptiveQuantization: [, __expectString, `temporalAdaptiveQuantization`], + }) as any; }; /** * deserializeAws_restJson1MsSmoothAdditionalManifest */ const de_MsSmoothAdditionalManifest = (output: any, context: __SerdeContext): MsSmoothAdditionalManifest => { - return { - ManifestNameModifier: __expectString(output.manifestNameModifier), - SelectedOutputs: - output.selectedOutputs != null ? de___listOf__stringMin1(output.selectedOutputs, context) : undefined, - } as any; + return take(output, { + ManifestNameModifier: [, __expectString, `manifestNameModifier`], + SelectedOutputs: [, _json, `selectedOutputs`], + }) as any; }; /** * deserializeAws_restJson1MsSmoothEncryptionSettings */ const de_MsSmoothEncryptionSettings = (output: any, context: __SerdeContext): MsSmoothEncryptionSettings => { - return { - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1MsSmoothGroupSettings */ const de_MsSmoothGroupSettings = (output: any, context: __SerdeContext): MsSmoothGroupSettings => { - return { - AdditionalManifests: - output.additionalManifests != null - ? de___listOfMsSmoothAdditionalManifest(output.additionalManifests, context) - : undefined, - AudioDeduplication: __expectString(output.audioDeduplication), - Destination: __expectString(output.destination), - DestinationSettings: - output.destinationSettings != null ? de_DestinationSettings(output.destinationSettings, context) : undefined, - Encryption: output.encryption != null ? de_MsSmoothEncryptionSettings(output.encryption, context) : undefined, - FragmentLength: __expectInt32(output.fragmentLength), - FragmentLengthControl: __expectString(output.fragmentLengthControl), - ManifestEncoding: __expectString(output.manifestEncoding), - } as any; + return take(output, { + AdditionalManifests: (_) => [, de___listOfMsSmoothAdditionalManifest(_, context), `additionalManifests`], + AudioDeduplication: [, __expectString, `audioDeduplication`], + Destination: [, __expectString, `destination`], + DestinationSettings: (_) => [, de_DestinationSettings(_, context), `destinationSettings`], + Encryption: (_) => [, de_MsSmoothEncryptionSettings(_, context), `encryption`], + FragmentLength: [, __expectInt32, `fragmentLength`], + FragmentLengthControl: [, __expectString, `fragmentLengthControl`], + ManifestEncoding: [, __expectString, `manifestEncoding`], + }) as any; }; /** * deserializeAws_restJson1MxfSettings */ const de_MxfSettings = (output: any, context: __SerdeContext): MxfSettings => { - return { - AfdSignaling: __expectString(output.afdSignaling), - Profile: __expectString(output.profile), - XavcProfileSettings: - output.xavcProfileSettings != null ? de_MxfXavcProfileSettings(output.xavcProfileSettings, context) : undefined, - } as any; + return take(output, { + AfdSignaling: [, __expectString, `afdSignaling`], + Profile: [, __expectString, `profile`], + XavcProfileSettings: (_) => [, de_MxfXavcProfileSettings(_, context), `xavcProfileSettings`], + }) as any; }; /** * deserializeAws_restJson1MxfXavcProfileSettings */ const de_MxfXavcProfileSettings = (output: any, context: __SerdeContext): MxfXavcProfileSettings => { - return { - DurationMode: __expectString(output.durationMode), - MaxAncDataSize: __expectInt32(output.maxAncDataSize), - } as any; + return take(output, { + DurationMode: [, __expectString, `durationMode`], + MaxAncDataSize: [, __expectInt32, `maxAncDataSize`], + }) as any; }; /** * deserializeAws_restJson1NexGuardFileMarkerSettings */ const de_NexGuardFileMarkerSettings = (output: any, context: __SerdeContext): NexGuardFileMarkerSettings => { - return { - License: __expectString(output.license), - Payload: __expectInt32(output.payload), - Preset: __expectString(output.preset), - Strength: __expectString(output.strength), - } as any; + return take(output, { + License: [, __expectString, `license`], + Payload: [, __expectInt32, `payload`], + Preset: [, __expectString, `preset`], + Strength: [, __expectString, `strength`], + }) as any; }; /** * deserializeAws_restJson1NielsenConfiguration */ const de_NielsenConfiguration = (output: any, context: __SerdeContext): NielsenConfiguration => { - return { - BreakoutCode: __expectInt32(output.breakoutCode), - DistributorId: __expectString(output.distributorId), - } as any; + return take(output, { + BreakoutCode: [, __expectInt32, `breakoutCode`], + DistributorId: [, __expectString, `distributorId`], + }) as any; }; /** @@ -8552,47 +7757,40 @@ const de_NielsenNonLinearWatermarkSettings = ( output: any, context: __SerdeContext ): NielsenNonLinearWatermarkSettings => { - return { - ActiveWatermarkProcess: __expectString(output.activeWatermarkProcess), - AdiFilename: __expectString(output.adiFilename), - AssetId: __expectString(output.assetId), - AssetName: __expectString(output.assetName), - CbetSourceId: __expectString(output.cbetSourceId), - EpisodeId: __expectString(output.episodeId), - MetadataDestination: __expectString(output.metadataDestination), - SourceId: __expectInt32(output.sourceId), - SourceWatermarkStatus: __expectString(output.sourceWatermarkStatus), - TicServerUrl: __expectString(output.ticServerUrl), - UniqueTicPerAudioTrack: __expectString(output.uniqueTicPerAudioTrack), - } as any; + return take(output, { + ActiveWatermarkProcess: [, __expectString, `activeWatermarkProcess`], + AdiFilename: [, __expectString, `adiFilename`], + AssetId: [, __expectString, `assetId`], + AssetName: [, __expectString, `assetName`], + CbetSourceId: [, __expectString, `cbetSourceId`], + EpisodeId: [, __expectString, `episodeId`], + MetadataDestination: [, __expectString, `metadataDestination`], + SourceId: [, __expectInt32, `sourceId`], + SourceWatermarkStatus: [, __expectString, `sourceWatermarkStatus`], + TicServerUrl: [, __expectString, `ticServerUrl`], + UniqueTicPerAudioTrack: [, __expectString, `uniqueTicPerAudioTrack`], + }) as any; }; /** * deserializeAws_restJson1NoiseReducer */ const de_NoiseReducer = (output: any, context: __SerdeContext): NoiseReducer => { - return { - Filter: __expectString(output.filter), - FilterSettings: - output.filterSettings != null ? de_NoiseReducerFilterSettings(output.filterSettings, context) : undefined, - SpatialFilterSettings: - output.spatialFilterSettings != null - ? de_NoiseReducerSpatialFilterSettings(output.spatialFilterSettings, context) - : undefined, - TemporalFilterSettings: - output.temporalFilterSettings != null - ? de_NoiseReducerTemporalFilterSettings(output.temporalFilterSettings, context) - : undefined, - } as any; + return take(output, { + Filter: [, __expectString, `filter`], + FilterSettings: (_) => [, de_NoiseReducerFilterSettings(_, context), `filterSettings`], + SpatialFilterSettings: (_) => [, de_NoiseReducerSpatialFilterSettings(_, context), `spatialFilterSettings`], + TemporalFilterSettings: (_) => [, de_NoiseReducerTemporalFilterSettings(_, context), `temporalFilterSettings`], + }) as any; }; /** * deserializeAws_restJson1NoiseReducerFilterSettings */ const de_NoiseReducerFilterSettings = (output: any, context: __SerdeContext): NoiseReducerFilterSettings => { - return { - Strength: __expectInt32(output.strength), - } as any; + return take(output, { + Strength: [, __expectInt32, `strength`], + }) as any; }; /** @@ -8602,11 +7800,11 @@ const de_NoiseReducerSpatialFilterSettings = ( output: any, context: __SerdeContext ): NoiseReducerSpatialFilterSettings => { - return { - PostFilterSharpenStrength: __expectInt32(output.postFilterSharpenStrength), - Speed: __expectInt32(output.speed), - Strength: __expectInt32(output.strength), - } as any; + return take(output, { + PostFilterSharpenStrength: [, __expectInt32, `postFilterSharpenStrength`], + Speed: [, __expectInt32, `speed`], + Strength: [, __expectInt32, `strength`], + }) as any; }; /** @@ -8616,778 +7814,712 @@ const de_NoiseReducerTemporalFilterSettings = ( output: any, context: __SerdeContext ): NoiseReducerTemporalFilterSettings => { - return { - AggressiveMode: __expectInt32(output.aggressiveMode), - PostTemporalSharpening: __expectString(output.postTemporalSharpening), - PostTemporalSharpeningStrength: __expectString(output.postTemporalSharpeningStrength), - Speed: __expectInt32(output.speed), - Strength: __expectInt32(output.strength), - } as any; + return take(output, { + AggressiveMode: [, __expectInt32, `aggressiveMode`], + PostTemporalSharpening: [, __expectString, `postTemporalSharpening`], + PostTemporalSharpeningStrength: [, __expectString, `postTemporalSharpeningStrength`], + Speed: [, __expectInt32, `speed`], + Strength: [, __expectInt32, `strength`], + }) as any; }; /** * deserializeAws_restJson1OpusSettings */ const de_OpusSettings = (output: any, context: __SerdeContext): OpusSettings => { - return { - Bitrate: __expectInt32(output.bitrate), - Channels: __expectInt32(output.channels), - SampleRate: __expectInt32(output.sampleRate), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + Channels: [, __expectInt32, `channels`], + SampleRate: [, __expectInt32, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1Output */ const de_Output = (output: any, context: __SerdeContext): Output => { - return { - AudioDescriptions: - output.audioDescriptions != null ? de___listOfAudioDescription(output.audioDescriptions, context) : undefined, - CaptionDescriptions: - output.captionDescriptions != null - ? de___listOfCaptionDescription(output.captionDescriptions, context) - : undefined, - ContainerSettings: - output.containerSettings != null ? de_ContainerSettings(output.containerSettings, context) : undefined, - Extension: __expectString(output.extension), - NameModifier: __expectString(output.nameModifier), - OutputSettings: output.outputSettings != null ? de_OutputSettings(output.outputSettings, context) : undefined, - Preset: __expectString(output.preset), - VideoDescription: - output.videoDescription != null ? de_VideoDescription(output.videoDescription, context) : undefined, - } as any; + return take(output, { + AudioDescriptions: (_) => [, de___listOfAudioDescription(_, context), `audioDescriptions`], + CaptionDescriptions: (_) => [, de___listOfCaptionDescription(_, context), `captionDescriptions`], + ContainerSettings: (_) => [, de_ContainerSettings(_, context), `containerSettings`], + Extension: [, __expectString, `extension`], + NameModifier: [, __expectString, `nameModifier`], + OutputSettings: (_) => [, de_OutputSettings(_, context), `outputSettings`], + Preset: [, __expectString, `preset`], + VideoDescription: (_) => [, de_VideoDescription(_, context), `videoDescription`], + }) as any; }; /** * deserializeAws_restJson1OutputChannelMapping */ const de_OutputChannelMapping = (output: any, context: __SerdeContext): OutputChannelMapping => { - return { - InputChannels: - output.inputChannels != null ? de___listOf__integerMinNegative60Max6(output.inputChannels, context) : undefined, - InputChannelsFineTune: - output.inputChannelsFineTune != null - ? de___listOf__doubleMinNegative60Max6(output.inputChannelsFineTune, context) - : undefined, - } as any; + return take(output, { + InputChannels: [, _json, `inputChannels`], + InputChannelsFineTune: (_) => [, de___listOf__doubleMinNegative60Max6(_, context), `inputChannelsFineTune`], + }) as any; }; /** * deserializeAws_restJson1OutputDetail */ const de_OutputDetail = (output: any, context: __SerdeContext): OutputDetail => { - return { - DurationInMs: __expectInt32(output.durationInMs), - VideoDetails: output.videoDetails != null ? de_VideoDetail(output.videoDetails, context) : undefined, - } as any; + return take(output, { + DurationInMs: [, __expectInt32, `durationInMs`], + VideoDetails: (_) => [, de_VideoDetail(_, context), `videoDetails`], + }) as any; }; /** * deserializeAws_restJson1OutputGroup */ const de_OutputGroup = (output: any, context: __SerdeContext): OutputGroup => { - return { - AutomatedEncodingSettings: - output.automatedEncodingSettings != null - ? de_AutomatedEncodingSettings(output.automatedEncodingSettings, context) - : undefined, - CustomName: __expectString(output.customName), - Name: __expectString(output.name), - OutputGroupSettings: - output.outputGroupSettings != null ? de_OutputGroupSettings(output.outputGroupSettings, context) : undefined, - Outputs: output.outputs != null ? de___listOfOutput(output.outputs, context) : undefined, - } as any; + return take(output, { + AutomatedEncodingSettings: (_) => [, de_AutomatedEncodingSettings(_, context), `automatedEncodingSettings`], + CustomName: [, __expectString, `customName`], + Name: [, __expectString, `name`], + OutputGroupSettings: (_) => [, de_OutputGroupSettings(_, context), `outputGroupSettings`], + Outputs: (_) => [, de___listOfOutput(_, context), `outputs`], + }) as any; }; /** * deserializeAws_restJson1OutputGroupDetail */ const de_OutputGroupDetail = (output: any, context: __SerdeContext): OutputGroupDetail => { - return { - OutputDetails: output.outputDetails != null ? de___listOfOutputDetail(output.outputDetails, context) : undefined, - } as any; + return take(output, { + OutputDetails: (_) => [, de___listOfOutputDetail(_, context), `outputDetails`], + }) as any; }; /** * deserializeAws_restJson1OutputGroupSettings */ const de_OutputGroupSettings = (output: any, context: __SerdeContext): OutputGroupSettings => { - return { - CmafGroupSettings: - output.cmafGroupSettings != null ? de_CmafGroupSettings(output.cmafGroupSettings, context) : undefined, - DashIsoGroupSettings: - output.dashIsoGroupSettings != null ? de_DashIsoGroupSettings(output.dashIsoGroupSettings, context) : undefined, - FileGroupSettings: - output.fileGroupSettings != null ? de_FileGroupSettings(output.fileGroupSettings, context) : undefined, - HlsGroupSettings: - output.hlsGroupSettings != null ? de_HlsGroupSettings(output.hlsGroupSettings, context) : undefined, - MsSmoothGroupSettings: - output.msSmoothGroupSettings != null - ? de_MsSmoothGroupSettings(output.msSmoothGroupSettings, context) - : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + CmafGroupSettings: (_) => [, de_CmafGroupSettings(_, context), `cmafGroupSettings`], + DashIsoGroupSettings: (_) => [, de_DashIsoGroupSettings(_, context), `dashIsoGroupSettings`], + FileGroupSettings: (_) => [, de_FileGroupSettings(_, context), `fileGroupSettings`], + HlsGroupSettings: (_) => [, de_HlsGroupSettings(_, context), `hlsGroupSettings`], + MsSmoothGroupSettings: (_) => [, de_MsSmoothGroupSettings(_, context), `msSmoothGroupSettings`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1OutputSettings */ const de_OutputSettings = (output: any, context: __SerdeContext): OutputSettings => { - return { - HlsSettings: output.hlsSettings != null ? de_HlsSettings(output.hlsSettings, context) : undefined, - } as any; + return take(output, { + HlsSettings: (_) => [, de_HlsSettings(_, context), `hlsSettings`], + }) as any; }; /** * deserializeAws_restJson1PartnerWatermarking */ const de_PartnerWatermarking = (output: any, context: __SerdeContext): PartnerWatermarking => { - return { - NexguardFileMarkerSettings: - output.nexguardFileMarkerSettings != null - ? de_NexGuardFileMarkerSettings(output.nexguardFileMarkerSettings, context) - : undefined, - } as any; + return take(output, { + NexguardFileMarkerSettings: (_) => [, de_NexGuardFileMarkerSettings(_, context), `nexguardFileMarkerSettings`], + }) as any; }; /** * deserializeAws_restJson1Policy */ const de_Policy = (output: any, context: __SerdeContext): Policy => { - return { - HttpInputs: __expectString(output.httpInputs), - HttpsInputs: __expectString(output.httpsInputs), - S3Inputs: __expectString(output.s3Inputs), - } as any; + return take(output, { + HttpInputs: [, __expectString, `httpInputs`], + HttpsInputs: [, __expectString, `httpsInputs`], + S3Inputs: [, __expectString, `s3Inputs`], + }) as any; }; /** * deserializeAws_restJson1Preset */ const de_Preset = (output: any, context: __SerdeContext): Preset => { - return { - Arn: __expectString(output.arn), - Category: __expectString(output.category), - CreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - Description: __expectString(output.description), - LastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - Name: __expectString(output.name), - Settings: output.settings != null ? de_PresetSettings(output.settings, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Category: [, __expectString, `category`], + CreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + Description: [, __expectString, `description`], + LastUpdated: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `lastUpdated`], + Name: [, __expectString, `name`], + Settings: (_) => [, de_PresetSettings(_, context), `settings`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1PresetSettings */ const de_PresetSettings = (output: any, context: __SerdeContext): PresetSettings => { - return { - AudioDescriptions: - output.audioDescriptions != null ? de___listOfAudioDescription(output.audioDescriptions, context) : undefined, - CaptionDescriptions: - output.captionDescriptions != null - ? de___listOfCaptionDescriptionPreset(output.captionDescriptions, context) - : undefined, - ContainerSettings: - output.containerSettings != null ? de_ContainerSettings(output.containerSettings, context) : undefined, - VideoDescription: - output.videoDescription != null ? de_VideoDescription(output.videoDescription, context) : undefined, - } as any; + return take(output, { + AudioDescriptions: (_) => [, de___listOfAudioDescription(_, context), `audioDescriptions`], + CaptionDescriptions: (_) => [, de___listOfCaptionDescriptionPreset(_, context), `captionDescriptions`], + ContainerSettings: (_) => [, de_ContainerSettings(_, context), `containerSettings`], + VideoDescription: (_) => [, de_VideoDescription(_, context), `videoDescription`], + }) as any; }; /** * deserializeAws_restJson1ProresSettings */ const de_ProresSettings = (output: any, context: __SerdeContext): ProresSettings => { - return { - ChromaSampling: __expectString(output.chromaSampling), - CodecProfile: __expectString(output.codecProfile), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - InterlaceMode: __expectString(output.interlaceMode), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - ScanTypeConversionMode: __expectString(output.scanTypeConversionMode), - SlowPal: __expectString(output.slowPal), - Telecine: __expectString(output.telecine), - } as any; + return take(output, { + ChromaSampling: [, __expectString, `chromaSampling`], + CodecProfile: [, __expectString, `codecProfile`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + InterlaceMode: [, __expectString, `interlaceMode`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + ScanTypeConversionMode: [, __expectString, `scanTypeConversionMode`], + SlowPal: [, __expectString, `slowPal`], + Telecine: [, __expectString, `telecine`], + }) as any; }; /** * deserializeAws_restJson1Queue */ const de_Queue = (output: any, context: __SerdeContext): Queue => { - return { - Arn: __expectString(output.arn), - CreatedAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - Description: __expectString(output.description), - LastUpdated: - output.lastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdated))) - : undefined, - Name: __expectString(output.name), - PricingPlan: __expectString(output.pricingPlan), - ProgressingJobsCount: __expectInt32(output.progressingJobsCount), - ReservationPlan: output.reservationPlan != null ? de_ReservationPlan(output.reservationPlan, context) : undefined, - Status: __expectString(output.status), - SubmittedJobsCount: __expectInt32(output.submittedJobsCount), - Type: __expectString(output.type), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CreatedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`], + Description: [, __expectString, `description`], + LastUpdated: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `lastUpdated`], + Name: [, __expectString, `name`], + PricingPlan: [, __expectString, `pricingPlan`], + ProgressingJobsCount: [, __expectInt32, `progressingJobsCount`], + ReservationPlan: (_) => [, de_ReservationPlan(_, context), `reservationPlan`], + Status: [, __expectString, `status`], + SubmittedJobsCount: [, __expectInt32, `submittedJobsCount`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1QueueTransition */ const de_QueueTransition = (output: any, context: __SerdeContext): QueueTransition => { - return { - DestinationQueue: __expectString(output.destinationQueue), - SourceQueue: __expectString(output.sourceQueue), - Timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - } as any; + return take(output, { + DestinationQueue: [, __expectString, `destinationQueue`], + SourceQueue: [, __expectString, `sourceQueue`], + Timestamp: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `timestamp`], + }) as any; }; /** * deserializeAws_restJson1Rectangle */ const de_Rectangle = (output: any, context: __SerdeContext): Rectangle => { - return { - Height: __expectInt32(output.height), - Width: __expectInt32(output.width), - X: __expectInt32(output.x), - Y: __expectInt32(output.y), - } as any; + return take(output, { + Height: [, __expectInt32, `height`], + Width: [, __expectInt32, `width`], + X: [, __expectInt32, `x`], + Y: [, __expectInt32, `y`], + }) as any; }; /** * deserializeAws_restJson1RemixSettings */ const de_RemixSettings = (output: any, context: __SerdeContext): RemixSettings => { - return { - ChannelMapping: output.channelMapping != null ? de_ChannelMapping(output.channelMapping, context) : undefined, - ChannelsIn: __expectInt32(output.channelsIn), - ChannelsOut: __expectInt32(output.channelsOut), - } as any; + return take(output, { + ChannelMapping: (_) => [, de_ChannelMapping(_, context), `channelMapping`], + ChannelsIn: [, __expectInt32, `channelsIn`], + ChannelsOut: [, __expectInt32, `channelsOut`], + }) as any; }; /** * deserializeAws_restJson1ReservationPlan */ const de_ReservationPlan = (output: any, context: __SerdeContext): ReservationPlan => { - return { - Commitment: __expectString(output.commitment), - ExpiresAt: - output.expiresAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiresAt))) : undefined, - PurchasedAt: - output.purchasedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.purchasedAt))) - : undefined, - RenewalType: __expectString(output.renewalType), - ReservedSlots: __expectInt32(output.reservedSlots), - Status: __expectString(output.status), - } as any; + return take(output, { + Commitment: [, __expectString, `commitment`], + ExpiresAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `expiresAt`], + PurchasedAt: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `purchasedAt`], + RenewalType: [, __expectString, `renewalType`], + ReservedSlots: [, __expectInt32, `reservedSlots`], + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1ResourceTags */ const de_ResourceTags = (output: any, context: __SerdeContext): ResourceTags => { - return { - Arn: __expectString(output.arn), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1S3DestinationAccessControl */ const de_S3DestinationAccessControl = (output: any, context: __SerdeContext): S3DestinationAccessControl => { - return { - CannedAcl: __expectString(output.cannedAcl), - } as any; + return take(output, { + CannedAcl: [, __expectString, `cannedAcl`], + }) as any; }; /** * deserializeAws_restJson1S3DestinationSettings */ const de_S3DestinationSettings = (output: any, context: __SerdeContext): S3DestinationSettings => { - return { - AccessControl: - output.accessControl != null ? de_S3DestinationAccessControl(output.accessControl, context) : undefined, - Encryption: output.encryption != null ? de_S3EncryptionSettings(output.encryption, context) : undefined, - } as any; + return take(output, { + AccessControl: (_) => [, de_S3DestinationAccessControl(_, context), `accessControl`], + Encryption: (_) => [, de_S3EncryptionSettings(_, context), `encryption`], + }) as any; }; /** * deserializeAws_restJson1S3EncryptionSettings */ const de_S3EncryptionSettings = (output: any, context: __SerdeContext): S3EncryptionSettings => { - return { - EncryptionType: __expectString(output.encryptionType), - KmsEncryptionContext: __expectString(output.kmsEncryptionContext), - KmsKeyArn: __expectString(output.kmsKeyArn), - } as any; + return take(output, { + EncryptionType: [, __expectString, `encryptionType`], + KmsEncryptionContext: [, __expectString, `kmsEncryptionContext`], + KmsKeyArn: [, __expectString, `kmsKeyArn`], + }) as any; }; /** * deserializeAws_restJson1SccDestinationSettings */ const de_SccDestinationSettings = (output: any, context: __SerdeContext): SccDestinationSettings => { - return { - Framerate: __expectString(output.framerate), - } as any; + return take(output, { + Framerate: [, __expectString, `framerate`], + }) as any; }; /** * deserializeAws_restJson1SpekeKeyProvider */ const de_SpekeKeyProvider = (output: any, context: __SerdeContext): SpekeKeyProvider => { - return { - CertificateArn: __expectString(output.certificateArn), - ResourceId: __expectString(output.resourceId), - SystemIds: - output.systemIds != null - ? de___listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12(output.systemIds, context) - : undefined, - Url: __expectString(output.url), - } as any; + return take(output, { + CertificateArn: [, __expectString, `certificateArn`], + ResourceId: [, __expectString, `resourceId`], + SystemIds: [, _json, `systemIds`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1SpekeKeyProviderCmaf */ const de_SpekeKeyProviderCmaf = (output: any, context: __SerdeContext): SpekeKeyProviderCmaf => { - return { - CertificateArn: __expectString(output.certificateArn), - DashSignaledSystemIds: - output.dashSignaledSystemIds != null - ? de___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12( - output.dashSignaledSystemIds, - context - ) - : undefined, - HlsSignaledSystemIds: - output.hlsSignaledSystemIds != null - ? de___listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12(output.hlsSignaledSystemIds, context) - : undefined, - ResourceId: __expectString(output.resourceId), - Url: __expectString(output.url), - } as any; + return take(output, { + CertificateArn: [, __expectString, `certificateArn`], + DashSignaledSystemIds: [, _json, `dashSignaledSystemIds`], + HlsSignaledSystemIds: [, _json, `hlsSignaledSystemIds`], + ResourceId: [, __expectString, `resourceId`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1SrtDestinationSettings */ const de_SrtDestinationSettings = (output: any, context: __SerdeContext): SrtDestinationSettings => { - return { - StylePassthrough: __expectString(output.stylePassthrough), - } as any; + return take(output, { + StylePassthrough: [, __expectString, `stylePassthrough`], + }) as any; }; /** * deserializeAws_restJson1StaticKeyProvider */ const de_StaticKeyProvider = (output: any, context: __SerdeContext): StaticKeyProvider => { - return { - KeyFormat: __expectString(output.keyFormat), - KeyFormatVersions: __expectString(output.keyFormatVersions), - StaticKeyValue: __expectString(output.staticKeyValue), - Url: __expectString(output.url), - } as any; + return take(output, { + KeyFormat: [, __expectString, `keyFormat`], + KeyFormatVersions: [, __expectString, `keyFormatVersions`], + StaticKeyValue: [, __expectString, `staticKeyValue`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1TeletextDestinationSettings */ const de_TeletextDestinationSettings = (output: any, context: __SerdeContext): TeletextDestinationSettings => { - return { - PageNumber: __expectString(output.pageNumber), - PageTypes: output.pageTypes != null ? de___listOfTeletextPageType(output.pageTypes, context) : undefined, - } as any; + return take(output, { + PageNumber: [, __expectString, `pageNumber`], + PageTypes: [, _json, `pageTypes`], + }) as any; }; /** * deserializeAws_restJson1TeletextSourceSettings */ const de_TeletextSourceSettings = (output: any, context: __SerdeContext): TeletextSourceSettings => { - return { - PageNumber: __expectString(output.pageNumber), - } as any; + return take(output, { + PageNumber: [, __expectString, `pageNumber`], + }) as any; }; /** * deserializeAws_restJson1TimecodeBurnin */ const de_TimecodeBurnin = (output: any, context: __SerdeContext): TimecodeBurnin => { - return { - FontSize: __expectInt32(output.fontSize), - Position: __expectString(output.position), - Prefix: __expectString(output.prefix), - } as any; + return take(output, { + FontSize: [, __expectInt32, `fontSize`], + Position: [, __expectString, `position`], + Prefix: [, __expectString, `prefix`], + }) as any; }; /** * deserializeAws_restJson1TimecodeConfig */ const de_TimecodeConfig = (output: any, context: __SerdeContext): TimecodeConfig => { - return { - Anchor: __expectString(output.anchor), - Source: __expectString(output.source), - Start: __expectString(output.start), - TimestampOffset: __expectString(output.timestampOffset), - } as any; + return take(output, { + Anchor: [, __expectString, `anchor`], + Source: [, __expectString, `source`], + Start: [, __expectString, `start`], + TimestampOffset: [, __expectString, `timestampOffset`], + }) as any; }; /** * deserializeAws_restJson1TimedMetadataInsertion */ const de_TimedMetadataInsertion = (output: any, context: __SerdeContext): TimedMetadataInsertion => { - return { - Id3Insertions: output.id3Insertions != null ? de___listOfId3Insertion(output.id3Insertions, context) : undefined, - } as any; + return take(output, { + Id3Insertions: (_) => [, de___listOfId3Insertion(_, context), `id3Insertions`], + }) as any; }; /** * deserializeAws_restJson1Timing */ const de_Timing = (output: any, context: __SerdeContext): Timing => { - return { - FinishTime: - output.finishTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.finishTime))) : undefined, - StartTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - SubmitTime: - output.submitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.submitTime))) : undefined, - } as any; + return take(output, { + FinishTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `finishTime`], + StartTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `startTime`], + SubmitTime: (_) => [, __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `submitTime`], + }) as any; }; /** * deserializeAws_restJson1TrackSourceSettings */ const de_TrackSourceSettings = (output: any, context: __SerdeContext): TrackSourceSettings => { - return { - TrackNumber: __expectInt32(output.trackNumber), - } as any; + return take(output, { + TrackNumber: [, __expectInt32, `trackNumber`], + }) as any; }; /** * deserializeAws_restJson1TtmlDestinationSettings */ const de_TtmlDestinationSettings = (output: any, context: __SerdeContext): TtmlDestinationSettings => { - return { - StylePassthrough: __expectString(output.stylePassthrough), - } as any; + return take(output, { + StylePassthrough: [, __expectString, `stylePassthrough`], + }) as any; }; /** * deserializeAws_restJson1Vc3Settings */ const de_Vc3Settings = (output: any, context: __SerdeContext): Vc3Settings => { - return { - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - InterlaceMode: __expectString(output.interlaceMode), - ScanTypeConversionMode: __expectString(output.scanTypeConversionMode), - SlowPal: __expectString(output.slowPal), - Telecine: __expectString(output.telecine), - Vc3Class: __expectString(output.vc3Class), - } as any; + return take(output, { + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + InterlaceMode: [, __expectString, `interlaceMode`], + ScanTypeConversionMode: [, __expectString, `scanTypeConversionMode`], + SlowPal: [, __expectString, `slowPal`], + Telecine: [, __expectString, `telecine`], + Vc3Class: [, __expectString, `vc3Class`], + }) as any; }; /** * deserializeAws_restJson1VideoCodecSettings */ const de_VideoCodecSettings = (output: any, context: __SerdeContext): VideoCodecSettings => { - return { - Av1Settings: output.av1Settings != null ? de_Av1Settings(output.av1Settings, context) : undefined, - AvcIntraSettings: - output.avcIntraSettings != null ? de_AvcIntraSettings(output.avcIntraSettings, context) : undefined, - Codec: __expectString(output.codec), - FrameCaptureSettings: - output.frameCaptureSettings != null ? de_FrameCaptureSettings(output.frameCaptureSettings, context) : undefined, - H264Settings: output.h264Settings != null ? de_H264Settings(output.h264Settings, context) : undefined, - H265Settings: output.h265Settings != null ? de_H265Settings(output.h265Settings, context) : undefined, - Mpeg2Settings: output.mpeg2Settings != null ? de_Mpeg2Settings(output.mpeg2Settings, context) : undefined, - ProresSettings: output.proresSettings != null ? de_ProresSettings(output.proresSettings, context) : undefined, - Vc3Settings: output.vc3Settings != null ? de_Vc3Settings(output.vc3Settings, context) : undefined, - Vp8Settings: output.vp8Settings != null ? de_Vp8Settings(output.vp8Settings, context) : undefined, - Vp9Settings: output.vp9Settings != null ? de_Vp9Settings(output.vp9Settings, context) : undefined, - XavcSettings: output.xavcSettings != null ? de_XavcSettings(output.xavcSettings, context) : undefined, - } as any; + return take(output, { + Av1Settings: (_) => [, de_Av1Settings(_, context), `av1Settings`], + AvcIntraSettings: (_) => [, de_AvcIntraSettings(_, context), `avcIntraSettings`], + Codec: [, __expectString, `codec`], + FrameCaptureSettings: (_) => [, de_FrameCaptureSettings(_, context), `frameCaptureSettings`], + H264Settings: (_) => [, de_H264Settings(_, context), `h264Settings`], + H265Settings: (_) => [, de_H265Settings(_, context), `h265Settings`], + Mpeg2Settings: (_) => [, de_Mpeg2Settings(_, context), `mpeg2Settings`], + ProresSettings: (_) => [, de_ProresSettings(_, context), `proresSettings`], + Vc3Settings: (_) => [, de_Vc3Settings(_, context), `vc3Settings`], + Vp8Settings: (_) => [, de_Vp8Settings(_, context), `vp8Settings`], + Vp9Settings: (_) => [, de_Vp9Settings(_, context), `vp9Settings`], + XavcSettings: (_) => [, de_XavcSettings(_, context), `xavcSettings`], + }) as any; }; /** * deserializeAws_restJson1VideoDescription */ const de_VideoDescription = (output: any, context: __SerdeContext): VideoDescription => { - return { - AfdSignaling: __expectString(output.afdSignaling), - AntiAlias: __expectString(output.antiAlias), - CodecSettings: output.codecSettings != null ? de_VideoCodecSettings(output.codecSettings, context) : undefined, - ColorMetadata: __expectString(output.colorMetadata), - Crop: output.crop != null ? de_Rectangle(output.crop, context) : undefined, - DropFrameTimecode: __expectString(output.dropFrameTimecode), - FixedAfd: __expectInt32(output.fixedAfd), - Height: __expectInt32(output.height), - Position: output.position != null ? de_Rectangle(output.position, context) : undefined, - RespondToAfd: __expectString(output.respondToAfd), - ScalingBehavior: __expectString(output.scalingBehavior), - Sharpness: __expectInt32(output.sharpness), - TimecodeInsertion: __expectString(output.timecodeInsertion), - VideoPreprocessors: - output.videoPreprocessors != null ? de_VideoPreprocessor(output.videoPreprocessors, context) : undefined, - Width: __expectInt32(output.width), - } as any; + return take(output, { + AfdSignaling: [, __expectString, `afdSignaling`], + AntiAlias: [, __expectString, `antiAlias`], + CodecSettings: (_) => [, de_VideoCodecSettings(_, context), `codecSettings`], + ColorMetadata: [, __expectString, `colorMetadata`], + Crop: (_) => [, de_Rectangle(_, context), `crop`], + DropFrameTimecode: [, __expectString, `dropFrameTimecode`], + FixedAfd: [, __expectInt32, `fixedAfd`], + Height: [, __expectInt32, `height`], + Position: (_) => [, de_Rectangle(_, context), `position`], + RespondToAfd: [, __expectString, `respondToAfd`], + ScalingBehavior: [, __expectString, `scalingBehavior`], + Sharpness: [, __expectInt32, `sharpness`], + TimecodeInsertion: [, __expectString, `timecodeInsertion`], + VideoPreprocessors: (_) => [, de_VideoPreprocessor(_, context), `videoPreprocessors`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1VideoDetail */ const de_VideoDetail = (output: any, context: __SerdeContext): VideoDetail => { - return { - HeightInPx: __expectInt32(output.heightInPx), - WidthInPx: __expectInt32(output.widthInPx), - } as any; + return take(output, { + HeightInPx: [, __expectInt32, `heightInPx`], + WidthInPx: [, __expectInt32, `widthInPx`], + }) as any; }; /** * deserializeAws_restJson1VideoPreprocessor */ const de_VideoPreprocessor = (output: any, context: __SerdeContext): VideoPreprocessor => { - return { - ColorCorrector: output.colorCorrector != null ? de_ColorCorrector(output.colorCorrector, context) : undefined, - Deinterlacer: output.deinterlacer != null ? de_Deinterlacer(output.deinterlacer, context) : undefined, - DolbyVision: output.dolbyVision != null ? de_DolbyVision(output.dolbyVision, context) : undefined, - Hdr10Plus: output.hdr10Plus != null ? de_Hdr10Plus(output.hdr10Plus, context) : undefined, - ImageInserter: output.imageInserter != null ? de_ImageInserter(output.imageInserter, context) : undefined, - NoiseReducer: output.noiseReducer != null ? de_NoiseReducer(output.noiseReducer, context) : undefined, - PartnerWatermarking: - output.partnerWatermarking != null ? de_PartnerWatermarking(output.partnerWatermarking, context) : undefined, - TimecodeBurnin: output.timecodeBurnin != null ? de_TimecodeBurnin(output.timecodeBurnin, context) : undefined, - } as any; + return take(output, { + ColorCorrector: (_) => [, de_ColorCorrector(_, context), `colorCorrector`], + Deinterlacer: (_) => [, de_Deinterlacer(_, context), `deinterlacer`], + DolbyVision: (_) => [, de_DolbyVision(_, context), `dolbyVision`], + Hdr10Plus: (_) => [, de_Hdr10Plus(_, context), `hdr10Plus`], + ImageInserter: (_) => [, de_ImageInserter(_, context), `imageInserter`], + NoiseReducer: (_) => [, de_NoiseReducer(_, context), `noiseReducer`], + PartnerWatermarking: (_) => [, de_PartnerWatermarking(_, context), `partnerWatermarking`], + TimecodeBurnin: (_) => [, de_TimecodeBurnin(_, context), `timecodeBurnin`], + }) as any; }; /** * deserializeAws_restJson1VideoSelector */ const de_VideoSelector = (output: any, context: __SerdeContext): VideoSelector => { - return { - AlphaBehavior: __expectString(output.alphaBehavior), - ColorSpace: __expectString(output.colorSpace), - ColorSpaceUsage: __expectString(output.colorSpaceUsage), - EmbeddedTimecodeOverride: __expectString(output.embeddedTimecodeOverride), - Hdr10Metadata: output.hdr10Metadata != null ? de_Hdr10Metadata(output.hdr10Metadata, context) : undefined, - PadVideo: __expectString(output.padVideo), - Pid: __expectInt32(output.pid), - ProgramNumber: __expectInt32(output.programNumber), - Rotate: __expectString(output.rotate), - SampleRange: __expectString(output.sampleRange), - } as any; + return take(output, { + AlphaBehavior: [, __expectString, `alphaBehavior`], + ColorSpace: [, __expectString, `colorSpace`], + ColorSpaceUsage: [, __expectString, `colorSpaceUsage`], + EmbeddedTimecodeOverride: [, __expectString, `embeddedTimecodeOverride`], + Hdr10Metadata: (_) => [, de_Hdr10Metadata(_, context), `hdr10Metadata`], + PadVideo: [, __expectString, `padVideo`], + Pid: [, __expectInt32, `pid`], + ProgramNumber: [, __expectInt32, `programNumber`], + Rotate: [, __expectString, `rotate`], + SampleRange: [, __expectString, `sampleRange`], + }) as any; }; /** * deserializeAws_restJson1VorbisSettings */ const de_VorbisSettings = (output: any, context: __SerdeContext): VorbisSettings => { - return { - Channels: __expectInt32(output.channels), - SampleRate: __expectInt32(output.sampleRate), - VbrQuality: __expectInt32(output.vbrQuality), - } as any; + return take(output, { + Channels: [, __expectInt32, `channels`], + SampleRate: [, __expectInt32, `sampleRate`], + VbrQuality: [, __expectInt32, `vbrQuality`], + }) as any; }; /** * deserializeAws_restJson1Vp8Settings */ const de_Vp8Settings = (output: any, context: __SerdeContext): Vp8Settings => { - return { - Bitrate: __expectInt32(output.bitrate), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopSize: __limitedParseDouble(output.gopSize), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - MaxBitrate: __expectInt32(output.maxBitrate), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - RateControlMode: __expectString(output.rateControlMode), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopSize: [, __limitedParseDouble, `gopSize`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + RateControlMode: [, __expectString, `rateControlMode`], + }) as any; }; /** * deserializeAws_restJson1Vp9Settings */ const de_Vp9Settings = (output: any, context: __SerdeContext): Vp9Settings => { - return { - Bitrate: __expectInt32(output.bitrate), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopSize: __limitedParseDouble(output.gopSize), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - MaxBitrate: __expectInt32(output.maxBitrate), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - RateControlMode: __expectString(output.rateControlMode), - } as any; + return take(output, { + Bitrate: [, __expectInt32, `bitrate`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopSize: [, __limitedParseDouble, `gopSize`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + RateControlMode: [, __expectString, `rateControlMode`], + }) as any; }; /** * deserializeAws_restJson1WarningGroup */ const de_WarningGroup = (output: any, context: __SerdeContext): WarningGroup => { - return { - Code: __expectInt32(output.code), - Count: __expectInt32(output.count), - } as any; + return take(output, { + Code: [, __expectInt32, `code`], + Count: [, __expectInt32, `count`], + }) as any; }; /** * deserializeAws_restJson1WavSettings */ const de_WavSettings = (output: any, context: __SerdeContext): WavSettings => { - return { - BitDepth: __expectInt32(output.bitDepth), - Channels: __expectInt32(output.channels), - Format: __expectString(output.format), - SampleRate: __expectInt32(output.sampleRate), - } as any; + return take(output, { + BitDepth: [, __expectInt32, `bitDepth`], + Channels: [, __expectInt32, `channels`], + Format: [, __expectString, `format`], + SampleRate: [, __expectInt32, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1WebvttDestinationSettings */ const de_WebvttDestinationSettings = (output: any, context: __SerdeContext): WebvttDestinationSettings => { - return { - Accessibility: __expectString(output.accessibility), - StylePassthrough: __expectString(output.stylePassthrough), - } as any; + return take(output, { + Accessibility: [, __expectString, `accessibility`], + StylePassthrough: [, __expectString, `stylePassthrough`], + }) as any; }; /** * deserializeAws_restJson1WebvttHlsSourceSettings */ const de_WebvttHlsSourceSettings = (output: any, context: __SerdeContext): WebvttHlsSourceSettings => { - return { - RenditionGroupId: __expectString(output.renditionGroupId), - RenditionLanguageCode: __expectString(output.renditionLanguageCode), - RenditionName: __expectString(output.renditionName), - } as any; + return take(output, { + RenditionGroupId: [, __expectString, `renditionGroupId`], + RenditionLanguageCode: [, __expectString, `renditionLanguageCode`], + RenditionName: [, __expectString, `renditionName`], + }) as any; }; /** * deserializeAws_restJson1Xavc4kIntraCbgProfileSettings */ const de_Xavc4kIntraCbgProfileSettings = (output: any, context: __SerdeContext): Xavc4kIntraCbgProfileSettings => { - return { - XavcClass: __expectString(output.xavcClass), - } as any; + return take(output, { + XavcClass: [, __expectString, `xavcClass`], + }) as any; }; /** * deserializeAws_restJson1Xavc4kIntraVbrProfileSettings */ const de_Xavc4kIntraVbrProfileSettings = (output: any, context: __SerdeContext): Xavc4kIntraVbrProfileSettings => { - return { - XavcClass: __expectString(output.xavcClass), - } as any; + return take(output, { + XavcClass: [, __expectString, `xavcClass`], + }) as any; }; /** * deserializeAws_restJson1Xavc4kProfileSettings */ const de_Xavc4kProfileSettings = (output: any, context: __SerdeContext): Xavc4kProfileSettings => { - return { - BitrateClass: __expectString(output.bitrateClass), - CodecProfile: __expectString(output.codecProfile), - FlickerAdaptiveQuantization: __expectString(output.flickerAdaptiveQuantization), - GopBReference: __expectString(output.gopBReference), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - Slices: __expectInt32(output.slices), - } as any; + return take(output, { + BitrateClass: [, __expectString, `bitrateClass`], + CodecProfile: [, __expectString, `codecProfile`], + FlickerAdaptiveQuantization: [, __expectString, `flickerAdaptiveQuantization`], + GopBReference: [, __expectString, `gopBReference`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + Slices: [, __expectInt32, `slices`], + }) as any; }; /** * deserializeAws_restJson1XavcHdIntraCbgProfileSettings */ const de_XavcHdIntraCbgProfileSettings = (output: any, context: __SerdeContext): XavcHdIntraCbgProfileSettings => { - return { - XavcClass: __expectString(output.xavcClass), - } as any; + return take(output, { + XavcClass: [, __expectString, `xavcClass`], + }) as any; }; /** * deserializeAws_restJson1XavcHdProfileSettings */ const de_XavcHdProfileSettings = (output: any, context: __SerdeContext): XavcHdProfileSettings => { - return { - BitrateClass: __expectString(output.bitrateClass), - FlickerAdaptiveQuantization: __expectString(output.flickerAdaptiveQuantization), - GopBReference: __expectString(output.gopBReference), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - HrdBufferSize: __expectInt32(output.hrdBufferSize), - InterlaceMode: __expectString(output.interlaceMode), - QualityTuningLevel: __expectString(output.qualityTuningLevel), - Slices: __expectInt32(output.slices), - Telecine: __expectString(output.telecine), - } as any; + return take(output, { + BitrateClass: [, __expectString, `bitrateClass`], + FlickerAdaptiveQuantization: [, __expectString, `flickerAdaptiveQuantization`], + GopBReference: [, __expectString, `gopBReference`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + HrdBufferSize: [, __expectInt32, `hrdBufferSize`], + InterlaceMode: [, __expectString, `interlaceMode`], + QualityTuningLevel: [, __expectString, `qualityTuningLevel`], + Slices: [, __expectInt32, `slices`], + Telecine: [, __expectString, `telecine`], + }) as any; }; /** * deserializeAws_restJson1XavcSettings */ const de_XavcSettings = (output: any, context: __SerdeContext): XavcSettings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - EntropyEncoding: __expectString(output.entropyEncoding), - FramerateControl: __expectString(output.framerateControl), - FramerateConversionAlgorithm: __expectString(output.framerateConversionAlgorithm), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - Profile: __expectString(output.profile), - SlowPal: __expectString(output.slowPal), - Softness: __expectInt32(output.softness), - SpatialAdaptiveQuantization: __expectString(output.spatialAdaptiveQuantization), - TemporalAdaptiveQuantization: __expectString(output.temporalAdaptiveQuantization), - Xavc4kIntraCbgProfileSettings: - output.xavc4kIntraCbgProfileSettings != null - ? de_Xavc4kIntraCbgProfileSettings(output.xavc4kIntraCbgProfileSettings, context) - : undefined, - Xavc4kIntraVbrProfileSettings: - output.xavc4kIntraVbrProfileSettings != null - ? de_Xavc4kIntraVbrProfileSettings(output.xavc4kIntraVbrProfileSettings, context) - : undefined, - Xavc4kProfileSettings: - output.xavc4kProfileSettings != null - ? de_Xavc4kProfileSettings(output.xavc4kProfileSettings, context) - : undefined, - XavcHdIntraCbgProfileSettings: - output.xavcHdIntraCbgProfileSettings != null - ? de_XavcHdIntraCbgProfileSettings(output.xavcHdIntraCbgProfileSettings, context) - : undefined, - XavcHdProfileSettings: - output.xavcHdProfileSettings != null - ? de_XavcHdProfileSettings(output.xavcHdProfileSettings, context) - : undefined, - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + EntropyEncoding: [, __expectString, `entropyEncoding`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateConversionAlgorithm: [, __expectString, `framerateConversionAlgorithm`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + Profile: [, __expectString, `profile`], + SlowPal: [, __expectString, `slowPal`], + Softness: [, __expectInt32, `softness`], + SpatialAdaptiveQuantization: [, __expectString, `spatialAdaptiveQuantization`], + TemporalAdaptiveQuantization: [, __expectString, `temporalAdaptiveQuantization`], + Xavc4kIntraCbgProfileSettings: (_) => [ + , + de_Xavc4kIntraCbgProfileSettings(_, context), + `xavc4kIntraCbgProfileSettings`, + ], + Xavc4kIntraVbrProfileSettings: (_) => [ + , + de_Xavc4kIntraVbrProfileSettings(_, context), + `xavc4kIntraVbrProfileSettings`, + ], + Xavc4kProfileSettings: (_) => [, de_Xavc4kProfileSettings(_, context), `xavc4kProfileSettings`], + XavcHdIntraCbgProfileSettings: (_) => [ + , + de_XavcHdIntraCbgProfileSettings(_, context), + `xavcHdIntraCbgProfileSettings`, + ], + XavcHdProfileSettings: (_) => [, de_XavcHdProfileSettings(_, context), `xavcHdProfileSettings`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-medialive/src/protocols/Aws_restJson1.ts b/clients/client-medialive/src/protocols/Aws_restJson1.ts index cafbfef2bd7f..7c7319e44d20 100644 --- a/clients/client-medialive/src/protocols/Aws_restJson1.ts +++ b/clients/client-medialive/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,12 +10,13 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc7231DateTime as __parseRfc7231DateTime, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseLong as __strictParseLong, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -442,14 +444,14 @@ export const se_BatchDeleteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/batch/delete"; let body: any; - body = JSON.stringify({ - ...(input.ChannelIds != null && { channelIds: se___listOf__string(input.ChannelIds, context) }), - ...(input.InputIds != null && { inputIds: se___listOf__string(input.InputIds, context) }), - ...(input.InputSecurityGroupIds != null && { - inputSecurityGroupIds: se___listOf__string(input.InputSecurityGroupIds, context), - }), - ...(input.MultiplexIds != null && { multiplexIds: se___listOf__string(input.MultiplexIds, context) }), - }); + body = JSON.stringify( + take(input, { + channelIds: [, (_) => _json(_), `ChannelIds`], + inputIds: [, (_) => _json(_), `InputIds`], + inputSecurityGroupIds: [, (_) => _json(_), `InputSecurityGroupIds`], + multiplexIds: [, (_) => _json(_), `MultiplexIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -474,10 +476,12 @@ export const se_BatchStartCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/batch/start"; let body: any; - body = JSON.stringify({ - ...(input.ChannelIds != null && { channelIds: se___listOf__string(input.ChannelIds, context) }), - ...(input.MultiplexIds != null && { multiplexIds: se___listOf__string(input.MultiplexIds, context) }), - }); + body = JSON.stringify( + take(input, { + channelIds: [, (_) => _json(_), `ChannelIds`], + multiplexIds: [, (_) => _json(_), `MultiplexIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -502,10 +506,12 @@ export const se_BatchStopCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/batch/stop"; let body: any; - body = JSON.stringify({ - ...(input.ChannelIds != null && { channelIds: se___listOf__string(input.ChannelIds, context) }), - ...(input.MultiplexIds != null && { multiplexIds: se___listOf__string(input.MultiplexIds, context) }), - }); + body = JSON.stringify( + take(input, { + channelIds: [, (_) => _json(_), `ChannelIds`], + multiplexIds: [, (_) => _json(_), `MultiplexIds`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -532,10 +538,12 @@ export const se_BatchUpdateScheduleCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/channels/{ChannelId}/schedule"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelId", () => input.ChannelId!, "{ChannelId}", false); let body: any; - body = JSON.stringify({ - ...(input.Creates != null && { creates: se_BatchScheduleActionCreateRequest(input.Creates, context) }), - ...(input.Deletes != null && { deletes: se_BatchScheduleActionDeleteRequest(input.Deletes, context) }), - }); + body = JSON.stringify( + take(input, { + creates: [, (_) => se_BatchScheduleActionCreateRequest(_, context), `Creates`], + deletes: [, (_) => se_BatchScheduleActionDeleteRequest(_, context), `Deletes`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -591,9 +599,11 @@ export const se_ClaimDeviceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/claimDevice"; let body: any; - body = JSON.stringify({ - ...(input.Id != null && { id: input.Id }), - }); + body = JSON.stringify( + take(input, { + id: [, , `Id`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -618,28 +628,24 @@ export const se_CreateChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/channels"; let body: any; - body = JSON.stringify({ - ...(input.CdiInputSpecification != null && { - cdiInputSpecification: se_CdiInputSpecification(input.CdiInputSpecification, context), - }), - ...(input.ChannelClass != null && { channelClass: input.ChannelClass }), - ...(input.Destinations != null && { destinations: se___listOfOutputDestination(input.Destinations, context) }), - ...(input.EncoderSettings != null && { encoderSettings: se_EncoderSettings(input.EncoderSettings, context) }), - ...(input.InputAttachments != null && { - inputAttachments: se___listOfInputAttachment(input.InputAttachments, context), - }), - ...(input.InputSpecification != null && { - inputSpecification: se_InputSpecification(input.InputSpecification, context), - }), - ...(input.LogLevel != null && { logLevel: input.LogLevel }), - ...(input.Maintenance != null && { maintenance: se_MaintenanceCreateSettings(input.Maintenance, context) }), - ...(input.Name != null && { name: input.Name }), - requestId: input.RequestId ?? generateIdempotencyToken(), - ...(input.Reserved != null && { reserved: input.Reserved }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.Vpc != null && { vpc: se_VpcOutputSettings(input.Vpc, context) }), - }); + body = JSON.stringify( + take(input, { + cdiInputSpecification: [, (_) => se_CdiInputSpecification(_, context), `CdiInputSpecification`], + channelClass: [, , `ChannelClass`], + destinations: [, (_) => se___listOfOutputDestination(_, context), `Destinations`], + encoderSettings: [, (_) => se_EncoderSettings(_, context), `EncoderSettings`], + inputAttachments: [, (_) => se___listOfInputAttachment(_, context), `InputAttachments`], + inputSpecification: [, (_) => se_InputSpecification(_, context), `InputSpecification`], + logLevel: [, , `LogLevel`], + maintenance: [, (_) => se_MaintenanceCreateSettings(_, context), `Maintenance`], + name: [, , `Name`], + requestId: [, (_) => _ ?? generateIdempotencyToken(), `RequestId`], + reserved: [, , `Reserved`], + roleArn: [, , `RoleArn`], + tags: [, (_) => _json(_), `Tags`], + vpc: [, (_) => se_VpcOutputSettings(_, context), `Vpc`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -664,25 +670,21 @@ export const se_CreateInputCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/inputs"; let body: any; - body = JSON.stringify({ - ...(input.Destinations != null && { - destinations: se___listOfInputDestinationRequest(input.Destinations, context), - }), - ...(input.InputDevices != null && { inputDevices: se___listOfInputDeviceSettings(input.InputDevices, context) }), - ...(input.InputSecurityGroups != null && { - inputSecurityGroups: se___listOf__string(input.InputSecurityGroups, context), - }), - ...(input.MediaConnectFlows != null && { - mediaConnectFlows: se___listOfMediaConnectFlowRequest(input.MediaConnectFlows, context), - }), - ...(input.Name != null && { name: input.Name }), - requestId: input.RequestId ?? generateIdempotencyToken(), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.Sources != null && { sources: se___listOfInputSourceRequest(input.Sources, context) }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.Type != null && { type: input.Type }), - ...(input.Vpc != null && { vpc: se_InputVpcRequest(input.Vpc, context) }), - }); + body = JSON.stringify( + take(input, { + destinations: [, (_) => se___listOfInputDestinationRequest(_, context), `Destinations`], + inputDevices: [, (_) => se___listOfInputDeviceSettings(_, context), `InputDevices`], + inputSecurityGroups: [, (_) => _json(_), `InputSecurityGroups`], + mediaConnectFlows: [, (_) => se___listOfMediaConnectFlowRequest(_, context), `MediaConnectFlows`], + name: [, , `Name`], + requestId: [, (_) => _ ?? generateIdempotencyToken(), `RequestId`], + roleArn: [, , `RoleArn`], + sources: [, (_) => se___listOfInputSourceRequest(_, context), `Sources`], + tags: [, (_) => _json(_), `Tags`], + type: [, , `Type`], + vpc: [, (_) => se_InputVpcRequest(_, context), `Vpc`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -708,12 +710,12 @@ export const se_CreateInputSecurityGroupCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/inputSecurityGroups"; let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.WhitelistRules != null && { - whitelistRules: se___listOfInputWhitelistRuleCidr(input.WhitelistRules, context), - }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + whitelistRules: [, (_) => se___listOfInputWhitelistRuleCidr(_, context), `WhitelistRules`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -738,17 +740,15 @@ export const se_CreateMultiplexCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/multiplexes"; let body: any; - body = JSON.stringify({ - ...(input.AvailabilityZones != null && { - availabilityZones: se___listOf__string(input.AvailabilityZones, context), - }), - ...(input.MultiplexSettings != null && { - multiplexSettings: se_MultiplexSettings(input.MultiplexSettings, context), - }), - ...(input.Name != null && { name: input.Name }), - requestId: input.RequestId ?? generateIdempotencyToken(), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + availabilityZones: [, (_) => _json(_), `AvailabilityZones`], + multiplexSettings: [, (_) => se_MultiplexSettings(_, context), `MultiplexSettings`], + name: [, , `Name`], + requestId: [, (_) => _ ?? generateIdempotencyToken(), `RequestId`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -775,13 +775,13 @@ export const se_CreateMultiplexProgramCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/multiplexes/{MultiplexId}/programs"; resolvedPath = __resolvedPath(resolvedPath, input, "MultiplexId", () => input.MultiplexId!, "{MultiplexId}", false); let body: any; - body = JSON.stringify({ - ...(input.MultiplexProgramSettings != null && { - multiplexProgramSettings: se_MultiplexProgramSettings(input.MultiplexProgramSettings, context), - }), - ...(input.ProgramName != null && { programName: input.ProgramName }), - requestId: input.RequestId ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + multiplexProgramSettings: [, (_) => se_MultiplexProgramSettings(_, context), `MultiplexProgramSettings`], + programName: [, , `ProgramName`], + requestId: [, (_) => _ ?? generateIdempotencyToken(), `RequestId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -808,10 +808,12 @@ export const se_CreatePartnerInputCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/inputs/{InputId}/partners"; resolvedPath = __resolvedPath(resolvedPath, input, "InputId", () => input.InputId!, "{InputId}", false); let body: any; - body = JSON.stringify({ - requestId: input.RequestId ?? generateIdempotencyToken(), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + requestId: [, (_) => _ ?? generateIdempotencyToken(), `RequestId`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -837,9 +839,11 @@ export const se_CreateTagsCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1647,14 +1651,16 @@ export const se_PurchaseOfferingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/offerings/{OfferingId}/purchase"; resolvedPath = __resolvedPath(resolvedPath, input, "OfferingId", () => input.OfferingId!, "{OfferingId}", false); let body: any; - body = JSON.stringify({ - ...(input.Count != null && { count: input.Count }), - ...(input.Name != null && { name: input.Name }), - ...(input.RenewalSettings != null && { renewalSettings: se_RenewalSettings(input.RenewalSettings, context) }), - requestId: input.RequestId ?? generateIdempotencyToken(), - ...(input.Start != null && { start: input.Start }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + count: [, , `Count`], + name: [, , `Name`], + renewalSettings: [, (_) => se_RenewalSettings(_, context), `RenewalSettings`], + requestId: [, (_) => _ ?? generateIdempotencyToken(), `RequestId`], + start: [, , `Start`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1688,9 +1694,11 @@ export const se_RebootInputDeviceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Force != null && { force: input.Force }), - }); + body = JSON.stringify( + take(input, { + force: [, , `Force`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1884,11 +1892,13 @@ export const se_TransferInputDeviceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.TargetCustomerId != null && { targetCustomerId: input.TargetCustomerId }), - ...(input.TargetRegion != null && { targetRegion: input.TargetRegion }), - ...(input.TransferMessage != null && { transferMessage: input.TransferMessage }), - }); + body = JSON.stringify( + take(input, { + targetCustomerId: [, , `TargetCustomerId`], + targetRegion: [, , `TargetRegion`], + transferMessage: [, , `TransferMessage`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1915,23 +1925,19 @@ export const se_UpdateChannelCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/channels/{ChannelId}"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelId", () => input.ChannelId!, "{ChannelId}", false); let body: any; - body = JSON.stringify({ - ...(input.CdiInputSpecification != null && { - cdiInputSpecification: se_CdiInputSpecification(input.CdiInputSpecification, context), - }), - ...(input.Destinations != null && { destinations: se___listOfOutputDestination(input.Destinations, context) }), - ...(input.EncoderSettings != null && { encoderSettings: se_EncoderSettings(input.EncoderSettings, context) }), - ...(input.InputAttachments != null && { - inputAttachments: se___listOfInputAttachment(input.InputAttachments, context), - }), - ...(input.InputSpecification != null && { - inputSpecification: se_InputSpecification(input.InputSpecification, context), - }), - ...(input.LogLevel != null && { logLevel: input.LogLevel }), - ...(input.Maintenance != null && { maintenance: se_MaintenanceUpdateSettings(input.Maintenance, context) }), - ...(input.Name != null && { name: input.Name }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - }); + body = JSON.stringify( + take(input, { + cdiInputSpecification: [, (_) => se_CdiInputSpecification(_, context), `CdiInputSpecification`], + destinations: [, (_) => se___listOfOutputDestination(_, context), `Destinations`], + encoderSettings: [, (_) => se_EncoderSettings(_, context), `EncoderSettings`], + inputAttachments: [, (_) => se___listOfInputAttachment(_, context), `InputAttachments`], + inputSpecification: [, (_) => se_InputSpecification(_, context), `InputSpecification`], + logLevel: [, , `LogLevel`], + maintenance: [, (_) => se_MaintenanceUpdateSettings(_, context), `Maintenance`], + name: [, , `Name`], + roleArn: [, , `RoleArn`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1958,10 +1964,12 @@ export const se_UpdateChannelClassCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/channels/{ChannelId}/channelClass"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelId", () => input.ChannelId!, "{ChannelId}", false); let body: any; - body = JSON.stringify({ - ...(input.ChannelClass != null && { channelClass: input.ChannelClass }), - ...(input.Destinations != null && { destinations: se___listOfOutputDestination(input.Destinations, context) }), - }); + body = JSON.stringify( + take(input, { + channelClass: [, , `ChannelClass`], + destinations: [, (_) => se___listOfOutputDestination(_, context), `Destinations`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1987,21 +1995,17 @@ export const se_UpdateInputCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/inputs/{InputId}"; resolvedPath = __resolvedPath(resolvedPath, input, "InputId", () => input.InputId!, "{InputId}", false); let body: any; - body = JSON.stringify({ - ...(input.Destinations != null && { - destinations: se___listOfInputDestinationRequest(input.Destinations, context), - }), - ...(input.InputDevices != null && { inputDevices: se___listOfInputDeviceRequest(input.InputDevices, context) }), - ...(input.InputSecurityGroups != null && { - inputSecurityGroups: se___listOf__string(input.InputSecurityGroups, context), - }), - ...(input.MediaConnectFlows != null && { - mediaConnectFlows: se___listOfMediaConnectFlowRequest(input.MediaConnectFlows, context), - }), - ...(input.Name != null && { name: input.Name }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.Sources != null && { sources: se___listOfInputSourceRequest(input.Sources, context) }), - }); + body = JSON.stringify( + take(input, { + destinations: [, (_) => se___listOfInputDestinationRequest(_, context), `Destinations`], + inputDevices: [, (_) => se___listOfInputDeviceRequest(_, context), `InputDevices`], + inputSecurityGroups: [, (_) => _json(_), `InputSecurityGroups`], + mediaConnectFlows: [, (_) => se___listOfMediaConnectFlowRequest(_, context), `MediaConnectFlows`], + name: [, , `Name`], + roleArn: [, , `RoleArn`], + sources: [, (_) => se___listOfInputSourceRequest(_, context), `Sources`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2035,15 +2039,13 @@ export const se_UpdateInputDeviceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.HdDeviceSettings != null && { - hdDeviceSettings: se_InputDeviceConfigurableSettings(input.HdDeviceSettings, context), - }), - ...(input.Name != null && { name: input.Name }), - ...(input.UhdDeviceSettings != null && { - uhdDeviceSettings: se_InputDeviceConfigurableSettings(input.UhdDeviceSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + hdDeviceSettings: [, (_) => se_InputDeviceConfigurableSettings(_, context), `HdDeviceSettings`], + name: [, , `Name`], + uhdDeviceSettings: [, (_) => se_InputDeviceConfigurableSettings(_, context), `UhdDeviceSettings`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2078,12 +2080,12 @@ export const se_UpdateInputSecurityGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.WhitelistRules != null && { - whitelistRules: se___listOfInputWhitelistRuleCidr(input.WhitelistRules, context), - }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + whitelistRules: [, (_) => se___listOfInputWhitelistRuleCidr(_, context), `WhitelistRules`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2110,12 +2112,12 @@ export const se_UpdateMultiplexCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/prod/multiplexes/{MultiplexId}"; resolvedPath = __resolvedPath(resolvedPath, input, "MultiplexId", () => input.MultiplexId!, "{MultiplexId}", false); let body: any; - body = JSON.stringify({ - ...(input.MultiplexSettings != null && { - multiplexSettings: se_MultiplexSettings(input.MultiplexSettings, context), - }), - ...(input.Name != null && { name: input.Name }), - }); + body = JSON.stringify( + take(input, { + multiplexSettings: [, (_) => se_MultiplexSettings(_, context), `MultiplexSettings`], + name: [, , `Name`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2144,11 +2146,11 @@ export const se_UpdateMultiplexProgramCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "MultiplexId", () => input.MultiplexId!, "{MultiplexId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName!, "{ProgramName}", false); let body: any; - body = JSON.stringify({ - ...(input.MultiplexProgramSettings != null && { - multiplexProgramSettings: se_MultiplexProgramSettings(input.MultiplexProgramSettings, context), - }), - }); + body = JSON.stringify( + take(input, { + multiplexProgramSettings: [, (_) => se_MultiplexProgramSettings(_, context), `MultiplexProgramSettings`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2182,10 +2184,12 @@ export const se_UpdateReservationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { name: input.Name }), - ...(input.RenewalSettings != null && { renewalSettings: se_RenewalSettings(input.RenewalSettings, context) }), - }); + body = JSON.stringify( + take(input, { + name: [, , `Name`], + renewalSettings: [, (_) => se_RenewalSettings(_, context), `RenewalSettings`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2256,10 +2260,9 @@ const de_AcceptInputDeviceTransferCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2279,12 +2282,11 @@ export const de_BatchDeleteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failed != null) { - contents.Failed = de___listOfBatchFailedResultModel(data.failed, context); - } - if (data.successful != null) { - contents.Successful = de___listOfBatchSuccessfulResultModel(data.successful, context); - } + const doc = take(data, { + Failed: [, (_) => de___listOfBatchFailedResultModel(_, context), `failed`], + Successful: [, (_) => de___listOfBatchSuccessfulResultModel(_, context), `successful`], + }); + Object.assign(contents, doc); return contents; }; @@ -2327,10 +2329,9 @@ const de_BatchDeleteCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2350,12 +2351,11 @@ export const de_BatchStartCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failed != null) { - contents.Failed = de___listOfBatchFailedResultModel(data.failed, context); - } - if (data.successful != null) { - contents.Successful = de___listOfBatchSuccessfulResultModel(data.successful, context); - } + const doc = take(data, { + Failed: [, (_) => de___listOfBatchFailedResultModel(_, context), `failed`], + Successful: [, (_) => de___listOfBatchSuccessfulResultModel(_, context), `successful`], + }); + Object.assign(contents, doc); return contents; }; @@ -2398,10 +2398,9 @@ const de_BatchStartCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2421,12 +2420,11 @@ export const de_BatchStopCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failed != null) { - contents.Failed = de___listOfBatchFailedResultModel(data.failed, context); - } - if (data.successful != null) { - contents.Successful = de___listOfBatchSuccessfulResultModel(data.successful, context); - } + const doc = take(data, { + Failed: [, (_) => de___listOfBatchFailedResultModel(_, context), `failed`], + Successful: [, (_) => de___listOfBatchSuccessfulResultModel(_, context), `successful`], + }); + Object.assign(contents, doc); return contents; }; @@ -2469,10 +2467,9 @@ const de_BatchStopCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2492,12 +2489,11 @@ export const de_BatchUpdateScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creates != null) { - contents.Creates = de_BatchScheduleActionCreateResult(data.creates, context); - } - if (data.deletes != null) { - contents.Deletes = de_BatchScheduleActionDeleteResult(data.deletes, context); - } + const doc = take(data, { + Creates: [, (_) => de_BatchScheduleActionCreateResult(_, context), `creates`], + Deletes: [, (_) => de_BatchScheduleActionDeleteResult(_, context), `deletes`], + }); + Object.assign(contents, doc); return contents; }; @@ -2540,10 +2536,9 @@ const de_BatchUpdateScheduleCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2608,10 +2603,9 @@ const de_CancelInputDeviceTransferCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2673,10 +2667,9 @@ const de_ClaimDeviceCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2696,9 +2689,10 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.Channel = de_Channel(data.channel, context); - } + const doc = take(data, { + Channel: [, (_) => de_Channel(_, context), `channel`], + }); + Object.assign(contents, doc); return contents; }; @@ -2741,10 +2735,9 @@ const de_CreateChannelCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2764,9 +2757,10 @@ export const de_CreateInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.input != null) { - contents.Input = de_Input(data.input, context); - } + const doc = take(data, { + Input: [, (_) => de_Input(_, context), `input`], + }); + Object.assign(contents, doc); return contents; }; @@ -2803,10 +2797,9 @@ const de_CreateInputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2826,9 +2819,10 @@ export const de_CreateInputSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.securityGroup != null) { - contents.SecurityGroup = de_InputSecurityGroup(data.securityGroup, context); - } + const doc = take(data, { + SecurityGroup: [, (_) => de_InputSecurityGroup(_, context), `securityGroup`], + }); + Object.assign(contents, doc); return contents; }; @@ -2865,10 +2859,9 @@ const de_CreateInputSecurityGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2888,9 +2881,10 @@ export const de_CreateMultiplexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.multiplex != null) { - contents.Multiplex = de_Multiplex(data.multiplex, context); - } + const doc = take(data, { + Multiplex: [, (_) => de_Multiplex(_, context), `multiplex`], + }); + Object.assign(contents, doc); return contents; }; @@ -2933,10 +2927,9 @@ const de_CreateMultiplexCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2956,9 +2949,10 @@ export const de_CreateMultiplexProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.multiplexProgram != null) { - contents.MultiplexProgram = de_MultiplexProgram(data.multiplexProgram, context); - } + const doc = take(data, { + MultiplexProgram: [, (_) => de_MultiplexProgram(_, context), `multiplexProgram`], + }); + Object.assign(contents, doc); return contents; }; @@ -3001,10 +2995,9 @@ const de_CreateMultiplexProgramCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3024,9 +3017,10 @@ export const de_CreatePartnerInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.input != null) { - contents.Input = de_Input(data.input, context); - } + const doc = take(data, { + Input: [, (_) => de_Input(_, context), `input`], + }); + Object.assign(contents, doc); return contents; }; @@ -3063,10 +3057,9 @@ const de_CreatePartnerInputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3116,10 +3109,9 @@ const de_CreateTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3139,60 +3131,27 @@ export const de_DeleteChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.cdiInputSpecification != null) { - contents.CdiInputSpecification = de_CdiInputSpecification(data.cdiInputSpecification, context); - } - if (data.channelClass != null) { - contents.ChannelClass = __expectString(data.channelClass); - } - if (data.destinations != null) { - contents.Destinations = de___listOfOutputDestination(data.destinations, context); - } - if (data.egressEndpoints != null) { - contents.EgressEndpoints = de___listOfChannelEgressEndpoint(data.egressEndpoints, context); - } - if (data.encoderSettings != null) { - contents.EncoderSettings = de_EncoderSettings(data.encoderSettings, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.inputAttachments != null) { - contents.InputAttachments = de___listOfInputAttachment(data.inputAttachments, context); - } - if (data.inputSpecification != null) { - contents.InputSpecification = de_InputSpecification(data.inputSpecification, context); - } - if (data.logLevel != null) { - contents.LogLevel = __expectString(data.logLevel); - } - if (data.maintenance != null) { - contents.Maintenance = de_MaintenanceStatus(data.maintenance, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelineDetails != null) { - contents.PipelineDetails = de___listOfPipelineDetail(data.pipelineDetails, context); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.roleArn != null) { - contents.RoleArn = __expectString(data.roleArn); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpc != null) { - contents.Vpc = de_VpcOutputSettingsDescription(data.vpc, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CdiInputSpecification: [, (_) => de_CdiInputSpecification(_, context), `cdiInputSpecification`], + ChannelClass: [, __expectString, `channelClass`], + Destinations: [, (_) => de___listOfOutputDestination(_, context), `destinations`], + EgressEndpoints: [, (_) => de___listOfChannelEgressEndpoint(_, context), `egressEndpoints`], + EncoderSettings: [, (_) => de_EncoderSettings(_, context), `encoderSettings`], + Id: [, __expectString, `id`], + InputAttachments: [, (_) => de___listOfInputAttachment(_, context), `inputAttachments`], + InputSpecification: [, (_) => de_InputSpecification(_, context), `inputSpecification`], + LogLevel: [, __expectString, `logLevel`], + Maintenance: [, (_) => de_MaintenanceStatus(_, context), `maintenance`], + Name: [, __expectString, `name`], + PipelineDetails: [, (_) => de___listOfPipelineDetail(_, context), `pipelineDetails`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + RoleArn: [, __expectString, `roleArn`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Vpc: [, (_) => de_VpcOutputSettingsDescription(_, context), `vpc`], + }); + Object.assign(contents, doc); return contents; }; @@ -3235,10 +3194,9 @@ const de_DeleteChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3300,10 +3258,9 @@ const de_DeleteInputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3362,10 +3319,9 @@ const de_DeleteInputSecurityGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3385,36 +3341,19 @@ export const de_DeleteMultiplexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.availabilityZones != null) { - contents.AvailabilityZones = de___listOf__string(data.availabilityZones, context); - } - if (data.destinations != null) { - contents.Destinations = de___listOfMultiplexOutputDestination(data.destinations, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.multiplexSettings != null) { - contents.MultiplexSettings = de_MultiplexSettings(data.multiplexSettings, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.programCount != null) { - contents.ProgramCount = __expectInt32(data.programCount); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AvailabilityZones: [, _json, `availabilityZones`], + Destinations: [, (_) => de___listOfMultiplexOutputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + MultiplexSettings: [, (_) => de_MultiplexSettings(_, context), `multiplexSettings`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + ProgramCount: [, __expectInt32, `programCount`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3457,10 +3396,9 @@ const de_DeleteMultiplexCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3480,21 +3418,14 @@ export const de_DeleteMultiplexProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.multiplexProgramSettings != null) { - contents.MultiplexProgramSettings = de_MultiplexProgramSettings(data.multiplexProgramSettings, context); - } - if (data.packetIdentifiersMap != null) { - contents.PacketIdentifiersMap = de_MultiplexProgramPacketIdentifiersMap(data.packetIdentifiersMap, context); - } - if (data.pipelineDetails != null) { - contents.PipelineDetails = de___listOfMultiplexProgramPipelineDetail(data.pipelineDetails, context); - } - if (data.programName != null) { - contents.ProgramName = __expectString(data.programName); - } + const doc = take(data, { + ChannelId: [, __expectString, `channelId`], + MultiplexProgramSettings: [, (_) => de_MultiplexProgramSettings(_, context), `multiplexProgramSettings`], + PacketIdentifiersMap: [, (_) => de_MultiplexProgramPacketIdentifiersMap(_, context), `packetIdentifiersMap`], + PipelineDetails: [, (_) => de___listOfMultiplexProgramPipelineDetail(_, context), `pipelineDetails`], + ProgramName: [, __expectString, `programName`], + }); + Object.assign(contents, doc); return contents; }; @@ -3537,10 +3468,9 @@ const de_DeleteMultiplexProgramCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3560,63 +3490,28 @@ export const de_DeleteReservationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.count != null) { - contents.Count = __expectInt32(data.count); - } - if (data.currencyCode != null) { - contents.CurrencyCode = __expectString(data.currencyCode); - } - if (data.duration != null) { - contents.Duration = __expectInt32(data.duration); - } - if (data.durationUnits != null) { - contents.DurationUnits = __expectString(data.durationUnits); - } - if (data.end != null) { - contents.End = __expectString(data.end); - } - if (data.fixedPrice != null) { - contents.FixedPrice = __limitedParseDouble(data.fixedPrice); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.offeringDescription != null) { - contents.OfferingDescription = __expectString(data.offeringDescription); - } - if (data.offeringId != null) { - contents.OfferingId = __expectString(data.offeringId); - } - if (data.offeringType != null) { - contents.OfferingType = __expectString(data.offeringType); - } - if (data.region != null) { - contents.Region = __expectString(data.region); - } - if (data.renewalSettings != null) { - contents.RenewalSettings = de_RenewalSettings(data.renewalSettings, context); - } - if (data.reservationId != null) { - contents.ReservationId = __expectString(data.reservationId); - } - if (data.resourceSpecification != null) { - contents.ResourceSpecification = de_ReservationResourceSpecification(data.resourceSpecification, context); - } - if (data.start != null) { - contents.Start = __expectString(data.start); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.usagePrice != null) { - contents.UsagePrice = __limitedParseDouble(data.usagePrice); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Count: [, __expectInt32, `count`], + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + End: [, __expectString, `end`], + FixedPrice: [, __limitedParseDouble, `fixedPrice`], + Name: [, __expectString, `name`], + OfferingDescription: [, __expectString, `offeringDescription`], + OfferingId: [, __expectString, `offeringId`], + OfferingType: [, __expectString, `offeringType`], + Region: [, __expectString, `region`], + RenewalSettings: [, (_) => de_RenewalSettings(_, context), `renewalSettings`], + ReservationId: [, __expectString, `reservationId`], + ResourceSpecification: [, (_) => de_ReservationResourceSpecification(_, context), `resourceSpecification`], + Start: [, __expectString, `start`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + UsagePrice: [, __limitedParseDouble, `usagePrice`], + }); + Object.assign(contents, doc); return contents; }; @@ -3659,10 +3554,9 @@ const de_DeleteReservationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3721,10 +3615,9 @@ const de_DeleteScheduleCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3774,10 +3667,9 @@ const de_DeleteTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3797,60 +3689,27 @@ export const de_DescribeChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.cdiInputSpecification != null) { - contents.CdiInputSpecification = de_CdiInputSpecification(data.cdiInputSpecification, context); - } - if (data.channelClass != null) { - contents.ChannelClass = __expectString(data.channelClass); - } - if (data.destinations != null) { - contents.Destinations = de___listOfOutputDestination(data.destinations, context); - } - if (data.egressEndpoints != null) { - contents.EgressEndpoints = de___listOfChannelEgressEndpoint(data.egressEndpoints, context); - } - if (data.encoderSettings != null) { - contents.EncoderSettings = de_EncoderSettings(data.encoderSettings, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.inputAttachments != null) { - contents.InputAttachments = de___listOfInputAttachment(data.inputAttachments, context); - } - if (data.inputSpecification != null) { - contents.InputSpecification = de_InputSpecification(data.inputSpecification, context); - } - if (data.logLevel != null) { - contents.LogLevel = __expectString(data.logLevel); - } - if (data.maintenance != null) { - contents.Maintenance = de_MaintenanceStatus(data.maintenance, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelineDetails != null) { - contents.PipelineDetails = de___listOfPipelineDetail(data.pipelineDetails, context); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.roleArn != null) { - contents.RoleArn = __expectString(data.roleArn); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpc != null) { - contents.Vpc = de_VpcOutputSettingsDescription(data.vpc, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CdiInputSpecification: [, (_) => de_CdiInputSpecification(_, context), `cdiInputSpecification`], + ChannelClass: [, __expectString, `channelClass`], + Destinations: [, (_) => de___listOfOutputDestination(_, context), `destinations`], + EgressEndpoints: [, (_) => de___listOfChannelEgressEndpoint(_, context), `egressEndpoints`], + EncoderSettings: [, (_) => de_EncoderSettings(_, context), `encoderSettings`], + Id: [, __expectString, `id`], + InputAttachments: [, (_) => de___listOfInputAttachment(_, context), `inputAttachments`], + InputSpecification: [, (_) => de_InputSpecification(_, context), `inputSpecification`], + LogLevel: [, __expectString, `logLevel`], + Maintenance: [, (_) => de_MaintenanceStatus(_, context), `maintenance`], + Name: [, __expectString, `name`], + PipelineDetails: [, (_) => de___listOfPipelineDetail(_, context), `pipelineDetails`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + RoleArn: [, __expectString, `roleArn`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Vpc: [, (_) => de_VpcOutputSettingsDescription(_, context), `vpc`], + }); + Object.assign(contents, doc); return contents; }; @@ -3890,10 +3749,9 @@ const de_DescribeChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3913,54 +3771,25 @@ export const de_DescribeInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.attachedChannels != null) { - contents.AttachedChannels = de___listOf__string(data.attachedChannels, context); - } - if (data.destinations != null) { - contents.Destinations = de___listOfInputDestination(data.destinations, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.inputClass != null) { - contents.InputClass = __expectString(data.inputClass); - } - if (data.inputDevices != null) { - contents.InputDevices = de___listOfInputDeviceSettings(data.inputDevices, context); - } - if (data.inputPartnerIds != null) { - contents.InputPartnerIds = de___listOf__string(data.inputPartnerIds, context); - } - if (data.inputSourceType != null) { - contents.InputSourceType = __expectString(data.inputSourceType); - } - if (data.mediaConnectFlows != null) { - contents.MediaConnectFlows = de___listOfMediaConnectFlow(data.mediaConnectFlows, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.roleArn != null) { - contents.RoleArn = __expectString(data.roleArn); - } - if (data.securityGroups != null) { - contents.SecurityGroups = de___listOf__string(data.securityGroups, context); - } - if (data.sources != null) { - contents.Sources = de___listOfInputSource(data.sources, context); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.type != null) { - contents.Type = __expectString(data.type); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AttachedChannels: [, _json, `attachedChannels`], + Destinations: [, (_) => de___listOfInputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + InputClass: [, __expectString, `inputClass`], + InputDevices: [, (_) => de___listOfInputDeviceSettings(_, context), `inputDevices`], + InputPartnerIds: [, _json, `inputPartnerIds`], + InputSourceType: [, __expectString, `inputSourceType`], + MediaConnectFlows: [, (_) => de___listOfMediaConnectFlow(_, context), `mediaConnectFlows`], + Name: [, __expectString, `name`], + RoleArn: [, __expectString, `roleArn`], + SecurityGroups: [, _json, `securityGroups`], + Sources: [, (_) => de___listOfInputSource(_, context), `sources`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Type: [, __expectString, `type`], + }); + Object.assign(contents, doc); return contents; }; @@ -4000,10 +3829,9 @@ const de_DescribeInputCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4023,45 +3851,22 @@ export const de_DescribeInputDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.connectionState != null) { - contents.ConnectionState = __expectString(data.connectionState); - } - if (data.deviceSettingsSyncState != null) { - contents.DeviceSettingsSyncState = __expectString(data.deviceSettingsSyncState); - } - if (data.deviceUpdateStatus != null) { - contents.DeviceUpdateStatus = __expectString(data.deviceUpdateStatus); - } - if (data.hdDeviceSettings != null) { - contents.HdDeviceSettings = de_InputDeviceHdSettings(data.hdDeviceSettings, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.macAddress != null) { - contents.MacAddress = __expectString(data.macAddress); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.networkSettings != null) { - contents.NetworkSettings = de_InputDeviceNetworkSettings(data.networkSettings, context); - } - if (data.serialNumber != null) { - contents.SerialNumber = __expectString(data.serialNumber); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.type != null) { - contents.Type = __expectString(data.type); - } - if (data.uhdDeviceSettings != null) { - contents.UhdDeviceSettings = de_InputDeviceUhdSettings(data.uhdDeviceSettings, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + ConnectionState: [, __expectString, `connectionState`], + DeviceSettingsSyncState: [, __expectString, `deviceSettingsSyncState`], + DeviceUpdateStatus: [, __expectString, `deviceUpdateStatus`], + HdDeviceSettings: [, (_) => de_InputDeviceHdSettings(_, context), `hdDeviceSettings`], + Id: [, __expectString, `id`], + MacAddress: [, __expectString, `macAddress`], + Name: [, __expectString, `name`], + NetworkSettings: [, (_) => de_InputDeviceNetworkSettings(_, context), `networkSettings`], + SerialNumber: [, __expectString, `serialNumber`], + Tags: [, _json, `tags`], + Type: [, __expectString, `type`], + UhdDeviceSettings: [, (_) => de_InputDeviceUhdSettings(_, context), `uhdDeviceSettings`], + }); + Object.assign(contents, doc); return contents; }; @@ -4101,10 +3906,9 @@ const de_DescribeInputDeviceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4175,10 +3979,9 @@ const de_DescribeInputDeviceThumbnailCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4198,24 +4001,15 @@ export const de_DescribeInputSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.inputs != null) { - contents.Inputs = de___listOf__string(data.inputs, context); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.whitelistRules != null) { - contents.WhitelistRules = de___listOfInputWhitelistRule(data.whitelistRules, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Id: [, __expectString, `id`], + Inputs: [, _json, `inputs`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + WhitelistRules: [, (_) => de___listOfInputWhitelistRule(_, context), `whitelistRules`], + }); + Object.assign(contents, doc); return contents; }; @@ -4255,10 +4049,9 @@ const de_DescribeInputSecurityGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4278,36 +4071,19 @@ export const de_DescribeMultiplexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.availabilityZones != null) { - contents.AvailabilityZones = de___listOf__string(data.availabilityZones, context); - } - if (data.destinations != null) { - contents.Destinations = de___listOfMultiplexOutputDestination(data.destinations, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.multiplexSettings != null) { - contents.MultiplexSettings = de_MultiplexSettings(data.multiplexSettings, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.programCount != null) { - contents.ProgramCount = __expectInt32(data.programCount); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AvailabilityZones: [, _json, `availabilityZones`], + Destinations: [, (_) => de___listOfMultiplexOutputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + MultiplexSettings: [, (_) => de_MultiplexSettings(_, context), `multiplexSettings`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + ProgramCount: [, __expectInt32, `programCount`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -4347,10 +4123,9 @@ const de_DescribeMultiplexCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4370,21 +4145,14 @@ export const de_DescribeMultiplexProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.multiplexProgramSettings != null) { - contents.MultiplexProgramSettings = de_MultiplexProgramSettings(data.multiplexProgramSettings, context); - } - if (data.packetIdentifiersMap != null) { - contents.PacketIdentifiersMap = de_MultiplexProgramPacketIdentifiersMap(data.packetIdentifiersMap, context); - } - if (data.pipelineDetails != null) { - contents.PipelineDetails = de___listOfMultiplexProgramPipelineDetail(data.pipelineDetails, context); - } - if (data.programName != null) { - contents.ProgramName = __expectString(data.programName); - } + const doc = take(data, { + ChannelId: [, __expectString, `channelId`], + MultiplexProgramSettings: [, (_) => de_MultiplexProgramSettings(_, context), `multiplexProgramSettings`], + PacketIdentifiersMap: [, (_) => de_MultiplexProgramPacketIdentifiersMap(_, context), `packetIdentifiersMap`], + PipelineDetails: [, (_) => de___listOfMultiplexProgramPipelineDetail(_, context), `pipelineDetails`], + ProgramName: [, __expectString, `programName`], + }); + Object.assign(contents, doc); return contents; }; @@ -4424,10 +4192,9 @@ const de_DescribeMultiplexProgramCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4447,39 +4214,20 @@ export const de_DescribeOfferingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.currencyCode != null) { - contents.CurrencyCode = __expectString(data.currencyCode); - } - if (data.duration != null) { - contents.Duration = __expectInt32(data.duration); - } - if (data.durationUnits != null) { - contents.DurationUnits = __expectString(data.durationUnits); - } - if (data.fixedPrice != null) { - contents.FixedPrice = __limitedParseDouble(data.fixedPrice); - } - if (data.offeringDescription != null) { - contents.OfferingDescription = __expectString(data.offeringDescription); - } - if (data.offeringId != null) { - contents.OfferingId = __expectString(data.offeringId); - } - if (data.offeringType != null) { - contents.OfferingType = __expectString(data.offeringType); - } - if (data.region != null) { - contents.Region = __expectString(data.region); - } - if (data.resourceSpecification != null) { - contents.ResourceSpecification = de_ReservationResourceSpecification(data.resourceSpecification, context); - } - if (data.usagePrice != null) { - contents.UsagePrice = __limitedParseDouble(data.usagePrice); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + FixedPrice: [, __limitedParseDouble, `fixedPrice`], + OfferingDescription: [, __expectString, `offeringDescription`], + OfferingId: [, __expectString, `offeringId`], + OfferingType: [, __expectString, `offeringType`], + Region: [, __expectString, `region`], + ResourceSpecification: [, (_) => de_ReservationResourceSpecification(_, context), `resourceSpecification`], + UsagePrice: [, __limitedParseDouble, `usagePrice`], + }); + Object.assign(contents, doc); return contents; }; @@ -4519,10 +4267,9 @@ const de_DescribeOfferingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4542,63 +4289,28 @@ export const de_DescribeReservationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.count != null) { - contents.Count = __expectInt32(data.count); - } - if (data.currencyCode != null) { - contents.CurrencyCode = __expectString(data.currencyCode); - } - if (data.duration != null) { - contents.Duration = __expectInt32(data.duration); - } - if (data.durationUnits != null) { - contents.DurationUnits = __expectString(data.durationUnits); - } - if (data.end != null) { - contents.End = __expectString(data.end); - } - if (data.fixedPrice != null) { - contents.FixedPrice = __limitedParseDouble(data.fixedPrice); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.offeringDescription != null) { - contents.OfferingDescription = __expectString(data.offeringDescription); - } - if (data.offeringId != null) { - contents.OfferingId = __expectString(data.offeringId); - } - if (data.offeringType != null) { - contents.OfferingType = __expectString(data.offeringType); - } - if (data.region != null) { - contents.Region = __expectString(data.region); - } - if (data.renewalSettings != null) { - contents.RenewalSettings = de_RenewalSettings(data.renewalSettings, context); - } - if (data.reservationId != null) { - contents.ReservationId = __expectString(data.reservationId); - } - if (data.resourceSpecification != null) { - contents.ResourceSpecification = de_ReservationResourceSpecification(data.resourceSpecification, context); - } - if (data.start != null) { - contents.Start = __expectString(data.start); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.usagePrice != null) { - contents.UsagePrice = __limitedParseDouble(data.usagePrice); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Count: [, __expectInt32, `count`], + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + End: [, __expectString, `end`], + FixedPrice: [, __limitedParseDouble, `fixedPrice`], + Name: [, __expectString, `name`], + OfferingDescription: [, __expectString, `offeringDescription`], + OfferingId: [, __expectString, `offeringId`], + OfferingType: [, __expectString, `offeringType`], + Region: [, __expectString, `region`], + RenewalSettings: [, (_) => de_RenewalSettings(_, context), `renewalSettings`], + ReservationId: [, __expectString, `reservationId`], + ResourceSpecification: [, (_) => de_ReservationResourceSpecification(_, context), `resourceSpecification`], + Start: [, __expectString, `start`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + UsagePrice: [, __limitedParseDouble, `usagePrice`], + }); + Object.assign(contents, doc); return contents; }; @@ -4638,10 +4350,9 @@ const de_DescribeReservationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4661,12 +4372,11 @@ export const de_DescribeScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.scheduleActions != null) { - contents.ScheduleActions = de___listOfScheduleAction(data.scheduleActions, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + ScheduleActions: [, (_) => de___listOfScheduleAction(_, context), `scheduleActions`], + }); + Object.assign(contents, doc); return contents; }; @@ -4706,10 +4416,9 @@ const de_DescribeScheduleCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4729,12 +4438,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channels != null) { - contents.Channels = de___listOfChannelSummary(data.channels, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Channels: [, (_) => de___listOfChannelSummary(_, context), `channels`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4771,10 +4479,9 @@ const de_ListChannelsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4794,12 +4501,11 @@ export const de_ListInputDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputDevices != null) { - contents.InputDevices = de___listOfInputDeviceSummary(data.inputDevices, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + InputDevices: [, (_) => de___listOfInputDeviceSummary(_, context), `inputDevices`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4836,10 +4542,9 @@ const de_ListInputDevicesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4859,12 +4564,11 @@ export const de_ListInputDeviceTransfersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputDeviceTransfers != null) { - contents.InputDeviceTransfers = de___listOfTransferringInputDeviceSummary(data.inputDeviceTransfers, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + InputDeviceTransfers: [, (_) => de___listOfTransferringInputDeviceSummary(_, context), `inputDeviceTransfers`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4904,10 +4608,9 @@ const de_ListInputDeviceTransfersCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4927,12 +4630,11 @@ export const de_ListInputsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputs != null) { - contents.Inputs = de___listOfInput(data.inputs, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Inputs: [, (_) => de___listOfInput(_, context), `inputs`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -4969,10 +4671,9 @@ const de_ListInputsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4992,12 +4693,11 @@ export const de_ListInputSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.inputSecurityGroups != null) { - contents.InputSecurityGroups = de___listOfInputSecurityGroup(data.inputSecurityGroups, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + InputSecurityGroups: [, (_) => de___listOfInputSecurityGroup(_, context), `inputSecurityGroups`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5034,10 +4734,9 @@ const de_ListInputSecurityGroupsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5057,12 +4756,11 @@ export const de_ListMultiplexesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.multiplexes != null) { - contents.Multiplexes = de___listOfMultiplexSummary(data.multiplexes, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Multiplexes: [, (_) => de___listOfMultiplexSummary(_, context), `multiplexes`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5099,10 +4797,9 @@ const de_ListMultiplexesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5122,12 +4819,11 @@ export const de_ListMultiplexProgramsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.multiplexPrograms != null) { - contents.MultiplexPrograms = de___listOfMultiplexProgramSummary(data.multiplexPrograms, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + MultiplexPrograms: [, (_) => de___listOfMultiplexProgramSummary(_, context), `multiplexPrograms`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -5167,10 +4863,9 @@ const de_ListMultiplexProgramsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5190,12 +4885,11 @@ export const de_ListOfferingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.offerings != null) { - contents.Offerings = de___listOfOffering(data.offerings, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Offerings: [, (_) => de___listOfOffering(_, context), `offerings`], + }); + Object.assign(contents, doc); return contents; }; @@ -5232,10 +4926,9 @@ const de_ListOfferingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5255,12 +4948,11 @@ export const de_ListReservationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.reservations != null) { - contents.Reservations = de___listOfReservation(data.reservations, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Reservations: [, (_) => de___listOfReservation(_, context), `reservations`], + }); + Object.assign(contents, doc); return contents; }; @@ -5297,10 +4989,9 @@ const de_ListReservationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5320,9 +5011,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -5353,10 +5045,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5376,9 +5067,10 @@ export const de_PurchaseOfferingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reservation != null) { - contents.Reservation = de_Reservation(data.reservation, context); - } + const doc = take(data, { + Reservation: [, (_) => de_Reservation(_, context), `reservation`], + }); + Object.assign(contents, doc); return contents; }; @@ -5421,10 +5113,9 @@ const de_PurchaseOfferingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5486,10 +5177,9 @@ const de_RebootInputDeviceCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5554,10 +5244,9 @@ const de_RejectInputDeviceTransferCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5577,60 +5266,27 @@ export const de_StartChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.cdiInputSpecification != null) { - contents.CdiInputSpecification = de_CdiInputSpecification(data.cdiInputSpecification, context); - } - if (data.channelClass != null) { - contents.ChannelClass = __expectString(data.channelClass); - } - if (data.destinations != null) { - contents.Destinations = de___listOfOutputDestination(data.destinations, context); - } - if (data.egressEndpoints != null) { - contents.EgressEndpoints = de___listOfChannelEgressEndpoint(data.egressEndpoints, context); - } - if (data.encoderSettings != null) { - contents.EncoderSettings = de_EncoderSettings(data.encoderSettings, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.inputAttachments != null) { - contents.InputAttachments = de___listOfInputAttachment(data.inputAttachments, context); - } - if (data.inputSpecification != null) { - contents.InputSpecification = de_InputSpecification(data.inputSpecification, context); - } - if (data.logLevel != null) { - contents.LogLevel = __expectString(data.logLevel); - } - if (data.maintenance != null) { - contents.Maintenance = de_MaintenanceStatus(data.maintenance, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelineDetails != null) { - contents.PipelineDetails = de___listOfPipelineDetail(data.pipelineDetails, context); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.roleArn != null) { - contents.RoleArn = __expectString(data.roleArn); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpc != null) { - contents.Vpc = de_VpcOutputSettingsDescription(data.vpc, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CdiInputSpecification: [, (_) => de_CdiInputSpecification(_, context), `cdiInputSpecification`], + ChannelClass: [, __expectString, `channelClass`], + Destinations: [, (_) => de___listOfOutputDestination(_, context), `destinations`], + EgressEndpoints: [, (_) => de___listOfChannelEgressEndpoint(_, context), `egressEndpoints`], + EncoderSettings: [, (_) => de_EncoderSettings(_, context), `encoderSettings`], + Id: [, __expectString, `id`], + InputAttachments: [, (_) => de___listOfInputAttachment(_, context), `inputAttachments`], + InputSpecification: [, (_) => de_InputSpecification(_, context), `inputSpecification`], + LogLevel: [, __expectString, `logLevel`], + Maintenance: [, (_) => de_MaintenanceStatus(_, context), `maintenance`], + Name: [, __expectString, `name`], + PipelineDetails: [, (_) => de___listOfPipelineDetail(_, context), `pipelineDetails`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + RoleArn: [, __expectString, `roleArn`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Vpc: [, (_) => de_VpcOutputSettingsDescription(_, context), `vpc`], + }); + Object.assign(contents, doc); return contents; }; @@ -5673,10 +5329,9 @@ const de_StartChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5738,10 +5393,9 @@ const de_StartInputDeviceMaintenanceWindowCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5761,36 +5415,19 @@ export const de_StartMultiplexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.availabilityZones != null) { - contents.AvailabilityZones = de___listOf__string(data.availabilityZones, context); - } - if (data.destinations != null) { - contents.Destinations = de___listOfMultiplexOutputDestination(data.destinations, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.multiplexSettings != null) { - contents.MultiplexSettings = de_MultiplexSettings(data.multiplexSettings, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.programCount != null) { - contents.ProgramCount = __expectInt32(data.programCount); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AvailabilityZones: [, _json, `availabilityZones`], + Destinations: [, (_) => de___listOfMultiplexOutputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + MultiplexSettings: [, (_) => de_MultiplexSettings(_, context), `multiplexSettings`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + ProgramCount: [, __expectInt32, `programCount`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -5833,10 +5470,9 @@ const de_StartMultiplexCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5856,60 +5492,27 @@ export const de_StopChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.cdiInputSpecification != null) { - contents.CdiInputSpecification = de_CdiInputSpecification(data.cdiInputSpecification, context); - } - if (data.channelClass != null) { - contents.ChannelClass = __expectString(data.channelClass); - } - if (data.destinations != null) { - contents.Destinations = de___listOfOutputDestination(data.destinations, context); - } - if (data.egressEndpoints != null) { - contents.EgressEndpoints = de___listOfChannelEgressEndpoint(data.egressEndpoints, context); - } - if (data.encoderSettings != null) { - contents.EncoderSettings = de_EncoderSettings(data.encoderSettings, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.inputAttachments != null) { - contents.InputAttachments = de___listOfInputAttachment(data.inputAttachments, context); - } - if (data.inputSpecification != null) { - contents.InputSpecification = de_InputSpecification(data.inputSpecification, context); - } - if (data.logLevel != null) { - contents.LogLevel = __expectString(data.logLevel); - } - if (data.maintenance != null) { - contents.Maintenance = de_MaintenanceStatus(data.maintenance, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelineDetails != null) { - contents.PipelineDetails = de___listOfPipelineDetail(data.pipelineDetails, context); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.roleArn != null) { - contents.RoleArn = __expectString(data.roleArn); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.vpc != null) { - contents.Vpc = de_VpcOutputSettingsDescription(data.vpc, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CdiInputSpecification: [, (_) => de_CdiInputSpecification(_, context), `cdiInputSpecification`], + ChannelClass: [, __expectString, `channelClass`], + Destinations: [, (_) => de___listOfOutputDestination(_, context), `destinations`], + EgressEndpoints: [, (_) => de___listOfChannelEgressEndpoint(_, context), `egressEndpoints`], + EncoderSettings: [, (_) => de_EncoderSettings(_, context), `encoderSettings`], + Id: [, __expectString, `id`], + InputAttachments: [, (_) => de___listOfInputAttachment(_, context), `inputAttachments`], + InputSpecification: [, (_) => de_InputSpecification(_, context), `inputSpecification`], + LogLevel: [, __expectString, `logLevel`], + Maintenance: [, (_) => de_MaintenanceStatus(_, context), `maintenance`], + Name: [, __expectString, `name`], + PipelineDetails: [, (_) => de___listOfPipelineDetail(_, context), `pipelineDetails`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + RoleArn: [, __expectString, `roleArn`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Vpc: [, (_) => de_VpcOutputSettingsDescription(_, context), `vpc`], + }); + Object.assign(contents, doc); return contents; }; @@ -5952,10 +5555,9 @@ const de_StopChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5975,36 +5577,19 @@ export const de_StopMultiplexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.availabilityZones != null) { - contents.AvailabilityZones = de___listOf__string(data.availabilityZones, context); - } - if (data.destinations != null) { - contents.Destinations = de___listOfMultiplexOutputDestination(data.destinations, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.multiplexSettings != null) { - contents.MultiplexSettings = de_MultiplexSettings(data.multiplexSettings, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.pipelinesRunningCount != null) { - contents.PipelinesRunningCount = __expectInt32(data.pipelinesRunningCount); - } - if (data.programCount != null) { - contents.ProgramCount = __expectInt32(data.programCount); - } - if (data.state != null) { - contents.State = __expectString(data.state); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AvailabilityZones: [, _json, `availabilityZones`], + Destinations: [, (_) => de___listOfMultiplexOutputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + MultiplexSettings: [, (_) => de_MultiplexSettings(_, context), `multiplexSettings`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + ProgramCount: [, __expectInt32, `programCount`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -6047,10 +5632,9 @@ const de_StopMultiplexCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6115,10 +5699,9 @@ const de_TransferInputDeviceCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6138,9 +5721,10 @@ export const de_UpdateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.Channel = de_Channel(data.channel, context); - } + const doc = take(data, { + Channel: [, (_) => de_Channel(_, context), `channel`], + }); + Object.assign(contents, doc); return contents; }; @@ -6180,10 +5764,9 @@ const de_UpdateChannelCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6203,9 +5786,10 @@ export const de_UpdateChannelClassCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channel != null) { - contents.Channel = de_Channel(data.channel, context); - } + const doc = take(data, { + Channel: [, (_) => de_Channel(_, context), `channel`], + }); + Object.assign(contents, doc); return contents; }; @@ -6251,10 +5835,9 @@ const de_UpdateChannelClassCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6274,9 +5857,10 @@ export const de_UpdateInputCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.input != null) { - contents.Input = de_Input(data.input, context); - } + const doc = take(data, { + Input: [, (_) => de_Input(_, context), `input`], + }); + Object.assign(contents, doc); return contents; }; @@ -6316,10 +5900,9 @@ const de_UpdateInputCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6339,45 +5922,22 @@ export const de_UpdateInputDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.connectionState != null) { - contents.ConnectionState = __expectString(data.connectionState); - } - if (data.deviceSettingsSyncState != null) { - contents.DeviceSettingsSyncState = __expectString(data.deviceSettingsSyncState); - } - if (data.deviceUpdateStatus != null) { - contents.DeviceUpdateStatus = __expectString(data.deviceUpdateStatus); - } - if (data.hdDeviceSettings != null) { - contents.HdDeviceSettings = de_InputDeviceHdSettings(data.hdDeviceSettings, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.macAddress != null) { - contents.MacAddress = __expectString(data.macAddress); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.networkSettings != null) { - contents.NetworkSettings = de_InputDeviceNetworkSettings(data.networkSettings, context); - } - if (data.serialNumber != null) { - contents.SerialNumber = __expectString(data.serialNumber); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.type != null) { - contents.Type = __expectString(data.type); - } - if (data.uhdDeviceSettings != null) { - contents.UhdDeviceSettings = de_InputDeviceUhdSettings(data.uhdDeviceSettings, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + ConnectionState: [, __expectString, `connectionState`], + DeviceSettingsSyncState: [, __expectString, `deviceSettingsSyncState`], + DeviceUpdateStatus: [, __expectString, `deviceUpdateStatus`], + HdDeviceSettings: [, (_) => de_InputDeviceHdSettings(_, context), `hdDeviceSettings`], + Id: [, __expectString, `id`], + MacAddress: [, __expectString, `macAddress`], + Name: [, __expectString, `name`], + NetworkSettings: [, (_) => de_InputDeviceNetworkSettings(_, context), `networkSettings`], + SerialNumber: [, __expectString, `serialNumber`], + Tags: [, _json, `tags`], + Type: [, __expectString, `type`], + UhdDeviceSettings: [, (_) => de_InputDeviceUhdSettings(_, context), `uhdDeviceSettings`], + }); + Object.assign(contents, doc); return contents; }; @@ -6420,10 +5980,9 @@ const de_UpdateInputDeviceCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6443,9 +6002,10 @@ export const de_UpdateInputSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.securityGroup != null) { - contents.SecurityGroup = de_InputSecurityGroup(data.securityGroup, context); - } + const doc = take(data, { + SecurityGroup: [, (_) => de_InputSecurityGroup(_, context), `securityGroup`], + }); + Object.assign(contents, doc); return contents; }; @@ -6485,10 +6045,9 @@ const de_UpdateInputSecurityGroupCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6508,9 +6067,10 @@ export const de_UpdateMultiplexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.multiplex != null) { - contents.Multiplex = de_Multiplex(data.multiplex, context); - } + const doc = take(data, { + Multiplex: [, (_) => de_Multiplex(_, context), `multiplex`], + }); + Object.assign(contents, doc); return contents; }; @@ -6553,10 +6113,9 @@ const de_UpdateMultiplexCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6576,9 +6135,10 @@ export const de_UpdateMultiplexProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.multiplexProgram != null) { - contents.MultiplexProgram = de_MultiplexProgram(data.multiplexProgram, context); - } + const doc = take(data, { + MultiplexProgram: [, (_) => de_MultiplexProgram(_, context), `multiplexProgram`], + }); + Object.assign(contents, doc); return contents; }; @@ -6621,10 +6181,9 @@ const de_UpdateMultiplexProgramCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6644,9 +6203,10 @@ export const de_UpdateReservationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.reservation != null) { - contents.Reservation = de_Reservation(data.reservation, context); - } + const doc = take(data, { + Reservation: [, (_) => de_Reservation(_, context), `reservation`], + }); + Object.assign(contents, doc); return contents; }; @@ -6689,25 +6249,25 @@ const de_UpdateReservationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadGatewayExceptionRes */ const de_BadGatewayExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadGatewayException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6721,9 +6281,10 @@ const de_BadGatewayExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6737,9 +6298,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6753,9 +6315,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6772,9 +6335,10 @@ const de_GatewayTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new GatewayTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6791,9 +6355,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6807,9 +6372,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6826,9 +6392,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6845,12 +6412,11 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } - if (data.validationErrors != null) { - contents.ValidationErrors = de___listOfValidationError(data.validationErrors, context); - } + const doc = take(data, { + Message: [, __expectString, `message`], + ValidationErrors: [, (_) => de___listOfValidationError(_, context), `validationErrors`], + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6858,16 +6424,7 @@ const de_UnprocessableEntityExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfAudioChannelMapping @@ -6957,16 +6514,7 @@ const se___listOfFailoverCondition = (input: FailoverCondition[], context: __Ser }); }; -/** - * serializeAws_restJson1__listOfHlsAdMarkers - */ -const se___listOfHlsAdMarkers = (input: (HlsAdMarkers | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfHlsAdMarkers omitted. /** * serializeAws_restJson1__listOfInputAttachment @@ -7125,16 +6673,7 @@ const se___listOfPipelinePauseStateSettings = (input: PipelinePauseStateSettings }); }; -/** - * serializeAws_restJson1__listOfRtmpAdMarkers - */ -const se___listOfRtmpAdMarkers = (input: (RtmpAdMarkers | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfRtmpAdMarkers omitted. /** * serializeAws_restJson1__listOfScheduleAction @@ -7173,823 +6712,667 @@ const se___listOfVideoDescription = (input: VideoDescription[], context: __Serde * serializeAws_restJson1AacSettings */ const se_AacSettings = (input: AacSettings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: __serializeFloat(input.Bitrate) }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.InputType != null && { inputType: input.InputType }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.RawFormat != null && { rawFormat: input.RawFormat }), - ...(input.SampleRate != null && { sampleRate: __serializeFloat(input.SampleRate) }), - ...(input.Spec != null && { spec: input.Spec }), - ...(input.VbrQuality != null && { vbrQuality: input.VbrQuality }), - }; + return take(input, { + bitrate: [, __serializeFloat, `Bitrate`], + codingMode: [, , `CodingMode`], + inputType: [, , `InputType`], + profile: [, , `Profile`], + rateControlMode: [, , `RateControlMode`], + rawFormat: [, , `RawFormat`], + sampleRate: [, __serializeFloat, `SampleRate`], + spec: [, , `Spec`], + vbrQuality: [, , `VbrQuality`], + }); }; /** * serializeAws_restJson1Ac3Settings */ const se_Ac3Settings = (input: Ac3Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: __serializeFloat(input.Bitrate) }), - ...(input.BitstreamMode != null && { bitstreamMode: input.BitstreamMode }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.Dialnorm != null && { dialnorm: input.Dialnorm }), - ...(input.DrcProfile != null && { drcProfile: input.DrcProfile }), - ...(input.LfeFilter != null && { lfeFilter: input.LfeFilter }), - ...(input.MetadataControl != null && { metadataControl: input.MetadataControl }), - }; + return take(input, { + bitrate: [, __serializeFloat, `Bitrate`], + bitstreamMode: [, , `BitstreamMode`], + codingMode: [, , `CodingMode`], + dialnorm: [, , `Dialnorm`], + drcProfile: [, , `DrcProfile`], + lfeFilter: [, , `LfeFilter`], + metadataControl: [, , `MetadataControl`], + }); }; /** * serializeAws_restJson1AncillarySourceSettings */ const se_AncillarySourceSettings = (input: AncillarySourceSettings, context: __SerdeContext): any => { - return { - ...(input.SourceAncillaryChannelNumber != null && { - sourceAncillaryChannelNumber: input.SourceAncillaryChannelNumber, - }), - }; + return take(input, { + sourceAncillaryChannelNumber: [, , `SourceAncillaryChannelNumber`], + }); }; /** * serializeAws_restJson1ArchiveCdnSettings */ const se_ArchiveCdnSettings = (input: ArchiveCdnSettings, context: __SerdeContext): any => { - return { - ...(input.ArchiveS3Settings != null && { - archiveS3Settings: se_ArchiveS3Settings(input.ArchiveS3Settings, context), - }), - }; + return take(input, { + archiveS3Settings: [, (_) => se_ArchiveS3Settings(_, context), `ArchiveS3Settings`], + }); }; /** * serializeAws_restJson1ArchiveContainerSettings */ const se_ArchiveContainerSettings = (input: ArchiveContainerSettings, context: __SerdeContext): any => { - return { - ...(input.M2tsSettings != null && { m2tsSettings: se_M2tsSettings(input.M2tsSettings, context) }), - ...(input.RawSettings != null && { rawSettings: se_RawSettings(input.RawSettings, context) }), - }; + return take(input, { + m2tsSettings: [, (_) => se_M2tsSettings(_, context), `M2tsSettings`], + rawSettings: [, _json, `RawSettings`], + }); }; /** * serializeAws_restJson1ArchiveGroupSettings */ const se_ArchiveGroupSettings = (input: ArchiveGroupSettings, context: __SerdeContext): any => { - return { - ...(input.ArchiveCdnSettings != null && { - archiveCdnSettings: se_ArchiveCdnSettings(input.ArchiveCdnSettings, context), - }), - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - ...(input.RolloverInterval != null && { rolloverInterval: input.RolloverInterval }), - }; + return take(input, { + archiveCdnSettings: [, (_) => se_ArchiveCdnSettings(_, context), `ArchiveCdnSettings`], + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + rolloverInterval: [, , `RolloverInterval`], + }); }; /** * serializeAws_restJson1ArchiveOutputSettings */ const se_ArchiveOutputSettings = (input: ArchiveOutputSettings, context: __SerdeContext): any => { - return { - ...(input.ContainerSettings != null && { - containerSettings: se_ArchiveContainerSettings(input.ContainerSettings, context), - }), - ...(input.Extension != null && { extension: input.Extension }), - ...(input.NameModifier != null && { nameModifier: input.NameModifier }), - }; + return take(input, { + containerSettings: [, (_) => se_ArchiveContainerSettings(_, context), `ContainerSettings`], + extension: [, , `Extension`], + nameModifier: [, , `NameModifier`], + }); }; /** * serializeAws_restJson1ArchiveS3Settings */ const se_ArchiveS3Settings = (input: ArchiveS3Settings, context: __SerdeContext): any => { - return { - ...(input.CannedAcl != null && { cannedAcl: input.CannedAcl }), - }; + return take(input, { + cannedAcl: [, , `CannedAcl`], + }); }; -/** - * serializeAws_restJson1AribDestinationSettings - */ -const se_AribDestinationSettings = (input: AribDestinationSettings, context: __SerdeContext): any => { - return {}; -}; +// se_AribDestinationSettings omitted. -/** - * serializeAws_restJson1AribSourceSettings - */ -const se_AribSourceSettings = (input: AribSourceSettings, context: __SerdeContext): any => { - return {}; -}; +// se_AribSourceSettings omitted. /** * serializeAws_restJson1AudioChannelMapping */ const se_AudioChannelMapping = (input: AudioChannelMapping, context: __SerdeContext): any => { - return { - ...(input.InputChannelLevels != null && { - inputChannelLevels: se___listOfInputChannelLevel(input.InputChannelLevels, context), - }), - ...(input.OutputChannel != null && { outputChannel: input.OutputChannel }), - }; + return take(input, { + inputChannelLevels: [, (_) => se___listOfInputChannelLevel(_, context), `InputChannelLevels`], + outputChannel: [, , `OutputChannel`], + }); }; /** * serializeAws_restJson1AudioCodecSettings */ const se_AudioCodecSettings = (input: AudioCodecSettings, context: __SerdeContext): any => { - return { - ...(input.AacSettings != null && { aacSettings: se_AacSettings(input.AacSettings, context) }), - ...(input.Ac3Settings != null && { ac3Settings: se_Ac3Settings(input.Ac3Settings, context) }), - ...(input.Eac3AtmosSettings != null && { - eac3AtmosSettings: se_Eac3AtmosSettings(input.Eac3AtmosSettings, context), - }), - ...(input.Eac3Settings != null && { eac3Settings: se_Eac3Settings(input.Eac3Settings, context) }), - ...(input.Mp2Settings != null && { mp2Settings: se_Mp2Settings(input.Mp2Settings, context) }), - ...(input.PassThroughSettings != null && { - passThroughSettings: se_PassThroughSettings(input.PassThroughSettings, context), - }), - ...(input.WavSettings != null && { wavSettings: se_WavSettings(input.WavSettings, context) }), - }; + return take(input, { + aacSettings: [, (_) => se_AacSettings(_, context), `AacSettings`], + ac3Settings: [, (_) => se_Ac3Settings(_, context), `Ac3Settings`], + eac3AtmosSettings: [, (_) => se_Eac3AtmosSettings(_, context), `Eac3AtmosSettings`], + eac3Settings: [, (_) => se_Eac3Settings(_, context), `Eac3Settings`], + mp2Settings: [, (_) => se_Mp2Settings(_, context), `Mp2Settings`], + passThroughSettings: [, _json, `PassThroughSettings`], + wavSettings: [, (_) => se_WavSettings(_, context), `WavSettings`], + }); }; /** * serializeAws_restJson1AudioDescription */ const se_AudioDescription = (input: AudioDescription, context: __SerdeContext): any => { - return { - ...(input.AudioNormalizationSettings != null && { - audioNormalizationSettings: se_AudioNormalizationSettings(input.AudioNormalizationSettings, context), - }), - ...(input.AudioSelectorName != null && { audioSelectorName: input.AudioSelectorName }), - ...(input.AudioType != null && { audioType: input.AudioType }), - ...(input.AudioTypeControl != null && { audioTypeControl: input.AudioTypeControl }), - ...(input.AudioWatermarkingSettings != null && { - audioWatermarkingSettings: se_AudioWatermarkSettings(input.AudioWatermarkingSettings, context), - }), - ...(input.CodecSettings != null && { codecSettings: se_AudioCodecSettings(input.CodecSettings, context) }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageCodeControl != null && { languageCodeControl: input.LanguageCodeControl }), - ...(input.Name != null && { name: input.Name }), - ...(input.RemixSettings != null && { remixSettings: se_RemixSettings(input.RemixSettings, context) }), - ...(input.StreamName != null && { streamName: input.StreamName }), - }; + return take(input, { + audioNormalizationSettings: [, (_) => se_AudioNormalizationSettings(_, context), `AudioNormalizationSettings`], + audioSelectorName: [, , `AudioSelectorName`], + audioType: [, , `AudioType`], + audioTypeControl: [, , `AudioTypeControl`], + audioWatermarkingSettings: [, (_) => se_AudioWatermarkSettings(_, context), `AudioWatermarkingSettings`], + codecSettings: [, (_) => se_AudioCodecSettings(_, context), `CodecSettings`], + languageCode: [, , `LanguageCode`], + languageCodeControl: [, , `LanguageCodeControl`], + name: [, , `Name`], + remixSettings: [, (_) => se_RemixSettings(_, context), `RemixSettings`], + streamName: [, , `StreamName`], + }); }; /** * serializeAws_restJson1AudioDolbyEDecode */ const se_AudioDolbyEDecode = (input: AudioDolbyEDecode, context: __SerdeContext): any => { - return { - ...(input.ProgramSelection != null && { programSelection: input.ProgramSelection }), - }; + return take(input, { + programSelection: [, , `ProgramSelection`], + }); }; /** * serializeAws_restJson1AudioHlsRenditionSelection */ const se_AudioHlsRenditionSelection = (input: AudioHlsRenditionSelection, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { groupId: input.GroupId }), - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + groupId: [, , `GroupId`], + name: [, , `Name`], + }); }; /** * serializeAws_restJson1AudioLanguageSelection */ const se_AudioLanguageSelection = (input: AudioLanguageSelection, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageSelectionPolicy != null && { languageSelectionPolicy: input.LanguageSelectionPolicy }), - }; + return take(input, { + languageCode: [, , `LanguageCode`], + languageSelectionPolicy: [, , `LanguageSelectionPolicy`], + }); }; /** * serializeAws_restJson1AudioNormalizationSettings */ const se_AudioNormalizationSettings = (input: AudioNormalizationSettings, context: __SerdeContext): any => { - return { - ...(input.Algorithm != null && { algorithm: input.Algorithm }), - ...(input.AlgorithmControl != null && { algorithmControl: input.AlgorithmControl }), - ...(input.TargetLkfs != null && { targetLkfs: __serializeFloat(input.TargetLkfs) }), - }; + return take(input, { + algorithm: [, , `Algorithm`], + algorithmControl: [, , `AlgorithmControl`], + targetLkfs: [, __serializeFloat, `TargetLkfs`], + }); }; /** * serializeAws_restJson1AudioOnlyHlsSettings */ const se_AudioOnlyHlsSettings = (input: AudioOnlyHlsSettings, context: __SerdeContext): any => { - return { - ...(input.AudioGroupId != null && { audioGroupId: input.AudioGroupId }), - ...(input.AudioOnlyImage != null && { audioOnlyImage: se_InputLocation(input.AudioOnlyImage, context) }), - ...(input.AudioTrackType != null && { audioTrackType: input.AudioTrackType }), - ...(input.SegmentType != null && { segmentType: input.SegmentType }), - }; + return take(input, { + audioGroupId: [, , `AudioGroupId`], + audioOnlyImage: [, (_) => se_InputLocation(_, context), `AudioOnlyImage`], + audioTrackType: [, , `AudioTrackType`], + segmentType: [, , `SegmentType`], + }); }; /** * serializeAws_restJson1AudioPidSelection */ const se_AudioPidSelection = (input: AudioPidSelection, context: __SerdeContext): any => { - return { - ...(input.Pid != null && { pid: input.Pid }), - }; + return take(input, { + pid: [, , `Pid`], + }); }; /** * serializeAws_restJson1AudioSelector */ const se_AudioSelector = (input: AudioSelector, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - ...(input.SelectorSettings != null && { - selectorSettings: se_AudioSelectorSettings(input.SelectorSettings, context), - }), - }; + return take(input, { + name: [, , `Name`], + selectorSettings: [, (_) => se_AudioSelectorSettings(_, context), `SelectorSettings`], + }); }; /** * serializeAws_restJson1AudioSelectorSettings */ const se_AudioSelectorSettings = (input: AudioSelectorSettings, context: __SerdeContext): any => { - return { - ...(input.AudioHlsRenditionSelection != null && { - audioHlsRenditionSelection: se_AudioHlsRenditionSelection(input.AudioHlsRenditionSelection, context), - }), - ...(input.AudioLanguageSelection != null && { - audioLanguageSelection: se_AudioLanguageSelection(input.AudioLanguageSelection, context), - }), - ...(input.AudioPidSelection != null && { - audioPidSelection: se_AudioPidSelection(input.AudioPidSelection, context), - }), - ...(input.AudioTrackSelection != null && { - audioTrackSelection: se_AudioTrackSelection(input.AudioTrackSelection, context), - }), - }; + return take(input, { + audioHlsRenditionSelection: [, (_) => se_AudioHlsRenditionSelection(_, context), `AudioHlsRenditionSelection`], + audioLanguageSelection: [, (_) => se_AudioLanguageSelection(_, context), `AudioLanguageSelection`], + audioPidSelection: [, (_) => se_AudioPidSelection(_, context), `AudioPidSelection`], + audioTrackSelection: [, (_) => se_AudioTrackSelection(_, context), `AudioTrackSelection`], + }); }; /** * serializeAws_restJson1AudioSilenceFailoverSettings */ const se_AudioSilenceFailoverSettings = (input: AudioSilenceFailoverSettings, context: __SerdeContext): any => { - return { - ...(input.AudioSelectorName != null && { audioSelectorName: input.AudioSelectorName }), - ...(input.AudioSilenceThresholdMsec != null && { audioSilenceThresholdMsec: input.AudioSilenceThresholdMsec }), - }; + return take(input, { + audioSelectorName: [, , `AudioSelectorName`], + audioSilenceThresholdMsec: [, , `AudioSilenceThresholdMsec`], + }); }; /** * serializeAws_restJson1AudioTrack */ const se_AudioTrack = (input: AudioTrack, context: __SerdeContext): any => { - return { - ...(input.Track != null && { track: input.Track }), - }; + return take(input, { + track: [, , `Track`], + }); }; /** * serializeAws_restJson1AudioTrackSelection */ const se_AudioTrackSelection = (input: AudioTrackSelection, context: __SerdeContext): any => { - return { - ...(input.DolbyEDecode != null && { dolbyEDecode: se_AudioDolbyEDecode(input.DolbyEDecode, context) }), - ...(input.Tracks != null && { tracks: se___listOfAudioTrack(input.Tracks, context) }), - }; + return take(input, { + dolbyEDecode: [, (_) => se_AudioDolbyEDecode(_, context), `DolbyEDecode`], + tracks: [, (_) => se___listOfAudioTrack(_, context), `Tracks`], + }); }; /** * serializeAws_restJson1AudioWatermarkSettings */ const se_AudioWatermarkSettings = (input: AudioWatermarkSettings, context: __SerdeContext): any => { - return { - ...(input.NielsenWatermarksSettings != null && { - nielsenWatermarksSettings: se_NielsenWatermarksSettings(input.NielsenWatermarksSettings, context), - }), - }; + return take(input, { + nielsenWatermarksSettings: [, (_) => se_NielsenWatermarksSettings(_, context), `NielsenWatermarksSettings`], + }); }; /** * serializeAws_restJson1AutomaticInputFailoverSettings */ const se_AutomaticInputFailoverSettings = (input: AutomaticInputFailoverSettings, context: __SerdeContext): any => { - return { - ...(input.ErrorClearTimeMsec != null && { errorClearTimeMsec: input.ErrorClearTimeMsec }), - ...(input.FailoverConditions != null && { - failoverConditions: se___listOfFailoverCondition(input.FailoverConditions, context), - }), - ...(input.InputPreference != null && { inputPreference: input.InputPreference }), - ...(input.SecondaryInputId != null && { secondaryInputId: input.SecondaryInputId }), - }; + return take(input, { + errorClearTimeMsec: [, , `ErrorClearTimeMsec`], + failoverConditions: [, (_) => se___listOfFailoverCondition(_, context), `FailoverConditions`], + inputPreference: [, , `InputPreference`], + secondaryInputId: [, , `SecondaryInputId`], + }); }; /** * serializeAws_restJson1AvailBlanking */ const se_AvailBlanking = (input: AvailBlanking, context: __SerdeContext): any => { - return { - ...(input.AvailBlankingImage != null && { - availBlankingImage: se_InputLocation(input.AvailBlankingImage, context), - }), - ...(input.State != null && { state: input.State }), - }; + return take(input, { + availBlankingImage: [, (_) => se_InputLocation(_, context), `AvailBlankingImage`], + state: [, , `State`], + }); }; /** * serializeAws_restJson1AvailConfiguration */ const se_AvailConfiguration = (input: AvailConfiguration, context: __SerdeContext): any => { - return { - ...(input.AvailSettings != null && { availSettings: se_AvailSettings(input.AvailSettings, context) }), - }; + return take(input, { + availSettings: [, (_) => se_AvailSettings(_, context), `AvailSettings`], + }); }; /** * serializeAws_restJson1AvailSettings */ const se_AvailSettings = (input: AvailSettings, context: __SerdeContext): any => { - return { - ...(input.Esam != null && { esam: se_Esam(input.Esam, context) }), - ...(input.Scte35SpliceInsert != null && { - scte35SpliceInsert: se_Scte35SpliceInsert(input.Scte35SpliceInsert, context), - }), - ...(input.Scte35TimeSignalApos != null && { - scte35TimeSignalApos: se_Scte35TimeSignalApos(input.Scte35TimeSignalApos, context), - }), - }; + return take(input, { + esam: [, (_) => se_Esam(_, context), `Esam`], + scte35SpliceInsert: [, (_) => se_Scte35SpliceInsert(_, context), `Scte35SpliceInsert`], + scte35TimeSignalApos: [, (_) => se_Scte35TimeSignalApos(_, context), `Scte35TimeSignalApos`], + }); }; /** * serializeAws_restJson1BatchScheduleActionCreateRequest */ const se_BatchScheduleActionCreateRequest = (input: BatchScheduleActionCreateRequest, context: __SerdeContext): any => { - return { - ...(input.ScheduleActions != null && { - scheduleActions: se___listOfScheduleAction(input.ScheduleActions, context), - }), - }; + return take(input, { + scheduleActions: [, (_) => se___listOfScheduleAction(_, context), `ScheduleActions`], + }); }; /** * serializeAws_restJson1BatchScheduleActionDeleteRequest */ const se_BatchScheduleActionDeleteRequest = (input: BatchScheduleActionDeleteRequest, context: __SerdeContext): any => { - return { - ...(input.ActionNames != null && { actionNames: se___listOf__string(input.ActionNames, context) }), - }; + return take(input, { + actionNames: [, _json, `ActionNames`], + }); }; /** * serializeAws_restJson1BlackoutSlate */ const se_BlackoutSlate = (input: BlackoutSlate, context: __SerdeContext): any => { - return { - ...(input.BlackoutSlateImage != null && { - blackoutSlateImage: se_InputLocation(input.BlackoutSlateImage, context), - }), - ...(input.NetworkEndBlackout != null && { networkEndBlackout: input.NetworkEndBlackout }), - ...(input.NetworkEndBlackoutImage != null && { - networkEndBlackoutImage: se_InputLocation(input.NetworkEndBlackoutImage, context), - }), - ...(input.NetworkId != null && { networkId: input.NetworkId }), - ...(input.State != null && { state: input.State }), - }; + return take(input, { + blackoutSlateImage: [, (_) => se_InputLocation(_, context), `BlackoutSlateImage`], + networkEndBlackout: [, , `NetworkEndBlackout`], + networkEndBlackoutImage: [, (_) => se_InputLocation(_, context), `NetworkEndBlackoutImage`], + networkId: [, , `NetworkId`], + state: [, , `State`], + }); }; /** * serializeAws_restJson1BurnInDestinationSettings */ const se_BurnInDestinationSettings = (input: BurnInDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Alignment != null && { alignment: input.Alignment }), - ...(input.BackgroundColor != null && { backgroundColor: input.BackgroundColor }), - ...(input.BackgroundOpacity != null && { backgroundOpacity: input.BackgroundOpacity }), - ...(input.Font != null && { font: se_InputLocation(input.Font, context) }), - ...(input.FontColor != null && { fontColor: input.FontColor }), - ...(input.FontOpacity != null && { fontOpacity: input.FontOpacity }), - ...(input.FontResolution != null && { fontResolution: input.FontResolution }), - ...(input.FontSize != null && { fontSize: input.FontSize }), - ...(input.OutlineColor != null && { outlineColor: input.OutlineColor }), - ...(input.OutlineSize != null && { outlineSize: input.OutlineSize }), - ...(input.ShadowColor != null && { shadowColor: input.ShadowColor }), - ...(input.ShadowOpacity != null && { shadowOpacity: input.ShadowOpacity }), - ...(input.ShadowXOffset != null && { shadowXOffset: input.ShadowXOffset }), - ...(input.ShadowYOffset != null && { shadowYOffset: input.ShadowYOffset }), - ...(input.TeletextGridControl != null && { teletextGridControl: input.TeletextGridControl }), - ...(input.XPosition != null && { xPosition: input.XPosition }), - ...(input.YPosition != null && { yPosition: input.YPosition }), - }; + return take(input, { + alignment: [, , `Alignment`], + backgroundColor: [, , `BackgroundColor`], + backgroundOpacity: [, , `BackgroundOpacity`], + font: [, (_) => se_InputLocation(_, context), `Font`], + fontColor: [, , `FontColor`], + fontOpacity: [, , `FontOpacity`], + fontResolution: [, , `FontResolution`], + fontSize: [, , `FontSize`], + outlineColor: [, , `OutlineColor`], + outlineSize: [, , `OutlineSize`], + shadowColor: [, , `ShadowColor`], + shadowOpacity: [, , `ShadowOpacity`], + shadowXOffset: [, , `ShadowXOffset`], + shadowYOffset: [, , `ShadowYOffset`], + teletextGridControl: [, , `TeletextGridControl`], + xPosition: [, , `XPosition`], + yPosition: [, , `YPosition`], + }); }; /** * serializeAws_restJson1CaptionDescription */ const se_CaptionDescription = (input: CaptionDescription, context: __SerdeContext): any => { - return { - ...(input.Accessibility != null && { accessibility: input.Accessibility }), - ...(input.CaptionSelectorName != null && { captionSelectorName: input.CaptionSelectorName }), - ...(input.DestinationSettings != null && { - destinationSettings: se_CaptionDestinationSettings(input.DestinationSettings, context), - }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageDescription != null && { languageDescription: input.LanguageDescription }), - ...(input.Name != null && { name: input.Name }), - }; + return take(input, { + accessibility: [, , `Accessibility`], + captionSelectorName: [, , `CaptionSelectorName`], + destinationSettings: [, (_) => se_CaptionDestinationSettings(_, context), `DestinationSettings`], + languageCode: [, , `LanguageCode`], + languageDescription: [, , `LanguageDescription`], + name: [, , `Name`], + }); }; /** * serializeAws_restJson1CaptionDestinationSettings */ const se_CaptionDestinationSettings = (input: CaptionDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.AribDestinationSettings != null && { - aribDestinationSettings: se_AribDestinationSettings(input.AribDestinationSettings, context), - }), - ...(input.BurnInDestinationSettings != null && { - burnInDestinationSettings: se_BurnInDestinationSettings(input.BurnInDestinationSettings, context), - }), - ...(input.DvbSubDestinationSettings != null && { - dvbSubDestinationSettings: se_DvbSubDestinationSettings(input.DvbSubDestinationSettings, context), - }), - ...(input.EbuTtDDestinationSettings != null && { - ebuTtDDestinationSettings: se_EbuTtDDestinationSettings(input.EbuTtDDestinationSettings, context), - }), - ...(input.EmbeddedDestinationSettings != null && { - embeddedDestinationSettings: se_EmbeddedDestinationSettings(input.EmbeddedDestinationSettings, context), - }), - ...(input.EmbeddedPlusScte20DestinationSettings != null && { - embeddedPlusScte20DestinationSettings: se_EmbeddedPlusScte20DestinationSettings( - input.EmbeddedPlusScte20DestinationSettings, - context - ), - }), - ...(input.RtmpCaptionInfoDestinationSettings != null && { - rtmpCaptionInfoDestinationSettings: se_RtmpCaptionInfoDestinationSettings( - input.RtmpCaptionInfoDestinationSettings, - context - ), - }), - ...(input.Scte20PlusEmbeddedDestinationSettings != null && { - scte20PlusEmbeddedDestinationSettings: se_Scte20PlusEmbeddedDestinationSettings( - input.Scte20PlusEmbeddedDestinationSettings, - context - ), - }), - ...(input.Scte27DestinationSettings != null && { - scte27DestinationSettings: se_Scte27DestinationSettings(input.Scte27DestinationSettings, context), - }), - ...(input.SmpteTtDestinationSettings != null && { - smpteTtDestinationSettings: se_SmpteTtDestinationSettings(input.SmpteTtDestinationSettings, context), - }), - ...(input.TeletextDestinationSettings != null && { - teletextDestinationSettings: se_TeletextDestinationSettings(input.TeletextDestinationSettings, context), - }), - ...(input.TtmlDestinationSettings != null && { - ttmlDestinationSettings: se_TtmlDestinationSettings(input.TtmlDestinationSettings, context), - }), - ...(input.WebvttDestinationSettings != null && { - webvttDestinationSettings: se_WebvttDestinationSettings(input.WebvttDestinationSettings, context), - }), - }; + return take(input, { + aribDestinationSettings: [, _json, `AribDestinationSettings`], + burnInDestinationSettings: [, (_) => se_BurnInDestinationSettings(_, context), `BurnInDestinationSettings`], + dvbSubDestinationSettings: [, (_) => se_DvbSubDestinationSettings(_, context), `DvbSubDestinationSettings`], + ebuTtDDestinationSettings: [, (_) => se_EbuTtDDestinationSettings(_, context), `EbuTtDDestinationSettings`], + embeddedDestinationSettings: [, _json, `EmbeddedDestinationSettings`], + embeddedPlusScte20DestinationSettings: [, _json, `EmbeddedPlusScte20DestinationSettings`], + rtmpCaptionInfoDestinationSettings: [, _json, `RtmpCaptionInfoDestinationSettings`], + scte20PlusEmbeddedDestinationSettings: [, _json, `Scte20PlusEmbeddedDestinationSettings`], + scte27DestinationSettings: [, _json, `Scte27DestinationSettings`], + smpteTtDestinationSettings: [, _json, `SmpteTtDestinationSettings`], + teletextDestinationSettings: [, _json, `TeletextDestinationSettings`], + ttmlDestinationSettings: [, (_) => se_TtmlDestinationSettings(_, context), `TtmlDestinationSettings`], + webvttDestinationSettings: [, (_) => se_WebvttDestinationSettings(_, context), `WebvttDestinationSettings`], + }); }; /** * serializeAws_restJson1CaptionLanguageMapping */ const se_CaptionLanguageMapping = (input: CaptionLanguageMapping, context: __SerdeContext): any => { - return { - ...(input.CaptionChannel != null && { captionChannel: input.CaptionChannel }), - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.LanguageDescription != null && { languageDescription: input.LanguageDescription }), - }; + return take(input, { + captionChannel: [, , `CaptionChannel`], + languageCode: [, , `LanguageCode`], + languageDescription: [, , `LanguageDescription`], + }); }; /** * serializeAws_restJson1CaptionRectangle */ const se_CaptionRectangle = (input: CaptionRectangle, context: __SerdeContext): any => { - return { - ...(input.Height != null && { height: __serializeFloat(input.Height) }), - ...(input.LeftOffset != null && { leftOffset: __serializeFloat(input.LeftOffset) }), - ...(input.TopOffset != null && { topOffset: __serializeFloat(input.TopOffset) }), - ...(input.Width != null && { width: __serializeFloat(input.Width) }), - }; + return take(input, { + height: [, __serializeFloat, `Height`], + leftOffset: [, __serializeFloat, `LeftOffset`], + topOffset: [, __serializeFloat, `TopOffset`], + width: [, __serializeFloat, `Width`], + }); }; /** * serializeAws_restJson1CaptionSelector */ const se_CaptionSelector = (input: CaptionSelector, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { languageCode: input.LanguageCode }), - ...(input.Name != null && { name: input.Name }), - ...(input.SelectorSettings != null && { - selectorSettings: se_CaptionSelectorSettings(input.SelectorSettings, context), - }), - }; + return take(input, { + languageCode: [, , `LanguageCode`], + name: [, , `Name`], + selectorSettings: [, (_) => se_CaptionSelectorSettings(_, context), `SelectorSettings`], + }); }; /** * serializeAws_restJson1CaptionSelectorSettings */ const se_CaptionSelectorSettings = (input: CaptionSelectorSettings, context: __SerdeContext): any => { - return { - ...(input.AncillarySourceSettings != null && { - ancillarySourceSettings: se_AncillarySourceSettings(input.AncillarySourceSettings, context), - }), - ...(input.AribSourceSettings != null && { - aribSourceSettings: se_AribSourceSettings(input.AribSourceSettings, context), - }), - ...(input.DvbSubSourceSettings != null && { - dvbSubSourceSettings: se_DvbSubSourceSettings(input.DvbSubSourceSettings, context), - }), - ...(input.EmbeddedSourceSettings != null && { - embeddedSourceSettings: se_EmbeddedSourceSettings(input.EmbeddedSourceSettings, context), - }), - ...(input.Scte20SourceSettings != null && { - scte20SourceSettings: se_Scte20SourceSettings(input.Scte20SourceSettings, context), - }), - ...(input.Scte27SourceSettings != null && { - scte27SourceSettings: se_Scte27SourceSettings(input.Scte27SourceSettings, context), - }), - ...(input.TeletextSourceSettings != null && { - teletextSourceSettings: se_TeletextSourceSettings(input.TeletextSourceSettings, context), - }), - }; + return take(input, { + ancillarySourceSettings: [, (_) => se_AncillarySourceSettings(_, context), `AncillarySourceSettings`], + aribSourceSettings: [, _json, `AribSourceSettings`], + dvbSubSourceSettings: [, (_) => se_DvbSubSourceSettings(_, context), `DvbSubSourceSettings`], + embeddedSourceSettings: [, (_) => se_EmbeddedSourceSettings(_, context), `EmbeddedSourceSettings`], + scte20SourceSettings: [, (_) => se_Scte20SourceSettings(_, context), `Scte20SourceSettings`], + scte27SourceSettings: [, (_) => se_Scte27SourceSettings(_, context), `Scte27SourceSettings`], + teletextSourceSettings: [, (_) => se_TeletextSourceSettings(_, context), `TeletextSourceSettings`], + }); }; /** * serializeAws_restJson1CdiInputSpecification */ const se_CdiInputSpecification = (input: CdiInputSpecification, context: __SerdeContext): any => { - return { - ...(input.Resolution != null && { resolution: input.Resolution }), - }; + return take(input, { + resolution: [, , `Resolution`], + }); }; -/** - * serializeAws_restJson1ColorSpacePassthroughSettings - */ -const se_ColorSpacePassthroughSettings = (input: ColorSpacePassthroughSettings, context: __SerdeContext): any => { - return {}; -}; +// se_ColorSpacePassthroughSettings omitted. -/** - * serializeAws_restJson1DolbyVision81Settings - */ -const se_DolbyVision81Settings = (input: DolbyVision81Settings, context: __SerdeContext): any => { - return {}; -}; +// se_DolbyVision81Settings omitted. /** * serializeAws_restJson1DvbNitSettings */ const se_DvbNitSettings = (input: DvbNitSettings, context: __SerdeContext): any => { - return { - ...(input.NetworkId != null && { networkId: input.NetworkId }), - ...(input.NetworkName != null && { networkName: input.NetworkName }), - ...(input.RepInterval != null && { repInterval: input.RepInterval }), - }; + return take(input, { + networkId: [, , `NetworkId`], + networkName: [, , `NetworkName`], + repInterval: [, , `RepInterval`], + }); }; /** * serializeAws_restJson1DvbSdtSettings */ const se_DvbSdtSettings = (input: DvbSdtSettings, context: __SerdeContext): any => { - return { - ...(input.OutputSdt != null && { outputSdt: input.OutputSdt }), - ...(input.RepInterval != null && { repInterval: input.RepInterval }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - ...(input.ServiceProviderName != null && { serviceProviderName: input.ServiceProviderName }), - }; + return take(input, { + outputSdt: [, , `OutputSdt`], + repInterval: [, , `RepInterval`], + serviceName: [, , `ServiceName`], + serviceProviderName: [, , `ServiceProviderName`], + }); }; /** * serializeAws_restJson1DvbSubDestinationSettings */ const se_DvbSubDestinationSettings = (input: DvbSubDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.Alignment != null && { alignment: input.Alignment }), - ...(input.BackgroundColor != null && { backgroundColor: input.BackgroundColor }), - ...(input.BackgroundOpacity != null && { backgroundOpacity: input.BackgroundOpacity }), - ...(input.Font != null && { font: se_InputLocation(input.Font, context) }), - ...(input.FontColor != null && { fontColor: input.FontColor }), - ...(input.FontOpacity != null && { fontOpacity: input.FontOpacity }), - ...(input.FontResolution != null && { fontResolution: input.FontResolution }), - ...(input.FontSize != null && { fontSize: input.FontSize }), - ...(input.OutlineColor != null && { outlineColor: input.OutlineColor }), - ...(input.OutlineSize != null && { outlineSize: input.OutlineSize }), - ...(input.ShadowColor != null && { shadowColor: input.ShadowColor }), - ...(input.ShadowOpacity != null && { shadowOpacity: input.ShadowOpacity }), - ...(input.ShadowXOffset != null && { shadowXOffset: input.ShadowXOffset }), - ...(input.ShadowYOffset != null && { shadowYOffset: input.ShadowYOffset }), - ...(input.TeletextGridControl != null && { teletextGridControl: input.TeletextGridControl }), - ...(input.XPosition != null && { xPosition: input.XPosition }), - ...(input.YPosition != null && { yPosition: input.YPosition }), - }; + return take(input, { + alignment: [, , `Alignment`], + backgroundColor: [, , `BackgroundColor`], + backgroundOpacity: [, , `BackgroundOpacity`], + font: [, (_) => se_InputLocation(_, context), `Font`], + fontColor: [, , `FontColor`], + fontOpacity: [, , `FontOpacity`], + fontResolution: [, , `FontResolution`], + fontSize: [, , `FontSize`], + outlineColor: [, , `OutlineColor`], + outlineSize: [, , `OutlineSize`], + shadowColor: [, , `ShadowColor`], + shadowOpacity: [, , `ShadowOpacity`], + shadowXOffset: [, , `ShadowXOffset`], + shadowYOffset: [, , `ShadowYOffset`], + teletextGridControl: [, , `TeletextGridControl`], + xPosition: [, , `XPosition`], + yPosition: [, , `YPosition`], + }); }; /** * serializeAws_restJson1DvbSubSourceSettings */ const se_DvbSubSourceSettings = (input: DvbSubSourceSettings, context: __SerdeContext): any => { - return { - ...(input.OcrLanguage != null && { ocrLanguage: input.OcrLanguage }), - ...(input.Pid != null && { pid: input.Pid }), - }; + return take(input, { + ocrLanguage: [, , `OcrLanguage`], + pid: [, , `Pid`], + }); }; /** * serializeAws_restJson1DvbTdtSettings */ const se_DvbTdtSettings = (input: DvbTdtSettings, context: __SerdeContext): any => { - return { - ...(input.RepInterval != null && { repInterval: input.RepInterval }), - }; + return take(input, { + repInterval: [, , `RepInterval`], + }); }; /** * serializeAws_restJson1Eac3AtmosSettings */ const se_Eac3AtmosSettings = (input: Eac3AtmosSettings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: __serializeFloat(input.Bitrate) }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.Dialnorm != null && { dialnorm: input.Dialnorm }), - ...(input.DrcLine != null && { drcLine: input.DrcLine }), - ...(input.DrcRf != null && { drcRf: input.DrcRf }), - ...(input.HeightTrim != null && { heightTrim: __serializeFloat(input.HeightTrim) }), - ...(input.SurroundTrim != null && { surroundTrim: __serializeFloat(input.SurroundTrim) }), - }; + return take(input, { + bitrate: [, __serializeFloat, `Bitrate`], + codingMode: [, , `CodingMode`], + dialnorm: [, , `Dialnorm`], + drcLine: [, , `DrcLine`], + drcRf: [, , `DrcRf`], + heightTrim: [, __serializeFloat, `HeightTrim`], + surroundTrim: [, __serializeFloat, `SurroundTrim`], + }); }; /** * serializeAws_restJson1Eac3Settings */ const se_Eac3Settings = (input: Eac3Settings, context: __SerdeContext): any => { - return { - ...(input.AttenuationControl != null && { attenuationControl: input.AttenuationControl }), - ...(input.Bitrate != null && { bitrate: __serializeFloat(input.Bitrate) }), - ...(input.BitstreamMode != null && { bitstreamMode: input.BitstreamMode }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.DcFilter != null && { dcFilter: input.DcFilter }), - ...(input.Dialnorm != null && { dialnorm: input.Dialnorm }), - ...(input.DrcLine != null && { drcLine: input.DrcLine }), - ...(input.DrcRf != null && { drcRf: input.DrcRf }), - ...(input.LfeControl != null && { lfeControl: input.LfeControl }), - ...(input.LfeFilter != null && { lfeFilter: input.LfeFilter }), - ...(input.LoRoCenterMixLevel != null && { loRoCenterMixLevel: __serializeFloat(input.LoRoCenterMixLevel) }), - ...(input.LoRoSurroundMixLevel != null && { loRoSurroundMixLevel: __serializeFloat(input.LoRoSurroundMixLevel) }), - ...(input.LtRtCenterMixLevel != null && { ltRtCenterMixLevel: __serializeFloat(input.LtRtCenterMixLevel) }), - ...(input.LtRtSurroundMixLevel != null && { ltRtSurroundMixLevel: __serializeFloat(input.LtRtSurroundMixLevel) }), - ...(input.MetadataControl != null && { metadataControl: input.MetadataControl }), - ...(input.PassthroughControl != null && { passthroughControl: input.PassthroughControl }), - ...(input.PhaseControl != null && { phaseControl: input.PhaseControl }), - ...(input.StereoDownmix != null && { stereoDownmix: input.StereoDownmix }), - ...(input.SurroundExMode != null && { surroundExMode: input.SurroundExMode }), - ...(input.SurroundMode != null && { surroundMode: input.SurroundMode }), - }; + return take(input, { + attenuationControl: [, , `AttenuationControl`], + bitrate: [, __serializeFloat, `Bitrate`], + bitstreamMode: [, , `BitstreamMode`], + codingMode: [, , `CodingMode`], + dcFilter: [, , `DcFilter`], + dialnorm: [, , `Dialnorm`], + drcLine: [, , `DrcLine`], + drcRf: [, , `DrcRf`], + lfeControl: [, , `LfeControl`], + lfeFilter: [, , `LfeFilter`], + loRoCenterMixLevel: [, __serializeFloat, `LoRoCenterMixLevel`], + loRoSurroundMixLevel: [, __serializeFloat, `LoRoSurroundMixLevel`], + ltRtCenterMixLevel: [, __serializeFloat, `LtRtCenterMixLevel`], + ltRtSurroundMixLevel: [, __serializeFloat, `LtRtSurroundMixLevel`], + metadataControl: [, , `MetadataControl`], + passthroughControl: [, , `PassthroughControl`], + phaseControl: [, , `PhaseControl`], + stereoDownmix: [, , `StereoDownmix`], + surroundExMode: [, , `SurroundExMode`], + surroundMode: [, , `SurroundMode`], + }); }; /** * serializeAws_restJson1EbuTtDDestinationSettings */ const se_EbuTtDDestinationSettings = (input: EbuTtDDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.CopyrightHolder != null && { copyrightHolder: input.CopyrightHolder }), - ...(input.FillLineGap != null && { fillLineGap: input.FillLineGap }), - ...(input.FontFamily != null && { fontFamily: input.FontFamily }), - ...(input.StyleControl != null && { styleControl: input.StyleControl }), - }; + return take(input, { + copyrightHolder: [, , `CopyrightHolder`], + fillLineGap: [, , `FillLineGap`], + fontFamily: [, , `FontFamily`], + styleControl: [, , `StyleControl`], + }); }; -/** - * serializeAws_restJson1EmbeddedDestinationSettings - */ -const se_EmbeddedDestinationSettings = (input: EmbeddedDestinationSettings, context: __SerdeContext): any => { - return {}; -}; +// se_EmbeddedDestinationSettings omitted. -/** - * serializeAws_restJson1EmbeddedPlusScte20DestinationSettings - */ -const se_EmbeddedPlusScte20DestinationSettings = ( - input: EmbeddedPlusScte20DestinationSettings, - context: __SerdeContext -): any => { - return {}; -}; +// se_EmbeddedPlusScte20DestinationSettings omitted. /** * serializeAws_restJson1EmbeddedSourceSettings */ const se_EmbeddedSourceSettings = (input: EmbeddedSourceSettings, context: __SerdeContext): any => { - return { - ...(input.Convert608To708 != null && { convert608To708: input.Convert608To708 }), - ...(input.Scte20Detection != null && { scte20Detection: input.Scte20Detection }), - ...(input.Source608ChannelNumber != null && { source608ChannelNumber: input.Source608ChannelNumber }), - ...(input.Source608TrackNumber != null && { source608TrackNumber: input.Source608TrackNumber }), - }; + return take(input, { + convert608To708: [, , `Convert608To708`], + scte20Detection: [, , `Scte20Detection`], + source608ChannelNumber: [, , `Source608ChannelNumber`], + source608TrackNumber: [, , `Source608TrackNumber`], + }); }; /** * serializeAws_restJson1EncoderSettings */ const se_EncoderSettings = (input: EncoderSettings, context: __SerdeContext): any => { - return { - ...(input.AudioDescriptions != null && { - audioDescriptions: se___listOfAudioDescription(input.AudioDescriptions, context), - }), - ...(input.AvailBlanking != null && { availBlanking: se_AvailBlanking(input.AvailBlanking, context) }), - ...(input.AvailConfiguration != null && { - availConfiguration: se_AvailConfiguration(input.AvailConfiguration, context), - }), - ...(input.BlackoutSlate != null && { blackoutSlate: se_BlackoutSlate(input.BlackoutSlate, context) }), - ...(input.CaptionDescriptions != null && { - captionDescriptions: se___listOfCaptionDescription(input.CaptionDescriptions, context), - }), - ...(input.FeatureActivations != null && { - featureActivations: se_FeatureActivations(input.FeatureActivations, context), - }), - ...(input.GlobalConfiguration != null && { - globalConfiguration: se_GlobalConfiguration(input.GlobalConfiguration, context), - }), - ...(input.MotionGraphicsConfiguration != null && { - motionGraphicsConfiguration: se_MotionGraphicsConfiguration(input.MotionGraphicsConfiguration, context), - }), - ...(input.NielsenConfiguration != null && { - nielsenConfiguration: se_NielsenConfiguration(input.NielsenConfiguration, context), - }), - ...(input.OutputGroups != null && { outputGroups: se___listOfOutputGroup(input.OutputGroups, context) }), - ...(input.TimecodeConfig != null && { timecodeConfig: se_TimecodeConfig(input.TimecodeConfig, context) }), - ...(input.VideoDescriptions != null && { - videoDescriptions: se___listOfVideoDescription(input.VideoDescriptions, context), - }), - }; + return take(input, { + audioDescriptions: [, (_) => se___listOfAudioDescription(_, context), `AudioDescriptions`], + availBlanking: [, (_) => se_AvailBlanking(_, context), `AvailBlanking`], + availConfiguration: [, (_) => se_AvailConfiguration(_, context), `AvailConfiguration`], + blackoutSlate: [, (_) => se_BlackoutSlate(_, context), `BlackoutSlate`], + captionDescriptions: [, (_) => se___listOfCaptionDescription(_, context), `CaptionDescriptions`], + featureActivations: [, (_) => se_FeatureActivations(_, context), `FeatureActivations`], + globalConfiguration: [, (_) => se_GlobalConfiguration(_, context), `GlobalConfiguration`], + motionGraphicsConfiguration: [, (_) => se_MotionGraphicsConfiguration(_, context), `MotionGraphicsConfiguration`], + nielsenConfiguration: [, (_) => se_NielsenConfiguration(_, context), `NielsenConfiguration`], + outputGroups: [, (_) => se___listOfOutputGroup(_, context), `OutputGroups`], + timecodeConfig: [, (_) => se_TimecodeConfig(_, context), `TimecodeConfig`], + videoDescriptions: [, (_) => se___listOfVideoDescription(_, context), `VideoDescriptions`], + }); }; /** * serializeAws_restJson1Esam */ const se_Esam = (input: Esam, context: __SerdeContext): any => { - return { - ...(input.AcquisitionPointId != null && { acquisitionPointId: input.AcquisitionPointId }), - ...(input.AdAvailOffset != null && { adAvailOffset: input.AdAvailOffset }), - ...(input.PasswordParam != null && { passwordParam: input.PasswordParam }), - ...(input.PoisEndpoint != null && { poisEndpoint: input.PoisEndpoint }), - ...(input.Username != null && { username: input.Username }), - ...(input.ZoneIdentity != null && { zoneIdentity: input.ZoneIdentity }), - }; + return take(input, { + acquisitionPointId: [, , `AcquisitionPointId`], + adAvailOffset: [, , `AdAvailOffset`], + passwordParam: [, , `PasswordParam`], + poisEndpoint: [, , `PoisEndpoint`], + username: [, , `Username`], + zoneIdentity: [, , `ZoneIdentity`], + }); }; /** * serializeAws_restJson1FailoverCondition */ const se_FailoverCondition = (input: FailoverCondition, context: __SerdeContext): any => { - return { - ...(input.FailoverConditionSettings != null && { - failoverConditionSettings: se_FailoverConditionSettings(input.FailoverConditionSettings, context), - }), - }; + return take(input, { + failoverConditionSettings: [, (_) => se_FailoverConditionSettings(_, context), `FailoverConditionSettings`], + }); }; /** * serializeAws_restJson1FailoverConditionSettings */ const se_FailoverConditionSettings = (input: FailoverConditionSettings, context: __SerdeContext): any => { - return { - ...(input.AudioSilenceSettings != null && { - audioSilenceSettings: se_AudioSilenceFailoverSettings(input.AudioSilenceSettings, context), - }), - ...(input.InputLossSettings != null && { - inputLossSettings: se_InputLossFailoverSettings(input.InputLossSettings, context), - }), - ...(input.VideoBlackSettings != null && { - videoBlackSettings: se_VideoBlackFailoverSettings(input.VideoBlackSettings, context), - }), - }; + return take(input, { + audioSilenceSettings: [, (_) => se_AudioSilenceFailoverSettings(_, context), `AudioSilenceSettings`], + inputLossSettings: [, (_) => se_InputLossFailoverSettings(_, context), `InputLossSettings`], + videoBlackSettings: [, (_) => se_VideoBlackFailoverSettings(_, context), `VideoBlackSettings`], + }); }; /** * serializeAws_restJson1FeatureActivations */ const se_FeatureActivations = (input: FeatureActivations, context: __SerdeContext): any => { - return { - ...(input.InputPrepareScheduleActions != null && { - inputPrepareScheduleActions: input.InputPrepareScheduleActions, - }), - }; + return take(input, { + inputPrepareScheduleActions: [, , `InputPrepareScheduleActions`], + }); }; /** * serializeAws_restJson1FecOutputSettings */ const se_FecOutputSettings = (input: FecOutputSettings, context: __SerdeContext): any => { - return { - ...(input.ColumnDepth != null && { columnDepth: input.ColumnDepth }), - ...(input.IncludeFec != null && { includeFec: input.IncludeFec }), - ...(input.RowLength != null && { rowLength: input.RowLength }), - }; + return take(input, { + columnDepth: [, , `ColumnDepth`], + includeFec: [, , `IncludeFec`], + rowLength: [, , `RowLength`], + }); }; /** @@ -7999,20 +7382,20 @@ const se_FixedModeScheduleActionStartSettings = ( input: FixedModeScheduleActionStartSettings, context: __SerdeContext ): any => { - return { - ...(input.Time != null && { time: input.Time }), - }; + return take(input, { + time: [, , `Time`], + }); }; /** * serializeAws_restJson1Fmp4HlsSettings */ const se_Fmp4HlsSettings = (input: Fmp4HlsSettings, context: __SerdeContext): any => { - return { - ...(input.AudioRenditionSets != null && { audioRenditionSets: input.AudioRenditionSets }), - ...(input.NielsenId3Behavior != null && { nielsenId3Behavior: input.NielsenId3Behavior }), - ...(input.TimedMetadataBehavior != null && { timedMetadataBehavior: input.TimedMetadataBehavior }), - }; + return take(input, { + audioRenditionSets: [, , `AudioRenditionSets`], + nielsenId3Behavior: [, , `NielsenId3Behavior`], + timedMetadataBehavior: [, , `TimedMetadataBehavior`], + }); }; /** @@ -8022,350 +7405,305 @@ const se_FollowModeScheduleActionStartSettings = ( input: FollowModeScheduleActionStartSettings, context: __SerdeContext ): any => { - return { - ...(input.FollowPoint != null && { followPoint: input.FollowPoint }), - ...(input.ReferenceActionName != null && { referenceActionName: input.ReferenceActionName }), - }; + return take(input, { + followPoint: [, , `FollowPoint`], + referenceActionName: [, , `ReferenceActionName`], + }); }; /** * serializeAws_restJson1FrameCaptureCdnSettings */ const se_FrameCaptureCdnSettings = (input: FrameCaptureCdnSettings, context: __SerdeContext): any => { - return { - ...(input.FrameCaptureS3Settings != null && { - frameCaptureS3Settings: se_FrameCaptureS3Settings(input.FrameCaptureS3Settings, context), - }), - }; + return take(input, { + frameCaptureS3Settings: [, (_) => se_FrameCaptureS3Settings(_, context), `FrameCaptureS3Settings`], + }); }; /** * serializeAws_restJson1FrameCaptureGroupSettings */ const se_FrameCaptureGroupSettings = (input: FrameCaptureGroupSettings, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - ...(input.FrameCaptureCdnSettings != null && { - frameCaptureCdnSettings: se_FrameCaptureCdnSettings(input.FrameCaptureCdnSettings, context), - }), - }; + return take(input, { + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + frameCaptureCdnSettings: [, (_) => se_FrameCaptureCdnSettings(_, context), `FrameCaptureCdnSettings`], + }); }; -/** - * serializeAws_restJson1FrameCaptureHlsSettings - */ -const se_FrameCaptureHlsSettings = (input: FrameCaptureHlsSettings, context: __SerdeContext): any => { - return {}; -}; +// se_FrameCaptureHlsSettings omitted. /** * serializeAws_restJson1FrameCaptureOutputSettings */ const se_FrameCaptureOutputSettings = (input: FrameCaptureOutputSettings, context: __SerdeContext): any => { - return { - ...(input.NameModifier != null && { nameModifier: input.NameModifier }), - }; + return take(input, { + nameModifier: [, , `NameModifier`], + }); }; /** * serializeAws_restJson1FrameCaptureS3Settings */ const se_FrameCaptureS3Settings = (input: FrameCaptureS3Settings, context: __SerdeContext): any => { - return { - ...(input.CannedAcl != null && { cannedAcl: input.CannedAcl }), - }; + return take(input, { + cannedAcl: [, , `CannedAcl`], + }); }; /** * serializeAws_restJson1FrameCaptureSettings */ const se_FrameCaptureSettings = (input: FrameCaptureSettings, context: __SerdeContext): any => { - return { - ...(input.CaptureInterval != null && { captureInterval: input.CaptureInterval }), - ...(input.CaptureIntervalUnits != null && { captureIntervalUnits: input.CaptureIntervalUnits }), - ...(input.TimecodeBurninSettings != null && { - timecodeBurninSettings: se_TimecodeBurninSettings(input.TimecodeBurninSettings, context), - }), - }; + return take(input, { + captureInterval: [, , `CaptureInterval`], + captureIntervalUnits: [, , `CaptureIntervalUnits`], + timecodeBurninSettings: [, (_) => se_TimecodeBurninSettings(_, context), `TimecodeBurninSettings`], + }); }; /** * serializeAws_restJson1GlobalConfiguration */ const se_GlobalConfiguration = (input: GlobalConfiguration, context: __SerdeContext): any => { - return { - ...(input.InitialAudioGain != null && { initialAudioGain: input.InitialAudioGain }), - ...(input.InputEndAction != null && { inputEndAction: input.InputEndAction }), - ...(input.InputLossBehavior != null && { - inputLossBehavior: se_InputLossBehavior(input.InputLossBehavior, context), - }), - ...(input.OutputLockingMode != null && { outputLockingMode: input.OutputLockingMode }), - ...(input.OutputTimingSource != null && { outputTimingSource: input.OutputTimingSource }), - ...(input.SupportLowFramerateInputs != null && { supportLowFramerateInputs: input.SupportLowFramerateInputs }), - }; + return take(input, { + initialAudioGain: [, , `InitialAudioGain`], + inputEndAction: [, , `InputEndAction`], + inputLossBehavior: [, (_) => se_InputLossBehavior(_, context), `InputLossBehavior`], + outputLockingMode: [, , `OutputLockingMode`], + outputTimingSource: [, , `OutputTimingSource`], + supportLowFramerateInputs: [, , `SupportLowFramerateInputs`], + }); }; /** * serializeAws_restJson1H264ColorSpaceSettings */ const se_H264ColorSpaceSettings = (input: H264ColorSpaceSettings, context: __SerdeContext): any => { - return { - ...(input.ColorSpacePassthroughSettings != null && { - colorSpacePassthroughSettings: se_ColorSpacePassthroughSettings(input.ColorSpacePassthroughSettings, context), - }), - ...(input.Rec601Settings != null && { rec601Settings: se_Rec601Settings(input.Rec601Settings, context) }), - ...(input.Rec709Settings != null && { rec709Settings: se_Rec709Settings(input.Rec709Settings, context) }), - }; + return take(input, { + colorSpacePassthroughSettings: [, _json, `ColorSpacePassthroughSettings`], + rec601Settings: [, _json, `Rec601Settings`], + rec709Settings: [, _json, `Rec709Settings`], + }); }; /** * serializeAws_restJson1H264FilterSettings */ const se_H264FilterSettings = (input: H264FilterSettings, context: __SerdeContext): any => { - return { - ...(input.TemporalFilterSettings != null && { - temporalFilterSettings: se_TemporalFilterSettings(input.TemporalFilterSettings, context), - }), - }; + return take(input, { + temporalFilterSettings: [, (_) => se_TemporalFilterSettings(_, context), `TemporalFilterSettings`], + }); }; /** * serializeAws_restJson1H264Settings */ const se_H264Settings = (input: H264Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.AfdSignaling != null && { afdSignaling: input.AfdSignaling }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BufFillPct != null && { bufFillPct: input.BufFillPct }), - ...(input.BufSize != null && { bufSize: input.BufSize }), - ...(input.ColorMetadata != null && { colorMetadata: input.ColorMetadata }), - ...(input.ColorSpaceSettings != null && { - colorSpaceSettings: se_H264ColorSpaceSettings(input.ColorSpaceSettings, context), - }), - ...(input.EntropyEncoding != null && { entropyEncoding: input.EntropyEncoding }), - ...(input.FilterSettings != null && { filterSettings: se_H264FilterSettings(input.FilterSettings, context) }), - ...(input.FixedAfd != null && { fixedAfd: input.FixedAfd }), - ...(input.FlickerAq != null && { flickerAq: input.FlickerAq }), - ...(input.ForceFieldPictures != null && { forceFieldPictures: input.ForceFieldPictures }), - ...(input.FramerateControl != null && { framerateControl: input.FramerateControl }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopBReference != null && { gopBReference: input.GopBReference }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.GopNumBFrames != null && { gopNumBFrames: input.GopNumBFrames }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.GopSizeUnits != null && { gopSizeUnits: input.GopSizeUnits }), - ...(input.Level != null && { level: input.Level }), - ...(input.LookAheadRateControl != null && { lookAheadRateControl: input.LookAheadRateControl }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MinIInterval != null && { minIInterval: input.MinIInterval }), - ...(input.NumRefFrames != null && { numRefFrames: input.NumRefFrames }), - ...(input.ParControl != null && { parControl: input.ParControl }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.QualityLevel != null && { qualityLevel: input.QualityLevel }), - ...(input.QvbrQualityLevel != null && { qvbrQualityLevel: input.QvbrQualityLevel }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.ScanType != null && { scanType: input.ScanType }), - ...(input.SceneChangeDetect != null && { sceneChangeDetect: input.SceneChangeDetect }), - ...(input.Slices != null && { slices: input.Slices }), - ...(input.Softness != null && { softness: input.Softness }), - ...(input.SpatialAq != null && { spatialAq: input.SpatialAq }), - ...(input.SubgopLength != null && { subgopLength: input.SubgopLength }), - ...(input.Syntax != null && { syntax: input.Syntax }), - ...(input.TemporalAq != null && { temporalAq: input.TemporalAq }), - ...(input.TimecodeBurninSettings != null && { - timecodeBurninSettings: se_TimecodeBurninSettings(input.TimecodeBurninSettings, context), - }), - ...(input.TimecodeInsertion != null && { timecodeInsertion: input.TimecodeInsertion }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + afdSignaling: [, , `AfdSignaling`], + bitrate: [, , `Bitrate`], + bufFillPct: [, , `BufFillPct`], + bufSize: [, , `BufSize`], + colorMetadata: [, , `ColorMetadata`], + colorSpaceSettings: [, (_) => se_H264ColorSpaceSettings(_, context), `ColorSpaceSettings`], + entropyEncoding: [, , `EntropyEncoding`], + filterSettings: [, (_) => se_H264FilterSettings(_, context), `FilterSettings`], + fixedAfd: [, , `FixedAfd`], + flickerAq: [, , `FlickerAq`], + forceFieldPictures: [, , `ForceFieldPictures`], + framerateControl: [, , `FramerateControl`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopBReference: [, , `GopBReference`], + gopClosedCadence: [, , `GopClosedCadence`], + gopNumBFrames: [, , `GopNumBFrames`], + gopSize: [, __serializeFloat, `GopSize`], + gopSizeUnits: [, , `GopSizeUnits`], + level: [, , `Level`], + lookAheadRateControl: [, , `LookAheadRateControl`], + maxBitrate: [, , `MaxBitrate`], + minIInterval: [, , `MinIInterval`], + numRefFrames: [, , `NumRefFrames`], + parControl: [, , `ParControl`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + profile: [, , `Profile`], + qualityLevel: [, , `QualityLevel`], + qvbrQualityLevel: [, , `QvbrQualityLevel`], + rateControlMode: [, , `RateControlMode`], + scanType: [, , `ScanType`], + sceneChangeDetect: [, , `SceneChangeDetect`], + slices: [, , `Slices`], + softness: [, , `Softness`], + spatialAq: [, , `SpatialAq`], + subgopLength: [, , `SubgopLength`], + syntax: [, , `Syntax`], + temporalAq: [, , `TemporalAq`], + timecodeBurninSettings: [, (_) => se_TimecodeBurninSettings(_, context), `TimecodeBurninSettings`], + timecodeInsertion: [, , `TimecodeInsertion`], + }); }; /** * serializeAws_restJson1H265ColorSpaceSettings */ const se_H265ColorSpaceSettings = (input: H265ColorSpaceSettings, context: __SerdeContext): any => { - return { - ...(input.ColorSpacePassthroughSettings != null && { - colorSpacePassthroughSettings: se_ColorSpacePassthroughSettings(input.ColorSpacePassthroughSettings, context), - }), - ...(input.DolbyVision81Settings != null && { - dolbyVision81Settings: se_DolbyVision81Settings(input.DolbyVision81Settings, context), - }), - ...(input.Hdr10Settings != null && { hdr10Settings: se_Hdr10Settings(input.Hdr10Settings, context) }), - ...(input.Rec601Settings != null && { rec601Settings: se_Rec601Settings(input.Rec601Settings, context) }), - ...(input.Rec709Settings != null && { rec709Settings: se_Rec709Settings(input.Rec709Settings, context) }), - }; + return take(input, { + colorSpacePassthroughSettings: [, _json, `ColorSpacePassthroughSettings`], + dolbyVision81Settings: [, _json, `DolbyVision81Settings`], + hdr10Settings: [, (_) => se_Hdr10Settings(_, context), `Hdr10Settings`], + rec601Settings: [, _json, `Rec601Settings`], + rec709Settings: [, _json, `Rec709Settings`], + }); }; /** * serializeAws_restJson1H265FilterSettings */ const se_H265FilterSettings = (input: H265FilterSettings, context: __SerdeContext): any => { - return { - ...(input.TemporalFilterSettings != null && { - temporalFilterSettings: se_TemporalFilterSettings(input.TemporalFilterSettings, context), - }), - }; + return take(input, { + temporalFilterSettings: [, (_) => se_TemporalFilterSettings(_, context), `TemporalFilterSettings`], + }); }; /** * serializeAws_restJson1H265Settings */ const se_H265Settings = (input: H265Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.AfdSignaling != null && { afdSignaling: input.AfdSignaling }), - ...(input.AlternativeTransferFunction != null && { - alternativeTransferFunction: input.AlternativeTransferFunction, - }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BufSize != null && { bufSize: input.BufSize }), - ...(input.ColorMetadata != null && { colorMetadata: input.ColorMetadata }), - ...(input.ColorSpaceSettings != null && { - colorSpaceSettings: se_H265ColorSpaceSettings(input.ColorSpaceSettings, context), - }), - ...(input.FilterSettings != null && { filterSettings: se_H265FilterSettings(input.FilterSettings, context) }), - ...(input.FixedAfd != null && { fixedAfd: input.FixedAfd }), - ...(input.FlickerAq != null && { flickerAq: input.FlickerAq }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.GopSizeUnits != null && { gopSizeUnits: input.GopSizeUnits }), - ...(input.Level != null && { level: input.Level }), - ...(input.LookAheadRateControl != null && { lookAheadRateControl: input.LookAheadRateControl }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - ...(input.MinIInterval != null && { minIInterval: input.MinIInterval }), - ...(input.ParDenominator != null && { parDenominator: input.ParDenominator }), - ...(input.ParNumerator != null && { parNumerator: input.ParNumerator }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.QvbrQualityLevel != null && { qvbrQualityLevel: input.QvbrQualityLevel }), - ...(input.RateControlMode != null && { rateControlMode: input.RateControlMode }), - ...(input.ScanType != null && { scanType: input.ScanType }), - ...(input.SceneChangeDetect != null && { sceneChangeDetect: input.SceneChangeDetect }), - ...(input.Slices != null && { slices: input.Slices }), - ...(input.Tier != null && { tier: input.Tier }), - ...(input.TimecodeBurninSettings != null && { - timecodeBurninSettings: se_TimecodeBurninSettings(input.TimecodeBurninSettings, context), - }), - ...(input.TimecodeInsertion != null && { timecodeInsertion: input.TimecodeInsertion }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + afdSignaling: [, , `AfdSignaling`], + alternativeTransferFunction: [, , `AlternativeTransferFunction`], + bitrate: [, , `Bitrate`], + bufSize: [, , `BufSize`], + colorMetadata: [, , `ColorMetadata`], + colorSpaceSettings: [, (_) => se_H265ColorSpaceSettings(_, context), `ColorSpaceSettings`], + filterSettings: [, (_) => se_H265FilterSettings(_, context), `FilterSettings`], + fixedAfd: [, , `FixedAfd`], + flickerAq: [, , `FlickerAq`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopClosedCadence: [, , `GopClosedCadence`], + gopSize: [, __serializeFloat, `GopSize`], + gopSizeUnits: [, , `GopSizeUnits`], + level: [, , `Level`], + lookAheadRateControl: [, , `LookAheadRateControl`], + maxBitrate: [, , `MaxBitrate`], + minIInterval: [, , `MinIInterval`], + parDenominator: [, , `ParDenominator`], + parNumerator: [, , `ParNumerator`], + profile: [, , `Profile`], + qvbrQualityLevel: [, , `QvbrQualityLevel`], + rateControlMode: [, , `RateControlMode`], + scanType: [, , `ScanType`], + sceneChangeDetect: [, , `SceneChangeDetect`], + slices: [, , `Slices`], + tier: [, , `Tier`], + timecodeBurninSettings: [, (_) => se_TimecodeBurninSettings(_, context), `TimecodeBurninSettings`], + timecodeInsertion: [, , `TimecodeInsertion`], + }); }; /** * serializeAws_restJson1Hdr10Settings */ const se_Hdr10Settings = (input: Hdr10Settings, context: __SerdeContext): any => { - return { - ...(input.MaxCll != null && { maxCll: input.MaxCll }), - ...(input.MaxFall != null && { maxFall: input.MaxFall }), - }; + return take(input, { + maxCll: [, , `MaxCll`], + maxFall: [, , `MaxFall`], + }); }; /** * serializeAws_restJson1HlsAkamaiSettings */ const se_HlsAkamaiSettings = (input: HlsAkamaiSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectionRetryInterval != null && { connectionRetryInterval: input.ConnectionRetryInterval }), - ...(input.FilecacheDuration != null && { filecacheDuration: input.FilecacheDuration }), - ...(input.HttpTransferMode != null && { httpTransferMode: input.HttpTransferMode }), - ...(input.NumRetries != null && { numRetries: input.NumRetries }), - ...(input.RestartDelay != null && { restartDelay: input.RestartDelay }), - ...(input.Salt != null && { salt: input.Salt }), - ...(input.Token != null && { token: input.Token }), - }; + return take(input, { + connectionRetryInterval: [, , `ConnectionRetryInterval`], + filecacheDuration: [, , `FilecacheDuration`], + httpTransferMode: [, , `HttpTransferMode`], + numRetries: [, , `NumRetries`], + restartDelay: [, , `RestartDelay`], + salt: [, , `Salt`], + token: [, , `Token`], + }); }; /** * serializeAws_restJson1HlsBasicPutSettings */ const se_HlsBasicPutSettings = (input: HlsBasicPutSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectionRetryInterval != null && { connectionRetryInterval: input.ConnectionRetryInterval }), - ...(input.FilecacheDuration != null && { filecacheDuration: input.FilecacheDuration }), - ...(input.NumRetries != null && { numRetries: input.NumRetries }), - ...(input.RestartDelay != null && { restartDelay: input.RestartDelay }), - }; + return take(input, { + connectionRetryInterval: [, , `ConnectionRetryInterval`], + filecacheDuration: [, , `FilecacheDuration`], + numRetries: [, , `NumRetries`], + restartDelay: [, , `RestartDelay`], + }); }; /** * serializeAws_restJson1HlsCdnSettings */ const se_HlsCdnSettings = (input: HlsCdnSettings, context: __SerdeContext): any => { - return { - ...(input.HlsAkamaiSettings != null && { - hlsAkamaiSettings: se_HlsAkamaiSettings(input.HlsAkamaiSettings, context), - }), - ...(input.HlsBasicPutSettings != null && { - hlsBasicPutSettings: se_HlsBasicPutSettings(input.HlsBasicPutSettings, context), - }), - ...(input.HlsMediaStoreSettings != null && { - hlsMediaStoreSettings: se_HlsMediaStoreSettings(input.HlsMediaStoreSettings, context), - }), - ...(input.HlsS3Settings != null && { hlsS3Settings: se_HlsS3Settings(input.HlsS3Settings, context) }), - ...(input.HlsWebdavSettings != null && { - hlsWebdavSettings: se_HlsWebdavSettings(input.HlsWebdavSettings, context), - }), - }; + return take(input, { + hlsAkamaiSettings: [, (_) => se_HlsAkamaiSettings(_, context), `HlsAkamaiSettings`], + hlsBasicPutSettings: [, (_) => se_HlsBasicPutSettings(_, context), `HlsBasicPutSettings`], + hlsMediaStoreSettings: [, (_) => se_HlsMediaStoreSettings(_, context), `HlsMediaStoreSettings`], + hlsS3Settings: [, (_) => se_HlsS3Settings(_, context), `HlsS3Settings`], + hlsWebdavSettings: [, (_) => se_HlsWebdavSettings(_, context), `HlsWebdavSettings`], + }); }; /** * serializeAws_restJson1HlsGroupSettings */ const se_HlsGroupSettings = (input: HlsGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AdMarkers != null && { adMarkers: se___listOfHlsAdMarkers(input.AdMarkers, context) }), - ...(input.BaseUrlContent != null && { baseUrlContent: input.BaseUrlContent }), - ...(input.BaseUrlContent1 != null && { baseUrlContent1: input.BaseUrlContent1 }), - ...(input.BaseUrlManifest != null && { baseUrlManifest: input.BaseUrlManifest }), - ...(input.BaseUrlManifest1 != null && { baseUrlManifest1: input.BaseUrlManifest1 }), - ...(input.CaptionLanguageMappings != null && { - captionLanguageMappings: se___listOfCaptionLanguageMapping(input.CaptionLanguageMappings, context), - }), - ...(input.CaptionLanguageSetting != null && { captionLanguageSetting: input.CaptionLanguageSetting }), - ...(input.ClientCache != null && { clientCache: input.ClientCache }), - ...(input.CodecSpecification != null && { codecSpecification: input.CodecSpecification }), - ...(input.ConstantIv != null && { constantIv: input.ConstantIv }), - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - ...(input.DirectoryStructure != null && { directoryStructure: input.DirectoryStructure }), - ...(input.DiscontinuityTags != null && { discontinuityTags: input.DiscontinuityTags }), - ...(input.EncryptionType != null && { encryptionType: input.EncryptionType }), - ...(input.HlsCdnSettings != null && { hlsCdnSettings: se_HlsCdnSettings(input.HlsCdnSettings, context) }), - ...(input.HlsId3SegmentTagging != null && { hlsId3SegmentTagging: input.HlsId3SegmentTagging }), - ...(input.IFrameOnlyPlaylists != null && { iFrameOnlyPlaylists: input.IFrameOnlyPlaylists }), - ...(input.IncompleteSegmentBehavior != null && { incompleteSegmentBehavior: input.IncompleteSegmentBehavior }), - ...(input.IndexNSegments != null && { indexNSegments: input.IndexNSegments }), - ...(input.InputLossAction != null && { inputLossAction: input.InputLossAction }), - ...(input.IvInManifest != null && { ivInManifest: input.IvInManifest }), - ...(input.IvSource != null && { ivSource: input.IvSource }), - ...(input.KeepSegments != null && { keepSegments: input.KeepSegments }), - ...(input.KeyFormat != null && { keyFormat: input.KeyFormat }), - ...(input.KeyFormatVersions != null && { keyFormatVersions: input.KeyFormatVersions }), - ...(input.KeyProviderSettings != null && { - keyProviderSettings: se_KeyProviderSettings(input.KeyProviderSettings, context), - }), - ...(input.ManifestCompression != null && { manifestCompression: input.ManifestCompression }), - ...(input.ManifestDurationFormat != null && { manifestDurationFormat: input.ManifestDurationFormat }), - ...(input.MinSegmentLength != null && { minSegmentLength: input.MinSegmentLength }), - ...(input.Mode != null && { mode: input.Mode }), - ...(input.OutputSelection != null && { outputSelection: input.OutputSelection }), - ...(input.ProgramDateTime != null && { programDateTime: input.ProgramDateTime }), - ...(input.ProgramDateTimeClock != null && { programDateTimeClock: input.ProgramDateTimeClock }), - ...(input.ProgramDateTimePeriod != null && { programDateTimePeriod: input.ProgramDateTimePeriod }), - ...(input.RedundantManifest != null && { redundantManifest: input.RedundantManifest }), - ...(input.SegmentLength != null && { segmentLength: input.SegmentLength }), - ...(input.SegmentationMode != null && { segmentationMode: input.SegmentationMode }), - ...(input.SegmentsPerSubdirectory != null && { segmentsPerSubdirectory: input.SegmentsPerSubdirectory }), - ...(input.StreamInfResolution != null && { streamInfResolution: input.StreamInfResolution }), - ...(input.TimedMetadataId3Frame != null && { timedMetadataId3Frame: input.TimedMetadataId3Frame }), - ...(input.TimedMetadataId3Period != null && { timedMetadataId3Period: input.TimedMetadataId3Period }), - ...(input.TimestampDeltaMilliseconds != null && { timestampDeltaMilliseconds: input.TimestampDeltaMilliseconds }), - ...(input.TsFileMode != null && { tsFileMode: input.TsFileMode }), - }; + return take(input, { + adMarkers: [, _json, `AdMarkers`], + baseUrlContent: [, , `BaseUrlContent`], + baseUrlContent1: [, , `BaseUrlContent1`], + baseUrlManifest: [, , `BaseUrlManifest`], + baseUrlManifest1: [, , `BaseUrlManifest1`], + captionLanguageMappings: [, (_) => se___listOfCaptionLanguageMapping(_, context), `CaptionLanguageMappings`], + captionLanguageSetting: [, , `CaptionLanguageSetting`], + clientCache: [, , `ClientCache`], + codecSpecification: [, , `CodecSpecification`], + constantIv: [, , `ConstantIv`], + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + directoryStructure: [, , `DirectoryStructure`], + discontinuityTags: [, , `DiscontinuityTags`], + encryptionType: [, , `EncryptionType`], + hlsCdnSettings: [, (_) => se_HlsCdnSettings(_, context), `HlsCdnSettings`], + hlsId3SegmentTagging: [, , `HlsId3SegmentTagging`], + iFrameOnlyPlaylists: [, , `IFrameOnlyPlaylists`], + incompleteSegmentBehavior: [, , `IncompleteSegmentBehavior`], + indexNSegments: [, , `IndexNSegments`], + inputLossAction: [, , `InputLossAction`], + ivInManifest: [, , `IvInManifest`], + ivSource: [, , `IvSource`], + keepSegments: [, , `KeepSegments`], + keyFormat: [, , `KeyFormat`], + keyFormatVersions: [, , `KeyFormatVersions`], + keyProviderSettings: [, (_) => se_KeyProviderSettings(_, context), `KeyProviderSettings`], + manifestCompression: [, , `ManifestCompression`], + manifestDurationFormat: [, , `ManifestDurationFormat`], + minSegmentLength: [, , `MinSegmentLength`], + mode: [, , `Mode`], + outputSelection: [, , `OutputSelection`], + programDateTime: [, , `ProgramDateTime`], + programDateTimeClock: [, , `ProgramDateTimeClock`], + programDateTimePeriod: [, , `ProgramDateTimePeriod`], + redundantManifest: [, , `RedundantManifest`], + segmentLength: [, , `SegmentLength`], + segmentationMode: [, , `SegmentationMode`], + segmentsPerSubdirectory: [, , `SegmentsPerSubdirectory`], + streamInfResolution: [, , `StreamInfResolution`], + timedMetadataId3Frame: [, , `TimedMetadataId3Frame`], + timedMetadataId3Period: [, , `TimedMetadataId3Period`], + timestampDeltaMilliseconds: [, , `TimestampDeltaMilliseconds`], + tsFileMode: [, , `TsFileMode`], + }); }; /** @@ -8375,75 +7713,69 @@ const se_HlsId3SegmentTaggingScheduleActionSettings = ( input: HlsId3SegmentTaggingScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.Id3 != null && { id3: input.Id3 }), - ...(input.Tag != null && { tag: input.Tag }), - }; + return take(input, { + id3: [, , `Id3`], + tag: [, , `Tag`], + }); }; /** * serializeAws_restJson1HlsInputSettings */ const se_HlsInputSettings = (input: HlsInputSettings, context: __SerdeContext): any => { - return { - ...(input.Bandwidth != null && { bandwidth: input.Bandwidth }), - ...(input.BufferSegments != null && { bufferSegments: input.BufferSegments }), - ...(input.Retries != null && { retries: input.Retries }), - ...(input.RetryInterval != null && { retryInterval: input.RetryInterval }), - ...(input.Scte35Source != null && { scte35Source: input.Scte35Source }), - }; + return take(input, { + bandwidth: [, , `Bandwidth`], + bufferSegments: [, , `BufferSegments`], + retries: [, , `Retries`], + retryInterval: [, , `RetryInterval`], + scte35Source: [, , `Scte35Source`], + }); }; /** * serializeAws_restJson1HlsMediaStoreSettings */ const se_HlsMediaStoreSettings = (input: HlsMediaStoreSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectionRetryInterval != null && { connectionRetryInterval: input.ConnectionRetryInterval }), - ...(input.FilecacheDuration != null && { filecacheDuration: input.FilecacheDuration }), - ...(input.MediaStoreStorageClass != null && { mediaStoreStorageClass: input.MediaStoreStorageClass }), - ...(input.NumRetries != null && { numRetries: input.NumRetries }), - ...(input.RestartDelay != null && { restartDelay: input.RestartDelay }), - }; + return take(input, { + connectionRetryInterval: [, , `ConnectionRetryInterval`], + filecacheDuration: [, , `FilecacheDuration`], + mediaStoreStorageClass: [, , `MediaStoreStorageClass`], + numRetries: [, , `NumRetries`], + restartDelay: [, , `RestartDelay`], + }); }; /** * serializeAws_restJson1HlsOutputSettings */ const se_HlsOutputSettings = (input: HlsOutputSettings, context: __SerdeContext): any => { - return { - ...(input.H265PackagingType != null && { h265PackagingType: input.H265PackagingType }), - ...(input.HlsSettings != null && { hlsSettings: se_HlsSettings(input.HlsSettings, context) }), - ...(input.NameModifier != null && { nameModifier: input.NameModifier }), - ...(input.SegmentModifier != null && { segmentModifier: input.SegmentModifier }), - }; + return take(input, { + h265PackagingType: [, , `H265PackagingType`], + hlsSettings: [, (_) => se_HlsSettings(_, context), `HlsSettings`], + nameModifier: [, , `NameModifier`], + segmentModifier: [, , `SegmentModifier`], + }); }; /** * serializeAws_restJson1HlsS3Settings */ const se_HlsS3Settings = (input: HlsS3Settings, context: __SerdeContext): any => { - return { - ...(input.CannedAcl != null && { cannedAcl: input.CannedAcl }), - }; + return take(input, { + cannedAcl: [, , `CannedAcl`], + }); }; /** * serializeAws_restJson1HlsSettings */ const se_HlsSettings = (input: HlsSettings, context: __SerdeContext): any => { - return { - ...(input.AudioOnlyHlsSettings != null && { - audioOnlyHlsSettings: se_AudioOnlyHlsSettings(input.AudioOnlyHlsSettings, context), - }), - ...(input.Fmp4HlsSettings != null && { fmp4HlsSettings: se_Fmp4HlsSettings(input.Fmp4HlsSettings, context) }), - ...(input.FrameCaptureHlsSettings != null && { - frameCaptureHlsSettings: se_FrameCaptureHlsSettings(input.FrameCaptureHlsSettings, context), - }), - ...(input.StandardHlsSettings != null && { - standardHlsSettings: se_StandardHlsSettings(input.StandardHlsSettings, context), - }), - }; + return take(input, { + audioOnlyHlsSettings: [, (_) => se_AudioOnlyHlsSettings(_, context), `AudioOnlyHlsSettings`], + fmp4HlsSettings: [, (_) => se_Fmp4HlsSettings(_, context), `Fmp4HlsSettings`], + frameCaptureHlsSettings: [, _json, `FrameCaptureHlsSettings`], + standardHlsSettings: [, (_) => se_StandardHlsSettings(_, context), `StandardHlsSettings`], + }); }; /** @@ -8453,147 +7785,134 @@ const se_HlsTimedMetadataScheduleActionSettings = ( input: HlsTimedMetadataScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.Id3 != null && { id3: input.Id3 }), - }; + return take(input, { + id3: [, , `Id3`], + }); }; /** * serializeAws_restJson1HlsWebdavSettings */ const se_HlsWebdavSettings = (input: HlsWebdavSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectionRetryInterval != null && { connectionRetryInterval: input.ConnectionRetryInterval }), - ...(input.FilecacheDuration != null && { filecacheDuration: input.FilecacheDuration }), - ...(input.HttpTransferMode != null && { httpTransferMode: input.HttpTransferMode }), - ...(input.NumRetries != null && { numRetries: input.NumRetries }), - ...(input.RestartDelay != null && { restartDelay: input.RestartDelay }), - }; + return take(input, { + connectionRetryInterval: [, , `ConnectionRetryInterval`], + filecacheDuration: [, , `FilecacheDuration`], + httpTransferMode: [, , `HttpTransferMode`], + numRetries: [, , `NumRetries`], + restartDelay: [, , `RestartDelay`], + }); }; -/** - * serializeAws_restJson1HtmlMotionGraphicsSettings - */ -const se_HtmlMotionGraphicsSettings = (input: HtmlMotionGraphicsSettings, context: __SerdeContext): any => { - return {}; -}; +// se_HtmlMotionGraphicsSettings omitted. -/** - * serializeAws_restJson1ImmediateModeScheduleActionStartSettings - */ -const se_ImmediateModeScheduleActionStartSettings = ( - input: ImmediateModeScheduleActionStartSettings, - context: __SerdeContext -): any => { - return {}; -}; +// se_ImmediateModeScheduleActionStartSettings omitted. /** * serializeAws_restJson1InputAttachment */ const se_InputAttachment = (input: InputAttachment, context: __SerdeContext): any => { - return { - ...(input.AutomaticInputFailoverSettings != null && { - automaticInputFailoverSettings: se_AutomaticInputFailoverSettings(input.AutomaticInputFailoverSettings, context), - }), - ...(input.InputAttachmentName != null && { inputAttachmentName: input.InputAttachmentName }), - ...(input.InputId != null && { inputId: input.InputId }), - ...(input.InputSettings != null && { inputSettings: se_InputSettings(input.InputSettings, context) }), - }; + return take(input, { + automaticInputFailoverSettings: [ + , + (_) => se_AutomaticInputFailoverSettings(_, context), + `AutomaticInputFailoverSettings`, + ], + inputAttachmentName: [, , `InputAttachmentName`], + inputId: [, , `InputId`], + inputSettings: [, (_) => se_InputSettings(_, context), `InputSettings`], + }); }; /** * serializeAws_restJson1InputChannelLevel */ const se_InputChannelLevel = (input: InputChannelLevel, context: __SerdeContext): any => { - return { - ...(input.Gain != null && { gain: input.Gain }), - ...(input.InputChannel != null && { inputChannel: input.InputChannel }), - }; + return take(input, { + gain: [, , `Gain`], + inputChannel: [, , `InputChannel`], + }); }; /** * serializeAws_restJson1InputClippingSettings */ const se_InputClippingSettings = (input: InputClippingSettings, context: __SerdeContext): any => { - return { - ...(input.InputTimecodeSource != null && { inputTimecodeSource: input.InputTimecodeSource }), - ...(input.StartTimecode != null && { startTimecode: se_StartTimecode(input.StartTimecode, context) }), - ...(input.StopTimecode != null && { stopTimecode: se_StopTimecode(input.StopTimecode, context) }), - }; + return take(input, { + inputTimecodeSource: [, , `InputTimecodeSource`], + startTimecode: [, (_) => se_StartTimecode(_, context), `StartTimecode`], + stopTimecode: [, (_) => se_StopTimecode(_, context), `StopTimecode`], + }); }; /** * serializeAws_restJson1InputDestinationRequest */ const se_InputDestinationRequest = (input: InputDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.StreamName != null && { streamName: input.StreamName }), - }; + return take(input, { + streamName: [, , `StreamName`], + }); }; /** * serializeAws_restJson1InputDeviceConfigurableSettings */ const se_InputDeviceConfigurableSettings = (input: InputDeviceConfigurableSettings, context: __SerdeContext): any => { - return { - ...(input.ConfiguredInput != null && { configuredInput: input.ConfiguredInput }), - ...(input.LatencyMs != null && { latencyMs: input.LatencyMs }), - ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), - }; + return take(input, { + configuredInput: [, , `ConfiguredInput`], + latencyMs: [, , `LatencyMs`], + maxBitrate: [, , `MaxBitrate`], + }); }; /** * serializeAws_restJson1InputDeviceRequest */ const se_InputDeviceRequest = (input: InputDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { id: input.Id }), - }; + return take(input, { + id: [, , `Id`], + }); }; /** * serializeAws_restJson1InputDeviceSettings */ const se_InputDeviceSettings = (input: InputDeviceSettings, context: __SerdeContext): any => { - return { - ...(input.Id != null && { id: input.Id }), - }; + return take(input, { + id: [, , `Id`], + }); }; /** * serializeAws_restJson1InputLocation */ const se_InputLocation = (input: InputLocation, context: __SerdeContext): any => { - return { - ...(input.PasswordParam != null && { passwordParam: input.PasswordParam }), - ...(input.Uri != null && { uri: input.Uri }), - ...(input.Username != null && { username: input.Username }), - }; + return take(input, { + passwordParam: [, , `PasswordParam`], + uri: [, , `Uri`], + username: [, , `Username`], + }); }; /** * serializeAws_restJson1InputLossBehavior */ const se_InputLossBehavior = (input: InputLossBehavior, context: __SerdeContext): any => { - return { - ...(input.BlackFrameMsec != null && { blackFrameMsec: input.BlackFrameMsec }), - ...(input.InputLossImageColor != null && { inputLossImageColor: input.InputLossImageColor }), - ...(input.InputLossImageSlate != null && { - inputLossImageSlate: se_InputLocation(input.InputLossImageSlate, context), - }), - ...(input.InputLossImageType != null && { inputLossImageType: input.InputLossImageType }), - ...(input.RepeatFrameMsec != null && { repeatFrameMsec: input.RepeatFrameMsec }), - }; + return take(input, { + blackFrameMsec: [, , `BlackFrameMsec`], + inputLossImageColor: [, , `InputLossImageColor`], + inputLossImageSlate: [, (_) => se_InputLocation(_, context), `InputLossImageSlate`], + inputLossImageType: [, , `InputLossImageType`], + repeatFrameMsec: [, , `RepeatFrameMsec`], + }); }; /** * serializeAws_restJson1InputLossFailoverSettings */ const se_InputLossFailoverSettings = (input: InputLossFailoverSettings, context: __SerdeContext): any => { - return { - ...(input.InputLossThresholdMsec != null && { inputLossThresholdMsec: input.InputLossThresholdMsec }), - }; + return take(input, { + inputLossThresholdMsec: [, , `InputLossThresholdMsec`], + }); }; /** @@ -8603,60 +7922,52 @@ const se_InputPrepareScheduleActionSettings = ( input: InputPrepareScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.InputAttachmentNameReference != null && { - inputAttachmentNameReference: input.InputAttachmentNameReference, - }), - ...(input.InputClippingSettings != null && { - inputClippingSettings: se_InputClippingSettings(input.InputClippingSettings, context), - }), - ...(input.UrlPath != null && { urlPath: se___listOf__string(input.UrlPath, context) }), - }; + return take(input, { + inputAttachmentNameReference: [, , `InputAttachmentNameReference`], + inputClippingSettings: [, (_) => se_InputClippingSettings(_, context), `InputClippingSettings`], + urlPath: [, _json, `UrlPath`], + }); }; /** * serializeAws_restJson1InputSettings */ const se_InputSettings = (input: InputSettings, context: __SerdeContext): any => { - return { - ...(input.AudioSelectors != null && { audioSelectors: se___listOfAudioSelector(input.AudioSelectors, context) }), - ...(input.CaptionSelectors != null && { - captionSelectors: se___listOfCaptionSelector(input.CaptionSelectors, context), - }), - ...(input.DeblockFilter != null && { deblockFilter: input.DeblockFilter }), - ...(input.DenoiseFilter != null && { denoiseFilter: input.DenoiseFilter }), - ...(input.FilterStrength != null && { filterStrength: input.FilterStrength }), - ...(input.InputFilter != null && { inputFilter: input.InputFilter }), - ...(input.NetworkInputSettings != null && { - networkInputSettings: se_NetworkInputSettings(input.NetworkInputSettings, context), - }), - ...(input.Scte35Pid != null && { scte35Pid: input.Scte35Pid }), - ...(input.Smpte2038DataPreference != null && { smpte2038DataPreference: input.Smpte2038DataPreference }), - ...(input.SourceEndBehavior != null && { sourceEndBehavior: input.SourceEndBehavior }), - ...(input.VideoSelector != null && { videoSelector: se_VideoSelector(input.VideoSelector, context) }), - }; + return take(input, { + audioSelectors: [, (_) => se___listOfAudioSelector(_, context), `AudioSelectors`], + captionSelectors: [, (_) => se___listOfCaptionSelector(_, context), `CaptionSelectors`], + deblockFilter: [, , `DeblockFilter`], + denoiseFilter: [, , `DenoiseFilter`], + filterStrength: [, , `FilterStrength`], + inputFilter: [, , `InputFilter`], + networkInputSettings: [, (_) => se_NetworkInputSettings(_, context), `NetworkInputSettings`], + scte35Pid: [, , `Scte35Pid`], + smpte2038DataPreference: [, , `Smpte2038DataPreference`], + sourceEndBehavior: [, , `SourceEndBehavior`], + videoSelector: [, (_) => se_VideoSelector(_, context), `VideoSelector`], + }); }; /** * serializeAws_restJson1InputSourceRequest */ const se_InputSourceRequest = (input: InputSourceRequest, context: __SerdeContext): any => { - return { - ...(input.PasswordParam != null && { passwordParam: input.PasswordParam }), - ...(input.Url != null && { url: input.Url }), - ...(input.Username != null && { username: input.Username }), - }; + return take(input, { + passwordParam: [, , `PasswordParam`], + url: [, , `Url`], + username: [, , `Username`], + }); }; /** * serializeAws_restJson1InputSpecification */ const se_InputSpecification = (input: InputSpecification, context: __SerdeContext): any => { - return { - ...(input.Codec != null && { codec: input.Codec }), - ...(input.MaximumBitrate != null && { maximumBitrate: input.MaximumBitrate }), - ...(input.Resolution != null && { resolution: input.Resolution }), - }; + return take(input, { + codec: [, , `Codec`], + maximumBitrate: [, , `MaximumBitrate`], + resolution: [, , `Resolution`], + }); }; /** @@ -8666,167 +7977,159 @@ const se_InputSwitchScheduleActionSettings = ( input: InputSwitchScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.InputAttachmentNameReference != null && { - inputAttachmentNameReference: input.InputAttachmentNameReference, - }), - ...(input.InputClippingSettings != null && { - inputClippingSettings: se_InputClippingSettings(input.InputClippingSettings, context), - }), - ...(input.UrlPath != null && { urlPath: se___listOf__string(input.UrlPath, context) }), - }; + return take(input, { + inputAttachmentNameReference: [, , `InputAttachmentNameReference`], + inputClippingSettings: [, (_) => se_InputClippingSettings(_, context), `InputClippingSettings`], + urlPath: [, _json, `UrlPath`], + }); }; /** * serializeAws_restJson1InputVpcRequest */ const se_InputVpcRequest = (input: InputVpcRequest, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { securityGroupIds: se___listOf__string(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { subnetIds: se___listOf__string(input.SubnetIds, context) }), - }; + return take(input, { + securityGroupIds: [, _json, `SecurityGroupIds`], + subnetIds: [, _json, `SubnetIds`], + }); }; /** * serializeAws_restJson1InputWhitelistRuleCidr */ const se_InputWhitelistRuleCidr = (input: InputWhitelistRuleCidr, context: __SerdeContext): any => { - return { - ...(input.Cidr != null && { cidr: input.Cidr }), - }; + return take(input, { + cidr: [, , `Cidr`], + }); }; /** * serializeAws_restJson1KeyProviderSettings */ const se_KeyProviderSettings = (input: KeyProviderSettings, context: __SerdeContext): any => { - return { - ...(input.StaticKeySettings != null && { - staticKeySettings: se_StaticKeySettings(input.StaticKeySettings, context), - }), - }; + return take(input, { + staticKeySettings: [, (_) => se_StaticKeySettings(_, context), `StaticKeySettings`], + }); }; /** * serializeAws_restJson1M2tsSettings */ const se_M2tsSettings = (input: M2tsSettings, context: __SerdeContext): any => { - return { - ...(input.AbsentInputAudioBehavior != null && { absentInputAudioBehavior: input.AbsentInputAudioBehavior }), - ...(input.Arib != null && { arib: input.Arib }), - ...(input.AribCaptionsPid != null && { aribCaptionsPid: input.AribCaptionsPid }), - ...(input.AribCaptionsPidControl != null && { aribCaptionsPidControl: input.AribCaptionsPidControl }), - ...(input.AudioBufferModel != null && { audioBufferModel: input.AudioBufferModel }), - ...(input.AudioFramesPerPes != null && { audioFramesPerPes: input.AudioFramesPerPes }), - ...(input.AudioPids != null && { audioPids: input.AudioPids }), - ...(input.AudioStreamType != null && { audioStreamType: input.AudioStreamType }), - ...(input.Bitrate != null && { bitrate: input.Bitrate }), - ...(input.BufferModel != null && { bufferModel: input.BufferModel }), - ...(input.CcDescriptor != null && { ccDescriptor: input.CcDescriptor }), - ...(input.DvbNitSettings != null && { dvbNitSettings: se_DvbNitSettings(input.DvbNitSettings, context) }), - ...(input.DvbSdtSettings != null && { dvbSdtSettings: se_DvbSdtSettings(input.DvbSdtSettings, context) }), - ...(input.DvbSubPids != null && { dvbSubPids: input.DvbSubPids }), - ...(input.DvbTdtSettings != null && { dvbTdtSettings: se_DvbTdtSettings(input.DvbTdtSettings, context) }), - ...(input.DvbTeletextPid != null && { dvbTeletextPid: input.DvbTeletextPid }), - ...(input.Ebif != null && { ebif: input.Ebif }), - ...(input.EbpAudioInterval != null && { ebpAudioInterval: input.EbpAudioInterval }), - ...(input.EbpLookaheadMs != null && { ebpLookaheadMs: input.EbpLookaheadMs }), - ...(input.EbpPlacement != null && { ebpPlacement: input.EbpPlacement }), - ...(input.EcmPid != null && { ecmPid: input.EcmPid }), - ...(input.EsRateInPes != null && { esRateInPes: input.EsRateInPes }), - ...(input.EtvPlatformPid != null && { etvPlatformPid: input.EtvPlatformPid }), - ...(input.EtvSignalPid != null && { etvSignalPid: input.EtvSignalPid }), - ...(input.FragmentTime != null && { fragmentTime: __serializeFloat(input.FragmentTime) }), - ...(input.Klv != null && { klv: input.Klv }), - ...(input.KlvDataPids != null && { klvDataPids: input.KlvDataPids }), - ...(input.NielsenId3Behavior != null && { nielsenId3Behavior: input.NielsenId3Behavior }), - ...(input.NullPacketBitrate != null && { nullPacketBitrate: __serializeFloat(input.NullPacketBitrate) }), - ...(input.PatInterval != null && { patInterval: input.PatInterval }), - ...(input.PcrControl != null && { pcrControl: input.PcrControl }), - ...(input.PcrPeriod != null && { pcrPeriod: input.PcrPeriod }), - ...(input.PcrPid != null && { pcrPid: input.PcrPid }), - ...(input.PmtInterval != null && { pmtInterval: input.PmtInterval }), - ...(input.PmtPid != null && { pmtPid: input.PmtPid }), - ...(input.ProgramNum != null && { programNum: input.ProgramNum }), - ...(input.RateMode != null && { rateMode: input.RateMode }), - ...(input.Scte27Pids != null && { scte27Pids: input.Scte27Pids }), - ...(input.Scte35Control != null && { scte35Control: input.Scte35Control }), - ...(input.Scte35Pid != null && { scte35Pid: input.Scte35Pid }), - ...(input.Scte35PrerollPullupMilliseconds != null && { - scte35PrerollPullupMilliseconds: __serializeFloat(input.Scte35PrerollPullupMilliseconds), - }), - ...(input.SegmentationMarkers != null && { segmentationMarkers: input.SegmentationMarkers }), - ...(input.SegmentationStyle != null && { segmentationStyle: input.SegmentationStyle }), - ...(input.SegmentationTime != null && { segmentationTime: __serializeFloat(input.SegmentationTime) }), - ...(input.TimedMetadataBehavior != null && { timedMetadataBehavior: input.TimedMetadataBehavior }), - ...(input.TimedMetadataPid != null && { timedMetadataPid: input.TimedMetadataPid }), - ...(input.TransportStreamId != null && { transportStreamId: input.TransportStreamId }), - ...(input.VideoPid != null && { videoPid: input.VideoPid }), - }; + return take(input, { + absentInputAudioBehavior: [, , `AbsentInputAudioBehavior`], + arib: [, , `Arib`], + aribCaptionsPid: [, , `AribCaptionsPid`], + aribCaptionsPidControl: [, , `AribCaptionsPidControl`], + audioBufferModel: [, , `AudioBufferModel`], + audioFramesPerPes: [, , `AudioFramesPerPes`], + audioPids: [, , `AudioPids`], + audioStreamType: [, , `AudioStreamType`], + bitrate: [, , `Bitrate`], + bufferModel: [, , `BufferModel`], + ccDescriptor: [, , `CcDescriptor`], + dvbNitSettings: [, (_) => se_DvbNitSettings(_, context), `DvbNitSettings`], + dvbSdtSettings: [, (_) => se_DvbSdtSettings(_, context), `DvbSdtSettings`], + dvbSubPids: [, , `DvbSubPids`], + dvbTdtSettings: [, (_) => se_DvbTdtSettings(_, context), `DvbTdtSettings`], + dvbTeletextPid: [, , `DvbTeletextPid`], + ebif: [, , `Ebif`], + ebpAudioInterval: [, , `EbpAudioInterval`], + ebpLookaheadMs: [, , `EbpLookaheadMs`], + ebpPlacement: [, , `EbpPlacement`], + ecmPid: [, , `EcmPid`], + esRateInPes: [, , `EsRateInPes`], + etvPlatformPid: [, , `EtvPlatformPid`], + etvSignalPid: [, , `EtvSignalPid`], + fragmentTime: [, __serializeFloat, `FragmentTime`], + klv: [, , `Klv`], + klvDataPids: [, , `KlvDataPids`], + nielsenId3Behavior: [, , `NielsenId3Behavior`], + nullPacketBitrate: [, __serializeFloat, `NullPacketBitrate`], + patInterval: [, , `PatInterval`], + pcrControl: [, , `PcrControl`], + pcrPeriod: [, , `PcrPeriod`], + pcrPid: [, , `PcrPid`], + pmtInterval: [, , `PmtInterval`], + pmtPid: [, , `PmtPid`], + programNum: [, , `ProgramNum`], + rateMode: [, , `RateMode`], + scte27Pids: [, , `Scte27Pids`], + scte35Control: [, , `Scte35Control`], + scte35Pid: [, , `Scte35Pid`], + scte35PrerollPullupMilliseconds: [, __serializeFloat, `Scte35PrerollPullupMilliseconds`], + segmentationMarkers: [, , `SegmentationMarkers`], + segmentationStyle: [, , `SegmentationStyle`], + segmentationTime: [, __serializeFloat, `SegmentationTime`], + timedMetadataBehavior: [, , `TimedMetadataBehavior`], + timedMetadataPid: [, , `TimedMetadataPid`], + transportStreamId: [, , `TransportStreamId`], + videoPid: [, , `VideoPid`], + }); }; /** * serializeAws_restJson1M3u8Settings */ const se_M3u8Settings = (input: M3u8Settings, context: __SerdeContext): any => { - return { - ...(input.AudioFramesPerPes != null && { audioFramesPerPes: input.AudioFramesPerPes }), - ...(input.AudioPids != null && { audioPids: input.AudioPids }), - ...(input.EcmPid != null && { ecmPid: input.EcmPid }), - ...(input.NielsenId3Behavior != null && { nielsenId3Behavior: input.NielsenId3Behavior }), - ...(input.PatInterval != null && { patInterval: input.PatInterval }), - ...(input.PcrControl != null && { pcrControl: input.PcrControl }), - ...(input.PcrPeriod != null && { pcrPeriod: input.PcrPeriod }), - ...(input.PcrPid != null && { pcrPid: input.PcrPid }), - ...(input.PmtInterval != null && { pmtInterval: input.PmtInterval }), - ...(input.PmtPid != null && { pmtPid: input.PmtPid }), - ...(input.ProgramNum != null && { programNum: input.ProgramNum }), - ...(input.Scte35Behavior != null && { scte35Behavior: input.Scte35Behavior }), - ...(input.Scte35Pid != null && { scte35Pid: input.Scte35Pid }), - ...(input.TimedMetadataBehavior != null && { timedMetadataBehavior: input.TimedMetadataBehavior }), - ...(input.TimedMetadataPid != null && { timedMetadataPid: input.TimedMetadataPid }), - ...(input.TransportStreamId != null && { transportStreamId: input.TransportStreamId }), - ...(input.VideoPid != null && { videoPid: input.VideoPid }), - }; + return take(input, { + audioFramesPerPes: [, , `AudioFramesPerPes`], + audioPids: [, , `AudioPids`], + ecmPid: [, , `EcmPid`], + nielsenId3Behavior: [, , `NielsenId3Behavior`], + patInterval: [, , `PatInterval`], + pcrControl: [, , `PcrControl`], + pcrPeriod: [, , `PcrPeriod`], + pcrPid: [, , `PcrPid`], + pmtInterval: [, , `PmtInterval`], + pmtPid: [, , `PmtPid`], + programNum: [, , `ProgramNum`], + scte35Behavior: [, , `Scte35Behavior`], + scte35Pid: [, , `Scte35Pid`], + timedMetadataBehavior: [, , `TimedMetadataBehavior`], + timedMetadataPid: [, , `TimedMetadataPid`], + transportStreamId: [, , `TransportStreamId`], + videoPid: [, , `VideoPid`], + }); }; /** * serializeAws_restJson1MaintenanceCreateSettings */ const se_MaintenanceCreateSettings = (input: MaintenanceCreateSettings, context: __SerdeContext): any => { - return { - ...(input.MaintenanceDay != null && { maintenanceDay: input.MaintenanceDay }), - ...(input.MaintenanceStartTime != null && { maintenanceStartTime: input.MaintenanceStartTime }), - }; + return take(input, { + maintenanceDay: [, , `MaintenanceDay`], + maintenanceStartTime: [, , `MaintenanceStartTime`], + }); }; /** * serializeAws_restJson1MaintenanceUpdateSettings */ const se_MaintenanceUpdateSettings = (input: MaintenanceUpdateSettings, context: __SerdeContext): any => { - return { - ...(input.MaintenanceDay != null && { maintenanceDay: input.MaintenanceDay }), - ...(input.MaintenanceScheduledDate != null && { maintenanceScheduledDate: input.MaintenanceScheduledDate }), - ...(input.MaintenanceStartTime != null && { maintenanceStartTime: input.MaintenanceStartTime }), - }; + return take(input, { + maintenanceDay: [, , `MaintenanceDay`], + maintenanceScheduledDate: [, , `MaintenanceScheduledDate`], + maintenanceStartTime: [, , `MaintenanceStartTime`], + }); }; /** * serializeAws_restJson1MediaConnectFlowRequest */ const se_MediaConnectFlowRequest = (input: MediaConnectFlowRequest, context: __SerdeContext): any => { - return { - ...(input.FlowArn != null && { flowArn: input.FlowArn }), - }; + return take(input, { + flowArn: [, , `FlowArn`], + }); }; /** * serializeAws_restJson1MediaPackageGroupSettings */ const se_MediaPackageGroupSettings = (input: MediaPackageGroupSettings, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - }; + return take(input, { + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + }); }; /** @@ -8836,17 +8139,12 @@ const se_MediaPackageOutputDestinationSettings = ( input: MediaPackageOutputDestinationSettings, context: __SerdeContext ): any => { - return { - ...(input.ChannelId != null && { channelId: input.ChannelId }), - }; + return take(input, { + channelId: [, , `ChannelId`], + }); }; -/** - * serializeAws_restJson1MediaPackageOutputSettings - */ -const se_MediaPackageOutputSettings = (input: MediaPackageOutputSettings, context: __SerdeContext): any => { - return {}; -}; +// se_MediaPackageOutputSettings omitted. /** * serializeAws_restJson1MotionGraphicsActivateScheduleActionSettings @@ -8855,147 +8153,126 @@ const se_MotionGraphicsActivateScheduleActionSettings = ( input: MotionGraphicsActivateScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.Duration != null && { duration: input.Duration }), - ...(input.PasswordParam != null && { passwordParam: input.PasswordParam }), - ...(input.Url != null && { url: input.Url }), - ...(input.Username != null && { username: input.Username }), - }; + return take(input, { + duration: [, , `Duration`], + passwordParam: [, , `PasswordParam`], + url: [, , `Url`], + username: [, , `Username`], + }); }; /** * serializeAws_restJson1MotionGraphicsConfiguration */ const se_MotionGraphicsConfiguration = (input: MotionGraphicsConfiguration, context: __SerdeContext): any => { - return { - ...(input.MotionGraphicsInsertion != null && { motionGraphicsInsertion: input.MotionGraphicsInsertion }), - ...(input.MotionGraphicsSettings != null && { - motionGraphicsSettings: se_MotionGraphicsSettings(input.MotionGraphicsSettings, context), - }), - }; + return take(input, { + motionGraphicsInsertion: [, , `MotionGraphicsInsertion`], + motionGraphicsSettings: [, (_) => se_MotionGraphicsSettings(_, context), `MotionGraphicsSettings`], + }); }; -/** - * serializeAws_restJson1MotionGraphicsDeactivateScheduleActionSettings - */ -const se_MotionGraphicsDeactivateScheduleActionSettings = ( - input: MotionGraphicsDeactivateScheduleActionSettings, - context: __SerdeContext -): any => { - return {}; -}; +// se_MotionGraphicsDeactivateScheduleActionSettings omitted. /** * serializeAws_restJson1MotionGraphicsSettings */ const se_MotionGraphicsSettings = (input: MotionGraphicsSettings, context: __SerdeContext): any => { - return { - ...(input.HtmlMotionGraphicsSettings != null && { - htmlMotionGraphicsSettings: se_HtmlMotionGraphicsSettings(input.HtmlMotionGraphicsSettings, context), - }), - }; + return take(input, { + htmlMotionGraphicsSettings: [, _json, `HtmlMotionGraphicsSettings`], + }); }; /** * serializeAws_restJson1Mp2Settings */ const se_Mp2Settings = (input: Mp2Settings, context: __SerdeContext): any => { - return { - ...(input.Bitrate != null && { bitrate: __serializeFloat(input.Bitrate) }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.SampleRate != null && { sampleRate: __serializeFloat(input.SampleRate) }), - }; + return take(input, { + bitrate: [, __serializeFloat, `Bitrate`], + codingMode: [, , `CodingMode`], + sampleRate: [, __serializeFloat, `SampleRate`], + }); }; /** * serializeAws_restJson1Mpeg2FilterSettings */ const se_Mpeg2FilterSettings = (input: Mpeg2FilterSettings, context: __SerdeContext): any => { - return { - ...(input.TemporalFilterSettings != null && { - temporalFilterSettings: se_TemporalFilterSettings(input.TemporalFilterSettings, context), - }), - }; + return take(input, { + temporalFilterSettings: [, (_) => se_TemporalFilterSettings(_, context), `TemporalFilterSettings`], + }); }; /** * serializeAws_restJson1Mpeg2Settings */ const se_Mpeg2Settings = (input: Mpeg2Settings, context: __SerdeContext): any => { - return { - ...(input.AdaptiveQuantization != null && { adaptiveQuantization: input.AdaptiveQuantization }), - ...(input.AfdSignaling != null && { afdSignaling: input.AfdSignaling }), - ...(input.ColorMetadata != null && { colorMetadata: input.ColorMetadata }), - ...(input.ColorSpace != null && { colorSpace: input.ColorSpace }), - ...(input.DisplayAspectRatio != null && { displayAspectRatio: input.DisplayAspectRatio }), - ...(input.FilterSettings != null && { filterSettings: se_Mpeg2FilterSettings(input.FilterSettings, context) }), - ...(input.FixedAfd != null && { fixedAfd: input.FixedAfd }), - ...(input.FramerateDenominator != null && { framerateDenominator: input.FramerateDenominator }), - ...(input.FramerateNumerator != null && { framerateNumerator: input.FramerateNumerator }), - ...(input.GopClosedCadence != null && { gopClosedCadence: input.GopClosedCadence }), - ...(input.GopNumBFrames != null && { gopNumBFrames: input.GopNumBFrames }), - ...(input.GopSize != null && { gopSize: __serializeFloat(input.GopSize) }), - ...(input.GopSizeUnits != null && { gopSizeUnits: input.GopSizeUnits }), - ...(input.ScanType != null && { scanType: input.ScanType }), - ...(input.SubgopLength != null && { subgopLength: input.SubgopLength }), - ...(input.TimecodeBurninSettings != null && { - timecodeBurninSettings: se_TimecodeBurninSettings(input.TimecodeBurninSettings, context), - }), - ...(input.TimecodeInsertion != null && { timecodeInsertion: input.TimecodeInsertion }), - }; + return take(input, { + adaptiveQuantization: [, , `AdaptiveQuantization`], + afdSignaling: [, , `AfdSignaling`], + colorMetadata: [, , `ColorMetadata`], + colorSpace: [, , `ColorSpace`], + displayAspectRatio: [, , `DisplayAspectRatio`], + filterSettings: [, (_) => se_Mpeg2FilterSettings(_, context), `FilterSettings`], + fixedAfd: [, , `FixedAfd`], + framerateDenominator: [, , `FramerateDenominator`], + framerateNumerator: [, , `FramerateNumerator`], + gopClosedCadence: [, , `GopClosedCadence`], + gopNumBFrames: [, , `GopNumBFrames`], + gopSize: [, __serializeFloat, `GopSize`], + gopSizeUnits: [, , `GopSizeUnits`], + scanType: [, , `ScanType`], + subgopLength: [, , `SubgopLength`], + timecodeBurninSettings: [, (_) => se_TimecodeBurninSettings(_, context), `TimecodeBurninSettings`], + timecodeInsertion: [, , `TimecodeInsertion`], + }); }; /** * serializeAws_restJson1MsSmoothGroupSettings */ const se_MsSmoothGroupSettings = (input: MsSmoothGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AcquisitionPointId != null && { acquisitionPointId: input.AcquisitionPointId }), - ...(input.AudioOnlyTimecodeControl != null && { audioOnlyTimecodeControl: input.AudioOnlyTimecodeControl }), - ...(input.CertificateMode != null && { certificateMode: input.CertificateMode }), - ...(input.ConnectionRetryInterval != null && { connectionRetryInterval: input.ConnectionRetryInterval }), - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - ...(input.EventId != null && { eventId: input.EventId }), - ...(input.EventIdMode != null && { eventIdMode: input.EventIdMode }), - ...(input.EventStopBehavior != null && { eventStopBehavior: input.EventStopBehavior }), - ...(input.FilecacheDuration != null && { filecacheDuration: input.FilecacheDuration }), - ...(input.FragmentLength != null && { fragmentLength: input.FragmentLength }), - ...(input.InputLossAction != null && { inputLossAction: input.InputLossAction }), - ...(input.NumRetries != null && { numRetries: input.NumRetries }), - ...(input.RestartDelay != null && { restartDelay: input.RestartDelay }), - ...(input.SegmentationMode != null && { segmentationMode: input.SegmentationMode }), - ...(input.SendDelayMs != null && { sendDelayMs: input.SendDelayMs }), - ...(input.SparseTrackType != null && { sparseTrackType: input.SparseTrackType }), - ...(input.StreamManifestBehavior != null && { streamManifestBehavior: input.StreamManifestBehavior }), - ...(input.TimestampOffset != null && { timestampOffset: input.TimestampOffset }), - ...(input.TimestampOffsetMode != null && { timestampOffsetMode: input.TimestampOffsetMode }), - }; + return take(input, { + acquisitionPointId: [, , `AcquisitionPointId`], + audioOnlyTimecodeControl: [, , `AudioOnlyTimecodeControl`], + certificateMode: [, , `CertificateMode`], + connectionRetryInterval: [, , `ConnectionRetryInterval`], + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + eventId: [, , `EventId`], + eventIdMode: [, , `EventIdMode`], + eventStopBehavior: [, , `EventStopBehavior`], + filecacheDuration: [, , `FilecacheDuration`], + fragmentLength: [, , `FragmentLength`], + inputLossAction: [, , `InputLossAction`], + numRetries: [, , `NumRetries`], + restartDelay: [, , `RestartDelay`], + segmentationMode: [, , `SegmentationMode`], + sendDelayMs: [, , `SendDelayMs`], + sparseTrackType: [, , `SparseTrackType`], + streamManifestBehavior: [, , `StreamManifestBehavior`], + timestampOffset: [, , `TimestampOffset`], + timestampOffsetMode: [, , `TimestampOffsetMode`], + }); }; /** * serializeAws_restJson1MsSmoothOutputSettings */ const se_MsSmoothOutputSettings = (input: MsSmoothOutputSettings, context: __SerdeContext): any => { - return { - ...(input.H265PackagingType != null && { h265PackagingType: input.H265PackagingType }), - ...(input.NameModifier != null && { nameModifier: input.NameModifier }), - }; + return take(input, { + h265PackagingType: [, , `H265PackagingType`], + nameModifier: [, , `NameModifier`], + }); }; -/** - * serializeAws_restJson1MultiplexGroupSettings - */ -const se_MultiplexGroupSettings = (input: MultiplexGroupSettings, context: __SerdeContext): any => { - return {}; -}; +// se_MultiplexGroupSettings omitted. /** * serializeAws_restJson1MultiplexOutputSettings */ const se_MultiplexOutputSettings = (input: MultiplexOutputSettings, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - }; + return take(input, { + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + }); }; /** @@ -9005,10 +8282,10 @@ const se_MultiplexProgramChannelDestinationSettings = ( input: MultiplexProgramChannelDestinationSettings, context: __SerdeContext ): any => { - return { - ...(input.MultiplexId != null && { multiplexId: input.MultiplexId }), - ...(input.ProgramName != null && { programName: input.ProgramName }), - }; + return take(input, { + multiplexId: [, , `MultiplexId`], + programName: [, , `ProgramName`], + }); }; /** @@ -9018,536 +8295,418 @@ const se_MultiplexProgramServiceDescriptor = ( input: MultiplexProgramServiceDescriptor, context: __SerdeContext ): any => { - return { - ...(input.ProviderName != null && { providerName: input.ProviderName }), - ...(input.ServiceName != null && { serviceName: input.ServiceName }), - }; + return take(input, { + providerName: [, , `ProviderName`], + serviceName: [, , `ServiceName`], + }); }; /** * serializeAws_restJson1MultiplexProgramSettings */ const se_MultiplexProgramSettings = (input: MultiplexProgramSettings, context: __SerdeContext): any => { - return { - ...(input.PreferredChannelPipeline != null && { preferredChannelPipeline: input.PreferredChannelPipeline }), - ...(input.ProgramNumber != null && { programNumber: input.ProgramNumber }), - ...(input.ServiceDescriptor != null && { - serviceDescriptor: se_MultiplexProgramServiceDescriptor(input.ServiceDescriptor, context), - }), - ...(input.VideoSettings != null && { videoSettings: se_MultiplexVideoSettings(input.VideoSettings, context) }), - }; + return take(input, { + preferredChannelPipeline: [, , `PreferredChannelPipeline`], + programNumber: [, , `ProgramNumber`], + serviceDescriptor: [, (_) => se_MultiplexProgramServiceDescriptor(_, context), `ServiceDescriptor`], + videoSettings: [, (_) => se_MultiplexVideoSettings(_, context), `VideoSettings`], + }); }; /** * serializeAws_restJson1MultiplexSettings */ const se_MultiplexSettings = (input: MultiplexSettings, context: __SerdeContext): any => { - return { - ...(input.MaximumVideoBufferDelayMilliseconds != null && { - maximumVideoBufferDelayMilliseconds: input.MaximumVideoBufferDelayMilliseconds, - }), - ...(input.TransportStreamBitrate != null && { transportStreamBitrate: input.TransportStreamBitrate }), - ...(input.TransportStreamId != null && { transportStreamId: input.TransportStreamId }), - ...(input.TransportStreamReservedBitrate != null && { - transportStreamReservedBitrate: input.TransportStreamReservedBitrate, - }), - }; + return take(input, { + maximumVideoBufferDelayMilliseconds: [, , `MaximumVideoBufferDelayMilliseconds`], + transportStreamBitrate: [, , `TransportStreamBitrate`], + transportStreamId: [, , `TransportStreamId`], + transportStreamReservedBitrate: [, , `TransportStreamReservedBitrate`], + }); }; /** * serializeAws_restJson1MultiplexStatmuxVideoSettings */ const se_MultiplexStatmuxVideoSettings = (input: MultiplexStatmuxVideoSettings, context: __SerdeContext): any => { - return { - ...(input.MaximumBitrate != null && { maximumBitrate: input.MaximumBitrate }), - ...(input.MinimumBitrate != null && { minimumBitrate: input.MinimumBitrate }), - ...(input.Priority != null && { priority: input.Priority }), - }; + return take(input, { + maximumBitrate: [, , `MaximumBitrate`], + minimumBitrate: [, , `MinimumBitrate`], + priority: [, , `Priority`], + }); }; /** * serializeAws_restJson1MultiplexVideoSettings */ const se_MultiplexVideoSettings = (input: MultiplexVideoSettings, context: __SerdeContext): any => { - return { - ...(input.ConstantBitrate != null && { constantBitrate: input.ConstantBitrate }), - ...(input.StatmuxSettings != null && { - statmuxSettings: se_MultiplexStatmuxVideoSettings(input.StatmuxSettings, context), - }), - }; + return take(input, { + constantBitrate: [, , `ConstantBitrate`], + statmuxSettings: [, (_) => se_MultiplexStatmuxVideoSettings(_, context), `StatmuxSettings`], + }); }; /** * serializeAws_restJson1NetworkInputSettings */ const se_NetworkInputSettings = (input: NetworkInputSettings, context: __SerdeContext): any => { - return { - ...(input.HlsInputSettings != null && { hlsInputSettings: se_HlsInputSettings(input.HlsInputSettings, context) }), - ...(input.ServerValidation != null && { serverValidation: input.ServerValidation }), - }; + return take(input, { + hlsInputSettings: [, (_) => se_HlsInputSettings(_, context), `HlsInputSettings`], + serverValidation: [, , `ServerValidation`], + }); }; /** * serializeAws_restJson1NielsenCBET */ const se_NielsenCBET = (input: NielsenCBET, context: __SerdeContext): any => { - return { - ...(input.CbetCheckDigitString != null && { cbetCheckDigitString: input.CbetCheckDigitString }), - ...(input.CbetStepaside != null && { cbetStepaside: input.CbetStepaside }), - ...(input.Csid != null && { csid: input.Csid }), - }; + return take(input, { + cbetCheckDigitString: [, , `CbetCheckDigitString`], + cbetStepaside: [, , `CbetStepaside`], + csid: [, , `Csid`], + }); }; /** * serializeAws_restJson1NielsenConfiguration */ const se_NielsenConfiguration = (input: NielsenConfiguration, context: __SerdeContext): any => { - return { - ...(input.DistributorId != null && { distributorId: input.DistributorId }), - ...(input.NielsenPcmToId3Tagging != null && { nielsenPcmToId3Tagging: input.NielsenPcmToId3Tagging }), - }; + return take(input, { + distributorId: [, , `DistributorId`], + nielsenPcmToId3Tagging: [, , `NielsenPcmToId3Tagging`], + }); }; /** * serializeAws_restJson1NielsenNaesIiNw */ const se_NielsenNaesIiNw = (input: NielsenNaesIiNw, context: __SerdeContext): any => { - return { - ...(input.CheckDigitString != null && { checkDigitString: input.CheckDigitString }), - ...(input.Sid != null && { sid: __serializeFloat(input.Sid) }), - ...(input.Timezone != null && { timezone: input.Timezone }), - }; + return take(input, { + checkDigitString: [, , `CheckDigitString`], + sid: [, __serializeFloat, `Sid`], + timezone: [, , `Timezone`], + }); }; /** * serializeAws_restJson1NielsenWatermarksSettings */ const se_NielsenWatermarksSettings = (input: NielsenWatermarksSettings, context: __SerdeContext): any => { - return { - ...(input.NielsenCbetSettings != null && { - nielsenCbetSettings: se_NielsenCBET(input.NielsenCbetSettings, context), - }), - ...(input.NielsenDistributionType != null && { nielsenDistributionType: input.NielsenDistributionType }), - ...(input.NielsenNaesIiNwSettings != null && { - nielsenNaesIiNwSettings: se_NielsenNaesIiNw(input.NielsenNaesIiNwSettings, context), - }), - }; + return take(input, { + nielsenCbetSettings: [, (_) => se_NielsenCBET(_, context), `NielsenCbetSettings`], + nielsenDistributionType: [, , `NielsenDistributionType`], + nielsenNaesIiNwSettings: [, (_) => se_NielsenNaesIiNw(_, context), `NielsenNaesIiNwSettings`], + }); }; /** * serializeAws_restJson1Output */ const se_Output = (input: Output, context: __SerdeContext): any => { - return { - ...(input.AudioDescriptionNames != null && { - audioDescriptionNames: se___listOf__string(input.AudioDescriptionNames, context), - }), - ...(input.CaptionDescriptionNames != null && { - captionDescriptionNames: se___listOf__string(input.CaptionDescriptionNames, context), - }), - ...(input.OutputName != null && { outputName: input.OutputName }), - ...(input.OutputSettings != null && { outputSettings: se_OutputSettings(input.OutputSettings, context) }), - ...(input.VideoDescriptionName != null && { videoDescriptionName: input.VideoDescriptionName }), - }; + return take(input, { + audioDescriptionNames: [, _json, `AudioDescriptionNames`], + captionDescriptionNames: [, _json, `CaptionDescriptionNames`], + outputName: [, , `OutputName`], + outputSettings: [, (_) => se_OutputSettings(_, context), `OutputSettings`], + videoDescriptionName: [, , `VideoDescriptionName`], + }); }; /** * serializeAws_restJson1OutputDestination */ const se_OutputDestination = (input: OutputDestination, context: __SerdeContext): any => { - return { - ...(input.Id != null && { id: input.Id }), - ...(input.MediaPackageSettings != null && { - mediaPackageSettings: se___listOfMediaPackageOutputDestinationSettings(input.MediaPackageSettings, context), - }), - ...(input.MultiplexSettings != null && { - multiplexSettings: se_MultiplexProgramChannelDestinationSettings(input.MultiplexSettings, context), - }), - ...(input.Settings != null && { settings: se___listOfOutputDestinationSettings(input.Settings, context) }), - }; + return take(input, { + id: [, , `Id`], + mediaPackageSettings: [ + , + (_) => se___listOfMediaPackageOutputDestinationSettings(_, context), + `MediaPackageSettings`, + ], + multiplexSettings: [, (_) => se_MultiplexProgramChannelDestinationSettings(_, context), `MultiplexSettings`], + settings: [, (_) => se___listOfOutputDestinationSettings(_, context), `Settings`], + }); }; /** * serializeAws_restJson1OutputDestinationSettings */ const se_OutputDestinationSettings = (input: OutputDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.PasswordParam != null && { passwordParam: input.PasswordParam }), - ...(input.StreamName != null && { streamName: input.StreamName }), - ...(input.Url != null && { url: input.Url }), - ...(input.Username != null && { username: input.Username }), - }; + return take(input, { + passwordParam: [, , `PasswordParam`], + streamName: [, , `StreamName`], + url: [, , `Url`], + username: [, , `Username`], + }); }; /** * serializeAws_restJson1OutputGroup */ const se_OutputGroup = (input: OutputGroup, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - ...(input.OutputGroupSettings != null && { - outputGroupSettings: se_OutputGroupSettings(input.OutputGroupSettings, context), - }), - ...(input.Outputs != null && { outputs: se___listOfOutput(input.Outputs, context) }), - }; + return take(input, { + name: [, , `Name`], + outputGroupSettings: [, (_) => se_OutputGroupSettings(_, context), `OutputGroupSettings`], + outputs: [, (_) => se___listOfOutput(_, context), `Outputs`], + }); }; /** * serializeAws_restJson1OutputGroupSettings */ const se_OutputGroupSettings = (input: OutputGroupSettings, context: __SerdeContext): any => { - return { - ...(input.ArchiveGroupSettings != null && { - archiveGroupSettings: se_ArchiveGroupSettings(input.ArchiveGroupSettings, context), - }), - ...(input.FrameCaptureGroupSettings != null && { - frameCaptureGroupSettings: se_FrameCaptureGroupSettings(input.FrameCaptureGroupSettings, context), - }), - ...(input.HlsGroupSettings != null && { hlsGroupSettings: se_HlsGroupSettings(input.HlsGroupSettings, context) }), - ...(input.MediaPackageGroupSettings != null && { - mediaPackageGroupSettings: se_MediaPackageGroupSettings(input.MediaPackageGroupSettings, context), - }), - ...(input.MsSmoothGroupSettings != null && { - msSmoothGroupSettings: se_MsSmoothGroupSettings(input.MsSmoothGroupSettings, context), - }), - ...(input.MultiplexGroupSettings != null && { - multiplexGroupSettings: se_MultiplexGroupSettings(input.MultiplexGroupSettings, context), - }), - ...(input.RtmpGroupSettings != null && { - rtmpGroupSettings: se_RtmpGroupSettings(input.RtmpGroupSettings, context), - }), - ...(input.UdpGroupSettings != null && { udpGroupSettings: se_UdpGroupSettings(input.UdpGroupSettings, context) }), - }; + return take(input, { + archiveGroupSettings: [, (_) => se_ArchiveGroupSettings(_, context), `ArchiveGroupSettings`], + frameCaptureGroupSettings: [, (_) => se_FrameCaptureGroupSettings(_, context), `FrameCaptureGroupSettings`], + hlsGroupSettings: [, (_) => se_HlsGroupSettings(_, context), `HlsGroupSettings`], + mediaPackageGroupSettings: [, (_) => se_MediaPackageGroupSettings(_, context), `MediaPackageGroupSettings`], + msSmoothGroupSettings: [, (_) => se_MsSmoothGroupSettings(_, context), `MsSmoothGroupSettings`], + multiplexGroupSettings: [, _json, `MultiplexGroupSettings`], + rtmpGroupSettings: [, (_) => se_RtmpGroupSettings(_, context), `RtmpGroupSettings`], + udpGroupSettings: [, (_) => se_UdpGroupSettings(_, context), `UdpGroupSettings`], + }); }; /** * serializeAws_restJson1OutputLocationRef */ const se_OutputLocationRef = (input: OutputLocationRef, context: __SerdeContext): any => { - return { - ...(input.DestinationRefId != null && { destinationRefId: input.DestinationRefId }), - }; + return take(input, { + destinationRefId: [, , `DestinationRefId`], + }); }; /** * serializeAws_restJson1OutputSettings */ -const se_OutputSettings = (input: OutputSettings, context: __SerdeContext): any => { - return { - ...(input.ArchiveOutputSettings != null && { - archiveOutputSettings: se_ArchiveOutputSettings(input.ArchiveOutputSettings, context), - }), - ...(input.FrameCaptureOutputSettings != null && { - frameCaptureOutputSettings: se_FrameCaptureOutputSettings(input.FrameCaptureOutputSettings, context), - }), - ...(input.HlsOutputSettings != null && { - hlsOutputSettings: se_HlsOutputSettings(input.HlsOutputSettings, context), - }), - ...(input.MediaPackageOutputSettings != null && { - mediaPackageOutputSettings: se_MediaPackageOutputSettings(input.MediaPackageOutputSettings, context), - }), - ...(input.MsSmoothOutputSettings != null && { - msSmoothOutputSettings: se_MsSmoothOutputSettings(input.MsSmoothOutputSettings, context), - }), - ...(input.MultiplexOutputSettings != null && { - multiplexOutputSettings: se_MultiplexOutputSettings(input.MultiplexOutputSettings, context), - }), - ...(input.RtmpOutputSettings != null && { - rtmpOutputSettings: se_RtmpOutputSettings(input.RtmpOutputSettings, context), - }), - ...(input.UdpOutputSettings != null && { - udpOutputSettings: se_UdpOutputSettings(input.UdpOutputSettings, context), - }), - }; -}; - -/** - * serializeAws_restJson1PassThroughSettings - */ -const se_PassThroughSettings = (input: PassThroughSettings, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_restJson1PauseStateScheduleActionSettings - */ -const se_PauseStateScheduleActionSettings = (input: PauseStateScheduleActionSettings, context: __SerdeContext): any => { - return { - ...(input.Pipelines != null && { pipelines: se___listOfPipelinePauseStateSettings(input.Pipelines, context) }), - }; -}; - -/** - * serializeAws_restJson1PipelinePauseStateSettings - */ -const se_PipelinePauseStateSettings = (input: PipelinePauseStateSettings, context: __SerdeContext): any => { - return { - ...(input.PipelineId != null && { pipelineId: input.PipelineId }), - }; -}; - -/** - * serializeAws_restJson1RawSettings - */ -const se_RawSettings = (input: RawSettings, context: __SerdeContext): any => { - return {}; +const se_OutputSettings = (input: OutputSettings, context: __SerdeContext): any => { + return take(input, { + archiveOutputSettings: [, (_) => se_ArchiveOutputSettings(_, context), `ArchiveOutputSettings`], + frameCaptureOutputSettings: [, (_) => se_FrameCaptureOutputSettings(_, context), `FrameCaptureOutputSettings`], + hlsOutputSettings: [, (_) => se_HlsOutputSettings(_, context), `HlsOutputSettings`], + mediaPackageOutputSettings: [, _json, `MediaPackageOutputSettings`], + msSmoothOutputSettings: [, (_) => se_MsSmoothOutputSettings(_, context), `MsSmoothOutputSettings`], + multiplexOutputSettings: [, (_) => se_MultiplexOutputSettings(_, context), `MultiplexOutputSettings`], + rtmpOutputSettings: [, (_) => se_RtmpOutputSettings(_, context), `RtmpOutputSettings`], + udpOutputSettings: [, (_) => se_UdpOutputSettings(_, context), `UdpOutputSettings`], + }); }; +// se_PassThroughSettings omitted. + /** - * serializeAws_restJson1Rec601Settings + * serializeAws_restJson1PauseStateScheduleActionSettings */ -const se_Rec601Settings = (input: Rec601Settings, context: __SerdeContext): any => { - return {}; +const se_PauseStateScheduleActionSettings = (input: PauseStateScheduleActionSettings, context: __SerdeContext): any => { + return take(input, { + pipelines: [, (_) => se___listOfPipelinePauseStateSettings(_, context), `Pipelines`], + }); }; /** - * serializeAws_restJson1Rec709Settings + * serializeAws_restJson1PipelinePauseStateSettings */ -const se_Rec709Settings = (input: Rec709Settings, context: __SerdeContext): any => { - return {}; +const se_PipelinePauseStateSettings = (input: PipelinePauseStateSettings, context: __SerdeContext): any => { + return take(input, { + pipelineId: [, , `PipelineId`], + }); }; +// se_RawSettings omitted. + +// se_Rec601Settings omitted. + +// se_Rec709Settings omitted. + /** * serializeAws_restJson1RemixSettings */ const se_RemixSettings = (input: RemixSettings, context: __SerdeContext): any => { - return { - ...(input.ChannelMappings != null && { - channelMappings: se___listOfAudioChannelMapping(input.ChannelMappings, context), - }), - ...(input.ChannelsIn != null && { channelsIn: input.ChannelsIn }), - ...(input.ChannelsOut != null && { channelsOut: input.ChannelsOut }), - }; + return take(input, { + channelMappings: [, (_) => se___listOfAudioChannelMapping(_, context), `ChannelMappings`], + channelsIn: [, , `ChannelsIn`], + channelsOut: [, , `ChannelsOut`], + }); }; /** * serializeAws_restJson1RenewalSettings */ const se_RenewalSettings = (input: RenewalSettings, context: __SerdeContext): any => { - return { - ...(input.AutomaticRenewal != null && { automaticRenewal: input.AutomaticRenewal }), - ...(input.RenewalCount != null && { renewalCount: input.RenewalCount }), - }; + return take(input, { + automaticRenewal: [, , `AutomaticRenewal`], + renewalCount: [, , `RenewalCount`], + }); }; -/** - * serializeAws_restJson1RtmpCaptionInfoDestinationSettings - */ -const se_RtmpCaptionInfoDestinationSettings = ( - input: RtmpCaptionInfoDestinationSettings, - context: __SerdeContext -): any => { - return {}; -}; +// se_RtmpCaptionInfoDestinationSettings omitted. /** * serializeAws_restJson1RtmpGroupSettings */ const se_RtmpGroupSettings = (input: RtmpGroupSettings, context: __SerdeContext): any => { - return { - ...(input.AdMarkers != null && { adMarkers: se___listOfRtmpAdMarkers(input.AdMarkers, context) }), - ...(input.AuthenticationScheme != null && { authenticationScheme: input.AuthenticationScheme }), - ...(input.CacheFullBehavior != null && { cacheFullBehavior: input.CacheFullBehavior }), - ...(input.CacheLength != null && { cacheLength: input.CacheLength }), - ...(input.CaptionData != null && { captionData: input.CaptionData }), - ...(input.InputLossAction != null && { inputLossAction: input.InputLossAction }), - ...(input.RestartDelay != null && { restartDelay: input.RestartDelay }), - }; + return take(input, { + adMarkers: [, _json, `AdMarkers`], + authenticationScheme: [, , `AuthenticationScheme`], + cacheFullBehavior: [, , `CacheFullBehavior`], + cacheLength: [, , `CacheLength`], + captionData: [, , `CaptionData`], + inputLossAction: [, , `InputLossAction`], + restartDelay: [, , `RestartDelay`], + }); }; /** * serializeAws_restJson1RtmpOutputSettings */ const se_RtmpOutputSettings = (input: RtmpOutputSettings, context: __SerdeContext): any => { - return { - ...(input.CertificateMode != null && { certificateMode: input.CertificateMode }), - ...(input.ConnectionRetryInterval != null && { connectionRetryInterval: input.ConnectionRetryInterval }), - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - ...(input.NumRetries != null && { numRetries: input.NumRetries }), - }; + return take(input, { + certificateMode: [, , `CertificateMode`], + connectionRetryInterval: [, , `ConnectionRetryInterval`], + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + numRetries: [, , `NumRetries`], + }); }; /** * serializeAws_restJson1ScheduleAction */ const se_ScheduleAction = (input: ScheduleAction, context: __SerdeContext): any => { - return { - ...(input.ActionName != null && { actionName: input.ActionName }), - ...(input.ScheduleActionSettings != null && { - scheduleActionSettings: se_ScheduleActionSettings(input.ScheduleActionSettings, context), - }), - ...(input.ScheduleActionStartSettings != null && { - scheduleActionStartSettings: se_ScheduleActionStartSettings(input.ScheduleActionStartSettings, context), - }), - }; + return take(input, { + actionName: [, , `ActionName`], + scheduleActionSettings: [, (_) => se_ScheduleActionSettings(_, context), `ScheduleActionSettings`], + scheduleActionStartSettings: [, (_) => se_ScheduleActionStartSettings(_, context), `ScheduleActionStartSettings`], + }); }; /** * serializeAws_restJson1ScheduleActionSettings */ const se_ScheduleActionSettings = (input: ScheduleActionSettings, context: __SerdeContext): any => { - return { - ...(input.HlsId3SegmentTaggingSettings != null && { - hlsId3SegmentTaggingSettings: se_HlsId3SegmentTaggingScheduleActionSettings( - input.HlsId3SegmentTaggingSettings, - context - ), - }), - ...(input.HlsTimedMetadataSettings != null && { - hlsTimedMetadataSettings: se_HlsTimedMetadataScheduleActionSettings(input.HlsTimedMetadataSettings, context), - }), - ...(input.InputPrepareSettings != null && { - inputPrepareSettings: se_InputPrepareScheduleActionSettings(input.InputPrepareSettings, context), - }), - ...(input.InputSwitchSettings != null && { - inputSwitchSettings: se_InputSwitchScheduleActionSettings(input.InputSwitchSettings, context), - }), - ...(input.MotionGraphicsImageActivateSettings != null && { - motionGraphicsImageActivateSettings: se_MotionGraphicsActivateScheduleActionSettings( - input.MotionGraphicsImageActivateSettings, - context - ), - }), - ...(input.MotionGraphicsImageDeactivateSettings != null && { - motionGraphicsImageDeactivateSettings: se_MotionGraphicsDeactivateScheduleActionSettings( - input.MotionGraphicsImageDeactivateSettings, - context - ), - }), - ...(input.PauseStateSettings != null && { - pauseStateSettings: se_PauseStateScheduleActionSettings(input.PauseStateSettings, context), - }), - ...(input.Scte35InputSettings != null && { - scte35InputSettings: se_Scte35InputScheduleActionSettings(input.Scte35InputSettings, context), - }), - ...(input.Scte35ReturnToNetworkSettings != null && { - scte35ReturnToNetworkSettings: se_Scte35ReturnToNetworkScheduleActionSettings( - input.Scte35ReturnToNetworkSettings, - context - ), - }), - ...(input.Scte35SpliceInsertSettings != null && { - scte35SpliceInsertSettings: se_Scte35SpliceInsertScheduleActionSettings( - input.Scte35SpliceInsertSettings, - context - ), - }), - ...(input.Scte35TimeSignalSettings != null && { - scte35TimeSignalSettings: se_Scte35TimeSignalScheduleActionSettings(input.Scte35TimeSignalSettings, context), - }), - ...(input.StaticImageActivateSettings != null && { - staticImageActivateSettings: se_StaticImageActivateScheduleActionSettings( - input.StaticImageActivateSettings, - context - ), - }), - ...(input.StaticImageDeactivateSettings != null && { - staticImageDeactivateSettings: se_StaticImageDeactivateScheduleActionSettings( - input.StaticImageDeactivateSettings, - context - ), - }), - }; + return take(input, { + hlsId3SegmentTaggingSettings: [ + , + (_) => se_HlsId3SegmentTaggingScheduleActionSettings(_, context), + `HlsId3SegmentTaggingSettings`, + ], + hlsTimedMetadataSettings: [ + , + (_) => se_HlsTimedMetadataScheduleActionSettings(_, context), + `HlsTimedMetadataSettings`, + ], + inputPrepareSettings: [, (_) => se_InputPrepareScheduleActionSettings(_, context), `InputPrepareSettings`], + inputSwitchSettings: [, (_) => se_InputSwitchScheduleActionSettings(_, context), `InputSwitchSettings`], + motionGraphicsImageActivateSettings: [ + , + (_) => se_MotionGraphicsActivateScheduleActionSettings(_, context), + `MotionGraphicsImageActivateSettings`, + ], + motionGraphicsImageDeactivateSettings: [, _json, `MotionGraphicsImageDeactivateSettings`], + pauseStateSettings: [, (_) => se_PauseStateScheduleActionSettings(_, context), `PauseStateSettings`], + scte35InputSettings: [, (_) => se_Scte35InputScheduleActionSettings(_, context), `Scte35InputSettings`], + scte35ReturnToNetworkSettings: [ + , + (_) => se_Scte35ReturnToNetworkScheduleActionSettings(_, context), + `Scte35ReturnToNetworkSettings`, + ], + scte35SpliceInsertSettings: [ + , + (_) => se_Scte35SpliceInsertScheduleActionSettings(_, context), + `Scte35SpliceInsertSettings`, + ], + scte35TimeSignalSettings: [ + , + (_) => se_Scte35TimeSignalScheduleActionSettings(_, context), + `Scte35TimeSignalSettings`, + ], + staticImageActivateSettings: [ + , + (_) => se_StaticImageActivateScheduleActionSettings(_, context), + `StaticImageActivateSettings`, + ], + staticImageDeactivateSettings: [ + , + (_) => se_StaticImageDeactivateScheduleActionSettings(_, context), + `StaticImageDeactivateSettings`, + ], + }); }; /** * serializeAws_restJson1ScheduleActionStartSettings */ const se_ScheduleActionStartSettings = (input: ScheduleActionStartSettings, context: __SerdeContext): any => { - return { - ...(input.FixedModeScheduleActionStartSettings != null && { - fixedModeScheduleActionStartSettings: se_FixedModeScheduleActionStartSettings( - input.FixedModeScheduleActionStartSettings, - context - ), - }), - ...(input.FollowModeScheduleActionStartSettings != null && { - followModeScheduleActionStartSettings: se_FollowModeScheduleActionStartSettings( - input.FollowModeScheduleActionStartSettings, - context - ), - }), - ...(input.ImmediateModeScheduleActionStartSettings != null && { - immediateModeScheduleActionStartSettings: se_ImmediateModeScheduleActionStartSettings( - input.ImmediateModeScheduleActionStartSettings, - context - ), - }), - }; + return take(input, { + fixedModeScheduleActionStartSettings: [ + , + (_) => se_FixedModeScheduleActionStartSettings(_, context), + `FixedModeScheduleActionStartSettings`, + ], + followModeScheduleActionStartSettings: [ + , + (_) => se_FollowModeScheduleActionStartSettings(_, context), + `FollowModeScheduleActionStartSettings`, + ], + immediateModeScheduleActionStartSettings: [, _json, `ImmediateModeScheduleActionStartSettings`], + }); }; -/** - * serializeAws_restJson1Scte20PlusEmbeddedDestinationSettings - */ -const se_Scte20PlusEmbeddedDestinationSettings = ( - input: Scte20PlusEmbeddedDestinationSettings, - context: __SerdeContext -): any => { - return {}; -}; +// se_Scte20PlusEmbeddedDestinationSettings omitted. /** * serializeAws_restJson1Scte20SourceSettings */ const se_Scte20SourceSettings = (input: Scte20SourceSettings, context: __SerdeContext): any => { - return { - ...(input.Convert608To708 != null && { convert608To708: input.Convert608To708 }), - ...(input.Source608ChannelNumber != null && { source608ChannelNumber: input.Source608ChannelNumber }), - }; + return take(input, { + convert608To708: [, , `Convert608To708`], + source608ChannelNumber: [, , `Source608ChannelNumber`], + }); }; -/** - * serializeAws_restJson1Scte27DestinationSettings - */ -const se_Scte27DestinationSettings = (input: Scte27DestinationSettings, context: __SerdeContext): any => { - return {}; -}; +// se_Scte27DestinationSettings omitted. /** * serializeAws_restJson1Scte27SourceSettings */ const se_Scte27SourceSettings = (input: Scte27SourceSettings, context: __SerdeContext): any => { - return { - ...(input.OcrLanguage != null && { ocrLanguage: input.OcrLanguage }), - ...(input.Pid != null && { pid: input.Pid }), - }; + return take(input, { + ocrLanguage: [, , `OcrLanguage`], + pid: [, , `Pid`], + }); }; /** * serializeAws_restJson1Scte35DeliveryRestrictions */ const se_Scte35DeliveryRestrictions = (input: Scte35DeliveryRestrictions, context: __SerdeContext): any => { - return { - ...(input.ArchiveAllowedFlag != null && { archiveAllowedFlag: input.ArchiveAllowedFlag }), - ...(input.DeviceRestrictions != null && { deviceRestrictions: input.DeviceRestrictions }), - ...(input.NoRegionalBlackoutFlag != null && { noRegionalBlackoutFlag: input.NoRegionalBlackoutFlag }), - ...(input.WebDeliveryAllowedFlag != null && { webDeliveryAllowedFlag: input.WebDeliveryAllowedFlag }), - }; + return take(input, { + archiveAllowedFlag: [, , `ArchiveAllowedFlag`], + deviceRestrictions: [, , `DeviceRestrictions`], + noRegionalBlackoutFlag: [, , `NoRegionalBlackoutFlag`], + webDeliveryAllowedFlag: [, , `WebDeliveryAllowedFlag`], + }); }; /** * serializeAws_restJson1Scte35Descriptor */ const se_Scte35Descriptor = (input: Scte35Descriptor, context: __SerdeContext): any => { - return { - ...(input.Scte35DescriptorSettings != null && { - scte35DescriptorSettings: se_Scte35DescriptorSettings(input.Scte35DescriptorSettings, context), - }), - }; + return take(input, { + scte35DescriptorSettings: [, (_) => se_Scte35DescriptorSettings(_, context), `Scte35DescriptorSettings`], + }); }; /** * serializeAws_restJson1Scte35DescriptorSettings */ const se_Scte35DescriptorSettings = (input: Scte35DescriptorSettings, context: __SerdeContext): any => { - return { - ...(input.SegmentationDescriptorScte35DescriptorSettings != null && { - segmentationDescriptorScte35DescriptorSettings: se_Scte35SegmentationDescriptor( - input.SegmentationDescriptorScte35DescriptorSettings, - context - ), - }), - }; + return take(input, { + segmentationDescriptorScte35DescriptorSettings: [ + , + (_) => se_Scte35SegmentationDescriptor(_, context), + `SegmentationDescriptorScte35DescriptorSettings`, + ], + }); }; /** @@ -9557,12 +8716,10 @@ const se_Scte35InputScheduleActionSettings = ( input: Scte35InputScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.InputAttachmentNameReference != null && { - inputAttachmentNameReference: input.InputAttachmentNameReference, - }), - ...(input.Mode != null && { mode: input.Mode }), - }; + return take(input, { + inputAttachmentNameReference: [, , `InputAttachmentNameReference`], + mode: [, , `Mode`], + }); }; /** @@ -9572,43 +8729,39 @@ const se_Scte35ReturnToNetworkScheduleActionSettings = ( input: Scte35ReturnToNetworkScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.SpliceEventId != null && { spliceEventId: input.SpliceEventId }), - }; + return take(input, { + spliceEventId: [, , `SpliceEventId`], + }); }; /** * serializeAws_restJson1Scte35SegmentationDescriptor */ const se_Scte35SegmentationDescriptor = (input: Scte35SegmentationDescriptor, context: __SerdeContext): any => { - return { - ...(input.DeliveryRestrictions != null && { - deliveryRestrictions: se_Scte35DeliveryRestrictions(input.DeliveryRestrictions, context), - }), - ...(input.SegmentNum != null && { segmentNum: input.SegmentNum }), - ...(input.SegmentationCancelIndicator != null && { - segmentationCancelIndicator: input.SegmentationCancelIndicator, - }), - ...(input.SegmentationDuration != null && { segmentationDuration: input.SegmentationDuration }), - ...(input.SegmentationEventId != null && { segmentationEventId: input.SegmentationEventId }), - ...(input.SegmentationTypeId != null && { segmentationTypeId: input.SegmentationTypeId }), - ...(input.SegmentationUpid != null && { segmentationUpid: input.SegmentationUpid }), - ...(input.SegmentationUpidType != null && { segmentationUpidType: input.SegmentationUpidType }), - ...(input.SegmentsExpected != null && { segmentsExpected: input.SegmentsExpected }), - ...(input.SubSegmentNum != null && { subSegmentNum: input.SubSegmentNum }), - ...(input.SubSegmentsExpected != null && { subSegmentsExpected: input.SubSegmentsExpected }), - }; + return take(input, { + deliveryRestrictions: [, (_) => se_Scte35DeliveryRestrictions(_, context), `DeliveryRestrictions`], + segmentNum: [, , `SegmentNum`], + segmentationCancelIndicator: [, , `SegmentationCancelIndicator`], + segmentationDuration: [, , `SegmentationDuration`], + segmentationEventId: [, , `SegmentationEventId`], + segmentationTypeId: [, , `SegmentationTypeId`], + segmentationUpid: [, , `SegmentationUpid`], + segmentationUpidType: [, , `SegmentationUpidType`], + segmentsExpected: [, , `SegmentsExpected`], + subSegmentNum: [, , `SubSegmentNum`], + subSegmentsExpected: [, , `SubSegmentsExpected`], + }); }; /** * serializeAws_restJson1Scte35SpliceInsert */ const se_Scte35SpliceInsert = (input: Scte35SpliceInsert, context: __SerdeContext): any => { - return { - ...(input.AdAvailOffset != null && { adAvailOffset: input.AdAvailOffset }), - ...(input.NoRegionalBlackoutFlag != null && { noRegionalBlackoutFlag: input.NoRegionalBlackoutFlag }), - ...(input.WebDeliveryAllowedFlag != null && { webDeliveryAllowedFlag: input.WebDeliveryAllowedFlag }), - }; + return take(input, { + adAvailOffset: [, , `AdAvailOffset`], + noRegionalBlackoutFlag: [, , `NoRegionalBlackoutFlag`], + webDeliveryAllowedFlag: [, , `WebDeliveryAllowedFlag`], + }); }; /** @@ -9618,21 +8771,21 @@ const se_Scte35SpliceInsertScheduleActionSettings = ( input: Scte35SpliceInsertScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.Duration != null && { duration: input.Duration }), - ...(input.SpliceEventId != null && { spliceEventId: input.SpliceEventId }), - }; + return take(input, { + duration: [, , `Duration`], + spliceEventId: [, , `SpliceEventId`], + }); }; /** * serializeAws_restJson1Scte35TimeSignalApos */ const se_Scte35TimeSignalApos = (input: Scte35TimeSignalApos, context: __SerdeContext): any => { - return { - ...(input.AdAvailOffset != null && { adAvailOffset: input.AdAvailOffset }), - ...(input.NoRegionalBlackoutFlag != null && { noRegionalBlackoutFlag: input.NoRegionalBlackoutFlag }), - ...(input.WebDeliveryAllowedFlag != null && { webDeliveryAllowedFlag: input.WebDeliveryAllowedFlag }), - }; + return take(input, { + adAvailOffset: [, , `AdAvailOffset`], + noRegionalBlackoutFlag: [, , `NoRegionalBlackoutFlag`], + webDeliveryAllowedFlag: [, , `WebDeliveryAllowedFlag`], + }); }; /** @@ -9642,37 +8795,30 @@ const se_Scte35TimeSignalScheduleActionSettings = ( input: Scte35TimeSignalScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.Scte35Descriptors != null && { - scte35Descriptors: se___listOfScte35Descriptor(input.Scte35Descriptors, context), - }), - }; + return take(input, { + scte35Descriptors: [, (_) => se___listOfScte35Descriptor(_, context), `Scte35Descriptors`], + }); }; -/** - * serializeAws_restJson1SmpteTtDestinationSettings - */ -const se_SmpteTtDestinationSettings = (input: SmpteTtDestinationSettings, context: __SerdeContext): any => { - return {}; -}; +// se_SmpteTtDestinationSettings omitted. /** * serializeAws_restJson1StandardHlsSettings */ const se_StandardHlsSettings = (input: StandardHlsSettings, context: __SerdeContext): any => { - return { - ...(input.AudioRenditionSets != null && { audioRenditionSets: input.AudioRenditionSets }), - ...(input.M3u8Settings != null && { m3u8Settings: se_M3u8Settings(input.M3u8Settings, context) }), - }; + return take(input, { + audioRenditionSets: [, , `AudioRenditionSets`], + m3u8Settings: [, (_) => se_M3u8Settings(_, context), `M3u8Settings`], + }); }; /** * serializeAws_restJson1StartTimecode */ const se_StartTimecode = (input: StartTimecode, context: __SerdeContext): any => { - return { - ...(input.Timecode != null && { timecode: input.Timecode }), - }; + return take(input, { + timecode: [, , `Timecode`], + }); }; /** @@ -9682,18 +8828,18 @@ const se_StaticImageActivateScheduleActionSettings = ( input: StaticImageActivateScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.Duration != null && { duration: input.Duration }), - ...(input.FadeIn != null && { fadeIn: input.FadeIn }), - ...(input.FadeOut != null && { fadeOut: input.FadeOut }), - ...(input.Height != null && { height: input.Height }), - ...(input.Image != null && { image: se_InputLocation(input.Image, context) }), - ...(input.ImageX != null && { imageX: input.ImageX }), - ...(input.ImageY != null && { imageY: input.ImageY }), - ...(input.Layer != null && { layer: input.Layer }), - ...(input.Opacity != null && { opacity: input.Opacity }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + duration: [, , `Duration`], + fadeIn: [, , `FadeIn`], + fadeOut: [, , `FadeOut`], + height: [, , `Height`], + image: [, (_) => se_InputLocation(_, context), `Image`], + imageX: [, , `ImageX`], + imageY: [, , `ImageY`], + layer: [, , `Layer`], + opacity: [, , `Opacity`], + width: [, , `Width`], + }); }; /** @@ -9703,294 +8849,238 @@ const se_StaticImageDeactivateScheduleActionSettings = ( input: StaticImageDeactivateScheduleActionSettings, context: __SerdeContext ): any => { - return { - ...(input.FadeOut != null && { fadeOut: input.FadeOut }), - ...(input.Layer != null && { layer: input.Layer }), - }; + return take(input, { + fadeOut: [, , `FadeOut`], + layer: [, , `Layer`], + }); }; /** * serializeAws_restJson1StaticKeySettings */ const se_StaticKeySettings = (input: StaticKeySettings, context: __SerdeContext): any => { - return { - ...(input.KeyProviderServer != null && { keyProviderServer: se_InputLocation(input.KeyProviderServer, context) }), - ...(input.StaticKeyValue != null && { staticKeyValue: input.StaticKeyValue }), - }; + return take(input, { + keyProviderServer: [, (_) => se_InputLocation(_, context), `KeyProviderServer`], + staticKeyValue: [, , `StaticKeyValue`], + }); }; /** * serializeAws_restJson1StopTimecode */ const se_StopTimecode = (input: StopTimecode, context: __SerdeContext): any => { - return { - ...(input.LastFrameClippingBehavior != null && { lastFrameClippingBehavior: input.LastFrameClippingBehavior }), - ...(input.Timecode != null && { timecode: input.Timecode }), - }; + return take(input, { + lastFrameClippingBehavior: [, , `LastFrameClippingBehavior`], + timecode: [, , `Timecode`], + }); }; -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1TeletextDestinationSettings - */ -const se_TeletextDestinationSettings = (input: TeletextDestinationSettings, context: __SerdeContext): any => { - return {}; -}; +// se_TeletextDestinationSettings omitted. /** * serializeAws_restJson1TeletextSourceSettings */ const se_TeletextSourceSettings = (input: TeletextSourceSettings, context: __SerdeContext): any => { - return { - ...(input.OutputRectangle != null && { outputRectangle: se_CaptionRectangle(input.OutputRectangle, context) }), - ...(input.PageNumber != null && { pageNumber: input.PageNumber }), - }; + return take(input, { + outputRectangle: [, (_) => se_CaptionRectangle(_, context), `OutputRectangle`], + pageNumber: [, , `PageNumber`], + }); }; /** * serializeAws_restJson1TemporalFilterSettings */ const se_TemporalFilterSettings = (input: TemporalFilterSettings, context: __SerdeContext): any => { - return { - ...(input.PostFilterSharpening != null && { postFilterSharpening: input.PostFilterSharpening }), - ...(input.Strength != null && { strength: input.Strength }), - }; + return take(input, { + postFilterSharpening: [, , `PostFilterSharpening`], + strength: [, , `Strength`], + }); }; /** * serializeAws_restJson1TimecodeBurninSettings */ const se_TimecodeBurninSettings = (input: TimecodeBurninSettings, context: __SerdeContext): any => { - return { - ...(input.FontSize != null && { fontSize: input.FontSize }), - ...(input.Position != null && { position: input.Position }), - ...(input.Prefix != null && { prefix: input.Prefix }), - }; + return take(input, { + fontSize: [, , `FontSize`], + position: [, , `Position`], + prefix: [, , `Prefix`], + }); }; /** * serializeAws_restJson1TimecodeConfig */ const se_TimecodeConfig = (input: TimecodeConfig, context: __SerdeContext): any => { - return { - ...(input.Source != null && { source: input.Source }), - ...(input.SyncThreshold != null && { syncThreshold: input.SyncThreshold }), - }; + return take(input, { + source: [, , `Source`], + syncThreshold: [, , `SyncThreshold`], + }); }; /** * serializeAws_restJson1TtmlDestinationSettings */ const se_TtmlDestinationSettings = (input: TtmlDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.StyleControl != null && { styleControl: input.StyleControl }), - }; + return take(input, { + styleControl: [, , `StyleControl`], + }); }; /** * serializeAws_restJson1UdpContainerSettings */ const se_UdpContainerSettings = (input: UdpContainerSettings, context: __SerdeContext): any => { - return { - ...(input.M2tsSettings != null && { m2tsSettings: se_M2tsSettings(input.M2tsSettings, context) }), - }; + return take(input, { + m2tsSettings: [, (_) => se_M2tsSettings(_, context), `M2tsSettings`], + }); }; /** * serializeAws_restJson1UdpGroupSettings */ const se_UdpGroupSettings = (input: UdpGroupSettings, context: __SerdeContext): any => { - return { - ...(input.InputLossAction != null && { inputLossAction: input.InputLossAction }), - ...(input.TimedMetadataId3Frame != null && { timedMetadataId3Frame: input.TimedMetadataId3Frame }), - ...(input.TimedMetadataId3Period != null && { timedMetadataId3Period: input.TimedMetadataId3Period }), - }; + return take(input, { + inputLossAction: [, , `InputLossAction`], + timedMetadataId3Frame: [, , `TimedMetadataId3Frame`], + timedMetadataId3Period: [, , `TimedMetadataId3Period`], + }); }; /** * serializeAws_restJson1UdpOutputSettings */ const se_UdpOutputSettings = (input: UdpOutputSettings, context: __SerdeContext): any => { - return { - ...(input.BufferMsec != null && { bufferMsec: input.BufferMsec }), - ...(input.ContainerSettings != null && { - containerSettings: se_UdpContainerSettings(input.ContainerSettings, context), - }), - ...(input.Destination != null && { destination: se_OutputLocationRef(input.Destination, context) }), - ...(input.FecOutputSettings != null && { - fecOutputSettings: se_FecOutputSettings(input.FecOutputSettings, context), - }), - }; + return take(input, { + bufferMsec: [, , `BufferMsec`], + containerSettings: [, (_) => se_UdpContainerSettings(_, context), `ContainerSettings`], + destination: [, (_) => se_OutputLocationRef(_, context), `Destination`], + fecOutputSettings: [, (_) => se_FecOutputSettings(_, context), `FecOutputSettings`], + }); }; /** * serializeAws_restJson1VideoBlackFailoverSettings */ const se_VideoBlackFailoverSettings = (input: VideoBlackFailoverSettings, context: __SerdeContext): any => { - return { - ...(input.BlackDetectThreshold != null && { blackDetectThreshold: __serializeFloat(input.BlackDetectThreshold) }), - ...(input.VideoBlackThresholdMsec != null && { videoBlackThresholdMsec: input.VideoBlackThresholdMsec }), - }; + return take(input, { + blackDetectThreshold: [, __serializeFloat, `BlackDetectThreshold`], + videoBlackThresholdMsec: [, , `VideoBlackThresholdMsec`], + }); }; /** * serializeAws_restJson1VideoCodecSettings */ const se_VideoCodecSettings = (input: VideoCodecSettings, context: __SerdeContext): any => { - return { - ...(input.FrameCaptureSettings != null && { - frameCaptureSettings: se_FrameCaptureSettings(input.FrameCaptureSettings, context), - }), - ...(input.H264Settings != null && { h264Settings: se_H264Settings(input.H264Settings, context) }), - ...(input.H265Settings != null && { h265Settings: se_H265Settings(input.H265Settings, context) }), - ...(input.Mpeg2Settings != null && { mpeg2Settings: se_Mpeg2Settings(input.Mpeg2Settings, context) }), - }; + return take(input, { + frameCaptureSettings: [, (_) => se_FrameCaptureSettings(_, context), `FrameCaptureSettings`], + h264Settings: [, (_) => se_H264Settings(_, context), `H264Settings`], + h265Settings: [, (_) => se_H265Settings(_, context), `H265Settings`], + mpeg2Settings: [, (_) => se_Mpeg2Settings(_, context), `Mpeg2Settings`], + }); }; /** * serializeAws_restJson1VideoDescription */ const se_VideoDescription = (input: VideoDescription, context: __SerdeContext): any => { - return { - ...(input.CodecSettings != null && { codecSettings: se_VideoCodecSettings(input.CodecSettings, context) }), - ...(input.Height != null && { height: input.Height }), - ...(input.Name != null && { name: input.Name }), - ...(input.RespondToAfd != null && { respondToAfd: input.RespondToAfd }), - ...(input.ScalingBehavior != null && { scalingBehavior: input.ScalingBehavior }), - ...(input.Sharpness != null && { sharpness: input.Sharpness }), - ...(input.Width != null && { width: input.Width }), - }; + return take(input, { + codecSettings: [, (_) => se_VideoCodecSettings(_, context), `CodecSettings`], + height: [, , `Height`], + name: [, , `Name`], + respondToAfd: [, , `RespondToAfd`], + scalingBehavior: [, , `ScalingBehavior`], + sharpness: [, , `Sharpness`], + width: [, , `Width`], + }); }; /** * serializeAws_restJson1VideoSelector */ const se_VideoSelector = (input: VideoSelector, context: __SerdeContext): any => { - return { - ...(input.ColorSpace != null && { colorSpace: input.ColorSpace }), - ...(input.ColorSpaceSettings != null && { - colorSpaceSettings: se_VideoSelectorColorSpaceSettings(input.ColorSpaceSettings, context), - }), - ...(input.ColorSpaceUsage != null && { colorSpaceUsage: input.ColorSpaceUsage }), - ...(input.SelectorSettings != null && { - selectorSettings: se_VideoSelectorSettings(input.SelectorSettings, context), - }), - }; + return take(input, { + colorSpace: [, , `ColorSpace`], + colorSpaceSettings: [, (_) => se_VideoSelectorColorSpaceSettings(_, context), `ColorSpaceSettings`], + colorSpaceUsage: [, , `ColorSpaceUsage`], + selectorSettings: [, (_) => se_VideoSelectorSettings(_, context), `SelectorSettings`], + }); }; /** * serializeAws_restJson1VideoSelectorColorSpaceSettings */ const se_VideoSelectorColorSpaceSettings = (input: VideoSelectorColorSpaceSettings, context: __SerdeContext): any => { - return { - ...(input.Hdr10Settings != null && { hdr10Settings: se_Hdr10Settings(input.Hdr10Settings, context) }), - }; + return take(input, { + hdr10Settings: [, (_) => se_Hdr10Settings(_, context), `Hdr10Settings`], + }); }; /** * serializeAws_restJson1VideoSelectorPid */ const se_VideoSelectorPid = (input: VideoSelectorPid, context: __SerdeContext): any => { - return { - ...(input.Pid != null && { pid: input.Pid }), - }; + return take(input, { + pid: [, , `Pid`], + }); }; /** * serializeAws_restJson1VideoSelectorProgramId */ const se_VideoSelectorProgramId = (input: VideoSelectorProgramId, context: __SerdeContext): any => { - return { - ...(input.ProgramId != null && { programId: input.ProgramId }), - }; + return take(input, { + programId: [, , `ProgramId`], + }); }; /** * serializeAws_restJson1VideoSelectorSettings */ const se_VideoSelectorSettings = (input: VideoSelectorSettings, context: __SerdeContext): any => { - return { - ...(input.VideoSelectorPid != null && { videoSelectorPid: se_VideoSelectorPid(input.VideoSelectorPid, context) }), - ...(input.VideoSelectorProgramId != null && { - videoSelectorProgramId: se_VideoSelectorProgramId(input.VideoSelectorProgramId, context), - }), - }; + return take(input, { + videoSelectorPid: [, (_) => se_VideoSelectorPid(_, context), `VideoSelectorPid`], + videoSelectorProgramId: [, (_) => se_VideoSelectorProgramId(_, context), `VideoSelectorProgramId`], + }); }; /** * serializeAws_restJson1VpcOutputSettings */ const se_VpcOutputSettings = (input: VpcOutputSettings, context: __SerdeContext): any => { - return { - ...(input.PublicAddressAllocationIds != null && { - publicAddressAllocationIds: se___listOf__string(input.PublicAddressAllocationIds, context), - }), - ...(input.SecurityGroupIds != null && { securityGroupIds: se___listOf__string(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { subnetIds: se___listOf__string(input.SubnetIds, context) }), - }; + return take(input, { + publicAddressAllocationIds: [, _json, `PublicAddressAllocationIds`], + securityGroupIds: [, _json, `SecurityGroupIds`], + subnetIds: [, _json, `SubnetIds`], + }); }; /** * serializeAws_restJson1WavSettings */ const se_WavSettings = (input: WavSettings, context: __SerdeContext): any => { - return { - ...(input.BitDepth != null && { bitDepth: __serializeFloat(input.BitDepth) }), - ...(input.CodingMode != null && { codingMode: input.CodingMode }), - ...(input.SampleRate != null && { sampleRate: __serializeFloat(input.SampleRate) }), - }; + return take(input, { + bitDepth: [, __serializeFloat, `BitDepth`], + codingMode: [, , `CodingMode`], + sampleRate: [, __serializeFloat, `SampleRate`], + }); }; /** * serializeAws_restJson1WebvttDestinationSettings */ const se_WebvttDestinationSettings = (input: WebvttDestinationSettings, context: __SerdeContext): any => { - return { - ...(input.StyleControl != null && { styleControl: input.StyleControl }), - }; + return take(input, { + styleControl: [, , `StyleControl`], + }); }; -/** - * deserializeAws_restJson1__listOf__integer - */ -const de___listOf__integer = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de___listOf__integer omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfAudioChannelMapping @@ -9999,9 +9089,6 @@ const de___listOfAudioChannelMapping = (output: any, context: __SerdeContext): A const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AudioChannelMapping(entry, context); }); return retVal; @@ -10014,9 +9101,6 @@ const de___listOfAudioDescription = (output: any, context: __SerdeContext): Audi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AudioDescription(entry, context); }); return retVal; @@ -10029,9 +9113,6 @@ const de___listOfAudioSelector = (output: any, context: __SerdeContext): AudioSe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AudioSelector(entry, context); }); return retVal; @@ -10044,9 +9125,6 @@ const de___listOfAudioTrack = (output: any, context: __SerdeContext): AudioTrack const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AudioTrack(entry, context); }); return retVal; @@ -10059,9 +9137,6 @@ const de___listOfBatchFailedResultModel = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchFailedResultModel(entry, context); }); return retVal; @@ -10074,9 +9149,6 @@ const de___listOfBatchSuccessfulResultModel = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchSuccessfulResultModel(entry, context); }); return retVal; @@ -10089,9 +9161,6 @@ const de___listOfCaptionDescription = (output: any, context: __SerdeContext): Ca const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CaptionDescription(entry, context); }); return retVal; @@ -10104,9 +9173,6 @@ const de___listOfCaptionLanguageMapping = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CaptionLanguageMapping(entry, context); }); return retVal; @@ -10119,9 +9185,6 @@ const de___listOfCaptionSelector = (output: any, context: __SerdeContext): Capti const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CaptionSelector(entry, context); }); return retVal; @@ -10134,9 +9197,6 @@ const de___listOfChannelEgressEndpoint = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelEgressEndpoint(entry, context); }); return retVal; @@ -10149,9 +9209,6 @@ const de___listOfChannelSummary = (output: any, context: __SerdeContext): Channe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChannelSummary(entry, context); }); return retVal; @@ -10164,28 +9221,12 @@ const de___listOfFailoverCondition = (output: any, context: __SerdeContext): Fai const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FailoverCondition(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfHlsAdMarkers - */ -const de___listOfHlsAdMarkers = (output: any, context: __SerdeContext): (HlsAdMarkers | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfHlsAdMarkers omitted. /** * deserializeAws_restJson1__listOfInput @@ -10194,9 +9235,6 @@ const de___listOfInput = (output: any, context: __SerdeContext): Input[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Input(entry, context); }); return retVal; @@ -10209,9 +9247,6 @@ const de___listOfInputAttachment = (output: any, context: __SerdeContext): Input const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputAttachment(entry, context); }); return retVal; @@ -10224,9 +9259,6 @@ const de___listOfInputChannelLevel = (output: any, context: __SerdeContext): Inp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputChannelLevel(entry, context); }); return retVal; @@ -10239,9 +9271,6 @@ const de___listOfInputDestination = (output: any, context: __SerdeContext): Inpu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputDestination(entry, context); }); return retVal; @@ -10254,9 +9283,6 @@ const de___listOfInputDeviceSettings = (output: any, context: __SerdeContext): I const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputDeviceSettings(entry, context); }); return retVal; @@ -10269,9 +9295,6 @@ const de___listOfInputDeviceSummary = (output: any, context: __SerdeContext): In const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputDeviceSummary(entry, context); }); return retVal; @@ -10284,9 +9307,6 @@ const de___listOfInputSecurityGroup = (output: any, context: __SerdeContext): In const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputSecurityGroup(entry, context); }); return retVal; @@ -10299,9 +9319,6 @@ const de___listOfInputSource = (output: any, context: __SerdeContext): InputSour const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputSource(entry, context); }); return retVal; @@ -10314,9 +9331,6 @@ const de___listOfInputWhitelistRule = (output: any, context: __SerdeContext): In const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InputWhitelistRule(entry, context); }); return retVal; @@ -10329,9 +9343,6 @@ const de___listOfMediaConnectFlow = (output: any, context: __SerdeContext): Medi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MediaConnectFlow(entry, context); }); return retVal; @@ -10347,9 +9358,6 @@ const de___listOfMediaPackageOutputDestinationSettings = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MediaPackageOutputDestinationSettings(entry, context); }); return retVal; @@ -10362,9 +9370,6 @@ const de___listOfMultiplexOutputDestination = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MultiplexOutputDestination(entry, context); }); return retVal; @@ -10380,9 +9385,6 @@ const de___listOfMultiplexProgramPipelineDetail = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MultiplexProgramPipelineDetail(entry, context); }); return retVal; @@ -10395,9 +9397,6 @@ const de___listOfMultiplexProgramSummary = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MultiplexProgramSummary(entry, context); }); return retVal; @@ -10410,9 +9409,6 @@ const de___listOfMultiplexSummary = (output: any, context: __SerdeContext): Mult const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MultiplexSummary(entry, context); }); return retVal; @@ -10425,9 +9421,6 @@ const de___listOfOffering = (output: any, context: __SerdeContext): Offering[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Offering(entry, context); }); return retVal; @@ -10440,9 +9433,6 @@ const de___listOfOutput = (output: any, context: __SerdeContext): Output[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Output(entry, context); }); return retVal; @@ -10455,9 +9445,6 @@ const de___listOfOutputDestination = (output: any, context: __SerdeContext): Out const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputDestination(entry, context); }); return retVal; @@ -10470,9 +9457,6 @@ const de___listOfOutputDestinationSettings = (output: any, context: __SerdeConte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputDestinationSettings(entry, context); }); return retVal; @@ -10485,9 +9469,6 @@ const de___listOfOutputGroup = (output: any, context: __SerdeContext): OutputGro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OutputGroup(entry, context); }); return retVal; @@ -10500,9 +9481,6 @@ const de___listOfPipelineDetail = (output: any, context: __SerdeContext): Pipeli const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PipelineDetail(entry, context); }); return retVal; @@ -10515,9 +9493,6 @@ const de___listOfPipelinePauseStateSettings = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PipelinePauseStateSettings(entry, context); }); return retVal; @@ -10530,28 +9505,12 @@ const de___listOfReservation = (output: any, context: __SerdeContext): Reservati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Reservation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfRtmpAdMarkers - */ -const de___listOfRtmpAdMarkers = (output: any, context: __SerdeContext): (RtmpAdMarkers | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfRtmpAdMarkers omitted. /** * deserializeAws_restJson1__listOfScheduleAction @@ -10560,9 +9519,6 @@ const de___listOfScheduleAction = (output: any, context: __SerdeContext): Schedu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduleAction(entry, context); }); return retVal; @@ -10575,9 +9531,6 @@ const de___listOfScte35Descriptor = (output: any, context: __SerdeContext): Scte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Scte35Descriptor(entry, context); }); return retVal; @@ -10593,9 +9546,6 @@ const de___listOfTransferringInputDeviceSummary = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TransferringInputDeviceSummary(entry, context); }); return retVal; @@ -10608,9 +9558,6 @@ const de___listOfValidationError = (output: any, context: __SerdeContext): Valid const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ValidationError(entry, context); }); return retVal; @@ -10623,9 +9570,6 @@ const de___listOfVideoDescription = (output: any, context: __SerdeContext): Vide const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VideoDescription(entry, context); }); return retVal; @@ -10635,903 +9579,749 @@ const de___listOfVideoDescription = (output: any, context: __SerdeContext): Vide * deserializeAws_restJson1AacSettings */ const de_AacSettings = (output: any, context: __SerdeContext): AacSettings => { - return { - Bitrate: __limitedParseDouble(output.bitrate), - CodingMode: __expectString(output.codingMode), - InputType: __expectString(output.inputType), - Profile: __expectString(output.profile), - RateControlMode: __expectString(output.rateControlMode), - RawFormat: __expectString(output.rawFormat), - SampleRate: __limitedParseDouble(output.sampleRate), - Spec: __expectString(output.spec), - VbrQuality: __expectString(output.vbrQuality), - } as any; + return take(output, { + Bitrate: [, __limitedParseDouble, `bitrate`], + CodingMode: [, __expectString, `codingMode`], + InputType: [, __expectString, `inputType`], + Profile: [, __expectString, `profile`], + RateControlMode: [, __expectString, `rateControlMode`], + RawFormat: [, __expectString, `rawFormat`], + SampleRate: [, __limitedParseDouble, `sampleRate`], + Spec: [, __expectString, `spec`], + VbrQuality: [, __expectString, `vbrQuality`], + }) as any; }; /** * deserializeAws_restJson1Ac3Settings */ const de_Ac3Settings = (output: any, context: __SerdeContext): Ac3Settings => { - return { - Bitrate: __limitedParseDouble(output.bitrate), - BitstreamMode: __expectString(output.bitstreamMode), - CodingMode: __expectString(output.codingMode), - Dialnorm: __expectInt32(output.dialnorm), - DrcProfile: __expectString(output.drcProfile), - LfeFilter: __expectString(output.lfeFilter), - MetadataControl: __expectString(output.metadataControl), - } as any; + return take(output, { + Bitrate: [, __limitedParseDouble, `bitrate`], + BitstreamMode: [, __expectString, `bitstreamMode`], + CodingMode: [, __expectString, `codingMode`], + Dialnorm: [, __expectInt32, `dialnorm`], + DrcProfile: [, __expectString, `drcProfile`], + LfeFilter: [, __expectString, `lfeFilter`], + MetadataControl: [, __expectString, `metadataControl`], + }) as any; }; /** * deserializeAws_restJson1AncillarySourceSettings */ const de_AncillarySourceSettings = (output: any, context: __SerdeContext): AncillarySourceSettings => { - return { - SourceAncillaryChannelNumber: __expectInt32(output.sourceAncillaryChannelNumber), - } as any; + return take(output, { + SourceAncillaryChannelNumber: [, __expectInt32, `sourceAncillaryChannelNumber`], + }) as any; }; /** * deserializeAws_restJson1ArchiveCdnSettings */ const de_ArchiveCdnSettings = (output: any, context: __SerdeContext): ArchiveCdnSettings => { - return { - ArchiveS3Settings: - output.archiveS3Settings != null ? de_ArchiveS3Settings(output.archiveS3Settings, context) : undefined, - } as any; + return take(output, { + ArchiveS3Settings: (_) => [, de_ArchiveS3Settings(_, context), `archiveS3Settings`], + }) as any; }; /** * deserializeAws_restJson1ArchiveContainerSettings */ const de_ArchiveContainerSettings = (output: any, context: __SerdeContext): ArchiveContainerSettings => { - return { - M2tsSettings: output.m2tsSettings != null ? de_M2tsSettings(output.m2tsSettings, context) : undefined, - RawSettings: output.rawSettings != null ? de_RawSettings(output.rawSettings, context) : undefined, - } as any; + return take(output, { + M2tsSettings: (_) => [, de_M2tsSettings(_, context), `m2tsSettings`], + RawSettings: [, _json, `rawSettings`], + }) as any; }; /** * deserializeAws_restJson1ArchiveGroupSettings */ const de_ArchiveGroupSettings = (output: any, context: __SerdeContext): ArchiveGroupSettings => { - return { - ArchiveCdnSettings: - output.archiveCdnSettings != null ? de_ArchiveCdnSettings(output.archiveCdnSettings, context) : undefined, - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - RolloverInterval: __expectInt32(output.rolloverInterval), - } as any; + return take(output, { + ArchiveCdnSettings: (_) => [, de_ArchiveCdnSettings(_, context), `archiveCdnSettings`], + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + RolloverInterval: [, __expectInt32, `rolloverInterval`], + }) as any; }; /** * deserializeAws_restJson1ArchiveOutputSettings */ const de_ArchiveOutputSettings = (output: any, context: __SerdeContext): ArchiveOutputSettings => { - return { - ContainerSettings: - output.containerSettings != null ? de_ArchiveContainerSettings(output.containerSettings, context) : undefined, - Extension: __expectString(output.extension), - NameModifier: __expectString(output.nameModifier), - } as any; + return take(output, { + ContainerSettings: (_) => [, de_ArchiveContainerSettings(_, context), `containerSettings`], + Extension: [, __expectString, `extension`], + NameModifier: [, __expectString, `nameModifier`], + }) as any; }; /** * deserializeAws_restJson1ArchiveS3Settings */ const de_ArchiveS3Settings = (output: any, context: __SerdeContext): ArchiveS3Settings => { - return { - CannedAcl: __expectString(output.cannedAcl), - } as any; + return take(output, { + CannedAcl: [, __expectString, `cannedAcl`], + }) as any; }; -/** - * deserializeAws_restJson1AribDestinationSettings - */ -const de_AribDestinationSettings = (output: any, context: __SerdeContext): AribDestinationSettings => { - return {} as any; -}; +// de_AribDestinationSettings omitted. -/** - * deserializeAws_restJson1AribSourceSettings - */ -const de_AribSourceSettings = (output: any, context: __SerdeContext): AribSourceSettings => { - return {} as any; -}; +// de_AribSourceSettings omitted. /** * deserializeAws_restJson1AudioChannelMapping */ const de_AudioChannelMapping = (output: any, context: __SerdeContext): AudioChannelMapping => { - return { - InputChannelLevels: - output.inputChannelLevels != null ? de___listOfInputChannelLevel(output.inputChannelLevels, context) : undefined, - OutputChannel: __expectInt32(output.outputChannel), - } as any; + return take(output, { + InputChannelLevels: (_) => [, de___listOfInputChannelLevel(_, context), `inputChannelLevels`], + OutputChannel: [, __expectInt32, `outputChannel`], + }) as any; }; /** * deserializeAws_restJson1AudioCodecSettings */ const de_AudioCodecSettings = (output: any, context: __SerdeContext): AudioCodecSettings => { - return { - AacSettings: output.aacSettings != null ? de_AacSettings(output.aacSettings, context) : undefined, - Ac3Settings: output.ac3Settings != null ? de_Ac3Settings(output.ac3Settings, context) : undefined, - Eac3AtmosSettings: - output.eac3AtmosSettings != null ? de_Eac3AtmosSettings(output.eac3AtmosSettings, context) : undefined, - Eac3Settings: output.eac3Settings != null ? de_Eac3Settings(output.eac3Settings, context) : undefined, - Mp2Settings: output.mp2Settings != null ? de_Mp2Settings(output.mp2Settings, context) : undefined, - PassThroughSettings: - output.passThroughSettings != null ? de_PassThroughSettings(output.passThroughSettings, context) : undefined, - WavSettings: output.wavSettings != null ? de_WavSettings(output.wavSettings, context) : undefined, - } as any; + return take(output, { + AacSettings: (_) => [, de_AacSettings(_, context), `aacSettings`], + Ac3Settings: (_) => [, de_Ac3Settings(_, context), `ac3Settings`], + Eac3AtmosSettings: (_) => [, de_Eac3AtmosSettings(_, context), `eac3AtmosSettings`], + Eac3Settings: (_) => [, de_Eac3Settings(_, context), `eac3Settings`], + Mp2Settings: (_) => [, de_Mp2Settings(_, context), `mp2Settings`], + PassThroughSettings: [, _json, `passThroughSettings`], + WavSettings: (_) => [, de_WavSettings(_, context), `wavSettings`], + }) as any; }; /** * deserializeAws_restJson1AudioDescription */ const de_AudioDescription = (output: any, context: __SerdeContext): AudioDescription => { - return { - AudioNormalizationSettings: - output.audioNormalizationSettings != null - ? de_AudioNormalizationSettings(output.audioNormalizationSettings, context) - : undefined, - AudioSelectorName: __expectString(output.audioSelectorName), - AudioType: __expectString(output.audioType), - AudioTypeControl: __expectString(output.audioTypeControl), - AudioWatermarkingSettings: - output.audioWatermarkingSettings != null - ? de_AudioWatermarkSettings(output.audioWatermarkingSettings, context) - : undefined, - CodecSettings: output.codecSettings != null ? de_AudioCodecSettings(output.codecSettings, context) : undefined, - LanguageCode: __expectString(output.languageCode), - LanguageCodeControl: __expectString(output.languageCodeControl), - Name: __expectString(output.name), - RemixSettings: output.remixSettings != null ? de_RemixSettings(output.remixSettings, context) : undefined, - StreamName: __expectString(output.streamName), - } as any; + return take(output, { + AudioNormalizationSettings: (_) => [, de_AudioNormalizationSettings(_, context), `audioNormalizationSettings`], + AudioSelectorName: [, __expectString, `audioSelectorName`], + AudioType: [, __expectString, `audioType`], + AudioTypeControl: [, __expectString, `audioTypeControl`], + AudioWatermarkingSettings: (_) => [, de_AudioWatermarkSettings(_, context), `audioWatermarkingSettings`], + CodecSettings: (_) => [, de_AudioCodecSettings(_, context), `codecSettings`], + LanguageCode: [, __expectString, `languageCode`], + LanguageCodeControl: [, __expectString, `languageCodeControl`], + Name: [, __expectString, `name`], + RemixSettings: (_) => [, de_RemixSettings(_, context), `remixSettings`], + StreamName: [, __expectString, `streamName`], + }) as any; }; /** * deserializeAws_restJson1AudioDolbyEDecode */ const de_AudioDolbyEDecode = (output: any, context: __SerdeContext): AudioDolbyEDecode => { - return { - ProgramSelection: __expectString(output.programSelection), - } as any; + return take(output, { + ProgramSelection: [, __expectString, `programSelection`], + }) as any; }; /** * deserializeAws_restJson1AudioHlsRenditionSelection */ const de_AudioHlsRenditionSelection = (output: any, context: __SerdeContext): AudioHlsRenditionSelection => { - return { - GroupId: __expectString(output.groupId), - Name: __expectString(output.name), - } as any; + return take(output, { + GroupId: [, __expectString, `groupId`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1AudioLanguageSelection */ const de_AudioLanguageSelection = (output: any, context: __SerdeContext): AudioLanguageSelection => { - return { - LanguageCode: __expectString(output.languageCode), - LanguageSelectionPolicy: __expectString(output.languageSelectionPolicy), - } as any; + return take(output, { + LanguageCode: [, __expectString, `languageCode`], + LanguageSelectionPolicy: [, __expectString, `languageSelectionPolicy`], + }) as any; }; /** * deserializeAws_restJson1AudioNormalizationSettings */ const de_AudioNormalizationSettings = (output: any, context: __SerdeContext): AudioNormalizationSettings => { - return { - Algorithm: __expectString(output.algorithm), - AlgorithmControl: __expectString(output.algorithmControl), - TargetLkfs: __limitedParseDouble(output.targetLkfs), - } as any; + return take(output, { + Algorithm: [, __expectString, `algorithm`], + AlgorithmControl: [, __expectString, `algorithmControl`], + TargetLkfs: [, __limitedParseDouble, `targetLkfs`], + }) as any; }; /** * deserializeAws_restJson1AudioOnlyHlsSettings */ const de_AudioOnlyHlsSettings = (output: any, context: __SerdeContext): AudioOnlyHlsSettings => { - return { - AudioGroupId: __expectString(output.audioGroupId), - AudioOnlyImage: output.audioOnlyImage != null ? de_InputLocation(output.audioOnlyImage, context) : undefined, - AudioTrackType: __expectString(output.audioTrackType), - SegmentType: __expectString(output.segmentType), - } as any; + return take(output, { + AudioGroupId: [, __expectString, `audioGroupId`], + AudioOnlyImage: (_) => [, de_InputLocation(_, context), `audioOnlyImage`], + AudioTrackType: [, __expectString, `audioTrackType`], + SegmentType: [, __expectString, `segmentType`], + }) as any; }; /** * deserializeAws_restJson1AudioPidSelection */ const de_AudioPidSelection = (output: any, context: __SerdeContext): AudioPidSelection => { - return { - Pid: __expectInt32(output.pid), - } as any; + return take(output, { + Pid: [, __expectInt32, `pid`], + }) as any; }; /** * deserializeAws_restJson1AudioSelector */ const de_AudioSelector = (output: any, context: __SerdeContext): AudioSelector => { - return { - Name: __expectString(output.name), - SelectorSettings: - output.selectorSettings != null ? de_AudioSelectorSettings(output.selectorSettings, context) : undefined, - } as any; + return take(output, { + Name: [, __expectString, `name`], + SelectorSettings: (_) => [, de_AudioSelectorSettings(_, context), `selectorSettings`], + }) as any; }; /** * deserializeAws_restJson1AudioSelectorSettings */ const de_AudioSelectorSettings = (output: any, context: __SerdeContext): AudioSelectorSettings => { - return { - AudioHlsRenditionSelection: - output.audioHlsRenditionSelection != null - ? de_AudioHlsRenditionSelection(output.audioHlsRenditionSelection, context) - : undefined, - AudioLanguageSelection: - output.audioLanguageSelection != null - ? de_AudioLanguageSelection(output.audioLanguageSelection, context) - : undefined, - AudioPidSelection: - output.audioPidSelection != null ? de_AudioPidSelection(output.audioPidSelection, context) : undefined, - AudioTrackSelection: - output.audioTrackSelection != null ? de_AudioTrackSelection(output.audioTrackSelection, context) : undefined, - } as any; + return take(output, { + AudioHlsRenditionSelection: (_) => [, de_AudioHlsRenditionSelection(_, context), `audioHlsRenditionSelection`], + AudioLanguageSelection: (_) => [, de_AudioLanguageSelection(_, context), `audioLanguageSelection`], + AudioPidSelection: (_) => [, de_AudioPidSelection(_, context), `audioPidSelection`], + AudioTrackSelection: (_) => [, de_AudioTrackSelection(_, context), `audioTrackSelection`], + }) as any; }; /** * deserializeAws_restJson1AudioSilenceFailoverSettings */ const de_AudioSilenceFailoverSettings = (output: any, context: __SerdeContext): AudioSilenceFailoverSettings => { - return { - AudioSelectorName: __expectString(output.audioSelectorName), - AudioSilenceThresholdMsec: __expectInt32(output.audioSilenceThresholdMsec), - } as any; + return take(output, { + AudioSelectorName: [, __expectString, `audioSelectorName`], + AudioSilenceThresholdMsec: [, __expectInt32, `audioSilenceThresholdMsec`], + }) as any; }; /** * deserializeAws_restJson1AudioTrack */ const de_AudioTrack = (output: any, context: __SerdeContext): AudioTrack => { - return { - Track: __expectInt32(output.track), - } as any; + return take(output, { + Track: [, __expectInt32, `track`], + }) as any; }; /** * deserializeAws_restJson1AudioTrackSelection */ const de_AudioTrackSelection = (output: any, context: __SerdeContext): AudioTrackSelection => { - return { - DolbyEDecode: output.dolbyEDecode != null ? de_AudioDolbyEDecode(output.dolbyEDecode, context) : undefined, - Tracks: output.tracks != null ? de___listOfAudioTrack(output.tracks, context) : undefined, - } as any; + return take(output, { + DolbyEDecode: (_) => [, de_AudioDolbyEDecode(_, context), `dolbyEDecode`], + Tracks: (_) => [, de___listOfAudioTrack(_, context), `tracks`], + }) as any; }; /** * deserializeAws_restJson1AudioWatermarkSettings */ const de_AudioWatermarkSettings = (output: any, context: __SerdeContext): AudioWatermarkSettings => { - return { - NielsenWatermarksSettings: - output.nielsenWatermarksSettings != null - ? de_NielsenWatermarksSettings(output.nielsenWatermarksSettings, context) - : undefined, - } as any; + return take(output, { + NielsenWatermarksSettings: (_) => [, de_NielsenWatermarksSettings(_, context), `nielsenWatermarksSettings`], + }) as any; }; /** * deserializeAws_restJson1AutomaticInputFailoverSettings */ const de_AutomaticInputFailoverSettings = (output: any, context: __SerdeContext): AutomaticInputFailoverSettings => { - return { - ErrorClearTimeMsec: __expectInt32(output.errorClearTimeMsec), - FailoverConditions: - output.failoverConditions != null ? de___listOfFailoverCondition(output.failoverConditions, context) : undefined, - InputPreference: __expectString(output.inputPreference), - SecondaryInputId: __expectString(output.secondaryInputId), - } as any; + return take(output, { + ErrorClearTimeMsec: [, __expectInt32, `errorClearTimeMsec`], + FailoverConditions: (_) => [, de___listOfFailoverCondition(_, context), `failoverConditions`], + InputPreference: [, __expectString, `inputPreference`], + SecondaryInputId: [, __expectString, `secondaryInputId`], + }) as any; }; /** * deserializeAws_restJson1AvailBlanking */ const de_AvailBlanking = (output: any, context: __SerdeContext): AvailBlanking => { - return { - AvailBlankingImage: - output.availBlankingImage != null ? de_InputLocation(output.availBlankingImage, context) : undefined, - State: __expectString(output.state), - } as any; + return take(output, { + AvailBlankingImage: (_) => [, de_InputLocation(_, context), `availBlankingImage`], + State: [, __expectString, `state`], + }) as any; }; /** * deserializeAws_restJson1AvailConfiguration */ const de_AvailConfiguration = (output: any, context: __SerdeContext): AvailConfiguration => { - return { - AvailSettings: output.availSettings != null ? de_AvailSettings(output.availSettings, context) : undefined, - } as any; + return take(output, { + AvailSettings: (_) => [, de_AvailSettings(_, context), `availSettings`], + }) as any; }; /** * deserializeAws_restJson1AvailSettings */ const de_AvailSettings = (output: any, context: __SerdeContext): AvailSettings => { - return { - Esam: output.esam != null ? de_Esam(output.esam, context) : undefined, - Scte35SpliceInsert: - output.scte35SpliceInsert != null ? de_Scte35SpliceInsert(output.scte35SpliceInsert, context) : undefined, - Scte35TimeSignalApos: - output.scte35TimeSignalApos != null ? de_Scte35TimeSignalApos(output.scte35TimeSignalApos, context) : undefined, - } as any; + return take(output, { + Esam: (_) => [, de_Esam(_, context), `esam`], + Scte35SpliceInsert: (_) => [, de_Scte35SpliceInsert(_, context), `scte35SpliceInsert`], + Scte35TimeSignalApos: (_) => [, de_Scte35TimeSignalApos(_, context), `scte35TimeSignalApos`], + }) as any; }; /** * deserializeAws_restJson1BatchFailedResultModel */ const de_BatchFailedResultModel = (output: any, context: __SerdeContext): BatchFailedResultModel => { - return { - Arn: __expectString(output.arn), - Code: __expectString(output.code), - Id: __expectString(output.id), - Message: __expectString(output.message), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Code: [, __expectString, `code`], + Id: [, __expectString, `id`], + Message: [, __expectString, `message`], + }) as any; }; /** * deserializeAws_restJson1BatchScheduleActionCreateResult */ const de_BatchScheduleActionCreateResult = (output: any, context: __SerdeContext): BatchScheduleActionCreateResult => { - return { - ScheduleActions: - output.scheduleActions != null ? de___listOfScheduleAction(output.scheduleActions, context) : undefined, - } as any; + return take(output, { + ScheduleActions: (_) => [, de___listOfScheduleAction(_, context), `scheduleActions`], + }) as any; }; /** * deserializeAws_restJson1BatchScheduleActionDeleteResult */ const de_BatchScheduleActionDeleteResult = (output: any, context: __SerdeContext): BatchScheduleActionDeleteResult => { - return { - ScheduleActions: - output.scheduleActions != null ? de___listOfScheduleAction(output.scheduleActions, context) : undefined, - } as any; + return take(output, { + ScheduleActions: (_) => [, de___listOfScheduleAction(_, context), `scheduleActions`], + }) as any; }; /** * deserializeAws_restJson1BatchSuccessfulResultModel */ const de_BatchSuccessfulResultModel = (output: any, context: __SerdeContext): BatchSuccessfulResultModel => { - return { - Arn: __expectString(output.arn), - Id: __expectString(output.id), - State: __expectString(output.state), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Id: [, __expectString, `id`], + State: [, __expectString, `state`], + }) as any; }; /** * deserializeAws_restJson1BlackoutSlate */ const de_BlackoutSlate = (output: any, context: __SerdeContext): BlackoutSlate => { - return { - BlackoutSlateImage: - output.blackoutSlateImage != null ? de_InputLocation(output.blackoutSlateImage, context) : undefined, - NetworkEndBlackout: __expectString(output.networkEndBlackout), - NetworkEndBlackoutImage: - output.networkEndBlackoutImage != null ? de_InputLocation(output.networkEndBlackoutImage, context) : undefined, - NetworkId: __expectString(output.networkId), - State: __expectString(output.state), - } as any; + return take(output, { + BlackoutSlateImage: (_) => [, de_InputLocation(_, context), `blackoutSlateImage`], + NetworkEndBlackout: [, __expectString, `networkEndBlackout`], + NetworkEndBlackoutImage: (_) => [, de_InputLocation(_, context), `networkEndBlackoutImage`], + NetworkId: [, __expectString, `networkId`], + State: [, __expectString, `state`], + }) as any; }; /** * deserializeAws_restJson1BurnInDestinationSettings */ const de_BurnInDestinationSettings = (output: any, context: __SerdeContext): BurnInDestinationSettings => { - return { - Alignment: __expectString(output.alignment), - BackgroundColor: __expectString(output.backgroundColor), - BackgroundOpacity: __expectInt32(output.backgroundOpacity), - Font: output.font != null ? de_InputLocation(output.font, context) : undefined, - FontColor: __expectString(output.fontColor), - FontOpacity: __expectInt32(output.fontOpacity), - FontResolution: __expectInt32(output.fontResolution), - FontSize: __expectString(output.fontSize), - OutlineColor: __expectString(output.outlineColor), - OutlineSize: __expectInt32(output.outlineSize), - ShadowColor: __expectString(output.shadowColor), - ShadowOpacity: __expectInt32(output.shadowOpacity), - ShadowXOffset: __expectInt32(output.shadowXOffset), - ShadowYOffset: __expectInt32(output.shadowYOffset), - TeletextGridControl: __expectString(output.teletextGridControl), - XPosition: __expectInt32(output.xPosition), - YPosition: __expectInt32(output.yPosition), - } as any; + return take(output, { + Alignment: [, __expectString, `alignment`], + BackgroundColor: [, __expectString, `backgroundColor`], + BackgroundOpacity: [, __expectInt32, `backgroundOpacity`], + Font: (_) => [, de_InputLocation(_, context), `font`], + FontColor: [, __expectString, `fontColor`], + FontOpacity: [, __expectInt32, `fontOpacity`], + FontResolution: [, __expectInt32, `fontResolution`], + FontSize: [, __expectString, `fontSize`], + OutlineColor: [, __expectString, `outlineColor`], + OutlineSize: [, __expectInt32, `outlineSize`], + ShadowColor: [, __expectString, `shadowColor`], + ShadowOpacity: [, __expectInt32, `shadowOpacity`], + ShadowXOffset: [, __expectInt32, `shadowXOffset`], + ShadowYOffset: [, __expectInt32, `shadowYOffset`], + TeletextGridControl: [, __expectString, `teletextGridControl`], + XPosition: [, __expectInt32, `xPosition`], + YPosition: [, __expectInt32, `yPosition`], + }) as any; }; /** * deserializeAws_restJson1CaptionDescription */ const de_CaptionDescription = (output: any, context: __SerdeContext): CaptionDescription => { - return { - Accessibility: __expectString(output.accessibility), - CaptionSelectorName: __expectString(output.captionSelectorName), - DestinationSettings: - output.destinationSettings != null - ? de_CaptionDestinationSettings(output.destinationSettings, context) - : undefined, - LanguageCode: __expectString(output.languageCode), - LanguageDescription: __expectString(output.languageDescription), - Name: __expectString(output.name), - } as any; + return take(output, { + Accessibility: [, __expectString, `accessibility`], + CaptionSelectorName: [, __expectString, `captionSelectorName`], + DestinationSettings: (_) => [, de_CaptionDestinationSettings(_, context), `destinationSettings`], + LanguageCode: [, __expectString, `languageCode`], + LanguageDescription: [, __expectString, `languageDescription`], + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1CaptionDestinationSettings */ const de_CaptionDestinationSettings = (output: any, context: __SerdeContext): CaptionDestinationSettings => { - return { - AribDestinationSettings: - output.aribDestinationSettings != null - ? de_AribDestinationSettings(output.aribDestinationSettings, context) - : undefined, - BurnInDestinationSettings: - output.burnInDestinationSettings != null - ? de_BurnInDestinationSettings(output.burnInDestinationSettings, context) - : undefined, - DvbSubDestinationSettings: - output.dvbSubDestinationSettings != null - ? de_DvbSubDestinationSettings(output.dvbSubDestinationSettings, context) - : undefined, - EbuTtDDestinationSettings: - output.ebuTtDDestinationSettings != null - ? de_EbuTtDDestinationSettings(output.ebuTtDDestinationSettings, context) - : undefined, - EmbeddedDestinationSettings: - output.embeddedDestinationSettings != null - ? de_EmbeddedDestinationSettings(output.embeddedDestinationSettings, context) - : undefined, - EmbeddedPlusScte20DestinationSettings: - output.embeddedPlusScte20DestinationSettings != null - ? de_EmbeddedPlusScte20DestinationSettings(output.embeddedPlusScte20DestinationSettings, context) - : undefined, - RtmpCaptionInfoDestinationSettings: - output.rtmpCaptionInfoDestinationSettings != null - ? de_RtmpCaptionInfoDestinationSettings(output.rtmpCaptionInfoDestinationSettings, context) - : undefined, - Scte20PlusEmbeddedDestinationSettings: - output.scte20PlusEmbeddedDestinationSettings != null - ? de_Scte20PlusEmbeddedDestinationSettings(output.scte20PlusEmbeddedDestinationSettings, context) - : undefined, - Scte27DestinationSettings: - output.scte27DestinationSettings != null - ? de_Scte27DestinationSettings(output.scte27DestinationSettings, context) - : undefined, - SmpteTtDestinationSettings: - output.smpteTtDestinationSettings != null - ? de_SmpteTtDestinationSettings(output.smpteTtDestinationSettings, context) - : undefined, - TeletextDestinationSettings: - output.teletextDestinationSettings != null - ? de_TeletextDestinationSettings(output.teletextDestinationSettings, context) - : undefined, - TtmlDestinationSettings: - output.ttmlDestinationSettings != null - ? de_TtmlDestinationSettings(output.ttmlDestinationSettings, context) - : undefined, - WebvttDestinationSettings: - output.webvttDestinationSettings != null - ? de_WebvttDestinationSettings(output.webvttDestinationSettings, context) - : undefined, - } as any; + return take(output, { + AribDestinationSettings: [, _json, `aribDestinationSettings`], + BurnInDestinationSettings: (_) => [, de_BurnInDestinationSettings(_, context), `burnInDestinationSettings`], + DvbSubDestinationSettings: (_) => [, de_DvbSubDestinationSettings(_, context), `dvbSubDestinationSettings`], + EbuTtDDestinationSettings: (_) => [, de_EbuTtDDestinationSettings(_, context), `ebuTtDDestinationSettings`], + EmbeddedDestinationSettings: [, _json, `embeddedDestinationSettings`], + EmbeddedPlusScte20DestinationSettings: [, _json, `embeddedPlusScte20DestinationSettings`], + RtmpCaptionInfoDestinationSettings: [, _json, `rtmpCaptionInfoDestinationSettings`], + Scte20PlusEmbeddedDestinationSettings: [, _json, `scte20PlusEmbeddedDestinationSettings`], + Scte27DestinationSettings: [, _json, `scte27DestinationSettings`], + SmpteTtDestinationSettings: [, _json, `smpteTtDestinationSettings`], + TeletextDestinationSettings: [, _json, `teletextDestinationSettings`], + TtmlDestinationSettings: (_) => [, de_TtmlDestinationSettings(_, context), `ttmlDestinationSettings`], + WebvttDestinationSettings: (_) => [, de_WebvttDestinationSettings(_, context), `webvttDestinationSettings`], + }) as any; }; /** * deserializeAws_restJson1CaptionLanguageMapping */ const de_CaptionLanguageMapping = (output: any, context: __SerdeContext): CaptionLanguageMapping => { - return { - CaptionChannel: __expectInt32(output.captionChannel), - LanguageCode: __expectString(output.languageCode), - LanguageDescription: __expectString(output.languageDescription), - } as any; + return take(output, { + CaptionChannel: [, __expectInt32, `captionChannel`], + LanguageCode: [, __expectString, `languageCode`], + LanguageDescription: [, __expectString, `languageDescription`], + }) as any; }; /** * deserializeAws_restJson1CaptionRectangle */ const de_CaptionRectangle = (output: any, context: __SerdeContext): CaptionRectangle => { - return { - Height: __limitedParseDouble(output.height), - LeftOffset: __limitedParseDouble(output.leftOffset), - TopOffset: __limitedParseDouble(output.topOffset), - Width: __limitedParseDouble(output.width), - } as any; + return take(output, { + Height: [, __limitedParseDouble, `height`], + LeftOffset: [, __limitedParseDouble, `leftOffset`], + TopOffset: [, __limitedParseDouble, `topOffset`], + Width: [, __limitedParseDouble, `width`], + }) as any; }; /** * deserializeAws_restJson1CaptionSelector */ const de_CaptionSelector = (output: any, context: __SerdeContext): CaptionSelector => { - return { - LanguageCode: __expectString(output.languageCode), - Name: __expectString(output.name), - SelectorSettings: - output.selectorSettings != null ? de_CaptionSelectorSettings(output.selectorSettings, context) : undefined, - } as any; + return take(output, { + LanguageCode: [, __expectString, `languageCode`], + Name: [, __expectString, `name`], + SelectorSettings: (_) => [, de_CaptionSelectorSettings(_, context), `selectorSettings`], + }) as any; }; /** * deserializeAws_restJson1CaptionSelectorSettings */ const de_CaptionSelectorSettings = (output: any, context: __SerdeContext): CaptionSelectorSettings => { - return { - AncillarySourceSettings: - output.ancillarySourceSettings != null - ? de_AncillarySourceSettings(output.ancillarySourceSettings, context) - : undefined, - AribSourceSettings: - output.aribSourceSettings != null ? de_AribSourceSettings(output.aribSourceSettings, context) : undefined, - DvbSubSourceSettings: - output.dvbSubSourceSettings != null ? de_DvbSubSourceSettings(output.dvbSubSourceSettings, context) : undefined, - EmbeddedSourceSettings: - output.embeddedSourceSettings != null - ? de_EmbeddedSourceSettings(output.embeddedSourceSettings, context) - : undefined, - Scte20SourceSettings: - output.scte20SourceSettings != null ? de_Scte20SourceSettings(output.scte20SourceSettings, context) : undefined, - Scte27SourceSettings: - output.scte27SourceSettings != null ? de_Scte27SourceSettings(output.scte27SourceSettings, context) : undefined, - TeletextSourceSettings: - output.teletextSourceSettings != null - ? de_TeletextSourceSettings(output.teletextSourceSettings, context) - : undefined, - } as any; + return take(output, { + AncillarySourceSettings: (_) => [, de_AncillarySourceSettings(_, context), `ancillarySourceSettings`], + AribSourceSettings: [, _json, `aribSourceSettings`], + DvbSubSourceSettings: (_) => [, de_DvbSubSourceSettings(_, context), `dvbSubSourceSettings`], + EmbeddedSourceSettings: (_) => [, de_EmbeddedSourceSettings(_, context), `embeddedSourceSettings`], + Scte20SourceSettings: (_) => [, de_Scte20SourceSettings(_, context), `scte20SourceSettings`], + Scte27SourceSettings: (_) => [, de_Scte27SourceSettings(_, context), `scte27SourceSettings`], + TeletextSourceSettings: (_) => [, de_TeletextSourceSettings(_, context), `teletextSourceSettings`], + }) as any; }; /** * deserializeAws_restJson1CdiInputSpecification */ const de_CdiInputSpecification = (output: any, context: __SerdeContext): CdiInputSpecification => { - return { - Resolution: __expectString(output.resolution), - } as any; + return take(output, { + Resolution: [, __expectString, `resolution`], + }) as any; }; /** * deserializeAws_restJson1Channel */ const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - Arn: __expectString(output.arn), - CdiInputSpecification: - output.cdiInputSpecification != null - ? de_CdiInputSpecification(output.cdiInputSpecification, context) - : undefined, - ChannelClass: __expectString(output.channelClass), - Destinations: output.destinations != null ? de___listOfOutputDestination(output.destinations, context) : undefined, - EgressEndpoints: - output.egressEndpoints != null ? de___listOfChannelEgressEndpoint(output.egressEndpoints, context) : undefined, - EncoderSettings: output.encoderSettings != null ? de_EncoderSettings(output.encoderSettings, context) : undefined, - Id: __expectString(output.id), - InputAttachments: - output.inputAttachments != null ? de___listOfInputAttachment(output.inputAttachments, context) : undefined, - InputSpecification: - output.inputSpecification != null ? de_InputSpecification(output.inputSpecification, context) : undefined, - LogLevel: __expectString(output.logLevel), - Maintenance: output.maintenance != null ? de_MaintenanceStatus(output.maintenance, context) : undefined, - Name: __expectString(output.name), - PipelineDetails: - output.pipelineDetails != null ? de___listOfPipelineDetail(output.pipelineDetails, context) : undefined, - PipelinesRunningCount: __expectInt32(output.pipelinesRunningCount), - RoleArn: __expectString(output.roleArn), - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - Vpc: output.vpc != null ? de_VpcOutputSettingsDescription(output.vpc, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CdiInputSpecification: (_) => [, de_CdiInputSpecification(_, context), `cdiInputSpecification`], + ChannelClass: [, __expectString, `channelClass`], + Destinations: (_) => [, de___listOfOutputDestination(_, context), `destinations`], + EgressEndpoints: (_) => [, de___listOfChannelEgressEndpoint(_, context), `egressEndpoints`], + EncoderSettings: (_) => [, de_EncoderSettings(_, context), `encoderSettings`], + Id: [, __expectString, `id`], + InputAttachments: (_) => [, de___listOfInputAttachment(_, context), `inputAttachments`], + InputSpecification: (_) => [, de_InputSpecification(_, context), `inputSpecification`], + LogLevel: [, __expectString, `logLevel`], + Maintenance: (_) => [, de_MaintenanceStatus(_, context), `maintenance`], + Name: [, __expectString, `name`], + PipelineDetails: (_) => [, de___listOfPipelineDetail(_, context), `pipelineDetails`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + RoleArn: [, __expectString, `roleArn`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Vpc: (_) => [, de_VpcOutputSettingsDescription(_, context), `vpc`], + }) as any; }; /** * deserializeAws_restJson1ChannelEgressEndpoint */ const de_ChannelEgressEndpoint = (output: any, context: __SerdeContext): ChannelEgressEndpoint => { - return { - SourceIp: __expectString(output.sourceIp), - } as any; + return take(output, { + SourceIp: [, __expectString, `sourceIp`], + }) as any; }; /** * deserializeAws_restJson1ChannelSummary */ const de_ChannelSummary = (output: any, context: __SerdeContext): ChannelSummary => { - return { - Arn: __expectString(output.arn), - CdiInputSpecification: - output.cdiInputSpecification != null - ? de_CdiInputSpecification(output.cdiInputSpecification, context) - : undefined, - ChannelClass: __expectString(output.channelClass), - Destinations: output.destinations != null ? de___listOfOutputDestination(output.destinations, context) : undefined, - EgressEndpoints: - output.egressEndpoints != null ? de___listOfChannelEgressEndpoint(output.egressEndpoints, context) : undefined, - Id: __expectString(output.id), - InputAttachments: - output.inputAttachments != null ? de___listOfInputAttachment(output.inputAttachments, context) : undefined, - InputSpecification: - output.inputSpecification != null ? de_InputSpecification(output.inputSpecification, context) : undefined, - LogLevel: __expectString(output.logLevel), - Maintenance: output.maintenance != null ? de_MaintenanceStatus(output.maintenance, context) : undefined, - Name: __expectString(output.name), - PipelinesRunningCount: __expectInt32(output.pipelinesRunningCount), - RoleArn: __expectString(output.roleArn), - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - Vpc: output.vpc != null ? de_VpcOutputSettingsDescription(output.vpc, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColorSpacePassthroughSettings - */ -const de_ColorSpacePassthroughSettings = (output: any, context: __SerdeContext): ColorSpacePassthroughSettings => { - return {} as any; -}; - -/** - * deserializeAws_restJson1DolbyVision81Settings - */ -const de_DolbyVision81Settings = (output: any, context: __SerdeContext): DolbyVision81Settings => { - return {} as any; -}; + return take(output, { + Arn: [, __expectString, `arn`], + CdiInputSpecification: (_) => [, de_CdiInputSpecification(_, context), `cdiInputSpecification`], + ChannelClass: [, __expectString, `channelClass`], + Destinations: (_) => [, de___listOfOutputDestination(_, context), `destinations`], + EgressEndpoints: (_) => [, de___listOfChannelEgressEndpoint(_, context), `egressEndpoints`], + Id: [, __expectString, `id`], + InputAttachments: (_) => [, de___listOfInputAttachment(_, context), `inputAttachments`], + InputSpecification: (_) => [, de_InputSpecification(_, context), `inputSpecification`], + LogLevel: [, __expectString, `logLevel`], + Maintenance: (_) => [, de_MaintenanceStatus(_, context), `maintenance`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + RoleArn: [, __expectString, `roleArn`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Vpc: (_) => [, de_VpcOutputSettingsDescription(_, context), `vpc`], + }) as any; +}; + +// de_ColorSpacePassthroughSettings omitted. + +// de_DolbyVision81Settings omitted. /** * deserializeAws_restJson1DvbNitSettings */ const de_DvbNitSettings = (output: any, context: __SerdeContext): DvbNitSettings => { - return { - NetworkId: __expectInt32(output.networkId), - NetworkName: __expectString(output.networkName), - RepInterval: __expectInt32(output.repInterval), - } as any; + return take(output, { + NetworkId: [, __expectInt32, `networkId`], + NetworkName: [, __expectString, `networkName`], + RepInterval: [, __expectInt32, `repInterval`], + }) as any; }; /** * deserializeAws_restJson1DvbSdtSettings */ const de_DvbSdtSettings = (output: any, context: __SerdeContext): DvbSdtSettings => { - return { - OutputSdt: __expectString(output.outputSdt), - RepInterval: __expectInt32(output.repInterval), - ServiceName: __expectString(output.serviceName), - ServiceProviderName: __expectString(output.serviceProviderName), - } as any; + return take(output, { + OutputSdt: [, __expectString, `outputSdt`], + RepInterval: [, __expectInt32, `repInterval`], + ServiceName: [, __expectString, `serviceName`], + ServiceProviderName: [, __expectString, `serviceProviderName`], + }) as any; }; /** * deserializeAws_restJson1DvbSubDestinationSettings */ const de_DvbSubDestinationSettings = (output: any, context: __SerdeContext): DvbSubDestinationSettings => { - return { - Alignment: __expectString(output.alignment), - BackgroundColor: __expectString(output.backgroundColor), - BackgroundOpacity: __expectInt32(output.backgroundOpacity), - Font: output.font != null ? de_InputLocation(output.font, context) : undefined, - FontColor: __expectString(output.fontColor), - FontOpacity: __expectInt32(output.fontOpacity), - FontResolution: __expectInt32(output.fontResolution), - FontSize: __expectString(output.fontSize), - OutlineColor: __expectString(output.outlineColor), - OutlineSize: __expectInt32(output.outlineSize), - ShadowColor: __expectString(output.shadowColor), - ShadowOpacity: __expectInt32(output.shadowOpacity), - ShadowXOffset: __expectInt32(output.shadowXOffset), - ShadowYOffset: __expectInt32(output.shadowYOffset), - TeletextGridControl: __expectString(output.teletextGridControl), - XPosition: __expectInt32(output.xPosition), - YPosition: __expectInt32(output.yPosition), - } as any; + return take(output, { + Alignment: [, __expectString, `alignment`], + BackgroundColor: [, __expectString, `backgroundColor`], + BackgroundOpacity: [, __expectInt32, `backgroundOpacity`], + Font: (_) => [, de_InputLocation(_, context), `font`], + FontColor: [, __expectString, `fontColor`], + FontOpacity: [, __expectInt32, `fontOpacity`], + FontResolution: [, __expectInt32, `fontResolution`], + FontSize: [, __expectString, `fontSize`], + OutlineColor: [, __expectString, `outlineColor`], + OutlineSize: [, __expectInt32, `outlineSize`], + ShadowColor: [, __expectString, `shadowColor`], + ShadowOpacity: [, __expectInt32, `shadowOpacity`], + ShadowXOffset: [, __expectInt32, `shadowXOffset`], + ShadowYOffset: [, __expectInt32, `shadowYOffset`], + TeletextGridControl: [, __expectString, `teletextGridControl`], + XPosition: [, __expectInt32, `xPosition`], + YPosition: [, __expectInt32, `yPosition`], + }) as any; }; /** * deserializeAws_restJson1DvbSubSourceSettings */ const de_DvbSubSourceSettings = (output: any, context: __SerdeContext): DvbSubSourceSettings => { - return { - OcrLanguage: __expectString(output.ocrLanguage), - Pid: __expectInt32(output.pid), - } as any; + return take(output, { + OcrLanguage: [, __expectString, `ocrLanguage`], + Pid: [, __expectInt32, `pid`], + }) as any; }; /** * deserializeAws_restJson1DvbTdtSettings */ const de_DvbTdtSettings = (output: any, context: __SerdeContext): DvbTdtSettings => { - return { - RepInterval: __expectInt32(output.repInterval), - } as any; + return take(output, { + RepInterval: [, __expectInt32, `repInterval`], + }) as any; }; /** * deserializeAws_restJson1Eac3AtmosSettings */ const de_Eac3AtmosSettings = (output: any, context: __SerdeContext): Eac3AtmosSettings => { - return { - Bitrate: __limitedParseDouble(output.bitrate), - CodingMode: __expectString(output.codingMode), - Dialnorm: __expectInt32(output.dialnorm), - DrcLine: __expectString(output.drcLine), - DrcRf: __expectString(output.drcRf), - HeightTrim: __limitedParseDouble(output.heightTrim), - SurroundTrim: __limitedParseDouble(output.surroundTrim), - } as any; + return take(output, { + Bitrate: [, __limitedParseDouble, `bitrate`], + CodingMode: [, __expectString, `codingMode`], + Dialnorm: [, __expectInt32, `dialnorm`], + DrcLine: [, __expectString, `drcLine`], + DrcRf: [, __expectString, `drcRf`], + HeightTrim: [, __limitedParseDouble, `heightTrim`], + SurroundTrim: [, __limitedParseDouble, `surroundTrim`], + }) as any; }; /** * deserializeAws_restJson1Eac3Settings */ const de_Eac3Settings = (output: any, context: __SerdeContext): Eac3Settings => { - return { - AttenuationControl: __expectString(output.attenuationControl), - Bitrate: __limitedParseDouble(output.bitrate), - BitstreamMode: __expectString(output.bitstreamMode), - CodingMode: __expectString(output.codingMode), - DcFilter: __expectString(output.dcFilter), - Dialnorm: __expectInt32(output.dialnorm), - DrcLine: __expectString(output.drcLine), - DrcRf: __expectString(output.drcRf), - LfeControl: __expectString(output.lfeControl), - LfeFilter: __expectString(output.lfeFilter), - LoRoCenterMixLevel: __limitedParseDouble(output.loRoCenterMixLevel), - LoRoSurroundMixLevel: __limitedParseDouble(output.loRoSurroundMixLevel), - LtRtCenterMixLevel: __limitedParseDouble(output.ltRtCenterMixLevel), - LtRtSurroundMixLevel: __limitedParseDouble(output.ltRtSurroundMixLevel), - MetadataControl: __expectString(output.metadataControl), - PassthroughControl: __expectString(output.passthroughControl), - PhaseControl: __expectString(output.phaseControl), - StereoDownmix: __expectString(output.stereoDownmix), - SurroundExMode: __expectString(output.surroundExMode), - SurroundMode: __expectString(output.surroundMode), - } as any; + return take(output, { + AttenuationControl: [, __expectString, `attenuationControl`], + Bitrate: [, __limitedParseDouble, `bitrate`], + BitstreamMode: [, __expectString, `bitstreamMode`], + CodingMode: [, __expectString, `codingMode`], + DcFilter: [, __expectString, `dcFilter`], + Dialnorm: [, __expectInt32, `dialnorm`], + DrcLine: [, __expectString, `drcLine`], + DrcRf: [, __expectString, `drcRf`], + LfeControl: [, __expectString, `lfeControl`], + LfeFilter: [, __expectString, `lfeFilter`], + LoRoCenterMixLevel: [, __limitedParseDouble, `loRoCenterMixLevel`], + LoRoSurroundMixLevel: [, __limitedParseDouble, `loRoSurroundMixLevel`], + LtRtCenterMixLevel: [, __limitedParseDouble, `ltRtCenterMixLevel`], + LtRtSurroundMixLevel: [, __limitedParseDouble, `ltRtSurroundMixLevel`], + MetadataControl: [, __expectString, `metadataControl`], + PassthroughControl: [, __expectString, `passthroughControl`], + PhaseControl: [, __expectString, `phaseControl`], + StereoDownmix: [, __expectString, `stereoDownmix`], + SurroundExMode: [, __expectString, `surroundExMode`], + SurroundMode: [, __expectString, `surroundMode`], + }) as any; }; /** * deserializeAws_restJson1EbuTtDDestinationSettings */ const de_EbuTtDDestinationSettings = (output: any, context: __SerdeContext): EbuTtDDestinationSettings => { - return { - CopyrightHolder: __expectString(output.copyrightHolder), - FillLineGap: __expectString(output.fillLineGap), - FontFamily: __expectString(output.fontFamily), - StyleControl: __expectString(output.styleControl), - } as any; + return take(output, { + CopyrightHolder: [, __expectString, `copyrightHolder`], + FillLineGap: [, __expectString, `fillLineGap`], + FontFamily: [, __expectString, `fontFamily`], + StyleControl: [, __expectString, `styleControl`], + }) as any; }; -/** - * deserializeAws_restJson1EmbeddedDestinationSettings - */ -const de_EmbeddedDestinationSettings = (output: any, context: __SerdeContext): EmbeddedDestinationSettings => { - return {} as any; -}; +// de_EmbeddedDestinationSettings omitted. -/** - * deserializeAws_restJson1EmbeddedPlusScte20DestinationSettings - */ -const de_EmbeddedPlusScte20DestinationSettings = ( - output: any, - context: __SerdeContext -): EmbeddedPlusScte20DestinationSettings => { - return {} as any; -}; +// de_EmbeddedPlusScte20DestinationSettings omitted. /** * deserializeAws_restJson1EmbeddedSourceSettings */ const de_EmbeddedSourceSettings = (output: any, context: __SerdeContext): EmbeddedSourceSettings => { - return { - Convert608To708: __expectString(output.convert608To708), - Scte20Detection: __expectString(output.scte20Detection), - Source608ChannelNumber: __expectInt32(output.source608ChannelNumber), - Source608TrackNumber: __expectInt32(output.source608TrackNumber), - } as any; + return take(output, { + Convert608To708: [, __expectString, `convert608To708`], + Scte20Detection: [, __expectString, `scte20Detection`], + Source608ChannelNumber: [, __expectInt32, `source608ChannelNumber`], + Source608TrackNumber: [, __expectInt32, `source608TrackNumber`], + }) as any; }; /** * deserializeAws_restJson1EncoderSettings */ const de_EncoderSettings = (output: any, context: __SerdeContext): EncoderSettings => { - return { - AudioDescriptions: - output.audioDescriptions != null ? de___listOfAudioDescription(output.audioDescriptions, context) : undefined, - AvailBlanking: output.availBlanking != null ? de_AvailBlanking(output.availBlanking, context) : undefined, - AvailConfiguration: - output.availConfiguration != null ? de_AvailConfiguration(output.availConfiguration, context) : undefined, - BlackoutSlate: output.blackoutSlate != null ? de_BlackoutSlate(output.blackoutSlate, context) : undefined, - CaptionDescriptions: - output.captionDescriptions != null - ? de___listOfCaptionDescription(output.captionDescriptions, context) - : undefined, - FeatureActivations: - output.featureActivations != null ? de_FeatureActivations(output.featureActivations, context) : undefined, - GlobalConfiguration: - output.globalConfiguration != null ? de_GlobalConfiguration(output.globalConfiguration, context) : undefined, - MotionGraphicsConfiguration: - output.motionGraphicsConfiguration != null - ? de_MotionGraphicsConfiguration(output.motionGraphicsConfiguration, context) - : undefined, - NielsenConfiguration: - output.nielsenConfiguration != null ? de_NielsenConfiguration(output.nielsenConfiguration, context) : undefined, - OutputGroups: output.outputGroups != null ? de___listOfOutputGroup(output.outputGroups, context) : undefined, - TimecodeConfig: output.timecodeConfig != null ? de_TimecodeConfig(output.timecodeConfig, context) : undefined, - VideoDescriptions: - output.videoDescriptions != null ? de___listOfVideoDescription(output.videoDescriptions, context) : undefined, - } as any; + return take(output, { + AudioDescriptions: (_) => [, de___listOfAudioDescription(_, context), `audioDescriptions`], + AvailBlanking: (_) => [, de_AvailBlanking(_, context), `availBlanking`], + AvailConfiguration: (_) => [, de_AvailConfiguration(_, context), `availConfiguration`], + BlackoutSlate: (_) => [, de_BlackoutSlate(_, context), `blackoutSlate`], + CaptionDescriptions: (_) => [, de___listOfCaptionDescription(_, context), `captionDescriptions`], + FeatureActivations: (_) => [, de_FeatureActivations(_, context), `featureActivations`], + GlobalConfiguration: (_) => [, de_GlobalConfiguration(_, context), `globalConfiguration`], + MotionGraphicsConfiguration: (_) => [, de_MotionGraphicsConfiguration(_, context), `motionGraphicsConfiguration`], + NielsenConfiguration: (_) => [, de_NielsenConfiguration(_, context), `nielsenConfiguration`], + OutputGroups: (_) => [, de___listOfOutputGroup(_, context), `outputGroups`], + TimecodeConfig: (_) => [, de_TimecodeConfig(_, context), `timecodeConfig`], + VideoDescriptions: (_) => [, de___listOfVideoDescription(_, context), `videoDescriptions`], + }) as any; }; /** * deserializeAws_restJson1Esam */ const de_Esam = (output: any, context: __SerdeContext): Esam => { - return { - AcquisitionPointId: __expectString(output.acquisitionPointId), - AdAvailOffset: __expectInt32(output.adAvailOffset), - PasswordParam: __expectString(output.passwordParam), - PoisEndpoint: __expectString(output.poisEndpoint), - Username: __expectString(output.username), - ZoneIdentity: __expectString(output.zoneIdentity), - } as any; + return take(output, { + AcquisitionPointId: [, __expectString, `acquisitionPointId`], + AdAvailOffset: [, __expectInt32, `adAvailOffset`], + PasswordParam: [, __expectString, `passwordParam`], + PoisEndpoint: [, __expectString, `poisEndpoint`], + Username: [, __expectString, `username`], + ZoneIdentity: [, __expectString, `zoneIdentity`], + }) as any; }; /** * deserializeAws_restJson1FailoverCondition */ const de_FailoverCondition = (output: any, context: __SerdeContext): FailoverCondition => { - return { - FailoverConditionSettings: - output.failoverConditionSettings != null - ? de_FailoverConditionSettings(output.failoverConditionSettings, context) - : undefined, - } as any; + return take(output, { + FailoverConditionSettings: (_) => [, de_FailoverConditionSettings(_, context), `failoverConditionSettings`], + }) as any; }; /** * deserializeAws_restJson1FailoverConditionSettings */ const de_FailoverConditionSettings = (output: any, context: __SerdeContext): FailoverConditionSettings => { - return { - AudioSilenceSettings: - output.audioSilenceSettings != null - ? de_AudioSilenceFailoverSettings(output.audioSilenceSettings, context) - : undefined, - InputLossSettings: - output.inputLossSettings != null ? de_InputLossFailoverSettings(output.inputLossSettings, context) : undefined, - VideoBlackSettings: - output.videoBlackSettings != null ? de_VideoBlackFailoverSettings(output.videoBlackSettings, context) : undefined, - } as any; + return take(output, { + AudioSilenceSettings: (_) => [, de_AudioSilenceFailoverSettings(_, context), `audioSilenceSettings`], + InputLossSettings: (_) => [, de_InputLossFailoverSettings(_, context), `inputLossSettings`], + VideoBlackSettings: (_) => [, de_VideoBlackFailoverSettings(_, context), `videoBlackSettings`], + }) as any; }; /** * deserializeAws_restJson1FeatureActivations */ const de_FeatureActivations = (output: any, context: __SerdeContext): FeatureActivations => { - return { - InputPrepareScheduleActions: __expectString(output.inputPrepareScheduleActions), - } as any; + return take(output, { + InputPrepareScheduleActions: [, __expectString, `inputPrepareScheduleActions`], + }) as any; }; /** * deserializeAws_restJson1FecOutputSettings */ const de_FecOutputSettings = (output: any, context: __SerdeContext): FecOutputSettings => { - return { - ColumnDepth: __expectInt32(output.columnDepth), - IncludeFec: __expectString(output.includeFec), - RowLength: __expectInt32(output.rowLength), - } as any; + return take(output, { + ColumnDepth: [, __expectInt32, `columnDepth`], + IncludeFec: [, __expectString, `includeFec`], + RowLength: [, __expectInt32, `rowLength`], + }) as any; }; /** @@ -11541,20 +10331,20 @@ const de_FixedModeScheduleActionStartSettings = ( output: any, context: __SerdeContext ): FixedModeScheduleActionStartSettings => { - return { - Time: __expectString(output.time), - } as any; + return take(output, { + Time: [, __expectString, `time`], + }) as any; }; /** * deserializeAws_restJson1Fmp4HlsSettings */ const de_Fmp4HlsSettings = (output: any, context: __SerdeContext): Fmp4HlsSettings => { - return { - AudioRenditionSets: __expectString(output.audioRenditionSets), - NielsenId3Behavior: __expectString(output.nielsenId3Behavior), - TimedMetadataBehavior: __expectString(output.timedMetadataBehavior), - } as any; + return take(output, { + AudioRenditionSets: [, __expectString, `audioRenditionSets`], + NielsenId3Behavior: [, __expectString, `nielsenId3Behavior`], + TimedMetadataBehavior: [, __expectString, `timedMetadataBehavior`], + }) as any; }; /** @@ -11564,353 +10354,305 @@ const de_FollowModeScheduleActionStartSettings = ( output: any, context: __SerdeContext ): FollowModeScheduleActionStartSettings => { - return { - FollowPoint: __expectString(output.followPoint), - ReferenceActionName: __expectString(output.referenceActionName), - } as any; + return take(output, { + FollowPoint: [, __expectString, `followPoint`], + ReferenceActionName: [, __expectString, `referenceActionName`], + }) as any; }; /** * deserializeAws_restJson1FrameCaptureCdnSettings */ const de_FrameCaptureCdnSettings = (output: any, context: __SerdeContext): FrameCaptureCdnSettings => { - return { - FrameCaptureS3Settings: - output.frameCaptureS3Settings != null - ? de_FrameCaptureS3Settings(output.frameCaptureS3Settings, context) - : undefined, - } as any; + return take(output, { + FrameCaptureS3Settings: (_) => [, de_FrameCaptureS3Settings(_, context), `frameCaptureS3Settings`], + }) as any; }; /** * deserializeAws_restJson1FrameCaptureGroupSettings */ const de_FrameCaptureGroupSettings = (output: any, context: __SerdeContext): FrameCaptureGroupSettings => { - return { - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - FrameCaptureCdnSettings: - output.frameCaptureCdnSettings != null - ? de_FrameCaptureCdnSettings(output.frameCaptureCdnSettings, context) - : undefined, - } as any; + return take(output, { + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + FrameCaptureCdnSettings: (_) => [, de_FrameCaptureCdnSettings(_, context), `frameCaptureCdnSettings`], + }) as any; }; -/** - * deserializeAws_restJson1FrameCaptureHlsSettings - */ -const de_FrameCaptureHlsSettings = (output: any, context: __SerdeContext): FrameCaptureHlsSettings => { - return {} as any; -}; +// de_FrameCaptureHlsSettings omitted. /** * deserializeAws_restJson1FrameCaptureOutputSettings */ const de_FrameCaptureOutputSettings = (output: any, context: __SerdeContext): FrameCaptureOutputSettings => { - return { - NameModifier: __expectString(output.nameModifier), - } as any; + return take(output, { + NameModifier: [, __expectString, `nameModifier`], + }) as any; }; /** * deserializeAws_restJson1FrameCaptureS3Settings */ const de_FrameCaptureS3Settings = (output: any, context: __SerdeContext): FrameCaptureS3Settings => { - return { - CannedAcl: __expectString(output.cannedAcl), - } as any; + return take(output, { + CannedAcl: [, __expectString, `cannedAcl`], + }) as any; }; /** * deserializeAws_restJson1FrameCaptureSettings */ const de_FrameCaptureSettings = (output: any, context: __SerdeContext): FrameCaptureSettings => { - return { - CaptureInterval: __expectInt32(output.captureInterval), - CaptureIntervalUnits: __expectString(output.captureIntervalUnits), - TimecodeBurninSettings: - output.timecodeBurninSettings != null - ? de_TimecodeBurninSettings(output.timecodeBurninSettings, context) - : undefined, - } as any; + return take(output, { + CaptureInterval: [, __expectInt32, `captureInterval`], + CaptureIntervalUnits: [, __expectString, `captureIntervalUnits`], + TimecodeBurninSettings: (_) => [, de_TimecodeBurninSettings(_, context), `timecodeBurninSettings`], + }) as any; }; /** * deserializeAws_restJson1GlobalConfiguration */ const de_GlobalConfiguration = (output: any, context: __SerdeContext): GlobalConfiguration => { - return { - InitialAudioGain: __expectInt32(output.initialAudioGain), - InputEndAction: __expectString(output.inputEndAction), - InputLossBehavior: - output.inputLossBehavior != null ? de_InputLossBehavior(output.inputLossBehavior, context) : undefined, - OutputLockingMode: __expectString(output.outputLockingMode), - OutputTimingSource: __expectString(output.outputTimingSource), - SupportLowFramerateInputs: __expectString(output.supportLowFramerateInputs), - } as any; + return take(output, { + InitialAudioGain: [, __expectInt32, `initialAudioGain`], + InputEndAction: [, __expectString, `inputEndAction`], + InputLossBehavior: (_) => [, de_InputLossBehavior(_, context), `inputLossBehavior`], + OutputLockingMode: [, __expectString, `outputLockingMode`], + OutputTimingSource: [, __expectString, `outputTimingSource`], + SupportLowFramerateInputs: [, __expectString, `supportLowFramerateInputs`], + }) as any; }; /** * deserializeAws_restJson1H264ColorSpaceSettings */ const de_H264ColorSpaceSettings = (output: any, context: __SerdeContext): H264ColorSpaceSettings => { - return { - ColorSpacePassthroughSettings: - output.colorSpacePassthroughSettings != null - ? de_ColorSpacePassthroughSettings(output.colorSpacePassthroughSettings, context) - : undefined, - Rec601Settings: output.rec601Settings != null ? de_Rec601Settings(output.rec601Settings, context) : undefined, - Rec709Settings: output.rec709Settings != null ? de_Rec709Settings(output.rec709Settings, context) : undefined, - } as any; + return take(output, { + ColorSpacePassthroughSettings: [, _json, `colorSpacePassthroughSettings`], + Rec601Settings: [, _json, `rec601Settings`], + Rec709Settings: [, _json, `rec709Settings`], + }) as any; }; /** * deserializeAws_restJson1H264FilterSettings */ const de_H264FilterSettings = (output: any, context: __SerdeContext): H264FilterSettings => { - return { - TemporalFilterSettings: - output.temporalFilterSettings != null - ? de_TemporalFilterSettings(output.temporalFilterSettings, context) - : undefined, - } as any; + return take(output, { + TemporalFilterSettings: (_) => [, de_TemporalFilterSettings(_, context), `temporalFilterSettings`], + }) as any; }; /** * deserializeAws_restJson1H264Settings */ const de_H264Settings = (output: any, context: __SerdeContext): H264Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - AfdSignaling: __expectString(output.afdSignaling), - Bitrate: __expectInt32(output.bitrate), - BufFillPct: __expectInt32(output.bufFillPct), - BufSize: __expectInt32(output.bufSize), - ColorMetadata: __expectString(output.colorMetadata), - ColorSpaceSettings: - output.colorSpaceSettings != null ? de_H264ColorSpaceSettings(output.colorSpaceSettings, context) : undefined, - EntropyEncoding: __expectString(output.entropyEncoding), - FilterSettings: output.filterSettings != null ? de_H264FilterSettings(output.filterSettings, context) : undefined, - FixedAfd: __expectString(output.fixedAfd), - FlickerAq: __expectString(output.flickerAq), - ForceFieldPictures: __expectString(output.forceFieldPictures), - FramerateControl: __expectString(output.framerateControl), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopBReference: __expectString(output.gopBReference), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - GopNumBFrames: __expectInt32(output.gopNumBFrames), - GopSize: __limitedParseDouble(output.gopSize), - GopSizeUnits: __expectString(output.gopSizeUnits), - Level: __expectString(output.level), - LookAheadRateControl: __expectString(output.lookAheadRateControl), - MaxBitrate: __expectInt32(output.maxBitrate), - MinIInterval: __expectInt32(output.minIInterval), - NumRefFrames: __expectInt32(output.numRefFrames), - ParControl: __expectString(output.parControl), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - Profile: __expectString(output.profile), - QualityLevel: __expectString(output.qualityLevel), - QvbrQualityLevel: __expectInt32(output.qvbrQualityLevel), - RateControlMode: __expectString(output.rateControlMode), - ScanType: __expectString(output.scanType), - SceneChangeDetect: __expectString(output.sceneChangeDetect), - Slices: __expectInt32(output.slices), - Softness: __expectInt32(output.softness), - SpatialAq: __expectString(output.spatialAq), - SubgopLength: __expectString(output.subgopLength), - Syntax: __expectString(output.syntax), - TemporalAq: __expectString(output.temporalAq), - TimecodeBurninSettings: - output.timecodeBurninSettings != null - ? de_TimecodeBurninSettings(output.timecodeBurninSettings, context) - : undefined, - TimecodeInsertion: __expectString(output.timecodeInsertion), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + AfdSignaling: [, __expectString, `afdSignaling`], + Bitrate: [, __expectInt32, `bitrate`], + BufFillPct: [, __expectInt32, `bufFillPct`], + BufSize: [, __expectInt32, `bufSize`], + ColorMetadata: [, __expectString, `colorMetadata`], + ColorSpaceSettings: (_) => [, de_H264ColorSpaceSettings(_, context), `colorSpaceSettings`], + EntropyEncoding: [, __expectString, `entropyEncoding`], + FilterSettings: (_) => [, de_H264FilterSettings(_, context), `filterSettings`], + FixedAfd: [, __expectString, `fixedAfd`], + FlickerAq: [, __expectString, `flickerAq`], + ForceFieldPictures: [, __expectString, `forceFieldPictures`], + FramerateControl: [, __expectString, `framerateControl`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopBReference: [, __expectString, `gopBReference`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + GopNumBFrames: [, __expectInt32, `gopNumBFrames`], + GopSize: [, __limitedParseDouble, `gopSize`], + GopSizeUnits: [, __expectString, `gopSizeUnits`], + Level: [, __expectString, `level`], + LookAheadRateControl: [, __expectString, `lookAheadRateControl`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MinIInterval: [, __expectInt32, `minIInterval`], + NumRefFrames: [, __expectInt32, `numRefFrames`], + ParControl: [, __expectString, `parControl`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + Profile: [, __expectString, `profile`], + QualityLevel: [, __expectString, `qualityLevel`], + QvbrQualityLevel: [, __expectInt32, `qvbrQualityLevel`], + RateControlMode: [, __expectString, `rateControlMode`], + ScanType: [, __expectString, `scanType`], + SceneChangeDetect: [, __expectString, `sceneChangeDetect`], + Slices: [, __expectInt32, `slices`], + Softness: [, __expectInt32, `softness`], + SpatialAq: [, __expectString, `spatialAq`], + SubgopLength: [, __expectString, `subgopLength`], + Syntax: [, __expectString, `syntax`], + TemporalAq: [, __expectString, `temporalAq`], + TimecodeBurninSettings: (_) => [, de_TimecodeBurninSettings(_, context), `timecodeBurninSettings`], + TimecodeInsertion: [, __expectString, `timecodeInsertion`], + }) as any; }; /** * deserializeAws_restJson1H265ColorSpaceSettings */ const de_H265ColorSpaceSettings = (output: any, context: __SerdeContext): H265ColorSpaceSettings => { - return { - ColorSpacePassthroughSettings: - output.colorSpacePassthroughSettings != null - ? de_ColorSpacePassthroughSettings(output.colorSpacePassthroughSettings, context) - : undefined, - DolbyVision81Settings: - output.dolbyVision81Settings != null - ? de_DolbyVision81Settings(output.dolbyVision81Settings, context) - : undefined, - Hdr10Settings: output.hdr10Settings != null ? de_Hdr10Settings(output.hdr10Settings, context) : undefined, - Rec601Settings: output.rec601Settings != null ? de_Rec601Settings(output.rec601Settings, context) : undefined, - Rec709Settings: output.rec709Settings != null ? de_Rec709Settings(output.rec709Settings, context) : undefined, - } as any; + return take(output, { + ColorSpacePassthroughSettings: [, _json, `colorSpacePassthroughSettings`], + DolbyVision81Settings: [, _json, `dolbyVision81Settings`], + Hdr10Settings: (_) => [, de_Hdr10Settings(_, context), `hdr10Settings`], + Rec601Settings: [, _json, `rec601Settings`], + Rec709Settings: [, _json, `rec709Settings`], + }) as any; }; /** * deserializeAws_restJson1H265FilterSettings */ const de_H265FilterSettings = (output: any, context: __SerdeContext): H265FilterSettings => { - return { - TemporalFilterSettings: - output.temporalFilterSettings != null - ? de_TemporalFilterSettings(output.temporalFilterSettings, context) - : undefined, - } as any; + return take(output, { + TemporalFilterSettings: (_) => [, de_TemporalFilterSettings(_, context), `temporalFilterSettings`], + }) as any; }; /** * deserializeAws_restJson1H265Settings */ const de_H265Settings = (output: any, context: __SerdeContext): H265Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - AfdSignaling: __expectString(output.afdSignaling), - AlternativeTransferFunction: __expectString(output.alternativeTransferFunction), - Bitrate: __expectInt32(output.bitrate), - BufSize: __expectInt32(output.bufSize), - ColorMetadata: __expectString(output.colorMetadata), - ColorSpaceSettings: - output.colorSpaceSettings != null ? de_H265ColorSpaceSettings(output.colorSpaceSettings, context) : undefined, - FilterSettings: output.filterSettings != null ? de_H265FilterSettings(output.filterSettings, context) : undefined, - FixedAfd: __expectString(output.fixedAfd), - FlickerAq: __expectString(output.flickerAq), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - GopSize: __limitedParseDouble(output.gopSize), - GopSizeUnits: __expectString(output.gopSizeUnits), - Level: __expectString(output.level), - LookAheadRateControl: __expectString(output.lookAheadRateControl), - MaxBitrate: __expectInt32(output.maxBitrate), - MinIInterval: __expectInt32(output.minIInterval), - ParDenominator: __expectInt32(output.parDenominator), - ParNumerator: __expectInt32(output.parNumerator), - Profile: __expectString(output.profile), - QvbrQualityLevel: __expectInt32(output.qvbrQualityLevel), - RateControlMode: __expectString(output.rateControlMode), - ScanType: __expectString(output.scanType), - SceneChangeDetect: __expectString(output.sceneChangeDetect), - Slices: __expectInt32(output.slices), - Tier: __expectString(output.tier), - TimecodeBurninSettings: - output.timecodeBurninSettings != null - ? de_TimecodeBurninSettings(output.timecodeBurninSettings, context) - : undefined, - TimecodeInsertion: __expectString(output.timecodeInsertion), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + AfdSignaling: [, __expectString, `afdSignaling`], + AlternativeTransferFunction: [, __expectString, `alternativeTransferFunction`], + Bitrate: [, __expectInt32, `bitrate`], + BufSize: [, __expectInt32, `bufSize`], + ColorMetadata: [, __expectString, `colorMetadata`], + ColorSpaceSettings: (_) => [, de_H265ColorSpaceSettings(_, context), `colorSpaceSettings`], + FilterSettings: (_) => [, de_H265FilterSettings(_, context), `filterSettings`], + FixedAfd: [, __expectString, `fixedAfd`], + FlickerAq: [, __expectString, `flickerAq`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + GopSize: [, __limitedParseDouble, `gopSize`], + GopSizeUnits: [, __expectString, `gopSizeUnits`], + Level: [, __expectString, `level`], + LookAheadRateControl: [, __expectString, `lookAheadRateControl`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + MinIInterval: [, __expectInt32, `minIInterval`], + ParDenominator: [, __expectInt32, `parDenominator`], + ParNumerator: [, __expectInt32, `parNumerator`], + Profile: [, __expectString, `profile`], + QvbrQualityLevel: [, __expectInt32, `qvbrQualityLevel`], + RateControlMode: [, __expectString, `rateControlMode`], + ScanType: [, __expectString, `scanType`], + SceneChangeDetect: [, __expectString, `sceneChangeDetect`], + Slices: [, __expectInt32, `slices`], + Tier: [, __expectString, `tier`], + TimecodeBurninSettings: (_) => [, de_TimecodeBurninSettings(_, context), `timecodeBurninSettings`], + TimecodeInsertion: [, __expectString, `timecodeInsertion`], + }) as any; }; /** * deserializeAws_restJson1Hdr10Settings */ const de_Hdr10Settings = (output: any, context: __SerdeContext): Hdr10Settings => { - return { - MaxCll: __expectInt32(output.maxCll), - MaxFall: __expectInt32(output.maxFall), - } as any; + return take(output, { + MaxCll: [, __expectInt32, `maxCll`], + MaxFall: [, __expectInt32, `maxFall`], + }) as any; }; /** * deserializeAws_restJson1HlsAkamaiSettings */ const de_HlsAkamaiSettings = (output: any, context: __SerdeContext): HlsAkamaiSettings => { - return { - ConnectionRetryInterval: __expectInt32(output.connectionRetryInterval), - FilecacheDuration: __expectInt32(output.filecacheDuration), - HttpTransferMode: __expectString(output.httpTransferMode), - NumRetries: __expectInt32(output.numRetries), - RestartDelay: __expectInt32(output.restartDelay), - Salt: __expectString(output.salt), - Token: __expectString(output.token), - } as any; + return take(output, { + ConnectionRetryInterval: [, __expectInt32, `connectionRetryInterval`], + FilecacheDuration: [, __expectInt32, `filecacheDuration`], + HttpTransferMode: [, __expectString, `httpTransferMode`], + NumRetries: [, __expectInt32, `numRetries`], + RestartDelay: [, __expectInt32, `restartDelay`], + Salt: [, __expectString, `salt`], + Token: [, __expectString, `token`], + }) as any; }; /** * deserializeAws_restJson1HlsBasicPutSettings */ const de_HlsBasicPutSettings = (output: any, context: __SerdeContext): HlsBasicPutSettings => { - return { - ConnectionRetryInterval: __expectInt32(output.connectionRetryInterval), - FilecacheDuration: __expectInt32(output.filecacheDuration), - NumRetries: __expectInt32(output.numRetries), - RestartDelay: __expectInt32(output.restartDelay), - } as any; + return take(output, { + ConnectionRetryInterval: [, __expectInt32, `connectionRetryInterval`], + FilecacheDuration: [, __expectInt32, `filecacheDuration`], + NumRetries: [, __expectInt32, `numRetries`], + RestartDelay: [, __expectInt32, `restartDelay`], + }) as any; }; /** * deserializeAws_restJson1HlsCdnSettings */ const de_HlsCdnSettings = (output: any, context: __SerdeContext): HlsCdnSettings => { - return { - HlsAkamaiSettings: - output.hlsAkamaiSettings != null ? de_HlsAkamaiSettings(output.hlsAkamaiSettings, context) : undefined, - HlsBasicPutSettings: - output.hlsBasicPutSettings != null ? de_HlsBasicPutSettings(output.hlsBasicPutSettings, context) : undefined, - HlsMediaStoreSettings: - output.hlsMediaStoreSettings != null - ? de_HlsMediaStoreSettings(output.hlsMediaStoreSettings, context) - : undefined, - HlsS3Settings: output.hlsS3Settings != null ? de_HlsS3Settings(output.hlsS3Settings, context) : undefined, - HlsWebdavSettings: - output.hlsWebdavSettings != null ? de_HlsWebdavSettings(output.hlsWebdavSettings, context) : undefined, - } as any; + return take(output, { + HlsAkamaiSettings: (_) => [, de_HlsAkamaiSettings(_, context), `hlsAkamaiSettings`], + HlsBasicPutSettings: (_) => [, de_HlsBasicPutSettings(_, context), `hlsBasicPutSettings`], + HlsMediaStoreSettings: (_) => [, de_HlsMediaStoreSettings(_, context), `hlsMediaStoreSettings`], + HlsS3Settings: (_) => [, de_HlsS3Settings(_, context), `hlsS3Settings`], + HlsWebdavSettings: (_) => [, de_HlsWebdavSettings(_, context), `hlsWebdavSettings`], + }) as any; }; /** * deserializeAws_restJson1HlsGroupSettings */ const de_HlsGroupSettings = (output: any, context: __SerdeContext): HlsGroupSettings => { - return { - AdMarkers: output.adMarkers != null ? de___listOfHlsAdMarkers(output.adMarkers, context) : undefined, - BaseUrlContent: __expectString(output.baseUrlContent), - BaseUrlContent1: __expectString(output.baseUrlContent1), - BaseUrlManifest: __expectString(output.baseUrlManifest), - BaseUrlManifest1: __expectString(output.baseUrlManifest1), - CaptionLanguageMappings: - output.captionLanguageMappings != null - ? de___listOfCaptionLanguageMapping(output.captionLanguageMappings, context) - : undefined, - CaptionLanguageSetting: __expectString(output.captionLanguageSetting), - ClientCache: __expectString(output.clientCache), - CodecSpecification: __expectString(output.codecSpecification), - ConstantIv: __expectString(output.constantIv), - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - DirectoryStructure: __expectString(output.directoryStructure), - DiscontinuityTags: __expectString(output.discontinuityTags), - EncryptionType: __expectString(output.encryptionType), - HlsCdnSettings: output.hlsCdnSettings != null ? de_HlsCdnSettings(output.hlsCdnSettings, context) : undefined, - HlsId3SegmentTagging: __expectString(output.hlsId3SegmentTagging), - IFrameOnlyPlaylists: __expectString(output.iFrameOnlyPlaylists), - IncompleteSegmentBehavior: __expectString(output.incompleteSegmentBehavior), - IndexNSegments: __expectInt32(output.indexNSegments), - InputLossAction: __expectString(output.inputLossAction), - IvInManifest: __expectString(output.ivInManifest), - IvSource: __expectString(output.ivSource), - KeepSegments: __expectInt32(output.keepSegments), - KeyFormat: __expectString(output.keyFormat), - KeyFormatVersions: __expectString(output.keyFormatVersions), - KeyProviderSettings: - output.keyProviderSettings != null ? de_KeyProviderSettings(output.keyProviderSettings, context) : undefined, - ManifestCompression: __expectString(output.manifestCompression), - ManifestDurationFormat: __expectString(output.manifestDurationFormat), - MinSegmentLength: __expectInt32(output.minSegmentLength), - Mode: __expectString(output.mode), - OutputSelection: __expectString(output.outputSelection), - ProgramDateTime: __expectString(output.programDateTime), - ProgramDateTimeClock: __expectString(output.programDateTimeClock), - ProgramDateTimePeriod: __expectInt32(output.programDateTimePeriod), - RedundantManifest: __expectString(output.redundantManifest), - SegmentLength: __expectInt32(output.segmentLength), - SegmentationMode: __expectString(output.segmentationMode), - SegmentsPerSubdirectory: __expectInt32(output.segmentsPerSubdirectory), - StreamInfResolution: __expectString(output.streamInfResolution), - TimedMetadataId3Frame: __expectString(output.timedMetadataId3Frame), - TimedMetadataId3Period: __expectInt32(output.timedMetadataId3Period), - TimestampDeltaMilliseconds: __expectInt32(output.timestampDeltaMilliseconds), - TsFileMode: __expectString(output.tsFileMode), - } as any; + return take(output, { + AdMarkers: [, _json, `adMarkers`], + BaseUrlContent: [, __expectString, `baseUrlContent`], + BaseUrlContent1: [, __expectString, `baseUrlContent1`], + BaseUrlManifest: [, __expectString, `baseUrlManifest`], + BaseUrlManifest1: [, __expectString, `baseUrlManifest1`], + CaptionLanguageMappings: (_) => [, de___listOfCaptionLanguageMapping(_, context), `captionLanguageMappings`], + CaptionLanguageSetting: [, __expectString, `captionLanguageSetting`], + ClientCache: [, __expectString, `clientCache`], + CodecSpecification: [, __expectString, `codecSpecification`], + ConstantIv: [, __expectString, `constantIv`], + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + DirectoryStructure: [, __expectString, `directoryStructure`], + DiscontinuityTags: [, __expectString, `discontinuityTags`], + EncryptionType: [, __expectString, `encryptionType`], + HlsCdnSettings: (_) => [, de_HlsCdnSettings(_, context), `hlsCdnSettings`], + HlsId3SegmentTagging: [, __expectString, `hlsId3SegmentTagging`], + IFrameOnlyPlaylists: [, __expectString, `iFrameOnlyPlaylists`], + IncompleteSegmentBehavior: [, __expectString, `incompleteSegmentBehavior`], + IndexNSegments: [, __expectInt32, `indexNSegments`], + InputLossAction: [, __expectString, `inputLossAction`], + IvInManifest: [, __expectString, `ivInManifest`], + IvSource: [, __expectString, `ivSource`], + KeepSegments: [, __expectInt32, `keepSegments`], + KeyFormat: [, __expectString, `keyFormat`], + KeyFormatVersions: [, __expectString, `keyFormatVersions`], + KeyProviderSettings: (_) => [, de_KeyProviderSettings(_, context), `keyProviderSettings`], + ManifestCompression: [, __expectString, `manifestCompression`], + ManifestDurationFormat: [, __expectString, `manifestDurationFormat`], + MinSegmentLength: [, __expectInt32, `minSegmentLength`], + Mode: [, __expectString, `mode`], + OutputSelection: [, __expectString, `outputSelection`], + ProgramDateTime: [, __expectString, `programDateTime`], + ProgramDateTimeClock: [, __expectString, `programDateTimeClock`], + ProgramDateTimePeriod: [, __expectInt32, `programDateTimePeriod`], + RedundantManifest: [, __expectString, `redundantManifest`], + SegmentLength: [, __expectInt32, `segmentLength`], + SegmentationMode: [, __expectString, `segmentationMode`], + SegmentsPerSubdirectory: [, __expectInt32, `segmentsPerSubdirectory`], + StreamInfResolution: [, __expectString, `streamInfResolution`], + TimedMetadataId3Frame: [, __expectString, `timedMetadataId3Frame`], + TimedMetadataId3Period: [, __expectInt32, `timedMetadataId3Period`], + TimestampDeltaMilliseconds: [, __expectInt32, `timestampDeltaMilliseconds`], + TsFileMode: [, __expectString, `tsFileMode`], + }) as any; }; /** @@ -11920,74 +10662,69 @@ const de_HlsId3SegmentTaggingScheduleActionSettings = ( output: any, context: __SerdeContext ): HlsId3SegmentTaggingScheduleActionSettings => { - return { - Id3: __expectString(output.id3), - Tag: __expectString(output.tag), - } as any; + return take(output, { + Id3: [, __expectString, `id3`], + Tag: [, __expectString, `tag`], + }) as any; }; /** * deserializeAws_restJson1HlsInputSettings */ const de_HlsInputSettings = (output: any, context: __SerdeContext): HlsInputSettings => { - return { - Bandwidth: __expectInt32(output.bandwidth), - BufferSegments: __expectInt32(output.bufferSegments), - Retries: __expectInt32(output.retries), - RetryInterval: __expectInt32(output.retryInterval), - Scte35Source: __expectString(output.scte35Source), - } as any; + return take(output, { + Bandwidth: [, __expectInt32, `bandwidth`], + BufferSegments: [, __expectInt32, `bufferSegments`], + Retries: [, __expectInt32, `retries`], + RetryInterval: [, __expectInt32, `retryInterval`], + Scte35Source: [, __expectString, `scte35Source`], + }) as any; }; /** * deserializeAws_restJson1HlsMediaStoreSettings */ const de_HlsMediaStoreSettings = (output: any, context: __SerdeContext): HlsMediaStoreSettings => { - return { - ConnectionRetryInterval: __expectInt32(output.connectionRetryInterval), - FilecacheDuration: __expectInt32(output.filecacheDuration), - MediaStoreStorageClass: __expectString(output.mediaStoreStorageClass), - NumRetries: __expectInt32(output.numRetries), - RestartDelay: __expectInt32(output.restartDelay), - } as any; + return take(output, { + ConnectionRetryInterval: [, __expectInt32, `connectionRetryInterval`], + FilecacheDuration: [, __expectInt32, `filecacheDuration`], + MediaStoreStorageClass: [, __expectString, `mediaStoreStorageClass`], + NumRetries: [, __expectInt32, `numRetries`], + RestartDelay: [, __expectInt32, `restartDelay`], + }) as any; }; /** * deserializeAws_restJson1HlsOutputSettings */ const de_HlsOutputSettings = (output: any, context: __SerdeContext): HlsOutputSettings => { - return { - H265PackagingType: __expectString(output.h265PackagingType), - HlsSettings: output.hlsSettings != null ? de_HlsSettings(output.hlsSettings, context) : undefined, - NameModifier: __expectString(output.nameModifier), - SegmentModifier: __expectString(output.segmentModifier), - } as any; + return take(output, { + H265PackagingType: [, __expectString, `h265PackagingType`], + HlsSettings: (_) => [, de_HlsSettings(_, context), `hlsSettings`], + NameModifier: [, __expectString, `nameModifier`], + SegmentModifier: [, __expectString, `segmentModifier`], + }) as any; }; /** * deserializeAws_restJson1HlsS3Settings */ const de_HlsS3Settings = (output: any, context: __SerdeContext): HlsS3Settings => { - return { - CannedAcl: __expectString(output.cannedAcl), - } as any; + return take(output, { + CannedAcl: [, __expectString, `cannedAcl`], + }) as any; }; /** * deserializeAws_restJson1HlsSettings */ const de_HlsSettings = (output: any, context: __SerdeContext): HlsSettings => { - return { - AudioOnlyHlsSettings: - output.audioOnlyHlsSettings != null ? de_AudioOnlyHlsSettings(output.audioOnlyHlsSettings, context) : undefined, - Fmp4HlsSettings: output.fmp4HlsSettings != null ? de_Fmp4HlsSettings(output.fmp4HlsSettings, context) : undefined, - FrameCaptureHlsSettings: - output.frameCaptureHlsSettings != null - ? de_FrameCaptureHlsSettings(output.frameCaptureHlsSettings, context) - : undefined, - StandardHlsSettings: - output.standardHlsSettings != null ? de_StandardHlsSettings(output.standardHlsSettings, context) : undefined, - } as any; + return take(output, { + AudioOnlyHlsSettings: (_) => [, de_AudioOnlyHlsSettings(_, context), `audioOnlyHlsSettings`], + Fmp4HlsSettings: (_) => [, de_Fmp4HlsSettings(_, context), `fmp4HlsSettings`], + FrameCaptureHlsSettings: [, _json, `frameCaptureHlsSettings`], + StandardHlsSettings: (_) => [, de_StandardHlsSettings(_, context), `standardHlsSettings`], + }) as any; }; /** @@ -11997,238 +10734,219 @@ const de_HlsTimedMetadataScheduleActionSettings = ( output: any, context: __SerdeContext ): HlsTimedMetadataScheduleActionSettings => { - return { - Id3: __expectString(output.id3), - } as any; + return take(output, { + Id3: [, __expectString, `id3`], + }) as any; }; /** * deserializeAws_restJson1HlsWebdavSettings */ const de_HlsWebdavSettings = (output: any, context: __SerdeContext): HlsWebdavSettings => { - return { - ConnectionRetryInterval: __expectInt32(output.connectionRetryInterval), - FilecacheDuration: __expectInt32(output.filecacheDuration), - HttpTransferMode: __expectString(output.httpTransferMode), - NumRetries: __expectInt32(output.numRetries), - RestartDelay: __expectInt32(output.restartDelay), - } as any; + return take(output, { + ConnectionRetryInterval: [, __expectInt32, `connectionRetryInterval`], + FilecacheDuration: [, __expectInt32, `filecacheDuration`], + HttpTransferMode: [, __expectString, `httpTransferMode`], + NumRetries: [, __expectInt32, `numRetries`], + RestartDelay: [, __expectInt32, `restartDelay`], + }) as any; }; -/** - * deserializeAws_restJson1HtmlMotionGraphicsSettings - */ -const de_HtmlMotionGraphicsSettings = (output: any, context: __SerdeContext): HtmlMotionGraphicsSettings => { - return {} as any; -}; +// de_HtmlMotionGraphicsSettings omitted. -/** - * deserializeAws_restJson1ImmediateModeScheduleActionStartSettings - */ -const de_ImmediateModeScheduleActionStartSettings = ( - output: any, - context: __SerdeContext -): ImmediateModeScheduleActionStartSettings => { - return {} as any; -}; +// de_ImmediateModeScheduleActionStartSettings omitted. /** * deserializeAws_restJson1Input */ const de_Input = (output: any, context: __SerdeContext): Input => { - return { - Arn: __expectString(output.arn), - AttachedChannels: - output.attachedChannels != null ? de___listOf__string(output.attachedChannels, context) : undefined, - Destinations: output.destinations != null ? de___listOfInputDestination(output.destinations, context) : undefined, - Id: __expectString(output.id), - InputClass: __expectString(output.inputClass), - InputDevices: - output.inputDevices != null ? de___listOfInputDeviceSettings(output.inputDevices, context) : undefined, - InputPartnerIds: output.inputPartnerIds != null ? de___listOf__string(output.inputPartnerIds, context) : undefined, - InputSourceType: __expectString(output.inputSourceType), - MediaConnectFlows: - output.mediaConnectFlows != null ? de___listOfMediaConnectFlow(output.mediaConnectFlows, context) : undefined, - Name: __expectString(output.name), - RoleArn: __expectString(output.roleArn), - SecurityGroups: output.securityGroups != null ? de___listOf__string(output.securityGroups, context) : undefined, - Sources: output.sources != null ? de___listOfInputSource(output.sources, context) : undefined, - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + AttachedChannels: [, _json, `attachedChannels`], + Destinations: (_) => [, de___listOfInputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + InputClass: [, __expectString, `inputClass`], + InputDevices: (_) => [, de___listOfInputDeviceSettings(_, context), `inputDevices`], + InputPartnerIds: [, _json, `inputPartnerIds`], + InputSourceType: [, __expectString, `inputSourceType`], + MediaConnectFlows: (_) => [, de___listOfMediaConnectFlow(_, context), `mediaConnectFlows`], + Name: [, __expectString, `name`], + RoleArn: [, __expectString, `roleArn`], + SecurityGroups: [, _json, `securityGroups`], + Sources: (_) => [, de___listOfInputSource(_, context), `sources`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1InputAttachment */ const de_InputAttachment = (output: any, context: __SerdeContext): InputAttachment => { - return { - AutomaticInputFailoverSettings: - output.automaticInputFailoverSettings != null - ? de_AutomaticInputFailoverSettings(output.automaticInputFailoverSettings, context) - : undefined, - InputAttachmentName: __expectString(output.inputAttachmentName), - InputId: __expectString(output.inputId), - InputSettings: output.inputSettings != null ? de_InputSettings(output.inputSettings, context) : undefined, - } as any; + return take(output, { + AutomaticInputFailoverSettings: (_) => [ + , + de_AutomaticInputFailoverSettings(_, context), + `automaticInputFailoverSettings`, + ], + InputAttachmentName: [, __expectString, `inputAttachmentName`], + InputId: [, __expectString, `inputId`], + InputSettings: (_) => [, de_InputSettings(_, context), `inputSettings`], + }) as any; }; /** * deserializeAws_restJson1InputChannelLevel */ const de_InputChannelLevel = (output: any, context: __SerdeContext): InputChannelLevel => { - return { - Gain: __expectInt32(output.gain), - InputChannel: __expectInt32(output.inputChannel), - } as any; + return take(output, { + Gain: [, __expectInt32, `gain`], + InputChannel: [, __expectInt32, `inputChannel`], + }) as any; }; /** * deserializeAws_restJson1InputClippingSettings */ const de_InputClippingSettings = (output: any, context: __SerdeContext): InputClippingSettings => { - return { - InputTimecodeSource: __expectString(output.inputTimecodeSource), - StartTimecode: output.startTimecode != null ? de_StartTimecode(output.startTimecode, context) : undefined, - StopTimecode: output.stopTimecode != null ? de_StopTimecode(output.stopTimecode, context) : undefined, - } as any; + return take(output, { + InputTimecodeSource: [, __expectString, `inputTimecodeSource`], + StartTimecode: (_) => [, de_StartTimecode(_, context), `startTimecode`], + StopTimecode: (_) => [, de_StopTimecode(_, context), `stopTimecode`], + }) as any; }; /** * deserializeAws_restJson1InputDestination */ const de_InputDestination = (output: any, context: __SerdeContext): InputDestination => { - return { - Ip: __expectString(output.ip), - Port: __expectString(output.port), - Url: __expectString(output.url), - Vpc: output.vpc != null ? de_InputDestinationVpc(output.vpc, context) : undefined, - } as any; + return take(output, { + Ip: [, __expectString, `ip`], + Port: [, __expectString, `port`], + Url: [, __expectString, `url`], + Vpc: (_) => [, de_InputDestinationVpc(_, context), `vpc`], + }) as any; }; /** * deserializeAws_restJson1InputDestinationVpc */ const de_InputDestinationVpc = (output: any, context: __SerdeContext): InputDestinationVpc => { - return { - AvailabilityZone: __expectString(output.availabilityZone), - NetworkInterfaceId: __expectString(output.networkInterfaceId), - } as any; + return take(output, { + AvailabilityZone: [, __expectString, `availabilityZone`], + NetworkInterfaceId: [, __expectString, `networkInterfaceId`], + }) as any; }; /** * deserializeAws_restJson1InputDeviceHdSettings */ const de_InputDeviceHdSettings = (output: any, context: __SerdeContext): InputDeviceHdSettings => { - return { - ActiveInput: __expectString(output.activeInput), - ConfiguredInput: __expectString(output.configuredInput), - DeviceState: __expectString(output.deviceState), - Framerate: __limitedParseDouble(output.framerate), - Height: __expectInt32(output.height), - LatencyMs: __expectInt32(output.latencyMs), - MaxBitrate: __expectInt32(output.maxBitrate), - ScanType: __expectString(output.scanType), - Width: __expectInt32(output.width), - } as any; + return take(output, { + ActiveInput: [, __expectString, `activeInput`], + ConfiguredInput: [, __expectString, `configuredInput`], + DeviceState: [, __expectString, `deviceState`], + Framerate: [, __limitedParseDouble, `framerate`], + Height: [, __expectInt32, `height`], + LatencyMs: [, __expectInt32, `latencyMs`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + ScanType: [, __expectString, `scanType`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1InputDeviceNetworkSettings */ const de_InputDeviceNetworkSettings = (output: any, context: __SerdeContext): InputDeviceNetworkSettings => { - return { - DnsAddresses: output.dnsAddresses != null ? de___listOf__string(output.dnsAddresses, context) : undefined, - Gateway: __expectString(output.gateway), - IpAddress: __expectString(output.ipAddress), - IpScheme: __expectString(output.ipScheme), - SubnetMask: __expectString(output.subnetMask), - } as any; + return take(output, { + DnsAddresses: [, _json, `dnsAddresses`], + Gateway: [, __expectString, `gateway`], + IpAddress: [, __expectString, `ipAddress`], + IpScheme: [, __expectString, `ipScheme`], + SubnetMask: [, __expectString, `subnetMask`], + }) as any; }; /** * deserializeAws_restJson1InputDeviceSettings */ const de_InputDeviceSettings = (output: any, context: __SerdeContext): InputDeviceSettings => { - return { - Id: __expectString(output.id), - } as any; + return take(output, { + Id: [, __expectString, `id`], + }) as any; }; /** * deserializeAws_restJson1InputDeviceSummary */ const de_InputDeviceSummary = (output: any, context: __SerdeContext): InputDeviceSummary => { - return { - Arn: __expectString(output.arn), - ConnectionState: __expectString(output.connectionState), - DeviceSettingsSyncState: __expectString(output.deviceSettingsSyncState), - DeviceUpdateStatus: __expectString(output.deviceUpdateStatus), - HdDeviceSettings: - output.hdDeviceSettings != null ? de_InputDeviceHdSettings(output.hdDeviceSettings, context) : undefined, - Id: __expectString(output.id), - MacAddress: __expectString(output.macAddress), - Name: __expectString(output.name), - NetworkSettings: - output.networkSettings != null ? de_InputDeviceNetworkSettings(output.networkSettings, context) : undefined, - SerialNumber: __expectString(output.serialNumber), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - Type: __expectString(output.type), - UhdDeviceSettings: - output.uhdDeviceSettings != null ? de_InputDeviceUhdSettings(output.uhdDeviceSettings, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + ConnectionState: [, __expectString, `connectionState`], + DeviceSettingsSyncState: [, __expectString, `deviceSettingsSyncState`], + DeviceUpdateStatus: [, __expectString, `deviceUpdateStatus`], + HdDeviceSettings: (_) => [, de_InputDeviceHdSettings(_, context), `hdDeviceSettings`], + Id: [, __expectString, `id`], + MacAddress: [, __expectString, `macAddress`], + Name: [, __expectString, `name`], + NetworkSettings: (_) => [, de_InputDeviceNetworkSettings(_, context), `networkSettings`], + SerialNumber: [, __expectString, `serialNumber`], + Tags: [, _json, `tags`], + Type: [, __expectString, `type`], + UhdDeviceSettings: (_) => [, de_InputDeviceUhdSettings(_, context), `uhdDeviceSettings`], + }) as any; }; /** * deserializeAws_restJson1InputDeviceUhdSettings */ const de_InputDeviceUhdSettings = (output: any, context: __SerdeContext): InputDeviceUhdSettings => { - return { - ActiveInput: __expectString(output.activeInput), - ConfiguredInput: __expectString(output.configuredInput), - DeviceState: __expectString(output.deviceState), - Framerate: __limitedParseDouble(output.framerate), - Height: __expectInt32(output.height), - LatencyMs: __expectInt32(output.latencyMs), - MaxBitrate: __expectInt32(output.maxBitrate), - ScanType: __expectString(output.scanType), - Width: __expectInt32(output.width), - } as any; + return take(output, { + ActiveInput: [, __expectString, `activeInput`], + ConfiguredInput: [, __expectString, `configuredInput`], + DeviceState: [, __expectString, `deviceState`], + Framerate: [, __limitedParseDouble, `framerate`], + Height: [, __expectInt32, `height`], + LatencyMs: [, __expectInt32, `latencyMs`], + MaxBitrate: [, __expectInt32, `maxBitrate`], + ScanType: [, __expectString, `scanType`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1InputLocation */ const de_InputLocation = (output: any, context: __SerdeContext): InputLocation => { - return { - PasswordParam: __expectString(output.passwordParam), - Uri: __expectString(output.uri), - Username: __expectString(output.username), - } as any; + return take(output, { + PasswordParam: [, __expectString, `passwordParam`], + Uri: [, __expectString, `uri`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1InputLossBehavior */ const de_InputLossBehavior = (output: any, context: __SerdeContext): InputLossBehavior => { - return { - BlackFrameMsec: __expectInt32(output.blackFrameMsec), - InputLossImageColor: __expectString(output.inputLossImageColor), - InputLossImageSlate: - output.inputLossImageSlate != null ? de_InputLocation(output.inputLossImageSlate, context) : undefined, - InputLossImageType: __expectString(output.inputLossImageType), - RepeatFrameMsec: __expectInt32(output.repeatFrameMsec), - } as any; + return take(output, { + BlackFrameMsec: [, __expectInt32, `blackFrameMsec`], + InputLossImageColor: [, __expectString, `inputLossImageColor`], + InputLossImageSlate: (_) => [, de_InputLocation(_, context), `inputLossImageSlate`], + InputLossImageType: [, __expectString, `inputLossImageType`], + RepeatFrameMsec: [, __expectInt32, `repeatFrameMsec`], + }) as any; }; /** * deserializeAws_restJson1InputLossFailoverSettings */ const de_InputLossFailoverSettings = (output: any, context: __SerdeContext): InputLossFailoverSettings => { - return { - InputLossThresholdMsec: __expectInt32(output.inputLossThresholdMsec), - } as any; + return take(output, { + InputLossThresholdMsec: [, __expectInt32, `inputLossThresholdMsec`], + }) as any; }; /** @@ -12238,73 +10956,66 @@ const de_InputPrepareScheduleActionSettings = ( output: any, context: __SerdeContext ): InputPrepareScheduleActionSettings => { - return { - InputAttachmentNameReference: __expectString(output.inputAttachmentNameReference), - InputClippingSettings: - output.inputClippingSettings != null - ? de_InputClippingSettings(output.inputClippingSettings, context) - : undefined, - UrlPath: output.urlPath != null ? de___listOf__string(output.urlPath, context) : undefined, - } as any; + return take(output, { + InputAttachmentNameReference: [, __expectString, `inputAttachmentNameReference`], + InputClippingSettings: (_) => [, de_InputClippingSettings(_, context), `inputClippingSettings`], + UrlPath: [, _json, `urlPath`], + }) as any; }; /** * deserializeAws_restJson1InputSecurityGroup */ const de_InputSecurityGroup = (output: any, context: __SerdeContext): InputSecurityGroup => { - return { - Arn: __expectString(output.arn), - Id: __expectString(output.id), - Inputs: output.inputs != null ? de___listOf__string(output.inputs, context) : undefined, - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - WhitelistRules: - output.whitelistRules != null ? de___listOfInputWhitelistRule(output.whitelistRules, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Id: [, __expectString, `id`], + Inputs: [, _json, `inputs`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + WhitelistRules: (_) => [, de___listOfInputWhitelistRule(_, context), `whitelistRules`], + }) as any; }; /** * deserializeAws_restJson1InputSettings */ const de_InputSettings = (output: any, context: __SerdeContext): InputSettings => { - return { - AudioSelectors: - output.audioSelectors != null ? de___listOfAudioSelector(output.audioSelectors, context) : undefined, - CaptionSelectors: - output.captionSelectors != null ? de___listOfCaptionSelector(output.captionSelectors, context) : undefined, - DeblockFilter: __expectString(output.deblockFilter), - DenoiseFilter: __expectString(output.denoiseFilter), - FilterStrength: __expectInt32(output.filterStrength), - InputFilter: __expectString(output.inputFilter), - NetworkInputSettings: - output.networkInputSettings != null ? de_NetworkInputSettings(output.networkInputSettings, context) : undefined, - Scte35Pid: __expectInt32(output.scte35Pid), - Smpte2038DataPreference: __expectString(output.smpte2038DataPreference), - SourceEndBehavior: __expectString(output.sourceEndBehavior), - VideoSelector: output.videoSelector != null ? de_VideoSelector(output.videoSelector, context) : undefined, - } as any; + return take(output, { + AudioSelectors: (_) => [, de___listOfAudioSelector(_, context), `audioSelectors`], + CaptionSelectors: (_) => [, de___listOfCaptionSelector(_, context), `captionSelectors`], + DeblockFilter: [, __expectString, `deblockFilter`], + DenoiseFilter: [, __expectString, `denoiseFilter`], + FilterStrength: [, __expectInt32, `filterStrength`], + InputFilter: [, __expectString, `inputFilter`], + NetworkInputSettings: (_) => [, de_NetworkInputSettings(_, context), `networkInputSettings`], + Scte35Pid: [, __expectInt32, `scte35Pid`], + Smpte2038DataPreference: [, __expectString, `smpte2038DataPreference`], + SourceEndBehavior: [, __expectString, `sourceEndBehavior`], + VideoSelector: (_) => [, de_VideoSelector(_, context), `videoSelector`], + }) as any; }; /** * deserializeAws_restJson1InputSource */ const de_InputSource = (output: any, context: __SerdeContext): InputSource => { - return { - PasswordParam: __expectString(output.passwordParam), - Url: __expectString(output.url), - Username: __expectString(output.username), - } as any; + return take(output, { + PasswordParam: [, __expectString, `passwordParam`], + Url: [, __expectString, `url`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1InputSpecification */ const de_InputSpecification = (output: any, context: __SerdeContext): InputSpecification => { - return { - Codec: __expectString(output.codec), - MaximumBitrate: __expectString(output.maximumBitrate), - Resolution: __expectString(output.resolution), - } as any; + return take(output, { + Codec: [, __expectString, `codec`], + MaximumBitrate: [, __expectString, `maximumBitrate`], + Resolution: [, __expectString, `resolution`], + }) as any; }; /** @@ -12314,144 +11025,140 @@ const de_InputSwitchScheduleActionSettings = ( output: any, context: __SerdeContext ): InputSwitchScheduleActionSettings => { - return { - InputAttachmentNameReference: __expectString(output.inputAttachmentNameReference), - InputClippingSettings: - output.inputClippingSettings != null - ? de_InputClippingSettings(output.inputClippingSettings, context) - : undefined, - UrlPath: output.urlPath != null ? de___listOf__string(output.urlPath, context) : undefined, - } as any; + return take(output, { + InputAttachmentNameReference: [, __expectString, `inputAttachmentNameReference`], + InputClippingSettings: (_) => [, de_InputClippingSettings(_, context), `inputClippingSettings`], + UrlPath: [, _json, `urlPath`], + }) as any; }; /** * deserializeAws_restJson1InputWhitelistRule */ const de_InputWhitelistRule = (output: any, context: __SerdeContext): InputWhitelistRule => { - return { - Cidr: __expectString(output.cidr), - } as any; + return take(output, { + Cidr: [, __expectString, `cidr`], + }) as any; }; /** * deserializeAws_restJson1KeyProviderSettings */ const de_KeyProviderSettings = (output: any, context: __SerdeContext): KeyProviderSettings => { - return { - StaticKeySettings: - output.staticKeySettings != null ? de_StaticKeySettings(output.staticKeySettings, context) : undefined, - } as any; + return take(output, { + StaticKeySettings: (_) => [, de_StaticKeySettings(_, context), `staticKeySettings`], + }) as any; }; /** * deserializeAws_restJson1M2tsSettings */ const de_M2tsSettings = (output: any, context: __SerdeContext): M2tsSettings => { - return { - AbsentInputAudioBehavior: __expectString(output.absentInputAudioBehavior), - Arib: __expectString(output.arib), - AribCaptionsPid: __expectString(output.aribCaptionsPid), - AribCaptionsPidControl: __expectString(output.aribCaptionsPidControl), - AudioBufferModel: __expectString(output.audioBufferModel), - AudioFramesPerPes: __expectInt32(output.audioFramesPerPes), - AudioPids: __expectString(output.audioPids), - AudioStreamType: __expectString(output.audioStreamType), - Bitrate: __expectInt32(output.bitrate), - BufferModel: __expectString(output.bufferModel), - CcDescriptor: __expectString(output.ccDescriptor), - DvbNitSettings: output.dvbNitSettings != null ? de_DvbNitSettings(output.dvbNitSettings, context) : undefined, - DvbSdtSettings: output.dvbSdtSettings != null ? de_DvbSdtSettings(output.dvbSdtSettings, context) : undefined, - DvbSubPids: __expectString(output.dvbSubPids), - DvbTdtSettings: output.dvbTdtSettings != null ? de_DvbTdtSettings(output.dvbTdtSettings, context) : undefined, - DvbTeletextPid: __expectString(output.dvbTeletextPid), - Ebif: __expectString(output.ebif), - EbpAudioInterval: __expectString(output.ebpAudioInterval), - EbpLookaheadMs: __expectInt32(output.ebpLookaheadMs), - EbpPlacement: __expectString(output.ebpPlacement), - EcmPid: __expectString(output.ecmPid), - EsRateInPes: __expectString(output.esRateInPes), - EtvPlatformPid: __expectString(output.etvPlatformPid), - EtvSignalPid: __expectString(output.etvSignalPid), - FragmentTime: __limitedParseDouble(output.fragmentTime), - Klv: __expectString(output.klv), - KlvDataPids: __expectString(output.klvDataPids), - NielsenId3Behavior: __expectString(output.nielsenId3Behavior), - NullPacketBitrate: __limitedParseDouble(output.nullPacketBitrate), - PatInterval: __expectInt32(output.patInterval), - PcrControl: __expectString(output.pcrControl), - PcrPeriod: __expectInt32(output.pcrPeriod), - PcrPid: __expectString(output.pcrPid), - PmtInterval: __expectInt32(output.pmtInterval), - PmtPid: __expectString(output.pmtPid), - ProgramNum: __expectInt32(output.programNum), - RateMode: __expectString(output.rateMode), - Scte27Pids: __expectString(output.scte27Pids), - Scte35Control: __expectString(output.scte35Control), - Scte35Pid: __expectString(output.scte35Pid), - Scte35PrerollPullupMilliseconds: __limitedParseDouble(output.scte35PrerollPullupMilliseconds), - SegmentationMarkers: __expectString(output.segmentationMarkers), - SegmentationStyle: __expectString(output.segmentationStyle), - SegmentationTime: __limitedParseDouble(output.segmentationTime), - TimedMetadataBehavior: __expectString(output.timedMetadataBehavior), - TimedMetadataPid: __expectString(output.timedMetadataPid), - TransportStreamId: __expectInt32(output.transportStreamId), - VideoPid: __expectString(output.videoPid), - } as any; + return take(output, { + AbsentInputAudioBehavior: [, __expectString, `absentInputAudioBehavior`], + Arib: [, __expectString, `arib`], + AribCaptionsPid: [, __expectString, `aribCaptionsPid`], + AribCaptionsPidControl: [, __expectString, `aribCaptionsPidControl`], + AudioBufferModel: [, __expectString, `audioBufferModel`], + AudioFramesPerPes: [, __expectInt32, `audioFramesPerPes`], + AudioPids: [, __expectString, `audioPids`], + AudioStreamType: [, __expectString, `audioStreamType`], + Bitrate: [, __expectInt32, `bitrate`], + BufferModel: [, __expectString, `bufferModel`], + CcDescriptor: [, __expectString, `ccDescriptor`], + DvbNitSettings: (_) => [, de_DvbNitSettings(_, context), `dvbNitSettings`], + DvbSdtSettings: (_) => [, de_DvbSdtSettings(_, context), `dvbSdtSettings`], + DvbSubPids: [, __expectString, `dvbSubPids`], + DvbTdtSettings: (_) => [, de_DvbTdtSettings(_, context), `dvbTdtSettings`], + DvbTeletextPid: [, __expectString, `dvbTeletextPid`], + Ebif: [, __expectString, `ebif`], + EbpAudioInterval: [, __expectString, `ebpAudioInterval`], + EbpLookaheadMs: [, __expectInt32, `ebpLookaheadMs`], + EbpPlacement: [, __expectString, `ebpPlacement`], + EcmPid: [, __expectString, `ecmPid`], + EsRateInPes: [, __expectString, `esRateInPes`], + EtvPlatformPid: [, __expectString, `etvPlatformPid`], + EtvSignalPid: [, __expectString, `etvSignalPid`], + FragmentTime: [, __limitedParseDouble, `fragmentTime`], + Klv: [, __expectString, `klv`], + KlvDataPids: [, __expectString, `klvDataPids`], + NielsenId3Behavior: [, __expectString, `nielsenId3Behavior`], + NullPacketBitrate: [, __limitedParseDouble, `nullPacketBitrate`], + PatInterval: [, __expectInt32, `patInterval`], + PcrControl: [, __expectString, `pcrControl`], + PcrPeriod: [, __expectInt32, `pcrPeriod`], + PcrPid: [, __expectString, `pcrPid`], + PmtInterval: [, __expectInt32, `pmtInterval`], + PmtPid: [, __expectString, `pmtPid`], + ProgramNum: [, __expectInt32, `programNum`], + RateMode: [, __expectString, `rateMode`], + Scte27Pids: [, __expectString, `scte27Pids`], + Scte35Control: [, __expectString, `scte35Control`], + Scte35Pid: [, __expectString, `scte35Pid`], + Scte35PrerollPullupMilliseconds: [, __limitedParseDouble, `scte35PrerollPullupMilliseconds`], + SegmentationMarkers: [, __expectString, `segmentationMarkers`], + SegmentationStyle: [, __expectString, `segmentationStyle`], + SegmentationTime: [, __limitedParseDouble, `segmentationTime`], + TimedMetadataBehavior: [, __expectString, `timedMetadataBehavior`], + TimedMetadataPid: [, __expectString, `timedMetadataPid`], + TransportStreamId: [, __expectInt32, `transportStreamId`], + VideoPid: [, __expectString, `videoPid`], + }) as any; }; /** * deserializeAws_restJson1M3u8Settings */ const de_M3u8Settings = (output: any, context: __SerdeContext): M3u8Settings => { - return { - AudioFramesPerPes: __expectInt32(output.audioFramesPerPes), - AudioPids: __expectString(output.audioPids), - EcmPid: __expectString(output.ecmPid), - NielsenId3Behavior: __expectString(output.nielsenId3Behavior), - PatInterval: __expectInt32(output.patInterval), - PcrControl: __expectString(output.pcrControl), - PcrPeriod: __expectInt32(output.pcrPeriod), - PcrPid: __expectString(output.pcrPid), - PmtInterval: __expectInt32(output.pmtInterval), - PmtPid: __expectString(output.pmtPid), - ProgramNum: __expectInt32(output.programNum), - Scte35Behavior: __expectString(output.scte35Behavior), - Scte35Pid: __expectString(output.scte35Pid), - TimedMetadataBehavior: __expectString(output.timedMetadataBehavior), - TimedMetadataPid: __expectString(output.timedMetadataPid), - TransportStreamId: __expectInt32(output.transportStreamId), - VideoPid: __expectString(output.videoPid), - } as any; + return take(output, { + AudioFramesPerPes: [, __expectInt32, `audioFramesPerPes`], + AudioPids: [, __expectString, `audioPids`], + EcmPid: [, __expectString, `ecmPid`], + NielsenId3Behavior: [, __expectString, `nielsenId3Behavior`], + PatInterval: [, __expectInt32, `patInterval`], + PcrControl: [, __expectString, `pcrControl`], + PcrPeriod: [, __expectInt32, `pcrPeriod`], + PcrPid: [, __expectString, `pcrPid`], + PmtInterval: [, __expectInt32, `pmtInterval`], + PmtPid: [, __expectString, `pmtPid`], + ProgramNum: [, __expectInt32, `programNum`], + Scte35Behavior: [, __expectString, `scte35Behavior`], + Scte35Pid: [, __expectString, `scte35Pid`], + TimedMetadataBehavior: [, __expectString, `timedMetadataBehavior`], + TimedMetadataPid: [, __expectString, `timedMetadataPid`], + TransportStreamId: [, __expectInt32, `transportStreamId`], + VideoPid: [, __expectString, `videoPid`], + }) as any; }; /** * deserializeAws_restJson1MaintenanceStatus */ const de_MaintenanceStatus = (output: any, context: __SerdeContext): MaintenanceStatus => { - return { - MaintenanceDay: __expectString(output.maintenanceDay), - MaintenanceDeadline: __expectString(output.maintenanceDeadline), - MaintenanceScheduledDate: __expectString(output.maintenanceScheduledDate), - MaintenanceStartTime: __expectString(output.maintenanceStartTime), - } as any; + return take(output, { + MaintenanceDay: [, __expectString, `maintenanceDay`], + MaintenanceDeadline: [, __expectString, `maintenanceDeadline`], + MaintenanceScheduledDate: [, __expectString, `maintenanceScheduledDate`], + MaintenanceStartTime: [, __expectString, `maintenanceStartTime`], + }) as any; }; /** * deserializeAws_restJson1MediaConnectFlow */ const de_MediaConnectFlow = (output: any, context: __SerdeContext): MediaConnectFlow => { - return { - FlowArn: __expectString(output.flowArn), - } as any; + return take(output, { + FlowArn: [, __expectString, `flowArn`], + }) as any; }; /** * deserializeAws_restJson1MediaPackageGroupSettings */ const de_MediaPackageGroupSettings = (output: any, context: __SerdeContext): MediaPackageGroupSettings => { - return { - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - } as any; + return take(output, { + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + }) as any; }; /** @@ -12461,17 +11168,12 @@ const de_MediaPackageOutputDestinationSettings = ( output: any, context: __SerdeContext ): MediaPackageOutputDestinationSettings => { - return { - ChannelId: __expectString(output.channelId), - } as any; + return take(output, { + ChannelId: [, __expectString, `channelId`], + }) as any; }; -/** - * deserializeAws_restJson1MediaPackageOutputSettings - */ -const de_MediaPackageOutputSettings = (output: any, context: __SerdeContext): MediaPackageOutputSettings => { - return {} as any; -}; +// de_MediaPackageOutputSettings omitted. /** * deserializeAws_restJson1MotionGraphicsActivateScheduleActionSettings @@ -12480,164 +11182,136 @@ const de_MotionGraphicsActivateScheduleActionSettings = ( output: any, context: __SerdeContext ): MotionGraphicsActivateScheduleActionSettings => { - return { - Duration: __expectLong(output.duration), - PasswordParam: __expectString(output.passwordParam), - Url: __expectString(output.url), - Username: __expectString(output.username), - } as any; + return take(output, { + Duration: [, __expectLong, `duration`], + PasswordParam: [, __expectString, `passwordParam`], + Url: [, __expectString, `url`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1MotionGraphicsConfiguration */ const de_MotionGraphicsConfiguration = (output: any, context: __SerdeContext): MotionGraphicsConfiguration => { - return { - MotionGraphicsInsertion: __expectString(output.motionGraphicsInsertion), - MotionGraphicsSettings: - output.motionGraphicsSettings != null - ? de_MotionGraphicsSettings(output.motionGraphicsSettings, context) - : undefined, - } as any; + return take(output, { + MotionGraphicsInsertion: [, __expectString, `motionGraphicsInsertion`], + MotionGraphicsSettings: (_) => [, de_MotionGraphicsSettings(_, context), `motionGraphicsSettings`], + }) as any; }; -/** - * deserializeAws_restJson1MotionGraphicsDeactivateScheduleActionSettings - */ -const de_MotionGraphicsDeactivateScheduleActionSettings = ( - output: any, - context: __SerdeContext -): MotionGraphicsDeactivateScheduleActionSettings => { - return {} as any; -}; +// de_MotionGraphicsDeactivateScheduleActionSettings omitted. /** * deserializeAws_restJson1MotionGraphicsSettings */ const de_MotionGraphicsSettings = (output: any, context: __SerdeContext): MotionGraphicsSettings => { - return { - HtmlMotionGraphicsSettings: - output.htmlMotionGraphicsSettings != null - ? de_HtmlMotionGraphicsSettings(output.htmlMotionGraphicsSettings, context) - : undefined, - } as any; + return take(output, { + HtmlMotionGraphicsSettings: [, _json, `htmlMotionGraphicsSettings`], + }) as any; }; /** * deserializeAws_restJson1Mp2Settings */ const de_Mp2Settings = (output: any, context: __SerdeContext): Mp2Settings => { - return { - Bitrate: __limitedParseDouble(output.bitrate), - CodingMode: __expectString(output.codingMode), - SampleRate: __limitedParseDouble(output.sampleRate), - } as any; + return take(output, { + Bitrate: [, __limitedParseDouble, `bitrate`], + CodingMode: [, __expectString, `codingMode`], + SampleRate: [, __limitedParseDouble, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1Mpeg2FilterSettings */ const de_Mpeg2FilterSettings = (output: any, context: __SerdeContext): Mpeg2FilterSettings => { - return { - TemporalFilterSettings: - output.temporalFilterSettings != null - ? de_TemporalFilterSettings(output.temporalFilterSettings, context) - : undefined, - } as any; + return take(output, { + TemporalFilterSettings: (_) => [, de_TemporalFilterSettings(_, context), `temporalFilterSettings`], + }) as any; }; /** * deserializeAws_restJson1Mpeg2Settings */ const de_Mpeg2Settings = (output: any, context: __SerdeContext): Mpeg2Settings => { - return { - AdaptiveQuantization: __expectString(output.adaptiveQuantization), - AfdSignaling: __expectString(output.afdSignaling), - ColorMetadata: __expectString(output.colorMetadata), - ColorSpace: __expectString(output.colorSpace), - DisplayAspectRatio: __expectString(output.displayAspectRatio), - FilterSettings: output.filterSettings != null ? de_Mpeg2FilterSettings(output.filterSettings, context) : undefined, - FixedAfd: __expectString(output.fixedAfd), - FramerateDenominator: __expectInt32(output.framerateDenominator), - FramerateNumerator: __expectInt32(output.framerateNumerator), - GopClosedCadence: __expectInt32(output.gopClosedCadence), - GopNumBFrames: __expectInt32(output.gopNumBFrames), - GopSize: __limitedParseDouble(output.gopSize), - GopSizeUnits: __expectString(output.gopSizeUnits), - ScanType: __expectString(output.scanType), - SubgopLength: __expectString(output.subgopLength), - TimecodeBurninSettings: - output.timecodeBurninSettings != null - ? de_TimecodeBurninSettings(output.timecodeBurninSettings, context) - : undefined, - TimecodeInsertion: __expectString(output.timecodeInsertion), - } as any; + return take(output, { + AdaptiveQuantization: [, __expectString, `adaptiveQuantization`], + AfdSignaling: [, __expectString, `afdSignaling`], + ColorMetadata: [, __expectString, `colorMetadata`], + ColorSpace: [, __expectString, `colorSpace`], + DisplayAspectRatio: [, __expectString, `displayAspectRatio`], + FilterSettings: (_) => [, de_Mpeg2FilterSettings(_, context), `filterSettings`], + FixedAfd: [, __expectString, `fixedAfd`], + FramerateDenominator: [, __expectInt32, `framerateDenominator`], + FramerateNumerator: [, __expectInt32, `framerateNumerator`], + GopClosedCadence: [, __expectInt32, `gopClosedCadence`], + GopNumBFrames: [, __expectInt32, `gopNumBFrames`], + GopSize: [, __limitedParseDouble, `gopSize`], + GopSizeUnits: [, __expectString, `gopSizeUnits`], + ScanType: [, __expectString, `scanType`], + SubgopLength: [, __expectString, `subgopLength`], + TimecodeBurninSettings: (_) => [, de_TimecodeBurninSettings(_, context), `timecodeBurninSettings`], + TimecodeInsertion: [, __expectString, `timecodeInsertion`], + }) as any; }; /** * deserializeAws_restJson1MsSmoothGroupSettings */ const de_MsSmoothGroupSettings = (output: any, context: __SerdeContext): MsSmoothGroupSettings => { - return { - AcquisitionPointId: __expectString(output.acquisitionPointId), - AudioOnlyTimecodeControl: __expectString(output.audioOnlyTimecodeControl), - CertificateMode: __expectString(output.certificateMode), - ConnectionRetryInterval: __expectInt32(output.connectionRetryInterval), - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - EventId: __expectString(output.eventId), - EventIdMode: __expectString(output.eventIdMode), - EventStopBehavior: __expectString(output.eventStopBehavior), - FilecacheDuration: __expectInt32(output.filecacheDuration), - FragmentLength: __expectInt32(output.fragmentLength), - InputLossAction: __expectString(output.inputLossAction), - NumRetries: __expectInt32(output.numRetries), - RestartDelay: __expectInt32(output.restartDelay), - SegmentationMode: __expectString(output.segmentationMode), - SendDelayMs: __expectInt32(output.sendDelayMs), - SparseTrackType: __expectString(output.sparseTrackType), - StreamManifestBehavior: __expectString(output.streamManifestBehavior), - TimestampOffset: __expectString(output.timestampOffset), - TimestampOffsetMode: __expectString(output.timestampOffsetMode), - } as any; + return take(output, { + AcquisitionPointId: [, __expectString, `acquisitionPointId`], + AudioOnlyTimecodeControl: [, __expectString, `audioOnlyTimecodeControl`], + CertificateMode: [, __expectString, `certificateMode`], + ConnectionRetryInterval: [, __expectInt32, `connectionRetryInterval`], + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + EventId: [, __expectString, `eventId`], + EventIdMode: [, __expectString, `eventIdMode`], + EventStopBehavior: [, __expectString, `eventStopBehavior`], + FilecacheDuration: [, __expectInt32, `filecacheDuration`], + FragmentLength: [, __expectInt32, `fragmentLength`], + InputLossAction: [, __expectString, `inputLossAction`], + NumRetries: [, __expectInt32, `numRetries`], + RestartDelay: [, __expectInt32, `restartDelay`], + SegmentationMode: [, __expectString, `segmentationMode`], + SendDelayMs: [, __expectInt32, `sendDelayMs`], + SparseTrackType: [, __expectString, `sparseTrackType`], + StreamManifestBehavior: [, __expectString, `streamManifestBehavior`], + TimestampOffset: [, __expectString, `timestampOffset`], + TimestampOffsetMode: [, __expectString, `timestampOffsetMode`], + }) as any; }; /** * deserializeAws_restJson1MsSmoothOutputSettings */ const de_MsSmoothOutputSettings = (output: any, context: __SerdeContext): MsSmoothOutputSettings => { - return { - H265PackagingType: __expectString(output.h265PackagingType), - NameModifier: __expectString(output.nameModifier), - } as any; + return take(output, { + H265PackagingType: [, __expectString, `h265PackagingType`], + NameModifier: [, __expectString, `nameModifier`], + }) as any; }; /** * deserializeAws_restJson1Multiplex */ const de_Multiplex = (output: any, context: __SerdeContext): Multiplex => { - return { - Arn: __expectString(output.arn), - AvailabilityZones: - output.availabilityZones != null ? de___listOf__string(output.availabilityZones, context) : undefined, - Destinations: - output.destinations != null ? de___listOfMultiplexOutputDestination(output.destinations, context) : undefined, - Id: __expectString(output.id), - MultiplexSettings: - output.multiplexSettings != null ? de_MultiplexSettings(output.multiplexSettings, context) : undefined, - Name: __expectString(output.name), - PipelinesRunningCount: __expectInt32(output.pipelinesRunningCount), - ProgramCount: __expectInt32(output.programCount), - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + AvailabilityZones: [, _json, `availabilityZones`], + Destinations: (_) => [, de___listOfMultiplexOutputDestination(_, context), `destinations`], + Id: [, __expectString, `id`], + MultiplexSettings: (_) => [, de_MultiplexSettings(_, context), `multiplexSettings`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + ProgramCount: [, __expectInt32, `programCount`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1MultiplexGroupSettings - */ -const de_MultiplexGroupSettings = (output: any, context: __SerdeContext): MultiplexGroupSettings => { - return {} as any; -}; +// de_MultiplexGroupSettings omitted. /** * deserializeAws_restJson1MultiplexMediaConnectOutputDestinationSettings @@ -12646,52 +11320,44 @@ const de_MultiplexMediaConnectOutputDestinationSettings = ( output: any, context: __SerdeContext ): MultiplexMediaConnectOutputDestinationSettings => { - return { - EntitlementArn: __expectString(output.entitlementArn), - } as any; + return take(output, { + EntitlementArn: [, __expectString, `entitlementArn`], + }) as any; }; /** * deserializeAws_restJson1MultiplexOutputDestination */ const de_MultiplexOutputDestination = (output: any, context: __SerdeContext): MultiplexOutputDestination => { - return { - MediaConnectSettings: - output.mediaConnectSettings != null - ? de_MultiplexMediaConnectOutputDestinationSettings(output.mediaConnectSettings, context) - : undefined, - } as any; + return take(output, { + MediaConnectSettings: (_) => [ + , + de_MultiplexMediaConnectOutputDestinationSettings(_, context), + `mediaConnectSettings`, + ], + }) as any; }; /** * deserializeAws_restJson1MultiplexOutputSettings */ const de_MultiplexOutputSettings = (output: any, context: __SerdeContext): MultiplexOutputSettings => { - return { - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - } as any; + return take(output, { + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + }) as any; }; /** * deserializeAws_restJson1MultiplexProgram */ const de_MultiplexProgram = (output: any, context: __SerdeContext): MultiplexProgram => { - return { - ChannelId: __expectString(output.channelId), - MultiplexProgramSettings: - output.multiplexProgramSettings != null - ? de_MultiplexProgramSettings(output.multiplexProgramSettings, context) - : undefined, - PacketIdentifiersMap: - output.packetIdentifiersMap != null - ? de_MultiplexProgramPacketIdentifiersMap(output.packetIdentifiersMap, context) - : undefined, - PipelineDetails: - output.pipelineDetails != null - ? de___listOfMultiplexProgramPipelineDetail(output.pipelineDetails, context) - : undefined, - ProgramName: __expectString(output.programName), - } as any; + return take(output, { + ChannelId: [, __expectString, `channelId`], + MultiplexProgramSettings: (_) => [, de_MultiplexProgramSettings(_, context), `multiplexProgramSettings`], + PacketIdentifiersMap: (_) => [, de_MultiplexProgramPacketIdentifiersMap(_, context), `packetIdentifiersMap`], + PipelineDetails: (_) => [, de___listOfMultiplexProgramPipelineDetail(_, context), `pipelineDetails`], + ProgramName: [, __expectString, `programName`], + }) as any; }; /** @@ -12701,10 +11367,10 @@ const de_MultiplexProgramChannelDestinationSettings = ( output: any, context: __SerdeContext ): MultiplexProgramChannelDestinationSettings => { - return { - MultiplexId: __expectString(output.multiplexId), - ProgramName: __expectString(output.programName), - } as any; + return take(output, { + MultiplexId: [, __expectString, `multiplexId`], + ProgramName: [, __expectString, `programName`], + }) as any; }; /** @@ -12714,31 +11380,31 @@ const de_MultiplexProgramPacketIdentifiersMap = ( output: any, context: __SerdeContext ): MultiplexProgramPacketIdentifiersMap => { - return { - AudioPids: output.audioPids != null ? de___listOf__integer(output.audioPids, context) : undefined, - DvbSubPids: output.dvbSubPids != null ? de___listOf__integer(output.dvbSubPids, context) : undefined, - DvbTeletextPid: __expectInt32(output.dvbTeletextPid), - EtvPlatformPid: __expectInt32(output.etvPlatformPid), - EtvSignalPid: __expectInt32(output.etvSignalPid), - KlvDataPids: output.klvDataPids != null ? de___listOf__integer(output.klvDataPids, context) : undefined, - PcrPid: __expectInt32(output.pcrPid), - PmtPid: __expectInt32(output.pmtPid), - PrivateMetadataPid: __expectInt32(output.privateMetadataPid), - Scte27Pids: output.scte27Pids != null ? de___listOf__integer(output.scte27Pids, context) : undefined, - Scte35Pid: __expectInt32(output.scte35Pid), - TimedMetadataPid: __expectInt32(output.timedMetadataPid), - VideoPid: __expectInt32(output.videoPid), - } as any; + return take(output, { + AudioPids: [, _json, `audioPids`], + DvbSubPids: [, _json, `dvbSubPids`], + DvbTeletextPid: [, __expectInt32, `dvbTeletextPid`], + EtvPlatformPid: [, __expectInt32, `etvPlatformPid`], + EtvSignalPid: [, __expectInt32, `etvSignalPid`], + KlvDataPids: [, _json, `klvDataPids`], + PcrPid: [, __expectInt32, `pcrPid`], + PmtPid: [, __expectInt32, `pmtPid`], + PrivateMetadataPid: [, __expectInt32, `privateMetadataPid`], + Scte27Pids: [, _json, `scte27Pids`], + Scte35Pid: [, __expectInt32, `scte35Pid`], + TimedMetadataPid: [, __expectInt32, `timedMetadataPid`], + VideoPid: [, __expectInt32, `videoPid`], + }) as any; }; /** * deserializeAws_restJson1MultiplexProgramPipelineDetail */ const de_MultiplexProgramPipelineDetail = (output: any, context: __SerdeContext): MultiplexProgramPipelineDetail => { - return { - ActiveChannelPipeline: __expectString(output.activeChannelPipeline), - PipelineId: __expectString(output.pipelineId), - } as any; + return take(output, { + ActiveChannelPipeline: [, __expectString, `activeChannelPipeline`], + PipelineId: [, __expectString, `pipelineId`], + }) as any; }; /** @@ -12748,316 +11414,260 @@ const de_MultiplexProgramServiceDescriptor = ( output: any, context: __SerdeContext ): MultiplexProgramServiceDescriptor => { - return { - ProviderName: __expectString(output.providerName), - ServiceName: __expectString(output.serviceName), - } as any; + return take(output, { + ProviderName: [, __expectString, `providerName`], + ServiceName: [, __expectString, `serviceName`], + }) as any; }; /** * deserializeAws_restJson1MultiplexProgramSettings */ const de_MultiplexProgramSettings = (output: any, context: __SerdeContext): MultiplexProgramSettings => { - return { - PreferredChannelPipeline: __expectString(output.preferredChannelPipeline), - ProgramNumber: __expectInt32(output.programNumber), - ServiceDescriptor: - output.serviceDescriptor != null - ? de_MultiplexProgramServiceDescriptor(output.serviceDescriptor, context) - : undefined, - VideoSettings: output.videoSettings != null ? de_MultiplexVideoSettings(output.videoSettings, context) : undefined, - } as any; + return take(output, { + PreferredChannelPipeline: [, __expectString, `preferredChannelPipeline`], + ProgramNumber: [, __expectInt32, `programNumber`], + ServiceDescriptor: (_) => [, de_MultiplexProgramServiceDescriptor(_, context), `serviceDescriptor`], + VideoSettings: (_) => [, de_MultiplexVideoSettings(_, context), `videoSettings`], + }) as any; }; /** * deserializeAws_restJson1MultiplexProgramSummary */ const de_MultiplexProgramSummary = (output: any, context: __SerdeContext): MultiplexProgramSummary => { - return { - ChannelId: __expectString(output.channelId), - ProgramName: __expectString(output.programName), - } as any; + return take(output, { + ChannelId: [, __expectString, `channelId`], + ProgramName: [, __expectString, `programName`], + }) as any; }; /** * deserializeAws_restJson1MultiplexSettings */ const de_MultiplexSettings = (output: any, context: __SerdeContext): MultiplexSettings => { - return { - MaximumVideoBufferDelayMilliseconds: __expectInt32(output.maximumVideoBufferDelayMilliseconds), - TransportStreamBitrate: __expectInt32(output.transportStreamBitrate), - TransportStreamId: __expectInt32(output.transportStreamId), - TransportStreamReservedBitrate: __expectInt32(output.transportStreamReservedBitrate), - } as any; + return take(output, { + MaximumVideoBufferDelayMilliseconds: [, __expectInt32, `maximumVideoBufferDelayMilliseconds`], + TransportStreamBitrate: [, __expectInt32, `transportStreamBitrate`], + TransportStreamId: [, __expectInt32, `transportStreamId`], + TransportStreamReservedBitrate: [, __expectInt32, `transportStreamReservedBitrate`], + }) as any; }; /** * deserializeAws_restJson1MultiplexSettingsSummary */ const de_MultiplexSettingsSummary = (output: any, context: __SerdeContext): MultiplexSettingsSummary => { - return { - TransportStreamBitrate: __expectInt32(output.transportStreamBitrate), - } as any; + return take(output, { + TransportStreamBitrate: [, __expectInt32, `transportStreamBitrate`], + }) as any; }; /** * deserializeAws_restJson1MultiplexStatmuxVideoSettings */ const de_MultiplexStatmuxVideoSettings = (output: any, context: __SerdeContext): MultiplexStatmuxVideoSettings => { - return { - MaximumBitrate: __expectInt32(output.maximumBitrate), - MinimumBitrate: __expectInt32(output.minimumBitrate), - Priority: __expectInt32(output.priority), - } as any; + return take(output, { + MaximumBitrate: [, __expectInt32, `maximumBitrate`], + MinimumBitrate: [, __expectInt32, `minimumBitrate`], + Priority: [, __expectInt32, `priority`], + }) as any; }; /** * deserializeAws_restJson1MultiplexSummary */ const de_MultiplexSummary = (output: any, context: __SerdeContext): MultiplexSummary => { - return { - Arn: __expectString(output.arn), - AvailabilityZones: - output.availabilityZones != null ? de___listOf__string(output.availabilityZones, context) : undefined, - Id: __expectString(output.id), - MultiplexSettings: - output.multiplexSettings != null ? de_MultiplexSettingsSummary(output.multiplexSettings, context) : undefined, - Name: __expectString(output.name), - PipelinesRunningCount: __expectInt32(output.pipelinesRunningCount), - ProgramCount: __expectInt32(output.programCount), - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + AvailabilityZones: [, _json, `availabilityZones`], + Id: [, __expectString, `id`], + MultiplexSettings: (_) => [, de_MultiplexSettingsSummary(_, context), `multiplexSettings`], + Name: [, __expectString, `name`], + PipelinesRunningCount: [, __expectInt32, `pipelinesRunningCount`], + ProgramCount: [, __expectInt32, `programCount`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1MultiplexVideoSettings */ const de_MultiplexVideoSettings = (output: any, context: __SerdeContext): MultiplexVideoSettings => { - return { - ConstantBitrate: __expectInt32(output.constantBitrate), - StatmuxSettings: - output.statmuxSettings != null ? de_MultiplexStatmuxVideoSettings(output.statmuxSettings, context) : undefined, - } as any; + return take(output, { + ConstantBitrate: [, __expectInt32, `constantBitrate`], + StatmuxSettings: (_) => [, de_MultiplexStatmuxVideoSettings(_, context), `statmuxSettings`], + }) as any; }; /** * deserializeAws_restJson1NetworkInputSettings */ const de_NetworkInputSettings = (output: any, context: __SerdeContext): NetworkInputSettings => { - return { - HlsInputSettings: - output.hlsInputSettings != null ? de_HlsInputSettings(output.hlsInputSettings, context) : undefined, - ServerValidation: __expectString(output.serverValidation), - } as any; + return take(output, { + HlsInputSettings: (_) => [, de_HlsInputSettings(_, context), `hlsInputSettings`], + ServerValidation: [, __expectString, `serverValidation`], + }) as any; }; /** * deserializeAws_restJson1NielsenCBET */ const de_NielsenCBET = (output: any, context: __SerdeContext): NielsenCBET => { - return { - CbetCheckDigitString: __expectString(output.cbetCheckDigitString), - CbetStepaside: __expectString(output.cbetStepaside), - Csid: __expectString(output.csid), - } as any; + return take(output, { + CbetCheckDigitString: [, __expectString, `cbetCheckDigitString`], + CbetStepaside: [, __expectString, `cbetStepaside`], + Csid: [, __expectString, `csid`], + }) as any; }; /** * deserializeAws_restJson1NielsenConfiguration */ const de_NielsenConfiguration = (output: any, context: __SerdeContext): NielsenConfiguration => { - return { - DistributorId: __expectString(output.distributorId), - NielsenPcmToId3Tagging: __expectString(output.nielsenPcmToId3Tagging), - } as any; + return take(output, { + DistributorId: [, __expectString, `distributorId`], + NielsenPcmToId3Tagging: [, __expectString, `nielsenPcmToId3Tagging`], + }) as any; }; /** * deserializeAws_restJson1NielsenNaesIiNw */ const de_NielsenNaesIiNw = (output: any, context: __SerdeContext): NielsenNaesIiNw => { - return { - CheckDigitString: __expectString(output.checkDigitString), - Sid: __limitedParseDouble(output.sid), - Timezone: __expectString(output.timezone), - } as any; + return take(output, { + CheckDigitString: [, __expectString, `checkDigitString`], + Sid: [, __limitedParseDouble, `sid`], + Timezone: [, __expectString, `timezone`], + }) as any; }; /** * deserializeAws_restJson1NielsenWatermarksSettings */ const de_NielsenWatermarksSettings = (output: any, context: __SerdeContext): NielsenWatermarksSettings => { - return { - NielsenCbetSettings: - output.nielsenCbetSettings != null ? de_NielsenCBET(output.nielsenCbetSettings, context) : undefined, - NielsenDistributionType: __expectString(output.nielsenDistributionType), - NielsenNaesIiNwSettings: - output.nielsenNaesIiNwSettings != null ? de_NielsenNaesIiNw(output.nielsenNaesIiNwSettings, context) : undefined, - } as any; + return take(output, { + NielsenCbetSettings: (_) => [, de_NielsenCBET(_, context), `nielsenCbetSettings`], + NielsenDistributionType: [, __expectString, `nielsenDistributionType`], + NielsenNaesIiNwSettings: (_) => [, de_NielsenNaesIiNw(_, context), `nielsenNaesIiNwSettings`], + }) as any; }; /** * deserializeAws_restJson1Offering */ const de_Offering = (output: any, context: __SerdeContext): Offering => { - return { - Arn: __expectString(output.arn), - CurrencyCode: __expectString(output.currencyCode), - Duration: __expectInt32(output.duration), - DurationUnits: __expectString(output.durationUnits), - FixedPrice: __limitedParseDouble(output.fixedPrice), - OfferingDescription: __expectString(output.offeringDescription), - OfferingId: __expectString(output.offeringId), - OfferingType: __expectString(output.offeringType), - Region: __expectString(output.region), - ResourceSpecification: - output.resourceSpecification != null - ? de_ReservationResourceSpecification(output.resourceSpecification, context) - : undefined, - UsagePrice: __limitedParseDouble(output.usagePrice), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + FixedPrice: [, __limitedParseDouble, `fixedPrice`], + OfferingDescription: [, __expectString, `offeringDescription`], + OfferingId: [, __expectString, `offeringId`], + OfferingType: [, __expectString, `offeringType`], + Region: [, __expectString, `region`], + ResourceSpecification: (_) => [, de_ReservationResourceSpecification(_, context), `resourceSpecification`], + UsagePrice: [, __limitedParseDouble, `usagePrice`], + }) as any; }; /** * deserializeAws_restJson1Output */ const de_Output = (output: any, context: __SerdeContext): Output => { - return { - AudioDescriptionNames: - output.audioDescriptionNames != null ? de___listOf__string(output.audioDescriptionNames, context) : undefined, - CaptionDescriptionNames: - output.captionDescriptionNames != null ? de___listOf__string(output.captionDescriptionNames, context) : undefined, - OutputName: __expectString(output.outputName), - OutputSettings: output.outputSettings != null ? de_OutputSettings(output.outputSettings, context) : undefined, - VideoDescriptionName: __expectString(output.videoDescriptionName), - } as any; + return take(output, { + AudioDescriptionNames: [, _json, `audioDescriptionNames`], + CaptionDescriptionNames: [, _json, `captionDescriptionNames`], + OutputName: [, __expectString, `outputName`], + OutputSettings: (_) => [, de_OutputSettings(_, context), `outputSettings`], + VideoDescriptionName: [, __expectString, `videoDescriptionName`], + }) as any; }; /** * deserializeAws_restJson1OutputDestination */ const de_OutputDestination = (output: any, context: __SerdeContext): OutputDestination => { - return { - Id: __expectString(output.id), - MediaPackageSettings: - output.mediaPackageSettings != null - ? de___listOfMediaPackageOutputDestinationSettings(output.mediaPackageSettings, context) - : undefined, - MultiplexSettings: - output.multiplexSettings != null - ? de_MultiplexProgramChannelDestinationSettings(output.multiplexSettings, context) - : undefined, - Settings: output.settings != null ? de___listOfOutputDestinationSettings(output.settings, context) : undefined, - } as any; + return take(output, { + Id: [, __expectString, `id`], + MediaPackageSettings: (_) => [ + , + de___listOfMediaPackageOutputDestinationSettings(_, context), + `mediaPackageSettings`, + ], + MultiplexSettings: (_) => [, de_MultiplexProgramChannelDestinationSettings(_, context), `multiplexSettings`], + Settings: (_) => [, de___listOfOutputDestinationSettings(_, context), `settings`], + }) as any; }; /** * deserializeAws_restJson1OutputDestinationSettings */ const de_OutputDestinationSettings = (output: any, context: __SerdeContext): OutputDestinationSettings => { - return { - PasswordParam: __expectString(output.passwordParam), - StreamName: __expectString(output.streamName), - Url: __expectString(output.url), - Username: __expectString(output.username), - } as any; + return take(output, { + PasswordParam: [, __expectString, `passwordParam`], + StreamName: [, __expectString, `streamName`], + Url: [, __expectString, `url`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1OutputGroup */ const de_OutputGroup = (output: any, context: __SerdeContext): OutputGroup => { - return { - Name: __expectString(output.name), - OutputGroupSettings: - output.outputGroupSettings != null ? de_OutputGroupSettings(output.outputGroupSettings, context) : undefined, - Outputs: output.outputs != null ? de___listOfOutput(output.outputs, context) : undefined, - } as any; + return take(output, { + Name: [, __expectString, `name`], + OutputGroupSettings: (_) => [, de_OutputGroupSettings(_, context), `outputGroupSettings`], + Outputs: (_) => [, de___listOfOutput(_, context), `outputs`], + }) as any; }; /** * deserializeAws_restJson1OutputGroupSettings */ const de_OutputGroupSettings = (output: any, context: __SerdeContext): OutputGroupSettings => { - return { - ArchiveGroupSettings: - output.archiveGroupSettings != null ? de_ArchiveGroupSettings(output.archiveGroupSettings, context) : undefined, - FrameCaptureGroupSettings: - output.frameCaptureGroupSettings != null - ? de_FrameCaptureGroupSettings(output.frameCaptureGroupSettings, context) - : undefined, - HlsGroupSettings: - output.hlsGroupSettings != null ? de_HlsGroupSettings(output.hlsGroupSettings, context) : undefined, - MediaPackageGroupSettings: - output.mediaPackageGroupSettings != null - ? de_MediaPackageGroupSettings(output.mediaPackageGroupSettings, context) - : undefined, - MsSmoothGroupSettings: - output.msSmoothGroupSettings != null - ? de_MsSmoothGroupSettings(output.msSmoothGroupSettings, context) - : undefined, - MultiplexGroupSettings: - output.multiplexGroupSettings != null - ? de_MultiplexGroupSettings(output.multiplexGroupSettings, context) - : undefined, - RtmpGroupSettings: - output.rtmpGroupSettings != null ? de_RtmpGroupSettings(output.rtmpGroupSettings, context) : undefined, - UdpGroupSettings: - output.udpGroupSettings != null ? de_UdpGroupSettings(output.udpGroupSettings, context) : undefined, - } as any; + return take(output, { + ArchiveGroupSettings: (_) => [, de_ArchiveGroupSettings(_, context), `archiveGroupSettings`], + FrameCaptureGroupSettings: (_) => [, de_FrameCaptureGroupSettings(_, context), `frameCaptureGroupSettings`], + HlsGroupSettings: (_) => [, de_HlsGroupSettings(_, context), `hlsGroupSettings`], + MediaPackageGroupSettings: (_) => [, de_MediaPackageGroupSettings(_, context), `mediaPackageGroupSettings`], + MsSmoothGroupSettings: (_) => [, de_MsSmoothGroupSettings(_, context), `msSmoothGroupSettings`], + MultiplexGroupSettings: [, _json, `multiplexGroupSettings`], + RtmpGroupSettings: (_) => [, de_RtmpGroupSettings(_, context), `rtmpGroupSettings`], + UdpGroupSettings: (_) => [, de_UdpGroupSettings(_, context), `udpGroupSettings`], + }) as any; }; /** * deserializeAws_restJson1OutputLocationRef */ const de_OutputLocationRef = (output: any, context: __SerdeContext): OutputLocationRef => { - return { - DestinationRefId: __expectString(output.destinationRefId), - } as any; + return take(output, { + DestinationRefId: [, __expectString, `destinationRefId`], + }) as any; }; /** * deserializeAws_restJson1OutputSettings */ const de_OutputSettings = (output: any, context: __SerdeContext): OutputSettings => { - return { - ArchiveOutputSettings: - output.archiveOutputSettings != null - ? de_ArchiveOutputSettings(output.archiveOutputSettings, context) - : undefined, - FrameCaptureOutputSettings: - output.frameCaptureOutputSettings != null - ? de_FrameCaptureOutputSettings(output.frameCaptureOutputSettings, context) - : undefined, - HlsOutputSettings: - output.hlsOutputSettings != null ? de_HlsOutputSettings(output.hlsOutputSettings, context) : undefined, - MediaPackageOutputSettings: - output.mediaPackageOutputSettings != null - ? de_MediaPackageOutputSettings(output.mediaPackageOutputSettings, context) - : undefined, - MsSmoothOutputSettings: - output.msSmoothOutputSettings != null - ? de_MsSmoothOutputSettings(output.msSmoothOutputSettings, context) - : undefined, - MultiplexOutputSettings: - output.multiplexOutputSettings != null - ? de_MultiplexOutputSettings(output.multiplexOutputSettings, context) - : undefined, - RtmpOutputSettings: - output.rtmpOutputSettings != null ? de_RtmpOutputSettings(output.rtmpOutputSettings, context) : undefined, - UdpOutputSettings: - output.udpOutputSettings != null ? de_UdpOutputSettings(output.udpOutputSettings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1PassThroughSettings - */ -const de_PassThroughSettings = (output: any, context: __SerdeContext): PassThroughSettings => { - return {} as any; + return take(output, { + ArchiveOutputSettings: (_) => [, de_ArchiveOutputSettings(_, context), `archiveOutputSettings`], + FrameCaptureOutputSettings: (_) => [, de_FrameCaptureOutputSettings(_, context), `frameCaptureOutputSettings`], + HlsOutputSettings: (_) => [, de_HlsOutputSettings(_, context), `hlsOutputSettings`], + MediaPackageOutputSettings: [, _json, `mediaPackageOutputSettings`], + MsSmoothOutputSettings: (_) => [, de_MsSmoothOutputSettings(_, context), `msSmoothOutputSettings`], + MultiplexOutputSettings: (_) => [, de_MultiplexOutputSettings(_, context), `multiplexOutputSettings`], + RtmpOutputSettings: (_) => [, de_RtmpOutputSettings(_, context), `rtmpOutputSettings`], + UdpOutputSettings: (_) => [, de_UdpOutputSettings(_, context), `udpOutputSettings`], + }) as any; }; +// de_PassThroughSettings omitted. + /** * deserializeAws_restJson1PauseStateScheduleActionSettings */ @@ -13065,104 +11675,85 @@ const de_PauseStateScheduleActionSettings = ( output: any, context: __SerdeContext ): PauseStateScheduleActionSettings => { - return { - Pipelines: output.pipelines != null ? de___listOfPipelinePauseStateSettings(output.pipelines, context) : undefined, - } as any; + return take(output, { + Pipelines: (_) => [, de___listOfPipelinePauseStateSettings(_, context), `pipelines`], + }) as any; }; /** * deserializeAws_restJson1PipelineDetail */ const de_PipelineDetail = (output: any, context: __SerdeContext): PipelineDetail => { - return { - ActiveInputAttachmentName: __expectString(output.activeInputAttachmentName), - ActiveInputSwitchActionName: __expectString(output.activeInputSwitchActionName), - ActiveMotionGraphicsActionName: __expectString(output.activeMotionGraphicsActionName), - ActiveMotionGraphicsUri: __expectString(output.activeMotionGraphicsUri), - PipelineId: __expectString(output.pipelineId), - } as any; + return take(output, { + ActiveInputAttachmentName: [, __expectString, `activeInputAttachmentName`], + ActiveInputSwitchActionName: [, __expectString, `activeInputSwitchActionName`], + ActiveMotionGraphicsActionName: [, __expectString, `activeMotionGraphicsActionName`], + ActiveMotionGraphicsUri: [, __expectString, `activeMotionGraphicsUri`], + PipelineId: [, __expectString, `pipelineId`], + }) as any; }; /** * deserializeAws_restJson1PipelinePauseStateSettings */ const de_PipelinePauseStateSettings = (output: any, context: __SerdeContext): PipelinePauseStateSettings => { - return { - PipelineId: __expectString(output.pipelineId), - } as any; + return take(output, { + PipelineId: [, __expectString, `pipelineId`], + }) as any; }; -/** - * deserializeAws_restJson1RawSettings - */ -const de_RawSettings = (output: any, context: __SerdeContext): RawSettings => { - return {} as any; -}; +// de_RawSettings omitted. -/** - * deserializeAws_restJson1Rec601Settings - */ -const de_Rec601Settings = (output: any, context: __SerdeContext): Rec601Settings => { - return {} as any; -}; +// de_Rec601Settings omitted. -/** - * deserializeAws_restJson1Rec709Settings - */ -const de_Rec709Settings = (output: any, context: __SerdeContext): Rec709Settings => { - return {} as any; -}; +// de_Rec709Settings omitted. /** * deserializeAws_restJson1RemixSettings */ const de_RemixSettings = (output: any, context: __SerdeContext): RemixSettings => { - return { - ChannelMappings: - output.channelMappings != null ? de___listOfAudioChannelMapping(output.channelMappings, context) : undefined, - ChannelsIn: __expectInt32(output.channelsIn), - ChannelsOut: __expectInt32(output.channelsOut), - } as any; + return take(output, { + ChannelMappings: (_) => [, de___listOfAudioChannelMapping(_, context), `channelMappings`], + ChannelsIn: [, __expectInt32, `channelsIn`], + ChannelsOut: [, __expectInt32, `channelsOut`], + }) as any; }; /** * deserializeAws_restJson1RenewalSettings */ const de_RenewalSettings = (output: any, context: __SerdeContext): RenewalSettings => { - return { - AutomaticRenewal: __expectString(output.automaticRenewal), - RenewalCount: __expectInt32(output.renewalCount), - } as any; + return take(output, { + AutomaticRenewal: [, __expectString, `automaticRenewal`], + RenewalCount: [, __expectInt32, `renewalCount`], + }) as any; }; /** * deserializeAws_restJson1Reservation */ const de_Reservation = (output: any, context: __SerdeContext): Reservation => { - return { - Arn: __expectString(output.arn), - Count: __expectInt32(output.count), - CurrencyCode: __expectString(output.currencyCode), - Duration: __expectInt32(output.duration), - DurationUnits: __expectString(output.durationUnits), - End: __expectString(output.end), - FixedPrice: __limitedParseDouble(output.fixedPrice), - Name: __expectString(output.name), - OfferingDescription: __expectString(output.offeringDescription), - OfferingId: __expectString(output.offeringId), - OfferingType: __expectString(output.offeringType), - Region: __expectString(output.region), - RenewalSettings: output.renewalSettings != null ? de_RenewalSettings(output.renewalSettings, context) : undefined, - ReservationId: __expectString(output.reservationId), - ResourceSpecification: - output.resourceSpecification != null - ? de_ReservationResourceSpecification(output.resourceSpecification, context) - : undefined, - Start: __expectString(output.start), - State: __expectString(output.state), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - UsagePrice: __limitedParseDouble(output.usagePrice), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Count: [, __expectInt32, `count`], + CurrencyCode: [, __expectString, `currencyCode`], + Duration: [, __expectInt32, `duration`], + DurationUnits: [, __expectString, `durationUnits`], + End: [, __expectString, `end`], + FixedPrice: [, __limitedParseDouble, `fixedPrice`], + Name: [, __expectString, `name`], + OfferingDescription: [, __expectString, `offeringDescription`], + OfferingId: [, __expectString, `offeringId`], + OfferingType: [, __expectString, `offeringType`], + Region: [, __expectString, `region`], + RenewalSettings: (_) => [, de_RenewalSettings(_, context), `renewalSettings`], + ReservationId: [, __expectString, `reservationId`], + ResourceSpecification: (_) => [, de_ReservationResourceSpecification(_, context), `resourceSpecification`], + Start: [, __expectString, `start`], + State: [, __expectString, `state`], + Tags: [, _json, `tags`], + UsagePrice: [, __limitedParseDouble, `usagePrice`], + }) as any; }; /** @@ -13172,223 +11763,186 @@ const de_ReservationResourceSpecification = ( output: any, context: __SerdeContext ): ReservationResourceSpecification => { - return { - ChannelClass: __expectString(output.channelClass), - Codec: __expectString(output.codec), - MaximumBitrate: __expectString(output.maximumBitrate), - MaximumFramerate: __expectString(output.maximumFramerate), - Resolution: __expectString(output.resolution), - ResourceType: __expectString(output.resourceType), - SpecialFeature: __expectString(output.specialFeature), - VideoQuality: __expectString(output.videoQuality), - } as any; + return take(output, { + ChannelClass: [, __expectString, `channelClass`], + Codec: [, __expectString, `codec`], + MaximumBitrate: [, __expectString, `maximumBitrate`], + MaximumFramerate: [, __expectString, `maximumFramerate`], + Resolution: [, __expectString, `resolution`], + ResourceType: [, __expectString, `resourceType`], + SpecialFeature: [, __expectString, `specialFeature`], + VideoQuality: [, __expectString, `videoQuality`], + }) as any; }; -/** - * deserializeAws_restJson1RtmpCaptionInfoDestinationSettings - */ -const de_RtmpCaptionInfoDestinationSettings = ( - output: any, - context: __SerdeContext -): RtmpCaptionInfoDestinationSettings => { - return {} as any; -}; +// de_RtmpCaptionInfoDestinationSettings omitted. /** * deserializeAws_restJson1RtmpGroupSettings */ const de_RtmpGroupSettings = (output: any, context: __SerdeContext): RtmpGroupSettings => { - return { - AdMarkers: output.adMarkers != null ? de___listOfRtmpAdMarkers(output.adMarkers, context) : undefined, - AuthenticationScheme: __expectString(output.authenticationScheme), - CacheFullBehavior: __expectString(output.cacheFullBehavior), - CacheLength: __expectInt32(output.cacheLength), - CaptionData: __expectString(output.captionData), - InputLossAction: __expectString(output.inputLossAction), - RestartDelay: __expectInt32(output.restartDelay), - } as any; + return take(output, { + AdMarkers: [, _json, `adMarkers`], + AuthenticationScheme: [, __expectString, `authenticationScheme`], + CacheFullBehavior: [, __expectString, `cacheFullBehavior`], + CacheLength: [, __expectInt32, `cacheLength`], + CaptionData: [, __expectString, `captionData`], + InputLossAction: [, __expectString, `inputLossAction`], + RestartDelay: [, __expectInt32, `restartDelay`], + }) as any; }; /** * deserializeAws_restJson1RtmpOutputSettings */ const de_RtmpOutputSettings = (output: any, context: __SerdeContext): RtmpOutputSettings => { - return { - CertificateMode: __expectString(output.certificateMode), - ConnectionRetryInterval: __expectInt32(output.connectionRetryInterval), - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - NumRetries: __expectInt32(output.numRetries), - } as any; + return take(output, { + CertificateMode: [, __expectString, `certificateMode`], + ConnectionRetryInterval: [, __expectInt32, `connectionRetryInterval`], + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + NumRetries: [, __expectInt32, `numRetries`], + }) as any; }; /** * deserializeAws_restJson1ScheduleAction */ const de_ScheduleAction = (output: any, context: __SerdeContext): ScheduleAction => { - return { - ActionName: __expectString(output.actionName), - ScheduleActionSettings: - output.scheduleActionSettings != null - ? de_ScheduleActionSettings(output.scheduleActionSettings, context) - : undefined, - ScheduleActionStartSettings: - output.scheduleActionStartSettings != null - ? de_ScheduleActionStartSettings(output.scheduleActionStartSettings, context) - : undefined, - } as any; + return take(output, { + ActionName: [, __expectString, `actionName`], + ScheduleActionSettings: (_) => [, de_ScheduleActionSettings(_, context), `scheduleActionSettings`], + ScheduleActionStartSettings: (_) => [, de_ScheduleActionStartSettings(_, context), `scheduleActionStartSettings`], + }) as any; }; /** * deserializeAws_restJson1ScheduleActionSettings */ const de_ScheduleActionSettings = (output: any, context: __SerdeContext): ScheduleActionSettings => { - return { - HlsId3SegmentTaggingSettings: - output.hlsId3SegmentTaggingSettings != null - ? de_HlsId3SegmentTaggingScheduleActionSettings(output.hlsId3SegmentTaggingSettings, context) - : undefined, - HlsTimedMetadataSettings: - output.hlsTimedMetadataSettings != null - ? de_HlsTimedMetadataScheduleActionSettings(output.hlsTimedMetadataSettings, context) - : undefined, - InputPrepareSettings: - output.inputPrepareSettings != null - ? de_InputPrepareScheduleActionSettings(output.inputPrepareSettings, context) - : undefined, - InputSwitchSettings: - output.inputSwitchSettings != null - ? de_InputSwitchScheduleActionSettings(output.inputSwitchSettings, context) - : undefined, - MotionGraphicsImageActivateSettings: - output.motionGraphicsImageActivateSettings != null - ? de_MotionGraphicsActivateScheduleActionSettings(output.motionGraphicsImageActivateSettings, context) - : undefined, - MotionGraphicsImageDeactivateSettings: - output.motionGraphicsImageDeactivateSettings != null - ? de_MotionGraphicsDeactivateScheduleActionSettings(output.motionGraphicsImageDeactivateSettings, context) - : undefined, - PauseStateSettings: - output.pauseStateSettings != null - ? de_PauseStateScheduleActionSettings(output.pauseStateSettings, context) - : undefined, - Scte35InputSettings: - output.scte35InputSettings != null - ? de_Scte35InputScheduleActionSettings(output.scte35InputSettings, context) - : undefined, - Scte35ReturnToNetworkSettings: - output.scte35ReturnToNetworkSettings != null - ? de_Scte35ReturnToNetworkScheduleActionSettings(output.scte35ReturnToNetworkSettings, context) - : undefined, - Scte35SpliceInsertSettings: - output.scte35SpliceInsertSettings != null - ? de_Scte35SpliceInsertScheduleActionSettings(output.scte35SpliceInsertSettings, context) - : undefined, - Scte35TimeSignalSettings: - output.scte35TimeSignalSettings != null - ? de_Scte35TimeSignalScheduleActionSettings(output.scte35TimeSignalSettings, context) - : undefined, - StaticImageActivateSettings: - output.staticImageActivateSettings != null - ? de_StaticImageActivateScheduleActionSettings(output.staticImageActivateSettings, context) - : undefined, - StaticImageDeactivateSettings: - output.staticImageDeactivateSettings != null - ? de_StaticImageDeactivateScheduleActionSettings(output.staticImageDeactivateSettings, context) - : undefined, - } as any; + return take(output, { + HlsId3SegmentTaggingSettings: (_) => [ + , + de_HlsId3SegmentTaggingScheduleActionSettings(_, context), + `hlsId3SegmentTaggingSettings`, + ], + HlsTimedMetadataSettings: (_) => [ + , + de_HlsTimedMetadataScheduleActionSettings(_, context), + `hlsTimedMetadataSettings`, + ], + InputPrepareSettings: (_) => [, de_InputPrepareScheduleActionSettings(_, context), `inputPrepareSettings`], + InputSwitchSettings: (_) => [, de_InputSwitchScheduleActionSettings(_, context), `inputSwitchSettings`], + MotionGraphicsImageActivateSettings: (_) => [ + , + de_MotionGraphicsActivateScheduleActionSettings(_, context), + `motionGraphicsImageActivateSettings`, + ], + MotionGraphicsImageDeactivateSettings: [, _json, `motionGraphicsImageDeactivateSettings`], + PauseStateSettings: (_) => [, de_PauseStateScheduleActionSettings(_, context), `pauseStateSettings`], + Scte35InputSettings: (_) => [, de_Scte35InputScheduleActionSettings(_, context), `scte35InputSettings`], + Scte35ReturnToNetworkSettings: (_) => [ + , + de_Scte35ReturnToNetworkScheduleActionSettings(_, context), + `scte35ReturnToNetworkSettings`, + ], + Scte35SpliceInsertSettings: (_) => [ + , + de_Scte35SpliceInsertScheduleActionSettings(_, context), + `scte35SpliceInsertSettings`, + ], + Scte35TimeSignalSettings: (_) => [ + , + de_Scte35TimeSignalScheduleActionSettings(_, context), + `scte35TimeSignalSettings`, + ], + StaticImageActivateSettings: (_) => [ + , + de_StaticImageActivateScheduleActionSettings(_, context), + `staticImageActivateSettings`, + ], + StaticImageDeactivateSettings: (_) => [ + , + de_StaticImageDeactivateScheduleActionSettings(_, context), + `staticImageDeactivateSettings`, + ], + }) as any; }; /** * deserializeAws_restJson1ScheduleActionStartSettings */ const de_ScheduleActionStartSettings = (output: any, context: __SerdeContext): ScheduleActionStartSettings => { - return { - FixedModeScheduleActionStartSettings: - output.fixedModeScheduleActionStartSettings != null - ? de_FixedModeScheduleActionStartSettings(output.fixedModeScheduleActionStartSettings, context) - : undefined, - FollowModeScheduleActionStartSettings: - output.followModeScheduleActionStartSettings != null - ? de_FollowModeScheduleActionStartSettings(output.followModeScheduleActionStartSettings, context) - : undefined, - ImmediateModeScheduleActionStartSettings: - output.immediateModeScheduleActionStartSettings != null - ? de_ImmediateModeScheduleActionStartSettings(output.immediateModeScheduleActionStartSettings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Scte20PlusEmbeddedDestinationSettings - */ -const de_Scte20PlusEmbeddedDestinationSettings = ( - output: any, - context: __SerdeContext -): Scte20PlusEmbeddedDestinationSettings => { - return {} as any; + return take(output, { + FixedModeScheduleActionStartSettings: (_) => [ + , + de_FixedModeScheduleActionStartSettings(_, context), + `fixedModeScheduleActionStartSettings`, + ], + FollowModeScheduleActionStartSettings: (_) => [ + , + de_FollowModeScheduleActionStartSettings(_, context), + `followModeScheduleActionStartSettings`, + ], + ImmediateModeScheduleActionStartSettings: [, _json, `immediateModeScheduleActionStartSettings`], + }) as any; }; +// de_Scte20PlusEmbeddedDestinationSettings omitted. + /** * deserializeAws_restJson1Scte20SourceSettings */ const de_Scte20SourceSettings = (output: any, context: __SerdeContext): Scte20SourceSettings => { - return { - Convert608To708: __expectString(output.convert608To708), - Source608ChannelNumber: __expectInt32(output.source608ChannelNumber), - } as any; + return take(output, { + Convert608To708: [, __expectString, `convert608To708`], + Source608ChannelNumber: [, __expectInt32, `source608ChannelNumber`], + }) as any; }; -/** - * deserializeAws_restJson1Scte27DestinationSettings - */ -const de_Scte27DestinationSettings = (output: any, context: __SerdeContext): Scte27DestinationSettings => { - return {} as any; -}; +// de_Scte27DestinationSettings omitted. /** * deserializeAws_restJson1Scte27SourceSettings */ const de_Scte27SourceSettings = (output: any, context: __SerdeContext): Scte27SourceSettings => { - return { - OcrLanguage: __expectString(output.ocrLanguage), - Pid: __expectInt32(output.pid), - } as any; + return take(output, { + OcrLanguage: [, __expectString, `ocrLanguage`], + Pid: [, __expectInt32, `pid`], + }) as any; }; /** * deserializeAws_restJson1Scte35DeliveryRestrictions */ const de_Scte35DeliveryRestrictions = (output: any, context: __SerdeContext): Scte35DeliveryRestrictions => { - return { - ArchiveAllowedFlag: __expectString(output.archiveAllowedFlag), - DeviceRestrictions: __expectString(output.deviceRestrictions), - NoRegionalBlackoutFlag: __expectString(output.noRegionalBlackoutFlag), - WebDeliveryAllowedFlag: __expectString(output.webDeliveryAllowedFlag), - } as any; + return take(output, { + ArchiveAllowedFlag: [, __expectString, `archiveAllowedFlag`], + DeviceRestrictions: [, __expectString, `deviceRestrictions`], + NoRegionalBlackoutFlag: [, __expectString, `noRegionalBlackoutFlag`], + WebDeliveryAllowedFlag: [, __expectString, `webDeliveryAllowedFlag`], + }) as any; }; /** * deserializeAws_restJson1Scte35Descriptor */ const de_Scte35Descriptor = (output: any, context: __SerdeContext): Scte35Descriptor => { - return { - Scte35DescriptorSettings: - output.scte35DescriptorSettings != null - ? de_Scte35DescriptorSettings(output.scte35DescriptorSettings, context) - : undefined, - } as any; + return take(output, { + Scte35DescriptorSettings: (_) => [, de_Scte35DescriptorSettings(_, context), `scte35DescriptorSettings`], + }) as any; }; /** * deserializeAws_restJson1Scte35DescriptorSettings */ const de_Scte35DescriptorSettings = (output: any, context: __SerdeContext): Scte35DescriptorSettings => { - return { - SegmentationDescriptorScte35DescriptorSettings: - output.segmentationDescriptorScte35DescriptorSettings != null - ? de_Scte35SegmentationDescriptor(output.segmentationDescriptorScte35DescriptorSettings, context) - : undefined, - } as any; + return take(output, { + SegmentationDescriptorScte35DescriptorSettings: (_) => [ + , + de_Scte35SegmentationDescriptor(_, context), + `segmentationDescriptorScte35DescriptorSettings`, + ], + }) as any; }; /** @@ -13398,10 +11952,10 @@ const de_Scte35InputScheduleActionSettings = ( output: any, context: __SerdeContext ): Scte35InputScheduleActionSettings => { - return { - InputAttachmentNameReference: __expectString(output.inputAttachmentNameReference), - Mode: __expectString(output.mode), - } as any; + return take(output, { + InputAttachmentNameReference: [, __expectString, `inputAttachmentNameReference`], + Mode: [, __expectString, `mode`], + }) as any; }; /** @@ -13411,42 +11965,39 @@ const de_Scte35ReturnToNetworkScheduleActionSettings = ( output: any, context: __SerdeContext ): Scte35ReturnToNetworkScheduleActionSettings => { - return { - SpliceEventId: __expectLong(output.spliceEventId), - } as any; + return take(output, { + SpliceEventId: [, __expectLong, `spliceEventId`], + }) as any; }; /** * deserializeAws_restJson1Scte35SegmentationDescriptor */ const de_Scte35SegmentationDescriptor = (output: any, context: __SerdeContext): Scte35SegmentationDescriptor => { - return { - DeliveryRestrictions: - output.deliveryRestrictions != null - ? de_Scte35DeliveryRestrictions(output.deliveryRestrictions, context) - : undefined, - SegmentNum: __expectInt32(output.segmentNum), - SegmentationCancelIndicator: __expectString(output.segmentationCancelIndicator), - SegmentationDuration: __expectLong(output.segmentationDuration), - SegmentationEventId: __expectLong(output.segmentationEventId), - SegmentationTypeId: __expectInt32(output.segmentationTypeId), - SegmentationUpid: __expectString(output.segmentationUpid), - SegmentationUpidType: __expectInt32(output.segmentationUpidType), - SegmentsExpected: __expectInt32(output.segmentsExpected), - SubSegmentNum: __expectInt32(output.subSegmentNum), - SubSegmentsExpected: __expectInt32(output.subSegmentsExpected), - } as any; + return take(output, { + DeliveryRestrictions: (_) => [, de_Scte35DeliveryRestrictions(_, context), `deliveryRestrictions`], + SegmentNum: [, __expectInt32, `segmentNum`], + SegmentationCancelIndicator: [, __expectString, `segmentationCancelIndicator`], + SegmentationDuration: [, __expectLong, `segmentationDuration`], + SegmentationEventId: [, __expectLong, `segmentationEventId`], + SegmentationTypeId: [, __expectInt32, `segmentationTypeId`], + SegmentationUpid: [, __expectString, `segmentationUpid`], + SegmentationUpidType: [, __expectInt32, `segmentationUpidType`], + SegmentsExpected: [, __expectInt32, `segmentsExpected`], + SubSegmentNum: [, __expectInt32, `subSegmentNum`], + SubSegmentsExpected: [, __expectInt32, `subSegmentsExpected`], + }) as any; }; /** * deserializeAws_restJson1Scte35SpliceInsert */ const de_Scte35SpliceInsert = (output: any, context: __SerdeContext): Scte35SpliceInsert => { - return { - AdAvailOffset: __expectInt32(output.adAvailOffset), - NoRegionalBlackoutFlag: __expectString(output.noRegionalBlackoutFlag), - WebDeliveryAllowedFlag: __expectString(output.webDeliveryAllowedFlag), - } as any; + return take(output, { + AdAvailOffset: [, __expectInt32, `adAvailOffset`], + NoRegionalBlackoutFlag: [, __expectString, `noRegionalBlackoutFlag`], + WebDeliveryAllowedFlag: [, __expectString, `webDeliveryAllowedFlag`], + }) as any; }; /** @@ -13456,21 +12007,21 @@ const de_Scte35SpliceInsertScheduleActionSettings = ( output: any, context: __SerdeContext ): Scte35SpliceInsertScheduleActionSettings => { - return { - Duration: __expectLong(output.duration), - SpliceEventId: __expectLong(output.spliceEventId), - } as any; + return take(output, { + Duration: [, __expectLong, `duration`], + SpliceEventId: [, __expectLong, `spliceEventId`], + }) as any; }; /** * deserializeAws_restJson1Scte35TimeSignalApos */ const de_Scte35TimeSignalApos = (output: any, context: __SerdeContext): Scte35TimeSignalApos => { - return { - AdAvailOffset: __expectInt32(output.adAvailOffset), - NoRegionalBlackoutFlag: __expectString(output.noRegionalBlackoutFlag), - WebDeliveryAllowedFlag: __expectString(output.webDeliveryAllowedFlag), - } as any; + return take(output, { + AdAvailOffset: [, __expectInt32, `adAvailOffset`], + NoRegionalBlackoutFlag: [, __expectString, `noRegionalBlackoutFlag`], + WebDeliveryAllowedFlag: [, __expectString, `webDeliveryAllowedFlag`], + }) as any; }; /** @@ -13480,36 +12031,30 @@ const de_Scte35TimeSignalScheduleActionSettings = ( output: any, context: __SerdeContext ): Scte35TimeSignalScheduleActionSettings => { - return { - Scte35Descriptors: - output.scte35Descriptors != null ? de___listOfScte35Descriptor(output.scte35Descriptors, context) : undefined, - } as any; + return take(output, { + Scte35Descriptors: (_) => [, de___listOfScte35Descriptor(_, context), `scte35Descriptors`], + }) as any; }; -/** - * deserializeAws_restJson1SmpteTtDestinationSettings - */ -const de_SmpteTtDestinationSettings = (output: any, context: __SerdeContext): SmpteTtDestinationSettings => { - return {} as any; -}; +// de_SmpteTtDestinationSettings omitted. /** * deserializeAws_restJson1StandardHlsSettings */ const de_StandardHlsSettings = (output: any, context: __SerdeContext): StandardHlsSettings => { - return { - AudioRenditionSets: __expectString(output.audioRenditionSets), - M3u8Settings: output.m3u8Settings != null ? de_M3u8Settings(output.m3u8Settings, context) : undefined, - } as any; + return take(output, { + AudioRenditionSets: [, __expectString, `audioRenditionSets`], + M3u8Settings: (_) => [, de_M3u8Settings(_, context), `m3u8Settings`], + }) as any; }; /** * deserializeAws_restJson1StartTimecode */ const de_StartTimecode = (output: any, context: __SerdeContext): StartTimecode => { - return { - Timecode: __expectString(output.timecode), - } as any; + return take(output, { + Timecode: [, __expectString, `timecode`], + }) as any; }; /** @@ -13519,18 +12064,18 @@ const de_StaticImageActivateScheduleActionSettings = ( output: any, context: __SerdeContext ): StaticImageActivateScheduleActionSettings => { - return { - Duration: __expectInt32(output.duration), - FadeIn: __expectInt32(output.fadeIn), - FadeOut: __expectInt32(output.fadeOut), - Height: __expectInt32(output.height), - Image: output.image != null ? de_InputLocation(output.image, context) : undefined, - ImageX: __expectInt32(output.imageX), - ImageY: __expectInt32(output.imageY), - Layer: __expectInt32(output.layer), - Opacity: __expectInt32(output.opacity), - Width: __expectInt32(output.width), - } as any; + return take(output, { + Duration: [, __expectInt32, `duration`], + FadeIn: [, __expectInt32, `fadeIn`], + FadeOut: [, __expectInt32, `fadeOut`], + Height: [, __expectInt32, `height`], + Image: (_) => [, de_InputLocation(_, context), `image`], + ImageX: [, __expectInt32, `imageX`], + ImageY: [, __expectInt32, `imageY`], + Layer: [, __expectInt32, `layer`], + Opacity: [, __expectInt32, `opacity`], + Width: [, __expectInt32, `width`], + }) as any; }; /** @@ -13540,287 +12085,256 @@ const de_StaticImageDeactivateScheduleActionSettings = ( output: any, context: __SerdeContext ): StaticImageDeactivateScheduleActionSettings => { - return { - FadeOut: __expectInt32(output.fadeOut), - Layer: __expectInt32(output.layer), - } as any; + return take(output, { + FadeOut: [, __expectInt32, `fadeOut`], + Layer: [, __expectInt32, `layer`], + }) as any; }; /** * deserializeAws_restJson1StaticKeySettings */ const de_StaticKeySettings = (output: any, context: __SerdeContext): StaticKeySettings => { - return { - KeyProviderServer: - output.keyProviderServer != null ? de_InputLocation(output.keyProviderServer, context) : undefined, - StaticKeyValue: __expectString(output.staticKeyValue), - } as any; + return take(output, { + KeyProviderServer: (_) => [, de_InputLocation(_, context), `keyProviderServer`], + StaticKeyValue: [, __expectString, `staticKeyValue`], + }) as any; }; /** * deserializeAws_restJson1StopTimecode */ const de_StopTimecode = (output: any, context: __SerdeContext): StopTimecode => { - return { - LastFrameClippingBehavior: __expectString(output.lastFrameClippingBehavior), - Timecode: __expectString(output.timecode), - } as any; + return take(output, { + LastFrameClippingBehavior: [, __expectString, `lastFrameClippingBehavior`], + Timecode: [, __expectString, `timecode`], + }) as any; }; -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1TeletextDestinationSettings - */ -const de_TeletextDestinationSettings = (output: any, context: __SerdeContext): TeletextDestinationSettings => { - return {} as any; -}; +// de_TeletextDestinationSettings omitted. /** * deserializeAws_restJson1TeletextSourceSettings */ const de_TeletextSourceSettings = (output: any, context: __SerdeContext): TeletextSourceSettings => { - return { - OutputRectangle: output.outputRectangle != null ? de_CaptionRectangle(output.outputRectangle, context) : undefined, - PageNumber: __expectString(output.pageNumber), - } as any; + return take(output, { + OutputRectangle: (_) => [, de_CaptionRectangle(_, context), `outputRectangle`], + PageNumber: [, __expectString, `pageNumber`], + }) as any; }; /** * deserializeAws_restJson1TemporalFilterSettings */ const de_TemporalFilterSettings = (output: any, context: __SerdeContext): TemporalFilterSettings => { - return { - PostFilterSharpening: __expectString(output.postFilterSharpening), - Strength: __expectString(output.strength), - } as any; + return take(output, { + PostFilterSharpening: [, __expectString, `postFilterSharpening`], + Strength: [, __expectString, `strength`], + }) as any; }; /** * deserializeAws_restJson1TimecodeBurninSettings */ const de_TimecodeBurninSettings = (output: any, context: __SerdeContext): TimecodeBurninSettings => { - return { - FontSize: __expectString(output.fontSize), - Position: __expectString(output.position), - Prefix: __expectString(output.prefix), - } as any; + return take(output, { + FontSize: [, __expectString, `fontSize`], + Position: [, __expectString, `position`], + Prefix: [, __expectString, `prefix`], + }) as any; }; /** * deserializeAws_restJson1TimecodeConfig */ const de_TimecodeConfig = (output: any, context: __SerdeContext): TimecodeConfig => { - return { - Source: __expectString(output.source), - SyncThreshold: __expectInt32(output.syncThreshold), - } as any; + return take(output, { + Source: [, __expectString, `source`], + SyncThreshold: [, __expectInt32, `syncThreshold`], + }) as any; }; /** * deserializeAws_restJson1TransferringInputDeviceSummary */ const de_TransferringInputDeviceSummary = (output: any, context: __SerdeContext): TransferringInputDeviceSummary => { - return { - Id: __expectString(output.id), - Message: __expectString(output.message), - TargetCustomerId: __expectString(output.targetCustomerId), - TransferType: __expectString(output.transferType), - } as any; + return take(output, { + Id: [, __expectString, `id`], + Message: [, __expectString, `message`], + TargetCustomerId: [, __expectString, `targetCustomerId`], + TransferType: [, __expectString, `transferType`], + }) as any; }; /** * deserializeAws_restJson1TtmlDestinationSettings */ const de_TtmlDestinationSettings = (output: any, context: __SerdeContext): TtmlDestinationSettings => { - return { - StyleControl: __expectString(output.styleControl), - } as any; + return take(output, { + StyleControl: [, __expectString, `styleControl`], + }) as any; }; /** * deserializeAws_restJson1UdpContainerSettings */ const de_UdpContainerSettings = (output: any, context: __SerdeContext): UdpContainerSettings => { - return { - M2tsSettings: output.m2tsSettings != null ? de_M2tsSettings(output.m2tsSettings, context) : undefined, - } as any; + return take(output, { + M2tsSettings: (_) => [, de_M2tsSettings(_, context), `m2tsSettings`], + }) as any; }; /** * deserializeAws_restJson1UdpGroupSettings */ const de_UdpGroupSettings = (output: any, context: __SerdeContext): UdpGroupSettings => { - return { - InputLossAction: __expectString(output.inputLossAction), - TimedMetadataId3Frame: __expectString(output.timedMetadataId3Frame), - TimedMetadataId3Period: __expectInt32(output.timedMetadataId3Period), - } as any; + return take(output, { + InputLossAction: [, __expectString, `inputLossAction`], + TimedMetadataId3Frame: [, __expectString, `timedMetadataId3Frame`], + TimedMetadataId3Period: [, __expectInt32, `timedMetadataId3Period`], + }) as any; }; /** * deserializeAws_restJson1UdpOutputSettings */ const de_UdpOutputSettings = (output: any, context: __SerdeContext): UdpOutputSettings => { - return { - BufferMsec: __expectInt32(output.bufferMsec), - ContainerSettings: - output.containerSettings != null ? de_UdpContainerSettings(output.containerSettings, context) : undefined, - Destination: output.destination != null ? de_OutputLocationRef(output.destination, context) : undefined, - FecOutputSettings: - output.fecOutputSettings != null ? de_FecOutputSettings(output.fecOutputSettings, context) : undefined, - } as any; + return take(output, { + BufferMsec: [, __expectInt32, `bufferMsec`], + ContainerSettings: (_) => [, de_UdpContainerSettings(_, context), `containerSettings`], + Destination: (_) => [, de_OutputLocationRef(_, context), `destination`], + FecOutputSettings: (_) => [, de_FecOutputSettings(_, context), `fecOutputSettings`], + }) as any; }; /** * deserializeAws_restJson1ValidationError */ const de_ValidationError = (output: any, context: __SerdeContext): ValidationError => { - return { - ElementPath: __expectString(output.elementPath), - ErrorMessage: __expectString(output.errorMessage), - } as any; + return take(output, { + ElementPath: [, __expectString, `elementPath`], + ErrorMessage: [, __expectString, `errorMessage`], + }) as any; }; /** * deserializeAws_restJson1VideoBlackFailoverSettings */ const de_VideoBlackFailoverSettings = (output: any, context: __SerdeContext): VideoBlackFailoverSettings => { - return { - BlackDetectThreshold: __limitedParseDouble(output.blackDetectThreshold), - VideoBlackThresholdMsec: __expectInt32(output.videoBlackThresholdMsec), - } as any; + return take(output, { + BlackDetectThreshold: [, __limitedParseDouble, `blackDetectThreshold`], + VideoBlackThresholdMsec: [, __expectInt32, `videoBlackThresholdMsec`], + }) as any; }; /** * deserializeAws_restJson1VideoCodecSettings */ const de_VideoCodecSettings = (output: any, context: __SerdeContext): VideoCodecSettings => { - return { - FrameCaptureSettings: - output.frameCaptureSettings != null ? de_FrameCaptureSettings(output.frameCaptureSettings, context) : undefined, - H264Settings: output.h264Settings != null ? de_H264Settings(output.h264Settings, context) : undefined, - H265Settings: output.h265Settings != null ? de_H265Settings(output.h265Settings, context) : undefined, - Mpeg2Settings: output.mpeg2Settings != null ? de_Mpeg2Settings(output.mpeg2Settings, context) : undefined, - } as any; + return take(output, { + FrameCaptureSettings: (_) => [, de_FrameCaptureSettings(_, context), `frameCaptureSettings`], + H264Settings: (_) => [, de_H264Settings(_, context), `h264Settings`], + H265Settings: (_) => [, de_H265Settings(_, context), `h265Settings`], + Mpeg2Settings: (_) => [, de_Mpeg2Settings(_, context), `mpeg2Settings`], + }) as any; }; /** * deserializeAws_restJson1VideoDescription */ const de_VideoDescription = (output: any, context: __SerdeContext): VideoDescription => { - return { - CodecSettings: output.codecSettings != null ? de_VideoCodecSettings(output.codecSettings, context) : undefined, - Height: __expectInt32(output.height), - Name: __expectString(output.name), - RespondToAfd: __expectString(output.respondToAfd), - ScalingBehavior: __expectString(output.scalingBehavior), - Sharpness: __expectInt32(output.sharpness), - Width: __expectInt32(output.width), - } as any; + return take(output, { + CodecSettings: (_) => [, de_VideoCodecSettings(_, context), `codecSettings`], + Height: [, __expectInt32, `height`], + Name: [, __expectString, `name`], + RespondToAfd: [, __expectString, `respondToAfd`], + ScalingBehavior: [, __expectString, `scalingBehavior`], + Sharpness: [, __expectInt32, `sharpness`], + Width: [, __expectInt32, `width`], + }) as any; }; /** * deserializeAws_restJson1VideoSelector */ const de_VideoSelector = (output: any, context: __SerdeContext): VideoSelector => { - return { - ColorSpace: __expectString(output.colorSpace), - ColorSpaceSettings: - output.colorSpaceSettings != null - ? de_VideoSelectorColorSpaceSettings(output.colorSpaceSettings, context) - : undefined, - ColorSpaceUsage: __expectString(output.colorSpaceUsage), - SelectorSettings: - output.selectorSettings != null ? de_VideoSelectorSettings(output.selectorSettings, context) : undefined, - } as any; + return take(output, { + ColorSpace: [, __expectString, `colorSpace`], + ColorSpaceSettings: (_) => [, de_VideoSelectorColorSpaceSettings(_, context), `colorSpaceSettings`], + ColorSpaceUsage: [, __expectString, `colorSpaceUsage`], + SelectorSettings: (_) => [, de_VideoSelectorSettings(_, context), `selectorSettings`], + }) as any; }; /** * deserializeAws_restJson1VideoSelectorColorSpaceSettings */ const de_VideoSelectorColorSpaceSettings = (output: any, context: __SerdeContext): VideoSelectorColorSpaceSettings => { - return { - Hdr10Settings: output.hdr10Settings != null ? de_Hdr10Settings(output.hdr10Settings, context) : undefined, - } as any; + return take(output, { + Hdr10Settings: (_) => [, de_Hdr10Settings(_, context), `hdr10Settings`], + }) as any; }; /** * deserializeAws_restJson1VideoSelectorPid */ const de_VideoSelectorPid = (output: any, context: __SerdeContext): VideoSelectorPid => { - return { - Pid: __expectInt32(output.pid), - } as any; + return take(output, { + Pid: [, __expectInt32, `pid`], + }) as any; }; /** * deserializeAws_restJson1VideoSelectorProgramId */ const de_VideoSelectorProgramId = (output: any, context: __SerdeContext): VideoSelectorProgramId => { - return { - ProgramId: __expectInt32(output.programId), - } as any; + return take(output, { + ProgramId: [, __expectInt32, `programId`], + }) as any; }; /** * deserializeAws_restJson1VideoSelectorSettings */ const de_VideoSelectorSettings = (output: any, context: __SerdeContext): VideoSelectorSettings => { - return { - VideoSelectorPid: - output.videoSelectorPid != null ? de_VideoSelectorPid(output.videoSelectorPid, context) : undefined, - VideoSelectorProgramId: - output.videoSelectorProgramId != null - ? de_VideoSelectorProgramId(output.videoSelectorProgramId, context) - : undefined, - } as any; + return take(output, { + VideoSelectorPid: (_) => [, de_VideoSelectorPid(_, context), `videoSelectorPid`], + VideoSelectorProgramId: (_) => [, de_VideoSelectorProgramId(_, context), `videoSelectorProgramId`], + }) as any; }; /** * deserializeAws_restJson1VpcOutputSettingsDescription */ const de_VpcOutputSettingsDescription = (output: any, context: __SerdeContext): VpcOutputSettingsDescription => { - return { - AvailabilityZones: - output.availabilityZones != null ? de___listOf__string(output.availabilityZones, context) : undefined, - NetworkInterfaceIds: - output.networkInterfaceIds != null ? de___listOf__string(output.networkInterfaceIds, context) : undefined, - SecurityGroupIds: - output.securityGroupIds != null ? de___listOf__string(output.securityGroupIds, context) : undefined, - SubnetIds: output.subnetIds != null ? de___listOf__string(output.subnetIds, context) : undefined, - } as any; + return take(output, { + AvailabilityZones: [, _json, `availabilityZones`], + NetworkInterfaceIds: [, _json, `networkInterfaceIds`], + SecurityGroupIds: [, _json, `securityGroupIds`], + SubnetIds: [, _json, `subnetIds`], + }) as any; }; /** * deserializeAws_restJson1WavSettings */ const de_WavSettings = (output: any, context: __SerdeContext): WavSettings => { - return { - BitDepth: __limitedParseDouble(output.bitDepth), - CodingMode: __expectString(output.codingMode), - SampleRate: __limitedParseDouble(output.sampleRate), - } as any; + return take(output, { + BitDepth: [, __limitedParseDouble, `bitDepth`], + CodingMode: [, __expectString, `codingMode`], + SampleRate: [, __limitedParseDouble, `sampleRate`], + }) as any; }; /** * deserializeAws_restJson1WebvttDestinationSettings */ const de_WebvttDestinationSettings = (output: any, context: __SerdeContext): WebvttDestinationSettings => { - return { - StyleControl: __expectString(output.styleControl), - } as any; + return take(output, { + StyleControl: [, __expectString, `styleControl`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-mediapackage-vod/src/protocols/Aws_restJson1.ts b/clients/client-mediapackage-vod/src/protocols/Aws_restJson1.ts index 5badb9c28583..484ff4b705ef 100644 --- a/clients/client-mediapackage-vod/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediapackage-vod/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,9 +9,10 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -111,9 +113,11 @@ export const se_ConfigureLogsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}/configure_logs"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.EgressAccessLogs != null && { egressAccessLogs: se_EgressAccessLogs(input.EgressAccessLogs, context) }), - }); + body = JSON.stringify( + take(input, { + egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -138,14 +142,16 @@ export const se_CreateAssetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assets"; let body: any; - body = JSON.stringify({ - ...(input.Id != null && { id: input.Id }), - ...(input.PackagingGroupId != null && { packagingGroupId: input.PackagingGroupId }), - ...(input.ResourceId != null && { resourceId: input.ResourceId }), - ...(input.SourceArn != null && { sourceArn: input.SourceArn }), - ...(input.SourceRoleArn != null && { sourceRoleArn: input.SourceRoleArn }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + id: [, , `Id`], + packagingGroupId: [, , `PackagingGroupId`], + resourceId: [, , `ResourceId`], + sourceArn: [, , `SourceArn`], + sourceRoleArn: [, , `SourceRoleArn`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -171,15 +177,17 @@ export const se_CreatePackagingConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_configurations"; let body: any; - body = JSON.stringify({ - ...(input.CmafPackage != null && { cmafPackage: se_CmafPackage(input.CmafPackage, context) }), - ...(input.DashPackage != null && { dashPackage: se_DashPackage(input.DashPackage, context) }), - ...(input.HlsPackage != null && { hlsPackage: se_HlsPackage(input.HlsPackage, context) }), - ...(input.Id != null && { id: input.Id }), - ...(input.MssPackage != null && { mssPackage: se_MssPackage(input.MssPackage, context) }), - ...(input.PackagingGroupId != null && { packagingGroupId: input.PackagingGroupId }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + cmafPackage: [, (_) => se_CmafPackage(_, context), `CmafPackage`], + dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`], + hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`], + id: [, , `Id`], + mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`], + packagingGroupId: [, , `PackagingGroupId`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -204,12 +212,14 @@ export const se_CreatePackagingGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups"; let body: any; - body = JSON.stringify({ - ...(input.Authorization != null && { authorization: se_Authorization(input.Authorization, context) }), - ...(input.EgressAccessLogs != null && { egressAccessLogs: se_EgressAccessLogs(input.EgressAccessLogs, context) }), - ...(input.Id != null && { id: input.Id }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + authorization: [, (_) => se_Authorization(_, context), `Authorization`], + egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`], + id: [, , `Id`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -482,9 +492,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -540,9 +552,11 @@ export const se_UpdatePackagingGroupCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packaging_groups/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Authorization != null && { authorization: se_Authorization(input.Authorization, context) }), - }); + body = JSON.stringify( + take(input, { + authorization: [, (_) => se_Authorization(_, context), `Authorization`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -568,27 +582,16 @@ export const de_ConfigureLogsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + CreatedAt: [, __expectString, `createdAt`], + DomainName: [, __expectString, `domainName`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + Id: [, __expectString, `id`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -625,10 +628,9 @@ const de_ConfigureLogsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -648,33 +650,18 @@ export const de_CreateAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.egressEndpoints != null) { - contents.EgressEndpoints = de___listOfEgressEndpoint(data.egressEndpoints, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.packagingGroupId != null) { - contents.PackagingGroupId = __expectString(data.packagingGroupId); - } - if (data.resourceId != null) { - contents.ResourceId = __expectString(data.resourceId); - } - if (data.sourceArn != null) { - contents.SourceArn = __expectString(data.sourceArn); - } - if (data.sourceRoleArn != null) { - contents.SourceRoleArn = __expectString(data.sourceRoleArn); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + EgressEndpoints: [, (_) => de___listOfEgressEndpoint(_, context), `egressEndpoints`], + Id: [, __expectString, `id`], + PackagingGroupId: [, __expectString, `packagingGroupId`], + ResourceId: [, __expectString, `resourceId`], + SourceArn: [, __expectString, `sourceArn`], + SourceRoleArn: [, __expectString, `sourceRoleArn`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -711,10 +698,9 @@ const de_CreateAssetCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -734,33 +720,18 @@ export const de_CreatePackagingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.cmafPackage != null) { - contents.CmafPackage = de_CmafPackage(data.cmafPackage, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.dashPackage != null) { - contents.DashPackage = de_DashPackage(data.dashPackage, context); - } - if (data.hlsPackage != null) { - contents.HlsPackage = de_HlsPackage(data.hlsPackage, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.mssPackage != null) { - contents.MssPackage = de_MssPackage(data.mssPackage, context); - } - if (data.packagingGroupId != null) { - contents.PackagingGroupId = __expectString(data.packagingGroupId); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`], + HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`], + PackagingGroupId: [, __expectString, `packagingGroupId`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -797,10 +768,9 @@ const de_CreatePackagingConfigurationCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -820,27 +790,16 @@ export const de_CreatePackagingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + CreatedAt: [, __expectString, `createdAt`], + DomainName: [, __expectString, `domainName`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + Id: [, __expectString, `id`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -877,10 +836,9 @@ const de_CreatePackagingGroupCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -936,10 +894,9 @@ const de_DeleteAssetCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -995,10 +952,9 @@ const de_DeletePackagingConfigurationCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1054,10 +1010,9 @@ const de_DeletePackagingGroupCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1077,33 +1032,18 @@ export const de_DescribeAssetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.egressEndpoints != null) { - contents.EgressEndpoints = de___listOfEgressEndpoint(data.egressEndpoints, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.packagingGroupId != null) { - contents.PackagingGroupId = __expectString(data.packagingGroupId); - } - if (data.resourceId != null) { - contents.ResourceId = __expectString(data.resourceId); - } - if (data.sourceArn != null) { - contents.SourceArn = __expectString(data.sourceArn); - } - if (data.sourceRoleArn != null) { - contents.SourceRoleArn = __expectString(data.sourceRoleArn); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + EgressEndpoints: [, (_) => de___listOfEgressEndpoint(_, context), `egressEndpoints`], + Id: [, __expectString, `id`], + PackagingGroupId: [, __expectString, `packagingGroupId`], + ResourceId: [, __expectString, `resourceId`], + SourceArn: [, __expectString, `sourceArn`], + SourceRoleArn: [, __expectString, `sourceRoleArn`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1140,10 +1080,9 @@ const de_DescribeAssetCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1163,33 +1102,18 @@ export const de_DescribePackagingConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.cmafPackage != null) { - contents.CmafPackage = de_CmafPackage(data.cmafPackage, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.dashPackage != null) { - contents.DashPackage = de_DashPackage(data.dashPackage, context); - } - if (data.hlsPackage != null) { - contents.HlsPackage = de_HlsPackage(data.hlsPackage, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.mssPackage != null) { - contents.MssPackage = de_MssPackage(data.mssPackage, context); - } - if (data.packagingGroupId != null) { - contents.PackagingGroupId = __expectString(data.packagingGroupId); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`], + HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`], + PackagingGroupId: [, __expectString, `packagingGroupId`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1226,10 +1150,9 @@ const de_DescribePackagingConfigurationCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1249,30 +1172,17 @@ export const de_DescribePackagingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.approximateAssetCount != null) { - contents.ApproximateAssetCount = __expectInt32(data.approximateAssetCount); - } - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ApproximateAssetCount: [, __expectInt32, `approximateAssetCount`], + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + CreatedAt: [, __expectString, `createdAt`], + DomainName: [, __expectString, `domainName`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + Id: [, __expectString, `id`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1309,10 +1219,9 @@ const de_DescribePackagingGroupCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1332,12 +1241,11 @@ export const de_ListAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assets != null) { - contents.Assets = de___listOfAssetShallow(data.assets, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Assets: [, (_) => de___listOfAssetShallow(_, context), `assets`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1374,10 +1282,9 @@ const de_ListAssetsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1397,12 +1304,11 @@ export const de_ListPackagingConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.packagingConfigurations != null) { - contents.PackagingConfigurations = de___listOfPackagingConfiguration(data.packagingConfigurations, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + PackagingConfigurations: [, (_) => de___listOfPackagingConfiguration(_, context), `packagingConfigurations`], + }); + Object.assign(contents, doc); return contents; }; @@ -1439,10 +1345,9 @@ const de_ListPackagingConfigurationsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1462,12 +1367,11 @@ export const de_ListPackagingGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.packagingGroups != null) { - contents.PackagingGroups = de___listOfPackagingGroup(data.packagingGroups, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + PackagingGroups: [, (_) => de___listOfPackagingGroup(_, context), `packagingGroups`], + }); + Object.assign(contents, doc); return contents; }; @@ -1504,10 +1408,9 @@ const de_ListPackagingGroupsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1527,9 +1430,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1546,10 +1450,9 @@ const de_ListTagsForResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1584,10 +1487,9 @@ const de_TagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1622,10 +1524,9 @@ const de_UntagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1644,30 +1545,17 @@ export const de_UpdatePackagingGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.approximateAssetCount != null) { - contents.ApproximateAssetCount = __expectInt32(data.approximateAssetCount); - } - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.domainName != null) { - contents.DomainName = __expectString(data.domainName); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ApproximateAssetCount: [, __expectInt32, `approximateAssetCount`], + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + CreatedAt: [, __expectString, `createdAt`], + DomainName: [, __expectString, `domainName`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + Id: [, __expectString, `id`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1704,25 +1592,25 @@ const de_UpdatePackagingGroupCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ForbiddenExceptionRes */ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1739,9 +1627,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1755,9 +1644,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1774,9 +1664,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1793,9 +1684,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1812,9 +1704,10 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1822,30 +1715,9 @@ const de_UnprocessableEntityExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__PeriodTriggersElement - */ -const se___listOf__PeriodTriggersElement = ( - input: (__PeriodTriggersElement | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__PeriodTriggersElement omitted. -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfDashManifest @@ -1880,261 +1752,197 @@ const se___listOfMssManifest = (input: MssManifest[], context: __SerdeContext): }); }; -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. /** * serializeAws_restJson1Authorization */ const se_Authorization = (input: Authorization, context: __SerdeContext): any => { - return { - ...(input.CdnIdentifierSecret != null && { cdnIdentifierSecret: input.CdnIdentifierSecret }), - ...(input.SecretsRoleArn != null && { secretsRoleArn: input.SecretsRoleArn }), - }; + return take(input, { + cdnIdentifierSecret: [, , `CdnIdentifierSecret`], + secretsRoleArn: [, , `SecretsRoleArn`], + }); }; /** * serializeAws_restJson1CmafEncryption */ const se_CmafEncryption = (input: CmafEncryption, context: __SerdeContext): any => { - return { - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + constantInitializationVector: [, , `ConstantInitializationVector`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1CmafPackage */ const se_CmafPackage = (input: CmafPackage, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { encryption: se_CmafEncryption(input.Encryption, context) }), - ...(input.HlsManifests != null && { hlsManifests: se___listOfHlsManifest(input.HlsManifests, context) }), - ...(input.IncludeEncoderConfigurationInSegments != null && { - includeEncoderConfigurationInSegments: input.IncludeEncoderConfigurationInSegments, - }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - }; + return take(input, { + encryption: [, (_) => se_CmafEncryption(_, context), `Encryption`], + hlsManifests: [, (_) => se___listOfHlsManifest(_, context), `HlsManifests`], + includeEncoderConfigurationInSegments: [, , `IncludeEncoderConfigurationInSegments`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + }); }; /** * serializeAws_restJson1DashEncryption */ const se_DashEncryption = (input: DashEncryption, context: __SerdeContext): any => { - return { - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1DashManifest */ const se_DashManifest = (input: DashManifest, context: __SerdeContext): any => { - return { - ...(input.ManifestLayout != null && { manifestLayout: input.ManifestLayout }), - ...(input.ManifestName != null && { manifestName: input.ManifestName }), - ...(input.MinBufferTimeSeconds != null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.ScteMarkersSource != null && { scteMarkersSource: input.ScteMarkersSource }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - }; + return take(input, { + manifestLayout: [, , `ManifestLayout`], + manifestName: [, , `ManifestName`], + minBufferTimeSeconds: [, , `MinBufferTimeSeconds`], + profile: [, , `Profile`], + scteMarkersSource: [, , `ScteMarkersSource`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + }); }; /** * serializeAws_restJson1DashPackage */ const se_DashPackage = (input: DashPackage, context: __SerdeContext): any => { - return { - ...(input.DashManifests != null && { dashManifests: se___listOfDashManifest(input.DashManifests, context) }), - ...(input.Encryption != null && { encryption: se_DashEncryption(input.Encryption, context) }), - ...(input.IncludeEncoderConfigurationInSegments != null && { - includeEncoderConfigurationInSegments: input.IncludeEncoderConfigurationInSegments, - }), - ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }), - ...(input.PeriodTriggers != null && { - periodTriggers: se___listOf__PeriodTriggersElement(input.PeriodTriggers, context), - }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - ...(input.SegmentTemplateFormat != null && { segmentTemplateFormat: input.SegmentTemplateFormat }), - }; + return take(input, { + dashManifests: [, (_) => se___listOfDashManifest(_, context), `DashManifests`], + encryption: [, (_) => se_DashEncryption(_, context), `Encryption`], + includeEncoderConfigurationInSegments: [, , `IncludeEncoderConfigurationInSegments`], + includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`], + periodTriggers: [, _json, `PeriodTriggers`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + segmentTemplateFormat: [, , `SegmentTemplateFormat`], + }); }; /** * serializeAws_restJson1EgressAccessLogs */ const se_EgressAccessLogs = (input: EgressAccessLogs, context: __SerdeContext): any => { - return { - ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }), - }; + return take(input, { + logGroupName: [, , `LogGroupName`], + }); }; /** * serializeAws_restJson1EncryptionContractConfiguration */ const se_EncryptionContractConfiguration = (input: EncryptionContractConfiguration, context: __SerdeContext): any => { - return { - ...(input.PresetSpeke20Audio != null && { presetSpeke20Audio: input.PresetSpeke20Audio }), - ...(input.PresetSpeke20Video != null && { presetSpeke20Video: input.PresetSpeke20Video }), - }; + return take(input, { + presetSpeke20Audio: [, , `PresetSpeke20Audio`], + presetSpeke20Video: [, , `PresetSpeke20Video`], + }); }; /** * serializeAws_restJson1HlsEncryption */ const se_HlsEncryption = (input: HlsEncryption, context: __SerdeContext): any => { - return { - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + constantInitializationVector: [, , `ConstantInitializationVector`], + encryptionMethod: [, , `EncryptionMethod`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1HlsManifest */ const se_HlsManifest = (input: HlsManifest, context: __SerdeContext): any => { - return { - ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }), - ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }), - ...(input.ManifestName != null && { manifestName: input.ManifestName }), - ...(input.ProgramDateTimeIntervalSeconds != null && { - programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds, - }), - ...(input.RepeatExtXKey != null && { repeatExtXKey: input.RepeatExtXKey }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - }; + return take(input, { + adMarkers: [, , `AdMarkers`], + includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`], + manifestName: [, , `ManifestName`], + programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`], + repeatExtXKey: [, , `RepeatExtXKey`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + }); }; /** * serializeAws_restJson1HlsPackage */ const se_HlsPackage = (input: HlsPackage, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { encryption: se_HlsEncryption(input.Encryption, context) }), - ...(input.HlsManifests != null && { hlsManifests: se___listOfHlsManifest(input.HlsManifests, context) }), - ...(input.IncludeDvbSubtitles != null && { includeDvbSubtitles: input.IncludeDvbSubtitles }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - ...(input.UseAudioRenditionGroup != null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }), - }; + return take(input, { + encryption: [, (_) => se_HlsEncryption(_, context), `Encryption`], + hlsManifests: [, (_) => se___listOfHlsManifest(_, context), `HlsManifests`], + includeDvbSubtitles: [, , `IncludeDvbSubtitles`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + useAudioRenditionGroup: [, , `UseAudioRenditionGroup`], + }); }; /** * serializeAws_restJson1MssEncryption */ const se_MssEncryption = (input: MssEncryption, context: __SerdeContext): any => { - return { - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1MssManifest */ const se_MssManifest = (input: MssManifest, context: __SerdeContext): any => { - return { - ...(input.ManifestName != null && { manifestName: input.ManifestName }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - }; + return take(input, { + manifestName: [, , `ManifestName`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + }); }; /** * serializeAws_restJson1MssPackage */ const se_MssPackage = (input: MssPackage, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { encryption: se_MssEncryption(input.Encryption, context) }), - ...(input.MssManifests != null && { mssManifests: se___listOfMssManifest(input.MssManifests, context) }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - }; + return take(input, { + encryption: [, (_) => se_MssEncryption(_, context), `Encryption`], + mssManifests: [, (_) => se___listOfMssManifest(_, context), `MssManifests`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + }); }; /** * serializeAws_restJson1SpekeKeyProvider */ const se_SpekeKeyProvider = (input: SpekeKeyProvider, context: __SerdeContext): any => { - return { - ...(input.EncryptionContractConfiguration != null && { - encryptionContractConfiguration: se_EncryptionContractConfiguration( - input.EncryptionContractConfiguration, - context - ), - }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.SystemIds != null && { systemIds: se___listOf__string(input.SystemIds, context) }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + encryptionContractConfiguration: [ + , + (_) => se_EncryptionContractConfiguration(_, context), + `EncryptionContractConfiguration`, + ], + roleArn: [, , `RoleArn`], + systemIds: [, _json, `SystemIds`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1StreamSelection */ const se_StreamSelection = (input: StreamSelection, context: __SerdeContext): any => { - return { - ...(input.MaxVideoBitsPerSecond != null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }), - ...(input.MinVideoBitsPerSecond != null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }), - ...(input.StreamOrder != null && { streamOrder: input.StreamOrder }), - }; + return take(input, { + maxVideoBitsPerSecond: [, , `MaxVideoBitsPerSecond`], + minVideoBitsPerSecond: [, , `MinVideoBitsPerSecond`], + streamOrder: [, , `StreamOrder`], + }); }; -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1__listOf__PeriodTriggersElement - */ -const de___listOf__PeriodTriggersElement = ( - output: any, - context: __SerdeContext -): (__PeriodTriggersElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__PeriodTriggersElement omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfAssetShallow @@ -2143,9 +1951,6 @@ const de___listOfAssetShallow = (output: any, context: __SerdeContext): AssetSha const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssetShallow(entry, context); }); return retVal; @@ -2158,9 +1963,6 @@ const de___listOfDashManifest = (output: any, context: __SerdeContext): DashMani const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DashManifest(entry, context); }); return retVal; @@ -2173,9 +1975,6 @@ const de___listOfEgressEndpoint = (output: any, context: __SerdeContext): Egress const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EgressEndpoint(entry, context); }); return retVal; @@ -2188,9 +1987,6 @@ const de___listOfHlsManifest = (output: any, context: __SerdeContext): HlsManife const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HlsManifest(entry, context); }); return retVal; @@ -2203,9 +1999,6 @@ const de___listOfMssManifest = (output: any, context: __SerdeContext): MssManife const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MssManifest(entry, context); }); return retVal; @@ -2218,9 +2011,6 @@ const de___listOfPackagingConfiguration = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackagingConfiguration(entry, context); }); return retVal; @@ -2233,288 +2023,258 @@ const de___listOfPackagingGroup = (output: any, context: __SerdeContext): Packag const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackagingGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. /** * deserializeAws_restJson1AssetShallow */ const de_AssetShallow = (output: any, context: __SerdeContext): AssetShallow => { - return { - Arn: __expectString(output.arn), - CreatedAt: __expectString(output.createdAt), - Id: __expectString(output.id), - PackagingGroupId: __expectString(output.packagingGroupId), - ResourceId: __expectString(output.resourceId), - SourceArn: __expectString(output.sourceArn), - SourceRoleArn: __expectString(output.sourceRoleArn), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Id: [, __expectString, `id`], + PackagingGroupId: [, __expectString, `packagingGroupId`], + ResourceId: [, __expectString, `resourceId`], + SourceArn: [, __expectString, `sourceArn`], + SourceRoleArn: [, __expectString, `sourceRoleArn`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1Authorization */ const de_Authorization = (output: any, context: __SerdeContext): Authorization => { - return { - CdnIdentifierSecret: __expectString(output.cdnIdentifierSecret), - SecretsRoleArn: __expectString(output.secretsRoleArn), - } as any; + return take(output, { + CdnIdentifierSecret: [, __expectString, `cdnIdentifierSecret`], + SecretsRoleArn: [, __expectString, `secretsRoleArn`], + }) as any; }; /** * deserializeAws_restJson1CmafEncryption */ const de_CmafEncryption = (output: any, context: __SerdeContext): CmafEncryption => { - return { - ConstantInitializationVector: __expectString(output.constantInitializationVector), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1CmafPackage */ const de_CmafPackage = (output: any, context: __SerdeContext): CmafPackage => { - return { - Encryption: output.encryption != null ? de_CmafEncryption(output.encryption, context) : undefined, - HlsManifests: output.hlsManifests != null ? de___listOfHlsManifest(output.hlsManifests, context) : undefined, - IncludeEncoderConfigurationInSegments: __expectBoolean(output.includeEncoderConfigurationInSegments), - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - } as any; + return take(output, { + Encryption: (_) => [, de_CmafEncryption(_, context), `encryption`], + HlsManifests: (_) => [, de___listOfHlsManifest(_, context), `hlsManifests`], + IncludeEncoderConfigurationInSegments: [, __expectBoolean, `includeEncoderConfigurationInSegments`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + }) as any; }; /** * deserializeAws_restJson1DashEncryption */ const de_DashEncryption = (output: any, context: __SerdeContext): DashEncryption => { - return { - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1DashManifest */ const de_DashManifest = (output: any, context: __SerdeContext): DashManifest => { - return { - ManifestLayout: __expectString(output.manifestLayout), - ManifestName: __expectString(output.manifestName), - MinBufferTimeSeconds: __expectInt32(output.minBufferTimeSeconds), - Profile: __expectString(output.profile), - ScteMarkersSource: __expectString(output.scteMarkersSource), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - } as any; + return take(output, { + ManifestLayout: [, __expectString, `manifestLayout`], + ManifestName: [, __expectString, `manifestName`], + MinBufferTimeSeconds: [, __expectInt32, `minBufferTimeSeconds`], + Profile: [, __expectString, `profile`], + ScteMarkersSource: [, __expectString, `scteMarkersSource`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + }) as any; }; /** * deserializeAws_restJson1DashPackage */ const de_DashPackage = (output: any, context: __SerdeContext): DashPackage => { - return { - DashManifests: output.dashManifests != null ? de___listOfDashManifest(output.dashManifests, context) : undefined, - Encryption: output.encryption != null ? de_DashEncryption(output.encryption, context) : undefined, - IncludeEncoderConfigurationInSegments: __expectBoolean(output.includeEncoderConfigurationInSegments), - IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream), - PeriodTriggers: - output.periodTriggers != null ? de___listOf__PeriodTriggersElement(output.periodTriggers, context) : undefined, - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - SegmentTemplateFormat: __expectString(output.segmentTemplateFormat), - } as any; + return take(output, { + DashManifests: (_) => [, de___listOfDashManifest(_, context), `dashManifests`], + Encryption: (_) => [, de_DashEncryption(_, context), `encryption`], + IncludeEncoderConfigurationInSegments: [, __expectBoolean, `includeEncoderConfigurationInSegments`], + IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`], + PeriodTriggers: [, _json, `periodTriggers`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + SegmentTemplateFormat: [, __expectString, `segmentTemplateFormat`], + }) as any; }; /** * deserializeAws_restJson1EgressAccessLogs */ const de_EgressAccessLogs = (output: any, context: __SerdeContext): EgressAccessLogs => { - return { - LogGroupName: __expectString(output.logGroupName), - } as any; + return take(output, { + LogGroupName: [, __expectString, `logGroupName`], + }) as any; }; /** * deserializeAws_restJson1EgressEndpoint */ const de_EgressEndpoint = (output: any, context: __SerdeContext): EgressEndpoint => { - return { - PackagingConfigurationId: __expectString(output.packagingConfigurationId), - Status: __expectString(output.status), - Url: __expectString(output.url), - } as any; + return take(output, { + PackagingConfigurationId: [, __expectString, `packagingConfigurationId`], + Status: [, __expectString, `status`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1EncryptionContractConfiguration */ const de_EncryptionContractConfiguration = (output: any, context: __SerdeContext): EncryptionContractConfiguration => { - return { - PresetSpeke20Audio: __expectString(output.presetSpeke20Audio), - PresetSpeke20Video: __expectString(output.presetSpeke20Video), - } as any; + return take(output, { + PresetSpeke20Audio: [, __expectString, `presetSpeke20Audio`], + PresetSpeke20Video: [, __expectString, `presetSpeke20Video`], + }) as any; }; /** * deserializeAws_restJson1HlsEncryption */ const de_HlsEncryption = (output: any, context: __SerdeContext): HlsEncryption => { - return { - ConstantInitializationVector: __expectString(output.constantInitializationVector), - EncryptionMethod: __expectString(output.encryptionMethod), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + EncryptionMethod: [, __expectString, `encryptionMethod`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1HlsManifest */ const de_HlsManifest = (output: any, context: __SerdeContext): HlsManifest => { - return { - AdMarkers: __expectString(output.adMarkers), - IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream), - ManifestName: __expectString(output.manifestName), - ProgramDateTimeIntervalSeconds: __expectInt32(output.programDateTimeIntervalSeconds), - RepeatExtXKey: __expectBoolean(output.repeatExtXKey), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - } as any; + return take(output, { + AdMarkers: [, __expectString, `adMarkers`], + IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`], + ManifestName: [, __expectString, `manifestName`], + ProgramDateTimeIntervalSeconds: [, __expectInt32, `programDateTimeIntervalSeconds`], + RepeatExtXKey: [, __expectBoolean, `repeatExtXKey`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + }) as any; }; /** * deserializeAws_restJson1HlsPackage */ const de_HlsPackage = (output: any, context: __SerdeContext): HlsPackage => { - return { - Encryption: output.encryption != null ? de_HlsEncryption(output.encryption, context) : undefined, - HlsManifests: output.hlsManifests != null ? de___listOfHlsManifest(output.hlsManifests, context) : undefined, - IncludeDvbSubtitles: __expectBoolean(output.includeDvbSubtitles), - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - UseAudioRenditionGroup: __expectBoolean(output.useAudioRenditionGroup), - } as any; + return take(output, { + Encryption: (_) => [, de_HlsEncryption(_, context), `encryption`], + HlsManifests: (_) => [, de___listOfHlsManifest(_, context), `hlsManifests`], + IncludeDvbSubtitles: [, __expectBoolean, `includeDvbSubtitles`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + UseAudioRenditionGroup: [, __expectBoolean, `useAudioRenditionGroup`], + }) as any; }; /** * deserializeAws_restJson1MssEncryption */ const de_MssEncryption = (output: any, context: __SerdeContext): MssEncryption => { - return { - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1MssManifest */ const de_MssManifest = (output: any, context: __SerdeContext): MssManifest => { - return { - ManifestName: __expectString(output.manifestName), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - } as any; + return take(output, { + ManifestName: [, __expectString, `manifestName`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + }) as any; }; /** * deserializeAws_restJson1MssPackage */ const de_MssPackage = (output: any, context: __SerdeContext): MssPackage => { - return { - Encryption: output.encryption != null ? de_MssEncryption(output.encryption, context) : undefined, - MssManifests: output.mssManifests != null ? de___listOfMssManifest(output.mssManifests, context) : undefined, - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - } as any; + return take(output, { + Encryption: (_) => [, de_MssEncryption(_, context), `encryption`], + MssManifests: (_) => [, de___listOfMssManifest(_, context), `mssManifests`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + }) as any; }; /** * deserializeAws_restJson1PackagingConfiguration */ const de_PackagingConfiguration = (output: any, context: __SerdeContext): PackagingConfiguration => { - return { - Arn: __expectString(output.arn), - CmafPackage: output.cmafPackage != null ? de_CmafPackage(output.cmafPackage, context) : undefined, - CreatedAt: __expectString(output.createdAt), - DashPackage: output.dashPackage != null ? de_DashPackage(output.dashPackage, context) : undefined, - HlsPackage: output.hlsPackage != null ? de_HlsPackage(output.hlsPackage, context) : undefined, - Id: __expectString(output.id), - MssPackage: output.mssPackage != null ? de_MssPackage(output.mssPackage, context) : undefined, - PackagingGroupId: __expectString(output.packagingGroupId), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CmafPackage: (_) => [, de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: (_) => [, de_DashPackage(_, context), `dashPackage`], + HlsPackage: (_) => [, de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + MssPackage: (_) => [, de_MssPackage(_, context), `mssPackage`], + PackagingGroupId: [, __expectString, `packagingGroupId`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1PackagingGroup */ const de_PackagingGroup = (output: any, context: __SerdeContext): PackagingGroup => { - return { - ApproximateAssetCount: __expectInt32(output.approximateAssetCount), - Arn: __expectString(output.arn), - Authorization: output.authorization != null ? de_Authorization(output.authorization, context) : undefined, - CreatedAt: __expectString(output.createdAt), - DomainName: __expectString(output.domainName), - EgressAccessLogs: - output.egressAccessLogs != null ? de_EgressAccessLogs(output.egressAccessLogs, context) : undefined, - Id: __expectString(output.id), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + ApproximateAssetCount: [, __expectInt32, `approximateAssetCount`], + Arn: [, __expectString, `arn`], + Authorization: (_) => [, de_Authorization(_, context), `authorization`], + CreatedAt: [, __expectString, `createdAt`], + DomainName: [, __expectString, `domainName`], + EgressAccessLogs: (_) => [, de_EgressAccessLogs(_, context), `egressAccessLogs`], + Id: [, __expectString, `id`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1SpekeKeyProvider */ const de_SpekeKeyProvider = (output: any, context: __SerdeContext): SpekeKeyProvider => { - return { - EncryptionContractConfiguration: - output.encryptionContractConfiguration != null - ? de_EncryptionContractConfiguration(output.encryptionContractConfiguration, context) - : undefined, - RoleArn: __expectString(output.roleArn), - SystemIds: output.systemIds != null ? de___listOf__string(output.systemIds, context) : undefined, - Url: __expectString(output.url), - } as any; + return take(output, { + EncryptionContractConfiguration: (_) => [ + , + de_EncryptionContractConfiguration(_, context), + `encryptionContractConfiguration`, + ], + RoleArn: [, __expectString, `roleArn`], + SystemIds: [, _json, `systemIds`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1StreamSelection */ const de_StreamSelection = (output: any, context: __SerdeContext): StreamSelection => { - return { - MaxVideoBitsPerSecond: __expectInt32(output.maxVideoBitsPerSecond), - MinVideoBitsPerSecond: __expectInt32(output.minVideoBitsPerSecond), - StreamOrder: __expectString(output.streamOrder), - } as any; + return take(output, { + MaxVideoBitsPerSecond: [, __expectInt32, `maxVideoBitsPerSecond`], + MinVideoBitsPerSecond: [, __expectInt32, `minVideoBitsPerSecond`], + StreamOrder: [, __expectString, `streamOrder`], + }) as any; }; -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-mediapackage/src/protocols/Aws_restJson1.ts b/clients/client-mediapackage/src/protocols/Aws_restJson1.ts index 6ec85d278a92..b149a8c3e982 100644 --- a/clients/client-mediapackage/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediapackage/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,9 +9,10 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -111,12 +113,12 @@ export const se_ConfigureLogsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}/configure_logs"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.EgressAccessLogs != null && { egressAccessLogs: se_EgressAccessLogs(input.EgressAccessLogs, context) }), - ...(input.IngressAccessLogs != null && { - ingressAccessLogs: se_IngressAccessLogs(input.IngressAccessLogs, context), - }), - }); + body = JSON.stringify( + take(input, { + egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`], + ingressAccessLogs: [, (_) => se_IngressAccessLogs(_, context), `IngressAccessLogs`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -141,11 +143,13 @@ export const se_CreateChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - ...(input.Id != null && { id: input.Id }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + id: [, , `Id`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -170,13 +174,15 @@ export const se_CreateHarvestJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/harvest_jobs"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { endTime: input.EndTime }), - ...(input.Id != null && { id: input.Id }), - ...(input.OriginEndpointId != null && { originEndpointId: input.OriginEndpointId }), - ...(input.S3Destination != null && { s3Destination: se_S3Destination(input.S3Destination, context) }), - ...(input.StartTime != null && { startTime: input.StartTime }), - }); + body = JSON.stringify( + take(input, { + endTime: [, , `EndTime`], + id: [, , `Id`], + originEndpointId: [, , `OriginEndpointId`], + s3Destination: [, (_) => se_S3Destination(_, context), `S3Destination`], + startTime: [, , `StartTime`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -201,24 +207,24 @@ export const se_CreateOriginEndpointCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints"; let body: any; - body = JSON.stringify({ - ...(input.Authorization != null && { authorization: se_Authorization(input.Authorization, context) }), - ...(input.ChannelId != null && { channelId: input.ChannelId }), - ...(input.CmafPackage != null && { - cmafPackage: se_CmafPackageCreateOrUpdateParameters(input.CmafPackage, context), - }), - ...(input.DashPackage != null && { dashPackage: se_DashPackage(input.DashPackage, context) }), - ...(input.Description != null && { description: input.Description }), - ...(input.HlsPackage != null && { hlsPackage: se_HlsPackage(input.HlsPackage, context) }), - ...(input.Id != null && { id: input.Id }), - ...(input.ManifestName != null && { manifestName: input.ManifestName }), - ...(input.MssPackage != null && { mssPackage: se_MssPackage(input.MssPackage, context) }), - ...(input.Origination != null && { origination: input.Origination }), - ...(input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds }), - ...(input.Whitelist != null && { whitelist: se___listOf__string(input.Whitelist, context) }), - }); + body = JSON.stringify( + take(input, { + authorization: [, (_) => se_Authorization(_, context), `Authorization`], + channelId: [, , `ChannelId`], + cmafPackage: [, (_) => se_CmafPackageCreateOrUpdateParameters(_, context), `CmafPackage`], + dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`], + description: [, , `Description`], + hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`], + id: [, , `Id`], + manifestName: [, , `ManifestName`], + mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`], + origination: [, , `Origination`], + startoverWindowSeconds: [, , `StartoverWindowSeconds`], + tags: [, (_) => _json(_), `Tags`], + timeDelaySeconds: [, , `TimeDelaySeconds`], + whitelist: [, (_) => _json(_), `Whitelist`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -523,9 +529,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -581,9 +589,11 @@ export const se_UpdateChannelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { description: input.Description }), - }); + body = JSON.stringify( + take(input, { + description: [, , `Description`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -609,21 +619,21 @@ export const se_UpdateOriginEndpointCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/origin_endpoints/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.Authorization != null && { authorization: se_Authorization(input.Authorization, context) }), - ...(input.CmafPackage != null && { - cmafPackage: se_CmafPackageCreateOrUpdateParameters(input.CmafPackage, context), - }), - ...(input.DashPackage != null && { dashPackage: se_DashPackage(input.DashPackage, context) }), - ...(input.Description != null && { description: input.Description }), - ...(input.HlsPackage != null && { hlsPackage: se_HlsPackage(input.HlsPackage, context) }), - ...(input.ManifestName != null && { manifestName: input.ManifestName }), - ...(input.MssPackage != null && { mssPackage: se_MssPackage(input.MssPackage, context) }), - ...(input.Origination != null && { origination: input.Origination }), - ...(input.StartoverWindowSeconds != null && { startoverWindowSeconds: input.StartoverWindowSeconds }), - ...(input.TimeDelaySeconds != null && { timeDelaySeconds: input.TimeDelaySeconds }), - ...(input.Whitelist != null && { whitelist: se___listOf__string(input.Whitelist, context) }), - }); + body = JSON.stringify( + take(input, { + authorization: [, (_) => se_Authorization(_, context), `Authorization`], + cmafPackage: [, (_) => se_CmafPackageCreateOrUpdateParameters(_, context), `CmafPackage`], + dashPackage: [, (_) => se_DashPackage(_, context), `DashPackage`], + description: [, , `Description`], + hlsPackage: [, (_) => se_HlsPackage(_, context), `HlsPackage`], + manifestName: [, , `ManifestName`], + mssPackage: [, (_) => se_MssPackage(_, context), `MssPackage`], + origination: [, , `Origination`], + startoverWindowSeconds: [, , `StartoverWindowSeconds`], + timeDelaySeconds: [, , `TimeDelaySeconds`], + whitelist: [, (_) => _json(_), `Whitelist`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -649,30 +659,17 @@ export const de_ConfigureLogsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.hlsIngest != null) { - contents.HlsIngest = de_HlsIngest(data.hlsIngest, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.ingressAccessLogs != null) { - contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -709,10 +706,9 @@ const de_ConfigureLogsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -732,30 +728,17 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.hlsIngest != null) { - contents.HlsIngest = de_HlsIngest(data.hlsIngest, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.ingressAccessLogs != null) { - contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -792,10 +775,9 @@ const de_CreateChannelCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -815,33 +797,18 @@ export const de_CreateHarvestJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.endTime != null) { - contents.EndTime = __expectString(data.endTime); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.originEndpointId != null) { - contents.OriginEndpointId = __expectString(data.originEndpointId); - } - if (data.s3Destination != null) { - contents.S3Destination = de_S3Destination(data.s3Destination, context); - } - if (data.startTime != null) { - contents.StartTime = __expectString(data.startTime); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + ChannelId: [, __expectString, `channelId`], + CreatedAt: [, __expectString, `createdAt`], + EndTime: [, __expectString, `endTime`], + Id: [, __expectString, `id`], + OriginEndpointId: [, __expectString, `originEndpointId`], + S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`], + StartTime: [, __expectString, `startTime`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -878,10 +845,9 @@ const de_CreateHarvestJobCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -901,57 +867,26 @@ export const de_CreateOriginEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.cmafPackage != null) { - contents.CmafPackage = de_CmafPackage(data.cmafPackage, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.dashPackage != null) { - contents.DashPackage = de_DashPackage(data.dashPackage, context); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.hlsPackage != null) { - contents.HlsPackage = de_HlsPackage(data.hlsPackage, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.manifestName != null) { - contents.ManifestName = __expectString(data.manifestName); - } - if (data.mssPackage != null) { - contents.MssPackage = de_MssPackage(data.mssPackage, context); - } - if (data.origination != null) { - contents.Origination = __expectString(data.origination); - } - if (data.startoverWindowSeconds != null) { - contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.timeDelaySeconds != null) { - contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds); - } - if (data.url != null) { - contents.Url = __expectString(data.url); - } - if (data.whitelist != null) { - contents.Whitelist = de___listOf__string(data.whitelist, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + ChannelId: [, __expectString, `channelId`], + CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`], + Description: [, __expectString, `description`], + HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + ManifestName: [, __expectString, `manifestName`], + MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`], + Origination: [, __expectString, `origination`], + StartoverWindowSeconds: [, __expectInt32, `startoverWindowSeconds`], + Tags: [, _json, `tags`], + TimeDelaySeconds: [, __expectInt32, `timeDelaySeconds`], + Url: [, __expectString, `url`], + Whitelist: [, _json, `whitelist`], + }); + Object.assign(contents, doc); return contents; }; @@ -988,10 +923,9 @@ const de_CreateOriginEndpointCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1047,10 +981,9 @@ const de_DeleteChannelCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1106,10 +1039,9 @@ const de_DeleteOriginEndpointCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1129,30 +1061,17 @@ export const de_DescribeChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.hlsIngest != null) { - contents.HlsIngest = de_HlsIngest(data.hlsIngest, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.ingressAccessLogs != null) { - contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1189,10 +1108,9 @@ const de_DescribeChannelCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1212,33 +1130,18 @@ export const de_DescribeHarvestJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.endTime != null) { - contents.EndTime = __expectString(data.endTime); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.originEndpointId != null) { - contents.OriginEndpointId = __expectString(data.originEndpointId); - } - if (data.s3Destination != null) { - contents.S3Destination = de_S3Destination(data.s3Destination, context); - } - if (data.startTime != null) { - contents.StartTime = __expectString(data.startTime); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + ChannelId: [, __expectString, `channelId`], + CreatedAt: [, __expectString, `createdAt`], + EndTime: [, __expectString, `endTime`], + Id: [, __expectString, `id`], + OriginEndpointId: [, __expectString, `originEndpointId`], + S3Destination: [, (_) => de_S3Destination(_, context), `s3Destination`], + StartTime: [, __expectString, `startTime`], + Status: [, __expectString, `status`], + }); + Object.assign(contents, doc); return contents; }; @@ -1275,10 +1178,9 @@ const de_DescribeHarvestJobCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,57 +1200,26 @@ export const de_DescribeOriginEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.cmafPackage != null) { - contents.CmafPackage = de_CmafPackage(data.cmafPackage, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.dashPackage != null) { - contents.DashPackage = de_DashPackage(data.dashPackage, context); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.hlsPackage != null) { - contents.HlsPackage = de_HlsPackage(data.hlsPackage, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.manifestName != null) { - contents.ManifestName = __expectString(data.manifestName); - } - if (data.mssPackage != null) { - contents.MssPackage = de_MssPackage(data.mssPackage, context); - } - if (data.origination != null) { - contents.Origination = __expectString(data.origination); - } - if (data.startoverWindowSeconds != null) { - contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.timeDelaySeconds != null) { - contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds); - } - if (data.url != null) { - contents.Url = __expectString(data.url); - } - if (data.whitelist != null) { - contents.Whitelist = de___listOf__string(data.whitelist, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + ChannelId: [, __expectString, `channelId`], + CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`], + Description: [, __expectString, `description`], + HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + ManifestName: [, __expectString, `manifestName`], + MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`], + Origination: [, __expectString, `origination`], + StartoverWindowSeconds: [, __expectInt32, `startoverWindowSeconds`], + Tags: [, _json, `tags`], + TimeDelaySeconds: [, __expectInt32, `timeDelaySeconds`], + Url: [, __expectString, `url`], + Whitelist: [, _json, `whitelist`], + }); + Object.assign(contents, doc); return contents; }; @@ -1385,10 +1256,9 @@ const de_DescribeOriginEndpointCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1408,12 +1278,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channels != null) { - contents.Channels = de___listOfChannel(data.channels, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Channels: [, (_) => de___listOfChannel(_, context), `channels`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1450,10 +1319,9 @@ const de_ListChannelsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1473,12 +1341,11 @@ export const de_ListHarvestJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.harvestJobs != null) { - contents.HarvestJobs = de___listOfHarvestJob(data.harvestJobs, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + HarvestJobs: [, (_) => de___listOfHarvestJob(_, context), `harvestJobs`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1515,10 +1382,9 @@ const de_ListHarvestJobsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1538,12 +1404,11 @@ export const de_ListOriginEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.originEndpoints != null) { - contents.OriginEndpoints = de___listOfOriginEndpoint(data.originEndpoints, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + OriginEndpoints: [, (_) => de___listOfOriginEndpoint(_, context), `originEndpoints`], + }); + Object.assign(contents, doc); return contents; }; @@ -1580,10 +1445,9 @@ const de_ListOriginEndpointsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1603,9 +1467,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1622,10 +1487,9 @@ const de_ListTagsForResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1644,30 +1508,17 @@ export const de_RotateChannelCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.hlsIngest != null) { - contents.HlsIngest = de_HlsIngest(data.hlsIngest, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.ingressAccessLogs != null) { - contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1704,10 +1555,9 @@ const de_RotateChannelCredentialsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1727,30 +1577,17 @@ export const de_RotateIngestEndpointCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.hlsIngest != null) { - contents.HlsIngest = de_HlsIngest(data.hlsIngest, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.ingressAccessLogs != null) { - contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1787,10 +1624,9 @@ const de_RotateIngestEndpointCredentialsCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1826,10 +1662,9 @@ const de_TagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1864,10 +1699,9 @@ const de_UntagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1886,30 +1720,17 @@ export const de_UpdateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.egressAccessLogs != null) { - contents.EgressAccessLogs = de_EgressAccessLogs(data.egressAccessLogs, context); - } - if (data.hlsIngest != null) { - contents.HlsIngest = de_HlsIngest(data.hlsIngest, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.ingressAccessLogs != null) { - contents.IngressAccessLogs = de_IngressAccessLogs(data.ingressAccessLogs, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: [, (_) => de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: [, (_) => de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: [, (_) => de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1946,10 +1767,9 @@ const de_UpdateChannelCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1969,57 +1789,26 @@ export const de_UpdateOriginEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authorization != null) { - contents.Authorization = de_Authorization(data.authorization, context); - } - if (data.channelId != null) { - contents.ChannelId = __expectString(data.channelId); - } - if (data.cmafPackage != null) { - contents.CmafPackage = de_CmafPackage(data.cmafPackage, context); - } - if (data.createdAt != null) { - contents.CreatedAt = __expectString(data.createdAt); - } - if (data.dashPackage != null) { - contents.DashPackage = de_DashPackage(data.dashPackage, context); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.hlsPackage != null) { - contents.HlsPackage = de_HlsPackage(data.hlsPackage, context); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.manifestName != null) { - contents.ManifestName = __expectString(data.manifestName); - } - if (data.mssPackage != null) { - contents.MssPackage = de_MssPackage(data.mssPackage, context); - } - if (data.origination != null) { - contents.Origination = __expectString(data.origination); - } - if (data.startoverWindowSeconds != null) { - contents.StartoverWindowSeconds = __expectInt32(data.startoverWindowSeconds); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.timeDelaySeconds != null) { - contents.TimeDelaySeconds = __expectInt32(data.timeDelaySeconds); - } - if (data.url != null) { - contents.Url = __expectString(data.url); - } - if (data.whitelist != null) { - contents.Whitelist = de___listOf__string(data.whitelist, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Authorization: [, (_) => de_Authorization(_, context), `authorization`], + ChannelId: [, __expectString, `channelId`], + CmafPackage: [, (_) => de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: [, (_) => de_DashPackage(_, context), `dashPackage`], + Description: [, __expectString, `description`], + HlsPackage: [, (_) => de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + ManifestName: [, __expectString, `manifestName`], + MssPackage: [, (_) => de_MssPackage(_, context), `mssPackage`], + Origination: [, __expectString, `origination`], + StartoverWindowSeconds: [, __expectInt32, `startoverWindowSeconds`], + Tags: [, _json, `tags`], + TimeDelaySeconds: [, __expectInt32, `timeDelaySeconds`], + Url: [, __expectString, `url`], + Whitelist: [, _json, `whitelist`], + }); + Object.assign(contents, doc); return contents; }; @@ -2056,25 +1845,25 @@ const de_UpdateOriginEndpointCommandError = async ( throw await de_UnprocessableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ForbiddenExceptionRes */ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2091,9 +1880,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2107,9 +1897,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2126,9 +1917,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2145,9 +1937,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2164,9 +1957,10 @@ const de_UnprocessableEntityExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new UnprocessableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2174,30 +1968,9 @@ const de_UnprocessableEntityExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__PeriodTriggersElement - */ -const se___listOf__PeriodTriggersElement = ( - input: (__PeriodTriggersElement | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__PeriodTriggersElement omitted. -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfHlsManifestCreateOrUpdateParameters @@ -2213,52 +1986,30 @@ const se___listOfHlsManifestCreateOrUpdateParameters = ( }); }; -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. -/** - * serializeAws_restJson1AdTriggers - */ -const se_AdTriggers = (input: (__AdTriggersElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdTriggers omitted. /** * serializeAws_restJson1Authorization */ const se_Authorization = (input: Authorization, context: __SerdeContext): any => { - return { - ...(input.CdnIdentifierSecret != null && { cdnIdentifierSecret: input.CdnIdentifierSecret }), - ...(input.SecretsRoleArn != null && { secretsRoleArn: input.SecretsRoleArn }), - }; + return take(input, { + cdnIdentifierSecret: [, , `CdnIdentifierSecret`], + secretsRoleArn: [, , `SecretsRoleArn`], + }); }; /** * serializeAws_restJson1CmafEncryption */ const se_CmafEncryption = (input: CmafEncryption, context: __SerdeContext): any => { - return { - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }), - ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + constantInitializationVector: [, , `ConstantInitializationVector`], + encryptionMethod: [, , `EncryptionMethod`], + keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** @@ -2268,87 +2019,79 @@ const se_CmafPackageCreateOrUpdateParameters = ( input: CmafPackageCreateOrUpdateParameters, context: __SerdeContext ): any => { - return { - ...(input.Encryption != null && { encryption: se_CmafEncryption(input.Encryption, context) }), - ...(input.HlsManifests != null && { - hlsManifests: se___listOfHlsManifestCreateOrUpdateParameters(input.HlsManifests, context), - }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - ...(input.SegmentPrefix != null && { segmentPrefix: input.SegmentPrefix }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - }; + return take(input, { + encryption: [, (_) => se_CmafEncryption(_, context), `Encryption`], + hlsManifests: [, (_) => se___listOfHlsManifestCreateOrUpdateParameters(_, context), `HlsManifests`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + segmentPrefix: [, , `SegmentPrefix`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + }); }; /** * serializeAws_restJson1DashEncryption */ const se_DashEncryption = (input: DashEncryption, context: __SerdeContext): any => { - return { - ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1DashPackage */ const se_DashPackage = (input: DashPackage, context: __SerdeContext): any => { - return { - ...(input.AdTriggers != null && { adTriggers: se_AdTriggers(input.AdTriggers, context) }), - ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }), - ...(input.Encryption != null && { encryption: se_DashEncryption(input.Encryption, context) }), - ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }), - ...(input.ManifestLayout != null && { manifestLayout: input.ManifestLayout }), - ...(input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds }), - ...(input.MinBufferTimeSeconds != null && { minBufferTimeSeconds: input.MinBufferTimeSeconds }), - ...(input.MinUpdatePeriodSeconds != null && { minUpdatePeriodSeconds: input.MinUpdatePeriodSeconds }), - ...(input.PeriodTriggers != null && { - periodTriggers: se___listOf__PeriodTriggersElement(input.PeriodTriggers, context), - }), - ...(input.Profile != null && { profile: input.Profile }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - ...(input.SegmentTemplateFormat != null && { segmentTemplateFormat: input.SegmentTemplateFormat }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - ...(input.SuggestedPresentationDelaySeconds != null && { - suggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds, - }), - ...(input.UtcTiming != null && { utcTiming: input.UtcTiming }), - ...(input.UtcTimingUri != null && { utcTimingUri: input.UtcTimingUri }), - }; + return take(input, { + adTriggers: [, _json, `AdTriggers`], + adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`], + encryption: [, (_) => se_DashEncryption(_, context), `Encryption`], + includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`], + manifestLayout: [, , `ManifestLayout`], + manifestWindowSeconds: [, , `ManifestWindowSeconds`], + minBufferTimeSeconds: [, , `MinBufferTimeSeconds`], + minUpdatePeriodSeconds: [, , `MinUpdatePeriodSeconds`], + periodTriggers: [, _json, `PeriodTriggers`], + profile: [, , `Profile`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + segmentTemplateFormat: [, , `SegmentTemplateFormat`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + suggestedPresentationDelaySeconds: [, , `SuggestedPresentationDelaySeconds`], + utcTiming: [, , `UtcTiming`], + utcTimingUri: [, , `UtcTimingUri`], + }); }; /** * serializeAws_restJson1EgressAccessLogs */ const se_EgressAccessLogs = (input: EgressAccessLogs, context: __SerdeContext): any => { - return { - ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }), - }; + return take(input, { + logGroupName: [, , `LogGroupName`], + }); }; /** * serializeAws_restJson1EncryptionContractConfiguration */ const se_EncryptionContractConfiguration = (input: EncryptionContractConfiguration, context: __SerdeContext): any => { - return { - ...(input.PresetSpeke20Audio != null && { presetSpeke20Audio: input.PresetSpeke20Audio }), - ...(input.PresetSpeke20Video != null && { presetSpeke20Video: input.PresetSpeke20Video }), - }; + return take(input, { + presetSpeke20Audio: [, , `PresetSpeke20Audio`], + presetSpeke20Video: [, , `PresetSpeke20Video`], + }); }; /** * serializeAws_restJson1HlsEncryption */ const se_HlsEncryption = (input: HlsEncryption, context: __SerdeContext): any => { - return { - ...(input.ConstantInitializationVector != null && { - constantInitializationVector: input.ConstantInitializationVector, - }), - ...(input.EncryptionMethod != null && { encryptionMethod: input.EncryptionMethod }), - ...(input.KeyRotationIntervalSeconds != null && { keyRotationIntervalSeconds: input.KeyRotationIntervalSeconds }), - ...(input.RepeatExtXKey != null && { repeatExtXKey: input.RepeatExtXKey }), - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + constantInitializationVector: [, , `ConstantInitializationVector`], + encryptionMethod: [, , `EncryptionMethod`], + keyRotationIntervalSeconds: [, , `KeyRotationIntervalSeconds`], + repeatExtXKey: [, , `RepeatExtXKey`], + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** @@ -2358,159 +2101,114 @@ const se_HlsManifestCreateOrUpdateParameters = ( input: HlsManifestCreateOrUpdateParameters, context: __SerdeContext ): any => { - return { - ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }), - ...(input.AdTriggers != null && { adTriggers: se_AdTriggers(input.AdTriggers, context) }), - ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }), - ...(input.Id != null && { id: input.Id }), - ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }), - ...(input.ManifestName != null && { manifestName: input.ManifestName }), - ...(input.PlaylistType != null && { playlistType: input.PlaylistType }), - ...(input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds }), - ...(input.ProgramDateTimeIntervalSeconds != null && { - programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds, - }), - }; + return take(input, { + adMarkers: [, , `AdMarkers`], + adTriggers: [, _json, `AdTriggers`], + adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`], + id: [, , `Id`], + includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`], + manifestName: [, , `ManifestName`], + playlistType: [, , `PlaylistType`], + playlistWindowSeconds: [, , `PlaylistWindowSeconds`], + programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`], + }); }; /** * serializeAws_restJson1HlsPackage */ const se_HlsPackage = (input: HlsPackage, context: __SerdeContext): any => { - return { - ...(input.AdMarkers != null && { adMarkers: input.AdMarkers }), - ...(input.AdTriggers != null && { adTriggers: se_AdTriggers(input.AdTriggers, context) }), - ...(input.AdsOnDeliveryRestrictions != null && { adsOnDeliveryRestrictions: input.AdsOnDeliveryRestrictions }), - ...(input.Encryption != null && { encryption: se_HlsEncryption(input.Encryption, context) }), - ...(input.IncludeDvbSubtitles != null && { includeDvbSubtitles: input.IncludeDvbSubtitles }), - ...(input.IncludeIframeOnlyStream != null && { includeIframeOnlyStream: input.IncludeIframeOnlyStream }), - ...(input.PlaylistType != null && { playlistType: input.PlaylistType }), - ...(input.PlaylistWindowSeconds != null && { playlistWindowSeconds: input.PlaylistWindowSeconds }), - ...(input.ProgramDateTimeIntervalSeconds != null && { - programDateTimeIntervalSeconds: input.ProgramDateTimeIntervalSeconds, - }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - ...(input.UseAudioRenditionGroup != null && { useAudioRenditionGroup: input.UseAudioRenditionGroup }), - }; + return take(input, { + adMarkers: [, , `AdMarkers`], + adTriggers: [, _json, `AdTriggers`], + adsOnDeliveryRestrictions: [, , `AdsOnDeliveryRestrictions`], + encryption: [, (_) => se_HlsEncryption(_, context), `Encryption`], + includeDvbSubtitles: [, , `IncludeDvbSubtitles`], + includeIframeOnlyStream: [, , `IncludeIframeOnlyStream`], + playlistType: [, , `PlaylistType`], + playlistWindowSeconds: [, , `PlaylistWindowSeconds`], + programDateTimeIntervalSeconds: [, , `ProgramDateTimeIntervalSeconds`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + useAudioRenditionGroup: [, , `UseAudioRenditionGroup`], + }); }; /** * serializeAws_restJson1IngressAccessLogs */ const se_IngressAccessLogs = (input: IngressAccessLogs, context: __SerdeContext): any => { - return { - ...(input.LogGroupName != null && { logGroupName: input.LogGroupName }), - }; + return take(input, { + logGroupName: [, , `LogGroupName`], + }); }; /** * serializeAws_restJson1MssEncryption */ const se_MssEncryption = (input: MssEncryption, context: __SerdeContext): any => { - return { - ...(input.SpekeKeyProvider != null && { spekeKeyProvider: se_SpekeKeyProvider(input.SpekeKeyProvider, context) }), - }; + return take(input, { + spekeKeyProvider: [, (_) => se_SpekeKeyProvider(_, context), `SpekeKeyProvider`], + }); }; /** * serializeAws_restJson1MssPackage */ const se_MssPackage = (input: MssPackage, context: __SerdeContext): any => { - return { - ...(input.Encryption != null && { encryption: se_MssEncryption(input.Encryption, context) }), - ...(input.ManifestWindowSeconds != null && { manifestWindowSeconds: input.ManifestWindowSeconds }), - ...(input.SegmentDurationSeconds != null && { segmentDurationSeconds: input.SegmentDurationSeconds }), - ...(input.StreamSelection != null && { streamSelection: se_StreamSelection(input.StreamSelection, context) }), - }; + return take(input, { + encryption: [, (_) => se_MssEncryption(_, context), `Encryption`], + manifestWindowSeconds: [, , `ManifestWindowSeconds`], + segmentDurationSeconds: [, , `SegmentDurationSeconds`], + streamSelection: [, (_) => se_StreamSelection(_, context), `StreamSelection`], + }); }; /** * serializeAws_restJson1S3Destination */ const se_S3Destination = (input: S3Destination, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { bucketName: input.BucketName }), - ...(input.ManifestKey != null && { manifestKey: input.ManifestKey }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - }; + return take(input, { + bucketName: [, , `BucketName`], + manifestKey: [, , `ManifestKey`], + roleArn: [, , `RoleArn`], + }); }; /** * serializeAws_restJson1SpekeKeyProvider */ const se_SpekeKeyProvider = (input: SpekeKeyProvider, context: __SerdeContext): any => { - return { - ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }), - ...(input.EncryptionContractConfiguration != null && { - encryptionContractConfiguration: se_EncryptionContractConfiguration( - input.EncryptionContractConfiguration, - context - ), - }), - ...(input.ResourceId != null && { resourceId: input.ResourceId }), - ...(input.RoleArn != null && { roleArn: input.RoleArn }), - ...(input.SystemIds != null && { systemIds: se___listOf__string(input.SystemIds, context) }), - ...(input.Url != null && { url: input.Url }), - }; + return take(input, { + certificateArn: [, , `CertificateArn`], + encryptionContractConfiguration: [ + , + (_) => se_EncryptionContractConfiguration(_, context), + `EncryptionContractConfiguration`, + ], + resourceId: [, , `ResourceId`], + roleArn: [, , `RoleArn`], + systemIds: [, _json, `SystemIds`], + url: [, , `Url`], + }); }; /** * serializeAws_restJson1StreamSelection */ const se_StreamSelection = (input: StreamSelection, context: __SerdeContext): any => { - return { - ...(input.MaxVideoBitsPerSecond != null && { maxVideoBitsPerSecond: input.MaxVideoBitsPerSecond }), - ...(input.MinVideoBitsPerSecond != null && { minVideoBitsPerSecond: input.MinVideoBitsPerSecond }), - ...(input.StreamOrder != null && { streamOrder: input.StreamOrder }), - }; + return take(input, { + maxVideoBitsPerSecond: [, , `MaxVideoBitsPerSecond`], + minVideoBitsPerSecond: [, , `MinVideoBitsPerSecond`], + streamOrder: [, , `StreamOrder`], + }); }; -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1__listOf__PeriodTriggersElement - */ -const de___listOf__PeriodTriggersElement = ( - output: any, - context: __SerdeContext -): (__PeriodTriggersElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__PeriodTriggersElement omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfChannel @@ -2519,9 +2217,6 @@ const de___listOfChannel = (output: any, context: __SerdeContext): Channel[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Channel(entry, context); }); return retVal; @@ -2534,9 +2229,6 @@ const de___listOfHarvestJob = (output: any, context: __SerdeContext): HarvestJob const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HarvestJob(entry, context); }); return retVal; @@ -2549,9 +2241,6 @@ const de___listOfHlsManifest = (output: any, context: __SerdeContext): HlsManife const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HlsManifest(entry, context); }); return retVal; @@ -2564,9 +2253,6 @@ const de___listOfIngestEndpoint = (output: any, context: __SerdeContext): Ingest const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IngestEndpoint(entry, context); }); return retVal; @@ -2579,349 +2265,304 @@ const de___listOfOriginEndpoint = (output: any, context: __SerdeContext): Origin const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OriginEndpoint(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. -/** - * deserializeAws_restJson1AdTriggers - */ -const de_AdTriggers = (output: any, context: __SerdeContext): (__AdTriggersElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AdTriggers omitted. /** * deserializeAws_restJson1Authorization */ const de_Authorization = (output: any, context: __SerdeContext): Authorization => { - return { - CdnIdentifierSecret: __expectString(output.cdnIdentifierSecret), - SecretsRoleArn: __expectString(output.secretsRoleArn), - } as any; + return take(output, { + CdnIdentifierSecret: [, __expectString, `cdnIdentifierSecret`], + SecretsRoleArn: [, __expectString, `secretsRoleArn`], + }) as any; }; /** * deserializeAws_restJson1Channel */ const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - Arn: __expectString(output.arn), - CreatedAt: __expectString(output.createdAt), - Description: __expectString(output.description), - EgressAccessLogs: - output.egressAccessLogs != null ? de_EgressAccessLogs(output.egressAccessLogs, context) : undefined, - HlsIngest: output.hlsIngest != null ? de_HlsIngest(output.hlsIngest, context) : undefined, - Id: __expectString(output.id), - IngressAccessLogs: - output.ingressAccessLogs != null ? de_IngressAccessLogs(output.ingressAccessLogs, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + CreatedAt: [, __expectString, `createdAt`], + Description: [, __expectString, `description`], + EgressAccessLogs: (_) => [, de_EgressAccessLogs(_, context), `egressAccessLogs`], + HlsIngest: (_) => [, de_HlsIngest(_, context), `hlsIngest`], + Id: [, __expectString, `id`], + IngressAccessLogs: (_) => [, de_IngressAccessLogs(_, context), `ingressAccessLogs`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1CmafEncryption */ const de_CmafEncryption = (output: any, context: __SerdeContext): CmafEncryption => { - return { - ConstantInitializationVector: __expectString(output.constantInitializationVector), - EncryptionMethod: __expectString(output.encryptionMethod), - KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + EncryptionMethod: [, __expectString, `encryptionMethod`], + KeyRotationIntervalSeconds: [, __expectInt32, `keyRotationIntervalSeconds`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1CmafPackage */ const de_CmafPackage = (output: any, context: __SerdeContext): CmafPackage => { - return { - Encryption: output.encryption != null ? de_CmafEncryption(output.encryption, context) : undefined, - HlsManifests: output.hlsManifests != null ? de___listOfHlsManifest(output.hlsManifests, context) : undefined, - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - SegmentPrefix: __expectString(output.segmentPrefix), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - } as any; + return take(output, { + Encryption: (_) => [, de_CmafEncryption(_, context), `encryption`], + HlsManifests: (_) => [, de___listOfHlsManifest(_, context), `hlsManifests`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + SegmentPrefix: [, __expectString, `segmentPrefix`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + }) as any; }; /** * deserializeAws_restJson1DashEncryption */ const de_DashEncryption = (output: any, context: __SerdeContext): DashEncryption => { - return { - KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + KeyRotationIntervalSeconds: [, __expectInt32, `keyRotationIntervalSeconds`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1DashPackage */ const de_DashPackage = (output: any, context: __SerdeContext): DashPackage => { - return { - AdTriggers: output.adTriggers != null ? de_AdTriggers(output.adTriggers, context) : undefined, - AdsOnDeliveryRestrictions: __expectString(output.adsOnDeliveryRestrictions), - Encryption: output.encryption != null ? de_DashEncryption(output.encryption, context) : undefined, - IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream), - ManifestLayout: __expectString(output.manifestLayout), - ManifestWindowSeconds: __expectInt32(output.manifestWindowSeconds), - MinBufferTimeSeconds: __expectInt32(output.minBufferTimeSeconds), - MinUpdatePeriodSeconds: __expectInt32(output.minUpdatePeriodSeconds), - PeriodTriggers: - output.periodTriggers != null ? de___listOf__PeriodTriggersElement(output.periodTriggers, context) : undefined, - Profile: __expectString(output.profile), - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - SegmentTemplateFormat: __expectString(output.segmentTemplateFormat), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - SuggestedPresentationDelaySeconds: __expectInt32(output.suggestedPresentationDelaySeconds), - UtcTiming: __expectString(output.utcTiming), - UtcTimingUri: __expectString(output.utcTimingUri), - } as any; + return take(output, { + AdTriggers: [, _json, `adTriggers`], + AdsOnDeliveryRestrictions: [, __expectString, `adsOnDeliveryRestrictions`], + Encryption: (_) => [, de_DashEncryption(_, context), `encryption`], + IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`], + ManifestLayout: [, __expectString, `manifestLayout`], + ManifestWindowSeconds: [, __expectInt32, `manifestWindowSeconds`], + MinBufferTimeSeconds: [, __expectInt32, `minBufferTimeSeconds`], + MinUpdatePeriodSeconds: [, __expectInt32, `minUpdatePeriodSeconds`], + PeriodTriggers: [, _json, `periodTriggers`], + Profile: [, __expectString, `profile`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + SegmentTemplateFormat: [, __expectString, `segmentTemplateFormat`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + SuggestedPresentationDelaySeconds: [, __expectInt32, `suggestedPresentationDelaySeconds`], + UtcTiming: [, __expectString, `utcTiming`], + UtcTimingUri: [, __expectString, `utcTimingUri`], + }) as any; }; /** * deserializeAws_restJson1EgressAccessLogs */ const de_EgressAccessLogs = (output: any, context: __SerdeContext): EgressAccessLogs => { - return { - LogGroupName: __expectString(output.logGroupName), - } as any; + return take(output, { + LogGroupName: [, __expectString, `logGroupName`], + }) as any; }; /** * deserializeAws_restJson1EncryptionContractConfiguration */ const de_EncryptionContractConfiguration = (output: any, context: __SerdeContext): EncryptionContractConfiguration => { - return { - PresetSpeke20Audio: __expectString(output.presetSpeke20Audio), - PresetSpeke20Video: __expectString(output.presetSpeke20Video), - } as any; + return take(output, { + PresetSpeke20Audio: [, __expectString, `presetSpeke20Audio`], + PresetSpeke20Video: [, __expectString, `presetSpeke20Video`], + }) as any; }; /** * deserializeAws_restJson1HarvestJob */ const de_HarvestJob = (output: any, context: __SerdeContext): HarvestJob => { - return { - Arn: __expectString(output.arn), - ChannelId: __expectString(output.channelId), - CreatedAt: __expectString(output.createdAt), - EndTime: __expectString(output.endTime), - Id: __expectString(output.id), - OriginEndpointId: __expectString(output.originEndpointId), - S3Destination: output.s3Destination != null ? de_S3Destination(output.s3Destination, context) : undefined, - StartTime: __expectString(output.startTime), - Status: __expectString(output.status), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + ChannelId: [, __expectString, `channelId`], + CreatedAt: [, __expectString, `createdAt`], + EndTime: [, __expectString, `endTime`], + Id: [, __expectString, `id`], + OriginEndpointId: [, __expectString, `originEndpointId`], + S3Destination: (_) => [, de_S3Destination(_, context), `s3Destination`], + StartTime: [, __expectString, `startTime`], + Status: [, __expectString, `status`], + }) as any; }; /** * deserializeAws_restJson1HlsEncryption */ const de_HlsEncryption = (output: any, context: __SerdeContext): HlsEncryption => { - return { - ConstantInitializationVector: __expectString(output.constantInitializationVector), - EncryptionMethod: __expectString(output.encryptionMethod), - KeyRotationIntervalSeconds: __expectInt32(output.keyRotationIntervalSeconds), - RepeatExtXKey: __expectBoolean(output.repeatExtXKey), - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + ConstantInitializationVector: [, __expectString, `constantInitializationVector`], + EncryptionMethod: [, __expectString, `encryptionMethod`], + KeyRotationIntervalSeconds: [, __expectInt32, `keyRotationIntervalSeconds`], + RepeatExtXKey: [, __expectBoolean, `repeatExtXKey`], + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1HlsIngest */ const de_HlsIngest = (output: any, context: __SerdeContext): HlsIngest => { - return { - IngestEndpoints: - output.ingestEndpoints != null ? de___listOfIngestEndpoint(output.ingestEndpoints, context) : undefined, - } as any; + return take(output, { + IngestEndpoints: (_) => [, de___listOfIngestEndpoint(_, context), `ingestEndpoints`], + }) as any; }; /** * deserializeAws_restJson1HlsManifest */ const de_HlsManifest = (output: any, context: __SerdeContext): HlsManifest => { - return { - AdMarkers: __expectString(output.adMarkers), - AdTriggers: output.adTriggers != null ? de_AdTriggers(output.adTriggers, context) : undefined, - AdsOnDeliveryRestrictions: __expectString(output.adsOnDeliveryRestrictions), - Id: __expectString(output.id), - IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream), - ManifestName: __expectString(output.manifestName), - PlaylistType: __expectString(output.playlistType), - PlaylistWindowSeconds: __expectInt32(output.playlistWindowSeconds), - ProgramDateTimeIntervalSeconds: __expectInt32(output.programDateTimeIntervalSeconds), - Url: __expectString(output.url), - } as any; + return take(output, { + AdMarkers: [, __expectString, `adMarkers`], + AdTriggers: [, _json, `adTriggers`], + AdsOnDeliveryRestrictions: [, __expectString, `adsOnDeliveryRestrictions`], + Id: [, __expectString, `id`], + IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`], + ManifestName: [, __expectString, `manifestName`], + PlaylistType: [, __expectString, `playlistType`], + PlaylistWindowSeconds: [, __expectInt32, `playlistWindowSeconds`], + ProgramDateTimeIntervalSeconds: [, __expectInt32, `programDateTimeIntervalSeconds`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1HlsPackage */ const de_HlsPackage = (output: any, context: __SerdeContext): HlsPackage => { - return { - AdMarkers: __expectString(output.adMarkers), - AdTriggers: output.adTriggers != null ? de_AdTriggers(output.adTriggers, context) : undefined, - AdsOnDeliveryRestrictions: __expectString(output.adsOnDeliveryRestrictions), - Encryption: output.encryption != null ? de_HlsEncryption(output.encryption, context) : undefined, - IncludeDvbSubtitles: __expectBoolean(output.includeDvbSubtitles), - IncludeIframeOnlyStream: __expectBoolean(output.includeIframeOnlyStream), - PlaylistType: __expectString(output.playlistType), - PlaylistWindowSeconds: __expectInt32(output.playlistWindowSeconds), - ProgramDateTimeIntervalSeconds: __expectInt32(output.programDateTimeIntervalSeconds), - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - UseAudioRenditionGroup: __expectBoolean(output.useAudioRenditionGroup), - } as any; + return take(output, { + AdMarkers: [, __expectString, `adMarkers`], + AdTriggers: [, _json, `adTriggers`], + AdsOnDeliveryRestrictions: [, __expectString, `adsOnDeliveryRestrictions`], + Encryption: (_) => [, de_HlsEncryption(_, context), `encryption`], + IncludeDvbSubtitles: [, __expectBoolean, `includeDvbSubtitles`], + IncludeIframeOnlyStream: [, __expectBoolean, `includeIframeOnlyStream`], + PlaylistType: [, __expectString, `playlistType`], + PlaylistWindowSeconds: [, __expectInt32, `playlistWindowSeconds`], + ProgramDateTimeIntervalSeconds: [, __expectInt32, `programDateTimeIntervalSeconds`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + UseAudioRenditionGroup: [, __expectBoolean, `useAudioRenditionGroup`], + }) as any; }; /** * deserializeAws_restJson1IngestEndpoint */ const de_IngestEndpoint = (output: any, context: __SerdeContext): IngestEndpoint => { - return { - Id: __expectString(output.id), - Password: __expectString(output.password), - Url: __expectString(output.url), - Username: __expectString(output.username), - } as any; + return take(output, { + Id: [, __expectString, `id`], + Password: [, __expectString, `password`], + Url: [, __expectString, `url`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1IngressAccessLogs */ const de_IngressAccessLogs = (output: any, context: __SerdeContext): IngressAccessLogs => { - return { - LogGroupName: __expectString(output.logGroupName), - } as any; + return take(output, { + LogGroupName: [, __expectString, `logGroupName`], + }) as any; }; /** * deserializeAws_restJson1MssEncryption */ const de_MssEncryption = (output: any, context: __SerdeContext): MssEncryption => { - return { - SpekeKeyProvider: - output.spekeKeyProvider != null ? de_SpekeKeyProvider(output.spekeKeyProvider, context) : undefined, - } as any; + return take(output, { + SpekeKeyProvider: (_) => [, de_SpekeKeyProvider(_, context), `spekeKeyProvider`], + }) as any; }; /** * deserializeAws_restJson1MssPackage */ const de_MssPackage = (output: any, context: __SerdeContext): MssPackage => { - return { - Encryption: output.encryption != null ? de_MssEncryption(output.encryption, context) : undefined, - ManifestWindowSeconds: __expectInt32(output.manifestWindowSeconds), - SegmentDurationSeconds: __expectInt32(output.segmentDurationSeconds), - StreamSelection: output.streamSelection != null ? de_StreamSelection(output.streamSelection, context) : undefined, - } as any; + return take(output, { + Encryption: (_) => [, de_MssEncryption(_, context), `encryption`], + ManifestWindowSeconds: [, __expectInt32, `manifestWindowSeconds`], + SegmentDurationSeconds: [, __expectInt32, `segmentDurationSeconds`], + StreamSelection: (_) => [, de_StreamSelection(_, context), `streamSelection`], + }) as any; }; /** * deserializeAws_restJson1OriginEndpoint */ const de_OriginEndpoint = (output: any, context: __SerdeContext): OriginEndpoint => { - return { - Arn: __expectString(output.arn), - Authorization: output.authorization != null ? de_Authorization(output.authorization, context) : undefined, - ChannelId: __expectString(output.channelId), - CmafPackage: output.cmafPackage != null ? de_CmafPackage(output.cmafPackage, context) : undefined, - CreatedAt: __expectString(output.createdAt), - DashPackage: output.dashPackage != null ? de_DashPackage(output.dashPackage, context) : undefined, - Description: __expectString(output.description), - HlsPackage: output.hlsPackage != null ? de_HlsPackage(output.hlsPackage, context) : undefined, - Id: __expectString(output.id), - ManifestName: __expectString(output.manifestName), - MssPackage: output.mssPackage != null ? de_MssPackage(output.mssPackage, context) : undefined, - Origination: __expectString(output.origination), - StartoverWindowSeconds: __expectInt32(output.startoverWindowSeconds), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - TimeDelaySeconds: __expectInt32(output.timeDelaySeconds), - Url: __expectString(output.url), - Whitelist: output.whitelist != null ? de___listOf__string(output.whitelist, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + Authorization: (_) => [, de_Authorization(_, context), `authorization`], + ChannelId: [, __expectString, `channelId`], + CmafPackage: (_) => [, de_CmafPackage(_, context), `cmafPackage`], + CreatedAt: [, __expectString, `createdAt`], + DashPackage: (_) => [, de_DashPackage(_, context), `dashPackage`], + Description: [, __expectString, `description`], + HlsPackage: (_) => [, de_HlsPackage(_, context), `hlsPackage`], + Id: [, __expectString, `id`], + ManifestName: [, __expectString, `manifestName`], + MssPackage: (_) => [, de_MssPackage(_, context), `mssPackage`], + Origination: [, __expectString, `origination`], + StartoverWindowSeconds: [, __expectInt32, `startoverWindowSeconds`], + Tags: [, _json, `tags`], + TimeDelaySeconds: [, __expectInt32, `timeDelaySeconds`], + Url: [, __expectString, `url`], + Whitelist: [, _json, `whitelist`], + }) as any; }; /** * deserializeAws_restJson1S3Destination */ const de_S3Destination = (output: any, context: __SerdeContext): S3Destination => { - return { - BucketName: __expectString(output.bucketName), - ManifestKey: __expectString(output.manifestKey), - RoleArn: __expectString(output.roleArn), - } as any; + return take(output, { + BucketName: [, __expectString, `bucketName`], + ManifestKey: [, __expectString, `manifestKey`], + RoleArn: [, __expectString, `roleArn`], + }) as any; }; /** * deserializeAws_restJson1SpekeKeyProvider */ const de_SpekeKeyProvider = (output: any, context: __SerdeContext): SpekeKeyProvider => { - return { - CertificateArn: __expectString(output.certificateArn), - EncryptionContractConfiguration: - output.encryptionContractConfiguration != null - ? de_EncryptionContractConfiguration(output.encryptionContractConfiguration, context) - : undefined, - ResourceId: __expectString(output.resourceId), - RoleArn: __expectString(output.roleArn), - SystemIds: output.systemIds != null ? de___listOf__string(output.systemIds, context) : undefined, - Url: __expectString(output.url), - } as any; + return take(output, { + CertificateArn: [, __expectString, `certificateArn`], + EncryptionContractConfiguration: (_) => [ + , + de_EncryptionContractConfiguration(_, context), + `encryptionContractConfiguration`, + ], + ResourceId: [, __expectString, `resourceId`], + RoleArn: [, __expectString, `roleArn`], + SystemIds: [, _json, `systemIds`], + Url: [, __expectString, `url`], + }) as any; }; /** * deserializeAws_restJson1StreamSelection */ const de_StreamSelection = (output: any, context: __SerdeContext): StreamSelection => { - return { - MaxVideoBitsPerSecond: __expectInt32(output.maxVideoBitsPerSecond), - MinVideoBitsPerSecond: __expectInt32(output.minVideoBitsPerSecond), - StreamOrder: __expectString(output.streamOrder), - } as any; + return take(output, { + MaxVideoBitsPerSecond: [, __expectInt32, `maxVideoBitsPerSecond`], + MinVideoBitsPerSecond: [, __expectInt32, `minVideoBitsPerSecond`], + StreamOrder: [, __expectString, `streamOrder`], + }) as any; }; -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-mediastore-data/src/protocols/Aws_restJson1.ts b/clients/client-mediastore-data/src/protocols/Aws_restJson1.ts index 6d5087d4c331..212084272710 100644 --- a/clients/client-mediastore-data/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediastore-data/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -8,12 +9,13 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc7231DateTime as __parseRfc7231DateTime, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -208,10 +210,9 @@ const de_DeleteObjectCommandError = async ( throw await de_ObjectNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -269,10 +270,9 @@ const de_DescribeObjectCommandError = async ( throw await de_ObjectNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -339,10 +339,9 @@ const de_GetObjectCommandError = async ( throw await de_RequestedRangeNotSatisfiableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -362,12 +361,11 @@ export const de_ListItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ItemList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de_ItemList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -392,10 +390,9 @@ const de_ListItemsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -415,15 +412,12 @@ export const de_PutObjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContentSHA256 != null) { - contents.ContentSHA256 = __expectString(data.ContentSHA256); - } - if (data.ETag != null) { - contents.ETag = __expectString(data.ETag); - } - if (data.StorageClass != null) { - contents.StorageClass = __expectString(data.StorageClass); - } + const doc = take(data, { + ContentSHA256: __expectString, + ETag: __expectString, + StorageClass: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -448,16 +442,15 @@ const de_PutObjectCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ContainerNotFoundExceptionRes */ @@ -467,9 +460,10 @@ const de_ContainerNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ContainerNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -483,9 +477,10 @@ const de_ContainerNotFoundExceptionRes = async ( const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -502,9 +497,10 @@ const de_ObjectNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ObjectNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -521,9 +517,10 @@ const de_RequestedRangeNotSatisfiableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestedRangeNotSatisfiableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -535,17 +532,14 @@ const de_RequestedRangeNotSatisfiableExceptionRes = async ( * deserializeAws_restJson1Item */ const de_Item = (output: any, context: __SerdeContext): Item => { - return { - ContentLength: __expectLong(output.ContentLength), - ContentType: __expectString(output.ContentType), - ETag: __expectString(output.ETag), - LastModified: - output.LastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified))) - : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; + return take(output, { + ContentLength: __expectLong, + ContentType: __expectString, + ETag: __expectString, + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Type: __expectString, + }) as any; }; /** @@ -555,9 +549,6 @@ const de_ItemList = (output: any, context: __SerdeContext): Item[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Item(entry, context); }); return retVal; diff --git a/clients/client-mediastore/src/protocols/Aws_json1_1.ts b/clients/client-mediastore/src/protocols/Aws_json1_1.ts index 94276bcf3dc9..7152c4986d87 100644 --- a/clients/client-mediastore/src/protocols/Aws_json1_1.ts +++ b/clients/client-mediastore/src/protocols/Aws_json1_1.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -57,52 +58,34 @@ import { CreateContainerInput, CreateContainerOutput, DeleteContainerInput, - DeleteContainerOutput, DeleteContainerPolicyInput, - DeleteContainerPolicyOutput, DeleteCorsPolicyInput, - DeleteCorsPolicyOutput, DeleteLifecyclePolicyInput, - DeleteLifecyclePolicyOutput, DeleteMetricPolicyInput, - DeleteMetricPolicyOutput, DescribeContainerInput, DescribeContainerOutput, GetContainerPolicyInput, - GetContainerPolicyOutput, GetCorsPolicyInput, - GetCorsPolicyOutput, GetLifecyclePolicyInput, - GetLifecyclePolicyOutput, GetMetricPolicyInput, - GetMetricPolicyOutput, InternalServerError, LimitExceededException, ListContainersInput, ListContainersOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, MethodName, MetricPolicy, MetricPolicyRule, PolicyNotFoundException, PutContainerPolicyInput, - PutContainerPolicyOutput, PutCorsPolicyInput, - PutCorsPolicyOutput, PutLifecyclePolicyInput, - PutLifecyclePolicyOutput, PutMetricPolicyInput, - PutMetricPolicyOutput, StartAccessLoggingInput, - StartAccessLoggingOutput, StopAccessLoggingInput, - StopAccessLoggingOutput, Tag, TagResourceInput, - TagResourceOutput, UntagResourceInput, - UntagResourceOutput, } from "../models/models_0"; /** @@ -114,7 +97,7 @@ export const se_CreateContainerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateContainer"); let body: any; - body = JSON.stringify(se_CreateContainerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -127,7 +110,7 @@ export const se_DeleteContainerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContainer"); let body: any; - body = JSON.stringify(se_DeleteContainerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -140,7 +123,7 @@ export const se_DeleteContainerPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContainerPolicy"); let body: any; - body = JSON.stringify(se_DeleteContainerPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -153,7 +136,7 @@ export const se_DeleteCorsPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCorsPolicy"); let body: any; - body = JSON.stringify(se_DeleteCorsPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -166,7 +149,7 @@ export const se_DeleteLifecyclePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLifecyclePolicy"); let body: any; - body = JSON.stringify(se_DeleteLifecyclePolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -179,7 +162,7 @@ export const se_DeleteMetricPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMetricPolicy"); let body: any; - body = JSON.stringify(se_DeleteMetricPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -192,7 +175,7 @@ export const se_DescribeContainerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeContainer"); let body: any; - body = JSON.stringify(se_DescribeContainerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -205,7 +188,7 @@ export const se_GetContainerPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContainerPolicy"); let body: any; - body = JSON.stringify(se_GetContainerPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -218,7 +201,7 @@ export const se_GetCorsPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCorsPolicy"); let body: any; - body = JSON.stringify(se_GetCorsPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -231,7 +214,7 @@ export const se_GetLifecyclePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLifecyclePolicy"); let body: any; - body = JSON.stringify(se_GetLifecyclePolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -244,7 +227,7 @@ export const se_GetMetricPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMetricPolicy"); let body: any; - body = JSON.stringify(se_GetMetricPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -257,7 +240,7 @@ export const se_ListContainersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListContainers"); let body: any; - body = JSON.stringify(se_ListContainersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -270,7 +253,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -283,7 +266,7 @@ export const se_PutContainerPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutContainerPolicy"); let body: any; - body = JSON.stringify(se_PutContainerPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -296,7 +279,7 @@ export const se_PutCorsPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutCorsPolicy"); let body: any; - body = JSON.stringify(se_PutCorsPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -309,7 +292,7 @@ export const se_PutLifecyclePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLifecyclePolicy"); let body: any; - body = JSON.stringify(se_PutLifecyclePolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -322,7 +305,7 @@ export const se_PutMetricPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutMetricPolicy"); let body: any; - body = JSON.stringify(se_PutMetricPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -335,7 +318,7 @@ export const se_StartAccessLoggingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartAccessLogging"); let body: any; - body = JSON.stringify(se_StartAccessLoggingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -348,7 +331,7 @@ export const se_StopAccessLoggingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopAccessLogging"); let body: any; - body = JSON.stringify(se_StopAccessLoggingInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -361,7 +344,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -374,7 +357,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -395,7 +378,7 @@ export const de_CreateContainerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -422,10 +405,9 @@ const de_CreateContainerCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -443,12 +425,12 @@ export const de_DeleteContainerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContainerOutput(data, context); + contents = _json(data); const response: DeleteContainerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -475,10 +457,9 @@ const de_DeleteContainerCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -496,12 +477,12 @@ export const de_DeleteContainerPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContainerPolicyOutput(data, context); + contents = _json(data); const response: DeleteContainerPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -531,10 +512,9 @@ const de_DeleteContainerPolicyCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -552,12 +532,12 @@ export const de_DeleteCorsPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCorsPolicyOutput(data, context); + contents = _json(data); const response: DeleteCorsPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -587,10 +567,9 @@ const de_DeleteCorsPolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -608,12 +587,12 @@ export const de_DeleteLifecyclePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLifecyclePolicyOutput(data, context); + contents = _json(data); const response: DeleteLifecyclePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -643,10 +622,9 @@ const de_DeleteLifecyclePolicyCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -664,12 +642,12 @@ export const de_DeleteMetricPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMetricPolicyOutput(data, context); + contents = _json(data); const response: DeleteMetricPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -699,10 +677,9 @@ const de_DeleteMetricPolicyCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -725,7 +702,7 @@ export const de_DescribeContainerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -749,10 +726,9 @@ const de_DescribeContainerCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -770,12 +746,12 @@ export const de_GetContainerPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContainerPolicyOutput(data, context); + contents = _json(data); const response: GetContainerPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -805,10 +781,9 @@ const de_GetContainerPolicyCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -826,12 +801,12 @@ export const de_GetCorsPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCorsPolicyOutput(data, context); + contents = _json(data); const response: GetCorsPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -861,10 +836,9 @@ const de_GetCorsPolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -882,12 +856,12 @@ export const de_GetLifecyclePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLifecyclePolicyOutput(data, context); + contents = _json(data); const response: GetLifecyclePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -917,10 +891,9 @@ const de_GetLifecyclePolicyCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -938,12 +911,12 @@ export const de_GetMetricPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMetricPolicyOutput(data, context); + contents = _json(data); const response: GetMetricPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -973,10 +946,9 @@ const de_GetMetricPolicyCommandError = async ( throw await de_PolicyNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -999,7 +971,7 @@ export const de_ListContainersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1020,10 +992,9 @@ const de_ListContainersCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1041,12 +1012,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1073,10 +1044,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1094,12 +1064,12 @@ export const de_PutContainerPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutContainerPolicyOutput(data, context); + contents = _json(data); const response: PutContainerPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1126,10 +1096,9 @@ const de_PutContainerPolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,12 +1116,12 @@ export const de_PutCorsPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutCorsPolicyOutput(data, context); + contents = _json(data); const response: PutCorsPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1179,10 +1148,9 @@ const de_PutCorsPolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,12 +1168,12 @@ export const de_PutLifecyclePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLifecyclePolicyOutput(data, context); + contents = _json(data); const response: PutLifecyclePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1232,10 +1200,9 @@ const de_PutLifecyclePolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1253,12 +1220,12 @@ export const de_PutMetricPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutMetricPolicyOutput(data, context); + contents = _json(data); const response: PutMetricPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1285,10 +1252,9 @@ const de_PutMetricPolicyCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1306,12 +1272,12 @@ export const de_StartAccessLoggingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartAccessLoggingOutput(data, context); + contents = _json(data); const response: StartAccessLoggingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1338,10 +1304,9 @@ const de_StartAccessLoggingCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1359,12 +1324,12 @@ export const de_StopAccessLoggingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopAccessLoggingOutput(data, context); + contents = _json(data); const response: StopAccessLoggingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1391,10 +1356,9 @@ const de_StopAccessLoggingCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1412,12 +1376,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1444,10 +1408,9 @@ const de_TagResourceCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1465,12 +1428,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1497,10 +1460,9 @@ const de_UntagResourceCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1514,7 +1476,7 @@ const de_ContainerInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ContainerInUseException(body, context); + const deserialized: any = _json(body); const exception = new ContainerInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1530,7 +1492,7 @@ const de_ContainerNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ContainerNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ContainerNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1546,7 +1508,7 @@ const de_CorsPolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CorsPolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new CorsPolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1559,7 +1521,7 @@ const de_CorsPolicyNotFoundExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1575,7 +1537,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1591,7 +1553,7 @@ const de_PolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1599,406 +1561,93 @@ const de_PolicyNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AllowedHeaders - */ -const se_AllowedHeaders = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedHeaders omitted. -/** - * serializeAws_json1_1AllowedMethods - */ -const se_AllowedMethods = (input: (MethodName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedMethods omitted. -/** - * serializeAws_json1_1AllowedOrigins - */ -const se_AllowedOrigins = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AllowedOrigins omitted. -/** - * serializeAws_json1_1CorsPolicy - */ -const se_CorsPolicy = (input: CorsRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CorsRule(entry, context); - }); -}; +// se_CorsPolicy omitted. -/** - * serializeAws_json1_1CorsRule - */ -const se_CorsRule = (input: CorsRule, context: __SerdeContext): any => { - return { - ...(input.AllowedHeaders != null && { AllowedHeaders: se_AllowedHeaders(input.AllowedHeaders, context) }), - ...(input.AllowedMethods != null && { AllowedMethods: se_AllowedMethods(input.AllowedMethods, context) }), - ...(input.AllowedOrigins != null && { AllowedOrigins: se_AllowedOrigins(input.AllowedOrigins, context) }), - ...(input.ExposeHeaders != null && { ExposeHeaders: se_ExposeHeaders(input.ExposeHeaders, context) }), - ...(input.MaxAgeSeconds != null && { MaxAgeSeconds: input.MaxAgeSeconds }), - }; -}; +// se_CorsRule omitted. -/** - * serializeAws_json1_1CreateContainerInput - */ -const se_CreateContainerInput = (input: CreateContainerInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateContainerInput omitted. -/** - * serializeAws_json1_1DeleteContainerInput - */ -const se_DeleteContainerInput = (input: DeleteContainerInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_DeleteContainerInput omitted. -/** - * serializeAws_json1_1DeleteContainerPolicyInput - */ -const se_DeleteContainerPolicyInput = (input: DeleteContainerPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_DeleteContainerPolicyInput omitted. -/** - * serializeAws_json1_1DeleteCorsPolicyInput - */ -const se_DeleteCorsPolicyInput = (input: DeleteCorsPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_DeleteCorsPolicyInput omitted. -/** - * serializeAws_json1_1DeleteLifecyclePolicyInput - */ -const se_DeleteLifecyclePolicyInput = (input: DeleteLifecyclePolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_DeleteLifecyclePolicyInput omitted. -/** - * serializeAws_json1_1DeleteMetricPolicyInput - */ -const se_DeleteMetricPolicyInput = (input: DeleteMetricPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_DeleteMetricPolicyInput omitted. -/** - * serializeAws_json1_1DescribeContainerInput - */ -const se_DescribeContainerInput = (input: DescribeContainerInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_DescribeContainerInput omitted. -/** - * serializeAws_json1_1ExposeHeaders - */ -const se_ExposeHeaders = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ExposeHeaders omitted. -/** - * serializeAws_json1_1GetContainerPolicyInput - */ -const se_GetContainerPolicyInput = (input: GetContainerPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_GetContainerPolicyInput omitted. -/** - * serializeAws_json1_1GetCorsPolicyInput - */ -const se_GetCorsPolicyInput = (input: GetCorsPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_GetCorsPolicyInput omitted. -/** - * serializeAws_json1_1GetLifecyclePolicyInput - */ -const se_GetLifecyclePolicyInput = (input: GetLifecyclePolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_GetLifecyclePolicyInput omitted. -/** - * serializeAws_json1_1GetMetricPolicyInput - */ -const se_GetMetricPolicyInput = (input: GetMetricPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_GetMetricPolicyInput omitted. -/** - * serializeAws_json1_1ListContainersInput - */ -const se_ListContainersInput = (input: ListContainersInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListContainersInput omitted. -/** - * serializeAws_json1_1ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.Resource != null && { Resource: input.Resource }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_1MetricPolicy - */ -const se_MetricPolicy = (input: MetricPolicy, context: __SerdeContext): any => { - return { - ...(input.ContainerLevelMetrics != null && { ContainerLevelMetrics: input.ContainerLevelMetrics }), - ...(input.MetricPolicyRules != null && { - MetricPolicyRules: se_MetricPolicyRules(input.MetricPolicyRules, context), - }), - }; -}; +// se_MetricPolicy omitted. -/** - * serializeAws_json1_1MetricPolicyRule - */ -const se_MetricPolicyRule = (input: MetricPolicyRule, context: __SerdeContext): any => { - return { - ...(input.ObjectGroup != null && { ObjectGroup: input.ObjectGroup }), - ...(input.ObjectGroupName != null && { ObjectGroupName: input.ObjectGroupName }), - }; -}; +// se_MetricPolicyRule omitted. -/** - * serializeAws_json1_1MetricPolicyRules - */ -const se_MetricPolicyRules = (input: MetricPolicyRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricPolicyRule(entry, context); - }); -}; +// se_MetricPolicyRules omitted. -/** - * serializeAws_json1_1PutContainerPolicyInput - */ -const se_PutContainerPolicyInput = (input: PutContainerPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.Policy != null && { Policy: input.Policy }), - }; -}; +// se_PutContainerPolicyInput omitted. -/** - * serializeAws_json1_1PutCorsPolicyInput - */ -const se_PutCorsPolicyInput = (input: PutCorsPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.CorsPolicy != null && { CorsPolicy: se_CorsPolicy(input.CorsPolicy, context) }), - }; -}; +// se_PutCorsPolicyInput omitted. -/** - * serializeAws_json1_1PutLifecyclePolicyInput - */ -const se_PutLifecyclePolicyInput = (input: PutLifecyclePolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.LifecyclePolicy != null && { LifecyclePolicy: input.LifecyclePolicy }), - }; -}; +// se_PutLifecyclePolicyInput omitted. -/** - * serializeAws_json1_1PutMetricPolicyInput - */ -const se_PutMetricPolicyInput = (input: PutMetricPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.MetricPolicy != null && { MetricPolicy: se_MetricPolicy(input.MetricPolicy, context) }), - }; -}; +// se_PutMetricPolicyInput omitted. -/** - * serializeAws_json1_1StartAccessLoggingInput - */ -const se_StartAccessLoggingInput = (input: StartAccessLoggingInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_StartAccessLoggingInput omitted. -/** - * serializeAws_json1_1StopAccessLoggingInput - */ -const se_StopAccessLoggingInput = (input: StopAccessLoggingInput, context: __SerdeContext): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; +// se_StopAccessLoggingInput omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.Resource != null && { Resource: input.Resource }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceInput omitted. -/** - * serializeAws_json1_1UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.Resource != null && { Resource: input.Resource }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceInput omitted. -/** - * deserializeAws_json1_1AllowedHeaders - */ -const de_AllowedHeaders = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AllowedHeaders omitted. -/** - * deserializeAws_json1_1AllowedMethods - */ -const de_AllowedMethods = (output: any, context: __SerdeContext): (MethodName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AllowedMethods omitted. -/** - * deserializeAws_json1_1AllowedOrigins - */ -const de_AllowedOrigins = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AllowedOrigins omitted. /** * deserializeAws_json1_1Container */ const de_Container = (output: any, context: __SerdeContext): Container => { - return { - ARN: __expectString(output.ARN), - AccessLoggingEnabled: __expectBoolean(output.AccessLoggingEnabled), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Endpoint: __expectString(output.Endpoint), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + ARN: __expectString, + AccessLoggingEnabled: __expectBoolean, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Endpoint: __expectString, + Name: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ContainerInUseException - */ -const de_ContainerInUseException = (output: any, context: __SerdeContext): ContainerInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ContainerInUseException omitted. /** * deserializeAws_json1_1ContainerList @@ -2007,326 +1656,100 @@ const de_ContainerList = (output: any, context: __SerdeContext): Container[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Container(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ContainerNotFoundException - */ -const de_ContainerNotFoundException = (output: any, context: __SerdeContext): ContainerNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ContainerNotFoundException omitted. -/** - * deserializeAws_json1_1CorsPolicy - */ -const de_CorsPolicy = (output: any, context: __SerdeContext): CorsRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CorsRule(entry, context); - }); - return retVal; -}; +// de_CorsPolicy omitted. -/** - * deserializeAws_json1_1CorsPolicyNotFoundException - */ -const de_CorsPolicyNotFoundException = (output: any, context: __SerdeContext): CorsPolicyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CorsPolicyNotFoundException omitted. -/** - * deserializeAws_json1_1CorsRule - */ -const de_CorsRule = (output: any, context: __SerdeContext): CorsRule => { - return { - AllowedHeaders: output.AllowedHeaders != null ? de_AllowedHeaders(output.AllowedHeaders, context) : undefined, - AllowedMethods: output.AllowedMethods != null ? de_AllowedMethods(output.AllowedMethods, context) : undefined, - AllowedOrigins: output.AllowedOrigins != null ? de_AllowedOrigins(output.AllowedOrigins, context) : undefined, - ExposeHeaders: output.ExposeHeaders != null ? de_ExposeHeaders(output.ExposeHeaders, context) : undefined, - MaxAgeSeconds: __expectInt32(output.MaxAgeSeconds), - } as any; -}; +// de_CorsRule omitted. /** * deserializeAws_json1_1CreateContainerOutput */ const de_CreateContainerOutput = (output: any, context: __SerdeContext): CreateContainerOutput => { - return { - Container: output.Container != null ? de_Container(output.Container, context) : undefined, - } as any; + return take(output, { + Container: (_: any) => de_Container(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteContainerOutput - */ -const de_DeleteContainerOutput = (output: any, context: __SerdeContext): DeleteContainerOutput => { - return {} as any; -}; +// de_DeleteContainerOutput omitted. -/** - * deserializeAws_json1_1DeleteContainerPolicyOutput - */ -const de_DeleteContainerPolicyOutput = (output: any, context: __SerdeContext): DeleteContainerPolicyOutput => { - return {} as any; -}; +// de_DeleteContainerPolicyOutput omitted. -/** - * deserializeAws_json1_1DeleteCorsPolicyOutput - */ -const de_DeleteCorsPolicyOutput = (output: any, context: __SerdeContext): DeleteCorsPolicyOutput => { - return {} as any; -}; +// de_DeleteCorsPolicyOutput omitted. -/** - * deserializeAws_json1_1DeleteLifecyclePolicyOutput - */ -const de_DeleteLifecyclePolicyOutput = (output: any, context: __SerdeContext): DeleteLifecyclePolicyOutput => { - return {} as any; -}; +// de_DeleteLifecyclePolicyOutput omitted. -/** - * deserializeAws_json1_1DeleteMetricPolicyOutput - */ -const de_DeleteMetricPolicyOutput = (output: any, context: __SerdeContext): DeleteMetricPolicyOutput => { - return {} as any; -}; +// de_DeleteMetricPolicyOutput omitted. /** * deserializeAws_json1_1DescribeContainerOutput */ const de_DescribeContainerOutput = (output: any, context: __SerdeContext): DescribeContainerOutput => { - return { - Container: output.Container != null ? de_Container(output.Container, context) : undefined, - } as any; + return take(output, { + Container: (_: any) => de_Container(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ExposeHeaders - */ -const de_ExposeHeaders = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExposeHeaders omitted. -/** - * deserializeAws_json1_1GetContainerPolicyOutput - */ -const de_GetContainerPolicyOutput = (output: any, context: __SerdeContext): GetContainerPolicyOutput => { - return { - Policy: __expectString(output.Policy), - } as any; -}; +// de_GetContainerPolicyOutput omitted. -/** - * deserializeAws_json1_1GetCorsPolicyOutput - */ -const de_GetCorsPolicyOutput = (output: any, context: __SerdeContext): GetCorsPolicyOutput => { - return { - CorsPolicy: output.CorsPolicy != null ? de_CorsPolicy(output.CorsPolicy, context) : undefined, - } as any; -}; +// de_GetCorsPolicyOutput omitted. -/** - * deserializeAws_json1_1GetLifecyclePolicyOutput - */ -const de_GetLifecyclePolicyOutput = (output: any, context: __SerdeContext): GetLifecyclePolicyOutput => { - return { - LifecyclePolicy: __expectString(output.LifecyclePolicy), - } as any; -}; +// de_GetLifecyclePolicyOutput omitted. -/** - * deserializeAws_json1_1GetMetricPolicyOutput - */ -const de_GetMetricPolicyOutput = (output: any, context: __SerdeContext): GetMetricPolicyOutput => { - return { - MetricPolicy: output.MetricPolicy != null ? de_MetricPolicy(output.MetricPolicy, context) : undefined, - } as any; -}; +// de_GetMetricPolicyOutput omitted. -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListContainersOutput */ const de_ListContainersOutput = (output: any, context: __SerdeContext): ListContainersOutput => { - return { - Containers: output.Containers != null ? de_ContainerList(output.Containers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Containers: (_: any) => de_ContainerList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceOutput omitted. -/** - * deserializeAws_json1_1MetricPolicy - */ -const de_MetricPolicy = (output: any, context: __SerdeContext): MetricPolicy => { - return { - ContainerLevelMetrics: __expectString(output.ContainerLevelMetrics), - MetricPolicyRules: - output.MetricPolicyRules != null ? de_MetricPolicyRules(output.MetricPolicyRules, context) : undefined, - } as any; -}; +// de_MetricPolicy omitted. -/** - * deserializeAws_json1_1MetricPolicyRule - */ -const de_MetricPolicyRule = (output: any, context: __SerdeContext): MetricPolicyRule => { - return { - ObjectGroup: __expectString(output.ObjectGroup), - ObjectGroupName: __expectString(output.ObjectGroupName), - } as any; -}; +// de_MetricPolicyRule omitted. -/** - * deserializeAws_json1_1MetricPolicyRules - */ -const de_MetricPolicyRules = (output: any, context: __SerdeContext): MetricPolicyRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricPolicyRule(entry, context); - }); - return retVal; -}; +// de_MetricPolicyRules omitted. -/** - * deserializeAws_json1_1PolicyNotFoundException - */ -const de_PolicyNotFoundException = (output: any, context: __SerdeContext): PolicyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PolicyNotFoundException omitted. -/** - * deserializeAws_json1_1PutContainerPolicyOutput - */ -const de_PutContainerPolicyOutput = (output: any, context: __SerdeContext): PutContainerPolicyOutput => { - return {} as any; -}; +// de_PutContainerPolicyOutput omitted. -/** - * deserializeAws_json1_1PutCorsPolicyOutput - */ -const de_PutCorsPolicyOutput = (output: any, context: __SerdeContext): PutCorsPolicyOutput => { - return {} as any; -}; +// de_PutCorsPolicyOutput omitted. -/** - * deserializeAws_json1_1PutLifecyclePolicyOutput - */ -const de_PutLifecyclePolicyOutput = (output: any, context: __SerdeContext): PutLifecyclePolicyOutput => { - return {} as any; -}; +// de_PutLifecyclePolicyOutput omitted. -/** - * deserializeAws_json1_1PutMetricPolicyOutput - */ -const de_PutMetricPolicyOutput = (output: any, context: __SerdeContext): PutMetricPolicyOutput => { - return {} as any; -}; +// de_PutMetricPolicyOutput omitted. -/** - * deserializeAws_json1_1StartAccessLoggingOutput - */ -const de_StartAccessLoggingOutput = (output: any, context: __SerdeContext): StartAccessLoggingOutput => { - return {} as any; -}; +// de_StartAccessLoggingOutput omitted. -/** - * deserializeAws_json1_1StopAccessLoggingOutput - */ -const de_StopAccessLoggingOutput = (output: any, context: __SerdeContext): StopAccessLoggingOutput => { - return {} as any; -}; +// de_StopAccessLoggingOutput omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_1UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_UntagResourceOutput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2348,6 +1771,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-mediatailor/src/protocols/Aws_restJson1.ts b/clients/client-mediatailor/src/protocols/Aws_restJson1.ts index 58749a0c66d2..9819bd64c596 100644 --- a/clients/client-mediatailor/src/protocols/Aws_restJson1.ts +++ b/clients/client-mediatailor/src/protocols/Aws_restJson1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -10,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -129,18 +130,14 @@ import { CdnConfiguration, Channel, ClipRange, - DashConfiguration, DashConfigurationForPut, DashPlaylistSettings, DefaultSegmentDeliveryConfiguration, - HlsConfiguration, HlsPlaylistSettings, HttpConfiguration, HttpPackageConfiguration, LivePreRollConfiguration, LiveSource, - LogConfiguration, - LogConfigurationForChannel, LogType, ManifestProcessingRules, PlaybackConfiguration, @@ -148,7 +145,6 @@ import { PrefetchRetrieval, PrefetchSchedule, RequestOutputItem, - ResponseOutputItem, ScheduleAdBreak, ScheduleConfiguration, ScheduleEntry, @@ -178,10 +174,12 @@ export const se_ConfigureLogsForChannelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configureLogs/channel"; let body: any; - body = JSON.stringify({ - ...(input.ChannelName != null && { ChannelName: input.ChannelName }), - ...(input.LogTypes != null && { LogTypes: se_LogTypes(input.LogTypes, context) }), - }); + body = JSON.stringify( + take(input, { + ChannelName: [], + LogTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -207,10 +205,12 @@ export const se_ConfigureLogsForPlaybackConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configureLogs/playbackConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.PercentEnabled != null && { PercentEnabled: input.PercentEnabled }), - ...(input.PlaybackConfigurationName != null && { PlaybackConfigurationName: input.PlaybackConfigurationName }), - }); + body = JSON.stringify( + take(input, { + PercentEnabled: [], + PlaybackConfigurationName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -236,13 +236,15 @@ export const se_CreateChannelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName!, "{ChannelName}", false); let body: any; - body = JSON.stringify({ - ...(input.FillerSlate != null && { FillerSlate: se_SlateSource(input.FillerSlate, context) }), - ...(input.Outputs != null && { Outputs: se_RequestOutputs(input.Outputs, context) }), - ...(input.PlaybackMode != null && { PlaybackMode: input.PlaybackMode }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - ...(input.Tier != null && { Tier: input.Tier }), - }); + body = JSON.stringify( + take(input, { + FillerSlate: (_) => _json(_), + Outputs: (_) => _json(_), + PlaybackMode: [], + tags: [, (_) => _json(_), `Tags`], + Tier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -285,12 +287,12 @@ export const se_CreateLiveSourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.HttpPackageConfigurations != null && { - HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context), - }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + HttpPackageConfigurations: (_) => _json(_), + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -326,11 +328,13 @@ export const se_CreatePrefetchScheduleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Consumption != null && { Consumption: se_PrefetchConsumption(input.Consumption, context) }), - ...(input.Retrieval != null && { Retrieval: se_PrefetchRetrieval(input.Retrieval, context) }), - ...(input.StreamId != null && { StreamId: input.StreamId }), - }); + body = JSON.stringify( + take(input, { + Consumption: (_) => se_PrefetchConsumption(_, context), + Retrieval: (_) => se_PrefetchRetrieval(_, context), + StreamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -359,15 +363,15 @@ export const se_CreateProgramCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName!, "{ChannelName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName!, "{ProgramName}", false); let body: any; - body = JSON.stringify({ - ...(input.AdBreaks != null && { AdBreaks: se___listOfAdBreak(input.AdBreaks, context) }), - ...(input.LiveSourceName != null && { LiveSourceName: input.LiveSourceName }), - ...(input.ScheduleConfiguration != null && { - ScheduleConfiguration: se_ScheduleConfiguration(input.ScheduleConfiguration, context), - }), - ...(input.SourceLocationName != null && { SourceLocationName: input.SourceLocationName }), - ...(input.VodSourceName != null && { VodSourceName: input.VodSourceName }), - }); + body = JSON.stringify( + take(input, { + AdBreaks: (_) => _json(_), + LiveSourceName: [], + ScheduleConfiguration: (_) => _json(_), + SourceLocationName: [], + VodSourceName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -401,27 +405,15 @@ export const se_CreateSourceLocationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AccessConfiguration != null && { - AccessConfiguration: se_AccessConfiguration(input.AccessConfiguration, context), - }), - ...(input.DefaultSegmentDeliveryConfiguration != null && { - DefaultSegmentDeliveryConfiguration: se_DefaultSegmentDeliveryConfiguration( - input.DefaultSegmentDeliveryConfiguration, - context - ), - }), - ...(input.HttpConfiguration != null && { - HttpConfiguration: se_HttpConfiguration(input.HttpConfiguration, context), - }), - ...(input.SegmentDeliveryConfigurations != null && { - SegmentDeliveryConfigurations: se___listOfSegmentDeliveryConfiguration( - input.SegmentDeliveryConfigurations, - context - ), - }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AccessConfiguration: (_) => _json(_), + DefaultSegmentDeliveryConfiguration: (_) => _json(_), + HttpConfiguration: (_) => _json(_), + SegmentDeliveryConfigurations: (_) => _json(_), + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -464,12 +456,12 @@ export const se_CreateVodSourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.HttpPackageConfigurations != null && { - HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context), - }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + HttpPackageConfigurations: (_) => _json(_), + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1136,11 +1128,13 @@ export const se_ListPrefetchSchedulesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StreamId != null && { StreamId: input.StreamId }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + StreamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1254,9 +1248,11 @@ export const se_PutChannelPolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}/policy"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName!, "{ChannelName}", false); let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1281,32 +1277,24 @@ export const se_PutPlaybackConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/playbackConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.AdDecisionServerUrl != null && { AdDecisionServerUrl: input.AdDecisionServerUrl }), - ...(input.AvailSuppression != null && { AvailSuppression: se_AvailSuppression(input.AvailSuppression, context) }), - ...(input.Bumper != null && { Bumper: se_Bumper(input.Bumper, context) }), - ...(input.CdnConfiguration != null && { CdnConfiguration: se_CdnConfiguration(input.CdnConfiguration, context) }), - ...(input.ConfigurationAliases != null && { - ConfigurationAliases: se_ConfigurationAliasesRequest(input.ConfigurationAliases, context), - }), - ...(input.DashConfiguration != null && { - DashConfiguration: se_DashConfigurationForPut(input.DashConfiguration, context), - }), - ...(input.LivePreRollConfiguration != null && { - LivePreRollConfiguration: se_LivePreRollConfiguration(input.LivePreRollConfiguration, context), - }), - ...(input.ManifestProcessingRules != null && { - ManifestProcessingRules: se_ManifestProcessingRules(input.ManifestProcessingRules, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PersonalizationThresholdSeconds != null && { - PersonalizationThresholdSeconds: input.PersonalizationThresholdSeconds, - }), - ...(input.SlateAdUrl != null && { SlateAdUrl: input.SlateAdUrl }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - ...(input.TranscodeProfileName != null && { TranscodeProfileName: input.TranscodeProfileName }), - ...(input.VideoContentSourceUrl != null && { VideoContentSourceUrl: input.VideoContentSourceUrl }), - }); + body = JSON.stringify( + take(input, { + AdDecisionServerUrl: [], + AvailSuppression: (_) => _json(_), + Bumper: (_) => _json(_), + CdnConfiguration: (_) => _json(_), + ConfigurationAliases: (_) => _json(_), + DashConfiguration: (_) => _json(_), + LivePreRollConfiguration: (_) => _json(_), + ManifestProcessingRules: (_) => _json(_), + Name: [], + PersonalizationThresholdSeconds: [], + SlateAdUrl: [], + tags: [, (_) => _json(_), `Tags`], + TranscodeProfileName: [], + VideoContentSourceUrl: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1380,9 +1368,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1438,10 +1428,12 @@ export const se_UpdateChannelCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel/{ChannelName}"; resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName!, "{ChannelName}", false); let body: any; - body = JSON.stringify({ - ...(input.FillerSlate != null && { FillerSlate: se_SlateSource(input.FillerSlate, context) }), - ...(input.Outputs != null && { Outputs: se_RequestOutputs(input.Outputs, context) }), - }); + body = JSON.stringify( + take(input, { + FillerSlate: (_) => _json(_), + Outputs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1484,11 +1476,11 @@ export const se_UpdateLiveSourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.HttpPackageConfigurations != null && { - HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context), - }), - }); + body = JSON.stringify( + take(input, { + HttpPackageConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1517,12 +1509,12 @@ export const se_UpdateProgramCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ChannelName", () => input.ChannelName!, "{ChannelName}", false); resolvedPath = __resolvedPath(resolvedPath, input, "ProgramName", () => input.ProgramName!, "{ProgramName}", false); let body: any; - body = JSON.stringify({ - ...(input.AdBreaks != null && { AdBreaks: se___listOfAdBreak(input.AdBreaks, context) }), - ...(input.ScheduleConfiguration != null && { - ScheduleConfiguration: se_UpdateProgramScheduleConfiguration(input.ScheduleConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + AdBreaks: (_) => _json(_), + ScheduleConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1556,26 +1548,14 @@ export const se_UpdateSourceLocationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AccessConfiguration != null && { - AccessConfiguration: se_AccessConfiguration(input.AccessConfiguration, context), - }), - ...(input.DefaultSegmentDeliveryConfiguration != null && { - DefaultSegmentDeliveryConfiguration: se_DefaultSegmentDeliveryConfiguration( - input.DefaultSegmentDeliveryConfiguration, - context - ), - }), - ...(input.HttpConfiguration != null && { - HttpConfiguration: se_HttpConfiguration(input.HttpConfiguration, context), - }), - ...(input.SegmentDeliveryConfigurations != null && { - SegmentDeliveryConfigurations: se___listOfSegmentDeliveryConfiguration( - input.SegmentDeliveryConfigurations, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + AccessConfiguration: (_) => _json(_), + DefaultSegmentDeliveryConfiguration: (_) => _json(_), + HttpConfiguration: (_) => _json(_), + SegmentDeliveryConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1618,11 +1598,11 @@ export const se_UpdateVodSourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.HttpPackageConfigurations != null && { - HttpPackageConfigurations: se_HttpPackageConfigurations(input.HttpPackageConfigurations, context), - }), - }); + body = JSON.stringify( + take(input, { + HttpPackageConfigurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1648,12 +1628,11 @@ export const de_ConfigureLogsForChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.LogTypes != null) { - contents.LogTypes = de_LogTypes(data.LogTypes, context); - } + const doc = take(data, { + ChannelName: __expectString, + LogTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1670,10 +1649,9 @@ const de_ConfigureLogsForChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1692,12 +1670,11 @@ export const de_ConfigureLogsForPlaybackConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PercentEnabled != null) { - contents.PercentEnabled = __expectInt32(data.PercentEnabled); - } - if (data.PlaybackConfigurationName != null) { - contents.PlaybackConfigurationName = __expectString(data.PlaybackConfigurationName); - } + const doc = take(data, { + PercentEnabled: __expectInt32, + PlaybackConfigurationName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1714,10 +1691,9 @@ const de_ConfigureLogsForPlaybackConfigurationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1736,36 +1712,19 @@ export const de_CreateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.ChannelState != null) { - contents.ChannelState = __expectString(data.ChannelState); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.FillerSlate != null) { - contents.FillerSlate = de_SlateSource(data.FillerSlate, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Outputs != null) { - contents.Outputs = de_ResponseOutputs(data.Outputs, context); - } - if (data.PlaybackMode != null) { - contents.PlaybackMode = __expectString(data.PlaybackMode); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.Tier != null) { - contents.Tier = __expectString(data.Tier); - } + const doc = take(data, { + Arn: __expectString, + ChannelName: __expectString, + ChannelState: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FillerSlate: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Outputs: _json, + PlaybackMode: __expectString, + Tags: [, _json, `tags`], + Tier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1782,10 +1741,9 @@ const de_CreateChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1804,27 +1762,16 @@ export const de_CreateLiveSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.HttpPackageConfigurations != null) { - contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.LiveSourceName != null) { - contents.LiveSourceName = __expectString(data.LiveSourceName); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LiveSourceName: __expectString, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1841,10 +1788,9 @@ const de_CreateLiveSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1863,24 +1809,15 @@ export const de_CreatePrefetchScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Consumption != null) { - contents.Consumption = de_PrefetchConsumption(data.Consumption, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PlaybackConfigurationName != null) { - contents.PlaybackConfigurationName = __expectString(data.PlaybackConfigurationName); - } - if (data.Retrieval != null) { - contents.Retrieval = de_PrefetchRetrieval(data.Retrieval, context); - } - if (data.StreamId != null) { - contents.StreamId = __expectString(data.StreamId); - } + const doc = take(data, { + Arn: __expectString, + Consumption: (_) => de_PrefetchConsumption(_, context), + Name: __expectString, + PlaybackConfigurationName: __expectString, + Retrieval: (_) => de_PrefetchRetrieval(_, context), + StreamId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1897,10 +1834,9 @@ const de_CreatePrefetchScheduleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1919,39 +1855,20 @@ export const de_CreateProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdBreaks != null) { - contents.AdBreaks = de___listOfAdBreak(data.AdBreaks, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.ClipRange != null) { - contents.ClipRange = de_ClipRange(data.ClipRange, context); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DurationMillis != null) { - contents.DurationMillis = __expectLong(data.DurationMillis); - } - if (data.LiveSourceName != null) { - contents.LiveSourceName = __expectString(data.LiveSourceName); - } - if (data.ProgramName != null) { - contents.ProgramName = __expectString(data.ProgramName); - } - if (data.ScheduledStartTime != null) { - contents.ScheduledStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ScheduledStartTime))); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.VodSourceName != null) { - contents.VodSourceName = __expectString(data.VodSourceName); - } + const doc = take(data, { + AdBreaks: _json, + Arn: __expectString, + ChannelName: __expectString, + ClipRange: _json, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DurationMillis: __expectLong, + LiveSourceName: __expectString, + ProgramName: __expectString, + ScheduledStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + VodSourceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1968,10 +1885,9 @@ const de_CreateProgramCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1990,39 +1906,18 @@ export const de_CreateSourceLocationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessConfiguration != null) { - contents.AccessConfiguration = de_AccessConfiguration(data.AccessConfiguration, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DefaultSegmentDeliveryConfiguration != null) { - contents.DefaultSegmentDeliveryConfiguration = de_DefaultSegmentDeliveryConfiguration( - data.DefaultSegmentDeliveryConfiguration, - context - ); - } - if (data.HttpConfiguration != null) { - contents.HttpConfiguration = de_HttpConfiguration(data.HttpConfiguration, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.SegmentDeliveryConfigurations != null) { - contents.SegmentDeliveryConfigurations = de___listOfSegmentDeliveryConfiguration( - data.SegmentDeliveryConfigurations, - context - ); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + AccessConfiguration: _json, + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultSegmentDeliveryConfiguration: _json, + HttpConfiguration: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SegmentDeliveryConfigurations: _json, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2039,10 +1934,9 @@ const de_CreateSourceLocationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2061,27 +1955,16 @@ export const de_CreateVodSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.HttpPackageConfigurations != null) { - contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.VodSourceName != null) { - contents.VodSourceName = __expectString(data.VodSourceName); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + VodSourceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2098,10 +1981,9 @@ const de_CreateVodSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2136,10 +2018,9 @@ const de_DeleteChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2174,10 +2055,9 @@ const de_DeleteChannelPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2212,10 +2092,9 @@ const de_DeleteLiveSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2250,10 +2129,9 @@ const de_DeletePlaybackConfigurationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2288,10 +2166,9 @@ const de_DeletePrefetchScheduleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2326,10 +2203,9 @@ const de_DeleteProgramCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2364,10 +2240,9 @@ const de_DeleteSourceLocationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2402,10 +2277,9 @@ const de_DeleteVodSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2424,39 +2298,20 @@ export const de_DescribeChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.ChannelState != null) { - contents.ChannelState = __expectString(data.ChannelState); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.FillerSlate != null) { - contents.FillerSlate = de_SlateSource(data.FillerSlate, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.LogConfiguration != null) { - contents.LogConfiguration = de_LogConfigurationForChannel(data.LogConfiguration, context); - } - if (data.Outputs != null) { - contents.Outputs = de_ResponseOutputs(data.Outputs, context); - } - if (data.PlaybackMode != null) { - contents.PlaybackMode = __expectString(data.PlaybackMode); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.Tier != null) { - contents.Tier = __expectString(data.Tier); - } + const doc = take(data, { + Arn: __expectString, + ChannelName: __expectString, + ChannelState: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FillerSlate: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogConfiguration: _json, + Outputs: _json, + PlaybackMode: __expectString, + Tags: [, _json, `tags`], + Tier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2473,10 +2328,9 @@ const de_DescribeChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2495,27 +2349,16 @@ export const de_DescribeLiveSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.HttpPackageConfigurations != null) { - contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.LiveSourceName != null) { - contents.LiveSourceName = __expectString(data.LiveSourceName); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LiveSourceName: __expectString, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2532,10 +2375,9 @@ const de_DescribeLiveSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2554,39 +2396,20 @@ export const de_DescribeProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdBreaks != null) { - contents.AdBreaks = de___listOfAdBreak(data.AdBreaks, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.ClipRange != null) { - contents.ClipRange = de_ClipRange(data.ClipRange, context); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DurationMillis != null) { - contents.DurationMillis = __expectLong(data.DurationMillis); - } - if (data.LiveSourceName != null) { - contents.LiveSourceName = __expectString(data.LiveSourceName); - } - if (data.ProgramName != null) { - contents.ProgramName = __expectString(data.ProgramName); - } - if (data.ScheduledStartTime != null) { - contents.ScheduledStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ScheduledStartTime))); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.VodSourceName != null) { - contents.VodSourceName = __expectString(data.VodSourceName); - } + const doc = take(data, { + AdBreaks: _json, + Arn: __expectString, + ChannelName: __expectString, + ClipRange: _json, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DurationMillis: __expectLong, + LiveSourceName: __expectString, + ProgramName: __expectString, + ScheduledStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + VodSourceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2603,10 +2426,9 @@ const de_DescribeProgramCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2625,39 +2447,18 @@ export const de_DescribeSourceLocationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessConfiguration != null) { - contents.AccessConfiguration = de_AccessConfiguration(data.AccessConfiguration, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DefaultSegmentDeliveryConfiguration != null) { - contents.DefaultSegmentDeliveryConfiguration = de_DefaultSegmentDeliveryConfiguration( - data.DefaultSegmentDeliveryConfiguration, - context - ); - } - if (data.HttpConfiguration != null) { - contents.HttpConfiguration = de_HttpConfiguration(data.HttpConfiguration, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.SegmentDeliveryConfigurations != null) { - contents.SegmentDeliveryConfigurations = de___listOfSegmentDeliveryConfiguration( - data.SegmentDeliveryConfigurations, - context - ); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + AccessConfiguration: _json, + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultSegmentDeliveryConfiguration: _json, + HttpConfiguration: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SegmentDeliveryConfigurations: _json, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2674,10 +2475,9 @@ const de_DescribeSourceLocationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2696,27 +2496,16 @@ export const de_DescribeVodSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.HttpPackageConfigurations != null) { - contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.VodSourceName != null) { - contents.VodSourceName = __expectString(data.VodSourceName); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + VodSourceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2733,10 +2522,9 @@ const de_DescribeVodSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2755,9 +2543,10 @@ export const de_GetChannelPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2774,10 +2563,9 @@ const de_GetChannelPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2796,12 +2584,11 @@ export const de_GetChannelScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfScheduleEntry(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfScheduleEntry(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2818,10 +2605,9 @@ const de_GetChannelScheduleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2840,63 +2626,28 @@ export const de_GetPlaybackConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdDecisionServerUrl != null) { - contents.AdDecisionServerUrl = __expectString(data.AdDecisionServerUrl); - } - if (data.AvailSuppression != null) { - contents.AvailSuppression = de_AvailSuppression(data.AvailSuppression, context); - } - if (data.Bumper != null) { - contents.Bumper = de_Bumper(data.Bumper, context); - } - if (data.CdnConfiguration != null) { - contents.CdnConfiguration = de_CdnConfiguration(data.CdnConfiguration, context); - } - if (data.ConfigurationAliases != null) { - contents.ConfigurationAliases = de_ConfigurationAliasesResponse(data.ConfigurationAliases, context); - } - if (data.DashConfiguration != null) { - contents.DashConfiguration = de_DashConfiguration(data.DashConfiguration, context); - } - if (data.HlsConfiguration != null) { - contents.HlsConfiguration = de_HlsConfiguration(data.HlsConfiguration, context); - } - if (data.LivePreRollConfiguration != null) { - contents.LivePreRollConfiguration = de_LivePreRollConfiguration(data.LivePreRollConfiguration, context); - } - if (data.LogConfiguration != null) { - contents.LogConfiguration = de_LogConfiguration(data.LogConfiguration, context); - } - if (data.ManifestProcessingRules != null) { - contents.ManifestProcessingRules = de_ManifestProcessingRules(data.ManifestProcessingRules, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PersonalizationThresholdSeconds != null) { - contents.PersonalizationThresholdSeconds = __expectInt32(data.PersonalizationThresholdSeconds); - } - if (data.PlaybackConfigurationArn != null) { - contents.PlaybackConfigurationArn = __expectString(data.PlaybackConfigurationArn); - } - if (data.PlaybackEndpointPrefix != null) { - contents.PlaybackEndpointPrefix = __expectString(data.PlaybackEndpointPrefix); - } - if (data.SessionInitializationEndpointPrefix != null) { - contents.SessionInitializationEndpointPrefix = __expectString(data.SessionInitializationEndpointPrefix); - } - if (data.SlateAdUrl != null) { - contents.SlateAdUrl = __expectString(data.SlateAdUrl); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.TranscodeProfileName != null) { - contents.TranscodeProfileName = __expectString(data.TranscodeProfileName); - } - if (data.VideoContentSourceUrl != null) { - contents.VideoContentSourceUrl = __expectString(data.VideoContentSourceUrl); - } + const doc = take(data, { + AdDecisionServerUrl: __expectString, + AvailSuppression: _json, + Bumper: _json, + CdnConfiguration: _json, + ConfigurationAliases: _json, + DashConfiguration: _json, + HlsConfiguration: _json, + LivePreRollConfiguration: _json, + LogConfiguration: _json, + ManifestProcessingRules: _json, + Name: __expectString, + PersonalizationThresholdSeconds: __expectInt32, + PlaybackConfigurationArn: __expectString, + PlaybackEndpointPrefix: __expectString, + SessionInitializationEndpointPrefix: __expectString, + SlateAdUrl: __expectString, + Tags: [, _json, `tags`], + TranscodeProfileName: __expectString, + VideoContentSourceUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2913,10 +2664,9 @@ const de_GetPlaybackConfigurationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2935,24 +2685,15 @@ export const de_GetPrefetchScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Consumption != null) { - contents.Consumption = de_PrefetchConsumption(data.Consumption, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PlaybackConfigurationName != null) { - contents.PlaybackConfigurationName = __expectString(data.PlaybackConfigurationName); - } - if (data.Retrieval != null) { - contents.Retrieval = de_PrefetchRetrieval(data.Retrieval, context); - } - if (data.StreamId != null) { - contents.StreamId = __expectString(data.StreamId); - } + const doc = take(data, { + Arn: __expectString, + Consumption: (_) => de_PrefetchConsumption(_, context), + Name: __expectString, + PlaybackConfigurationName: __expectString, + Retrieval: (_) => de_PrefetchRetrieval(_, context), + StreamId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2969,10 +2710,9 @@ const de_GetPrefetchScheduleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2991,12 +2731,11 @@ export const de_ListAlertsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfAlert(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfAlert(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3013,10 +2752,9 @@ const de_ListAlertsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3035,12 +2773,11 @@ export const de_ListChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfChannel(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfChannel(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3057,10 +2794,9 @@ const de_ListChannelsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3079,12 +2815,11 @@ export const de_ListLiveSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfLiveSource(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfLiveSource(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3101,10 +2836,9 @@ const de_ListLiveSourcesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3123,12 +2857,11 @@ export const de_ListPlaybackConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfPlaybackConfiguration(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfPlaybackConfiguration(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3145,10 +2878,9 @@ const de_ListPlaybackConfigurationsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3167,12 +2899,11 @@ export const de_ListPrefetchSchedulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfPrefetchSchedule(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfPrefetchSchedule(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3189,10 +2920,9 @@ const de_ListPrefetchSchedulesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3211,12 +2941,11 @@ export const de_ListSourceLocationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfSourceLocation(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfSourceLocation(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3233,10 +2962,9 @@ const de_ListSourceLocationsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3255,9 +2983,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3279,10 +3008,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3302,12 +3030,11 @@ export const de_ListVodSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de___listOfVodSource(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: (_) => de___listOfVodSource(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3324,10 +3051,9 @@ const de_ListVodSourcesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3362,10 +3088,9 @@ const de_PutChannelPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3384,63 +3109,28 @@ export const de_PutPlaybackConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdDecisionServerUrl != null) { - contents.AdDecisionServerUrl = __expectString(data.AdDecisionServerUrl); - } - if (data.AvailSuppression != null) { - contents.AvailSuppression = de_AvailSuppression(data.AvailSuppression, context); - } - if (data.Bumper != null) { - contents.Bumper = de_Bumper(data.Bumper, context); - } - if (data.CdnConfiguration != null) { - contents.CdnConfiguration = de_CdnConfiguration(data.CdnConfiguration, context); - } - if (data.ConfigurationAliases != null) { - contents.ConfigurationAliases = de_ConfigurationAliasesResponse(data.ConfigurationAliases, context); - } - if (data.DashConfiguration != null) { - contents.DashConfiguration = de_DashConfiguration(data.DashConfiguration, context); - } - if (data.HlsConfiguration != null) { - contents.HlsConfiguration = de_HlsConfiguration(data.HlsConfiguration, context); - } - if (data.LivePreRollConfiguration != null) { - contents.LivePreRollConfiguration = de_LivePreRollConfiguration(data.LivePreRollConfiguration, context); - } - if (data.LogConfiguration != null) { - contents.LogConfiguration = de_LogConfiguration(data.LogConfiguration, context); - } - if (data.ManifestProcessingRules != null) { - contents.ManifestProcessingRules = de_ManifestProcessingRules(data.ManifestProcessingRules, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PersonalizationThresholdSeconds != null) { - contents.PersonalizationThresholdSeconds = __expectInt32(data.PersonalizationThresholdSeconds); - } - if (data.PlaybackConfigurationArn != null) { - contents.PlaybackConfigurationArn = __expectString(data.PlaybackConfigurationArn); - } - if (data.PlaybackEndpointPrefix != null) { - contents.PlaybackEndpointPrefix = __expectString(data.PlaybackEndpointPrefix); - } - if (data.SessionInitializationEndpointPrefix != null) { - contents.SessionInitializationEndpointPrefix = __expectString(data.SessionInitializationEndpointPrefix); - } - if (data.SlateAdUrl != null) { - contents.SlateAdUrl = __expectString(data.SlateAdUrl); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.TranscodeProfileName != null) { - contents.TranscodeProfileName = __expectString(data.TranscodeProfileName); - } - if (data.VideoContentSourceUrl != null) { - contents.VideoContentSourceUrl = __expectString(data.VideoContentSourceUrl); - } + const doc = take(data, { + AdDecisionServerUrl: __expectString, + AvailSuppression: _json, + Bumper: _json, + CdnConfiguration: _json, + ConfigurationAliases: _json, + DashConfiguration: _json, + HlsConfiguration: _json, + LivePreRollConfiguration: _json, + LogConfiguration: _json, + ManifestProcessingRules: _json, + Name: __expectString, + PersonalizationThresholdSeconds: __expectInt32, + PlaybackConfigurationArn: __expectString, + PlaybackEndpointPrefix: __expectString, + SessionInitializationEndpointPrefix: __expectString, + SlateAdUrl: __expectString, + Tags: [, _json, `tags`], + TranscodeProfileName: __expectString, + VideoContentSourceUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3457,10 +3147,9 @@ const de_PutPlaybackConfigurationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3495,10 +3184,9 @@ const de_StartChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3533,10 +3221,9 @@ const de_StopChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3576,10 +3263,9 @@ const de_TagResourceCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3620,10 +3306,9 @@ const de_UntagResourceCommandError = async ( throw await de_BadRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3643,36 +3328,19 @@ export const de_UpdateChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.ChannelState != null) { - contents.ChannelState = __expectString(data.ChannelState); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.FillerSlate != null) { - contents.FillerSlate = de_SlateSource(data.FillerSlate, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Outputs != null) { - contents.Outputs = de_ResponseOutputs(data.Outputs, context); - } - if (data.PlaybackMode != null) { - contents.PlaybackMode = __expectString(data.PlaybackMode); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.Tier != null) { - contents.Tier = __expectString(data.Tier); - } + const doc = take(data, { + Arn: __expectString, + ChannelName: __expectString, + ChannelState: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FillerSlate: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Outputs: _json, + PlaybackMode: __expectString, + Tags: [, _json, `tags`], + Tier: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3689,10 +3357,9 @@ const de_UpdateChannelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3711,27 +3378,16 @@ export const de_UpdateLiveSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.HttpPackageConfigurations != null) { - contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.LiveSourceName != null) { - contents.LiveSourceName = __expectString(data.LiveSourceName); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LiveSourceName: __expectString, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3748,10 +3404,9 @@ const de_UpdateLiveSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3770,39 +3425,20 @@ export const de_UpdateProgramCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdBreaks != null) { - contents.AdBreaks = de___listOfAdBreak(data.AdBreaks, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.ChannelName != null) { - contents.ChannelName = __expectString(data.ChannelName); - } - if (data.ClipRange != null) { - contents.ClipRange = de_ClipRange(data.ClipRange, context); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DurationMillis != null) { - contents.DurationMillis = __expectLong(data.DurationMillis); - } - if (data.LiveSourceName != null) { - contents.LiveSourceName = __expectString(data.LiveSourceName); - } - if (data.ProgramName != null) { - contents.ProgramName = __expectString(data.ProgramName); - } - if (data.ScheduledStartTime != null) { - contents.ScheduledStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ScheduledStartTime))); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.VodSourceName != null) { - contents.VodSourceName = __expectString(data.VodSourceName); - } + const doc = take(data, { + AdBreaks: _json, + Arn: __expectString, + ChannelName: __expectString, + ClipRange: _json, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DurationMillis: __expectLong, + LiveSourceName: __expectString, + ProgramName: __expectString, + ScheduledStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + VodSourceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3819,10 +3455,9 @@ const de_UpdateProgramCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3841,39 +3476,18 @@ export const de_UpdateSourceLocationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccessConfiguration != null) { - contents.AccessConfiguration = de_AccessConfiguration(data.AccessConfiguration, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.DefaultSegmentDeliveryConfiguration != null) { - contents.DefaultSegmentDeliveryConfiguration = de_DefaultSegmentDeliveryConfiguration( - data.DefaultSegmentDeliveryConfiguration, - context - ); - } - if (data.HttpConfiguration != null) { - contents.HttpConfiguration = de_HttpConfiguration(data.HttpConfiguration, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.SegmentDeliveryConfigurations != null) { - contents.SegmentDeliveryConfigurations = de___listOfSegmentDeliveryConfiguration( - data.SegmentDeliveryConfigurations, - context - ); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + AccessConfiguration: _json, + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultSegmentDeliveryConfiguration: _json, + HttpConfiguration: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SegmentDeliveryConfigurations: _json, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3890,10 +3504,9 @@ const de_UpdateSourceLocationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3912,27 +3525,16 @@ export const de_UpdateVodSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.HttpPackageConfigurations != null) { - contents.HttpPackageConfigurations = de_HttpPackageConfigurations(data.HttpPackageConfigurations, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.SourceLocationName != null) { - contents.SourceLocationName = __expectString(data.SourceLocationName); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.VodSourceName != null) { - contents.VodSourceName = __expectString(data.VodSourceName); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + VodSourceName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3949,24 +3551,24 @@ const de_UpdateVodSourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3974,479 +3576,103 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOfAdBreak - */ -const se___listOfAdBreak = (input: AdBreak[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdBreak(entry, context); - }); -}; +// se___listOfAdBreak omitted. -/** - * serializeAws_restJson1__listOfAvailMatchingCriteria - */ -const se___listOfAvailMatchingCriteria = (input: AvailMatchingCriteria[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AvailMatchingCriteria(entry, context); - }); -}; +// se___listOfAvailMatchingCriteria omitted. -/** - * serializeAws_restJson1__listOfSegmentDeliveryConfiguration - */ -const se___listOfSegmentDeliveryConfiguration = ( - input: SegmentDeliveryConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SegmentDeliveryConfiguration(entry, context); - }); -}; +// se___listOfSegmentDeliveryConfiguration omitted. -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. -/** - * serializeAws_restJson1AccessConfiguration - */ -const se_AccessConfiguration = (input: AccessConfiguration, context: __SerdeContext): any => { - return { - ...(input.AccessType != null && { AccessType: input.AccessType }), - ...(input.SecretsManagerAccessTokenConfiguration != null && { - SecretsManagerAccessTokenConfiguration: se_SecretsManagerAccessTokenConfiguration( - input.SecretsManagerAccessTokenConfiguration, - context - ), - }), - }; -}; +// se_AccessConfiguration omitted. -/** - * serializeAws_restJson1AdBreak - */ -const se_AdBreak = (input: AdBreak, context: __SerdeContext): any => { - return { - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.OffsetMillis != null && { OffsetMillis: input.OffsetMillis }), - ...(input.Slate != null && { Slate: se_SlateSource(input.Slate, context) }), - ...(input.SpliceInsertMessage != null && { - SpliceInsertMessage: se_SpliceInsertMessage(input.SpliceInsertMessage, context), - }), - ...(input.TimeSignalMessage != null && { - TimeSignalMessage: se_TimeSignalMessage(input.TimeSignalMessage, context), - }), - }; -}; +// se_AdBreak omitted. -/** - * serializeAws_restJson1AdMarkerPassthrough - */ -const se_AdMarkerPassthrough = (input: AdMarkerPassthrough, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_AdMarkerPassthrough omitted. -/** - * serializeAws_restJson1AvailMatchingCriteria - */ -const se_AvailMatchingCriteria = (input: AvailMatchingCriteria, context: __SerdeContext): any => { - return { - ...(input.DynamicVariable != null && { DynamicVariable: input.DynamicVariable }), - ...(input.Operator != null && { Operator: input.Operator }), - }; -}; +// se_AvailMatchingCriteria omitted. -/** - * serializeAws_restJson1AvailSuppression - */ -const se_AvailSuppression = (input: AvailSuppression, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AvailSuppression omitted. -/** - * serializeAws_restJson1Bumper - */ -const se_Bumper = (input: Bumper, context: __SerdeContext): any => { - return { - ...(input.EndUrl != null && { EndUrl: input.EndUrl }), - ...(input.StartUrl != null && { StartUrl: input.StartUrl }), - }; -}; +// se_Bumper omitted. -/** - * serializeAws_restJson1CdnConfiguration - */ -const se_CdnConfiguration = (input: CdnConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdSegmentUrlPrefix != null && { AdSegmentUrlPrefix: input.AdSegmentUrlPrefix }), - ...(input.ContentSegmentUrlPrefix != null && { ContentSegmentUrlPrefix: input.ContentSegmentUrlPrefix }), - }; -}; +// se_CdnConfiguration omitted. -/** - * serializeAws_restJson1ClipRange - */ -const se_ClipRange = (input: ClipRange, context: __SerdeContext): any => { - return { - ...(input.EndOffsetMillis != null && { EndOffsetMillis: input.EndOffsetMillis }), - }; -}; +// se_ClipRange omitted. -/** - * serializeAws_restJson1ConfigurationAliasesRequest - */ -const se_ConfigurationAliasesRequest = ( - input: Record>, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se___mapOf__string(value, context); - return acc; - }, {}); -}; +// se_ConfigurationAliasesRequest omitted. -/** - * serializeAws_restJson1DashConfigurationForPut - */ -const se_DashConfigurationForPut = (input: DashConfigurationForPut, context: __SerdeContext): any => { - return { - ...(input.MpdLocation != null && { MpdLocation: input.MpdLocation }), - ...(input.OriginManifestType != null && { OriginManifestType: input.OriginManifestType }), - }; -}; +// se_DashConfigurationForPut omitted. -/** - * serializeAws_restJson1DashPlaylistSettings - */ -const se_DashPlaylistSettings = (input: DashPlaylistSettings, context: __SerdeContext): any => { - return { - ...(input.ManifestWindowSeconds != null && { ManifestWindowSeconds: input.ManifestWindowSeconds }), - ...(input.MinBufferTimeSeconds != null && { MinBufferTimeSeconds: input.MinBufferTimeSeconds }), - ...(input.MinUpdatePeriodSeconds != null && { MinUpdatePeriodSeconds: input.MinUpdatePeriodSeconds }), - ...(input.SuggestedPresentationDelaySeconds != null && { - SuggestedPresentationDelaySeconds: input.SuggestedPresentationDelaySeconds, - }), - }; -}; +// se_DashPlaylistSettings omitted. -/** - * serializeAws_restJson1DefaultSegmentDeliveryConfiguration - */ -const se_DefaultSegmentDeliveryConfiguration = ( - input: DefaultSegmentDeliveryConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.BaseUrl != null && { BaseUrl: input.BaseUrl }), - }; -}; +// se_DefaultSegmentDeliveryConfiguration omitted. -/** - * serializeAws_restJson1HlsPlaylistSettings - */ -const se_HlsPlaylistSettings = (input: HlsPlaylistSettings, context: __SerdeContext): any => { - return { - ...(input.ManifestWindowSeconds != null && { ManifestWindowSeconds: input.ManifestWindowSeconds }), - }; -}; +// se_HlsPlaylistSettings omitted. -/** - * serializeAws_restJson1HttpConfiguration - */ -const se_HttpConfiguration = (input: HttpConfiguration, context: __SerdeContext): any => { - return { - ...(input.BaseUrl != null && { BaseUrl: input.BaseUrl }), - }; -}; +// se_HttpConfiguration omitted. -/** - * serializeAws_restJson1HttpPackageConfiguration - */ -const se_HttpPackageConfiguration = (input: HttpPackageConfiguration, context: __SerdeContext): any => { - return { - ...(input.Path != null && { Path: input.Path }), - ...(input.SourceGroup != null && { SourceGroup: input.SourceGroup }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_HttpPackageConfiguration omitted. -/** - * serializeAws_restJson1HttpPackageConfigurations - */ -const se_HttpPackageConfigurations = (input: HttpPackageConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HttpPackageConfiguration(entry, context); - }); -}; +// se_HttpPackageConfigurations omitted. -/** - * serializeAws_restJson1LivePreRollConfiguration - */ -const se_LivePreRollConfiguration = (input: LivePreRollConfiguration, context: __SerdeContext): any => { - return { - ...(input.AdDecisionServerUrl != null && { AdDecisionServerUrl: input.AdDecisionServerUrl }), - ...(input.MaxDurationSeconds != null && { MaxDurationSeconds: input.MaxDurationSeconds }), - }; -}; +// se_LivePreRollConfiguration omitted. -/** - * serializeAws_restJson1LogTypes - */ -const se_LogTypes = (input: (LogType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LogTypes omitted. -/** - * serializeAws_restJson1ManifestProcessingRules - */ -const se_ManifestProcessingRules = (input: ManifestProcessingRules, context: __SerdeContext): any => { - return { - ...(input.AdMarkerPassthrough != null && { - AdMarkerPassthrough: se_AdMarkerPassthrough(input.AdMarkerPassthrough, context), - }), - }; -}; +// se_ManifestProcessingRules omitted. /** * serializeAws_restJson1PrefetchConsumption */ const se_PrefetchConsumption = (input: PrefetchConsumption, context: __SerdeContext): any => { - return { - ...(input.AvailMatchingCriteria != null && { - AvailMatchingCriteria: se___listOfAvailMatchingCriteria(input.AvailMatchingCriteria, context), - }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + AvailMatchingCriteria: _json, + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_restJson1PrefetchRetrieval */ const se_PrefetchRetrieval = (input: PrefetchRetrieval, context: __SerdeContext): any => { - return { - ...(input.DynamicVariables != null && { DynamicVariables: se___mapOf__string(input.DynamicVariables, context) }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + DynamicVariables: _json, + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1RequestOutputItem - */ -const se_RequestOutputItem = (input: RequestOutputItem, context: __SerdeContext): any => { - return { - ...(input.DashPlaylistSettings != null && { - DashPlaylistSettings: se_DashPlaylistSettings(input.DashPlaylistSettings, context), - }), - ...(input.HlsPlaylistSettings != null && { - HlsPlaylistSettings: se_HlsPlaylistSettings(input.HlsPlaylistSettings, context), - }), - ...(input.ManifestName != null && { ManifestName: input.ManifestName }), - ...(input.SourceGroup != null && { SourceGroup: input.SourceGroup }), - }; -}; +// se_RequestOutputItem omitted. -/** - * serializeAws_restJson1RequestOutputs - */ -const se_RequestOutputs = (input: RequestOutputItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RequestOutputItem(entry, context); - }); -}; +// se_RequestOutputs omitted. -/** - * serializeAws_restJson1ScheduleConfiguration - */ -const se_ScheduleConfiguration = (input: ScheduleConfiguration, context: __SerdeContext): any => { - return { - ...(input.ClipRange != null && { ClipRange: se_ClipRange(input.ClipRange, context) }), - ...(input.Transition != null && { Transition: se_Transition(input.Transition, context) }), - }; -}; +// se_ScheduleConfiguration omitted. -/** - * serializeAws_restJson1SecretsManagerAccessTokenConfiguration - */ -const se_SecretsManagerAccessTokenConfiguration = ( - input: SecretsManagerAccessTokenConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.HeaderName != null && { HeaderName: input.HeaderName }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.SecretStringKey != null && { SecretStringKey: input.SecretStringKey }), - }; -}; +// se_SecretsManagerAccessTokenConfiguration omitted. -/** - * serializeAws_restJson1SegmentationDescriptor - */ -const se_SegmentationDescriptor = (input: SegmentationDescriptor, context: __SerdeContext): any => { - return { - ...(input.SegmentNum != null && { SegmentNum: input.SegmentNum }), - ...(input.SegmentationEventId != null && { SegmentationEventId: input.SegmentationEventId }), - ...(input.SegmentationTypeId != null && { SegmentationTypeId: input.SegmentationTypeId }), - ...(input.SegmentationUpid != null && { SegmentationUpid: input.SegmentationUpid }), - ...(input.SegmentationUpidType != null && { SegmentationUpidType: input.SegmentationUpidType }), - ...(input.SegmentsExpected != null && { SegmentsExpected: input.SegmentsExpected }), - ...(input.SubSegmentNum != null && { SubSegmentNum: input.SubSegmentNum }), - ...(input.SubSegmentsExpected != null && { SubSegmentsExpected: input.SubSegmentsExpected }), - }; -}; +// se_SegmentationDescriptor omitted. -/** - * serializeAws_restJson1SegmentationDescriptorList - */ -const se_SegmentationDescriptorList = (input: SegmentationDescriptor[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SegmentationDescriptor(entry, context); - }); -}; +// se_SegmentationDescriptorList omitted. -/** - * serializeAws_restJson1SegmentDeliveryConfiguration - */ -const se_SegmentDeliveryConfiguration = (input: SegmentDeliveryConfiguration, context: __SerdeContext): any => { - return { - ...(input.BaseUrl != null && { BaseUrl: input.BaseUrl }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_SegmentDeliveryConfiguration omitted. -/** - * serializeAws_restJson1SlateSource - */ -const se_SlateSource = (input: SlateSource, context: __SerdeContext): any => { - return { - ...(input.SourceLocationName != null && { SourceLocationName: input.SourceLocationName }), - ...(input.VodSourceName != null && { VodSourceName: input.VodSourceName }), - }; -}; +// se_SlateSource omitted. -/** - * serializeAws_restJson1SpliceInsertMessage - */ -const se_SpliceInsertMessage = (input: SpliceInsertMessage, context: __SerdeContext): any => { - return { - ...(input.AvailNum != null && { AvailNum: input.AvailNum }), - ...(input.AvailsExpected != null && { AvailsExpected: input.AvailsExpected }), - ...(input.SpliceEventId != null && { SpliceEventId: input.SpliceEventId }), - ...(input.UniqueProgramId != null && { UniqueProgramId: input.UniqueProgramId }), - }; -}; +// se_SpliceInsertMessage omitted. -/** - * serializeAws_restJson1TimeSignalMessage - */ -const se_TimeSignalMessage = (input: TimeSignalMessage, context: __SerdeContext): any => { - return { - ...(input.SegmentationDescriptors != null && { - SegmentationDescriptors: se_SegmentationDescriptorList(input.SegmentationDescriptors, context), - }), - }; -}; +// se_TimeSignalMessage omitted. -/** - * serializeAws_restJson1Transition - */ -const se_Transition = (input: Transition, context: __SerdeContext): any => { - return { - ...(input.DurationMillis != null && { DurationMillis: input.DurationMillis }), - ...(input.RelativePosition != null && { RelativePosition: input.RelativePosition }), - ...(input.RelativeProgram != null && { RelativeProgram: input.RelativeProgram }), - ...(input.ScheduledStartTimeMillis != null && { ScheduledStartTimeMillis: input.ScheduledStartTimeMillis }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Transition omitted. -/** - * serializeAws_restJson1UpdateProgramScheduleConfiguration - */ -const se_UpdateProgramScheduleConfiguration = ( - input: UpdateProgramScheduleConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ClipRange != null && { ClipRange: se_ClipRange(input.ClipRange, context) }), - ...(input.Transition != null && { Transition: se_UpdateProgramTransition(input.Transition, context) }), - }; -}; +// se_UpdateProgramScheduleConfiguration omitted. -/** - * serializeAws_restJson1UpdateProgramTransition - */ -const se_UpdateProgramTransition = (input: UpdateProgramTransition, context: __SerdeContext): any => { - return { - ...(input.DurationMillis != null && { DurationMillis: input.DurationMillis }), - ...(input.ScheduledStartTimeMillis != null && { ScheduledStartTimeMillis: input.ScheduledStartTimeMillis }), - }; -}; +// se_UpdateProgramTransition omitted. -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. -/** - * deserializeAws_restJson1__listOfAdBreak - */ -const de___listOfAdBreak = (output: any, context: __SerdeContext): AdBreak[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdBreak(entry, context); - }); - return retVal; -}; +// de___listOfAdBreak omitted. /** * deserializeAws_restJson1__listOfAlert @@ -4455,28 +3681,12 @@ const de___listOfAlert = (output: any, context: __SerdeContext): Alert[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Alert(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfAvailMatchingCriteria - */ -const de___listOfAvailMatchingCriteria = (output: any, context: __SerdeContext): AvailMatchingCriteria[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AvailMatchingCriteria(entry, context); - }); - return retVal; -}; +// de___listOfAvailMatchingCriteria omitted. /** * deserializeAws_restJson1__listOfChannel @@ -4485,9 +3695,6 @@ const de___listOfChannel = (output: any, context: __SerdeContext): Channel[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Channel(entry, context); }); return retVal; @@ -4500,9 +3707,6 @@ const de___listOfLiveSource = (output: any, context: __SerdeContext): LiveSource const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LiveSource(entry, context); }); return retVal; @@ -4515,9 +3719,6 @@ const de___listOfPlaybackConfiguration = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PlaybackConfiguration(entry, context); }); return retVal; @@ -4530,9 +3731,6 @@ const de___listOfPrefetchSchedule = (output: any, context: __SerdeContext): Pref const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PrefetchSchedule(entry, context); }); return retVal; @@ -4545,9 +3743,6 @@ const de___listOfScheduleAdBreak = (output: any, context: __SerdeContext): Sched const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduleAdBreak(entry, context); }); return retVal; @@ -4560,31 +3755,12 @@ const de___listOfScheduleEntry = (output: any, context: __SerdeContext): Schedul const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduleEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfSegmentDeliveryConfiguration - */ -const de___listOfSegmentDeliveryConfiguration = ( - output: any, - context: __SerdeContext -): SegmentDeliveryConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SegmentDeliveryConfiguration(entry, context); - }); - return retVal; -}; +// de___listOfSegmentDeliveryConfiguration omitted. /** * deserializeAws_restJson1__listOfSourceLocation @@ -4593,9 +3769,6 @@ const de___listOfSourceLocation = (output: any, context: __SerdeContext): Source const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SourceLocation(entry, context); }); return retVal; @@ -4608,631 +3781,245 @@ const de___listOfVodSource = (output: any, context: __SerdeContext): VodSource[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VodSource(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. -/** - * deserializeAws_restJson1AccessConfiguration - */ -const de_AccessConfiguration = (output: any, context: __SerdeContext): AccessConfiguration => { - return { - AccessType: __expectString(output.AccessType), - SecretsManagerAccessTokenConfiguration: - output.SecretsManagerAccessTokenConfiguration != null - ? de_SecretsManagerAccessTokenConfiguration(output.SecretsManagerAccessTokenConfiguration, context) - : undefined, - } as any; -}; +// de_AccessConfiguration omitted. -/** - * deserializeAws_restJson1AdBreak - */ -const de_AdBreak = (output: any, context: __SerdeContext): AdBreak => { - return { - MessageType: __expectString(output.MessageType), - OffsetMillis: __expectLong(output.OffsetMillis), - Slate: output.Slate != null ? de_SlateSource(output.Slate, context) : undefined, - SpliceInsertMessage: - output.SpliceInsertMessage != null ? de_SpliceInsertMessage(output.SpliceInsertMessage, context) : undefined, - TimeSignalMessage: - output.TimeSignalMessage != null ? de_TimeSignalMessage(output.TimeSignalMessage, context) : undefined, - } as any; -}; +// de_AdBreak omitted. -/** - * deserializeAws_restJson1AdMarkerPassthrough - */ -const de_AdMarkerPassthrough = (output: any, context: __SerdeContext): AdMarkerPassthrough => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_AdMarkerPassthrough omitted. /** * deserializeAws_restJson1Alert */ const de_Alert = (output: any, context: __SerdeContext): Alert => { - return { - AlertCode: __expectString(output.AlertCode), - AlertMessage: __expectString(output.AlertMessage), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RelatedResourceArns: - output.RelatedResourceArns != null ? de___listOf__string(output.RelatedResourceArns, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - } as any; + return take(output, { + AlertCode: __expectString, + AlertMessage: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RelatedResourceArns: _json, + ResourceArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AvailMatchingCriteria - */ -const de_AvailMatchingCriteria = (output: any, context: __SerdeContext): AvailMatchingCriteria => { - return { - DynamicVariable: __expectString(output.DynamicVariable), - Operator: __expectString(output.Operator), - } as any; -}; +// de_AvailMatchingCriteria omitted. -/** - * deserializeAws_restJson1AvailSuppression - */ -const de_AvailSuppression = (output: any, context: __SerdeContext): AvailSuppression => { - return { - Mode: __expectString(output.Mode), - Value: __expectString(output.Value), - } as any; -}; +// de_AvailSuppression omitted. -/** - * deserializeAws_restJson1Bumper - */ -const de_Bumper = (output: any, context: __SerdeContext): Bumper => { - return { - EndUrl: __expectString(output.EndUrl), - StartUrl: __expectString(output.StartUrl), - } as any; -}; +// de_Bumper omitted. -/** - * deserializeAws_restJson1CdnConfiguration - */ -const de_CdnConfiguration = (output: any, context: __SerdeContext): CdnConfiguration => { - return { - AdSegmentUrlPrefix: __expectString(output.AdSegmentUrlPrefix), - ContentSegmentUrlPrefix: __expectString(output.ContentSegmentUrlPrefix), - } as any; -}; +// de_CdnConfiguration omitted. /** * deserializeAws_restJson1Channel */ const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - Arn: __expectString(output.Arn), - ChannelName: __expectString(output.ChannelName), - ChannelState: __expectString(output.ChannelState), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FillerSlate: output.FillerSlate != null ? de_SlateSource(output.FillerSlate, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LogConfiguration: - output.LogConfiguration != null ? de_LogConfigurationForChannel(output.LogConfiguration, context) : undefined, - Outputs: output.Outputs != null ? de_ResponseOutputs(output.Outputs, context) : undefined, - PlaybackMode: __expectString(output.PlaybackMode), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - Tier: __expectString(output.Tier), - } as any; -}; - -/** - * deserializeAws_restJson1ClipRange - */ -const de_ClipRange = (output: any, context: __SerdeContext): ClipRange => { - return { - EndOffsetMillis: __expectLong(output.EndOffsetMillis), - } as any; -}; - -/** - * deserializeAws_restJson1ConfigurationAliasesResponse - */ -const de_ConfigurationAliasesResponse = ( - output: any, - context: __SerdeContext -): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de___mapOf__string(value, context); - return acc; - }, {}); + return take(output, { + Arn: __expectString, + ChannelName: __expectString, + ChannelState: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FillerSlate: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogConfiguration: _json, + Outputs: _json, + PlaybackMode: __expectString, + Tags: [, _json, `tags`], + Tier: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DashConfiguration - */ -const de_DashConfiguration = (output: any, context: __SerdeContext): DashConfiguration => { - return { - ManifestEndpointPrefix: __expectString(output.ManifestEndpointPrefix), - MpdLocation: __expectString(output.MpdLocation), - OriginManifestType: __expectString(output.OriginManifestType), - } as any; -}; +// de_ClipRange omitted. -/** - * deserializeAws_restJson1DashPlaylistSettings - */ -const de_DashPlaylistSettings = (output: any, context: __SerdeContext): DashPlaylistSettings => { - return { - ManifestWindowSeconds: __expectInt32(output.ManifestWindowSeconds), - MinBufferTimeSeconds: __expectInt32(output.MinBufferTimeSeconds), - MinUpdatePeriodSeconds: __expectInt32(output.MinUpdatePeriodSeconds), - SuggestedPresentationDelaySeconds: __expectInt32(output.SuggestedPresentationDelaySeconds), - } as any; -}; +// de_ConfigurationAliasesResponse omitted. -/** - * deserializeAws_restJson1DefaultSegmentDeliveryConfiguration - */ -const de_DefaultSegmentDeliveryConfiguration = ( - output: any, - context: __SerdeContext -): DefaultSegmentDeliveryConfiguration => { - return { - BaseUrl: __expectString(output.BaseUrl), - } as any; -}; +// de_DashConfiguration omitted. -/** - * deserializeAws_restJson1HlsConfiguration - */ -const de_HlsConfiguration = (output: any, context: __SerdeContext): HlsConfiguration => { - return { - ManifestEndpointPrefix: __expectString(output.ManifestEndpointPrefix), - } as any; -}; +// de_DashPlaylistSettings omitted. -/** - * deserializeAws_restJson1HlsPlaylistSettings - */ -const de_HlsPlaylistSettings = (output: any, context: __SerdeContext): HlsPlaylistSettings => { - return { - ManifestWindowSeconds: __expectInt32(output.ManifestWindowSeconds), - } as any; -}; +// de_DefaultSegmentDeliveryConfiguration omitted. -/** - * deserializeAws_restJson1HttpConfiguration - */ -const de_HttpConfiguration = (output: any, context: __SerdeContext): HttpConfiguration => { - return { - BaseUrl: __expectString(output.BaseUrl), - } as any; -}; +// de_HlsConfiguration omitted. -/** - * deserializeAws_restJson1HttpPackageConfiguration - */ -const de_HttpPackageConfiguration = (output: any, context: __SerdeContext): HttpPackageConfiguration => { - return { - Path: __expectString(output.Path), - SourceGroup: __expectString(output.SourceGroup), - Type: __expectString(output.Type), - } as any; -}; +// de_HlsPlaylistSettings omitted. -/** - * deserializeAws_restJson1HttpPackageConfigurations - */ -const de_HttpPackageConfigurations = (output: any, context: __SerdeContext): HttpPackageConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpPackageConfiguration(entry, context); - }); - return retVal; -}; +// de_HttpConfiguration omitted. -/** - * deserializeAws_restJson1LivePreRollConfiguration - */ -const de_LivePreRollConfiguration = (output: any, context: __SerdeContext): LivePreRollConfiguration => { - return { - AdDecisionServerUrl: __expectString(output.AdDecisionServerUrl), - MaxDurationSeconds: __expectInt32(output.MaxDurationSeconds), - } as any; -}; +// de_HttpPackageConfiguration omitted. + +// de_HttpPackageConfigurations omitted. + +// de_LivePreRollConfiguration omitted. /** * deserializeAws_restJson1LiveSource */ const de_LiveSource = (output: any, context: __SerdeContext): LiveSource => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HttpPackageConfigurations: - output.HttpPackageConfigurations != null - ? de_HttpPackageConfigurations(output.HttpPackageConfigurations, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LiveSourceName: __expectString(output.LiveSourceName), - SourceLocationName: __expectString(output.SourceLocationName), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LiveSourceName: __expectString, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1LogConfiguration - */ -const de_LogConfiguration = (output: any, context: __SerdeContext): LogConfiguration => { - return { - PercentEnabled: __expectInt32(output.PercentEnabled), - } as any; -}; +// de_LogConfiguration omitted. -/** - * deserializeAws_restJson1LogConfigurationForChannel - */ -const de_LogConfigurationForChannel = (output: any, context: __SerdeContext): LogConfigurationForChannel => { - return { - LogTypes: output.LogTypes != null ? de_LogTypes(output.LogTypes, context) : undefined, - } as any; -}; +// de_LogConfigurationForChannel omitted. -/** - * deserializeAws_restJson1LogTypes - */ -const de_LogTypes = (output: any, context: __SerdeContext): (LogType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LogTypes omitted. -/** - * deserializeAws_restJson1ManifestProcessingRules - */ -const de_ManifestProcessingRules = (output: any, context: __SerdeContext): ManifestProcessingRules => { - return { - AdMarkerPassthrough: - output.AdMarkerPassthrough != null ? de_AdMarkerPassthrough(output.AdMarkerPassthrough, context) : undefined, - } as any; -}; +// de_ManifestProcessingRules omitted. /** * deserializeAws_restJson1PlaybackConfiguration */ const de_PlaybackConfiguration = (output: any, context: __SerdeContext): PlaybackConfiguration => { - return { - AdDecisionServerUrl: __expectString(output.AdDecisionServerUrl), - AvailSuppression: - output.AvailSuppression != null ? de_AvailSuppression(output.AvailSuppression, context) : undefined, - Bumper: output.Bumper != null ? de_Bumper(output.Bumper, context) : undefined, - CdnConfiguration: - output.CdnConfiguration != null ? de_CdnConfiguration(output.CdnConfiguration, context) : undefined, - ConfigurationAliases: - output.ConfigurationAliases != null - ? de_ConfigurationAliasesResponse(output.ConfigurationAliases, context) - : undefined, - DashConfiguration: - output.DashConfiguration != null ? de_DashConfiguration(output.DashConfiguration, context) : undefined, - HlsConfiguration: - output.HlsConfiguration != null ? de_HlsConfiguration(output.HlsConfiguration, context) : undefined, - LivePreRollConfiguration: - output.LivePreRollConfiguration != null - ? de_LivePreRollConfiguration(output.LivePreRollConfiguration, context) - : undefined, - LogConfiguration: - output.LogConfiguration != null ? de_LogConfiguration(output.LogConfiguration, context) : undefined, - ManifestProcessingRules: - output.ManifestProcessingRules != null - ? de_ManifestProcessingRules(output.ManifestProcessingRules, context) - : undefined, - Name: __expectString(output.Name), - PersonalizationThresholdSeconds: __expectInt32(output.PersonalizationThresholdSeconds), - PlaybackConfigurationArn: __expectString(output.PlaybackConfigurationArn), - PlaybackEndpointPrefix: __expectString(output.PlaybackEndpointPrefix), - SessionInitializationEndpointPrefix: __expectString(output.SessionInitializationEndpointPrefix), - SlateAdUrl: __expectString(output.SlateAdUrl), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - TranscodeProfileName: __expectString(output.TranscodeProfileName), - VideoContentSourceUrl: __expectString(output.VideoContentSourceUrl), - } as any; + return take(output, { + AdDecisionServerUrl: __expectString, + AvailSuppression: _json, + Bumper: _json, + CdnConfiguration: _json, + ConfigurationAliases: _json, + DashConfiguration: _json, + HlsConfiguration: _json, + LivePreRollConfiguration: _json, + LogConfiguration: _json, + ManifestProcessingRules: _json, + Name: __expectString, + PersonalizationThresholdSeconds: __expectInt32, + PlaybackConfigurationArn: __expectString, + PlaybackEndpointPrefix: __expectString, + SessionInitializationEndpointPrefix: __expectString, + SlateAdUrl: __expectString, + Tags: [, _json, `tags`], + TranscodeProfileName: __expectString, + VideoContentSourceUrl: __expectString, + }) as any; }; /** * deserializeAws_restJson1PrefetchConsumption */ const de_PrefetchConsumption = (output: any, context: __SerdeContext): PrefetchConsumption => { - return { - AvailMatchingCriteria: - output.AvailMatchingCriteria != null - ? de___listOfAvailMatchingCriteria(output.AvailMatchingCriteria, context) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + AvailMatchingCriteria: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1PrefetchRetrieval */ const de_PrefetchRetrieval = (output: any, context: __SerdeContext): PrefetchRetrieval => { - return { - DynamicVariables: - output.DynamicVariables != null ? de___mapOf__string(output.DynamicVariables, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + DynamicVariables: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1PrefetchSchedule */ const de_PrefetchSchedule = (output: any, context: __SerdeContext): PrefetchSchedule => { - return { - Arn: __expectString(output.Arn), - Consumption: output.Consumption != null ? de_PrefetchConsumption(output.Consumption, context) : undefined, - Name: __expectString(output.Name), - PlaybackConfigurationName: __expectString(output.PlaybackConfigurationName), - Retrieval: output.Retrieval != null ? de_PrefetchRetrieval(output.Retrieval, context) : undefined, - StreamId: __expectString(output.StreamId), - } as any; + return take(output, { + Arn: __expectString, + Consumption: (_: any) => de_PrefetchConsumption(_, context), + Name: __expectString, + PlaybackConfigurationName: __expectString, + Retrieval: (_: any) => de_PrefetchRetrieval(_, context), + StreamId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ResponseOutputItem - */ -const de_ResponseOutputItem = (output: any, context: __SerdeContext): ResponseOutputItem => { - return { - DashPlaylistSettings: - output.DashPlaylistSettings != null ? de_DashPlaylistSettings(output.DashPlaylistSettings, context) : undefined, - HlsPlaylistSettings: - output.HlsPlaylistSettings != null ? de_HlsPlaylistSettings(output.HlsPlaylistSettings, context) : undefined, - ManifestName: __expectString(output.ManifestName), - PlaybackUrl: __expectString(output.PlaybackUrl), - SourceGroup: __expectString(output.SourceGroup), - } as any; -}; +// de_ResponseOutputItem omitted. -/** - * deserializeAws_restJson1ResponseOutputs - */ -const de_ResponseOutputs = (output: any, context: __SerdeContext): ResponseOutputItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResponseOutputItem(entry, context); - }); - return retVal; -}; +// de_ResponseOutputs omitted. /** * deserializeAws_restJson1ScheduleAdBreak */ const de_ScheduleAdBreak = (output: any, context: __SerdeContext): ScheduleAdBreak => { - return { - ApproximateDurationSeconds: __expectLong(output.ApproximateDurationSeconds), - ApproximateStartTime: - output.ApproximateStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApproximateStartTime))) - : undefined, - SourceLocationName: __expectString(output.SourceLocationName), - VodSourceName: __expectString(output.VodSourceName), - } as any; + return take(output, { + ApproximateDurationSeconds: __expectLong, + ApproximateStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + VodSourceName: __expectString, + }) as any; }; /** * deserializeAws_restJson1ScheduleEntry */ const de_ScheduleEntry = (output: any, context: __SerdeContext): ScheduleEntry => { - return { - ApproximateDurationSeconds: __expectLong(output.ApproximateDurationSeconds), - ApproximateStartTime: - output.ApproximateStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApproximateStartTime))) - : undefined, - Arn: __expectString(output.Arn), - ChannelName: __expectString(output.ChannelName), - LiveSourceName: __expectString(output.LiveSourceName), - ProgramName: __expectString(output.ProgramName), - ScheduleAdBreaks: - output.ScheduleAdBreaks != null ? de___listOfScheduleAdBreak(output.ScheduleAdBreaks, context) : undefined, - ScheduleEntryType: __expectString(output.ScheduleEntryType), - SourceLocationName: __expectString(output.SourceLocationName), - VodSourceName: __expectString(output.VodSourceName), - } as any; + return take(output, { + ApproximateDurationSeconds: __expectLong, + ApproximateStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Arn: __expectString, + ChannelName: __expectString, + LiveSourceName: __expectString, + ProgramName: __expectString, + ScheduleAdBreaks: (_: any) => de___listOfScheduleAdBreak(_, context), + ScheduleEntryType: __expectString, + SourceLocationName: __expectString, + VodSourceName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SecretsManagerAccessTokenConfiguration - */ -const de_SecretsManagerAccessTokenConfiguration = ( - output: any, - context: __SerdeContext -): SecretsManagerAccessTokenConfiguration => { - return { - HeaderName: __expectString(output.HeaderName), - SecretArn: __expectString(output.SecretArn), - SecretStringKey: __expectString(output.SecretStringKey), - } as any; -}; +// de_SecretsManagerAccessTokenConfiguration omitted. -/** - * deserializeAws_restJson1SegmentationDescriptor - */ -const de_SegmentationDescriptor = (output: any, context: __SerdeContext): SegmentationDescriptor => { - return { - SegmentNum: __expectInt32(output.SegmentNum), - SegmentationEventId: __expectInt32(output.SegmentationEventId), - SegmentationTypeId: __expectInt32(output.SegmentationTypeId), - SegmentationUpid: __expectString(output.SegmentationUpid), - SegmentationUpidType: __expectInt32(output.SegmentationUpidType), - SegmentsExpected: __expectInt32(output.SegmentsExpected), - SubSegmentNum: __expectInt32(output.SubSegmentNum), - SubSegmentsExpected: __expectInt32(output.SubSegmentsExpected), - } as any; -}; +// de_SegmentationDescriptor omitted. -/** - * deserializeAws_restJson1SegmentationDescriptorList - */ -const de_SegmentationDescriptorList = (output: any, context: __SerdeContext): SegmentationDescriptor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SegmentationDescriptor(entry, context); - }); - return retVal; -}; +// de_SegmentationDescriptorList omitted. -/** - * deserializeAws_restJson1SegmentDeliveryConfiguration - */ -const de_SegmentDeliveryConfiguration = (output: any, context: __SerdeContext): SegmentDeliveryConfiguration => { - return { - BaseUrl: __expectString(output.BaseUrl), - Name: __expectString(output.Name), - } as any; -}; +// de_SegmentDeliveryConfiguration omitted. -/** - * deserializeAws_restJson1SlateSource - */ -const de_SlateSource = (output: any, context: __SerdeContext): SlateSource => { - return { - SourceLocationName: __expectString(output.SourceLocationName), - VodSourceName: __expectString(output.VodSourceName), - } as any; -}; +// de_SlateSource omitted. /** * deserializeAws_restJson1SourceLocation */ const de_SourceLocation = (output: any, context: __SerdeContext): SourceLocation => { - return { - AccessConfiguration: - output.AccessConfiguration != null ? de_AccessConfiguration(output.AccessConfiguration, context) : undefined, - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DefaultSegmentDeliveryConfiguration: - output.DefaultSegmentDeliveryConfiguration != null - ? de_DefaultSegmentDeliveryConfiguration(output.DefaultSegmentDeliveryConfiguration, context) - : undefined, - HttpConfiguration: - output.HttpConfiguration != null ? de_HttpConfiguration(output.HttpConfiguration, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SegmentDeliveryConfigurations: - output.SegmentDeliveryConfigurations != null - ? de___listOfSegmentDeliveryConfiguration(output.SegmentDeliveryConfigurations, context) - : undefined, - SourceLocationName: __expectString(output.SourceLocationName), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1SpliceInsertMessage - */ -const de_SpliceInsertMessage = (output: any, context: __SerdeContext): SpliceInsertMessage => { - return { - AvailNum: __expectInt32(output.AvailNum), - AvailsExpected: __expectInt32(output.AvailsExpected), - SpliceEventId: __expectInt32(output.SpliceEventId), - UniqueProgramId: __expectInt32(output.UniqueProgramId), - } as any; -}; - -/** - * deserializeAws_restJson1TimeSignalMessage - */ -const de_TimeSignalMessage = (output: any, context: __SerdeContext): TimeSignalMessage => { - return { - SegmentationDescriptors: - output.SegmentationDescriptors != null - ? de_SegmentationDescriptorList(output.SegmentationDescriptors, context) - : undefined, - } as any; + return take(output, { + AccessConfiguration: _json, + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultSegmentDeliveryConfiguration: _json, + HttpConfiguration: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SegmentDeliveryConfigurations: _json, + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + }) as any; }; +// de_SpliceInsertMessage omitted. + +// de_TimeSignalMessage omitted. + /** * deserializeAws_restJson1VodSource */ const de_VodSource = (output: any, context: __SerdeContext): VodSource => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HttpPackageConfigurations: - output.HttpPackageConfigurations != null - ? de_HttpPackageConfigurations(output.HttpPackageConfigurations, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SourceLocationName: __expectString(output.SourceLocationName), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - VodSourceName: __expectString(output.VodSourceName), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HttpPackageConfigurations: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SourceLocationName: __expectString, + Tags: [, _json, `tags`], + VodSourceName: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-memorydb/src/protocols/Aws_json1_1.ts b/clients/client-memorydb/src/protocols/Aws_json1_1.ts index 800bf1c58bdc..4fd633bb1faa 100644 --- a/clients/client-memorydb/src/protocols/Aws_json1_1.ts +++ b/clients/client-memorydb/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -94,16 +96,11 @@ import { UpdateSubnetGroupCommandInput, UpdateSubnetGroupCommandOutput } from ". import { UpdateUserCommandInput, UpdateUserCommandOutput } from "../commands/UpdateUserCommand"; import { MemoryDBServiceException as __BaseException } from "../models/MemoryDBServiceException"; import { - ACL, ACLAlreadyExistsFault, ACLNotFoundFault, - ACLPendingChanges, ACLQuotaExceededFault, - ACLsUpdateStatus, APICallRateForCustomerExceededFault, - Authentication, AuthenticationMode, - AvailabilityZone, BatchUpdateClusterRequest, BatchUpdateClusterResponse, Cluster, @@ -115,42 +112,30 @@ import { CopySnapshotRequest, CopySnapshotResponse, CreateACLRequest, - CreateACLResponse, CreateClusterRequest, CreateClusterResponse, CreateParameterGroupRequest, - CreateParameterGroupResponse, CreateSnapshotRequest, CreateSnapshotResponse, CreateSubnetGroupRequest, - CreateSubnetGroupResponse, CreateUserRequest, - CreateUserResponse, DefaultUserRequired, DeleteACLRequest, - DeleteACLResponse, DeleteClusterRequest, DeleteClusterResponse, DeleteParameterGroupRequest, - DeleteParameterGroupResponse, DeleteSnapshotRequest, DeleteSnapshotResponse, DeleteSubnetGroupRequest, - DeleteSubnetGroupResponse, DeleteUserRequest, - DeleteUserResponse, DescribeACLsRequest, - DescribeACLsResponse, DescribeClustersRequest, DescribeClustersResponse, DescribeEngineVersionsRequest, - DescribeEngineVersionsResponse, DescribeEventsRequest, DescribeEventsResponse, DescribeParameterGroupsRequest, - DescribeParameterGroupsResponse, DescribeParametersRequest, - DescribeParametersResponse, DescribeReservedNodesOfferingsRequest, DescribeReservedNodesOfferingsResponse, DescribeReservedNodesRequest, @@ -160,12 +145,8 @@ import { DescribeSnapshotsRequest, DescribeSnapshotsResponse, DescribeSubnetGroupsRequest, - DescribeSubnetGroupsResponse, DescribeUsersRequest, - DescribeUsersResponse, DuplicateUserNameFault, - Endpoint, - EngineVersionInfo, Event, FailoverShardRequest, FailoverShardResponse, @@ -185,20 +166,15 @@ import { InvalidUserStateFault, InvalidVPCNetworkStateFault, ListAllowedNodeTypeUpdatesRequest, - ListAllowedNodeTypeUpdatesResponse, ListTagsRequest, - ListTagsResponse, Node, NodeQuotaForClusterExceededFault, NodeQuotaForCustomerExceededFault, NoOperationFault, - Parameter, - ParameterGroup, ParameterGroupAlreadyExistsFault, ParameterGroupNotFoundFault, ParameterGroupQuotaExceededFault, ParameterNameValue, - PendingModifiedServiceUpdate, PurchaseReservedNodesOfferingRequest, PurchaseReservedNodesOfferingResponse, RecurringCharge, @@ -210,16 +186,13 @@ import { ReservedNodesOffering, ReservedNodesOfferingNotFoundFault, ResetParameterGroupRequest, - ResetParameterGroupResponse, ReshardingStatus, - SecurityGroupMembership, ServiceLinkedRoleNotFoundFault, ServiceUpdate, ServiceUpdateNotFoundFault, ServiceUpdateRequest, ServiceUpdateStatus, Shard, - ShardConfiguration, ShardConfigurationRequest, ShardDetail, ShardNotFoundFault, @@ -229,8 +202,6 @@ import { SnapshotAlreadyExistsFault, SnapshotNotFoundFault, SnapshotQuotaExceededFault, - Subnet, - SubnetGroup, SubnetGroupAlreadyExistsFault, SubnetGroupInUseFault, SubnetGroupNotFoundFault, @@ -242,22 +213,14 @@ import { TagNotFoundFault, TagQuotaPerResourceExceeded, TagResourceRequest, - TagResourceResponse, TestFailoverNotAvailableFault, - UnprocessedCluster, UntagResourceRequest, - UntagResourceResponse, UpdateACLRequest, - UpdateACLResponse, UpdateClusterRequest, UpdateClusterResponse, UpdateParameterGroupRequest, - UpdateParameterGroupResponse, UpdateSubnetGroupRequest, - UpdateSubnetGroupResponse, UpdateUserRequest, - UpdateUserResponse, - User, UserAlreadyExistsFault, UserNotFoundFault, UserQuotaExceededFault, @@ -272,7 +235,7 @@ export const se_BatchUpdateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchUpdateCluster"); let body: any; - body = JSON.stringify(se_BatchUpdateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -285,7 +248,7 @@ export const se_CopySnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CopySnapshot"); let body: any; - body = JSON.stringify(se_CopySnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -298,7 +261,7 @@ export const se_CreateACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateACL"); let body: any; - body = JSON.stringify(se_CreateACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -311,7 +274,7 @@ export const se_CreateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCluster"); let body: any; - body = JSON.stringify(se_CreateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +287,7 @@ export const se_CreateParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateParameterGroup"); let body: any; - body = JSON.stringify(se_CreateParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +300,7 @@ export const se_CreateSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSnapshot"); let body: any; - body = JSON.stringify(se_CreateSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +313,7 @@ export const se_CreateSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSubnetGroup"); let body: any; - body = JSON.stringify(se_CreateSubnetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +326,7 @@ export const se_CreateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUser"); let body: any; - body = JSON.stringify(se_CreateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +339,7 @@ export const se_DeleteACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteACL"); let body: any; - body = JSON.stringify(se_DeleteACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +352,7 @@ export const se_DeleteClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCluster"); let body: any; - body = JSON.stringify(se_DeleteClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +365,7 @@ export const se_DeleteParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteParameterGroup"); let body: any; - body = JSON.stringify(se_DeleteParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +378,7 @@ export const se_DeleteSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSnapshot"); let body: any; - body = JSON.stringify(se_DeleteSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -428,7 +391,7 @@ export const se_DeleteSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSubnetGroup"); let body: any; - body = JSON.stringify(se_DeleteSubnetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,7 +404,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -454,7 +417,7 @@ export const se_DescribeACLsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeACLs"); let body: any; - body = JSON.stringify(se_DescribeACLsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -467,7 +430,7 @@ export const se_DescribeClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClusters"); let body: any; - body = JSON.stringify(se_DescribeClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -480,7 +443,7 @@ export const se_DescribeEngineVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEngineVersions"); let body: any; - body = JSON.stringify(se_DescribeEngineVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -506,7 +469,7 @@ export const se_DescribeParameterGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeParameterGroups"); let body: any; - body = JSON.stringify(se_DescribeParameterGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -519,7 +482,7 @@ export const se_DescribeParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeParameters"); let body: any; - body = JSON.stringify(se_DescribeParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -532,7 +495,7 @@ export const se_DescribeReservedNodesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReservedNodes"); let body: any; - body = JSON.stringify(se_DescribeReservedNodesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +508,7 @@ export const se_DescribeReservedNodesOfferingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReservedNodesOfferings"); let body: any; - body = JSON.stringify(se_DescribeReservedNodesOfferingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -558,7 +521,7 @@ export const se_DescribeServiceUpdatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServiceUpdates"); let body: any; - body = JSON.stringify(se_DescribeServiceUpdatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -571,7 +534,7 @@ export const se_DescribeSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSnapshots"); let body: any; - body = JSON.stringify(se_DescribeSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +547,7 @@ export const se_DescribeSubnetGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSubnetGroups"); let body: any; - body = JSON.stringify(se_DescribeSubnetGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +560,7 @@ export const se_DescribeUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUsers"); let body: any; - body = JSON.stringify(se_DescribeUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +573,7 @@ export const se_FailoverShardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("FailoverShard"); let body: any; - body = JSON.stringify(se_FailoverShardRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -623,7 +586,7 @@ export const se_ListAllowedNodeTypeUpdatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAllowedNodeTypeUpdates"); let body: any; - body = JSON.stringify(se_ListAllowedNodeTypeUpdatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -636,7 +599,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +612,7 @@ export const se_PurchaseReservedNodesOfferingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PurchaseReservedNodesOffering"); let body: any; - body = JSON.stringify(se_PurchaseReservedNodesOfferingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +625,7 @@ export const se_ResetParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetParameterGroup"); let body: any; - body = JSON.stringify(se_ResetParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -675,7 +638,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -688,7 +651,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -701,7 +664,7 @@ export const se_UpdateACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateACL"); let body: any; - body = JSON.stringify(se_UpdateACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -714,7 +677,7 @@ export const se_UpdateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCluster"); let body: any; - body = JSON.stringify(se_UpdateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -727,7 +690,7 @@ export const se_UpdateParameterGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateParameterGroup"); let body: any; - body = JSON.stringify(se_UpdateParameterGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -740,7 +703,7 @@ export const se_UpdateSubnetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSubnetGroup"); let body: any; - body = JSON.stringify(se_UpdateSubnetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -753,7 +716,7 @@ export const se_UpdateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUser"); let body: any; - body = JSON.stringify(se_UpdateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -774,7 +737,7 @@ export const de_BatchUpdateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -798,10 +761,9 @@ const de_BatchUpdateClusterCommandError = async ( throw await de_ServiceUpdateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -824,7 +786,7 @@ export const de_CopySnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -866,10 +828,9 @@ const de_CopySnapshotCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -887,12 +848,12 @@ export const de_CreateACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateACLResponse(data, context); + contents = _json(data); const response: CreateACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -931,10 +892,9 @@ const de_CreateACLCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -957,7 +917,7 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1023,10 +983,9 @@ const de_CreateClusterCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1044,12 +1003,12 @@ export const de_CreateParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateParameterGroupResponse(data, context); + contents = _json(data); const response: CreateParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1088,10 +1047,9 @@ const de_CreateParameterGroupCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1114,7 +1072,7 @@ export const de_CreateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1156,10 +1114,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1177,12 +1134,12 @@ export const de_CreateSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSubnetGroupResponse(data, context); + contents = _json(data); const response: CreateSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1221,10 +1178,9 @@ const de_CreateSubnetGroupCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1242,12 +1198,12 @@ export const de_CreateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserResponse(data, context); + contents = _json(data); const response: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1283,10 +1239,9 @@ const de_CreateUserCommandError = async ( throw await de_UserQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1304,12 +1259,12 @@ export const de_DeleteACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteACLResponse(data, context); + contents = _json(data); const response: DeleteACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1336,10 +1291,9 @@ const de_DeleteACLCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1362,7 +1316,7 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1398,10 +1352,9 @@ const de_DeleteClusterCommandError = async ( throw await de_SnapshotAlreadyExistsFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1419,12 +1372,12 @@ export const de_DeleteParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteParameterGroupResponse(data, context); + contents = _json(data); const response: DeleteParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1457,10 +1410,9 @@ const de_DeleteParameterGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1483,7 +1435,7 @@ export const de_DeleteSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1516,10 +1468,9 @@ const de_DeleteSnapshotCommandError = async ( throw await de_SnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1537,12 +1488,12 @@ export const de_DeleteSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSubnetGroupResponse(data, context); + contents = _json(data); const response: DeleteSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1569,10 +1520,9 @@ const de_DeleteSubnetGroupCommandError = async ( throw await de_SubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1590,12 +1540,12 @@ export const de_DeleteUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserResponse(data, context); + contents = _json(data); const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1622,10 +1572,9 @@ const de_DeleteUserCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1643,12 +1592,12 @@ export const de_DescribeACLsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeACLsResponse(data, context); + contents = _json(data); const response: DescribeACLsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1672,10 +1621,9 @@ const de_DescribeACLsCommandError = async ( throw await de_InvalidParameterCombinationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1698,7 +1646,7 @@ export const de_DescribeClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1728,10 +1676,9 @@ const de_DescribeClustersCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1749,12 +1696,12 @@ export const de_DescribeEngineVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEngineVersionsResponse(data, context); + contents = _json(data); const response: DescribeEngineVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1781,10 +1728,9 @@ const de_DescribeEngineVersionsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1807,7 +1753,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1834,10 +1780,9 @@ const de_DescribeEventsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1855,12 +1800,12 @@ export const de_DescribeParameterGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeParameterGroupsResponse(data, context); + contents = _json(data); const response: DescribeParameterGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1890,10 +1835,9 @@ const de_DescribeParameterGroupsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1911,12 +1855,12 @@ export const de_DescribeParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeParametersResponse(data, context); + contents = _json(data); const response: DescribeParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1946,10 +1890,9 @@ const de_DescribeParametersCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1972,7 +1915,7 @@ export const de_DescribeReservedNodesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2002,10 +1945,9 @@ const de_DescribeReservedNodesCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,7 +1970,7 @@ export const de_DescribeReservedNodesOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2058,10 +2000,9 @@ const de_DescribeReservedNodesOfferingsCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,7 +2025,7 @@ export const de_DescribeServiceUpdatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2108,10 +2049,9 @@ const de_DescribeServiceUpdatesCommandError = async ( throw await de_InvalidParameterValueExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2134,7 +2074,7 @@ export const de_DescribeSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2164,10 +2104,9 @@ const de_DescribeSnapshotsCommandError = async ( throw await de_SnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2185,12 +2124,12 @@ export const de_DescribeSubnetGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSubnetGroupsResponse(data, context); + contents = _json(data); const response: DescribeSubnetGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2214,10 +2153,9 @@ const de_DescribeSubnetGroupsCommandError = async ( throw await de_SubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2235,12 +2173,12 @@ export const de_DescribeUsersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeUsersResponse(data, context); + contents = _json(data); const response: DescribeUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2264,10 +2202,9 @@ const de_DescribeUsersCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2290,7 +2227,7 @@ export const de_FailoverShardCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2332,10 +2269,9 @@ const de_FailoverShardCommandError = async ( throw await de_TestFailoverNotAvailableFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2353,12 +2289,12 @@ export const de_ListAllowedNodeTypeUpdatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAllowedNodeTypeUpdatesResponse(data, context); + contents = _json(data); const response: ListAllowedNodeTypeUpdatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2388,10 +2324,9 @@ const de_ListAllowedNodeTypeUpdatesCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2409,12 +2344,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResponse(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2459,10 +2394,9 @@ const de_ListTagsCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2485,7 +2419,7 @@ export const de_PurchaseReservedNodesOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2524,10 +2458,9 @@ const de_PurchaseReservedNodesOfferingCommandError = async ( throw await de_TagQuotaPerResourceExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2545,12 +2478,12 @@ export const de_ResetParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResetParameterGroupResponse(data, context); + contents = _json(data); const response: ResetParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2583,10 +2516,9 @@ const de_ResetParameterGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2604,12 +2536,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2657,10 +2589,9 @@ const de_TagResourceCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2678,12 +2609,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2731,10 +2662,9 @@ const de_UntagResourceCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2752,12 +2682,12 @@ export const de_UpdateACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateACLResponse(data, context); + contents = _json(data); const response: UpdateACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2796,10 +2726,9 @@ const de_UpdateACLCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2822,7 +2751,7 @@ export const de_UpdateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2888,10 +2817,9 @@ const de_UpdateClusterCommandError = async ( throw await de_ShardsPerClusterQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2909,12 +2837,12 @@ export const de_UpdateParameterGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateParameterGroupResponse(data, context); + contents = _json(data); const response: UpdateParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2947,10 +2875,9 @@ const de_UpdateParameterGroupCommandError = async ( throw await de_ServiceLinkedRoleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2968,12 +2895,12 @@ export const de_UpdateSubnetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSubnetGroupResponse(data, context); + contents = _json(data); const response: UpdateSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3009,10 +2936,9 @@ const de_UpdateSubnetGroupCommandError = async ( throw await de_SubnetQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3030,12 +2956,12 @@ export const de_UpdateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserResponse(data, context); + contents = _json(data); const response: UpdateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3065,10 +2991,9 @@ const de_UpdateUserCommandError = async ( throw await de_UserNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3082,7 +3007,7 @@ const de_ACLAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ACLAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ACLAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3095,7 +3020,7 @@ const de_ACLAlreadyExistsFaultRes = async ( */ const de_ACLNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ACLNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ACLNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3111,7 +3036,7 @@ const de_ACLQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ACLQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ACLQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3127,7 +3052,7 @@ const de_APICallRateForCustomerExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_APICallRateForCustomerExceededFault(body, context); + const deserialized: any = _json(body); const exception = new APICallRateForCustomerExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3143,7 +3068,7 @@ const de_ClusterAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ClusterAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3159,7 +3084,7 @@ const de_ClusterNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ClusterNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3175,7 +3100,7 @@ const de_ClusterQuotaForCustomerExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterQuotaForCustomerExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ClusterQuotaForCustomerExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3188,7 +3113,7 @@ const de_ClusterQuotaForCustomerExceededFaultRes = async ( */ const de_DefaultUserRequiredRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DefaultUserRequired(body, context); + const deserialized: any = _json(body); const exception = new DefaultUserRequired({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3204,7 +3129,7 @@ const de_DuplicateUserNameFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateUserNameFault(body, context); + const deserialized: any = _json(body); const exception = new DuplicateUserNameFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3220,7 +3145,7 @@ const de_InsufficientClusterCapacityFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientClusterCapacityFault(body, context); + const deserialized: any = _json(body); const exception = new InsufficientClusterCapacityFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3236,7 +3161,7 @@ const de_InvalidACLStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidACLStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidACLStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3249,7 +3174,7 @@ const de_InvalidACLStateFaultRes = async ( */ const de_InvalidARNFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidARNFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidARNFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3265,7 +3190,7 @@ const de_InvalidClusterStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidClusterStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidClusterStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3281,7 +3206,7 @@ const de_InvalidCredentialsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCredentialsException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCredentialsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3294,7 +3219,7 @@ const de_InvalidCredentialsExceptionRes = async ( */ const de_InvalidKMSKeyFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKMSKeyFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidKMSKeyFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3310,7 +3235,7 @@ const de_InvalidNodeStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNodeStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidNodeStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3326,7 +3251,7 @@ const de_InvalidParameterCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3342,7 +3267,7 @@ const de_InvalidParameterGroupStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterGroupStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterGroupStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3358,7 +3283,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3374,7 +3299,7 @@ const de_InvalidSnapshotStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSnapshotStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidSnapshotStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3387,7 +3312,7 @@ const de_InvalidSnapshotStateFaultRes = async ( */ const de_InvalidSubnetRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSubnet(body, context); + const deserialized: any = _json(body); const exception = new InvalidSubnet({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3403,7 +3328,7 @@ const de_InvalidUserStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUserStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidUserStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3419,7 +3344,7 @@ const de_InvalidVPCNetworkStateFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidVPCNetworkStateFault(body, context); + const deserialized: any = _json(body); const exception = new InvalidVPCNetworkStateFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3435,7 +3360,7 @@ const de_NodeQuotaForClusterExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NodeQuotaForClusterExceededFault(body, context); + const deserialized: any = _json(body); const exception = new NodeQuotaForClusterExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3451,7 +3376,7 @@ const de_NodeQuotaForCustomerExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NodeQuotaForCustomerExceededFault(body, context); + const deserialized: any = _json(body); const exception = new NodeQuotaForCustomerExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3464,7 +3389,7 @@ const de_NodeQuotaForCustomerExceededFaultRes = async ( */ const de_NoOperationFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoOperationFault(body, context); + const deserialized: any = _json(body); const exception = new NoOperationFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3480,7 +3405,7 @@ const de_ParameterGroupAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterGroupAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ParameterGroupAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3496,7 +3421,7 @@ const de_ParameterGroupNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterGroupNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ParameterGroupNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3512,7 +3437,7 @@ const de_ParameterGroupQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterGroupQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ParameterGroupQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3528,7 +3453,7 @@ const de_ReservedNodeAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReservedNodeAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new ReservedNodeAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3544,7 +3469,7 @@ const de_ReservedNodeNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReservedNodeNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ReservedNodeNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3560,7 +3485,7 @@ const de_ReservedNodeQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReservedNodeQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ReservedNodeQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3576,7 +3501,7 @@ const de_ReservedNodesOfferingNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReservedNodesOfferingNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ReservedNodesOfferingNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3592,7 +3517,7 @@ const de_ServiceLinkedRoleNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceLinkedRoleNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ServiceLinkedRoleNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3608,7 +3533,7 @@ const de_ServiceUpdateNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUpdateNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ServiceUpdateNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3621,7 +3546,7 @@ const de_ServiceUpdateNotFoundFaultRes = async ( */ const de_ShardNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ShardNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new ShardNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3637,7 +3562,7 @@ const de_ShardsPerClusterQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ShardsPerClusterQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new ShardsPerClusterQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3653,7 +3578,7 @@ const de_SnapshotAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SnapshotAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new SnapshotAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3669,7 +3594,7 @@ const de_SnapshotNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SnapshotNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new SnapshotNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3685,7 +3610,7 @@ const de_SnapshotQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SnapshotQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new SnapshotQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3701,7 +3626,7 @@ const de_SubnetGroupAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3717,7 +3642,7 @@ const de_SubnetGroupInUseFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupInUseFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupInUseFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3733,7 +3658,7 @@ const de_SubnetGroupNotFoundFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3749,7 +3674,7 @@ const de_SubnetGroupQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetGroupQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetGroupQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3762,7 +3687,7 @@ const de_SubnetGroupQuotaExceededFaultRes = async ( */ const de_SubnetInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetInUse(body, context); + const deserialized: any = _json(body); const exception = new SubnetInUse({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3778,7 +3703,7 @@ const de_SubnetNotAllowedFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetNotAllowedFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetNotAllowedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3794,7 +3719,7 @@ const de_SubnetQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubnetQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new SubnetQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3807,7 +3732,7 @@ const de_SubnetQuotaExceededFaultRes = async ( */ const de_TagNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new TagNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3823,7 +3748,7 @@ const de_TagQuotaPerResourceExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagQuotaPerResourceExceeded(body, context); + const deserialized: any = _json(body); const exception = new TagQuotaPerResourceExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3839,7 +3764,7 @@ const de_TestFailoverNotAvailableFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TestFailoverNotAvailableFault(body, context); + const deserialized: any = _json(body); const exception = new TestFailoverNotAvailableFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3855,7 +3780,7 @@ const de_UserAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new UserAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3868,7 +3793,7 @@ const de_UserAlreadyExistsFaultRes = async ( */ const de_UserNotFoundFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserNotFoundFault(body, context); + const deserialized: any = _json(body); const exception = new UserNotFoundFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3884,7 +3809,7 @@ const de_UserQuotaExceededFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UserQuotaExceededFault(body, context); + const deserialized: any = _json(body); const exception = new UserQuotaExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3892,910 +3817,225 @@ const de_UserQuotaExceededFaultRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AuthenticationMode - */ -const se_AuthenticationMode = (input: AuthenticationMode, context: __SerdeContext): any => { - return { - ...(input.Passwords != null && { Passwords: se_PasswordListInput(input.Passwords, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AuthenticationMode omitted. -/** - * serializeAws_json1_1BatchUpdateClusterRequest - */ -const se_BatchUpdateClusterRequest = (input: BatchUpdateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterNames != null && { ClusterNames: se_ClusterNameList(input.ClusterNames, context) }), - ...(input.ServiceUpdate != null && { ServiceUpdate: se_ServiceUpdateRequest(input.ServiceUpdate, context) }), - }; -}; +// se_BatchUpdateClusterRequest omitted. -/** - * serializeAws_json1_1ClusterNameList - */ -const se_ClusterNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ClusterNameList omitted. -/** - * serializeAws_json1_1CopySnapshotRequest - */ -const se_CopySnapshotRequest = (input: CopySnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.SourceSnapshotName != null && { SourceSnapshotName: input.SourceSnapshotName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetBucket != null && { TargetBucket: input.TargetBucket }), - ...(input.TargetSnapshotName != null && { TargetSnapshotName: input.TargetSnapshotName }), - }; -}; +// se_CopySnapshotRequest omitted. -/** - * serializeAws_json1_1CreateACLRequest - */ -const se_CreateACLRequest = (input: CreateACLRequest, context: __SerdeContext): any => { - return { - ...(input.ACLName != null && { ACLName: input.ACLName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserNames != null && { UserNames: se_UserNameListInput(input.UserNames, context) }), - }; -}; +// se_CreateACLRequest omitted. -/** - * serializeAws_json1_1CreateClusterRequest - */ -const se_CreateClusterRequest = (input: CreateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ACLName != null && { ACLName: input.ACLName }), - ...(input.AutoMinorVersionUpgrade != null && { AutoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.DataTiering != null && { DataTiering: input.DataTiering }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MaintenanceWindow != null && { MaintenanceWindow: input.MaintenanceWindow }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.NumReplicasPerShard != null && { NumReplicasPerShard: input.NumReplicasPerShard }), - ...(input.NumShards != null && { NumShards: input.NumShards }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdsList(input.SecurityGroupIds, context), - }), - ...(input.SnapshotArns != null && { SnapshotArns: se_SnapshotArnsList(input.SnapshotArns, context) }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - ...(input.SnapshotRetentionLimit != null && { SnapshotRetentionLimit: input.SnapshotRetentionLimit }), - ...(input.SnapshotWindow != null && { SnapshotWindow: input.SnapshotWindow }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - ...(input.TLSEnabled != null && { TLSEnabled: input.TLSEnabled }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateClusterRequest omitted. -/** - * serializeAws_json1_1CreateParameterGroupRequest - */ -const se_CreateParameterGroupRequest = (input: CreateParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Family != null && { Family: input.Family }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateParameterGroupRequest omitted. -/** - * serializeAws_json1_1CreateSnapshotRequest - */ -const se_CreateSnapshotRequest = (input: CreateSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateSubnetGroupRequest - */ -const se_CreateSubnetGroupRequest = (input: CreateSubnetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdentifierList(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateSubnetGroupRequest omitted. -/** - * serializeAws_json1_1CreateUserRequest - */ -const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { - return { - ...(input.AccessString != null && { AccessString: input.AccessString }), - ...(input.AuthenticationMode != null && { - AuthenticationMode: se_AuthenticationMode(input.AuthenticationMode, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_CreateUserRequest omitted. -/** - * serializeAws_json1_1DeleteACLRequest - */ -const se_DeleteACLRequest = (input: DeleteACLRequest, context: __SerdeContext): any => { - return { - ...(input.ACLName != null && { ACLName: input.ACLName }), - }; -}; +// se_DeleteACLRequest omitted. -/** - * serializeAws_json1_1DeleteClusterRequest - */ -const se_DeleteClusterRequest = (input: DeleteClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.FinalSnapshotName != null && { FinalSnapshotName: input.FinalSnapshotName }), - }; -}; +// se_DeleteClusterRequest omitted. -/** - * serializeAws_json1_1DeleteParameterGroupRequest - */ -const se_DeleteParameterGroupRequest = (input: DeleteParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - }; -}; +// se_DeleteParameterGroupRequest omitted. -/** - * serializeAws_json1_1DeleteSnapshotRequest - */ -const se_DeleteSnapshotRequest = (input: DeleteSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - }; -}; +// se_DeleteSnapshotRequest omitted. -/** - * serializeAws_json1_1DeleteSubnetGroupRequest - */ -const se_DeleteSubnetGroupRequest = (input: DeleteSubnetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - }; -}; +// se_DeleteSubnetGroupRequest omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DescribeACLsRequest - */ -const se_DescribeACLsRequest = (input: DescribeACLsRequest, context: __SerdeContext): any => { - return { - ...(input.ACLName != null && { ACLName: input.ACLName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeACLsRequest omitted. -/** - * serializeAws_json1_1DescribeClustersRequest - */ -const se_DescribeClustersRequest = (input: DescribeClustersRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ShowShardDetails != null && { ShowShardDetails: input.ShowShardDetails }), - }; -}; +// se_DescribeClustersRequest omitted. -/** - * serializeAws_json1_1DescribeEngineVersionsRequest - */ -const se_DescribeEngineVersionsRequest = (input: DescribeEngineVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultOnly != null && { DefaultOnly: input.DefaultOnly }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterGroupFamily != null && { ParameterGroupFamily: input.ParameterGroupFamily }), - }; -}; +// se_DescribeEngineVersionsRequest omitted. /** * serializeAws_json1_1DescribeEventsRequest */ const se_DescribeEventsRequest = (input: DescribeEventsRequest, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SourceName != null && { SourceName: input.SourceName }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + Duration: [], + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SourceName: [], + SourceType: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DescribeParameterGroupsRequest - */ -const se_DescribeParameterGroupsRequest = (input: DescribeParameterGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - }; -}; +// se_DescribeParameterGroupsRequest omitted. -/** - * serializeAws_json1_1DescribeParametersRequest - */ -const se_DescribeParametersRequest = (input: DescribeParametersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - }; -}; +// se_DescribeParametersRequest omitted. -/** - * serializeAws_json1_1DescribeReservedNodesOfferingsRequest - */ -const se_DescribeReservedNodesOfferingsRequest = ( - input: DescribeReservedNodesOfferingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.OfferingType != null && { OfferingType: input.OfferingType }), - ...(input.ReservedNodesOfferingId != null && { ReservedNodesOfferingId: input.ReservedNodesOfferingId }), - }; -}; +// se_DescribeReservedNodesOfferingsRequest omitted. -/** - * serializeAws_json1_1DescribeReservedNodesRequest - */ -const se_DescribeReservedNodesRequest = (input: DescribeReservedNodesRequest, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.OfferingType != null && { OfferingType: input.OfferingType }), - ...(input.ReservationId != null && { ReservationId: input.ReservationId }), - ...(input.ReservedNodesOfferingId != null && { ReservedNodesOfferingId: input.ReservedNodesOfferingId }), - }; -}; +// se_DescribeReservedNodesRequest omitted. -/** - * serializeAws_json1_1DescribeServiceUpdatesRequest - */ -const se_DescribeServiceUpdatesRequest = (input: DescribeServiceUpdatesRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterNames != null && { ClusterNames: se_ClusterNameList(input.ClusterNames, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceUpdateName != null && { ServiceUpdateName: input.ServiceUpdateName }), - ...(input.Status != null && { Status: se_ServiceUpdateStatusList(input.Status, context) }), - }; -}; +// se_DescribeServiceUpdatesRequest omitted. -/** - * serializeAws_json1_1DescribeSnapshotsRequest - */ -const se_DescribeSnapshotsRequest = (input: DescribeSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ShowDetail != null && { ShowDetail: input.ShowDetail }), - ...(input.SnapshotName != null && { SnapshotName: input.SnapshotName }), - ...(input.Source != null && { Source: input.Source }), - }; -}; +// se_DescribeSnapshotsRequest omitted. -/** - * serializeAws_json1_1DescribeSubnetGroupsRequest - */ -const se_DescribeSubnetGroupsRequest = (input: DescribeSubnetGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - }; -}; +// se_DescribeSubnetGroupsRequest omitted. -/** - * serializeAws_json1_1DescribeUsersRequest - */ -const se_DescribeUsersRequest = (input: DescribeUsersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; - -/** - * serializeAws_json1_1FailoverShardRequest - */ -const se_FailoverShardRequest = (input: FailoverShardRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.ShardName != null && { ShardName: input.ShardName }), - }; -}; - -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_DescribeUsersRequest omitted. -/** - * serializeAws_json1_1FilterValueList - */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FailoverShardRequest omitted. -/** - * serializeAws_json1_1KeyList - */ -const se_KeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Filter omitted. -/** - * serializeAws_json1_1ListAllowedNodeTypeUpdatesRequest - */ -const se_ListAllowedNodeTypeUpdatesRequest = ( - input: ListAllowedNodeTypeUpdatesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - }; -}; +// se_FilterList omitted. -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_FilterValueList omitted. -/** - * serializeAws_json1_1ParameterNameList - */ -const se_ParameterNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KeyList omitted. -/** - * serializeAws_json1_1ParameterNameValue - */ -const se_ParameterNameValue = (input: ParameterNameValue, context: __SerdeContext): any => { - return { - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.ParameterValue != null && { ParameterValue: input.ParameterValue }), - }; -}; +// se_ListAllowedNodeTypeUpdatesRequest omitted. -/** - * serializeAws_json1_1ParameterNameValueList - */ -const se_ParameterNameValueList = (input: ParameterNameValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterNameValue(entry, context); - }); -}; +// se_ListTagsRequest omitted. -/** - * serializeAws_json1_1PasswordListInput - */ -const se_PasswordListInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ParameterNameList omitted. -/** - * serializeAws_json1_1PurchaseReservedNodesOfferingRequest - */ -const se_PurchaseReservedNodesOfferingRequest = ( - input: PurchaseReservedNodesOfferingRequest, - context: __SerdeContext -): any => { - return { - ...(input.NodeCount != null && { NodeCount: input.NodeCount }), - ...(input.ReservationId != null && { ReservationId: input.ReservationId }), - ...(input.ReservedNodesOfferingId != null && { ReservedNodesOfferingId: input.ReservedNodesOfferingId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_ParameterNameValue omitted. -/** - * serializeAws_json1_1ReplicaConfigurationRequest - */ -const se_ReplicaConfigurationRequest = (input: ReplicaConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ReplicaCount != null && { ReplicaCount: input.ReplicaCount }), - }; -}; +// se_ParameterNameValueList omitted. -/** - * serializeAws_json1_1ResetParameterGroupRequest - */ -const se_ResetParameterGroupRequest = (input: ResetParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.AllParameters != null && { AllParameters: input.AllParameters }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.ParameterNames != null && { ParameterNames: se_ParameterNameList(input.ParameterNames, context) }), - }; -}; +// se_PasswordListInput omitted. -/** - * serializeAws_json1_1SecurityGroupIdsList - */ -const se_SecurityGroupIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PurchaseReservedNodesOfferingRequest omitted. -/** - * serializeAws_json1_1ServiceUpdateRequest - */ -const se_ServiceUpdateRequest = (input: ServiceUpdateRequest, context: __SerdeContext): any => { - return { - ...(input.ServiceUpdateNameToApply != null && { ServiceUpdateNameToApply: input.ServiceUpdateNameToApply }), - }; -}; +// se_ReplicaConfigurationRequest omitted. -/** - * serializeAws_json1_1ServiceUpdateStatusList - */ -const se_ServiceUpdateStatusList = (input: (ServiceUpdateStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResetParameterGroupRequest omitted. -/** - * serializeAws_json1_1ShardConfigurationRequest - */ -const se_ShardConfigurationRequest = (input: ShardConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ShardCount != null && { ShardCount: input.ShardCount }), - }; -}; +// se_SecurityGroupIdsList omitted. -/** - * serializeAws_json1_1SnapshotArnsList - */ -const se_SnapshotArnsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ServiceUpdateRequest omitted. -/** - * serializeAws_json1_1SubnetIdentifierList - */ -const se_SubnetIdentifierList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ServiceUpdateStatusList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ShardConfigurationRequest omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_SnapshotArnsList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_SubnetIdentifierList omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_KeyList(input.TagKeys, context) }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1UpdateACLRequest - */ -const se_UpdateACLRequest = (input: UpdateACLRequest, context: __SerdeContext): any => { - return { - ...(input.ACLName != null && { ACLName: input.ACLName }), - ...(input.UserNamesToAdd != null && { UserNamesToAdd: se_UserNameListInput(input.UserNamesToAdd, context) }), - ...(input.UserNamesToRemove != null && { - UserNamesToRemove: se_UserNameListInput(input.UserNamesToRemove, context), - }), - }; -}; +// se_TagList omitted. -/** - * serializeAws_json1_1UpdateClusterRequest - */ -const se_UpdateClusterRequest = (input: UpdateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ACLName != null && { ACLName: input.ACLName }), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.MaintenanceWindow != null && { MaintenanceWindow: input.MaintenanceWindow }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.ReplicaConfiguration != null && { - ReplicaConfiguration: se_ReplicaConfigurationRequest(input.ReplicaConfiguration, context), - }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_SecurityGroupIdsList(input.SecurityGroupIds, context), - }), - ...(input.ShardConfiguration != null && { - ShardConfiguration: se_ShardConfigurationRequest(input.ShardConfiguration, context), - }), - ...(input.SnapshotRetentionLimit != null && { SnapshotRetentionLimit: input.SnapshotRetentionLimit }), - ...(input.SnapshotWindow != null && { SnapshotWindow: input.SnapshotWindow }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SnsTopicStatus != null && { SnsTopicStatus: input.SnsTopicStatus }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateParameterGroupRequest - */ -const se_UpdateParameterGroupRequest = (input: UpdateParameterGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - ...(input.ParameterNameValues != null && { - ParameterNameValues: se_ParameterNameValueList(input.ParameterNameValues, context), - }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateSubnetGroupRequest - */ -const se_UpdateSubnetGroupRequest = (input: UpdateSubnetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.SubnetGroupName != null && { SubnetGroupName: input.SubnetGroupName }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIdentifierList(input.SubnetIds, context) }), - }; -}; +// se_UpdateACLRequest omitted. -/** - * serializeAws_json1_1UpdateUserRequest - */ -const se_UpdateUserRequest = (input: UpdateUserRequest, context: __SerdeContext): any => { - return { - ...(input.AccessString != null && { AccessString: input.AccessString }), - ...(input.AuthenticationMode != null && { - AuthenticationMode: se_AuthenticationMode(input.AuthenticationMode, context), - }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_UpdateClusterRequest omitted. -/** - * serializeAws_json1_1UserNameListInput - */ -const se_UserNameListInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdateParameterGroupRequest omitted. -/** - * deserializeAws_json1_1ACL - */ -const de_ACL = (output: any, context: __SerdeContext): ACL => { - return { - ARN: __expectString(output.ARN), - Clusters: output.Clusters != null ? de_ACLClusterNameList(output.Clusters, context) : undefined, - MinimumEngineVersion: __expectString(output.MinimumEngineVersion), - Name: __expectString(output.Name), - PendingChanges: output.PendingChanges != null ? de_ACLPendingChanges(output.PendingChanges, context) : undefined, - Status: __expectString(output.Status), - UserNames: output.UserNames != null ? de_UserNameList(output.UserNames, context) : undefined, - } as any; -}; +// se_UpdateSubnetGroupRequest omitted. -/** - * deserializeAws_json1_1ACLAlreadyExistsFault - */ -const de_ACLAlreadyExistsFault = (output: any, context: __SerdeContext): ACLAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateUserRequest omitted. -/** - * deserializeAws_json1_1ACLClusterNameList - */ -const de_ACLClusterNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UserNameListInput omitted. -/** - * deserializeAws_json1_1ACLList - */ -const de_ACLList = (output: any, context: __SerdeContext): ACL[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ACL(entry, context); - }); - return retVal; -}; +// de_ACL omitted. -/** - * deserializeAws_json1_1ACLNameList - */ -const de_ACLNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ACLAlreadyExistsFault omitted. -/** - * deserializeAws_json1_1ACLNotFoundFault - */ -const de_ACLNotFoundFault = (output: any, context: __SerdeContext): ACLNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ACLClusterNameList omitted. -/** - * deserializeAws_json1_1ACLPendingChanges - */ -const de_ACLPendingChanges = (output: any, context: __SerdeContext): ACLPendingChanges => { - return { - UserNamesToAdd: output.UserNamesToAdd != null ? de_UserNameList(output.UserNamesToAdd, context) : undefined, - UserNamesToRemove: - output.UserNamesToRemove != null ? de_UserNameList(output.UserNamesToRemove, context) : undefined, - } as any; -}; +// de_ACLList omitted. -/** - * deserializeAws_json1_1ACLQuotaExceededFault - */ -const de_ACLQuotaExceededFault = (output: any, context: __SerdeContext): ACLQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ACLNameList omitted. -/** - * deserializeAws_json1_1ACLsUpdateStatus - */ -const de_ACLsUpdateStatus = (output: any, context: __SerdeContext): ACLsUpdateStatus => { - return { - ACLToApply: __expectString(output.ACLToApply), - } as any; -}; +// de_ACLNotFoundFault omitted. -/** - * deserializeAws_json1_1APICallRateForCustomerExceededFault - */ -const de_APICallRateForCustomerExceededFault = ( - output: any, - context: __SerdeContext -): APICallRateForCustomerExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ACLPendingChanges omitted. -/** - * deserializeAws_json1_1Authentication - */ -const de_Authentication = (output: any, context: __SerdeContext): Authentication => { - return { - PasswordCount: __expectInt32(output.PasswordCount), - Type: __expectString(output.Type), - } as any; -}; +// de_ACLQuotaExceededFault omitted. -/** - * deserializeAws_json1_1AvailabilityZone - */ -const de_AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_ACLsUpdateStatus omitted. + +// de_APICallRateForCustomerExceededFault omitted. + +// de_Authentication omitted. + +// de_AvailabilityZone omitted. /** * deserializeAws_json1_1BatchUpdateClusterResponse */ const de_BatchUpdateClusterResponse = (output: any, context: __SerdeContext): BatchUpdateClusterResponse => { - return { - ProcessedClusters: output.ProcessedClusters != null ? de_ClusterList(output.ProcessedClusters, context) : undefined, - UnprocessedClusters: - output.UnprocessedClusters != null ? de_UnprocessedClusterList(output.UnprocessedClusters, context) : undefined, - } as any; + return take(output, { + ProcessedClusters: (_: any) => de_ClusterList(_, context), + UnprocessedClusters: _json, + }) as any; }; /** * deserializeAws_json1_1Cluster */ const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - ACLName: __expectString(output.ACLName), - ARN: __expectString(output.ARN), - AutoMinorVersionUpgrade: __expectBoolean(output.AutoMinorVersionUpgrade), - AvailabilityMode: __expectString(output.AvailabilityMode), - ClusterEndpoint: output.ClusterEndpoint != null ? de_Endpoint(output.ClusterEndpoint, context) : undefined, - DataTiering: __expectString(output.DataTiering), - Description: __expectString(output.Description), - EnginePatchVersion: __expectString(output.EnginePatchVersion), - EngineVersion: __expectString(output.EngineVersion), - KmsKeyId: __expectString(output.KmsKeyId), - MaintenanceWindow: __expectString(output.MaintenanceWindow), - Name: __expectString(output.Name), - NodeType: __expectString(output.NodeType), - NumberOfShards: __expectInt32(output.NumberOfShards), - ParameterGroupName: __expectString(output.ParameterGroupName), - ParameterGroupStatus: __expectString(output.ParameterGroupStatus), - PendingUpdates: - output.PendingUpdates != null ? de_ClusterPendingUpdates(output.PendingUpdates, context) : undefined, - SecurityGroups: - output.SecurityGroups != null ? de_SecurityGroupMembershipList(output.SecurityGroups, context) : undefined, - Shards: output.Shards != null ? de_ShardList(output.Shards, context) : undefined, - SnapshotRetentionLimit: __expectInt32(output.SnapshotRetentionLimit), - SnapshotWindow: __expectString(output.SnapshotWindow), - SnsTopicArn: __expectString(output.SnsTopicArn), - SnsTopicStatus: __expectString(output.SnsTopicStatus), - Status: __expectString(output.Status), - SubnetGroupName: __expectString(output.SubnetGroupName), - TLSEnabled: __expectBoolean(output.TLSEnabled), - } as any; -}; - -/** - * deserializeAws_json1_1ClusterAlreadyExistsFault - */ -const de_ClusterAlreadyExistsFault = (output: any, context: __SerdeContext): ClusterAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; + return take(output, { + ACLName: __expectString, + ARN: __expectString, + AutoMinorVersionUpgrade: __expectBoolean, + AvailabilityMode: __expectString, + ClusterEndpoint: _json, + DataTiering: __expectString, + Description: __expectString, + EnginePatchVersion: __expectString, + EngineVersion: __expectString, + KmsKeyId: __expectString, + MaintenanceWindow: __expectString, + Name: __expectString, + NodeType: __expectString, + NumberOfShards: __expectInt32, + ParameterGroupName: __expectString, + ParameterGroupStatus: __expectString, + PendingUpdates: (_: any) => de_ClusterPendingUpdates(_, context), + SecurityGroups: _json, + Shards: (_: any) => de_ShardList(_, context), + SnapshotRetentionLimit: __expectInt32, + SnapshotWindow: __expectString, + SnsTopicArn: __expectString, + SnsTopicStatus: __expectString, + Status: __expectString, + SubnetGroupName: __expectString, + TLSEnabled: __expectBoolean, + }) as any; +}; + +// de_ClusterAlreadyExistsFault omitted. /** * deserializeAws_json1_1ClusterConfiguration */ const de_ClusterConfiguration = (output: any, context: __SerdeContext): ClusterConfiguration => { - return { - Description: __expectString(output.Description), - EngineVersion: __expectString(output.EngineVersion), - MaintenanceWindow: __expectString(output.MaintenanceWindow), - Name: __expectString(output.Name), - NodeType: __expectString(output.NodeType), - NumShards: __expectInt32(output.NumShards), - ParameterGroupName: __expectString(output.ParameterGroupName), - Port: __expectInt32(output.Port), - Shards: output.Shards != null ? de_ShardDetails(output.Shards, context) : undefined, - SnapshotRetentionLimit: __expectInt32(output.SnapshotRetentionLimit), - SnapshotWindow: __expectString(output.SnapshotWindow), - SubnetGroupName: __expectString(output.SubnetGroupName), - TopicArn: __expectString(output.TopicArn), - VpcId: __expectString(output.VpcId), - } as any; + return take(output, { + Description: __expectString, + EngineVersion: __expectString, + MaintenanceWindow: __expectString, + Name: __expectString, + NodeType: __expectString, + NumShards: __expectInt32, + ParameterGroupName: __expectString, + Port: __expectInt32, + Shards: (_: any) => de_ShardDetails(_, context), + SnapshotRetentionLimit: __expectInt32, + SnapshotWindow: __expectString, + SubnetGroupName: __expectString, + TopicArn: __expectString, + VpcId: __expectString, + }) as any; }; /** @@ -4805,234 +4045,116 @@ const de_ClusterList = (output: any, context: __SerdeContext): Cluster[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Cluster(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ClusterNotFoundFault - */ -const de_ClusterNotFoundFault = (output: any, context: __SerdeContext): ClusterNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ClusterNotFoundFault omitted. /** * deserializeAws_json1_1ClusterPendingUpdates */ const de_ClusterPendingUpdates = (output: any, context: __SerdeContext): ClusterPendingUpdates => { - return { - ACLs: output.ACLs != null ? de_ACLsUpdateStatus(output.ACLs, context) : undefined, - Resharding: output.Resharding != null ? de_ReshardingStatus(output.Resharding, context) : undefined, - ServiceUpdates: - output.ServiceUpdates != null ? de_PendingModifiedServiceUpdateList(output.ServiceUpdates, context) : undefined, - } as any; + return take(output, { + ACLs: _json, + Resharding: (_: any) => de_ReshardingStatus(_, context), + ServiceUpdates: _json, + }) as any; }; -/** - * deserializeAws_json1_1ClusterQuotaForCustomerExceededFault - */ -const de_ClusterQuotaForCustomerExceededFault = ( - output: any, - context: __SerdeContext -): ClusterQuotaForCustomerExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ClusterQuotaForCustomerExceededFault omitted. /** * deserializeAws_json1_1CopySnapshotResponse */ const de_CopySnapshotResponse = (output: any, context: __SerdeContext): CopySnapshotResponse => { - return { - Snapshot: output.Snapshot != null ? de_Snapshot(output.Snapshot, context) : undefined, - } as any; + return take(output, { + Snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateACLResponse - */ -const de_CreateACLResponse = (output: any, context: __SerdeContext): CreateACLResponse => { - return { - ACL: output.ACL != null ? de_ACL(output.ACL, context) : undefined, - } as any; -}; +// de_CreateACLResponse omitted. /** * deserializeAws_json1_1CreateClusterResponse */ const de_CreateClusterResponse = (output: any, context: __SerdeContext): CreateClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateParameterGroupResponse - */ -const de_CreateParameterGroupResponse = (output: any, context: __SerdeContext): CreateParameterGroupResponse => { - return { - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroup(output.ParameterGroup, context) : undefined, - } as any; -}; +// de_CreateParameterGroupResponse omitted. /** * deserializeAws_json1_1CreateSnapshotResponse */ const de_CreateSnapshotResponse = (output: any, context: __SerdeContext): CreateSnapshotResponse => { - return { - Snapshot: output.Snapshot != null ? de_Snapshot(output.Snapshot, context) : undefined, - } as any; + return take(output, { + Snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateSubnetGroupResponse - */ -const de_CreateSubnetGroupResponse = (output: any, context: __SerdeContext): CreateSubnetGroupResponse => { - return { - SubnetGroup: output.SubnetGroup != null ? de_SubnetGroup(output.SubnetGroup, context) : undefined, - } as any; -}; +// de_CreateSubnetGroupResponse omitted. -/** - * deserializeAws_json1_1CreateUserResponse - */ -const de_CreateUserResponse = (output: any, context: __SerdeContext): CreateUserResponse => { - return { - User: output.User != null ? de_User(output.User, context) : undefined, - } as any; -}; +// de_CreateUserResponse omitted. -/** - * deserializeAws_json1_1DefaultUserRequired - */ -const de_DefaultUserRequired = (output: any, context: __SerdeContext): DefaultUserRequired => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DefaultUserRequired omitted. -/** - * deserializeAws_json1_1DeleteACLResponse - */ -const de_DeleteACLResponse = (output: any, context: __SerdeContext): DeleteACLResponse => { - return { - ACL: output.ACL != null ? de_ACL(output.ACL, context) : undefined, - } as any; -}; +// de_DeleteACLResponse omitted. /** * deserializeAws_json1_1DeleteClusterResponse */ const de_DeleteClusterResponse = (output: any, context: __SerdeContext): DeleteClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteParameterGroupResponse - */ -const de_DeleteParameterGroupResponse = (output: any, context: __SerdeContext): DeleteParameterGroupResponse => { - return { - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroup(output.ParameterGroup, context) : undefined, - } as any; -}; +// de_DeleteParameterGroupResponse omitted. /** * deserializeAws_json1_1DeleteSnapshotResponse */ const de_DeleteSnapshotResponse = (output: any, context: __SerdeContext): DeleteSnapshotResponse => { - return { - Snapshot: output.Snapshot != null ? de_Snapshot(output.Snapshot, context) : undefined, - } as any; + return take(output, { + Snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteSubnetGroupResponse - */ -const de_DeleteSubnetGroupResponse = (output: any, context: __SerdeContext): DeleteSubnetGroupResponse => { - return { - SubnetGroup: output.SubnetGroup != null ? de_SubnetGroup(output.SubnetGroup, context) : undefined, - } as any; -}; +// de_DeleteSubnetGroupResponse omitted. -/** - * deserializeAws_json1_1DeleteUserResponse - */ -const de_DeleteUserResponse = (output: any, context: __SerdeContext): DeleteUserResponse => { - return { - User: output.User != null ? de_User(output.User, context) : undefined, - } as any; -}; +// de_DeleteUserResponse omitted. -/** - * deserializeAws_json1_1DescribeACLsResponse - */ -const de_DescribeACLsResponse = (output: any, context: __SerdeContext): DescribeACLsResponse => { - return { - ACLs: output.ACLs != null ? de_ACLList(output.ACLs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeACLsResponse omitted. /** * deserializeAws_json1_1DescribeClustersResponse */ const de_DescribeClustersResponse = (output: any, context: __SerdeContext): DescribeClustersResponse => { - return { - Clusters: output.Clusters != null ? de_ClusterList(output.Clusters, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Clusters: (_: any) => de_ClusterList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeEngineVersionsResponse - */ -const de_DescribeEngineVersionsResponse = (output: any, context: __SerdeContext): DescribeEngineVersionsResponse => { - return { - EngineVersions: - output.EngineVersions != null ? de_EngineVersionInfoList(output.EngineVersions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeEngineVersionsResponse omitted. /** * deserializeAws_json1_1DescribeEventsResponse */ const de_DescribeEventsResponse = (output: any, context: __SerdeContext): DescribeEventsResponse => { - return { - Events: output.Events != null ? de_EventList(output.Events, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Events: (_: any) => de_EventList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeParameterGroupsResponse - */ -const de_DescribeParameterGroupsResponse = (output: any, context: __SerdeContext): DescribeParameterGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - ParameterGroups: - output.ParameterGroups != null ? de_ParameterGroupList(output.ParameterGroups, context) : undefined, - } as any; -}; +// de_DescribeParameterGroupsResponse omitted. -/** - * deserializeAws_json1_1DescribeParametersResponse - */ -const de_DescribeParametersResponse = (output: any, context: __SerdeContext): DescribeParametersResponse => { - return { - NextToken: __expectString(output.NextToken), - Parameters: output.Parameters != null ? de_ParametersList(output.Parameters, context) : undefined, - } as any; -}; +// de_DescribeParametersResponse omitted. /** * deserializeAws_json1_1DescribeReservedNodesOfferingsResponse @@ -5041,120 +4163,64 @@ const de_DescribeReservedNodesOfferingsResponse = ( output: any, context: __SerdeContext ): DescribeReservedNodesOfferingsResponse => { - return { - NextToken: __expectString(output.NextToken), - ReservedNodesOfferings: - output.ReservedNodesOfferings != null - ? de_ReservedNodesOfferingList(output.ReservedNodesOfferings, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ReservedNodesOfferings: (_: any) => de_ReservedNodesOfferingList(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeReservedNodesResponse */ const de_DescribeReservedNodesResponse = (output: any, context: __SerdeContext): DescribeReservedNodesResponse => { - return { - NextToken: __expectString(output.NextToken), - ReservedNodes: output.ReservedNodes != null ? de_ReservedNodeList(output.ReservedNodes, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ReservedNodes: (_: any) => de_ReservedNodeList(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeServiceUpdatesResponse */ const de_DescribeServiceUpdatesResponse = (output: any, context: __SerdeContext): DescribeServiceUpdatesResponse => { - return { - NextToken: __expectString(output.NextToken), - ServiceUpdates: output.ServiceUpdates != null ? de_ServiceUpdateList(output.ServiceUpdates, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ServiceUpdates: (_: any) => de_ServiceUpdateList(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSnapshotsResponse */ const de_DescribeSnapshotsResponse = (output: any, context: __SerdeContext): DescribeSnapshotsResponse => { - return { - NextToken: __expectString(output.NextToken), - Snapshots: output.Snapshots != null ? de_SnapshotList(output.Snapshots, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Snapshots: (_: any) => de_SnapshotList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeSubnetGroupsResponse - */ -const de_DescribeSubnetGroupsResponse = (output: any, context: __SerdeContext): DescribeSubnetGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - SubnetGroups: output.SubnetGroups != null ? de_SubnetGroupList(output.SubnetGroups, context) : undefined, - } as any; -}; +// de_DescribeSubnetGroupsResponse omitted. -/** - * deserializeAws_json1_1DescribeUsersResponse - */ -const de_DescribeUsersResponse = (output: any, context: __SerdeContext): DescribeUsersResponse => { - return { - NextToken: __expectString(output.NextToken), - Users: output.Users != null ? de_UserList(output.Users, context) : undefined, - } as any; -}; +// de_DescribeUsersResponse omitted. -/** - * deserializeAws_json1_1DuplicateUserNameFault - */ -const de_DuplicateUserNameFault = (output: any, context: __SerdeContext): DuplicateUserNameFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DuplicateUserNameFault omitted. -/** - * deserializeAws_json1_1Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Address: __expectString(output.Address), - Port: __expectInt32(output.Port), - } as any; -}; +// de_Endpoint omitted. -/** - * deserializeAws_json1_1EngineVersionInfo - */ -const de_EngineVersionInfo = (output: any, context: __SerdeContext): EngineVersionInfo => { - return { - EnginePatchVersion: __expectString(output.EnginePatchVersion), - EngineVersion: __expectString(output.EngineVersion), - ParameterGroupFamily: __expectString(output.ParameterGroupFamily), - } as any; -}; +// de_EngineVersionInfo omitted. -/** - * deserializeAws_json1_1EngineVersionInfoList - */ -const de_EngineVersionInfoList = (output: any, context: __SerdeContext): EngineVersionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EngineVersionInfo(entry, context); - }); - return retVal; -}; +// de_EngineVersionInfoList omitted. /** * deserializeAws_json1_1Event */ const de_Event = (output: any, context: __SerdeContext): Event => { - return { - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - Message: __expectString(output.Message), - SourceName: __expectString(output.SourceName), - SourceType: __expectString(output.SourceType), - } as any; + return take(output, { + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + SourceName: __expectString, + SourceType: __expectString, + }) as any; }; /** @@ -5164,9 +4230,6 @@ const de_EventList = (output: any, context: __SerdeContext): Event[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Event(entry, context); }); return retVal; @@ -5176,356 +4239,93 @@ const de_EventList = (output: any, context: __SerdeContext): Event[] => { * deserializeAws_json1_1FailoverShardResponse */ const de_FailoverShardResponse = (output: any, context: __SerdeContext): FailoverShardResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InsufficientClusterCapacityFault - */ -const de_InsufficientClusterCapacityFault = ( - output: any, - context: __SerdeContext -): InsufficientClusterCapacityFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidACLStateFault - */ -const de_InvalidACLStateFault = (output: any, context: __SerdeContext): InvalidACLStateFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidARNFault - */ -const de_InvalidARNFault = (output: any, context: __SerdeContext): InvalidARNFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidClusterStateFault - */ -const de_InvalidClusterStateFault = (output: any, context: __SerdeContext): InvalidClusterStateFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidCredentialsException - */ -const de_InvalidCredentialsException = (output: any, context: __SerdeContext): InvalidCredentialsException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidKMSKeyFault - */ -const de_InvalidKMSKeyFault = (output: any, context: __SerdeContext): InvalidKMSKeyFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidNodeStateFault - */ -const de_InvalidNodeStateFault = (output: any, context: __SerdeContext): InvalidNodeStateFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParameterCombinationException - */ -const de_InvalidParameterCombinationException = ( - output: any, - context: __SerdeContext -): InvalidParameterCombinationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParameterGroupStateFault - */ -const de_InvalidParameterGroupStateFault = (output: any, context: __SerdeContext): InvalidParameterGroupStateFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidSnapshotStateFault - */ -const de_InvalidSnapshotStateFault = (output: any, context: __SerdeContext): InvalidSnapshotStateFault => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InvalidSubnet - */ -const de_InvalidSubnet = (output: any, context: __SerdeContext): InvalidSubnet => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InsufficientClusterCapacityFault omitted. -/** - * deserializeAws_json1_1InvalidUserStateFault - */ -const de_InvalidUserStateFault = (output: any, context: __SerdeContext): InvalidUserStateFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidACLStateFault omitted. -/** - * deserializeAws_json1_1InvalidVPCNetworkStateFault - */ -const de_InvalidVPCNetworkStateFault = (output: any, context: __SerdeContext): InvalidVPCNetworkStateFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidARNFault omitted. -/** - * deserializeAws_json1_1ListAllowedNodeTypeUpdatesResponse - */ -const de_ListAllowedNodeTypeUpdatesResponse = ( - output: any, - context: __SerdeContext -): ListAllowedNodeTypeUpdatesResponse => { - return { - ScaleDownNodeTypes: - output.ScaleDownNodeTypes != null ? de_NodeTypeList(output.ScaleDownNodeTypes, context) : undefined, - ScaleUpNodeTypes: output.ScaleUpNodeTypes != null ? de_NodeTypeList(output.ScaleUpNodeTypes, context) : undefined, - } as any; -}; +// de_InvalidClusterStateFault omitted. -/** - * deserializeAws_json1_1ListTagsResponse - */ -const de_ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_InvalidCredentialsException omitted. -/** - * deserializeAws_json1_1Node - */ -const de_Node = (output: any, context: __SerdeContext): Node => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - Endpoint: output.Endpoint != null ? de_Endpoint(output.Endpoint, context) : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_InvalidKMSKeyFault omitted. -/** - * deserializeAws_json1_1NodeList - */ -const de_NodeList = (output: any, context: __SerdeContext): Node[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Node(entry, context); - }); - return retVal; -}; +// de_InvalidNodeStateFault omitted. -/** - * deserializeAws_json1_1NodeQuotaForClusterExceededFault - */ -const de_NodeQuotaForClusterExceededFault = ( - output: any, - context: __SerdeContext -): NodeQuotaForClusterExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterCombinationException omitted. -/** - * deserializeAws_json1_1NodeQuotaForCustomerExceededFault - */ -const de_NodeQuotaForCustomerExceededFault = ( - output: any, - context: __SerdeContext -): NodeQuotaForCustomerExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterGroupStateFault omitted. -/** - * deserializeAws_json1_1NodeTypeList - */ -const de_NodeTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InvalidParameterValueException omitted. -/** - * deserializeAws_json1_1NoOperationFault - */ -const de_NoOperationFault = (output: any, context: __SerdeContext): NoOperationFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidSnapshotStateFault omitted. -/** - * deserializeAws_json1_1Parameter - */ -const de_Parameter = (output: any, context: __SerdeContext): Parameter => { - return { - AllowedValues: __expectString(output.AllowedValues), - DataType: __expectString(output.DataType), - Description: __expectString(output.Description), - MinimumEngineVersion: __expectString(output.MinimumEngineVersion), - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_InvalidSubnet omitted. -/** - * deserializeAws_json1_1ParameterGroup - */ -const de_ParameterGroup = (output: any, context: __SerdeContext): ParameterGroup => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Family: __expectString(output.Family), - Name: __expectString(output.Name), - } as any; -}; +// de_InvalidUserStateFault omitted. -/** - * deserializeAws_json1_1ParameterGroupAlreadyExistsFault - */ -const de_ParameterGroupAlreadyExistsFault = ( - output: any, - context: __SerdeContext -): ParameterGroupAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidVPCNetworkStateFault omitted. -/** - * deserializeAws_json1_1ParameterGroupList - */ -const de_ParameterGroupList = (output: any, context: __SerdeContext): ParameterGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterGroup(entry, context); - }); - return retVal; -}; +// de_ListAllowedNodeTypeUpdatesResponse omitted. -/** - * deserializeAws_json1_1ParameterGroupNotFoundFault - */ -const de_ParameterGroupNotFoundFault = (output: any, context: __SerdeContext): ParameterGroupNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ListTagsResponse omitted. /** - * deserializeAws_json1_1ParameterGroupQuotaExceededFault + * deserializeAws_json1_1Node */ -const de_ParameterGroupQuotaExceededFault = ( - output: any, - context: __SerdeContext -): ParameterGroupQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; +const de_Node = (output: any, context: __SerdeContext): Node => { + return take(output, { + AvailabilityZone: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Endpoint: _json, + Name: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParametersList + * deserializeAws_json1_1NodeList */ -const de_ParametersList = (output: any, context: __SerdeContext): Parameter[] => { +const de_NodeList = (output: any, context: __SerdeContext): Node[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parameter(entry, context); + return de_Node(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PendingModifiedServiceUpdate - */ -const de_PendingModifiedServiceUpdate = (output: any, context: __SerdeContext): PendingModifiedServiceUpdate => { - return { - ServiceUpdateName: __expectString(output.ServiceUpdateName), - Status: __expectString(output.Status), - } as any; -}; +// de_NodeQuotaForClusterExceededFault omitted. -/** - * deserializeAws_json1_1PendingModifiedServiceUpdateList - */ -const de_PendingModifiedServiceUpdateList = (output: any, context: __SerdeContext): PendingModifiedServiceUpdate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PendingModifiedServiceUpdate(entry, context); - }); - return retVal; -}; +// de_NodeQuotaForCustomerExceededFault omitted. + +// de_NodeTypeList omitted. + +// de_NoOperationFault omitted. + +// de_Parameter omitted. + +// de_ParameterGroup omitted. + +// de_ParameterGroupAlreadyExistsFault omitted. + +// de_ParameterGroupList omitted. + +// de_ParameterGroupNotFoundFault omitted. + +// de_ParameterGroupQuotaExceededFault omitted. + +// de_ParametersList omitted. + +// de_PendingModifiedServiceUpdate omitted. + +// de_PendingModifiedServiceUpdateList omitted. /** * deserializeAws_json1_1PurchaseReservedNodesOfferingResponse @@ -5534,19 +4334,19 @@ const de_PurchaseReservedNodesOfferingResponse = ( output: any, context: __SerdeContext ): PurchaseReservedNodesOfferingResponse => { - return { - ReservedNode: output.ReservedNode != null ? de_ReservedNode(output.ReservedNode, context) : undefined, - } as any; + return take(output, { + ReservedNode: (_: any) => de_ReservedNode(_, context), + }) as any; }; /** * deserializeAws_json1_1RecurringCharge */ const de_RecurringCharge = (output: any, context: __SerdeContext): RecurringCharge => { - return { - RecurringChargeAmount: __limitedParseDouble(output.RecurringChargeAmount), - RecurringChargeFrequency: __expectString(output.RecurringChargeFrequency), - } as any; + return take(output, { + RecurringChargeAmount: __limitedParseDouble, + RecurringChargeFrequency: __expectString, + }) as any; }; /** @@ -5556,9 +4356,6 @@ const de_RecurringChargeList = (output: any, context: __SerdeContext): Recurring const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecurringCharge(entry, context); }); return retVal; @@ -5568,32 +4365,23 @@ const de_RecurringChargeList = (output: any, context: __SerdeContext): Recurring * deserializeAws_json1_1ReservedNode */ const de_ReservedNode = (output: any, context: __SerdeContext): ReservedNode => { - return { - ARN: __expectString(output.ARN), - Duration: __expectInt32(output.Duration), - FixedPrice: __limitedParseDouble(output.FixedPrice), - NodeCount: __expectInt32(output.NodeCount), - NodeType: __expectString(output.NodeType), - OfferingType: __expectString(output.OfferingType), - RecurringCharges: - output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined, - ReservationId: __expectString(output.ReservationId), - ReservedNodesOfferingId: __expectString(output.ReservedNodesOfferingId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1ReservedNodeAlreadyExistsFault - */ -const de_ReservedNodeAlreadyExistsFault = (output: any, context: __SerdeContext): ReservedNodeAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + ARN: __expectString, + Duration: __expectInt32, + FixedPrice: __limitedParseDouble, + NodeCount: __expectInt32, + NodeType: __expectString, + OfferingType: __expectString, + RecurringCharges: (_: any) => de_RecurringChargeList(_, context), + ReservationId: __expectString, + ReservedNodesOfferingId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; +// de_ReservedNodeAlreadyExistsFault omitted. + /** * deserializeAws_json1_1ReservedNodeList */ @@ -5601,45 +4389,27 @@ const de_ReservedNodeList = (output: any, context: __SerdeContext): ReservedNode const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReservedNode(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReservedNodeNotFoundFault - */ -const de_ReservedNodeNotFoundFault = (output: any, context: __SerdeContext): ReservedNodeNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReservedNodeNotFoundFault omitted. -/** - * deserializeAws_json1_1ReservedNodeQuotaExceededFault - */ -const de_ReservedNodeQuotaExceededFault = (output: any, context: __SerdeContext): ReservedNodeQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReservedNodeQuotaExceededFault omitted. /** * deserializeAws_json1_1ReservedNodesOffering */ const de_ReservedNodesOffering = (output: any, context: __SerdeContext): ReservedNodesOffering => { - return { - Duration: __expectInt32(output.Duration), - FixedPrice: __limitedParseDouble(output.FixedPrice), - NodeType: __expectString(output.NodeType), - OfferingType: __expectString(output.OfferingType), - RecurringCharges: - output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined, - ReservedNodesOfferingId: __expectString(output.ReservedNodesOfferingId), - } as any; + return take(output, { + Duration: __expectInt32, + FixedPrice: __limitedParseDouble, + NodeType: __expectString, + OfferingType: __expectString, + RecurringCharges: (_: any) => de_RecurringChargeList(_, context), + ReservedNodesOfferingId: __expectString, + }) as any; }; /** @@ -5649,98 +4419,44 @@ const de_ReservedNodesOfferingList = (output: any, context: __SerdeContext): Res const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReservedNodesOffering(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReservedNodesOfferingNotFoundFault - */ -const de_ReservedNodesOfferingNotFoundFault = ( - output: any, - context: __SerdeContext -): ReservedNodesOfferingNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReservedNodesOfferingNotFoundFault omitted. -/** - * deserializeAws_json1_1ResetParameterGroupResponse - */ -const de_ResetParameterGroupResponse = (output: any, context: __SerdeContext): ResetParameterGroupResponse => { - return { - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroup(output.ParameterGroup, context) : undefined, - } as any; -}; +// de_ResetParameterGroupResponse omitted. /** * deserializeAws_json1_1ReshardingStatus */ const de_ReshardingStatus = (output: any, context: __SerdeContext): ReshardingStatus => { - return { - SlotMigration: output.SlotMigration != null ? de_SlotMigration(output.SlotMigration, context) : undefined, - } as any; + return take(output, { + SlotMigration: (_: any) => de_SlotMigration(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SecurityGroupMembership - */ -const de_SecurityGroupMembership = (output: any, context: __SerdeContext): SecurityGroupMembership => { - return { - SecurityGroupId: __expectString(output.SecurityGroupId), - Status: __expectString(output.Status), - } as any; -}; +// de_SecurityGroupMembership omitted. -/** - * deserializeAws_json1_1SecurityGroupMembershipList - */ -const de_SecurityGroupMembershipList = (output: any, context: __SerdeContext): SecurityGroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityGroupMembership(entry, context); - }); - return retVal; -}; +// de_SecurityGroupMembershipList omitted. -/** - * deserializeAws_json1_1ServiceLinkedRoleNotFoundFault - */ -const de_ServiceLinkedRoleNotFoundFault = (output: any, context: __SerdeContext): ServiceLinkedRoleNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceLinkedRoleNotFoundFault omitted. /** * deserializeAws_json1_1ServiceUpdate */ const de_ServiceUpdate = (output: any, context: __SerdeContext): ServiceUpdate => { - return { - AutoUpdateStartDate: - output.AutoUpdateStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AutoUpdateStartDate))) - : undefined, - ClusterName: __expectString(output.ClusterName), - Description: __expectString(output.Description), - NodesUpdated: __expectString(output.NodesUpdated), - ReleaseDate: - output.ReleaseDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReleaseDate))) - : undefined, - ServiceUpdateName: __expectString(output.ServiceUpdateName), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + AutoUpdateStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ClusterName: __expectString, + Description: __expectString, + NodesUpdated: __expectString, + ReleaseDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServiceUpdateName: __expectString, + Status: __expectString, + Type: __expectString, + }) as any; }; /** @@ -5750,59 +4466,38 @@ const de_ServiceUpdateList = (output: any, context: __SerdeContext): ServiceUpda const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceUpdate(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ServiceUpdateNotFoundFault - */ -const de_ServiceUpdateNotFoundFault = (output: any, context: __SerdeContext): ServiceUpdateNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceUpdateNotFoundFault omitted. /** * deserializeAws_json1_1Shard */ const de_Shard = (output: any, context: __SerdeContext): Shard => { - return { - Name: __expectString(output.Name), - Nodes: output.Nodes != null ? de_NodeList(output.Nodes, context) : undefined, - NumberOfNodes: __expectInt32(output.NumberOfNodes), - Slots: __expectString(output.Slots), - Status: __expectString(output.Status), - } as any; + return take(output, { + Name: __expectString, + Nodes: (_: any) => de_NodeList(_, context), + NumberOfNodes: __expectInt32, + Slots: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ShardConfiguration - */ -const de_ShardConfiguration = (output: any, context: __SerdeContext): ShardConfiguration => { - return { - ReplicaCount: __expectInt32(output.ReplicaCount), - Slots: __expectString(output.Slots), - } as any; -}; +// de_ShardConfiguration omitted. /** * deserializeAws_json1_1ShardDetail */ const de_ShardDetail = (output: any, context: __SerdeContext): ShardDetail => { - return { - Configuration: output.Configuration != null ? de_ShardConfiguration(output.Configuration, context) : undefined, - Name: __expectString(output.Name), - Size: __expectString(output.Size), - SnapshotCreationTime: - output.SnapshotCreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SnapshotCreationTime))) - : undefined, - } as any; + return take(output, { + Configuration: _json, + Name: __expectString, + Size: __expectString, + SnapshotCreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5812,9 +4507,6 @@ const de_ShardDetails = (output: any, context: __SerdeContext): ShardDetail[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ShardDetail(entry, context); }); return retVal; @@ -5827,68 +4519,40 @@ const de_ShardList = (output: any, context: __SerdeContext): Shard[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Shard(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ShardNotFoundFault - */ -const de_ShardNotFoundFault = (output: any, context: __SerdeContext): ShardNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ShardNotFoundFault omitted. -/** - * deserializeAws_json1_1ShardsPerClusterQuotaExceededFault - */ -const de_ShardsPerClusterQuotaExceededFault = ( - output: any, - context: __SerdeContext -): ShardsPerClusterQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ShardsPerClusterQuotaExceededFault omitted. /** * deserializeAws_json1_1SlotMigration */ const de_SlotMigration = (output: any, context: __SerdeContext): SlotMigration => { - return { - ProgressPercentage: __limitedParseDouble(output.ProgressPercentage), - } as any; + return take(output, { + ProgressPercentage: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1Snapshot */ const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => { - return { - ARN: __expectString(output.ARN), - ClusterConfiguration: - output.ClusterConfiguration != null ? de_ClusterConfiguration(output.ClusterConfiguration, context) : undefined, - DataTiering: __expectString(output.DataTiering), - KmsKeyId: __expectString(output.KmsKeyId), - Name: __expectString(output.Name), - Source: __expectString(output.Source), - Status: __expectString(output.Status), - } as any; + return take(output, { + ARN: __expectString, + ClusterConfiguration: (_: any) => de_ClusterConfiguration(_, context), + DataTiering: __expectString, + KmsKeyId: __expectString, + Name: __expectString, + Source: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1SnapshotAlreadyExistsFault - */ -const de_SnapshotAlreadyExistsFault = (output: any, context: __SerdeContext): SnapshotAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SnapshotAlreadyExistsFault omitted. /** * deserializeAws_json1_1SnapshotList @@ -5897,361 +4561,83 @@ const de_SnapshotList = (output: any, context: __SerdeContext): Snapshot[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Snapshot(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SnapshotNotFoundFault - */ -const de_SnapshotNotFoundFault = (output: any, context: __SerdeContext): SnapshotNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SnapshotNotFoundFault omitted. -/** - * deserializeAws_json1_1SnapshotQuotaExceededFault - */ -const de_SnapshotQuotaExceededFault = (output: any, context: __SerdeContext): SnapshotQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SnapshotQuotaExceededFault omitted. -/** - * deserializeAws_json1_1Subnet - */ -const de_Subnet = (output: any, context: __SerdeContext): Subnet => { - return { - AvailabilityZone: - output.AvailabilityZone != null ? de_AvailabilityZone(output.AvailabilityZone, context) : undefined, - Identifier: __expectString(output.Identifier), - } as any; -}; +// de_Subnet omitted. -/** - * deserializeAws_json1_1SubnetGroup - */ -const de_SubnetGroup = (output: any, context: __SerdeContext): SubnetGroup => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Subnets: output.Subnets != null ? de_SubnetList(output.Subnets, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_SubnetGroup omitted. -/** - * deserializeAws_json1_1SubnetGroupAlreadyExistsFault - */ -const de_SubnetGroupAlreadyExistsFault = (output: any, context: __SerdeContext): SubnetGroupAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupAlreadyExistsFault omitted. -/** - * deserializeAws_json1_1SubnetGroupInUseFault - */ -const de_SubnetGroupInUseFault = (output: any, context: __SerdeContext): SubnetGroupInUseFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupInUseFault omitted. -/** - * deserializeAws_json1_1SubnetGroupList - */ -const de_SubnetGroupList = (output: any, context: __SerdeContext): SubnetGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubnetGroup(entry, context); - }); - return retVal; -}; +// de_SubnetGroupList omitted. -/** - * deserializeAws_json1_1SubnetGroupNotFoundFault - */ -const de_SubnetGroupNotFoundFault = (output: any, context: __SerdeContext): SubnetGroupNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupNotFoundFault omitted. -/** - * deserializeAws_json1_1SubnetGroupQuotaExceededFault - */ -const de_SubnetGroupQuotaExceededFault = (output: any, context: __SerdeContext): SubnetGroupQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetGroupQuotaExceededFault omitted. -/** - * deserializeAws_json1_1SubnetInUse - */ -const de_SubnetInUse = (output: any, context: __SerdeContext): SubnetInUse => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetInUse omitted. -/** - * deserializeAws_json1_1SubnetList - */ -const de_SubnetList = (output: any, context: __SerdeContext): Subnet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subnet(entry, context); - }); - return retVal; -}; +// de_SubnetList omitted. -/** - * deserializeAws_json1_1SubnetNotAllowedFault - */ -const de_SubnetNotAllowedFault = (output: any, context: __SerdeContext): SubnetNotAllowedFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetNotAllowedFault omitted. -/** - * deserializeAws_json1_1SubnetQuotaExceededFault - */ -const de_SubnetQuotaExceededFault = (output: any, context: __SerdeContext): SubnetQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_SubnetQuotaExceededFault omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagNotFoundFault - */ -const de_TagNotFoundFault = (output: any, context: __SerdeContext): TagNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagNotFoundFault omitted. -/** - * deserializeAws_json1_1TagQuotaPerResourceExceeded - */ -const de_TagQuotaPerResourceExceeded = (output: any, context: __SerdeContext): TagQuotaPerResourceExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TagQuotaPerResourceExceeded omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TestFailoverNotAvailableFault - */ -const de_TestFailoverNotAvailableFault = (output: any, context: __SerdeContext): TestFailoverNotAvailableFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TestFailoverNotAvailableFault omitted. -/** - * deserializeAws_json1_1UnprocessedCluster - */ -const de_UnprocessedCluster = (output: any, context: __SerdeContext): UnprocessedCluster => { - return { - ClusterName: __expectString(output.ClusterName), - ErrorMessage: __expectString(output.ErrorMessage), - ErrorType: __expectString(output.ErrorType), - } as any; -}; +// de_UnprocessedCluster omitted. -/** - * deserializeAws_json1_1UnprocessedClusterList - */ -const de_UnprocessedClusterList = (output: any, context: __SerdeContext): UnprocessedCluster[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedCluster(entry, context); - }); - return retVal; -}; +// de_UnprocessedClusterList omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateACLResponse - */ -const de_UpdateACLResponse = (output: any, context: __SerdeContext): UpdateACLResponse => { - return { - ACL: output.ACL != null ? de_ACL(output.ACL, context) : undefined, - } as any; -}; +// de_UpdateACLResponse omitted. /** * deserializeAws_json1_1UpdateClusterResponse */ const de_UpdateClusterResponse = (output: any, context: __SerdeContext): UpdateClusterResponse => { - return { - Cluster: output.Cluster != null ? de_Cluster(output.Cluster, context) : undefined, - } as any; + return take(output, { + Cluster: (_: any) => de_Cluster(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateParameterGroupResponse - */ -const de_UpdateParameterGroupResponse = (output: any, context: __SerdeContext): UpdateParameterGroupResponse => { - return { - ParameterGroup: output.ParameterGroup != null ? de_ParameterGroup(output.ParameterGroup, context) : undefined, - } as any; -}; +// de_UpdateParameterGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateSubnetGroupResponse - */ -const de_UpdateSubnetGroupResponse = (output: any, context: __SerdeContext): UpdateSubnetGroupResponse => { - return { - SubnetGroup: output.SubnetGroup != null ? de_SubnetGroup(output.SubnetGroup, context) : undefined, - } as any; -}; +// de_UpdateSubnetGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateUserResponse - */ -const de_UpdateUserResponse = (output: any, context: __SerdeContext): UpdateUserResponse => { - return { - User: output.User != null ? de_User(output.User, context) : undefined, - } as any; -}; +// de_UpdateUserResponse omitted. -/** - * deserializeAws_json1_1User - */ -const de_User = (output: any, context: __SerdeContext): User => { - return { - ACLNames: output.ACLNames != null ? de_ACLNameList(output.ACLNames, context) : undefined, - ARN: __expectString(output.ARN), - AccessString: __expectString(output.AccessString), - Authentication: output.Authentication != null ? de_Authentication(output.Authentication, context) : undefined, - MinimumEngineVersion: __expectString(output.MinimumEngineVersion), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_User omitted. -/** - * deserializeAws_json1_1UserAlreadyExistsFault - */ -const de_UserAlreadyExistsFault = (output: any, context: __SerdeContext): UserAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserAlreadyExistsFault omitted. -/** - * deserializeAws_json1_1UserList - */ -const de_UserList = (output: any, context: __SerdeContext): User[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_User(entry, context); - }); - return retVal; -}; +// de_UserList omitted. -/** - * deserializeAws_json1_1UserNameList - */ -const de_UserNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UserNameList omitted. -/** - * deserializeAws_json1_1UserNotFoundFault - */ -const de_UserNotFoundFault = (output: any, context: __SerdeContext): UserNotFoundFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserNotFoundFault omitted. -/** - * deserializeAws_json1_1UserQuotaExceededFault - */ -const de_UserQuotaExceededFault = (output: any, context: __SerdeContext): UserQuotaExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UserQuotaExceededFault omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -6273,6 +4659,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-mgn/src/protocols/Aws_restJson1.ts b/clients/client-mgn/src/protocols/Aws_restJson1.ts index 720d5c4f2b09..694fd21f49e6 100644 --- a/clients/client-mgn/src/protocols/Aws_restJson1.ts +++ b/clients/client-mgn/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,13 +9,13 @@ import { expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, resolvedPath as __resolvedPath, strictParseLong as __strictParseLong, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -183,82 +184,35 @@ import { UpdateWaveCommandInput, UpdateWaveCommandOutput } from "../commands/Upd import { MgnServiceException as __BaseException } from "../models/MgnServiceException"; import { AccessDeniedException, - Application, - ApplicationAggregatedStatus, ChangeServerLifeCycleStateSourceServerLifecycle, ConflictException, - CPU, - DataReplicationError, - DataReplicationInfo, - DataReplicationInfoReplicatedDisk, - DataReplicationInitiation, - DataReplicationInitiationStep, DescribeJobsRequestFilters, DescribeSourceServersRequestFilters, - Disk, - ErrorDetails, - ExportErrorData, ExportTask, - ExportTaskError, - ExportTaskSummary, - IdentificationHints, - ImportErrorData, ImportTask, - ImportTaskError, - ImportTaskSummary, - ImportTaskSummaryApplications, - ImportTaskSummaryServers, - ImportTaskSummaryWaves, InternalServerException, Job, - JobLog, - JobLogEventData, - JobPostLaunchActionsLaunchStatus, - LaunchConfigurationTemplate, - LaunchedInstance, LaunchTemplateDiskConf, Licensing, - LifeCycle, - LifeCycleLastCutover, - LifeCycleLastCutoverFinalized, - LifeCycleLastCutoverInitiated, - LifeCycleLastCutoverReverted, - LifeCycleLastTest, - LifeCycleLastTestFinalized, - LifeCycleLastTestInitiated, - LifeCycleLastTestReverted, LifeCycleState, ListApplicationsRequestFilters, ListExportsRequestFilters, ListImportsRequestFilters, ListWavesRequestFilters, - NetworkInterface, - OS, - ParticipatingServer, PostLaunchActions, - PostLaunchActionsStatus, ReplicationConfigurationReplicatedDisk, - ReplicationConfigurationTemplate, ReplicationType, ResourceNotFoundException, S3BucketSource, ServiceQuotaExceededException, - SourceProperties, - SourceServer, - SourceServerActionDocument, SourceServerActionsRequestFilters, SsmDocument, SsmExternalParameter, SsmParameterStoreParameter, - TemplateActionDocument, TemplateActionsRequestFilters, ThrottlingException, UninitializedAccountException, ValidationException, - ValidationExceptionField, - VcenterClient, - Wave, - WaveAggregatedStatus, } from "../models/models_0"; /** @@ -274,9 +228,11 @@ export const se_ArchiveApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ArchiveApplication"; let body: any; - body = JSON.stringify({ - ...(input.applicationID != null && { applicationID: input.applicationID }), - }); + body = JSON.stringify( + take(input, { + applicationID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -301,9 +257,11 @@ export const se_ArchiveWaveCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ArchiveWave"; let body: any; - body = JSON.stringify({ - ...(input.waveID != null && { waveID: input.waveID }), - }); + body = JSON.stringify( + take(input, { + waveID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,10 +286,12 @@ export const se_AssociateApplicationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/AssociateApplications"; let body: any; - body = JSON.stringify({ - ...(input.applicationIDs != null && { applicationIDs: se_ApplicationIDs(input.applicationIDs, context) }), - ...(input.waveID != null && { waveID: input.waveID }), - }); + body = JSON.stringify( + take(input, { + applicationIDs: (_) => _json(_), + waveID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -357,12 +317,12 @@ export const se_AssociateSourceServersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/AssociateSourceServers"; let body: any; - body = JSON.stringify({ - ...(input.applicationID != null && { applicationID: input.applicationID }), - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_AssociateSourceServersRequestSourceServerIDs(input.sourceServerIDs, context), - }), - }); + body = JSON.stringify( + take(input, { + applicationID: [], + sourceServerIDs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -388,12 +348,12 @@ export const se_ChangeServerLifeCycleStateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ChangeServerLifeCycleState"; let body: any; - body = JSON.stringify({ - ...(input.lifeCycle != null && { - lifeCycle: se_ChangeServerLifeCycleStateSourceServerLifecycle(input.lifeCycle, context), - }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + lifeCycle: (_) => _json(_), + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -418,11 +378,13 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateApplication"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -448,30 +410,24 @@ export const se_CreateLaunchConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLaunchConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.associatePublicIpAddress != null && { associatePublicIpAddress: input.associatePublicIpAddress }), - ...(input.bootMode != null && { bootMode: input.bootMode }), - ...(input.copyPrivateIp != null && { copyPrivateIp: input.copyPrivateIp }), - ...(input.copyTags != null && { copyTags: input.copyTags }), - ...(input.enableMapAutoTagging != null && { enableMapAutoTagging: input.enableMapAutoTagging }), - ...(input.largeVolumeConf != null && { - largeVolumeConf: se_LaunchTemplateDiskConf(input.largeVolumeConf, context), - }), - ...(input.launchDisposition != null && { launchDisposition: input.launchDisposition }), - ...(input.licensing != null && { licensing: se_Licensing(input.licensing, context) }), - ...(input.mapAutoTaggingMpeID != null && { mapAutoTaggingMpeID: input.mapAutoTaggingMpeID }), - ...(input.postLaunchActions != null && { - postLaunchActions: se_PostLaunchActions(input.postLaunchActions, context), - }), - ...(input.smallVolumeConf != null && { - smallVolumeConf: se_LaunchTemplateDiskConf(input.smallVolumeConf, context), - }), - ...(input.smallVolumeMaxSize != null && { smallVolumeMaxSize: input.smallVolumeMaxSize }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.targetInstanceTypeRightSizingMethod != null && { - targetInstanceTypeRightSizingMethod: input.targetInstanceTypeRightSizingMethod, - }), - }); + body = JSON.stringify( + take(input, { + associatePublicIpAddress: [], + bootMode: [], + copyPrivateIp: [], + copyTags: [], + enableMapAutoTagging: [], + largeVolumeConf: (_) => _json(_), + launchDisposition: [], + licensing: (_) => _json(_), + mapAutoTaggingMpeID: [], + postLaunchActions: (_) => _json(_), + smallVolumeConf: (_) => _json(_), + smallVolumeMaxSize: [], + tags: (_) => _json(_), + targetInstanceTypeRightSizingMethod: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -497,34 +453,23 @@ export const se_CreateReplicationConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateReplicationConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.associateDefaultSecurityGroup != null && { - associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, - }), - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }), - ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }), - ...(input.defaultLargeStagingDiskType != null && { - defaultLargeStagingDiskType: input.defaultLargeStagingDiskType, - }), - ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }), - ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), - ...(input.replicationServerInstanceType != null && { - replicationServerInstanceType: input.replicationServerInstanceType, - }), - ...(input.replicationServersSecurityGroupsIDs != null && { - replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs( - input.replicationServersSecurityGroupsIDs, - context - ), - }), - ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), - ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - ...(input.useDedicatedReplicationServer != null && { - useDedicatedReplicationServer: input.useDedicatedReplicationServer, - }), - }); + body = JSON.stringify( + take(input, { + associateDefaultSecurityGroup: [], + bandwidthThrottling: [], + createPublicIP: [], + dataPlaneRouting: [], + defaultLargeStagingDiskType: [], + ebsEncryption: [], + ebsEncryptionKeyArn: [], + replicationServerInstanceType: [], + replicationServersSecurityGroupsIDs: (_) => _json(_), + stagingAreaSubnetId: [], + stagingAreaTags: (_) => _json(_), + tags: (_) => _json(_), + useDedicatedReplicationServer: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -549,11 +494,13 @@ export const se_CreateWaveCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateWave"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -578,9 +525,11 @@ export const se_DeleteApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteApplication"; let body: any; - body = JSON.stringify({ - ...(input.applicationID != null && { applicationID: input.applicationID }), - }); + body = JSON.stringify( + take(input, { + applicationID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -605,9 +554,11 @@ export const se_DeleteJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteJob"; let body: any; - body = JSON.stringify({ - ...(input.jobID != null && { jobID: input.jobID }), - }); + body = JSON.stringify( + take(input, { + jobID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -633,11 +584,11 @@ export const se_DeleteLaunchConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLaunchConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.launchConfigurationTemplateID != null && { - launchConfigurationTemplateID: input.launchConfigurationTemplateID, - }), - }); + body = JSON.stringify( + take(input, { + launchConfigurationTemplateID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -663,11 +614,11 @@ export const se_DeleteReplicationConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteReplicationConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.replicationConfigurationTemplateID != null && { - replicationConfigurationTemplateID: input.replicationConfigurationTemplateID, - }), - }); + body = JSON.stringify( + take(input, { + replicationConfigurationTemplateID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -692,9 +643,11 @@ export const se_DeleteSourceServerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSourceServer"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -719,9 +672,11 @@ export const se_DeleteVcenterClientCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteVcenterClient"; let body: any; - body = JSON.stringify({ - ...(input.vcenterClientID != null && { vcenterClientID: input.vcenterClientID }), - }); + body = JSON.stringify( + take(input, { + vcenterClientID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -746,9 +701,11 @@ export const se_DeleteWaveCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteWave"; let body: any; - body = JSON.stringify({ - ...(input.waveID != null && { waveID: input.waveID }), - }); + body = JSON.stringify( + take(input, { + waveID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -773,11 +730,13 @@ export const se_DescribeJobLogItemsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobLogItems"; let body: any; - body = JSON.stringify({ - ...(input.jobID != null && { jobID: input.jobID }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + jobID: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -802,11 +761,13 @@ export const se_DescribeJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeJobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DescribeJobsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -832,13 +793,13 @@ export const se_DescribeLaunchConfigurationTemplatesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeLaunchConfigurationTemplates"; let body: any; - body = JSON.stringify({ - ...(input.launchConfigurationTemplateIDs != null && { - launchConfigurationTemplateIDs: se_LaunchConfigurationTemplateIDs(input.launchConfigurationTemplateIDs, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + launchConfigurationTemplateIDs: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -865,16 +826,13 @@ export const se_DescribeReplicationConfigurationTemplatesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeReplicationConfigurationTemplates"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.replicationConfigurationTemplateIDs != null && { - replicationConfigurationTemplateIDs: se_ReplicationConfigurationTemplateIDs( - input.replicationConfigurationTemplateIDs, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + replicationConfigurationTemplateIDs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -899,11 +857,13 @@ export const se_DescribeSourceServersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSourceServers"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DescribeSourceServersRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -957,10 +917,12 @@ export const se_DisassociateApplicationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisassociateApplications"; let body: any; - body = JSON.stringify({ - ...(input.applicationIDs != null && { applicationIDs: se_ApplicationIDs(input.applicationIDs, context) }), - ...(input.waveID != null && { waveID: input.waveID }), - }); + body = JSON.stringify( + take(input, { + applicationIDs: (_) => _json(_), + waveID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -986,12 +948,12 @@ export const se_DisassociateSourceServersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisassociateSourceServers"; let body: any; - body = JSON.stringify({ - ...(input.applicationID != null && { applicationID: input.applicationID }), - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_DisassociateSourceServersRequestSourceServerIDs(input.sourceServerIDs, context), - }), - }); + body = JSON.stringify( + take(input, { + applicationID: [], + sourceServerIDs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1016,9 +978,11 @@ export const se_DisconnectFromServiceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DisconnectFromService"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1043,9 +1007,11 @@ export const se_FinalizeCutoverCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/FinalizeCutover"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1071,9 +1037,11 @@ export const se_GetLaunchConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLaunchConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1099,9 +1067,11 @@ export const se_GetReplicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetReplicationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1151,11 +1121,13 @@ export const se_ListApplicationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListApplications"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ListApplicationsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1180,11 +1152,13 @@ export const se_ListExportErrorsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListExportErrors"; let body: any; - body = JSON.stringify({ - ...(input.exportID != null && { exportID: input.exportID }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + exportID: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1209,11 +1183,13 @@ export const se_ListExportsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListExports"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ListExportsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1238,11 +1214,13 @@ export const se_ListImportErrorsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImportErrors"; let body: any; - body = JSON.stringify({ - ...(input.importID != null && { importID: input.importID }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + importID: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1267,11 +1245,13 @@ export const se_ListImportsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListImports"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ListImportsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1297,12 +1277,14 @@ export const se_ListSourceServerActionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListSourceServerActions"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SourceServerActionsRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1350,14 +1332,14 @@ export const se_ListTemplateActionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTemplateActions"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_TemplateActionsRequestFilters(input.filters, context) }), - ...(input.launchConfigurationTemplateID != null && { - launchConfigurationTemplateID: input.launchConfigurationTemplateID, - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + launchConfigurationTemplateID: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1382,11 +1364,13 @@ export const se_ListWavesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListWaves"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_ListWavesRequestFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1411,9 +1395,11 @@ export const se_MarkAsArchivedCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MarkAsArchived"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1438,23 +1424,23 @@ export const se_PutSourceServerActionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutSourceServerAction"; let body: any; - body = JSON.stringify({ - ...(input.actionID != null && { actionID: input.actionID }), - ...(input.actionName != null && { actionName: input.actionName }), - ...(input.active != null && { active: input.active }), - ...(input.category != null && { category: input.category }), - ...(input.description != null && { description: input.description }), - ...(input.documentIdentifier != null && { documentIdentifier: input.documentIdentifier }), - ...(input.documentVersion != null && { documentVersion: input.documentVersion }), - ...(input.externalParameters != null && { - externalParameters: se_SsmDocumentExternalParameters(input.externalParameters, context), - }), - ...(input.mustSucceedForCutover != null && { mustSucceedForCutover: input.mustSucceedForCutover }), - ...(input.order != null && { order: input.order }), - ...(input.parameters != null && { parameters: se_SsmDocumentParameters(input.parameters, context) }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - ...(input.timeoutSeconds != null && { timeoutSeconds: input.timeoutSeconds }), - }); + body = JSON.stringify( + take(input, { + actionID: [], + actionName: [], + active: [], + category: [], + description: [], + documentIdentifier: [], + documentVersion: [], + externalParameters: (_) => _json(_), + mustSucceedForCutover: [], + order: [], + parameters: (_) => _json(_), + sourceServerID: [], + timeoutSeconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1479,26 +1465,24 @@ export const se_PutTemplateActionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutTemplateAction"; let body: any; - body = JSON.stringify({ - ...(input.actionID != null && { actionID: input.actionID }), - ...(input.actionName != null && { actionName: input.actionName }), - ...(input.active != null && { active: input.active }), - ...(input.category != null && { category: input.category }), - ...(input.description != null && { description: input.description }), - ...(input.documentIdentifier != null && { documentIdentifier: input.documentIdentifier }), - ...(input.documentVersion != null && { documentVersion: input.documentVersion }), - ...(input.externalParameters != null && { - externalParameters: se_SsmDocumentExternalParameters(input.externalParameters, context), - }), - ...(input.launchConfigurationTemplateID != null && { - launchConfigurationTemplateID: input.launchConfigurationTemplateID, - }), - ...(input.mustSucceedForCutover != null && { mustSucceedForCutover: input.mustSucceedForCutover }), - ...(input.operatingSystem != null && { operatingSystem: input.operatingSystem }), - ...(input.order != null && { order: input.order }), - ...(input.parameters != null && { parameters: se_SsmDocumentParameters(input.parameters, context) }), - ...(input.timeoutSeconds != null && { timeoutSeconds: input.timeoutSeconds }), - }); + body = JSON.stringify( + take(input, { + actionID: [], + actionName: [], + active: [], + category: [], + description: [], + documentIdentifier: [], + documentVersion: [], + externalParameters: (_) => _json(_), + launchConfigurationTemplateID: [], + mustSucceedForCutover: [], + operatingSystem: [], + order: [], + parameters: (_) => _json(_), + timeoutSeconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1524,10 +1508,12 @@ export const se_RemoveSourceServerActionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RemoveSourceServerAction"; let body: any; - body = JSON.stringify({ - ...(input.actionID != null && { actionID: input.actionID }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + actionID: [], + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1552,12 +1538,12 @@ export const se_RemoveTemplateActionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RemoveTemplateAction"; let body: any; - body = JSON.stringify({ - ...(input.actionID != null && { actionID: input.actionID }), - ...(input.launchConfigurationTemplateID != null && { - launchConfigurationTemplateID: input.launchConfigurationTemplateID, - }), - }); + body = JSON.stringify( + take(input, { + actionID: [], + launchConfigurationTemplateID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1582,9 +1568,11 @@ export const se_RetryDataReplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RetryDataReplication"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1609,12 +1597,12 @@ export const se_StartCutoverCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartCutover"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_StartCutoverRequestSourceServerIDs(input.sourceServerIDs, context), - }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + sourceServerIDs: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1639,11 +1627,13 @@ export const se_StartExportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartExport"; let body: any; - body = JSON.stringify({ - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3BucketOwner != null && { s3BucketOwner: input.s3BucketOwner }), - ...(input.s3Key != null && { s3Key: input.s3Key }), - }); + body = JSON.stringify( + take(input, { + s3Bucket: [], + s3BucketOwner: [], + s3Key: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1668,10 +1658,12 @@ export const se_StartImportCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartImport"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.s3BucketSource != null && { s3BucketSource: se_S3BucketSource(input.s3BucketSource, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + s3BucketSource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1696,9 +1688,11 @@ export const se_StartReplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartReplication"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1723,12 +1717,12 @@ export const se_StartTestCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/StartTest"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_StartTestRequestSourceServerIDs(input.sourceServerIDs, context), - }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + sourceServerIDs: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1754,9 +1748,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1782,12 +1778,12 @@ export const se_TerminateTargetInstancesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TerminateTargetInstances"; let body: any; - body = JSON.stringify({ - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_TerminateTargetInstancesRequestSourceServerIDs(input.sourceServerIDs, context), - }), - ...(input.tags != null && { tags: se_TagsMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + sourceServerIDs: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1812,9 +1808,11 @@ export const se_UnarchiveApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UnarchiveApplication"; let body: any; - body = JSON.stringify({ - ...(input.applicationID != null && { applicationID: input.applicationID }), - }); + body = JSON.stringify( + take(input, { + applicationID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1839,9 +1837,11 @@ export const se_UnarchiveWaveCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UnarchiveWave"; let body: any; - body = JSON.stringify({ - ...(input.waveID != null && { waveID: input.waveID }), - }); + body = JSON.stringify( + take(input, { + waveID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1896,11 +1896,13 @@ export const se_UpdateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateApplication"; let body: any; - body = JSON.stringify({ - ...(input.applicationID != null && { applicationID: input.applicationID }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + applicationID: [], + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1926,23 +1928,21 @@ export const se_UpdateLaunchConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.bootMode != null && { bootMode: input.bootMode }), - ...(input.copyPrivateIp != null && { copyPrivateIp: input.copyPrivateIp }), - ...(input.copyTags != null && { copyTags: input.copyTags }), - ...(input.enableMapAutoTagging != null && { enableMapAutoTagging: input.enableMapAutoTagging }), - ...(input.launchDisposition != null && { launchDisposition: input.launchDisposition }), - ...(input.licensing != null && { licensing: se_Licensing(input.licensing, context) }), - ...(input.mapAutoTaggingMpeID != null && { mapAutoTaggingMpeID: input.mapAutoTaggingMpeID }), - ...(input.name != null && { name: input.name }), - ...(input.postLaunchActions != null && { - postLaunchActions: se_PostLaunchActions(input.postLaunchActions, context), - }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - ...(input.targetInstanceTypeRightSizingMethod != null && { - targetInstanceTypeRightSizingMethod: input.targetInstanceTypeRightSizingMethod, - }), - }); + body = JSON.stringify( + take(input, { + bootMode: [], + copyPrivateIp: [], + copyTags: [], + enableMapAutoTagging: [], + launchDisposition: [], + licensing: (_) => _json(_), + mapAutoTaggingMpeID: [], + name: [], + postLaunchActions: (_) => _json(_), + sourceServerID: [], + targetInstanceTypeRightSizingMethod: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1968,32 +1968,24 @@ export const se_UpdateLaunchConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLaunchConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.associatePublicIpAddress != null && { associatePublicIpAddress: input.associatePublicIpAddress }), - ...(input.bootMode != null && { bootMode: input.bootMode }), - ...(input.copyPrivateIp != null && { copyPrivateIp: input.copyPrivateIp }), - ...(input.copyTags != null && { copyTags: input.copyTags }), - ...(input.enableMapAutoTagging != null && { enableMapAutoTagging: input.enableMapAutoTagging }), - ...(input.largeVolumeConf != null && { - largeVolumeConf: se_LaunchTemplateDiskConf(input.largeVolumeConf, context), - }), - ...(input.launchConfigurationTemplateID != null && { - launchConfigurationTemplateID: input.launchConfigurationTemplateID, - }), - ...(input.launchDisposition != null && { launchDisposition: input.launchDisposition }), - ...(input.licensing != null && { licensing: se_Licensing(input.licensing, context) }), - ...(input.mapAutoTaggingMpeID != null && { mapAutoTaggingMpeID: input.mapAutoTaggingMpeID }), - ...(input.postLaunchActions != null && { - postLaunchActions: se_PostLaunchActions(input.postLaunchActions, context), - }), - ...(input.smallVolumeConf != null && { - smallVolumeConf: se_LaunchTemplateDiskConf(input.smallVolumeConf, context), - }), - ...(input.smallVolumeMaxSize != null && { smallVolumeMaxSize: input.smallVolumeMaxSize }), - ...(input.targetInstanceTypeRightSizingMethod != null && { - targetInstanceTypeRightSizingMethod: input.targetInstanceTypeRightSizingMethod, - }), - }); + body = JSON.stringify( + take(input, { + associatePublicIpAddress: [], + bootMode: [], + copyPrivateIp: [], + copyTags: [], + enableMapAutoTagging: [], + largeVolumeConf: (_) => _json(_), + launchConfigurationTemplateID: [], + launchDisposition: [], + licensing: (_) => _json(_), + mapAutoTaggingMpeID: [], + postLaunchActions: (_) => _json(_), + smallVolumeConf: (_) => _json(_), + smallVolumeMaxSize: [], + targetInstanceTypeRightSizingMethod: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2019,38 +2011,25 @@ export const se_UpdateReplicationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.associateDefaultSecurityGroup != null && { - associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, - }), - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }), - ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }), - ...(input.defaultLargeStagingDiskType != null && { - defaultLargeStagingDiskType: input.defaultLargeStagingDiskType, - }), - ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }), - ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), - ...(input.name != null && { name: input.name }), - ...(input.replicatedDisks != null && { - replicatedDisks: se_ReplicationConfigurationReplicatedDisks(input.replicatedDisks, context), - }), - ...(input.replicationServerInstanceType != null && { - replicationServerInstanceType: input.replicationServerInstanceType, - }), - ...(input.replicationServersSecurityGroupsIDs != null && { - replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs( - input.replicationServersSecurityGroupsIDs, - context - ), - }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), - ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }), - ...(input.useDedicatedReplicationServer != null && { - useDedicatedReplicationServer: input.useDedicatedReplicationServer, - }), - }); + body = JSON.stringify( + take(input, { + associateDefaultSecurityGroup: [], + bandwidthThrottling: [], + createPublicIP: [], + dataPlaneRouting: [], + defaultLargeStagingDiskType: [], + ebsEncryption: [], + ebsEncryptionKeyArn: [], + name: [], + replicatedDisks: (_) => _json(_), + replicationServerInstanceType: [], + replicationServersSecurityGroupsIDs: (_) => _json(_), + sourceServerID: [], + stagingAreaSubnetId: [], + stagingAreaTags: (_) => _json(_), + useDedicatedReplicationServer: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2076,37 +2055,24 @@ export const se_UpdateReplicationConfigurationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateReplicationConfigurationTemplate"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.associateDefaultSecurityGroup != null && { - associateDefaultSecurityGroup: input.associateDefaultSecurityGroup, - }), - ...(input.bandwidthThrottling != null && { bandwidthThrottling: input.bandwidthThrottling }), - ...(input.createPublicIP != null && { createPublicIP: input.createPublicIP }), - ...(input.dataPlaneRouting != null && { dataPlaneRouting: input.dataPlaneRouting }), - ...(input.defaultLargeStagingDiskType != null && { - defaultLargeStagingDiskType: input.defaultLargeStagingDiskType, - }), - ...(input.ebsEncryption != null && { ebsEncryption: input.ebsEncryption }), - ...(input.ebsEncryptionKeyArn != null && { ebsEncryptionKeyArn: input.ebsEncryptionKeyArn }), - ...(input.replicationConfigurationTemplateID != null && { - replicationConfigurationTemplateID: input.replicationConfigurationTemplateID, - }), - ...(input.replicationServerInstanceType != null && { - replicationServerInstanceType: input.replicationServerInstanceType, - }), - ...(input.replicationServersSecurityGroupsIDs != null && { - replicationServersSecurityGroupsIDs: se_ReplicationServersSecurityGroupsIDs( - input.replicationServersSecurityGroupsIDs, - context - ), - }), - ...(input.stagingAreaSubnetId != null && { stagingAreaSubnetId: input.stagingAreaSubnetId }), - ...(input.stagingAreaTags != null && { stagingAreaTags: se_TagsMap(input.stagingAreaTags, context) }), - ...(input.useDedicatedReplicationServer != null && { - useDedicatedReplicationServer: input.useDedicatedReplicationServer, - }), - }); + body = JSON.stringify( + take(input, { + arn: [], + associateDefaultSecurityGroup: [], + bandwidthThrottling: [], + createPublicIP: [], + dataPlaneRouting: [], + defaultLargeStagingDiskType: [], + ebsEncryption: [], + ebsEncryptionKeyArn: [], + replicationConfigurationTemplateID: [], + replicationServerInstanceType: [], + replicationServersSecurityGroupsIDs: (_) => _json(_), + stagingAreaSubnetId: [], + stagingAreaTags: (_) => _json(_), + useDedicatedReplicationServer: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2132,10 +2098,12 @@ export const se_UpdateSourceServerReplicationTypeCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateSourceServerReplicationType"; let body: any; - body = JSON.stringify({ - ...(input.replicationType != null && { replicationType: input.replicationType }), - ...(input.sourceServerID != null && { sourceServerID: input.sourceServerID }), - }); + body = JSON.stringify( + take(input, { + replicationType: [], + sourceServerID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2160,11 +2128,13 @@ export const se_UpdateWaveCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateWave"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.waveID != null && { waveID: input.waveID }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + waveID: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2190,36 +2160,19 @@ export const de_ArchiveApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationAggregatedStatus != null) { - contents.applicationAggregatedStatus = de_ApplicationAggregatedStatus(data.applicationAggregatedStatus, context); - } - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + applicationAggregatedStatus: _json, + applicationID: __expectString, + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2250,10 +2203,9 @@ const de_ArchiveApplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2273,33 +2225,18 @@ export const de_ArchiveWaveCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveAggregatedStatus != null) { - contents.waveAggregatedStatus = de_WaveAggregatedStatus(data.waveAggregatedStatus, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveAggregatedStatus: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2330,10 +2267,9 @@ const de_ArchiveWaveCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2383,10 +2319,9 @@ const de_AssociateApplicationsCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2436,10 +2371,9 @@ const de_AssociateSourceServersCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2459,45 +2393,22 @@ export const de_ChangeServerLifeCycleStateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2528,10 +2439,9 @@ const de_ChangeServerLifeCycleStateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2551,36 +2461,19 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationAggregatedStatus != null) { - contents.applicationAggregatedStatus = de_ApplicationAggregatedStatus(data.applicationAggregatedStatus, context); - } - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + applicationAggregatedStatus: _json, + applicationID: __expectString, + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2608,10 +2501,9 @@ const de_CreateApplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2631,57 +2523,26 @@ export const de_CreateLaunchConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associatePublicIpAddress != null) { - contents.associatePublicIpAddress = __expectBoolean(data.associatePublicIpAddress); - } - if (data.bootMode != null) { - contents.bootMode = __expectString(data.bootMode); - } - if (data.copyPrivateIp != null) { - contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); - } - if (data.copyTags != null) { - contents.copyTags = __expectBoolean(data.copyTags); - } - if (data.ec2LaunchTemplateID != null) { - contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); - } - if (data.enableMapAutoTagging != null) { - contents.enableMapAutoTagging = __expectBoolean(data.enableMapAutoTagging); - } - if (data.largeVolumeConf != null) { - contents.largeVolumeConf = de_LaunchTemplateDiskConf(data.largeVolumeConf, context); - } - if (data.launchConfigurationTemplateID != null) { - contents.launchConfigurationTemplateID = __expectString(data.launchConfigurationTemplateID); - } - if (data.launchDisposition != null) { - contents.launchDisposition = __expectString(data.launchDisposition); - } - if (data.licensing != null) { - contents.licensing = de_Licensing(data.licensing, context); - } - if (data.mapAutoTaggingMpeID != null) { - contents.mapAutoTaggingMpeID = __expectString(data.mapAutoTaggingMpeID); - } - if (data.postLaunchActions != null) { - contents.postLaunchActions = de_PostLaunchActions(data.postLaunchActions, context); - } - if (data.smallVolumeConf != null) { - contents.smallVolumeConf = de_LaunchTemplateDiskConf(data.smallVolumeConf, context); - } - if (data.smallVolumeMaxSize != null) { - contents.smallVolumeMaxSize = __expectLong(data.smallVolumeMaxSize); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.targetInstanceTypeRightSizingMethod != null) { - contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); - } + const doc = take(data, { + arn: __expectString, + associatePublicIpAddress: __expectBoolean, + bootMode: __expectString, + copyPrivateIp: __expectBoolean, + copyTags: __expectBoolean, + ec2LaunchTemplateID: __expectString, + enableMapAutoTagging: __expectBoolean, + largeVolumeConf: _json, + launchConfigurationTemplateID: __expectString, + launchDisposition: __expectString, + licensing: _json, + mapAutoTaggingMpeID: __expectString, + postLaunchActions: _json, + smallVolumeConf: _json, + smallVolumeMaxSize: __expectLong, + tags: _json, + targetInstanceTypeRightSizingMethod: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2709,10 +2570,9 @@ const de_CreateLaunchConfigurationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,54 +2592,24 @@ export const de_CreateReplicationConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.replicationConfigurationTemplateID != null) { - contents.replicationConfigurationTemplateID = __expectString(data.replicationConfigurationTemplateID); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + arn: __expectString, + associateDefaultSecurityGroup: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + replicationConfigurationTemplateID: __expectString, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + tags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -2807,10 +2637,9 @@ const de_CreateReplicationConfigurationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2830,33 +2659,18 @@ export const de_CreateWaveCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveAggregatedStatus != null) { - contents.waveAggregatedStatus = de_WaveAggregatedStatus(data.waveAggregatedStatus, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveAggregatedStatus: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2884,10 +2698,9 @@ const de_CreateWaveCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2934,10 +2747,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2984,10 +2796,9 @@ const de_DeleteJobCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3034,10 +2845,9 @@ const de_DeleteLaunchConfigurationTemplateCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3084,10 +2894,9 @@ const de_DeleteReplicationConfigurationTemplateCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3134,10 +2943,9 @@ const de_DeleteSourceServerCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3184,10 +2992,9 @@ const de_DeleteVcenterClientCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3234,10 +3041,9 @@ const de_DeleteWaveCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3257,12 +3063,11 @@ export const de_DescribeJobLogItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_JobLogs(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3287,10 +3092,9 @@ const de_DescribeJobLogItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3310,12 +3114,11 @@ export const de_DescribeJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_JobsList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_JobsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3340,10 +3143,9 @@ const de_DescribeJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3363,12 +3165,11 @@ export const de_DescribeLaunchConfigurationTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_LaunchConfigurationTemplates(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3396,10 +3197,9 @@ const de_DescribeLaunchConfigurationTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3419,12 +3219,11 @@ export const de_DescribeReplicationConfigurationTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ReplicationConfigurationTemplates(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3452,10 +3251,9 @@ const de_DescribeReplicationConfigurationTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3475,12 +3273,11 @@ export const de_DescribeSourceServersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_SourceServersList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3505,10 +3302,9 @@ const de_DescribeSourceServersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3528,12 +3324,11 @@ export const de_DescribeVcenterClientsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_VcenterClientList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3561,10 +3356,9 @@ const de_DescribeVcenterClientsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3611,10 +3405,9 @@ const de_DisassociateApplicationsCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3661,10 +3454,9 @@ const de_DisassociateSourceServersCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3684,45 +3476,22 @@ export const de_DisconnectFromServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3750,10 +3519,9 @@ const de_DisconnectFromServiceCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3773,45 +3541,22 @@ export const de_FinalizeCutoverCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3842,10 +3587,9 @@ const de_FinalizeCutoverCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3865,42 +3609,21 @@ export const de_GetLaunchConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bootMode != null) { - contents.bootMode = __expectString(data.bootMode); - } - if (data.copyPrivateIp != null) { - contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); - } - if (data.copyTags != null) { - contents.copyTags = __expectBoolean(data.copyTags); - } - if (data.ec2LaunchTemplateID != null) { - contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); - } - if (data.enableMapAutoTagging != null) { - contents.enableMapAutoTagging = __expectBoolean(data.enableMapAutoTagging); - } - if (data.launchDisposition != null) { - contents.launchDisposition = __expectString(data.launchDisposition); - } - if (data.licensing != null) { - contents.licensing = de_Licensing(data.licensing, context); - } - if (data.mapAutoTaggingMpeID != null) { - contents.mapAutoTaggingMpeID = __expectString(data.mapAutoTaggingMpeID); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.postLaunchActions != null) { - contents.postLaunchActions = de_PostLaunchActions(data.postLaunchActions, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.targetInstanceTypeRightSizingMethod != null) { - contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); - } + const doc = take(data, { + bootMode: __expectString, + copyPrivateIp: __expectBoolean, + copyTags: __expectBoolean, + ec2LaunchTemplateID: __expectString, + enableMapAutoTagging: __expectBoolean, + launchDisposition: __expectString, + licensing: _json, + mapAutoTaggingMpeID: __expectString, + name: __expectString, + postLaunchActions: _json, + sourceServerID: __expectString, + targetInstanceTypeRightSizingMethod: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3925,10 +3648,9 @@ const de_GetLaunchConfigurationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,54 +3670,24 @@ export const de_GetReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.replicatedDisks != null) { - contents.replicatedDisks = de_ReplicationConfigurationReplicatedDisks(data.replicatedDisks, context); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + associateDefaultSecurityGroup: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + name: __expectString, + replicatedDisks: _json, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + sourceServerID: __expectString, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -4020,10 +3712,9 @@ const de_GetReplicationConfigurationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4067,10 +3758,9 @@ const de_InitializeServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4090,12 +3780,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ApplicationsList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4117,10 +3806,9 @@ const de_ListApplicationsCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4140,12 +3828,11 @@ export const de_ListExportErrorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ExportErrors(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4170,10 +3857,9 @@ const de_ListExportErrorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4193,12 +3879,11 @@ export const de_ListExportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ExportsList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ExportsList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4220,10 +3905,9 @@ const de_ListExportsCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4243,12 +3927,11 @@ export const de_ListImportErrorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ImportErrors(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4273,10 +3956,9 @@ const de_ListImportErrorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4296,12 +3978,11 @@ export const de_ListImportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ImportList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ImportList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4326,10 +4007,9 @@ const de_ListImportsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4349,12 +4029,11 @@ export const de_ListSourceServerActionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_SourceServerActionDocuments(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4379,10 +4058,9 @@ const de_ListSourceServerActionsCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4402,9 +4080,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4438,10 +4117,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4461,12 +4139,11 @@ export const de_ListTemplateActionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_TemplateActionDocuments(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4491,10 +4168,9 @@ const de_ListTemplateActionsCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4514,12 +4190,11 @@ export const de_ListWavesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_WavesList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4541,10 +4216,9 @@ const de_ListWavesCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4564,45 +4238,22 @@ export const de_MarkAsArchivedCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4630,10 +4281,9 @@ const de_MarkAsArchivedCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4653,42 +4303,21 @@ export const de_PutSourceServerActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionID != null) { - contents.actionID = __expectString(data.actionID); - } - if (data.actionName != null) { - contents.actionName = __expectString(data.actionName); - } - if (data.active != null) { - contents.active = __expectBoolean(data.active); - } - if (data.category != null) { - contents.category = __expectString(data.category); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.documentIdentifier != null) { - contents.documentIdentifier = __expectString(data.documentIdentifier); - } - if (data.documentVersion != null) { - contents.documentVersion = __expectString(data.documentVersion); - } - if (data.externalParameters != null) { - contents.externalParameters = de_SsmDocumentExternalParameters(data.externalParameters, context); - } - if (data.mustSucceedForCutover != null) { - contents.mustSucceedForCutover = __expectBoolean(data.mustSucceedForCutover); - } - if (data.order != null) { - contents.order = __expectInt32(data.order); - } - if (data.parameters != null) { - contents.parameters = de_SsmDocumentParameters(data.parameters, context); - } - if (data.timeoutSeconds != null) { - contents.timeoutSeconds = __expectInt32(data.timeoutSeconds); - } + const doc = take(data, { + actionID: __expectString, + actionName: __expectString, + active: __expectBoolean, + category: __expectString, + description: __expectString, + documentIdentifier: __expectString, + documentVersion: __expectString, + externalParameters: _json, + mustSucceedForCutover: __expectBoolean, + order: __expectInt32, + parameters: _json, + timeoutSeconds: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -4719,10 +4348,9 @@ const de_PutSourceServerActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4742,45 +4370,22 @@ export const de_PutTemplateActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionID != null) { - contents.actionID = __expectString(data.actionID); - } - if (data.actionName != null) { - contents.actionName = __expectString(data.actionName); - } - if (data.active != null) { - contents.active = __expectBoolean(data.active); - } - if (data.category != null) { - contents.category = __expectString(data.category); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.documentIdentifier != null) { - contents.documentIdentifier = __expectString(data.documentIdentifier); - } - if (data.documentVersion != null) { - contents.documentVersion = __expectString(data.documentVersion); - } - if (data.externalParameters != null) { - contents.externalParameters = de_SsmDocumentExternalParameters(data.externalParameters, context); - } - if (data.mustSucceedForCutover != null) { - contents.mustSucceedForCutover = __expectBoolean(data.mustSucceedForCutover); - } - if (data.operatingSystem != null) { - contents.operatingSystem = __expectString(data.operatingSystem); - } - if (data.order != null) { - contents.order = __expectInt32(data.order); - } - if (data.parameters != null) { - contents.parameters = de_SsmDocumentParameters(data.parameters, context); - } - if (data.timeoutSeconds != null) { - contents.timeoutSeconds = __expectInt32(data.timeoutSeconds); - } + const doc = take(data, { + actionID: __expectString, + actionName: __expectString, + active: __expectBoolean, + category: __expectString, + description: __expectString, + documentIdentifier: __expectString, + documentVersion: __expectString, + externalParameters: _json, + mustSucceedForCutover: __expectBoolean, + operatingSystem: __expectString, + order: __expectInt32, + parameters: _json, + timeoutSeconds: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -4811,10 +4416,9 @@ const de_PutTemplateActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4861,10 +4465,9 @@ const de_RemoveSourceServerActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4911,10 +4514,9 @@ const de_RemoveTemplateActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4934,45 +4536,22 @@ export const de_RetryDataReplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5000,10 +4579,9 @@ const de_RetryDataReplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5023,9 +4601,10 @@ export const de_StartCutoverCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5053,10 +4632,9 @@ const de_StartCutoverCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5076,9 +4654,10 @@ export const de_StartExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.exportTask != null) { - contents.exportTask = de_ExportTask(data.exportTask, context); - } + const doc = take(data, { + exportTask: (_) => de_ExportTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5106,10 +4685,9 @@ const de_StartExportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5129,9 +4707,10 @@ export const de_StartImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.importTask != null) { - contents.importTask = de_ImportTask(data.importTask, context); - } + const doc = take(data, { + importTask: (_) => de_ImportTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5165,10 +4744,9 @@ const de_StartImportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5188,45 +4766,22 @@ export const de_StartReplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5260,10 +4815,9 @@ const de_StartReplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5283,9 +4837,10 @@ export const de_StartTestCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5313,10 +4868,9 @@ const de_StartTestCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5369,10 +4923,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5392,9 +4945,10 @@ export const de_TerminateTargetInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.job != null) { - contents.job = de_Job(data.job, context); - } + const doc = take(data, { + job: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5422,10 +4976,9 @@ const de_TerminateTargetInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5445,36 +4998,19 @@ export const de_UnarchiveApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationAggregatedStatus != null) { - contents.applicationAggregatedStatus = de_ApplicationAggregatedStatus(data.applicationAggregatedStatus, context); - } - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + applicationAggregatedStatus: _json, + applicationID: __expectString, + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5502,10 +5038,9 @@ const de_UnarchiveApplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5525,33 +5060,18 @@ export const de_UnarchiveWaveCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveAggregatedStatus != null) { - contents.waveAggregatedStatus = de_WaveAggregatedStatus(data.waveAggregatedStatus, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveAggregatedStatus: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5579,10 +5099,9 @@ const de_UnarchiveWaveCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5635,10 +5154,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5658,36 +5176,19 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationAggregatedStatus != null) { - contents.applicationAggregatedStatus = de_ApplicationAggregatedStatus(data.applicationAggregatedStatus, context); - } - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + applicationAggregatedStatus: _json, + applicationID: __expectString, + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5715,10 +5216,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5738,42 +5238,21 @@ export const de_UpdateLaunchConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bootMode != null) { - contents.bootMode = __expectString(data.bootMode); - } - if (data.copyPrivateIp != null) { - contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); - } - if (data.copyTags != null) { - contents.copyTags = __expectBoolean(data.copyTags); - } - if (data.ec2LaunchTemplateID != null) { - contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); - } - if (data.enableMapAutoTagging != null) { - contents.enableMapAutoTagging = __expectBoolean(data.enableMapAutoTagging); - } - if (data.launchDisposition != null) { - contents.launchDisposition = __expectString(data.launchDisposition); - } - if (data.licensing != null) { - contents.licensing = de_Licensing(data.licensing, context); - } - if (data.mapAutoTaggingMpeID != null) { - contents.mapAutoTaggingMpeID = __expectString(data.mapAutoTaggingMpeID); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.postLaunchActions != null) { - contents.postLaunchActions = de_PostLaunchActions(data.postLaunchActions, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.targetInstanceTypeRightSizingMethod != null) { - contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); - } + const doc = take(data, { + bootMode: __expectString, + copyPrivateIp: __expectBoolean, + copyTags: __expectBoolean, + ec2LaunchTemplateID: __expectString, + enableMapAutoTagging: __expectBoolean, + launchDisposition: __expectString, + licensing: _json, + mapAutoTaggingMpeID: __expectString, + name: __expectString, + postLaunchActions: _json, + sourceServerID: __expectString, + targetInstanceTypeRightSizingMethod: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5804,10 +5283,9 @@ const de_UpdateLaunchConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5827,57 +5305,26 @@ export const de_UpdateLaunchConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associatePublicIpAddress != null) { - contents.associatePublicIpAddress = __expectBoolean(data.associatePublicIpAddress); - } - if (data.bootMode != null) { - contents.bootMode = __expectString(data.bootMode); - } - if (data.copyPrivateIp != null) { - contents.copyPrivateIp = __expectBoolean(data.copyPrivateIp); - } - if (data.copyTags != null) { - contents.copyTags = __expectBoolean(data.copyTags); - } - if (data.ec2LaunchTemplateID != null) { - contents.ec2LaunchTemplateID = __expectString(data.ec2LaunchTemplateID); - } - if (data.enableMapAutoTagging != null) { - contents.enableMapAutoTagging = __expectBoolean(data.enableMapAutoTagging); - } - if (data.largeVolumeConf != null) { - contents.largeVolumeConf = de_LaunchTemplateDiskConf(data.largeVolumeConf, context); - } - if (data.launchConfigurationTemplateID != null) { - contents.launchConfigurationTemplateID = __expectString(data.launchConfigurationTemplateID); - } - if (data.launchDisposition != null) { - contents.launchDisposition = __expectString(data.launchDisposition); - } - if (data.licensing != null) { - contents.licensing = de_Licensing(data.licensing, context); - } - if (data.mapAutoTaggingMpeID != null) { - contents.mapAutoTaggingMpeID = __expectString(data.mapAutoTaggingMpeID); - } - if (data.postLaunchActions != null) { - contents.postLaunchActions = de_PostLaunchActions(data.postLaunchActions, context); - } - if (data.smallVolumeConf != null) { - contents.smallVolumeConf = de_LaunchTemplateDiskConf(data.smallVolumeConf, context); - } - if (data.smallVolumeMaxSize != null) { - contents.smallVolumeMaxSize = __expectLong(data.smallVolumeMaxSize); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.targetInstanceTypeRightSizingMethod != null) { - contents.targetInstanceTypeRightSizingMethod = __expectString(data.targetInstanceTypeRightSizingMethod); - } + const doc = take(data, { + arn: __expectString, + associatePublicIpAddress: __expectBoolean, + bootMode: __expectString, + copyPrivateIp: __expectBoolean, + copyTags: __expectBoolean, + ec2LaunchTemplateID: __expectString, + enableMapAutoTagging: __expectBoolean, + largeVolumeConf: _json, + launchConfigurationTemplateID: __expectString, + launchDisposition: __expectString, + licensing: _json, + mapAutoTaggingMpeID: __expectString, + postLaunchActions: _json, + smallVolumeConf: _json, + smallVolumeMaxSize: __expectLong, + tags: _json, + targetInstanceTypeRightSizingMethod: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5908,10 +5355,9 @@ const de_UpdateLaunchConfigurationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5931,54 +5377,24 @@ export const de_UpdateReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.replicatedDisks != null) { - contents.replicatedDisks = de_ReplicationConfigurationReplicatedDisks(data.replicatedDisks, context); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + associateDefaultSecurityGroup: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + name: __expectString, + replicatedDisks: _json, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + sourceServerID: __expectString, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -6012,10 +5428,9 @@ const de_UpdateReplicationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6035,54 +5450,24 @@ export const de_UpdateReplicationConfigurationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associateDefaultSecurityGroup != null) { - contents.associateDefaultSecurityGroup = __expectBoolean(data.associateDefaultSecurityGroup); - } - if (data.bandwidthThrottling != null) { - contents.bandwidthThrottling = __expectLong(data.bandwidthThrottling); - } - if (data.createPublicIP != null) { - contents.createPublicIP = __expectBoolean(data.createPublicIP); - } - if (data.dataPlaneRouting != null) { - contents.dataPlaneRouting = __expectString(data.dataPlaneRouting); - } - if (data.defaultLargeStagingDiskType != null) { - contents.defaultLargeStagingDiskType = __expectString(data.defaultLargeStagingDiskType); - } - if (data.ebsEncryption != null) { - contents.ebsEncryption = __expectString(data.ebsEncryption); - } - if (data.ebsEncryptionKeyArn != null) { - contents.ebsEncryptionKeyArn = __expectString(data.ebsEncryptionKeyArn); - } - if (data.replicationConfigurationTemplateID != null) { - contents.replicationConfigurationTemplateID = __expectString(data.replicationConfigurationTemplateID); - } - if (data.replicationServerInstanceType != null) { - contents.replicationServerInstanceType = __expectString(data.replicationServerInstanceType); - } - if (data.replicationServersSecurityGroupsIDs != null) { - contents.replicationServersSecurityGroupsIDs = de_ReplicationServersSecurityGroupsIDs( - data.replicationServersSecurityGroupsIDs, - context - ); - } - if (data.stagingAreaSubnetId != null) { - contents.stagingAreaSubnetId = __expectString(data.stagingAreaSubnetId); - } - if (data.stagingAreaTags != null) { - contents.stagingAreaTags = de_TagsMap(data.stagingAreaTags, context); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.useDedicatedReplicationServer != null) { - contents.useDedicatedReplicationServer = __expectBoolean(data.useDedicatedReplicationServer); - } + const doc = take(data, { + arn: __expectString, + associateDefaultSecurityGroup: __expectBoolean, + bandwidthThrottling: __expectLong, + createPublicIP: __expectBoolean, + dataPlaneRouting: __expectString, + defaultLargeStagingDiskType: __expectString, + ebsEncryption: __expectString, + ebsEncryptionKeyArn: __expectString, + replicationConfigurationTemplateID: __expectString, + replicationServerInstanceType: __expectString, + replicationServersSecurityGroupsIDs: _json, + stagingAreaSubnetId: __expectString, + stagingAreaTags: _json, + tags: _json, + useDedicatedReplicationServer: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -6113,10 +5498,9 @@ const de_UpdateReplicationConfigurationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6136,45 +5520,22 @@ export const de_UpdateSourceServerReplicationTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationID != null) { - contents.applicationID = __expectString(data.applicationID); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.dataReplicationInfo != null) { - contents.dataReplicationInfo = de_DataReplicationInfo(data.dataReplicationInfo, context); - } - if (data.fqdnForActionFramework != null) { - contents.fqdnForActionFramework = __expectString(data.fqdnForActionFramework); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.launchedInstance != null) { - contents.launchedInstance = de_LaunchedInstance(data.launchedInstance, context); - } - if (data.lifeCycle != null) { - contents.lifeCycle = de_LifeCycle(data.lifeCycle, context); - } - if (data.replicationType != null) { - contents.replicationType = __expectString(data.replicationType); - } - if (data.sourceProperties != null) { - contents.sourceProperties = de_SourceProperties(data.sourceProperties, context); - } - if (data.sourceServerID != null) { - contents.sourceServerID = __expectString(data.sourceServerID); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.userProvidedID != null) { - contents.userProvidedID = __expectString(data.userProvidedID); - } - if (data.vcenterClientID != null) { - contents.vcenterClientID = __expectString(data.vcenterClientID); - } + const doc = take(data, { + applicationID: __expectString, + arn: __expectString, + dataReplicationInfo: _json, + fqdnForActionFramework: __expectString, + isArchived: __expectBoolean, + launchedInstance: _json, + lifeCycle: _json, + replicationType: __expectString, + sourceProperties: _json, + sourceServerID: __expectString, + tags: _json, + userProvidedID: __expectString, + vcenterClientID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6205,10 +5566,9 @@ const de_UpdateSourceServerReplicationTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6228,33 +5588,18 @@ export const de_UpdateWaveCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationDateTime != null) { - contents.creationDateTime = __expectString(data.creationDateTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.isArchived != null) { - contents.isArchived = __expectBoolean(data.isArchived); - } - if (data.lastModifiedDateTime != null) { - contents.lastModifiedDateTime = __expectString(data.lastModifiedDateTime); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagsMap(data.tags, context); - } - if (data.waveAggregatedStatus != null) { - contents.waveAggregatedStatus = de_WaveAggregatedStatus(data.waveAggregatedStatus, context); - } - if (data.waveID != null) { - contents.waveID = __expectString(data.waveID); - } + const doc = take(data, { + arn: __expectString, + creationDateTime: __expectString, + description: __expectString, + isArchived: __expectBoolean, + lastModifiedDateTime: __expectString, + name: __expectString, + tags: _json, + waveAggregatedStatus: _json, + waveID: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6282,16 +5627,15 @@ const de_UpdateWaveCommandError = async ( throw await de_UninitializedAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -6301,12 +5645,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6320,21 +5663,14 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.errors != null) { - contents.errors = de_ConflictExceptionErrors(data.errors, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + code: __expectString, + errors: _json, + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6356,9 +5692,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6375,18 +5712,13 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6403,27 +5735,16 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.quotaValue != null) { - contents.quotaValue = __expectInt32(data.quotaValue); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + quotaCode: __expectString, + quotaValue: __expectInt32, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6439,15 +5760,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6464,12 +5782,11 @@ const de_UninitializedAccountExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UninitializedAccountException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6483,18 +5800,13 @@ const de_UninitializedAccountExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + code: __expectString, + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6502,1759 +5814,325 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ActionIDs - */ -const se_ActionIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ActionIDs omitted. -/** - * serializeAws_restJson1ApplicationIDs - */ -const se_ApplicationIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationIDs omitted. -/** - * serializeAws_restJson1ApplicationIDsFilter - */ -const se_ApplicationIDsFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationIDsFilter omitted. -/** - * serializeAws_restJson1AssociateSourceServersRequestSourceServerIDs - */ -const se_AssociateSourceServersRequestSourceServerIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AssociateSourceServersRequestSourceServerIDs omitted. -/** - * serializeAws_restJson1ChangeServerLifeCycleStateSourceServerLifecycle - */ -const se_ChangeServerLifeCycleStateSourceServerLifecycle = ( - input: ChangeServerLifeCycleStateSourceServerLifecycle, - context: __SerdeContext -): any => { - return { - ...(input.state != null && { state: input.state }), - }; -}; +// se_ChangeServerLifeCycleStateSourceServerLifecycle omitted. -/** - * serializeAws_restJson1DescribeJobsRequestFilters - */ -const se_DescribeJobsRequestFilters = (input: DescribeJobsRequestFilters, context: __SerdeContext): any => { - return { - ...(input.fromDate != null && { fromDate: input.fromDate }), - ...(input.jobIDs != null && { jobIDs: se_DescribeJobsRequestFiltersJobIDs(input.jobIDs, context) }), - ...(input.toDate != null && { toDate: input.toDate }), - }; -}; +// se_DescribeJobsRequestFilters omitted. -/** - * serializeAws_restJson1DescribeJobsRequestFiltersJobIDs - */ -const se_DescribeJobsRequestFiltersJobIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeJobsRequestFiltersJobIDs omitted. -/** - * serializeAws_restJson1DescribeSourceServersRequestApplicationIDs - */ -const se_DescribeSourceServersRequestApplicationIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeSourceServersRequestApplicationIDs omitted. -/** - * serializeAws_restJson1DescribeSourceServersRequestFilters - */ -const se_DescribeSourceServersRequestFilters = ( - input: DescribeSourceServersRequestFilters, - context: __SerdeContext -): any => { - return { - ...(input.applicationIDs != null && { - applicationIDs: se_DescribeSourceServersRequestApplicationIDs(input.applicationIDs, context), - }), - ...(input.isArchived != null && { isArchived: input.isArchived }), - ...(input.lifeCycleStates != null && { lifeCycleStates: se_LifeCycleStates(input.lifeCycleStates, context) }), - ...(input.replicationTypes != null && { replicationTypes: se_ReplicationTypes(input.replicationTypes, context) }), - ...(input.sourceServerIDs != null && { - sourceServerIDs: se_DescribeSourceServersRequestFiltersIDs(input.sourceServerIDs, context), - }), - }; -}; +// se_DescribeSourceServersRequestFilters omitted. -/** - * serializeAws_restJson1DescribeSourceServersRequestFiltersIDs - */ -const se_DescribeSourceServersRequestFiltersIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeSourceServersRequestFiltersIDs omitted. -/** - * serializeAws_restJson1DisassociateSourceServersRequestSourceServerIDs - */ -const se_DisassociateSourceServersRequestSourceServerIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ImportIDsFilter - */ -const se_ImportIDsFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1LaunchConfigurationTemplateIDs - */ -const se_LaunchConfigurationTemplateIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1LaunchTemplateDiskConf - */ -const se_LaunchTemplateDiskConf = (input: LaunchTemplateDiskConf, context: __SerdeContext): any => { - return { - ...(input.iops != null && { iops: input.iops }), - ...(input.throughput != null && { throughput: input.throughput }), - ...(input.volumeType != null && { volumeType: input.volumeType }), - }; -}; - -/** - * serializeAws_restJson1Licensing - */ -const se_Licensing = (input: Licensing, context: __SerdeContext): any => { - return { - ...(input.osByol != null && { osByol: input.osByol }), - }; -}; +// se_DisassociateSourceServersRequestSourceServerIDs omitted. -/** - * serializeAws_restJson1LifeCycleStates - */ -const se_LifeCycleStates = (input: (LifeCycleState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ImportIDsFilter omitted. -/** - * serializeAws_restJson1ListApplicationsRequestFilters - */ -const se_ListApplicationsRequestFilters = (input: ListApplicationsRequestFilters, context: __SerdeContext): any => { - return { - ...(input.applicationIDs != null && { applicationIDs: se_ApplicationIDsFilter(input.applicationIDs, context) }), - ...(input.isArchived != null && { isArchived: input.isArchived }), - ...(input.waveIDs != null && { waveIDs: se_WaveIDsFilter(input.waveIDs, context) }), - }; -}; +// se_LaunchConfigurationTemplateIDs omitted. -/** - * serializeAws_restJson1ListExportsRequestFilters - */ -const se_ListExportsRequestFilters = (input: ListExportsRequestFilters, context: __SerdeContext): any => { - return { - ...(input.exportIDs != null && { exportIDs: se_ListExportsRequestFiltersExportIDs(input.exportIDs, context) }), - }; -}; +// se_LaunchTemplateDiskConf omitted. -/** - * serializeAws_restJson1ListExportsRequestFiltersExportIDs - */ -const se_ListExportsRequestFiltersExportIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ListImportsRequestFilters - */ -const se_ListImportsRequestFilters = (input: ListImportsRequestFilters, context: __SerdeContext): any => { - return { - ...(input.importIDs != null && { importIDs: se_ImportIDsFilter(input.importIDs, context) }), - }; -}; +// se_Licensing omitted. -/** - * serializeAws_restJson1ListWavesRequestFilters - */ -const se_ListWavesRequestFilters = (input: ListWavesRequestFilters, context: __SerdeContext): any => { - return { - ...(input.isArchived != null && { isArchived: input.isArchived }), - ...(input.waveIDs != null && { waveIDs: se_WaveIDsFilter(input.waveIDs, context) }), - }; -}; - -/** - * serializeAws_restJson1PostLaunchActions - */ -const se_PostLaunchActions = (input: PostLaunchActions, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogGroupName != null && { cloudWatchLogGroupName: input.cloudWatchLogGroupName }), - ...(input.deployment != null && { deployment: input.deployment }), - ...(input.s3LogBucket != null && { s3LogBucket: input.s3LogBucket }), - ...(input.s3OutputKeyPrefix != null && { s3OutputKeyPrefix: input.s3OutputKeyPrefix }), - ...(input.ssmDocuments != null && { ssmDocuments: se_SsmDocuments(input.ssmDocuments, context) }), - }; -}; - -/** - * serializeAws_restJson1ReplicationConfigurationReplicatedDisk - */ -const se_ReplicationConfigurationReplicatedDisk = ( - input: ReplicationConfigurationReplicatedDisk, - context: __SerdeContext -): any => { - return { - ...(input.deviceName != null && { deviceName: input.deviceName }), - ...(input.iops != null && { iops: input.iops }), - ...(input.isBootDisk != null && { isBootDisk: input.isBootDisk }), - ...(input.stagingDiskType != null && { stagingDiskType: input.stagingDiskType }), - ...(input.throughput != null && { throughput: input.throughput }), - }; -}; - -/** - * serializeAws_restJson1ReplicationConfigurationReplicatedDisks - */ -const se_ReplicationConfigurationReplicatedDisks = ( - input: ReplicationConfigurationReplicatedDisk[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicationConfigurationReplicatedDisk(entry, context); - }); -}; - -/** - * serializeAws_restJson1ReplicationConfigurationTemplateIDs - */ -const se_ReplicationConfigurationTemplateIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ReplicationServersSecurityGroupsIDs - */ -const se_ReplicationServersSecurityGroupsIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ReplicationTypes - */ -const se_ReplicationTypes = (input: (ReplicationType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1S3BucketSource - */ -const se_S3BucketSource = (input: S3BucketSource, context: __SerdeContext): any => { - return { - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3BucketOwner != null && { s3BucketOwner: input.s3BucketOwner }), - ...(input.s3Key != null && { s3Key: input.s3Key }), - }; -}; - -/** - * serializeAws_restJson1SourceServerActionsRequestFilters - */ -const se_SourceServerActionsRequestFilters = ( - input: SourceServerActionsRequestFilters, - context: __SerdeContext -): any => { - return { - ...(input.actionIDs != null && { actionIDs: se_ActionIDs(input.actionIDs, context) }), - }; -}; - -/** - * serializeAws_restJson1SsmDocument - */ -const se_SsmDocument = (input: SsmDocument, context: __SerdeContext): any => { - return { - ...(input.actionName != null && { actionName: input.actionName }), - ...(input.externalParameters != null && { - externalParameters: se_SsmDocumentExternalParameters(input.externalParameters, context), - }), - ...(input.mustSucceedForCutover != null && { mustSucceedForCutover: input.mustSucceedForCutover }), - ...(input.parameters != null && { parameters: se_SsmDocumentParameters(input.parameters, context) }), - ...(input.ssmDocumentName != null && { ssmDocumentName: input.ssmDocumentName }), - ...(input.timeoutSeconds != null && { timeoutSeconds: input.timeoutSeconds }), - }; -}; - -/** - * serializeAws_restJson1SsmDocumentExternalParameters - */ -const se_SsmDocumentExternalParameters = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SsmExternalParameter(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SsmDocumentParameters - */ -const se_SsmDocumentParameters = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SsmParameterStoreParameters(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SsmDocuments - */ -const se_SsmDocuments = (input: SsmDocument[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SsmDocument(entry, context); - }); -}; - -/** - * serializeAws_restJson1SsmExternalParameter - */ -const se_SsmExternalParameter = (input: SsmExternalParameter, context: __SerdeContext): any => { - return SsmExternalParameter.visit(input, { - dynamicPath: (value) => ({ dynamicPath: value }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1SsmParameterStoreParameter - */ -const se_SsmParameterStoreParameter = (input: SsmParameterStoreParameter, context: __SerdeContext): any => { - return { - ...(input.parameterName != null && { parameterName: input.parameterName }), - ...(input.parameterType != null && { parameterType: input.parameterType }), - }; -}; - -/** - * serializeAws_restJson1SsmParameterStoreParameters - */ -const se_SsmParameterStoreParameters = (input: SsmParameterStoreParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SsmParameterStoreParameter(entry, context); - }); -}; - -/** - * serializeAws_restJson1StartCutoverRequestSourceServerIDs - */ -const se_StartCutoverRequestSourceServerIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StartTestRequestSourceServerIDs - */ -const se_StartTestRequestSourceServerIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LifeCycleStates omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ListApplicationsRequestFilters omitted. -/** - * serializeAws_restJson1TemplateActionsRequestFilters - */ -const se_TemplateActionsRequestFilters = (input: TemplateActionsRequestFilters, context: __SerdeContext): any => { - return { - ...(input.actionIDs != null && { actionIDs: se_ActionIDs(input.actionIDs, context) }), - }; -}; +// se_ListExportsRequestFilters omitted. -/** - * serializeAws_restJson1TerminateTargetInstancesRequestSourceServerIDs - */ -const se_TerminateTargetInstancesRequestSourceServerIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListExportsRequestFiltersExportIDs omitted. -/** - * serializeAws_restJson1WaveIDsFilter - */ -const se_WaveIDsFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListImportsRequestFilters omitted. -/** - * deserializeAws_restJson1Application - */ -const de_Application = (output: any, context: __SerdeContext): Application => { - return { - applicationAggregatedStatus: - output.applicationAggregatedStatus != null - ? de_ApplicationAggregatedStatus(output.applicationAggregatedStatus, context) - : undefined, - applicationID: __expectString(output.applicationID), - arn: __expectString(output.arn), - creationDateTime: __expectString(output.creationDateTime), - description: __expectString(output.description), - isArchived: __expectBoolean(output.isArchived), - lastModifiedDateTime: __expectString(output.lastModifiedDateTime), - name: __expectString(output.name), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - waveID: __expectString(output.waveID), - } as any; -}; +// se_ListWavesRequestFilters omitted. -/** - * deserializeAws_restJson1ApplicationAggregatedStatus - */ -const de_ApplicationAggregatedStatus = (output: any, context: __SerdeContext): ApplicationAggregatedStatus => { - return { - healthStatus: __expectString(output.healthStatus), - lastUpdateDateTime: __expectString(output.lastUpdateDateTime), - progressStatus: __expectString(output.progressStatus), - totalSourceServers: __expectLong(output.totalSourceServers), - } as any; -}; +// se_PostLaunchActions omitted. -/** - * deserializeAws_restJson1ApplicationsList - */ -const de_ApplicationsList = (output: any, context: __SerdeContext): Application[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Application(entry, context); - }); - return retVal; -}; +// se_ReplicationConfigurationReplicatedDisk omitted. -/** - * deserializeAws_restJson1ConflictExceptionErrors - */ -const de_ConflictExceptionErrors = (output: any, context: __SerdeContext): ErrorDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorDetails(entry, context); - }); - return retVal; -}; +// se_ReplicationConfigurationReplicatedDisks omitted. -/** - * deserializeAws_restJson1CPU - */ -const de_CPU = (output: any, context: __SerdeContext): CPU => { - return { - cores: __expectLong(output.cores), - modelName: __expectString(output.modelName), - } as any; -}; +// se_ReplicationConfigurationTemplateIDs omitted. -/** - * deserializeAws_restJson1Cpus - */ -const de_Cpus = (output: any, context: __SerdeContext): CPU[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CPU(entry, context); - }); - return retVal; -}; +// se_ReplicationServersSecurityGroupsIDs omitted. -/** - * deserializeAws_restJson1DataReplicationError - */ -const de_DataReplicationError = (output: any, context: __SerdeContext): DataReplicationError => { - return { - error: __expectString(output.error), - rawError: __expectString(output.rawError), - } as any; -}; +// se_ReplicationTypes omitted. -/** - * deserializeAws_restJson1DataReplicationInfo - */ -const de_DataReplicationInfo = (output: any, context: __SerdeContext): DataReplicationInfo => { - return { - dataReplicationError: - output.dataReplicationError != null ? de_DataReplicationError(output.dataReplicationError, context) : undefined, - dataReplicationInitiation: - output.dataReplicationInitiation != null - ? de_DataReplicationInitiation(output.dataReplicationInitiation, context) - : undefined, - dataReplicationState: __expectString(output.dataReplicationState), - etaDateTime: __expectString(output.etaDateTime), - lagDuration: __expectString(output.lagDuration), - lastSnapshotDateTime: __expectString(output.lastSnapshotDateTime), - replicatedDisks: - output.replicatedDisks != null - ? de_DataReplicationInfoReplicatedDisks(output.replicatedDisks, context) - : undefined, - } as any; -}; +// se_S3BucketSource omitted. -/** - * deserializeAws_restJson1DataReplicationInfoReplicatedDisk - */ -const de_DataReplicationInfoReplicatedDisk = ( - output: any, - context: __SerdeContext -): DataReplicationInfoReplicatedDisk => { - return { - backloggedStorageBytes: __expectLong(output.backloggedStorageBytes), - deviceName: __expectString(output.deviceName), - replicatedStorageBytes: __expectLong(output.replicatedStorageBytes), - rescannedStorageBytes: __expectLong(output.rescannedStorageBytes), - totalStorageBytes: __expectLong(output.totalStorageBytes), - } as any; -}; +// se_SourceServerActionsRequestFilters omitted. -/** - * deserializeAws_restJson1DataReplicationInfoReplicatedDisks - */ -const de_DataReplicationInfoReplicatedDisks = ( - output: any, - context: __SerdeContext -): DataReplicationInfoReplicatedDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataReplicationInfoReplicatedDisk(entry, context); - }); - return retVal; -}; +// se_SsmDocument omitted. -/** - * deserializeAws_restJson1DataReplicationInitiation - */ -const de_DataReplicationInitiation = (output: any, context: __SerdeContext): DataReplicationInitiation => { - return { - nextAttemptDateTime: __expectString(output.nextAttemptDateTime), - startDateTime: __expectString(output.startDateTime), - steps: output.steps != null ? de_DataReplicationInitiationSteps(output.steps, context) : undefined, - } as any; -}; +// se_SsmDocumentExternalParameters omitted. -/** - * deserializeAws_restJson1DataReplicationInitiationStep - */ -const de_DataReplicationInitiationStep = (output: any, context: __SerdeContext): DataReplicationInitiationStep => { - return { - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// se_SsmDocumentParameters omitted. -/** - * deserializeAws_restJson1DataReplicationInitiationSteps - */ -const de_DataReplicationInitiationSteps = (output: any, context: __SerdeContext): DataReplicationInitiationStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataReplicationInitiationStep(entry, context); - }); - return retVal; -}; +// se_SsmDocuments omitted. -/** - * deserializeAws_restJson1Disk - */ -const de_Disk = (output: any, context: __SerdeContext): Disk => { - return { - bytes: __expectLong(output.bytes), - deviceName: __expectString(output.deviceName), - } as any; -}; +// se_SsmExternalParameter omitted. -/** - * deserializeAws_restJson1Disks - */ -const de_Disks = (output: any, context: __SerdeContext): Disk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Disk(entry, context); - }); - return retVal; -}; +// se_SsmParameterStoreParameter omitted. -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - } as any; -}; +// se_SsmParameterStoreParameters omitted. -/** - * deserializeAws_restJson1ExportErrorData - */ -const de_ExportErrorData = (output: any, context: __SerdeContext): ExportErrorData => { - return { - rawError: __expectString(output.rawError), - } as any; -}; +// se_StartCutoverRequestSourceServerIDs omitted. -/** - * deserializeAws_restJson1ExportErrors - */ -const de_ExportErrors = (output: any, context: __SerdeContext): ExportTaskError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportTaskError(entry, context); - }); - return retVal; -}; +// se_StartTestRequestSourceServerIDs omitted. -/** - * deserializeAws_restJson1ExportsList - */ -const de_ExportsList = (output: any, context: __SerdeContext): ExportTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportTask(entry, context); - }); - return retVal; -}; +// se_TagsMap omitted. -/** - * deserializeAws_restJson1ExportTask - */ -const de_ExportTask = (output: any, context: __SerdeContext): ExportTask => { - return { - creationDateTime: __expectString(output.creationDateTime), - endDateTime: __expectString(output.endDateTime), - exportID: __expectString(output.exportID), - progressPercentage: __limitedParseFloat32(output.progressPercentage), - s3Bucket: __expectString(output.s3Bucket), - s3BucketOwner: __expectString(output.s3BucketOwner), - s3Key: __expectString(output.s3Key), - status: __expectString(output.status), - summary: output.summary != null ? de_ExportTaskSummary(output.summary, context) : undefined, - } as any; -}; +// se_TemplateActionsRequestFilters omitted. -/** - * deserializeAws_restJson1ExportTaskError - */ -const de_ExportTaskError = (output: any, context: __SerdeContext): ExportTaskError => { - return { - errorData: output.errorData != null ? de_ExportErrorData(output.errorData, context) : undefined, - errorDateTime: __expectString(output.errorDateTime), - } as any; -}; +// se_TerminateTargetInstancesRequestSourceServerIDs omitted. -/** - * deserializeAws_restJson1ExportTaskSummary - */ -const de_ExportTaskSummary = (output: any, context: __SerdeContext): ExportTaskSummary => { - return { - applicationsCount: __expectLong(output.applicationsCount), - serversCount: __expectLong(output.serversCount), - wavesCount: __expectLong(output.wavesCount), - } as any; -}; +// se_WaveIDsFilter omitted. -/** - * deserializeAws_restJson1IdentificationHints - */ -const de_IdentificationHints = (output: any, context: __SerdeContext): IdentificationHints => { - return { - awsInstanceID: __expectString(output.awsInstanceID), - fqdn: __expectString(output.fqdn), - hostname: __expectString(output.hostname), - vmPath: __expectString(output.vmPath), - vmWareUuid: __expectString(output.vmWareUuid), - } as any; -}; +// de_Application omitted. -/** - * deserializeAws_restJson1ImportErrorData - */ -const de_ImportErrorData = (output: any, context: __SerdeContext): ImportErrorData => { - return { - applicationID: __expectString(output.applicationID), - ec2LaunchTemplateID: __expectString(output.ec2LaunchTemplateID), - rawError: __expectString(output.rawError), - rowNumber: __expectLong(output.rowNumber), - sourceServerID: __expectString(output.sourceServerID), - waveID: __expectString(output.waveID), - } as any; -}; +// de_ApplicationAggregatedStatus omitted. -/** - * deserializeAws_restJson1ImportErrors - */ -const de_ImportErrors = (output: any, context: __SerdeContext): ImportTaskError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportTaskError(entry, context); - }); - return retVal; -}; +// de_ApplicationsList omitted. -/** - * deserializeAws_restJson1ImportList - */ -const de_ImportList = (output: any, context: __SerdeContext): ImportTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportTask(entry, context); - }); - return retVal; -}; +// de_ConflictExceptionErrors omitted. -/** - * deserializeAws_restJson1ImportTask - */ -const de_ImportTask = (output: any, context: __SerdeContext): ImportTask => { - return { - creationDateTime: __expectString(output.creationDateTime), - endDateTime: __expectString(output.endDateTime), - importID: __expectString(output.importID), - progressPercentage: __limitedParseFloat32(output.progressPercentage), - s3BucketSource: output.s3BucketSource != null ? de_S3BucketSource(output.s3BucketSource, context) : undefined, - status: __expectString(output.status), - summary: output.summary != null ? de_ImportTaskSummary(output.summary, context) : undefined, - } as any; -}; +// de_CPU omitted. -/** - * deserializeAws_restJson1ImportTaskError - */ -const de_ImportTaskError = (output: any, context: __SerdeContext): ImportTaskError => { - return { - errorData: output.errorData != null ? de_ImportErrorData(output.errorData, context) : undefined, - errorDateTime: __expectString(output.errorDateTime), - errorType: __expectString(output.errorType), - } as any; -}; +// de_Cpus omitted. -/** - * deserializeAws_restJson1ImportTaskSummary - */ -const de_ImportTaskSummary = (output: any, context: __SerdeContext): ImportTaskSummary => { - return { - applications: - output.applications != null ? de_ImportTaskSummaryApplications(output.applications, context) : undefined, - servers: output.servers != null ? de_ImportTaskSummaryServers(output.servers, context) : undefined, - waves: output.waves != null ? de_ImportTaskSummaryWaves(output.waves, context) : undefined, - } as any; -}; +// de_DataReplicationError omitted. -/** - * deserializeAws_restJson1ImportTaskSummaryApplications - */ -const de_ImportTaskSummaryApplications = (output: any, context: __SerdeContext): ImportTaskSummaryApplications => { - return { - createdCount: __expectLong(output.createdCount), - modifiedCount: __expectLong(output.modifiedCount), - } as any; -}; +// de_DataReplicationInfo omitted. -/** - * deserializeAws_restJson1ImportTaskSummaryServers - */ -const de_ImportTaskSummaryServers = (output: any, context: __SerdeContext): ImportTaskSummaryServers => { - return { - createdCount: __expectLong(output.createdCount), - modifiedCount: __expectLong(output.modifiedCount), - } as any; -}; +// de_DataReplicationInfoReplicatedDisk omitted. -/** - * deserializeAws_restJson1ImportTaskSummaryWaves - */ -const de_ImportTaskSummaryWaves = (output: any, context: __SerdeContext): ImportTaskSummaryWaves => { - return { - createdCount: __expectLong(output.createdCount), - modifiedCount: __expectLong(output.modifiedCount), - } as any; -}; +// de_DataReplicationInfoReplicatedDisks omitted. -/** - * deserializeAws_restJson1IPsList - */ -const de_IPsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DataReplicationInitiation omitted. -/** - * deserializeAws_restJson1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - arn: __expectString(output.arn), - creationDateTime: __expectString(output.creationDateTime), - endDateTime: __expectString(output.endDateTime), - initiatedBy: __expectString(output.initiatedBy), - jobID: __expectString(output.jobID), - participatingServers: - output.participatingServers != null ? de_ParticipatingServers(output.participatingServers, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_DataReplicationInitiationStep omitted. -/** - * deserializeAws_restJson1JobLog - */ -const de_JobLog = (output: any, context: __SerdeContext): JobLog => { - return { - event: __expectString(output.event), - eventData: output.eventData != null ? de_JobLogEventData(output.eventData, context) : undefined, - logDateTime: __expectString(output.logDateTime), - } as any; -}; +// de_DataReplicationInitiationSteps omitted. -/** - * deserializeAws_restJson1JobLogEventData - */ -const de_JobLogEventData = (output: any, context: __SerdeContext): JobLogEventData => { - return { - conversionServerID: __expectString(output.conversionServerID), - rawError: __expectString(output.rawError), - sourceServerID: __expectString(output.sourceServerID), - targetInstanceID: __expectString(output.targetInstanceID), - } as any; -}; +// de_Disk omitted. -/** - * deserializeAws_restJson1JobLogs - */ -const de_JobLogs = (output: any, context: __SerdeContext): JobLog[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobLog(entry, context); - }); - return retVal; -}; +// de_Disks omitted. -/** - * deserializeAws_restJson1JobPostLaunchActionsLaunchStatus - */ -const de_JobPostLaunchActionsLaunchStatus = ( - output: any, - context: __SerdeContext -): JobPostLaunchActionsLaunchStatus => { - return { - executionID: __expectString(output.executionID), - executionStatus: __expectString(output.executionStatus), - failureReason: __expectString(output.failureReason), - ssmDocument: output.ssmDocument != null ? de_SsmDocument(output.ssmDocument, context) : undefined, - ssmDocumentType: __expectString(output.ssmDocumentType), - } as any; -}; +// de_ErrorDetails omitted. + +// de_ExportErrorData omitted. + +// de_ExportErrors omitted. /** - * deserializeAws_restJson1JobsList + * deserializeAws_restJson1ExportsList */ -const de_JobsList = (output: any, context: __SerdeContext): Job[] => { +const de_ExportsList = (output: any, context: __SerdeContext): ExportTask[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Job(entry, context); + return de_ExportTask(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1LaunchConfigurationTemplate + * deserializeAws_restJson1ExportTask */ -const de_LaunchConfigurationTemplate = (output: any, context: __SerdeContext): LaunchConfigurationTemplate => { - return { - arn: __expectString(output.arn), - associatePublicIpAddress: __expectBoolean(output.associatePublicIpAddress), - bootMode: __expectString(output.bootMode), - copyPrivateIp: __expectBoolean(output.copyPrivateIp), - copyTags: __expectBoolean(output.copyTags), - ec2LaunchTemplateID: __expectString(output.ec2LaunchTemplateID), - enableMapAutoTagging: __expectBoolean(output.enableMapAutoTagging), - largeVolumeConf: - output.largeVolumeConf != null ? de_LaunchTemplateDiskConf(output.largeVolumeConf, context) : undefined, - launchConfigurationTemplateID: __expectString(output.launchConfigurationTemplateID), - launchDisposition: __expectString(output.launchDisposition), - licensing: output.licensing != null ? de_Licensing(output.licensing, context) : undefined, - mapAutoTaggingMpeID: __expectString(output.mapAutoTaggingMpeID), - postLaunchActions: - output.postLaunchActions != null ? de_PostLaunchActions(output.postLaunchActions, context) : undefined, - smallVolumeConf: - output.smallVolumeConf != null ? de_LaunchTemplateDiskConf(output.smallVolumeConf, context) : undefined, - smallVolumeMaxSize: __expectLong(output.smallVolumeMaxSize), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - targetInstanceTypeRightSizingMethod: __expectString(output.targetInstanceTypeRightSizingMethod), - } as any; +const de_ExportTask = (output: any, context: __SerdeContext): ExportTask => { + return take(output, { + creationDateTime: __expectString, + endDateTime: __expectString, + exportID: __expectString, + progressPercentage: __limitedParseFloat32, + s3Bucket: __expectString, + s3BucketOwner: __expectString, + s3Key: __expectString, + status: __expectString, + summary: _json, + }) as any; }; +// de_ExportTaskError omitted. + +// de_ExportTaskSummary omitted. + +// de_IdentificationHints omitted. + +// de_ImportErrorData omitted. + +// de_ImportErrors omitted. + /** - * deserializeAws_restJson1LaunchConfigurationTemplates + * deserializeAws_restJson1ImportList */ -const de_LaunchConfigurationTemplates = (output: any, context: __SerdeContext): LaunchConfigurationTemplate[] => { +const de_ImportList = (output: any, context: __SerdeContext): ImportTask[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchConfigurationTemplate(entry, context); + return de_ImportTask(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1LaunchedInstance - */ -const de_LaunchedInstance = (output: any, context: __SerdeContext): LaunchedInstance => { - return { - ec2InstanceID: __expectString(output.ec2InstanceID), - firstBoot: __expectString(output.firstBoot), - jobID: __expectString(output.jobID), - } as any; -}; - -/** - * deserializeAws_restJson1LaunchTemplateDiskConf + * deserializeAws_restJson1ImportTask */ -const de_LaunchTemplateDiskConf = (output: any, context: __SerdeContext): LaunchTemplateDiskConf => { - return { - iops: __expectLong(output.iops), - throughput: __expectLong(output.throughput), - volumeType: __expectString(output.volumeType), - } as any; +const de_ImportTask = (output: any, context: __SerdeContext): ImportTask => { + return take(output, { + creationDateTime: __expectString, + endDateTime: __expectString, + importID: __expectString, + progressPercentage: __limitedParseFloat32, + s3BucketSource: _json, + status: __expectString, + summary: _json, + }) as any; }; -/** - * deserializeAws_restJson1Licensing - */ -const de_Licensing = (output: any, context: __SerdeContext): Licensing => { - return { - osByol: __expectBoolean(output.osByol), - } as any; -}; +// de_ImportTaskError omitted. -/** - * deserializeAws_restJson1LifeCycle - */ -const de_LifeCycle = (output: any, context: __SerdeContext): LifeCycle => { - return { - addedToServiceDateTime: __expectString(output.addedToServiceDateTime), - elapsedReplicationDuration: __expectString(output.elapsedReplicationDuration), - firstByteDateTime: __expectString(output.firstByteDateTime), - lastCutover: output.lastCutover != null ? de_LifeCycleLastCutover(output.lastCutover, context) : undefined, - lastSeenByServiceDateTime: __expectString(output.lastSeenByServiceDateTime), - lastTest: output.lastTest != null ? de_LifeCycleLastTest(output.lastTest, context) : undefined, - state: __expectString(output.state), - } as any; -}; +// de_ImportTaskSummary omitted. -/** - * deserializeAws_restJson1LifeCycleLastCutover - */ -const de_LifeCycleLastCutover = (output: any, context: __SerdeContext): LifeCycleLastCutover => { - return { - finalized: output.finalized != null ? de_LifeCycleLastCutoverFinalized(output.finalized, context) : undefined, - initiated: output.initiated != null ? de_LifeCycleLastCutoverInitiated(output.initiated, context) : undefined, - reverted: output.reverted != null ? de_LifeCycleLastCutoverReverted(output.reverted, context) : undefined, - } as any; -}; +// de_ImportTaskSummaryApplications omitted. -/** - * deserializeAws_restJson1LifeCycleLastCutoverFinalized - */ -const de_LifeCycleLastCutoverFinalized = (output: any, context: __SerdeContext): LifeCycleLastCutoverFinalized => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - } as any; -}; +// de_ImportTaskSummaryServers omitted. -/** - * deserializeAws_restJson1LifeCycleLastCutoverInitiated - */ -const de_LifeCycleLastCutoverInitiated = (output: any, context: __SerdeContext): LifeCycleLastCutoverInitiated => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - jobID: __expectString(output.jobID), - } as any; -}; +// de_ImportTaskSummaryWaves omitted. -/** - * deserializeAws_restJson1LifeCycleLastCutoverReverted - */ -const de_LifeCycleLastCutoverReverted = (output: any, context: __SerdeContext): LifeCycleLastCutoverReverted => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - } as any; -}; +// de_IPsList omitted. -/** - * deserializeAws_restJson1LifeCycleLastTest - */ -const de_LifeCycleLastTest = (output: any, context: __SerdeContext): LifeCycleLastTest => { - return { - finalized: output.finalized != null ? de_LifeCycleLastTestFinalized(output.finalized, context) : undefined, - initiated: output.initiated != null ? de_LifeCycleLastTestInitiated(output.initiated, context) : undefined, - reverted: output.reverted != null ? de_LifeCycleLastTestReverted(output.reverted, context) : undefined, - } as any; -}; +// de_Job omitted. -/** - * deserializeAws_restJson1LifeCycleLastTestFinalized - */ -const de_LifeCycleLastTestFinalized = (output: any, context: __SerdeContext): LifeCycleLastTestFinalized => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - } as any; -}; +// de_JobLog omitted. -/** - * deserializeAws_restJson1LifeCycleLastTestInitiated - */ -const de_LifeCycleLastTestInitiated = (output: any, context: __SerdeContext): LifeCycleLastTestInitiated => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - jobID: __expectString(output.jobID), - } as any; -}; +// de_JobLogEventData omitted. -/** - * deserializeAws_restJson1LifeCycleLastTestReverted - */ -const de_LifeCycleLastTestReverted = (output: any, context: __SerdeContext): LifeCycleLastTestReverted => { - return { - apiCallDateTime: __expectString(output.apiCallDateTime), - } as any; -}; +// de_JobLogs omitted. -/** - * deserializeAws_restJson1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - ips: output.ips != null ? de_IPsList(output.ips, context) : undefined, - isPrimary: __expectBoolean(output.isPrimary), - macAddress: __expectString(output.macAddress), - } as any; -}; +// de_JobPostLaunchActionsLaunchStatus omitted. /** - * deserializeAws_restJson1NetworkInterfaces + * deserializeAws_restJson1JobsList */ -const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { +const de_JobsList = (output: any, context: __SerdeContext): Job[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); + return _json(entry); }); return retVal; }; -/** - * deserializeAws_restJson1OS - */ -const de_OS = (output: any, context: __SerdeContext): OS => { - return { - fullString: __expectString(output.fullString), - } as any; -}; +// de_LaunchConfigurationTemplate omitted. -/** - * deserializeAws_restJson1ParticipatingServer - */ -const de_ParticipatingServer = (output: any, context: __SerdeContext): ParticipatingServer => { - return { - launchStatus: __expectString(output.launchStatus), - launchedEc2InstanceID: __expectString(output.launchedEc2InstanceID), - postLaunchActionsStatus: - output.postLaunchActionsStatus != null - ? de_PostLaunchActionsStatus(output.postLaunchActionsStatus, context) - : undefined, - sourceServerID: __expectString(output.sourceServerID), - } as any; -}; +// de_LaunchConfigurationTemplates omitted. -/** - * deserializeAws_restJson1ParticipatingServers - */ -const de_ParticipatingServers = (output: any, context: __SerdeContext): ParticipatingServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParticipatingServer(entry, context); - }); - return retVal; -}; +// de_LaunchedInstance omitted. -/** - * deserializeAws_restJson1PostLaunchActions - */ -const de_PostLaunchActions = (output: any, context: __SerdeContext): PostLaunchActions => { - return { - cloudWatchLogGroupName: __expectString(output.cloudWatchLogGroupName), - deployment: __expectString(output.deployment), - s3LogBucket: __expectString(output.s3LogBucket), - s3OutputKeyPrefix: __expectString(output.s3OutputKeyPrefix), - ssmDocuments: output.ssmDocuments != null ? de_SsmDocuments(output.ssmDocuments, context) : undefined, - } as any; -}; +// de_LaunchTemplateDiskConf omitted. -/** - * deserializeAws_restJson1PostLaunchActionsLaunchStatusList - */ -const de_PostLaunchActionsLaunchStatusList = ( - output: any, - context: __SerdeContext -): JobPostLaunchActionsLaunchStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobPostLaunchActionsLaunchStatus(entry, context); - }); - return retVal; -}; +// de_Licensing omitted. -/** - * deserializeAws_restJson1PostLaunchActionsStatus - */ -const de_PostLaunchActionsStatus = (output: any, context: __SerdeContext): PostLaunchActionsStatus => { - return { - postLaunchActionsLaunchStatusList: - output.postLaunchActionsLaunchStatusList != null - ? de_PostLaunchActionsLaunchStatusList(output.postLaunchActionsLaunchStatusList, context) - : undefined, - ssmAgentDiscoveryDatetime: __expectString(output.ssmAgentDiscoveryDatetime), - } as any; -}; +// de_LifeCycle omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationReplicatedDisk - */ -const de_ReplicationConfigurationReplicatedDisk = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationReplicatedDisk => { - return { - deviceName: __expectString(output.deviceName), - iops: __expectLong(output.iops), - isBootDisk: __expectBoolean(output.isBootDisk), - stagingDiskType: __expectString(output.stagingDiskType), - throughput: __expectLong(output.throughput), - } as any; -}; +// de_LifeCycleLastCutover omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationReplicatedDisks - */ -const de_ReplicationConfigurationReplicatedDisks = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationReplicatedDisk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationConfigurationReplicatedDisk(entry, context); - }); - return retVal; -}; +// de_LifeCycleLastCutoverFinalized omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationTemplate - */ -const de_ReplicationConfigurationTemplate = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationTemplate => { - return { - arn: __expectString(output.arn), - associateDefaultSecurityGroup: __expectBoolean(output.associateDefaultSecurityGroup), - bandwidthThrottling: __expectLong(output.bandwidthThrottling), - createPublicIP: __expectBoolean(output.createPublicIP), - dataPlaneRouting: __expectString(output.dataPlaneRouting), - defaultLargeStagingDiskType: __expectString(output.defaultLargeStagingDiskType), - ebsEncryption: __expectString(output.ebsEncryption), - ebsEncryptionKeyArn: __expectString(output.ebsEncryptionKeyArn), - replicationConfigurationTemplateID: __expectString(output.replicationConfigurationTemplateID), - replicationServerInstanceType: __expectString(output.replicationServerInstanceType), - replicationServersSecurityGroupsIDs: - output.replicationServersSecurityGroupsIDs != null - ? de_ReplicationServersSecurityGroupsIDs(output.replicationServersSecurityGroupsIDs, context) - : undefined, - stagingAreaSubnetId: __expectString(output.stagingAreaSubnetId), - stagingAreaTags: output.stagingAreaTags != null ? de_TagsMap(output.stagingAreaTags, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - useDedicatedReplicationServer: __expectBoolean(output.useDedicatedReplicationServer), - } as any; -}; +// de_LifeCycleLastCutoverInitiated omitted. -/** - * deserializeAws_restJson1ReplicationConfigurationTemplates - */ -const de_ReplicationConfigurationTemplates = ( - output: any, - context: __SerdeContext -): ReplicationConfigurationTemplate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReplicationConfigurationTemplate(entry, context); - }); - return retVal; -}; +// de_LifeCycleLastCutoverReverted omitted. -/** - * deserializeAws_restJson1ReplicationServersSecurityGroupsIDs - */ -const de_ReplicationServersSecurityGroupsIDs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LifeCycleLastTest omitted. -/** - * deserializeAws_restJson1S3BucketSource - */ -const de_S3BucketSource = (output: any, context: __SerdeContext): S3BucketSource => { - return { - s3Bucket: __expectString(output.s3Bucket), - s3BucketOwner: __expectString(output.s3BucketOwner), - s3Key: __expectString(output.s3Key), - } as any; -}; +// de_LifeCycleLastTestFinalized omitted. -/** - * deserializeAws_restJson1SourceProperties - */ -const de_SourceProperties = (output: any, context: __SerdeContext): SourceProperties => { - return { - cpus: output.cpus != null ? de_Cpus(output.cpus, context) : undefined, - disks: output.disks != null ? de_Disks(output.disks, context) : undefined, - identificationHints: - output.identificationHints != null ? de_IdentificationHints(output.identificationHints, context) : undefined, - lastUpdatedDateTime: __expectString(output.lastUpdatedDateTime), - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaces(output.networkInterfaces, context) : undefined, - os: output.os != null ? de_OS(output.os, context) : undefined, - ramBytes: __expectLong(output.ramBytes), - recommendedInstanceType: __expectString(output.recommendedInstanceType), - } as any; -}; +// de_LifeCycleLastTestInitiated omitted. -/** - * deserializeAws_restJson1SourceServer - */ -const de_SourceServer = (output: any, context: __SerdeContext): SourceServer => { - return { - applicationID: __expectString(output.applicationID), - arn: __expectString(output.arn), - dataReplicationInfo: - output.dataReplicationInfo != null ? de_DataReplicationInfo(output.dataReplicationInfo, context) : undefined, - fqdnForActionFramework: __expectString(output.fqdnForActionFramework), - isArchived: __expectBoolean(output.isArchived), - launchedInstance: - output.launchedInstance != null ? de_LaunchedInstance(output.launchedInstance, context) : undefined, - lifeCycle: output.lifeCycle != null ? de_LifeCycle(output.lifeCycle, context) : undefined, - replicationType: __expectString(output.replicationType), - sourceProperties: - output.sourceProperties != null ? de_SourceProperties(output.sourceProperties, context) : undefined, - sourceServerID: __expectString(output.sourceServerID), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - userProvidedID: __expectString(output.userProvidedID), - vcenterClientID: __expectString(output.vcenterClientID), - } as any; -}; +// de_LifeCycleLastTestReverted omitted. -/** - * deserializeAws_restJson1SourceServerActionDocument - */ -const de_SourceServerActionDocument = (output: any, context: __SerdeContext): SourceServerActionDocument => { - return { - actionID: __expectString(output.actionID), - actionName: __expectString(output.actionName), - active: __expectBoolean(output.active), - category: __expectString(output.category), - description: __expectString(output.description), - documentIdentifier: __expectString(output.documentIdentifier), - documentVersion: __expectString(output.documentVersion), - externalParameters: - output.externalParameters != null - ? de_SsmDocumentExternalParameters(output.externalParameters, context) - : undefined, - mustSucceedForCutover: __expectBoolean(output.mustSucceedForCutover), - order: __expectInt32(output.order), - parameters: output.parameters != null ? de_SsmDocumentParameters(output.parameters, context) : undefined, - timeoutSeconds: __expectInt32(output.timeoutSeconds), - } as any; -}; +// de_NetworkInterface omitted. -/** - * deserializeAws_restJson1SourceServerActionDocuments - */ -const de_SourceServerActionDocuments = (output: any, context: __SerdeContext): SourceServerActionDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceServerActionDocument(entry, context); - }); - return retVal; -}; +// de_NetworkInterfaces omitted. -/** - * deserializeAws_restJson1SourceServersList - */ -const de_SourceServersList = (output: any, context: __SerdeContext): SourceServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceServer(entry, context); - }); - return retVal; -}; +// de_OS omitted. -/** - * deserializeAws_restJson1SsmDocument - */ -const de_SsmDocument = (output: any, context: __SerdeContext): SsmDocument => { - return { - actionName: __expectString(output.actionName), - externalParameters: - output.externalParameters != null - ? de_SsmDocumentExternalParameters(output.externalParameters, context) - : undefined, - mustSucceedForCutover: __expectBoolean(output.mustSucceedForCutover), - parameters: output.parameters != null ? de_SsmDocumentParameters(output.parameters, context) : undefined, - ssmDocumentName: __expectString(output.ssmDocumentName), - timeoutSeconds: __expectInt32(output.timeoutSeconds), - } as any; -}; +// de_ParticipatingServer omitted. -/** - * deserializeAws_restJson1SsmDocumentExternalParameters - */ -const de_SsmDocumentExternalParameters = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SsmExternalParameter(__expectUnion(value), context); - return acc; - }, {}); -}; +// de_ParticipatingServers omitted. -/** - * deserializeAws_restJson1SsmDocumentParameters - */ -const de_SsmDocumentParameters = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SsmParameterStoreParameters(value, context); - return acc; - }, - {} - ); -}; +// de_PostLaunchActions omitted. -/** - * deserializeAws_restJson1SsmDocuments - */ -const de_SsmDocuments = (output: any, context: __SerdeContext): SsmDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SsmDocument(entry, context); - }); - return retVal; -}; +// de_PostLaunchActionsLaunchStatusList omitted. -/** - * deserializeAws_restJson1SsmExternalParameter - */ -const de_SsmExternalParameter = (output: any, context: __SerdeContext): SsmExternalParameter => { - if (__expectString(output.dynamicPath) !== undefined) { - return { dynamicPath: __expectString(output.dynamicPath) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_PostLaunchActionsStatus omitted. -/** - * deserializeAws_restJson1SsmParameterStoreParameter - */ -const de_SsmParameterStoreParameter = (output: any, context: __SerdeContext): SsmParameterStoreParameter => { - return { - parameterName: __expectString(output.parameterName), - parameterType: __expectString(output.parameterType), - } as any; -}; +// de_ReplicationConfigurationReplicatedDisk omitted. -/** - * deserializeAws_restJson1SsmParameterStoreParameters - */ -const de_SsmParameterStoreParameters = (output: any, context: __SerdeContext): SsmParameterStoreParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SsmParameterStoreParameter(entry, context); - }); - return retVal; -}; +// de_ReplicationConfigurationReplicatedDisks omitted. -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ReplicationConfigurationTemplate omitted. -/** - * deserializeAws_restJson1TemplateActionDocument - */ -const de_TemplateActionDocument = (output: any, context: __SerdeContext): TemplateActionDocument => { - return { - actionID: __expectString(output.actionID), - actionName: __expectString(output.actionName), - active: __expectBoolean(output.active), - category: __expectString(output.category), - description: __expectString(output.description), - documentIdentifier: __expectString(output.documentIdentifier), - documentVersion: __expectString(output.documentVersion), - externalParameters: - output.externalParameters != null - ? de_SsmDocumentExternalParameters(output.externalParameters, context) - : undefined, - mustSucceedForCutover: __expectBoolean(output.mustSucceedForCutover), - operatingSystem: __expectString(output.operatingSystem), - order: __expectInt32(output.order), - parameters: output.parameters != null ? de_SsmDocumentParameters(output.parameters, context) : undefined, - timeoutSeconds: __expectInt32(output.timeoutSeconds), - } as any; -}; +// de_ReplicationConfigurationTemplates omitted. -/** - * deserializeAws_restJson1TemplateActionDocuments - */ -const de_TemplateActionDocuments = (output: any, context: __SerdeContext): TemplateActionDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateActionDocument(entry, context); - }); - return retVal; -}; +// de_ReplicationServersSecurityGroupsIDs omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_S3BucketSource omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_SourceProperties omitted. -/** - * deserializeAws_restJson1VcenterClient - */ -const de_VcenterClient = (output: any, context: __SerdeContext): VcenterClient => { - return { - arn: __expectString(output.arn), - datacenterName: __expectString(output.datacenterName), - hostname: __expectString(output.hostname), - lastSeenDatetime: __expectString(output.lastSeenDatetime), - sourceServerTags: output.sourceServerTags != null ? de_TagsMap(output.sourceServerTags, context) : undefined, - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - vcenterClientID: __expectString(output.vcenterClientID), - vcenterUUID: __expectString(output.vcenterUUID), - } as any; -}; +// de_SourceServer omitted. -/** - * deserializeAws_restJson1VcenterClientList - */ -const de_VcenterClientList = (output: any, context: __SerdeContext): VcenterClient[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VcenterClient(entry, context); - }); - return retVal; -}; +// de_SourceServerActionDocument omitted. -/** - * deserializeAws_restJson1Wave - */ -const de_Wave = (output: any, context: __SerdeContext): Wave => { - return { - arn: __expectString(output.arn), - creationDateTime: __expectString(output.creationDateTime), - description: __expectString(output.description), - isArchived: __expectBoolean(output.isArchived), - lastModifiedDateTime: __expectString(output.lastModifiedDateTime), - name: __expectString(output.name), - tags: output.tags != null ? de_TagsMap(output.tags, context) : undefined, - waveAggregatedStatus: - output.waveAggregatedStatus != null ? de_WaveAggregatedStatus(output.waveAggregatedStatus, context) : undefined, - waveID: __expectString(output.waveID), - } as any; -}; +// de_SourceServerActionDocuments omitted. -/** - * deserializeAws_restJson1WaveAggregatedStatus - */ -const de_WaveAggregatedStatus = (output: any, context: __SerdeContext): WaveAggregatedStatus => { - return { - healthStatus: __expectString(output.healthStatus), - lastUpdateDateTime: __expectString(output.lastUpdateDateTime), - progressStatus: __expectString(output.progressStatus), - replicationStartedDateTime: __expectString(output.replicationStartedDateTime), - totalApplications: __expectLong(output.totalApplications), - } as any; -}; +// de_SourceServersList omitted. -/** - * deserializeAws_restJson1WavesList - */ -const de_WavesList = (output: any, context: __SerdeContext): Wave[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Wave(entry, context); - }); - return retVal; -}; +// de_SsmDocument omitted. + +// de_SsmDocumentExternalParameters omitted. + +// de_SsmDocumentParameters omitted. + +// de_SsmDocuments omitted. + +// de_SsmExternalParameter omitted. + +// de_SsmParameterStoreParameter omitted. + +// de_SsmParameterStoreParameters omitted. + +// de_TagsMap omitted. + +// de_TemplateActionDocument omitted. + +// de_TemplateActionDocuments omitted. + +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. + +// de_VcenterClient omitted. + +// de_VcenterClientList omitted. + +// de_Wave omitted. + +// de_WaveAggregatedStatus omitted. + +// de_WavesList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts b/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts index 45dc2c37bdf8..3ebde8226046 100644 --- a/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts +++ b/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -8,11 +9,12 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -57,30 +59,23 @@ import { UpdateRouteCommandInput, UpdateRouteCommandOutput } from "../commands/U import { MigrationHubRefactorSpacesServiceException as __BaseException } from "../models/MigrationHubRefactorSpacesServiceException"; import { AccessDeniedException, - ApiGatewayProxyConfig, ApiGatewayProxyInput, - ApiGatewayProxySummary, ApplicationSummary, ConflictException, DefaultRouteInput, EnvironmentSummary, EnvironmentVpc, - ErrorResponse, HttpMethod, InternalServerException, InvalidResourcePolicyException, - LambdaEndpointConfig, LambdaEndpointInput, - LambdaEndpointSummary, ResourceNotFoundException, RouteSummary, ServiceQuotaExceededException, ServiceSummary, ThrottlingException, UriPathRouteInput, - UrlEndpointConfig, UrlEndpointInput, - UrlEndpointSummary, ValidationException, } from "../models/models_0"; @@ -107,14 +102,16 @@ export const se_CreateApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ApiGatewayProxy != null && { ApiGatewayProxy: se_ApiGatewayProxyInput(input.ApiGatewayProxy, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.ProxyType != null && { ProxyType: input.ProxyType }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }); + body = JSON.stringify( + take(input, { + ApiGatewayProxy: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + ProxyType: [], + Tags: (_) => _json(_), + VpcId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -139,13 +136,15 @@ export const se_CreateEnvironmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NetworkFabricType != null && { NetworkFabricType: input.NetworkFabricType }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + NetworkFabricType: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -188,14 +187,16 @@ export const se_CreateRouteCommand = async ( false ); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DefaultRoute != null && { DefaultRoute: se_DefaultRouteInput(input.DefaultRoute, context) }), - ...(input.RouteType != null && { RouteType: input.RouteType }), - ...(input.ServiceIdentifier != null && { ServiceIdentifier: input.ServiceIdentifier }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.UriPathRoute != null && { UriPathRoute: se_UriPathRouteInput(input.UriPathRoute, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DefaultRoute: (_) => _json(_), + RouteType: [], + ServiceIdentifier: [], + Tags: (_) => _json(_), + UriPathRoute: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -238,16 +239,18 @@ export const se_CreateServiceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.LambdaEndpoint != null && { LambdaEndpoint: se_LambdaEndpointInput(input.LambdaEndpoint, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.UrlEndpoint != null && { UrlEndpoint: se_UrlEndpointInput(input.UrlEndpoint, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + EndpointType: [], + LambdaEndpoint: (_) => _json(_), + Name: [], + Tags: (_) => _json(_), + UrlEndpoint: (_) => _json(_), + VpcId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -868,10 +871,12 @@ export const se_PutResourcePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcepolicy"; let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -897,9 +902,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -980,9 +987,11 @@ export const se_UpdateRouteCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ActivationState != null && { ActivationState: input.ActivationState }), - }); + body = JSON.stringify( + take(input, { + ActivationState: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1008,45 +1017,22 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApiGatewayProxy != null) { - contents.ApiGatewayProxy = de_ApiGatewayProxyInput(data.ApiGatewayProxy, context); - } - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedByAccountId != null) { - contents.CreatedByAccountId = __expectString(data.CreatedByAccountId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.ProxyType != null) { - contents.ProxyType = __expectString(data.ProxyType); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.VpcId != null) { - contents.VpcId = __expectString(data.VpcId); - } + const doc = take(data, { + ApiGatewayProxy: _json, + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnvironmentId: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OwnerAccountId: __expectString, + ProxyType: __expectString, + State: __expectString, + Tags: _json, + VpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1086,10 +1072,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1109,36 +1094,19 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.NetworkFabricType != null) { - contents.NetworkFabricType = __expectString(data.NetworkFabricType); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EnvironmentId: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NetworkFabricType: __expectString, + OwnerAccountId: __expectString, + State: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1178,10 +1146,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1201,42 +1168,21 @@ export const de_CreateRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedByAccountId != null) { - contents.CreatedByAccountId = __expectString(data.CreatedByAccountId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.RouteId != null) { - contents.RouteId = __expectString(data.RouteId); - } - if (data.RouteType != null) { - contents.RouteType = __expectString(data.RouteType); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UriPathRoute != null) { - contents.UriPathRoute = de_UriPathRouteInput(data.UriPathRoute, context); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwnerAccountId: __expectString, + RouteId: __expectString, + RouteType: __expectString, + ServiceId: __expectString, + State: __expectString, + Tags: _json, + UriPathRoute: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1276,10 +1222,9 @@ const de_CreateRouteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1299,54 +1244,25 @@ export const de_CreateServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedByAccountId != null) { - contents.CreatedByAccountId = __expectString(data.CreatedByAccountId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EndpointType != null) { - contents.EndpointType = __expectString(data.EndpointType); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.LambdaEndpoint != null) { - contents.LambdaEndpoint = de_LambdaEndpointInput(data.LambdaEndpoint, context); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UrlEndpoint != null) { - contents.UrlEndpoint = de_UrlEndpointInput(data.UrlEndpoint, context); - } - if (data.VpcId != null) { - contents.VpcId = __expectString(data.VpcId); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EndpointType: __expectString, + EnvironmentId: __expectString, + LambdaEndpoint: _json, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OwnerAccountId: __expectString, + ServiceId: __expectString, + State: __expectString, + Tags: _json, + UrlEndpoint: _json, + VpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1386,10 +1302,9 @@ const de_CreateServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1409,24 +1324,15 @@ export const de_DeleteApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + EnvironmentId: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1463,10 +1369,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1486,21 +1391,14 @@ export const de_DeleteEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + EnvironmentId: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1537,10 +1435,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1593,10 +1490,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1616,24 +1512,15 @@ export const de_DeleteRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.RouteId != null) { - contents.RouteId = __expectString(data.RouteId); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RouteId: __expectString, + ServiceId: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1670,10 +1557,9 @@ const de_DeleteRouteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1693,27 +1579,16 @@ export const de_DeleteServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + EnvironmentId: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ServiceId: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1750,10 +1625,9 @@ const de_DeleteServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1773,48 +1647,23 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApiGatewayProxy != null) { - contents.ApiGatewayProxy = de_ApiGatewayProxyConfig(data.ApiGatewayProxy, context); - } - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedByAccountId != null) { - contents.CreatedByAccountId = __expectString(data.CreatedByAccountId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.Error != null) { - contents.Error = de_ErrorResponse(data.Error, context); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.ProxyType != null) { - contents.ProxyType = __expectString(data.ProxyType); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.VpcId != null) { - contents.VpcId = __expectString(data.VpcId); - } + const doc = take(data, { + ApiGatewayProxy: _json, + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnvironmentId: __expectString, + Error: _json, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OwnerAccountId: __expectString, + ProxyType: __expectString, + State: __expectString, + Tags: _json, + VpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1848,10 +1697,9 @@ const de_GetApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1871,42 +1719,21 @@ export const de_GetEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.Error != null) { - contents.Error = de_ErrorResponse(data.Error, context); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.NetworkFabricType != null) { - contents.NetworkFabricType = __expectString(data.NetworkFabricType); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.TransitGatewayId != null) { - contents.TransitGatewayId = __expectString(data.TransitGatewayId); - } + const doc = take(data, { + Arn: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EnvironmentId: __expectString, + Error: _json, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NetworkFabricType: __expectString, + OwnerAccountId: __expectString, + State: __expectString, + Tags: _json, + TransitGatewayId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1940,10 +1767,9 @@ const de_GetEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1963,9 +1789,10 @@ export const de_GetResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1999,10 +1826,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2022,57 +1848,26 @@ export const de_GetRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedByAccountId != null) { - contents.CreatedByAccountId = __expectString(data.CreatedByAccountId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.Error != null) { - contents.Error = de_ErrorResponse(data.Error, context); - } - if (data.IncludeChildPaths != null) { - contents.IncludeChildPaths = __expectBoolean(data.IncludeChildPaths); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Methods != null) { - contents.Methods = de_HttpMethods(data.Methods, context); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.PathResourceToId != null) { - contents.PathResourceToId = de_PathResourceToId(data.PathResourceToId, context); - } - if (data.RouteId != null) { - contents.RouteId = __expectString(data.RouteId); - } - if (data.RouteType != null) { - contents.RouteType = __expectString(data.RouteType); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.SourcePath != null) { - contents.SourcePath = __expectString(data.SourcePath); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnvironmentId: __expectString, + Error: _json, + IncludeChildPaths: __expectBoolean, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Methods: _json, + OwnerAccountId: __expectString, + PathResourceToId: _json, + RouteId: __expectString, + RouteType: __expectString, + ServiceId: __expectString, + SourcePath: __expectString, + State: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2106,10 +1901,9 @@ const de_GetRouteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2129,57 +1923,26 @@ export const de_GetServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedByAccountId != null) { - contents.CreatedByAccountId = __expectString(data.CreatedByAccountId); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EndpointType != null) { - contents.EndpointType = __expectString(data.EndpointType); - } - if (data.EnvironmentId != null) { - contents.EnvironmentId = __expectString(data.EnvironmentId); - } - if (data.Error != null) { - contents.Error = de_ErrorResponse(data.Error, context); - } - if (data.LambdaEndpoint != null) { - contents.LambdaEndpoint = de_LambdaEndpointConfig(data.LambdaEndpoint, context); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OwnerAccountId != null) { - contents.OwnerAccountId = __expectString(data.OwnerAccountId); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.UrlEndpoint != null) { - contents.UrlEndpoint = de_UrlEndpointConfig(data.UrlEndpoint, context); - } - if (data.VpcId != null) { - contents.VpcId = __expectString(data.VpcId); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EndpointType: __expectString, + EnvironmentId: __expectString, + Error: _json, + LambdaEndpoint: _json, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OwnerAccountId: __expectString, + ServiceId: __expectString, + State: __expectString, + Tags: _json, + UrlEndpoint: _json, + VpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2213,10 +1976,9 @@ const de_GetServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2236,12 +1998,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationSummaryList != null) { - contents.ApplicationSummaryList = de_ApplicationSummaries(data.ApplicationSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ApplicationSummaryList: (_) => de_ApplicationSummaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2281,10 +2042,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2304,12 +2064,11 @@ export const de_ListEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EnvironmentSummaryList != null) { - contents.EnvironmentSummaryList = de_EnvironmentSummaries(data.EnvironmentSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EnvironmentSummaryList: (_) => de_EnvironmentSummaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2343,10 +2102,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2366,12 +2124,11 @@ export const de_ListEnvironmentVpcsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EnvironmentVpcList != null) { - contents.EnvironmentVpcList = de_EnvironmentVpcs(data.EnvironmentVpcList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EnvironmentVpcList: (_) => de_EnvironmentVpcs(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2405,10 +2162,9 @@ const de_ListEnvironmentVpcsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2428,12 +2184,11 @@ export const de_ListRoutesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RouteSummaryList != null) { - contents.RouteSummaryList = de_RouteSummaries(data.RouteSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RouteSummaryList: (_) => de_RouteSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2473,10 +2228,9 @@ const de_ListRoutesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2496,12 +2250,11 @@ export const de_ListServicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ServiceSummaryList != null) { - contents.ServiceSummaryList = de_ServiceSummaries(data.ServiceSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + ServiceSummaryList: (_) => de_ServiceSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2541,10 +2294,9 @@ const de_ListServicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2564,9 +2316,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2594,10 +2347,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2653,10 +2405,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2703,10 +2454,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2753,10 +2503,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2776,24 +2525,15 @@ export const de_UpdateRouteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationId != null) { - contents.ApplicationId = __expectString(data.ApplicationId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.RouteId != null) { - contents.RouteId = __expectString(data.RouteId); - } - if (data.ServiceId != null) { - contents.ServiceId = __expectString(data.ServiceId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + ApplicationId: __expectString, + Arn: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RouteId: __expectString, + ServiceId: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2827,16 +2567,15 @@ const de_UpdateRouteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2846,9 +2585,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2862,15 +2602,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2887,9 +2624,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2906,9 +2644,10 @@ const de_InvalidResourcePolicyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidResourcePolicyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2925,15 +2664,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2950,21 +2686,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2983,15 +2712,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3005,9 +2731,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3015,132 +2742,27 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApiGatewayProxyInput - */ -const se_ApiGatewayProxyInput = (input: ApiGatewayProxyInput, context: __SerdeContext): any => { - return { - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.StageName != null && { StageName: input.StageName }), - }; -}; +// se_ApiGatewayProxyInput omitted. -/** - * serializeAws_restJson1DefaultRouteInput - */ -const se_DefaultRouteInput = (input: DefaultRouteInput, context: __SerdeContext): any => { - return { - ...(input.ActivationState != null && { ActivationState: input.ActivationState }), - }; -}; +// se_DefaultRouteInput omitted. -/** - * serializeAws_restJson1HttpMethods - */ -const se_HttpMethods = (input: (HttpMethod | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HttpMethods omitted. -/** - * serializeAws_restJson1LambdaEndpointInput - */ -const se_LambdaEndpointInput = (input: LambdaEndpointInput, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_LambdaEndpointInput omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1UriPathRouteInput - */ -const se_UriPathRouteInput = (input: UriPathRouteInput, context: __SerdeContext): any => { - return { - ...(input.ActivationState != null && { ActivationState: input.ActivationState }), - ...(input.IncludeChildPaths != null && { IncludeChildPaths: input.IncludeChildPaths }), - ...(input.Methods != null && { Methods: se_HttpMethods(input.Methods, context) }), - ...(input.SourcePath != null && { SourcePath: input.SourcePath }), - }; -}; +// se_UriPathRouteInput omitted. -/** - * serializeAws_restJson1UrlEndpointInput - */ -const se_UrlEndpointInput = (input: UrlEndpointInput, context: __SerdeContext): any => { - return { - ...(input.HealthUrl != null && { HealthUrl: input.HealthUrl }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_UrlEndpointInput omitted. -/** - * deserializeAws_restJson1AdditionalDetails - */ -const de_AdditionalDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AdditionalDetails omitted. -/** - * deserializeAws_restJson1ApiGatewayProxyConfig - */ -const de_ApiGatewayProxyConfig = (output: any, context: __SerdeContext): ApiGatewayProxyConfig => { - return { - ApiGatewayId: __expectString(output.ApiGatewayId), - EndpointType: __expectString(output.EndpointType), - NlbArn: __expectString(output.NlbArn), - NlbName: __expectString(output.NlbName), - ProxyUrl: __expectString(output.ProxyUrl), - StageName: __expectString(output.StageName), - VpcLinkId: __expectString(output.VpcLinkId), - } as any; -}; +// de_ApiGatewayProxyConfig omitted. -/** - * deserializeAws_restJson1ApiGatewayProxyInput - */ -const de_ApiGatewayProxyInput = (output: any, context: __SerdeContext): ApiGatewayProxyInput => { - return { - EndpointType: __expectString(output.EndpointType), - StageName: __expectString(output.StageName), - } as any; -}; +// de_ApiGatewayProxyInput omitted. -/** - * deserializeAws_restJson1ApiGatewayProxySummary - */ -const de_ApiGatewayProxySummary = (output: any, context: __SerdeContext): ApiGatewayProxySummary => { - return { - ApiGatewayId: __expectString(output.ApiGatewayId), - EndpointType: __expectString(output.EndpointType), - NlbArn: __expectString(output.NlbArn), - NlbName: __expectString(output.NlbName), - ProxyUrl: __expectString(output.ProxyUrl), - StageName: __expectString(output.StageName), - VpcLinkId: __expectString(output.VpcLinkId), - } as any; -}; +// de_ApiGatewayProxySummary omitted. /** * deserializeAws_restJson1ApplicationSummaries @@ -3149,9 +2771,6 @@ const de_ApplicationSummaries = (output: any, context: __SerdeContext): Applicat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationSummary(entry, context); }); return retVal; @@ -3161,45 +2780,25 @@ const de_ApplicationSummaries = (output: any, context: __SerdeContext): Applicat * deserializeAws_restJson1ApplicationSummary */ const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - ApiGatewayProxy: - output.ApiGatewayProxy != null ? de_ApiGatewayProxySummary(output.ApiGatewayProxy, context) : undefined, - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - CreatedByAccountId: __expectString(output.CreatedByAccountId), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - EnvironmentId: __expectString(output.EnvironmentId), - Error: output.Error != null ? de_ErrorResponse(output.Error, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - OwnerAccountId: __expectString(output.OwnerAccountId), - ProxyType: __expectString(output.ProxyType), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1CidrBlocks - */ -const de_CidrBlocks = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + ApiGatewayProxy: _json, + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnvironmentId: __expectString, + Error: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OwnerAccountId: __expectString, + ProxyType: __expectString, + State: __expectString, + Tags: _json, + VpcId: __expectString, + }) as any; +}; + +// de_CidrBlocks omitted. /** * deserializeAws_restJson1EnvironmentSummaries @@ -3208,9 +2807,6 @@ const de_EnvironmentSummaries = (output: any, context: __SerdeContext): Environm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentSummary(entry, context); }); return retVal; @@ -3220,47 +2816,35 @@ const de_EnvironmentSummaries = (output: any, context: __SerdeContext): Environm * deserializeAws_restJson1EnvironmentSummary */ const de_EnvironmentSummary = (output: any, context: __SerdeContext): EnvironmentSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - EnvironmentId: __expectString(output.EnvironmentId), - Error: output.Error != null ? de_ErrorResponse(output.Error, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - NetworkFabricType: __expectString(output.NetworkFabricType), - OwnerAccountId: __expectString(output.OwnerAccountId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - TransitGatewayId: __expectString(output.TransitGatewayId), - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EnvironmentId: __expectString, + Error: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NetworkFabricType: __expectString, + OwnerAccountId: __expectString, + State: __expectString, + Tags: _json, + TransitGatewayId: __expectString, + }) as any; }; /** * deserializeAws_restJson1EnvironmentVpc */ const de_EnvironmentVpc = (output: any, context: __SerdeContext): EnvironmentVpc => { - return { - AccountId: __expectString(output.AccountId), - CidrBlocks: output.CidrBlocks != null ? de_CidrBlocks(output.CidrBlocks, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - EnvironmentId: __expectString(output.EnvironmentId), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - VpcId: __expectString(output.VpcId), - VpcName: __expectString(output.VpcName), - } as any; + return take(output, { + AccountId: __expectString, + CidrBlocks: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnvironmentId: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VpcId: __expectString, + VpcName: __expectString, + }) as any; }; /** @@ -3270,83 +2854,22 @@ const de_EnvironmentVpcs = (output: any, context: __SerdeContext): EnvironmentVp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentVpc(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ErrorResponse - */ -const de_ErrorResponse = (output: any, context: __SerdeContext): ErrorResponse => { - return { - AccountId: __expectString(output.AccountId), - AdditionalDetails: - output.AdditionalDetails != null ? de_AdditionalDetails(output.AdditionalDetails, context) : undefined, - Code: __expectString(output.Code), - Message: __expectString(output.Message), - ResourceIdentifier: __expectString(output.ResourceIdentifier), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ErrorResponse omitted. -/** - * deserializeAws_restJson1HttpMethods - */ -const de_HttpMethods = (output: any, context: __SerdeContext): (HttpMethod | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HttpMethods omitted. -/** - * deserializeAws_restJson1LambdaEndpointConfig - */ -const de_LambdaEndpointConfig = (output: any, context: __SerdeContext): LambdaEndpointConfig => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_LambdaEndpointConfig omitted. -/** - * deserializeAws_restJson1LambdaEndpointInput - */ -const de_LambdaEndpointInput = (output: any, context: __SerdeContext): LambdaEndpointInput => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_LambdaEndpointInput omitted. -/** - * deserializeAws_restJson1LambdaEndpointSummary - */ -const de_LambdaEndpointSummary = (output: any, context: __SerdeContext): LambdaEndpointSummary => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_LambdaEndpointSummary omitted. -/** - * deserializeAws_restJson1PathResourceToId - */ -const de_PathResourceToId = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PathResourceToId omitted. /** * deserializeAws_restJson1RouteSummaries @@ -3355,9 +2878,6 @@ const de_RouteSummaries = (output: any, context: __SerdeContext): RouteSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RouteSummary(entry, context); }); return retVal; @@ -3367,32 +2887,25 @@ const de_RouteSummaries = (output: any, context: __SerdeContext): RouteSummary[] * deserializeAws_restJson1RouteSummary */ const de_RouteSummary = (output: any, context: __SerdeContext): RouteSummary => { - return { - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - CreatedByAccountId: __expectString(output.CreatedByAccountId), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - EnvironmentId: __expectString(output.EnvironmentId), - Error: output.Error != null ? de_ErrorResponse(output.Error, context) : undefined, - IncludeChildPaths: __expectBoolean(output.IncludeChildPaths), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Methods: output.Methods != null ? de_HttpMethods(output.Methods, context) : undefined, - OwnerAccountId: __expectString(output.OwnerAccountId), - PathResourceToId: - output.PathResourceToId != null ? de_PathResourceToId(output.PathResourceToId, context) : undefined, - RouteId: __expectString(output.RouteId), - RouteType: __expectString(output.RouteType), - ServiceId: __expectString(output.ServiceId), - SourcePath: __expectString(output.SourcePath), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnvironmentId: __expectString, + Error: _json, + IncludeChildPaths: __expectBoolean, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Methods: _json, + OwnerAccountId: __expectString, + PathResourceToId: _json, + RouteId: __expectString, + RouteType: __expectString, + ServiceId: __expectString, + SourcePath: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** @@ -3402,9 +2915,6 @@ const de_ServiceSummaries = (output: any, context: __SerdeContext): ServiceSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceSummary(entry, context); }); return retVal; @@ -3414,88 +2924,36 @@ const de_ServiceSummaries = (output: any, context: __SerdeContext): ServiceSumma * deserializeAws_restJson1ServiceSummary */ const de_ServiceSummary = (output: any, context: __SerdeContext): ServiceSummary => { - return { - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - CreatedByAccountId: __expectString(output.CreatedByAccountId), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - EndpointType: __expectString(output.EndpointType), - EnvironmentId: __expectString(output.EnvironmentId), - Error: output.Error != null ? de_ErrorResponse(output.Error, context) : undefined, - LambdaEndpoint: - output.LambdaEndpoint != null ? de_LambdaEndpointSummary(output.LambdaEndpoint, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - OwnerAccountId: __expectString(output.OwnerAccountId), - ServiceId: __expectString(output.ServiceId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - UrlEndpoint: output.UrlEndpoint != null ? de_UrlEndpointSummary(output.UrlEndpoint, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1UriPathRouteInput - */ -const de_UriPathRouteInput = (output: any, context: __SerdeContext): UriPathRouteInput => { - return { - ActivationState: __expectString(output.ActivationState), - IncludeChildPaths: __expectBoolean(output.IncludeChildPaths), - Methods: output.Methods != null ? de_HttpMethods(output.Methods, context) : undefined, - SourcePath: __expectString(output.SourcePath), - } as any; -}; - -/** - * deserializeAws_restJson1UrlEndpointConfig - */ -const de_UrlEndpointConfig = (output: any, context: __SerdeContext): UrlEndpointConfig => { - return { - HealthUrl: __expectString(output.HealthUrl), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1UrlEndpointInput - */ -const de_UrlEndpointInput = (output: any, context: __SerdeContext): UrlEndpointInput => { - return { - HealthUrl: __expectString(output.HealthUrl), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1UrlEndpointSummary - */ -const de_UrlEndpointSummary = (output: any, context: __SerdeContext): UrlEndpointSummary => { - return { - HealthUrl: __expectString(output.HealthUrl), - Url: __expectString(output.Url), - } as any; -}; + return take(output, { + ApplicationId: __expectString, + Arn: __expectString, + CreatedByAccountId: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EndpointType: __expectString, + EnvironmentId: __expectString, + Error: _json, + LambdaEndpoint: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OwnerAccountId: __expectString, + ServiceId: __expectString, + State: __expectString, + Tags: _json, + UrlEndpoint: _json, + VpcId: __expectString, + }) as any; +}; + +// de_TagMap omitted. + +// de_UriPathRouteInput omitted. + +// de_UrlEndpointConfig omitted. + +// de_UrlEndpointInput omitted. + +// de_UrlEndpointSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-migration-hub/src/protocols/Aws_json1_1.ts b/clients/client-migration-hub/src/protocols/Aws_json1_1.ts index 621273b8b4c8..893af3c05ec3 100644 --- a/clients/client-migration-hub/src/protocols/Aws_json1_1.ts +++ b/clients/client-migration-hub/src/protocols/Aws_json1_1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -86,49 +88,35 @@ import { AccessDeniedException, ApplicationState, AssociateCreatedArtifactRequest, - AssociateCreatedArtifactResult, AssociateDiscoveredResourceRequest, - AssociateDiscoveredResourceResult, CreatedArtifact, CreateProgressUpdateStreamRequest, - CreateProgressUpdateStreamResult, DeleteProgressUpdateStreamRequest, - DeleteProgressUpdateStreamResult, DescribeApplicationStateRequest, DescribeApplicationStateResult, DescribeMigrationTaskRequest, DescribeMigrationTaskResult, DisassociateCreatedArtifactRequest, - DisassociateCreatedArtifactResult, DisassociateDiscoveredResourceRequest, - DisassociateDiscoveredResourceResult, DiscoveredResource, DryRunOperation, HomeRegionNotSetException, ImportMigrationTaskRequest, - ImportMigrationTaskResult, InternalServerError, InvalidInputException, ListApplicationStatesRequest, ListApplicationStatesResult, ListCreatedArtifactsRequest, - ListCreatedArtifactsResult, ListDiscoveredResourcesRequest, - ListDiscoveredResourcesResult, ListMigrationTasksRequest, ListMigrationTasksResult, ListProgressUpdateStreamsRequest, - ListProgressUpdateStreamsResult, MigrationTask, MigrationTaskSummary, NotifyApplicationStateRequest, - NotifyApplicationStateResult, NotifyMigrationTaskStateRequest, - NotifyMigrationTaskStateResult, PolicyErrorException, - ProgressUpdateStreamSummary, PutResourceAttributesRequest, - PutResourceAttributesResult, ResourceAttribute, ResourceNotFoundException, ServiceUnavailableException, @@ -146,7 +134,7 @@ export const se_AssociateCreatedArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateCreatedArtifact"); let body: any; - body = JSON.stringify(se_AssociateCreatedArtifactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -159,7 +147,7 @@ export const se_AssociateDiscoveredResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDiscoveredResource"); let body: any; - body = JSON.stringify(se_AssociateDiscoveredResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -172,7 +160,7 @@ export const se_CreateProgressUpdateStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProgressUpdateStream"); let body: any; - body = JSON.stringify(se_CreateProgressUpdateStreamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -185,7 +173,7 @@ export const se_DeleteProgressUpdateStreamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProgressUpdateStream"); let body: any; - body = JSON.stringify(se_DeleteProgressUpdateStreamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -198,7 +186,7 @@ export const se_DescribeApplicationStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApplicationState"); let body: any; - body = JSON.stringify(se_DescribeApplicationStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -211,7 +199,7 @@ export const se_DescribeMigrationTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMigrationTask"); let body: any; - body = JSON.stringify(se_DescribeMigrationTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -224,7 +212,7 @@ export const se_DisassociateCreatedArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateCreatedArtifact"); let body: any; - body = JSON.stringify(se_DisassociateCreatedArtifactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -237,7 +225,7 @@ export const se_DisassociateDiscoveredResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateDiscoveredResource"); let body: any; - body = JSON.stringify(se_DisassociateDiscoveredResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -250,7 +238,7 @@ export const se_ImportMigrationTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportMigrationTask"); let body: any; - body = JSON.stringify(se_ImportMigrationTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -263,7 +251,7 @@ export const se_ListApplicationStatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApplicationStates"); let body: any; - body = JSON.stringify(se_ListApplicationStatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -276,7 +264,7 @@ export const se_ListCreatedArtifactsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCreatedArtifacts"); let body: any; - body = JSON.stringify(se_ListCreatedArtifactsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,7 +277,7 @@ export const se_ListDiscoveredResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDiscoveredResources"); let body: any; - body = JSON.stringify(se_ListDiscoveredResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +290,7 @@ export const se_ListMigrationTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMigrationTasks"); let body: any; - body = JSON.stringify(se_ListMigrationTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +303,7 @@ export const se_ListProgressUpdateStreamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProgressUpdateStreams"); let body: any; - body = JSON.stringify(se_ListProgressUpdateStreamsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +342,7 @@ export const se_PutResourceAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourceAttributes"); let body: any; - body = JSON.stringify(se_PutResourceAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,12 +358,12 @@ export const de_AssociateCreatedArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateCreatedArtifactResult(data, context); + contents = _json(data); const response: AssociateCreatedArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -420,10 +408,9 @@ const de_AssociateCreatedArtifactCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -441,12 +428,12 @@ export const de_AssociateDiscoveredResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDiscoveredResourceResult(data, context); + contents = _json(data); const response: AssociateDiscoveredResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -494,10 +481,9 @@ const de_AssociateDiscoveredResourceCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -515,12 +501,12 @@ export const de_CreateProgressUpdateStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProgressUpdateStreamResult(data, context); + contents = _json(data); const response: CreateProgressUpdateStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -562,10 +548,9 @@ const de_CreateProgressUpdateStreamCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -583,12 +568,12 @@ export const de_DeleteProgressUpdateStreamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProgressUpdateStreamResult(data, context); + contents = _json(data); const response: DeleteProgressUpdateStreamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -633,10 +618,9 @@ const de_DeleteProgressUpdateStreamCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -659,7 +643,7 @@ export const de_DescribeApplicationStateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -701,10 +685,9 @@ const de_DescribeApplicationStateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -727,7 +710,7 @@ export const de_DescribeMigrationTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -766,10 +749,9 @@ const de_DescribeMigrationTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -787,12 +769,12 @@ export const de_DisassociateCreatedArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateCreatedArtifactResult(data, context); + contents = _json(data); const response: DisassociateCreatedArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -837,10 +819,9 @@ const de_DisassociateCreatedArtifactCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -858,12 +839,12 @@ export const de_DisassociateDiscoveredResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateDiscoveredResourceResult(data, context); + contents = _json(data); const response: DisassociateDiscoveredResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -908,10 +889,9 @@ const de_DisassociateDiscoveredResourceCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -929,12 +909,12 @@ export const de_ImportMigrationTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportMigrationTaskResult(data, context); + contents = _json(data); const response: ImportMigrationTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -979,10 +959,9 @@ const de_ImportMigrationTaskCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1005,7 +984,7 @@ export const de_ListApplicationStatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1041,10 +1020,9 @@ const de_ListApplicationStatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1062,12 +1040,12 @@ export const de_ListCreatedArtifactsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCreatedArtifactsResult(data, context); + contents = _json(data); const response: ListCreatedArtifactsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1106,10 +1084,9 @@ const de_ListCreatedArtifactsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1127,12 +1104,12 @@ export const de_ListDiscoveredResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDiscoveredResourcesResult(data, context); + contents = _json(data); const response: ListDiscoveredResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1171,10 +1148,9 @@ const de_ListDiscoveredResourcesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1197,7 +1173,7 @@ export const de_ListMigrationTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1239,10 +1215,9 @@ const de_ListMigrationTasksCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1260,12 +1235,12 @@ export const de_ListProgressUpdateStreamsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProgressUpdateStreamsResult(data, context); + contents = _json(data); const response: ListProgressUpdateStreamsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1301,10 +1276,9 @@ const de_ListProgressUpdateStreamsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1322,12 +1296,12 @@ export const de_NotifyApplicationStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyApplicationStateResult(data, context); + contents = _json(data); const response: NotifyApplicationStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1375,10 +1349,9 @@ const de_NotifyApplicationStateCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1396,12 +1369,12 @@ export const de_NotifyMigrationTaskStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyMigrationTaskStateResult(data, context); + contents = _json(data); const response: NotifyMigrationTaskStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1446,10 +1419,9 @@ const de_NotifyMigrationTaskStateCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1467,12 +1439,12 @@ export const de_PutResourceAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourceAttributesResult(data, context); + contents = _json(data); const response: PutResourceAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1517,10 +1489,9 @@ const de_PutResourceAttributesCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,7 +1505,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1547,7 +1518,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_DryRunOperationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DryRunOperation(body, context); + const deserialized: any = _json(body); const exception = new DryRunOperation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1563,7 +1534,7 @@ const de_HomeRegionNotSetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HomeRegionNotSetException(body, context); + const deserialized: any = _json(body); const exception = new HomeRegionNotSetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1576,7 +1547,7 @@ const de_HomeRegionNotSetExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1592,7 +1563,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1608,7 +1579,7 @@ const de_PolicyErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyErrorException(body, context); + const deserialized: any = _json(body); const exception = new PolicyErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1624,7 +1595,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1640,7 +1611,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1653,7 +1624,7 @@ const de_ServiceUnavailableExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1669,7 +1640,7 @@ const de_UnauthorizedOperationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnauthorizedOperation(body, context); + const deserialized: any = _json(body); const exception = new UnauthorizedOperation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1677,301 +1648,85 @@ const de_UnauthorizedOperationRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ApplicationIds - */ -const se_ApplicationIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationIds omitted. -/** - * serializeAws_json1_1AssociateCreatedArtifactRequest - */ -const se_AssociateCreatedArtifactRequest = (input: AssociateCreatedArtifactRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedArtifact != null && { CreatedArtifact: se_CreatedArtifact(input.CreatedArtifact, context) }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_AssociateCreatedArtifactRequest omitted. -/** - * serializeAws_json1_1AssociateDiscoveredResourceRequest - */ -const se_AssociateDiscoveredResourceRequest = ( - input: AssociateDiscoveredResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.DiscoveredResource != null && { - DiscoveredResource: se_DiscoveredResource(input.DiscoveredResource, context), - }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_AssociateDiscoveredResourceRequest omitted. -/** - * serializeAws_json1_1CreatedArtifact - */ -const se_CreatedArtifact = (input: CreatedArtifact, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreatedArtifact omitted. -/** - * serializeAws_json1_1CreateProgressUpdateStreamRequest - */ -const se_CreateProgressUpdateStreamRequest = ( - input: CreateProgressUpdateStreamRequest, - context: __SerdeContext -): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.ProgressUpdateStreamName != null && { ProgressUpdateStreamName: input.ProgressUpdateStreamName }), - }; -}; +// se_CreateProgressUpdateStreamRequest omitted. -/** - * serializeAws_json1_1DeleteProgressUpdateStreamRequest - */ -const se_DeleteProgressUpdateStreamRequest = ( - input: DeleteProgressUpdateStreamRequest, - context: __SerdeContext -): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.ProgressUpdateStreamName != null && { ProgressUpdateStreamName: input.ProgressUpdateStreamName }), - }; -}; +// se_DeleteProgressUpdateStreamRequest omitted. -/** - * serializeAws_json1_1DescribeApplicationStateRequest - */ -const se_DescribeApplicationStateRequest = (input: DescribeApplicationStateRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - }; -}; +// se_DescribeApplicationStateRequest omitted. -/** - * serializeAws_json1_1DescribeMigrationTaskRequest - */ -const se_DescribeMigrationTaskRequest = (input: DescribeMigrationTaskRequest, context: __SerdeContext): any => { - return { - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_DescribeMigrationTaskRequest omitted. -/** - * serializeAws_json1_1DisassociateCreatedArtifactRequest - */ -const se_DisassociateCreatedArtifactRequest = ( - input: DisassociateCreatedArtifactRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreatedArtifactName != null && { CreatedArtifactName: input.CreatedArtifactName }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_DisassociateCreatedArtifactRequest omitted. -/** - * serializeAws_json1_1DisassociateDiscoveredResourceRequest - */ -const se_DisassociateDiscoveredResourceRequest = ( - input: DisassociateDiscoveredResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.ConfigurationId != null && { ConfigurationId: input.ConfigurationId }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_DisassociateDiscoveredResourceRequest omitted. -/** - * serializeAws_json1_1DiscoveredResource - */ -const se_DiscoveredResource = (input: DiscoveredResource, context: __SerdeContext): any => { - return { - ...(input.ConfigurationId != null && { ConfigurationId: input.ConfigurationId }), - ...(input.Description != null && { Description: input.Description }), - }; -}; +// se_DiscoveredResource omitted. -/** - * serializeAws_json1_1ImportMigrationTaskRequest - */ -const se_ImportMigrationTaskRequest = (input: ImportMigrationTaskRequest, context: __SerdeContext): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_ImportMigrationTaskRequest omitted. -/** - * serializeAws_json1_1ListApplicationStatesRequest - */ -const se_ListApplicationStatesRequest = (input: ListApplicationStatesRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationIds != null && { ApplicationIds: se_ApplicationIds(input.ApplicationIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListApplicationStatesRequest omitted. -/** - * serializeAws_json1_1ListCreatedArtifactsRequest - */ -const se_ListCreatedArtifactsRequest = (input: ListCreatedArtifactsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_ListCreatedArtifactsRequest omitted. -/** - * serializeAws_json1_1ListDiscoveredResourcesRequest - */ -const se_ListDiscoveredResourcesRequest = (input: ListDiscoveredResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - }; -}; +// se_ListDiscoveredResourcesRequest omitted. -/** - * serializeAws_json1_1ListMigrationTasksRequest - */ -const se_ListMigrationTasksRequest = (input: ListMigrationTasksRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - }; -}; +// se_ListMigrationTasksRequest omitted. -/** - * serializeAws_json1_1ListProgressUpdateStreamsRequest - */ -const se_ListProgressUpdateStreamsRequest = (input: ListProgressUpdateStreamsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListProgressUpdateStreamsRequest omitted. /** * serializeAws_json1_1NotifyApplicationStateRequest */ const se_NotifyApplicationStateRequest = (input: NotifyApplicationStateRequest, context: __SerdeContext): any => { - return { - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.Status != null && { Status: input.Status }), - ...(input.UpdateDateTime != null && { UpdateDateTime: Math.round(input.UpdateDateTime.getTime() / 1000) }), - }; + return take(input, { + ApplicationId: [], + DryRun: [], + Status: [], + UpdateDateTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1NotifyMigrationTaskStateRequest */ const se_NotifyMigrationTaskStateRequest = (input: NotifyMigrationTaskStateRequest, context: __SerdeContext): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.NextUpdateSeconds != null && { NextUpdateSeconds: input.NextUpdateSeconds }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - ...(input.Task != null && { Task: se_Task(input.Task, context) }), - ...(input.UpdateDateTime != null && { UpdateDateTime: Math.round(input.UpdateDateTime.getTime() / 1000) }), - }; + return take(input, { + DryRun: [], + MigrationTaskName: [], + NextUpdateSeconds: [], + ProgressUpdateStream: [], + Task: _json, + UpdateDateTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1PutResourceAttributesRequest - */ -const se_PutResourceAttributesRequest = (input: PutResourceAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MigrationTaskName != null && { MigrationTaskName: input.MigrationTaskName }), - ...(input.ProgressUpdateStream != null && { ProgressUpdateStream: input.ProgressUpdateStream }), - ...(input.ResourceAttributeList != null && { - ResourceAttributeList: se_ResourceAttributeList(input.ResourceAttributeList, context), - }), - }; -}; +// se_PutResourceAttributesRequest omitted. -/** - * serializeAws_json1_1ResourceAttribute - */ -const se_ResourceAttribute = (input: ResourceAttribute, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ResourceAttribute omitted. -/** - * serializeAws_json1_1ResourceAttributeList - */ -const se_ResourceAttributeList = (input: ResourceAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceAttribute(entry, context); - }); -}; +// se_ResourceAttributeList omitted. -/** - * serializeAws_json1_1Task - */ -const se_Task = (input: Task, context: __SerdeContext): any => { - return { - ...(input.ProgressPercent != null && { ProgressPercent: input.ProgressPercent }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusDetail != null && { StatusDetail: input.StatusDetail }), - }; -}; +// se_Task omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_1ApplicationState */ const de_ApplicationState = (output: any, context: __SerdeContext): ApplicationState => { - return { - ApplicationId: __expectString(output.ApplicationId), - ApplicationStatus: __expectString(output.ApplicationStatus), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - } as any; + return take(output, { + ApplicationId: __expectString, + ApplicationStatus: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1981,296 +1736,113 @@ const de_ApplicationStateList = (output: any, context: __SerdeContext): Applicat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationState(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1AssociateCreatedArtifactResult - */ -const de_AssociateCreatedArtifactResult = (output: any, context: __SerdeContext): AssociateCreatedArtifactResult => { - return {} as any; -}; +// de_AssociateCreatedArtifactResult omitted. -/** - * deserializeAws_json1_1AssociateDiscoveredResourceResult - */ -const de_AssociateDiscoveredResourceResult = ( - output: any, - context: __SerdeContext -): AssociateDiscoveredResourceResult => { - return {} as any; -}; +// de_AssociateDiscoveredResourceResult omitted. -/** - * deserializeAws_json1_1CreatedArtifact - */ -const de_CreatedArtifact = (output: any, context: __SerdeContext): CreatedArtifact => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - } as any; -}; +// de_CreatedArtifact omitted. -/** - * deserializeAws_json1_1CreatedArtifactList - */ -const de_CreatedArtifactList = (output: any, context: __SerdeContext): CreatedArtifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CreatedArtifact(entry, context); - }); - return retVal; -}; +// de_CreatedArtifactList omitted. -/** - * deserializeAws_json1_1CreateProgressUpdateStreamResult - */ -const de_CreateProgressUpdateStreamResult = ( - output: any, - context: __SerdeContext -): CreateProgressUpdateStreamResult => { - return {} as any; -}; +// de_CreateProgressUpdateStreamResult omitted. -/** - * deserializeAws_json1_1DeleteProgressUpdateStreamResult - */ -const de_DeleteProgressUpdateStreamResult = ( - output: any, - context: __SerdeContext -): DeleteProgressUpdateStreamResult => { - return {} as any; -}; +// de_DeleteProgressUpdateStreamResult omitted. /** * deserializeAws_json1_1DescribeApplicationStateResult */ const de_DescribeApplicationStateResult = (output: any, context: __SerdeContext): DescribeApplicationStateResult => { - return { - ApplicationStatus: __expectString(output.ApplicationStatus), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - } as any; + return take(output, { + ApplicationStatus: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1DescribeMigrationTaskResult */ const de_DescribeMigrationTaskResult = (output: any, context: __SerdeContext): DescribeMigrationTaskResult => { - return { - MigrationTask: output.MigrationTask != null ? de_MigrationTask(output.MigrationTask, context) : undefined, - } as any; + return take(output, { + MigrationTask: (_: any) => de_MigrationTask(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DisassociateCreatedArtifactResult - */ -const de_DisassociateCreatedArtifactResult = ( - output: any, - context: __SerdeContext -): DisassociateCreatedArtifactResult => { - return {} as any; -}; +// de_DisassociateCreatedArtifactResult omitted. -/** - * deserializeAws_json1_1DisassociateDiscoveredResourceResult - */ -const de_DisassociateDiscoveredResourceResult = ( - output: any, - context: __SerdeContext -): DisassociateDiscoveredResourceResult => { - return {} as any; -}; +// de_DisassociateDiscoveredResourceResult omitted. -/** - * deserializeAws_json1_1DiscoveredResource - */ -const de_DiscoveredResource = (output: any, context: __SerdeContext): DiscoveredResource => { - return { - ConfigurationId: __expectString(output.ConfigurationId), - Description: __expectString(output.Description), - } as any; -}; +// de_DiscoveredResource omitted. -/** - * deserializeAws_json1_1DiscoveredResourceList - */ -const de_DiscoveredResourceList = (output: any, context: __SerdeContext): DiscoveredResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DiscoveredResource(entry, context); - }); - return retVal; -}; +// de_DiscoveredResourceList omitted. -/** - * deserializeAws_json1_1DryRunOperation - */ -const de_DryRunOperation = (output: any, context: __SerdeContext): DryRunOperation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DryRunOperation omitted. -/** - * deserializeAws_json1_1HomeRegionNotSetException - */ -const de_HomeRegionNotSetException = (output: any, context: __SerdeContext): HomeRegionNotSetException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_HomeRegionNotSetException omitted. -/** - * deserializeAws_json1_1ImportMigrationTaskResult - */ -const de_ImportMigrationTaskResult = (output: any, context: __SerdeContext): ImportMigrationTaskResult => { - return {} as any; -}; +// de_ImportMigrationTaskResult omitted. -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1LatestResourceAttributeList - */ -const de_LatestResourceAttributeList = (output: any, context: __SerdeContext): ResourceAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceAttribute(entry, context); - }); - return retVal; -}; +// de_LatestResourceAttributeList omitted. /** * deserializeAws_json1_1ListApplicationStatesResult */ const de_ListApplicationStatesResult = (output: any, context: __SerdeContext): ListApplicationStatesResult => { - return { - ApplicationStateList: - output.ApplicationStateList != null ? de_ApplicationStateList(output.ApplicationStateList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ApplicationStateList: (_: any) => de_ApplicationStateList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListCreatedArtifactsResult - */ -const de_ListCreatedArtifactsResult = (output: any, context: __SerdeContext): ListCreatedArtifactsResult => { - return { - CreatedArtifactList: - output.CreatedArtifactList != null ? de_CreatedArtifactList(output.CreatedArtifactList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListCreatedArtifactsResult omitted. -/** - * deserializeAws_json1_1ListDiscoveredResourcesResult - */ -const de_ListDiscoveredResourcesResult = (output: any, context: __SerdeContext): ListDiscoveredResourcesResult => { - return { - DiscoveredResourceList: - output.DiscoveredResourceList != null - ? de_DiscoveredResourceList(output.DiscoveredResourceList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDiscoveredResourcesResult omitted. /** * deserializeAws_json1_1ListMigrationTasksResult */ const de_ListMigrationTasksResult = (output: any, context: __SerdeContext): ListMigrationTasksResult => { - return { - MigrationTaskSummaryList: - output.MigrationTaskSummaryList != null - ? de_MigrationTaskSummaryList(output.MigrationTaskSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + MigrationTaskSummaryList: (_: any) => de_MigrationTaskSummaryList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListProgressUpdateStreamsResult - */ -const de_ListProgressUpdateStreamsResult = (output: any, context: __SerdeContext): ListProgressUpdateStreamsResult => { - return { - NextToken: __expectString(output.NextToken), - ProgressUpdateStreamSummaryList: - output.ProgressUpdateStreamSummaryList != null - ? de_ProgressUpdateStreamSummaryList(output.ProgressUpdateStreamSummaryList, context) - : undefined, - } as any; -}; +// de_ListProgressUpdateStreamsResult omitted. /** * deserializeAws_json1_1MigrationTask */ const de_MigrationTask = (output: any, context: __SerdeContext): MigrationTask => { - return { - MigrationTaskName: __expectString(output.MigrationTaskName), - ProgressUpdateStream: __expectString(output.ProgressUpdateStream), - ResourceAttributeList: - output.ResourceAttributeList != null - ? de_LatestResourceAttributeList(output.ResourceAttributeList, context) - : undefined, - Task: output.Task != null ? de_Task(output.Task, context) : undefined, - UpdateDateTime: - output.UpdateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDateTime))) - : undefined, - } as any; + return take(output, { + MigrationTaskName: __expectString, + ProgressUpdateStream: __expectString, + ResourceAttributeList: _json, + Task: _json, + UpdateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1MigrationTaskSummary */ const de_MigrationTaskSummary = (output: any, context: __SerdeContext): MigrationTaskSummary => { - return { - MigrationTaskName: __expectString(output.MigrationTaskName), - ProgressPercent: __expectInt32(output.ProgressPercent), - ProgressUpdateStream: __expectString(output.ProgressUpdateStream), - Status: __expectString(output.Status), - StatusDetail: __expectString(output.StatusDetail), - UpdateDateTime: - output.UpdateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDateTime))) - : undefined, - } as any; + return take(output, { + MigrationTaskName: __expectString, + ProgressPercent: __expectInt32, + ProgressUpdateStream: __expectString, + Status: __expectString, + StatusDetail: __expectString, + UpdateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2280,125 +1852,34 @@ const de_MigrationTaskSummaryList = (output: any, context: __SerdeContext): Migr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MigrationTaskSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NotifyApplicationStateResult - */ -const de_NotifyApplicationStateResult = (output: any, context: __SerdeContext): NotifyApplicationStateResult => { - return {} as any; -}; +// de_NotifyApplicationStateResult omitted. -/** - * deserializeAws_json1_1NotifyMigrationTaskStateResult - */ -const de_NotifyMigrationTaskStateResult = (output: any, context: __SerdeContext): NotifyMigrationTaskStateResult => { - return {} as any; -}; +// de_NotifyMigrationTaskStateResult omitted. -/** - * deserializeAws_json1_1PolicyErrorException - */ -const de_PolicyErrorException = (output: any, context: __SerdeContext): PolicyErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PolicyErrorException omitted. -/** - * deserializeAws_json1_1ProgressUpdateStreamSummary - */ -const de_ProgressUpdateStreamSummary = (output: any, context: __SerdeContext): ProgressUpdateStreamSummary => { - return { - ProgressUpdateStreamName: __expectString(output.ProgressUpdateStreamName), - } as any; -}; +// de_ProgressUpdateStreamSummary omitted. -/** - * deserializeAws_json1_1ProgressUpdateStreamSummaryList - */ -const de_ProgressUpdateStreamSummaryList = (output: any, context: __SerdeContext): ProgressUpdateStreamSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProgressUpdateStreamSummary(entry, context); - }); - return retVal; -}; +// de_ProgressUpdateStreamSummaryList omitted. -/** - * deserializeAws_json1_1PutResourceAttributesResult - */ -const de_PutResourceAttributesResult = (output: any, context: __SerdeContext): PutResourceAttributesResult => { - return {} as any; -}; +// de_PutResourceAttributesResult omitted. -/** - * deserializeAws_json1_1ResourceAttribute - */ -const de_ResourceAttribute = (output: any, context: __SerdeContext): ResourceAttribute => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_ResourceAttribute omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceUnavailableException omitted. -/** - * deserializeAws_json1_1Task - */ -const de_Task = (output: any, context: __SerdeContext): Task => { - return { - ProgressPercent: __expectInt32(output.ProgressPercent), - Status: __expectString(output.Status), - StatusDetail: __expectString(output.StatusDetail), - } as any; -}; +// de_Task omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UnauthorizedOperation - */ -const de_UnauthorizedOperation = (output: any, context: __SerdeContext): UnauthorizedOperation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnauthorizedOperation omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2420,6 +1901,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts b/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts index c82b74da8317..ac6ad45337cb 100644 --- a/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts +++ b/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -34,7 +35,6 @@ import { DescribeHomeRegionControlsResult, DryRunOperation, GetHomeRegionRequest, - GetHomeRegionResult, HomeRegionControl, InternalServerError, InvalidInputException, @@ -52,7 +52,7 @@ export const se_CreateHomeRegionControlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHomeRegionControl"); let body: any; - body = JSON.stringify(se_CreateHomeRegionControlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -65,7 +65,7 @@ export const se_DescribeHomeRegionControlsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHomeRegionControls"); let body: any; - body = JSON.stringify(se_DescribeHomeRegionControlsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -78,7 +78,7 @@ export const se_GetHomeRegionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetHomeRegion"); let body: any; - body = JSON.stringify(se_GetHomeRegionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -99,7 +99,7 @@ export const de_CreateHomeRegionControlCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -135,10 +135,9 @@ const de_CreateHomeRegionControlCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -161,7 +160,7 @@ export const de_DescribeHomeRegionControlsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -194,10 +193,9 @@ const de_DescribeHomeRegionControlsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -215,12 +213,12 @@ export const de_GetHomeRegionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetHomeRegionResult(data, context); + contents = _json(data); const response: GetHomeRegionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -253,10 +251,9 @@ const de_GetHomeRegionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -270,7 +267,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -283,7 +280,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_DryRunOperationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DryRunOperation(body, context); + const deserialized: any = _json(body); const exception = new DryRunOperation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -296,7 +293,7 @@ const de_DryRunOperationRes = async (parsedOutput: any, context: __SerdeContext) */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -312,7 +309,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -328,7 +325,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -341,7 +338,7 @@ const de_ServiceUnavailableExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -349,67 +346,23 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1CreateHomeRegionControlRequest - */ -const se_CreateHomeRegionControlRequest = (input: CreateHomeRegionControlRequest, context: __SerdeContext): any => { - return { - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.Target != null && { Target: se_Target(input.Target, context) }), - }; -}; +// se_CreateHomeRegionControlRequest omitted. -/** - * serializeAws_json1_1DescribeHomeRegionControlsRequest - */ -const se_DescribeHomeRegionControlsRequest = ( - input: DescribeHomeRegionControlsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ControlId != null && { ControlId: input.ControlId }), - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Target != null && { Target: se_Target(input.Target, context) }), - }; -}; +// se_DescribeHomeRegionControlsRequest omitted. -/** - * serializeAws_json1_1GetHomeRegionRequest - */ -const se_GetHomeRegionRequest = (input: GetHomeRegionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetHomeRegionRequest omitted. -/** - * serializeAws_json1_1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Target omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_1CreateHomeRegionControlResult */ const de_CreateHomeRegionControlResult = (output: any, context: __SerdeContext): CreateHomeRegionControlResult => { - return { - HomeRegionControl: - output.HomeRegionControl != null ? de_HomeRegionControl(output.HomeRegionControl, context) : undefined, - } as any; + return take(output, { + HomeRegionControl: (_: any) => de_HomeRegionControl(_, context), + }) as any; }; /** @@ -419,44 +372,26 @@ const de_DescribeHomeRegionControlsResult = ( output: any, context: __SerdeContext ): DescribeHomeRegionControlsResult => { - return { - HomeRegionControls: - output.HomeRegionControls != null ? de_HomeRegionControls(output.HomeRegionControls, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + HomeRegionControls: (_: any) => de_HomeRegionControls(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DryRunOperation - */ -const de_DryRunOperation = (output: any, context: __SerdeContext): DryRunOperation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DryRunOperation omitted. -/** - * deserializeAws_json1_1GetHomeRegionResult - */ -const de_GetHomeRegionResult = (output: any, context: __SerdeContext): GetHomeRegionResult => { - return { - HomeRegion: __expectString(output.HomeRegion), - } as any; -}; +// de_GetHomeRegionResult omitted. /** * deserializeAws_json1_1HomeRegionControl */ const de_HomeRegionControl = (output: any, context: __SerdeContext): HomeRegionControl => { - return { - ControlId: __expectString(output.ControlId), - HomeRegion: __expectString(output.HomeRegion), - RequestedTime: - output.RequestedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedTime))) - : undefined, - Target: output.Target != null ? de_Target(output.Target, context) : undefined, - } as any; + return take(output, { + ControlId: __expectString, + HomeRegion: __expectString, + RequestedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Target: _json, + }) as any; }; /** @@ -466,60 +401,20 @@ const de_HomeRegionControls = (output: any, context: __SerdeContext): HomeRegion const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HomeRegionControl(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceUnavailableException omitted. -/** - * deserializeAws_json1_1Target - */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; -}; +// de_Target omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds), - } as any; -}; +// de_ThrottlingException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -541,6 +436,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts b/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts index 158b023f45e6..72932b6a4261 100644 --- a/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts +++ b/clients/client-migrationhuborchestrator/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -80,23 +80,13 @@ import { MigrationWorkflowSummary, PlatformCommand, PlatformScriptKey, - PluginSummary, ResourceNotFoundException, - StepAutomationConfiguration, StepInput, - StepOutput, - TemplateInput, - TemplateStepGroupSummary, - TemplateStepSummary, - TemplateSummary, ThrottlingException, - Tool, ValidationException, WorkflowStepAutomationConfiguration, - WorkflowStepGroupSummary, WorkflowStepOutput, WorkflowStepOutputUnion, - WorkflowStepSummary, } from "../models/models_0"; /** @@ -112,15 +102,17 @@ export const se_CreateWorkflowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow"; let body: any; - body = JSON.stringify({ - ...(input.applicationConfigurationId != null && { applicationConfigurationId: input.applicationConfigurationId }), - ...(input.description != null && { description: input.description }), - ...(input.inputParameters != null && { inputParameters: se_StepInputParameters(input.inputParameters, context) }), - ...(input.name != null && { name: input.name }), - ...(input.stepTargets != null && { stepTargets: se_StringList(input.stepTargets, context) }), - ...(input.tags != null && { tags: se_StringMap(input.tags, context) }), - ...(input.templateId != null && { templateId: input.templateId }), - }); + body = JSON.stringify( + take(input, { + applicationConfigurationId: [], + description: [], + inputParameters: (_) => _json(_), + name: [], + stepTargets: (_) => _json(_), + tags: (_) => _json(_), + templateId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -145,23 +137,20 @@ export const se_CreateWorkflowStepCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: se_StringList(input.next, context) }), - ...(input.outputs != null && { outputs: se_WorkflowStepOutputList(input.outputs, context) }), - ...(input.previous != null && { previous: se_StringList(input.previous, context) }), - ...(input.stepActionType != null && { stepActionType: input.stepActionType }), - ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }), - ...(input.stepTarget != null && { stepTarget: se_StringList(input.stepTarget, context) }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - ...(input.workflowStepAutomationConfiguration != null && { - workflowStepAutomationConfiguration: se_WorkflowStepAutomationConfiguration( - input.workflowStepAutomationConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + next: (_) => _json(_), + outputs: (_) => _json(_), + previous: (_) => _json(_), + stepActionType: [], + stepGroupId: [], + stepTarget: (_) => _json(_), + workflowId: [], + workflowStepAutomationConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -186,13 +175,15 @@ export const se_CreateWorkflowStepGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstepgroups"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: se_StringList(input.next, context) }), - ...(input.previous != null && { previous: se_StringList(input.previous, context) }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + next: (_) => _json(_), + previous: (_) => _json(_), + workflowId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -754,9 +745,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -812,12 +805,14 @@ export const se_UpdateWorkflowCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/migrationworkflow/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.inputParameters != null && { inputParameters: se_StepInputParameters(input.inputParameters, context) }), - ...(input.name != null && { name: input.name }), - ...(input.stepTargets != null && { stepTargets: se_StringList(input.stepTargets, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + inputParameters: (_) => _json(_), + name: [], + stepTargets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -843,24 +838,21 @@ export const se_UpdateWorkflowStepCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflowstep/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: se_StringList(input.next, context) }), - ...(input.outputs != null && { outputs: se_WorkflowStepOutputList(input.outputs, context) }), - ...(input.previous != null && { previous: se_StringList(input.previous, context) }), - ...(input.status != null && { status: input.status }), - ...(input.stepActionType != null && { stepActionType: input.stepActionType }), - ...(input.stepGroupId != null && { stepGroupId: input.stepGroupId }), - ...(input.stepTarget != null && { stepTarget: se_StringList(input.stepTarget, context) }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - ...(input.workflowStepAutomationConfiguration != null && { - workflowStepAutomationConfiguration: se_WorkflowStepAutomationConfiguration( - input.workflowStepAutomationConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + next: (_) => _json(_), + outputs: (_) => _json(_), + previous: (_) => _json(_), + status: [], + stepActionType: [], + stepGroupId: [], + stepTarget: (_) => _json(_), + workflowId: [], + workflowStepAutomationConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -889,12 +881,14 @@ export const se_UpdateWorkflowStepGroupCommand = async ( workflowId: [, __expectNonNull(input.workflowId!, `workflowId`)], }); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.next != null && { next: se_StringList(input.next, context) }), - ...(input.previous != null && { previous: se_StringList(input.previous, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + next: (_) => _json(_), + previous: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -921,39 +915,20 @@ export const de_CreateWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adsApplicationConfigurationId != null) { - contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.stepTargets != null) { - contents.stepTargets = de_StringList(data.stepTargets, context); - } - if (data.tags != null) { - contents.tags = de_StringMap(data.tags, context); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } - if (data.workflowInputs != null) { - contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context); - } + const doc = take(data, { + adsApplicationConfigurationId: __expectString, + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + stepTargets: _json, + tags: _json, + templateId: __expectString, + workflowInputs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -984,10 +959,9 @@ const de_CreateWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1007,18 +981,13 @@ export const de_CreateWorkflowStepCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stepGroupId != null) { - contents.stepGroupId = __expectString(data.stepGroupId); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + stepGroupId: __expectString, + workflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1049,10 +1018,9 @@ const de_CreateWorkflowStepCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1072,30 +1040,17 @@ export const de_CreateWorkflowStepGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.next != null) { - contents.next = de_StringList(data.next, context); - } - if (data.previous != null) { - contents.previous = de_StringList(data.previous, context); - } - if (data.tools != null) { - contents.tools = de_ToolsList(data.tools, context); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + name: __expectString, + next: _json, + previous: _json, + tools: _json, + workflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1126,10 +1081,9 @@ const de_CreateWorkflowStepGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1149,15 +1103,12 @@ export const de_DeleteWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1191,10 +1142,9 @@ const de_DeleteWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1247,10 +1197,9 @@ const de_DeleteWorkflowStepCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1303,10 +1252,9 @@ const de_DeleteWorkflowStepGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1326,27 +1274,16 @@ export const de_GetTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.inputs != null) { - contents.inputs = de_TemplateInputList(data.inputs, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tools != null) { - contents.tools = de_ToolsList(data.tools, context); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + inputs: _json, + name: __expectString, + status: __expectString, + tools: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1377,10 +1314,9 @@ const de_GetTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1400,39 +1336,20 @@ export const de_GetTemplateStepCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectString(data.creationTime); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.next != null) { - contents.next = de_StringList(data.next, context); - } - if (data.outputs != null) { - contents.outputs = de_StepOutputList(data.outputs, context); - } - if (data.previous != null) { - contents.previous = de_StringList(data.previous, context); - } - if (data.stepActionType != null) { - contents.stepActionType = __expectString(data.stepActionType); - } - if (data.stepAutomationConfiguration != null) { - contents.stepAutomationConfiguration = de_StepAutomationConfiguration(data.stepAutomationConfiguration, context); - } - if (data.stepGroupId != null) { - contents.stepGroupId = __expectString(data.stepGroupId); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } + const doc = take(data, { + creationTime: __expectString, + description: __expectString, + id: __expectString, + name: __expectString, + next: _json, + outputs: _json, + previous: _json, + stepActionType: __expectString, + stepAutomationConfiguration: _json, + stepGroupId: __expectString, + templateId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1466,10 +1383,9 @@ const de_GetTemplateStepCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1489,36 +1405,19 @@ export const de_GetTemplateStepGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.next != null) { - contents.next = de_StringList(data.next, context); - } - if (data.previous != null) { - contents.previous = de_StringList(data.previous, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } - if (data.tools != null) { - contents.tools = de_ToolsList(data.tools, context); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + next: _json, + previous: _json, + status: __expectString, + templateId: __expectString, + tools: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1552,10 +1451,9 @@ const de_GetTemplateStepGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1575,66 +1473,29 @@ export const de_GetWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adsApplicationConfigurationId != null) { - contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId); - } - if (data.adsApplicationName != null) { - contents.adsApplicationName = __expectString(data.adsApplicationName); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.completedSteps != null) { - contents.completedSteps = __expectInt32(data.completedSteps); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime))); - } - if (data.lastStartTime != null) { - contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime))); - } - if (data.lastStopTime != null) { - contents.lastStopTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStopTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.tags != null) { - contents.tags = de_StringMap(data.tags, context); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } - if (data.tools != null) { - contents.tools = de_ToolsList(data.tools, context); - } - if (data.totalSteps != null) { - contents.totalSteps = __expectInt32(data.totalSteps); - } - if (data.workflowBucket != null) { - contents.workflowBucket = __expectString(data.workflowBucket); - } - if (data.workflowInputs != null) { - contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context); - } + const doc = take(data, { + adsApplicationConfigurationId: __expectString, + adsApplicationName: __expectString, + arn: __expectString, + completedSteps: __expectInt32, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStopTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + statusMessage: __expectString, + tags: _json, + templateId: __expectString, + tools: _json, + totalSteps: __expectInt32, + workflowBucket: __expectString, + workflowInputs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1668,10 +1529,9 @@ const de_GetWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1691,72 +1551,30 @@ export const de_GetWorkflowStepCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.lastStartTime != null) { - contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.next != null) { - contents.next = de_StringList(data.next, context); - } - if (data.noOfSrvCompleted != null) { - contents.noOfSrvCompleted = __expectInt32(data.noOfSrvCompleted); - } - if (data.noOfSrvFailed != null) { - contents.noOfSrvFailed = __expectInt32(data.noOfSrvFailed); - } - if (data.outputs != null) { - contents.outputs = de_WorkflowStepOutputList(data.outputs, context); - } - if (data.owner != null) { - contents.owner = __expectString(data.owner); - } - if (data.previous != null) { - contents.previous = de_StringList(data.previous, context); - } - if (data.scriptOutputLocation != null) { - contents.scriptOutputLocation = __expectString(data.scriptOutputLocation); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.stepActionType != null) { - contents.stepActionType = __expectString(data.stepActionType); - } - if (data.stepGroupId != null) { - contents.stepGroupId = __expectString(data.stepGroupId); - } - if (data.stepId != null) { - contents.stepId = __expectString(data.stepId); - } - if (data.stepTarget != null) { - contents.stepTarget = de_StringList(data.stepTarget, context); - } - if (data.totalNoOfSrv != null) { - contents.totalNoOfSrv = __expectInt32(data.totalNoOfSrv); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } - if (data.workflowStepAutomationConfiguration != null) { - contents.workflowStepAutomationConfiguration = de_WorkflowStepAutomationConfiguration( - data.workflowStepAutomationConfiguration, - context - ); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + next: _json, + noOfSrvCompleted: __expectInt32, + noOfSrvFailed: __expectInt32, + outputs: _json, + owner: __expectString, + previous: _json, + scriptOutputLocation: __expectString, + status: __expectString, + statusMessage: __expectString, + stepActionType: __expectString, + stepGroupId: __expectString, + stepId: __expectString, + stepTarget: _json, + totalNoOfSrv: __expectInt32, + workflowId: __expectString, + workflowStepAutomationConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1787,10 +1605,9 @@ const de_GetWorkflowStepCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1810,42 +1627,21 @@ export const de_GetWorkflowStepGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.endTime != null) { - contents.endTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.endTime))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.next != null) { - contents.next = de_StringList(data.next, context); - } - if (data.owner != null) { - contents.owner = __expectString(data.owner); - } - if (data.previous != null) { - contents.previous = de_StringList(data.previous, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tools != null) { - contents.tools = de_ToolsList(data.tools, context); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + endTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + next: _json, + owner: __expectString, + previous: _json, + status: __expectString, + tools: _json, + workflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1879,10 +1675,9 @@ const de_GetWorkflowStepGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1902,12 +1697,11 @@ export const de_ListPluginsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.plugins != null) { - contents.plugins = de_PluginSummaries(data.plugins, context); - } + const doc = take(data, { + nextToken: __expectString, + plugins: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1935,10 +1729,9 @@ const de_ListPluginsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,9 +1751,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1985,10 +1779,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2008,12 +1801,11 @@ export const de_ListTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templateSummary != null) { - contents.templateSummary = de_TemplateSummaryList(data.templateSummary, context); - } + const doc = take(data, { + nextToken: __expectString, + templateSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2041,10 +1833,9 @@ const de_ListTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2064,12 +1855,11 @@ export const de_ListTemplateStepGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templateStepGroupSummary != null) { - contents.templateStepGroupSummary = de_TemplateStepGroupSummaryList(data.templateStepGroupSummary, context); - } + const doc = take(data, { + nextToken: __expectString, + templateStepGroupSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2100,10 +1890,9 @@ const de_ListTemplateStepGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2123,12 +1912,11 @@ export const de_ListTemplateStepsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templateStepSummaryList != null) { - contents.templateStepSummaryList = de_TemplateStepSummaryList(data.templateStepSummaryList, context); - } + const doc = take(data, { + nextToken: __expectString, + templateStepSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2162,10 +1950,9 @@ const de_ListTemplateStepsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2185,12 +1972,11 @@ export const de_ListWorkflowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.migrationWorkflowSummary != null) { - contents.migrationWorkflowSummary = de_MigrationWorkflowSummaryList(data.migrationWorkflowSummary, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + migrationWorkflowSummary: (_) => de_MigrationWorkflowSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2224,10 +2010,9 @@ const de_ListWorkflowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2247,12 +2032,11 @@ export const de_ListWorkflowStepGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workflowStepGroupsSummary != null) { - contents.workflowStepGroupsSummary = de_WorkflowStepGroupsSummaryList(data.workflowStepGroupsSummary, context); - } + const doc = take(data, { + nextToken: __expectString, + workflowStepGroupsSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2286,10 +2070,9 @@ const de_ListWorkflowStepGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2309,12 +2092,11 @@ export const de_ListWorkflowStepsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.workflowStepsSummary != null) { - contents.workflowStepsSummary = de_WorkflowStepsSummaryList(data.workflowStepsSummary, context); - } + const doc = take(data, { + nextToken: __expectString, + workflowStepsSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2345,10 +2127,9 @@ const de_ListWorkflowStepsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2368,18 +2149,13 @@ export const de_RetryWorkflowStepCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.stepGroupId != null) { - contents.stepGroupId = __expectString(data.stepGroupId); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } + const doc = take(data, { + id: __expectString, + status: __expectString, + stepGroupId: __expectString, + workflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2410,10 +2186,9 @@ const de_RetryWorkflowStepCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2433,21 +2208,14 @@ export const de_StartWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastStartTime != null) { - contents.lastStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + lastStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2481,10 +2249,9 @@ const de_StartWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2504,21 +2271,14 @@ export const de_StopWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastStopTime != null) { - contents.lastStopTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStopTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + lastStopTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2552,10 +2312,9 @@ const de_StopWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2599,10 +2358,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2646,10 +2404,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2669,42 +2426,21 @@ export const de_UpdateWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.adsApplicationConfigurationId != null) { - contents.adsApplicationConfigurationId = __expectString(data.adsApplicationConfigurationId); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.creationTime))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.stepTargets != null) { - contents.stepTargets = de_StringList(data.stepTargets, context); - } - if (data.tags != null) { - contents.tags = de_StringMap(data.tags, context); - } - if (data.templateId != null) { - contents.templateId = __expectString(data.templateId); - } - if (data.workflowInputs != null) { - contents.workflowInputs = de_StepInputParameters(data.workflowInputs, context); - } + const doc = take(data, { + adsApplicationConfigurationId: __expectString, + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + id: __expectString, + lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + stepTargets: _json, + tags: _json, + templateId: __expectString, + workflowInputs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2738,10 +2474,9 @@ const de_UpdateWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2761,18 +2496,13 @@ export const de_UpdateWorkflowStepCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.stepGroupId != null) { - contents.stepGroupId = __expectString(data.stepGroupId); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } + const doc = take(data, { + id: __expectString, + name: __expectString, + stepGroupId: __expectString, + workflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2803,10 +2533,9 @@ const de_UpdateWorkflowStepCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2826,30 +2555,17 @@ export const de_UpdateWorkflowStepGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastModifiedTime != null) { - contents.lastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastModifiedTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.next != null) { - contents.next = de_StringList(data.next, context); - } - if (data.previous != null) { - contents.previous = de_StringList(data.previous, context); - } - if (data.tools != null) { - contents.tools = de_ToolsList(data.tools, context); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } + const doc = take(data, { + description: __expectString, + id: __expectString, + lastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + next: _json, + previous: _json, + tools: _json, + workflowId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2883,16 +2599,15 @@ const de_UpdateWorkflowStepGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2902,9 +2617,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2921,9 +2637,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2940,9 +2657,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2956,9 +2674,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2972,9 +2691,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2982,162 +2702,44 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1PlatformCommand - */ -const se_PlatformCommand = (input: PlatformCommand, context: __SerdeContext): any => { - return { - ...(input.linux != null && { linux: input.linux }), - ...(input.windows != null && { windows: input.windows }), - }; -}; +// se_PlatformCommand omitted. -/** - * serializeAws_restJson1PlatformScriptKey - */ -const se_PlatformScriptKey = (input: PlatformScriptKey, context: __SerdeContext): any => { - return { - ...(input.linux != null && { linux: input.linux }), - ...(input.windows != null && { windows: input.windows }), - }; -}; +// se_PlatformScriptKey omitted. -/** - * serializeAws_restJson1StepInput - */ -const se_StepInput = (input: StepInput, context: __SerdeContext): any => { - return StepInput.visit(input, { - integerValue: (value) => ({ integerValue: value }), - listOfStringsValue: (value) => ({ listOfStringsValue: se_StringList(value, context) }), - mapOfStringValue: (value) => ({ mapOfStringValue: se_StringMap(value, context) }), - stringValue: (value) => ({ stringValue: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_StepInput omitted. -/** - * serializeAws_restJson1StepInputParameters - */ -const se_StepInputParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_StepInput(value, context); - return acc; - }, {}); -}; +// se_StepInputParameters omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StringMap omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1WorkflowStepAutomationConfiguration - */ -const se_WorkflowStepAutomationConfiguration = ( - input: WorkflowStepAutomationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.command != null && { command: se_PlatformCommand(input.command, context) }), - ...(input.runEnvironment != null && { runEnvironment: input.runEnvironment }), - ...(input.scriptLocationS3Bucket != null && { scriptLocationS3Bucket: input.scriptLocationS3Bucket }), - ...(input.scriptLocationS3Key != null && { - scriptLocationS3Key: se_PlatformScriptKey(input.scriptLocationS3Key, context), - }), - ...(input.targetType != null && { targetType: input.targetType }), - }; -}; +// se_WorkflowStepAutomationConfiguration omitted. -/** - * serializeAws_restJson1WorkflowStepOutput - */ -const se_WorkflowStepOutput = (input: WorkflowStepOutput, context: __SerdeContext): any => { - return { - ...(input.dataType != null && { dataType: input.dataType }), - ...(input.name != null && { name: input.name }), - ...(input.required != null && { required: input.required }), - ...(input.value != null && { value: se_WorkflowStepOutputUnion(input.value, context) }), - }; -}; +// se_WorkflowStepOutput omitted. -/** - * serializeAws_restJson1WorkflowStepOutputList - */ -const se_WorkflowStepOutputList = (input: WorkflowStepOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WorkflowStepOutput(entry, context); - }); -}; +// se_WorkflowStepOutputList omitted. -/** - * serializeAws_restJson1WorkflowStepOutputUnion - */ -const se_WorkflowStepOutputUnion = (input: WorkflowStepOutputUnion, context: __SerdeContext): any => { - return WorkflowStepOutputUnion.visit(input, { - integerValue: (value) => ({ integerValue: value }), - listOfStringValue: (value) => ({ listOfStringValue: se_StringList(value, context) }), - stringValue: (value) => ({ stringValue: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_WorkflowStepOutputUnion omitted. /** * deserializeAws_restJson1MigrationWorkflowSummary */ const de_MigrationWorkflowSummary = (output: any, context: __SerdeContext): MigrationWorkflowSummary => { - return { - adsApplicationConfigurationName: __expectString(output.adsApplicationConfigurationName), - completedSteps: __expectInt32(output.completedSteps), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - templateId: __expectString(output.templateId), - totalSteps: __expectInt32(output.totalSteps), - } as any; + return take(output, { + adsApplicationConfigurationName: __expectString, + completedSteps: __expectInt32, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + name: __expectString, + status: __expectString, + statusMessage: __expectString, + templateId: __expectString, + totalSteps: __expectInt32, + }) as any; }; /** @@ -3147,443 +2749,70 @@ const de_MigrationWorkflowSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MigrationWorkflowSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PlatformCommand - */ -const de_PlatformCommand = (output: any, context: __SerdeContext): PlatformCommand => { - return { - linux: __expectString(output.linux), - windows: __expectString(output.windows), - } as any; -}; +// de_PlatformCommand omitted. -/** - * deserializeAws_restJson1PlatformScriptKey - */ -const de_PlatformScriptKey = (output: any, context: __SerdeContext): PlatformScriptKey => { - return { - linux: __expectString(output.linux), - windows: __expectString(output.windows), - } as any; -}; +// de_PlatformScriptKey omitted. -/** - * deserializeAws_restJson1PluginSummaries - */ -const de_PluginSummaries = (output: any, context: __SerdeContext): PluginSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PluginSummary(entry, context); - }); - return retVal; -}; +// de_PluginSummaries omitted. -/** - * deserializeAws_restJson1PluginSummary - */ -const de_PluginSummary = (output: any, context: __SerdeContext): PluginSummary => { - return { - hostname: __expectString(output.hostname), - ipAddress: __expectString(output.ipAddress), - pluginId: __expectString(output.pluginId), - registeredTime: __expectString(output.registeredTime), - status: __expectString(output.status), - version: __expectString(output.version), - } as any; -}; +// de_PluginSummary omitted. -/** - * deserializeAws_restJson1StepAutomationConfiguration - */ -const de_StepAutomationConfiguration = (output: any, context: __SerdeContext): StepAutomationConfiguration => { - return { - command: output.command != null ? de_PlatformCommand(output.command, context) : undefined, - runEnvironment: __expectString(output.runEnvironment), - scriptLocationS3Bucket: __expectString(output.scriptLocationS3Bucket), - scriptLocationS3Key: - output.scriptLocationS3Key != null ? de_PlatformScriptKey(output.scriptLocationS3Key, context) : undefined, - targetType: __expectString(output.targetType), - } as any; -}; +// de_StepAutomationConfiguration omitted. -/** - * deserializeAws_restJson1StepInput - */ -const de_StepInput = (output: any, context: __SerdeContext): StepInput => { - if (__expectInt32(output.integerValue) !== undefined) { - return { integerValue: __expectInt32(output.integerValue) as any }; - } - if (output.listOfStringsValue != null) { - return { - listOfStringsValue: de_StringList(output.listOfStringsValue, context), - }; - } - if (output.mapOfStringValue != null) { - return { - mapOfStringValue: de_StringMap(output.mapOfStringValue, context), - }; - } - if (__expectString(output.stringValue) !== undefined) { - return { stringValue: __expectString(output.stringValue) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_StepInput omitted. -/** - * deserializeAws_restJson1StepInputParameters - */ -const de_StepInputParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_StepInput(__expectUnion(value), context); - return acc; - }, {}); -}; +// de_StepInputParameters omitted. -/** - * deserializeAws_restJson1StepOutput - */ -const de_StepOutput = (output: any, context: __SerdeContext): StepOutput => { - return { - dataType: __expectString(output.dataType), - name: __expectString(output.name), - required: __expectBoolean(output.required), - } as any; -}; +// de_StepOutput omitted. -/** - * deserializeAws_restJson1StepOutputList - */ -const de_StepOutputList = (output: any, context: __SerdeContext): StepOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StepOutput(entry, context); - }); - return retVal; -}; +// de_StepOutputList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TemplateInput - */ -const de_TemplateInput = (output: any, context: __SerdeContext): TemplateInput => { - return { - dataType: __expectString(output.dataType), - inputName: __expectString(output.inputName), - required: __expectBoolean(output.required), - } as any; -}; +// de_TemplateInput omitted. -/** - * deserializeAws_restJson1TemplateInputList - */ -const de_TemplateInputList = (output: any, context: __SerdeContext): TemplateInput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateInput(entry, context); - }); - return retVal; -}; +// de_TemplateInputList omitted. -/** - * deserializeAws_restJson1TemplateStepGroupSummary - */ -const de_TemplateStepGroupSummary = (output: any, context: __SerdeContext): TemplateStepGroupSummary => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - next: output.next != null ? de_StringList(output.next, context) : undefined, - previous: output.previous != null ? de_StringList(output.previous, context) : undefined, - } as any; -}; +// de_TemplateStepGroupSummary omitted. -/** - * deserializeAws_restJson1TemplateStepGroupSummaryList - */ -const de_TemplateStepGroupSummaryList = (output: any, context: __SerdeContext): TemplateStepGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateStepGroupSummary(entry, context); - }); - return retVal; -}; +// de_TemplateStepGroupSummaryList omitted. -/** - * deserializeAws_restJson1TemplateStepSummary - */ -const de_TemplateStepSummary = (output: any, context: __SerdeContext): TemplateStepSummary => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - next: output.next != null ? de_StringList(output.next, context) : undefined, - owner: __expectString(output.owner), - previous: output.previous != null ? de_StringList(output.previous, context) : undefined, - stepActionType: __expectString(output.stepActionType), - stepGroupId: __expectString(output.stepGroupId), - targetType: __expectString(output.targetType), - templateId: __expectString(output.templateId), - } as any; -}; +// de_TemplateStepSummary omitted. -/** - * deserializeAws_restJson1TemplateStepSummaryList - */ -const de_TemplateStepSummaryList = (output: any, context: __SerdeContext): TemplateStepSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateStepSummary(entry, context); - }); - return retVal; -}; +// de_TemplateStepSummaryList omitted. -/** - * deserializeAws_restJson1TemplateSummary - */ -const de_TemplateSummary = (output: any, context: __SerdeContext): TemplateSummary => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_TemplateSummary omitted. -/** - * deserializeAws_restJson1TemplateSummaryList - */ -const de_TemplateSummaryList = (output: any, context: __SerdeContext): TemplateSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateSummary(entry, context); - }); - return retVal; -}; +// de_TemplateSummaryList omitted. -/** - * deserializeAws_restJson1Tool - */ -const de_Tool = (output: any, context: __SerdeContext): Tool => { - return { - name: __expectString(output.name), - url: __expectString(output.url), - } as any; -}; +// de_Tool omitted. -/** - * deserializeAws_restJson1ToolsList - */ -const de_ToolsList = (output: any, context: __SerdeContext): Tool[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tool(entry, context); - }); - return retVal; -}; +// de_ToolsList omitted. -/** - * deserializeAws_restJson1WorkflowStepAutomationConfiguration - */ -const de_WorkflowStepAutomationConfiguration = ( - output: any, - context: __SerdeContext -): WorkflowStepAutomationConfiguration => { - return { - command: output.command != null ? de_PlatformCommand(output.command, context) : undefined, - runEnvironment: __expectString(output.runEnvironment), - scriptLocationS3Bucket: __expectString(output.scriptLocationS3Bucket), - scriptLocationS3Key: - output.scriptLocationS3Key != null ? de_PlatformScriptKey(output.scriptLocationS3Key, context) : undefined, - targetType: __expectString(output.targetType), - } as any; -}; +// de_WorkflowStepAutomationConfiguration omitted. -/** - * deserializeAws_restJson1WorkflowStepGroupsSummaryList - */ -const de_WorkflowStepGroupsSummaryList = (output: any, context: __SerdeContext): WorkflowStepGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowStepGroupSummary(entry, context); - }); - return retVal; -}; +// de_WorkflowStepGroupsSummaryList omitted. -/** - * deserializeAws_restJson1WorkflowStepGroupSummary - */ -const de_WorkflowStepGroupSummary = (output: any, context: __SerdeContext): WorkflowStepGroupSummary => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - next: output.next != null ? de_StringList(output.next, context) : undefined, - owner: __expectString(output.owner), - previous: output.previous != null ? de_StringList(output.previous, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_WorkflowStepGroupSummary omitted. -/** - * deserializeAws_restJson1WorkflowStepOutput - */ -const de_WorkflowStepOutput = (output: any, context: __SerdeContext): WorkflowStepOutput => { - return { - dataType: __expectString(output.dataType), - name: __expectString(output.name), - required: __expectBoolean(output.required), - value: output.value != null ? de_WorkflowStepOutputUnion(__expectUnion(output.value), context) : undefined, - } as any; -}; +// de_WorkflowStepOutput omitted. -/** - * deserializeAws_restJson1WorkflowStepOutputList - */ -const de_WorkflowStepOutputList = (output: any, context: __SerdeContext): WorkflowStepOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowStepOutput(entry, context); - }); - return retVal; -}; +// de_WorkflowStepOutputList omitted. -/** - * deserializeAws_restJson1WorkflowStepOutputUnion - */ -const de_WorkflowStepOutputUnion = (output: any, context: __SerdeContext): WorkflowStepOutputUnion => { - if (__expectInt32(output.integerValue) !== undefined) { - return { integerValue: __expectInt32(output.integerValue) as any }; - } - if (output.listOfStringValue != null) { - return { - listOfStringValue: de_StringList(output.listOfStringValue, context), - }; - } - if (__expectString(output.stringValue) !== undefined) { - return { stringValue: __expectString(output.stringValue) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_WorkflowStepOutputUnion omitted. -/** - * deserializeAws_restJson1WorkflowStepsSummaryList - */ -const de_WorkflowStepsSummaryList = (output: any, context: __SerdeContext): WorkflowStepSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowStepSummary(entry, context); - }); - return retVal; -}; +// de_WorkflowStepsSummaryList omitted. -/** - * deserializeAws_restJson1WorkflowStepSummary - */ -const de_WorkflowStepSummary = (output: any, context: __SerdeContext): WorkflowStepSummary => { - return { - description: __expectString(output.description), - name: __expectString(output.name), - next: output.next != null ? de_StringList(output.next, context) : undefined, - noOfSrvCompleted: __expectInt32(output.noOfSrvCompleted), - noOfSrvFailed: __expectInt32(output.noOfSrvFailed), - owner: __expectString(output.owner), - previous: output.previous != null ? de_StringList(output.previous, context) : undefined, - scriptLocation: __expectString(output.scriptLocation), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - stepActionType: __expectString(output.stepActionType), - stepId: __expectString(output.stepId), - totalNoOfSrv: __expectInt32(output.totalNoOfSrv), - } as any; -}; +// de_WorkflowStepSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts b/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts index 070b8c6725c0..12e1aa9af99b 100644 --- a/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts +++ b/clients/client-migrationhubstrategy/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,12 +9,12 @@ import { expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -81,26 +82,14 @@ import { UpdateServerConfigCommandInput, UpdateServerConfigCommandOutput } from import { MigrationHubStrategyServiceException as __BaseException } from "../models/MigrationHubStrategyServiceException"; import { AccessDeniedException, - AnalysisStatusUnion, - AnalyzerNameUnion, - AntipatternReportResult, - AntipatternSeveritySummary, ApplicationComponentDetail, - ApplicationComponentStatusSummary, - ApplicationComponentStrategy, - ApplicationComponentSummary, ApplicationPreferences, - AppUnitError, AssessmentSummary, AssessmentTarget, - AssociatedApplication, AwsManagedResources, AwsManagedTargetDestination, BusinessGoals, - Collector, - ConfigurationSummary, ConflictException, - DatabaseConfigDetail, DatabaseMigrationPreference, DatabasePreferences, DataCollectionDetails, @@ -112,41 +101,23 @@ import { HomogeneousTargetDatabaseEngine, ImportFileTaskInformation, InternalServerException, - IPAddressBasedRemoteInfo, ManagementPreference, - NetworkInfo, NoDatabaseMigrationPreference, NoManagementPreference, NoPreferenceTargetDestination, - OSInfo, - PipelineInfo, PrioritizeBusinessGoals, RecommendationReportDetails, - RecommendationSet, - RemoteSourceCodeAnalysisServerInfo, ResourceNotFoundException, - Result, - S3Object, SelfManageResources, SelfManageTargetDestination, ServerDetail, - ServerError, - ServerStatusSummary, - ServerStrategy, - ServerSummary, ServiceLinkedRoleLockClientException, ServiceQuotaExceededException, SourceCode, - SourceCodeRepository, StrategyOption, - StrategySummary, - SystemInfo, TargetDatabaseEngine, ThrottlingException, - TransformationTool, ValidationException, - VcenterBasedRemoteInfo, - VersionControlInfo, } from "../models/models_0"; /** @@ -428,16 +399,16 @@ export const se_ListApplicationComponentsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applicationcomponents"; let body: any; - body = JSON.stringify({ - ...(input.applicationComponentCriteria != null && { - applicationComponentCriteria: input.applicationComponentCriteria, - }), - ...(input.filterValue != null && { filterValue: input.filterValue }), - ...(input.groupIdFilter != null && { groupIdFilter: se_GroupIds(input.groupIdFilter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sort != null && { sort: input.sort }), - }); + body = JSON.stringify( + take(input, { + applicationComponentCriteria: [], + filterValue: [], + groupIdFilter: (_) => _json(_), + maxResults: [], + nextToken: [], + sort: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -516,14 +487,16 @@ export const se_ListServersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-servers"; let body: any; - body = JSON.stringify({ - ...(input.filterValue != null && { filterValue: input.filterValue }), - ...(input.groupIdFilter != null && { groupIdFilter: se_GroupIds(input.groupIdFilter, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serverCriteria != null && { serverCriteria: input.serverCriteria }), - ...(input.sort != null && { sort: input.sort }), - }); + body = JSON.stringify( + take(input, { + filterValue: [], + groupIdFilter: (_) => _json(_), + maxResults: [], + nextToken: [], + serverCriteria: [], + sort: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -549,18 +522,14 @@ export const se_PutPortfolioPreferencesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-portfolio-preferences"; let body: any; - body = JSON.stringify({ - ...(input.applicationMode != null && { applicationMode: input.applicationMode }), - ...(input.applicationPreferences != null && { - applicationPreferences: se_ApplicationPreferences(input.applicationPreferences, context), - }), - ...(input.databasePreferences != null && { - databasePreferences: se_DatabasePreferences(input.databasePreferences, context), - }), - ...(input.prioritizeBusinessGoals != null && { - prioritizeBusinessGoals: se_PrioritizeBusinessGoals(input.prioritizeBusinessGoals, context), - }), - }); + body = JSON.stringify( + take(input, { + applicationMode: [], + applicationPreferences: (_) => _json(_), + databasePreferences: (_) => _json(_), + prioritizeBusinessGoals: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -585,13 +554,13 @@ export const se_StartAssessmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-assessment"; let body: any; - body = JSON.stringify({ - ...(input.assessmentTargets != null && { - assessmentTargets: se_AssessmentTargets(input.assessmentTargets, context), - }), - ...(input.s3bucketForAnalysisData != null && { s3bucketForAnalysisData: input.s3bucketForAnalysisData }), - ...(input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData }), - }); + body = JSON.stringify( + take(input, { + assessmentTargets: (_) => _json(_), + s3bucketForAnalysisData: [], + s3bucketForReportData: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -617,14 +586,16 @@ export const se_StartImportFileTaskCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-import-file-task"; let body: any; - body = JSON.stringify({ - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.dataSourceType != null && { dataSourceType: input.dataSourceType }), - ...(input.groupId != null && { groupId: se_GroupIds(input.groupId, context) }), - ...(input.name != null && { name: input.name }), - ...(input.s3bucketForReportData != null && { s3bucketForReportData: input.s3bucketForReportData }), - ...(input.s3key != null && { s3key: input.s3key }), - }); + body = JSON.stringify( + take(input, { + S3Bucket: [], + dataSourceType: [], + groupId: (_) => _json(_), + name: [], + s3bucketForReportData: [], + s3key: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -650,10 +621,12 @@ export const se_StartRecommendationReportGenerationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-recommendation-report-generation"; let body: any; - body = JSON.stringify({ - ...(input.groupIdFilter != null && { groupIdFilter: se_GroupIds(input.groupIdFilter, context) }), - ...(input.outputFormat != null && { outputFormat: input.outputFormat }), - }); + body = JSON.stringify( + take(input, { + groupIdFilter: (_) => _json(_), + outputFormat: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -678,9 +651,11 @@ export const se_StopAssessmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stop-assessment"; let body: any; - body = JSON.stringify({ - ...(input.assessmentId != null && { assessmentId: input.assessmentId }), - }); + body = JSON.stringify( + take(input, { + assessmentId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -706,15 +681,17 @@ export const se_UpdateApplicationComponentConfigCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-applicationcomponent-config"; let body: any; - body = JSON.stringify({ - ...(input.appType != null && { appType: input.appType }), - ...(input.applicationComponentId != null && { applicationComponentId: input.applicationComponentId }), - ...(input.configureOnly != null && { configureOnly: input.configureOnly }), - ...(input.inclusionStatus != null && { inclusionStatus: input.inclusionStatus }), - ...(input.secretsManagerKey != null && { secretsManagerKey: input.secretsManagerKey }), - ...(input.sourceCodeList != null && { sourceCodeList: se_SourceCodeList(input.sourceCodeList, context) }), - ...(input.strategyOption != null && { strategyOption: se_StrategyOption(input.strategyOption, context) }), - }); + body = JSON.stringify( + take(input, { + appType: [], + applicationComponentId: [], + configureOnly: [], + inclusionStatus: [], + secretsManagerKey: [], + sourceCodeList: (_) => _json(_), + strategyOption: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -739,10 +716,12 @@ export const se_UpdateServerConfigCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-server-config"; let body: any; - body = JSON.stringify({ - ...(input.serverId != null && { serverId: input.serverId }), - ...(input.strategyOption != null && { strategyOption: se_StrategyOption(input.strategyOption, context) }), - }); + body = JSON.stringify( + take(input, { + serverId: [], + strategyOption: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -768,18 +747,13 @@ export const de_GetApplicationComponentDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationComponentDetail != null) { - contents.applicationComponentDetail = de_ApplicationComponentDetail(data.applicationComponentDetail, context); - } - if (data.associatedApplications != null) { - contents.associatedApplications = de_AssociatedApplications(data.associatedApplications, context); - } - if (data.associatedServerIds != null) { - contents.associatedServerIds = de_AssociatedServerIDs(data.associatedServerIds, context); - } - if (data.moreApplicationResource != null) { - contents.moreApplicationResource = __expectBoolean(data.moreApplicationResource); - } + const doc = take(data, { + applicationComponentDetail: (_) => de_ApplicationComponentDetail(_, context), + associatedApplications: _json, + associatedServerIds: _json, + moreApplicationResource: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -807,10 +781,9 @@ const de_GetApplicationComponentDetailsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -830,12 +803,10 @@ export const de_GetApplicationComponentStrategiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationComponentStrategies != null) { - contents.applicationComponentStrategies = de_ApplicationComponentStrategies( - data.applicationComponentStrategies, - context - ); - } + const doc = take(data, { + applicationComponentStrategies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -863,10 +834,9 @@ const de_GetApplicationComponentStrategiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -886,15 +856,12 @@ export const de_GetAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentTargets != null) { - contents.assessmentTargets = de_AssessmentTargets(data.assessmentTargets, context); - } - if (data.dataCollectionDetails != null) { - contents.dataCollectionDetails = de_DataCollectionDetails(data.dataCollectionDetails, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + assessmentTargets: _json, + dataCollectionDetails: (_) => de_DataCollectionDetails(_, context), + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -925,10 +892,9 @@ const de_GetAssessmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -948,39 +914,20 @@ export const de_GetImportFileTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completionTime))); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.importName != null) { - contents.importName = __expectString(data.importName); - } - if (data.inputS3Bucket != null) { - contents.inputS3Bucket = __expectString(data.inputS3Bucket); - } - if (data.inputS3Key != null) { - contents.inputS3Key = __expectString(data.inputS3Key); - } - if (data.numberOfRecordsFailed != null) { - contents.numberOfRecordsFailed = __expectInt32(data.numberOfRecordsFailed); - } - if (data.numberOfRecordsSuccess != null) { - contents.numberOfRecordsSuccess = __expectInt32(data.numberOfRecordsSuccess); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startTime))); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReportS3Bucket != null) { - contents.statusReportS3Bucket = __expectString(data.statusReportS3Bucket); - } - if (data.statusReportS3Key != null) { - contents.statusReportS3Key = __expectString(data.statusReportS3Key); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + importName: __expectString, + inputS3Bucket: __expectString, + inputS3Key: __expectString, + numberOfRecordsFailed: __expectInt32, + numberOfRecordsSuccess: __expectInt32, + startTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReportS3Bucket: __expectString, + statusReportS3Key: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1014,10 +961,9 @@ const de_GetImportFileTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1037,9 +983,10 @@ export const de_GetLatestAssessmentIdCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1070,10 +1017,9 @@ const de_GetLatestAssessmentIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1093,18 +1039,13 @@ export const de_GetPortfolioPreferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationMode != null) { - contents.applicationMode = __expectString(data.applicationMode); - } - if (data.applicationPreferences != null) { - contents.applicationPreferences = de_ApplicationPreferences(data.applicationPreferences, context); - } - if (data.databasePreferences != null) { - contents.databasePreferences = de_DatabasePreferences(data.databasePreferences, context); - } - if (data.prioritizeBusinessGoals != null) { - contents.prioritizeBusinessGoals = de_PrioritizeBusinessGoals(data.prioritizeBusinessGoals, context); - } + const doc = take(data, { + applicationMode: __expectString, + applicationPreferences: _json, + databasePreferences: _json, + prioritizeBusinessGoals: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1135,10 +1076,9 @@ const de_GetPortfolioPreferencesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1158,9 +1098,10 @@ export const de_GetPortfolioSummaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentSummary != null) { - contents.assessmentSummary = de_AssessmentSummary(data.assessmentSummary, context); - } + const doc = take(data, { + assessmentSummary: (_) => de_AssessmentSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1188,10 +1129,9 @@ const de_GetPortfolioSummaryCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1211,12 +1151,11 @@ export const de_GetRecommendationReportDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.recommendationReportDetails != null) { - contents.recommendationReportDetails = de_RecommendationReportDetails(data.recommendationReportDetails, context); - } + const doc = take(data, { + id: __expectString, + recommendationReportDetails: (_) => de_RecommendationReportDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1250,10 +1189,9 @@ const de_GetRecommendationReportDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,15 +1211,12 @@ export const de_GetServerDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associatedApplications != null) { - contents.associatedApplications = de_AssociatedApplications(data.associatedApplications, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.serverDetail != null) { - contents.serverDetail = de_ServerDetail(data.serverDetail, context); - } + const doc = take(data, { + associatedApplications: _json, + nextToken: __expectString, + serverDetail: (_) => de_ServerDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1315,10 +1250,9 @@ const de_GetServerDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1338,9 +1272,10 @@ export const de_GetServerStrategiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.serverStrategies != null) { - contents.serverStrategies = de_ServerStrategies(data.serverStrategies, context); - } + const doc = take(data, { + serverStrategies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1374,10 +1309,9 @@ const de_GetServerStrategiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1397,12 +1331,11 @@ export const de_ListApplicationComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationComponentInfos != null) { - contents.applicationComponentInfos = de_ApplicationComponentDetails(data.applicationComponentInfos, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + applicationComponentInfos: (_) => de_ApplicationComponentDetails(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1433,10 +1366,9 @@ const de_ListApplicationComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1456,12 +1388,11 @@ export const de_ListCollectorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Collectors != null) { - contents.Collectors = de_Collectors(data.Collectors, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Collectors: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1492,10 +1423,9 @@ const de_ListCollectorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1515,12 +1445,11 @@ export const de_ListImportFileTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.taskInfos != null) { - contents.taskInfos = de_ListImportFileTaskInformation(data.taskInfos, context); - } + const doc = take(data, { + nextToken: __expectString, + taskInfos: (_) => de_ListImportFileTaskInformation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1551,10 +1480,9 @@ const de_ListImportFileTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1574,12 +1502,11 @@ export const de_ListServersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.serverInfos != null) { - contents.serverInfos = de_ServerDetails(data.serverInfos, context); - } + const doc = take(data, { + nextToken: __expectString, + serverInfos: (_) => de_ServerDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1610,10 +1537,9 @@ const de_ListServersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1666,10 +1592,9 @@ const de_PutPortfolioPreferencesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1689,9 +1614,10 @@ export const de_StartAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentId != null) { - contents.assessmentId = __expectString(data.assessmentId); - } + const doc = take(data, { + assessmentId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1722,10 +1648,9 @@ const de_StartAssessmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1745,9 +1670,10 @@ export const de_StartImportFileTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1781,10 +1707,9 @@ const de_StartImportFileTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1804,9 +1729,10 @@ export const de_StartRecommendationReportGenerationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } + const doc = take(data, { + id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1840,10 +1766,9 @@ const de_StartRecommendationReportGenerationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1893,10 +1818,9 @@ const de_StopAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1946,10 +1870,9 @@ const de_UpdateApplicationComponentConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1999,16 +1922,15 @@ const de_UpdateServerConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2018,9 +1940,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2034,9 +1957,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2050,9 +1974,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_DependencyExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DependencyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2069,9 +1994,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2088,9 +2014,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2107,9 +2034,10 @@ const de_ServiceLinkedRoleLockClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceLinkedRoleLockClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2126,9 +2054,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2142,9 +2071,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2158,9 +2088,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2168,425 +2099,97 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApplicationPreferences - */ -const se_ApplicationPreferences = (input: ApplicationPreferences, context: __SerdeContext): any => { - return { - ...(input.managementPreference != null && { - managementPreference: se_ManagementPreference(input.managementPreference, context), - }), - }; -}; +// se_ApplicationPreferences omitted. -/** - * serializeAws_restJson1AssessmentTarget - */ -const se_AssessmentTarget = (input: AssessmentTarget, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: input.condition }), - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_AssessmentTargetValues(input.values, context) }), - }; -}; +// se_AssessmentTarget omitted. -/** - * serializeAws_restJson1AssessmentTargets - */ -const se_AssessmentTargets = (input: AssessmentTarget[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssessmentTarget(entry, context); - }); -}; +// se_AssessmentTargets omitted. -/** - * serializeAws_restJson1AssessmentTargetValues - */ -const se_AssessmentTargetValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AssessmentTargetValues omitted. -/** - * serializeAws_restJson1AwsManagedResources - */ -const se_AwsManagedResources = (input: AwsManagedResources, context: __SerdeContext): any => { - return { - ...(input.targetDestination != null && { - targetDestination: se_AwsManagedTargetDestinations(input.targetDestination, context), - }), - }; -}; +// se_AwsManagedResources omitted. -/** - * serializeAws_restJson1AwsManagedTargetDestinations - */ -const se_AwsManagedTargetDestinations = ( - input: (AwsManagedTargetDestination | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AwsManagedTargetDestinations omitted. -/** - * serializeAws_restJson1BusinessGoals - */ -const se_BusinessGoals = (input: BusinessGoals, context: __SerdeContext): any => { - return { - ...(input.licenseCostReduction != null && { licenseCostReduction: input.licenseCostReduction }), - ...(input.modernizeInfrastructureWithCloudNativeTechnologies != null && { - modernizeInfrastructureWithCloudNativeTechnologies: input.modernizeInfrastructureWithCloudNativeTechnologies, - }), - ...(input.reduceOperationalOverheadWithManagedServices != null && { - reduceOperationalOverheadWithManagedServices: input.reduceOperationalOverheadWithManagedServices, - }), - ...(input.speedOfMigration != null && { speedOfMigration: input.speedOfMigration }), - }; -}; +// se_BusinessGoals omitted. -/** - * serializeAws_restJson1DatabaseMigrationPreference - */ -const se_DatabaseMigrationPreference = (input: DatabaseMigrationPreference, context: __SerdeContext): any => { - return DatabaseMigrationPreference.visit(input, { - heterogeneous: (value) => ({ heterogeneous: se_Heterogeneous(value, context) }), - homogeneous: (value) => ({ homogeneous: se_Homogeneous(value, context) }), - noPreference: (value) => ({ noPreference: se_NoDatabaseMigrationPreference(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_DatabaseMigrationPreference omitted. -/** - * serializeAws_restJson1DatabasePreferences - */ -const se_DatabasePreferences = (input: DatabasePreferences, context: __SerdeContext): any => { - return { - ...(input.databaseManagementPreference != null && { - databaseManagementPreference: input.databaseManagementPreference, - }), - ...(input.databaseMigrationPreference != null && { - databaseMigrationPreference: se_DatabaseMigrationPreference(input.databaseMigrationPreference, context), - }), - }; -}; +// se_DatabasePreferences omitted. -/** - * serializeAws_restJson1Group - */ -const se_Group = (input: Group, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Group omitted. -/** - * serializeAws_restJson1GroupIds - */ -const se_GroupIds = (input: Group[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Group(entry, context); - }); -}; +// se_GroupIds omitted. -/** - * serializeAws_restJson1Heterogeneous - */ -const se_Heterogeneous = (input: Heterogeneous, context: __SerdeContext): any => { - return { - ...(input.targetDatabaseEngine != null && { - targetDatabaseEngine: se_HeterogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context), - }), - }; -}; +// se_Heterogeneous omitted. -/** - * serializeAws_restJson1HeterogeneousTargetDatabaseEngines - */ -const se_HeterogeneousTargetDatabaseEngines = ( - input: (HeterogeneousTargetDatabaseEngine | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HeterogeneousTargetDatabaseEngines omitted. -/** - * serializeAws_restJson1Homogeneous - */ -const se_Homogeneous = (input: Homogeneous, context: __SerdeContext): any => { - return { - ...(input.targetDatabaseEngine != null && { - targetDatabaseEngine: se_HomogeneousTargetDatabaseEngines(input.targetDatabaseEngine, context), - }), - }; -}; +// se_Homogeneous omitted. -/** - * serializeAws_restJson1HomogeneousTargetDatabaseEngines - */ -const se_HomogeneousTargetDatabaseEngines = ( - input: (HomogeneousTargetDatabaseEngine | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_HomogeneousTargetDatabaseEngines omitted. -/** - * serializeAws_restJson1ManagementPreference - */ -const se_ManagementPreference = (input: ManagementPreference, context: __SerdeContext): any => { - return ManagementPreference.visit(input, { - awsManagedResources: (value) => ({ awsManagedResources: se_AwsManagedResources(value, context) }), - noPreference: (value) => ({ noPreference: se_NoManagementPreference(value, context) }), - selfManageResources: (value) => ({ selfManageResources: se_SelfManageResources(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ManagementPreference omitted. -/** - * serializeAws_restJson1NoDatabaseMigrationPreference - */ -const se_NoDatabaseMigrationPreference = (input: NoDatabaseMigrationPreference, context: __SerdeContext): any => { - return { - ...(input.targetDatabaseEngine != null && { - targetDatabaseEngine: se_TargetDatabaseEngines(input.targetDatabaseEngine, context), - }), - }; -}; +// se_NoDatabaseMigrationPreference omitted. -/** - * serializeAws_restJson1NoManagementPreference - */ -const se_NoManagementPreference = (input: NoManagementPreference, context: __SerdeContext): any => { - return { - ...(input.targetDestination != null && { - targetDestination: se_NoPreferenceTargetDestinations(input.targetDestination, context), - }), - }; -}; +// se_NoManagementPreference omitted. -/** - * serializeAws_restJson1NoPreferenceTargetDestinations - */ -const se_NoPreferenceTargetDestinations = ( - input: (NoPreferenceTargetDestination | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NoPreferenceTargetDestinations omitted. -/** - * serializeAws_restJson1PrioritizeBusinessGoals - */ -const se_PrioritizeBusinessGoals = (input: PrioritizeBusinessGoals, context: __SerdeContext): any => { - return { - ...(input.businessGoals != null && { businessGoals: se_BusinessGoals(input.businessGoals, context) }), - }; -}; +// se_PrioritizeBusinessGoals omitted. -/** - * serializeAws_restJson1SelfManageResources - */ -const se_SelfManageResources = (input: SelfManageResources, context: __SerdeContext): any => { - return { - ...(input.targetDestination != null && { - targetDestination: se_SelfManageTargetDestinations(input.targetDestination, context), - }), - }; -}; +// se_SelfManageResources omitted. -/** - * serializeAws_restJson1SelfManageTargetDestinations - */ -const se_SelfManageTargetDestinations = ( - input: (SelfManageTargetDestination | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SelfManageTargetDestinations omitted. -/** - * serializeAws_restJson1SourceCode - */ -const se_SourceCode = (input: SourceCode, context: __SerdeContext): any => { - return { - ...(input.location != null && { location: input.location }), - ...(input.projectName != null && { projectName: input.projectName }), - ...(input.sourceVersion != null && { sourceVersion: input.sourceVersion }), - ...(input.versionControl != null && { versionControl: input.versionControl }), - }; -}; +// se_SourceCode omitted. -/** - * serializeAws_restJson1SourceCodeList - */ -const se_SourceCodeList = (input: SourceCode[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceCode(entry, context); - }); -}; +// se_SourceCodeList omitted. -/** - * serializeAws_restJson1StrategyOption - */ -const se_StrategyOption = (input: StrategyOption, context: __SerdeContext): any => { - return { - ...(input.isPreferred != null && { isPreferred: input.isPreferred }), - ...(input.strategy != null && { strategy: input.strategy }), - ...(input.targetDestination != null && { targetDestination: input.targetDestination }), - ...(input.toolName != null && { toolName: input.toolName }), - }; -}; +// se_StrategyOption omitted. -/** - * serializeAws_restJson1TargetDatabaseEngines - */ -const se_TargetDatabaseEngines = (input: (TargetDatabaseEngine | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetDatabaseEngines omitted. -/** - * deserializeAws_restJson1AnalysisStatusUnion - */ -const de_AnalysisStatusUnion = (output: any, context: __SerdeContext): AnalysisStatusUnion => { - if (__expectString(output.runtimeAnalysisStatus) !== undefined) { - return { runtimeAnalysisStatus: __expectString(output.runtimeAnalysisStatus) as any }; - } - if (__expectString(output.srcCodeOrDbAnalysisStatus) !== undefined) { - return { srcCodeOrDbAnalysisStatus: __expectString(output.srcCodeOrDbAnalysisStatus) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AnalysisStatusUnion omitted. -/** - * deserializeAws_restJson1AnalyzerNameUnion - */ -const de_AnalyzerNameUnion = (output: any, context: __SerdeContext): AnalyzerNameUnion => { - if (__expectString(output.binaryAnalyzerName) !== undefined) { - return { binaryAnalyzerName: __expectString(output.binaryAnalyzerName) as any }; - } - if (__expectString(output.runTimeAnalyzerName) !== undefined) { - return { runTimeAnalyzerName: __expectString(output.runTimeAnalyzerName) as any }; - } - if (__expectString(output.sourceCodeAnalyzerName) !== undefined) { - return { sourceCodeAnalyzerName: __expectString(output.sourceCodeAnalyzerName) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AnalyzerNameUnion omitted. -/** - * deserializeAws_restJson1AntipatternReportResult - */ -const de_AntipatternReportResult = (output: any, context: __SerdeContext): AntipatternReportResult => { - return { - analyzerName: - output.analyzerName != null ? de_AnalyzerNameUnion(__expectUnion(output.analyzerName), context) : undefined, - antiPatternReportS3Object: - output.antiPatternReportS3Object != null ? de_S3Object(output.antiPatternReportS3Object, context) : undefined, - antipatternReportStatus: __expectString(output.antipatternReportStatus), - antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), - } as any; -}; +// de_AntipatternReportResult omitted. -/** - * deserializeAws_restJson1AntipatternReportResultList - */ -const de_AntipatternReportResultList = (output: any, context: __SerdeContext): AntipatternReportResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AntipatternReportResult(entry, context); - }); - return retVal; -}; +// de_AntipatternReportResultList omitted. -/** - * deserializeAws_restJson1AntipatternSeveritySummary - */ -const de_AntipatternSeveritySummary = (output: any, context: __SerdeContext): AntipatternSeveritySummary => { - return { - count: __expectInt32(output.count), - severity: __expectString(output.severity), - } as any; -}; +// de_AntipatternSeveritySummary omitted. /** * deserializeAws_restJson1ApplicationComponentDetail */ const de_ApplicationComponentDetail = (output: any, context: __SerdeContext): ApplicationComponentDetail => { - return { - analysisStatus: __expectString(output.analysisStatus), - antipatternReportS3Object: - output.antipatternReportS3Object != null ? de_S3Object(output.antipatternReportS3Object, context) : undefined, - antipatternReportStatus: __expectString(output.antipatternReportStatus), - antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), - appType: __expectString(output.appType), - appUnitError: output.appUnitError != null ? de_AppUnitError(output.appUnitError, context) : undefined, - associatedServerId: __expectString(output.associatedServerId), - databaseConfigDetail: - output.databaseConfigDetail != null ? de_DatabaseConfigDetail(output.databaseConfigDetail, context) : undefined, - id: __expectString(output.id), - inclusionStatus: __expectString(output.inclusionStatus), - lastAnalyzedTimestamp: - output.lastAnalyzedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp))) - : undefined, - listAntipatternSeveritySummary: - output.listAntipatternSeveritySummary != null - ? de_ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context) - : undefined, - moreServerAssociationExists: __expectBoolean(output.moreServerAssociationExists), - name: __expectString(output.name), - osDriver: __expectString(output.osDriver), - osVersion: __expectString(output.osVersion), - recommendationSet: - output.recommendationSet != null ? de_RecommendationSet(output.recommendationSet, context) : undefined, - resourceSubType: __expectString(output.resourceSubType), - resultList: output.resultList != null ? de_ResultList(output.resultList, context) : undefined, - runtimeStatus: __expectString(output.runtimeStatus), - runtimeStatusMessage: __expectString(output.runtimeStatusMessage), - sourceCodeRepositories: - output.sourceCodeRepositories != null - ? de_SourceCodeRepositories(output.sourceCodeRepositories, context) - : undefined, - statusMessage: __expectString(output.statusMessage), - } as any; + return take(output, { + analysisStatus: __expectString, + antipatternReportS3Object: _json, + antipatternReportStatus: __expectString, + antipatternReportStatusMessage: __expectString, + appType: __expectString, + appUnitError: _json, + associatedServerId: __expectString, + databaseConfigDetail: _json, + id: __expectString, + inclusionStatus: __expectString, + lastAnalyzedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + listAntipatternSeveritySummary: _json, + moreServerAssociationExists: __expectBoolean, + name: __expectString, + osDriver: __expectString, + osVersion: __expectString, + recommendationSet: _json, + resourceSubType: __expectString, + resultList: _json, + runtimeStatus: __expectString, + runtimeStatusMessage: __expectString, + sourceCodeRepositories: _json, + statusMessage: __expectString, + }) as any; }; /** @@ -2596,527 +2199,124 @@ const de_ApplicationComponentDetails = (output: any, context: __SerdeContext): A const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationComponentDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ApplicationComponentStatusSummary - */ -const de_ApplicationComponentStatusSummary = ( - output: any, - context: __SerdeContext -): ApplicationComponentStatusSummary => { - return { - count: __expectInt32(output.count), - srcCodeOrDbAnalysisStatus: __expectString(output.srcCodeOrDbAnalysisStatus), - } as any; -}; +// de_ApplicationComponentStatusSummary omitted. -/** - * deserializeAws_restJson1ApplicationComponentStrategies - */ -const de_ApplicationComponentStrategies = (output: any, context: __SerdeContext): ApplicationComponentStrategy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationComponentStrategy(entry, context); - }); - return retVal; -}; +// de_ApplicationComponentStrategies omitted. + +// de_ApplicationComponentStrategy omitted. + +// de_ApplicationComponentSummary omitted. + +// de_ApplicationPreferences omitted. + +// de_AppUnitError omitted. /** - * deserializeAws_restJson1ApplicationComponentStrategy + * deserializeAws_restJson1AssessmentSummary */ -const de_ApplicationComponentStrategy = (output: any, context: __SerdeContext): ApplicationComponentStrategy => { - return { - isPreferred: __expectBoolean(output.isPreferred), - recommendation: output.recommendation != null ? de_RecommendationSet(output.recommendation, context) : undefined, - status: __expectString(output.status), - } as any; +const de_AssessmentSummary = (output: any, context: __SerdeContext): AssessmentSummary => { + return take(output, { + antipatternReportS3Object: _json, + antipatternReportStatus: __expectString, + antipatternReportStatusMessage: __expectString, + lastAnalyzedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + listAntipatternSeveritySummary: _json, + listApplicationComponentStatusSummary: _json, + listApplicationComponentStrategySummary: _json, + listApplicationComponentSummary: _json, + listServerStatusSummary: _json, + listServerStrategySummary: _json, + listServerSummary: _json, + }) as any; }; -/** - * deserializeAws_restJson1ApplicationComponentSummary - */ -const de_ApplicationComponentSummary = (output: any, context: __SerdeContext): ApplicationComponentSummary => { - return { - appType: __expectString(output.appType), - count: __expectInt32(output.count), - } as any; -}; +// de_AssessmentTarget omitted. -/** - * deserializeAws_restJson1ApplicationPreferences - */ -const de_ApplicationPreferences = (output: any, context: __SerdeContext): ApplicationPreferences => { - return { - managementPreference: - output.managementPreference != null - ? de_ManagementPreference(__expectUnion(output.managementPreference), context) - : undefined, - } as any; -}; +// de_AssessmentTargets omitted. -/** - * deserializeAws_restJson1AppUnitError - */ -const de_AppUnitError = (output: any, context: __SerdeContext): AppUnitError => { - return { - appUnitErrorCategory: __expectString(output.appUnitErrorCategory), - } as any; -}; +// de_AssessmentTargetValues omitted. -/** - * deserializeAws_restJson1AssessmentSummary - */ -const de_AssessmentSummary = (output: any, context: __SerdeContext): AssessmentSummary => { - return { - antipatternReportS3Object: - output.antipatternReportS3Object != null ? de_S3Object(output.antipatternReportS3Object, context) : undefined, - antipatternReportStatus: __expectString(output.antipatternReportStatus), - antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), - lastAnalyzedTimestamp: - output.lastAnalyzedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp))) - : undefined, - listAntipatternSeveritySummary: - output.listAntipatternSeveritySummary != null - ? de_ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context) - : undefined, - listApplicationComponentStatusSummary: - output.listApplicationComponentStatusSummary != null - ? de_ListApplicationComponentStatusSummary(output.listApplicationComponentStatusSummary, context) - : undefined, - listApplicationComponentStrategySummary: - output.listApplicationComponentStrategySummary != null - ? de_ListStrategySummary(output.listApplicationComponentStrategySummary, context) - : undefined, - listApplicationComponentSummary: - output.listApplicationComponentSummary != null - ? de_ListApplicationComponentSummary(output.listApplicationComponentSummary, context) - : undefined, - listServerStatusSummary: - output.listServerStatusSummary != null - ? de_ListServerStatusSummary(output.listServerStatusSummary, context) - : undefined, - listServerStrategySummary: - output.listServerStrategySummary != null - ? de_ListStrategySummary(output.listServerStrategySummary, context) - : undefined, - listServerSummary: - output.listServerSummary != null ? de_ListServerSummary(output.listServerSummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentTarget - */ -const de_AssessmentTarget = (output: any, context: __SerdeContext): AssessmentTarget => { - return { - condition: __expectString(output.condition), - name: __expectString(output.name), - values: output.values != null ? de_AssessmentTargetValues(output.values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AssessmentTargets - */ -const de_AssessmentTargets = (output: any, context: __SerdeContext): AssessmentTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssessmentTarget(entry, context); - }); - return retVal; -}; +// de_AssociatedApplication omitted. -/** - * deserializeAws_restJson1AssessmentTargetValues - */ -const de_AssessmentTargetValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AssociatedApplications omitted. -/** - * deserializeAws_restJson1AssociatedApplication - */ -const de_AssociatedApplication = (output: any, context: __SerdeContext): AssociatedApplication => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_AssociatedServerIDs omitted. -/** - * deserializeAws_restJson1AssociatedApplications - */ -const de_AssociatedApplications = (output: any, context: __SerdeContext): AssociatedApplication[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociatedApplication(entry, context); - }); - return retVal; -}; +// de_AwsManagedResources omitted. -/** - * deserializeAws_restJson1AssociatedServerIDs - */ -const de_AssociatedServerIDs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsManagedTargetDestinations omitted. -/** - * deserializeAws_restJson1AwsManagedResources - */ -const de_AwsManagedResources = (output: any, context: __SerdeContext): AwsManagedResources => { - return { - targetDestination: - output.targetDestination != null ? de_AwsManagedTargetDestinations(output.targetDestination, context) : undefined, - } as any; -}; +// de_BusinessGoals omitted. -/** - * deserializeAws_restJson1AwsManagedTargetDestinations - */ -const de_AwsManagedTargetDestinations = ( - output: any, - context: __SerdeContext -): (AwsManagedTargetDestination | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Collector omitted. -/** - * deserializeAws_restJson1BusinessGoals - */ -const de_BusinessGoals = (output: any, context: __SerdeContext): BusinessGoals => { - return { - licenseCostReduction: __expectInt32(output.licenseCostReduction), - modernizeInfrastructureWithCloudNativeTechnologies: __expectInt32( - output.modernizeInfrastructureWithCloudNativeTechnologies - ), - reduceOperationalOverheadWithManagedServices: __expectInt32(output.reduceOperationalOverheadWithManagedServices), - speedOfMigration: __expectInt32(output.speedOfMigration), - } as any; -}; +// de_Collectors omitted. -/** - * deserializeAws_restJson1Collector - */ -const de_Collector = (output: any, context: __SerdeContext): Collector => { - return { - collectorHealth: __expectString(output.collectorHealth), - collectorId: __expectString(output.collectorId), - collectorVersion: __expectString(output.collectorVersion), - configurationSummary: - output.configurationSummary != null ? de_ConfigurationSummary(output.configurationSummary, context) : undefined, - hostName: __expectString(output.hostName), - ipAddress: __expectString(output.ipAddress), - lastActivityTimeStamp: __expectString(output.lastActivityTimeStamp), - registeredTimeStamp: __expectString(output.registeredTimeStamp), - } as any; -}; +// de_ConfigurationSummary omitted. -/** - * deserializeAws_restJson1Collectors - */ -const de_Collectors = (output: any, context: __SerdeContext): Collector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Collector(entry, context); - }); - return retVal; -}; +// de_DatabaseConfigDetail omitted. -/** - * deserializeAws_restJson1ConfigurationSummary - */ -const de_ConfigurationSummary = (output: any, context: __SerdeContext): ConfigurationSummary => { - return { - ipAddressBasedRemoteInfoList: - output.ipAddressBasedRemoteInfoList != null - ? de_IPAddressBasedRemoteInfoList(output.ipAddressBasedRemoteInfoList, context) - : undefined, - pipelineInfoList: - output.pipelineInfoList != null ? de_PipelineInfoList(output.pipelineInfoList, context) : undefined, - remoteSourceCodeAnalysisServerInfo: - output.remoteSourceCodeAnalysisServerInfo != null - ? de_RemoteSourceCodeAnalysisServerInfo(output.remoteSourceCodeAnalysisServerInfo, context) - : undefined, - vcenterBasedRemoteInfoList: - output.vcenterBasedRemoteInfoList != null - ? de_VcenterBasedRemoteInfoList(output.vcenterBasedRemoteInfoList, context) - : undefined, - versionControlInfoList: - output.versionControlInfoList != null - ? de_VersionControlInfoList(output.versionControlInfoList, context) - : undefined, - } as any; -}; +// de_DatabaseMigrationPreference omitted. -/** - * deserializeAws_restJson1DatabaseConfigDetail - */ -const de_DatabaseConfigDetail = (output: any, context: __SerdeContext): DatabaseConfigDetail => { - return { - secretName: __expectString(output.secretName), - } as any; -}; - -/** - * deserializeAws_restJson1DatabaseMigrationPreference - */ -const de_DatabaseMigrationPreference = (output: any, context: __SerdeContext): DatabaseMigrationPreference => { - if (output.heterogeneous != null) { - return { - heterogeneous: de_Heterogeneous(output.heterogeneous, context), - }; - } - if (output.homogeneous != null) { - return { - homogeneous: de_Homogeneous(output.homogeneous, context), - }; - } - if (output.noPreference != null) { - return { - noPreference: de_NoDatabaseMigrationPreference(output.noPreference, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1DatabasePreferences - */ -const de_DatabasePreferences = (output: any, context: __SerdeContext): DatabasePreferences => { - return { - databaseManagementPreference: __expectString(output.databaseManagementPreference), - databaseMigrationPreference: - output.databaseMigrationPreference != null - ? de_DatabaseMigrationPreference(__expectUnion(output.databaseMigrationPreference), context) - : undefined, - } as any; -}; +// de_DatabasePreferences omitted. /** * deserializeAws_restJson1DataCollectionDetails */ const de_DataCollectionDetails = (output: any, context: __SerdeContext): DataCollectionDetails => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) - : undefined, - failed: __expectInt32(output.failed), - inProgress: __expectInt32(output.inProgress), - servers: __expectInt32(output.servers), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - success: __expectInt32(output.success), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failed: __expectInt32, + inProgress: __expectInt32, + servers: __expectInt32, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusMessage: __expectString, + success: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1Heterogeneous - */ -const de_Heterogeneous = (output: any, context: __SerdeContext): Heterogeneous => { - return { - targetDatabaseEngine: - output.targetDatabaseEngine != null - ? de_HeterogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context) - : undefined, - } as any; -}; +// de_Heterogeneous omitted. -/** - * deserializeAws_restJson1HeterogeneousTargetDatabaseEngines - */ -const de_HeterogeneousTargetDatabaseEngines = ( - output: any, - context: __SerdeContext -): (HeterogeneousTargetDatabaseEngine | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HeterogeneousTargetDatabaseEngines omitted. -/** - * deserializeAws_restJson1Homogeneous - */ -const de_Homogeneous = (output: any, context: __SerdeContext): Homogeneous => { - return { - targetDatabaseEngine: - output.targetDatabaseEngine != null - ? de_HomogeneousTargetDatabaseEngines(output.targetDatabaseEngine, context) - : undefined, - } as any; -}; +// de_Homogeneous omitted. -/** - * deserializeAws_restJson1HomogeneousTargetDatabaseEngines - */ -const de_HomogeneousTargetDatabaseEngines = ( - output: any, - context: __SerdeContext -): (HomogeneousTargetDatabaseEngine | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HomogeneousTargetDatabaseEngines omitted. /** * deserializeAws_restJson1ImportFileTaskInformation */ const de_ImportFileTaskInformation = (output: any, context: __SerdeContext): ImportFileTaskInformation => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) - : undefined, - id: __expectString(output.id), - importName: __expectString(output.importName), - inputS3Bucket: __expectString(output.inputS3Bucket), - inputS3Key: __expectString(output.inputS3Key), - numberOfRecordsFailed: __expectInt32(output.numberOfRecordsFailed), - numberOfRecordsSuccess: __expectInt32(output.numberOfRecordsSuccess), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - statusReportS3Bucket: __expectString(output.statusReportS3Bucket), - statusReportS3Key: __expectString(output.statusReportS3Key), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + id: __expectString, + importName: __expectString, + inputS3Bucket: __expectString, + inputS3Key: __expectString, + numberOfRecordsFailed: __expectInt32, + numberOfRecordsSuccess: __expectInt32, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusReportS3Bucket: __expectString, + statusReportS3Key: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1IPAddressBasedRemoteInfo - */ -const de_IPAddressBasedRemoteInfo = (output: any, context: __SerdeContext): IPAddressBasedRemoteInfo => { - return { - authType: __expectString(output.authType), - ipAddressConfigurationTimeStamp: __expectString(output.ipAddressConfigurationTimeStamp), - osType: __expectString(output.osType), - } as any; -}; +// de_IPAddressBasedRemoteInfo omitted. -/** - * deserializeAws_restJson1IPAddressBasedRemoteInfoList - */ -const de_IPAddressBasedRemoteInfoList = (output: any, context: __SerdeContext): IPAddressBasedRemoteInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IPAddressBasedRemoteInfo(entry, context); - }); - return retVal; -}; +// de_IPAddressBasedRemoteInfoList omitted. -/** - * deserializeAws_restJson1ListAntipatternSeveritySummary - */ -const de_ListAntipatternSeveritySummary = (output: any, context: __SerdeContext): AntipatternSeveritySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AntipatternSeveritySummary(entry, context); - }); - return retVal; -}; +// de_ListAntipatternSeveritySummary omitted. -/** - * deserializeAws_restJson1ListApplicationComponentStatusSummary - */ -const de_ListApplicationComponentStatusSummary = ( - output: any, - context: __SerdeContext -): ApplicationComponentStatusSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationComponentStatusSummary(entry, context); - }); - return retVal; -}; +// de_ListApplicationComponentStatusSummary omitted. -/** - * deserializeAws_restJson1ListApplicationComponentSummary - */ -const de_ListApplicationComponentSummary = (output: any, context: __SerdeContext): ApplicationComponentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationComponentSummary(entry, context); - }); - return retVal; -}; +// de_ListApplicationComponentSummary omitted. /** * deserializeAws_restJson1ListImportFileTaskInformation @@ -3125,351 +2325,87 @@ const de_ListImportFileTaskInformation = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportFileTaskInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListServerStatusSummary - */ -const de_ListServerStatusSummary = (output: any, context: __SerdeContext): ServerStatusSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerStatusSummary(entry, context); - }); - return retVal; -}; +// de_ListServerStatusSummary omitted. -/** - * deserializeAws_restJson1ListServerSummary - */ -const de_ListServerSummary = (output: any, context: __SerdeContext): ServerSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerSummary(entry, context); - }); - return retVal; -}; +// de_ListServerSummary omitted. -/** - * deserializeAws_restJson1ListStrategySummary - */ -const de_ListStrategySummary = (output: any, context: __SerdeContext): StrategySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StrategySummary(entry, context); - }); - return retVal; -}; +// de_ListStrategySummary omitted. -/** - * deserializeAws_restJson1ManagementPreference - */ -const de_ManagementPreference = (output: any, context: __SerdeContext): ManagementPreference => { - if (output.awsManagedResources != null) { - return { - awsManagedResources: de_AwsManagedResources(output.awsManagedResources, context), - }; - } - if (output.noPreference != null) { - return { - noPreference: de_NoManagementPreference(output.noPreference, context), - }; - } - if (output.selfManageResources != null) { - return { - selfManageResources: de_SelfManageResources(output.selfManageResources, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ManagementPreference omitted. -/** - * deserializeAws_restJson1NetworkInfo - */ -const de_NetworkInfo = (output: any, context: __SerdeContext): NetworkInfo => { - return { - interfaceName: __expectString(output.interfaceName), - ipAddress: __expectString(output.ipAddress), - macAddress: __expectString(output.macAddress), - netMask: __expectString(output.netMask), - } as any; -}; +// de_NetworkInfo omitted. -/** - * deserializeAws_restJson1NetworkInfoList - */ -const de_NetworkInfoList = (output: any, context: __SerdeContext): NetworkInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInfo(entry, context); - }); - return retVal; -}; +// de_NetworkInfoList omitted. -/** - * deserializeAws_restJson1NoDatabaseMigrationPreference - */ -const de_NoDatabaseMigrationPreference = (output: any, context: __SerdeContext): NoDatabaseMigrationPreference => { - return { - targetDatabaseEngine: - output.targetDatabaseEngine != null ? de_TargetDatabaseEngines(output.targetDatabaseEngine, context) : undefined, - } as any; -}; +// de_NoDatabaseMigrationPreference omitted. -/** - * deserializeAws_restJson1NoManagementPreference - */ -const de_NoManagementPreference = (output: any, context: __SerdeContext): NoManagementPreference => { - return { - targetDestination: - output.targetDestination != null - ? de_NoPreferenceTargetDestinations(output.targetDestination, context) - : undefined, - } as any; -}; +// de_NoManagementPreference omitted. -/** - * deserializeAws_restJson1NoPreferenceTargetDestinations - */ -const de_NoPreferenceTargetDestinations = ( - output: any, - context: __SerdeContext -): (NoPreferenceTargetDestination | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NoPreferenceTargetDestinations omitted. -/** - * deserializeAws_restJson1OSInfo - */ -const de_OSInfo = (output: any, context: __SerdeContext): OSInfo => { - return { - type: __expectString(output.type), - version: __expectString(output.version), - } as any; -}; +// de_OSInfo omitted. -/** - * deserializeAws_restJson1PipelineInfo - */ -const de_PipelineInfo = (output: any, context: __SerdeContext): PipelineInfo => { - return { - pipelineConfigurationTimeStamp: __expectString(output.pipelineConfigurationTimeStamp), - pipelineType: __expectString(output.pipelineType), - } as any; -}; +// de_PipelineInfo omitted. -/** - * deserializeAws_restJson1PipelineInfoList - */ -const de_PipelineInfoList = (output: any, context: __SerdeContext): PipelineInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineInfo(entry, context); - }); - return retVal; -}; +// de_PipelineInfoList omitted. -/** - * deserializeAws_restJson1PrioritizeBusinessGoals - */ -const de_PrioritizeBusinessGoals = (output: any, context: __SerdeContext): PrioritizeBusinessGoals => { - return { - businessGoals: output.businessGoals != null ? de_BusinessGoals(output.businessGoals, context) : undefined, - } as any; -}; +// de_PrioritizeBusinessGoals omitted. /** * deserializeAws_restJson1RecommendationReportDetails */ const de_RecommendationReportDetails = (output: any, context: __SerdeContext): RecommendationReportDetails => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completionTime))) - : undefined, - s3Bucket: __expectString(output.s3Bucket), - s3Keys: output.s3Keys != null ? de_S3Keys(output.s3Keys, context) : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + s3Bucket: __expectString, + s3Keys: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + statusMessage: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1RecommendationSet - */ -const de_RecommendationSet = (output: any, context: __SerdeContext): RecommendationSet => { - return { - strategy: __expectString(output.strategy), - targetDestination: __expectString(output.targetDestination), - transformationTool: - output.transformationTool != null ? de_TransformationTool(output.transformationTool, context) : undefined, - } as any; -}; +// de_RecommendationSet omitted. -/** - * deserializeAws_restJson1RemoteSourceCodeAnalysisServerInfo - */ -const de_RemoteSourceCodeAnalysisServerInfo = ( - output: any, - context: __SerdeContext -): RemoteSourceCodeAnalysisServerInfo => { - return { - remoteSourceCodeAnalysisServerConfigurationTimestamp: __expectString( - output.remoteSourceCodeAnalysisServerConfigurationTimestamp - ), - } as any; -}; +// de_RemoteSourceCodeAnalysisServerInfo omitted. -/** - * deserializeAws_restJson1Result - */ -const de_Result = (output: any, context: __SerdeContext): Result => { - return { - analysisStatus: - output.analysisStatus != null ? de_AnalysisStatusUnion(__expectUnion(output.analysisStatus), context) : undefined, - analysisType: __expectString(output.analysisType), - antipatternReportResultList: - output.antipatternReportResultList != null - ? de_AntipatternReportResultList(output.antipatternReportResultList, context) - : undefined, - statusMessage: __expectString(output.statusMessage), - } as any; -}; +// de_Result omitted. -/** - * deserializeAws_restJson1ResultList - */ -const de_ResultList = (output: any, context: __SerdeContext): Result[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Result(entry, context); - }); - return retVal; -}; +// de_ResultList omitted. -/** - * deserializeAws_restJson1S3Keys - */ -const de_S3Keys = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_S3Keys omitted. -/** - * deserializeAws_restJson1S3Object - */ -const de_S3Object = (output: any, context: __SerdeContext): S3Object => { - return { - s3Bucket: __expectString(output.s3Bucket), - s3key: __expectString(output.s3key), - } as any; -}; +// de_S3Object omitted. -/** - * deserializeAws_restJson1SelfManageResources - */ -const de_SelfManageResources = (output: any, context: __SerdeContext): SelfManageResources => { - return { - targetDestination: - output.targetDestination != null ? de_SelfManageTargetDestinations(output.targetDestination, context) : undefined, - } as any; -}; +// de_SelfManageResources omitted. -/** - * deserializeAws_restJson1SelfManageTargetDestinations - */ -const de_SelfManageTargetDestinations = ( - output: any, - context: __SerdeContext -): (SelfManageTargetDestination | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SelfManageTargetDestinations omitted. /** * deserializeAws_restJson1ServerDetail */ const de_ServerDetail = (output: any, context: __SerdeContext): ServerDetail => { - return { - antipatternReportS3Object: - output.antipatternReportS3Object != null ? de_S3Object(output.antipatternReportS3Object, context) : undefined, - antipatternReportStatus: __expectString(output.antipatternReportStatus), - antipatternReportStatusMessage: __expectString(output.antipatternReportStatusMessage), - applicationComponentStrategySummary: - output.applicationComponentStrategySummary != null - ? de_ListStrategySummary(output.applicationComponentStrategySummary, context) - : undefined, - dataCollectionStatus: __expectString(output.dataCollectionStatus), - id: __expectString(output.id), - lastAnalyzedTimestamp: - output.lastAnalyzedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAnalyzedTimestamp))) - : undefined, - listAntipatternSeveritySummary: - output.listAntipatternSeveritySummary != null - ? de_ListAntipatternSeveritySummary(output.listAntipatternSeveritySummary, context) - : undefined, - name: __expectString(output.name), - recommendationSet: - output.recommendationSet != null ? de_RecommendationSet(output.recommendationSet, context) : undefined, - serverError: output.serverError != null ? de_ServerError(output.serverError, context) : undefined, - serverType: __expectString(output.serverType), - statusMessage: __expectString(output.statusMessage), - systemInfo: output.systemInfo != null ? de_SystemInfo(output.systemInfo, context) : undefined, - } as any; + return take(output, { + antipatternReportS3Object: _json, + antipatternReportStatus: __expectString, + antipatternReportStatusMessage: __expectString, + applicationComponentStrategySummary: _json, + dataCollectionStatus: __expectString, + id: __expectString, + lastAnalyzedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + listAntipatternSeveritySummary: _json, + name: __expectString, + recommendationSet: _json, + serverError: _json, + serverType: __expectString, + statusMessage: __expectString, + systemInfo: _json, + }) as any; }; /** @@ -3479,194 +2415,40 @@ const de_ServerDetails = (output: any, context: __SerdeContext): ServerDetail[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServerDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ServerError - */ -const de_ServerError = (output: any, context: __SerdeContext): ServerError => { - return { - serverErrorCategory: __expectString(output.serverErrorCategory), - } as any; -}; +// de_ServerError omitted. -/** - * deserializeAws_restJson1ServerStatusSummary - */ -const de_ServerStatusSummary = (output: any, context: __SerdeContext): ServerStatusSummary => { - return { - count: __expectInt32(output.count), - runTimeAssessmentStatus: __expectString(output.runTimeAssessmentStatus), - } as any; -}; +// de_ServerStatusSummary omitted. -/** - * deserializeAws_restJson1ServerStrategies - */ -const de_ServerStrategies = (output: any, context: __SerdeContext): ServerStrategy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerStrategy(entry, context); - }); - return retVal; -}; +// de_ServerStrategies omitted. -/** - * deserializeAws_restJson1ServerStrategy - */ -const de_ServerStrategy = (output: any, context: __SerdeContext): ServerStrategy => { - return { - isPreferred: __expectBoolean(output.isPreferred), - numberOfApplicationComponents: __expectInt32(output.numberOfApplicationComponents), - recommendation: output.recommendation != null ? de_RecommendationSet(output.recommendation, context) : undefined, - status: __expectString(output.status), - } as any; -}; +// de_ServerStrategy omitted. -/** - * deserializeAws_restJson1ServerSummary - */ -const de_ServerSummary = (output: any, context: __SerdeContext): ServerSummary => { - return { - ServerOsType: __expectString(output.ServerOsType), - count: __expectInt32(output.count), - } as any; -}; +// de_ServerSummary omitted. -/** - * deserializeAws_restJson1SourceCodeRepositories - */ -const de_SourceCodeRepositories = (output: any, context: __SerdeContext): SourceCodeRepository[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceCodeRepository(entry, context); - }); - return retVal; -}; +// de_SourceCodeRepositories omitted. -/** - * deserializeAws_restJson1SourceCodeRepository - */ -const de_SourceCodeRepository = (output: any, context: __SerdeContext): SourceCodeRepository => { - return { - branch: __expectString(output.branch), - projectName: __expectString(output.projectName), - repository: __expectString(output.repository), - versionControlType: __expectString(output.versionControlType), - } as any; -}; +// de_SourceCodeRepository omitted. -/** - * deserializeAws_restJson1StrategySummary - */ -const de_StrategySummary = (output: any, context: __SerdeContext): StrategySummary => { - return { - count: __expectInt32(output.count), - strategy: __expectString(output.strategy), - } as any; -}; +// de_StrategySummary omitted. -/** - * deserializeAws_restJson1SystemInfo - */ -const de_SystemInfo = (output: any, context: __SerdeContext): SystemInfo => { - return { - cpuArchitecture: __expectString(output.cpuArchitecture), - fileSystemType: __expectString(output.fileSystemType), - networkInfoList: output.networkInfoList != null ? de_NetworkInfoList(output.networkInfoList, context) : undefined, - osInfo: output.osInfo != null ? de_OSInfo(output.osInfo, context) : undefined, - } as any; -}; +// de_SystemInfo omitted. -/** - * deserializeAws_restJson1TargetDatabaseEngines - */ -const de_TargetDatabaseEngines = (output: any, context: __SerdeContext): (TargetDatabaseEngine | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetDatabaseEngines omitted. -/** - * deserializeAws_restJson1TransformationTool - */ -const de_TransformationTool = (output: any, context: __SerdeContext): TransformationTool => { - return { - description: __expectString(output.description), - name: __expectString(output.name), - tranformationToolInstallationLink: __expectString(output.tranformationToolInstallationLink), - } as any; -}; +// de_TransformationTool omitted. -/** - * deserializeAws_restJson1VcenterBasedRemoteInfo - */ -const de_VcenterBasedRemoteInfo = (output: any, context: __SerdeContext): VcenterBasedRemoteInfo => { - return { - osType: __expectString(output.osType), - vcenterConfigurationTimeStamp: __expectString(output.vcenterConfigurationTimeStamp), - } as any; -}; +// de_VcenterBasedRemoteInfo omitted. -/** - * deserializeAws_restJson1VcenterBasedRemoteInfoList - */ -const de_VcenterBasedRemoteInfoList = (output: any, context: __SerdeContext): VcenterBasedRemoteInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VcenterBasedRemoteInfo(entry, context); - }); - return retVal; -}; +// de_VcenterBasedRemoteInfoList omitted. -/** - * deserializeAws_restJson1VersionControlInfo - */ -const de_VersionControlInfo = (output: any, context: __SerdeContext): VersionControlInfo => { - return { - versionControlConfigurationTimeStamp: __expectString(output.versionControlConfigurationTimeStamp), - versionControlType: __expectString(output.versionControlType), - } as any; -}; +// de_VersionControlInfo omitted. -/** - * deserializeAws_restJson1VersionControlInfoList - */ -const de_VersionControlInfoList = (output: any, context: __SerdeContext): VersionControlInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VersionControlInfo(entry, context); - }); - return retVal; -}; +// de_VersionControlInfoList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-mobile/src/protocols/Aws_restJson1.ts b/clients/client-mobile/src/protocols/Aws_restJson1.ts index f8920b90610f..a6273ac9a449 100644 --- a/clients/client-mobile/src/protocols/Aws_restJson1.ts +++ b/clients/client-mobile/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -31,14 +33,10 @@ import { MobileServiceException as __BaseException } from "../models/MobileServi import { AccountActionRequiredException, BadRequestException, - BundleDetails, InternalFailureException, LimitExceededException, NotFoundException, - Platform, ProjectDetails, - ProjectSummary, - Resource, ServiceUnavailableException, TooManyRequestsException, UnauthorizedException, @@ -300,9 +298,10 @@ export const de_CreateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = de_ProjectDetails(data.details, context); - } + const doc = take(data, { + details: (_) => de_ProjectDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -342,10 +341,9 @@ const de_CreateProjectCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -365,12 +363,11 @@ export const de_DeleteProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deletedResources != null) { - contents.deletedResources = de_Resources(data.deletedResources, context); - } - if (data.orphanedResources != null) { - contents.orphanedResources = de_Resources(data.orphanedResources, context); - } + const doc = take(data, { + deletedResources: _json, + orphanedResources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -404,10 +401,9 @@ const de_DeleteProjectCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -427,9 +423,10 @@ export const de_DescribeBundleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = de_BundleDetails(data.details, context); - } + const doc = take(data, { + details: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -466,10 +463,9 @@ const de_DescribeBundleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -489,9 +485,10 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = de_ProjectDetails(data.details, context); - } + const doc = take(data, { + details: (_) => de_ProjectDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -528,10 +525,9 @@ const de_DescribeProjectCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -551,9 +547,10 @@ export const de_ExportBundleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.downloadUrl != null) { - contents.downloadUrl = __expectString(data.downloadUrl); - } + const doc = take(data, { + downloadUrl: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -590,10 +587,9 @@ const de_ExportBundleCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -613,15 +609,12 @@ export const de_ExportProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.downloadUrl != null) { - contents.downloadUrl = __expectString(data.downloadUrl); - } - if (data.shareUrl != null) { - contents.shareUrl = __expectString(data.shareUrl); - } - if (data.snapshotId != null) { - contents.snapshotId = __expectString(data.snapshotId); - } + const doc = take(data, { + downloadUrl: __expectString, + shareUrl: __expectString, + snapshotId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -658,10 +651,9 @@ const de_ExportProjectCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -681,12 +673,11 @@ export const de_ListBundlesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bundleList != null) { - contents.bundleList = de_BundleList(data.bundleList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + bundleList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -720,10 +711,9 @@ const de_ListBundlesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -743,12 +733,11 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.projects != null) { - contents.projects = de_ProjectSummaries(data.projects, context); - } + const doc = take(data, { + nextToken: __expectString, + projects: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -782,10 +771,9 @@ const de_ListProjectsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -805,9 +793,10 @@ export const de_UpdateProjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.details != null) { - contents.details = de_ProjectDetails(data.details, context); - } + const doc = take(data, { + details: (_) => de_ProjectDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -850,16 +839,15 @@ const de_UpdateProjectCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccountActionRequiredExceptionRes */ @@ -869,9 +857,10 @@ const de_AccountActionRequiredExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccountActionRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -885,9 +874,10 @@ const de_AccountActionRequiredExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -904,9 +894,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -925,9 +916,10 @@ const de_LimitExceededExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -941,9 +933,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -962,9 +955,10 @@ const de_ServiceUnavailableExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -983,9 +977,10 @@ const de_TooManyRequestsExceptionRes = async ( retryAfterSeconds: [, parsedOutput.headers["retry-after"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1002,9 +997,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1012,138 +1008,37 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Attributes omitted. -/** - * deserializeAws_restJson1BundleDetails - */ -const de_BundleDetails = (output: any, context: __SerdeContext): BundleDetails => { - return { - availablePlatforms: - output.availablePlatforms != null ? de_Platforms(output.availablePlatforms, context) : undefined, - bundleId: __expectString(output.bundleId), - description: __expectString(output.description), - iconUrl: __expectString(output.iconUrl), - title: __expectString(output.title), - version: __expectString(output.version), - } as any; -}; +// de_BundleDetails omitted. -/** - * deserializeAws_restJson1BundleList - */ -const de_BundleList = (output: any, context: __SerdeContext): BundleDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BundleDetails(entry, context); - }); - return retVal; -}; +// de_BundleList omitted. -/** - * deserializeAws_restJson1Platforms - */ -const de_Platforms = (output: any, context: __SerdeContext): (Platform | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Platforms omitted. /** * deserializeAws_restJson1ProjectDetails */ const de_ProjectDetails = (output: any, context: __SerdeContext): ProjectDetails => { - return { - consoleUrl: __expectString(output.consoleUrl), - createdDate: - output.createdDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdDate))) - : undefined, - lastUpdatedDate: - output.lastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDate))) - : undefined, - name: __expectString(output.name), - projectId: __expectString(output.projectId), - region: __expectString(output.region), - resources: output.resources != null ? de_Resources(output.resources, context) : undefined, - state: __expectString(output.state), - } as any; + return take(output, { + consoleUrl: __expectString, + createdDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + projectId: __expectString, + region: __expectString, + resources: _json, + state: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ProjectSummaries - */ -const de_ProjectSummaries = (output: any, context: __SerdeContext): ProjectSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectSummary(entry, context); - }); - return retVal; -}; +// de_ProjectSummaries omitted. -/** - * deserializeAws_restJson1ProjectSummary - */ -const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - name: __expectString(output.name), - projectId: __expectString(output.projectId), - } as any; -}; +// de_ProjectSummary omitted. -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - arn: __expectString(output.arn), - attributes: output.attributes != null ? de_Attributes(output.attributes, context) : undefined, - feature: __expectString(output.feature), - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_Resource omitted. -/** - * deserializeAws_restJson1Resources - */ -const de_Resources = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_Resources omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-mq/src/protocols/Aws_restJson1.ts b/clients/client-mq/src/protocols/Aws_restJson1.ts index e5bc333b7d0a..ae1a25abb163 100644 --- a/clients/client-mq/src/protocols/Aws_restJson1.ts +++ b/clients/client-mq/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -76,7 +78,6 @@ import { ConfigurationRevision, Configurations, ConflictException, - DeploymentMode, EncryptionOptions, EngineVersion, ForbiddenException, @@ -109,33 +110,29 @@ export const se_CreateBrokerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers"; let body: any; - body = JSON.stringify({ - ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }), - ...(input.AutoMinorVersionUpgrade != null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }), - ...(input.BrokerName != null && { brokerName: input.BrokerName }), - ...(input.Configuration != null && { configuration: se_ConfigurationId(input.Configuration, context) }), - creatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.DeploymentMode != null && { deploymentMode: input.DeploymentMode }), - ...(input.EncryptionOptions != null && { - encryptionOptions: se_EncryptionOptions(input.EncryptionOptions, context), - }), - ...(input.EngineType != null && { engineType: input.EngineType }), - ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }), - ...(input.HostInstanceType != null && { hostInstanceType: input.HostInstanceType }), - ...(input.LdapServerMetadata != null && { - ldapServerMetadata: se_LdapServerMetadataInput(input.LdapServerMetadata, context), - }), - ...(input.Logs != null && { logs: se_Logs(input.Logs, context) }), - ...(input.MaintenanceWindowStartTime != null && { - maintenanceWindowStartTime: se_WeeklyStartTime(input.MaintenanceWindowStartTime, context), - }), - ...(input.PubliclyAccessible != null && { publiclyAccessible: input.PubliclyAccessible }), - ...(input.SecurityGroups != null && { securityGroups: se___listOf__string(input.SecurityGroups, context) }), - ...(input.StorageType != null && { storageType: input.StorageType }), - ...(input.SubnetIds != null && { subnetIds: se___listOf__string(input.SubnetIds, context) }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - ...(input.Users != null && { users: se___listOfUser(input.Users, context) }), - }); + body = JSON.stringify( + take(input, { + authenticationStrategy: [, , `AuthenticationStrategy`], + autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`], + brokerName: [, , `BrokerName`], + configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`], + creatorRequestId: [, (_) => _ ?? generateIdempotencyToken(), `CreatorRequestId`], + deploymentMode: [, , `DeploymentMode`], + encryptionOptions: [, (_) => se_EncryptionOptions(_, context), `EncryptionOptions`], + engineType: [, , `EngineType`], + engineVersion: [, , `EngineVersion`], + hostInstanceType: [, , `HostInstanceType`], + ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`], + logs: [, (_) => se_Logs(_, context), `Logs`], + maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`], + publiclyAccessible: [, , `PubliclyAccessible`], + securityGroups: [, (_) => _json(_), `SecurityGroups`], + storageType: [, , `StorageType`], + subnetIds: [, (_) => _json(_), `SubnetIds`], + tags: [, (_) => _json(_), `Tags`], + users: [, (_) => se___listOfUser(_, context), `Users`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -160,13 +157,15 @@ export const se_CreateConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/configurations"; let body: any; - body = JSON.stringify({ - ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }), - ...(input.EngineType != null && { engineType: input.EngineType }), - ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }), - ...(input.Name != null && { name: input.Name }), - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + authenticationStrategy: [, , `AuthenticationStrategy`], + engineType: [, , `EngineType`], + engineVersion: [, , `EngineVersion`], + name: [, , `Name`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -192,9 +191,11 @@ export const se_CreateTagsCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se___mapOf__string(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -222,11 +223,13 @@ export const se_CreateUserCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId!, "{BrokerId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username!, "{Username}", false); let body: any; - body = JSON.stringify({ - ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }), - ...(input.Groups != null && { groups: se___listOf__string(input.Groups, context) }), - ...(input.Password != null && { password: input.Password }), - }); + body = JSON.stringify( + take(input, { + consoleAccess: [, , `ConsoleAccess`], + groups: [, (_) => _json(_), `Groups`], + password: [, , `Password`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -676,21 +679,19 @@ export const se_UpdateBrokerCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/brokers/{BrokerId}"; resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId!, "{BrokerId}", false); let body: any; - body = JSON.stringify({ - ...(input.AuthenticationStrategy != null && { authenticationStrategy: input.AuthenticationStrategy }), - ...(input.AutoMinorVersionUpgrade != null && { autoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }), - ...(input.Configuration != null && { configuration: se_ConfigurationId(input.Configuration, context) }), - ...(input.EngineVersion != null && { engineVersion: input.EngineVersion }), - ...(input.HostInstanceType != null && { hostInstanceType: input.HostInstanceType }), - ...(input.LdapServerMetadata != null && { - ldapServerMetadata: se_LdapServerMetadataInput(input.LdapServerMetadata, context), - }), - ...(input.Logs != null && { logs: se_Logs(input.Logs, context) }), - ...(input.MaintenanceWindowStartTime != null && { - maintenanceWindowStartTime: se_WeeklyStartTime(input.MaintenanceWindowStartTime, context), - }), - ...(input.SecurityGroups != null && { securityGroups: se___listOf__string(input.SecurityGroups, context) }), - }); + body = JSON.stringify( + take(input, { + authenticationStrategy: [, , `AuthenticationStrategy`], + autoMinorVersionUpgrade: [, , `AutoMinorVersionUpgrade`], + configuration: [, (_) => se_ConfigurationId(_, context), `Configuration`], + engineVersion: [, , `EngineVersion`], + hostInstanceType: [, , `HostInstanceType`], + ldapServerMetadata: [, (_) => se_LdapServerMetadataInput(_, context), `LdapServerMetadata`], + logs: [, (_) => se_Logs(_, context), `Logs`], + maintenanceWindowStartTime: [, (_) => se_WeeklyStartTime(_, context), `MaintenanceWindowStartTime`], + securityGroups: [, (_) => _json(_), `SecurityGroups`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -724,10 +725,12 @@ export const se_UpdateConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Data != null && { data: input.Data }), - ...(input.Description != null && { description: input.Description }), - }); + body = JSON.stringify( + take(input, { + data: [, , `Data`], + description: [, , `Description`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -755,11 +758,13 @@ export const se_UpdateUserCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "BrokerId", () => input.BrokerId!, "{BrokerId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "Username", () => input.Username!, "{Username}", false); let body: any; - body = JSON.stringify({ - ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }), - ...(input.Groups != null && { groups: se___listOf__string(input.Groups, context) }), - ...(input.Password != null && { password: input.Password }), - }); + body = JSON.stringify( + take(input, { + consoleAccess: [, , `ConsoleAccess`], + groups: [, (_) => _json(_), `Groups`], + password: [, , `Password`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -785,12 +790,11 @@ export const de_CreateBrokerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerArn != null) { - contents.BrokerArn = __expectString(data.brokerArn); - } - if (data.brokerId != null) { - contents.BrokerId = __expectString(data.brokerId); - } + const doc = take(data, { + BrokerArn: [, __expectString, `brokerArn`], + BrokerId: [, __expectString, `brokerId`], + }); + Object.assign(contents, doc); return contents; }; @@ -824,10 +828,9 @@ const de_CreateBrokerCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -847,24 +850,15 @@ export const de_CreateConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authenticationStrategy != null) { - contents.AuthenticationStrategy = __expectString(data.authenticationStrategy); - } - if (data.created != null) { - contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created)); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.latestRevision != null) { - contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AuthenticationStrategy: [, __expectString, `authenticationStrategy`], + Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + Id: [, __expectString, `id`], + LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + }); + Object.assign(contents, doc); return contents; }; @@ -895,10 +889,9 @@ const de_CreateConfigurationCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -948,10 +941,9 @@ const de_CreateTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1004,10 +996,9 @@ const de_CreateUserCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1027,9 +1018,10 @@ export const de_DeleteBrokerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerId != null) { - contents.BrokerId = __expectString(data.brokerId); - } + const doc = take(data, { + BrokerId: [, __expectString, `brokerId`], + }); + Object.assign(contents, doc); return contents; }; @@ -1060,10 +1052,9 @@ const de_DeleteBrokerCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1113,10 +1104,9 @@ const de_DeleteTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1166,10 +1156,9 @@ const de_DeleteUserCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1189,93 +1178,38 @@ export const de_DescribeBrokerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionsRequired != null) { - contents.ActionsRequired = de___listOfActionRequired(data.actionsRequired, context); - } - if (data.authenticationStrategy != null) { - contents.AuthenticationStrategy = __expectString(data.authenticationStrategy); - } - if (data.autoMinorVersionUpgrade != null) { - contents.AutoMinorVersionUpgrade = __expectBoolean(data.autoMinorVersionUpgrade); - } - if (data.brokerArn != null) { - contents.BrokerArn = __expectString(data.brokerArn); - } - if (data.brokerId != null) { - contents.BrokerId = __expectString(data.brokerId); - } - if (data.brokerInstances != null) { - contents.BrokerInstances = de___listOfBrokerInstance(data.brokerInstances, context); - } - if (data.brokerName != null) { - contents.BrokerName = __expectString(data.brokerName); - } - if (data.brokerState != null) { - contents.BrokerState = __expectString(data.brokerState); - } - if (data.configurations != null) { - contents.Configurations = de_Configurations(data.configurations, context); - } - if (data.created != null) { - contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created)); - } - if (data.deploymentMode != null) { - contents.DeploymentMode = __expectString(data.deploymentMode); - } - if (data.encryptionOptions != null) { - contents.EncryptionOptions = de_EncryptionOptions(data.encryptionOptions, context); - } - if (data.engineType != null) { - contents.EngineType = __expectString(data.engineType); - } - if (data.engineVersion != null) { - contents.EngineVersion = __expectString(data.engineVersion); - } - if (data.hostInstanceType != null) { - contents.HostInstanceType = __expectString(data.hostInstanceType); - } - if (data.ldapServerMetadata != null) { - contents.LdapServerMetadata = de_LdapServerMetadataOutput(data.ldapServerMetadata, context); - } - if (data.logs != null) { - contents.Logs = de_LogsSummary(data.logs, context); - } - if (data.maintenanceWindowStartTime != null) { - contents.MaintenanceWindowStartTime = de_WeeklyStartTime(data.maintenanceWindowStartTime, context); - } - if (data.pendingAuthenticationStrategy != null) { - contents.PendingAuthenticationStrategy = __expectString(data.pendingAuthenticationStrategy); - } - if (data.pendingEngineVersion != null) { - contents.PendingEngineVersion = __expectString(data.pendingEngineVersion); - } - if (data.pendingHostInstanceType != null) { - contents.PendingHostInstanceType = __expectString(data.pendingHostInstanceType); - } - if (data.pendingLdapServerMetadata != null) { - contents.PendingLdapServerMetadata = de_LdapServerMetadataOutput(data.pendingLdapServerMetadata, context); - } - if (data.pendingSecurityGroups != null) { - contents.PendingSecurityGroups = de___listOf__string(data.pendingSecurityGroups, context); - } - if (data.publiclyAccessible != null) { - contents.PubliclyAccessible = __expectBoolean(data.publiclyAccessible); - } - if (data.securityGroups != null) { - contents.SecurityGroups = de___listOf__string(data.securityGroups, context); - } - if (data.storageType != null) { - contents.StorageType = __expectString(data.storageType); - } - if (data.subnetIds != null) { - contents.SubnetIds = de___listOf__string(data.subnetIds, context); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } - if (data.users != null) { - contents.Users = de___listOfUserSummary(data.users, context); - } + const doc = take(data, { + ActionsRequired: [, (_) => de___listOfActionRequired(_, context), `actionsRequired`], + AuthenticationStrategy: [, __expectString, `authenticationStrategy`], + AutoMinorVersionUpgrade: [, __expectBoolean, `autoMinorVersionUpgrade`], + BrokerArn: [, __expectString, `brokerArn`], + BrokerId: [, __expectString, `brokerId`], + BrokerInstances: [, (_) => de___listOfBrokerInstance(_, context), `brokerInstances`], + BrokerName: [, __expectString, `brokerName`], + BrokerState: [, __expectString, `brokerState`], + Configurations: [, (_) => de_Configurations(_, context), `configurations`], + Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + DeploymentMode: [, __expectString, `deploymentMode`], + EncryptionOptions: [, (_) => de_EncryptionOptions(_, context), `encryptionOptions`], + EngineType: [, __expectString, `engineType`], + EngineVersion: [, __expectString, `engineVersion`], + HostInstanceType: [, __expectString, `hostInstanceType`], + LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`], + Logs: [, (_) => de_LogsSummary(_, context), `logs`], + MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`], + PendingAuthenticationStrategy: [, __expectString, `pendingAuthenticationStrategy`], + PendingEngineVersion: [, __expectString, `pendingEngineVersion`], + PendingHostInstanceType: [, __expectString, `pendingHostInstanceType`], + PendingLdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `pendingLdapServerMetadata`], + PendingSecurityGroups: [, _json, `pendingSecurityGroups`], + PubliclyAccessible: [, __expectBoolean, `publiclyAccessible`], + SecurityGroups: [, _json, `securityGroups`], + StorageType: [, __expectString, `storageType`], + SubnetIds: [, _json, `subnetIds`], + Tags: [, _json, `tags`], + Users: [, (_) => de___listOfUserSummary(_, context), `users`], + }); + Object.assign(contents, doc); return contents; }; @@ -1306,10 +1240,9 @@ const de_DescribeBrokerCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1329,15 +1262,12 @@ export const de_DescribeBrokerEngineTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerEngineTypes != null) { - contents.BrokerEngineTypes = de___listOfBrokerEngineType(data.brokerEngineTypes, context); - } - if (data.maxResults != null) { - contents.MaxResults = __expectInt32(data.maxResults); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + BrokerEngineTypes: [, (_) => de___listOfBrokerEngineType(_, context), `brokerEngineTypes`], + MaxResults: [, __expectInt32, `maxResults`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1365,10 +1295,9 @@ const de_DescribeBrokerEngineTypesCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1388,15 +1317,12 @@ export const de_DescribeBrokerInstanceOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerInstanceOptions != null) { - contents.BrokerInstanceOptions = de___listOfBrokerInstanceOption(data.brokerInstanceOptions, context); - } - if (data.maxResults != null) { - contents.MaxResults = __expectInt32(data.maxResults); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + BrokerInstanceOptions: [, (_) => de___listOfBrokerInstanceOption(_, context), `brokerInstanceOptions`], + MaxResults: [, __expectInt32, `maxResults`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1424,10 +1350,9 @@ const de_DescribeBrokerInstanceOptionsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1447,36 +1372,19 @@ export const de_DescribeConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.authenticationStrategy != null) { - contents.AuthenticationStrategy = __expectString(data.authenticationStrategy); - } - if (data.created != null) { - contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created)); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.engineType != null) { - contents.EngineType = __expectString(data.engineType); - } - if (data.engineVersion != null) { - contents.EngineVersion = __expectString(data.engineVersion); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.latestRevision != null) { - contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + AuthenticationStrategy: [, __expectString, `authenticationStrategy`], + Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + Description: [, __expectString, `description`], + EngineType: [, __expectString, `engineType`], + EngineVersion: [, __expectString, `engineVersion`], + Id: [, __expectString, `id`], + LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1507,10 +1415,9 @@ const de_DescribeConfigurationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1530,18 +1437,13 @@ export const de_DescribeConfigurationRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationId != null) { - contents.ConfigurationId = __expectString(data.configurationId); - } - if (data.created != null) { - contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created)); - } - if (data.data != null) { - contents.Data = __expectString(data.data); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } + const doc = take(data, { + ConfigurationId: [, __expectString, `configurationId`], + Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + Data: [, __expectString, `data`], + Description: [, __expectString, `description`], + }); + Object.assign(contents, doc); return contents; }; @@ -1572,10 +1474,9 @@ const de_DescribeConfigurationRevisionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1595,21 +1496,14 @@ export const de_DescribeUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerId != null) { - contents.BrokerId = __expectString(data.brokerId); - } - if (data.consoleAccess != null) { - contents.ConsoleAccess = __expectBoolean(data.consoleAccess); - } - if (data.groups != null) { - contents.Groups = de___listOf__string(data.groups, context); - } - if (data.pending != null) { - contents.Pending = de_UserPendingChanges(data.pending, context); - } - if (data.username != null) { - contents.Username = __expectString(data.username); - } + const doc = take(data, { + BrokerId: [, __expectString, `brokerId`], + ConsoleAccess: [, __expectBoolean, `consoleAccess`], + Groups: [, _json, `groups`], + Pending: [, (_) => de_UserPendingChanges(_, context), `pending`], + Username: [, __expectString, `username`], + }); + Object.assign(contents, doc); return contents; }; @@ -1640,10 +1534,9 @@ const de_DescribeUserCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1663,12 +1556,11 @@ export const de_ListBrokersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerSummaries != null) { - contents.BrokerSummaries = de___listOfBrokerSummary(data.brokerSummaries, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + BrokerSummaries: [, (_) => de___listOfBrokerSummary(_, context), `brokerSummaries`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1696,10 +1588,9 @@ const de_ListBrokersCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1719,18 +1610,13 @@ export const de_ListConfigurationRevisionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurationId != null) { - contents.ConfigurationId = __expectString(data.configurationId); - } - if (data.maxResults != null) { - contents.MaxResults = __expectInt32(data.maxResults); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.revisions != null) { - contents.Revisions = de___listOfConfigurationRevision(data.revisions, context); - } + const doc = take(data, { + ConfigurationId: [, __expectString, `configurationId`], + MaxResults: [, __expectInt32, `maxResults`], + NextToken: [, __expectString, `nextToken`], + Revisions: [, (_) => de___listOfConfigurationRevision(_, context), `revisions`], + }); + Object.assign(contents, doc); return contents; }; @@ -1761,10 +1647,9 @@ const de_ListConfigurationRevisionsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,15 +1669,12 @@ export const de_ListConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurations != null) { - contents.Configurations = de___listOfConfiguration(data.configurations, context); - } - if (data.maxResults != null) { - contents.MaxResults = __expectInt32(data.maxResults); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Configurations: [, (_) => de___listOfConfiguration(_, context), `configurations`], + MaxResults: [, __expectInt32, `maxResults`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1820,10 +1702,9 @@ const de_ListConfigurationsCommandError = async ( throw await de_InternalServerErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1843,9 +1724,10 @@ export const de_ListTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de___mapOf__string(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1876,10 +1758,9 @@ const de_ListTagsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1899,18 +1780,13 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.brokerId != null) { - contents.BrokerId = __expectString(data.brokerId); - } - if (data.maxResults != null) { - contents.MaxResults = __expectInt32(data.maxResults); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.users != null) { - contents.Users = de___listOfUserSummary(data.users, context); - } + const doc = take(data, { + BrokerId: [, __expectString, `brokerId`], + MaxResults: [, __expectInt32, `maxResults`], + NextToken: [, __expectString, `nextToken`], + Users: [, (_) => de___listOfUserSummary(_, context), `users`], + }); + Object.assign(contents, doc); return contents; }; @@ -1941,10 +1817,9 @@ const de_ListUsersCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1994,10 +1869,9 @@ const de_RebootBrokerCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2017,36 +1891,19 @@ export const de_UpdateBrokerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authenticationStrategy != null) { - contents.AuthenticationStrategy = __expectString(data.authenticationStrategy); - } - if (data.autoMinorVersionUpgrade != null) { - contents.AutoMinorVersionUpgrade = __expectBoolean(data.autoMinorVersionUpgrade); - } - if (data.brokerId != null) { - contents.BrokerId = __expectString(data.brokerId); - } - if (data.configuration != null) { - contents.Configuration = de_ConfigurationId(data.configuration, context); - } - if (data.engineVersion != null) { - contents.EngineVersion = __expectString(data.engineVersion); - } - if (data.hostInstanceType != null) { - contents.HostInstanceType = __expectString(data.hostInstanceType); - } - if (data.ldapServerMetadata != null) { - contents.LdapServerMetadata = de_LdapServerMetadataOutput(data.ldapServerMetadata, context); - } - if (data.logs != null) { - contents.Logs = de_Logs(data.logs, context); - } - if (data.maintenanceWindowStartTime != null) { - contents.MaintenanceWindowStartTime = de_WeeklyStartTime(data.maintenanceWindowStartTime, context); - } - if (data.securityGroups != null) { - contents.SecurityGroups = de___listOf__string(data.securityGroups, context); - } + const doc = take(data, { + AuthenticationStrategy: [, __expectString, `authenticationStrategy`], + AutoMinorVersionUpgrade: [, __expectBoolean, `autoMinorVersionUpgrade`], + BrokerId: [, __expectString, `brokerId`], + Configuration: [, (_) => de_ConfigurationId(_, context), `configuration`], + EngineVersion: [, __expectString, `engineVersion`], + HostInstanceType: [, __expectString, `hostInstanceType`], + LdapServerMetadata: [, (_) => de_LdapServerMetadataOutput(_, context), `ldapServerMetadata`], + Logs: [, (_) => de_Logs(_, context), `logs`], + MaintenanceWindowStartTime: [, (_) => de_WeeklyStartTime(_, context), `maintenanceWindowStartTime`], + SecurityGroups: [, _json, `securityGroups`], + }); + Object.assign(contents, doc); return contents; }; @@ -2080,10 +1937,9 @@ const de_UpdateBrokerCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2103,24 +1959,15 @@ export const de_UpdateConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.Arn = __expectString(data.arn); - } - if (data.created != null) { - contents.Created = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.created)); - } - if (data.id != null) { - contents.Id = __expectString(data.id); - } - if (data.latestRevision != null) { - contents.LatestRevision = de_ConfigurationRevision(data.latestRevision, context); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.warnings != null) { - contents.Warnings = de___listOfSanitizationWarning(data.warnings, context); - } + const doc = take(data, { + Arn: [, __expectString, `arn`], + Created: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + Id: [, __expectString, `id`], + LatestRevision: [, (_) => de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + Warnings: [, (_) => de___listOfSanitizationWarning(_, context), `warnings`], + }); + Object.assign(contents, doc); return contents; }; @@ -2154,10 +2001,9 @@ const de_UpdateConfigurationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2210,28 +2056,26 @@ const de_UpdateUserCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorAttribute != null) { - contents.ErrorAttribute = __expectString(data.errorAttribute); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorAttribute: [, __expectString, `errorAttribute`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2245,12 +2089,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorAttribute != null) { - contents.ErrorAttribute = __expectString(data.errorAttribute); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorAttribute: [, __expectString, `errorAttribute`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2264,12 +2107,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorAttribute != null) { - contents.ErrorAttribute = __expectString(data.errorAttribute); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorAttribute: [, __expectString, `errorAttribute`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2286,12 +2128,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorAttribute != null) { - contents.ErrorAttribute = __expectString(data.errorAttribute); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorAttribute: [, __expectString, `errorAttribute`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2305,12 +2146,11 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorAttribute != null) { - contents.ErrorAttribute = __expectString(data.errorAttribute); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorAttribute: [, __expectString, `errorAttribute`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2327,12 +2167,11 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorAttribute != null) { - contents.ErrorAttribute = __expectString(data.errorAttribute); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorAttribute: [, __expectString, `errorAttribute`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2340,16 +2179,7 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfUser @@ -2362,105 +2192,81 @@ const se___listOfUser = (input: User[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1__mapOf__string - */ -const se___mapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__string omitted. /** * serializeAws_restJson1ConfigurationId */ const se_ConfigurationId = (input: ConfigurationId, context: __SerdeContext): any => { - return { - ...(input.Id != null && { id: input.Id }), - ...(input.Revision != null && { revision: input.Revision }), - }; + return take(input, { + id: [, , `Id`], + revision: [, , `Revision`], + }); }; /** * serializeAws_restJson1EncryptionOptions */ const se_EncryptionOptions = (input: EncryptionOptions, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { kmsKeyId: input.KmsKeyId }), - ...(input.UseAwsOwnedKey != null && { useAwsOwnedKey: input.UseAwsOwnedKey }), - }; + return take(input, { + kmsKeyId: [, , `KmsKeyId`], + useAwsOwnedKey: [, , `UseAwsOwnedKey`], + }); }; /** * serializeAws_restJson1LdapServerMetadataInput */ const se_LdapServerMetadataInput = (input: LdapServerMetadataInput, context: __SerdeContext): any => { - return { - ...(input.Hosts != null && { hosts: se___listOf__string(input.Hosts, context) }), - ...(input.RoleBase != null && { roleBase: input.RoleBase }), - ...(input.RoleName != null && { roleName: input.RoleName }), - ...(input.RoleSearchMatching != null && { roleSearchMatching: input.RoleSearchMatching }), - ...(input.RoleSearchSubtree != null && { roleSearchSubtree: input.RoleSearchSubtree }), - ...(input.ServiceAccountPassword != null && { serviceAccountPassword: input.ServiceAccountPassword }), - ...(input.ServiceAccountUsername != null && { serviceAccountUsername: input.ServiceAccountUsername }), - ...(input.UserBase != null && { userBase: input.UserBase }), - ...(input.UserRoleName != null && { userRoleName: input.UserRoleName }), - ...(input.UserSearchMatching != null && { userSearchMatching: input.UserSearchMatching }), - ...(input.UserSearchSubtree != null && { userSearchSubtree: input.UserSearchSubtree }), - }; + return take(input, { + hosts: [, _json, `Hosts`], + roleBase: [, , `RoleBase`], + roleName: [, , `RoleName`], + roleSearchMatching: [, , `RoleSearchMatching`], + roleSearchSubtree: [, , `RoleSearchSubtree`], + serviceAccountPassword: [, , `ServiceAccountPassword`], + serviceAccountUsername: [, , `ServiceAccountUsername`], + userBase: [, , `UserBase`], + userRoleName: [, , `UserRoleName`], + userSearchMatching: [, , `UserSearchMatching`], + userSearchSubtree: [, , `UserSearchSubtree`], + }); }; /** * serializeAws_restJson1Logs */ const se_Logs = (input: Logs, context: __SerdeContext): any => { - return { - ...(input.Audit != null && { audit: input.Audit }), - ...(input.General != null && { general: input.General }), - }; + return take(input, { + audit: [, , `Audit`], + general: [, , `General`], + }); }; /** * serializeAws_restJson1User */ const se_User = (input: User, context: __SerdeContext): any => { - return { - ...(input.ConsoleAccess != null && { consoleAccess: input.ConsoleAccess }), - ...(input.Groups != null && { groups: se___listOf__string(input.Groups, context) }), - ...(input.Password != null && { password: input.Password }), - ...(input.Username != null && { username: input.Username }), - }; + return take(input, { + consoleAccess: [, , `ConsoleAccess`], + groups: [, _json, `Groups`], + password: [, , `Password`], + username: [, , `Username`], + }); }; /** * serializeAws_restJson1WeeklyStartTime */ const se_WeeklyStartTime = (input: WeeklyStartTime, context: __SerdeContext): any => { - return { - ...(input.DayOfWeek != null && { dayOfWeek: input.DayOfWeek }), - ...(input.TimeOfDay != null && { timeOfDay: input.TimeOfDay }), - ...(input.TimeZone != null && { timeZone: input.TimeZone }), - }; + return take(input, { + dayOfWeek: [, , `DayOfWeek`], + timeOfDay: [, , `TimeOfDay`], + timeZone: [, , `TimeZone`], + }); }; -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfActionRequired @@ -2469,9 +2275,6 @@ const de___listOfActionRequired = (output: any, context: __SerdeContext): Action const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ActionRequired(entry, context); }); return retVal; @@ -2484,9 +2287,6 @@ const de___listOfAvailabilityZone = (output: any, context: __SerdeContext): Avai const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AvailabilityZone(entry, context); }); return retVal; @@ -2499,9 +2299,6 @@ const de___listOfBrokerEngineType = (output: any, context: __SerdeContext): Brok const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BrokerEngineType(entry, context); }); return retVal; @@ -2514,9 +2311,6 @@ const de___listOfBrokerInstance = (output: any, context: __SerdeContext): Broker const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BrokerInstance(entry, context); }); return retVal; @@ -2529,9 +2323,6 @@ const de___listOfBrokerInstanceOption = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BrokerInstanceOption(entry, context); }); return retVal; @@ -2544,9 +2335,6 @@ const de___listOfBrokerSummary = (output: any, context: __SerdeContext): BrokerS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BrokerSummary(entry, context); }); return retVal; @@ -2559,9 +2347,6 @@ const de___listOfConfiguration = (output: any, context: __SerdeContext): Configu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Configuration(entry, context); }); return retVal; @@ -2574,9 +2359,6 @@ const de___listOfConfigurationId = (output: any, context: __SerdeContext): Confi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigurationId(entry, context); }); return retVal; @@ -2589,28 +2371,12 @@ const de___listOfConfigurationRevision = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigurationRevision(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfDeploymentMode - */ -const de___listOfDeploymentMode = (output: any, context: __SerdeContext): (DeploymentMode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfDeploymentMode omitted. /** * deserializeAws_restJson1__listOfEngineVersion @@ -2619,9 +2385,6 @@ const de___listOfEngineVersion = (output: any, context: __SerdeContext): EngineV const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EngineVersion(entry, context); }); return retVal; @@ -2634,9 +2397,6 @@ const de___listOfSanitizationWarning = (output: any, context: __SerdeContext): S const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SanitizationWarning(entry, context); }); return retVal; @@ -2649,265 +2409,244 @@ const de___listOfUserSummary = (output: any, context: __SerdeContext): UserSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__mapOf__string - */ -const de___mapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__string omitted. /** * deserializeAws_restJson1ActionRequired */ const de_ActionRequired = (output: any, context: __SerdeContext): ActionRequired => { - return { - ActionRequiredCode: __expectString(output.actionRequiredCode), - ActionRequiredInfo: __expectString(output.actionRequiredInfo), - } as any; + return take(output, { + ActionRequiredCode: [, __expectString, `actionRequiredCode`], + ActionRequiredInfo: [, __expectString, `actionRequiredInfo`], + }) as any; }; /** * deserializeAws_restJson1AvailabilityZone */ const de_AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => { - return { - Name: __expectString(output.name), - } as any; + return take(output, { + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1BrokerEngineType */ const de_BrokerEngineType = (output: any, context: __SerdeContext): BrokerEngineType => { - return { - EngineType: __expectString(output.engineType), - EngineVersions: - output.engineVersions != null ? de___listOfEngineVersion(output.engineVersions, context) : undefined, - } as any; + return take(output, { + EngineType: [, __expectString, `engineType`], + EngineVersions: (_) => [, de___listOfEngineVersion(_, context), `engineVersions`], + }) as any; }; /** * deserializeAws_restJson1BrokerInstance */ const de_BrokerInstance = (output: any, context: __SerdeContext): BrokerInstance => { - return { - ConsoleURL: __expectString(output.consoleURL), - Endpoints: output.endpoints != null ? de___listOf__string(output.endpoints, context) : undefined, - IpAddress: __expectString(output.ipAddress), - } as any; + return take(output, { + ConsoleURL: [, __expectString, `consoleURL`], + Endpoints: [, _json, `endpoints`], + IpAddress: [, __expectString, `ipAddress`], + }) as any; }; /** * deserializeAws_restJson1BrokerInstanceOption */ const de_BrokerInstanceOption = (output: any, context: __SerdeContext): BrokerInstanceOption => { - return { - AvailabilityZones: - output.availabilityZones != null ? de___listOfAvailabilityZone(output.availabilityZones, context) : undefined, - EngineType: __expectString(output.engineType), - HostInstanceType: __expectString(output.hostInstanceType), - StorageType: __expectString(output.storageType), - SupportedDeploymentModes: - output.supportedDeploymentModes != null - ? de___listOfDeploymentMode(output.supportedDeploymentModes, context) - : undefined, - SupportedEngineVersions: - output.supportedEngineVersions != null ? de___listOf__string(output.supportedEngineVersions, context) : undefined, - } as any; + return take(output, { + AvailabilityZones: (_) => [, de___listOfAvailabilityZone(_, context), `availabilityZones`], + EngineType: [, __expectString, `engineType`], + HostInstanceType: [, __expectString, `hostInstanceType`], + StorageType: [, __expectString, `storageType`], + SupportedDeploymentModes: [, _json, `supportedDeploymentModes`], + SupportedEngineVersions: [, _json, `supportedEngineVersions`], + }) as any; }; /** * deserializeAws_restJson1BrokerSummary */ const de_BrokerSummary = (output: any, context: __SerdeContext): BrokerSummary => { - return { - BrokerArn: __expectString(output.brokerArn), - BrokerId: __expectString(output.brokerId), - BrokerName: __expectString(output.brokerName), - BrokerState: __expectString(output.brokerState), - Created: output.created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.created)) : undefined, - DeploymentMode: __expectString(output.deploymentMode), - EngineType: __expectString(output.engineType), - HostInstanceType: __expectString(output.hostInstanceType), - } as any; + return take(output, { + BrokerArn: [, __expectString, `brokerArn`], + BrokerId: [, __expectString, `brokerId`], + BrokerName: [, __expectString, `brokerName`], + BrokerState: [, __expectString, `brokerState`], + Created: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + DeploymentMode: [, __expectString, `deploymentMode`], + EngineType: [, __expectString, `engineType`], + HostInstanceType: [, __expectString, `hostInstanceType`], + }) as any; }; /** * deserializeAws_restJson1Configuration */ const de_Configuration = (output: any, context: __SerdeContext): Configuration => { - return { - Arn: __expectString(output.arn), - AuthenticationStrategy: __expectString(output.authenticationStrategy), - Created: output.created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.created)) : undefined, - Description: __expectString(output.description), - EngineType: __expectString(output.engineType), - EngineVersion: __expectString(output.engineVersion), - Id: __expectString(output.id), - LatestRevision: - output.latestRevision != null ? de_ConfigurationRevision(output.latestRevision, context) : undefined, - Name: __expectString(output.name), - Tags: output.tags != null ? de___mapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + AuthenticationStrategy: [, __expectString, `authenticationStrategy`], + Created: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + Description: [, __expectString, `description`], + EngineType: [, __expectString, `engineType`], + EngineVersion: [, __expectString, `engineVersion`], + Id: [, __expectString, `id`], + LatestRevision: (_) => [, de_ConfigurationRevision(_, context), `latestRevision`], + Name: [, __expectString, `name`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1ConfigurationId */ const de_ConfigurationId = (output: any, context: __SerdeContext): ConfigurationId => { - return { - Id: __expectString(output.id), - Revision: __expectInt32(output.revision), - } as any; + return take(output, { + Id: [, __expectString, `id`], + Revision: [, __expectInt32, `revision`], + }) as any; }; /** * deserializeAws_restJson1ConfigurationRevision */ const de_ConfigurationRevision = (output: any, context: __SerdeContext): ConfigurationRevision => { - return { - Created: output.created != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.created)) : undefined, - Description: __expectString(output.description), - Revision: __expectInt32(output.revision), - } as any; + return take(output, { + Created: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `created`], + Description: [, __expectString, `description`], + Revision: [, __expectInt32, `revision`], + }) as any; }; /** * deserializeAws_restJson1Configurations */ const de_Configurations = (output: any, context: __SerdeContext): Configurations => { - return { - Current: output.current != null ? de_ConfigurationId(output.current, context) : undefined, - History: output.history != null ? de___listOfConfigurationId(output.history, context) : undefined, - Pending: output.pending != null ? de_ConfigurationId(output.pending, context) : undefined, - } as any; + return take(output, { + Current: (_) => [, de_ConfigurationId(_, context), `current`], + History: (_) => [, de___listOfConfigurationId(_, context), `history`], + Pending: (_) => [, de_ConfigurationId(_, context), `pending`], + }) as any; }; /** * deserializeAws_restJson1EncryptionOptions */ const de_EncryptionOptions = (output: any, context: __SerdeContext): EncryptionOptions => { - return { - KmsKeyId: __expectString(output.kmsKeyId), - UseAwsOwnedKey: __expectBoolean(output.useAwsOwnedKey), - } as any; + return take(output, { + KmsKeyId: [, __expectString, `kmsKeyId`], + UseAwsOwnedKey: [, __expectBoolean, `useAwsOwnedKey`], + }) as any; }; /** * deserializeAws_restJson1EngineVersion */ const de_EngineVersion = (output: any, context: __SerdeContext): EngineVersion => { - return { - Name: __expectString(output.name), - } as any; + return take(output, { + Name: [, __expectString, `name`], + }) as any; }; /** * deserializeAws_restJson1LdapServerMetadataOutput */ const de_LdapServerMetadataOutput = (output: any, context: __SerdeContext): LdapServerMetadataOutput => { - return { - Hosts: output.hosts != null ? de___listOf__string(output.hosts, context) : undefined, - RoleBase: __expectString(output.roleBase), - RoleName: __expectString(output.roleName), - RoleSearchMatching: __expectString(output.roleSearchMatching), - RoleSearchSubtree: __expectBoolean(output.roleSearchSubtree), - ServiceAccountUsername: __expectString(output.serviceAccountUsername), - UserBase: __expectString(output.userBase), - UserRoleName: __expectString(output.userRoleName), - UserSearchMatching: __expectString(output.userSearchMatching), - UserSearchSubtree: __expectBoolean(output.userSearchSubtree), - } as any; + return take(output, { + Hosts: [, _json, `hosts`], + RoleBase: [, __expectString, `roleBase`], + RoleName: [, __expectString, `roleName`], + RoleSearchMatching: [, __expectString, `roleSearchMatching`], + RoleSearchSubtree: [, __expectBoolean, `roleSearchSubtree`], + ServiceAccountUsername: [, __expectString, `serviceAccountUsername`], + UserBase: [, __expectString, `userBase`], + UserRoleName: [, __expectString, `userRoleName`], + UserSearchMatching: [, __expectString, `userSearchMatching`], + UserSearchSubtree: [, __expectBoolean, `userSearchSubtree`], + }) as any; }; /** * deserializeAws_restJson1Logs */ const de_Logs = (output: any, context: __SerdeContext): Logs => { - return { - Audit: __expectBoolean(output.audit), - General: __expectBoolean(output.general), - } as any; + return take(output, { + Audit: [, __expectBoolean, `audit`], + General: [, __expectBoolean, `general`], + }) as any; }; /** * deserializeAws_restJson1LogsSummary */ const de_LogsSummary = (output: any, context: __SerdeContext): LogsSummary => { - return { - Audit: __expectBoolean(output.audit), - AuditLogGroup: __expectString(output.auditLogGroup), - General: __expectBoolean(output.general), - GeneralLogGroup: __expectString(output.generalLogGroup), - Pending: output.pending != null ? de_PendingLogs(output.pending, context) : undefined, - } as any; + return take(output, { + Audit: [, __expectBoolean, `audit`], + AuditLogGroup: [, __expectString, `auditLogGroup`], + General: [, __expectBoolean, `general`], + GeneralLogGroup: [, __expectString, `generalLogGroup`], + Pending: (_) => [, de_PendingLogs(_, context), `pending`], + }) as any; }; /** * deserializeAws_restJson1PendingLogs */ const de_PendingLogs = (output: any, context: __SerdeContext): PendingLogs => { - return { - Audit: __expectBoolean(output.audit), - General: __expectBoolean(output.general), - } as any; + return take(output, { + Audit: [, __expectBoolean, `audit`], + General: [, __expectBoolean, `general`], + }) as any; }; /** * deserializeAws_restJson1SanitizationWarning */ const de_SanitizationWarning = (output: any, context: __SerdeContext): SanitizationWarning => { - return { - AttributeName: __expectString(output.attributeName), - ElementName: __expectString(output.elementName), - Reason: __expectString(output.reason), - } as any; + return take(output, { + AttributeName: [, __expectString, `attributeName`], + ElementName: [, __expectString, `elementName`], + Reason: [, __expectString, `reason`], + }) as any; }; /** * deserializeAws_restJson1UserPendingChanges */ const de_UserPendingChanges = (output: any, context: __SerdeContext): UserPendingChanges => { - return { - ConsoleAccess: __expectBoolean(output.consoleAccess), - Groups: output.groups != null ? de___listOf__string(output.groups, context) : undefined, - PendingChange: __expectString(output.pendingChange), - } as any; + return take(output, { + ConsoleAccess: [, __expectBoolean, `consoleAccess`], + Groups: [, _json, `groups`], + PendingChange: [, __expectString, `pendingChange`], + }) as any; }; /** * deserializeAws_restJson1UserSummary */ const de_UserSummary = (output: any, context: __SerdeContext): UserSummary => { - return { - PendingChange: __expectString(output.pendingChange), - Username: __expectString(output.username), - } as any; + return take(output, { + PendingChange: [, __expectString, `pendingChange`], + Username: [, __expectString, `username`], + }) as any; }; /** * deserializeAws_restJson1WeeklyStartTime */ const de_WeeklyStartTime = (output: any, context: __SerdeContext): WeeklyStartTime => { - return { - DayOfWeek: __expectString(output.dayOfWeek), - TimeOfDay: __expectString(output.timeOfDay), - TimeZone: __expectString(output.timeZone), - } as any; + return take(output, { + DayOfWeek: [, __expectString, `dayOfWeek`], + TimeOfDay: [, __expectString, `timeOfDay`], + TimeZone: [, __expectString, `timeZone`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-mturk/src/protocols/Aws_json1_1.ts b/clients/client-mturk/src/protocols/Aws_json1_1.ts index 73eaa93287d3..6b19b87b4683 100644 --- a/clients/client-mturk/src/protocols/Aws_json1_1.ts +++ b/clients/client-mturk/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -122,41 +124,29 @@ import { } from "../commands/UpdateQualificationTypeCommand"; import { AcceptQualificationRequestRequest, - AcceptQualificationRequestResponse, ApproveAssignmentRequest, - ApproveAssignmentResponse, Assignment, AssignmentStatus, AssociateQualificationWithWorkerRequest, - AssociateQualificationWithWorkerResponse, BonusPayment, CreateAdditionalAssignmentsForHITRequest, - CreateAdditionalAssignmentsForHITResponse, CreateHITRequest, CreateHITResponse, CreateHITTypeRequest, - CreateHITTypeResponse, CreateHITWithHITTypeRequest, CreateHITWithHITTypeResponse, CreateQualificationTypeRequest, CreateQualificationTypeResponse, CreateWorkerBlockRequest, - CreateWorkerBlockResponse, DeleteHITRequest, - DeleteHITResponse, DeleteQualificationTypeRequest, - DeleteQualificationTypeResponse, DeleteWorkerBlockRequest, - DeleteWorkerBlockResponse, DisassociateQualificationFromWorkerRequest, - DisassociateQualificationFromWorkerResponse, EventType, GetAccountBalanceRequest, - GetAccountBalanceResponse, GetAssignmentRequest, GetAssignmentResponse, GetFileUploadURLRequest, - GetFileUploadURLResponse, GetHITRequest, GetHITResponse, GetQualificationScoreRequest, @@ -182,14 +172,11 @@ import { ListReviewPolicyResultsForHITRequest, ListReviewPolicyResultsForHITResponse, ListWorkerBlocksRequest, - ListWorkerBlocksResponse, ListWorkersWithQualificationTypeRequest, ListWorkersWithQualificationTypeResponse, Locale, NotificationSpecification, - NotifyWorkersFailureStatus, NotifyWorkersRequest, - NotifyWorkersResponse, ParameterMapEntry, PolicyParameter, Qualification, @@ -197,31 +184,21 @@ import { QualificationRequirement, QualificationType, RejectAssignmentRequest, - RejectAssignmentResponse, RejectQualificationRequestRequest, - RejectQualificationRequestResponse, RequestError, ReviewActionDetail, ReviewPolicy, ReviewPolicyLevel, ReviewReport, - ReviewResultDetail, SendBonusRequest, - SendBonusResponse, SendTestEventNotificationRequest, - SendTestEventNotificationResponse, ServiceFault, UpdateExpirationForHITRequest, - UpdateExpirationForHITResponse, UpdateHITReviewStatusRequest, - UpdateHITReviewStatusResponse, UpdateHITTypeOfHITRequest, - UpdateHITTypeOfHITResponse, UpdateNotificationSettingsRequest, - UpdateNotificationSettingsResponse, UpdateQualificationTypeRequest, UpdateQualificationTypeResponse, - WorkerBlock, } from "../models/models_0"; import { MTurkServiceException as __BaseException } from "../models/MTurkServiceException"; @@ -234,7 +211,7 @@ export const se_AcceptQualificationRequestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptQualificationRequest"); let body: any; - body = JSON.stringify(se_AcceptQualificationRequestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -247,7 +224,7 @@ export const se_ApproveAssignmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ApproveAssignment"); let body: any; - body = JSON.stringify(se_ApproveAssignmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -260,7 +237,7 @@ export const se_AssociateQualificationWithWorkerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateQualificationWithWorker"); let body: any; - body = JSON.stringify(se_AssociateQualificationWithWorkerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -273,7 +250,7 @@ export const se_CreateAdditionalAssignmentsForHITCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAdditionalAssignmentsForHIT"); let body: any; - body = JSON.stringify(se_CreateAdditionalAssignmentsForHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -286,7 +263,7 @@ export const se_CreateHITCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHIT"); let body: any; - body = JSON.stringify(se_CreateHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -299,7 +276,7 @@ export const se_CreateHITTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHITType"); let body: any; - body = JSON.stringify(se_CreateHITTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -312,7 +289,7 @@ export const se_CreateHITWithHITTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHITWithHITType"); let body: any; - body = JSON.stringify(se_CreateHITWithHITTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -325,7 +302,7 @@ export const se_CreateQualificationTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateQualificationType"); let body: any; - body = JSON.stringify(se_CreateQualificationTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -338,7 +315,7 @@ export const se_CreateWorkerBlockCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkerBlock"); let body: any; - body = JSON.stringify(se_CreateWorkerBlockRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -351,7 +328,7 @@ export const se_DeleteHITCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHIT"); let body: any; - body = JSON.stringify(se_DeleteHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -364,7 +341,7 @@ export const se_DeleteQualificationTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteQualificationType"); let body: any; - body = JSON.stringify(se_DeleteQualificationTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +354,7 @@ export const se_DeleteWorkerBlockCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkerBlock"); let body: any; - body = JSON.stringify(se_DeleteWorkerBlockRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +367,7 @@ export const se_DisassociateQualificationFromWorkerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateQualificationFromWorker"); let body: any; - body = JSON.stringify(se_DisassociateQualificationFromWorkerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -403,7 +380,7 @@ export const se_GetAccountBalanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccountBalance"); let body: any; - body = JSON.stringify(se_GetAccountBalanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -416,7 +393,7 @@ export const se_GetAssignmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAssignment"); let body: any; - body = JSON.stringify(se_GetAssignmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -429,7 +406,7 @@ export const se_GetFileUploadURLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFileUploadURL"); let body: any; - body = JSON.stringify(se_GetFileUploadURLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -439,7 +416,7 @@ export const se_GetFileUploadURLCommand = async ( export const se_GetHITCommand = async (input: GetHITCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetHIT"); let body: any; - body = JSON.stringify(se_GetHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -452,7 +429,7 @@ export const se_GetQualificationScoreCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQualificationScore"); let body: any; - body = JSON.stringify(se_GetQualificationScoreRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -465,7 +442,7 @@ export const se_GetQualificationTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQualificationType"); let body: any; - body = JSON.stringify(se_GetQualificationTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -478,7 +455,7 @@ export const se_ListAssignmentsForHITCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssignmentsForHIT"); let body: any; - body = JSON.stringify(se_ListAssignmentsForHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -491,7 +468,7 @@ export const se_ListBonusPaymentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBonusPayments"); let body: any; - body = JSON.stringify(se_ListBonusPaymentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -504,7 +481,7 @@ export const se_ListHITsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHITs"); let body: any; - body = JSON.stringify(se_ListHITsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -517,7 +494,7 @@ export const se_ListHITsForQualificationTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHITsForQualificationType"); let body: any; - body = JSON.stringify(se_ListHITsForQualificationTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -530,7 +507,7 @@ export const se_ListQualificationRequestsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListQualificationRequests"); let body: any; - body = JSON.stringify(se_ListQualificationRequestsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,7 +520,7 @@ export const se_ListQualificationTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListQualificationTypes"); let body: any; - body = JSON.stringify(se_ListQualificationTypesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +533,7 @@ export const se_ListReviewableHITsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReviewableHITs"); let body: any; - body = JSON.stringify(se_ListReviewableHITsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -569,7 +546,7 @@ export const se_ListReviewPolicyResultsForHITCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListReviewPolicyResultsForHIT"); let body: any; - body = JSON.stringify(se_ListReviewPolicyResultsForHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -582,7 +559,7 @@ export const se_ListWorkerBlocksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkerBlocks"); let body: any; - body = JSON.stringify(se_ListWorkerBlocksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -595,7 +572,7 @@ export const se_ListWorkersWithQualificationTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkersWithQualificationType"); let body: any; - body = JSON.stringify(se_ListWorkersWithQualificationTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -608,7 +585,7 @@ export const se_NotifyWorkersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("NotifyWorkers"); let body: any; - body = JSON.stringify(se_NotifyWorkersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -621,7 +598,7 @@ export const se_RejectAssignmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectAssignment"); let body: any; - body = JSON.stringify(se_RejectAssignmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -634,7 +611,7 @@ export const se_RejectQualificationRequestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectQualificationRequest"); let body: any; - body = JSON.stringify(se_RejectQualificationRequestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -647,7 +624,7 @@ export const se_SendBonusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendBonus"); let body: any; - body = JSON.stringify(se_SendBonusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -660,7 +637,7 @@ export const se_SendTestEventNotificationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendTestEventNotification"); let body: any; - body = JSON.stringify(se_SendTestEventNotificationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -686,7 +663,7 @@ export const se_UpdateHITReviewStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateHITReviewStatus"); let body: any; - body = JSON.stringify(se_UpdateHITReviewStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -699,7 +676,7 @@ export const se_UpdateHITTypeOfHITCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateHITTypeOfHIT"); let body: any; - body = JSON.stringify(se_UpdateHITTypeOfHITRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -712,7 +689,7 @@ export const se_UpdateNotificationSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNotificationSettings"); let body: any; - body = JSON.stringify(se_UpdateNotificationSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -725,7 +702,7 @@ export const se_UpdateQualificationTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateQualificationType"); let body: any; - body = JSON.stringify(se_UpdateQualificationTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -741,12 +718,12 @@ export const de_AcceptQualificationRequestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptQualificationRequestResponse(data, context); + contents = _json(data); const response: AcceptQualificationRequestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -770,10 +747,9 @@ const de_AcceptQualificationRequestCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -791,12 +767,12 @@ export const de_ApproveAssignmentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ApproveAssignmentResponse(data, context); + contents = _json(data); const response: ApproveAssignmentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -820,10 +796,9 @@ const de_ApproveAssignmentCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -841,12 +816,12 @@ export const de_AssociateQualificationWithWorkerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateQualificationWithWorkerResponse(data, context); + contents = _json(data); const response: AssociateQualificationWithWorkerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -870,10 +845,9 @@ const de_AssociateQualificationWithWorkerCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -891,12 +865,12 @@ export const de_CreateAdditionalAssignmentsForHITCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAdditionalAssignmentsForHITResponse(data, context); + contents = _json(data); const response: CreateAdditionalAssignmentsForHITCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -920,10 +894,9 @@ const de_CreateAdditionalAssignmentsForHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -946,7 +919,7 @@ export const de_CreateHITCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -970,10 +943,9 @@ const de_CreateHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -991,12 +963,12 @@ export const de_CreateHITTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHITTypeResponse(data, context); + contents = _json(data); const response: CreateHITTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1020,10 +992,9 @@ const de_CreateHITTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1046,7 +1017,7 @@ export const de_CreateHITWithHITTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1070,10 +1041,9 @@ const de_CreateHITWithHITTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,7 +1066,7 @@ export const de_CreateQualificationTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1120,10 +1090,9 @@ const de_CreateQualificationTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1141,12 +1110,12 @@ export const de_CreateWorkerBlockCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkerBlockResponse(data, context); + contents = _json(data); const response: CreateWorkerBlockCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1170,10 +1139,9 @@ const de_CreateWorkerBlockCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1191,12 +1159,12 @@ export const de_DeleteHITCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHITResponse(data, context); + contents = _json(data); const response: DeleteHITCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1220,10 +1188,9 @@ const de_DeleteHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1241,12 +1208,12 @@ export const de_DeleteQualificationTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteQualificationTypeResponse(data, context); + contents = _json(data); const response: DeleteQualificationTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1270,10 +1237,9 @@ const de_DeleteQualificationTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1291,12 +1257,12 @@ export const de_DeleteWorkerBlockCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkerBlockResponse(data, context); + contents = _json(data); const response: DeleteWorkerBlockCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1320,10 +1286,9 @@ const de_DeleteWorkerBlockCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1341,12 +1306,12 @@ export const de_DisassociateQualificationFromWorkerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateQualificationFromWorkerResponse(data, context); + contents = _json(data); const response: DisassociateQualificationFromWorkerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1370,10 +1335,9 @@ const de_DisassociateQualificationFromWorkerCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1391,12 +1355,12 @@ export const de_GetAccountBalanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAccountBalanceResponse(data, context); + contents = _json(data); const response: GetAccountBalanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1420,10 +1384,9 @@ const de_GetAccountBalanceCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1446,7 +1409,7 @@ export const de_GetAssignmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1470,10 +1433,9 @@ const de_GetAssignmentCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1491,12 +1453,12 @@ export const de_GetFileUploadURLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFileUploadURLResponse(data, context); + contents = _json(data); const response: GetFileUploadURLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1520,10 +1482,9 @@ const de_GetFileUploadURLCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,7 +1507,7 @@ export const de_GetHITCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1567,10 +1528,9 @@ const de_GetHITCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1593,7 +1553,7 @@ export const de_GetQualificationScoreCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1617,10 +1577,9 @@ const de_GetQualificationScoreCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1643,7 +1602,7 @@ export const de_GetQualificationTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1667,10 +1626,9 @@ const de_GetQualificationTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1693,7 +1651,7 @@ export const de_ListAssignmentsForHITCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1717,10 +1675,9 @@ const de_ListAssignmentsForHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1743,7 +1700,7 @@ export const de_ListBonusPaymentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1767,10 +1724,9 @@ const de_ListBonusPaymentsCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,7 +1749,7 @@ export const de_ListHITsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1817,10 +1773,9 @@ const de_ListHITsCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1843,7 +1798,7 @@ export const de_ListHITsForQualificationTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1867,10 +1822,9 @@ const de_ListHITsForQualificationTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1893,7 +1847,7 @@ export const de_ListQualificationRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1917,10 +1871,9 @@ const de_ListQualificationRequestsCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1943,7 +1896,7 @@ export const de_ListQualificationTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1967,10 +1920,9 @@ const de_ListQualificationTypesCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1993,7 +1945,7 @@ export const de_ListReviewableHITsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2017,10 +1969,9 @@ const de_ListReviewableHITsCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2043,7 +1994,7 @@ export const de_ListReviewPolicyResultsForHITCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2067,10 +2018,9 @@ const de_ListReviewPolicyResultsForHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2088,12 +2038,12 @@ export const de_ListWorkerBlocksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListWorkerBlocksResponse(data, context); + contents = _json(data); const response: ListWorkerBlocksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2117,10 +2067,9 @@ const de_ListWorkerBlocksCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2143,7 +2092,7 @@ export const de_ListWorkersWithQualificationTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2167,10 +2116,9 @@ const de_ListWorkersWithQualificationTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2188,12 +2136,12 @@ export const de_NotifyWorkersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyWorkersResponse(data, context); + contents = _json(data); const response: NotifyWorkersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2217,10 +2165,9 @@ const de_NotifyWorkersCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2238,12 +2185,12 @@ export const de_RejectAssignmentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectAssignmentResponse(data, context); + contents = _json(data); const response: RejectAssignmentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2267,10 +2214,9 @@ const de_RejectAssignmentCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2288,12 +2234,12 @@ export const de_RejectQualificationRequestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectQualificationRequestResponse(data, context); + contents = _json(data); const response: RejectQualificationRequestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2317,10 +2263,9 @@ const de_RejectQualificationRequestCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2338,12 +2283,12 @@ export const de_SendBonusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendBonusResponse(data, context); + contents = _json(data); const response: SendBonusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2367,10 +2312,9 @@ const de_SendBonusCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2388,12 +2332,12 @@ export const de_SendTestEventNotificationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendTestEventNotificationResponse(data, context); + contents = _json(data); const response: SendTestEventNotificationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2417,10 +2361,9 @@ const de_SendTestEventNotificationCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2438,12 +2381,12 @@ export const de_UpdateExpirationForHITCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateExpirationForHITResponse(data, context); + contents = _json(data); const response: UpdateExpirationForHITCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2467,10 +2410,9 @@ const de_UpdateExpirationForHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2488,12 +2430,12 @@ export const de_UpdateHITReviewStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHITReviewStatusResponse(data, context); + contents = _json(data); const response: UpdateHITReviewStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2517,10 +2459,9 @@ const de_UpdateHITReviewStatusCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2538,12 +2479,12 @@ export const de_UpdateHITTypeOfHITCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHITTypeOfHITResponse(data, context); + contents = _json(data); const response: UpdateHITTypeOfHITCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2567,10 +2508,9 @@ const de_UpdateHITTypeOfHITCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2588,12 +2528,12 @@ export const de_UpdateNotificationSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNotificationSettingsResponse(data, context); + contents = _json(data); const response: UpdateNotificationSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2617,10 +2557,9 @@ const de_UpdateNotificationSettingsCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2643,7 +2582,7 @@ export const de_UpdateQualificationTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2667,10 +2606,9 @@ const de_UpdateQualificationTypeCommandError = async ( throw await de_ServiceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2681,7 +2619,7 @@ const de_UpdateQualificationTypeCommandError = async ( */ const de_RequestErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestError(body, context); + const deserialized: any = _json(body); const exception = new RequestError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2694,7 +2632,7 @@ const de_RequestErrorRes = async (parsedOutput: any, context: __SerdeContext): P */ const de_ServiceFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceFault(body, context); + const deserialized: any = _json(body); const exception = new ServiceFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2702,749 +2640,150 @@ const de_ServiceFaultRes = async (parsedOutput: any, context: __SerdeContext): P return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptQualificationRequestRequest - */ -const se_AcceptQualificationRequestRequest = ( - input: AcceptQualificationRequestRequest, - context: __SerdeContext -): any => { - return { - ...(input.IntegerValue != null && { IntegerValue: input.IntegerValue }), - ...(input.QualificationRequestId != null && { QualificationRequestId: input.QualificationRequestId }), - }; -}; +// se_AcceptQualificationRequestRequest omitted. -/** - * serializeAws_json1_1ApproveAssignmentRequest - */ -const se_ApproveAssignmentRequest = (input: ApproveAssignmentRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }), - ...(input.OverrideRejection != null && { OverrideRejection: input.OverrideRejection }), - ...(input.RequesterFeedback != null && { RequesterFeedback: input.RequesterFeedback }), - }; -}; +// se_ApproveAssignmentRequest omitted. -/** - * serializeAws_json1_1AssignmentStatusList - */ -const se_AssignmentStatusList = (input: (AssignmentStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AssignmentStatusList omitted. -/** - * serializeAws_json1_1AssociateQualificationWithWorkerRequest - */ -const se_AssociateQualificationWithWorkerRequest = ( - input: AssociateQualificationWithWorkerRequest, - context: __SerdeContext -): any => { - return { - ...(input.IntegerValue != null && { IntegerValue: input.IntegerValue }), - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - ...(input.SendNotification != null && { SendNotification: input.SendNotification }), - ...(input.WorkerId != null && { WorkerId: input.WorkerId }), - }; -}; +// se_AssociateQualificationWithWorkerRequest omitted. -/** - * serializeAws_json1_1CreateAdditionalAssignmentsForHITRequest - */ -const se_CreateAdditionalAssignmentsForHITRequest = ( - input: CreateAdditionalAssignmentsForHITRequest, - context: __SerdeContext -): any => { - return { - ...(input.HITId != null && { HITId: input.HITId }), - ...(input.NumberOfAdditionalAssignments != null && { - NumberOfAdditionalAssignments: input.NumberOfAdditionalAssignments, - }), - ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }), - }; -}; +// se_CreateAdditionalAssignmentsForHITRequest omitted. -/** - * serializeAws_json1_1CreateHITRequest - */ -const se_CreateHITRequest = (input: CreateHITRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentDurationInSeconds != null && { - AssignmentDurationInSeconds: input.AssignmentDurationInSeconds, - }), - ...(input.AssignmentReviewPolicy != null && { - AssignmentReviewPolicy: se_ReviewPolicy(input.AssignmentReviewPolicy, context), - }), - ...(input.AutoApprovalDelayInSeconds != null && { AutoApprovalDelayInSeconds: input.AutoApprovalDelayInSeconds }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HITLayoutId != null && { HITLayoutId: input.HITLayoutId }), - ...(input.HITLayoutParameters != null && { - HITLayoutParameters: se_HITLayoutParameterList(input.HITLayoutParameters, context), - }), - ...(input.HITReviewPolicy != null && { HITReviewPolicy: se_ReviewPolicy(input.HITReviewPolicy, context) }), - ...(input.Keywords != null && { Keywords: input.Keywords }), - ...(input.LifetimeInSeconds != null && { LifetimeInSeconds: input.LifetimeInSeconds }), - ...(input.MaxAssignments != null && { MaxAssignments: input.MaxAssignments }), - ...(input.QualificationRequirements != null && { - QualificationRequirements: se_QualificationRequirementList(input.QualificationRequirements, context), - }), - ...(input.Question != null && { Question: input.Question }), - ...(input.RequesterAnnotation != null && { RequesterAnnotation: input.RequesterAnnotation }), - ...(input.Reward != null && { Reward: input.Reward }), - ...(input.Title != null && { Title: input.Title }), - ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }), - }; -}; +// se_CreateHITRequest omitted. -/** - * serializeAws_json1_1CreateHITTypeRequest - */ -const se_CreateHITTypeRequest = (input: CreateHITTypeRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentDurationInSeconds != null && { - AssignmentDurationInSeconds: input.AssignmentDurationInSeconds, - }), - ...(input.AutoApprovalDelayInSeconds != null && { AutoApprovalDelayInSeconds: input.AutoApprovalDelayInSeconds }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Keywords != null && { Keywords: input.Keywords }), - ...(input.QualificationRequirements != null && { - QualificationRequirements: se_QualificationRequirementList(input.QualificationRequirements, context), - }), - ...(input.Reward != null && { Reward: input.Reward }), - ...(input.Title != null && { Title: input.Title }), - }; -}; +// se_CreateHITTypeRequest omitted. -/** - * serializeAws_json1_1CreateHITWithHITTypeRequest - */ -const se_CreateHITWithHITTypeRequest = (input: CreateHITWithHITTypeRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentReviewPolicy != null && { - AssignmentReviewPolicy: se_ReviewPolicy(input.AssignmentReviewPolicy, context), - }), - ...(input.HITLayoutId != null && { HITLayoutId: input.HITLayoutId }), - ...(input.HITLayoutParameters != null && { - HITLayoutParameters: se_HITLayoutParameterList(input.HITLayoutParameters, context), - }), - ...(input.HITReviewPolicy != null && { HITReviewPolicy: se_ReviewPolicy(input.HITReviewPolicy, context) }), - ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }), - ...(input.LifetimeInSeconds != null && { LifetimeInSeconds: input.LifetimeInSeconds }), - ...(input.MaxAssignments != null && { MaxAssignments: input.MaxAssignments }), - ...(input.Question != null && { Question: input.Question }), - ...(input.RequesterAnnotation != null && { RequesterAnnotation: input.RequesterAnnotation }), - ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }), - }; -}; +// se_CreateHITWithHITTypeRequest omitted. -/** - * serializeAws_json1_1CreateQualificationTypeRequest - */ -const se_CreateQualificationTypeRequest = (input: CreateQualificationTypeRequest, context: __SerdeContext): any => { - return { - ...(input.AnswerKey != null && { AnswerKey: input.AnswerKey }), - ...(input.AutoGranted != null && { AutoGranted: input.AutoGranted }), - ...(input.AutoGrantedValue != null && { AutoGrantedValue: input.AutoGrantedValue }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Keywords != null && { Keywords: input.Keywords }), - ...(input.Name != null && { Name: input.Name }), - ...(input.QualificationTypeStatus != null && { QualificationTypeStatus: input.QualificationTypeStatus }), - ...(input.RetryDelayInSeconds != null && { RetryDelayInSeconds: input.RetryDelayInSeconds }), - ...(input.Test != null && { Test: input.Test }), - ...(input.TestDurationInSeconds != null && { TestDurationInSeconds: input.TestDurationInSeconds }), - }; -}; +// se_CreateQualificationTypeRequest omitted. -/** - * serializeAws_json1_1CreateWorkerBlockRequest - */ -const se_CreateWorkerBlockRequest = (input: CreateWorkerBlockRequest, context: __SerdeContext): any => { - return { - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.WorkerId != null && { WorkerId: input.WorkerId }), - }; -}; +// se_CreateWorkerBlockRequest omitted. -/** - * serializeAws_json1_1CustomerIdList - */ -const se_CustomerIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CustomerIdList omitted. -/** - * serializeAws_json1_1DeleteHITRequest - */ -const se_DeleteHITRequest = (input: DeleteHITRequest, context: __SerdeContext): any => { - return { - ...(input.HITId != null && { HITId: input.HITId }), - }; -}; +// se_DeleteHITRequest omitted. -/** - * serializeAws_json1_1DeleteQualificationTypeRequest - */ -const se_DeleteQualificationTypeRequest = (input: DeleteQualificationTypeRequest, context: __SerdeContext): any => { - return { - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - }; -}; +// se_DeleteQualificationTypeRequest omitted. -/** - * serializeAws_json1_1DeleteWorkerBlockRequest - */ -const se_DeleteWorkerBlockRequest = (input: DeleteWorkerBlockRequest, context: __SerdeContext): any => { - return { - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.WorkerId != null && { WorkerId: input.WorkerId }), - }; -}; +// se_DeleteWorkerBlockRequest omitted. -/** - * serializeAws_json1_1DisassociateQualificationFromWorkerRequest - */ -const se_DisassociateQualificationFromWorkerRequest = ( - input: DisassociateQualificationFromWorkerRequest, - context: __SerdeContext -): any => { - return { - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.WorkerId != null && { WorkerId: input.WorkerId }), - }; -}; +// se_DisassociateQualificationFromWorkerRequest omitted. -/** - * serializeAws_json1_1EventTypeList - */ -const se_EventTypeList = (input: (EventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypeList omitted. -/** - * serializeAws_json1_1GetAccountBalanceRequest - */ -const se_GetAccountBalanceRequest = (input: GetAccountBalanceRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetAccountBalanceRequest omitted. -/** - * serializeAws_json1_1GetAssignmentRequest - */ -const se_GetAssignmentRequest = (input: GetAssignmentRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }), - }; -}; +// se_GetAssignmentRequest omitted. -/** - * serializeAws_json1_1GetFileUploadURLRequest - */ -const se_GetFileUploadURLRequest = (input: GetFileUploadURLRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }), - ...(input.QuestionIdentifier != null && { QuestionIdentifier: input.QuestionIdentifier }), - }; -}; +// se_GetFileUploadURLRequest omitted. -/** - * serializeAws_json1_1GetHITRequest - */ -const se_GetHITRequest = (input: GetHITRequest, context: __SerdeContext): any => { - return { - ...(input.HITId != null && { HITId: input.HITId }), - }; -}; +// se_GetHITRequest omitted. -/** - * serializeAws_json1_1GetQualificationScoreRequest - */ -const se_GetQualificationScoreRequest = (input: GetQualificationScoreRequest, context: __SerdeContext): any => { - return { - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - ...(input.WorkerId != null && { WorkerId: input.WorkerId }), - }; -}; +// se_GetQualificationScoreRequest omitted. -/** - * serializeAws_json1_1GetQualificationTypeRequest - */ -const se_GetQualificationTypeRequest = (input: GetQualificationTypeRequest, context: __SerdeContext): any => { - return { - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - }; -}; +// se_GetQualificationTypeRequest omitted. -/** - * serializeAws_json1_1HITLayoutParameter - */ -const se_HITLayoutParameter = (input: HITLayoutParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_HITLayoutParameter omitted. -/** - * serializeAws_json1_1HITLayoutParameterList - */ -const se_HITLayoutParameterList = (input: HITLayoutParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HITLayoutParameter(entry, context); - }); -}; +// se_HITLayoutParameterList omitted. -/** - * serializeAws_json1_1IntegerList - */ -const se_IntegerList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IntegerList omitted. -/** - * serializeAws_json1_1ListAssignmentsForHITRequest - */ -const se_ListAssignmentsForHITRequest = (input: ListAssignmentsForHITRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentStatuses != null && { - AssignmentStatuses: se_AssignmentStatusList(input.AssignmentStatuses, context), - }), - ...(input.HITId != null && { HITId: input.HITId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAssignmentsForHITRequest omitted. -/** - * serializeAws_json1_1ListBonusPaymentsRequest - */ -const se_ListBonusPaymentsRequest = (input: ListBonusPaymentsRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }), - ...(input.HITId != null && { HITId: input.HITId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListBonusPaymentsRequest omitted. -/** - * serializeAws_json1_1ListHITsForQualificationTypeRequest - */ -const se_ListHITsForQualificationTypeRequest = ( - input: ListHITsForQualificationTypeRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - }; -}; +// se_ListHITsForQualificationTypeRequest omitted. -/** - * serializeAws_json1_1ListHITsRequest - */ -const se_ListHITsRequest = (input: ListHITsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHITsRequest omitted. -/** - * serializeAws_json1_1ListQualificationRequestsRequest - */ -const se_ListQualificationRequestsRequest = (input: ListQualificationRequestsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - }; -}; +// se_ListQualificationRequestsRequest omitted. -/** - * serializeAws_json1_1ListQualificationTypesRequest - */ -const se_ListQualificationTypesRequest = (input: ListQualificationTypesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MustBeOwnedByCaller != null && { MustBeOwnedByCaller: input.MustBeOwnedByCaller }), - ...(input.MustBeRequestable != null && { MustBeRequestable: input.MustBeRequestable }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Query != null && { Query: input.Query }), - }; -}; +// se_ListQualificationTypesRequest omitted. -/** - * serializeAws_json1_1ListReviewableHITsRequest - */ -const se_ListReviewableHITsRequest = (input: ListReviewableHITsRequest, context: __SerdeContext): any => { - return { - ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListReviewableHITsRequest omitted. -/** - * serializeAws_json1_1ListReviewPolicyResultsForHITRequest - */ -const se_ListReviewPolicyResultsForHITRequest = ( - input: ListReviewPolicyResultsForHITRequest, - context: __SerdeContext -): any => { - return { - ...(input.HITId != null && { HITId: input.HITId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyLevels != null && { PolicyLevels: se_ReviewPolicyLevelList(input.PolicyLevels, context) }), - ...(input.RetrieveActions != null && { RetrieveActions: input.RetrieveActions }), - ...(input.RetrieveResults != null && { RetrieveResults: input.RetrieveResults }), - }; -}; +// se_ListReviewPolicyResultsForHITRequest omitted. -/** - * serializeAws_json1_1ListWorkerBlocksRequest - */ -const se_ListWorkerBlocksRequest = (input: ListWorkerBlocksRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWorkerBlocksRequest omitted. -/** - * serializeAws_json1_1ListWorkersWithQualificationTypeRequest - */ -const se_ListWorkersWithQualificationTypeRequest = ( - input: ListWorkersWithQualificationTypeRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListWorkersWithQualificationTypeRequest omitted. -/** - * serializeAws_json1_1Locale - */ -const se_Locale = (input: Locale, context: __SerdeContext): any => { - return { - ...(input.Country != null && { Country: input.Country }), - ...(input.Subdivision != null && { Subdivision: input.Subdivision }), - }; -}; +// se_Locale omitted. -/** - * serializeAws_json1_1LocaleList - */ -const se_LocaleList = (input: Locale[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Locale(entry, context); - }); -}; +// se_LocaleList omitted. -/** - * serializeAws_json1_1NotificationSpecification - */ -const se_NotificationSpecification = (input: NotificationSpecification, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.EventTypes != null && { EventTypes: se_EventTypeList(input.EventTypes, context) }), - ...(input.Transport != null && { Transport: input.Transport }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_NotificationSpecification omitted. -/** - * serializeAws_json1_1NotifyWorkersRequest - */ -const se_NotifyWorkersRequest = (input: NotifyWorkersRequest, context: __SerdeContext): any => { - return { - ...(input.MessageText != null && { MessageText: input.MessageText }), - ...(input.Subject != null && { Subject: input.Subject }), - ...(input.WorkerIds != null && { WorkerIds: se_CustomerIdList(input.WorkerIds, context) }), - }; -}; +// se_NotifyWorkersRequest omitted. -/** - * serializeAws_json1_1ParameterMapEntry - */ -const se_ParameterMapEntry = (input: ParameterMapEntry, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_StringList(input.Values, context) }), - }; -}; +// se_ParameterMapEntry omitted. -/** - * serializeAws_json1_1ParameterMapEntryList - */ -const se_ParameterMapEntryList = (input: ParameterMapEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterMapEntry(entry, context); - }); -}; +// se_ParameterMapEntryList omitted. -/** - * serializeAws_json1_1PolicyParameter - */ -const se_PolicyParameter = (input: PolicyParameter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.MapEntries != null && { MapEntries: se_ParameterMapEntryList(input.MapEntries, context) }), - ...(input.Values != null && { Values: se_StringList(input.Values, context) }), - }; -}; +// se_PolicyParameter omitted. -/** - * serializeAws_json1_1PolicyParameterList - */ -const se_PolicyParameterList = (input: PolicyParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PolicyParameter(entry, context); - }); -}; +// se_PolicyParameterList omitted. -/** - * serializeAws_json1_1QualificationRequirement - */ -const se_QualificationRequirement = (input: QualificationRequirement, context: __SerdeContext): any => { - return { - ...(input.ActionsGuarded != null && { ActionsGuarded: input.ActionsGuarded }), - ...(input.Comparator != null && { Comparator: input.Comparator }), - ...(input.IntegerValues != null && { IntegerValues: se_IntegerList(input.IntegerValues, context) }), - ...(input.LocaleValues != null && { LocaleValues: se_LocaleList(input.LocaleValues, context) }), - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - ...(input.RequiredToPreview != null && { RequiredToPreview: input.RequiredToPreview }), - }; -}; +// se_QualificationRequirement omitted. -/** - * serializeAws_json1_1QualificationRequirementList - */ -const se_QualificationRequirementList = (input: QualificationRequirement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_QualificationRequirement(entry, context); - }); -}; +// se_QualificationRequirementList omitted. -/** - * serializeAws_json1_1RejectAssignmentRequest - */ -const se_RejectAssignmentRequest = (input: RejectAssignmentRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }), - ...(input.RequesterFeedback != null && { RequesterFeedback: input.RequesterFeedback }), - }; -}; +// se_RejectAssignmentRequest omitted. -/** - * serializeAws_json1_1RejectQualificationRequestRequest - */ -const se_RejectQualificationRequestRequest = ( - input: RejectQualificationRequestRequest, - context: __SerdeContext -): any => { - return { - ...(input.QualificationRequestId != null && { QualificationRequestId: input.QualificationRequestId }), - ...(input.Reason != null && { Reason: input.Reason }), - }; -}; +// se_RejectQualificationRequestRequest omitted. -/** - * serializeAws_json1_1ReviewPolicy - */ -const se_ReviewPolicy = (input: ReviewPolicy, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_PolicyParameterList(input.Parameters, context) }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; +// se_ReviewPolicy omitted. -/** - * serializeAws_json1_1ReviewPolicyLevelList - */ -const se_ReviewPolicyLevelList = (input: (ReviewPolicyLevel | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ReviewPolicyLevelList omitted. -/** - * serializeAws_json1_1SendBonusRequest - */ -const se_SendBonusRequest = (input: SendBonusRequest, context: __SerdeContext): any => { - return { - ...(input.AssignmentId != null && { AssignmentId: input.AssignmentId }), - ...(input.BonusAmount != null && { BonusAmount: input.BonusAmount }), - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.UniqueRequestToken != null && { UniqueRequestToken: input.UniqueRequestToken }), - ...(input.WorkerId != null && { WorkerId: input.WorkerId }), - }; -}; +// se_SendBonusRequest omitted. -/** - * serializeAws_json1_1SendTestEventNotificationRequest - */ -const se_SendTestEventNotificationRequest = (input: SendTestEventNotificationRequest, context: __SerdeContext): any => { - return { - ...(input.Notification != null && { Notification: se_NotificationSpecification(input.Notification, context) }), - ...(input.TestEventType != null && { TestEventType: input.TestEventType }), - }; -}; +// se_SendTestEventNotificationRequest omitted. -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. /** * serializeAws_json1_1UpdateExpirationForHITRequest */ const se_UpdateExpirationForHITRequest = (input: UpdateExpirationForHITRequest, context: __SerdeContext): any => { - return { - ...(input.ExpireAt != null && { ExpireAt: Math.round(input.ExpireAt.getTime() / 1000) }), - ...(input.HITId != null && { HITId: input.HITId }), - }; + return take(input, { + ExpireAt: (_) => Math.round(_.getTime() / 1000), + HITId: [], + }); }; -/** - * serializeAws_json1_1UpdateHITReviewStatusRequest - */ -const se_UpdateHITReviewStatusRequest = (input: UpdateHITReviewStatusRequest, context: __SerdeContext): any => { - return { - ...(input.HITId != null && { HITId: input.HITId }), - ...(input.Revert != null && { Revert: input.Revert }), - }; -}; +// se_UpdateHITReviewStatusRequest omitted. -/** - * serializeAws_json1_1UpdateHITTypeOfHITRequest - */ -const se_UpdateHITTypeOfHITRequest = (input: UpdateHITTypeOfHITRequest, context: __SerdeContext): any => { - return { - ...(input.HITId != null && { HITId: input.HITId }), - ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }), - }; -}; +// se_UpdateHITTypeOfHITRequest omitted. -/** - * serializeAws_json1_1UpdateNotificationSettingsRequest - */ -const se_UpdateNotificationSettingsRequest = ( - input: UpdateNotificationSettingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Active != null && { Active: input.Active }), - ...(input.HITTypeId != null && { HITTypeId: input.HITTypeId }), - ...(input.Notification != null && { Notification: se_NotificationSpecification(input.Notification, context) }), - }; -}; +// se_UpdateNotificationSettingsRequest omitted. -/** - * serializeAws_json1_1UpdateQualificationTypeRequest - */ -const se_UpdateQualificationTypeRequest = (input: UpdateQualificationTypeRequest, context: __SerdeContext): any => { - return { - ...(input.AnswerKey != null && { AnswerKey: input.AnswerKey }), - ...(input.AutoGranted != null && { AutoGranted: input.AutoGranted }), - ...(input.AutoGrantedValue != null && { AutoGrantedValue: input.AutoGrantedValue }), - ...(input.Description != null && { Description: input.Description }), - ...(input.QualificationTypeId != null && { QualificationTypeId: input.QualificationTypeId }), - ...(input.QualificationTypeStatus != null && { QualificationTypeStatus: input.QualificationTypeStatus }), - ...(input.RetryDelayInSeconds != null && { RetryDelayInSeconds: input.RetryDelayInSeconds }), - ...(input.Test != null && { Test: input.Test }), - ...(input.TestDurationInSeconds != null && { TestDurationInSeconds: input.TestDurationInSeconds }), - }; -}; +// se_UpdateQualificationTypeRequest omitted. -/** - * deserializeAws_json1_1AcceptQualificationRequestResponse - */ -const de_AcceptQualificationRequestResponse = ( - output: any, - context: __SerdeContext -): AcceptQualificationRequestResponse => { - return {} as any; -}; +// de_AcceptQualificationRequestResponse omitted. -/** - * deserializeAws_json1_1ApproveAssignmentResponse - */ -const de_ApproveAssignmentResponse = (output: any, context: __SerdeContext): ApproveAssignmentResponse => { - return {} as any; -}; +// de_ApproveAssignmentResponse omitted. /** * deserializeAws_json1_1Assignment */ const de_Assignment = (output: any, context: __SerdeContext): Assignment => { - return { - AcceptTime: - output.AcceptTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AcceptTime))) : undefined, - Answer: __expectString(output.Answer), - ApprovalTime: - output.ApprovalTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApprovalTime))) - : undefined, - AssignmentId: __expectString(output.AssignmentId), - AssignmentStatus: __expectString(output.AssignmentStatus), - AutoApprovalTime: - output.AutoApprovalTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AutoApprovalTime))) - : undefined, - Deadline: - output.Deadline != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Deadline))) : undefined, - HITId: __expectString(output.HITId), - RejectionTime: - output.RejectionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RejectionTime))) - : undefined, - RequesterFeedback: __expectString(output.RequesterFeedback), - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - WorkerId: __expectString(output.WorkerId), - } as any; + return take(output, { + AcceptTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Answer: __expectString, + ApprovalTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AssignmentId: __expectString, + AssignmentStatus: __expectString, + AutoApprovalTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Deadline: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HITId: __expectString, + RejectionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RequesterFeedback: __expectString, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkerId: __expectString, + }) as any; }; /** @@ -3454,36 +2793,24 @@ const de_AssignmentList = (output: any, context: __SerdeContext): Assignment[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Assignment(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1AssociateQualificationWithWorkerResponse - */ -const de_AssociateQualificationWithWorkerResponse = ( - output: any, - context: __SerdeContext -): AssociateQualificationWithWorkerResponse => { - return {} as any; -}; +// de_AssociateQualificationWithWorkerResponse omitted. /** * deserializeAws_json1_1BonusPayment */ const de_BonusPayment = (output: any, context: __SerdeContext): BonusPayment => { - return { - AssignmentId: __expectString(output.AssignmentId), - BonusAmount: __expectString(output.BonusAmount), - GrantTime: - output.GrantTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.GrantTime))) : undefined, - Reason: __expectString(output.Reason), - WorkerId: __expectString(output.WorkerId), - } as any; + return take(output, { + AssignmentId: __expectString, + BonusAmount: __expectString, + GrantTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Reason: __expectString, + WorkerId: __expectString, + }) as any; }; /** @@ -3493,190 +2820,120 @@ const de_BonusPaymentList = (output: any, context: __SerdeContext): BonusPayment const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BonusPayment(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CreateAdditionalAssignmentsForHITResponse - */ -const de_CreateAdditionalAssignmentsForHITResponse = ( - output: any, - context: __SerdeContext -): CreateAdditionalAssignmentsForHITResponse => { - return {} as any; -}; +// de_CreateAdditionalAssignmentsForHITResponse omitted. /** * deserializeAws_json1_1CreateHITResponse */ const de_CreateHITResponse = (output: any, context: __SerdeContext): CreateHITResponse => { - return { - HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined, - } as any; + return take(output, { + HIT: (_: any) => de_HIT(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateHITTypeResponse - */ -const de_CreateHITTypeResponse = (output: any, context: __SerdeContext): CreateHITTypeResponse => { - return { - HITTypeId: __expectString(output.HITTypeId), - } as any; -}; +// de_CreateHITTypeResponse omitted. /** * deserializeAws_json1_1CreateHITWithHITTypeResponse */ const de_CreateHITWithHITTypeResponse = (output: any, context: __SerdeContext): CreateHITWithHITTypeResponse => { - return { - HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined, - } as any; + return take(output, { + HIT: (_: any) => de_HIT(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateQualificationTypeResponse */ const de_CreateQualificationTypeResponse = (output: any, context: __SerdeContext): CreateQualificationTypeResponse => { - return { - QualificationType: - output.QualificationType != null ? de_QualificationType(output.QualificationType, context) : undefined, - } as any; + return take(output, { + QualificationType: (_: any) => de_QualificationType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateWorkerBlockResponse - */ -const de_CreateWorkerBlockResponse = (output: any, context: __SerdeContext): CreateWorkerBlockResponse => { - return {} as any; -}; +// de_CreateWorkerBlockResponse omitted. -/** - * deserializeAws_json1_1DeleteHITResponse - */ -const de_DeleteHITResponse = (output: any, context: __SerdeContext): DeleteHITResponse => { - return {} as any; -}; +// de_DeleteHITResponse omitted. -/** - * deserializeAws_json1_1DeleteQualificationTypeResponse - */ -const de_DeleteQualificationTypeResponse = (output: any, context: __SerdeContext): DeleteQualificationTypeResponse => { - return {} as any; -}; +// de_DeleteQualificationTypeResponse omitted. -/** - * deserializeAws_json1_1DeleteWorkerBlockResponse - */ -const de_DeleteWorkerBlockResponse = (output: any, context: __SerdeContext): DeleteWorkerBlockResponse => { - return {} as any; -}; +// de_DeleteWorkerBlockResponse omitted. -/** - * deserializeAws_json1_1DisassociateQualificationFromWorkerResponse - */ -const de_DisassociateQualificationFromWorkerResponse = ( - output: any, - context: __SerdeContext -): DisassociateQualificationFromWorkerResponse => { - return {} as any; -}; +// de_DisassociateQualificationFromWorkerResponse omitted. -/** - * deserializeAws_json1_1GetAccountBalanceResponse - */ -const de_GetAccountBalanceResponse = (output: any, context: __SerdeContext): GetAccountBalanceResponse => { - return { - AvailableBalance: __expectString(output.AvailableBalance), - OnHoldBalance: __expectString(output.OnHoldBalance), - } as any; -}; +// de_GetAccountBalanceResponse omitted. /** * deserializeAws_json1_1GetAssignmentResponse */ const de_GetAssignmentResponse = (output: any, context: __SerdeContext): GetAssignmentResponse => { - return { - Assignment: output.Assignment != null ? de_Assignment(output.Assignment, context) : undefined, - HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined, - } as any; + return take(output, { + Assignment: (_: any) => de_Assignment(_, context), + HIT: (_: any) => de_HIT(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetFileUploadURLResponse - */ -const de_GetFileUploadURLResponse = (output: any, context: __SerdeContext): GetFileUploadURLResponse => { - return { - FileUploadURL: __expectString(output.FileUploadURL), - } as any; -}; +// de_GetFileUploadURLResponse omitted. /** * deserializeAws_json1_1GetHITResponse */ const de_GetHITResponse = (output: any, context: __SerdeContext): GetHITResponse => { - return { - HIT: output.HIT != null ? de_HIT(output.HIT, context) : undefined, - } as any; + return take(output, { + HIT: (_: any) => de_HIT(_, context), + }) as any; }; /** * deserializeAws_json1_1GetQualificationScoreResponse */ const de_GetQualificationScoreResponse = (output: any, context: __SerdeContext): GetQualificationScoreResponse => { - return { - Qualification: output.Qualification != null ? de_Qualification(output.Qualification, context) : undefined, - } as any; + return take(output, { + Qualification: (_: any) => de_Qualification(_, context), + }) as any; }; /** * deserializeAws_json1_1GetQualificationTypeResponse */ const de_GetQualificationTypeResponse = (output: any, context: __SerdeContext): GetQualificationTypeResponse => { - return { - QualificationType: - output.QualificationType != null ? de_QualificationType(output.QualificationType, context) : undefined, - } as any; + return take(output, { + QualificationType: (_: any) => de_QualificationType(_, context), + }) as any; }; /** * deserializeAws_json1_1HIT */ const de_HIT = (output: any, context: __SerdeContext): HIT => { - return { - AssignmentDurationInSeconds: __expectLong(output.AssignmentDurationInSeconds), - AutoApprovalDelayInSeconds: __expectLong(output.AutoApprovalDelayInSeconds), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - Expiration: - output.Expiration != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Expiration))) : undefined, - HITGroupId: __expectString(output.HITGroupId), - HITId: __expectString(output.HITId), - HITLayoutId: __expectString(output.HITLayoutId), - HITReviewStatus: __expectString(output.HITReviewStatus), - HITStatus: __expectString(output.HITStatus), - HITTypeId: __expectString(output.HITTypeId), - Keywords: __expectString(output.Keywords), - MaxAssignments: __expectInt32(output.MaxAssignments), - NumberOfAssignmentsAvailable: __expectInt32(output.NumberOfAssignmentsAvailable), - NumberOfAssignmentsCompleted: __expectInt32(output.NumberOfAssignmentsCompleted), - NumberOfAssignmentsPending: __expectInt32(output.NumberOfAssignmentsPending), - QualificationRequirements: - output.QualificationRequirements != null - ? de_QualificationRequirementList(output.QualificationRequirements, context) - : undefined, - Question: __expectString(output.Question), - RequesterAnnotation: __expectString(output.RequesterAnnotation), - Reward: __expectString(output.Reward), - Title: __expectString(output.Title), - } as any; + return take(output, { + AssignmentDurationInSeconds: __expectLong, + AutoApprovalDelayInSeconds: __expectLong, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Expiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HITGroupId: __expectString, + HITId: __expectString, + HITLayoutId: __expectString, + HITReviewStatus: __expectString, + HITStatus: __expectString, + HITTypeId: __expectString, + Keywords: __expectString, + MaxAssignments: __expectInt32, + NumberOfAssignmentsAvailable: __expectInt32, + NumberOfAssignmentsCompleted: __expectInt32, + NumberOfAssignmentsPending: __expectInt32, + QualificationRequirements: _json, + Question: __expectString, + RequesterAnnotation: __expectString, + Reward: __expectString, + Title: __expectString, + }) as any; }; /** @@ -3686,49 +2943,33 @@ const de_HITList = (output: any, context: __SerdeContext): HIT[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HIT(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1IntegerList - */ -const de_IntegerList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_IntegerList omitted. /** * deserializeAws_json1_1ListAssignmentsForHITResponse */ const de_ListAssignmentsForHITResponse = (output: any, context: __SerdeContext): ListAssignmentsForHITResponse => { - return { - Assignments: output.Assignments != null ? de_AssignmentList(output.Assignments, context) : undefined, - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - } as any; + return take(output, { + Assignments: (_: any) => de_AssignmentList(_, context), + NextToken: __expectString, + NumResults: __expectInt32, + }) as any; }; /** * deserializeAws_json1_1ListBonusPaymentsResponse */ const de_ListBonusPaymentsResponse = (output: any, context: __SerdeContext): ListBonusPaymentsResponse => { - return { - BonusPayments: output.BonusPayments != null ? de_BonusPaymentList(output.BonusPayments, context) : undefined, - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - } as any; + return take(output, { + BonusPayments: (_: any) => de_BonusPaymentList(_, context), + NextToken: __expectString, + NumResults: __expectInt32, + }) as any; }; /** @@ -3738,22 +2979,22 @@ const de_ListHITsForQualificationTypeResponse = ( output: any, context: __SerdeContext ): ListHITsForQualificationTypeResponse => { - return { - HITs: output.HITs != null ? de_HITList(output.HITs, context) : undefined, - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - } as any; + return take(output, { + HITs: (_: any) => de_HITList(_, context), + NextToken: __expectString, + NumResults: __expectInt32, + }) as any; }; /** * deserializeAws_json1_1ListHITsResponse */ const de_ListHITsResponse = (output: any, context: __SerdeContext): ListHITsResponse => { - return { - HITs: output.HITs != null ? de_HITList(output.HITs, context) : undefined, - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - } as any; + return take(output, { + HITs: (_: any) => de_HITList(_, context), + NextToken: __expectString, + NumResults: __expectInt32, + }) as any; }; /** @@ -3763,37 +3004,33 @@ const de_ListQualificationRequestsResponse = ( output: any, context: __SerdeContext ): ListQualificationRequestsResponse => { - return { - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - QualificationRequests: - output.QualificationRequests != null - ? de_QualificationRequestList(output.QualificationRequests, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + NumResults: __expectInt32, + QualificationRequests: (_: any) => de_QualificationRequestList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListQualificationTypesResponse */ const de_ListQualificationTypesResponse = (output: any, context: __SerdeContext): ListQualificationTypesResponse => { - return { - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - QualificationTypes: - output.QualificationTypes != null ? de_QualificationTypeList(output.QualificationTypes, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + NumResults: __expectInt32, + QualificationTypes: (_: any) => de_QualificationTypeList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListReviewableHITsResponse */ const de_ListReviewableHITsResponse = (output: any, context: __SerdeContext): ListReviewableHITsResponse => { - return { - HITs: output.HITs != null ? de_HITList(output.HITs, context) : undefined, - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - } as any; + return take(output, { + HITs: (_: any) => de_HITList(_, context), + NextToken: __expectString, + NumResults: __expectInt32, + }) as any; }; /** @@ -3803,28 +3040,17 @@ const de_ListReviewPolicyResultsForHITResponse = ( output: any, context: __SerdeContext ): ListReviewPolicyResultsForHITResponse => { - return { - AssignmentReviewPolicy: - output.AssignmentReviewPolicy != null ? de_ReviewPolicy(output.AssignmentReviewPolicy, context) : undefined, - AssignmentReviewReport: - output.AssignmentReviewReport != null ? de_ReviewReport(output.AssignmentReviewReport, context) : undefined, - HITId: __expectString(output.HITId), - HITReviewPolicy: output.HITReviewPolicy != null ? de_ReviewPolicy(output.HITReviewPolicy, context) : undefined, - HITReviewReport: output.HITReviewReport != null ? de_ReviewReport(output.HITReviewReport, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + AssignmentReviewPolicy: _json, + AssignmentReviewReport: (_: any) => de_ReviewReport(_, context), + HITId: __expectString, + HITReviewPolicy: _json, + HITReviewReport: (_: any) => de_ReviewReport(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListWorkerBlocksResponse - */ -const de_ListWorkerBlocksResponse = (output: any, context: __SerdeContext): ListWorkerBlocksResponse => { - return { - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - WorkerBlocks: output.WorkerBlocks != null ? de_WorkerBlockList(output.WorkerBlocks, context) : undefined, - } as any; -}; +// de_ListWorkerBlocksResponse omitted. /** * deserializeAws_json1_1ListWorkersWithQualificationTypeResponse @@ -3833,140 +3059,43 @@ const de_ListWorkersWithQualificationTypeResponse = ( output: any, context: __SerdeContext ): ListWorkersWithQualificationTypeResponse => { - return { - NextToken: __expectString(output.NextToken), - NumResults: __expectInt32(output.NumResults), - Qualifications: output.Qualifications != null ? de_QualificationList(output.Qualifications, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + NumResults: __expectInt32, + Qualifications: (_: any) => de_QualificationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Locale - */ -const de_Locale = (output: any, context: __SerdeContext): Locale => { - return { - Country: __expectString(output.Country), - Subdivision: __expectString(output.Subdivision), - } as any; -}; +// de_Locale omitted. -/** - * deserializeAws_json1_1LocaleList - */ -const de_LocaleList = (output: any, context: __SerdeContext): Locale[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Locale(entry, context); - }); - return retVal; -}; +// de_LocaleList omitted. -/** - * deserializeAws_json1_1NotifyWorkersFailureStatus - */ -const de_NotifyWorkersFailureStatus = (output: any, context: __SerdeContext): NotifyWorkersFailureStatus => { - return { - NotifyWorkersFailureCode: __expectString(output.NotifyWorkersFailureCode), - NotifyWorkersFailureMessage: __expectString(output.NotifyWorkersFailureMessage), - WorkerId: __expectString(output.WorkerId), - } as any; -}; +// de_NotifyWorkersFailureStatus omitted. -/** - * deserializeAws_json1_1NotifyWorkersFailureStatusList - */ -const de_NotifyWorkersFailureStatusList = (output: any, context: __SerdeContext): NotifyWorkersFailureStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotifyWorkersFailureStatus(entry, context); - }); - return retVal; -}; +// de_NotifyWorkersFailureStatusList omitted. -/** - * deserializeAws_json1_1NotifyWorkersResponse - */ -const de_NotifyWorkersResponse = (output: any, context: __SerdeContext): NotifyWorkersResponse => { - return { - NotifyWorkersFailureStatuses: - output.NotifyWorkersFailureStatuses != null - ? de_NotifyWorkersFailureStatusList(output.NotifyWorkersFailureStatuses, context) - : undefined, - } as any; -}; +// de_NotifyWorkersResponse omitted. -/** - * deserializeAws_json1_1ParameterMapEntry - */ -const de_ParameterMapEntry = (output: any, context: __SerdeContext): ParameterMapEntry => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_StringList(output.Values, context) : undefined, - } as any; -}; +// de_ParameterMapEntry omitted. -/** - * deserializeAws_json1_1ParameterMapEntryList - */ -const de_ParameterMapEntryList = (output: any, context: __SerdeContext): ParameterMapEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterMapEntry(entry, context); - }); - return retVal; -}; +// de_ParameterMapEntryList omitted. -/** - * deserializeAws_json1_1PolicyParameter - */ -const de_PolicyParameter = (output: any, context: __SerdeContext): PolicyParameter => { - return { - Key: __expectString(output.Key), - MapEntries: output.MapEntries != null ? de_ParameterMapEntryList(output.MapEntries, context) : undefined, - Values: output.Values != null ? de_StringList(output.Values, context) : undefined, - } as any; -}; +// de_PolicyParameter omitted. -/** - * deserializeAws_json1_1PolicyParameterList - */ -const de_PolicyParameterList = (output: any, context: __SerdeContext): PolicyParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyParameter(entry, context); - }); - return retVal; -}; +// de_PolicyParameterList omitted. /** * deserializeAws_json1_1Qualification */ const de_Qualification = (output: any, context: __SerdeContext): Qualification => { - return { - GrantTime: - output.GrantTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.GrantTime))) : undefined, - IntegerValue: __expectInt32(output.IntegerValue), - LocaleValue: output.LocaleValue != null ? de_Locale(output.LocaleValue, context) : undefined, - QualificationTypeId: __expectString(output.QualificationTypeId), - Status: __expectString(output.Status), - WorkerId: __expectString(output.WorkerId), - } as any; + return take(output, { + GrantTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IntegerValue: __expectInt32, + LocaleValue: _json, + QualificationTypeId: __expectString, + Status: __expectString, + WorkerId: __expectString, + }) as any; }; /** @@ -3976,9 +3105,6 @@ const de_QualificationList = (output: any, context: __SerdeContext): Qualificati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Qualification(entry, context); }); return retVal; @@ -3988,15 +3114,14 @@ const de_QualificationList = (output: any, context: __SerdeContext): Qualificati * deserializeAws_json1_1QualificationRequest */ const de_QualificationRequest = (output: any, context: __SerdeContext): QualificationRequest => { - return { - Answer: __expectString(output.Answer), - QualificationRequestId: __expectString(output.QualificationRequestId), - QualificationTypeId: __expectString(output.QualificationTypeId), - SubmitTime: - output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined, - Test: __expectString(output.Test), - WorkerId: __expectString(output.WorkerId), - } as any; + return take(output, { + Answer: __expectString, + QualificationRequestId: __expectString, + QualificationTypeId: __expectString, + SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Test: __expectString, + WorkerId: __expectString, + }) as any; }; /** @@ -4006,65 +3131,34 @@ const de_QualificationRequestList = (output: any, context: __SerdeContext): Qual const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QualificationRequest(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1QualificationRequirement - */ -const de_QualificationRequirement = (output: any, context: __SerdeContext): QualificationRequirement => { - return { - ActionsGuarded: __expectString(output.ActionsGuarded), - Comparator: __expectString(output.Comparator), - IntegerValues: output.IntegerValues != null ? de_IntegerList(output.IntegerValues, context) : undefined, - LocaleValues: output.LocaleValues != null ? de_LocaleList(output.LocaleValues, context) : undefined, - QualificationTypeId: __expectString(output.QualificationTypeId), - RequiredToPreview: __expectBoolean(output.RequiredToPreview), - } as any; -}; +// de_QualificationRequirement omitted. -/** - * deserializeAws_json1_1QualificationRequirementList - */ -const de_QualificationRequirementList = (output: any, context: __SerdeContext): QualificationRequirement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QualificationRequirement(entry, context); - }); - return retVal; -}; +// de_QualificationRequirementList omitted. /** * deserializeAws_json1_1QualificationType */ const de_QualificationType = (output: any, context: __SerdeContext): QualificationType => { - return { - AnswerKey: __expectString(output.AnswerKey), - AutoGranted: __expectBoolean(output.AutoGranted), - AutoGrantedValue: __expectInt32(output.AutoGrantedValue), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - IsRequestable: __expectBoolean(output.IsRequestable), - Keywords: __expectString(output.Keywords), - Name: __expectString(output.Name), - QualificationTypeId: __expectString(output.QualificationTypeId), - QualificationTypeStatus: __expectString(output.QualificationTypeStatus), - RetryDelayInSeconds: __expectLong(output.RetryDelayInSeconds), - Test: __expectString(output.Test), - TestDurationInSeconds: __expectLong(output.TestDurationInSeconds), - } as any; + return take(output, { + AnswerKey: __expectString, + AutoGranted: __expectBoolean, + AutoGrantedValue: __expectInt32, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + IsRequestable: __expectBoolean, + Keywords: __expectString, + Name: __expectString, + QualificationTypeId: __expectString, + QualificationTypeStatus: __expectString, + RetryDelayInSeconds: __expectLong, + Test: __expectString, + TestDurationInSeconds: __expectLong, + }) as any; }; /** @@ -4074,58 +3168,31 @@ const de_QualificationTypeList = (output: any, context: __SerdeContext): Qualifi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_QualificationType(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RejectAssignmentResponse - */ -const de_RejectAssignmentResponse = (output: any, context: __SerdeContext): RejectAssignmentResponse => { - return {} as any; -}; +// de_RejectAssignmentResponse omitted. -/** - * deserializeAws_json1_1RejectQualificationRequestResponse - */ -const de_RejectQualificationRequestResponse = ( - output: any, - context: __SerdeContext -): RejectQualificationRequestResponse => { - return {} as any; -}; +// de_RejectQualificationRequestResponse omitted. -/** - * deserializeAws_json1_1RequestError - */ -const de_RequestError = (output: any, context: __SerdeContext): RequestError => { - return { - Message: __expectString(output.Message), - TurkErrorCode: __expectString(output.TurkErrorCode), - } as any; -}; +// de_RequestError omitted. /** * deserializeAws_json1_1ReviewActionDetail */ const de_ReviewActionDetail = (output: any, context: __SerdeContext): ReviewActionDetail => { - return { - ActionId: __expectString(output.ActionId), - ActionName: __expectString(output.ActionName), - CompleteTime: - output.CompleteTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompleteTime))) - : undefined, - ErrorCode: __expectString(output.ErrorCode), - Result: __expectString(output.Result), - Status: __expectString(output.Status), - TargetId: __expectString(output.TargetId), - TargetType: __expectString(output.TargetType), - } as any; + return take(output, { + ActionId: __expectString, + ActionName: __expectString, + CompleteTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorCode: __expectString, + Result: __expectString, + Status: __expectString, + TargetId: __expectString, + TargetType: __expectString, + }) as any; }; /** @@ -4135,170 +3202,55 @@ const de_ReviewActionDetailList = (output: any, context: __SerdeContext): Review const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReviewActionDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReviewPolicy - */ -const de_ReviewPolicy = (output: any, context: __SerdeContext): ReviewPolicy => { - return { - Parameters: output.Parameters != null ? de_PolicyParameterList(output.Parameters, context) : undefined, - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// de_ReviewPolicy omitted. /** * deserializeAws_json1_1ReviewReport */ const de_ReviewReport = (output: any, context: __SerdeContext): ReviewReport => { - return { - ReviewActions: output.ReviewActions != null ? de_ReviewActionDetailList(output.ReviewActions, context) : undefined, - ReviewResults: output.ReviewResults != null ? de_ReviewResultDetailList(output.ReviewResults, context) : undefined, - } as any; + return take(output, { + ReviewActions: (_: any) => de_ReviewActionDetailList(_, context), + ReviewResults: _json, + }) as any; }; -/** - * deserializeAws_json1_1ReviewResultDetail - */ -const de_ReviewResultDetail = (output: any, context: __SerdeContext): ReviewResultDetail => { - return { - ActionId: __expectString(output.ActionId), - Key: __expectString(output.Key), - QuestionId: __expectString(output.QuestionId), - SubjectId: __expectString(output.SubjectId), - SubjectType: __expectString(output.SubjectType), - Value: __expectString(output.Value), - } as any; -}; +// de_ReviewResultDetail omitted. -/** - * deserializeAws_json1_1ReviewResultDetailList - */ -const de_ReviewResultDetailList = (output: any, context: __SerdeContext): ReviewResultDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReviewResultDetail(entry, context); - }); - return retVal; -}; +// de_ReviewResultDetailList omitted. -/** - * deserializeAws_json1_1SendBonusResponse - */ -const de_SendBonusResponse = (output: any, context: __SerdeContext): SendBonusResponse => { - return {} as any; -}; +// de_SendBonusResponse omitted. -/** - * deserializeAws_json1_1SendTestEventNotificationResponse - */ -const de_SendTestEventNotificationResponse = ( - output: any, - context: __SerdeContext -): SendTestEventNotificationResponse => { - return {} as any; -}; +// de_SendTestEventNotificationResponse omitted. -/** - * deserializeAws_json1_1ServiceFault - */ -const de_ServiceFault = (output: any, context: __SerdeContext): ServiceFault => { - return { - Message: __expectString(output.Message), - TurkErrorCode: __expectString(output.TurkErrorCode), - } as any; -}; +// de_ServiceFault omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1UpdateExpirationForHITResponse - */ -const de_UpdateExpirationForHITResponse = (output: any, context: __SerdeContext): UpdateExpirationForHITResponse => { - return {} as any; -}; +// de_UpdateExpirationForHITResponse omitted. -/** - * deserializeAws_json1_1UpdateHITReviewStatusResponse - */ -const de_UpdateHITReviewStatusResponse = (output: any, context: __SerdeContext): UpdateHITReviewStatusResponse => { - return {} as any; -}; +// de_UpdateHITReviewStatusResponse omitted. -/** - * deserializeAws_json1_1UpdateHITTypeOfHITResponse - */ -const de_UpdateHITTypeOfHITResponse = (output: any, context: __SerdeContext): UpdateHITTypeOfHITResponse => { - return {} as any; -}; +// de_UpdateHITTypeOfHITResponse omitted. -/** - * deserializeAws_json1_1UpdateNotificationSettingsResponse - */ -const de_UpdateNotificationSettingsResponse = ( - output: any, - context: __SerdeContext -): UpdateNotificationSettingsResponse => { - return {} as any; -}; +// de_UpdateNotificationSettingsResponse omitted. /** * deserializeAws_json1_1UpdateQualificationTypeResponse */ const de_UpdateQualificationTypeResponse = (output: any, context: __SerdeContext): UpdateQualificationTypeResponse => { - return { - QualificationType: - output.QualificationType != null ? de_QualificationType(output.QualificationType, context) : undefined, - } as any; + return take(output, { + QualificationType: (_: any) => de_QualificationType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1WorkerBlock - */ -const de_WorkerBlock = (output: any, context: __SerdeContext): WorkerBlock => { - return { - Reason: __expectString(output.Reason), - WorkerId: __expectString(output.WorkerId), - } as any; -}; +// de_WorkerBlock omitted. -/** - * deserializeAws_json1_1WorkerBlockList - */ -const de_WorkerBlockList = (output: any, context: __SerdeContext): WorkerBlock[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkerBlock(entry, context); - }); - return retVal; -}; +// de_WorkerBlockList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4320,6 +3272,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-mwaa/src/protocols/Aws_restJson1.ts b/clients/client-mwaa/src/protocols/Aws_restJson1.ts index 2460deca6887..41b478b1c57e 100644 --- a/clients/client-mwaa/src/protocols/Aws_restJson1.ts +++ b/clients/client-mwaa/src/protocols/Aws_restJson1.ts @@ -5,19 +5,20 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -48,15 +49,12 @@ import { Environment, InternalServerException, LastUpdate, - LoggingConfiguration, LoggingConfigurationInput, MetricDatum, - ModuleLoggingConfiguration, ModuleLoggingConfigurationInput, NetworkConfiguration, ResourceNotFoundException, StatisticSet, - UpdateError, UpdateNetworkConfigurationInput, ValidationException, } from "../models/models_0"; @@ -106,41 +104,31 @@ export const se_CreateEnvironmentCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.AirflowConfigurationOptions != null && { - AirflowConfigurationOptions: se_AirflowConfigurationOptions(input.AirflowConfigurationOptions, context), - }), - ...(input.AirflowVersion != null && { AirflowVersion: input.AirflowVersion }), - ...(input.DagS3Path != null && { DagS3Path: input.DagS3Path }), - ...(input.EnvironmentClass != null && { EnvironmentClass: input.EnvironmentClass }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfigurationInput(input.LoggingConfiguration, context), - }), - ...(input.MaxWorkers != null && { MaxWorkers: input.MaxWorkers }), - ...(input.MinWorkers != null && { MinWorkers: input.MinWorkers }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.PluginsS3ObjectVersion != null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion }), - ...(input.PluginsS3Path != null && { PluginsS3Path: input.PluginsS3Path }), - ...(input.RequirementsS3ObjectVersion != null && { - RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion, - }), - ...(input.RequirementsS3Path != null && { RequirementsS3Path: input.RequirementsS3Path }), - ...(input.Schedulers != null && { Schedulers: input.Schedulers }), - ...(input.SourceBucketArn != null && { SourceBucketArn: input.SourceBucketArn }), - ...(input.StartupScriptS3ObjectVersion != null && { - StartupScriptS3ObjectVersion: input.StartupScriptS3ObjectVersion, - }), - ...(input.StartupScriptS3Path != null && { StartupScriptS3Path: input.StartupScriptS3Path }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.WebserverAccessMode != null && { WebserverAccessMode: input.WebserverAccessMode }), - ...(input.WeeklyMaintenanceWindowStart != null && { - WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart, - }), - }); + body = JSON.stringify( + take(input, { + AirflowConfigurationOptions: (_) => _json(_), + AirflowVersion: [], + DagS3Path: [], + EnvironmentClass: [], + ExecutionRoleArn: [], + KmsKey: [], + LoggingConfiguration: (_) => _json(_), + MaxWorkers: [], + MinWorkers: [], + NetworkConfiguration: (_) => _json(_), + PluginsS3ObjectVersion: [], + PluginsS3Path: [], + RequirementsS3ObjectVersion: [], + RequirementsS3Path: [], + Schedulers: [], + SourceBucketArn: [], + StartupScriptS3ObjectVersion: [], + StartupScriptS3Path: [], + Tags: (_) => _json(_), + WebserverAccessMode: [], + WeeklyMaintenanceWindowStart: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -335,9 +323,11 @@ export const se_PublishMetricsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MetricData != null && { MetricData: se_MetricData(input.MetricData, context) }), - }); + body = JSON.stringify( + take(input, { + MetricData: (_) => se_MetricData(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "ops." + resolvedHostname; @@ -370,9 +360,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -442,39 +434,29 @@ export const se_UpdateEnvironmentCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.AirflowConfigurationOptions != null && { - AirflowConfigurationOptions: se_AirflowConfigurationOptions(input.AirflowConfigurationOptions, context), - }), - ...(input.AirflowVersion != null && { AirflowVersion: input.AirflowVersion }), - ...(input.DagS3Path != null && { DagS3Path: input.DagS3Path }), - ...(input.EnvironmentClass != null && { EnvironmentClass: input.EnvironmentClass }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfigurationInput(input.LoggingConfiguration, context), - }), - ...(input.MaxWorkers != null && { MaxWorkers: input.MaxWorkers }), - ...(input.MinWorkers != null && { MinWorkers: input.MinWorkers }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_UpdateNetworkConfigurationInput(input.NetworkConfiguration, context), - }), - ...(input.PluginsS3ObjectVersion != null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion }), - ...(input.PluginsS3Path != null && { PluginsS3Path: input.PluginsS3Path }), - ...(input.RequirementsS3ObjectVersion != null && { - RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion, - }), - ...(input.RequirementsS3Path != null && { RequirementsS3Path: input.RequirementsS3Path }), - ...(input.Schedulers != null && { Schedulers: input.Schedulers }), - ...(input.SourceBucketArn != null && { SourceBucketArn: input.SourceBucketArn }), - ...(input.StartupScriptS3ObjectVersion != null && { - StartupScriptS3ObjectVersion: input.StartupScriptS3ObjectVersion, - }), - ...(input.StartupScriptS3Path != null && { StartupScriptS3Path: input.StartupScriptS3Path }), - ...(input.WebserverAccessMode != null && { WebserverAccessMode: input.WebserverAccessMode }), - ...(input.WeeklyMaintenanceWindowStart != null && { - WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart, - }), - }); + body = JSON.stringify( + take(input, { + AirflowConfigurationOptions: (_) => _json(_), + AirflowVersion: [], + DagS3Path: [], + EnvironmentClass: [], + ExecutionRoleArn: [], + LoggingConfiguration: (_) => _json(_), + MaxWorkers: [], + MinWorkers: [], + NetworkConfiguration: (_) => _json(_), + PluginsS3ObjectVersion: [], + PluginsS3Path: [], + RequirementsS3ObjectVersion: [], + RequirementsS3Path: [], + Schedulers: [], + SourceBucketArn: [], + StartupScriptS3ObjectVersion: [], + StartupScriptS3Path: [], + WebserverAccessMode: [], + WeeklyMaintenanceWindowStart: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "api." + resolvedHostname; @@ -507,12 +489,11 @@ export const de_CreateCliTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CliToken != null) { - contents.CliToken = __expectString(data.CliToken); - } - if (data.WebServerHostname != null) { - contents.WebServerHostname = __expectString(data.WebServerHostname); - } + const doc = take(data, { + CliToken: __expectString, + WebServerHostname: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -534,10 +515,9 @@ const de_CreateCliTokenCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -557,9 +537,10 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -584,10 +565,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -607,12 +587,11 @@ export const de_CreateWebLoginTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.WebServerHostname != null) { - contents.WebServerHostname = __expectString(data.WebServerHostname); - } - if (data.WebToken != null) { - contents.WebToken = __expectString(data.WebToken); - } + const doc = take(data, { + WebServerHostname: __expectString, + WebToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -643,10 +622,9 @@ const de_CreateWebLoginTokenCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -693,10 +671,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -716,9 +693,10 @@ export const de_GetEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Environment != null) { - contents.Environment = de_Environment(data.Environment, context); - } + const doc = take(data, { + Environment: (_) => de_Environment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -746,10 +724,9 @@ const de_GetEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -769,12 +746,11 @@ export const de_ListEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Environments != null) { - contents.Environments = de_EnvironmentList(data.Environments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Environments: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -799,10 +775,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -822,9 +797,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -852,10 +828,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -899,10 +874,9 @@ const de_PublishMetricsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -949,10 +923,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -999,10 +972,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1022,9 +994,10 @@ export const de_UpdateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } + const doc = take(data, { + Arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1052,16 +1025,15 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1071,9 +1043,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1090,9 +1063,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1109,9 +1083,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1125,9 +1100,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1135,58 +1111,13 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AirflowConfigurationOptions - */ -const se_AirflowConfigurationOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AirflowConfigurationOptions omitted. -/** - * serializeAws_restJson1Dimension - */ -const se_Dimension = (input: Dimension, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Dimension omitted. -/** - * serializeAws_restJson1Dimensions - */ -const se_Dimensions = (input: Dimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Dimension(entry, context); - }); -}; +// se_Dimensions omitted. -/** - * serializeAws_restJson1LoggingConfigurationInput - */ -const se_LoggingConfigurationInput = (input: LoggingConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.DagProcessingLogs != null && { - DagProcessingLogs: se_ModuleLoggingConfigurationInput(input.DagProcessingLogs, context), - }), - ...(input.SchedulerLogs != null && { - SchedulerLogs: se_ModuleLoggingConfigurationInput(input.SchedulerLogs, context), - }), - ...(input.TaskLogs != null && { TaskLogs: se_ModuleLoggingConfigurationInput(input.TaskLogs, context) }), - ...(input.WebserverLogs != null && { - WebserverLogs: se_ModuleLoggingConfigurationInput(input.WebserverLogs, context), - }), - ...(input.WorkerLogs != null && { WorkerLogs: se_ModuleLoggingConfigurationInput(input.WorkerLogs, context) }), - }; -}; +// se_LoggingConfigurationInput omitted. /** * serializeAws_restJson1MetricData @@ -1203,265 +1134,105 @@ const se_MetricData = (input: MetricDatum[], context: __SerdeContext): any => { * serializeAws_restJson1MetricDatum */ const se_MetricDatum = (input: MetricDatum, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_Dimensions(input.Dimensions, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.StatisticValues != null && { StatisticValues: se_StatisticSet(input.StatisticValues, context) }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + Dimensions: _json, + MetricName: [], + StatisticValues: (_) => se_StatisticSet(_, context), + Timestamp: (_) => Math.round(_.getTime() / 1000), + Unit: [], + Value: __serializeFloat, + }); }; -/** - * serializeAws_restJson1ModuleLoggingConfigurationInput - */ -const se_ModuleLoggingConfigurationInput = (input: ModuleLoggingConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.LogLevel != null && { LogLevel: input.LogLevel }), - }; -}; +// se_ModuleLoggingConfigurationInput omitted. -/** - * serializeAws_restJson1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetList(input.SubnetIds, context) }), - }; -}; +// se_NetworkConfiguration omitted. -/** - * serializeAws_restJson1SecurityGroupList - */ -const se_SecurityGroupList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupList omitted. /** * serializeAws_restJson1StatisticSet */ const se_StatisticSet = (input: StatisticSet, context: __SerdeContext): any => { - return { - ...(input.Maximum != null && { Maximum: __serializeFloat(input.Maximum) }), - ...(input.Minimum != null && { Minimum: __serializeFloat(input.Minimum) }), - ...(input.SampleCount != null && { SampleCount: input.SampleCount }), - ...(input.Sum != null && { Sum: __serializeFloat(input.Sum) }), - }; + return take(input, { + Maximum: __serializeFloat, + Minimum: __serializeFloat, + SampleCount: [], + Sum: __serializeFloat, + }); }; -/** - * serializeAws_restJson1SubnetList - */ -const se_SubnetList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1UpdateNetworkConfigurationInput - */ -const se_UpdateNetworkConfigurationInput = (input: UpdateNetworkConfigurationInput, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupList(input.SecurityGroupIds, context) }), - }; -}; +// se_UpdateNetworkConfigurationInput omitted. -/** - * deserializeAws_restJson1AirflowConfigurationOptions - */ -const de_AirflowConfigurationOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AirflowConfigurationOptions omitted. /** * deserializeAws_restJson1Environment */ const de_Environment = (output: any, context: __SerdeContext): Environment => { - return { - AirflowConfigurationOptions: - output.AirflowConfigurationOptions != null - ? de_AirflowConfigurationOptions(output.AirflowConfigurationOptions, context) - : undefined, - AirflowVersion: __expectString(output.AirflowVersion), - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DagS3Path: __expectString(output.DagS3Path), - EnvironmentClass: __expectString(output.EnvironmentClass), - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - KmsKey: __expectString(output.KmsKey), - LastUpdate: output.LastUpdate != null ? de_LastUpdate(output.LastUpdate, context) : undefined, - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - MaxWorkers: __expectInt32(output.MaxWorkers), - MinWorkers: __expectInt32(output.MinWorkers), - Name: __expectString(output.Name), - NetworkConfiguration: - output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined, - PluginsS3ObjectVersion: __expectString(output.PluginsS3ObjectVersion), - PluginsS3Path: __expectString(output.PluginsS3Path), - RequirementsS3ObjectVersion: __expectString(output.RequirementsS3ObjectVersion), - RequirementsS3Path: __expectString(output.RequirementsS3Path), - Schedulers: __expectInt32(output.Schedulers), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - SourceBucketArn: __expectString(output.SourceBucketArn), - StartupScriptS3ObjectVersion: __expectString(output.StartupScriptS3ObjectVersion), - StartupScriptS3Path: __expectString(output.StartupScriptS3Path), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - WebserverAccessMode: __expectString(output.WebserverAccessMode), - WebserverUrl: __expectString(output.WebserverUrl), - WeeklyMaintenanceWindowStart: __expectString(output.WeeklyMaintenanceWindowStart), - } as any; -}; - -/** - * deserializeAws_restJson1EnvironmentList - */ -const de_EnvironmentList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + AirflowConfigurationOptions: _json, + AirflowVersion: __expectString, + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DagS3Path: __expectString, + EnvironmentClass: __expectString, + ExecutionRoleArn: __expectString, + KmsKey: __expectString, + LastUpdate: (_: any) => de_LastUpdate(_, context), + LoggingConfiguration: _json, + MaxWorkers: __expectInt32, + MinWorkers: __expectInt32, + Name: __expectString, + NetworkConfiguration: _json, + PluginsS3ObjectVersion: __expectString, + PluginsS3Path: __expectString, + RequirementsS3ObjectVersion: __expectString, + RequirementsS3Path: __expectString, + Schedulers: __expectInt32, + ServiceRoleArn: __expectString, + SourceBucketArn: __expectString, + StartupScriptS3ObjectVersion: __expectString, + StartupScriptS3Path: __expectString, + Status: __expectString, + Tags: _json, + WebserverAccessMode: __expectString, + WebserverUrl: __expectString, + WeeklyMaintenanceWindowStart: __expectString, + }) as any; +}; + +// de_EnvironmentList omitted. /** * deserializeAws_restJson1LastUpdate */ const de_LastUpdate = (output: any, context: __SerdeContext): LastUpdate => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Error: output.Error != null ? de_UpdateError(output.Error, context) : undefined, - Source: __expectString(output.Source), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Error: _json, + Source: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - DagProcessingLogs: - output.DagProcessingLogs != null ? de_ModuleLoggingConfiguration(output.DagProcessingLogs, context) : undefined, - SchedulerLogs: - output.SchedulerLogs != null ? de_ModuleLoggingConfiguration(output.SchedulerLogs, context) : undefined, - TaskLogs: output.TaskLogs != null ? de_ModuleLoggingConfiguration(output.TaskLogs, context) : undefined, - WebserverLogs: - output.WebserverLogs != null ? de_ModuleLoggingConfiguration(output.WebserverLogs, context) : undefined, - WorkerLogs: output.WorkerLogs != null ? de_ModuleLoggingConfiguration(output.WorkerLogs, context) : undefined, - } as any; -}; +// de_LoggingConfiguration omitted. -/** - * deserializeAws_restJson1ModuleLoggingConfiguration - */ -const de_ModuleLoggingConfiguration = (output: any, context: __SerdeContext): ModuleLoggingConfiguration => { - return { - CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn), - Enabled: __expectBoolean(output.Enabled), - LogLevel: __expectString(output.LogLevel), - } as any; -}; +// de_ModuleLoggingConfiguration omitted. -/** - * deserializeAws_restJson1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetList(output.SubnetIds, context) : undefined, - } as any; -}; +// de_NetworkConfiguration omitted. -/** - * deserializeAws_restJson1SecurityGroupList - */ -const de_SecurityGroupList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupList omitted. -/** - * deserializeAws_restJson1SubnetList - */ -const de_SubnetList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1UpdateError - */ -const de_UpdateError = (output: any, context: __SerdeContext): UpdateError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; +// de_UpdateError omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-neptune/src/protocols/Aws_query.ts b/clients/client-neptune/src/protocols/Aws_query.ts index 4116ec1a162a..2b8946cecc9c 100644 --- a/clients/client-neptune/src/protocols/Aws_query.ts +++ b/clients/client-neptune/src/protocols/Aws_query.ts @@ -12,7 +12,7 @@ import { serializeFloat as __serializeFloat, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1690,7 +1690,7 @@ export const de_AddRoleToDBClusterCommand = async ( const response: AddRoleToDBClusterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1720,10 +1720,9 @@ const de_AddRoleToDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1746,7 +1745,7 @@ export const de_AddSourceIdentifierToSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1770,10 +1769,9 @@ const de_AddSourceIdentifierToSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,7 +1791,7 @@ export const de_AddTagsToResourceCommand = async ( const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1820,10 +1818,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1846,7 +1843,7 @@ export const de_ApplyPendingMaintenanceActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1867,10 +1864,9 @@ const de_ApplyPendingMaintenanceActionCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1893,7 +1889,7 @@ export const de_CopyDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1920,10 +1916,9 @@ const de_CopyDBClusterParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1946,7 +1941,7 @@ export const de_CopyDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1982,10 +1977,9 @@ const de_CopyDBClusterSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2008,7 +2002,7 @@ export const de_CopyDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2035,10 +2029,9 @@ const de_CopyDBParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2061,7 +2054,7 @@ export const de_CreateDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2130,10 +2123,9 @@ const de_CreateDBClusterCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2156,7 +2148,7 @@ export const de_CreateDBClusterEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2192,10 +2184,9 @@ const de_CreateDBClusterEndpointCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2218,7 +2209,7 @@ export const de_CreateDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2242,10 +2233,9 @@ const de_CreateDBClusterParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2268,7 +2258,7 @@ export const de_CreateDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2301,10 +2291,9 @@ const de_CreateDBClusterSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2327,7 +2316,7 @@ export const de_CreateDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2399,10 +2388,9 @@ const de_CreateDBInstanceCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2425,7 +2413,7 @@ export const de_CreateDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2449,10 +2437,9 @@ const de_CreateDBParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2475,7 +2462,7 @@ export const de_CreateDBSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2508,10 +2495,9 @@ const de_CreateDBSubnetGroupCommandError = async ( throw await de_InvalidSubnetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2534,7 +2520,7 @@ export const de_CreateEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2573,10 +2559,9 @@ const de_CreateEventSubscriptionCommandError = async ( throw await de_SubscriptionCategoryNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2599,7 +2584,7 @@ export const de_CreateGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2629,10 +2614,9 @@ const de_CreateGlobalClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2655,7 +2639,7 @@ export const de_DeleteDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2688,10 +2672,9 @@ const de_DeleteDBClusterCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2714,7 +2697,7 @@ export const de_DeleteDBClusterEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2741,10 +2724,9 @@ const de_DeleteDBClusterEndpointCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2764,7 +2746,7 @@ export const de_DeleteDBClusterParameterGroupCommand = async ( const response: DeleteDBClusterParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2788,10 +2770,9 @@ const de_DeleteDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2814,7 +2795,7 @@ export const de_DeleteDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2838,10 +2819,9 @@ const de_DeleteDBClusterSnapshotCommandError = async ( throw await de_InvalidDBClusterSnapshotStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2864,7 +2844,7 @@ export const de_DeleteDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2897,10 +2877,9 @@ const de_DeleteDBInstanceCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2920,7 +2899,7 @@ export const de_DeleteDBParameterGroupCommand = async ( const response: DeleteDBParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2944,10 +2923,9 @@ const de_DeleteDBParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2967,7 +2945,7 @@ export const de_DeleteDBSubnetGroupCommand = async ( const response: DeleteDBSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2994,10 +2972,9 @@ const de_DeleteDBSubnetGroupCommandError = async ( throw await de_InvalidDBSubnetStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3020,7 +2997,7 @@ export const de_DeleteEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3044,10 +3021,9 @@ const de_DeleteEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3070,7 +3046,7 @@ export const de_DeleteGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3094,10 +3070,9 @@ const de_DeleteGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3120,7 +3095,7 @@ export const de_DescribeDBClusterEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3141,10 +3116,9 @@ const de_DescribeDBClusterEndpointsCommandError = async ( throw await de_DBClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3167,7 +3141,7 @@ export const de_DescribeDBClusterParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3188,10 +3162,9 @@ const de_DescribeDBClusterParameterGroupsCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3214,7 +3187,7 @@ export const de_DescribeDBClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3235,10 +3208,9 @@ const de_DescribeDBClusterParametersCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3261,7 +3233,7 @@ export const de_DescribeDBClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3282,10 +3254,9 @@ const de_DescribeDBClustersCommandError = async ( throw await de_DBClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3308,7 +3279,7 @@ export const de_DescribeDBClusterSnapshotAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3329,10 +3300,9 @@ const de_DescribeDBClusterSnapshotAttributesCommandError = async ( throw await de_DBClusterSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3355,7 +3325,7 @@ export const de_DescribeDBClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3376,10 +3346,9 @@ const de_DescribeDBClusterSnapshotsCommandError = async ( throw await de_DBClusterSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3402,7 +3371,7 @@ export const de_DescribeDBEngineVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3418,10 +3387,9 @@ const de_DescribeDBEngineVersionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3443,7 +3411,7 @@ export const de_DescribeDBInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3464,10 +3432,9 @@ const de_DescribeDBInstancesCommandError = async ( throw await de_DBInstanceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3490,7 +3457,7 @@ export const de_DescribeDBParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3511,10 +3478,9 @@ const de_DescribeDBParameterGroupsCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3537,7 +3503,7 @@ export const de_DescribeDBParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3558,10 +3524,9 @@ const de_DescribeDBParametersCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3584,7 +3549,7 @@ export const de_DescribeDBSubnetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3605,10 +3570,9 @@ const de_DescribeDBSubnetGroupsCommandError = async ( throw await de_DBSubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3634,7 +3598,7 @@ export const de_DescribeEngineDefaultClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3650,10 +3614,9 @@ const de_DescribeEngineDefaultClusterParametersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3675,7 +3638,7 @@ export const de_DescribeEngineDefaultParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3691,10 +3654,9 @@ const de_DescribeEngineDefaultParametersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3716,7 +3678,7 @@ export const de_DescribeEventCategoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3732,10 +3694,9 @@ const de_DescribeEventCategoriesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3757,7 +3718,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3773,10 +3734,9 @@ const de_DescribeEventsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3798,7 +3758,7 @@ export const de_DescribeEventSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3819,10 +3779,9 @@ const de_DescribeEventSubscriptionsCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3845,7 +3804,7 @@ export const de_DescribeGlobalClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3866,10 +3825,9 @@ const de_DescribeGlobalClustersCommandError = async ( throw await de_GlobalClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3892,7 +3850,7 @@ export const de_DescribeOrderableDBInstanceOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3908,10 +3866,9 @@ const de_DescribeOrderableDBInstanceOptionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3933,7 +3890,7 @@ export const de_DescribePendingMaintenanceActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3954,10 +3911,9 @@ const de_DescribePendingMaintenanceActionsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3980,7 +3936,7 @@ export const de_DescribeValidDBInstanceModificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4004,10 +3960,9 @@ const de_DescribeValidDBInstanceModificationsCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4030,7 +3985,7 @@ export const de_FailoverDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4057,10 +4012,9 @@ const de_FailoverDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4083,7 +4037,7 @@ export const de_FailoverGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4113,10 +4067,9 @@ const de_FailoverGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4139,7 +4092,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4166,10 +4119,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4192,7 +4144,7 @@ export const de_ModifyDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4243,10 +4195,9 @@ const de_ModifyDBClusterCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4269,7 +4220,7 @@ export const de_ModifyDBClusterEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4302,10 +4253,9 @@ const de_ModifyDBClusterEndpointCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4328,7 +4278,7 @@ export const de_ModifyDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4352,10 +4302,9 @@ const de_ModifyDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4378,7 +4327,7 @@ export const de_ModifyDBClusterSnapshotAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4405,10 +4354,9 @@ const de_ModifyDBClusterSnapshotAttributeCommandError = async ( throw await de_SharedSnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4431,7 +4379,7 @@ export const de_ModifyDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4497,10 +4445,9 @@ const de_ModifyDBInstanceCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4523,7 +4470,7 @@ export const de_ModifyDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4547,10 +4494,9 @@ const de_ModifyDBParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4573,7 +4519,7 @@ export const de_ModifyDBSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4606,10 +4552,9 @@ const de_ModifyDBSubnetGroupCommandError = async ( throw await de_SubnetAlreadyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4632,7 +4577,7 @@ export const de_ModifyEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4668,10 +4613,9 @@ const de_ModifyEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4694,7 +4638,7 @@ export const de_ModifyGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4718,10 +4662,9 @@ const de_ModifyGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4744,7 +4687,7 @@ export const de_PromoteReadReplicaDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4768,10 +4711,9 @@ const de_PromoteReadReplicaDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4794,7 +4736,7 @@ export const de_RebootDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4818,10 +4760,9 @@ const de_RebootDBInstanceCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4844,7 +4785,7 @@ export const de_RemoveFromGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4871,10 +4812,9 @@ const de_RemoveFromGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4894,7 +4834,7 @@ export const de_RemoveRoleFromDBClusterCommand = async ( const response: RemoveRoleFromDBClusterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4921,10 +4861,9 @@ const de_RemoveRoleFromDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4950,7 +4889,7 @@ export const de_RemoveSourceIdentifierFromSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4974,10 +4913,9 @@ const de_RemoveSourceIdentifierFromSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4997,7 +4935,7 @@ export const de_RemoveTagsFromResourceCommand = async ( const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5024,10 +4962,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5050,7 +4987,7 @@ export const de_ResetDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5074,10 +5011,9 @@ const de_ResetDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5100,7 +5036,7 @@ export const de_ResetDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5124,10 +5060,9 @@ const de_ResetDBParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5150,7 +5085,7 @@ export const de_RestoreDBClusterFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5216,10 +5151,9 @@ const de_RestoreDBClusterFromSnapshotCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5242,7 +5176,7 @@ export const de_RestoreDBClusterToPointInTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5311,10 +5245,9 @@ const de_RestoreDBClusterToPointInTimeCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5337,7 +5270,7 @@ export const de_StartDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5364,10 +5297,9 @@ const de_StartDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5390,7 +5322,7 @@ export const de_StopDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5417,10 +5349,9 @@ const de_StopDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -12842,6 +12773,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-network-firewall/src/protocols/Aws_json1_0.ts b/clients/client-network-firewall/src/protocols/Aws_json1_0.ts index 17e434454bed..147f7668730b 100644 --- a/clients/client-network-firewall/src/protocols/Aws_json1_0.ts +++ b/clients/client-network-firewall/src/protocols/Aws_json1_0.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -126,16 +127,10 @@ import { ActionDefinition, Address, AssociateFirewallPolicyRequest, - AssociateFirewallPolicyResponse, AssociateSubnetsRequest, - AssociateSubnetsResponse, - Attachment, - CapacityUsageSummary, - CIDRSummary, CreateFirewallPolicyRequest, CreateFirewallPolicyResponse, CreateFirewallRequest, - CreateFirewallResponse, CreateRuleGroupRequest, CreateRuleGroupResponse, CreateTLSInspectionConfigurationRequest, @@ -144,9 +139,7 @@ import { DeleteFirewallPolicyRequest, DeleteFirewallPolicyResponse, DeleteFirewallRequest, - DeleteFirewallResponse, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DeleteRuleGroupRequest, DeleteRuleGroupResponse, DeleteTLSInspectionConfigurationRequest, @@ -154,11 +147,8 @@ import { DescribeFirewallPolicyRequest, DescribeFirewallPolicyResponse, DescribeFirewallRequest, - DescribeFirewallResponse, DescribeLoggingConfigurationRequest, - DescribeLoggingConfigurationResponse, DescribeResourcePolicyRequest, - DescribeResourcePolicyResponse, DescribeRuleGroupMetadataRequest, DescribeRuleGroupMetadataResponse, DescribeRuleGroupRequest, @@ -167,14 +157,9 @@ import { DescribeTLSInspectionConfigurationResponse, Dimension, DisassociateSubnetsRequest, - DisassociateSubnetsResponse, EncryptionConfiguration, - Firewall, - FirewallMetadata, FirewallPolicy, - FirewallPolicyMetadata, FirewallPolicyResponse, - FirewallStatus, Header, InsufficientCapacityException, InternalServerError, @@ -183,35 +168,26 @@ import { InvalidResourcePolicyException, InvalidTokenException, IPSet, - IPSetMetadata, IPSetReference, LimitExceededException, ListFirewallPoliciesRequest, - ListFirewallPoliciesResponse, ListFirewallsRequest, - ListFirewallsResponse, ListRuleGroupsRequest, - ListRuleGroupsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTLSInspectionConfigurationsRequest, - ListTLSInspectionConfigurationsResponse, LogDestinationConfig, LogDestinationPermissionException, LoggingConfiguration, MatchAttributes, - PerObjectStatus, PortRange, PortSet, PublishMetricAction, PutResourcePolicyRequest, - PutResourcePolicyResponse, ReferenceSets, ResourceNotFoundException, ResourceOwnerCheckException, RuleDefinition, RuleGroup, - RuleGroupMetadata, RuleGroupResponse, RuleOption, RulesSource, @@ -230,37 +206,26 @@ import { StatelessRuleGroupReference, StatelessRulesAndCustomActions, SubnetMapping, - SyncState, Tag, TagResourceRequest, - TagResourceResponse, TargetType, TCPFlag, TCPFlagField, ThrottlingException, - TlsCertificateData, TLSInspectionConfiguration, - TLSInspectionConfigurationMetadata, TLSInspectionConfigurationResponse, UnsupportedOperationException, UntagResourceRequest, - UntagResourceResponse, UpdateFirewallDeleteProtectionRequest, - UpdateFirewallDeleteProtectionResponse, UpdateFirewallDescriptionRequest, - UpdateFirewallDescriptionResponse, UpdateFirewallEncryptionConfigurationRequest, - UpdateFirewallEncryptionConfigurationResponse, UpdateFirewallPolicyChangeProtectionRequest, - UpdateFirewallPolicyChangeProtectionResponse, UpdateFirewallPolicyRequest, UpdateFirewallPolicyResponse, UpdateLoggingConfigurationRequest, - UpdateLoggingConfigurationResponse, UpdateRuleGroupRequest, UpdateRuleGroupResponse, UpdateSubnetChangeProtectionRequest, - UpdateSubnetChangeProtectionResponse, UpdateTLSInspectionConfigurationRequest, UpdateTLSInspectionConfigurationResponse, } from "../models/models_0"; @@ -275,7 +240,7 @@ export const se_AssociateFirewallPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateFirewallPolicy"); let body: any; - body = JSON.stringify(se_AssociateFirewallPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -288,7 +253,7 @@ export const se_AssociateSubnetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateSubnets"); let body: any; - body = JSON.stringify(se_AssociateSubnetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -301,7 +266,7 @@ export const se_CreateFirewallCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFirewall"); let body: any; - body = JSON.stringify(se_CreateFirewallRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -314,7 +279,7 @@ export const se_CreateFirewallPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFirewallPolicy"); let body: any; - body = JSON.stringify(se_CreateFirewallPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -340,7 +305,7 @@ export const se_CreateTLSInspectionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTLSInspectionConfiguration"); let body: any; - body = JSON.stringify(se_CreateTLSInspectionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -353,7 +318,7 @@ export const se_DeleteFirewallCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFirewall"); let body: any; - body = JSON.stringify(se_DeleteFirewallRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -366,7 +331,7 @@ export const se_DeleteFirewallPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFirewallPolicy"); let body: any; - body = JSON.stringify(se_DeleteFirewallPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -379,7 +344,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -392,7 +357,7 @@ export const se_DeleteRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRuleGroup"); let body: any; - body = JSON.stringify(se_DeleteRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +370,7 @@ export const se_DeleteTLSInspectionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTLSInspectionConfiguration"); let body: any; - body = JSON.stringify(se_DeleteTLSInspectionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +383,7 @@ export const se_DescribeFirewallCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFirewall"); let body: any; - body = JSON.stringify(se_DescribeFirewallRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +396,7 @@ export const se_DescribeFirewallPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFirewallPolicy"); let body: any; - body = JSON.stringify(se_DescribeFirewallPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +409,7 @@ export const se_DescribeLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLoggingConfiguration"); let body: any; - body = JSON.stringify(se_DescribeLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +422,7 @@ export const se_DescribeResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeResourcePolicy"); let body: any; - body = JSON.stringify(se_DescribeResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -470,7 +435,7 @@ export const se_DescribeRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRuleGroup"); let body: any; - body = JSON.stringify(se_DescribeRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -483,7 +448,7 @@ export const se_DescribeRuleGroupMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRuleGroupMetadata"); let body: any; - body = JSON.stringify(se_DescribeRuleGroupMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -496,7 +461,7 @@ export const se_DescribeTLSInspectionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTLSInspectionConfiguration"); let body: any; - body = JSON.stringify(se_DescribeTLSInspectionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -509,7 +474,7 @@ export const se_DisassociateSubnetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateSubnets"); let body: any; - body = JSON.stringify(se_DisassociateSubnetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +487,7 @@ export const se_ListFirewallPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallPolicies"); let body: any; - body = JSON.stringify(se_ListFirewallPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -535,7 +500,7 @@ export const se_ListFirewallsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewalls"); let body: any; - body = JSON.stringify(se_ListFirewallsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -548,7 +513,7 @@ export const se_ListRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuleGroups"); let body: any; - body = JSON.stringify(se_ListRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +526,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -574,7 +539,7 @@ export const se_ListTLSInspectionConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTLSInspectionConfigurations"); let body: any; - body = JSON.stringify(se_ListTLSInspectionConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -587,7 +552,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -600,7 +565,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -613,7 +578,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -626,7 +591,7 @@ export const se_UpdateFirewallDeleteProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallDeleteProtection"); let body: any; - body = JSON.stringify(se_UpdateFirewallDeleteProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -639,7 +604,7 @@ export const se_UpdateFirewallDescriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallDescription"); let body: any; - body = JSON.stringify(se_UpdateFirewallDescriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -652,7 +617,7 @@ export const se_UpdateFirewallEncryptionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallEncryptionConfiguration"); let body: any; - body = JSON.stringify(se_UpdateFirewallEncryptionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -665,7 +630,7 @@ export const se_UpdateFirewallPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallPolicy"); let body: any; - body = JSON.stringify(se_UpdateFirewallPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -678,7 +643,7 @@ export const se_UpdateFirewallPolicyChangeProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallPolicyChangeProtection"); let body: any; - body = JSON.stringify(se_UpdateFirewallPolicyChangeProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -691,7 +656,7 @@ export const se_UpdateLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLoggingConfiguration"); let body: any; - body = JSON.stringify(se_UpdateLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -717,7 +682,7 @@ export const se_UpdateSubnetChangeProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSubnetChangeProtection"); let body: any; - body = JSON.stringify(se_UpdateSubnetChangeProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -730,7 +695,7 @@ export const se_UpdateTLSInspectionConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTLSInspectionConfiguration"); let body: any; - body = JSON.stringify(se_UpdateTLSInspectionConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -746,12 +711,12 @@ export const de_AssociateFirewallPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateFirewallPolicyResponse(data, context); + contents = _json(data); const response: AssociateFirewallPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -787,10 +752,9 @@ const de_AssociateFirewallPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -808,12 +772,12 @@ export const de_AssociateSubnetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateSubnetsResponse(data, context); + contents = _json(data); const response: AssociateSubnetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -852,10 +816,9 @@ const de_AssociateSubnetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -873,12 +836,12 @@ export const de_CreateFirewallCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFirewallResponse(data, context); + contents = _json(data); const response: CreateFirewallCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -914,10 +877,9 @@ const de_CreateFirewallCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -940,7 +902,7 @@ export const de_CreateFirewallPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -973,10 +935,9 @@ const de_CreateFirewallPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -999,7 +960,7 @@ export const de_CreateRuleGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1032,10 +993,9 @@ const de_CreateRuleGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1058,7 +1018,7 @@ export const de_CreateTLSInspectionConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1085,10 +1045,9 @@ const de_CreateTLSInspectionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1106,12 +1065,12 @@ export const de_DeleteFirewallCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFirewallResponse(data, context); + contents = _json(data); const response: DeleteFirewallCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1147,10 +1106,9 @@ const de_DeleteFirewallCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1173,7 +1131,7 @@ export const de_DeleteFirewallPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1209,10 +1167,9 @@ const de_DeleteFirewallPolicyCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1230,12 +1187,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1268,10 +1225,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1294,7 +1250,7 @@ export const de_DeleteRuleGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1330,10 +1286,9 @@ const de_DeleteRuleGroupCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1356,7 +1311,7 @@ export const de_DeleteTLSInspectionConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1389,10 +1344,9 @@ const de_DeleteTLSInspectionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1410,12 +1364,12 @@ export const de_DescribeFirewallCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFirewallResponse(data, context); + contents = _json(data); const response: DescribeFirewallCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1445,10 +1399,9 @@ const de_DescribeFirewallCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1471,7 +1424,7 @@ export const de_DescribeFirewallPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1501,10 +1454,9 @@ const de_DescribeFirewallPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1522,12 +1474,12 @@ export const de_DescribeLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLoggingConfigurationResponse(data, context); + contents = _json(data); const response: DescribeLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1557,10 +1509,9 @@ const de_DescribeLoggingConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1578,12 +1529,12 @@ export const de_DescribeResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeResourcePolicyResponse(data, context); + contents = _json(data); const response: DescribeResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1613,10 +1564,9 @@ const de_DescribeResourcePolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1639,7 +1589,7 @@ export const de_DescribeRuleGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1669,10 +1619,9 @@ const de_DescribeRuleGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1695,7 +1644,7 @@ export const de_DescribeRuleGroupMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1725,10 +1674,9 @@ const de_DescribeRuleGroupMetadataCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1751,7 +1699,7 @@ export const de_DescribeTLSInspectionConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1781,10 +1729,9 @@ const de_DescribeTLSInspectionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1802,12 +1749,12 @@ export const de_DisassociateSubnetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateSubnetsResponse(data, context); + contents = _json(data); const response: DisassociateSubnetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1843,10 +1790,9 @@ const de_DisassociateSubnetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1864,12 +1810,12 @@ export const de_ListFirewallPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallPoliciesResponse(data, context); + contents = _json(data); const response: ListFirewallPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1896,10 +1842,9 @@ const de_ListFirewallPoliciesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1917,12 +1862,12 @@ export const de_ListFirewallsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallsResponse(data, context); + contents = _json(data); const response: ListFirewallsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1949,10 +1894,9 @@ const de_ListFirewallsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1970,12 +1914,12 @@ export const de_ListRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRuleGroupsResponse(data, context); + contents = _json(data); const response: ListRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2002,10 +1946,9 @@ const de_ListRuleGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,12 +1966,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2058,10 +2001,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2079,12 +2021,12 @@ export const de_ListTLSInspectionConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTLSInspectionConfigurationsResponse(data, context); + contents = _json(data); const response: ListTLSInspectionConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2111,10 +2053,9 @@ const de_ListTLSInspectionConfigurationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2132,12 +2073,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2170,10 +2111,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2191,12 +2131,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2226,10 +2166,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2247,12 +2186,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2282,10 +2221,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2303,12 +2241,12 @@ export const de_UpdateFirewallDeleteProtectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallDeleteProtectionResponse(data, context); + contents = _json(data); const response: UpdateFirewallDeleteProtectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2344,10 +2282,9 @@ const de_UpdateFirewallDeleteProtectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2365,12 +2302,12 @@ export const de_UpdateFirewallDescriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallDescriptionResponse(data, context); + contents = _json(data); const response: UpdateFirewallDescriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2403,10 +2340,9 @@ const de_UpdateFirewallDescriptionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2424,12 +2360,12 @@ export const de_UpdateFirewallEncryptionConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallEncryptionConfigurationResponse(data, context); + contents = _json(data); const response: UpdateFirewallEncryptionConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2465,10 +2401,9 @@ const de_UpdateFirewallEncryptionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2491,7 +2426,7 @@ export const de_UpdateFirewallPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2524,10 +2459,9 @@ const de_UpdateFirewallPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2545,12 +2479,12 @@ export const de_UpdateFirewallPolicyChangeProtectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallPolicyChangeProtectionResponse(data, context); + contents = _json(data); const response: UpdateFirewallPolicyChangeProtectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2586,10 +2520,9 @@ const de_UpdateFirewallPolicyChangeProtectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2607,12 +2540,12 @@ export const de_UpdateLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLoggingConfigurationResponse(data, context); + contents = _json(data); const response: UpdateLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2648,10 +2581,9 @@ const de_UpdateLoggingConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2674,7 +2606,7 @@ export const de_UpdateRuleGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2707,10 +2639,9 @@ const de_UpdateRuleGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2728,12 +2659,12 @@ export const de_UpdateSubnetChangeProtectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSubnetChangeProtectionResponse(data, context); + contents = _json(data); const response: UpdateSubnetChangeProtectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2769,10 +2700,9 @@ const de_UpdateSubnetChangeProtectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2795,7 +2725,7 @@ export const de_UpdateTLSInspectionConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2828,10 +2758,9 @@ const de_UpdateTLSInspectionConfigurationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2845,7 +2774,7 @@ const de_InsufficientCapacityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientCapacityException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientCapacityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2858,7 +2787,7 @@ const de_InsufficientCapacityExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2874,7 +2803,7 @@ const de_InvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2890,7 +2819,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2906,7 +2835,7 @@ const de_InvalidResourcePolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourcePolicyException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourcePolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2922,7 +2851,7 @@ const de_InvalidTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2938,7 +2867,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2954,7 +2883,7 @@ const de_LogDestinationPermissionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LogDestinationPermissionException(body, context); + const deserialized: any = _json(body); const exception = new LogDestinationPermissionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2970,7 +2899,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2986,7 +2915,7 @@ const de_ResourceOwnerCheckExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceOwnerCheckException(body, context); + const deserialized: any = _json(body); const exception = new ResourceOwnerCheckException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2999,7 +2928,7 @@ const de_ResourceOwnerCheckExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3015,7 +2944,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3023,2810 +2952,630 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0ActionDefinition - */ -const se_ActionDefinition = (input: ActionDefinition, context: __SerdeContext): any => { - return { - ...(input.PublishMetricAction != null && { - PublishMetricAction: se_PublishMetricAction(input.PublishMetricAction, context), - }), - }; -}; +// se_ActionDefinition omitted. -/** - * serializeAws_json1_0Address - */ -const se_Address = (input: Address, context: __SerdeContext): any => { - return { - ...(input.AddressDefinition != null && { AddressDefinition: input.AddressDefinition }), - }; -}; +// se_Address omitted. -/** - * serializeAws_json1_0Addresses - */ -const se_Addresses = (input: Address[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Address(entry, context); - }); -}; +// se_Addresses omitted. -/** - * serializeAws_json1_0AssociateFirewallPolicyRequest - */ -const se_AssociateFirewallPolicyRequest = (input: AssociateFirewallPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; +// se_AssociateFirewallPolicyRequest omitted. -/** - * serializeAws_json1_0AssociateSubnetsRequest - */ -const se_AssociateSubnetsRequest = (input: AssociateSubnetsRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.SubnetMappings != null && { SubnetMappings: se_SubnetMappings(input.SubnetMappings, context) }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; +// se_AssociateSubnetsRequest omitted. -/** - * serializeAws_json1_0AzSubnets - */ -const se_AzSubnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AzSubnets omitted. -/** - * serializeAws_json1_0CreateFirewallPolicyRequest - */ -const se_CreateFirewallPolicyRequest = (input: CreateFirewallPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.FirewallPolicy != null && { FirewallPolicy: se_FirewallPolicy(input.FirewallPolicy, context) }), - ...(input.FirewallPolicyName != null && { FirewallPolicyName: input.FirewallPolicyName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateFirewallPolicyRequest omitted. -/** - * serializeAws_json1_0CreateFirewallRequest - */ -const se_CreateFirewallRequest = (input: CreateFirewallRequest, context: __SerdeContext): any => { - return { - ...(input.DeleteProtection != null && { DeleteProtection: input.DeleteProtection }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.FirewallPolicyChangeProtection != null && { - FirewallPolicyChangeProtection: input.FirewallPolicyChangeProtection, - }), - ...(input.SubnetChangeProtection != null && { SubnetChangeProtection: input.SubnetChangeProtection }), - ...(input.SubnetMappings != null && { SubnetMappings: se_SubnetMappings(input.SubnetMappings, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_CreateFirewallRequest omitted. /** * serializeAws_json1_0CreateRuleGroupRequest */ const se_CreateRuleGroupRequest = (input: CreateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Capacity != null && { Capacity: input.Capacity }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.RuleGroup != null && { RuleGroup: se_RuleGroup(input.RuleGroup, context) }), - ...(input.RuleGroupName != null && { RuleGroupName: input.RuleGroupName }), - ...(input.Rules != null && { Rules: input.Rules }), - ...(input.SourceMetadata != null && { SourceMetadata: se_SourceMetadata(input.SourceMetadata, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_0CreateTLSInspectionConfigurationRequest - */ -const se_CreateTLSInspectionConfigurationRequest = ( - input: CreateTLSInspectionConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.TLSInspectionConfiguration != null && { - TLSInspectionConfiguration: se_TLSInspectionConfiguration(input.TLSInspectionConfiguration, context), - }), - ...(input.TLSInspectionConfigurationName != null && { - TLSInspectionConfigurationName: input.TLSInspectionConfigurationName, - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_0CustomAction - */ -const se_CustomAction = (input: CustomAction, context: __SerdeContext): any => { - return { - ...(input.ActionDefinition != null && { ActionDefinition: se_ActionDefinition(input.ActionDefinition, context) }), - ...(input.ActionName != null && { ActionName: input.ActionName }), - }; + return take(input, { + Capacity: [], + Description: [], + DryRun: [], + EncryptionConfiguration: _json, + RuleGroup: _json, + RuleGroupName: [], + Rules: [], + SourceMetadata: _json, + Tags: _json, + Type: [], + }); }; -/** - * serializeAws_json1_0CustomActions - */ -const se_CustomActions = (input: CustomAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomAction(entry, context); - }); -}; +// se_CreateTLSInspectionConfigurationRequest omitted. -/** - * serializeAws_json1_0DeleteFirewallPolicyRequest - */ -const se_DeleteFirewallPolicyRequest = (input: DeleteFirewallPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.FirewallPolicyName != null && { FirewallPolicyName: input.FirewallPolicyName }), - }; -}; +// se_CustomAction omitted. -/** - * serializeAws_json1_0DeleteFirewallRequest - */ -const se_DeleteFirewallRequest = (input: DeleteFirewallRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - }; -}; +// se_CustomActions omitted. -/** - * serializeAws_json1_0DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeleteFirewallPolicyRequest omitted. -/** - * serializeAws_json1_0DeleteRuleGroupRequest - */ -const se_DeleteRuleGroupRequest = (input: DeleteRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.RuleGroupArn != null && { RuleGroupArn: input.RuleGroupArn }), - ...(input.RuleGroupName != null && { RuleGroupName: input.RuleGroupName }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DeleteFirewallRequest omitted. -/** - * serializeAws_json1_0DeleteTLSInspectionConfigurationRequest - */ -const se_DeleteTLSInspectionConfigurationRequest = ( - input: DeleteTLSInspectionConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.TLSInspectionConfigurationArn != null && { - TLSInspectionConfigurationArn: input.TLSInspectionConfigurationArn, - }), - ...(input.TLSInspectionConfigurationName != null && { - TLSInspectionConfigurationName: input.TLSInspectionConfigurationName, - }), - }; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * serializeAws_json1_0DescribeFirewallPolicyRequest - */ -const se_DescribeFirewallPolicyRequest = (input: DescribeFirewallPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.FirewallPolicyName != null && { FirewallPolicyName: input.FirewallPolicyName }), - }; -}; +// se_DeleteRuleGroupRequest omitted. -/** - * serializeAws_json1_0DescribeFirewallRequest - */ -const se_DescribeFirewallRequest = (input: DescribeFirewallRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - }; -}; +// se_DeleteTLSInspectionConfigurationRequest omitted. -/** - * serializeAws_json1_0DescribeLoggingConfigurationRequest - */ -const se_DescribeLoggingConfigurationRequest = ( - input: DescribeLoggingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - }; -}; +// se_DescribeFirewallPolicyRequest omitted. -/** - * serializeAws_json1_0DescribeResourcePolicyRequest - */ -const se_DescribeResourcePolicyRequest = (input: DescribeResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DescribeFirewallRequest omitted. -/** - * serializeAws_json1_0DescribeRuleGroupMetadataRequest - */ -const se_DescribeRuleGroupMetadataRequest = (input: DescribeRuleGroupMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.RuleGroupArn != null && { RuleGroupArn: input.RuleGroupArn }), - ...(input.RuleGroupName != null && { RuleGroupName: input.RuleGroupName }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribeLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_0DescribeRuleGroupRequest - */ -const se_DescribeRuleGroupRequest = (input: DescribeRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.RuleGroupArn != null && { RuleGroupArn: input.RuleGroupArn }), - ...(input.RuleGroupName != null && { RuleGroupName: input.RuleGroupName }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribeResourcePolicyRequest omitted. -/** - * serializeAws_json1_0DescribeTLSInspectionConfigurationRequest - */ -const se_DescribeTLSInspectionConfigurationRequest = ( - input: DescribeTLSInspectionConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.TLSInspectionConfigurationArn != null && { - TLSInspectionConfigurationArn: input.TLSInspectionConfigurationArn, - }), - ...(input.TLSInspectionConfigurationName != null && { - TLSInspectionConfigurationName: input.TLSInspectionConfigurationName, - }), - }; -}; +// se_DescribeRuleGroupMetadataRequest omitted. -/** - * serializeAws_json1_0Dimension - */ -const se_Dimension = (input: Dimension, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_DescribeRuleGroupRequest omitted. -/** - * serializeAws_json1_0Dimensions - */ -const se_Dimensions = (input: Dimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Dimension(entry, context); - }); -}; +// se_DescribeTLSInspectionConfigurationRequest omitted. -/** - * serializeAws_json1_0DisassociateSubnetsRequest - */ -const se_DisassociateSubnetsRequest = (input: DisassociateSubnetsRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.SubnetIds != null && { SubnetIds: se_AzSubnets(input.SubnetIds, context) }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; +// se_Dimension omitted. -/** - * serializeAws_json1_0EncryptionConfiguration - */ -const se_EncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Dimensions omitted. -/** - * serializeAws_json1_0FirewallPolicy - */ -const se_FirewallPolicy = (input: FirewallPolicy, context: __SerdeContext): any => { - return { - ...(input.StatefulDefaultActions != null && { - StatefulDefaultActions: se_StatefulActions(input.StatefulDefaultActions, context), - }), - ...(input.StatefulEngineOptions != null && { - StatefulEngineOptions: se_StatefulEngineOptions(input.StatefulEngineOptions, context), - }), - ...(input.StatefulRuleGroupReferences != null && { - StatefulRuleGroupReferences: se_StatefulRuleGroupReferences(input.StatefulRuleGroupReferences, context), - }), - ...(input.StatelessCustomActions != null && { - StatelessCustomActions: se_CustomActions(input.StatelessCustomActions, context), - }), - ...(input.StatelessDefaultActions != null && { - StatelessDefaultActions: se_StatelessActions(input.StatelessDefaultActions, context), - }), - ...(input.StatelessFragmentDefaultActions != null && { - StatelessFragmentDefaultActions: se_StatelessActions(input.StatelessFragmentDefaultActions, context), - }), - ...(input.StatelessRuleGroupReferences != null && { - StatelessRuleGroupReferences: se_StatelessRuleGroupReferences(input.StatelessRuleGroupReferences, context), - }), - ...(input.TLSInspectionConfigurationArn != null && { - TLSInspectionConfigurationArn: input.TLSInspectionConfigurationArn, - }), - }; -}; +// se_DisassociateSubnetsRequest omitted. -/** - * serializeAws_json1_0Flags - */ -const se_Flags = (input: (TCPFlag | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EncryptionConfiguration omitted. -/** - * serializeAws_json1_0Header - */ -const se_Header = (input: Header, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.DestinationPort != null && { DestinationPort: input.DestinationPort }), - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.Source != null && { Source: input.Source }), - ...(input.SourcePort != null && { SourcePort: input.SourcePort }), - }; -}; +// se_FirewallPolicy omitted. -/** - * serializeAws_json1_0IPSet - */ -const se_IPSet = (input: IPSet, context: __SerdeContext): any => { - return { - ...(input.Definition != null && { Definition: se_VariableDefinitionList(input.Definition, context) }), - }; -}; +// se_Flags omitted. -/** - * serializeAws_json1_0IPSetReference - */ -const se_IPSetReference = (input: IPSetReference, context: __SerdeContext): any => { - return { - ...(input.ReferenceArn != null && { ReferenceArn: input.ReferenceArn }), - }; -}; +// se_Header omitted. -/** - * serializeAws_json1_0IPSetReferenceMap - */ -const se_IPSetReferenceMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_IPSetReference(value, context); - return acc; - }, {}); -}; +// se_IPSet omitted. -/** - * serializeAws_json1_0IPSets - */ -const se_IPSets = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_IPSet(value, context); - return acc; - }, {}); -}; +// se_IPSetReference omitted. -/** - * serializeAws_json1_0ListFirewallPoliciesRequest - */ -const se_ListFirewallPoliciesRequest = (input: ListFirewallPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_IPSetReferenceMap omitted. -/** - * serializeAws_json1_0ListFirewallsRequest - */ -const se_ListFirewallsRequest = (input: ListFirewallsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.VpcIds != null && { VpcIds: se_VpcIds(input.VpcIds, context) }), - }; -}; +// se_IPSets omitted. -/** - * serializeAws_json1_0ListRuleGroupsRequest - */ -const se_ListRuleGroupsRequest = (input: ListRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.ManagedType != null && { ManagedType: input.ManagedType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ListFirewallPoliciesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListFirewallsRequest omitted. -/** - * serializeAws_json1_0ListTLSInspectionConfigurationsRequest - */ -const se_ListTLSInspectionConfigurationsRequest = ( - input: ListTLSInspectionConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListRuleGroupsRequest omitted. -/** - * serializeAws_json1_0LogDestinationConfig - */ -const se_LogDestinationConfig = (input: LogDestinationConfig, context: __SerdeContext): any => { - return { - ...(input.LogDestination != null && { LogDestination: se_LogDestinationMap(input.LogDestination, context) }), - ...(input.LogDestinationType != null && { LogDestinationType: input.LogDestinationType }), - ...(input.LogType != null && { LogType: input.LogType }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0LogDestinationConfigs - */ -const se_LogDestinationConfigs = (input: LogDestinationConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LogDestinationConfig(entry, context); - }); -}; +// se_ListTLSInspectionConfigurationsRequest omitted. -/** - * serializeAws_json1_0LogDestinationMap - */ -const se_LogDestinationMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_LogDestinationConfig omitted. -/** - * serializeAws_json1_0LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.LogDestinationConfigs != null && { - LogDestinationConfigs: se_LogDestinationConfigs(input.LogDestinationConfigs, context), - }), - }; -}; +// se_LogDestinationConfigs omitted. -/** - * serializeAws_json1_0MatchAttributes - */ -const se_MatchAttributes = (input: MatchAttributes, context: __SerdeContext): any => { - return { - ...(input.DestinationPorts != null && { DestinationPorts: se_PortRanges(input.DestinationPorts, context) }), - ...(input.Destinations != null && { Destinations: se_Addresses(input.Destinations, context) }), - ...(input.Protocols != null && { Protocols: se_ProtocolNumbers(input.Protocols, context) }), - ...(input.SourcePorts != null && { SourcePorts: se_PortRanges(input.SourcePorts, context) }), - ...(input.Sources != null && { Sources: se_Addresses(input.Sources, context) }), - ...(input.TCPFlags != null && { TCPFlags: se_TCPFlags(input.TCPFlags, context) }), - }; -}; +// se_LogDestinationMap omitted. -/** - * serializeAws_json1_0PortRange - */ -const se_PortRange = (input: PortRange, context: __SerdeContext): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - }; -}; +// se_LoggingConfiguration omitted. -/** - * serializeAws_json1_0PortRanges - */ -const se_PortRanges = (input: PortRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortRange(entry, context); - }); -}; +// se_MatchAttributes omitted. -/** - * serializeAws_json1_0PortSet - */ -const se_PortSet = (input: PortSet, context: __SerdeContext): any => { - return { - ...(input.Definition != null && { Definition: se_VariableDefinitionList(input.Definition, context) }), - }; -}; +// se_PortRange omitted. -/** - * serializeAws_json1_0PortSets - */ -const se_PortSets = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_PortSet(value, context); - return acc; - }, {}); -}; +// se_PortRanges omitted. -/** - * serializeAws_json1_0ProtocolNumbers - */ -const se_ProtocolNumbers = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PortSet omitted. -/** - * serializeAws_json1_0PublishMetricAction - */ -const se_PublishMetricAction = (input: PublishMetricAction, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_Dimensions(input.Dimensions, context) }), - }; -}; +// se_PortSets omitted. -/** - * serializeAws_json1_0PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ProtocolNumbers omitted. -/** - * serializeAws_json1_0ReferenceSets - */ -const se_ReferenceSets = (input: ReferenceSets, context: __SerdeContext): any => { - return { - ...(input.IPSetReferences != null && { IPSetReferences: se_IPSetReferenceMap(input.IPSetReferences, context) }), - }; -}; +// se_PublishMetricAction omitted. -/** - * serializeAws_json1_0RuleDefinition - */ -const se_RuleDefinition = (input: RuleDefinition, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_StatelessActions(input.Actions, context) }), - ...(input.MatchAttributes != null && { MatchAttributes: se_MatchAttributes(input.MatchAttributes, context) }), - }; -}; +// se_PutResourcePolicyRequest omitted. -/** - * serializeAws_json1_0RuleGroup - */ -const se_RuleGroup = (input: RuleGroup, context: __SerdeContext): any => { - return { - ...(input.ReferenceSets != null && { ReferenceSets: se_ReferenceSets(input.ReferenceSets, context) }), - ...(input.RuleVariables != null && { RuleVariables: se_RuleVariables(input.RuleVariables, context) }), - ...(input.RulesSource != null && { RulesSource: se_RulesSource(input.RulesSource, context) }), - ...(input.StatefulRuleOptions != null && { - StatefulRuleOptions: se_StatefulRuleOptions(input.StatefulRuleOptions, context), - }), - }; -}; - -/** - * serializeAws_json1_0RuleOption - */ -const se_RuleOption = (input: RuleOption, context: __SerdeContext): any => { - return { - ...(input.Keyword != null && { Keyword: input.Keyword }), - ...(input.Settings != null && { Settings: se_Settings(input.Settings, context) }), - }; -}; - -/** - * serializeAws_json1_0RuleOptions - */ -const se_RuleOptions = (input: RuleOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleOption(entry, context); - }); -}; - -/** - * serializeAws_json1_0RulesSource - */ -const se_RulesSource = (input: RulesSource, context: __SerdeContext): any => { - return { - ...(input.RulesSourceList != null && { RulesSourceList: se_RulesSourceList(input.RulesSourceList, context) }), - ...(input.RulesString != null && { RulesString: input.RulesString }), - ...(input.StatefulRules != null && { StatefulRules: se_StatefulRules(input.StatefulRules, context) }), - ...(input.StatelessRulesAndCustomActions != null && { - StatelessRulesAndCustomActions: se_StatelessRulesAndCustomActions(input.StatelessRulesAndCustomActions, context), - }), - }; -}; - -/** - * serializeAws_json1_0RulesSourceList - */ -const se_RulesSourceList = (input: RulesSourceList, context: __SerdeContext): any => { - return { - ...(input.GeneratedRulesType != null && { GeneratedRulesType: input.GeneratedRulesType }), - ...(input.TargetTypes != null && { TargetTypes: se_TargetTypes(input.TargetTypes, context) }), - ...(input.Targets != null && { Targets: se_RuleTargets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_0RuleTargets - */ -const se_RuleTargets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0RuleVariables - */ -const se_RuleVariables = (input: RuleVariables, context: __SerdeContext): any => { - return { - ...(input.IPSets != null && { IPSets: se_IPSets(input.IPSets, context) }), - ...(input.PortSets != null && { PortSets: se_PortSets(input.PortSets, context) }), - }; -}; - -/** - * serializeAws_json1_0ServerCertificate - */ -const se_ServerCertificate = (input: ServerCertificate, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_0ServerCertificateConfiguration - */ -const se_ServerCertificateConfiguration = (input: ServerCertificateConfiguration, context: __SerdeContext): any => { - return { - ...(input.Scopes != null && { Scopes: se_ServerCertificateScopes(input.Scopes, context) }), - ...(input.ServerCertificates != null && { - ServerCertificates: se_ServerCertificates(input.ServerCertificates, context), - }), - }; -}; - -/** - * serializeAws_json1_0ServerCertificateConfigurations - */ -const se_ServerCertificateConfigurations = (input: ServerCertificateConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerCertificateConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_0ServerCertificates - */ -const se_ServerCertificates = (input: ServerCertificate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerCertificate(entry, context); - }); -}; - -/** - * serializeAws_json1_0ServerCertificateScope - */ -const se_ServerCertificateScope = (input: ServerCertificateScope, context: __SerdeContext): any => { - return { - ...(input.DestinationPorts != null && { DestinationPorts: se_PortRanges(input.DestinationPorts, context) }), - ...(input.Destinations != null && { Destinations: se_Addresses(input.Destinations, context) }), - ...(input.Protocols != null && { Protocols: se_ProtocolNumbers(input.Protocols, context) }), - ...(input.SourcePorts != null && { SourcePorts: se_PortRanges(input.SourcePorts, context) }), - ...(input.Sources != null && { Sources: se_Addresses(input.Sources, context) }), - }; -}; - -/** - * serializeAws_json1_0ServerCertificateScopes - */ -const se_ServerCertificateScopes = (input: ServerCertificateScope[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerCertificateScope(entry, context); - }); -}; - -/** - * serializeAws_json1_0Settings - */ -const se_Settings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0SourceMetadata - */ -const se_SourceMetadata = (input: SourceMetadata, context: __SerdeContext): any => { - return { - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.SourceUpdateToken != null && { SourceUpdateToken: input.SourceUpdateToken }), - }; -}; - -/** - * serializeAws_json1_0StatefulActions - */ -const se_StatefulActions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0StatefulEngineOptions - */ -const se_StatefulEngineOptions = (input: StatefulEngineOptions, context: __SerdeContext): any => { - return { - ...(input.RuleOrder != null && { RuleOrder: input.RuleOrder }), - ...(input.StreamExceptionPolicy != null && { StreamExceptionPolicy: input.StreamExceptionPolicy }), - }; -}; - -/** - * serializeAws_json1_0StatefulRule - */ -const se_StatefulRule = (input: StatefulRule, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Header != null && { Header: se_Header(input.Header, context) }), - ...(input.RuleOptions != null && { RuleOptions: se_RuleOptions(input.RuleOptions, context) }), - }; -}; - -/** - * serializeAws_json1_0StatefulRuleGroupOverride - */ -const se_StatefulRuleGroupOverride = (input: StatefulRuleGroupOverride, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - }; -}; - -/** - * serializeAws_json1_0StatefulRuleGroupReference - */ -const se_StatefulRuleGroupReference = (input: StatefulRuleGroupReference, context: __SerdeContext): any => { - return { - ...(input.Override != null && { Override: se_StatefulRuleGroupOverride(input.Override, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_0StatefulRuleGroupReferences - */ -const se_StatefulRuleGroupReferences = (input: StatefulRuleGroupReference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatefulRuleGroupReference(entry, context); - }); -}; - -/** - * serializeAws_json1_0StatefulRuleOptions - */ -const se_StatefulRuleOptions = (input: StatefulRuleOptions, context: __SerdeContext): any => { - return { - ...(input.RuleOrder != null && { RuleOrder: input.RuleOrder }), - }; -}; - -/** - * serializeAws_json1_0StatefulRules - */ -const se_StatefulRules = (input: StatefulRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatefulRule(entry, context); - }); -}; - -/** - * serializeAws_json1_0StatelessActions - */ -const se_StatelessActions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0StatelessRule - */ -const se_StatelessRule = (input: StatelessRule, context: __SerdeContext): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleDefinition != null && { RuleDefinition: se_RuleDefinition(input.RuleDefinition, context) }), - }; -}; - -/** - * serializeAws_json1_0StatelessRuleGroupReference - */ -const se_StatelessRuleGroupReference = (input: StatelessRuleGroupReference, context: __SerdeContext): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_0StatelessRuleGroupReferences - */ -const se_StatelessRuleGroupReferences = (input: StatelessRuleGroupReference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatelessRuleGroupReference(entry, context); - }); -}; - -/** - * serializeAws_json1_0StatelessRules - */ -const se_StatelessRules = (input: StatelessRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatelessRule(entry, context); - }); -}; - -/** - * serializeAws_json1_0StatelessRulesAndCustomActions - */ -const se_StatelessRulesAndCustomActions = (input: StatelessRulesAndCustomActions, context: __SerdeContext): any => { - return { - ...(input.CustomActions != null && { CustomActions: se_CustomActions(input.CustomActions, context) }), - ...(input.StatelessRules != null && { StatelessRules: se_StatelessRules(input.StatelessRules, context) }), - }; -}; - -/** - * serializeAws_json1_0SubnetMapping - */ -const se_SubnetMapping = (input: SubnetMapping, context: __SerdeContext): any => { - return { - ...(input.IPAddressType != null && { IPAddressType: input.IPAddressType }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; - -/** - * serializeAws_json1_0SubnetMappings - */ -const se_SubnetMappings = (input: SubnetMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SubnetMapping(entry, context); - }); -}; - -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_0TargetTypes - */ -const se_TargetTypes = (input: (TargetType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0TCPFlagField - */ -const se_TCPFlagField = (input: TCPFlagField, context: __SerdeContext): any => { - return { - ...(input.Flags != null && { Flags: se_Flags(input.Flags, context) }), - ...(input.Masks != null && { Masks: se_Flags(input.Masks, context) }), - }; -}; - -/** - * serializeAws_json1_0TCPFlags - */ -const se_TCPFlags = (input: TCPFlagField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TCPFlagField(entry, context); - }); -}; - -/** - * serializeAws_json1_0TLSInspectionConfiguration - */ -const se_TLSInspectionConfiguration = (input: TLSInspectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.ServerCertificateConfigurations != null && { - ServerCertificateConfigurations: se_ServerCertificateConfigurations( - input.ServerCertificateConfigurations, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_0UpdateFirewallDeleteProtectionRequest - */ -const se_UpdateFirewallDeleteProtectionRequest = ( - input: UpdateFirewallDeleteProtectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeleteProtection != null && { DeleteProtection: input.DeleteProtection }), - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateFirewallDescriptionRequest - */ -const se_UpdateFirewallDescriptionRequest = (input: UpdateFirewallDescriptionRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateFirewallEncryptionConfigurationRequest - */ -const se_UpdateFirewallEncryptionConfigurationRequest = ( - input: UpdateFirewallEncryptionConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateFirewallPolicyChangeProtectionRequest - */ -const se_UpdateFirewallPolicyChangeProtectionRequest = ( - input: UpdateFirewallPolicyChangeProtectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.FirewallPolicyChangeProtection != null && { - FirewallPolicyChangeProtection: input.FirewallPolicyChangeProtection, - }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateFirewallPolicyRequest - */ -const se_UpdateFirewallPolicyRequest = (input: UpdateFirewallPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.FirewallPolicy != null && { FirewallPolicy: se_FirewallPolicy(input.FirewallPolicy, context) }), - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.FirewallPolicyName != null && { FirewallPolicyName: input.FirewallPolicyName }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateLoggingConfigurationRequest - */ -const se_UpdateLoggingConfigurationRequest = ( - input: UpdateLoggingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_0UpdateRuleGroupRequest - */ -const se_UpdateRuleGroupRequest = (input: UpdateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.RuleGroup != null && { RuleGroup: se_RuleGroup(input.RuleGroup, context) }), - ...(input.RuleGroupArn != null && { RuleGroupArn: input.RuleGroupArn }), - ...(input.RuleGroupName != null && { RuleGroupName: input.RuleGroupName }), - ...(input.Rules != null && { Rules: input.Rules }), - ...(input.SourceMetadata != null && { SourceMetadata: se_SourceMetadata(input.SourceMetadata, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateSubnetChangeProtectionRequest - */ -const se_UpdateSubnetChangeProtectionRequest = ( - input: UpdateSubnetChangeProtectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.SubnetChangeProtection != null && { SubnetChangeProtection: input.SubnetChangeProtection }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0UpdateTLSInspectionConfigurationRequest - */ -const se_UpdateTLSInspectionConfigurationRequest = ( - input: UpdateTLSInspectionConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.TLSInspectionConfiguration != null && { - TLSInspectionConfiguration: se_TLSInspectionConfiguration(input.TLSInspectionConfiguration, context), - }), - ...(input.TLSInspectionConfigurationArn != null && { - TLSInspectionConfigurationArn: input.TLSInspectionConfigurationArn, - }), - ...(input.TLSInspectionConfigurationName != null && { - TLSInspectionConfigurationName: input.TLSInspectionConfigurationName, - }), - ...(input.UpdateToken != null && { UpdateToken: input.UpdateToken }), - }; -}; - -/** - * serializeAws_json1_0VariableDefinitionList - */ -const se_VariableDefinitionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0VpcIds - */ -const se_VpcIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * deserializeAws_json1_0ActionDefinition - */ -const de_ActionDefinition = (output: any, context: __SerdeContext): ActionDefinition => { - return { - PublishMetricAction: - output.PublishMetricAction != null ? de_PublishMetricAction(output.PublishMetricAction, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - AddressDefinition: __expectString(output.AddressDefinition), - } as any; -}; - -/** - * deserializeAws_json1_0Addresses - */ -const de_Addresses = (output: any, context: __SerdeContext): Address[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Address(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0AssociateFirewallPolicyResponse - */ -const de_AssociateFirewallPolicyResponse = (output: any, context: __SerdeContext): AssociateFirewallPolicyResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - FirewallPolicyArn: __expectString(output.FirewallPolicyArn), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0AssociateSubnetsResponse - */ -const de_AssociateSubnetsResponse = (output: any, context: __SerdeContext): AssociateSubnetsResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - SubnetMappings: output.SubnetMappings != null ? de_SubnetMappings(output.SubnetMappings, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0Attachment - */ -const de_Attachment = (output: any, context: __SerdeContext): Attachment => { - return { - EndpointId: __expectString(output.EndpointId), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - SubnetId: __expectString(output.SubnetId), - } as any; -}; - -/** - * deserializeAws_json1_0CapacityUsageSummary - */ -const de_CapacityUsageSummary = (output: any, context: __SerdeContext): CapacityUsageSummary => { - return { - CIDRs: output.CIDRs != null ? de_CIDRSummary(output.CIDRs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0Certificates - */ -const de_Certificates = (output: any, context: __SerdeContext): TlsCertificateData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TlsCertificateData(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0CIDRSummary - */ -const de_CIDRSummary = (output: any, context: __SerdeContext): CIDRSummary => { - return { - AvailableCIDRCount: __expectInt32(output.AvailableCIDRCount), - IPSetReferences: output.IPSetReferences != null ? de_IPSetMetadataMap(output.IPSetReferences, context) : undefined, - UtilizedCIDRCount: __expectInt32(output.UtilizedCIDRCount), - } as any; -}; - -/** - * deserializeAws_json1_0CreateFirewallPolicyResponse - */ -const de_CreateFirewallPolicyResponse = (output: any, context: __SerdeContext): CreateFirewallPolicyResponse => { - return { - FirewallPolicyResponse: - output.FirewallPolicyResponse != null - ? de_FirewallPolicyResponse(output.FirewallPolicyResponse, context) - : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0CreateFirewallResponse - */ -const de_CreateFirewallResponse = (output: any, context: __SerdeContext): CreateFirewallResponse => { - return { - Firewall: output.Firewall != null ? de_Firewall(output.Firewall, context) : undefined, - FirewallStatus: output.FirewallStatus != null ? de_FirewallStatus(output.FirewallStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0CreateRuleGroupResponse - */ -const de_CreateRuleGroupResponse = (output: any, context: __SerdeContext): CreateRuleGroupResponse => { - return { - RuleGroupResponse: - output.RuleGroupResponse != null ? de_RuleGroupResponse(output.RuleGroupResponse, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0CreateTLSInspectionConfigurationResponse - */ -const de_CreateTLSInspectionConfigurationResponse = ( - output: any, - context: __SerdeContext -): CreateTLSInspectionConfigurationResponse => { - return { - TLSInspectionConfigurationResponse: - output.TLSInspectionConfigurationResponse != null - ? de_TLSInspectionConfigurationResponse(output.TLSInspectionConfigurationResponse, context) - : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0CustomAction - */ -const de_CustomAction = (output: any, context: __SerdeContext): CustomAction => { - return { - ActionDefinition: - output.ActionDefinition != null ? de_ActionDefinition(output.ActionDefinition, context) : undefined, - ActionName: __expectString(output.ActionName), - } as any; -}; - -/** - * deserializeAws_json1_0CustomActions - */ -const de_CustomActions = (output: any, context: __SerdeContext): CustomAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomAction(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0DeleteFirewallPolicyResponse - */ -const de_DeleteFirewallPolicyResponse = (output: any, context: __SerdeContext): DeleteFirewallPolicyResponse => { - return { - FirewallPolicyResponse: - output.FirewallPolicyResponse != null - ? de_FirewallPolicyResponse(output.FirewallPolicyResponse, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DeleteFirewallResponse - */ -const de_DeleteFirewallResponse = (output: any, context: __SerdeContext): DeleteFirewallResponse => { - return { - Firewall: output.Firewall != null ? de_Firewall(output.Firewall, context) : undefined, - FirewallStatus: output.FirewallStatus != null ? de_FirewallStatus(output.FirewallStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_0DeleteRuleGroupResponse - */ -const de_DeleteRuleGroupResponse = (output: any, context: __SerdeContext): DeleteRuleGroupResponse => { - return { - RuleGroupResponse: - output.RuleGroupResponse != null ? de_RuleGroupResponse(output.RuleGroupResponse, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DeleteTLSInspectionConfigurationResponse - */ -const de_DeleteTLSInspectionConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteTLSInspectionConfigurationResponse => { - return { - TLSInspectionConfigurationResponse: - output.TLSInspectionConfigurationResponse != null - ? de_TLSInspectionConfigurationResponse(output.TLSInspectionConfigurationResponse, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DescribeFirewallPolicyResponse - */ -const de_DescribeFirewallPolicyResponse = (output: any, context: __SerdeContext): DescribeFirewallPolicyResponse => { - return { - FirewallPolicy: output.FirewallPolicy != null ? de_FirewallPolicy(output.FirewallPolicy, context) : undefined, - FirewallPolicyResponse: - output.FirewallPolicyResponse != null - ? de_FirewallPolicyResponse(output.FirewallPolicyResponse, context) - : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0DescribeFirewallResponse - */ -const de_DescribeFirewallResponse = (output: any, context: __SerdeContext): DescribeFirewallResponse => { - return { - Firewall: output.Firewall != null ? de_Firewall(output.Firewall, context) : undefined, - FirewallStatus: output.FirewallStatus != null ? de_FirewallStatus(output.FirewallStatus, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; - -/** - * deserializeAws_json1_0DescribeLoggingConfigurationResponse - */ -const de_DescribeLoggingConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeLoggingConfigurationResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; +// se_ReferenceSets omitted. -/** - * deserializeAws_json1_0DescribeResourcePolicyResponse - */ -const de_DescribeResourcePolicyResponse = (output: any, context: __SerdeContext): DescribeResourcePolicyResponse => { - return { - Policy: __expectString(output.Policy), - } as any; -}; +// se_RuleDefinition omitted. -/** - * deserializeAws_json1_0DescribeRuleGroupMetadataResponse - */ -const de_DescribeRuleGroupMetadataResponse = ( - output: any, - context: __SerdeContext -): DescribeRuleGroupMetadataResponse => { - return { - Capacity: __expectInt32(output.Capacity), - Description: __expectString(output.Description), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RuleGroupArn: __expectString(output.RuleGroupArn), - RuleGroupName: __expectString(output.RuleGroupName), - StatefulRuleOptions: - output.StatefulRuleOptions != null ? de_StatefulRuleOptions(output.StatefulRuleOptions, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// se_RuleGroup omitted. -/** - * deserializeAws_json1_0DescribeRuleGroupResponse - */ -const de_DescribeRuleGroupResponse = (output: any, context: __SerdeContext): DescribeRuleGroupResponse => { - return { - RuleGroup: output.RuleGroup != null ? de_RuleGroup(output.RuleGroup, context) : undefined, - RuleGroupResponse: - output.RuleGroupResponse != null ? de_RuleGroupResponse(output.RuleGroupResponse, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// se_RuleOption omitted. -/** - * deserializeAws_json1_0DescribeTLSInspectionConfigurationResponse - */ -const de_DescribeTLSInspectionConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeTLSInspectionConfigurationResponse => { - return { - TLSInspectionConfiguration: - output.TLSInspectionConfiguration != null - ? de_TLSInspectionConfiguration(output.TLSInspectionConfiguration, context) - : undefined, - TLSInspectionConfigurationResponse: - output.TLSInspectionConfigurationResponse != null - ? de_TLSInspectionConfigurationResponse(output.TLSInspectionConfigurationResponse, context) - : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// se_RuleOptions omitted. -/** - * deserializeAws_json1_0Dimension - */ -const de_Dimension = (output: any, context: __SerdeContext): Dimension => { - return { - Value: __expectString(output.Value), - } as any; -}; +// se_RulesSource omitted. -/** - * deserializeAws_json1_0Dimensions - */ -const de_Dimensions = (output: any, context: __SerdeContext): Dimension[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Dimension(entry, context); - }); - return retVal; -}; +// se_RulesSourceList omitted. -/** - * deserializeAws_json1_0DisassociateSubnetsResponse - */ -const de_DisassociateSubnetsResponse = (output: any, context: __SerdeContext): DisassociateSubnetsResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - SubnetMappings: output.SubnetMappings != null ? de_SubnetMappings(output.SubnetMappings, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// se_RuleTargets omitted. -/** - * deserializeAws_json1_0EncryptionConfiguration - */ -const de_EncryptionConfiguration = (output: any, context: __SerdeContext): EncryptionConfiguration => { - return { - KeyId: __expectString(output.KeyId), - Type: __expectString(output.Type), - } as any; -}; +// se_RuleVariables omitted. -/** - * deserializeAws_json1_0Firewall - */ -const de_Firewall = (output: any, context: __SerdeContext): Firewall => { - return { - DeleteProtection: __expectBoolean(output.DeleteProtection), - Description: __expectString(output.Description), - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - FirewallArn: __expectString(output.FirewallArn), - FirewallId: __expectString(output.FirewallId), - FirewallName: __expectString(output.FirewallName), - FirewallPolicyArn: __expectString(output.FirewallPolicyArn), - FirewallPolicyChangeProtection: __expectBoolean(output.FirewallPolicyChangeProtection), - SubnetChangeProtection: __expectBoolean(output.SubnetChangeProtection), - SubnetMappings: output.SubnetMappings != null ? de_SubnetMappings(output.SubnetMappings, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_0FirewallMetadata - */ -const de_FirewallMetadata = (output: any, context: __SerdeContext): FirewallMetadata => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - } as any; -}; +// se_ServerCertificate omitted. -/** - * deserializeAws_json1_0FirewallPolicies - */ -const de_FirewallPolicies = (output: any, context: __SerdeContext): FirewallPolicyMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallPolicyMetadata(entry, context); - }); - return retVal; -}; +// se_ServerCertificateConfiguration omitted. -/** - * deserializeAws_json1_0FirewallPolicy - */ -const de_FirewallPolicy = (output: any, context: __SerdeContext): FirewallPolicy => { - return { - StatefulDefaultActions: - output.StatefulDefaultActions != null ? de_StatefulActions(output.StatefulDefaultActions, context) : undefined, - StatefulEngineOptions: - output.StatefulEngineOptions != null - ? de_StatefulEngineOptions(output.StatefulEngineOptions, context) - : undefined, - StatefulRuleGroupReferences: - output.StatefulRuleGroupReferences != null - ? de_StatefulRuleGroupReferences(output.StatefulRuleGroupReferences, context) - : undefined, - StatelessCustomActions: - output.StatelessCustomActions != null ? de_CustomActions(output.StatelessCustomActions, context) : undefined, - StatelessDefaultActions: - output.StatelessDefaultActions != null ? de_StatelessActions(output.StatelessDefaultActions, context) : undefined, - StatelessFragmentDefaultActions: - output.StatelessFragmentDefaultActions != null - ? de_StatelessActions(output.StatelessFragmentDefaultActions, context) - : undefined, - StatelessRuleGroupReferences: - output.StatelessRuleGroupReferences != null - ? de_StatelessRuleGroupReferences(output.StatelessRuleGroupReferences, context) - : undefined, - TLSInspectionConfigurationArn: __expectString(output.TLSInspectionConfigurationArn), - } as any; -}; - -/** - * deserializeAws_json1_0FirewallPolicyMetadata - */ -const de_FirewallPolicyMetadata = (output: any, context: __SerdeContext): FirewallPolicyMetadata => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// se_ServerCertificateConfigurations omitted. -/** - * deserializeAws_json1_0FirewallPolicyResponse - */ -const de_FirewallPolicyResponse = (output: any, context: __SerdeContext): FirewallPolicyResponse => { - return { - ConsumedStatefulRuleCapacity: __expectInt32(output.ConsumedStatefulRuleCapacity), - ConsumedStatelessRuleCapacity: __expectInt32(output.ConsumedStatelessRuleCapacity), - Description: __expectString(output.Description), - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - FirewallPolicyArn: __expectString(output.FirewallPolicyArn), - FirewallPolicyId: __expectString(output.FirewallPolicyId), - FirewallPolicyName: __expectString(output.FirewallPolicyName), - FirewallPolicyStatus: __expectString(output.FirewallPolicyStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NumberOfAssociations: __expectInt32(output.NumberOfAssociations), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0Firewalls - */ -const de_Firewalls = (output: any, context: __SerdeContext): FirewallMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0FirewallStatus - */ -const de_FirewallStatus = (output: any, context: __SerdeContext): FirewallStatus => { - return { - CapacityUsageSummary: - output.CapacityUsageSummary != null ? de_CapacityUsageSummary(output.CapacityUsageSummary, context) : undefined, - ConfigurationSyncStateSummary: __expectString(output.ConfigurationSyncStateSummary), - Status: __expectString(output.Status), - SyncStates: output.SyncStates != null ? de_SyncStates(output.SyncStates, context) : undefined, - } as any; -}; +// se_ServerCertificates omitted. -/** - * deserializeAws_json1_0Flags - */ -const de_Flags = (output: any, context: __SerdeContext): (TCPFlag | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ServerCertificateScope omitted. -/** - * deserializeAws_json1_0Header - */ -const de_Header = (output: any, context: __SerdeContext): Header => { - return { - Destination: __expectString(output.Destination), - DestinationPort: __expectString(output.DestinationPort), - Direction: __expectString(output.Direction), - Protocol: __expectString(output.Protocol), - Source: __expectString(output.Source), - SourcePort: __expectString(output.SourcePort), - } as any; -}; +// se_ServerCertificateScopes omitted. -/** - * deserializeAws_json1_0InsufficientCapacityException - */ -const de_InsufficientCapacityException = (output: any, context: __SerdeContext): InsufficientCapacityException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_Settings omitted. -/** - * deserializeAws_json1_0InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_SourceMetadata omitted. -/** - * deserializeAws_json1_0InvalidOperationException - */ -const de_InvalidOperationException = (output: any, context: __SerdeContext): InvalidOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StatefulActions omitted. -/** - * deserializeAws_json1_0InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StatefulEngineOptions omitted. -/** - * deserializeAws_json1_0InvalidResourcePolicyException - */ -const de_InvalidResourcePolicyException = (output: any, context: __SerdeContext): InvalidResourcePolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StatefulRule omitted. -/** - * deserializeAws_json1_0InvalidTokenException - */ -const de_InvalidTokenException = (output: any, context: __SerdeContext): InvalidTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StatefulRuleGroupOverride omitted. -/** - * deserializeAws_json1_0IPSet - */ -const de_IPSet = (output: any, context: __SerdeContext): IPSet => { - return { - Definition: output.Definition != null ? de_VariableDefinitionList(output.Definition, context) : undefined, - } as any; -}; +// se_StatefulRuleGroupReference omitted. -/** - * deserializeAws_json1_0IPSetMetadata - */ -const de_IPSetMetadata = (output: any, context: __SerdeContext): IPSetMetadata => { - return { - ResolvedCIDRCount: __expectInt32(output.ResolvedCIDRCount), - } as any; -}; +// se_StatefulRuleGroupReferences omitted. -/** - * deserializeAws_json1_0IPSetMetadataMap - */ -const de_IPSetMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_IPSetMetadata(value, context); - return acc; - }, {}); -}; +// se_StatefulRuleOptions omitted. -/** - * deserializeAws_json1_0IPSetReference - */ -const de_IPSetReference = (output: any, context: __SerdeContext): IPSetReference => { - return { - ReferenceArn: __expectString(output.ReferenceArn), - } as any; -}; +// se_StatefulRules omitted. -/** - * deserializeAws_json1_0IPSetReferenceMap - */ -const de_IPSetReferenceMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_IPSetReference(value, context); - return acc; - }, {}); -}; +// se_StatelessActions omitted. -/** - * deserializeAws_json1_0IPSets - */ -const de_IPSets = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_IPSet(value, context); - return acc; - }, {}); -}; +// se_StatelessRule omitted. -/** - * deserializeAws_json1_0LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_StatelessRuleGroupReference omitted. -/** - * deserializeAws_json1_0ListFirewallPoliciesResponse - */ -const de_ListFirewallPoliciesResponse = (output: any, context: __SerdeContext): ListFirewallPoliciesResponse => { - return { - FirewallPolicies: - output.FirewallPolicies != null ? de_FirewallPolicies(output.FirewallPolicies, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_StatelessRuleGroupReferences omitted. -/** - * deserializeAws_json1_0ListFirewallsResponse - */ -const de_ListFirewallsResponse = (output: any, context: __SerdeContext): ListFirewallsResponse => { - return { - Firewalls: output.Firewalls != null ? de_Firewalls(output.Firewalls, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_StatelessRules omitted. -/** - * deserializeAws_json1_0ListRuleGroupsResponse - */ -const de_ListRuleGroupsResponse = (output: any, context: __SerdeContext): ListRuleGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - RuleGroups: output.RuleGroups != null ? de_RuleGroups(output.RuleGroups, context) : undefined, - } as any; -}; +// se_StatelessRulesAndCustomActions omitted. -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// se_SubnetMapping omitted. -/** - * deserializeAws_json1_0ListTLSInspectionConfigurationsResponse - */ -const de_ListTLSInspectionConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListTLSInspectionConfigurationsResponse => { - return { - NextToken: __expectString(output.NextToken), - TLSInspectionConfigurations: - output.TLSInspectionConfigurations != null - ? de_TLSInspectionConfigurations(output.TLSInspectionConfigurations, context) - : undefined, - } as any; -}; +// se_SubnetMappings omitted. -/** - * deserializeAws_json1_0LogDestinationConfig - */ -const de_LogDestinationConfig = (output: any, context: __SerdeContext): LogDestinationConfig => { - return { - LogDestination: output.LogDestination != null ? de_LogDestinationMap(output.LogDestination, context) : undefined, - LogDestinationType: __expectString(output.LogDestinationType), - LogType: __expectString(output.LogType), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_0LogDestinationConfigs - */ -const de_LogDestinationConfigs = (output: any, context: __SerdeContext): LogDestinationConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogDestinationConfig(entry, context); - }); - return retVal; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_0LogDestinationMap - */ -const de_LogDestinationMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_TagList omitted. -/** - * deserializeAws_json1_0LogDestinationPermissionException - */ -const de_LogDestinationPermissionException = ( - output: any, - context: __SerdeContext -): LogDestinationPermissionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_0LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - LogDestinationConfigs: - output.LogDestinationConfigs != null - ? de_LogDestinationConfigs(output.LogDestinationConfigs, context) - : undefined, - } as any; -}; +// se_TargetTypes omitted. -/** - * deserializeAws_json1_0MatchAttributes - */ -const de_MatchAttributes = (output: any, context: __SerdeContext): MatchAttributes => { - return { - DestinationPorts: output.DestinationPorts != null ? de_PortRanges(output.DestinationPorts, context) : undefined, - Destinations: output.Destinations != null ? de_Addresses(output.Destinations, context) : undefined, - Protocols: output.Protocols != null ? de_ProtocolNumbers(output.Protocols, context) : undefined, - SourcePorts: output.SourcePorts != null ? de_PortRanges(output.SourcePorts, context) : undefined, - Sources: output.Sources != null ? de_Addresses(output.Sources, context) : undefined, - TCPFlags: output.TCPFlags != null ? de_TCPFlags(output.TCPFlags, context) : undefined, - } as any; -}; +// se_TCPFlagField omitted. -/** - * deserializeAws_json1_0PerObjectStatus - */ -const de_PerObjectStatus = (output: any, context: __SerdeContext): PerObjectStatus => { - return { - SyncStatus: __expectString(output.SyncStatus), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// se_TCPFlags omitted. -/** - * deserializeAws_json1_0PortRange - */ -const de_PortRange = (output: any, context: __SerdeContext): PortRange => { - return { - FromPort: __expectInt32(output.FromPort), - ToPort: __expectInt32(output.ToPort), - } as any; -}; +// se_TLSInspectionConfiguration omitted. -/** - * deserializeAws_json1_0PortRanges - */ -const de_PortRanges = (output: any, context: __SerdeContext): PortRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortRange(entry, context); - }); - return retVal; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_0PortSet - */ -const de_PortSet = (output: any, context: __SerdeContext): PortSet => { - return { - Definition: output.Definition != null ? de_VariableDefinitionList(output.Definition, context) : undefined, - } as any; -}; +// se_UpdateFirewallDeleteProtectionRequest omitted. -/** - * deserializeAws_json1_0PortSets - */ -const de_PortSets = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PortSet(value, context); - return acc; - }, {}); -}; +// se_UpdateFirewallDescriptionRequest omitted. -/** - * deserializeAws_json1_0ProtocolNumbers - */ -const de_ProtocolNumbers = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// se_UpdateFirewallEncryptionConfigurationRequest omitted. -/** - * deserializeAws_json1_0PublishMetricAction - */ -const de_PublishMetricAction = (output: any, context: __SerdeContext): PublishMetricAction => { - return { - Dimensions: output.Dimensions != null ? de_Dimensions(output.Dimensions, context) : undefined, - } as any; -}; +// se_UpdateFirewallPolicyChangeProtectionRequest omitted. -/** - * deserializeAws_json1_0PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return {} as any; -}; +// se_UpdateFirewallPolicyRequest omitted. -/** - * deserializeAws_json1_0ReferenceSets - */ -const de_ReferenceSets = (output: any, context: __SerdeContext): ReferenceSets => { - return { - IPSetReferences: output.IPSetReferences != null ? de_IPSetReferenceMap(output.IPSetReferences, context) : undefined, - } as any; -}; +// se_UpdateLoggingConfigurationRequest omitted. /** - * deserializeAws_json1_0ResourceNotFoundException + * serializeAws_json1_0UpdateRuleGroupRequest */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const se_UpdateRuleGroupRequest = (input: UpdateRuleGroupRequest, context: __SerdeContext): any => { + return take(input, { + Description: [], + DryRun: [], + EncryptionConfiguration: _json, + RuleGroup: _json, + RuleGroupArn: [], + RuleGroupName: [], + Rules: [], + SourceMetadata: _json, + Type: [], + UpdateToken: [], + }); }; -/** - * deserializeAws_json1_0ResourceOwnerCheckException - */ -const de_ResourceOwnerCheckException = (output: any, context: __SerdeContext): ResourceOwnerCheckException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateSubnetChangeProtectionRequest omitted. -/** - * deserializeAws_json1_0RuleDefinition - */ -const de_RuleDefinition = (output: any, context: __SerdeContext): RuleDefinition => { - return { - Actions: output.Actions != null ? de_StatelessActions(output.Actions, context) : undefined, - MatchAttributes: output.MatchAttributes != null ? de_MatchAttributes(output.MatchAttributes, context) : undefined, - } as any; -}; +// se_UpdateTLSInspectionConfigurationRequest omitted. -/** - * deserializeAws_json1_0RuleGroup - */ -const de_RuleGroup = (output: any, context: __SerdeContext): RuleGroup => { - return { - ReferenceSets: output.ReferenceSets != null ? de_ReferenceSets(output.ReferenceSets, context) : undefined, - RuleVariables: output.RuleVariables != null ? de_RuleVariables(output.RuleVariables, context) : undefined, - RulesSource: output.RulesSource != null ? de_RulesSource(output.RulesSource, context) : undefined, - StatefulRuleOptions: - output.StatefulRuleOptions != null ? de_StatefulRuleOptions(output.StatefulRuleOptions, context) : undefined, - } as any; -}; +// se_VariableDefinitionList omitted. -/** - * deserializeAws_json1_0RuleGroupMetadata - */ -const de_RuleGroupMetadata = (output: any, context: __SerdeContext): RuleGroupMetadata => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// se_VpcIds omitted. -/** - * deserializeAws_json1_0RuleGroupResponse - */ -const de_RuleGroupResponse = (output: any, context: __SerdeContext): RuleGroupResponse => { - return { - Capacity: __expectInt32(output.Capacity), - ConsumedCapacity: __expectInt32(output.ConsumedCapacity), - Description: __expectString(output.Description), - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NumberOfAssociations: __expectInt32(output.NumberOfAssociations), - RuleGroupArn: __expectString(output.RuleGroupArn), - RuleGroupId: __expectString(output.RuleGroupId), - RuleGroupName: __expectString(output.RuleGroupName), - RuleGroupStatus: __expectString(output.RuleGroupStatus), - SnsTopic: __expectString(output.SnsTopic), - SourceMetadata: output.SourceMetadata != null ? de_SourceMetadata(output.SourceMetadata, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_0RuleGroups - */ -const de_RuleGroups = (output: any, context: __SerdeContext): RuleGroupMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0RuleOption - */ -const de_RuleOption = (output: any, context: __SerdeContext): RuleOption => { - return { - Keyword: __expectString(output.Keyword), - Settings: output.Settings != null ? de_Settings(output.Settings, context) : undefined, - } as any; -}; +// de_ActionDefinition omitted. -/** - * deserializeAws_json1_0RuleOptions - */ -const de_RuleOptions = (output: any, context: __SerdeContext): RuleOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleOption(entry, context); - }); - return retVal; -}; +// de_Address omitted. -/** - * deserializeAws_json1_0RulesSource - */ -const de_RulesSource = (output: any, context: __SerdeContext): RulesSource => { - return { - RulesSourceList: output.RulesSourceList != null ? de_RulesSourceList(output.RulesSourceList, context) : undefined, - RulesString: __expectString(output.RulesString), - StatefulRules: output.StatefulRules != null ? de_StatefulRules(output.StatefulRules, context) : undefined, - StatelessRulesAndCustomActions: - output.StatelessRulesAndCustomActions != null - ? de_StatelessRulesAndCustomActions(output.StatelessRulesAndCustomActions, context) - : undefined, - } as any; -}; +// de_Addresses omitted. -/** - * deserializeAws_json1_0RulesSourceList - */ -const de_RulesSourceList = (output: any, context: __SerdeContext): RulesSourceList => { - return { - GeneratedRulesType: __expectString(output.GeneratedRulesType), - TargetTypes: output.TargetTypes != null ? de_TargetTypes(output.TargetTypes, context) : undefined, - Targets: output.Targets != null ? de_RuleTargets(output.Targets, context) : undefined, - } as any; -}; +// de_AssociateFirewallPolicyResponse omitted. -/** - * deserializeAws_json1_0RuleTargets - */ -const de_RuleTargets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AssociateSubnetsResponse omitted. -/** - * deserializeAws_json1_0RuleVariables - */ -const de_RuleVariables = (output: any, context: __SerdeContext): RuleVariables => { - return { - IPSets: output.IPSets != null ? de_IPSets(output.IPSets, context) : undefined, - PortSets: output.PortSets != null ? de_PortSets(output.PortSets, context) : undefined, - } as any; -}; +// de_Attachment omitted. -/** - * deserializeAws_json1_0ServerCertificate - */ -const de_ServerCertificate = (output: any, context: __SerdeContext): ServerCertificate => { - return { - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_CapacityUsageSummary omitted. -/** - * deserializeAws_json1_0ServerCertificateConfiguration - */ -const de_ServerCertificateConfiguration = (output: any, context: __SerdeContext): ServerCertificateConfiguration => { - return { - Scopes: output.Scopes != null ? de_ServerCertificateScopes(output.Scopes, context) : undefined, - ServerCertificates: - output.ServerCertificates != null ? de_ServerCertificates(output.ServerCertificates, context) : undefined, - } as any; -}; +// de_Certificates omitted. + +// de_CIDRSummary omitted. /** - * deserializeAws_json1_0ServerCertificateConfigurations + * deserializeAws_json1_0CreateFirewallPolicyResponse */ -const de_ServerCertificateConfigurations = (output: any, context: __SerdeContext): ServerCertificateConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerCertificateConfiguration(entry, context); - }); - return retVal; +const de_CreateFirewallPolicyResponse = (output: any, context: __SerdeContext): CreateFirewallPolicyResponse => { + return take(output, { + FirewallPolicyResponse: (_: any) => de_FirewallPolicyResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ServerCertificates - */ -const de_ServerCertificates = (output: any, context: __SerdeContext): ServerCertificate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerCertificate(entry, context); - }); - return retVal; -}; +// de_CreateFirewallResponse omitted. /** - * deserializeAws_json1_0ServerCertificateScope + * deserializeAws_json1_0CreateRuleGroupResponse */ -const de_ServerCertificateScope = (output: any, context: __SerdeContext): ServerCertificateScope => { - return { - DestinationPorts: output.DestinationPorts != null ? de_PortRanges(output.DestinationPorts, context) : undefined, - Destinations: output.Destinations != null ? de_Addresses(output.Destinations, context) : undefined, - Protocols: output.Protocols != null ? de_ProtocolNumbers(output.Protocols, context) : undefined, - SourcePorts: output.SourcePorts != null ? de_PortRanges(output.SourcePorts, context) : undefined, - Sources: output.Sources != null ? de_Addresses(output.Sources, context) : undefined, - } as any; +const de_CreateRuleGroupResponse = (output: any, context: __SerdeContext): CreateRuleGroupResponse => { + return take(output, { + RuleGroupResponse: (_: any) => de_RuleGroupResponse(_, context), + UpdateToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0ServerCertificateScopes + * deserializeAws_json1_0CreateTLSInspectionConfigurationResponse */ -const de_ServerCertificateScopes = (output: any, context: __SerdeContext): ServerCertificateScope[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerCertificateScope(entry, context); - }); - return retVal; +const de_CreateTLSInspectionConfigurationResponse = ( + output: any, + context: __SerdeContext +): CreateTLSInspectionConfigurationResponse => { + return take(output, { + TLSInspectionConfigurationResponse: (_: any) => de_TLSInspectionConfigurationResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0Settings - */ -const de_Settings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CustomAction omitted. -/** - * deserializeAws_json1_0SourceMetadata - */ -const de_SourceMetadata = (output: any, context: __SerdeContext): SourceMetadata => { - return { - SourceArn: __expectString(output.SourceArn), - SourceUpdateToken: __expectString(output.SourceUpdateToken), - } as any; -}; +// de_CustomActions omitted. /** - * deserializeAws_json1_0StatefulActions + * deserializeAws_json1_0DeleteFirewallPolicyResponse */ -const de_StatefulActions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DeleteFirewallPolicyResponse = (output: any, context: __SerdeContext): DeleteFirewallPolicyResponse => { + return take(output, { + FirewallPolicyResponse: (_: any) => de_FirewallPolicyResponse(_, context), + }) as any; }; -/** - * deserializeAws_json1_0StatefulEngineOptions - */ -const de_StatefulEngineOptions = (output: any, context: __SerdeContext): StatefulEngineOptions => { - return { - RuleOrder: __expectString(output.RuleOrder), - StreamExceptionPolicy: __expectString(output.StreamExceptionPolicy), - } as any; -}; +// de_DeleteFirewallResponse omitted. -/** - * deserializeAws_json1_0StatefulRule - */ -const de_StatefulRule = (output: any, context: __SerdeContext): StatefulRule => { - return { - Action: __expectString(output.Action), - Header: output.Header != null ? de_Header(output.Header, context) : undefined, - RuleOptions: output.RuleOptions != null ? de_RuleOptions(output.RuleOptions, context) : undefined, - } as any; -}; +// de_DeleteResourcePolicyResponse omitted. /** - * deserializeAws_json1_0StatefulRuleGroupOverride + * deserializeAws_json1_0DeleteRuleGroupResponse */ -const de_StatefulRuleGroupOverride = (output: any, context: __SerdeContext): StatefulRuleGroupOverride => { - return { - Action: __expectString(output.Action), - } as any; +const de_DeleteRuleGroupResponse = (output: any, context: __SerdeContext): DeleteRuleGroupResponse => { + return take(output, { + RuleGroupResponse: (_: any) => de_RuleGroupResponse(_, context), + }) as any; }; /** - * deserializeAws_json1_0StatefulRuleGroupReference + * deserializeAws_json1_0DeleteTLSInspectionConfigurationResponse */ -const de_StatefulRuleGroupReference = (output: any, context: __SerdeContext): StatefulRuleGroupReference => { - return { - Override: output.Override != null ? de_StatefulRuleGroupOverride(output.Override, context) : undefined, - Priority: __expectInt32(output.Priority), - ResourceArn: __expectString(output.ResourceArn), - } as any; +const de_DeleteTLSInspectionConfigurationResponse = ( + output: any, + context: __SerdeContext +): DeleteTLSInspectionConfigurationResponse => { + return take(output, { + TLSInspectionConfigurationResponse: (_: any) => de_TLSInspectionConfigurationResponse(_, context), + }) as any; }; /** - * deserializeAws_json1_0StatefulRuleGroupReferences + * deserializeAws_json1_0DescribeFirewallPolicyResponse */ -const de_StatefulRuleGroupReferences = (output: any, context: __SerdeContext): StatefulRuleGroupReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatefulRuleGroupReference(entry, context); - }); - return retVal; +const de_DescribeFirewallPolicyResponse = (output: any, context: __SerdeContext): DescribeFirewallPolicyResponse => { + return take(output, { + FirewallPolicy: _json, + FirewallPolicyResponse: (_: any) => de_FirewallPolicyResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0StatefulRuleOptions - */ -const de_StatefulRuleOptions = (output: any, context: __SerdeContext): StatefulRuleOptions => { - return { - RuleOrder: __expectString(output.RuleOrder), - } as any; -}; +// de_DescribeFirewallResponse omitted. -/** - * deserializeAws_json1_0StatefulRules - */ -const de_StatefulRules = (output: any, context: __SerdeContext): StatefulRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatefulRule(entry, context); - }); - return retVal; -}; +// de_DescribeLoggingConfigurationResponse omitted. -/** - * deserializeAws_json1_0StatelessActions - */ -const de_StatelessActions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DescribeResourcePolicyResponse omitted. /** - * deserializeAws_json1_0StatelessRule + * deserializeAws_json1_0DescribeRuleGroupMetadataResponse */ -const de_StatelessRule = (output: any, context: __SerdeContext): StatelessRule => { - return { - Priority: __expectInt32(output.Priority), - RuleDefinition: output.RuleDefinition != null ? de_RuleDefinition(output.RuleDefinition, context) : undefined, - } as any; +const de_DescribeRuleGroupMetadataResponse = ( + output: any, + context: __SerdeContext +): DescribeRuleGroupMetadataResponse => { + return take(output, { + Capacity: __expectInt32, + Description: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuleGroupArn: __expectString, + RuleGroupName: __expectString, + StatefulRuleOptions: _json, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_0StatelessRuleGroupReference + * deserializeAws_json1_0DescribeRuleGroupResponse */ -const de_StatelessRuleGroupReference = (output: any, context: __SerdeContext): StatelessRuleGroupReference => { - return { - Priority: __expectInt32(output.Priority), - ResourceArn: __expectString(output.ResourceArn), - } as any; +const de_DescribeRuleGroupResponse = (output: any, context: __SerdeContext): DescribeRuleGroupResponse => { + return take(output, { + RuleGroup: _json, + RuleGroupResponse: (_: any) => de_RuleGroupResponse(_, context), + UpdateToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0StatelessRuleGroupReferences + * deserializeAws_json1_0DescribeTLSInspectionConfigurationResponse */ -const de_StatelessRuleGroupReferences = (output: any, context: __SerdeContext): StatelessRuleGroupReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatelessRuleGroupReference(entry, context); - }); - return retVal; +const de_DescribeTLSInspectionConfigurationResponse = ( + output: any, + context: __SerdeContext +): DescribeTLSInspectionConfigurationResponse => { + return take(output, { + TLSInspectionConfiguration: _json, + TLSInspectionConfigurationResponse: (_: any) => de_TLSInspectionConfigurationResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0StatelessRules - */ -const de_StatelessRules = (output: any, context: __SerdeContext): StatelessRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatelessRule(entry, context); - }); - return retVal; -}; +// de_Dimension omitted. -/** - * deserializeAws_json1_0StatelessRulesAndCustomActions - */ -const de_StatelessRulesAndCustomActions = (output: any, context: __SerdeContext): StatelessRulesAndCustomActions => { - return { - CustomActions: output.CustomActions != null ? de_CustomActions(output.CustomActions, context) : undefined, - StatelessRules: output.StatelessRules != null ? de_StatelessRules(output.StatelessRules, context) : undefined, - } as any; -}; +// de_Dimensions omitted. -/** - * deserializeAws_json1_0SubnetMapping - */ -const de_SubnetMapping = (output: any, context: __SerdeContext): SubnetMapping => { - return { - IPAddressType: __expectString(output.IPAddressType), - SubnetId: __expectString(output.SubnetId), - } as any; -}; +// de_DisassociateSubnetsResponse omitted. -/** - * deserializeAws_json1_0SubnetMappings - */ -const de_SubnetMappings = (output: any, context: __SerdeContext): SubnetMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubnetMapping(entry, context); - }); - return retVal; -}; +// de_EncryptionConfiguration omitted. -/** - * deserializeAws_json1_0SyncState - */ -const de_SyncState = (output: any, context: __SerdeContext): SyncState => { - return { - Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined, - Config: output.Config != null ? de_SyncStateConfig(output.Config, context) : undefined, - } as any; -}; +// de_Firewall omitted. -/** - * deserializeAws_json1_0SyncStateConfig - */ -const de_SyncStateConfig = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PerObjectStatus(value, context); - return acc; - }, {}); -}; +// de_FirewallMetadata omitted. -/** - * deserializeAws_json1_0SyncStates - */ -const de_SyncStates = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SyncState(value, context); - return acc; - }, {}); -}; +// de_FirewallPolicies omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_FirewallPolicy omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_FirewallPolicyMetadata omitted. /** - * deserializeAws_json1_0TagResourceResponse + * deserializeAws_json1_0FirewallPolicyResponse */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; +const de_FirewallPolicyResponse = (output: any, context: __SerdeContext): FirewallPolicyResponse => { + return take(output, { + ConsumedStatefulRuleCapacity: __expectInt32, + ConsumedStatelessRuleCapacity: __expectInt32, + Description: __expectString, + EncryptionConfiguration: _json, + FirewallPolicyArn: __expectString, + FirewallPolicyId: __expectString, + FirewallPolicyName: __expectString, + FirewallPolicyStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfAssociations: __expectInt32, + Tags: _json, + }) as any; }; -/** - * deserializeAws_json1_0TargetTypes - */ -const de_TargetTypes = (output: any, context: __SerdeContext): (TargetType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Firewalls omitted. -/** - * deserializeAws_json1_0TCPFlagField - */ -const de_TCPFlagField = (output: any, context: __SerdeContext): TCPFlagField => { - return { - Flags: output.Flags != null ? de_Flags(output.Flags, context) : undefined, - Masks: output.Masks != null ? de_Flags(output.Masks, context) : undefined, - } as any; -}; +// de_FirewallStatus omitted. -/** - * deserializeAws_json1_0TCPFlags - */ -const de_TCPFlags = (output: any, context: __SerdeContext): TCPFlagField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TCPFlagField(entry, context); - }); - return retVal; -}; +// de_Flags omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_Header omitted. -/** - * deserializeAws_json1_0TlsCertificateData - */ -const de_TlsCertificateData = (output: any, context: __SerdeContext): TlsCertificateData => { - return { - CertificateArn: __expectString(output.CertificateArn), - CertificateSerial: __expectString(output.CertificateSerial), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_InsufficientCapacityException omitted. -/** - * deserializeAws_json1_0TLSInspectionConfiguration - */ -const de_TLSInspectionConfiguration = (output: any, context: __SerdeContext): TLSInspectionConfiguration => { - return { - ServerCertificateConfigurations: - output.ServerCertificateConfigurations != null - ? de_ServerCertificateConfigurations(output.ServerCertificateConfigurations, context) - : undefined, - } as any; -}; +// de_InternalServerError omitted. + +// de_InvalidOperationException omitted. + +// de_InvalidRequestException omitted. + +// de_InvalidResourcePolicyException omitted. + +// de_InvalidTokenException omitted. + +// de_IPSet omitted. + +// de_IPSetMetadata omitted. + +// de_IPSetMetadataMap omitted. + +// de_IPSetReference omitted. + +// de_IPSetReferenceMap omitted. + +// de_IPSets omitted. + +// de_LimitExceededException omitted. + +// de_ListFirewallPoliciesResponse omitted. + +// de_ListFirewallsResponse omitted. + +// de_ListRuleGroupsResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListTLSInspectionConfigurationsResponse omitted. + +// de_LogDestinationConfig omitted. + +// de_LogDestinationConfigs omitted. + +// de_LogDestinationMap omitted. + +// de_LogDestinationPermissionException omitted. + +// de_LoggingConfiguration omitted. + +// de_MatchAttributes omitted. + +// de_PerObjectStatus omitted. + +// de_PortRange omitted. + +// de_PortRanges omitted. + +// de_PortSet omitted. + +// de_PortSets omitted. + +// de_ProtocolNumbers omitted. + +// de_PublishMetricAction omitted. + +// de_PutResourcePolicyResponse omitted. + +// de_ReferenceSets omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceOwnerCheckException omitted. + +// de_RuleDefinition omitted. + +// de_RuleGroup omitted. + +// de_RuleGroupMetadata omitted. /** - * deserializeAws_json1_0TLSInspectionConfigurationMetadata + * deserializeAws_json1_0RuleGroupResponse */ -const de_TLSInspectionConfigurationMetadata = ( - output: any, - context: __SerdeContext -): TLSInspectionConfigurationMetadata => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; +const de_RuleGroupResponse = (output: any, context: __SerdeContext): RuleGroupResponse => { + return take(output, { + Capacity: __expectInt32, + ConsumedCapacity: __expectInt32, + Description: __expectString, + EncryptionConfiguration: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfAssociations: __expectInt32, + RuleGroupArn: __expectString, + RuleGroupId: __expectString, + RuleGroupName: __expectString, + RuleGroupStatus: __expectString, + SnsTopic: __expectString, + SourceMetadata: _json, + Tags: _json, + Type: __expectString, + }) as any; }; +// de_RuleGroups omitted. + +// de_RuleOption omitted. + +// de_RuleOptions omitted. + +// de_RulesSource omitted. + +// de_RulesSourceList omitted. + +// de_RuleTargets omitted. + +// de_RuleVariables omitted. + +// de_ServerCertificate omitted. + +// de_ServerCertificateConfiguration omitted. + +// de_ServerCertificateConfigurations omitted. + +// de_ServerCertificates omitted. + +// de_ServerCertificateScope omitted. + +// de_ServerCertificateScopes omitted. + +// de_Settings omitted. + +// de_SourceMetadata omitted. + +// de_StatefulActions omitted. + +// de_StatefulEngineOptions omitted. + +// de_StatefulRule omitted. + +// de_StatefulRuleGroupOverride omitted. + +// de_StatefulRuleGroupReference omitted. + +// de_StatefulRuleGroupReferences omitted. + +// de_StatefulRuleOptions omitted. + +// de_StatefulRules omitted. + +// de_StatelessActions omitted. + +// de_StatelessRule omitted. + +// de_StatelessRuleGroupReference omitted. + +// de_StatelessRuleGroupReferences omitted. + +// de_StatelessRules omitted. + +// de_StatelessRulesAndCustomActions omitted. + +// de_SubnetMapping omitted. + +// de_SubnetMappings omitted. + +// de_SyncState omitted. + +// de_SyncStateConfig omitted. + +// de_SyncStates omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_TargetTypes omitted. + +// de_TCPFlagField omitted. + +// de_TCPFlags omitted. + +// de_ThrottlingException omitted. + +// de_TlsCertificateData omitted. + +// de_TLSInspectionConfiguration omitted. + +// de_TLSInspectionConfigurationMetadata omitted. + /** * deserializeAws_json1_0TLSInspectionConfigurationResponse */ @@ -5834,173 +3583,57 @@ const de_TLSInspectionConfigurationResponse = ( output: any, context: __SerdeContext ): TLSInspectionConfigurationResponse => { - return { - Certificates: output.Certificates != null ? de_Certificates(output.Certificates, context) : undefined, - Description: __expectString(output.Description), - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NumberOfAssociations: __expectInt32(output.NumberOfAssociations), - TLSInspectionConfigurationArn: __expectString(output.TLSInspectionConfigurationArn), - TLSInspectionConfigurationId: __expectString(output.TLSInspectionConfigurationId), - TLSInspectionConfigurationName: __expectString(output.TLSInspectionConfigurationName), - TLSInspectionConfigurationStatus: __expectString(output.TLSInspectionConfigurationStatus), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0TLSInspectionConfigurations - */ -const de_TLSInspectionConfigurations = (output: any, context: __SerdeContext): TLSInspectionConfigurationMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TLSInspectionConfigurationMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - Message: __expectString(output.Message), - } as any; + return take(output, { + Certificates: _json, + Description: __expectString, + EncryptionConfiguration: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfAssociations: __expectInt32, + TLSInspectionConfigurationArn: __expectString, + TLSInspectionConfigurationId: __expectString, + TLSInspectionConfigurationName: __expectString, + TLSInspectionConfigurationStatus: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_TLSInspectionConfigurations omitted. -/** - * deserializeAws_json1_0UpdateFirewallDeleteProtectionResponse - */ -const de_UpdateFirewallDeleteProtectionResponse = ( - output: any, - context: __SerdeContext -): UpdateFirewallDeleteProtectionResponse => { - return { - DeleteProtection: __expectBoolean(output.DeleteProtection), - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// de_UnsupportedOperationException omitted. -/** - * deserializeAws_json1_0UpdateFirewallDescriptionResponse - */ -const de_UpdateFirewallDescriptionResponse = ( - output: any, - context: __SerdeContext -): UpdateFirewallDescriptionResponse => { - return { - Description: __expectString(output.Description), - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_0UpdateFirewallEncryptionConfigurationResponse - */ -const de_UpdateFirewallEncryptionConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateFirewallEncryptionConfigurationResponse => { - return { - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// de_UpdateFirewallDeleteProtectionResponse omitted. -/** - * deserializeAws_json1_0UpdateFirewallPolicyChangeProtectionResponse - */ -const de_UpdateFirewallPolicyChangeProtectionResponse = ( - output: any, - context: __SerdeContext -): UpdateFirewallPolicyChangeProtectionResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - FirewallPolicyChangeProtection: __expectBoolean(output.FirewallPolicyChangeProtection), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// de_UpdateFirewallDescriptionResponse omitted. + +// de_UpdateFirewallEncryptionConfigurationResponse omitted. + +// de_UpdateFirewallPolicyChangeProtectionResponse omitted. /** * deserializeAws_json1_0UpdateFirewallPolicyResponse */ const de_UpdateFirewallPolicyResponse = (output: any, context: __SerdeContext): UpdateFirewallPolicyResponse => { - return { - FirewallPolicyResponse: - output.FirewallPolicyResponse != null - ? de_FirewallPolicyResponse(output.FirewallPolicyResponse, context) - : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; + return take(output, { + FirewallPolicyResponse: (_: any) => de_FirewallPolicyResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0UpdateLoggingConfigurationResponse - */ -const de_UpdateLoggingConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateLoggingConfigurationResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; +// de_UpdateLoggingConfigurationResponse omitted. /** * deserializeAws_json1_0UpdateRuleGroupResponse */ const de_UpdateRuleGroupResponse = (output: any, context: __SerdeContext): UpdateRuleGroupResponse => { - return { - RuleGroupResponse: - output.RuleGroupResponse != null ? de_RuleGroupResponse(output.RuleGroupResponse, context) : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; + return take(output, { + RuleGroupResponse: (_: any) => de_RuleGroupResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0UpdateSubnetChangeProtectionResponse - */ -const de_UpdateSubnetChangeProtectionResponse = ( - output: any, - context: __SerdeContext -): UpdateSubnetChangeProtectionResponse => { - return { - FirewallArn: __expectString(output.FirewallArn), - FirewallName: __expectString(output.FirewallName), - SubnetChangeProtection: __expectBoolean(output.SubnetChangeProtection), - UpdateToken: __expectString(output.UpdateToken), - } as any; -}; +// de_UpdateSubnetChangeProtectionResponse omitted. /** * deserializeAws_json1_0UpdateTLSInspectionConfigurationResponse @@ -6009,29 +3642,13 @@ const de_UpdateTLSInspectionConfigurationResponse = ( output: any, context: __SerdeContext ): UpdateTLSInspectionConfigurationResponse => { - return { - TLSInspectionConfigurationResponse: - output.TLSInspectionConfigurationResponse != null - ? de_TLSInspectionConfigurationResponse(output.TLSInspectionConfigurationResponse, context) - : undefined, - UpdateToken: __expectString(output.UpdateToken), - } as any; + return take(output, { + TLSInspectionConfigurationResponse: (_: any) => de_TLSInspectionConfigurationResponse(_, context), + UpdateToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0VariableDefinitionList - */ -const de_VariableDefinitionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VariableDefinitionList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -6053,6 +3670,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-networkmanager/src/protocols/Aws_restJson1.ts b/clients/client-networkmanager/src/protocols/Aws_restJson1.ts index e48bb0603378..22d46a00f7d4 100644 --- a/clients/client-networkmanager/src/protocols/Aws_restJson1.ts +++ b/clients/client-networkmanager/src/protocols/Aws_restJson1.ts @@ -1,21 +1,22 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -243,7 +244,6 @@ import { } from "../commands/UpdateVpcAttachmentCommand"; import { AccessDeniedException, - AccountStatus, Attachment, AWSLocation, Bandwidth, @@ -254,47 +254,24 @@ import { Connection, ConnectionHealth, ConnectPeer, - ConnectPeerAssociation, - ConnectPeerBgpConfiguration, - ConnectPeerConfiguration, ConnectPeerSummary, CoreNetwork, - CoreNetworkChange, CoreNetworkChangeEvent, - CoreNetworkChangeEventValues, - CoreNetworkChangeValues, - CoreNetworkEdge, CoreNetworkPolicy, - CoreNetworkPolicyError, CoreNetworkPolicyException, CoreNetworkPolicyVersion, - CoreNetworkSegment, CoreNetworkSegmentEdgeIdentifier, - CoreNetworkSummary, - CustomerGatewayAssociation, Device, GlobalNetwork, InternalServerException, Link, - LinkAssociation, Location, NetworkResource, - NetworkResourceCount, - NetworkResourceSummary, - NetworkRoute, - NetworkRouteDestination, NetworkTelemetry, - OrganizationStatus, - PathComponent, Peering, - ProposedSegmentChange, - Relationship, ResourceNotFoundException, RouteAnalysis, - RouteAnalysisCompletion, - RouteAnalysisEndpointOptions, RouteAnalysisEndpointOptionsSpecification, - RouteAnalysisPath, RouteState, RouteTableIdentifier, RouteType, @@ -303,13 +280,9 @@ import { SiteToSiteVpnAttachment, Tag, ThrottlingException, - TransitGatewayConnectPeerAssociation, TransitGatewayPeering, - TransitGatewayRegistration, - TransitGatewayRegistrationStateReason, TransitGatewayRouteTableAttachment, ValidationException, - ValidationExceptionField, VpcAttachment, VpcOptions, } from "../models/models_0"; @@ -369,11 +342,13 @@ export const se_AssociateConnectPeerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ConnectPeerId != null && { ConnectPeerId: input.ConnectPeerId }), - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.LinkId != null && { LinkId: input.LinkId }), - }); + body = JSON.stringify( + take(input, { + ConnectPeerId: [], + DeviceId: [], + LinkId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -408,11 +383,13 @@ export const se_AssociateCustomerGatewayCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CustomerGatewayArn != null && { CustomerGatewayArn: input.CustomerGatewayArn }), - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.LinkId != null && { LinkId: input.LinkId }), - }); + body = JSON.stringify( + take(input, { + CustomerGatewayArn: [], + DeviceId: [], + LinkId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -447,10 +424,12 @@ export const se_AssociateLinkCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.LinkId != null && { LinkId: input.LinkId }), - }); + body = JSON.stringify( + take(input, { + DeviceId: [], + LinkId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -485,13 +464,13 @@ export const se_AssociateTransitGatewayConnectPeerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.LinkId != null && { LinkId: input.LinkId }), - ...(input.TransitGatewayConnectPeerArn != null && { - TransitGatewayConnectPeerArn: input.TransitGatewayConnectPeerArn, - }), - }); + body = JSON.stringify( + take(input, { + DeviceId: [], + LinkId: [], + TransitGatewayConnectPeerArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -516,14 +495,16 @@ export const se_CreateConnectAttachmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connect-attachments"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }), - ...(input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation }), - ...(input.Options != null && { Options: se_ConnectAttachmentOptions(input.Options, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TransportAttachmentId != null && { TransportAttachmentId: input.TransportAttachmentId }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CoreNetworkId: [], + EdgeLocation: [], + Options: (_) => _json(_), + Tags: (_) => _json(_), + TransportAttachmentId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -558,14 +539,16 @@ export const se_CreateConnectionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ConnectedDeviceId != null && { ConnectedDeviceId: input.ConnectedDeviceId }), - ...(input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.LinkId != null && { LinkId: input.LinkId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ConnectedDeviceId: [], + ConnectedLinkId: [], + Description: [], + DeviceId: [], + LinkId: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -590,17 +573,17 @@ export const se_CreateConnectPeerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connect-peers"; let body: any; - body = JSON.stringify({ - ...(input.BgpOptions != null && { BgpOptions: se_BgpOptions(input.BgpOptions, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ConnectAttachmentId != null && { ConnectAttachmentId: input.ConnectAttachmentId }), - ...(input.CoreNetworkAddress != null && { CoreNetworkAddress: input.CoreNetworkAddress }), - ...(input.InsideCidrBlocks != null && { - InsideCidrBlocks: se_ConstrainedStringList(input.InsideCidrBlocks, context), - }), - ...(input.PeerAddress != null && { PeerAddress: input.PeerAddress }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + BgpOptions: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ConnectAttachmentId: [], + CoreNetworkAddress: [], + InsideCidrBlocks: (_) => _json(_), + PeerAddress: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -625,13 +608,15 @@ export const se_CreateCoreNetworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/core-networks"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.GlobalNetworkId != null && { GlobalNetworkId: input.GlobalNetworkId }), - ...(input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + GlobalNetworkId: [], + PolicyDocument: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -666,17 +651,19 @@ export const se_CreateDeviceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AWSLocation != null && { AWSLocation: se_AWSLocation(input.AWSLocation, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Location != null && { Location: se_Location(input.Location, context) }), - ...(input.Model != null && { Model: input.Model }), - ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }), - ...(input.SiteId != null && { SiteId: input.SiteId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Vendor != null && { Vendor: input.Vendor }), - }); + body = JSON.stringify( + take(input, { + AWSLocation: (_) => _json(_), + Description: [], + Location: (_) => _json(_), + Model: [], + SerialNumber: [], + SiteId: [], + Tags: (_) => _json(_), + Type: [], + Vendor: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -701,10 +688,12 @@ export const se_CreateGlobalNetworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -738,14 +727,16 @@ export const se_CreateLinkCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Bandwidth != null && { Bandwidth: se_Bandwidth(input.Bandwidth, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Provider != null && { Provider: input.Provider }), - ...(input.SiteId != null && { SiteId: input.SiteId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Bandwidth: (_) => _json(_), + Description: [], + Provider: [], + SiteId: [], + Tags: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -779,11 +770,13 @@ export const se_CreateSiteCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Location != null && { Location: se_Location(input.Location, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Location: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -809,12 +802,14 @@ export const se_CreateSiteToSiteVpnAttachmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/site-to-site-vpn-attachments"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpnConnectionArn != null && { VpnConnectionArn: input.VpnConnectionArn }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CoreNetworkId: [], + Tags: (_) => _json(_), + VpnConnectionArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -840,12 +835,14 @@ export const se_CreateTransitGatewayPeeringCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-peerings"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CoreNetworkId: [], + Tags: (_) => _json(_), + TransitGatewayArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -871,14 +868,14 @@ export const se_CreateTransitGatewayRouteTableAttachmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-route-table-attachments"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.PeeringId != null && { PeeringId: input.PeeringId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TransitGatewayRouteTableArn != null && { - TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn, - }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + PeeringId: [], + Tags: (_) => _json(_), + TransitGatewayRouteTableArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -903,14 +900,16 @@ export const se_CreateVpcAttachmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpc-attachments"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }), - ...(input.Options != null && { Options: se_VpcOptions(input.Options, context) }), - ...(input.SubnetArns != null && { SubnetArns: se_SubnetArnList(input.SubnetArns, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcArn != null && { VpcArn: input.VpcArn }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CoreNetworkId: [], + Options: (_) => _json(_), + SubnetArns: (_) => _json(_), + Tags: (_) => _json(_), + VpcArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2149,25 +2148,19 @@ export const se_GetNetworkRoutesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DestinationFilters != null && { DestinationFilters: se_FilterMap(input.DestinationFilters, context) }), - ...(input.ExactCidrMatches != null && { - ExactCidrMatches: se_ConstrainedStringList(input.ExactCidrMatches, context), - }), - ...(input.LongestPrefixMatches != null && { - LongestPrefixMatches: se_ConstrainedStringList(input.LongestPrefixMatches, context), - }), - ...(input.PrefixListIds != null && { PrefixListIds: se_ConstrainedStringList(input.PrefixListIds, context) }), - ...(input.RouteTableIdentifier != null && { - RouteTableIdentifier: se_RouteTableIdentifier(input.RouteTableIdentifier, context), - }), - ...(input.States != null && { States: se_RouteStateList(input.States, context) }), - ...(input.SubnetOfMatches != null && { SubnetOfMatches: se_ConstrainedStringList(input.SubnetOfMatches, context) }), - ...(input.SupernetOfMatches != null && { - SupernetOfMatches: se_ConstrainedStringList(input.SupernetOfMatches, context), - }), - ...(input.Types != null && { Types: se_RouteTypeList(input.Types, context) }), - }); + body = JSON.stringify( + take(input, { + DestinationFilters: (_) => _json(_), + ExactCidrMatches: (_) => _json(_), + LongestPrefixMatches: (_) => _json(_), + PrefixListIds: (_) => _json(_), + RouteTableIdentifier: (_) => _json(_), + States: (_) => _json(_), + SubnetOfMatches: (_) => _json(_), + SupernetOfMatches: (_) => _json(_), + Types: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2753,12 +2746,14 @@ export const se_PutCoreNetworkPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.LatestVersionId != null && { LatestVersionId: input.LatestVersionId }), - ...(input.PolicyDocument != null && { PolicyDocument: __LazyJsonString.fromObject(input.PolicyDocument) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + LatestVersionId: [], + PolicyDocument: (_) => __LazyJsonString.fromObject(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2785,9 +2780,11 @@ export const se_PutResourcePolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource-policy/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.PolicyDocument != null && { PolicyDocument: __LazyJsonString.fromObject(input.PolicyDocument) }), - }); + body = JSON.stringify( + take(input, { + PolicyDocument: (_) => __LazyJsonString.fromObject(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2822,9 +2819,11 @@ export const se_RegisterTransitGatewayCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn }), - }); + body = JSON.stringify( + take(input, { + TransitGatewayArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2921,9 +2920,11 @@ export const se_StartOrganizationServiceAccessUpdateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizations/service-access"; let body: any; - body = JSON.stringify({ - ...(input.Action != null && { Action: input.Action }), - }); + body = JSON.stringify( + take(input, { + Action: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2958,14 +2959,14 @@ export const se_StartRouteAnalysisCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Destination != null && { - Destination: se_RouteAnalysisEndpointOptionsSpecification(input.Destination, context), - }), - ...(input.IncludeReturnPath != null && { IncludeReturnPath: input.IncludeReturnPath }), - ...(input.Source != null && { Source: se_RouteAnalysisEndpointOptionsSpecification(input.Source, context) }), - ...(input.UseMiddleboxes != null && { UseMiddleboxes: input.UseMiddleboxes }), - }); + body = JSON.stringify( + take(input, { + Destination: (_) => _json(_), + IncludeReturnPath: [], + Source: (_) => _json(_), + UseMiddleboxes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2991,9 +2992,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3066,11 +3069,13 @@ export const se_UpdateConnectionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LinkId != null && { LinkId: input.LinkId }), - }); + body = JSON.stringify( + take(input, { + ConnectedLinkId: [], + Description: [], + LinkId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3104,9 +3109,11 @@ export const se_UpdateCoreNetworkCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3142,16 +3149,18 @@ export const se_UpdateDeviceCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId!, "{DeviceId}", false); let body: any; - body = JSON.stringify({ - ...(input.AWSLocation != null && { AWSLocation: se_AWSLocation(input.AWSLocation, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Location != null && { Location: se_Location(input.Location, context) }), - ...(input.Model != null && { Model: input.Model }), - ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }), - ...(input.SiteId != null && { SiteId: input.SiteId }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Vendor != null && { Vendor: input.Vendor }), - }); + body = JSON.stringify( + take(input, { + AWSLocation: (_) => _json(_), + Description: [], + Location: (_) => _json(_), + Model: [], + SerialNumber: [], + SiteId: [], + Type: [], + Vendor: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3185,9 +3194,11 @@ export const se_UpdateGlobalNetworkCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3223,12 +3234,14 @@ export const se_UpdateLinkCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "LinkId", () => input.LinkId!, "{LinkId}", false); let body: any; - body = JSON.stringify({ - ...(input.Bandwidth != null && { Bandwidth: se_Bandwidth(input.Bandwidth, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Provider != null && { Provider: input.Provider }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Bandwidth: (_) => _json(_), + Description: [], + Provider: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3264,9 +3277,11 @@ export const se_UpdateNetworkResourceMetadataCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Metadata != null && { Metadata: se_NetworkResourceMetadataMap(input.Metadata, context) }), - }); + body = JSON.stringify( + take(input, { + Metadata: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3302,10 +3317,12 @@ export const se_UpdateSiteCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId!, "{SiteId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Location != null && { Location: se_Location(input.Location, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Location: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3339,11 +3356,13 @@ export const se_UpdateVpcAttachmentCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AddSubnetArns != null && { AddSubnetArns: se_SubnetArnList(input.AddSubnetArns, context) }), - ...(input.Options != null && { Options: se_VpcOptions(input.Options, context) }), - ...(input.RemoveSubnetArns != null && { RemoveSubnetArns: se_SubnetArnList(input.RemoveSubnetArns, context) }), - }); + body = JSON.stringify( + take(input, { + AddSubnetArns: (_) => _json(_), + Options: (_) => _json(_), + RemoveSubnetArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3369,9 +3388,10 @@ export const de_AcceptAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attachment != null) { - contents.Attachment = de_Attachment(data.Attachment, context); - } + const doc = take(data, { + Attachment: (_) => de_Attachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3408,10 +3428,9 @@ const de_AcceptAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3431,9 +3450,10 @@ export const de_AssociateConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeerAssociation != null) { - contents.ConnectPeerAssociation = de_ConnectPeerAssociation(data.ConnectPeerAssociation, context); - } + const doc = take(data, { + ConnectPeerAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3473,10 +3493,9 @@ const de_AssociateConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3496,9 +3515,10 @@ export const de_AssociateCustomerGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomerGatewayAssociation != null) { - contents.CustomerGatewayAssociation = de_CustomerGatewayAssociation(data.CustomerGatewayAssociation, context); - } + const doc = take(data, { + CustomerGatewayAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3538,10 +3558,9 @@ const de_AssociateCustomerGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3561,9 +3580,10 @@ export const de_AssociateLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LinkAssociation != null) { - contents.LinkAssociation = de_LinkAssociation(data.LinkAssociation, context); - } + const doc = take(data, { + LinkAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3603,10 +3623,9 @@ const de_AssociateLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,12 +3645,10 @@ export const de_AssociateTransitGatewayConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayConnectPeerAssociation != null) { - contents.TransitGatewayConnectPeerAssociation = de_TransitGatewayConnectPeerAssociation( - data.TransitGatewayConnectPeerAssociation, - context - ); - } + const doc = take(data, { + TransitGatewayConnectPeerAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3671,10 +3688,9 @@ const de_AssociateTransitGatewayConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3694,9 +3710,10 @@ export const de_CreateConnectAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectAttachment != null) { - contents.ConnectAttachment = de_ConnectAttachment(data.ConnectAttachment, context); - } + const doc = take(data, { + ConnectAttachment: (_) => de_ConnectAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3733,10 +3750,9 @@ const de_CreateConnectAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3756,9 +3772,10 @@ export const de_CreateConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_Connection(data.Connection, context); - } + const doc = take(data, { + Connection: (_) => de_Connection(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3795,10 +3812,9 @@ const de_CreateConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3818,9 +3834,10 @@ export const de_CreateConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeer != null) { - contents.ConnectPeer = de_ConnectPeer(data.ConnectPeer, context); - } + const doc = take(data, { + ConnectPeer: (_) => de_ConnectPeer(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3857,10 +3874,9 @@ const de_CreateConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3880,9 +3896,10 @@ export const de_CreateCoreNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetwork != null) { - contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context); - } + const doc = take(data, { + CoreNetwork: (_) => de_CoreNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3922,10 +3939,9 @@ const de_CreateCoreNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3945,9 +3961,10 @@ export const de_CreateDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Device != null) { - contents.Device = de_Device(data.Device, context); - } + const doc = take(data, { + Device: (_) => de_Device(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3987,10 +4004,9 @@ const de_CreateDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4010,9 +4026,10 @@ export const de_CreateGlobalNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GlobalNetwork != null) { - contents.GlobalNetwork = de_GlobalNetwork(data.GlobalNetwork, context); - } + const doc = take(data, { + GlobalNetwork: (_) => de_GlobalNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4049,10 +4066,9 @@ const de_CreateGlobalNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4072,9 +4088,10 @@ export const de_CreateLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Link != null) { - contents.Link = de_Link(data.Link, context); - } + const doc = take(data, { + Link: (_) => de_Link(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4114,10 +4131,9 @@ const de_CreateLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4137,9 +4153,10 @@ export const de_CreateSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: (_) => de_Site(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4179,10 +4196,9 @@ const de_CreateSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4202,9 +4218,10 @@ export const de_CreateSiteToSiteVpnAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SiteToSiteVpnAttachment != null) { - contents.SiteToSiteVpnAttachment = de_SiteToSiteVpnAttachment(data.SiteToSiteVpnAttachment, context); - } + const doc = take(data, { + SiteToSiteVpnAttachment: (_) => de_SiteToSiteVpnAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4241,10 +4258,9 @@ const de_CreateSiteToSiteVpnAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4264,9 +4280,10 @@ export const de_CreateTransitGatewayPeeringCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayPeering != null) { - contents.TransitGatewayPeering = de_TransitGatewayPeering(data.TransitGatewayPeering, context); - } + const doc = take(data, { + TransitGatewayPeering: (_) => de_TransitGatewayPeering(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4303,10 +4320,9 @@ const de_CreateTransitGatewayPeeringCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4326,12 +4342,10 @@ export const de_CreateTransitGatewayRouteTableAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayRouteTableAttachment != null) { - contents.TransitGatewayRouteTableAttachment = de_TransitGatewayRouteTableAttachment( - data.TransitGatewayRouteTableAttachment, - context - ); - } + const doc = take(data, { + TransitGatewayRouteTableAttachment: (_) => de_TransitGatewayRouteTableAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4368,10 +4382,9 @@ const de_CreateTransitGatewayRouteTableAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4391,9 +4404,10 @@ export const de_CreateVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcAttachment != null) { - contents.VpcAttachment = de_VpcAttachment(data.VpcAttachment, context); - } + const doc = take(data, { + VpcAttachment: (_) => de_VpcAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4430,10 +4444,9 @@ const de_CreateVpcAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4453,9 +4466,10 @@ export const de_DeleteAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attachment != null) { - contents.Attachment = de_Attachment(data.Attachment, context); - } + const doc = take(data, { + Attachment: (_) => de_Attachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4492,10 +4506,9 @@ const de_DeleteAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4515,9 +4528,10 @@ export const de_DeleteConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_Connection(data.Connection, context); - } + const doc = take(data, { + Connection: (_) => de_Connection(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4554,10 +4568,9 @@ const de_DeleteConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4577,9 +4590,10 @@ export const de_DeleteConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeer != null) { - contents.ConnectPeer = de_ConnectPeer(data.ConnectPeer, context); - } + const doc = take(data, { + ConnectPeer: (_) => de_ConnectPeer(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4616,10 +4630,9 @@ const de_DeleteConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4639,9 +4652,10 @@ export const de_DeleteCoreNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetwork != null) { - contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context); - } + const doc = take(data, { + CoreNetwork: (_) => de_CoreNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4678,10 +4692,9 @@ const de_DeleteCoreNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4701,9 +4714,10 @@ export const de_DeleteCoreNetworkPolicyVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkPolicy != null) { - contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context); - } + const doc = take(data, { + CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4740,10 +4754,9 @@ const de_DeleteCoreNetworkPolicyVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4763,9 +4776,10 @@ export const de_DeleteDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Device != null) { - contents.Device = de_Device(data.Device, context); - } + const doc = take(data, { + Device: (_) => de_Device(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4802,10 +4816,9 @@ const de_DeleteDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4825,9 +4838,10 @@ export const de_DeleteGlobalNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GlobalNetwork != null) { - contents.GlobalNetwork = de_GlobalNetwork(data.GlobalNetwork, context); - } + const doc = take(data, { + GlobalNetwork: (_) => de_GlobalNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4864,10 +4878,9 @@ const de_DeleteGlobalNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4887,9 +4900,10 @@ export const de_DeleteLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Link != null) { - contents.Link = de_Link(data.Link, context); - } + const doc = take(data, { + Link: (_) => de_Link(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4926,10 +4940,9 @@ const de_DeleteLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4949,9 +4962,10 @@ export const de_DeletePeeringCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Peering != null) { - contents.Peering = de_Peering(data.Peering, context); - } + const doc = take(data, { + Peering: (_) => de_Peering(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4988,10 +5002,9 @@ const de_DeletePeeringCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5044,10 +5057,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5067,9 +5079,10 @@ export const de_DeleteSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: (_) => de_Site(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5106,10 +5119,9 @@ const de_DeleteSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5129,9 +5141,10 @@ export const de_DeregisterTransitGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayRegistration != null) { - contents.TransitGatewayRegistration = de_TransitGatewayRegistration(data.TransitGatewayRegistration, context); - } + const doc = take(data, { + TransitGatewayRegistration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5168,10 +5181,9 @@ const de_DeregisterTransitGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5191,12 +5203,11 @@ export const de_DescribeGlobalNetworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GlobalNetworks != null) { - contents.GlobalNetworks = de_GlobalNetworkList(data.GlobalNetworks, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + GlobalNetworks: (_) => de_GlobalNetworkList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5230,10 +5241,9 @@ const de_DescribeGlobalNetworksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5253,9 +5263,10 @@ export const de_DisassociateConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeerAssociation != null) { - contents.ConnectPeerAssociation = de_ConnectPeerAssociation(data.ConnectPeerAssociation, context); - } + const doc = take(data, { + ConnectPeerAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5292,10 +5303,9 @@ const de_DisassociateConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5315,9 +5325,10 @@ export const de_DisassociateCustomerGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomerGatewayAssociation != null) { - contents.CustomerGatewayAssociation = de_CustomerGatewayAssociation(data.CustomerGatewayAssociation, context); - } + const doc = take(data, { + CustomerGatewayAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5354,10 +5365,9 @@ const de_DisassociateCustomerGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5377,9 +5387,10 @@ export const de_DisassociateLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LinkAssociation != null) { - contents.LinkAssociation = de_LinkAssociation(data.LinkAssociation, context); - } + const doc = take(data, { + LinkAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5416,10 +5427,9 @@ const de_DisassociateLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5439,12 +5449,10 @@ export const de_DisassociateTransitGatewayConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayConnectPeerAssociation != null) { - contents.TransitGatewayConnectPeerAssociation = de_TransitGatewayConnectPeerAssociation( - data.TransitGatewayConnectPeerAssociation, - context - ); - } + const doc = take(data, { + TransitGatewayConnectPeerAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5481,10 +5489,9 @@ const de_DisassociateTransitGatewayConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5540,10 +5547,9 @@ const de_ExecuteCoreNetworkChangeSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5563,9 +5569,10 @@ export const de_GetConnectAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectAttachment != null) { - contents.ConnectAttachment = de_ConnectAttachment(data.ConnectAttachment, context); - } + const doc = take(data, { + ConnectAttachment: (_) => de_ConnectAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5599,10 +5606,9 @@ const de_GetConnectAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5622,12 +5628,11 @@ export const de_GetConnectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connections != null) { - contents.Connections = de_ConnectionList(data.Connections, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Connections: (_) => de_ConnectionList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5661,10 +5666,9 @@ const de_GetConnectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5684,9 +5688,10 @@ export const de_GetConnectPeerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeer != null) { - contents.ConnectPeer = de_ConnectPeer(data.ConnectPeer, context); - } + const doc = take(data, { + ConnectPeer: (_) => de_ConnectPeer(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5720,10 +5725,9 @@ const de_GetConnectPeerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5743,12 +5747,11 @@ export const de_GetConnectPeerAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeerAssociations != null) { - contents.ConnectPeerAssociations = de_ConnectPeerAssociationList(data.ConnectPeerAssociations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ConnectPeerAssociations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5785,10 +5788,9 @@ const de_GetConnectPeerAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5808,9 +5810,10 @@ export const de_GetCoreNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetwork != null) { - contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context); - } + const doc = take(data, { + CoreNetwork: (_) => de_CoreNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5844,10 +5847,9 @@ const de_GetCoreNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5867,12 +5869,11 @@ export const de_GetCoreNetworkChangeEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkChangeEvents != null) { - contents.CoreNetworkChangeEvents = de_CoreNetworkChangeEventList(data.CoreNetworkChangeEvents, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CoreNetworkChangeEvents: (_) => de_CoreNetworkChangeEventList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5906,10 +5907,9 @@ const de_GetCoreNetworkChangeEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5929,12 +5929,11 @@ export const de_GetCoreNetworkChangeSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkChanges != null) { - contents.CoreNetworkChanges = de_CoreNetworkChangeList(data.CoreNetworkChanges, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CoreNetworkChanges: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5968,10 +5967,9 @@ const de_GetCoreNetworkChangeSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5991,9 +5989,10 @@ export const de_GetCoreNetworkPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkPolicy != null) { - contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context); - } + const doc = take(data, { + CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6027,10 +6026,9 @@ const de_GetCoreNetworkPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6050,12 +6048,11 @@ export const de_GetCustomerGatewayAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomerGatewayAssociations != null) { - contents.CustomerGatewayAssociations = de_CustomerGatewayAssociationList(data.CustomerGatewayAssociations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CustomerGatewayAssociations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6092,10 +6089,9 @@ const de_GetCustomerGatewayAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6115,12 +6111,11 @@ export const de_GetDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Devices != null) { - contents.Devices = de_DeviceList(data.Devices, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Devices: (_) => de_DeviceList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6154,10 +6149,9 @@ const de_GetDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6177,12 +6171,11 @@ export const de_GetLinkAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LinkAssociations != null) { - contents.LinkAssociations = de_LinkAssociationList(data.LinkAssociations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LinkAssociations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6216,10 +6209,9 @@ const de_GetLinkAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6239,12 +6231,11 @@ export const de_GetLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Links != null) { - contents.Links = de_LinkList(data.Links, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Links: (_) => de_LinkList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6278,10 +6269,9 @@ const de_GetLinksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6301,12 +6291,11 @@ export const de_GetNetworkResourceCountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NetworkResourceCounts != null) { - contents.NetworkResourceCounts = de_NetworkResourceCountList(data.NetworkResourceCounts, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + NetworkResourceCounts: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6337,10 +6326,9 @@ const de_GetNetworkResourceCountsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6360,12 +6348,11 @@ export const de_GetNetworkResourceRelationshipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Relationships != null) { - contents.Relationships = de_RelationshipList(data.Relationships, context); - } + const doc = take(data, { + NextToken: __expectString, + Relationships: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6399,10 +6386,9 @@ const de_GetNetworkResourceRelationshipsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6422,12 +6408,11 @@ export const de_GetNetworkResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NetworkResources != null) { - contents.NetworkResources = de_NetworkResourceList(data.NetworkResources, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + NetworkResources: (_) => de_NetworkResourceList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6461,10 +6446,9 @@ const de_GetNetworkResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6484,21 +6468,14 @@ export const de_GetNetworkRoutesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkSegmentEdge != null) { - contents.CoreNetworkSegmentEdge = de_CoreNetworkSegmentEdgeIdentifier(data.CoreNetworkSegmentEdge, context); - } - if (data.NetworkRoutes != null) { - contents.NetworkRoutes = de_NetworkRouteList(data.NetworkRoutes, context); - } - if (data.RouteTableArn != null) { - contents.RouteTableArn = __expectString(data.RouteTableArn); - } - if (data.RouteTableTimestamp != null) { - contents.RouteTableTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.RouteTableTimestamp))); - } - if (data.RouteTableType != null) { - contents.RouteTableType = __expectString(data.RouteTableType); - } + const doc = take(data, { + CoreNetworkSegmentEdge: _json, + NetworkRoutes: _json, + RouteTableArn: __expectString, + RouteTableTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RouteTableType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6532,10 +6509,9 @@ const de_GetNetworkRoutesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6555,12 +6531,11 @@ export const de_GetNetworkTelemetryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NetworkTelemetry != null) { - contents.NetworkTelemetry = de_NetworkTelemetryList(data.NetworkTelemetry, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + NetworkTelemetry: (_) => de_NetworkTelemetryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6594,10 +6569,9 @@ const de_GetNetworkTelemetryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6617,9 +6591,10 @@ export const de_GetResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PolicyDocument != null) { - contents.PolicyDocument = new __LazyJsonString(data.PolicyDocument); - } + const doc = take(data, { + PolicyDocument: (_) => new __LazyJsonString(_), + }); + Object.assign(contents, doc); return contents; }; @@ -6650,10 +6625,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6673,9 +6647,10 @@ export const de_GetRouteAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RouteAnalysis != null) { - contents.RouteAnalysis = de_RouteAnalysis(data.RouteAnalysis, context); - } + const doc = take(data, { + RouteAnalysis: (_) => de_RouteAnalysis(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6709,10 +6684,9 @@ const de_GetRouteAnalysisCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6732,12 +6706,11 @@ export const de_GetSitesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Sites != null) { - contents.Sites = de_SiteList(data.Sites, context); - } + const doc = take(data, { + NextToken: __expectString, + Sites: (_) => de_SiteList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6771,10 +6744,9 @@ const de_GetSitesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6794,9 +6766,10 @@ export const de_GetSiteToSiteVpnAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SiteToSiteVpnAttachment != null) { - contents.SiteToSiteVpnAttachment = de_SiteToSiteVpnAttachment(data.SiteToSiteVpnAttachment, context); - } + const doc = take(data, { + SiteToSiteVpnAttachment: (_) => de_SiteToSiteVpnAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6830,10 +6803,9 @@ const de_GetSiteToSiteVpnAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6853,15 +6825,11 @@ export const de_GetTransitGatewayConnectPeerAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TransitGatewayConnectPeerAssociations != null) { - contents.TransitGatewayConnectPeerAssociations = de_TransitGatewayConnectPeerAssociationList( - data.TransitGatewayConnectPeerAssociations, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + TransitGatewayConnectPeerAssociations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6898,10 +6866,9 @@ const de_GetTransitGatewayConnectPeerAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6921,9 +6888,10 @@ export const de_GetTransitGatewayPeeringCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayPeering != null) { - contents.TransitGatewayPeering = de_TransitGatewayPeering(data.TransitGatewayPeering, context); - } + const doc = take(data, { + TransitGatewayPeering: (_) => de_TransitGatewayPeering(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6957,10 +6925,9 @@ const de_GetTransitGatewayPeeringCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6980,12 +6947,11 @@ export const de_GetTransitGatewayRegistrationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TransitGatewayRegistrations != null) { - contents.TransitGatewayRegistrations = de_TransitGatewayRegistrationList(data.TransitGatewayRegistrations, context); - } + const doc = take(data, { + NextToken: __expectString, + TransitGatewayRegistrations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7019,10 +6985,9 @@ const de_GetTransitGatewayRegistrationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7042,12 +7007,10 @@ export const de_GetTransitGatewayRouteTableAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayRouteTableAttachment != null) { - contents.TransitGatewayRouteTableAttachment = de_TransitGatewayRouteTableAttachment( - data.TransitGatewayRouteTableAttachment, - context - ); - } + const doc = take(data, { + TransitGatewayRouteTableAttachment: (_) => de_TransitGatewayRouteTableAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7081,10 +7044,9 @@ const de_GetTransitGatewayRouteTableAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7104,9 +7066,10 @@ export const de_GetVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcAttachment != null) { - contents.VpcAttachment = de_VpcAttachment(data.VpcAttachment, context); - } + const doc = take(data, { + VpcAttachment: (_) => de_VpcAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7140,10 +7103,9 @@ const de_GetVpcAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7163,12 +7125,11 @@ export const de_ListAttachmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attachments != null) { - contents.Attachments = de_AttachmentList(data.Attachments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Attachments: (_) => de_AttachmentList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7199,10 +7160,9 @@ const de_ListAttachmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7222,12 +7182,11 @@ export const de_ListConnectPeersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectPeers != null) { - contents.ConnectPeers = de_ConnectPeerSummaryList(data.ConnectPeers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ConnectPeers: (_) => de_ConnectPeerSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7258,10 +7217,9 @@ const de_ListConnectPeersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7281,12 +7239,11 @@ export const de_ListCoreNetworkPolicyVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkPolicyVersions != null) { - contents.CoreNetworkPolicyVersions = de_CoreNetworkPolicyVersionList(data.CoreNetworkPolicyVersions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CoreNetworkPolicyVersions: (_) => de_CoreNetworkPolicyVersionList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7320,10 +7277,9 @@ const de_ListCoreNetworkPolicyVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7343,12 +7299,11 @@ export const de_ListCoreNetworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworks != null) { - contents.CoreNetworks = de_CoreNetworkSummaryList(data.CoreNetworks, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CoreNetworks: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7379,10 +7334,9 @@ const de_ListCoreNetworksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7402,12 +7356,11 @@ export const de_ListOrganizationServiceAccessStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.OrganizationStatus != null) { - contents.OrganizationStatus = de_OrganizationStatus(data.OrganizationStatus, context); - } + const doc = take(data, { + NextToken: __expectString, + OrganizationStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7424,10 +7377,9 @@ const de_ListOrganizationServiceAccessStatusCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7446,12 +7398,11 @@ export const de_ListPeeringsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Peerings != null) { - contents.Peerings = de_PeeringList(data.Peerings, context); - } + const doc = take(data, { + NextToken: __expectString, + Peerings: (_) => de_PeeringList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7482,10 +7433,9 @@ const de_ListPeeringsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7505,9 +7455,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TagList != null) { - contents.TagList = de_TagList(data.TagList, context); - } + const doc = take(data, { + TagList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7541,10 +7492,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7564,9 +7514,10 @@ export const de_PutCoreNetworkPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkPolicy != null) { - contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context); - } + const doc = take(data, { + CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7606,10 +7557,9 @@ const de_PutCoreNetworkPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7665,10 +7615,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7688,9 +7637,10 @@ export const de_RegisterTransitGatewayCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TransitGatewayRegistration != null) { - contents.TransitGatewayRegistration = de_TransitGatewayRegistration(data.TransitGatewayRegistration, context); - } + const doc = take(data, { + TransitGatewayRegistration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7727,10 +7677,9 @@ const de_RegisterTransitGatewayCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7750,9 +7699,10 @@ export const de_RejectAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Attachment != null) { - contents.Attachment = de_Attachment(data.Attachment, context); - } + const doc = take(data, { + Attachment: (_) => de_Attachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7789,10 +7739,9 @@ const de_RejectAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7812,9 +7761,10 @@ export const de_RestoreCoreNetworkPolicyVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetworkPolicy != null) { - contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context); - } + const doc = take(data, { + CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7851,10 +7801,9 @@ const de_RestoreCoreNetworkPolicyVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7874,9 +7823,10 @@ export const de_StartOrganizationServiceAccessUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.OrganizationStatus != null) { - contents.OrganizationStatus = de_OrganizationStatus(data.OrganizationStatus, context); - } + const doc = take(data, { + OrganizationStatus: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7913,10 +7863,9 @@ const de_StartOrganizationServiceAccessUpdateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7936,9 +7885,10 @@ export const de_StartRouteAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RouteAnalysis != null) { - contents.RouteAnalysis = de_RouteAnalysis(data.RouteAnalysis, context); - } + const doc = take(data, { + RouteAnalysis: (_) => de_RouteAnalysis(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -7975,10 +7925,9 @@ const de_StartRouteAnalysisCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8037,10 +7986,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8096,10 +8044,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8119,9 +8066,10 @@ export const de_UpdateConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_Connection(data.Connection, context); - } + const doc = take(data, { + Connection: (_) => de_Connection(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8158,10 +8106,9 @@ const de_UpdateConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8181,9 +8128,10 @@ export const de_UpdateCoreNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CoreNetwork != null) { - contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context); - } + const doc = take(data, { + CoreNetwork: (_) => de_CoreNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8220,10 +8168,9 @@ const de_UpdateCoreNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8243,9 +8190,10 @@ export const de_UpdateDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Device != null) { - contents.Device = de_Device(data.Device, context); - } + const doc = take(data, { + Device: (_) => de_Device(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8282,10 +8230,9 @@ const de_UpdateDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8305,9 +8252,10 @@ export const de_UpdateGlobalNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GlobalNetwork != null) { - contents.GlobalNetwork = de_GlobalNetwork(data.GlobalNetwork, context); - } + const doc = take(data, { + GlobalNetwork: (_) => de_GlobalNetwork(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8344,10 +8292,9 @@ const de_UpdateGlobalNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8367,9 +8314,10 @@ export const de_UpdateLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Link != null) { - contents.Link = de_Link(data.Link, context); - } + const doc = take(data, { + Link: (_) => de_Link(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8409,10 +8357,9 @@ const de_UpdateLinkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8432,12 +8379,11 @@ export const de_UpdateNetworkResourceMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Metadata != null) { - contents.Metadata = de_NetworkResourceMetadataMap(data.Metadata, context); - } - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } + const doc = take(data, { + Metadata: _json, + ResourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -8474,10 +8420,9 @@ const de_UpdateNetworkResourceMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8497,9 +8442,10 @@ export const de_UpdateSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: (_) => de_Site(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8536,10 +8482,9 @@ const de_UpdateSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8559,9 +8504,10 @@ export const de_UpdateVpcAttachmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcAttachment != null) { - contents.VpcAttachment = de_VpcAttachment(data.VpcAttachment, context); - } + const doc = take(data, { + VpcAttachment: (_) => de_VpcAttachment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -8598,16 +8544,15 @@ const de_UpdateVpcAttachmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -8617,9 +8562,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8633,15 +8579,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8658,12 +8601,11 @@ const de_CoreNetworkPolicyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Errors != null) { - contents.Errors = de_CoreNetworkPolicyErrorList(data.Errors, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Errors: _json, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new CoreNetworkPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8685,9 +8627,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8704,18 +8647,13 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Context != null) { - contents.Context = de_ExceptionContextMap(data.Context, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Context: _json, + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8732,21 +8670,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.LimitCode != null) { - contents.LimitCode = __expectString(data.LimitCode); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + LimitCode: __expectString, + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8765,9 +8696,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8781,15 +8713,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Fields != null) { - contents.Fields = de_ValidationExceptionFieldList(data.Fields, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Fields: _json, + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8797,257 +8726,66 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AWSLocation - */ -const se_AWSLocation = (input: AWSLocation, context: __SerdeContext): any => { - return { - ...(input.SubnetArn != null && { SubnetArn: input.SubnetArn }), - ...(input.Zone != null && { Zone: input.Zone }), - }; -}; +// se_AWSLocation omitted. -/** - * serializeAws_restJson1Bandwidth - */ -const se_Bandwidth = (input: Bandwidth, context: __SerdeContext): any => { - return { - ...(input.DownloadSpeed != null && { DownloadSpeed: input.DownloadSpeed }), - ...(input.UploadSpeed != null && { UploadSpeed: input.UploadSpeed }), - }; -}; +// se_Bandwidth omitted. -/** - * serializeAws_restJson1BgpOptions - */ -const se_BgpOptions = (input: BgpOptions, context: __SerdeContext): any => { - return { - ...(input.PeerAsn != null && { PeerAsn: input.PeerAsn }), - }; -}; +// se_BgpOptions omitted. -/** - * serializeAws_restJson1ConnectAttachmentOptions - */ -const se_ConnectAttachmentOptions = (input: ConnectAttachmentOptions, context: __SerdeContext): any => { - return { - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; +// se_ConnectAttachmentOptions omitted. -/** - * serializeAws_restJson1ConstrainedStringList - */ -const se_ConstrainedStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConstrainedStringList omitted. -/** - * serializeAws_restJson1CoreNetworkSegmentEdgeIdentifier - */ -const se_CoreNetworkSegmentEdgeIdentifier = (input: CoreNetworkSegmentEdgeIdentifier, context: __SerdeContext): any => { - return { - ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }), - ...(input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation }), - ...(input.SegmentName != null && { SegmentName: input.SegmentName }), - }; -}; +// se_CoreNetworkSegmentEdgeIdentifier omitted. -/** - * serializeAws_restJson1FilterMap - */ -const se_FilterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FilterValues(value, context); - return acc; - }, {}); -}; +// se_FilterMap omitted. -/** - * serializeAws_restJson1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_restJson1Location - */ -const se_Location = (input: Location, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.Latitude != null && { Latitude: input.Latitude }), - ...(input.Longitude != null && { Longitude: input.Longitude }), - }; -}; +// se_Location omitted. -/** - * serializeAws_restJson1NetworkResourceMetadataMap - */ -const se_NetworkResourceMetadataMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_NetworkResourceMetadataMap omitted. -/** - * serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification - */ -const se_RouteAnalysisEndpointOptionsSpecification = ( - input: RouteAnalysisEndpointOptionsSpecification, - context: __SerdeContext -): any => { - return { - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.TransitGatewayAttachmentArn != null && { - TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn, - }), - }; -}; +// se_RouteAnalysisEndpointOptionsSpecification omitted. -/** - * serializeAws_restJson1RouteStateList - */ -const se_RouteStateList = (input: (RouteState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RouteStateList omitted. -/** - * serializeAws_restJson1RouteTableIdentifier - */ -const se_RouteTableIdentifier = (input: RouteTableIdentifier, context: __SerdeContext): any => { - return { - ...(input.CoreNetworkSegmentEdge != null && { - CoreNetworkSegmentEdge: se_CoreNetworkSegmentEdgeIdentifier(input.CoreNetworkSegmentEdge, context), - }), - ...(input.TransitGatewayRouteTableArn != null && { - TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn, - }), - }; -}; +// se_RouteTableIdentifier omitted. -/** - * serializeAws_restJson1RouteTypeList - */ -const se_RouteTypeList = (input: (RouteType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RouteTypeList omitted. -/** - * serializeAws_restJson1SubnetArnList - */ -const se_SubnetArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetArnList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1VpcOptions - */ -const se_VpcOptions = (input: VpcOptions, context: __SerdeContext): any => { - return { - ...(input.ApplianceModeSupport != null && { ApplianceModeSupport: input.ApplianceModeSupport }), - ...(input.Ipv6Support != null && { Ipv6Support: input.Ipv6Support }), - }; -}; +// se_VpcOptions omitted. -/** - * deserializeAws_restJson1AccountStatus - */ -const de_AccountStatus = (output: any, context: __SerdeContext): AccountStatus => { - return { - AccountId: __expectString(output.AccountId), - SLRDeploymentStatus: __expectString(output.SLRDeploymentStatus), - } as any; -}; +// de_AccountStatus omitted. -/** - * deserializeAws_restJson1AccountStatusList - */ -const de_AccountStatusList = (output: any, context: __SerdeContext): AccountStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountStatus(entry, context); - }); - return retVal; -}; +// de_AccountStatusList omitted. /** * deserializeAws_restJson1Attachment */ const de_Attachment = (output: any, context: __SerdeContext): Attachment => { - return { - AttachmentId: __expectString(output.AttachmentId), - AttachmentPolicyRuleNumber: __expectInt32(output.AttachmentPolicyRuleNumber), - AttachmentType: __expectString(output.AttachmentType), - CoreNetworkArn: __expectString(output.CoreNetworkArn), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EdgeLocation: __expectString(output.EdgeLocation), - OwnerAccountId: __expectString(output.OwnerAccountId), - ProposedSegmentChange: - output.ProposedSegmentChange != null - ? de_ProposedSegmentChange(output.ProposedSegmentChange, context) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - SegmentName: __expectString(output.SegmentName), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + AttachmentId: __expectString, + AttachmentPolicyRuleNumber: __expectInt32, + AttachmentType: __expectString, + CoreNetworkArn: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeLocation: __expectString, + OwnerAccountId: __expectString, + ProposedSegmentChange: _json, + ResourceArn: __expectString, + SegmentName: __expectString, + State: __expectString, + Tags: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -9057,84 +8795,56 @@ const de_AttachmentList = (output: any, context: __SerdeContext): Attachment[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Attachment(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AWSLocation - */ -const de_AWSLocation = (output: any, context: __SerdeContext): AWSLocation => { - return { - SubnetArn: __expectString(output.SubnetArn), - Zone: __expectString(output.Zone), - } as any; -}; +// de_AWSLocation omitted. -/** - * deserializeAws_restJson1Bandwidth - */ -const de_Bandwidth = (output: any, context: __SerdeContext): Bandwidth => { - return { - DownloadSpeed: __expectInt32(output.DownloadSpeed), - UploadSpeed: __expectInt32(output.UploadSpeed), - } as any; -}; +// de_Bandwidth omitted. /** * deserializeAws_restJson1ConnectAttachment */ const de_ConnectAttachment = (output: any, context: __SerdeContext): ConnectAttachment => { - return { - Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined, - Options: output.Options != null ? de_ConnectAttachmentOptions(output.Options, context) : undefined, - TransportAttachmentId: __expectString(output.TransportAttachmentId), - } as any; + return take(output, { + Attachment: (_: any) => de_Attachment(_, context), + Options: _json, + TransportAttachmentId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ConnectAttachmentOptions - */ -const de_ConnectAttachmentOptions = (output: any, context: __SerdeContext): ConnectAttachmentOptions => { - return { - Protocol: __expectString(output.Protocol), - } as any; -}; +// de_ConnectAttachmentOptions omitted. /** * deserializeAws_restJson1Connection */ const de_Connection = (output: any, context: __SerdeContext): Connection => { - return { - ConnectedDeviceId: __expectString(output.ConnectedDeviceId), - ConnectedLinkId: __expectString(output.ConnectedLinkId), - ConnectionArn: __expectString(output.ConnectionArn), - ConnectionId: __expectString(output.ConnectionId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - DeviceId: __expectString(output.DeviceId), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - LinkId: __expectString(output.LinkId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + ConnectedDeviceId: __expectString, + ConnectedLinkId: __expectString, + ConnectionArn: __expectString, + ConnectionId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceId: __expectString, + GlobalNetworkId: __expectString, + LinkId: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** * deserializeAws_restJson1ConnectionHealth */ const de_ConnectionHealth = (output: any, context: __SerdeContext): ConnectionHealth => { - return { - Status: __expectString(output.Status), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Status: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + }) as any; }; /** @@ -9144,9 +8854,6 @@ const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Connection(entry, context); }); return retVal; @@ -9156,106 +8863,41 @@ const de_ConnectionList = (output: any, context: __SerdeContext): Connection[] = * deserializeAws_restJson1ConnectPeer */ const de_ConnectPeer = (output: any, context: __SerdeContext): ConnectPeer => { - return { - Configuration: - output.Configuration != null ? de_ConnectPeerConfiguration(output.Configuration, context) : undefined, - ConnectAttachmentId: __expectString(output.ConnectAttachmentId), - ConnectPeerId: __expectString(output.ConnectPeerId), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EdgeLocation: __expectString(output.EdgeLocation), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + Configuration: _json, + ConnectAttachmentId: __expectString, + ConnectPeerId: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeLocation: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1ConnectPeerAssociation - */ -const de_ConnectPeerAssociation = (output: any, context: __SerdeContext): ConnectPeerAssociation => { - return { - ConnectPeerId: __expectString(output.ConnectPeerId), - DeviceId: __expectString(output.DeviceId), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - LinkId: __expectString(output.LinkId), - State: __expectString(output.State), - } as any; -}; +// de_ConnectPeerAssociation omitted. -/** - * deserializeAws_restJson1ConnectPeerAssociationList - */ -const de_ConnectPeerAssociationList = (output: any, context: __SerdeContext): ConnectPeerAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectPeerAssociation(entry, context); - }); - return retVal; -}; +// de_ConnectPeerAssociationList omitted. -/** - * deserializeAws_restJson1ConnectPeerBgpConfiguration - */ -const de_ConnectPeerBgpConfiguration = (output: any, context: __SerdeContext): ConnectPeerBgpConfiguration => { - return { - CoreNetworkAddress: __expectString(output.CoreNetworkAddress), - CoreNetworkAsn: __expectLong(output.CoreNetworkAsn), - PeerAddress: __expectString(output.PeerAddress), - PeerAsn: __expectLong(output.PeerAsn), - } as any; -}; +// de_ConnectPeerBgpConfiguration omitted. -/** - * deserializeAws_restJson1ConnectPeerBgpConfigurationList - */ -const de_ConnectPeerBgpConfigurationList = (output: any, context: __SerdeContext): ConnectPeerBgpConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectPeerBgpConfiguration(entry, context); - }); - return retVal; -}; +// de_ConnectPeerBgpConfigurationList omitted. -/** - * deserializeAws_restJson1ConnectPeerConfiguration - */ -const de_ConnectPeerConfiguration = (output: any, context: __SerdeContext): ConnectPeerConfiguration => { - return { - BgpConfigurations: - output.BgpConfigurations != null - ? de_ConnectPeerBgpConfigurationList(output.BgpConfigurations, context) - : undefined, - CoreNetworkAddress: __expectString(output.CoreNetworkAddress), - InsideCidrBlocks: - output.InsideCidrBlocks != null ? de_ConstrainedStringList(output.InsideCidrBlocks, context) : undefined, - PeerAddress: __expectString(output.PeerAddress), - Protocol: __expectString(output.Protocol), - } as any; -}; +// de_ConnectPeerConfiguration omitted. /** * deserializeAws_restJson1ConnectPeerSummary */ const de_ConnectPeerSummary = (output: any, context: __SerdeContext): ConnectPeerSummary => { - return { - ConnectAttachmentId: __expectString(output.ConnectAttachmentId), - ConnectPeerId: __expectString(output.ConnectPeerId), - ConnectPeerState: __expectString(output.ConnectPeerState), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EdgeLocation: __expectString(output.EdgeLocation), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + ConnectAttachmentId: __expectString, + ConnectPeerId: __expectString, + ConnectPeerState: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeLocation: __expectString, + Tags: _json, + }) as any; }; /** @@ -9265,75 +8907,44 @@ const de_ConnectPeerSummaryList = (output: any, context: __SerdeContext): Connec const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConnectPeerSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ConstrainedStringList - */ -const de_ConstrainedStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConstrainedStringList omitted. /** * deserializeAws_restJson1CoreNetwork */ const de_CoreNetwork = (output: any, context: __SerdeContext): CoreNetwork => { - return { - CoreNetworkArn: __expectString(output.CoreNetworkArn), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - Edges: output.Edges != null ? de_CoreNetworkEdgeList(output.Edges, context) : undefined, - GlobalNetworkId: __expectString(output.GlobalNetworkId), - Segments: output.Segments != null ? de_CoreNetworkSegmentList(output.Segments, context) : undefined, - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + CoreNetworkArn: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Edges: _json, + GlobalNetworkId: __expectString, + Segments: _json, + State: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1CoreNetworkChange - */ -const de_CoreNetworkChange = (output: any, context: __SerdeContext): CoreNetworkChange => { - return { - Action: __expectString(output.Action), - Identifier: __expectString(output.Identifier), - IdentifierPath: __expectString(output.IdentifierPath), - NewValues: output.NewValues != null ? de_CoreNetworkChangeValues(output.NewValues, context) : undefined, - PreviousValues: - output.PreviousValues != null ? de_CoreNetworkChangeValues(output.PreviousValues, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_CoreNetworkChange omitted. /** * deserializeAws_restJson1CoreNetworkChangeEvent */ const de_CoreNetworkChangeEvent = (output: any, context: __SerdeContext): CoreNetworkChangeEvent => { - return { - Action: __expectString(output.Action), - EventTime: - output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined, - IdentifierPath: __expectString(output.IdentifierPath), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - Values: output.Values != null ? de_CoreNetworkChangeEventValues(output.Values, context) : undefined, - } as any; + return take(output, { + Action: __expectString, + EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IdentifierPath: __expectString, + Status: __expectString, + Type: __expectString, + Values: _json, + }) as any; }; /** @@ -9343,141 +8954,53 @@ const de_CoreNetworkChangeEventList = (output: any, context: __SerdeContext): Co const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CoreNetworkChangeEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CoreNetworkChangeEventValues - */ -const de_CoreNetworkChangeEventValues = (output: any, context: __SerdeContext): CoreNetworkChangeEventValues => { - return { - AttachmentId: __expectString(output.AttachmentId), - Cidr: __expectString(output.Cidr), - EdgeLocation: __expectString(output.EdgeLocation), - SegmentName: __expectString(output.SegmentName), - } as any; -}; +// de_CoreNetworkChangeEventValues omitted. -/** - * deserializeAws_restJson1CoreNetworkChangeList - */ -const de_CoreNetworkChangeList = (output: any, context: __SerdeContext): CoreNetworkChange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoreNetworkChange(entry, context); - }); - return retVal; -}; +// de_CoreNetworkChangeList omitted. -/** - * deserializeAws_restJson1CoreNetworkChangeValues - */ -const de_CoreNetworkChangeValues = (output: any, context: __SerdeContext): CoreNetworkChangeValues => { - return { - Asn: __expectLong(output.Asn), - Cidr: __expectString(output.Cidr), - DestinationIdentifier: __expectString(output.DestinationIdentifier), - EdgeLocations: output.EdgeLocations != null ? de_ExternalRegionCodeList(output.EdgeLocations, context) : undefined, - InsideCidrBlocks: - output.InsideCidrBlocks != null ? de_ConstrainedStringList(output.InsideCidrBlocks, context) : undefined, - SegmentName: __expectString(output.SegmentName), - SharedSegments: - output.SharedSegments != null ? de_ConstrainedStringList(output.SharedSegments, context) : undefined, - } as any; -}; +// de_CoreNetworkChangeValues omitted. -/** - * deserializeAws_restJson1CoreNetworkEdge - */ -const de_CoreNetworkEdge = (output: any, context: __SerdeContext): CoreNetworkEdge => { - return { - Asn: __expectLong(output.Asn), - EdgeLocation: __expectString(output.EdgeLocation), - InsideCidrBlocks: - output.InsideCidrBlocks != null ? de_ConstrainedStringList(output.InsideCidrBlocks, context) : undefined, - } as any; -}; +// de_CoreNetworkEdge omitted. -/** - * deserializeAws_restJson1CoreNetworkEdgeList - */ -const de_CoreNetworkEdgeList = (output: any, context: __SerdeContext): CoreNetworkEdge[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoreNetworkEdge(entry, context); - }); - return retVal; -}; +// de_CoreNetworkEdgeList omitted. /** * deserializeAws_restJson1CoreNetworkPolicy */ const de_CoreNetworkPolicy = (output: any, context: __SerdeContext): CoreNetworkPolicy => { - return { - Alias: __expectString(output.Alias), - ChangeSetState: __expectString(output.ChangeSetState), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - PolicyDocument: output.PolicyDocument != null ? new __LazyJsonString(output.PolicyDocument) : undefined, - PolicyErrors: output.PolicyErrors != null ? de_CoreNetworkPolicyErrorList(output.PolicyErrors, context) : undefined, - PolicyVersionId: __expectInt32(output.PolicyVersionId), - } as any; + return take(output, { + Alias: __expectString, + ChangeSetState: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + PolicyDocument: (_: any) => new __LazyJsonString(_), + PolicyErrors: _json, + PolicyVersionId: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1CoreNetworkPolicyError - */ -const de_CoreNetworkPolicyError = (output: any, context: __SerdeContext): CoreNetworkPolicyError => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - Path: __expectString(output.Path), - } as any; -}; +// de_CoreNetworkPolicyError omitted. -/** - * deserializeAws_restJson1CoreNetworkPolicyErrorList - */ -const de_CoreNetworkPolicyErrorList = (output: any, context: __SerdeContext): CoreNetworkPolicyError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoreNetworkPolicyError(entry, context); - }); - return retVal; -}; +// de_CoreNetworkPolicyErrorList omitted. /** * deserializeAws_restJson1CoreNetworkPolicyVersion */ const de_CoreNetworkPolicyVersion = (output: any, context: __SerdeContext): CoreNetworkPolicyVersion => { - return { - Alias: __expectString(output.Alias), - ChangeSetState: __expectString(output.ChangeSetState), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - PolicyVersionId: __expectInt32(output.PolicyVersionId), - } as any; + return take(output, { + Alias: __expectString, + ChangeSetState: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + PolicyVersionId: __expectInt32, + }) as any; }; /** @@ -9487,134 +9010,45 @@ const de_CoreNetworkPolicyVersionList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CoreNetworkPolicyVersion(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CoreNetworkSegment - */ -const de_CoreNetworkSegment = (output: any, context: __SerdeContext): CoreNetworkSegment => { - return { - EdgeLocations: output.EdgeLocations != null ? de_ExternalRegionCodeList(output.EdgeLocations, context) : undefined, - Name: __expectString(output.Name), - SharedSegments: - output.SharedSegments != null ? de_ConstrainedStringList(output.SharedSegments, context) : undefined, - } as any; -}; +// de_CoreNetworkSegment omitted. -/** - * deserializeAws_restJson1CoreNetworkSegmentEdgeIdentifier - */ -const de_CoreNetworkSegmentEdgeIdentifier = ( - output: any, - context: __SerdeContext -): CoreNetworkSegmentEdgeIdentifier => { - return { - CoreNetworkId: __expectString(output.CoreNetworkId), - EdgeLocation: __expectString(output.EdgeLocation), - SegmentName: __expectString(output.SegmentName), - } as any; -}; +// de_CoreNetworkSegmentEdgeIdentifier omitted. -/** - * deserializeAws_restJson1CoreNetworkSegmentList - */ -const de_CoreNetworkSegmentList = (output: any, context: __SerdeContext): CoreNetworkSegment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoreNetworkSegment(entry, context); - }); - return retVal; -}; +// de_CoreNetworkSegmentList omitted. -/** - * deserializeAws_restJson1CoreNetworkSummary - */ -const de_CoreNetworkSummary = (output: any, context: __SerdeContext): CoreNetworkSummary => { - return { - CoreNetworkArn: __expectString(output.CoreNetworkArn), - CoreNetworkId: __expectString(output.CoreNetworkId), - Description: __expectString(output.Description), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - OwnerAccountId: __expectString(output.OwnerAccountId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_CoreNetworkSummary omitted. -/** - * deserializeAws_restJson1CoreNetworkSummaryList - */ -const de_CoreNetworkSummaryList = (output: any, context: __SerdeContext): CoreNetworkSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoreNetworkSummary(entry, context); - }); - return retVal; -}; +// de_CoreNetworkSummaryList omitted. -/** - * deserializeAws_restJson1CustomerGatewayAssociation - */ -const de_CustomerGatewayAssociation = (output: any, context: __SerdeContext): CustomerGatewayAssociation => { - return { - CustomerGatewayArn: __expectString(output.CustomerGatewayArn), - DeviceId: __expectString(output.DeviceId), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - LinkId: __expectString(output.LinkId), - State: __expectString(output.State), - } as any; -}; +// de_CustomerGatewayAssociation omitted. -/** - * deserializeAws_restJson1CustomerGatewayAssociationList - */ -const de_CustomerGatewayAssociationList = (output: any, context: __SerdeContext): CustomerGatewayAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomerGatewayAssociation(entry, context); - }); - return retVal; -}; +// de_CustomerGatewayAssociationList omitted. /** * deserializeAws_restJson1Device */ const de_Device = (output: any, context: __SerdeContext): Device => { - return { - AWSLocation: output.AWSLocation != null ? de_AWSLocation(output.AWSLocation, context) : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - DeviceArn: __expectString(output.DeviceArn), - DeviceId: __expectString(output.DeviceId), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - Location: output.Location != null ? de_Location(output.Location, context) : undefined, - Model: __expectString(output.Model), - SerialNumber: __expectString(output.SerialNumber), - SiteId: __expectString(output.SiteId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Type: __expectString(output.Type), - Vendor: __expectString(output.Vendor), - } as any; + return take(output, { + AWSLocation: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceArn: __expectString, + DeviceId: __expectString, + GlobalNetworkId: __expectString, + Location: _json, + Model: __expectString, + SerialNumber: __expectString, + SiteId: __expectString, + State: __expectString, + Tags: _json, + Type: __expectString, + Vendor: __expectString, + }) as any; }; /** @@ -9624,55 +9058,27 @@ const de_DeviceList = (output: any, context: __SerdeContext): Device[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Device(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExceptionContextMap - */ -const de_ExceptionContextMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExceptionContextMap omitted. -/** - * deserializeAws_restJson1ExternalRegionCodeList - */ -const de_ExternalRegionCodeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ExternalRegionCodeList omitted. /** * deserializeAws_restJson1GlobalNetwork */ const de_GlobalNetwork = (output: any, context: __SerdeContext): GlobalNetwork => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - GlobalNetworkArn: __expectString(output.GlobalNetworkArn), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + GlobalNetworkArn: __expectString, + GlobalNetworkId: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** @@ -9682,9 +9088,6 @@ const de_GlobalNetworkList = (output: any, context: __SerdeContext): GlobalNetwo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GlobalNetwork(entry, context); }); return retVal; @@ -9694,48 +9097,24 @@ const de_GlobalNetworkList = (output: any, context: __SerdeContext): GlobalNetwo * deserializeAws_restJson1Link */ const de_Link = (output: any, context: __SerdeContext): Link => { - return { - Bandwidth: output.Bandwidth != null ? de_Bandwidth(output.Bandwidth, context) : undefined, - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - LinkArn: __expectString(output.LinkArn), - LinkId: __expectString(output.LinkId), - Provider: __expectString(output.Provider), - SiteId: __expectString(output.SiteId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Bandwidth: _json, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + GlobalNetworkId: __expectString, + LinkArn: __expectString, + LinkId: __expectString, + Provider: __expectString, + SiteId: __expectString, + State: __expectString, + Tags: _json, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1LinkAssociation - */ -const de_LinkAssociation = (output: any, context: __SerdeContext): LinkAssociation => { - return { - DeviceId: __expectString(output.DeviceId), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - LinkAssociationState: __expectString(output.LinkAssociationState), - LinkId: __expectString(output.LinkId), - } as any; -}; +// de_LinkAssociation omitted. -/** - * deserializeAws_restJson1LinkAssociationList - */ -const de_LinkAssociationList = (output: any, context: __SerdeContext): LinkAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LinkAssociation(entry, context); - }); - return retVal; -}; +// de_LinkAssociationList omitted. /** * deserializeAws_restJson1LinkList @@ -9744,71 +9123,35 @@ const de_LinkList = (output: any, context: __SerdeContext): Link[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Link(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Location - */ -const de_Location = (output: any, context: __SerdeContext): Location => { - return { - Address: __expectString(output.Address), - Latitude: __expectString(output.Latitude), - Longitude: __expectString(output.Longitude), - } as any; -}; +// de_Location omitted. /** * deserializeAws_restJson1NetworkResource */ const de_NetworkResource = (output: any, context: __SerdeContext): NetworkResource => { - return { - AccountId: __expectString(output.AccountId), - AwsRegion: __expectString(output.AwsRegion), - CoreNetworkId: __expectString(output.CoreNetworkId), - Definition: __expectString(output.Definition), - DefinitionTimestamp: - output.DefinitionTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DefinitionTimestamp))) - : undefined, - Metadata: output.Metadata != null ? de_NetworkResourceMetadataMap(output.Metadata, context) : undefined, - RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn), - ResourceArn: __expectString(output.ResourceArn), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + AccountId: __expectString, + AwsRegion: __expectString, + CoreNetworkId: __expectString, + Definition: __expectString, + DefinitionTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Metadata: _json, + RegisteredGatewayArn: __expectString, + ResourceArn: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1NetworkResourceCount - */ -const de_NetworkResourceCount = (output: any, context: __SerdeContext): NetworkResourceCount => { - return { - Count: __expectInt32(output.Count), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_NetworkResourceCount omitted. -/** - * deserializeAws_restJson1NetworkResourceCountList - */ -const de_NetworkResourceCountList = (output: any, context: __SerdeContext): NetworkResourceCount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkResourceCount(entry, context); - }); - return retVal; -}; +// de_NetworkResourceCountList omitted. /** * deserializeAws_restJson1NetworkResourceList @@ -9817,114 +9160,38 @@ const de_NetworkResourceList = (output: any, context: __SerdeContext): NetworkRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NetworkResource(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NetworkResourceMetadataMap - */ -const de_NetworkResourceMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_NetworkResourceMetadataMap omitted. -/** - * deserializeAws_restJson1NetworkResourceSummary - */ -const de_NetworkResourceSummary = (output: any, context: __SerdeContext): NetworkResourceSummary => { - return { - Definition: __expectString(output.Definition), - IsMiddlebox: __expectBoolean(output.IsMiddlebox), - NameTag: __expectString(output.NameTag), - RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn), - ResourceArn: __expectString(output.ResourceArn), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_NetworkResourceSummary omitted. -/** - * deserializeAws_restJson1NetworkRoute - */ -const de_NetworkRoute = (output: any, context: __SerdeContext): NetworkRoute => { - return { - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - Destinations: - output.Destinations != null ? de_NetworkRouteDestinationList(output.Destinations, context) : undefined, - PrefixListId: __expectString(output.PrefixListId), - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; -}; +// de_NetworkRoute omitted. -/** - * deserializeAws_restJson1NetworkRouteDestination - */ -const de_NetworkRouteDestination = (output: any, context: __SerdeContext): NetworkRouteDestination => { - return { - CoreNetworkAttachmentId: __expectString(output.CoreNetworkAttachmentId), - EdgeLocation: __expectString(output.EdgeLocation), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - SegmentName: __expectString(output.SegmentName), - TransitGatewayAttachmentId: __expectString(output.TransitGatewayAttachmentId), - } as any; -}; +// de_NetworkRouteDestination omitted. -/** - * deserializeAws_restJson1NetworkRouteDestinationList - */ -const de_NetworkRouteDestinationList = (output: any, context: __SerdeContext): NetworkRouteDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkRouteDestination(entry, context); - }); - return retVal; -}; +// de_NetworkRouteDestinationList omitted. -/** - * deserializeAws_restJson1NetworkRouteList - */ -const de_NetworkRouteList = (output: any, context: __SerdeContext): NetworkRoute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkRoute(entry, context); - }); - return retVal; -}; +// de_NetworkRouteList omitted. /** * deserializeAws_restJson1NetworkTelemetry */ const de_NetworkTelemetry = (output: any, context: __SerdeContext): NetworkTelemetry => { - return { - AccountId: __expectString(output.AccountId), - Address: __expectString(output.Address), - AwsRegion: __expectString(output.AwsRegion), - CoreNetworkId: __expectString(output.CoreNetworkId), - Health: output.Health != null ? de_ConnectionHealth(output.Health, context) : undefined, - RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn), - ResourceArn: __expectString(output.ResourceArn), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; + return take(output, { + AccountId: __expectString, + Address: __expectString, + AwsRegion: __expectString, + CoreNetworkId: __expectString, + Health: (_: any) => de_ConnectionHealth(_, context), + RegisteredGatewayArn: __expectString, + ResourceArn: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }) as any; }; /** @@ -9934,70 +9201,33 @@ const de_NetworkTelemetryList = (output: any, context: __SerdeContext): NetworkT const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NetworkTelemetry(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1OrganizationStatus - */ -const de_OrganizationStatus = (output: any, context: __SerdeContext): OrganizationStatus => { - return { - AccountStatusList: - output.AccountStatusList != null ? de_AccountStatusList(output.AccountStatusList, context) : undefined, - OrganizationAwsServiceAccessStatus: __expectString(output.OrganizationAwsServiceAccessStatus), - OrganizationId: __expectString(output.OrganizationId), - SLRDeploymentStatus: __expectString(output.SLRDeploymentStatus), - } as any; -}; +// de_OrganizationStatus omitted. -/** - * deserializeAws_restJson1PathComponent - */ -const de_PathComponent = (output: any, context: __SerdeContext): PathComponent => { - return { - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - Resource: output.Resource != null ? de_NetworkResourceSummary(output.Resource, context) : undefined, - Sequence: __expectInt32(output.Sequence), - } as any; -}; +// de_PathComponent omitted. -/** - * deserializeAws_restJson1PathComponentList - */ -const de_PathComponentList = (output: any, context: __SerdeContext): PathComponent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PathComponent(entry, context); - }); - return retVal; -}; +// de_PathComponentList omitted. /** * deserializeAws_restJson1Peering */ const de_Peering = (output: any, context: __SerdeContext): Peering => { - return { - CoreNetworkArn: __expectString(output.CoreNetworkArn), - CoreNetworkId: __expectString(output.CoreNetworkId), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - EdgeLocation: __expectString(output.EdgeLocation), - OwnerAccountId: __expectString(output.OwnerAccountId), - PeeringId: __expectString(output.PeeringId), - PeeringType: __expectString(output.PeeringType), - ResourceArn: __expectString(output.ResourceArn), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + CoreNetworkArn: __expectString, + CoreNetworkId: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeLocation: __expectString, + OwnerAccountId: __expectString, + PeeringId: __expectString, + PeeringType: __expectString, + ResourceArn: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** @@ -10007,133 +9237,58 @@ const de_PeeringList = (output: any, context: __SerdeContext): Peering[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Peering(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ProposedSegmentChange - */ -const de_ProposedSegmentChange = (output: any, context: __SerdeContext): ProposedSegmentChange => { - return { - AttachmentPolicyRuleNumber: __expectInt32(output.AttachmentPolicyRuleNumber), - SegmentName: __expectString(output.SegmentName), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ProposedSegmentChange omitted. -/** - * deserializeAws_restJson1ReasonContextMap - */ -const de_ReasonContextMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ReasonContextMap omitted. -/** - * deserializeAws_restJson1Relationship - */ -const de_Relationship = (output: any, context: __SerdeContext): Relationship => { - return { - From: __expectString(output.From), - To: __expectString(output.To), - } as any; -}; +// de_Relationship omitted. -/** - * deserializeAws_restJson1RelationshipList - */ -const de_RelationshipList = (output: any, context: __SerdeContext): Relationship[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Relationship(entry, context); - }); - return retVal; -}; +// de_RelationshipList omitted. /** * deserializeAws_restJson1RouteAnalysis */ const de_RouteAnalysis = (output: any, context: __SerdeContext): RouteAnalysis => { - return { - Destination: output.Destination != null ? de_RouteAnalysisEndpointOptions(output.Destination, context) : undefined, - ForwardPath: output.ForwardPath != null ? de_RouteAnalysisPath(output.ForwardPath, context) : undefined, - GlobalNetworkId: __expectString(output.GlobalNetworkId), - IncludeReturnPath: __expectBoolean(output.IncludeReturnPath), - OwnerAccountId: __expectString(output.OwnerAccountId), - ReturnPath: output.ReturnPath != null ? de_RouteAnalysisPath(output.ReturnPath, context) : undefined, - RouteAnalysisId: __expectString(output.RouteAnalysisId), - Source: output.Source != null ? de_RouteAnalysisEndpointOptions(output.Source, context) : undefined, - StartTimestamp: - output.StartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp))) - : undefined, - Status: __expectString(output.Status), - UseMiddleboxes: __expectBoolean(output.UseMiddleboxes), - } as any; + return take(output, { + Destination: _json, + ForwardPath: _json, + GlobalNetworkId: __expectString, + IncludeReturnPath: __expectBoolean, + OwnerAccountId: __expectString, + ReturnPath: _json, + RouteAnalysisId: __expectString, + Source: _json, + StartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + UseMiddleboxes: __expectBoolean, + }) as any; }; -/** - * deserializeAws_restJson1RouteAnalysisCompletion - */ -const de_RouteAnalysisCompletion = (output: any, context: __SerdeContext): RouteAnalysisCompletion => { - return { - ReasonCode: __expectString(output.ReasonCode), - ReasonContext: output.ReasonContext != null ? de_ReasonContextMap(output.ReasonContext, context) : undefined, - ResultCode: __expectString(output.ResultCode), - } as any; -}; +// de_RouteAnalysisCompletion omitted. -/** - * deserializeAws_restJson1RouteAnalysisEndpointOptions - */ -const de_RouteAnalysisEndpointOptions = (output: any, context: __SerdeContext): RouteAnalysisEndpointOptions => { - return { - IpAddress: __expectString(output.IpAddress), - TransitGatewayArn: __expectString(output.TransitGatewayArn), - TransitGatewayAttachmentArn: __expectString(output.TransitGatewayAttachmentArn), - } as any; -}; +// de_RouteAnalysisEndpointOptions omitted. -/** - * deserializeAws_restJson1RouteAnalysisPath - */ -const de_RouteAnalysisPath = (output: any, context: __SerdeContext): RouteAnalysisPath => { - return { - CompletionStatus: - output.CompletionStatus != null ? de_RouteAnalysisCompletion(output.CompletionStatus, context) : undefined, - Path: output.Path != null ? de_PathComponentList(output.Path, context) : undefined, - } as any; -}; +// de_RouteAnalysisPath omitted. /** * deserializeAws_restJson1Site */ const de_Site = (output: any, context: __SerdeContext): Site => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - Location: output.Location != null ? de_Location(output.Location, context) : undefined, - SiteArn: __expectString(output.SiteArn), - SiteId: __expectString(output.SiteId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + GlobalNetworkId: __expectString, + Location: _json, + SiteArn: __expectString, + SiteId: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** @@ -10143,9 +9298,6 @@ const de_SiteList = (output: any, context: __SerdeContext): Site[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Site(entry, context); }); return retVal; @@ -10155,135 +9307,38 @@ const de_SiteList = (output: any, context: __SerdeContext): Site[] => { * deserializeAws_restJson1SiteToSiteVpnAttachment */ const de_SiteToSiteVpnAttachment = (output: any, context: __SerdeContext): SiteToSiteVpnAttachment => { - return { - Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined, - VpnConnectionArn: __expectString(output.VpnConnectionArn), - } as any; + return take(output, { + Attachment: (_: any) => de_Attachment(_, context), + VpnConnectionArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SubnetArnList - */ -const de_SubnetArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetArnList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TransitGatewayConnectPeerAssociation - */ -const de_TransitGatewayConnectPeerAssociation = ( - output: any, - context: __SerdeContext -): TransitGatewayConnectPeerAssociation => { - return { - DeviceId: __expectString(output.DeviceId), - GlobalNetworkId: __expectString(output.GlobalNetworkId), - LinkId: __expectString(output.LinkId), - State: __expectString(output.State), - TransitGatewayConnectPeerArn: __expectString(output.TransitGatewayConnectPeerArn), - } as any; -}; +// de_TransitGatewayConnectPeerAssociation omitted. -/** - * deserializeAws_restJson1TransitGatewayConnectPeerAssociationList - */ -const de_TransitGatewayConnectPeerAssociationList = ( - output: any, - context: __SerdeContext -): TransitGatewayConnectPeerAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TransitGatewayConnectPeerAssociation(entry, context); - }); - return retVal; -}; +// de_TransitGatewayConnectPeerAssociationList omitted. /** * deserializeAws_restJson1TransitGatewayPeering */ const de_TransitGatewayPeering = (output: any, context: __SerdeContext): TransitGatewayPeering => { - return { - Peering: output.Peering != null ? de_Peering(output.Peering, context) : undefined, - TransitGatewayArn: __expectString(output.TransitGatewayArn), - TransitGatewayPeeringAttachmentId: __expectString(output.TransitGatewayPeeringAttachmentId), - } as any; + return take(output, { + Peering: (_: any) => de_Peering(_, context), + TransitGatewayArn: __expectString, + TransitGatewayPeeringAttachmentId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TransitGatewayRegistration - */ -const de_TransitGatewayRegistration = (output: any, context: __SerdeContext): TransitGatewayRegistration => { - return { - GlobalNetworkId: __expectString(output.GlobalNetworkId), - State: output.State != null ? de_TransitGatewayRegistrationStateReason(output.State, context) : undefined, - TransitGatewayArn: __expectString(output.TransitGatewayArn), - } as any; -}; +// de_TransitGatewayRegistration omitted. -/** - * deserializeAws_restJson1TransitGatewayRegistrationList - */ -const de_TransitGatewayRegistrationList = (output: any, context: __SerdeContext): TransitGatewayRegistration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TransitGatewayRegistration(entry, context); - }); - return retVal; -}; +// de_TransitGatewayRegistrationList omitted. -/** - * deserializeAws_restJson1TransitGatewayRegistrationStateReason - */ -const de_TransitGatewayRegistrationStateReason = ( - output: any, - context: __SerdeContext -): TransitGatewayRegistrationStateReason => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_TransitGatewayRegistrationStateReason omitted. /** * deserializeAws_restJson1TransitGatewayRouteTableAttachment @@ -10292,58 +9347,29 @@ const de_TransitGatewayRouteTableAttachment = ( output: any, context: __SerdeContext ): TransitGatewayRouteTableAttachment => { - return { - Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined, - PeeringId: __expectString(output.PeeringId), - TransitGatewayRouteTableArn: __expectString(output.TransitGatewayRouteTableArn), - } as any; + return take(output, { + Attachment: (_: any) => de_Attachment(_, context), + PeeringId: __expectString, + TransitGatewayRouteTableArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. /** * deserializeAws_restJson1VpcAttachment */ const de_VpcAttachment = (output: any, context: __SerdeContext): VpcAttachment => { - return { - Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined, - Options: output.Options != null ? de_VpcOptions(output.Options, context) : undefined, - SubnetArns: output.SubnetArns != null ? de_SubnetArnList(output.SubnetArns, context) : undefined, - } as any; + return take(output, { + Attachment: (_: any) => de_Attachment(_, context), + Options: _json, + SubnetArns: _json, + }) as any; }; -/** - * deserializeAws_restJson1VpcOptions - */ -const de_VpcOptions = (output: any, context: __SerdeContext): VpcOptions => { - return { - ApplianceModeSupport: __expectBoolean(output.ApplianceModeSupport), - Ipv6Support: __expectBoolean(output.Ipv6Support), - } as any; -}; +// de_VpcOptions omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-nimble/src/protocols/Aws_restJson1.ts b/clients/client-nimble/src/protocols/Aws_restJson1.ts index 7881fdf88955..9d5f2d5f1fc4 100644 --- a/clients/client-nimble/src/protocols/Aws_restJson1.ts +++ b/clients/client-nimble/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -171,10 +173,6 @@ import { EulaAcceptance, InternalServerErrorException, LaunchProfile, - LaunchProfileInitialization, - LaunchProfileInitializationActiveDirectory, - LaunchProfileInitializationScript, - LaunchProfileMembership, LicenseServiceConfiguration, NewLaunchProfileMember, NewStudioMember, @@ -182,12 +180,9 @@ import { ScriptParameterKeyValue, ServiceQuotaExceededException, SharedFileSystemConfiguration, - StreamConfiguration, StreamConfigurationCreate, StreamConfigurationSessionBackup, StreamConfigurationSessionStorage, - StreamingImage, - StreamingImageEncryptionConfiguration, StreamingInstanceType, StreamingSession, StreamingSessionBackup, @@ -200,10 +195,8 @@ import { StudioComponentInitializationScript, StudioComponentSummary, StudioEncryptionConfiguration, - StudioMembership, ThrottlingException, ValidationException, - ValidationResult, VolumeConfiguration, } from "../models/models_0"; import { NimbleServiceException as __BaseException } from "../models/NimbleServiceException"; @@ -225,9 +218,11 @@ export const se_AcceptEulasCommand = async ( "/2020-08-01/studios/{studioId}/eula-acceptances"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.eulaIds != null && { eulaIds: se_EulaIdList(input.eulaIds, context) }), - }); + body = JSON.stringify( + take(input, { + eulaIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -256,21 +251,17 @@ export const se_CreateLaunchProfileCommand = async ( "/2020-08-01/studios/{studioId}/launch-profiles"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.ec2SubnetIds != null && { ec2SubnetIds: se_EC2SubnetIdList(input.ec2SubnetIds, context) }), - ...(input.launchProfileProtocolVersions != null && { - launchProfileProtocolVersions: se_LaunchProfileProtocolVersionList(input.launchProfileProtocolVersions, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.streamConfiguration != null && { - streamConfiguration: se_StreamConfigurationCreate(input.streamConfiguration, context), - }), - ...(input.studioComponentIds != null && { - studioComponentIds: se_LaunchProfileStudioComponentIdList(input.studioComponentIds, context), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + ec2SubnetIds: (_) => _json(_), + launchProfileProtocolVersions: (_) => _json(_), + name: [], + streamConfiguration: (_) => _json(_), + studioComponentIds: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -299,12 +290,14 @@ export const se_CreateStreamingImageCommand = async ( "/2020-08-01/studios/{studioId}/streaming-images"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.ec2ImageId != null && { ec2ImageId: input.ec2ImageId }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + ec2ImageId: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -333,13 +326,15 @@ export const se_CreateStreamingSessionCommand = async ( "/2020-08-01/studios/{studioId}/streaming-sessions"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.ec2InstanceType != null && { ec2InstanceType: input.ec2InstanceType }), - ...(input.launchProfileId != null && { launchProfileId: input.launchProfileId }), - ...(input.ownedBy != null && { ownedBy: input.ownedBy }), - ...(input.streamingImageId != null && { streamingImageId: input.streamingImageId }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + ec2InstanceType: [], + launchProfileId: [], + ownedBy: [], + streamingImageId: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -369,9 +364,11 @@ export const se_CreateStreamingSessionStreamCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.expirationInSeconds != null && { expirationInSeconds: input.expirationInSeconds }), - }); + body = JSON.stringify( + take(input, { + expirationInSeconds: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -397,16 +394,16 @@ export const se_CreateStudioCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-08-01/studios"; let body: any; - body = JSON.stringify({ - ...(input.adminRoleArn != null && { adminRoleArn: input.adminRoleArn }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.studioEncryptionConfiguration != null && { - studioEncryptionConfiguration: se_StudioEncryptionConfiguration(input.studioEncryptionConfiguration, context), - }), - ...(input.studioName != null && { studioName: input.studioName }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.userRoleArn != null && { userRoleArn: input.userRoleArn }), - }); + body = JSON.stringify( + take(input, { + adminRoleArn: [], + displayName: [], + studioEncryptionConfiguration: (_) => _json(_), + studioName: [], + tags: (_) => _json(_), + userRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -435,29 +432,21 @@ export const se_CreateStudioComponentCommand = async ( "/2020-08-01/studios/{studioId}/studio-components"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.configuration != null && { - configuration: se_StudioComponentConfiguration(input.configuration, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.ec2SecurityGroupIds != null && { - ec2SecurityGroupIds: se_StudioComponentSecurityGroupIdList(input.ec2SecurityGroupIds, context), - }), - ...(input.initializationScripts != null && { - initializationScripts: se_StudioComponentInitializationScriptList(input.initializationScripts, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.runtimeRoleArn != null && { runtimeRoleArn: input.runtimeRoleArn }), - ...(input.scriptParameters != null && { - scriptParameters: se_StudioComponentScriptParameterKeyValueList(input.scriptParameters, context), - }), - ...(input.secureInitializationRoleArn != null && { - secureInitializationRoleArn: input.secureInitializationRoleArn, - }), - ...(input.subtype != null && { subtype: input.subtype }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + configuration: (_) => _json(_), + description: [], + ec2SecurityGroupIds: (_) => _json(_), + initializationScripts: (_) => _json(_), + name: [], + runtimeRoleArn: [], + scriptParameters: (_) => _json(_), + secureInitializationRoleArn: [], + subtype: [], + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1408,10 +1397,12 @@ export const se_PutLaunchProfileMembersCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.identityStoreId != null && { identityStoreId: input.identityStoreId }), - ...(input.members != null && { members: se_NewLaunchProfileMemberList(input.members, context) }), - }); + body = JSON.stringify( + take(input, { + identityStoreId: [], + members: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1439,10 +1430,12 @@ export const se_PutStudioMembersCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-08-01/studios/{studioId}/membership"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.identityStoreId != null && { identityStoreId: input.identityStoreId }), - ...(input.members != null && { members: se_NewStudioMemberList(input.members, context) }), - }); + body = JSON.stringify( + take(input, { + identityStoreId: [], + members: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1472,9 +1465,11 @@ export const se_StartStreamingSessionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.backupId != null && { backupId: input.backupId }), - }); + body = JSON.stringify( + take(input, { + backupId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1531,9 +1526,11 @@ export const se_StopStreamingSessionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.volumeRetentionMode != null && { volumeRetentionMode: input.volumeRetentionMode }), - }); + body = JSON.stringify( + take(input, { + volumeRetentionMode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1560,9 +1557,11 @@ export const se_TagResourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-08-01/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1630,19 +1629,15 @@ export const se_UpdateLaunchProfileCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.launchProfileProtocolVersions != null && { - launchProfileProtocolVersions: se_LaunchProfileProtocolVersionList(input.launchProfileProtocolVersions, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.streamConfiguration != null && { - streamConfiguration: se_StreamConfigurationCreate(input.streamConfiguration, context), - }), - ...(input.studioComponentIds != null && { - studioComponentIds: se_LaunchProfileStudioComponentIdList(input.studioComponentIds, context), - }), - }); + body = JSON.stringify( + take(input, { + description: [], + launchProfileProtocolVersions: (_) => _json(_), + name: [], + streamConfiguration: (_) => _json(_), + studioComponentIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1680,9 +1675,11 @@ export const se_UpdateLaunchProfileMemberCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "principalId", () => input.principalId!, "{principalId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.persona != null && { persona: input.persona }), - }); + body = JSON.stringify( + take(input, { + persona: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1719,10 +1716,12 @@ export const se_UpdateStreamingImageCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1750,11 +1749,13 @@ export const se_UpdateStudioCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-08-01/studios/{studioId}"; resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.adminRoleArn != null && { adminRoleArn: input.adminRoleArn }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.userRoleArn != null && { userRoleArn: input.userRoleArn }), - }); + body = JSON.stringify( + take(input, { + adminRoleArn: [], + displayName: [], + userRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1791,28 +1792,20 @@ export const se_UpdateStudioComponentCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "studioId", () => input.studioId!, "{studioId}", false); let body: any; - body = JSON.stringify({ - ...(input.configuration != null && { - configuration: se_StudioComponentConfiguration(input.configuration, context), - }), - ...(input.description != null && { description: input.description }), - ...(input.ec2SecurityGroupIds != null && { - ec2SecurityGroupIds: se_StudioComponentSecurityGroupIdList(input.ec2SecurityGroupIds, context), - }), - ...(input.initializationScripts != null && { - initializationScripts: se_StudioComponentInitializationScriptList(input.initializationScripts, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.runtimeRoleArn != null && { runtimeRoleArn: input.runtimeRoleArn }), - ...(input.scriptParameters != null && { - scriptParameters: se_StudioComponentScriptParameterKeyValueList(input.scriptParameters, context), - }), - ...(input.secureInitializationRoleArn != null && { - secureInitializationRoleArn: input.secureInitializationRoleArn, - }), - ...(input.subtype != null && { subtype: input.subtype }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + configuration: (_) => _json(_), + description: [], + ec2SecurityGroupIds: (_) => _json(_), + initializationScripts: (_) => _json(_), + name: [], + runtimeRoleArn: [], + scriptParameters: (_) => _json(_), + secureInitializationRoleArn: [], + subtype: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1838,9 +1831,10 @@ export const de_AcceptEulasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eulaAcceptances != null) { - contents.eulaAcceptances = de_EulaAcceptanceList(data.eulaAcceptances, context); - } + const doc = take(data, { + eulaAcceptances: (_) => de_EulaAcceptanceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1880,10 +1874,9 @@ const de_AcceptEulasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1903,9 +1896,10 @@ export const de_CreateLaunchProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfile != null) { - contents.launchProfile = de_LaunchProfile(data.launchProfile, context); - } + const doc = take(data, { + launchProfile: (_) => de_LaunchProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1945,10 +1939,9 @@ const de_CreateLaunchProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1968,9 +1961,10 @@ export const de_CreateStreamingImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamingImage != null) { - contents.streamingImage = de_StreamingImage(data.streamingImage, context); - } + const doc = take(data, { + streamingImage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2010,10 +2004,9 @@ const de_CreateStreamingImageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2033,9 +2026,10 @@ export const de_CreateStreamingSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_StreamingSession(data.session, context); - } + const doc = take(data, { + session: (_) => de_StreamingSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2075,10 +2069,9 @@ const de_CreateStreamingSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2098,9 +2091,10 @@ export const de_CreateStreamingSessionStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.stream != null) { - contents.stream = de_StreamingSessionStream(data.stream, context); - } + const doc = take(data, { + stream: (_) => de_StreamingSessionStream(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2140,10 +2134,9 @@ const de_CreateStreamingSessionStreamCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2163,9 +2156,10 @@ export const de_CreateStudioCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studio != null) { - contents.studio = de_Studio(data.studio, context); - } + const doc = take(data, { + studio: (_) => de_Studio(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2205,10 +2199,9 @@ const de_CreateStudioCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2228,9 +2221,10 @@ export const de_CreateStudioComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studioComponent != null) { - contents.studioComponent = de_StudioComponent(data.studioComponent, context); - } + const doc = take(data, { + studioComponent: (_) => de_StudioComponent(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2270,10 +2264,9 @@ const de_CreateStudioComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2293,9 +2286,10 @@ export const de_DeleteLaunchProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfile != null) { - contents.launchProfile = de_LaunchProfile(data.launchProfile, context); - } + const doc = take(data, { + launchProfile: (_) => de_LaunchProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2335,10 +2329,9 @@ const de_DeleteLaunchProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2397,10 +2390,9 @@ const de_DeleteLaunchProfileMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2420,9 +2412,10 @@ export const de_DeleteStreamingImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamingImage != null) { - contents.streamingImage = de_StreamingImage(data.streamingImage, context); - } + const doc = take(data, { + streamingImage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2462,10 +2455,9 @@ const de_DeleteStreamingImageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2485,9 +2477,10 @@ export const de_DeleteStreamingSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_StreamingSession(data.session, context); - } + const doc = take(data, { + session: (_) => de_StreamingSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2527,10 +2520,9 @@ const de_DeleteStreamingSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2550,9 +2542,10 @@ export const de_DeleteStudioCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studio != null) { - contents.studio = de_Studio(data.studio, context); - } + const doc = take(data, { + studio: (_) => de_Studio(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2592,10 +2585,9 @@ const de_DeleteStudioCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2615,9 +2607,10 @@ export const de_DeleteStudioComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studioComponent != null) { - contents.studioComponent = de_StudioComponent(data.studioComponent, context); - } + const doc = take(data, { + studioComponent: (_) => de_StudioComponent(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2657,10 +2650,9 @@ const de_DeleteStudioComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2719,10 +2711,9 @@ const de_DeleteStudioMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2742,9 +2733,10 @@ export const de_GetEulaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eula != null) { - contents.eula = de_Eula(data.eula, context); - } + const doc = take(data, { + eula: (_) => de_Eula(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2784,10 +2776,9 @@ const de_GetEulaCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2807,9 +2798,10 @@ export const de_GetLaunchProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfile != null) { - contents.launchProfile = de_LaunchProfile(data.launchProfile, context); - } + const doc = take(data, { + launchProfile: (_) => de_LaunchProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2849,10 +2841,9 @@ const de_GetLaunchProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2872,15 +2863,12 @@ export const de_GetLaunchProfileDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfile != null) { - contents.launchProfile = de_LaunchProfile(data.launchProfile, context); - } - if (data.streamingImages != null) { - contents.streamingImages = de_StreamingImageList(data.streamingImages, context); - } - if (data.studioComponentSummaries != null) { - contents.studioComponentSummaries = de_StudioComponentSummaryList(data.studioComponentSummaries, context); - } + const doc = take(data, { + launchProfile: (_) => de_LaunchProfile(_, context), + streamingImages: _json, + studioComponentSummaries: (_) => de_StudioComponentSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2920,10 +2908,9 @@ const de_GetLaunchProfileDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2943,9 +2930,10 @@ export const de_GetLaunchProfileInitializationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfileInitialization != null) { - contents.launchProfileInitialization = de_LaunchProfileInitialization(data.launchProfileInitialization, context); - } + const doc = take(data, { + launchProfileInitialization: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2985,10 +2973,9 @@ const de_GetLaunchProfileInitializationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3008,9 +2995,10 @@ export const de_GetLaunchProfileMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.member != null) { - contents.member = de_LaunchProfileMembership(data.member, context); - } + const doc = take(data, { + member: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3050,10 +3038,9 @@ const de_GetLaunchProfileMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3073,9 +3060,10 @@ export const de_GetStreamingImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamingImage != null) { - contents.streamingImage = de_StreamingImage(data.streamingImage, context); - } + const doc = take(data, { + streamingImage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3115,10 +3103,9 @@ const de_GetStreamingImageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3138,9 +3125,10 @@ export const de_GetStreamingSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_StreamingSession(data.session, context); - } + const doc = take(data, { + session: (_) => de_StreamingSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3180,10 +3168,9 @@ const de_GetStreamingSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3203,9 +3190,10 @@ export const de_GetStreamingSessionBackupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamingSessionBackup != null) { - contents.streamingSessionBackup = de_StreamingSessionBackup(data.streamingSessionBackup, context); - } + const doc = take(data, { + streamingSessionBackup: (_) => de_StreamingSessionBackup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3242,10 +3230,9 @@ const de_GetStreamingSessionBackupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3265,9 +3252,10 @@ export const de_GetStreamingSessionStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.stream != null) { - contents.stream = de_StreamingSessionStream(data.stream, context); - } + const doc = take(data, { + stream: (_) => de_StreamingSessionStream(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3307,10 +3295,9 @@ const de_GetStreamingSessionStreamCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3330,9 +3317,10 @@ export const de_GetStudioCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studio != null) { - contents.studio = de_Studio(data.studio, context); - } + const doc = take(data, { + studio: (_) => de_Studio(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3372,10 +3360,9 @@ const de_GetStudioCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3395,9 +3382,10 @@ export const de_GetStudioComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studioComponent != null) { - contents.studioComponent = de_StudioComponent(data.studioComponent, context); - } + const doc = take(data, { + studioComponent: (_) => de_StudioComponent(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3437,10 +3425,9 @@ const de_GetStudioComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3460,9 +3447,10 @@ export const de_GetStudioMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.member != null) { - contents.member = de_StudioMembership(data.member, context); - } + const doc = take(data, { + member: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3502,10 +3490,9 @@ const de_GetStudioMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3525,12 +3512,11 @@ export const de_ListEulaAcceptancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eulaAcceptances != null) { - contents.eulaAcceptances = de_EulaAcceptanceList(data.eulaAcceptances, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + eulaAcceptances: (_) => de_EulaAcceptanceList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3570,10 +3556,9 @@ const de_ListEulaAcceptancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3593,12 +3578,11 @@ export const de_ListEulasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eulas != null) { - contents.eulas = de_EulaList(data.eulas, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + eulas: (_) => de_EulaList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3638,10 +3622,9 @@ const de_ListEulasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3661,12 +3644,11 @@ export const de_ListLaunchProfileMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.members = de_LaunchProfileMembershipList(data.members, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + members: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3706,10 +3688,9 @@ const de_ListLaunchProfileMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3729,12 +3710,11 @@ export const de_ListLaunchProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfiles != null) { - contents.launchProfiles = de_LaunchProfileList(data.launchProfiles, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + launchProfiles: (_) => de_LaunchProfileList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3774,10 +3754,9 @@ const de_ListLaunchProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3797,12 +3776,11 @@ export const de_ListStreamingImagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.streamingImages != null) { - contents.streamingImages = de_StreamingImageList(data.streamingImages, context); - } + const doc = take(data, { + nextToken: __expectString, + streamingImages: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3842,10 +3820,9 @@ const de_ListStreamingImagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3865,12 +3842,11 @@ export const de_ListStreamingSessionBackupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.streamingSessionBackups != null) { - contents.streamingSessionBackups = de_StreamingSessionBackupList(data.streamingSessionBackups, context); - } + const doc = take(data, { + nextToken: __expectString, + streamingSessionBackups: (_) => de_StreamingSessionBackupList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3907,10 +3883,9 @@ const de_ListStreamingSessionBackupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3930,12 +3905,11 @@ export const de_ListStreamingSessionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sessions != null) { - contents.sessions = de_StreamingSessionList(data.sessions, context); - } + const doc = take(data, { + nextToken: __expectString, + sessions: (_) => de_StreamingSessionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3975,10 +3949,9 @@ const de_ListStreamingSessionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3998,12 +3971,11 @@ export const de_ListStudioComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.studioComponents != null) { - contents.studioComponents = de_StudioComponentList(data.studioComponents, context); - } + const doc = take(data, { + nextToken: __expectString, + studioComponents: (_) => de_StudioComponentList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4043,10 +4015,9 @@ const de_ListStudioComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4066,12 +4037,11 @@ export const de_ListStudioMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.members != null) { - contents.members = de_StudioMembershipList(data.members, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + members: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4111,10 +4081,9 @@ const de_ListStudioMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4134,12 +4103,11 @@ export const de_ListStudiosCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.studios != null) { - contents.studios = de_StudioList(data.studios, context); - } + const doc = take(data, { + nextToken: __expectString, + studios: (_) => de_StudioList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4179,10 +4147,9 @@ const de_ListStudiosCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4202,9 +4169,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4244,10 +4212,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4306,10 +4273,9 @@ const de_PutLaunchProfileMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4368,10 +4334,9 @@ const de_PutStudioMembersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4391,9 +4356,10 @@ export const de_StartStreamingSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_StreamingSession(data.session, context); - } + const doc = take(data, { + session: (_) => de_StreamingSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4433,10 +4399,9 @@ const de_StartStreamingSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4456,9 +4421,10 @@ export const de_StartStudioSSOConfigurationRepairCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studio != null) { - contents.studio = de_Studio(data.studio, context); - } + const doc = take(data, { + studio: (_) => de_Studio(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4498,10 +4464,9 @@ const de_StartStudioSSOConfigurationRepairCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4521,9 +4486,10 @@ export const de_StopStreamingSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_StreamingSession(data.session, context); - } + const doc = take(data, { + session: (_) => de_StreamingSession(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4563,10 +4529,9 @@ const de_StopStreamingSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4625,10 +4590,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4687,10 +4651,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4710,9 +4673,10 @@ export const de_UpdateLaunchProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.launchProfile != null) { - contents.launchProfile = de_LaunchProfile(data.launchProfile, context); - } + const doc = take(data, { + launchProfile: (_) => de_LaunchProfile(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4752,10 +4716,9 @@ const de_UpdateLaunchProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4775,9 +4738,10 @@ export const de_UpdateLaunchProfileMemberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.member != null) { - contents.member = de_LaunchProfileMembership(data.member, context); - } + const doc = take(data, { + member: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4817,10 +4781,9 @@ const de_UpdateLaunchProfileMemberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4840,9 +4803,10 @@ export const de_UpdateStreamingImageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.streamingImage != null) { - contents.streamingImage = de_StreamingImage(data.streamingImage, context); - } + const doc = take(data, { + streamingImage: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4882,10 +4846,9 @@ const de_UpdateStreamingImageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4905,9 +4868,10 @@ export const de_UpdateStudioCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studio != null) { - contents.studio = de_Studio(data.studio, context); - } + const doc = take(data, { + studio: (_) => de_Studio(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4947,10 +4911,9 @@ const de_UpdateStudioCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4970,9 +4933,10 @@ export const de_UpdateStudioComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.studioComponent != null) { - contents.studioComponent = de_StudioComponent(data.studioComponent, context); - } + const doc = take(data, { + studioComponent: (_) => de_StudioComponent(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5012,16 +4976,15 @@ const de_UpdateStudioComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -5031,15 +4994,12 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5053,15 +5013,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5078,15 +5035,12 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5103,15 +5057,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5128,15 +5079,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5150,15 +5098,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5172,15 +5117,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.context != null) { - contents.context = de_ExceptionContext(data.context, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + context: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5188,494 +5130,102 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ActiveDirectoryComputerAttribute - */ -const se_ActiveDirectoryComputerAttribute = (input: ActiveDirectoryComputerAttribute, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ActiveDirectoryComputerAttribute omitted. -/** - * serializeAws_restJson1ActiveDirectoryComputerAttributeList - */ -const se_ActiveDirectoryComputerAttributeList = ( - input: ActiveDirectoryComputerAttribute[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ActiveDirectoryComputerAttribute(entry, context); - }); -}; +// se_ActiveDirectoryComputerAttributeList omitted. -/** - * serializeAws_restJson1ActiveDirectoryConfiguration - */ -const se_ActiveDirectoryConfiguration = (input: ActiveDirectoryConfiguration, context: __SerdeContext): any => { - return { - ...(input.computerAttributes != null && { - computerAttributes: se_ActiveDirectoryComputerAttributeList(input.computerAttributes, context), - }), - ...(input.directoryId != null && { directoryId: input.directoryId }), - ...(input.organizationalUnitDistinguishedName != null && { - organizationalUnitDistinguishedName: input.organizationalUnitDistinguishedName, - }), - }; -}; +// se_ActiveDirectoryConfiguration omitted. -/** - * serializeAws_restJson1ComputeFarmConfiguration - */ -const se_ComputeFarmConfiguration = (input: ComputeFarmConfiguration, context: __SerdeContext): any => { - return { - ...(input.activeDirectoryUser != null && { activeDirectoryUser: input.activeDirectoryUser }), - ...(input.endpoint != null && { endpoint: input.endpoint }), - }; -}; +// se_ComputeFarmConfiguration omitted. -/** - * serializeAws_restJson1EC2SubnetIdList - */ -const se_EC2SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EC2SubnetIdList omitted. -/** - * serializeAws_restJson1EulaIdList - */ -const se_EulaIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EulaIdList omitted. -/** - * serializeAws_restJson1LaunchProfileProtocolVersionList - */ -const se_LaunchProfileProtocolVersionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LaunchProfileProtocolVersionList omitted. -/** - * serializeAws_restJson1LaunchProfileStudioComponentIdList - */ -const se_LaunchProfileStudioComponentIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LaunchProfileStudioComponentIdList omitted. -/** - * serializeAws_restJson1LicenseServiceConfiguration - */ -const se_LicenseServiceConfiguration = (input: LicenseServiceConfiguration, context: __SerdeContext): any => { - return { - ...(input.endpoint != null && { endpoint: input.endpoint }), - }; -}; +// se_LicenseServiceConfiguration omitted. -/** - * serializeAws_restJson1NewLaunchProfileMember - */ -const se_NewLaunchProfileMember = (input: NewLaunchProfileMember, context: __SerdeContext): any => { - return { - ...(input.persona != null && { persona: input.persona }), - ...(input.principalId != null && { principalId: input.principalId }), - }; -}; +// se_NewLaunchProfileMember omitted. -/** - * serializeAws_restJson1NewLaunchProfileMemberList - */ -const se_NewLaunchProfileMemberList = (input: NewLaunchProfileMember[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NewLaunchProfileMember(entry, context); - }); -}; +// se_NewLaunchProfileMemberList omitted. -/** - * serializeAws_restJson1NewStudioMember - */ -const se_NewStudioMember = (input: NewStudioMember, context: __SerdeContext): any => { - return { - ...(input.persona != null && { persona: input.persona }), - ...(input.principalId != null && { principalId: input.principalId }), - }; -}; +// se_NewStudioMember omitted. -/** - * serializeAws_restJson1NewStudioMemberList - */ -const se_NewStudioMemberList = (input: NewStudioMember[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NewStudioMember(entry, context); - }); -}; +// se_NewStudioMemberList omitted. -/** - * serializeAws_restJson1ScriptParameterKeyValue - */ -const se_ScriptParameterKeyValue = (input: ScriptParameterKeyValue, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ScriptParameterKeyValue omitted. -/** - * serializeAws_restJson1SharedFileSystemConfiguration - */ -const se_SharedFileSystemConfiguration = (input: SharedFileSystemConfiguration, context: __SerdeContext): any => { - return { - ...(input.endpoint != null && { endpoint: input.endpoint }), - ...(input.fileSystemId != null && { fileSystemId: input.fileSystemId }), - ...(input.linuxMountPoint != null && { linuxMountPoint: input.linuxMountPoint }), - ...(input.shareName != null && { shareName: input.shareName }), - ...(input.windowsMountDrive != null && { windowsMountDrive: input.windowsMountDrive }), - }; -}; +// se_SharedFileSystemConfiguration omitted. -/** - * serializeAws_restJson1StreamConfigurationCreate - */ -const se_StreamConfigurationCreate = (input: StreamConfigurationCreate, context: __SerdeContext): any => { - return { - ...(input.automaticTerminationMode != null && { automaticTerminationMode: input.automaticTerminationMode }), - ...(input.clipboardMode != null && { clipboardMode: input.clipboardMode }), - ...(input.ec2InstanceTypes != null && { - ec2InstanceTypes: se_StreamingInstanceTypeList(input.ec2InstanceTypes, context), - }), - ...(input.maxSessionLengthInMinutes != null && { maxSessionLengthInMinutes: input.maxSessionLengthInMinutes }), - ...(input.maxStoppedSessionLengthInMinutes != null && { - maxStoppedSessionLengthInMinutes: input.maxStoppedSessionLengthInMinutes, - }), - ...(input.sessionBackup != null && { - sessionBackup: se_StreamConfigurationSessionBackup(input.sessionBackup, context), - }), - ...(input.sessionPersistenceMode != null && { sessionPersistenceMode: input.sessionPersistenceMode }), - ...(input.sessionStorage != null && { - sessionStorage: se_StreamConfigurationSessionStorage(input.sessionStorage, context), - }), - ...(input.streamingImageIds != null && { - streamingImageIds: se_StreamingImageIdList(input.streamingImageIds, context), - }), - ...(input.volumeConfiguration != null && { - volumeConfiguration: se_VolumeConfiguration(input.volumeConfiguration, context), - }), - }; -}; +// se_StreamConfigurationCreate omitted. -/** - * serializeAws_restJson1StreamConfigurationSessionBackup - */ -const se_StreamConfigurationSessionBackup = (input: StreamConfigurationSessionBackup, context: __SerdeContext): any => { - return { - ...(input.maxBackupsToRetain != null && { maxBackupsToRetain: input.maxBackupsToRetain }), - ...(input.mode != null && { mode: input.mode }), - }; -}; +// se_StreamConfigurationSessionBackup omitted. -/** - * serializeAws_restJson1StreamConfigurationSessionStorage - */ -const se_StreamConfigurationSessionStorage = ( - input: StreamConfigurationSessionStorage, - context: __SerdeContext -): any => { - return { - ...(input.mode != null && { mode: se_StreamingSessionStorageModeList(input.mode, context) }), - ...(input.root != null && { root: se_StreamingSessionStorageRoot(input.root, context) }), - }; -}; +// se_StreamConfigurationSessionStorage omitted. -/** - * serializeAws_restJson1StreamingImageIdList - */ -const se_StreamingImageIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StreamingImageIdList omitted. -/** - * serializeAws_restJson1StreamingInstanceTypeList - */ -const se_StreamingInstanceTypeList = (input: (StreamingInstanceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StreamingInstanceTypeList omitted. -/** - * serializeAws_restJson1StreamingSessionStorageModeList - */ -const se_StreamingSessionStorageModeList = ( - input: (StreamingSessionStorageMode | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StreamingSessionStorageModeList omitted. -/** - * serializeAws_restJson1StreamingSessionStorageRoot - */ -const se_StreamingSessionStorageRoot = (input: StreamingSessionStorageRoot, context: __SerdeContext): any => { - return { - ...(input.linux != null && { linux: input.linux }), - ...(input.windows != null && { windows: input.windows }), - }; -}; +// se_StreamingSessionStorageRoot omitted. -/** - * serializeAws_restJson1StudioComponentConfiguration - */ -const se_StudioComponentConfiguration = (input: StudioComponentConfiguration, context: __SerdeContext): any => { - return { - ...(input.activeDirectoryConfiguration != null && { - activeDirectoryConfiguration: se_ActiveDirectoryConfiguration(input.activeDirectoryConfiguration, context), - }), - ...(input.computeFarmConfiguration != null && { - computeFarmConfiguration: se_ComputeFarmConfiguration(input.computeFarmConfiguration, context), - }), - ...(input.licenseServiceConfiguration != null && { - licenseServiceConfiguration: se_LicenseServiceConfiguration(input.licenseServiceConfiguration, context), - }), - ...(input.sharedFileSystemConfiguration != null && { - sharedFileSystemConfiguration: se_SharedFileSystemConfiguration(input.sharedFileSystemConfiguration, context), - }), - }; -}; +// se_StudioComponentConfiguration omitted. -/** - * serializeAws_restJson1StudioComponentInitializationScript - */ -const se_StudioComponentInitializationScript = ( - input: StudioComponentInitializationScript, - context: __SerdeContext -): any => { - return { - ...(input.launchProfileProtocolVersion != null && { - launchProfileProtocolVersion: input.launchProfileProtocolVersion, - }), - ...(input.platform != null && { platform: input.platform }), - ...(input.runContext != null && { runContext: input.runContext }), - ...(input.script != null && { script: input.script }), - }; -}; +// se_StudioComponentInitializationScript omitted. -/** - * serializeAws_restJson1StudioComponentInitializationScriptList - */ -const se_StudioComponentInitializationScriptList = ( - input: StudioComponentInitializationScript[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StudioComponentInitializationScript(entry, context); - }); -}; +// se_StudioComponentInitializationScriptList omitted. -/** - * serializeAws_restJson1StudioComponentScriptParameterKeyValueList - */ -const se_StudioComponentScriptParameterKeyValueList = ( - input: ScriptParameterKeyValue[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ScriptParameterKeyValue(entry, context); - }); -}; +// se_StudioComponentScriptParameterKeyValueList omitted. -/** - * serializeAws_restJson1StudioComponentSecurityGroupIdList - */ -const se_StudioComponentSecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StudioComponentSecurityGroupIdList omitted. -/** - * serializeAws_restJson1StudioEncryptionConfiguration - */ -const se_StudioEncryptionConfiguration = (input: StudioEncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.keyArn != null && { keyArn: input.keyArn }), - ...(input.keyType != null && { keyType: input.keyType }), - }; -}; +// se_StudioEncryptionConfiguration omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1VolumeConfiguration - */ -const se_VolumeConfiguration = (input: VolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.iops != null && { iops: input.iops }), - ...(input.size != null && { size: input.size }), - ...(input.throughput != null && { throughput: input.throughput }), - }; -}; +// se_VolumeConfiguration omitted. -/** - * deserializeAws_restJson1ActiveDirectoryComputerAttribute - */ -const de_ActiveDirectoryComputerAttribute = ( - output: any, - context: __SerdeContext -): ActiveDirectoryComputerAttribute => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_ActiveDirectoryComputerAttribute omitted. -/** - * deserializeAws_restJson1ActiveDirectoryComputerAttributeList - */ -const de_ActiveDirectoryComputerAttributeList = ( - output: any, - context: __SerdeContext -): ActiveDirectoryComputerAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActiveDirectoryComputerAttribute(entry, context); - }); - return retVal; -}; +// de_ActiveDirectoryComputerAttributeList omitted. -/** - * deserializeAws_restJson1ActiveDirectoryConfiguration - */ -const de_ActiveDirectoryConfiguration = (output: any, context: __SerdeContext): ActiveDirectoryConfiguration => { - return { - computerAttributes: - output.computerAttributes != null - ? de_ActiveDirectoryComputerAttributeList(output.computerAttributes, context) - : undefined, - directoryId: __expectString(output.directoryId), - organizationalUnitDistinguishedName: __expectString(output.organizationalUnitDistinguishedName), - } as any; -}; +// de_ActiveDirectoryConfiguration omitted. -/** - * deserializeAws_restJson1ActiveDirectoryDnsIpAddressList - */ -const de_ActiveDirectoryDnsIpAddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ActiveDirectoryDnsIpAddressList omitted. -/** - * deserializeAws_restJson1ComputeFarmConfiguration - */ -const de_ComputeFarmConfiguration = (output: any, context: __SerdeContext): ComputeFarmConfiguration => { - return { - activeDirectoryUser: __expectString(output.activeDirectoryUser), - endpoint: __expectString(output.endpoint), - } as any; -}; +// de_ComputeFarmConfiguration omitted. -/** - * deserializeAws_restJson1EC2SubnetIdList - */ -const de_EC2SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EC2SubnetIdList omitted. /** * deserializeAws_restJson1Eula */ const de_Eula = (output: any, context: __SerdeContext): Eula => { - return { - content: __expectString(output.content), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - eulaId: __expectString(output.eulaId), - name: __expectString(output.name), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + content: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + eulaId: __expectString, + name: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1EulaAcceptance */ const de_EulaAcceptance = (output: any, context: __SerdeContext): EulaAcceptance => { - return { - acceptedAt: - output.acceptedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.acceptedAt)) : undefined, - acceptedBy: __expectString(output.acceptedBy), - accepteeId: __expectString(output.accepteeId), - eulaAcceptanceId: __expectString(output.eulaAcceptanceId), - eulaId: __expectString(output.eulaId), - } as any; + return take(output, { + acceptedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + acceptedBy: __expectString, + accepteeId: __expectString, + eulaAcceptanceId: __expectString, + eulaId: __expectString, + }) as any; }; /** @@ -5685,28 +5235,12 @@ const de_EulaAcceptanceList = (output: any, context: __SerdeContext): EulaAccept const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EulaAcceptance(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EulaIdList - */ -const de_EulaIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EulaIdList omitted. /** * deserializeAws_restJson1EulaList @@ -5715,147 +5249,46 @@ const de_EulaList = (output: any, context: __SerdeContext): Eula[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Eula(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExceptionContext - */ -const de_ExceptionContext = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ExceptionContext omitted. /** * deserializeAws_restJson1LaunchProfile */ const de_LaunchProfile = (output: any, context: __SerdeContext): LaunchProfile => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - description: __expectString(output.description), - ec2SubnetIds: output.ec2SubnetIds != null ? de_EC2SubnetIdList(output.ec2SubnetIds, context) : undefined, - launchProfileId: __expectString(output.launchProfileId), - launchProfileProtocolVersions: - output.launchProfileProtocolVersions != null - ? de_LaunchProfileProtocolVersionList(output.launchProfileProtocolVersions, context) - : undefined, - name: __expectString(output.name), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - streamConfiguration: - output.streamConfiguration != null ? de_StreamConfiguration(output.streamConfiguration, context) : undefined, - studioComponentIds: - output.studioComponentIds != null - ? de_LaunchProfileStudioComponentIdList(output.studioComponentIds, context) - : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - updatedBy: __expectString(output.updatedBy), - validationResults: - output.validationResults != null ? de_ValidationResults(output.validationResults, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LaunchProfileInitialization - */ -const de_LaunchProfileInitialization = (output: any, context: __SerdeContext): LaunchProfileInitialization => { - return { - activeDirectory: - output.activeDirectory != null - ? de_LaunchProfileInitializationActiveDirectory(output.activeDirectory, context) - : undefined, - ec2SecurityGroupIds: - output.ec2SecurityGroupIds != null - ? de_LaunchProfileSecurityGroupIdList(output.ec2SecurityGroupIds, context) - : undefined, - launchProfileId: __expectString(output.launchProfileId), - launchProfileProtocolVersion: __expectString(output.launchProfileProtocolVersion), - launchPurpose: __expectString(output.launchPurpose), - name: __expectString(output.name), - platform: __expectString(output.platform), - systemInitializationScripts: - output.systemInitializationScripts != null - ? de_LaunchProfileInitializationScriptList(output.systemInitializationScripts, context) - : undefined, - userInitializationScripts: - output.userInitializationScripts != null - ? de_LaunchProfileInitializationScriptList(output.userInitializationScripts, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LaunchProfileInitializationActiveDirectory - */ -const de_LaunchProfileInitializationActiveDirectory = ( - output: any, - context: __SerdeContext -): LaunchProfileInitializationActiveDirectory => { - return { - computerAttributes: - output.computerAttributes != null - ? de_ActiveDirectoryComputerAttributeList(output.computerAttributes, context) - : undefined, - directoryId: __expectString(output.directoryId), - directoryName: __expectString(output.directoryName), - dnsIpAddresses: - output.dnsIpAddresses != null ? de_ActiveDirectoryDnsIpAddressList(output.dnsIpAddresses, context) : undefined, - organizationalUnitDistinguishedName: __expectString(output.organizationalUnitDistinguishedName), - studioComponentId: __expectString(output.studioComponentId), - studioComponentName: __expectString(output.studioComponentName), - } as any; -}; - -/** - * deserializeAws_restJson1LaunchProfileInitializationScript - */ -const de_LaunchProfileInitializationScript = ( - output: any, - context: __SerdeContext -): LaunchProfileInitializationScript => { - return { - runtimeRoleArn: __expectString(output.runtimeRoleArn), - script: __expectString(output.script), - secureInitializationRoleArn: __expectString(output.secureInitializationRoleArn), - studioComponentId: __expectString(output.studioComponentId), - studioComponentName: __expectString(output.studioComponentName), - } as any; -}; - -/** - * deserializeAws_restJson1LaunchProfileInitializationScriptList - */ -const de_LaunchProfileInitializationScriptList = ( - output: any, - context: __SerdeContext -): LaunchProfileInitializationScript[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchProfileInitializationScript(entry, context); - }); - return retVal; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + description: __expectString, + ec2SubnetIds: _json, + launchProfileId: __expectString, + launchProfileProtocolVersions: _json, + name: __expectString, + state: __expectString, + statusCode: __expectString, + statusMessage: __expectString, + streamConfiguration: _json, + studioComponentIds: _json, + tags: _json, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + updatedBy: __expectString, + validationResults: _json, + }) as any; }; +// de_LaunchProfileInitialization omitted. + +// de_LaunchProfileInitializationActiveDirectory omitted. + +// de_LaunchProfileInitializationScript omitted. + +// de_LaunchProfileInitializationScriptList omitted. + /** * deserializeAws_restJson1LaunchProfileList */ @@ -5863,307 +5296,94 @@ const de_LaunchProfileList = (output: any, context: __SerdeContext): LaunchProfi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LaunchProfile(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LaunchProfileMembership - */ -const de_LaunchProfileMembership = (output: any, context: __SerdeContext): LaunchProfileMembership => { - return { - identityStoreId: __expectString(output.identityStoreId), - persona: __expectString(output.persona), - principalId: __expectString(output.principalId), - sid: __expectString(output.sid), - } as any; -}; +// de_LaunchProfileMembership omitted. -/** - * deserializeAws_restJson1LaunchProfileMembershipList - */ -const de_LaunchProfileMembershipList = (output: any, context: __SerdeContext): LaunchProfileMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchProfileMembership(entry, context); - }); - return retVal; -}; +// de_LaunchProfileMembershipList omitted. -/** - * deserializeAws_restJson1LaunchProfileProtocolVersionList - */ -const de_LaunchProfileProtocolVersionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LaunchProfileProtocolVersionList omitted. -/** - * deserializeAws_restJson1LaunchProfileSecurityGroupIdList - */ -const de_LaunchProfileSecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LaunchProfileSecurityGroupIdList omitted. -/** - * deserializeAws_restJson1LaunchProfileStudioComponentIdList - */ -const de_LaunchProfileStudioComponentIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LaunchProfileStudioComponentIdList omitted. -/** - * deserializeAws_restJson1LicenseServiceConfiguration - */ -const de_LicenseServiceConfiguration = (output: any, context: __SerdeContext): LicenseServiceConfiguration => { - return { - endpoint: __expectString(output.endpoint), - } as any; -}; +// de_LicenseServiceConfiguration omitted. -/** - * deserializeAws_restJson1ScriptParameterKeyValue - */ -const de_ScriptParameterKeyValue = (output: any, context: __SerdeContext): ScriptParameterKeyValue => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_ScriptParameterKeyValue omitted. -/** - * deserializeAws_restJson1SharedFileSystemConfiguration - */ -const de_SharedFileSystemConfiguration = (output: any, context: __SerdeContext): SharedFileSystemConfiguration => { - return { - endpoint: __expectString(output.endpoint), - fileSystemId: __expectString(output.fileSystemId), - linuxMountPoint: __expectString(output.linuxMountPoint), - shareName: __expectString(output.shareName), - windowsMountDrive: __expectString(output.windowsMountDrive), - } as any; -}; +// de_SharedFileSystemConfiguration omitted. -/** - * deserializeAws_restJson1StreamConfiguration - */ -const de_StreamConfiguration = (output: any, context: __SerdeContext): StreamConfiguration => { - return { - automaticTerminationMode: __expectString(output.automaticTerminationMode), - clipboardMode: __expectString(output.clipboardMode), - ec2InstanceTypes: - output.ec2InstanceTypes != null ? de_StreamingInstanceTypeList(output.ec2InstanceTypes, context) : undefined, - maxSessionLengthInMinutes: __expectInt32(output.maxSessionLengthInMinutes), - maxStoppedSessionLengthInMinutes: __expectInt32(output.maxStoppedSessionLengthInMinutes), - sessionBackup: - output.sessionBackup != null ? de_StreamConfigurationSessionBackup(output.sessionBackup, context) : undefined, - sessionPersistenceMode: __expectString(output.sessionPersistenceMode), - sessionStorage: - output.sessionStorage != null ? de_StreamConfigurationSessionStorage(output.sessionStorage, context) : undefined, - streamingImageIds: - output.streamingImageIds != null ? de_StreamingImageIdList(output.streamingImageIds, context) : undefined, - volumeConfiguration: - output.volumeConfiguration != null ? de_VolumeConfiguration(output.volumeConfiguration, context) : undefined, - } as any; -}; +// de_StreamConfiguration omitted. -/** - * deserializeAws_restJson1StreamConfigurationSessionBackup - */ -const de_StreamConfigurationSessionBackup = ( - output: any, - context: __SerdeContext -): StreamConfigurationSessionBackup => { - return { - maxBackupsToRetain: __expectInt32(output.maxBackupsToRetain), - mode: __expectString(output.mode), - } as any; -}; +// de_StreamConfigurationSessionBackup omitted. -/** - * deserializeAws_restJson1StreamConfigurationSessionStorage - */ -const de_StreamConfigurationSessionStorage = ( - output: any, - context: __SerdeContext -): StreamConfigurationSessionStorage => { - return { - mode: output.mode != null ? de_StreamingSessionStorageModeList(output.mode, context) : undefined, - root: output.root != null ? de_StreamingSessionStorageRoot(output.root, context) : undefined, - } as any; -}; +// de_StreamConfigurationSessionStorage omitted. -/** - * deserializeAws_restJson1StreamingImage - */ -const de_StreamingImage = (output: any, context: __SerdeContext): StreamingImage => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - ec2ImageId: __expectString(output.ec2ImageId), - encryptionConfiguration: - output.encryptionConfiguration != null - ? de_StreamingImageEncryptionConfiguration(output.encryptionConfiguration, context) - : undefined, - eulaIds: output.eulaIds != null ? de_EulaIdList(output.eulaIds, context) : undefined, - name: __expectString(output.name), - owner: __expectString(output.owner), - platform: __expectString(output.platform), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - streamingImageId: __expectString(output.streamingImageId), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_StreamingImage omitted. -/** - * deserializeAws_restJson1StreamingImageEncryptionConfiguration - */ -const de_StreamingImageEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): StreamingImageEncryptionConfiguration => { - return { - keyArn: __expectString(output.keyArn), - keyType: __expectString(output.keyType), - } as any; -}; +// de_StreamingImageEncryptionConfiguration omitted. -/** - * deserializeAws_restJson1StreamingImageIdList - */ -const de_StreamingImageIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StreamingImageIdList omitted. -/** - * deserializeAws_restJson1StreamingImageList - */ -const de_StreamingImageList = (output: any, context: __SerdeContext): StreamingImage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamingImage(entry, context); - }); - return retVal; -}; +// de_StreamingImageList omitted. -/** - * deserializeAws_restJson1StreamingInstanceTypeList - */ -const de_StreamingInstanceTypeList = (output: any, context: __SerdeContext): (StreamingInstanceType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StreamingInstanceTypeList omitted. /** * deserializeAws_restJson1StreamingSession */ const de_StreamingSession = (output: any, context: __SerdeContext): StreamingSession => { - return { - arn: __expectString(output.arn), - automaticTerminationMode: __expectString(output.automaticTerminationMode), - backupMode: __expectString(output.backupMode), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - ec2InstanceType: __expectString(output.ec2InstanceType), - launchProfileId: __expectString(output.launchProfileId), - maxBackupsToRetain: __expectInt32(output.maxBackupsToRetain), - ownedBy: __expectString(output.ownedBy), - sessionId: __expectString(output.sessionId), - sessionPersistenceMode: __expectString(output.sessionPersistenceMode), - startedAt: - output.startedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startedAt)) : undefined, - startedBy: __expectString(output.startedBy), - startedFromBackupId: __expectString(output.startedFromBackupId), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - stopAt: output.stopAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.stopAt)) : undefined, - stoppedAt: - output.stoppedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.stoppedAt)) : undefined, - stoppedBy: __expectString(output.stoppedBy), - streamingImageId: __expectString(output.streamingImageId), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - terminateAt: - output.terminateAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.terminateAt)) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - updatedBy: __expectString(output.updatedBy), - volumeConfiguration: - output.volumeConfiguration != null ? de_VolumeConfiguration(output.volumeConfiguration, context) : undefined, - volumeRetentionMode: __expectString(output.volumeRetentionMode), - } as any; + return take(output, { + arn: __expectString, + automaticTerminationMode: __expectString, + backupMode: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + ec2InstanceType: __expectString, + launchProfileId: __expectString, + maxBackupsToRetain: __expectInt32, + ownedBy: __expectString, + sessionId: __expectString, + sessionPersistenceMode: __expectString, + startedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + startedBy: __expectString, + startedFromBackupId: __expectString, + state: __expectString, + statusCode: __expectString, + statusMessage: __expectString, + stopAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + stoppedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + stoppedBy: __expectString, + streamingImageId: __expectString, + tags: _json, + terminateAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + updatedBy: __expectString, + volumeConfiguration: _json, + volumeRetentionMode: __expectString, + }) as any; }; /** * deserializeAws_restJson1StreamingSessionBackup */ const de_StreamingSessionBackup = (output: any, context: __SerdeContext): StreamingSessionBackup => { - return { - arn: __expectString(output.arn), - backupId: __expectString(output.backupId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - launchProfileId: __expectString(output.launchProfileId), - ownedBy: __expectString(output.ownedBy), - sessionId: __expectString(output.sessionId), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + backupId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + launchProfileId: __expectString, + ownedBy: __expectString, + sessionId: __expectString, + state: __expectString, + statusCode: __expectString, + statusMessage: __expectString, + tags: _json, + }) as any; }; /** @@ -6173,9 +5393,6 @@ const de_StreamingSessionBackupList = (output: any, context: __SerdeContext): St const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamingSessionBackup(entry, context); }); return retVal; @@ -6188,185 +5405,88 @@ const de_StreamingSessionList = (output: any, context: __SerdeContext): Streamin const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StreamingSession(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StreamingSessionStorageModeList - */ -const de_StreamingSessionStorageModeList = ( - output: any, - context: __SerdeContext -): (StreamingSessionStorageMode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StreamingSessionStorageModeList omitted. -/** - * deserializeAws_restJson1StreamingSessionStorageRoot - */ -const de_StreamingSessionStorageRoot = (output: any, context: __SerdeContext): StreamingSessionStorageRoot => { - return { - linux: __expectString(output.linux), - windows: __expectString(output.windows), - } as any; -}; +// de_StreamingSessionStorageRoot omitted. /** * deserializeAws_restJson1StreamingSessionStream */ const de_StreamingSessionStream = (output: any, context: __SerdeContext): StreamingSessionStream => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - expiresAt: - output.expiresAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.expiresAt)) : undefined, - ownedBy: __expectString(output.ownedBy), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - streamId: __expectString(output.streamId), - url: __expectString(output.url), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + expiresAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ownedBy: __expectString, + state: __expectString, + statusCode: __expectString, + streamId: __expectString, + url: __expectString, + }) as any; }; /** * deserializeAws_restJson1Studio */ const de_Studio = (output: any, context: __SerdeContext): Studio => { - return { - adminRoleArn: __expectString(output.adminRoleArn), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - displayName: __expectString(output.displayName), - homeRegion: __expectString(output.homeRegion), - ssoClientId: __expectString(output.ssoClientId), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - studioEncryptionConfiguration: - output.studioEncryptionConfiguration != null - ? de_StudioEncryptionConfiguration(output.studioEncryptionConfiguration, context) - : undefined, - studioId: __expectString(output.studioId), - studioName: __expectString(output.studioName), - studioUrl: __expectString(output.studioUrl), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - userRoleArn: __expectString(output.userRoleArn), - } as any; + return take(output, { + adminRoleArn: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + displayName: __expectString, + homeRegion: __expectString, + ssoClientId: __expectString, + state: __expectString, + statusCode: __expectString, + statusMessage: __expectString, + studioEncryptionConfiguration: _json, + studioId: __expectString, + studioName: __expectString, + studioUrl: __expectString, + tags: _json, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + userRoleArn: __expectString, + }) as any; }; /** * deserializeAws_restJson1StudioComponent */ const de_StudioComponent = (output: any, context: __SerdeContext): StudioComponent => { - return { - arn: __expectString(output.arn), - configuration: - output.configuration != null ? de_StudioComponentConfiguration(output.configuration, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - description: __expectString(output.description), - ec2SecurityGroupIds: - output.ec2SecurityGroupIds != null - ? de_StudioComponentSecurityGroupIdList(output.ec2SecurityGroupIds, context) - : undefined, - initializationScripts: - output.initializationScripts != null - ? de_StudioComponentInitializationScriptList(output.initializationScripts, context) - : undefined, - name: __expectString(output.name), - runtimeRoleArn: __expectString(output.runtimeRoleArn), - scriptParameters: - output.scriptParameters != null - ? de_StudioComponentScriptParameterKeyValueList(output.scriptParameters, context) - : undefined, - secureInitializationRoleArn: __expectString(output.secureInitializationRoleArn), - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - studioComponentId: __expectString(output.studioComponentId), - subtype: __expectString(output.subtype), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - updatedBy: __expectString(output.updatedBy), - } as any; -}; - -/** - * deserializeAws_restJson1StudioComponentConfiguration - */ -const de_StudioComponentConfiguration = (output: any, context: __SerdeContext): StudioComponentConfiguration => { - return { - activeDirectoryConfiguration: - output.activeDirectoryConfiguration != null - ? de_ActiveDirectoryConfiguration(output.activeDirectoryConfiguration, context) - : undefined, - computeFarmConfiguration: - output.computeFarmConfiguration != null - ? de_ComputeFarmConfiguration(output.computeFarmConfiguration, context) - : undefined, - licenseServiceConfiguration: - output.licenseServiceConfiguration != null - ? de_LicenseServiceConfiguration(output.licenseServiceConfiguration, context) - : undefined, - sharedFileSystemConfiguration: - output.sharedFileSystemConfiguration != null - ? de_SharedFileSystemConfiguration(output.sharedFileSystemConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1StudioComponentInitializationScript - */ -const de_StudioComponentInitializationScript = ( - output: any, - context: __SerdeContext -): StudioComponentInitializationScript => { - return { - launchProfileProtocolVersion: __expectString(output.launchProfileProtocolVersion), - platform: __expectString(output.platform), - runContext: __expectString(output.runContext), - script: __expectString(output.script), - } as any; -}; - -/** - * deserializeAws_restJson1StudioComponentInitializationScriptList - */ -const de_StudioComponentInitializationScriptList = ( - output: any, - context: __SerdeContext -): StudioComponentInitializationScript[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StudioComponentInitializationScript(entry, context); - }); - return retVal; -}; + return take(output, { + arn: __expectString, + configuration: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + description: __expectString, + ec2SecurityGroupIds: _json, + initializationScripts: _json, + name: __expectString, + runtimeRoleArn: __expectString, + scriptParameters: _json, + secureInitializationRoleArn: __expectString, + state: __expectString, + statusCode: __expectString, + statusMessage: __expectString, + studioComponentId: __expectString, + subtype: __expectString, + tags: _json, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + updatedBy: __expectString, + }) as any; +}; + +// de_StudioComponentConfiguration omitted. + +// de_StudioComponentInitializationScript omitted. + +// de_StudioComponentInitializationScriptList omitted. /** * deserializeAws_restJson1StudioComponentList @@ -6375,64 +5495,30 @@ const de_StudioComponentList = (output: any, context: __SerdeContext): StudioCom const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StudioComponent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StudioComponentScriptParameterKeyValueList - */ -const de_StudioComponentScriptParameterKeyValueList = ( - output: any, - context: __SerdeContext -): ScriptParameterKeyValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ScriptParameterKeyValue(entry, context); - }); - return retVal; -}; +// de_StudioComponentScriptParameterKeyValueList omitted. -/** - * deserializeAws_restJson1StudioComponentSecurityGroupIdList - */ -const de_StudioComponentSecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StudioComponentSecurityGroupIdList omitted. /** * deserializeAws_restJson1StudioComponentSummary */ const de_StudioComponentSummary = (output: any, context: __SerdeContext): StudioComponentSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - description: __expectString(output.description), - name: __expectString(output.name), - studioComponentId: __expectString(output.studioComponentId), - subtype: __expectString(output.subtype), - type: __expectString(output.type), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - updatedBy: __expectString(output.updatedBy), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + description: __expectString, + name: __expectString, + studioComponentId: __expectString, + subtype: __expectString, + type: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + updatedBy: __expectString, + }) as any; }; /** @@ -6442,23 +5528,12 @@ const de_StudioComponentSummaryList = (output: any, context: __SerdeContext): St const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StudioComponentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StudioEncryptionConfiguration - */ -const de_StudioEncryptionConfiguration = (output: any, context: __SerdeContext): StudioEncryptionConfiguration => { - return { - keyArn: __expectString(output.keyArn), - keyType: __expectString(output.keyType), - } as any; -}; +// de_StudioEncryptionConfiguration omitted. /** * deserializeAws_restJson1StudioList @@ -6467,91 +5542,22 @@ const de_StudioList = (output: any, context: __SerdeContext): Studio[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Studio(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StudioMembership - */ -const de_StudioMembership = (output: any, context: __SerdeContext): StudioMembership => { - return { - identityStoreId: __expectString(output.identityStoreId), - persona: __expectString(output.persona), - principalId: __expectString(output.principalId), - sid: __expectString(output.sid), - } as any; -}; +// de_StudioMembership omitted. -/** - * deserializeAws_restJson1StudioMembershipList - */ -const de_StudioMembershipList = (output: any, context: __SerdeContext): StudioMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StudioMembership(entry, context); - }); - return retVal; -}; +// de_StudioMembershipList omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1ValidationResult - */ -const de_ValidationResult = (output: any, context: __SerdeContext): ValidationResult => { - return { - state: __expectString(output.state), - statusCode: __expectString(output.statusCode), - statusMessage: __expectString(output.statusMessage), - type: __expectString(output.type), - } as any; -}; +// de_ValidationResult omitted. -/** - * deserializeAws_restJson1ValidationResults - */ -const de_ValidationResults = (output: any, context: __SerdeContext): ValidationResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationResult(entry, context); - }); - return retVal; -}; +// de_ValidationResults omitted. -/** - * deserializeAws_restJson1VolumeConfiguration - */ -const de_VolumeConfiguration = (output: any, context: __SerdeContext): VolumeConfiguration => { - return { - iops: __expectInt32(output.iops), - size: __expectInt32(output.size), - throughput: __expectInt32(output.throughput), - } as any; -}; +// de_VolumeConfiguration omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-oam/src/protocols/Aws_restJson1.ts b/clients/client-oam/src/protocols/Aws_restJson1.ts index 1600855fbc7d..77d9157567ab 100644 --- a/clients/client-oam/src/protocols/Aws_restJson1.ts +++ b/clients/client-oam/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -38,9 +40,6 @@ import { ConflictException, InternalServiceFault, InvalidParameterException, - ListAttachedLinksItem, - ListLinksItem, - ListSinksItem, MissingRequiredParameterException, ResourceNotFoundException, ResourceType, @@ -63,12 +62,14 @@ export const se_CreateLinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateLink"; let body: any; - body = JSON.stringify({ - ...(input.LabelTemplate != null && { LabelTemplate: input.LabelTemplate }), - ...(input.ResourceTypes != null && { ResourceTypes: se_ResourceTypesInput(input.ResourceTypes, context) }), - ...(input.SinkIdentifier != null && { SinkIdentifier: input.SinkIdentifier }), - ...(input.Tags != null && { Tags: se_TagMapInput(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + LabelTemplate: [], + ResourceTypes: (_) => _json(_), + SinkIdentifier: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -93,10 +94,12 @@ export const se_CreateSinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSink"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMapInput(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -121,9 +124,11 @@ export const se_DeleteLinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteLink"; let body: any; - body = JSON.stringify({ - ...(input.Identifier != null && { Identifier: input.Identifier }), - }); + body = JSON.stringify( + take(input, { + Identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -148,9 +153,11 @@ export const se_DeleteSinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSink"; let body: any; - body = JSON.stringify({ - ...(input.Identifier != null && { Identifier: input.Identifier }), - }); + body = JSON.stringify( + take(input, { + Identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -175,9 +182,11 @@ export const se_GetLinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetLink"; let body: any; - body = JSON.stringify({ - ...(input.Identifier != null && { Identifier: input.Identifier }), - }); + body = JSON.stringify( + take(input, { + Identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -202,9 +211,11 @@ export const se_GetSinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetSink"; let body: any; - body = JSON.stringify({ - ...(input.Identifier != null && { Identifier: input.Identifier }), - }); + body = JSON.stringify( + take(input, { + Identifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -229,9 +240,11 @@ export const se_GetSinkPolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetSinkPolicy"; let body: any; - body = JSON.stringify({ - ...(input.SinkIdentifier != null && { SinkIdentifier: input.SinkIdentifier }), - }); + body = JSON.stringify( + take(input, { + SinkIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -256,11 +269,13 @@ export const se_ListAttachedLinksCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListAttachedLinks"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SinkIdentifier != null && { SinkIdentifier: input.SinkIdentifier }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + SinkIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -285,10 +300,12 @@ export const se_ListLinksCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListLinks"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -313,10 +330,12 @@ export const se_ListSinksCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListSinks"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -364,10 +383,12 @@ export const se_PutSinkPolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutSinkPolicy"; let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.SinkIdentifier != null && { SinkIdentifier: input.SinkIdentifier }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + SinkIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -393,9 +414,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMapInput(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -450,10 +473,12 @@ export const se_UpdateLinkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateLink"; let body: any; - body = JSON.stringify({ - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.ResourceTypes != null && { ResourceTypes: se_ResourceTypesInput(input.ResourceTypes, context) }), - }); + body = JSON.stringify( + take(input, { + Identifier: [], + ResourceTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -479,27 +504,16 @@ export const de_CreateLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Label != null) { - contents.Label = __expectString(data.Label); - } - if (data.LabelTemplate != null) { - contents.LabelTemplate = __expectString(data.LabelTemplate); - } - if (data.ResourceTypes != null) { - contents.ResourceTypes = de_ResourceTypesOutput(data.ResourceTypes, context); - } - if (data.SinkArn != null) { - contents.SinkArn = __expectString(data.SinkArn); - } - if (data.Tags != null) { - contents.Tags = de_TagMapOutput(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + Label: __expectString, + LabelTemplate: __expectString, + ResourceTypes: _json, + SinkArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -533,10 +547,9 @@ const de_CreateLinkCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -556,18 +569,13 @@ export const de_CreateSinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Tags != null) { - contents.Tags = de_TagMapOutput(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + Name: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -601,10 +609,9 @@ const de_CreateSinkCommandError = async ( throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -654,10 +661,9 @@ const de_DeleteLinkCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -710,10 +716,9 @@ const de_DeleteSinkCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -733,27 +738,16 @@ export const de_GetLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Label != null) { - contents.Label = __expectString(data.Label); - } - if (data.LabelTemplate != null) { - contents.LabelTemplate = __expectString(data.LabelTemplate); - } - if (data.ResourceTypes != null) { - contents.ResourceTypes = de_ResourceTypesOutput(data.ResourceTypes, context); - } - if (data.SinkArn != null) { - contents.SinkArn = __expectString(data.SinkArn); - } - if (data.Tags != null) { - contents.Tags = de_TagMapOutput(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + Label: __expectString, + LabelTemplate: __expectString, + ResourceTypes: _json, + SinkArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -784,10 +778,9 @@ const de_GetLinkCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -807,18 +800,13 @@ export const de_GetSinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Tags != null) { - contents.Tags = de_TagMapOutput(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + Name: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -849,10 +837,9 @@ const de_GetSinkCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -872,15 +859,12 @@ export const de_GetSinkPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } - if (data.SinkArn != null) { - contents.SinkArn = __expectString(data.SinkArn); - } - if (data.SinkId != null) { - contents.SinkId = __expectString(data.SinkId); - } + const doc = take(data, { + Policy: __expectString, + SinkArn: __expectString, + SinkId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -911,10 +895,9 @@ const de_GetSinkPolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -934,12 +917,11 @@ export const de_ListAttachedLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ListAttachedLinksItems(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -970,10 +952,9 @@ const de_ListAttachedLinksCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -993,12 +974,11 @@ export const de_ListLinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ListLinksItems(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1026,10 +1006,9 @@ const de_ListLinksCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1049,12 +1028,11 @@ export const de_ListSinksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ListSinksItems(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Items: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1082,10 +1060,9 @@ const de_ListSinksCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1105,9 +1082,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMapOutput(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1132,10 +1110,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1155,15 +1132,12 @@ export const de_PutSinkPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } - if (data.SinkArn != null) { - contents.SinkArn = __expectString(data.SinkArn); - } - if (data.SinkId != null) { - contents.SinkId = __expectString(data.SinkId); - } + const doc = take(data, { + Policy: __expectString, + SinkArn: __expectString, + SinkId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1194,10 +1168,9 @@ const de_PutSinkPolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1244,10 +1217,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1291,10 +1263,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1314,27 +1285,16 @@ export const de_UpdateLinkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } - if (data.Label != null) { - contents.Label = __expectString(data.Label); - } - if (data.LabelTemplate != null) { - contents.LabelTemplate = __expectString(data.LabelTemplate); - } - if (data.ResourceTypes != null) { - contents.ResourceTypes = de_ResourceTypesOutput(data.ResourceTypes, context); - } - if (data.SinkArn != null) { - contents.SinkArn = __expectString(data.SinkArn); - } - if (data.Tags != null) { - contents.Tags = de_TagMapOutput(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Id: __expectString, + Label: __expectString, + LabelTemplate: __expectString, + ResourceTypes: _json, + SinkArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1365,16 +1325,15 @@ const de_UpdateLinkCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ @@ -1383,9 +1342,10 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1404,9 +1364,10 @@ const de_InternalServiceFaultRes = async ( amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceFault({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1425,9 +1386,10 @@ const de_InvalidParameterExceptionRes = async ( amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1446,9 +1408,10 @@ const de_MissingRequiredParameterExceptionRes = async ( amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MissingRequiredParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1467,9 +1430,10 @@ const de_ResourceNotFoundExceptionRes = async ( amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1488,9 +1452,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( amznErrorType: [, parsedOutput.headers["x-amzn-errortype"]], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1507,9 +1472,10 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1523,9 +1489,10 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1533,137 +1500,25 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ResourceTypesInput - */ -const se_ResourceTypesInput = (input: (ResourceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceTypesInput omitted. -/** - * serializeAws_restJson1TagMapInput - */ -const se_TagMapInput = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMapInput omitted. -/** - * deserializeAws_restJson1ListAttachedLinksItem - */ -const de_ListAttachedLinksItem = (output: any, context: __SerdeContext): ListAttachedLinksItem => { - return { - Label: __expectString(output.Label), - LinkArn: __expectString(output.LinkArn), - ResourceTypes: output.ResourceTypes != null ? de_ResourceTypesOutput(output.ResourceTypes, context) : undefined, - } as any; -}; +// de_ListAttachedLinksItem omitted. -/** - * deserializeAws_restJson1ListAttachedLinksItems - */ -const de_ListAttachedLinksItems = (output: any, context: __SerdeContext): ListAttachedLinksItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListAttachedLinksItem(entry, context); - }); - return retVal; -}; +// de_ListAttachedLinksItems omitted. -/** - * deserializeAws_restJson1ListLinksItem - */ -const de_ListLinksItem = (output: any, context: __SerdeContext): ListLinksItem => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Label: __expectString(output.Label), - ResourceTypes: output.ResourceTypes != null ? de_ResourceTypesOutput(output.ResourceTypes, context) : undefined, - SinkArn: __expectString(output.SinkArn), - } as any; -}; +// de_ListLinksItem omitted. -/** - * deserializeAws_restJson1ListLinksItems - */ -const de_ListLinksItems = (output: any, context: __SerdeContext): ListLinksItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListLinksItem(entry, context); - }); - return retVal; -}; +// de_ListLinksItems omitted. -/** - * deserializeAws_restJson1ListSinksItem - */ -const de_ListSinksItem = (output: any, context: __SerdeContext): ListSinksItem => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_ListSinksItem omitted. -/** - * deserializeAws_restJson1ListSinksItems - */ -const de_ListSinksItems = (output: any, context: __SerdeContext): ListSinksItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListSinksItem(entry, context); - }); - return retVal; -}; +// de_ListSinksItems omitted. -/** - * deserializeAws_restJson1ResourceTypesOutput - */ -const de_ResourceTypesOutput = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceTypesOutput omitted. -/** - * deserializeAws_restJson1TagMapOutput - */ -const de_TagMapOutput = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMapOutput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-omics/src/protocols/Aws_restJson1.ts b/clients/client-omics/src/protocols/Aws_restJson1.ts index ef6f8cc01adc..38a93ae7acf7 100644 --- a/clients/client-omics/src/protocols/Aws_restJson1.ts +++ b/clients/client-omics/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -14,10 +15,11 @@ import { expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -191,25 +193,18 @@ import { AccessDeniedException, ActivateReadSetFilter, ActivateReadSetJobItem, - ActivateReadSetSourceItem, - AnnotationImportItemDetail, AnnotationImportItemSource, AnnotationImportJobItem, AnnotationStoreItem, ConflictException, ExportReadSet, - ExportReadSetDetail, ExportReadSetFilter, ExportReadSetJobDetail, - FileInformation, FormatOptions, - FormatToHeaderKey, ImportReadSetFilter, ImportReadSetJobItem, - ImportReadSetSourceItem, ImportReferenceFilter, ImportReferenceJobItem, - ImportReferenceSourceItem, InternalServerException, ListAnnotationImportJobsFilter, ListAnnotationStoresFilter, @@ -217,11 +212,8 @@ import { ListVariantStoresFilter, RangeNotSatisfiableException, ReadOptions, - ReadSetBatchError, - ReadSetFiles, ReadSetFilter, ReadSetListItem, - ReferenceFiles, ReferenceFilter, ReferenceItem, ReferenceListItem, @@ -232,7 +224,6 @@ import { RunGroupListItem, RunListItem, SchemaValueType, - SequenceInformation, SequenceStoreDetail, SequenceStoreFilter, ServiceQuotaExceededException, @@ -247,7 +238,6 @@ import { TsvOptions, TsvStoreOptions, ValidationException, - VariantImportItemDetail, VariantImportItemSource, VariantImportJobItem, VariantStoreItem, @@ -280,9 +270,11 @@ export const se_BatchDeleteReadSetCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ids != null && { ids: se_ReadSetIdList(input.ids, context) }), - }); + body = JSON.stringify( + take(input, { + ids: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -405,15 +397,17 @@ export const se_CreateAnnotationStoreCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/annotationStore"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.reference != null && { reference: se_ReferenceItem(input.reference, context) }), - ...(input.sseConfig != null && { sseConfig: se_SseConfig(input.sseConfig, context) }), - ...(input.storeFormat != null && { storeFormat: input.storeFormat }), - ...(input.storeOptions != null && { storeOptions: se_StoreOptions(input.storeOptions, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + reference: (_) => _json(_), + sseConfig: (_) => _json(_), + storeFormat: [], + storeOptions: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -445,13 +439,15 @@ export const se_CreateReferenceStoreCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/referencestore"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.sseConfig != null && { sseConfig: se_SseConfig(input.sseConfig, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + description: [], + name: [], + sseConfig: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -483,14 +479,16 @@ export const se_CreateRunGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/runGroup"; let body: any; - body = JSON.stringify({ - ...(input.maxCpus != null && { maxCpus: input.maxCpus }), - ...(input.maxDuration != null && { maxDuration: input.maxDuration }), - ...(input.maxRuns != null && { maxRuns: input.maxRuns }), - ...(input.name != null && { name: input.name }), - requestId: input.requestId ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + maxCpus: [], + maxDuration: [], + maxRuns: [], + name: [], + requestId: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "workflows-" + resolvedHostname; @@ -522,13 +520,15 @@ export const se_CreateSequenceStoreCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sequencestore"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.sseConfig != null && { sseConfig: se_SseConfig(input.sseConfig, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + description: [], + name: [], + sseConfig: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -560,13 +560,15 @@ export const se_CreateVariantStoreCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/variantStore"; let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.reference != null && { reference: se_ReferenceItem(input.reference, context) }), - ...(input.sseConfig != null && { sseConfig: se_SseConfig(input.sseConfig, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + reference: (_) => _json(_), + sseConfig: (_) => _json(_), + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -598,20 +600,20 @@ export const se_CreateWorkflowCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflow"; let body: any; - body = JSON.stringify({ - ...(input.definitionUri != null && { definitionUri: input.definitionUri }), - ...(input.definitionZip != null && { definitionZip: context.base64Encoder(input.definitionZip) }), - ...(input.description != null && { description: input.description }), - ...(input.engine != null && { engine: input.engine }), - ...(input.main != null && { main: input.main }), - ...(input.name != null && { name: input.name }), - ...(input.parameterTemplate != null && { - parameterTemplate: se_WorkflowParameterTemplate(input.parameterTemplate, context), - }), - requestId: input.requestId ?? generateIdempotencyToken(), - ...(input.storageCapacity != null && { storageCapacity: input.storageCapacity }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + definitionUri: [], + definitionZip: (_) => context.base64Encoder(_), + description: [], + engine: [], + main: [], + name: [], + parameterTemplate: (_) => _json(_), + requestId: (_) => _ ?? generateIdempotencyToken(), + storageCapacity: [], + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "workflows-" + resolvedHostname; @@ -1545,10 +1547,12 @@ export const se_ListAnnotationImportJobsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ListAnnotationImportJobsFilter(input.filter, context) }), - ...(input.ids != null && { ids: se_IdList(input.ids, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => _json(_), + ids: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -1585,10 +1589,12 @@ export const se_ListAnnotationStoresCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ListAnnotationStoresFilter(input.filter, context) }), - ...(input.ids != null && { ids: se_IdList(input.ids, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => _json(_), + ids: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -1635,9 +1641,11 @@ export const se_ListReadSetActivationJobsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ActivateReadSetFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ActivateReadSetFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -1684,9 +1692,11 @@ export const se_ListReadSetExportJobsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ExportReadSetFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ExportReadSetFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -1733,9 +1743,11 @@ export const se_ListReadSetImportJobsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ImportReadSetFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ImportReadSetFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -1781,9 +1793,11 @@ export const se_ListReadSetsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ReadSetFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ReadSetFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -1830,9 +1844,11 @@ export const se_ListReferenceImportJobsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ImportReferenceFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ImportReferenceFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -1879,9 +1895,11 @@ export const se_ListReferencesCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ReferenceFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ReferenceFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -1918,9 +1936,11 @@ export const se_ListReferenceStoresCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ReferenceStoreFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_ReferenceStoreFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -2064,9 +2084,11 @@ export const se_ListSequenceStoresCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_SequenceStoreFilter(input.filter, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => se_SequenceStoreFilter(_, context), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -2133,10 +2155,12 @@ export const se_ListVariantImportJobsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ListVariantImportJobsFilter(input.filter, context) }), - ...(input.ids != null && { ids: se_IdList(input.ids, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => _json(_), + ids: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -2173,10 +2197,12 @@ export const se_ListVariantStoresCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.filter != null && { filter: se_ListVariantStoresFilter(input.filter, context) }), - ...(input.ids != null && { ids: se_IdList(input.ids, context) }), - }); + body = JSON.stringify( + take(input, { + filter: (_) => _json(_), + ids: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -2245,13 +2271,15 @@ export const se_StartAnnotationImportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/import/annotation"; let body: any; - body = JSON.stringify({ - ...(input.destinationName != null && { destinationName: input.destinationName }), - ...(input.formatOptions != null && { formatOptions: se_FormatOptions(input.formatOptions, context) }), - ...(input.items != null && { items: se_AnnotationImportItemSources(input.items, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.runLeftNormalization != null && { runLeftNormalization: input.runLeftNormalization }), - }); + body = JSON.stringify( + take(input, { + destinationName: [], + formatOptions: (_) => _json(_), + items: (_) => _json(_), + roleArn: [], + runLeftNormalization: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -2293,10 +2321,12 @@ export const se_StartReadSetActivationJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.sources != null && { sources: se_StartReadSetActivationJobSourceList(input.sources, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + sources: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -2338,12 +2368,14 @@ export const se_StartReadSetExportJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.destination != null && { destination: input.destination }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.sources != null && { sources: se_ExportReadSetList(input.sources, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + destination: [], + roleArn: [], + sources: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -2385,11 +2417,13 @@ export const se_StartReadSetImportJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.sources != null && { sources: se_StartReadSetImportJobSourceList(input.sources, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + roleArn: [], + sources: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -2431,11 +2465,13 @@ export const se_StartReferenceImportJobCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.sources != null && { sources: se_StartReferenceImportJobSourceList(input.sources, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + roleArn: [], + sources: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "control-storage-" + resolvedHostname; @@ -2467,21 +2503,23 @@ export const se_StartRunCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/run"; let body: any; - body = JSON.stringify({ - ...(input.logLevel != null && { logLevel: input.logLevel }), - ...(input.name != null && { name: input.name }), - ...(input.outputUri != null && { outputUri: input.outputUri }), - ...(input.parameters != null && { parameters: se_RunParameters(input.parameters, context) }), - ...(input.priority != null && { priority: input.priority }), - requestId: input.requestId ?? generateIdempotencyToken(), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.runGroupId != null && { runGroupId: input.runGroupId }), - ...(input.runId != null && { runId: input.runId }), - ...(input.storageCapacity != null && { storageCapacity: input.storageCapacity }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - ...(input.workflowType != null && { workflowType: input.workflowType }), - }); + body = JSON.stringify( + take(input, { + logLevel: [], + name: [], + outputUri: [], + parameters: (_) => se_RunParameters(_, context), + priority: [], + requestId: (_) => _ ?? generateIdempotencyToken(), + roleArn: [], + runGroupId: [], + runId: [], + storageCapacity: [], + tags: (_) => _json(_), + workflowId: [], + workflowType: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "workflows-" + resolvedHostname; @@ -2513,12 +2551,14 @@ export const se_StartVariantImportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/import/variant"; let body: any; - body = JSON.stringify({ - ...(input.destinationName != null && { destinationName: input.destinationName }), - ...(input.items != null && { items: se_VariantImportItemSources(input.items, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.runLeftNormalization != null && { runLeftNormalization: input.runLeftNormalization }), - }); + body = JSON.stringify( + take(input, { + destinationName: [], + items: (_) => _json(_), + roleArn: [], + runLeftNormalization: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -2551,9 +2591,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "tags-" + resolvedHostname; @@ -2623,9 +2665,11 @@ export const se_UpdateAnnotationStoreCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/annotationStore/{name}"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + description: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -2658,12 +2702,14 @@ export const se_UpdateRunGroupCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/runGroup/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.maxCpus != null && { maxCpus: input.maxCpus }), - ...(input.maxDuration != null && { maxDuration: input.maxDuration }), - ...(input.maxRuns != null && { maxRuns: input.maxRuns }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + maxCpus: [], + maxDuration: [], + maxRuns: [], + name: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "workflows-" + resolvedHostname; @@ -2696,9 +2742,11 @@ export const se_UpdateVariantStoreCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/variantStore/{name}"; resolvedPath = __resolvedPath(resolvedPath, input, "name", () => input.name!, "{name}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - }); + body = JSON.stringify( + take(input, { + description: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "analytics-" + resolvedHostname; @@ -2731,10 +2779,12 @@ export const se_UpdateWorkflowCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workflow/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "workflows-" + resolvedHostname; @@ -2767,9 +2817,10 @@ export const de_BatchDeleteReadSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_ReadSetBatchErrorList(data.errors, context); - } + const doc = take(data, { + errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2806,10 +2857,9 @@ const de_BatchDeleteReadSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2862,10 +2912,9 @@ const de_CancelAnnotationImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2927,10 +2976,9 @@ const de_CancelRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2983,10 +3031,9 @@ const de_CancelVariantImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3006,27 +3053,16 @@ export const de_CreateAnnotationStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.reference != null) { - contents.reference = de_ReferenceItem(__expectUnion(data.reference), context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.storeFormat != null) { - contents.storeFormat = __expectString(data.storeFormat); - } - if (data.storeOptions != null) { - contents.storeOptions = de_StoreOptions(__expectUnion(data.storeOptions), context); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + name: __expectString, + reference: (_) => _json(__expectUnion(_)), + status: __expectString, + storeFormat: __expectString, + storeOptions: (_) => _json(__expectUnion(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3066,10 +3102,9 @@ const de_CreateAnnotationStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3089,24 +3124,15 @@ export const de_CreateReferenceStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sseConfig != null) { - contents.sseConfig = de_SseConfig(data.sseConfig, context); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + sseConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3143,10 +3169,9 @@ const de_CreateReferenceStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3166,15 +3191,12 @@ export const de_CreateRunGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3217,10 +3239,9 @@ const de_CreateRunGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3240,24 +3261,15 @@ export const de_CreateSequenceStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sseConfig != null) { - contents.sseConfig = de_SseConfig(data.sseConfig, context); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + sseConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3294,10 +3306,9 @@ const de_CreateSequenceStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3317,21 +3328,14 @@ export const de_CreateVariantStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.reference != null) { - contents.reference = de_ReferenceItem(__expectUnion(data.reference), context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + name: __expectString, + reference: (_) => _json(__expectUnion(_)), + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3371,10 +3375,9 @@ const de_CreateVariantStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3394,18 +3397,13 @@ export const de_CreateWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3448,10 +3446,9 @@ const de_CreateWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3471,9 +3468,10 @@ export const de_DeleteAnnotationStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3510,10 +3508,9 @@ const de_DeleteAnnotationStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3572,10 +3569,9 @@ const de_DeleteReferenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3634,10 +3630,9 @@ const de_DeleteReferenceStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3699,10 +3694,9 @@ const de_DeleteRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3764,10 +3758,9 @@ const de_DeleteRunGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3826,10 +3819,9 @@ const de_DeleteSequenceStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3849,9 +3841,10 @@ export const de_DeleteVariantStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3888,10 +3881,9 @@ const de_DeleteVariantStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3953,10 +3945,9 @@ const de_DeleteWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3976,39 +3967,20 @@ export const de_GetAnnotationImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.completionTime)); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.destinationName != null) { - contents.destinationName = __expectString(data.destinationName); - } - if (data.formatOptions != null) { - contents.formatOptions = de_FormatOptions(__expectUnion(data.formatOptions), context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.items != null) { - contents.items = de_AnnotationImportItemDetails(data.items, context); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.runLeftNormalization != null) { - contents.runLeftNormalization = __expectBoolean(data.runLeftNormalization); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationName: __expectString, + formatOptions: (_) => _json(__expectUnion(_)), + id: __expectString, + items: _json, + roleArn: __expectString, + runLeftNormalization: __expectBoolean, + status: __expectString, + statusMessage: __expectString, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4042,10 +4014,9 @@ const de_GetAnnotationImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4065,48 +4036,23 @@ export const de_GetAnnotationStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.reference != null) { - contents.reference = de_ReferenceItem(__expectUnion(data.reference), context); - } - if (data.sseConfig != null) { - contents.sseConfig = de_SseConfig(data.sseConfig, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.storeArn != null) { - contents.storeArn = __expectString(data.storeArn); - } - if (data.storeFormat != null) { - contents.storeFormat = __expectString(data.storeFormat); - } - if (data.storeOptions != null) { - contents.storeOptions = de_StoreOptions(__expectUnion(data.storeOptions), context); - } - if (data.storeSizeBytes != null) { - contents.storeSizeBytes = __expectLong(data.storeSizeBytes); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + reference: (_) => _json(__expectUnion(_)), + sseConfig: _json, + status: __expectString, + statusMessage: __expectString, + storeArn: __expectString, + storeFormat: __expectString, + storeOptions: (_) => _json(__expectUnion(_)), + storeSizeBytes: __expectLong, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4140,10 +4086,9 @@ const de_GetAnnotationStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4207,10 +4152,9 @@ const de_GetReadSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4230,27 +4174,16 @@ export const de_GetReadSetActivationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.completionTime)); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.sources != null) { - contents.sources = de_ActivateReadSetSourceList(data.sources, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + sequenceStoreId: __expectString, + sources: _json, + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4287,10 +4220,9 @@ const de_GetReadSetActivationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4310,30 +4242,17 @@ export const de_GetReadSetExportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.completionTime)); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.destination != null) { - contents.destination = __expectString(data.destination); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.readSets != null) { - contents.readSets = de_ExportReadSetDetailList(data.readSets, context); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destination: __expectString, + id: __expectString, + readSets: _json, + sequenceStoreId: __expectString, + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4370,10 +4289,9 @@ const de_GetReadSetExportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4393,30 +4311,17 @@ export const de_GetReadSetImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.completionTime)); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.sources != null) { - contents.sources = de_ImportReadSetSourceList(data.sources, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + roleArn: __expectString, + sequenceStoreId: __expectString, + sources: _json, + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4453,10 +4358,9 @@ const de_GetReadSetImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4476,45 +4380,22 @@ export const de_GetReadSetMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.fileType != null) { - contents.fileType = __expectString(data.fileType); - } - if (data.files != null) { - contents.files = de_ReadSetFiles(data.files, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.referenceArn != null) { - contents.referenceArn = __expectString(data.referenceArn); - } - if (data.sampleId != null) { - contents.sampleId = __expectString(data.sampleId); - } - if (data.sequenceInformation != null) { - contents.sequenceInformation = de_SequenceInformation(data.sequenceInformation, context); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.subjectId != null) { - contents.subjectId = __expectString(data.subjectId); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + fileType: __expectString, + files: _json, + id: __expectString, + name: __expectString, + referenceArn: __expectString, + sampleId: __expectString, + sequenceInformation: _json, + sequenceStoreId: __expectString, + status: __expectString, + subjectId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4551,10 +4432,9 @@ const de_GetReadSetMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4615,10 +4495,9 @@ const de_GetReferenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4638,30 +4517,17 @@ export const de_GetReferenceImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.completionTime)); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.referenceStoreId != null) { - contents.referenceStoreId = __expectString(data.referenceStoreId); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.sources != null) { - contents.sources = de_ImportReferenceSourceList(data.sources, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + referenceStoreId: __expectString, + roleArn: __expectString, + sources: _json, + status: __expectString, + statusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4698,10 +4564,9 @@ const de_GetReferenceImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4721,36 +4586,19 @@ export const de_GetReferenceMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.files != null) { - contents.files = de_ReferenceFiles(data.files, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.md5 != null) { - contents.md5 = __expectString(data.md5); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.referenceStoreId != null) { - contents.referenceStoreId = __expectString(data.referenceStoreId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + files: _json, + id: __expectString, + md5: __expectString, + name: __expectString, + referenceStoreId: __expectString, + status: __expectString, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -4787,10 +4635,9 @@ const de_GetReferenceMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4810,24 +4657,15 @@ export const de_GetReferenceStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sseConfig != null) { - contents.sseConfig = de_SseConfig(data.sseConfig, context); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + sseConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4864,10 +4702,9 @@ const de_GetReferenceStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4887,75 +4724,32 @@ export const de_GetRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.definition != null) { - contents.definition = __expectString(data.definition); - } - if (data.digest != null) { - contents.digest = __expectString(data.digest); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.logLevel != null) { - contents.logLevel = __expectString(data.logLevel); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.outputUri != null) { - contents.outputUri = __expectString(data.outputUri); - } - if (data.parameters != null) { - contents.parameters = de_RunParameters(data.parameters, context); - } - if (data.priority != null) { - contents.priority = __expectInt32(data.priority); - } - if (data.resourceDigests != null) { - contents.resourceDigests = de_RunResourceDigests(data.resourceDigests, context); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.runGroupId != null) { - contents.runGroupId = __expectString(data.runGroupId); - } - if (data.runId != null) { - contents.runId = __expectString(data.runId); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.startTime)); - } - if (data.startedBy != null) { - contents.startedBy = __expectString(data.startedBy); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.stopTime != null) { - contents.stopTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.stopTime)); - } - if (data.storageCapacity != null) { - contents.storageCapacity = __expectInt32(data.storageCapacity); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.workflowId != null) { - contents.workflowId = __expectString(data.workflowId); - } - if (data.workflowType != null) { - contents.workflowType = __expectString(data.workflowType); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + definition: __expectString, + digest: __expectString, + id: __expectString, + logLevel: __expectString, + name: __expectString, + outputUri: __expectString, + parameters: (_) => de_RunParameters(_, context), + priority: __expectInt32, + resourceDigests: _json, + roleArn: __expectString, + runGroupId: __expectString, + runId: __expectString, + startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + startedBy: __expectString, + status: __expectString, + statusMessage: __expectString, + stopTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + storageCapacity: __expectInt32, + tags: _json, + workflowId: __expectString, + workflowType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4995,10 +4789,9 @@ const de_GetRunCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5018,30 +4811,17 @@ export const de_GetRunGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.maxCpus != null) { - contents.maxCpus = __expectInt32(data.maxCpus); - } - if (data.maxDuration != null) { - contents.maxDuration = __expectInt32(data.maxDuration); - } - if (data.maxRuns != null) { - contents.maxRuns = __expectInt32(data.maxRuns); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + maxCpus: __expectInt32, + maxDuration: __expectInt32, + maxRuns: __expectInt32, + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5084,10 +4864,9 @@ const de_GetRunGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5107,36 +4886,19 @@ export const de_GetRunTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cpus != null) { - contents.cpus = __expectInt32(data.cpus); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.logStream != null) { - contents.logStream = __expectString(data.logStream); - } - if (data.memory != null) { - contents.memory = __expectInt32(data.memory); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.startTime != null) { - contents.startTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.startTime)); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.stopTime != null) { - contents.stopTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.stopTime)); - } - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + cpus: __expectInt32, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + logStream: __expectString, + memory: __expectInt32, + name: __expectString, + startTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + statusMessage: __expectString, + stopTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5179,10 +4941,9 @@ const de_GetRunTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5202,24 +4963,15 @@ export const de_GetSequenceStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.sseConfig != null) { - contents.sseConfig = de_SseConfig(data.sseConfig, context); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + sseConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5256,10 +5008,9 @@ const de_GetSequenceStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5279,36 +5030,19 @@ export const de_GetVariantImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completionTime != null) { - contents.completionTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.completionTime)); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.destinationName != null) { - contents.destinationName = __expectString(data.destinationName); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.items != null) { - contents.items = de_VariantImportItemDetails(data.items, context); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.runLeftNormalization != null) { - contents.runLeftNormalization = __expectBoolean(data.runLeftNormalization); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationName: __expectString, + id: __expectString, + items: _json, + roleArn: __expectString, + runLeftNormalization: __expectBoolean, + status: __expectString, + statusMessage: __expectString, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5342,10 +5076,9 @@ const de_GetVariantImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5365,42 +5098,21 @@ export const de_GetVariantStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.reference != null) { - contents.reference = de_ReferenceItem(__expectUnion(data.reference), context); - } - if (data.sseConfig != null) { - contents.sseConfig = de_SseConfig(data.sseConfig, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.storeArn != null) { - contents.storeArn = __expectString(data.storeArn); - } - if (data.storeSizeBytes != null) { - contents.storeSizeBytes = __expectLong(data.storeSizeBytes); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + reference: (_) => _json(__expectUnion(_)), + sseConfig: _json, + status: __expectString, + statusMessage: __expectString, + storeArn: __expectString, + storeSizeBytes: __expectLong, + tags: _json, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -5434,10 +5146,9 @@ const de_GetVariantStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5457,51 +5168,24 @@ export const de_GetWorkflowCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.definition != null) { - contents.definition = __expectString(data.definition); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.digest != null) { - contents.digest = __expectString(data.digest); - } - if (data.engine != null) { - contents.engine = __expectString(data.engine); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.main != null) { - contents.main = __expectString(data.main); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.parameterTemplate != null) { - contents.parameterTemplate = de_WorkflowParameterTemplate(data.parameterTemplate, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusMessage != null) { - contents.statusMessage = __expectString(data.statusMessage); - } - if (data.storageCapacity != null) { - contents.storageCapacity = __expectInt32(data.storageCapacity); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + arn: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + definition: __expectString, + description: __expectString, + digest: __expectString, + engine: __expectString, + id: __expectString, + main: __expectString, + name: __expectString, + parameterTemplate: _json, + status: __expectString, + statusMessage: __expectString, + storageCapacity: __expectInt32, + tags: _json, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5544,10 +5228,9 @@ const de_GetWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5567,12 +5250,11 @@ export const de_ListAnnotationImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.annotationImportJobs != null) { - contents.annotationImportJobs = de_AnnotationImportJobItems(data.annotationImportJobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + annotationImportJobs: (_) => de_AnnotationImportJobItems(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5606,10 +5288,9 @@ const de_ListAnnotationImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5629,12 +5310,11 @@ export const de_ListAnnotationStoresCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.annotationStores != null) { - contents.annotationStores = de_AnnotationStoreItems(data.annotationStores, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + annotationStores: (_) => de_AnnotationStoreItems(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5668,10 +5348,9 @@ const de_ListAnnotationStoresCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5691,12 +5370,11 @@ export const de_ListReadSetActivationJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.activationJobs != null) { - contents.activationJobs = de_ActivateReadSetJobList(data.activationJobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + activationJobs: (_) => de_ActivateReadSetJobList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5733,10 +5411,9 @@ const de_ListReadSetActivationJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5756,12 +5433,11 @@ export const de_ListReadSetExportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.exportJobs != null) { - contents.exportJobs = de_ExportReadSetJobDetailList(data.exportJobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + exportJobs: (_) => de_ExportReadSetJobDetailList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5798,10 +5474,9 @@ const de_ListReadSetExportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5821,12 +5496,11 @@ export const de_ListReadSetImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.importJobs != null) { - contents.importJobs = de_ImportReadSetJobList(data.importJobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + importJobs: (_) => de_ImportReadSetJobList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5863,10 +5537,9 @@ const de_ListReadSetImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5886,12 +5559,11 @@ export const de_ListReadSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.readSets != null) { - contents.readSets = de_ReadSetList(data.readSets, context); - } + const doc = take(data, { + nextToken: __expectString, + readSets: (_) => de_ReadSetList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5928,10 +5600,9 @@ const de_ListReadSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5951,12 +5622,11 @@ export const de_ListReferenceImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.importJobs != null) { - contents.importJobs = de_ImportReferenceJobList(data.importJobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + importJobs: (_) => de_ImportReferenceJobList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5993,10 +5663,9 @@ const de_ListReferenceImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6016,12 +5685,11 @@ export const de_ListReferencesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.references != null) { - contents.references = de_ReferenceList(data.references, context); - } + const doc = take(data, { + nextToken: __expectString, + references: (_) => de_ReferenceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6058,10 +5726,9 @@ const de_ListReferencesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6081,12 +5748,11 @@ export const de_ListReferenceStoresCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.referenceStores != null) { - contents.referenceStores = de_ReferenceStoreDetailList(data.referenceStores, context); - } + const doc = take(data, { + nextToken: __expectString, + referenceStores: (_) => de_ReferenceStoreDetailList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6120,10 +5786,9 @@ const de_ListReferenceStoresCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6143,12 +5808,11 @@ export const de_ListRunGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_RunGroupList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_RunGroupList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6191,10 +5855,9 @@ const de_ListRunGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6214,12 +5877,11 @@ export const de_ListRunsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_RunList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_RunList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6262,10 +5924,9 @@ const de_ListRunsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6285,12 +5946,11 @@ export const de_ListRunTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_TaskList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_TaskList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6333,10 +5993,9 @@ const de_ListRunTasksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6356,12 +6015,11 @@ export const de_ListSequenceStoresCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sequenceStores != null) { - contents.sequenceStores = de_SequenceStoreDetailList(data.sequenceStores, context); - } + const doc = take(data, { + nextToken: __expectString, + sequenceStores: (_) => de_SequenceStoreDetailList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6395,10 +6053,9 @@ const de_ListSequenceStoresCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6418,9 +6075,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6463,10 +6121,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6486,12 +6143,11 @@ export const de_ListVariantImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.variantImportJobs != null) { - contents.variantImportJobs = de_VariantImportJobItems(data.variantImportJobs, context); - } + const doc = take(data, { + nextToken: __expectString, + variantImportJobs: (_) => de_VariantImportJobItems(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6525,10 +6181,9 @@ const de_ListVariantImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6548,12 +6203,11 @@ export const de_ListVariantStoresCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.variantStores != null) { - contents.variantStores = de_VariantStoreItems(data.variantStores, context); - } + const doc = take(data, { + nextToken: __expectString, + variantStores: (_) => de_VariantStoreItems(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6587,10 +6241,9 @@ const de_ListVariantStoresCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6610,12 +6263,11 @@ export const de_ListWorkflowsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_WorkflowList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_WorkflowList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6658,10 +6310,9 @@ const de_ListWorkflowsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6681,9 +6332,10 @@ export const de_StartAnnotationImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + jobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6720,10 +6372,9 @@ const de_StartAnnotationImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6743,18 +6394,13 @@ export const de_StartReadSetActivationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + sequenceStoreId: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6794,10 +6440,9 @@ const de_StartReadSetActivationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6817,21 +6462,14 @@ export const de_StartReadSetExportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.destination != null) { - contents.destination = __expectString(data.destination); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destination: __expectString, + id: __expectString, + sequenceStoreId: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6871,10 +6509,9 @@ const de_StartReadSetExportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6894,21 +6531,14 @@ export const de_StartReadSetImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.sequenceStoreId != null) { - contents.sequenceStoreId = __expectString(data.sequenceStoreId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + roleArn: __expectString, + sequenceStoreId: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6948,10 +6578,9 @@ const de_StartReadSetImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6971,21 +6600,14 @@ export const de_StartReferenceImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.referenceStoreId != null) { - contents.referenceStoreId = __expectString(data.referenceStoreId); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + referenceStoreId: __expectString, + roleArn: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7025,10 +6647,9 @@ const de_StartReferenceImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7048,18 +6669,13 @@ export const de_StartRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7102,10 +6718,9 @@ const de_StartRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7125,9 +6740,10 @@ export const de_StartVariantImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } + const doc = take(data, { + jobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7164,10 +6780,9 @@ const de_StartVariantImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7229,10 +6844,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7294,10 +6908,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7317,33 +6930,18 @@ export const de_UpdateAnnotationStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.reference != null) { - contents.reference = de_ReferenceItem(__expectUnion(data.reference), context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.storeFormat != null) { - contents.storeFormat = __expectString(data.storeFormat); - } - if (data.storeOptions != null) { - contents.storeOptions = de_StoreOptions(__expectUnion(data.storeOptions), context); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + reference: (_) => _json(__expectUnion(_)), + status: __expectString, + storeFormat: __expectString, + storeOptions: (_) => _json(__expectUnion(_)), + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -7377,10 +6975,9 @@ const de_UpdateAnnotationStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7442,10 +7039,9 @@ const de_UpdateRunGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7465,27 +7061,16 @@ export const de_UpdateVariantStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.reference != null) { - contents.reference = de_ReferenceItem(__expectUnion(data.reference), context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.updateTime != null) { - contents.updateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.updateTime)); - } + const doc = take(data, { + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + reference: (_) => _json(__expectUnion(_)), + status: __expectString, + updateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -7519,10 +7104,9 @@ const de_UpdateVariantStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7584,16 +7168,15 @@ const de_UpdateWorkflowCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -7603,9 +7186,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7619,9 +7203,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7638,9 +7223,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7657,9 +7243,10 @@ const de_RangeNotSatisfiableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RangeNotSatisfiableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7676,9 +7263,10 @@ const de_RequestTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7695,9 +7283,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7714,9 +7303,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7730,9 +7320,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7746,9 +7337,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7760,231 +7352,108 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_restJson1ActivateReadSetFilter */ const se_ActivateReadSetFilter = (input: ActivateReadSetFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.status != null && { status: input.status }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + status: [], + }); }; -/** - * serializeAws_restJson1AnnotationImportItemSource - */ -const se_AnnotationImportItemSource = (input: AnnotationImportItemSource, context: __SerdeContext): any => { - return { - ...(input.source != null && { source: input.source }), - }; -}; +// se_AnnotationImportItemSource omitted. -/** - * serializeAws_restJson1AnnotationImportItemSources - */ -const se_AnnotationImportItemSources = (input: AnnotationImportItemSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AnnotationImportItemSource(entry, context); - }); -}; +// se_AnnotationImportItemSources omitted. -/** - * serializeAws_restJson1ExportReadSet - */ -const se_ExportReadSet = (input: ExportReadSet, context: __SerdeContext): any => { - return { - ...(input.readSetId != null && { readSetId: input.readSetId }), - }; -}; +// se_ExportReadSet omitted. /** * serializeAws_restJson1ExportReadSetFilter */ const se_ExportReadSetFilter = (input: ExportReadSetFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.status != null && { status: input.status }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + status: [], + }); }; -/** - * serializeAws_restJson1ExportReadSetList - */ -const se_ExportReadSetList = (input: ExportReadSet[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExportReadSet(entry, context); - }); -}; +// se_ExportReadSetList omitted. -/** - * serializeAws_restJson1FormatOptions - */ -const se_FormatOptions = (input: FormatOptions, context: __SerdeContext): any => { - return FormatOptions.visit(input, { - tsvOptions: (value) => ({ tsvOptions: se_TsvOptions(value, context) }), - vcfOptions: (value) => ({ vcfOptions: se_VcfOptions(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_FormatOptions omitted. -/** - * serializeAws_restJson1FormatToHeader - */ -const se_FormatToHeader = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [FormatToHeaderKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FormatToHeader omitted. -/** - * serializeAws_restJson1IdList - */ -const se_IdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IdList omitted. /** * serializeAws_restJson1ImportReadSetFilter */ const se_ImportReadSetFilter = (input: ImportReadSetFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.status != null && { status: input.status }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + status: [], + }); }; /** * serializeAws_restJson1ImportReferenceFilter */ const se_ImportReferenceFilter = (input: ImportReferenceFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.status != null && { status: input.status }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + status: [], + }); }; -/** - * serializeAws_restJson1ListAnnotationImportJobsFilter - */ -const se_ListAnnotationImportJobsFilter = (input: ListAnnotationImportJobsFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - ...(input.storeName != null && { storeName: input.storeName }), - }; -}; +// se_ListAnnotationImportJobsFilter omitted. -/** - * serializeAws_restJson1ListAnnotationStoresFilter - */ -const se_ListAnnotationStoresFilter = (input: ListAnnotationStoresFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_ListAnnotationStoresFilter omitted. -/** - * serializeAws_restJson1ListVariantImportJobsFilter - */ -const se_ListVariantImportJobsFilter = (input: ListVariantImportJobsFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - ...(input.storeName != null && { storeName: input.storeName }), - }; -}; +// se_ListVariantImportJobsFilter omitted. -/** - * serializeAws_restJson1ListVariantStoresFilter - */ -const se_ListVariantStoresFilter = (input: ListVariantStoresFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_ListVariantStoresFilter omitted. -/** - * serializeAws_restJson1ReadOptions - */ -const se_ReadOptions = (input: ReadOptions, context: __SerdeContext): any => { - return { - ...(input.comment != null && { comment: input.comment }), - ...(input.encoding != null && { encoding: input.encoding }), - ...(input.escape != null && { escape: input.escape }), - ...(input.escapeQuotes != null && { escapeQuotes: input.escapeQuotes }), - ...(input.header != null && { header: input.header }), - ...(input.lineSep != null && { lineSep: input.lineSep }), - ...(input.quote != null && { quote: input.quote }), - ...(input.quoteAll != null && { quoteAll: input.quoteAll }), - ...(input.sep != null && { sep: input.sep }), - }; -}; +// se_ReadOptions omitted. /** * serializeAws_restJson1ReadSetFilter */ const se_ReadSetFilter = (input: ReadSetFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.name != null && { name: input.name }), - ...(input.referenceArn != null && { referenceArn: input.referenceArn }), - ...(input.status != null && { status: input.status }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + name: [], + referenceArn: [], + status: [], + }); }; -/** - * serializeAws_restJson1ReadSetIdList - */ -const se_ReadSetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ReadSetIdList omitted. /** * serializeAws_restJson1ReferenceFilter */ const se_ReferenceFilter = (input: ReferenceFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.md5 != null && { md5: input.md5 }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_restJson1ReferenceItem - */ -const se_ReferenceItem = (input: ReferenceItem, context: __SerdeContext): any => { - return ReferenceItem.visit(input, { - referenceArn: (value) => ({ referenceArn: value }), - _: (name, value) => ({ name: value } as any), + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + md5: [], + name: [], }); }; +// se_ReferenceItem omitted. + /** * serializeAws_restJson1ReferenceStoreFilter */ const se_ReferenceStoreFilter = (input: ReferenceStoreFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.name != null && { name: input.name }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + name: [], + }); }; /** @@ -7994,255 +7463,66 @@ const se_RunParameters = (input: __DocumentType, context: __SerdeContext): any = return input; }; -/** - * serializeAws_restJson1Schema - */ -const se_Schema = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SchemaItem(entry, context); - }); -}; +// se_Schema omitted. -/** - * serializeAws_restJson1SchemaItem - */ -const se_SchemaItem = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SchemaItem omitted. /** * serializeAws_restJson1SequenceStoreFilter */ const se_SequenceStoreFilter = (input: SequenceStoreFilter, context: __SerdeContext): any => { - return { - ...(input.createdAfter != null && { createdAfter: input.createdAfter.toISOString().split(".")[0] + "Z" }), - ...(input.createdBefore != null && { createdBefore: input.createdBefore.toISOString().split(".")[0] + "Z" }), - ...(input.name != null && { name: input.name }), - }; + return take(input, { + createdAfter: (_) => _.toISOString().split(".")[0] + "Z", + createdBefore: (_) => _.toISOString().split(".")[0] + "Z", + name: [], + }); }; -/** - * serializeAws_restJson1SourceFiles - */ -const se_SourceFiles = (input: SourceFiles, context: __SerdeContext): any => { - return { - ...(input.source1 != null && { source1: input.source1 }), - ...(input.source2 != null && { source2: input.source2 }), - }; -}; +// se_SourceFiles omitted. -/** - * serializeAws_restJson1SseConfig - */ -const se_SseConfig = (input: SseConfig, context: __SerdeContext): any => { - return { - ...(input.keyArn != null && { keyArn: input.keyArn }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_SseConfig omitted. -/** - * serializeAws_restJson1StartReadSetActivationJobSourceItem - */ -const se_StartReadSetActivationJobSourceItem = ( - input: StartReadSetActivationJobSourceItem, - context: __SerdeContext -): any => { - return { - ...(input.readSetId != null && { readSetId: input.readSetId }), - }; -}; +// se_StartReadSetActivationJobSourceItem omitted. -/** - * serializeAws_restJson1StartReadSetActivationJobSourceList - */ -const se_StartReadSetActivationJobSourceList = ( - input: StartReadSetActivationJobSourceItem[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StartReadSetActivationJobSourceItem(entry, context); - }); -}; +// se_StartReadSetActivationJobSourceList omitted. -/** - * serializeAws_restJson1StartReadSetImportJobSourceItem - */ -const se_StartReadSetImportJobSourceItem = (input: StartReadSetImportJobSourceItem, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.generatedFrom != null && { generatedFrom: input.generatedFrom }), - ...(input.name != null && { name: input.name }), - ...(input.referenceArn != null && { referenceArn: input.referenceArn }), - ...(input.sampleId != null && { sampleId: input.sampleId }), - ...(input.sourceFileType != null && { sourceFileType: input.sourceFileType }), - ...(input.sourceFiles != null && { sourceFiles: se_SourceFiles(input.sourceFiles, context) }), - ...(input.subjectId != null && { subjectId: input.subjectId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }; -}; +// se_StartReadSetImportJobSourceItem omitted. -/** - * serializeAws_restJson1StartReadSetImportJobSourceList - */ -const se_StartReadSetImportJobSourceList = (input: StartReadSetImportJobSourceItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StartReadSetImportJobSourceItem(entry, context); - }); -}; +// se_StartReadSetImportJobSourceList omitted. -/** - * serializeAws_restJson1StartReferenceImportJobSourceItem - */ -const se_StartReferenceImportJobSourceItem = ( - input: StartReferenceImportJobSourceItem, - context: __SerdeContext -): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.sourceFile != null && { sourceFile: input.sourceFile }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }; -}; +// se_StartReferenceImportJobSourceItem omitted. -/** - * serializeAws_restJson1StartReferenceImportJobSourceList - */ -const se_StartReferenceImportJobSourceList = ( - input: StartReferenceImportJobSourceItem[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StartReferenceImportJobSourceItem(entry, context); - }); -}; +// se_StartReferenceImportJobSourceList omitted. -/** - * serializeAws_restJson1StoreOptions - */ -const se_StoreOptions = (input: StoreOptions, context: __SerdeContext): any => { - return StoreOptions.visit(input, { - tsvStoreOptions: (value) => ({ tsvStoreOptions: se_TsvStoreOptions(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_StoreOptions omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TsvOptions - */ -const se_TsvOptions = (input: TsvOptions, context: __SerdeContext): any => { - return { - ...(input.readOptions != null && { readOptions: se_ReadOptions(input.readOptions, context) }), - }; -}; +// se_TsvOptions omitted. -/** - * serializeAws_restJson1TsvStoreOptions - */ -const se_TsvStoreOptions = (input: TsvStoreOptions, context: __SerdeContext): any => { - return { - ...(input.annotationType != null && { annotationType: input.annotationType }), - ...(input.formatToHeader != null && { formatToHeader: se_FormatToHeader(input.formatToHeader, context) }), - ...(input.schema != null && { schema: se_Schema(input.schema, context) }), - }; -}; +// se_TsvStoreOptions omitted. -/** - * serializeAws_restJson1VariantImportItemSource - */ -const se_VariantImportItemSource = (input: VariantImportItemSource, context: __SerdeContext): any => { - return { - ...(input.source != null && { source: input.source }), - }; -}; +// se_VariantImportItemSource omitted. -/** - * serializeAws_restJson1VariantImportItemSources - */ -const se_VariantImportItemSources = (input: VariantImportItemSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VariantImportItemSource(entry, context); - }); -}; +// se_VariantImportItemSources omitted. -/** - * serializeAws_restJson1VcfOptions - */ -const se_VcfOptions = (input: VcfOptions, context: __SerdeContext): any => { - return { - ...(input.ignoreFilterField != null && { ignoreFilterField: input.ignoreFilterField }), - ...(input.ignoreQualField != null && { ignoreQualField: input.ignoreQualField }), - }; -}; +// se_VcfOptions omitted. -/** - * serializeAws_restJson1WorkflowParameter - */ -const se_WorkflowParameter = (input: WorkflowParameter, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.optional != null && { optional: input.optional }), - }; -}; +// se_WorkflowParameter omitted. -/** - * serializeAws_restJson1WorkflowParameterTemplate - */ -const se_WorkflowParameterTemplate = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_WorkflowParameter(value, context); - return acc; - }, {}); -}; +// se_WorkflowParameterTemplate omitted. /** * deserializeAws_restJson1ActivateReadSetJobItem */ const de_ActivateReadSetJobItem = (output: any, context: __SerdeContext): ActivateReadSetJobItem => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completionTime)) - : undefined, - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - id: __expectString(output.id), - sequenceStoreId: __expectString(output.sequenceStoreId), - status: __expectString(output.status), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + sequenceStoreId: __expectString, + status: __expectString, + }) as any; }; /** @@ -8252,84 +7532,33 @@ const de_ActivateReadSetJobList = (output: any, context: __SerdeContext): Activa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ActivateReadSetJobItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ActivateReadSetSourceItem - */ -const de_ActivateReadSetSourceItem = (output: any, context: __SerdeContext): ActivateReadSetSourceItem => { - return { - readSetId: __expectString(output.readSetId), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; -}; +// de_ActivateReadSetSourceItem omitted. -/** - * deserializeAws_restJson1ActivateReadSetSourceList - */ -const de_ActivateReadSetSourceList = (output: any, context: __SerdeContext): ActivateReadSetSourceItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActivateReadSetSourceItem(entry, context); - }); - return retVal; -}; +// de_ActivateReadSetSourceList omitted. -/** - * deserializeAws_restJson1AnnotationImportItemDetail - */ -const de_AnnotationImportItemDetail = (output: any, context: __SerdeContext): AnnotationImportItemDetail => { - return { - jobStatus: __expectString(output.jobStatus), - source: __expectString(output.source), - } as any; -}; +// de_AnnotationImportItemDetail omitted. -/** - * deserializeAws_restJson1AnnotationImportItemDetails - */ -const de_AnnotationImportItemDetails = (output: any, context: __SerdeContext): AnnotationImportItemDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnnotationImportItemDetail(entry, context); - }); - return retVal; -}; +// de_AnnotationImportItemDetails omitted. /** * deserializeAws_restJson1AnnotationImportJobItem */ const de_AnnotationImportJobItem = (output: any, context: __SerdeContext): AnnotationImportJobItem => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completionTime)) - : undefined, - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - destinationName: __expectString(output.destinationName), - id: __expectString(output.id), - roleArn: __expectString(output.roleArn), - runLeftNormalization: __expectBoolean(output.runLeftNormalization), - status: __expectString(output.status), - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationName: __expectString, + id: __expectString, + roleArn: __expectString, + runLeftNormalization: __expectBoolean, + status: __expectString, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -8339,9 +7568,6 @@ const de_AnnotationImportJobItems = (output: any, context: __SerdeContext): Anno const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AnnotationImportJobItem(entry, context); }); return retVal; @@ -8351,22 +7577,20 @@ const de_AnnotationImportJobItems = (output: any, context: __SerdeContext): Anno * deserializeAws_restJson1AnnotationStoreItem */ const de_AnnotationStoreItem = (output: any, context: __SerdeContext): AnnotationStoreItem => { - return { - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - reference: output.reference != null ? de_ReferenceItem(__expectUnion(output.reference), context) : undefined, - sseConfig: output.sseConfig != null ? de_SseConfig(output.sseConfig, context) : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - storeArn: __expectString(output.storeArn), - storeFormat: __expectString(output.storeFormat), - storeSizeBytes: __expectLong(output.storeSizeBytes), - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + reference: (_: any) => _json(__expectUnion(_)), + sseConfig: _json, + status: __expectString, + statusMessage: __expectString, + storeArn: __expectString, + storeFormat: __expectString, + storeSizeBytes: __expectLong, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -8376,56 +7600,27 @@ const de_AnnotationStoreItems = (output: any, context: __SerdeContext): Annotati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AnnotationStoreItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ExportReadSetDetail - */ -const de_ExportReadSetDetail = (output: any, context: __SerdeContext): ExportReadSetDetail => { - return { - id: __expectString(output.id), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; -}; +// de_ExportReadSetDetail omitted. -/** - * deserializeAws_restJson1ExportReadSetDetailList - */ -const de_ExportReadSetDetailList = (output: any, context: __SerdeContext): ExportReadSetDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportReadSetDetail(entry, context); - }); - return retVal; -}; +// de_ExportReadSetDetailList omitted. /** * deserializeAws_restJson1ExportReadSetJobDetail */ const de_ExportReadSetJobDetail = (output: any, context: __SerdeContext): ExportReadSetJobDetail => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completionTime)) - : undefined, - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - destination: __expectString(output.destination), - id: __expectString(output.id), - sequenceStoreId: __expectString(output.sequenceStoreId), - status: __expectString(output.status), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destination: __expectString, + id: __expectString, + sequenceStoreId: __expectString, + status: __expectString, + }) as any; }; /** @@ -8435,74 +7630,29 @@ const de_ExportReadSetJobDetailList = (output: any, context: __SerdeContext): Ex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExportReadSetJobDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FileInformation - */ -const de_FileInformation = (output: any, context: __SerdeContext): FileInformation => { - return { - contentLength: __expectLong(output.contentLength), - partSize: __expectLong(output.partSize), - totalParts: __expectInt32(output.totalParts), - } as any; -}; +// de_FileInformation omitted. -/** - * deserializeAws_restJson1FormatOptions - */ -const de_FormatOptions = (output: any, context: __SerdeContext): FormatOptions => { - if (output.tsvOptions != null) { - return { - tsvOptions: de_TsvOptions(output.tsvOptions, context), - }; - } - if (output.vcfOptions != null) { - return { - vcfOptions: de_VcfOptions(output.vcfOptions, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_FormatOptions omitted. -/** - * deserializeAws_restJson1FormatToHeader - */ -const de_FormatToHeader = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [FormatToHeaderKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_FormatToHeader omitted. /** * deserializeAws_restJson1ImportReadSetJobItem */ const de_ImportReadSetJobItem = (output: any, context: __SerdeContext): ImportReadSetJobItem => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completionTime)) - : undefined, - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - id: __expectString(output.id), - roleArn: __expectString(output.roleArn), - sequenceStoreId: __expectString(output.sequenceStoreId), - status: __expectString(output.status), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + roleArn: __expectString, + sequenceStoreId: __expectString, + status: __expectString, + }) as any; }; /** @@ -8512,64 +7662,27 @@ const de_ImportReadSetJobList = (output: any, context: __SerdeContext): ImportRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportReadSetJobItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ImportReadSetSourceItem - */ -const de_ImportReadSetSourceItem = (output: any, context: __SerdeContext): ImportReadSetSourceItem => { - return { - description: __expectString(output.description), - generatedFrom: __expectString(output.generatedFrom), - name: __expectString(output.name), - referenceArn: __expectString(output.referenceArn), - sampleId: __expectString(output.sampleId), - sourceFileType: __expectString(output.sourceFileType), - sourceFiles: output.sourceFiles != null ? de_SourceFiles(output.sourceFiles, context) : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - subjectId: __expectString(output.subjectId), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_ImportReadSetSourceItem omitted. -/** - * deserializeAws_restJson1ImportReadSetSourceList - */ -const de_ImportReadSetSourceList = (output: any, context: __SerdeContext): ImportReadSetSourceItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportReadSetSourceItem(entry, context); - }); - return retVal; -}; +// de_ImportReadSetSourceList omitted. /** * deserializeAws_restJson1ImportReferenceJobItem */ const de_ImportReferenceJobItem = (output: any, context: __SerdeContext): ImportReferenceJobItem => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completionTime)) - : undefined, - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - id: __expectString(output.id), - referenceStoreId: __expectString(output.referenceStoreId), - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + referenceStoreId: __expectString, + roleArn: __expectString, + status: __expectString, + }) as any; }; /** @@ -8579,96 +7692,22 @@ const de_ImportReferenceJobList = (output: any, context: __SerdeContext): Import const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportReferenceJobItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ImportReferenceSourceItem - */ -const de_ImportReferenceSourceItem = (output: any, context: __SerdeContext): ImportReferenceSourceItem => { - return { - description: __expectString(output.description), - name: __expectString(output.name), - sourceFile: __expectString(output.sourceFile), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_ImportReferenceSourceItem omitted. -/** - * deserializeAws_restJson1ImportReferenceSourceList - */ -const de_ImportReferenceSourceList = (output: any, context: __SerdeContext): ImportReferenceSourceItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportReferenceSourceItem(entry, context); - }); - return retVal; -}; +// de_ImportReferenceSourceList omitted. -/** - * deserializeAws_restJson1ReadOptions - */ -const de_ReadOptions = (output: any, context: __SerdeContext): ReadOptions => { - return { - comment: __expectString(output.comment), - encoding: __expectString(output.encoding), - escape: __expectString(output.escape), - escapeQuotes: __expectBoolean(output.escapeQuotes), - header: __expectBoolean(output.header), - lineSep: __expectString(output.lineSep), - quote: __expectString(output.quote), - quoteAll: __expectBoolean(output.quoteAll), - sep: __expectString(output.sep), - } as any; -}; +// de_ReadOptions omitted. -/** - * deserializeAws_restJson1ReadSetBatchError - */ -const de_ReadSetBatchError = (output: any, context: __SerdeContext): ReadSetBatchError => { - return { - code: __expectString(output.code), - id: __expectString(output.id), - message: __expectString(output.message), - } as any; -}; +// de_ReadSetBatchError omitted. -/** - * deserializeAws_restJson1ReadSetBatchErrorList - */ -const de_ReadSetBatchErrorList = (output: any, context: __SerdeContext): ReadSetBatchError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReadSetBatchError(entry, context); - }); - return retVal; -}; +// de_ReadSetBatchErrorList omitted. -/** - * deserializeAws_restJson1ReadSetFiles - */ -const de_ReadSetFiles = (output: any, context: __SerdeContext): ReadSetFiles => { - return { - index: output.index != null ? de_FileInformation(output.index, context) : undefined, - source1: output.source1 != null ? de_FileInformation(output.source1, context) : undefined, - source2: output.source2 != null ? de_FileInformation(output.source2, context) : undefined, - } as any; -}; +// de_ReadSetFiles omitted. /** * deserializeAws_restJson1ReadSetList @@ -8677,9 +7716,6 @@ const de_ReadSetList = (output: any, context: __SerdeContext): ReadSetListItem[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReadSetListItem(entry, context); }); return retVal; @@ -8689,43 +7725,25 @@ const de_ReadSetList = (output: any, context: __SerdeContext): ReadSetListItem[] * deserializeAws_restJson1ReadSetListItem */ const de_ReadSetListItem = (output: any, context: __SerdeContext): ReadSetListItem => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - fileType: __expectString(output.fileType), - id: __expectString(output.id), - name: __expectString(output.name), - referenceArn: __expectString(output.referenceArn), - sampleId: __expectString(output.sampleId), - sequenceInformation: - output.sequenceInformation != null ? de_SequenceInformation(output.sequenceInformation, context) : undefined, - sequenceStoreId: __expectString(output.sequenceStoreId), - status: __expectString(output.status), - subjectId: __expectString(output.subjectId), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + fileType: __expectString, + id: __expectString, + name: __expectString, + referenceArn: __expectString, + sampleId: __expectString, + sequenceInformation: _json, + sequenceStoreId: __expectString, + status: __expectString, + subjectId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ReferenceFiles - */ -const de_ReferenceFiles = (output: any, context: __SerdeContext): ReferenceFiles => { - return { - index: output.index != null ? de_FileInformation(output.index, context) : undefined, - source: output.source != null ? de_FileInformation(output.source, context) : undefined, - } as any; -}; +// de_ReferenceFiles omitted. -/** - * deserializeAws_restJson1ReferenceItem - */ -const de_ReferenceItem = (output: any, context: __SerdeContext): ReferenceItem => { - if (__expectString(output.referenceArn) !== undefined) { - return { referenceArn: __expectString(output.referenceArn) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ReferenceItem omitted. /** * deserializeAws_restJson1ReferenceList @@ -8734,9 +7752,6 @@ const de_ReferenceList = (output: any, context: __SerdeContext): ReferenceListIt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReferenceListItem(entry, context); }); return retVal; @@ -8746,34 +7761,31 @@ const de_ReferenceList = (output: any, context: __SerdeContext): ReferenceListIt * deserializeAws_restJson1ReferenceListItem */ const de_ReferenceListItem = (output: any, context: __SerdeContext): ReferenceListItem => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - md5: __expectString(output.md5), - name: __expectString(output.name), - referenceStoreId: __expectString(output.referenceStoreId), - status: __expectString(output.status), - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + md5: __expectString, + name: __expectString, + referenceStoreId: __expectString, + status: __expectString, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1ReferenceStoreDetail */ const de_ReferenceStoreDetail = (output: any, context: __SerdeContext): ReferenceStoreDetail => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - sseConfig: output.sseConfig != null ? de_SseConfig(output.sseConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + sseConfig: _json, + }) as any; }; /** @@ -8783,9 +7795,6 @@ const de_ReferenceStoreDetailList = (output: any, context: __SerdeContext): Refe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReferenceStoreDetail(entry, context); }); return retVal; @@ -8798,9 +7807,6 @@ const de_RunGroupList = (output: any, context: __SerdeContext): RunGroupListItem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RunGroupListItem(entry, context); }); return retVal; @@ -8810,16 +7816,15 @@ const de_RunGroupList = (output: any, context: __SerdeContext): RunGroupListItem * deserializeAws_restJson1RunGroupListItem */ const de_RunGroupListItem = (output: any, context: __SerdeContext): RunGroupListItem => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - id: __expectString(output.id), - maxCpus: __expectInt32(output.maxCpus), - maxDuration: __expectInt32(output.maxDuration), - maxRuns: __expectInt32(output.maxRuns), - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + maxCpus: __expectInt32, + maxDuration: __expectInt32, + maxRuns: __expectInt32, + name: __expectString, + }) as any; }; /** @@ -8829,9 +7834,6 @@ const de_RunList = (output: any, context: __SerdeContext): RunListItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RunListItem(entry, context); }); return retVal; @@ -8841,20 +7843,18 @@ const de_RunList = (output: any, context: __SerdeContext): RunListItem[] => { * deserializeAws_restJson1RunListItem */ const de_RunListItem = (output: any, context: __SerdeContext): RunListItem => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - priority: __expectInt32(output.priority), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - status: __expectString(output.status), - stopTime: output.stopTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.stopTime)) : undefined, - storageCapacity: __expectInt32(output.storageCapacity), - workflowId: __expectString(output.workflowId), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + name: __expectString, + priority: __expectInt32, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + stopTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + storageCapacity: __expectInt32, + workflowId: __expectString, + }) as any; }; /** @@ -8864,72 +7864,26 @@ const de_RunParameters = (output: any, context: __SerdeContext): __DocumentType return output; }; -/** - * deserializeAws_restJson1RunResourceDigests - */ -const de_RunResourceDigests = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_RunResourceDigests omitted. -/** - * deserializeAws_restJson1Schema - */ -const de_Schema = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaItem(entry, context); - }); - return retVal; -}; +// de_Schema omitted. -/** - * deserializeAws_restJson1SchemaItem - */ -const de_SchemaItem = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SchemaItem omitted. -/** - * deserializeAws_restJson1SequenceInformation - */ -const de_SequenceInformation = (output: any, context: __SerdeContext): SequenceInformation => { - return { - alignment: __expectString(output.alignment), - generatedFrom: __expectString(output.generatedFrom), - totalBaseCount: __expectLong(output.totalBaseCount), - totalReadCount: __expectLong(output.totalReadCount), - } as any; -}; +// de_SequenceInformation omitted. /** * deserializeAws_restJson1SequenceStoreDetail */ const de_SequenceStoreDetail = (output: any, context: __SerdeContext): SequenceStoreDetail => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - sseConfig: output.sseConfig != null ? de_SseConfig(output.sseConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + sseConfig: _json, + }) as any; }; /** @@ -8939,58 +7893,18 @@ const de_SequenceStoreDetailList = (output: any, context: __SerdeContext): Seque const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SequenceStoreDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SourceFiles - */ -const de_SourceFiles = (output: any, context: __SerdeContext): SourceFiles => { - return { - source1: __expectString(output.source1), - source2: __expectString(output.source2), - } as any; -}; +// de_SourceFiles omitted. -/** - * deserializeAws_restJson1SseConfig - */ -const de_SseConfig = (output: any, context: __SerdeContext): SseConfig => { - return { - keyArn: __expectString(output.keyArn), - type: __expectString(output.type), - } as any; -}; +// de_SseConfig omitted. -/** - * deserializeAws_restJson1StoreOptions - */ -const de_StoreOptions = (output: any, context: __SerdeContext): StoreOptions => { - if (output.tsvStoreOptions != null) { - return { - tsvStoreOptions: de_TsvStoreOptions(output.tsvStoreOptions, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_StoreOptions omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1TaskList @@ -8999,9 +7913,6 @@ const de_TaskList = (output: any, context: __SerdeContext): TaskListItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TaskListItem(entry, context); }); return retVal; @@ -9011,85 +7922,40 @@ const de_TaskList = (output: any, context: __SerdeContext): TaskListItem[] => { * deserializeAws_restJson1TaskListItem */ const de_TaskListItem = (output: any, context: __SerdeContext): TaskListItem => { - return { - cpus: __expectInt32(output.cpus), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - memory: __expectInt32(output.memory), - name: __expectString(output.name), - startTime: - output.startTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.startTime)) : undefined, - status: __expectString(output.status), - stopTime: output.stopTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.stopTime)) : undefined, - taskId: __expectString(output.taskId), - } as any; + return take(output, { + cpus: __expectInt32, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + memory: __expectInt32, + name: __expectString, + startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + stopTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + taskId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TsvOptions - */ -const de_TsvOptions = (output: any, context: __SerdeContext): TsvOptions => { - return { - readOptions: output.readOptions != null ? de_ReadOptions(output.readOptions, context) : undefined, - } as any; -}; +// de_TsvOptions omitted. -/** - * deserializeAws_restJson1TsvStoreOptions - */ -const de_TsvStoreOptions = (output: any, context: __SerdeContext): TsvStoreOptions => { - return { - annotationType: __expectString(output.annotationType), - formatToHeader: output.formatToHeader != null ? de_FormatToHeader(output.formatToHeader, context) : undefined, - schema: output.schema != null ? de_Schema(output.schema, context) : undefined, - } as any; -}; +// de_TsvStoreOptions omitted. -/** - * deserializeAws_restJson1VariantImportItemDetail - */ -const de_VariantImportItemDetail = (output: any, context: __SerdeContext): VariantImportItemDetail => { - return { - jobStatus: __expectString(output.jobStatus), - source: __expectString(output.source), - statusMessage: __expectString(output.statusMessage), - } as any; -}; +// de_VariantImportItemDetail omitted. -/** - * deserializeAws_restJson1VariantImportItemDetails - */ -const de_VariantImportItemDetails = (output: any, context: __SerdeContext): VariantImportItemDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VariantImportItemDetail(entry, context); - }); - return retVal; -}; +// de_VariantImportItemDetails omitted. /** * deserializeAws_restJson1VariantImportJobItem */ const de_VariantImportJobItem = (output: any, context: __SerdeContext): VariantImportJobItem => { - return { - completionTime: - output.completionTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.completionTime)) - : undefined, - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - destinationName: __expectString(output.destinationName), - id: __expectString(output.id), - roleArn: __expectString(output.roleArn), - runLeftNormalization: __expectBoolean(output.runLeftNormalization), - status: __expectString(output.status), - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + completionTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationName: __expectString, + id: __expectString, + roleArn: __expectString, + runLeftNormalization: __expectBoolean, + status: __expectString, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -9099,9 +7965,6 @@ const de_VariantImportJobItems = (output: any, context: __SerdeContext): Variant const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VariantImportJobItem(entry, context); }); return retVal; @@ -9111,21 +7974,19 @@ const de_VariantImportJobItems = (output: any, context: __SerdeContext): Variant * deserializeAws_restJson1VariantStoreItem */ const de_VariantStoreItem = (output: any, context: __SerdeContext): VariantStoreItem => { - return { - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - name: __expectString(output.name), - reference: output.reference != null ? de_ReferenceItem(__expectUnion(output.reference), context) : undefined, - sseConfig: output.sseConfig != null ? de_SseConfig(output.sseConfig, context) : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - storeArn: __expectString(output.storeArn), - storeSizeBytes: __expectLong(output.storeSizeBytes), - updateTime: - output.updateTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updateTime)) : undefined, - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + name: __expectString, + reference: (_: any) => _json(__expectUnion(_)), + sseConfig: _json, + status: __expectString, + statusMessage: __expectString, + storeArn: __expectString, + storeSizeBytes: __expectLong, + updateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -9135,23 +7996,12 @@ const de_VariantStoreItems = (output: any, context: __SerdeContext): VariantStor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VariantStoreItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VcfOptions - */ -const de_VcfOptions = (output: any, context: __SerdeContext): VcfOptions => { - return { - ignoreFilterField: __expectBoolean(output.ignoreFilterField), - ignoreQualField: __expectBoolean(output.ignoreQualField), - } as any; -}; +// de_VcfOptions omitted. /** * deserializeAws_restJson1WorkflowList @@ -9160,9 +8010,6 @@ const de_WorkflowList = (output: any, context: __SerdeContext): WorkflowListItem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkflowListItem(entry, context); }); return retVal; @@ -9172,40 +8019,20 @@ const de_WorkflowList = (output: any, context: __SerdeContext): WorkflowListItem * deserializeAws_restJson1WorkflowListItem */ const de_WorkflowListItem = (output: any, context: __SerdeContext): WorkflowListItem => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - digest: __expectString(output.digest), - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + digest: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1WorkflowParameter - */ -const de_WorkflowParameter = (output: any, context: __SerdeContext): WorkflowParameter => { - return { - description: __expectString(output.description), - optional: __expectBoolean(output.optional), - } as any; -}; +// de_WorkflowParameter omitted. -/** - * deserializeAws_restJson1WorkflowParameterTemplate - */ -const de_WorkflowParameterTemplate = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_WorkflowParameter(value, context); - return acc; - }, {}); -}; +// de_WorkflowParameterTemplate omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-opensearch/src/protocols/Aws_restJson1.ts b/clients/client-opensearch/src/protocols/Aws_restJson1.ts index fdbd4cb040df..189dcabd1355 100644 --- a/clients/client-opensearch/src/protocols/Aws_restJson1.ts +++ b/clients/client-opensearch/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,10 +12,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -164,23 +166,19 @@ import { UpgradeDomainCommandInput, UpgradeDomainCommandOutput } from "../comman import { AccessDeniedException, AccessPoliciesStatus, - AdditionalLimit, AdvancedOptionsStatus, AdvancedSecurityOptions, AdvancedSecurityOptionsInput, AdvancedSecurityOptionsStatus, - AuthorizedPrincipal, AutoTune, AutoTuneDetails, AutoTuneMaintenanceSchedule, AutoTuneOptions, AutoTuneOptionsInput, - AutoTuneOptionsOutput, AutoTuneOptionsStatus, AutoTuneStatus, AWSDomainInformation, BaseException, - ChangeProgressDetails, ChangeProgressStage, ChangeProgressStatusDetails, ClusterConfig, @@ -188,40 +186,27 @@ import { CognitoOptions, CognitoOptionsStatus, ColdStorageOptions, - CompatibleVersionsMap, ConflictException, - ConnectionProperties, DescribePackagesFilter, DisabledOperationException, DomainConfig, DomainEndpointOptions, DomainEndpointOptionsStatus, - DomainInfo, DomainInformationContainer, DomainPackageDetails, DomainStatus, - DryRunProgressStatus, - DryRunResults, Duration, EBSOptions, EBSOptionsStatus, EncryptionAtRestOptions, EncryptionAtRestOptionsStatus, - ErrorDetails, Filter, - InboundConnection, - InboundConnectionStatus, - InstanceCountLimits, - InstanceLimits, - InstanceTypeDetails, InternalException, InvalidPaginationTokenException, InvalidTypeException, LimitExceededException, - Limits, LogPublishingOption, LogPublishingOptionsStatus, - LogType, MasterUserOptions, NodeToNodeEncryptionOptions, NodeToNodeEncryptionOptionsStatus, @@ -229,8 +214,6 @@ import { OffPeakWindowOptions, OffPeakWindowOptionsStatus, OptionStatus, - OutboundConnection, - OutboundConnectionStatus, PackageDetails, PackageSource, PackageVersionHistory, @@ -241,8 +224,6 @@ import { ResourceNotFoundException, SAMLIdp, SAMLOptionsInput, - SAMLOptionsOutput, - ScheduledAction, ScheduledAutoTuneDetails, ServiceSoftwareOptions, SlotNotAvailableException, @@ -250,19 +231,12 @@ import { SnapshotOptionsStatus, SoftwareUpdateOptions, SoftwareUpdateOptionsStatus, - StorageType, - StorageTypeLimit, Tag, UpgradeHistory, UpgradeStepItem, ValidationException, - ValidationFailure, VersionStatus, - VPCDerivedInfo, VPCDerivedInfoStatus, - VpcEndpoint, - VpcEndpointError, - VpcEndpointSummary, VPCOptions, WindowStartTime, ZoneAwarenessConfig, @@ -314,10 +288,12 @@ export const se_AddTagsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags"; let body: any; - body = JSON.stringify({ - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - }); + body = JSON.stringify( + take(input, { + ARN: [], + TagList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -371,9 +347,11 @@ export const se_AuthorizeVpcEndpointAccessCommand = async ( "/2021-01-01/opensearch/domain/{DomainName}/authorizeVpcEndpointAccess"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Account != null && { Account: input.Account }), - }); + body = JSON.stringify( + take(input, { + Account: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -400,9 +378,11 @@ export const se_CancelServiceSoftwareUpdateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/serviceSoftwareUpdate/cancel"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -428,40 +408,28 @@ export const se_CreateDomainCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain"; let body: any; - body = JSON.stringify({ - ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }), - ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }), - ...(input.AdvancedSecurityOptions != null && { - AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context), - }), - ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptionsInput(input.AutoTuneOptions, context) }), - ...(input.ClusterConfig != null && { ClusterConfig: se_ClusterConfig(input.ClusterConfig, context) }), - ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }), - ...(input.DomainEndpointOptions != null && { - DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context), - }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }), - ...(input.EncryptionAtRestOptions != null && { - EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context), - }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.LogPublishingOptions != null && { - LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context), - }), - ...(input.NodeToNodeEncryptionOptions != null && { - NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context), - }), - ...(input.OffPeakWindowOptions != null && { - OffPeakWindowOptions: se_OffPeakWindowOptions(input.OffPeakWindowOptions, context), - }), - ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }), - ...(input.SoftwareUpdateOptions != null && { - SoftwareUpdateOptions: se_SoftwareUpdateOptions(input.SoftwareUpdateOptions, context), - }), - ...(input.TagList != null && { TagList: se_TagList(input.TagList, context) }), - ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }), - }); + body = JSON.stringify( + take(input, { + AccessPolicies: [], + AdvancedOptions: (_) => _json(_), + AdvancedSecurityOptions: (_) => _json(_), + AutoTuneOptions: (_) => se_AutoTuneOptionsInput(_, context), + ClusterConfig: (_) => _json(_), + CognitoOptions: (_) => _json(_), + DomainEndpointOptions: (_) => _json(_), + DomainName: [], + EBSOptions: (_) => _json(_), + EncryptionAtRestOptions: (_) => _json(_), + EngineVersion: [], + LogPublishingOptions: (_) => _json(_), + NodeToNodeEncryptionOptions: (_) => _json(_), + OffPeakWindowOptions: (_) => _json(_), + SnapshotOptions: (_) => _json(_), + SoftwareUpdateOptions: (_) => _json(_), + TagList: (_) => _json(_), + VPCOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -488,16 +456,14 @@ export const se_CreateOutboundConnectionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/cc/outboundConnection"; let body: any; - body = JSON.stringify({ - ...(input.ConnectionAlias != null && { ConnectionAlias: input.ConnectionAlias }), - ...(input.ConnectionMode != null && { ConnectionMode: input.ConnectionMode }), - ...(input.LocalDomainInfo != null && { - LocalDomainInfo: se_DomainInformationContainer(input.LocalDomainInfo, context), - }), - ...(input.RemoteDomainInfo != null && { - RemoteDomainInfo: se_DomainInformationContainer(input.RemoteDomainInfo, context), - }), - }); + body = JSON.stringify( + take(input, { + ConnectionAlias: [], + ConnectionMode: [], + LocalDomainInfo: (_) => _json(_), + RemoteDomainInfo: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -522,12 +488,14 @@ export const se_CreatePackageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages"; let body: any; - body = JSON.stringify({ - ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }), - ...(input.PackageName != null && { PackageName: input.PackageName }), - ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }), - ...(input.PackageType != null && { PackageType: input.PackageType }), - }); + body = JSON.stringify( + take(input, { + PackageDescription: [], + PackageName: [], + PackageSource: (_) => _json(_), + PackageType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -553,11 +521,13 @@ export const se_CreateVpcEndpointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/vpcEndpoints"; let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DomainArn != null && { DomainArn: input.DomainArn }), - ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + DomainArn: [], + VpcOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -755,10 +725,12 @@ export const se_DescribeDomainAutoTunesCommand = async ( "/2021-01-01/opensearch/domain/{DomainName}/autoTunes"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -838,9 +810,11 @@ export const se_DescribeDomainsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/domain-info"; let body: any; - body = JSON.stringify({ - ...(input.DomainNames != null && { DomainNames: se_DomainNameList(input.DomainNames, context) }), - }); + body = JSON.stringify( + take(input, { + DomainNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -897,11 +871,13 @@ export const se_DescribeInboundConnectionsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/cc/inboundConnection/search"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -972,11 +948,13 @@ export const se_DescribeOutboundConnectionsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/cc/outboundConnection/search"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1002,11 +980,13 @@ export const se_DescribePackagesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/describe"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_DescribePackagesFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1092,9 +1072,11 @@ export const se_DescribeVpcEndpointsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/vpcEndpoints/describe"; let body: any; - body = JSON.stringify({ - ...(input.VpcEndpointIds != null && { VpcEndpointIds: se_VpcEndpointIdList(input.VpcEndpointIds, context) }), - }); + body = JSON.stringify( + take(input, { + VpcEndpointIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1549,11 +1531,13 @@ export const se_PurchaseReservedInstanceOfferingCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/purchaseReservedInstanceOffering"; let body: any; - body = JSON.stringify({ - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.ReservationName != null && { ReservationName: input.ReservationName }), - ...(input.ReservedInstanceOfferingId != null && { ReservedInstanceOfferingId: input.ReservedInstanceOfferingId }), - }); + body = JSON.stringify( + take(input, { + InstanceCount: [], + ReservationName: [], + ReservedInstanceOfferingId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1611,10 +1595,12 @@ export const se_RemoveTagsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/tags-removal"; let body: any; - body = JSON.stringify({ - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.TagKeys != null && { TagKeys: se_StringList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1642,9 +1628,11 @@ export const se_RevokeVpcEndpointAccessCommand = async ( "/2021-01-01/opensearch/domain/{DomainName}/revokeVpcEndpointAccess"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.Account != null && { Account: input.Account }), - }); + body = JSON.stringify( + take(input, { + Account: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1671,11 +1659,13 @@ export const se_StartServiceSoftwareUpdateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/serviceSoftwareUpdate/start"; let body: any; - body = JSON.stringify({ - ...(input.DesiredStartTime != null && { DesiredStartTime: input.DesiredStartTime }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.ScheduleAt != null && { ScheduleAt: input.ScheduleAt }), - }); + body = JSON.stringify( + take(input, { + DesiredStartTime: [], + DomainName: [], + ScheduleAt: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1703,39 +1693,27 @@ export const se_UpdateDomainConfigCommand = async ( "/2021-01-01/opensearch/domain/{DomainName}/config"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }), - ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }), - ...(input.AdvancedSecurityOptions != null && { - AdvancedSecurityOptions: se_AdvancedSecurityOptionsInput(input.AdvancedSecurityOptions, context), - }), - ...(input.AutoTuneOptions != null && { AutoTuneOptions: se_AutoTuneOptions(input.AutoTuneOptions, context) }), - ...(input.ClusterConfig != null && { ClusterConfig: se_ClusterConfig(input.ClusterConfig, context) }), - ...(input.CognitoOptions != null && { CognitoOptions: se_CognitoOptions(input.CognitoOptions, context) }), - ...(input.DomainEndpointOptions != null && { - DomainEndpointOptions: se_DomainEndpointOptions(input.DomainEndpointOptions, context), - }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.DryRunMode != null && { DryRunMode: input.DryRunMode }), - ...(input.EBSOptions != null && { EBSOptions: se_EBSOptions(input.EBSOptions, context) }), - ...(input.EncryptionAtRestOptions != null && { - EncryptionAtRestOptions: se_EncryptionAtRestOptions(input.EncryptionAtRestOptions, context), - }), - ...(input.LogPublishingOptions != null && { - LogPublishingOptions: se_LogPublishingOptions(input.LogPublishingOptions, context), - }), - ...(input.NodeToNodeEncryptionOptions != null && { - NodeToNodeEncryptionOptions: se_NodeToNodeEncryptionOptions(input.NodeToNodeEncryptionOptions, context), - }), - ...(input.OffPeakWindowOptions != null && { - OffPeakWindowOptions: se_OffPeakWindowOptions(input.OffPeakWindowOptions, context), - }), - ...(input.SnapshotOptions != null && { SnapshotOptions: se_SnapshotOptions(input.SnapshotOptions, context) }), - ...(input.SoftwareUpdateOptions != null && { - SoftwareUpdateOptions: se_SoftwareUpdateOptions(input.SoftwareUpdateOptions, context), - }), - ...(input.VPCOptions != null && { VPCOptions: se_VPCOptions(input.VPCOptions, context) }), - }); + body = JSON.stringify( + take(input, { + AccessPolicies: [], + AdvancedOptions: (_) => _json(_), + AdvancedSecurityOptions: (_) => _json(_), + AutoTuneOptions: (_) => se_AutoTuneOptions(_, context), + ClusterConfig: (_) => _json(_), + CognitoOptions: (_) => _json(_), + DomainEndpointOptions: (_) => _json(_), + DryRun: [], + DryRunMode: [], + EBSOptions: (_) => _json(_), + EncryptionAtRestOptions: (_) => _json(_), + LogPublishingOptions: (_) => _json(_), + NodeToNodeEncryptionOptions: (_) => _json(_), + OffPeakWindowOptions: (_) => _json(_), + SnapshotOptions: (_) => _json(_), + SoftwareUpdateOptions: (_) => _json(_), + VPCOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1761,12 +1739,14 @@ export const se_UpdatePackageCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/packages/update"; let body: any; - body = JSON.stringify({ - ...(input.CommitMessage != null && { CommitMessage: input.CommitMessage }), - ...(input.PackageDescription != null && { PackageDescription: input.PackageDescription }), - ...(input.PackageID != null && { PackageID: input.PackageID }), - ...(input.PackageSource != null && { PackageSource: se_PackageSource(input.PackageSource, context) }), - }); + body = JSON.stringify( + take(input, { + CommitMessage: [], + PackageDescription: [], + PackageID: [], + PackageSource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1794,12 +1774,14 @@ export const se_UpdateScheduledActionCommand = async ( "/2021-01-01/opensearch/domain/{DomainName}/scheduledAction/update"; resolvedPath = __resolvedPath(resolvedPath, input, "DomainName", () => input.DomainName!, "{DomainName}", false); let body: any; - body = JSON.stringify({ - ...(input.ActionID != null && { ActionID: input.ActionID }), - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.DesiredStartTime != null && { DesiredStartTime: input.DesiredStartTime }), - ...(input.ScheduleAt != null && { ScheduleAt: input.ScheduleAt }), - }); + body = JSON.stringify( + take(input, { + ActionID: [], + ActionType: [], + DesiredStartTime: [], + ScheduleAt: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1826,10 +1808,12 @@ export const se_UpdateVpcEndpointCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/vpcEndpoints/update"; let body: any; - body = JSON.stringify({ - ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }), - ...(input.VpcOptions != null && { VpcOptions: se_VPCOptions(input.VpcOptions, context) }), - }); + body = JSON.stringify( + take(input, { + VpcEndpointId: [], + VpcOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1855,12 +1839,14 @@ export const se_UpgradeDomainCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2021-01-01/opensearch/upgradeDomain"; let body: any; - body = JSON.stringify({ - ...(input.AdvancedOptions != null && { AdvancedOptions: se_AdvancedOptions(input.AdvancedOptions, context) }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.PerformCheckOnly != null && { PerformCheckOnly: input.PerformCheckOnly }), - ...(input.TargetVersion != null && { TargetVersion: input.TargetVersion }), - }); + body = JSON.stringify( + take(input, { + AdvancedOptions: (_) => _json(_), + DomainName: [], + PerformCheckOnly: [], + TargetVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1886,9 +1872,10 @@ export const de_AcceptInboundConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_InboundConnection(data.Connection, context); - } + const doc = take(data, { + Connection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1916,10 +1903,9 @@ const de_AcceptInboundConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1969,10 +1955,9 @@ const de_AddTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1992,9 +1977,10 @@ export const de_AssociatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetails != null) { - contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context); - } + const doc = take(data, { + DomainPackageDetails: (_) => de_DomainPackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2031,10 +2017,9 @@ const de_AssociatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2054,9 +2039,10 @@ export const de_AuthorizeVpcEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthorizedPrincipal != null) { - contents.AuthorizedPrincipal = de_AuthorizedPrincipal(data.AuthorizedPrincipal, context); - } + const doc = take(data, { + AuthorizedPrincipal: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2093,10 +2079,9 @@ const de_AuthorizeVpcEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2116,9 +2101,10 @@ export const de_CancelServiceSoftwareUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServiceSoftwareOptions != null) { - contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context); - } + const doc = take(data, { + ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2149,10 +2135,9 @@ const de_CancelServiceSoftwareUpdateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2172,9 +2157,10 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatus != null) { - contents.DomainStatus = de_DomainStatus(data.DomainStatus, context); - } + const doc = take(data, { + DomainStatus: (_) => de_DomainStatus(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2214,10 +2200,9 @@ const de_CreateDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2237,27 +2222,16 @@ export const de_CreateOutboundConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionAlias != null) { - contents.ConnectionAlias = __expectString(data.ConnectionAlias); - } - if (data.ConnectionId != null) { - contents.ConnectionId = __expectString(data.ConnectionId); - } - if (data.ConnectionMode != null) { - contents.ConnectionMode = __expectString(data.ConnectionMode); - } - if (data.ConnectionProperties != null) { - contents.ConnectionProperties = de_ConnectionProperties(data.ConnectionProperties, context); - } - if (data.ConnectionStatus != null) { - contents.ConnectionStatus = de_OutboundConnectionStatus(data.ConnectionStatus, context); - } - if (data.LocalDomainInfo != null) { - contents.LocalDomainInfo = de_DomainInformationContainer(data.LocalDomainInfo, context); - } - if (data.RemoteDomainInfo != null) { - contents.RemoteDomainInfo = de_DomainInformationContainer(data.RemoteDomainInfo, context); - } + const doc = take(data, { + ConnectionAlias: __expectString, + ConnectionId: __expectString, + ConnectionMode: __expectString, + ConnectionProperties: _json, + ConnectionStatus: _json, + LocalDomainInfo: _json, + RemoteDomainInfo: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2288,10 +2262,9 @@ const de_CreateOutboundConnectionCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2311,9 +2284,10 @@ export const de_CreatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PackageDetails != null) { - contents.PackageDetails = de_PackageDetails(data.PackageDetails, context); - } + const doc = take(data, { + PackageDetails: (_) => de_PackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2353,10 +2327,9 @@ const de_CreatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2376,9 +2349,10 @@ export const de_CreateVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpoint != null) { - contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context); - } + const doc = take(data, { + VpcEndpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2415,10 +2389,9 @@ const de_CreateVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2438,9 +2411,10 @@ export const de_DeleteDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatus != null) { - contents.DomainStatus = de_DomainStatus(data.DomainStatus, context); - } + const doc = take(data, { + DomainStatus: (_) => de_DomainStatus(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2471,10 +2445,9 @@ const de_DeleteDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2494,9 +2467,10 @@ export const de_DeleteInboundConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_InboundConnection(data.Connection, context); - } + const doc = take(data, { + Connection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2521,10 +2495,9 @@ const de_DeleteInboundConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2544,9 +2517,10 @@ export const de_DeleteOutboundConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_OutboundConnection(data.Connection, context); - } + const doc = take(data, { + Connection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2571,10 +2545,9 @@ const de_DeleteOutboundConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2594,9 +2567,10 @@ export const de_DeletePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PackageDetails != null) { - contents.PackageDetails = de_PackageDetails(data.PackageDetails, context); - } + const doc = take(data, { + PackageDetails: (_) => de_PackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2633,10 +2607,9 @@ const de_DeletePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2656,9 +2629,10 @@ export const de_DeleteVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpointSummary != null) { - contents.VpcEndpointSummary = de_VpcEndpointSummary(data.VpcEndpointSummary, context); - } + const doc = take(data, { + VpcEndpointSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2689,10 +2663,9 @@ const de_DeleteVpcEndpointCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2712,9 +2685,10 @@ export const de_DescribeDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatus != null) { - contents.DomainStatus = de_DomainStatus(data.DomainStatus, context); - } + const doc = take(data, { + DomainStatus: (_) => de_DomainStatus(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2745,10 +2719,9 @@ const de_DescribeDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2768,12 +2741,11 @@ export const de_DescribeDomainAutoTunesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AutoTunes != null) { - contents.AutoTunes = de_AutoTuneList(data.AutoTunes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AutoTunes: (_) => de_AutoTuneList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2804,10 +2776,9 @@ const de_DescribeDomainAutoTunesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2827,9 +2798,10 @@ export const de_DescribeDomainChangeProgressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ChangeProgressStatus != null) { - contents.ChangeProgressStatus = de_ChangeProgressStatusDetails(data.ChangeProgressStatus, context); - } + const doc = take(data, { + ChangeProgressStatus: (_) => de_ChangeProgressStatusDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2860,10 +2832,9 @@ const de_DescribeDomainChangeProgressCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2883,9 +2854,10 @@ export const de_DescribeDomainConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainConfig != null) { - contents.DomainConfig = de_DomainConfig(data.DomainConfig, context); - } + const doc = take(data, { + DomainConfig: (_) => de_DomainConfig(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2916,10 +2888,9 @@ const de_DescribeDomainConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2939,9 +2910,10 @@ export const de_DescribeDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainStatusList != null) { - contents.DomainStatusList = de_DomainStatusList(data.DomainStatusList, context); - } + const doc = take(data, { + DomainStatusList: (_) => de_DomainStatusList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2969,10 +2941,9 @@ const de_DescribeDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2992,15 +2963,12 @@ export const de_DescribeDryRunProgressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DryRunConfig != null) { - contents.DryRunConfig = de_DomainStatus(data.DryRunConfig, context); - } - if (data.DryRunProgressStatus != null) { - contents.DryRunProgressStatus = de_DryRunProgressStatus(data.DryRunProgressStatus, context); - } - if (data.DryRunResults != null) { - contents.DryRunResults = de_DryRunResults(data.DryRunResults, context); - } + const doc = take(data, { + DryRunConfig: (_) => de_DomainStatus(_, context), + DryRunProgressStatus: _json, + DryRunResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3034,10 +3002,9 @@ const de_DescribeDryRunProgressCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3057,12 +3024,11 @@ export const de_DescribeInboundConnectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connections != null) { - contents.Connections = de_InboundConnections(data.Connections, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Connections: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3087,10 +3053,9 @@ const de_DescribeInboundConnectionsCommandError = async ( throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3110,9 +3075,10 @@ export const de_DescribeInstanceTypeLimitsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LimitsByRole != null) { - contents.LimitsByRole = de_LimitsByRole(data.LimitsByRole, context); - } + const doc = take(data, { + LimitsByRole: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3149,10 +3115,9 @@ const de_DescribeInstanceTypeLimitsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3172,12 +3137,11 @@ export const de_DescribeOutboundConnectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connections != null) { - contents.Connections = de_OutboundConnections(data.Connections, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Connections: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3202,10 +3166,9 @@ const de_DescribeOutboundConnectionsCommandError = async ( throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3225,12 +3188,11 @@ export const de_DescribePackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PackageDetailsList != null) { - contents.PackageDetailsList = de_PackageDetailsList(data.PackageDetailsList, context); - } + const doc = take(data, { + NextToken: __expectString, + PackageDetailsList: (_) => de_PackageDetailsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3264,10 +3226,9 @@ const de_DescribePackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3287,12 +3248,11 @@ export const de_DescribeReservedInstanceOfferingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReservedInstanceOfferings != null) { - contents.ReservedInstanceOfferings = de_ReservedInstanceOfferingList(data.ReservedInstanceOfferings, context); - } + const doc = take(data, { + NextToken: __expectString, + ReservedInstanceOfferings: (_) => de_ReservedInstanceOfferingList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3323,10 +3283,9 @@ const de_DescribeReservedInstanceOfferingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3346,12 +3305,11 @@ export const de_DescribeReservedInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ReservedInstances != null) { - contents.ReservedInstances = de_ReservedInstanceList(data.ReservedInstances, context); - } + const doc = take(data, { + NextToken: __expectString, + ReservedInstances: (_) => de_ReservedInstanceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3382,10 +3340,9 @@ const de_DescribeReservedInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3405,12 +3362,11 @@ export const de_DescribeVpcEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpointErrors != null) { - contents.VpcEndpointErrors = de_VpcEndpointErrorList(data.VpcEndpointErrors, context); - } - if (data.VpcEndpoints != null) { - contents.VpcEndpoints = de_VpcEndpoints(data.VpcEndpoints, context); - } + const doc = take(data, { + VpcEndpointErrors: _json, + VpcEndpoints: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3441,10 +3397,9 @@ const de_DescribeVpcEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3464,9 +3419,10 @@ export const de_DissociatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetails != null) { - contents.DomainPackageDetails = de_DomainPackageDetails(data.DomainPackageDetails, context); - } + const doc = take(data, { + DomainPackageDetails: (_) => de_DomainPackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3503,10 +3459,9 @@ const de_DissociatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3526,9 +3481,10 @@ export const de_GetCompatibleVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompatibleVersions != null) { - contents.CompatibleVersions = de_CompatibleVersionsList(data.CompatibleVersions, context); - } + const doc = take(data, { + CompatibleVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3562,10 +3518,9 @@ const de_GetCompatibleVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3585,15 +3540,12 @@ export const de_GetPackageVersionHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PackageID != null) { - contents.PackageID = __expectString(data.PackageID); - } - if (data.PackageVersionHistoryList != null) { - contents.PackageVersionHistoryList = de_PackageVersionHistoryList(data.PackageVersionHistoryList, context); - } + const doc = take(data, { + NextToken: __expectString, + PackageID: __expectString, + PackageVersionHistoryList: (_) => de_PackageVersionHistoryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3627,10 +3579,9 @@ const de_GetPackageVersionHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3650,12 +3601,11 @@ export const de_GetUpgradeHistoryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.UpgradeHistories != null) { - contents.UpgradeHistories = de_UpgradeHistoryList(data.UpgradeHistories, context); - } + const doc = take(data, { + NextToken: __expectString, + UpgradeHistories: (_) => de_UpgradeHistoryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3689,10 +3639,9 @@ const de_GetUpgradeHistoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3712,15 +3661,12 @@ export const de_GetUpgradeStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StepStatus != null) { - contents.StepStatus = __expectString(data.StepStatus); - } - if (data.UpgradeName != null) { - contents.UpgradeName = __expectString(data.UpgradeName); - } - if (data.UpgradeStep != null) { - contents.UpgradeStep = __expectString(data.UpgradeStep); - } + const doc = take(data, { + StepStatus: __expectString, + UpgradeName: __expectString, + UpgradeStep: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3754,10 +3700,9 @@ const de_GetUpgradeStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3777,9 +3722,10 @@ export const de_ListDomainNamesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainNames != null) { - contents.DomainNames = de_DomainInfoList(data.DomainNames, context); - } + const doc = take(data, { + DomainNames: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3804,10 +3750,9 @@ const de_ListDomainNamesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3827,12 +3772,11 @@ export const de_ListDomainsForPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetailsList != null) { - contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3866,10 +3810,9 @@ const de_ListDomainsForPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3889,12 +3832,11 @@ export const de_ListInstanceTypeDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceTypeDetails != null) { - contents.InstanceTypeDetails = de_InstanceTypeDetailsList(data.InstanceTypeDetails, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InstanceTypeDetails: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3925,10 +3867,9 @@ const de_ListInstanceTypeDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,12 +3889,11 @@ export const de_ListPackagesForDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainPackageDetailsList != null) { - contents.DomainPackageDetailsList = de_DomainPackageDetailsList(data.DomainPackageDetailsList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DomainPackageDetailsList: (_) => de_DomainPackageDetailsList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3987,10 +3927,9 @@ const de_ListPackagesForDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4010,12 +3949,11 @@ export const de_ListScheduledActionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ScheduledActions != null) { - contents.ScheduledActions = de_ScheduledActionsList(data.ScheduledActions, context); - } + const doc = take(data, { + NextToken: __expectString, + ScheduledActions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4049,10 +3987,9 @@ const de_ListScheduledActionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4072,9 +4009,10 @@ export const de_ListTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TagList != null) { - contents.TagList = de_TagList(data.TagList, context); - } + const doc = take(data, { + TagList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4105,10 +4043,9 @@ const de_ListTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4128,12 +4065,11 @@ export const de_ListVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Versions != null) { - contents.Versions = de_VersionList(data.Versions, context); - } + const doc = take(data, { + NextToken: __expectString, + Versions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4164,10 +4100,9 @@ const de_ListVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4187,12 +4122,11 @@ export const de_ListVpcEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthorizedPrincipalList != null) { - contents.AuthorizedPrincipalList = de_AuthorizedPrincipalList(data.AuthorizedPrincipalList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AuthorizedPrincipalList: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4223,10 +4157,9 @@ const de_ListVpcEndpointAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4246,12 +4179,11 @@ export const de_ListVpcEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VpcEndpointSummaryList != null) { - contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + VpcEndpointSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4279,10 +4211,9 @@ const de_ListVpcEndpointsCommandError = async ( throw await de_InternalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4302,12 +4233,11 @@ export const de_ListVpcEndpointsForDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VpcEndpointSummaryList != null) { - contents.VpcEndpointSummaryList = de_VpcEndpointSummaryList(data.VpcEndpointSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + VpcEndpointSummaryList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4338,10 +4268,9 @@ const de_ListVpcEndpointsForDomainCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4361,12 +4290,11 @@ export const de_PurchaseReservedInstanceOfferingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ReservationName != null) { - contents.ReservationName = __expectString(data.ReservationName); - } - if (data.ReservedInstanceId != null) { - contents.ReservedInstanceId = __expectString(data.ReservedInstanceId); - } + const doc = take(data, { + ReservationName: __expectString, + ReservedInstanceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4403,10 +4331,9 @@ const de_PurchaseReservedInstanceOfferingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4426,9 +4353,10 @@ export const de_RejectInboundConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Connection != null) { - contents.Connection = de_InboundConnection(data.Connection, context); - } + const doc = take(data, { + Connection: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4453,10 +4381,9 @@ const de_RejectInboundConnectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4503,10 +4430,9 @@ const de_RemoveTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4559,10 +4485,9 @@ const de_RevokeVpcEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4582,9 +4507,10 @@ export const de_StartServiceSoftwareUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ServiceSoftwareOptions != null) { - contents.ServiceSoftwareOptions = de_ServiceSoftwareOptions(data.ServiceSoftwareOptions, context); - } + const doc = take(data, { + ServiceSoftwareOptions: (_) => de_ServiceSoftwareOptions(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4615,10 +4541,9 @@ const de_StartServiceSoftwareUpdateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4638,15 +4563,12 @@ export const de_UpdateDomainConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainConfig != null) { - contents.DomainConfig = de_DomainConfig(data.DomainConfig, context); - } - if (data.DryRunProgressStatus != null) { - contents.DryRunProgressStatus = de_DryRunProgressStatus(data.DryRunProgressStatus, context); - } - if (data.DryRunResults != null) { - contents.DryRunResults = de_DryRunResults(data.DryRunResults, context); - } + const doc = take(data, { + DomainConfig: (_) => de_DomainConfig(_, context), + DryRunProgressStatus: _json, + DryRunResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4683,10 +4605,9 @@ const de_UpdateDomainConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4706,9 +4627,10 @@ export const de_UpdatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.PackageDetails != null) { - contents.PackageDetails = de_PackageDetails(data.PackageDetails, context); - } + const doc = take(data, { + PackageDetails: (_) => de_PackageDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4745,10 +4667,9 @@ const de_UpdatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4768,9 +4689,10 @@ export const de_UpdateScheduledActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ScheduledAction != null) { - contents.ScheduledAction = de_ScheduledAction(data.ScheduledAction, context); - } + const doc = take(data, { + ScheduledAction: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4810,10 +4732,9 @@ const de_UpdateScheduledActionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4833,9 +4754,10 @@ export const de_UpdateVpcEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.VpcEndpoint != null) { - contents.VpcEndpoint = de_VpcEndpoint(data.VpcEndpoint, context); - } + const doc = take(data, { + VpcEndpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4872,10 +4794,9 @@ const de_UpdateVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4895,24 +4816,15 @@ export const de_UpgradeDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdvancedOptions != null) { - contents.AdvancedOptions = de_AdvancedOptions(data.AdvancedOptions, context); - } - if (data.ChangeProgressDetails != null) { - contents.ChangeProgressDetails = de_ChangeProgressDetails(data.ChangeProgressDetails, context); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.PerformCheckOnly != null) { - contents.PerformCheckOnly = __expectBoolean(data.PerformCheckOnly); - } - if (data.TargetVersion != null) { - contents.TargetVersion = __expectString(data.TargetVersion); - } - if (data.UpgradeId != null) { - contents.UpgradeId = __expectString(data.UpgradeId); - } + const doc = take(data, { + AdvancedOptions: _json, + ChangeProgressDetails: _json, + DomainName: __expectString, + PerformCheckOnly: __expectBoolean, + TargetVersion: __expectString, + UpgradeId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4949,16 +4861,15 @@ const de_UpgradeDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4968,9 +4879,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4984,9 +4896,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BaseExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BaseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5000,9 +4913,10 @@ const de_BaseExceptionRes = async (parsedOutput: any, context: __SerdeContext): const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5019,9 +4933,10 @@ const de_DisabledOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new DisabledOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5035,9 +4950,10 @@ const de_DisabledOperationExceptionRes = async ( const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5054,9 +4970,10 @@ const de_InvalidPaginationTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidPaginationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5073,9 +4990,10 @@ const de_InvalidTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5092,9 +5010,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5111,9 +5030,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5130,9 +5050,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5149,12 +5070,11 @@ const de_SlotNotAvailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.SlotSuggestions != null) { - contents.SlotSuggestions = de_SlotList(data.SlotSuggestions, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + SlotSuggestions: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SlotNotAvailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5168,9 +5088,10 @@ const de_SlotNotAvailableExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5178,47 +5099,19 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdvancedOptions - */ -const se_AdvancedOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AdvancedOptions omitted. -/** - * serializeAws_restJson1AdvancedSecurityOptionsInput - */ -const se_AdvancedSecurityOptionsInput = (input: AdvancedSecurityOptionsInput, context: __SerdeContext): any => { - return { - ...(input.AnonymousAuthEnabled != null && { AnonymousAuthEnabled: input.AnonymousAuthEnabled }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.InternalUserDatabaseEnabled != null && { - InternalUserDatabaseEnabled: input.InternalUserDatabaseEnabled, - }), - ...(input.MasterUserOptions != null && { - MasterUserOptions: se_MasterUserOptions(input.MasterUserOptions, context), - }), - ...(input.SAMLOptions != null && { SAMLOptions: se_SAMLOptionsInput(input.SAMLOptions, context) }), - }; -}; +// se_AdvancedSecurityOptionsInput omitted. /** * serializeAws_restJson1AutoTuneMaintenanceSchedule */ const se_AutoTuneMaintenanceSchedule = (input: AutoTuneMaintenanceSchedule, context: __SerdeContext): any => { - return { - ...(input.CronExpressionForRecurrence != null && { - CronExpressionForRecurrence: input.CronExpressionForRecurrence, - }), - ...(input.Duration != null && { Duration: se_Duration(input.Duration, context) }), - ...(input.StartAt != null && { StartAt: Math.round(input.StartAt.getTime() / 1000) }), - }; + return take(input, { + CronExpressionForRecurrence: [], + Duration: _json, + StartAt: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -5236,534 +5129,163 @@ const se_AutoTuneMaintenanceScheduleList = (input: AutoTuneMaintenanceSchedule[] * serializeAws_restJson1AutoTuneOptions */ const se_AutoTuneOptions = (input: AutoTuneOptions, context: __SerdeContext): any => { - return { - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.MaintenanceSchedules != null && { - MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context), - }), - ...(input.RollbackOnDisable != null && { RollbackOnDisable: input.RollbackOnDisable }), - ...(input.UseOffPeakWindow != null && { UseOffPeakWindow: input.UseOffPeakWindow }), - }; + return take(input, { + DesiredState: [], + MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context), + RollbackOnDisable: [], + UseOffPeakWindow: [], + }); }; /** * serializeAws_restJson1AutoTuneOptionsInput */ const se_AutoTuneOptionsInput = (input: AutoTuneOptionsInput, context: __SerdeContext): any => { - return { - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.MaintenanceSchedules != null && { - MaintenanceSchedules: se_AutoTuneMaintenanceScheduleList(input.MaintenanceSchedules, context), - }), - ...(input.UseOffPeakWindow != null && { UseOffPeakWindow: input.UseOffPeakWindow }), - }; + return take(input, { + DesiredState: [], + MaintenanceSchedules: (_) => se_AutoTuneMaintenanceScheduleList(_, context), + UseOffPeakWindow: [], + }); }; -/** - * serializeAws_restJson1AWSDomainInformation - */ -const se_AWSDomainInformation = (input: AWSDomainInformation, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.Region != null && { Region: input.Region }), - }; -}; +// se_AWSDomainInformation omitted. -/** - * serializeAws_restJson1ClusterConfig - */ -const se_ClusterConfig = (input: ClusterConfig, context: __SerdeContext): any => { - return { - ...(input.ColdStorageOptions != null && { - ColdStorageOptions: se_ColdStorageOptions(input.ColdStorageOptions, context), - }), - ...(input.DedicatedMasterCount != null && { DedicatedMasterCount: input.DedicatedMasterCount }), - ...(input.DedicatedMasterEnabled != null && { DedicatedMasterEnabled: input.DedicatedMasterEnabled }), - ...(input.DedicatedMasterType != null && { DedicatedMasterType: input.DedicatedMasterType }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.WarmCount != null && { WarmCount: input.WarmCount }), - ...(input.WarmEnabled != null && { WarmEnabled: input.WarmEnabled }), - ...(input.WarmType != null && { WarmType: input.WarmType }), - ...(input.ZoneAwarenessConfig != null && { - ZoneAwarenessConfig: se_ZoneAwarenessConfig(input.ZoneAwarenessConfig, context), - }), - ...(input.ZoneAwarenessEnabled != null && { ZoneAwarenessEnabled: input.ZoneAwarenessEnabled }), - }; -}; +// se_ClusterConfig omitted. -/** - * serializeAws_restJson1CognitoOptions - */ -const se_CognitoOptions = (input: CognitoOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.UserPoolId != null && { UserPoolId: input.UserPoolId }), - }; -}; +// se_CognitoOptions omitted. -/** - * serializeAws_restJson1ColdStorageOptions - */ -const se_ColdStorageOptions = (input: ColdStorageOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_ColdStorageOptions omitted. -/** - * serializeAws_restJson1DescribePackagesFilter - */ -const se_DescribePackagesFilter = (input: DescribePackagesFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: se_DescribePackagesFilterValues(input.Value, context) }), - }; -}; +// se_DescribePackagesFilter omitted. -/** - * serializeAws_restJson1DescribePackagesFilterList - */ -const se_DescribePackagesFilterList = (input: DescribePackagesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DescribePackagesFilter(entry, context); - }); -}; +// se_DescribePackagesFilterList omitted. -/** - * serializeAws_restJson1DescribePackagesFilterValues - */ -const se_DescribePackagesFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribePackagesFilterValues omitted. -/** - * serializeAws_restJson1DomainEndpointOptions - */ -const se_DomainEndpointOptions = (input: DomainEndpointOptions, context: __SerdeContext): any => { - return { - ...(input.CustomEndpoint != null && { CustomEndpoint: input.CustomEndpoint }), - ...(input.CustomEndpointCertificateArn != null && { - CustomEndpointCertificateArn: input.CustomEndpointCertificateArn, - }), - ...(input.CustomEndpointEnabled != null && { CustomEndpointEnabled: input.CustomEndpointEnabled }), - ...(input.EnforceHTTPS != null && { EnforceHTTPS: input.EnforceHTTPS }), - ...(input.TLSSecurityPolicy != null && { TLSSecurityPolicy: input.TLSSecurityPolicy }), - }; -}; +// se_DomainEndpointOptions omitted. -/** - * serializeAws_restJson1DomainInformationContainer - */ -const se_DomainInformationContainer = (input: DomainInformationContainer, context: __SerdeContext): any => { - return { - ...(input.AWSDomainInformation != null && { - AWSDomainInformation: se_AWSDomainInformation(input.AWSDomainInformation, context), - }), - }; -}; +// se_DomainInformationContainer omitted. -/** - * serializeAws_restJson1DomainNameList - */ -const se_DomainNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DomainNameList omitted. -/** - * serializeAws_restJson1Duration - */ -const se_Duration = (input: Duration, context: __SerdeContext): any => { - return { - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Duration omitted. -/** - * serializeAws_restJson1EBSOptions - */ -const se_EBSOptions = (input: EBSOptions, context: __SerdeContext): any => { - return { - ...(input.EBSEnabled != null && { EBSEnabled: input.EBSEnabled }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.Throughput != null && { Throughput: input.Throughput }), - ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; +// se_EBSOptions omitted. -/** - * serializeAws_restJson1EncryptionAtRestOptions - */ -const se_EncryptionAtRestOptions = (input: EncryptionAtRestOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; +// se_EncryptionAtRestOptions omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_ValueStringList(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1LogPublishingOption - */ -const se_LogPublishingOption = (input: LogPublishingOption, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_LogPublishingOption omitted. -/** - * serializeAws_restJson1LogPublishingOptions - */ -const se_LogPublishingOptions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [LogType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_LogPublishingOption(value, context); - return acc; - }, {}); -}; +// se_LogPublishingOptions omitted. -/** - * serializeAws_restJson1MasterUserOptions - */ -const se_MasterUserOptions = (input: MasterUserOptions, context: __SerdeContext): any => { - return { - ...(input.MasterUserARN != null && { MasterUserARN: input.MasterUserARN }), - ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }), - ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }), - }; -}; +// se_MasterUserOptions omitted. -/** - * serializeAws_restJson1NodeToNodeEncryptionOptions - */ -const se_NodeToNodeEncryptionOptions = (input: NodeToNodeEncryptionOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_NodeToNodeEncryptionOptions omitted. -/** - * serializeAws_restJson1OffPeakWindow - */ -const se_OffPeakWindow = (input: OffPeakWindow, context: __SerdeContext): any => { - return { - ...(input.WindowStartTime != null && { WindowStartTime: se_WindowStartTime(input.WindowStartTime, context) }), - }; -}; +// se_OffPeakWindow omitted. -/** - * serializeAws_restJson1OffPeakWindowOptions - */ -const se_OffPeakWindowOptions = (input: OffPeakWindowOptions, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.OffPeakWindow != null && { OffPeakWindow: se_OffPeakWindow(input.OffPeakWindow, context) }), - }; -}; +// se_OffPeakWindowOptions omitted. -/** - * serializeAws_restJson1PackageSource - */ -const se_PackageSource = (input: PackageSource, context: __SerdeContext): any => { - return { - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - }; -}; +// se_PackageSource omitted. -/** - * serializeAws_restJson1SAMLIdp - */ -const se_SAMLIdp = (input: SAMLIdp, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.MetadataContent != null && { MetadataContent: input.MetadataContent }), - }; -}; +// se_SAMLIdp omitted. -/** - * serializeAws_restJson1SAMLOptionsInput - */ -const se_SAMLOptionsInput = (input: SAMLOptionsInput, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.Idp != null && { Idp: se_SAMLIdp(input.Idp, context) }), - ...(input.MasterBackendRole != null && { MasterBackendRole: input.MasterBackendRole }), - ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }), - ...(input.RolesKey != null && { RolesKey: input.RolesKey }), - ...(input.SessionTimeoutMinutes != null && { SessionTimeoutMinutes: input.SessionTimeoutMinutes }), - ...(input.SubjectKey != null && { SubjectKey: input.SubjectKey }), - }; -}; +// se_SAMLOptionsInput omitted. -/** - * serializeAws_restJson1SnapshotOptions - */ -const se_SnapshotOptions = (input: SnapshotOptions, context: __SerdeContext): any => { - return { - ...(input.AutomatedSnapshotStartHour != null && { AutomatedSnapshotStartHour: input.AutomatedSnapshotStartHour }), - }; -}; +// se_SnapshotOptions omitted. -/** - * serializeAws_restJson1SoftwareUpdateOptions - */ -const se_SoftwareUpdateOptions = (input: SoftwareUpdateOptions, context: __SerdeContext): any => { - return { - ...(input.AutoSoftwareUpdateEnabled != null && { AutoSoftwareUpdateEnabled: input.AutoSoftwareUpdateEnabled }), - }; -}; +// se_SoftwareUpdateOptions omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1ValueStringList - */ -const se_ValueStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ValueStringList omitted. -/** - * serializeAws_restJson1VpcEndpointIdList - */ -const se_VpcEndpointIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VpcEndpointIdList omitted. -/** - * serializeAws_restJson1VPCOptions - */ -const se_VPCOptions = (input: VPCOptions, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_StringList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_StringList(input.SubnetIds, context) }), - }; -}; +// se_VPCOptions omitted. -/** - * serializeAws_restJson1WindowStartTime - */ -const se_WindowStartTime = (input: WindowStartTime, context: __SerdeContext): any => { - return { - ...(input.Hours != null && { Hours: input.Hours }), - ...(input.Minutes != null && { Minutes: input.Minutes }), - }; -}; +// se_WindowStartTime omitted. -/** - * serializeAws_restJson1ZoneAwarenessConfig - */ -const se_ZoneAwarenessConfig = (input: ZoneAwarenessConfig, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }), - }; -}; +// se_ZoneAwarenessConfig omitted. /** * deserializeAws_restJson1AccessPoliciesStatus */ const de_AccessPoliciesStatus = (output: any, context: __SerdeContext): AccessPoliciesStatus => { - return { - Options: __expectString(output.Options), - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: __expectString, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1AdditionalLimit - */ -const de_AdditionalLimit = (output: any, context: __SerdeContext): AdditionalLimit => { - return { - LimitName: __expectString(output.LimitName), - LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined, - } as any; -}; +// de_AdditionalLimit omitted. -/** - * deserializeAws_restJson1AdditionalLimitList - */ -const de_AdditionalLimitList = (output: any, context: __SerdeContext): AdditionalLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalLimit(entry, context); - }); - return retVal; -}; +// de_AdditionalLimitList omitted. -/** - * deserializeAws_restJson1AdvancedOptions - */ -const de_AdvancedOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AdvancedOptions omitted. /** * deserializeAws_restJson1AdvancedOptionsStatus */ const de_AdvancedOptionsStatus = (output: any, context: __SerdeContext): AdvancedOptionsStatus => { - return { - Options: output.Options != null ? de_AdvancedOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1AdvancedSecurityOptions */ const de_AdvancedSecurityOptions = (output: any, context: __SerdeContext): AdvancedSecurityOptions => { - return { - AnonymousAuthDisableDate: - output.AnonymousAuthDisableDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AnonymousAuthDisableDate))) - : undefined, - AnonymousAuthEnabled: __expectBoolean(output.AnonymousAuthEnabled), - Enabled: __expectBoolean(output.Enabled), - InternalUserDatabaseEnabled: __expectBoolean(output.InternalUserDatabaseEnabled), - SAMLOptions: output.SAMLOptions != null ? de_SAMLOptionsOutput(output.SAMLOptions, context) : undefined, - } as any; + return take(output, { + AnonymousAuthDisableDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AnonymousAuthEnabled: __expectBoolean, + Enabled: __expectBoolean, + InternalUserDatabaseEnabled: __expectBoolean, + SAMLOptions: _json, + }) as any; }; /** * deserializeAws_restJson1AdvancedSecurityOptionsStatus */ const de_AdvancedSecurityOptionsStatus = (output: any, context: __SerdeContext): AdvancedSecurityOptionsStatus => { - return { - Options: output.Options != null ? de_AdvancedSecurityOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: (_: any) => de_AdvancedSecurityOptions(_, context), + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1AuthorizedPrincipal - */ -const de_AuthorizedPrincipal = (output: any, context: __SerdeContext): AuthorizedPrincipal => { - return { - Principal: __expectString(output.Principal), - PrincipalType: __expectString(output.PrincipalType), - } as any; -}; +// de_AuthorizedPrincipal omitted. -/** - * deserializeAws_restJson1AuthorizedPrincipalList - */ -const de_AuthorizedPrincipalList = (output: any, context: __SerdeContext): AuthorizedPrincipal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AuthorizedPrincipal(entry, context); - }); - return retVal; -}; +// de_AuthorizedPrincipalList omitted. /** * deserializeAws_restJson1AutoTune */ const de_AutoTune = (output: any, context: __SerdeContext): AutoTune => { - return { - AutoTuneDetails: output.AutoTuneDetails != null ? de_AutoTuneDetails(output.AutoTuneDetails, context) : undefined, - AutoTuneType: __expectString(output.AutoTuneType), - } as any; + return take(output, { + AutoTuneDetails: (_: any) => de_AutoTuneDetails(_, context), + AutoTuneType: __expectString, + }) as any; }; /** * deserializeAws_restJson1AutoTuneDetails */ const de_AutoTuneDetails = (output: any, context: __SerdeContext): AutoTuneDetails => { - return { - ScheduledAutoTuneDetails: - output.ScheduledAutoTuneDetails != null - ? de_ScheduledAutoTuneDetails(output.ScheduledAutoTuneDetails, context) - : undefined, - } as any; + return take(output, { + ScheduledAutoTuneDetails: (_: any) => de_ScheduledAutoTuneDetails(_, context), + }) as any; }; /** @@ -5773,9 +5295,6 @@ const de_AutoTuneList = (output: any, context: __SerdeContext): AutoTune[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutoTune(entry, context); }); return retVal; @@ -5785,12 +5304,11 @@ const de_AutoTuneList = (output: any, context: __SerdeContext): AutoTune[] => { * deserializeAws_restJson1AutoTuneMaintenanceSchedule */ const de_AutoTuneMaintenanceSchedule = (output: any, context: __SerdeContext): AutoTuneMaintenanceSchedule => { - return { - CronExpressionForRecurrence: __expectString(output.CronExpressionForRecurrence), - Duration: output.Duration != null ? de_Duration(output.Duration, context) : undefined, - StartAt: - output.StartAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartAt))) : undefined, - } as any; + return take(output, { + CronExpressionForRecurrence: __expectString, + Duration: _json, + StartAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5800,9 +5318,6 @@ const de_AutoTuneMaintenanceScheduleList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AutoTuneMaintenanceSchedule(entry, context); }); return retVal; @@ -5812,90 +5327,54 @@ const de_AutoTuneMaintenanceScheduleList = (output: any, context: __SerdeContext * deserializeAws_restJson1AutoTuneOptions */ const de_AutoTuneOptions = (output: any, context: __SerdeContext): AutoTuneOptions => { - return { - DesiredState: __expectString(output.DesiredState), - MaintenanceSchedules: - output.MaintenanceSchedules != null - ? de_AutoTuneMaintenanceScheduleList(output.MaintenanceSchedules, context) - : undefined, - RollbackOnDisable: __expectString(output.RollbackOnDisable), - UseOffPeakWindow: __expectBoolean(output.UseOffPeakWindow), - } as any; + return take(output, { + DesiredState: __expectString, + MaintenanceSchedules: (_: any) => de_AutoTuneMaintenanceScheduleList(_, context), + RollbackOnDisable: __expectString, + UseOffPeakWindow: __expectBoolean, + }) as any; }; -/** - * deserializeAws_restJson1AutoTuneOptionsOutput - */ -const de_AutoTuneOptionsOutput = (output: any, context: __SerdeContext): AutoTuneOptionsOutput => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - State: __expectString(output.State), - UseOffPeakWindow: __expectBoolean(output.UseOffPeakWindow), - } as any; -}; +// de_AutoTuneOptionsOutput omitted. /** * deserializeAws_restJson1AutoTuneOptionsStatus */ const de_AutoTuneOptionsStatus = (output: any, context: __SerdeContext): AutoTuneOptionsStatus => { - return { - Options: output.Options != null ? de_AutoTuneOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_AutoTuneStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: (_: any) => de_AutoTuneOptions(_, context), + Status: (_: any) => de_AutoTuneStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1AutoTuneStatus */ const de_AutoTuneStatus = (output: any, context: __SerdeContext): AutoTuneStatus => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - PendingDeletion: __expectBoolean(output.PendingDeletion), - State: __expectString(output.State), - UpdateDate: - output.UpdateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDate))) : undefined, - UpdateVersion: __expectInt32(output.UpdateVersion), - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorMessage: __expectString, + PendingDeletion: __expectBoolean, + State: __expectString, + UpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdateVersion: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1AWSDomainInformation - */ -const de_AWSDomainInformation = (output: any, context: __SerdeContext): AWSDomainInformation => { - return { - DomainName: __expectString(output.DomainName), - OwnerId: __expectString(output.OwnerId), - Region: __expectString(output.Region), - } as any; -}; +// de_AWSDomainInformation omitted. -/** - * deserializeAws_restJson1ChangeProgressDetails - */ -const de_ChangeProgressDetails = (output: any, context: __SerdeContext): ChangeProgressDetails => { - return { - ChangeId: __expectString(output.ChangeId), - Message: __expectString(output.Message), - } as any; -}; +// de_ChangeProgressDetails omitted. /** * deserializeAws_restJson1ChangeProgressStage */ const de_ChangeProgressStage = (output: any, context: __SerdeContext): ChangeProgressStage => { - return { - Description: __expectString(output.Description), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + Description: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; /** @@ -5905,9 +5384,6 @@ const de_ChangeProgressStageList = (output: any, context: __SerdeContext): Chang const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ChangeProgressStage(entry, context); }); return retVal; @@ -5917,246 +5393,107 @@ const de_ChangeProgressStageList = (output: any, context: __SerdeContext): Chang * deserializeAws_restJson1ChangeProgressStatusDetails */ const de_ChangeProgressStatusDetails = (output: any, context: __SerdeContext): ChangeProgressStatusDetails => { - return { - ChangeId: __expectString(output.ChangeId), - ChangeProgressStages: - output.ChangeProgressStages != null - ? de_ChangeProgressStageList(output.ChangeProgressStages, context) - : undefined, - CompletedProperties: - output.CompletedProperties != null ? de_StringList(output.CompletedProperties, context) : undefined, - PendingProperties: output.PendingProperties != null ? de_StringList(output.PendingProperties, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - TotalNumberOfStages: __expectInt32(output.TotalNumberOfStages), - } as any; -}; - -/** - * deserializeAws_restJson1ClusterConfig - */ -const de_ClusterConfig = (output: any, context: __SerdeContext): ClusterConfig => { - return { - ColdStorageOptions: - output.ColdStorageOptions != null ? de_ColdStorageOptions(output.ColdStorageOptions, context) : undefined, - DedicatedMasterCount: __expectInt32(output.DedicatedMasterCount), - DedicatedMasterEnabled: __expectBoolean(output.DedicatedMasterEnabled), - DedicatedMasterType: __expectString(output.DedicatedMasterType), - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - WarmCount: __expectInt32(output.WarmCount), - WarmEnabled: __expectBoolean(output.WarmEnabled), - WarmType: __expectString(output.WarmType), - ZoneAwarenessConfig: - output.ZoneAwarenessConfig != null ? de_ZoneAwarenessConfig(output.ZoneAwarenessConfig, context) : undefined, - ZoneAwarenessEnabled: __expectBoolean(output.ZoneAwarenessEnabled), - } as any; + return take(output, { + ChangeId: __expectString, + ChangeProgressStages: (_: any) => de_ChangeProgressStageList(_, context), + CompletedProperties: _json, + PendingProperties: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + TotalNumberOfStages: __expectInt32, + }) as any; }; +// de_ClusterConfig omitted. + /** * deserializeAws_restJson1ClusterConfigStatus */ const de_ClusterConfigStatus = (output: any, context: __SerdeContext): ClusterConfigStatus => { - return { - Options: output.Options != null ? de_ClusterConfig(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1CognitoOptions - */ -const de_CognitoOptions = (output: any, context: __SerdeContext): CognitoOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - IdentityPoolId: __expectString(output.IdentityPoolId), - RoleArn: __expectString(output.RoleArn), - UserPoolId: __expectString(output.UserPoolId), - } as any; -}; +// de_CognitoOptions omitted. /** * deserializeAws_restJson1CognitoOptionsStatus */ const de_CognitoOptionsStatus = (output: any, context: __SerdeContext): CognitoOptionsStatus => { - return { - Options: output.Options != null ? de_CognitoOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1ColdStorageOptions - */ -const de_ColdStorageOptions = (output: any, context: __SerdeContext): ColdStorageOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_ColdStorageOptions omitted. -/** - * deserializeAws_restJson1CompatibleVersionsList - */ -const de_CompatibleVersionsList = (output: any, context: __SerdeContext): CompatibleVersionsMap[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CompatibleVersionsMap(entry, context); - }); - return retVal; -}; +// de_CompatibleVersionsList omitted. -/** - * deserializeAws_restJson1CompatibleVersionsMap - */ -const de_CompatibleVersionsMap = (output: any, context: __SerdeContext): CompatibleVersionsMap => { - return { - SourceVersion: __expectString(output.SourceVersion), - TargetVersions: output.TargetVersions != null ? de_VersionList(output.TargetVersions, context) : undefined, - } as any; -}; +// de_CompatibleVersionsMap omitted. -/** - * deserializeAws_restJson1ConnectionProperties - */ -const de_ConnectionProperties = (output: any, context: __SerdeContext): ConnectionProperties => { - return { - Endpoint: __expectString(output.Endpoint), - } as any; -}; +// de_ConnectionProperties omitted. /** * deserializeAws_restJson1DomainConfig */ const de_DomainConfig = (output: any, context: __SerdeContext): DomainConfig => { - return { - AccessPolicies: output.AccessPolicies != null ? de_AccessPoliciesStatus(output.AccessPolicies, context) : undefined, - AdvancedOptions: - output.AdvancedOptions != null ? de_AdvancedOptionsStatus(output.AdvancedOptions, context) : undefined, - AdvancedSecurityOptions: - output.AdvancedSecurityOptions != null - ? de_AdvancedSecurityOptionsStatus(output.AdvancedSecurityOptions, context) - : undefined, - AutoTuneOptions: - output.AutoTuneOptions != null ? de_AutoTuneOptionsStatus(output.AutoTuneOptions, context) : undefined, - ChangeProgressDetails: - output.ChangeProgressDetails != null - ? de_ChangeProgressDetails(output.ChangeProgressDetails, context) - : undefined, - ClusterConfig: output.ClusterConfig != null ? de_ClusterConfigStatus(output.ClusterConfig, context) : undefined, - CognitoOptions: output.CognitoOptions != null ? de_CognitoOptionsStatus(output.CognitoOptions, context) : undefined, - DomainEndpointOptions: - output.DomainEndpointOptions != null - ? de_DomainEndpointOptionsStatus(output.DomainEndpointOptions, context) - : undefined, - EBSOptions: output.EBSOptions != null ? de_EBSOptionsStatus(output.EBSOptions, context) : undefined, - EncryptionAtRestOptions: - output.EncryptionAtRestOptions != null - ? de_EncryptionAtRestOptionsStatus(output.EncryptionAtRestOptions, context) - : undefined, - EngineVersion: output.EngineVersion != null ? de_VersionStatus(output.EngineVersion, context) : undefined, - LogPublishingOptions: - output.LogPublishingOptions != null - ? de_LogPublishingOptionsStatus(output.LogPublishingOptions, context) - : undefined, - NodeToNodeEncryptionOptions: - output.NodeToNodeEncryptionOptions != null - ? de_NodeToNodeEncryptionOptionsStatus(output.NodeToNodeEncryptionOptions, context) - : undefined, - OffPeakWindowOptions: - output.OffPeakWindowOptions != null - ? de_OffPeakWindowOptionsStatus(output.OffPeakWindowOptions, context) - : undefined, - SnapshotOptions: - output.SnapshotOptions != null ? de_SnapshotOptionsStatus(output.SnapshotOptions, context) : undefined, - SoftwareUpdateOptions: - output.SoftwareUpdateOptions != null - ? de_SoftwareUpdateOptionsStatus(output.SoftwareUpdateOptions, context) - : undefined, - VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfoStatus(output.VPCOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DomainEndpointOptions - */ -const de_DomainEndpointOptions = (output: any, context: __SerdeContext): DomainEndpointOptions => { - return { - CustomEndpoint: __expectString(output.CustomEndpoint), - CustomEndpointCertificateArn: __expectString(output.CustomEndpointCertificateArn), - CustomEndpointEnabled: __expectBoolean(output.CustomEndpointEnabled), - EnforceHTTPS: __expectBoolean(output.EnforceHTTPS), - TLSSecurityPolicy: __expectString(output.TLSSecurityPolicy), - } as any; -}; + return take(output, { + AccessPolicies: (_: any) => de_AccessPoliciesStatus(_, context), + AdvancedOptions: (_: any) => de_AdvancedOptionsStatus(_, context), + AdvancedSecurityOptions: (_: any) => de_AdvancedSecurityOptionsStatus(_, context), + AutoTuneOptions: (_: any) => de_AutoTuneOptionsStatus(_, context), + ChangeProgressDetails: _json, + ClusterConfig: (_: any) => de_ClusterConfigStatus(_, context), + CognitoOptions: (_: any) => de_CognitoOptionsStatus(_, context), + DomainEndpointOptions: (_: any) => de_DomainEndpointOptionsStatus(_, context), + EBSOptions: (_: any) => de_EBSOptionsStatus(_, context), + EncryptionAtRestOptions: (_: any) => de_EncryptionAtRestOptionsStatus(_, context), + EngineVersion: (_: any) => de_VersionStatus(_, context), + LogPublishingOptions: (_: any) => de_LogPublishingOptionsStatus(_, context), + NodeToNodeEncryptionOptions: (_: any) => de_NodeToNodeEncryptionOptionsStatus(_, context), + OffPeakWindowOptions: (_: any) => de_OffPeakWindowOptionsStatus(_, context), + SnapshotOptions: (_: any) => de_SnapshotOptionsStatus(_, context), + SoftwareUpdateOptions: (_: any) => de_SoftwareUpdateOptionsStatus(_, context), + VPCOptions: (_: any) => de_VPCDerivedInfoStatus(_, context), + }) as any; +}; + +// de_DomainEndpointOptions omitted. /** * deserializeAws_restJson1DomainEndpointOptionsStatus */ const de_DomainEndpointOptionsStatus = (output: any, context: __SerdeContext): DomainEndpointOptionsStatus => { - return { - Options: output.Options != null ? de_DomainEndpointOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1DomainInfo - */ -const de_DomainInfo = (output: any, context: __SerdeContext): DomainInfo => { - return { - DomainName: __expectString(output.DomainName), - EngineType: __expectString(output.EngineType), - } as any; -}; +// de_DomainInfo omitted. -/** - * deserializeAws_restJson1DomainInfoList - */ -const de_DomainInfoList = (output: any, context: __SerdeContext): DomainInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainInfo(entry, context); - }); - return retVal; -}; +// de_DomainInfoList omitted. -/** - * deserializeAws_restJson1DomainInformationContainer - */ -const de_DomainInformationContainer = (output: any, context: __SerdeContext): DomainInformationContainer => { - return { - AWSDomainInformation: - output.AWSDomainInformation != null ? de_AWSDomainInformation(output.AWSDomainInformation, context) : undefined, - } as any; -}; +// de_DomainInformationContainer omitted. /** * deserializeAws_restJson1DomainPackageDetails */ const de_DomainPackageDetails = (output: any, context: __SerdeContext): DomainPackageDetails => { - return { - DomainName: __expectString(output.DomainName), - DomainPackageStatus: __expectString(output.DomainPackageStatus), - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - PackageID: __expectString(output.PackageID), - PackageName: __expectString(output.PackageName), - PackageType: __expectString(output.PackageType), - PackageVersion: __expectString(output.PackageVersion), - ReferencePath: __expectString(output.ReferencePath), - } as any; + return take(output, { + DomainName: __expectString, + DomainPackageStatus: __expectString, + ErrorDetails: _json, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageID: __expectString, + PackageName: __expectString, + PackageType: __expectString, + PackageVersion: __expectString, + ReferencePath: __expectString, + }) as any; }; /** @@ -6166,9 +5503,6 @@ const de_DomainPackageDetailsList = (output: any, context: __SerdeContext): Doma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainPackageDetails(entry, context); }); return retVal; @@ -6178,59 +5512,35 @@ const de_DomainPackageDetailsList = (output: any, context: __SerdeContext): Doma * deserializeAws_restJson1DomainStatus */ const de_DomainStatus = (output: any, context: __SerdeContext): DomainStatus => { - return { - ARN: __expectString(output.ARN), - AccessPolicies: __expectString(output.AccessPolicies), - AdvancedOptions: output.AdvancedOptions != null ? de_AdvancedOptions(output.AdvancedOptions, context) : undefined, - AdvancedSecurityOptions: - output.AdvancedSecurityOptions != null - ? de_AdvancedSecurityOptions(output.AdvancedSecurityOptions, context) - : undefined, - AutoTuneOptions: - output.AutoTuneOptions != null ? de_AutoTuneOptionsOutput(output.AutoTuneOptions, context) : undefined, - ChangeProgressDetails: - output.ChangeProgressDetails != null - ? de_ChangeProgressDetails(output.ChangeProgressDetails, context) - : undefined, - ClusterConfig: output.ClusterConfig != null ? de_ClusterConfig(output.ClusterConfig, context) : undefined, - CognitoOptions: output.CognitoOptions != null ? de_CognitoOptions(output.CognitoOptions, context) : undefined, - Created: __expectBoolean(output.Created), - Deleted: __expectBoolean(output.Deleted), - DomainEndpointOptions: - output.DomainEndpointOptions != null - ? de_DomainEndpointOptions(output.DomainEndpointOptions, context) - : undefined, - DomainId: __expectString(output.DomainId), - DomainName: __expectString(output.DomainName), - EBSOptions: output.EBSOptions != null ? de_EBSOptions(output.EBSOptions, context) : undefined, - EncryptionAtRestOptions: - output.EncryptionAtRestOptions != null - ? de_EncryptionAtRestOptions(output.EncryptionAtRestOptions, context) - : undefined, - Endpoint: __expectString(output.Endpoint), - Endpoints: output.Endpoints != null ? de_EndpointsMap(output.Endpoints, context) : undefined, - EngineVersion: __expectString(output.EngineVersion), - LogPublishingOptions: - output.LogPublishingOptions != null ? de_LogPublishingOptions(output.LogPublishingOptions, context) : undefined, - NodeToNodeEncryptionOptions: - output.NodeToNodeEncryptionOptions != null - ? de_NodeToNodeEncryptionOptions(output.NodeToNodeEncryptionOptions, context) - : undefined, - OffPeakWindowOptions: - output.OffPeakWindowOptions != null ? de_OffPeakWindowOptions(output.OffPeakWindowOptions, context) : undefined, - Processing: __expectBoolean(output.Processing), - ServiceSoftwareOptions: - output.ServiceSoftwareOptions != null - ? de_ServiceSoftwareOptions(output.ServiceSoftwareOptions, context) - : undefined, - SnapshotOptions: output.SnapshotOptions != null ? de_SnapshotOptions(output.SnapshotOptions, context) : undefined, - SoftwareUpdateOptions: - output.SoftwareUpdateOptions != null - ? de_SoftwareUpdateOptions(output.SoftwareUpdateOptions, context) - : undefined, - UpgradeProcessing: __expectBoolean(output.UpgradeProcessing), - VPCOptions: output.VPCOptions != null ? de_VPCDerivedInfo(output.VPCOptions, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + AccessPolicies: __expectString, + AdvancedOptions: _json, + AdvancedSecurityOptions: (_: any) => de_AdvancedSecurityOptions(_, context), + AutoTuneOptions: _json, + ChangeProgressDetails: _json, + ClusterConfig: _json, + CognitoOptions: _json, + Created: __expectBoolean, + Deleted: __expectBoolean, + DomainEndpointOptions: _json, + DomainId: __expectString, + DomainName: __expectString, + EBSOptions: _json, + EncryptionAtRestOptions: _json, + Endpoint: __expectString, + Endpoints: _json, + EngineVersion: __expectString, + LogPublishingOptions: _json, + NodeToNodeEncryptionOptions: _json, + OffPeakWindowOptions: _json, + Processing: __expectBoolean, + ServiceSoftwareOptions: (_: any) => de_ServiceSoftwareOptions(_, context), + SnapshotOptions: _json, + SoftwareUpdateOptions: _json, + UpgradeProcessing: __expectBoolean, + VPCOptions: _json, + }) as any; }; /** @@ -6240,319 +5550,84 @@ const de_DomainStatusList = (output: any, context: __SerdeContext): DomainStatus const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DryRunProgressStatus - */ -const de_DryRunProgressStatus = (output: any, context: __SerdeContext): DryRunProgressStatus => { - return { - CreationDate: __expectString(output.CreationDate), - DryRunId: __expectString(output.DryRunId), - DryRunStatus: __expectString(output.DryRunStatus), - UpdateDate: __expectString(output.UpdateDate), - ValidationFailures: - output.ValidationFailures != null ? de_ValidationFailures(output.ValidationFailures, context) : undefined, - } as any; -}; +// de_DryRunProgressStatus omitted. -/** - * deserializeAws_restJson1DryRunResults - */ -const de_DryRunResults = (output: any, context: __SerdeContext): DryRunResults => { - return { - DeploymentType: __expectString(output.DeploymentType), - Message: __expectString(output.Message), - } as any; -}; +// de_DryRunResults omitted. -/** - * deserializeAws_restJson1Duration - */ -const de_Duration = (output: any, context: __SerdeContext): Duration => { - return { - Unit: __expectString(output.Unit), - Value: __expectLong(output.Value), - } as any; -}; +// de_Duration omitted. -/** - * deserializeAws_restJson1EBSOptions - */ -const de_EBSOptions = (output: any, context: __SerdeContext): EBSOptions => { - return { - EBSEnabled: __expectBoolean(output.EBSEnabled), - Iops: __expectInt32(output.Iops), - Throughput: __expectInt32(output.Throughput), - VolumeSize: __expectInt32(output.VolumeSize), - VolumeType: __expectString(output.VolumeType), - } as any; -}; +// de_EBSOptions omitted. /** * deserializeAws_restJson1EBSOptionsStatus */ const de_EBSOptionsStatus = (output: any, context: __SerdeContext): EBSOptionsStatus => { - return { - Options: output.Options != null ? de_EBSOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1EncryptionAtRestOptions - */ -const de_EncryptionAtRestOptions = (output: any, context: __SerdeContext): EncryptionAtRestOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// de_EncryptionAtRestOptions omitted. /** * deserializeAws_restJson1EncryptionAtRestOptionsStatus */ const de_EncryptionAtRestOptionsStatus = (output: any, context: __SerdeContext): EncryptionAtRestOptionsStatus => { - return { - Options: output.Options != null ? de_EncryptionAtRestOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1EndpointsMap - */ -const de_EndpointsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EndpointsMap omitted. -/** - * deserializeAws_restJson1ErrorDetails - */ -const de_ErrorDetails = (output: any, context: __SerdeContext): ErrorDetails => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - ErrorType: __expectString(output.ErrorType), - } as any; -}; +// de_ErrorDetails omitted. -/** - * deserializeAws_restJson1InboundConnection - */ -const de_InboundConnection = (output: any, context: __SerdeContext): InboundConnection => { - return { - ConnectionId: __expectString(output.ConnectionId), - ConnectionMode: __expectString(output.ConnectionMode), - ConnectionStatus: - output.ConnectionStatus != null ? de_InboundConnectionStatus(output.ConnectionStatus, context) : undefined, - LocalDomainInfo: - output.LocalDomainInfo != null ? de_DomainInformationContainer(output.LocalDomainInfo, context) : undefined, - RemoteDomainInfo: - output.RemoteDomainInfo != null ? de_DomainInformationContainer(output.RemoteDomainInfo, context) : undefined, - } as any; -}; +// de_InboundConnection omitted. -/** - * deserializeAws_restJson1InboundConnections - */ -const de_InboundConnections = (output: any, context: __SerdeContext): InboundConnection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InboundConnection(entry, context); - }); - return retVal; -}; +// de_InboundConnections omitted. -/** - * deserializeAws_restJson1InboundConnectionStatus - */ -const de_InboundConnectionStatus = (output: any, context: __SerdeContext): InboundConnectionStatus => { - return { - Message: __expectString(output.Message), - StatusCode: __expectString(output.StatusCode), - } as any; -}; +// de_InboundConnectionStatus omitted. -/** - * deserializeAws_restJson1InstanceCountLimits - */ -const de_InstanceCountLimits = (output: any, context: __SerdeContext): InstanceCountLimits => { - return { - MaximumInstanceCount: __expectInt32(output.MaximumInstanceCount), - MinimumInstanceCount: __expectInt32(output.MinimumInstanceCount), - } as any; -}; +// de_InstanceCountLimits omitted. -/** - * deserializeAws_restJson1InstanceLimits - */ -const de_InstanceLimits = (output: any, context: __SerdeContext): InstanceLimits => { - return { - InstanceCountLimits: - output.InstanceCountLimits != null ? de_InstanceCountLimits(output.InstanceCountLimits, context) : undefined, - } as any; -}; +// de_InstanceLimits omitted. -/** - * deserializeAws_restJson1InstanceRoleList - */ -const de_InstanceRoleList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_InstanceRoleList omitted. -/** - * deserializeAws_restJson1InstanceTypeDetails - */ -const de_InstanceTypeDetails = (output: any, context: __SerdeContext): InstanceTypeDetails => { - return { - AdvancedSecurityEnabled: __expectBoolean(output.AdvancedSecurityEnabled), - AppLogsEnabled: __expectBoolean(output.AppLogsEnabled), - CognitoEnabled: __expectBoolean(output.CognitoEnabled), - EncryptionEnabled: __expectBoolean(output.EncryptionEnabled), - InstanceRole: output.InstanceRole != null ? de_InstanceRoleList(output.InstanceRole, context) : undefined, - InstanceType: __expectString(output.InstanceType), - WarmEnabled: __expectBoolean(output.WarmEnabled), - } as any; -}; +// de_InstanceTypeDetails omitted. -/** - * deserializeAws_restJson1InstanceTypeDetailsList - */ -const de_InstanceTypeDetailsList = (output: any, context: __SerdeContext): InstanceTypeDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceTypeDetails(entry, context); - }); - return retVal; -}; +// de_InstanceTypeDetailsList omitted. -/** - * deserializeAws_restJson1Issues - */ -const de_Issues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Issues omitted. -/** - * deserializeAws_restJson1Limits - */ -const de_Limits = (output: any, context: __SerdeContext): Limits => { - return { - AdditionalLimits: - output.AdditionalLimits != null ? de_AdditionalLimitList(output.AdditionalLimits, context) : undefined, - InstanceLimits: output.InstanceLimits != null ? de_InstanceLimits(output.InstanceLimits, context) : undefined, - StorageTypes: output.StorageTypes != null ? de_StorageTypeList(output.StorageTypes, context) : undefined, - } as any; -}; +// de_Limits omitted. -/** - * deserializeAws_restJson1LimitsByRole - */ -const de_LimitsByRole = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Limits(value, context); - return acc; - }, {}); -}; +// de_LimitsByRole omitted. -/** - * deserializeAws_restJson1LimitValueList - */ -const de_LimitValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LimitValueList omitted. -/** - * deserializeAws_restJson1LogPublishingOption - */ -const de_LogPublishingOption = (output: any, context: __SerdeContext): LogPublishingOption => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_LogPublishingOption omitted. -/** - * deserializeAws_restJson1LogPublishingOptions - */ -const de_LogPublishingOptions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [LogType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_LogPublishingOption(value, context); - return acc; - }, - {} - ); -}; +// de_LogPublishingOptions omitted. /** * deserializeAws_restJson1LogPublishingOptionsStatus */ const de_LogPublishingOptionsStatus = (output: any, context: __SerdeContext): LogPublishingOptionsStatus => { - return { - Options: output.Options != null ? de_LogPublishingOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1NodeToNodeEncryptionOptions - */ -const de_NodeToNodeEncryptionOptions = (output: any, context: __SerdeContext): NodeToNodeEncryptionOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// de_NodeToNodeEncryptionOptions omitted. /** * deserializeAws_restJson1NodeToNodeEncryptionOptionsStatus @@ -6561,121 +5636,60 @@ const de_NodeToNodeEncryptionOptionsStatus = ( output: any, context: __SerdeContext ): NodeToNodeEncryptionOptionsStatus => { - return { - Options: output.Options != null ? de_NodeToNodeEncryptionOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1OffPeakWindow - */ -const de_OffPeakWindow = (output: any, context: __SerdeContext): OffPeakWindow => { - return { - WindowStartTime: output.WindowStartTime != null ? de_WindowStartTime(output.WindowStartTime, context) : undefined, - } as any; -}; +// de_OffPeakWindow omitted. -/** - * deserializeAws_restJson1OffPeakWindowOptions - */ -const de_OffPeakWindowOptions = (output: any, context: __SerdeContext): OffPeakWindowOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - OffPeakWindow: output.OffPeakWindow != null ? de_OffPeakWindow(output.OffPeakWindow, context) : undefined, - } as any; -}; +// de_OffPeakWindowOptions omitted. /** * deserializeAws_restJson1OffPeakWindowOptionsStatus */ const de_OffPeakWindowOptionsStatus = (output: any, context: __SerdeContext): OffPeakWindowOptionsStatus => { - return { - Options: output.Options != null ? de_OffPeakWindowOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; /** * deserializeAws_restJson1OptionStatus */ const de_OptionStatus = (output: any, context: __SerdeContext): OptionStatus => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - PendingDeletion: __expectBoolean(output.PendingDeletion), - State: __expectString(output.State), - UpdateDate: - output.UpdateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDate))) : undefined, - UpdateVersion: __expectInt32(output.UpdateVersion), - } as any; -}; - -/** - * deserializeAws_restJson1OutboundConnection - */ -const de_OutboundConnection = (output: any, context: __SerdeContext): OutboundConnection => { - return { - ConnectionAlias: __expectString(output.ConnectionAlias), - ConnectionId: __expectString(output.ConnectionId), - ConnectionMode: __expectString(output.ConnectionMode), - ConnectionProperties: - output.ConnectionProperties != null ? de_ConnectionProperties(output.ConnectionProperties, context) : undefined, - ConnectionStatus: - output.ConnectionStatus != null ? de_OutboundConnectionStatus(output.ConnectionStatus, context) : undefined, - LocalDomainInfo: - output.LocalDomainInfo != null ? de_DomainInformationContainer(output.LocalDomainInfo, context) : undefined, - RemoteDomainInfo: - output.RemoteDomainInfo != null ? de_DomainInformationContainer(output.RemoteDomainInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1OutboundConnections - */ -const de_OutboundConnections = (output: any, context: __SerdeContext): OutboundConnection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutboundConnection(entry, context); - }); - return retVal; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PendingDeletion: __expectBoolean, + State: __expectString, + UpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UpdateVersion: __expectInt32, + }) as any; }; -/** - * deserializeAws_restJson1OutboundConnectionStatus - */ -const de_OutboundConnectionStatus = (output: any, context: __SerdeContext): OutboundConnectionStatus => { - return { - Message: __expectString(output.Message), - StatusCode: __expectString(output.StatusCode), - } as any; -}; +// de_OutboundConnection omitted. + +// de_OutboundConnections omitted. + +// de_OutboundConnectionStatus omitted. /** * deserializeAws_restJson1PackageDetails */ const de_PackageDetails = (output: any, context: __SerdeContext): PackageDetails => { - return { - AvailablePackageVersion: __expectString(output.AvailablePackageVersion), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ErrorDetails: output.ErrorDetails != null ? de_ErrorDetails(output.ErrorDetails, context) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - PackageDescription: __expectString(output.PackageDescription), - PackageID: __expectString(output.PackageID), - PackageName: __expectString(output.PackageName), - PackageStatus: __expectString(output.PackageStatus), - PackageType: __expectString(output.PackageType), - } as any; + return take(output, { + AvailablePackageVersion: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorDetails: _json, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageDescription: __expectString, + PackageID: __expectString, + PackageName: __expectString, + PackageStatus: __expectString, + PackageType: __expectString, + }) as any; }; /** @@ -6685,9 +5699,6 @@ const de_PackageDetailsList = (output: any, context: __SerdeContext): PackageDet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageDetails(entry, context); }); return retVal; @@ -6697,12 +5708,11 @@ const de_PackageDetailsList = (output: any, context: __SerdeContext): PackageDet * deserializeAws_restJson1PackageVersionHistory */ const de_PackageVersionHistory = (output: any, context: __SerdeContext): PackageVersionHistory => { - return { - CommitMessage: __expectString(output.CommitMessage), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - PackageVersion: __expectString(output.PackageVersion), - } as any; + return take(output, { + CommitMessage: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageVersion: __expectString, + }) as any; }; /** @@ -6712,9 +5722,6 @@ const de_PackageVersionHistoryList = (output: any, context: __SerdeContext): Pac const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageVersionHistory(entry, context); }); return retVal; @@ -6724,10 +5731,10 @@ const de_PackageVersionHistoryList = (output: any, context: __SerdeContext): Pac * deserializeAws_restJson1RecurringCharge */ const de_RecurringCharge = (output: any, context: __SerdeContext): RecurringCharge => { - return { - RecurringChargeAmount: __limitedParseDouble(output.RecurringChargeAmount), - RecurringChargeFrequency: __expectString(output.RecurringChargeFrequency), - } as any; + return take(output, { + RecurringChargeAmount: __limitedParseDouble, + RecurringChargeFrequency: __expectString, + }) as any; }; /** @@ -6737,9 +5744,6 @@ const de_RecurringChargeList = (output: any, context: __SerdeContext): Recurring const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecurringCharge(entry, context); }); return retVal; @@ -6749,24 +5753,22 @@ const de_RecurringChargeList = (output: any, context: __SerdeContext): Recurring * deserializeAws_restJson1ReservedInstance */ const de_ReservedInstance = (output: any, context: __SerdeContext): ReservedInstance => { - return { - BillingSubscriptionId: __expectLong(output.BillingSubscriptionId), - CurrencyCode: __expectString(output.CurrencyCode), - Duration: __expectInt32(output.Duration), - FixedPrice: __limitedParseDouble(output.FixedPrice), - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - PaymentOption: __expectString(output.PaymentOption), - RecurringCharges: - output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined, - ReservationName: __expectString(output.ReservationName), - ReservedInstanceId: __expectString(output.ReservedInstanceId), - ReservedInstanceOfferingId: __expectString(output.ReservedInstanceOfferingId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - UsagePrice: __limitedParseDouble(output.UsagePrice), - } as any; + return take(output, { + BillingSubscriptionId: __expectLong, + CurrencyCode: __expectString, + Duration: __expectInt32, + FixedPrice: __limitedParseDouble, + InstanceCount: __expectInt32, + InstanceType: __expectString, + PaymentOption: __expectString, + RecurringCharges: (_: any) => de_RecurringChargeList(_, context), + ReservationName: __expectString, + ReservedInstanceId: __expectString, + ReservedInstanceOfferingId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + UsagePrice: __limitedParseDouble, + }) as any; }; /** @@ -6776,9 +5778,6 @@ const de_ReservedInstanceList = (output: any, context: __SerdeContext): Reserved const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReservedInstance(entry, context); }); return retVal; @@ -6788,17 +5787,16 @@ const de_ReservedInstanceList = (output: any, context: __SerdeContext): Reserved * deserializeAws_restJson1ReservedInstanceOffering */ const de_ReservedInstanceOffering = (output: any, context: __SerdeContext): ReservedInstanceOffering => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - Duration: __expectInt32(output.Duration), - FixedPrice: __limitedParseDouble(output.FixedPrice), - InstanceType: __expectString(output.InstanceType), - PaymentOption: __expectString(output.PaymentOption), - RecurringCharges: - output.RecurringCharges != null ? de_RecurringChargeList(output.RecurringCharges, context) : undefined, - ReservedInstanceOfferingId: __expectString(output.ReservedInstanceOfferingId), - UsagePrice: __limitedParseDouble(output.UsagePrice), - } as any; + return take(output, { + CurrencyCode: __expectString, + Duration: __expectInt32, + FixedPrice: __limitedParseDouble, + InstanceType: __expectString, + PaymentOption: __expectString, + RecurringCharges: (_: any) => de_RecurringChargeList(_, context), + ReservedInstanceOfferingId: __expectString, + UsagePrice: __limitedParseDouble, + }) as any; }; /** @@ -6808,258 +5806,97 @@ const de_ReservedInstanceOfferingList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReservedInstanceOffering(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SAMLIdp - */ -const de_SAMLIdp = (output: any, context: __SerdeContext): SAMLIdp => { - return { - EntityId: __expectString(output.EntityId), - MetadataContent: __expectString(output.MetadataContent), - } as any; -}; +// de_SAMLIdp omitted. -/** - * deserializeAws_restJson1SAMLOptionsOutput - */ -const de_SAMLOptionsOutput = (output: any, context: __SerdeContext): SAMLOptionsOutput => { - return { - Enabled: __expectBoolean(output.Enabled), - Idp: output.Idp != null ? de_SAMLIdp(output.Idp, context) : undefined, - RolesKey: __expectString(output.RolesKey), - SessionTimeoutMinutes: __expectInt32(output.SessionTimeoutMinutes), - SubjectKey: __expectString(output.SubjectKey), - } as any; -}; +// de_SAMLOptionsOutput omitted. -/** - * deserializeAws_restJson1ScheduledAction - */ -const de_ScheduledAction = (output: any, context: __SerdeContext): ScheduledAction => { - return { - Cancellable: __expectBoolean(output.Cancellable), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Mandatory: __expectBoolean(output.Mandatory), - ScheduledBy: __expectString(output.ScheduledBy), - ScheduledTime: __expectLong(output.ScheduledTime), - Severity: __expectString(output.Severity), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; +// de_ScheduledAction omitted. -/** - * deserializeAws_restJson1ScheduledActionsList - */ -const de_ScheduledActionsList = (output: any, context: __SerdeContext): ScheduledAction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ScheduledAction(entry, context); - }); - return retVal; -}; +// de_ScheduledActionsList omitted. /** * deserializeAws_restJson1ScheduledAutoTuneDetails */ const de_ScheduledAutoTuneDetails = (output: any, context: __SerdeContext): ScheduledAutoTuneDetails => { - return { - Action: __expectString(output.Action), - ActionType: __expectString(output.ActionType), - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - Severity: __expectString(output.Severity), - } as any; + return take(output, { + Action: __expectString, + ActionType: __expectString, + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Severity: __expectString, + }) as any; }; /** * deserializeAws_restJson1ServiceSoftwareOptions */ const de_ServiceSoftwareOptions = (output: any, context: __SerdeContext): ServiceSoftwareOptions => { - return { - AutomatedUpdateDate: - output.AutomatedUpdateDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AutomatedUpdateDate))) - : undefined, - Cancellable: __expectBoolean(output.Cancellable), - CurrentVersion: __expectString(output.CurrentVersion), - Description: __expectString(output.Description), - NewVersion: __expectString(output.NewVersion), - OptionalDeployment: __expectBoolean(output.OptionalDeployment), - UpdateAvailable: __expectBoolean(output.UpdateAvailable), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; + return take(output, { + AutomatedUpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Cancellable: __expectBoolean, + CurrentVersion: __expectString, + Description: __expectString, + NewVersion: __expectString, + OptionalDeployment: __expectBoolean, + UpdateAvailable: __expectBoolean, + UpdateStatus: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SlotList - */ -const de_SlotList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; - }); - return retVal; -}; +// de_SlotList omitted. -/** - * deserializeAws_restJson1SnapshotOptions - */ -const de_SnapshotOptions = (output: any, context: __SerdeContext): SnapshotOptions => { - return { - AutomatedSnapshotStartHour: __expectInt32(output.AutomatedSnapshotStartHour), - } as any; -}; +// de_SnapshotOptions omitted. /** * deserializeAws_restJson1SnapshotOptionsStatus */ const de_SnapshotOptionsStatus = (output: any, context: __SerdeContext): SnapshotOptionsStatus => { - return { - Options: output.Options != null ? de_SnapshotOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1SoftwareUpdateOptions - */ -const de_SoftwareUpdateOptions = (output: any, context: __SerdeContext): SoftwareUpdateOptions => { - return { - AutoSoftwareUpdateEnabled: __expectBoolean(output.AutoSoftwareUpdateEnabled), - } as any; -}; +// de_SoftwareUpdateOptions omitted. /** * deserializeAws_restJson1SoftwareUpdateOptionsStatus */ const de_SoftwareUpdateOptionsStatus = (output: any, context: __SerdeContext): SoftwareUpdateOptionsStatus => { - return { - Options: output.Options != null ? de_SoftwareUpdateOptions(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1StorageType - */ -const de_StorageType = (output: any, context: __SerdeContext): StorageType => { - return { - StorageSubTypeName: __expectString(output.StorageSubTypeName), - StorageTypeLimits: - output.StorageTypeLimits != null ? de_StorageTypeLimitList(output.StorageTypeLimits, context) : undefined, - StorageTypeName: __expectString(output.StorageTypeName), - } as any; -}; +// de_StorageType omitted. -/** - * deserializeAws_restJson1StorageTypeLimit - */ -const de_StorageTypeLimit = (output: any, context: __SerdeContext): StorageTypeLimit => { - return { - LimitName: __expectString(output.LimitName), - LimitValues: output.LimitValues != null ? de_LimitValueList(output.LimitValues, context) : undefined, - } as any; -}; +// de_StorageTypeLimit omitted. -/** - * deserializeAws_restJson1StorageTypeLimitList - */ -const de_StorageTypeLimitList = (output: any, context: __SerdeContext): StorageTypeLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StorageTypeLimit(entry, context); - }); - return retVal; -}; +// de_StorageTypeLimitList omitted. -/** - * deserializeAws_restJson1StorageTypeList - */ -const de_StorageTypeList = (output: any, context: __SerdeContext): StorageType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StorageType(entry, context); - }); - return retVal; -}; +// de_StorageTypeList omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1UpgradeHistory */ const de_UpgradeHistory = (output: any, context: __SerdeContext): UpgradeHistory => { - return { - StartTimestamp: - output.StartTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp))) - : undefined, - StepsList: output.StepsList != null ? de_UpgradeStepsList(output.StepsList, context) : undefined, - UpgradeName: __expectString(output.UpgradeName), - UpgradeStatus: __expectString(output.UpgradeStatus), - } as any; + return take(output, { + StartTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StepsList: (_: any) => de_UpgradeStepsList(_, context), + UpgradeName: __expectString, + UpgradeStatus: __expectString, + }) as any; }; /** @@ -7069,9 +5906,6 @@ const de_UpgradeHistoryList = (output: any, context: __SerdeContext): UpgradeHis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UpgradeHistory(entry, context); }); return retVal; @@ -7081,12 +5915,12 @@ const de_UpgradeHistoryList = (output: any, context: __SerdeContext): UpgradeHis * deserializeAws_restJson1UpgradeStepItem */ const de_UpgradeStepItem = (output: any, context: __SerdeContext): UpgradeStepItem => { - return { - Issues: output.Issues != null ? de_Issues(output.Issues, context) : undefined, - ProgressPercent: __limitedParseDouble(output.ProgressPercent), - UpgradeStep: __expectString(output.UpgradeStep), - UpgradeStepStatus: __expectString(output.UpgradeStepStatus), - } as any; + return take(output, { + Issues: _json, + ProgressPercent: __limitedParseDouble, + UpgradeStep: __expectString, + UpgradeStepStatus: __expectString, + }) as any; }; /** @@ -7096,186 +5930,54 @@ const de_UpgradeStepsList = (output: any, context: __SerdeContext): UpgradeStepI const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UpgradeStepItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ValidationFailure - */ -const de_ValidationFailure = (output: any, context: __SerdeContext): ValidationFailure => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationFailure omitted. -/** - * deserializeAws_restJson1ValidationFailures - */ -const de_ValidationFailures = (output: any, context: __SerdeContext): ValidationFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationFailure(entry, context); - }); - return retVal; -}; +// de_ValidationFailures omitted. -/** - * deserializeAws_restJson1VersionList - */ -const de_VersionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VersionList omitted. /** * deserializeAws_restJson1VersionStatus */ const de_VersionStatus = (output: any, context: __SerdeContext): VersionStatus => { - return { - Options: __expectString(output.Options), - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: __expectString, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1VPCDerivedInfo - */ -const de_VPCDerivedInfo = (output: any, context: __SerdeContext): VPCDerivedInfo => { - return { - AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined, - SecurityGroupIds: output.SecurityGroupIds != null ? de_StringList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_StringList(output.SubnetIds, context) : undefined, - VPCId: __expectString(output.VPCId), - } as any; -}; +// de_VPCDerivedInfo omitted. /** * deserializeAws_restJson1VPCDerivedInfoStatus */ const de_VPCDerivedInfoStatus = (output: any, context: __SerdeContext): VPCDerivedInfoStatus => { - return { - Options: output.Options != null ? de_VPCDerivedInfo(output.Options, context) : undefined, - Status: output.Status != null ? de_OptionStatus(output.Status, context) : undefined, - } as any; + return take(output, { + Options: _json, + Status: (_: any) => de_OptionStatus(_, context), + }) as any; }; -/** - * deserializeAws_restJson1VpcEndpoint - */ -const de_VpcEndpoint = (output: any, context: __SerdeContext): VpcEndpoint => { - return { - DomainArn: __expectString(output.DomainArn), - Endpoint: __expectString(output.Endpoint), - Status: __expectString(output.Status), - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcEndpointOwner: __expectString(output.VpcEndpointOwner), - VpcOptions: output.VpcOptions != null ? de_VPCDerivedInfo(output.VpcOptions, context) : undefined, - } as any; -}; +// de_VpcEndpoint omitted. -/** - * deserializeAws_restJson1VpcEndpointError - */ -const de_VpcEndpointError = (output: any, context: __SerdeContext): VpcEndpointError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - VpcEndpointId: __expectString(output.VpcEndpointId), - } as any; -}; +// de_VpcEndpointError omitted. -/** - * deserializeAws_restJson1VpcEndpointErrorList - */ -const de_VpcEndpointErrorList = (output: any, context: __SerdeContext): VpcEndpointError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointError(entry, context); - }); - return retVal; -}; +// de_VpcEndpointErrorList omitted. -/** - * deserializeAws_restJson1VpcEndpoints - */ -const de_VpcEndpoints = (output: any, context: __SerdeContext): VpcEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpoint(entry, context); - }); - return retVal; -}; +// de_VpcEndpoints omitted. -/** - * deserializeAws_restJson1VpcEndpointSummary - */ -const de_VpcEndpointSummary = (output: any, context: __SerdeContext): VpcEndpointSummary => { - return { - DomainArn: __expectString(output.DomainArn), - Status: __expectString(output.Status), - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcEndpointOwner: __expectString(output.VpcEndpointOwner), - } as any; -}; +// de_VpcEndpointSummary omitted. -/** - * deserializeAws_restJson1VpcEndpointSummaryList - */ -const de_VpcEndpointSummaryList = (output: any, context: __SerdeContext): VpcEndpointSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointSummary(entry, context); - }); - return retVal; -}; +// de_VpcEndpointSummaryList omitted. -/** - * deserializeAws_restJson1WindowStartTime - */ -const de_WindowStartTime = (output: any, context: __SerdeContext): WindowStartTime => { - return { - Hours: __expectLong(output.Hours), - Minutes: __expectLong(output.Minutes), - } as any; -}; +// de_WindowStartTime omitted. -/** - * deserializeAws_restJson1ZoneAwarenessConfig - */ -const de_ZoneAwarenessConfig = (output: any, context: __SerdeContext): ZoneAwarenessConfig => { - return { - AvailabilityZoneCount: __expectInt32(output.AvailabilityZoneCount), - } as any; -}; +// de_ZoneAwarenessConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts b/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts index fa90efd961a8..e43ffaa3487b 100644 --- a/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts +++ b/clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts @@ -1,11 +1,12 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -82,100 +83,55 @@ import { import { UpdateVpcEndpointCommandInput, UpdateVpcEndpointCommandOutput } from "../commands/UpdateVpcEndpointCommand"; import { AccessPolicyDetail, - AccessPolicyStats, - AccessPolicySummary, - AccountSettingsDetail, BatchGetCollectionRequest, - BatchGetCollectionResponse, BatchGetVpcEndpointRequest, - BatchGetVpcEndpointResponse, CapacityLimits, - CollectionDetail, - CollectionErrorDetail, CollectionFilters, - CollectionSummary, ConflictException, CreateAccessPolicyRequest, CreateAccessPolicyResponse, - CreateCollectionDetail, CreateCollectionRequest, - CreateCollectionResponse, CreateSecurityConfigRequest, - CreateSecurityConfigResponse, CreateSecurityPolicyRequest, CreateSecurityPolicyResponse, - CreateVpcEndpointDetail, CreateVpcEndpointRequest, - CreateVpcEndpointResponse, DeleteAccessPolicyRequest, - DeleteAccessPolicyResponse, - DeleteCollectionDetail, DeleteCollectionRequest, - DeleteCollectionResponse, DeleteSecurityConfigRequest, - DeleteSecurityConfigResponse, DeleteSecurityPolicyRequest, - DeleteSecurityPolicyResponse, - DeleteVpcEndpointDetail, DeleteVpcEndpointRequest, - DeleteVpcEndpointResponse, GetAccessPolicyRequest, GetAccessPolicyResponse, GetAccountSettingsRequest, - GetAccountSettingsResponse, GetPoliciesStatsRequest, - GetPoliciesStatsResponse, GetSecurityConfigRequest, - GetSecurityConfigResponse, GetSecurityPolicyRequest, GetSecurityPolicyResponse, InternalServerException, ListAccessPoliciesRequest, - ListAccessPoliciesResponse, ListCollectionsRequest, - ListCollectionsResponse, ListSecurityConfigsRequest, - ListSecurityConfigsResponse, ListSecurityPoliciesRequest, - ListSecurityPoliciesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListVpcEndpointsRequest, - ListVpcEndpointsResponse, OcuLimitExceededException, ResourceNotFoundException, SamlConfigOptions, - SecurityConfigDetail, - SecurityConfigStats, - SecurityConfigSummary, SecurityPolicyDetail, - SecurityPolicyStats, - SecurityPolicySummary, ServiceQuotaExceededException, Tag, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateAccessPolicyRequest, UpdateAccessPolicyResponse, UpdateAccountSettingsRequest, - UpdateAccountSettingsResponse, - UpdateCollectionDetail, UpdateCollectionRequest, - UpdateCollectionResponse, UpdateSecurityConfigRequest, - UpdateSecurityConfigResponse, UpdateSecurityPolicyRequest, UpdateSecurityPolicyResponse, - UpdateVpcEndpointDetail, UpdateVpcEndpointRequest, - UpdateVpcEndpointResponse, ValidationException, - VpcEndpointDetail, - VpcEndpointErrorDetail, VpcEndpointFilters, - VpcEndpointSummary, } from "../models/models_0"; import { OpenSearchServerlessServiceException as __BaseException } from "../models/OpenSearchServerlessServiceException"; @@ -188,7 +144,7 @@ export const se_BatchGetCollectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetCollection"); let body: any; - body = JSON.stringify(se_BatchGetCollectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -201,7 +157,7 @@ export const se_BatchGetVpcEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchGetVpcEndpoint"); let body: any; - body = JSON.stringify(se_BatchGetVpcEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -344,7 +300,7 @@ export const se_GetAccessPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccessPolicy"); let body: any; - body = JSON.stringify(se_GetAccessPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -357,7 +313,7 @@ export const se_GetAccountSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccountSettings"); let body: any; - body = JSON.stringify(se_GetAccountSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,7 +326,7 @@ export const se_GetPoliciesStatsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPoliciesStats"); let body: any; - body = JSON.stringify(se_GetPoliciesStatsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -383,7 +339,7 @@ export const se_GetSecurityConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSecurityConfig"); let body: any; - body = JSON.stringify(se_GetSecurityConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -396,7 +352,7 @@ export const se_GetSecurityPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSecurityPolicy"); let body: any; - body = JSON.stringify(se_GetSecurityPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -409,7 +365,7 @@ export const se_ListAccessPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccessPolicies"); let body: any; - body = JSON.stringify(se_ListAccessPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -422,7 +378,7 @@ export const se_ListCollectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCollections"); let body: any; - body = JSON.stringify(se_ListCollectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -435,7 +391,7 @@ export const se_ListSecurityConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSecurityConfigs"); let body: any; - body = JSON.stringify(se_ListSecurityConfigsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -448,7 +404,7 @@ export const se_ListSecurityPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSecurityPolicies"); let body: any; - body = JSON.stringify(se_ListSecurityPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,7 +417,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -474,7 +430,7 @@ export const se_ListVpcEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVpcEndpoints"); let body: any; - body = JSON.stringify(se_ListVpcEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -487,7 +443,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -500,7 +456,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -526,7 +482,7 @@ export const se_UpdateAccountSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAccountSettings"); let body: any; - body = JSON.stringify(se_UpdateAccountSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,12 +550,12 @@ export const de_BatchGetCollectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetCollectionResponse(data, context); + contents = _json(data); const response: BatchGetCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -623,10 +579,9 @@ const de_BatchGetCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -644,12 +599,12 @@ export const de_BatchGetVpcEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchGetVpcEndpointResponse(data, context); + contents = _json(data); const response: BatchGetVpcEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -673,10 +628,9 @@ const de_BatchGetVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -699,7 +653,7 @@ export const de_CreateAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -729,10 +683,9 @@ const de_CreateAccessPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -750,12 +703,12 @@ export const de_CreateCollectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCollectionResponse(data, context); + contents = _json(data); const response: CreateCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -788,10 +741,9 @@ const de_CreateCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -809,12 +761,12 @@ export const de_CreateSecurityConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSecurityConfigResponse(data, context); + contents = _json(data); const response: CreateSecurityConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -844,10 +796,9 @@ const de_CreateSecurityConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -870,7 +821,7 @@ export const de_CreateSecurityPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -900,10 +851,9 @@ const de_CreateSecurityPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -921,12 +871,12 @@ export const de_CreateVpcEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateVpcEndpointResponse(data, context); + contents = _json(data); const response: CreateVpcEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -956,10 +906,9 @@ const de_CreateVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -977,12 +926,12 @@ export const de_DeleteAccessPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAccessPolicyResponse(data, context); + contents = _json(data); const response: DeleteAccessPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1012,10 +961,9 @@ const de_DeleteAccessPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1033,12 +981,12 @@ export const de_DeleteCollectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCollectionResponse(data, context); + contents = _json(data); const response: DeleteCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1068,10 +1016,9 @@ const de_DeleteCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1089,12 +1036,12 @@ export const de_DeleteSecurityConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSecurityConfigResponse(data, context); + contents = _json(data); const response: DeleteSecurityConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1124,10 +1071,9 @@ const de_DeleteSecurityConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1145,12 +1091,12 @@ export const de_DeleteSecurityPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSecurityPolicyResponse(data, context); + contents = _json(data); const response: DeleteSecurityPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1180,10 +1126,9 @@ const de_DeleteSecurityPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1201,12 +1146,12 @@ export const de_DeleteVpcEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVpcEndpointResponse(data, context); + contents = _json(data); const response: DeleteVpcEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1236,10 +1181,9 @@ const de_DeleteVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1262,7 +1206,7 @@ export const de_GetAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1289,10 +1233,9 @@ const de_GetAccessPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1310,12 +1253,12 @@ export const de_GetAccountSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAccountSettingsResponse(data, context); + contents = _json(data); const response: GetAccountSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1339,10 +1282,9 @@ const de_GetAccountSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1360,12 +1302,12 @@ export const de_GetPoliciesStatsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPoliciesStatsResponse(data, context); + contents = _json(data); const response: GetPoliciesStatsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1386,10 +1328,9 @@ const de_GetPoliciesStatsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1407,12 +1348,12 @@ export const de_GetSecurityConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSecurityConfigResponse(data, context); + contents = _json(data); const response: GetSecurityConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1439,10 +1380,9 @@ const de_GetSecurityConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1465,7 +1405,7 @@ export const de_GetSecurityPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1492,10 +1432,9 @@ const de_GetSecurityPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1513,12 +1452,12 @@ export const de_ListAccessPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAccessPoliciesResponse(data, context); + contents = _json(data); const response: ListAccessPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1542,10 +1481,9 @@ const de_ListAccessPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1563,12 +1501,12 @@ export const de_ListCollectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCollectionsResponse(data, context); + contents = _json(data); const response: ListCollectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1592,10 +1530,9 @@ const de_ListCollectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1613,12 +1550,12 @@ export const de_ListSecurityConfigsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSecurityConfigsResponse(data, context); + contents = _json(data); const response: ListSecurityConfigsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1642,10 +1579,9 @@ const de_ListSecurityConfigsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1663,12 +1599,12 @@ export const de_ListSecurityPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSecurityPoliciesResponse(data, context); + contents = _json(data); const response: ListSecurityPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1692,10 +1628,9 @@ const de_ListSecurityPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1713,12 +1648,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1745,10 +1680,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1766,12 +1700,12 @@ export const de_ListVpcEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVpcEndpointsResponse(data, context); + contents = _json(data); const response: ListVpcEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1795,10 +1729,9 @@ const de_ListVpcEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1816,12 +1749,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1854,10 +1787,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1875,12 +1807,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1910,10 +1842,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1936,7 +1867,7 @@ export const de_UpdateAccessPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1966,10 +1897,9 @@ const de_UpdateAccessPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1987,12 +1917,12 @@ export const de_UpdateAccountSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAccountSettingsResponse(data, context); + contents = _json(data); const response: UpdateAccountSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2016,10 +1946,9 @@ const de_UpdateAccountSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2037,12 +1966,12 @@ export const de_UpdateCollectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCollectionResponse(data, context); + contents = _json(data); const response: UpdateCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2069,10 +1998,9 @@ const de_UpdateCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2090,12 +2018,12 @@ export const de_UpdateSecurityConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSecurityConfigResponse(data, context); + contents = _json(data); const response: UpdateSecurityConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2125,10 +2053,9 @@ const de_UpdateSecurityConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2151,7 +2078,7 @@ export const de_UpdateSecurityPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2184,10 +2111,9 @@ const de_UpdateSecurityPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2205,12 +2131,12 @@ export const de_UpdateVpcEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateVpcEndpointResponse(data, context); + contents = _json(data); const response: UpdateVpcEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2237,10 +2163,9 @@ const de_UpdateVpcEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2251,7 +2176,7 @@ const de_UpdateVpcEndpointCommandError = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2267,7 +2192,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2283,7 +2208,7 @@ const de_OcuLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OcuLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new OcuLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2299,7 +2224,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2315,7 +2240,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2328,7 +2253,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2336,1382 +2261,462 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0BatchGetCollectionRequest - */ -const se_BatchGetCollectionRequest = (input: BatchGetCollectionRequest, context: __SerdeContext): any => { - return { - ...(input.ids != null && { ids: se_CollectionIds(input.ids, context) }), - ...(input.names != null && { names: se_CollectionNames(input.names, context) }), - }; -}; +// se_BatchGetCollectionRequest omitted. -/** - * serializeAws_json1_0BatchGetVpcEndpointRequest - */ -const se_BatchGetVpcEndpointRequest = (input: BatchGetVpcEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.ids != null && { ids: se_VpcEndpointIds(input.ids, context) }), - }; -}; +// se_BatchGetVpcEndpointRequest omitted. -/** - * serializeAws_json1_0CapacityLimits - */ -const se_CapacityLimits = (input: CapacityLimits, context: __SerdeContext): any => { - return { - ...(input.maxIndexingCapacityInOCU != null && { maxIndexingCapacityInOCU: input.maxIndexingCapacityInOCU }), - ...(input.maxSearchCapacityInOCU != null && { maxSearchCapacityInOCU: input.maxSearchCapacityInOCU }), - }; -}; +// se_CapacityLimits omitted. -/** - * serializeAws_json1_0CollectionFilters - */ -const se_CollectionFilters = (input: CollectionFilters, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.status != null && { status: input.status }), - }; -}; +// se_CollectionFilters omitted. -/** - * serializeAws_json1_0CollectionIds - */ -const se_CollectionIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CollectionIds omitted. -/** - * serializeAws_json1_0CollectionNames - */ -const se_CollectionNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CollectionNames omitted. /** * serializeAws_json1_0CreateAccessPolicyRequest */ const se_CreateAccessPolicyRequest = (input: CreateAccessPolicyRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.policy != null && { policy: input.policy }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + policy: [], + type: [], + }); }; /** * serializeAws_json1_0CreateCollectionRequest */ const se_CreateCollectionRequest = (input: CreateCollectionRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + tags: _json, + type: [], + }); }; /** * serializeAws_json1_0CreateSecurityConfigRequest */ const se_CreateSecurityConfigRequest = (input: CreateSecurityConfigRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.samlOptions != null && { samlOptions: se_SamlConfigOptions(input.samlOptions, context) }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + samlOptions: _json, + type: [], + }); }; /** * serializeAws_json1_0CreateSecurityPolicyRequest */ const se_CreateSecurityPolicyRequest = (input: CreateSecurityPolicyRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.policy != null && { policy: input.policy }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + policy: [], + type: [], + }); }; /** * serializeAws_json1_0CreateVpcEndpointRequest */ const se_CreateVpcEndpointRequest = (input: CreateVpcEndpointRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupIds(input.securityGroupIds, context) }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIds(input.subnetIds, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + securityGroupIds: _json, + subnetIds: _json, + vpcId: [], + }); }; /** * serializeAws_json1_0DeleteAccessPolicyRequest */ const se_DeleteAccessPolicyRequest = (input: DeleteAccessPolicyRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + type: [], + }); }; /** * serializeAws_json1_0DeleteCollectionRequest */ const se_DeleteCollectionRequest = (input: DeleteCollectionRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.id != null && { id: input.id }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + id: [], + }); }; /** * serializeAws_json1_0DeleteSecurityConfigRequest */ const se_DeleteSecurityConfigRequest = (input: DeleteSecurityConfigRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.id != null && { id: input.id }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + id: [], + }); }; /** * serializeAws_json1_0DeleteSecurityPolicyRequest */ const se_DeleteSecurityPolicyRequest = (input: DeleteSecurityPolicyRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + type: [], + }); }; /** * serializeAws_json1_0DeleteVpcEndpointRequest */ const se_DeleteVpcEndpointRequest = (input: DeleteVpcEndpointRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.id != null && { id: input.id }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + id: [], + }); }; -/** - * serializeAws_json1_0GetAccessPolicyRequest - */ -const se_GetAccessPolicyRequest = (input: GetAccessPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_GetAccessPolicyRequest omitted. -/** - * serializeAws_json1_0GetAccountSettingsRequest - */ -const se_GetAccountSettingsRequest = (input: GetAccountSettingsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetAccountSettingsRequest omitted. -/** - * serializeAws_json1_0GetPoliciesStatsRequest - */ -const se_GetPoliciesStatsRequest = (input: GetPoliciesStatsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetPoliciesStatsRequest omitted. -/** - * serializeAws_json1_0GetSecurityConfigRequest - */ -const se_GetSecurityConfigRequest = (input: GetSecurityConfigRequest, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_GetSecurityConfigRequest omitted. -/** - * serializeAws_json1_0GetSecurityPolicyRequest - */ -const se_GetSecurityPolicyRequest = (input: GetSecurityPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_GetSecurityPolicyRequest omitted. -/** - * serializeAws_json1_0ListAccessPoliciesRequest - */ -const se_ListAccessPoliciesRequest = (input: ListAccessPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resource != null && { resource: se_ResourceFilter(input.resource, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListAccessPoliciesRequest omitted. -/** - * serializeAws_json1_0ListCollectionsRequest - */ -const se_ListCollectionsRequest = (input: ListCollectionsRequest, context: __SerdeContext): any => { - return { - ...(input.collectionFilters != null && { - collectionFilters: se_CollectionFilters(input.collectionFilters, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListCollectionsRequest omitted. -/** - * serializeAws_json1_0ListSecurityConfigsRequest - */ -const se_ListSecurityConfigsRequest = (input: ListSecurityConfigsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListSecurityConfigsRequest omitted. -/** - * serializeAws_json1_0ListSecurityPoliciesRequest - */ -const se_ListSecurityPoliciesRequest = (input: ListSecurityPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resource != null && { resource: se_ResourceFilter(input.resource, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_ListSecurityPoliciesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0ListVpcEndpointsRequest - */ -const se_ListVpcEndpointsRequest = (input: ListVpcEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.vpcEndpointFilters != null && { - vpcEndpointFilters: se_VpcEndpointFilters(input.vpcEndpointFilters, context), - }), - }; -}; +// se_ListVpcEndpointsRequest omitted. -/** - * serializeAws_json1_0ResourceFilter - */ -const se_ResourceFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceFilter omitted. -/** - * serializeAws_json1_0SamlConfigOptions - */ -const se_SamlConfigOptions = (input: SamlConfigOptions, context: __SerdeContext): any => { - return { - ...(input.groupAttribute != null && { groupAttribute: input.groupAttribute }), - ...(input.metadata != null && { metadata: input.metadata }), - ...(input.sessionTimeout != null && { sessionTimeout: input.sessionTimeout }), - ...(input.userAttribute != null && { userAttribute: input.userAttribute }), - }; -}; +// se_SamlConfigOptions omitted. -/** - * serializeAws_json1_0SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_json1_0SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeys(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. /** * serializeAws_json1_0UpdateAccessPolicyRequest */ const se_UpdateAccessPolicyRequest = (input: UpdateAccessPolicyRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.policy != null && { policy: input.policy }), - ...(input.policyVersion != null && { policyVersion: input.policyVersion }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + policy: [], + policyVersion: [], + type: [], + }); }; -/** - * serializeAws_json1_0UpdateAccountSettingsRequest - */ -const se_UpdateAccountSettingsRequest = (input: UpdateAccountSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.capacityLimits != null && { capacityLimits: se_CapacityLimits(input.capacityLimits, context) }), - }; -}; +// se_UpdateAccountSettingsRequest omitted. /** * serializeAws_json1_0UpdateCollectionRequest */ const se_UpdateCollectionRequest = (input: UpdateCollectionRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.id != null && { id: input.id }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + id: [], + }); }; /** * serializeAws_json1_0UpdateSecurityConfigRequest */ const se_UpdateSecurityConfigRequest = (input: UpdateSecurityConfigRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.configVersion != null && { configVersion: input.configVersion }), - ...(input.description != null && { description: input.description }), - ...(input.id != null && { id: input.id }), - ...(input.samlOptions != null && { samlOptions: se_SamlConfigOptions(input.samlOptions, context) }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + configVersion: [], + description: [], + id: [], + samlOptions: _json, + }); }; /** * serializeAws_json1_0UpdateSecurityPolicyRequest */ const se_UpdateSecurityPolicyRequest = (input: UpdateSecurityPolicyRequest, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.policy != null && { policy: input.policy }), - ...(input.policyVersion != null && { policyVersion: input.policyVersion }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + policy: [], + policyVersion: [], + type: [], + }); }; /** * serializeAws_json1_0UpdateVpcEndpointRequest */ const se_UpdateVpcEndpointRequest = (input: UpdateVpcEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.addSecurityGroupIds != null && { - addSecurityGroupIds: se_SecurityGroupIds(input.addSecurityGroupIds, context), - }), - ...(input.addSubnetIds != null && { addSubnetIds: se_SubnetIds(input.addSubnetIds, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.id != null && { id: input.id }), - ...(input.removeSecurityGroupIds != null && { - removeSecurityGroupIds: se_SecurityGroupIds(input.removeSecurityGroupIds, context), - }), - ...(input.removeSubnetIds != null && { removeSubnetIds: se_SubnetIds(input.removeSubnetIds, context) }), - }; + return take(input, { + addSecurityGroupIds: _json, + addSubnetIds: _json, + clientToken: (_) => _ ?? generateIdempotencyToken(), + id: [], + removeSecurityGroupIds: _json, + removeSubnetIds: _json, + }); }; -/** - * serializeAws_json1_0VpcEndpointFilters - */ -const se_VpcEndpointFilters = (input: VpcEndpointFilters, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_VpcEndpointFilters omitted. -/** - * serializeAws_json1_0VpcEndpointIds - */ -const se_VpcEndpointIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VpcEndpointIds omitted. /** * deserializeAws_json1_0AccessPolicyDetail */ const de_AccessPolicyDetail = (output: any, context: __SerdeContext): AccessPolicyDetail => { - return { - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - policy: output.policy != null ? de_Document(output.policy, context) : undefined, - policyVersion: __expectString(output.policyVersion), - type: __expectString(output.type), - } as any; + return take(output, { + createdDate: __expectLong, + description: __expectString, + lastModifiedDate: __expectLong, + name: __expectString, + policy: (_: any) => de_Document(_, context), + policyVersion: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0AccessPolicyStats - */ -const de_AccessPolicyStats = (output: any, context: __SerdeContext): AccessPolicyStats => { - return { - DataPolicyCount: __expectLong(output.DataPolicyCount), - } as any; -}; +// de_AccessPolicyStats omitted. -/** - * deserializeAws_json1_0AccessPolicySummaries - */ -const de_AccessPolicySummaries = (output: any, context: __SerdeContext): AccessPolicySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessPolicySummary(entry, context); - }); - return retVal; -}; +// de_AccessPolicySummaries omitted. -/** - * deserializeAws_json1_0AccessPolicySummary - */ -const de_AccessPolicySummary = (output: any, context: __SerdeContext): AccessPolicySummary => { - return { - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - policyVersion: __expectString(output.policyVersion), - type: __expectString(output.type), - } as any; -}; +// de_AccessPolicySummary omitted. -/** - * deserializeAws_json1_0AccountSettingsDetail - */ -const de_AccountSettingsDetail = (output: any, context: __SerdeContext): AccountSettingsDetail => { - return { - capacityLimits: output.capacityLimits != null ? de_CapacityLimits(output.capacityLimits, context) : undefined, - } as any; -}; +// de_AccountSettingsDetail omitted. -/** - * deserializeAws_json1_0BatchGetCollectionResponse - */ -const de_BatchGetCollectionResponse = (output: any, context: __SerdeContext): BatchGetCollectionResponse => { - return { - collectionDetails: - output.collectionDetails != null ? de_CollectionDetails(output.collectionDetails, context) : undefined, - collectionErrorDetails: - output.collectionErrorDetails != null - ? de_CollectionErrorDetails(output.collectionErrorDetails, context) - : undefined, - } as any; -}; +// de_BatchGetCollectionResponse omitted. -/** - * deserializeAws_json1_0BatchGetVpcEndpointResponse - */ -const de_BatchGetVpcEndpointResponse = (output: any, context: __SerdeContext): BatchGetVpcEndpointResponse => { - return { - vpcEndpointDetails: - output.vpcEndpointDetails != null ? de_VpcEndpointDetails(output.vpcEndpointDetails, context) : undefined, - vpcEndpointErrorDetails: - output.vpcEndpointErrorDetails != null - ? de_VpcEndpointErrorDetails(output.vpcEndpointErrorDetails, context) - : undefined, - } as any; -}; +// de_BatchGetVpcEndpointResponse omitted. -/** - * deserializeAws_json1_0CapacityLimits - */ -const de_CapacityLimits = (output: any, context: __SerdeContext): CapacityLimits => { - return { - maxIndexingCapacityInOCU: __expectInt32(output.maxIndexingCapacityInOCU), - maxSearchCapacityInOCU: __expectInt32(output.maxSearchCapacityInOCU), - } as any; -}; +// de_CapacityLimits omitted. -/** - * deserializeAws_json1_0CollectionDetail - */ -const de_CollectionDetail = (output: any, context: __SerdeContext): CollectionDetail => { - return { - arn: __expectString(output.arn), - collectionEndpoint: __expectString(output.collectionEndpoint), - createdDate: __expectLong(output.createdDate), - dashboardEndpoint: __expectString(output.dashboardEndpoint), - description: __expectString(output.description), - id: __expectString(output.id), - kmsKeyArn: __expectString(output.kmsKeyArn), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; -}; +// de_CollectionDetail omitted. -/** - * deserializeAws_json1_0CollectionDetails - */ -const de_CollectionDetails = (output: any, context: __SerdeContext): CollectionDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CollectionDetail(entry, context); - }); - return retVal; -}; +// de_CollectionDetails omitted. -/** - * deserializeAws_json1_0CollectionErrorDetail - */ -const de_CollectionErrorDetail = (output: any, context: __SerdeContext): CollectionErrorDetail => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_CollectionErrorDetail omitted. -/** - * deserializeAws_json1_0CollectionErrorDetails - */ -const de_CollectionErrorDetails = (output: any, context: __SerdeContext): CollectionErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CollectionErrorDetail(entry, context); - }); - return retVal; -}; +// de_CollectionErrorDetails omitted. -/** - * deserializeAws_json1_0CollectionSummaries - */ -const de_CollectionSummaries = (output: any, context: __SerdeContext): CollectionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CollectionSummary(entry, context); - }); - return retVal; -}; +// de_CollectionSummaries omitted. -/** - * deserializeAws_json1_0CollectionSummary - */ -const de_CollectionSummary = (output: any, context: __SerdeContext): CollectionSummary => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_CollectionSummary omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConflictException omitted. /** * deserializeAws_json1_0CreateAccessPolicyResponse */ const de_CreateAccessPolicyResponse = (output: any, context: __SerdeContext): CreateAccessPolicyResponse => { - return { - accessPolicyDetail: - output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined, - } as any; + return take(output, { + accessPolicyDetail: (_: any) => de_AccessPolicyDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CreateCollectionDetail - */ -const de_CreateCollectionDetail = (output: any, context: __SerdeContext): CreateCollectionDetail => { - return { - arn: __expectString(output.arn), - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - id: __expectString(output.id), - kmsKeyArn: __expectString(output.kmsKeyArn), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; -}; +// de_CreateCollectionDetail omitted. -/** - * deserializeAws_json1_0CreateCollectionResponse - */ -const de_CreateCollectionResponse = (output: any, context: __SerdeContext): CreateCollectionResponse => { - return { - createCollectionDetail: - output.createCollectionDetail != null - ? de_CreateCollectionDetail(output.createCollectionDetail, context) - : undefined, - } as any; -}; +// de_CreateCollectionResponse omitted. -/** - * deserializeAws_json1_0CreateSecurityConfigResponse - */ -const de_CreateSecurityConfigResponse = (output: any, context: __SerdeContext): CreateSecurityConfigResponse => { - return { - securityConfigDetail: - output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined, - } as any; -}; +// de_CreateSecurityConfigResponse omitted. /** * deserializeAws_json1_0CreateSecurityPolicyResponse */ const de_CreateSecurityPolicyResponse = (output: any, context: __SerdeContext): CreateSecurityPolicyResponse => { - return { - securityPolicyDetail: - output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined, - } as any; + return take(output, { + securityPolicyDetail: (_: any) => de_SecurityPolicyDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CreateVpcEndpointDetail - */ -const de_CreateVpcEndpointDetail = (output: any, context: __SerdeContext): CreateVpcEndpointDetail => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_CreateVpcEndpointDetail omitted. -/** - * deserializeAws_json1_0CreateVpcEndpointResponse - */ -const de_CreateVpcEndpointResponse = (output: any, context: __SerdeContext): CreateVpcEndpointResponse => { - return { - createVpcEndpointDetail: - output.createVpcEndpointDetail != null - ? de_CreateVpcEndpointDetail(output.createVpcEndpointDetail, context) - : undefined, - } as any; -}; +// de_CreateVpcEndpointResponse omitted. -/** - * deserializeAws_json1_0DeleteAccessPolicyResponse - */ -const de_DeleteAccessPolicyResponse = (output: any, context: __SerdeContext): DeleteAccessPolicyResponse => { - return {} as any; -}; +// de_DeleteAccessPolicyResponse omitted. -/** - * deserializeAws_json1_0DeleteCollectionDetail - */ -const de_DeleteCollectionDetail = (output: any, context: __SerdeContext): DeleteCollectionDetail => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_DeleteCollectionDetail omitted. -/** - * deserializeAws_json1_0DeleteCollectionResponse - */ -const de_DeleteCollectionResponse = (output: any, context: __SerdeContext): DeleteCollectionResponse => { - return { - deleteCollectionDetail: - output.deleteCollectionDetail != null - ? de_DeleteCollectionDetail(output.deleteCollectionDetail, context) - : undefined, - } as any; -}; +// de_DeleteCollectionResponse omitted. -/** - * deserializeAws_json1_0DeleteSecurityConfigResponse - */ -const de_DeleteSecurityConfigResponse = (output: any, context: __SerdeContext): DeleteSecurityConfigResponse => { - return {} as any; -}; +// de_DeleteSecurityConfigResponse omitted. -/** - * deserializeAws_json1_0DeleteSecurityPolicyResponse - */ -const de_DeleteSecurityPolicyResponse = (output: any, context: __SerdeContext): DeleteSecurityPolicyResponse => { - return {} as any; -}; +// de_DeleteSecurityPolicyResponse omitted. -/** - * deserializeAws_json1_0DeleteVpcEndpointDetail - */ -const de_DeleteVpcEndpointDetail = (output: any, context: __SerdeContext): DeleteVpcEndpointDetail => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_DeleteVpcEndpointDetail omitted. -/** - * deserializeAws_json1_0DeleteVpcEndpointResponse - */ -const de_DeleteVpcEndpointResponse = (output: any, context: __SerdeContext): DeleteVpcEndpointResponse => { - return { - deleteVpcEndpointDetail: - output.deleteVpcEndpointDetail != null - ? de_DeleteVpcEndpointDetail(output.deleteVpcEndpointDetail, context) - : undefined, - } as any; -}; +// de_DeleteVpcEndpointResponse omitted. /** * deserializeAws_json1_0GetAccessPolicyResponse */ const de_GetAccessPolicyResponse = (output: any, context: __SerdeContext): GetAccessPolicyResponse => { - return { - accessPolicyDetail: - output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined, - } as any; + return take(output, { + accessPolicyDetail: (_: any) => de_AccessPolicyDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetAccountSettingsResponse - */ -const de_GetAccountSettingsResponse = (output: any, context: __SerdeContext): GetAccountSettingsResponse => { - return { - accountSettingsDetail: - output.accountSettingsDetail != null - ? de_AccountSettingsDetail(output.accountSettingsDetail, context) - : undefined, - } as any; -}; +// de_GetAccountSettingsResponse omitted. -/** - * deserializeAws_json1_0GetPoliciesStatsResponse - */ -const de_GetPoliciesStatsResponse = (output: any, context: __SerdeContext): GetPoliciesStatsResponse => { - return { - AccessPolicyStats: - output.AccessPolicyStats != null ? de_AccessPolicyStats(output.AccessPolicyStats, context) : undefined, - SecurityConfigStats: - output.SecurityConfigStats != null ? de_SecurityConfigStats(output.SecurityConfigStats, context) : undefined, - SecurityPolicyStats: - output.SecurityPolicyStats != null ? de_SecurityPolicyStats(output.SecurityPolicyStats, context) : undefined, - TotalPolicyCount: __expectLong(output.TotalPolicyCount), - } as any; -}; +// de_GetPoliciesStatsResponse omitted. -/** - * deserializeAws_json1_0GetSecurityConfigResponse - */ -const de_GetSecurityConfigResponse = (output: any, context: __SerdeContext): GetSecurityConfigResponse => { - return { - securityConfigDetail: - output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined, - } as any; -}; +// de_GetSecurityConfigResponse omitted. /** * deserializeAws_json1_0GetSecurityPolicyResponse */ const de_GetSecurityPolicyResponse = (output: any, context: __SerdeContext): GetSecurityPolicyResponse => { - return { - securityPolicyDetail: - output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined, - } as any; + return take(output, { + securityPolicyDetail: (_: any) => de_SecurityPolicyDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0ListAccessPoliciesResponse - */ -const de_ListAccessPoliciesResponse = (output: any, context: __SerdeContext): ListAccessPoliciesResponse => { - return { - accessPolicySummaries: - output.accessPolicySummaries != null - ? de_AccessPolicySummaries(output.accessPolicySummaries, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListAccessPoliciesResponse omitted. -/** - * deserializeAws_json1_0ListCollectionsResponse - */ -const de_ListCollectionsResponse = (output: any, context: __SerdeContext): ListCollectionsResponse => { - return { - collectionSummaries: - output.collectionSummaries != null ? de_CollectionSummaries(output.collectionSummaries, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListCollectionsResponse omitted. -/** - * deserializeAws_json1_0ListSecurityConfigsResponse - */ -const de_ListSecurityConfigsResponse = (output: any, context: __SerdeContext): ListSecurityConfigsResponse => { - return { - nextToken: __expectString(output.nextToken), - securityConfigSummaries: - output.securityConfigSummaries != null - ? de_SecurityConfigSummaries(output.securityConfigSummaries, context) - : undefined, - } as any; -}; +// de_ListSecurityConfigsResponse omitted. -/** - * deserializeAws_json1_0ListSecurityPoliciesResponse - */ -const de_ListSecurityPoliciesResponse = (output: any, context: __SerdeContext): ListSecurityPoliciesResponse => { - return { - nextToken: __expectString(output.nextToken), - securityPolicySummaries: - output.securityPolicySummaries != null - ? de_SecurityPolicySummaries(output.securityPolicySummaries, context) - : undefined, - } as any; -}; +// de_ListSecurityPoliciesResponse omitted. -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0ListVpcEndpointsResponse - */ -const de_ListVpcEndpointsResponse = (output: any, context: __SerdeContext): ListVpcEndpointsResponse => { - return { - nextToken: __expectString(output.nextToken), - vpcEndpointSummaries: - output.vpcEndpointSummaries != null ? de_VpcEndpointSummaries(output.vpcEndpointSummaries, context) : undefined, - } as any; -}; +// de_ListVpcEndpointsResponse omitted. -/** - * deserializeAws_json1_0OcuLimitExceededException - */ -const de_OcuLimitExceededException = (output: any, context: __SerdeContext): OcuLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_OcuLimitExceededException omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0SamlConfigOptions - */ -const de_SamlConfigOptions = (output: any, context: __SerdeContext): SamlConfigOptions => { - return { - groupAttribute: __expectString(output.groupAttribute), - metadata: __expectString(output.metadata), - sessionTimeout: __expectInt32(output.sessionTimeout), - userAttribute: __expectString(output.userAttribute), - } as any; -}; +// de_SamlConfigOptions omitted. -/** - * deserializeAws_json1_0SecurityConfigDetail - */ -const de_SecurityConfigDetail = (output: any, context: __SerdeContext): SecurityConfigDetail => { - return { - configVersion: __expectString(output.configVersion), - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - id: __expectString(output.id), - lastModifiedDate: __expectLong(output.lastModifiedDate), - samlOptions: output.samlOptions != null ? de_SamlConfigOptions(output.samlOptions, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_SecurityConfigDetail omitted. -/** - * deserializeAws_json1_0SecurityConfigStats - */ -const de_SecurityConfigStats = (output: any, context: __SerdeContext): SecurityConfigStats => { - return { - SamlConfigCount: __expectLong(output.SamlConfigCount), - } as any; -}; +// de_SecurityConfigStats omitted. -/** - * deserializeAws_json1_0SecurityConfigSummaries - */ -const de_SecurityConfigSummaries = (output: any, context: __SerdeContext): SecurityConfigSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityConfigSummary(entry, context); - }); - return retVal; -}; +// de_SecurityConfigSummaries omitted. -/** - * deserializeAws_json1_0SecurityConfigSummary - */ -const de_SecurityConfigSummary = (output: any, context: __SerdeContext): SecurityConfigSummary => { - return { - configVersion: __expectString(output.configVersion), - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - id: __expectString(output.id), - lastModifiedDate: __expectLong(output.lastModifiedDate), - type: __expectString(output.type), - } as any; -}; +// de_SecurityConfigSummary omitted. -/** - * deserializeAws_json1_0SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. /** * deserializeAws_json1_0SecurityPolicyDetail */ const de_SecurityPolicyDetail = (output: any, context: __SerdeContext): SecurityPolicyDetail => { - return { - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - policy: output.policy != null ? de_Document(output.policy, context) : undefined, - policyVersion: __expectString(output.policyVersion), - type: __expectString(output.type), - } as any; + return take(output, { + createdDate: __expectLong, + description: __expectString, + lastModifiedDate: __expectLong, + name: __expectString, + policy: (_: any) => de_Document(_, context), + policyVersion: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0SecurityPolicyStats - */ -const de_SecurityPolicyStats = (output: any, context: __SerdeContext): SecurityPolicyStats => { - return { - EncryptionPolicyCount: __expectLong(output.EncryptionPolicyCount), - NetworkPolicyCount: __expectLong(output.NetworkPolicyCount), - } as any; -}; +// de_SecurityPolicyStats omitted. -/** - * deserializeAws_json1_0SecurityPolicySummaries - */ -const de_SecurityPolicySummaries = (output: any, context: __SerdeContext): SecurityPolicySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityPolicySummary(entry, context); - }); - return retVal; -}; +// de_SecurityPolicySummaries omitted. -/** - * deserializeAws_json1_0SecurityPolicySummary - */ -const de_SecurityPolicySummary = (output: any, context: __SerdeContext): SecurityPolicySummary => { - return { - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - policyVersion: __expectString(output.policyVersion), - type: __expectString(output.type), - } as any; -}; +// de_SecurityPolicySummary omitted. -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - message: __expectString(output.message), - quotaCode: __expectString(output.quotaCode), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - serviceCode: __expectString(output.serviceCode), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_0SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_0UpdateAccessPolicyResponse */ const de_UpdateAccessPolicyResponse = (output: any, context: __SerdeContext): UpdateAccessPolicyResponse => { - return { - accessPolicyDetail: - output.accessPolicyDetail != null ? de_AccessPolicyDetail(output.accessPolicyDetail, context) : undefined, - } as any; + return take(output, { + accessPolicyDetail: (_: any) => de_AccessPolicyDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UpdateAccountSettingsResponse - */ -const de_UpdateAccountSettingsResponse = (output: any, context: __SerdeContext): UpdateAccountSettingsResponse => { - return { - accountSettingsDetail: - output.accountSettingsDetail != null - ? de_AccountSettingsDetail(output.accountSettingsDetail, context) - : undefined, - } as any; -}; +// de_UpdateAccountSettingsResponse omitted. -/** - * deserializeAws_json1_0UpdateCollectionDetail - */ -const de_UpdateCollectionDetail = (output: any, context: __SerdeContext): UpdateCollectionDetail => { - return { - arn: __expectString(output.arn), - createdDate: __expectLong(output.createdDate), - description: __expectString(output.description), - id: __expectString(output.id), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; -}; +// de_UpdateCollectionDetail omitted. -/** - * deserializeAws_json1_0UpdateCollectionResponse - */ -const de_UpdateCollectionResponse = (output: any, context: __SerdeContext): UpdateCollectionResponse => { - return { - updateCollectionDetail: - output.updateCollectionDetail != null - ? de_UpdateCollectionDetail(output.updateCollectionDetail, context) - : undefined, - } as any; -}; +// de_UpdateCollectionResponse omitted. -/** - * deserializeAws_json1_0UpdateSecurityConfigResponse - */ -const de_UpdateSecurityConfigResponse = (output: any, context: __SerdeContext): UpdateSecurityConfigResponse => { - return { - securityConfigDetail: - output.securityConfigDetail != null ? de_SecurityConfigDetail(output.securityConfigDetail, context) : undefined, - } as any; -}; +// de_UpdateSecurityConfigResponse omitted. /** * deserializeAws_json1_0UpdateSecurityPolicyResponse */ const de_UpdateSecurityPolicyResponse = (output: any, context: __SerdeContext): UpdateSecurityPolicyResponse => { - return { - securityPolicyDetail: - output.securityPolicyDetail != null ? de_SecurityPolicyDetail(output.securityPolicyDetail, context) : undefined, - } as any; + return take(output, { + securityPolicyDetail: (_: any) => de_SecurityPolicyDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UpdateVpcEndpointDetail - */ -const de_UpdateVpcEndpointDetail = (output: any, context: __SerdeContext): UpdateVpcEndpointDetail => { - return { - id: __expectString(output.id), - lastModifiedDate: __expectLong(output.lastModifiedDate), - name: __expectString(output.name), - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - status: __expectString(output.status), - subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined, - } as any; -}; +// de_UpdateVpcEndpointDetail omitted. -/** - * deserializeAws_json1_0UpdateVpcEndpointResponse - */ -const de_UpdateVpcEndpointResponse = (output: any, context: __SerdeContext): UpdateVpcEndpointResponse => { - return { - UpdateVpcEndpointDetail: - output.UpdateVpcEndpointDetail != null - ? de_UpdateVpcEndpointDetail(output.UpdateVpcEndpointDetail, context) - : undefined, - } as any; -}; +// de_UpdateVpcEndpointResponse omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_0VpcEndpointDetail - */ -const de_VpcEndpointDetail = (output: any, context: __SerdeContext): VpcEndpointDetail => { - return { - createdDate: __expectLong(output.createdDate), - id: __expectString(output.id), - name: __expectString(output.name), - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIds(output.securityGroupIds, context) : undefined, - status: __expectString(output.status), - subnetIds: output.subnetIds != null ? de_SubnetIds(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcEndpointDetail omitted. -/** - * deserializeAws_json1_0VpcEndpointDetails - */ -const de_VpcEndpointDetails = (output: any, context: __SerdeContext): VpcEndpointDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointDetail(entry, context); - }); - return retVal; -}; +// de_VpcEndpointDetails omitted. -/** - * deserializeAws_json1_0VpcEndpointErrorDetail - */ -const de_VpcEndpointErrorDetail = (output: any, context: __SerdeContext): VpcEndpointErrorDetail => { - return { - errorCode: __expectString(output.errorCode), - errorMessage: __expectString(output.errorMessage), - id: __expectString(output.id), - } as any; -}; +// de_VpcEndpointErrorDetail omitted. -/** - * deserializeAws_json1_0VpcEndpointErrorDetails - */ -const de_VpcEndpointErrorDetails = (output: any, context: __SerdeContext): VpcEndpointErrorDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointErrorDetail(entry, context); - }); - return retVal; -}; +// de_VpcEndpointErrorDetails omitted. -/** - * deserializeAws_json1_0VpcEndpointSummaries - */ -const de_VpcEndpointSummaries = (output: any, context: __SerdeContext): VpcEndpointSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpointSummary(entry, context); - }); - return retVal; -}; +// de_VpcEndpointSummaries omitted. -/** - * deserializeAws_json1_0VpcEndpointSummary - */ -const de_VpcEndpointSummary = (output: any, context: __SerdeContext): VpcEndpointSummary => { - return { - id: __expectString(output.id), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; +// de_VpcEndpointSummary omitted. /** * deserializeAws_json1_0Document @@ -3740,6 +2745,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-opsworks/src/protocols/Aws_json1_1.ts b/clients/client-opsworks/src/protocols/Aws_json1_1.ts index 51127da52e60..2f78698a87fb 100644 --- a/clients/client-opsworks/src/protocols/Aws_json1_1.ts +++ b/clients/client-opsworks/src/protocols/Aws_json1_1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectString as __expectString, limitedParseDouble as __limitedParseDouble, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -169,9 +171,6 @@ import { UpdateStackCommandInput, UpdateStackCommandOutput } from "../commands/U import { UpdateUserProfileCommandInput, UpdateUserProfileCommandOutput } from "../commands/UpdateUserProfileCommand"; import { UpdateVolumeCommandInput, UpdateVolumeCommandOutput } from "../commands/UpdateVolumeCommand"; import { - AgentVersion, - App, - AppAttributesKeys, AssignInstanceRequest, AssignVolumeRequest, AssociateElasticIpRequest, @@ -180,29 +179,20 @@ import { BlockDeviceMapping, ChefConfiguration, CloneStackRequest, - CloneStackResult, CloudWatchLogsConfiguration, CloudWatchLogsLogStream, - Command, CreateAppRequest, - CreateAppResult, CreateDeploymentRequest, - CreateDeploymentResult, CreateInstanceRequest, - CreateInstanceResult, CreateLayerRequest, - CreateLayerResult, CreateStackRequest, - CreateStackResult, CreateUserProfileRequest, - CreateUserProfileResult, DataSource, DeleteAppRequest, DeleteInstanceRequest, DeleteLayerRequest, DeleteStackRequest, DeleteUserProfileRequest, - Deployment, DeploymentCommand, DeregisterEcsClusterRequest, DeregisterElasticIpRequest, @@ -210,104 +200,56 @@ import { DeregisterRdsDbInstanceRequest, DeregisterVolumeRequest, DescribeAgentVersionsRequest, - DescribeAgentVersionsResult, DescribeAppsRequest, - DescribeAppsResult, DescribeCommandsRequest, - DescribeCommandsResult, DescribeDeploymentsRequest, - DescribeDeploymentsResult, DescribeEcsClustersRequest, - DescribeEcsClustersResult, DescribeElasticIpsRequest, - DescribeElasticIpsResult, DescribeElasticLoadBalancersRequest, - DescribeElasticLoadBalancersResult, DescribeInstancesRequest, - DescribeInstancesResult, DescribeLayersRequest, - DescribeLayersResult, DescribeLoadBasedAutoScalingRequest, DescribeLoadBasedAutoScalingResult, - DescribeMyUserProfileResult, - DescribeOperatingSystemsResponse, DescribePermissionsRequest, - DescribePermissionsResult, DescribeRaidArraysRequest, - DescribeRaidArraysResult, DescribeRdsDbInstancesRequest, - DescribeRdsDbInstancesResult, DescribeServiceErrorsRequest, - DescribeServiceErrorsResult, DescribeStackProvisioningParametersRequest, - DescribeStackProvisioningParametersResult, DescribeStacksRequest, - DescribeStacksResult, DescribeStackSummaryRequest, - DescribeStackSummaryResult, DescribeTimeBasedAutoScalingRequest, - DescribeTimeBasedAutoScalingResult, DescribeUserProfilesRequest, - DescribeUserProfilesResult, DescribeVolumesRequest, - DescribeVolumesResult, DetachElasticLoadBalancerRequest, DisassociateElasticIpRequest, EbsBlockDevice, - EcsCluster, - ElasticIp, - ElasticLoadBalancer, EnvironmentVariable, GetHostnameSuggestionRequest, - GetHostnameSuggestionResult, GrantAccessRequest, - GrantAccessResult, - Instance, InstanceIdentity, - InstancesCount, - Layer, - LayerAttributesKeys, LifecycleEventConfiguration, ListTagsRequest, - ListTagsResult, LoadBasedAutoScalingConfiguration, - OperatingSystem, - OperatingSystemConfigurationManager, - Permission, - RaidArray, - RdsDbInstance, RebootInstanceRequest, Recipes, RegisterEcsClusterRequest, - RegisterEcsClusterResult, RegisterElasticIpRequest, - RegisterElasticIpResult, RegisterInstanceRequest, - RegisterInstanceResult, RegisterRdsDbInstanceRequest, RegisterVolumeRequest, - RegisterVolumeResult, - ReportedOs, ResourceNotFoundException, - SelfUserProfile, - ServiceError, SetLoadBasedAutoScalingRequest, SetPermissionRequest, SetTimeBasedAutoScalingRequest, ShutdownEventConfiguration, Source, SslConfiguration, - Stack, - StackAttributesKeys, StackConfigurationManager, - StackSummary, StartInstanceRequest, StartStackRequest, StopInstanceRequest, StopStackRequest, TagResourceRequest, - TemporaryCredential, - TimeBasedAutoScalingConfiguration, UnassignInstanceRequest, UnassignVolumeRequest, UntagResourceRequest, @@ -320,9 +262,7 @@ import { UpdateStackRequest, UpdateUserProfileRequest, UpdateVolumeRequest, - UserProfile, ValidationException, - Volume, VolumeConfiguration, WeeklyAutoScalingSchedule, } from "../models/models_0"; @@ -337,7 +277,7 @@ export const se_AssignInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssignInstance"); let body: any; - body = JSON.stringify(se_AssignInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +290,7 @@ export const se_AssignVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssignVolume"); let body: any; - body = JSON.stringify(se_AssignVolumeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +303,7 @@ export const se_AssociateElasticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateElasticIp"); let body: any; - body = JSON.stringify(se_AssociateElasticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +316,7 @@ export const se_AttachElasticLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachElasticLoadBalancer"); let body: any; - body = JSON.stringify(se_AttachElasticLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +329,7 @@ export const se_CloneStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CloneStack"); let body: any; - body = JSON.stringify(se_CloneStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +342,7 @@ export const se_CreateAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApp"); let body: any; - body = JSON.stringify(se_CreateAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +355,7 @@ export const se_CreateDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDeployment"); let body: any; - body = JSON.stringify(se_CreateDeploymentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -428,7 +368,7 @@ export const se_CreateInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInstance"); let body: any; - body = JSON.stringify(se_CreateInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,7 +381,7 @@ export const se_CreateLayerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLayer"); let body: any; - body = JSON.stringify(se_CreateLayerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -454,7 +394,7 @@ export const se_CreateStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStack"); let body: any; - body = JSON.stringify(se_CreateStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -467,7 +407,7 @@ export const se_CreateUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserProfile"); let body: any; - body = JSON.stringify(se_CreateUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -480,7 +420,7 @@ export const se_DeleteAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApp"); let body: any; - body = JSON.stringify(se_DeleteAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -493,7 +433,7 @@ export const se_DeleteInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInstance"); let body: any; - body = JSON.stringify(se_DeleteInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -506,7 +446,7 @@ export const se_DeleteLayerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLayer"); let body: any; - body = JSON.stringify(se_DeleteLayerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -519,7 +459,7 @@ export const se_DeleteStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStack"); let body: any; - body = JSON.stringify(se_DeleteStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -532,7 +472,7 @@ export const se_DeleteUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserProfile"); let body: any; - body = JSON.stringify(se_DeleteUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +485,7 @@ export const se_DeregisterEcsClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterEcsCluster"); let body: any; - body = JSON.stringify(se_DeregisterEcsClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -558,7 +498,7 @@ export const se_DeregisterElasticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterElasticIp"); let body: any; - body = JSON.stringify(se_DeregisterElasticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -571,7 +511,7 @@ export const se_DeregisterInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterInstance"); let body: any; - body = JSON.stringify(se_DeregisterInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +524,7 @@ export const se_DeregisterRdsDbInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterRdsDbInstance"); let body: any; - body = JSON.stringify(se_DeregisterRdsDbInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +537,7 @@ export const se_DeregisterVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterVolume"); let body: any; - body = JSON.stringify(se_DeregisterVolumeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +550,7 @@ export const se_DescribeAgentVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAgentVersions"); let body: any; - body = JSON.stringify(se_DescribeAgentVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -623,7 +563,7 @@ export const se_DescribeAppsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApps"); let body: any; - body = JSON.stringify(se_DescribeAppsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -636,7 +576,7 @@ export const se_DescribeCommandsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCommands"); let body: any; - body = JSON.stringify(se_DescribeCommandsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +589,7 @@ export const se_DescribeDeploymentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDeployments"); let body: any; - body = JSON.stringify(se_DescribeDeploymentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +602,7 @@ export const se_DescribeEcsClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEcsClusters"); let body: any; - body = JSON.stringify(se_DescribeEcsClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -675,7 +615,7 @@ export const se_DescribeElasticIpsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeElasticIps"); let body: any; - body = JSON.stringify(se_DescribeElasticIpsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -688,7 +628,7 @@ export const se_DescribeElasticLoadBalancersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeElasticLoadBalancers"); let body: any; - body = JSON.stringify(se_DescribeElasticLoadBalancersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -701,7 +641,7 @@ export const se_DescribeInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstances"); let body: any; - body = JSON.stringify(se_DescribeInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -714,7 +654,7 @@ export const se_DescribeLayersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLayers"); let body: any; - body = JSON.stringify(se_DescribeLayersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -727,7 +667,7 @@ export const se_DescribeLoadBasedAutoScalingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLoadBasedAutoScaling"); let body: any; - body = JSON.stringify(se_DescribeLoadBasedAutoScalingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -764,7 +704,7 @@ export const se_DescribePermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePermissions"); let body: any; - body = JSON.stringify(se_DescribePermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -777,7 +717,7 @@ export const se_DescribeRaidArraysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRaidArrays"); let body: any; - body = JSON.stringify(se_DescribeRaidArraysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -790,7 +730,7 @@ export const se_DescribeRdsDbInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRdsDbInstances"); let body: any; - body = JSON.stringify(se_DescribeRdsDbInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,7 +743,7 @@ export const se_DescribeServiceErrorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServiceErrors"); let body: any; - body = JSON.stringify(se_DescribeServiceErrorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -816,7 +756,7 @@ export const se_DescribeStackProvisioningParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStackProvisioningParameters"); let body: any; - body = JSON.stringify(se_DescribeStackProvisioningParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -829,7 +769,7 @@ export const se_DescribeStacksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStacks"); let body: any; - body = JSON.stringify(se_DescribeStacksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -842,7 +782,7 @@ export const se_DescribeStackSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStackSummary"); let body: any; - body = JSON.stringify(se_DescribeStackSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -855,7 +795,7 @@ export const se_DescribeTimeBasedAutoScalingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTimeBasedAutoScaling"); let body: any; - body = JSON.stringify(se_DescribeTimeBasedAutoScalingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -868,7 +808,7 @@ export const se_DescribeUserProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserProfiles"); let body: any; - body = JSON.stringify(se_DescribeUserProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -881,7 +821,7 @@ export const se_DescribeVolumesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVolumes"); let body: any; - body = JSON.stringify(se_DescribeVolumesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -894,7 +834,7 @@ export const se_DetachElasticLoadBalancerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachElasticLoadBalancer"); let body: any; - body = JSON.stringify(se_DetachElasticLoadBalancerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -907,7 +847,7 @@ export const se_DisassociateElasticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateElasticIp"); let body: any; - body = JSON.stringify(se_DisassociateElasticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -920,7 +860,7 @@ export const se_GetHostnameSuggestionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetHostnameSuggestion"); let body: any; - body = JSON.stringify(se_GetHostnameSuggestionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -933,7 +873,7 @@ export const se_GrantAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GrantAccess"); let body: any; - body = JSON.stringify(se_GrantAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -946,7 +886,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -959,7 +899,7 @@ export const se_RebootInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebootInstance"); let body: any; - body = JSON.stringify(se_RebootInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -972,7 +912,7 @@ export const se_RegisterEcsClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterEcsCluster"); let body: any; - body = JSON.stringify(se_RegisterEcsClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -985,7 +925,7 @@ export const se_RegisterElasticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterElasticIp"); let body: any; - body = JSON.stringify(se_RegisterElasticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -998,7 +938,7 @@ export const se_RegisterInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterInstance"); let body: any; - body = JSON.stringify(se_RegisterInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1011,7 +951,7 @@ export const se_RegisterRdsDbInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterRdsDbInstance"); let body: any; - body = JSON.stringify(se_RegisterRdsDbInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1024,7 +964,7 @@ export const se_RegisterVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterVolume"); let body: any; - body = JSON.stringify(se_RegisterVolumeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1050,7 +990,7 @@ export const se_SetPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetPermission"); let body: any; - body = JSON.stringify(se_SetPermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1063,7 +1003,7 @@ export const se_SetTimeBasedAutoScalingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetTimeBasedAutoScaling"); let body: any; - body = JSON.stringify(se_SetTimeBasedAutoScalingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1076,7 +1016,7 @@ export const se_StartInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartInstance"); let body: any; - body = JSON.stringify(se_StartInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1089,7 +1029,7 @@ export const se_StartStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartStack"); let body: any; - body = JSON.stringify(se_StartStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1102,7 +1042,7 @@ export const se_StopInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopInstance"); let body: any; - body = JSON.stringify(se_StopInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1115,7 +1055,7 @@ export const se_StopStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopStack"); let body: any; - body = JSON.stringify(se_StopStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1128,7 +1068,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1141,7 +1081,7 @@ export const se_UnassignInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnassignInstance"); let body: any; - body = JSON.stringify(se_UnassignInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1154,7 +1094,7 @@ export const se_UnassignVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnassignVolume"); let body: any; - body = JSON.stringify(se_UnassignVolumeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1167,7 +1107,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1180,7 +1120,7 @@ export const se_UpdateAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApp"); let body: any; - body = JSON.stringify(se_UpdateAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1193,7 +1133,7 @@ export const se_UpdateElasticIpCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateElasticIp"); let body: any; - body = JSON.stringify(se_UpdateElasticIpRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1206,7 +1146,7 @@ export const se_UpdateInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateInstance"); let body: any; - body = JSON.stringify(se_UpdateInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1219,7 +1159,7 @@ export const se_UpdateLayerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLayer"); let body: any; - body = JSON.stringify(se_UpdateLayerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1232,7 +1172,7 @@ export const se_UpdateMyUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMyUserProfile"); let body: any; - body = JSON.stringify(se_UpdateMyUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1245,7 +1185,7 @@ export const se_UpdateRdsDbInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRdsDbInstance"); let body: any; - body = JSON.stringify(se_UpdateRdsDbInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1258,7 +1198,7 @@ export const se_UpdateStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateStack"); let body: any; - body = JSON.stringify(se_UpdateStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1271,7 +1211,7 @@ export const se_UpdateUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserProfile"); let body: any; - body = JSON.stringify(se_UpdateUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1284,7 +1224,7 @@ export const se_UpdateVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVolume"); let body: any; - body = JSON.stringify(se_UpdateVolumeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1302,7 +1242,7 @@ export const de_AssignInstanceCommand = async ( const response: AssignInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1326,10 +1266,9 @@ const de_AssignInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1349,7 +1288,7 @@ export const de_AssignVolumeCommand = async ( const response: AssignVolumeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1373,10 +1312,9 @@ const de_AssignVolumeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1396,7 +1334,7 @@ export const de_AssociateElasticIpCommand = async ( const response: AssociateElasticIpCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1420,10 +1358,9 @@ const de_AssociateElasticIpCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1443,7 +1380,7 @@ export const de_AttachElasticLoadBalancerCommand = async ( const response: AttachElasticLoadBalancerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1467,10 +1404,9 @@ const de_AttachElasticLoadBalancerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1488,12 +1424,12 @@ export const de_CloneStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CloneStackResult(data, context); + contents = _json(data); const response: CloneStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1517,10 +1453,9 @@ const de_CloneStackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1538,12 +1473,12 @@ export const de_CreateAppCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAppResult(data, context); + contents = _json(data); const response: CreateAppCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1567,10 +1502,9 @@ const de_CreateAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1588,12 +1522,12 @@ export const de_CreateDeploymentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDeploymentResult(data, context); + contents = _json(data); const response: CreateDeploymentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1617,10 +1551,9 @@ const de_CreateDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1638,12 +1571,12 @@ export const de_CreateInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateInstanceResult(data, context); + contents = _json(data); const response: CreateInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1667,10 +1600,9 @@ const de_CreateInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1688,12 +1620,12 @@ export const de_CreateLayerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLayerResult(data, context); + contents = _json(data); const response: CreateLayerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1717,10 +1649,9 @@ const de_CreateLayerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1738,12 +1669,12 @@ export const de_CreateStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateStackResult(data, context); + contents = _json(data); const response: CreateStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1764,10 +1695,9 @@ const de_CreateStackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1785,12 +1715,12 @@ export const de_CreateUserProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserProfileResult(data, context); + contents = _json(data); const response: CreateUserProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1811,10 +1741,9 @@ const de_CreateUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1834,7 +1763,7 @@ export const de_DeleteAppCommand = async ( const response: DeleteAppCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1858,10 +1787,9 @@ const de_DeleteAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1881,7 +1809,7 @@ export const de_DeleteInstanceCommand = async ( const response: DeleteInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1905,10 +1833,9 @@ const de_DeleteInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1928,7 +1855,7 @@ export const de_DeleteLayerCommand = async ( const response: DeleteLayerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1952,10 +1879,9 @@ const de_DeleteLayerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1975,7 +1901,7 @@ export const de_DeleteStackCommand = async ( const response: DeleteStackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1999,10 +1925,9 @@ const de_DeleteStackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2022,7 +1947,7 @@ export const de_DeleteUserProfileCommand = async ( const response: DeleteUserProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2046,10 +1971,9 @@ const de_DeleteUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2069,7 +1993,7 @@ export const de_DeregisterEcsClusterCommand = async ( const response: DeregisterEcsClusterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2093,10 +2017,9 @@ const de_DeregisterEcsClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2116,7 +2039,7 @@ export const de_DeregisterElasticIpCommand = async ( const response: DeregisterElasticIpCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2140,10 +2063,9 @@ const de_DeregisterElasticIpCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2163,7 +2085,7 @@ export const de_DeregisterInstanceCommand = async ( const response: DeregisterInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2187,10 +2109,9 @@ const de_DeregisterInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2210,7 +2131,7 @@ export const de_DeregisterRdsDbInstanceCommand = async ( const response: DeregisterRdsDbInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2234,10 +2155,9 @@ const de_DeregisterRdsDbInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2257,7 +2177,7 @@ export const de_DeregisterVolumeCommand = async ( const response: DeregisterVolumeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2281,10 +2201,9 @@ const de_DeregisterVolumeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2302,12 +2221,12 @@ export const de_DescribeAgentVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAgentVersionsResult(data, context); + contents = _json(data); const response: DescribeAgentVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2331,10 +2250,9 @@ const de_DescribeAgentVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2352,12 +2270,12 @@ export const de_DescribeAppsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAppsResult(data, context); + contents = _json(data); const response: DescribeAppsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2381,10 +2299,9 @@ const de_DescribeAppsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2402,12 +2319,12 @@ export const de_DescribeCommandsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCommandsResult(data, context); + contents = _json(data); const response: DescribeCommandsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2431,10 +2348,9 @@ const de_DescribeCommandsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2452,12 +2368,12 @@ export const de_DescribeDeploymentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDeploymentsResult(data, context); + contents = _json(data); const response: DescribeDeploymentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2481,10 +2397,9 @@ const de_DescribeDeploymentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2502,12 +2417,12 @@ export const de_DescribeEcsClustersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEcsClustersResult(data, context); + contents = _json(data); const response: DescribeEcsClustersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2531,10 +2446,9 @@ const de_DescribeEcsClustersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2552,12 +2466,12 @@ export const de_DescribeElasticIpsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeElasticIpsResult(data, context); + contents = _json(data); const response: DescribeElasticIpsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2581,10 +2495,9 @@ const de_DescribeElasticIpsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2602,12 +2515,12 @@ export const de_DescribeElasticLoadBalancersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeElasticLoadBalancersResult(data, context); + contents = _json(data); const response: DescribeElasticLoadBalancersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2631,10 +2544,9 @@ const de_DescribeElasticLoadBalancersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2652,12 +2564,12 @@ export const de_DescribeInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeInstancesResult(data, context); + contents = _json(data); const response: DescribeInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2681,10 +2593,9 @@ const de_DescribeInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2702,12 +2613,12 @@ export const de_DescribeLayersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeLayersResult(data, context); + contents = _json(data); const response: DescribeLayersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2731,10 +2642,9 @@ const de_DescribeLayersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2757,7 +2667,7 @@ export const de_DescribeLoadBasedAutoScalingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2781,10 +2691,9 @@ const de_DescribeLoadBasedAutoScalingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2802,12 +2711,12 @@ export const de_DescribeMyUserProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMyUserProfileResult(data, context); + contents = _json(data); const response: DescribeMyUserProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2823,10 +2732,9 @@ const de_DescribeMyUserProfileCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2843,12 +2751,12 @@ export const de_DescribeOperatingSystemsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeOperatingSystemsResponse(data, context); + contents = _json(data); const response: DescribeOperatingSystemsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2864,10 +2772,9 @@ const de_DescribeOperatingSystemsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2884,12 +2791,12 @@ export const de_DescribePermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePermissionsResult(data, context); + contents = _json(data); const response: DescribePermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2913,10 +2820,9 @@ const de_DescribePermissionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2934,12 +2840,12 @@ export const de_DescribeRaidArraysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRaidArraysResult(data, context); + contents = _json(data); const response: DescribeRaidArraysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2963,10 +2869,9 @@ const de_DescribeRaidArraysCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2984,12 +2889,12 @@ export const de_DescribeRdsDbInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeRdsDbInstancesResult(data, context); + contents = _json(data); const response: DescribeRdsDbInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3013,10 +2918,9 @@ const de_DescribeRdsDbInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3034,12 +2938,12 @@ export const de_DescribeServiceErrorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeServiceErrorsResult(data, context); + contents = _json(data); const response: DescribeServiceErrorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3063,10 +2967,9 @@ const de_DescribeServiceErrorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3084,12 +2987,12 @@ export const de_DescribeStackProvisioningParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeStackProvisioningParametersResult(data, context); + contents = _json(data); const response: DescribeStackProvisioningParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3113,10 +3016,9 @@ const de_DescribeStackProvisioningParametersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3134,12 +3036,12 @@ export const de_DescribeStacksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeStacksResult(data, context); + contents = _json(data); const response: DescribeStacksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3163,10 +3065,9 @@ const de_DescribeStacksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3184,12 +3085,12 @@ export const de_DescribeStackSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeStackSummaryResult(data, context); + contents = _json(data); const response: DescribeStackSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3213,10 +3114,9 @@ const de_DescribeStackSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3234,12 +3134,12 @@ export const de_DescribeTimeBasedAutoScalingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTimeBasedAutoScalingResult(data, context); + contents = _json(data); const response: DescribeTimeBasedAutoScalingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3263,10 +3163,9 @@ const de_DescribeTimeBasedAutoScalingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3284,12 +3183,12 @@ export const de_DescribeUserProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeUserProfilesResult(data, context); + contents = _json(data); const response: DescribeUserProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3313,10 +3212,9 @@ const de_DescribeUserProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3334,12 +3232,12 @@ export const de_DescribeVolumesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeVolumesResult(data, context); + contents = _json(data); const response: DescribeVolumesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3363,10 +3261,9 @@ const de_DescribeVolumesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3386,7 +3283,7 @@ export const de_DetachElasticLoadBalancerCommand = async ( const response: DetachElasticLoadBalancerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3407,10 +3304,9 @@ const de_DetachElasticLoadBalancerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3430,7 +3326,7 @@ export const de_DisassociateElasticIpCommand = async ( const response: DisassociateElasticIpCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3454,10 +3350,9 @@ const de_DisassociateElasticIpCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3475,12 +3370,12 @@ export const de_GetHostnameSuggestionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetHostnameSuggestionResult(data, context); + contents = _json(data); const response: GetHostnameSuggestionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3504,10 +3399,9 @@ const de_GetHostnameSuggestionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3525,12 +3419,12 @@ export const de_GrantAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GrantAccessResult(data, context); + contents = _json(data); const response: GrantAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3554,10 +3448,9 @@ const de_GrantAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3575,12 +3468,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsResult(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3604,10 +3497,9 @@ const de_ListTagsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3627,7 +3519,7 @@ export const de_RebootInstanceCommand = async ( const response: RebootInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3651,10 +3543,9 @@ const de_RebootInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3672,12 +3563,12 @@ export const de_RegisterEcsClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterEcsClusterResult(data, context); + contents = _json(data); const response: RegisterEcsClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3701,10 +3592,9 @@ const de_RegisterEcsClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3722,12 +3612,12 @@ export const de_RegisterElasticIpCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterElasticIpResult(data, context); + contents = _json(data); const response: RegisterElasticIpCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3751,10 +3641,9 @@ const de_RegisterElasticIpCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3772,12 +3661,12 @@ export const de_RegisterInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterInstanceResult(data, context); + contents = _json(data); const response: RegisterInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3801,10 +3690,9 @@ const de_RegisterInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3824,7 +3712,7 @@ export const de_RegisterRdsDbInstanceCommand = async ( const response: RegisterRdsDbInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3848,10 +3736,9 @@ const de_RegisterRdsDbInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3869,12 +3756,12 @@ export const de_RegisterVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterVolumeResult(data, context); + contents = _json(data); const response: RegisterVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3898,10 +3785,9 @@ const de_RegisterVolumeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3921,7 +3807,7 @@ export const de_SetLoadBasedAutoScalingCommand = async ( const response: SetLoadBasedAutoScalingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3945,10 +3831,9 @@ const de_SetLoadBasedAutoScalingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3968,7 +3853,7 @@ export const de_SetPermissionCommand = async ( const response: SetPermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3992,10 +3877,9 @@ const de_SetPermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4015,7 +3899,7 @@ export const de_SetTimeBasedAutoScalingCommand = async ( const response: SetTimeBasedAutoScalingCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4039,10 +3923,9 @@ const de_SetTimeBasedAutoScalingCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4062,7 +3945,7 @@ export const de_StartInstanceCommand = async ( const response: StartInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4086,10 +3969,9 @@ const de_StartInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4109,7 +3991,7 @@ export const de_StartStackCommand = async ( const response: StartStackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4133,10 +4015,9 @@ const de_StartStackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4156,7 +4037,7 @@ export const de_StopInstanceCommand = async ( const response: StopInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4180,10 +4061,9 @@ const de_StopInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4203,7 +4083,7 @@ export const de_StopStackCommand = async ( const response: StopStackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4227,10 +4107,9 @@ const de_StopStackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4250,7 +4129,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4274,10 +4153,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4297,7 +4175,7 @@ export const de_UnassignInstanceCommand = async ( const response: UnassignInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4321,10 +4199,9 @@ const de_UnassignInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4344,7 +4221,7 @@ export const de_UnassignVolumeCommand = async ( const response: UnassignVolumeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4368,10 +4245,9 @@ const de_UnassignVolumeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4391,7 +4267,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4415,10 +4291,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4438,7 +4313,7 @@ export const de_UpdateAppCommand = async ( const response: UpdateAppCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4462,10 +4337,9 @@ const de_UpdateAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4485,7 +4359,7 @@ export const de_UpdateElasticIpCommand = async ( const response: UpdateElasticIpCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4509,10 +4383,9 @@ const de_UpdateElasticIpCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4532,7 +4405,7 @@ export const de_UpdateInstanceCommand = async ( const response: UpdateInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4556,10 +4429,9 @@ const de_UpdateInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4579,7 +4451,7 @@ export const de_UpdateLayerCommand = async ( const response: UpdateLayerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4603,10 +4475,9 @@ const de_UpdateLayerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4626,7 +4497,7 @@ export const de_UpdateMyUserProfileCommand = async ( const response: UpdateMyUserProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4647,10 +4518,9 @@ const de_UpdateMyUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4670,7 +4540,7 @@ export const de_UpdateRdsDbInstanceCommand = async ( const response: UpdateRdsDbInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4694,10 +4564,9 @@ const de_UpdateRdsDbInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4717,7 +4586,7 @@ export const de_UpdateStackCommand = async ( const response: UpdateStackCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4741,10 +4610,9 @@ const de_UpdateStackCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4764,7 +4632,7 @@ export const de_UpdateUserProfileCommand = async ( const response: UpdateUserProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4788,10 +4656,9 @@ const de_UpdateUserProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4811,7 +4678,7 @@ export const de_UpdateVolumeCommand = async ( const response: UpdateVolumeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4835,10 +4702,9 @@ const de_UpdateVolumeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4852,7 +4718,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4865,7 +4731,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4873,1749 +4739,321 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AppAttributes - */ -const se_AppAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [AppAttributesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AppAttributes omitted. -/** - * serializeAws_json1_1AssignInstanceRequest - */ -const se_AssignInstanceRequest = (input: AssignInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - }; -}; +// se_AssignInstanceRequest omitted. -/** - * serializeAws_json1_1AssignVolumeRequest - */ -const se_AssignVolumeRequest = (input: AssignVolumeRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; -}; +// se_AssignVolumeRequest omitted. -/** - * serializeAws_json1_1AssociateElasticIpRequest - */ -const se_AssociateElasticIpRequest = (input: AssociateElasticIpRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticIp != null && { ElasticIp: input.ElasticIp }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_AssociateElasticIpRequest omitted. -/** - * serializeAws_json1_1AttachElasticLoadBalancerRequest - */ -const se_AttachElasticLoadBalancerRequest = (input: AttachElasticLoadBalancerRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticLoadBalancerName != null && { ElasticLoadBalancerName: input.ElasticLoadBalancerName }), - ...(input.LayerId != null && { LayerId: input.LayerId }), - }; -}; +// se_AttachElasticLoadBalancerRequest omitted. /** * serializeAws_json1_1AutoScalingThresholds */ const se_AutoScalingThresholds = (input: AutoScalingThresholds, context: __SerdeContext): any => { - return { - ...(input.Alarms != null && { Alarms: se_Strings(input.Alarms, context) }), - ...(input.CpuThreshold != null && { CpuThreshold: __serializeFloat(input.CpuThreshold) }), - ...(input.IgnoreMetricsTime != null && { IgnoreMetricsTime: input.IgnoreMetricsTime }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.LoadThreshold != null && { LoadThreshold: __serializeFloat(input.LoadThreshold) }), - ...(input.MemoryThreshold != null && { MemoryThreshold: __serializeFloat(input.MemoryThreshold) }), - ...(input.ThresholdsWaitTime != null && { ThresholdsWaitTime: input.ThresholdsWaitTime }), - }; + return take(input, { + Alarms: _json, + CpuThreshold: __serializeFloat, + IgnoreMetricsTime: [], + InstanceCount: [], + LoadThreshold: __serializeFloat, + MemoryThreshold: __serializeFloat, + ThresholdsWaitTime: [], + }); }; -/** - * serializeAws_json1_1BlockDeviceMapping - */ -const se_BlockDeviceMapping = (input: BlockDeviceMapping, context: __SerdeContext): any => { - return { - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.Ebs != null && { Ebs: se_EbsBlockDevice(input.Ebs, context) }), - ...(input.NoDevice != null && { NoDevice: input.NoDevice }), - ...(input.VirtualName != null && { VirtualName: input.VirtualName }), - }; -}; +// se_BlockDeviceMapping omitted. -/** - * serializeAws_json1_1BlockDeviceMappings - */ -const se_BlockDeviceMappings = (input: BlockDeviceMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BlockDeviceMapping(entry, context); - }); -}; +// se_BlockDeviceMappings omitted. -/** - * serializeAws_json1_1ChefConfiguration - */ -const se_ChefConfiguration = (input: ChefConfiguration, context: __SerdeContext): any => { - return { - ...(input.BerkshelfVersion != null && { BerkshelfVersion: input.BerkshelfVersion }), - ...(input.ManageBerkshelf != null && { ManageBerkshelf: input.ManageBerkshelf }), - }; -}; +// se_ChefConfiguration omitted. -/** - * serializeAws_json1_1CloneStackRequest - */ -const se_CloneStackRequest = (input: CloneStackRequest, context: __SerdeContext): any => { - return { - ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }), - ...(input.Attributes != null && { Attributes: se_StackAttributes(input.Attributes, context) }), - ...(input.ChefConfiguration != null && { - ChefConfiguration: se_ChefConfiguration(input.ChefConfiguration, context), - }), - ...(input.CloneAppIds != null && { CloneAppIds: se_Strings(input.CloneAppIds, context) }), - ...(input.ClonePermissions != null && { ClonePermissions: input.ClonePermissions }), - ...(input.ConfigurationManager != null && { - ConfigurationManager: se_StackConfigurationManager(input.ConfigurationManager, context), - }), - ...(input.CustomCookbooksSource != null && { - CustomCookbooksSource: se_Source(input.CustomCookbooksSource, context), - }), - ...(input.CustomJson != null && { CustomJson: input.CustomJson }), - ...(input.DefaultAvailabilityZone != null && { DefaultAvailabilityZone: input.DefaultAvailabilityZone }), - ...(input.DefaultInstanceProfileArn != null && { DefaultInstanceProfileArn: input.DefaultInstanceProfileArn }), - ...(input.DefaultOs != null && { DefaultOs: input.DefaultOs }), - ...(input.DefaultRootDeviceType != null && { DefaultRootDeviceType: input.DefaultRootDeviceType }), - ...(input.DefaultSshKeyName != null && { DefaultSshKeyName: input.DefaultSshKeyName }), - ...(input.DefaultSubnetId != null && { DefaultSubnetId: input.DefaultSubnetId }), - ...(input.HostnameTheme != null && { HostnameTheme: input.HostnameTheme }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Region != null && { Region: input.Region }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.SourceStackId != null && { SourceStackId: input.SourceStackId }), - ...(input.UseCustomCookbooks != null && { UseCustomCookbooks: input.UseCustomCookbooks }), - ...(input.UseOpsworksSecurityGroups != null && { UseOpsworksSecurityGroups: input.UseOpsworksSecurityGroups }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_json1_1CloudWatchLogsConfiguration - */ -const se_CloudWatchLogsConfiguration = (input: CloudWatchLogsConfiguration, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.LogStreams != null && { LogStreams: se_CloudWatchLogsLogStreams(input.LogStreams, context) }), - }; -}; +// se_CloneStackRequest omitted. -/** - * serializeAws_json1_1CloudWatchLogsLogStream - */ -const se_CloudWatchLogsLogStream = (input: CloudWatchLogsLogStream, context: __SerdeContext): any => { - return { - ...(input.BatchCount != null && { BatchCount: input.BatchCount }), - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.BufferDuration != null && { BufferDuration: input.BufferDuration }), - ...(input.DatetimeFormat != null && { DatetimeFormat: input.DatetimeFormat }), - ...(input.Encoding != null && { Encoding: input.Encoding }), - ...(input.File != null && { File: input.File }), - ...(input.FileFingerprintLines != null && { FileFingerprintLines: input.FileFingerprintLines }), - ...(input.InitialPosition != null && { InitialPosition: input.InitialPosition }), - ...(input.LogGroupName != null && { LogGroupName: input.LogGroupName }), - ...(input.MultiLineStartPattern != null && { MultiLineStartPattern: input.MultiLineStartPattern }), - ...(input.TimeZone != null && { TimeZone: input.TimeZone }), - }; -}; +// se_CloudWatchLogsConfiguration omitted. -/** - * serializeAws_json1_1CloudWatchLogsLogStreams - */ -const se_CloudWatchLogsLogStreams = (input: CloudWatchLogsLogStream[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchLogsLogStream(entry, context); - }); -}; +// se_CloudWatchLogsLogStream omitted. -/** - * serializeAws_json1_1CreateAppRequest - */ -const se_CreateAppRequest = (input: CreateAppRequest, context: __SerdeContext): any => { - return { - ...(input.AppSource != null && { AppSource: se_Source(input.AppSource, context) }), - ...(input.Attributes != null && { Attributes: se_AppAttributes(input.Attributes, context) }), - ...(input.DataSources != null && { DataSources: se_DataSources(input.DataSources, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Domains != null && { Domains: se_Strings(input.Domains, context) }), - ...(input.EnableSsl != null && { EnableSsl: input.EnableSsl }), - ...(input.Environment != null && { Environment: se_EnvironmentVariables(input.Environment, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Shortname != null && { Shortname: input.Shortname }), - ...(input.SslConfiguration != null && { SslConfiguration: se_SslConfiguration(input.SslConfiguration, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_CloudWatchLogsLogStreams omitted. -/** - * serializeAws_json1_1CreateDeploymentRequest - */ -const se_CreateDeploymentRequest = (input: CreateDeploymentRequest, context: __SerdeContext): any => { - return { - ...(input.AppId != null && { AppId: input.AppId }), - ...(input.Command != null && { Command: se_DeploymentCommand(input.Command, context) }), - ...(input.Comment != null && { Comment: input.Comment }), - ...(input.CustomJson != null && { CustomJson: input.CustomJson }), - ...(input.InstanceIds != null && { InstanceIds: se_Strings(input.InstanceIds, context) }), - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_CreateAppRequest omitted. -/** - * serializeAws_json1_1CreateInstanceRequest - */ -const se_CreateInstanceRequest = (input: CreateInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }), - ...(input.AmiId != null && { AmiId: input.AmiId }), - ...(input.Architecture != null && { Architecture: input.Architecture }), - ...(input.AutoScalingType != null && { AutoScalingType: input.AutoScalingType }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.BlockDeviceMappings != null && { - BlockDeviceMappings: se_BlockDeviceMappings(input.BlockDeviceMappings, context), - }), - ...(input.EbsOptimized != null && { EbsOptimized: input.EbsOptimized }), - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.InstallUpdatesOnBoot != null && { InstallUpdatesOnBoot: input.InstallUpdatesOnBoot }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - ...(input.Os != null && { Os: input.Os }), - ...(input.RootDeviceType != null && { RootDeviceType: input.RootDeviceType }), - ...(input.SshKeyName != null && { SshKeyName: input.SshKeyName }), - ...(input.StackId != null && { StackId: input.StackId }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.Tenancy != null && { Tenancy: input.Tenancy }), - ...(input.VirtualizationType != null && { VirtualizationType: input.VirtualizationType }), - }; -}; - -/** - * serializeAws_json1_1CreateLayerRequest - */ -const se_CreateLayerRequest = (input: CreateLayerRequest, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_LayerAttributes(input.Attributes, context) }), - ...(input.AutoAssignElasticIps != null && { AutoAssignElasticIps: input.AutoAssignElasticIps }), - ...(input.AutoAssignPublicIps != null && { AutoAssignPublicIps: input.AutoAssignPublicIps }), - ...(input.CloudWatchLogsConfiguration != null && { - CloudWatchLogsConfiguration: se_CloudWatchLogsConfiguration(input.CloudWatchLogsConfiguration, context), - }), - ...(input.CustomInstanceProfileArn != null && { CustomInstanceProfileArn: input.CustomInstanceProfileArn }), - ...(input.CustomJson != null && { CustomJson: input.CustomJson }), - ...(input.CustomRecipes != null && { CustomRecipes: se_Recipes(input.CustomRecipes, context) }), - ...(input.CustomSecurityGroupIds != null && { - CustomSecurityGroupIds: se_Strings(input.CustomSecurityGroupIds, context), - }), - ...(input.EnableAutoHealing != null && { EnableAutoHealing: input.EnableAutoHealing }), - ...(input.InstallUpdatesOnBoot != null && { InstallUpdatesOnBoot: input.InstallUpdatesOnBoot }), - ...(input.LifecycleEventConfiguration != null && { - LifecycleEventConfiguration: se_LifecycleEventConfiguration(input.LifecycleEventConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Packages != null && { Packages: se_Strings(input.Packages, context) }), - ...(input.Shortname != null && { Shortname: input.Shortname }), - ...(input.StackId != null && { StackId: input.StackId }), - ...(input.Type != null && { Type: input.Type }), - ...(input.UseEbsOptimizedInstances != null && { UseEbsOptimizedInstances: input.UseEbsOptimizedInstances }), - ...(input.VolumeConfigurations != null && { - VolumeConfigurations: se_VolumeConfigurations(input.VolumeConfigurations, context), - }), - }; -}; - -/** - * serializeAws_json1_1CreateStackRequest - */ -const se_CreateStackRequest = (input: CreateStackRequest, context: __SerdeContext): any => { - return { - ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }), - ...(input.Attributes != null && { Attributes: se_StackAttributes(input.Attributes, context) }), - ...(input.ChefConfiguration != null && { - ChefConfiguration: se_ChefConfiguration(input.ChefConfiguration, context), - }), - ...(input.ConfigurationManager != null && { - ConfigurationManager: se_StackConfigurationManager(input.ConfigurationManager, context), - }), - ...(input.CustomCookbooksSource != null && { - CustomCookbooksSource: se_Source(input.CustomCookbooksSource, context), - }), - ...(input.CustomJson != null && { CustomJson: input.CustomJson }), - ...(input.DefaultAvailabilityZone != null && { DefaultAvailabilityZone: input.DefaultAvailabilityZone }), - ...(input.DefaultInstanceProfileArn != null && { DefaultInstanceProfileArn: input.DefaultInstanceProfileArn }), - ...(input.DefaultOs != null && { DefaultOs: input.DefaultOs }), - ...(input.DefaultRootDeviceType != null && { DefaultRootDeviceType: input.DefaultRootDeviceType }), - ...(input.DefaultSshKeyName != null && { DefaultSshKeyName: input.DefaultSshKeyName }), - ...(input.DefaultSubnetId != null && { DefaultSubnetId: input.DefaultSubnetId }), - ...(input.HostnameTheme != null && { HostnameTheme: input.HostnameTheme }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Region != null && { Region: input.Region }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.UseCustomCookbooks != null && { UseCustomCookbooks: input.UseCustomCookbooks }), - ...(input.UseOpsworksSecurityGroups != null && { UseOpsworksSecurityGroups: input.UseOpsworksSecurityGroups }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_json1_1CreateUserProfileRequest - */ -const se_CreateUserProfileRequest = (input: CreateUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.AllowSelfManagement != null && { AllowSelfManagement: input.AllowSelfManagement }), - ...(input.IamUserArn != null && { IamUserArn: input.IamUserArn }), - ...(input.SshPublicKey != null && { SshPublicKey: input.SshPublicKey }), - ...(input.SshUsername != null && { SshUsername: input.SshUsername }), - }; -}; +// se_CreateDeploymentRequest omitted. -/** - * serializeAws_json1_1DailyAutoScalingSchedule - */ -const se_DailyAutoScalingSchedule = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CreateInstanceRequest omitted. -/** - * serializeAws_json1_1DataSource - */ -const se_DataSource = (input: DataSource, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_CreateLayerRequest omitted. -/** - * serializeAws_json1_1DataSources - */ -const se_DataSources = (input: DataSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSource(entry, context); - }); -}; +// se_CreateStackRequest omitted. -/** - * serializeAws_json1_1DeleteAppRequest - */ -const se_DeleteAppRequest = (input: DeleteAppRequest, context: __SerdeContext): any => { - return { - ...(input.AppId != null && { AppId: input.AppId }), - }; -}; +// se_CreateUserProfileRequest omitted. -/** - * serializeAws_json1_1DeleteInstanceRequest - */ -const se_DeleteInstanceRequest = (input: DeleteInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.DeleteElasticIp != null && { DeleteElasticIp: input.DeleteElasticIp }), - ...(input.DeleteVolumes != null && { DeleteVolumes: input.DeleteVolumes }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_DailyAutoScalingSchedule omitted. -/** - * serializeAws_json1_1DeleteLayerRequest - */ -const se_DeleteLayerRequest = (input: DeleteLayerRequest, context: __SerdeContext): any => { - return { - ...(input.LayerId != null && { LayerId: input.LayerId }), - }; -}; +// se_DataSource omitted. -/** - * serializeAws_json1_1DeleteStackRequest - */ -const se_DeleteStackRequest = (input: DeleteStackRequest, context: __SerdeContext): any => { - return { - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DataSources omitted. -/** - * serializeAws_json1_1DeleteUserProfileRequest - */ -const se_DeleteUserProfileRequest = (input: DeleteUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.IamUserArn != null && { IamUserArn: input.IamUserArn }), - }; -}; +// se_DeleteAppRequest omitted. -/** - * serializeAws_json1_1DeploymentCommand - */ -const se_DeploymentCommand = (input: DeploymentCommand, context: __SerdeContext): any => { - return { - ...(input.Args != null && { Args: se_DeploymentCommandArgs(input.Args, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteInstanceRequest omitted. -/** - * serializeAws_json1_1DeploymentCommandArgs - */ -const se_DeploymentCommandArgs = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_Strings(value, context); - return acc; - }, {}); -}; +// se_DeleteLayerRequest omitted. -/** - * serializeAws_json1_1DeregisterEcsClusterRequest - */ -const se_DeregisterEcsClusterRequest = (input: DeregisterEcsClusterRequest, context: __SerdeContext): any => { - return { - ...(input.EcsClusterArn != null && { EcsClusterArn: input.EcsClusterArn }), - }; -}; +// se_DeleteStackRequest omitted. -/** - * serializeAws_json1_1DeregisterElasticIpRequest - */ -const se_DeregisterElasticIpRequest = (input: DeregisterElasticIpRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticIp != null && { ElasticIp: input.ElasticIp }), - }; -}; +// se_DeleteUserProfileRequest omitted. -/** - * serializeAws_json1_1DeregisterInstanceRequest - */ -const se_DeregisterInstanceRequest = (input: DeregisterInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_DeploymentCommand omitted. -/** - * serializeAws_json1_1DeregisterRdsDbInstanceRequest - */ -const se_DeregisterRdsDbInstanceRequest = (input: DeregisterRdsDbInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.RdsDbInstanceArn != null && { RdsDbInstanceArn: input.RdsDbInstanceArn }), - }; -}; +// se_DeploymentCommandArgs omitted. -/** - * serializeAws_json1_1DeregisterVolumeRequest - */ -const se_DeregisterVolumeRequest = (input: DeregisterVolumeRequest, context: __SerdeContext): any => { - return { - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; -}; +// se_DeregisterEcsClusterRequest omitted. -/** - * serializeAws_json1_1DescribeAgentVersionsRequest - */ -const se_DescribeAgentVersionsRequest = (input: DescribeAgentVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationManager != null && { - ConfigurationManager: se_StackConfigurationManager(input.ConfigurationManager, context), - }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DeregisterElasticIpRequest omitted. -/** - * serializeAws_json1_1DescribeAppsRequest - */ -const se_DescribeAppsRequest = (input: DescribeAppsRequest, context: __SerdeContext): any => { - return { - ...(input.AppIds != null && { AppIds: se_Strings(input.AppIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DeregisterInstanceRequest omitted. -/** - * serializeAws_json1_1DescribeCommandsRequest - */ -const se_DescribeCommandsRequest = (input: DescribeCommandsRequest, context: __SerdeContext): any => { - return { - ...(input.CommandIds != null && { CommandIds: se_Strings(input.CommandIds, context) }), - ...(input.DeploymentId != null && { DeploymentId: input.DeploymentId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_DeregisterRdsDbInstanceRequest omitted. -/** - * serializeAws_json1_1DescribeDeploymentsRequest - */ -const se_DescribeDeploymentsRequest = (input: DescribeDeploymentsRequest, context: __SerdeContext): any => { - return { - ...(input.AppId != null && { AppId: input.AppId }), - ...(input.DeploymentIds != null && { DeploymentIds: se_Strings(input.DeploymentIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DeregisterVolumeRequest omitted. -/** - * serializeAws_json1_1DescribeEcsClustersRequest - */ -const se_DescribeEcsClustersRequest = (input: DescribeEcsClustersRequest, context: __SerdeContext): any => { - return { - ...(input.EcsClusterArns != null && { EcsClusterArns: se_Strings(input.EcsClusterArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeAgentVersionsRequest omitted. -/** - * serializeAws_json1_1DescribeElasticIpsRequest - */ -const se_DescribeElasticIpsRequest = (input: DescribeElasticIpsRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Ips != null && { Ips: se_Strings(input.Ips, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeAppsRequest omitted. -/** - * serializeAws_json1_1DescribeElasticLoadBalancersRequest - */ -const se_DescribeElasticLoadBalancersRequest = ( - input: DescribeElasticLoadBalancersRequest, - context: __SerdeContext -): any => { - return { - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeCommandsRequest omitted. -/** - * serializeAws_json1_1DescribeInstancesRequest - */ -const se_DescribeInstancesRequest = (input: DescribeInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceIds != null && { InstanceIds: se_Strings(input.InstanceIds, context) }), - ...(input.LayerId != null && { LayerId: input.LayerId }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeDeploymentsRequest omitted. -/** - * serializeAws_json1_1DescribeLayersRequest - */ -const se_DescribeLayersRequest = (input: DescribeLayersRequest, context: __SerdeContext): any => { - return { - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeEcsClustersRequest omitted. -/** - * serializeAws_json1_1DescribeLoadBasedAutoScalingRequest - */ -const se_DescribeLoadBasedAutoScalingRequest = ( - input: DescribeLoadBasedAutoScalingRequest, - context: __SerdeContext -): any => { - return { - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - }; -}; +// se_DescribeElasticIpsRequest omitted. -/** - * serializeAws_json1_1DescribePermissionsRequest - */ -const se_DescribePermissionsRequest = (input: DescribePermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.IamUserArn != null && { IamUserArn: input.IamUserArn }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeElasticLoadBalancersRequest omitted. -/** - * serializeAws_json1_1DescribeRaidArraysRequest - */ -const se_DescribeRaidArraysRequest = (input: DescribeRaidArraysRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.RaidArrayIds != null && { RaidArrayIds: se_Strings(input.RaidArrayIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeInstancesRequest omitted. -/** - * serializeAws_json1_1DescribeRdsDbInstancesRequest - */ -const se_DescribeRdsDbInstancesRequest = (input: DescribeRdsDbInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.RdsDbInstanceArns != null && { RdsDbInstanceArns: se_Strings(input.RdsDbInstanceArns, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeLayersRequest omitted. -/** - * serializeAws_json1_1DescribeServiceErrorsRequest - */ -const se_DescribeServiceErrorsRequest = (input: DescribeServiceErrorsRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ServiceErrorIds != null && { ServiceErrorIds: se_Strings(input.ServiceErrorIds, context) }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeLoadBasedAutoScalingRequest omitted. -/** - * serializeAws_json1_1DescribeStackProvisioningParametersRequest - */ -const se_DescribeStackProvisioningParametersRequest = ( - input: DescribeStackProvisioningParametersRequest, - context: __SerdeContext -): any => { - return { - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribePermissionsRequest omitted. -/** - * serializeAws_json1_1DescribeStacksRequest - */ -const se_DescribeStacksRequest = (input: DescribeStacksRequest, context: __SerdeContext): any => { - return { - ...(input.StackIds != null && { StackIds: se_Strings(input.StackIds, context) }), - }; -}; +// se_DescribeRaidArraysRequest omitted. -/** - * serializeAws_json1_1DescribeStackSummaryRequest - */ -const se_DescribeStackSummaryRequest = (input: DescribeStackSummaryRequest, context: __SerdeContext): any => { - return { - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_DescribeRdsDbInstancesRequest omitted. -/** - * serializeAws_json1_1DescribeTimeBasedAutoScalingRequest - */ -const se_DescribeTimeBasedAutoScalingRequest = ( - input: DescribeTimeBasedAutoScalingRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceIds != null && { InstanceIds: se_Strings(input.InstanceIds, context) }), - }; -}; +// se_DescribeServiceErrorsRequest omitted. -/** - * serializeAws_json1_1DescribeUserProfilesRequest - */ -const se_DescribeUserProfilesRequest = (input: DescribeUserProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.IamUserArns != null && { IamUserArns: se_Strings(input.IamUserArns, context) }), - }; -}; +// se_DescribeStackProvisioningParametersRequest omitted. -/** - * serializeAws_json1_1DescribeVolumesRequest - */ -const se_DescribeVolumesRequest = (input: DescribeVolumesRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.RaidArrayId != null && { RaidArrayId: input.RaidArrayId }), - ...(input.StackId != null && { StackId: input.StackId }), - ...(input.VolumeIds != null && { VolumeIds: se_Strings(input.VolumeIds, context) }), - }; -}; +// se_DescribeStacksRequest omitted. + +// se_DescribeStackSummaryRequest omitted. + +// se_DescribeTimeBasedAutoScalingRequest omitted. + +// se_DescribeUserProfilesRequest omitted. + +// se_DescribeVolumesRequest omitted. -/** - * serializeAws_json1_1DetachElasticLoadBalancerRequest - */ -const se_DetachElasticLoadBalancerRequest = (input: DetachElasticLoadBalancerRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticLoadBalancerName != null && { ElasticLoadBalancerName: input.ElasticLoadBalancerName }), - ...(input.LayerId != null && { LayerId: input.LayerId }), - }; -}; +// se_DetachElasticLoadBalancerRequest omitted. -/** - * serializeAws_json1_1DisassociateElasticIpRequest - */ -const se_DisassociateElasticIpRequest = (input: DisassociateElasticIpRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticIp != null && { ElasticIp: input.ElasticIp }), - }; -}; +// se_DisassociateElasticIpRequest omitted. -/** - * serializeAws_json1_1EbsBlockDevice - */ -const se_EbsBlockDevice = (input: EbsBlockDevice, context: __SerdeContext): any => { - return { - ...(input.DeleteOnTermination != null && { DeleteOnTermination: input.DeleteOnTermination }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; +// se_EbsBlockDevice omitted. -/** - * serializeAws_json1_1EnvironmentVariable - */ -const se_EnvironmentVariable = (input: EnvironmentVariable, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Secure != null && { Secure: input.Secure }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_EnvironmentVariable omitted. -/** - * serializeAws_json1_1EnvironmentVariables - */ -const se_EnvironmentVariables = (input: EnvironmentVariable[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnvironmentVariable(entry, context); - }); -}; +// se_EnvironmentVariables omitted. -/** - * serializeAws_json1_1GetHostnameSuggestionRequest - */ -const se_GetHostnameSuggestionRequest = (input: GetHostnameSuggestionRequest, context: __SerdeContext): any => { - return { - ...(input.LayerId != null && { LayerId: input.LayerId }), - }; -}; +// se_GetHostnameSuggestionRequest omitted. -/** - * serializeAws_json1_1GrantAccessRequest - */ -const se_GrantAccessRequest = (input: GrantAccessRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ValidForInMinutes != null && { ValidForInMinutes: input.ValidForInMinutes }), - }; -}; +// se_GrantAccessRequest omitted. -/** - * serializeAws_json1_1InstanceIdentity - */ -const se_InstanceIdentity = (input: InstanceIdentity, context: __SerdeContext): any => { - return { - ...(input.Document != null && { Document: input.Document }), - ...(input.Signature != null && { Signature: input.Signature }), - }; -}; +// se_InstanceIdentity omitted. -/** - * serializeAws_json1_1LayerAttributes - */ -const se_LayerAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [LayerAttributesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_LayerAttributes omitted. -/** - * serializeAws_json1_1LifecycleEventConfiguration - */ -const se_LifecycleEventConfiguration = (input: LifecycleEventConfiguration, context: __SerdeContext): any => { - return { - ...(input.Shutdown != null && { Shutdown: se_ShutdownEventConfiguration(input.Shutdown, context) }), - }; -}; +// se_LifecycleEventConfiguration omitted. -/** - * serializeAws_json1_1ListTagsRequest - */ -const se_ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsRequest omitted. -/** - * serializeAws_json1_1RebootInstanceRequest - */ -const se_RebootInstanceRequest = (input: RebootInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_RebootInstanceRequest omitted. -/** - * serializeAws_json1_1Recipes - */ -const se_Recipes = (input: Recipes, context: __SerdeContext): any => { - return { - ...(input.Configure != null && { Configure: se_Strings(input.Configure, context) }), - ...(input.Deploy != null && { Deploy: se_Strings(input.Deploy, context) }), - ...(input.Setup != null && { Setup: se_Strings(input.Setup, context) }), - ...(input.Shutdown != null && { Shutdown: se_Strings(input.Shutdown, context) }), - ...(input.Undeploy != null && { Undeploy: se_Strings(input.Undeploy, context) }), - }; -}; +// se_Recipes omitted. -/** - * serializeAws_json1_1RegisterEcsClusterRequest - */ -const se_RegisterEcsClusterRequest = (input: RegisterEcsClusterRequest, context: __SerdeContext): any => { - return { - ...(input.EcsClusterArn != null && { EcsClusterArn: input.EcsClusterArn }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_RegisterEcsClusterRequest omitted. -/** - * serializeAws_json1_1RegisterElasticIpRequest - */ -const se_RegisterElasticIpRequest = (input: RegisterElasticIpRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticIp != null && { ElasticIp: input.ElasticIp }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_RegisterElasticIpRequest omitted. -/** - * serializeAws_json1_1RegisterInstanceRequest - */ -const se_RegisterInstanceRequest = (input: RegisterInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.InstanceIdentity != null && { InstanceIdentity: se_InstanceIdentity(input.InstanceIdentity, context) }), - ...(input.PrivateIp != null && { PrivateIp: input.PrivateIp }), - ...(input.PublicIp != null && { PublicIp: input.PublicIp }), - ...(input.RsaPublicKey != null && { RsaPublicKey: input.RsaPublicKey }), - ...(input.RsaPublicKeyFingerprint != null && { RsaPublicKeyFingerprint: input.RsaPublicKeyFingerprint }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_RegisterInstanceRequest omitted. -/** - * serializeAws_json1_1RegisterRdsDbInstanceRequest - */ -const se_RegisterRdsDbInstanceRequest = (input: RegisterRdsDbInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.DbPassword != null && { DbPassword: input.DbPassword }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.RdsDbInstanceArn != null && { RdsDbInstanceArn: input.RdsDbInstanceArn }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_RegisterRdsDbInstanceRequest omitted. -/** - * serializeAws_json1_1RegisterVolumeRequest - */ -const se_RegisterVolumeRequest = (input: RegisterVolumeRequest, context: __SerdeContext): any => { - return { - ...(input.Ec2VolumeId != null && { Ec2VolumeId: input.Ec2VolumeId }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_RegisterVolumeRequest omitted. /** * serializeAws_json1_1SetLoadBasedAutoScalingRequest */ const se_SetLoadBasedAutoScalingRequest = (input: SetLoadBasedAutoScalingRequest, context: __SerdeContext): any => { - return { - ...(input.DownScaling != null && { DownScaling: se_AutoScalingThresholds(input.DownScaling, context) }), - ...(input.Enable != null && { Enable: input.Enable }), - ...(input.LayerId != null && { LayerId: input.LayerId }), - ...(input.UpScaling != null && { UpScaling: se_AutoScalingThresholds(input.UpScaling, context) }), - }; + return take(input, { + DownScaling: (_) => se_AutoScalingThresholds(_, context), + Enable: [], + LayerId: [], + UpScaling: (_) => se_AutoScalingThresholds(_, context), + }); }; -/** - * serializeAws_json1_1SetPermissionRequest - */ -const se_SetPermissionRequest = (input: SetPermissionRequest, context: __SerdeContext): any => { - return { - ...(input.AllowSsh != null && { AllowSsh: input.AllowSsh }), - ...(input.AllowSudo != null && { AllowSudo: input.AllowSudo }), - ...(input.IamUserArn != null && { IamUserArn: input.IamUserArn }), - ...(input.Level != null && { Level: input.Level }), - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_SetPermissionRequest omitted. -/** - * serializeAws_json1_1SetTimeBasedAutoScalingRequest - */ -const se_SetTimeBasedAutoScalingRequest = (input: SetTimeBasedAutoScalingRequest, context: __SerdeContext): any => { - return { - ...(input.AutoScalingSchedule != null && { - AutoScalingSchedule: se_WeeklyAutoScalingSchedule(input.AutoScalingSchedule, context), - }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_SetTimeBasedAutoScalingRequest omitted. -/** - * serializeAws_json1_1ShutdownEventConfiguration - */ -const se_ShutdownEventConfiguration = (input: ShutdownEventConfiguration, context: __SerdeContext): any => { - return { - ...(input.DelayUntilElbConnectionsDrained != null && { - DelayUntilElbConnectionsDrained: input.DelayUntilElbConnectionsDrained, - }), - ...(input.ExecutionTimeout != null && { ExecutionTimeout: input.ExecutionTimeout }), - }; -}; +// se_ShutdownEventConfiguration omitted. -/** - * serializeAws_json1_1Source - */ -const se_Source = (input: Source, context: __SerdeContext): any => { - return { - ...(input.Password != null && { Password: input.Password }), - ...(input.Revision != null && { Revision: input.Revision }), - ...(input.SshKey != null && { SshKey: input.SshKey }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Url != null && { Url: input.Url }), - ...(input.Username != null && { Username: input.Username }), - }; -}; +// se_Source omitted. -/** - * serializeAws_json1_1SslConfiguration - */ -const se_SslConfiguration = (input: SslConfiguration, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.Chain != null && { Chain: input.Chain }), - ...(input.PrivateKey != null && { PrivateKey: input.PrivateKey }), - }; -}; +// se_SslConfiguration omitted. -/** - * serializeAws_json1_1StackAttributes - */ -const se_StackAttributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [StackAttributesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StackAttributes omitted. -/** - * serializeAws_json1_1StackConfigurationManager - */ -const se_StackConfigurationManager = (input: StackConfigurationManager, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_StackConfigurationManager omitted. -/** - * serializeAws_json1_1StartInstanceRequest - */ -const se_StartInstanceRequest = (input: StartInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_StartInstanceRequest omitted. -/** - * serializeAws_json1_1StartStackRequest - */ -const se_StartStackRequest = (input: StartStackRequest, context: __SerdeContext): any => { - return { - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_StartStackRequest omitted. -/** - * serializeAws_json1_1StopInstanceRequest - */ -const se_StopInstanceRequest = (input: StopInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.Force != null && { Force: input.Force }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_StopInstanceRequest omitted. -/** - * serializeAws_json1_1StopStackRequest - */ -const se_StopStackRequest = (input: StopStackRequest, context: __SerdeContext): any => { - return { - ...(input.StackId != null && { StackId: input.StackId }), - }; -}; +// se_StopStackRequest omitted. -/** - * serializeAws_json1_1Strings - */ -const se_Strings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Strings omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1UnassignInstanceRequest - */ -const se_UnassignInstanceRequest = (input: UnassignInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; +// se_UnassignInstanceRequest omitted. -/** - * serializeAws_json1_1UnassignVolumeRequest - */ -const se_UnassignVolumeRequest = (input: UnassignVolumeRequest, context: __SerdeContext): any => { - return { - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; -}; +// se_UnassignVolumeRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateAppRequest - */ -const se_UpdateAppRequest = (input: UpdateAppRequest, context: __SerdeContext): any => { - return { - ...(input.AppId != null && { AppId: input.AppId }), - ...(input.AppSource != null && { AppSource: se_Source(input.AppSource, context) }), - ...(input.Attributes != null && { Attributes: se_AppAttributes(input.Attributes, context) }), - ...(input.DataSources != null && { DataSources: se_DataSources(input.DataSources, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Domains != null && { Domains: se_Strings(input.Domains, context) }), - ...(input.EnableSsl != null && { EnableSsl: input.EnableSsl }), - ...(input.Environment != null && { Environment: se_EnvironmentVariables(input.Environment, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SslConfiguration != null && { SslConfiguration: se_SslConfiguration(input.SslConfiguration, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_UpdateAppRequest omitted. -/** - * serializeAws_json1_1UpdateElasticIpRequest - */ -const se_UpdateElasticIpRequest = (input: UpdateElasticIpRequest, context: __SerdeContext): any => { - return { - ...(input.ElasticIp != null && { ElasticIp: input.ElasticIp }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_UpdateElasticIpRequest omitted. -/** - * serializeAws_json1_1UpdateInstanceRequest - */ -const se_UpdateInstanceRequest = (input: UpdateInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }), - ...(input.AmiId != null && { AmiId: input.AmiId }), - ...(input.Architecture != null && { Architecture: input.Architecture }), - ...(input.AutoScalingType != null && { AutoScalingType: input.AutoScalingType }), - ...(input.EbsOptimized != null && { EbsOptimized: input.EbsOptimized }), - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.InstallUpdatesOnBoot != null && { InstallUpdatesOnBoot: input.InstallUpdatesOnBoot }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LayerIds != null && { LayerIds: se_Strings(input.LayerIds, context) }), - ...(input.Os != null && { Os: input.Os }), - ...(input.SshKeyName != null && { SshKeyName: input.SshKeyName }), - }; -}; +// se_UpdateInstanceRequest omitted. -/** - * serializeAws_json1_1UpdateLayerRequest - */ -const se_UpdateLayerRequest = (input: UpdateLayerRequest, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_LayerAttributes(input.Attributes, context) }), - ...(input.AutoAssignElasticIps != null && { AutoAssignElasticIps: input.AutoAssignElasticIps }), - ...(input.AutoAssignPublicIps != null && { AutoAssignPublicIps: input.AutoAssignPublicIps }), - ...(input.CloudWatchLogsConfiguration != null && { - CloudWatchLogsConfiguration: se_CloudWatchLogsConfiguration(input.CloudWatchLogsConfiguration, context), - }), - ...(input.CustomInstanceProfileArn != null && { CustomInstanceProfileArn: input.CustomInstanceProfileArn }), - ...(input.CustomJson != null && { CustomJson: input.CustomJson }), - ...(input.CustomRecipes != null && { CustomRecipes: se_Recipes(input.CustomRecipes, context) }), - ...(input.CustomSecurityGroupIds != null && { - CustomSecurityGroupIds: se_Strings(input.CustomSecurityGroupIds, context), - }), - ...(input.EnableAutoHealing != null && { EnableAutoHealing: input.EnableAutoHealing }), - ...(input.InstallUpdatesOnBoot != null && { InstallUpdatesOnBoot: input.InstallUpdatesOnBoot }), - ...(input.LayerId != null && { LayerId: input.LayerId }), - ...(input.LifecycleEventConfiguration != null && { - LifecycleEventConfiguration: se_LifecycleEventConfiguration(input.LifecycleEventConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Packages != null && { Packages: se_Strings(input.Packages, context) }), - ...(input.Shortname != null && { Shortname: input.Shortname }), - ...(input.UseEbsOptimizedInstances != null && { UseEbsOptimizedInstances: input.UseEbsOptimizedInstances }), - ...(input.VolumeConfigurations != null && { - VolumeConfigurations: se_VolumeConfigurations(input.VolumeConfigurations, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateMyUserProfileRequest - */ -const se_UpdateMyUserProfileRequest = (input: UpdateMyUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.SshPublicKey != null && { SshPublicKey: input.SshPublicKey }), - }; -}; +// se_UpdateLayerRequest omitted. -/** - * serializeAws_json1_1UpdateRdsDbInstanceRequest - */ -const se_UpdateRdsDbInstanceRequest = (input: UpdateRdsDbInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.DbPassword != null && { DbPassword: input.DbPassword }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.RdsDbInstanceArn != null && { RdsDbInstanceArn: input.RdsDbInstanceArn }), - }; -}; +// se_UpdateMyUserProfileRequest omitted. -/** - * serializeAws_json1_1UpdateStackRequest - */ -const se_UpdateStackRequest = (input: UpdateStackRequest, context: __SerdeContext): any => { - return { - ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }), - ...(input.Attributes != null && { Attributes: se_StackAttributes(input.Attributes, context) }), - ...(input.ChefConfiguration != null && { - ChefConfiguration: se_ChefConfiguration(input.ChefConfiguration, context), - }), - ...(input.ConfigurationManager != null && { - ConfigurationManager: se_StackConfigurationManager(input.ConfigurationManager, context), - }), - ...(input.CustomCookbooksSource != null && { - CustomCookbooksSource: se_Source(input.CustomCookbooksSource, context), - }), - ...(input.CustomJson != null && { CustomJson: input.CustomJson }), - ...(input.DefaultAvailabilityZone != null && { DefaultAvailabilityZone: input.DefaultAvailabilityZone }), - ...(input.DefaultInstanceProfileArn != null && { DefaultInstanceProfileArn: input.DefaultInstanceProfileArn }), - ...(input.DefaultOs != null && { DefaultOs: input.DefaultOs }), - ...(input.DefaultRootDeviceType != null && { DefaultRootDeviceType: input.DefaultRootDeviceType }), - ...(input.DefaultSshKeyName != null && { DefaultSshKeyName: input.DefaultSshKeyName }), - ...(input.DefaultSubnetId != null && { DefaultSubnetId: input.DefaultSubnetId }), - ...(input.HostnameTheme != null && { HostnameTheme: input.HostnameTheme }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.StackId != null && { StackId: input.StackId }), - ...(input.UseCustomCookbooks != null && { UseCustomCookbooks: input.UseCustomCookbooks }), - ...(input.UseOpsworksSecurityGroups != null && { UseOpsworksSecurityGroups: input.UseOpsworksSecurityGroups }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserProfileRequest - */ -const se_UpdateUserProfileRequest = (input: UpdateUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.AllowSelfManagement != null && { AllowSelfManagement: input.AllowSelfManagement }), - ...(input.IamUserArn != null && { IamUserArn: input.IamUserArn }), - ...(input.SshPublicKey != null && { SshPublicKey: input.SshPublicKey }), - ...(input.SshUsername != null && { SshUsername: input.SshUsername }), - }; -}; +// se_UpdateRdsDbInstanceRequest omitted. -/** - * serializeAws_json1_1UpdateVolumeRequest - */ -const se_UpdateVolumeRequest = (input: UpdateVolumeRequest, context: __SerdeContext): any => { - return { - ...(input.MountPoint != null && { MountPoint: input.MountPoint }), - ...(input.Name != null && { Name: input.Name }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - }; -}; +// se_UpdateStackRequest omitted. -/** - * serializeAws_json1_1VolumeConfiguration - */ -const se_VolumeConfiguration = (input: VolumeConfiguration, context: __SerdeContext): any => { - return { - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.MountPoint != null && { MountPoint: input.MountPoint }), - ...(input.NumberOfDisks != null && { NumberOfDisks: input.NumberOfDisks }), - ...(input.RaidLevel != null && { RaidLevel: input.RaidLevel }), - ...(input.Size != null && { Size: input.Size }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; +// se_UpdateUserProfileRequest omitted. -/** - * serializeAws_json1_1VolumeConfigurations - */ -const se_VolumeConfigurations = (input: VolumeConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VolumeConfiguration(entry, context); - }); -}; +// se_UpdateVolumeRequest omitted. -/** - * serializeAws_json1_1WeeklyAutoScalingSchedule - */ -const se_WeeklyAutoScalingSchedule = (input: WeeklyAutoScalingSchedule, context: __SerdeContext): any => { - return { - ...(input.Friday != null && { Friday: se_DailyAutoScalingSchedule(input.Friday, context) }), - ...(input.Monday != null && { Monday: se_DailyAutoScalingSchedule(input.Monday, context) }), - ...(input.Saturday != null && { Saturday: se_DailyAutoScalingSchedule(input.Saturday, context) }), - ...(input.Sunday != null && { Sunday: se_DailyAutoScalingSchedule(input.Sunday, context) }), - ...(input.Thursday != null && { Thursday: se_DailyAutoScalingSchedule(input.Thursday, context) }), - ...(input.Tuesday != null && { Tuesday: se_DailyAutoScalingSchedule(input.Tuesday, context) }), - ...(input.Wednesday != null && { Wednesday: se_DailyAutoScalingSchedule(input.Wednesday, context) }), - }; -}; +// se_VolumeConfiguration omitted. -/** - * deserializeAws_json1_1AgentVersion - */ -const de_AgentVersion = (output: any, context: __SerdeContext): AgentVersion => { - return { - ConfigurationManager: - output.ConfigurationManager != null - ? de_StackConfigurationManager(output.ConfigurationManager, context) - : undefined, - Version: __expectString(output.Version), - } as any; -}; +// se_VolumeConfigurations omitted. -/** - * deserializeAws_json1_1AgentVersions - */ -const de_AgentVersions = (output: any, context: __SerdeContext): AgentVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentVersion(entry, context); - }); - return retVal; -}; +// se_WeeklyAutoScalingSchedule omitted. -/** - * deserializeAws_json1_1App - */ -const de_App = (output: any, context: __SerdeContext): App => { - return { - AppId: __expectString(output.AppId), - AppSource: output.AppSource != null ? de_Source(output.AppSource, context) : undefined, - Attributes: output.Attributes != null ? de_AppAttributes(output.Attributes, context) : undefined, - CreatedAt: __expectString(output.CreatedAt), - DataSources: output.DataSources != null ? de_DataSources(output.DataSources, context) : undefined, - Description: __expectString(output.Description), - Domains: output.Domains != null ? de_Strings(output.Domains, context) : undefined, - EnableSsl: __expectBoolean(output.EnableSsl), - Environment: output.Environment != null ? de_EnvironmentVariables(output.Environment, context) : undefined, - Name: __expectString(output.Name), - Shortname: __expectString(output.Shortname), - SslConfiguration: - output.SslConfiguration != null ? de_SslConfiguration(output.SslConfiguration, context) : undefined, - StackId: __expectString(output.StackId), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1AppAttributes - */ -const de_AppAttributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [AppAttributesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1Apps - */ -const de_Apps = (output: any, context: __SerdeContext): App[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_App(entry, context); - }); - return retVal; -}; +// de_AgentVersion omitted. + +// de_AgentVersions omitted. + +// de_App omitted. + +// de_AppAttributes omitted. + +// de_Apps omitted. /** * deserializeAws_json1_1AutoScalingThresholds */ const de_AutoScalingThresholds = (output: any, context: __SerdeContext): AutoScalingThresholds => { - return { - Alarms: output.Alarms != null ? de_Strings(output.Alarms, context) : undefined, - CpuThreshold: __limitedParseDouble(output.CpuThreshold), - IgnoreMetricsTime: __expectInt32(output.IgnoreMetricsTime), - InstanceCount: __expectInt32(output.InstanceCount), - LoadThreshold: __limitedParseDouble(output.LoadThreshold), - MemoryThreshold: __limitedParseDouble(output.MemoryThreshold), - ThresholdsWaitTime: __expectInt32(output.ThresholdsWaitTime), - } as any; + return take(output, { + Alarms: _json, + CpuThreshold: __limitedParseDouble, + IgnoreMetricsTime: __expectInt32, + InstanceCount: __expectInt32, + LoadThreshold: __limitedParseDouble, + MemoryThreshold: __limitedParseDouble, + ThresholdsWaitTime: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_1BlockDeviceMapping - */ -const de_BlockDeviceMapping = (output: any, context: __SerdeContext): BlockDeviceMapping => { - return { - DeviceName: __expectString(output.DeviceName), - Ebs: output.Ebs != null ? de_EbsBlockDevice(output.Ebs, context) : undefined, - NoDevice: __expectString(output.NoDevice), - VirtualName: __expectString(output.VirtualName), - } as any; -}; +// de_BlockDeviceMapping omitted. -/** - * deserializeAws_json1_1BlockDeviceMappings - */ -const de_BlockDeviceMappings = (output: any, context: __SerdeContext): BlockDeviceMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BlockDeviceMapping(entry, context); - }); - return retVal; -}; +// de_BlockDeviceMappings omitted. -/** - * deserializeAws_json1_1ChefConfiguration - */ -const de_ChefConfiguration = (output: any, context: __SerdeContext): ChefConfiguration => { - return { - BerkshelfVersion: __expectString(output.BerkshelfVersion), - ManageBerkshelf: __expectBoolean(output.ManageBerkshelf), - } as any; -}; +// de_ChefConfiguration omitted. -/** - * deserializeAws_json1_1CloneStackResult - */ -const de_CloneStackResult = (output: any, context: __SerdeContext): CloneStackResult => { - return { - StackId: __expectString(output.StackId), - } as any; -}; +// de_CloneStackResult omitted. -/** - * deserializeAws_json1_1CloudWatchLogsConfiguration - */ -const de_CloudWatchLogsConfiguration = (output: any, context: __SerdeContext): CloudWatchLogsConfiguration => { - return { - Enabled: __expectBoolean(output.Enabled), - LogStreams: output.LogStreams != null ? de_CloudWatchLogsLogStreams(output.LogStreams, context) : undefined, - } as any; -}; +// de_CloudWatchLogsConfiguration omitted. -/** - * deserializeAws_json1_1CloudWatchLogsLogStream - */ -const de_CloudWatchLogsLogStream = (output: any, context: __SerdeContext): CloudWatchLogsLogStream => { - return { - BatchCount: __expectInt32(output.BatchCount), - BatchSize: __expectInt32(output.BatchSize), - BufferDuration: __expectInt32(output.BufferDuration), - DatetimeFormat: __expectString(output.DatetimeFormat), - Encoding: __expectString(output.Encoding), - File: __expectString(output.File), - FileFingerprintLines: __expectString(output.FileFingerprintLines), - InitialPosition: __expectString(output.InitialPosition), - LogGroupName: __expectString(output.LogGroupName), - MultiLineStartPattern: __expectString(output.MultiLineStartPattern), - TimeZone: __expectString(output.TimeZone), - } as any; -}; +// de_CloudWatchLogsLogStream omitted. -/** - * deserializeAws_json1_1CloudWatchLogsLogStreams - */ -const de_CloudWatchLogsLogStreams = (output: any, context: __SerdeContext): CloudWatchLogsLogStream[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchLogsLogStream(entry, context); - }); - return retVal; -}; +// de_CloudWatchLogsLogStreams omitted. -/** - * deserializeAws_json1_1Command - */ -const de_Command = (output: any, context: __SerdeContext): Command => { - return { - AcknowledgedAt: __expectString(output.AcknowledgedAt), - CommandId: __expectString(output.CommandId), - CompletedAt: __expectString(output.CompletedAt), - CreatedAt: __expectString(output.CreatedAt), - DeploymentId: __expectString(output.DeploymentId), - ExitCode: __expectInt32(output.ExitCode), - InstanceId: __expectString(output.InstanceId), - LogUrl: __expectString(output.LogUrl), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; +// de_Command omitted. -/** - * deserializeAws_json1_1Commands - */ -const de_Commands = (output: any, context: __SerdeContext): Command[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Command(entry, context); - }); - return retVal; -}; +// de_Commands omitted. -/** - * deserializeAws_json1_1CreateAppResult - */ -const de_CreateAppResult = (output: any, context: __SerdeContext): CreateAppResult => { - return { - AppId: __expectString(output.AppId), - } as any; -}; +// de_CreateAppResult omitted. -/** - * deserializeAws_json1_1CreateDeploymentResult - */ -const de_CreateDeploymentResult = (output: any, context: __SerdeContext): CreateDeploymentResult => { - return { - DeploymentId: __expectString(output.DeploymentId), - } as any; -}; +// de_CreateDeploymentResult omitted. -/** - * deserializeAws_json1_1CreateInstanceResult - */ -const de_CreateInstanceResult = (output: any, context: __SerdeContext): CreateInstanceResult => { - return { - InstanceId: __expectString(output.InstanceId), - } as any; -}; +// de_CreateInstanceResult omitted. -/** - * deserializeAws_json1_1CreateLayerResult - */ -const de_CreateLayerResult = (output: any, context: __SerdeContext): CreateLayerResult => { - return { - LayerId: __expectString(output.LayerId), - } as any; -}; +// de_CreateLayerResult omitted. -/** - * deserializeAws_json1_1CreateStackResult - */ -const de_CreateStackResult = (output: any, context: __SerdeContext): CreateStackResult => { - return { - StackId: __expectString(output.StackId), - } as any; -}; +// de_CreateStackResult omitted. -/** - * deserializeAws_json1_1CreateUserProfileResult - */ -const de_CreateUserProfileResult = (output: any, context: __SerdeContext): CreateUserProfileResult => { - return { - IamUserArn: __expectString(output.IamUserArn), - } as any; -}; +// de_CreateUserProfileResult omitted. -/** - * deserializeAws_json1_1DailyAutoScalingSchedule - */ -const de_DailyAutoScalingSchedule = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DailyAutoScalingSchedule omitted. -/** - * deserializeAws_json1_1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - Arn: __expectString(output.Arn), - DatabaseName: __expectString(output.DatabaseName), - Type: __expectString(output.Type), - } as any; -}; +// de_DataSource omitted. -/** - * deserializeAws_json1_1DataSources - */ -const de_DataSources = (output: any, context: __SerdeContext): DataSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSource(entry, context); - }); - return retVal; -}; +// de_DataSources omitted. -/** - * deserializeAws_json1_1Deployment - */ -const de_Deployment = (output: any, context: __SerdeContext): Deployment => { - return { - AppId: __expectString(output.AppId), - Command: output.Command != null ? de_DeploymentCommand(output.Command, context) : undefined, - Comment: __expectString(output.Comment), - CompletedAt: __expectString(output.CompletedAt), - CreatedAt: __expectString(output.CreatedAt), - CustomJson: __expectString(output.CustomJson), - DeploymentId: __expectString(output.DeploymentId), - Duration: __expectInt32(output.Duration), - IamUserArn: __expectString(output.IamUserArn), - InstanceIds: output.InstanceIds != null ? de_Strings(output.InstanceIds, context) : undefined, - StackId: __expectString(output.StackId), - Status: __expectString(output.Status), - } as any; -}; +// de_Deployment omitted. -/** - * deserializeAws_json1_1DeploymentCommand - */ -const de_DeploymentCommand = (output: any, context: __SerdeContext): DeploymentCommand => { - return { - Args: output.Args != null ? de_DeploymentCommandArgs(output.Args, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_DeploymentCommand omitted. -/** - * deserializeAws_json1_1DeploymentCommandArgs - */ -const de_DeploymentCommandArgs = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_Strings(value, context); - return acc; - }, {}); -}; +// de_DeploymentCommandArgs omitted. -/** - * deserializeAws_json1_1Deployments - */ -const de_Deployments = (output: any, context: __SerdeContext): Deployment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Deployment(entry, context); - }); - return retVal; -}; +// de_Deployments omitted. -/** - * deserializeAws_json1_1DescribeAgentVersionsResult - */ -const de_DescribeAgentVersionsResult = (output: any, context: __SerdeContext): DescribeAgentVersionsResult => { - return { - AgentVersions: output.AgentVersions != null ? de_AgentVersions(output.AgentVersions, context) : undefined, - } as any; -}; +// de_DescribeAgentVersionsResult omitted. -/** - * deserializeAws_json1_1DescribeAppsResult - */ -const de_DescribeAppsResult = (output: any, context: __SerdeContext): DescribeAppsResult => { - return { - Apps: output.Apps != null ? de_Apps(output.Apps, context) : undefined, - } as any; -}; +// de_DescribeAppsResult omitted. -/** - * deserializeAws_json1_1DescribeCommandsResult - */ -const de_DescribeCommandsResult = (output: any, context: __SerdeContext): DescribeCommandsResult => { - return { - Commands: output.Commands != null ? de_Commands(output.Commands, context) : undefined, - } as any; -}; +// de_DescribeCommandsResult omitted. -/** - * deserializeAws_json1_1DescribeDeploymentsResult - */ -const de_DescribeDeploymentsResult = (output: any, context: __SerdeContext): DescribeDeploymentsResult => { - return { - Deployments: output.Deployments != null ? de_Deployments(output.Deployments, context) : undefined, - } as any; -}; +// de_DescribeDeploymentsResult omitted. -/** - * deserializeAws_json1_1DescribeEcsClustersResult - */ -const de_DescribeEcsClustersResult = (output: any, context: __SerdeContext): DescribeEcsClustersResult => { - return { - EcsClusters: output.EcsClusters != null ? de_EcsClusters(output.EcsClusters, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeEcsClustersResult omitted. -/** - * deserializeAws_json1_1DescribeElasticIpsResult - */ -const de_DescribeElasticIpsResult = (output: any, context: __SerdeContext): DescribeElasticIpsResult => { - return { - ElasticIps: output.ElasticIps != null ? de_ElasticIps(output.ElasticIps, context) : undefined, - } as any; -}; +// de_DescribeElasticIpsResult omitted. -/** - * deserializeAws_json1_1DescribeElasticLoadBalancersResult - */ -const de_DescribeElasticLoadBalancersResult = ( - output: any, - context: __SerdeContext -): DescribeElasticLoadBalancersResult => { - return { - ElasticLoadBalancers: - output.ElasticLoadBalancers != null ? de_ElasticLoadBalancers(output.ElasticLoadBalancers, context) : undefined, - } as any; -}; +// de_DescribeElasticLoadBalancersResult omitted. -/** - * deserializeAws_json1_1DescribeInstancesResult - */ -const de_DescribeInstancesResult = (output: any, context: __SerdeContext): DescribeInstancesResult => { - return { - Instances: output.Instances != null ? de_Instances(output.Instances, context) : undefined, - } as any; -}; +// de_DescribeInstancesResult omitted. -/** - * deserializeAws_json1_1DescribeLayersResult - */ -const de_DescribeLayersResult = (output: any, context: __SerdeContext): DescribeLayersResult => { - return { - Layers: output.Layers != null ? de_Layers(output.Layers, context) : undefined, - } as any; -}; +// de_DescribeLayersResult omitted. /** * deserializeAws_json1_1DescribeLoadBasedAutoScalingResult @@ -6624,464 +5062,72 @@ const de_DescribeLoadBasedAutoScalingResult = ( output: any, context: __SerdeContext ): DescribeLoadBasedAutoScalingResult => { - return { - LoadBasedAutoScalingConfigurations: - output.LoadBasedAutoScalingConfigurations != null - ? de_LoadBasedAutoScalingConfigurations(output.LoadBasedAutoScalingConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMyUserProfileResult - */ -const de_DescribeMyUserProfileResult = (output: any, context: __SerdeContext): DescribeMyUserProfileResult => { - return { - UserProfile: output.UserProfile != null ? de_SelfUserProfile(output.UserProfile, context) : undefined, - } as any; + return take(output, { + LoadBasedAutoScalingConfigurations: (_: any) => de_LoadBasedAutoScalingConfigurations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeOperatingSystemsResponse - */ -const de_DescribeOperatingSystemsResponse = ( - output: any, - context: __SerdeContext -): DescribeOperatingSystemsResponse => { - return { - OperatingSystems: - output.OperatingSystems != null ? de_OperatingSystems(output.OperatingSystems, context) : undefined, - } as any; -}; +// de_DescribeMyUserProfileResult omitted. -/** - * deserializeAws_json1_1DescribePermissionsResult - */ -const de_DescribePermissionsResult = (output: any, context: __SerdeContext): DescribePermissionsResult => { - return { - Permissions: output.Permissions != null ? de_Permissions(output.Permissions, context) : undefined, - } as any; -}; +// de_DescribeOperatingSystemsResponse omitted. -/** - * deserializeAws_json1_1DescribeRaidArraysResult - */ -const de_DescribeRaidArraysResult = (output: any, context: __SerdeContext): DescribeRaidArraysResult => { - return { - RaidArrays: output.RaidArrays != null ? de_RaidArrays(output.RaidArrays, context) : undefined, - } as any; -}; +// de_DescribePermissionsResult omitted. -/** - * deserializeAws_json1_1DescribeRdsDbInstancesResult - */ -const de_DescribeRdsDbInstancesResult = (output: any, context: __SerdeContext): DescribeRdsDbInstancesResult => { - return { - RdsDbInstances: output.RdsDbInstances != null ? de_RdsDbInstances(output.RdsDbInstances, context) : undefined, - } as any; -}; +// de_DescribeRaidArraysResult omitted. -/** - * deserializeAws_json1_1DescribeServiceErrorsResult - */ -const de_DescribeServiceErrorsResult = (output: any, context: __SerdeContext): DescribeServiceErrorsResult => { - return { - ServiceErrors: output.ServiceErrors != null ? de_ServiceErrors(output.ServiceErrors, context) : undefined, - } as any; -}; +// de_DescribeRdsDbInstancesResult omitted. -/** - * deserializeAws_json1_1DescribeStackProvisioningParametersResult - */ -const de_DescribeStackProvisioningParametersResult = ( - output: any, - context: __SerdeContext -): DescribeStackProvisioningParametersResult => { - return { - AgentInstallerUrl: __expectString(output.AgentInstallerUrl), - Parameters: output.Parameters != null ? de_Parameters(output.Parameters, context) : undefined, - } as any; -}; +// de_DescribeServiceErrorsResult omitted. -/** - * deserializeAws_json1_1DescribeStacksResult - */ -const de_DescribeStacksResult = (output: any, context: __SerdeContext): DescribeStacksResult => { - return { - Stacks: output.Stacks != null ? de_Stacks(output.Stacks, context) : undefined, - } as any; -}; +// de_DescribeStackProvisioningParametersResult omitted. -/** - * deserializeAws_json1_1DescribeStackSummaryResult - */ -const de_DescribeStackSummaryResult = (output: any, context: __SerdeContext): DescribeStackSummaryResult => { - return { - StackSummary: output.StackSummary != null ? de_StackSummary(output.StackSummary, context) : undefined, - } as any; -}; +// de_DescribeStacksResult omitted. -/** - * deserializeAws_json1_1DescribeTimeBasedAutoScalingResult - */ -const de_DescribeTimeBasedAutoScalingResult = ( - output: any, - context: __SerdeContext -): DescribeTimeBasedAutoScalingResult => { - return { - TimeBasedAutoScalingConfigurations: - output.TimeBasedAutoScalingConfigurations != null - ? de_TimeBasedAutoScalingConfigurations(output.TimeBasedAutoScalingConfigurations, context) - : undefined, - } as any; -}; +// de_DescribeStackSummaryResult omitted. -/** - * deserializeAws_json1_1DescribeUserProfilesResult - */ -const de_DescribeUserProfilesResult = (output: any, context: __SerdeContext): DescribeUserProfilesResult => { - return { - UserProfiles: output.UserProfiles != null ? de_UserProfiles(output.UserProfiles, context) : undefined, - } as any; -}; +// de_DescribeTimeBasedAutoScalingResult omitted. -/** - * deserializeAws_json1_1DescribeVolumesResult - */ -const de_DescribeVolumesResult = (output: any, context: __SerdeContext): DescribeVolumesResult => { - return { - Volumes: output.Volumes != null ? de_Volumes(output.Volumes, context) : undefined, - } as any; -}; +// de_DescribeUserProfilesResult omitted. -/** - * deserializeAws_json1_1EbsBlockDevice - */ -const de_EbsBlockDevice = (output: any, context: __SerdeContext): EbsBlockDevice => { - return { - DeleteOnTermination: __expectBoolean(output.DeleteOnTermination), - Iops: __expectInt32(output.Iops), - SnapshotId: __expectString(output.SnapshotId), - VolumeSize: __expectInt32(output.VolumeSize), - VolumeType: __expectString(output.VolumeType), - } as any; -}; +// de_DescribeVolumesResult omitted. -/** - * deserializeAws_json1_1EcsCluster - */ -const de_EcsCluster = (output: any, context: __SerdeContext): EcsCluster => { - return { - EcsClusterArn: __expectString(output.EcsClusterArn), - EcsClusterName: __expectString(output.EcsClusterName), - RegisteredAt: __expectString(output.RegisteredAt), - StackId: __expectString(output.StackId), - } as any; -}; +// de_EbsBlockDevice omitted. -/** - * deserializeAws_json1_1EcsClusters - */ -const de_EcsClusters = (output: any, context: __SerdeContext): EcsCluster[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EcsCluster(entry, context); - }); - return retVal; -}; +// de_EcsCluster omitted. -/** - * deserializeAws_json1_1ElasticIp - */ -const de_ElasticIp = (output: any, context: __SerdeContext): ElasticIp => { - return { - Domain: __expectString(output.Domain), - InstanceId: __expectString(output.InstanceId), - Ip: __expectString(output.Ip), - Name: __expectString(output.Name), - Region: __expectString(output.Region), - } as any; -}; +// de_EcsClusters omitted. -/** - * deserializeAws_json1_1ElasticIps - */ -const de_ElasticIps = (output: any, context: __SerdeContext): ElasticIp[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ElasticIp(entry, context); - }); - return retVal; -}; +// de_ElasticIp omitted. -/** - * deserializeAws_json1_1ElasticLoadBalancer - */ -const de_ElasticLoadBalancer = (output: any, context: __SerdeContext): ElasticLoadBalancer => { - return { - AvailabilityZones: output.AvailabilityZones != null ? de_Strings(output.AvailabilityZones, context) : undefined, - DnsName: __expectString(output.DnsName), - Ec2InstanceIds: output.Ec2InstanceIds != null ? de_Strings(output.Ec2InstanceIds, context) : undefined, - ElasticLoadBalancerName: __expectString(output.ElasticLoadBalancerName), - LayerId: __expectString(output.LayerId), - Region: __expectString(output.Region), - StackId: __expectString(output.StackId), - SubnetIds: output.SubnetIds != null ? de_Strings(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_ElasticIps omitted. -/** - * deserializeAws_json1_1ElasticLoadBalancers - */ -const de_ElasticLoadBalancers = (output: any, context: __SerdeContext): ElasticLoadBalancer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ElasticLoadBalancer(entry, context); - }); - return retVal; -}; +// de_ElasticLoadBalancer omitted. -/** - * deserializeAws_json1_1EnvironmentVariable - */ -const de_EnvironmentVariable = (output: any, context: __SerdeContext): EnvironmentVariable => { - return { - Key: __expectString(output.Key), - Secure: __expectBoolean(output.Secure), - Value: __expectString(output.Value), - } as any; -}; +// de_ElasticLoadBalancers omitted. -/** - * deserializeAws_json1_1EnvironmentVariables - */ -const de_EnvironmentVariables = (output: any, context: __SerdeContext): EnvironmentVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentVariable(entry, context); - }); - return retVal; -}; +// de_EnvironmentVariable omitted. -/** - * deserializeAws_json1_1GetHostnameSuggestionResult - */ -const de_GetHostnameSuggestionResult = (output: any, context: __SerdeContext): GetHostnameSuggestionResult => { - return { - Hostname: __expectString(output.Hostname), - LayerId: __expectString(output.LayerId), - } as any; -}; +// de_EnvironmentVariables omitted. -/** - * deserializeAws_json1_1GrantAccessResult - */ -const de_GrantAccessResult = (output: any, context: __SerdeContext): GrantAccessResult => { - return { - TemporaryCredential: - output.TemporaryCredential != null ? de_TemporaryCredential(output.TemporaryCredential, context) : undefined, - } as any; -}; +// de_GetHostnameSuggestionResult omitted. -/** - * deserializeAws_json1_1Instance - */ -const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - AgentVersion: __expectString(output.AgentVersion), - AmiId: __expectString(output.AmiId), - Architecture: __expectString(output.Architecture), - Arn: __expectString(output.Arn), - AutoScalingType: __expectString(output.AutoScalingType), - AvailabilityZone: __expectString(output.AvailabilityZone), - BlockDeviceMappings: - output.BlockDeviceMappings != null ? de_BlockDeviceMappings(output.BlockDeviceMappings, context) : undefined, - CreatedAt: __expectString(output.CreatedAt), - EbsOptimized: __expectBoolean(output.EbsOptimized), - Ec2InstanceId: __expectString(output.Ec2InstanceId), - EcsClusterArn: __expectString(output.EcsClusterArn), - EcsContainerInstanceArn: __expectString(output.EcsContainerInstanceArn), - ElasticIp: __expectString(output.ElasticIp), - Hostname: __expectString(output.Hostname), - InfrastructureClass: __expectString(output.InfrastructureClass), - InstallUpdatesOnBoot: __expectBoolean(output.InstallUpdatesOnBoot), - InstanceId: __expectString(output.InstanceId), - InstanceProfileArn: __expectString(output.InstanceProfileArn), - InstanceType: __expectString(output.InstanceType), - LastServiceErrorId: __expectString(output.LastServiceErrorId), - LayerIds: output.LayerIds != null ? de_Strings(output.LayerIds, context) : undefined, - Os: __expectString(output.Os), - Platform: __expectString(output.Platform), - PrivateDns: __expectString(output.PrivateDns), - PrivateIp: __expectString(output.PrivateIp), - PublicDns: __expectString(output.PublicDns), - PublicIp: __expectString(output.PublicIp), - RegisteredBy: __expectString(output.RegisteredBy), - ReportedAgentVersion: __expectString(output.ReportedAgentVersion), - ReportedOs: output.ReportedOs != null ? de_ReportedOs(output.ReportedOs, context) : undefined, - RootDeviceType: __expectString(output.RootDeviceType), - RootDeviceVolumeId: __expectString(output.RootDeviceVolumeId), - SecurityGroupIds: output.SecurityGroupIds != null ? de_Strings(output.SecurityGroupIds, context) : undefined, - SshHostDsaKeyFingerprint: __expectString(output.SshHostDsaKeyFingerprint), - SshHostRsaKeyFingerprint: __expectString(output.SshHostRsaKeyFingerprint), - SshKeyName: __expectString(output.SshKeyName), - StackId: __expectString(output.StackId), - Status: __expectString(output.Status), - SubnetId: __expectString(output.SubnetId), - Tenancy: __expectString(output.Tenancy), - VirtualizationType: __expectString(output.VirtualizationType), - } as any; -}; - -/** - * deserializeAws_json1_1Instances - */ -const de_Instances = (output: any, context: __SerdeContext): Instance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Instance(entry, context); - }); - return retVal; -}; +// de_GrantAccessResult omitted. -/** - * deserializeAws_json1_1InstancesCount - */ -const de_InstancesCount = (output: any, context: __SerdeContext): InstancesCount => { - return { - Assigning: __expectInt32(output.Assigning), - Booting: __expectInt32(output.Booting), - ConnectionLost: __expectInt32(output.ConnectionLost), - Deregistering: __expectInt32(output.Deregistering), - Online: __expectInt32(output.Online), - Pending: __expectInt32(output.Pending), - Rebooting: __expectInt32(output.Rebooting), - Registered: __expectInt32(output.Registered), - Registering: __expectInt32(output.Registering), - Requested: __expectInt32(output.Requested), - RunningSetup: __expectInt32(output.RunningSetup), - SetupFailed: __expectInt32(output.SetupFailed), - ShuttingDown: __expectInt32(output.ShuttingDown), - StartFailed: __expectInt32(output.StartFailed), - StopFailed: __expectInt32(output.StopFailed), - Stopped: __expectInt32(output.Stopped), - Stopping: __expectInt32(output.Stopping), - Terminated: __expectInt32(output.Terminated), - Terminating: __expectInt32(output.Terminating), - Unassigning: __expectInt32(output.Unassigning), - } as any; -}; - -/** - * deserializeAws_json1_1Layer - */ -const de_Layer = (output: any, context: __SerdeContext): Layer => { - return { - Arn: __expectString(output.Arn), - Attributes: output.Attributes != null ? de_LayerAttributes(output.Attributes, context) : undefined, - AutoAssignElasticIps: __expectBoolean(output.AutoAssignElasticIps), - AutoAssignPublicIps: __expectBoolean(output.AutoAssignPublicIps), - CloudWatchLogsConfiguration: - output.CloudWatchLogsConfiguration != null - ? de_CloudWatchLogsConfiguration(output.CloudWatchLogsConfiguration, context) - : undefined, - CreatedAt: __expectString(output.CreatedAt), - CustomInstanceProfileArn: __expectString(output.CustomInstanceProfileArn), - CustomJson: __expectString(output.CustomJson), - CustomRecipes: output.CustomRecipes != null ? de_Recipes(output.CustomRecipes, context) : undefined, - CustomSecurityGroupIds: - output.CustomSecurityGroupIds != null ? de_Strings(output.CustomSecurityGroupIds, context) : undefined, - DefaultRecipes: output.DefaultRecipes != null ? de_Recipes(output.DefaultRecipes, context) : undefined, - DefaultSecurityGroupNames: - output.DefaultSecurityGroupNames != null ? de_Strings(output.DefaultSecurityGroupNames, context) : undefined, - EnableAutoHealing: __expectBoolean(output.EnableAutoHealing), - InstallUpdatesOnBoot: __expectBoolean(output.InstallUpdatesOnBoot), - LayerId: __expectString(output.LayerId), - LifecycleEventConfiguration: - output.LifecycleEventConfiguration != null - ? de_LifecycleEventConfiguration(output.LifecycleEventConfiguration, context) - : undefined, - Name: __expectString(output.Name), - Packages: output.Packages != null ? de_Strings(output.Packages, context) : undefined, - Shortname: __expectString(output.Shortname), - StackId: __expectString(output.StackId), - Type: __expectString(output.Type), - UseEbsOptimizedInstances: __expectBoolean(output.UseEbsOptimizedInstances), - VolumeConfigurations: - output.VolumeConfigurations != null ? de_VolumeConfigurations(output.VolumeConfigurations, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LayerAttributes - */ -const de_LayerAttributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [LayerAttributesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1Layers - */ -const de_Layers = (output: any, context: __SerdeContext): Layer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Layer(entry, context); - }); - return retVal; -}; +// de_Instance omitted. -/** - * deserializeAws_json1_1LifecycleEventConfiguration - */ -const de_LifecycleEventConfiguration = (output: any, context: __SerdeContext): LifecycleEventConfiguration => { - return { - Shutdown: output.Shutdown != null ? de_ShutdownEventConfiguration(output.Shutdown, context) : undefined, - } as any; -}; +// de_Instances omitted. -/** - * deserializeAws_json1_1ListTagsResult - */ -const de_ListTagsResult = (output: any, context: __SerdeContext): ListTagsResult => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_InstancesCount omitted. + +// de_Layer omitted. + +// de_LayerAttributes omitted. + +// de_Layers omitted. + +// de_LifecycleEventConfiguration omitted. + +// de_ListTagsResult omitted. /** * deserializeAws_json1_1LoadBasedAutoScalingConfiguration @@ -7090,12 +5136,12 @@ const de_LoadBasedAutoScalingConfiguration = ( output: any, context: __SerdeContext ): LoadBasedAutoScalingConfiguration => { - return { - DownScaling: output.DownScaling != null ? de_AutoScalingThresholds(output.DownScaling, context) : undefined, - Enable: __expectBoolean(output.Enable), - LayerId: __expectString(output.LayerId), - UpScaling: output.UpScaling != null ? de_AutoScalingThresholds(output.UpScaling, context) : undefined, - } as any; + return take(output, { + DownScaling: (_: any) => de_AutoScalingThresholds(_, context), + Enable: __expectBoolean, + LayerId: __expectString, + UpScaling: (_: any) => de_AutoScalingThresholds(_, context), + }) as any; }; /** @@ -7108,614 +5154,94 @@ const de_LoadBasedAutoScalingConfigurations = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LoadBasedAutoScalingConfiguration(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OperatingSystem - */ -const de_OperatingSystem = (output: any, context: __SerdeContext): OperatingSystem => { - return { - ConfigurationManagers: - output.ConfigurationManagers != null - ? de_OperatingSystemConfigurationManagers(output.ConfigurationManagers, context) - : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ReportedName: __expectString(output.ReportedName), - ReportedVersion: __expectString(output.ReportedVersion), - Supported: __expectBoolean(output.Supported), - Type: __expectString(output.Type), - } as any; -}; +// de_OperatingSystem omitted. -/** - * deserializeAws_json1_1OperatingSystemConfigurationManager - */ -const de_OperatingSystemConfigurationManager = ( - output: any, - context: __SerdeContext -): OperatingSystemConfigurationManager => { - return { - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; +// de_OperatingSystemConfigurationManager omitted. -/** - * deserializeAws_json1_1OperatingSystemConfigurationManagers - */ -const de_OperatingSystemConfigurationManagers = ( - output: any, - context: __SerdeContext -): OperatingSystemConfigurationManager[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OperatingSystemConfigurationManager(entry, context); - }); - return retVal; -}; +// de_OperatingSystemConfigurationManagers omitted. -/** - * deserializeAws_json1_1OperatingSystems - */ -const de_OperatingSystems = (output: any, context: __SerdeContext): OperatingSystem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OperatingSystem(entry, context); - }); - return retVal; -}; +// de_OperatingSystems omitted. -/** - * deserializeAws_json1_1Parameters - */ -const de_Parameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Parameters omitted. -/** - * deserializeAws_json1_1Permission - */ -const de_Permission = (output: any, context: __SerdeContext): Permission => { - return { - AllowSsh: __expectBoolean(output.AllowSsh), - AllowSudo: __expectBoolean(output.AllowSudo), - IamUserArn: __expectString(output.IamUserArn), - Level: __expectString(output.Level), - StackId: __expectString(output.StackId), - } as any; -}; +// de_Permission omitted. -/** - * deserializeAws_json1_1Permissions - */ -const de_Permissions = (output: any, context: __SerdeContext): Permission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Permission(entry, context); - }); - return retVal; -}; +// de_Permissions omitted. -/** - * deserializeAws_json1_1RaidArray - */ -const de_RaidArray = (output: any, context: __SerdeContext): RaidArray => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - CreatedAt: __expectString(output.CreatedAt), - Device: __expectString(output.Device), - InstanceId: __expectString(output.InstanceId), - Iops: __expectInt32(output.Iops), - MountPoint: __expectString(output.MountPoint), - Name: __expectString(output.Name), - NumberOfDisks: __expectInt32(output.NumberOfDisks), - RaidArrayId: __expectString(output.RaidArrayId), - RaidLevel: __expectInt32(output.RaidLevel), - Size: __expectInt32(output.Size), - StackId: __expectString(output.StackId), - VolumeType: __expectString(output.VolumeType), - } as any; -}; - -/** - * deserializeAws_json1_1RaidArrays - */ -const de_RaidArrays = (output: any, context: __SerdeContext): RaidArray[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RaidArray(entry, context); - }); - return retVal; -}; +// de_RaidArray omitted. -/** - * deserializeAws_json1_1RdsDbInstance - */ -const de_RdsDbInstance = (output: any, context: __SerdeContext): RdsDbInstance => { - return { - Address: __expectString(output.Address), - DbInstanceIdentifier: __expectString(output.DbInstanceIdentifier), - DbPassword: __expectString(output.DbPassword), - DbUser: __expectString(output.DbUser), - Engine: __expectString(output.Engine), - MissingOnRds: __expectBoolean(output.MissingOnRds), - RdsDbInstanceArn: __expectString(output.RdsDbInstanceArn), - Region: __expectString(output.Region), - StackId: __expectString(output.StackId), - } as any; -}; +// de_RaidArrays omitted. -/** - * deserializeAws_json1_1RdsDbInstances - */ -const de_RdsDbInstances = (output: any, context: __SerdeContext): RdsDbInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RdsDbInstance(entry, context); - }); - return retVal; -}; +// de_RdsDbInstance omitted. -/** - * deserializeAws_json1_1Recipes - */ -const de_Recipes = (output: any, context: __SerdeContext): Recipes => { - return { - Configure: output.Configure != null ? de_Strings(output.Configure, context) : undefined, - Deploy: output.Deploy != null ? de_Strings(output.Deploy, context) : undefined, - Setup: output.Setup != null ? de_Strings(output.Setup, context) : undefined, - Shutdown: output.Shutdown != null ? de_Strings(output.Shutdown, context) : undefined, - Undeploy: output.Undeploy != null ? de_Strings(output.Undeploy, context) : undefined, - } as any; -}; +// de_RdsDbInstances omitted. -/** - * deserializeAws_json1_1RegisterEcsClusterResult - */ -const de_RegisterEcsClusterResult = (output: any, context: __SerdeContext): RegisterEcsClusterResult => { - return { - EcsClusterArn: __expectString(output.EcsClusterArn), - } as any; -}; +// de_Recipes omitted. -/** - * deserializeAws_json1_1RegisterElasticIpResult - */ -const de_RegisterElasticIpResult = (output: any, context: __SerdeContext): RegisterElasticIpResult => { - return { - ElasticIp: __expectString(output.ElasticIp), - } as any; -}; +// de_RegisterEcsClusterResult omitted. -/** - * deserializeAws_json1_1RegisterInstanceResult - */ -const de_RegisterInstanceResult = (output: any, context: __SerdeContext): RegisterInstanceResult => { - return { - InstanceId: __expectString(output.InstanceId), - } as any; -}; +// de_RegisterElasticIpResult omitted. -/** - * deserializeAws_json1_1RegisterVolumeResult - */ -const de_RegisterVolumeResult = (output: any, context: __SerdeContext): RegisterVolumeResult => { - return { - VolumeId: __expectString(output.VolumeId), - } as any; -}; +// de_RegisterInstanceResult omitted. -/** - * deserializeAws_json1_1ReportedOs - */ -const de_ReportedOs = (output: any, context: __SerdeContext): ReportedOs => { - return { - Family: __expectString(output.Family), - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; +// de_RegisterVolumeResult omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReportedOs omitted. -/** - * deserializeAws_json1_1SelfUserProfile - */ -const de_SelfUserProfile = (output: any, context: __SerdeContext): SelfUserProfile => { - return { - IamUserArn: __expectString(output.IamUserArn), - Name: __expectString(output.Name), - SshPublicKey: __expectString(output.SshPublicKey), - SshUsername: __expectString(output.SshUsername), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ServiceError - */ -const de_ServiceError = (output: any, context: __SerdeContext): ServiceError => { - return { - CreatedAt: __expectString(output.CreatedAt), - InstanceId: __expectString(output.InstanceId), - Message: __expectString(output.Message), - ServiceErrorId: __expectString(output.ServiceErrorId), - StackId: __expectString(output.StackId), - Type: __expectString(output.Type), - } as any; -}; +// de_SelfUserProfile omitted. -/** - * deserializeAws_json1_1ServiceErrors - */ -const de_ServiceErrors = (output: any, context: __SerdeContext): ServiceError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceError(entry, context); - }); - return retVal; -}; +// de_ServiceError omitted. -/** - * deserializeAws_json1_1ShutdownEventConfiguration - */ -const de_ShutdownEventConfiguration = (output: any, context: __SerdeContext): ShutdownEventConfiguration => { - return { - DelayUntilElbConnectionsDrained: __expectBoolean(output.DelayUntilElbConnectionsDrained), - ExecutionTimeout: __expectInt32(output.ExecutionTimeout), - } as any; -}; +// de_ServiceErrors omitted. -/** - * deserializeAws_json1_1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - Password: __expectString(output.Password), - Revision: __expectString(output.Revision), - SshKey: __expectString(output.SshKey), - Type: __expectString(output.Type), - Url: __expectString(output.Url), - Username: __expectString(output.Username), - } as any; -}; +// de_ShutdownEventConfiguration omitted. -/** - * deserializeAws_json1_1SslConfiguration - */ -const de_SslConfiguration = (output: any, context: __SerdeContext): SslConfiguration => { - return { - Certificate: __expectString(output.Certificate), - Chain: __expectString(output.Chain), - PrivateKey: __expectString(output.PrivateKey), - } as any; -}; +// de_Source omitted. -/** - * deserializeAws_json1_1Stack - */ -const de_Stack = (output: any, context: __SerdeContext): Stack => { - return { - AgentVersion: __expectString(output.AgentVersion), - Arn: __expectString(output.Arn), - Attributes: output.Attributes != null ? de_StackAttributes(output.Attributes, context) : undefined, - ChefConfiguration: - output.ChefConfiguration != null ? de_ChefConfiguration(output.ChefConfiguration, context) : undefined, - ConfigurationManager: - output.ConfigurationManager != null - ? de_StackConfigurationManager(output.ConfigurationManager, context) - : undefined, - CreatedAt: __expectString(output.CreatedAt), - CustomCookbooksSource: - output.CustomCookbooksSource != null ? de_Source(output.CustomCookbooksSource, context) : undefined, - CustomJson: __expectString(output.CustomJson), - DefaultAvailabilityZone: __expectString(output.DefaultAvailabilityZone), - DefaultInstanceProfileArn: __expectString(output.DefaultInstanceProfileArn), - DefaultOs: __expectString(output.DefaultOs), - DefaultRootDeviceType: __expectString(output.DefaultRootDeviceType), - DefaultSshKeyName: __expectString(output.DefaultSshKeyName), - DefaultSubnetId: __expectString(output.DefaultSubnetId), - HostnameTheme: __expectString(output.HostnameTheme), - Name: __expectString(output.Name), - Region: __expectString(output.Region), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - StackId: __expectString(output.StackId), - UseCustomCookbooks: __expectBoolean(output.UseCustomCookbooks), - UseOpsworksSecurityGroups: __expectBoolean(output.UseOpsworksSecurityGroups), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1StackAttributes - */ -const de_StackAttributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [StackAttributesKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1StackConfigurationManager - */ -const de_StackConfigurationManager = (output: any, context: __SerdeContext): StackConfigurationManager => { - return { - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; +// de_SslConfiguration omitted. -/** - * deserializeAws_json1_1Stacks - */ -const de_Stacks = (output: any, context: __SerdeContext): Stack[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Stack(entry, context); - }); - return retVal; -}; +// de_Stack omitted. -/** - * deserializeAws_json1_1StackSummary - */ -const de_StackSummary = (output: any, context: __SerdeContext): StackSummary => { - return { - AppsCount: __expectInt32(output.AppsCount), - Arn: __expectString(output.Arn), - InstancesCount: output.InstancesCount != null ? de_InstancesCount(output.InstancesCount, context) : undefined, - LayersCount: __expectInt32(output.LayersCount), - Name: __expectString(output.Name), - StackId: __expectString(output.StackId), - } as any; -}; +// de_StackAttributes omitted. -/** - * deserializeAws_json1_1Strings - */ -const de_Strings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StackConfigurationManager omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Stacks omitted. -/** - * deserializeAws_json1_1TemporaryCredential - */ -const de_TemporaryCredential = (output: any, context: __SerdeContext): TemporaryCredential => { - return { - InstanceId: __expectString(output.InstanceId), - Password: __expectString(output.Password), - Username: __expectString(output.Username), - ValidForInMinutes: __expectInt32(output.ValidForInMinutes), - } as any; -}; +// de_StackSummary omitted. -/** - * deserializeAws_json1_1TimeBasedAutoScalingConfiguration - */ -const de_TimeBasedAutoScalingConfiguration = ( - output: any, - context: __SerdeContext -): TimeBasedAutoScalingConfiguration => { - return { - AutoScalingSchedule: - output.AutoScalingSchedule != null - ? de_WeeklyAutoScalingSchedule(output.AutoScalingSchedule, context) - : undefined, - InstanceId: __expectString(output.InstanceId), - } as any; -}; +// de_Strings omitted. -/** - * deserializeAws_json1_1TimeBasedAutoScalingConfigurations - */ -const de_TimeBasedAutoScalingConfigurations = ( - output: any, - context: __SerdeContext -): TimeBasedAutoScalingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TimeBasedAutoScalingConfiguration(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1UserProfile - */ -const de_UserProfile = (output: any, context: __SerdeContext): UserProfile => { - return { - AllowSelfManagement: __expectBoolean(output.AllowSelfManagement), - IamUserArn: __expectString(output.IamUserArn), - Name: __expectString(output.Name), - SshPublicKey: __expectString(output.SshPublicKey), - SshUsername: __expectString(output.SshUsername), - } as any; -}; +// de_TemporaryCredential omitted. -/** - * deserializeAws_json1_1UserProfiles - */ -const de_UserProfiles = (output: any, context: __SerdeContext): UserProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserProfile(entry, context); - }); - return retVal; -}; +// de_TimeBasedAutoScalingConfiguration omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TimeBasedAutoScalingConfigurations omitted. -/** - * deserializeAws_json1_1Volume - */ -const de_Volume = (output: any, context: __SerdeContext): Volume => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - Device: __expectString(output.Device), - Ec2VolumeId: __expectString(output.Ec2VolumeId), - Encrypted: __expectBoolean(output.Encrypted), - InstanceId: __expectString(output.InstanceId), - Iops: __expectInt32(output.Iops), - MountPoint: __expectString(output.MountPoint), - Name: __expectString(output.Name), - RaidArrayId: __expectString(output.RaidArrayId), - Region: __expectString(output.Region), - Size: __expectInt32(output.Size), - Status: __expectString(output.Status), - VolumeId: __expectString(output.VolumeId), - VolumeType: __expectString(output.VolumeType), - } as any; -}; - -/** - * deserializeAws_json1_1VolumeConfiguration - */ -const de_VolumeConfiguration = (output: any, context: __SerdeContext): VolumeConfiguration => { - return { - Encrypted: __expectBoolean(output.Encrypted), - Iops: __expectInt32(output.Iops), - MountPoint: __expectString(output.MountPoint), - NumberOfDisks: __expectInt32(output.NumberOfDisks), - RaidLevel: __expectInt32(output.RaidLevel), - Size: __expectInt32(output.Size), - VolumeType: __expectString(output.VolumeType), - } as any; -}; +// de_UserProfile omitted. -/** - * deserializeAws_json1_1VolumeConfigurations - */ -const de_VolumeConfigurations = (output: any, context: __SerdeContext): VolumeConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VolumeConfiguration(entry, context); - }); - return retVal; -}; +// de_UserProfiles omitted. -/** - * deserializeAws_json1_1Volumes - */ -const de_Volumes = (output: any, context: __SerdeContext): Volume[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Volume(entry, context); - }); - return retVal; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1WeeklyAutoScalingSchedule - */ -const de_WeeklyAutoScalingSchedule = (output: any, context: __SerdeContext): WeeklyAutoScalingSchedule => { - return { - Friday: output.Friday != null ? de_DailyAutoScalingSchedule(output.Friday, context) : undefined, - Monday: output.Monday != null ? de_DailyAutoScalingSchedule(output.Monday, context) : undefined, - Saturday: output.Saturday != null ? de_DailyAutoScalingSchedule(output.Saturday, context) : undefined, - Sunday: output.Sunday != null ? de_DailyAutoScalingSchedule(output.Sunday, context) : undefined, - Thursday: output.Thursday != null ? de_DailyAutoScalingSchedule(output.Thursday, context) : undefined, - Tuesday: output.Tuesday != null ? de_DailyAutoScalingSchedule(output.Tuesday, context) : undefined, - Wednesday: output.Wednesday != null ? de_DailyAutoScalingSchedule(output.Wednesday, context) : undefined, - } as any; -}; +// de_Volume omitted. + +// de_VolumeConfiguration omitted. + +// de_VolumeConfigurations omitted. + +// de_Volumes omitted. + +// de_WeeklyAutoScalingSchedule omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -7737,6 +5263,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-opsworkscm/src/protocols/Aws_json1_1.ts b/clients/client-opsworkscm/src/protocols/Aws_json1_1.ts index 166f25c2e769..a09e4a1fab46 100644 --- a/clients/client-opsworkscm/src/protocols/Aws_json1_1.ts +++ b/clients/client-opsworkscm/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -52,38 +54,29 @@ import { UpdateServerEngineAttributesCommandOutput, } from "../commands/UpdateServerEngineAttributesCommand"; import { - AccountAttribute, AssociateNodeRequest, - AssociateNodeResponse, Backup, CreateBackupRequest, CreateBackupResponse, CreateServerRequest, CreateServerResponse, DeleteBackupRequest, - DeleteBackupResponse, DeleteServerRequest, - DeleteServerResponse, DescribeAccountAttributesRequest, - DescribeAccountAttributesResponse, DescribeBackupsRequest, DescribeBackupsResponse, DescribeEventsRequest, DescribeEventsResponse, DescribeNodeAssociationStatusRequest, - DescribeNodeAssociationStatusResponse, DescribeServersRequest, DescribeServersResponse, DisassociateNodeRequest, - DisassociateNodeResponse, EngineAttribute, ExportServerEngineAttributeRequest, - ExportServerEngineAttributeResponse, InvalidNextTokenException, InvalidStateException, LimitExceededException, ListTagsForResourceRequest, - ListTagsForResourceResponse, ResourceAlreadyExistsException, ResourceNotFoundException, RestoreServerRequest, @@ -94,9 +87,7 @@ import { StartMaintenanceResponse, Tag, TagResourceRequest, - TagResourceResponse, UntagResourceRequest, - UntagResourceResponse, UpdateServerEngineAttributesRequest, UpdateServerEngineAttributesResponse, UpdateServerRequest, @@ -114,7 +105,7 @@ export const se_AssociateNodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateNode"); let body: any; - body = JSON.stringify(se_AssociateNodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -127,7 +118,7 @@ export const se_CreateBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBackup"); let body: any; - body = JSON.stringify(se_CreateBackupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -140,7 +131,7 @@ export const se_CreateServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateServer"); let body: any; - body = JSON.stringify(se_CreateServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -153,7 +144,7 @@ export const se_DeleteBackupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBackup"); let body: any; - body = JSON.stringify(se_DeleteBackupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -166,7 +157,7 @@ export const se_DeleteServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServer"); let body: any; - body = JSON.stringify(se_DeleteServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -179,7 +170,7 @@ export const se_DescribeAccountAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountAttributes"); let body: any; - body = JSON.stringify(se_DescribeAccountAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -192,7 +183,7 @@ export const se_DescribeBackupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBackups"); let body: any; - body = JSON.stringify(se_DescribeBackupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -205,7 +196,7 @@ export const se_DescribeEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEvents"); let body: any; - body = JSON.stringify(se_DescribeEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -218,7 +209,7 @@ export const se_DescribeNodeAssociationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNodeAssociationStatus"); let body: any; - body = JSON.stringify(se_DescribeNodeAssociationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -231,7 +222,7 @@ export const se_DescribeServersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServers"); let body: any; - body = JSON.stringify(se_DescribeServersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -244,7 +235,7 @@ export const se_DisassociateNodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateNode"); let body: any; - body = JSON.stringify(se_DisassociateNodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -257,7 +248,7 @@ export const se_ExportServerEngineAttributeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ExportServerEngineAttribute"); let body: any; - body = JSON.stringify(se_ExportServerEngineAttributeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -270,7 +261,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -283,7 +274,7 @@ export const se_RestoreServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreServer"); let body: any; - body = JSON.stringify(se_RestoreServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -296,7 +287,7 @@ export const se_StartMaintenanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartMaintenance"); let body: any; - body = JSON.stringify(se_StartMaintenanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -309,7 +300,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -322,7 +313,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -335,7 +326,7 @@ export const se_UpdateServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServer"); let body: any; - body = JSON.stringify(se_UpdateServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -348,7 +339,7 @@ export const se_UpdateServerEngineAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServerEngineAttributes"); let body: any; - body = JSON.stringify(se_UpdateServerEngineAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -364,12 +355,12 @@ export const de_AssociateNodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateNodeResponse(data, context); + contents = _json(data); const response: AssociateNodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -396,10 +387,9 @@ const de_AssociateNodeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -422,7 +412,7 @@ export const de_CreateBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -452,10 +442,9 @@ const de_CreateBackupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -478,7 +467,7 @@ export const de_CreateServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -508,10 +497,9 @@ const de_CreateServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -529,12 +517,12 @@ export const de_DeleteBackupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBackupResponse(data, context); + contents = _json(data); const response: DeleteBackupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -561,10 +549,9 @@ const de_DeleteBackupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -582,12 +569,12 @@ export const de_DeleteServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteServerResponse(data, context); + contents = _json(data); const response: DeleteServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -614,10 +601,9 @@ const de_DeleteServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -635,12 +621,12 @@ export const de_DescribeAccountAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccountAttributesResponse(data, context); + contents = _json(data); const response: DescribeAccountAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -656,10 +642,9 @@ const de_DescribeAccountAttributesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -681,7 +666,7 @@ export const de_DescribeBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -708,10 +693,9 @@ const de_DescribeBackupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -734,7 +718,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -761,10 +745,9 @@ const de_DescribeEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -782,12 +765,12 @@ export const de_DescribeNodeAssociationStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeNodeAssociationStatusResponse(data, context); + contents = _json(data); const response: DescribeNodeAssociationStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -811,10 +794,9 @@ const de_DescribeNodeAssociationStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -837,7 +819,7 @@ export const de_DescribeServersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -864,10 +846,9 @@ const de_DescribeServersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -885,12 +866,12 @@ export const de_DisassociateNodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateNodeResponse(data, context); + contents = _json(data); const response: DisassociateNodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -917,10 +898,9 @@ const de_DisassociateNodeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -938,12 +918,12 @@ export const de_ExportServerEngineAttributeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ExportServerEngineAttributeResponse(data, context); + contents = _json(data); const response: ExportServerEngineAttributeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -970,10 +950,9 @@ const de_ExportServerEngineAttributeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -991,12 +970,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1020,10 +999,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1046,7 +1024,7 @@ export const de_RestoreServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1073,10 +1051,9 @@ const de_RestoreServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1099,7 +1076,7 @@ export const de_StartMaintenanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1126,10 +1103,9 @@ const de_StartMaintenanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,12 +1123,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1179,10 +1155,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,12 +1175,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1232,10 +1207,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1258,7 +1232,7 @@ export const de_UpdateServerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1285,10 +1259,9 @@ const de_UpdateServerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1311,7 +1284,7 @@ export const de_UpdateServerEngineAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1338,10 +1311,9 @@ const de_UpdateServerEngineAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1355,7 +1327,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1371,7 +1343,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1387,7 +1359,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1403,7 +1375,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1419,7 +1391,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1432,7 +1404,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1440,364 +1412,92 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateNodeRequest - */ -const se_AssociateNodeRequest = (input: AssociateNodeRequest, context: __SerdeContext): any => { - return { - ...(input.EngineAttributes != null && { EngineAttributes: se_EngineAttributes(input.EngineAttributes, context) }), - ...(input.NodeName != null && { NodeName: input.NodeName }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_AssociateNodeRequest omitted. -/** - * serializeAws_json1_1CreateBackupRequest - */ -const se_CreateBackupRequest = (input: CreateBackupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateBackupRequest omitted. -/** - * serializeAws_json1_1CreateServerRequest - */ -const se_CreateServerRequest = (input: CreateServerRequest, context: __SerdeContext): any => { - return { - ...(input.AssociatePublicIpAddress != null && { AssociatePublicIpAddress: input.AssociatePublicIpAddress }), - ...(input.BackupId != null && { BackupId: input.BackupId }), - ...(input.BackupRetentionCount != null && { BackupRetentionCount: input.BackupRetentionCount }), - ...(input.CustomCertificate != null && { CustomCertificate: input.CustomCertificate }), - ...(input.CustomDomain != null && { CustomDomain: input.CustomDomain }), - ...(input.CustomPrivateKey != null && { CustomPrivateKey: input.CustomPrivateKey }), - ...(input.DisableAutomatedBackup != null && { DisableAutomatedBackup: input.DisableAutomatedBackup }), - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.EngineAttributes != null && { EngineAttributes: se_EngineAttributes(input.EngineAttributes, context) }), - ...(input.EngineModel != null && { EngineModel: input.EngineModel }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.InstanceProfileArn != null && { InstanceProfileArn: input.InstanceProfileArn }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KeyPair != null && { KeyPair: input.KeyPair }), - ...(input.PreferredBackupWindow != null && { PreferredBackupWindow: input.PreferredBackupWindow }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_Strings(input.SecurityGroupIds, context) }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.SubnetIds != null && { SubnetIds: se_Strings(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateServerRequest omitted. -/** - * serializeAws_json1_1DeleteBackupRequest - */ -const se_DeleteBackupRequest = (input: DeleteBackupRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - }; -}; +// se_DeleteBackupRequest omitted. -/** - * serializeAws_json1_1DeleteServerRequest - */ -const se_DeleteServerRequest = (input: DeleteServerRequest, context: __SerdeContext): any => { - return { - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_DeleteServerRequest omitted. -/** - * serializeAws_json1_1DescribeAccountAttributesRequest - */ -const se_DescribeAccountAttributesRequest = (input: DescribeAccountAttributesRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeAccountAttributesRequest omitted. -/** - * serializeAws_json1_1DescribeBackupsRequest - */ -const se_DescribeBackupsRequest = (input: DescribeBackupsRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_DescribeBackupsRequest omitted. -/** - * serializeAws_json1_1DescribeEventsRequest - */ -const se_DescribeEventsRequest = (input: DescribeEventsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_DescribeEventsRequest omitted. -/** - * serializeAws_json1_1DescribeNodeAssociationStatusRequest - */ -const se_DescribeNodeAssociationStatusRequest = ( - input: DescribeNodeAssociationStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.NodeAssociationStatusToken != null && { NodeAssociationStatusToken: input.NodeAssociationStatusToken }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_DescribeNodeAssociationStatusRequest omitted. -/** - * serializeAws_json1_1DescribeServersRequest - */ -const se_DescribeServersRequest = (input: DescribeServersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_DescribeServersRequest omitted. -/** - * serializeAws_json1_1DisassociateNodeRequest - */ -const se_DisassociateNodeRequest = (input: DisassociateNodeRequest, context: __SerdeContext): any => { - return { - ...(input.EngineAttributes != null && { EngineAttributes: se_EngineAttributes(input.EngineAttributes, context) }), - ...(input.NodeName != null && { NodeName: input.NodeName }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_DisassociateNodeRequest omitted. -/** - * serializeAws_json1_1EngineAttribute - */ -const se_EngineAttribute = (input: EngineAttribute, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_EngineAttribute omitted. -/** - * serializeAws_json1_1EngineAttributes - */ -const se_EngineAttributes = (input: EngineAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EngineAttribute(entry, context); - }); -}; +// se_EngineAttributes omitted. -/** - * serializeAws_json1_1ExportServerEngineAttributeRequest - */ -const se_ExportServerEngineAttributeRequest = ( - input: ExportServerEngineAttributeRequest, - context: __SerdeContext -): any => { - return { - ...(input.ExportAttributeName != null && { ExportAttributeName: input.ExportAttributeName }), - ...(input.InputAttributes != null && { InputAttributes: se_EngineAttributes(input.InputAttributes, context) }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_ExportServerEngineAttributeRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1RestoreServerRequest - */ -const se_RestoreServerRequest = (input: RestoreServerRequest, context: __SerdeContext): any => { - return { - ...(input.BackupId != null && { BackupId: input.BackupId }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KeyPair != null && { KeyPair: input.KeyPair }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_RestoreServerRequest omitted. -/** - * serializeAws_json1_1StartMaintenanceRequest - */ -const se_StartMaintenanceRequest = (input: StartMaintenanceRequest, context: __SerdeContext): any => { - return { - ...(input.EngineAttributes != null && { EngineAttributes: se_EngineAttributes(input.EngineAttributes, context) }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_StartMaintenanceRequest omitted. -/** - * serializeAws_json1_1Strings - */ -const se_Strings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Strings omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateServerEngineAttributesRequest - */ -const se_UpdateServerEngineAttributesRequest = ( - input: UpdateServerEngineAttributesRequest, - context: __SerdeContext -): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.AttributeValue != null && { AttributeValue: input.AttributeValue }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_UpdateServerEngineAttributesRequest omitted. -/** - * serializeAws_json1_1UpdateServerRequest - */ -const se_UpdateServerRequest = (input: UpdateServerRequest, context: __SerdeContext): any => { - return { - ...(input.BackupRetentionCount != null && { BackupRetentionCount: input.BackupRetentionCount }), - ...(input.DisableAutomatedBackup != null && { DisableAutomatedBackup: input.DisableAutomatedBackup }), - ...(input.PreferredBackupWindow != null && { PreferredBackupWindow: input.PreferredBackupWindow }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.ServerName != null && { ServerName: input.ServerName }), - }; -}; +// se_UpdateServerRequest omitted. -/** - * deserializeAws_json1_1AccountAttribute - */ -const de_AccountAttribute = (output: any, context: __SerdeContext): AccountAttribute => { - return { - Maximum: __expectInt32(output.Maximum), - Name: __expectString(output.Name), - Used: __expectInt32(output.Used), - } as any; -}; +// de_AccountAttribute omitted. -/** - * deserializeAws_json1_1AccountAttributes - */ -const de_AccountAttributes = (output: any, context: __SerdeContext): AccountAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountAttribute(entry, context); - }); - return retVal; -}; +// de_AccountAttributes omitted. -/** - * deserializeAws_json1_1AssociateNodeResponse - */ -const de_AssociateNodeResponse = (output: any, context: __SerdeContext): AssociateNodeResponse => { - return { - NodeAssociationStatusToken: __expectString(output.NodeAssociationStatusToken), - } as any; -}; +// de_AssociateNodeResponse omitted. /** * deserializeAws_json1_1Backup */ const de_Backup = (output: any, context: __SerdeContext): Backup => { - return { - BackupArn: __expectString(output.BackupArn), - BackupId: __expectString(output.BackupId), - BackupType: __expectString(output.BackupType), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - Engine: __expectString(output.Engine), - EngineModel: __expectString(output.EngineModel), - EngineVersion: __expectString(output.EngineVersion), - InstanceProfileArn: __expectString(output.InstanceProfileArn), - InstanceType: __expectString(output.InstanceType), - KeyPair: __expectString(output.KeyPair), - PreferredBackupWindow: __expectString(output.PreferredBackupWindow), - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - S3DataSize: __expectInt32(output.S3DataSize), - S3DataUrl: __expectString(output.S3DataUrl), - S3LogUrl: __expectString(output.S3LogUrl), - SecurityGroupIds: output.SecurityGroupIds != null ? de_Strings(output.SecurityGroupIds, context) : undefined, - ServerName: __expectString(output.ServerName), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - Status: __expectString(output.Status), - StatusDescription: __expectString(output.StatusDescription), - SubnetIds: output.SubnetIds != null ? de_Strings(output.SubnetIds, context) : undefined, - ToolsVersion: __expectString(output.ToolsVersion), - UserArn: __expectString(output.UserArn), - } as any; + return take(output, { + BackupArn: __expectString, + BackupId: __expectString, + BackupType: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Engine: __expectString, + EngineModel: __expectString, + EngineVersion: __expectString, + InstanceProfileArn: __expectString, + InstanceType: __expectString, + KeyPair: __expectString, + PreferredBackupWindow: __expectString, + PreferredMaintenanceWindow: __expectString, + S3DataSize: __expectInt32, + S3DataUrl: __expectString, + S3LogUrl: __expectString, + SecurityGroupIds: _json, + ServerName: __expectString, + ServiceRoleArn: __expectString, + Status: __expectString, + StatusDescription: __expectString, + SubnetIds: _json, + ToolsVersion: __expectString, + UserArn: __expectString, + }) as any; }; /** @@ -1807,9 +1507,6 @@ const de_Backups = (output: any, context: __SerdeContext): Backup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Backup(entry, context); }); return retVal; @@ -1819,246 +1516,129 @@ const de_Backups = (output: any, context: __SerdeContext): Backup[] => { * deserializeAws_json1_1CreateBackupResponse */ const de_CreateBackupResponse = (output: any, context: __SerdeContext): CreateBackupResponse => { - return { - Backup: output.Backup != null ? de_Backup(output.Backup, context) : undefined, - } as any; + return take(output, { + Backup: (_: any) => de_Backup(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateServerResponse */ const de_CreateServerResponse = (output: any, context: __SerdeContext): CreateServerResponse => { - return { - Server: output.Server != null ? de_Server(output.Server, context) : undefined, - } as any; + return take(output, { + Server: (_: any) => de_Server(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteBackupResponse - */ -const de_DeleteBackupResponse = (output: any, context: __SerdeContext): DeleteBackupResponse => { - return {} as any; -}; +// de_DeleteBackupResponse omitted. -/** - * deserializeAws_json1_1DeleteServerResponse - */ -const de_DeleteServerResponse = (output: any, context: __SerdeContext): DeleteServerResponse => { - return {} as any; -}; +// de_DeleteServerResponse omitted. -/** - * deserializeAws_json1_1DescribeAccountAttributesResponse - */ -const de_DescribeAccountAttributesResponse = ( - output: any, - context: __SerdeContext -): DescribeAccountAttributesResponse => { - return { - Attributes: output.Attributes != null ? de_AccountAttributes(output.Attributes, context) : undefined, - } as any; -}; +// de_DescribeAccountAttributesResponse omitted. /** * deserializeAws_json1_1DescribeBackupsResponse */ const de_DescribeBackupsResponse = (output: any, context: __SerdeContext): DescribeBackupsResponse => { - return { - Backups: output.Backups != null ? de_Backups(output.Backups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Backups: (_: any) => de_Backups(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeEventsResponse */ const de_DescribeEventsResponse = (output: any, context: __SerdeContext): DescribeEventsResponse => { - return { - NextToken: __expectString(output.NextToken), - ServerEvents: output.ServerEvents != null ? de_ServerEvents(output.ServerEvents, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ServerEvents: (_: any) => de_ServerEvents(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeNodeAssociationStatusResponse - */ -const de_DescribeNodeAssociationStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeNodeAssociationStatusResponse => { - return { - EngineAttributes: - output.EngineAttributes != null ? de_EngineAttributes(output.EngineAttributes, context) : undefined, - NodeAssociationStatus: __expectString(output.NodeAssociationStatus), - } as any; -}; +// de_DescribeNodeAssociationStatusResponse omitted. /** * deserializeAws_json1_1DescribeServersResponse */ const de_DescribeServersResponse = (output: any, context: __SerdeContext): DescribeServersResponse => { - return { - NextToken: __expectString(output.NextToken), - Servers: output.Servers != null ? de_Servers(output.Servers, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Servers: (_: any) => de_Servers(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DisassociateNodeResponse - */ -const de_DisassociateNodeResponse = (output: any, context: __SerdeContext): DisassociateNodeResponse => { - return { - NodeAssociationStatusToken: __expectString(output.NodeAssociationStatusToken), - } as any; -}; +// de_DisassociateNodeResponse omitted. -/** - * deserializeAws_json1_1EngineAttribute - */ -const de_EngineAttribute = (output: any, context: __SerdeContext): EngineAttribute => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_EngineAttribute omitted. -/** - * deserializeAws_json1_1EngineAttributes - */ -const de_EngineAttributes = (output: any, context: __SerdeContext): EngineAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EngineAttribute(entry, context); - }); - return retVal; -}; +// de_EngineAttributes omitted. -/** - * deserializeAws_json1_1ExportServerEngineAttributeResponse - */ -const de_ExportServerEngineAttributeResponse = ( - output: any, - context: __SerdeContext -): ExportServerEngineAttributeResponse => { - return { - EngineAttribute: output.EngineAttribute != null ? de_EngineAttribute(output.EngineAttribute, context) : undefined, - ServerName: __expectString(output.ServerName), - } as any; -}; +// de_ExportServerEngineAttributeResponse omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidStateException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1RestoreServerResponse */ const de_RestoreServerResponse = (output: any, context: __SerdeContext): RestoreServerResponse => { - return { - Server: output.Server != null ? de_Server(output.Server, context) : undefined, - } as any; + return take(output, { + Server: (_: any) => de_Server(_, context), + }) as any; }; /** * deserializeAws_json1_1Server */ const de_Server = (output: any, context: __SerdeContext): Server => { - return { - AssociatePublicIpAddress: __expectBoolean(output.AssociatePublicIpAddress), - BackupRetentionCount: __expectInt32(output.BackupRetentionCount), - CloudFormationStackArn: __expectString(output.CloudFormationStackArn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CustomDomain: __expectString(output.CustomDomain), - DisableAutomatedBackup: __expectBoolean(output.DisableAutomatedBackup), - Endpoint: __expectString(output.Endpoint), - Engine: __expectString(output.Engine), - EngineAttributes: - output.EngineAttributes != null ? de_EngineAttributes(output.EngineAttributes, context) : undefined, - EngineModel: __expectString(output.EngineModel), - EngineVersion: __expectString(output.EngineVersion), - InstanceProfileArn: __expectString(output.InstanceProfileArn), - InstanceType: __expectString(output.InstanceType), - KeyPair: __expectString(output.KeyPair), - MaintenanceStatus: __expectString(output.MaintenanceStatus), - PreferredBackupWindow: __expectString(output.PreferredBackupWindow), - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - SecurityGroupIds: output.SecurityGroupIds != null ? de_Strings(output.SecurityGroupIds, context) : undefined, - ServerArn: __expectString(output.ServerArn), - ServerName: __expectString(output.ServerName), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - SubnetIds: output.SubnetIds != null ? de_Strings(output.SubnetIds, context) : undefined, - } as any; + return take(output, { + AssociatePublicIpAddress: __expectBoolean, + BackupRetentionCount: __expectInt32, + CloudFormationStackArn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomDomain: __expectString, + DisableAutomatedBackup: __expectBoolean, + Endpoint: __expectString, + Engine: __expectString, + EngineAttributes: _json, + EngineModel: __expectString, + EngineVersion: __expectString, + InstanceProfileArn: __expectString, + InstanceType: __expectString, + KeyPair: __expectString, + MaintenanceStatus: __expectString, + PreferredBackupWindow: __expectString, + PreferredMaintenanceWindow: __expectString, + SecurityGroupIds: _json, + ServerArn: __expectString, + ServerName: __expectString, + ServiceRoleArn: __expectString, + Status: __expectString, + StatusReason: __expectString, + SubnetIds: _json, + }) as any; }; /** * deserializeAws_json1_1ServerEvent */ const de_ServerEvent = (output: any, context: __SerdeContext): ServerEvent => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - LogUrl: __expectString(output.LogUrl), - Message: __expectString(output.Message), - ServerName: __expectString(output.ServerName), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogUrl: __expectString, + Message: __expectString, + ServerName: __expectString, + }) as any; }; /** @@ -2068,9 +1648,6 @@ const de_ServerEvents = (output: any, context: __SerdeContext): ServerEvent[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServerEvent(entry, context); }); return retVal; @@ -2083,9 +1660,6 @@ const de_Servers = (output: any, context: __SerdeContext): Server[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Server(entry, context); }); return retVal; @@ -2095,64 +1669,20 @@ const de_Servers = (output: any, context: __SerdeContext): Server[] => { * deserializeAws_json1_1StartMaintenanceResponse */ const de_StartMaintenanceResponse = (output: any, context: __SerdeContext): StartMaintenanceResponse => { - return { - Server: output.Server != null ? de_Server(output.Server, context) : undefined, - } as any; + return take(output, { + Server: (_: any) => de_Server(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Strings - */ -const de_Strings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Strings omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateServerEngineAttributesResponse @@ -2161,28 +1691,21 @@ const de_UpdateServerEngineAttributesResponse = ( output: any, context: __SerdeContext ): UpdateServerEngineAttributesResponse => { - return { - Server: output.Server != null ? de_Server(output.Server, context) : undefined, - } as any; + return take(output, { + Server: (_: any) => de_Server(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateServerResponse */ const de_UpdateServerResponse = (output: any, context: __SerdeContext): UpdateServerResponse => { - return { - Server: output.Server != null ? de_Server(output.Server, context) : undefined, - } as any; + return take(output, { + Server: (_: any) => de_Server(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2204,6 +1727,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-organizations/src/protocols/Aws_json1_1.ts b/clients/client-organizations/src/protocols/Aws_json1_1.ts index f8f1b0ec0b7d..0b8f828ae823 100644 --- a/clients/client-organizations/src/protocols/Aws_json1_1.ts +++ b/clients/client-organizations/src/protocols/Aws_json1_1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -168,7 +169,6 @@ import { AWSOrganizationsNotInUseException, CancelHandshakeRequest, CancelHandshakeResponse, - Child, ChildNotFoundException, CloseAccountRequest, ConcurrentModificationException, @@ -182,11 +182,8 @@ import { CreateGovCloudAccountRequest, CreateGovCloudAccountResponse, CreateOrganizationalUnitRequest, - CreateOrganizationalUnitResponse, CreateOrganizationRequest, - CreateOrganizationResponse, CreatePolicyRequest, - CreatePolicyResponse, DeclineHandshakeRequest, DeclineHandshakeResponse, DelegatedAdministrator, @@ -203,16 +200,11 @@ import { DescribeHandshakeRequest, DescribeHandshakeResponse, DescribeOrganizationalUnitRequest, - DescribeOrganizationalUnitResponse, - DescribeOrganizationResponse, DescribePolicyRequest, - DescribePolicyResponse, - DescribeResourcePolicyResponse, DestinationParentNotFoundException, DetachPolicyRequest, DisableAWSServiceAccessRequest, DisablePolicyTypeRequest, - DisablePolicyTypeResponse, DuplicateAccountException, DuplicateHandshakeException, DuplicateOrganizationalUnitException, @@ -225,7 +217,6 @@ import { EnableAWSServiceAccessRequest, EnabledServicePrincipal, EnablePolicyTypeRequest, - EnablePolicyTypeResponse, FinalizingOrganizationException, Handshake, HandshakeAlreadyInStateException, @@ -245,7 +236,6 @@ import { ListAWSServiceAccessForOrganizationRequest, ListAWSServiceAccessForOrganizationResponse, ListChildrenRequest, - ListChildrenResponse, ListCreateAccountStatusRequest, ListCreateAccountStatusResponse, ListDelegatedAdministratorsRequest, @@ -257,48 +247,30 @@ import { ListHandshakesForOrganizationRequest, ListHandshakesForOrganizationResponse, ListOrganizationalUnitsForParentRequest, - ListOrganizationalUnitsForParentResponse, ListParentsRequest, - ListParentsResponse, ListPoliciesForTargetRequest, - ListPoliciesForTargetResponse, ListPoliciesRequest, - ListPoliciesResponse, ListRootsRequest, - ListRootsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTargetsForPolicyRequest, - ListTargetsForPolicyResponse, MalformedPolicyDocumentException, MasterCannotLeaveOrganizationException, MoveAccountRequest, - Organization, - OrganizationalUnit, OrganizationalUnitNotEmptyException, OrganizationalUnitNotFoundException, OrganizationNotEmptyException, - Parent, ParentNotFoundException, - Policy, PolicyChangesInProgressException, PolicyInUseException, PolicyNotAttachedException, PolicyNotFoundException, - PolicySummary, - PolicyTargetSummary, PolicyTypeAlreadyEnabledException, PolicyTypeNotAvailableForOrganizationException, PolicyTypeNotEnabledException, - PolicyTypeSummary, PutResourcePolicyRequest, - PutResourcePolicyResponse, RegisterDelegatedAdministratorRequest, RemoveAccountFromOrganizationRequest, - ResourcePolicy, ResourcePolicyNotFoundException, - ResourcePolicySummary, - Root, RootNotFoundException, ServiceException, SourceParentNotFoundException, @@ -309,9 +281,7 @@ import { UnsupportedAPIEndpointException, UntagResourceRequest, UpdateOrganizationalUnitRequest, - UpdateOrganizationalUnitResponse, UpdatePolicyRequest, - UpdatePolicyResponse, } from "../models/models_0"; import { OrganizationsServiceException as __BaseException } from "../models/OrganizationsServiceException"; @@ -324,7 +294,7 @@ export const se_AcceptHandshakeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptHandshake"); let body: any; - body = JSON.stringify(se_AcceptHandshakeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +307,7 @@ export const se_AttachPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachPolicy"); let body: any; - body = JSON.stringify(se_AttachPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -350,7 +320,7 @@ export const se_CancelHandshakeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelHandshake"); let body: any; - body = JSON.stringify(se_CancelHandshakeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -363,7 +333,7 @@ export const se_CloseAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CloseAccount"); let body: any; - body = JSON.stringify(se_CloseAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +346,7 @@ export const se_CreateAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAccount"); let body: any; - body = JSON.stringify(se_CreateAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +359,7 @@ export const se_CreateGovCloudAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGovCloudAccount"); let body: any; - body = JSON.stringify(se_CreateGovCloudAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +372,7 @@ export const se_CreateOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateOrganization"); let body: any; - body = JSON.stringify(se_CreateOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +385,7 @@ export const se_CreateOrganizationalUnitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateOrganizationalUnit"); let body: any; - body = JSON.stringify(se_CreateOrganizationalUnitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -428,7 +398,7 @@ export const se_CreatePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePolicy"); let body: any; - body = JSON.stringify(se_CreatePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -441,7 +411,7 @@ export const se_DeclineHandshakeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeclineHandshake"); let body: any; - body = JSON.stringify(se_DeclineHandshakeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -466,7 +436,7 @@ export const se_DeleteOrganizationalUnitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOrganizationalUnit"); let body: any; - body = JSON.stringify(se_DeleteOrganizationalUnitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -479,7 +449,7 @@ export const se_DeletePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePolicy"); let body: any; - body = JSON.stringify(se_DeletePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -504,7 +474,7 @@ export const se_DeregisterDelegatedAdministratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterDelegatedAdministrator"); let body: any; - body = JSON.stringify(se_DeregisterDelegatedAdministratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -517,7 +487,7 @@ export const se_DescribeAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccount"); let body: any; - body = JSON.stringify(se_DescribeAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -530,7 +500,7 @@ export const se_DescribeCreateAccountStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCreateAccountStatus"); let body: any; - body = JSON.stringify(se_DescribeCreateAccountStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,7 +513,7 @@ export const se_DescribeEffectivePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEffectivePolicy"); let body: any; - body = JSON.stringify(se_DescribeEffectivePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +526,7 @@ export const se_DescribeHandshakeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHandshake"); let body: any; - body = JSON.stringify(se_DescribeHandshakeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +551,7 @@ export const se_DescribeOrganizationalUnitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrganizationalUnit"); let body: any; - body = JSON.stringify(se_DescribeOrganizationalUnitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +564,7 @@ export const se_DescribePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePolicy"); let body: any; - body = JSON.stringify(se_DescribePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -619,7 +589,7 @@ export const se_DetachPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachPolicy"); let body: any; - body = JSON.stringify(se_DetachPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -632,7 +602,7 @@ export const se_DisableAWSServiceAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableAWSServiceAccess"); let body: any; - body = JSON.stringify(se_DisableAWSServiceAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -645,7 +615,7 @@ export const se_DisablePolicyTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisablePolicyType"); let body: any; - body = JSON.stringify(se_DisablePolicyTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -658,7 +628,7 @@ export const se_EnableAllFeaturesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableAllFeatures"); let body: any; - body = JSON.stringify(se_EnableAllFeaturesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -671,7 +641,7 @@ export const se_EnableAWSServiceAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableAWSServiceAccess"); let body: any; - body = JSON.stringify(se_EnableAWSServiceAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -684,7 +654,7 @@ export const se_EnablePolicyTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnablePolicyType"); let body: any; - body = JSON.stringify(se_EnablePolicyTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -697,7 +667,7 @@ export const se_InviteAccountToOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("InviteAccountToOrganization"); let body: any; - body = JSON.stringify(se_InviteAccountToOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -722,7 +692,7 @@ export const se_ListAccountsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccounts"); let body: any; - body = JSON.stringify(se_ListAccountsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -735,7 +705,7 @@ export const se_ListAccountsForParentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccountsForParent"); let body: any; - body = JSON.stringify(se_ListAccountsForParentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -748,7 +718,7 @@ export const se_ListAWSServiceAccessForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAWSServiceAccessForOrganization"); let body: any; - body = JSON.stringify(se_ListAWSServiceAccessForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -761,7 +731,7 @@ export const se_ListChildrenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListChildren"); let body: any; - body = JSON.stringify(se_ListChildrenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -774,7 +744,7 @@ export const se_ListCreateAccountStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCreateAccountStatus"); let body: any; - body = JSON.stringify(se_ListCreateAccountStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -787,7 +757,7 @@ export const se_ListDelegatedAdministratorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDelegatedAdministrators"); let body: any; - body = JSON.stringify(se_ListDelegatedAdministratorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -800,7 +770,7 @@ export const se_ListDelegatedServicesForAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDelegatedServicesForAccount"); let body: any; - body = JSON.stringify(se_ListDelegatedServicesForAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -813,7 +783,7 @@ export const se_ListHandshakesForAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHandshakesForAccount"); let body: any; - body = JSON.stringify(se_ListHandshakesForAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -826,7 +796,7 @@ export const se_ListHandshakesForOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHandshakesForOrganization"); let body: any; - body = JSON.stringify(se_ListHandshakesForOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -839,7 +809,7 @@ export const se_ListOrganizationalUnitsForParentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOrganizationalUnitsForParent"); let body: any; - body = JSON.stringify(se_ListOrganizationalUnitsForParentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -852,7 +822,7 @@ export const se_ListParentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListParents"); let body: any; - body = JSON.stringify(se_ListParentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -865,7 +835,7 @@ export const se_ListPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPolicies"); let body: any; - body = JSON.stringify(se_ListPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -878,7 +848,7 @@ export const se_ListPoliciesForTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPoliciesForTarget"); let body: any; - body = JSON.stringify(se_ListPoliciesForTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -891,7 +861,7 @@ export const se_ListRootsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRoots"); let body: any; - body = JSON.stringify(se_ListRootsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -904,7 +874,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -917,7 +887,7 @@ export const se_ListTargetsForPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTargetsForPolicy"); let body: any; - body = JSON.stringify(se_ListTargetsForPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -930,7 +900,7 @@ export const se_MoveAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MoveAccount"); let body: any; - body = JSON.stringify(se_MoveAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -943,7 +913,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -956,7 +926,7 @@ export const se_RegisterDelegatedAdministratorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterDelegatedAdministrator"); let body: any; - body = JSON.stringify(se_RegisterDelegatedAdministratorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -969,7 +939,7 @@ export const se_RemoveAccountFromOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveAccountFromOrganization"); let body: any; - body = JSON.stringify(se_RemoveAccountFromOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -982,7 +952,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -995,7 +965,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1008,7 +978,7 @@ export const se_UpdateOrganizationalUnitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateOrganizationalUnit"); let body: any; - body = JSON.stringify(se_UpdateOrganizationalUnitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1021,7 +991,7 @@ export const se_UpdatePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePolicy"); let body: any; - body = JSON.stringify(se_UpdatePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1042,7 +1012,7 @@ export const de_AcceptHandshakeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1093,10 +1063,9 @@ const de_AcceptHandshakeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1116,7 +1085,7 @@ export const de_AttachPolicyCommand = async ( const response: AttachPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1173,10 +1142,9 @@ const de_AttachPolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1199,7 +1167,7 @@ export const de_CancelHandshakeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1241,10 +1209,9 @@ const de_CancelHandshakeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1264,7 +1231,7 @@ export const de_CloseAccountCommand = async ( const response: CloseAccountCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1315,10 +1282,9 @@ const de_CloseAccountCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1341,7 +1307,7 @@ export const de_CreateAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1386,10 +1352,9 @@ const de_CreateAccountCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1412,7 +1377,7 @@ export const de_CreateGovCloudAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1457,10 +1422,9 @@ const de_CreateGovCloudAccountCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,12 +1442,12 @@ export const de_CreateOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateOrganizationResponse(data, context); + contents = _json(data); const response: CreateOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1525,10 +1489,9 @@ const de_CreateOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1546,12 +1509,12 @@ export const de_CreateOrganizationalUnitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateOrganizationalUnitResponse(data, context); + contents = _json(data); const response: CreateOrganizationalUnitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1596,10 +1559,9 @@ const de_CreateOrganizationalUnitCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1617,12 +1579,12 @@ export const de_CreatePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePolicyResponse(data, context); + contents = _json(data); const response: CreatePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1673,10 +1635,9 @@ const de_CreatePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1699,7 +1660,7 @@ export const de_DeclineHandshakeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1741,10 +1702,9 @@ const de_DeclineHandshakeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1764,7 +1724,7 @@ export const de_DeleteOrganizationCommand = async ( const response: DeleteOrganizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1803,10 +1763,9 @@ const de_DeleteOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1826,7 +1785,7 @@ export const de_DeleteOrganizationalUnitCommand = async ( const response: DeleteOrganizationalUnitCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1868,10 +1827,9 @@ const de_DeleteOrganizationalUnitCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1891,7 +1849,7 @@ export const de_DeletePolicyCommand = async ( const response: DeletePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1936,10 +1894,9 @@ const de_DeletePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1959,7 +1916,7 @@ export const de_DeleteResourcePolicyCommand = async ( const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2001,10 +1958,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2024,7 +1980,7 @@ export const de_DeregisterDelegatedAdministratorCommand = async ( const response: DeregisterDelegatedAdministratorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2072,10 +2028,9 @@ const de_DeregisterDelegatedAdministratorCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2098,7 +2053,7 @@ export const de_DescribeAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2134,10 +2089,9 @@ const de_DescribeAccountCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2160,7 +2114,7 @@ export const de_DescribeCreateAccountStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2199,10 +2153,9 @@ const de_DescribeCreateAccountStatusCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2225,7 +2178,7 @@ export const de_DescribeEffectivePolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2270,10 +2223,9 @@ const de_DescribeEffectivePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2296,7 +2248,7 @@ export const de_DescribeHandshakeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2332,10 +2284,9 @@ const de_DescribeHandshakeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2353,12 +2304,12 @@ export const de_DescribeOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeOrganizationResponse(data, context); + contents = _json(data); const response: DescribeOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2391,10 +2342,9 @@ const de_DescribeOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2412,12 +2362,12 @@ export const de_DescribeOrganizationalUnitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeOrganizationalUnitResponse(data, context); + contents = _json(data); const response: DescribeOrganizationalUnitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2453,10 +2403,9 @@ const de_DescribeOrganizationalUnitCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2474,12 +2423,12 @@ export const de_DescribePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePolicyResponse(data, context); + contents = _json(data); const response: DescribePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2518,10 +2467,9 @@ const de_DescribePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2539,12 +2487,12 @@ export const de_DescribeResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeResourcePolicyResponse(data, context); + contents = _json(data); const response: DescribeResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2583,10 +2531,9 @@ const de_DescribeResourcePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2606,7 +2553,7 @@ export const de_DetachPolicyCommand = async ( const response: DetachPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2660,10 +2607,9 @@ const de_DetachPolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2683,7 +2629,7 @@ export const de_DisableAWSServiceAccessCommand = async ( const response: DisableAWSServiceAccessCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2725,10 +2671,9 @@ const de_DisableAWSServiceAccessCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2746,12 +2691,12 @@ export const de_DisablePolicyTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisablePolicyTypeResponse(data, context); + contents = _json(data); const response: DisablePolicyTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2802,10 +2747,9 @@ const de_DisablePolicyTypeCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2828,7 +2772,7 @@ export const de_EnableAllFeaturesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2867,10 +2811,9 @@ const de_EnableAllFeaturesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2890,7 +2833,7 @@ export const de_EnableAWSServiceAccessCommand = async ( const response: EnableAWSServiceAccessCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2932,10 +2875,9 @@ const de_EnableAWSServiceAccessCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2953,12 +2895,12 @@ export const de_EnablePolicyTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnablePolicyTypeResponse(data, context); + contents = _json(data); const response: EnablePolicyTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3012,10 +2954,9 @@ const de_EnablePolicyTypeCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3038,7 +2979,7 @@ export const de_InviteAccountToOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3089,10 +3030,9 @@ const de_InviteAccountToOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3112,7 +3052,7 @@ export const de_LeaveOrganizationCommand = async ( const response: LeaveOrganizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3157,10 +3097,9 @@ const de_LeaveOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3183,7 +3122,7 @@ export const de_ListAccountsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3216,10 +3155,9 @@ const de_ListAccountsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3242,7 +3180,7 @@ export const de_ListAccountsForParentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3278,10 +3216,9 @@ const de_ListAccountsForParentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3304,7 +3241,7 @@ export const de_ListAWSServiceAccessForOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3343,10 +3280,9 @@ const de_ListAWSServiceAccessForOrganizationCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3364,12 +3300,12 @@ export const de_ListChildrenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListChildrenResponse(data, context); + contents = _json(data); const response: ListChildrenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3405,10 +3341,9 @@ const de_ListChildrenCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3431,7 +3366,7 @@ export const de_ListCreateAccountStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3467,10 +3402,9 @@ const de_ListCreateAccountStatusCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3493,7 +3427,7 @@ export const de_ListDelegatedAdministratorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3532,10 +3466,9 @@ const de_ListDelegatedAdministratorsCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3558,7 +3491,7 @@ export const de_ListDelegatedServicesForAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3603,10 +3536,9 @@ const de_ListDelegatedServicesForAccountCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3629,7 +3561,7 @@ export const de_ListHandshakesForAccountCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3662,10 +3594,9 @@ const de_ListHandshakesForAccountCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3688,7 +3619,7 @@ export const de_ListHandshakesForOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3724,10 +3655,9 @@ const de_ListHandshakesForOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3745,12 +3675,12 @@ export const de_ListOrganizationalUnitsForParentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListOrganizationalUnitsForParentResponse(data, context); + contents = _json(data); const response: ListOrganizationalUnitsForParentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3786,10 +3716,9 @@ const de_ListOrganizationalUnitsForParentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3807,12 +3736,12 @@ export const de_ListParentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListParentsResponse(data, context); + contents = _json(data); const response: ListParentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3848,10 +3777,9 @@ const de_ListParentsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3869,12 +3797,12 @@ export const de_ListPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPoliciesResponse(data, context); + contents = _json(data); const response: ListPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3910,10 +3838,9 @@ const de_ListPoliciesCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3931,12 +3858,12 @@ export const de_ListPoliciesForTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPoliciesForTargetResponse(data, context); + contents = _json(data); const response: ListPoliciesForTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3975,10 +3902,9 @@ const de_ListPoliciesForTargetCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3996,12 +3922,12 @@ export const de_ListRootsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRootsResponse(data, context); + contents = _json(data); const response: ListRootsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4034,10 +3960,9 @@ const de_ListRootsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4055,12 +3980,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4096,10 +4021,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4117,12 +4041,12 @@ export const de_ListTargetsForPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTargetsForPolicyResponse(data, context); + contents = _json(data); const response: ListTargetsForPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4161,10 +4085,9 @@ const de_ListTargetsForPolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4184,7 +4107,7 @@ export const de_MoveAccountCommand = async ( const response: MoveAccountCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4232,10 +4155,9 @@ const de_MoveAccountCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4253,12 +4175,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4300,10 +4222,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4323,7 +4244,7 @@ export const de_RegisterDelegatedAdministratorCommand = async ( const response: RegisterDelegatedAdministratorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4371,10 +4292,9 @@ const de_RegisterDelegatedAdministratorCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4394,7 +4314,7 @@ export const de_RemoveAccountFromOrganizationCommand = async ( const response: RemoveAccountFromOrganizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4439,10 +4359,9 @@ const de_RemoveAccountFromOrganizationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4462,7 +4381,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4504,10 +4423,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4527,7 +4445,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4569,10 +4487,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4590,12 +4507,12 @@ export const de_UpdateOrganizationalUnitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateOrganizationalUnitResponse(data, context); + contents = _json(data); const response: UpdateOrganizationalUnitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4637,10 +4554,9 @@ const de_UpdateOrganizationalUnitCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4658,12 +4574,12 @@ export const de_UpdatePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePolicyResponse(data, context); + contents = _json(data); const response: UpdatePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4717,10 +4633,9 @@ const de_UpdatePolicyCommandError = async ( throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4734,7 +4649,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4750,7 +4665,7 @@ const de_AccessDeniedForDependencyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedForDependencyException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedForDependencyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4766,7 +4681,7 @@ const de_AccountAlreadyClosedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountAlreadyClosedException(body, context); + const deserialized: any = _json(body); const exception = new AccountAlreadyClosedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4782,7 +4697,7 @@ const de_AccountAlreadyRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountAlreadyRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new AccountAlreadyRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4798,7 +4713,7 @@ const de_AccountNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AccountNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4814,7 +4729,7 @@ const de_AccountNotRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountNotRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new AccountNotRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4830,7 +4745,7 @@ const de_AccountOwnerNotVerifiedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccountOwnerNotVerifiedException(body, context); + const deserialized: any = _json(body); const exception = new AccountOwnerNotVerifiedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4846,7 +4761,7 @@ const de_AlreadyInOrganizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlreadyInOrganizationException(body, context); + const deserialized: any = _json(body); const exception = new AlreadyInOrganizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4862,7 +4777,7 @@ const de_AWSOrganizationsNotInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AWSOrganizationsNotInUseException(body, context); + const deserialized: any = _json(body); const exception = new AWSOrganizationsNotInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4878,7 +4793,7 @@ const de_ChildNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ChildNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ChildNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4894,7 +4809,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4907,7 +4822,7 @@ const de_ConcurrentModificationExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4923,7 +4838,7 @@ const de_ConstraintViolationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConstraintViolationException(body, context); + const deserialized: any = _json(body); const exception = new ConstraintViolationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4939,7 +4854,7 @@ const de_CreateAccountStatusNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CreateAccountStatusNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new CreateAccountStatusNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4955,7 +4870,7 @@ const de_DestinationParentNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DestinationParentNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new DestinationParentNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4971,7 +4886,7 @@ const de_DuplicateAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateAccountException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4987,7 +4902,7 @@ const de_DuplicateHandshakeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateHandshakeException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateHandshakeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5003,7 +4918,7 @@ const de_DuplicateOrganizationalUnitExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateOrganizationalUnitException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateOrganizationalUnitException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5019,7 +4934,7 @@ const de_DuplicatePolicyAttachmentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicatePolicyAttachmentException(body, context); + const deserialized: any = _json(body); const exception = new DuplicatePolicyAttachmentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5035,7 +4950,7 @@ const de_DuplicatePolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicatePolicyException(body, context); + const deserialized: any = _json(body); const exception = new DuplicatePolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5051,7 +4966,7 @@ const de_EffectivePolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EffectivePolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EffectivePolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5067,7 +4982,7 @@ const de_FinalizingOrganizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FinalizingOrganizationException(body, context); + const deserialized: any = _json(body); const exception = new FinalizingOrganizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5083,7 +4998,7 @@ const de_HandshakeAlreadyInStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HandshakeAlreadyInStateException(body, context); + const deserialized: any = _json(body); const exception = new HandshakeAlreadyInStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5099,7 +5014,7 @@ const de_HandshakeConstraintViolationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HandshakeConstraintViolationException(body, context); + const deserialized: any = _json(body); const exception = new HandshakeConstraintViolationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5115,7 +5030,7 @@ const de_HandshakeNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HandshakeNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new HandshakeNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5131,7 +5046,7 @@ const de_InvalidHandshakeTransitionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidHandshakeTransitionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidHandshakeTransitionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5147,7 +5062,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5163,7 +5078,7 @@ const de_MalformedPolicyDocumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedPolicyDocumentException(body, context); + const deserialized: any = _json(body); const exception = new MalformedPolicyDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5179,7 +5094,7 @@ const de_MasterCannotLeaveOrganizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MasterCannotLeaveOrganizationException(body, context); + const deserialized: any = _json(body); const exception = new MasterCannotLeaveOrganizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5195,7 +5110,7 @@ const de_OrganizationalUnitNotEmptyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationalUnitNotEmptyException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationalUnitNotEmptyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5211,7 +5126,7 @@ const de_OrganizationalUnitNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationalUnitNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationalUnitNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5227,7 +5142,7 @@ const de_OrganizationNotEmptyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationNotEmptyException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationNotEmptyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5243,7 +5158,7 @@ const de_ParentNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParentNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ParentNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5259,7 +5174,7 @@ const de_PolicyChangesInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyChangesInProgressException(body, context); + const deserialized: any = _json(body); const exception = new PolicyChangesInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5275,7 +5190,7 @@ const de_PolicyInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyInUseException(body, context); + const deserialized: any = _json(body); const exception = new PolicyInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5291,7 +5206,7 @@ const de_PolicyNotAttachedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyNotAttachedException(body, context); + const deserialized: any = _json(body); const exception = new PolicyNotAttachedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5307,7 +5222,7 @@ const de_PolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new PolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5323,7 +5238,7 @@ const de_PolicyTypeAlreadyEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyTypeAlreadyEnabledException(body, context); + const deserialized: any = _json(body); const exception = new PolicyTypeAlreadyEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5339,7 +5254,7 @@ const de_PolicyTypeNotAvailableForOrganizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyTypeNotAvailableForOrganizationException(body, context); + const deserialized: any = _json(body); const exception = new PolicyTypeNotAvailableForOrganizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5355,7 +5270,7 @@ const de_PolicyTypeNotEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PolicyTypeNotEnabledException(body, context); + const deserialized: any = _json(body); const exception = new PolicyTypeNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5371,7 +5286,7 @@ const de_ResourcePolicyNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourcePolicyNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourcePolicyNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5387,7 +5302,7 @@ const de_RootNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RootNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new RootNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5400,7 +5315,7 @@ const de_RootNotFoundExceptionRes = async ( */ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceException(body, context); + const deserialized: any = _json(body); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5416,7 +5331,7 @@ const de_SourceParentNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SourceParentNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new SourceParentNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5432,7 +5347,7 @@ const de_TargetNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new TargetNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5448,7 +5363,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5464,7 +5379,7 @@ const de_UnsupportedAPIEndpointExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedAPIEndpointException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedAPIEndpointException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5472,2038 +5387,686 @@ const de_UnsupportedAPIEndpointExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptHandshakeRequest - */ -const se_AcceptHandshakeRequest = (input: AcceptHandshakeRequest, context: __SerdeContext): any => { - return { - ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }), - }; -}; +// se_AcceptHandshakeRequest omitted. -/** - * serializeAws_json1_1AttachPolicyRequest - */ -const se_AttachPolicyRequest = (input: AttachPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - }; -}; +// se_AttachPolicyRequest omitted. -/** - * serializeAws_json1_1CancelHandshakeRequest - */ -const se_CancelHandshakeRequest = (input: CancelHandshakeRequest, context: __SerdeContext): any => { - return { - ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }), - }; -}; +// se_CancelHandshakeRequest omitted. -/** - * serializeAws_json1_1CloseAccountRequest - */ -const se_CloseAccountRequest = (input: CloseAccountRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - }; -}; +// se_CloseAccountRequest omitted. -/** - * serializeAws_json1_1CreateAccountRequest - */ -const se_CreateAccountRequest = (input: CreateAccountRequest, context: __SerdeContext): any => { - return { - ...(input.AccountName != null && { AccountName: input.AccountName }), - ...(input.Email != null && { Email: input.Email }), - ...(input.IamUserAccessToBilling != null && { IamUserAccessToBilling: input.IamUserAccessToBilling }), - ...(input.RoleName != null && { RoleName: input.RoleName }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateAccountRequest omitted. -/** - * serializeAws_json1_1CreateAccountStates - */ -const se_CreateAccountStates = (input: (CreateAccountState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CreateAccountStates omitted. -/** - * serializeAws_json1_1CreateGovCloudAccountRequest - */ -const se_CreateGovCloudAccountRequest = (input: CreateGovCloudAccountRequest, context: __SerdeContext): any => { - return { - ...(input.AccountName != null && { AccountName: input.AccountName }), - ...(input.Email != null && { Email: input.Email }), - ...(input.IamUserAccessToBilling != null && { IamUserAccessToBilling: input.IamUserAccessToBilling }), - ...(input.RoleName != null && { RoleName: input.RoleName }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateGovCloudAccountRequest omitted. -/** - * serializeAws_json1_1CreateOrganizationalUnitRequest - */ -const se_CreateOrganizationalUnitRequest = (input: CreateOrganizationalUnitRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentId != null && { ParentId: input.ParentId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateOrganizationalUnitRequest omitted. -/** - * serializeAws_json1_1CreateOrganizationRequest - */ -const se_CreateOrganizationRequest = (input: CreateOrganizationRequest, context: __SerdeContext): any => { - return { - ...(input.FeatureSet != null && { FeatureSet: input.FeatureSet }), - }; -}; +// se_CreateOrganizationRequest omitted. -/** - * serializeAws_json1_1CreatePolicyRequest - */ -const se_CreatePolicyRequest = (input: CreatePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_CreatePolicyRequest omitted. -/** - * serializeAws_json1_1DeclineHandshakeRequest - */ -const se_DeclineHandshakeRequest = (input: DeclineHandshakeRequest, context: __SerdeContext): any => { - return { - ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }), - }; -}; +// se_DeclineHandshakeRequest omitted. -/** - * serializeAws_json1_1DeleteOrganizationalUnitRequest - */ -const se_DeleteOrganizationalUnitRequest = (input: DeleteOrganizationalUnitRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }), - }; -}; +// se_DeleteOrganizationalUnitRequest omitted. -/** - * serializeAws_json1_1DeletePolicyRequest - */ -const se_DeletePolicyRequest = (input: DeletePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_DeletePolicyRequest omitted. -/** - * serializeAws_json1_1DeregisterDelegatedAdministratorRequest - */ -const se_DeregisterDelegatedAdministratorRequest = ( - input: DeregisterDelegatedAdministratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }), - }; -}; +// se_DeregisterDelegatedAdministratorRequest omitted. -/** - * serializeAws_json1_1DescribeAccountRequest - */ -const se_DescribeAccountRequest = (input: DescribeAccountRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - }; -}; +// se_DescribeAccountRequest omitted. -/** - * serializeAws_json1_1DescribeCreateAccountStatusRequest - */ -const se_DescribeCreateAccountStatusRequest = ( - input: DescribeCreateAccountStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreateAccountRequestId != null && { CreateAccountRequestId: input.CreateAccountRequestId }), - }; -}; +// se_DescribeCreateAccountStatusRequest omitted. -/** - * serializeAws_json1_1DescribeEffectivePolicyRequest - */ -const se_DescribeEffectivePolicyRequest = (input: DescribeEffectivePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyType != null && { PolicyType: input.PolicyType }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - }; -}; +// se_DescribeEffectivePolicyRequest omitted. -/** - * serializeAws_json1_1DescribeHandshakeRequest - */ -const se_DescribeHandshakeRequest = (input: DescribeHandshakeRequest, context: __SerdeContext): any => { - return { - ...(input.HandshakeId != null && { HandshakeId: input.HandshakeId }), - }; -}; +// se_DescribeHandshakeRequest omitted. -/** - * serializeAws_json1_1DescribeOrganizationalUnitRequest - */ -const se_DescribeOrganizationalUnitRequest = ( - input: DescribeOrganizationalUnitRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }), - }; -}; +// se_DescribeOrganizationalUnitRequest omitted. -/** - * serializeAws_json1_1DescribePolicyRequest - */ -const se_DescribePolicyRequest = (input: DescribePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_DescribePolicyRequest omitted. -/** - * serializeAws_json1_1DetachPolicyRequest - */ -const se_DetachPolicyRequest = (input: DetachPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - }; -}; +// se_DetachPolicyRequest omitted. -/** - * serializeAws_json1_1DisableAWSServiceAccessRequest - */ -const se_DisableAWSServiceAccessRequest = (input: DisableAWSServiceAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }), - }; -}; +// se_DisableAWSServiceAccessRequest omitted. -/** - * serializeAws_json1_1DisablePolicyTypeRequest - */ -const se_DisablePolicyTypeRequest = (input: DisablePolicyTypeRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyType != null && { PolicyType: input.PolicyType }), - ...(input.RootId != null && { RootId: input.RootId }), - }; -}; +// se_DisablePolicyTypeRequest omitted. -/** - * serializeAws_json1_1EnableAllFeaturesRequest - */ -const se_EnableAllFeaturesRequest = (input: EnableAllFeaturesRequest, context: __SerdeContext): any => { - return {}; -}; +// se_EnableAllFeaturesRequest omitted. -/** - * serializeAws_json1_1EnableAWSServiceAccessRequest - */ -const se_EnableAWSServiceAccessRequest = (input: EnableAWSServiceAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }), - }; -}; +// se_EnableAWSServiceAccessRequest omitted. -/** - * serializeAws_json1_1EnablePolicyTypeRequest - */ -const se_EnablePolicyTypeRequest = (input: EnablePolicyTypeRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyType != null && { PolicyType: input.PolicyType }), - ...(input.RootId != null && { RootId: input.RootId }), - }; -}; +// se_EnablePolicyTypeRequest omitted. -/** - * serializeAws_json1_1HandshakeFilter - */ -const se_HandshakeFilter = (input: HandshakeFilter, context: __SerdeContext): any => { - return { - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.ParentHandshakeId != null && { ParentHandshakeId: input.ParentHandshakeId }), - }; -}; +// se_HandshakeFilter omitted. -/** - * serializeAws_json1_1HandshakeParty - */ -const se_HandshakeParty = (input: HandshakeParty, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_HandshakeParty omitted. -/** - * serializeAws_json1_1InviteAccountToOrganizationRequest - */ -const se_InviteAccountToOrganizationRequest = ( - input: InviteAccountToOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Target != null && { Target: se_HandshakeParty(input.Target, context) }), - }; -}; +// se_InviteAccountToOrganizationRequest omitted. -/** - * serializeAws_json1_1ListAccountsForParentRequest - */ -const se_ListAccountsForParentRequest = (input: ListAccountsForParentRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParentId != null && { ParentId: input.ParentId }), - }; -}; +// se_ListAccountsForParentRequest omitted. -/** - * serializeAws_json1_1ListAccountsRequest - */ -const se_ListAccountsRequest = (input: ListAccountsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAccountsRequest omitted. -/** - * serializeAws_json1_1ListAWSServiceAccessForOrganizationRequest - */ -const se_ListAWSServiceAccessForOrganizationRequest = ( - input: ListAWSServiceAccessForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAWSServiceAccessForOrganizationRequest omitted. -/** - * serializeAws_json1_1ListChildrenRequest - */ -const se_ListChildrenRequest = (input: ListChildrenRequest, context: __SerdeContext): any => { - return { - ...(input.ChildType != null && { ChildType: input.ChildType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParentId != null && { ParentId: input.ParentId }), - }; -}; +// se_ListChildrenRequest omitted. -/** - * serializeAws_json1_1ListCreateAccountStatusRequest - */ -const se_ListCreateAccountStatusRequest = (input: ListCreateAccountStatusRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.States != null && { States: se_CreateAccountStates(input.States, context) }), - }; -}; +// se_ListCreateAccountStatusRequest omitted. -/** - * serializeAws_json1_1ListDelegatedAdministratorsRequest - */ -const se_ListDelegatedAdministratorsRequest = ( - input: ListDelegatedAdministratorsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }), - }; -}; +// se_ListDelegatedAdministratorsRequest omitted. -/** - * serializeAws_json1_1ListDelegatedServicesForAccountRequest - */ -const se_ListDelegatedServicesForAccountRequest = ( - input: ListDelegatedServicesForAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDelegatedServicesForAccountRequest omitted. -/** - * serializeAws_json1_1ListHandshakesForAccountRequest - */ -const se_ListHandshakesForAccountRequest = (input: ListHandshakesForAccountRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_HandshakeFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHandshakesForAccountRequest omitted. -/** - * serializeAws_json1_1ListHandshakesForOrganizationRequest - */ -const se_ListHandshakesForOrganizationRequest = ( - input: ListHandshakesForOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filter != null && { Filter: se_HandshakeFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListHandshakesForOrganizationRequest omitted. -/** - * serializeAws_json1_1ListOrganizationalUnitsForParentRequest - */ -const se_ListOrganizationalUnitsForParentRequest = ( - input: ListOrganizationalUnitsForParentRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParentId != null && { ParentId: input.ParentId }), - }; -}; +// se_ListOrganizationalUnitsForParentRequest omitted. -/** - * serializeAws_json1_1ListParentsRequest - */ -const se_ListParentsRequest = (input: ListParentsRequest, context: __SerdeContext): any => { - return { - ...(input.ChildId != null && { ChildId: input.ChildId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListParentsRequest omitted. -/** - * serializeAws_json1_1ListPoliciesForTargetRequest - */ -const se_ListPoliciesForTargetRequest = (input: ListPoliciesForTargetRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: input.Filter }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - }; -}; +// se_ListPoliciesForTargetRequest omitted. -/** - * serializeAws_json1_1ListPoliciesRequest - */ -const se_ListPoliciesRequest = (input: ListPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: input.Filter }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPoliciesRequest omitted. -/** - * serializeAws_json1_1ListRootsRequest - */ -const se_ListRootsRequest = (input: ListRootsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListRootsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListTargetsForPolicyRequest - */ -const se_ListTargetsForPolicyRequest = (input: ListTargetsForPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; +// se_ListTargetsForPolicyRequest omitted. -/** - * serializeAws_json1_1MoveAccountRequest - */ -const se_MoveAccountRequest = (input: MoveAccountRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.DestinationParentId != null && { DestinationParentId: input.DestinationParentId }), - ...(input.SourceParentId != null && { SourceParentId: input.SourceParentId }), - }; -}; +// se_MoveAccountRequest omitted. -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_PutResourcePolicyRequest omitted. -/** - * serializeAws_json1_1RegisterDelegatedAdministratorRequest - */ -const se_RegisterDelegatedAdministratorRequest = ( - input: RegisterDelegatedAdministratorRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ServicePrincipal != null && { ServicePrincipal: input.ServicePrincipal }), - }; -}; +// se_RegisterDelegatedAdministratorRequest omitted. -/** - * serializeAws_json1_1RemoveAccountFromOrganizationRequest - */ -const se_RemoveAccountFromOrganizationRequest = ( - input: RemoveAccountFromOrganizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - }; -}; +// se_RemoveAccountFromOrganizationRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateOrganizationalUnitRequest - */ -const se_UpdateOrganizationalUnitRequest = (input: UpdateOrganizationalUnitRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }), - }; -}; - -/** - * serializeAws_json1_1UpdatePolicyRequest - */ -const se_UpdatePolicyRequest = (input: UpdatePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - }; -}; - -/** - * deserializeAws_json1_1AcceptHandshakeResponse - */ -const de_AcceptHandshakeResponse = (output: any, context: __SerdeContext): AcceptHandshakeResponse => { - return { - Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccessDeniedForDependencyException - */ -const de_AccessDeniedForDependencyException = ( - output: any, - context: __SerdeContext -): AccessDeniedForDependencyException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; - -/** - * deserializeAws_json1_1Account - */ -const de_Account = (output: any, context: __SerdeContext): Account => { - return { - Arn: __expectString(output.Arn), - Email: __expectString(output.Email), - Id: __expectString(output.Id), - JoinedMethod: __expectString(output.JoinedMethod), - JoinedTimestamp: - output.JoinedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.JoinedTimestamp))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AccountAlreadyClosedException - */ -const de_AccountAlreadyClosedException = (output: any, context: __SerdeContext): AccountAlreadyClosedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountAlreadyRegisteredException - */ -const de_AccountAlreadyRegisteredException = ( - output: any, - context: __SerdeContext -): AccountAlreadyRegisteredException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountNotFoundException - */ -const de_AccountNotFoundException = (output: any, context: __SerdeContext): AccountNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountNotRegisteredException - */ -const de_AccountNotRegisteredException = (output: any, context: __SerdeContext): AccountNotRegisteredException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountOwnerNotVerifiedException - */ -const de_AccountOwnerNotVerifiedException = ( - output: any, - context: __SerdeContext -): AccountOwnerNotVerifiedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Accounts - */ -const de_Accounts = (output: any, context: __SerdeContext): Account[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Account(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlreadyInOrganizationException - */ -const de_AlreadyInOrganizationException = (output: any, context: __SerdeContext): AlreadyInOrganizationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AWSOrganizationsNotInUseException - */ -const de_AWSOrganizationsNotInUseException = ( - output: any, - context: __SerdeContext -): AWSOrganizationsNotInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CancelHandshakeResponse - */ -const de_CancelHandshakeResponse = (output: any, context: __SerdeContext): CancelHandshakeResponse => { - return { - Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Child - */ -const de_Child = (output: any, context: __SerdeContext): Child => { - return { - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ChildNotFoundException - */ -const de_ChildNotFoundException = (output: any, context: __SerdeContext): ChildNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Children - */ -const de_Children = (output: any, context: __SerdeContext): Child[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Child(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ConstraintViolationException - */ -const de_ConstraintViolationException = (output: any, context: __SerdeContext): ConstraintViolationException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAccountResponse - */ -const de_CreateAccountResponse = (output: any, context: __SerdeContext): CreateAccountResponse => { - return { - CreateAccountStatus: - output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateAccountStatus - */ -const de_CreateAccountStatus = (output: any, context: __SerdeContext): CreateAccountStatus => { - return { - AccountId: __expectString(output.AccountId), - AccountName: __expectString(output.AccountName), - CompletedTimestamp: - output.CompletedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedTimestamp))) - : undefined, - FailureReason: __expectString(output.FailureReason), - GovCloudAccountId: __expectString(output.GovCloudAccountId), - Id: __expectString(output.Id), - RequestedTimestamp: - output.RequestedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedTimestamp))) - : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAccountStatuses - */ -const de_CreateAccountStatuses = (output: any, context: __SerdeContext): CreateAccountStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CreateAccountStatus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateAccountStatusNotFoundException - */ -const de_CreateAccountStatusNotFoundException = ( - output: any, - context: __SerdeContext -): CreateAccountStatusNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CreateGovCloudAccountResponse - */ -const de_CreateGovCloudAccountResponse = (output: any, context: __SerdeContext): CreateGovCloudAccountResponse => { - return { - CreateAccountStatus: - output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateOrganizationalUnitResponse - */ -const de_CreateOrganizationalUnitResponse = ( - output: any, - context: __SerdeContext -): CreateOrganizationalUnitResponse => { - return { - OrganizationalUnit: - output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateOrganizationResponse - */ -const de_CreateOrganizationResponse = (output: any, context: __SerdeContext): CreateOrganizationResponse => { - return { - Organization: output.Organization != null ? de_Organization(output.Organization, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreatePolicyResponse - */ -const de_CreatePolicyResponse = (output: any, context: __SerdeContext): CreatePolicyResponse => { - return { - Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeclineHandshakeResponse - */ -const de_DeclineHandshakeResponse = (output: any, context: __SerdeContext): DeclineHandshakeResponse => { - return { - Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DelegatedAdministrator - */ -const de_DelegatedAdministrator = (output: any, context: __SerdeContext): DelegatedAdministrator => { - return { - Arn: __expectString(output.Arn), - DelegationEnabledDate: - output.DelegationEnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DelegationEnabledDate))) - : undefined, - Email: __expectString(output.Email), - Id: __expectString(output.Id), - JoinedMethod: __expectString(output.JoinedMethod), - JoinedTimestamp: - output.JoinedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.JoinedTimestamp))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DelegatedAdministrators - */ -const de_DelegatedAdministrators = (output: any, context: __SerdeContext): DelegatedAdministrator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DelegatedAdministrator(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DelegatedService - */ -const de_DelegatedService = (output: any, context: __SerdeContext): DelegatedService => { - return { - DelegationEnabledDate: - output.DelegationEnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DelegationEnabledDate))) - : undefined, - ServicePrincipal: __expectString(output.ServicePrincipal), - } as any; -}; - -/** - * deserializeAws_json1_1DelegatedServices - */ -const de_DelegatedServices = (output: any, context: __SerdeContext): DelegatedService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DelegatedService(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DescribeAccountResponse - */ -const de_DescribeAccountResponse = (output: any, context: __SerdeContext): DescribeAccountResponse => { - return { - Account: output.Account != null ? de_Account(output.Account, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCreateAccountStatusResponse - */ -const de_DescribeCreateAccountStatusResponse = ( - output: any, - context: __SerdeContext -): DescribeCreateAccountStatusResponse => { - return { - CreateAccountStatus: - output.CreateAccountStatus != null ? de_CreateAccountStatus(output.CreateAccountStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEffectivePolicyResponse - */ -const de_DescribeEffectivePolicyResponse = (output: any, context: __SerdeContext): DescribeEffectivePolicyResponse => { - return { - EffectivePolicy: output.EffectivePolicy != null ? de_EffectivePolicy(output.EffectivePolicy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHandshakeResponse - */ -const de_DescribeHandshakeResponse = (output: any, context: __SerdeContext): DescribeHandshakeResponse => { - return { - Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeOrganizationalUnitResponse - */ -const de_DescribeOrganizationalUnitResponse = ( - output: any, - context: __SerdeContext -): DescribeOrganizationalUnitResponse => { - return { - OrganizationalUnit: - output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeOrganizationResponse - */ -const de_DescribeOrganizationResponse = (output: any, context: __SerdeContext): DescribeOrganizationResponse => { - return { - Organization: output.Organization != null ? de_Organization(output.Organization, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePolicyResponse - */ -const de_DescribePolicyResponse = (output: any, context: __SerdeContext): DescribePolicyResponse => { - return { - Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeResourcePolicyResponse - */ -const de_DescribeResourcePolicyResponse = (output: any, context: __SerdeContext): DescribeResourcePolicyResponse => { - return { - ResourcePolicy: output.ResourcePolicy != null ? de_ResourcePolicy(output.ResourcePolicy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DestinationParentNotFoundException - */ -const de_DestinationParentNotFoundException = ( - output: any, - context: __SerdeContext -): DestinationParentNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DisablePolicyTypeResponse - */ -const de_DisablePolicyTypeResponse = (output: any, context: __SerdeContext): DisablePolicyTypeResponse => { - return { - Root: output.Root != null ? de_Root(output.Root, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateAccountException - */ -const de_DuplicateAccountException = (output: any, context: __SerdeContext): DuplicateAccountException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateHandshakeException - */ -const de_DuplicateHandshakeException = (output: any, context: __SerdeContext): DuplicateHandshakeException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateOrganizationalUnitException - */ -const de_DuplicateOrganizationalUnitException = ( - output: any, - context: __SerdeContext -): DuplicateOrganizationalUnitException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicatePolicyAttachmentException - */ -const de_DuplicatePolicyAttachmentException = ( - output: any, - context: __SerdeContext -): DuplicatePolicyAttachmentException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicatePolicyException - */ -const de_DuplicatePolicyException = (output: any, context: __SerdeContext): DuplicatePolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EffectivePolicy - */ -const de_EffectivePolicy = (output: any, context: __SerdeContext): EffectivePolicy => { - return { - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - PolicyContent: __expectString(output.PolicyContent), - PolicyType: __expectString(output.PolicyType), - TargetId: __expectString(output.TargetId), - } as any; -}; - -/** - * deserializeAws_json1_1EffectivePolicyNotFoundException - */ -const de_EffectivePolicyNotFoundException = ( - output: any, - context: __SerdeContext -): EffectivePolicyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EnableAllFeaturesResponse - */ -const de_EnableAllFeaturesResponse = (output: any, context: __SerdeContext): EnableAllFeaturesResponse => { - return { - Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EnabledServicePrincipal - */ -const de_EnabledServicePrincipal = (output: any, context: __SerdeContext): EnabledServicePrincipal => { - return { - DateEnabled: - output.DateEnabled != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateEnabled))) - : undefined, - ServicePrincipal: __expectString(output.ServicePrincipal), - } as any; -}; - -/** - * deserializeAws_json1_1EnabledServicePrincipals - */ -const de_EnabledServicePrincipals = (output: any, context: __SerdeContext): EnabledServicePrincipal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnabledServicePrincipal(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EnablePolicyTypeResponse - */ -const de_EnablePolicyTypeResponse = (output: any, context: __SerdeContext): EnablePolicyTypeResponse => { - return { - Root: output.Root != null ? de_Root(output.Root, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FinalizingOrganizationException - */ -const de_FinalizingOrganizationException = (output: any, context: __SerdeContext): FinalizingOrganizationException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1Handshake - */ -const de_Handshake = (output: any, context: __SerdeContext): Handshake => { - return { - Action: __expectString(output.Action), - Arn: __expectString(output.Arn), - ExpirationTimestamp: - output.ExpirationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTimestamp))) - : undefined, - Id: __expectString(output.Id), - Parties: output.Parties != null ? de_HandshakeParties(output.Parties, context) : undefined, - RequestedTimestamp: - output.RequestedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedTimestamp))) - : undefined, - Resources: output.Resources != null ? de_HandshakeResources(output.Resources, context) : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1HandshakeAlreadyInStateException - */ -const de_HandshakeAlreadyInStateException = ( - output: any, - context: __SerdeContext -): HandshakeAlreadyInStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1HandshakeConstraintViolationException - */ -const de_HandshakeConstraintViolationException = ( - output: any, - context: __SerdeContext -): HandshakeConstraintViolationException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; - -/** - * deserializeAws_json1_1HandshakeNotFoundException - */ -const de_HandshakeNotFoundException = (output: any, context: __SerdeContext): HandshakeNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1HandshakeParties - */ -const de_HandshakeParties = (output: any, context: __SerdeContext): HandshakeParty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HandshakeParty(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1HandshakeParty - */ -const de_HandshakeParty = (output: any, context: __SerdeContext): HandshakeParty => { - return { - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1HandshakeResource - */ -const de_HandshakeResource = (output: any, context: __SerdeContext): HandshakeResource => { - return { - Resources: output.Resources != null ? de_HandshakeResources(output.Resources, context) : undefined, - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1HandshakeResources - */ -const de_HandshakeResources = (output: any, context: __SerdeContext): HandshakeResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HandshakeResource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Handshakes - */ -const de_Handshakes = (output: any, context: __SerdeContext): Handshake[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Handshake(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InvalidHandshakeTransitionException - */ -const de_InvalidHandshakeTransitionException = ( - output: any, - context: __SerdeContext -): InvalidHandshakeTransitionException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; - -/** - * deserializeAws_json1_1InviteAccountToOrganizationResponse - */ -const de_InviteAccountToOrganizationResponse = ( - output: any, - context: __SerdeContext -): InviteAccountToOrganizationResponse => { - return { - Handshake: output.Handshake != null ? de_Handshake(output.Handshake, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListAccountsForParentResponse - */ -const de_ListAccountsForParentResponse = (output: any, context: __SerdeContext): ListAccountsForParentResponse => { - return { - Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListAccountsResponse - */ -const de_ListAccountsResponse = (output: any, context: __SerdeContext): ListAccountsResponse => { - return { - Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListAWSServiceAccessForOrganizationResponse - */ -const de_ListAWSServiceAccessForOrganizationResponse = ( - output: any, - context: __SerdeContext -): ListAWSServiceAccessForOrganizationResponse => { - return { - EnabledServicePrincipals: - output.EnabledServicePrincipals != null - ? de_EnabledServicePrincipals(output.EnabledServicePrincipals, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListChildrenResponse - */ -const de_ListChildrenResponse = (output: any, context: __SerdeContext): ListChildrenResponse => { - return { - Children: output.Children != null ? de_Children(output.Children, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListCreateAccountStatusResponse - */ -const de_ListCreateAccountStatusResponse = (output: any, context: __SerdeContext): ListCreateAccountStatusResponse => { - return { - CreateAccountStatuses: - output.CreateAccountStatuses != null - ? de_CreateAccountStatuses(output.CreateAccountStatuses, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListDelegatedAdministratorsResponse - */ -const de_ListDelegatedAdministratorsResponse = ( - output: any, - context: __SerdeContext -): ListDelegatedAdministratorsResponse => { - return { - DelegatedAdministrators: - output.DelegatedAdministrators != null - ? de_DelegatedAdministrators(output.DelegatedAdministrators, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListDelegatedServicesForAccountResponse - */ -const de_ListDelegatedServicesForAccountResponse = ( - output: any, - context: __SerdeContext -): ListDelegatedServicesForAccountResponse => { - return { - DelegatedServices: - output.DelegatedServices != null ? de_DelegatedServices(output.DelegatedServices, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListHandshakesForAccountResponse - */ -const de_ListHandshakesForAccountResponse = ( - output: any, - context: __SerdeContext -): ListHandshakesForAccountResponse => { - return { - Handshakes: output.Handshakes != null ? de_Handshakes(output.Handshakes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListHandshakesForOrganizationResponse - */ -const de_ListHandshakesForOrganizationResponse = ( - output: any, - context: __SerdeContext -): ListHandshakesForOrganizationResponse => { - return { - Handshakes: output.Handshakes != null ? de_Handshakes(output.Handshakes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListOrganizationalUnitsForParentResponse - */ -const de_ListOrganizationalUnitsForParentResponse = ( - output: any, - context: __SerdeContext -): ListOrganizationalUnitsForParentResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationalUnits: - output.OrganizationalUnits != null ? de_OrganizationalUnits(output.OrganizationalUnits, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListParentsResponse - */ -const de_ListParentsResponse = (output: any, context: __SerdeContext): ListParentsResponse => { - return { - NextToken: __expectString(output.NextToken), - Parents: output.Parents != null ? de_Parents(output.Parents, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListPoliciesForTargetResponse - */ -const de_ListPoliciesForTargetResponse = (output: any, context: __SerdeContext): ListPoliciesForTargetResponse => { - return { - NextToken: __expectString(output.NextToken), - Policies: output.Policies != null ? de_Policies(output.Policies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListPoliciesResponse - */ -const de_ListPoliciesResponse = (output: any, context: __SerdeContext): ListPoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - Policies: output.Policies != null ? de_Policies(output.Policies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRootsResponse - */ -const de_ListRootsResponse = (output: any, context: __SerdeContext): ListRootsResponse => { - return { - NextToken: __expectString(output.NextToken), - Roots: output.Roots != null ? de_Roots(output.Roots, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1ListTargetsForPolicyResponse - */ -const de_ListTargetsForPolicyResponse = (output: any, context: __SerdeContext): ListTargetsForPolicyResponse => { - return { - NextToken: __expectString(output.NextToken), - Targets: output.Targets != null ? de_PolicyTargets(output.Targets, context) : undefined, - } as any; -}; +// se_TagKeys omitted. -/** - * deserializeAws_json1_1MalformedPolicyDocumentException - */ -const de_MalformedPolicyDocumentException = ( - output: any, - context: __SerdeContext -): MalformedPolicyDocumentException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1MasterCannotLeaveOrganizationException - */ -const de_MasterCannotLeaveOrganizationException = ( - output: any, - context: __SerdeContext -): MasterCannotLeaveOrganizationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_Tags omitted. -/** - * deserializeAws_json1_1Organization - */ -const de_Organization = (output: any, context: __SerdeContext): Organization => { - return { - Arn: __expectString(output.Arn), - AvailablePolicyTypes: - output.AvailablePolicyTypes != null ? de_PolicyTypes(output.AvailablePolicyTypes, context) : undefined, - FeatureSet: __expectString(output.FeatureSet), - Id: __expectString(output.Id), - MasterAccountArn: __expectString(output.MasterAccountArn), - MasterAccountEmail: __expectString(output.MasterAccountEmail), - MasterAccountId: __expectString(output.MasterAccountId), - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1OrganizationalUnit - */ -const de_OrganizationalUnit = (output: any, context: __SerdeContext): OrganizationalUnit => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// se_UpdateOrganizationalUnitRequest omitted. + +// se_UpdatePolicyRequest omitted. /** - * deserializeAws_json1_1OrganizationalUnitNotEmptyException + * deserializeAws_json1_1AcceptHandshakeResponse */ -const de_OrganizationalUnitNotEmptyException = ( - output: any, - context: __SerdeContext -): OrganizationalUnitNotEmptyException => { - return { - Message: __expectString(output.Message), - } as any; +const de_AcceptHandshakeResponse = (output: any, context: __SerdeContext): AcceptHandshakeResponse => { + return take(output, { + Handshake: (_: any) => de_Handshake(_, context), + }) as any; }; +// de_AccessDeniedException omitted. + +// de_AccessDeniedForDependencyException omitted. + /** - * deserializeAws_json1_1OrganizationalUnitNotFoundException + * deserializeAws_json1_1Account */ -const de_OrganizationalUnitNotFoundException = ( - output: any, - context: __SerdeContext -): OrganizationalUnitNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_Account = (output: any, context: __SerdeContext): Account => { + return take(output, { + Arn: __expectString, + Email: __expectString, + Id: __expectString, + JoinedMethod: __expectString, + JoinedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; +// de_AccountAlreadyClosedException omitted. + +// de_AccountAlreadyRegisteredException omitted. + +// de_AccountNotFoundException omitted. + +// de_AccountNotRegisteredException omitted. + +// de_AccountOwnerNotVerifiedException omitted. + /** - * deserializeAws_json1_1OrganizationalUnits + * deserializeAws_json1_1Accounts */ -const de_OrganizationalUnits = (output: any, context: __SerdeContext): OrganizationalUnit[] => { +const de_Accounts = (output: any, context: __SerdeContext): Account[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationalUnit(entry, context); + return de_Account(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OrganizationNotEmptyException - */ -const de_OrganizationNotEmptyException = (output: any, context: __SerdeContext): OrganizationNotEmptyException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AlreadyInOrganizationException omitted. + +// de_AWSOrganizationsNotInUseException omitted. /** - * deserializeAws_json1_1Parent + * deserializeAws_json1_1CancelHandshakeResponse */ -const de_Parent = (output: any, context: __SerdeContext): Parent => { - return { - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; +const de_CancelHandshakeResponse = (output: any, context: __SerdeContext): CancelHandshakeResponse => { + return take(output, { + Handshake: (_: any) => de_Handshake(_, context), + }) as any; }; +// de_Child omitted. + +// de_ChildNotFoundException omitted. + +// de_Children omitted. + +// de_ConcurrentModificationException omitted. + +// de_ConflictException omitted. + +// de_ConstraintViolationException omitted. + /** - * deserializeAws_json1_1ParentNotFoundException + * deserializeAws_json1_1CreateAccountResponse */ -const de_ParentNotFoundException = (output: any, context: __SerdeContext): ParentNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateAccountResponse = (output: any, context: __SerdeContext): CreateAccountResponse => { + return take(output, { + CreateAccountStatus: (_: any) => de_CreateAccountStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1Parents + * deserializeAws_json1_1CreateAccountStatus */ -const de_Parents = (output: any, context: __SerdeContext): Parent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parent(entry, context); - }); - return retVal; +const de_CreateAccountStatus = (output: any, context: __SerdeContext): CreateAccountStatus => { + return take(output, { + AccountId: __expectString, + AccountName: __expectString, + CompletedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + GovCloudAccountId: __expectString, + Id: __expectString, + RequestedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Policies + * deserializeAws_json1_1CreateAccountStatuses */ -const de_Policies = (output: any, context: __SerdeContext): PolicySummary[] => { +const de_CreateAccountStatuses = (output: any, context: __SerdeContext): CreateAccountStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicySummary(entry, context); + return de_CreateAccountStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Policy - */ -const de_Policy = (output: any, context: __SerdeContext): Policy => { - return { - Content: __expectString(output.Content), - PolicySummary: output.PolicySummary != null ? de_PolicySummary(output.PolicySummary, context) : undefined, - } as any; -}; +// de_CreateAccountStatusNotFoundException omitted. /** - * deserializeAws_json1_1PolicyChangesInProgressException + * deserializeAws_json1_1CreateGovCloudAccountResponse */ -const de_PolicyChangesInProgressException = ( - output: any, - context: __SerdeContext -): PolicyChangesInProgressException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CreateGovCloudAccountResponse = (output: any, context: __SerdeContext): CreateGovCloudAccountResponse => { + return take(output, { + CreateAccountStatus: (_: any) => de_CreateAccountStatus(_, context), + }) as any; }; +// de_CreateOrganizationalUnitResponse omitted. + +// de_CreateOrganizationResponse omitted. + +// de_CreatePolicyResponse omitted. + /** - * deserializeAws_json1_1PolicyInUseException + * deserializeAws_json1_1DeclineHandshakeResponse */ -const de_PolicyInUseException = (output: any, context: __SerdeContext): PolicyInUseException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DeclineHandshakeResponse = (output: any, context: __SerdeContext): DeclineHandshakeResponse => { + return take(output, { + Handshake: (_: any) => de_Handshake(_, context), + }) as any; }; /** - * deserializeAws_json1_1PolicyNotAttachedException + * deserializeAws_json1_1DelegatedAdministrator */ -const de_PolicyNotAttachedException = (output: any, context: __SerdeContext): PolicyNotAttachedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DelegatedAdministrator = (output: any, context: __SerdeContext): DelegatedAdministrator => { + return take(output, { + Arn: __expectString, + DelegationEnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Email: __expectString, + Id: __expectString, + JoinedMethod: __expectString, + JoinedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PolicyNotFoundException + * deserializeAws_json1_1DelegatedAdministrators */ -const de_PolicyNotFoundException = (output: any, context: __SerdeContext): PolicyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DelegatedAdministrators = (output: any, context: __SerdeContext): DelegatedAdministrator[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DelegatedAdministrator(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1PolicySummary + * deserializeAws_json1_1DelegatedService */ -const de_PolicySummary = (output: any, context: __SerdeContext): PolicySummary => { - return { - Arn: __expectString(output.Arn), - AwsManaged: __expectBoolean(output.AwsManaged), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; +const de_DelegatedService = (output: any, context: __SerdeContext): DelegatedService => { + return take(output, { + DelegationEnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServicePrincipal: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PolicyTargets + * deserializeAws_json1_1DelegatedServices */ -const de_PolicyTargets = (output: any, context: __SerdeContext): PolicyTargetSummary[] => { +const de_DelegatedServices = (output: any, context: __SerdeContext): DelegatedService[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyTargetSummary(entry, context); + return de_DelegatedService(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PolicyTargetSummary + * deserializeAws_json1_1DescribeAccountResponse */ -const de_PolicyTargetSummary = (output: any, context: __SerdeContext): PolicyTargetSummary => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - TargetId: __expectString(output.TargetId), - Type: __expectString(output.Type), - } as any; +const de_DescribeAccountResponse = (output: any, context: __SerdeContext): DescribeAccountResponse => { + return take(output, { + Account: (_: any) => de_Account(_, context), + }) as any; }; /** - * deserializeAws_json1_1PolicyTypeAlreadyEnabledException + * deserializeAws_json1_1DescribeCreateAccountStatusResponse */ -const de_PolicyTypeAlreadyEnabledException = ( +const de_DescribeCreateAccountStatusResponse = ( output: any, context: __SerdeContext -): PolicyTypeAlreadyEnabledException => { - return { - Message: __expectString(output.Message), - } as any; +): DescribeCreateAccountStatusResponse => { + return take(output, { + CreateAccountStatus: (_: any) => de_CreateAccountStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1PolicyTypeNotAvailableForOrganizationException + * deserializeAws_json1_1DescribeEffectivePolicyResponse */ -const de_PolicyTypeNotAvailableForOrganizationException = ( - output: any, - context: __SerdeContext -): PolicyTypeNotAvailableForOrganizationException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeEffectivePolicyResponse = (output: any, context: __SerdeContext): DescribeEffectivePolicyResponse => { + return take(output, { + EffectivePolicy: (_: any) => de_EffectivePolicy(_, context), + }) as any; }; /** - * deserializeAws_json1_1PolicyTypeNotEnabledException + * deserializeAws_json1_1DescribeHandshakeResponse */ -const de_PolicyTypeNotEnabledException = (output: any, context: __SerdeContext): PolicyTypeNotEnabledException => { - return { - Message: __expectString(output.Message), - } as any; +const de_DescribeHandshakeResponse = (output: any, context: __SerdeContext): DescribeHandshakeResponse => { + return take(output, { + Handshake: (_: any) => de_Handshake(_, context), + }) as any; }; -/** - * deserializeAws_json1_1PolicyTypes - */ -const de_PolicyTypes = (output: any, context: __SerdeContext): PolicyTypeSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PolicyTypeSummary(entry, context); - }); - return retVal; -}; +// de_DescribeOrganizationalUnitResponse omitted. + +// de_DescribeOrganizationResponse omitted. + +// de_DescribePolicyResponse omitted. + +// de_DescribeResourcePolicyResponse omitted. + +// de_DestinationParentNotFoundException omitted. + +// de_DisablePolicyTypeResponse omitted. + +// de_DuplicateAccountException omitted. + +// de_DuplicateHandshakeException omitted. + +// de_DuplicateOrganizationalUnitException omitted. + +// de_DuplicatePolicyAttachmentException omitted. + +// de_DuplicatePolicyException omitted. /** - * deserializeAws_json1_1PolicyTypeSummary + * deserializeAws_json1_1EffectivePolicy */ -const de_PolicyTypeSummary = (output: any, context: __SerdeContext): PolicyTypeSummary => { - return { - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; +const de_EffectivePolicy = (output: any, context: __SerdeContext): EffectivePolicy => { + return take(output, { + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyContent: __expectString, + PolicyType: __expectString, + TargetId: __expectString, + }) as any; }; +// de_EffectivePolicyNotFoundException omitted. + /** - * deserializeAws_json1_1PutResourcePolicyResponse + * deserializeAws_json1_1EnableAllFeaturesResponse */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - ResourcePolicy: output.ResourcePolicy != null ? de_ResourcePolicy(output.ResourcePolicy, context) : undefined, - } as any; +const de_EnableAllFeaturesResponse = (output: any, context: __SerdeContext): EnableAllFeaturesResponse => { + return take(output, { + Handshake: (_: any) => de_Handshake(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourcePolicy + * deserializeAws_json1_1EnabledServicePrincipal */ -const de_ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => { - return { - Content: __expectString(output.Content), - ResourcePolicySummary: - output.ResourcePolicySummary != null - ? de_ResourcePolicySummary(output.ResourcePolicySummary, context) - : undefined, - } as any; +const de_EnabledServicePrincipal = (output: any, context: __SerdeContext): EnabledServicePrincipal => { + return take(output, { + DateEnabled: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServicePrincipal: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourcePolicyNotFoundException + * deserializeAws_json1_1EnabledServicePrincipals */ -const de_ResourcePolicyNotFoundException = (output: any, context: __SerdeContext): ResourcePolicyNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_EnabledServicePrincipals = (output: any, context: __SerdeContext): EnabledServicePrincipal[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_EnabledServicePrincipal(entry, context); + }); + return retVal; }; +// de_EnablePolicyTypeResponse omitted. + +// de_FinalizingOrganizationException omitted. + /** - * deserializeAws_json1_1ResourcePolicySummary + * deserializeAws_json1_1Handshake */ -const de_ResourcePolicySummary = (output: any, context: __SerdeContext): ResourcePolicySummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - } as any; +const de_Handshake = (output: any, context: __SerdeContext): Handshake => { + return take(output, { + Action: __expectString, + Arn: __expectString, + ExpirationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Parties: _json, + RequestedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Resources: (_: any) => de_HandshakeResources(_, context), + State: __expectString, + }) as any; }; +// de_HandshakeAlreadyInStateException omitted. + +// de_HandshakeConstraintViolationException omitted. + +// de_HandshakeNotFoundException omitted. + +// de_HandshakeParties omitted. + +// de_HandshakeParty omitted. + /** - * deserializeAws_json1_1Root + * deserializeAws_json1_1HandshakeResource */ -const de_Root = (output: any, context: __SerdeContext): Root => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - PolicyTypes: output.PolicyTypes != null ? de_PolicyTypes(output.PolicyTypes, context) : undefined, - } as any; +const de_HandshakeResource = (output: any, context: __SerdeContext): HandshakeResource => { + return take(output, { + Resources: (_: any) => de_HandshakeResources(_, context), + Type: __expectString, + Value: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RootNotFoundException + * deserializeAws_json1_1HandshakeResources */ -const de_RootNotFoundException = (output: any, context: __SerdeContext): RootNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_HandshakeResources = (output: any, context: __SerdeContext): HandshakeResource[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_HandshakeResource(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1Roots + * deserializeAws_json1_1Handshakes */ -const de_Roots = (output: any, context: __SerdeContext): Root[] => { +const de_Handshakes = (output: any, context: __SerdeContext): Handshake[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Root(entry, context); + return de_Handshake(entry, context); }); return retVal; }; +// de_InvalidHandshakeTransitionException omitted. + +// de_InvalidInputException omitted. + /** - * deserializeAws_json1_1ServiceException + * deserializeAws_json1_1InviteAccountToOrganizationResponse */ -const de_ServiceException = (output: any, context: __SerdeContext): ServiceException => { - return { - Message: __expectString(output.Message), - } as any; +const de_InviteAccountToOrganizationResponse = ( + output: any, + context: __SerdeContext +): InviteAccountToOrganizationResponse => { + return take(output, { + Handshake: (_: any) => de_Handshake(_, context), + }) as any; }; /** - * deserializeAws_json1_1SourceParentNotFoundException + * deserializeAws_json1_1ListAccountsForParentResponse */ -const de_SourceParentNotFoundException = (output: any, context: __SerdeContext): SourceParentNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListAccountsForParentResponse = (output: any, context: __SerdeContext): ListAccountsForParentResponse => { + return take(output, { + Accounts: (_: any) => de_Accounts(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1ListAccountsResponse */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_ListAccountsResponse = (output: any, context: __SerdeContext): ListAccountsResponse => { + return take(output, { + Accounts: (_: any) => de_Accounts(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Tags + * deserializeAws_json1_1ListAWSServiceAccessForOrganizationResponse */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_ListAWSServiceAccessForOrganizationResponse = ( + output: any, + context: __SerdeContext +): ListAWSServiceAccessForOrganizationResponse => { + return take(output, { + EnabledServicePrincipals: (_: any) => de_EnabledServicePrincipals(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListChildrenResponse omitted. + /** - * deserializeAws_json1_1TargetNotFoundException + * deserializeAws_json1_1ListCreateAccountStatusResponse */ -const de_TargetNotFoundException = (output: any, context: __SerdeContext): TargetNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListCreateAccountStatusResponse = (output: any, context: __SerdeContext): ListCreateAccountStatusResponse => { + return take(output, { + CreateAccountStatuses: (_: any) => de_CreateAccountStatuses(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TooManyRequestsException + * deserializeAws_json1_1ListDelegatedAdministratorsResponse */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; +const de_ListDelegatedAdministratorsResponse = ( + output: any, + context: __SerdeContext +): ListDelegatedAdministratorsResponse => { + return take(output, { + DelegatedAdministrators: (_: any) => de_DelegatedAdministrators(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UnsupportedAPIEndpointException + * deserializeAws_json1_1ListDelegatedServicesForAccountResponse */ -const de_UnsupportedAPIEndpointException = (output: any, context: __SerdeContext): UnsupportedAPIEndpointException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListDelegatedServicesForAccountResponse = ( + output: any, + context: __SerdeContext +): ListDelegatedServicesForAccountResponse => { + return take(output, { + DelegatedServices: (_: any) => de_DelegatedServices(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UpdateOrganizationalUnitResponse + * deserializeAws_json1_1ListHandshakesForAccountResponse */ -const de_UpdateOrganizationalUnitResponse = ( +const de_ListHandshakesForAccountResponse = ( output: any, context: __SerdeContext -): UpdateOrganizationalUnitResponse => { - return { - OrganizationalUnit: - output.OrganizationalUnit != null ? de_OrganizationalUnit(output.OrganizationalUnit, context) : undefined, - } as any; +): ListHandshakesForAccountResponse => { + return take(output, { + Handshakes: (_: any) => de_Handshakes(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UpdatePolicyResponse + * deserializeAws_json1_1ListHandshakesForOrganizationResponse */ -const de_UpdatePolicyResponse = (output: any, context: __SerdeContext): UpdatePolicyResponse => { - return { - Policy: output.Policy != null ? de_Policy(output.Policy, context) : undefined, - } as any; +const de_ListHandshakesForOrganizationResponse = ( + output: any, + context: __SerdeContext +): ListHandshakesForOrganizationResponse => { + return take(output, { + Handshakes: (_: any) => de_Handshakes(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListOrganizationalUnitsForParentResponse omitted. + +// de_ListParentsResponse omitted. + +// de_ListPoliciesForTargetResponse omitted. + +// de_ListPoliciesResponse omitted. + +// de_ListRootsResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListTargetsForPolicyResponse omitted. + +// de_MalformedPolicyDocumentException omitted. + +// de_MasterCannotLeaveOrganizationException omitted. + +// de_Organization omitted. + +// de_OrganizationalUnit omitted. + +// de_OrganizationalUnitNotEmptyException omitted. + +// de_OrganizationalUnitNotFoundException omitted. + +// de_OrganizationalUnits omitted. + +// de_OrganizationNotEmptyException omitted. + +// de_Parent omitted. + +// de_ParentNotFoundException omitted. + +// de_Parents omitted. + +// de_Policies omitted. + +// de_Policy omitted. + +// de_PolicyChangesInProgressException omitted. + +// de_PolicyInUseException omitted. + +// de_PolicyNotAttachedException omitted. + +// de_PolicyNotFoundException omitted. + +// de_PolicySummary omitted. + +// de_PolicyTargets omitted. + +// de_PolicyTargetSummary omitted. + +// de_PolicyTypeAlreadyEnabledException omitted. + +// de_PolicyTypeNotAvailableForOrganizationException omitted. + +// de_PolicyTypeNotEnabledException omitted. + +// de_PolicyTypes omitted. + +// de_PolicyTypeSummary omitted. + +// de_PutResourcePolicyResponse omitted. + +// de_ResourcePolicy omitted. + +// de_ResourcePolicyNotFoundException omitted. + +// de_ResourcePolicySummary omitted. + +// de_Root omitted. + +// de_RootNotFoundException omitted. + +// de_Roots omitted. + +// de_ServiceException omitted. + +// de_SourceParentNotFoundException omitted. + +// de_Tag omitted. + +// de_Tags omitted. + +// de_TargetNotFoundException omitted. + +// de_TooManyRequestsException omitted. + +// de_UnsupportedAPIEndpointException omitted. + +// de_UpdateOrganizationalUnitResponse omitted. + +// de_UpdatePolicyResponse omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: @@ -7524,6 +6087,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-outposts/src/protocols/Aws_restJson1.ts b/clients/client-outposts/src/protocols/Aws_restJson1.ts index e32ec3e7af1d..7ae95b136b81 100644 --- a/clients/client-outposts/src/protocols/Aws_restJson1.ts +++ b/clients/client-outposts/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -9,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -61,25 +63,14 @@ import { AssetInfo, AssetLocation, CatalogItem, - ComputeAttributes, ConflictException, - ConnectionDetails, - EC2Capacity, - InstanceTypeItem, InternalServerException, - LineItem, - LineItemAssetInformation, LineItemRequest, - LineItemStatus, NotFoundException, Order, OrderSummary, - Outpost, RackPhysicalProperties, ServiceQuotaExceededException, - ShipmentInformation, - Site, - SupportedStorageEnum, ValidationException, } from "../models/models_0"; import { OutpostsServiceException as __BaseException } from "../models/OutpostsServiceException"; @@ -120,12 +111,14 @@ export const se_CreateOrderCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/orders"; let body: any; - body = JSON.stringify({ - ...(input.LineItems != null && { LineItems: se_LineItemRequestListDefinition(input.LineItems, context) }), - ...(input.OutpostIdentifier != null && { OutpostIdentifier: input.OutpostIdentifier }), - ...(input.PaymentOption != null && { PaymentOption: input.PaymentOption }), - ...(input.PaymentTerm != null && { PaymentTerm: input.PaymentTerm }), - }); + body = JSON.stringify( + take(input, { + LineItems: (_) => _json(_), + OutpostIdentifier: [], + PaymentOption: [], + PaymentTerm: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -150,15 +143,17 @@ export const se_CreateOutpostCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts"; let body: any; - body = JSON.stringify({ - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.AvailabilityZoneId != null && { AvailabilityZoneId: input.AvailabilityZoneId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SiteId != null && { SiteId: input.SiteId }), - ...(input.SupportedHardwareType != null && { SupportedHardwareType: input.SupportedHardwareType }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AvailabilityZone: [], + AvailabilityZoneId: [], + Description: [], + Name: [], + SiteId: [], + SupportedHardwareType: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -183,17 +178,17 @@ export const se_CreateSiteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.OperatingAddress != null && { OperatingAddress: se_Address(input.OperatingAddress, context) }), - ...(input.RackPhysicalProperties != null && { - RackPhysicalProperties: se_RackPhysicalProperties(input.RackPhysicalProperties, context), - }), - ...(input.ShippingAddress != null && { ShippingAddress: se_Address(input.ShippingAddress, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + Notes: [], + OperatingAddress: (_) => _json(_), + RackPhysicalProperties: (_) => _json(_), + ShippingAddress: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -663,14 +658,14 @@ export const se_StartConnectionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connections"; let body: any; - body = JSON.stringify({ - ...(input.AssetId != null && { AssetId: input.AssetId }), - ...(input.ClientPublicKey != null && { ClientPublicKey: input.ClientPublicKey }), - ...(input.DeviceSerialNumber != null && { DeviceSerialNumber: input.DeviceSerialNumber }), - ...(input.NetworkInterfaceDeviceIndex != null && { - NetworkInterfaceDeviceIndex: input.NetworkInterfaceDeviceIndex, - }), - }); + body = JSON.stringify( + take(input, { + AssetId: [], + ClientPublicKey: [], + DeviceSerialNumber: [], + NetworkInterfaceDeviceIndex: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -696,9 +691,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -754,11 +751,13 @@ export const se_UpdateOutpostCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/outposts/{OutpostId}"; resolvedPath = __resolvedPath(resolvedPath, input, "OutpostId", () => input.OutpostId!, "{OutpostId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SupportedHardwareType != null && { SupportedHardwareType: input.SupportedHardwareType }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + SupportedHardwareType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -784,11 +783,13 @@ export const se_UpdateSiteCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}"; resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId!, "{SiteId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Notes != null && { Notes: input.Notes }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + Notes: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -814,10 +815,12 @@ export const se_UpdateSiteAddressCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/address"; resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId!, "{SiteId}", false); let body: any; - body = JSON.stringify({ - ...(input.Address != null && { Address: se_Address(input.Address, context) }), - ...(input.AddressType != null && { AddressType: input.AddressType }), - }); + body = JSON.stringify( + take(input, { + Address: (_) => _json(_), + AddressType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -844,17 +847,19 @@ export const se_UpdateSiteRackPhysicalPropertiesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sites/{SiteId}/rackPhysicalProperties"; resolvedPath = __resolvedPath(resolvedPath, input, "SiteId", () => input.SiteId!, "{SiteId}", false); let body: any; - body = JSON.stringify({ - ...(input.FiberOpticCableType != null && { FiberOpticCableType: input.FiberOpticCableType }), - ...(input.MaximumSupportedWeightLbs != null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }), - ...(input.OpticalStandard != null && { OpticalStandard: input.OpticalStandard }), - ...(input.PowerConnector != null && { PowerConnector: input.PowerConnector }), - ...(input.PowerDrawKva != null && { PowerDrawKva: input.PowerDrawKva }), - ...(input.PowerFeedDrop != null && { PowerFeedDrop: input.PowerFeedDrop }), - ...(input.PowerPhase != null && { PowerPhase: input.PowerPhase }), - ...(input.UplinkCount != null && { UplinkCount: input.UplinkCount }), - ...(input.UplinkGbps != null && { UplinkGbps: input.UplinkGbps }), - }); + body = JSON.stringify( + take(input, { + FiberOpticCableType: [], + MaximumSupportedWeightLbs: [], + OpticalStandard: [], + PowerConnector: [], + PowerDrawKva: [], + PowerFeedDrop: [], + PowerPhase: [], + UplinkCount: [], + UplinkGbps: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -913,10 +918,9 @@ const de_CancelOrderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -936,9 +940,10 @@ export const de_CreateOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Order != null) { - contents.Order = de_Order(data.Order, context); - } + const doc = take(data, { + Order: (_) => de_Order(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -975,10 +980,9 @@ const de_CreateOrderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -998,9 +1002,10 @@ export const de_CreateOutpostCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Outpost != null) { - contents.Outpost = de_Outpost(data.Outpost, context); - } + const doc = take(data, { + Outpost: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1037,10 +1042,9 @@ const de_CreateOutpostCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1060,9 +1064,10 @@ export const de_CreateSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1096,10 +1101,9 @@ const de_CreateSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1152,10 +1156,9 @@ const de_DeleteOutpostCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1208,10 +1211,9 @@ const de_DeleteSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1231,9 +1233,10 @@ export const de_GetCatalogItemCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CatalogItem != null) { - contents.CatalogItem = de_CatalogItem(data.CatalogItem, context); - } + const doc = take(data, { + CatalogItem: (_) => de_CatalogItem(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1261,10 +1264,9 @@ const de_GetCatalogItemCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1284,12 +1286,11 @@ export const de_GetConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionDetails != null) { - contents.ConnectionDetails = de_ConnectionDetails(data.ConnectionDetails, context); - } - if (data.ConnectionId != null) { - contents.ConnectionId = __expectString(data.ConnectionId); - } + const doc = take(data, { + ConnectionDetails: _json, + ConnectionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1320,10 +1321,9 @@ const de_GetConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1343,9 +1343,10 @@ export const de_GetOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Order != null) { - contents.Order = de_Order(data.Order, context); - } + const doc = take(data, { + Order: (_) => de_Order(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1373,10 +1374,9 @@ const de_GetOrderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1396,9 +1396,10 @@ export const de_GetOutpostCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Outpost != null) { - contents.Outpost = de_Outpost(data.Outpost, context); - } + const doc = take(data, { + Outpost: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1429,10 +1430,9 @@ const de_GetOutpostCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1452,18 +1452,13 @@ export const de_GetOutpostInstanceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InstanceTypes != null) { - contents.InstanceTypes = de_InstanceTypeListDefinition(data.InstanceTypes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.OutpostArn != null) { - contents.OutpostArn = __expectString(data.OutpostArn); - } - if (data.OutpostId != null) { - contents.OutpostId = __expectString(data.OutpostId); - } + const doc = take(data, { + InstanceTypes: _json, + NextToken: __expectString, + OutpostArn: __expectString, + OutpostId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1494,10 +1489,9 @@ const de_GetOutpostInstanceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1517,9 +1511,10 @@ export const de_GetSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1550,10 +1545,9 @@ const de_GetSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,15 +1567,12 @@ export const de_GetSiteAddressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Address != null) { - contents.Address = de_Address(data.Address, context); - } - if (data.AddressType != null) { - contents.AddressType = __expectString(data.AddressType); - } - if (data.SiteId != null) { - contents.SiteId = __expectString(data.SiteId); - } + const doc = take(data, { + Address: _json, + AddressType: __expectString, + SiteId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1612,10 +1603,9 @@ const de_GetSiteAddressCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1635,12 +1625,11 @@ export const de_ListAssetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Assets != null) { - contents.Assets = de_AssetListDefinition(data.Assets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Assets: (_) => de_AssetListDefinition(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1671,10 +1660,9 @@ const de_ListAssetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1694,12 +1682,11 @@ export const de_ListCatalogItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CatalogItems != null) { - contents.CatalogItems = de_CatalogItemListDefinition(data.CatalogItems, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CatalogItems: (_) => de_CatalogItemListDefinition(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1727,10 +1714,9 @@ const de_ListCatalogItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1750,12 +1736,11 @@ export const de_ListOrdersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Orders != null) { - contents.Orders = de_OrderSummaryListDefinition(data.Orders, context); - } + const doc = take(data, { + NextToken: __expectString, + Orders: (_) => de_OrderSummaryListDefinition(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1786,10 +1771,9 @@ const de_ListOrdersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1809,12 +1793,11 @@ export const de_ListOutpostsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Outposts != null) { - contents.Outposts = de_outpostListDefinition(data.Outposts, context); - } + const doc = take(data, { + NextToken: __expectString, + Outposts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1842,10 +1825,9 @@ const de_ListOutpostsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1865,12 +1847,11 @@ export const de_ListSitesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Sites != null) { - contents.Sites = de_siteListDefinition(data.Sites, context); - } + const doc = take(data, { + NextToken: __expectString, + Sites: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1898,10 +1879,9 @@ const de_ListSitesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1921,9 +1901,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1951,10 +1932,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1974,12 +1954,11 @@ export const de_StartConnectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConnectionId != null) { - contents.ConnectionId = __expectString(data.ConnectionId); - } - if (data.UnderlayIpAddress != null) { - contents.UnderlayIpAddress = __expectString(data.UnderlayIpAddress); - } + const doc = take(data, { + ConnectionId: __expectString, + UnderlayIpAddress: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2010,10 +1989,9 @@ const de_StartConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2060,10 +2038,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2110,10 +2087,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2133,9 +2109,10 @@ export const de_UpdateOutpostCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Outpost != null) { - contents.Outpost = de_Outpost(data.Outpost, context); - } + const doc = take(data, { + Outpost: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2169,10 +2146,9 @@ const de_UpdateOutpostCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2192,9 +2168,10 @@ export const de_UpdateSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2228,10 +2205,9 @@ const de_UpdateSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2251,12 +2227,11 @@ export const de_UpdateSiteAddressCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Address != null) { - contents.Address = de_Address(data.Address, context); - } - if (data.AddressType != null) { - contents.AddressType = __expectString(data.AddressType); - } + const doc = take(data, { + Address: _json, + AddressType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2290,10 +2265,9 @@ const de_UpdateSiteAddressCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2313,9 +2287,10 @@ export const de_UpdateSiteRackPhysicalPropertiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Site != null) { - contents.Site = de_Site(data.Site, context); - } + const doc = take(data, { + Site: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2349,16 +2324,15 @@ const de_UpdateSiteRackPhysicalPropertiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2368,9 +2342,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2384,15 +2359,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2409,9 +2381,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2425,9 +2398,10 @@ const de_InternalServerExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2444,9 +2418,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2460,9 +2435,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2470,107 +2446,29 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Address - */ -const se_Address = (input: Address, context: __SerdeContext): any => { - return { - ...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }), - ...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }), - ...(input.AddressLine3 != null && { AddressLine3: input.AddressLine3 }), - ...(input.City != null && { City: input.City }), - ...(input.ContactName != null && { ContactName: input.ContactName }), - ...(input.ContactPhoneNumber != null && { ContactPhoneNumber: input.ContactPhoneNumber }), - ...(input.CountryCode != null && { CountryCode: input.CountryCode }), - ...(input.DistrictOrCounty != null && { DistrictOrCounty: input.DistrictOrCounty }), - ...(input.Municipality != null && { Municipality: input.Municipality }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.StateOrRegion != null && { StateOrRegion: input.StateOrRegion }), - }; -}; +// se_Address omitted. -/** - * serializeAws_restJson1LineItemRequest - */ -const se_LineItemRequest = (input: LineItemRequest, context: __SerdeContext): any => { - return { - ...(input.CatalogItemId != null && { CatalogItemId: input.CatalogItemId }), - ...(input.Quantity != null && { Quantity: input.Quantity }), - }; -}; +// se_LineItemRequest omitted. -/** - * serializeAws_restJson1LineItemRequestListDefinition - */ -const se_LineItemRequestListDefinition = (input: LineItemRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LineItemRequest(entry, context); - }); -}; +// se_LineItemRequestListDefinition omitted. -/** - * serializeAws_restJson1RackPhysicalProperties - */ -const se_RackPhysicalProperties = (input: RackPhysicalProperties, context: __SerdeContext): any => { - return { - ...(input.FiberOpticCableType != null && { FiberOpticCableType: input.FiberOpticCableType }), - ...(input.MaximumSupportedWeightLbs != null && { MaximumSupportedWeightLbs: input.MaximumSupportedWeightLbs }), - ...(input.OpticalStandard != null && { OpticalStandard: input.OpticalStandard }), - ...(input.PowerConnector != null && { PowerConnector: input.PowerConnector }), - ...(input.PowerDrawKva != null && { PowerDrawKva: input.PowerDrawKva }), - ...(input.PowerFeedDrop != null && { PowerFeedDrop: input.PowerFeedDrop }), - ...(input.PowerPhase != null && { PowerPhase: input.PowerPhase }), - ...(input.UplinkCount != null && { UplinkCount: input.UplinkCount }), - ...(input.UplinkGbps != null && { UplinkGbps: input.UplinkGbps }), - }; -}; +// se_RackPhysicalProperties omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - AddressLine1: __expectString(output.AddressLine1), - AddressLine2: __expectString(output.AddressLine2), - AddressLine3: __expectString(output.AddressLine3), - City: __expectString(output.City), - ContactName: __expectString(output.ContactName), - ContactPhoneNumber: __expectString(output.ContactPhoneNumber), - CountryCode: __expectString(output.CountryCode), - DistrictOrCounty: __expectString(output.DistrictOrCounty), - Municipality: __expectString(output.Municipality), - PostalCode: __expectString(output.PostalCode), - StateOrRegion: __expectString(output.StateOrRegion), - } as any; -}; +// de_Address omitted. /** * deserializeAws_restJson1AssetInfo */ const de_AssetInfo = (output: any, context: __SerdeContext): AssetInfo => { - return { - AssetId: __expectString(output.AssetId), - AssetLocation: output.AssetLocation != null ? de_AssetLocation(output.AssetLocation, context) : undefined, - AssetType: __expectString(output.AssetType), - ComputeAttributes: - output.ComputeAttributes != null ? de_ComputeAttributes(output.ComputeAttributes, context) : undefined, - RackId: __expectString(output.RackId), - } as any; + return take(output, { + AssetId: __expectString, + AssetLocation: (_: any) => de_AssetLocation(_, context), + AssetType: __expectString, + ComputeAttributes: _json, + RackId: __expectString, + }) as any; }; /** @@ -2580,9 +2478,6 @@ const de_AssetListDefinition = (output: any, context: __SerdeContext): AssetInfo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AssetInfo(entry, context); }); return retVal; @@ -2592,29 +2487,24 @@ const de_AssetListDefinition = (output: any, context: __SerdeContext): AssetInfo * deserializeAws_restJson1AssetLocation */ const de_AssetLocation = (output: any, context: __SerdeContext): AssetLocation => { - return { - RackElevation: __limitedParseFloat32(output.RackElevation), - } as any; + return take(output, { + RackElevation: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_restJson1CatalogItem */ const de_CatalogItem = (output: any, context: __SerdeContext): CatalogItem => { - return { - CatalogItemId: __expectString(output.CatalogItemId), - EC2Capacities: - output.EC2Capacities != null ? de_EC2CapacityListDefinition(output.EC2Capacities, context) : undefined, - ItemStatus: __expectString(output.ItemStatus), - PowerKva: __limitedParseFloat32(output.PowerKva), - SupportedStorage: - output.SupportedStorage != null ? de_SupportedStorageList(output.SupportedStorage, context) : undefined, - SupportedUplinkGbps: - output.SupportedUplinkGbps != null - ? de_SupportedUplinkGbpsListDefinition(output.SupportedUplinkGbps, context) - : undefined, - WeightLbs: __expectInt32(output.WeightLbs), - } as any; + return take(output, { + CatalogItemId: __expectString, + EC2Capacities: _json, + ItemStatus: __expectString, + PowerKva: __limitedParseFloat32, + SupportedStorage: _json, + SupportedUplinkGbps: _json, + WeightLbs: __expectInt32, + }) as any; }; /** @@ -2624,236 +2514,67 @@ const de_CatalogItemListDefinition = (output: any, context: __SerdeContext): Cat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CatalogItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CIDRList - */ -const de_CIDRList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CIDRList omitted. -/** - * deserializeAws_restJson1ComputeAttributes - */ -const de_ComputeAttributes = (output: any, context: __SerdeContext): ComputeAttributes => { - return { - HostId: __expectString(output.HostId), - State: __expectString(output.State), - } as any; -}; +// de_ComputeAttributes omitted. -/** - * deserializeAws_restJson1ConnectionDetails - */ -const de_ConnectionDetails = (output: any, context: __SerdeContext): ConnectionDetails => { - return { - AllowedIps: output.AllowedIps != null ? de_CIDRList(output.AllowedIps, context) : undefined, - ClientPublicKey: __expectString(output.ClientPublicKey), - ClientTunnelAddress: __expectString(output.ClientTunnelAddress), - ServerEndpoint: __expectString(output.ServerEndpoint), - ServerPublicKey: __expectString(output.ServerPublicKey), - ServerTunnelAddress: __expectString(output.ServerTunnelAddress), - } as any; -}; +// de_ConnectionDetails omitted. -/** - * deserializeAws_restJson1EC2Capacity - */ -const de_EC2Capacity = (output: any, context: __SerdeContext): EC2Capacity => { - return { - Family: __expectString(output.Family), - MaxSize: __expectString(output.MaxSize), - Quantity: __expectString(output.Quantity), - } as any; -}; +// de_EC2Capacity omitted. -/** - * deserializeAws_restJson1EC2CapacityListDefinition - */ -const de_EC2CapacityListDefinition = (output: any, context: __SerdeContext): EC2Capacity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EC2Capacity(entry, context); - }); - return retVal; -}; +// de_EC2CapacityListDefinition omitted. -/** - * deserializeAws_restJson1InstanceTypeItem - */ -const de_InstanceTypeItem = (output: any, context: __SerdeContext): InstanceTypeItem => { - return { - InstanceType: __expectString(output.InstanceType), - } as any; -}; +// de_InstanceTypeItem omitted. -/** - * deserializeAws_restJson1InstanceTypeListDefinition - */ -const de_InstanceTypeListDefinition = (output: any, context: __SerdeContext): InstanceTypeItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceTypeItem(entry, context); - }); - return retVal; -}; +// de_InstanceTypeListDefinition omitted. -/** - * deserializeAws_restJson1LineItem - */ -const de_LineItem = (output: any, context: __SerdeContext): LineItem => { - return { - AssetInformationList: - output.AssetInformationList != null - ? de_LineItemAssetInformationList(output.AssetInformationList, context) - : undefined, - CatalogItemId: __expectString(output.CatalogItemId), - LineItemId: __expectString(output.LineItemId), - PreviousLineItemId: __expectString(output.PreviousLineItemId), - PreviousOrderId: __expectString(output.PreviousOrderId), - Quantity: __expectInt32(output.Quantity), - ShipmentInformation: - output.ShipmentInformation != null ? de_ShipmentInformation(output.ShipmentInformation, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; +// de_LineItem omitted. -/** - * deserializeAws_restJson1LineItemAssetInformation - */ -const de_LineItemAssetInformation = (output: any, context: __SerdeContext): LineItemAssetInformation => { - return { - AssetId: __expectString(output.AssetId), - MacAddressList: output.MacAddressList != null ? de_MacAddressList(output.MacAddressList, context) : undefined, - } as any; -}; +// de_LineItemAssetInformation omitted. -/** - * deserializeAws_restJson1LineItemAssetInformationList - */ -const de_LineItemAssetInformationList = (output: any, context: __SerdeContext): LineItemAssetInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LineItemAssetInformation(entry, context); - }); - return retVal; -}; +// de_LineItemAssetInformationList omitted. -/** - * deserializeAws_restJson1LineItemListDefinition - */ -const de_LineItemListDefinition = (output: any, context: __SerdeContext): LineItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LineItem(entry, context); - }); - return retVal; -}; +// de_LineItemListDefinition omitted. -/** - * deserializeAws_restJson1LineItemStatusCounts - */ -const de_LineItemStatusCounts = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [LineItemStatus | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_LineItemStatusCounts omitted. -/** - * deserializeAws_restJson1MacAddressList - */ -const de_MacAddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MacAddressList omitted. /** * deserializeAws_restJson1Order */ const de_Order = (output: any, context: __SerdeContext): Order => { - return { - LineItems: output.LineItems != null ? de_LineItemListDefinition(output.LineItems, context) : undefined, - OrderFulfilledDate: - output.OrderFulfilledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderFulfilledDate))) - : undefined, - OrderId: __expectString(output.OrderId), - OrderSubmissionDate: - output.OrderSubmissionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderSubmissionDate))) - : undefined, - OrderType: __expectString(output.OrderType), - OutpostId: __expectString(output.OutpostId), - PaymentOption: __expectString(output.PaymentOption), - PaymentTerm: __expectString(output.PaymentTerm), - Status: __expectString(output.Status), - } as any; + return take(output, { + LineItems: _json, + OrderFulfilledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrderId: __expectString, + OrderSubmissionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrderType: __expectString, + OutpostId: __expectString, + PaymentOption: __expectString, + PaymentTerm: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_restJson1OrderSummary */ const de_OrderSummary = (output: any, context: __SerdeContext): OrderSummary => { - return { - LineItemCountsByStatus: - output.LineItemCountsByStatus != null - ? de_LineItemStatusCounts(output.LineItemCountsByStatus, context) - : undefined, - OrderFulfilledDate: - output.OrderFulfilledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderFulfilledDate))) - : undefined, - OrderId: __expectString(output.OrderId), - OrderSubmissionDate: - output.OrderSubmissionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OrderSubmissionDate))) - : undefined, - OrderType: __expectString(output.OrderType), - OutpostId: __expectString(output.OutpostId), - Status: __expectString(output.Status), - } as any; + return take(output, { + LineItemCountsByStatus: _json, + OrderFulfilledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrderId: __expectString, + OrderSubmissionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrderType: __expectString, + OutpostId: __expectString, + Status: __expectString, + }) as any; }; /** @@ -2863,155 +2584,28 @@ const de_OrderSummaryListDefinition = (output: any, context: __SerdeContext): Or const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OrderSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Outpost - */ -const de_Outpost = (output: any, context: __SerdeContext): Outpost => { - return { - AvailabilityZone: __expectString(output.AvailabilityZone), - AvailabilityZoneId: __expectString(output.AvailabilityZoneId), - Description: __expectString(output.Description), - LifeCycleStatus: __expectString(output.LifeCycleStatus), - Name: __expectString(output.Name), - OutpostArn: __expectString(output.OutpostArn), - OutpostId: __expectString(output.OutpostId), - OwnerId: __expectString(output.OwnerId), - SiteArn: __expectString(output.SiteArn), - SiteId: __expectString(output.SiteId), - SupportedHardwareType: __expectString(output.SupportedHardwareType), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_Outpost omitted. -/** - * deserializeAws_restJson1outpostListDefinition - */ -const de_outpostListDefinition = (output: any, context: __SerdeContext): Outpost[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Outpost(entry, context); - }); - return retVal; -}; +// de_outpostListDefinition omitted. -/** - * deserializeAws_restJson1RackPhysicalProperties - */ -const de_RackPhysicalProperties = (output: any, context: __SerdeContext): RackPhysicalProperties => { - return { - FiberOpticCableType: __expectString(output.FiberOpticCableType), - MaximumSupportedWeightLbs: __expectString(output.MaximumSupportedWeightLbs), - OpticalStandard: __expectString(output.OpticalStandard), - PowerConnector: __expectString(output.PowerConnector), - PowerDrawKva: __expectString(output.PowerDrawKva), - PowerFeedDrop: __expectString(output.PowerFeedDrop), - PowerPhase: __expectString(output.PowerPhase), - UplinkCount: __expectString(output.UplinkCount), - UplinkGbps: __expectString(output.UplinkGbps), - } as any; -}; +// de_RackPhysicalProperties omitted. -/** - * deserializeAws_restJson1ShipmentInformation - */ -const de_ShipmentInformation = (output: any, context: __SerdeContext): ShipmentInformation => { - return { - ShipmentCarrier: __expectString(output.ShipmentCarrier), - ShipmentTrackingNumber: __expectString(output.ShipmentTrackingNumber), - } as any; -}; +// de_ShipmentInformation omitted. -/** - * deserializeAws_restJson1Site - */ -const de_Site = (output: any, context: __SerdeContext): Site => { - return { - AccountId: __expectString(output.AccountId), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Notes: __expectString(output.Notes), - OperatingAddressCity: __expectString(output.OperatingAddressCity), - OperatingAddressCountryCode: __expectString(output.OperatingAddressCountryCode), - OperatingAddressStateOrRegion: __expectString(output.OperatingAddressStateOrRegion), - RackPhysicalProperties: - output.RackPhysicalProperties != null - ? de_RackPhysicalProperties(output.RackPhysicalProperties, context) - : undefined, - SiteArn: __expectString(output.SiteArn), - SiteId: __expectString(output.SiteId), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_Site omitted. -/** - * deserializeAws_restJson1siteListDefinition - */ -const de_siteListDefinition = (output: any, context: __SerdeContext): Site[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Site(entry, context); - }); - return retVal; -}; +// de_siteListDefinition omitted. -/** - * deserializeAws_restJson1SupportedStorageList - */ -const de_SupportedStorageList = (output: any, context: __SerdeContext): (SupportedStorageEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SupportedStorageList omitted. -/** - * deserializeAws_restJson1SupportedUplinkGbpsListDefinition - */ -const de_SupportedUplinkGbpsListDefinition = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_SupportedUplinkGbpsListDefinition omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-panorama/src/protocols/Aws_restJson1.ts b/clients/client-panorama/src/protocols/Aws_restJson1.ts index a449383d6343..8a552d2f2f1d 100644 --- a/clients/client-panorama/src/protocols/Aws_restJson1.ts +++ b/clients/client-panorama/src/protocols/Aws_restJson1.ts @@ -1,20 +1,21 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -118,40 +119,27 @@ import { } from "../commands/UpdateDeviceMetadataCommand"; import { AccessDeniedException, - AlternateSoftwareMetadata, ApplicationInstance, ConflictException, - ConflictExceptionErrorArgument, Device, DeviceJob, DeviceJobConfig, EthernetPayload, - EthernetStatus, InternalServerException, - Job, JobResourceTags, - LatestDeviceJob, ManifestOverridesPayload, ManifestPayload, NetworkPayload, NetworkStatus, Node, NodeFromTemplateJob, - NodeInputPort, - NodeInstance, - NodeInterface, - NodeOutputPort, NodeSignal, NtpPayload, - NtpStatus, OTAJobConfig, - OutPutS3Location, PackageImportJob, PackageImportJobInputConfig, - PackageImportJobOutput, PackageImportJobOutputConfig, PackageListItem, - PackageObject, PackageVersionInputConfig, PackageVersionOutputConfig, ReportedRuntimeContextState, @@ -159,10 +147,7 @@ import { S3Location, ServiceQuotaExceededException, StaticIpConnectionInfo, - StorageLocation, ValidationException, - ValidationExceptionErrorArgument, - ValidationExceptionField, } from "../models/models_0"; import { PanoramaServiceException as __BaseException } from "../models/PanoramaServiceException"; @@ -179,22 +164,18 @@ export const se_CreateApplicationInstanceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/application-instances"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationInstanceIdToReplace != null && { - ApplicationInstanceIdToReplace: input.ApplicationInstanceIdToReplace, - }), - ...(input.DefaultRuntimeContextDevice != null && { - DefaultRuntimeContextDevice: input.DefaultRuntimeContextDevice, - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ManifestOverridesPayload != null && { - ManifestOverridesPayload: se_ManifestOverridesPayload(input.ManifestOverridesPayload, context), - }), - ...(input.ManifestPayload != null && { ManifestPayload: se_ManifestPayload(input.ManifestPayload, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RuntimeRoleArn != null && { RuntimeRoleArn: input.RuntimeRoleArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ApplicationInstanceIdToReplace: [], + DefaultRuntimeContextDevice: [], + Description: [], + ManifestOverridesPayload: (_) => _json(_), + ManifestPayload: (_) => _json(_), + Name: [], + RuntimeRoleArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -219,11 +200,13 @@ export const se_CreateJobForDevicesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobs"; let body: any; - body = JSON.stringify({ - ...(input.DeviceIds != null && { DeviceIds: se_DeviceIdList(input.DeviceIds, context) }), - ...(input.DeviceJobConfig != null && { DeviceJobConfig: se_DeviceJobConfig(input.DeviceJobConfig, context) }), - ...(input.JobType != null && { JobType: input.JobType }), - }); + body = JSON.stringify( + take(input, { + DeviceIds: (_) => _json(_), + DeviceJobConfig: (_) => _json(_), + JobType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -248,17 +231,17 @@ export const se_CreateNodeFromTemplateJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packages/template-job"; let body: any; - body = JSON.stringify({ - ...(input.JobTags != null && { JobTags: se_JobTagsList(input.JobTags, context) }), - ...(input.NodeDescription != null && { NodeDescription: input.NodeDescription }), - ...(input.NodeName != null && { NodeName: input.NodeName }), - ...(input.OutputPackageName != null && { OutputPackageName: input.OutputPackageName }), - ...(input.OutputPackageVersion != null && { OutputPackageVersion: input.OutputPackageVersion }), - ...(input.TemplateParameters != null && { - TemplateParameters: se_TemplateParametersMap(input.TemplateParameters, context), - }), - ...(input.TemplateType != null && { TemplateType: input.TemplateType }), - }); + body = JSON.stringify( + take(input, { + JobTags: (_) => _json(_), + NodeDescription: [], + NodeName: [], + OutputPackageName: [], + OutputPackageVersion: [], + TemplateParameters: (_) => _json(_), + TemplateType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -283,10 +266,12 @@ export const se_CreatePackageCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packages"; let body: any; - body = JSON.stringify({ - ...(input.PackageName != null && { PackageName: input.PackageName }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + PackageName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -311,13 +296,15 @@ export const se_CreatePackageImportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/packages/import-jobs"; let body: any; - body = JSON.stringify({ - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.InputConfig != null && { InputConfig: se_PackageImportJobInputConfig(input.InputConfig, context) }), - ...(input.JobTags != null && { JobTags: se_JobTagsList(input.JobTags, context) }), - ...(input.JobType != null && { JobType: input.JobType }), - ...(input.OutputConfig != null && { OutputConfig: se_PackageImportJobOutputConfig(input.OutputConfig, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: [], + InputConfig: (_) => _json(_), + JobTags: (_) => _json(_), + JobType: [], + OutputConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -983,14 +970,14 @@ export const se_ProvisionDeviceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NetworkingConfiguration != null && { - NetworkingConfiguration: se_NetworkPayload(input.NetworkingConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + NetworkingConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1034,10 +1021,12 @@ export const se_RegisterPackageVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MarkLatest != null && { MarkLatest: input.MarkLatest }), - ...(input.OwnerAccount != null && { OwnerAccount: input.OwnerAccount }), - }); + body = JSON.stringify( + take(input, { + MarkLatest: [], + OwnerAccount: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1104,9 +1093,11 @@ export const se_SignalApplicationInstanceNodeInstancesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.NodeSignals != null && { NodeSignals: se_NodeSignalList(input.NodeSignals, context) }), - }); + body = JSON.stringify( + take(input, { + NodeSignals: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1132,9 +1123,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1190,9 +1183,11 @@ export const se_UpdateDeviceMetadataCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/devices/{DeviceId}"; resolvedPath = __resolvedPath(resolvedPath, input, "DeviceId", () => input.DeviceId!, "{DeviceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1218,9 +1213,10 @@ export const de_CreateApplicationInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationInstanceId != null) { - contents.ApplicationInstanceId = __expectString(data.ApplicationInstanceId); - } + const doc = take(data, { + ApplicationInstanceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1251,10 +1247,9 @@ const de_CreateApplicationInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1274,9 +1269,10 @@ export const de_CreateJobForDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Jobs != null) { - contents.Jobs = de_JobList(data.Jobs, context); - } + const doc = take(data, { + Jobs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1310,10 +1306,9 @@ const de_CreateJobForDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,9 +1328,10 @@ export const de_CreateNodeFromTemplateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } + const doc = take(data, { + JobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1366,10 +1362,9 @@ const de_CreateNodeFromTemplateJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1389,15 +1384,12 @@ export const de_CreatePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.PackageId != null) { - contents.PackageId = __expectString(data.PackageId); - } - if (data.StorageLocation != null) { - contents.StorageLocation = de_StorageLocation(data.StorageLocation, context); - } + const doc = take(data, { + Arn: __expectString, + PackageId: __expectString, + StorageLocation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1428,10 +1420,9 @@ const de_CreatePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1451,9 +1442,10 @@ export const de_CreatePackageImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } + const doc = take(data, { + JobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1484,10 +1476,9 @@ const de_CreatePackageImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,9 +1498,10 @@ export const de_DeleteDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } + const doc = take(data, { + DeviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1543,10 +1535,9 @@ const de_DeleteDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1599,10 +1590,9 @@ const de_DeletePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1655,10 +1645,9 @@ const de_DeregisterPackageVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1678,51 +1667,24 @@ export const de_DescribeApplicationInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationInstanceId != null) { - contents.ApplicationInstanceId = __expectString(data.ApplicationInstanceId); - } - if (data.ApplicationInstanceIdToReplace != null) { - contents.ApplicationInstanceIdToReplace = __expectString(data.ApplicationInstanceIdToReplace); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.DefaultRuntimeContextDevice != null) { - contents.DefaultRuntimeContextDevice = __expectString(data.DefaultRuntimeContextDevice); - } - if (data.DefaultRuntimeContextDeviceName != null) { - contents.DefaultRuntimeContextDeviceName = __expectString(data.DefaultRuntimeContextDeviceName); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.HealthStatus != null) { - contents.HealthStatus = __expectString(data.HealthStatus); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RuntimeContextStates != null) { - contents.RuntimeContextStates = de_ReportedRuntimeContextStates(data.RuntimeContextStates, context); - } - if (data.RuntimeRoleArn != null) { - contents.RuntimeRoleArn = __expectString(data.RuntimeRoleArn); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusDescription != null) { - contents.StatusDescription = __expectString(data.StatusDescription); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + ApplicationInstanceId: __expectString, + ApplicationInstanceIdToReplace: __expectString, + Arn: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultRuntimeContextDevice: __expectString, + DefaultRuntimeContextDeviceName: __expectString, + Description: __expectString, + HealthStatus: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RuntimeContextStates: (_) => de_ReportedRuntimeContextStates(_, context), + RuntimeRoleArn: __expectString, + Status: __expectString, + StatusDescription: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1756,10 +1718,9 @@ const de_DescribeApplicationInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1779,33 +1740,17 @@ export const de_DescribeApplicationInstanceDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationInstanceId != null) { - contents.ApplicationInstanceId = __expectString(data.ApplicationInstanceId); - } - if (data.ApplicationInstanceIdToReplace != null) { - contents.ApplicationInstanceIdToReplace = __expectString(data.ApplicationInstanceIdToReplace); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.DefaultRuntimeContextDevice != null) { - contents.DefaultRuntimeContextDevice = __expectString(data.DefaultRuntimeContextDevice); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.ManifestOverridesPayload != null) { - contents.ManifestOverridesPayload = de_ManifestOverridesPayload( - __expectUnion(data.ManifestOverridesPayload), - context - ); - } - if (data.ManifestPayload != null) { - contents.ManifestPayload = de_ManifestPayload(__expectUnion(data.ManifestPayload), context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + ApplicationInstanceId: __expectString, + ApplicationInstanceIdToReplace: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultRuntimeContextDevice: __expectString, + Description: __expectString, + ManifestOverridesPayload: (_) => _json(__expectUnion(_)), + ManifestPayload: (_) => _json(__expectUnion(_)), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1839,10 +1784,9 @@ const de_DescribeApplicationInstanceDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,66 +1806,29 @@ export const de_DescribeDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AlternateSoftwares != null) { - contents.AlternateSoftwares = de_AlternateSoftwares(data.AlternateSoftwares, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Brand != null) { - contents.Brand = __expectString(data.Brand); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.CurrentNetworkingStatus != null) { - contents.CurrentNetworkingStatus = de_NetworkStatus(data.CurrentNetworkingStatus, context); - } - if (data.CurrentSoftware != null) { - contents.CurrentSoftware = __expectString(data.CurrentSoftware); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DeviceAggregatedStatus != null) { - contents.DeviceAggregatedStatus = __expectString(data.DeviceAggregatedStatus); - } - if (data.DeviceConnectionStatus != null) { - contents.DeviceConnectionStatus = __expectString(data.DeviceConnectionStatus); - } - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } - if (data.LatestAlternateSoftware != null) { - contents.LatestAlternateSoftware = __expectString(data.LatestAlternateSoftware); - } - if (data.LatestDeviceJob != null) { - contents.LatestDeviceJob = de_LatestDeviceJob(data.LatestDeviceJob, context); - } - if (data.LatestSoftware != null) { - contents.LatestSoftware = __expectString(data.LatestSoftware); - } - if (data.LeaseExpirationTime != null) { - contents.LeaseExpirationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LeaseExpirationTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.NetworkingConfiguration != null) { - contents.NetworkingConfiguration = de_NetworkPayload(data.NetworkingConfiguration, context); - } - if (data.ProvisioningStatus != null) { - contents.ProvisioningStatus = __expectString(data.ProvisioningStatus); - } - if (data.SerialNumber != null) { - contents.SerialNumber = __expectString(data.SerialNumber); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + AlternateSoftwares: _json, + Arn: __expectString, + Brand: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentNetworkingStatus: (_) => de_NetworkStatus(_, context), + CurrentSoftware: __expectString, + Description: __expectString, + DeviceAggregatedStatus: __expectString, + DeviceConnectionStatus: __expectString, + DeviceId: __expectString, + LatestAlternateSoftware: __expectString, + LatestDeviceJob: _json, + LatestSoftware: __expectString, + LeaseExpirationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NetworkingConfiguration: _json, + ProvisioningStatus: __expectString, + SerialNumber: __expectString, + Tags: _json, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1952,10 +1859,9 @@ const de_DescribeDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1975,33 +1881,18 @@ export const de_DescribeDeviceJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.DeviceArn != null) { - contents.DeviceArn = __expectString(data.DeviceArn); - } - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } - if (data.DeviceName != null) { - contents.DeviceName = __expectString(data.DeviceName); - } - if (data.DeviceType != null) { - contents.DeviceType = __expectString(data.DeviceType); - } - if (data.ImageVersion != null) { - contents.ImageVersion = __expectString(data.ImageVersion); - } - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } - if (data.JobType != null) { - contents.JobType = __expectString(data.JobType); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceArn: __expectString, + DeviceId: __expectString, + DeviceName: __expectString, + DeviceType: __expectString, + ImageVersion: __expectString, + JobId: __expectString, + JobType: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2035,10 +1926,9 @@ const de_DescribeDeviceJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2058,48 +1948,23 @@ export const de_DescribeNodeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssetName != null) { - contents.AssetName = __expectString(data.AssetName); - } - if (data.Category != null) { - contents.Category = __expectString(data.Category); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.NodeId != null) { - contents.NodeId = __expectString(data.NodeId); - } - if (data.NodeInterface != null) { - contents.NodeInterface = de_NodeInterface(data.NodeInterface, context); - } - if (data.OwnerAccount != null) { - contents.OwnerAccount = __expectString(data.OwnerAccount); - } - if (data.PackageArn != null) { - contents.PackageArn = __expectString(data.PackageArn); - } - if (data.PackageId != null) { - contents.PackageId = __expectString(data.PackageId); - } - if (data.PackageName != null) { - contents.PackageName = __expectString(data.PackageName); - } - if (data.PackageVersion != null) { - contents.PackageVersion = __expectString(data.PackageVersion); - } - if (data.PatchVersion != null) { - contents.PatchVersion = __expectString(data.PatchVersion); - } + const doc = take(data, { + AssetName: __expectString, + Category: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NodeId: __expectString, + NodeInterface: _json, + OwnerAccount: __expectString, + PackageArn: __expectString, + PackageId: __expectString, + PackageName: __expectString, + PackageVersion: __expectString, + PatchVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2133,10 +1998,9 @@ const de_DescribeNodeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2156,42 +2020,21 @@ export const de_DescribeNodeFromTemplateJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } - if (data.JobTags != null) { - contents.JobTags = de_JobTagsList(data.JobTags, context); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.NodeDescription != null) { - contents.NodeDescription = __expectString(data.NodeDescription); - } - if (data.NodeName != null) { - contents.NodeName = __expectString(data.NodeName); - } - if (data.OutputPackageName != null) { - contents.OutputPackageName = __expectString(data.OutputPackageName); - } - if (data.OutputPackageVersion != null) { - contents.OutputPackageVersion = __expectString(data.OutputPackageVersion); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusMessage != null) { - contents.StatusMessage = __expectString(data.StatusMessage); - } - if (data.TemplateParameters != null) { - contents.TemplateParameters = de_TemplateParametersMap(data.TemplateParameters, context); - } - if (data.TemplateType != null) { - contents.TemplateType = __expectString(data.TemplateType); - } + const doc = take(data, { + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobId: __expectString, + JobTags: _json, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NodeDescription: __expectString, + NodeName: __expectString, + OutputPackageName: __expectString, + OutputPackageVersion: __expectString, + Status: __expectString, + StatusMessage: __expectString, + TemplateParameters: _json, + TemplateType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2222,10 +2065,9 @@ const de_DescribeNodeFromTemplateJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2245,30 +2087,17 @@ export const de_DescribePackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.PackageId != null) { - contents.PackageId = __expectString(data.PackageId); - } - if (data.PackageName != null) { - contents.PackageName = __expectString(data.PackageName); - } - if (data.ReadAccessPrincipalArns != null) { - contents.ReadAccessPrincipalArns = de_PrincipalArnsList(data.ReadAccessPrincipalArns, context); - } - if (data.StorageLocation != null) { - contents.StorageLocation = de_StorageLocation(data.StorageLocation, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.WriteAccessPrincipalArns != null) { - contents.WriteAccessPrincipalArns = de_PrincipalArnsList(data.WriteAccessPrincipalArns, context); - } + const doc = take(data, { + Arn: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageId: __expectString, + PackageName: __expectString, + ReadAccessPrincipalArns: _json, + StorageLocation: _json, + Tags: _json, + WriteAccessPrincipalArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2302,10 +2131,9 @@ const de_DescribePackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2325,39 +2153,20 @@ export const de_DescribePackageImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ClientToken != null) { - contents.ClientToken = __expectString(data.ClientToken); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.InputConfig != null) { - contents.InputConfig = de_PackageImportJobInputConfig(data.InputConfig, context); - } - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } - if (data.JobTags != null) { - contents.JobTags = de_JobTagsList(data.JobTags, context); - } - if (data.JobType != null) { - contents.JobType = __expectString(data.JobType); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.Output != null) { - contents.Output = de_PackageImportJobOutput(data.Output, context); - } - if (data.OutputConfig != null) { - contents.OutputConfig = de_PackageImportJobOutputConfig(data.OutputConfig, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusMessage != null) { - contents.StatusMessage = __expectString(data.StatusMessage); - } + const doc = take(data, { + ClientToken: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputConfig: _json, + JobId: __expectString, + JobTags: _json, + JobType: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Output: _json, + OutputConfig: _json, + Status: __expectString, + StatusMessage: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2388,10 +2197,9 @@ const de_DescribePackageImportJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2411,36 +2219,19 @@ export const de_DescribePackageVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IsLatestPatch != null) { - contents.IsLatestPatch = __expectBoolean(data.IsLatestPatch); - } - if (data.OwnerAccount != null) { - contents.OwnerAccount = __expectString(data.OwnerAccount); - } - if (data.PackageArn != null) { - contents.PackageArn = __expectString(data.PackageArn); - } - if (data.PackageId != null) { - contents.PackageId = __expectString(data.PackageId); - } - if (data.PackageName != null) { - contents.PackageName = __expectString(data.PackageName); - } - if (data.PackageVersion != null) { - contents.PackageVersion = __expectString(data.PackageVersion); - } - if (data.PatchVersion != null) { - contents.PatchVersion = __expectString(data.PatchVersion); - } - if (data.RegisteredTime != null) { - contents.RegisteredTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.RegisteredTime))); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.StatusDescription != null) { - contents.StatusDescription = __expectString(data.StatusDescription); - } + const doc = take(data, { + IsLatestPatch: __expectBoolean, + OwnerAccount: __expectString, + PackageArn: __expectString, + PackageId: __expectString, + PackageName: __expectString, + PackageVersion: __expectString, + PatchVersion: __expectString, + RegisteredTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDescription: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2474,10 +2265,9 @@ const de_DescribePackageVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,12 +2287,11 @@ export const de_ListApplicationInstanceDependenciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PackageObjects != null) { - contents.PackageObjects = de_PackageObjects(data.PackageObjects, context); - } + const doc = take(data, { + NextToken: __expectString, + PackageObjects: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2527,10 +2316,9 @@ const de_ListApplicationInstanceDependenciesCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2550,12 +2338,11 @@ export const de_ListApplicationInstanceNodeInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.NodeInstances != null) { - contents.NodeInstances = de_NodeInstances(data.NodeInstances, context); - } + const doc = take(data, { + NextToken: __expectString, + NodeInstances: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2580,10 +2367,9 @@ const de_ListApplicationInstanceNodeInstancesCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2603,12 +2389,11 @@ export const de_ListApplicationInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationInstances != null) { - contents.ApplicationInstances = de_ApplicationInstances(data.ApplicationInstances, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ApplicationInstances: (_) => de_ApplicationInstances(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2633,10 +2418,9 @@ const de_ListApplicationInstancesCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2656,12 +2440,11 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Devices != null) { - contents.Devices = de_DeviceList(data.Devices, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Devices: (_) => de_DeviceList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2692,10 +2475,9 @@ const de_ListDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2715,12 +2497,11 @@ export const de_ListDevicesJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceJobs != null) { - contents.DeviceJobs = de_DeviceJobList(data.DeviceJobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DeviceJobs: (_) => de_DeviceJobList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2754,10 +2535,9 @@ const de_ListDevicesJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2777,12 +2557,11 @@ export const de_ListNodeFromTemplateJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.NodeFromTemplateJobs != null) { - contents.NodeFromTemplateJobs = de_NodeFromTemplateJobList(data.NodeFromTemplateJobs, context); - } + const doc = take(data, { + NextToken: __expectString, + NodeFromTemplateJobs: (_) => de_NodeFromTemplateJobList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2813,10 +2592,9 @@ const de_ListNodeFromTemplateJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2836,12 +2614,11 @@ export const de_ListNodesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Nodes != null) { - contents.Nodes = de_NodesList(data.Nodes, context); - } + const doc = take(data, { + NextToken: __expectString, + Nodes: (_) => de_NodesList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2869,10 +2646,9 @@ const de_ListNodesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2892,12 +2668,11 @@ export const de_ListPackageImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.PackageImportJobs != null) { - contents.PackageImportJobs = de_PackageImportJobList(data.PackageImportJobs, context); - } + const doc = take(data, { + NextToken: __expectString, + PackageImportJobs: (_) => de_PackageImportJobList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2928,10 +2703,9 @@ const de_ListPackageImportJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2951,12 +2725,11 @@ export const de_ListPackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Packages != null) { - contents.Packages = de_PackageList(data.Packages, context); - } + const doc = take(data, { + NextToken: __expectString, + Packages: (_) => de_PackageList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2990,10 +2763,9 @@ const de_ListPackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3013,9 +2785,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3043,10 +2816,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3066,21 +2838,14 @@ export const de_ProvisionDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Certificates != null) { - contents.Certificates = context.base64Decoder(data.Certificates); - } - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } - if (data.IotThingName != null) { - contents.IotThingName = __expectString(data.IotThingName); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Arn: __expectString, + Certificates: context.base64Decoder, + DeviceId: __expectString, + IotThingName: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3114,10 +2879,9 @@ const de_ProvisionDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3167,10 +2931,9 @@ const de_RegisterPackageVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3223,10 +2986,9 @@ const de_RemoveApplicationInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3246,9 +3008,10 @@ export const de_SignalApplicationInstanceNodeInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApplicationInstanceId != null) { - contents.ApplicationInstanceId = __expectString(data.ApplicationInstanceId); - } + const doc = take(data, { + ApplicationInstanceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3279,10 +3042,9 @@ const de_SignalApplicationInstanceNodeInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3329,10 +3091,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3379,10 +3140,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3402,9 +3162,10 @@ export const de_UpdateDeviceMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceId != null) { - contents.DeviceId = __expectString(data.DeviceId); - } + const doc = take(data, { + DeviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3438,16 +3199,15 @@ const de_UpdateDeviceMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3457,9 +3217,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3473,21 +3234,14 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorArguments != null) { - contents.ErrorArguments = de_ConflictExceptionErrorArgumentList(data.ErrorArguments, context); - } - if (data.ErrorId != null) { - contents.ErrorId = __expectString(data.ErrorId); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + ErrorArguments: _json, + ErrorId: __expectString, + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3509,9 +3263,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3528,15 +3283,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3553,21 +3305,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3581,21 +3326,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.ErrorArguments != null) { - contents.ErrorArguments = de_ValidationExceptionErrorArgumentList(data.ErrorArguments, context); - } - if (data.ErrorId != null) { - contents.ErrorId = __expectString(data.ErrorId); - } - if (data.Fields != null) { - contents.Fields = de_ValidationExceptionFieldList(data.Fields, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + ErrorArguments: _json, + ErrorId: __expectString, + Fields: _json, + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3603,291 +3341,72 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DeviceIdList - */ -const se_DeviceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceIdList omitted. -/** - * serializeAws_restJson1DeviceJobConfig - */ -const se_DeviceJobConfig = (input: DeviceJobConfig, context: __SerdeContext): any => { - return { - ...(input.OTAJobConfig != null && { OTAJobConfig: se_OTAJobConfig(input.OTAJobConfig, context) }), - }; -}; +// se_DeviceJobConfig omitted. -/** - * serializeAws_restJson1DnsList - */ -const se_DnsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DnsList omitted. -/** - * serializeAws_restJson1EthernetPayload - */ -const se_EthernetPayload = (input: EthernetPayload, context: __SerdeContext): any => { - return { - ...(input.ConnectionType != null && { ConnectionType: input.ConnectionType }), - ...(input.StaticIpConnectionInfo != null && { - StaticIpConnectionInfo: se_StaticIpConnectionInfo(input.StaticIpConnectionInfo, context), - }), - }; -}; +// se_EthernetPayload omitted. -/** - * serializeAws_restJson1JobResourceTags - */ -const se_JobResourceTags = (input: JobResourceTags, context: __SerdeContext): any => { - return { - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; -}; +// se_JobResourceTags omitted. -/** - * serializeAws_restJson1JobTagsList - */ -const se_JobTagsList = (input: JobResourceTags[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_JobResourceTags(entry, context); - }); -}; +// se_JobTagsList omitted. -/** - * serializeAws_restJson1ManifestOverridesPayload - */ -const se_ManifestOverridesPayload = (input: ManifestOverridesPayload, context: __SerdeContext): any => { - return ManifestOverridesPayload.visit(input, { - PayloadData: (value) => ({ PayloadData: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ManifestOverridesPayload omitted. -/** - * serializeAws_restJson1ManifestPayload - */ -const se_ManifestPayload = (input: ManifestPayload, context: __SerdeContext): any => { - return ManifestPayload.visit(input, { - PayloadData: (value) => ({ PayloadData: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ManifestPayload omitted. -/** - * serializeAws_restJson1NetworkPayload - */ -const se_NetworkPayload = (input: NetworkPayload, context: __SerdeContext): any => { - return { - ...(input.Ethernet0 != null && { Ethernet0: se_EthernetPayload(input.Ethernet0, context) }), - ...(input.Ethernet1 != null && { Ethernet1: se_EthernetPayload(input.Ethernet1, context) }), - ...(input.Ntp != null && { Ntp: se_NtpPayload(input.Ntp, context) }), - }; -}; +// se_NetworkPayload omitted. -/** - * serializeAws_restJson1NodeSignal - */ -const se_NodeSignal = (input: NodeSignal, context: __SerdeContext): any => { - return { - ...(input.NodeInstanceId != null && { NodeInstanceId: input.NodeInstanceId }), - ...(input.Signal != null && { Signal: input.Signal }), - }; -}; +// se_NodeSignal omitted. -/** - * serializeAws_restJson1NodeSignalList - */ -const se_NodeSignalList = (input: NodeSignal[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NodeSignal(entry, context); - }); -}; +// se_NodeSignalList omitted. -/** - * serializeAws_restJson1NtpPayload - */ -const se_NtpPayload = (input: NtpPayload, context: __SerdeContext): any => { - return { - ...(input.NtpServers != null && { NtpServers: se_NtpServerList(input.NtpServers, context) }), - }; -}; +// se_NtpPayload omitted. -/** - * serializeAws_restJson1NtpServerList - */ -const se_NtpServerList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NtpServerList omitted. -/** - * serializeAws_restJson1OTAJobConfig - */ -const se_OTAJobConfig = (input: OTAJobConfig, context: __SerdeContext): any => { - return { - ...(input.AllowMajorVersionUpdate != null && { AllowMajorVersionUpdate: input.AllowMajorVersionUpdate }), - ...(input.ImageVersion != null && { ImageVersion: input.ImageVersion }), - }; -}; +// se_OTAJobConfig omitted. -/** - * serializeAws_restJson1PackageImportJobInputConfig - */ -const se_PackageImportJobInputConfig = (input: PackageImportJobInputConfig, context: __SerdeContext): any => { - return { - ...(input.PackageVersionInputConfig != null && { - PackageVersionInputConfig: se_PackageVersionInputConfig(input.PackageVersionInputConfig, context), - }), - }; -}; +// se_PackageImportJobInputConfig omitted. -/** - * serializeAws_restJson1PackageImportJobOutputConfig - */ -const se_PackageImportJobOutputConfig = (input: PackageImportJobOutputConfig, context: __SerdeContext): any => { - return { - ...(input.PackageVersionOutputConfig != null && { - PackageVersionOutputConfig: se_PackageVersionOutputConfig(input.PackageVersionOutputConfig, context), - }), - }; -}; +// se_PackageImportJobOutputConfig omitted. -/** - * serializeAws_restJson1PackageVersionInputConfig - */ -const se_PackageVersionInputConfig = (input: PackageVersionInputConfig, context: __SerdeContext): any => { - return { - ...(input.S3Location != null && { S3Location: se_S3Location(input.S3Location, context) }), - }; -}; +// se_PackageVersionInputConfig omitted. -/** - * serializeAws_restJson1PackageVersionOutputConfig - */ -const se_PackageVersionOutputConfig = (input: PackageVersionOutputConfig, context: __SerdeContext): any => { - return { - ...(input.MarkLatest != null && { MarkLatest: input.MarkLatest }), - ...(input.PackageName != null && { PackageName: input.PackageName }), - ...(input.PackageVersion != null && { PackageVersion: input.PackageVersion }), - }; -}; +// se_PackageVersionOutputConfig omitted. -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.ObjectKey != null && { ObjectKey: input.ObjectKey }), - ...(input.Region != null && { Region: input.Region }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1StaticIpConnectionInfo - */ -const se_StaticIpConnectionInfo = (input: StaticIpConnectionInfo, context: __SerdeContext): any => { - return { - ...(input.DefaultGateway != null && { DefaultGateway: input.DefaultGateway }), - ...(input.Dns != null && { Dns: se_DnsList(input.Dns, context) }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.Mask != null && { Mask: input.Mask }), - }; -}; +// se_StaticIpConnectionInfo omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TemplateParametersMap - */ -const se_TemplateParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TemplateParametersMap omitted. -/** - * deserializeAws_restJson1AlternateSoftwareMetadata - */ -const de_AlternateSoftwareMetadata = (output: any, context: __SerdeContext): AlternateSoftwareMetadata => { - return { - Version: __expectString(output.Version), - } as any; -}; +// de_AlternateSoftwareMetadata omitted. -/** - * deserializeAws_restJson1AlternateSoftwares - */ -const de_AlternateSoftwares = (output: any, context: __SerdeContext): AlternateSoftwareMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlternateSoftwareMetadata(entry, context); - }); - return retVal; -}; +// de_AlternateSoftwares omitted. /** * deserializeAws_restJson1ApplicationInstance */ const de_ApplicationInstance = (output: any, context: __SerdeContext): ApplicationInstance => { - return { - ApplicationInstanceId: __expectString(output.ApplicationInstanceId), - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DefaultRuntimeContextDevice: __expectString(output.DefaultRuntimeContextDevice), - DefaultRuntimeContextDeviceName: __expectString(output.DefaultRuntimeContextDeviceName), - Description: __expectString(output.Description), - HealthStatus: __expectString(output.HealthStatus), - Name: __expectString(output.Name), - RuntimeContextStates: - output.RuntimeContextStates != null - ? de_ReportedRuntimeContextStates(output.RuntimeContextStates, context) - : undefined, - Status: __expectString(output.Status), - StatusDescription: __expectString(output.StatusDescription), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + ApplicationInstanceId: __expectString, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultRuntimeContextDevice: __expectString, + DefaultRuntimeContextDeviceName: __expectString, + Description: __expectString, + HealthStatus: __expectString, + Name: __expectString, + RuntimeContextStates: (_: any) => de_ReportedRuntimeContextStates(_, context), + Status: __expectString, + StatusDescription: __expectString, + Tags: _json, + }) as any; }; /** @@ -3897,86 +3416,47 @@ const de_ApplicationInstances = (output: any, context: __SerdeContext): Applicat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationInstance(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ConflictExceptionErrorArgument - */ -const de_ConflictExceptionErrorArgument = (output: any, context: __SerdeContext): ConflictExceptionErrorArgument => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_ConflictExceptionErrorArgument omitted. -/** - * deserializeAws_restJson1ConflictExceptionErrorArgumentList - */ -const de_ConflictExceptionErrorArgumentList = ( - output: any, - context: __SerdeContext -): ConflictExceptionErrorArgument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConflictExceptionErrorArgument(entry, context); - }); - return retVal; -}; +// de_ConflictExceptionErrorArgumentList omitted. /** * deserializeAws_restJson1Device */ const de_Device = (output: any, context: __SerdeContext): Device => { - return { - Brand: __expectString(output.Brand), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - CurrentSoftware: __expectString(output.CurrentSoftware), - Description: __expectString(output.Description), - DeviceAggregatedStatus: __expectString(output.DeviceAggregatedStatus), - DeviceId: __expectString(output.DeviceId), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - LatestDeviceJob: output.LatestDeviceJob != null ? de_LatestDeviceJob(output.LatestDeviceJob, context) : undefined, - LeaseExpirationTime: - output.LeaseExpirationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LeaseExpirationTime))) - : undefined, - Name: __expectString(output.Name), - ProvisioningStatus: __expectString(output.ProvisioningStatus), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Brand: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentSoftware: __expectString, + Description: __expectString, + DeviceAggregatedStatus: __expectString, + DeviceId: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestDeviceJob: _json, + LeaseExpirationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ProvisioningStatus: __expectString, + Tags: _json, + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1DeviceJob */ const de_DeviceJob = (output: any, context: __SerdeContext): DeviceJob => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DeviceId: __expectString(output.DeviceId), - DeviceName: __expectString(output.DeviceName), - JobId: __expectString(output.JobId), - JobType: __expectString(output.JobType), - } as any; + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceId: __expectString, + DeviceName: __expectString, + JobId: __expectString, + JobType: __expectString, + }) as any; }; /** @@ -3986,9 +3466,6 @@ const de_DeviceJobList = (output: any, context: __SerdeContext): DeviceJob[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeviceJob(entry, context); }); return retVal; @@ -4001,212 +3478,78 @@ const de_DeviceList = (output: any, context: __SerdeContext): Device[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Device(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DnsList - */ -const de_DnsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DnsList omitted. -/** - * deserializeAws_restJson1EthernetPayload - */ -const de_EthernetPayload = (output: any, context: __SerdeContext): EthernetPayload => { - return { - ConnectionType: __expectString(output.ConnectionType), - StaticIpConnectionInfo: - output.StaticIpConnectionInfo != null - ? de_StaticIpConnectionInfo(output.StaticIpConnectionInfo, context) - : undefined, - } as any; -}; +// de_EthernetPayload omitted. -/** - * deserializeAws_restJson1EthernetStatus - */ -const de_EthernetStatus = (output: any, context: __SerdeContext): EthernetStatus => { - return { - ConnectionStatus: __expectString(output.ConnectionStatus), - HwAddress: __expectString(output.HwAddress), - IpAddress: __expectString(output.IpAddress), - } as any; -}; +// de_EthernetStatus omitted. -/** - * deserializeAws_restJson1InputPortList - */ -const de_InputPortList = (output: any, context: __SerdeContext): NodeInputPort[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NodeInputPort(entry, context); - }); - return retVal; -}; +// de_InputPortList omitted. -/** - * deserializeAws_restJson1Job - */ -const de_Job = (output: any, context: __SerdeContext): Job => { - return { - DeviceId: __expectString(output.DeviceId), - JobId: __expectString(output.JobId), - } as any; -}; +// de_Job omitted. -/** - * deserializeAws_restJson1JobList - */ -const de_JobList = (output: any, context: __SerdeContext): Job[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Job(entry, context); - }); - return retVal; -}; +// de_JobList omitted. -/** - * deserializeAws_restJson1JobResourceTags - */ -const de_JobResourceTags = (output: any, context: __SerdeContext): JobResourceTags => { - return { - ResourceType: __expectString(output.ResourceType), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_JobResourceTags omitted. -/** - * deserializeAws_restJson1JobTagsList - */ -const de_JobTagsList = (output: any, context: __SerdeContext): JobResourceTags[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JobResourceTags(entry, context); - }); - return retVal; -}; +// de_JobTagsList omitted. -/** - * deserializeAws_restJson1LatestDeviceJob - */ -const de_LatestDeviceJob = (output: any, context: __SerdeContext): LatestDeviceJob => { - return { - ImageVersion: __expectString(output.ImageVersion), - JobType: __expectString(output.JobType), - Status: __expectString(output.Status), - } as any; -}; +// de_LatestDeviceJob omitted. -/** - * deserializeAws_restJson1ManifestOverridesPayload - */ -const de_ManifestOverridesPayload = (output: any, context: __SerdeContext): ManifestOverridesPayload => { - if (__expectString(output.PayloadData) !== undefined) { - return { PayloadData: __expectString(output.PayloadData) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ManifestOverridesPayload omitted. -/** - * deserializeAws_restJson1ManifestPayload - */ -const de_ManifestPayload = (output: any, context: __SerdeContext): ManifestPayload => { - if (__expectString(output.PayloadData) !== undefined) { - return { PayloadData: __expectString(output.PayloadData) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ManifestPayload omitted. -/** - * deserializeAws_restJson1NetworkPayload - */ -const de_NetworkPayload = (output: any, context: __SerdeContext): NetworkPayload => { - return { - Ethernet0: output.Ethernet0 != null ? de_EthernetPayload(output.Ethernet0, context) : undefined, - Ethernet1: output.Ethernet1 != null ? de_EthernetPayload(output.Ethernet1, context) : undefined, - Ntp: output.Ntp != null ? de_NtpPayload(output.Ntp, context) : undefined, - } as any; -}; +// de_NetworkPayload omitted. /** * deserializeAws_restJson1NetworkStatus */ const de_NetworkStatus = (output: any, context: __SerdeContext): NetworkStatus => { - return { - Ethernet0Status: output.Ethernet0Status != null ? de_EthernetStatus(output.Ethernet0Status, context) : undefined, - Ethernet1Status: output.Ethernet1Status != null ? de_EthernetStatus(output.Ethernet1Status, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - NtpStatus: output.NtpStatus != null ? de_NtpStatus(output.NtpStatus, context) : undefined, - } as any; + return take(output, { + Ethernet0Status: _json, + Ethernet1Status: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NtpStatus: _json, + }) as any; }; /** * deserializeAws_restJson1Node */ const de_Node = (output: any, context: __SerdeContext): Node => { - return { - Category: __expectString(output.Category), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - NodeId: __expectString(output.NodeId), - OwnerAccount: __expectString(output.OwnerAccount), - PackageArn: __expectString(output.PackageArn), - PackageId: __expectString(output.PackageId), - PackageName: __expectString(output.PackageName), - PackageVersion: __expectString(output.PackageVersion), - PatchVersion: __expectString(output.PatchVersion), - } as any; + return take(output, { + Category: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Name: __expectString, + NodeId: __expectString, + OwnerAccount: __expectString, + PackageArn: __expectString, + PackageId: __expectString, + PackageName: __expectString, + PackageVersion: __expectString, + PatchVersion: __expectString, + }) as any; }; /** * deserializeAws_restJson1NodeFromTemplateJob */ const de_NodeFromTemplateJob = (output: any, context: __SerdeContext): NodeFromTemplateJob => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - JobId: __expectString(output.JobId), - NodeName: __expectString(output.NodeName), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - TemplateType: __expectString(output.TemplateType), - } as any; + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobId: __expectString, + NodeName: __expectString, + Status: __expectString, + StatusMessage: __expectString, + TemplateType: __expectString, + }) as any; }; /** @@ -4216,77 +3559,20 @@ const de_NodeFromTemplateJobList = (output: any, context: __SerdeContext): NodeF const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NodeFromTemplateJob(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NodeInputPort - */ -const de_NodeInputPort = (output: any, context: __SerdeContext): NodeInputPort => { - return { - DefaultValue: __expectString(output.DefaultValue), - Description: __expectString(output.Description), - MaxConnections: __expectInt32(output.MaxConnections), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_NodeInputPort omitted. -/** - * deserializeAws_restJson1NodeInstance - */ -const de_NodeInstance = (output: any, context: __SerdeContext): NodeInstance => { - return { - CurrentStatus: __expectString(output.CurrentStatus), - NodeId: __expectString(output.NodeId), - NodeInstanceId: __expectString(output.NodeInstanceId), - NodeName: __expectString(output.NodeName), - PackageName: __expectString(output.PackageName), - PackagePatchVersion: __expectString(output.PackagePatchVersion), - PackageVersion: __expectString(output.PackageVersion), - } as any; -}; +// de_NodeInstance omitted. -/** - * deserializeAws_restJson1NodeInstances - */ -const de_NodeInstances = (output: any, context: __SerdeContext): NodeInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NodeInstance(entry, context); - }); - return retVal; -}; +// de_NodeInstances omitted. -/** - * deserializeAws_restJson1NodeInterface - */ -const de_NodeInterface = (output: any, context: __SerdeContext): NodeInterface => { - return { - Inputs: output.Inputs != null ? de_InputPortList(output.Inputs, context) : undefined, - Outputs: output.Outputs != null ? de_OutputPortList(output.Outputs, context) : undefined, - } as any; -}; +// de_NodeInterface omitted. -/** - * deserializeAws_restJson1NodeOutputPort - */ -const de_NodeOutputPort = (output: any, context: __SerdeContext): NodeOutputPort => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_NodeOutputPort omitted. /** * deserializeAws_restJson1NodesList @@ -4295,105 +3581,36 @@ const de_NodesList = (output: any, context: __SerdeContext): Node[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Node(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NtpPayload - */ -const de_NtpPayload = (output: any, context: __SerdeContext): NtpPayload => { - return { - NtpServers: output.NtpServers != null ? de_NtpServerList(output.NtpServers, context) : undefined, - } as any; -}; +// de_NtpPayload omitted. -/** - * deserializeAws_restJson1NtpServerList - */ -const de_NtpServerList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NtpServerList omitted. -/** - * deserializeAws_restJson1NtpStatus - */ -const de_NtpStatus = (output: any, context: __SerdeContext): NtpStatus => { - return { - ConnectionStatus: __expectString(output.ConnectionStatus), - IpAddress: __expectString(output.IpAddress), - NtpServerName: __expectString(output.NtpServerName), - } as any; -}; +// de_NtpStatus omitted. -/** - * deserializeAws_restJson1OutputPortList - */ -const de_OutputPortList = (output: any, context: __SerdeContext): NodeOutputPort[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NodeOutputPort(entry, context); - }); - return retVal; -}; +// de_OutputPortList omitted. -/** - * deserializeAws_restJson1OutPutS3Location - */ -const de_OutPutS3Location = (output: any, context: __SerdeContext): OutPutS3Location => { - return { - BucketName: __expectString(output.BucketName), - ObjectKey: __expectString(output.ObjectKey), - } as any; -}; +// de_OutPutS3Location omitted. /** * deserializeAws_restJson1PackageImportJob */ const de_PackageImportJob = (output: any, context: __SerdeContext): PackageImportJob => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - JobId: __expectString(output.JobId), - JobType: __expectString(output.JobType), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobId: __expectString, + JobType: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1PackageImportJobInputConfig - */ -const de_PackageImportJobInputConfig = (output: any, context: __SerdeContext): PackageImportJobInputConfig => { - return { - PackageVersionInputConfig: - output.PackageVersionInputConfig != null - ? de_PackageVersionInputConfig(output.PackageVersionInputConfig, context) - : undefined, - } as any; -}; +// de_PackageImportJobInputConfig omitted. /** * deserializeAws_restJson1PackageImportJobList @@ -4402,38 +3619,14 @@ const de_PackageImportJobList = (output: any, context: __SerdeContext): PackageI const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageImportJob(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PackageImportJobOutput - */ -const de_PackageImportJobOutput = (output: any, context: __SerdeContext): PackageImportJobOutput => { - return { - OutputS3Location: - output.OutputS3Location != null ? de_OutPutS3Location(output.OutputS3Location, context) : undefined, - PackageId: __expectString(output.PackageId), - PackageVersion: __expectString(output.PackageVersion), - PatchVersion: __expectString(output.PatchVersion), - } as any; -}; +// de_PackageImportJobOutput omitted. -/** - * deserializeAws_restJson1PackageImportJobOutputConfig - */ -const de_PackageImportJobOutputConfig = (output: any, context: __SerdeContext): PackageImportJobOutputConfig => { - return { - PackageVersionOutputConfig: - output.PackageVersionOutputConfig != null - ? de_PackageVersionOutputConfig(output.PackageVersionOutputConfig, context) - : undefined, - } as any; -}; +// de_PackageImportJobOutputConfig omitted. /** * deserializeAws_restJson1PackageList @@ -4442,9 +3635,6 @@ const de_PackageList = (output: any, context: __SerdeContext): PackageListItem[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PackageListItem(entry, context); }); return retVal; @@ -4454,92 +3644,35 @@ const de_PackageList = (output: any, context: __SerdeContext): PackageListItem[] * deserializeAws_restJson1PackageListItem */ const de_PackageListItem = (output: any, context: __SerdeContext): PackageListItem => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - PackageId: __expectString(output.PackageId), - PackageName: __expectString(output.PackageName), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PackageId: __expectString, + PackageName: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1PackageObject - */ -const de_PackageObject = (output: any, context: __SerdeContext): PackageObject => { - return { - Name: __expectString(output.Name), - PackageVersion: __expectString(output.PackageVersion), - PatchVersion: __expectString(output.PatchVersion), - } as any; -}; +// de_PackageObject omitted. -/** - * deserializeAws_restJson1PackageObjects - */ -const de_PackageObjects = (output: any, context: __SerdeContext): PackageObject[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PackageObject(entry, context); - }); - return retVal; -}; +// de_PackageObjects omitted. -/** - * deserializeAws_restJson1PackageVersionInputConfig - */ -const de_PackageVersionInputConfig = (output: any, context: __SerdeContext): PackageVersionInputConfig => { - return { - S3Location: output.S3Location != null ? de_S3Location(output.S3Location, context) : undefined, - } as any; -}; +// de_PackageVersionInputConfig omitted. -/** - * deserializeAws_restJson1PackageVersionOutputConfig - */ -const de_PackageVersionOutputConfig = (output: any, context: __SerdeContext): PackageVersionOutputConfig => { - return { - MarkLatest: __expectBoolean(output.MarkLatest), - PackageName: __expectString(output.PackageName), - PackageVersion: __expectString(output.PackageVersion), - } as any; -}; +// de_PackageVersionOutputConfig omitted. -/** - * deserializeAws_restJson1PrincipalArnsList - */ -const de_PrincipalArnsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PrincipalArnsList omitted. /** * deserializeAws_restJson1ReportedRuntimeContextState */ const de_ReportedRuntimeContextState = (output: any, context: __SerdeContext): ReportedRuntimeContextState => { - return { - DesiredState: __expectString(output.DesiredState), - DeviceReportedStatus: __expectString(output.DeviceReportedStatus), - DeviceReportedTime: - output.DeviceReportedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeviceReportedTime))) - : undefined, - RuntimeContextName: __expectString(output.RuntimeContextName), - } as any; + return take(output, { + DesiredState: __expectString, + DeviceReportedStatus: __expectString, + DeviceReportedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuntimeContextName: __expectString, + }) as any; }; /** @@ -4549,131 +3682,28 @@ const de_ReportedRuntimeContextStates = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReportedRuntimeContextState(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - BucketName: __expectString(output.BucketName), - ObjectKey: __expectString(output.ObjectKey), - Region: __expectString(output.Region), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1StaticIpConnectionInfo - */ -const de_StaticIpConnectionInfo = (output: any, context: __SerdeContext): StaticIpConnectionInfo => { - return { - DefaultGateway: __expectString(output.DefaultGateway), - Dns: output.Dns != null ? de_DnsList(output.Dns, context) : undefined, - IpAddress: __expectString(output.IpAddress), - Mask: __expectString(output.Mask), - } as any; -}; +// de_StaticIpConnectionInfo omitted. -/** - * deserializeAws_restJson1StorageLocation - */ -const de_StorageLocation = (output: any, context: __SerdeContext): StorageLocation => { - return { - BinaryPrefixLocation: __expectString(output.BinaryPrefixLocation), - Bucket: __expectString(output.Bucket), - GeneratedPrefixLocation: __expectString(output.GeneratedPrefixLocation), - ManifestPrefixLocation: __expectString(output.ManifestPrefixLocation), - RepoPrefixLocation: __expectString(output.RepoPrefixLocation), - } as any; -}; +// de_StorageLocation omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TemplateParametersMap - */ -const de_TemplateParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TemplateParametersMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionErrorArgument - */ -const de_ValidationExceptionErrorArgument = ( - output: any, - context: __SerdeContext -): ValidationExceptionErrorArgument => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_ValidationExceptionErrorArgument omitted. -/** - * deserializeAws_restJson1ValidationExceptionErrorArgumentList - */ -const de_ValidationExceptionErrorArgumentList = ( - output: any, - context: __SerdeContext -): ValidationExceptionErrorArgument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionErrorArgument(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionErrorArgumentList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-personalize-events/src/protocols/Aws_restJson1.ts b/clients/client-personalize-events/src/protocols/Aws_restJson1.ts index 56cd49918383..08c12dbfa9c6 100644 --- a/clients/client-personalize-events/src/protocols/Aws_restJson1.ts +++ b/clients/client-personalize-events/src/protocols/Aws_restJson1.ts @@ -1,12 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, - map as __map, + map, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -41,12 +43,14 @@ export const se_PutEventsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/events"; let body: any; - body = JSON.stringify({ - ...(input.eventList != null && { eventList: se_EventList(input.eventList, context) }), - ...(input.sessionId != null && { sessionId: input.sessionId }), - ...(input.trackingId != null && { trackingId: input.trackingId }), - ...(input.userId != null && { userId: input.userId }), - }); + body = JSON.stringify( + take(input, { + eventList: (_) => se_EventList(_, context), + sessionId: [], + trackingId: [], + userId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -71,10 +75,12 @@ export const se_PutItemsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/items"; let body: any; - body = JSON.stringify({ - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - ...(input.items != null && { items: se_ItemList(input.items, context) }), - }); + body = JSON.stringify( + take(input, { + datasetArn: [], + items: (_) => se_ItemList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -99,10 +105,12 @@ export const se_PutUsersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/users"; let body: any; - body = JSON.stringify({ - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - ...(input.users != null && { users: se_UserList(input.users, context) }), - }); + body = JSON.stringify( + take(input, { + datasetArn: [], + users: (_) => se_UserList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -149,10 +157,9 @@ const de_PutEventsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -199,10 +206,9 @@ const de_PutItemsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -249,16 +255,15 @@ const de_PutUsersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InvalidInputExceptionRes */ @@ -268,9 +273,10 @@ const de_InvalidInputExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -287,9 +293,10 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -306,9 +313,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -320,19 +328,17 @@ const de_ResourceNotFoundExceptionRes = async ( * serializeAws_restJson1Event */ const se_Event = (input: Event, context: __SerdeContext): any => { - return { - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventType != null && { eventType: input.eventType }), - ...(input.eventValue != null && { eventValue: __serializeFloat(input.eventValue) }), - ...(input.impression != null && { impression: se_Impression(input.impression, context) }), - ...(input.itemId != null && { itemId: input.itemId }), - ...(input.metricAttribution != null && { - metricAttribution: se_MetricAttribution(input.metricAttribution, context), - }), - ...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }), - ...(input.recommendationId != null && { recommendationId: input.recommendationId }), - ...(input.sentAt != null && { sentAt: Math.round(input.sentAt.getTime() / 1000) }), - }; + return take(input, { + eventId: [], + eventType: [], + eventValue: __serializeFloat, + impression: _json, + itemId: [], + metricAttribution: _json, + properties: __LazyJsonString.fromObject, + recommendationId: [], + sentAt: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -346,25 +352,16 @@ const se_EventList = (input: Event[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1Impression - */ -const se_Impression = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Impression omitted. /** * serializeAws_restJson1Item */ const se_Item = (input: Item, context: __SerdeContext): any => { - return { - ...(input.itemId != null && { itemId: input.itemId }), - ...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }), - }; + return take(input, { + itemId: [], + properties: __LazyJsonString.fromObject, + }); }; /** @@ -378,23 +375,16 @@ const se_ItemList = (input: Item[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1MetricAttribution - */ -const se_MetricAttribution = (input: MetricAttribution, context: __SerdeContext): any => { - return { - ...(input.eventAttributionSource != null && { eventAttributionSource: input.eventAttributionSource }), - }; -}; +// se_MetricAttribution omitted. /** * serializeAws_restJson1User */ const se_User = (input: User, context: __SerdeContext): any => { - return { - ...(input.properties != null && { properties: __LazyJsonString.fromObject(input.properties) }), - ...(input.userId != null && { userId: input.userId }), - }; + return take(input, { + properties: __LazyJsonString.fromObject, + userId: [], + }); }; /** diff --git a/clients/client-personalize-runtime/src/protocols/Aws_restJson1.ts b/clients/client-personalize-runtime/src/protocols/Aws_restJson1.ts index 36f4dda69726..9c7339c56824 100644 --- a/clients/client-personalize-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-personalize-runtime/src/protocols/Aws_restJson1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -36,14 +38,16 @@ export const se_GetPersonalizedRankingCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/personalize-ranking"; let body: any; - body = JSON.stringify({ - ...(input.campaignArn != null && { campaignArn: input.campaignArn }), - ...(input.context != null && { context: se_Context(input.context, context) }), - ...(input.filterArn != null && { filterArn: input.filterArn }), - ...(input.filterValues != null && { filterValues: se_FilterValues(input.filterValues, context) }), - ...(input.inputList != null && { inputList: se_InputList(input.inputList, context) }), - ...(input.userId != null && { userId: input.userId }), - }); + body = JSON.stringify( + take(input, { + campaignArn: [], + context: (_) => _json(_), + filterArn: [], + filterValues: (_) => _json(_), + inputList: (_) => _json(_), + userId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -68,17 +72,19 @@ export const se_GetRecommendationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recommendations"; let body: any; - body = JSON.stringify({ - ...(input.campaignArn != null && { campaignArn: input.campaignArn }), - ...(input.context != null && { context: se_Context(input.context, context) }), - ...(input.filterArn != null && { filterArn: input.filterArn }), - ...(input.filterValues != null && { filterValues: se_FilterValues(input.filterValues, context) }), - ...(input.itemId != null && { itemId: input.itemId }), - ...(input.numResults != null && { numResults: input.numResults }), - ...(input.promotions != null && { promotions: se_PromotionList(input.promotions, context) }), - ...(input.recommenderArn != null && { recommenderArn: input.recommenderArn }), - ...(input.userId != null && { userId: input.userId }), - }); + body = JSON.stringify( + take(input, { + campaignArn: [], + context: (_) => _json(_), + filterArn: [], + filterValues: (_) => _json(_), + itemId: [], + numResults: [], + promotions: (_) => _json(_), + recommenderArn: [], + userId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -104,12 +110,11 @@ export const de_GetPersonalizedRankingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.personalizedRanking != null) { - contents.personalizedRanking = de_ItemList(data.personalizedRanking, context); - } - if (data.recommendationId != null) { - contents.recommendationId = __expectString(data.recommendationId); - } + const doc = take(data, { + personalizedRanking: (_) => de_ItemList(_, context), + recommendationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -134,10 +139,9 @@ const de_GetPersonalizedRankingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -157,12 +161,11 @@ export const de_GetRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.itemList != null) { - contents.itemList = de_ItemList(data.itemList, context); - } - if (data.recommendationId != null) { - contents.recommendationId = __expectString(data.recommendationId); - } + const doc = take(data, { + itemList: (_) => de_ItemList(_, context), + recommendationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -187,16 +190,15 @@ const de_GetRecommendationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InvalidInputExceptionRes */ @@ -206,9 +208,10 @@ const de_InvalidInputExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -225,9 +228,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -235,65 +239,15 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Context - */ -const se_Context = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Context omitted. -/** - * serializeAws_restJson1FilterValues - */ -const se_FilterValues = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FilterValues omitted. -/** - * serializeAws_restJson1InputList - */ -const se_InputList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InputList omitted. -/** - * serializeAws_restJson1Promotion - */ -const se_Promotion = (input: Promotion, context: __SerdeContext): any => { - return { - ...(input.filterArn != null && { filterArn: input.filterArn }), - ...(input.filterValues != null && { filterValues: se_FilterValues(input.filterValues, context) }), - ...(input.name != null && { name: input.name }), - ...(input.percentPromotedItems != null && { percentPromotedItems: input.percentPromotedItems }), - }; -}; +// se_Promotion omitted. -/** - * serializeAws_restJson1PromotionList - */ -const se_PromotionList = (input: Promotion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Promotion(entry, context); - }); -}; +// se_PromotionList omitted. /** * deserializeAws_restJson1ItemList @@ -302,9 +256,6 @@ const de_ItemList = (output: any, context: __SerdeContext): PredictedItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PredictedItem(entry, context); }); return retVal; @@ -314,11 +265,11 @@ const de_ItemList = (output: any, context: __SerdeContext): PredictedItem[] => { * deserializeAws_restJson1PredictedItem */ const de_PredictedItem = (output: any, context: __SerdeContext): PredictedItem => { - return { - itemId: __expectString(output.itemId), - promotionName: __expectString(output.promotionName), - score: __limitedParseDouble(output.score), - } as any; + return take(output, { + itemId: __expectString, + promotionName: __expectString, + score: __limitedParseDouble, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-personalize/src/protocols/Aws_json1_1.ts b/clients/client-personalize/src/protocols/Aws_json1_1.ts index f3e0dc9fc6f0..54cee9446802 100644 --- a/clients/client-personalize/src/protocols/Aws_json1_1.ts +++ b/clients/client-personalize/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,7 +11,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -168,9 +170,7 @@ import { import { UpdateRecommenderCommandInput, UpdateRecommenderCommandOutput } from "../commands/UpdateRecommenderCommand"; import { Algorithm, - AlgorithmImage, AutoMLConfig, - AutoMLResult, BatchInferenceJob, BatchInferenceJobConfig, BatchInferenceJobInput, @@ -187,33 +187,19 @@ import { CategoricalHyperParameterRange, ContinuousHyperParameterRange, CreateBatchInferenceJobRequest, - CreateBatchInferenceJobResponse, CreateBatchSegmentJobRequest, - CreateBatchSegmentJobResponse, CreateCampaignRequest, - CreateCampaignResponse, CreateDatasetExportJobRequest, - CreateDatasetExportJobResponse, CreateDatasetGroupRequest, - CreateDatasetGroupResponse, CreateDatasetImportJobRequest, - CreateDatasetImportJobResponse, CreateDatasetRequest, - CreateDatasetResponse, CreateEventTrackerRequest, - CreateEventTrackerResponse, CreateFilterRequest, - CreateFilterResponse, CreateMetricAttributionRequest, - CreateMetricAttributionResponse, CreateRecommenderRequest, - CreateRecommenderResponse, CreateSchemaRequest, - CreateSchemaResponse, CreateSolutionRequest, - CreateSolutionResponse, CreateSolutionVersionRequest, - CreateSolutionVersionResponse, Dataset, DatasetExportJob, DatasetExportJobOutput, @@ -226,10 +212,8 @@ import { DatasetSchemaSummary, DatasetSummary, DataSource, - DefaultCategoricalHyperParameterRange, DefaultContinuousHyperParameterRange, DefaultHyperParameterRanges, - DefaultIntegerHyperParameterRange, DeleteCampaignRequest, DeleteDatasetGroupRequest, DeleteDatasetRequest, @@ -307,7 +291,6 @@ import { ListFiltersRequest, ListFiltersResponse, ListMetricAttributionMetricsRequest, - ListMetricAttributionMetricsResponse, ListMetricAttributionsRequest, ListMetricAttributionsResponse, ListRecipesRequest, @@ -321,7 +304,6 @@ import { ListSolutionVersionsRequest, ListSolutionVersionsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MetricAttribute, MetricAttribution, MetricAttributionOutput, @@ -343,24 +325,16 @@ import { SolutionVersion, SolutionVersionSummary, StartRecommenderRequest, - StartRecommenderResponse, StopRecommenderRequest, - StopRecommenderResponse, StopSolutionVersionCreationRequest, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagKeysException, TooManyTagsException, - TunedHPOParams, UntagResourceRequest, - UntagResourceResponse, UpdateCampaignRequest, - UpdateCampaignResponse, UpdateMetricAttributionRequest, - UpdateMetricAttributionResponse, UpdateRecommenderRequest, - UpdateRecommenderResponse, } from "../models/models_0"; import { PersonalizeServiceException as __BaseException } from "../models/PersonalizeServiceException"; @@ -373,7 +347,7 @@ export const se_CreateBatchInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBatchInferenceJob"); let body: any; - body = JSON.stringify(se_CreateBatchInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,7 +360,7 @@ export const se_CreateBatchSegmentJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateBatchSegmentJob"); let body: any; - body = JSON.stringify(se_CreateBatchSegmentJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -399,7 +373,7 @@ export const se_CreateCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCampaign"); let body: any; - body = JSON.stringify(se_CreateCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -412,7 +386,7 @@ export const se_CreateDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataset"); let body: any; - body = JSON.stringify(se_CreateDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,7 +399,7 @@ export const se_CreateDatasetExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatasetExportJob"); let body: any; - body = JSON.stringify(se_CreateDatasetExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -438,7 +412,7 @@ export const se_CreateDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatasetGroup"); let body: any; - body = JSON.stringify(se_CreateDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -451,7 +425,7 @@ export const se_CreateDatasetImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatasetImportJob"); let body: any; - body = JSON.stringify(se_CreateDatasetImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -464,7 +438,7 @@ export const se_CreateEventTrackerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEventTracker"); let body: any; - body = JSON.stringify(se_CreateEventTrackerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -477,7 +451,7 @@ export const se_CreateFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFilter"); let body: any; - body = JSON.stringify(se_CreateFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -490,7 +464,7 @@ export const se_CreateMetricAttributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMetricAttribution"); let body: any; - body = JSON.stringify(se_CreateMetricAttributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -503,7 +477,7 @@ export const se_CreateRecommenderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRecommender"); let body: any; - body = JSON.stringify(se_CreateRecommenderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,7 +490,7 @@ export const se_CreateSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSchema"); let body: any; - body = JSON.stringify(se_CreateSchemaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -542,7 +516,7 @@ export const se_CreateSolutionVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSolutionVersion"); let body: any; - body = JSON.stringify(se_CreateSolutionVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -555,7 +529,7 @@ export const se_DeleteCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCampaign"); let body: any; - body = JSON.stringify(se_DeleteCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -568,7 +542,7 @@ export const se_DeleteDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataset"); let body: any; - body = JSON.stringify(se_DeleteDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +555,7 @@ export const se_DeleteDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDatasetGroup"); let body: any; - body = JSON.stringify(se_DeleteDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +568,7 @@ export const se_DeleteEventTrackerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventTracker"); let body: any; - body = JSON.stringify(se_DeleteEventTrackerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +581,7 @@ export const se_DeleteFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFilter"); let body: any; - body = JSON.stringify(se_DeleteFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +594,7 @@ export const se_DeleteMetricAttributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMetricAttribution"); let body: any; - body = JSON.stringify(se_DeleteMetricAttributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -633,7 +607,7 @@ export const se_DeleteRecommenderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRecommender"); let body: any; - body = JSON.stringify(se_DeleteRecommenderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +620,7 @@ export const se_DeleteSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSchema"); let body: any; - body = JSON.stringify(se_DeleteSchemaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +633,7 @@ export const se_DeleteSolutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSolution"); let body: any; - body = JSON.stringify(se_DeleteSolutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -672,7 +646,7 @@ export const se_DescribeAlgorithmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAlgorithm"); let body: any; - body = JSON.stringify(se_DescribeAlgorithmRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +659,7 @@ export const se_DescribeBatchInferenceJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBatchInferenceJob"); let body: any; - body = JSON.stringify(se_DescribeBatchInferenceJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +672,7 @@ export const se_DescribeBatchSegmentJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBatchSegmentJob"); let body: any; - body = JSON.stringify(se_DescribeBatchSegmentJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +685,7 @@ export const se_DescribeCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCampaign"); let body: any; - body = JSON.stringify(se_DescribeCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +698,7 @@ export const se_DescribeDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataset"); let body: any; - body = JSON.stringify(se_DescribeDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -737,7 +711,7 @@ export const se_DescribeDatasetExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDatasetExportJob"); let body: any; - body = JSON.stringify(se_DescribeDatasetExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +724,7 @@ export const se_DescribeDatasetGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDatasetGroup"); let body: any; - body = JSON.stringify(se_DescribeDatasetGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -763,7 +737,7 @@ export const se_DescribeDatasetImportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDatasetImportJob"); let body: any; - body = JSON.stringify(se_DescribeDatasetImportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -776,7 +750,7 @@ export const se_DescribeEventTrackerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEventTracker"); let body: any; - body = JSON.stringify(se_DescribeEventTrackerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +763,7 @@ export const se_DescribeFeatureTransformationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFeatureTransformation"); let body: any; - body = JSON.stringify(se_DescribeFeatureTransformationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +776,7 @@ export const se_DescribeFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFilter"); let body: any; - body = JSON.stringify(se_DescribeFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -815,7 +789,7 @@ export const se_DescribeMetricAttributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMetricAttribution"); let body: any; - body = JSON.stringify(se_DescribeMetricAttributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -828,7 +802,7 @@ export const se_DescribeRecipeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRecipe"); let body: any; - body = JSON.stringify(se_DescribeRecipeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -841,7 +815,7 @@ export const se_DescribeRecommenderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRecommender"); let body: any; - body = JSON.stringify(se_DescribeRecommenderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -854,7 +828,7 @@ export const se_DescribeSchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSchema"); let body: any; - body = JSON.stringify(se_DescribeSchemaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -867,7 +841,7 @@ export const se_DescribeSolutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSolution"); let body: any; - body = JSON.stringify(se_DescribeSolutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -880,7 +854,7 @@ export const se_DescribeSolutionVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSolutionVersion"); let body: any; - body = JSON.stringify(se_DescribeSolutionVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -893,7 +867,7 @@ export const se_GetSolutionMetricsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSolutionMetrics"); let body: any; - body = JSON.stringify(se_GetSolutionMetricsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -906,7 +880,7 @@ export const se_ListBatchInferenceJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBatchInferenceJobs"); let body: any; - body = JSON.stringify(se_ListBatchInferenceJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -919,7 +893,7 @@ export const se_ListBatchSegmentJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBatchSegmentJobs"); let body: any; - body = JSON.stringify(se_ListBatchSegmentJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -932,7 +906,7 @@ export const se_ListCampaignsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCampaigns"); let body: any; - body = JSON.stringify(se_ListCampaignsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -945,7 +919,7 @@ export const se_ListDatasetExportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetExportJobs"); let body: any; - body = JSON.stringify(se_ListDatasetExportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -958,7 +932,7 @@ export const se_ListDatasetGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetGroups"); let body: any; - body = JSON.stringify(se_ListDatasetGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +945,7 @@ export const se_ListDatasetImportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetImportJobs"); let body: any; - body = JSON.stringify(se_ListDatasetImportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +958,7 @@ export const se_ListDatasetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasets"); let body: any; - body = JSON.stringify(se_ListDatasetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -997,7 +971,7 @@ export const se_ListEventTrackersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEventTrackers"); let body: any; - body = JSON.stringify(se_ListEventTrackersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1010,7 +984,7 @@ export const se_ListFiltersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFilters"); let body: any; - body = JSON.stringify(se_ListFiltersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1023,7 +997,7 @@ export const se_ListMetricAttributionMetricsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMetricAttributionMetrics"); let body: any; - body = JSON.stringify(se_ListMetricAttributionMetricsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1036,7 +1010,7 @@ export const se_ListMetricAttributionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMetricAttributions"); let body: any; - body = JSON.stringify(se_ListMetricAttributionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1049,7 +1023,7 @@ export const se_ListRecipesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRecipes"); let body: any; - body = JSON.stringify(se_ListRecipesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1062,7 +1036,7 @@ export const se_ListRecommendersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRecommenders"); let body: any; - body = JSON.stringify(se_ListRecommendersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1075,7 +1049,7 @@ export const se_ListSchemasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSchemas"); let body: any; - body = JSON.stringify(se_ListSchemasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1088,7 +1062,7 @@ export const se_ListSolutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSolutions"); let body: any; - body = JSON.stringify(se_ListSolutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1101,7 +1075,7 @@ export const se_ListSolutionVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSolutionVersions"); let body: any; - body = JSON.stringify(se_ListSolutionVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1114,7 +1088,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1127,7 +1101,7 @@ export const se_StartRecommenderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartRecommender"); let body: any; - body = JSON.stringify(se_StartRecommenderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1140,7 +1114,7 @@ export const se_StopRecommenderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopRecommender"); let body: any; - body = JSON.stringify(se_StopRecommenderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1153,7 +1127,7 @@ export const se_StopSolutionVersionCreationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopSolutionVersionCreation"); let body: any; - body = JSON.stringify(se_StopSolutionVersionCreationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1166,7 +1140,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1179,7 +1153,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1192,7 +1166,7 @@ export const se_UpdateCampaignCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCampaign"); let body: any; - body = JSON.stringify(se_UpdateCampaignRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1205,7 +1179,7 @@ export const se_UpdateMetricAttributionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMetricAttribution"); let body: any; - body = JSON.stringify(se_UpdateMetricAttributionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1218,7 +1192,7 @@ export const se_UpdateRecommenderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRecommender"); let body: any; - body = JSON.stringify(se_UpdateRecommenderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1234,12 +1208,12 @@ export const de_CreateBatchInferenceJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBatchInferenceJobResponse(data, context); + contents = _json(data); const response: CreateBatchInferenceJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1275,10 +1249,9 @@ const de_CreateBatchInferenceJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1296,12 +1269,12 @@ export const de_CreateBatchSegmentJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBatchSegmentJobResponse(data, context); + contents = _json(data); const response: CreateBatchSegmentJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1337,10 +1310,9 @@ const de_CreateBatchSegmentJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1358,12 +1330,12 @@ export const de_CreateCampaignCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCampaignResponse(data, context); + contents = _json(data); const response: CreateCampaignCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1399,10 +1371,9 @@ const de_CreateCampaignCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1420,12 +1391,12 @@ export const de_CreateDatasetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetResponse(data, context); + contents = _json(data); const response: CreateDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1461,10 +1432,9 @@ const de_CreateDatasetCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1482,12 +1452,12 @@ export const de_CreateDatasetExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetExportJobResponse(data, context); + contents = _json(data); const response: CreateDatasetExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1523,10 +1493,9 @@ const de_CreateDatasetExportJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1544,12 +1513,12 @@ export const de_CreateDatasetGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetGroupResponse(data, context); + contents = _json(data); const response: CreateDatasetGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1579,10 +1548,9 @@ const de_CreateDatasetGroupCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1600,12 +1568,12 @@ export const de_CreateDatasetImportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetImportJobResponse(data, context); + contents = _json(data); const response: CreateDatasetImportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1641,10 +1609,9 @@ const de_CreateDatasetImportJobCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1662,12 +1629,12 @@ export const de_CreateEventTrackerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEventTrackerResponse(data, context); + contents = _json(data); const response: CreateEventTrackerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1703,10 +1670,9 @@ const de_CreateEventTrackerCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1724,12 +1690,12 @@ export const de_CreateFilterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFilterResponse(data, context); + contents = _json(data); const response: CreateFilterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1762,10 +1728,9 @@ const de_CreateFilterCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1783,12 +1748,12 @@ export const de_CreateMetricAttributionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMetricAttributionResponse(data, context); + contents = _json(data); const response: CreateMetricAttributionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1821,10 +1786,9 @@ const de_CreateMetricAttributionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1842,12 +1806,12 @@ export const de_CreateRecommenderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRecommenderResponse(data, context); + contents = _json(data); const response: CreateRecommenderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1883,10 +1847,9 @@ const de_CreateRecommenderCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1904,12 +1867,12 @@ export const de_CreateSchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSchemaResponse(data, context); + contents = _json(data); const response: CreateSchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1936,10 +1899,9 @@ const de_CreateSchemaCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1957,12 +1919,12 @@ export const de_CreateSolutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSolutionResponse(data, context); + contents = _json(data); const response: CreateSolutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1998,10 +1960,9 @@ const de_CreateSolutionCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2019,12 +1980,12 @@ export const de_CreateSolutionVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSolutionVersionResponse(data, context); + contents = _json(data); const response: CreateSolutionVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2060,10 +2021,9 @@ const de_CreateSolutionVersionCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2083,7 +2043,7 @@ export const de_DeleteCampaignCommand = async ( const response: DeleteCampaignCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2110,10 +2070,9 @@ const de_DeleteCampaignCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2133,7 +2092,7 @@ export const de_DeleteDatasetCommand = async ( const response: DeleteDatasetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2160,10 +2119,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2183,7 +2141,7 @@ export const de_DeleteDatasetGroupCommand = async ( const response: DeleteDatasetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2210,10 +2168,9 @@ const de_DeleteDatasetGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2233,7 +2190,7 @@ export const de_DeleteEventTrackerCommand = async ( const response: DeleteEventTrackerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2260,10 +2217,9 @@ const de_DeleteEventTrackerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2283,7 +2239,7 @@ export const de_DeleteFilterCommand = async ( const response: DeleteFilterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2310,10 +2266,9 @@ const de_DeleteFilterCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2333,7 +2288,7 @@ export const de_DeleteMetricAttributionCommand = async ( const response: DeleteMetricAttributionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2360,10 +2315,9 @@ const de_DeleteMetricAttributionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2383,7 +2337,7 @@ export const de_DeleteRecommenderCommand = async ( const response: DeleteRecommenderCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2410,10 +2364,9 @@ const de_DeleteRecommenderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2433,7 +2386,7 @@ export const de_DeleteSchemaCommand = async ( const response: DeleteSchemaCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2460,10 +2413,9 @@ const de_DeleteSchemaCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2483,7 +2435,7 @@ export const de_DeleteSolutionCommand = async ( const response: DeleteSolutionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2510,10 +2462,9 @@ const de_DeleteSolutionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2536,7 +2487,7 @@ export const de_DescribeAlgorithmCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2560,10 +2511,9 @@ const de_DescribeAlgorithmCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2586,7 +2536,7 @@ export const de_DescribeBatchInferenceJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2610,10 +2560,9 @@ const de_DescribeBatchInferenceJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2636,7 +2585,7 @@ export const de_DescribeBatchSegmentJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2660,10 +2609,9 @@ const de_DescribeBatchSegmentJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2686,7 +2634,7 @@ export const de_DescribeCampaignCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2710,10 +2658,9 @@ const de_DescribeCampaignCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2736,7 +2683,7 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2760,10 +2707,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2786,7 +2732,7 @@ export const de_DescribeDatasetExportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2810,10 +2756,9 @@ const de_DescribeDatasetExportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2836,7 +2781,7 @@ export const de_DescribeDatasetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2860,10 +2805,9 @@ const de_DescribeDatasetGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2886,7 +2830,7 @@ export const de_DescribeDatasetImportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2910,10 +2854,9 @@ const de_DescribeDatasetImportJobCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2936,7 +2879,7 @@ export const de_DescribeEventTrackerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2960,10 +2903,9 @@ const de_DescribeEventTrackerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2986,7 +2928,7 @@ export const de_DescribeFeatureTransformationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3010,10 +2952,9 @@ const de_DescribeFeatureTransformationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3036,7 +2977,7 @@ export const de_DescribeFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3060,10 +3001,9 @@ const de_DescribeFilterCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3086,7 +3026,7 @@ export const de_DescribeMetricAttributionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3110,10 +3050,9 @@ const de_DescribeMetricAttributionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3136,7 +3075,7 @@ export const de_DescribeRecipeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3160,10 +3099,9 @@ const de_DescribeRecipeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3186,7 +3124,7 @@ export const de_DescribeRecommenderCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3210,10 +3148,9 @@ const de_DescribeRecommenderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3236,7 +3173,7 @@ export const de_DescribeSchemaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3260,10 +3197,9 @@ const de_DescribeSchemaCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3286,7 +3222,7 @@ export const de_DescribeSolutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3310,10 +3246,9 @@ const de_DescribeSolutionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3336,7 +3271,7 @@ export const de_DescribeSolutionVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3360,10 +3295,9 @@ const de_DescribeSolutionVersionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3386,7 +3320,7 @@ export const de_GetSolutionMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3413,10 +3347,9 @@ const de_GetSolutionMetricsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3439,7 +3372,7 @@ export const de_ListBatchInferenceJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3463,10 +3396,9 @@ const de_ListBatchInferenceJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3489,7 +3421,7 @@ export const de_ListBatchSegmentJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3513,10 +3445,9 @@ const de_ListBatchSegmentJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3539,7 +3470,7 @@ export const de_ListCampaignsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3563,10 +3494,9 @@ const de_ListCampaignsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3589,7 +3519,7 @@ export const de_ListDatasetExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3613,10 +3543,9 @@ const de_ListDatasetExportJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3639,7 +3568,7 @@ export const de_ListDatasetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3660,10 +3589,9 @@ const de_ListDatasetGroupsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3686,7 +3614,7 @@ export const de_ListDatasetImportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3710,10 +3638,9 @@ const de_ListDatasetImportJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3736,7 +3663,7 @@ export const de_ListDatasetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3760,10 +3687,9 @@ const de_ListDatasetsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3786,7 +3712,7 @@ export const de_ListEventTrackersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3810,10 +3736,9 @@ const de_ListEventTrackersCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3836,7 +3761,7 @@ export const de_ListFiltersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3860,10 +3785,9 @@ const de_ListFiltersCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3881,12 +3805,12 @@ export const de_ListMetricAttributionMetricsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListMetricAttributionMetricsResponse(data, context); + contents = _json(data); const response: ListMetricAttributionMetricsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3910,10 +3834,9 @@ const de_ListMetricAttributionMetricsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3936,7 +3859,7 @@ export const de_ListMetricAttributionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3960,10 +3883,9 @@ const de_ListMetricAttributionsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3986,7 +3908,7 @@ export const de_ListRecipesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4010,10 +3932,9 @@ const de_ListRecipesCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4036,7 +3957,7 @@ export const de_ListRecommendersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4060,10 +3981,9 @@ const de_ListRecommendersCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4086,7 +4006,7 @@ export const de_ListSchemasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4107,10 +4027,9 @@ const de_ListSchemasCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4133,7 +4052,7 @@ export const de_ListSolutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4157,10 +4076,9 @@ const de_ListSolutionsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4183,7 +4101,7 @@ export const de_ListSolutionVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4210,10 +4128,9 @@ const de_ListSolutionVersionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4231,12 +4148,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4263,10 +4180,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4284,12 +4200,12 @@ export const de_StartRecommenderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartRecommenderResponse(data, context); + contents = _json(data); const response: StartRecommenderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4316,10 +4232,9 @@ const de_StartRecommenderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4337,12 +4252,12 @@ export const de_StopRecommenderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopRecommenderResponse(data, context); + contents = _json(data); const response: StopRecommenderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4369,10 +4284,9 @@ const de_StopRecommenderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4392,7 +4306,7 @@ export const de_StopSolutionVersionCreationCommand = async ( const response: StopSolutionVersionCreationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4419,10 +4333,9 @@ const de_StopSolutionVersionCreationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4440,12 +4353,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4478,10 +4391,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4499,12 +4411,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4534,10 +4446,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyTagKeysExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4555,12 +4466,12 @@ export const de_UpdateCampaignCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCampaignResponse(data, context); + contents = _json(data); const response: UpdateCampaignCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4587,10 +4498,9 @@ const de_UpdateCampaignCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4608,12 +4518,12 @@ export const de_UpdateMetricAttributionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMetricAttributionResponse(data, context); + contents = _json(data); const response: UpdateMetricAttributionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4643,10 +4553,9 @@ const de_UpdateMetricAttributionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4664,12 +4573,12 @@ export const de_UpdateRecommenderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRecommenderResponse(data, context); + contents = _json(data); const response: UpdateRecommenderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4696,10 +4605,9 @@ const de_UpdateRecommenderCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4713,7 +4621,7 @@ const de_InvalidInputExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4729,7 +4637,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4745,7 +4653,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4761,7 +4669,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4777,7 +4685,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4793,7 +4701,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4809,7 +4717,7 @@ const de_TooManyTagKeysExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagKeysException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagKeysException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4825,7 +4733,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4833,1241 +4741,320 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1AutoMLConfig - */ -const se_AutoMLConfig = (input: AutoMLConfig, context: __SerdeContext): any => { - return { - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.recipeList != null && { recipeList: se_ArnList(input.recipeList, context) }), - }; -}; - -/** - * serializeAws_json1_1BatchInferenceJobConfig - */ -const se_BatchInferenceJobConfig = (input: BatchInferenceJobConfig, context: __SerdeContext): any => { - return { - ...(input.itemExplorationConfig != null && { - itemExplorationConfig: se_HyperParameters(input.itemExplorationConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1BatchInferenceJobInput - */ -const se_BatchInferenceJobInput = (input: BatchInferenceJobInput, context: __SerdeContext): any => { - return { - ...(input.s3DataSource != null && { s3DataSource: se_S3DataConfig(input.s3DataSource, context) }), - }; -}; - -/** - * serializeAws_json1_1BatchInferenceJobOutput - */ -const se_BatchInferenceJobOutput = (input: BatchInferenceJobOutput, context: __SerdeContext): any => { - return { - ...(input.s3DataDestination != null && { s3DataDestination: se_S3DataConfig(input.s3DataDestination, context) }), - }; -}; - -/** - * serializeAws_json1_1BatchSegmentJobInput - */ -const se_BatchSegmentJobInput = (input: BatchSegmentJobInput, context: __SerdeContext): any => { - return { - ...(input.s3DataSource != null && { s3DataSource: se_S3DataConfig(input.s3DataSource, context) }), - }; -}; - -/** - * serializeAws_json1_1BatchSegmentJobOutput - */ -const se_BatchSegmentJobOutput = (input: BatchSegmentJobOutput, context: __SerdeContext): any => { - return { - ...(input.s3DataDestination != null && { s3DataDestination: se_S3DataConfig(input.s3DataDestination, context) }), - }; -}; - -/** - * serializeAws_json1_1CampaignConfig - */ -const se_CampaignConfig = (input: CampaignConfig, context: __SerdeContext): any => { - return { - ...(input.itemExplorationConfig != null && { - itemExplorationConfig: se_HyperParameters(input.itemExplorationConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1CategoricalHyperParameterRange - */ -const se_CategoricalHyperParameterRange = (input: CategoricalHyperParameterRange, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_CategoricalValues(input.values, context) }), - }; -}; - -/** - * serializeAws_json1_1CategoricalHyperParameterRanges - */ -const se_CategoricalHyperParameterRanges = (input: CategoricalHyperParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CategoricalHyperParameterRange(entry, context); - }); -}; - -/** - * serializeAws_json1_1CategoricalValues - */ -const se_CategoricalValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ContinuousHyperParameterRange - */ -const se_ContinuousHyperParameterRange = (input: ContinuousHyperParameterRange, context: __SerdeContext): any => { - return { - ...(input.maxValue != null && { maxValue: __serializeFloat(input.maxValue) }), - ...(input.minValue != null && { minValue: __serializeFloat(input.minValue) }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1ContinuousHyperParameterRanges - */ -const se_ContinuousHyperParameterRanges = (input: ContinuousHyperParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContinuousHyperParameterRange(entry, context); - }); -}; - -/** - * serializeAws_json1_1CreateBatchInferenceJobRequest - */ -const se_CreateBatchInferenceJobRequest = (input: CreateBatchInferenceJobRequest, context: __SerdeContext): any => { - return { - ...(input.batchInferenceJobConfig != null && { - batchInferenceJobConfig: se_BatchInferenceJobConfig(input.batchInferenceJobConfig, context), - }), - ...(input.filterArn != null && { filterArn: input.filterArn }), - ...(input.jobInput != null && { jobInput: se_BatchInferenceJobInput(input.jobInput, context) }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.jobOutput != null && { jobOutput: se_BatchInferenceJobOutput(input.jobOutput, context) }), - ...(input.numResults != null && { numResults: input.numResults }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateBatchSegmentJobRequest - */ -const se_CreateBatchSegmentJobRequest = (input: CreateBatchSegmentJobRequest, context: __SerdeContext): any => { - return { - ...(input.filterArn != null && { filterArn: input.filterArn }), - ...(input.jobInput != null && { jobInput: se_BatchSegmentJobInput(input.jobInput, context) }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.jobOutput != null && { jobOutput: se_BatchSegmentJobOutput(input.jobOutput, context) }), - ...(input.numResults != null && { numResults: input.numResults }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateCampaignRequest - */ -const se_CreateCampaignRequest = (input: CreateCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.campaignConfig != null && { campaignConfig: se_CampaignConfig(input.campaignConfig, context) }), - ...(input.minProvisionedTPS != null && { minProvisionedTPS: input.minProvisionedTPS }), - ...(input.name != null && { name: input.name }), - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateDatasetExportJobRequest - */ -const se_CreateDatasetExportJobRequest = (input: CreateDatasetExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - ...(input.ingestionMode != null && { ingestionMode: input.ingestionMode }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.jobOutput != null && { jobOutput: se_DatasetExportJobOutput(input.jobOutput, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateDatasetGroupRequest - */ -const se_CreateDatasetGroupRequest = (input: CreateDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.name != null && { name: input.name }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateDatasetImportJobRequest - */ -const se_CreateDatasetImportJobRequest = (input: CreateDatasetImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.dataSource != null && { dataSource: se_DataSource(input.dataSource, context) }), - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - ...(input.importMode != null && { importMode: input.importMode }), - ...(input.jobName != null && { jobName: input.jobName }), - ...(input.publishAttributionMetricsToS3 != null && { - publishAttributionMetricsToS3: input.publishAttributionMetricsToS3, - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateDatasetRequest - */ -const se_CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.datasetType != null && { datasetType: input.datasetType }), - ...(input.name != null && { name: input.name }), - ...(input.schemaArn != null && { schemaArn: input.schemaArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateEventTrackerRequest - */ -const se_CreateEventTrackerRequest = (input: CreateEventTrackerRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateFilterRequest - */ -const se_CreateFilterRequest = (input: CreateFilterRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.filterExpression != null && { filterExpression: input.filterExpression }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateMetricAttributionRequest - */ -const se_CreateMetricAttributionRequest = (input: CreateMetricAttributionRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.metrics != null && { metrics: se_MetricAttributes(input.metrics, context) }), - ...(input.metricsOutputConfig != null && { - metricsOutputConfig: se_MetricAttributionOutput(input.metricsOutputConfig, context), - }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1CreateRecommenderRequest - */ -const se_CreateRecommenderRequest = (input: CreateRecommenderRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.name != null && { name: input.name }), - ...(input.recipeArn != null && { recipeArn: input.recipeArn }), - ...(input.recommenderConfig != null && { - recommenderConfig: se_RecommenderConfig(input.recommenderConfig, context), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateSchemaRequest - */ -const se_CreateSchemaRequest = (input: CreateSchemaRequest, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.name != null && { name: input.name }), - ...(input.schema != null && { schema: input.schema }), - }; -}; - -/** - * serializeAws_json1_1CreateSolutionRequest - */ -const se_CreateSolutionRequest = (input: CreateSolutionRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.eventType != null && { eventType: input.eventType }), - ...(input.name != null && { name: input.name }), - ...(input.performAutoML != null && { performAutoML: input.performAutoML }), - ...(input.performHPO != null && { performHPO: input.performHPO }), - ...(input.recipeArn != null && { recipeArn: input.recipeArn }), - ...(input.solutionConfig != null && { solutionConfig: se_SolutionConfig(input.solutionConfig, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateSolutionVersionRequest - */ -const se_CreateSolutionVersionRequest = (input: CreateSolutionVersionRequest, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.solutionArn != null && { solutionArn: input.solutionArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.trainingMode != null && { trainingMode: input.trainingMode }), - }; -}; - -/** - * serializeAws_json1_1DatasetExportJobOutput - */ -const se_DatasetExportJobOutput = (input: DatasetExportJobOutput, context: __SerdeContext): any => { - return { - ...(input.s3DataDestination != null && { s3DataDestination: se_S3DataConfig(input.s3DataDestination, context) }), - }; -}; - -/** - * serializeAws_json1_1DataSource - */ -const se_DataSource = (input: DataSource, context: __SerdeContext): any => { - return { - ...(input.dataLocation != null && { dataLocation: input.dataLocation }), - }; -}; - -/** - * serializeAws_json1_1DeleteCampaignRequest - */ -const se_DeleteCampaignRequest = (input: DeleteCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.campaignArn != null && { campaignArn: input.campaignArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteDatasetGroupRequest - */ -const se_DeleteDatasetGroupRequest = (input: DeleteDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteDatasetRequest - */ -const se_DeleteDatasetRequest = (input: DeleteDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteEventTrackerRequest - */ -const se_DeleteEventTrackerRequest = (input: DeleteEventTrackerRequest, context: __SerdeContext): any => { - return { - ...(input.eventTrackerArn != null && { eventTrackerArn: input.eventTrackerArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteFilterRequest - */ -const se_DeleteFilterRequest = (input: DeleteFilterRequest, context: __SerdeContext): any => { - return { - ...(input.filterArn != null && { filterArn: input.filterArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteMetricAttributionRequest - */ -const se_DeleteMetricAttributionRequest = (input: DeleteMetricAttributionRequest, context: __SerdeContext): any => { - return { - ...(input.metricAttributionArn != null && { metricAttributionArn: input.metricAttributionArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteRecommenderRequest - */ -const se_DeleteRecommenderRequest = (input: DeleteRecommenderRequest, context: __SerdeContext): any => { - return { - ...(input.recommenderArn != null && { recommenderArn: input.recommenderArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteSchemaRequest - */ -const se_DeleteSchemaRequest = (input: DeleteSchemaRequest, context: __SerdeContext): any => { - return { - ...(input.schemaArn != null && { schemaArn: input.schemaArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteSolutionRequest - */ -const se_DeleteSolutionRequest = (input: DeleteSolutionRequest, context: __SerdeContext): any => { - return { - ...(input.solutionArn != null && { solutionArn: input.solutionArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeAlgorithmRequest - */ -const se_DescribeAlgorithmRequest = (input: DescribeAlgorithmRequest, context: __SerdeContext): any => { - return { - ...(input.algorithmArn != null && { algorithmArn: input.algorithmArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeBatchInferenceJobRequest - */ -const se_DescribeBatchInferenceJobRequest = (input: DescribeBatchInferenceJobRequest, context: __SerdeContext): any => { - return { - ...(input.batchInferenceJobArn != null && { batchInferenceJobArn: input.batchInferenceJobArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeBatchSegmentJobRequest - */ -const se_DescribeBatchSegmentJobRequest = (input: DescribeBatchSegmentJobRequest, context: __SerdeContext): any => { - return { - ...(input.batchSegmentJobArn != null && { batchSegmentJobArn: input.batchSegmentJobArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeCampaignRequest - */ -const se_DescribeCampaignRequest = (input: DescribeCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.campaignArn != null && { campaignArn: input.campaignArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeDatasetExportJobRequest - */ -const se_DescribeDatasetExportJobRequest = (input: DescribeDatasetExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.datasetExportJobArn != null && { datasetExportJobArn: input.datasetExportJobArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeDatasetGroupRequest - */ -const se_DescribeDatasetGroupRequest = (input: DescribeDatasetGroupRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeDatasetImportJobRequest - */ -const se_DescribeDatasetImportJobRequest = (input: DescribeDatasetImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.datasetImportJobArn != null && { datasetImportJobArn: input.datasetImportJobArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeDatasetRequest - */ -const se_DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeEventTrackerRequest - */ -const se_DescribeEventTrackerRequest = (input: DescribeEventTrackerRequest, context: __SerdeContext): any => { - return { - ...(input.eventTrackerArn != null && { eventTrackerArn: input.eventTrackerArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeFeatureTransformationRequest - */ -const se_DescribeFeatureTransformationRequest = ( - input: DescribeFeatureTransformationRequest, - context: __SerdeContext -): any => { - return { - ...(input.featureTransformationArn != null && { featureTransformationArn: input.featureTransformationArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeFilterRequest - */ -const se_DescribeFilterRequest = (input: DescribeFilterRequest, context: __SerdeContext): any => { - return { - ...(input.filterArn != null && { filterArn: input.filterArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeMetricAttributionRequest - */ -const se_DescribeMetricAttributionRequest = (input: DescribeMetricAttributionRequest, context: __SerdeContext): any => { - return { - ...(input.metricAttributionArn != null && { metricAttributionArn: input.metricAttributionArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeRecipeRequest - */ -const se_DescribeRecipeRequest = (input: DescribeRecipeRequest, context: __SerdeContext): any => { - return { - ...(input.recipeArn != null && { recipeArn: input.recipeArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeRecommenderRequest - */ -const se_DescribeRecommenderRequest = (input: DescribeRecommenderRequest, context: __SerdeContext): any => { - return { - ...(input.recommenderArn != null && { recommenderArn: input.recommenderArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeSchemaRequest - */ -const se_DescribeSchemaRequest = (input: DescribeSchemaRequest, context: __SerdeContext): any => { - return { - ...(input.schemaArn != null && { schemaArn: input.schemaArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeSolutionRequest - */ -const se_DescribeSolutionRequest = (input: DescribeSolutionRequest, context: __SerdeContext): any => { - return { - ...(input.solutionArn != null && { solutionArn: input.solutionArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeSolutionVersionRequest - */ -const se_DescribeSolutionVersionRequest = (input: DescribeSolutionVersionRequest, context: __SerdeContext): any => { - return { - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - }; -}; - -/** - * serializeAws_json1_1FeatureTransformationParameters - */ -const se_FeatureTransformationParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1GetSolutionMetricsRequest - */ -const se_GetSolutionMetricsRequest = (input: GetSolutionMetricsRequest, context: __SerdeContext): any => { - return { - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - }; -}; - -/** - * serializeAws_json1_1HPOConfig - */ -const se_HPOConfig = (input: HPOConfig, context: __SerdeContext): any => { - return { - ...(input.algorithmHyperParameterRanges != null && { - algorithmHyperParameterRanges: se_HyperParameterRanges(input.algorithmHyperParameterRanges, context), - }), - ...(input.hpoObjective != null && { hpoObjective: se_HPOObjective(input.hpoObjective, context) }), - ...(input.hpoResourceConfig != null && { - hpoResourceConfig: se_HPOResourceConfig(input.hpoResourceConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1HPOObjective - */ -const se_HPOObjective = (input: HPOObjective, context: __SerdeContext): any => { - return { - ...(input.metricName != null && { metricName: input.metricName }), - ...(input.metricRegex != null && { metricRegex: input.metricRegex }), - ...(input.type != null && { type: input.type }), - }; -}; - -/** - * serializeAws_json1_1HPOResourceConfig - */ -const se_HPOResourceConfig = (input: HPOResourceConfig, context: __SerdeContext): any => { - return { - ...(input.maxNumberOfTrainingJobs != null && { maxNumberOfTrainingJobs: input.maxNumberOfTrainingJobs }), - ...(input.maxParallelTrainingJobs != null && { maxParallelTrainingJobs: input.maxParallelTrainingJobs }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterRanges - */ -const se_HyperParameterRanges = (input: HyperParameterRanges, context: __SerdeContext): any => { - return { - ...(input.categoricalHyperParameterRanges != null && { - categoricalHyperParameterRanges: se_CategoricalHyperParameterRanges( - input.categoricalHyperParameterRanges, - context - ), - }), - ...(input.continuousHyperParameterRanges != null && { - continuousHyperParameterRanges: se_ContinuousHyperParameterRanges(input.continuousHyperParameterRanges, context), - }), - ...(input.integerHyperParameterRanges != null && { - integerHyperParameterRanges: se_IntegerHyperParameterRanges(input.integerHyperParameterRanges, context), - }), - }; -}; - -/** - * serializeAws_json1_1HyperParameters - */ -const se_HyperParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1IntegerHyperParameterRange - */ -const se_IntegerHyperParameterRange = (input: IntegerHyperParameterRange, context: __SerdeContext): any => { - return { - ...(input.maxValue != null && { maxValue: input.maxValue }), - ...(input.minValue != null && { minValue: input.minValue }), - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_1IntegerHyperParameterRanges - */ -const se_IntegerHyperParameterRanges = (input: IntegerHyperParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IntegerHyperParameterRange(entry, context); - }); -}; - -/** - * serializeAws_json1_1ListBatchInferenceJobsRequest - */ -const se_ListBatchInferenceJobsRequest = (input: ListBatchInferenceJobsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - }; -}; - -/** - * serializeAws_json1_1ListBatchSegmentJobsRequest - */ -const se_ListBatchSegmentJobsRequest = (input: ListBatchSegmentJobsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - }; -}; - -/** - * serializeAws_json1_1ListCampaignsRequest - */ -const se_ListCampaignsRequest = (input: ListCampaignsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.solutionArn != null && { solutionArn: input.solutionArn }), - }; -}; - -/** - * serializeAws_json1_1ListDatasetExportJobsRequest - */ -const se_ListDatasetExportJobsRequest = (input: ListDatasetExportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDatasetGroupsRequest - */ -const se_ListDatasetGroupsRequest = (input: ListDatasetGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDatasetImportJobsRequest - */ -const se_ListDatasetImportJobsRequest = (input: ListDatasetImportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.datasetArn != null && { datasetArn: input.datasetArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDatasetsRequest - */ -const se_ListDatasetsRequest = (input: ListDatasetsRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEventTrackersRequest - */ -const se_ListEventTrackersRequest = (input: ListEventTrackersRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListFiltersRequest - */ -const se_ListFiltersRequest = (input: ListFiltersRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListMetricAttributionMetricsRequest - */ -const se_ListMetricAttributionMetricsRequest = ( - input: ListMetricAttributionMetricsRequest, - context: __SerdeContext -): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.metricAttributionArn != null && { metricAttributionArn: input.metricAttributionArn }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListMetricAttributionsRequest - */ -const se_ListMetricAttributionsRequest = (input: ListMetricAttributionsRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListRecipesRequest - */ -const se_ListRecipesRequest = (input: ListRecipesRequest, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.recipeProvider != null && { recipeProvider: input.recipeProvider }), - }; -}; - -/** - * serializeAws_json1_1ListRecommendersRequest - */ -const se_ListRecommendersRequest = (input: ListRecommendersRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSchemasRequest - */ -const se_ListSchemasRequest = (input: ListSchemasRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSolutionsRequest - */ -const se_ListSolutionsRequest = (input: ListSolutionsRequest, context: __SerdeContext): any => { - return { - ...(input.datasetGroupArn != null && { datasetGroupArn: input.datasetGroupArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_1ListSolutionVersionsRequest - */ -const se_ListSolutionVersionsRequest = (input: ListSolutionVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.solutionArn != null && { solutionArn: input.solutionArn }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; - -/** - * serializeAws_json1_1MetricAttribute - */ -const se_MetricAttribute = (input: MetricAttribute, context: __SerdeContext): any => { - return { - ...(input.eventType != null && { eventType: input.eventType }), - ...(input.expression != null && { expression: input.expression }), - ...(input.metricName != null && { metricName: input.metricName }), - }; -}; - -/** - * serializeAws_json1_1MetricAttributes - */ -const se_MetricAttributes = (input: MetricAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricAttribute(entry, context); - }); -}; +// se_ArnList omitted. -/** - * serializeAws_json1_1MetricAttributesNamesList - */ -const se_MetricAttributesNamesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutoMLConfig omitted. -/** - * serializeAws_json1_1MetricAttributionOutput - */ -const se_MetricAttributionOutput = (input: MetricAttributionOutput, context: __SerdeContext): any => { - return { - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.s3DataDestination != null && { s3DataDestination: se_S3DataConfig(input.s3DataDestination, context) }), - }; -}; +// se_BatchInferenceJobConfig omitted. -/** - * serializeAws_json1_1OptimizationObjective - */ -const se_OptimizationObjective = (input: OptimizationObjective, context: __SerdeContext): any => { - return { - ...(input.itemAttribute != null && { itemAttribute: input.itemAttribute }), - ...(input.objectiveSensitivity != null && { objectiveSensitivity: input.objectiveSensitivity }), - }; -}; +// se_BatchInferenceJobInput omitted. -/** - * serializeAws_json1_1RecommenderConfig - */ -const se_RecommenderConfig = (input: RecommenderConfig, context: __SerdeContext): any => { - return { - ...(input.itemExplorationConfig != null && { - itemExplorationConfig: se_HyperParameters(input.itemExplorationConfig, context), - }), - ...(input.minRecommendationRequestsPerSecond != null && { - minRecommendationRequestsPerSecond: input.minRecommendationRequestsPerSecond, - }), - }; -}; +// se_BatchInferenceJobOutput omitted. -/** - * serializeAws_json1_1S3DataConfig - */ -const se_S3DataConfig = (input: S3DataConfig, context: __SerdeContext): any => { - return { - ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }), - ...(input.path != null && { path: input.path }), - }; -}; +// se_BatchSegmentJobInput omitted. -/** - * serializeAws_json1_1SolutionConfig - */ -const se_SolutionConfig = (input: SolutionConfig, context: __SerdeContext): any => { - return { - ...(input.algorithmHyperParameters != null && { - algorithmHyperParameters: se_HyperParameters(input.algorithmHyperParameters, context), - }), - ...(input.autoMLConfig != null && { autoMLConfig: se_AutoMLConfig(input.autoMLConfig, context) }), - ...(input.eventValueThreshold != null && { eventValueThreshold: input.eventValueThreshold }), - ...(input.featureTransformationParameters != null && { - featureTransformationParameters: se_FeatureTransformationParameters( - input.featureTransformationParameters, - context - ), - }), - ...(input.hpoConfig != null && { hpoConfig: se_HPOConfig(input.hpoConfig, context) }), - ...(input.optimizationObjective != null && { - optimizationObjective: se_OptimizationObjective(input.optimizationObjective, context), - }), - }; -}; +// se_BatchSegmentJobOutput omitted. -/** - * serializeAws_json1_1StartRecommenderRequest - */ -const se_StartRecommenderRequest = (input: StartRecommenderRequest, context: __SerdeContext): any => { - return { - ...(input.recommenderArn != null && { recommenderArn: input.recommenderArn }), - }; -}; +// se_CampaignConfig omitted. -/** - * serializeAws_json1_1StopRecommenderRequest - */ -const se_StopRecommenderRequest = (input: StopRecommenderRequest, context: __SerdeContext): any => { - return { - ...(input.recommenderArn != null && { recommenderArn: input.recommenderArn }), - }; -}; +// se_CategoricalHyperParameterRange omitted. -/** - * serializeAws_json1_1StopSolutionVersionCreationRequest - */ -const se_StopSolutionVersionCreationRequest = ( - input: StopSolutionVersionCreationRequest, - context: __SerdeContext -): any => { - return { - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - }; -}; +// se_CategoricalHyperParameterRanges omitted. + +// se_CategoricalValues omitted. /** - * serializeAws_json1_1Tag + * serializeAws_json1_1ContinuousHyperParameterRange */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.tagKey != null && { tagKey: input.tagKey }), - ...(input.tagValue != null && { tagValue: input.tagValue }), - }; +const se_ContinuousHyperParameterRange = (input: ContinuousHyperParameterRange, context: __SerdeContext): any => { + return take(input, { + maxValue: __serializeFloat, + minValue: __serializeFloat, + name: [], + }); }; /** - * serializeAws_json1_1TagKeys + * serializeAws_json1_1ContinuousHyperParameterRanges */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { +const se_ContinuousHyperParameterRanges = (input: ContinuousHyperParameterRange[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_ContinuousHyperParameterRange(entry, context); }); }; -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_CreateBatchInferenceJobRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_CreateBatchSegmentJobRequest omitted. + +// se_CreateCampaignRequest omitted. + +// se_CreateDatasetExportJobRequest omitted. + +// se_CreateDatasetGroupRequest omitted. + +// se_CreateDatasetImportJobRequest omitted. + +// se_CreateDatasetRequest omitted. + +// se_CreateEventTrackerRequest omitted. + +// se_CreateFilterRequest omitted. + +// se_CreateMetricAttributionRequest omitted. + +// se_CreateRecommenderRequest omitted. + +// se_CreateSchemaRequest omitted. /** - * serializeAws_json1_1UntagResourceRequest + * serializeAws_json1_1CreateSolutionRequest */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeys(input.tagKeys, context) }), - }; +const se_CreateSolutionRequest = (input: CreateSolutionRequest, context: __SerdeContext): any => { + return take(input, { + datasetGroupArn: [], + eventType: [], + name: [], + performAutoML: [], + performHPO: [], + recipeArn: [], + solutionConfig: (_) => se_SolutionConfig(_, context), + tags: _json, + }); }; +// se_CreateSolutionVersionRequest omitted. + +// se_DatasetExportJobOutput omitted. + +// se_DataSource omitted. + +// se_DeleteCampaignRequest omitted. + +// se_DeleteDatasetGroupRequest omitted. + +// se_DeleteDatasetRequest omitted. + +// se_DeleteEventTrackerRequest omitted. + +// se_DeleteFilterRequest omitted. + +// se_DeleteMetricAttributionRequest omitted. + +// se_DeleteRecommenderRequest omitted. + +// se_DeleteSchemaRequest omitted. + +// se_DeleteSolutionRequest omitted. + +// se_DescribeAlgorithmRequest omitted. + +// se_DescribeBatchInferenceJobRequest omitted. + +// se_DescribeBatchSegmentJobRequest omitted. + +// se_DescribeCampaignRequest omitted. + +// se_DescribeDatasetExportJobRequest omitted. + +// se_DescribeDatasetGroupRequest omitted. + +// se_DescribeDatasetImportJobRequest omitted. + +// se_DescribeDatasetRequest omitted. + +// se_DescribeEventTrackerRequest omitted. + +// se_DescribeFeatureTransformationRequest omitted. + +// se_DescribeFilterRequest omitted. + +// se_DescribeMetricAttributionRequest omitted. + +// se_DescribeRecipeRequest omitted. + +// se_DescribeRecommenderRequest omitted. + +// se_DescribeSchemaRequest omitted. + +// se_DescribeSolutionRequest omitted. + +// se_DescribeSolutionVersionRequest omitted. + +// se_FeatureTransformationParameters omitted. + +// se_GetSolutionMetricsRequest omitted. + /** - * serializeAws_json1_1UpdateCampaignRequest + * serializeAws_json1_1HPOConfig */ -const se_UpdateCampaignRequest = (input: UpdateCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.campaignArn != null && { campaignArn: input.campaignArn }), - ...(input.campaignConfig != null && { campaignConfig: se_CampaignConfig(input.campaignConfig, context) }), - ...(input.minProvisionedTPS != null && { minProvisionedTPS: input.minProvisionedTPS }), - ...(input.solutionVersionArn != null && { solutionVersionArn: input.solutionVersionArn }), - }; +const se_HPOConfig = (input: HPOConfig, context: __SerdeContext): any => { + return take(input, { + algorithmHyperParameterRanges: (_) => se_HyperParameterRanges(_, context), + hpoObjective: _json, + hpoResourceConfig: _json, + }); }; +// se_HPOObjective omitted. + +// se_HPOResourceConfig omitted. + /** - * serializeAws_json1_1UpdateMetricAttributionRequest + * serializeAws_json1_1HyperParameterRanges */ -const se_UpdateMetricAttributionRequest = (input: UpdateMetricAttributionRequest, context: __SerdeContext): any => { - return { - ...(input.addMetrics != null && { addMetrics: se_MetricAttributes(input.addMetrics, context) }), - ...(input.metricAttributionArn != null && { metricAttributionArn: input.metricAttributionArn }), - ...(input.metricsOutputConfig != null && { - metricsOutputConfig: se_MetricAttributionOutput(input.metricsOutputConfig, context), - }), - ...(input.removeMetrics != null && { removeMetrics: se_MetricAttributesNamesList(input.removeMetrics, context) }), - }; +const se_HyperParameterRanges = (input: HyperParameterRanges, context: __SerdeContext): any => { + return take(input, { + categoricalHyperParameterRanges: _json, + continuousHyperParameterRanges: (_) => se_ContinuousHyperParameterRanges(_, context), + integerHyperParameterRanges: _json, + }); }; +// se_HyperParameters omitted. + +// se_IntegerHyperParameterRange omitted. + +// se_IntegerHyperParameterRanges omitted. + +// se_ListBatchInferenceJobsRequest omitted. + +// se_ListBatchSegmentJobsRequest omitted. + +// se_ListCampaignsRequest omitted. + +// se_ListDatasetExportJobsRequest omitted. + +// se_ListDatasetGroupsRequest omitted. + +// se_ListDatasetImportJobsRequest omitted. + +// se_ListDatasetsRequest omitted. + +// se_ListEventTrackersRequest omitted. + +// se_ListFiltersRequest omitted. + +// se_ListMetricAttributionMetricsRequest omitted. + +// se_ListMetricAttributionsRequest omitted. + +// se_ListRecipesRequest omitted. + +// se_ListRecommendersRequest omitted. + +// se_ListSchemasRequest omitted. + +// se_ListSolutionsRequest omitted. + +// se_ListSolutionVersionsRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_MetricAttribute omitted. + +// se_MetricAttributes omitted. + +// se_MetricAttributesNamesList omitted. + +// se_MetricAttributionOutput omitted. + +// se_OptimizationObjective omitted. + +// se_RecommenderConfig omitted. + +// se_S3DataConfig omitted. + /** - * serializeAws_json1_1UpdateRecommenderRequest + * serializeAws_json1_1SolutionConfig */ -const se_UpdateRecommenderRequest = (input: UpdateRecommenderRequest, context: __SerdeContext): any => { - return { - ...(input.recommenderArn != null && { recommenderArn: input.recommenderArn }), - ...(input.recommenderConfig != null && { - recommenderConfig: se_RecommenderConfig(input.recommenderConfig, context), - }), - }; +const se_SolutionConfig = (input: SolutionConfig, context: __SerdeContext): any => { + return take(input, { + algorithmHyperParameters: _json, + autoMLConfig: _json, + eventValueThreshold: [], + featureTransformationParameters: _json, + hpoConfig: (_) => se_HPOConfig(_, context), + optimizationObjective: _json, + }); }; +// se_StartRecommenderRequest omitted. + +// se_StopRecommenderRequest omitted. + +// se_StopSolutionVersionCreationRequest omitted. + +// se_Tag omitted. + +// se_TagKeys omitted. + +// se_TagResourceRequest omitted. + +// se_Tags omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateCampaignRequest omitted. + +// se_UpdateMetricAttributionRequest omitted. + +// se_UpdateRecommenderRequest omitted. + /** * deserializeAws_json1_1Algorithm */ const de_Algorithm = (output: any, context: __SerdeContext): Algorithm => { - return { - algorithmArn: __expectString(output.algorithmArn), - algorithmImage: output.algorithmImage != null ? de_AlgorithmImage(output.algorithmImage, context) : undefined, - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - defaultHyperParameterRanges: - output.defaultHyperParameterRanges != null - ? de_DefaultHyperParameterRanges(output.defaultHyperParameterRanges, context) - : undefined, - defaultHyperParameters: - output.defaultHyperParameters != null ? de_HyperParameters(output.defaultHyperParameters, context) : undefined, - defaultResourceConfig: - output.defaultResourceConfig != null ? de_ResourceConfig(output.defaultResourceConfig, context) : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - trainingInputMode: __expectString(output.trainingInputMode), - } as any; -}; - -/** - * deserializeAws_json1_1AlgorithmImage - */ -const de_AlgorithmImage = (output: any, context: __SerdeContext): AlgorithmImage => { - return { - dockerURI: __expectString(output.dockerURI), - name: __expectString(output.name), - } as any; + return take(output, { + algorithmArn: __expectString, + algorithmImage: _json, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultHyperParameterRanges: (_: any) => de_DefaultHyperParameterRanges(_, context), + defaultHyperParameters: _json, + defaultResourceConfig: _json, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + roleArn: __expectString, + trainingInputMode: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AlgorithmImage omitted. -/** - * deserializeAws_json1_1AutoMLConfig - */ -const de_AutoMLConfig = (output: any, context: __SerdeContext): AutoMLConfig => { - return { - metricName: __expectString(output.metricName), - recipeList: output.recipeList != null ? de_ArnList(output.recipeList, context) : undefined, - } as any; -}; +// de_ArnList omitted. -/** - * deserializeAws_json1_1AutoMLResult - */ -const de_AutoMLResult = (output: any, context: __SerdeContext): AutoMLResult => { - return { - bestRecipeArn: __expectString(output.bestRecipeArn), - } as any; -}; +// de_AutoMLConfig omitted. + +// de_AutoMLResult omitted. /** * deserializeAws_json1_1BatchInferenceJob */ const de_BatchInferenceJob = (output: any, context: __SerdeContext): BatchInferenceJob => { - return { - batchInferenceJobArn: __expectString(output.batchInferenceJobArn), - batchInferenceJobConfig: - output.batchInferenceJobConfig != null - ? de_BatchInferenceJobConfig(output.batchInferenceJobConfig, context) - : undefined, - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - filterArn: __expectString(output.filterArn), - jobInput: output.jobInput != null ? de_BatchInferenceJobInput(output.jobInput, context) : undefined, - jobName: __expectString(output.jobName), - jobOutput: output.jobOutput != null ? de_BatchInferenceJobOutput(output.jobOutput, context) : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - numResults: __expectInt32(output.numResults), - roleArn: __expectString(output.roleArn), - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1BatchInferenceJobConfig - */ -const de_BatchInferenceJobConfig = (output: any, context: __SerdeContext): BatchInferenceJobConfig => { - return { - itemExplorationConfig: - output.itemExplorationConfig != null ? de_HyperParameters(output.itemExplorationConfig, context) : undefined, - } as any; + return take(output, { + batchInferenceJobArn: __expectString, + batchInferenceJobConfig: _json, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + filterArn: __expectString, + jobInput: _json, + jobName: __expectString, + jobOutput: _json, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + numResults: __expectInt32, + roleArn: __expectString, + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1BatchInferenceJobInput - */ -const de_BatchInferenceJobInput = (output: any, context: __SerdeContext): BatchInferenceJobInput => { - return { - s3DataSource: output.s3DataSource != null ? de_S3DataConfig(output.s3DataSource, context) : undefined, - } as any; -}; +// de_BatchInferenceJobConfig omitted. -/** - * deserializeAws_json1_1BatchInferenceJobOutput - */ -const de_BatchInferenceJobOutput = (output: any, context: __SerdeContext): BatchInferenceJobOutput => { - return { - s3DataDestination: - output.s3DataDestination != null ? de_S3DataConfig(output.s3DataDestination, context) : undefined, - } as any; -}; +// de_BatchInferenceJobInput omitted. + +// de_BatchInferenceJobOutput omitted. /** * deserializeAws_json1_1BatchInferenceJobs @@ -6076,9 +5063,6 @@ const de_BatchInferenceJobs = (output: any, context: __SerdeContext): BatchInfer const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchInferenceJobSummary(entry, context); }); return retVal; @@ -6088,67 +5072,40 @@ const de_BatchInferenceJobs = (output: any, context: __SerdeContext): BatchInfer * deserializeAws_json1_1BatchInferenceJobSummary */ const de_BatchInferenceJobSummary = (output: any, context: __SerdeContext): BatchInferenceJobSummary => { - return { - batchInferenceJobArn: __expectString(output.batchInferenceJobArn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - jobName: __expectString(output.jobName), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; + return take(output, { + batchInferenceJobArn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + jobName: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1BatchSegmentJob */ const de_BatchSegmentJob = (output: any, context: __SerdeContext): BatchSegmentJob => { - return { - batchSegmentJobArn: __expectString(output.batchSegmentJobArn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - filterArn: __expectString(output.filterArn), - jobInput: output.jobInput != null ? de_BatchSegmentJobInput(output.jobInput, context) : undefined, - jobName: __expectString(output.jobName), - jobOutput: output.jobOutput != null ? de_BatchSegmentJobOutput(output.jobOutput, context) : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - numResults: __expectInt32(output.numResults), - roleArn: __expectString(output.roleArn), - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1BatchSegmentJobInput - */ -const de_BatchSegmentJobInput = (output: any, context: __SerdeContext): BatchSegmentJobInput => { - return { - s3DataSource: output.s3DataSource != null ? de_S3DataConfig(output.s3DataSource, context) : undefined, - } as any; + return take(output, { + batchSegmentJobArn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + filterArn: __expectString, + jobInput: _json, + jobName: __expectString, + jobOutput: _json, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + numResults: __expectInt32, + roleArn: __expectString, + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1BatchSegmentJobOutput - */ -const de_BatchSegmentJobOutput = (output: any, context: __SerdeContext): BatchSegmentJobOutput => { - return { - s3DataDestination: - output.s3DataDestination != null ? de_S3DataConfig(output.s3DataDestination, context) : undefined, - } as any; -}; +// de_BatchSegmentJobInput omitted. + +// de_BatchSegmentJobOutput omitted. /** * deserializeAws_json1_1BatchSegmentJobs @@ -6157,9 +5114,6 @@ const de_BatchSegmentJobs = (output: any, context: __SerdeContext): BatchSegment const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchSegmentJobSummary(entry, context); }); return retVal; @@ -6169,58 +5123,37 @@ const de_BatchSegmentJobs = (output: any, context: __SerdeContext): BatchSegment * deserializeAws_json1_1BatchSegmentJobSummary */ const de_BatchSegmentJobSummary = (output: any, context: __SerdeContext): BatchSegmentJobSummary => { - return { - batchSegmentJobArn: __expectString(output.batchSegmentJobArn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - jobName: __expectString(output.jobName), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; + return take(output, { + batchSegmentJobArn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + jobName: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1Campaign */ const de_Campaign = (output: any, context: __SerdeContext): Campaign => { - return { - campaignArn: __expectString(output.campaignArn), - campaignConfig: output.campaignConfig != null ? de_CampaignConfig(output.campaignConfig, context) : undefined, - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - latestCampaignUpdate: - output.latestCampaignUpdate != null ? de_CampaignUpdateSummary(output.latestCampaignUpdate, context) : undefined, - minProvisionedTPS: __expectInt32(output.minProvisionedTPS), - name: __expectString(output.name), - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1CampaignConfig - */ -const de_CampaignConfig = (output: any, context: __SerdeContext): CampaignConfig => { - return { - itemExplorationConfig: - output.itemExplorationConfig != null ? de_HyperParameters(output.itemExplorationConfig, context) : undefined, - } as any; + return take(output, { + campaignArn: __expectString, + campaignConfig: _json, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestCampaignUpdate: (_: any) => de_CampaignUpdateSummary(_, context), + minProvisionedTPS: __expectInt32, + name: __expectString, + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; +// de_CampaignConfig omitted. + /** * deserializeAws_json1_1Campaigns */ @@ -6228,9 +5161,6 @@ const de_Campaigns = (output: any, context: __SerdeContext): CampaignSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CampaignSummary(entry, context); }); return retVal; @@ -6240,92 +5170,46 @@ const de_Campaigns = (output: any, context: __SerdeContext): CampaignSummary[] = * deserializeAws_json1_1CampaignSummary */ const de_CampaignSummary = (output: any, context: __SerdeContext): CampaignSummary => { - return { - campaignArn: __expectString(output.campaignArn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + campaignArn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1CampaignUpdateSummary */ const de_CampaignUpdateSummary = (output: any, context: __SerdeContext): CampaignUpdateSummary => { - return { - campaignConfig: output.campaignConfig != null ? de_CampaignConfig(output.campaignConfig, context) : undefined, - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - minProvisionedTPS: __expectInt32(output.minProvisionedTPS), - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1CategoricalHyperParameterRange - */ -const de_CategoricalHyperParameterRange = (output: any, context: __SerdeContext): CategoricalHyperParameterRange => { - return { - name: __expectString(output.name), - values: output.values != null ? de_CategoricalValues(output.values, context) : undefined, - } as any; + return take(output, { + campaignConfig: _json, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + minProvisionedTPS: __expectInt32, + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1CategoricalHyperParameterRanges - */ -const de_CategoricalHyperParameterRanges = (output: any, context: __SerdeContext): CategoricalHyperParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CategoricalHyperParameterRange(entry, context); - }); - return retVal; -}; +// de_CategoricalHyperParameterRange omitted. -/** - * deserializeAws_json1_1CategoricalValues - */ -const de_CategoricalValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CategoricalHyperParameterRanges omitted. + +// de_CategoricalValues omitted. /** * deserializeAws_json1_1ContinuousHyperParameterRange */ const de_ContinuousHyperParameterRange = (output: any, context: __SerdeContext): ContinuousHyperParameterRange => { - return { - maxValue: __limitedParseDouble(output.maxValue), - minValue: __limitedParseDouble(output.minValue), - name: __expectString(output.name), - } as any; + return take(output, { + maxValue: __limitedParseDouble, + minValue: __limitedParseDouble, + name: __expectString, + }) as any; }; /** @@ -6335,198 +5219,75 @@ const de_ContinuousHyperParameterRanges = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContinuousHyperParameterRange(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CreateBatchInferenceJobResponse - */ -const de_CreateBatchInferenceJobResponse = (output: any, context: __SerdeContext): CreateBatchInferenceJobResponse => { - return { - batchInferenceJobArn: __expectString(output.batchInferenceJobArn), - } as any; -}; +// de_CreateBatchInferenceJobResponse omitted. -/** - * deserializeAws_json1_1CreateBatchSegmentJobResponse - */ -const de_CreateBatchSegmentJobResponse = (output: any, context: __SerdeContext): CreateBatchSegmentJobResponse => { - return { - batchSegmentJobArn: __expectString(output.batchSegmentJobArn), - } as any; -}; +// de_CreateBatchSegmentJobResponse omitted. -/** - * deserializeAws_json1_1CreateCampaignResponse - */ -const de_CreateCampaignResponse = (output: any, context: __SerdeContext): CreateCampaignResponse => { - return { - campaignArn: __expectString(output.campaignArn), - } as any; -}; +// de_CreateCampaignResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetExportJobResponse - */ -const de_CreateDatasetExportJobResponse = (output: any, context: __SerdeContext): CreateDatasetExportJobResponse => { - return { - datasetExportJobArn: __expectString(output.datasetExportJobArn), - } as any; -}; +// de_CreateDatasetExportJobResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetGroupResponse - */ -const de_CreateDatasetGroupResponse = (output: any, context: __SerdeContext): CreateDatasetGroupResponse => { - return { - datasetGroupArn: __expectString(output.datasetGroupArn), - domain: __expectString(output.domain), - } as any; -}; +// de_CreateDatasetGroupResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetImportJobResponse - */ -const de_CreateDatasetImportJobResponse = (output: any, context: __SerdeContext): CreateDatasetImportJobResponse => { - return { - datasetImportJobArn: __expectString(output.datasetImportJobArn), - } as any; -}; +// de_CreateDatasetImportJobResponse omitted. -/** - * deserializeAws_json1_1CreateDatasetResponse - */ -const de_CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => { - return { - datasetArn: __expectString(output.datasetArn), - } as any; -}; +// de_CreateDatasetResponse omitted. -/** - * deserializeAws_json1_1CreateEventTrackerResponse - */ -const de_CreateEventTrackerResponse = (output: any, context: __SerdeContext): CreateEventTrackerResponse => { - return { - eventTrackerArn: __expectString(output.eventTrackerArn), - trackingId: __expectString(output.trackingId), - } as any; -}; +// de_CreateEventTrackerResponse omitted. -/** - * deserializeAws_json1_1CreateFilterResponse - */ -const de_CreateFilterResponse = (output: any, context: __SerdeContext): CreateFilterResponse => { - return { - filterArn: __expectString(output.filterArn), - } as any; -}; +// de_CreateFilterResponse omitted. -/** - * deserializeAws_json1_1CreateMetricAttributionResponse - */ -const de_CreateMetricAttributionResponse = (output: any, context: __SerdeContext): CreateMetricAttributionResponse => { - return { - metricAttributionArn: __expectString(output.metricAttributionArn), - } as any; -}; +// de_CreateMetricAttributionResponse omitted. -/** - * deserializeAws_json1_1CreateRecommenderResponse - */ -const de_CreateRecommenderResponse = (output: any, context: __SerdeContext): CreateRecommenderResponse => { - return { - recommenderArn: __expectString(output.recommenderArn), - } as any; -}; +// de_CreateRecommenderResponse omitted. -/** - * deserializeAws_json1_1CreateSchemaResponse - */ -const de_CreateSchemaResponse = (output: any, context: __SerdeContext): CreateSchemaResponse => { - return { - schemaArn: __expectString(output.schemaArn), - } as any; -}; +// de_CreateSchemaResponse omitted. -/** - * deserializeAws_json1_1CreateSolutionResponse - */ -const de_CreateSolutionResponse = (output: any, context: __SerdeContext): CreateSolutionResponse => { - return { - solutionArn: __expectString(output.solutionArn), - } as any; -}; +// de_CreateSolutionResponse omitted. -/** - * deserializeAws_json1_1CreateSolutionVersionResponse - */ -const de_CreateSolutionVersionResponse = (output: any, context: __SerdeContext): CreateSolutionVersionResponse => { - return { - solutionVersionArn: __expectString(output.solutionVersionArn), - } as any; -}; +// de_CreateSolutionVersionResponse omitted. /** * deserializeAws_json1_1Dataset */ const de_Dataset = (output: any, context: __SerdeContext): Dataset => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetArn: __expectString(output.datasetArn), - datasetGroupArn: __expectString(output.datasetGroupArn), - datasetType: __expectString(output.datasetType), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - schemaArn: __expectString(output.schemaArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetArn: __expectString, + datasetGroupArn: __expectString, + datasetType: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + schemaArn: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DatasetExportJob */ -const de_DatasetExportJob = (output: any, context: __SerdeContext): DatasetExportJob => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetArn: __expectString(output.datasetArn), - datasetExportJobArn: __expectString(output.datasetExportJobArn), - failureReason: __expectString(output.failureReason), - ingestionMode: __expectString(output.ingestionMode), - jobName: __expectString(output.jobName), - jobOutput: output.jobOutput != null ? de_DatasetExportJobOutput(output.jobOutput, context) : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1DatasetExportJobOutput - */ -const de_DatasetExportJobOutput = (output: any, context: __SerdeContext): DatasetExportJobOutput => { - return { - s3DataDestination: - output.s3DataDestination != null ? de_S3DataConfig(output.s3DataDestination, context) : undefined, - } as any; +const de_DatasetExportJob = (output: any, context: __SerdeContext): DatasetExportJob => { + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetArn: __expectString, + datasetExportJobArn: __expectString, + failureReason: __expectString, + ingestionMode: __expectString, + jobName: __expectString, + jobOutput: _json, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + status: __expectString, + }) as any; }; +// de_DatasetExportJobOutput omitted. + /** * deserializeAws_json1_1DatasetExportJobs */ @@ -6534,9 +5295,6 @@ const de_DatasetExportJobs = (output: any, context: __SerdeContext): DatasetExpo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetExportJobSummary(entry, context); }); return retVal; @@ -6546,43 +5304,31 @@ const de_DatasetExportJobs = (output: any, context: __SerdeContext): DatasetExpo * deserializeAws_json1_1DatasetExportJobSummary */ const de_DatasetExportJobSummary = (output: any, context: __SerdeContext): DatasetExportJobSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetExportJobArn: __expectString(output.datasetExportJobArn), - failureReason: __expectString(output.failureReason), - jobName: __expectString(output.jobName), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetExportJobArn: __expectString, + failureReason: __expectString, + jobName: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DatasetGroup */ const de_DatasetGroup = (output: any, context: __SerdeContext): DatasetGroup => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - domain: __expectString(output.domain), - failureReason: __expectString(output.failureReason), - kmsKeyArn: __expectString(output.kmsKeyArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + domain: __expectString, + failureReason: __expectString, + kmsKeyArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + roleArn: __expectString, + status: __expectString, + }) as any; }; /** @@ -6592,9 +5338,6 @@ const de_DatasetGroups = (output: any, context: __SerdeContext): DatasetGroupSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetGroupSummary(entry, context); }); return retVal; @@ -6604,46 +5347,34 @@ const de_DatasetGroups = (output: any, context: __SerdeContext): DatasetGroupSum * deserializeAws_json1_1DatasetGroupSummary */ const de_DatasetGroupSummary = (output: any, context: __SerdeContext): DatasetGroupSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - domain: __expectString(output.domain), - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + domain: __expectString, + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1DatasetImportJob */ const de_DatasetImportJob = (output: any, context: __SerdeContext): DatasetImportJob => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - dataSource: output.dataSource != null ? de_DataSource(output.dataSource, context) : undefined, - datasetArn: __expectString(output.datasetArn), - datasetImportJobArn: __expectString(output.datasetImportJobArn), - failureReason: __expectString(output.failureReason), - importMode: __expectString(output.importMode), - jobName: __expectString(output.jobName), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - publishAttributionMetricsToS3: __expectBoolean(output.publishAttributionMetricsToS3), - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataSource: _json, + datasetArn: __expectString, + datasetImportJobArn: __expectString, + failureReason: __expectString, + importMode: __expectString, + jobName: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + publishAttributionMetricsToS3: __expectBoolean, + roleArn: __expectString, + status: __expectString, + }) as any; }; /** @@ -6653,9 +5384,6 @@ const de_DatasetImportJobs = (output: any, context: __SerdeContext): DatasetImpo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetImportJobSummary(entry, context); }); return retVal; @@ -6665,21 +5393,15 @@ const de_DatasetImportJobs = (output: any, context: __SerdeContext): DatasetImpo * deserializeAws_json1_1DatasetImportJobSummary */ const de_DatasetImportJobSummary = (output: any, context: __SerdeContext): DatasetImportJobSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetImportJobArn: __expectString(output.datasetImportJobArn), - failureReason: __expectString(output.failureReason), - importMode: __expectString(output.importMode), - jobName: __expectString(output.jobName), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetImportJobArn: __expectString, + failureReason: __expectString, + importMode: __expectString, + jobName: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; /** @@ -6689,9 +5411,6 @@ const de_Datasets = (output: any, context: __SerdeContext): DatasetSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetSummary(entry, context); }); return retVal; @@ -6701,101 +5420,48 @@ const de_Datasets = (output: any, context: __SerdeContext): DatasetSummary[] => * deserializeAws_json1_1DatasetSchema */ const de_DatasetSchema = (output: any, context: __SerdeContext): DatasetSchema => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - domain: __expectString(output.domain), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - schema: __expectString(output.schema), - schemaArn: __expectString(output.schemaArn), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + domain: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + schema: __expectString, + schemaArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1DatasetSchemaSummary */ const de_DatasetSchemaSummary = (output: any, context: __SerdeContext): DatasetSchemaSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - domain: __expectString(output.domain), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - schemaArn: __expectString(output.schemaArn), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + domain: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + schemaArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1DatasetSummary */ const de_DatasetSummary = (output: any, context: __SerdeContext): DatasetSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetArn: __expectString(output.datasetArn), - datasetType: __expectString(output.datasetType), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetArn: __expectString, + datasetType: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - dataLocation: __expectString(output.dataLocation), - } as any; -}; +// de_DataSource omitted. -/** - * deserializeAws_json1_1DefaultCategoricalHyperParameterRange - */ -const de_DefaultCategoricalHyperParameterRange = ( - output: any, - context: __SerdeContext -): DefaultCategoricalHyperParameterRange => { - return { - isTunable: __expectBoolean(output.isTunable), - name: __expectString(output.name), - values: output.values != null ? de_CategoricalValues(output.values, context) : undefined, - } as any; -}; +// de_DefaultCategoricalHyperParameterRange omitted. -/** - * deserializeAws_json1_1DefaultCategoricalHyperParameterRanges - */ -const de_DefaultCategoricalHyperParameterRanges = ( - output: any, - context: __SerdeContext -): DefaultCategoricalHyperParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DefaultCategoricalHyperParameterRange(entry, context); - }); - return retVal; -}; +// de_DefaultCategoricalHyperParameterRanges omitted. /** * deserializeAws_json1_1DefaultContinuousHyperParameterRange @@ -6804,12 +5470,12 @@ const de_DefaultContinuousHyperParameterRange = ( output: any, context: __SerdeContext ): DefaultContinuousHyperParameterRange => { - return { - isTunable: __expectBoolean(output.isTunable), - maxValue: __limitedParseDouble(output.maxValue), - minValue: __limitedParseDouble(output.minValue), - name: __expectString(output.name), - } as any; + return take(output, { + isTunable: __expectBoolean, + maxValue: __limitedParseDouble, + minValue: __limitedParseDouble, + name: __expectString, + }) as any; }; /** @@ -6822,9 +5488,6 @@ const de_DefaultContinuousHyperParameterRanges = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DefaultContinuousHyperParameterRange(entry, context); }); return retVal; @@ -6834,62 +5497,24 @@ const de_DefaultContinuousHyperParameterRanges = ( * deserializeAws_json1_1DefaultHyperParameterRanges */ const de_DefaultHyperParameterRanges = (output: any, context: __SerdeContext): DefaultHyperParameterRanges => { - return { - categoricalHyperParameterRanges: - output.categoricalHyperParameterRanges != null - ? de_DefaultCategoricalHyperParameterRanges(output.categoricalHyperParameterRanges, context) - : undefined, - continuousHyperParameterRanges: - output.continuousHyperParameterRanges != null - ? de_DefaultContinuousHyperParameterRanges(output.continuousHyperParameterRanges, context) - : undefined, - integerHyperParameterRanges: - output.integerHyperParameterRanges != null - ? de_DefaultIntegerHyperParameterRanges(output.integerHyperParameterRanges, context) - : undefined, - } as any; + return take(output, { + categoricalHyperParameterRanges: _json, + continuousHyperParameterRanges: (_: any) => de_DefaultContinuousHyperParameterRanges(_, context), + integerHyperParameterRanges: _json, + }) as any; }; -/** - * deserializeAws_json1_1DefaultIntegerHyperParameterRange - */ -const de_DefaultIntegerHyperParameterRange = ( - output: any, - context: __SerdeContext -): DefaultIntegerHyperParameterRange => { - return { - isTunable: __expectBoolean(output.isTunable), - maxValue: __expectInt32(output.maxValue), - minValue: __expectInt32(output.minValue), - name: __expectString(output.name), - } as any; -}; +// de_DefaultIntegerHyperParameterRange omitted. -/** - * deserializeAws_json1_1DefaultIntegerHyperParameterRanges - */ -const de_DefaultIntegerHyperParameterRanges = ( - output: any, - context: __SerdeContext -): DefaultIntegerHyperParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DefaultIntegerHyperParameterRange(entry, context); - }); - return retVal; -}; +// de_DefaultIntegerHyperParameterRanges omitted. /** * deserializeAws_json1_1DescribeAlgorithmResponse */ const de_DescribeAlgorithmResponse = (output: any, context: __SerdeContext): DescribeAlgorithmResponse => { - return { - algorithm: output.algorithm != null ? de_Algorithm(output.algorithm, context) : undefined, - } as any; + return take(output, { + algorithm: (_: any) => de_Algorithm(_, context), + }) as any; }; /** @@ -6899,28 +5524,27 @@ const de_DescribeBatchInferenceJobResponse = ( output: any, context: __SerdeContext ): DescribeBatchInferenceJobResponse => { - return { - batchInferenceJob: - output.batchInferenceJob != null ? de_BatchInferenceJob(output.batchInferenceJob, context) : undefined, - } as any; + return take(output, { + batchInferenceJob: (_: any) => de_BatchInferenceJob(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeBatchSegmentJobResponse */ const de_DescribeBatchSegmentJobResponse = (output: any, context: __SerdeContext): DescribeBatchSegmentJobResponse => { - return { - batchSegmentJob: output.batchSegmentJob != null ? de_BatchSegmentJob(output.batchSegmentJob, context) : undefined, - } as any; + return take(output, { + batchSegmentJob: (_: any) => de_BatchSegmentJob(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeCampaignResponse */ const de_DescribeCampaignResponse = (output: any, context: __SerdeContext): DescribeCampaignResponse => { - return { - campaign: output.campaign != null ? de_Campaign(output.campaign, context) : undefined, - } as any; + return take(output, { + campaign: (_: any) => de_Campaign(_, context), + }) as any; }; /** @@ -6930,19 +5554,18 @@ const de_DescribeDatasetExportJobResponse = ( output: any, context: __SerdeContext ): DescribeDatasetExportJobResponse => { - return { - datasetExportJob: - output.datasetExportJob != null ? de_DatasetExportJob(output.datasetExportJob, context) : undefined, - } as any; + return take(output, { + datasetExportJob: (_: any) => de_DatasetExportJob(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeDatasetGroupResponse */ const de_DescribeDatasetGroupResponse = (output: any, context: __SerdeContext): DescribeDatasetGroupResponse => { - return { - datasetGroup: output.datasetGroup != null ? de_DatasetGroup(output.datasetGroup, context) : undefined, - } as any; + return take(output, { + datasetGroup: (_: any) => de_DatasetGroup(_, context), + }) as any; }; /** @@ -6952,28 +5575,27 @@ const de_DescribeDatasetImportJobResponse = ( output: any, context: __SerdeContext ): DescribeDatasetImportJobResponse => { - return { - datasetImportJob: - output.datasetImportJob != null ? de_DatasetImportJob(output.datasetImportJob, context) : undefined, - } as any; + return take(output, { + datasetImportJob: (_: any) => de_DatasetImportJob(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeDatasetResponse */ const de_DescribeDatasetResponse = (output: any, context: __SerdeContext): DescribeDatasetResponse => { - return { - dataset: output.dataset != null ? de_Dataset(output.dataset, context) : undefined, - } as any; + return take(output, { + dataset: (_: any) => de_Dataset(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeEventTrackerResponse */ const de_DescribeEventTrackerResponse = (output: any, context: __SerdeContext): DescribeEventTrackerResponse => { - return { - eventTracker: output.eventTracker != null ? de_EventTracker(output.eventTracker, context) : undefined, - } as any; + return take(output, { + eventTracker: (_: any) => de_EventTracker(_, context), + }) as any; }; /** @@ -6983,21 +5605,18 @@ const de_DescribeFeatureTransformationResponse = ( output: any, context: __SerdeContext ): DescribeFeatureTransformationResponse => { - return { - featureTransformation: - output.featureTransformation != null - ? de_FeatureTransformation(output.featureTransformation, context) - : undefined, - } as any; + return take(output, { + featureTransformation: (_: any) => de_FeatureTransformation(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeFilterResponse */ const de_DescribeFilterResponse = (output: any, context: __SerdeContext): DescribeFilterResponse => { - return { - filter: output.filter != null ? de_Filter(output.filter, context) : undefined, - } as any; + return take(output, { + filter: (_: any) => de_Filter(_, context), + }) as any; }; /** @@ -7007,77 +5626,70 @@ const de_DescribeMetricAttributionResponse = ( output: any, context: __SerdeContext ): DescribeMetricAttributionResponse => { - return { - metricAttribution: - output.metricAttribution != null ? de_MetricAttribution(output.metricAttribution, context) : undefined, - } as any; + return take(output, { + metricAttribution: (_: any) => de_MetricAttribution(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeRecipeResponse */ const de_DescribeRecipeResponse = (output: any, context: __SerdeContext): DescribeRecipeResponse => { - return { - recipe: output.recipe != null ? de_Recipe(output.recipe, context) : undefined, - } as any; + return take(output, { + recipe: (_: any) => de_Recipe(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeRecommenderResponse */ const de_DescribeRecommenderResponse = (output: any, context: __SerdeContext): DescribeRecommenderResponse => { - return { - recommender: output.recommender != null ? de_Recommender(output.recommender, context) : undefined, - } as any; + return take(output, { + recommender: (_: any) => de_Recommender(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSchemaResponse */ const de_DescribeSchemaResponse = (output: any, context: __SerdeContext): DescribeSchemaResponse => { - return { - schema: output.schema != null ? de_DatasetSchema(output.schema, context) : undefined, - } as any; + return take(output, { + schema: (_: any) => de_DatasetSchema(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSolutionResponse */ const de_DescribeSolutionResponse = (output: any, context: __SerdeContext): DescribeSolutionResponse => { - return { - solution: output.solution != null ? de_Solution(output.solution, context) : undefined, - } as any; + return take(output, { + solution: (_: any) => de_Solution(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeSolutionVersionResponse */ const de_DescribeSolutionVersionResponse = (output: any, context: __SerdeContext): DescribeSolutionVersionResponse => { - return { - solutionVersion: output.solutionVersion != null ? de_SolutionVersion(output.solutionVersion, context) : undefined, - } as any; + return take(output, { + solutionVersion: (_: any) => de_SolutionVersion(_, context), + }) as any; }; /** * deserializeAws_json1_1EventTracker */ const de_EventTracker = (output: any, context: __SerdeContext): EventTracker => { - return { - accountId: __expectString(output.accountId), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - eventTrackerArn: __expectString(output.eventTrackerArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - trackingId: __expectString(output.trackingId), - } as any; + return take(output, { + accountId: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + eventTrackerArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + trackingId: __expectString, + }) as any; }; /** @@ -7087,9 +5699,6 @@ const de_EventTrackers = (output: any, context: __SerdeContext): EventTrackerSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventTrackerSummary(entry, context); }); return retVal; @@ -7099,88 +5708,47 @@ const de_EventTrackers = (output: any, context: __SerdeContext): EventTrackerSum * deserializeAws_json1_1EventTrackerSummary */ const de_EventTrackerSummary = (output: any, context: __SerdeContext): EventTrackerSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - eventTrackerArn: __expectString(output.eventTrackerArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventTrackerArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1FeatureTransformation */ const de_FeatureTransformation = (output: any, context: __SerdeContext): FeatureTransformation => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - defaultParameters: - output.defaultParameters != null ? de_FeaturizationParameters(output.defaultParameters, context) : undefined, - featureTransformationArn: __expectString(output.featureTransformationArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1FeatureTransformationParameters - */ -const de_FeatureTransformationParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultParameters: _json, + featureTransformationArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1FeaturizationParameters - */ -const de_FeaturizationParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FeatureTransformationParameters omitted. + +// de_FeaturizationParameters omitted. /** * deserializeAws_json1_1Filter */ const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - failureReason: __expectString(output.failureReason), - filterArn: __expectString(output.filterArn), - filterExpression: __expectString(output.filterExpression), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + failureReason: __expectString, + filterArn: __expectString, + filterExpression: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; /** @@ -7190,9 +5758,6 @@ const de_Filters = (output: any, context: __SerdeContext): FilterSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FilterSummary(entry, context); }); return retVal; @@ -7202,393 +5767,241 @@ const de_Filters = (output: any, context: __SerdeContext): FilterSummary[] => { * deserializeAws_json1_1FilterSummary */ const de_FilterSummary = (output: any, context: __SerdeContext): FilterSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - failureReason: __expectString(output.failureReason), - filterArn: __expectString(output.filterArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + failureReason: __expectString, + filterArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetSolutionMetricsResponse */ const de_GetSolutionMetricsResponse = (output: any, context: __SerdeContext): GetSolutionMetricsResponse => { - return { - metrics: output.metrics != null ? de_Metrics(output.metrics, context) : undefined, - solutionVersionArn: __expectString(output.solutionVersionArn), - } as any; + return take(output, { + metrics: (_: any) => de_Metrics(_, context), + solutionVersionArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1HPOConfig */ const de_HPOConfig = (output: any, context: __SerdeContext): HPOConfig => { - return { - algorithmHyperParameterRanges: - output.algorithmHyperParameterRanges != null - ? de_HyperParameterRanges(output.algorithmHyperParameterRanges, context) - : undefined, - hpoObjective: output.hpoObjective != null ? de_HPOObjective(output.hpoObjective, context) : undefined, - hpoResourceConfig: - output.hpoResourceConfig != null ? de_HPOResourceConfig(output.hpoResourceConfig, context) : undefined, - } as any; + return take(output, { + algorithmHyperParameterRanges: (_: any) => de_HyperParameterRanges(_, context), + hpoObjective: _json, + hpoResourceConfig: _json, + }) as any; }; -/** - * deserializeAws_json1_1HPOObjective - */ -const de_HPOObjective = (output: any, context: __SerdeContext): HPOObjective => { - return { - metricName: __expectString(output.metricName), - metricRegex: __expectString(output.metricRegex), - type: __expectString(output.type), - } as any; -}; +// de_HPOObjective omitted. -/** - * deserializeAws_json1_1HPOResourceConfig - */ -const de_HPOResourceConfig = (output: any, context: __SerdeContext): HPOResourceConfig => { - return { - maxNumberOfTrainingJobs: __expectString(output.maxNumberOfTrainingJobs), - maxParallelTrainingJobs: __expectString(output.maxParallelTrainingJobs), - } as any; -}; +// de_HPOResourceConfig omitted. /** * deserializeAws_json1_1HyperParameterRanges */ const de_HyperParameterRanges = (output: any, context: __SerdeContext): HyperParameterRanges => { - return { - categoricalHyperParameterRanges: - output.categoricalHyperParameterRanges != null - ? de_CategoricalHyperParameterRanges(output.categoricalHyperParameterRanges, context) - : undefined, - continuousHyperParameterRanges: - output.continuousHyperParameterRanges != null - ? de_ContinuousHyperParameterRanges(output.continuousHyperParameterRanges, context) - : undefined, - integerHyperParameterRanges: - output.integerHyperParameterRanges != null - ? de_IntegerHyperParameterRanges(output.integerHyperParameterRanges, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HyperParameters - */ -const de_HyperParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + categoricalHyperParameterRanges: _json, + continuousHyperParameterRanges: (_: any) => de_ContinuousHyperParameterRanges(_, context), + integerHyperParameterRanges: _json, + }) as any; }; -/** - * deserializeAws_json1_1IntegerHyperParameterRange - */ -const de_IntegerHyperParameterRange = (output: any, context: __SerdeContext): IntegerHyperParameterRange => { - return { - maxValue: __expectInt32(output.maxValue), - minValue: __expectInt32(output.minValue), - name: __expectString(output.name), - } as any; -}; +// de_HyperParameters omitted. -/** - * deserializeAws_json1_1IntegerHyperParameterRanges - */ -const de_IntegerHyperParameterRanges = (output: any, context: __SerdeContext): IntegerHyperParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IntegerHyperParameterRange(entry, context); - }); - return retVal; -}; +// de_IntegerHyperParameterRange omitted. -/** - * deserializeAws_json1_1InvalidInputException - */ -const de_InvalidInputException = (output: any, context: __SerdeContext): InvalidInputException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_IntegerHyperParameterRanges omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidInputException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidNextTokenException omitted. + +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListBatchInferenceJobsResponse */ const de_ListBatchInferenceJobsResponse = (output: any, context: __SerdeContext): ListBatchInferenceJobsResponse => { - return { - batchInferenceJobs: - output.batchInferenceJobs != null ? de_BatchInferenceJobs(output.batchInferenceJobs, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + batchInferenceJobs: (_: any) => de_BatchInferenceJobs(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListBatchSegmentJobsResponse */ const de_ListBatchSegmentJobsResponse = (output: any, context: __SerdeContext): ListBatchSegmentJobsResponse => { - return { - batchSegmentJobs: - output.batchSegmentJobs != null ? de_BatchSegmentJobs(output.batchSegmentJobs, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + batchSegmentJobs: (_: any) => de_BatchSegmentJobs(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListCampaignsResponse */ const de_ListCampaignsResponse = (output: any, context: __SerdeContext): ListCampaignsResponse => { - return { - campaigns: output.campaigns != null ? de_Campaigns(output.campaigns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + campaigns: (_: any) => de_Campaigns(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDatasetExportJobsResponse */ const de_ListDatasetExportJobsResponse = (output: any, context: __SerdeContext): ListDatasetExportJobsResponse => { - return { - datasetExportJobs: - output.datasetExportJobs != null ? de_DatasetExportJobs(output.datasetExportJobs, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + datasetExportJobs: (_: any) => de_DatasetExportJobs(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDatasetGroupsResponse */ const de_ListDatasetGroupsResponse = (output: any, context: __SerdeContext): ListDatasetGroupsResponse => { - return { - datasetGroups: output.datasetGroups != null ? de_DatasetGroups(output.datasetGroups, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + datasetGroups: (_: any) => de_DatasetGroups(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDatasetImportJobsResponse */ const de_ListDatasetImportJobsResponse = (output: any, context: __SerdeContext): ListDatasetImportJobsResponse => { - return { - datasetImportJobs: - output.datasetImportJobs != null ? de_DatasetImportJobs(output.datasetImportJobs, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + datasetImportJobs: (_: any) => de_DatasetImportJobs(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListDatasetsResponse */ const de_ListDatasetsResponse = (output: any, context: __SerdeContext): ListDatasetsResponse => { - return { - datasets: output.datasets != null ? de_Datasets(output.datasets, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + datasets: (_: any) => de_Datasets(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListEventTrackersResponse */ const de_ListEventTrackersResponse = (output: any, context: __SerdeContext): ListEventTrackersResponse => { - return { - eventTrackers: output.eventTrackers != null ? de_EventTrackers(output.eventTrackers, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + eventTrackers: (_: any) => de_EventTrackers(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListFiltersResponse */ const de_ListFiltersResponse = (output: any, context: __SerdeContext): ListFiltersResponse => { - return { - Filters: output.Filters != null ? de_Filters(output.Filters, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + Filters: (_: any) => de_Filters(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListMetricAttributionMetricsResponse - */ -const de_ListMetricAttributionMetricsResponse = ( - output: any, - context: __SerdeContext -): ListMetricAttributionMetricsResponse => { - return { - metrics: output.metrics != null ? de_MetricAttributes(output.metrics, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ListMetricAttributionMetricsResponse omitted. /** * deserializeAws_json1_1ListMetricAttributionsResponse */ const de_ListMetricAttributionsResponse = (output: any, context: __SerdeContext): ListMetricAttributionsResponse => { - return { - metricAttributions: - output.metricAttributions != null ? de_MetricAttributions(output.metricAttributions, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + metricAttributions: (_: any) => de_MetricAttributions(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListRecipesResponse */ const de_ListRecipesResponse = (output: any, context: __SerdeContext): ListRecipesResponse => { - return { - nextToken: __expectString(output.nextToken), - recipes: output.recipes != null ? de_Recipes(output.recipes, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + recipes: (_: any) => de_Recipes(_, context), + }) as any; }; /** * deserializeAws_json1_1ListRecommendersResponse */ const de_ListRecommendersResponse = (output: any, context: __SerdeContext): ListRecommendersResponse => { - return { - nextToken: __expectString(output.nextToken), - recommenders: output.recommenders != null ? de_Recommenders(output.recommenders, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + recommenders: (_: any) => de_Recommenders(_, context), + }) as any; }; /** * deserializeAws_json1_1ListSchemasResponse */ const de_ListSchemasResponse = (output: any, context: __SerdeContext): ListSchemasResponse => { - return { - nextToken: __expectString(output.nextToken), - schemas: output.schemas != null ? de_Schemas(output.schemas, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + schemas: (_: any) => de_Schemas(_, context), + }) as any; }; /** * deserializeAws_json1_1ListSolutionsResponse */ const de_ListSolutionsResponse = (output: any, context: __SerdeContext): ListSolutionsResponse => { - return { - nextToken: __expectString(output.nextToken), - solutions: output.solutions != null ? de_Solutions(output.solutions, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + solutions: (_: any) => de_Solutions(_, context), + }) as any; }; /** * deserializeAws_json1_1ListSolutionVersionsResponse */ const de_ListSolutionVersionsResponse = (output: any, context: __SerdeContext): ListSolutionVersionsResponse => { - return { - nextToken: __expectString(output.nextToken), - solutionVersions: - output.solutionVersions != null ? de_SolutionVersions(output.solutionVersions, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + solutionVersions: (_: any) => de_SolutionVersions(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1MetricAttribute - */ -const de_MetricAttribute = (output: any, context: __SerdeContext): MetricAttribute => { - return { - eventType: __expectString(output.eventType), - expression: __expectString(output.expression), - metricName: __expectString(output.metricName), - } as any; -}; +// de_MetricAttribute omitted. -/** - * deserializeAws_json1_1MetricAttributes - */ -const de_MetricAttributes = (output: any, context: __SerdeContext): MetricAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricAttribute(entry, context); - }); - return retVal; -}; +// de_MetricAttributes omitted. /** * deserializeAws_json1_1MetricAttribution */ const de_MetricAttribution = (output: any, context: __SerdeContext): MetricAttribution => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - metricAttributionArn: __expectString(output.metricAttributionArn), - metricsOutputConfig: - output.metricsOutputConfig != null ? de_MetricAttributionOutput(output.metricsOutputConfig, context) : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1MetricAttributionOutput - */ -const de_MetricAttributionOutput = (output: any, context: __SerdeContext): MetricAttributionOutput => { - return { - roleArn: __expectString(output.roleArn), - s3DataDestination: - output.s3DataDestination != null ? de_S3DataConfig(output.s3DataDestination, context) : undefined, - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricAttributionArn: __expectString, + metricsOutputConfig: _json, + name: __expectString, + status: __expectString, + }) as any; }; +// de_MetricAttributionOutput omitted. + /** * deserializeAws_json1_1MetricAttributions */ @@ -7596,9 +6009,6 @@ const de_MetricAttributions = (output: any, context: __SerdeContext): MetricAttr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricAttributionSummary(entry, context); }); return retVal; @@ -7608,20 +6018,14 @@ const de_MetricAttributions = (output: any, context: __SerdeContext): MetricAttr * deserializeAws_json1_1MetricAttributionSummary */ const de_MetricAttributionSummary = (output: any, context: __SerdeContext): MetricAttributionSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - metricAttributionArn: __expectString(output.metricAttributionArn), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + metricAttributionArn: __expectString, + name: __expectString, + status: __expectString, + }) as any; }; /** @@ -7637,37 +6041,23 @@ const de_Metrics = (output: any, context: __SerdeContext): Record { - return { - itemAttribute: __expectString(output.itemAttribute), - objectiveSensitivity: __expectString(output.objectiveSensitivity), - } as any; -}; +// de_OptimizationObjective omitted. /** * deserializeAws_json1_1Recipe */ const de_Recipe = (output: any, context: __SerdeContext): Recipe => { - return { - algorithmArn: __expectString(output.algorithmArn), - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - description: __expectString(output.description), - featureTransformationArn: __expectString(output.featureTransformationArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - recipeArn: __expectString(output.recipeArn), - recipeType: __expectString(output.recipeType), - status: __expectString(output.status), - } as any; + return take(output, { + algorithmArn: __expectString, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + featureTransformationArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + recipeArn: __expectString, + recipeType: __expectString, + status: __expectString, + }) as any; }; /** @@ -7677,9 +6067,6 @@ const de_Recipes = (output: any, context: __SerdeContext): RecipeSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecipeSummary(entry, context); }); return retVal; @@ -7689,62 +6076,37 @@ const de_Recipes = (output: any, context: __SerdeContext): RecipeSummary[] => { * deserializeAws_json1_1RecipeSummary */ const de_RecipeSummary = (output: any, context: __SerdeContext): RecipeSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - domain: __expectString(output.domain), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - recipeArn: __expectString(output.recipeArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + domain: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + recipeArn: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1Recommender */ const de_Recommender = (output: any, context: __SerdeContext): Recommender => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - latestRecommenderUpdate: - output.latestRecommenderUpdate != null - ? de_RecommenderUpdateSummary(output.latestRecommenderUpdate, context) - : undefined, - modelMetrics: output.modelMetrics != null ? de_Metrics(output.modelMetrics, context) : undefined, - name: __expectString(output.name), - recipeArn: __expectString(output.recipeArn), - recommenderArn: __expectString(output.recommenderArn), - recommenderConfig: - output.recommenderConfig != null ? de_RecommenderConfig(output.recommenderConfig, context) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_1RecommenderConfig - */ -const de_RecommenderConfig = (output: any, context: __SerdeContext): RecommenderConfig => { - return { - itemExplorationConfig: - output.itemExplorationConfig != null ? de_HyperParameters(output.itemExplorationConfig, context) : undefined, - minRecommendationRequestsPerSecond: __expectInt32(output.minRecommendationRequestsPerSecond), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestRecommenderUpdate: (_: any) => de_RecommenderUpdateSummary(_, context), + modelMetrics: (_: any) => de_Metrics(_, context), + name: __expectString, + recipeArn: __expectString, + recommenderArn: __expectString, + recommenderConfig: _json, + status: __expectString, + }) as any; }; +// de_RecommenderConfig omitted. + /** * deserializeAws_json1_1Recommenders */ @@ -7752,9 +6114,6 @@ const de_Recommenders = (output: any, context: __SerdeContext): RecommenderSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecommenderSummary(entry, context); }); return retVal; @@ -7764,94 +6123,40 @@ const de_Recommenders = (output: any, context: __SerdeContext): RecommenderSumma * deserializeAws_json1_1RecommenderSummary */ const de_RecommenderSummary = (output: any, context: __SerdeContext): RecommenderSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - recipeArn: __expectString(output.recipeArn), - recommenderArn: __expectString(output.recommenderArn), - recommenderConfig: - output.recommenderConfig != null ? de_RecommenderConfig(output.recommenderConfig, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + recipeArn: __expectString, + recommenderArn: __expectString, + recommenderConfig: _json, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1RecommenderUpdateSummary */ const de_RecommenderUpdateSummary = (output: any, context: __SerdeContext): RecommenderUpdateSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - recommenderConfig: - output.recommenderConfig != null ? de_RecommenderConfig(output.recommenderConfig, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + recommenderConfig: _json, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ResourceConfig - */ -const de_ResourceConfig = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_ResourceConfig omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1S3DataConfig - */ -const de_S3DataConfig = (output: any, context: __SerdeContext): S3DataConfig => { - return { - kmsKeyArn: __expectString(output.kmsKeyArn), - path: __expectString(output.path), - } as any; -}; +// de_S3DataConfig omitted. /** * deserializeAws_json1_1Schemas @@ -7860,9 +6165,6 @@ const de_Schemas = (output: any, context: __SerdeContext): DatasetSchemaSummary[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetSchemaSummary(entry, context); }); return retVal; @@ -7872,53 +6174,35 @@ const de_Schemas = (output: any, context: __SerdeContext): DatasetSchemaSummary[ * deserializeAws_json1_1Solution */ const de_Solution = (output: any, context: __SerdeContext): Solution => { - return { - autoMLResult: output.autoMLResult != null ? de_AutoMLResult(output.autoMLResult, context) : undefined, - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - eventType: __expectString(output.eventType), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - latestSolutionVersion: - output.latestSolutionVersion != null - ? de_SolutionVersionSummary(output.latestSolutionVersion, context) - : undefined, - name: __expectString(output.name), - performAutoML: __expectBoolean(output.performAutoML), - performHPO: __expectBoolean(output.performHPO), - recipeArn: __expectString(output.recipeArn), - solutionArn: __expectString(output.solutionArn), - solutionConfig: output.solutionConfig != null ? de_SolutionConfig(output.solutionConfig, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + autoMLResult: _json, + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + eventType: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestSolutionVersion: (_: any) => de_SolutionVersionSummary(_, context), + name: __expectString, + performAutoML: __expectBoolean, + performHPO: __expectBoolean, + recipeArn: __expectString, + solutionArn: __expectString, + solutionConfig: (_: any) => de_SolutionConfig(_, context), + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1SolutionConfig */ const de_SolutionConfig = (output: any, context: __SerdeContext): SolutionConfig => { - return { - algorithmHyperParameters: - output.algorithmHyperParameters != null - ? de_HyperParameters(output.algorithmHyperParameters, context) - : undefined, - autoMLConfig: output.autoMLConfig != null ? de_AutoMLConfig(output.autoMLConfig, context) : undefined, - eventValueThreshold: __expectString(output.eventValueThreshold), - featureTransformationParameters: - output.featureTransformationParameters != null - ? de_FeatureTransformationParameters(output.featureTransformationParameters, context) - : undefined, - hpoConfig: output.hpoConfig != null ? de_HPOConfig(output.hpoConfig, context) : undefined, - optimizationObjective: - output.optimizationObjective != null - ? de_OptimizationObjective(output.optimizationObjective, context) - : undefined, - } as any; + return take(output, { + algorithmHyperParameters: _json, + autoMLConfig: _json, + eventValueThreshold: __expectString, + featureTransformationParameters: _json, + hpoConfig: (_: any) => de_HPOConfig(_, context), + optimizationObjective: _json, + }) as any; }; /** @@ -7928,9 +6212,6 @@ const de_Solutions = (output: any, context: __SerdeContext): SolutionSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SolutionSummary(entry, context); }); return retVal; @@ -7940,50 +6221,38 @@ const de_Solutions = (output: any, context: __SerdeContext): SolutionSummary[] = * deserializeAws_json1_1SolutionSummary */ const de_SolutionSummary = (output: any, context: __SerdeContext): SolutionSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - recipeArn: __expectString(output.recipeArn), - solutionArn: __expectString(output.solutionArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + recipeArn: __expectString, + solutionArn: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_json1_1SolutionVersion */ const de_SolutionVersion = (output: any, context: __SerdeContext): SolutionVersion => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - datasetGroupArn: __expectString(output.datasetGroupArn), - eventType: __expectString(output.eventType), - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - name: __expectString(output.name), - performAutoML: __expectBoolean(output.performAutoML), - performHPO: __expectBoolean(output.performHPO), - recipeArn: __expectString(output.recipeArn), - solutionArn: __expectString(output.solutionArn), - solutionConfig: output.solutionConfig != null ? de_SolutionConfig(output.solutionConfig, context) : undefined, - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - trainingHours: __limitedParseDouble(output.trainingHours), - trainingMode: __expectString(output.trainingMode), - tunedHPOParams: output.tunedHPOParams != null ? de_TunedHPOParams(output.tunedHPOParams, context) : undefined, - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + datasetGroupArn: __expectString, + eventType: __expectString, + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + performAutoML: __expectBoolean, + performHPO: __expectBoolean, + recipeArn: __expectString, + solutionArn: __expectString, + solutionConfig: (_: any) => de_SolutionConfig(_, context), + solutionVersionArn: __expectString, + status: __expectString, + trainingHours: __limitedParseDouble, + trainingMode: __expectString, + tunedHPOParams: _json, + }) as any; }; /** @@ -7993,9 +6262,6 @@ const de_SolutionVersions = (output: any, context: __SerdeContext): SolutionVers const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SolutionVersionSummary(entry, context); }); return retVal; @@ -8005,134 +6271,38 @@ const de_SolutionVersions = (output: any, context: __SerdeContext): SolutionVers * deserializeAws_json1_1SolutionVersionSummary */ const de_SolutionVersionSummary = (output: any, context: __SerdeContext): SolutionVersionSummary => { - return { - creationDateTime: - output.creationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDateTime))) - : undefined, - failureReason: __expectString(output.failureReason), - lastUpdatedDateTime: - output.lastUpdatedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedDateTime))) - : undefined, - solutionVersionArn: __expectString(output.solutionVersionArn), - status: __expectString(output.status), - } as any; + return take(output, { + creationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureReason: __expectString, + lastUpdatedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + solutionVersionArn: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1StartRecommenderResponse - */ -const de_StartRecommenderResponse = (output: any, context: __SerdeContext): StartRecommenderResponse => { - return { - recommenderArn: __expectString(output.recommenderArn), - } as any; -}; +// de_StartRecommenderResponse omitted. -/** - * deserializeAws_json1_1StopRecommenderResponse - */ -const de_StopRecommenderResponse = (output: any, context: __SerdeContext): StopRecommenderResponse => { - return { - recommenderArn: __expectString(output.recommenderArn), - } as any; -}; +// de_StopRecommenderResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - tagKey: __expectString(output.tagKey), - tagValue: __expectString(output.tagValue), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TooManyTagKeysException - */ -const de_TooManyTagKeysException = (output: any, context: __SerdeContext): TooManyTagKeysException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagKeysException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1TunedHPOParams - */ -const de_TunedHPOParams = (output: any, context: __SerdeContext): TunedHPOParams => { - return { - algorithmHyperParameters: - output.algorithmHyperParameters != null - ? de_HyperParameters(output.algorithmHyperParameters, context) - : undefined, - } as any; -}; +// de_TunedHPOParams omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateCampaignResponse - */ -const de_UpdateCampaignResponse = (output: any, context: __SerdeContext): UpdateCampaignResponse => { - return { - campaignArn: __expectString(output.campaignArn), - } as any; -}; +// de_UpdateCampaignResponse omitted. -/** - * deserializeAws_json1_1UpdateMetricAttributionResponse - */ -const de_UpdateMetricAttributionResponse = (output: any, context: __SerdeContext): UpdateMetricAttributionResponse => { - return { - metricAttributionArn: __expectString(output.metricAttributionArn), - } as any; -}; +// de_UpdateMetricAttributionResponse omitted. -/** - * deserializeAws_json1_1UpdateRecommenderResponse - */ -const de_UpdateRecommenderResponse = (output: any, context: __SerdeContext): UpdateRecommenderResponse => { - return { - recommenderArn: __expectString(output.recommenderArn), - } as any; -}; +// de_UpdateRecommenderResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -8154,6 +6324,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-pi/src/protocols/Aws_json1_1.ts b/clients/client-pi/src/protocols/Aws_json1_1.ts index 91e75ec7c36f..7d1d8573c610 100644 --- a/clients/client-pi/src/protocols/Aws_json1_1.ts +++ b/clients/client-pi/src/protocols/Aws_json1_1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -41,31 +43,19 @@ import { DataPoint, DescribeDimensionKeysRequest, DescribeDimensionKeysResponse, - DimensionDetail, DimensionGroup, - DimensionGroupDetail, DimensionKeyDescription, - DimensionKeyDetail, - FeatureMetadata, GetDimensionKeyDetailsRequest, - GetDimensionKeyDetailsResponse, GetResourceMetadataRequest, - GetResourceMetadataResponse, GetResourceMetricsRequest, GetResourceMetricsResponse, InternalServiceError, InvalidArgumentException, ListAvailableResourceDimensionsRequest, - ListAvailableResourceDimensionsResponse, ListAvailableResourceMetricsRequest, - ListAvailableResourceMetricsResponse, - MetricDimensionGroups, MetricKeyDataPoints, MetricQuery, NotAuthorizedException, - ResponsePartitionKey, - ResponseResourceMetric, - ResponseResourceMetricKey, } from "../models/models_0"; import { PIServiceException as __BaseException } from "../models/PIServiceException"; @@ -91,7 +81,7 @@ export const se_GetDimensionKeyDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDimensionKeyDetails"); let body: any; - body = JSON.stringify(se_GetDimensionKeyDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -104,7 +94,7 @@ export const se_GetResourceMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourceMetadata"); let body: any; - body = JSON.stringify(se_GetResourceMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -130,7 +120,7 @@ export const se_ListAvailableResourceDimensionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailableResourceDimensions"); let body: any; - body = JSON.stringify(se_ListAvailableResourceDimensionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -143,7 +133,7 @@ export const se_ListAvailableResourceMetricsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailableResourceMetrics"); let body: any; - body = JSON.stringify(se_ListAvailableResourceMetricsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -164,7 +154,7 @@ export const de_DescribeDimensionKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -191,10 +181,9 @@ const de_DescribeDimensionKeysCommandError = async ( throw await de_NotAuthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -212,12 +201,12 @@ export const de_GetDimensionKeyDetailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDimensionKeyDetailsResponse(data, context); + contents = _json(data); const response: GetDimensionKeyDetailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -244,10 +233,9 @@ const de_GetDimensionKeyDetailsCommandError = async ( throw await de_NotAuthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -265,12 +253,12 @@ export const de_GetResourceMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourceMetadataResponse(data, context); + contents = _json(data); const response: GetResourceMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -297,10 +285,9 @@ const de_GetResourceMetadataCommandError = async ( throw await de_NotAuthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -323,7 +310,7 @@ export const de_GetResourceMetricsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -350,10 +337,9 @@ const de_GetResourceMetricsCommandError = async ( throw await de_NotAuthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -371,12 +357,12 @@ export const de_ListAvailableResourceDimensionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAvailableResourceDimensionsResponse(data, context); + contents = _json(data); const response: ListAvailableResourceDimensionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -403,10 +389,9 @@ const de_ListAvailableResourceDimensionsCommandError = async ( throw await de_NotAuthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -424,12 +409,12 @@ export const de_ListAvailableResourceMetricsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAvailableResourceMetricsResponse(data, context); + contents = _json(data); const response: ListAvailableResourceMetricsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -456,10 +441,9 @@ const de_ListAvailableResourceMetricsCommandError = async ( throw await de_NotAuthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -473,7 +457,7 @@ const de_InternalServiceErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceError(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -489,7 +473,7 @@ const de_InvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -505,7 +489,7 @@ const de_NotAuthorizedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotAuthorizedException(body, context); + const deserialized: any = _json(body); const exception = new NotAuthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -513,202 +497,68 @@ const de_NotAuthorizedExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AdditionalMetricsList - */ -const se_AdditionalMetricsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalMetricsList omitted. /** * serializeAws_json1_1DescribeDimensionKeysRequest */ const se_DescribeDimensionKeysRequest = (input: DescribeDimensionKeysRequest, context: __SerdeContext): any => { - return { - ...(input.AdditionalMetrics != null && { - AdditionalMetrics: se_AdditionalMetricsList(input.AdditionalMetrics, context), - }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.Filter != null && { Filter: se_MetricQueryFilterMap(input.Filter, context) }), - ...(input.GroupBy != null && { GroupBy: se_DimensionGroup(input.GroupBy, context) }), - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Metric != null && { Metric: input.Metric }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PartitionBy != null && { PartitionBy: se_DimensionGroup(input.PartitionBy, context) }), - ...(input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + AdditionalMetrics: _json, + EndTime: (_) => Math.round(_.getTime() / 1000), + Filter: _json, + GroupBy: _json, + Identifier: [], + MaxResults: [], + Metric: [], + NextToken: [], + PartitionBy: _json, + PeriodInSeconds: [], + ServiceType: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1DimensionGroup - */ -const se_DimensionGroup = (input: DimensionGroup, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_RequestStringList(input.Dimensions, context) }), - ...(input.Group != null && { Group: input.Group }), - ...(input.Limit != null && { Limit: input.Limit }), - }; -}; +// se_DimensionGroup omitted. -/** - * serializeAws_json1_1DimensionsMetricList - */ -const se_DimensionsMetricList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DimensionsMetricList omitted. -/** - * serializeAws_json1_1GetDimensionKeyDetailsRequest - */ -const se_GetDimensionKeyDetailsRequest = (input: GetDimensionKeyDetailsRequest, context: __SerdeContext): any => { - return { - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupIdentifier != null && { GroupIdentifier: input.GroupIdentifier }), - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.RequestedDimensions != null && { - RequestedDimensions: se_RequestedDimensionList(input.RequestedDimensions, context), - }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - }; -}; +// se_GetDimensionKeyDetailsRequest omitted. -/** - * serializeAws_json1_1GetResourceMetadataRequest - */ -const se_GetResourceMetadataRequest = (input: GetResourceMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - }; -}; +// se_GetResourceMetadataRequest omitted. /** * serializeAws_json1_1GetResourceMetricsRequest */ const se_GetResourceMetricsRequest = (input: GetResourceMetricsRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MetricQueries != null && { MetricQueries: se_MetricQueryList(input.MetricQueries, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PeriodAlignment != null && { PeriodAlignment: input.PeriodAlignment }), - ...(input.PeriodInSeconds != null && { PeriodInSeconds: input.PeriodInSeconds }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + Identifier: [], + MaxResults: [], + MetricQueries: _json, + NextToken: [], + PeriodAlignment: [], + PeriodInSeconds: [], + ServiceType: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListAvailableResourceDimensionsRequest - */ -const se_ListAvailableResourceDimensionsRequest = ( - input: ListAvailableResourceDimensionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Metrics != null && { Metrics: se_DimensionsMetricList(input.Metrics, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - }; -}; +// se_ListAvailableResourceDimensionsRequest omitted. -/** - * serializeAws_json1_1ListAvailableResourceMetricsRequest - */ -const se_ListAvailableResourceMetricsRequest = ( - input: ListAvailableResourceMetricsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MetricTypes != null && { MetricTypes: se_MetricTypeList(input.MetricTypes, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - }; -}; +// se_ListAvailableResourceMetricsRequest omitted. -/** - * serializeAws_json1_1MetricQuery - */ -const se_MetricQuery = (input: MetricQuery, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_MetricQueryFilterMap(input.Filter, context) }), - ...(input.GroupBy != null && { GroupBy: se_DimensionGroup(input.GroupBy, context) }), - ...(input.Metric != null && { Metric: input.Metric }), - }; -}; +// se_MetricQuery omitted. -/** - * serializeAws_json1_1MetricQueryFilterMap - */ -const se_MetricQueryFilterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_MetricQueryFilterMap omitted. -/** - * serializeAws_json1_1MetricQueryList - */ -const se_MetricQueryList = (input: MetricQuery[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricQuery(entry, context); - }); -}; +// se_MetricQueryList omitted. -/** - * serializeAws_json1_1MetricTypeList - */ -const se_MetricTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_MetricTypeList omitted. -/** - * serializeAws_json1_1RequestedDimensionList - */ -const se_RequestedDimensionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RequestedDimensionList omitted. -/** - * serializeAws_json1_1RequestStringList - */ -const se_RequestStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RequestStringList omitted. /** * deserializeAws_json1_1AdditionalMetricsMap @@ -727,11 +577,10 @@ const de_AdditionalMetricsMap = (output: any, context: __SerdeContext): Record { - return { - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: __limitedParseDouble, + }) as any; }; /** @@ -741,9 +590,6 @@ const de_DataPointsList = (output: any, context: __SerdeContext): DataPoint[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DataPoint(entry, context); }); return retVal; @@ -753,82 +599,33 @@ const de_DataPointsList = (output: any, context: __SerdeContext): DataPoint[] => * deserializeAws_json1_1DescribeDimensionKeysResponse */ const de_DescribeDimensionKeysResponse = (output: any, context: __SerdeContext): DescribeDimensionKeysResponse => { - return { - AlignedEndTime: - output.AlignedEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedEndTime))) - : undefined, - AlignedStartTime: - output.AlignedStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedStartTime))) - : undefined, - Keys: output.Keys != null ? de_DimensionKeyDescriptionList(output.Keys, context) : undefined, - NextToken: __expectString(output.NextToken), - PartitionKeys: - output.PartitionKeys != null ? de_ResponsePartitionKeyList(output.PartitionKeys, context) : undefined, - } as any; + return take(output, { + AlignedEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AlignedStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Keys: (_: any) => de_DimensionKeyDescriptionList(_, context), + NextToken: __expectString, + PartitionKeys: _json, + }) as any; }; -/** - * deserializeAws_json1_1DimensionDetail - */ -const de_DimensionDetail = (output: any, context: __SerdeContext): DimensionDetail => { - return { - Identifier: __expectString(output.Identifier), - } as any; -}; +// de_DimensionDetail omitted. -/** - * deserializeAws_json1_1DimensionDetailList - */ -const de_DimensionDetailList = (output: any, context: __SerdeContext): DimensionDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionDetail(entry, context); - }); - return retVal; -}; +// de_DimensionDetailList omitted. -/** - * deserializeAws_json1_1DimensionGroupDetail - */ -const de_DimensionGroupDetail = (output: any, context: __SerdeContext): DimensionGroupDetail => { - return { - Dimensions: output.Dimensions != null ? de_DimensionDetailList(output.Dimensions, context) : undefined, - Group: __expectString(output.Group), - } as any; -}; +// de_DimensionGroupDetail omitted. -/** - * deserializeAws_json1_1DimensionGroupDetailList - */ -const de_DimensionGroupDetailList = (output: any, context: __SerdeContext): DimensionGroupDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionGroupDetail(entry, context); - }); - return retVal; -}; +// de_DimensionGroupDetailList omitted. /** * deserializeAws_json1_1DimensionKeyDescription */ const de_DimensionKeyDescription = (output: any, context: __SerdeContext): DimensionKeyDescription => { - return { - AdditionalMetrics: - output.AdditionalMetrics != null ? de_AdditionalMetricsMap(output.AdditionalMetrics, context) : undefined, - Dimensions: output.Dimensions != null ? de_DimensionMap(output.Dimensions, context) : undefined, - Partitions: output.Partitions != null ? de_MetricValuesList(output.Partitions, context) : undefined, - Total: __limitedParseDouble(output.Total), - } as any; + return take(output, { + AdditionalMetrics: (_: any) => de_AdditionalMetricsMap(_, context), + Dimensions: _json, + Partitions: (_: any) => de_MetricValuesList(_, context), + Total: __limitedParseDouble, + }) as any; }; /** @@ -838,191 +635,58 @@ const de_DimensionKeyDescriptionList = (output: any, context: __SerdeContext): D const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DimensionKeyDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DimensionKeyDetail - */ -const de_DimensionKeyDetail = (output: any, context: __SerdeContext): DimensionKeyDetail => { - return { - Dimension: __expectString(output.Dimension), - Status: __expectString(output.Status), - Value: __expectString(output.Value), - } as any; -}; +// de_DimensionKeyDetail omitted. -/** - * deserializeAws_json1_1DimensionKeyDetailList - */ -const de_DimensionKeyDetailList = (output: any, context: __SerdeContext): DimensionKeyDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionKeyDetail(entry, context); - }); - return retVal; -}; +// de_DimensionKeyDetailList omitted. -/** - * deserializeAws_json1_1DimensionMap - */ -const de_DimensionMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DimensionMap omitted. -/** - * deserializeAws_json1_1FeatureMetadata - */ -const de_FeatureMetadata = (output: any, context: __SerdeContext): FeatureMetadata => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_FeatureMetadata omitted. -/** - * deserializeAws_json1_1FeatureMetadataMap - */ -const de_FeatureMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FeatureMetadata(value, context); - return acc; - }, {}); -}; +// de_FeatureMetadataMap omitted. -/** - * deserializeAws_json1_1GetDimensionKeyDetailsResponse - */ -const de_GetDimensionKeyDetailsResponse = (output: any, context: __SerdeContext): GetDimensionKeyDetailsResponse => { - return { - Dimensions: output.Dimensions != null ? de_DimensionKeyDetailList(output.Dimensions, context) : undefined, - } as any; -}; +// de_GetDimensionKeyDetailsResponse omitted. -/** - * deserializeAws_json1_1GetResourceMetadataResponse - */ -const de_GetResourceMetadataResponse = (output: any, context: __SerdeContext): GetResourceMetadataResponse => { - return { - Features: output.Features != null ? de_FeatureMetadataMap(output.Features, context) : undefined, - Identifier: __expectString(output.Identifier), - } as any; -}; +// de_GetResourceMetadataResponse omitted. /** * deserializeAws_json1_1GetResourceMetricsResponse */ const de_GetResourceMetricsResponse = (output: any, context: __SerdeContext): GetResourceMetricsResponse => { - return { - AlignedEndTime: - output.AlignedEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedEndTime))) - : undefined, - AlignedStartTime: - output.AlignedStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AlignedStartTime))) - : undefined, - Identifier: __expectString(output.Identifier), - MetricList: output.MetricList != null ? de_MetricKeyDataPointsList(output.MetricList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + AlignedEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AlignedStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Identifier: __expectString, + MetricList: (_: any) => de_MetricKeyDataPointsList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InternalServiceError - */ -const de_InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceError omitted. -/** - * deserializeAws_json1_1InvalidArgumentException - */ -const de_InvalidArgumentException = (output: any, context: __SerdeContext): InvalidArgumentException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidArgumentException omitted. -/** - * deserializeAws_json1_1ListAvailableResourceDimensionsResponse - */ -const de_ListAvailableResourceDimensionsResponse = ( - output: any, - context: __SerdeContext -): ListAvailableResourceDimensionsResponse => { - return { - MetricDimensions: - output.MetricDimensions != null ? de_MetricDimensionsList(output.MetricDimensions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAvailableResourceDimensionsResponse omitted. -/** - * deserializeAws_json1_1ListAvailableResourceMetricsResponse - */ -const de_ListAvailableResourceMetricsResponse = ( - output: any, - context: __SerdeContext -): ListAvailableResourceMetricsResponse => { - return { - Metrics: output.Metrics != null ? de_ResponseResourceMetricList(output.Metrics, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAvailableResourceMetricsResponse omitted. -/** - * deserializeAws_json1_1MetricDimensionGroups - */ -const de_MetricDimensionGroups = (output: any, context: __SerdeContext): MetricDimensionGroups => { - return { - Groups: output.Groups != null ? de_DimensionGroupDetailList(output.Groups, context) : undefined, - Metric: __expectString(output.Metric), - } as any; -}; +// de_MetricDimensionGroups omitted. -/** - * deserializeAws_json1_1MetricDimensionsList - */ -const de_MetricDimensionsList = (output: any, context: __SerdeContext): MetricDimensionGroups[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDimensionGroups(entry, context); - }); - return retVal; -}; +// de_MetricDimensionsList omitted. /** * deserializeAws_json1_1MetricKeyDataPoints */ const de_MetricKeyDataPoints = (output: any, context: __SerdeContext): MetricKeyDataPoints => { - return { - DataPoints: output.DataPoints != null ? de_DataPointsList(output.DataPoints, context) : undefined, - Key: output.Key != null ? de_ResponseResourceMetricKey(output.Key, context) : undefined, - } as any; + return take(output, { + DataPoints: (_: any) => de_DataPointsList(_, context), + Key: _json, + }) as any; }; /** @@ -1032,9 +696,6 @@ const de_MetricKeyDataPointsList = (output: any, context: __SerdeContext): Metri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricKeyDataPoints(entry, context); }); return retVal; @@ -1047,82 +708,22 @@ const de_MetricValuesList = (output: any, context: __SerdeContext): number[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; }; -/** - * deserializeAws_json1_1NotAuthorizedException - */ -const de_NotAuthorizedException = (output: any, context: __SerdeContext): NotAuthorizedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotAuthorizedException omitted. -/** - * deserializeAws_json1_1ResponsePartitionKey - */ -const de_ResponsePartitionKey = (output: any, context: __SerdeContext): ResponsePartitionKey => { - return { - Dimensions: output.Dimensions != null ? de_DimensionMap(output.Dimensions, context) : undefined, - } as any; -}; +// de_ResponsePartitionKey omitted. -/** - * deserializeAws_json1_1ResponsePartitionKeyList - */ -const de_ResponsePartitionKeyList = (output: any, context: __SerdeContext): ResponsePartitionKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResponsePartitionKey(entry, context); - }); - return retVal; -}; +// de_ResponsePartitionKeyList omitted. -/** - * deserializeAws_json1_1ResponseResourceMetric - */ -const de_ResponseResourceMetric = (output: any, context: __SerdeContext): ResponseResourceMetric => { - return { - Description: __expectString(output.Description), - Metric: __expectString(output.Metric), - Unit: __expectString(output.Unit), - } as any; -}; +// de_ResponseResourceMetric omitted. -/** - * deserializeAws_json1_1ResponseResourceMetricKey - */ -const de_ResponseResourceMetricKey = (output: any, context: __SerdeContext): ResponseResourceMetricKey => { - return { - Dimensions: output.Dimensions != null ? de_DimensionMap(output.Dimensions, context) : undefined, - Metric: __expectString(output.Metric), - } as any; -}; +// de_ResponseResourceMetricKey omitted. -/** - * deserializeAws_json1_1ResponseResourceMetricList - */ -const de_ResponseResourceMetricList = (output: any, context: __SerdeContext): ResponseResourceMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResponseResourceMetric(entry, context); - }); - return retVal; -}; +// de_ResponseResourceMetricList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1144,6 +745,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-pinpoint-email/src/protocols/Aws_restJson1.ts b/clients/client-pinpoint-email/src/protocols/Aws_restJson1.ts index c31bfa8ea4fc..457839accbc6 100644 --- a/clients/client-pinpoint-email/src/protocols/Aws_restJson1.ts +++ b/clients/client-pinpoint-email/src/protocols/Aws_restJson1.ts @@ -1,9 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -11,10 +11,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -180,24 +181,19 @@ import { ConcurrentModificationException, Content, DailyVolume, - DedicatedIp, DeliverabilityTestReport, DeliveryOptions, Destination, - DkimAttributes, DomainDeliverabilityCampaign, DomainDeliverabilityTrackingOption, DomainIspPlacement, EmailContent, - EventDestination, EventDestinationDefinition, EventType, - IdentityInfo, InboxPlacementTrackingOption, IspPlacement, KinesisFirehoseDestination, LimitExceededException, - MailFromAttributes, MailFromDomainNotVerifiedException, Message, MessageRejected, @@ -216,7 +212,6 @@ import { Template, TooManyRequestsException, TrackingOptions, - VolumeStatistics, } from "../models/models_0"; import { PinpointEmailServiceException as __BaseException } from "../models/PinpointEmailServiceException"; @@ -234,16 +229,16 @@ export const se_CreateConfigurationSetCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/configuration-sets"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.DeliveryOptions != null && { DeliveryOptions: se_DeliveryOptions(input.DeliveryOptions, context) }), - ...(input.ReputationOptions != null && { - ReputationOptions: se_ReputationOptions(input.ReputationOptions, context), - }), - ...(input.SendingOptions != null && { SendingOptions: se_SendingOptions(input.SendingOptions, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrackingOptions != null && { TrackingOptions: se_TrackingOptions(input.TrackingOptions, context) }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + DeliveryOptions: (_) => _json(_), + ReputationOptions: (_) => se_ReputationOptions(_, context), + SendingOptions: (_) => _json(_), + Tags: (_) => _json(_), + TrackingOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -278,12 +273,12 @@ export const se_CreateConfigurationSetEventDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EventDestination != null && { - EventDestination: se_EventDestinationDefinition(input.EventDestination, context), - }), - ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }), - }); + body = JSON.stringify( + take(input, { + EventDestination: (_) => _json(_), + EventDestinationName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -309,10 +304,12 @@ export const se_CreateDedicatedIpPoolCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/dedicated-ip-pools"; let body: any; - body = JSON.stringify({ - ...(input.PoolName != null && { PoolName: input.PoolName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + PoolName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -338,12 +335,14 @@ export const se_CreateDeliverabilityTestReportCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/deliverability-dashboard/test"; let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: se_EmailContent(input.Content, context) }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.ReportName != null && { ReportName: input.ReportName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Content: (_) => se_EmailContent(_, context), + FromEmailAddress: [], + ReportName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -368,10 +367,12 @@ export const se_CreateEmailIdentityCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/identities"; let body: any; - body = JSON.stringify({ - ...(input.EmailIdentity != null && { EmailIdentity: input.EmailIdentity }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + EmailIdentity: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1023,9 +1024,11 @@ export const se_PutAccountDedicatedIpWarmupAttributesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/account/dedicated-ips/warmup"; let body: any; - body = JSON.stringify({ - ...(input.AutoWarmupEnabled != null && { AutoWarmupEnabled: input.AutoWarmupEnabled }), - }); + body = JSON.stringify( + take(input, { + AutoWarmupEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1051,9 +1054,11 @@ export const se_PutAccountSendingAttributesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/account/sending"; let body: any; - body = JSON.stringify({ - ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }), - }); + body = JSON.stringify( + take(input, { + SendingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1088,10 +1093,12 @@ export const se_PutConfigurationSetDeliveryOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }), - ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }), - }); + body = JSON.stringify( + take(input, { + SendingPoolName: [], + TlsPolicy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1126,9 +1133,11 @@ export const se_PutConfigurationSetReputationOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }), - }); + body = JSON.stringify( + take(input, { + ReputationMetricsEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1163,9 +1172,11 @@ export const se_PutConfigurationSetSendingOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }), - }); + body = JSON.stringify( + take(input, { + SendingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1200,9 +1211,11 @@ export const se_PutConfigurationSetTrackingOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }), - }); + body = JSON.stringify( + take(input, { + CustomRedirectDomain: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1229,9 +1242,11 @@ export const se_PutDedicatedIpInPoolCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/dedicated-ips/{Ip}/pool"; resolvedPath = __resolvedPath(resolvedPath, input, "Ip", () => input.Ip!, "{Ip}", false); let body: any; - body = JSON.stringify({ - ...(input.DestinationPoolName != null && { DestinationPoolName: input.DestinationPoolName }), - }); + body = JSON.stringify( + take(input, { + DestinationPoolName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1258,9 +1273,11 @@ export const se_PutDedicatedIpWarmupAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/dedicated-ips/{Ip}/warmup"; resolvedPath = __resolvedPath(resolvedPath, input, "Ip", () => input.Ip!, "{Ip}", false); let body: any; - body = JSON.stringify({ - ...(input.WarmupPercentage != null && { WarmupPercentage: input.WarmupPercentage }), - }); + body = JSON.stringify( + take(input, { + WarmupPercentage: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1286,12 +1303,12 @@ export const se_PutDeliverabilityDashboardOptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/deliverability-dashboard"; let body: any; - body = JSON.stringify({ - ...(input.DashboardEnabled != null && { DashboardEnabled: input.DashboardEnabled }), - ...(input.SubscribedDomains != null && { - SubscribedDomains: se_DomainDeliverabilityTrackingOptions(input.SubscribedDomains, context), - }), - }); + body = JSON.stringify( + take(input, { + DashboardEnabled: [], + SubscribedDomains: (_) => se_DomainDeliverabilityTrackingOptions(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1325,9 +1342,11 @@ export const se_PutEmailIdentityDkimAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SigningEnabled != null && { SigningEnabled: input.SigningEnabled }), - }); + body = JSON.stringify( + take(input, { + SigningEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1362,9 +1381,11 @@ export const se_PutEmailIdentityFeedbackAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EmailForwardingEnabled != null && { EmailForwardingEnabled: input.EmailForwardingEnabled }), - }); + body = JSON.stringify( + take(input, { + EmailForwardingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1399,10 +1420,12 @@ export const se_PutEmailIdentityMailFromAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BehaviorOnMxFailure != null && { BehaviorOnMxFailure: input.BehaviorOnMxFailure }), - ...(input.MailFromDomain != null && { MailFromDomain: input.MailFromDomain }), - }); + body = JSON.stringify( + take(input, { + BehaviorOnMxFailure: [], + MailFromDomain: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1428,17 +1451,17 @@ export const se_SendEmailCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/outbound-emails"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Content != null && { Content: se_EmailContent(input.Content, context) }), - ...(input.Destination != null && { Destination: se_Destination(input.Destination, context) }), - ...(input.EmailTags != null && { EmailTags: se_MessageTagList(input.EmailTags, context) }), - ...(input.FeedbackForwardingEmailAddress != null && { - FeedbackForwardingEmailAddress: input.FeedbackForwardingEmailAddress, - }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.ReplyToAddresses != null && { ReplyToAddresses: se_EmailAddressList(input.ReplyToAddresses, context) }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + Content: (_) => se_EmailContent(_, context), + Destination: (_) => _json(_), + EmailTags: (_) => _json(_), + FeedbackForwardingEmailAddress: [], + FromEmailAddress: [], + ReplyToAddresses: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1463,10 +1486,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/email/tags"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1539,11 +1564,11 @@ export const se_UpdateConfigurationSetEventDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EventDestination != null && { - EventDestination: se_EventDestinationDefinition(input.EventDestination, context), - }), - }); + body = JSON.stringify( + take(input, { + EventDestination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1605,10 +1630,9 @@ const de_CreateConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1661,10 +1685,9 @@ const de_CreateConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1717,10 +1740,9 @@ const de_CreateDedicatedIpPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1740,12 +1762,11 @@ export const de_CreateDeliverabilityTestReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeliverabilityTestStatus != null) { - contents.DeliverabilityTestStatus = __expectString(data.DeliverabilityTestStatus); - } - if (data.ReportId != null) { - contents.ReportId = __expectString(data.ReportId); - } + const doc = take(data, { + DeliverabilityTestStatus: __expectString, + ReportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1791,10 +1812,9 @@ const de_CreateDeliverabilityTestReportCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1814,15 +1834,12 @@ export const de_CreateEmailIdentityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DkimAttributes != null) { - contents.DkimAttributes = de_DkimAttributes(data.DkimAttributes, context); - } - if (data.IdentityType != null) { - contents.IdentityType = __expectString(data.IdentityType); - } - if (data.VerifiedForSendingStatus != null) { - contents.VerifiedForSendingStatus = __expectBoolean(data.VerifiedForSendingStatus); - } + const doc = take(data, { + DkimAttributes: _json, + IdentityType: __expectString, + VerifiedForSendingStatus: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1853,10 +1870,9 @@ const de_CreateEmailIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1906,10 +1922,9 @@ const de_DeleteConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1956,10 +1971,9 @@ const de_DeleteConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2009,10 +2023,9 @@ const de_DeleteDedicatedIpPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2062,10 +2075,9 @@ const de_DeleteEmailIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2085,21 +2097,14 @@ export const de_GetAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIpAutoWarmupEnabled != null) { - contents.DedicatedIpAutoWarmupEnabled = __expectBoolean(data.DedicatedIpAutoWarmupEnabled); - } - if (data.EnforcementStatus != null) { - contents.EnforcementStatus = __expectString(data.EnforcementStatus); - } - if (data.ProductionAccessEnabled != null) { - contents.ProductionAccessEnabled = __expectBoolean(data.ProductionAccessEnabled); - } - if (data.SendQuota != null) { - contents.SendQuota = de_SendQuota(data.SendQuota, context); - } - if (data.SendingEnabled != null) { - contents.SendingEnabled = __expectBoolean(data.SendingEnabled); - } + const doc = take(data, { + DedicatedIpAutoWarmupEnabled: __expectBoolean, + EnforcementStatus: __expectString, + ProductionAccessEnabled: __expectBoolean, + SendQuota: (_) => de_SendQuota(_, context), + SendingEnabled: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -2124,10 +2129,9 @@ const de_GetAccountCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2147,9 +2151,10 @@ export const de_GetBlacklistReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BlacklistReport != null) { - contents.BlacklistReport = de_BlacklistReport(data.BlacklistReport, context); - } + const doc = take(data, { + BlacklistReport: (_) => de_BlacklistReport(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2177,10 +2182,9 @@ const de_GetBlacklistReportsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2200,24 +2204,15 @@ export const de_GetConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConfigurationSetName != null) { - contents.ConfigurationSetName = __expectString(data.ConfigurationSetName); - } - if (data.DeliveryOptions != null) { - contents.DeliveryOptions = de_DeliveryOptions(data.DeliveryOptions, context); - } - if (data.ReputationOptions != null) { - contents.ReputationOptions = de_ReputationOptions(data.ReputationOptions, context); - } - if (data.SendingOptions != null) { - contents.SendingOptions = de_SendingOptions(data.SendingOptions, context); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } - if (data.TrackingOptions != null) { - contents.TrackingOptions = de_TrackingOptions(data.TrackingOptions, context); - } + const doc = take(data, { + ConfigurationSetName: __expectString, + DeliveryOptions: _json, + ReputationOptions: (_) => de_ReputationOptions(_, context), + SendingOptions: _json, + Tags: _json, + TrackingOptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2245,10 +2240,9 @@ const de_GetConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2268,9 +2262,10 @@ export const de_GetConfigurationSetEventDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventDestinations != null) { - contents.EventDestinations = de_EventDestinations(data.EventDestinations, context); - } + const doc = take(data, { + EventDestinations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2298,10 +2293,9 @@ const de_GetConfigurationSetEventDestinationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2321,9 +2315,10 @@ export const de_GetDedicatedIpCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIp != null) { - contents.DedicatedIp = de_DedicatedIp(data.DedicatedIp, context); - } + const doc = take(data, { + DedicatedIp: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2351,10 +2346,9 @@ const de_GetDedicatedIpCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2374,12 +2368,11 @@ export const de_GetDedicatedIpsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIps != null) { - contents.DedicatedIps = de_DedicatedIpList(data.DedicatedIps, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DedicatedIps: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2407,10 +2400,9 @@ const de_GetDedicatedIpsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2430,26 +2422,14 @@ export const de_GetDeliverabilityDashboardOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountStatus != null) { - contents.AccountStatus = __expectString(data.AccountStatus); - } - if (data.ActiveSubscribedDomains != null) { - contents.ActiveSubscribedDomains = de_DomainDeliverabilityTrackingOptions(data.ActiveSubscribedDomains, context); - } - if (data.DashboardEnabled != null) { - contents.DashboardEnabled = __expectBoolean(data.DashboardEnabled); - } - if (data.PendingExpirationSubscribedDomains != null) { - contents.PendingExpirationSubscribedDomains = de_DomainDeliverabilityTrackingOptions( - data.PendingExpirationSubscribedDomains, - context - ); - } - if (data.SubscriptionExpiryDate != null) { - contents.SubscriptionExpiryDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.SubscriptionExpiryDate)) - ); - } + const doc = take(data, { + AccountStatus: __expectString, + ActiveSubscribedDomains: (_) => de_DomainDeliverabilityTrackingOptions(_, context), + DashboardEnabled: __expectBoolean, + PendingExpirationSubscribedDomains: (_) => de_DomainDeliverabilityTrackingOptions(_, context), + SubscriptionExpiryDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2477,10 +2457,9 @@ const de_GetDeliverabilityDashboardOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2500,21 +2479,14 @@ export const de_GetDeliverabilityTestReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeliverabilityTestReport != null) { - contents.DeliverabilityTestReport = de_DeliverabilityTestReport(data.DeliverabilityTestReport, context); - } - if (data.IspPlacements != null) { - contents.IspPlacements = de_IspPlacements(data.IspPlacements, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.OverallPlacement != null) { - contents.OverallPlacement = de_PlacementStatistics(data.OverallPlacement, context); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + DeliverabilityTestReport: (_) => de_DeliverabilityTestReport(_, context), + IspPlacements: (_) => de_IspPlacements(_, context), + Message: __expectString, + OverallPlacement: (_) => de_PlacementStatistics(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2542,10 +2514,9 @@ const de_GetDeliverabilityTestReportCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2565,9 +2536,10 @@ export const de_GetDomainDeliverabilityCampaignCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainDeliverabilityCampaign != null) { - contents.DomainDeliverabilityCampaign = de_DomainDeliverabilityCampaign(data.DomainDeliverabilityCampaign, context); - } + const doc = take(data, { + DomainDeliverabilityCampaign: (_) => de_DomainDeliverabilityCampaign(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2595,10 +2567,9 @@ const de_GetDomainDeliverabilityCampaignCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,12 +2589,11 @@ export const de_GetDomainStatisticsReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DailyVolumes != null) { - contents.DailyVolumes = de_DailyVolumes(data.DailyVolumes, context); - } - if (data.OverallVolume != null) { - contents.OverallVolume = de_OverallVolume(data.OverallVolume, context); - } + const doc = take(data, { + DailyVolumes: (_) => de_DailyVolumes(_, context), + OverallVolume: (_) => de_OverallVolume(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2651,10 +2621,9 @@ const de_GetDomainStatisticsReportCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2674,24 +2643,15 @@ export const de_GetEmailIdentityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DkimAttributes != null) { - contents.DkimAttributes = de_DkimAttributes(data.DkimAttributes, context); - } - if (data.FeedbackForwardingStatus != null) { - contents.FeedbackForwardingStatus = __expectBoolean(data.FeedbackForwardingStatus); - } - if (data.IdentityType != null) { - contents.IdentityType = __expectString(data.IdentityType); - } - if (data.MailFromAttributes != null) { - contents.MailFromAttributes = de_MailFromAttributes(data.MailFromAttributes, context); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } - if (data.VerifiedForSendingStatus != null) { - contents.VerifiedForSendingStatus = __expectBoolean(data.VerifiedForSendingStatus); - } + const doc = take(data, { + DkimAttributes: _json, + FeedbackForwardingStatus: __expectBoolean, + IdentityType: __expectString, + MailFromAttributes: _json, + Tags: _json, + VerifiedForSendingStatus: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -2719,10 +2679,9 @@ const de_GetEmailIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2742,12 +2701,11 @@ export const de_ListConfigurationSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConfigurationSets != null) { - contents.ConfigurationSets = de_ConfigurationSetNameList(data.ConfigurationSets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ConfigurationSets: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2772,10 +2730,9 @@ const de_ListConfigurationSetsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2795,12 +2752,11 @@ export const de_ListDedicatedIpPoolsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIpPools != null) { - contents.DedicatedIpPools = de_ListOfDedicatedIpPools(data.DedicatedIpPools, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DedicatedIpPools: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2825,10 +2781,9 @@ const de_ListDedicatedIpPoolsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2848,12 +2803,11 @@ export const de_ListDeliverabilityTestReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeliverabilityTestReports != null) { - contents.DeliverabilityTestReports = de_DeliverabilityTestReports(data.DeliverabilityTestReports, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DeliverabilityTestReports: (_) => de_DeliverabilityTestReports(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2881,10 +2835,9 @@ const de_ListDeliverabilityTestReportsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2904,15 +2857,11 @@ export const de_ListDomainDeliverabilityCampaignsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainDeliverabilityCampaigns != null) { - contents.DomainDeliverabilityCampaigns = de_DomainDeliverabilityCampaignList( - data.DomainDeliverabilityCampaigns, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DomainDeliverabilityCampaigns: (_) => de_DomainDeliverabilityCampaignList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2940,10 +2889,9 @@ const de_ListDomainDeliverabilityCampaignsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2963,12 +2911,11 @@ export const de_ListEmailIdentitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmailIdentities != null) { - contents.EmailIdentities = de_IdentityInfoList(data.EmailIdentities, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EmailIdentities: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2993,10 +2940,9 @@ const de_ListEmailIdentitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3016,9 +2962,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3046,10 +2993,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3093,10 +3039,9 @@ const de_PutAccountDedicatedIpWarmupAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3140,10 +3085,9 @@ const de_PutAccountSendingAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3190,10 +3134,9 @@ const de_PutConfigurationSetDeliveryOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3240,10 +3183,9 @@ const de_PutConfigurationSetReputationOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3290,10 +3232,9 @@ const de_PutConfigurationSetSendingOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3340,10 +3281,9 @@ const de_PutConfigurationSetTrackingOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3390,10 +3330,9 @@ const de_PutDedicatedIpInPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3440,10 +3379,9 @@ const de_PutDedicatedIpWarmupAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3496,10 +3434,9 @@ const de_PutDeliverabilityDashboardOptionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3546,10 +3483,9 @@ const de_PutEmailIdentityDkimAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3596,10 +3532,9 @@ const de_PutEmailIdentityFeedbackAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3646,10 +3581,9 @@ const de_PutEmailIdentityMailFromAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3669,9 +3603,10 @@ export const de_SendEmailCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3714,10 +3649,9 @@ const de_SendEmailCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3767,10 +3701,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3820,10 +3753,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3870,16 +3802,15 @@ const de_UpdateConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccountSuspendedExceptionRes */ @@ -3889,9 +3820,10 @@ const de_AccountSuspendedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccountSuspendedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3908,9 +3840,10 @@ const de_AlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3924,9 +3857,10 @@ const de_AlreadyExistsExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3943,9 +3877,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3962,9 +3897,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3981,9 +3917,10 @@ const de_MailFromDomainNotVerifiedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MailFromDomainNotVerifiedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3997,9 +3934,10 @@ const de_MailFromDomainNotVerifiedExceptionRes = async ( const de_MessageRejectedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MessageRejected({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4013,9 +3951,10 @@ const de_MessageRejectedRes = async (parsedOutput: any, context: __SerdeContext) const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4032,9 +3971,10 @@ const de_SendingPausedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SendingPausedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4051,9 +3991,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4061,82 +4002,19 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Body - */ -const se_Body = (input: Body, context: __SerdeContext): any => { - return { - ...(input.Html != null && { Html: se_Content(input.Html, context) }), - ...(input.Text != null && { Text: se_Content(input.Text, context) }), - }; -}; +// se_Body omitted. -/** - * serializeAws_restJson1CloudWatchDestination - */ -const se_CloudWatchDestination = (input: CloudWatchDestination, context: __SerdeContext): any => { - return { - ...(input.DimensionConfigurations != null && { - DimensionConfigurations: se_CloudWatchDimensionConfigurations(input.DimensionConfigurations, context), - }), - }; -}; +// se_CloudWatchDestination omitted. -/** - * serializeAws_restJson1CloudWatchDimensionConfiguration - */ -const se_CloudWatchDimensionConfiguration = (input: CloudWatchDimensionConfiguration, context: __SerdeContext): any => { - return { - ...(input.DefaultDimensionValue != null && { DefaultDimensionValue: input.DefaultDimensionValue }), - ...(input.DimensionName != null && { DimensionName: input.DimensionName }), - ...(input.DimensionValueSource != null && { DimensionValueSource: input.DimensionValueSource }), - }; -}; +// se_CloudWatchDimensionConfiguration omitted. -/** - * serializeAws_restJson1CloudWatchDimensionConfigurations - */ -const se_CloudWatchDimensionConfigurations = ( - input: CloudWatchDimensionConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchDimensionConfiguration(entry, context); - }); -}; +// se_CloudWatchDimensionConfigurations omitted. -/** - * serializeAws_restJson1Content - */ -const se_Content = (input: Content, context: __SerdeContext): any => { - return { - ...(input.Charset != null && { Charset: input.Charset }), - ...(input.Data != null && { Data: input.Data }), - }; -}; +// se_Content omitted. -/** - * serializeAws_restJson1DeliveryOptions - */ -const se_DeliveryOptions = (input: DeliveryOptions, context: __SerdeContext): any => { - return { - ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }), - ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }), - }; -}; +// se_DeliveryOptions omitted. -/** - * serializeAws_restJson1Destination - */ -const se_Destination = (input: Destination, context: __SerdeContext): any => { - return { - ...(input.BccAddresses != null && { BccAddresses: se_EmailAddressList(input.BccAddresses, context) }), - ...(input.CcAddresses != null && { CcAddresses: se_EmailAddressList(input.CcAddresses, context) }), - ...(input.ToAddresses != null && { ToAddresses: se_EmailAddressList(input.ToAddresses, context) }), - }; -}; +// se_Destination omitted. /** * serializeAws_restJson1DomainDeliverabilityTrackingOption @@ -4145,15 +4023,11 @@ const se_DomainDeliverabilityTrackingOption = ( input: DomainDeliverabilityTrackingOption, context: __SerdeContext ): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.InboxPlacementTrackingOption != null && { - InboxPlacementTrackingOption: se_InboxPlacementTrackingOption(input.InboxPlacementTrackingOption, context), - }), - ...(input.SubscriptionStartDate != null && { - SubscriptionStartDate: Math.round(input.SubscriptionStartDate.getTime() / 1000), - }), - }; + return take(input, { + Domain: [], + InboxPlacementTrackingOption: _json, + SubscriptionStartDate: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -4170,206 +4044,67 @@ const se_DomainDeliverabilityTrackingOptions = ( }); }; -/** - * serializeAws_restJson1EmailAddressList - */ -const se_EmailAddressList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EmailAddressList omitted. /** * serializeAws_restJson1EmailContent */ const se_EmailContent = (input: EmailContent, context: __SerdeContext): any => { - return { - ...(input.Raw != null && { Raw: se_RawMessage(input.Raw, context) }), - ...(input.Simple != null && { Simple: se_Message(input.Simple, context) }), - ...(input.Template != null && { Template: se_Template(input.Template, context) }), - }; + return take(input, { + Raw: (_) => se_RawMessage(_, context), + Simple: _json, + Template: _json, + }); }; -/** - * serializeAws_restJson1EventDestinationDefinition - */ -const se_EventDestinationDefinition = (input: EventDestinationDefinition, context: __SerdeContext): any => { - return { - ...(input.CloudWatchDestination != null && { - CloudWatchDestination: se_CloudWatchDestination(input.CloudWatchDestination, context), - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KinesisFirehoseDestination != null && { - KinesisFirehoseDestination: se_KinesisFirehoseDestination(input.KinesisFirehoseDestination, context), - }), - ...(input.MatchingEventTypes != null && { MatchingEventTypes: se_EventTypes(input.MatchingEventTypes, context) }), - ...(input.PinpointDestination != null && { - PinpointDestination: se_PinpointDestination(input.PinpointDestination, context), - }), - ...(input.SnsDestination != null && { SnsDestination: se_SnsDestination(input.SnsDestination, context) }), - }; -}; +// se_EventDestinationDefinition omitted. -/** - * serializeAws_restJson1EventTypes - */ -const se_EventTypes = (input: (EventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypes omitted. -/** - * serializeAws_restJson1InboxPlacementTrackingOption - */ -const se_InboxPlacementTrackingOption = (input: InboxPlacementTrackingOption, context: __SerdeContext): any => { - return { - ...(input.Global != null && { Global: input.Global }), - ...(input.TrackedIsps != null && { TrackedIsps: se_IspNameList(input.TrackedIsps, context) }), - }; -}; +// se_InboxPlacementTrackingOption omitted. -/** - * serializeAws_restJson1IspNameList - */ -const se_IspNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IspNameList omitted. -/** - * serializeAws_restJson1KinesisFirehoseDestination - */ -const se_KinesisFirehoseDestination = (input: KinesisFirehoseDestination, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - }; -}; +// se_KinesisFirehoseDestination omitted. -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: se_Body(input.Body, context) }), - ...(input.Subject != null && { Subject: se_Content(input.Subject, context) }), - }; -}; +// se_Message omitted. -/** - * serializeAws_restJson1MessageTag - */ -const se_MessageTag = (input: MessageTag, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MessageTag omitted. -/** - * serializeAws_restJson1MessageTagList - */ -const se_MessageTagList = (input: MessageTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MessageTag(entry, context); - }); -}; +// se_MessageTagList omitted. -/** - * serializeAws_restJson1PinpointDestination - */ -const se_PinpointDestination = (input: PinpointDestination, context: __SerdeContext): any => { - return { - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - }; -}; +// se_PinpointDestination omitted. /** * serializeAws_restJson1RawMessage */ const se_RawMessage = (input: RawMessage, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: context.base64Encoder(input.Data) }), - }; + return take(input, { + Data: context.base64Encoder, + }); }; /** * serializeAws_restJson1ReputationOptions */ const se_ReputationOptions = (input: ReputationOptions, context: __SerdeContext): any => { - return { - ...(input.LastFreshStart != null && { LastFreshStart: Math.round(input.LastFreshStart.getTime() / 1000) }), - ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }), - }; + return take(input, { + LastFreshStart: (_) => Math.round(_.getTime() / 1000), + ReputationMetricsEnabled: [], + }); }; -/** - * serializeAws_restJson1SendingOptions - */ -const se_SendingOptions = (input: SendingOptions, context: __SerdeContext): any => { - return { - ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }), - }; -}; +// se_SendingOptions omitted. -/** - * serializeAws_restJson1SnsDestination - */ -const se_SnsDestination = (input: SnsDestination, context: __SerdeContext): any => { - return { - ...(input.TopicArn != null && { TopicArn: input.TopicArn }), - }; -}; +// se_SnsDestination omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1Template - */ -const se_Template = (input: Template, context: __SerdeContext): any => { - return { - ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }), - ...(input.TemplateData != null && { TemplateData: input.TemplateData }), - }; -}; +// se_Template omitted. -/** - * serializeAws_restJson1TrackingOptions - */ -const se_TrackingOptions = (input: TrackingOptions, context: __SerdeContext): any => { - return { - ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }), - }; -}; +// se_TrackingOptions omitted. /** * deserializeAws_restJson1BlacklistEntries @@ -4378,9 +4113,6 @@ const de_BlacklistEntries = (output: any, context: __SerdeContext): BlacklistEnt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BlacklistEntry(entry, context); }); return retVal; @@ -4390,14 +4122,11 @@ const de_BlacklistEntries = (output: any, context: __SerdeContext): BlacklistEnt * deserializeAws_restJson1BlacklistEntry */ const de_BlacklistEntry = (output: any, context: __SerdeContext): BlacklistEntry => { - return { - Description: __expectString(output.Description), - ListingTime: - output.ListingTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ListingTime))) - : undefined, - RblName: __expectString(output.RblName), - } as any; + return take(output, { + Description: __expectString, + ListingTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RblName: __expectString, + }) as any; }; /** @@ -4413,77 +4142,23 @@ const de_BlacklistReport = (output: any, context: __SerdeContext): Record { - return { - DimensionConfigurations: - output.DimensionConfigurations != null - ? de_CloudWatchDimensionConfigurations(output.DimensionConfigurations, context) - : undefined, - } as any; -}; +// de_CloudWatchDestination omitted. -/** - * deserializeAws_restJson1CloudWatchDimensionConfiguration - */ -const de_CloudWatchDimensionConfiguration = ( - output: any, - context: __SerdeContext -): CloudWatchDimensionConfiguration => { - return { - DefaultDimensionValue: __expectString(output.DefaultDimensionValue), - DimensionName: __expectString(output.DimensionName), - DimensionValueSource: __expectString(output.DimensionValueSource), - } as any; -}; +// de_CloudWatchDimensionConfiguration omitted. -/** - * deserializeAws_restJson1CloudWatchDimensionConfigurations - */ -const de_CloudWatchDimensionConfigurations = ( - output: any, - context: __SerdeContext -): CloudWatchDimensionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchDimensionConfiguration(entry, context); - }); - return retVal; -}; +// de_CloudWatchDimensionConfigurations omitted. -/** - * deserializeAws_restJson1ConfigurationSetNameList - */ -const de_ConfigurationSetNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConfigurationSetNameList omitted. /** * deserializeAws_restJson1DailyVolume */ const de_DailyVolume = (output: any, context: __SerdeContext): DailyVolume => { - return { - DomainIspPlacements: - output.DomainIspPlacements != null ? de_DomainIspPlacements(output.DomainIspPlacements, context) : undefined, - StartDate: - output.StartDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDate))) : undefined, - VolumeStatistics: - output.VolumeStatistics != null ? de_VolumeStatistics(output.VolumeStatistics, context) : undefined, - } as any; + return take(output, { + DomainIspPlacements: (_: any) => de_DomainIspPlacements(_, context), + StartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeStatistics: _json, + }) as any; }; /** @@ -4493,54 +4168,27 @@ const de_DailyVolumes = (output: any, context: __SerdeContext): DailyVolume[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DailyVolume(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DedicatedIp - */ -const de_DedicatedIp = (output: any, context: __SerdeContext): DedicatedIp => { - return { - Ip: __expectString(output.Ip), - PoolName: __expectString(output.PoolName), - WarmupPercentage: __expectInt32(output.WarmupPercentage), - WarmupStatus: __expectString(output.WarmupStatus), - } as any; -}; +// de_DedicatedIp omitted. -/** - * deserializeAws_restJson1DedicatedIpList - */ -const de_DedicatedIpList = (output: any, context: __SerdeContext): DedicatedIp[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DedicatedIp(entry, context); - }); - return retVal; -}; +// de_DedicatedIpList omitted. /** * deserializeAws_restJson1DeliverabilityTestReport */ const de_DeliverabilityTestReport = (output: any, context: __SerdeContext): DeliverabilityTestReport => { - return { - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - DeliverabilityTestStatus: __expectString(output.DeliverabilityTestStatus), - FromEmailAddress: __expectString(output.FromEmailAddress), - ReportId: __expectString(output.ReportId), - ReportName: __expectString(output.ReportName), - Subject: __expectString(output.Subject), - } as any; + return take(output, { + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeliverabilityTestStatus: __expectString, + FromEmailAddress: __expectString, + ReportId: __expectString, + ReportName: __expectString, + Subject: __expectString, + }) as any; }; /** @@ -4550,76 +4198,37 @@ const de_DeliverabilityTestReports = (output: any, context: __SerdeContext): Del const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeliverabilityTestReport(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DeliveryOptions - */ -const de_DeliveryOptions = (output: any, context: __SerdeContext): DeliveryOptions => { - return { - SendingPoolName: __expectString(output.SendingPoolName), - TlsPolicy: __expectString(output.TlsPolicy), - } as any; -}; +// de_DeliveryOptions omitted. -/** - * deserializeAws_restJson1DkimAttributes - */ -const de_DkimAttributes = (output: any, context: __SerdeContext): DkimAttributes => { - return { - SigningEnabled: __expectBoolean(output.SigningEnabled), - Status: __expectString(output.Status), - Tokens: output.Tokens != null ? de_DnsTokenList(output.Tokens, context) : undefined, - } as any; -}; +// de_DkimAttributes omitted. -/** - * deserializeAws_restJson1DnsTokenList - */ -const de_DnsTokenList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DnsTokenList omitted. /** * deserializeAws_restJson1DomainDeliverabilityCampaign */ const de_DomainDeliverabilityCampaign = (output: any, context: __SerdeContext): DomainDeliverabilityCampaign => { - return { - CampaignId: __expectString(output.CampaignId), - DeleteRate: __limitedParseDouble(output.DeleteRate), - Esps: output.Esps != null ? de_Esps(output.Esps, context) : undefined, - FirstSeenDateTime: - output.FirstSeenDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FirstSeenDateTime))) - : undefined, - FromAddress: __expectString(output.FromAddress), - ImageUrl: __expectString(output.ImageUrl), - InboxCount: __expectLong(output.InboxCount), - LastSeenDateTime: - output.LastSeenDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSeenDateTime))) - : undefined, - ProjectedVolume: __expectLong(output.ProjectedVolume), - ReadDeleteRate: __limitedParseDouble(output.ReadDeleteRate), - ReadRate: __limitedParseDouble(output.ReadRate), - SendingIps: output.SendingIps != null ? de_IpList(output.SendingIps, context) : undefined, - SpamCount: __expectLong(output.SpamCount), - Subject: __expectString(output.Subject), - } as any; + return take(output, { + CampaignId: __expectString, + DeleteRate: __limitedParseDouble, + Esps: _json, + FirstSeenDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FromAddress: __expectString, + ImageUrl: __expectString, + InboxCount: __expectLong, + LastSeenDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectedVolume: __expectLong, + ReadDeleteRate: __limitedParseDouble, + ReadRate: __limitedParseDouble, + SendingIps: _json, + SpamCount: __expectLong, + Subject: __expectString, + }) as any; }; /** @@ -4629,9 +4238,6 @@ const de_DomainDeliverabilityCampaignList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainDeliverabilityCampaign(entry, context); }); return retVal; @@ -4644,17 +4250,11 @@ const de_DomainDeliverabilityTrackingOption = ( output: any, context: __SerdeContext ): DomainDeliverabilityTrackingOption => { - return { - Domain: __expectString(output.Domain), - InboxPlacementTrackingOption: - output.InboxPlacementTrackingOption != null - ? de_InboxPlacementTrackingOption(output.InboxPlacementTrackingOption, context) - : undefined, - SubscriptionStartDate: - output.SubscriptionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubscriptionStartDate))) - : undefined, - } as any; + return take(output, { + Domain: __expectString, + InboxPlacementTrackingOption: _json, + SubscriptionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4667,9 +4267,6 @@ const de_DomainDeliverabilityTrackingOptions = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainDeliverabilityTrackingOption(entry, context); }); return retVal; @@ -4679,13 +4276,13 @@ const de_DomainDeliverabilityTrackingOptions = ( * deserializeAws_restJson1DomainIspPlacement */ const de_DomainIspPlacement = (output: any, context: __SerdeContext): DomainIspPlacement => { - return { - InboxPercentage: __limitedParseDouble(output.InboxPercentage), - InboxRawCount: __expectLong(output.InboxRawCount), - IspName: __expectString(output.IspName), - SpamPercentage: __limitedParseDouble(output.SpamPercentage), - SpamRawCount: __expectLong(output.SpamRawCount), - } as any; + return take(output, { + InboxPercentage: __limitedParseDouble, + InboxRawCount: __expectLong, + IspName: __expectString, + SpamPercentage: __limitedParseDouble, + SpamRawCount: __expectLong, + }) as any; }; /** @@ -4695,157 +4292,37 @@ const de_DomainIspPlacements = (output: any, context: __SerdeContext): DomainIsp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainIspPlacement(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Esps - */ -const de_Esps = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Esps omitted. -/** - * deserializeAws_restJson1EventDestination - */ -const de_EventDestination = (output: any, context: __SerdeContext): EventDestination => { - return { - CloudWatchDestination: - output.CloudWatchDestination != null - ? de_CloudWatchDestination(output.CloudWatchDestination, context) - : undefined, - Enabled: __expectBoolean(output.Enabled), - KinesisFirehoseDestination: - output.KinesisFirehoseDestination != null - ? de_KinesisFirehoseDestination(output.KinesisFirehoseDestination, context) - : undefined, - MatchingEventTypes: - output.MatchingEventTypes != null ? de_EventTypes(output.MatchingEventTypes, context) : undefined, - Name: __expectString(output.Name), - PinpointDestination: - output.PinpointDestination != null ? de_PinpointDestination(output.PinpointDestination, context) : undefined, - SnsDestination: output.SnsDestination != null ? de_SnsDestination(output.SnsDestination, context) : undefined, - } as any; -}; +// de_EventDestination omitted. -/** - * deserializeAws_restJson1EventDestinations - */ -const de_EventDestinations = (output: any, context: __SerdeContext): EventDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventDestination(entry, context); - }); - return retVal; -}; +// de_EventDestinations omitted. -/** - * deserializeAws_restJson1EventTypes - */ -const de_EventTypes = (output: any, context: __SerdeContext): (EventType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EventTypes omitted. -/** - * deserializeAws_restJson1IdentityInfo - */ -const de_IdentityInfo = (output: any, context: __SerdeContext): IdentityInfo => { - return { - IdentityName: __expectString(output.IdentityName), - IdentityType: __expectString(output.IdentityType), - SendingEnabled: __expectBoolean(output.SendingEnabled), - } as any; -}; +// de_IdentityInfo omitted. -/** - * deserializeAws_restJson1IdentityInfoList - */ -const de_IdentityInfoList = (output: any, context: __SerdeContext): IdentityInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdentityInfo(entry, context); - }); - return retVal; -}; +// de_IdentityInfoList omitted. -/** - * deserializeAws_restJson1InboxPlacementTrackingOption - */ -const de_InboxPlacementTrackingOption = (output: any, context: __SerdeContext): InboxPlacementTrackingOption => { - return { - Global: __expectBoolean(output.Global), - TrackedIsps: output.TrackedIsps != null ? de_IspNameList(output.TrackedIsps, context) : undefined, - } as any; -}; +// de_InboxPlacementTrackingOption omitted. -/** - * deserializeAws_restJson1IpList - */ -const de_IpList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpList omitted. -/** - * deserializeAws_restJson1IspNameList - */ -const de_IspNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IspNameList omitted. /** * deserializeAws_restJson1IspPlacement */ const de_IspPlacement = (output: any, context: __SerdeContext): IspPlacement => { - return { - IspName: __expectString(output.IspName), - PlacementStatistics: - output.PlacementStatistics != null ? de_PlacementStatistics(output.PlacementStatistics, context) : undefined, - } as any; + return take(output, { + IspName: __expectString, + PlacementStatistics: (_: any) => de_PlacementStatistics(_, context), + }) as any; }; /** @@ -4855,172 +4332,75 @@ const de_IspPlacements = (output: any, context: __SerdeContext): IspPlacement[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IspPlacement(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1KinesisFirehoseDestination - */ -const de_KinesisFirehoseDestination = (output: any, context: __SerdeContext): KinesisFirehoseDestination => { - return { - DeliveryStreamArn: __expectString(output.DeliveryStreamArn), - IamRoleArn: __expectString(output.IamRoleArn), - } as any; -}; +// de_KinesisFirehoseDestination omitted. -/** - * deserializeAws_restJson1ListOfDedicatedIpPools - */ -const de_ListOfDedicatedIpPools = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfDedicatedIpPools omitted. -/** - * deserializeAws_restJson1MailFromAttributes - */ -const de_MailFromAttributes = (output: any, context: __SerdeContext): MailFromAttributes => { - return { - BehaviorOnMxFailure: __expectString(output.BehaviorOnMxFailure), - MailFromDomain: __expectString(output.MailFromDomain), - MailFromDomainStatus: __expectString(output.MailFromDomainStatus), - } as any; -}; +// de_MailFromAttributes omitted. /** * deserializeAws_restJson1OverallVolume */ const de_OverallVolume = (output: any, context: __SerdeContext): OverallVolume => { - return { - DomainIspPlacements: - output.DomainIspPlacements != null ? de_DomainIspPlacements(output.DomainIspPlacements, context) : undefined, - ReadRatePercent: __limitedParseDouble(output.ReadRatePercent), - VolumeStatistics: - output.VolumeStatistics != null ? de_VolumeStatistics(output.VolumeStatistics, context) : undefined, - } as any; + return take(output, { + DomainIspPlacements: (_: any) => de_DomainIspPlacements(_, context), + ReadRatePercent: __limitedParseDouble, + VolumeStatistics: _json, + }) as any; }; -/** - * deserializeAws_restJson1PinpointDestination - */ -const de_PinpointDestination = (output: any, context: __SerdeContext): PinpointDestination => { - return { - ApplicationArn: __expectString(output.ApplicationArn), - } as any; -}; +// de_PinpointDestination omitted. /** * deserializeAws_restJson1PlacementStatistics */ const de_PlacementStatistics = (output: any, context: __SerdeContext): PlacementStatistics => { - return { - DkimPercentage: __limitedParseDouble(output.DkimPercentage), - InboxPercentage: __limitedParseDouble(output.InboxPercentage), - MissingPercentage: __limitedParseDouble(output.MissingPercentage), - SpamPercentage: __limitedParseDouble(output.SpamPercentage), - SpfPercentage: __limitedParseDouble(output.SpfPercentage), - } as any; + return take(output, { + DkimPercentage: __limitedParseDouble, + InboxPercentage: __limitedParseDouble, + MissingPercentage: __limitedParseDouble, + SpamPercentage: __limitedParseDouble, + SpfPercentage: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1ReputationOptions */ const de_ReputationOptions = (output: any, context: __SerdeContext): ReputationOptions => { - return { - LastFreshStart: - output.LastFreshStart != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastFreshStart))) - : undefined, - ReputationMetricsEnabled: __expectBoolean(output.ReputationMetricsEnabled), - } as any; + return take(output, { + LastFreshStart: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReputationMetricsEnabled: __expectBoolean, + }) as any; }; -/** - * deserializeAws_restJson1SendingOptions - */ -const de_SendingOptions = (output: any, context: __SerdeContext): SendingOptions => { - return { - SendingEnabled: __expectBoolean(output.SendingEnabled), - } as any; -}; +// de_SendingOptions omitted. /** * deserializeAws_restJson1SendQuota */ const de_SendQuota = (output: any, context: __SerdeContext): SendQuota => { - return { - Max24HourSend: __limitedParseDouble(output.Max24HourSend), - MaxSendRate: __limitedParseDouble(output.MaxSendRate), - SentLast24Hours: __limitedParseDouble(output.SentLast24Hours), - } as any; + return take(output, { + Max24HourSend: __limitedParseDouble, + MaxSendRate: __limitedParseDouble, + SentLast24Hours: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1SnsDestination - */ -const de_SnsDestination = (output: any, context: __SerdeContext): SnsDestination => { - return { - TopicArn: __expectString(output.TopicArn), - } as any; -}; +// de_SnsDestination omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TrackingOptions - */ -const de_TrackingOptions = (output: any, context: __SerdeContext): TrackingOptions => { - return { - CustomRedirectDomain: __expectString(output.CustomRedirectDomain), - } as any; -}; +// de_TrackingOptions omitted. -/** - * deserializeAws_restJson1VolumeStatistics - */ -const de_VolumeStatistics = (output: any, context: __SerdeContext): VolumeStatistics => { - return { - InboxRawCount: __expectLong(output.InboxRawCount), - ProjectedInbox: __expectLong(output.ProjectedInbox), - ProjectedSpam: __expectLong(output.ProjectedSpam), - SpamRawCount: __expectLong(output.SpamRawCount), - } as any; -}; +// de_VolumeStatistics omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts b/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts index e20c70a1d2cc..b94e631aa8b6 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -135,10 +136,7 @@ import { UpdatePhoneNumberCommandInput, UpdatePhoneNumberCommandOutput } from ". import { UpdatePoolCommandInput, UpdatePoolCommandOutput } from "../commands/UpdatePoolCommand"; import { AccessDeniedException, - AccountAttribute, - AccountLimit, AssociateOriginationIdentityRequest, - AssociateOriginationIdentityResult, CloudWatchLogsDestination, ConfigurationSetFilter, ConfigurationSetInformation, @@ -146,7 +144,6 @@ import { CreateConfigurationSetRequest, CreateConfigurationSetResult, CreateEventDestinationRequest, - CreateEventDestinationResult, CreateOptOutListRequest, CreateOptOutListResult, CreatePoolRequest, @@ -154,13 +151,9 @@ import { DeleteConfigurationSetRequest, DeleteConfigurationSetResult, DeleteDefaultMessageTypeRequest, - DeleteDefaultMessageTypeResult, DeleteDefaultSenderIdRequest, - DeleteDefaultSenderIdResult, DeleteEventDestinationRequest, - DeleteEventDestinationResult, DeleteKeywordRequest, - DeleteKeywordResult, DeleteOptedOutNumberRequest, DeleteOptedOutNumberResult, DeleteOptOutListRequest, @@ -168,17 +161,12 @@ import { DeletePoolRequest, DeletePoolResult, DeleteTextMessageSpendLimitOverrideRequest, - DeleteTextMessageSpendLimitOverrideResult, DeleteVoiceMessageSpendLimitOverrideRequest, - DeleteVoiceMessageSpendLimitOverrideResult, DescribeAccountAttributesRequest, - DescribeAccountAttributesResult, DescribeAccountLimitsRequest, - DescribeAccountLimitsResult, DescribeConfigurationSetsRequest, DescribeConfigurationSetsResult, DescribeKeywordsRequest, - DescribeKeywordsResult, DescribeOptedOutNumbersRequest, DescribeOptedOutNumbersResult, DescribeOptOutListsRequest, @@ -188,35 +176,24 @@ import { DescribePoolsRequest, DescribePoolsResult, DescribeSenderIdsRequest, - DescribeSenderIdsResult, DescribeSpendLimitsRequest, - DescribeSpendLimitsResult, - DestinationCountryParameterKey, DisassociateOriginationIdentityRequest, - DisassociateOriginationIdentityResult, - EventDestination, EventType, InternalServerException, KeywordFilter, - KeywordInformation, KinesisFirehoseDestination, ListPoolOriginationIdentitiesRequest, - ListPoolOriginationIdentitiesResult, ListTagsForResourceRequest, - ListTagsForResourceResult, - MessageType, NumberCapability, OptedOutFilter, OptedOutNumberInformation, OptOutListInformation, - OriginationIdentityMetadata, PhoneNumberFilter, PhoneNumberInformation, PoolFilter, PoolInformation, PoolOriginationIdentitiesFilter, PutKeywordRequest, - PutKeywordResult, PutOptedOutNumberRequest, PutOptedOutNumberResult, ReleasePhoneNumberRequest, @@ -226,36 +203,24 @@ import { ResourceNotFoundException, SenderIdAndCountry, SenderIdFilter, - SenderIdInformation, SendTextMessageRequest, - SendTextMessageResult, SendVoiceMessageRequest, - SendVoiceMessageResult, ServiceQuotaExceededException, SetDefaultMessageTypeRequest, - SetDefaultMessageTypeResult, SetDefaultSenderIdRequest, - SetDefaultSenderIdResult, SetTextMessageSpendLimitOverrideRequest, - SetTextMessageSpendLimitOverrideResult, SetVoiceMessageSpendLimitOverrideRequest, - SetVoiceMessageSpendLimitOverrideResult, SnsDestination, - SpendLimit, Tag, TagResourceRequest, - TagResourceResult, ThrottlingException, UntagResourceRequest, - UntagResourceResult, UpdateEventDestinationRequest, - UpdateEventDestinationResult, UpdatePhoneNumberRequest, UpdatePhoneNumberResult, UpdatePoolRequest, UpdatePoolResult, ValidationException, - ValidationExceptionField, } from "../models/models_0"; import { PinpointSMSVoiceV2ServiceException as __BaseException } from "../models/PinpointSMSVoiceV2ServiceException"; @@ -333,7 +298,7 @@ export const se_DeleteConfigurationSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConfigurationSet"); let body: any; - body = JSON.stringify(se_DeleteConfigurationSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -346,7 +311,7 @@ export const se_DeleteDefaultMessageTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDefaultMessageType"); let body: any; - body = JSON.stringify(se_DeleteDefaultMessageTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -359,7 +324,7 @@ export const se_DeleteDefaultSenderIdCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDefaultSenderId"); let body: any; - body = JSON.stringify(se_DeleteDefaultSenderIdRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -372,7 +337,7 @@ export const se_DeleteEventDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEventDestination"); let body: any; - body = JSON.stringify(se_DeleteEventDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -385,7 +350,7 @@ export const se_DeleteKeywordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteKeyword"); let body: any; - body = JSON.stringify(se_DeleteKeywordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -398,7 +363,7 @@ export const se_DeleteOptedOutNumberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOptedOutNumber"); let body: any; - body = JSON.stringify(se_DeleteOptedOutNumberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -411,7 +376,7 @@ export const se_DeleteOptOutListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOptOutList"); let body: any; - body = JSON.stringify(se_DeleteOptOutListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -424,7 +389,7 @@ export const se_DeletePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePool"); let body: any; - body = JSON.stringify(se_DeletePoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -437,7 +402,7 @@ export const se_DeleteTextMessageSpendLimitOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTextMessageSpendLimitOverride"); let body: any; - body = JSON.stringify(se_DeleteTextMessageSpendLimitOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -450,7 +415,7 @@ export const se_DeleteVoiceMessageSpendLimitOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVoiceMessageSpendLimitOverride"); let body: any; - body = JSON.stringify(se_DeleteVoiceMessageSpendLimitOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -463,7 +428,7 @@ export const se_DescribeAccountAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountAttributes"); let body: any; - body = JSON.stringify(se_DescribeAccountAttributesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -476,7 +441,7 @@ export const se_DescribeAccountLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountLimits"); let body: any; - body = JSON.stringify(se_DescribeAccountLimitsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -489,7 +454,7 @@ export const se_DescribeConfigurationSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConfigurationSets"); let body: any; - body = JSON.stringify(se_DescribeConfigurationSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -502,7 +467,7 @@ export const se_DescribeKeywordsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeKeywords"); let body: any; - body = JSON.stringify(se_DescribeKeywordsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -515,7 +480,7 @@ export const se_DescribeOptedOutNumbersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOptedOutNumbers"); let body: any; - body = JSON.stringify(se_DescribeOptedOutNumbersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -528,7 +493,7 @@ export const se_DescribeOptOutListsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOptOutLists"); let body: any; - body = JSON.stringify(se_DescribeOptOutListsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -541,7 +506,7 @@ export const se_DescribePhoneNumbersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePhoneNumbers"); let body: any; - body = JSON.stringify(se_DescribePhoneNumbersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -554,7 +519,7 @@ export const se_DescribePoolsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePools"); let body: any; - body = JSON.stringify(se_DescribePoolsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -567,7 +532,7 @@ export const se_DescribeSenderIdsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSenderIds"); let body: any; - body = JSON.stringify(se_DescribeSenderIdsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -580,7 +545,7 @@ export const se_DescribeSpendLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSpendLimits"); let body: any; - body = JSON.stringify(se_DescribeSpendLimitsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -606,7 +571,7 @@ export const se_ListPoolOriginationIdentitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPoolOriginationIdentities"); let body: any; - body = JSON.stringify(se_ListPoolOriginationIdentitiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -619,7 +584,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -632,7 +597,7 @@ export const se_PutKeywordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutKeyword"); let body: any; - body = JSON.stringify(se_PutKeywordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -645,7 +610,7 @@ export const se_PutOptedOutNumberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutOptedOutNumber"); let body: any; - body = JSON.stringify(se_PutOptedOutNumberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -658,7 +623,7 @@ export const se_ReleasePhoneNumberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReleasePhoneNumber"); let body: any; - body = JSON.stringify(se_ReleasePhoneNumberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -684,7 +649,7 @@ export const se_SendTextMessageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendTextMessage"); let body: any; - body = JSON.stringify(se_SendTextMessageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -697,7 +662,7 @@ export const se_SendVoiceMessageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendVoiceMessage"); let body: any; - body = JSON.stringify(se_SendVoiceMessageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -710,7 +675,7 @@ export const se_SetDefaultMessageTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetDefaultMessageType"); let body: any; - body = JSON.stringify(se_SetDefaultMessageTypeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -723,7 +688,7 @@ export const se_SetDefaultSenderIdCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetDefaultSenderId"); let body: any; - body = JSON.stringify(se_SetDefaultSenderIdRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -736,7 +701,7 @@ export const se_SetTextMessageSpendLimitOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetTextMessageSpendLimitOverride"); let body: any; - body = JSON.stringify(se_SetTextMessageSpendLimitOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -749,7 +714,7 @@ export const se_SetVoiceMessageSpendLimitOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetVoiceMessageSpendLimitOverride"); let body: any; - body = JSON.stringify(se_SetVoiceMessageSpendLimitOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -762,7 +727,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -775,7 +740,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -788,7 +753,7 @@ export const se_UpdateEventDestinationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEventDestination"); let body: any; - body = JSON.stringify(se_UpdateEventDestinationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -801,7 +766,7 @@ export const se_UpdatePhoneNumberCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePhoneNumber"); let body: any; - body = JSON.stringify(se_UpdatePhoneNumberRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -814,7 +779,7 @@ export const se_UpdatePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePool"); let body: any; - body = JSON.stringify(se_UpdatePoolRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -830,12 +795,12 @@ export const de_AssociateOriginationIdentityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateOriginationIdentityResult(data, context); + contents = _json(data); const response: AssociateOriginationIdentityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -874,10 +839,9 @@ const de_AssociateOriginationIdentityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -900,7 +864,7 @@ export const de_CreateConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -936,10 +900,9 @@ const de_CreateConfigurationSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -957,12 +920,12 @@ export const de_CreateEventDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEventDestinationResult(data, context); + contents = _json(data); const response: CreateEventDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1001,10 +964,9 @@ const de_CreateEventDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1027,7 +989,7 @@ export const de_CreateOptOutListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1063,10 +1025,9 @@ const de_CreateOptOutListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1089,7 +1050,7 @@ export const de_CreatePoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1128,10 +1089,9 @@ const de_CreatePoolCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1154,7 +1114,7 @@ export const de_DeleteConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1187,10 +1147,9 @@ const de_DeleteConfigurationSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1208,12 +1167,12 @@ export const de_DeleteDefaultMessageTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDefaultMessageTypeResult(data, context); + contents = _json(data); const response: DeleteDefaultMessageTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1246,10 +1205,9 @@ const de_DeleteDefaultMessageTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1267,12 +1225,12 @@ export const de_DeleteDefaultSenderIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDefaultSenderIdResult(data, context); + contents = _json(data); const response: DeleteDefaultSenderIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1305,10 +1263,9 @@ const de_DeleteDefaultSenderIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1326,12 +1283,12 @@ export const de_DeleteEventDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEventDestinationResult(data, context); + contents = _json(data); const response: DeleteEventDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1364,10 +1321,9 @@ const de_DeleteEventDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1385,12 +1341,12 @@ export const de_DeleteKeywordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteKeywordResult(data, context); + contents = _json(data); const response: DeleteKeywordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1426,10 +1382,9 @@ const de_DeleteKeywordCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1452,7 +1407,7 @@ export const de_DeleteOptedOutNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1488,10 +1443,9 @@ const de_DeleteOptedOutNumberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1514,7 +1468,7 @@ export const de_DeleteOptOutListCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1550,10 +1504,9 @@ const de_DeleteOptOutListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1576,7 +1529,7 @@ export const de_DeletePoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1612,10 +1565,9 @@ const de_DeletePoolCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1633,12 +1585,12 @@ export const de_DeleteTextMessageSpendLimitOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTextMessageSpendLimitOverrideResult(data, context); + contents = _json(data); const response: DeleteTextMessageSpendLimitOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1668,10 +1620,9 @@ const de_DeleteTextMessageSpendLimitOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1689,12 +1640,12 @@ export const de_DeleteVoiceMessageSpendLimitOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVoiceMessageSpendLimitOverrideResult(data, context); + contents = _json(data); const response: DeleteVoiceMessageSpendLimitOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1724,10 +1675,9 @@ const de_DeleteVoiceMessageSpendLimitOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1745,12 +1695,12 @@ export const de_DescribeAccountAttributesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccountAttributesResult(data, context); + contents = _json(data); const response: DescribeAccountAttributesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1780,10 +1730,9 @@ const de_DescribeAccountAttributesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1801,12 +1750,12 @@ export const de_DescribeAccountLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccountLimitsResult(data, context); + contents = _json(data); const response: DescribeAccountLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1836,10 +1785,9 @@ const de_DescribeAccountLimitsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,7 +1810,7 @@ export const de_DescribeConfigurationSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1895,10 +1843,9 @@ const de_DescribeConfigurationSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1916,12 +1863,12 @@ export const de_DescribeKeywordsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeKeywordsResult(data, context); + contents = _json(data); const response: DescribeKeywordsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1954,10 +1901,9 @@ const de_DescribeKeywordsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1980,7 +1926,7 @@ export const de_DescribeOptedOutNumbersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2013,10 +1959,9 @@ const de_DescribeOptedOutNumbersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2039,7 +1984,7 @@ export const de_DescribeOptOutListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2072,10 +2017,9 @@ const de_DescribeOptOutListsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2098,7 +2042,7 @@ export const de_DescribePhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2131,10 +2075,9 @@ const de_DescribePhoneNumbersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2157,7 +2100,7 @@ export const de_DescribePoolsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2190,10 +2133,9 @@ const de_DescribePoolsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2211,12 +2153,12 @@ export const de_DescribeSenderIdsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSenderIdsResult(data, context); + contents = _json(data); const response: DescribeSenderIdsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2249,10 +2191,9 @@ const de_DescribeSenderIdsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2270,12 +2211,12 @@ export const de_DescribeSpendLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSpendLimitsResult(data, context); + contents = _json(data); const response: DescribeSpendLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2305,10 +2246,9 @@ const de_DescribeSpendLimitsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2326,12 +2266,12 @@ export const de_DisassociateOriginationIdentityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateOriginationIdentityResult(data, context); + contents = _json(data); const response: DisassociateOriginationIdentityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2367,10 +2307,9 @@ const de_DisassociateOriginationIdentityCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2388,12 +2327,12 @@ export const de_ListPoolOriginationIdentitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPoolOriginationIdentitiesResult(data, context); + contents = _json(data); const response: ListPoolOriginationIdentitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2426,10 +2365,9 @@ const de_ListPoolOriginationIdentitiesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2447,12 +2385,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResult(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2485,10 +2423,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2506,12 +2443,12 @@ export const de_PutKeywordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutKeywordResult(data, context); + contents = _json(data); const response: PutKeywordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2550,10 +2487,9 @@ const de_PutKeywordCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2576,7 +2512,7 @@ export const de_PutOptedOutNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2609,10 +2545,9 @@ const de_PutOptedOutNumberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2635,7 +2570,7 @@ export const de_ReleasePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2671,10 +2606,9 @@ const de_ReleasePhoneNumberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2697,7 +2631,7 @@ export const de_RequestPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2736,10 +2670,9 @@ const de_RequestPhoneNumberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2757,12 +2690,12 @@ export const de_SendTextMessageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendTextMessageResult(data, context); + contents = _json(data); const response: SendTextMessageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2801,10 +2734,9 @@ const de_SendTextMessageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2822,12 +2754,12 @@ export const de_SendVoiceMessageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendVoiceMessageResult(data, context); + contents = _json(data); const response: SendVoiceMessageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2866,10 +2798,9 @@ const de_SendVoiceMessageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2887,12 +2818,12 @@ export const de_SetDefaultMessageTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetDefaultMessageTypeResult(data, context); + contents = _json(data); const response: SetDefaultMessageTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2925,10 +2856,9 @@ const de_SetDefaultMessageTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2946,12 +2876,12 @@ export const de_SetDefaultSenderIdCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetDefaultSenderIdResult(data, context); + contents = _json(data); const response: SetDefaultSenderIdCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2984,10 +2914,9 @@ const de_SetDefaultSenderIdCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3005,12 +2934,12 @@ export const de_SetTextMessageSpendLimitOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetTextMessageSpendLimitOverrideResult(data, context); + contents = _json(data); const response: SetTextMessageSpendLimitOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3040,10 +2969,9 @@ const de_SetTextMessageSpendLimitOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3061,12 +2989,12 @@ export const de_SetVoiceMessageSpendLimitOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetVoiceMessageSpendLimitOverrideResult(data, context); + contents = _json(data); const response: SetVoiceMessageSpendLimitOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3096,10 +3024,9 @@ const de_SetVoiceMessageSpendLimitOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3117,12 +3044,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResult(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3158,10 +3085,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3179,12 +3105,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResult(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3217,10 +3143,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3238,12 +3163,12 @@ export const de_UpdateEventDestinationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEventDestinationResult(data, context); + contents = _json(data); const response: UpdateEventDestinationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3279,10 +3204,9 @@ const de_UpdateEventDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3305,7 +3229,7 @@ export const de_UpdatePhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3341,10 +3265,9 @@ const de_UpdatePhoneNumberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3367,7 +3290,7 @@ export const de_UpdatePoolCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3403,10 +3326,9 @@ const de_UpdatePoolCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3420,7 +3342,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3433,7 +3355,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3449,7 +3371,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3465,7 +3387,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3481,7 +3403,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3494,7 +3416,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3507,7 +3429,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3522,353 +3444,116 @@ const se_AssociateOriginationIdentityRequest = ( input: AssociateOriginationIdentityRequest, context: __SerdeContext ): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.IsoCountryCode != null && { IsoCountryCode: input.IsoCountryCode }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + IsoCountryCode: [], + OriginationIdentity: [], + PoolId: [], + }); }; -/** - * serializeAws_json1_0CloudWatchLogsDestination - */ -const se_CloudWatchLogsDestination = (input: CloudWatchLogsDestination, context: __SerdeContext): any => { - return { - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }), - }; -}; +// se_CloudWatchLogsDestination omitted. -/** - * serializeAws_json1_0ConfigurationSetFilter - */ -const se_ConfigurationSetFilter = (input: ConfigurationSetFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_ConfigurationSetFilter omitted. -/** - * serializeAws_json1_0ConfigurationSetFilterList - */ -const se_ConfigurationSetFilterList = (input: ConfigurationSetFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConfigurationSetFilter(entry, context); - }); -}; +// se_ConfigurationSetFilterList omitted. -/** - * serializeAws_json1_0ConfigurationSetNameList - */ -const se_ConfigurationSetNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConfigurationSetNameList omitted. -/** - * serializeAws_json1_0ContextMap - */ -const se_ContextMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ContextMap omitted. /** * serializeAws_json1_0CreateConfigurationSetRequest */ const se_CreateConfigurationSetRequest = (input: CreateConfigurationSetRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ConfigurationSetName: [], + Tags: _json, + }); }; /** * serializeAws_json1_0CreateEventDestinationRequest */ const se_CreateEventDestinationRequest = (input: CreateEventDestinationRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CloudWatchLogsDestination != null && { - CloudWatchLogsDestination: se_CloudWatchLogsDestination(input.CloudWatchLogsDestination, context), - }), - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }), - ...(input.KinesisFirehoseDestination != null && { - KinesisFirehoseDestination: se_KinesisFirehoseDestination(input.KinesisFirehoseDestination, context), - }), - ...(input.MatchingEventTypes != null && { - MatchingEventTypes: se_EventTypeList(input.MatchingEventTypes, context), - }), - ...(input.SnsDestination != null && { SnsDestination: se_SnsDestination(input.SnsDestination, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CloudWatchLogsDestination: _json, + ConfigurationSetName: [], + EventDestinationName: [], + KinesisFirehoseDestination: _json, + MatchingEventTypes: _json, + SnsDestination: _json, + }); }; /** * serializeAws_json1_0CreateOptOutListRequest */ const se_CreateOptOutListRequest = (input: CreateOptOutListRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + OptOutListName: [], + Tags: _json, + }); }; /** * serializeAws_json1_0CreatePoolRequest */ const se_CreatePoolRequest = (input: CreatePoolRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DeletionProtectionEnabled != null && { DeletionProtectionEnabled: input.DeletionProtectionEnabled }), - ...(input.IsoCountryCode != null && { IsoCountryCode: input.IsoCountryCode }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DeletionProtectionEnabled: [], + IsoCountryCode: [], + MessageType: [], + OriginationIdentity: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_0DeleteConfigurationSetRequest - */ -const se_DeleteConfigurationSetRequest = (input: DeleteConfigurationSetRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - }; -}; +// se_DeleteConfigurationSetRequest omitted. -/** - * serializeAws_json1_0DeleteDefaultMessageTypeRequest - */ -const se_DeleteDefaultMessageTypeRequest = (input: DeleteDefaultMessageTypeRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - }; -}; +// se_DeleteDefaultMessageTypeRequest omitted. -/** - * serializeAws_json1_0DeleteDefaultSenderIdRequest - */ -const se_DeleteDefaultSenderIdRequest = (input: DeleteDefaultSenderIdRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - }; -}; +// se_DeleteDefaultSenderIdRequest omitted. -/** - * serializeAws_json1_0DeleteEventDestinationRequest - */ -const se_DeleteEventDestinationRequest = (input: DeleteEventDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }), - }; -}; +// se_DeleteEventDestinationRequest omitted. -/** - * serializeAws_json1_0DeleteKeywordRequest - */ -const se_DeleteKeywordRequest = (input: DeleteKeywordRequest, context: __SerdeContext): any => { - return { - ...(input.Keyword != null && { Keyword: input.Keyword }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - }; -}; +// se_DeleteKeywordRequest omitted. -/** - * serializeAws_json1_0DeleteOptedOutNumberRequest - */ -const se_DeleteOptedOutNumberRequest = (input: DeleteOptedOutNumberRequest, context: __SerdeContext): any => { - return { - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.OptedOutNumber != null && { OptedOutNumber: input.OptedOutNumber }), - }; -}; +// se_DeleteOptedOutNumberRequest omitted. -/** - * serializeAws_json1_0DeleteOptOutListRequest - */ -const se_DeleteOptOutListRequest = (input: DeleteOptOutListRequest, context: __SerdeContext): any => { - return { - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - }; -}; +// se_DeleteOptOutListRequest omitted. -/** - * serializeAws_json1_0DeletePoolRequest - */ -const se_DeletePoolRequest = (input: DeletePoolRequest, context: __SerdeContext): any => { - return { - ...(input.PoolId != null && { PoolId: input.PoolId }), - }; -}; +// se_DeletePoolRequest omitted. -/** - * serializeAws_json1_0DeleteTextMessageSpendLimitOverrideRequest - */ -const se_DeleteTextMessageSpendLimitOverrideRequest = ( - input: DeleteTextMessageSpendLimitOverrideRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_DeleteTextMessageSpendLimitOverrideRequest omitted. -/** - * serializeAws_json1_0DeleteVoiceMessageSpendLimitOverrideRequest - */ -const se_DeleteVoiceMessageSpendLimitOverrideRequest = ( - input: DeleteVoiceMessageSpendLimitOverrideRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_DeleteVoiceMessageSpendLimitOverrideRequest omitted. -/** - * serializeAws_json1_0DescribeAccountAttributesRequest - */ -const se_DescribeAccountAttributesRequest = (input: DescribeAccountAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeAccountAttributesRequest omitted. -/** - * serializeAws_json1_0DescribeAccountLimitsRequest - */ -const se_DescribeAccountLimitsRequest = (input: DescribeAccountLimitsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeAccountLimitsRequest omitted. -/** - * serializeAws_json1_0DescribeConfigurationSetsRequest - */ -const se_DescribeConfigurationSetsRequest = (input: DescribeConfigurationSetsRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetNames != null && { - ConfigurationSetNames: se_ConfigurationSetNameList(input.ConfigurationSetNames, context), - }), - ...(input.Filters != null && { Filters: se_ConfigurationSetFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeConfigurationSetsRequest omitted. -/** - * serializeAws_json1_0DescribeKeywordsRequest - */ -const se_DescribeKeywordsRequest = (input: DescribeKeywordsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_KeywordFilterList(input.Filters, context) }), - ...(input.Keywords != null && { Keywords: se_KeywordList(input.Keywords, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - }; -}; +// se_DescribeKeywordsRequest omitted. -/** - * serializeAws_json1_0DescribeOptedOutNumbersRequest - */ -const se_DescribeOptedOutNumbersRequest = (input: DescribeOptedOutNumbersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_OptedOutFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.OptedOutNumbers != null && { OptedOutNumbers: se_OptedOutNumberList(input.OptedOutNumbers, context) }), - }; -}; +// se_DescribeOptedOutNumbersRequest omitted. -/** - * serializeAws_json1_0DescribeOptOutListsRequest - */ -const se_DescribeOptOutListsRequest = (input: DescribeOptOutListsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OptOutListNames != null && { OptOutListNames: se_OptOutListNameList(input.OptOutListNames, context) }), - }; -}; +// se_DescribeOptOutListsRequest omitted. -/** - * serializeAws_json1_0DescribePhoneNumbersRequest - */ -const se_DescribePhoneNumbersRequest = (input: DescribePhoneNumbersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_PhoneNumberFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PhoneNumberIds != null && { PhoneNumberIds: se_PhoneNumberIdList(input.PhoneNumberIds, context) }), - }; -}; +// se_DescribePhoneNumbersRequest omitted. -/** - * serializeAws_json1_0DescribePoolsRequest - */ -const se_DescribePoolsRequest = (input: DescribePoolsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_PoolFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PoolIds != null && { PoolIds: se_PoolIdList(input.PoolIds, context) }), - }; -}; +// se_DescribePoolsRequest omitted. -/** - * serializeAws_json1_0DescribeSenderIdsRequest - */ -const se_DescribeSenderIdsRequest = (input: DescribeSenderIdsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_SenderIdFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SenderIds != null && { SenderIds: se_SenderIdList(input.SenderIds, context) }), - }; -}; +// se_DescribeSenderIdsRequest omitted. -/** - * serializeAws_json1_0DescribeSpendLimitsRequest - */ -const se_DescribeSpendLimitsRequest = (input: DescribeSpendLimitsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeSpendLimitsRequest omitted. -/** - * serializeAws_json1_0DestinationCountryParameters - */ -const se_DestinationCountryParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [DestinationCountryParameterKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; +// se_DestinationCountryParameters omitted. /** * serializeAws_json1_0DisassociateOriginationIdentityRequest @@ -3877,645 +3562,146 @@ const se_DisassociateOriginationIdentityRequest = ( input: DisassociateOriginationIdentityRequest, context: __SerdeContext ): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.IsoCountryCode != null && { IsoCountryCode: input.IsoCountryCode }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + IsoCountryCode: [], + OriginationIdentity: [], + PoolId: [], + }); }; -/** - * serializeAws_json1_0EventTypeList - */ -const se_EventTypeList = (input: (EventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypeList omitted. -/** - * serializeAws_json1_0FilterValueList - */ -const se_FilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValueList omitted. -/** - * serializeAws_json1_0KeywordFilter - */ -const se_KeywordFilter = (input: KeywordFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_KeywordFilter omitted. -/** - * serializeAws_json1_0KeywordFilterList - */ -const se_KeywordFilterList = (input: KeywordFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeywordFilter(entry, context); - }); -}; +// se_KeywordFilterList omitted. -/** - * serializeAws_json1_0KeywordList - */ -const se_KeywordList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KeywordList omitted. -/** - * serializeAws_json1_0KinesisFirehoseDestination - */ -const se_KinesisFirehoseDestination = (input: KinesisFirehoseDestination, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - }; -}; +// se_KinesisFirehoseDestination omitted. -/** - * serializeAws_json1_0ListPoolOriginationIdentitiesRequest - */ -const se_ListPoolOriginationIdentitiesRequest = ( - input: ListPoolOriginationIdentitiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_PoolOriginationIdentitiesFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - }; -}; +// se_ListPoolOriginationIdentitiesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0NonEmptyTagList - */ -const se_NonEmptyTagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_NonEmptyTagList omitted. -/** - * serializeAws_json1_0NumberCapabilityList - */ -const se_NumberCapabilityList = (input: (NumberCapability | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NumberCapabilityList omitted. -/** - * serializeAws_json1_0OptedOutFilter - */ -const se_OptedOutFilter = (input: OptedOutFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_OptedOutFilter omitted. -/** - * serializeAws_json1_0OptedOutFilterList - */ -const se_OptedOutFilterList = (input: OptedOutFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OptedOutFilter(entry, context); - }); -}; +// se_OptedOutFilterList omitted. -/** - * serializeAws_json1_0OptedOutNumberList - */ -const se_OptedOutNumberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OptedOutNumberList omitted. -/** - * serializeAws_json1_0OptOutListNameList - */ -const se_OptOutListNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OptOutListNameList omitted. -/** - * serializeAws_json1_0PhoneNumberFilter - */ -const se_PhoneNumberFilter = (input: PhoneNumberFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_PhoneNumberFilter omitted. -/** - * serializeAws_json1_0PhoneNumberFilterList - */ -const se_PhoneNumberFilterList = (input: PhoneNumberFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PhoneNumberFilter(entry, context); - }); -}; +// se_PhoneNumberFilterList omitted. -/** - * serializeAws_json1_0PhoneNumberIdList - */ -const se_PhoneNumberIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PhoneNumberIdList omitted. -/** - * serializeAws_json1_0PoolFilter - */ -const se_PoolFilter = (input: PoolFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_PoolFilter omitted. -/** - * serializeAws_json1_0PoolFilterList - */ -const se_PoolFilterList = (input: PoolFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PoolFilter(entry, context); - }); -}; +// se_PoolFilterList omitted. -/** - * serializeAws_json1_0PoolIdList - */ -const se_PoolIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PoolIdList omitted. -/** - * serializeAws_json1_0PoolOriginationIdentitiesFilter - */ -const se_PoolOriginationIdentitiesFilter = (input: PoolOriginationIdentitiesFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_PoolOriginationIdentitiesFilter omitted. -/** - * serializeAws_json1_0PoolOriginationIdentitiesFilterList - */ -const se_PoolOriginationIdentitiesFilterList = ( - input: PoolOriginationIdentitiesFilter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PoolOriginationIdentitiesFilter(entry, context); - }); -}; +// se_PoolOriginationIdentitiesFilterList omitted. -/** - * serializeAws_json1_0PutKeywordRequest - */ -const se_PutKeywordRequest = (input: PutKeywordRequest, context: __SerdeContext): any => { - return { - ...(input.Keyword != null && { Keyword: input.Keyword }), - ...(input.KeywordAction != null && { KeywordAction: input.KeywordAction }), - ...(input.KeywordMessage != null && { KeywordMessage: input.KeywordMessage }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - }; -}; +// se_PutKeywordRequest omitted. -/** - * serializeAws_json1_0PutOptedOutNumberRequest - */ -const se_PutOptedOutNumberRequest = (input: PutOptedOutNumberRequest, context: __SerdeContext): any => { - return { - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.OptedOutNumber != null && { OptedOutNumber: input.OptedOutNumber }), - }; -}; +// se_PutOptedOutNumberRequest omitted. -/** - * serializeAws_json1_0ReleasePhoneNumberRequest - */ -const se_ReleasePhoneNumberRequest = (input: ReleasePhoneNumberRequest, context: __SerdeContext): any => { - return { - ...(input.PhoneNumberId != null && { PhoneNumberId: input.PhoneNumberId }), - }; -}; +// se_ReleasePhoneNumberRequest omitted. /** * serializeAws_json1_0RequestPhoneNumberRequest */ const se_RequestPhoneNumberRequest = (input: RequestPhoneNumberRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DeletionProtectionEnabled != null && { DeletionProtectionEnabled: input.DeletionProtectionEnabled }), - ...(input.IsoCountryCode != null && { IsoCountryCode: input.IsoCountryCode }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.NumberCapabilities != null && { - NumberCapabilities: se_NumberCapabilityList(input.NumberCapabilities, context), - }), - ...(input.NumberType != null && { NumberType: input.NumberType }), - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - ...(input.RegistrationId != null && { RegistrationId: input.RegistrationId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DeletionProtectionEnabled: [], + IsoCountryCode: [], + MessageType: [], + NumberCapabilities: _json, + NumberType: [], + OptOutListName: [], + PoolId: [], + RegistrationId: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_0SenderIdAndCountry - */ -const se_SenderIdAndCountry = (input: SenderIdAndCountry, context: __SerdeContext): any => { - return { - ...(input.IsoCountryCode != null && { IsoCountryCode: input.IsoCountryCode }), - ...(input.SenderId != null && { SenderId: input.SenderId }), - }; -}; +// se_SenderIdAndCountry omitted. -/** - * serializeAws_json1_0SenderIdFilter - */ -const se_SenderIdFilter = (input: SenderIdFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValueList(input.Values, context) }), - }; -}; +// se_SenderIdFilter omitted. -/** - * serializeAws_json1_0SenderIdFilterList - */ -const se_SenderIdFilterList = (input: SenderIdFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SenderIdFilter(entry, context); - }); -}; +// se_SenderIdFilterList omitted. -/** - * serializeAws_json1_0SenderIdList - */ -const se_SenderIdList = (input: SenderIdAndCountry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SenderIdAndCountry(entry, context); - }); -}; +// se_SenderIdList omitted. -/** - * serializeAws_json1_0SendTextMessageRequest - */ -const se_SendTextMessageRequest = (input: SendTextMessageRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Context != null && { Context: se_ContextMap(input.Context, context) }), - ...(input.DestinationCountryParameters != null && { - DestinationCountryParameters: se_DestinationCountryParameters(input.DestinationCountryParameters, context), - }), - ...(input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.Keyword != null && { Keyword: input.Keyword }), - ...(input.MaxPrice != null && { MaxPrice: input.MaxPrice }), - ...(input.MessageBody != null && { MessageBody: input.MessageBody }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - }; -}; +// se_SendTextMessageRequest omitted. -/** - * serializeAws_json1_0SendVoiceMessageRequest - */ -const se_SendVoiceMessageRequest = (input: SendVoiceMessageRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Context != null && { Context: se_ContextMap(input.Context, context) }), - ...(input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber }), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.MaxPricePerMinute != null && { MaxPricePerMinute: input.MaxPricePerMinute }), - ...(input.MessageBody != null && { MessageBody: input.MessageBody }), - ...(input.MessageBodyTextType != null && { MessageBodyTextType: input.MessageBodyTextType }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - }; -}; +// se_SendVoiceMessageRequest omitted. -/** - * serializeAws_json1_0SetDefaultMessageTypeRequest - */ -const se_SetDefaultMessageTypeRequest = (input: SetDefaultMessageTypeRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - }; -}; +// se_SetDefaultMessageTypeRequest omitted. -/** - * serializeAws_json1_0SetDefaultSenderIdRequest - */ -const se_SetDefaultSenderIdRequest = (input: SetDefaultSenderIdRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.SenderId != null && { SenderId: input.SenderId }), - }; -}; +// se_SetDefaultSenderIdRequest omitted. -/** - * serializeAws_json1_0SetTextMessageSpendLimitOverrideRequest - */ -const se_SetTextMessageSpendLimitOverrideRequest = ( - input: SetTextMessageSpendLimitOverrideRequest, - context: __SerdeContext -): any => { - return { - ...(input.MonthlyLimit != null && { MonthlyLimit: input.MonthlyLimit }), - }; -}; +// se_SetTextMessageSpendLimitOverrideRequest omitted. -/** - * serializeAws_json1_0SetVoiceMessageSpendLimitOverrideRequest - */ -const se_SetVoiceMessageSpendLimitOverrideRequest = ( - input: SetVoiceMessageSpendLimitOverrideRequest, - context: __SerdeContext -): any => { - return { - ...(input.MonthlyLimit != null && { MonthlyLimit: input.MonthlyLimit }), - }; -}; +// se_SetVoiceMessageSpendLimitOverrideRequest omitted. -/** - * serializeAws_json1_0SnsDestination - */ -const se_SnsDestination = (input: SnsDestination, context: __SerdeContext): any => { - return { - ...(input.TopicArn != null && { TopicArn: input.TopicArn }), - }; -}; +// se_SnsDestination omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_NonEmptyTagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateEventDestinationRequest - */ -const se_UpdateEventDestinationRequest = (input: UpdateEventDestinationRequest, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsDestination != null && { - CloudWatchLogsDestination: se_CloudWatchLogsDestination(input.CloudWatchLogsDestination, context), - }), - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }), - ...(input.KinesisFirehoseDestination != null && { - KinesisFirehoseDestination: se_KinesisFirehoseDestination(input.KinesisFirehoseDestination, context), - }), - ...(input.MatchingEventTypes != null && { - MatchingEventTypes: se_EventTypeList(input.MatchingEventTypes, context), - }), - ...(input.SnsDestination != null && { SnsDestination: se_SnsDestination(input.SnsDestination, context) }), - }; -}; +// se_UpdateEventDestinationRequest omitted. -/** - * serializeAws_json1_0UpdatePhoneNumberRequest - */ -const se_UpdatePhoneNumberRequest = (input: UpdatePhoneNumberRequest, context: __SerdeContext): any => { - return { - ...(input.DeletionProtectionEnabled != null && { DeletionProtectionEnabled: input.DeletionProtectionEnabled }), - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.PhoneNumberId != null && { PhoneNumberId: input.PhoneNumberId }), - ...(input.SelfManagedOptOutsEnabled != null && { SelfManagedOptOutsEnabled: input.SelfManagedOptOutsEnabled }), - ...(input.TwoWayChannelArn != null && { TwoWayChannelArn: input.TwoWayChannelArn }), - ...(input.TwoWayEnabled != null && { TwoWayEnabled: input.TwoWayEnabled }), - }; -}; +// se_UpdatePhoneNumberRequest omitted. -/** - * serializeAws_json1_0UpdatePoolRequest - */ -const se_UpdatePoolRequest = (input: UpdatePoolRequest, context: __SerdeContext): any => { - return { - ...(input.DeletionProtectionEnabled != null && { DeletionProtectionEnabled: input.DeletionProtectionEnabled }), - ...(input.OptOutListName != null && { OptOutListName: input.OptOutListName }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - ...(input.SelfManagedOptOutsEnabled != null && { SelfManagedOptOutsEnabled: input.SelfManagedOptOutsEnabled }), - ...(input.SharedRoutesEnabled != null && { SharedRoutesEnabled: input.SharedRoutesEnabled }), - ...(input.TwoWayChannelArn != null && { TwoWayChannelArn: input.TwoWayChannelArn }), - ...(input.TwoWayEnabled != null && { TwoWayEnabled: input.TwoWayEnabled }), - }; -}; +// se_UpdatePoolRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0AccountAttribute - */ -const de_AccountAttribute = (output: any, context: __SerdeContext): AccountAttribute => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_AccountAttribute omitted. -/** - * deserializeAws_json1_0AccountAttributeList - */ -const de_AccountAttributeList = (output: any, context: __SerdeContext): AccountAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountAttribute(entry, context); - }); - return retVal; -}; +// de_AccountAttributeList omitted. -/** - * deserializeAws_json1_0AccountLimit - */ -const de_AccountLimit = (output: any, context: __SerdeContext): AccountLimit => { - return { - Max: __expectLong(output.Max), - Name: __expectString(output.Name), - Used: __expectLong(output.Used), - } as any; -}; +// de_AccountLimit omitted. -/** - * deserializeAws_json1_0AccountLimitList - */ -const de_AccountLimitList = (output: any, context: __SerdeContext): AccountLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountLimit(entry, context); - }); - return retVal; -}; +// de_AccountLimitList omitted. -/** - * deserializeAws_json1_0AssociateOriginationIdentityResult - */ -const de_AssociateOriginationIdentityResult = ( - output: any, - context: __SerdeContext -): AssociateOriginationIdentityResult => { - return { - IsoCountryCode: __expectString(output.IsoCountryCode), - OriginationIdentity: __expectString(output.OriginationIdentity), - OriginationIdentityArn: __expectString(output.OriginationIdentityArn), - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - } as any; -}; +// de_AssociateOriginationIdentityResult omitted. -/** - * deserializeAws_json1_0CloudWatchLogsDestination - */ -const de_CloudWatchLogsDestination = (output: any, context: __SerdeContext): CloudWatchLogsDestination => { - return { - IamRoleArn: __expectString(output.IamRoleArn), - LogGroupArn: __expectString(output.LogGroupArn), - } as any; -}; +// de_CloudWatchLogsDestination omitted. /** * deserializeAws_json1_0ConfigurationSetInformation */ const de_ConfigurationSetInformation = (output: any, context: __SerdeContext): ConfigurationSetInformation => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DefaultMessageType: __expectString(output.DefaultMessageType), - DefaultSenderId: __expectString(output.DefaultSenderId), - EventDestinations: - output.EventDestinations != null ? de_EventDestinationList(output.EventDestinations, context) : undefined, - } as any; + return take(output, { + ConfigurationSetArn: __expectString, + ConfigurationSetName: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultMessageType: __expectString, + DefaultSenderId: __expectString, + EventDestinations: _json, + }) as any; }; /** @@ -4525,523 +3711,222 @@ const de_ConfigurationSetInformationList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigurationSetInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; - +// de_ConflictException omitted. + /** * deserializeAws_json1_0CreateConfigurationSetResult */ const de_CreateConfigurationSetResult = (output: any, context: __SerdeContext): CreateConfigurationSetResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + ConfigurationSetArn: __expectString, + ConfigurationSetName: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + }) as any; }; -/** - * deserializeAws_json1_0CreateEventDestinationResult - */ -const de_CreateEventDestinationResult = (output: any, context: __SerdeContext): CreateEventDestinationResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - EventDestination: - output.EventDestination != null ? de_EventDestination(output.EventDestination, context) : undefined, - } as any; -}; +// de_CreateEventDestinationResult omitted. /** * deserializeAws_json1_0CreateOptOutListResult */ const de_CreateOptOutListResult = (output: any, context: __SerdeContext): CreateOptOutListResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - OptOutListArn: __expectString(output.OptOutListArn), - OptOutListName: __expectString(output.OptOutListName), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OptOutListArn: __expectString, + OptOutListName: __expectString, + Tags: _json, + }) as any; }; /** * deserializeAws_json1_0CreatePoolResult */ const de_CreatePoolResult = (output: any, context: __SerdeContext): CreatePoolResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - MessageType: __expectString(output.MessageType), - OptOutListName: __expectString(output.OptOutListName), - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - SharedRoutesEnabled: __expectBoolean(output.SharedRoutesEnabled), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + MessageType: __expectString, + OptOutListName: __expectString, + PoolArn: __expectString, + PoolId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + SharedRoutesEnabled: __expectBoolean, + Status: __expectString, + Tags: _json, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_0DeleteConfigurationSetResult */ const de_DeleteConfigurationSetResult = (output: any, context: __SerdeContext): DeleteConfigurationSetResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DefaultMessageType: __expectString(output.DefaultMessageType), - DefaultSenderId: __expectString(output.DefaultSenderId), - EventDestinations: - output.EventDestinations != null ? de_EventDestinationList(output.EventDestinations, context) : undefined, - } as any; + return take(output, { + ConfigurationSetArn: __expectString, + ConfigurationSetName: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultMessageType: __expectString, + DefaultSenderId: __expectString, + EventDestinations: _json, + }) as any; }; -/** - * deserializeAws_json1_0DeleteDefaultMessageTypeResult - */ -const de_DeleteDefaultMessageTypeResult = (output: any, context: __SerdeContext): DeleteDefaultMessageTypeResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - MessageType: __expectString(output.MessageType), - } as any; -}; +// de_DeleteDefaultMessageTypeResult omitted. -/** - * deserializeAws_json1_0DeleteDefaultSenderIdResult - */ -const de_DeleteDefaultSenderIdResult = (output: any, context: __SerdeContext): DeleteDefaultSenderIdResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - SenderId: __expectString(output.SenderId), - } as any; -}; +// de_DeleteDefaultSenderIdResult omitted. -/** - * deserializeAws_json1_0DeleteEventDestinationResult - */ -const de_DeleteEventDestinationResult = (output: any, context: __SerdeContext): DeleteEventDestinationResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - EventDestination: - output.EventDestination != null ? de_EventDestination(output.EventDestination, context) : undefined, - } as any; -}; +// de_DeleteEventDestinationResult omitted. -/** - * deserializeAws_json1_0DeleteKeywordResult - */ -const de_DeleteKeywordResult = (output: any, context: __SerdeContext): DeleteKeywordResult => { - return { - Keyword: __expectString(output.Keyword), - KeywordAction: __expectString(output.KeywordAction), - KeywordMessage: __expectString(output.KeywordMessage), - OriginationIdentity: __expectString(output.OriginationIdentity), - OriginationIdentityArn: __expectString(output.OriginationIdentityArn), - } as any; -}; +// de_DeleteKeywordResult omitted. /** * deserializeAws_json1_0DeleteOptedOutNumberResult */ const de_DeleteOptedOutNumberResult = (output: any, context: __SerdeContext): DeleteOptedOutNumberResult => { - return { - EndUserOptedOut: __expectBoolean(output.EndUserOptedOut), - OptOutListArn: __expectString(output.OptOutListArn), - OptOutListName: __expectString(output.OptOutListName), - OptedOutNumber: __expectString(output.OptedOutNumber), - OptedOutTimestamp: - output.OptedOutTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OptedOutTimestamp))) - : undefined, - } as any; + return take(output, { + EndUserOptedOut: __expectBoolean, + OptOutListArn: __expectString, + OptOutListName: __expectString, + OptedOutNumber: __expectString, + OptedOutTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0DeleteOptOutListResult */ const de_DeleteOptOutListResult = (output: any, context: __SerdeContext): DeleteOptOutListResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - OptOutListArn: __expectString(output.OptOutListArn), - OptOutListName: __expectString(output.OptOutListName), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OptOutListArn: __expectString, + OptOutListName: __expectString, + }) as any; }; /** * deserializeAws_json1_0DeletePoolResult */ const de_DeletePoolResult = (output: any, context: __SerdeContext): DeletePoolResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - MessageType: __expectString(output.MessageType), - OptOutListName: __expectString(output.OptOutListName), - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - SharedRoutesEnabled: __expectBoolean(output.SharedRoutesEnabled), - Status: __expectString(output.Status), - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MessageType: __expectString, + OptOutListName: __expectString, + PoolArn: __expectString, + PoolId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + SharedRoutesEnabled: __expectBoolean, + Status: __expectString, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_0DeleteTextMessageSpendLimitOverrideResult - */ -const de_DeleteTextMessageSpendLimitOverrideResult = ( - output: any, - context: __SerdeContext -): DeleteTextMessageSpendLimitOverrideResult => { - return { - MonthlyLimit: __expectLong(output.MonthlyLimit), - } as any; -}; +// de_DeleteTextMessageSpendLimitOverrideResult omitted. -/** - * deserializeAws_json1_0DeleteVoiceMessageSpendLimitOverrideResult - */ -const de_DeleteVoiceMessageSpendLimitOverrideResult = ( - output: any, - context: __SerdeContext -): DeleteVoiceMessageSpendLimitOverrideResult => { - return { - MonthlyLimit: __expectLong(output.MonthlyLimit), - } as any; -}; +// de_DeleteVoiceMessageSpendLimitOverrideResult omitted. -/** - * deserializeAws_json1_0DescribeAccountAttributesResult - */ -const de_DescribeAccountAttributesResult = (output: any, context: __SerdeContext): DescribeAccountAttributesResult => { - return { - AccountAttributes: - output.AccountAttributes != null ? de_AccountAttributeList(output.AccountAttributes, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeAccountAttributesResult omitted. -/** - * deserializeAws_json1_0DescribeAccountLimitsResult - */ -const de_DescribeAccountLimitsResult = (output: any, context: __SerdeContext): DescribeAccountLimitsResult => { - return { - AccountLimits: output.AccountLimits != null ? de_AccountLimitList(output.AccountLimits, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DescribeAccountLimitsResult omitted. /** * deserializeAws_json1_0DescribeConfigurationSetsResult */ const de_DescribeConfigurationSetsResult = (output: any, context: __SerdeContext): DescribeConfigurationSetsResult => { - return { - ConfigurationSets: - output.ConfigurationSets != null - ? de_ConfigurationSetInformationList(output.ConfigurationSets, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ConfigurationSets: (_: any) => de_ConfigurationSetInformationList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0DescribeKeywordsResult - */ -const de_DescribeKeywordsResult = (output: any, context: __SerdeContext): DescribeKeywordsResult => { - return { - Keywords: output.Keywords != null ? de_KeywordInformationList(output.Keywords, context) : undefined, - NextToken: __expectString(output.NextToken), - OriginationIdentity: __expectString(output.OriginationIdentity), - OriginationIdentityArn: __expectString(output.OriginationIdentityArn), - } as any; -}; +// de_DescribeKeywordsResult omitted. /** * deserializeAws_json1_0DescribeOptedOutNumbersResult */ const de_DescribeOptedOutNumbersResult = (output: any, context: __SerdeContext): DescribeOptedOutNumbersResult => { - return { - NextToken: __expectString(output.NextToken), - OptOutListArn: __expectString(output.OptOutListArn), - OptOutListName: __expectString(output.OptOutListName), - OptedOutNumbers: - output.OptedOutNumbers != null ? de_OptedOutNumberInformationList(output.OptedOutNumbers, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + OptOutListArn: __expectString, + OptOutListName: __expectString, + OptedOutNumbers: (_: any) => de_OptedOutNumberInformationList(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeOptOutListsResult */ const de_DescribeOptOutListsResult = (output: any, context: __SerdeContext): DescribeOptOutListsResult => { - return { - NextToken: __expectString(output.NextToken), - OptOutLists: output.OptOutLists != null ? de_OptOutListInformationList(output.OptOutLists, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + OptOutLists: (_: any) => de_OptOutListInformationList(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribePhoneNumbersResult */ const de_DescribePhoneNumbersResult = (output: any, context: __SerdeContext): DescribePhoneNumbersResult => { - return { - NextToken: __expectString(output.NextToken), - PhoneNumbers: output.PhoneNumbers != null ? de_PhoneNumberInformationList(output.PhoneNumbers, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PhoneNumbers: (_: any) => de_PhoneNumberInformationList(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribePoolsResult */ const de_DescribePoolsResult = (output: any, context: __SerdeContext): DescribePoolsResult => { - return { - NextToken: __expectString(output.NextToken), - Pools: output.Pools != null ? de_PoolInformationList(output.Pools, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Pools: (_: any) => de_PoolInformationList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DescribeSenderIdsResult - */ -const de_DescribeSenderIdsResult = (output: any, context: __SerdeContext): DescribeSenderIdsResult => { - return { - NextToken: __expectString(output.NextToken), - SenderIds: output.SenderIds != null ? de_SenderIdInformationList(output.SenderIds, context) : undefined, - } as any; -}; +// de_DescribeSenderIdsResult omitted. -/** - * deserializeAws_json1_0DescribeSpendLimitsResult - */ -const de_DescribeSpendLimitsResult = (output: any, context: __SerdeContext): DescribeSpendLimitsResult => { - return { - NextToken: __expectString(output.NextToken), - SpendLimits: output.SpendLimits != null ? de_SpendLimitList(output.SpendLimits, context) : undefined, - } as any; -}; +// de_DescribeSpendLimitsResult omitted. -/** - * deserializeAws_json1_0DisassociateOriginationIdentityResult - */ -const de_DisassociateOriginationIdentityResult = ( - output: any, - context: __SerdeContext -): DisassociateOriginationIdentityResult => { - return { - IsoCountryCode: __expectString(output.IsoCountryCode), - OriginationIdentity: __expectString(output.OriginationIdentity), - OriginationIdentityArn: __expectString(output.OriginationIdentityArn), - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - } as any; -}; +// de_DisassociateOriginationIdentityResult omitted. -/** - * deserializeAws_json1_0EventDestination - */ -const de_EventDestination = (output: any, context: __SerdeContext): EventDestination => { - return { - CloudWatchLogsDestination: - output.CloudWatchLogsDestination != null - ? de_CloudWatchLogsDestination(output.CloudWatchLogsDestination, context) - : undefined, - Enabled: __expectBoolean(output.Enabled), - EventDestinationName: __expectString(output.EventDestinationName), - KinesisFirehoseDestination: - output.KinesisFirehoseDestination != null - ? de_KinesisFirehoseDestination(output.KinesisFirehoseDestination, context) - : undefined, - MatchingEventTypes: - output.MatchingEventTypes != null ? de_EventTypeList(output.MatchingEventTypes, context) : undefined, - SnsDestination: output.SnsDestination != null ? de_SnsDestination(output.SnsDestination, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0EventDestinationList - */ -const de_EventDestinationList = (output: any, context: __SerdeContext): EventDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventDestination(entry, context); - }); - return retVal; -}; +// de_EventDestination omitted. -/** - * deserializeAws_json1_0EventTypeList - */ -const de_EventTypeList = (output: any, context: __SerdeContext): (EventType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EventDestinationList omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - RequestId: __expectString(output.RequestId), - } as any; -}; +// de_EventTypeList omitted. -/** - * deserializeAws_json1_0KeywordInformation - */ -const de_KeywordInformation = (output: any, context: __SerdeContext): KeywordInformation => { - return { - Keyword: __expectString(output.Keyword), - KeywordAction: __expectString(output.KeywordAction), - KeywordMessage: __expectString(output.KeywordMessage), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0KeywordInformationList - */ -const de_KeywordInformationList = (output: any, context: __SerdeContext): KeywordInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeywordInformation(entry, context); - }); - return retVal; -}; +// de_KeywordInformation omitted. -/** - * deserializeAws_json1_0KinesisFirehoseDestination - */ -const de_KinesisFirehoseDestination = (output: any, context: __SerdeContext): KinesisFirehoseDestination => { - return { - DeliveryStreamArn: __expectString(output.DeliveryStreamArn), - IamRoleArn: __expectString(output.IamRoleArn), - } as any; -}; +// de_KeywordInformationList omitted. -/** - * deserializeAws_json1_0ListPoolOriginationIdentitiesResult - */ -const de_ListPoolOriginationIdentitiesResult = ( - output: any, - context: __SerdeContext -): ListPoolOriginationIdentitiesResult => { - return { - NextToken: __expectString(output.NextToken), - OriginationIdentities: - output.OriginationIdentities != null - ? de_OriginationIdentityMetadataList(output.OriginationIdentities, context) - : undefined, - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - } as any; -}; +// de_KinesisFirehoseDestination omitted. -/** - * deserializeAws_json1_0ListTagsForResourceResult - */ -const de_ListTagsForResourceResult = (output: any, context: __SerdeContext): ListTagsForResourceResult => { - return { - ResourceArn: __expectString(output.ResourceArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListPoolOriginationIdentitiesResult omitted. -/** - * deserializeAws_json1_0MessageTypeList - */ -const de_MessageTypeList = (output: any, context: __SerdeContext): (MessageType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListTagsForResourceResult omitted. -/** - * deserializeAws_json1_0NumberCapabilityList - */ -const de_NumberCapabilityList = (output: any, context: __SerdeContext): (NumberCapability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MessageTypeList omitted. + +// de_NumberCapabilityList omitted. /** * deserializeAws_json1_0OptedOutNumberInformation */ const de_OptedOutNumberInformation = (output: any, context: __SerdeContext): OptedOutNumberInformation => { - return { - EndUserOptedOut: __expectBoolean(output.EndUserOptedOut), - OptedOutNumber: __expectString(output.OptedOutNumber), - OptedOutTimestamp: - output.OptedOutTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OptedOutTimestamp))) - : undefined, - } as any; + return take(output, { + EndUserOptedOut: __expectBoolean, + OptedOutNumber: __expectString, + OptedOutTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5051,9 +3936,6 @@ const de_OptedOutNumberInformationList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OptedOutNumberInformation(entry, context); }); return retVal; @@ -5063,14 +3945,11 @@ const de_OptedOutNumberInformationList = (output: any, context: __SerdeContext): * deserializeAws_json1_0OptOutListInformation */ const de_OptOutListInformation = (output: any, context: __SerdeContext): OptOutListInformation => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - OptOutListArn: __expectString(output.OptOutListArn), - OptOutListName: __expectString(output.OptOutListName), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OptOutListArn: __expectString, + OptOutListName: __expectString, + }) as any; }; /** @@ -5080,68 +3959,37 @@ const de_OptOutListInformationList = (output: any, context: __SerdeContext): Opt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OptOutListInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0OriginationIdentityMetadata - */ -const de_OriginationIdentityMetadata = (output: any, context: __SerdeContext): OriginationIdentityMetadata => { - return { - IsoCountryCode: __expectString(output.IsoCountryCode), - NumberCapabilities: - output.NumberCapabilities != null ? de_NumberCapabilityList(output.NumberCapabilities, context) : undefined, - OriginationIdentity: __expectString(output.OriginationIdentity), - OriginationIdentityArn: __expectString(output.OriginationIdentityArn), - } as any; -}; +// de_OriginationIdentityMetadata omitted. -/** - * deserializeAws_json1_0OriginationIdentityMetadataList - */ -const de_OriginationIdentityMetadataList = (output: any, context: __SerdeContext): OriginationIdentityMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OriginationIdentityMetadata(entry, context); - }); - return retVal; -}; +// de_OriginationIdentityMetadataList omitted. /** * deserializeAws_json1_0PhoneNumberInformation */ const de_PhoneNumberInformation = (output: any, context: __SerdeContext): PhoneNumberInformation => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - IsoCountryCode: __expectString(output.IsoCountryCode), - MessageType: __expectString(output.MessageType), - MonthlyLeasingPrice: __expectString(output.MonthlyLeasingPrice), - NumberCapabilities: - output.NumberCapabilities != null ? de_NumberCapabilityList(output.NumberCapabilities, context) : undefined, - NumberType: __expectString(output.NumberType), - OptOutListName: __expectString(output.OptOutListName), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberArn: __expectString(output.PhoneNumberArn), - PhoneNumberId: __expectString(output.PhoneNumberId), - PoolId: __expectString(output.PoolId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - Status: __expectString(output.Status), - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + IsoCountryCode: __expectString, + MessageType: __expectString, + MonthlyLeasingPrice: __expectString, + NumberCapabilities: _json, + NumberType: __expectString, + OptOutListName: __expectString, + PhoneNumber: __expectString, + PhoneNumberArn: __expectString, + PhoneNumberId: __expectString, + PoolId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + Status: __expectString, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; /** @@ -5151,9 +3999,6 @@ const de_PhoneNumberInformationList = (output: any, context: __SerdeContext): Ph const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PhoneNumberInformation(entry, context); }); return retVal; @@ -5163,22 +4008,19 @@ const de_PhoneNumberInformationList = (output: any, context: __SerdeContext): Ph * deserializeAws_json1_0PoolInformation */ const de_PoolInformation = (output: any, context: __SerdeContext): PoolInformation => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - MessageType: __expectString(output.MessageType), - OptOutListName: __expectString(output.OptOutListName), - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - SharedRoutesEnabled: __expectBoolean(output.SharedRoutesEnabled), - Status: __expectString(output.Status), - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + MessageType: __expectString, + OptOutListName: __expectString, + PoolArn: __expectString, + PoolId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + SharedRoutesEnabled: __expectBoolean, + Status: __expectString, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; /** @@ -5188,391 +4030,158 @@ const de_PoolInformationList = (output: any, context: __SerdeContext): PoolInfor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PoolInformation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0PutKeywordResult - */ -const de_PutKeywordResult = (output: any, context: __SerdeContext): PutKeywordResult => { - return { - Keyword: __expectString(output.Keyword), - KeywordAction: __expectString(output.KeywordAction), - KeywordMessage: __expectString(output.KeywordMessage), - OriginationIdentity: __expectString(output.OriginationIdentity), - OriginationIdentityArn: __expectString(output.OriginationIdentityArn), - } as any; -}; +// de_PutKeywordResult omitted. /** * deserializeAws_json1_0PutOptedOutNumberResult */ const de_PutOptedOutNumberResult = (output: any, context: __SerdeContext): PutOptedOutNumberResult => { - return { - EndUserOptedOut: __expectBoolean(output.EndUserOptedOut), - OptOutListArn: __expectString(output.OptOutListArn), - OptOutListName: __expectString(output.OptOutListName), - OptedOutNumber: __expectString(output.OptedOutNumber), - OptedOutTimestamp: - output.OptedOutTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OptedOutTimestamp))) - : undefined, - } as any; + return take(output, { + EndUserOptedOut: __expectBoolean, + OptOutListArn: __expectString, + OptOutListName: __expectString, + OptedOutNumber: __expectString, + OptedOutTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0ReleasePhoneNumberResult */ const de_ReleasePhoneNumberResult = (output: any, context: __SerdeContext): ReleasePhoneNumberResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - IsoCountryCode: __expectString(output.IsoCountryCode), - MessageType: __expectString(output.MessageType), - MonthlyLeasingPrice: __expectString(output.MonthlyLeasingPrice), - NumberCapabilities: - output.NumberCapabilities != null ? de_NumberCapabilityList(output.NumberCapabilities, context) : undefined, - NumberType: __expectString(output.NumberType), - OptOutListName: __expectString(output.OptOutListName), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberArn: __expectString(output.PhoneNumberArn), - PhoneNumberId: __expectString(output.PhoneNumberId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - Status: __expectString(output.Status), - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + IsoCountryCode: __expectString, + MessageType: __expectString, + MonthlyLeasingPrice: __expectString, + NumberCapabilities: _json, + NumberType: __expectString, + OptOutListName: __expectString, + PhoneNumber: __expectString, + PhoneNumberArn: __expectString, + PhoneNumberId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + Status: __expectString, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_0RequestPhoneNumberResult */ const de_RequestPhoneNumberResult = (output: any, context: __SerdeContext): RequestPhoneNumberResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - IsoCountryCode: __expectString(output.IsoCountryCode), - MessageType: __expectString(output.MessageType), - MonthlyLeasingPrice: __expectString(output.MonthlyLeasingPrice), - NumberCapabilities: - output.NumberCapabilities != null ? de_NumberCapabilityList(output.NumberCapabilities, context) : undefined, - NumberType: __expectString(output.NumberType), - OptOutListName: __expectString(output.OptOutListName), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberArn: __expectString(output.PhoneNumberArn), - PhoneNumberId: __expectString(output.PhoneNumberId), - PoolId: __expectString(output.PoolId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; -}; - -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + IsoCountryCode: __expectString, + MessageType: __expectString, + MonthlyLeasingPrice: __expectString, + NumberCapabilities: _json, + NumberType: __expectString, + OptOutListName: __expectString, + PhoneNumber: __expectString, + PhoneNumberArn: __expectString, + PhoneNumberId: __expectString, + PoolId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + Status: __expectString, + Tags: _json, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_0SenderIdInformation - */ -const de_SenderIdInformation = (output: any, context: __SerdeContext): SenderIdInformation => { - return { - IsoCountryCode: __expectString(output.IsoCountryCode), - MessageTypes: output.MessageTypes != null ? de_MessageTypeList(output.MessageTypes, context) : undefined, - MonthlyLeasingPrice: __expectString(output.MonthlyLeasingPrice), - SenderId: __expectString(output.SenderId), - SenderIdArn: __expectString(output.SenderIdArn), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0SenderIdInformationList - */ -const de_SenderIdInformationList = (output: any, context: __SerdeContext): SenderIdInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SenderIdInformation(entry, context); - }); - return retVal; -}; +// de_SenderIdInformation omitted. -/** - * deserializeAws_json1_0SendTextMessageResult - */ -const de_SendTextMessageResult = (output: any, context: __SerdeContext): SendTextMessageResult => { - return { - MessageId: __expectString(output.MessageId), - } as any; -}; +// de_SenderIdInformationList omitted. -/** - * deserializeAws_json1_0SendVoiceMessageResult - */ -const de_SendVoiceMessageResult = (output: any, context: __SerdeContext): SendVoiceMessageResult => { - return { - MessageId: __expectString(output.MessageId), - } as any; -}; +// de_SendTextMessageResult omitted. -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// de_SendVoiceMessageResult omitted. -/** - * deserializeAws_json1_0SetDefaultMessageTypeResult - */ -const de_SetDefaultMessageTypeResult = (output: any, context: __SerdeContext): SetDefaultMessageTypeResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - MessageType: __expectString(output.MessageType), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_0SetDefaultSenderIdResult - */ -const de_SetDefaultSenderIdResult = (output: any, context: __SerdeContext): SetDefaultSenderIdResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - SenderId: __expectString(output.SenderId), - } as any; -}; +// de_SetDefaultMessageTypeResult omitted. -/** - * deserializeAws_json1_0SetTextMessageSpendLimitOverrideResult - */ -const de_SetTextMessageSpendLimitOverrideResult = ( - output: any, - context: __SerdeContext -): SetTextMessageSpendLimitOverrideResult => { - return { - MonthlyLimit: __expectLong(output.MonthlyLimit), - } as any; -}; +// de_SetDefaultSenderIdResult omitted. -/** - * deserializeAws_json1_0SetVoiceMessageSpendLimitOverrideResult - */ -const de_SetVoiceMessageSpendLimitOverrideResult = ( - output: any, - context: __SerdeContext -): SetVoiceMessageSpendLimitOverrideResult => { - return { - MonthlyLimit: __expectLong(output.MonthlyLimit), - } as any; -}; +// de_SetTextMessageSpendLimitOverrideResult omitted. -/** - * deserializeAws_json1_0SnsDestination - */ -const de_SnsDestination = (output: any, context: __SerdeContext): SnsDestination => { - return { - TopicArn: __expectString(output.TopicArn), - } as any; -}; +// de_SetVoiceMessageSpendLimitOverrideResult omitted. -/** - * deserializeAws_json1_0SpendLimit - */ -const de_SpendLimit = (output: any, context: __SerdeContext): SpendLimit => { - return { - EnforcedLimit: __expectLong(output.EnforcedLimit), - MaxLimit: __expectLong(output.MaxLimit), - Name: __expectString(output.Name), - Overridden: __expectBoolean(output.Overridden), - } as any; -}; +// de_SnsDestination omitted. -/** - * deserializeAws_json1_0SpendLimitList - */ -const de_SpendLimitList = (output: any, context: __SerdeContext): SpendLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SpendLimit(entry, context); - }); - return retVal; -}; +// de_SpendLimit omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SpendLimitList omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagResourceResult - */ -const de_TagResourceResult = (output: any, context: __SerdeContext): TagResourceResult => { - return {} as any; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TagResourceResult omitted. -/** - * deserializeAws_json1_0UntagResourceResult - */ -const de_UntagResourceResult = (output: any, context: __SerdeContext): UntagResourceResult => { - return {} as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UpdateEventDestinationResult - */ -const de_UpdateEventDestinationResult = (output: any, context: __SerdeContext): UpdateEventDestinationResult => { - return { - ConfigurationSetArn: __expectString(output.ConfigurationSetArn), - ConfigurationSetName: __expectString(output.ConfigurationSetName), - EventDestination: - output.EventDestination != null ? de_EventDestination(output.EventDestination, context) : undefined, - } as any; -}; +// de_UntagResourceResult omitted. + +// de_UpdateEventDestinationResult omitted. /** * deserializeAws_json1_0UpdatePhoneNumberResult */ const de_UpdatePhoneNumberResult = (output: any, context: __SerdeContext): UpdatePhoneNumberResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - IsoCountryCode: __expectString(output.IsoCountryCode), - MessageType: __expectString(output.MessageType), - MonthlyLeasingPrice: __expectString(output.MonthlyLeasingPrice), - NumberCapabilities: - output.NumberCapabilities != null ? de_NumberCapabilityList(output.NumberCapabilities, context) : undefined, - NumberType: __expectString(output.NumberType), - OptOutListName: __expectString(output.OptOutListName), - PhoneNumber: __expectString(output.PhoneNumber), - PhoneNumberArn: __expectString(output.PhoneNumberArn), - PhoneNumberId: __expectString(output.PhoneNumberId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - Status: __expectString(output.Status), - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + IsoCountryCode: __expectString, + MessageType: __expectString, + MonthlyLeasingPrice: __expectString, + NumberCapabilities: _json, + NumberType: __expectString, + OptOutListName: __expectString, + PhoneNumber: __expectString, + PhoneNumberArn: __expectString, + PhoneNumberId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + Status: __expectString, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_0UpdatePoolResult */ const de_UpdatePoolResult = (output: any, context: __SerdeContext): UpdatePoolResult => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - DeletionProtectionEnabled: __expectBoolean(output.DeletionProtectionEnabled), - MessageType: __expectString(output.MessageType), - OptOutListName: __expectString(output.OptOutListName), - PoolArn: __expectString(output.PoolArn), - PoolId: __expectString(output.PoolId), - SelfManagedOptOutsEnabled: __expectBoolean(output.SelfManagedOptOutsEnabled), - SharedRoutesEnabled: __expectBoolean(output.SharedRoutesEnabled), - Status: __expectString(output.Status), - TwoWayChannelArn: __expectString(output.TwoWayChannelArn), - TwoWayEnabled: __expectBoolean(output.TwoWayEnabled), - } as any; -}; - -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Fields: output.Fields != null ? de_ValidationExceptionFieldList(output.Fields, context) : undefined, - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtectionEnabled: __expectBoolean, + MessageType: __expectString, + OptOutListName: __expectString, + PoolArn: __expectString, + PoolId: __expectString, + SelfManagedOptOutsEnabled: __expectBoolean, + SharedRoutesEnabled: __expectBoolean, + Status: __expectString, + TwoWayChannelArn: __expectString, + TwoWayEnabled: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_0ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_0ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -5594,6 +4203,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-pinpoint-sms-voice/src/protocols/Aws_restJson1.ts b/clients/client-pinpoint-sms-voice/src/protocols/Aws_restJson1.ts index c8d9c5090563..d0d9f889050a 100644 --- a/clients/client-pinpoint-sms-voice/src/protocols/Aws_restJson1.ts +++ b/clients/client-pinpoint-sms-voice/src/protocols/Aws_restJson1.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -51,7 +52,6 @@ import { BadRequestException, CallInstructionsMessageType, CloudWatchLogsDestination, - EventDestination, EventDestinationDefinition, EventType, InternalServiceErrorException, @@ -80,9 +80,11 @@ export const se_CreateConfigurationSetCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/sms-voice/configuration-sets"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -117,12 +119,12 @@ export const se_CreateConfigurationSetEventDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EventDestination != null && { - EventDestination: se_EventDestinationDefinition(input.EventDestination, context), - }), - ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }), - }); + body = JSON.stringify( + take(input, { + EventDestination: (_) => _json(_), + EventDestinationName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -280,13 +282,15 @@ export const se_SendVoiceMessageCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/sms-voice/voice/message"; let body: any; - body = JSON.stringify({ - ...(input.CallerId != null && { CallerId: input.CallerId }), - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Content != null && { Content: se_VoiceMessageContent(input.Content, context) }), - ...(input.DestinationPhoneNumber != null && { DestinationPhoneNumber: input.DestinationPhoneNumber }), - ...(input.OriginationPhoneNumber != null && { OriginationPhoneNumber: input.OriginationPhoneNumber }), - }); + body = JSON.stringify( + take(input, { + CallerId: [], + ConfigurationSetName: [], + Content: (_) => _json(_), + DestinationPhoneNumber: [], + OriginationPhoneNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -329,11 +333,11 @@ export const se_UpdateConfigurationSetEventDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EventDestination != null && { - EventDestination: se_EventDestinationDefinition(input.EventDestination, context), - }), - }); + body = JSON.stringify( + take(input, { + EventDestination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -392,10 +396,9 @@ const de_CreateConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -451,10 +454,9 @@ const de_CreateConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -504,10 +506,9 @@ const de_DeleteConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -557,10 +558,9 @@ const de_DeleteConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -580,9 +580,10 @@ export const de_GetConfigurationSetEventDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventDestinations != null) { - contents.EventDestinations = de_EventDestinations(data.EventDestinations, context); - } + const doc = take(data, { + EventDestinations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -613,10 +614,9 @@ const de_GetConfigurationSetEventDestinationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -636,12 +636,11 @@ export const de_ListConfigurationSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConfigurationSets != null) { - contents.ConfigurationSets = de_ConfigurationSets(data.ConfigurationSets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ConfigurationSets: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -669,10 +668,9 @@ const de_ListConfigurationSetsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -692,9 +690,10 @@ export const de_SendVoiceMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -722,10 +721,9 @@ const de_SendVoiceMessageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -775,16 +773,15 @@ const de_UpdateConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AlreadyExistsExceptionRes */ @@ -794,9 +791,10 @@ const de_AlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -810,9 +808,10 @@ const de_AlreadyExistsExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -829,9 +828,10 @@ const de_InternalServiceErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -848,9 +848,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -864,9 +865,10 @@ const de_LimitExceededExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -883,9 +885,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -893,203 +896,37 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CallInstructionsMessageType - */ -const se_CallInstructionsMessageType = (input: CallInstructionsMessageType, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_CallInstructionsMessageType omitted. -/** - * serializeAws_restJson1CloudWatchLogsDestination - */ -const se_CloudWatchLogsDestination = (input: CloudWatchLogsDestination, context: __SerdeContext): any => { - return { - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }), - }; -}; +// se_CloudWatchLogsDestination omitted. -/** - * serializeAws_restJson1EventDestinationDefinition - */ -const se_EventDestinationDefinition = (input: EventDestinationDefinition, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsDestination != null && { - CloudWatchLogsDestination: se_CloudWatchLogsDestination(input.CloudWatchLogsDestination, context), - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KinesisFirehoseDestination != null && { - KinesisFirehoseDestination: se_KinesisFirehoseDestination(input.KinesisFirehoseDestination, context), - }), - ...(input.MatchingEventTypes != null && { MatchingEventTypes: se_EventTypes(input.MatchingEventTypes, context) }), - ...(input.SnsDestination != null && { SnsDestination: se_SnsDestination(input.SnsDestination, context) }), - }; -}; +// se_EventDestinationDefinition omitted. -/** - * serializeAws_restJson1EventTypes - */ -const se_EventTypes = (input: (EventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypes omitted. -/** - * serializeAws_restJson1KinesisFirehoseDestination - */ -const se_KinesisFirehoseDestination = (input: KinesisFirehoseDestination, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - }; -}; +// se_KinesisFirehoseDestination omitted. -/** - * serializeAws_restJson1PlainTextMessageType - */ -const se_PlainTextMessageType = (input: PlainTextMessageType, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - }; -}; +// se_PlainTextMessageType omitted. -/** - * serializeAws_restJson1SnsDestination - */ -const se_SnsDestination = (input: SnsDestination, context: __SerdeContext): any => { - return { - ...(input.TopicArn != null && { TopicArn: input.TopicArn }), - }; -}; +// se_SnsDestination omitted. -/** - * serializeAws_restJson1SSMLMessageType - */ -const se_SSMLMessageType = (input: SSMLMessageType, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Text != null && { Text: input.Text }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - }; -}; +// se_SSMLMessageType omitted. -/** - * serializeAws_restJson1VoiceMessageContent - */ -const se_VoiceMessageContent = (input: VoiceMessageContent, context: __SerdeContext): any => { - return { - ...(input.CallInstructionsMessage != null && { - CallInstructionsMessage: se_CallInstructionsMessageType(input.CallInstructionsMessage, context), - }), - ...(input.PlainTextMessage != null && { - PlainTextMessage: se_PlainTextMessageType(input.PlainTextMessage, context), - }), - ...(input.SSMLMessage != null && { SSMLMessage: se_SSMLMessageType(input.SSMLMessage, context) }), - }; -}; +// se_VoiceMessageContent omitted. -/** - * deserializeAws_restJson1CloudWatchLogsDestination - */ -const de_CloudWatchLogsDestination = (output: any, context: __SerdeContext): CloudWatchLogsDestination => { - return { - IamRoleArn: __expectString(output.IamRoleArn), - LogGroupArn: __expectString(output.LogGroupArn), - } as any; -}; +// de_CloudWatchLogsDestination omitted. -/** - * deserializeAws_restJson1ConfigurationSets - */ -const de_ConfigurationSets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConfigurationSets omitted. -/** - * deserializeAws_restJson1EventDestination - */ -const de_EventDestination = (output: any, context: __SerdeContext): EventDestination => { - return { - CloudWatchLogsDestination: - output.CloudWatchLogsDestination != null - ? de_CloudWatchLogsDestination(output.CloudWatchLogsDestination, context) - : undefined, - Enabled: __expectBoolean(output.Enabled), - KinesisFirehoseDestination: - output.KinesisFirehoseDestination != null - ? de_KinesisFirehoseDestination(output.KinesisFirehoseDestination, context) - : undefined, - MatchingEventTypes: - output.MatchingEventTypes != null ? de_EventTypes(output.MatchingEventTypes, context) : undefined, - Name: __expectString(output.Name), - SnsDestination: output.SnsDestination != null ? de_SnsDestination(output.SnsDestination, context) : undefined, - } as any; -}; +// de_EventDestination omitted. -/** - * deserializeAws_restJson1EventDestinations - */ -const de_EventDestinations = (output: any, context: __SerdeContext): EventDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventDestination(entry, context); - }); - return retVal; -}; +// de_EventDestinations omitted. -/** - * deserializeAws_restJson1EventTypes - */ -const de_EventTypes = (output: any, context: __SerdeContext): (EventType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EventTypes omitted. -/** - * deserializeAws_restJson1KinesisFirehoseDestination - */ -const de_KinesisFirehoseDestination = (output: any, context: __SerdeContext): KinesisFirehoseDestination => { - return { - DeliveryStreamArn: __expectString(output.DeliveryStreamArn), - IamRoleArn: __expectString(output.IamRoleArn), - } as any; -}; +// de_KinesisFirehoseDestination omitted. -/** - * deserializeAws_restJson1SnsDestination - */ -const de_SnsDestination = (output: any, context: __SerdeContext): SnsDestination => { - return { - TopicArn: __expectString(output.TopicArn), - } as any; -}; +// de_SnsDestination omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-pinpoint/src/protocols/Aws_restJson1.ts b/clients/client-pinpoint/src/protocols/Aws_restJson1.ts index 909353be5504..2a05e1d5c122 100644 --- a/clients/client-pinpoint/src/protocols/Aws_restJson1.ts +++ b/clients/client-pinpoint/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,11 +10,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -259,35 +261,24 @@ import { import { VerifyOTPMessageCommandInput, VerifyOTPMessageCommandOutput } from "../commands/VerifyOTPMessageCommand"; import { __EndpointTypesElement, - ActivitiesResponse, Activity, - ActivityResponse, AddressConfiguration, ADMChannelRequest, - ADMChannelResponse, ADMMessage, AndroidPushNotificationTemplate, APNSChannelRequest, - APNSChannelResponse, APNSMessage, APNSPushNotificationTemplate, APNSSandboxChannelRequest, - APNSSandboxChannelResponse, APNSVoipChannelRequest, - APNSVoipChannelResponse, APNSVoipSandboxChannelRequest, - APNSVoipSandboxChannelResponse, ApplicationDateRangeKpiResponse, ApplicationResponse, - ApplicationSettingsResource, ApplicationsResponse, AttributeDimension, - AttributesResource, BadRequestException, BaiduChannelRequest, - BaiduChannelResponse, BaiduMessage, - BaseKpiResult, CampaignCustomMessage, CampaignDateRangeKpiResponse, CampaignEmailMessage, @@ -298,9 +289,6 @@ import { CampaignResponse, CampaignSmsMessage, CampaignsResponse, - CampaignState, - ChannelResponse, - ChannelsResponse, ClosedDays, ClosedDaysRule, Condition, @@ -309,17 +297,14 @@ import { ContactCenterActivity, CreateApplicationRequest, CreateRecommenderConfigurationShape, - CreateTemplateMessageBody, CustomDeliveryConfiguration, CustomMessageActivity, - DayOfWeek, DefaultButtonConfiguration, DefaultMessage, DefaultPushNotificationMessage, DefaultPushNotificationTemplate, DirectMessageConfiguration, EmailChannelRequest, - EmailChannelResponse, EmailMessage, EmailMessageActivity, EmailTemplateRequest, @@ -327,9 +312,7 @@ import { EndpointBatchItem, EndpointBatchRequest, EndpointDemographic, - EndpointItemResponse, EndpointLocation, - EndpointMessageResult, EndpointRequest, EndpointResponse, EndpointSendConfiguration, @@ -339,33 +322,23 @@ import { EventCondition, EventDimensions, EventFilter, - EventItemResponse, EventsBatch, EventsRequest, - EventsResponse, EventStartCondition, - EventStream, ExportJobRequest, - ExportJobResource, - ExportJobResponse, - ExportJobsResponse, ForbiddenException, GCMChannelRequest, - GCMChannelResponse, GCMMessage, GPSCoordinates, GPSPointDimension, HoldoutActivity, ImportJobRequest, - ImportJobResource, - ImportJobResponse, InAppMessageBodyConfig, InAppMessageButton, InAppMessageContent, InAppMessageHeaderConfig, InAppTemplateRequest, InternalServerErrorException, - ItemResponse, JourneyChannelSettings, JourneyCustomMessage, JourneyEmailMessage, @@ -375,7 +348,6 @@ import { JourneySchedule, JourneySMSMessage, Message, - MessageBody, MessageConfiguration, MethodNotAllowedException, MetricDimension, @@ -394,9 +366,6 @@ import { RandomSplitEntry, RawEmail, RecencyDimension, - RecommenderConfigurationResponse, - ResultRow, - ResultRowValue, Schedule, SegmentBehaviors, SegmentCondition, @@ -404,7 +373,6 @@ import { SegmentDimensions, SegmentGroup, SegmentGroupList, - SegmentImportResource, SegmentLocation, SegmentReference, SegmentResponse, @@ -413,17 +381,14 @@ import { SimpleCondition, SimpleEmail, SimpleEmailPart, - SMSChannelResponse, SMSMessage, SMSMessageActivity, SMSTemplateRequest, StartCondition, Template, TemplateConfiguration, - TemplateCreateMessageBody, TooManyRequestsException, TreatmentResource, - VoiceChannelResponse, VoiceMessage, VoiceTemplateRequest, WaitActivity, @@ -434,39 +399,27 @@ import { WriteTreatmentResource, } from "../models/models_0"; import { - ImportJobsResponse, InAppCampaignSchedule, - InAppMessage, InAppMessageCampaign, InAppMessagesResponse, InAppTemplateResponse, JourneyDateRangeKpiResponse, - JourneyExecutionActivityMetricsResponse, - JourneyExecutionMetricsResponse, JourneysResponse, JourneyStateRequest, - ListRecommenderConfigurationsResponse, MessageRequest, - MessageResponse, - MessageResult, NumberValidateRequest, - NumberValidateResponse, PushNotificationTemplateResponse, SegmentsResponse, SendOTPMessageRequestParameters, SendUsersMessageRequest, - SendUsersMessageResponse, SMSChannelRequest, SMSTemplateResponse, TagsModel, TemplateActiveVersionRequest, TemplateResponse, TemplatesResponse, - TemplateVersionResponse, - TemplateVersionsResponse, UpdateAttributesRequest, UpdateRecommenderConfigurationShape, - VerificationResponse, VerifyOTPMessageRequestParameters, VoiceChannelRequest, VoiceTemplateResponse, @@ -609,7 +562,7 @@ export const se_CreateExportJobCommand = async ( ); let body: any; if (input.ExportJobRequest !== undefined) { - body = se_ExportJobRequest(input.ExportJobRequest, context); + body = _json(input.ExportJobRequest); } if (body === undefined) { body = {}; @@ -649,7 +602,7 @@ export const se_CreateImportJobCommand = async ( ); let body: any; if (input.ImportJobRequest !== undefined) { - body = se_ImportJobRequest(input.ImportJobRequest, context); + body = _json(input.ImportJobRequest); } if (body === undefined) { body = {}; @@ -800,7 +753,7 @@ export const se_CreateRecommenderConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/recommenders"; let body: any; if (input.CreateRecommenderConfiguration !== undefined) { - body = se_CreateRecommenderConfigurationShape(input.CreateRecommenderConfiguration, context); + body = _json(input.CreateRecommenderConfiguration); } if (body === undefined) { body = {}; @@ -3402,7 +3355,7 @@ export const se_PhoneNumberValidateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/phone/number/validate"; let body: any; if (input.NumberValidateRequest !== undefined) { - body = se_NumberValidateRequest(input.NumberValidateRequest, context); + body = _json(input.NumberValidateRequest); } if (body === undefined) { body = {}; @@ -3482,7 +3435,7 @@ export const se_PutEventStreamCommand = async ( ); let body: any; if (input.WriteEventStream !== undefined) { - body = se_WriteEventStream(input.WriteEventStream, context); + body = _json(input.WriteEventStream); } if (body === undefined) { body = {}; @@ -3531,7 +3484,7 @@ export const se_RemoveAttributesCommand = async ( ); let body: any; if (input.UpdateAttributesRequest !== undefined) { - body = se_UpdateAttributesRequest(input.UpdateAttributesRequest, context); + body = _json(input.UpdateAttributesRequest); } if (body === undefined) { body = {}; @@ -3611,7 +3564,7 @@ export const se_SendOTPMessageCommand = async ( ); let body: any; if (input.SendOTPMessageRequestParameters !== undefined) { - body = se_SendOTPMessageRequestParameters(input.SendOTPMessageRequestParameters, context); + body = _json(input.SendOTPMessageRequestParameters); } if (body === undefined) { body = {}; @@ -3753,7 +3706,7 @@ export const se_UpdateAdmChannelCommand = async ( ); let body: any; if (input.ADMChannelRequest !== undefined) { - body = se_ADMChannelRequest(input.ADMChannelRequest, context); + body = _json(input.ADMChannelRequest); } if (body === undefined) { body = {}; @@ -3793,7 +3746,7 @@ export const se_UpdateApnsChannelCommand = async ( ); let body: any; if (input.APNSChannelRequest !== undefined) { - body = se_APNSChannelRequest(input.APNSChannelRequest, context); + body = _json(input.APNSChannelRequest); } if (body === undefined) { body = {}; @@ -3834,7 +3787,7 @@ export const se_UpdateApnsSandboxChannelCommand = async ( ); let body: any; if (input.APNSSandboxChannelRequest !== undefined) { - body = se_APNSSandboxChannelRequest(input.APNSSandboxChannelRequest, context); + body = _json(input.APNSSandboxChannelRequest); } if (body === undefined) { body = {}; @@ -3875,7 +3828,7 @@ export const se_UpdateApnsVoipChannelCommand = async ( ); let body: any; if (input.APNSVoipChannelRequest !== undefined) { - body = se_APNSVoipChannelRequest(input.APNSVoipChannelRequest, context); + body = _json(input.APNSVoipChannelRequest); } if (body === undefined) { body = {}; @@ -3916,7 +3869,7 @@ export const se_UpdateApnsVoipSandboxChannelCommand = async ( ); let body: any; if (input.APNSVoipSandboxChannelRequest !== undefined) { - body = se_APNSVoipSandboxChannelRequest(input.APNSVoipSandboxChannelRequest, context); + body = _json(input.APNSVoipSandboxChannelRequest); } if (body === undefined) { body = {}; @@ -3956,7 +3909,7 @@ export const se_UpdateApplicationSettingsCommand = async ( ); let body: any; if (input.WriteApplicationSettingsRequest !== undefined) { - body = se_WriteApplicationSettingsRequest(input.WriteApplicationSettingsRequest, context); + body = _json(input.WriteApplicationSettingsRequest); } if (body === undefined) { body = {}; @@ -3996,7 +3949,7 @@ export const se_UpdateBaiduChannelCommand = async ( ); let body: any; if (input.BaiduChannelRequest !== undefined) { - body = se_BaiduChannelRequest(input.BaiduChannelRequest, context); + body = _json(input.BaiduChannelRequest); } if (body === undefined) { body = {}; @@ -4078,7 +4031,7 @@ export const se_UpdateEmailChannelCommand = async ( ); let body: any; if (input.EmailChannelRequest !== undefined) { - body = se_EmailChannelRequest(input.EmailChannelRequest, context); + body = _json(input.EmailChannelRequest); } if (body === undefined) { body = {}; @@ -4245,7 +4198,7 @@ export const se_UpdateGcmChannelCommand = async ( ); let body: any; if (input.GCMChannelRequest !== undefined) { - body = se_GCMChannelRequest(input.GCMChannelRequest, context); + body = _json(input.GCMChannelRequest); } if (body === undefined) { body = {}; @@ -4374,7 +4327,7 @@ export const se_UpdateJourneyStateCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "JourneyId", () => input.JourneyId!, "{JourneyId}", false); let body: any; if (input.JourneyStateRequest !== undefined) { - body = se_JourneyStateRequest(input.JourneyStateRequest, context); + body = _json(input.JourneyStateRequest); } if (body === undefined) { body = {}; @@ -4459,7 +4412,7 @@ export const se_UpdateRecommenderConfigurationCommand = async ( ); let body: any; if (input.UpdateRecommenderConfiguration !== undefined) { - body = se_UpdateRecommenderConfigurationShape(input.UpdateRecommenderConfiguration, context); + body = _json(input.UpdateRecommenderConfiguration); } if (body === undefined) { body = {}; @@ -4541,7 +4494,7 @@ export const se_UpdateSmsChannelCommand = async ( ); let body: any; if (input.SMSChannelRequest !== undefined) { - body = se_SMSChannelRequest(input.SMSChannelRequest, context); + body = _json(input.SMSChannelRequest); } if (body === undefined) { body = {}; @@ -4635,7 +4588,7 @@ export const se_UpdateTemplateActiveVersionCommand = async ( ); let body: any; if (input.TemplateActiveVersionRequest !== undefined) { - body = se_TemplateActiveVersionRequest(input.TemplateActiveVersionRequest, context); + body = _json(input.TemplateActiveVersionRequest); } if (body === undefined) { body = {}; @@ -4675,7 +4628,7 @@ export const se_UpdateVoiceChannelCommand = async ( ); let body: any; if (input.VoiceChannelRequest !== undefined) { - body = se_VoiceChannelRequest(input.VoiceChannelRequest, context); + body = _json(input.VoiceChannelRequest); } if (body === undefined) { body = {}; @@ -4760,7 +4713,7 @@ export const se_VerifyOTPMessageCommand = async ( ); let body: any; if (input.VerifyOTPMessageRequestParameters !== undefined) { - body = se_VerifyOTPMessageRequestParameters(input.VerifyOTPMessageRequestParameters, context); + body = _json(input.VerifyOTPMessageRequestParameters); } if (body === undefined) { body = {}; @@ -4831,10 +4784,9 @@ const de_CreateAppCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4894,10 +4846,9 @@ const de_CreateCampaignCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4917,7 +4868,7 @@ export const de_CreateEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.CreateTemplateMessageBody = de_CreateTemplateMessageBody(data, context); + contents.CreateTemplateMessageBody = _json(data); return contents; }; @@ -4951,10 +4902,9 @@ const de_CreateEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4974,7 +4924,7 @@ export const de_CreateExportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ExportJobResponse = de_ExportJobResponse(data, context); + contents.ExportJobResponse = _json(data); return contents; }; @@ -5014,10 +4964,9 @@ const de_CreateExportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5037,7 +4986,7 @@ export const de_CreateImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ImportJobResponse = de_ImportJobResponse(data, context); + contents.ImportJobResponse = _json(data); return contents; }; @@ -5077,10 +5026,9 @@ const de_CreateImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5100,7 +5048,7 @@ export const de_CreateInAppTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.TemplateCreateMessageBody = de_TemplateCreateMessageBody(data, context); + contents.TemplateCreateMessageBody = _json(data); return contents; }; @@ -5134,10 +5082,9 @@ const de_CreateInAppTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5197,10 +5144,9 @@ const de_CreateJourneyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5220,7 +5166,7 @@ export const de_CreatePushTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.CreateTemplateMessageBody = de_CreateTemplateMessageBody(data, context); + contents.CreateTemplateMessageBody = _json(data); return contents; }; @@ -5254,10 +5200,9 @@ const de_CreatePushTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5277,7 +5222,7 @@ export const de_CreateRecommenderConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.RecommenderConfigurationResponse = de_RecommenderConfigurationResponse(data, context); + contents.RecommenderConfigurationResponse = _json(data); return contents; }; @@ -5317,10 +5262,9 @@ const de_CreateRecommenderConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5380,10 +5324,9 @@ const de_CreateSegmentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5403,7 +5346,7 @@ export const de_CreateSmsTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.CreateTemplateMessageBody = de_CreateTemplateMessageBody(data, context); + contents.CreateTemplateMessageBody = _json(data); return contents; }; @@ -5437,10 +5380,9 @@ const de_CreateSmsTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5460,7 +5402,7 @@ export const de_CreateVoiceTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.CreateTemplateMessageBody = de_CreateTemplateMessageBody(data, context); + contents.CreateTemplateMessageBody = _json(data); return contents; }; @@ -5494,10 +5436,9 @@ const de_CreateVoiceTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5517,7 +5458,7 @@ export const de_DeleteAdmChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ADMChannelResponse = de_ADMChannelResponse(data, context); + contents.ADMChannelResponse = _json(data); return contents; }; @@ -5557,10 +5498,9 @@ const de_DeleteAdmChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5580,7 +5520,7 @@ export const de_DeleteApnsChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSChannelResponse = de_APNSChannelResponse(data, context); + contents.APNSChannelResponse = _json(data); return contents; }; @@ -5620,10 +5560,9 @@ const de_DeleteApnsChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5643,7 +5582,7 @@ export const de_DeleteApnsSandboxChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSSandboxChannelResponse = de_APNSSandboxChannelResponse(data, context); + contents.APNSSandboxChannelResponse = _json(data); return contents; }; @@ -5683,10 +5622,9 @@ const de_DeleteApnsSandboxChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5706,7 +5644,7 @@ export const de_DeleteApnsVoipChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSVoipChannelResponse = de_APNSVoipChannelResponse(data, context); + contents.APNSVoipChannelResponse = _json(data); return contents; }; @@ -5746,10 +5684,9 @@ const de_DeleteApnsVoipChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5769,7 +5706,7 @@ export const de_DeleteApnsVoipSandboxChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSVoipSandboxChannelResponse = de_APNSVoipSandboxChannelResponse(data, context); + contents.APNSVoipSandboxChannelResponse = _json(data); return contents; }; @@ -5809,10 +5746,9 @@ const de_DeleteApnsVoipSandboxChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5872,10 +5808,9 @@ const de_DeleteAppCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5895,7 +5830,7 @@ export const de_DeleteBaiduChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.BaiduChannelResponse = de_BaiduChannelResponse(data, context); + contents.BaiduChannelResponse = _json(data); return contents; }; @@ -5935,10 +5870,9 @@ const de_DeleteBaiduChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5998,10 +5932,9 @@ const de_DeleteCampaignCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6021,7 +5954,7 @@ export const de_DeleteEmailChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EmailChannelResponse = de_EmailChannelResponse(data, context); + contents.EmailChannelResponse = _json(data); return contents; }; @@ -6061,10 +5994,9 @@ const de_DeleteEmailChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6084,7 +6016,7 @@ export const de_DeleteEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -6124,10 +6056,9 @@ const de_DeleteEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6187,10 +6118,9 @@ const de_DeleteEndpointCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6210,7 +6140,7 @@ export const de_DeleteEventStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EventStream = de_EventStream(data, context); + contents.EventStream = _json(data); return contents; }; @@ -6250,10 +6180,9 @@ const de_DeleteEventStreamCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6273,7 +6202,7 @@ export const de_DeleteGcmChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.GCMChannelResponse = de_GCMChannelResponse(data, context); + contents.GCMChannelResponse = _json(data); return contents; }; @@ -6313,10 +6242,9 @@ const de_DeleteGcmChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6336,7 +6264,7 @@ export const de_DeleteInAppTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -6376,10 +6304,9 @@ const de_DeleteInAppTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6439,10 +6366,9 @@ const de_DeleteJourneyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6462,7 +6388,7 @@ export const de_DeletePushTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -6502,10 +6428,9 @@ const de_DeletePushTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6525,7 +6450,7 @@ export const de_DeleteRecommenderConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.RecommenderConfigurationResponse = de_RecommenderConfigurationResponse(data, context); + contents.RecommenderConfigurationResponse = _json(data); return contents; }; @@ -6565,10 +6490,9 @@ const de_DeleteRecommenderConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6628,10 +6552,9 @@ const de_DeleteSegmentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6651,7 +6574,7 @@ export const de_DeleteSmsChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.SMSChannelResponse = de_SMSChannelResponse(data, context); + contents.SMSChannelResponse = _json(data); return contents; }; @@ -6691,10 +6614,9 @@ const de_DeleteSmsChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6714,7 +6636,7 @@ export const de_DeleteSmsTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -6754,10 +6676,9 @@ const de_DeleteSmsTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6817,10 +6738,9 @@ const de_DeleteUserEndpointsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6840,7 +6760,7 @@ export const de_DeleteVoiceChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.VoiceChannelResponse = de_VoiceChannelResponse(data, context); + contents.VoiceChannelResponse = _json(data); return contents; }; @@ -6880,10 +6800,9 @@ const de_DeleteVoiceChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6903,7 +6822,7 @@ export const de_DeleteVoiceTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -6943,10 +6862,9 @@ const de_DeleteVoiceTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6966,7 +6884,7 @@ export const de_GetAdmChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ADMChannelResponse = de_ADMChannelResponse(data, context); + contents.ADMChannelResponse = _json(data); return contents; }; @@ -7006,10 +6924,9 @@ const de_GetAdmChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7029,7 +6946,7 @@ export const de_GetApnsChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSChannelResponse = de_APNSChannelResponse(data, context); + contents.APNSChannelResponse = _json(data); return contents; }; @@ -7069,10 +6986,9 @@ const de_GetApnsChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7092,7 +7008,7 @@ export const de_GetApnsSandboxChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSSandboxChannelResponse = de_APNSSandboxChannelResponse(data, context); + contents.APNSSandboxChannelResponse = _json(data); return contents; }; @@ -7132,10 +7048,9 @@ const de_GetApnsSandboxChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7155,7 +7070,7 @@ export const de_GetApnsVoipChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSVoipChannelResponse = de_APNSVoipChannelResponse(data, context); + contents.APNSVoipChannelResponse = _json(data); return contents; }; @@ -7195,10 +7110,9 @@ const de_GetApnsVoipChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7218,7 +7132,7 @@ export const de_GetApnsVoipSandboxChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSVoipSandboxChannelResponse = de_APNSVoipSandboxChannelResponse(data, context); + contents.APNSVoipSandboxChannelResponse = _json(data); return contents; }; @@ -7258,10 +7172,9 @@ const de_GetApnsVoipSandboxChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7318,10 +7231,9 @@ const de_GetAppCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7381,10 +7293,9 @@ const de_GetApplicationDateRangeKpiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7404,7 +7315,7 @@ export const de_GetApplicationSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ApplicationSettingsResource = de_ApplicationSettingsResource(data, context); + contents.ApplicationSettingsResource = _json(data); return contents; }; @@ -7444,10 +7355,9 @@ const de_GetApplicationSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7507,10 +7417,9 @@ const de_GetAppsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7530,7 +7439,7 @@ export const de_GetBaiduChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.BaiduChannelResponse = de_BaiduChannelResponse(data, context); + contents.BaiduChannelResponse = _json(data); return contents; }; @@ -7570,10 +7479,9 @@ const de_GetBaiduChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7633,10 +7541,9 @@ const de_GetCampaignCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7656,7 +7563,7 @@ export const de_GetCampaignActivitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ActivitiesResponse = de_ActivitiesResponse(data, context); + contents.ActivitiesResponse = _json(data); return contents; }; @@ -7696,10 +7603,9 @@ const de_GetCampaignActivitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7759,10 +7665,9 @@ const de_GetCampaignDateRangeKpiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7822,10 +7727,9 @@ const de_GetCampaignsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7885,10 +7789,9 @@ const de_GetCampaignVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7948,10 +7851,9 @@ const de_GetCampaignVersionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7971,7 +7873,7 @@ export const de_GetChannelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ChannelsResponse = de_ChannelsResponse(data, context); + contents.ChannelsResponse = _json(data); return contents; }; @@ -8011,10 +7913,9 @@ const de_GetChannelsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8034,7 +7935,7 @@ export const de_GetEmailChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EmailChannelResponse = de_EmailChannelResponse(data, context); + contents.EmailChannelResponse = _json(data); return contents; }; @@ -8074,10 +7975,9 @@ const de_GetEmailChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8137,10 +8037,9 @@ const de_GetEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8200,10 +8099,9 @@ const de_GetEndpointCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8223,7 +8121,7 @@ export const de_GetEventStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EventStream = de_EventStream(data, context); + contents.EventStream = _json(data); return contents; }; @@ -8263,10 +8161,9 @@ const de_GetEventStreamCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8286,7 +8183,7 @@ export const de_GetExportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ExportJobResponse = de_ExportJobResponse(data, context); + contents.ExportJobResponse = _json(data); return contents; }; @@ -8326,10 +8223,9 @@ const de_GetExportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8349,7 +8245,7 @@ export const de_GetExportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ExportJobsResponse = de_ExportJobsResponse(data, context); + contents.ExportJobsResponse = _json(data); return contents; }; @@ -8389,10 +8285,9 @@ const de_GetExportJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8412,7 +8307,7 @@ export const de_GetGcmChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.GCMChannelResponse = de_GCMChannelResponse(data, context); + contents.GCMChannelResponse = _json(data); return contents; }; @@ -8452,10 +8347,9 @@ const de_GetGcmChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8475,7 +8369,7 @@ export const de_GetImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ImportJobResponse = de_ImportJobResponse(data, context); + contents.ImportJobResponse = _json(data); return contents; }; @@ -8515,10 +8409,9 @@ const de_GetImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8538,7 +8431,7 @@ export const de_GetImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ImportJobsResponse = de_ImportJobsResponse(data, context); + contents.ImportJobsResponse = _json(data); return contents; }; @@ -8578,10 +8471,9 @@ const de_GetImportJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8641,10 +8533,9 @@ const de_GetInAppMessagesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8704,10 +8595,9 @@ const de_GetInAppTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8767,10 +8657,9 @@ const de_GetJourneyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8830,10 +8719,9 @@ const de_GetJourneyDateRangeKpiCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8853,7 +8741,7 @@ export const de_GetJourneyExecutionActivityMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.JourneyExecutionActivityMetricsResponse = de_JourneyExecutionActivityMetricsResponse(data, context); + contents.JourneyExecutionActivityMetricsResponse = _json(data); return contents; }; @@ -8893,10 +8781,9 @@ const de_GetJourneyExecutionActivityMetricsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8916,7 +8803,7 @@ export const de_GetJourneyExecutionMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.JourneyExecutionMetricsResponse = de_JourneyExecutionMetricsResponse(data, context); + contents.JourneyExecutionMetricsResponse = _json(data); return contents; }; @@ -8956,10 +8843,9 @@ const de_GetJourneyExecutionMetricsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9019,10 +8905,9 @@ const de_GetPushTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9042,7 +8927,7 @@ export const de_GetRecommenderConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.RecommenderConfigurationResponse = de_RecommenderConfigurationResponse(data, context); + contents.RecommenderConfigurationResponse = _json(data); return contents; }; @@ -9082,10 +8967,9 @@ const de_GetRecommenderConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9105,7 +8989,7 @@ export const de_GetRecommenderConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ListRecommenderConfigurationsResponse = de_ListRecommenderConfigurationsResponse(data, context); + contents.ListRecommenderConfigurationsResponse = _json(data); return contents; }; @@ -9145,10 +9029,9 @@ const de_GetRecommenderConfigurationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9208,10 +9091,9 @@ const de_GetSegmentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9231,7 +9113,7 @@ export const de_GetSegmentExportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ExportJobsResponse = de_ExportJobsResponse(data, context); + contents.ExportJobsResponse = _json(data); return contents; }; @@ -9271,10 +9153,9 @@ const de_GetSegmentExportJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9294,7 +9175,7 @@ export const de_GetSegmentImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ImportJobsResponse = de_ImportJobsResponse(data, context); + contents.ImportJobsResponse = _json(data); return contents; }; @@ -9334,10 +9215,9 @@ const de_GetSegmentImportJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9397,10 +9277,9 @@ const de_GetSegmentsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9460,10 +9339,9 @@ const de_GetSegmentVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9523,10 +9401,9 @@ const de_GetSegmentVersionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9546,7 +9423,7 @@ export const de_GetSmsChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.SMSChannelResponse = de_SMSChannelResponse(data, context); + contents.SMSChannelResponse = _json(data); return contents; }; @@ -9586,10 +9463,9 @@ const de_GetSmsChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9649,10 +9525,9 @@ const de_GetSmsTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9712,10 +9587,9 @@ const de_GetUserEndpointsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9735,7 +9609,7 @@ export const de_GetVoiceChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.VoiceChannelResponse = de_VoiceChannelResponse(data, context); + contents.VoiceChannelResponse = _json(data); return contents; }; @@ -9775,10 +9649,9 @@ const de_GetVoiceChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9838,10 +9711,9 @@ const de_GetVoiceTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9901,10 +9773,9 @@ const de_ListJourneysCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9941,10 +9812,9 @@ const de_ListTagsForResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9997,10 +9867,9 @@ const de_ListTemplatesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10020,7 +9889,7 @@ export const de_ListTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.TemplateVersionsResponse = de_TemplateVersionsResponse(data, context); + contents.TemplateVersionsResponse = _json(data); return contents; }; @@ -10060,10 +9929,9 @@ const de_ListTemplateVersionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10083,7 +9951,7 @@ export const de_PhoneNumberValidateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.NumberValidateResponse = de_NumberValidateResponse(data, context); + contents.NumberValidateResponse = _json(data); return contents; }; @@ -10123,10 +9991,9 @@ const de_PhoneNumberValidateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10146,7 +10013,7 @@ export const de_PutEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EventsResponse = de_EventsResponse(data, context); + contents.EventsResponse = _json(data); return contents; }; @@ -10186,10 +10053,9 @@ const de_PutEventsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10209,7 +10075,7 @@ export const de_PutEventStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EventStream = de_EventStream(data, context); + contents.EventStream = _json(data); return contents; }; @@ -10249,10 +10115,9 @@ const de_PutEventStreamCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10272,7 +10137,7 @@ export const de_RemoveAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.AttributesResource = de_AttributesResource(data, context); + contents.AttributesResource = _json(data); return contents; }; @@ -10312,10 +10177,9 @@ const de_RemoveAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10335,7 +10199,7 @@ export const de_SendMessagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageResponse = de_MessageResponse(data, context); + contents.MessageResponse = _json(data); return contents; }; @@ -10375,10 +10239,9 @@ const de_SendMessagesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10398,7 +10261,7 @@ export const de_SendOTPMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageResponse = de_MessageResponse(data, context); + contents.MessageResponse = _json(data); return contents; }; @@ -10438,10 +10301,9 @@ const de_SendOTPMessageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10461,7 +10323,7 @@ export const de_SendUsersMessagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.SendUsersMessageResponse = de_SendUsersMessageResponse(data, context); + contents.SendUsersMessageResponse = _json(data); return contents; }; @@ -10501,10 +10363,9 @@ const de_SendUsersMessagesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10540,10 +10401,9 @@ const de_TagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10578,10 +10438,9 @@ const de_UntagResourceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10600,7 +10459,7 @@ export const de_UpdateAdmChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ADMChannelResponse = de_ADMChannelResponse(data, context); + contents.ADMChannelResponse = _json(data); return contents; }; @@ -10640,10 +10499,9 @@ const de_UpdateAdmChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10663,7 +10521,7 @@ export const de_UpdateApnsChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSChannelResponse = de_APNSChannelResponse(data, context); + contents.APNSChannelResponse = _json(data); return contents; }; @@ -10703,10 +10561,9 @@ const de_UpdateApnsChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10726,7 +10583,7 @@ export const de_UpdateApnsSandboxChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSSandboxChannelResponse = de_APNSSandboxChannelResponse(data, context); + contents.APNSSandboxChannelResponse = _json(data); return contents; }; @@ -10766,10 +10623,9 @@ const de_UpdateApnsSandboxChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10789,7 +10645,7 @@ export const de_UpdateApnsVoipChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSVoipChannelResponse = de_APNSVoipChannelResponse(data, context); + contents.APNSVoipChannelResponse = _json(data); return contents; }; @@ -10829,10 +10685,9 @@ const de_UpdateApnsVoipChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10852,7 +10707,7 @@ export const de_UpdateApnsVoipSandboxChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.APNSVoipSandboxChannelResponse = de_APNSVoipSandboxChannelResponse(data, context); + contents.APNSVoipSandboxChannelResponse = _json(data); return contents; }; @@ -10892,10 +10747,9 @@ const de_UpdateApnsVoipSandboxChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10915,7 +10769,7 @@ export const de_UpdateApplicationSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.ApplicationSettingsResource = de_ApplicationSettingsResource(data, context); + contents.ApplicationSettingsResource = _json(data); return contents; }; @@ -10955,10 +10809,9 @@ const de_UpdateApplicationSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10978,7 +10831,7 @@ export const de_UpdateBaiduChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.BaiduChannelResponse = de_BaiduChannelResponse(data, context); + contents.BaiduChannelResponse = _json(data); return contents; }; @@ -11018,10 +10871,9 @@ const de_UpdateBaiduChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11081,10 +10933,9 @@ const de_UpdateCampaignCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11104,7 +10955,7 @@ export const de_UpdateEmailChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.EmailChannelResponse = de_EmailChannelResponse(data, context); + contents.EmailChannelResponse = _json(data); return contents; }; @@ -11144,10 +10995,9 @@ const de_UpdateEmailChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11167,7 +11017,7 @@ export const de_UpdateEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11207,10 +11057,9 @@ const de_UpdateEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11230,7 +11079,7 @@ export const de_UpdateEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11270,10 +11119,9 @@ const de_UpdateEndpointCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11293,7 +11141,7 @@ export const de_UpdateEndpointsBatchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11333,10 +11181,9 @@ const de_UpdateEndpointsBatchCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11356,7 +11203,7 @@ export const de_UpdateGcmChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.GCMChannelResponse = de_GCMChannelResponse(data, context); + contents.GCMChannelResponse = _json(data); return contents; }; @@ -11396,10 +11243,9 @@ const de_UpdateGcmChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11419,7 +11265,7 @@ export const de_UpdateInAppTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11459,10 +11305,9 @@ const de_UpdateInAppTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11525,10 +11370,9 @@ const de_UpdateJourneyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11588,10 +11432,9 @@ const de_UpdateJourneyStateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11611,7 +11454,7 @@ export const de_UpdatePushTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11651,10 +11494,9 @@ const de_UpdatePushTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11674,7 +11516,7 @@ export const de_UpdateRecommenderConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.RecommenderConfigurationResponse = de_RecommenderConfigurationResponse(data, context); + contents.RecommenderConfigurationResponse = _json(data); return contents; }; @@ -11714,10 +11556,9 @@ const de_UpdateRecommenderConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11777,10 +11618,9 @@ const de_UpdateSegmentCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11800,7 +11640,7 @@ export const de_UpdateSmsChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.SMSChannelResponse = de_SMSChannelResponse(data, context); + contents.SMSChannelResponse = _json(data); return contents; }; @@ -11840,10 +11680,9 @@ const de_UpdateSmsChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11863,7 +11702,7 @@ export const de_UpdateSmsTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11903,10 +11742,9 @@ const de_UpdateSmsTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11926,7 +11764,7 @@ export const de_UpdateTemplateActiveVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -11966,10 +11804,9 @@ const de_UpdateTemplateActiveVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11989,7 +11826,7 @@ export const de_UpdateVoiceChannelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.VoiceChannelResponse = de_VoiceChannelResponse(data, context); + contents.VoiceChannelResponse = _json(data); return contents; }; @@ -12029,10 +11866,9 @@ const de_UpdateVoiceChannelCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12052,7 +11888,7 @@ export const de_UpdateVoiceTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.MessageBody = de_MessageBody(data, context); + contents.MessageBody = _json(data); return contents; }; @@ -12092,10 +11928,9 @@ const de_UpdateVoiceTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12115,7 +11950,7 @@ export const de_VerifyOTPMessageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.VerificationResponse = de_VerificationResponse(data, context); + contents.VerificationResponse = _json(data); return contents; }; @@ -12155,28 +11990,26 @@ const de_VerifyOTPMessageCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12190,12 +12023,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12209,12 +12041,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12231,12 +12062,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12253,12 +12083,11 @@ const de_MethodNotAllowedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new MethodNotAllowedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12272,12 +12101,11 @@ const de_MethodNotAllowedExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12294,12 +12122,11 @@ const de_PayloadTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new PayloadTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12316,12 +12143,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestID != null) { - contents.RequestID = __expectString(data.RequestID); - } + const doc = take(data, { + Message: __expectString, + RequestID: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -12333,1024 +12159,399 @@ const de_TooManyRequestsExceptionRes = async ( * serializeAws_restJson1Activity */ const se_Activity = (input: Activity, context: __SerdeContext): any => { - return { - ...(input.CUSTOM != null && { CUSTOM: se_CustomMessageActivity(input.CUSTOM, context) }), - ...(input.ConditionalSplit != null && { - ConditionalSplit: se_ConditionalSplitActivity(input.ConditionalSplit, context), - }), - ...(input.ContactCenter != null && { ContactCenter: se_ContactCenterActivity(input.ContactCenter, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EMAIL != null && { EMAIL: se_EmailMessageActivity(input.EMAIL, context) }), - ...(input.Holdout != null && { Holdout: se_HoldoutActivity(input.Holdout, context) }), - ...(input.MultiCondition != null && { - MultiCondition: se_MultiConditionalSplitActivity(input.MultiCondition, context), - }), - ...(input.PUSH != null && { PUSH: se_PushMessageActivity(input.PUSH, context) }), - ...(input.RandomSplit != null && { RandomSplit: se_RandomSplitActivity(input.RandomSplit, context) }), - ...(input.SMS != null && { SMS: se_SMSMessageActivity(input.SMS, context) }), - ...(input.Wait != null && { Wait: se_WaitActivity(input.Wait, context) }), - }; + return take(input, { + CUSTOM: _json, + ConditionalSplit: (_) => se_ConditionalSplitActivity(_, context), + ContactCenter: _json, + Description: [], + EMAIL: _json, + Holdout: _json, + MultiCondition: (_) => se_MultiConditionalSplitActivity(_, context), + PUSH: _json, + RandomSplit: _json, + SMS: _json, + Wait: _json, + }); }; -/** - * serializeAws_restJson1AddressConfiguration - */ -const se_AddressConfiguration = (input: AddressConfiguration, context: __SerdeContext): any => { - return { - ...(input.BodyOverride != null && { BodyOverride: input.BodyOverride }), - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.Context != null && { Context: se_MapOf__string(input.Context, context) }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.TitleOverride != null && { TitleOverride: input.TitleOverride }), - }; -}; +// se_AddressConfiguration omitted. -/** - * serializeAws_restJson1ADMChannelRequest - */ -const se_ADMChannelRequest = (input: ADMChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_ADMChannelRequest omitted. -/** - * serializeAws_restJson1ADMMessage - */ -const se_ADMMessage = (input: ADMMessage, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.ConsolidationKey != null && { ConsolidationKey: input.ConsolidationKey }), - ...(input.Data != null && { Data: se_MapOf__string(input.Data, context) }), - ...(input.ExpiresAfter != null && { ExpiresAfter: input.ExpiresAfter }), - ...(input.IconReference != null && { IconReference: input.IconReference }), - ...(input.ImageIconUrl != null && { ImageIconUrl: input.ImageIconUrl }), - ...(input.ImageUrl != null && { ImageUrl: input.ImageUrl }), - ...(input.MD5 != null && { MD5: input.MD5 }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.SilentPush != null && { SilentPush: input.SilentPush }), - ...(input.SmallImageIconUrl != null && { SmallImageIconUrl: input.SmallImageIconUrl }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_ADMMessage omitted. -/** - * serializeAws_restJson1AndroidPushNotificationTemplate - */ -const se_AndroidPushNotificationTemplate = (input: AndroidPushNotificationTemplate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.ImageIconUrl != null && { ImageIconUrl: input.ImageIconUrl }), - ...(input.ImageUrl != null && { ImageUrl: input.ImageUrl }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.SmallImageIconUrl != null && { SmallImageIconUrl: input.SmallImageIconUrl }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_AndroidPushNotificationTemplate omitted. -/** - * serializeAws_restJson1APNSChannelRequest - */ -const se_APNSChannelRequest = (input: APNSChannelRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.DefaultAuthenticationMethod != null && { - DefaultAuthenticationMethod: input.DefaultAuthenticationMethod, - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.PrivateKey != null && { PrivateKey: input.PrivateKey }), - ...(input.TeamId != null && { TeamId: input.TeamId }), - ...(input.TokenKey != null && { TokenKey: input.TokenKey }), - ...(input.TokenKeyId != null && { TokenKeyId: input.TokenKeyId }), - }; -}; +// se_APNSChannelRequest omitted. -/** - * serializeAws_restJson1APNSMessage - */ -const se_APNSMessage = (input: APNSMessage, context: __SerdeContext): any => { - return { - ...(input.APNSPushType != null && { APNSPushType: input.APNSPushType }), - ...(input.Action != null && { Action: input.Action }), - ...(input.Badge != null && { Badge: input.Badge }), - ...(input.Body != null && { Body: input.Body }), - ...(input.Category != null && { Category: input.Category }), - ...(input.CollapseId != null && { CollapseId: input.CollapseId }), - ...(input.Data != null && { Data: se_MapOf__string(input.Data, context) }), - ...(input.MediaUrl != null && { MediaUrl: input.MediaUrl }), - ...(input.PreferredAuthenticationMethod != null && { - PreferredAuthenticationMethod: input.PreferredAuthenticationMethod, - }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.SilentPush != null && { SilentPush: input.SilentPush }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.ThreadId != null && { ThreadId: input.ThreadId }), - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_APNSMessage omitted. -/** - * serializeAws_restJson1APNSPushNotificationTemplate - */ -const se_APNSPushNotificationTemplate = (input: APNSPushNotificationTemplate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.MediaUrl != null && { MediaUrl: input.MediaUrl }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_APNSPushNotificationTemplate omitted. -/** - * serializeAws_restJson1APNSSandboxChannelRequest - */ -const se_APNSSandboxChannelRequest = (input: APNSSandboxChannelRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.DefaultAuthenticationMethod != null && { - DefaultAuthenticationMethod: input.DefaultAuthenticationMethod, - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.PrivateKey != null && { PrivateKey: input.PrivateKey }), - ...(input.TeamId != null && { TeamId: input.TeamId }), - ...(input.TokenKey != null && { TokenKey: input.TokenKey }), - ...(input.TokenKeyId != null && { TokenKeyId: input.TokenKeyId }), - }; -}; +// se_APNSSandboxChannelRequest omitted. -/** - * serializeAws_restJson1APNSVoipChannelRequest - */ -const se_APNSVoipChannelRequest = (input: APNSVoipChannelRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.DefaultAuthenticationMethod != null && { - DefaultAuthenticationMethod: input.DefaultAuthenticationMethod, - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.PrivateKey != null && { PrivateKey: input.PrivateKey }), - ...(input.TeamId != null && { TeamId: input.TeamId }), - ...(input.TokenKey != null && { TokenKey: input.TokenKey }), - ...(input.TokenKeyId != null && { TokenKeyId: input.TokenKeyId }), - }; -}; +// se_APNSVoipChannelRequest omitted. -/** - * serializeAws_restJson1APNSVoipSandboxChannelRequest - */ -const se_APNSVoipSandboxChannelRequest = (input: APNSVoipSandboxChannelRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.DefaultAuthenticationMethod != null && { - DefaultAuthenticationMethod: input.DefaultAuthenticationMethod, - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.PrivateKey != null && { PrivateKey: input.PrivateKey }), - ...(input.TeamId != null && { TeamId: input.TeamId }), - ...(input.TokenKey != null && { TokenKey: input.TokenKey }), - ...(input.TokenKeyId != null && { TokenKeyId: input.TokenKeyId }), - }; -}; +// se_APNSVoipSandboxChannelRequest omitted. -/** - * serializeAws_restJson1AttributeDimension - */ -const se_AttributeDimension = (input: AttributeDimension, context: __SerdeContext): any => { - return { - ...(input.AttributeType != null && { AttributeType: input.AttributeType }), - ...(input.Values != null && { Values: se_ListOf__string(input.Values, context) }), - }; -}; +// se_AttributeDimension omitted. -/** - * serializeAws_restJson1BaiduChannelRequest - */ -const se_BaiduChannelRequest = (input: BaiduChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ApiKey != null && { ApiKey: input.ApiKey }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.SecretKey != null && { SecretKey: input.SecretKey }), - }; -}; +// se_BaiduChannelRequest omitted. -/** - * serializeAws_restJson1BaiduMessage - */ -const se_BaiduMessage = (input: BaiduMessage, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.Data != null && { Data: se_MapOf__string(input.Data, context) }), - ...(input.IconReference != null && { IconReference: input.IconReference }), - ...(input.ImageIconUrl != null && { ImageIconUrl: input.ImageIconUrl }), - ...(input.ImageUrl != null && { ImageUrl: input.ImageUrl }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.SilentPush != null && { SilentPush: input.SilentPush }), - ...(input.SmallImageIconUrl != null && { SmallImageIconUrl: input.SmallImageIconUrl }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_BaiduMessage omitted. -/** - * serializeAws_restJson1CampaignCustomMessage - */ -const se_CampaignCustomMessage = (input: CampaignCustomMessage, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: input.Data }), - }; -}; +// se_CampaignCustomMessage omitted. -/** - * serializeAws_restJson1CampaignEmailMessage - */ -const se_CampaignEmailMessage = (input: CampaignEmailMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.FromAddress != null && { FromAddress: input.FromAddress }), - ...(input.HtmlBody != null && { HtmlBody: input.HtmlBody }), - ...(input.Title != null && { Title: input.Title }), - }; -}; +// se_CampaignEmailMessage omitted. /** * serializeAws_restJson1CampaignEventFilter */ const se_CampaignEventFilter = (input: CampaignEventFilter, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_EventDimensions(input.Dimensions, context) }), - ...(input.FilterType != null && { FilterType: input.FilterType }), - }; + return take(input, { + Dimensions: (_) => se_EventDimensions(_, context), + FilterType: [], + }); }; -/** - * serializeAws_restJson1CampaignHook - */ -const se_CampaignHook = (input: CampaignHook, context: __SerdeContext): any => { - return { - ...(input.LambdaFunctionName != null && { LambdaFunctionName: input.LambdaFunctionName }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.WebUrl != null && { WebUrl: input.WebUrl }), - }; -}; +// se_CampaignHook omitted. -/** - * serializeAws_restJson1CampaignInAppMessage - */ -const se_CampaignInAppMessage = (input: CampaignInAppMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.Content != null && { Content: se_ListOfInAppMessageContent(input.Content, context) }), - ...(input.CustomConfig != null && { CustomConfig: se_MapOf__string(input.CustomConfig, context) }), - ...(input.Layout != null && { Layout: input.Layout }), - }; -}; +// se_CampaignInAppMessage omitted. -/** - * serializeAws_restJson1CampaignLimits - */ -const se_CampaignLimits = (input: CampaignLimits, context: __SerdeContext): any => { - return { - ...(input.Daily != null && { Daily: input.Daily }), - ...(input.MaximumDuration != null && { MaximumDuration: input.MaximumDuration }), - ...(input.MessagesPerSecond != null && { MessagesPerSecond: input.MessagesPerSecond }), - ...(input.Session != null && { Session: input.Session }), - ...(input.Total != null && { Total: input.Total }), - }; -}; +// se_CampaignLimits omitted. -/** - * serializeAws_restJson1CampaignSmsMessage - */ -const se_CampaignSmsMessage = (input: CampaignSmsMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.OriginationNumber != null && { OriginationNumber: input.OriginationNumber }), - ...(input.SenderId != null && { SenderId: input.SenderId }), - ...(input.TemplateId != null && { TemplateId: input.TemplateId }), - }; -}; +// se_CampaignSmsMessage omitted. -/** - * serializeAws_restJson1ClosedDays - */ -const se_ClosedDays = (input: ClosedDays, context: __SerdeContext): any => { - return { - ...(input.CUSTOM != null && { CUSTOM: se_ListOfClosedDaysRules(input.CUSTOM, context) }), - ...(input.EMAIL != null && { EMAIL: se_ListOfClosedDaysRules(input.EMAIL, context) }), - ...(input.PUSH != null && { PUSH: se_ListOfClosedDaysRules(input.PUSH, context) }), - ...(input.SMS != null && { SMS: se_ListOfClosedDaysRules(input.SMS, context) }), - ...(input.VOICE != null && { VOICE: se_ListOfClosedDaysRules(input.VOICE, context) }), - }; -}; +// se_ClosedDays omitted. -/** - * serializeAws_restJson1ClosedDaysRule - */ -const se_ClosedDaysRule = (input: ClosedDaysRule, context: __SerdeContext): any => { - return { - ...(input.EndDateTime != null && { EndDateTime: input.EndDateTime }), - ...(input.Name != null && { Name: input.Name }), - ...(input.StartDateTime != null && { StartDateTime: input.StartDateTime }), - }; -}; +// se_ClosedDaysRule omitted. /** * serializeAws_restJson1Condition */ const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.Conditions != null && { Conditions: se_ListOfSimpleCondition(input.Conditions, context) }), - ...(input.Operator != null && { Operator: input.Operator }), - }; + return take(input, { + Conditions: (_) => se_ListOfSimpleCondition(_, context), + Operator: [], + }); }; /** * serializeAws_restJson1ConditionalSplitActivity */ const se_ConditionalSplitActivity = (input: ConditionalSplitActivity, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: se_Condition(input.Condition, context) }), - ...(input.EvaluationWaitTime != null && { EvaluationWaitTime: se_WaitTime(input.EvaluationWaitTime, context) }), - ...(input.FalseActivity != null && { FalseActivity: input.FalseActivity }), - ...(input.TrueActivity != null && { TrueActivity: input.TrueActivity }), - }; + return take(input, { + Condition: (_) => se_Condition(_, context), + EvaluationWaitTime: _json, + FalseActivity: [], + TrueActivity: [], + }); }; -/** - * serializeAws_restJson1ContactCenterActivity - */ -const se_ContactCenterActivity = (input: ContactCenterActivity, context: __SerdeContext): any => { - return { - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - }; -}; +// se_ContactCenterActivity omitted. /** * serializeAws_restJson1CreateApplicationRequest */ const se_CreateApplicationRequest = (input: CreateApplicationRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + Name: [], + tags: [, _json, `tags`], + }); }; -/** - * serializeAws_restJson1CreateRecommenderConfigurationShape - */ -const se_CreateRecommenderConfigurationShape = ( - input: CreateRecommenderConfigurationShape, - context: __SerdeContext -): any => { - return { - ...(input.Attributes != null && { Attributes: se_MapOf__string(input.Attributes, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RecommendationProviderIdType != null && { - RecommendationProviderIdType: input.RecommendationProviderIdType, - }), - ...(input.RecommendationProviderRoleArn != null && { - RecommendationProviderRoleArn: input.RecommendationProviderRoleArn, - }), - ...(input.RecommendationProviderUri != null && { RecommendationProviderUri: input.RecommendationProviderUri }), - ...(input.RecommendationTransformerUri != null && { - RecommendationTransformerUri: input.RecommendationTransformerUri, - }), - ...(input.RecommendationsDisplayName != null && { RecommendationsDisplayName: input.RecommendationsDisplayName }), - ...(input.RecommendationsPerMessage != null && { RecommendationsPerMessage: input.RecommendationsPerMessage }), - }; -}; +// se_CreateRecommenderConfigurationShape omitted. -/** - * serializeAws_restJson1CustomDeliveryConfiguration - */ -const se_CustomDeliveryConfiguration = (input: CustomDeliveryConfiguration, context: __SerdeContext): any => { - return { - ...(input.DeliveryUri != null && { DeliveryUri: input.DeliveryUri }), - ...(input.EndpointTypes != null && { - EndpointTypes: se_ListOf__EndpointTypesElement(input.EndpointTypes, context), - }), - }; -}; +// se_CustomDeliveryConfiguration omitted. -/** - * serializeAws_restJson1CustomMessageActivity - */ -const se_CustomMessageActivity = (input: CustomMessageActivity, context: __SerdeContext): any => { - return { - ...(input.DeliveryUri != null && { DeliveryUri: input.DeliveryUri }), - ...(input.EndpointTypes != null && { - EndpointTypes: se_ListOf__EndpointTypesElement(input.EndpointTypes, context), - }), - ...(input.MessageConfig != null && { MessageConfig: se_JourneyCustomMessage(input.MessageConfig, context) }), - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - ...(input.TemplateVersion != null && { TemplateVersion: input.TemplateVersion }), - }; -}; +// se_CustomMessageActivity omitted. -/** - * serializeAws_restJson1DefaultButtonConfiguration - */ -const se_DefaultButtonConfiguration = (input: DefaultButtonConfiguration, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { BackgroundColor: input.BackgroundColor }), - ...(input.BorderRadius != null && { BorderRadius: input.BorderRadius }), - ...(input.ButtonAction != null && { ButtonAction: input.ButtonAction }), - ...(input.Link != null && { Link: input.Link }), - ...(input.Text != null && { Text: input.Text }), - ...(input.TextColor != null && { TextColor: input.TextColor }), - }; -}; +// se_DefaultButtonConfiguration omitted. -/** - * serializeAws_restJson1DefaultMessage - */ -const se_DefaultMessage = (input: DefaultMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - }; -}; +// se_DefaultMessage omitted. -/** - * serializeAws_restJson1DefaultPushNotificationMessage - */ -const se_DefaultPushNotificationMessage = (input: DefaultPushNotificationMessage, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.Data != null && { Data: se_MapOf__string(input.Data, context) }), - ...(input.SilentPush != null && { SilentPush: input.SilentPush }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_DefaultPushNotificationMessage omitted. -/** - * serializeAws_restJson1DefaultPushNotificationTemplate - */ -const se_DefaultPushNotificationTemplate = (input: DefaultPushNotificationTemplate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_DefaultPushNotificationTemplate omitted. /** * serializeAws_restJson1DirectMessageConfiguration */ const se_DirectMessageConfiguration = (input: DirectMessageConfiguration, context: __SerdeContext): any => { - return { - ...(input.ADMMessage != null && { ADMMessage: se_ADMMessage(input.ADMMessage, context) }), - ...(input.APNSMessage != null && { APNSMessage: se_APNSMessage(input.APNSMessage, context) }), - ...(input.BaiduMessage != null && { BaiduMessage: se_BaiduMessage(input.BaiduMessage, context) }), - ...(input.DefaultMessage != null && { DefaultMessage: se_DefaultMessage(input.DefaultMessage, context) }), - ...(input.DefaultPushNotificationMessage != null && { - DefaultPushNotificationMessage: se_DefaultPushNotificationMessage(input.DefaultPushNotificationMessage, context), - }), - ...(input.EmailMessage != null && { EmailMessage: se_EmailMessage(input.EmailMessage, context) }), - ...(input.GCMMessage != null && { GCMMessage: se_GCMMessage(input.GCMMessage, context) }), - ...(input.SMSMessage != null && { SMSMessage: se_SMSMessage(input.SMSMessage, context) }), - ...(input.VoiceMessage != null && { VoiceMessage: se_VoiceMessage(input.VoiceMessage, context) }), - }; + return take(input, { + ADMMessage: _json, + APNSMessage: _json, + BaiduMessage: _json, + DefaultMessage: _json, + DefaultPushNotificationMessage: _json, + EmailMessage: (_) => se_EmailMessage(_, context), + GCMMessage: _json, + SMSMessage: _json, + VoiceMessage: _json, + }); }; -/** - * serializeAws_restJson1EmailChannelRequest - */ -const se_EmailChannelRequest = (input: EmailChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ConfigurationSet != null && { ConfigurationSet: input.ConfigurationSet }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.FromAddress != null && { FromAddress: input.FromAddress }), - ...(input.Identity != null && { Identity: input.Identity }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_EmailChannelRequest omitted. /** * serializeAws_restJson1EmailMessage */ const se_EmailMessage = (input: EmailMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.FeedbackForwardingAddress != null && { FeedbackForwardingAddress: input.FeedbackForwardingAddress }), - ...(input.FromAddress != null && { FromAddress: input.FromAddress }), - ...(input.RawEmail != null && { RawEmail: se_RawEmail(input.RawEmail, context) }), - ...(input.ReplyToAddresses != null && { ReplyToAddresses: se_ListOf__string(input.ReplyToAddresses, context) }), - ...(input.SimpleEmail != null && { SimpleEmail: se_SimpleEmail(input.SimpleEmail, context) }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - }; + return take(input, { + Body: [], + FeedbackForwardingAddress: [], + FromAddress: [], + RawEmail: (_) => se_RawEmail(_, context), + ReplyToAddresses: _json, + SimpleEmail: _json, + Substitutions: _json, + }); }; -/** - * serializeAws_restJson1EmailMessageActivity - */ -const se_EmailMessageActivity = (input: EmailMessageActivity, context: __SerdeContext): any => { - return { - ...(input.MessageConfig != null && { MessageConfig: se_JourneyEmailMessage(input.MessageConfig, context) }), - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - ...(input.TemplateVersion != null && { TemplateVersion: input.TemplateVersion }), - }; -}; +// se_EmailMessageActivity omitted. /** * serializeAws_restJson1EmailTemplateRequest */ const se_EmailTemplateRequest = (input: EmailTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultSubstitutions != null && { DefaultSubstitutions: input.DefaultSubstitutions }), - ...(input.HtmlPart != null && { HtmlPart: input.HtmlPart }), - ...(input.RecommenderId != null && { RecommenderId: input.RecommenderId }), - ...(input.Subject != null && { Subject: input.Subject }), - ...(input.TemplateDescription != null && { TemplateDescription: input.TemplateDescription }), - ...(input.TextPart != null && { TextPart: input.TextPart }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + DefaultSubstitutions: [], + HtmlPart: [], + RecommenderId: [], + Subject: [], + TemplateDescription: [], + TextPart: [], + tags: [, _json, `tags`], + }); }; /** * serializeAws_restJson1EndpointBatchItem */ const se_EndpointBatchItem = (input: EndpointBatchItem, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.Attributes != null && { Attributes: se_MapOfListOf__string(input.Attributes, context) }), - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.Demographic != null && { Demographic: se_EndpointDemographic(input.Demographic, context) }), - ...(input.EffectiveDate != null && { EffectiveDate: input.EffectiveDate }), - ...(input.EndpointStatus != null && { EndpointStatus: input.EndpointStatus }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Location != null && { Location: se_EndpointLocation(input.Location, context) }), - ...(input.Metrics != null && { Metrics: se_MapOf__double(input.Metrics, context) }), - ...(input.OptOut != null && { OptOut: input.OptOut }), - ...(input.RequestId != null && { RequestId: input.RequestId }), - ...(input.User != null && { User: se_EndpointUser(input.User, context) }), - }; + return take(input, { + Address: [], + Attributes: _json, + ChannelType: [], + Demographic: _json, + EffectiveDate: [], + EndpointStatus: [], + Id: [], + Location: (_) => se_EndpointLocation(_, context), + Metrics: (_) => se_MapOf__double(_, context), + OptOut: [], + RequestId: [], + User: _json, + }); }; /** * serializeAws_restJson1EndpointBatchRequest */ const se_EndpointBatchRequest = (input: EndpointBatchRequest, context: __SerdeContext): any => { - return { - ...(input.Item != null && { Item: se_ListOfEndpointBatchItem(input.Item, context) }), - }; + return take(input, { + Item: (_) => se_ListOfEndpointBatchItem(_, context), + }); }; -/** - * serializeAws_restJson1EndpointDemographic - */ -const se_EndpointDemographic = (input: EndpointDemographic, context: __SerdeContext): any => { - return { - ...(input.AppVersion != null && { AppVersion: input.AppVersion }), - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.Make != null && { Make: input.Make }), - ...(input.Model != null && { Model: input.Model }), - ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }), - ...(input.Platform != null && { Platform: input.Platform }), - ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }; -}; +// se_EndpointDemographic omitted. /** * serializeAws_restJson1EndpointLocation */ const se_EndpointLocation = (input: EndpointLocation, context: __SerdeContext): any => { - return { - ...(input.City != null && { City: input.City }), - ...(input.Country != null && { Country: input.Country }), - ...(input.Latitude != null && { Latitude: __serializeFloat(input.Latitude) }), - ...(input.Longitude != null && { Longitude: __serializeFloat(input.Longitude) }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.Region != null && { Region: input.Region }), - }; + return take(input, { + City: [], + Country: [], + Latitude: __serializeFloat, + Longitude: __serializeFloat, + PostalCode: [], + Region: [], + }); }; /** * serializeAws_restJson1EndpointRequest */ const se_EndpointRequest = (input: EndpointRequest, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.Attributes != null && { Attributes: se_MapOfListOf__string(input.Attributes, context) }), - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.Demographic != null && { Demographic: se_EndpointDemographic(input.Demographic, context) }), - ...(input.EffectiveDate != null && { EffectiveDate: input.EffectiveDate }), - ...(input.EndpointStatus != null && { EndpointStatus: input.EndpointStatus }), - ...(input.Location != null && { Location: se_EndpointLocation(input.Location, context) }), - ...(input.Metrics != null && { Metrics: se_MapOf__double(input.Metrics, context) }), - ...(input.OptOut != null && { OptOut: input.OptOut }), - ...(input.RequestId != null && { RequestId: input.RequestId }), - ...(input.User != null && { User: se_EndpointUser(input.User, context) }), - }; + return take(input, { + Address: [], + Attributes: _json, + ChannelType: [], + Demographic: _json, + EffectiveDate: [], + EndpointStatus: [], + Location: (_) => se_EndpointLocation(_, context), + Metrics: (_) => se_MapOf__double(_, context), + OptOut: [], + RequestId: [], + User: _json, + }); }; -/** - * serializeAws_restJson1EndpointSendConfiguration - */ -const se_EndpointSendConfiguration = (input: EndpointSendConfiguration, context: __SerdeContext): any => { - return { - ...(input.BodyOverride != null && { BodyOverride: input.BodyOverride }), - ...(input.Context != null && { Context: se_MapOf__string(input.Context, context) }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.TitleOverride != null && { TitleOverride: input.TitleOverride }), - }; -}; +// se_EndpointSendConfiguration omitted. -/** - * serializeAws_restJson1EndpointUser - */ -const se_EndpointUser = (input: EndpointUser, context: __SerdeContext): any => { - return { - ...(input.UserAttributes != null && { UserAttributes: se_MapOfListOf__string(input.UserAttributes, context) }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_EndpointUser omitted. /** * serializeAws_restJson1Event */ const se_Event = (input: Event, context: __SerdeContext): any => { - return { - ...(input.AppPackageName != null && { AppPackageName: input.AppPackageName }), - ...(input.AppTitle != null && { AppTitle: input.AppTitle }), - ...(input.AppVersionCode != null && { AppVersionCode: input.AppVersionCode }), - ...(input.Attributes != null && { Attributes: se_MapOf__string(input.Attributes, context) }), - ...(input.ClientSdkVersion != null && { ClientSdkVersion: input.ClientSdkVersion }), - ...(input.EventType != null && { EventType: input.EventType }), - ...(input.Metrics != null && { Metrics: se_MapOf__double(input.Metrics, context) }), - ...(input.SdkName != null && { SdkName: input.SdkName }), - ...(input.Session != null && { Session: se_Session(input.Session, context) }), - ...(input.Timestamp != null && { Timestamp: input.Timestamp }), - }; + return take(input, { + AppPackageName: [], + AppTitle: [], + AppVersionCode: [], + Attributes: _json, + ClientSdkVersion: [], + EventType: [], + Metrics: (_) => se_MapOf__double(_, context), + SdkName: [], + Session: _json, + Timestamp: [], + }); }; /** * serializeAws_restJson1EventCondition */ const se_EventCondition = (input: EventCondition, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_EventDimensions(input.Dimensions, context) }), - ...(input.MessageActivity != null && { MessageActivity: input.MessageActivity }), - }; + return take(input, { + Dimensions: (_) => se_EventDimensions(_, context), + MessageActivity: [], + }); }; /** * serializeAws_restJson1EventDimensions */ const se_EventDimensions = (input: EventDimensions, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_MapOfAttributeDimension(input.Attributes, context) }), - ...(input.EventType != null && { EventType: se_SetDimension(input.EventType, context) }), - ...(input.Metrics != null && { Metrics: se_MapOfMetricDimension(input.Metrics, context) }), - }; + return take(input, { + Attributes: _json, + EventType: _json, + Metrics: (_) => se_MapOfMetricDimension(_, context), + }); }; /** * serializeAws_restJson1EventFilter */ const se_EventFilter = (input: EventFilter, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_EventDimensions(input.Dimensions, context) }), - ...(input.FilterType != null && { FilterType: input.FilterType }), - }; + return take(input, { + Dimensions: (_) => se_EventDimensions(_, context), + FilterType: [], + }); }; /** * serializeAws_restJson1EventsBatch */ const se_EventsBatch = (input: EventsBatch, context: __SerdeContext): any => { - return { - ...(input.Endpoint != null && { Endpoint: se_PublicEndpoint(input.Endpoint, context) }), - ...(input.Events != null && { Events: se_MapOfEvent(input.Events, context) }), - }; + return take(input, { + Endpoint: (_) => se_PublicEndpoint(_, context), + Events: (_) => se_MapOfEvent(_, context), + }); }; /** * serializeAws_restJson1EventsRequest */ const se_EventsRequest = (input: EventsRequest, context: __SerdeContext): any => { - return { - ...(input.BatchItem != null && { BatchItem: se_MapOfEventsBatch(input.BatchItem, context) }), - }; + return take(input, { + BatchItem: (_) => se_MapOfEventsBatch(_, context), + }); }; /** * serializeAws_restJson1EventStartCondition */ const se_EventStartCondition = (input: EventStartCondition, context: __SerdeContext): any => { - return { - ...(input.EventFilter != null && { EventFilter: se_EventFilter(input.EventFilter, context) }), - ...(input.SegmentId != null && { SegmentId: input.SegmentId }), - }; + return take(input, { + EventFilter: (_) => se_EventFilter(_, context), + SegmentId: [], + }); }; -/** - * serializeAws_restJson1ExportJobRequest - */ -const se_ExportJobRequest = (input: ExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.S3UrlPrefix != null && { S3UrlPrefix: input.S3UrlPrefix }), - ...(input.SegmentId != null && { SegmentId: input.SegmentId }), - ...(input.SegmentVersion != null && { SegmentVersion: input.SegmentVersion }), - }; -}; +// se_ExportJobRequest omitted. -/** - * serializeAws_restJson1GCMChannelRequest - */ -const se_GCMChannelRequest = (input: GCMChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ApiKey != null && { ApiKey: input.ApiKey }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_GCMChannelRequest omitted. -/** - * serializeAws_restJson1GCMMessage - */ -const se_GCMMessage = (input: GCMMessage, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.CollapseKey != null && { CollapseKey: input.CollapseKey }), - ...(input.Data != null && { Data: se_MapOf__string(input.Data, context) }), - ...(input.IconReference != null && { IconReference: input.IconReference }), - ...(input.ImageIconUrl != null && { ImageIconUrl: input.ImageIconUrl }), - ...(input.ImageUrl != null && { ImageUrl: input.ImageUrl }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.RestrictedPackageName != null && { RestrictedPackageName: input.RestrictedPackageName }), - ...(input.SilentPush != null && { SilentPush: input.SilentPush }), - ...(input.SmallImageIconUrl != null && { SmallImageIconUrl: input.SmallImageIconUrl }), - ...(input.Sound != null && { Sound: input.Sound }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_GCMMessage omitted. /** * serializeAws_restJson1GPSCoordinates */ const se_GPSCoordinates = (input: GPSCoordinates, context: __SerdeContext): any => { - return { - ...(input.Latitude != null && { Latitude: __serializeFloat(input.Latitude) }), - ...(input.Longitude != null && { Longitude: __serializeFloat(input.Longitude) }), - }; + return take(input, { + Latitude: __serializeFloat, + Longitude: __serializeFloat, + }); }; /** * serializeAws_restJson1GPSPointDimension */ const se_GPSPointDimension = (input: GPSPointDimension, context: __SerdeContext): any => { - return { - ...(input.Coordinates != null && { Coordinates: se_GPSCoordinates(input.Coordinates, context) }), - ...(input.RangeInKilometers != null && { RangeInKilometers: __serializeFloat(input.RangeInKilometers) }), - }; + return take(input, { + Coordinates: (_) => se_GPSCoordinates(_, context), + RangeInKilometers: __serializeFloat, + }); }; -/** - * serializeAws_restJson1HoldoutActivity - */ -const se_HoldoutActivity = (input: HoldoutActivity, context: __SerdeContext): any => { - return { - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.Percentage != null && { Percentage: input.Percentage }), - }; -}; +// se_HoldoutActivity omitted. -/** - * serializeAws_restJson1ImportJobRequest - */ -const se_ImportJobRequest = (input: ImportJobRequest, context: __SerdeContext): any => { - return { - ...(input.DefineSegment != null && { DefineSegment: input.DefineSegment }), - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.Format != null && { Format: input.Format }), - ...(input.RegisterEndpoints != null && { RegisterEndpoints: input.RegisterEndpoints }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.S3Url != null && { S3Url: input.S3Url }), - ...(input.SegmentId != null && { SegmentId: input.SegmentId }), - ...(input.SegmentName != null && { SegmentName: input.SegmentName }), - }; -}; +// se_ImportJobRequest omitted. -/** - * serializeAws_restJson1InAppMessageBodyConfig - */ -const se_InAppMessageBodyConfig = (input: InAppMessageBodyConfig, context: __SerdeContext): any => { - return { - ...(input.Alignment != null && { Alignment: input.Alignment }), - ...(input.Body != null && { Body: input.Body }), - ...(input.TextColor != null && { TextColor: input.TextColor }), - }; -}; +// se_InAppMessageBodyConfig omitted. -/** - * serializeAws_restJson1InAppMessageButton - */ -const se_InAppMessageButton = (input: InAppMessageButton, context: __SerdeContext): any => { - return { - ...(input.Android != null && { Android: se_OverrideButtonConfiguration(input.Android, context) }), - ...(input.DefaultConfig != null && { DefaultConfig: se_DefaultButtonConfiguration(input.DefaultConfig, context) }), - ...(input.IOS != null && { IOS: se_OverrideButtonConfiguration(input.IOS, context) }), - ...(input.Web != null && { Web: se_OverrideButtonConfiguration(input.Web, context) }), - }; -}; +// se_InAppMessageButton omitted. -/** - * serializeAws_restJson1InAppMessageContent - */ -const se_InAppMessageContent = (input: InAppMessageContent, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { BackgroundColor: input.BackgroundColor }), - ...(input.BodyConfig != null && { BodyConfig: se_InAppMessageBodyConfig(input.BodyConfig, context) }), - ...(input.HeaderConfig != null && { HeaderConfig: se_InAppMessageHeaderConfig(input.HeaderConfig, context) }), - ...(input.ImageUrl != null && { ImageUrl: input.ImageUrl }), - ...(input.PrimaryBtn != null && { PrimaryBtn: se_InAppMessageButton(input.PrimaryBtn, context) }), - ...(input.SecondaryBtn != null && { SecondaryBtn: se_InAppMessageButton(input.SecondaryBtn, context) }), - }; -}; +// se_InAppMessageContent omitted. -/** - * serializeAws_restJson1InAppMessageHeaderConfig - */ -const se_InAppMessageHeaderConfig = (input: InAppMessageHeaderConfig, context: __SerdeContext): any => { - return { - ...(input.Alignment != null && { Alignment: input.Alignment }), - ...(input.Header != null && { Header: input.Header }), - ...(input.TextColor != null && { TextColor: input.TextColor }), - }; -}; +// se_InAppMessageHeaderConfig omitted. /** * serializeAws_restJson1InAppTemplateRequest */ const se_InAppTemplateRequest = (input: InAppTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: se_ListOfInAppMessageContent(input.Content, context) }), - ...(input.CustomConfig != null && { CustomConfig: se_MapOf__string(input.CustomConfig, context) }), - ...(input.Layout != null && { Layout: input.Layout }), - ...(input.TemplateDescription != null && { TemplateDescription: input.TemplateDescription }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + Content: _json, + CustomConfig: _json, + Layout: [], + TemplateDescription: [], + tags: [, _json, `tags`], + }); }; -/** - * serializeAws_restJson1JourneyChannelSettings - */ -const se_JourneyChannelSettings = (input: JourneyChannelSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectCampaignArn != null && { ConnectCampaignArn: input.ConnectCampaignArn }), - ...(input.ConnectCampaignExecutionRoleArn != null && { - ConnectCampaignExecutionRoleArn: input.ConnectCampaignExecutionRoleArn, - }), - }; -}; +// se_JourneyChannelSettings omitted. -/** - * serializeAws_restJson1JourneyCustomMessage - */ -const se_JourneyCustomMessage = (input: JourneyCustomMessage, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: input.Data }), - }; -}; +// se_JourneyCustomMessage omitted. -/** - * serializeAws_restJson1JourneyEmailMessage - */ -const se_JourneyEmailMessage = (input: JourneyEmailMessage, context: __SerdeContext): any => { - return { - ...(input.FromAddress != null && { FromAddress: input.FromAddress }), - }; -}; +// se_JourneyEmailMessage omitted. -/** - * serializeAws_restJson1JourneyLimits - */ -const se_JourneyLimits = (input: JourneyLimits, context: __SerdeContext): any => { - return { - ...(input.DailyCap != null && { DailyCap: input.DailyCap }), - ...(input.EndpointReentryCap != null && { EndpointReentryCap: input.EndpointReentryCap }), - ...(input.EndpointReentryInterval != null && { EndpointReentryInterval: input.EndpointReentryInterval }), - ...(input.MessagesPerSecond != null && { MessagesPerSecond: input.MessagesPerSecond }), - }; -}; +// se_JourneyLimits omitted. -/** - * serializeAws_restJson1JourneyPushMessage - */ -const se_JourneyPushMessage = (input: JourneyPushMessage, context: __SerdeContext): any => { - return { - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - }; -}; +// se_JourneyPushMessage omitted. /** * serializeAws_restJson1JourneySchedule */ const se_JourneySchedule = (input: JourneySchedule, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: input.EndTime.toISOString().split(".")[0] + "Z" }), - ...(input.StartTime != null && { StartTime: input.StartTime.toISOString().split(".")[0] + "Z" }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }; + return take(input, { + EndTime: (_) => _.toISOString().split(".")[0] + "Z", + StartTime: (_) => _.toISOString().split(".")[0] + "Z", + Timezone: [], + }); }; -/** - * serializeAws_restJson1JourneySMSMessage - */ -const se_JourneySMSMessage = (input: JourneySMSMessage, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.OriginationNumber != null && { OriginationNumber: input.OriginationNumber }), - ...(input.SenderId != null && { SenderId: input.SenderId }), - ...(input.TemplateId != null && { TemplateId: input.TemplateId }), - }; -}; +// se_JourneySMSMessage omitted. -/** - * serializeAws_restJson1JourneyStateRequest - */ -const se_JourneyStateRequest = (input: JourneyStateRequest, context: __SerdeContext): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; +// se_JourneyStateRequest omitted. -/** - * serializeAws_restJson1ListOf__EndpointTypesElement - */ -const se_ListOf__EndpointTypesElement = (input: (__EndpointTypesElement | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOf__EndpointTypesElement omitted. -/** - * serializeAws_restJson1ListOf__string - */ -const se_ListOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOf__string omitted. -/** - * serializeAws_restJson1ListOfClosedDaysRules - */ -const se_ListOfClosedDaysRules = (input: ClosedDaysRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ClosedDaysRule(entry, context); - }); -}; +// se_ListOfClosedDaysRules omitted. /** * serializeAws_restJson1ListOfEndpointBatchItem @@ -13363,16 +12564,7 @@ const se_ListOfEndpointBatchItem = (input: EndpointBatchItem[], context: __Serde }); }; -/** - * serializeAws_restJson1ListOfInAppMessageContent - */ -const se_ListOfInAppMessageContent = (input: InAppMessageContent[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InAppMessageContent(entry, context); - }); -}; +// se_ListOfInAppMessageContent omitted. /** * serializeAws_restJson1ListOfMultiConditionalBranch @@ -13385,27 +12577,9 @@ const se_ListOfMultiConditionalBranch = (input: MultiConditionalBranch[], contex }); }; -/** - * serializeAws_restJson1ListOfOpenHoursRules - */ -const se_ListOfOpenHoursRules = (input: OpenHoursRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpenHoursRule(entry, context); - }); -}; +// se_ListOfOpenHoursRules omitted. -/** - * serializeAws_restJson1ListOfRandomSplitEntry - */ -const se_ListOfRandomSplitEntry = (input: RandomSplitEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RandomSplitEntry(entry, context); - }); -}; +// se_ListOfRandomSplitEntry omitted. /** * serializeAws_restJson1ListOfSegmentDimensions @@ -13429,16 +12603,7 @@ const se_ListOfSegmentGroup = (input: SegmentGroup[], context: __SerdeContext): }); }; -/** - * serializeAws_restJson1ListOfSegmentReference - */ -const se_ListOfSegmentReference = (input: SegmentReference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SegmentReference(entry, context); - }); -}; +// se_ListOfSegmentReference omitted. /** * serializeAws_restJson1ListOfSimpleCondition @@ -13475,18 +12640,7 @@ const se_MapOf__double = (input: Record, context: __SerdeContext }, {}); }; -/** - * serializeAws_restJson1MapOf__string - */ -const se_MapOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_MapOf__string omitted. /** * serializeAws_restJson1MapOfActivity @@ -13501,47 +12655,11 @@ const se_MapOfActivity = (input: Record, context: __SerdeConte }, {}); }; -/** - * serializeAws_restJson1MapOfAddressConfiguration - */ -const se_MapOfAddressConfiguration = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AddressConfiguration(value, context); - return acc; - }, {}); -}; +// se_MapOfAddressConfiguration omitted. -/** - * serializeAws_restJson1MapOfAttributeDimension - */ -const se_MapOfAttributeDimension = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AttributeDimension(value, context); - return acc; - }, {}); -}; +// se_MapOfAttributeDimension omitted. -/** - * serializeAws_restJson1MapOfEndpointSendConfiguration - */ -const se_MapOfEndpointSendConfiguration = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_EndpointSendConfiguration(value, context); - return acc; - }, {}); -}; +// se_MapOfEndpointSendConfiguration omitted. /** * serializeAws_restJson1MapOfEvent @@ -13569,31 +12687,9 @@ const se_MapOfEventsBatch = (input: Record, context: __Serd }, {}); }; -/** - * serializeAws_restJson1MapOfListOf__string - */ -const se_MapOfListOf__string = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ListOf__string(value, context); - return acc; - }, {}); -}; +// se_MapOfListOf__string omitted. -/** - * serializeAws_restJson1MapOfListOfOpenHoursRules - */ -const se_MapOfListOfOpenHoursRules = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [DayOfWeek | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ListOfOpenHoursRules(value, context); - return acc; - }, {}); -}; +// se_MapOfListOfOpenHoursRules omitted. /** * serializeAws_restJson1MapOfMetricDimension @@ -13608,2271 +12704,990 @@ const se_MapOfMetricDimension = (input: Record, context }, {}); }; -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Body != null && { Body: input.Body }), - ...(input.ImageIconUrl != null && { ImageIconUrl: input.ImageIconUrl }), - ...(input.ImageSmallIconUrl != null && { ImageSmallIconUrl: input.ImageSmallIconUrl }), - ...(input.ImageUrl != null && { ImageUrl: input.ImageUrl }), - ...(input.JsonBody != null && { JsonBody: input.JsonBody }), - ...(input.MediaUrl != null && { MediaUrl: input.MediaUrl }), - ...(input.RawContent != null && { RawContent: input.RawContent }), - ...(input.SilentPush != null && { SilentPush: input.SilentPush }), - ...(input.TimeToLive != null && { TimeToLive: input.TimeToLive }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_Message omitted. -/** - * serializeAws_restJson1MessageConfiguration - */ -const se_MessageConfiguration = (input: MessageConfiguration, context: __SerdeContext): any => { - return { - ...(input.ADMMessage != null && { ADMMessage: se_Message(input.ADMMessage, context) }), - ...(input.APNSMessage != null && { APNSMessage: se_Message(input.APNSMessage, context) }), - ...(input.BaiduMessage != null && { BaiduMessage: se_Message(input.BaiduMessage, context) }), - ...(input.CustomMessage != null && { CustomMessage: se_CampaignCustomMessage(input.CustomMessage, context) }), - ...(input.DefaultMessage != null && { DefaultMessage: se_Message(input.DefaultMessage, context) }), - ...(input.EmailMessage != null && { EmailMessage: se_CampaignEmailMessage(input.EmailMessage, context) }), - ...(input.GCMMessage != null && { GCMMessage: se_Message(input.GCMMessage, context) }), - ...(input.InAppMessage != null && { InAppMessage: se_CampaignInAppMessage(input.InAppMessage, context) }), - ...(input.SMSMessage != null && { SMSMessage: se_CampaignSmsMessage(input.SMSMessage, context) }), - }; -}; +// se_MessageConfiguration omitted. /** * serializeAws_restJson1MessageRequest */ const se_MessageRequest = (input: MessageRequest, context: __SerdeContext): any => { - return { - ...(input.Addresses != null && { Addresses: se_MapOfAddressConfiguration(input.Addresses, context) }), - ...(input.Context != null && { Context: se_MapOf__string(input.Context, context) }), - ...(input.Endpoints != null && { Endpoints: se_MapOfEndpointSendConfiguration(input.Endpoints, context) }), - ...(input.MessageConfiguration != null && { - MessageConfiguration: se_DirectMessageConfiguration(input.MessageConfiguration, context), - }), - ...(input.TemplateConfiguration != null && { - TemplateConfiguration: se_TemplateConfiguration(input.TemplateConfiguration, context), - }), - ...(input.TraceId != null && { TraceId: input.TraceId }), - }; + return take(input, { + Addresses: _json, + Context: _json, + Endpoints: _json, + MessageConfiguration: (_) => se_DirectMessageConfiguration(_, context), + TemplateConfiguration: _json, + TraceId: [], + }); }; /** * serializeAws_restJson1MetricDimension */ const se_MetricDimension = (input: MetricDimension, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + ComparisonOperator: [], + Value: __serializeFloat, + }); }; /** * serializeAws_restJson1MultiConditionalBranch */ const se_MultiConditionalBranch = (input: MultiConditionalBranch, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: se_SimpleCondition(input.Condition, context) }), - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - }; + return take(input, { + Condition: (_) => se_SimpleCondition(_, context), + NextActivity: [], + }); }; /** * serializeAws_restJson1MultiConditionalSplitActivity */ const se_MultiConditionalSplitActivity = (input: MultiConditionalSplitActivity, context: __SerdeContext): any => { - return { - ...(input.Branches != null && { Branches: se_ListOfMultiConditionalBranch(input.Branches, context) }), - ...(input.DefaultActivity != null && { DefaultActivity: input.DefaultActivity }), - ...(input.EvaluationWaitTime != null && { EvaluationWaitTime: se_WaitTime(input.EvaluationWaitTime, context) }), - }; + return take(input, { + Branches: (_) => se_ListOfMultiConditionalBranch(_, context), + DefaultActivity: [], + EvaluationWaitTime: _json, + }); }; -/** - * serializeAws_restJson1NumberValidateRequest - */ -const se_NumberValidateRequest = (input: NumberValidateRequest, context: __SerdeContext): any => { - return { - ...(input.IsoCountryCode != null && { IsoCountryCode: input.IsoCountryCode }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - }; -}; +// se_NumberValidateRequest omitted. -/** - * serializeAws_restJson1OpenHours - */ -const se_OpenHours = (input: OpenHours, context: __SerdeContext): any => { - return { - ...(input.CUSTOM != null && { CUSTOM: se_MapOfListOfOpenHoursRules(input.CUSTOM, context) }), - ...(input.EMAIL != null && { EMAIL: se_MapOfListOfOpenHoursRules(input.EMAIL, context) }), - ...(input.PUSH != null && { PUSH: se_MapOfListOfOpenHoursRules(input.PUSH, context) }), - ...(input.SMS != null && { SMS: se_MapOfListOfOpenHoursRules(input.SMS, context) }), - ...(input.VOICE != null && { VOICE: se_MapOfListOfOpenHoursRules(input.VOICE, context) }), - }; -}; +// se_OpenHours omitted. -/** - * serializeAws_restJson1OpenHoursRule - */ -const se_OpenHoursRule = (input: OpenHoursRule, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: input.EndTime }), - ...(input.StartTime != null && { StartTime: input.StartTime }), - }; -}; +// se_OpenHoursRule omitted. -/** - * serializeAws_restJson1OverrideButtonConfiguration - */ -const se_OverrideButtonConfiguration = (input: OverrideButtonConfiguration, context: __SerdeContext): any => { - return { - ...(input.ButtonAction != null && { ButtonAction: input.ButtonAction }), - ...(input.Link != null && { Link: input.Link }), - }; -}; +// se_OverrideButtonConfiguration omitted. /** * serializeAws_restJson1PublicEndpoint */ const se_PublicEndpoint = (input: PublicEndpoint, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.Attributes != null && { Attributes: se_MapOfListOf__string(input.Attributes, context) }), - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.Demographic != null && { Demographic: se_EndpointDemographic(input.Demographic, context) }), - ...(input.EffectiveDate != null && { EffectiveDate: input.EffectiveDate }), - ...(input.EndpointStatus != null && { EndpointStatus: input.EndpointStatus }), - ...(input.Location != null && { Location: se_EndpointLocation(input.Location, context) }), - ...(input.Metrics != null && { Metrics: se_MapOf__double(input.Metrics, context) }), - ...(input.OptOut != null && { OptOut: input.OptOut }), - ...(input.RequestId != null && { RequestId: input.RequestId }), - ...(input.User != null && { User: se_EndpointUser(input.User, context) }), - }; + return take(input, { + Address: [], + Attributes: _json, + ChannelType: [], + Demographic: _json, + EffectiveDate: [], + EndpointStatus: [], + Location: (_) => se_EndpointLocation(_, context), + Metrics: (_) => se_MapOf__double(_, context), + OptOut: [], + RequestId: [], + User: _json, + }); }; -/** - * serializeAws_restJson1PushMessageActivity - */ -const se_PushMessageActivity = (input: PushMessageActivity, context: __SerdeContext): any => { - return { - ...(input.MessageConfig != null && { MessageConfig: se_JourneyPushMessage(input.MessageConfig, context) }), - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - ...(input.TemplateVersion != null && { TemplateVersion: input.TemplateVersion }), - }; -}; +// se_PushMessageActivity omitted. /** * serializeAws_restJson1PushNotificationTemplateRequest */ const se_PushNotificationTemplateRequest = (input: PushNotificationTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.ADM != null && { ADM: se_AndroidPushNotificationTemplate(input.ADM, context) }), - ...(input.APNS != null && { APNS: se_APNSPushNotificationTemplate(input.APNS, context) }), - ...(input.Baidu != null && { Baidu: se_AndroidPushNotificationTemplate(input.Baidu, context) }), - ...(input.Default != null && { Default: se_DefaultPushNotificationTemplate(input.Default, context) }), - ...(input.DefaultSubstitutions != null && { DefaultSubstitutions: input.DefaultSubstitutions }), - ...(input.GCM != null && { GCM: se_AndroidPushNotificationTemplate(input.GCM, context) }), - ...(input.RecommenderId != null && { RecommenderId: input.RecommenderId }), - ...(input.TemplateDescription != null && { TemplateDescription: input.TemplateDescription }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + ADM: _json, + APNS: _json, + Baidu: _json, + Default: _json, + DefaultSubstitutions: [], + GCM: _json, + RecommenderId: [], + TemplateDescription: [], + tags: [, _json, `tags`], + }); }; -/** - * serializeAws_restJson1QuietTime - */ -const se_QuietTime = (input: QuietTime, context: __SerdeContext): any => { - return { - ...(input.End != null && { End: input.End }), - ...(input.Start != null && { Start: input.Start }), - }; -}; +// se_QuietTime omitted. -/** - * serializeAws_restJson1RandomSplitActivity - */ -const se_RandomSplitActivity = (input: RandomSplitActivity, context: __SerdeContext): any => { - return { - ...(input.Branches != null && { Branches: se_ListOfRandomSplitEntry(input.Branches, context) }), - }; -}; +// se_RandomSplitActivity omitted. -/** - * serializeAws_restJson1RandomSplitEntry - */ -const se_RandomSplitEntry = (input: RandomSplitEntry, context: __SerdeContext): any => { - return { - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.Percentage != null && { Percentage: input.Percentage }), - }; -}; +// se_RandomSplitEntry omitted. /** * serializeAws_restJson1RawEmail */ const se_RawEmail = (input: RawEmail, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: context.base64Encoder(input.Data) }), - }; + return take(input, { + Data: context.base64Encoder, + }); }; -/** - * serializeAws_restJson1RecencyDimension - */ -const se_RecencyDimension = (input: RecencyDimension, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.RecencyType != null && { RecencyType: input.RecencyType }), - }; -}; +// se_RecencyDimension omitted. /** * serializeAws_restJson1Schedule */ const se_Schedule = (input: Schedule, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: input.EndTime }), - ...(input.EventFilter != null && { EventFilter: se_CampaignEventFilter(input.EventFilter, context) }), - ...(input.Frequency != null && { Frequency: input.Frequency }), - ...(input.IsLocalTime != null && { IsLocalTime: input.IsLocalTime }), - ...(input.QuietTime != null && { QuietTime: se_QuietTime(input.QuietTime, context) }), - ...(input.StartTime != null && { StartTime: input.StartTime }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }; + return take(input, { + EndTime: [], + EventFilter: (_) => se_CampaignEventFilter(_, context), + Frequency: [], + IsLocalTime: [], + QuietTime: _json, + StartTime: [], + Timezone: [], + }); }; -/** - * serializeAws_restJson1SegmentBehaviors - */ -const se_SegmentBehaviors = (input: SegmentBehaviors, context: __SerdeContext): any => { - return { - ...(input.Recency != null && { Recency: se_RecencyDimension(input.Recency, context) }), - }; -}; +// se_SegmentBehaviors omitted. -/** - * serializeAws_restJson1SegmentCondition - */ -const se_SegmentCondition = (input: SegmentCondition, context: __SerdeContext): any => { - return { - ...(input.SegmentId != null && { SegmentId: input.SegmentId }), - }; -}; +// se_SegmentCondition omitted. -/** - * serializeAws_restJson1SegmentDemographics - */ -const se_SegmentDemographics = (input: SegmentDemographics, context: __SerdeContext): any => { - return { - ...(input.AppVersion != null && { AppVersion: se_SetDimension(input.AppVersion, context) }), - ...(input.Channel != null && { Channel: se_SetDimension(input.Channel, context) }), - ...(input.DeviceType != null && { DeviceType: se_SetDimension(input.DeviceType, context) }), - ...(input.Make != null && { Make: se_SetDimension(input.Make, context) }), - ...(input.Model != null && { Model: se_SetDimension(input.Model, context) }), - ...(input.Platform != null && { Platform: se_SetDimension(input.Platform, context) }), - }; -}; +// se_SegmentDemographics omitted. /** * serializeAws_restJson1SegmentDimensions */ const se_SegmentDimensions = (input: SegmentDimensions, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_MapOfAttributeDimension(input.Attributes, context) }), - ...(input.Behavior != null && { Behavior: se_SegmentBehaviors(input.Behavior, context) }), - ...(input.Demographic != null && { Demographic: se_SegmentDemographics(input.Demographic, context) }), - ...(input.Location != null && { Location: se_SegmentLocation(input.Location, context) }), - ...(input.Metrics != null && { Metrics: se_MapOfMetricDimension(input.Metrics, context) }), - ...(input.UserAttributes != null && { UserAttributes: se_MapOfAttributeDimension(input.UserAttributes, context) }), - }; + return take(input, { + Attributes: _json, + Behavior: _json, + Demographic: _json, + Location: (_) => se_SegmentLocation(_, context), + Metrics: (_) => se_MapOfMetricDimension(_, context), + UserAttributes: _json, + }); }; /** * serializeAws_restJson1SegmentGroup */ const se_SegmentGroup = (input: SegmentGroup, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_ListOfSegmentDimensions(input.Dimensions, context) }), - ...(input.SourceSegments != null && { SourceSegments: se_ListOfSegmentReference(input.SourceSegments, context) }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + Dimensions: (_) => se_ListOfSegmentDimensions(_, context), + SourceSegments: _json, + SourceType: [], + Type: [], + }); }; /** * serializeAws_restJson1SegmentGroupList */ const se_SegmentGroupList = (input: SegmentGroupList, context: __SerdeContext): any => { - return { - ...(input.Groups != null && { Groups: se_ListOfSegmentGroup(input.Groups, context) }), - ...(input.Include != null && { Include: input.Include }), - }; + return take(input, { + Groups: (_) => se_ListOfSegmentGroup(_, context), + Include: [], + }); }; /** * serializeAws_restJson1SegmentLocation */ const se_SegmentLocation = (input: SegmentLocation, context: __SerdeContext): any => { - return { - ...(input.Country != null && { Country: se_SetDimension(input.Country, context) }), - ...(input.GPSPoint != null && { GPSPoint: se_GPSPointDimension(input.GPSPoint, context) }), - }; + return take(input, { + Country: _json, + GPSPoint: (_) => se_GPSPointDimension(_, context), + }); }; -/** - * serializeAws_restJson1SegmentReference - */ -const se_SegmentReference = (input: SegmentReference, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_SegmentReference omitted. -/** - * serializeAws_restJson1SendOTPMessageRequestParameters - */ -const se_SendOTPMessageRequestParameters = (input: SendOTPMessageRequestParameters, context: __SerdeContext): any => { - return { - ...(input.AllowedAttempts != null && { AllowedAttempts: input.AllowedAttempts }), - ...(input.BrandName != null && { BrandName: input.BrandName }), - ...(input.Channel != null && { Channel: input.Channel }), - ...(input.CodeLength != null && { CodeLength: input.CodeLength }), - ...(input.DestinationIdentity != null && { DestinationIdentity: input.DestinationIdentity }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.Language != null && { Language: input.Language }), - ...(input.OriginationIdentity != null && { OriginationIdentity: input.OriginationIdentity }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.TemplateId != null && { TemplateId: input.TemplateId }), - ...(input.ValidityPeriod != null && { ValidityPeriod: input.ValidityPeriod }), - }; -}; +// se_SendOTPMessageRequestParameters omitted. /** * serializeAws_restJson1SendUsersMessageRequest */ const se_SendUsersMessageRequest = (input: SendUsersMessageRequest, context: __SerdeContext): any => { - return { - ...(input.Context != null && { Context: se_MapOf__string(input.Context, context) }), - ...(input.MessageConfiguration != null && { - MessageConfiguration: se_DirectMessageConfiguration(input.MessageConfiguration, context), - }), - ...(input.TemplateConfiguration != null && { - TemplateConfiguration: se_TemplateConfiguration(input.TemplateConfiguration, context), - }), - ...(input.TraceId != null && { TraceId: input.TraceId }), - ...(input.Users != null && { Users: se_MapOfEndpointSendConfiguration(input.Users, context) }), - }; + return take(input, { + Context: _json, + MessageConfiguration: (_) => se_DirectMessageConfiguration(_, context), + TemplateConfiguration: _json, + TraceId: [], + Users: _json, + }); }; -/** - * serializeAws_restJson1Session - */ -const se_Session = (input: Session, context: __SerdeContext): any => { - return { - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.Id != null && { Id: input.Id }), - ...(input.StartTimestamp != null && { StartTimestamp: input.StartTimestamp }), - ...(input.StopTimestamp != null && { StopTimestamp: input.StopTimestamp }), - }; -}; +// se_Session omitted. -/** - * serializeAws_restJson1SetDimension - */ -const se_SetDimension = (input: SetDimension, context: __SerdeContext): any => { - return { - ...(input.DimensionType != null && { DimensionType: input.DimensionType }), - ...(input.Values != null && { Values: se_ListOf__string(input.Values, context) }), - }; -}; +// se_SetDimension omitted. /** * serializeAws_restJson1SimpleCondition */ const se_SimpleCondition = (input: SimpleCondition, context: __SerdeContext): any => { - return { - ...(input.EventCondition != null && { EventCondition: se_EventCondition(input.EventCondition, context) }), - ...(input.SegmentCondition != null && { SegmentCondition: se_SegmentCondition(input.SegmentCondition, context) }), - ...(input.SegmentDimensions != null && { - segmentDimensions: se_SegmentDimensions(input.SegmentDimensions, context), - }), - }; + return take(input, { + EventCondition: (_) => se_EventCondition(_, context), + SegmentCondition: _json, + segmentDimensions: [, (_) => se_SegmentDimensions(_, context), `SegmentDimensions`], + }); }; -/** - * serializeAws_restJson1SimpleEmail - */ -const se_SimpleEmail = (input: SimpleEmail, context: __SerdeContext): any => { - return { - ...(input.HtmlPart != null && { HtmlPart: se_SimpleEmailPart(input.HtmlPart, context) }), - ...(input.Subject != null && { Subject: se_SimpleEmailPart(input.Subject, context) }), - ...(input.TextPart != null && { TextPart: se_SimpleEmailPart(input.TextPart, context) }), - }; -}; +// se_SimpleEmail omitted. -/** - * serializeAws_restJson1SimpleEmailPart - */ -const se_SimpleEmailPart = (input: SimpleEmailPart, context: __SerdeContext): any => { - return { - ...(input.Charset != null && { Charset: input.Charset }), - ...(input.Data != null && { Data: input.Data }), - }; -}; +// se_SimpleEmailPart omitted. -/** - * serializeAws_restJson1SMSChannelRequest - */ -const se_SMSChannelRequest = (input: SMSChannelRequest, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.SenderId != null && { SenderId: input.SenderId }), - ...(input.ShortCode != null && { ShortCode: input.ShortCode }), - }; -}; +// se_SMSChannelRequest omitted. -/** - * serializeAws_restJson1SMSMessage - */ -const se_SMSMessage = (input: SMSMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.Keyword != null && { Keyword: input.Keyword }), - ...(input.MediaUrl != null && { MediaUrl: input.MediaUrl }), - ...(input.MessageType != null && { MessageType: input.MessageType }), - ...(input.OriginationNumber != null && { OriginationNumber: input.OriginationNumber }), - ...(input.SenderId != null && { SenderId: input.SenderId }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.TemplateId != null && { TemplateId: input.TemplateId }), - }; -}; +// se_SMSMessage omitted. -/** - * serializeAws_restJson1SMSMessageActivity - */ -const se_SMSMessageActivity = (input: SMSMessageActivity, context: __SerdeContext): any => { - return { - ...(input.MessageConfig != null && { MessageConfig: se_JourneySMSMessage(input.MessageConfig, context) }), - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - ...(input.TemplateVersion != null && { TemplateVersion: input.TemplateVersion }), - }; -}; +// se_SMSMessageActivity omitted. /** * serializeAws_restJson1SMSTemplateRequest */ const se_SMSTemplateRequest = (input: SMSTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.DefaultSubstitutions != null && { DefaultSubstitutions: input.DefaultSubstitutions }), - ...(input.RecommenderId != null && { RecommenderId: input.RecommenderId }), - ...(input.TemplateDescription != null && { TemplateDescription: input.TemplateDescription }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + Body: [], + DefaultSubstitutions: [], + RecommenderId: [], + TemplateDescription: [], + tags: [, _json, `tags`], + }); }; /** * serializeAws_restJson1StartCondition */ const se_StartCondition = (input: StartCondition, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EventStartCondition != null && { - EventStartCondition: se_EventStartCondition(input.EventStartCondition, context), - }), - ...(input.SegmentStartCondition != null && { - SegmentStartCondition: se_SegmentCondition(input.SegmentStartCondition, context), - }), - }; + return take(input, { + Description: [], + EventStartCondition: (_) => se_EventStartCondition(_, context), + SegmentStartCondition: _json, + }); }; /** * serializeAws_restJson1TagsModel */ const se_TagsModel = (input: TagsModel, context: __SerdeContext): any => { - return { - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + tags: [, _json, `tags`], + }); }; -/** - * serializeAws_restJson1Template - */ -const se_Template = (input: Template, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_Template omitted. -/** - * serializeAws_restJson1TemplateActiveVersionRequest - */ -const se_TemplateActiveVersionRequest = (input: TemplateActiveVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_TemplateActiveVersionRequest omitted. + +// se_TemplateConfiguration omitted. + +// se_UpdateAttributesRequest omitted. + +// se_UpdateRecommenderConfigurationShape omitted. + +// se_VerifyOTPMessageRequestParameters omitted. + +// se_VoiceChannelRequest omitted. + +// se_VoiceMessage omitted. /** - * serializeAws_restJson1TemplateConfiguration + * serializeAws_restJson1VoiceTemplateRequest */ -const se_TemplateConfiguration = (input: TemplateConfiguration, context: __SerdeContext): any => { - return { - ...(input.EmailTemplate != null && { EmailTemplate: se_Template(input.EmailTemplate, context) }), - ...(input.PushTemplate != null && { PushTemplate: se_Template(input.PushTemplate, context) }), - ...(input.SMSTemplate != null && { SMSTemplate: se_Template(input.SMSTemplate, context) }), - ...(input.VoiceTemplate != null && { VoiceTemplate: se_Template(input.VoiceTemplate, context) }), - }; +const se_VoiceTemplateRequest = (input: VoiceTemplateRequest, context: __SerdeContext): any => { + return take(input, { + Body: [], + DefaultSubstitutions: [], + LanguageCode: [], + TemplateDescription: [], + VoiceId: [], + tags: [, _json, `tags`], + }); }; -/** - * serializeAws_restJson1UpdateAttributesRequest - */ -const se_UpdateAttributesRequest = (input: UpdateAttributesRequest, context: __SerdeContext): any => { - return { - ...(input.Blacklist != null && { Blacklist: se_ListOf__string(input.Blacklist, context) }), - }; -}; - -/** - * serializeAws_restJson1UpdateRecommenderConfigurationShape - */ -const se_UpdateRecommenderConfigurationShape = ( - input: UpdateRecommenderConfigurationShape, - context: __SerdeContext -): any => { - return { - ...(input.Attributes != null && { Attributes: se_MapOf__string(input.Attributes, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RecommendationProviderIdType != null && { - RecommendationProviderIdType: input.RecommendationProviderIdType, - }), - ...(input.RecommendationProviderRoleArn != null && { - RecommendationProviderRoleArn: input.RecommendationProviderRoleArn, - }), - ...(input.RecommendationProviderUri != null && { RecommendationProviderUri: input.RecommendationProviderUri }), - ...(input.RecommendationTransformerUri != null && { - RecommendationTransformerUri: input.RecommendationTransformerUri, - }), - ...(input.RecommendationsDisplayName != null && { RecommendationsDisplayName: input.RecommendationsDisplayName }), - ...(input.RecommendationsPerMessage != null && { RecommendationsPerMessage: input.RecommendationsPerMessage }), - }; -}; - -/** - * serializeAws_restJson1VerifyOTPMessageRequestParameters - */ -const se_VerifyOTPMessageRequestParameters = ( - input: VerifyOTPMessageRequestParameters, - context: __SerdeContext -): any => { - return { - ...(input.DestinationIdentity != null && { DestinationIdentity: input.DestinationIdentity }), - ...(input.Otp != null && { Otp: input.Otp }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - }; -}; - -/** - * serializeAws_restJson1VoiceChannelRequest - */ -const se_VoiceChannelRequest = (input: VoiceChannelRequest, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1VoiceMessage - */ -const se_VoiceMessage = (input: VoiceMessage, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.OriginationNumber != null && { OriginationNumber: input.OriginationNumber }), - ...(input.Substitutions != null && { Substitutions: se_MapOfListOf__string(input.Substitutions, context) }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - }; -}; - -/** - * serializeAws_restJson1VoiceTemplateRequest - */ -const se_VoiceTemplateRequest = (input: VoiceTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: input.Body }), - ...(input.DefaultSubstitutions != null && { DefaultSubstitutions: input.DefaultSubstitutions }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.TemplateDescription != null && { TemplateDescription: input.TemplateDescription }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; -}; - -/** - * serializeAws_restJson1WaitActivity - */ -const se_WaitActivity = (input: WaitActivity, context: __SerdeContext): any => { - return { - ...(input.NextActivity != null && { NextActivity: input.NextActivity }), - ...(input.WaitTime != null && { WaitTime: se_WaitTime(input.WaitTime, context) }), - }; -}; +// se_WaitActivity omitted. -/** - * serializeAws_restJson1WaitTime - */ -const se_WaitTime = (input: WaitTime, context: __SerdeContext): any => { - return { - ...(input.WaitFor != null && { WaitFor: input.WaitFor }), - ...(input.WaitUntil != null && { WaitUntil: input.WaitUntil }), - }; -}; +// se_WaitTime omitted. -/** - * serializeAws_restJson1WriteApplicationSettingsRequest - */ -const se_WriteApplicationSettingsRequest = (input: WriteApplicationSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.CampaignHook != null && { CampaignHook: se_CampaignHook(input.CampaignHook, context) }), - ...(input.CloudWatchMetricsEnabled != null && { CloudWatchMetricsEnabled: input.CloudWatchMetricsEnabled }), - ...(input.EventTaggingEnabled != null && { EventTaggingEnabled: input.EventTaggingEnabled }), - ...(input.Limits != null && { Limits: se_CampaignLimits(input.Limits, context) }), - ...(input.QuietTime != null && { QuietTime: se_QuietTime(input.QuietTime, context) }), - }; -}; +// se_WriteApplicationSettingsRequest omitted. /** * serializeAws_restJson1WriteCampaignRequest */ const se_WriteCampaignRequest = (input: WriteCampaignRequest, context: __SerdeContext): any => { - return { - ...(input.AdditionalTreatments != null && { - AdditionalTreatments: se_ListOfWriteTreatmentResource(input.AdditionalTreatments, context), - }), - ...(input.CustomDeliveryConfiguration != null && { - CustomDeliveryConfiguration: se_CustomDeliveryConfiguration(input.CustomDeliveryConfiguration, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.HoldoutPercent != null && { HoldoutPercent: input.HoldoutPercent }), - ...(input.Hook != null && { Hook: se_CampaignHook(input.Hook, context) }), - ...(input.IsPaused != null && { IsPaused: input.IsPaused }), - ...(input.Limits != null && { Limits: se_CampaignLimits(input.Limits, context) }), - ...(input.MessageConfiguration != null && { - MessageConfiguration: se_MessageConfiguration(input.MessageConfiguration, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Schedule != null && { Schedule: se_Schedule(input.Schedule, context) }), - ...(input.SegmentId != null && { SegmentId: input.SegmentId }), - ...(input.SegmentVersion != null && { SegmentVersion: input.SegmentVersion }), - ...(input.TemplateConfiguration != null && { - TemplateConfiguration: se_TemplateConfiguration(input.TemplateConfiguration, context), - }), - ...(input.TreatmentDescription != null && { TreatmentDescription: input.TreatmentDescription }), - ...(input.TreatmentName != null && { TreatmentName: input.TreatmentName }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; -}; - -/** - * serializeAws_restJson1WriteEventStream - */ -const se_WriteEventStream = (input: WriteEventStream, context: __SerdeContext): any => { - return { - ...(input.DestinationStreamArn != null && { DestinationStreamArn: input.DestinationStreamArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; + return take(input, { + AdditionalTreatments: (_) => se_ListOfWriteTreatmentResource(_, context), + CustomDeliveryConfiguration: _json, + Description: [], + HoldoutPercent: [], + Hook: _json, + IsPaused: [], + Limits: _json, + MessageConfiguration: _json, + Name: [], + Priority: [], + Schedule: (_) => se_Schedule(_, context), + SegmentId: [], + SegmentVersion: [], + TemplateConfiguration: _json, + TreatmentDescription: [], + TreatmentName: [], + tags: [, _json, `tags`], + }); +}; + +// se_WriteEventStream omitted. /** * serializeAws_restJson1WriteJourneyRequest */ const se_WriteJourneyRequest = (input: WriteJourneyRequest, context: __SerdeContext): any => { - return { - ...(input.Activities != null && { Activities: se_MapOfActivity(input.Activities, context) }), - ...(input.ClosedDays != null && { ClosedDays: se_ClosedDays(input.ClosedDays, context) }), - ...(input.CreationDate != null && { CreationDate: input.CreationDate }), - ...(input.JourneyChannelSettings != null && { - JourneyChannelSettings: se_JourneyChannelSettings(input.JourneyChannelSettings, context), - }), - ...(input.LastModifiedDate != null && { LastModifiedDate: input.LastModifiedDate }), - ...(input.Limits != null && { Limits: se_JourneyLimits(input.Limits, context) }), - ...(input.LocalTime != null && { LocalTime: input.LocalTime }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OpenHours != null && { OpenHours: se_OpenHours(input.OpenHours, context) }), - ...(input.QuietTime != null && { QuietTime: se_QuietTime(input.QuietTime, context) }), - ...(input.RefreshFrequency != null && { RefreshFrequency: input.RefreshFrequency }), - ...(input.RefreshOnSegmentUpdate != null && { RefreshOnSegmentUpdate: input.RefreshOnSegmentUpdate }), - ...(input.Schedule != null && { Schedule: se_JourneySchedule(input.Schedule, context) }), - ...(input.SendingSchedule != null && { SendingSchedule: input.SendingSchedule }), - ...(input.StartActivity != null && { StartActivity: input.StartActivity }), - ...(input.StartCondition != null && { StartCondition: se_StartCondition(input.StartCondition, context) }), - ...(input.State != null && { State: input.State }), - ...(input.WaitForQuietTime != null && { WaitForQuietTime: input.WaitForQuietTime }), - }; + return take(input, { + Activities: (_) => se_MapOfActivity(_, context), + ClosedDays: _json, + CreationDate: [], + JourneyChannelSettings: _json, + LastModifiedDate: [], + Limits: _json, + LocalTime: [], + Name: [], + OpenHours: _json, + QuietTime: _json, + RefreshFrequency: [], + RefreshOnSegmentUpdate: [], + Schedule: (_) => se_JourneySchedule(_, context), + SendingSchedule: [], + StartActivity: [], + StartCondition: (_) => se_StartCondition(_, context), + State: [], + WaitForQuietTime: [], + }); }; /** * serializeAws_restJson1WriteSegmentRequest */ const se_WriteSegmentRequest = (input: WriteSegmentRequest, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_SegmentDimensions(input.Dimensions, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SegmentGroups != null && { SegmentGroups: se_SegmentGroupList(input.SegmentGroups, context) }), - ...(input.tags != null && { tags: se_MapOf__string(input.tags, context) }), - }; + return take(input, { + Dimensions: (_) => se_SegmentDimensions(_, context), + Name: [], + SegmentGroups: (_) => se_SegmentGroupList(_, context), + tags: [, _json, `tags`], + }); }; /** * serializeAws_restJson1WriteTreatmentResource */ const se_WriteTreatmentResource = (input: WriteTreatmentResource, context: __SerdeContext): any => { - return { - ...(input.CustomDeliveryConfiguration != null && { - CustomDeliveryConfiguration: se_CustomDeliveryConfiguration(input.CustomDeliveryConfiguration, context), - }), - ...(input.MessageConfiguration != null && { - MessageConfiguration: se_MessageConfiguration(input.MessageConfiguration, context), - }), - ...(input.Schedule != null && { Schedule: se_Schedule(input.Schedule, context) }), - ...(input.SizePercent != null && { SizePercent: input.SizePercent }), - ...(input.TemplateConfiguration != null && { - TemplateConfiguration: se_TemplateConfiguration(input.TemplateConfiguration, context), - }), - ...(input.TreatmentDescription != null && { TreatmentDescription: input.TreatmentDescription }), - ...(input.TreatmentName != null && { TreatmentName: input.TreatmentName }), - }; + return take(input, { + CustomDeliveryConfiguration: _json, + MessageConfiguration: _json, + Schedule: (_) => se_Schedule(_, context), + SizePercent: [], + TemplateConfiguration: _json, + TreatmentDescription: [], + TreatmentName: [], + }); }; -/** - * deserializeAws_restJson1ActivitiesResponse - */ -const de_ActivitiesResponse = (output: any, context: __SerdeContext): ActivitiesResponse => { - return { - Item: output.Item != null ? de_ListOfActivityResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ActivitiesResponse omitted. /** * deserializeAws_restJson1Activity */ const de_Activity = (output: any, context: __SerdeContext): Activity => { - return { - CUSTOM: output.CUSTOM != null ? de_CustomMessageActivity(output.CUSTOM, context) : undefined, - ConditionalSplit: - output.ConditionalSplit != null ? de_ConditionalSplitActivity(output.ConditionalSplit, context) : undefined, - ContactCenter: output.ContactCenter != null ? de_ContactCenterActivity(output.ContactCenter, context) : undefined, - Description: __expectString(output.Description), - EMAIL: output.EMAIL != null ? de_EmailMessageActivity(output.EMAIL, context) : undefined, - Holdout: output.Holdout != null ? de_HoldoutActivity(output.Holdout, context) : undefined, - MultiCondition: - output.MultiCondition != null ? de_MultiConditionalSplitActivity(output.MultiCondition, context) : undefined, - PUSH: output.PUSH != null ? de_PushMessageActivity(output.PUSH, context) : undefined, - RandomSplit: output.RandomSplit != null ? de_RandomSplitActivity(output.RandomSplit, context) : undefined, - SMS: output.SMS != null ? de_SMSMessageActivity(output.SMS, context) : undefined, - Wait: output.Wait != null ? de_WaitActivity(output.Wait, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ActivityResponse - */ -const de_ActivityResponse = (output: any, context: __SerdeContext): ActivityResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CampaignId: __expectString(output.CampaignId), - End: __expectString(output.End), - Id: __expectString(output.Id), - Result: __expectString(output.Result), - ScheduledStart: __expectString(output.ScheduledStart), - Start: __expectString(output.Start), - State: __expectString(output.State), - SuccessfulEndpointCount: __expectInt32(output.SuccessfulEndpointCount), - TimezonesCompletedCount: __expectInt32(output.TimezonesCompletedCount), - TimezonesTotalCount: __expectInt32(output.TimezonesTotalCount), - TotalEndpointCount: __expectInt32(output.TotalEndpointCount), - TreatmentId: __expectString(output.TreatmentId), - } as any; -}; - -/** - * deserializeAws_restJson1ADMChannelResponse - */ -const de_ADMChannelResponse = (output: any, context: __SerdeContext): ADMChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1AndroidPushNotificationTemplate - */ -const de_AndroidPushNotificationTemplate = (output: any, context: __SerdeContext): AndroidPushNotificationTemplate => { - return { - Action: __expectString(output.Action), - Body: __expectString(output.Body), - ImageIconUrl: __expectString(output.ImageIconUrl), - ImageUrl: __expectString(output.ImageUrl), - RawContent: __expectString(output.RawContent), - SmallImageIconUrl: __expectString(output.SmallImageIconUrl), - Sound: __expectString(output.Sound), - Title: __expectString(output.Title), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1APNSChannelResponse - */ -const de_APNSChannelResponse = (output: any, context: __SerdeContext): APNSChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - DefaultAuthenticationMethod: __expectString(output.DefaultAuthenticationMethod), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - HasTokenKey: __expectBoolean(output.HasTokenKey), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1APNSPushNotificationTemplate - */ -const de_APNSPushNotificationTemplate = (output: any, context: __SerdeContext): APNSPushNotificationTemplate => { - return { - Action: __expectString(output.Action), - Body: __expectString(output.Body), - MediaUrl: __expectString(output.MediaUrl), - RawContent: __expectString(output.RawContent), - Sound: __expectString(output.Sound), - Title: __expectString(output.Title), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1APNSSandboxChannelResponse - */ -const de_APNSSandboxChannelResponse = (output: any, context: __SerdeContext): APNSSandboxChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - DefaultAuthenticationMethod: __expectString(output.DefaultAuthenticationMethod), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - HasTokenKey: __expectBoolean(output.HasTokenKey), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1APNSVoipChannelResponse - */ -const de_APNSVoipChannelResponse = (output: any, context: __SerdeContext): APNSVoipChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - DefaultAuthenticationMethod: __expectString(output.DefaultAuthenticationMethod), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - HasTokenKey: __expectBoolean(output.HasTokenKey), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1APNSVoipSandboxChannelResponse - */ -const de_APNSVoipSandboxChannelResponse = (output: any, context: __SerdeContext): APNSVoipSandboxChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - DefaultAuthenticationMethod: __expectString(output.DefaultAuthenticationMethod), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - HasTokenKey: __expectBoolean(output.HasTokenKey), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; + return take(output, { + CUSTOM: _json, + ConditionalSplit: (_: any) => de_ConditionalSplitActivity(_, context), + ContactCenter: _json, + Description: __expectString, + EMAIL: _json, + Holdout: _json, + MultiCondition: (_: any) => de_MultiConditionalSplitActivity(_, context), + PUSH: _json, + RandomSplit: _json, + SMS: _json, + Wait: _json, + }) as any; }; +// de_ActivityResponse omitted. + +// de_ADMChannelResponse omitted. + +// de_AndroidPushNotificationTemplate omitted. + +// de_APNSChannelResponse omitted. + +// de_APNSPushNotificationTemplate omitted. + +// de_APNSSandboxChannelResponse omitted. + +// de_APNSVoipChannelResponse omitted. + +// de_APNSVoipSandboxChannelResponse omitted. + /** * deserializeAws_restJson1ApplicationDateRangeKpiResponse */ const de_ApplicationDateRangeKpiResponse = (output: any, context: __SerdeContext): ApplicationDateRangeKpiResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - EndTime: output.EndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndTime)) : undefined, - KpiName: __expectString(output.KpiName), - KpiResult: output.KpiResult != null ? de_BaseKpiResult(output.KpiResult, context) : undefined, - NextToken: __expectString(output.NextToken), - StartTime: - output.StartTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartTime)) : undefined, - } as any; + return take(output, { + ApplicationId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + KpiName: __expectString, + KpiResult: _json, + NextToken: __expectString, + StartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1ApplicationResponse */ const de_ApplicationResponse = (output: any, context: __SerdeContext): ApplicationResponse => { - return { - Arn: __expectString(output.Arn), - CreationDate: __expectString(output.CreationDate), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationDate: __expectString, + Id: __expectString, + Name: __expectString, + tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1ApplicationSettingsResource - */ -const de_ApplicationSettingsResource = (output: any, context: __SerdeContext): ApplicationSettingsResource => { - return { - ApplicationId: __expectString(output.ApplicationId), - CampaignHook: output.CampaignHook != null ? de_CampaignHook(output.CampaignHook, context) : undefined, - LastModifiedDate: __expectString(output.LastModifiedDate), - Limits: output.Limits != null ? de_CampaignLimits(output.Limits, context) : undefined, - QuietTime: output.QuietTime != null ? de_QuietTime(output.QuietTime, context) : undefined, - } as any; -}; +// de_ApplicationSettingsResource omitted. /** * deserializeAws_restJson1ApplicationsResponse */ const de_ApplicationsResponse = (output: any, context: __SerdeContext): ApplicationsResponse => { - return { - Item: output.Item != null ? de_ListOfApplicationResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Item: (_: any) => de_ListOfApplicationResponse(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AttributeDimension - */ -const de_AttributeDimension = (output: any, context: __SerdeContext): AttributeDimension => { - return { - AttributeType: __expectString(output.AttributeType), - Values: output.Values != null ? de_ListOf__string(output.Values, context) : undefined, - } as any; -}; +// de_AttributeDimension omitted. -/** - * deserializeAws_restJson1AttributesResource - */ -const de_AttributesResource = (output: any, context: __SerdeContext): AttributesResource => { - return { - ApplicationId: __expectString(output.ApplicationId), - AttributeType: __expectString(output.AttributeType), - Attributes: output.Attributes != null ? de_ListOf__string(output.Attributes, context) : undefined, - } as any; -}; +// de_AttributesResource omitted. -/** - * deserializeAws_restJson1BaiduChannelResponse - */ -const de_BaiduChannelResponse = (output: any, context: __SerdeContext): BaiduChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - Credential: __expectString(output.Credential), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; -}; +// de_BaiduChannelResponse omitted. -/** - * deserializeAws_restJson1BaseKpiResult - */ -const de_BaseKpiResult = (output: any, context: __SerdeContext): BaseKpiResult => { - return { - Rows: output.Rows != null ? de_ListOfResultRow(output.Rows, context) : undefined, - } as any; -}; +// de_BaseKpiResult omitted. -/** - * deserializeAws_restJson1CampaignCustomMessage - */ -const de_CampaignCustomMessage = (output: any, context: __SerdeContext): CampaignCustomMessage => { - return { - Data: __expectString(output.Data), - } as any; -}; +// de_CampaignCustomMessage omitted. /** * deserializeAws_restJson1CampaignDateRangeKpiResponse */ const de_CampaignDateRangeKpiResponse = (output: any, context: __SerdeContext): CampaignDateRangeKpiResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CampaignId: __expectString(output.CampaignId), - EndTime: output.EndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndTime)) : undefined, - KpiName: __expectString(output.KpiName), - KpiResult: output.KpiResult != null ? de_BaseKpiResult(output.KpiResult, context) : undefined, - NextToken: __expectString(output.NextToken), - StartTime: - output.StartTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartTime)) : undefined, - } as any; + return take(output, { + ApplicationId: __expectString, + CampaignId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + KpiName: __expectString, + KpiResult: _json, + NextToken: __expectString, + StartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1CampaignEmailMessage - */ -const de_CampaignEmailMessage = (output: any, context: __SerdeContext): CampaignEmailMessage => { - return { - Body: __expectString(output.Body), - FromAddress: __expectString(output.FromAddress), - HtmlBody: __expectString(output.HtmlBody), - Title: __expectString(output.Title), - } as any; -}; +// de_CampaignEmailMessage omitted. /** * deserializeAws_restJson1CampaignEventFilter */ const de_CampaignEventFilter = (output: any, context: __SerdeContext): CampaignEventFilter => { - return { - Dimensions: output.Dimensions != null ? de_EventDimensions(output.Dimensions, context) : undefined, - FilterType: __expectString(output.FilterType), - } as any; + return take(output, { + Dimensions: (_: any) => de_EventDimensions(_, context), + FilterType: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1CampaignHook - */ -const de_CampaignHook = (output: any, context: __SerdeContext): CampaignHook => { - return { - LambdaFunctionName: __expectString(output.LambdaFunctionName), - Mode: __expectString(output.Mode), - WebUrl: __expectString(output.WebUrl), - } as any; -}; +// de_CampaignHook omitted. -/** - * deserializeAws_restJson1CampaignInAppMessage - */ -const de_CampaignInAppMessage = (output: any, context: __SerdeContext): CampaignInAppMessage => { - return { - Body: __expectString(output.Body), - Content: output.Content != null ? de_ListOfInAppMessageContent(output.Content, context) : undefined, - CustomConfig: output.CustomConfig != null ? de_MapOf__string(output.CustomConfig, context) : undefined, - Layout: __expectString(output.Layout), - } as any; -}; +// de_CampaignInAppMessage omitted. -/** - * deserializeAws_restJson1CampaignLimits - */ -const de_CampaignLimits = (output: any, context: __SerdeContext): CampaignLimits => { - return { - Daily: __expectInt32(output.Daily), - MaximumDuration: __expectInt32(output.MaximumDuration), - MessagesPerSecond: __expectInt32(output.MessagesPerSecond), - Session: __expectInt32(output.Session), - Total: __expectInt32(output.Total), - } as any; -}; +// de_CampaignLimits omitted. /** * deserializeAws_restJson1CampaignResponse */ const de_CampaignResponse = (output: any, context: __SerdeContext): CampaignResponse => { - return { - AdditionalTreatments: - output.AdditionalTreatments != null - ? de_ListOfTreatmentResource(output.AdditionalTreatments, context) - : undefined, - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - CreationDate: __expectString(output.CreationDate), - CustomDeliveryConfiguration: - output.CustomDeliveryConfiguration != null - ? de_CustomDeliveryConfiguration(output.CustomDeliveryConfiguration, context) - : undefined, - DefaultState: output.DefaultState != null ? de_CampaignState(output.DefaultState, context) : undefined, - Description: __expectString(output.Description), - HoldoutPercent: __expectInt32(output.HoldoutPercent), - Hook: output.Hook != null ? de_CampaignHook(output.Hook, context) : undefined, - Id: __expectString(output.Id), - IsPaused: __expectBoolean(output.IsPaused), - LastModifiedDate: __expectString(output.LastModifiedDate), - Limits: output.Limits != null ? de_CampaignLimits(output.Limits, context) : undefined, - MessageConfiguration: - output.MessageConfiguration != null ? de_MessageConfiguration(output.MessageConfiguration, context) : undefined, - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - Schedule: output.Schedule != null ? de_Schedule(output.Schedule, context) : undefined, - SegmentId: __expectString(output.SegmentId), - SegmentVersion: __expectInt32(output.SegmentVersion), - State: output.State != null ? de_CampaignState(output.State, context) : undefined, - TemplateConfiguration: - output.TemplateConfiguration != null - ? de_TemplateConfiguration(output.TemplateConfiguration, context) - : undefined, - TreatmentDescription: __expectString(output.TreatmentDescription), - TreatmentName: __expectString(output.TreatmentName), - Version: __expectInt32(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CampaignSmsMessage - */ -const de_CampaignSmsMessage = (output: any, context: __SerdeContext): CampaignSmsMessage => { - return { - Body: __expectString(output.Body), - EntityId: __expectString(output.EntityId), - MessageType: __expectString(output.MessageType), - OriginationNumber: __expectString(output.OriginationNumber), - SenderId: __expectString(output.SenderId), - TemplateId: __expectString(output.TemplateId), - } as any; -}; + return take(output, { + AdditionalTreatments: (_: any) => de_ListOfTreatmentResource(_, context), + ApplicationId: __expectString, + Arn: __expectString, + CreationDate: __expectString, + CustomDeliveryConfiguration: _json, + DefaultState: _json, + Description: __expectString, + HoldoutPercent: __expectInt32, + Hook: _json, + Id: __expectString, + IsPaused: __expectBoolean, + LastModifiedDate: __expectString, + Limits: _json, + MessageConfiguration: _json, + Name: __expectString, + Priority: __expectInt32, + Schedule: (_: any) => de_Schedule(_, context), + SegmentId: __expectString, + SegmentVersion: __expectInt32, + State: _json, + TemplateConfiguration: _json, + TreatmentDescription: __expectString, + TreatmentName: __expectString, + Version: __expectInt32, + tags: [, _json, `tags`], + }) as any; +}; + +// de_CampaignSmsMessage omitted. /** * deserializeAws_restJson1CampaignsResponse */ const de_CampaignsResponse = (output: any, context: __SerdeContext): CampaignsResponse => { - return { - Item: output.Item != null ? de_ListOfCampaignResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Item: (_: any) => de_ListOfCampaignResponse(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1CampaignState - */ -const de_CampaignState = (output: any, context: __SerdeContext): CampaignState => { - return { - CampaignStatus: __expectString(output.CampaignStatus), - } as any; -}; +// de_CampaignState omitted. -/** - * deserializeAws_restJson1ChannelResponse - */ -const de_ChannelResponse = (output: any, context: __SerdeContext): ChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Version: __expectInt32(output.Version), - } as any; -}; +// de_ChannelResponse omitted. -/** - * deserializeAws_restJson1ChannelsResponse - */ -const de_ChannelsResponse = (output: any, context: __SerdeContext): ChannelsResponse => { - return { - Channels: output.Channels != null ? de_MapOfChannelResponse(output.Channels, context) : undefined, - } as any; -}; +// de_ChannelsResponse omitted. -/** - * deserializeAws_restJson1ClosedDays - */ -const de_ClosedDays = (output: any, context: __SerdeContext): ClosedDays => { - return { - CUSTOM: output.CUSTOM != null ? de_ListOfClosedDaysRules(output.CUSTOM, context) : undefined, - EMAIL: output.EMAIL != null ? de_ListOfClosedDaysRules(output.EMAIL, context) : undefined, - PUSH: output.PUSH != null ? de_ListOfClosedDaysRules(output.PUSH, context) : undefined, - SMS: output.SMS != null ? de_ListOfClosedDaysRules(output.SMS, context) : undefined, - VOICE: output.VOICE != null ? de_ListOfClosedDaysRules(output.VOICE, context) : undefined, - } as any; -}; +// de_ClosedDays omitted. -/** - * deserializeAws_restJson1ClosedDaysRule - */ -const de_ClosedDaysRule = (output: any, context: __SerdeContext): ClosedDaysRule => { - return { - EndDateTime: __expectString(output.EndDateTime), - Name: __expectString(output.Name), - StartDateTime: __expectString(output.StartDateTime), - } as any; -}; +// de_ClosedDaysRule omitted. /** * deserializeAws_restJson1Condition */ const de_Condition = (output: any, context: __SerdeContext): Condition => { - return { - Conditions: output.Conditions != null ? de_ListOfSimpleCondition(output.Conditions, context) : undefined, - Operator: __expectString(output.Operator), - } as any; + return take(output, { + Conditions: (_: any) => de_ListOfSimpleCondition(_, context), + Operator: __expectString, + }) as any; }; /** * deserializeAws_restJson1ConditionalSplitActivity */ const de_ConditionalSplitActivity = (output: any, context: __SerdeContext): ConditionalSplitActivity => { - return { - Condition: output.Condition != null ? de_Condition(output.Condition, context) : undefined, - EvaluationWaitTime: output.EvaluationWaitTime != null ? de_WaitTime(output.EvaluationWaitTime, context) : undefined, - FalseActivity: __expectString(output.FalseActivity), - TrueActivity: __expectString(output.TrueActivity), - } as any; + return take(output, { + Condition: (_: any) => de_Condition(_, context), + EvaluationWaitTime: _json, + FalseActivity: __expectString, + TrueActivity: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ContactCenterActivity - */ -const de_ContactCenterActivity = (output: any, context: __SerdeContext): ContactCenterActivity => { - return { - NextActivity: __expectString(output.NextActivity), - } as any; -}; +// de_ContactCenterActivity omitted. -/** - * deserializeAws_restJson1CreateTemplateMessageBody - */ -const de_CreateTemplateMessageBody = (output: any, context: __SerdeContext): CreateTemplateMessageBody => { - return { - Arn: __expectString(output.Arn), - Message: __expectString(output.Message), - RequestID: __expectString(output.RequestID), - } as any; -}; +// de_CreateTemplateMessageBody omitted. -/** - * deserializeAws_restJson1CustomDeliveryConfiguration - */ -const de_CustomDeliveryConfiguration = (output: any, context: __SerdeContext): CustomDeliveryConfiguration => { - return { - DeliveryUri: __expectString(output.DeliveryUri), - EndpointTypes: - output.EndpointTypes != null ? de_ListOf__EndpointTypesElement(output.EndpointTypes, context) : undefined, - } as any; -}; +// de_CustomDeliveryConfiguration omitted. -/** - * deserializeAws_restJson1CustomMessageActivity - */ -const de_CustomMessageActivity = (output: any, context: __SerdeContext): CustomMessageActivity => { - return { - DeliveryUri: __expectString(output.DeliveryUri), - EndpointTypes: - output.EndpointTypes != null ? de_ListOf__EndpointTypesElement(output.EndpointTypes, context) : undefined, - MessageConfig: output.MessageConfig != null ? de_JourneyCustomMessage(output.MessageConfig, context) : undefined, - NextActivity: __expectString(output.NextActivity), - TemplateName: __expectString(output.TemplateName), - TemplateVersion: __expectString(output.TemplateVersion), - } as any; -}; +// de_CustomMessageActivity omitted. -/** - * deserializeAws_restJson1DefaultButtonConfiguration - */ -const de_DefaultButtonConfiguration = (output: any, context: __SerdeContext): DefaultButtonConfiguration => { - return { - BackgroundColor: __expectString(output.BackgroundColor), - BorderRadius: __expectInt32(output.BorderRadius), - ButtonAction: __expectString(output.ButtonAction), - Link: __expectString(output.Link), - Text: __expectString(output.Text), - TextColor: __expectString(output.TextColor), - } as any; -}; +// de_DefaultButtonConfiguration omitted. -/** - * deserializeAws_restJson1DefaultPushNotificationTemplate - */ -const de_DefaultPushNotificationTemplate = (output: any, context: __SerdeContext): DefaultPushNotificationTemplate => { - return { - Action: __expectString(output.Action), - Body: __expectString(output.Body), - Sound: __expectString(output.Sound), - Title: __expectString(output.Title), - Url: __expectString(output.Url), - } as any; -}; +// de_DefaultPushNotificationTemplate omitted. -/** - * deserializeAws_restJson1EmailChannelResponse - */ -const de_EmailChannelResponse = (output: any, context: __SerdeContext): EmailChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - ConfigurationSet: __expectString(output.ConfigurationSet), - CreationDate: __expectString(output.CreationDate), - Enabled: __expectBoolean(output.Enabled), - FromAddress: __expectString(output.FromAddress), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - Identity: __expectString(output.Identity), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - MessagesPerSecond: __expectInt32(output.MessagesPerSecond), - Platform: __expectString(output.Platform), - RoleArn: __expectString(output.RoleArn), - Version: __expectInt32(output.Version), - } as any; -}; +// de_EmailChannelResponse omitted. -/** - * deserializeAws_restJson1EmailMessageActivity - */ -const de_EmailMessageActivity = (output: any, context: __SerdeContext): EmailMessageActivity => { - return { - MessageConfig: output.MessageConfig != null ? de_JourneyEmailMessage(output.MessageConfig, context) : undefined, - NextActivity: __expectString(output.NextActivity), - TemplateName: __expectString(output.TemplateName), - TemplateVersion: __expectString(output.TemplateVersion), - } as any; -}; +// de_EmailMessageActivity omitted. /** * deserializeAws_restJson1EmailTemplateResponse */ const de_EmailTemplateResponse = (output: any, context: __SerdeContext): EmailTemplateResponse => { - return { - Arn: __expectString(output.Arn), - CreationDate: __expectString(output.CreationDate), - DefaultSubstitutions: __expectString(output.DefaultSubstitutions), - HtmlPart: __expectString(output.HtmlPart), - LastModifiedDate: __expectString(output.LastModifiedDate), - RecommenderId: __expectString(output.RecommenderId), - Subject: __expectString(output.Subject), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - TextPart: __expectString(output.TextPart), - Version: __expectString(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationDate: __expectString, + DefaultSubstitutions: __expectString, + HtmlPart: __expectString, + LastModifiedDate: __expectString, + RecommenderId: __expectString, + Subject: __expectString, + TemplateDescription: __expectString, + TemplateName: __expectString, + TemplateType: __expectString, + TextPart: __expectString, + Version: __expectString, + tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1EndpointDemographic - */ -const de_EndpointDemographic = (output: any, context: __SerdeContext): EndpointDemographic => { - return { - AppVersion: __expectString(output.AppVersion), - Locale: __expectString(output.Locale), - Make: __expectString(output.Make), - Model: __expectString(output.Model), - ModelVersion: __expectString(output.ModelVersion), - Platform: __expectString(output.Platform), - PlatformVersion: __expectString(output.PlatformVersion), - Timezone: __expectString(output.Timezone), - } as any; -}; +// de_EndpointDemographic omitted. -/** - * deserializeAws_restJson1EndpointItemResponse - */ -const de_EndpointItemResponse = (output: any, context: __SerdeContext): EndpointItemResponse => { - return { - Message: __expectString(output.Message), - StatusCode: __expectInt32(output.StatusCode), - } as any; -}; +// de_EndpointItemResponse omitted. /** * deserializeAws_restJson1EndpointLocation */ const de_EndpointLocation = (output: any, context: __SerdeContext): EndpointLocation => { - return { - City: __expectString(output.City), - Country: __expectString(output.Country), - Latitude: __limitedParseDouble(output.Latitude), - Longitude: __limitedParseDouble(output.Longitude), - PostalCode: __expectString(output.PostalCode), - Region: __expectString(output.Region), - } as any; + return take(output, { + City: __expectString, + Country: __expectString, + Latitude: __limitedParseDouble, + Longitude: __limitedParseDouble, + PostalCode: __expectString, + Region: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1EndpointMessageResult - */ -const de_EndpointMessageResult = (output: any, context: __SerdeContext): EndpointMessageResult => { - return { - Address: __expectString(output.Address), - DeliveryStatus: __expectString(output.DeliveryStatus), - MessageId: __expectString(output.MessageId), - StatusCode: __expectInt32(output.StatusCode), - StatusMessage: __expectString(output.StatusMessage), - UpdatedToken: __expectString(output.UpdatedToken), - } as any; -}; +// de_EndpointMessageResult omitted. /** * deserializeAws_restJson1EndpointResponse */ const de_EndpointResponse = (output: any, context: __SerdeContext): EndpointResponse => { - return { - Address: __expectString(output.Address), - ApplicationId: __expectString(output.ApplicationId), - Attributes: output.Attributes != null ? de_MapOfListOf__string(output.Attributes, context) : undefined, - ChannelType: __expectString(output.ChannelType), - CohortId: __expectString(output.CohortId), - CreationDate: __expectString(output.CreationDate), - Demographic: output.Demographic != null ? de_EndpointDemographic(output.Demographic, context) : undefined, - EffectiveDate: __expectString(output.EffectiveDate), - EndpointStatus: __expectString(output.EndpointStatus), - Id: __expectString(output.Id), - Location: output.Location != null ? de_EndpointLocation(output.Location, context) : undefined, - Metrics: output.Metrics != null ? de_MapOf__double(output.Metrics, context) : undefined, - OptOut: __expectString(output.OptOut), - RequestId: __expectString(output.RequestId), - User: output.User != null ? de_EndpointUser(output.User, context) : undefined, - } as any; + return take(output, { + Address: __expectString, + ApplicationId: __expectString, + Attributes: _json, + ChannelType: __expectString, + CohortId: __expectString, + CreationDate: __expectString, + Demographic: _json, + EffectiveDate: __expectString, + EndpointStatus: __expectString, + Id: __expectString, + Location: (_: any) => de_EndpointLocation(_, context), + Metrics: (_: any) => de_MapOf__double(_, context), + OptOut: __expectString, + RequestId: __expectString, + User: _json, + }) as any; }; /** * deserializeAws_restJson1EndpointsResponse */ const de_EndpointsResponse = (output: any, context: __SerdeContext): EndpointsResponse => { - return { - Item: output.Item != null ? de_ListOfEndpointResponse(output.Item, context) : undefined, - } as any; + return take(output, { + Item: (_: any) => de_ListOfEndpointResponse(_, context), + }) as any; }; -/** - * deserializeAws_restJson1EndpointUser - */ -const de_EndpointUser = (output: any, context: __SerdeContext): EndpointUser => { - return { - UserAttributes: output.UserAttributes != null ? de_MapOfListOf__string(output.UserAttributes, context) : undefined, - UserId: __expectString(output.UserId), - } as any; -}; +// de_EndpointUser omitted. /** * deserializeAws_restJson1EventCondition */ const de_EventCondition = (output: any, context: __SerdeContext): EventCondition => { - return { - Dimensions: output.Dimensions != null ? de_EventDimensions(output.Dimensions, context) : undefined, - MessageActivity: __expectString(output.MessageActivity), - } as any; + return take(output, { + Dimensions: (_: any) => de_EventDimensions(_, context), + MessageActivity: __expectString, + }) as any; }; /** * deserializeAws_restJson1EventDimensions */ const de_EventDimensions = (output: any, context: __SerdeContext): EventDimensions => { - return { - Attributes: output.Attributes != null ? de_MapOfAttributeDimension(output.Attributes, context) : undefined, - EventType: output.EventType != null ? de_SetDimension(output.EventType, context) : undefined, - Metrics: output.Metrics != null ? de_MapOfMetricDimension(output.Metrics, context) : undefined, - } as any; + return take(output, { + Attributes: _json, + EventType: _json, + Metrics: (_: any) => de_MapOfMetricDimension(_, context), + }) as any; }; /** * deserializeAws_restJson1EventFilter */ const de_EventFilter = (output: any, context: __SerdeContext): EventFilter => { - return { - Dimensions: output.Dimensions != null ? de_EventDimensions(output.Dimensions, context) : undefined, - FilterType: __expectString(output.FilterType), - } as any; + return take(output, { + Dimensions: (_: any) => de_EventDimensions(_, context), + FilterType: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1EventItemResponse - */ -const de_EventItemResponse = (output: any, context: __SerdeContext): EventItemResponse => { - return { - Message: __expectString(output.Message), - StatusCode: __expectInt32(output.StatusCode), - } as any; -}; +// de_EventItemResponse omitted. -/** - * deserializeAws_restJson1EventsResponse - */ -const de_EventsResponse = (output: any, context: __SerdeContext): EventsResponse => { - return { - Results: output.Results != null ? de_MapOfItemResponse(output.Results, context) : undefined, - } as any; -}; +// de_EventsResponse omitted. /** * deserializeAws_restJson1EventStartCondition */ const de_EventStartCondition = (output: any, context: __SerdeContext): EventStartCondition => { - return { - EventFilter: output.EventFilter != null ? de_EventFilter(output.EventFilter, context) : undefined, - SegmentId: __expectString(output.SegmentId), - } as any; + return take(output, { + EventFilter: (_: any) => de_EventFilter(_, context), + SegmentId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1EventStream - */ -const de_EventStream = (output: any, context: __SerdeContext): EventStream => { - return { - ApplicationId: __expectString(output.ApplicationId), - DestinationStreamArn: __expectString(output.DestinationStreamArn), - ExternalId: __expectString(output.ExternalId), - LastModifiedDate: __expectString(output.LastModifiedDate), - LastUpdatedBy: __expectString(output.LastUpdatedBy), - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_EventStream omitted. -/** - * deserializeAws_restJson1ExportJobResource - */ -const de_ExportJobResource = (output: any, context: __SerdeContext): ExportJobResource => { - return { - RoleArn: __expectString(output.RoleArn), - S3UrlPrefix: __expectString(output.S3UrlPrefix), - SegmentId: __expectString(output.SegmentId), - SegmentVersion: __expectInt32(output.SegmentVersion), - } as any; -}; +// de_ExportJobResource omitted. -/** - * deserializeAws_restJson1ExportJobResponse - */ -const de_ExportJobResponse = (output: any, context: __SerdeContext): ExportJobResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CompletedPieces: __expectInt32(output.CompletedPieces), - CompletionDate: __expectString(output.CompletionDate), - CreationDate: __expectString(output.CreationDate), - Definition: output.Definition != null ? de_ExportJobResource(output.Definition, context) : undefined, - FailedPieces: __expectInt32(output.FailedPieces), - Failures: output.Failures != null ? de_ListOf__string(output.Failures, context) : undefined, - Id: __expectString(output.Id), - JobStatus: __expectString(output.JobStatus), - TotalFailures: __expectInt32(output.TotalFailures), - TotalPieces: __expectInt32(output.TotalPieces), - TotalProcessed: __expectInt32(output.TotalProcessed), - Type: __expectString(output.Type), - } as any; -}; +// de_ExportJobResponse omitted. -/** - * deserializeAws_restJson1ExportJobsResponse - */ -const de_ExportJobsResponse = (output: any, context: __SerdeContext): ExportJobsResponse => { - return { - Item: output.Item != null ? de_ListOfExportJobResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ExportJobsResponse omitted. -/** - * deserializeAws_restJson1GCMChannelResponse - */ -const de_GCMChannelResponse = (output: any, context: __SerdeContext): GCMChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - Credential: __expectString(output.Credential), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; -}; +// de_GCMChannelResponse omitted. /** * deserializeAws_restJson1GPSCoordinates */ const de_GPSCoordinates = (output: any, context: __SerdeContext): GPSCoordinates => { - return { - Latitude: __limitedParseDouble(output.Latitude), - Longitude: __limitedParseDouble(output.Longitude), - } as any; + return take(output, { + Latitude: __limitedParseDouble, + Longitude: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1GPSPointDimension */ const de_GPSPointDimension = (output: any, context: __SerdeContext): GPSPointDimension => { - return { - Coordinates: output.Coordinates != null ? de_GPSCoordinates(output.Coordinates, context) : undefined, - RangeInKilometers: __limitedParseDouble(output.RangeInKilometers), - } as any; + return take(output, { + Coordinates: (_: any) => de_GPSCoordinates(_, context), + RangeInKilometers: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1HoldoutActivity - */ -const de_HoldoutActivity = (output: any, context: __SerdeContext): HoldoutActivity => { - return { - NextActivity: __expectString(output.NextActivity), - Percentage: __expectInt32(output.Percentage), - } as any; -}; +// de_HoldoutActivity omitted. -/** - * deserializeAws_restJson1ImportJobResource - */ -const de_ImportJobResource = (output: any, context: __SerdeContext): ImportJobResource => { - return { - DefineSegment: __expectBoolean(output.DefineSegment), - ExternalId: __expectString(output.ExternalId), - Format: __expectString(output.Format), - RegisterEndpoints: __expectBoolean(output.RegisterEndpoints), - RoleArn: __expectString(output.RoleArn), - S3Url: __expectString(output.S3Url), - SegmentId: __expectString(output.SegmentId), - SegmentName: __expectString(output.SegmentName), - } as any; -}; +// de_ImportJobResource omitted. -/** - * deserializeAws_restJson1ImportJobResponse - */ -const de_ImportJobResponse = (output: any, context: __SerdeContext): ImportJobResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CompletedPieces: __expectInt32(output.CompletedPieces), - CompletionDate: __expectString(output.CompletionDate), - CreationDate: __expectString(output.CreationDate), - Definition: output.Definition != null ? de_ImportJobResource(output.Definition, context) : undefined, - FailedPieces: __expectInt32(output.FailedPieces), - Failures: output.Failures != null ? de_ListOf__string(output.Failures, context) : undefined, - Id: __expectString(output.Id), - JobStatus: __expectString(output.JobStatus), - TotalFailures: __expectInt32(output.TotalFailures), - TotalPieces: __expectInt32(output.TotalPieces), - TotalProcessed: __expectInt32(output.TotalProcessed), - Type: __expectString(output.Type), - } as any; -}; +// de_ImportJobResponse omitted. -/** - * deserializeAws_restJson1ImportJobsResponse - */ -const de_ImportJobsResponse = (output: any, context: __SerdeContext): ImportJobsResponse => { - return { - Item: output.Item != null ? de_ListOfImportJobResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ImportJobsResponse omitted. /** * deserializeAws_restJson1InAppCampaignSchedule */ const de_InAppCampaignSchedule = (output: any, context: __SerdeContext): InAppCampaignSchedule => { - return { - EndDate: __expectString(output.EndDate), - EventFilter: output.EventFilter != null ? de_CampaignEventFilter(output.EventFilter, context) : undefined, - QuietTime: output.QuietTime != null ? de_QuietTime(output.QuietTime, context) : undefined, - } as any; + return take(output, { + EndDate: __expectString, + EventFilter: (_: any) => de_CampaignEventFilter(_, context), + QuietTime: _json, + }) as any; }; -/** - * deserializeAws_restJson1InAppMessage - */ -const de_InAppMessage = (output: any, context: __SerdeContext): InAppMessage => { - return { - Content: output.Content != null ? de_ListOfInAppMessageContent(output.Content, context) : undefined, - CustomConfig: output.CustomConfig != null ? de_MapOf__string(output.CustomConfig, context) : undefined, - Layout: __expectString(output.Layout), - } as any; -}; +// de_InAppMessage omitted. -/** - * deserializeAws_restJson1InAppMessageBodyConfig - */ -const de_InAppMessageBodyConfig = (output: any, context: __SerdeContext): InAppMessageBodyConfig => { - return { - Alignment: __expectString(output.Alignment), - Body: __expectString(output.Body), - TextColor: __expectString(output.TextColor), - } as any; -}; +// de_InAppMessageBodyConfig omitted. -/** - * deserializeAws_restJson1InAppMessageButton - */ -const de_InAppMessageButton = (output: any, context: __SerdeContext): InAppMessageButton => { - return { - Android: output.Android != null ? de_OverrideButtonConfiguration(output.Android, context) : undefined, - DefaultConfig: - output.DefaultConfig != null ? de_DefaultButtonConfiguration(output.DefaultConfig, context) : undefined, - IOS: output.IOS != null ? de_OverrideButtonConfiguration(output.IOS, context) : undefined, - Web: output.Web != null ? de_OverrideButtonConfiguration(output.Web, context) : undefined, - } as any; -}; +// de_InAppMessageButton omitted. /** * deserializeAws_restJson1InAppMessageCampaign */ const de_InAppMessageCampaign = (output: any, context: __SerdeContext): InAppMessageCampaign => { - return { - CampaignId: __expectString(output.CampaignId), - DailyCap: __expectInt32(output.DailyCap), - InAppMessage: output.InAppMessage != null ? de_InAppMessage(output.InAppMessage, context) : undefined, - Priority: __expectInt32(output.Priority), - Schedule: output.Schedule != null ? de_InAppCampaignSchedule(output.Schedule, context) : undefined, - SessionCap: __expectInt32(output.SessionCap), - TotalCap: __expectInt32(output.TotalCap), - TreatmentId: __expectString(output.TreatmentId), - } as any; + return take(output, { + CampaignId: __expectString, + DailyCap: __expectInt32, + InAppMessage: _json, + Priority: __expectInt32, + Schedule: (_: any) => de_InAppCampaignSchedule(_, context), + SessionCap: __expectInt32, + TotalCap: __expectInt32, + TreatmentId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1InAppMessageContent - */ -const de_InAppMessageContent = (output: any, context: __SerdeContext): InAppMessageContent => { - return { - BackgroundColor: __expectString(output.BackgroundColor), - BodyConfig: output.BodyConfig != null ? de_InAppMessageBodyConfig(output.BodyConfig, context) : undefined, - HeaderConfig: output.HeaderConfig != null ? de_InAppMessageHeaderConfig(output.HeaderConfig, context) : undefined, - ImageUrl: __expectString(output.ImageUrl), - PrimaryBtn: output.PrimaryBtn != null ? de_InAppMessageButton(output.PrimaryBtn, context) : undefined, - SecondaryBtn: output.SecondaryBtn != null ? de_InAppMessageButton(output.SecondaryBtn, context) : undefined, - } as any; -}; +// de_InAppMessageContent omitted. -/** - * deserializeAws_restJson1InAppMessageHeaderConfig - */ -const de_InAppMessageHeaderConfig = (output: any, context: __SerdeContext): InAppMessageHeaderConfig => { - return { - Alignment: __expectString(output.Alignment), - Header: __expectString(output.Header), - TextColor: __expectString(output.TextColor), - } as any; -}; +// de_InAppMessageHeaderConfig omitted. /** * deserializeAws_restJson1InAppMessagesResponse */ const de_InAppMessagesResponse = (output: any, context: __SerdeContext): InAppMessagesResponse => { - return { - InAppMessageCampaigns: - output.InAppMessageCampaigns != null - ? de_ListOfInAppMessageCampaign(output.InAppMessageCampaigns, context) - : undefined, - } as any; + return take(output, { + InAppMessageCampaigns: (_: any) => de_ListOfInAppMessageCampaign(_, context), + }) as any; }; /** * deserializeAws_restJson1InAppTemplateResponse */ const de_InAppTemplateResponse = (output: any, context: __SerdeContext): InAppTemplateResponse => { - return { - Arn: __expectString(output.Arn), - Content: output.Content != null ? de_ListOfInAppMessageContent(output.Content, context) : undefined, - CreationDate: __expectString(output.CreationDate), - CustomConfig: output.CustomConfig != null ? de_MapOf__string(output.CustomConfig, context) : undefined, - LastModifiedDate: __expectString(output.LastModifiedDate), - Layout: __expectString(output.Layout), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - Version: __expectString(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + Content: _json, + CreationDate: __expectString, + CustomConfig: _json, + LastModifiedDate: __expectString, + Layout: __expectString, + TemplateDescription: __expectString, + TemplateName: __expectString, + TemplateType: __expectString, + Version: __expectString, + tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1ItemResponse - */ -const de_ItemResponse = (output: any, context: __SerdeContext): ItemResponse => { - return { - EndpointItemResponse: - output.EndpointItemResponse != null ? de_EndpointItemResponse(output.EndpointItemResponse, context) : undefined, - EventsItemResponse: - output.EventsItemResponse != null ? de_MapOfEventItemResponse(output.EventsItemResponse, context) : undefined, - } as any; -}; +// de_ItemResponse omitted. -/** - * deserializeAws_restJson1JourneyChannelSettings - */ -const de_JourneyChannelSettings = (output: any, context: __SerdeContext): JourneyChannelSettings => { - return { - ConnectCampaignArn: __expectString(output.ConnectCampaignArn), - ConnectCampaignExecutionRoleArn: __expectString(output.ConnectCampaignExecutionRoleArn), - } as any; -}; +// de_JourneyChannelSettings omitted. -/** - * deserializeAws_restJson1JourneyCustomMessage - */ -const de_JourneyCustomMessage = (output: any, context: __SerdeContext): JourneyCustomMessage => { - return { - Data: __expectString(output.Data), - } as any; -}; +// de_JourneyCustomMessage omitted. /** * deserializeAws_restJson1JourneyDateRangeKpiResponse */ const de_JourneyDateRangeKpiResponse = (output: any, context: __SerdeContext): JourneyDateRangeKpiResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - EndTime: output.EndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndTime)) : undefined, - JourneyId: __expectString(output.JourneyId), - KpiName: __expectString(output.KpiName), - KpiResult: output.KpiResult != null ? de_BaseKpiResult(output.KpiResult, context) : undefined, - NextToken: __expectString(output.NextToken), - StartTime: - output.StartTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartTime)) : undefined, - } as any; + return take(output, { + ApplicationId: __expectString, + EndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + JourneyId: __expectString, + KpiName: __expectString, + KpiResult: _json, + NextToken: __expectString, + StartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1JourneyEmailMessage - */ -const de_JourneyEmailMessage = (output: any, context: __SerdeContext): JourneyEmailMessage => { - return { - FromAddress: __expectString(output.FromAddress), - } as any; -}; +// de_JourneyEmailMessage omitted. -/** - * deserializeAws_restJson1JourneyExecutionActivityMetricsResponse - */ -const de_JourneyExecutionActivityMetricsResponse = ( - output: any, - context: __SerdeContext -): JourneyExecutionActivityMetricsResponse => { - return { - ActivityType: __expectString(output.ActivityType), - ApplicationId: __expectString(output.ApplicationId), - JourneyActivityId: __expectString(output.JourneyActivityId), - JourneyId: __expectString(output.JourneyId), - LastEvaluatedTime: __expectString(output.LastEvaluatedTime), - Metrics: output.Metrics != null ? de_MapOf__string(output.Metrics, context) : undefined, - } as any; -}; +// de_JourneyExecutionActivityMetricsResponse omitted. -/** - * deserializeAws_restJson1JourneyExecutionMetricsResponse - */ -const de_JourneyExecutionMetricsResponse = (output: any, context: __SerdeContext): JourneyExecutionMetricsResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - JourneyId: __expectString(output.JourneyId), - LastEvaluatedTime: __expectString(output.LastEvaluatedTime), - Metrics: output.Metrics != null ? de_MapOf__string(output.Metrics, context) : undefined, - } as any; -}; +// de_JourneyExecutionMetricsResponse omitted. -/** - * deserializeAws_restJson1JourneyLimits - */ -const de_JourneyLimits = (output: any, context: __SerdeContext): JourneyLimits => { - return { - DailyCap: __expectInt32(output.DailyCap), - EndpointReentryCap: __expectInt32(output.EndpointReentryCap), - EndpointReentryInterval: __expectString(output.EndpointReentryInterval), - MessagesPerSecond: __expectInt32(output.MessagesPerSecond), - } as any; -}; +// de_JourneyLimits omitted. -/** - * deserializeAws_restJson1JourneyPushMessage - */ -const de_JourneyPushMessage = (output: any, context: __SerdeContext): JourneyPushMessage => { - return { - TimeToLive: __expectString(output.TimeToLive), - } as any; -}; +// de_JourneyPushMessage omitted. /** * deserializeAws_restJson1JourneyResponse */ const de_JourneyResponse = (output: any, context: __SerdeContext): JourneyResponse => { - return { - Activities: output.Activities != null ? de_MapOfActivity(output.Activities, context) : undefined, - ApplicationId: __expectString(output.ApplicationId), - ClosedDays: output.ClosedDays != null ? de_ClosedDays(output.ClosedDays, context) : undefined, - CreationDate: __expectString(output.CreationDate), - Id: __expectString(output.Id), - JourneyChannelSettings: - output.JourneyChannelSettings != null - ? de_JourneyChannelSettings(output.JourneyChannelSettings, context) - : undefined, - LastModifiedDate: __expectString(output.LastModifiedDate), - Limits: output.Limits != null ? de_JourneyLimits(output.Limits, context) : undefined, - LocalTime: __expectBoolean(output.LocalTime), - Name: __expectString(output.Name), - OpenHours: output.OpenHours != null ? de_OpenHours(output.OpenHours, context) : undefined, - QuietTime: output.QuietTime != null ? de_QuietTime(output.QuietTime, context) : undefined, - RefreshFrequency: __expectString(output.RefreshFrequency), - RefreshOnSegmentUpdate: __expectBoolean(output.RefreshOnSegmentUpdate), - Schedule: output.Schedule != null ? de_JourneySchedule(output.Schedule, context) : undefined, - SendingSchedule: __expectBoolean(output.SendingSchedule), - StartActivity: __expectString(output.StartActivity), - StartCondition: output.StartCondition != null ? de_StartCondition(output.StartCondition, context) : undefined, - State: __expectString(output.State), - WaitForQuietTime: __expectBoolean(output.WaitForQuietTime), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Activities: (_: any) => de_MapOfActivity(_, context), + ApplicationId: __expectString, + ClosedDays: _json, + CreationDate: __expectString, + Id: __expectString, + JourneyChannelSettings: _json, + LastModifiedDate: __expectString, + Limits: _json, + LocalTime: __expectBoolean, + Name: __expectString, + OpenHours: _json, + QuietTime: _json, + RefreshFrequency: __expectString, + RefreshOnSegmentUpdate: __expectBoolean, + Schedule: (_: any) => de_JourneySchedule(_, context), + SendingSchedule: __expectBoolean, + StartActivity: __expectString, + StartCondition: (_: any) => de_StartCondition(_, context), + State: __expectString, + WaitForQuietTime: __expectBoolean, + tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1JourneySchedule */ const de_JourneySchedule = (output: any, context: __SerdeContext): JourneySchedule => { - return { - EndTime: output.EndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndTime)) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartTime)) : undefined, - Timezone: __expectString(output.Timezone), - } as any; -}; - -/** - * deserializeAws_restJson1JourneySMSMessage - */ -const de_JourneySMSMessage = (output: any, context: __SerdeContext): JourneySMSMessage => { - return { - EntityId: __expectString(output.EntityId), - MessageType: __expectString(output.MessageType), - OriginationNumber: __expectString(output.OriginationNumber), - SenderId: __expectString(output.SenderId), - TemplateId: __expectString(output.TemplateId), - } as any; -}; - -/** - * deserializeAws_restJson1JourneysResponse - */ -const de_JourneysResponse = (output: any, context: __SerdeContext): JourneysResponse => { - return { - Item: output.Item != null ? de_ListOfJourneyResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_restJson1ListOf__EndpointTypesElement - */ -const de_ListOf__EndpointTypesElement = (output: any, context: __SerdeContext): (__EndpointTypesElement | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOf__string - */ -const de_ListOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfActivityResponse - */ -const de_ListOfActivityResponse = (output: any, context: __SerdeContext): ActivityResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActivityResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfApplicationResponse - */ -const de_ListOfApplicationResponse = (output: any, context: __SerdeContext): ApplicationResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfCampaignResponse - */ -const de_ListOfCampaignResponse = (output: any, context: __SerdeContext): CampaignResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CampaignResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfClosedDaysRules - */ -const de_ListOfClosedDaysRules = (output: any, context: __SerdeContext): ClosedDaysRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClosedDaysRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfEndpointResponse - */ -const de_ListOfEndpointResponse = (output: any, context: __SerdeContext): EndpointResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointResponse(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfExportJobResponse - */ -const de_ListOfExportJobResponse = (output: any, context: __SerdeContext): ExportJobResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExportJobResponse(entry, context); - }); - return retVal; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Timezone: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ListOfImportJobResponse - */ -const de_ListOfImportJobResponse = (output: any, context: __SerdeContext): ImportJobResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportJobResponse(entry, context); - }); - return retVal; -}; +// de_JourneySMSMessage omitted. /** - * deserializeAws_restJson1ListOfInAppMessageCampaign - */ -const de_ListOfInAppMessageCampaign = (output: any, context: __SerdeContext): InAppMessageCampaign[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InAppMessageCampaign(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfInAppMessageContent - */ -const de_ListOfInAppMessageContent = (output: any, context: __SerdeContext): InAppMessageContent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InAppMessageContent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ListOfJourneyResponse + * deserializeAws_restJson1JourneysResponse */ -const de_ListOfJourneyResponse = (output: any, context: __SerdeContext): JourneyResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_JourneyResponse(entry, context); - }); - return retVal; +const de_JourneysResponse = (output: any, context: __SerdeContext): JourneysResponse => { + return take(output, { + Item: (_: any) => de_ListOfJourneyResponse(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListOf__EndpointTypesElement omitted. + +// de_ListOf__string omitted. + +// de_ListOfActivityResponse omitted. + /** - * deserializeAws_restJson1ListOfMultiConditionalBranch + * deserializeAws_restJson1ListOfApplicationResponse */ -const de_ListOfMultiConditionalBranch = (output: any, context: __SerdeContext): MultiConditionalBranch[] => { +const de_ListOfApplicationResponse = (output: any, context: __SerdeContext): ApplicationResponse[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MultiConditionalBranch(entry, context); + return de_ApplicationResponse(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1ListOfOpenHoursRules + * deserializeAws_restJson1ListOfCampaignResponse */ -const de_ListOfOpenHoursRules = (output: any, context: __SerdeContext): OpenHoursRule[] => { +const de_ListOfCampaignResponse = (output: any, context: __SerdeContext): CampaignResponse[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpenHoursRule(entry, context); + return de_CampaignResponse(entry, context); }); return retVal; }; +// de_ListOfClosedDaysRules omitted. + /** - * deserializeAws_restJson1ListOfRandomSplitEntry + * deserializeAws_restJson1ListOfEndpointResponse */ -const de_ListOfRandomSplitEntry = (output: any, context: __SerdeContext): RandomSplitEntry[] => { +const de_ListOfEndpointResponse = (output: any, context: __SerdeContext): EndpointResponse[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RandomSplitEntry(entry, context); + return de_EndpointResponse(entry, context); }); return retVal; }; +// de_ListOfExportJobResponse omitted. + +// de_ListOfImportJobResponse omitted. + /** - * deserializeAws_restJson1ListOfRecommenderConfigurationResponse + * deserializeAws_restJson1ListOfInAppMessageCampaign */ -const de_ListOfRecommenderConfigurationResponse = ( - output: any, - context: __SerdeContext -): RecommenderConfigurationResponse[] => { +const de_ListOfInAppMessageCampaign = (output: any, context: __SerdeContext): InAppMessageCampaign[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommenderConfigurationResponse(entry, context); + return de_InAppMessageCampaign(entry, context); }); return retVal; }; +// de_ListOfInAppMessageContent omitted. + /** - * deserializeAws_restJson1ListOfResultRow + * deserializeAws_restJson1ListOfJourneyResponse */ -const de_ListOfResultRow = (output: any, context: __SerdeContext): ResultRow[] => { +const de_ListOfJourneyResponse = (output: any, context: __SerdeContext): JourneyResponse[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultRow(entry, context); + return de_JourneyResponse(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1ListOfResultRowValue + * deserializeAws_restJson1ListOfMultiConditionalBranch */ -const de_ListOfResultRowValue = (output: any, context: __SerdeContext): ResultRowValue[] => { +const de_ListOfMultiConditionalBranch = (output: any, context: __SerdeContext): MultiConditionalBranch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResultRowValue(entry, context); + return de_MultiConditionalBranch(entry, context); }); return retVal; }; +// de_ListOfOpenHoursRules omitted. + +// de_ListOfRandomSplitEntry omitted. + +// de_ListOfRecommenderConfigurationResponse omitted. + +// de_ListOfResultRow omitted. + +// de_ListOfResultRowValue omitted. + /** * deserializeAws_restJson1ListOfSegmentDimensions */ @@ -15880,9 +13695,6 @@ const de_ListOfSegmentDimensions = (output: any, context: __SerdeContext): Segme const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SegmentDimensions(entry, context); }); return retVal; @@ -15895,28 +13707,12 @@ const de_ListOfSegmentGroup = (output: any, context: __SerdeContext): SegmentGro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SegmentGroup(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfSegmentReference - */ -const de_ListOfSegmentReference = (output: any, context: __SerdeContext): SegmentReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SegmentReference(entry, context); - }); - return retVal; -}; +// de_ListOfSegmentReference omitted. /** * deserializeAws_restJson1ListOfSegmentResponse @@ -15925,9 +13721,6 @@ const de_ListOfSegmentResponse = (output: any, context: __SerdeContext): Segment const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SegmentResponse(entry, context); }); return retVal; @@ -15940,9 +13733,6 @@ const de_ListOfSimpleCondition = (output: any, context: __SerdeContext): SimpleC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SimpleCondition(entry, context); }); return retVal; @@ -15955,28 +13745,12 @@ const de_ListOfTemplateResponse = (output: any, context: __SerdeContext): Templa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TemplateResponse(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfTemplateVersionResponse - */ -const de_ListOfTemplateVersionResponse = (output: any, context: __SerdeContext): TemplateVersionResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateVersionResponse(entry, context); - }); - return retVal; -}; +// de_ListOfTemplateVersionResponse omitted. /** * deserializeAws_restJson1ListOfTreatmentResource @@ -15985,26 +13759,12 @@ const de_ListOfTreatmentResource = (output: any, context: __SerdeContext): Treat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TreatmentResource(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListRecommenderConfigurationsResponse - */ -const de_ListRecommenderConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListRecommenderConfigurationsResponse => { - return { - Item: output.Item != null ? de_ListOfRecommenderConfigurationResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListRecommenderConfigurationsResponse omitted. /** * deserializeAws_restJson1MapOf__double @@ -16019,31 +13779,9 @@ const de_MapOf__double = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_MapOf__integer omitted. -/** - * deserializeAws_restJson1MapOf__string - */ -const de_MapOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MapOf__string omitted. /** * deserializeAws_restJson1MapOfActivity @@ -16058,131 +13796,23 @@ const de_MapOfActivity = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AttributeDimension(value, context); - return acc; - }, {}); -}; +// de_MapOfAttributeDimension omitted. -/** - * deserializeAws_restJson1MapOfChannelResponse - */ -const de_MapOfChannelResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ChannelResponse(value, context); - return acc; - }, {}); -}; +// de_MapOfChannelResponse omitted. -/** - * deserializeAws_restJson1MapOfEndpointMessageResult - */ -const de_MapOfEndpointMessageResult = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_EndpointMessageResult(value, context); - return acc; - }, {}); -}; +// de_MapOfEndpointMessageResult omitted. -/** - * deserializeAws_restJson1MapOfEventItemResponse - */ -const de_MapOfEventItemResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_EventItemResponse(value, context); - return acc; - }, {}); -}; +// de_MapOfEventItemResponse omitted. -/** - * deserializeAws_restJson1MapOfItemResponse - */ -const de_MapOfItemResponse = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ItemResponse(value, context); - return acc; - }, {}); -}; +// de_MapOfItemResponse omitted. -/** - * deserializeAws_restJson1MapOfListOf__string - */ -const de_MapOfListOf__string = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ListOf__string(value, context); - return acc; - }, {}); -}; +// de_MapOfListOf__string omitted. -/** - * deserializeAws_restJson1MapOfListOfOpenHoursRules - */ -const de_MapOfListOfOpenHoursRules = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DayOfWeek | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ListOfOpenHoursRules(value, context); - return acc; - }, - {} - ); -}; +// de_MapOfListOfOpenHoursRules omitted. -/** - * deserializeAws_restJson1MapOfMapOfEndpointMessageResult - */ -const de_MapOfMapOfEndpointMessageResult = ( - output: any, - context: __SerdeContext -): Record> => { - return Object.entries(output).reduce( - (acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MapOfEndpointMessageResult(value, context); - return acc; - }, - {} - ); -}; +// de_MapOfMapOfEndpointMessageResult omitted. -/** - * deserializeAws_restJson1MapOfMessageResult - */ -const de_MapOfMessageResult = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MessageResult(value, context); - return acc; - }, {}); -}; +// de_MapOfMessageResult omitted. /** * deserializeAws_restJson1MapOfMetricDimension @@ -16197,176 +13827,56 @@ const de_MapOfMetricDimension = (output: any, context: __SerdeContext): Record { - return { - Action: __expectString(output.Action), - Body: __expectString(output.Body), - ImageIconUrl: __expectString(output.ImageIconUrl), - ImageSmallIconUrl: __expectString(output.ImageSmallIconUrl), - ImageUrl: __expectString(output.ImageUrl), - JsonBody: __expectString(output.JsonBody), - MediaUrl: __expectString(output.MediaUrl), - RawContent: __expectString(output.RawContent), - SilentPush: __expectBoolean(output.SilentPush), - TimeToLive: __expectInt32(output.TimeToLive), - Title: __expectString(output.Title), - Url: __expectString(output.Url), - } as any; -}; +// de_Message omitted. -/** - * deserializeAws_restJson1MessageBody - */ -const de_MessageBody = (output: any, context: __SerdeContext): MessageBody => { - return { - Message: __expectString(output.Message), - RequestID: __expectString(output.RequestID), - } as any; -}; +// de_MessageBody omitted. -/** - * deserializeAws_restJson1MessageConfiguration - */ -const de_MessageConfiguration = (output: any, context: __SerdeContext): MessageConfiguration => { - return { - ADMMessage: output.ADMMessage != null ? de_Message(output.ADMMessage, context) : undefined, - APNSMessage: output.APNSMessage != null ? de_Message(output.APNSMessage, context) : undefined, - BaiduMessage: output.BaiduMessage != null ? de_Message(output.BaiduMessage, context) : undefined, - CustomMessage: output.CustomMessage != null ? de_CampaignCustomMessage(output.CustomMessage, context) : undefined, - DefaultMessage: output.DefaultMessage != null ? de_Message(output.DefaultMessage, context) : undefined, - EmailMessage: output.EmailMessage != null ? de_CampaignEmailMessage(output.EmailMessage, context) : undefined, - GCMMessage: output.GCMMessage != null ? de_Message(output.GCMMessage, context) : undefined, - InAppMessage: output.InAppMessage != null ? de_CampaignInAppMessage(output.InAppMessage, context) : undefined, - SMSMessage: output.SMSMessage != null ? de_CampaignSmsMessage(output.SMSMessage, context) : undefined, - } as any; -}; +// de_MessageConfiguration omitted. -/** - * deserializeAws_restJson1MessageResponse - */ -const de_MessageResponse = (output: any, context: __SerdeContext): MessageResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - EndpointResult: - output.EndpointResult != null ? de_MapOfEndpointMessageResult(output.EndpointResult, context) : undefined, - RequestId: __expectString(output.RequestId), - Result: output.Result != null ? de_MapOfMessageResult(output.Result, context) : undefined, - } as any; -}; +// de_MessageResponse omitted. -/** - * deserializeAws_restJson1MessageResult - */ -const de_MessageResult = (output: any, context: __SerdeContext): MessageResult => { - return { - DeliveryStatus: __expectString(output.DeliveryStatus), - MessageId: __expectString(output.MessageId), - StatusCode: __expectInt32(output.StatusCode), - StatusMessage: __expectString(output.StatusMessage), - UpdatedToken: __expectString(output.UpdatedToken), - } as any; -}; +// de_MessageResult omitted. /** * deserializeAws_restJson1MetricDimension */ const de_MetricDimension = (output: any, context: __SerdeContext): MetricDimension => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + ComparisonOperator: __expectString, + Value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1MultiConditionalBranch */ const de_MultiConditionalBranch = (output: any, context: __SerdeContext): MultiConditionalBranch => { - return { - Condition: output.Condition != null ? de_SimpleCondition(output.Condition, context) : undefined, - NextActivity: __expectString(output.NextActivity), - } as any; + return take(output, { + Condition: (_: any) => de_SimpleCondition(_, context), + NextActivity: __expectString, + }) as any; }; /** * deserializeAws_restJson1MultiConditionalSplitActivity */ const de_MultiConditionalSplitActivity = (output: any, context: __SerdeContext): MultiConditionalSplitActivity => { - return { - Branches: output.Branches != null ? de_ListOfMultiConditionalBranch(output.Branches, context) : undefined, - DefaultActivity: __expectString(output.DefaultActivity), - EvaluationWaitTime: output.EvaluationWaitTime != null ? de_WaitTime(output.EvaluationWaitTime, context) : undefined, - } as any; + return take(output, { + Branches: (_: any) => de_ListOfMultiConditionalBranch(_, context), + DefaultActivity: __expectString, + EvaluationWaitTime: _json, + }) as any; }; -/** - * deserializeAws_restJson1NumberValidateResponse - */ -const de_NumberValidateResponse = (output: any, context: __SerdeContext): NumberValidateResponse => { - return { - Carrier: __expectString(output.Carrier), - City: __expectString(output.City), - CleansedPhoneNumberE164: __expectString(output.CleansedPhoneNumberE164), - CleansedPhoneNumberNational: __expectString(output.CleansedPhoneNumberNational), - Country: __expectString(output.Country), - CountryCodeIso2: __expectString(output.CountryCodeIso2), - CountryCodeNumeric: __expectString(output.CountryCodeNumeric), - County: __expectString(output.County), - OriginalCountryCodeIso2: __expectString(output.OriginalCountryCodeIso2), - OriginalPhoneNumber: __expectString(output.OriginalPhoneNumber), - PhoneType: __expectString(output.PhoneType), - PhoneTypeCode: __expectInt32(output.PhoneTypeCode), - Timezone: __expectString(output.Timezone), - ZipCode: __expectString(output.ZipCode), - } as any; -}; +// de_NumberValidateResponse omitted. -/** - * deserializeAws_restJson1OpenHours - */ -const de_OpenHours = (output: any, context: __SerdeContext): OpenHours => { - return { - CUSTOM: output.CUSTOM != null ? de_MapOfListOfOpenHoursRules(output.CUSTOM, context) : undefined, - EMAIL: output.EMAIL != null ? de_MapOfListOfOpenHoursRules(output.EMAIL, context) : undefined, - PUSH: output.PUSH != null ? de_MapOfListOfOpenHoursRules(output.PUSH, context) : undefined, - SMS: output.SMS != null ? de_MapOfListOfOpenHoursRules(output.SMS, context) : undefined, - VOICE: output.VOICE != null ? de_MapOfListOfOpenHoursRules(output.VOICE, context) : undefined, - } as any; -}; +// de_OpenHours omitted. -/** - * deserializeAws_restJson1OpenHoursRule - */ -const de_OpenHoursRule = (output: any, context: __SerdeContext): OpenHoursRule => { - return { - EndTime: __expectString(output.EndTime), - StartTime: __expectString(output.StartTime), - } as any; -}; +// de_OpenHoursRule omitted. -/** - * deserializeAws_restJson1OverrideButtonConfiguration - */ -const de_OverrideButtonConfiguration = (output: any, context: __SerdeContext): OverrideButtonConfiguration => { - return { - ButtonAction: __expectString(output.ButtonAction), - Link: __expectString(output.Link), - } as any; -}; +// de_OverrideButtonConfiguration omitted. -/** - * deserializeAws_restJson1PushMessageActivity - */ -const de_PushMessageActivity = (output: any, context: __SerdeContext): PushMessageActivity => { - return { - MessageConfig: output.MessageConfig != null ? de_JourneyPushMessage(output.MessageConfig, context) : undefined, - NextActivity: __expectString(output.NextActivity), - TemplateName: __expectString(output.TemplateName), - TemplateVersion: __expectString(output.TemplateVersion), - } as any; -}; +// de_PushMessageActivity omitted. /** * deserializeAws_restJson1PushNotificationTemplateResponse @@ -16375,544 +13885,279 @@ const de_PushNotificationTemplateResponse = ( output: any, context: __SerdeContext ): PushNotificationTemplateResponse => { - return { - ADM: output.ADM != null ? de_AndroidPushNotificationTemplate(output.ADM, context) : undefined, - APNS: output.APNS != null ? de_APNSPushNotificationTemplate(output.APNS, context) : undefined, - Arn: __expectString(output.Arn), - Baidu: output.Baidu != null ? de_AndroidPushNotificationTemplate(output.Baidu, context) : undefined, - CreationDate: __expectString(output.CreationDate), - Default: output.Default != null ? de_DefaultPushNotificationTemplate(output.Default, context) : undefined, - DefaultSubstitutions: __expectString(output.DefaultSubstitutions), - GCM: output.GCM != null ? de_AndroidPushNotificationTemplate(output.GCM, context) : undefined, - LastModifiedDate: __expectString(output.LastModifiedDate), - RecommenderId: __expectString(output.RecommenderId), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - Version: __expectString(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + ADM: _json, + APNS: _json, + Arn: __expectString, + Baidu: _json, + CreationDate: __expectString, + Default: _json, + DefaultSubstitutions: __expectString, + GCM: _json, + LastModifiedDate: __expectString, + RecommenderId: __expectString, + TemplateDescription: __expectString, + TemplateName: __expectString, + TemplateType: __expectString, + Version: __expectString, + tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1QuietTime - */ -const de_QuietTime = (output: any, context: __SerdeContext): QuietTime => { - return { - End: __expectString(output.End), - Start: __expectString(output.Start), - } as any; -}; +// de_QuietTime omitted. -/** - * deserializeAws_restJson1RandomSplitActivity - */ -const de_RandomSplitActivity = (output: any, context: __SerdeContext): RandomSplitActivity => { - return { - Branches: output.Branches != null ? de_ListOfRandomSplitEntry(output.Branches, context) : undefined, - } as any; -}; +// de_RandomSplitActivity omitted. -/** - * deserializeAws_restJson1RandomSplitEntry - */ -const de_RandomSplitEntry = (output: any, context: __SerdeContext): RandomSplitEntry => { - return { - NextActivity: __expectString(output.NextActivity), - Percentage: __expectInt32(output.Percentage), - } as any; -}; +// de_RandomSplitEntry omitted. -/** - * deserializeAws_restJson1RecencyDimension - */ -const de_RecencyDimension = (output: any, context: __SerdeContext): RecencyDimension => { - return { - Duration: __expectString(output.Duration), - RecencyType: __expectString(output.RecencyType), - } as any; -}; +// de_RecencyDimension omitted. -/** - * deserializeAws_restJson1RecommenderConfigurationResponse - */ -const de_RecommenderConfigurationResponse = ( - output: any, - context: __SerdeContext -): RecommenderConfigurationResponse => { - return { - Attributes: output.Attributes != null ? de_MapOf__string(output.Attributes, context) : undefined, - CreationDate: __expectString(output.CreationDate), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LastModifiedDate: __expectString(output.LastModifiedDate), - Name: __expectString(output.Name), - RecommendationProviderIdType: __expectString(output.RecommendationProviderIdType), - RecommendationProviderRoleArn: __expectString(output.RecommendationProviderRoleArn), - RecommendationProviderUri: __expectString(output.RecommendationProviderUri), - RecommendationTransformerUri: __expectString(output.RecommendationTransformerUri), - RecommendationsDisplayName: __expectString(output.RecommendationsDisplayName), - RecommendationsPerMessage: __expectInt32(output.RecommendationsPerMessage), - } as any; -}; +// de_RecommenderConfigurationResponse omitted. -/** - * deserializeAws_restJson1ResultRow - */ -const de_ResultRow = (output: any, context: __SerdeContext): ResultRow => { - return { - GroupedBys: output.GroupedBys != null ? de_ListOfResultRowValue(output.GroupedBys, context) : undefined, - Values: output.Values != null ? de_ListOfResultRowValue(output.Values, context) : undefined, - } as any; -}; +// de_ResultRow omitted. -/** - * deserializeAws_restJson1ResultRowValue - */ -const de_ResultRowValue = (output: any, context: __SerdeContext): ResultRowValue => { - return { - Key: __expectString(output.Key), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_ResultRowValue omitted. /** * deserializeAws_restJson1Schedule */ const de_Schedule = (output: any, context: __SerdeContext): Schedule => { - return { - EndTime: __expectString(output.EndTime), - EventFilter: output.EventFilter != null ? de_CampaignEventFilter(output.EventFilter, context) : undefined, - Frequency: __expectString(output.Frequency), - IsLocalTime: __expectBoolean(output.IsLocalTime), - QuietTime: output.QuietTime != null ? de_QuietTime(output.QuietTime, context) : undefined, - StartTime: __expectString(output.StartTime), - Timezone: __expectString(output.Timezone), - } as any; + return take(output, { + EndTime: __expectString, + EventFilter: (_: any) => de_CampaignEventFilter(_, context), + Frequency: __expectString, + IsLocalTime: __expectBoolean, + QuietTime: _json, + StartTime: __expectString, + Timezone: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SegmentBehaviors - */ -const de_SegmentBehaviors = (output: any, context: __SerdeContext): SegmentBehaviors => { - return { - Recency: output.Recency != null ? de_RecencyDimension(output.Recency, context) : undefined, - } as any; -}; +// de_SegmentBehaviors omitted. -/** - * deserializeAws_restJson1SegmentCondition - */ -const de_SegmentCondition = (output: any, context: __SerdeContext): SegmentCondition => { - return { - SegmentId: __expectString(output.SegmentId), - } as any; -}; +// de_SegmentCondition omitted. -/** - * deserializeAws_restJson1SegmentDemographics - */ -const de_SegmentDemographics = (output: any, context: __SerdeContext): SegmentDemographics => { - return { - AppVersion: output.AppVersion != null ? de_SetDimension(output.AppVersion, context) : undefined, - Channel: output.Channel != null ? de_SetDimension(output.Channel, context) : undefined, - DeviceType: output.DeviceType != null ? de_SetDimension(output.DeviceType, context) : undefined, - Make: output.Make != null ? de_SetDimension(output.Make, context) : undefined, - Model: output.Model != null ? de_SetDimension(output.Model, context) : undefined, - Platform: output.Platform != null ? de_SetDimension(output.Platform, context) : undefined, - } as any; -}; +// de_SegmentDemographics omitted. /** * deserializeAws_restJson1SegmentDimensions */ const de_SegmentDimensions = (output: any, context: __SerdeContext): SegmentDimensions => { - return { - Attributes: output.Attributes != null ? de_MapOfAttributeDimension(output.Attributes, context) : undefined, - Behavior: output.Behavior != null ? de_SegmentBehaviors(output.Behavior, context) : undefined, - Demographic: output.Demographic != null ? de_SegmentDemographics(output.Demographic, context) : undefined, - Location: output.Location != null ? de_SegmentLocation(output.Location, context) : undefined, - Metrics: output.Metrics != null ? de_MapOfMetricDimension(output.Metrics, context) : undefined, - UserAttributes: - output.UserAttributes != null ? de_MapOfAttributeDimension(output.UserAttributes, context) : undefined, - } as any; + return take(output, { + Attributes: _json, + Behavior: _json, + Demographic: _json, + Location: (_: any) => de_SegmentLocation(_, context), + Metrics: (_: any) => de_MapOfMetricDimension(_, context), + UserAttributes: _json, + }) as any; }; /** * deserializeAws_restJson1SegmentGroup */ const de_SegmentGroup = (output: any, context: __SerdeContext): SegmentGroup => { - return { - Dimensions: output.Dimensions != null ? de_ListOfSegmentDimensions(output.Dimensions, context) : undefined, - SourceSegments: - output.SourceSegments != null ? de_ListOfSegmentReference(output.SourceSegments, context) : undefined, - SourceType: __expectString(output.SourceType), - Type: __expectString(output.Type), - } as any; + return take(output, { + Dimensions: (_: any) => de_ListOfSegmentDimensions(_, context), + SourceSegments: _json, + SourceType: __expectString, + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1SegmentGroupList */ const de_SegmentGroupList = (output: any, context: __SerdeContext): SegmentGroupList => { - return { - Groups: output.Groups != null ? de_ListOfSegmentGroup(output.Groups, context) : undefined, - Include: __expectString(output.Include), - } as any; + return take(output, { + Groups: (_: any) => de_ListOfSegmentGroup(_, context), + Include: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SegmentImportResource - */ -const de_SegmentImportResource = (output: any, context: __SerdeContext): SegmentImportResource => { - return { - ChannelCounts: output.ChannelCounts != null ? de_MapOf__integer(output.ChannelCounts, context) : undefined, - ExternalId: __expectString(output.ExternalId), - Format: __expectString(output.Format), - RoleArn: __expectString(output.RoleArn), - S3Url: __expectString(output.S3Url), - Size: __expectInt32(output.Size), - } as any; -}; +// de_SegmentImportResource omitted. /** * deserializeAws_restJson1SegmentLocation */ const de_SegmentLocation = (output: any, context: __SerdeContext): SegmentLocation => { - return { - Country: output.Country != null ? de_SetDimension(output.Country, context) : undefined, - GPSPoint: output.GPSPoint != null ? de_GPSPointDimension(output.GPSPoint, context) : undefined, - } as any; + return take(output, { + Country: _json, + GPSPoint: (_: any) => de_GPSPointDimension(_, context), + }) as any; }; -/** - * deserializeAws_restJson1SegmentReference - */ -const de_SegmentReference = (output: any, context: __SerdeContext): SegmentReference => { - return { - Id: __expectString(output.Id), - Version: __expectInt32(output.Version), - } as any; -}; +// de_SegmentReference omitted. /** * deserializeAws_restJson1SegmentResponse */ const de_SegmentResponse = (output: any, context: __SerdeContext): SegmentResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - CreationDate: __expectString(output.CreationDate), - Dimensions: output.Dimensions != null ? de_SegmentDimensions(output.Dimensions, context) : undefined, - Id: __expectString(output.Id), - ImportDefinition: - output.ImportDefinition != null ? de_SegmentImportResource(output.ImportDefinition, context) : undefined, - LastModifiedDate: __expectString(output.LastModifiedDate), - Name: __expectString(output.Name), - SegmentGroups: output.SegmentGroups != null ? de_SegmentGroupList(output.SegmentGroups, context) : undefined, - SegmentType: __expectString(output.SegmentType), - Version: __expectInt32(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + ApplicationId: __expectString, + Arn: __expectString, + CreationDate: __expectString, + Dimensions: (_: any) => de_SegmentDimensions(_, context), + Id: __expectString, + ImportDefinition: _json, + LastModifiedDate: __expectString, + Name: __expectString, + SegmentGroups: (_: any) => de_SegmentGroupList(_, context), + SegmentType: __expectString, + Version: __expectInt32, + tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1SegmentsResponse */ const de_SegmentsResponse = (output: any, context: __SerdeContext): SegmentsResponse => { - return { - Item: output.Item != null ? de_ListOfSegmentResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Item: (_: any) => de_ListOfSegmentResponse(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SendUsersMessageResponse - */ -const de_SendUsersMessageResponse = (output: any, context: __SerdeContext): SendUsersMessageResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - RequestId: __expectString(output.RequestId), - Result: output.Result != null ? de_MapOfMapOfEndpointMessageResult(output.Result, context) : undefined, - } as any; -}; +// de_SendUsersMessageResponse omitted. -/** - * deserializeAws_restJson1SetDimension - */ -const de_SetDimension = (output: any, context: __SerdeContext): SetDimension => { - return { - DimensionType: __expectString(output.DimensionType), - Values: output.Values != null ? de_ListOf__string(output.Values, context) : undefined, - } as any; -}; +// de_SetDimension omitted. /** * deserializeAws_restJson1SimpleCondition */ const de_SimpleCondition = (output: any, context: __SerdeContext): SimpleCondition => { - return { - EventCondition: output.EventCondition != null ? de_EventCondition(output.EventCondition, context) : undefined, - SegmentCondition: - output.SegmentCondition != null ? de_SegmentCondition(output.SegmentCondition, context) : undefined, - SegmentDimensions: - output.segmentDimensions != null ? de_SegmentDimensions(output.segmentDimensions, context) : undefined, - } as any; + return take(output, { + EventCondition: (_: any) => de_EventCondition(_, context), + SegmentCondition: _json, + SegmentDimensions: (_) => [, de_SegmentDimensions(_, context), `segmentDimensions`], + }) as any; }; -/** - * deserializeAws_restJson1SMSChannelResponse - */ -const de_SMSChannelResponse = (output: any, context: __SerdeContext): SMSChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - PromotionalMessagesPerSecond: __expectInt32(output.PromotionalMessagesPerSecond), - SenderId: __expectString(output.SenderId), - ShortCode: __expectString(output.ShortCode), - TransactionalMessagesPerSecond: __expectInt32(output.TransactionalMessagesPerSecond), - Version: __expectInt32(output.Version), - } as any; -}; +// de_SMSChannelResponse omitted. -/** - * deserializeAws_restJson1SMSMessageActivity - */ -const de_SMSMessageActivity = (output: any, context: __SerdeContext): SMSMessageActivity => { - return { - MessageConfig: output.MessageConfig != null ? de_JourneySMSMessage(output.MessageConfig, context) : undefined, - NextActivity: __expectString(output.NextActivity), - TemplateName: __expectString(output.TemplateName), - TemplateVersion: __expectString(output.TemplateVersion), - } as any; -}; +// de_SMSMessageActivity omitted. /** * deserializeAws_restJson1SMSTemplateResponse */ const de_SMSTemplateResponse = (output: any, context: __SerdeContext): SMSTemplateResponse => { - return { - Arn: __expectString(output.Arn), - Body: __expectString(output.Body), - CreationDate: __expectString(output.CreationDate), - DefaultSubstitutions: __expectString(output.DefaultSubstitutions), - LastModifiedDate: __expectString(output.LastModifiedDate), - RecommenderId: __expectString(output.RecommenderId), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - Version: __expectString(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + Body: __expectString, + CreationDate: __expectString, + DefaultSubstitutions: __expectString, + LastModifiedDate: __expectString, + RecommenderId: __expectString, + TemplateDescription: __expectString, + TemplateName: __expectString, + TemplateType: __expectString, + Version: __expectString, + tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1StartCondition */ const de_StartCondition = (output: any, context: __SerdeContext): StartCondition => { - return { - Description: __expectString(output.Description), - EventStartCondition: - output.EventStartCondition != null ? de_EventStartCondition(output.EventStartCondition, context) : undefined, - SegmentStartCondition: - output.SegmentStartCondition != null ? de_SegmentCondition(output.SegmentStartCondition, context) : undefined, - } as any; + return take(output, { + Description: __expectString, + EventStartCondition: (_: any) => de_EventStartCondition(_, context), + SegmentStartCondition: _json, + }) as any; }; /** * deserializeAws_restJson1TagsModel */ const de_TagsModel = (output: any, context: __SerdeContext): TagsModel => { - return { - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + tags: [, _json, `tags`], + }) as any; }; -/** - * deserializeAws_restJson1Template - */ -const de_Template = (output: any, context: __SerdeContext): Template => { - return { - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; +// de_Template omitted. -/** - * deserializeAws_restJson1TemplateConfiguration - */ -const de_TemplateConfiguration = (output: any, context: __SerdeContext): TemplateConfiguration => { - return { - EmailTemplate: output.EmailTemplate != null ? de_Template(output.EmailTemplate, context) : undefined, - PushTemplate: output.PushTemplate != null ? de_Template(output.PushTemplate, context) : undefined, - SMSTemplate: output.SMSTemplate != null ? de_Template(output.SMSTemplate, context) : undefined, - VoiceTemplate: output.VoiceTemplate != null ? de_Template(output.VoiceTemplate, context) : undefined, - } as any; -}; +// de_TemplateConfiguration omitted. -/** - * deserializeAws_restJson1TemplateCreateMessageBody - */ -const de_TemplateCreateMessageBody = (output: any, context: __SerdeContext): TemplateCreateMessageBody => { - return { - Arn: __expectString(output.Arn), - Message: __expectString(output.Message), - RequestID: __expectString(output.RequestID), - } as any; -}; +// de_TemplateCreateMessageBody omitted. /** * deserializeAws_restJson1TemplateResponse */ const de_TemplateResponse = (output: any, context: __SerdeContext): TemplateResponse => { - return { - Arn: __expectString(output.Arn), - CreationDate: __expectString(output.CreationDate), - DefaultSubstitutions: __expectString(output.DefaultSubstitutions), - LastModifiedDate: __expectString(output.LastModifiedDate), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - Version: __expectString(output.Version), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationDate: __expectString, + DefaultSubstitutions: __expectString, + LastModifiedDate: __expectString, + TemplateDescription: __expectString, + TemplateName: __expectString, + TemplateType: __expectString, + Version: __expectString, + tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1TemplatesResponse */ const de_TemplatesResponse = (output: any, context: __SerdeContext): TemplatesResponse => { - return { - Item: output.Item != null ? de_ListOfTemplateResponse(output.Item, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Item: (_: any) => de_ListOfTemplateResponse(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TemplateVersionResponse - */ -const de_TemplateVersionResponse = (output: any, context: __SerdeContext): TemplateVersionResponse => { - return { - CreationDate: __expectString(output.CreationDate), - DefaultSubstitutions: __expectString(output.DefaultSubstitutions), - LastModifiedDate: __expectString(output.LastModifiedDate), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - Version: __expectString(output.Version), - } as any; -}; +// de_TemplateVersionResponse omitted. -/** - * deserializeAws_restJson1TemplateVersionsResponse - */ -const de_TemplateVersionsResponse = (output: any, context: __SerdeContext): TemplateVersionsResponse => { - return { - Item: output.Item != null ? de_ListOfTemplateVersionResponse(output.Item, context) : undefined, - Message: __expectString(output.Message), - NextToken: __expectString(output.NextToken), - RequestID: __expectString(output.RequestID), - } as any; -}; +// de_TemplateVersionsResponse omitted. /** * deserializeAws_restJson1TreatmentResource */ const de_TreatmentResource = (output: any, context: __SerdeContext): TreatmentResource => { - return { - CustomDeliveryConfiguration: - output.CustomDeliveryConfiguration != null - ? de_CustomDeliveryConfiguration(output.CustomDeliveryConfiguration, context) - : undefined, - Id: __expectString(output.Id), - MessageConfiguration: - output.MessageConfiguration != null ? de_MessageConfiguration(output.MessageConfiguration, context) : undefined, - Schedule: output.Schedule != null ? de_Schedule(output.Schedule, context) : undefined, - SizePercent: __expectInt32(output.SizePercent), - State: output.State != null ? de_CampaignState(output.State, context) : undefined, - TemplateConfiguration: - output.TemplateConfiguration != null - ? de_TemplateConfiguration(output.TemplateConfiguration, context) - : undefined, - TreatmentDescription: __expectString(output.TreatmentDescription), - TreatmentName: __expectString(output.TreatmentName), - } as any; -}; - -/** - * deserializeAws_restJson1VerificationResponse - */ -const de_VerificationResponse = (output: any, context: __SerdeContext): VerificationResponse => { - return { - Valid: __expectBoolean(output.Valid), - } as any; -}; - -/** - * deserializeAws_restJson1VoiceChannelResponse - */ -const de_VoiceChannelResponse = (output: any, context: __SerdeContext): VoiceChannelResponse => { - return { - ApplicationId: __expectString(output.ApplicationId), - CreationDate: __expectString(output.CreationDate), - Enabled: __expectBoolean(output.Enabled), - HasCredential: __expectBoolean(output.HasCredential), - Id: __expectString(output.Id), - IsArchived: __expectBoolean(output.IsArchived), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedDate: __expectString(output.LastModifiedDate), - Platform: __expectString(output.Platform), - Version: __expectInt32(output.Version), - } as any; + return take(output, { + CustomDeliveryConfiguration: _json, + Id: __expectString, + MessageConfiguration: _json, + Schedule: (_: any) => de_Schedule(_, context), + SizePercent: __expectInt32, + State: _json, + TemplateConfiguration: _json, + TreatmentDescription: __expectString, + TreatmentName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1VoiceTemplateResponse - */ -const de_VoiceTemplateResponse = (output: any, context: __SerdeContext): VoiceTemplateResponse => { - return { - Arn: __expectString(output.Arn), - Body: __expectString(output.Body), - CreationDate: __expectString(output.CreationDate), - DefaultSubstitutions: __expectString(output.DefaultSubstitutions), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedDate: __expectString(output.LastModifiedDate), - TemplateDescription: __expectString(output.TemplateDescription), - TemplateName: __expectString(output.TemplateName), - TemplateType: __expectString(output.TemplateType), - Version: __expectString(output.Version), - VoiceId: __expectString(output.VoiceId), - tags: output.tags != null ? de_MapOf__string(output.tags, context) : undefined, - } as any; -}; +// de_VerificationResponse omitted. -/** - * deserializeAws_restJson1WaitActivity - */ -const de_WaitActivity = (output: any, context: __SerdeContext): WaitActivity => { - return { - NextActivity: __expectString(output.NextActivity), - WaitTime: output.WaitTime != null ? de_WaitTime(output.WaitTime, context) : undefined, - } as any; -}; +// de_VoiceChannelResponse omitted. /** - * deserializeAws_restJson1WaitTime + * deserializeAws_restJson1VoiceTemplateResponse */ -const de_WaitTime = (output: any, context: __SerdeContext): WaitTime => { - return { - WaitFor: __expectString(output.WaitFor), - WaitUntil: __expectString(output.WaitUntil), - } as any; -}; +const de_VoiceTemplateResponse = (output: any, context: __SerdeContext): VoiceTemplateResponse => { + return take(output, { + Arn: __expectString, + Body: __expectString, + CreationDate: __expectString, + DefaultSubstitutions: __expectString, + LanguageCode: __expectString, + LastModifiedDate: __expectString, + TemplateDescription: __expectString, + TemplateName: __expectString, + TemplateType: __expectString, + Version: __expectString, + VoiceId: __expectString, + tags: [, _json, `tags`], + }) as any; +}; + +// de_WaitActivity omitted. + +// de_WaitTime omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-pipes/src/protocols/Aws_restJson1.ts b/clients/client-pipes/src/protocols/Aws_restJson1.ts index 25205d208710..6b31cd240750 100644 --- a/clients/client-pipes/src/protocols/Aws_restJson1.ts +++ b/clients/client-pipes/src/protocols/Aws_restJson1.ts @@ -1,20 +1,20 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -100,7 +100,6 @@ import { UpdatePipeSourceSelfManagedKafkaParameters, UpdatePipeSourceSqsQueueParameters, ValidationException, - ValidationExceptionField, } from "../models/models_0"; import { PipesServiceException as __BaseException } from "../models/PipesServiceException"; @@ -118,24 +117,20 @@ export const se_CreatePipeCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.Enrichment != null && { Enrichment: input.Enrichment }), - ...(input.EnrichmentParameters != null && { - EnrichmentParameters: se_PipeEnrichmentParameters(input.EnrichmentParameters, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Source != null && { Source: input.Source }), - ...(input.SourceParameters != null && { - SourceParameters: se_PipeSourceParameters(input.SourceParameters, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.Target != null && { Target: input.Target }), - ...(input.TargetParameters != null && { - TargetParameters: se_PipeTargetParameters(input.TargetParameters, context), - }), - }); + body = JSON.stringify( + take(input, { + Description: [], + DesiredState: [], + Enrichment: [], + EnrichmentParameters: (_) => _json(_), + RoleArn: [], + Source: [], + SourceParameters: (_) => se_PipeSourceParameters(_, context), + Tags: (_) => _json(_), + Target: [], + TargetParameters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -308,9 +303,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -366,22 +363,18 @@ export const se_UpdatePipeCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/pipes/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.Enrichment != null && { Enrichment: input.Enrichment }), - ...(input.EnrichmentParameters != null && { - EnrichmentParameters: se_PipeEnrichmentParameters(input.EnrichmentParameters, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SourceParameters != null && { - SourceParameters: se_UpdatePipeSourceParameters(input.SourceParameters, context), - }), - ...(input.Target != null && { Target: input.Target }), - ...(input.TargetParameters != null && { - TargetParameters: se_PipeTargetParameters(input.TargetParameters, context), - }), - }); + body = JSON.stringify( + take(input, { + Description: [], + DesiredState: [], + Enrichment: [], + EnrichmentParameters: (_) => _json(_), + RoleArn: [], + SourceParameters: (_) => _json(_), + Target: [], + TargetParameters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -407,24 +400,15 @@ export const de_CreatePipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CurrentState != null) { - contents.CurrentState = __expectString(data.CurrentState); - } - if (data.DesiredState != null) { - contents.DesiredState = __expectString(data.DesiredState); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + DesiredState: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -461,10 +445,9 @@ const de_CreatePipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -484,24 +467,15 @@ export const de_DeletePipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CurrentState != null) { - contents.CurrentState = __expectString(data.CurrentState); - } - if (data.DesiredState != null) { - contents.DesiredState = __expectString(data.DesiredState); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + DesiredState: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -535,10 +509,9 @@ const de_DeletePipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -558,54 +531,25 @@ export const de_DescribePipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CurrentState != null) { - contents.CurrentState = __expectString(data.CurrentState); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DesiredState != null) { - contents.DesiredState = __expectString(data.DesiredState); - } - if (data.Enrichment != null) { - contents.Enrichment = __expectString(data.Enrichment); - } - if (data.EnrichmentParameters != null) { - contents.EnrichmentParameters = de_PipeEnrichmentParameters(data.EnrichmentParameters, context); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } - if (data.Source != null) { - contents.Source = __expectString(data.Source); - } - if (data.SourceParameters != null) { - contents.SourceParameters = de_PipeSourceParameters(data.SourceParameters, context); - } - if (data.StateReason != null) { - contents.StateReason = __expectString(data.StateReason); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.Target != null) { - contents.Target = __expectString(data.Target); - } - if (data.TargetParameters != null) { - contents.TargetParameters = de_PipeTargetParameters(data.TargetParameters, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + Description: __expectString, + DesiredState: __expectString, + Enrichment: __expectString, + EnrichmentParameters: _json, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RoleArn: __expectString, + Source: __expectString, + SourceParameters: (_) => de_PipeSourceParameters(_, context), + StateReason: __expectString, + Tags: _json, + Target: __expectString, + TargetParameters: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -636,10 +580,9 @@ const de_DescribePipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -659,12 +602,11 @@ export const de_ListPipesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Pipes != null) { - contents.Pipes = de_PipeList(data.Pipes, context); - } + const doc = take(data, { + NextToken: __expectString, + Pipes: (_) => de_PipeList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -692,10 +634,9 @@ const de_ListPipesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -715,9 +656,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -745,10 +687,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -768,24 +709,15 @@ export const de_StartPipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CurrentState != null) { - contents.CurrentState = __expectString(data.CurrentState); - } - if (data.DesiredState != null) { - contents.DesiredState = __expectString(data.DesiredState); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + DesiredState: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -819,10 +751,9 @@ const de_StartPipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -842,24 +773,15 @@ export const de_StopPipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CurrentState != null) { - contents.CurrentState = __expectString(data.CurrentState); - } - if (data.DesiredState != null) { - contents.DesiredState = __expectString(data.DesiredState); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + DesiredState: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -893,10 +815,9 @@ const de_StopPipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -943,10 +864,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -993,10 +913,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1016,24 +935,15 @@ export const de_UpdatePipeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.CurrentState != null) { - contents.CurrentState = __expectString(data.CurrentState); - } - if (data.DesiredState != null) { - contents.DesiredState = __expectString(data.DesiredState); - } - if (data.LastModifiedTime != null) { - contents.LastModifiedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModifiedTime))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + DesiredState: __expectString, + LastModifiedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1067,31 +977,27 @@ const de_UpdatePipeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1110,9 +1016,10 @@ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContex ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1126,9 +1033,10 @@ const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1145,21 +1053,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1178,15 +1079,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1200,12 +1098,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1213,1696 +1110,299 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AwsVpcConfiguration - */ -const se_AwsVpcConfiguration = (input: AwsVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }), - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }), - ...(input.Subnets != null && { Subnets: se_Subnets(input.Subnets, context) }), - }; -}; +// se_AwsVpcConfiguration omitted. -/** - * serializeAws_restJson1BatchArrayProperties - */ -const se_BatchArrayProperties = (input: BatchArrayProperties, context: __SerdeContext): any => { - return { - ...(input.Size != null && { Size: input.Size }), - }; -}; +// se_BatchArrayProperties omitted. -/** - * serializeAws_restJson1BatchContainerOverrides - */ -const se_BatchContainerOverrides = (input: BatchContainerOverrides, context: __SerdeContext): any => { - return { - ...(input.Command != null && { Command: se_StringList(input.Command, context) }), - ...(input.Environment != null && { Environment: se_BatchEnvironmentVariableList(input.Environment, context) }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.ResourceRequirements != null && { - ResourceRequirements: se_BatchResourceRequirementsList(input.ResourceRequirements, context), - }), - }; -}; +// se_BatchContainerOverrides omitted. -/** - * serializeAws_restJson1BatchDependsOn - */ -const se_BatchDependsOn = (input: BatchJobDependency[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BatchJobDependency(entry, context); - }); -}; +// se_BatchDependsOn omitted. -/** - * serializeAws_restJson1BatchEnvironmentVariable - */ -const se_BatchEnvironmentVariable = (input: BatchEnvironmentVariable, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_BatchEnvironmentVariable omitted. -/** - * serializeAws_restJson1BatchEnvironmentVariableList - */ -const se_BatchEnvironmentVariableList = (input: BatchEnvironmentVariable[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BatchEnvironmentVariable(entry, context); - }); -}; +// se_BatchEnvironmentVariableList omitted. -/** - * serializeAws_restJson1BatchJobDependency - */ -const se_BatchJobDependency = (input: BatchJobDependency, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_BatchJobDependency omitted. -/** - * serializeAws_restJson1BatchParametersMap - */ -const se_BatchParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_BatchParametersMap omitted. -/** - * serializeAws_restJson1BatchResourceRequirement - */ -const se_BatchResourceRequirement = (input: BatchResourceRequirement, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_BatchResourceRequirement omitted. -/** - * serializeAws_restJson1BatchResourceRequirementsList - */ -const se_BatchResourceRequirementsList = (input: BatchResourceRequirement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BatchResourceRequirement(entry, context); - }); -}; +// se_BatchResourceRequirementsList omitted. -/** - * serializeAws_restJson1BatchRetryStrategy - */ -const se_BatchRetryStrategy = (input: BatchRetryStrategy, context: __SerdeContext): any => { - return { - ...(input.Attempts != null && { Attempts: input.Attempts }), - }; -}; +// se_BatchRetryStrategy omitted. -/** - * serializeAws_restJson1CapacityProviderStrategy - */ -const se_CapacityProviderStrategy = (input: CapacityProviderStrategyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CapacityProviderStrategyItem(entry, context); - }); -}; +// se_CapacityProviderStrategy omitted. -/** - * serializeAws_restJson1CapacityProviderStrategyItem - */ -const se_CapacityProviderStrategyItem = (input: CapacityProviderStrategyItem, context: __SerdeContext): any => { - return { - ...(input.base != null && { base: input.base }), - ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_CapacityProviderStrategyItem omitted. -/** - * serializeAws_restJson1DeadLetterConfig - */ -const se_DeadLetterConfig = (input: DeadLetterConfig, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_DeadLetterConfig omitted. -/** - * serializeAws_restJson1EcsContainerOverride - */ -const se_EcsContainerOverride = (input: EcsContainerOverride, context: __SerdeContext): any => { - return { - ...(input.Command != null && { Command: se_StringList(input.Command, context) }), - ...(input.Cpu != null && { Cpu: input.Cpu }), - ...(input.Environment != null && { Environment: se_EcsEnvironmentVariableList(input.Environment, context) }), - ...(input.EnvironmentFiles != null && { - EnvironmentFiles: se_EcsEnvironmentFileList(input.EnvironmentFiles, context), - }), - ...(input.Memory != null && { Memory: input.Memory }), - ...(input.MemoryReservation != null && { MemoryReservation: input.MemoryReservation }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceRequirements != null && { - ResourceRequirements: se_EcsResourceRequirementsList(input.ResourceRequirements, context), - }), - }; -}; +// se_EcsContainerOverride omitted. -/** - * serializeAws_restJson1EcsContainerOverrideList - */ -const se_EcsContainerOverrideList = (input: EcsContainerOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EcsContainerOverride(entry, context); - }); -}; +// se_EcsContainerOverrideList omitted. -/** - * serializeAws_restJson1EcsEnvironmentFile - */ -const se_EcsEnvironmentFile = (input: EcsEnvironmentFile, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_EcsEnvironmentFile omitted. -/** - * serializeAws_restJson1EcsEnvironmentFileList - */ -const se_EcsEnvironmentFileList = (input: EcsEnvironmentFile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EcsEnvironmentFile(entry, context); - }); -}; +// se_EcsEnvironmentFileList omitted. -/** - * serializeAws_restJson1EcsEnvironmentVariable - */ -const se_EcsEnvironmentVariable = (input: EcsEnvironmentVariable, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_EcsEnvironmentVariable omitted. -/** - * serializeAws_restJson1EcsEnvironmentVariableList - */ -const se_EcsEnvironmentVariableList = (input: EcsEnvironmentVariable[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EcsEnvironmentVariable(entry, context); - }); -}; +// se_EcsEnvironmentVariableList omitted. -/** - * serializeAws_restJson1EcsEphemeralStorage - */ -const se_EcsEphemeralStorage = (input: EcsEphemeralStorage, context: __SerdeContext): any => { - return { - ...(input.sizeInGiB != null && { sizeInGiB: input.sizeInGiB }), - }; -}; +// se_EcsEphemeralStorage omitted. -/** - * serializeAws_restJson1EcsInferenceAcceleratorOverride - */ -const se_EcsInferenceAcceleratorOverride = (input: EcsInferenceAcceleratorOverride, context: __SerdeContext): any => { - return { - ...(input.deviceName != null && { deviceName: input.deviceName }), - ...(input.deviceType != null && { deviceType: input.deviceType }), - }; -}; +// se_EcsInferenceAcceleratorOverride omitted. -/** - * serializeAws_restJson1EcsInferenceAcceleratorOverrideList - */ -const se_EcsInferenceAcceleratorOverrideList = ( - input: EcsInferenceAcceleratorOverride[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EcsInferenceAcceleratorOverride(entry, context); - }); -}; +// se_EcsInferenceAcceleratorOverrideList omitted. -/** - * serializeAws_restJson1EcsResourceRequirement - */ -const se_EcsResourceRequirement = (input: EcsResourceRequirement, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_EcsResourceRequirement omitted. -/** - * serializeAws_restJson1EcsResourceRequirementsList - */ -const se_EcsResourceRequirementsList = (input: EcsResourceRequirement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EcsResourceRequirement(entry, context); - }); -}; +// se_EcsResourceRequirementsList omitted. -/** - * serializeAws_restJson1EcsTaskOverride - */ -const se_EcsTaskOverride = (input: EcsTaskOverride, context: __SerdeContext): any => { - return { - ...(input.ContainerOverrides != null && { - ContainerOverrides: se_EcsContainerOverrideList(input.ContainerOverrides, context), - }), - ...(input.Cpu != null && { Cpu: input.Cpu }), - ...(input.EphemeralStorage != null && { - EphemeralStorage: se_EcsEphemeralStorage(input.EphemeralStorage, context), - }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.InferenceAcceleratorOverrides != null && { - InferenceAcceleratorOverrides: se_EcsInferenceAcceleratorOverrideList( - input.InferenceAcceleratorOverrides, - context - ), - }), - ...(input.Memory != null && { Memory: input.Memory }), - ...(input.TaskRoleArn != null && { TaskRoleArn: input.TaskRoleArn }), - }; -}; +// se_EcsTaskOverride omitted. -/** - * serializeAws_restJson1EventBridgeEventResourceList - */ -const se_EventBridgeEventResourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventBridgeEventResourceList omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Pattern != null && { Pattern: input.Pattern }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterCriteria - */ -const se_FilterCriteria = (input: FilterCriteria, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - }; -}; +// se_FilterCriteria omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1HeaderParametersMap - */ -const se_HeaderParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_HeaderParametersMap omitted. -/** - * serializeAws_restJson1KafkaBootstrapServers - */ -const se_KafkaBootstrapServers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_KafkaBootstrapServers omitted. + +// se_MQBrokerAccessCredentials omitted. + +// se_MSKAccessCredentials omitted. + +// se_NetworkConfiguration omitted. + +// se_PathParameterList omitted. + +// se_PipeEnrichmentHttpParameters omitted. + +// se_PipeEnrichmentParameters omitted. + +// se_PipeSourceActiveMQBrokerParameters omitted. + +// se_PipeSourceDynamoDBStreamParameters omitted. /** - * serializeAws_restJson1MQBrokerAccessCredentials + * serializeAws_restJson1PipeSourceKinesisStreamParameters */ -const se_MQBrokerAccessCredentials = (input: MQBrokerAccessCredentials, context: __SerdeContext): any => { - return MQBrokerAccessCredentials.visit(input, { - BasicAuth: (value) => ({ BasicAuth: value }), - _: (name, value) => ({ name: value } as any), +const se_PipeSourceKinesisStreamParameters = ( + input: PipeSourceKinesisStreamParameters, + context: __SerdeContext +): any => { + return take(input, { + BatchSize: [], + DeadLetterConfig: _json, + MaximumBatchingWindowInSeconds: [], + MaximumRecordAgeInSeconds: [], + MaximumRetryAttempts: [], + OnPartialBatchItemFailure: [], + ParallelizationFactor: [], + StartingPosition: [], + StartingPositionTimestamp: (_) => Math.round(_.getTime() / 1000), }); }; +// se_PipeSourceManagedStreamingKafkaParameters omitted. + /** - * serializeAws_restJson1MSKAccessCredentials + * serializeAws_restJson1PipeSourceParameters */ -const se_MSKAccessCredentials = (input: MSKAccessCredentials, context: __SerdeContext): any => { - return MSKAccessCredentials.visit(input, { - ClientCertificateTlsAuth: (value) => ({ ClientCertificateTlsAuth: value }), - SaslScram512Auth: (value) => ({ SaslScram512Auth: value }), - _: (name, value) => ({ name: value } as any), +const se_PipeSourceParameters = (input: PipeSourceParameters, context: __SerdeContext): any => { + return take(input, { + ActiveMQBrokerParameters: _json, + DynamoDBStreamParameters: _json, + FilterCriteria: _json, + KinesisStreamParameters: (_) => se_PipeSourceKinesisStreamParameters(_, context), + ManagedStreamingKafkaParameters: _json, + RabbitMQBrokerParameters: _json, + SelfManagedKafkaParameters: _json, + SqsQueueParameters: _json, }); }; -/** - * serializeAws_restJson1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.awsvpcConfiguration != null && { - awsvpcConfiguration: se_AwsVpcConfiguration(input.awsvpcConfiguration, context), - }), - }; -}; +// se_PipeSourceRabbitMQBrokerParameters omitted. -/** - * serializeAws_restJson1PathParameterList - */ -const se_PathParameterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PipeSourceSelfManagedKafkaParameters omitted. -/** - * serializeAws_restJson1PipeEnrichmentHttpParameters - */ -const se_PipeEnrichmentHttpParameters = (input: PipeEnrichmentHttpParameters, context: __SerdeContext): any => { - return { - ...(input.HeaderParameters != null && { - HeaderParameters: se_HeaderParametersMap(input.HeaderParameters, context), - }), - ...(input.PathParameterValues != null && { - PathParameterValues: se_PathParameterList(input.PathParameterValues, context), - }), - ...(input.QueryStringParameters != null && { - QueryStringParameters: se_QueryStringParametersMap(input.QueryStringParameters, context), - }), - }; -}; +// se_PipeSourceSqsQueueParameters omitted. -/** - * serializeAws_restJson1PipeEnrichmentParameters - */ -const se_PipeEnrichmentParameters = (input: PipeEnrichmentParameters, context: __SerdeContext): any => { - return { - ...(input.HttpParameters != null && { - HttpParameters: se_PipeEnrichmentHttpParameters(input.HttpParameters, context), - }), - ...(input.InputTemplate != null && { InputTemplate: input.InputTemplate }), - }; -}; +// se_PipeTargetBatchJobParameters omitted. -/** - * serializeAws_restJson1PipeSourceActiveMQBrokerParameters - */ -const se_PipeSourceActiveMQBrokerParameters = ( - input: PipeSourceActiveMQBrokerParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.Credentials != null && { Credentials: se_MQBrokerAccessCredentials(input.Credentials, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.QueueName != null && { QueueName: input.QueueName }), - }; -}; +// se_PipeTargetCloudWatchLogsParameters omitted. -/** - * serializeAws_restJson1PipeSourceDynamoDBStreamParameters - */ -const se_PipeSourceDynamoDBStreamParameters = ( - input: PipeSourceDynamoDBStreamParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }), - ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }), - ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }), - }; -}; +// se_PipeTargetEcsTaskParameters omitted. -/** - * serializeAws_restJson1PipeSourceKinesisStreamParameters - */ -const se_PipeSourceKinesisStreamParameters = ( - input: PipeSourceKinesisStreamParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }), - ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }), - ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }), - ...(input.StartingPositionTimestamp != null && { - StartingPositionTimestamp: Math.round(input.StartingPositionTimestamp.getTime() / 1000), - }), - }; -}; +// se_PipeTargetEventBridgeEventBusParameters omitted. -/** - * serializeAws_restJson1PipeSourceManagedStreamingKafkaParameters - */ -const se_PipeSourceManagedStreamingKafkaParameters = ( - input: PipeSourceManagedStreamingKafkaParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.ConsumerGroupID != null && { ConsumerGroupID: input.ConsumerGroupID }), - ...(input.Credentials != null && { Credentials: se_MSKAccessCredentials(input.Credentials, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; +// se_PipeTargetHttpParameters omitted. -/** - * serializeAws_restJson1PipeSourceParameters - */ -const se_PipeSourceParameters = (input: PipeSourceParameters, context: __SerdeContext): any => { - return { - ...(input.ActiveMQBrokerParameters != null && { - ActiveMQBrokerParameters: se_PipeSourceActiveMQBrokerParameters(input.ActiveMQBrokerParameters, context), - }), - ...(input.DynamoDBStreamParameters != null && { - DynamoDBStreamParameters: se_PipeSourceDynamoDBStreamParameters(input.DynamoDBStreamParameters, context), - }), - ...(input.FilterCriteria != null && { FilterCriteria: se_FilterCriteria(input.FilterCriteria, context) }), - ...(input.KinesisStreamParameters != null && { - KinesisStreamParameters: se_PipeSourceKinesisStreamParameters(input.KinesisStreamParameters, context), - }), - ...(input.ManagedStreamingKafkaParameters != null && { - ManagedStreamingKafkaParameters: se_PipeSourceManagedStreamingKafkaParameters( - input.ManagedStreamingKafkaParameters, - context - ), - }), - ...(input.RabbitMQBrokerParameters != null && { - RabbitMQBrokerParameters: se_PipeSourceRabbitMQBrokerParameters(input.RabbitMQBrokerParameters, context), - }), - ...(input.SelfManagedKafkaParameters != null && { - SelfManagedKafkaParameters: se_PipeSourceSelfManagedKafkaParameters(input.SelfManagedKafkaParameters, context), - }), - ...(input.SqsQueueParameters != null && { - SqsQueueParameters: se_PipeSourceSqsQueueParameters(input.SqsQueueParameters, context), - }), - }; -}; +// se_PipeTargetKinesisStreamParameters omitted. -/** - * serializeAws_restJson1PipeSourceRabbitMQBrokerParameters - */ -const se_PipeSourceRabbitMQBrokerParameters = ( - input: PipeSourceRabbitMQBrokerParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.Credentials != null && { Credentials: se_MQBrokerAccessCredentials(input.Credentials, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.QueueName != null && { QueueName: input.QueueName }), - ...(input.VirtualHost != null && { VirtualHost: input.VirtualHost }), - }; -}; +// se_PipeTargetLambdaFunctionParameters omitted. -/** - * serializeAws_restJson1PipeSourceSelfManagedKafkaParameters - */ -const se_PipeSourceSelfManagedKafkaParameters = ( - input: PipeSourceSelfManagedKafkaParameters, - context: __SerdeContext -): any => { - return { - ...(input.AdditionalBootstrapServers != null && { - AdditionalBootstrapServers: se_KafkaBootstrapServers(input.AdditionalBootstrapServers, context), - }), - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.ConsumerGroupID != null && { ConsumerGroupID: input.ConsumerGroupID }), - ...(input.Credentials != null && { - Credentials: se_SelfManagedKafkaAccessConfigurationCredentials(input.Credentials, context), - }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.ServerRootCaCertificate != null && { ServerRootCaCertificate: input.ServerRootCaCertificate }), - ...(input.StartingPosition != null && { StartingPosition: input.StartingPosition }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - ...(input.Vpc != null && { Vpc: se_SelfManagedKafkaAccessConfigurationVpc(input.Vpc, context) }), - }; -}; +// se_PipeTargetParameters omitted. -/** - * serializeAws_restJson1PipeSourceSqsQueueParameters - */ -const se_PipeSourceSqsQueueParameters = (input: PipeSourceSqsQueueParameters, context: __SerdeContext): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - }; -}; +// se_PipeTargetRedshiftDataParameters omitted. -/** - * serializeAws_restJson1PipeTargetBatchJobParameters - */ -const se_PipeTargetBatchJobParameters = (input: PipeTargetBatchJobParameters, context: __SerdeContext): any => { - return { - ...(input.ArrayProperties != null && { ArrayProperties: se_BatchArrayProperties(input.ArrayProperties, context) }), - ...(input.ContainerOverrides != null && { - ContainerOverrides: se_BatchContainerOverrides(input.ContainerOverrides, context), - }), - ...(input.DependsOn != null && { DependsOn: se_BatchDependsOn(input.DependsOn, context) }), - ...(input.JobDefinition != null && { JobDefinition: input.JobDefinition }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.Parameters != null && { Parameters: se_BatchParametersMap(input.Parameters, context) }), - ...(input.RetryStrategy != null && { RetryStrategy: se_BatchRetryStrategy(input.RetryStrategy, context) }), - }; -}; +// se_PipeTargetSageMakerPipelineParameters omitted. -/** - * serializeAws_restJson1PipeTargetCloudWatchLogsParameters - */ -const se_PipeTargetCloudWatchLogsParameters = ( - input: PipeTargetCloudWatchLogsParameters, - context: __SerdeContext -): any => { - return { - ...(input.LogStreamName != null && { LogStreamName: input.LogStreamName }), - ...(input.Timestamp != null && { Timestamp: input.Timestamp }), - }; -}; +// se_PipeTargetSqsQueueParameters omitted. -/** - * serializeAws_restJson1PipeTargetEcsTaskParameters - */ -const se_PipeTargetEcsTaskParameters = (input: PipeTargetEcsTaskParameters, context: __SerdeContext): any => { - return { - ...(input.CapacityProviderStrategy != null && { - CapacityProviderStrategy: se_CapacityProviderStrategy(input.CapacityProviderStrategy, context), - }), - ...(input.EnableECSManagedTags != null && { EnableECSManagedTags: input.EnableECSManagedTags }), - ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }), - ...(input.Group != null && { Group: input.Group }), - ...(input.LaunchType != null && { LaunchType: input.LaunchType }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.Overrides != null && { Overrides: se_EcsTaskOverride(input.Overrides, context) }), - ...(input.PlacementConstraints != null && { - PlacementConstraints: se_PlacementConstraints(input.PlacementConstraints, context), - }), - ...(input.PlacementStrategy != null && { - PlacementStrategy: se_PlacementStrategies(input.PlacementStrategy, context), - }), - ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }), - ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TaskCount != null && { TaskCount: input.TaskCount }), - ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }), - }; -}; +// se_PipeTargetStateMachineParameters omitted. -/** - * serializeAws_restJson1PipeTargetEventBridgeEventBusParameters - */ -const se_PipeTargetEventBridgeEventBusParameters = ( - input: PipeTargetEventBridgeEventBusParameters, - context: __SerdeContext -): any => { - return { - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.EndpointId != null && { EndpointId: input.EndpointId }), - ...(input.Resources != null && { Resources: se_EventBridgeEventResourceList(input.Resources, context) }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Time != null && { Time: input.Time }), - }; -}; +// se_PlacementConstraint omitted. -/** - * serializeAws_restJson1PipeTargetHttpParameters - */ -const se_PipeTargetHttpParameters = (input: PipeTargetHttpParameters, context: __SerdeContext): any => { - return { - ...(input.HeaderParameters != null && { - HeaderParameters: se_HeaderParametersMap(input.HeaderParameters, context), - }), - ...(input.PathParameterValues != null && { - PathParameterValues: se_PathParameterList(input.PathParameterValues, context), - }), - ...(input.QueryStringParameters != null && { - QueryStringParameters: se_QueryStringParametersMap(input.QueryStringParameters, context), - }), - }; -}; +// se_PlacementConstraints omitted. -/** - * serializeAws_restJson1PipeTargetKinesisStreamParameters - */ -const se_PipeTargetKinesisStreamParameters = ( - input: PipeTargetKinesisStreamParameters, - context: __SerdeContext -): any => { - return { - ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }), - }; -}; +// se_PlacementStrategies omitted. -/** - * serializeAws_restJson1PipeTargetLambdaFunctionParameters - */ -const se_PipeTargetLambdaFunctionParameters = ( - input: PipeTargetLambdaFunctionParameters, - context: __SerdeContext -): any => { - return { - ...(input.InvocationType != null && { InvocationType: input.InvocationType }), - }; -}; +// se_PlacementStrategy omitted. -/** - * serializeAws_restJson1PipeTargetParameters - */ -const se_PipeTargetParameters = (input: PipeTargetParameters, context: __SerdeContext): any => { - return { - ...(input.BatchJobParameters != null && { - BatchJobParameters: se_PipeTargetBatchJobParameters(input.BatchJobParameters, context), - }), - ...(input.CloudWatchLogsParameters != null && { - CloudWatchLogsParameters: se_PipeTargetCloudWatchLogsParameters(input.CloudWatchLogsParameters, context), - }), - ...(input.EcsTaskParameters != null && { - EcsTaskParameters: se_PipeTargetEcsTaskParameters(input.EcsTaskParameters, context), - }), - ...(input.EventBridgeEventBusParameters != null && { - EventBridgeEventBusParameters: se_PipeTargetEventBridgeEventBusParameters( - input.EventBridgeEventBusParameters, - context - ), - }), - ...(input.HttpParameters != null && { HttpParameters: se_PipeTargetHttpParameters(input.HttpParameters, context) }), - ...(input.InputTemplate != null && { InputTemplate: input.InputTemplate }), - ...(input.KinesisStreamParameters != null && { - KinesisStreamParameters: se_PipeTargetKinesisStreamParameters(input.KinesisStreamParameters, context), - }), - ...(input.LambdaFunctionParameters != null && { - LambdaFunctionParameters: se_PipeTargetLambdaFunctionParameters(input.LambdaFunctionParameters, context), - }), - ...(input.RedshiftDataParameters != null && { - RedshiftDataParameters: se_PipeTargetRedshiftDataParameters(input.RedshiftDataParameters, context), - }), - ...(input.SageMakerPipelineParameters != null && { - SageMakerPipelineParameters: se_PipeTargetSageMakerPipelineParameters(input.SageMakerPipelineParameters, context), - }), - ...(input.SqsQueueParameters != null && { - SqsQueueParameters: se_PipeTargetSqsQueueParameters(input.SqsQueueParameters, context), - }), - ...(input.StepFunctionStateMachineParameters != null && { - StepFunctionStateMachineParameters: se_PipeTargetStateMachineParameters( - input.StepFunctionStateMachineParameters, - context - ), - }), - }; -}; +// se_QueryStringParametersMap omitted. -/** - * serializeAws_restJson1PipeTargetRedshiftDataParameters - */ -const se_PipeTargetRedshiftDataParameters = (input: PipeTargetRedshiftDataParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.SecretManagerArn != null && { SecretManagerArn: input.SecretManagerArn }), - ...(input.Sqls != null && { Sqls: se_Sqls(input.Sqls, context) }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WithEvent != null && { WithEvent: input.WithEvent }), - }; -}; +// se_SageMakerPipelineParameter omitted. -/** - * serializeAws_restJson1PipeTargetSageMakerPipelineParameters - */ -const se_PipeTargetSageMakerPipelineParameters = ( - input: PipeTargetSageMakerPipelineParameters, - context: __SerdeContext -): any => { - return { - ...(input.PipelineParameterList != null && { - PipelineParameterList: se_SageMakerPipelineParameterList(input.PipelineParameterList, context), - }), - }; -}; +// se_SageMakerPipelineParameterList omitted. -/** - * serializeAws_restJson1PipeTargetSqsQueueParameters - */ -const se_PipeTargetSqsQueueParameters = (input: PipeTargetSqsQueueParameters, context: __SerdeContext): any => { - return { - ...(input.MessageDeduplicationId != null && { MessageDeduplicationId: input.MessageDeduplicationId }), - ...(input.MessageGroupId != null && { MessageGroupId: input.MessageGroupId }), - }; -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_restJson1PipeTargetStateMachineParameters - */ -const se_PipeTargetStateMachineParameters = (input: PipeTargetStateMachineParameters, context: __SerdeContext): any => { - return { - ...(input.InvocationType != null && { InvocationType: input.InvocationType }), - }; -}; +// se_SecurityGroups omitted. -/** - * serializeAws_restJson1PlacementConstraint - */ -const se_PlacementConstraint = (input: PlacementConstraint, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_SelfManagedKafkaAccessConfigurationCredentials omitted. -/** - * serializeAws_restJson1PlacementConstraints - */ -const se_PlacementConstraints = (input: PlacementConstraint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementConstraint(entry, context); - }); -}; +// se_SelfManagedKafkaAccessConfigurationVpc omitted. -/** - * serializeAws_restJson1PlacementStrategies - */ -const se_PlacementStrategies = (input: PlacementStrategy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementStrategy(entry, context); - }); -}; +// se_Sqls omitted. -/** - * serializeAws_restJson1PlacementStrategy - */ -const se_PlacementStrategy = (input: PlacementStrategy, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_StringList omitted. -/** - * serializeAws_restJson1QueryStringParametersMap - */ -const se_QueryStringParametersMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SubnetIds omitted. -/** - * serializeAws_restJson1SageMakerPipelineParameter - */ -const se_SageMakerPipelineParameter = (input: SageMakerPipelineParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Subnets omitted. -/** - * serializeAws_restJson1SageMakerPipelineParameterList - */ -const se_SageMakerPipelineParameterList = (input: SageMakerPipelineParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SageMakerPipelineParameter(entry, context); - }); -}; +// se_Tag omitted. -/** - * serializeAws_restJson1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1SecurityGroups - */ -const se_SecurityGroups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials - */ -const se_SelfManagedKafkaAccessConfigurationCredentials = ( - input: SelfManagedKafkaAccessConfigurationCredentials, - context: __SerdeContext -): any => { - return SelfManagedKafkaAccessConfigurationCredentials.visit(input, { - BasicAuth: (value) => ({ BasicAuth: value }), - ClientCertificateTlsAuth: (value) => ({ ClientCertificateTlsAuth: value }), - SaslScram256Auth: (value) => ({ SaslScram256Auth: value }), - SaslScram512Auth: (value) => ({ SaslScram512Auth: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_UpdatePipeSourceActiveMQBrokerParameters omitted. -/** - * serializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc - */ -const se_SelfManagedKafkaAccessConfigurationVpc = ( - input: SelfManagedKafkaAccessConfigurationVpc, - context: __SerdeContext -): any => { - return { - ...(input.SecurityGroup != null && { SecurityGroup: se_SecurityGroupIds(input.SecurityGroup, context) }), - ...(input.Subnets != null && { Subnets: se_SubnetIds(input.Subnets, context) }), - }; -}; +// se_UpdatePipeSourceDynamoDBStreamParameters omitted. -/** - * serializeAws_restJson1Sqls - */ -const se_Sqls = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdatePipeSourceKinesisStreamParameters omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdatePipeSourceManagedStreamingKafkaParameters omitted. -/** - * serializeAws_restJson1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdatePipeSourceParameters omitted. -/** - * serializeAws_restJson1Subnets - */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdatePipeSourceRabbitMQBrokerParameters omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_UpdatePipeSourceSelfManagedKafkaParameters omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_UpdatePipeSourceSqsQueueParameters omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// de_AwsVpcConfiguration omitted. -/** - * serializeAws_restJson1UpdatePipeSourceActiveMQBrokerParameters - */ -const se_UpdatePipeSourceActiveMQBrokerParameters = ( - input: UpdatePipeSourceActiveMQBrokerParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.Credentials != null && { Credentials: se_MQBrokerAccessCredentials(input.Credentials, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - }; -}; +// de_BatchArrayProperties omitted. -/** - * serializeAws_restJson1UpdatePipeSourceDynamoDBStreamParameters - */ -const se_UpdatePipeSourceDynamoDBStreamParameters = ( - input: UpdatePipeSourceDynamoDBStreamParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }), - ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }), - }; -}; +// de_BatchContainerOverrides omitted. -/** - * serializeAws_restJson1UpdatePipeSourceKinesisStreamParameters - */ -const se_UpdatePipeSourceKinesisStreamParameters = ( - input: UpdatePipeSourceKinesisStreamParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.MaximumRecordAgeInSeconds != null && { MaximumRecordAgeInSeconds: input.MaximumRecordAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - ...(input.OnPartialBatchItemFailure != null && { OnPartialBatchItemFailure: input.OnPartialBatchItemFailure }), - ...(input.ParallelizationFactor != null && { ParallelizationFactor: input.ParallelizationFactor }), - }; -}; +// de_BatchDependsOn omitted. -/** - * serializeAws_restJson1UpdatePipeSourceManagedStreamingKafkaParameters - */ -const se_UpdatePipeSourceManagedStreamingKafkaParameters = ( - input: UpdatePipeSourceManagedStreamingKafkaParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.Credentials != null && { Credentials: se_MSKAccessCredentials(input.Credentials, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - }; -}; +// de_BatchEnvironmentVariable omitted. -/** - * serializeAws_restJson1UpdatePipeSourceParameters - */ -const se_UpdatePipeSourceParameters = (input: UpdatePipeSourceParameters, context: __SerdeContext): any => { - return { - ...(input.ActiveMQBrokerParameters != null && { - ActiveMQBrokerParameters: se_UpdatePipeSourceActiveMQBrokerParameters(input.ActiveMQBrokerParameters, context), - }), - ...(input.DynamoDBStreamParameters != null && { - DynamoDBStreamParameters: se_UpdatePipeSourceDynamoDBStreamParameters(input.DynamoDBStreamParameters, context), - }), - ...(input.FilterCriteria != null && { FilterCriteria: se_FilterCriteria(input.FilterCriteria, context) }), - ...(input.KinesisStreamParameters != null && { - KinesisStreamParameters: se_UpdatePipeSourceKinesisStreamParameters(input.KinesisStreamParameters, context), - }), - ...(input.ManagedStreamingKafkaParameters != null && { - ManagedStreamingKafkaParameters: se_UpdatePipeSourceManagedStreamingKafkaParameters( - input.ManagedStreamingKafkaParameters, - context - ), - }), - ...(input.RabbitMQBrokerParameters != null && { - RabbitMQBrokerParameters: se_UpdatePipeSourceRabbitMQBrokerParameters(input.RabbitMQBrokerParameters, context), - }), - ...(input.SelfManagedKafkaParameters != null && { - SelfManagedKafkaParameters: se_UpdatePipeSourceSelfManagedKafkaParameters( - input.SelfManagedKafkaParameters, - context - ), - }), - ...(input.SqsQueueParameters != null && { - SqsQueueParameters: se_UpdatePipeSourceSqsQueueParameters(input.SqsQueueParameters, context), - }), - }; -}; +// de_BatchEnvironmentVariableList omitted. -/** - * serializeAws_restJson1UpdatePipeSourceRabbitMQBrokerParameters - */ -const se_UpdatePipeSourceRabbitMQBrokerParameters = ( - input: UpdatePipeSourceRabbitMQBrokerParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.Credentials != null && { Credentials: se_MQBrokerAccessCredentials(input.Credentials, context) }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - }; -}; +// de_BatchJobDependency omitted. -/** - * serializeAws_restJson1UpdatePipeSourceSelfManagedKafkaParameters - */ -const se_UpdatePipeSourceSelfManagedKafkaParameters = ( - input: UpdatePipeSourceSelfManagedKafkaParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.Credentials != null && { - Credentials: se_SelfManagedKafkaAccessConfigurationCredentials(input.Credentials, context), - }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - ...(input.ServerRootCaCertificate != null && { ServerRootCaCertificate: input.ServerRootCaCertificate }), - ...(input.Vpc != null && { Vpc: se_SelfManagedKafkaAccessConfigurationVpc(input.Vpc, context) }), - }; -}; +// de_BatchParametersMap omitted. -/** - * serializeAws_restJson1UpdatePipeSourceSqsQueueParameters - */ -const se_UpdatePipeSourceSqsQueueParameters = ( - input: UpdatePipeSourceSqsQueueParameters, - context: __SerdeContext -): any => { - return { - ...(input.BatchSize != null && { BatchSize: input.BatchSize }), - ...(input.MaximumBatchingWindowInSeconds != null && { - MaximumBatchingWindowInSeconds: input.MaximumBatchingWindowInSeconds, - }), - }; -}; +// de_BatchResourceRequirement omitted. -/** - * deserializeAws_restJson1AwsVpcConfiguration - */ -const de_AwsVpcConfiguration = (output: any, context: __SerdeContext): AwsVpcConfiguration => { - return { - AssignPublicIp: __expectString(output.AssignPublicIp), - SecurityGroups: output.SecurityGroups != null ? de_SecurityGroups(output.SecurityGroups, context) : undefined, - Subnets: output.Subnets != null ? de_Subnets(output.Subnets, context) : undefined, - } as any; -}; +// de_BatchResourceRequirementsList omitted. -/** - * deserializeAws_restJson1BatchArrayProperties - */ -const de_BatchArrayProperties = (output: any, context: __SerdeContext): BatchArrayProperties => { - return { - Size: __expectInt32(output.Size), - } as any; -}; +// de_BatchRetryStrategy omitted. -/** - * deserializeAws_restJson1BatchContainerOverrides - */ -const de_BatchContainerOverrides = (output: any, context: __SerdeContext): BatchContainerOverrides => { - return { - Command: output.Command != null ? de_StringList(output.Command, context) : undefined, - Environment: output.Environment != null ? de_BatchEnvironmentVariableList(output.Environment, context) : undefined, - InstanceType: __expectString(output.InstanceType), - ResourceRequirements: - output.ResourceRequirements != null - ? de_BatchResourceRequirementsList(output.ResourceRequirements, context) - : undefined, - } as any; -}; +// de_CapacityProviderStrategy omitted. -/** - * deserializeAws_restJson1BatchDependsOn - */ -const de_BatchDependsOn = (output: any, context: __SerdeContext): BatchJobDependency[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchJobDependency(entry, context); - }); - return retVal; -}; +// de_CapacityProviderStrategyItem omitted. -/** - * deserializeAws_restJson1BatchEnvironmentVariable - */ -const de_BatchEnvironmentVariable = (output: any, context: __SerdeContext): BatchEnvironmentVariable => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_DeadLetterConfig omitted. -/** - * deserializeAws_restJson1BatchEnvironmentVariableList - */ -const de_BatchEnvironmentVariableList = (output: any, context: __SerdeContext): BatchEnvironmentVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchEnvironmentVariable(entry, context); - }); - return retVal; -}; +// de_EcsContainerOverride omitted. -/** - * deserializeAws_restJson1BatchJobDependency - */ -const de_BatchJobDependency = (output: any, context: __SerdeContext): BatchJobDependency => { - return { - JobId: __expectString(output.JobId), - Type: __expectString(output.Type), - } as any; -}; +// de_EcsContainerOverrideList omitted. -/** - * deserializeAws_restJson1BatchParametersMap - */ -const de_BatchParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_EcsEnvironmentFile omitted. -/** - * deserializeAws_restJson1BatchResourceRequirement - */ -const de_BatchResourceRequirement = (output: any, context: __SerdeContext): BatchResourceRequirement => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_EcsEnvironmentFileList omitted. -/** - * deserializeAws_restJson1BatchResourceRequirementsList - */ -const de_BatchResourceRequirementsList = (output: any, context: __SerdeContext): BatchResourceRequirement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchResourceRequirement(entry, context); - }); - return retVal; -}; +// de_EcsEnvironmentVariable omitted. -/** - * deserializeAws_restJson1BatchRetryStrategy - */ -const de_BatchRetryStrategy = (output: any, context: __SerdeContext): BatchRetryStrategy => { - return { - Attempts: __expectInt32(output.Attempts), - } as any; -}; +// de_EcsEnvironmentVariableList omitted. -/** - * deserializeAws_restJson1CapacityProviderStrategy - */ -const de_CapacityProviderStrategy = (output: any, context: __SerdeContext): CapacityProviderStrategyItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CapacityProviderStrategyItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CapacityProviderStrategyItem - */ -const de_CapacityProviderStrategyItem = (output: any, context: __SerdeContext): CapacityProviderStrategyItem => { - return { - base: __expectInt32(output.base), - capacityProvider: __expectString(output.capacityProvider), - weight: __expectInt32(output.weight), - } as any; -}; +// de_EcsEphemeralStorage omitted. -/** - * deserializeAws_restJson1DeadLetterConfig - */ -const de_DeadLetterConfig = (output: any, context: __SerdeContext): DeadLetterConfig => { - return { - Arn: __expectString(output.Arn), - } as any; -}; - -/** - * deserializeAws_restJson1EcsContainerOverride - */ -const de_EcsContainerOverride = (output: any, context: __SerdeContext): EcsContainerOverride => { - return { - Command: output.Command != null ? de_StringList(output.Command, context) : undefined, - Cpu: __expectInt32(output.Cpu), - Environment: output.Environment != null ? de_EcsEnvironmentVariableList(output.Environment, context) : undefined, - EnvironmentFiles: - output.EnvironmentFiles != null ? de_EcsEnvironmentFileList(output.EnvironmentFiles, context) : undefined, - Memory: __expectInt32(output.Memory), - MemoryReservation: __expectInt32(output.MemoryReservation), - Name: __expectString(output.Name), - ResourceRequirements: - output.ResourceRequirements != null - ? de_EcsResourceRequirementsList(output.ResourceRequirements, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EcsContainerOverrideList - */ -const de_EcsContainerOverrideList = (output: any, context: __SerdeContext): EcsContainerOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EcsContainerOverride(entry, context); - }); - return retVal; -}; +// de_EcsInferenceAcceleratorOverride omitted. -/** - * deserializeAws_restJson1EcsEnvironmentFile - */ -const de_EcsEnvironmentFile = (output: any, context: __SerdeContext): EcsEnvironmentFile => { - return { - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; +// de_EcsInferenceAcceleratorOverrideList omitted. -/** - * deserializeAws_restJson1EcsEnvironmentFileList - */ -const de_EcsEnvironmentFileList = (output: any, context: __SerdeContext): EcsEnvironmentFile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EcsEnvironmentFile(entry, context); - }); - return retVal; -}; +// de_EcsResourceRequirement omitted. -/** - * deserializeAws_restJson1EcsEnvironmentVariable - */ -const de_EcsEnvironmentVariable = (output: any, context: __SerdeContext): EcsEnvironmentVariable => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_EcsResourceRequirementsList omitted. -/** - * deserializeAws_restJson1EcsEnvironmentVariableList - */ -const de_EcsEnvironmentVariableList = (output: any, context: __SerdeContext): EcsEnvironmentVariable[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EcsEnvironmentVariable(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EcsEphemeralStorage - */ -const de_EcsEphemeralStorage = (output: any, context: __SerdeContext): EcsEphemeralStorage => { - return { - sizeInGiB: __expectInt32(output.sizeInGiB), - } as any; -}; - -/** - * deserializeAws_restJson1EcsInferenceAcceleratorOverride - */ -const de_EcsInferenceAcceleratorOverride = (output: any, context: __SerdeContext): EcsInferenceAcceleratorOverride => { - return { - deviceName: __expectString(output.deviceName), - deviceType: __expectString(output.deviceType), - } as any; -}; - -/** - * deserializeAws_restJson1EcsInferenceAcceleratorOverrideList - */ -const de_EcsInferenceAcceleratorOverrideList = ( - output: any, - context: __SerdeContext -): EcsInferenceAcceleratorOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EcsInferenceAcceleratorOverride(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EcsResourceRequirement - */ -const de_EcsResourceRequirement = (output: any, context: __SerdeContext): EcsResourceRequirement => { - return { - type: __expectString(output.type), - value: __expectString(output.value), - } as any; -}; - -/** - * deserializeAws_restJson1EcsResourceRequirementsList - */ -const de_EcsResourceRequirementsList = (output: any, context: __SerdeContext): EcsResourceRequirement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EcsResourceRequirement(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1EcsTaskOverride - */ -const de_EcsTaskOverride = (output: any, context: __SerdeContext): EcsTaskOverride => { - return { - ContainerOverrides: - output.ContainerOverrides != null ? de_EcsContainerOverrideList(output.ContainerOverrides, context) : undefined, - Cpu: __expectString(output.Cpu), - EphemeralStorage: - output.EphemeralStorage != null ? de_EcsEphemeralStorage(output.EphemeralStorage, context) : undefined, - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - InferenceAcceleratorOverrides: - output.InferenceAcceleratorOverrides != null - ? de_EcsInferenceAcceleratorOverrideList(output.InferenceAcceleratorOverrides, context) - : undefined, - Memory: __expectString(output.Memory), - TaskRoleArn: __expectString(output.TaskRoleArn), - } as any; -}; - -/** - * deserializeAws_restJson1EventBridgeEventResourceList - */ -const de_EventBridgeEventResourceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EcsTaskOverride omitted. -/** - * deserializeAws_restJson1Filter - */ -const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - Pattern: __expectString(output.Pattern), - } as any; -}; +// de_EventBridgeEventResourceList omitted. -/** - * deserializeAws_restJson1FilterCriteria - */ -const de_FilterCriteria = (output: any, context: __SerdeContext): FilterCriteria => { - return { - Filters: output.Filters != null ? de_FilterList(output.Filters, context) : undefined, - } as any; -}; +// de_Filter omitted. -/** - * deserializeAws_restJson1FilterList - */ -const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Filter(entry, context); - }); - return retVal; -}; +// de_FilterCriteria omitted. -/** - * deserializeAws_restJson1HeaderParametersMap - */ -const de_HeaderParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FilterList omitted. -/** - * deserializeAws_restJson1KafkaBootstrapServers - */ -const de_KafkaBootstrapServers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HeaderParametersMap omitted. -/** - * deserializeAws_restJson1MQBrokerAccessCredentials - */ -const de_MQBrokerAccessCredentials = (output: any, context: __SerdeContext): MQBrokerAccessCredentials => { - if (__expectString(output.BasicAuth) !== undefined) { - return { BasicAuth: __expectString(output.BasicAuth) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_KafkaBootstrapServers omitted. -/** - * deserializeAws_restJson1MSKAccessCredentials - */ -const de_MSKAccessCredentials = (output: any, context: __SerdeContext): MSKAccessCredentials => { - if (__expectString(output.ClientCertificateTlsAuth) !== undefined) { - return { ClientCertificateTlsAuth: __expectString(output.ClientCertificateTlsAuth) as any }; - } - if (__expectString(output.SaslScram512Auth) !== undefined) { - return { SaslScram512Auth: __expectString(output.SaslScram512Auth) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_MQBrokerAccessCredentials omitted. -/** - * deserializeAws_restJson1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - awsvpcConfiguration: - output.awsvpcConfiguration != null ? de_AwsVpcConfiguration(output.awsvpcConfiguration, context) : undefined, - } as any; -}; +// de_MSKAccessCredentials omitted. -/** - * deserializeAws_restJson1PathParameterList - */ -const de_PathParameterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NetworkConfiguration omitted. + +// de_PathParameterList omitted. /** * deserializeAws_restJson1Pipe */ const de_Pipe = (output: any, context: __SerdeContext): Pipe => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CurrentState: __expectString(output.CurrentState), - DesiredState: __expectString(output.DesiredState), - Enrichment: __expectString(output.Enrichment), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - Source: __expectString(output.Source), - StateReason: __expectString(output.StateReason), - Target: __expectString(output.Target), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CurrentState: __expectString, + DesiredState: __expectString, + Enrichment: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Source: __expectString, + StateReason: __expectString, + Target: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1PipeEnrichmentHttpParameters - */ -const de_PipeEnrichmentHttpParameters = (output: any, context: __SerdeContext): PipeEnrichmentHttpParameters => { - return { - HeaderParameters: - output.HeaderParameters != null ? de_HeaderParametersMap(output.HeaderParameters, context) : undefined, - PathParameterValues: - output.PathParameterValues != null ? de_PathParameterList(output.PathParameterValues, context) : undefined, - QueryStringParameters: - output.QueryStringParameters != null - ? de_QueryStringParametersMap(output.QueryStringParameters, context) - : undefined, - } as any; -}; +// de_PipeEnrichmentHttpParameters omitted. -/** - * deserializeAws_restJson1PipeEnrichmentParameters - */ -const de_PipeEnrichmentParameters = (output: any, context: __SerdeContext): PipeEnrichmentParameters => { - return { - HttpParameters: - output.HttpParameters != null ? de_PipeEnrichmentHttpParameters(output.HttpParameters, context) : undefined, - InputTemplate: __expectString(output.InputTemplate), - } as any; -}; +// de_PipeEnrichmentParameters omitted. /** * deserializeAws_restJson1PipeList @@ -2911,49 +1411,14 @@ const de_PipeList = (output: any, context: __SerdeContext): Pipe[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Pipe(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PipeSourceActiveMQBrokerParameters - */ -const de_PipeSourceActiveMQBrokerParameters = ( - output: any, - context: __SerdeContext -): PipeSourceActiveMQBrokerParameters => { - return { - BatchSize: __expectInt32(output.BatchSize), - Credentials: - output.Credentials != null ? de_MQBrokerAccessCredentials(__expectUnion(output.Credentials), context) : undefined, - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - QueueName: __expectString(output.QueueName), - } as any; -}; +// de_PipeSourceActiveMQBrokerParameters omitted. -/** - * deserializeAws_restJson1PipeSourceDynamoDBStreamParameters - */ -const de_PipeSourceDynamoDBStreamParameters = ( - output: any, - context: __SerdeContext -): PipeSourceDynamoDBStreamParameters => { - return { - BatchSize: __expectInt32(output.BatchSize), - DeadLetterConfig: - output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined, - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - MaximumRecordAgeInSeconds: __expectInt32(output.MaximumRecordAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - OnPartialBatchItemFailure: __expectString(output.OnPartialBatchItemFailure), - ParallelizationFactor: __expectInt32(output.ParallelizationFactor), - StartingPosition: __expectString(output.StartingPosition), - } as any; -}; +// de_PipeSourceDynamoDBStreamParameters omitted. /** * deserializeAws_restJson1PipeSourceKinesisStreamParameters @@ -2962,624 +1427,106 @@ const de_PipeSourceKinesisStreamParameters = ( output: any, context: __SerdeContext ): PipeSourceKinesisStreamParameters => { - return { - BatchSize: __expectInt32(output.BatchSize), - DeadLetterConfig: - output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined, - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - MaximumRecordAgeInSeconds: __expectInt32(output.MaximumRecordAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - OnPartialBatchItemFailure: __expectString(output.OnPartialBatchItemFailure), - ParallelizationFactor: __expectInt32(output.ParallelizationFactor), - StartingPosition: __expectString(output.StartingPosition), - StartingPositionTimestamp: - output.StartingPositionTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartingPositionTimestamp))) - : undefined, - } as any; + return take(output, { + BatchSize: __expectInt32, + DeadLetterConfig: _json, + MaximumBatchingWindowInSeconds: __expectInt32, + MaximumRecordAgeInSeconds: __expectInt32, + MaximumRetryAttempts: __expectInt32, + OnPartialBatchItemFailure: __expectString, + ParallelizationFactor: __expectInt32, + StartingPosition: __expectString, + StartingPositionTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1PipeSourceManagedStreamingKafkaParameters - */ -const de_PipeSourceManagedStreamingKafkaParameters = ( - output: any, - context: __SerdeContext -): PipeSourceManagedStreamingKafkaParameters => { - return { - BatchSize: __expectInt32(output.BatchSize), - ConsumerGroupID: __expectString(output.ConsumerGroupID), - Credentials: - output.Credentials != null ? de_MSKAccessCredentials(__expectUnion(output.Credentials), context) : undefined, - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - StartingPosition: __expectString(output.StartingPosition), - TopicName: __expectString(output.TopicName), - } as any; -}; +// de_PipeSourceManagedStreamingKafkaParameters omitted. /** * deserializeAws_restJson1PipeSourceParameters */ const de_PipeSourceParameters = (output: any, context: __SerdeContext): PipeSourceParameters => { - return { - ActiveMQBrokerParameters: - output.ActiveMQBrokerParameters != null - ? de_PipeSourceActiveMQBrokerParameters(output.ActiveMQBrokerParameters, context) - : undefined, - DynamoDBStreamParameters: - output.DynamoDBStreamParameters != null - ? de_PipeSourceDynamoDBStreamParameters(output.DynamoDBStreamParameters, context) - : undefined, - FilterCriteria: output.FilterCriteria != null ? de_FilterCriteria(output.FilterCriteria, context) : undefined, - KinesisStreamParameters: - output.KinesisStreamParameters != null - ? de_PipeSourceKinesisStreamParameters(output.KinesisStreamParameters, context) - : undefined, - ManagedStreamingKafkaParameters: - output.ManagedStreamingKafkaParameters != null - ? de_PipeSourceManagedStreamingKafkaParameters(output.ManagedStreamingKafkaParameters, context) - : undefined, - RabbitMQBrokerParameters: - output.RabbitMQBrokerParameters != null - ? de_PipeSourceRabbitMQBrokerParameters(output.RabbitMQBrokerParameters, context) - : undefined, - SelfManagedKafkaParameters: - output.SelfManagedKafkaParameters != null - ? de_PipeSourceSelfManagedKafkaParameters(output.SelfManagedKafkaParameters, context) - : undefined, - SqsQueueParameters: - output.SqsQueueParameters != null - ? de_PipeSourceSqsQueueParameters(output.SqsQueueParameters, context) - : undefined, - } as any; + return take(output, { + ActiveMQBrokerParameters: _json, + DynamoDBStreamParameters: _json, + FilterCriteria: _json, + KinesisStreamParameters: (_: any) => de_PipeSourceKinesisStreamParameters(_, context), + ManagedStreamingKafkaParameters: _json, + RabbitMQBrokerParameters: _json, + SelfManagedKafkaParameters: _json, + SqsQueueParameters: _json, + }) as any; }; -/** - * deserializeAws_restJson1PipeSourceRabbitMQBrokerParameters - */ -const de_PipeSourceRabbitMQBrokerParameters = ( - output: any, - context: __SerdeContext -): PipeSourceRabbitMQBrokerParameters => { - return { - BatchSize: __expectInt32(output.BatchSize), - Credentials: - output.Credentials != null ? de_MQBrokerAccessCredentials(__expectUnion(output.Credentials), context) : undefined, - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - QueueName: __expectString(output.QueueName), - VirtualHost: __expectString(output.VirtualHost), - } as any; -}; +// de_PipeSourceRabbitMQBrokerParameters omitted. -/** - * deserializeAws_restJson1PipeSourceSelfManagedKafkaParameters - */ -const de_PipeSourceSelfManagedKafkaParameters = ( - output: any, - context: __SerdeContext -): PipeSourceSelfManagedKafkaParameters => { - return { - AdditionalBootstrapServers: - output.AdditionalBootstrapServers != null - ? de_KafkaBootstrapServers(output.AdditionalBootstrapServers, context) - : undefined, - BatchSize: __expectInt32(output.BatchSize), - ConsumerGroupID: __expectString(output.ConsumerGroupID), - Credentials: - output.Credentials != null - ? de_SelfManagedKafkaAccessConfigurationCredentials(__expectUnion(output.Credentials), context) - : undefined, - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - ServerRootCaCertificate: __expectString(output.ServerRootCaCertificate), - StartingPosition: __expectString(output.StartingPosition), - TopicName: __expectString(output.TopicName), - Vpc: output.Vpc != null ? de_SelfManagedKafkaAccessConfigurationVpc(output.Vpc, context) : undefined, - } as any; -}; +// de_PipeSourceSelfManagedKafkaParameters omitted. -/** - * deserializeAws_restJson1PipeSourceSqsQueueParameters - */ -const de_PipeSourceSqsQueueParameters = (output: any, context: __SerdeContext): PipeSourceSqsQueueParameters => { - return { - BatchSize: __expectInt32(output.BatchSize), - MaximumBatchingWindowInSeconds: __expectInt32(output.MaximumBatchingWindowInSeconds), - } as any; -}; +// de_PipeSourceSqsQueueParameters omitted. -/** - * deserializeAws_restJson1PipeTargetBatchJobParameters - */ -const de_PipeTargetBatchJobParameters = (output: any, context: __SerdeContext): PipeTargetBatchJobParameters => { - return { - ArrayProperties: - output.ArrayProperties != null ? de_BatchArrayProperties(output.ArrayProperties, context) : undefined, - ContainerOverrides: - output.ContainerOverrides != null ? de_BatchContainerOverrides(output.ContainerOverrides, context) : undefined, - DependsOn: output.DependsOn != null ? de_BatchDependsOn(output.DependsOn, context) : undefined, - JobDefinition: __expectString(output.JobDefinition), - JobName: __expectString(output.JobName), - Parameters: output.Parameters != null ? de_BatchParametersMap(output.Parameters, context) : undefined, - RetryStrategy: output.RetryStrategy != null ? de_BatchRetryStrategy(output.RetryStrategy, context) : undefined, - } as any; -}; +// de_PipeTargetBatchJobParameters omitted. -/** - * deserializeAws_restJson1PipeTargetCloudWatchLogsParameters - */ -const de_PipeTargetCloudWatchLogsParameters = ( - output: any, - context: __SerdeContext -): PipeTargetCloudWatchLogsParameters => { - return { - LogStreamName: __expectString(output.LogStreamName), - Timestamp: __expectString(output.Timestamp), - } as any; -}; +// de_PipeTargetCloudWatchLogsParameters omitted. -/** - * deserializeAws_restJson1PipeTargetEcsTaskParameters - */ -const de_PipeTargetEcsTaskParameters = (output: any, context: __SerdeContext): PipeTargetEcsTaskParameters => { - return { - CapacityProviderStrategy: - output.CapacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.CapacityProviderStrategy, context) - : undefined, - EnableECSManagedTags: __expectBoolean(output.EnableECSManagedTags), - EnableExecuteCommand: __expectBoolean(output.EnableExecuteCommand), - Group: __expectString(output.Group), - LaunchType: __expectString(output.LaunchType), - NetworkConfiguration: - output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined, - Overrides: output.Overrides != null ? de_EcsTaskOverride(output.Overrides, context) : undefined, - PlacementConstraints: - output.PlacementConstraints != null ? de_PlacementConstraints(output.PlacementConstraints, context) : undefined, - PlacementStrategy: - output.PlacementStrategy != null ? de_PlacementStrategies(output.PlacementStrategy, context) : undefined, - PlatformVersion: __expectString(output.PlatformVersion), - PropagateTags: __expectString(output.PropagateTags), - ReferenceId: __expectString(output.ReferenceId), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TaskCount: __expectInt32(output.TaskCount), - TaskDefinitionArn: __expectString(output.TaskDefinitionArn), - } as any; -}; +// de_PipeTargetEcsTaskParameters omitted. -/** - * deserializeAws_restJson1PipeTargetEventBridgeEventBusParameters - */ -const de_PipeTargetEventBridgeEventBusParameters = ( - output: any, - context: __SerdeContext -): PipeTargetEventBridgeEventBusParameters => { - return { - DetailType: __expectString(output.DetailType), - EndpointId: __expectString(output.EndpointId), - Resources: output.Resources != null ? de_EventBridgeEventResourceList(output.Resources, context) : undefined, - Source: __expectString(output.Source), - Time: __expectString(output.Time), - } as any; -}; +// de_PipeTargetEventBridgeEventBusParameters omitted. -/** - * deserializeAws_restJson1PipeTargetHttpParameters - */ -const de_PipeTargetHttpParameters = (output: any, context: __SerdeContext): PipeTargetHttpParameters => { - return { - HeaderParameters: - output.HeaderParameters != null ? de_HeaderParametersMap(output.HeaderParameters, context) : undefined, - PathParameterValues: - output.PathParameterValues != null ? de_PathParameterList(output.PathParameterValues, context) : undefined, - QueryStringParameters: - output.QueryStringParameters != null - ? de_QueryStringParametersMap(output.QueryStringParameters, context) - : undefined, - } as any; -}; +// de_PipeTargetHttpParameters omitted. -/** - * deserializeAws_restJson1PipeTargetKinesisStreamParameters - */ -const de_PipeTargetKinesisStreamParameters = ( - output: any, - context: __SerdeContext -): PipeTargetKinesisStreamParameters => { - return { - PartitionKey: __expectString(output.PartitionKey), - } as any; -}; +// de_PipeTargetKinesisStreamParameters omitted. -/** - * deserializeAws_restJson1PipeTargetLambdaFunctionParameters - */ -const de_PipeTargetLambdaFunctionParameters = ( - output: any, - context: __SerdeContext -): PipeTargetLambdaFunctionParameters => { - return { - InvocationType: __expectString(output.InvocationType), - } as any; -}; +// de_PipeTargetLambdaFunctionParameters omitted. -/** - * deserializeAws_restJson1PipeTargetParameters - */ -const de_PipeTargetParameters = (output: any, context: __SerdeContext): PipeTargetParameters => { - return { - BatchJobParameters: - output.BatchJobParameters != null - ? de_PipeTargetBatchJobParameters(output.BatchJobParameters, context) - : undefined, - CloudWatchLogsParameters: - output.CloudWatchLogsParameters != null - ? de_PipeTargetCloudWatchLogsParameters(output.CloudWatchLogsParameters, context) - : undefined, - EcsTaskParameters: - output.EcsTaskParameters != null ? de_PipeTargetEcsTaskParameters(output.EcsTaskParameters, context) : undefined, - EventBridgeEventBusParameters: - output.EventBridgeEventBusParameters != null - ? de_PipeTargetEventBridgeEventBusParameters(output.EventBridgeEventBusParameters, context) - : undefined, - HttpParameters: - output.HttpParameters != null ? de_PipeTargetHttpParameters(output.HttpParameters, context) : undefined, - InputTemplate: __expectString(output.InputTemplate), - KinesisStreamParameters: - output.KinesisStreamParameters != null - ? de_PipeTargetKinesisStreamParameters(output.KinesisStreamParameters, context) - : undefined, - LambdaFunctionParameters: - output.LambdaFunctionParameters != null - ? de_PipeTargetLambdaFunctionParameters(output.LambdaFunctionParameters, context) - : undefined, - RedshiftDataParameters: - output.RedshiftDataParameters != null - ? de_PipeTargetRedshiftDataParameters(output.RedshiftDataParameters, context) - : undefined, - SageMakerPipelineParameters: - output.SageMakerPipelineParameters != null - ? de_PipeTargetSageMakerPipelineParameters(output.SageMakerPipelineParameters, context) - : undefined, - SqsQueueParameters: - output.SqsQueueParameters != null - ? de_PipeTargetSqsQueueParameters(output.SqsQueueParameters, context) - : undefined, - StepFunctionStateMachineParameters: - output.StepFunctionStateMachineParameters != null - ? de_PipeTargetStateMachineParameters(output.StepFunctionStateMachineParameters, context) - : undefined, - } as any; -}; +// de_PipeTargetParameters omitted. -/** - * deserializeAws_restJson1PipeTargetRedshiftDataParameters - */ -const de_PipeTargetRedshiftDataParameters = ( - output: any, - context: __SerdeContext -): PipeTargetRedshiftDataParameters => { - return { - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - SecretManagerArn: __expectString(output.SecretManagerArn), - Sqls: output.Sqls != null ? de_Sqls(output.Sqls, context) : undefined, - StatementName: __expectString(output.StatementName), - WithEvent: __expectBoolean(output.WithEvent), - } as any; -}; +// de_PipeTargetRedshiftDataParameters omitted. -/** - * deserializeAws_restJson1PipeTargetSageMakerPipelineParameters - */ -const de_PipeTargetSageMakerPipelineParameters = ( - output: any, - context: __SerdeContext -): PipeTargetSageMakerPipelineParameters => { - return { - PipelineParameterList: - output.PipelineParameterList != null - ? de_SageMakerPipelineParameterList(output.PipelineParameterList, context) - : undefined, - } as any; -}; +// de_PipeTargetSageMakerPipelineParameters omitted. -/** - * deserializeAws_restJson1PipeTargetSqsQueueParameters - */ -const de_PipeTargetSqsQueueParameters = (output: any, context: __SerdeContext): PipeTargetSqsQueueParameters => { - return { - MessageDeduplicationId: __expectString(output.MessageDeduplicationId), - MessageGroupId: __expectString(output.MessageGroupId), - } as any; -}; +// de_PipeTargetSqsQueueParameters omitted. -/** - * deserializeAws_restJson1PipeTargetStateMachineParameters - */ -const de_PipeTargetStateMachineParameters = ( - output: any, - context: __SerdeContext -): PipeTargetStateMachineParameters => { - return { - InvocationType: __expectString(output.InvocationType), - } as any; -}; +// de_PipeTargetStateMachineParameters omitted. -/** - * deserializeAws_restJson1PlacementConstraint - */ -const de_PlacementConstraint = (output: any, context: __SerdeContext): PlacementConstraint => { - return { - expression: __expectString(output.expression), - type: __expectString(output.type), - } as any; -}; +// de_PlacementConstraint omitted. -/** - * deserializeAws_restJson1PlacementConstraints - */ -const de_PlacementConstraints = (output: any, context: __SerdeContext): PlacementConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementConstraint(entry, context); - }); - return retVal; -}; +// de_PlacementConstraints omitted. -/** - * deserializeAws_restJson1PlacementStrategies - */ -const de_PlacementStrategies = (output: any, context: __SerdeContext): PlacementStrategy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementStrategy(entry, context); - }); - return retVal; -}; +// de_PlacementStrategies omitted. -/** - * deserializeAws_restJson1PlacementStrategy - */ -const de_PlacementStrategy = (output: any, context: __SerdeContext): PlacementStrategy => { - return { - field: __expectString(output.field), - type: __expectString(output.type), - } as any; -}; +// de_PlacementStrategy omitted. -/** - * deserializeAws_restJson1QueryStringParametersMap - */ -const de_QueryStringParametersMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_QueryStringParametersMap omitted. -/** - * deserializeAws_restJson1SageMakerPipelineParameter - */ -const de_SageMakerPipelineParameter = (output: any, context: __SerdeContext): SageMakerPipelineParameter => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_SageMakerPipelineParameter omitted. -/** - * deserializeAws_restJson1SageMakerPipelineParameterList - */ -const de_SageMakerPipelineParameterList = (output: any, context: __SerdeContext): SageMakerPipelineParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SageMakerPipelineParameter(entry, context); - }); - return retVal; -}; +// de_SageMakerPipelineParameterList omitted. -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1SecurityGroups - */ -const de_SecurityGroups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroups omitted. -/** - * deserializeAws_restJson1SelfManagedKafkaAccessConfigurationCredentials - */ -const de_SelfManagedKafkaAccessConfigurationCredentials = ( - output: any, - context: __SerdeContext -): SelfManagedKafkaAccessConfigurationCredentials => { - if (__expectString(output.BasicAuth) !== undefined) { - return { BasicAuth: __expectString(output.BasicAuth) as any }; - } - if (__expectString(output.ClientCertificateTlsAuth) !== undefined) { - return { ClientCertificateTlsAuth: __expectString(output.ClientCertificateTlsAuth) as any }; - } - if (__expectString(output.SaslScram256Auth) !== undefined) { - return { SaslScram256Auth: __expectString(output.SaslScram256Auth) as any }; - } - if (__expectString(output.SaslScram512Auth) !== undefined) { - return { SaslScram512Auth: __expectString(output.SaslScram512Auth) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_SelfManagedKafkaAccessConfigurationCredentials omitted. -/** - * deserializeAws_restJson1SelfManagedKafkaAccessConfigurationVpc - */ -const de_SelfManagedKafkaAccessConfigurationVpc = ( - output: any, - context: __SerdeContext -): SelfManagedKafkaAccessConfigurationVpc => { - return { - SecurityGroup: output.SecurityGroup != null ? de_SecurityGroupIds(output.SecurityGroup, context) : undefined, - Subnets: output.Subnets != null ? de_SubnetIds(output.Subnets, context) : undefined, - } as any; -}; +// de_SelfManagedKafkaAccessConfigurationVpc omitted. -/** - * deserializeAws_restJson1Sqls - */ -const de_Sqls = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Sqls omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_restJson1Subnets - */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Subnets omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-polly/src/protocols/Aws_restJson1.ts b/clients/client-polly/src/protocols/Aws_restJson1.ts index 22afd68984cd..d3d933a4867e 100644 --- a/clients/client-polly/src/protocols/Aws_restJson1.ts +++ b/clients/client-polly/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -8,11 +9,12 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -40,7 +42,6 @@ import { } from "../commands/StartSpeechSynthesisTaskCommand"; import { SynthesizeSpeechCommandInput, SynthesizeSpeechCommandOutput } from "../commands/SynthesizeSpeechCommand"; import { - Engine, EngineNotSupportedException, InvalidLexiconException, InvalidNextTokenException, @@ -50,9 +51,7 @@ import { InvalidSnsTopicArnException, InvalidSsmlException, InvalidTaskIdException, - LanguageCode, LanguageNotSupportedException, - Lexicon, LexiconAttributes, LexiconDescription, LexiconNotFoundException, @@ -68,7 +67,6 @@ import { TextLengthExceededException, UnsupportedPlsAlphabetException, UnsupportedPlsLanguageException, - Voice, } from "../models/models_0"; import { PollyServiceException as __BaseException } from "../models/PollyServiceException"; @@ -242,9 +240,11 @@ export const se_PutLexiconCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/lexicons/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - }); + body = JSON.stringify( + take(input, { + Content: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -269,20 +269,22 @@ export const se_StartSpeechSynthesisTaskCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/synthesisTasks"; let body: any; - body = JSON.stringify({ - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LexiconNames != null && { LexiconNames: se_LexiconNameList(input.LexiconNames, context) }), - ...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }), - ...(input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName }), - ...(input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix }), - ...(input.SampleRate != null && { SampleRate: input.SampleRate }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SpeechMarkTypes != null && { SpeechMarkTypes: se_SpeechMarkTypeList(input.SpeechMarkTypes, context) }), - ...(input.Text != null && { Text: input.Text }), - ...(input.TextType != null && { TextType: input.TextType }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - }); + body = JSON.stringify( + take(input, { + Engine: [], + LanguageCode: [], + LexiconNames: (_) => _json(_), + OutputFormat: [], + OutputS3BucketName: [], + OutputS3KeyPrefix: [], + SampleRate: [], + SnsTopicArn: [], + SpeechMarkTypes: (_) => _json(_), + Text: [], + TextType: [], + VoiceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -307,17 +309,19 @@ export const se_SynthesizeSpeechCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/speech"; let body: any; - body = JSON.stringify({ - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LexiconNames != null && { LexiconNames: se_LexiconNameList(input.LexiconNames, context) }), - ...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }), - ...(input.SampleRate != null && { SampleRate: input.SampleRate }), - ...(input.SpeechMarkTypes != null && { SpeechMarkTypes: se_SpeechMarkTypeList(input.SpeechMarkTypes, context) }), - ...(input.Text != null && { Text: input.Text }), - ...(input.TextType != null && { TextType: input.TextType }), - ...(input.VoiceId != null && { VoiceId: input.VoiceId }), - }); + body = JSON.stringify( + take(input, { + Engine: [], + LanguageCode: [], + LexiconNames: (_) => _json(_), + OutputFormat: [], + SampleRate: [], + SpeechMarkTypes: (_) => _json(_), + Text: [], + TextType: [], + VoiceId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -367,10 +371,9 @@ const de_DeleteLexiconCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -390,12 +393,11 @@ export const de_DescribeVoicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Voices != null) { - contents.Voices = de_VoiceList(data.Voices, context); - } + const doc = take(data, { + NextToken: __expectString, + Voices: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -420,10 +422,9 @@ const de_DescribeVoicesCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -443,12 +444,11 @@ export const de_GetLexiconCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Lexicon != null) { - contents.Lexicon = de_Lexicon(data.Lexicon, context); - } - if (data.LexiconAttributes != null) { - contents.LexiconAttributes = de_LexiconAttributes(data.LexiconAttributes, context); - } + const doc = take(data, { + Lexicon: _json, + LexiconAttributes: (_) => de_LexiconAttributes(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -473,10 +473,9 @@ const de_GetLexiconCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -496,9 +495,10 @@ export const de_GetSpeechSynthesisTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SynthesisTask != null) { - contents.SynthesisTask = de_SynthesisTask(data.SynthesisTask, context); - } + const doc = take(data, { + SynthesisTask: (_) => de_SynthesisTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -526,10 +526,9 @@ const de_GetSpeechSynthesisTaskCommandError = async ( throw await de_SynthesisTaskNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -549,12 +548,11 @@ export const de_ListLexiconsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Lexicons != null) { - contents.Lexicons = de_LexiconDescriptionList(data.Lexicons, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Lexicons: (_) => de_LexiconDescriptionList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -579,10 +577,9 @@ const de_ListLexiconsCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -602,12 +599,11 @@ export const de_ListSpeechSynthesisTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SynthesisTasks != null) { - contents.SynthesisTasks = de_SynthesisTasks(data.SynthesisTasks, context); - } + const doc = take(data, { + NextToken: __expectString, + SynthesisTasks: (_) => de_SynthesisTasks(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -632,10 +628,9 @@ const de_ListSpeechSynthesisTasksCommandError = async ( throw await de_ServiceFailureExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -694,10 +689,9 @@ const de_PutLexiconCommandError = async ( throw await de_UnsupportedPlsLanguageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -717,9 +711,10 @@ export const de_StartSpeechSynthesisTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SynthesisTask != null) { - contents.SynthesisTask = de_SynthesisTask(data.SynthesisTask, context); - } + const doc = take(data, { + SynthesisTask: (_) => de_SynthesisTask(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -774,10 +769,9 @@ const de_StartSpeechSynthesisTaskCommandError = async ( throw await de_TextLengthExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -849,16 +843,15 @@ const de_SynthesizeSpeechCommandError = async ( throw await de_TextLengthExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1EngineNotSupportedExceptionRes */ @@ -868,9 +861,10 @@ const de_EngineNotSupportedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new EngineNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -887,9 +881,10 @@ const de_InvalidLexiconExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidLexiconException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -906,9 +901,10 @@ const de_InvalidNextTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -925,9 +921,10 @@ const de_InvalidS3BucketExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidS3BucketException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -944,9 +941,10 @@ const de_InvalidS3KeyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidS3KeyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -963,9 +961,10 @@ const de_InvalidSampleRateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidSampleRateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -982,9 +981,10 @@ const de_InvalidSnsTopicArnExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidSnsTopicArnException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1001,9 +1001,10 @@ const de_InvalidSsmlExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidSsmlException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1020,9 +1021,10 @@ const de_InvalidTaskIdExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidTaskIdException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1039,9 +1041,10 @@ const de_LanguageNotSupportedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LanguageNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1058,9 +1061,10 @@ const de_LexiconNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LexiconNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1077,9 +1081,10 @@ const de_LexiconSizeExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LexiconSizeExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1096,9 +1101,10 @@ const de_MarksNotSupportedForFormatExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MarksNotSupportedForFormatException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1115,9 +1121,10 @@ const de_MaxLexemeLengthExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MaxLexemeLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1134,9 +1141,10 @@ const de_MaxLexiconsNumberExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MaxLexiconsNumberExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1153,9 +1161,10 @@ const de_ServiceFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1172,9 +1181,10 @@ const de_SsmlMarksNotSupportedForTextTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SsmlMarksNotSupportedForTextTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1191,9 +1201,10 @@ const de_SynthesisTaskNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SynthesisTaskNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1210,9 +1221,10 @@ const de_TextLengthExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TextLengthExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1229,9 +1241,10 @@ const de_UnsupportedPlsAlphabetExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedPlsAlphabetException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1248,9 +1261,10 @@ const de_UnsupportedPlsLanguageExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedPlsLanguageException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1258,93 +1272,38 @@ const de_UnsupportedPlsLanguageExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1LexiconNameList - */ -const se_LexiconNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LexiconNameList omitted. -/** - * serializeAws_restJson1SpeechMarkTypeList - */ -const se_SpeechMarkTypeList = (input: (SpeechMarkType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SpeechMarkTypeList omitted. -/** - * deserializeAws_restJson1EngineList - */ -const de_EngineList = (output: any, context: __SerdeContext): (Engine | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EngineList omitted. -/** - * deserializeAws_restJson1LanguageCodeList - */ -const de_LanguageCodeList = (output: any, context: __SerdeContext): (LanguageCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LanguageCodeList omitted. -/** - * deserializeAws_restJson1Lexicon - */ -const de_Lexicon = (output: any, context: __SerdeContext): Lexicon => { - return { - Content: __expectString(output.Content), - Name: __expectString(output.Name), - } as any; -}; +// de_Lexicon omitted. /** * deserializeAws_restJson1LexiconAttributes */ const de_LexiconAttributes = (output: any, context: __SerdeContext): LexiconAttributes => { - return { - Alphabet: __expectString(output.Alphabet), - LanguageCode: __expectString(output.LanguageCode), - LastModified: - output.LastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified))) - : undefined, - LexemesCount: __expectInt32(output.LexemesCount), - LexiconArn: __expectString(output.LexiconArn), - Size: __expectInt32(output.Size), - } as any; + return take(output, { + Alphabet: __expectString, + LanguageCode: __expectString, + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LexemesCount: __expectInt32, + LexiconArn: __expectString, + Size: __expectInt32, + }) as any; }; /** * deserializeAws_restJson1LexiconDescription */ const de_LexiconDescription = (output: any, context: __SerdeContext): LexiconDescription => { - return { - Attributes: output.Attributes != null ? de_LexiconAttributes(output.Attributes, context) : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + Attributes: (_: any) => de_LexiconAttributes(_, context), + Name: __expectString, + }) as any; }; /** @@ -1354,69 +1313,36 @@ const de_LexiconDescriptionList = (output: any, context: __SerdeContext): Lexico const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LexiconDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LexiconNameList - */ -const de_LexiconNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LexiconNameList omitted. -/** - * deserializeAws_restJson1SpeechMarkTypeList - */ -const de_SpeechMarkTypeList = (output: any, context: __SerdeContext): (SpeechMarkType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SpeechMarkTypeList omitted. /** * deserializeAws_restJson1SynthesisTask */ const de_SynthesisTask = (output: any, context: __SerdeContext): SynthesisTask => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Engine: __expectString(output.Engine), - LanguageCode: __expectString(output.LanguageCode), - LexiconNames: output.LexiconNames != null ? de_LexiconNameList(output.LexiconNames, context) : undefined, - OutputFormat: __expectString(output.OutputFormat), - OutputUri: __expectString(output.OutputUri), - RequestCharacters: __expectInt32(output.RequestCharacters), - SampleRate: __expectString(output.SampleRate), - SnsTopicArn: __expectString(output.SnsTopicArn), - SpeechMarkTypes: - output.SpeechMarkTypes != null ? de_SpeechMarkTypeList(output.SpeechMarkTypes, context) : undefined, - TaskId: __expectString(output.TaskId), - TaskStatus: __expectString(output.TaskStatus), - TaskStatusReason: __expectString(output.TaskStatusReason), - TextType: __expectString(output.TextType), - VoiceId: __expectString(output.VoiceId), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Engine: __expectString, + LanguageCode: __expectString, + LexiconNames: _json, + OutputFormat: __expectString, + OutputUri: __expectString, + RequestCharacters: __expectInt32, + SampleRate: __expectString, + SnsTopicArn: __expectString, + SpeechMarkTypes: _json, + TaskId: __expectString, + TaskStatus: __expectString, + TaskStatusReason: __expectString, + TextType: __expectString, + VoiceId: __expectString, + }) as any; }; /** @@ -1426,44 +1352,14 @@ const de_SynthesisTasks = (output: any, context: __SerdeContext): SynthesisTask[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SynthesisTask(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Voice - */ -const de_Voice = (output: any, context: __SerdeContext): Voice => { - return { - AdditionalLanguageCodes: - output.AdditionalLanguageCodes != null ? de_LanguageCodeList(output.AdditionalLanguageCodes, context) : undefined, - Gender: __expectString(output.Gender), - Id: __expectString(output.Id), - LanguageCode: __expectString(output.LanguageCode), - LanguageName: __expectString(output.LanguageName), - Name: __expectString(output.Name), - SupportedEngines: output.SupportedEngines != null ? de_EngineList(output.SupportedEngines, context) : undefined, - } as any; -}; +// de_Voice omitted. -/** - * deserializeAws_restJson1VoiceList - */ -const de_VoiceList = (output: any, context: __SerdeContext): Voice[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Voice(entry, context); - }); - return retVal; -}; +// de_VoiceList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-pricing/src/protocols/Aws_json1_1.ts b/clients/client-pricing/src/protocols/Aws_json1_1.ts index 69c4c99f42ab..ad73a51d343b 100644 --- a/clients/client-pricing/src/protocols/Aws_json1_1.ts +++ b/clients/client-pricing/src/protocols/Aws_json1_1.ts @@ -1,10 +1,12 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectString as __expectString, LazyJsonString as __LazyJsonString, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -23,25 +25,18 @@ import { GetProductsCommandInput, GetProductsCommandOutput } from "../commands/G import { ListPriceListsCommandInput, ListPriceListsCommandOutput } from "../commands/ListPriceListsCommand"; import { AccessDeniedException, - AttributeValue, DescribeServicesRequest, - DescribeServicesResponse, ExpiredNextTokenException, Filter, GetAttributeValuesRequest, - GetAttributeValuesResponse, GetPriceListFileUrlRequest, - GetPriceListFileUrlResponse, GetProductsRequest, GetProductsResponse, InternalErrorException, InvalidNextTokenException, InvalidParameterException, ListPriceListsRequest, - ListPriceListsResponse, NotFoundException, - PriceList, - Service, } from "../models/models_0"; import { PricingServiceException as __BaseException } from "../models/PricingServiceException"; @@ -54,7 +49,7 @@ export const se_DescribeServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServices"); let body: any; - body = JSON.stringify(se_DescribeServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -67,7 +62,7 @@ export const se_GetAttributeValuesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAttributeValues"); let body: any; - body = JSON.stringify(se_GetAttributeValuesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -80,7 +75,7 @@ export const se_GetPriceListFileUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPriceListFileUrl"); let body: any; - body = JSON.stringify(se_GetPriceListFileUrlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -93,7 +88,7 @@ export const se_GetProductsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetProducts"); let body: any; - body = JSON.stringify(se_GetProductsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -122,12 +117,12 @@ export const de_DescribeServicesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeServicesResponse(data, context); + contents = _json(data); const response: DescribeServicesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -160,10 +155,9 @@ const de_DescribeServicesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -181,12 +175,12 @@ export const de_GetAttributeValuesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAttributeValuesResponse(data, context); + contents = _json(data); const response: GetAttributeValuesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -219,10 +213,9 @@ const de_GetAttributeValuesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -240,12 +233,12 @@ export const de_GetPriceListFileUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPriceListFileUrlResponse(data, context); + contents = _json(data); const response: GetPriceListFileUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -275,10 +268,9 @@ const de_GetPriceListFileUrlCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -301,7 +293,7 @@ export const de_GetProductsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -334,10 +326,9 @@ const de_GetProductsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -355,12 +346,12 @@ export const de_ListPriceListsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPriceListsResponse(data, context); + contents = _json(data); const response: ListPriceListsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -396,10 +387,9 @@ const de_ListPriceListsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -413,7 +403,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -429,7 +419,7 @@ const de_ExpiredNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExpiredNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new ExpiredNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -445,7 +435,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -461,7 +451,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -477,7 +467,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -490,7 +480,7 @@ const de_InvalidParameterExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -498,260 +488,72 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1DescribeServicesRequest - */ -const se_DescribeServicesRequest = (input: DescribeServicesRequest, context: __SerdeContext): any => { - return { - ...(input.FormatVersion != null && { FormatVersion: input.FormatVersion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_DescribeServicesRequest omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Field != null && { Field: input.Field }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1GetAttributeValuesRequest - */ -const se_GetAttributeValuesRequest = (input: GetAttributeValuesRequest, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_GetAttributeValuesRequest omitted. -/** - * serializeAws_json1_1GetPriceListFileUrlRequest - */ -const se_GetPriceListFileUrlRequest = (input: GetPriceListFileUrlRequest, context: __SerdeContext): any => { - return { - ...(input.FileFormat != null && { FileFormat: input.FileFormat }), - ...(input.PriceListArn != null && { PriceListArn: input.PriceListArn }), - }; -}; +// se_GetPriceListFileUrlRequest omitted. -/** - * serializeAws_json1_1GetProductsRequest - */ -const se_GetProductsRequest = (input: GetProductsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.FormatVersion != null && { FormatVersion: input.FormatVersion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_GetProductsRequest omitted. /** * serializeAws_json1_1ListPriceListsRequest */ const se_ListPriceListsRequest = (input: ListPriceListsRequest, context: __SerdeContext): any => { - return { - ...(input.CurrencyCode != null && { CurrencyCode: input.CurrencyCode }), - ...(input.EffectiveDate != null && { EffectiveDate: Math.round(input.EffectiveDate.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RegionCode != null && { RegionCode: input.RegionCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; + return take(input, { + CurrencyCode: [], + EffectiveDate: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + RegionCode: [], + ServiceCode: [], + }); }; -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AttributeNameList - */ -const de_AttributeNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AttributeNameList omitted. -/** - * deserializeAws_json1_1AttributeValue - */ -const de_AttributeValue = (output: any, context: __SerdeContext): AttributeValue => { - return { - Value: __expectString(output.Value), - } as any; -}; +// de_AttributeValue omitted. -/** - * deserializeAws_json1_1AttributeValueList - */ -const de_AttributeValueList = (output: any, context: __SerdeContext): AttributeValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttributeValue(entry, context); - }); - return retVal; -}; +// de_AttributeValueList omitted. -/** - * deserializeAws_json1_1DescribeServicesResponse - */ -const de_DescribeServicesResponse = (output: any, context: __SerdeContext): DescribeServicesResponse => { - return { - FormatVersion: __expectString(output.FormatVersion), - NextToken: __expectString(output.NextToken), - Services: output.Services != null ? de_ServiceList(output.Services, context) : undefined, - } as any; -}; +// de_DescribeServicesResponse omitted. -/** - * deserializeAws_json1_1ExpiredNextTokenException - */ -const de_ExpiredNextTokenException = (output: any, context: __SerdeContext): ExpiredNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ExpiredNextTokenException omitted. -/** - * deserializeAws_json1_1FileFormats - */ -const de_FileFormats = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FileFormats omitted. -/** - * deserializeAws_json1_1GetAttributeValuesResponse - */ -const de_GetAttributeValuesResponse = (output: any, context: __SerdeContext): GetAttributeValuesResponse => { - return { - AttributeValues: - output.AttributeValues != null ? de_AttributeValueList(output.AttributeValues, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_GetAttributeValuesResponse omitted. -/** - * deserializeAws_json1_1GetPriceListFileUrlResponse - */ -const de_GetPriceListFileUrlResponse = (output: any, context: __SerdeContext): GetPriceListFileUrlResponse => { - return { - Url: __expectString(output.Url), - } as any; -}; +// de_GetPriceListFileUrlResponse omitted. /** * deserializeAws_json1_1GetProductsResponse */ const de_GetProductsResponse = (output: any, context: __SerdeContext): GetProductsResponse => { - return { - FormatVersion: __expectString(output.FormatVersion), - NextToken: __expectString(output.NextToken), - PriceList: output.PriceList != null ? de_PriceListJsonItems(output.PriceList, context) : undefined, - } as any; + return take(output, { + FormatVersion: __expectString, + NextToken: __expectString, + PriceList: (_: any) => de_PriceListJsonItems(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalErrorException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1ListPriceListsResponse - */ -const de_ListPriceListsResponse = (output: any, context: __SerdeContext): ListPriceListsResponse => { - return { - NextToken: __expectString(output.NextToken), - PriceLists: output.PriceLists != null ? de_PriceLists(output.PriceLists, context) : undefined, - } as any; -}; +// de_ListPriceListsResponse omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotFoundException omitted. -/** - * deserializeAws_json1_1PriceList - */ -const de_PriceList = (output: any, context: __SerdeContext): PriceList => { - return { - CurrencyCode: __expectString(output.CurrencyCode), - FileFormats: output.FileFormats != null ? de_FileFormats(output.FileFormats, context) : undefined, - PriceListArn: __expectString(output.PriceListArn), - RegionCode: __expectString(output.RegionCode), - } as any; -}; +// de_PriceList omitted. /** * deserializeAws_json1_1PriceListJsonItems @@ -760,53 +562,16 @@ const de_PriceListJsonItems = (output: any, context: __SerdeContext): (__LazyJso const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return new __LazyJsonString(entry); }); return retVal; }; -/** - * deserializeAws_json1_1PriceLists - */ -const de_PriceLists = (output: any, context: __SerdeContext): PriceList[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PriceList(entry, context); - }); - return retVal; -}; +// de_PriceLists omitted. -/** - * deserializeAws_json1_1Service - */ -const de_Service = (output: any, context: __SerdeContext): Service => { - return { - AttributeNames: output.AttributeNames != null ? de_AttributeNameList(output.AttributeNames, context) : undefined, - ServiceCode: __expectString(output.ServiceCode), - } as any; -}; +// de_Service omitted. -/** - * deserializeAws_json1_1ServiceList - */ -const de_ServiceList = (output: any, context: __SerdeContext): Service[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Service(entry, context); - }); - return retVal; -}; +// de_ServiceList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -828,6 +593,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-privatenetworks/src/protocols/Aws_restJson1.ts b/clients/client-privatenetworks/src/protocols/Aws_restJson1.ts index 8b1432ed38a3..f9cdd28d720d 100644 --- a/clients/client-privatenetworks/src/protocols/Aws_restJson1.ts +++ b/clients/client-privatenetworks/src/protocols/Aws_restJson1.ts @@ -1,19 +1,20 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -84,27 +85,19 @@ import { AccessDeniedException, Address, DeviceIdentifier, - DeviceIdentifierFilterKeys, InternalServerException, LimitExceededException, NameValuePair, Network, - NetworkFilterKeys, NetworkResource, NetworkResourceDefinition, - NetworkResourceFilterKeys, NetworkSite, - NetworkSiteFilterKeys, Order, - OrderFilterKeys, Position, ResourceNotFoundException, - ReturnInformation, SitePlan, ThrottlingException, - TrackingInformation, ValidationException, - ValidationExceptionField, } from "../models/models_0"; import { PrivateNetworksServiceException as __BaseException } from "../models/PrivateNetworksServiceException"; @@ -121,9 +114,11 @@ export const se_AcknowledgeOrderReceiptCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/orders/acknowledge"; let body: any; - body = JSON.stringify({ - ...(input.orderArn != null && { orderArn: input.orderArn }), - }); + body = JSON.stringify( + take(input, { + orderArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -149,10 +144,12 @@ export const se_ActivateDeviceIdentifierCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/device-identifiers/activate"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.deviceIdentifierArn != null && { deviceIdentifierArn: input.deviceIdentifierArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + deviceIdentifierArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -178,11 +175,13 @@ export const se_ActivateNetworkSiteCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-sites/activate"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.networkSiteArn != null && { networkSiteArn: input.networkSiteArn }), - ...(input.shippingAddress != null && { shippingAddress: se_Address(input.shippingAddress, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + networkSiteArn: [], + shippingAddress: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -208,14 +207,16 @@ export const se_ConfigureAccessPointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-resources/configure"; let body: any; - body = JSON.stringify({ - ...(input.accessPointArn != null && { accessPointArn: input.accessPointArn }), - ...(input.cpiSecretKey != null && { cpiSecretKey: input.cpiSecretKey }), - ...(input.cpiUserId != null && { cpiUserId: input.cpiUserId }), - ...(input.cpiUserPassword != null && { cpiUserPassword: input.cpiUserPassword }), - ...(input.cpiUsername != null && { cpiUsername: input.cpiUsername }), - ...(input.position != null && { position: se_Position(input.position, context) }), - }); + body = JSON.stringify( + take(input, { + accessPointArn: [], + cpiSecretKey: [], + cpiUserId: [], + cpiUserPassword: [], + cpiUsername: [], + position: (_) => se_Position(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -240,12 +241,14 @@ export const se_CreateNetworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/networks"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.description != null && { description: input.description }), - ...(input.networkName != null && { networkName: input.networkName }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + description: [], + networkName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -270,16 +273,18 @@ export const se_CreateNetworkSiteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-sites"; let body: any; - body = JSON.stringify({ - ...(input.availabilityZone != null && { availabilityZone: input.availabilityZone }), - ...(input.availabilityZoneId != null && { availabilityZoneId: input.availabilityZoneId }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.description != null && { description: input.description }), - ...(input.networkArn != null && { networkArn: input.networkArn }), - ...(input.networkSiteName != null && { networkSiteName: input.networkSiteName }), - ...(input.pendingPlan != null && { pendingPlan: se_SitePlan(input.pendingPlan, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + availabilityZone: [], + availabilityZoneId: [], + clientToken: [], + description: [], + networkArn: [], + networkSiteName: [], + pendingPlan: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -305,10 +310,12 @@ export const se_DeactivateDeviceIdentifierCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/device-identifiers/deactivate"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.deviceIdentifierArn != null && { deviceIdentifierArn: input.deviceIdentifierArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + deviceIdentifierArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -539,12 +546,14 @@ export const se_ListDeviceIdentifiersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/device-identifiers/list"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_DeviceIdentifierFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.networkArn != null && { networkArn: input.networkArn }), - ...(input.startToken != null && { startToken: input.startToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + networkArn: [], + startToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -569,12 +578,14 @@ export const se_ListNetworkResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-resources"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_NetworkResourceFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.networkArn != null && { networkArn: input.networkArn }), - ...(input.startToken != null && { startToken: input.startToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + networkArn: [], + startToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -599,11 +610,13 @@ export const se_ListNetworksCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/networks/list"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_NetworkFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.startToken != null && { startToken: input.startToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + startToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -628,12 +641,14 @@ export const se_ListNetworkSitesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-sites/list"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_NetworkSiteFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.networkArn != null && { networkArn: input.networkArn }), - ...(input.startToken != null && { startToken: input.startToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + networkArn: [], + startToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -658,12 +673,14 @@ export const se_ListOrdersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/orders/list"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_OrderFilters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.networkArn != null && { networkArn: input.networkArn }), - ...(input.startToken != null && { startToken: input.startToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + networkArn: [], + startToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -734,12 +751,14 @@ export const se_StartNetworkResourceUpdateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-resources/update"; let body: any; - body = JSON.stringify({ - ...(input.networkResourceArn != null && { networkResourceArn: input.networkResourceArn }), - ...(input.returnReason != null && { returnReason: input.returnReason }), - ...(input.shippingAddress != null && { shippingAddress: se_Address(input.shippingAddress, context) }), - ...(input.updateType != null && { updateType: input.updateType }), - }); + body = JSON.stringify( + take(input, { + networkResourceArn: [], + returnReason: [], + shippingAddress: (_) => _json(_), + updateType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -765,9 +784,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -822,11 +843,13 @@ export const se_UpdateNetworkSiteCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-sites/site"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.description != null && { description: input.description }), - ...(input.networkSiteArn != null && { networkSiteArn: input.networkSiteArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + description: [], + networkSiteArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -851,11 +874,13 @@ export const se_UpdateNetworkSitePlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/network-sites/plan"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.networkSiteArn != null && { networkSiteArn: input.networkSiteArn }), - ...(input.pendingPlan != null && { pendingPlan: se_SitePlan(input.pendingPlan, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + networkSiteArn: [], + pendingPlan: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -881,9 +906,10 @@ export const de_AcknowledgeOrderReceiptCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.order != null) { - contents.order = de_Order(data.order, context); - } + const doc = take(data, { + order: (_) => de_Order(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -911,10 +937,9 @@ const de_AcknowledgeOrderReceiptCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -934,12 +959,11 @@ export const de_ActivateDeviceIdentifierCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceIdentifier != null) { - contents.deviceIdentifier = de_DeviceIdentifier(data.deviceIdentifier, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + deviceIdentifier: (_) => de_DeviceIdentifier(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -967,10 +991,9 @@ const de_ActivateDeviceIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -990,9 +1013,10 @@ export const de_ActivateNetworkSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSite != null) { - contents.networkSite = de_NetworkSite(data.networkSite, context); - } + const doc = take(data, { + networkSite: (_) => de_NetworkSite(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1020,10 +1044,9 @@ const de_ActivateNetworkSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1043,9 +1066,10 @@ export const de_ConfigureAccessPointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessPoint != null) { - contents.accessPoint = de_NetworkResource(data.accessPoint, context); - } + const doc = take(data, { + accessPoint: (_) => de_NetworkResource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1073,10 +1097,9 @@ const de_ConfigureAccessPointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,12 +1119,11 @@ export const de_CreateNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.network != null) { - contents.network = de_Network(data.network, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + network: (_) => de_Network(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1129,10 +1151,9 @@ const de_CreateNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1152,12 +1173,11 @@ export const de_CreateNetworkSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSite != null) { - contents.networkSite = de_NetworkSite(data.networkSite, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + networkSite: (_) => de_NetworkSite(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1185,10 +1205,9 @@ const de_CreateNetworkSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1208,9 +1227,10 @@ export const de_DeactivateDeviceIdentifierCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceIdentifier != null) { - contents.deviceIdentifier = de_DeviceIdentifier(data.deviceIdentifier, context); - } + const doc = take(data, { + deviceIdentifier: (_) => de_DeviceIdentifier(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1238,10 +1258,9 @@ const de_DeactivateDeviceIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1261,9 +1280,10 @@ export const de_DeleteNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.network != null) { - contents.network = de_Network(data.network, context); - } + const doc = take(data, { + network: (_) => de_Network(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1294,10 +1314,9 @@ const de_DeleteNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1317,9 +1336,10 @@ export const de_DeleteNetworkSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSite != null) { - contents.networkSite = de_NetworkSite(data.networkSite, context); - } + const doc = take(data, { + networkSite: (_) => de_NetworkSite(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1350,10 +1370,9 @@ const de_DeleteNetworkSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1373,12 +1392,11 @@ export const de_GetDeviceIdentifierCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceIdentifier != null) { - contents.deviceIdentifier = de_DeviceIdentifier(data.deviceIdentifier, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + deviceIdentifier: (_) => de_DeviceIdentifier(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1406,10 +1424,9 @@ const de_GetDeviceIdentifierCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1429,12 +1446,11 @@ export const de_GetNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.network != null) { - contents.network = de_Network(data.network, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + network: (_) => de_Network(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1462,10 +1478,9 @@ const de_GetNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1485,12 +1500,11 @@ export const de_GetNetworkResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkResource != null) { - contents.networkResource = de_NetworkResource(data.networkResource, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + networkResource: (_) => de_NetworkResource(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1518,10 +1532,9 @@ const de_GetNetworkResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1541,12 +1554,11 @@ export const de_GetNetworkSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSite != null) { - contents.networkSite = de_NetworkSite(data.networkSite, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + networkSite: (_) => de_NetworkSite(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1574,10 +1586,9 @@ const de_GetNetworkSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1597,12 +1608,11 @@ export const de_GetOrderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.order != null) { - contents.order = de_Order(data.order, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + order: (_) => de_Order(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1630,10 +1640,9 @@ const de_GetOrderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1653,12 +1662,11 @@ export const de_ListDeviceIdentifiersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceIdentifiers != null) { - contents.deviceIdentifiers = de_DeviceIdentifierList(data.deviceIdentifiers, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + deviceIdentifiers: (_) => de_DeviceIdentifierList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1686,10 +1694,9 @@ const de_ListDeviceIdentifiersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1709,12 +1716,11 @@ export const de_ListNetworkResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkResources != null) { - contents.networkResources = de_NetworkResourceList(data.networkResources, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networkResources: (_) => de_NetworkResourceList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1742,10 +1748,9 @@ const de_ListNetworkResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1765,12 +1770,11 @@ export const de_ListNetworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networks != null) { - contents.networks = de_NetworkList(data.networks, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networks: (_) => de_NetworkList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1798,10 +1802,9 @@ const de_ListNetworksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1821,12 +1824,11 @@ export const de_ListNetworkSitesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSites != null) { - contents.networkSites = de_NetworkSiteList(data.networkSites, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networkSites: (_) => de_NetworkSiteList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1854,10 +1856,9 @@ const de_ListNetworkSitesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1877,12 +1878,11 @@ export const de_ListOrdersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.orders != null) { - contents.orders = de_OrderList(data.orders, context); - } + const doc = take(data, { + nextToken: __expectString, + orders: (_) => de_OrderList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1910,10 +1910,9 @@ const de_ListOrdersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1933,9 +1932,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1969,10 +1969,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1989,9 +1988,10 @@ export const de_PingCommand = async (output: __HttpResponse, context: __SerdeCon $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2010,10 +2010,9 @@ const de_PingCommandError = async (output: __HttpResponse, context: __SerdeConte throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2033,9 +2032,10 @@ export const de_StartNetworkResourceUpdateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkResource != null) { - contents.networkResource = de_NetworkResource(data.networkResource, context); - } + const doc = take(data, { + networkResource: (_) => de_NetworkResource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2063,10 +2063,9 @@ const de_StartNetworkResourceUpdateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2119,10 +2118,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2175,10 +2173,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2198,12 +2195,11 @@ export const de_UpdateNetworkSiteCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSite != null) { - contents.networkSite = de_NetworkSite(data.networkSite, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + networkSite: (_) => de_NetworkSite(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2231,10 +2227,9 @@ const de_UpdateNetworkSiteCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2254,12 +2249,11 @@ export const de_UpdateNetworkSitePlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSite != null) { - contents.networkSite = de_NetworkSite(data.networkSite, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + networkSite: (_) => de_NetworkSite(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2287,16 +2281,15 @@ const de_UpdateNetworkSitePlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2306,9 +2299,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2330,9 +2324,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2349,9 +2344,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2368,15 +2364,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2390,9 +2383,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2406,15 +2400,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2422,268 +2413,70 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Address - */ -const se_Address = (input: Address, context: __SerdeContext): any => { - return { - ...(input.city != null && { city: input.city }), - ...(input.company != null && { company: input.company }), - ...(input.country != null && { country: input.country }), - ...(input.name != null && { name: input.name }), - ...(input.phoneNumber != null && { phoneNumber: input.phoneNumber }), - ...(input.postalCode != null && { postalCode: input.postalCode }), - ...(input.stateOrProvince != null && { stateOrProvince: input.stateOrProvince }), - ...(input.street1 != null && { street1: input.street1 }), - ...(input.street2 != null && { street2: input.street2 }), - ...(input.street3 != null && { street3: input.street3 }), - }; -}; +// se_Address omitted. -/** - * serializeAws_restJson1DeviceIdentifierFilters - */ -const se_DeviceIdentifierFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [DeviceIdentifierFilterKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_DeviceIdentifierFilterValues(value, context); - return acc; - }, - {} - ); -}; +// se_DeviceIdentifierFilters omitted. -/** - * serializeAws_restJson1DeviceIdentifierFilterValues - */ -const se_DeviceIdentifierFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceIdentifierFilterValues omitted. -/** - * serializeAws_restJson1NameValuePair - */ -const se_NameValuePair = (input: NameValuePair, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_NameValuePair omitted. -/** - * serializeAws_restJson1NetworkFilters - */ -const se_NetworkFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [NetworkFilterKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_NetworkFilterValues(value, context); - return acc; - }, {}); -}; +// se_NetworkFilters omitted. -/** - * serializeAws_restJson1NetworkFilterValues - */ -const se_NetworkFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NetworkFilterValues omitted. -/** - * serializeAws_restJson1NetworkResourceDefinition - */ -const se_NetworkResourceDefinition = (input: NetworkResourceDefinition, context: __SerdeContext): any => { - return { - ...(input.count != null && { count: input.count }), - ...(input.options != null && { options: se_Options(input.options, context) }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_NetworkResourceDefinition omitted. -/** - * serializeAws_restJson1NetworkResourceDefinitions - */ -const se_NetworkResourceDefinitions = (input: NetworkResourceDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NetworkResourceDefinition(entry, context); - }); -}; +// se_NetworkResourceDefinitions omitted. -/** - * serializeAws_restJson1NetworkResourceFilters - */ -const se_NetworkResourceFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [NetworkResourceFilterKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_NetworkResourceFilterValues(value, context); - return acc; - }, - {} - ); -}; +// se_NetworkResourceFilters omitted. -/** - * serializeAws_restJson1NetworkResourceFilterValues - */ -const se_NetworkResourceFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NetworkResourceFilterValues omitted. -/** - * serializeAws_restJson1NetworkSiteFilters - */ -const se_NetworkSiteFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [NetworkSiteFilterKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_NetworkSiteFilterValues(value, context); - return acc; - }, - {} - ); -}; +// se_NetworkSiteFilters omitted. -/** - * serializeAws_restJson1NetworkSiteFilterValues - */ -const se_NetworkSiteFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NetworkSiteFilterValues omitted. -/** - * serializeAws_restJson1Options - */ -const se_Options = (input: NameValuePair[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NameValuePair(entry, context); - }); -}; +// se_Options omitted. -/** - * serializeAws_restJson1OrderFilters - */ -const se_OrderFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [OrderFilterKeys | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_OrderFilterValues(value, context); - return acc; - }, {}); -}; +// se_OrderFilters omitted. -/** - * serializeAws_restJson1OrderFilterValues - */ -const se_OrderFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OrderFilterValues omitted. /** * serializeAws_restJson1Position */ const se_Position = (input: Position, context: __SerdeContext): any => { - return { - ...(input.elevation != null && { elevation: __serializeFloat(input.elevation) }), - ...(input.elevationReference != null && { elevationReference: input.elevationReference }), - ...(input.elevationUnit != null && { elevationUnit: input.elevationUnit }), - ...(input.latitude != null && { latitude: __serializeFloat(input.latitude) }), - ...(input.longitude != null && { longitude: __serializeFloat(input.longitude) }), - }; + return take(input, { + elevation: __serializeFloat, + elevationReference: [], + elevationUnit: [], + latitude: __serializeFloat, + longitude: __serializeFloat, + }); }; -/** - * serializeAws_restJson1SitePlan - */ -const se_SitePlan = (input: SitePlan, context: __SerdeContext): any => { - return { - ...(input.options != null && { options: se_Options(input.options, context) }), - ...(input.resourceDefinitions != null && { - resourceDefinitions: se_NetworkResourceDefinitions(input.resourceDefinitions, context), - }), - }; -}; +// se_SitePlan omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - city: __expectString(output.city), - company: __expectString(output.company), - country: __expectString(output.country), - name: __expectString(output.name), - phoneNumber: __expectString(output.phoneNumber), - postalCode: __expectString(output.postalCode), - stateOrProvince: __expectString(output.stateOrProvince), - street1: __expectString(output.street1), - street2: __expectString(output.street2), - street3: __expectString(output.street3), - } as any; -}; +// de_Address omitted. /** * deserializeAws_restJson1DeviceIdentifier */ const de_DeviceIdentifier = (output: any, context: __SerdeContext): DeviceIdentifier => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - deviceIdentifierArn: __expectString(output.deviceIdentifierArn), - iccid: __expectString(output.iccid), - imsi: __expectString(output.imsi), - networkArn: __expectString(output.networkArn), - orderArn: __expectString(output.orderArn), - status: __expectString(output.status), - trafficGroupArn: __expectString(output.trafficGroupArn), - vendor: __expectString(output.vendor), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + deviceIdentifierArn: __expectString, + iccid: __expectString, + imsi: __expectString, + networkArn: __expectString, + orderArn: __expectString, + status: __expectString, + trafficGroupArn: __expectString, + vendor: __expectString, + }) as any; }; /** @@ -2693,52 +2486,27 @@ const de_DeviceIdentifierList = (output: any, context: __SerdeContext): DeviceId const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeviceIdentifier(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NameValuePair - */ -const de_NameValuePair = (output: any, context: __SerdeContext): NameValuePair => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_NameValuePair omitted. -/** - * deserializeAws_restJson1NameValuePairs - */ -const de_NameValuePairs = (output: any, context: __SerdeContext): NameValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NameValuePair(entry, context); - }); - return retVal; -}; +// de_NameValuePairs omitted. /** * deserializeAws_restJson1Network */ const de_Network = (output: any, context: __SerdeContext): Network => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - description: __expectString(output.description), - networkArn: __expectString(output.networkArn), - networkName: __expectString(output.networkName), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + networkArn: __expectString, + networkName: __expectString, + status: __expectString, + statusReason: __expectString, + }) as any; }; /** @@ -2748,9 +2516,6 @@ const de_NetworkList = (output: any, context: __SerdeContext): Network[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Network(entry, context); }); return retVal; @@ -2760,53 +2525,29 @@ const de_NetworkList = (output: any, context: __SerdeContext): Network[] => { * deserializeAws_restJson1NetworkResource */ const de_NetworkResource = (output: any, context: __SerdeContext): NetworkResource => { - return { - attributes: output.attributes != null ? de_NameValuePairs(output.attributes, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - description: __expectString(output.description), - health: __expectString(output.health), - model: __expectString(output.model), - networkArn: __expectString(output.networkArn), - networkResourceArn: __expectString(output.networkResourceArn), - networkSiteArn: __expectString(output.networkSiteArn), - orderArn: __expectString(output.orderArn), - position: output.position != null ? de_Position(output.position, context) : undefined, - returnInformation: - output.returnInformation != null ? de_ReturnInformation(output.returnInformation, context) : undefined, - serialNumber: __expectString(output.serialNumber), - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - type: __expectString(output.type), - vendor: __expectString(output.vendor), - } as any; -}; - -/** - * deserializeAws_restJson1NetworkResourceDefinition - */ -const de_NetworkResourceDefinition = (output: any, context: __SerdeContext): NetworkResourceDefinition => { - return { - count: __expectInt32(output.count), - options: output.options != null ? de_Options(output.options, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1NetworkResourceDefinitions - */ -const de_NetworkResourceDefinitions = (output: any, context: __SerdeContext): NetworkResourceDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkResourceDefinition(entry, context); - }); - return retVal; -}; + return take(output, { + attributes: _json, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + health: __expectString, + model: __expectString, + networkArn: __expectString, + networkResourceArn: __expectString, + networkSiteArn: __expectString, + orderArn: __expectString, + position: (_: any) => de_Position(_, context), + returnInformation: _json, + serialNumber: __expectString, + status: __expectString, + statusReason: __expectString, + type: __expectString, + vendor: __expectString, + }) as any; +}; + +// de_NetworkResourceDefinition omitted. + +// de_NetworkResourceDefinitions omitted. /** * deserializeAws_restJson1NetworkResourceList @@ -2815,9 +2556,6 @@ const de_NetworkResourceList = (output: any, context: __SerdeContext): NetworkRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NetworkResource(entry, context); }); return retVal; @@ -2827,20 +2565,19 @@ const de_NetworkResourceList = (output: any, context: __SerdeContext): NetworkRe * deserializeAws_restJson1NetworkSite */ const de_NetworkSite = (output: any, context: __SerdeContext): NetworkSite => { - return { - availabilityZone: __expectString(output.availabilityZone), - availabilityZoneId: __expectString(output.availabilityZoneId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - currentPlan: output.currentPlan != null ? de_SitePlan(output.currentPlan, context) : undefined, - description: __expectString(output.description), - networkArn: __expectString(output.networkArn), - networkSiteArn: __expectString(output.networkSiteArn), - networkSiteName: __expectString(output.networkSiteName), - pendingPlan: output.pendingPlan != null ? de_SitePlan(output.pendingPlan, context) : undefined, - status: __expectString(output.status), - statusReason: __expectString(output.statusReason), - } as any; + return take(output, { + availabilityZone: __expectString, + availabilityZoneId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + currentPlan: _json, + description: __expectString, + networkArn: __expectString, + networkSiteArn: __expectString, + networkSiteName: __expectString, + pendingPlan: _json, + status: __expectString, + statusReason: __expectString, + }) as any; }; /** @@ -2850,44 +2587,26 @@ const de_NetworkSiteList = (output: any, context: __SerdeContext): NetworkSite[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NetworkSite(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Options - */ -const de_Options = (output: any, context: __SerdeContext): NameValuePair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NameValuePair(entry, context); - }); - return retVal; -}; +// de_Options omitted. /** * deserializeAws_restJson1Order */ const de_Order = (output: any, context: __SerdeContext): Order => { - return { - acknowledgmentStatus: __expectString(output.acknowledgmentStatus), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - networkArn: __expectString(output.networkArn), - networkSiteArn: __expectString(output.networkSiteArn), - orderArn: __expectString(output.orderArn), - shippingAddress: output.shippingAddress != null ? de_Address(output.shippingAddress, context) : undefined, - trackingInformation: - output.trackingInformation != null ? de_TrackingInformationList(output.trackingInformation, context) : undefined, - } as any; + return take(output, { + acknowledgmentStatus: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + networkArn: __expectString, + networkSiteArn: __expectString, + orderArn: __expectString, + shippingAddress: _json, + trackingInformation: _json, + }) as any; }; /** @@ -2897,9 +2616,6 @@ const de_OrderList = (output: any, context: __SerdeContext): Order[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Order(entry, context); }); return retVal; @@ -2909,101 +2625,28 @@ const de_OrderList = (output: any, context: __SerdeContext): Order[] => { * deserializeAws_restJson1Position */ const de_Position = (output: any, context: __SerdeContext): Position => { - return { - elevation: __limitedParseDouble(output.elevation), - elevationReference: __expectString(output.elevationReference), - elevationUnit: __expectString(output.elevationUnit), - latitude: __limitedParseDouble(output.latitude), - longitude: __limitedParseDouble(output.longitude), - } as any; + return take(output, { + elevation: __limitedParseDouble, + elevationReference: __expectString, + elevationUnit: __expectString, + latitude: __limitedParseDouble, + longitude: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1ReturnInformation - */ -const de_ReturnInformation = (output: any, context: __SerdeContext): ReturnInformation => { - return { - replacementOrderArn: __expectString(output.replacementOrderArn), - returnReason: __expectString(output.returnReason), - shippingAddress: output.shippingAddress != null ? de_Address(output.shippingAddress, context) : undefined, - shippingLabel: __expectString(output.shippingLabel), - } as any; -}; +// de_ReturnInformation omitted. -/** - * deserializeAws_restJson1SitePlan - */ -const de_SitePlan = (output: any, context: __SerdeContext): SitePlan => { - return { - options: output.options != null ? de_Options(output.options, context) : undefined, - resourceDefinitions: - output.resourceDefinitions != null - ? de_NetworkResourceDefinitions(output.resourceDefinitions, context) - : undefined, - } as any; -}; +// de_SitePlan omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TrackingInformation - */ -const de_TrackingInformation = (output: any, context: __SerdeContext): TrackingInformation => { - return { - trackingNumber: __expectString(output.trackingNumber), - } as any; -}; +// de_TrackingInformation omitted. -/** - * deserializeAws_restJson1TrackingInformationList - */ -const de_TrackingInformationList = (output: any, context: __SerdeContext): TrackingInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrackingInformation(entry, context); - }); - return retVal; -}; +// de_TrackingInformationList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-proton/src/protocols/Aws_json1_0.ts b/clients/client-proton/src/protocols/Aws_json1_0.ts index a60af9282e4b..912d2f9b544a 100644 --- a/clients/client-proton/src/protocols/Aws_json1_0.ts +++ b/clients/client-proton/src/protocols/Aws_json1_0.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -285,7 +286,6 @@ import { AcceptEnvironmentAccountConnectionInput, AcceptEnvironmentAccountConnectionOutput, AccessDeniedException, - AccountSettings, CancelComponentDeploymentInput, CancelComponentDeploymentOutput, CancelEnvironmentDeploymentInput, @@ -294,12 +294,10 @@ import { CancelServiceInstanceDeploymentOutput, CancelServicePipelineDeploymentInput, CancelServicePipelineDeploymentOutput, - CompatibleEnvironmentTemplate, CompatibleEnvironmentTemplateInput, Component, ComponentSummary, ConflictException, - CountsSummary, CreateComponentInput, CreateComponentOutput, CreateEnvironmentAccountConnectionInput, @@ -311,19 +309,16 @@ import { CreateEnvironmentTemplateVersionInput, CreateEnvironmentTemplateVersionOutput, CreateRepositoryInput, - CreateRepositoryOutput, CreateServiceInput, CreateServiceInstanceInput, CreateServiceInstanceOutput, CreateServiceOutput, CreateServiceSyncConfigInput, - CreateServiceSyncConfigOutput, CreateServiceTemplateInput, CreateServiceTemplateOutput, CreateServiceTemplateVersionInput, CreateServiceTemplateVersionOutput, CreateTemplateSyncConfigInput, - CreateTemplateSyncConfigOutput, DeleteComponentInput, DeleteComponentOutput, DeleteEnvironmentAccountConnectionInput, @@ -335,17 +330,14 @@ import { DeleteEnvironmentTemplateVersionInput, DeleteEnvironmentTemplateVersionOutput, DeleteRepositoryInput, - DeleteRepositoryOutput, DeleteServiceInput, DeleteServiceOutput, DeleteServiceSyncConfigInput, - DeleteServiceSyncConfigOutput, DeleteServiceTemplateInput, DeleteServiceTemplateOutput, DeleteServiceTemplateVersionInput, DeleteServiceTemplateVersionOutput, DeleteTemplateSyncConfigInput, - DeleteTemplateSyncConfigOutput, Environment, EnvironmentAccountConnection, EnvironmentAccountConnectionStatus, @@ -357,7 +349,6 @@ import { EnvironmentTemplateVersion, EnvironmentTemplateVersionSummary, GetAccountSettingsInput, - GetAccountSettingsOutput, GetComponentInput, GetComponentOutput, GetEnvironmentAccountConnectionInput, @@ -369,11 +360,9 @@ import { GetEnvironmentTemplateVersionInput, GetEnvironmentTemplateVersionOutput, GetRepositoryInput, - GetRepositoryOutput, GetRepositorySyncStatusInput, GetRepositorySyncStatusOutput, GetResourcesSummaryInput, - GetResourcesSummaryOutput, GetServiceInput, GetServiceInstanceInput, GetServiceInstanceOutput, @@ -383,28 +372,22 @@ import { GetServiceSyncBlockerSummaryInput, GetServiceSyncBlockerSummaryOutput, GetServiceSyncConfigInput, - GetServiceSyncConfigOutput, GetServiceTemplateInput, GetServiceTemplateOutput, GetServiceTemplateVersionInput, GetServiceTemplateVersionOutput, GetTemplateSyncConfigInput, - GetTemplateSyncConfigOutput, GetTemplateSyncStatusInput, GetTemplateSyncStatusOutput, InternalServerException, ListComponentOutputsInput, - ListComponentOutputsOutput, ListComponentProvisionedResourcesInput, - ListComponentProvisionedResourcesOutput, ListComponentsInput, ListComponentsOutput, ListEnvironmentAccountConnectionsInput, ListEnvironmentAccountConnectionsOutput, ListEnvironmentOutputsInput, - ListEnvironmentOutputsOutput, ListEnvironmentProvisionedResourcesInput, - ListEnvironmentProvisionedResourcesOutput, ListEnvironmentsInput, ListEnvironmentsOutput, ListEnvironmentTemplatesInput, @@ -412,20 +395,14 @@ import { ListEnvironmentTemplateVersionsInput, ListEnvironmentTemplateVersionsOutput, ListRepositoriesInput, - ListRepositoriesOutput, ListRepositorySyncDefinitionsInput, - ListRepositorySyncDefinitionsOutput, ListServiceInstanceOutputsInput, - ListServiceInstanceOutputsOutput, ListServiceInstanceProvisionedResourcesInput, - ListServiceInstanceProvisionedResourcesOutput, ListServiceInstancesFilter, ListServiceInstancesInput, ListServiceInstancesOutput, ListServicePipelineOutputsInput, - ListServicePipelineOutputsOutput, ListServicePipelineProvisionedResourcesInput, - ListServicePipelineProvisionedResourcesOutput, ListServicesInput, ListServicesOutput, ListServiceTemplatesInput, @@ -433,25 +410,16 @@ import { ListServiceTemplateVersionsInput, ListServiceTemplateVersionsOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, NotifyResourceDeploymentStatusChangeInput, - NotifyResourceDeploymentStatusChangeOutput, Output, - ProvisionedResource, RejectEnvironmentAccountConnectionInput, RejectEnvironmentAccountConnectionOutput, - Repository, - RepositoryBranch, RepositoryBranchInput, - RepositorySummary, RepositorySyncAttempt, - RepositorySyncDefinition, RepositorySyncEvent, - ResourceCountsSummary, ResourceNotFoundException, ResourceSyncAttempt, ResourceSyncEvent, - Revision, S3ObjectSource, Service, ServiceInstance, @@ -460,24 +428,18 @@ import { ServiceQuotaExceededException, ServiceSummary, ServiceSyncBlockerSummary, - ServiceSyncConfig, ServiceTemplate, ServiceTemplateSummary, ServiceTemplateSupportedComponentSourceType, ServiceTemplateVersion, ServiceTemplateVersionSummary, SyncBlocker, - SyncBlockerContext, Tag, TagResourceInput, - TagResourceOutput, - TemplateSyncConfig, TemplateVersionSourceInput, ThrottlingException, UntagResourceInput, - UntagResourceOutput, UpdateAccountSettingsInput, - UpdateAccountSettingsOutput, UpdateComponentInput, UpdateComponentOutput, UpdateEnvironmentAccountConnectionInput, @@ -497,13 +459,11 @@ import { UpdateServiceSyncBlockerInput, UpdateServiceSyncBlockerOutput, UpdateServiceSyncConfigInput, - UpdateServiceSyncConfigOutput, UpdateServiceTemplateInput, UpdateServiceTemplateOutput, UpdateServiceTemplateVersionInput, UpdateServiceTemplateVersionOutput, UpdateTemplateSyncConfigInput, - UpdateTemplateSyncConfigOutput, ValidationException, } from "../models/models_0"; import { ProtonServiceException as __BaseException } from "../models/ProtonServiceException"; @@ -517,7 +477,7 @@ export const se_AcceptEnvironmentAccountConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptEnvironmentAccountConnection"); let body: any; - body = JSON.stringify(se_AcceptEnvironmentAccountConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -530,7 +490,7 @@ export const se_CancelComponentDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelComponentDeployment"); let body: any; - body = JSON.stringify(se_CancelComponentDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,7 +503,7 @@ export const se_CancelEnvironmentDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelEnvironmentDeployment"); let body: any; - body = JSON.stringify(se_CancelEnvironmentDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +516,7 @@ export const se_CancelServiceInstanceDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelServiceInstanceDeployment"); let body: any; - body = JSON.stringify(se_CancelServiceInstanceDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -569,7 +529,7 @@ export const se_CancelServicePipelineDeploymentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelServicePipelineDeployment"); let body: any; - body = JSON.stringify(se_CancelServicePipelineDeploymentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -621,7 +581,7 @@ export const se_CreateEnvironmentTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEnvironmentTemplate"); let body: any; - body = JSON.stringify(se_CreateEnvironmentTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -647,7 +607,7 @@ export const se_CreateRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRepository"); let body: any; - body = JSON.stringify(se_CreateRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -686,7 +646,7 @@ export const se_CreateServiceSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateServiceSyncConfig"); let body: any; - body = JSON.stringify(se_CreateServiceSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -699,7 +659,7 @@ export const se_CreateServiceTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateServiceTemplate"); let body: any; - body = JSON.stringify(se_CreateServiceTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -725,7 +685,7 @@ export const se_CreateTemplateSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTemplateSyncConfig"); let body: any; - body = JSON.stringify(se_CreateTemplateSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -738,7 +698,7 @@ export const se_DeleteComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteComponent"); let body: any; - body = JSON.stringify(se_DeleteComponentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -751,7 +711,7 @@ export const se_DeleteEnvironmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEnvironment"); let body: any; - body = JSON.stringify(se_DeleteEnvironmentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -764,7 +724,7 @@ export const se_DeleteEnvironmentAccountConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEnvironmentAccountConnection"); let body: any; - body = JSON.stringify(se_DeleteEnvironmentAccountConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -777,7 +737,7 @@ export const se_DeleteEnvironmentTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEnvironmentTemplate"); let body: any; - body = JSON.stringify(se_DeleteEnvironmentTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -790,7 +750,7 @@ export const se_DeleteEnvironmentTemplateVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEnvironmentTemplateVersion"); let body: any; - body = JSON.stringify(se_DeleteEnvironmentTemplateVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,7 +763,7 @@ export const se_DeleteRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRepository"); let body: any; - body = JSON.stringify(se_DeleteRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -816,7 +776,7 @@ export const se_DeleteServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteService"); let body: any; - body = JSON.stringify(se_DeleteServiceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -829,7 +789,7 @@ export const se_DeleteServiceSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServiceSyncConfig"); let body: any; - body = JSON.stringify(se_DeleteServiceSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -842,7 +802,7 @@ export const se_DeleteServiceTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServiceTemplate"); let body: any; - body = JSON.stringify(se_DeleteServiceTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -855,7 +815,7 @@ export const se_DeleteServiceTemplateVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServiceTemplateVersion"); let body: any; - body = JSON.stringify(se_DeleteServiceTemplateVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -868,7 +828,7 @@ export const se_DeleteTemplateSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTemplateSyncConfig"); let body: any; - body = JSON.stringify(se_DeleteTemplateSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -881,7 +841,7 @@ export const se_GetAccountSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccountSettings"); let body: any; - body = JSON.stringify(se_GetAccountSettingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -894,7 +854,7 @@ export const se_GetComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComponent"); let body: any; - body = JSON.stringify(se_GetComponentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -907,7 +867,7 @@ export const se_GetEnvironmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEnvironment"); let body: any; - body = JSON.stringify(se_GetEnvironmentInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -920,7 +880,7 @@ export const se_GetEnvironmentAccountConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEnvironmentAccountConnection"); let body: any; - body = JSON.stringify(se_GetEnvironmentAccountConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -933,7 +893,7 @@ export const se_GetEnvironmentTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEnvironmentTemplate"); let body: any; - body = JSON.stringify(se_GetEnvironmentTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -946,7 +906,7 @@ export const se_GetEnvironmentTemplateVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEnvironmentTemplateVersion"); let body: any; - body = JSON.stringify(se_GetEnvironmentTemplateVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -959,7 +919,7 @@ export const se_GetRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepository"); let body: any; - body = JSON.stringify(se_GetRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -972,7 +932,7 @@ export const se_GetRepositorySyncStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRepositorySyncStatus"); let body: any; - body = JSON.stringify(se_GetRepositorySyncStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -985,7 +945,7 @@ export const se_GetResourcesSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcesSummary"); let body: any; - body = JSON.stringify(se_GetResourcesSummaryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -998,7 +958,7 @@ export const se_GetServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetService"); let body: any; - body = JSON.stringify(se_GetServiceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1011,7 +971,7 @@ export const se_GetServiceInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceInstance"); let body: any; - body = JSON.stringify(se_GetServiceInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1024,7 +984,7 @@ export const se_GetServiceInstanceSyncStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceInstanceSyncStatus"); let body: any; - body = JSON.stringify(se_GetServiceInstanceSyncStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1037,7 +997,7 @@ export const se_GetServiceSyncBlockerSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceSyncBlockerSummary"); let body: any; - body = JSON.stringify(se_GetServiceSyncBlockerSummaryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1050,7 +1010,7 @@ export const se_GetServiceSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceSyncConfig"); let body: any; - body = JSON.stringify(se_GetServiceSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1063,7 +1023,7 @@ export const se_GetServiceTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceTemplate"); let body: any; - body = JSON.stringify(se_GetServiceTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1076,7 +1036,7 @@ export const se_GetServiceTemplateVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceTemplateVersion"); let body: any; - body = JSON.stringify(se_GetServiceTemplateVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1089,7 +1049,7 @@ export const se_GetTemplateSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTemplateSyncConfig"); let body: any; - body = JSON.stringify(se_GetTemplateSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1102,7 +1062,7 @@ export const se_GetTemplateSyncStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTemplateSyncStatus"); let body: any; - body = JSON.stringify(se_GetTemplateSyncStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1115,7 +1075,7 @@ export const se_ListComponentOutputsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComponentOutputs"); let body: any; - body = JSON.stringify(se_ListComponentOutputsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1128,7 +1088,7 @@ export const se_ListComponentProvisionedResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComponentProvisionedResources"); let body: any; - body = JSON.stringify(se_ListComponentProvisionedResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1141,7 +1101,7 @@ export const se_ListComponentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComponents"); let body: any; - body = JSON.stringify(se_ListComponentsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1154,7 +1114,7 @@ export const se_ListEnvironmentAccountConnectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironmentAccountConnections"); let body: any; - body = JSON.stringify(se_ListEnvironmentAccountConnectionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1167,7 +1127,7 @@ export const se_ListEnvironmentOutputsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironmentOutputs"); let body: any; - body = JSON.stringify(se_ListEnvironmentOutputsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1180,7 +1140,7 @@ export const se_ListEnvironmentProvisionedResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironmentProvisionedResources"); let body: any; - body = JSON.stringify(se_ListEnvironmentProvisionedResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1193,7 +1153,7 @@ export const se_ListEnvironmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironments"); let body: any; - body = JSON.stringify(se_ListEnvironmentsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1206,7 +1166,7 @@ export const se_ListEnvironmentTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironmentTemplates"); let body: any; - body = JSON.stringify(se_ListEnvironmentTemplatesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1219,7 +1179,7 @@ export const se_ListEnvironmentTemplateVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEnvironmentTemplateVersions"); let body: any; - body = JSON.stringify(se_ListEnvironmentTemplateVersionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1232,7 +1192,7 @@ export const se_ListRepositoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRepositories"); let body: any; - body = JSON.stringify(se_ListRepositoriesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1245,7 +1205,7 @@ export const se_ListRepositorySyncDefinitionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRepositorySyncDefinitions"); let body: any; - body = JSON.stringify(se_ListRepositorySyncDefinitionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1258,7 +1218,7 @@ export const se_ListServiceInstanceOutputsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceInstanceOutputs"); let body: any; - body = JSON.stringify(se_ListServiceInstanceOutputsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1271,7 +1231,7 @@ export const se_ListServiceInstanceProvisionedResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceInstanceProvisionedResources"); let body: any; - body = JSON.stringify(se_ListServiceInstanceProvisionedResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1284,7 +1244,7 @@ export const se_ListServiceInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceInstances"); let body: any; - body = JSON.stringify(se_ListServiceInstancesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1297,7 +1257,7 @@ export const se_ListServicePipelineOutputsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServicePipelineOutputs"); let body: any; - body = JSON.stringify(se_ListServicePipelineOutputsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1310,7 +1270,7 @@ export const se_ListServicePipelineProvisionedResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServicePipelineProvisionedResources"); let body: any; - body = JSON.stringify(se_ListServicePipelineProvisionedResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1323,7 +1283,7 @@ export const se_ListServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServices"); let body: any; - body = JSON.stringify(se_ListServicesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1336,7 +1296,7 @@ export const se_ListServiceTemplatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceTemplates"); let body: any; - body = JSON.stringify(se_ListServiceTemplatesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1349,7 +1309,7 @@ export const se_ListServiceTemplateVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceTemplateVersions"); let body: any; - body = JSON.stringify(se_ListServiceTemplateVersionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1362,7 +1322,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1375,7 +1335,7 @@ export const se_NotifyResourceDeploymentStatusChangeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("NotifyResourceDeploymentStatusChange"); let body: any; - body = JSON.stringify(se_NotifyResourceDeploymentStatusChangeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1388,7 +1348,7 @@ export const se_RejectEnvironmentAccountConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectEnvironmentAccountConnection"); let body: any; - body = JSON.stringify(se_RejectEnvironmentAccountConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1401,7 +1361,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1414,7 +1374,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1427,7 +1387,7 @@ export const se_UpdateAccountSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAccountSettings"); let body: any; - body = JSON.stringify(se_UpdateAccountSettingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1466,7 +1426,7 @@ export const se_UpdateEnvironmentAccountConnectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEnvironmentAccountConnection"); let body: any; - body = JSON.stringify(se_UpdateEnvironmentAccountConnectionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1479,7 +1439,7 @@ export const se_UpdateEnvironmentTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEnvironmentTemplate"); let body: any; - body = JSON.stringify(se_UpdateEnvironmentTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1492,7 +1452,7 @@ export const se_UpdateEnvironmentTemplateVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEnvironmentTemplateVersion"); let body: any; - body = JSON.stringify(se_UpdateEnvironmentTemplateVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1544,7 +1504,7 @@ export const se_UpdateServiceSyncBlockerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceSyncBlocker"); let body: any; - body = JSON.stringify(se_UpdateServiceSyncBlockerInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1557,7 +1517,7 @@ export const se_UpdateServiceSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceSyncConfig"); let body: any; - body = JSON.stringify(se_UpdateServiceSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1570,7 +1530,7 @@ export const se_UpdateServiceTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceTemplate"); let body: any; - body = JSON.stringify(se_UpdateServiceTemplateInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1583,7 +1543,7 @@ export const se_UpdateServiceTemplateVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceTemplateVersion"); let body: any; - body = JSON.stringify(se_UpdateServiceTemplateVersionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1596,7 +1556,7 @@ export const se_UpdateTemplateSyncConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTemplateSyncConfig"); let body: any; - body = JSON.stringify(se_UpdateTemplateSyncConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1617,7 +1577,7 @@ export const de_AcceptEnvironmentAccountConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1653,10 +1613,9 @@ const de_AcceptEnvironmentAccountConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1679,7 +1638,7 @@ export const de_CancelComponentDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1715,10 +1674,9 @@ const de_CancelComponentDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1741,7 +1699,7 @@ export const de_CancelEnvironmentDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1777,10 +1735,9 @@ const de_CancelEnvironmentDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1803,7 +1760,7 @@ export const de_CancelServiceInstanceDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1839,10 +1796,9 @@ const de_CancelServiceInstanceDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1865,7 +1821,7 @@ export const de_CancelServicePipelineDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1901,10 +1857,9 @@ const de_CancelServicePipelineDeploymentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1927,7 +1882,7 @@ export const de_CreateComponentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1966,10 +1921,9 @@ const de_CreateComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1992,7 +1946,7 @@ export const de_CreateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2031,10 +1985,9 @@ const de_CreateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2057,7 +2010,7 @@ export const de_CreateEnvironmentAccountConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2093,10 +2046,9 @@ const de_CreateEnvironmentAccountConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2119,7 +2071,7 @@ export const de_CreateEnvironmentTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2155,10 +2107,9 @@ const de_CreateEnvironmentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2181,7 +2132,7 @@ export const de_CreateEnvironmentTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2220,10 +2171,9 @@ const de_CreateEnvironmentTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2241,12 +2191,12 @@ export const de_CreateRepositoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRepositoryOutput(data, context); + contents = _json(data); const response: CreateRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2282,10 +2232,9 @@ const de_CreateRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2308,7 +2257,7 @@ export const de_CreateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2347,10 +2296,9 @@ const de_CreateServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2373,7 +2321,7 @@ export const de_CreateServiceInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2409,10 +2357,9 @@ const de_CreateServiceInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2430,12 +2377,12 @@ export const de_CreateServiceSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateServiceSyncConfigOutput(data, context); + contents = _json(data); const response: CreateServiceSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2471,10 +2418,9 @@ const de_CreateServiceSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,7 +2443,7 @@ export const de_CreateServiceTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2533,10 +2479,9 @@ const de_CreateServiceTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2559,7 +2504,7 @@ export const de_CreateServiceTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2598,10 +2543,9 @@ const de_CreateServiceTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2619,12 +2563,12 @@ export const de_CreateTemplateSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTemplateSyncConfigOutput(data, context); + contents = _json(data); const response: CreateTemplateSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2660,10 +2604,9 @@ const de_CreateTemplateSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2686,7 +2629,7 @@ export const de_DeleteComponentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2722,10 +2665,9 @@ const de_DeleteComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2748,7 +2690,7 @@ export const de_DeleteEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2784,10 +2726,9 @@ const de_DeleteEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2810,7 +2751,7 @@ export const de_DeleteEnvironmentAccountConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2846,10 +2787,9 @@ const de_DeleteEnvironmentAccountConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2872,7 +2812,7 @@ export const de_DeleteEnvironmentTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2908,10 +2848,9 @@ const de_DeleteEnvironmentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2934,7 +2873,7 @@ export const de_DeleteEnvironmentTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2970,10 +2909,9 @@ const de_DeleteEnvironmentTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2991,12 +2929,12 @@ export const de_DeleteRepositoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRepositoryOutput(data, context); + contents = _json(data); const response: DeleteRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3032,10 +2970,9 @@ const de_DeleteRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3058,7 +2995,7 @@ export const de_DeleteServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3094,10 +3031,9 @@ const de_DeleteServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3115,12 +3051,12 @@ export const de_DeleteServiceSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteServiceSyncConfigOutput(data, context); + contents = _json(data); const response: DeleteServiceSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3156,10 +3092,9 @@ const de_DeleteServiceSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3182,7 +3117,7 @@ export const de_DeleteServiceTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3218,10 +3153,9 @@ const de_DeleteServiceTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3244,7 +3178,7 @@ export const de_DeleteServiceTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3280,10 +3214,9 @@ const de_DeleteServiceTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3301,12 +3234,12 @@ export const de_DeleteTemplateSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTemplateSyncConfigOutput(data, context); + contents = _json(data); const response: DeleteTemplateSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3342,10 +3275,9 @@ const de_DeleteTemplateSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3363,12 +3295,12 @@ export const de_GetAccountSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAccountSettingsOutput(data, context); + contents = _json(data); const response: GetAccountSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3401,10 +3333,9 @@ const de_GetAccountSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3427,7 +3358,7 @@ export const de_GetComponentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3460,10 +3391,9 @@ const de_GetComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3486,7 +3416,7 @@ export const de_GetEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3519,10 +3449,9 @@ const de_GetEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3545,7 +3474,7 @@ export const de_GetEnvironmentAccountConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3578,10 +3507,9 @@ const de_GetEnvironmentAccountConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3604,7 +3532,7 @@ export const de_GetEnvironmentTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3637,10 +3565,9 @@ const de_GetEnvironmentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3663,7 +3590,7 @@ export const de_GetEnvironmentTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3696,10 +3623,9 @@ const de_GetEnvironmentTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3717,12 +3643,12 @@ export const de_GetRepositoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRepositoryOutput(data, context); + contents = _json(data); const response: GetRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3755,10 +3681,9 @@ const de_GetRepositoryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3781,7 +3706,7 @@ export const de_GetRepositorySyncStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3814,10 +3739,9 @@ const de_GetRepositorySyncStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3835,12 +3759,12 @@ export const de_GetResourcesSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcesSummaryOutput(data, context); + contents = _json(data); const response: GetResourcesSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3870,10 +3794,9 @@ const de_GetResourcesSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3896,7 +3819,7 @@ export const de_GetServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3929,10 +3852,9 @@ const de_GetServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3955,7 +3877,7 @@ export const de_GetServiceInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3988,10 +3910,9 @@ const de_GetServiceInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4014,7 +3935,7 @@ export const de_GetServiceInstanceSyncStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4047,10 +3968,9 @@ const de_GetServiceInstanceSyncStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4073,7 +3993,7 @@ export const de_GetServiceSyncBlockerSummaryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4106,10 +4026,9 @@ const de_GetServiceSyncBlockerSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4127,12 +4046,12 @@ export const de_GetServiceSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetServiceSyncConfigOutput(data, context); + contents = _json(data); const response: GetServiceSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4165,10 +4084,9 @@ const de_GetServiceSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4191,7 +4109,7 @@ export const de_GetServiceTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4224,10 +4142,9 @@ const de_GetServiceTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4250,7 +4167,7 @@ export const de_GetServiceTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4283,10 +4200,9 @@ const de_GetServiceTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4304,12 +4220,12 @@ export const de_GetTemplateSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTemplateSyncConfigOutput(data, context); + contents = _json(data); const response: GetTemplateSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4342,10 +4258,9 @@ const de_GetTemplateSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4368,7 +4283,7 @@ export const de_GetTemplateSyncStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4401,10 +4316,9 @@ const de_GetTemplateSyncStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4422,12 +4336,12 @@ export const de_ListComponentOutputsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListComponentOutputsOutput(data, context); + contents = _json(data); const response: ListComponentOutputsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4460,10 +4374,9 @@ const de_ListComponentOutputsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4481,12 +4394,12 @@ export const de_ListComponentProvisionedResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListComponentProvisionedResourcesOutput(data, context); + contents = _json(data); const response: ListComponentProvisionedResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4519,10 +4432,9 @@ const de_ListComponentProvisionedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4545,7 +4457,7 @@ export const de_ListComponentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4575,10 +4487,9 @@ const de_ListComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4601,7 +4512,7 @@ export const de_ListEnvironmentAccountConnectionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4631,10 +4542,9 @@ const de_ListEnvironmentAccountConnectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4652,12 +4562,12 @@ export const de_ListEnvironmentOutputsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEnvironmentOutputsOutput(data, context); + contents = _json(data); const response: ListEnvironmentOutputsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4690,10 +4600,9 @@ const de_ListEnvironmentOutputsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4711,12 +4620,12 @@ export const de_ListEnvironmentProvisionedResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListEnvironmentProvisionedResourcesOutput(data, context); + contents = _json(data); const response: ListEnvironmentProvisionedResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4749,10 +4658,9 @@ const de_ListEnvironmentProvisionedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4775,7 +4683,7 @@ export const de_ListEnvironmentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4808,10 +4716,9 @@ const de_ListEnvironmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4834,7 +4741,7 @@ export const de_ListEnvironmentTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4864,10 +4771,9 @@ const de_ListEnvironmentTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4890,7 +4796,7 @@ export const de_ListEnvironmentTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4923,10 +4829,9 @@ const de_ListEnvironmentTemplateVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4944,12 +4849,12 @@ export const de_ListRepositoriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRepositoriesOutput(data, context); + contents = _json(data); const response: ListRepositoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4982,10 +4887,9 @@ const de_ListRepositoriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5003,12 +4907,12 @@ export const de_ListRepositorySyncDefinitionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRepositorySyncDefinitionsOutput(data, context); + contents = _json(data); const response: ListRepositorySyncDefinitionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5038,10 +4942,9 @@ const de_ListRepositorySyncDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5059,12 +4962,12 @@ export const de_ListServiceInstanceOutputsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServiceInstanceOutputsOutput(data, context); + contents = _json(data); const response: ListServiceInstanceOutputsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5097,10 +5000,9 @@ const de_ListServiceInstanceOutputsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5118,12 +5020,12 @@ export const de_ListServiceInstanceProvisionedResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServiceInstanceProvisionedResourcesOutput(data, context); + contents = _json(data); const response: ListServiceInstanceProvisionedResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5156,10 +5058,9 @@ const de_ListServiceInstanceProvisionedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5182,7 +5083,7 @@ export const de_ListServiceInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5215,10 +5116,9 @@ const de_ListServiceInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5236,12 +5136,12 @@ export const de_ListServicePipelineOutputsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServicePipelineOutputsOutput(data, context); + contents = _json(data); const response: ListServicePipelineOutputsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5274,10 +5174,9 @@ const de_ListServicePipelineOutputsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5295,12 +5194,12 @@ export const de_ListServicePipelineProvisionedResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServicePipelineProvisionedResourcesOutput(data, context); + contents = _json(data); const response: ListServicePipelineProvisionedResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5333,10 +5232,9 @@ const de_ListServicePipelineProvisionedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5359,7 +5257,7 @@ export const de_ListServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5389,10 +5287,9 @@ const de_ListServicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5415,7 +5312,7 @@ export const de_ListServiceTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5445,10 +5342,9 @@ const de_ListServiceTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5471,7 +5367,7 @@ export const de_ListServiceTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5504,10 +5400,9 @@ const de_ListServiceTemplateVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5525,12 +5420,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5563,10 +5458,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5584,12 +5478,12 @@ export const de_NotifyResourceDeploymentStatusChangeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyResourceDeploymentStatusChangeOutput(data, context); + contents = _json(data); const response: NotifyResourceDeploymentStatusChangeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5628,10 +5522,9 @@ const de_NotifyResourceDeploymentStatusChangeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5654,7 +5547,7 @@ export const de_RejectEnvironmentAccountConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5690,10 +5583,9 @@ const de_RejectEnvironmentAccountConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5711,12 +5603,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5752,10 +5644,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5773,12 +5664,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5814,10 +5705,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5835,12 +5725,12 @@ export const de_UpdateAccountSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAccountSettingsOutput(data, context); + contents = _json(data); const response: UpdateAccountSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5873,10 +5763,9 @@ const de_UpdateAccountSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5899,7 +5788,7 @@ export const de_UpdateComponentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5938,10 +5827,9 @@ const de_UpdateComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5964,7 +5852,7 @@ export const de_UpdateEnvironmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6000,10 +5888,9 @@ const de_UpdateEnvironmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6026,7 +5913,7 @@ export const de_UpdateEnvironmentAccountConnectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6062,10 +5949,9 @@ const de_UpdateEnvironmentAccountConnectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6088,7 +5974,7 @@ export const de_UpdateEnvironmentTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6124,10 +6010,9 @@ const de_UpdateEnvironmentTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6150,7 +6035,7 @@ export const de_UpdateEnvironmentTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6186,10 +6071,9 @@ const de_UpdateEnvironmentTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6212,7 +6096,7 @@ export const de_UpdateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6251,10 +6135,9 @@ const de_UpdateServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6277,7 +6160,7 @@ export const de_UpdateServiceInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6313,10 +6196,9 @@ const de_UpdateServiceInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6339,7 +6221,7 @@ export const de_UpdateServicePipelineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6375,10 +6257,9 @@ const de_UpdateServicePipelineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6401,7 +6282,7 @@ export const de_UpdateServiceSyncBlockerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6437,10 +6318,9 @@ const de_UpdateServiceSyncBlockerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6458,12 +6338,12 @@ export const de_UpdateServiceSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateServiceSyncConfigOutput(data, context); + contents = _json(data); const response: UpdateServiceSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6499,10 +6379,9 @@ const de_UpdateServiceSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6525,7 +6404,7 @@ export const de_UpdateServiceTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6561,10 +6440,9 @@ const de_UpdateServiceTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6587,7 +6465,7 @@ export const de_UpdateServiceTemplateVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6623,10 +6501,9 @@ const de_UpdateServiceTemplateVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6644,12 +6521,12 @@ export const de_UpdateTemplateSyncConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTemplateSyncConfigOutput(data, context); + contents = _json(data); const response: UpdateTemplateSyncConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6685,10 +6562,9 @@ const de_UpdateTemplateSyncConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6702,7 +6578,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6715,7 +6591,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6731,7 +6607,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6747,7 +6623,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6763,7 +6639,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6776,7 +6652,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6789,7 +6665,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6797,104 +6673,36 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AcceptEnvironmentAccountConnectionInput - */ -const se_AcceptEnvironmentAccountConnectionInput = ( - input: AcceptEnvironmentAccountConnectionInput, - context: __SerdeContext -): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_AcceptEnvironmentAccountConnectionInput omitted. -/** - * serializeAws_json1_0CancelComponentDeploymentInput - */ -const se_CancelComponentDeploymentInput = (input: CancelComponentDeploymentInput, context: __SerdeContext): any => { - return { - ...(input.componentName != null && { componentName: input.componentName }), - }; -}; +// se_CancelComponentDeploymentInput omitted. -/** - * serializeAws_json1_0CancelEnvironmentDeploymentInput - */ -const se_CancelEnvironmentDeploymentInput = (input: CancelEnvironmentDeploymentInput, context: __SerdeContext): any => { - return { - ...(input.environmentName != null && { environmentName: input.environmentName }), - }; -}; +// se_CancelEnvironmentDeploymentInput omitted. -/** - * serializeAws_json1_0CancelServiceInstanceDeploymentInput - */ -const se_CancelServiceInstanceDeploymentInput = ( - input: CancelServiceInstanceDeploymentInput, - context: __SerdeContext -): any => { - return { - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_CancelServiceInstanceDeploymentInput omitted. -/** - * serializeAws_json1_0CancelServicePipelineDeploymentInput - */ -const se_CancelServicePipelineDeploymentInput = ( - input: CancelServicePipelineDeploymentInput, - context: __SerdeContext -): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_CancelServicePipelineDeploymentInput omitted. -/** - * serializeAws_json1_0CompatibleEnvironmentTemplateInput - */ -const se_CompatibleEnvironmentTemplateInput = ( - input: CompatibleEnvironmentTemplateInput, - context: __SerdeContext -): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_CompatibleEnvironmentTemplateInput omitted. -/** - * serializeAws_json1_0CompatibleEnvironmentTemplateInputList - */ -const se_CompatibleEnvironmentTemplateInputList = ( - input: CompatibleEnvironmentTemplateInput[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CompatibleEnvironmentTemplateInput(entry, context); - }); -}; +// se_CompatibleEnvironmentTemplateInputList omitted. /** * serializeAws_json1_0CreateComponentInput */ const se_CreateComponentInput = (input: CreateComponentInput, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.manifest != null && { manifest: input.manifest }), - ...(input.name != null && { name: input.name }), - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.serviceSpec != null && { serviceSpec: input.serviceSpec }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateFile != null && { templateFile: input.templateFile }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + environmentName: [], + manifest: [], + name: [], + serviceInstanceName: [], + serviceName: [], + serviceSpec: [], + tags: _json, + templateFile: [], + }); }; /** @@ -6904,54 +6712,38 @@ const se_CreateEnvironmentAccountConnectionInput = ( input: CreateEnvironmentAccountConnectionInput, context: __SerdeContext ): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.codebuildRoleArn != null && { codebuildRoleArn: input.codebuildRoleArn }), - ...(input.componentRoleArn != null && { componentRoleArn: input.componentRoleArn }), - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.managementAccountId != null && { managementAccountId: input.managementAccountId }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + codebuildRoleArn: [], + componentRoleArn: [], + environmentName: [], + managementAccountId: [], + roleArn: [], + tags: _json, + }); }; /** * serializeAws_json1_0CreateEnvironmentInput */ const se_CreateEnvironmentInput = (input: CreateEnvironmentInput, context: __SerdeContext): any => { - return { - ...(input.codebuildRoleArn != null && { codebuildRoleArn: input.codebuildRoleArn }), - ...(input.componentRoleArn != null && { componentRoleArn: input.componentRoleArn }), - ...(input.description != null && { description: input.description }), - ...(input.environmentAccountConnectionId != null && { - environmentAccountConnectionId: input.environmentAccountConnectionId, - }), - ...(input.name != null && { name: input.name }), - ...(input.protonServiceRoleArn != null && { protonServiceRoleArn: input.protonServiceRoleArn }), - ...(input.provisioningRepository != null && { - provisioningRepository: se_RepositoryBranchInput(input.provisioningRepository, context), - }), - ...(input.spec != null && { spec: input.spec }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateMajorVersion != null && { templateMajorVersion: input.templateMajorVersion }), - ...(input.templateMinorVersion != null && { templateMinorVersion: input.templateMinorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; + return take(input, { + codebuildRoleArn: [], + componentRoleArn: [], + description: [], + environmentAccountConnectionId: [], + name: [], + protonServiceRoleArn: [], + provisioningRepository: _json, + spec: [], + tags: _json, + templateMajorVersion: [], + templateMinorVersion: [], + templateName: [], + }); }; -/** - * serializeAws_json1_0CreateEnvironmentTemplateInput - */ -const se_CreateEnvironmentTemplateInput = (input: CreateEnvironmentTemplateInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.name != null && { name: input.name }), - ...(input.provisioning != null && { provisioning: input.provisioning }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateEnvironmentTemplateInput omitted. /** * serializeAws_json1_0CreateEnvironmentTemplateVersionInput @@ -6960,88 +6752,54 @@ const se_CreateEnvironmentTemplateVersionInput = ( input: CreateEnvironmentTemplateVersionInput, context: __SerdeContext ): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.source != null && { source: se_TemplateVersionSourceInput(input.source, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateName != null && { templateName: input.templateName }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + majorVersion: [], + source: _json, + tags: _json, + templateName: [], + }); }; -/** - * serializeAws_json1_0CreateRepositoryInput - */ -const se_CreateRepositoryInput = (input: CreateRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.connectionArn != null && { connectionArn: input.connectionArn }), - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.name != null && { name: input.name }), - ...(input.provider != null && { provider: input.provider }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateRepositoryInput omitted. /** * serializeAws_json1_0CreateServiceInput */ const se_CreateServiceInput = (input: CreateServiceInput, context: __SerdeContext): any => { - return { - ...(input.branchName != null && { branchName: input.branchName }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.repositoryConnectionArn != null && { repositoryConnectionArn: input.repositoryConnectionArn }), - ...(input.repositoryId != null && { repositoryId: input.repositoryId }), - ...(input.spec != null && { spec: input.spec }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateMajorVersion != null && { templateMajorVersion: input.templateMajorVersion }), - ...(input.templateMinorVersion != null && { templateMinorVersion: input.templateMinorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; + return take(input, { + branchName: [], + description: [], + name: [], + repositoryConnectionArn: [], + repositoryId: [], + spec: [], + tags: _json, + templateMajorVersion: [], + templateMinorVersion: [], + templateName: [], + }); }; /** * serializeAws_json1_0CreateServiceInstanceInput */ const se_CreateServiceInstanceInput = (input: CreateServiceInstanceInput, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.spec != null && { spec: input.spec }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateMajorVersion != null && { templateMajorVersion: input.templateMajorVersion }), - ...(input.templateMinorVersion != null && { templateMinorVersion: input.templateMinorVersion }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + serviceName: [], + spec: [], + tags: _json, + templateMajorVersion: [], + templateMinorVersion: [], + }); }; -/** - * serializeAws_json1_0CreateServiceSyncConfigInput - */ -const se_CreateServiceSyncConfigInput = (input: CreateServiceSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.branch != null && { branch: input.branch }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.repositoryProvider != null && { repositoryProvider: input.repositoryProvider }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_CreateServiceSyncConfigInput omitted. -/** - * serializeAws_json1_0CreateServiceTemplateInput - */ -const se_CreateServiceTemplateInput = (input: CreateServiceTemplateInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.name != null && { name: input.name }), - ...(input.pipelineProvisioning != null && { pipelineProvisioning: input.pipelineProvisioning }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateServiceTemplateInput omitted. /** * serializeAws_json1_0CreateServiceTemplateVersionInput @@ -7050,996 +6808,245 @@ const se_CreateServiceTemplateVersionInput = ( input: CreateServiceTemplateVersionInput, context: __SerdeContext ): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.compatibleEnvironmentTemplates != null && { - compatibleEnvironmentTemplates: se_CompatibleEnvironmentTemplateInputList( - input.compatibleEnvironmentTemplates, - context - ), - }), - ...(input.description != null && { description: input.description }), - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.source != null && { source: se_TemplateVersionSourceInput(input.source, context) }), - ...(input.supportedComponentSources != null && { - supportedComponentSources: se_ServiceTemplateSupportedComponentSourceInputList( - input.supportedComponentSources, - context - ), - }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; - -/** - * serializeAws_json1_0CreateTemplateSyncConfigInput - */ -const se_CreateTemplateSyncConfigInput = (input: CreateTemplateSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.branch != null && { branch: input.branch }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.repositoryProvider != null && { repositoryProvider: input.repositoryProvider }), - ...(input.subdirectory != null && { subdirectory: input.subdirectory }), - ...(input.templateName != null && { templateName: input.templateName }), - ...(input.templateType != null && { templateType: input.templateType }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + compatibleEnvironmentTemplates: _json, + description: [], + majorVersion: [], + source: _json, + supportedComponentSources: _json, + tags: _json, + templateName: [], + }); }; -/** - * serializeAws_json1_0DeleteComponentInput - */ -const se_DeleteComponentInput = (input: DeleteComponentInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_CreateTemplateSyncConfigInput omitted. -/** - * serializeAws_json1_0DeleteEnvironmentAccountConnectionInput - */ -const se_DeleteEnvironmentAccountConnectionInput = ( - input: DeleteEnvironmentAccountConnectionInput, - context: __SerdeContext -): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_DeleteComponentInput omitted. -/** - * serializeAws_json1_0DeleteEnvironmentInput - */ -const se_DeleteEnvironmentInput = (input: DeleteEnvironmentInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteEnvironmentAccountConnectionInput omitted. -/** - * serializeAws_json1_0DeleteEnvironmentTemplateInput - */ -const se_DeleteEnvironmentTemplateInput = (input: DeleteEnvironmentTemplateInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteEnvironmentInput omitted. -/** - * serializeAws_json1_0DeleteEnvironmentTemplateVersionInput - */ -const se_DeleteEnvironmentTemplateVersionInput = ( - input: DeleteEnvironmentTemplateVersionInput, - context: __SerdeContext -): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.minorVersion != null && { minorVersion: input.minorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_DeleteEnvironmentTemplateInput omitted. -/** - * serializeAws_json1_0DeleteRepositoryInput - */ -const se_DeleteRepositoryInput = (input: DeleteRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.provider != null && { provider: input.provider }), - }; -}; +// se_DeleteEnvironmentTemplateVersionInput omitted. -/** - * serializeAws_json1_0DeleteServiceInput - */ -const se_DeleteServiceInput = (input: DeleteServiceInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteRepositoryInput omitted. -/** - * serializeAws_json1_0DeleteServiceSyncConfigInput - */ -const se_DeleteServiceSyncConfigInput = (input: DeleteServiceSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_DeleteServiceInput omitted. -/** - * serializeAws_json1_0DeleteServiceTemplateInput - */ -const se_DeleteServiceTemplateInput = (input: DeleteServiceTemplateInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeleteServiceSyncConfigInput omitted. -/** - * serializeAws_json1_0DeleteServiceTemplateVersionInput - */ -const se_DeleteServiceTemplateVersionInput = ( - input: DeleteServiceTemplateVersionInput, - context: __SerdeContext -): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.minorVersion != null && { minorVersion: input.minorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_DeleteServiceTemplateInput omitted. -/** - * serializeAws_json1_0DeleteTemplateSyncConfigInput - */ -const se_DeleteTemplateSyncConfigInput = (input: DeleteTemplateSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.templateName != null && { templateName: input.templateName }), - ...(input.templateType != null && { templateType: input.templateType }), - }; -}; +// se_DeleteServiceTemplateVersionInput omitted. -/** - * serializeAws_json1_0EnvironmentAccountConnectionStatusList - */ -const se_EnvironmentAccountConnectionStatusList = ( - input: (EnvironmentAccountConnectionStatus | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteTemplateSyncConfigInput omitted. -/** - * serializeAws_json1_0EnvironmentTemplateFilter - */ -const se_EnvironmentTemplateFilter = (input: EnvironmentTemplateFilter, context: __SerdeContext): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_EnvironmentAccountConnectionStatusList omitted. -/** - * serializeAws_json1_0EnvironmentTemplateFilterList - */ -const se_EnvironmentTemplateFilterList = (input: EnvironmentTemplateFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EnvironmentTemplateFilter(entry, context); - }); -}; +// se_EnvironmentTemplateFilter omitted. -/** - * serializeAws_json1_0GetAccountSettingsInput - */ -const se_GetAccountSettingsInput = (input: GetAccountSettingsInput, context: __SerdeContext): any => { - return {}; -}; +// se_EnvironmentTemplateFilterList omitted. -/** - * serializeAws_json1_0GetComponentInput - */ -const se_GetComponentInput = (input: GetComponentInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_GetAccountSettingsInput omitted. -/** - * serializeAws_json1_0GetEnvironmentAccountConnectionInput - */ -const se_GetEnvironmentAccountConnectionInput = ( - input: GetEnvironmentAccountConnectionInput, - context: __SerdeContext -): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_GetComponentInput omitted. -/** - * serializeAws_json1_0GetEnvironmentInput - */ -const se_GetEnvironmentInput = (input: GetEnvironmentInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_GetEnvironmentAccountConnectionInput omitted. -/** - * serializeAws_json1_0GetEnvironmentTemplateInput - */ -const se_GetEnvironmentTemplateInput = (input: GetEnvironmentTemplateInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_GetEnvironmentInput omitted. -/** - * serializeAws_json1_0GetEnvironmentTemplateVersionInput - */ -const se_GetEnvironmentTemplateVersionInput = ( - input: GetEnvironmentTemplateVersionInput, - context: __SerdeContext -): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.minorVersion != null && { minorVersion: input.minorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_GetEnvironmentTemplateInput omitted. -/** - * serializeAws_json1_0GetRepositoryInput - */ -const se_GetRepositoryInput = (input: GetRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.provider != null && { provider: input.provider }), - }; -}; +// se_GetEnvironmentTemplateVersionInput omitted. -/** - * serializeAws_json1_0GetRepositorySyncStatusInput - */ -const se_GetRepositorySyncStatusInput = (input: GetRepositorySyncStatusInput, context: __SerdeContext): any => { - return { - ...(input.branch != null && { branch: input.branch }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.repositoryProvider != null && { repositoryProvider: input.repositoryProvider }), - ...(input.syncType != null && { syncType: input.syncType }), - }; -}; +// se_GetRepositoryInput omitted. -/** - * serializeAws_json1_0GetResourcesSummaryInput - */ -const se_GetResourcesSummaryInput = (input: GetResourcesSummaryInput, context: __SerdeContext): any => { - return {}; -}; +// se_GetRepositorySyncStatusInput omitted. -/** - * serializeAws_json1_0GetServiceInput - */ -const se_GetServiceInput = (input: GetServiceInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_GetResourcesSummaryInput omitted. -/** - * serializeAws_json1_0GetServiceInstanceInput - */ -const se_GetServiceInstanceInput = (input: GetServiceInstanceInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_GetServiceInput omitted. -/** - * serializeAws_json1_0GetServiceInstanceSyncStatusInput - */ -const se_GetServiceInstanceSyncStatusInput = ( - input: GetServiceInstanceSyncStatusInput, - context: __SerdeContext -): any => { - return { - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_GetServiceInstanceInput omitted. -/** - * serializeAws_json1_0GetServiceSyncBlockerSummaryInput - */ -const se_GetServiceSyncBlockerSummaryInput = ( - input: GetServiceSyncBlockerSummaryInput, - context: __SerdeContext -): any => { - return { - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_GetServiceInstanceSyncStatusInput omitted. -/** - * serializeAws_json1_0GetServiceSyncConfigInput - */ -const se_GetServiceSyncConfigInput = (input: GetServiceSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_GetServiceSyncBlockerSummaryInput omitted. -/** - * serializeAws_json1_0GetServiceTemplateInput - */ -const se_GetServiceTemplateInput = (input: GetServiceTemplateInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_GetServiceSyncConfigInput omitted. -/** - * serializeAws_json1_0GetServiceTemplateVersionInput - */ -const se_GetServiceTemplateVersionInput = (input: GetServiceTemplateVersionInput, context: __SerdeContext): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.minorVersion != null && { minorVersion: input.minorVersion }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_GetServiceTemplateInput omitted. -/** - * serializeAws_json1_0GetTemplateSyncConfigInput - */ -const se_GetTemplateSyncConfigInput = (input: GetTemplateSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.templateName != null && { templateName: input.templateName }), - ...(input.templateType != null && { templateType: input.templateType }), - }; -}; +// se_GetServiceTemplateVersionInput omitted. -/** - * serializeAws_json1_0GetTemplateSyncStatusInput - */ -const se_GetTemplateSyncStatusInput = (input: GetTemplateSyncStatusInput, context: __SerdeContext): any => { - return { - ...(input.templateName != null && { templateName: input.templateName }), - ...(input.templateType != null && { templateType: input.templateType }), - ...(input.templateVersion != null && { templateVersion: input.templateVersion }), - }; -}; +// se_GetTemplateSyncConfigInput omitted. -/** - * serializeAws_json1_0ListComponentOutputsInput - */ -const se_ListComponentOutputsInput = (input: ListComponentOutputsInput, context: __SerdeContext): any => { - return { - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetTemplateSyncStatusInput omitted. -/** - * serializeAws_json1_0ListComponentProvisionedResourcesInput - */ -const se_ListComponentProvisionedResourcesInput = ( - input: ListComponentProvisionedResourcesInput, - context: __SerdeContext -): any => { - return { - ...(input.componentName != null && { componentName: input.componentName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListComponentOutputsInput omitted. -/** - * serializeAws_json1_0ListComponentsInput - */ -const se_ListComponentsInput = (input: ListComponentsInput, context: __SerdeContext): any => { - return { - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_ListComponentProvisionedResourcesInput omitted. -/** - * serializeAws_json1_0ListEnvironmentAccountConnectionsInput - */ -const se_ListEnvironmentAccountConnectionsInput = ( - input: ListEnvironmentAccountConnectionsInput, - context: __SerdeContext -): any => { - return { - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.requestedBy != null && { requestedBy: input.requestedBy }), - ...(input.statuses != null && { statuses: se_EnvironmentAccountConnectionStatusList(input.statuses, context) }), - }; -}; - -/** - * serializeAws_json1_0ListEnvironmentOutputsInput - */ -const se_ListEnvironmentOutputsInput = (input: ListEnvironmentOutputsInput, context: __SerdeContext): any => { - return { - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListEnvironmentProvisionedResourcesInput - */ -const se_ListEnvironmentProvisionedResourcesInput = ( - input: ListEnvironmentProvisionedResourcesInput, - context: __SerdeContext -): any => { - return { - ...(input.environmentName != null && { environmentName: input.environmentName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; - -/** - * serializeAws_json1_0ListEnvironmentsInput - */ -const se_ListEnvironmentsInput = (input: ListEnvironmentsInput, context: __SerdeContext): any => { - return { - ...(input.environmentTemplates != null && { - environmentTemplates: se_EnvironmentTemplateFilterList(input.environmentTemplates, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListComponentsInput omitted. -/** - * serializeAws_json1_0ListEnvironmentTemplatesInput - */ -const se_ListEnvironmentTemplatesInput = (input: ListEnvironmentTemplatesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListEnvironmentAccountConnectionsInput omitted. -/** - * serializeAws_json1_0ListEnvironmentTemplateVersionsInput - */ -const se_ListEnvironmentTemplateVersionsInput = ( - input: ListEnvironmentTemplateVersionsInput, - context: __SerdeContext -): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_ListEnvironmentOutputsInput omitted. -/** - * serializeAws_json1_0ListRepositoriesInput - */ -const se_ListRepositoriesInput = (input: ListRepositoriesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListEnvironmentProvisionedResourcesInput omitted. -/** - * serializeAws_json1_0ListRepositorySyncDefinitionsInput - */ -const se_ListRepositorySyncDefinitionsInput = ( - input: ListRepositorySyncDefinitionsInput, - context: __SerdeContext -): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.repositoryProvider != null && { repositoryProvider: input.repositoryProvider }), - ...(input.syncType != null && { syncType: input.syncType }), - }; -}; +// se_ListEnvironmentsInput omitted. -/** - * serializeAws_json1_0ListServiceInstanceOutputsInput - */ -const se_ListServiceInstanceOutputsInput = (input: ListServiceInstanceOutputsInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_ListEnvironmentTemplatesInput omitted. -/** - * serializeAws_json1_0ListServiceInstanceProvisionedResourcesInput - */ -const se_ListServiceInstanceProvisionedResourcesInput = ( - input: ListServiceInstanceProvisionedResourcesInput, - context: __SerdeContext -): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_ListEnvironmentTemplateVersionsInput omitted. -/** - * serializeAws_json1_0ListServiceInstancesFilter - */ -const se_ListServiceInstancesFilter = (input: ListServiceInstancesFilter, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ListRepositoriesInput omitted. -/** - * serializeAws_json1_0ListServiceInstancesFilterList - */ -const se_ListServiceInstancesFilterList = (input: ListServiceInstancesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListServiceInstancesFilter(entry, context); - }); -}; +// se_ListRepositorySyncDefinitionsInput omitted. -/** - * serializeAws_json1_0ListServiceInstancesInput - */ -const se_ListServiceInstancesInput = (input: ListServiceInstancesInput, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_ListServiceInstancesFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }; -}; +// se_ListServiceInstanceOutputsInput omitted. -/** - * serializeAws_json1_0ListServicePipelineOutputsInput - */ -const se_ListServicePipelineOutputsInput = (input: ListServicePipelineOutputsInput, context: __SerdeContext): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_ListServiceInstanceProvisionedResourcesInput omitted. -/** - * serializeAws_json1_0ListServicePipelineProvisionedResourcesInput - */ -const se_ListServicePipelineProvisionedResourcesInput = ( - input: ListServicePipelineProvisionedResourcesInput, - context: __SerdeContext -): any => { - return { - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_ListServiceInstancesFilter omitted. -/** - * serializeAws_json1_0ListServicesInput - */ -const se_ListServicesInput = (input: ListServicesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListServiceInstancesFilterList omitted. -/** - * serializeAws_json1_0ListServiceTemplatesInput - */ -const se_ListServiceTemplatesInput = (input: ListServiceTemplatesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListServiceInstancesInput omitted. -/** - * serializeAws_json1_0ListServiceTemplateVersionsInput - */ -const se_ListServiceTemplateVersionsInput = (input: ListServiceTemplateVersionsInput, context: __SerdeContext): any => { - return { - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_ListServicePipelineOutputsInput omitted. -/** - * serializeAws_json1_0ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListServicePipelineProvisionedResourcesInput omitted. -/** - * serializeAws_json1_0NotifyResourceDeploymentStatusChangeInput - */ -const se_NotifyResourceDeploymentStatusChangeInput = ( - input: NotifyResourceDeploymentStatusChangeInput, - context: __SerdeContext -): any => { - return { - ...(input.deploymentId != null && { deploymentId: input.deploymentId }), - ...(input.outputs != null && { outputs: se_OutputsList(input.outputs, context) }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.status != null && { status: input.status }), - ...(input.statusMessage != null && { statusMessage: input.statusMessage }), - }; -}; +// se_ListServicesInput omitted. -/** - * serializeAws_json1_0Output - */ -const se_Output = (input: Output, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.valueString != null && { valueString: input.valueString }), - }; -}; +// se_ListServiceTemplatesInput omitted. -/** - * serializeAws_json1_0OutputsList - */ -const se_OutputsList = (input: Output[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Output(entry, context); - }); -}; +// se_ListServiceTemplateVersionsInput omitted. -/** - * serializeAws_json1_0RejectEnvironmentAccountConnectionInput - */ -const se_RejectEnvironmentAccountConnectionInput = ( - input: RejectEnvironmentAccountConnectionInput, - context: __SerdeContext -): any => { - return { - ...(input.id != null && { id: input.id }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_0RepositoryBranchInput - */ -const se_RepositoryBranchInput = (input: RepositoryBranchInput, context: __SerdeContext): any => { - return { - ...(input.branch != null && { branch: input.branch }), - ...(input.name != null && { name: input.name }), - ...(input.provider != null && { provider: input.provider }), - }; -}; +// se_NotifyResourceDeploymentStatusChangeInput omitted. -/** - * serializeAws_json1_0S3ObjectSource - */ -const se_S3ObjectSource = (input: S3ObjectSource, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - }; -}; +// se_Output omitted. -/** - * serializeAws_json1_0ServiceTemplateSupportedComponentSourceInputList - */ -const se_ServiceTemplateSupportedComponentSourceInputList = ( - input: (ServiceTemplateSupportedComponentSourceType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OutputsList omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_RejectEnvironmentAccountConnectionInput omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RepositoryBranchInput omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_S3ObjectSource omitted. -/** - * serializeAws_json1_0TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_ServiceTemplateSupportedComponentSourceInputList omitted. -/** - * serializeAws_json1_0TemplateVersionSourceInput - */ -const se_TemplateVersionSourceInput = (input: TemplateVersionSourceInput, context: __SerdeContext): any => { - return TemplateVersionSourceInput.visit(input, { - s3: (value) => ({ s3: se_S3ObjectSource(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Tag omitted. -/** - * serializeAws_json1_0UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0UpdateAccountSettingsInput - */ -const se_UpdateAccountSettingsInput = (input: UpdateAccountSettingsInput, context: __SerdeContext): any => { - return { - ...(input.deletePipelineProvisioningRepository != null && { - deletePipelineProvisioningRepository: input.deletePipelineProvisioningRepository, - }), - ...(input.pipelineCodebuildRoleArn != null && { pipelineCodebuildRoleArn: input.pipelineCodebuildRoleArn }), - ...(input.pipelineProvisioningRepository != null && { - pipelineProvisioningRepository: se_RepositoryBranchInput(input.pipelineProvisioningRepository, context), - }), - ...(input.pipelineServiceRoleArn != null && { pipelineServiceRoleArn: input.pipelineServiceRoleArn }), - }; -}; +// se_TagList omitted. + +// se_TagResourceInput omitted. + +// se_TemplateVersionSourceInput omitted. + +// se_UntagResourceInput omitted. + +// se_UpdateAccountSettingsInput omitted. /** * serializeAws_json1_0UpdateComponentInput */ const se_UpdateComponentInput = (input: UpdateComponentInput, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.deploymentType != null && { deploymentType: input.deploymentType }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.serviceInstanceName != null && { serviceInstanceName: input.serviceInstanceName }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.serviceSpec != null && { serviceSpec: input.serviceSpec }), - ...(input.templateFile != null && { templateFile: input.templateFile }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + deploymentType: [], + description: [], + name: [], + serviceInstanceName: [], + serviceName: [], + serviceSpec: [], + templateFile: [], + }); }; -/** - * serializeAws_json1_0UpdateEnvironmentAccountConnectionInput - */ -const se_UpdateEnvironmentAccountConnectionInput = ( - input: UpdateEnvironmentAccountConnectionInput, - context: __SerdeContext -): any => { - return { - ...(input.codebuildRoleArn != null && { codebuildRoleArn: input.codebuildRoleArn }), - ...(input.componentRoleArn != null && { componentRoleArn: input.componentRoleArn }), - ...(input.id != null && { id: input.id }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - }; -}; +// se_UpdateEnvironmentAccountConnectionInput omitted. /** * serializeAws_json1_0UpdateEnvironmentInput */ const se_UpdateEnvironmentInput = (input: UpdateEnvironmentInput, context: __SerdeContext): any => { - return { - ...(input.codebuildRoleArn != null && { codebuildRoleArn: input.codebuildRoleArn }), - ...(input.componentRoleArn != null && { componentRoleArn: input.componentRoleArn }), - ...(input.deploymentType != null && { deploymentType: input.deploymentType }), - ...(input.description != null && { description: input.description }), - ...(input.environmentAccountConnectionId != null && { - environmentAccountConnectionId: input.environmentAccountConnectionId, - }), - ...(input.name != null && { name: input.name }), - ...(input.protonServiceRoleArn != null && { protonServiceRoleArn: input.protonServiceRoleArn }), - ...(input.provisioningRepository != null && { - provisioningRepository: se_RepositoryBranchInput(input.provisioningRepository, context), - }), - ...(input.spec != null && { spec: input.spec }), - ...(input.templateMajorVersion != null && { templateMajorVersion: input.templateMajorVersion }), - ...(input.templateMinorVersion != null && { templateMinorVersion: input.templateMinorVersion }), - }; + return take(input, { + codebuildRoleArn: [], + componentRoleArn: [], + deploymentType: [], + description: [], + environmentAccountConnectionId: [], + name: [], + protonServiceRoleArn: [], + provisioningRepository: _json, + spec: [], + templateMajorVersion: [], + templateMinorVersion: [], + }); }; -/** - * serializeAws_json1_0UpdateEnvironmentTemplateInput - */ -const se_UpdateEnvironmentTemplateInput = (input: UpdateEnvironmentTemplateInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_UpdateEnvironmentTemplateInput omitted. -/** - * serializeAws_json1_0UpdateEnvironmentTemplateVersionInput - */ -const se_UpdateEnvironmentTemplateVersionInput = ( - input: UpdateEnvironmentTemplateVersionInput, - context: __SerdeContext -): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.minorVersion != null && { minorVersion: input.minorVersion }), - ...(input.status != null && { status: input.status }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; +// se_UpdateEnvironmentTemplateVersionInput omitted. /** * serializeAws_json1_0UpdateServiceInput */ const se_UpdateServiceInput = (input: UpdateServiceInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.spec != null && { spec: input.spec }), - }; + return take(input, { + description: [], + name: [], + spec: [], + }); }; /** * serializeAws_json1_0UpdateServiceInstanceInput */ const se_UpdateServiceInstanceInput = (input: UpdateServiceInstanceInput, context: __SerdeContext): any => { - return { - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.deploymentType != null && { deploymentType: input.deploymentType }), - ...(input.name != null && { name: input.name }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.spec != null && { spec: input.spec }), - ...(input.templateMajorVersion != null && { templateMajorVersion: input.templateMajorVersion }), - ...(input.templateMinorVersion != null && { templateMinorVersion: input.templateMinorVersion }), - }; + return take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + deploymentType: [], + name: [], + serviceName: [], + spec: [], + templateMajorVersion: [], + templateMinorVersion: [], + }); }; /** * serializeAws_json1_0UpdateServicePipelineInput */ const se_UpdateServicePipelineInput = (input: UpdateServicePipelineInput, context: __SerdeContext): any => { - return { - ...(input.deploymentType != null && { deploymentType: input.deploymentType }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - ...(input.spec != null && { spec: input.spec }), - ...(input.templateMajorVersion != null && { templateMajorVersion: input.templateMajorVersion }), - ...(input.templateMinorVersion != null && { templateMinorVersion: input.templateMinorVersion }), - }; + return take(input, { + deploymentType: [], + serviceName: [], + spec: [], + templateMajorVersion: [], + templateMinorVersion: [], + }); }; -/** - * serializeAws_json1_0UpdateServiceSyncBlockerInput - */ -const se_UpdateServiceSyncBlockerInput = (input: UpdateServiceSyncBlockerInput, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.resolvedReason != null && { resolvedReason: input.resolvedReason }), - }; -}; +// se_UpdateServiceSyncBlockerInput omitted. -/** - * serializeAws_json1_0UpdateServiceSyncConfigInput - */ -const se_UpdateServiceSyncConfigInput = (input: UpdateServiceSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.branch != null && { branch: input.branch }), - ...(input.filePath != null && { filePath: input.filePath }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.repositoryProvider != null && { repositoryProvider: input.repositoryProvider }), - ...(input.serviceName != null && { serviceName: input.serviceName }), - }; -}; +// se_UpdateServiceSyncConfigInput omitted. -/** - * serializeAws_json1_0UpdateServiceTemplateInput - */ -const se_UpdateServiceTemplateInput = (input: UpdateServiceTemplateInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_UpdateServiceTemplateInput omitted. -/** - * serializeAws_json1_0UpdateServiceTemplateVersionInput - */ -const se_UpdateServiceTemplateVersionInput = ( - input: UpdateServiceTemplateVersionInput, - context: __SerdeContext -): any => { - return { - ...(input.compatibleEnvironmentTemplates != null && { - compatibleEnvironmentTemplates: se_CompatibleEnvironmentTemplateInputList( - input.compatibleEnvironmentTemplates, - context - ), - }), - ...(input.description != null && { description: input.description }), - ...(input.majorVersion != null && { majorVersion: input.majorVersion }), - ...(input.minorVersion != null && { minorVersion: input.minorVersion }), - ...(input.status != null && { status: input.status }), - ...(input.supportedComponentSources != null && { - supportedComponentSources: se_ServiceTemplateSupportedComponentSourceInputList( - input.supportedComponentSources, - context - ), - }), - ...(input.templateName != null && { templateName: input.templateName }), - }; -}; - -/** - * serializeAws_json1_0UpdateTemplateSyncConfigInput - */ -const se_UpdateTemplateSyncConfigInput = (input: UpdateTemplateSyncConfigInput, context: __SerdeContext): any => { - return { - ...(input.branch != null && { branch: input.branch }), - ...(input.repositoryName != null && { repositoryName: input.repositoryName }), - ...(input.repositoryProvider != null && { repositoryProvider: input.repositoryProvider }), - ...(input.subdirectory != null && { subdirectory: input.subdirectory }), - ...(input.templateName != null && { templateName: input.templateName }), - ...(input.templateType != null && { templateType: input.templateType }), - }; -}; +// se_UpdateServiceTemplateVersionInput omitted. + +// se_UpdateTemplateSyncConfigInput omitted. /** * deserializeAws_json1_0AcceptEnvironmentAccountConnectionOutput @@ -8048,44 +7055,22 @@ const de_AcceptEnvironmentAccountConnectionOutput = ( output: any, context: __SerdeContext ): AcceptEnvironmentAccountConnectionOutput => { - return { - environmentAccountConnection: - output.environmentAccountConnection != null - ? de_EnvironmentAccountConnection(output.environmentAccountConnection, context) - : undefined, - } as any; + return take(output, { + environmentAccountConnection: (_: any) => de_EnvironmentAccountConnection(_, context), + }) as any; }; -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0AccountSettings - */ -const de_AccountSettings = (output: any, context: __SerdeContext): AccountSettings => { - return { - pipelineCodebuildRoleArn: __expectString(output.pipelineCodebuildRoleArn), - pipelineProvisioningRepository: - output.pipelineProvisioningRepository != null - ? de_RepositoryBranch(output.pipelineProvisioningRepository, context) - : undefined, - pipelineServiceRoleArn: __expectString(output.pipelineServiceRoleArn), - } as any; -}; +// de_AccountSettings omitted. /** * deserializeAws_json1_0CancelComponentDeploymentOutput */ const de_CancelComponentDeploymentOutput = (output: any, context: __SerdeContext): CancelComponentDeploymentOutput => { - return { - component: output.component != null ? de_Component(output.component, context) : undefined, - } as any; + return take(output, { + component: (_: any) => de_Component(_, context), + }) as any; }; /** @@ -8095,9 +7080,9 @@ const de_CancelEnvironmentDeploymentOutput = ( output: any, context: __SerdeContext ): CancelEnvironmentDeploymentOutput => { - return { - environment: output.environment != null ? de_Environment(output.environment, context) : undefined, - } as any; + return take(output, { + environment: (_: any) => de_Environment(_, context), + }) as any; }; /** @@ -8107,9 +7092,9 @@ const de_CancelServiceInstanceDeploymentOutput = ( output: any, context: __SerdeContext ): CancelServiceInstanceDeploymentOutput => { - return { - serviceInstance: output.serviceInstance != null ? de_ServiceInstance(output.serviceInstance, context) : undefined, - } as any; + return take(output, { + serviceInstance: (_: any) => de_ServiceInstance(_, context), + }) as any; }; /** @@ -8119,98 +7104,54 @@ const de_CancelServicePipelineDeploymentOutput = ( output: any, context: __SerdeContext ): CancelServicePipelineDeploymentOutput => { - return { - pipeline: output.pipeline != null ? de_ServicePipeline(output.pipeline, context) : undefined, - } as any; + return take(output, { + pipeline: (_: any) => de_ServicePipeline(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CompatibleEnvironmentTemplate - */ -const de_CompatibleEnvironmentTemplate = (output: any, context: __SerdeContext): CompatibleEnvironmentTemplate => { - return { - majorVersion: __expectString(output.majorVersion), - templateName: __expectString(output.templateName), - } as any; -}; +// de_CompatibleEnvironmentTemplate omitted. -/** - * deserializeAws_json1_0CompatibleEnvironmentTemplateList - */ -const de_CompatibleEnvironmentTemplateList = ( - output: any, - context: __SerdeContext -): CompatibleEnvironmentTemplate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CompatibleEnvironmentTemplate(entry, context); - }); - return retVal; -}; +// de_CompatibleEnvironmentTemplateList omitted. /** * deserializeAws_json1_0Component */ const de_Component = (output: any, context: __SerdeContext): Component => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - description: __expectString(output.description), - environmentName: __expectString(output.environmentName), - lastClientRequestToken: __expectString(output.lastClientRequestToken), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - serviceInstanceName: __expectString(output.serviceInstanceName), - serviceName: __expectString(output.serviceName), - serviceSpec: __expectString(output.serviceSpec), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + description: __expectString, + environmentName: __expectString, + lastClientRequestToken: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + serviceInstanceName: __expectString, + serviceName: __expectString, + serviceSpec: __expectString, + }) as any; }; /** * deserializeAws_json1_0ComponentSummary */ const de_ComponentSummary = (output: any, context: __SerdeContext): ComponentSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - environmentName: __expectString(output.environmentName), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - serviceInstanceName: __expectString(output.serviceInstanceName), - serviceName: __expectString(output.serviceName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + environmentName: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + serviceInstanceName: __expectString, + serviceName: __expectString, + }) as any; }; /** @@ -8220,48 +7161,22 @@ const de_ComponentSummaryList = (output: any, context: __SerdeContext): Componen const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComponentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CountsSummary - */ -const de_CountsSummary = (output: any, context: __SerdeContext): CountsSummary => { - return { - components: output.components != null ? de_ResourceCountsSummary(output.components, context) : undefined, - environmentTemplates: - output.environmentTemplates != null ? de_ResourceCountsSummary(output.environmentTemplates, context) : undefined, - environments: output.environments != null ? de_ResourceCountsSummary(output.environments, context) : undefined, - pipelines: output.pipelines != null ? de_ResourceCountsSummary(output.pipelines, context) : undefined, - serviceInstances: - output.serviceInstances != null ? de_ResourceCountsSummary(output.serviceInstances, context) : undefined, - serviceTemplates: - output.serviceTemplates != null ? de_ResourceCountsSummary(output.serviceTemplates, context) : undefined, - services: output.services != null ? de_ResourceCountsSummary(output.services, context) : undefined, - } as any; -}; +// de_CountsSummary omitted. /** * deserializeAws_json1_0CreateComponentOutput */ const de_CreateComponentOutput = (output: any, context: __SerdeContext): CreateComponentOutput => { - return { - component: output.component != null ? de_Component(output.component, context) : undefined, - } as any; + return take(output, { + component: (_: any) => de_Component(_, context), + }) as any; }; /** @@ -8271,31 +7186,27 @@ const de_CreateEnvironmentAccountConnectionOutput = ( output: any, context: __SerdeContext ): CreateEnvironmentAccountConnectionOutput => { - return { - environmentAccountConnection: - output.environmentAccountConnection != null - ? de_EnvironmentAccountConnection(output.environmentAccountConnection, context) - : undefined, - } as any; + return take(output, { + environmentAccountConnection: (_: any) => de_EnvironmentAccountConnection(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateEnvironmentOutput */ const de_CreateEnvironmentOutput = (output: any, context: __SerdeContext): CreateEnvironmentOutput => { - return { - environment: output.environment != null ? de_Environment(output.environment, context) : undefined, - } as any; + return take(output, { + environment: (_: any) => de_Environment(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateEnvironmentTemplateOutput */ const de_CreateEnvironmentTemplateOutput = (output: any, context: __SerdeContext): CreateEnvironmentTemplateOutput => { - return { - environmentTemplate: - output.environmentTemplate != null ? de_EnvironmentTemplate(output.environmentTemplate, context) : undefined, - } as any; + return take(output, { + environmentTemplate: (_: any) => de_EnvironmentTemplate(_, context), + }) as any; }; /** @@ -8305,58 +7216,40 @@ const de_CreateEnvironmentTemplateVersionOutput = ( output: any, context: __SerdeContext ): CreateEnvironmentTemplateVersionOutput => { - return { - environmentTemplateVersion: - output.environmentTemplateVersion != null - ? de_EnvironmentTemplateVersion(output.environmentTemplateVersion, context) - : undefined, - } as any; + return take(output, { + environmentTemplateVersion: (_: any) => de_EnvironmentTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CreateRepositoryOutput - */ -const de_CreateRepositoryOutput = (output: any, context: __SerdeContext): CreateRepositoryOutput => { - return { - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; -}; +// de_CreateRepositoryOutput omitted. /** * deserializeAws_json1_0CreateServiceInstanceOutput */ const de_CreateServiceInstanceOutput = (output: any, context: __SerdeContext): CreateServiceInstanceOutput => { - return { - serviceInstance: output.serviceInstance != null ? de_ServiceInstance(output.serviceInstance, context) : undefined, - } as any; + return take(output, { + serviceInstance: (_: any) => de_ServiceInstance(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateServiceOutput */ const de_CreateServiceOutput = (output: any, context: __SerdeContext): CreateServiceOutput => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CreateServiceSyncConfigOutput - */ -const de_CreateServiceSyncConfigOutput = (output: any, context: __SerdeContext): CreateServiceSyncConfigOutput => { - return { - serviceSyncConfig: - output.serviceSyncConfig != null ? de_ServiceSyncConfig(output.serviceSyncConfig, context) : undefined, - } as any; -}; +// de_CreateServiceSyncConfigOutput omitted. /** * deserializeAws_json1_0CreateServiceTemplateOutput */ const de_CreateServiceTemplateOutput = (output: any, context: __SerdeContext): CreateServiceTemplateOutput => { - return { - serviceTemplate: output.serviceTemplate != null ? de_ServiceTemplate(output.serviceTemplate, context) : undefined, - } as any; + return take(output, { + serviceTemplate: (_: any) => de_ServiceTemplate(_, context), + }) as any; }; /** @@ -8366,31 +7259,20 @@ const de_CreateServiceTemplateVersionOutput = ( output: any, context: __SerdeContext ): CreateServiceTemplateVersionOutput => { - return { - serviceTemplateVersion: - output.serviceTemplateVersion != null - ? de_ServiceTemplateVersion(output.serviceTemplateVersion, context) - : undefined, - } as any; + return take(output, { + serviceTemplateVersion: (_: any) => de_ServiceTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CreateTemplateSyncConfigOutput - */ -const de_CreateTemplateSyncConfigOutput = (output: any, context: __SerdeContext): CreateTemplateSyncConfigOutput => { - return { - templateSyncConfig: - output.templateSyncConfig != null ? de_TemplateSyncConfig(output.templateSyncConfig, context) : undefined, - } as any; -}; +// de_CreateTemplateSyncConfigOutput omitted. /** * deserializeAws_json1_0DeleteComponentOutput */ const de_DeleteComponentOutput = (output: any, context: __SerdeContext): DeleteComponentOutput => { - return { - component: output.component != null ? de_Component(output.component, context) : undefined, - } as any; + return take(output, { + component: (_: any) => de_Component(_, context), + }) as any; }; /** @@ -8400,31 +7282,27 @@ const de_DeleteEnvironmentAccountConnectionOutput = ( output: any, context: __SerdeContext ): DeleteEnvironmentAccountConnectionOutput => { - return { - environmentAccountConnection: - output.environmentAccountConnection != null - ? de_EnvironmentAccountConnection(output.environmentAccountConnection, context) - : undefined, - } as any; + return take(output, { + environmentAccountConnection: (_: any) => de_EnvironmentAccountConnection(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteEnvironmentOutput */ const de_DeleteEnvironmentOutput = (output: any, context: __SerdeContext): DeleteEnvironmentOutput => { - return { - environment: output.environment != null ? de_Environment(output.environment, context) : undefined, - } as any; + return take(output, { + environment: (_: any) => de_Environment(_, context), + }) as any; }; /** * deserializeAws_json1_0DeleteEnvironmentTemplateOutput */ const de_DeleteEnvironmentTemplateOutput = (output: any, context: __SerdeContext): DeleteEnvironmentTemplateOutput => { - return { - environmentTemplate: - output.environmentTemplate != null ? de_EnvironmentTemplate(output.environmentTemplate, context) : undefined, - } as any; + return take(output, { + environmentTemplate: (_: any) => de_EnvironmentTemplate(_, context), + }) as any; }; /** @@ -8434,49 +7312,31 @@ const de_DeleteEnvironmentTemplateVersionOutput = ( output: any, context: __SerdeContext ): DeleteEnvironmentTemplateVersionOutput => { - return { - environmentTemplateVersion: - output.environmentTemplateVersion != null - ? de_EnvironmentTemplateVersion(output.environmentTemplateVersion, context) - : undefined, - } as any; + return take(output, { + environmentTemplateVersion: (_: any) => de_EnvironmentTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DeleteRepositoryOutput - */ -const de_DeleteRepositoryOutput = (output: any, context: __SerdeContext): DeleteRepositoryOutput => { - return { - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; -}; +// de_DeleteRepositoryOutput omitted. /** * deserializeAws_json1_0DeleteServiceOutput */ const de_DeleteServiceOutput = (output: any, context: __SerdeContext): DeleteServiceOutput => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DeleteServiceSyncConfigOutput - */ -const de_DeleteServiceSyncConfigOutput = (output: any, context: __SerdeContext): DeleteServiceSyncConfigOutput => { - return { - serviceSyncConfig: - output.serviceSyncConfig != null ? de_ServiceSyncConfig(output.serviceSyncConfig, context) : undefined, - } as any; -}; +// de_DeleteServiceSyncConfigOutput omitted. /** * deserializeAws_json1_0DeleteServiceTemplateOutput */ const de_DeleteServiceTemplateOutput = (output: any, context: __SerdeContext): DeleteServiceTemplateOutput => { - return { - serviceTemplate: output.serviceTemplate != null ? de_ServiceTemplate(output.serviceTemplate, context) : undefined, - } as any; + return take(output, { + serviceTemplate: (_: any) => de_ServiceTemplate(_, context), + }) as any; }; /** @@ -8486,82 +7346,57 @@ const de_DeleteServiceTemplateVersionOutput = ( output: any, context: __SerdeContext ): DeleteServiceTemplateVersionOutput => { - return { - serviceTemplateVersion: - output.serviceTemplateVersion != null - ? de_ServiceTemplateVersion(output.serviceTemplateVersion, context) - : undefined, - } as any; + return take(output, { + serviceTemplateVersion: (_: any) => de_ServiceTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DeleteTemplateSyncConfigOutput - */ -const de_DeleteTemplateSyncConfigOutput = (output: any, context: __SerdeContext): DeleteTemplateSyncConfigOutput => { - return { - templateSyncConfig: - output.templateSyncConfig != null ? de_TemplateSyncConfig(output.templateSyncConfig, context) : undefined, - } as any; -}; +// de_DeleteTemplateSyncConfigOutput omitted. /** * deserializeAws_json1_0Environment */ const de_Environment = (output: any, context: __SerdeContext): Environment => { - return { - arn: __expectString(output.arn), - codebuildRoleArn: __expectString(output.codebuildRoleArn), - componentRoleArn: __expectString(output.componentRoleArn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - description: __expectString(output.description), - environmentAccountConnectionId: __expectString(output.environmentAccountConnectionId), - environmentAccountId: __expectString(output.environmentAccountId), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - name: __expectString(output.name), - protonServiceRoleArn: __expectString(output.protonServiceRoleArn), - provisioning: __expectString(output.provisioning), - provisioningRepository: - output.provisioningRepository != null ? de_RepositoryBranch(output.provisioningRepository, context) : undefined, - spec: __expectString(output.spec), - templateMajorVersion: __expectString(output.templateMajorVersion), - templateMinorVersion: __expectString(output.templateMinorVersion), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + codebuildRoleArn: __expectString, + componentRoleArn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + description: __expectString, + environmentAccountConnectionId: __expectString, + environmentAccountId: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + protonServiceRoleArn: __expectString, + provisioning: __expectString, + provisioningRepository: _json, + spec: __expectString, + templateMajorVersion: __expectString, + templateMinorVersion: __expectString, + templateName: __expectString, + }) as any; }; /** * deserializeAws_json1_0EnvironmentAccountConnection */ const de_EnvironmentAccountConnection = (output: any, context: __SerdeContext): EnvironmentAccountConnection => { - return { - arn: __expectString(output.arn), - codebuildRoleArn: __expectString(output.codebuildRoleArn), - componentRoleArn: __expectString(output.componentRoleArn), - environmentAccountId: __expectString(output.environmentAccountId), - environmentName: __expectString(output.environmentName), - id: __expectString(output.id), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - managementAccountId: __expectString(output.managementAccountId), - requestedAt: - output.requestedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestedAt))) - : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + codebuildRoleArn: __expectString, + componentRoleArn: __expectString, + environmentAccountId: __expectString, + environmentName: __expectString, + id: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + managementAccountId: __expectString, + requestedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + status: __expectString, + }) as any; }; /** @@ -8571,24 +7406,18 @@ const de_EnvironmentAccountConnectionSummary = ( output: any, context: __SerdeContext ): EnvironmentAccountConnectionSummary => { - return { - arn: __expectString(output.arn), - componentRoleArn: __expectString(output.componentRoleArn), - environmentAccountId: __expectString(output.environmentAccountId), - environmentName: __expectString(output.environmentName), - id: __expectString(output.id), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - managementAccountId: __expectString(output.managementAccountId), - requestedAt: - output.requestedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestedAt))) - : undefined, - roleArn: __expectString(output.roleArn), - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + componentRoleArn: __expectString, + environmentAccountId: __expectString, + environmentName: __expectString, + id: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + managementAccountId: __expectString, + requestedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + roleArn: __expectString, + status: __expectString, + }) as any; }; /** @@ -8601,9 +7430,6 @@ const de_EnvironmentAccountConnectionSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentAccountConnectionSummary(entry, context); }); return retVal; @@ -8613,31 +7439,24 @@ const de_EnvironmentAccountConnectionSummaryList = ( * deserializeAws_json1_0EnvironmentSummary */ const de_EnvironmentSummary = (output: any, context: __SerdeContext): EnvironmentSummary => { - return { - arn: __expectString(output.arn), - componentRoleArn: __expectString(output.componentRoleArn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - description: __expectString(output.description), - environmentAccountConnectionId: __expectString(output.environmentAccountConnectionId), - environmentAccountId: __expectString(output.environmentAccountId), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - name: __expectString(output.name), - protonServiceRoleArn: __expectString(output.protonServiceRoleArn), - provisioning: __expectString(output.provisioning), - templateMajorVersion: __expectString(output.templateMajorVersion), - templateMinorVersion: __expectString(output.templateMinorVersion), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + componentRoleArn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + description: __expectString, + environmentAccountConnectionId: __expectString, + environmentAccountId: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + protonServiceRoleArn: __expectString, + provisioning: __expectString, + templateMajorVersion: __expectString, + templateMinorVersion: __expectString, + templateName: __expectString, + }) as any; }; /** @@ -8647,9 +7466,6 @@ const de_EnvironmentSummaryList = (output: any, context: __SerdeContext): Enviro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentSummary(entry, context); }); return retVal; @@ -8659,41 +7475,33 @@ const de_EnvironmentSummaryList = (output: any, context: __SerdeContext): Enviro * deserializeAws_json1_0EnvironmentTemplate */ const de_EnvironmentTemplate = (output: any, context: __SerdeContext): EnvironmentTemplate => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - displayName: __expectString(output.displayName), - encryptionKey: __expectString(output.encryptionKey), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - provisioning: __expectString(output.provisioning), - recommendedVersion: __expectString(output.recommendedVersion), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + displayName: __expectString, + encryptionKey: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + provisioning: __expectString, + recommendedVersion: __expectString, + }) as any; }; /** * deserializeAws_json1_0EnvironmentTemplateSummary */ const de_EnvironmentTemplateSummary = (output: any, context: __SerdeContext): EnvironmentTemplateSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - displayName: __expectString(output.displayName), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - provisioning: __expectString(output.provisioning), - recommendedVersion: __expectString(output.recommendedVersion), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + displayName: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + provisioning: __expectString, + recommendedVersion: __expectString, + }) as any; }; /** @@ -8703,9 +7511,6 @@ const de_EnvironmentTemplateSummaryList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentTemplateSummary(entry, context); }); return retVal; @@ -8715,23 +7520,19 @@ const de_EnvironmentTemplateSummaryList = (output: any, context: __SerdeContext) * deserializeAws_json1_0EnvironmentTemplateVersion */ const de_EnvironmentTemplateVersion = (output: any, context: __SerdeContext): EnvironmentTemplateVersion => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - majorVersion: __expectString(output.majorVersion), - minorVersion: __expectString(output.minorVersion), - recommendedMinorVersion: __expectString(output.recommendedMinorVersion), - schema: __expectString(output.schema), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + majorVersion: __expectString, + minorVersion: __expectString, + recommendedMinorVersion: __expectString, + schema: __expectString, + status: __expectString, + statusMessage: __expectString, + templateName: __expectString, + }) as any; }; /** @@ -8741,22 +7542,18 @@ const de_EnvironmentTemplateVersionSummary = ( output: any, context: __SerdeContext ): EnvironmentTemplateVersionSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - majorVersion: __expectString(output.majorVersion), - minorVersion: __expectString(output.minorVersion), - recommendedMinorVersion: __expectString(output.recommendedMinorVersion), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + majorVersion: __expectString, + minorVersion: __expectString, + recommendedMinorVersion: __expectString, + status: __expectString, + statusMessage: __expectString, + templateName: __expectString, + }) as any; }; /** @@ -8769,30 +7566,20 @@ const de_EnvironmentTemplateVersionSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EnvironmentTemplateVersionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0GetAccountSettingsOutput - */ -const de_GetAccountSettingsOutput = (output: any, context: __SerdeContext): GetAccountSettingsOutput => { - return { - accountSettings: output.accountSettings != null ? de_AccountSettings(output.accountSettings, context) : undefined, - } as any; -}; +// de_GetAccountSettingsOutput omitted. /** * deserializeAws_json1_0GetComponentOutput */ const de_GetComponentOutput = (output: any, context: __SerdeContext): GetComponentOutput => { - return { - component: output.component != null ? de_Component(output.component, context) : undefined, - } as any; + return take(output, { + component: (_: any) => de_Component(_, context), + }) as any; }; /** @@ -8802,31 +7589,27 @@ const de_GetEnvironmentAccountConnectionOutput = ( output: any, context: __SerdeContext ): GetEnvironmentAccountConnectionOutput => { - return { - environmentAccountConnection: - output.environmentAccountConnection != null - ? de_EnvironmentAccountConnection(output.environmentAccountConnection, context) - : undefined, - } as any; + return take(output, { + environmentAccountConnection: (_: any) => de_EnvironmentAccountConnection(_, context), + }) as any; }; /** * deserializeAws_json1_0GetEnvironmentOutput */ const de_GetEnvironmentOutput = (output: any, context: __SerdeContext): GetEnvironmentOutput => { - return { - environment: output.environment != null ? de_Environment(output.environment, context) : undefined, - } as any; + return take(output, { + environment: (_: any) => de_Environment(_, context), + }) as any; }; /** * deserializeAws_json1_0GetEnvironmentTemplateOutput */ const de_GetEnvironmentTemplateOutput = (output: any, context: __SerdeContext): GetEnvironmentTemplateOutput => { - return { - environmentTemplate: - output.environmentTemplate != null ? de_EnvironmentTemplate(output.environmentTemplate, context) : undefined, - } as any; + return take(output, { + environmentTemplate: (_: any) => de_EnvironmentTemplate(_, context), + }) as any; }; /** @@ -8836,48 +7619,31 @@ const de_GetEnvironmentTemplateVersionOutput = ( output: any, context: __SerdeContext ): GetEnvironmentTemplateVersionOutput => { - return { - environmentTemplateVersion: - output.environmentTemplateVersion != null - ? de_EnvironmentTemplateVersion(output.environmentTemplateVersion, context) - : undefined, - } as any; + return take(output, { + environmentTemplateVersion: (_: any) => de_EnvironmentTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetRepositoryOutput - */ -const de_GetRepositoryOutput = (output: any, context: __SerdeContext): GetRepositoryOutput => { - return { - repository: output.repository != null ? de_Repository(output.repository, context) : undefined, - } as any; -}; +// de_GetRepositoryOutput omitted. /** * deserializeAws_json1_0GetRepositorySyncStatusOutput */ const de_GetRepositorySyncStatusOutput = (output: any, context: __SerdeContext): GetRepositorySyncStatusOutput => { - return { - latestSync: output.latestSync != null ? de_RepositorySyncAttempt(output.latestSync, context) : undefined, - } as any; + return take(output, { + latestSync: (_: any) => de_RepositorySyncAttempt(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetResourcesSummaryOutput - */ -const de_GetResourcesSummaryOutput = (output: any, context: __SerdeContext): GetResourcesSummaryOutput => { - return { - counts: output.counts != null ? de_CountsSummary(output.counts, context) : undefined, - } as any; -}; +// de_GetResourcesSummaryOutput omitted. /** * deserializeAws_json1_0GetServiceInstanceOutput */ const de_GetServiceInstanceOutput = (output: any, context: __SerdeContext): GetServiceInstanceOutput => { - return { - serviceInstance: output.serviceInstance != null ? de_ServiceInstance(output.serviceInstance, context) : undefined, - } as any; + return take(output, { + serviceInstance: (_: any) => de_ServiceInstance(_, context), + }) as any; }; /** @@ -8887,21 +7653,20 @@ const de_GetServiceInstanceSyncStatusOutput = ( output: any, context: __SerdeContext ): GetServiceInstanceSyncStatusOutput => { - return { - desiredState: output.desiredState != null ? de_Revision(output.desiredState, context) : undefined, - latestSuccessfulSync: - output.latestSuccessfulSync != null ? de_ResourceSyncAttempt(output.latestSuccessfulSync, context) : undefined, - latestSync: output.latestSync != null ? de_ResourceSyncAttempt(output.latestSync, context) : undefined, - } as any; + return take(output, { + desiredState: _json, + latestSuccessfulSync: (_: any) => de_ResourceSyncAttempt(_, context), + latestSync: (_: any) => de_ResourceSyncAttempt(_, context), + }) as any; }; /** * deserializeAws_json1_0GetServiceOutput */ const de_GetServiceOutput = (output: any, context: __SerdeContext): GetServiceOutput => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; /** @@ -8911,75 +7676,45 @@ const de_GetServiceSyncBlockerSummaryOutput = ( output: any, context: __SerdeContext ): GetServiceSyncBlockerSummaryOutput => { - return { - serviceSyncBlockerSummary: - output.serviceSyncBlockerSummary != null - ? de_ServiceSyncBlockerSummary(output.serviceSyncBlockerSummary, context) - : undefined, - } as any; + return take(output, { + serviceSyncBlockerSummary: (_: any) => de_ServiceSyncBlockerSummary(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetServiceSyncConfigOutput - */ -const de_GetServiceSyncConfigOutput = (output: any, context: __SerdeContext): GetServiceSyncConfigOutput => { - return { - serviceSyncConfig: - output.serviceSyncConfig != null ? de_ServiceSyncConfig(output.serviceSyncConfig, context) : undefined, - } as any; -}; +// de_GetServiceSyncConfigOutput omitted. /** * deserializeAws_json1_0GetServiceTemplateOutput */ const de_GetServiceTemplateOutput = (output: any, context: __SerdeContext): GetServiceTemplateOutput => { - return { - serviceTemplate: output.serviceTemplate != null ? de_ServiceTemplate(output.serviceTemplate, context) : undefined, - } as any; + return take(output, { + serviceTemplate: (_: any) => de_ServiceTemplate(_, context), + }) as any; }; /** * deserializeAws_json1_0GetServiceTemplateVersionOutput */ const de_GetServiceTemplateVersionOutput = (output: any, context: __SerdeContext): GetServiceTemplateVersionOutput => { - return { - serviceTemplateVersion: - output.serviceTemplateVersion != null - ? de_ServiceTemplateVersion(output.serviceTemplateVersion, context) - : undefined, - } as any; + return take(output, { + serviceTemplateVersion: (_: any) => de_ServiceTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0GetTemplateSyncConfigOutput - */ -const de_GetTemplateSyncConfigOutput = (output: any, context: __SerdeContext): GetTemplateSyncConfigOutput => { - return { - templateSyncConfig: - output.templateSyncConfig != null ? de_TemplateSyncConfig(output.templateSyncConfig, context) : undefined, - } as any; -}; +// de_GetTemplateSyncConfigOutput omitted. /** * deserializeAws_json1_0GetTemplateSyncStatusOutput */ const de_GetTemplateSyncStatusOutput = (output: any, context: __SerdeContext): GetTemplateSyncStatusOutput => { - return { - desiredState: output.desiredState != null ? de_Revision(output.desiredState, context) : undefined, - latestSuccessfulSync: - output.latestSuccessfulSync != null ? de_ResourceSyncAttempt(output.latestSuccessfulSync, context) : undefined, - latestSync: output.latestSync != null ? de_ResourceSyncAttempt(output.latestSync, context) : undefined, - } as any; + return take(output, { + desiredState: _json, + latestSuccessfulSync: (_: any) => de_ResourceSyncAttempt(_, context), + latestSync: (_: any) => de_ResourceSyncAttempt(_, context), + }) as any; }; -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerException omitted. /** * deserializeAws_json1_0LatestSyncBlockers @@ -8988,48 +7723,23 @@ const de_LatestSyncBlockers = (output: any, context: __SerdeContext): SyncBlocke const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SyncBlocker(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ListComponentOutputsOutput - */ -const de_ListComponentOutputsOutput = (output: any, context: __SerdeContext): ListComponentOutputsOutput => { - return { - nextToken: __expectString(output.nextToken), - outputs: output.outputs != null ? de_OutputsList(output.outputs, context) : undefined, - } as any; -}; +// de_ListComponentOutputsOutput omitted. -/** - * deserializeAws_json1_0ListComponentProvisionedResourcesOutput - */ -const de_ListComponentProvisionedResourcesOutput = ( - output: any, - context: __SerdeContext -): ListComponentProvisionedResourcesOutput => { - return { - nextToken: __expectString(output.nextToken), - provisionedResources: - output.provisionedResources != null - ? de_ProvisionedResourceList(output.provisionedResources, context) - : undefined, - } as any; -}; +// de_ListComponentProvisionedResourcesOutput omitted. /** * deserializeAws_json1_0ListComponentsOutput */ const de_ListComponentsOutput = (output: any, context: __SerdeContext): ListComponentsOutput => { - return { - components: output.components != null ? de_ComponentSummaryList(output.components, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + components: (_: any) => de_ComponentSummaryList(_, context), + nextToken: __expectString, + }) as any; }; /** @@ -9039,59 +7749,34 @@ const de_ListEnvironmentAccountConnectionsOutput = ( output: any, context: __SerdeContext ): ListEnvironmentAccountConnectionsOutput => { - return { - environmentAccountConnections: - output.environmentAccountConnections != null - ? de_EnvironmentAccountConnectionSummaryList(output.environmentAccountConnections, context) - : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + environmentAccountConnections: (_: any) => de_EnvironmentAccountConnectionSummaryList(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListEnvironmentOutputsOutput - */ -const de_ListEnvironmentOutputsOutput = (output: any, context: __SerdeContext): ListEnvironmentOutputsOutput => { - return { - nextToken: __expectString(output.nextToken), - outputs: output.outputs != null ? de_OutputsList(output.outputs, context) : undefined, - } as any; -}; +// de_ListEnvironmentOutputsOutput omitted. -/** - * deserializeAws_json1_0ListEnvironmentProvisionedResourcesOutput - */ -const de_ListEnvironmentProvisionedResourcesOutput = ( - output: any, - context: __SerdeContext -): ListEnvironmentProvisionedResourcesOutput => { - return { - nextToken: __expectString(output.nextToken), - provisionedResources: - output.provisionedResources != null - ? de_ProvisionedResourceList(output.provisionedResources, context) - : undefined, - } as any; -}; +// de_ListEnvironmentProvisionedResourcesOutput omitted. /** * deserializeAws_json1_0ListEnvironmentsOutput */ const de_ListEnvironmentsOutput = (output: any, context: __SerdeContext): ListEnvironmentsOutput => { - return { - environments: output.environments != null ? de_EnvironmentSummaryList(output.environments, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + environments: (_: any) => de_EnvironmentSummaryList(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListEnvironmentTemplatesOutput */ const de_ListEnvironmentTemplatesOutput = (output: any, context: __SerdeContext): ListEnvironmentTemplatesOutput => { - return { - nextToken: __expectString(output.nextToken), - templates: output.templates != null ? de_EnvironmentTemplateSummaryList(output.templates, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + templates: (_: any) => de_EnvironmentTemplateSummaryList(_, context), + }) as any; }; /** @@ -9101,126 +7786,52 @@ const de_ListEnvironmentTemplateVersionsOutput = ( output: any, context: __SerdeContext ): ListEnvironmentTemplateVersionsOutput => { - return { - nextToken: __expectString(output.nextToken), - templateVersions: - output.templateVersions != null - ? de_EnvironmentTemplateVersionSummaryList(output.templateVersions, context) - : undefined, - } as any; + return take(output, { + nextToken: __expectString, + templateVersions: (_: any) => de_EnvironmentTemplateVersionSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListRepositoriesOutput - */ -const de_ListRepositoriesOutput = (output: any, context: __SerdeContext): ListRepositoriesOutput => { - return { - nextToken: __expectString(output.nextToken), - repositories: output.repositories != null ? de_RepositorySummaryList(output.repositories, context) : undefined, - } as any; -}; +// de_ListRepositoriesOutput omitted. -/** - * deserializeAws_json1_0ListRepositorySyncDefinitionsOutput - */ -const de_ListRepositorySyncDefinitionsOutput = ( - output: any, - context: __SerdeContext -): ListRepositorySyncDefinitionsOutput => { - return { - nextToken: __expectString(output.nextToken), - syncDefinitions: - output.syncDefinitions != null ? de_RepositorySyncDefinitionList(output.syncDefinitions, context) : undefined, - } as any; -}; +// de_ListRepositorySyncDefinitionsOutput omitted. -/** - * deserializeAws_json1_0ListServiceInstanceOutputsOutput - */ -const de_ListServiceInstanceOutputsOutput = ( - output: any, - context: __SerdeContext -): ListServiceInstanceOutputsOutput => { - return { - nextToken: __expectString(output.nextToken), - outputs: output.outputs != null ? de_OutputsList(output.outputs, context) : undefined, - } as any; -}; +// de_ListServiceInstanceOutputsOutput omitted. -/** - * deserializeAws_json1_0ListServiceInstanceProvisionedResourcesOutput - */ -const de_ListServiceInstanceProvisionedResourcesOutput = ( - output: any, - context: __SerdeContext -): ListServiceInstanceProvisionedResourcesOutput => { - return { - nextToken: __expectString(output.nextToken), - provisionedResources: - output.provisionedResources != null - ? de_ProvisionedResourceList(output.provisionedResources, context) - : undefined, - } as any; -}; +// de_ListServiceInstanceProvisionedResourcesOutput omitted. /** * deserializeAws_json1_0ListServiceInstancesOutput */ const de_ListServiceInstancesOutput = (output: any, context: __SerdeContext): ListServiceInstancesOutput => { - return { - nextToken: __expectString(output.nextToken), - serviceInstances: - output.serviceInstances != null ? de_ServiceInstanceSummaryList(output.serviceInstances, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + serviceInstances: (_: any) => de_ServiceInstanceSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListServicePipelineOutputsOutput - */ -const de_ListServicePipelineOutputsOutput = ( - output: any, - context: __SerdeContext -): ListServicePipelineOutputsOutput => { - return { - nextToken: __expectString(output.nextToken), - outputs: output.outputs != null ? de_OutputsList(output.outputs, context) : undefined, - } as any; -}; +// de_ListServicePipelineOutputsOutput omitted. -/** - * deserializeAws_json1_0ListServicePipelineProvisionedResourcesOutput - */ -const de_ListServicePipelineProvisionedResourcesOutput = ( - output: any, - context: __SerdeContext -): ListServicePipelineProvisionedResourcesOutput => { - return { - nextToken: __expectString(output.nextToken), - provisionedResources: - output.provisionedResources != null - ? de_ProvisionedResourceList(output.provisionedResources, context) - : undefined, - } as any; -}; +// de_ListServicePipelineProvisionedResourcesOutput omitted. /** * deserializeAws_json1_0ListServicesOutput */ const de_ListServicesOutput = (output: any, context: __SerdeContext): ListServicesOutput => { - return { - nextToken: __expectString(output.nextToken), - services: output.services != null ? de_ServiceSummaryList(output.services, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + services: (_: any) => de_ServiceSummaryList(_, context), + }) as any; }; /** * deserializeAws_json1_0ListServiceTemplatesOutput */ const de_ListServiceTemplatesOutput = (output: any, context: __SerdeContext): ListServiceTemplatesOutput => { - return { - nextToken: __expectString(output.nextToken), - templates: output.templates != null ? de_ServiceTemplateSummaryList(output.templates, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + templates: (_: any) => de_ServiceTemplateSummaryList(_, context), + }) as any; }; /** @@ -9230,85 +7841,23 @@ const de_ListServiceTemplateVersionsOutput = ( output: any, context: __SerdeContext ): ListServiceTemplateVersionsOutput => { - return { - nextToken: __expectString(output.nextToken), - templateVersions: - output.templateVersions != null - ? de_ServiceTemplateVersionSummaryList(output.templateVersions, context) - : undefined, - } as any; + return take(output, { + nextToken: __expectString, + templateVersions: (_: any) => de_ServiceTemplateVersionSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - nextToken: __expectString(output.nextToken), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceOutput omitted. -/** - * deserializeAws_json1_0NotifyResourceDeploymentStatusChangeOutput - */ -const de_NotifyResourceDeploymentStatusChangeOutput = ( - output: any, - context: __SerdeContext -): NotifyResourceDeploymentStatusChangeOutput => { - return {} as any; -}; +// de_NotifyResourceDeploymentStatusChangeOutput omitted. -/** - * deserializeAws_json1_0Output - */ -const de_Output = (output: any, context: __SerdeContext): Output => { - return { - key: __expectString(output.key), - valueString: __expectString(output.valueString), - } as any; -}; +// de_Output omitted. -/** - * deserializeAws_json1_0OutputsList - */ -const de_OutputsList = (output: any, context: __SerdeContext): Output[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Output(entry, context); - }); - return retVal; -}; +// de_OutputsList omitted. -/** - * deserializeAws_json1_0ProvisionedResource - */ -const de_ProvisionedResource = (output: any, context: __SerdeContext): ProvisionedResource => { - return { - identifier: __expectString(output.identifier), - name: __expectString(output.name), - provisioningEngine: __expectString(output.provisioningEngine), - } as any; -}; +// de_ProvisionedResource omitted. -/** - * deserializeAws_json1_0ProvisionedResourceList - */ -const de_ProvisionedResourceList = (output: any, context: __SerdeContext): ProvisionedResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisionedResource(entry, context); - }); - return retVal; -}; +// de_ProvisionedResourceList omitted. /** * deserializeAws_json1_0RejectEnvironmentAccountConnectionOutput @@ -9317,115 +7866,44 @@ const de_RejectEnvironmentAccountConnectionOutput = ( output: any, context: __SerdeContext ): RejectEnvironmentAccountConnectionOutput => { - return { - environmentAccountConnection: - output.environmentAccountConnection != null - ? de_EnvironmentAccountConnection(output.environmentAccountConnection, context) - : undefined, - } as any; + return take(output, { + environmentAccountConnection: (_: any) => de_EnvironmentAccountConnection(_, context), + }) as any; }; -/** - * deserializeAws_json1_0Repository - */ -const de_Repository = (output: any, context: __SerdeContext): Repository => { - return { - arn: __expectString(output.arn), - connectionArn: __expectString(output.connectionArn), - encryptionKey: __expectString(output.encryptionKey), - name: __expectString(output.name), - provider: __expectString(output.provider), - } as any; -}; +// de_Repository omitted. -/** - * deserializeAws_json1_0RepositoryBranch - */ -const de_RepositoryBranch = (output: any, context: __SerdeContext): RepositoryBranch => { - return { - arn: __expectString(output.arn), - branch: __expectString(output.branch), - name: __expectString(output.name), - provider: __expectString(output.provider), - } as any; -}; +// de_RepositoryBranch omitted. -/** - * deserializeAws_json1_0RepositorySummary - */ -const de_RepositorySummary = (output: any, context: __SerdeContext): RepositorySummary => { - return { - arn: __expectString(output.arn), - connectionArn: __expectString(output.connectionArn), - name: __expectString(output.name), - provider: __expectString(output.provider), - } as any; -}; +// de_RepositorySummary omitted. -/** - * deserializeAws_json1_0RepositorySummaryList - */ -const de_RepositorySummaryList = (output: any, context: __SerdeContext): RepositorySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositorySummary(entry, context); - }); - return retVal; -}; +// de_RepositorySummaryList omitted. /** * deserializeAws_json1_0RepositorySyncAttempt */ const de_RepositorySyncAttempt = (output: any, context: __SerdeContext): RepositorySyncAttempt => { - return { - events: output.events != null ? de_RepositorySyncEvents(output.events, context) : undefined, - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + events: (_: any) => de_RepositorySyncEvents(_, context), + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0RepositorySyncDefinition - */ -const de_RepositorySyncDefinition = (output: any, context: __SerdeContext): RepositorySyncDefinition => { - return { - branch: __expectString(output.branch), - directory: __expectString(output.directory), - parent: __expectString(output.parent), - target: __expectString(output.target), - } as any; -}; +// de_RepositorySyncDefinition omitted. -/** - * deserializeAws_json1_0RepositorySyncDefinitionList - */ -const de_RepositorySyncDefinitionList = (output: any, context: __SerdeContext): RepositorySyncDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RepositorySyncDefinition(entry, context); - }); - return retVal; -}; +// de_RepositorySyncDefinitionList omitted. /** * deserializeAws_json1_0RepositorySyncEvent */ const de_RepositorySyncEvent = (output: any, context: __SerdeContext): RepositorySyncEvent => { - return { - event: __expectString(output.event), - externalId: __expectString(output.externalId), - time: output.time != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.time))) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + event: __expectString, + externalId: __expectString, + time: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; }; /** @@ -9435,61 +7913,39 @@ const de_RepositorySyncEvents = (output: any, context: __SerdeContext): Reposito const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RepositorySyncEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ResourceCountsSummary - */ -const de_ResourceCountsSummary = (output: any, context: __SerdeContext): ResourceCountsSummary => { - return { - behindMajor: __expectInt32(output.behindMajor), - behindMinor: __expectInt32(output.behindMinor), - failed: __expectInt32(output.failed), - total: __expectInt32(output.total), - upToDate: __expectInt32(output.upToDate), - } as any; -}; +// de_ResourceCountsSummary omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_0ResourceSyncAttempt */ const de_ResourceSyncAttempt = (output: any, context: __SerdeContext): ResourceSyncAttempt => { - return { - events: output.events != null ? de_ResourceSyncEvents(output.events, context) : undefined, - initialRevision: output.initialRevision != null ? de_Revision(output.initialRevision, context) : undefined, - startedAt: - output.startedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startedAt))) : undefined, - status: __expectString(output.status), - target: __expectString(output.target), - targetRevision: output.targetRevision != null ? de_Revision(output.targetRevision, context) : undefined, - } as any; + return take(output, { + events: (_: any) => de_ResourceSyncEvents(_, context), + initialRevision: _json, + startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + target: __expectString, + targetRevision: _json, + }) as any; }; /** * deserializeAws_json1_0ResourceSyncEvent */ const de_ResourceSyncEvent = (output: any, context: __SerdeContext): ResourceSyncEvent => { - return { - event: __expectString(output.event), - externalId: __expectString(output.externalId), - time: output.time != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.time))) : undefined, - type: __expectString(output.type), - } as any; + return take(output, { + event: __expectString, + externalId: __expectString, + time: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; }; /** @@ -9499,106 +7955,74 @@ const de_ResourceSyncEvents = (output: any, context: __SerdeContext): ResourceSy const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceSyncEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0Revision - */ -const de_Revision = (output: any, context: __SerdeContext): Revision => { - return { - branch: __expectString(output.branch), - directory: __expectString(output.directory), - repositoryName: __expectString(output.repositoryName), - repositoryProvider: __expectString(output.repositoryProvider), - sha: __expectString(output.sha), - } as any; -}; +// de_Revision omitted. /** * deserializeAws_json1_0Service */ const de_Service = (output: any, context: __SerdeContext): Service => { - return { - arn: __expectString(output.arn), - branchName: __expectString(output.branchName), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - pipeline: output.pipeline != null ? de_ServicePipeline(output.pipeline, context) : undefined, - repositoryConnectionArn: __expectString(output.repositoryConnectionArn), - repositoryId: __expectString(output.repositoryId), - spec: __expectString(output.spec), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + branchName: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + pipeline: (_: any) => de_ServicePipeline(_, context), + repositoryConnectionArn: __expectString, + repositoryId: __expectString, + spec: __expectString, + status: __expectString, + statusMessage: __expectString, + templateName: __expectString, + }) as any; }; /** * deserializeAws_json1_0ServiceInstance */ const de_ServiceInstance = (output: any, context: __SerdeContext): ServiceInstance => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - environmentName: __expectString(output.environmentName), - lastClientRequestToken: __expectString(output.lastClientRequestToken), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - name: __expectString(output.name), - serviceName: __expectString(output.serviceName), - spec: __expectString(output.spec), - templateMajorVersion: __expectString(output.templateMajorVersion), - templateMinorVersion: __expectString(output.templateMinorVersion), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + environmentName: __expectString, + lastClientRequestToken: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + serviceName: __expectString, + spec: __expectString, + templateMajorVersion: __expectString, + templateMinorVersion: __expectString, + templateName: __expectString, + }) as any; }; /** * deserializeAws_json1_0ServiceInstanceSummary */ const de_ServiceInstanceSummary = (output: any, context: __SerdeContext): ServiceInstanceSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - environmentName: __expectString(output.environmentName), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - name: __expectString(output.name), - serviceName: __expectString(output.serviceName), - templateMajorVersion: __expectString(output.templateMajorVersion), - templateMinorVersion: __expectString(output.templateMinorVersion), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + environmentName: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + serviceName: __expectString, + templateMajorVersion: __expectString, + templateMinorVersion: __expectString, + templateName: __expectString, + }) as any; }; /** @@ -9608,9 +8032,6 @@ const de_ServiceInstanceSummaryList = (output: any, context: __SerdeContext): Se const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceInstanceSummary(entry, context); }); return retVal; @@ -9620,54 +8041,36 @@ const de_ServiceInstanceSummaryList = (output: any, context: __SerdeContext): Se * deserializeAws_json1_0ServicePipeline */ const de_ServicePipeline = (output: any, context: __SerdeContext): ServicePipeline => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentStatus: __expectString(output.deploymentStatus), - deploymentStatusMessage: __expectString(output.deploymentStatusMessage), - lastDeploymentAttemptedAt: - output.lastDeploymentAttemptedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentAttemptedAt))) - : undefined, - lastDeploymentSucceededAt: - output.lastDeploymentSucceededAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentSucceededAt))) - : undefined, - spec: __expectString(output.spec), - templateMajorVersion: __expectString(output.templateMajorVersion), - templateMinorVersion: __expectString(output.templateMinorVersion), - templateName: __expectString(output.templateName), - } as any; -}; - -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStatus: __expectString, + deploymentStatusMessage: __expectString, + lastDeploymentAttemptedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentSucceededAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + spec: __expectString, + templateMajorVersion: __expectString, + templateMinorVersion: __expectString, + templateName: __expectString, + }) as any; }; +// de_ServiceQuotaExceededException omitted. + /** * deserializeAws_json1_0ServiceSummary */ const de_ServiceSummary = (output: any, context: __SerdeContext): ServiceSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + statusMessage: __expectString, + templateName: __expectString, + }) as any; }; /** @@ -9677,9 +8080,6 @@ const de_ServiceSummaryList = (output: any, context: __SerdeContext): ServiceSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceSummary(entry, context); }); return retVal; @@ -9689,65 +8089,46 @@ const de_ServiceSummaryList = (output: any, context: __SerdeContext): ServiceSum * deserializeAws_json1_0ServiceSyncBlockerSummary */ const de_ServiceSyncBlockerSummary = (output: any, context: __SerdeContext): ServiceSyncBlockerSummary => { - return { - latestBlockers: output.latestBlockers != null ? de_LatestSyncBlockers(output.latestBlockers, context) : undefined, - serviceInstanceName: __expectString(output.serviceInstanceName), - serviceName: __expectString(output.serviceName), - } as any; + return take(output, { + latestBlockers: (_: any) => de_LatestSyncBlockers(_, context), + serviceInstanceName: __expectString, + serviceName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ServiceSyncConfig - */ -const de_ServiceSyncConfig = (output: any, context: __SerdeContext): ServiceSyncConfig => { - return { - branch: __expectString(output.branch), - filePath: __expectString(output.filePath), - repositoryName: __expectString(output.repositoryName), - repositoryProvider: __expectString(output.repositoryProvider), - serviceName: __expectString(output.serviceName), - } as any; -}; +// de_ServiceSyncConfig omitted. /** * deserializeAws_json1_0ServiceTemplate */ const de_ServiceTemplate = (output: any, context: __SerdeContext): ServiceTemplate => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - displayName: __expectString(output.displayName), - encryptionKey: __expectString(output.encryptionKey), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - pipelineProvisioning: __expectString(output.pipelineProvisioning), - recommendedVersion: __expectString(output.recommendedVersion), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + displayName: __expectString, + encryptionKey: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + pipelineProvisioning: __expectString, + recommendedVersion: __expectString, + }) as any; }; /** * deserializeAws_json1_0ServiceTemplateSummary */ const de_ServiceTemplateSummary = (output: any, context: __SerdeContext): ServiceTemplateSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - displayName: __expectString(output.displayName), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - name: __expectString(output.name), - pipelineProvisioning: __expectString(output.pipelineProvisioning), - recommendedVersion: __expectString(output.recommendedVersion), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + displayName: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + pipelineProvisioning: __expectString, + recommendedVersion: __expectString, + }) as any; }; /** @@ -9757,83 +8138,50 @@ const de_ServiceTemplateSummaryList = (output: any, context: __SerdeContext): Se const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceTemplateSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ServiceTemplateSupportedComponentSourceInputList - */ -const de_ServiceTemplateSupportedComponentSourceInputList = ( - output: any, - context: __SerdeContext -): (ServiceTemplateSupportedComponentSourceType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ServiceTemplateSupportedComponentSourceInputList omitted. /** * deserializeAws_json1_0ServiceTemplateVersion */ const de_ServiceTemplateVersion = (output: any, context: __SerdeContext): ServiceTemplateVersion => { - return { - arn: __expectString(output.arn), - compatibleEnvironmentTemplates: - output.compatibleEnvironmentTemplates != null - ? de_CompatibleEnvironmentTemplateList(output.compatibleEnvironmentTemplates, context) - : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - majorVersion: __expectString(output.majorVersion), - minorVersion: __expectString(output.minorVersion), - recommendedMinorVersion: __expectString(output.recommendedMinorVersion), - schema: __expectString(output.schema), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - supportedComponentSources: - output.supportedComponentSources != null - ? de_ServiceTemplateSupportedComponentSourceInputList(output.supportedComponentSources, context) - : undefined, - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + compatibleEnvironmentTemplates: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + majorVersion: __expectString, + minorVersion: __expectString, + recommendedMinorVersion: __expectString, + schema: __expectString, + status: __expectString, + statusMessage: __expectString, + supportedComponentSources: _json, + templateName: __expectString, + }) as any; }; /** * deserializeAws_json1_0ServiceTemplateVersionSummary */ const de_ServiceTemplateVersionSummary = (output: any, context: __SerdeContext): ServiceTemplateVersionSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - description: __expectString(output.description), - lastModifiedAt: - output.lastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedAt))) - : undefined, - majorVersion: __expectString(output.majorVersion), - minorVersion: __expectString(output.minorVersion), - recommendedMinorVersion: __expectString(output.recommendedMinorVersion), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - templateName: __expectString(output.templateName), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + majorVersion: __expectString, + minorVersion: __expectString, + recommendedMinorVersion: __expectString, + status: __expectString, + statusMessage: __expectString, + templateName: __expectString, + }) as any; }; /** @@ -9846,9 +8194,6 @@ const de_ServiceTemplateVersionSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceTemplateVersionSummary(entry, context); }); return retVal; @@ -9858,123 +8203,43 @@ const de_ServiceTemplateVersionSummaryList = ( * deserializeAws_json1_0SyncBlocker */ const de_SyncBlocker = (output: any, context: __SerdeContext): SyncBlocker => { - return { - contexts: output.contexts != null ? de_SyncBlockerContexts(output.contexts, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdReason: __expectString(output.createdReason), - id: __expectString(output.id), - resolvedAt: - output.resolvedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resolvedAt))) : undefined, - resolvedReason: __expectString(output.resolvedReason), - status: __expectString(output.status), - type: __expectString(output.type), - } as any; + return take(output, { + contexts: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdReason: __expectString, + id: __expectString, + resolvedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resolvedReason: __expectString, + status: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0SyncBlockerContext - */ -const de_SyncBlockerContext = (output: any, context: __SerdeContext): SyncBlockerContext => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_SyncBlockerContext omitted. -/** - * deserializeAws_json1_0SyncBlockerContexts - */ -const de_SyncBlockerContexts = (output: any, context: __SerdeContext): SyncBlockerContext[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SyncBlockerContext(entry, context); - }); - return retVal; -}; +// de_SyncBlockerContexts omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_0TemplateSyncConfig - */ -const de_TemplateSyncConfig = (output: any, context: __SerdeContext): TemplateSyncConfig => { - return { - branch: __expectString(output.branch), - repositoryName: __expectString(output.repositoryName), - repositoryProvider: __expectString(output.repositoryProvider), - subdirectory: __expectString(output.subdirectory), - templateName: __expectString(output.templateName), - templateType: __expectString(output.templateType), - } as any; -}; +// de_TemplateSyncConfig omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_UntagResourceOutput omitted. -/** - * deserializeAws_json1_0UpdateAccountSettingsOutput - */ -const de_UpdateAccountSettingsOutput = (output: any, context: __SerdeContext): UpdateAccountSettingsOutput => { - return { - accountSettings: output.accountSettings != null ? de_AccountSettings(output.accountSettings, context) : undefined, - } as any; -}; +// de_UpdateAccountSettingsOutput omitted. /** * deserializeAws_json1_0UpdateComponentOutput */ const de_UpdateComponentOutput = (output: any, context: __SerdeContext): UpdateComponentOutput => { - return { - component: output.component != null ? de_Component(output.component, context) : undefined, - } as any; + return take(output, { + component: (_: any) => de_Component(_, context), + }) as any; }; /** @@ -9984,31 +8249,27 @@ const de_UpdateEnvironmentAccountConnectionOutput = ( output: any, context: __SerdeContext ): UpdateEnvironmentAccountConnectionOutput => { - return { - environmentAccountConnection: - output.environmentAccountConnection != null - ? de_EnvironmentAccountConnection(output.environmentAccountConnection, context) - : undefined, - } as any; + return take(output, { + environmentAccountConnection: (_: any) => de_EnvironmentAccountConnection(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateEnvironmentOutput */ const de_UpdateEnvironmentOutput = (output: any, context: __SerdeContext): UpdateEnvironmentOutput => { - return { - environment: output.environment != null ? de_Environment(output.environment, context) : undefined, - } as any; + return take(output, { + environment: (_: any) => de_Environment(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateEnvironmentTemplateOutput */ const de_UpdateEnvironmentTemplateOutput = (output: any, context: __SerdeContext): UpdateEnvironmentTemplateOutput => { - return { - environmentTemplate: - output.environmentTemplate != null ? de_EnvironmentTemplate(output.environmentTemplate, context) : undefined, - } as any; + return take(output, { + environmentTemplate: (_: any) => de_EnvironmentTemplate(_, context), + }) as any; }; /** @@ -10018,70 +8279,58 @@ const de_UpdateEnvironmentTemplateVersionOutput = ( output: any, context: __SerdeContext ): UpdateEnvironmentTemplateVersionOutput => { - return { - environmentTemplateVersion: - output.environmentTemplateVersion != null - ? de_EnvironmentTemplateVersion(output.environmentTemplateVersion, context) - : undefined, - } as any; + return take(output, { + environmentTemplateVersion: (_: any) => de_EnvironmentTemplateVersion(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateServiceInstanceOutput */ const de_UpdateServiceInstanceOutput = (output: any, context: __SerdeContext): UpdateServiceInstanceOutput => { - return { - serviceInstance: output.serviceInstance != null ? de_ServiceInstance(output.serviceInstance, context) : undefined, - } as any; + return take(output, { + serviceInstance: (_: any) => de_ServiceInstance(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateServiceOutput */ const de_UpdateServiceOutput = (output: any, context: __SerdeContext): UpdateServiceOutput => { - return { - service: output.service != null ? de_Service(output.service, context) : undefined, - } as any; + return take(output, { + service: (_: any) => de_Service(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateServicePipelineOutput */ const de_UpdateServicePipelineOutput = (output: any, context: __SerdeContext): UpdateServicePipelineOutput => { - return { - pipeline: output.pipeline != null ? de_ServicePipeline(output.pipeline, context) : undefined, - } as any; + return take(output, { + pipeline: (_: any) => de_ServicePipeline(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateServiceSyncBlockerOutput */ const de_UpdateServiceSyncBlockerOutput = (output: any, context: __SerdeContext): UpdateServiceSyncBlockerOutput => { - return { - serviceInstanceName: __expectString(output.serviceInstanceName), - serviceName: __expectString(output.serviceName), - serviceSyncBlocker: - output.serviceSyncBlocker != null ? de_SyncBlocker(output.serviceSyncBlocker, context) : undefined, - } as any; + return take(output, { + serviceInstanceName: __expectString, + serviceName: __expectString, + serviceSyncBlocker: (_: any) => de_SyncBlocker(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UpdateServiceSyncConfigOutput - */ -const de_UpdateServiceSyncConfigOutput = (output: any, context: __SerdeContext): UpdateServiceSyncConfigOutput => { - return { - serviceSyncConfig: - output.serviceSyncConfig != null ? de_ServiceSyncConfig(output.serviceSyncConfig, context) : undefined, - } as any; -}; +// de_UpdateServiceSyncConfigOutput omitted. /** * deserializeAws_json1_0UpdateServiceTemplateOutput */ const de_UpdateServiceTemplateOutput = (output: any, context: __SerdeContext): UpdateServiceTemplateOutput => { - return { - serviceTemplate: output.serviceTemplate != null ? de_ServiceTemplate(output.serviceTemplate, context) : undefined, - } as any; + return take(output, { + serviceTemplate: (_: any) => de_ServiceTemplate(_, context), + }) as any; }; /** @@ -10091,32 +8340,14 @@ const de_UpdateServiceTemplateVersionOutput = ( output: any, context: __SerdeContext ): UpdateServiceTemplateVersionOutput => { - return { - serviceTemplateVersion: - output.serviceTemplateVersion != null - ? de_ServiceTemplateVersion(output.serviceTemplateVersion, context) - : undefined, - } as any; + return take(output, { + serviceTemplateVersion: (_: any) => de_ServiceTemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UpdateTemplateSyncConfigOutput - */ -const de_UpdateTemplateSyncConfigOutput = (output: any, context: __SerdeContext): UpdateTemplateSyncConfigOutput => { - return { - templateSyncConfig: - output.templateSyncConfig != null ? de_TemplateSyncConfig(output.templateSyncConfig, context) : undefined, - } as any; -}; +// de_UpdateTemplateSyncConfigOutput omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -10138,6 +8369,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-qldb-session/src/protocols/Aws_json1_0.ts b/clients/client-qldb-session/src/protocols/Aws_json1_0.ts index c232782e194c..9589abcd4e7e 100644 --- a/clients/client-qldb-session/src/protocols/Aws_json1_0.ts +++ b/clients/client-qldb-session/src/protocols/Aws_json1_0.ts @@ -1,10 +1,11 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectString as __expectString, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -16,19 +17,16 @@ import { import { SendCommandCommandInput, SendCommandCommandOutput } from "../commands/SendCommandCommand"; import { AbortTransactionRequest, - AbortTransactionResult, BadRequestException, CapacityExceededException, CommitTransactionRequest, CommitTransactionResult, EndSessionRequest, - EndSessionResult, ExecuteStatementRequest, ExecuteStatementResult, FetchPageRequest, FetchPageResult, InvalidSessionException, - IOUsage, LimitExceededException, OccConflictException, Page, @@ -36,10 +34,7 @@ import { SendCommandRequest, SendCommandResult, StartSessionRequest, - StartSessionResult, StartTransactionRequest, - StartTransactionResult, - TimingInformation, ValueHolder, } from "../models/models_0"; import { QLDBSessionServiceException as __BaseException } from "../models/QLDBSessionServiceException"; @@ -74,7 +69,7 @@ export const de_SendCommandCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -110,10 +105,9 @@ const de_SendCommandCommandError = async ( throw await de_RateExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -124,7 +118,7 @@ const de_SendCommandCommandError = async ( */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BadRequestException(body, context); + const deserialized: any = _json(body); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -140,7 +134,7 @@ const de_CapacityExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CapacityExceededException(body, context); + const deserialized: any = _json(body); const exception = new CapacityExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -156,7 +150,7 @@ const de_InvalidSessionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSessionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidSessionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -172,7 +166,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -188,7 +182,7 @@ const de_OccConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OccConflictException(body, context); + const deserialized: any = _json(body); const exception = new OccConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -204,7 +198,7 @@ const de_RateExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RateExceededException(body, context); + const deserialized: any = _json(body); const exception = new RateExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -212,90 +206,52 @@ const de_RateExceededExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AbortTransactionRequest - */ -const se_AbortTransactionRequest = (input: AbortTransactionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_AbortTransactionRequest omitted. /** * serializeAws_json1_0CommitTransactionRequest */ const se_CommitTransactionRequest = (input: CommitTransactionRequest, context: __SerdeContext): any => { - return { - ...(input.CommitDigest != null && { CommitDigest: context.base64Encoder(input.CommitDigest) }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; + return take(input, { + CommitDigest: context.base64Encoder, + TransactionId: [], + }); }; -/** - * serializeAws_json1_0EndSessionRequest - */ -const se_EndSessionRequest = (input: EndSessionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_EndSessionRequest omitted. /** * serializeAws_json1_0ExecuteStatementRequest */ const se_ExecuteStatementRequest = (input: ExecuteStatementRequest, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_StatementParameters(input.Parameters, context) }), - ...(input.Statement != null && { Statement: input.Statement }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; + return take(input, { + Parameters: (_) => se_StatementParameters(_, context), + Statement: [], + TransactionId: [], + }); }; -/** - * serializeAws_json1_0FetchPageRequest - */ -const se_FetchPageRequest = (input: FetchPageRequest, context: __SerdeContext): any => { - return { - ...(input.NextPageToken != null && { NextPageToken: input.NextPageToken }), - ...(input.TransactionId != null && { TransactionId: input.TransactionId }), - }; -}; +// se_FetchPageRequest omitted. /** * serializeAws_json1_0SendCommandRequest */ const se_SendCommandRequest = (input: SendCommandRequest, context: __SerdeContext): any => { - return { - ...(input.AbortTransaction != null && { - AbortTransaction: se_AbortTransactionRequest(input.AbortTransaction, context), - }), - ...(input.CommitTransaction != null && { - CommitTransaction: se_CommitTransactionRequest(input.CommitTransaction, context), - }), - ...(input.EndSession != null && { EndSession: se_EndSessionRequest(input.EndSession, context) }), - ...(input.ExecuteStatement != null && { - ExecuteStatement: se_ExecuteStatementRequest(input.ExecuteStatement, context), - }), - ...(input.FetchPage != null && { FetchPage: se_FetchPageRequest(input.FetchPage, context) }), - ...(input.SessionToken != null && { SessionToken: input.SessionToken }), - ...(input.StartSession != null && { StartSession: se_StartSessionRequest(input.StartSession, context) }), - ...(input.StartTransaction != null && { - StartTransaction: se_StartTransactionRequest(input.StartTransaction, context), - }), - }; + return take(input, { + AbortTransaction: _json, + CommitTransaction: (_) => se_CommitTransactionRequest(_, context), + EndSession: _json, + ExecuteStatement: (_) => se_ExecuteStatementRequest(_, context), + FetchPage: _json, + SessionToken: [], + StartSession: _json, + StartTransaction: _json, + }); }; -/** - * serializeAws_json1_0StartSessionRequest - */ -const se_StartSessionRequest = (input: StartSessionRequest, context: __SerdeContext): any => { - return { - ...(input.LedgerName != null && { LedgerName: input.LedgerName }), - }; -}; +// se_StartSessionRequest omitted. -/** - * serializeAws_json1_0StartTransactionRequest - */ -const se_StartTransactionRequest = (input: StartTransactionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_StartTransactionRequest omitted. /** * serializeAws_json1_0StatementParameters @@ -312,203 +268,103 @@ const se_StatementParameters = (input: ValueHolder[], context: __SerdeContext): * serializeAws_json1_0ValueHolder */ const se_ValueHolder = (input: ValueHolder, context: __SerdeContext): any => { - return { - ...(input.IonBinary != null && { IonBinary: context.base64Encoder(input.IonBinary) }), - ...(input.IonText != null && { IonText: input.IonText }), - }; + return take(input, { + IonBinary: context.base64Encoder, + IonText: [], + }); }; -/** - * deserializeAws_json1_0AbortTransactionResult - */ -const de_AbortTransactionResult = (output: any, context: __SerdeContext): AbortTransactionResult => { - return { - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - } as any; -}; +// de_AbortTransactionResult omitted. -/** - * deserializeAws_json1_0BadRequestException - */ -const de_BadRequestException = (output: any, context: __SerdeContext): BadRequestException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_BadRequestException omitted. -/** - * deserializeAws_json1_0CapacityExceededException - */ -const de_CapacityExceededException = (output: any, context: __SerdeContext): CapacityExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CapacityExceededException omitted. /** * deserializeAws_json1_0CommitTransactionResult */ const de_CommitTransactionResult = (output: any, context: __SerdeContext): CommitTransactionResult => { - return { - CommitDigest: output.CommitDigest != null ? context.base64Decoder(output.CommitDigest) : undefined, - ConsumedIOs: output.ConsumedIOs != null ? de_IOUsage(output.ConsumedIOs, context) : undefined, - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - TransactionId: __expectString(output.TransactionId), - } as any; + return take(output, { + CommitDigest: context.base64Decoder, + ConsumedIOs: _json, + TimingInformation: _json, + TransactionId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0EndSessionResult - */ -const de_EndSessionResult = (output: any, context: __SerdeContext): EndSessionResult => { - return { - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - } as any; -}; +// de_EndSessionResult omitted. /** * deserializeAws_json1_0ExecuteStatementResult */ const de_ExecuteStatementResult = (output: any, context: __SerdeContext): ExecuteStatementResult => { - return { - ConsumedIOs: output.ConsumedIOs != null ? de_IOUsage(output.ConsumedIOs, context) : undefined, - FirstPage: output.FirstPage != null ? de_Page(output.FirstPage, context) : undefined, - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - } as any; + return take(output, { + ConsumedIOs: _json, + FirstPage: (_: any) => de_Page(_, context), + TimingInformation: _json, + }) as any; }; /** * deserializeAws_json1_0FetchPageResult */ const de_FetchPageResult = (output: any, context: __SerdeContext): FetchPageResult => { - return { - ConsumedIOs: output.ConsumedIOs != null ? de_IOUsage(output.ConsumedIOs, context) : undefined, - Page: output.Page != null ? de_Page(output.Page, context) : undefined, - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - } as any; + return take(output, { + ConsumedIOs: _json, + Page: (_: any) => de_Page(_, context), + TimingInformation: _json, + }) as any; }; -/** - * deserializeAws_json1_0InvalidSessionException - */ -const de_InvalidSessionException = (output: any, context: __SerdeContext): InvalidSessionException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidSessionException omitted. -/** - * deserializeAws_json1_0IOUsage - */ -const de_IOUsage = (output: any, context: __SerdeContext): IOUsage => { - return { - ReadIOs: __expectLong(output.ReadIOs), - WriteIOs: __expectLong(output.WriteIOs), - } as any; -}; +// de_IOUsage omitted. -/** - * deserializeAws_json1_0LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_0OccConflictException - */ -const de_OccConflictException = (output: any, context: __SerdeContext): OccConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OccConflictException omitted. /** * deserializeAws_json1_0Page */ const de_Page = (output: any, context: __SerdeContext): Page => { - return { - NextPageToken: __expectString(output.NextPageToken), - Values: output.Values != null ? de_ValueHolders(output.Values, context) : undefined, - } as any; + return take(output, { + NextPageToken: __expectString, + Values: (_: any) => de_ValueHolders(_, context), + }) as any; }; -/** - * deserializeAws_json1_0RateExceededException - */ -const de_RateExceededException = (output: any, context: __SerdeContext): RateExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_RateExceededException omitted. /** * deserializeAws_json1_0SendCommandResult */ const de_SendCommandResult = (output: any, context: __SerdeContext): SendCommandResult => { - return { - AbortTransaction: - output.AbortTransaction != null ? de_AbortTransactionResult(output.AbortTransaction, context) : undefined, - CommitTransaction: - output.CommitTransaction != null ? de_CommitTransactionResult(output.CommitTransaction, context) : undefined, - EndSession: output.EndSession != null ? de_EndSessionResult(output.EndSession, context) : undefined, - ExecuteStatement: - output.ExecuteStatement != null ? de_ExecuteStatementResult(output.ExecuteStatement, context) : undefined, - FetchPage: output.FetchPage != null ? de_FetchPageResult(output.FetchPage, context) : undefined, - StartSession: output.StartSession != null ? de_StartSessionResult(output.StartSession, context) : undefined, - StartTransaction: - output.StartTransaction != null ? de_StartTransactionResult(output.StartTransaction, context) : undefined, - } as any; + return take(output, { + AbortTransaction: _json, + CommitTransaction: (_: any) => de_CommitTransactionResult(_, context), + EndSession: _json, + ExecuteStatement: (_: any) => de_ExecuteStatementResult(_, context), + FetchPage: (_: any) => de_FetchPageResult(_, context), + StartSession: _json, + StartTransaction: _json, + }) as any; }; -/** - * deserializeAws_json1_0StartSessionResult - */ -const de_StartSessionResult = (output: any, context: __SerdeContext): StartSessionResult => { - return { - SessionToken: __expectString(output.SessionToken), - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - } as any; -}; +// de_StartSessionResult omitted. -/** - * deserializeAws_json1_0StartTransactionResult - */ -const de_StartTransactionResult = (output: any, context: __SerdeContext): StartTransactionResult => { - return { - TimingInformation: - output.TimingInformation != null ? de_TimingInformation(output.TimingInformation, context) : undefined, - TransactionId: __expectString(output.TransactionId), - } as any; -}; +// de_StartTransactionResult omitted. -/** - * deserializeAws_json1_0TimingInformation - */ -const de_TimingInformation = (output: any, context: __SerdeContext): TimingInformation => { - return { - ProcessingTimeMilliseconds: __expectLong(output.ProcessingTimeMilliseconds), - } as any; -}; +// de_TimingInformation omitted. /** * deserializeAws_json1_0ValueHolder */ const de_ValueHolder = (output: any, context: __SerdeContext): ValueHolder => { - return { - IonBinary: output.IonBinary != null ? context.base64Decoder(output.IonBinary) : undefined, - IonText: __expectString(output.IonText), - } as any; + return take(output, { + IonBinary: context.base64Decoder, + IonText: __expectString, + }) as any; }; /** @@ -518,9 +374,6 @@ const de_ValueHolders = (output: any, context: __SerdeContext): ValueHolder[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ValueHolder(entry, context); }); return retVal; @@ -546,6 +399,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-qldb/src/protocols/Aws_restJson1.ts b/clients/client-qldb/src/protocols/Aws_restJson1.ts index 2bd84399b6bc..687c2b047bbd 100644 --- a/clients/client-qldb/src/protocols/Aws_restJson1.ts +++ b/clients/client-qldb/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -123,13 +125,15 @@ export const se_CreateLedgerCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ledgers"; let body: any; - body = JSON.stringify({ - ...(input.DeletionProtection != null && { DeletionProtection: input.DeletionProtection }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PermissionsMode != null && { PermissionsMode: input.PermissionsMode }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DeletionProtection: [], + KmsKey: [], + Name: [], + PermissionsMode: [], + Tags: (_) => se_Tags(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -254,17 +258,15 @@ export const se_ExportJournalToS3Command = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ledgers/{Name}/journal-s3-exports"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.ExclusiveEndTime != null && { ExclusiveEndTime: Math.round(input.ExclusiveEndTime.getTime() / 1000) }), - ...(input.InclusiveStartTime != null && { - InclusiveStartTime: Math.round(input.InclusiveStartTime.getTime() / 1000), - }), - ...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.S3ExportConfiguration != null && { - S3ExportConfiguration: se_S3ExportConfiguration(input.S3ExportConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + ExclusiveEndTime: (_) => Math.round(_.getTime() / 1000), + InclusiveStartTime: (_) => Math.round(_.getTime() / 1000), + OutputFormat: [], + RoleArn: [], + S3ExportConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -290,10 +292,12 @@ export const se_GetBlockCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ledgers/{Name}/block"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.BlockAddress != null && { BlockAddress: se_ValueHolder(input.BlockAddress, context) }), - ...(input.DigestTipAddress != null && { DigestTipAddress: se_ValueHolder(input.DigestTipAddress, context) }), - }); + body = JSON.stringify( + take(input, { + BlockAddress: (_) => _json(_), + DigestTipAddress: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -342,11 +346,13 @@ export const se_GetRevisionCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ledgers/{Name}/revision"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.BlockAddress != null && { BlockAddress: se_ValueHolder(input.BlockAddress, context) }), - ...(input.DigestTipAddress != null && { DigestTipAddress: se_ValueHolder(input.DigestTipAddress, context) }), - ...(input.DocumentId != null && { DocumentId: input.DocumentId }), - }); + body = JSON.stringify( + take(input, { + BlockAddress: (_) => _json(_), + DigestTipAddress: (_) => _json(_), + DocumentId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -510,18 +516,16 @@ export const se_StreamJournalToKinesisCommand = async ( "/ledgers/{LedgerName}/journal-kinesis-streams"; resolvedPath = __resolvedPath(resolvedPath, input, "LedgerName", () => input.LedgerName!, "{LedgerName}", false); let body: any; - body = JSON.stringify({ - ...(input.ExclusiveEndTime != null && { ExclusiveEndTime: Math.round(input.ExclusiveEndTime.getTime() / 1000) }), - ...(input.InclusiveStartTime != null && { - InclusiveStartTime: Math.round(input.InclusiveStartTime.getTime() / 1000), - }), - ...(input.KinesisConfiguration != null && { - KinesisConfiguration: se_KinesisConfiguration(input.KinesisConfiguration, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ExclusiveEndTime: (_) => Math.round(_.getTime() / 1000), + InclusiveStartTime: (_) => Math.round(_.getTime() / 1000), + KinesisConfiguration: (_) => _json(_), + RoleArn: [], + StreamName: [], + Tags: (_) => se_Tags(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -547,9 +551,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => se_Tags(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -605,10 +611,12 @@ export const se_UpdateLedgerCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ledgers/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.DeletionProtection != null && { DeletionProtection: input.DeletionProtection }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - }); + body = JSON.stringify( + take(input, { + DeletionProtection: [], + KmsKey: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -635,9 +643,11 @@ export const se_UpdateLedgerPermissionsModeCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ledgers/{Name}/permissions-mode"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.PermissionsMode != null && { PermissionsMode: input.PermissionsMode }), - }); + body = JSON.stringify( + take(input, { + PermissionsMode: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -663,9 +673,10 @@ export const de_CancelJournalKinesisStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamId != null) { - contents.StreamId = __expectString(data.StreamId); - } + const doc = take(data, { + StreamId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -693,10 +704,9 @@ const de_CancelJournalKinesisStreamCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -716,27 +726,16 @@ export const de_CreateLedgerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationDateTime != null) { - contents.CreationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDateTime))); - } - if (data.DeletionProtection != null) { - contents.DeletionProtection = __expectBoolean(data.DeletionProtection); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PermissionsMode != null) { - contents.PermissionsMode = __expectString(data.PermissionsMode); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + CreationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtection: __expectBoolean, + KmsKeyArn: __expectString, + Name: __expectString, + PermissionsMode: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -767,10 +766,9 @@ const de_CreateLedgerCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -820,10 +818,9 @@ const de_DeleteLedgerCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -843,9 +840,10 @@ export const de_DescribeJournalKinesisStreamCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Stream != null) { - contents.Stream = de_JournalKinesisStreamDescription(data.Stream, context); - } + const doc = take(data, { + Stream: (_) => de_JournalKinesisStreamDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -873,10 +871,9 @@ const de_DescribeJournalKinesisStreamCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -896,9 +893,10 @@ export const de_DescribeJournalS3ExportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ExportDescription != null) { - contents.ExportDescription = de_JournalS3ExportDescription(data.ExportDescription, context); - } + const doc = take(data, { + ExportDescription: (_) => de_JournalS3ExportDescription(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -920,10 +918,9 @@ const de_DescribeJournalS3ExportCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -943,27 +940,16 @@ export const de_DescribeLedgerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationDateTime != null) { - contents.CreationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDateTime))); - } - if (data.DeletionProtection != null) { - contents.DeletionProtection = __expectBoolean(data.DeletionProtection); - } - if (data.EncryptionDescription != null) { - contents.EncryptionDescription = de_LedgerEncryptionDescription(data.EncryptionDescription, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PermissionsMode != null) { - contents.PermissionsMode = __expectString(data.PermissionsMode); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + CreationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtection: __expectBoolean, + EncryptionDescription: (_) => de_LedgerEncryptionDescription(_, context), + Name: __expectString, + PermissionsMode: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -988,10 +974,9 @@ const de_DescribeLedgerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1011,9 +996,10 @@ export const de_ExportJournalToS3Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ExportId != null) { - contents.ExportId = __expectString(data.ExportId); - } + const doc = take(data, { + ExportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1038,10 +1024,9 @@ const de_ExportJournalToS3CommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1061,12 +1046,11 @@ export const de_GetBlockCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Block != null) { - contents.Block = de_ValueHolder(data.Block, context); - } - if (data.Proof != null) { - contents.Proof = de_ValueHolder(data.Proof, context); - } + const doc = take(data, { + Block: _json, + Proof: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1094,10 +1078,9 @@ const de_GetBlockCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,12 +1100,11 @@ export const de_GetDigestCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Digest != null) { - contents.Digest = context.base64Decoder(data.Digest); - } - if (data.DigestTipAddress != null) { - contents.DigestTipAddress = de_ValueHolder(data.DigestTipAddress, context); - } + const doc = take(data, { + Digest: context.base64Decoder, + DigestTipAddress: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1150,10 +1132,9 @@ const de_GetDigestCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1173,12 +1154,11 @@ export const de_GetRevisionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Proof != null) { - contents.Proof = de_ValueHolder(data.Proof, context); - } - if (data.Revision != null) { - contents.Revision = de_ValueHolder(data.Revision, context); - } + const doc = take(data, { + Proof: _json, + Revision: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1206,10 +1186,9 @@ const de_GetRevisionCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,12 +1208,11 @@ export const de_ListJournalKinesisStreamsForLedgerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Streams != null) { - contents.Streams = de_JournalKinesisStreamDescriptionList(data.Streams, context); - } + const doc = take(data, { + NextToken: __expectString, + Streams: (_) => de_JournalKinesisStreamDescriptionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1262,10 +1240,9 @@ const de_ListJournalKinesisStreamsForLedgerCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1285,12 +1262,11 @@ export const de_ListJournalS3ExportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JournalS3Exports != null) { - contents.JournalS3Exports = de_JournalS3ExportList(data.JournalS3Exports, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + JournalS3Exports: (_) => de_JournalS3ExportList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1307,10 +1283,9 @@ const de_ListJournalS3ExportsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1329,12 +1304,11 @@ export const de_ListJournalS3ExportsForLedgerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JournalS3Exports != null) { - contents.JournalS3Exports = de_JournalS3ExportList(data.JournalS3Exports, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + JournalS3Exports: (_) => de_JournalS3ExportList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1351,10 +1325,9 @@ const de_ListJournalS3ExportsForLedgerCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1373,12 +1346,11 @@ export const de_ListLedgersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Ledgers != null) { - contents.Ledgers = de_LedgerList(data.Ledgers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Ledgers: (_) => de_LedgerList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1395,10 +1367,9 @@ const de_ListLedgersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1417,9 +1388,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Tags: (_) => de_Tags(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1444,10 +1416,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1467,9 +1438,10 @@ export const de_StreamJournalToKinesisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StreamId != null) { - contents.StreamId = __expectString(data.StreamId); - } + const doc = take(data, { + StreamId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1497,10 +1469,9 @@ const de_StreamJournalToKinesisCommandError = async ( throw await de_ResourcePreconditionNotMetExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1544,10 +1515,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1591,10 +1561,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1614,24 +1583,15 @@ export const de_UpdateLedgerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationDateTime != null) { - contents.CreationDateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDateTime))); - } - if (data.DeletionProtection != null) { - contents.DeletionProtection = __expectBoolean(data.DeletionProtection); - } - if (data.EncryptionDescription != null) { - contents.EncryptionDescription = de_LedgerEncryptionDescription(data.EncryptionDescription, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + CreationDateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionProtection: __expectBoolean, + EncryptionDescription: (_) => de_LedgerEncryptionDescription(_, context), + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1656,10 +1616,9 @@ const de_UpdateLedgerCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1679,15 +1638,12 @@ export const de_UpdateLedgerPermissionsModeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.PermissionsMode != null) { - contents.PermissionsMode = __expectString(data.PermissionsMode); - } + const doc = take(data, { + Arn: __expectString, + Name: __expectString, + PermissionsMode: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1712,16 +1668,15 @@ const de_UpdateLedgerPermissionsModeCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InvalidParameterExceptionRes */ @@ -1731,12 +1686,11 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ParameterName != null) { - contents.ParameterName = __expectString(data.ParameterName); - } + const doc = take(data, { + Message: __expectString, + ParameterName: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1753,12 +1707,11 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1775,15 +1728,12 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1800,15 +1750,12 @@ const de_ResourceInUseExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1825,15 +1772,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1850,15 +1794,12 @@ const de_ResourcePreconditionNotMetExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourcePreconditionNotMetException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1866,38 +1807,11 @@ const de_ResourcePreconditionNotMetExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1KinesisConfiguration - */ -const se_KinesisConfiguration = (input: KinesisConfiguration, context: __SerdeContext): any => { - return { - ...(input.AggregationEnabled != null && { AggregationEnabled: input.AggregationEnabled }), - ...(input.StreamArn != null && { StreamArn: input.StreamArn }), - }; -}; +// se_KinesisConfiguration omitted. -/** - * serializeAws_restJson1S3EncryptionConfiguration - */ -const se_S3EncryptionConfiguration = (input: S3EncryptionConfiguration, context: __SerdeContext): any => { - return { - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.ObjectEncryptionType != null && { ObjectEncryptionType: input.ObjectEncryptionType }), - }; -}; +// se_S3EncryptionConfiguration omitted. -/** - * serializeAws_restJson1S3ExportConfiguration - */ -const se_S3ExportConfiguration = (input: S3ExportConfiguration, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.EncryptionConfiguration != null && { - EncryptionConfiguration: se_S3EncryptionConfiguration(input.EncryptionConfiguration, context), - }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_S3ExportConfiguration omitted. /** * serializeAws_restJson1Tags @@ -1913,42 +1827,25 @@ const se_Tags = (input: Record, context: __SerdeContext): any => }, {}); }; -/** - * serializeAws_restJson1ValueHolder - */ -const se_ValueHolder = (input: ValueHolder, context: __SerdeContext): any => { - return { - ...(input.IonText != null && { IonText: input.IonText }), - }; -}; +// se_ValueHolder omitted. /** * deserializeAws_restJson1JournalKinesisStreamDescription */ const de_JournalKinesisStreamDescription = (output: any, context: __SerdeContext): JournalKinesisStreamDescription => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ErrorCause: __expectString(output.ErrorCause), - ExclusiveEndTime: - output.ExclusiveEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExclusiveEndTime))) - : undefined, - InclusiveStartTime: - output.InclusiveStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InclusiveStartTime))) - : undefined, - KinesisConfiguration: - output.KinesisConfiguration != null ? de_KinesisConfiguration(output.KinesisConfiguration, context) : undefined, - LedgerName: __expectString(output.LedgerName), - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - StreamId: __expectString(output.StreamId), - StreamName: __expectString(output.StreamName), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorCause: __expectString, + ExclusiveEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InclusiveStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KinesisConfiguration: _json, + LedgerName: __expectString, + RoleArn: __expectString, + Status: __expectString, + StreamId: __expectString, + StreamName: __expectString, + }) as any; }; /** @@ -1961,9 +1858,6 @@ const de_JournalKinesisStreamDescriptionList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JournalKinesisStreamDescription(entry, context); }); return retVal; @@ -1973,29 +1867,17 @@ const de_JournalKinesisStreamDescriptionList = ( * deserializeAws_restJson1JournalS3ExportDescription */ const de_JournalS3ExportDescription = (output: any, context: __SerdeContext): JournalS3ExportDescription => { - return { - ExclusiveEndTime: - output.ExclusiveEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExclusiveEndTime))) - : undefined, - ExportCreationTime: - output.ExportCreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExportCreationTime))) - : undefined, - ExportId: __expectString(output.ExportId), - InclusiveStartTime: - output.InclusiveStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InclusiveStartTime))) - : undefined, - LedgerName: __expectString(output.LedgerName), - OutputFormat: __expectString(output.OutputFormat), - RoleArn: __expectString(output.RoleArn), - S3ExportConfiguration: - output.S3ExportConfiguration != null - ? de_S3ExportConfiguration(output.S3ExportConfiguration, context) - : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + ExclusiveEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExportCreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExportId: __expectString, + InclusiveStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LedgerName: __expectString, + OutputFormat: __expectString, + RoleArn: __expectString, + S3ExportConfiguration: _json, + Status: __expectString, + }) as any; }; /** @@ -2005,36 +1887,22 @@ const de_JournalS3ExportList = (output: any, context: __SerdeContext): JournalS3 const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JournalS3ExportDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1KinesisConfiguration - */ -const de_KinesisConfiguration = (output: any, context: __SerdeContext): KinesisConfiguration => { - return { - AggregationEnabled: __expectBoolean(output.AggregationEnabled), - StreamArn: __expectString(output.StreamArn), - } as any; -}; +// de_KinesisConfiguration omitted. /** * deserializeAws_restJson1LedgerEncryptionDescription */ const de_LedgerEncryptionDescription = (output: any, context: __SerdeContext): LedgerEncryptionDescription => { - return { - EncryptionStatus: __expectString(output.EncryptionStatus), - InaccessibleKmsKeyDateTime: - output.InaccessibleKmsKeyDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InaccessibleKmsKeyDateTime))) - : undefined, - KmsKeyArn: __expectString(output.KmsKeyArn), - } as any; + return take(output, { + EncryptionStatus: __expectString, + InaccessibleKmsKeyDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KmsKeyArn: __expectString, + }) as any; }; /** @@ -2044,9 +1912,6 @@ const de_LedgerList = (output: any, context: __SerdeContext): LedgerSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LedgerSummary(entry, context); }); return retVal; @@ -2056,39 +1921,16 @@ const de_LedgerList = (output: any, context: __SerdeContext): LedgerSummary[] => * deserializeAws_restJson1LedgerSummary */ const de_LedgerSummary = (output: any, context: __SerdeContext): LedgerSummary => { - return { - CreationDateTime: - output.CreationDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDateTime))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + CreationDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1S3EncryptionConfiguration - */ -const de_S3EncryptionConfiguration = (output: any, context: __SerdeContext): S3EncryptionConfiguration => { - return { - KmsKeyArn: __expectString(output.KmsKeyArn), - ObjectEncryptionType: __expectString(output.ObjectEncryptionType), - } as any; -}; +// de_S3EncryptionConfiguration omitted. -/** - * deserializeAws_restJson1S3ExportConfiguration - */ -const de_S3ExportConfiguration = (output: any, context: __SerdeContext): S3ExportConfiguration => { - return { - Bucket: __expectString(output.Bucket), - EncryptionConfiguration: - output.EncryptionConfiguration != null - ? de_S3EncryptionConfiguration(output.EncryptionConfiguration, context) - : undefined, - Prefix: __expectString(output.Prefix), - } as any; -}; +// de_S3ExportConfiguration omitted. /** * deserializeAws_restJson1Tags @@ -2104,14 +1946,7 @@ const de_Tags = (output: any, context: __SerdeContext): Record = }, {}); }; -/** - * deserializeAws_restJson1ValueHolder - */ -const de_ValueHolder = (output: any, context: __SerdeContext): ValueHolder => { - return { - IonText: __expectString(output.IonText), - } as any; -}; +// de_ValueHolder omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-quicksight/src/protocols/Aws_restJson1.ts b/clients/client-quicksight/src/protocols/Aws_restJson1.ts index 1285e351455a..3447149425a6 100644 --- a/clients/client-quicksight/src/protocols/Aws_restJson1.ts +++ b/clients/client-quicksight/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,11 +13,12 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -350,9 +352,6 @@ import { UpdateUserCommandInput, UpdateUserCommandOutput } from "../commands/Upd import { AccessDeniedException, AccountCustomization, - AccountInfo, - AccountSettings, - ActiveIAMPolicyAssignment, AdHocFilteringOption, AggregationFunction, AggregationSortConfiguration, @@ -360,7 +359,6 @@ import { AmazonOpenSearchParameters, Analysis, AnalysisDefaults, - AnalysisError, AnchorDateConfiguration, AxisDataOptions, AxisDisplayDataDrivenRange, @@ -446,7 +444,6 @@ import { DrillDownFilter, DropDownControlDisplayOptions, DynamicDefaultValue, - Entity, ExcludePeriodConfiguration, ExplicitHierarchy, FieldBasedTooltip, @@ -555,7 +552,6 @@ import { SectionStyle, SelectedSheetsFilterScopeConfiguration, SetParameterValueConfiguration, - Sheet, SheetControlLayout, SheetControlLayoutConfiguration, SheetElementConfigurationOverrides, @@ -775,7 +771,6 @@ import { SeriesItem, ShapeConditionalFormat, SheetDefinition, - SignupResponse, SimpleClusterMarker, SubtotalOptions, TableAggregatedFieldWells, @@ -841,7 +836,6 @@ import { CredentialPair, CustomSql, Dashboard, - DashboardError, DashboardPublishOptions, DashboardSearchFilter, DashboardSourceEntity, @@ -865,14 +859,12 @@ import { DataSetUsageConfiguration, DataSource, DataSourceCredentials, - DataSourceErrorInfo, DataSourceParameters, DataSourceSearchFilter, DataSourceSummary, DateTimeParameter, DecimalParameter, DomainNotWhitelistedException, - ErrorInfo, ExasolParameters, ExportHiddenFieldsOption, ExportToCSVOption, @@ -880,12 +872,8 @@ import { FieldFolder, FilterOperation, Folder, - FolderMember, Font, - Group, - GroupMember, GutterStyle, - IAMPolicyAssignment, IncrementalRefresh, Ingestion, InputColumn, @@ -895,7 +883,6 @@ import { JoinInstruction, JoinKeyProperties, LimitExceededException, - LinkSharingConfiguration, LogicalTable, LogicalTableSource, LookbackWindow, @@ -903,16 +890,12 @@ import { MarginStyle, MariaDbParameters, MySqlParameters, - NamespaceError, - NamespaceInfoV2, OracleParameters, - OutputColumn, PhysicalTable, PostgreSqlParameters, PreconditionNotMetException, PrestoParameters, ProjectOperation, - QueueInfo, RdsParameters, RedshiftParameters, RefreshConfiguration, @@ -921,7 +904,6 @@ import { RelationalTable, RenameColumnOperation, ResourcePermission, - RowInfo, RowLevelPermissionDataSet, RowLevelPermissionTagConfiguration, RowLevelPermissionTagRule, @@ -939,8 +921,6 @@ import { StringParameter, TagColumnOperation, Template, - TemplateAlias, - TemplateError, TemplateSourceAnalysis, TemplateSourceEntity, TemplateSourceTemplate, @@ -948,9 +928,7 @@ import { TemplateVersionDefinition, TeradataParameters, Theme, - ThemeAlias, ThemeConfiguration, - ThemeError, ThemeVersion, TileLayoutStyle, TileStyle, @@ -961,7 +939,6 @@ import { UnsupportedUserEditionException, UntagColumnOperation, UploadSettings, - User, VisualAxisSortOption, VisualMenuOption, VpcConnectionProperties, @@ -970,10 +947,8 @@ import { FolderSearchFilter, FolderSummary, GroupSearchFilter, - IAMPolicyAssignmentSummary, IdentityTypeNotSupportedException, InvalidRequestException, - MemberIdArnPair, QuickSightUserNotFoundException, RegisteredUserConsoleFeatureConfigurations, RegisteredUserDashboardEmbeddingConfiguration, @@ -1052,12 +1027,12 @@ export const se_CreateAccountCustomizationCommand = async ( namespace: [, input.Namespace!], }); let body: any; - body = JSON.stringify({ - ...(input.AccountCustomization != null && { - AccountCustomization: se_AccountCustomization(input.AccountCustomization, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AccountCustomization: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1091,22 +1066,24 @@ export const se_CreateAccountSubscriptionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AccountName != null && { AccountName: input.AccountName }), - ...(input.ActiveDirectoryName != null && { ActiveDirectoryName: input.ActiveDirectoryName }), - ...(input.AdminGroup != null && { AdminGroup: se_GroupsList(input.AdminGroup, context) }), - ...(input.AuthenticationMethod != null && { AuthenticationMethod: input.AuthenticationMethod }), - ...(input.AuthorGroup != null && { AuthorGroup: se_GroupsList(input.AuthorGroup, context) }), - ...(input.ContactNumber != null && { ContactNumber: input.ContactNumber }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Edition != null && { Edition: input.Edition }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.NotificationEmail != null && { NotificationEmail: input.NotificationEmail }), - ...(input.ReaderGroup != null && { ReaderGroup: se_GroupsList(input.ReaderGroup, context) }), - ...(input.Realm != null && { Realm: input.Realm }), - }); + body = JSON.stringify( + take(input, { + AccountName: [], + ActiveDirectoryName: [], + AdminGroup: (_) => _json(_), + AuthenticationMethod: [], + AuthorGroup: (_) => _json(_), + ContactNumber: [], + DirectoryId: [], + Edition: [], + EmailAddress: [], + FirstName: [], + LastName: [], + NotificationEmail: [], + ReaderGroup: (_) => _json(_), + Realm: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1142,15 +1119,17 @@ export const se_CreateAnalysisCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "AnalysisId", () => input.AnalysisId!, "{AnalysisId}", false); let body: any; - body = JSON.stringify({ - ...(input.Definition != null && { Definition: se_AnalysisDefinition(input.Definition, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se__Parameters(input.Parameters, context) }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.SourceEntity != null && { SourceEntity: se_AnalysisSourceEntity(input.SourceEntity, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.ThemeArn != null && { ThemeArn: input.ThemeArn }), - }); + body = JSON.stringify( + take(input, { + Definition: (_) => se_AnalysisDefinition(_, context), + Name: [], + Parameters: (_) => se__Parameters(_, context), + Permissions: (_) => _json(_), + SourceEntity: (_) => _json(_), + Tags: (_) => _json(_), + ThemeArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1186,19 +1165,19 @@ export const se_CreateDashboardCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DashboardId", () => input.DashboardId!, "{DashboardId}", false); let body: any; - body = JSON.stringify({ - ...(input.DashboardPublishOptions != null && { - DashboardPublishOptions: se_DashboardPublishOptions(input.DashboardPublishOptions, context), - }), - ...(input.Definition != null && { Definition: se_DashboardVersionDefinition(input.Definition, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se__Parameters(input.Parameters, context) }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.SourceEntity != null && { SourceEntity: se_DashboardSourceEntity(input.SourceEntity, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.ThemeArn != null && { ThemeArn: input.ThemeArn }), - ...(input.VersionDescription != null && { VersionDescription: input.VersionDescription }), - }); + body = JSON.stringify( + take(input, { + DashboardPublishOptions: (_) => _json(_), + Definition: (_) => se_DashboardVersionDefinition(_, context), + Name: [], + Parameters: (_) => se__Parameters(_, context), + Permissions: (_) => _json(_), + SourceEntity: (_) => _json(_), + Tags: (_) => _json(_), + ThemeArn: [], + VersionDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1232,32 +1211,23 @@ export const se_CreateDataSetCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ColumnGroups != null && { ColumnGroups: se_ColumnGroupList(input.ColumnGroups, context) }), - ...(input.ColumnLevelPermissionRules != null && { - ColumnLevelPermissionRules: se_ColumnLevelPermissionRuleList(input.ColumnLevelPermissionRules, context), - }), - ...(input.DataSetId != null && { DataSetId: input.DataSetId }), - ...(input.DataSetUsageConfiguration != null && { - DataSetUsageConfiguration: se_DataSetUsageConfiguration(input.DataSetUsageConfiguration, context), - }), - ...(input.FieldFolders != null && { FieldFolders: se_FieldFolderMap(input.FieldFolders, context) }), - ...(input.ImportMode != null && { ImportMode: input.ImportMode }), - ...(input.LogicalTableMap != null && { LogicalTableMap: se_LogicalTableMap(input.LogicalTableMap, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.PhysicalTableMap != null && { PhysicalTableMap: se_PhysicalTableMap(input.PhysicalTableMap, context) }), - ...(input.RowLevelPermissionDataSet != null && { - RowLevelPermissionDataSet: se_RowLevelPermissionDataSet(input.RowLevelPermissionDataSet, context), - }), - ...(input.RowLevelPermissionTagConfiguration != null && { - RowLevelPermissionTagConfiguration: se_RowLevelPermissionTagConfiguration( - input.RowLevelPermissionTagConfiguration, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ColumnGroups: (_) => _json(_), + ColumnLevelPermissionRules: (_) => _json(_), + DataSetId: [], + DataSetUsageConfiguration: (_) => _json(_), + FieldFolders: (_) => _json(_), + ImportMode: [], + LogicalTableMap: (_) => _json(_), + Name: [], + Permissions: (_) => _json(_), + PhysicalTableMap: (_) => _json(_), + RowLevelPermissionDataSet: (_) => _json(_), + RowLevelPermissionTagConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1291,21 +1261,19 @@ export const se_CreateDataSourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Credentials != null && { Credentials: se_DataSourceCredentials(input.Credentials, context) }), - ...(input.DataSourceId != null && { DataSourceId: input.DataSourceId }), - ...(input.DataSourceParameters != null && { - DataSourceParameters: se_DataSourceParameters(input.DataSourceParameters, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.SslProperties != null && { SslProperties: se_SslProperties(input.SslProperties, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VpcConnectionProperties != null && { - VpcConnectionProperties: se_VpcConnectionProperties(input.VpcConnectionProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + Credentials: (_) => _json(_), + DataSourceId: [], + DataSourceParameters: (_) => _json(_), + Name: [], + Permissions: (_) => _json(_), + SslProperties: (_) => _json(_), + Tags: (_) => _json(_), + Type: [], + VpcConnectionProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1341,13 +1309,15 @@ export const se_CreateFolderCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId!, "{FolderId}", false); let body: any; - body = JSON.stringify({ - ...(input.FolderType != null && { FolderType: input.FolderType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentFolderArn != null && { ParentFolderArn: input.ParentFolderArn }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + FolderType: [], + Name: [], + ParentFolderArn: [], + Permissions: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1418,10 +1388,12 @@ export const se_CreateGroupCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Namespace", () => input.Namespace!, "{Namespace}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + Description: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1492,12 +1464,14 @@ export const se_CreateIAMPolicyAssignmentCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Namespace", () => input.Namespace!, "{Namespace}", false); let body: any; - body = JSON.stringify({ - ...(input.AssignmentName != null && { AssignmentName: input.AssignmentName }), - ...(input.AssignmentStatus != null && { AssignmentStatus: input.AssignmentStatus }), - ...(input.Identities != null && { Identities: se_IdentityMap(input.Identities, context) }), - ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }), - }); + body = JSON.stringify( + take(input, { + AssignmentName: [], + AssignmentStatus: [], + Identities: (_) => _json(_), + PolicyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1534,9 +1508,11 @@ export const se_CreateIngestionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.IngestionType != null && { IngestionType: input.IngestionType }), - }); + body = JSON.stringify( + take(input, { + IngestionType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1569,11 +1545,13 @@ export const se_CreateNamespaceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.IdentityStore != null && { IdentityStore: input.IdentityStore }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + IdentityStore: [], + Namespace: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1609,9 +1587,11 @@ export const se_CreateRefreshScheduleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Schedule != null && { Schedule: se_RefreshSchedule(input.Schedule, context) }), - }); + body = JSON.stringify( + take(input, { + Schedule: (_) => se_RefreshSchedule(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1647,14 +1627,16 @@ export const se_CreateTemplateCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", () => input.TemplateId!, "{TemplateId}", false); let body: any; - body = JSON.stringify({ - ...(input.Definition != null && { Definition: se_TemplateVersionDefinition(input.Definition, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.SourceEntity != null && { SourceEntity: se_TemplateSourceEntity(input.SourceEntity, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VersionDescription != null && { VersionDescription: input.VersionDescription }), - }); + body = JSON.stringify( + take(input, { + Definition: (_) => se_TemplateVersionDefinition(_, context), + Name: [], + Permissions: (_) => _json(_), + SourceEntity: (_) => _json(_), + Tags: (_) => _json(_), + VersionDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1691,9 +1673,11 @@ export const se_CreateTemplateAliasCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", () => input.TemplateId!, "{TemplateId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "AliasName", () => input.AliasName!, "{AliasName}", false); let body: any; - body = JSON.stringify({ - ...(input.TemplateVersionNumber != null && { TemplateVersionNumber: input.TemplateVersionNumber }), - }); + body = JSON.stringify( + take(input, { + TemplateVersionNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1728,14 +1712,16 @@ export const se_CreateThemeCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "ThemeId", () => input.ThemeId!, "{ThemeId}", false); let body: any; - body = JSON.stringify({ - ...(input.BaseThemeId != null && { BaseThemeId: input.BaseThemeId }), - ...(input.Configuration != null && { Configuration: se_ThemeConfiguration(input.Configuration, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Permissions != null && { Permissions: se_ResourcePermissionList(input.Permissions, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VersionDescription != null && { VersionDescription: input.VersionDescription }), - }); + body = JSON.stringify( + take(input, { + BaseThemeId: [], + Configuration: (_) => _json(_), + Name: [], + Permissions: (_) => _json(_), + Tags: (_) => _json(_), + VersionDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1772,9 +1758,11 @@ export const se_CreateThemeAliasCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ThemeId", () => input.ThemeId!, "{ThemeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "AliasName", () => input.AliasName!, "{AliasName}", false); let body: any; - body = JSON.stringify({ - ...(input.ThemeVersionNumber != null && { ThemeVersionNumber: input.ThemeVersionNumber }), - }); + body = JSON.stringify( + take(input, { + ThemeVersionNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3621,18 +3609,16 @@ export const se_GenerateEmbedUrlForAnonymousUserCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AllowedDomains != null && { AllowedDomains: se_StringList(input.AllowedDomains, context) }), - ...(input.AuthorizedResourceArns != null && { - AuthorizedResourceArns: se_ArnList(input.AuthorizedResourceArns, context), - }), - ...(input.ExperienceConfiguration != null && { - ExperienceConfiguration: se_AnonymousUserEmbeddingExperienceConfiguration(input.ExperienceConfiguration, context), - }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.SessionLifetimeInMinutes != null && { SessionLifetimeInMinutes: input.SessionLifetimeInMinutes }), - ...(input.SessionTags != null && { SessionTags: se_SessionTagList(input.SessionTags, context) }), - }); + body = JSON.stringify( + take(input, { + AllowedDomains: (_) => _json(_), + AuthorizedResourceArns: (_) => _json(_), + ExperienceConfiguration: (_) => _json(_), + Namespace: [], + SessionLifetimeInMinutes: [], + SessionTags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3667,17 +3653,14 @@ export const se_GenerateEmbedUrlForRegisteredUserCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AllowedDomains != null && { AllowedDomains: se_StringList(input.AllowedDomains, context) }), - ...(input.ExperienceConfiguration != null && { - ExperienceConfiguration: se_RegisteredUserEmbeddingExperienceConfiguration( - input.ExperienceConfiguration, - context - ), - }), - ...(input.SessionLifetimeInMinutes != null && { SessionLifetimeInMinutes: input.SessionLifetimeInMinutes }), - ...(input.UserArn != null && { UserArn: input.UserArn }), - }); + body = JSON.stringify( + take(input, { + AllowedDomains: (_) => _json(_), + ExperienceConfiguration: (_) => _json(_), + SessionLifetimeInMinutes: [], + UserArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4144,9 +4127,11 @@ export const se_ListIAMPolicyAssignmentsCommand = async ( "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.AssignmentStatus != null && { AssignmentStatus: input.AssignmentStatus }), - }); + body = JSON.stringify( + take(input, { + AssignmentStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4655,11 +4640,11 @@ export const se_PutDataSetRefreshPropertiesCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); let body: any; - body = JSON.stringify({ - ...(input.DataSetRefreshProperties != null && { - DataSetRefreshProperties: se_DataSetRefreshProperties(input.DataSetRefreshProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + DataSetRefreshProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4695,22 +4680,20 @@ export const se_RegisterUserCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Namespace", () => input.Namespace!, "{Namespace}", false); let body: any; - body = JSON.stringify({ - ...(input.CustomFederationProviderUrl != null && { - CustomFederationProviderUrl: input.CustomFederationProviderUrl, - }), - ...(input.CustomPermissionsName != null && { CustomPermissionsName: input.CustomPermissionsName }), - ...(input.Email != null && { Email: input.Email }), - ...(input.ExternalLoginFederationProviderType != null && { - ExternalLoginFederationProviderType: input.ExternalLoginFederationProviderType, - }), - ...(input.ExternalLoginId != null && { ExternalLoginId: input.ExternalLoginId }), - ...(input.IamArn != null && { IamArn: input.IamArn }), - ...(input.IdentityType != null && { IdentityType: input.IdentityType }), - ...(input.SessionName != null && { SessionName: input.SessionName }), - ...(input.UserName != null && { UserName: input.UserName }), - ...(input.UserRole != null && { UserRole: input.UserRole }), - }); + body = JSON.stringify( + take(input, { + CustomFederationProviderUrl: [], + CustomPermissionsName: [], + Email: [], + ExternalLoginFederationProviderType: [], + ExternalLoginId: [], + IamArn: [], + IdentityType: [], + SessionName: [], + UserName: [], + UserRole: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4777,11 +4760,13 @@ export const se_SearchAnalysesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_AnalysisSearchFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4816,11 +4801,13 @@ export const se_SearchDashboardsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_DashboardSearchFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4854,11 +4841,13 @@ export const se_SearchDataSetsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_DataSetSearchFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4893,11 +4882,13 @@ export const se_SearchDataSourcesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_DataSourceSearchFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4931,11 +4922,13 @@ export const se_SearchFoldersCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_FolderSearchFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -4975,9 +4968,11 @@ export const se_SearchGroupsCommand = async ( "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_GroupSearchFilterList(input.Filters, context) }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5005,9 +5000,11 @@ export const se_TagResourceCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{ResourceArn}/tags"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5075,11 +5072,11 @@ export const se_UpdateAccountCustomizationCommand = async ( namespace: [, input.Namespace!], }); let body: any; - body = JSON.stringify({ - ...(input.AccountCustomization != null && { - AccountCustomization: se_AccountCustomization(input.AccountCustomization, context), - }), - }); + body = JSON.stringify( + take(input, { + AccountCustomization: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5114,13 +5111,13 @@ export const se_UpdateAccountSettingsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.DefaultNamespace != null && { DefaultNamespace: input.DefaultNamespace }), - ...(input.NotificationEmail != null && { NotificationEmail: input.NotificationEmail }), - ...(input.TerminationProtectionEnabled != null && { - TerminationProtectionEnabled: input.TerminationProtectionEnabled, - }), - }); + body = JSON.stringify( + take(input, { + DefaultNamespace: [], + NotificationEmail: [], + TerminationProtectionEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5156,13 +5153,15 @@ export const se_UpdateAnalysisCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "AnalysisId", () => input.AnalysisId!, "{AnalysisId}", false); let body: any; - body = JSON.stringify({ - ...(input.Definition != null && { Definition: se_AnalysisDefinition(input.Definition, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se__Parameters(input.Parameters, context) }), - ...(input.SourceEntity != null && { SourceEntity: se_AnalysisSourceEntity(input.SourceEntity, context) }), - ...(input.ThemeArn != null && { ThemeArn: input.ThemeArn }), - }); + body = JSON.stringify( + take(input, { + Definition: (_) => se_AnalysisDefinition(_, context), + Name: [], + Parameters: (_) => se__Parameters(_, context), + SourceEntity: (_) => _json(_), + ThemeArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5198,14 +5197,12 @@ export const se_UpdateAnalysisPermissionsCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "AnalysisId", () => input.AnalysisId!, "{AnalysisId}", false); let body: any; - body = JSON.stringify({ - ...(input.GrantPermissions != null && { - GrantPermissions: se_UpdateResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_UpdateResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5241,17 +5238,17 @@ export const se_UpdateDashboardCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DashboardId", () => input.DashboardId!, "{DashboardId}", false); let body: any; - body = JSON.stringify({ - ...(input.DashboardPublishOptions != null && { - DashboardPublishOptions: se_DashboardPublishOptions(input.DashboardPublishOptions, context), - }), - ...(input.Definition != null && { Definition: se_DashboardVersionDefinition(input.Definition, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Parameters != null && { Parameters: se__Parameters(input.Parameters, context) }), - ...(input.SourceEntity != null && { SourceEntity: se_DashboardSourceEntity(input.SourceEntity, context) }), - ...(input.ThemeArn != null && { ThemeArn: input.ThemeArn }), - ...(input.VersionDescription != null && { VersionDescription: input.VersionDescription }), - }); + body = JSON.stringify( + take(input, { + DashboardPublishOptions: (_) => _json(_), + Definition: (_) => se_DashboardVersionDefinition(_, context), + Name: [], + Parameters: (_) => se__Parameters(_, context), + SourceEntity: (_) => _json(_), + ThemeArn: [], + VersionDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5287,20 +5284,14 @@ export const se_UpdateDashboardPermissionsCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DashboardId", () => input.DashboardId!, "{DashboardId}", false); let body: any; - body = JSON.stringify({ - ...(input.GrantLinkPermissions != null && { - GrantLinkPermissions: se_UpdateLinkPermissionList(input.GrantLinkPermissions, context), - }), - ...(input.GrantPermissions != null && { - GrantPermissions: se_UpdateResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokeLinkPermissions != null && { - RevokeLinkPermissions: se_UpdateLinkPermissionList(input.RevokeLinkPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_UpdateResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantLinkPermissions: (_) => _json(_), + GrantPermissions: (_) => _json(_), + RevokeLinkPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5377,29 +5368,20 @@ export const se_UpdateDataSetCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); let body: any; - body = JSON.stringify({ - ...(input.ColumnGroups != null && { ColumnGroups: se_ColumnGroupList(input.ColumnGroups, context) }), - ...(input.ColumnLevelPermissionRules != null && { - ColumnLevelPermissionRules: se_ColumnLevelPermissionRuleList(input.ColumnLevelPermissionRules, context), - }), - ...(input.DataSetUsageConfiguration != null && { - DataSetUsageConfiguration: se_DataSetUsageConfiguration(input.DataSetUsageConfiguration, context), - }), - ...(input.FieldFolders != null && { FieldFolders: se_FieldFolderMap(input.FieldFolders, context) }), - ...(input.ImportMode != null && { ImportMode: input.ImportMode }), - ...(input.LogicalTableMap != null && { LogicalTableMap: se_LogicalTableMap(input.LogicalTableMap, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PhysicalTableMap != null && { PhysicalTableMap: se_PhysicalTableMap(input.PhysicalTableMap, context) }), - ...(input.RowLevelPermissionDataSet != null && { - RowLevelPermissionDataSet: se_RowLevelPermissionDataSet(input.RowLevelPermissionDataSet, context), - }), - ...(input.RowLevelPermissionTagConfiguration != null && { - RowLevelPermissionTagConfiguration: se_RowLevelPermissionTagConfiguration( - input.RowLevelPermissionTagConfiguration, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + ColumnGroups: (_) => _json(_), + ColumnLevelPermissionRules: (_) => _json(_), + DataSetUsageConfiguration: (_) => _json(_), + FieldFolders: (_) => _json(_), + ImportMode: [], + LogicalTableMap: (_) => _json(_), + Name: [], + PhysicalTableMap: (_) => _json(_), + RowLevelPermissionDataSet: (_) => _json(_), + RowLevelPermissionTagConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5435,14 +5417,12 @@ export const se_UpdateDataSetPermissionsCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId!, "{DataSetId}", false); let body: any; - body = JSON.stringify({ - ...(input.GrantPermissions != null && { - GrantPermissions: se_ResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_ResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5485,17 +5465,15 @@ export const se_UpdateDataSourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Credentials != null && { Credentials: se_DataSourceCredentials(input.Credentials, context) }), - ...(input.DataSourceParameters != null && { - DataSourceParameters: se_DataSourceParameters(input.DataSourceParameters, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SslProperties != null && { SslProperties: se_SslProperties(input.SslProperties, context) }), - ...(input.VpcConnectionProperties != null && { - VpcConnectionProperties: se_VpcConnectionProperties(input.VpcConnectionProperties, context), - }), - }); + body = JSON.stringify( + take(input, { + Credentials: (_) => _json(_), + DataSourceParameters: (_) => _json(_), + Name: [], + SslProperties: (_) => _json(_), + VpcConnectionProperties: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5538,14 +5516,12 @@ export const se_UpdateDataSourcePermissionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.GrantPermissions != null && { - GrantPermissions: se_ResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_ResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5581,9 +5557,11 @@ export const se_UpdateFolderCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId!, "{FolderId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5619,14 +5597,12 @@ export const se_UpdateFolderPermissionsCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId!, "{FolderId}", false); let body: any; - body = JSON.stringify({ - ...(input.GrantPermissions != null && { - GrantPermissions: se_ResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_ResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5663,9 +5639,11 @@ export const se_UpdateGroupCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Namespace", () => input.Namespace!, "{Namespace}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5709,11 +5687,13 @@ export const se_UpdateIAMPolicyAssignmentCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Namespace", () => input.Namespace!, "{Namespace}", false); let body: any; - body = JSON.stringify({ - ...(input.AssignmentStatus != null && { AssignmentStatus: input.AssignmentStatus }), - ...(input.Identities != null && { Identities: se_IdentityMap(input.Identities, context) }), - ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }), - }); + body = JSON.stringify( + take(input, { + AssignmentStatus: [], + Identities: (_) => _json(_), + PolicyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5747,12 +5727,12 @@ export const se_UpdateIpRestrictionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.IpRestrictionRuleMap != null && { - IpRestrictionRuleMap: se_IpRestrictionRuleMap(input.IpRestrictionRuleMap, context), - }), - }); + body = JSON.stringify( + take(input, { + Enabled: [], + IpRestrictionRuleMap: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5787,9 +5767,11 @@ export const se_UpdatePublicSharingSettingsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.PublicSharingEnabled != null && { PublicSharingEnabled: input.PublicSharingEnabled }), - }); + body = JSON.stringify( + take(input, { + PublicSharingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5825,9 +5807,11 @@ export const se_UpdateRefreshScheduleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Schedule != null && { Schedule: se_RefreshSchedule(input.Schedule, context) }), - }); + body = JSON.stringify( + take(input, { + Schedule: (_) => se_RefreshSchedule(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5863,12 +5847,14 @@ export const se_UpdateTemplateCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", () => input.TemplateId!, "{TemplateId}", false); let body: any; - body = JSON.stringify({ - ...(input.Definition != null && { Definition: se_TemplateVersionDefinition(input.Definition, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SourceEntity != null && { SourceEntity: se_TemplateSourceEntity(input.SourceEntity, context) }), - ...(input.VersionDescription != null && { VersionDescription: input.VersionDescription }), - }); + body = JSON.stringify( + take(input, { + Definition: (_) => se_TemplateVersionDefinition(_, context), + Name: [], + SourceEntity: (_) => _json(_), + VersionDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5905,9 +5891,11 @@ export const se_UpdateTemplateAliasCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", () => input.TemplateId!, "{TemplateId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "AliasName", () => input.AliasName!, "{AliasName}", false); let body: any; - body = JSON.stringify({ - ...(input.TemplateVersionNumber != null && { TemplateVersionNumber: input.TemplateVersionNumber }), - }); + body = JSON.stringify( + take(input, { + TemplateVersionNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5943,14 +5931,12 @@ export const se_UpdateTemplatePermissionsCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "TemplateId", () => input.TemplateId!, "{TemplateId}", false); let body: any; - body = JSON.stringify({ - ...(input.GrantPermissions != null && { - GrantPermissions: se_UpdateResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_UpdateResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -5985,12 +5971,14 @@ export const se_UpdateThemeCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "ThemeId", () => input.ThemeId!, "{ThemeId}", false); let body: any; - body = JSON.stringify({ - ...(input.BaseThemeId != null && { BaseThemeId: input.BaseThemeId }), - ...(input.Configuration != null && { Configuration: se_ThemeConfiguration(input.Configuration, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.VersionDescription != null && { VersionDescription: input.VersionDescription }), - }); + body = JSON.stringify( + take(input, { + BaseThemeId: [], + Configuration: (_) => _json(_), + Name: [], + VersionDescription: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6027,9 +6015,11 @@ export const se_UpdateThemeAliasCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ThemeId", () => input.ThemeId!, "{ThemeId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "AliasName", () => input.AliasName!, "{AliasName}", false); let body: any; - body = JSON.stringify({ - ...(input.ThemeVersionNumber != null && { ThemeVersionNumber: input.ThemeVersionNumber }), - }); + body = JSON.stringify( + take(input, { + ThemeVersionNumber: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6065,14 +6055,12 @@ export const se_UpdateThemePermissionsCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "ThemeId", () => input.ThemeId!, "{ThemeId}", false); let body: any; - body = JSON.stringify({ - ...(input.GrantPermissions != null && { - GrantPermissions: se_UpdateResourcePermissionList(input.GrantPermissions, context), - }), - ...(input.RevokePermissions != null && { - RevokePermissions: se_UpdateResourcePermissionList(input.RevokePermissions, context), - }), - }); + body = JSON.stringify( + take(input, { + GrantPermissions: (_) => _json(_), + RevokePermissions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6109,19 +6097,17 @@ export const se_UpdateUserCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "Namespace", () => input.Namespace!, "{Namespace}", false); let body: any; - body = JSON.stringify({ - ...(input.CustomFederationProviderUrl != null && { - CustomFederationProviderUrl: input.CustomFederationProviderUrl, - }), - ...(input.CustomPermissionsName != null && { CustomPermissionsName: input.CustomPermissionsName }), - ...(input.Email != null && { Email: input.Email }), - ...(input.ExternalLoginFederationProviderType != null && { - ExternalLoginFederationProviderType: input.ExternalLoginFederationProviderType, - }), - ...(input.ExternalLoginId != null && { ExternalLoginId: input.ExternalLoginId }), - ...(input.Role != null && { Role: input.Role }), - ...(input.UnapplyCustomPermissions != null && { UnapplyCustomPermissions: input.UnapplyCustomPermissions }), - }); + body = JSON.stringify( + take(input, { + CustomFederationProviderUrl: [], + CustomPermissionsName: [], + Email: [], + ExternalLoginFederationProviderType: [], + ExternalLoginId: [], + Role: [], + UnapplyCustomPermissions: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -6147,15 +6133,12 @@ export const de_CancelIngestionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.IngestionId != null) { - contents.IngestionId = __expectString(data.IngestionId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + IngestionId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6195,10 +6178,9 @@ const de_CancelIngestionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6218,21 +6200,14 @@ export const de_CreateAccountCustomizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountCustomization != null) { - contents.AccountCustomization = de_AccountCustomization(data.AccountCustomization, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AwsAccountId != null) { - contents.AwsAccountId = __expectString(data.AwsAccountId); - } - if (data.Namespace != null) { - contents.Namespace = __expectString(data.Namespace); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AccountCustomization: _json, + Arn: __expectString, + AwsAccountId: __expectString, + Namespace: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6278,10 +6253,9 @@ const de_CreateAccountCustomizationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6301,12 +6275,11 @@ export const de_CreateAccountSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.SignupResponse != null) { - contents.SignupResponse = de_SignupResponse(data.SignupResponse, context); - } + const doc = take(data, { + RequestId: __expectString, + SignupResponse: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6355,10 +6328,9 @@ const de_CreateAccountSubscriptionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6378,18 +6350,13 @@ export const de_CreateAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisId: __expectString, + Arn: __expectString, + CreationStatus: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6435,10 +6402,9 @@ const de_CreateAnalysisCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6458,21 +6424,14 @@ export const de_CreateDashboardCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.VersionArn != null) { - contents.VersionArn = __expectString(data.VersionArn); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + DashboardId: __expectString, + RequestId: __expectString, + VersionArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6518,10 +6477,9 @@ const de_CreateDashboardCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6541,21 +6499,14 @@ export const de_CreateDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.IngestionArn != null) { - contents.IngestionArn = __expectString(data.IngestionArn); - } - if (data.IngestionId != null) { - contents.IngestionId = __expectString(data.IngestionId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + DataSetId: __expectString, + IngestionArn: __expectString, + IngestionId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6604,10 +6555,9 @@ const de_CreateDataSetCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6627,18 +6577,13 @@ export const de_CreateDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.DataSourceId != null) { - contents.DataSourceId = __expectString(data.DataSourceId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + DataSourceId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6684,10 +6629,9 @@ const de_CreateDataSourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6707,15 +6651,12 @@ export const de_CreateFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.FolderId != null) { - contents.FolderId = __expectString(data.FolderId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + FolderId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6764,10 +6705,9 @@ const de_CreateFolderCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6787,15 +6727,12 @@ export const de_CreateFolderMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FolderMember != null) { - contents.FolderMember = de_FolderMember(data.FolderMember, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Status != null) { - contents.Status = __expectInt32(data.Status); - } + const doc = take(data, { + FolderMember: _json, + RequestId: __expectString, + Status: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -6838,10 +6775,9 @@ const de_CreateFolderMembershipCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6861,12 +6797,11 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Group: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6915,10 +6850,9 @@ const de_CreateGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6938,12 +6872,11 @@ export const de_CreateGroupMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupMember != null) { - contents.GroupMember = de_GroupMember(data.GroupMember, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + GroupMember: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -6986,10 +6919,9 @@ const de_CreateGroupMembershipCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7009,24 +6941,15 @@ export const de_CreateIAMPolicyAssignmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssignmentId != null) { - contents.AssignmentId = __expectString(data.AssignmentId); - } - if (data.AssignmentName != null) { - contents.AssignmentName = __expectString(data.AssignmentName); - } - if (data.AssignmentStatus != null) { - contents.AssignmentStatus = __expectString(data.AssignmentStatus); - } - if (data.Identities != null) { - contents.Identities = de_IdentityMap(data.Identities, context); - } - if (data.PolicyArn != null) { - contents.PolicyArn = __expectString(data.PolicyArn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AssignmentId: __expectString, + AssignmentName: __expectString, + AssignmentStatus: __expectString, + Identities: _json, + PolicyArn: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7069,10 +6992,9 @@ const de_CreateIAMPolicyAssignmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7092,18 +7014,13 @@ export const de_CreateIngestionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.IngestionId != null) { - contents.IngestionId = __expectString(data.IngestionId); - } - if (data.IngestionStatus != null) { - contents.IngestionStatus = __expectString(data.IngestionStatus); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + IngestionId: __expectString, + IngestionStatus: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7146,10 +7063,9 @@ const de_CreateIngestionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7169,24 +7085,15 @@ export const de_CreateNamespaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CapacityRegion != null) { - contents.CapacityRegion = __expectString(data.CapacityRegion); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.IdentityStore != null) { - contents.IdentityStore = __expectString(data.IdentityStore); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + CapacityRegion: __expectString, + CreationStatus: __expectString, + IdentityStore: __expectString, + Name: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7238,10 +7145,9 @@ const de_CreateNamespaceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7261,15 +7167,12 @@ export const de_CreateRefreshScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ScheduleId != null) { - contents.ScheduleId = __expectString(data.ScheduleId); - } + const doc = take(data, { + Arn: __expectString, + RequestId: __expectString, + ScheduleId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7315,10 +7218,9 @@ const de_CreateRefreshScheduleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7338,21 +7240,14 @@ export const de_CreateTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } - if (data.VersionArn != null) { - contents.VersionArn = __expectString(data.VersionArn); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + RequestId: __expectString, + TemplateId: __expectString, + VersionArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7401,10 +7296,9 @@ const de_CreateTemplateCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7424,12 +7318,11 @@ export const de_CreateTemplateAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateAlias != null) { - contents.TemplateAlias = de_TemplateAlias(data.TemplateAlias, context); - } + const doc = take(data, { + RequestId: __expectString, + TemplateAlias: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7472,10 +7365,9 @@ const de_CreateTemplateAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7495,21 +7387,14 @@ export const de_CreateThemeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeId != null) { - contents.ThemeId = __expectString(data.ThemeId); - } - if (data.VersionArn != null) { - contents.VersionArn = __expectString(data.VersionArn); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + RequestId: __expectString, + ThemeId: __expectString, + VersionArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7555,10 +7440,9 @@ const de_CreateThemeCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7578,12 +7462,11 @@ export const de_CreateThemeAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeAlias != null) { - contents.ThemeAlias = de_ThemeAlias(data.ThemeAlias, context); - } + const doc = take(data, { + RequestId: __expectString, + ThemeAlias: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7629,10 +7512,9 @@ const de_CreateThemeAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7652,9 +7534,10 @@ export const de_DeleteAccountCustomizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7697,10 +7580,9 @@ const de_DeleteAccountCustomizationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7720,9 +7602,10 @@ export const de_DeleteAccountSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7765,10 +7648,9 @@ const de_DeleteAccountSubscriptionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7788,18 +7670,13 @@ export const de_DeleteAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DeletionTime != null) { - contents.DeletionTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.DeletionTime))); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisId: __expectString, + Arn: __expectString, + DeletionTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7839,10 +7716,9 @@ const de_DeleteAnalysisCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7862,15 +7738,12 @@ export const de_DeleteDashboardCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + DashboardId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7910,10 +7783,9 @@ const de_DeleteDashboardCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7933,15 +7805,12 @@ export const de_DeleteDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + DataSetId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -7978,10 +7847,9 @@ const de_DeleteDataSetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8001,9 +7869,10 @@ export const de_DeleteDataSetRefreshPropertiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8046,10 +7915,9 @@ const de_DeleteDataSetRefreshPropertiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8069,15 +7937,12 @@ export const de_DeleteDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DataSourceId != null) { - contents.DataSourceId = __expectString(data.DataSourceId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + DataSourceId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8114,10 +7979,9 @@ const de_DeleteDataSourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8137,15 +8001,12 @@ export const de_DeleteFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.FolderId != null) { - contents.FolderId = __expectString(data.FolderId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + FolderId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8191,10 +8052,9 @@ const de_DeleteFolderCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8214,12 +8074,11 @@ export const de_DeleteFolderMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Status != null) { - contents.Status = __expectInt32(data.Status); - } + const doc = take(data, { + RequestId: __expectString, + Status: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -8256,10 +8115,9 @@ const de_DeleteFolderMembershipCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8279,9 +8137,10 @@ export const de_DeleteGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8324,10 +8183,9 @@ const de_DeleteGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8347,9 +8205,10 @@ export const de_DeleteGroupMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8392,10 +8251,9 @@ const de_DeleteGroupMembershipCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8415,12 +8273,11 @@ export const de_DeleteIAMPolicyAssignmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssignmentName != null) { - contents.AssignmentName = __expectString(data.AssignmentName); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AssignmentName: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8463,10 +8320,9 @@ const de_DeleteIAMPolicyAssignmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8486,9 +8342,10 @@ export const de_DeleteNamespaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8531,10 +8388,9 @@ const de_DeleteNamespaceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8554,15 +8410,12 @@ export const de_DeleteRefreshScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ScheduleId != null) { - contents.ScheduleId = __expectString(data.ScheduleId); - } + const doc = take(data, { + Arn: __expectString, + RequestId: __expectString, + ScheduleId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8602,10 +8455,9 @@ const de_DeleteRefreshScheduleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8625,15 +8477,12 @@ export const de_DeleteTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + Arn: __expectString, + RequestId: __expectString, + TemplateId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8676,10 +8525,9 @@ const de_DeleteTemplateCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8699,18 +8547,13 @@ export const de_DeleteTemplateAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AliasName != null) { - contents.AliasName = __expectString(data.AliasName); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + AliasName: __expectString, + Arn: __expectString, + RequestId: __expectString, + TemplateId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8747,10 +8590,9 @@ const de_DeleteTemplateAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8770,15 +8612,12 @@ export const de_DeleteThemeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeId != null) { - contents.ThemeId = __expectString(data.ThemeId); - } + const doc = take(data, { + Arn: __expectString, + RequestId: __expectString, + ThemeId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8821,10 +8660,9 @@ const de_DeleteThemeCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8844,18 +8682,13 @@ export const de_DeleteThemeAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AliasName != null) { - contents.AliasName = __expectString(data.AliasName); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeId != null) { - contents.ThemeId = __expectString(data.ThemeId); - } + const doc = take(data, { + AliasName: __expectString, + Arn: __expectString, + RequestId: __expectString, + ThemeId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8895,10 +8728,9 @@ const de_DeleteThemeAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8918,9 +8750,10 @@ export const de_DeleteUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -8963,10 +8796,9 @@ const de_DeleteUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8986,9 +8818,10 @@ export const de_DeleteUserByPrincipalIdCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9031,10 +8864,9 @@ const de_DeleteUserByPrincipalIdCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9054,21 +8886,14 @@ export const de_DescribeAccountCustomizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountCustomization != null) { - contents.AccountCustomization = de_AccountCustomization(data.AccountCustomization, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AwsAccountId != null) { - contents.AwsAccountId = __expectString(data.AwsAccountId); - } - if (data.Namespace != null) { - contents.Namespace = __expectString(data.Namespace); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AccountCustomization: _json, + Arn: __expectString, + AwsAccountId: __expectString, + Namespace: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9108,10 +8933,9 @@ const de_DescribeAccountCustomizationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9131,12 +8955,11 @@ export const de_DescribeAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountSettings != null) { - contents.AccountSettings = de_AccountSettings(data.AccountSettings, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AccountSettings: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9176,10 +8999,9 @@ const de_DescribeAccountSettingsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9199,12 +9021,11 @@ export const de_DescribeAccountSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountInfo != null) { - contents.AccountInfo = de_AccountInfo(data.AccountInfo, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AccountInfo: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9244,10 +9065,9 @@ const de_DescribeAccountSubscriptionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9267,12 +9087,11 @@ export const de_DescribeAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Analysis != null) { - contents.Analysis = de_Analysis(data.Analysis, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Analysis: (_) => de_Analysis(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9312,10 +9131,9 @@ const de_DescribeAnalysisCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9335,27 +9153,16 @@ export const de_DescribeAnalysisDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Definition != null) { - contents.Definition = de_AnalysisDefinition(data.Definition, context); - } - if (data.Errors != null) { - contents.Errors = de_AnalysisErrorList(data.Errors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceStatus != null) { - contents.ResourceStatus = __expectString(data.ResourceStatus); - } - if (data.ThemeArn != null) { - contents.ThemeArn = __expectString(data.ThemeArn); - } + const doc = take(data, { + AnalysisId: __expectString, + Definition: (_) => de_AnalysisDefinition(_, context), + Errors: _json, + Name: __expectString, + RequestId: __expectString, + ResourceStatus: __expectString, + ThemeArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9401,10 +9208,9 @@ const de_DescribeAnalysisDefinitionCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9424,18 +9230,13 @@ export const de_DescribeAnalysisPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisArn != null) { - contents.AnalysisArn = __expectString(data.AnalysisArn); - } - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisArn: __expectString, + AnalysisId: __expectString, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9472,10 +9273,9 @@ const de_DescribeAnalysisPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9495,12 +9295,11 @@ export const de_DescribeDashboardCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Dashboard != null) { - contents.Dashboard = de_Dashboard(data.Dashboard, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Dashboard: (_) => de_Dashboard(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9540,10 +9339,9 @@ const de_DescribeDashboardCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9563,30 +9361,17 @@ export const de_DescribeDashboardDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.DashboardPublishOptions != null) { - contents.DashboardPublishOptions = de_DashboardPublishOptions(data.DashboardPublishOptions, context); - } - if (data.Definition != null) { - contents.Definition = de_DashboardVersionDefinition(data.Definition, context); - } - if (data.Errors != null) { - contents.Errors = de_DashboardErrorList(data.Errors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceStatus != null) { - contents.ResourceStatus = __expectString(data.ResourceStatus); - } - if (data.ThemeArn != null) { - contents.ThemeArn = __expectString(data.ThemeArn); - } + const doc = take(data, { + DashboardId: __expectString, + DashboardPublishOptions: _json, + Definition: (_) => de_DashboardVersionDefinition(_, context), + Errors: _json, + Name: __expectString, + RequestId: __expectString, + ResourceStatus: __expectString, + ThemeArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9632,10 +9417,9 @@ const de_DescribeDashboardDefinitionCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9655,21 +9439,14 @@ export const de_DescribeDashboardPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardArn != null) { - contents.DashboardArn = __expectString(data.DashboardArn); - } - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.LinkSharingConfiguration != null) { - contents.LinkSharingConfiguration = de_LinkSharingConfiguration(data.LinkSharingConfiguration, context); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DashboardArn: __expectString, + DashboardId: __expectString, + LinkSharingConfiguration: _json, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9706,10 +9483,9 @@ const de_DescribeDashboardPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9729,12 +9505,11 @@ export const de_DescribeDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSet != null) { - contents.DataSet = de_DataSet(data.DataSet, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSet: (_) => de_DataSet(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9771,10 +9546,9 @@ const de_DescribeDataSetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9794,18 +9568,13 @@ export const de_DescribeDataSetPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSetArn != null) { - contents.DataSetArn = __expectString(data.DataSetArn); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSetArn: __expectString, + DataSetId: __expectString, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9842,10 +9611,9 @@ const de_DescribeDataSetPermissionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9865,12 +9633,11 @@ export const de_DescribeDataSetRefreshPropertiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSetRefreshProperties != null) { - contents.DataSetRefreshProperties = de_DataSetRefreshProperties(data.DataSetRefreshProperties, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSetRefreshProperties: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9913,10 +9680,9 @@ const de_DescribeDataSetRefreshPropertiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9936,12 +9702,11 @@ export const de_DescribeDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSource != null) { - contents.DataSource = de_DataSource(data.DataSource, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSource: (_) => de_DataSource(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -9978,10 +9743,9 @@ const de_DescribeDataSourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10001,18 +9765,13 @@ export const de_DescribeDataSourcePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSourceArn != null) { - contents.DataSourceArn = __expectString(data.DataSourceArn); - } - if (data.DataSourceId != null) { - contents.DataSourceId = __expectString(data.DataSourceId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSourceArn: __expectString, + DataSourceId: __expectString, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10049,10 +9808,9 @@ const de_DescribeDataSourcePermissionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10072,12 +9830,11 @@ export const de_DescribeFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Folder != null) { - contents.Folder = de_Folder(data.Folder, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Folder: (_) => de_Folder(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10117,10 +9874,9 @@ const de_DescribeFolderCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10140,18 +9896,13 @@ export const de_DescribeFolderPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.FolderId != null) { - contents.FolderId = __expectString(data.FolderId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + FolderId: __expectString, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10191,10 +9942,9 @@ const de_DescribeFolderPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10214,18 +9964,13 @@ export const de_DescribeFolderResolvedPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.FolderId != null) { - contents.FolderId = __expectString(data.FolderId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + FolderId: __expectString, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10265,10 +10010,9 @@ const de_DescribeFolderResolvedPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10288,12 +10032,11 @@ export const de_DescribeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Group: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10336,10 +10079,9 @@ const de_DescribeGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10359,12 +10101,11 @@ export const de_DescribeGroupMembershipCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupMember != null) { - contents.GroupMember = de_GroupMember(data.GroupMember, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + GroupMember: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10407,10 +10148,9 @@ const de_DescribeGroupMembershipCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10430,12 +10170,11 @@ export const de_DescribeIAMPolicyAssignmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IAMPolicyAssignment != null) { - contents.IAMPolicyAssignment = de_IAMPolicyAssignment(data.IAMPolicyAssignment, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + IAMPolicyAssignment: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10475,10 +10214,9 @@ const de_DescribeIAMPolicyAssignmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10498,12 +10236,11 @@ export const de_DescribeIngestionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Ingestion != null) { - contents.Ingestion = de_Ingestion(data.Ingestion, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Ingestion: (_) => de_Ingestion(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10543,10 +10280,9 @@ const de_DescribeIngestionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10566,18 +10302,13 @@ export const de_DescribeIpRestrictionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AwsAccountId != null) { - contents.AwsAccountId = __expectString(data.AwsAccountId); - } - if (data.Enabled != null) { - contents.Enabled = __expectBoolean(data.Enabled); - } - if (data.IpRestrictionRuleMap != null) { - contents.IpRestrictionRuleMap = de_IpRestrictionRuleMap(data.IpRestrictionRuleMap, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AwsAccountId: __expectString, + Enabled: __expectBoolean, + IpRestrictionRuleMap: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10614,10 +10345,9 @@ const de_DescribeIpRestrictionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10637,12 +10367,11 @@ export const de_DescribeNamespaceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Namespace != null) { - contents.Namespace = de_NamespaceInfoV2(data.Namespace, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Namespace: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10682,10 +10411,9 @@ const de_DescribeNamespaceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10705,15 +10433,12 @@ export const de_DescribeRefreshScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RefreshSchedule != null) { - contents.RefreshSchedule = de_RefreshSchedule(data.RefreshSchedule, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + RefreshSchedule: (_) => de_RefreshSchedule(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10753,10 +10478,9 @@ const de_DescribeRefreshScheduleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10776,12 +10500,11 @@ export const de_DescribeTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Template != null) { - contents.Template = de_Template(data.Template, context); - } + const doc = take(data, { + RequestId: __expectString, + Template: (_) => de_Template(_, context), + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10827,10 +10550,9 @@ const de_DescribeTemplateCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10850,12 +10572,11 @@ export const de_DescribeTemplateAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateAlias != null) { - contents.TemplateAlias = de_TemplateAlias(data.TemplateAlias, context); - } + const doc = take(data, { + RequestId: __expectString, + TemplateAlias: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10889,10 +10610,9 @@ const de_DescribeTemplateAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10912,27 +10632,16 @@ export const de_DescribeTemplateDefinitionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Definition != null) { - contents.Definition = de_TemplateVersionDefinition(data.Definition, context); - } - if (data.Errors != null) { - contents.Errors = de_TemplateErrorList(data.Errors, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceStatus != null) { - contents.ResourceStatus = __expectString(data.ResourceStatus); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } - if (data.ThemeArn != null) { - contents.ThemeArn = __expectString(data.ThemeArn); - } + const doc = take(data, { + Definition: (_) => de_TemplateVersionDefinition(_, context), + Errors: _json, + Name: __expectString, + RequestId: __expectString, + ResourceStatus: __expectString, + TemplateId: __expectString, + ThemeArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -10978,10 +10687,9 @@ const de_DescribeTemplateDefinitionCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11001,18 +10709,13 @@ export const de_DescribeTemplatePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateArn != null) { - contents.TemplateArn = __expectString(data.TemplateArn); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + Permissions: _json, + RequestId: __expectString, + TemplateArn: __expectString, + TemplateId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11052,10 +10755,9 @@ const de_DescribeTemplatePermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11075,12 +10777,11 @@ export const de_DescribeThemeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Theme != null) { - contents.Theme = de_Theme(data.Theme, context); - } + const doc = take(data, { + RequestId: __expectString, + Theme: (_) => de_Theme(_, context), + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11123,10 +10824,9 @@ const de_DescribeThemeCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11146,12 +10846,11 @@ export const de_DescribeThemeAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeAlias != null) { - contents.ThemeAlias = de_ThemeAlias(data.ThemeAlias, context); - } + const doc = take(data, { + RequestId: __expectString, + ThemeAlias: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11191,10 +10890,9 @@ const de_DescribeThemeAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11214,18 +10912,13 @@ export const de_DescribeThemePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeArn != null) { - contents.ThemeArn = __expectString(data.ThemeArn); - } - if (data.ThemeId != null) { - contents.ThemeId = __expectString(data.ThemeId); - } + const doc = take(data, { + Permissions: _json, + RequestId: __expectString, + ThemeArn: __expectString, + ThemeId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11265,10 +10958,9 @@ const de_DescribeThemePermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11288,12 +10980,11 @@ export const de_DescribeUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + RequestId: __expectString, + User: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11336,10 +11027,9 @@ const de_DescribeUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11359,15 +11049,12 @@ export const de_GenerateEmbedUrlForAnonymousUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnonymousUserArn != null) { - contents.AnonymousUserArn = __expectString(data.AnonymousUserArn); - } - if (data.EmbedUrl != null) { - contents.EmbedUrl = __expectString(data.EmbedUrl); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnonymousUserArn: __expectString, + EmbedUrl: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11413,10 +11100,9 @@ const de_GenerateEmbedUrlForAnonymousUserCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11436,12 +11122,11 @@ export const de_GenerateEmbedUrlForRegisteredUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmbedUrl != null) { - contents.EmbedUrl = __expectString(data.EmbedUrl); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + EmbedUrl: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11490,10 +11175,9 @@ const de_GenerateEmbedUrlForRegisteredUserCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11513,12 +11197,11 @@ export const de_GetDashboardEmbedUrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmbedUrl != null) { - contents.EmbedUrl = __expectString(data.EmbedUrl); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + EmbedUrl: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11576,10 +11259,9 @@ const de_GetDashboardEmbedUrlCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11599,12 +11281,11 @@ export const de_GetSessionEmbedUrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmbedUrl != null) { - contents.EmbedUrl = __expectString(data.EmbedUrl); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + EmbedUrl: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11653,10 +11334,9 @@ const de_GetSessionEmbedUrlCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11676,15 +11356,12 @@ export const de_ListAnalysesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisSummaryList != null) { - contents.AnalysisSummaryList = de_AnalysisSummaryList(data.AnalysisSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisSummaryList: (_) => de_AnalysisSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11718,10 +11395,9 @@ const de_ListAnalysesCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11741,15 +11417,12 @@ export const de_ListDashboardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardSummaryList != null) { - contents.DashboardSummaryList = de_DashboardSummaryList(data.DashboardSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DashboardSummaryList: (_) => de_DashboardSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11783,10 +11456,9 @@ const de_ListDashboardsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11806,15 +11478,12 @@ export const de_ListDashboardVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardVersionSummaryList != null) { - contents.DashboardVersionSummaryList = de_DashboardVersionSummaryList(data.DashboardVersionSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DashboardVersionSummaryList: (_) => de_DashboardVersionSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11854,10 +11523,9 @@ const de_ListDashboardVersionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11877,15 +11545,12 @@ export const de_ListDataSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSetSummaries != null) { - contents.DataSetSummaries = de_DataSetSummaryList(data.DataSetSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSetSummaries: (_) => de_DataSetSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11922,10 +11587,9 @@ const de_ListDataSetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11945,15 +11609,12 @@ export const de_ListDataSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSources != null) { - contents.DataSources = de_DataSourceList(data.DataSources, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSources: (_) => de_DataSourceList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -11990,10 +11651,9 @@ const de_ListDataSourcesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12013,15 +11673,12 @@ export const de_ListFolderMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FolderMemberList != null) { - contents.FolderMemberList = de_FolderMemberList(data.FolderMemberList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + FolderMemberList: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12064,10 +11721,9 @@ const de_ListFolderMembersCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12087,15 +11743,12 @@ export const de_ListFoldersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FolderSummaryList != null) { - contents.FolderSummaryList = de_FolderSummaryList(data.FolderSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + FolderSummaryList: (_) => de_FolderSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12138,10 +11791,9 @@ const de_ListFoldersCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12161,15 +11813,12 @@ export const de_ListGroupMembershipsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupMemberList != null) { - contents.GroupMemberList = de_GroupMemberList(data.GroupMemberList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + GroupMemberList: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12215,10 +11864,9 @@ const de_ListGroupMembershipsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12238,15 +11886,12 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupList != null) { - contents.GroupList = de_GroupList(data.GroupList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + GroupList: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12292,10 +11937,9 @@ const de_ListGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12315,15 +11959,12 @@ export const de_ListIAMPolicyAssignmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IAMPolicyAssignments != null) { - contents.IAMPolicyAssignments = de_IAMPolicyAssignmentSummaryList(data.IAMPolicyAssignments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + IAMPolicyAssignments: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12363,10 +12004,9 @@ const de_ListIAMPolicyAssignmentsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12386,15 +12026,12 @@ export const de_ListIAMPolicyAssignmentsForUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ActiveAssignments != null) { - contents.ActiveAssignments = de_ActiveIAMPolicyAssignmentList(data.ActiveAssignments, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + ActiveAssignments: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12437,10 +12074,9 @@ const de_ListIAMPolicyAssignmentsForUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12460,15 +12096,12 @@ export const de_ListIngestionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Ingestions != null) { - contents.Ingestions = de_Ingestions(data.Ingestions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Ingestions: (_) => de_Ingestions(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12511,10 +12144,9 @@ const de_ListIngestionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12534,15 +12166,12 @@ export const de_ListNamespacesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Namespaces != null) { - contents.Namespaces = de_Namespaces(data.Namespaces, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Namespaces: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12588,10 +12217,9 @@ const de_ListNamespacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12611,12 +12239,11 @@ export const de_ListRefreshSchedulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RefreshSchedules != null) { - contents.RefreshSchedules = de_RefreshSchedules(data.RefreshSchedules, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RefreshSchedules: (_) => de_RefreshSchedules(_, context), + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12656,10 +12283,9 @@ const de_ListRefreshSchedulesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12679,12 +12305,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + RequestId: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12721,10 +12346,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12744,15 +12368,12 @@ export const de_ListTemplateAliasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateAliasList != null) { - contents.TemplateAliasList = de_TemplateAliasList(data.TemplateAliasList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + TemplateAliasList: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12789,10 +12410,9 @@ const de_ListTemplateAliasesCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12812,15 +12432,12 @@ export const de_ListTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateSummaryList != null) { - contents.TemplateSummaryList = de_TemplateSummaryList(data.TemplateSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + TemplateSummaryList: (_) => de_TemplateSummaryList(_, context), + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12860,10 +12477,9 @@ const de_ListTemplatesCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12883,15 +12499,12 @@ export const de_ListTemplateVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateVersionSummaryList != null) { - contents.TemplateVersionSummaryList = de_TemplateVersionSummaryList(data.TemplateVersionSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + TemplateVersionSummaryList: (_) => de_TemplateVersionSummaryList(_, context), + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -12931,10 +12544,9 @@ const de_ListTemplateVersionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12954,15 +12566,12 @@ export const de_ListThemeAliasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeAliasList != null) { - contents.ThemeAliasList = de_ThemeAliasList(data.ThemeAliasList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + ThemeAliasList: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13005,10 +12614,9 @@ const de_ListThemeAliasesCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13028,15 +12636,12 @@ export const de_ListThemesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeSummaryList != null) { - contents.ThemeSummaryList = de_ThemeSummaryList(data.ThemeSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + ThemeSummaryList: (_) => de_ThemeSummaryList(_, context), + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13079,10 +12684,9 @@ const de_ListThemesCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13102,15 +12706,12 @@ export const de_ListThemeVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeVersionSummaryList != null) { - contents.ThemeVersionSummaryList = de_ThemeVersionSummaryList(data.ThemeVersionSummaryList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + ThemeVersionSummaryList: (_) => de_ThemeVersionSummaryList(_, context), + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13153,10 +12754,9 @@ const de_ListThemeVersionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13176,15 +12776,12 @@ export const de_ListUserGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupList != null) { - contents.GroupList = de_GroupList(data.GroupList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + GroupList: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13227,10 +12824,9 @@ const de_ListUserGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13250,15 +12846,12 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.UserList != null) { - contents.UserList = de_UserList(data.UserList, context); - } + const doc = take(data, { + NextToken: __expectString, + RequestId: __expectString, + UserList: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13304,10 +12897,9 @@ const de_ListUsersCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13327,9 +12919,10 @@ export const de_PutDataSetRefreshPropertiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13375,10 +12968,9 @@ const de_PutDataSetRefreshPropertiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13398,15 +12990,12 @@ export const de_RegisterUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.User != null) { - contents.User = de_User(data.User, context); - } - if (data.UserInvitationUrl != null) { - contents.UserInvitationUrl = __expectString(data.UserInvitationUrl); - } + const doc = take(data, { + RequestId: __expectString, + User: _json, + UserInvitationUrl: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13455,10 +13044,9 @@ const de_RegisterUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13478,15 +13066,12 @@ export const de_RestoreAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisId: __expectString, + Arn: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13526,10 +13111,9 @@ const de_RestoreAnalysisCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13549,15 +13133,12 @@ export const de_SearchAnalysesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisSummaryList != null) { - contents.AnalysisSummaryList = de_AnalysisSummaryList(data.AnalysisSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisSummaryList: (_) => de_AnalysisSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13597,10 +13178,9 @@ const de_SearchAnalysesCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13620,15 +13200,12 @@ export const de_SearchDashboardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardSummaryList != null) { - contents.DashboardSummaryList = de_DashboardSummaryList(data.DashboardSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DashboardSummaryList: (_) => de_DashboardSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13668,10 +13245,9 @@ const de_SearchDashboardsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13691,15 +13267,12 @@ export const de_SearchDataSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSetSummaries != null) { - contents.DataSetSummaries = de_DataSetSummaryList(data.DataSetSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSetSummaries: (_) => de_DataSetSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13739,10 +13312,9 @@ const de_SearchDataSetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13762,15 +13334,12 @@ export const de_SearchDataSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSourceSummaries != null) { - contents.DataSourceSummaries = de_DataSourceSummaryList(data.DataSourceSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSourceSummaries: (_) => de_DataSourceSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13810,10 +13379,9 @@ const de_SearchDataSourcesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13833,15 +13401,12 @@ export const de_SearchFoldersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FolderSummaryList != null) { - contents.FolderSummaryList = de_FolderSummaryList(data.FolderSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + FolderSummaryList: (_) => de_FolderSummaryList(_, context), + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13887,10 +13452,9 @@ const de_SearchFoldersCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13910,15 +13474,12 @@ export const de_SearchGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupList != null) { - contents.GroupList = de_GroupList(data.GroupList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + GroupList: _json, + NextToken: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -13964,10 +13525,9 @@ const de_SearchGroupsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13987,9 +13547,10 @@ export const de_TagResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14029,10 +13590,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14052,9 +13612,10 @@ export const de_UntagResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14091,10 +13652,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14114,21 +13674,14 @@ export const de_UpdateAccountCustomizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountCustomization != null) { - contents.AccountCustomization = de_AccountCustomization(data.AccountCustomization, context); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.AwsAccountId != null) { - contents.AwsAccountId = __expectString(data.AwsAccountId); - } - if (data.Namespace != null) { - contents.Namespace = __expectString(data.Namespace); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AccountCustomization: _json, + Arn: __expectString, + AwsAccountId: __expectString, + Namespace: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14171,10 +13724,9 @@ const de_UpdateAccountCustomizationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14194,9 +13746,10 @@ export const de_UpdateAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14236,10 +13789,9 @@ const de_UpdateAccountSettingsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14259,18 +13811,13 @@ export const de_UpdateAnalysisCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.UpdateStatus != null) { - contents.UpdateStatus = __expectString(data.UpdateStatus); - } + const doc = take(data, { + AnalysisId: __expectString, + Arn: __expectString, + RequestId: __expectString, + UpdateStatus: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14313,10 +13860,9 @@ const de_UpdateAnalysisCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14336,18 +13882,13 @@ export const de_UpdateAnalysisPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnalysisArn != null) { - contents.AnalysisArn = __expectString(data.AnalysisArn); - } - if (data.AnalysisId != null) { - contents.AnalysisId = __expectString(data.AnalysisId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AnalysisArn: __expectString, + AnalysisId: __expectString, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14390,10 +13931,9 @@ const de_UpdateAnalysisPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14413,24 +13953,15 @@ export const de_UpdateDashboardCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Status != null) { - contents.Status = __expectInt32(data.Status); - } - if (data.VersionArn != null) { - contents.VersionArn = __expectString(data.VersionArn); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + DashboardId: __expectString, + RequestId: __expectString, + Status: __expectInt32, + VersionArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -14470,10 +14001,9 @@ const de_UpdateDashboardCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14493,21 +14023,14 @@ export const de_UpdateDashboardPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardArn != null) { - contents.DashboardArn = __expectString(data.DashboardArn); - } - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.LinkSharingConfiguration != null) { - contents.LinkSharingConfiguration = de_LinkSharingConfiguration(data.LinkSharingConfiguration, context); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DashboardArn: __expectString, + DashboardId: __expectString, + LinkSharingConfiguration: _json, + Permissions: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14550,10 +14073,9 @@ const de_UpdateDashboardPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14573,15 +14095,12 @@ export const de_UpdateDashboardPublishedVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DashboardArn != null) { - contents.DashboardArn = __expectString(data.DashboardArn); - } - if (data.DashboardId != null) { - contents.DashboardId = __expectString(data.DashboardId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DashboardArn: __expectString, + DashboardId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14621,10 +14140,9 @@ const de_UpdateDashboardPublishedVersionCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14644,21 +14162,14 @@ export const de_UpdateDataSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.IngestionArn != null) { - contents.IngestionArn = __expectString(data.IngestionArn); - } - if (data.IngestionId != null) { - contents.IngestionId = __expectString(data.IngestionId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + DataSetId: __expectString, + IngestionArn: __expectString, + IngestionId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14704,10 +14215,9 @@ const de_UpdateDataSetCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14727,15 +14237,12 @@ export const de_UpdateDataSetPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSetArn != null) { - contents.DataSetArn = __expectString(data.DataSetArn); - } - if (data.DataSetId != null) { - contents.DataSetId = __expectString(data.DataSetId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSetArn: __expectString, + DataSetId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14775,10 +14282,9 @@ const de_UpdateDataSetPermissionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14798,18 +14304,13 @@ export const de_UpdateDataSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.DataSourceId != null) { - contents.DataSourceId = __expectString(data.DataSourceId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.UpdateStatus != null) { - contents.UpdateStatus = __expectString(data.UpdateStatus); - } + const doc = take(data, { + Arn: __expectString, + DataSourceId: __expectString, + RequestId: __expectString, + UpdateStatus: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14849,10 +14350,9 @@ const de_UpdateDataSourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14872,15 +14372,12 @@ export const de_UpdateDataSourcePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DataSourceArn != null) { - contents.DataSourceArn = __expectString(data.DataSourceArn); - } - if (data.DataSourceId != null) { - contents.DataSourceId = __expectString(data.DataSourceId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + DataSourceArn: __expectString, + DataSourceId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14920,10 +14417,9 @@ const de_UpdateDataSourcePermissionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14943,15 +14439,12 @@ export const de_UpdateFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.FolderId != null) { - contents.FolderId = __expectString(data.FolderId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Arn: __expectString, + FolderId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -14997,10 +14490,9 @@ const de_UpdateFolderCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15020,21 +14512,14 @@ export const de_UpdateFolderPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.FolderId != null) { - contents.FolderId = __expectString(data.FolderId); - } - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.Status != null) { - contents.Status = __expectInt32(data.Status); - } + const doc = take(data, { + Arn: __expectString, + FolderId: __expectString, + Permissions: _json, + RequestId: __expectString, + Status: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -15074,10 +14559,9 @@ const de_UpdateFolderPermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15097,12 +14581,11 @@ export const de_UpdateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Group: _json, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15145,10 +14628,9 @@ const de_UpdateGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15168,24 +14650,15 @@ export const de_UpdateIAMPolicyAssignmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssignmentId != null) { - contents.AssignmentId = __expectString(data.AssignmentId); - } - if (data.AssignmentName != null) { - contents.AssignmentName = __expectString(data.AssignmentName); - } - if (data.AssignmentStatus != null) { - contents.AssignmentStatus = __expectString(data.AssignmentStatus); - } - if (data.Identities != null) { - contents.Identities = de_IdentityMap(data.Identities, context); - } - if (data.PolicyArn != null) { - contents.PolicyArn = __expectString(data.PolicyArn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AssignmentId: __expectString, + AssignmentName: __expectString, + AssignmentStatus: __expectString, + Identities: _json, + PolicyArn: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15228,10 +14701,9 @@ const de_UpdateIAMPolicyAssignmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15251,12 +14723,11 @@ export const de_UpdateIpRestrictionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AwsAccountId != null) { - contents.AwsAccountId = __expectString(data.AwsAccountId); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + AwsAccountId: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15296,10 +14767,9 @@ const de_UpdateIpRestrictionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15319,9 +14789,10 @@ export const de_UpdatePublicSharingSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15361,10 +14832,9 @@ const de_UpdatePublicSharingSettingsCommandError = async ( throw await de_UnsupportedPricingPlanExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15384,15 +14854,12 @@ export const de_UpdateRefreshScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ScheduleId != null) { - contents.ScheduleId = __expectString(data.ScheduleId); - } + const doc = take(data, { + Arn: __expectString, + RequestId: __expectString, + ScheduleId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15435,10 +14902,9 @@ const de_UpdateRefreshScheduleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15458,21 +14924,14 @@ export const de_UpdateTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } - if (data.VersionArn != null) { - contents.VersionArn = __expectString(data.VersionArn); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + RequestId: __expectString, + TemplateId: __expectString, + VersionArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15518,10 +14977,9 @@ const de_UpdateTemplateCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15541,12 +14999,11 @@ export const de_UpdateTemplateAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateAlias != null) { - contents.TemplateAlias = de_TemplateAlias(data.TemplateAlias, context); - } + const doc = take(data, { + RequestId: __expectString, + TemplateAlias: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15583,10 +15040,9 @@ const de_UpdateTemplateAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15606,18 +15062,13 @@ export const de_UpdateTemplatePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.TemplateArn != null) { - contents.TemplateArn = __expectString(data.TemplateArn); - } - if (data.TemplateId != null) { - contents.TemplateId = __expectString(data.TemplateId); - } + const doc = take(data, { + Permissions: _json, + RequestId: __expectString, + TemplateArn: __expectString, + TemplateId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15660,10 +15111,9 @@ const de_UpdateTemplatePermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15683,21 +15133,14 @@ export const de_UpdateThemeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationStatus != null) { - contents.CreationStatus = __expectString(data.CreationStatus); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeId != null) { - contents.ThemeId = __expectString(data.ThemeId); - } - if (data.VersionArn != null) { - contents.VersionArn = __expectString(data.VersionArn); - } + const doc = take(data, { + Arn: __expectString, + CreationStatus: __expectString, + RequestId: __expectString, + ThemeId: __expectString, + VersionArn: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15743,10 +15186,9 @@ const de_UpdateThemeCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15766,12 +15208,11 @@ export const de_UpdateThemeAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeAlias != null) { - contents.ThemeAlias = de_ThemeAlias(data.ThemeAlias, context); - } + const doc = take(data, { + RequestId: __expectString, + ThemeAlias: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15814,10 +15255,9 @@ const de_UpdateThemeAliasCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15837,18 +15277,13 @@ export const de_UpdateThemePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Permissions != null) { - contents.Permissions = de_ResourcePermissionList(data.Permissions, context); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ThemeArn != null) { - contents.ThemeArn = __expectString(data.ThemeArn); - } - if (data.ThemeId != null) { - contents.ThemeId = __expectString(data.ThemeId); - } + const doc = take(data, { + Permissions: _json, + RequestId: __expectString, + ThemeArn: __expectString, + ThemeId: __expectString, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15891,10 +15326,9 @@ const de_UpdateThemePermissionsCommandError = async ( throw await de_UnsupportedUserEditionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15914,12 +15348,11 @@ export const de_UpdateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + RequestId: __expectString, + User: _json, + }); + Object.assign(contents, doc); map(contents, { Status: [, output.statusCode], }); @@ -15962,16 +15395,15 @@ const de_UpdateUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -15981,12 +15413,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16003,12 +15434,11 @@ const de_ConcurrentUpdatingExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentUpdatingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16022,12 +15452,11 @@ const de_ConcurrentUpdatingExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16044,12 +15473,11 @@ const de_DomainNotWhitelistedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new DomainNotWhitelistedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16066,12 +15494,11 @@ const de_IdentityTypeNotSupportedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new IdentityTypeNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16088,12 +15515,11 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16110,12 +15536,11 @@ const de_InvalidNextTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16132,12 +15557,11 @@ const de_InvalidParameterValueExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16154,12 +15578,11 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16176,15 +15599,12 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16201,12 +15621,11 @@ const de_PreconditionNotMetExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new PreconditionNotMetException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16223,12 +15642,11 @@ const de_QuickSightUserNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new QuickSightUserNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16245,15 +15663,12 @@ const de_ResourceExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16270,15 +15685,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16295,15 +15707,12 @@ const de_ResourceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16320,12 +15729,11 @@ const de_SessionLifetimeInMinutesInvalidExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new SessionLifetimeInMinutesInvalidException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16339,12 +15747,11 @@ const de_SessionLifetimeInMinutesInvalidExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16361,12 +15768,11 @@ const de_UnsupportedPricingPlanExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedPricingPlanException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16383,12 +15789,11 @@ const de_UnsupportedUserEditionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.RequestId != null) { - contents.RequestId = __expectString(data.RequestId); - } + const doc = take(data, { + Message: __expectString, + RequestId: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedUserEditionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -16396,64 +15801,32 @@ const de_UnsupportedUserEditionExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountCustomization - */ -const se_AccountCustomization = (input: AccountCustomization, context: __SerdeContext): any => { - return { - ...(input.DefaultEmailCustomizationTemplate != null && { - DefaultEmailCustomizationTemplate: input.DefaultEmailCustomizationTemplate, - }), - ...(input.DefaultTheme != null && { DefaultTheme: input.DefaultTheme }), - }; -}; +// se_AccountCustomization omitted. -/** - * serializeAws_restJson1ActionList - */ -const se_ActionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ActionList omitted. -/** - * serializeAws_restJson1AdHocFilteringOption - */ -const se_AdHocFilteringOption = (input: AdHocFilteringOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; -}; +// se_AdHocFilteringOption omitted. /** * serializeAws_restJson1AggregationFunction */ const se_AggregationFunction = (input: AggregationFunction, context: __SerdeContext): any => { - return { - ...(input.CategoricalAggregationFunction != null && { - CategoricalAggregationFunction: input.CategoricalAggregationFunction, - }), - ...(input.DateAggregationFunction != null && { DateAggregationFunction: input.DateAggregationFunction }), - ...(input.NumericalAggregationFunction != null && { - NumericalAggregationFunction: se_NumericalAggregationFunction(input.NumericalAggregationFunction, context), - }), - }; + return take(input, { + CategoricalAggregationFunction: [], + DateAggregationFunction: [], + NumericalAggregationFunction: (_) => se_NumericalAggregationFunction(_, context), + }); }; /** * serializeAws_restJson1AggregationSortConfiguration */ const se_AggregationSortConfiguration = (input: AggregationSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { - AggregationFunction: se_AggregationFunction(input.AggregationFunction, context), - }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.SortDirection != null && { SortDirection: input.SortDirection }), - }; + return take(input, { + AggregationFunction: (_) => se_AggregationFunction(_, context), + Column: _json, + SortDirection: [], + }); }; /** @@ -16467,606 +15840,309 @@ const se_AggregationSortConfigurationList = (input: AggregationSortConfiguration }); }; -/** - * serializeAws_restJson1AmazonElasticsearchParameters - */ -const se_AmazonElasticsearchParameters = (input: AmazonElasticsearchParameters, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - }; -}; +// se_AmazonElasticsearchParameters omitted. -/** - * serializeAws_restJson1AmazonOpenSearchParameters - */ -const se_AmazonOpenSearchParameters = (input: AmazonOpenSearchParameters, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - }; -}; +// se_AmazonOpenSearchParameters omitted. -/** - * serializeAws_restJson1AnalysisDefaults - */ -const se_AnalysisDefaults = (input: AnalysisDefaults, context: __SerdeContext): any => { - return { - ...(input.DefaultNewSheetConfiguration != null && { - DefaultNewSheetConfiguration: se_DefaultNewSheetConfiguration(input.DefaultNewSheetConfiguration, context), - }), - }; -}; +// se_AnalysisDefaults omitted. /** * serializeAws_restJson1AnalysisDefinition */ const se_AnalysisDefinition = (input: AnalysisDefinition, context: __SerdeContext): any => { - return { - ...(input.AnalysisDefaults != null && { AnalysisDefaults: se_AnalysisDefaults(input.AnalysisDefaults, context) }), - ...(input.CalculatedFields != null && { CalculatedFields: se_CalculatedFields(input.CalculatedFields, context) }), - ...(input.ColumnConfigurations != null && { - ColumnConfigurations: se_ColumnConfigurationList(input.ColumnConfigurations, context), - }), - ...(input.DataSetIdentifierDeclarations != null && { - DataSetIdentifierDeclarations: se_DataSetIdentifierDeclarationList(input.DataSetIdentifierDeclarations, context), - }), - ...(input.FilterGroups != null && { FilterGroups: se_FilterGroupList(input.FilterGroups, context) }), - ...(input.ParameterDeclarations != null && { - ParameterDeclarations: se_ParameterDeclarationList(input.ParameterDeclarations, context), - }), - ...(input.Sheets != null && { Sheets: se_SheetDefinitionList(input.Sheets, context) }), - }; + return take(input, { + AnalysisDefaults: _json, + CalculatedFields: _json, + ColumnConfigurations: _json, + DataSetIdentifierDeclarations: _json, + FilterGroups: (_) => se_FilterGroupList(_, context), + ParameterDeclarations: (_) => se_ParameterDeclarationList(_, context), + Sheets: (_) => se_SheetDefinitionList(_, context), + }); }; +// se_AnalysisSearchFilter omitted. + +// se_AnalysisSearchFilterList omitted. + +// se_AnalysisSourceEntity omitted. + +// se_AnalysisSourceTemplate omitted. + +// se_AnchorDateConfiguration omitted. + +// se_AnonymousUserDashboardEmbeddingConfiguration omitted. + +// se_AnonymousUserDashboardVisualEmbeddingConfiguration omitted. + +// se_AnonymousUserEmbeddingExperienceConfiguration omitted. + +// se_AnonymousUserQSearchBarEmbeddingConfiguration omitted. + /** - * serializeAws_restJson1AnalysisSearchFilter + * serializeAws_restJson1ArcAxisConfiguration */ -const se_AnalysisSearchFilter = (input: AnalysisSearchFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_ArcAxisConfiguration = (input: ArcAxisConfiguration, context: __SerdeContext): any => { + return take(input, { + Range: (_) => se_ArcAxisDisplayRange(_, context), + ReserveRange: [], + }); }; /** - * serializeAws_restJson1AnalysisSearchFilterList + * serializeAws_restJson1ArcAxisDisplayRange */ -const se_AnalysisSearchFilterList = (input: AnalysisSearchFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AnalysisSearchFilter(entry, context); - }); +const se_ArcAxisDisplayRange = (input: ArcAxisDisplayRange, context: __SerdeContext): any => { + return take(input, { + Max: __serializeFloat, + Min: __serializeFloat, + }); }; /** - * serializeAws_restJson1AnalysisSourceEntity + * serializeAws_restJson1ArcConfiguration */ -const se_AnalysisSourceEntity = (input: AnalysisSourceEntity, context: __SerdeContext): any => { - return { - ...(input.SourceTemplate != null && { SourceTemplate: se_AnalysisSourceTemplate(input.SourceTemplate, context) }), - }; +const se_ArcConfiguration = (input: ArcConfiguration, context: __SerdeContext): any => { + return take(input, { + ArcAngle: __serializeFloat, + ArcThickness: [], + }); }; +// se_ArcOptions omitted. + +// se_ArnList omitted. + +// se_AthenaParameters omitted. + +// se_AuroraParameters omitted. + +// se_AuroraPostgreSqlParameters omitted. + +// se_AwsIotAnalyticsParameters omitted. + /** - * serializeAws_restJson1AnalysisSourceTemplate + * serializeAws_restJson1AxisDataOptions */ -const se_AnalysisSourceTemplate = (input: AnalysisSourceTemplate, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.DataSetReferences != null && { - DataSetReferences: se_DataSetReferenceList(input.DataSetReferences, context), - }), - }; +const se_AxisDataOptions = (input: AxisDataOptions, context: __SerdeContext): any => { + return take(input, { + DateAxisOptions: _json, + NumericAxisOptions: (_) => se_NumericAxisOptions(_, context), + }); }; +// se_AxisDisplayDataDrivenRange omitted. + /** - * serializeAws_restJson1AnchorDateConfiguration + * serializeAws_restJson1AxisDisplayMinMaxRange */ -const se_AnchorDateConfiguration = (input: AnchorDateConfiguration, context: __SerdeContext): any => { - return { - ...(input.AnchorOption != null && { AnchorOption: input.AnchorOption }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - }; +const se_AxisDisplayMinMaxRange = (input: AxisDisplayMinMaxRange, context: __SerdeContext): any => { + return take(input, { + Maximum: __serializeFloat, + Minimum: __serializeFloat, + }); }; /** - * serializeAws_restJson1AnonymousUserDashboardEmbeddingConfiguration + * serializeAws_restJson1AxisDisplayOptions */ -const se_AnonymousUserDashboardEmbeddingConfiguration = ( - input: AnonymousUserDashboardEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InitialDashboardId != null && { InitialDashboardId: input.InitialDashboardId }), - }; -}; - -/** - * serializeAws_restJson1AnonymousUserDashboardVisualEmbeddingConfiguration - */ -const se_AnonymousUserDashboardVisualEmbeddingConfiguration = ( - input: AnonymousUserDashboardVisualEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InitialDashboardVisualId != null && { - InitialDashboardVisualId: se_DashboardVisualId(input.InitialDashboardVisualId, context), - }), - }; -}; - -/** - * serializeAws_restJson1AnonymousUserEmbeddingExperienceConfiguration - */ -const se_AnonymousUserEmbeddingExperienceConfiguration = ( - input: AnonymousUserEmbeddingExperienceConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Dashboard != null && { - Dashboard: se_AnonymousUserDashboardEmbeddingConfiguration(input.Dashboard, context), - }), - ...(input.DashboardVisual != null && { - DashboardVisual: se_AnonymousUserDashboardVisualEmbeddingConfiguration(input.DashboardVisual, context), - }), - ...(input.QSearchBar != null && { - QSearchBar: se_AnonymousUserQSearchBarEmbeddingConfiguration(input.QSearchBar, context), - }), - }; -}; - -/** - * serializeAws_restJson1AnonymousUserQSearchBarEmbeddingConfiguration - */ -const se_AnonymousUserQSearchBarEmbeddingConfiguration = ( - input: AnonymousUserQSearchBarEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InitialTopicId != null && { InitialTopicId: input.InitialTopicId }), - }; -}; - -/** - * serializeAws_restJson1ArcAxisConfiguration - */ -const se_ArcAxisConfiguration = (input: ArcAxisConfiguration, context: __SerdeContext): any => { - return { - ...(input.Range != null && { Range: se_ArcAxisDisplayRange(input.Range, context) }), - ...(input.ReserveRange != null && { ReserveRange: input.ReserveRange }), - }; -}; - -/** - * serializeAws_restJson1ArcAxisDisplayRange - */ -const se_ArcAxisDisplayRange = (input: ArcAxisDisplayRange, context: __SerdeContext): any => { - return { - ...(input.Max != null && { Max: __serializeFloat(input.Max) }), - ...(input.Min != null && { Min: __serializeFloat(input.Min) }), - }; -}; - -/** - * serializeAws_restJson1ArcConfiguration - */ -const se_ArcConfiguration = (input: ArcConfiguration, context: __SerdeContext): any => { - return { - ...(input.ArcAngle != null && { ArcAngle: __serializeFloat(input.ArcAngle) }), - ...(input.ArcThickness != null && { ArcThickness: input.ArcThickness }), - }; -}; - -/** - * serializeAws_restJson1ArcOptions - */ -const se_ArcOptions = (input: ArcOptions, context: __SerdeContext): any => { - return { - ...(input.ArcThickness != null && { ArcThickness: input.ArcThickness }), - }; -}; - -/** - * serializeAws_restJson1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1AthenaParameters - */ -const se_AthenaParameters = (input: AthenaParameters, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; -}; - -/** - * serializeAws_restJson1AuroraParameters - */ -const se_AuroraParameters = (input: AuroraParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1AuroraPostgreSqlParameters - */ -const se_AuroraPostgreSqlParameters = (input: AuroraPostgreSqlParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1AwsIotAnalyticsParameters - */ -const se_AwsIotAnalyticsParameters = (input: AwsIotAnalyticsParameters, context: __SerdeContext): any => { - return { - ...(input.DataSetName != null && { DataSetName: input.DataSetName }), - }; -}; - -/** - * serializeAws_restJson1AxisDataOptions - */ -const se_AxisDataOptions = (input: AxisDataOptions, context: __SerdeContext): any => { - return { - ...(input.DateAxisOptions != null && { DateAxisOptions: se_DateAxisOptions(input.DateAxisOptions, context) }), - ...(input.NumericAxisOptions != null && { - NumericAxisOptions: se_NumericAxisOptions(input.NumericAxisOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1AxisDisplayDataDrivenRange - */ -const se_AxisDisplayDataDrivenRange = (input: AxisDisplayDataDrivenRange, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_restJson1AxisDisplayMinMaxRange - */ -const se_AxisDisplayMinMaxRange = (input: AxisDisplayMinMaxRange, context: __SerdeContext): any => { - return { - ...(input.Maximum != null && { Maximum: __serializeFloat(input.Maximum) }), - ...(input.Minimum != null && { Minimum: __serializeFloat(input.Minimum) }), - }; -}; - -/** - * serializeAws_restJson1AxisDisplayOptions - */ -const se_AxisDisplayOptions = (input: AxisDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.AxisLineVisibility != null && { AxisLineVisibility: input.AxisLineVisibility }), - ...(input.AxisOffset != null && { AxisOffset: input.AxisOffset }), - ...(input.DataOptions != null && { DataOptions: se_AxisDataOptions(input.DataOptions, context) }), - ...(input.GridLineVisibility != null && { GridLineVisibility: input.GridLineVisibility }), - ...(input.ScrollbarOptions != null && { ScrollbarOptions: se_ScrollBarOptions(input.ScrollbarOptions, context) }), - ...(input.TickLabelOptions != null && { - TickLabelOptions: se_AxisTickLabelOptions(input.TickLabelOptions, context), - }), - }; +const se_AxisDisplayOptions = (input: AxisDisplayOptions, context: __SerdeContext): any => { + return take(input, { + AxisLineVisibility: [], + AxisOffset: [], + DataOptions: (_) => se_AxisDataOptions(_, context), + GridLineVisibility: [], + ScrollbarOptions: (_) => se_ScrollBarOptions(_, context), + TickLabelOptions: (_) => se_AxisTickLabelOptions(_, context), + }); }; /** * serializeAws_restJson1AxisDisplayRange */ const se_AxisDisplayRange = (input: AxisDisplayRange, context: __SerdeContext): any => { - return { - ...(input.DataDriven != null && { DataDriven: se_AxisDisplayDataDrivenRange(input.DataDriven, context) }), - ...(input.MinMax != null && { MinMax: se_AxisDisplayMinMaxRange(input.MinMax, context) }), - }; + return take(input, { + DataDriven: _json, + MinMax: (_) => se_AxisDisplayMinMaxRange(_, context), + }); }; -/** - * serializeAws_restJson1AxisLabelOptions - */ -const se_AxisLabelOptions = (input: AxisLabelOptions, context: __SerdeContext): any => { - return { - ...(input.ApplyTo != null && { ApplyTo: se_AxisLabelReferenceOptions(input.ApplyTo, context) }), - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.FontConfiguration != null && { - FontConfiguration: se_FontConfiguration(input.FontConfiguration, context), - }), - }; -}; +// se_AxisLabelOptions omitted. -/** - * serializeAws_restJson1AxisLabelOptionsList - */ -const se_AxisLabelOptionsList = (input: AxisLabelOptions[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AxisLabelOptions(entry, context); - }); -}; +// se_AxisLabelOptionsList omitted. -/** - * serializeAws_restJson1AxisLabelReferenceOptions - */ -const se_AxisLabelReferenceOptions = (input: AxisLabelReferenceOptions, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - }; -}; +// se_AxisLabelReferenceOptions omitted. /** * serializeAws_restJson1AxisLinearScale */ const se_AxisLinearScale = (input: AxisLinearScale, context: __SerdeContext): any => { - return { - ...(input.StepCount != null && { StepCount: input.StepCount }), - ...(input.StepSize != null && { StepSize: __serializeFloat(input.StepSize) }), - }; + return take(input, { + StepCount: [], + StepSize: __serializeFloat, + }); }; /** * serializeAws_restJson1AxisLogarithmicScale */ const se_AxisLogarithmicScale = (input: AxisLogarithmicScale, context: __SerdeContext): any => { - return { - ...(input.Base != null && { Base: __serializeFloat(input.Base) }), - }; + return take(input, { + Base: __serializeFloat, + }); }; /** * serializeAws_restJson1AxisScale */ const se_AxisScale = (input: AxisScale, context: __SerdeContext): any => { - return { - ...(input.Linear != null && { Linear: se_AxisLinearScale(input.Linear, context) }), - ...(input.Logarithmic != null && { Logarithmic: se_AxisLogarithmicScale(input.Logarithmic, context) }), - }; + return take(input, { + Linear: (_) => se_AxisLinearScale(_, context), + Logarithmic: (_) => se_AxisLogarithmicScale(_, context), + }); }; /** * serializeAws_restJson1AxisTickLabelOptions */ const se_AxisTickLabelOptions = (input: AxisTickLabelOptions, context: __SerdeContext): any => { - return { - ...(input.LabelOptions != null && { LabelOptions: se_LabelOptions(input.LabelOptions, context) }), - ...(input.RotationAngle != null && { RotationAngle: __serializeFloat(input.RotationAngle) }), - }; + return take(input, { + LabelOptions: _json, + RotationAngle: __serializeFloat, + }); }; /** * serializeAws_restJson1BarChartAggregatedFieldWells */ const se_BarChartAggregatedFieldWells = (input: BarChartAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_DimensionFieldList(input.Category, context) }), - ...(input.Colors != null && { Colors: se_DimensionFieldList(input.Colors, context) }), - ...(input.SmallMultiples != null && { - SmallMultiples: se_SmallMultiplesDimensionFieldList(input.SmallMultiples, context), - }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; + return take(input, { + Category: _json, + Colors: _json, + SmallMultiples: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; /** * serializeAws_restJson1BarChartConfiguration */ const se_BarChartConfiguration = (input: BarChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.BarsArrangement != null && { BarsArrangement: input.BarsArrangement }), - ...(input.CategoryAxis != null && { CategoryAxis: se_AxisDisplayOptions(input.CategoryAxis, context) }), - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.ColorLabelOptions != null && { - ColorLabelOptions: se_ChartAxisLabelOptions(input.ColorLabelOptions, context), - }), - ...(input.ContributionAnalysisDefaults != null && { - ContributionAnalysisDefaults: se_ContributionAnalysisDefaultList(input.ContributionAnalysisDefaults, context), - }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_BarChartFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.Orientation != null && { Orientation: input.Orientation }), - ...(input.ReferenceLines != null && { ReferenceLines: se_ReferenceLineList(input.ReferenceLines, context) }), - ...(input.SmallMultiplesOptions != null && { - SmallMultiplesOptions: se_SmallMultiplesOptions(input.SmallMultiplesOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_BarChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.ValueAxis != null && { ValueAxis: se_AxisDisplayOptions(input.ValueAxis, context) }), - ...(input.ValueLabelOptions != null && { - ValueLabelOptions: se_ChartAxisLabelOptions(input.ValueLabelOptions, context), - }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; + return take(input, { + BarsArrangement: [], + CategoryAxis: (_) => se_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + ColorLabelOptions: _json, + ContributionAnalysisDefaults: _json, + DataLabels: _json, + FieldWells: (_) => se_BarChartFieldWells(_, context), + Legend: _json, + Orientation: [], + ReferenceLines: (_) => se_ReferenceLineList(_, context), + SmallMultiplesOptions: _json, + SortConfiguration: (_) => se_BarChartSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + ValueAxis: (_) => se_AxisDisplayOptions(_, context), + ValueLabelOptions: _json, + VisualPalette: _json, + }); }; /** * serializeAws_restJson1BarChartFieldWells */ const se_BarChartFieldWells = (input: BarChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.BarChartAggregatedFieldWells != null && { - BarChartAggregatedFieldWells: se_BarChartAggregatedFieldWells(input.BarChartAggregatedFieldWells, context), - }), - }; + return take(input, { + BarChartAggregatedFieldWells: (_) => se_BarChartAggregatedFieldWells(_, context), + }); }; /** * serializeAws_restJson1BarChartSortConfiguration */ const se_BarChartSortConfiguration = (input: BarChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimit != null && { - CategoryItemsLimit: se_ItemsLimitConfiguration(input.CategoryItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - ...(input.ColorItemsLimit != null && { - ColorItemsLimit: se_ItemsLimitConfiguration(input.ColorItemsLimit, context), - }), - ...(input.ColorSort != null && { ColorSort: se_FieldSortOptionsList(input.ColorSort, context) }), - ...(input.SmallMultiplesLimitConfiguration != null && { - SmallMultiplesLimitConfiguration: se_ItemsLimitConfiguration(input.SmallMultiplesLimitConfiguration, context), - }), - ...(input.SmallMultiplesSort != null && { - SmallMultiplesSort: se_FieldSortOptionsList(input.SmallMultiplesSort, context), - }), - }; + return take(input, { + CategoryItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + ColorItemsLimit: _json, + ColorSort: (_) => se_FieldSortOptionsList(_, context), + SmallMultiplesLimitConfiguration: _json, + SmallMultiplesSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** * serializeAws_restJson1BarChartVisual */ const se_BarChartVisual = (input: BarChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_BarChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_BarChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; -/** - * serializeAws_restJson1BinCountOptions - */ -const se_BinCountOptions = (input: BinCountOptions, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_BinCountOptions omitted. /** * serializeAws_restJson1BinWidthOptions */ const se_BinWidthOptions = (input: BinWidthOptions, context: __SerdeContext): any => { - return { - ...(input.BinCountLimit != null && { BinCountLimit: input.BinCountLimit }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + BinCountLimit: [], + Value: __serializeFloat, + }); }; -/** - * serializeAws_restJson1BodySectionConfiguration - */ -const se_BodySectionConfiguration = (input: BodySectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: se_BodySectionContent(input.Content, context) }), - ...(input.PageBreakConfiguration != null && { - PageBreakConfiguration: se_SectionPageBreakConfiguration(input.PageBreakConfiguration, context), - }), - ...(input.SectionId != null && { SectionId: input.SectionId }), - ...(input.Style != null && { Style: se_SectionStyle(input.Style, context) }), - }; -}; +// se_BodySectionConfiguration omitted. -/** - * serializeAws_restJson1BodySectionConfigurationList - */ -const se_BodySectionConfigurationList = (input: BodySectionConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BodySectionConfiguration(entry, context); - }); -}; +// se_BodySectionConfigurationList omitted. -/** - * serializeAws_restJson1BodySectionContent - */ -const se_BodySectionContent = (input: BodySectionContent, context: __SerdeContext): any => { - return { - ...(input.Layout != null && { Layout: se_SectionLayoutConfiguration(input.Layout, context) }), - }; -}; +// se_BodySectionContent omitted. -/** - * serializeAws_restJson1BorderStyle - */ -const se_BorderStyle = (input: BorderStyle, context: __SerdeContext): any => { - return { - ...(input.Show != null && { Show: input.Show }), - }; -}; +// se_BorderStyle omitted. /** * serializeAws_restJson1BoxPlotAggregatedFieldWells */ const se_BoxPlotAggregatedFieldWells = (input: BoxPlotAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.GroupBy != null && { GroupBy: se_BoxPlotDimensionFieldList(input.GroupBy, context) }), - ...(input.Values != null && { Values: se_BoxPlotMeasureFieldList(input.Values, context) }), - }; + return take(input, { + GroupBy: _json, + Values: (_) => se_BoxPlotMeasureFieldList(_, context), + }); }; /** * serializeAws_restJson1BoxPlotChartConfiguration */ const se_BoxPlotChartConfiguration = (input: BoxPlotChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.BoxPlotOptions != null && { BoxPlotOptions: se_BoxPlotOptions(input.BoxPlotOptions, context) }), - ...(input.CategoryAxis != null && { CategoryAxis: se_AxisDisplayOptions(input.CategoryAxis, context) }), - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.FieldWells != null && { FieldWells: se_BoxPlotFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.PrimaryYAxisDisplayOptions != null && { - PrimaryYAxisDisplayOptions: se_AxisDisplayOptions(input.PrimaryYAxisDisplayOptions, context), - }), - ...(input.PrimaryYAxisLabelOptions != null && { - PrimaryYAxisLabelOptions: se_ChartAxisLabelOptions(input.PrimaryYAxisLabelOptions, context), - }), - ...(input.ReferenceLines != null && { ReferenceLines: se_ReferenceLineList(input.ReferenceLines, context) }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_BoxPlotSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; + return take(input, { + BoxPlotOptions: _json, + CategoryAxis: (_) => se_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + FieldWells: (_) => se_BoxPlotFieldWells(_, context), + Legend: _json, + PrimaryYAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + ReferenceLines: (_) => se_ReferenceLineList(_, context), + SortConfiguration: (_) => se_BoxPlotSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + VisualPalette: _json, + }); }; -/** - * serializeAws_restJson1BoxPlotDimensionFieldList - */ -const se_BoxPlotDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; +// se_BoxPlotDimensionFieldList omitted. /** * serializeAws_restJson1BoxPlotFieldWells */ const se_BoxPlotFieldWells = (input: BoxPlotFieldWells, context: __SerdeContext): any => { - return { - ...(input.BoxPlotAggregatedFieldWells != null && { - BoxPlotAggregatedFieldWells: se_BoxPlotAggregatedFieldWells(input.BoxPlotAggregatedFieldWells, context), - }), - }; + return take(input, { + BoxPlotAggregatedFieldWells: (_) => se_BoxPlotAggregatedFieldWells(_, context), + }); }; /** @@ -17080,2291 +16156,2542 @@ const se_BoxPlotMeasureFieldList = (input: MeasureField[], context: __SerdeConte }); }; -/** - * serializeAws_restJson1BoxPlotOptions - */ -const se_BoxPlotOptions = (input: BoxPlotOptions, context: __SerdeContext): any => { - return { - ...(input.AllDataPointsVisibility != null && { AllDataPointsVisibility: input.AllDataPointsVisibility }), - ...(input.OutlierVisibility != null && { OutlierVisibility: input.OutlierVisibility }), - ...(input.StyleOptions != null && { StyleOptions: se_BoxPlotStyleOptions(input.StyleOptions, context) }), - }; -}; +// se_BoxPlotOptions omitted. /** * serializeAws_restJson1BoxPlotSortConfiguration */ const se_BoxPlotSortConfiguration = (input: BoxPlotSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - ...(input.PaginationConfiguration != null && { - PaginationConfiguration: se_PaginationConfiguration(input.PaginationConfiguration, context), - }), - }; + return take(input, { + CategorySort: (_) => se_FieldSortOptionsList(_, context), + PaginationConfiguration: _json, + }); }; -/** - * serializeAws_restJson1BoxPlotStyleOptions - */ -const se_BoxPlotStyleOptions = (input: BoxPlotStyleOptions, context: __SerdeContext): any => { - return { - ...(input.FillStyle != null && { FillStyle: input.FillStyle }), - }; -}; +// se_BoxPlotStyleOptions omitted. /** * serializeAws_restJson1BoxPlotVisual */ const se_BoxPlotVisual = (input: BoxPlotVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_BoxPlotChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_BoxPlotChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_CalculatedColumn omitted. + +// se_CalculatedColumnList omitted. + +// se_CalculatedField omitted. + +// se_CalculatedFields omitted. + +// se_CalculatedMeasureField omitted. + +// se_CascadingControlConfiguration omitted. + +// se_CascadingControlSource omitted. + +// se_CascadingControlSourceList omitted. + +// se_CastColumnTypeOperation omitted. + +// se_CategoricalDimensionField omitted. + +// se_CategoricalMeasureField omitted. + +// se_CategoryDrillDownFilter omitted. + +// se_CategoryFilter omitted. + +// se_CategoryFilterConfiguration omitted. + +// se_CategoryValueList omitted. + +// se_ChartAxisLabelOptions omitted. + +// se_ClusterMarker omitted. + +// se_ClusterMarkerConfiguration omitted. + +// se_ColorList omitted. + /** - * serializeAws_restJson1CalculatedColumn + * serializeAws_restJson1ColorScale */ -const se_CalculatedColumn = (input: CalculatedColumn, context: __SerdeContext): any => { - return { - ...(input.ColumnId != null && { ColumnId: input.ColumnId }), - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.Expression != null && { Expression: input.Expression }), - }; +const se_ColorScale = (input: ColorScale, context: __SerdeContext): any => { + return take(input, { + ColorFillType: [], + Colors: (_) => se_ColorScaleColorList(_, context), + NullValueColor: (_) => se_DataColor(_, context), + }); }; /** - * serializeAws_restJson1CalculatedColumnList + * serializeAws_restJson1ColorScaleColorList */ -const se_CalculatedColumnList = (input: CalculatedColumn[], context: __SerdeContext): any => { +const se_ColorScaleColorList = (input: DataColor[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_CalculatedColumn(entry, context); + return se_DataColor(entry, context); }); }; +// se_ColumnConfiguration omitted. + +// se_ColumnConfigurationList omitted. + +// se_ColumnDescription omitted. + +// se_ColumnGroup omitted. + +// se_ColumnGroupColumnSchema omitted. + +// se_ColumnGroupColumnSchemaList omitted. + +// se_ColumnGroupList omitted. + +// se_ColumnGroupSchema omitted. + +// se_ColumnGroupSchemaList omitted. + /** - * serializeAws_restJson1CalculatedField + * serializeAws_restJson1ColumnHierarchy */ -const se_CalculatedField = (input: CalculatedField, context: __SerdeContext): any => { - return { - ...(input.DataSetIdentifier != null && { DataSetIdentifier: input.DataSetIdentifier }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Name != null && { Name: input.Name }), - }; +const se_ColumnHierarchy = (input: ColumnHierarchy, context: __SerdeContext): any => { + return take(input, { + DateTimeHierarchy: (_) => se_DateTimeHierarchy(_, context), + ExplicitHierarchy: (_) => se_ExplicitHierarchy(_, context), + PredefinedHierarchy: (_) => se_PredefinedHierarchy(_, context), + }); }; /** - * serializeAws_restJson1CalculatedFields + * serializeAws_restJson1ColumnHierarchyList */ -const se_CalculatedFields = (input: CalculatedField[], context: __SerdeContext): any => { +const se_ColumnHierarchyList = (input: ColumnHierarchy[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_CalculatedField(entry, context); + return se_ColumnHierarchy(entry, context); }); }; +// se_ColumnIdentifier omitted. + +// se_ColumnLevelPermissionRule omitted. + +// se_ColumnLevelPermissionRuleList omitted. + +// se_ColumnList omitted. + +// se_ColumnNameList omitted. + +// se_ColumnSchema omitted. + +// se_ColumnSchemaList omitted. + /** - * serializeAws_restJson1CalculatedMeasureField + * serializeAws_restJson1ColumnSort */ -const se_CalculatedMeasureField = (input: CalculatedMeasureField, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - }; +const se_ColumnSort = (input: ColumnSort, context: __SerdeContext): any => { + return take(input, { + AggregationFunction: (_) => se_AggregationFunction(_, context), + Direction: [], + SortBy: _json, + }); }; +// se_ColumnTag omitted. + +// se_ColumnTagList omitted. + +// se_ColumnTagNames omitted. + /** - * serializeAws_restJson1CascadingControlConfiguration + * serializeAws_restJson1ColumnTooltipItem */ -const se_CascadingControlConfiguration = (input: CascadingControlConfiguration, context: __SerdeContext): any => { - return { - ...(input.SourceControls != null && { - SourceControls: se_CascadingControlSourceList(input.SourceControls, context), - }), - }; +const se_ColumnTooltipItem = (input: ColumnTooltipItem, context: __SerdeContext): any => { + return take(input, { + Aggregation: (_) => se_AggregationFunction(_, context), + Column: _json, + Label: [], + Visibility: [], + }); }; /** - * serializeAws_restJson1CascadingControlSource + * serializeAws_restJson1ComboChartAggregatedFieldWells */ -const se_CascadingControlSource = (input: CascadingControlSource, context: __SerdeContext): any => { - return { - ...(input.ColumnToMatch != null && { ColumnToMatch: se_ColumnIdentifier(input.ColumnToMatch, context) }), - ...(input.SourceSheetControlId != null && { SourceSheetControlId: input.SourceSheetControlId }), - }; +const se_ComboChartAggregatedFieldWells = (input: ComboChartAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + BarValues: (_) => se_MeasureFieldList(_, context), + Category: _json, + Colors: _json, + LineValues: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1CascadingControlSourceList + * serializeAws_restJson1ComboChartConfiguration */ -const se_CascadingControlSourceList = (input: CascadingControlSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CascadingControlSource(entry, context); - }); +const se_ComboChartConfiguration = (input: ComboChartConfiguration, context: __SerdeContext): any => { + return take(input, { + BarDataLabels: _json, + BarsArrangement: [], + CategoryAxis: (_) => se_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + ColorLabelOptions: _json, + FieldWells: (_) => se_ComboChartFieldWells(_, context), + Legend: _json, + LineDataLabels: _json, + PrimaryYAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + ReferenceLines: (_) => se_ReferenceLineList(_, context), + SecondaryYAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + SecondaryYAxisLabelOptions: _json, + SortConfiguration: (_) => se_ComboChartSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + VisualPalette: _json, + }); }; /** - * serializeAws_restJson1CastColumnTypeOperation + * serializeAws_restJson1ComboChartFieldWells */ -const se_CastColumnTypeOperation = (input: CastColumnTypeOperation, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.Format != null && { Format: input.Format }), - ...(input.NewColumnType != null && { NewColumnType: input.NewColumnType }), - }; +const se_ComboChartFieldWells = (input: ComboChartFieldWells, context: __SerdeContext): any => { + return take(input, { + ComboChartAggregatedFieldWells: (_) => se_ComboChartAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1CategoricalDimensionField + * serializeAws_restJson1ComboChartSortConfiguration */ -const se_CategoricalDimensionField = (input: CategoricalDimensionField, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_StringFormatConfiguration(input.FormatConfiguration, context), - }), - ...(input.HierarchyId != null && { HierarchyId: input.HierarchyId }), - }; +const se_ComboChartSortConfiguration = (input: ComboChartSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + ColorItemsLimit: _json, + ColorSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1CategoricalMeasureField + * serializeAws_restJson1ComboChartVisual */ -const se_CategoricalMeasureField = (input: CategoricalMeasureField, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { AggregationFunction: input.AggregationFunction }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_StringFormatConfiguration(input.FormatConfiguration, context), - }), - }; +const se_ComboChartVisual = (input: ComboChartVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_ComboChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; -/** - * serializeAws_restJson1CategoryDrillDownFilter - */ -const se_CategoryDrillDownFilter = (input: CategoryDrillDownFilter, context: __SerdeContext): any => { - return { - ...(input.CategoryValues != null && { CategoryValues: se_CategoryValueList(input.CategoryValues, context) }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - }; -}; +// se_ComparisonConfiguration omitted. -/** - * serializeAws_restJson1CategoryFilter - */ -const se_CategoryFilter = (input: CategoryFilter, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.Configuration != null && { Configuration: se_CategoryFilterConfiguration(input.Configuration, context) }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - }; -}; +// se_ComparisonFormatConfiguration omitted. /** - * serializeAws_restJson1CategoryFilterConfiguration + * serializeAws_restJson1Computation */ -const se_CategoryFilterConfiguration = (input: CategoryFilterConfiguration, context: __SerdeContext): any => { - return { - ...(input.CustomFilterConfiguration != null && { - CustomFilterConfiguration: se_CustomFilterConfiguration(input.CustomFilterConfiguration, context), - }), - ...(input.CustomFilterListConfiguration != null && { - CustomFilterListConfiguration: se_CustomFilterListConfiguration(input.CustomFilterListConfiguration, context), - }), - ...(input.FilterListConfiguration != null && { - FilterListConfiguration: se_FilterListConfiguration(input.FilterListConfiguration, context), - }), - }; +const se_Computation = (input: Computation, context: __SerdeContext): any => { + return take(input, { + Forecast: (_) => se_ForecastComputation(_, context), + GrowthRate: (_) => se_GrowthRateComputation(_, context), + MaximumMinimum: (_) => se_MaximumMinimumComputation(_, context), + MetricComparison: (_) => se_MetricComparisonComputation(_, context), + PeriodOverPeriod: (_) => se_PeriodOverPeriodComputation(_, context), + PeriodToDate: (_) => se_PeriodToDateComputation(_, context), + TopBottomMovers: (_) => se_TopBottomMoversComputation(_, context), + TopBottomRanked: (_) => se_TopBottomRankedComputation(_, context), + TotalAggregation: (_) => se_TotalAggregationComputation(_, context), + UniqueValues: _json, + }); }; /** - * serializeAws_restJson1CategoryValueList + * serializeAws_restJson1ComputationList */ -const se_CategoryValueList = (input: string[], context: __SerdeContext): any => { +const se_ComputationList = (input: Computation[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_Computation(entry, context); }); }; /** - * serializeAws_restJson1ChartAxisLabelOptions + * serializeAws_restJson1ConditionalFormattingColor */ -const se_ChartAxisLabelOptions = (input: ChartAxisLabelOptions, context: __SerdeContext): any => { - return { - ...(input.AxisLabelOptions != null && { - AxisLabelOptions: se_AxisLabelOptionsList(input.AxisLabelOptions, context), - }), - ...(input.SortIconVisibility != null && { SortIconVisibility: input.SortIconVisibility }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_ConditionalFormattingColor = (input: ConditionalFormattingColor, context: __SerdeContext): any => { + return take(input, { + Gradient: (_) => se_ConditionalFormattingGradientColor(_, context), + Solid: _json, + }); }; -/** - * serializeAws_restJson1ClusterMarker - */ -const se_ClusterMarker = (input: ClusterMarker, context: __SerdeContext): any => { - return { - ...(input.SimpleClusterMarker != null && { - SimpleClusterMarker: se_SimpleClusterMarker(input.SimpleClusterMarker, context), - }), - }; -}; +// se_ConditionalFormattingCustomIconCondition omitted. -/** - * serializeAws_restJson1ClusterMarkerConfiguration - */ -const se_ClusterMarkerConfiguration = (input: ClusterMarkerConfiguration, context: __SerdeContext): any => { - return { - ...(input.ClusterMarker != null && { ClusterMarker: se_ClusterMarker(input.ClusterMarker, context) }), - }; -}; +// se_ConditionalFormattingCustomIconOptions omitted. /** - * serializeAws_restJson1ColorList + * serializeAws_restJson1ConditionalFormattingGradientColor */ -const se_ColorList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_ConditionalFormattingGradientColor = ( + input: ConditionalFormattingGradientColor, + context: __SerdeContext +): any => { + return take(input, { + Color: (_) => se_GradientColor(_, context), + Expression: [], + }); }; -/** - * serializeAws_restJson1ColorScale - */ -const se_ColorScale = (input: ColorScale, context: __SerdeContext): any => { - return { - ...(input.ColorFillType != null && { ColorFillType: input.ColorFillType }), - ...(input.Colors != null && { Colors: se_ColorScaleColorList(input.Colors, context) }), - ...(input.NullValueColor != null && { NullValueColor: se_DataColor(input.NullValueColor, context) }), - }; -}; +// se_ConditionalFormattingIcon omitted. + +// se_ConditionalFormattingIconDisplayConfiguration omitted. + +// se_ConditionalFormattingIconSet omitted. + +// se_ConditionalFormattingSolidColor omitted. + +// se_ContributionAnalysisDefault omitted. + +// se_ContributionAnalysisDefaultList omitted. + +// se_ContributorDimensionList omitted. + +// se_CreateColumnsOperation omitted. + +// se_CredentialPair omitted. + +// se_CurrencyDisplayFormatConfiguration omitted. + +// se_CustomActionFilterOperation omitted. + +// se_CustomActionNavigationOperation omitted. /** - * serializeAws_restJson1ColorScaleColorList + * serializeAws_restJson1CustomActionSetParametersOperation */ -const se_ColorScaleColorList = (input: DataColor[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataColor(entry, context); - }); +const se_CustomActionSetParametersOperation = ( + input: CustomActionSetParametersOperation, + context: __SerdeContext +): any => { + return take(input, { + ParameterValueConfigurations: (_) => se_SetParameterValueConfigurationList(_, context), + }); }; +// se_CustomActionURLOperation omitted. + +// se_CustomContentConfiguration omitted. + /** - * serializeAws_restJson1ColumnConfiguration + * serializeAws_restJson1CustomContentVisual */ -const se_ColumnConfiguration = (input: ColumnConfiguration, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_FormatConfiguration(input.FormatConfiguration, context), - }), - ...(input.Role != null && { Role: input.Role }), - }; +const se_CustomContentVisual = (input: CustomContentVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: _json, + DataSetIdentifier: [], + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_CustomFilterConfiguration omitted. + +// se_CustomFilterListConfiguration omitted. + +// se_CustomNarrativeOptions omitted. + /** - * serializeAws_restJson1ColumnConfigurationList + * serializeAws_restJson1CustomParameterValues */ -const se_ColumnConfigurationList = (input: ColumnConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnConfiguration(entry, context); - }); +const se_CustomParameterValues = (input: CustomParameterValues, context: __SerdeContext): any => { + return take(input, { + DateTimeValues: (_) => se_DateTimeDefaultValueList(_, context), + DecimalValues: (_) => se_DecimalDefaultValueList(_, context), + IntegerValues: _json, + StringValues: _json, + }); }; +// se_CustomSql omitted. + /** - * serializeAws_restJson1ColumnDescription + * serializeAws_restJson1CustomValuesConfiguration */ -const se_ColumnDescription = (input: ColumnDescription, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - }; +const se_CustomValuesConfiguration = (input: CustomValuesConfiguration, context: __SerdeContext): any => { + return take(input, { + CustomValues: (_) => se_CustomParameterValues(_, context), + IncludeNullValue: [], + }); }; +// se_DashboardPublishOptions omitted. + +// se_DashboardSearchFilter omitted. + +// se_DashboardSearchFilterList omitted. + +// se_DashboardSourceEntity omitted. + +// se_DashboardSourceTemplate omitted. + /** - * serializeAws_restJson1ColumnGroup + * serializeAws_restJson1DashboardVersionDefinition */ -const se_ColumnGroup = (input: ColumnGroup, context: __SerdeContext): any => { - return { - ...(input.GeoSpatialColumnGroup != null && { - GeoSpatialColumnGroup: se_GeoSpatialColumnGroup(input.GeoSpatialColumnGroup, context), - }), - }; +const se_DashboardVersionDefinition = (input: DashboardVersionDefinition, context: __SerdeContext): any => { + return take(input, { + AnalysisDefaults: _json, + CalculatedFields: _json, + ColumnConfigurations: _json, + DataSetIdentifierDeclarations: _json, + FilterGroups: (_) => se_FilterGroupList(_, context), + ParameterDeclarations: (_) => se_ParameterDeclarationList(_, context), + Sheets: (_) => se_SheetDefinitionList(_, context), + }); }; +// se_DashboardVisualId omitted. + +// se_DashboardVisualPublishOptions omitted. + +// se_DataBarsOptions omitted. + +// se_DatabricksParameters omitted. + /** - * serializeAws_restJson1ColumnGroupColumnSchema + * serializeAws_restJson1DataColor */ -const se_ColumnGroupColumnSchema = (input: ColumnGroupColumnSchema, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; +const se_DataColor = (input: DataColor, context: __SerdeContext): any => { + return take(input, { + Color: [], + DataValue: __serializeFloat, + }); }; +// se_DataColorPalette omitted. + +// se_DataFieldSeriesItem omitted. + +// se_DataLabelOptions omitted. + +// se_DataLabelType omitted. + +// se_DataLabelTypes omitted. + +// se_DataPathColor omitted. + +// se_DataPathColorList omitted. + +// se_DataPathLabelType omitted. + +// se_DataPathSort omitted. + +// se_DataPathValue omitted. + +// se_DataPathValueList omitted. + +// se_DataPointDrillUpDownOption omitted. + +// se_DataPointMenuLabelOption omitted. + +// se_DataPointTooltipOption omitted. + +// se_DataSetConfiguration omitted. + +// se_DataSetConfigurationList omitted. + +// se_DataSetIdentifierDeclaration omitted. + +// se_DataSetIdentifierDeclarationList omitted. + +// se_DataSetReference omitted. + +// se_DataSetReferenceList omitted. + +// se_DataSetRefreshProperties omitted. + +// se_DataSetSchema omitted. + +// se_DataSetSearchFilter omitted. + +// se_DataSetSearchFilterList omitted. + +// se_DataSetUsageConfiguration omitted. + +// se_DataSourceCredentials omitted. + +// se_DataSourceParameters omitted. + +// se_DataSourceParametersList omitted. + +// se_DataSourceSearchFilter omitted. + +// se_DataSourceSearchFilterList omitted. + +// se_DateAxisOptions omitted. + +// se_DateDimensionField omitted. + +// se_DateMeasureField omitted. + /** - * serializeAws_restJson1ColumnGroupColumnSchemaList + * serializeAws_restJson1DateTimeDefaultValueList */ -const se_ColumnGroupColumnSchemaList = (input: ColumnGroupColumnSchema[], context: __SerdeContext): any => { +const se_DateTimeDefaultValueList = (input: Date[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ColumnGroupColumnSchema(entry, context); + return Math.round(entry.getTime() / 1000); }); }; /** - * serializeAws_restJson1ColumnGroupList + * serializeAws_restJson1DateTimeDefaultValues */ -const se_ColumnGroupList = (input: ColumnGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnGroup(entry, context); - }); +const se_DateTimeDefaultValues = (input: DateTimeDefaultValues, context: __SerdeContext): any => { + return take(input, { + DynamicValue: _json, + RollingDate: _json, + StaticValues: (_) => se_DateTimeDefaultValueList(_, context), + }); }; +// se_DateTimeFormatConfiguration omitted. + /** - * serializeAws_restJson1ColumnGroupSchema + * serializeAws_restJson1DateTimeHierarchy */ -const se_ColumnGroupSchema = (input: ColumnGroupSchema, context: __SerdeContext): any => { - return { - ...(input.ColumnGroupColumnSchemaList != null && { - ColumnGroupColumnSchemaList: se_ColumnGroupColumnSchemaList(input.ColumnGroupColumnSchemaList, context), - }), - ...(input.Name != null && { Name: input.Name }), - }; +const se_DateTimeHierarchy = (input: DateTimeHierarchy, context: __SerdeContext): any => { + return take(input, { + DrillDownFilters: (_) => se_DrillDownFilterList(_, context), + HierarchyId: [], + }); }; /** - * serializeAws_restJson1ColumnGroupSchemaList + * serializeAws_restJson1DateTimeParameter */ -const se_ColumnGroupSchemaList = (input: ColumnGroupSchema[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnGroupSchema(entry, context); - }); +const se_DateTimeParameter = (input: DateTimeParameter, context: __SerdeContext): any => { + return take(input, { + Name: [], + Values: (_) => se_SensitiveTimestampList(_, context), + }); }; /** - * serializeAws_restJson1ColumnHierarchy + * serializeAws_restJson1DateTimeParameterDeclaration */ -const se_ColumnHierarchy = (input: ColumnHierarchy, context: __SerdeContext): any => { - return { - ...(input.DateTimeHierarchy != null && { - DateTimeHierarchy: se_DateTimeHierarchy(input.DateTimeHierarchy, context), - }), - ...(input.ExplicitHierarchy != null && { - ExplicitHierarchy: se_ExplicitHierarchy(input.ExplicitHierarchy, context), - }), - ...(input.PredefinedHierarchy != null && { - PredefinedHierarchy: se_PredefinedHierarchy(input.PredefinedHierarchy, context), - }), - }; +const se_DateTimeParameterDeclaration = (input: DateTimeParameterDeclaration, context: __SerdeContext): any => { + return take(input, { + DefaultValues: (_) => se_DateTimeDefaultValues(_, context), + Name: [], + TimeGranularity: [], + ValueWhenUnset: (_) => se_DateTimeValueWhenUnsetConfiguration(_, context), + }); }; /** - * serializeAws_restJson1ColumnHierarchyList + * serializeAws_restJson1DateTimeParameterList */ -const se_ColumnHierarchyList = (input: ColumnHierarchy[], context: __SerdeContext): any => { +const se_DateTimeParameterList = (input: DateTimeParameter[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ColumnHierarchy(entry, context); + return se_DateTimeParameter(entry, context); }); }; -/** - * serializeAws_restJson1ColumnIdentifier - */ -const se_ColumnIdentifier = (input: ColumnIdentifier, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.DataSetIdentifier != null && { DataSetIdentifier: input.DataSetIdentifier }), - }; -}; +// se_DateTimePickerControlDisplayOptions omitted. /** - * serializeAws_restJson1ColumnLevelPermissionRule + * serializeAws_restJson1DateTimeValueWhenUnsetConfiguration */ -const se_ColumnLevelPermissionRule = (input: ColumnLevelPermissionRule, context: __SerdeContext): any => { - return { - ...(input.ColumnNames != null && { ColumnNames: se_ColumnNameList(input.ColumnNames, context) }), - ...(input.Principals != null && { Principals: se_PrincipalList(input.Principals, context) }), - }; +const se_DateTimeValueWhenUnsetConfiguration = ( + input: DateTimeValueWhenUnsetConfiguration, + context: __SerdeContext +): any => { + return take(input, { + CustomValue: (_) => Math.round(_.getTime() / 1000), + ValueWhenUnsetOption: [], + }); }; /** - * serializeAws_restJson1ColumnLevelPermissionRuleList + * serializeAws_restJson1DecimalDefaultValueList */ -const se_ColumnLevelPermissionRuleList = (input: ColumnLevelPermissionRule[], context: __SerdeContext): any => { +const se_DecimalDefaultValueList = (input: number[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ColumnLevelPermissionRule(entry, context); + return __serializeFloat(entry); }); }; /** - * serializeAws_restJson1ColumnList + * serializeAws_restJson1DecimalDefaultValues */ -const se_ColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_DecimalDefaultValues = (input: DecimalDefaultValues, context: __SerdeContext): any => { + return take(input, { + DynamicValue: _json, + StaticValues: (_) => se_DecimalDefaultValueList(_, context), + }); }; /** - * serializeAws_restJson1ColumnNameList + * serializeAws_restJson1DecimalParameter */ -const se_ColumnNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_DecimalParameter = (input: DecimalParameter, context: __SerdeContext): any => { + return take(input, { + Name: [], + Values: (_) => se_SensitiveDoubleList(_, context), + }); }; /** - * serializeAws_restJson1ColumnSchema + * serializeAws_restJson1DecimalParameterDeclaration */ -const se_ColumnSchema = (input: ColumnSchema, context: __SerdeContext): any => { - return { - ...(input.DataType != null && { DataType: input.DataType }), - ...(input.GeographicRole != null && { GeographicRole: input.GeographicRole }), - ...(input.Name != null && { Name: input.Name }), - }; +const se_DecimalParameterDeclaration = (input: DecimalParameterDeclaration, context: __SerdeContext): any => { + return take(input, { + DefaultValues: (_) => se_DecimalDefaultValues(_, context), + Name: [], + ParameterValueType: [], + ValueWhenUnset: (_) => se_DecimalValueWhenUnsetConfiguration(_, context), + }); }; /** - * serializeAws_restJson1ColumnSchemaList + * serializeAws_restJson1DecimalParameterList */ -const se_ColumnSchemaList = (input: ColumnSchema[], context: __SerdeContext): any => { +const se_DecimalParameterList = (input: DecimalParameter[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ColumnSchema(entry, context); + return se_DecimalParameter(entry, context); }); }; +// se_DecimalPlacesConfiguration omitted. + /** - * serializeAws_restJson1ColumnSort + * serializeAws_restJson1DecimalValueWhenUnsetConfiguration */ -const se_ColumnSort = (input: ColumnSort, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { - AggregationFunction: se_AggregationFunction(input.AggregationFunction, context), - }), - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.SortBy != null && { SortBy: se_ColumnIdentifier(input.SortBy, context) }), - }; +const se_DecimalValueWhenUnsetConfiguration = ( + input: DecimalValueWhenUnsetConfiguration, + context: __SerdeContext +): any => { + return take(input, { + CustomValue: __serializeFloat, + ValueWhenUnsetOption: [], + }); }; +// se_DefaultFreeFormLayoutConfiguration omitted. + +// se_DefaultGridLayoutConfiguration omitted. + +// se_DefaultInteractiveLayoutConfiguration omitted. + +// se_DefaultNewSheetConfiguration omitted. + +// se_DefaultPaginatedLayoutConfiguration omitted. + +// se_DefaultSectionBasedLayoutConfiguration omitted. + /** - * serializeAws_restJson1ColumnTag + * serializeAws_restJson1DestinationParameterValueConfiguration */ -const se_ColumnTag = (input: ColumnTag, context: __SerdeContext): any => { - return { - ...(input.ColumnDescription != null && { - ColumnDescription: se_ColumnDescription(input.ColumnDescription, context), - }), - ...(input.ColumnGeographicRole != null && { ColumnGeographicRole: input.ColumnGeographicRole }), - }; +const se_DestinationParameterValueConfiguration = ( + input: DestinationParameterValueConfiguration, + context: __SerdeContext +): any => { + return take(input, { + CustomValuesConfiguration: (_) => se_CustomValuesConfiguration(_, context), + SelectAllValueOptions: [], + SourceField: [], + SourceParameterName: [], + }); }; +// se_DimensionField omitted. + +// se_DimensionFieldList omitted. + +// se_DonutCenterOptions omitted. + +// se_DonutOptions omitted. + /** - * serializeAws_restJson1ColumnTagList + * serializeAws_restJson1DrillDownFilter */ -const se_ColumnTagList = (input: ColumnTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnTag(entry, context); - }); +const se_DrillDownFilter = (input: DrillDownFilter, context: __SerdeContext): any => { + return take(input, { + CategoryFilter: _json, + NumericEqualityFilter: (_) => se_NumericEqualityDrillDownFilter(_, context), + TimeRangeFilter: (_) => se_TimeRangeDrillDownFilter(_, context), + }); }; /** - * serializeAws_restJson1ColumnTagNames + * serializeAws_restJson1DrillDownFilterList */ -const se_ColumnTagNames = (input: (ColumnTagName | string)[], context: __SerdeContext): any => { +const se_DrillDownFilterList = (input: DrillDownFilter[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_DrillDownFilter(entry, context); }); }; -/** - * serializeAws_restJson1ColumnTooltipItem - */ -const se_ColumnTooltipItem = (input: ColumnTooltipItem, context: __SerdeContext): any => { - return { - ...(input.Aggregation != null && { Aggregation: se_AggregationFunction(input.Aggregation, context) }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.Label != null && { Label: input.Label }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; +// se_DropDownControlDisplayOptions omitted. + +// se_DynamicDefaultValue omitted. /** - * serializeAws_restJson1ComboChartAggregatedFieldWells + * serializeAws_restJson1EmptyVisual */ -const se_ComboChartAggregatedFieldWells = (input: ComboChartAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.BarValues != null && { BarValues: se_MeasureFieldList(input.BarValues, context) }), - ...(input.Category != null && { Category: se_DimensionFieldList(input.Category, context) }), - ...(input.Colors != null && { Colors: se_DimensionFieldList(input.Colors, context) }), - ...(input.LineValues != null && { LineValues: se_MeasureFieldList(input.LineValues, context) }), - }; +const se_EmptyVisual = (input: EmptyVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + DataSetIdentifier: [], + VisualId: [], + }); }; +// se_ExasolParameters omitted. + +// se_ExcludePeriodConfiguration omitted. + /** - * serializeAws_restJson1ComboChartConfiguration + * serializeAws_restJson1ExplicitHierarchy */ -const se_ComboChartConfiguration = (input: ComboChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.BarDataLabels != null && { BarDataLabels: se_DataLabelOptions(input.BarDataLabels, context) }), - ...(input.BarsArrangement != null && { BarsArrangement: input.BarsArrangement }), - ...(input.CategoryAxis != null && { CategoryAxis: se_AxisDisplayOptions(input.CategoryAxis, context) }), - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.ColorLabelOptions != null && { - ColorLabelOptions: se_ChartAxisLabelOptions(input.ColorLabelOptions, context), - }), - ...(input.FieldWells != null && { FieldWells: se_ComboChartFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.LineDataLabels != null && { LineDataLabels: se_DataLabelOptions(input.LineDataLabels, context) }), - ...(input.PrimaryYAxisDisplayOptions != null && { - PrimaryYAxisDisplayOptions: se_AxisDisplayOptions(input.PrimaryYAxisDisplayOptions, context), - }), - ...(input.PrimaryYAxisLabelOptions != null && { - PrimaryYAxisLabelOptions: se_ChartAxisLabelOptions(input.PrimaryYAxisLabelOptions, context), - }), - ...(input.ReferenceLines != null && { ReferenceLines: se_ReferenceLineList(input.ReferenceLines, context) }), - ...(input.SecondaryYAxisDisplayOptions != null && { - SecondaryYAxisDisplayOptions: se_AxisDisplayOptions(input.SecondaryYAxisDisplayOptions, context), - }), - ...(input.SecondaryYAxisLabelOptions != null && { - SecondaryYAxisLabelOptions: se_ChartAxisLabelOptions(input.SecondaryYAxisLabelOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_ComboChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; +const se_ExplicitHierarchy = (input: ExplicitHierarchy, context: __SerdeContext): any => { + return take(input, { + Columns: _json, + DrillDownFilters: (_) => se_DrillDownFilterList(_, context), + HierarchyId: [], + }); }; +// se_ExplicitHierarchyColumnList omitted. + +// se_ExportHiddenFieldsOption omitted. + +// se_ExportToCSVOption omitted. + +// se_ExportWithHiddenFieldsOption omitted. + /** - * serializeAws_restJson1ComboChartFieldWells + * serializeAws_restJson1FieldBasedTooltip */ -const se_ComboChartFieldWells = (input: ComboChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.ComboChartAggregatedFieldWells != null && { - ComboChartAggregatedFieldWells: se_ComboChartAggregatedFieldWells(input.ComboChartAggregatedFieldWells, context), - }), - }; +const se_FieldBasedTooltip = (input: FieldBasedTooltip, context: __SerdeContext): any => { + return take(input, { + AggregationVisibility: [], + TooltipFields: (_) => se_TooltipItemList(_, context), + TooltipTitleType: [], + }); }; +// se_FieldFolder omitted. + +// se_FieldFolderMap omitted. + +// se_FieldLabelType omitted. + +// se_FieldOrderList omitted. + +// se_FieldSeriesItem omitted. + +// se_FieldSort omitted. + /** - * serializeAws_restJson1ComboChartSortConfiguration + * serializeAws_restJson1FieldSortOptions */ -const se_ComboChartSortConfiguration = (input: ComboChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimit != null && { - CategoryItemsLimit: se_ItemsLimitConfiguration(input.CategoryItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - ...(input.ColorItemsLimit != null && { - ColorItemsLimit: se_ItemsLimitConfiguration(input.ColorItemsLimit, context), - }), - ...(input.ColorSort != null && { ColorSort: se_FieldSortOptionsList(input.ColorSort, context) }), - }; +const se_FieldSortOptions = (input: FieldSortOptions, context: __SerdeContext): any => { + return take(input, { + ColumnSort: (_) => se_ColumnSort(_, context), + FieldSort: _json, + }); }; /** - * serializeAws_restJson1ComboChartVisual + * serializeAws_restJson1FieldSortOptionsList */ -const se_ComboChartVisual = (input: ComboChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_ComboChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; +const se_FieldSortOptionsList = (input: FieldSortOptions[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_FieldSortOptions(entry, context); + }); }; +// se_FieldTooltipItem omitted. + /** - * serializeAws_restJson1ComparisonConfiguration + * serializeAws_restJson1FilledMapAggregatedFieldWells */ -const se_ComparisonConfiguration = (input: ComparisonConfiguration, context: __SerdeContext): any => { - return { - ...(input.ComparisonFormat != null && { - ComparisonFormat: se_ComparisonFormatConfiguration(input.ComparisonFormat, context), - }), - ...(input.ComparisonMethod != null && { ComparisonMethod: input.ComparisonMethod }), - }; +const se_FilledMapAggregatedFieldWells = (input: FilledMapAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Geospatial: _json, + Values: (_) => se_FilledMapMeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1ComparisonFormatConfiguration + * serializeAws_restJson1FilledMapConditionalFormatting */ -const se_ComparisonFormatConfiguration = (input: ComparisonFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.NumberDisplayFormatConfiguration != null && { - NumberDisplayFormatConfiguration: se_NumberDisplayFormatConfiguration( - input.NumberDisplayFormatConfiguration, - context - ), - }), - ...(input.PercentageDisplayFormatConfiguration != null && { - PercentageDisplayFormatConfiguration: se_PercentageDisplayFormatConfiguration( - input.PercentageDisplayFormatConfiguration, - context - ), - }), - }; +const se_FilledMapConditionalFormatting = (input: FilledMapConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + ConditionalFormattingOptions: (_) => se_FilledMapConditionalFormattingOptionList(_, context), + }); }; /** - * serializeAws_restJson1Computation + * serializeAws_restJson1FilledMapConditionalFormattingOption */ -const se_Computation = (input: Computation, context: __SerdeContext): any => { - return { - ...(input.Forecast != null && { Forecast: se_ForecastComputation(input.Forecast, context) }), - ...(input.GrowthRate != null && { GrowthRate: se_GrowthRateComputation(input.GrowthRate, context) }), - ...(input.MaximumMinimum != null && { - MaximumMinimum: se_MaximumMinimumComputation(input.MaximumMinimum, context), - }), - ...(input.MetricComparison != null && { - MetricComparison: se_MetricComparisonComputation(input.MetricComparison, context), - }), - ...(input.PeriodOverPeriod != null && { - PeriodOverPeriod: se_PeriodOverPeriodComputation(input.PeriodOverPeriod, context), - }), - ...(input.PeriodToDate != null && { PeriodToDate: se_PeriodToDateComputation(input.PeriodToDate, context) }), - ...(input.TopBottomMovers != null && { - TopBottomMovers: se_TopBottomMoversComputation(input.TopBottomMovers, context), - }), - ...(input.TopBottomRanked != null && { - TopBottomRanked: se_TopBottomRankedComputation(input.TopBottomRanked, context), - }), - ...(input.TotalAggregation != null && { - TotalAggregation: se_TotalAggregationComputation(input.TotalAggregation, context), - }), - ...(input.UniqueValues != null && { UniqueValues: se_UniqueValuesComputation(input.UniqueValues, context) }), - }; +const se_FilledMapConditionalFormattingOption = ( + input: FilledMapConditionalFormattingOption, + context: __SerdeContext +): any => { + return take(input, { + Shape: (_) => se_FilledMapShapeConditionalFormatting(_, context), + }); }; /** - * serializeAws_restJson1ComputationList + * serializeAws_restJson1FilledMapConditionalFormattingOptionList */ -const se_ComputationList = (input: Computation[], context: __SerdeContext): any => { +const se_FilledMapConditionalFormattingOptionList = ( + input: FilledMapConditionalFormattingOption[], + context: __SerdeContext +): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Computation(entry, context); + return se_FilledMapConditionalFormattingOption(entry, context); }); }; /** - * serializeAws_restJson1ConditionalFormattingColor + * serializeAws_restJson1FilledMapConfiguration */ -const se_ConditionalFormattingColor = (input: ConditionalFormattingColor, context: __SerdeContext): any => { - return { - ...(input.Gradient != null && { Gradient: se_ConditionalFormattingGradientColor(input.Gradient, context) }), - ...(input.Solid != null && { Solid: se_ConditionalFormattingSolidColor(input.Solid, context) }), - }; +const se_FilledMapConfiguration = (input: FilledMapConfiguration, context: __SerdeContext): any => { + return take(input, { + FieldWells: (_) => se_FilledMapFieldWells(_, context), + Legend: _json, + MapStyleOptions: _json, + SortConfiguration: (_) => se_FilledMapSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + WindowOptions: (_) => se_GeospatialWindowOptions(_, context), + }); }; +// se_FilledMapDimensionFieldList omitted. + /** - * serializeAws_restJson1ConditionalFormattingCustomIconCondition + * serializeAws_restJson1FilledMapFieldWells */ -const se_ConditionalFormattingCustomIconCondition = ( - input: ConditionalFormattingCustomIconCondition, - context: __SerdeContext -): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.DisplayConfiguration != null && { - DisplayConfiguration: se_ConditionalFormattingIconDisplayConfiguration(input.DisplayConfiguration, context), - }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.IconOptions != null && { - IconOptions: se_ConditionalFormattingCustomIconOptions(input.IconOptions, context), - }), - }; +const se_FilledMapFieldWells = (input: FilledMapFieldWells, context: __SerdeContext): any => { + return take(input, { + FilledMapAggregatedFieldWells: (_) => se_FilledMapAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1ConditionalFormattingCustomIconOptions + * serializeAws_restJson1FilledMapMeasureFieldList */ -const se_ConditionalFormattingCustomIconOptions = ( - input: ConditionalFormattingCustomIconOptions, - context: __SerdeContext -): any => { - return { - ...(input.Icon != null && { Icon: input.Icon }), - ...(input.UnicodeIcon != null && { UnicodeIcon: input.UnicodeIcon }), - }; +const se_FilledMapMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MeasureField(entry, context); + }); }; /** - * serializeAws_restJson1ConditionalFormattingGradientColor + * serializeAws_restJson1FilledMapShapeConditionalFormatting */ -const se_ConditionalFormattingGradientColor = ( - input: ConditionalFormattingGradientColor, +const se_FilledMapShapeConditionalFormatting = ( + input: FilledMapShapeConditionalFormatting, context: __SerdeContext ): any => { - return { - ...(input.Color != null && { Color: se_GradientColor(input.Color, context) }), - ...(input.Expression != null && { Expression: input.Expression }), - }; + return take(input, { + FieldId: [], + Format: (_) => se_ShapeConditionalFormat(_, context), + }); }; /** - * serializeAws_restJson1ConditionalFormattingIcon + * serializeAws_restJson1FilledMapSortConfiguration */ -const se_ConditionalFormattingIcon = (input: ConditionalFormattingIcon, context: __SerdeContext): any => { - return { - ...(input.CustomCondition != null && { - CustomCondition: se_ConditionalFormattingCustomIconCondition(input.CustomCondition, context), - }), - ...(input.IconSet != null && { IconSet: se_ConditionalFormattingIconSet(input.IconSet, context) }), - }; +const se_FilledMapSortConfiguration = (input: FilledMapSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategorySort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1ConditionalFormattingIconDisplayConfiguration + * serializeAws_restJson1FilledMapVisual */ -const se_ConditionalFormattingIconDisplayConfiguration = ( - input: ConditionalFormattingIconDisplayConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.IconDisplayOption != null && { IconDisplayOption: input.IconDisplayOption }), - }; +const se_FilledMapVisual = (input: FilledMapVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_FilledMapConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + ConditionalFormatting: (_) => se_FilledMapConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * serializeAws_restJson1ConditionalFormattingIconSet + * serializeAws_restJson1Filter */ -const se_ConditionalFormattingIconSet = (input: ConditionalFormattingIconSet, context: __SerdeContext): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.IconSetType != null && { IconSetType: input.IconSetType }), - }; +const se_Filter = (input: Filter, context: __SerdeContext): any => { + return take(input, { + CategoryFilter: _json, + NumericEqualityFilter: (_) => se_NumericEqualityFilter(_, context), + NumericRangeFilter: (_) => se_NumericRangeFilter(_, context), + RelativeDatesFilter: _json, + TimeEqualityFilter: (_) => se_TimeEqualityFilter(_, context), + TimeRangeFilter: (_) => se_TimeRangeFilter(_, context), + TopBottomFilter: (_) => se_TopBottomFilter(_, context), + }); }; /** - * serializeAws_restJson1ConditionalFormattingSolidColor + * serializeAws_restJson1FilterControl */ -const se_ConditionalFormattingSolidColor = (input: ConditionalFormattingSolidColor, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.Expression != null && { Expression: input.Expression }), - }; +const se_FilterControl = (input: FilterControl, context: __SerdeContext): any => { + return take(input, { + DateTimePicker: _json, + Dropdown: _json, + List: _json, + RelativeDateTime: _json, + Slider: (_) => se_FilterSliderControl(_, context), + TextArea: _json, + TextField: _json, + }); }; /** - * serializeAws_restJson1ContributionAnalysisDefault + * serializeAws_restJson1FilterControlList */ -const se_ContributionAnalysisDefault = (input: ContributionAnalysisDefault, context: __SerdeContext): any => { - return { - ...(input.ContributorDimensions != null && { - ContributorDimensions: se_ContributorDimensionList(input.ContributorDimensions, context), - }), - ...(input.MeasureFieldId != null && { MeasureFieldId: input.MeasureFieldId }), - }; +const se_FilterControlList = (input: FilterControl[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_FilterControl(entry, context); + }); +}; + +// se_FilterDateTimePickerControl omitted. + +// se_FilterDropDownControl omitted. + +// se_FilteredVisualsList omitted. + +/** + * serializeAws_restJson1FilterGroup + */ +const se_FilterGroup = (input: FilterGroup, context: __SerdeContext): any => { + return take(input, { + CrossDataset: [], + FilterGroupId: [], + Filters: (_) => se_FilterList(_, context), + ScopeConfiguration: _json, + Status: [], + }); }; /** - * serializeAws_restJson1ContributionAnalysisDefaultList + * serializeAws_restJson1FilterGroupList */ -const se_ContributionAnalysisDefaultList = (input: ContributionAnalysisDefault[], context: __SerdeContext): any => { +const se_FilterGroupList = (input: FilterGroup[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ContributionAnalysisDefault(entry, context); + return se_FilterGroup(entry, context); }); }; /** - * serializeAws_restJson1ContributorDimensionList + * serializeAws_restJson1FilterList */ -const se_ContributorDimensionList = (input: ColumnIdentifier[], context: __SerdeContext): any => { +const se_FilterList = (input: Filter[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ColumnIdentifier(entry, context); + return se_Filter(entry, context); }); }; +// se_FilterListConfiguration omitted. + +// se_FilterListControl omitted. + +// se_FilterOperation omitted. + +// se_FilterOperationSelectedFieldsConfiguration omitted. + +// se_FilterOperationTargetVisualsConfiguration omitted. + +// se_FilterRelativeDateTimeControl omitted. + +// se_FilterScopeConfiguration omitted. + +// se_FilterSelectableValues omitted. + /** - * serializeAws_restJson1CreateColumnsOperation + * serializeAws_restJson1FilterSliderControl */ -const se_CreateColumnsOperation = (input: CreateColumnsOperation, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_CalculatedColumnList(input.Columns, context) }), - }; +const se_FilterSliderControl = (input: FilterSliderControl, context: __SerdeContext): any => { + return take(input, { + DisplayOptions: _json, + FilterControlId: [], + MaximumValue: __serializeFloat, + MinimumValue: __serializeFloat, + SourceFilterId: [], + StepSize: __serializeFloat, + Title: [], + Type: [], + }); }; +// se_FilterTextAreaControl omitted. + +// se_FilterTextFieldControl omitted. + +// se_FolderColumnList omitted. + +// se_FolderSearchFilter omitted. + +// se_FolderSearchFilterList omitted. + +// se_Font omitted. + +// se_FontConfiguration omitted. + +// se_FontList omitted. + +// se_FontSize omitted. + +// se_FontWeight omitted. + /** - * serializeAws_restJson1CredentialPair + * serializeAws_restJson1ForecastComputation */ -const se_CredentialPair = (input: CredentialPair, context: __SerdeContext): any => { - return { - ...(input.AlternateDataSourceParameters != null && { - AlternateDataSourceParameters: se_DataSourceParametersList(input.AlternateDataSourceParameters, context), - }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Username != null && { Username: input.Username }), - }; +const se_ForecastComputation = (input: ForecastComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + CustomSeasonalityValue: [], + LowerBoundary: __serializeFloat, + Name: [], + PeriodsBackward: [], + PeriodsForward: [], + PredictionInterval: [], + Seasonality: [], + Time: _json, + UpperBoundary: __serializeFloat, + Value: (_) => se_MeasureField(_, context), + }); }; /** - * serializeAws_restJson1CurrencyDisplayFormatConfiguration + * serializeAws_restJson1ForecastConfiguration */ -const se_CurrencyDisplayFormatConfiguration = ( - input: CurrencyDisplayFormatConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DecimalPlacesConfiguration != null && { - DecimalPlacesConfiguration: se_DecimalPlacesConfiguration(input.DecimalPlacesConfiguration, context), - }), - ...(input.NegativeValueConfiguration != null && { - NegativeValueConfiguration: se_NegativeValueConfiguration(input.NegativeValueConfiguration, context), - }), - ...(input.NullValueFormatConfiguration != null && { - NullValueFormatConfiguration: se_NullValueFormatConfiguration(input.NullValueFormatConfiguration, context), - }), - ...(input.NumberScale != null && { NumberScale: input.NumberScale }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SeparatorConfiguration != null && { - SeparatorConfiguration: se_NumericSeparatorConfiguration(input.SeparatorConfiguration, context), - }), - ...(input.Suffix != null && { Suffix: input.Suffix }), - ...(input.Symbol != null && { Symbol: input.Symbol }), - }; +const se_ForecastConfiguration = (input: ForecastConfiguration, context: __SerdeContext): any => { + return take(input, { + ForecastProperties: (_) => se_TimeBasedForecastProperties(_, context), + Scenario: (_) => se_ForecastScenario(_, context), + }); }; /** - * serializeAws_restJson1CustomActionFilterOperation + * serializeAws_restJson1ForecastConfigurationList */ -const se_CustomActionFilterOperation = (input: CustomActionFilterOperation, context: __SerdeContext): any => { - return { - ...(input.SelectedFieldsConfiguration != null && { - SelectedFieldsConfiguration: se_FilterOperationSelectedFieldsConfiguration( - input.SelectedFieldsConfiguration, - context - ), - }), - ...(input.TargetVisualsConfiguration != null && { - TargetVisualsConfiguration: se_FilterOperationTargetVisualsConfiguration( - input.TargetVisualsConfiguration, - context - ), - }), - }; +const se_ForecastConfigurationList = (input: ForecastConfiguration[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_ForecastConfiguration(entry, context); + }); }; /** - * serializeAws_restJson1CustomActionNavigationOperation + * serializeAws_restJson1ForecastScenario */ -const se_CustomActionNavigationOperation = (input: CustomActionNavigationOperation, context: __SerdeContext): any => { - return { - ...(input.LocalNavigationConfiguration != null && { - LocalNavigationConfiguration: se_LocalNavigationConfiguration(input.LocalNavigationConfiguration, context), - }), - }; +const se_ForecastScenario = (input: ForecastScenario, context: __SerdeContext): any => { + return take(input, { + WhatIfPointScenario: (_) => se_WhatIfPointScenario(_, context), + WhatIfRangeScenario: (_) => se_WhatIfRangeScenario(_, context), + }); }; +// se_FormatConfiguration omitted. + +// se_FreeFormLayoutCanvasSizeOptions omitted. + +// se_FreeFormLayoutConfiguration omitted. + +// se_FreeFormLayoutElement omitted. + +// se_FreeFormLayoutElementBackgroundStyle omitted. + +// se_FreeFormLayoutElementBorderStyle omitted. + +// se_FreeFormLayoutScreenCanvasSizeOptions omitted. + +// se_FreeFormSectionLayoutConfiguration omitted. + +// se_FreeFromLayoutElementList omitted. + /** - * serializeAws_restJson1CustomActionSetParametersOperation + * serializeAws_restJson1FunnelChartAggregatedFieldWells */ -const se_CustomActionSetParametersOperation = ( - input: CustomActionSetParametersOperation, - context: __SerdeContext -): any => { - return { - ...(input.ParameterValueConfigurations != null && { - ParameterValueConfigurations: se_SetParameterValueConfigurationList(input.ParameterValueConfigurations, context), - }), - }; +const se_FunnelChartAggregatedFieldWells = (input: FunnelChartAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Category: _json, + Values: (_) => se_FunnelChartMeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1CustomActionURLOperation + * serializeAws_restJson1FunnelChartConfiguration */ -const se_CustomActionURLOperation = (input: CustomActionURLOperation, context: __SerdeContext): any => { - return { - ...(input.URLTarget != null && { URLTarget: input.URLTarget }), - ...(input.URLTemplate != null && { URLTemplate: input.URLTemplate }), - }; +const se_FunnelChartConfiguration = (input: FunnelChartConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryLabelOptions: _json, + DataLabelOptions: _json, + FieldWells: (_) => se_FunnelChartFieldWells(_, context), + SortConfiguration: (_) => se_FunnelChartSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + ValueLabelOptions: _json, + VisualPalette: _json, + }); }; +// se_FunnelChartDataLabelOptions omitted. + +// se_FunnelChartDimensionFieldList omitted. + /** - * serializeAws_restJson1CustomContentConfiguration + * serializeAws_restJson1FunnelChartFieldWells */ -const se_CustomContentConfiguration = (input: CustomContentConfiguration, context: __SerdeContext): any => { - return { - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.ContentUrl != null && { ContentUrl: input.ContentUrl }), - ...(input.ImageScaling != null && { ImageScaling: input.ImageScaling }), - }; +const se_FunnelChartFieldWells = (input: FunnelChartFieldWells, context: __SerdeContext): any => { + return take(input, { + FunnelChartAggregatedFieldWells: (_) => se_FunnelChartAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1CustomContentVisual + * serializeAws_restJson1FunnelChartMeasureFieldList */ -const se_CustomContentVisual = (input: CustomContentVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_CustomContentConfiguration(input.ChartConfiguration, context), - }), - ...(input.DataSetIdentifier != null && { DataSetIdentifier: input.DataSetIdentifier }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; +const se_FunnelChartMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MeasureField(entry, context); + }); }; /** - * serializeAws_restJson1CustomFilterConfiguration + * serializeAws_restJson1FunnelChartSortConfiguration */ -const se_CustomFilterConfiguration = (input: CustomFilterConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryValue != null && { CategoryValue: input.CategoryValue }), - ...(input.MatchOperator != null && { MatchOperator: input.MatchOperator }), - ...(input.NullOption != null && { NullOption: input.NullOption }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.SelectAllOptions != null && { SelectAllOptions: input.SelectAllOptions }), - }; +const se_FunnelChartSortConfiguration = (input: FunnelChartSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1CustomFilterListConfiguration + * serializeAws_restJson1FunnelChartVisual */ -const se_CustomFilterListConfiguration = (input: CustomFilterListConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryValues != null && { CategoryValues: se_CategoryValueList(input.CategoryValues, context) }), - ...(input.MatchOperator != null && { MatchOperator: input.MatchOperator }), - ...(input.NullOption != null && { NullOption: input.NullOption }), - ...(input.SelectAllOptions != null && { SelectAllOptions: input.SelectAllOptions }), - }; +const se_FunnelChartVisual = (input: FunnelChartVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_FunnelChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * serializeAws_restJson1CustomNarrativeOptions + * serializeAws_restJson1GaugeChartArcConditionalFormatting */ -const se_CustomNarrativeOptions = (input: CustomNarrativeOptions, context: __SerdeContext): any => { - return { - ...(input.Narrative != null && { Narrative: input.Narrative }), - }; +const se_GaugeChartArcConditionalFormatting = ( + input: GaugeChartArcConditionalFormatting, + context: __SerdeContext +): any => { + return take(input, { + ForegroundColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; /** - * serializeAws_restJson1CustomParameterValues + * serializeAws_restJson1GaugeChartConditionalFormatting */ -const se_CustomParameterValues = (input: CustomParameterValues, context: __SerdeContext): any => { - return { - ...(input.DateTimeValues != null && { DateTimeValues: se_DateTimeDefaultValueList(input.DateTimeValues, context) }), - ...(input.DecimalValues != null && { DecimalValues: se_DecimalDefaultValueList(input.DecimalValues, context) }), - ...(input.IntegerValues != null && { IntegerValues: se_IntegerDefaultValueList(input.IntegerValues, context) }), - ...(input.StringValues != null && { StringValues: se_StringDefaultValueList(input.StringValues, context) }), - }; +const se_GaugeChartConditionalFormatting = (input: GaugeChartConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + ConditionalFormattingOptions: (_) => se_GaugeChartConditionalFormattingOptionList(_, context), + }); }; /** - * serializeAws_restJson1CustomSql + * serializeAws_restJson1GaugeChartConditionalFormattingOption */ -const se_CustomSql = (input: CustomSql, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_InputColumnList(input.Columns, context) }), - ...(input.DataSourceArn != null && { DataSourceArn: input.DataSourceArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SqlQuery != null && { SqlQuery: input.SqlQuery }), - }; +const se_GaugeChartConditionalFormattingOption = ( + input: GaugeChartConditionalFormattingOption, + context: __SerdeContext +): any => { + return take(input, { + Arc: (_) => se_GaugeChartArcConditionalFormatting(_, context), + PrimaryValue: (_) => se_GaugeChartPrimaryValueConditionalFormatting(_, context), + }); }; /** - * serializeAws_restJson1CustomValuesConfiguration + * serializeAws_restJson1GaugeChartConditionalFormattingOptionList */ -const se_CustomValuesConfiguration = (input: CustomValuesConfiguration, context: __SerdeContext): any => { - return { - ...(input.CustomValues != null && { CustomValues: se_CustomParameterValues(input.CustomValues, context) }), - ...(input.IncludeNullValue != null && { IncludeNullValue: input.IncludeNullValue }), - }; -}; - -/** - * serializeAws_restJson1DashboardPublishOptions - */ -const se_DashboardPublishOptions = (input: DashboardPublishOptions, context: __SerdeContext): any => { - return { - ...(input.AdHocFilteringOption != null && { - AdHocFilteringOption: se_AdHocFilteringOption(input.AdHocFilteringOption, context), - }), - ...(input.DataPointDrillUpDownOption != null && { - DataPointDrillUpDownOption: se_DataPointDrillUpDownOption(input.DataPointDrillUpDownOption, context), - }), - ...(input.DataPointMenuLabelOption != null && { - DataPointMenuLabelOption: se_DataPointMenuLabelOption(input.DataPointMenuLabelOption, context), - }), - ...(input.DataPointTooltipOption != null && { - DataPointTooltipOption: se_DataPointTooltipOption(input.DataPointTooltipOption, context), - }), - ...(input.ExportToCSVOption != null && { - ExportToCSVOption: se_ExportToCSVOption(input.ExportToCSVOption, context), - }), - ...(input.ExportWithHiddenFieldsOption != null && { - ExportWithHiddenFieldsOption: se_ExportWithHiddenFieldsOption(input.ExportWithHiddenFieldsOption, context), - }), - ...(input.SheetControlsOption != null && { - SheetControlsOption: se_SheetControlsOption(input.SheetControlsOption, context), - }), - ...(input.SheetLayoutElementMaximizationOption != null && { - SheetLayoutElementMaximizationOption: se_SheetLayoutElementMaximizationOption( - input.SheetLayoutElementMaximizationOption, - context - ), - }), - ...(input.VisualAxisSortOption != null && { - VisualAxisSortOption: se_VisualAxisSortOption(input.VisualAxisSortOption, context), - }), - ...(input.VisualMenuOption != null && { VisualMenuOption: se_VisualMenuOption(input.VisualMenuOption, context) }), - ...(input.VisualPublishOptions != null && { - VisualPublishOptions: se_DashboardVisualPublishOptions(input.VisualPublishOptions, context), - }), - }; +const se_GaugeChartConditionalFormattingOptionList = ( + input: GaugeChartConditionalFormattingOption[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_GaugeChartConditionalFormattingOption(entry, context); + }); }; /** - * serializeAws_restJson1DashboardSearchFilter + * serializeAws_restJson1GaugeChartConfiguration */ -const se_DashboardSearchFilter = (input: DashboardSearchFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_GaugeChartConfiguration = (input: GaugeChartConfiguration, context: __SerdeContext): any => { + return take(input, { + DataLabels: _json, + FieldWells: (_) => se_GaugeChartFieldWells(_, context), + GaugeChartOptions: (_) => se_GaugeChartOptions(_, context), + TooltipOptions: (_) => se_TooltipOptions(_, context), + VisualPalette: _json, + }); }; /** - * serializeAws_restJson1DashboardSearchFilterList + * serializeAws_restJson1GaugeChartFieldWells */ -const se_DashboardSearchFilterList = (input: DashboardSearchFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DashboardSearchFilter(entry, context); - }); +const se_GaugeChartFieldWells = (input: GaugeChartFieldWells, context: __SerdeContext): any => { + return take(input, { + TargetValues: (_) => se_MeasureFieldList(_, context), + Values: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1DashboardSourceEntity + * serializeAws_restJson1GaugeChartOptions */ -const se_DashboardSourceEntity = (input: DashboardSourceEntity, context: __SerdeContext): any => { - return { - ...(input.SourceTemplate != null && { SourceTemplate: se_DashboardSourceTemplate(input.SourceTemplate, context) }), - }; +const se_GaugeChartOptions = (input: GaugeChartOptions, context: __SerdeContext): any => { + return take(input, { + Arc: (_) => se_ArcConfiguration(_, context), + ArcAxis: (_) => se_ArcAxisConfiguration(_, context), + Comparison: _json, + PrimaryValueDisplayType: [], + PrimaryValueFontConfiguration: _json, + }); }; /** - * serializeAws_restJson1DashboardSourceTemplate + * serializeAws_restJson1GaugeChartPrimaryValueConditionalFormatting */ -const se_DashboardSourceTemplate = (input: DashboardSourceTemplate, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.DataSetReferences != null && { - DataSetReferences: se_DataSetReferenceList(input.DataSetReferences, context), - }), - }; +const se_GaugeChartPrimaryValueConditionalFormatting = ( + input: GaugeChartPrimaryValueConditionalFormatting, + context: __SerdeContext +): any => { + return take(input, { + Icon: _json, + TextColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; /** - * serializeAws_restJson1DashboardVersionDefinition + * serializeAws_restJson1GaugeChartVisual */ -const se_DashboardVersionDefinition = (input: DashboardVersionDefinition, context: __SerdeContext): any => { - return { - ...(input.AnalysisDefaults != null && { AnalysisDefaults: se_AnalysisDefaults(input.AnalysisDefaults, context) }), - ...(input.CalculatedFields != null && { CalculatedFields: se_CalculatedFields(input.CalculatedFields, context) }), - ...(input.ColumnConfigurations != null && { - ColumnConfigurations: se_ColumnConfigurationList(input.ColumnConfigurations, context), - }), - ...(input.DataSetIdentifierDeclarations != null && { - DataSetIdentifierDeclarations: se_DataSetIdentifierDeclarationList(input.DataSetIdentifierDeclarations, context), - }), - ...(input.FilterGroups != null && { FilterGroups: se_FilterGroupList(input.FilterGroups, context) }), - ...(input.ParameterDeclarations != null && { - ParameterDeclarations: se_ParameterDeclarationList(input.ParameterDeclarations, context), - }), - ...(input.Sheets != null && { Sheets: se_SheetDefinitionList(input.Sheets, context) }), - }; +const se_GaugeChartVisual = (input: GaugeChartVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_GaugeChartConfiguration(_, context), + ConditionalFormatting: (_) => se_GaugeChartConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; -/** - * serializeAws_restJson1DashboardVisualId - */ -const se_DashboardVisualId = (input: DashboardVisualId, context: __SerdeContext): any => { - return { - ...(input.DashboardId != null && { DashboardId: input.DashboardId }), - ...(input.SheetId != null && { SheetId: input.SheetId }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; +// se_GeoSpatialColumnGroup omitted. /** - * serializeAws_restJson1DashboardVisualPublishOptions + * serializeAws_restJson1GeospatialCoordinateBounds */ -const se_DashboardVisualPublishOptions = (input: DashboardVisualPublishOptions, context: __SerdeContext): any => { - return { - ...(input.ExportHiddenFieldsOption != null && { - ExportHiddenFieldsOption: se_ExportHiddenFieldsOption(input.ExportHiddenFieldsOption, context), - }), - }; +const se_GeospatialCoordinateBounds = (input: GeospatialCoordinateBounds, context: __SerdeContext): any => { + return take(input, { + East: __serializeFloat, + North: __serializeFloat, + South: __serializeFloat, + West: __serializeFloat, + }); }; /** - * serializeAws_restJson1DataBarsOptions + * serializeAws_restJson1GeospatialMapAggregatedFieldWells */ -const se_DataBarsOptions = (input: DataBarsOptions, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.NegativeColor != null && { NegativeColor: input.NegativeColor }), - ...(input.PositiveColor != null && { PositiveColor: input.PositiveColor }), - }; +const se_GeospatialMapAggregatedFieldWells = ( + input: GeospatialMapAggregatedFieldWells, + context: __SerdeContext +): any => { + return take(input, { + Colors: _json, + Geospatial: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1DatabricksParameters + * serializeAws_restJson1GeospatialMapConfiguration */ -const se_DatabricksParameters = (input: DatabricksParameters, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SqlEndpointPath != null && { SqlEndpointPath: input.SqlEndpointPath }), - }; +const se_GeospatialMapConfiguration = (input: GeospatialMapConfiguration, context: __SerdeContext): any => { + return take(input, { + FieldWells: (_) => se_GeospatialMapFieldWells(_, context), + Legend: _json, + MapStyleOptions: _json, + PointStyleOptions: _json, + Tooltip: (_) => se_TooltipOptions(_, context), + VisualPalette: _json, + WindowOptions: (_) => se_GeospatialWindowOptions(_, context), + }); }; /** - * serializeAws_restJson1DataColor + * serializeAws_restJson1GeospatialMapFieldWells */ -const se_DataColor = (input: DataColor, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.DataValue != null && { DataValue: __serializeFloat(input.DataValue) }), - }; +const se_GeospatialMapFieldWells = (input: GeospatialMapFieldWells, context: __SerdeContext): any => { + return take(input, { + GeospatialMapAggregatedFieldWells: (_) => se_GeospatialMapAggregatedFieldWells(_, context), + }); }; +// se_GeospatialMapStyleOptions omitted. + /** - * serializeAws_restJson1DataColorPalette + * serializeAws_restJson1GeospatialMapVisual */ -const se_DataColorPalette = (input: DataColorPalette, context: __SerdeContext): any => { - return { - ...(input.Colors != null && { Colors: se_ColorList(input.Colors, context) }), - ...(input.EmptyFillColor != null && { EmptyFillColor: input.EmptyFillColor }), - ...(input.MinMaxGradient != null && { MinMaxGradient: se_ColorList(input.MinMaxGradient, context) }), - }; +const se_GeospatialMapVisual = (input: GeospatialMapVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_GeospatialMapConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_GeospatialPointStyleOptions omitted. + /** - * serializeAws_restJson1DataFieldSeriesItem + * serializeAws_restJson1GeospatialWindowOptions */ -const se_DataFieldSeriesItem = (input: DataFieldSeriesItem, context: __SerdeContext): any => { - return { - ...(input.AxisBinding != null && { AxisBinding: input.AxisBinding }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FieldValue != null && { FieldValue: input.FieldValue }), - ...(input.Settings != null && { Settings: se_LineChartSeriesSettings(input.Settings, context) }), - }; +const se_GeospatialWindowOptions = (input: GeospatialWindowOptions, context: __SerdeContext): any => { + return take(input, { + Bounds: (_) => se_GeospatialCoordinateBounds(_, context), + MapZoomMode: [], + }); }; +// se_GlobalTableBorderOptions omitted. + /** - * serializeAws_restJson1DataLabelOptions + * serializeAws_restJson1GradientColor */ -const se_DataLabelOptions = (input: DataLabelOptions, context: __SerdeContext): any => { - return { - ...(input.CategoryLabelVisibility != null && { CategoryLabelVisibility: input.CategoryLabelVisibility }), - ...(input.DataLabelTypes != null && { DataLabelTypes: se_DataLabelTypes(input.DataLabelTypes, context) }), - ...(input.LabelColor != null && { LabelColor: input.LabelColor }), - ...(input.LabelContent != null && { LabelContent: input.LabelContent }), - ...(input.LabelFontConfiguration != null && { - LabelFontConfiguration: se_FontConfiguration(input.LabelFontConfiguration, context), - }), - ...(input.MeasureLabelVisibility != null && { MeasureLabelVisibility: input.MeasureLabelVisibility }), - ...(input.Overlap != null && { Overlap: input.Overlap }), - ...(input.Position != null && { Position: input.Position }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_GradientColor = (input: GradientColor, context: __SerdeContext): any => { + return take(input, { + Stops: (_) => se_GradientStopList(_, context), + }); }; /** - * serializeAws_restJson1DataLabelType + * serializeAws_restJson1GradientStop */ -const se_DataLabelType = (input: DataLabelType, context: __SerdeContext): any => { - return { - ...(input.DataPathLabelType != null && { - DataPathLabelType: se_DataPathLabelType(input.DataPathLabelType, context), - }), - ...(input.FieldLabelType != null && { FieldLabelType: se_FieldLabelType(input.FieldLabelType, context) }), - ...(input.MaximumLabelType != null && { MaximumLabelType: se_MaximumLabelType(input.MaximumLabelType, context) }), - ...(input.MinimumLabelType != null && { MinimumLabelType: se_MinimumLabelType(input.MinimumLabelType, context) }), - ...(input.RangeEndsLabelType != null && { - RangeEndsLabelType: se_RangeEndsLabelType(input.RangeEndsLabelType, context), - }), - }; +const se_GradientStop = (input: GradientStop, context: __SerdeContext): any => { + return take(input, { + Color: [], + DataValue: __serializeFloat, + GradientOffset: __serializeFloat, + }); }; /** - * serializeAws_restJson1DataLabelTypes + * serializeAws_restJson1GradientStopList */ -const se_DataLabelTypes = (input: DataLabelType[], context: __SerdeContext): any => { +const se_GradientStopList = (input: GradientStop[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DataLabelType(entry, context); + return se_GradientStop(entry, context); }); }; -/** - * serializeAws_restJson1DataPathColor - */ -const se_DataPathColor = (input: DataPathColor, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.Element != null && { Element: se_DataPathValue(input.Element, context) }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - }; -}; +// se_GridLayoutCanvasSizeOptions omitted. + +// se_GridLayoutConfiguration omitted. + +// se_GridLayoutElement omitted. + +// se_GridLayoutElementList omitted. + +// se_GridLayoutScreenCanvasSizeOptions omitted. + +// se_GroupSearchFilter omitted. + +// se_GroupSearchFilterList omitted. + +// se_GroupsList omitted. /** - * serializeAws_restJson1DataPathColorList + * serializeAws_restJson1GrowthRateComputation */ -const se_DataPathColorList = (input: DataPathColor[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataPathColor(entry, context); - }); +const se_GrowthRateComputation = (input: GrowthRateComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + Name: [], + PeriodSize: [], + Time: _json, + Value: (_) => se_MeasureField(_, context), + }); }; +// se_GutterStyle omitted. + +// se_HeaderFooterSectionConfiguration omitted. + +// se_HeaderFooterSectionConfigurationList omitted. + /** - * serializeAws_restJson1DataPathLabelType + * serializeAws_restJson1HeatMapAggregatedFieldWells */ -const se_DataPathLabelType = (input: DataPathLabelType, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FieldValue != null && { FieldValue: input.FieldValue }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_HeatMapAggregatedFieldWells = (input: HeatMapAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Columns: _json, + Rows: _json, + Values: (_) => se_HeatMapMeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1DataPathSort + * serializeAws_restJson1HeatMapConfiguration */ -const se_DataPathSort = (input: DataPathSort, context: __SerdeContext): any => { - return { - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.SortPaths != null && { SortPaths: se_DataPathValueList(input.SortPaths, context) }), - }; +const se_HeatMapConfiguration = (input: HeatMapConfiguration, context: __SerdeContext): any => { + return take(input, { + ColorScale: (_) => se_ColorScale(_, context), + ColumnLabelOptions: _json, + DataLabels: _json, + FieldWells: (_) => se_HeatMapFieldWells(_, context), + Legend: _json, + RowLabelOptions: _json, + SortConfiguration: (_) => se_HeatMapSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + }); }; +// se_HeatMapDimensionFieldList omitted. + /** - * serializeAws_restJson1DataPathValue + * serializeAws_restJson1HeatMapFieldWells */ -const se_DataPathValue = (input: DataPathValue, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FieldValue != null && { FieldValue: input.FieldValue }), - }; +const se_HeatMapFieldWells = (input: HeatMapFieldWells, context: __SerdeContext): any => { + return take(input, { + HeatMapAggregatedFieldWells: (_) => se_HeatMapAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1DataPathValueList + * serializeAws_restJson1HeatMapMeasureFieldList */ -const se_DataPathValueList = (input: DataPathValue[], context: __SerdeContext): any => { +const se_HeatMapMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DataPathValue(entry, context); + return se_MeasureField(entry, context); }); }; /** - * serializeAws_restJson1DataPointDrillUpDownOption + * serializeAws_restJson1HeatMapSortConfiguration */ -const se_DataPointDrillUpDownOption = (input: DataPointDrillUpDownOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; +const se_HeatMapSortConfiguration = (input: HeatMapSortConfiguration, context: __SerdeContext): any => { + return take(input, { + HeatMapColumnItemsLimitConfiguration: _json, + HeatMapColumnSort: (_) => se_FieldSortOptionsList(_, context), + HeatMapRowItemsLimitConfiguration: _json, + HeatMapRowSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1DataPointMenuLabelOption + * serializeAws_restJson1HeatMapVisual */ -const se_DataPointMenuLabelOption = (input: DataPointMenuLabelOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; +const se_HeatMapVisual = (input: HeatMapVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_HeatMapConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * serializeAws_restJson1DataPointTooltipOption + * serializeAws_restJson1HistogramAggregatedFieldWells */ -const se_DataPointTooltipOption = (input: DataPointTooltipOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; +const se_HistogramAggregatedFieldWells = (input: HistogramAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Values: (_) => se_HistogramMeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1DataSetConfiguration + * serializeAws_restJson1HistogramBinOptions */ -const se_DataSetConfiguration = (input: DataSetConfiguration, context: __SerdeContext): any => { - return { - ...(input.ColumnGroupSchemaList != null && { - ColumnGroupSchemaList: se_ColumnGroupSchemaList(input.ColumnGroupSchemaList, context), - }), - ...(input.DataSetSchema != null && { DataSetSchema: se_DataSetSchema(input.DataSetSchema, context) }), - ...(input.Placeholder != null && { Placeholder: input.Placeholder }), - }; +const se_HistogramBinOptions = (input: HistogramBinOptions, context: __SerdeContext): any => { + return take(input, { + BinCount: _json, + BinWidth: (_) => se_BinWidthOptions(_, context), + SelectedBinType: [], + StartValue: __serializeFloat, + }); }; /** - * serializeAws_restJson1DataSetConfigurationList + * serializeAws_restJson1HistogramConfiguration */ -const se_DataSetConfigurationList = (input: DataSetConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSetConfiguration(entry, context); - }); +const se_HistogramConfiguration = (input: HistogramConfiguration, context: __SerdeContext): any => { + return take(input, { + BinOptions: (_) => se_HistogramBinOptions(_, context), + DataLabels: _json, + FieldWells: (_) => se_HistogramFieldWells(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + VisualPalette: _json, + XAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + XAxisLabelOptions: _json, + YAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + }); }; /** - * serializeAws_restJson1DataSetIdentifierDeclaration + * serializeAws_restJson1HistogramFieldWells */ -const se_DataSetIdentifierDeclaration = (input: DataSetIdentifierDeclaration, context: __SerdeContext): any => { - return { - ...(input.DataSetArn != null && { DataSetArn: input.DataSetArn }), - ...(input.Identifier != null && { Identifier: input.Identifier }), - }; +const se_HistogramFieldWells = (input: HistogramFieldWells, context: __SerdeContext): any => { + return take(input, { + HistogramAggregatedFieldWells: (_) => se_HistogramAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1DataSetIdentifierDeclarationList + * serializeAws_restJson1HistogramMeasureFieldList */ -const se_DataSetIdentifierDeclarationList = (input: DataSetIdentifierDeclaration[], context: __SerdeContext): any => { +const se_HistogramMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DataSetIdentifierDeclaration(entry, context); + return se_MeasureField(entry, context); }); }; /** - * serializeAws_restJson1DataSetReference + * serializeAws_restJson1HistogramVisual */ -const se_DataSetReference = (input: DataSetReference, context: __SerdeContext): any => { - return { - ...(input.DataSetArn != null && { DataSetArn: input.DataSetArn }), - ...(input.DataSetPlaceholder != null && { DataSetPlaceholder: input.DataSetPlaceholder }), - }; +const se_HistogramVisual = (input: HistogramVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_HistogramConfiguration(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_IdentityMap omitted. + +// se_IdentityNameList omitted. + +// se_IncrementalRefresh omitted. + +// se_InputColumn omitted. + +// se_InputColumnList omitted. + /** - * serializeAws_restJson1DataSetReferenceList + * serializeAws_restJson1InsightConfiguration */ -const se_DataSetReferenceList = (input: DataSetReference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSetReference(entry, context); - }); +const se_InsightConfiguration = (input: InsightConfiguration, context: __SerdeContext): any => { + return take(input, { + Computations: (_) => se_ComputationList(_, context), + CustomNarrative: _json, + }); }; /** - * serializeAws_restJson1DataSetRefreshProperties + * serializeAws_restJson1InsightVisual */ -const se_DataSetRefreshProperties = (input: DataSetRefreshProperties, context: __SerdeContext): any => { - return { - ...(input.RefreshConfiguration != null && { - RefreshConfiguration: se_RefreshConfiguration(input.RefreshConfiguration, context), - }), - }; +const se_InsightVisual = (input: InsightVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + DataSetIdentifier: [], + InsightConfiguration: (_) => se_InsightConfiguration(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_IntegerDefaultValueList omitted. + +// se_IntegerDefaultValues omitted. + +// se_IntegerParameter omitted. + +// se_IntegerParameterDeclaration omitted. + +// se_IntegerParameterList omitted. + +// se_IntegerValueWhenUnsetConfiguration omitted. + +// se_IpRestrictionRuleMap omitted. + +// se_ItemsLimitConfiguration omitted. + +// se_JiraParameters omitted. + +// se_JoinInstruction omitted. + +// se_JoinKeyProperties omitted. + /** - * serializeAws_restJson1DataSetSchema + * serializeAws_restJson1KPIConditionalFormatting */ -const se_DataSetSchema = (input: DataSetSchema, context: __SerdeContext): any => { - return { - ...(input.ColumnSchemaList != null && { ColumnSchemaList: se_ColumnSchemaList(input.ColumnSchemaList, context) }), - }; +const se_KPIConditionalFormatting = (input: KPIConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + ConditionalFormattingOptions: (_) => se_KPIConditionalFormattingOptionList(_, context), + }); }; /** - * serializeAws_restJson1DataSetSearchFilter + * serializeAws_restJson1KPIConditionalFormattingOption */ -const se_DataSetSearchFilter = (input: DataSetSearchFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_KPIConditionalFormattingOption = (input: KPIConditionalFormattingOption, context: __SerdeContext): any => { + return take(input, { + PrimaryValue: (_) => se_KPIPrimaryValueConditionalFormatting(_, context), + ProgressBar: (_) => se_KPIProgressBarConditionalFormatting(_, context), + }); }; /** - * serializeAws_restJson1DataSetSearchFilterList + * serializeAws_restJson1KPIConditionalFormattingOptionList */ -const se_DataSetSearchFilterList = (input: DataSetSearchFilter[], context: __SerdeContext): any => { +const se_KPIConditionalFormattingOptionList = ( + input: KPIConditionalFormattingOption[], + context: __SerdeContext +): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DataSetSearchFilter(entry, context); + return se_KPIConditionalFormattingOption(entry, context); }); }; /** - * serializeAws_restJson1DataSetUsageConfiguration + * serializeAws_restJson1KPIConfiguration */ -const se_DataSetUsageConfiguration = (input: DataSetUsageConfiguration, context: __SerdeContext): any => { - return { - ...(input.DisableUseAsDirectQuerySource != null && { - DisableUseAsDirectQuerySource: input.DisableUseAsDirectQuerySource, - }), - ...(input.DisableUseAsImportedSource != null && { DisableUseAsImportedSource: input.DisableUseAsImportedSource }), - }; +const se_KPIConfiguration = (input: KPIConfiguration, context: __SerdeContext): any => { + return take(input, { + FieldWells: (_) => se_KPIFieldWells(_, context), + KPIOptions: _json, + SortConfiguration: (_) => se_KPISortConfiguration(_, context), + }); }; /** - * serializeAws_restJson1DataSourceCredentials + * serializeAws_restJson1KPIFieldWells */ -const se_DataSourceCredentials = (input: DataSourceCredentials, context: __SerdeContext): any => { - return { - ...(input.CopySourceArn != null && { CopySourceArn: input.CopySourceArn }), - ...(input.CredentialPair != null && { CredentialPair: se_CredentialPair(input.CredentialPair, context) }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - }; +const se_KPIFieldWells = (input: KPIFieldWells, context: __SerdeContext): any => { + return take(input, { + TargetValues: (_) => se_MeasureFieldList(_, context), + TrendGroups: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; -/** - * serializeAws_restJson1DataSourceParameters - */ -const se_DataSourceParameters = (input: DataSourceParameters, context: __SerdeContext): any => { - return DataSourceParameters.visit(input, { - AmazonElasticsearchParameters: (value) => ({ - AmazonElasticsearchParameters: se_AmazonElasticsearchParameters(value, context), - }), - AmazonOpenSearchParameters: (value) => ({ - AmazonOpenSearchParameters: se_AmazonOpenSearchParameters(value, context), - }), - AthenaParameters: (value) => ({ AthenaParameters: se_AthenaParameters(value, context) }), - AuroraParameters: (value) => ({ AuroraParameters: se_AuroraParameters(value, context) }), - AuroraPostgreSqlParameters: (value) => ({ - AuroraPostgreSqlParameters: se_AuroraPostgreSqlParameters(value, context), - }), - AwsIotAnalyticsParameters: (value) => ({ AwsIotAnalyticsParameters: se_AwsIotAnalyticsParameters(value, context) }), - DatabricksParameters: (value) => ({ DatabricksParameters: se_DatabricksParameters(value, context) }), - ExasolParameters: (value) => ({ ExasolParameters: se_ExasolParameters(value, context) }), - JiraParameters: (value) => ({ JiraParameters: se_JiraParameters(value, context) }), - MariaDbParameters: (value) => ({ MariaDbParameters: se_MariaDbParameters(value, context) }), - MySqlParameters: (value) => ({ MySqlParameters: se_MySqlParameters(value, context) }), - OracleParameters: (value) => ({ OracleParameters: se_OracleParameters(value, context) }), - PostgreSqlParameters: (value) => ({ PostgreSqlParameters: se_PostgreSqlParameters(value, context) }), - PrestoParameters: (value) => ({ PrestoParameters: se_PrestoParameters(value, context) }), - RdsParameters: (value) => ({ RdsParameters: se_RdsParameters(value, context) }), - RedshiftParameters: (value) => ({ RedshiftParameters: se_RedshiftParameters(value, context) }), - S3Parameters: (value) => ({ S3Parameters: se_S3Parameters(value, context) }), - ServiceNowParameters: (value) => ({ ServiceNowParameters: se_ServiceNowParameters(value, context) }), - SnowflakeParameters: (value) => ({ SnowflakeParameters: se_SnowflakeParameters(value, context) }), - SparkParameters: (value) => ({ SparkParameters: se_SparkParameters(value, context) }), - SqlServerParameters: (value) => ({ SqlServerParameters: se_SqlServerParameters(value, context) }), - TeradataParameters: (value) => ({ TeradataParameters: se_TeradataParameters(value, context) }), - TwitterParameters: (value) => ({ TwitterParameters: se_TwitterParameters(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1DataSourceParametersList - */ -const se_DataSourceParametersList = (input: DataSourceParameters[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSourceParameters(entry, context); - }); -}; +// se_KPIOptions omitted. /** - * serializeAws_restJson1DataSourceSearchFilter + * serializeAws_restJson1KPIPrimaryValueConditionalFormatting */ -const se_DataSourceSearchFilter = (input: DataSourceSearchFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_KPIPrimaryValueConditionalFormatting = ( + input: KPIPrimaryValueConditionalFormatting, + context: __SerdeContext +): any => { + return take(input, { + Icon: _json, + TextColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; /** - * serializeAws_restJson1DataSourceSearchFilterList + * serializeAws_restJson1KPIProgressBarConditionalFormatting */ -const se_DataSourceSearchFilterList = (input: DataSourceSearchFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DataSourceSearchFilter(entry, context); - }); +const se_KPIProgressBarConditionalFormatting = ( + input: KPIProgressBarConditionalFormatting, + context: __SerdeContext +): any => { + return take(input, { + ForegroundColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; /** - * serializeAws_restJson1DateAxisOptions + * serializeAws_restJson1KPISortConfiguration */ -const se_DateAxisOptions = (input: DateAxisOptions, context: __SerdeContext): any => { - return { - ...(input.MissingDateVisibility != null && { MissingDateVisibility: input.MissingDateVisibility }), - }; +const se_KPISortConfiguration = (input: KPISortConfiguration, context: __SerdeContext): any => { + return take(input, { + TrendGroupSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1DateDimensionField + * serializeAws_restJson1KPIVisual */ -const se_DateDimensionField = (input: DateDimensionField, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.DateGranularity != null && { DateGranularity: input.DateGranularity }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_DateTimeFormatConfiguration(input.FormatConfiguration, context), - }), - ...(input.HierarchyId != null && { HierarchyId: input.HierarchyId }), - }; +const se_KPIVisual = (input: KPIVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_KPIConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + ConditionalFormatting: (_) => se_KPIConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_LabelOptions omitted. + /** - * serializeAws_restJson1DateMeasureField + * serializeAws_restJson1Layout */ -const se_DateMeasureField = (input: DateMeasureField, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { AggregationFunction: input.AggregationFunction }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_DateTimeFormatConfiguration(input.FormatConfiguration, context), - }), - }; +const se_Layout = (input: Layout, context: __SerdeContext): any => { + return take(input, { + Configuration: (_) => se_LayoutConfiguration(_, context), + }); }; /** - * serializeAws_restJson1DateTimeDefaultValueList + * serializeAws_restJson1LayoutConfiguration */ -const se_DateTimeDefaultValueList = (input: Date[], context: __SerdeContext): any => { +const se_LayoutConfiguration = (input: LayoutConfiguration, context: __SerdeContext): any => { + return take(input, { + FreeFormLayout: _json, + GridLayout: _json, + SectionBasedLayout: (_) => se_SectionBasedLayoutConfiguration(_, context), + }); +}; + +/** + * serializeAws_restJson1LayoutList + */ +const se_LayoutList = (input: Layout[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return Math.round(entry.getTime() / 1000); + return se_Layout(entry, context); }); }; +// se_LegendOptions omitted. + /** - * serializeAws_restJson1DateTimeDefaultValues + * serializeAws_restJson1LineChartAggregatedFieldWells */ -const se_DateTimeDefaultValues = (input: DateTimeDefaultValues, context: __SerdeContext): any => { - return { - ...(input.DynamicValue != null && { DynamicValue: se_DynamicDefaultValue(input.DynamicValue, context) }), - ...(input.RollingDate != null && { RollingDate: se_RollingDateConfiguration(input.RollingDate, context) }), - ...(input.StaticValues != null && { StaticValues: se_DateTimeDefaultValueList(input.StaticValues, context) }), - }; +const se_LineChartAggregatedFieldWells = (input: LineChartAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Category: _json, + Colors: _json, + SmallMultiples: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1DateTimeFormatConfiguration + * serializeAws_restJson1LineChartConfiguration */ -const se_DateTimeFormatConfiguration = (input: DateTimeFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.DateTimeFormat != null && { DateTimeFormat: input.DateTimeFormat }), - ...(input.NullValueFormatConfiguration != null && { - NullValueFormatConfiguration: se_NullValueFormatConfiguration(input.NullValueFormatConfiguration, context), - }), - ...(input.NumericFormatConfiguration != null && { - NumericFormatConfiguration: se_NumericFormatConfiguration(input.NumericFormatConfiguration, context), - }), - }; -}; +const se_LineChartConfiguration = (input: LineChartConfiguration, context: __SerdeContext): any => { + return take(input, { + ContributionAnalysisDefaults: _json, + DataLabels: _json, + DefaultSeriesSettings: _json, + FieldWells: (_) => se_LineChartFieldWells(_, context), + ForecastConfigurations: (_) => se_ForecastConfigurationList(_, context), + Legend: _json, + PrimaryYAxisDisplayOptions: (_) => se_LineSeriesAxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + ReferenceLines: (_) => se_ReferenceLineList(_, context), + SecondaryYAxisDisplayOptions: (_) => se_LineSeriesAxisDisplayOptions(_, context), + SecondaryYAxisLabelOptions: _json, + Series: _json, + SmallMultiplesOptions: _json, + SortConfiguration: (_) => se_LineChartSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + Type: [], + VisualPalette: _json, + XAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + XAxisLabelOptions: _json, + }); +}; + +// se_LineChartDefaultSeriesSettings omitted. /** - * serializeAws_restJson1DateTimeHierarchy + * serializeAws_restJson1LineChartFieldWells */ -const se_DateTimeHierarchy = (input: DateTimeHierarchy, context: __SerdeContext): any => { - return { - ...(input.DrillDownFilters != null && { - DrillDownFilters: se_DrillDownFilterList(input.DrillDownFilters, context), - }), - ...(input.HierarchyId != null && { HierarchyId: input.HierarchyId }), - }; +const se_LineChartFieldWells = (input: LineChartFieldWells, context: __SerdeContext): any => { + return take(input, { + LineChartAggregatedFieldWells: (_) => se_LineChartAggregatedFieldWells(_, context), + }); }; +// se_LineChartLineStyleSettings omitted. + +// se_LineChartMarkerStyleSettings omitted. + +// se_LineChartSeriesSettings omitted. + /** - * serializeAws_restJson1DateTimeParameter + * serializeAws_restJson1LineChartSortConfiguration */ -const se_DateTimeParameter = (input: DateTimeParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_SensitiveTimestampList(input.Values, context) }), - }; +const se_LineChartSortConfiguration = (input: LineChartSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryItemsLimitConfiguration: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + ColorItemsLimitConfiguration: _json, + SmallMultiplesLimitConfiguration: _json, + SmallMultiplesSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1DateTimeParameterDeclaration + * serializeAws_restJson1LineChartVisual */ -const se_DateTimeParameterDeclaration = (input: DateTimeParameterDeclaration, context: __SerdeContext): any => { - return { - ...(input.DefaultValues != null && { DefaultValues: se_DateTimeDefaultValues(input.DefaultValues, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - ...(input.ValueWhenUnset != null && { - ValueWhenUnset: se_DateTimeValueWhenUnsetConfiguration(input.ValueWhenUnset, context), - }), - }; +const se_LineChartVisual = (input: LineChartVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_LineChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * serializeAws_restJson1DateTimeParameterList + * serializeAws_restJson1LineSeriesAxisDisplayOptions */ -const se_DateTimeParameterList = (input: DateTimeParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DateTimeParameter(entry, context); - }); +const se_LineSeriesAxisDisplayOptions = (input: LineSeriesAxisDisplayOptions, context: __SerdeContext): any => { + return take(input, { + AxisOptions: (_) => se_AxisDisplayOptions(_, context), + MissingDataConfigurations: _json, + }); }; +// se_ListControlDisplayOptions omitted. + +// se_ListControlSearchOptions omitted. + +// se_ListControlSelectAllOptions omitted. + +// se_LoadingAnimation omitted. + +// se_LocalNavigationConfiguration omitted. + +// se_LogicalTable omitted. + +// se_LogicalTableMap omitted. + +// se_LogicalTableSource omitted. + +// se_LongFormatText omitted. + +// se_LookbackWindow omitted. + +// se_ManifestFileLocation omitted. + +// se_MarginStyle omitted. + +// se_MariaDbParameters omitted. + +// se_MaximumLabelType omitted. + /** - * serializeAws_restJson1DateTimePickerControlDisplayOptions + * serializeAws_restJson1MaximumMinimumComputation */ -const se_DateTimePickerControlDisplayOptions = ( - input: DateTimePickerControlDisplayOptions, - context: __SerdeContext -): any => { - return { - ...(input.DateTimeFormat != null && { DateTimeFormat: input.DateTimeFormat }), - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; +const se_MaximumMinimumComputation = (input: MaximumMinimumComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + Name: [], + Time: _json, + Type: [], + Value: (_) => se_MeasureField(_, context), + }); }; /** - * serializeAws_restJson1DateTimeValueWhenUnsetConfiguration + * serializeAws_restJson1MeasureField */ -const se_DateTimeValueWhenUnsetConfiguration = ( - input: DateTimeValueWhenUnsetConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomValue != null && { CustomValue: Math.round(input.CustomValue.getTime() / 1000) }), - ...(input.ValueWhenUnsetOption != null && { ValueWhenUnsetOption: input.ValueWhenUnsetOption }), - }; +const se_MeasureField = (input: MeasureField, context: __SerdeContext): any => { + return take(input, { + CalculatedMeasureField: _json, + CategoricalMeasureField: _json, + DateMeasureField: _json, + NumericalMeasureField: (_) => se_NumericalMeasureField(_, context), + }); }; /** - * serializeAws_restJson1DecimalDefaultValueList + * serializeAws_restJson1MeasureFieldList */ -const se_DecimalDefaultValueList = (input: number[], context: __SerdeContext): any => { +const se_MeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return __serializeFloat(entry); + return se_MeasureField(entry, context); }); }; /** - * serializeAws_restJson1DecimalDefaultValues + * serializeAws_restJson1MetricComparisonComputation */ -const se_DecimalDefaultValues = (input: DecimalDefaultValues, context: __SerdeContext): any => { - return { - ...(input.DynamicValue != null && { DynamicValue: se_DynamicDefaultValue(input.DynamicValue, context) }), - ...(input.StaticValues != null && { StaticValues: se_DecimalDefaultValueList(input.StaticValues, context) }), - }; +const se_MetricComparisonComputation = (input: MetricComparisonComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + FromValue: (_) => se_MeasureField(_, context), + Name: [], + TargetValue: (_) => se_MeasureField(_, context), + Time: _json, + }); }; -/** - * serializeAws_restJson1DecimalParameter - */ -const se_DecimalParameter = (input: DecimalParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_SensitiveDoubleList(input.Values, context) }), - }; -}; +// se_MinimumLabelType omitted. -/** - * serializeAws_restJson1DecimalParameterDeclaration - */ -const se_DecimalParameterDeclaration = (input: DecimalParameterDeclaration, context: __SerdeContext): any => { - return { - ...(input.DefaultValues != null && { DefaultValues: se_DecimalDefaultValues(input.DefaultValues, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParameterValueType != null && { ParameterValueType: input.ParameterValueType }), - ...(input.ValueWhenUnset != null && { - ValueWhenUnset: se_DecimalValueWhenUnsetConfiguration(input.ValueWhenUnset, context), - }), - }; -}; +// se_MissingDataConfiguration omitted. -/** - * serializeAws_restJson1DecimalParameterList - */ -const se_DecimalParameterList = (input: DecimalParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DecimalParameter(entry, context); - }); -}; +// se_MissingDataConfigurationList omitted. + +// se_MySqlParameters omitted. + +// se_NegativeValueConfiguration omitted. + +// se_NullValueFormatConfiguration omitted. + +// se_NumberDisplayFormatConfiguration omitted. + +// se_NumberFormatConfiguration omitted. /** - * serializeAws_restJson1DecimalPlacesConfiguration + * serializeAws_restJson1NumericalAggregationFunction */ -const se_DecimalPlacesConfiguration = (input: DecimalPlacesConfiguration, context: __SerdeContext): any => { - return { - ...(input.DecimalPlaces != null && { DecimalPlaces: input.DecimalPlaces }), - }; +const se_NumericalAggregationFunction = (input: NumericalAggregationFunction, context: __SerdeContext): any => { + return take(input, { + PercentileAggregation: (_) => se_PercentileAggregation(_, context), + SimpleNumericalAggregation: [], + }); }; +// se_NumericalDimensionField omitted. + /** - * serializeAws_restJson1DecimalValueWhenUnsetConfiguration + * serializeAws_restJson1NumericalMeasureField */ -const se_DecimalValueWhenUnsetConfiguration = ( - input: DecimalValueWhenUnsetConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomValue != null && { CustomValue: __serializeFloat(input.CustomValue) }), - ...(input.ValueWhenUnsetOption != null && { ValueWhenUnsetOption: input.ValueWhenUnsetOption }), - }; +const se_NumericalMeasureField = (input: NumericalMeasureField, context: __SerdeContext): any => { + return take(input, { + AggregationFunction: (_) => se_NumericalAggregationFunction(_, context), + Column: _json, + FieldId: [], + FormatConfiguration: _json, + }); }; /** - * serializeAws_restJson1DefaultFreeFormLayoutConfiguration + * serializeAws_restJson1NumericAxisOptions */ -const se_DefaultFreeFormLayoutConfiguration = ( - input: DefaultFreeFormLayoutConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CanvasSizeOptions != null && { - CanvasSizeOptions: se_FreeFormLayoutCanvasSizeOptions(input.CanvasSizeOptions, context), - }), - }; +const se_NumericAxisOptions = (input: NumericAxisOptions, context: __SerdeContext): any => { + return take(input, { + Range: (_) => se_AxisDisplayRange(_, context), + Scale: (_) => se_AxisScale(_, context), + }); }; /** - * serializeAws_restJson1DefaultGridLayoutConfiguration + * serializeAws_restJson1NumericEqualityDrillDownFilter */ -const se_DefaultGridLayoutConfiguration = (input: DefaultGridLayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.CanvasSizeOptions != null && { - CanvasSizeOptions: se_GridLayoutCanvasSizeOptions(input.CanvasSizeOptions, context), - }), - }; +const se_NumericEqualityDrillDownFilter = (input: NumericEqualityDrillDownFilter, context: __SerdeContext): any => { + return take(input, { + Column: _json, + Value: __serializeFloat, + }); }; /** - * serializeAws_restJson1DefaultInteractiveLayoutConfiguration + * serializeAws_restJson1NumericEqualityFilter */ -const se_DefaultInteractiveLayoutConfiguration = ( - input: DefaultInteractiveLayoutConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FreeForm != null && { FreeForm: se_DefaultFreeFormLayoutConfiguration(input.FreeForm, context) }), - ...(input.Grid != null && { Grid: se_DefaultGridLayoutConfiguration(input.Grid, context) }), - }; +const se_NumericEqualityFilter = (input: NumericEqualityFilter, context: __SerdeContext): any => { + return take(input, { + AggregationFunction: (_) => se_AggregationFunction(_, context), + Column: _json, + FilterId: [], + MatchOperator: [], + NullOption: [], + ParameterName: [], + SelectAllOptions: [], + Value: __serializeFloat, + }); }; +// se_NumericFormatConfiguration omitted. + /** - * serializeAws_restJson1DefaultNewSheetConfiguration + * serializeAws_restJson1NumericRangeFilter */ -const se_DefaultNewSheetConfiguration = (input: DefaultNewSheetConfiguration, context: __SerdeContext): any => { - return { - ...(input.InteractiveLayoutConfiguration != null && { - InteractiveLayoutConfiguration: se_DefaultInteractiveLayoutConfiguration( - input.InteractiveLayoutConfiguration, - context - ), - }), - ...(input.PaginatedLayoutConfiguration != null && { - PaginatedLayoutConfiguration: se_DefaultPaginatedLayoutConfiguration(input.PaginatedLayoutConfiguration, context), - }), - ...(input.SheetContentType != null && { SheetContentType: input.SheetContentType }), - }; +const se_NumericRangeFilter = (input: NumericRangeFilter, context: __SerdeContext): any => { + return take(input, { + AggregationFunction: (_) => se_AggregationFunction(_, context), + Column: _json, + FilterId: [], + IncludeMaximum: [], + IncludeMinimum: [], + NullOption: [], + RangeMaximum: (_) => se_NumericRangeFilterValue(_, context), + RangeMinimum: (_) => se_NumericRangeFilterValue(_, context), + SelectAllOptions: [], + }); }; /** - * serializeAws_restJson1DefaultPaginatedLayoutConfiguration + * serializeAws_restJson1NumericRangeFilterValue */ -const se_DefaultPaginatedLayoutConfiguration = ( - input: DefaultPaginatedLayoutConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.SectionBased != null && { - SectionBased: se_DefaultSectionBasedLayoutConfiguration(input.SectionBased, context), - }), - }; +const se_NumericRangeFilterValue = (input: NumericRangeFilterValue, context: __SerdeContext): any => { + return take(input, { + Parameter: [], + StaticValue: __serializeFloat, + }); }; +// se_NumericSeparatorConfiguration omitted. + +// se_OracleParameters omitted. + +// se_PaginationConfiguration omitted. + +// se_PanelConfiguration omitted. + +// se_PanelTitleOptions omitted. + /** - * serializeAws_restJson1DefaultSectionBasedLayoutConfiguration + * serializeAws_restJson1ParameterControl */ -const se_DefaultSectionBasedLayoutConfiguration = ( - input: DefaultSectionBasedLayoutConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CanvasSizeOptions != null && { - CanvasSizeOptions: se_SectionBasedLayoutCanvasSizeOptions(input.CanvasSizeOptions, context), - }), - }; +const se_ParameterControl = (input: ParameterControl, context: __SerdeContext): any => { + return take(input, { + DateTimePicker: _json, + Dropdown: _json, + List: _json, + Slider: (_) => se_ParameterSliderControl(_, context), + TextArea: _json, + TextField: _json, + }); }; /** - * serializeAws_restJson1DestinationParameterValueConfiguration + * serializeAws_restJson1ParameterControlList */ -const se_DestinationParameterValueConfiguration = ( - input: DestinationParameterValueConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomValuesConfiguration != null && { - CustomValuesConfiguration: se_CustomValuesConfiguration(input.CustomValuesConfiguration, context), - }), - ...(input.SelectAllValueOptions != null && { SelectAllValueOptions: input.SelectAllValueOptions }), - ...(input.SourceField != null && { SourceField: input.SourceField }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - }; +const se_ParameterControlList = (input: ParameterControl[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_ParameterControl(entry, context); + }); }; +// se_ParameterDateTimePickerControl omitted. + /** - * serializeAws_restJson1DimensionField + * serializeAws_restJson1ParameterDeclaration */ -const se_DimensionField = (input: DimensionField, context: __SerdeContext): any => { - return { - ...(input.CategoricalDimensionField != null && { - CategoricalDimensionField: se_CategoricalDimensionField(input.CategoricalDimensionField, context), - }), - ...(input.DateDimensionField != null && { - DateDimensionField: se_DateDimensionField(input.DateDimensionField, context), - }), - ...(input.NumericalDimensionField != null && { - NumericalDimensionField: se_NumericalDimensionField(input.NumericalDimensionField, context), - }), - }; +const se_ParameterDeclaration = (input: ParameterDeclaration, context: __SerdeContext): any => { + return take(input, { + DateTimeParameterDeclaration: (_) => se_DateTimeParameterDeclaration(_, context), + DecimalParameterDeclaration: (_) => se_DecimalParameterDeclaration(_, context), + IntegerParameterDeclaration: _json, + StringParameterDeclaration: _json, + }); }; /** - * serializeAws_restJson1DimensionFieldList + * serializeAws_restJson1ParameterDeclarationList */ -const se_DimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { +const se_ParameterDeclarationList = (input: ParameterDeclaration[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_DimensionField(entry, context); + return se_ParameterDeclaration(entry, context); }); }; +// se_ParameterDropDownControl omitted. + +// se_ParameterListControl omitted. + /** - * serializeAws_restJson1DonutCenterOptions + * serializeAws_restJson1_Parameters */ -const se_DonutCenterOptions = (input: DonutCenterOptions, context: __SerdeContext): any => { - return { - ...(input.LabelVisibility != null && { LabelVisibility: input.LabelVisibility }), - }; +const se__Parameters = (input: _Parameters, context: __SerdeContext): any => { + return take(input, { + DateTimeParameters: (_) => se_DateTimeParameterList(_, context), + DecimalParameters: (_) => se_DecimalParameterList(_, context), + IntegerParameters: _json, + StringParameters: _json, + }); }; +// se_ParameterSelectableValueList omitted. + +// se_ParameterSelectableValues omitted. + /** - * serializeAws_restJson1DonutOptions + * serializeAws_restJson1ParameterSliderControl */ -const se_DonutOptions = (input: DonutOptions, context: __SerdeContext): any => { - return { - ...(input.ArcOptions != null && { ArcOptions: se_ArcOptions(input.ArcOptions, context) }), - ...(input.DonutCenterOptions != null && { - DonutCenterOptions: se_DonutCenterOptions(input.DonutCenterOptions, context), - }), - }; +const se_ParameterSliderControl = (input: ParameterSliderControl, context: __SerdeContext): any => { + return take(input, { + DisplayOptions: _json, + MaximumValue: __serializeFloat, + MinimumValue: __serializeFloat, + ParameterControlId: [], + SourceParameterName: [], + StepSize: __serializeFloat, + Title: [], + }); }; +// se_ParameterTextAreaControl omitted. + +// se_ParameterTextFieldControl omitted. + +// se_PercentageDisplayFormatConfiguration omitted. + /** - * serializeAws_restJson1DrillDownFilter + * serializeAws_restJson1PercentileAggregation */ -const se_DrillDownFilter = (input: DrillDownFilter, context: __SerdeContext): any => { - return { - ...(input.CategoryFilter != null && { CategoryFilter: se_CategoryDrillDownFilter(input.CategoryFilter, context) }), - ...(input.NumericEqualityFilter != null && { - NumericEqualityFilter: se_NumericEqualityDrillDownFilter(input.NumericEqualityFilter, context), - }), - ...(input.TimeRangeFilter != null && { - TimeRangeFilter: se_TimeRangeDrillDownFilter(input.TimeRangeFilter, context), - }), - }; +const se_PercentileAggregation = (input: PercentileAggregation, context: __SerdeContext): any => { + return take(input, { + PercentileValue: __serializeFloat, + }); }; /** - * serializeAws_restJson1DrillDownFilterList + * serializeAws_restJson1PercentVisibleRange */ -const se_DrillDownFilterList = (input: DrillDownFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DrillDownFilter(entry, context); - }); +const se_PercentVisibleRange = (input: PercentVisibleRange, context: __SerdeContext): any => { + return take(input, { + From: __serializeFloat, + To: __serializeFloat, + }); }; /** - * serializeAws_restJson1DropDownControlDisplayOptions + * serializeAws_restJson1PeriodOverPeriodComputation */ -const se_DropDownControlDisplayOptions = (input: DropDownControlDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.SelectAllOptions != null && { - SelectAllOptions: se_ListControlSelectAllOptions(input.SelectAllOptions, context), - }), - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; +const se_PeriodOverPeriodComputation = (input: PeriodOverPeriodComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + Name: [], + Time: _json, + Value: (_) => se_MeasureField(_, context), + }); }; /** - * serializeAws_restJson1DynamicDefaultValue + * serializeAws_restJson1PeriodToDateComputation */ -const se_DynamicDefaultValue = (input: DynamicDefaultValue, context: __SerdeContext): any => { - return { - ...(input.DefaultValueColumn != null && { - DefaultValueColumn: se_ColumnIdentifier(input.DefaultValueColumn, context), - }), - ...(input.GroupNameColumn != null && { GroupNameColumn: se_ColumnIdentifier(input.GroupNameColumn, context) }), - ...(input.UserNameColumn != null && { UserNameColumn: se_ColumnIdentifier(input.UserNameColumn, context) }), - }; +const se_PeriodToDateComputation = (input: PeriodToDateComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + Name: [], + PeriodTimeGranularity: [], + Time: _json, + Value: (_) => se_MeasureField(_, context), + }); }; +// se_PhysicalTable omitted. + +// se_PhysicalTableMap omitted. + /** - * serializeAws_restJson1EmptyVisual + * serializeAws_restJson1PieChartAggregatedFieldWells */ -const se_EmptyVisual = (input: EmptyVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.DataSetIdentifier != null && { DataSetIdentifier: input.DataSetIdentifier }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; +const se_PieChartAggregatedFieldWells = (input: PieChartAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Category: _json, + SmallMultiples: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1ExasolParameters + * serializeAws_restJson1PieChartConfiguration */ -const se_ExasolParameters = (input: ExasolParameters, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; +const se_PieChartConfiguration = (input: PieChartConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryLabelOptions: _json, + ContributionAnalysisDefaults: _json, + DataLabels: _json, + DonutOptions: _json, + FieldWells: (_) => se_PieChartFieldWells(_, context), + Legend: _json, + SmallMultiplesOptions: _json, + SortConfiguration: (_) => se_PieChartSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + ValueLabelOptions: _json, + VisualPalette: _json, + }); }; /** - * serializeAws_restJson1ExcludePeriodConfiguration + * serializeAws_restJson1PieChartFieldWells */ -const se_ExcludePeriodConfiguration = (input: ExcludePeriodConfiguration, context: __SerdeContext): any => { - return { - ...(input.Amount != null && { Amount: input.Amount }), - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.Status != null && { Status: input.Status }), - }; +const se_PieChartFieldWells = (input: PieChartFieldWells, context: __SerdeContext): any => { + return take(input, { + PieChartAggregatedFieldWells: (_) => se_PieChartAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1ExplicitHierarchy + * serializeAws_restJson1PieChartSortConfiguration */ -const se_ExplicitHierarchy = (input: ExplicitHierarchy, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_ExplicitHierarchyColumnList(input.Columns, context) }), - ...(input.DrillDownFilters != null && { - DrillDownFilters: se_DrillDownFilterList(input.DrillDownFilters, context), - }), - ...(input.HierarchyId != null && { HierarchyId: input.HierarchyId }), - }; +const se_PieChartSortConfiguration = (input: PieChartSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + SmallMultiplesLimitConfiguration: _json, + SmallMultiplesSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1ExplicitHierarchyColumnList + * serializeAws_restJson1PieChartVisual */ -const se_ExplicitHierarchyColumnList = (input: ColumnIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnIdentifier(entry, context); - }); +const se_PieChartVisual = (input: PieChartVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_PieChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * serializeAws_restJson1ExportHiddenFieldsOption + * serializeAws_restJson1PivotFieldSortOptions */ -const se_ExportHiddenFieldsOption = (input: ExportHiddenFieldsOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; +const se_PivotFieldSortOptions = (input: PivotFieldSortOptions, context: __SerdeContext): any => { + return take(input, { + FieldId: [], + SortBy: (_) => se_PivotTableSortBy(_, context), + }); }; /** - * serializeAws_restJson1ExportToCSVOption + * serializeAws_restJson1PivotFieldSortOptionsList */ -const se_ExportToCSVOption = (input: ExportToCSVOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; +const se_PivotFieldSortOptionsList = (input: PivotFieldSortOptions[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_PivotFieldSortOptions(entry, context); + }); }; /** - * serializeAws_restJson1ExportWithHiddenFieldsOption + * serializeAws_restJson1PivotMeasureFieldList */ -const se_ExportWithHiddenFieldsOption = (input: ExportWithHiddenFieldsOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; +const se_PivotMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MeasureField(entry, context); + }); }; /** - * serializeAws_restJson1FieldBasedTooltip + * serializeAws_restJson1PivotTableAggregatedFieldWells */ -const se_FieldBasedTooltip = (input: FieldBasedTooltip, context: __SerdeContext): any => { - return { - ...(input.AggregationVisibility != null && { AggregationVisibility: input.AggregationVisibility }), - ...(input.TooltipFields != null && { TooltipFields: se_TooltipItemList(input.TooltipFields, context) }), - ...(input.TooltipTitleType != null && { TooltipTitleType: input.TooltipTitleType }), - }; +const se_PivotTableAggregatedFieldWells = (input: PivotTableAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Columns: _json, + Rows: _json, + Values: (_) => se_PivotMeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1FieldFolder + * serializeAws_restJson1PivotTableCellConditionalFormatting */ -const se_FieldFolder = (input: FieldFolder, context: __SerdeContext): any => { - return { - ...(input.columns != null && { columns: se_FolderColumnList(input.columns, context) }), - ...(input.description != null && { description: input.description }), - }; +const se_PivotTableCellConditionalFormatting = ( + input: PivotTableCellConditionalFormatting, + context: __SerdeContext +): any => { + return take(input, { + FieldId: [], + Scope: _json, + TextFormat: (_) => se_TextConditionalFormat(_, context), + }); }; /** - * serializeAws_restJson1FieldFolderMap + * serializeAws_restJson1PivotTableConditionalFormatting */ -const se_FieldFolderMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FieldFolder(value, context); - return acc; - }, {}); +const se_PivotTableConditionalFormatting = (input: PivotTableConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + ConditionalFormattingOptions: (_) => se_PivotTableConditionalFormattingOptionList(_, context), + }); }; /** - * serializeAws_restJson1FieldLabelType + * serializeAws_restJson1PivotTableConditionalFormattingOption */ -const se_FieldLabelType = (input: FieldLabelType, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_PivotTableConditionalFormattingOption = ( + input: PivotTableConditionalFormattingOption, + context: __SerdeContext +): any => { + return take(input, { + Cell: (_) => se_PivotTableCellConditionalFormatting(_, context), + }); }; /** - * serializeAws_restJson1FieldOrderList + * serializeAws_restJson1PivotTableConditionalFormattingOptionList */ -const se_FieldOrderList = (input: string[], context: __SerdeContext): any => { +const se_PivotTableConditionalFormattingOptionList = ( + input: PivotTableConditionalFormattingOption[], + context: __SerdeContext +): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_PivotTableConditionalFormattingOption(entry, context); }); }; -/** - * serializeAws_restJson1FieldSeriesItem - */ -const se_FieldSeriesItem = (input: FieldSeriesItem, context: __SerdeContext): any => { - return { - ...(input.AxisBinding != null && { AxisBinding: input.AxisBinding }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.Settings != null && { Settings: se_LineChartSeriesSettings(input.Settings, context) }), - }; -}; +// se_PivotTableConditionalFormattingScope omitted. /** - * serializeAws_restJson1FieldSort + * serializeAws_restJson1PivotTableConfiguration */ -const se_FieldSort = (input: FieldSort, context: __SerdeContext): any => { - return { - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - }; +const se_PivotTableConfiguration = (input: PivotTableConfiguration, context: __SerdeContext): any => { + return take(input, { + FieldOptions: _json, + FieldWells: (_) => se_PivotTableFieldWells(_, context), + PaginatedReportOptions: _json, + SortConfiguration: (_) => se_PivotTableSortConfiguration(_, context), + TableOptions: _json, + TotalOptions: _json, + }); }; -/** - * serializeAws_restJson1FieldSortOptions - */ -const se_FieldSortOptions = (input: FieldSortOptions, context: __SerdeContext): any => { - return { - ...(input.ColumnSort != null && { ColumnSort: se_ColumnSort(input.ColumnSort, context) }), - ...(input.FieldSort != null && { FieldSort: se_FieldSort(input.FieldSort, context) }), - }; -}; +// se_PivotTableDataPathOption omitted. + +// se_PivotTableDataPathOptionList omitted. + +// se_PivotTableDimensionList omitted. + +// se_PivotTableFieldOption omitted. + +// se_PivotTableFieldOptionList omitted. + +// se_PivotTableFieldOptions omitted. + +// se_PivotTableFieldSubtotalOptions omitted. + +// se_PivotTableFieldSubtotalOptionsList omitted. /** - * serializeAws_restJson1FieldSortOptionsList + * serializeAws_restJson1PivotTableFieldWells */ -const se_FieldSortOptionsList = (input: FieldSortOptions[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldSortOptions(entry, context); - }); +const se_PivotTableFieldWells = (input: PivotTableFieldWells, context: __SerdeContext): any => { + return take(input, { + PivotTableAggregatedFieldWells: (_) => se_PivotTableAggregatedFieldWells(_, context), + }); }; +// se_PivotTableOptions omitted. + +// se_PivotTablePaginatedReportOptions omitted. + /** - * serializeAws_restJson1FieldTooltipItem + * serializeAws_restJson1PivotTableSortBy */ -const se_FieldTooltipItem = (input: FieldTooltipItem, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.Label != null && { Label: input.Label }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_PivotTableSortBy = (input: PivotTableSortBy, context: __SerdeContext): any => { + return take(input, { + Column: (_) => se_ColumnSort(_, context), + DataPath: _json, + Field: _json, + }); }; /** - * serializeAws_restJson1FilledMapAggregatedFieldWells + * serializeAws_restJson1PivotTableSortConfiguration */ -const se_FilledMapAggregatedFieldWells = (input: FilledMapAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Geospatial != null && { Geospatial: se_FilledMapDimensionFieldList(input.Geospatial, context) }), - ...(input.Values != null && { Values: se_FilledMapMeasureFieldList(input.Values, context) }), - }; +const se_PivotTableSortConfiguration = (input: PivotTableSortConfiguration, context: __SerdeContext): any => { + return take(input, { + FieldSortOptions: (_) => se_PivotFieldSortOptionsList(_, context), + }); }; +// se_PivotTableTotalOptions omitted. + /** - * serializeAws_restJson1FilledMapConditionalFormatting + * serializeAws_restJson1PivotTableVisual */ -const se_FilledMapConditionalFormatting = (input: FilledMapConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.ConditionalFormattingOptions != null && { - ConditionalFormattingOptions: se_FilledMapConditionalFormattingOptionList( - input.ConditionalFormattingOptions, - context - ), - }), - }; +const se_PivotTableVisual = (input: PivotTableVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_PivotTableConfiguration(_, context), + ConditionalFormatting: (_) => se_PivotTableConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_PivotTotalOptions omitted. + +// se_PostgreSqlParameters omitted. + /** - * serializeAws_restJson1FilledMapConditionalFormattingOption + * serializeAws_restJson1PredefinedHierarchy */ -const se_FilledMapConditionalFormattingOption = ( - input: FilledMapConditionalFormattingOption, - context: __SerdeContext -): any => { - return { - ...(input.Shape != null && { Shape: se_FilledMapShapeConditionalFormatting(input.Shape, context) }), - }; +const se_PredefinedHierarchy = (input: PredefinedHierarchy, context: __SerdeContext): any => { + return take(input, { + Columns: _json, + DrillDownFilters: (_) => se_DrillDownFilterList(_, context), + HierarchyId: [], + }); }; +// se_PredefinedHierarchyColumnList omitted. + +// se_PrestoParameters omitted. + +// se_PrincipalList omitted. + +// se_ProgressBarOptions omitted. + +// se_ProjectedColumnList omitted. + +// se_ProjectOperation omitted. + /** - * serializeAws_restJson1FilledMapConditionalFormattingOptionList + * serializeAws_restJson1RadarChartAggregatedFieldWells */ -const se_FilledMapConditionalFormattingOptionList = ( - input: FilledMapConditionalFormattingOption[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilledMapConditionalFormattingOption(entry, context); - }); +const se_RadarChartAggregatedFieldWells = (input: RadarChartAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Category: _json, + Color: _json, + Values: (_) => se_RadarChartValuesFieldList(_, context), + }); }; +// se_RadarChartAreaStyleSettings omitted. + +// se_RadarChartCategoryFieldList omitted. + +// se_RadarChartColorFieldList omitted. + /** - * serializeAws_restJson1FilledMapConfiguration + * serializeAws_restJson1RadarChartConfiguration */ -const se_FilledMapConfiguration = (input: FilledMapConfiguration, context: __SerdeContext): any => { - return { - ...(input.FieldWells != null && { FieldWells: se_FilledMapFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.MapStyleOptions != null && { - MapStyleOptions: se_GeospatialMapStyleOptions(input.MapStyleOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_FilledMapSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.WindowOptions != null && { WindowOptions: se_GeospatialWindowOptions(input.WindowOptions, context) }), - }; +const se_RadarChartConfiguration = (input: RadarChartConfiguration, context: __SerdeContext): any => { + return take(input, { + AlternateBandColorsVisibility: [], + AlternateBandEvenColor: [], + AlternateBandOddColor: [], + BaseSeriesSettings: _json, + CategoryAxis: (_) => se_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + ColorAxis: (_) => se_AxisDisplayOptions(_, context), + ColorLabelOptions: _json, + FieldWells: (_) => se_RadarChartFieldWells(_, context), + Legend: _json, + Shape: [], + SortConfiguration: (_) => se_RadarChartSortConfiguration(_, context), + StartAngle: __serializeFloat, + VisualPalette: _json, + }); }; /** - * serializeAws_restJson1FilledMapDimensionFieldList + * serializeAws_restJson1RadarChartFieldWells */ -const se_FilledMapDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); +const se_RadarChartFieldWells = (input: RadarChartFieldWells, context: __SerdeContext): any => { + return take(input, { + RadarChartAggregatedFieldWells: (_) => se_RadarChartAggregatedFieldWells(_, context), + }); }; +// se_RadarChartSeriesSettings omitted. + /** - * serializeAws_restJson1FilledMapFieldWells + * serializeAws_restJson1RadarChartSortConfiguration */ -const se_FilledMapFieldWells = (input: FilledMapFieldWells, context: __SerdeContext): any => { - return { - ...(input.FilledMapAggregatedFieldWells != null && { - FilledMapAggregatedFieldWells: se_FilledMapAggregatedFieldWells(input.FilledMapAggregatedFieldWells, context), - }), - }; +const se_RadarChartSortConfiguration = (input: RadarChartSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + ColorItemsLimit: _json, + ColorSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1FilledMapMeasureFieldList + * serializeAws_restJson1RadarChartValuesFieldList */ -const se_FilledMapMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { +const se_RadarChartValuesFieldList = (input: MeasureField[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { @@ -19373,13714 +18700,4575 @@ const se_FilledMapMeasureFieldList = (input: MeasureField[], context: __SerdeCon }; /** - * serializeAws_restJson1FilledMapShapeConditionalFormatting + * serializeAws_restJson1RadarChartVisual */ -const se_FilledMapShapeConditionalFormatting = ( - input: FilledMapShapeConditionalFormatting, - context: __SerdeContext -): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.Format != null && { Format: se_ShapeConditionalFormat(input.Format, context) }), - }; +const se_RadarChartVisual = (input: RadarChartVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_RadarChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; -/** - * serializeAws_restJson1FilledMapSortConfiguration - */ -const se_FilledMapSortConfiguration = (input: FilledMapSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - }; -}; +// se_RangeEndsLabelType omitted. + +// se_RdsParameters omitted. + +// se_RedshiftParameters omitted. /** - * serializeAws_restJson1FilledMapVisual + * serializeAws_restJson1ReferenceLine */ -const se_FilledMapVisual = (input: FilledMapVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_FilledMapConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.ConditionalFormatting != null && { - ConditionalFormatting: se_FilledMapConditionalFormatting(input.ConditionalFormatting, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; +const se_ReferenceLine = (input: ReferenceLine, context: __SerdeContext): any => { + return take(input, { + DataConfiguration: (_) => se_ReferenceLineDataConfiguration(_, context), + LabelConfiguration: _json, + Status: [], + StyleConfiguration: _json, + }); }; +// se_ReferenceLineCustomLabelConfiguration omitted. + /** - * serializeAws_restJson1Filter + * serializeAws_restJson1ReferenceLineDataConfiguration */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.CategoryFilter != null && { CategoryFilter: se_CategoryFilter(input.CategoryFilter, context) }), - ...(input.NumericEqualityFilter != null && { - NumericEqualityFilter: se_NumericEqualityFilter(input.NumericEqualityFilter, context), - }), - ...(input.NumericRangeFilter != null && { - NumericRangeFilter: se_NumericRangeFilter(input.NumericRangeFilter, context), - }), - ...(input.RelativeDatesFilter != null && { - RelativeDatesFilter: se_RelativeDatesFilter(input.RelativeDatesFilter, context), - }), - ...(input.TimeEqualityFilter != null && { - TimeEqualityFilter: se_TimeEqualityFilter(input.TimeEqualityFilter, context), - }), - ...(input.TimeRangeFilter != null && { TimeRangeFilter: se_TimeRangeFilter(input.TimeRangeFilter, context) }), - ...(input.TopBottomFilter != null && { TopBottomFilter: se_TopBottomFilter(input.TopBottomFilter, context) }), - }; +const se_ReferenceLineDataConfiguration = (input: ReferenceLineDataConfiguration, context: __SerdeContext): any => { + return take(input, { + AxisBinding: [], + DynamicConfiguration: (_) => se_ReferenceLineDynamicDataConfiguration(_, context), + StaticConfiguration: (_) => se_ReferenceLineStaticDataConfiguration(_, context), + }); }; /** - * serializeAws_restJson1FilterControl + * serializeAws_restJson1ReferenceLineDynamicDataConfiguration */ -const se_FilterControl = (input: FilterControl, context: __SerdeContext): any => { - return { - ...(input.DateTimePicker != null && { - DateTimePicker: se_FilterDateTimePickerControl(input.DateTimePicker, context), - }), - ...(input.Dropdown != null && { Dropdown: se_FilterDropDownControl(input.Dropdown, context) }), - ...(input.List != null && { List: se_FilterListControl(input.List, context) }), - ...(input.RelativeDateTime != null && { - RelativeDateTime: se_FilterRelativeDateTimeControl(input.RelativeDateTime, context), - }), - ...(input.Slider != null && { Slider: se_FilterSliderControl(input.Slider, context) }), - ...(input.TextArea != null && { TextArea: se_FilterTextAreaControl(input.TextArea, context) }), - ...(input.TextField != null && { TextField: se_FilterTextFieldControl(input.TextField, context) }), - }; +const se_ReferenceLineDynamicDataConfiguration = ( + input: ReferenceLineDynamicDataConfiguration, + context: __SerdeContext +): any => { + return take(input, { + Calculation: (_) => se_NumericalAggregationFunction(_, context), + Column: _json, + MeasureAggregationFunction: (_) => se_AggregationFunction(_, context), + }); }; +// se_ReferenceLineLabelConfiguration omitted. + /** - * serializeAws_restJson1FilterControlList + * serializeAws_restJson1ReferenceLineList */ -const se_FilterControlList = (input: FilterControl[], context: __SerdeContext): any => { +const se_ReferenceLineList = (input: ReferenceLine[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_FilterControl(entry, context); + return se_ReferenceLine(entry, context); }); }; /** - * serializeAws_restJson1FilterDateTimePickerControl + * serializeAws_restJson1ReferenceLineStaticDataConfiguration */ -const se_FilterDateTimePickerControl = (input: FilterDateTimePickerControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_DateTimePickerControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; +const se_ReferenceLineStaticDataConfiguration = ( + input: ReferenceLineStaticDataConfiguration, + context: __SerdeContext +): any => { + return take(input, { + Value: __serializeFloat, + }); }; +// se_ReferenceLineStyleConfiguration omitted. + +// se_ReferenceLineValueLabelConfiguration omitted. + +// se_RefreshConfiguration omitted. + +// se_RefreshFrequency omitted. + /** - * serializeAws_restJson1FilterDropDownControl - */ -const se_FilterDropDownControl = (input: FilterDropDownControl, context: __SerdeContext): any => { - return { - ...(input.CascadingControlConfiguration != null && { - CascadingControlConfiguration: se_CascadingControlConfiguration(input.CascadingControlConfiguration, context), - }), - ...(input.DisplayOptions != null && { - DisplayOptions: se_DropDownControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.SelectableValues != null && { - SelectableValues: se_FilterSelectableValues(input.SelectableValues, context), - }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; + * serializeAws_restJson1RefreshSchedule + */ +const se_RefreshSchedule = (input: RefreshSchedule, context: __SerdeContext): any => { + return take(input, { + Arn: [], + RefreshType: [], + ScheduleFrequency: _json, + ScheduleId: [], + StartAfterDateTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_RegisteredUserConsoleFeatureConfigurations omitted. + +// se_RegisteredUserDashboardEmbeddingConfiguration omitted. + +// se_RegisteredUserDashboardFeatureConfigurations omitted. + +// se_RegisteredUserDashboardVisualEmbeddingConfiguration omitted. + +// se_RegisteredUserEmbeddingExperienceConfiguration omitted. + +// se_RegisteredUserQSearchBarEmbeddingConfiguration omitted. + +// se_RegisteredUserQuickSightConsoleEmbeddingConfiguration omitted. + +// se_RelationalTable omitted. + +// se_RelativeDatesFilter omitted. + +// se_RelativeDateTimeControlDisplayOptions omitted. + +// se_RenameColumnOperation omitted. + +// se_ResourcePermission omitted. + +// se_ResourcePermissionList omitted. + +// se_RollingDateConfiguration omitted. + +// se_RowAlternateColorList omitted. + +// se_RowAlternateColorOptions omitted. + +// se_RowLevelPermissionDataSet omitted. + +// se_RowLevelPermissionTagConfiguration omitted. + +// se_RowLevelPermissionTagRule omitted. + +// se_RowLevelPermissionTagRuleConfiguration omitted. + +// se_RowLevelPermissionTagRuleConfigurationList omitted. + +// se_RowLevelPermissionTagRuleList omitted. + /** - * serializeAws_restJson1FilteredVisualsList + * serializeAws_restJson1RowSortList */ -const se_FilteredVisualsList = (input: string[], context: __SerdeContext): any => { +const se_RowSortList = (input: FieldSortOptions[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_FieldSortOptions(entry, context); }); }; +// se_S3Parameters omitted. + +// se_S3Source omitted. + +// se_SameSheetTargetVisualConfiguration omitted. + /** - * serializeAws_restJson1FilterGroup + * serializeAws_restJson1SankeyDiagramAggregatedFieldWells */ -const se_FilterGroup = (input: FilterGroup, context: __SerdeContext): any => { - return { - ...(input.CrossDataset != null && { CrossDataset: input.CrossDataset }), - ...(input.FilterGroupId != null && { FilterGroupId: input.FilterGroupId }), - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.ScopeConfiguration != null && { - ScopeConfiguration: se_FilterScopeConfiguration(input.ScopeConfiguration, context), - }), - ...(input.Status != null && { Status: input.Status }), - }; +const se_SankeyDiagramAggregatedFieldWells = ( + input: SankeyDiagramAggregatedFieldWells, + context: __SerdeContext +): any => { + return take(input, { + Destination: _json, + Source: _json, + Weight: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1FilterGroupList + * serializeAws_restJson1SankeyDiagramChartConfiguration */ -const se_FilterGroupList = (input: FilterGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterGroup(entry, context); - }); +const se_SankeyDiagramChartConfiguration = (input: SankeyDiagramChartConfiguration, context: __SerdeContext): any => { + return take(input, { + DataLabels: _json, + FieldWells: (_) => se_SankeyDiagramFieldWells(_, context), + SortConfiguration: (_) => se_SankeyDiagramSortConfiguration(_, context), + }); }; /** - * serializeAws_restJson1FilterList + * serializeAws_restJson1SankeyDiagramFieldWells */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); +const se_SankeyDiagramFieldWells = (input: SankeyDiagramFieldWells, context: __SerdeContext): any => { + return take(input, { + SankeyDiagramAggregatedFieldWells: (_) => se_SankeyDiagramAggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1FilterListConfiguration + * serializeAws_restJson1SankeyDiagramSortConfiguration */ -const se_FilterListConfiguration = (input: FilterListConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryValues != null && { CategoryValues: se_CategoryValueList(input.CategoryValues, context) }), - ...(input.MatchOperator != null && { MatchOperator: input.MatchOperator }), - ...(input.SelectAllOptions != null && { SelectAllOptions: input.SelectAllOptions }), - }; -}; - -/** - * serializeAws_restJson1FilterListControl - */ -const se_FilterListControl = (input: FilterListControl, context: __SerdeContext): any => { - return { - ...(input.CascadingControlConfiguration != null && { - CascadingControlConfiguration: se_CascadingControlConfiguration(input.CascadingControlConfiguration, context), - }), - ...(input.DisplayOptions != null && { - DisplayOptions: se_ListControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.SelectableValues != null && { - SelectableValues: se_FilterSelectableValues(input.SelectableValues, context), - }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; +const se_SankeyDiagramSortConfiguration = (input: SankeyDiagramSortConfiguration, context: __SerdeContext): any => { + return take(input, { + DestinationItemsLimit: _json, + SourceItemsLimit: _json, + WeightSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * serializeAws_restJson1FilterOperation + * serializeAws_restJson1SankeyDiagramVisual */ -const se_FilterOperation = (input: FilterOperation, context: __SerdeContext): any => { - return { - ...(input.ConditionExpression != null && { ConditionExpression: input.ConditionExpression }), - }; +const se_SankeyDiagramVisual = (input: SankeyDiagramVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_SankeyDiagramChartConfiguration(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * serializeAws_restJson1FilterOperationSelectedFieldsConfiguration + * serializeAws_restJson1ScatterPlotCategoricallyAggregatedFieldWells */ -const se_FilterOperationSelectedFieldsConfiguration = ( - input: FilterOperationSelectedFieldsConfiguration, +const se_ScatterPlotCategoricallyAggregatedFieldWells = ( + input: ScatterPlotCategoricallyAggregatedFieldWells, context: __SerdeContext ): any => { - return { - ...(input.SelectedFieldOptions != null && { SelectedFieldOptions: input.SelectedFieldOptions }), - ...(input.SelectedFields != null && { SelectedFields: se_SelectedFieldList(input.SelectedFields, context) }), - }; + return take(input, { + Category: _json, + Size: (_) => se_MeasureFieldList(_, context), + XAxis: (_) => se_MeasureFieldList(_, context), + YAxis: (_) => se_MeasureFieldList(_, context), + }); }; /** - * serializeAws_restJson1FilterOperationTargetVisualsConfiguration + * serializeAws_restJson1ScatterPlotConfiguration */ -const se_FilterOperationTargetVisualsConfiguration = ( - input: FilterOperationTargetVisualsConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.SameSheetTargetVisualConfiguration != null && { - SameSheetTargetVisualConfiguration: se_SameSheetTargetVisualConfiguration( - input.SameSheetTargetVisualConfiguration, - context - ), - }), - }; +const se_ScatterPlotConfiguration = (input: ScatterPlotConfiguration, context: __SerdeContext): any => { + return take(input, { + DataLabels: _json, + FieldWells: (_) => se_ScatterPlotFieldWells(_, context), + Legend: _json, + Tooltip: (_) => se_TooltipOptions(_, context), + VisualPalette: _json, + XAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + XAxisLabelOptions: _json, + YAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + YAxisLabelOptions: _json, + }); }; /** - * serializeAws_restJson1FilterRelativeDateTimeControl + * serializeAws_restJson1ScatterPlotFieldWells */ -const se_FilterRelativeDateTimeControl = (input: FilterRelativeDateTimeControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_RelativeDateTimeControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.Title != null && { Title: input.Title }), - }; +const se_ScatterPlotFieldWells = (input: ScatterPlotFieldWells, context: __SerdeContext): any => { + return take(input, { + ScatterPlotCategoricallyAggregatedFieldWells: (_) => se_ScatterPlotCategoricallyAggregatedFieldWells(_, context), + ScatterPlotUnaggregatedFieldWells: (_) => se_ScatterPlotUnaggregatedFieldWells(_, context), + }); }; /** - * serializeAws_restJson1FilterScopeConfiguration + * serializeAws_restJson1ScatterPlotUnaggregatedFieldWells */ -const se_FilterScopeConfiguration = (input: FilterScopeConfiguration, context: __SerdeContext): any => { - return { - ...(input.SelectedSheets != null && { - SelectedSheets: se_SelectedSheetsFilterScopeConfiguration(input.SelectedSheets, context), - }), - }; +const se_ScatterPlotUnaggregatedFieldWells = ( + input: ScatterPlotUnaggregatedFieldWells, + context: __SerdeContext +): any => { + return take(input, { + Size: (_) => se_MeasureFieldList(_, context), + XAxis: _json, + YAxis: _json, + }); }; /** - * serializeAws_restJson1FilterSelectableValues + * serializeAws_restJson1ScatterPlotVisual */ -const se_FilterSelectableValues = (input: FilterSelectableValues, context: __SerdeContext): any => { - return { - ...(input.Values != null && { Values: se_ParameterSelectableValueList(input.Values, context) }), - }; +const se_ScatterPlotVisual = (input: ScatterPlotVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_ScatterPlotConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; -/** - * serializeAws_restJson1FilterSliderControl - */ -const se_FilterSliderControl = (input: FilterSliderControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_SliderControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.MaximumValue != null && { MaximumValue: __serializeFloat(input.MaximumValue) }), - ...(input.MinimumValue != null && { MinimumValue: __serializeFloat(input.MinimumValue) }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.StepSize != null && { StepSize: __serializeFloat(input.StepSize) }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ScheduleRefreshOnEntity omitted. /** - * serializeAws_restJson1FilterTextAreaControl + * serializeAws_restJson1ScrollBarOptions */ -const se_FilterTextAreaControl = (input: FilterTextAreaControl, context: __SerdeContext): any => { - return { - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.DisplayOptions != null && { - DisplayOptions: se_TextAreaControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.Title != null && { Title: input.Title }), - }; +const se_ScrollBarOptions = (input: ScrollBarOptions, context: __SerdeContext): any => { + return take(input, { + Visibility: [], + VisibleRange: (_) => se_VisibleRangeOptions(_, context), + }); }; +// se_SecondaryValueOptions omitted. + +// se_SectionAfterPageBreak omitted. + +// se_SectionBasedLayoutCanvasSizeOptions omitted. + /** - * serializeAws_restJson1FilterTextFieldControl + * serializeAws_restJson1SectionBasedLayoutConfiguration */ -const se_FilterTextFieldControl = (input: FilterTextFieldControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_TextFieldControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.FilterControlId != null && { FilterControlId: input.FilterControlId }), - ...(input.SourceFilterId != null && { SourceFilterId: input.SourceFilterId }), - ...(input.Title != null && { Title: input.Title }), - }; +const se_SectionBasedLayoutConfiguration = (input: SectionBasedLayoutConfiguration, context: __SerdeContext): any => { + return take(input, { + BodySections: _json, + CanvasSizeOptions: _json, + FooterSections: _json, + HeaderSections: _json, + }); }; +// se_SectionBasedLayoutPaperCanvasSizeOptions omitted. + +// se_SectionLayoutConfiguration omitted. + +// se_SectionPageBreakConfiguration omitted. + +// se_SectionStyle omitted. + +// se_SelectedFieldList omitted. + +// se_SelectedSheetsFilterScopeConfiguration omitted. + /** - * serializeAws_restJson1FolderColumnList + * serializeAws_restJson1SensitiveDoubleList */ -const se_FolderColumnList = (input: string[], context: __SerdeContext): any => { +const se_SensitiveDoubleList = (input: number[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return __serializeFloat(entry); }); }; -/** - * serializeAws_restJson1FolderSearchFilter - */ -const se_FolderSearchFilter = (input: FolderSearchFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_SensitiveLongList omitted. + +// se_SensitiveStringList omitted. /** - * serializeAws_restJson1FolderSearchFilterList + * serializeAws_restJson1SensitiveTimestampList */ -const se_FolderSearchFilterList = (input: FolderSearchFilter[], context: __SerdeContext): any => { +const se_SensitiveTimestampList = (input: Date[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_FolderSearchFilter(entry, context); + return Math.round(entry.getTime() / 1000); }); }; -/** - * serializeAws_restJson1Font - */ -const se_Font = (input: Font, context: __SerdeContext): any => { - return { - ...(input.FontFamily != null && { FontFamily: input.FontFamily }), - }; -}; +// se_SeriesItem omitted. + +// se_SeriesItemList omitted. + +// se_ServiceNowParameters omitted. + +// se_SessionTag omitted. + +// se_SessionTagList omitted. /** - * serializeAws_restJson1FontConfiguration + * serializeAws_restJson1SetParameterValueConfiguration */ -const se_FontConfiguration = (input: FontConfiguration, context: __SerdeContext): any => { - return { - ...(input.FontColor != null && { FontColor: input.FontColor }), - ...(input.FontDecoration != null && { FontDecoration: input.FontDecoration }), - ...(input.FontSize != null && { FontSize: se_FontSize(input.FontSize, context) }), - ...(input.FontStyle != null && { FontStyle: input.FontStyle }), - ...(input.FontWeight != null && { FontWeight: se_FontWeight(input.FontWeight, context) }), - }; +const se_SetParameterValueConfiguration = (input: SetParameterValueConfiguration, context: __SerdeContext): any => { + return take(input, { + DestinationParameterName: [], + Value: (_) => se_DestinationParameterValueConfiguration(_, context), + }); }; /** - * serializeAws_restJson1FontList + * serializeAws_restJson1SetParameterValueConfigurationList */ -const se_FontList = (input: Font[], context: __SerdeContext): any => { +const se_SetParameterValueConfigurationList = ( + input: SetParameterValueConfiguration[], + context: __SerdeContext +): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Font(entry, context); + return se_SetParameterValueConfiguration(entry, context); }); }; /** - * serializeAws_restJson1FontSize + * serializeAws_restJson1ShapeConditionalFormat */ -const se_FontSize = (input: FontSize, context: __SerdeContext): any => { - return { - ...(input.Relative != null && { Relative: input.Relative }), - }; +const se_ShapeConditionalFormat = (input: ShapeConditionalFormat, context: __SerdeContext): any => { + return take(input, { + BackgroundColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; -/** - * serializeAws_restJson1FontWeight - */ -const se_FontWeight = (input: FontWeight, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_SheetControlLayout omitted. -/** - * serializeAws_restJson1ForecastComputation - */ -const se_ForecastComputation = (input: ForecastComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.CustomSeasonalityValue != null && { CustomSeasonalityValue: input.CustomSeasonalityValue }), - ...(input.LowerBoundary != null && { LowerBoundary: __serializeFloat(input.LowerBoundary) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PeriodsBackward != null && { PeriodsBackward: input.PeriodsBackward }), - ...(input.PeriodsForward != null && { PeriodsForward: input.PeriodsForward }), - ...(input.PredictionInterval != null && { PredictionInterval: input.PredictionInterval }), - ...(input.Seasonality != null && { Seasonality: input.Seasonality }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - ...(input.UpperBoundary != null && { UpperBoundary: __serializeFloat(input.UpperBoundary) }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; +// se_SheetControlLayoutConfiguration omitted. + +// se_SheetControlLayoutList omitted. + +// se_SheetControlsOption omitted. /** - * serializeAws_restJson1ForecastConfiguration + * serializeAws_restJson1SheetDefinition */ -const se_ForecastConfiguration = (input: ForecastConfiguration, context: __SerdeContext): any => { - return { - ...(input.ForecastProperties != null && { - ForecastProperties: se_TimeBasedForecastProperties(input.ForecastProperties, context), - }), - ...(input.Scenario != null && { Scenario: se_ForecastScenario(input.Scenario, context) }), - }; +const se_SheetDefinition = (input: SheetDefinition, context: __SerdeContext): any => { + return take(input, { + ContentType: [], + Description: [], + FilterControls: (_) => se_FilterControlList(_, context), + Layouts: (_) => se_LayoutList(_, context), + Name: [], + ParameterControls: (_) => se_ParameterControlList(_, context), + SheetControlLayouts: _json, + SheetId: [], + TextBoxes: _json, + Title: [], + Visuals: (_) => se_VisualList(_, context), + }); }; /** - * serializeAws_restJson1ForecastConfigurationList + * serializeAws_restJson1SheetDefinitionList */ -const se_ForecastConfigurationList = (input: ForecastConfiguration[], context: __SerdeContext): any => { +const se_SheetDefinitionList = (input: SheetDefinition[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_ForecastConfiguration(entry, context); + return se_SheetDefinition(entry, context); }); }; -/** - * serializeAws_restJson1ForecastScenario - */ -const se_ForecastScenario = (input: ForecastScenario, context: __SerdeContext): any => { - return { - ...(input.WhatIfPointScenario != null && { - WhatIfPointScenario: se_WhatIfPointScenario(input.WhatIfPointScenario, context), - }), - ...(input.WhatIfRangeScenario != null && { - WhatIfRangeScenario: se_WhatIfRangeScenario(input.WhatIfRangeScenario, context), - }), - }; -}; +// se_SheetElementConfigurationOverrides omitted. -/** - * serializeAws_restJson1FormatConfiguration - */ -const se_FormatConfiguration = (input: FormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.DateTimeFormatConfiguration != null && { - DateTimeFormatConfiguration: se_DateTimeFormatConfiguration(input.DateTimeFormatConfiguration, context), - }), - ...(input.NumberFormatConfiguration != null && { - NumberFormatConfiguration: se_NumberFormatConfiguration(input.NumberFormatConfiguration, context), - }), - ...(input.StringFormatConfiguration != null && { - StringFormatConfiguration: se_StringFormatConfiguration(input.StringFormatConfiguration, context), - }), - }; -}; +// se_SheetElementRenderingRule omitted. -/** - * serializeAws_restJson1FreeFormLayoutCanvasSizeOptions - */ -const se_FreeFormLayoutCanvasSizeOptions = (input: FreeFormLayoutCanvasSizeOptions, context: __SerdeContext): any => { - return { - ...(input.ScreenCanvasSizeOptions != null && { - ScreenCanvasSizeOptions: se_FreeFormLayoutScreenCanvasSizeOptions(input.ScreenCanvasSizeOptions, context), - }), - }; -}; +// se_SheetElementRenderingRuleList omitted. + +// se_SheetLayoutElementMaximizationOption omitted. + +// se_SheetStyle omitted. + +// se_SheetTextBox omitted. + +// se_SheetTextBoxList omitted. + +// se_SheetVisualScopingConfiguration omitted. + +// se_SheetVisualScopingConfigurations omitted. + +// se_ShortFormatText omitted. + +// se_SimpleClusterMarker omitted. + +// se_SliderControlDisplayOptions omitted. + +// se_SmallMultiplesDimensionFieldList omitted. + +// se_SmallMultiplesOptions omitted. + +// se_SnowflakeParameters omitted. + +// se_Spacing omitted. + +// se_SparkParameters omitted. + +// se_SqlServerParameters omitted. + +// se_SslProperties omitted. + +// se_StatePersistenceConfigurations omitted. + +// se_StringDefaultValueList omitted. + +// se_StringDefaultValues omitted. + +// se_StringFormatConfiguration omitted. + +// se_StringList omitted. + +// se_StringParameter omitted. + +// se_StringParameterDeclaration omitted. + +// se_StringParameterList omitted. + +// se_StringValueWhenUnsetConfiguration omitted. + +// se_SubtotalOptions omitted. /** - * serializeAws_restJson1FreeFormLayoutConfiguration + * serializeAws_restJson1TableAggregatedFieldWells */ -const se_FreeFormLayoutConfiguration = (input: FreeFormLayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.CanvasSizeOptions != null && { - CanvasSizeOptions: se_FreeFormLayoutCanvasSizeOptions(input.CanvasSizeOptions, context), - }), - ...(input.Elements != null && { Elements: se_FreeFromLayoutElementList(input.Elements, context) }), - }; +const se_TableAggregatedFieldWells = (input: TableAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + GroupBy: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; -/** - * serializeAws_restJson1FreeFormLayoutElement - */ -const se_FreeFormLayoutElement = (input: FreeFormLayoutElement, context: __SerdeContext): any => { - return { - ...(input.BackgroundStyle != null && { - BackgroundStyle: se_FreeFormLayoutElementBackgroundStyle(input.BackgroundStyle, context), - }), - ...(input.BorderStyle != null && { BorderStyle: se_FreeFormLayoutElementBorderStyle(input.BorderStyle, context) }), - ...(input.ElementId != null && { ElementId: input.ElementId }), - ...(input.ElementType != null && { ElementType: input.ElementType }), - ...(input.Height != null && { Height: input.Height }), - ...(input.LoadingAnimation != null && { LoadingAnimation: se_LoadingAnimation(input.LoadingAnimation, context) }), - ...(input.RenderingRules != null && { - RenderingRules: se_SheetElementRenderingRuleList(input.RenderingRules, context), - }), - ...(input.SelectedBorderStyle != null && { - SelectedBorderStyle: se_FreeFormLayoutElementBorderStyle(input.SelectedBorderStyle, context), - }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - ...(input.Width != null && { Width: input.Width }), - ...(input.XAxisLocation != null && { XAxisLocation: input.XAxisLocation }), - ...(input.YAxisLocation != null && { YAxisLocation: input.YAxisLocation }), - }; -}; +// se_TableBorderOptions omitted. /** - * serializeAws_restJson1FreeFormLayoutElementBackgroundStyle + * serializeAws_restJson1TableCellConditionalFormatting */ -const se_FreeFormLayoutElementBackgroundStyle = ( - input: FreeFormLayoutElementBackgroundStyle, - context: __SerdeContext -): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_TableCellConditionalFormatting = (input: TableCellConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + FieldId: [], + TextFormat: (_) => se_TextConditionalFormat(_, context), + }); }; +// se_TableCellImageSizingConfiguration omitted. + +// se_TableCellStyle omitted. + /** - * serializeAws_restJson1FreeFormLayoutElementBorderStyle + * serializeAws_restJson1TableConditionalFormatting */ -const se_FreeFormLayoutElementBorderStyle = (input: FreeFormLayoutElementBorderStyle, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_TableConditionalFormatting = (input: TableConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + ConditionalFormattingOptions: (_) => se_TableConditionalFormattingOptionList(_, context), + }); }; /** - * serializeAws_restJson1FreeFormLayoutScreenCanvasSizeOptions + * serializeAws_restJson1TableConditionalFormattingOption */ -const se_FreeFormLayoutScreenCanvasSizeOptions = ( - input: FreeFormLayoutScreenCanvasSizeOptions, - context: __SerdeContext -): any => { - return { - ...(input.OptimizedViewPortWidth != null && { OptimizedViewPortWidth: input.OptimizedViewPortWidth }), - }; +const se_TableConditionalFormattingOption = (input: TableConditionalFormattingOption, context: __SerdeContext): any => { + return take(input, { + Cell: (_) => se_TableCellConditionalFormatting(_, context), + Row: (_) => se_TableRowConditionalFormatting(_, context), + }); }; /** - * serializeAws_restJson1FreeFormSectionLayoutConfiguration + * serializeAws_restJson1TableConditionalFormattingOptionList */ -const se_FreeFormSectionLayoutConfiguration = ( - input: FreeFormSectionLayoutConfiguration, +const se_TableConditionalFormattingOptionList = ( + input: TableConditionalFormattingOption[], context: __SerdeContext ): any => { - return { - ...(input.Elements != null && { Elements: se_FreeFromLayoutElementList(input.Elements, context) }), - }; -}; - -/** - * serializeAws_restJson1FreeFromLayoutElementList - */ -const se_FreeFromLayoutElementList = (input: FreeFormLayoutElement[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_FreeFormLayoutElement(entry, context); + return se_TableConditionalFormattingOption(entry, context); }); }; /** - * serializeAws_restJson1FunnelChartAggregatedFieldWells + * serializeAws_restJson1TableConfiguration */ -const se_FunnelChartAggregatedFieldWells = (input: FunnelChartAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_FunnelChartDimensionFieldList(input.Category, context) }), - ...(input.Values != null && { Values: se_FunnelChartMeasureFieldList(input.Values, context) }), - }; +const se_TableConfiguration = (input: TableConfiguration, context: __SerdeContext): any => { + return take(input, { + FieldOptions: _json, + FieldWells: (_) => se_TableFieldWells(_, context), + PaginatedReportOptions: _json, + SortConfiguration: (_) => se_TableSortConfiguration(_, context), + TableInlineVisualizations: _json, + TableOptions: _json, + TotalOptions: _json, + }); }; +// se_TableFieldCustomIconContent omitted. + +// se_TableFieldCustomTextContent omitted. + +// se_TableFieldImageConfiguration omitted. + +// se_TableFieldLinkConfiguration omitted. + +// se_TableFieldLinkContentConfiguration omitted. + +// se_TableFieldOption omitted. + +// se_TableFieldOptionList omitted. + +// se_TableFieldOptions omitted. + +// se_TableFieldURLConfiguration omitted. + /** - * serializeAws_restJson1FunnelChartConfiguration + * serializeAws_restJson1TableFieldWells */ -const se_FunnelChartConfiguration = (input: FunnelChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.DataLabelOptions != null && { - DataLabelOptions: se_FunnelChartDataLabelOptions(input.DataLabelOptions, context), - }), - ...(input.FieldWells != null && { FieldWells: se_FunnelChartFieldWells(input.FieldWells, context) }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_FunnelChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.ValueLabelOptions != null && { - ValueLabelOptions: se_ChartAxisLabelOptions(input.ValueLabelOptions, context), - }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; +const se_TableFieldWells = (input: TableFieldWells, context: __SerdeContext): any => { + return take(input, { + TableAggregatedFieldWells: (_) => se_TableAggregatedFieldWells(_, context), + TableUnaggregatedFieldWells: _json, + }); }; +// se_TableInlineVisualization omitted. + +// se_TableInlineVisualizationList omitted. + +// se_TableOptions omitted. + +// se_TablePaginatedReportOptions omitted. + /** - * serializeAws_restJson1FunnelChartDataLabelOptions + * serializeAws_restJson1TableRowConditionalFormatting */ -const se_FunnelChartDataLabelOptions = (input: FunnelChartDataLabelOptions, context: __SerdeContext): any => { - return { - ...(input.CategoryLabelVisibility != null && { CategoryLabelVisibility: input.CategoryLabelVisibility }), - ...(input.LabelColor != null && { LabelColor: input.LabelColor }), - ...(input.LabelFontConfiguration != null && { - LabelFontConfiguration: se_FontConfiguration(input.LabelFontConfiguration, context), - }), - ...(input.MeasureDataLabelStyle != null && { MeasureDataLabelStyle: input.MeasureDataLabelStyle }), - ...(input.MeasureLabelVisibility != null && { MeasureLabelVisibility: input.MeasureLabelVisibility }), - ...(input.Position != null && { Position: input.Position }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; +const se_TableRowConditionalFormatting = (input: TableRowConditionalFormatting, context: __SerdeContext): any => { + return take(input, { + BackgroundColor: (_) => se_ConditionalFormattingColor(_, context), + TextColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; +// se_TableSideBorderOptions omitted. + /** - * serializeAws_restJson1FunnelChartDimensionFieldList + * serializeAws_restJson1TableSortConfiguration */ -const se_FunnelChartDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); +const se_TableSortConfiguration = (input: TableSortConfiguration, context: __SerdeContext): any => { + return take(input, { + PaginationConfiguration: _json, + RowSort: (_) => se_RowSortList(_, context), + }); }; -/** - * serializeAws_restJson1FunnelChartFieldWells - */ -const se_FunnelChartFieldWells = (input: FunnelChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.FunnelChartAggregatedFieldWells != null && { - FunnelChartAggregatedFieldWells: se_FunnelChartAggregatedFieldWells( - input.FunnelChartAggregatedFieldWells, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1FunnelChartMeasureFieldList - */ -const se_FunnelChartMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1FunnelChartSortConfiguration - */ -const se_FunnelChartSortConfiguration = (input: FunnelChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimit != null && { - CategoryItemsLimit: se_ItemsLimitConfiguration(input.CategoryItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - }; -}; - -/** - * serializeAws_restJson1FunnelChartVisual - */ -const se_FunnelChartVisual = (input: FunnelChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_FunnelChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartArcConditionalFormatting - */ -const se_GaugeChartArcConditionalFormatting = ( - input: GaugeChartArcConditionalFormatting, - context: __SerdeContext -): any => { - return { - ...(input.ForegroundColor != null && { - ForegroundColor: se_ConditionalFormattingColor(input.ForegroundColor, context), - }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartConditionalFormatting - */ -const se_GaugeChartConditionalFormatting = (input: GaugeChartConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.ConditionalFormattingOptions != null && { - ConditionalFormattingOptions: se_GaugeChartConditionalFormattingOptionList( - input.ConditionalFormattingOptions, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartConditionalFormattingOption - */ -const se_GaugeChartConditionalFormattingOption = ( - input: GaugeChartConditionalFormattingOption, - context: __SerdeContext -): any => { - return { - ...(input.Arc != null && { Arc: se_GaugeChartArcConditionalFormatting(input.Arc, context) }), - ...(input.PrimaryValue != null && { - PrimaryValue: se_GaugeChartPrimaryValueConditionalFormatting(input.PrimaryValue, context), - }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartConditionalFormattingOptionList - */ -const se_GaugeChartConditionalFormattingOptionList = ( - input: GaugeChartConditionalFormattingOption[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GaugeChartConditionalFormattingOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1GaugeChartConfiguration - */ -const se_GaugeChartConfiguration = (input: GaugeChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_GaugeChartFieldWells(input.FieldWells, context) }), - ...(input.GaugeChartOptions != null && { - GaugeChartOptions: se_GaugeChartOptions(input.GaugeChartOptions, context), - }), - ...(input.TooltipOptions != null && { TooltipOptions: se_TooltipOptions(input.TooltipOptions, context) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartFieldWells - */ -const se_GaugeChartFieldWells = (input: GaugeChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.TargetValues != null && { TargetValues: se_MeasureFieldList(input.TargetValues, context) }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartOptions - */ -const se_GaugeChartOptions = (input: GaugeChartOptions, context: __SerdeContext): any => { - return { - ...(input.Arc != null && { Arc: se_ArcConfiguration(input.Arc, context) }), - ...(input.ArcAxis != null && { ArcAxis: se_ArcAxisConfiguration(input.ArcAxis, context) }), - ...(input.Comparison != null && { Comparison: se_ComparisonConfiguration(input.Comparison, context) }), - ...(input.PrimaryValueDisplayType != null && { PrimaryValueDisplayType: input.PrimaryValueDisplayType }), - ...(input.PrimaryValueFontConfiguration != null && { - PrimaryValueFontConfiguration: se_FontConfiguration(input.PrimaryValueFontConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartPrimaryValueConditionalFormatting - */ -const se_GaugeChartPrimaryValueConditionalFormatting = ( - input: GaugeChartPrimaryValueConditionalFormatting, - context: __SerdeContext -): any => { - return { - ...(input.Icon != null && { Icon: se_ConditionalFormattingIcon(input.Icon, context) }), - ...(input.TextColor != null && { TextColor: se_ConditionalFormattingColor(input.TextColor, context) }), - }; -}; - -/** - * serializeAws_restJson1GaugeChartVisual - */ -const se_GaugeChartVisual = (input: GaugeChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_GaugeChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ConditionalFormatting != null && { - ConditionalFormatting: se_GaugeChartConditionalFormatting(input.ConditionalFormatting, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; +// se_TableUnaggregatedFieldWells omitted. /** - * serializeAws_restJson1GeoSpatialColumnGroup + * serializeAws_restJson1TableVisual */ -const se_GeoSpatialColumnGroup = (input: GeoSpatialColumnGroup, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_ColumnList(input.Columns, context) }), - ...(input.CountryCode != null && { CountryCode: input.CountryCode }), - ...(input.Name != null && { Name: input.Name }), - }; +const se_TableVisual = (input: TableVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_TableConfiguration(_, context), + ConditionalFormatting: (_) => se_TableConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; -/** - * serializeAws_restJson1GeospatialCoordinateBounds - */ -const se_GeospatialCoordinateBounds = (input: GeospatialCoordinateBounds, context: __SerdeContext): any => { - return { - ...(input.East != null && { East: __serializeFloat(input.East) }), - ...(input.North != null && { North: __serializeFloat(input.North) }), - ...(input.South != null && { South: __serializeFloat(input.South) }), - ...(input.West != null && { West: __serializeFloat(input.West) }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1GeospatialMapAggregatedFieldWells - */ -const se_GeospatialMapAggregatedFieldWells = ( - input: GeospatialMapAggregatedFieldWells, - context: __SerdeContext -): any => { - return { - ...(input.Colors != null && { Colors: se_DimensionFieldList(input.Colors, context) }), - ...(input.Geospatial != null && { Geospatial: se_DimensionFieldList(input.Geospatial, context) }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; +// se_TagColumnOperation omitted. -/** - * serializeAws_restJson1GeospatialMapConfiguration - */ -const se_GeospatialMapConfiguration = (input: GeospatialMapConfiguration, context: __SerdeContext): any => { - return { - ...(input.FieldWells != null && { FieldWells: se_GeospatialMapFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.MapStyleOptions != null && { - MapStyleOptions: se_GeospatialMapStyleOptions(input.MapStyleOptions, context), - }), - ...(input.PointStyleOptions != null && { - PointStyleOptions: se_GeospatialPointStyleOptions(input.PointStyleOptions, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - ...(input.WindowOptions != null && { WindowOptions: se_GeospatialWindowOptions(input.WindowOptions, context) }), - }; -}; +// se_TagList omitted. -/** - * serializeAws_restJson1GeospatialMapFieldWells - */ -const se_GeospatialMapFieldWells = (input: GeospatialMapFieldWells, context: __SerdeContext): any => { - return { - ...(input.GeospatialMapAggregatedFieldWells != null && { - GeospatialMapAggregatedFieldWells: se_GeospatialMapAggregatedFieldWells( - input.GeospatialMapAggregatedFieldWells, - context - ), - }), - }; -}; +// se_TargetVisualList omitted. -/** - * serializeAws_restJson1GeospatialMapStyleOptions - */ -const se_GeospatialMapStyleOptions = (input: GeospatialMapStyleOptions, context: __SerdeContext): any => { - return { - ...(input.BaseMapStyle != null && { BaseMapStyle: input.BaseMapStyle }), - }; -}; +// se_TemplateSourceAnalysis omitted. -/** - * serializeAws_restJson1GeospatialMapVisual - */ -const se_GeospatialMapVisual = (input: GeospatialMapVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_GeospatialMapConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; +// se_TemplateSourceEntity omitted. -/** - * serializeAws_restJson1GeospatialPointStyleOptions - */ -const se_GeospatialPointStyleOptions = (input: GeospatialPointStyleOptions, context: __SerdeContext): any => { - return { - ...(input.ClusterMarkerConfiguration != null && { - ClusterMarkerConfiguration: se_ClusterMarkerConfiguration(input.ClusterMarkerConfiguration, context), - }), - ...(input.SelectedPointStyle != null && { SelectedPointStyle: input.SelectedPointStyle }), - }; -}; +// se_TemplateSourceTemplate omitted. /** - * serializeAws_restJson1GeospatialWindowOptions + * serializeAws_restJson1TemplateVersionDefinition */ -const se_GeospatialWindowOptions = (input: GeospatialWindowOptions, context: __SerdeContext): any => { - return { - ...(input.Bounds != null && { Bounds: se_GeospatialCoordinateBounds(input.Bounds, context) }), - ...(input.MapZoomMode != null && { MapZoomMode: input.MapZoomMode }), - }; +const se_TemplateVersionDefinition = (input: TemplateVersionDefinition, context: __SerdeContext): any => { + return take(input, { + AnalysisDefaults: _json, + CalculatedFields: _json, + ColumnConfigurations: _json, + DataSetConfigurations: _json, + FilterGroups: (_) => se_FilterGroupList(_, context), + ParameterDeclarations: (_) => se_ParameterDeclarationList(_, context), + Sheets: (_) => se_SheetDefinitionList(_, context), + }); }; -/** - * serializeAws_restJson1GlobalTableBorderOptions - */ -const se_GlobalTableBorderOptions = (input: GlobalTableBorderOptions, context: __SerdeContext): any => { - return { - ...(input.SideSpecificBorder != null && { - SideSpecificBorder: se_TableSideBorderOptions(input.SideSpecificBorder, context), - }), - ...(input.UniformBorder != null && { UniformBorder: se_TableBorderOptions(input.UniformBorder, context) }), - }; -}; +// se_TeradataParameters omitted. -/** - * serializeAws_restJson1GradientColor - */ -const se_GradientColor = (input: GradientColor, context: __SerdeContext): any => { - return { - ...(input.Stops != null && { Stops: se_GradientStopList(input.Stops, context) }), - }; -}; +// se_TextAreaControlDisplayOptions omitted. /** - * serializeAws_restJson1GradientStop + * serializeAws_restJson1TextConditionalFormat */ -const se_GradientStop = (input: GradientStop, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.DataValue != null && { DataValue: __serializeFloat(input.DataValue) }), - ...(input.GradientOffset != null && { GradientOffset: __serializeFloat(input.GradientOffset) }), - }; +const se_TextConditionalFormat = (input: TextConditionalFormat, context: __SerdeContext): any => { + return take(input, { + BackgroundColor: (_) => se_ConditionalFormattingColor(_, context), + Icon: _json, + TextColor: (_) => se_ConditionalFormattingColor(_, context), + }); }; -/** - * serializeAws_restJson1GradientStopList - */ -const se_GradientStopList = (input: GradientStop[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GradientStop(entry, context); - }); -}; +// se_TextControlPlaceholderOptions omitted. -/** - * serializeAws_restJson1GridLayoutCanvasSizeOptions - */ -const se_GridLayoutCanvasSizeOptions = (input: GridLayoutCanvasSizeOptions, context: __SerdeContext): any => { - return { - ...(input.ScreenCanvasSizeOptions != null && { - ScreenCanvasSizeOptions: se_GridLayoutScreenCanvasSizeOptions(input.ScreenCanvasSizeOptions, context), - }), - }; -}; +// se_TextFieldControlDisplayOptions omitted. -/** - * serializeAws_restJson1GridLayoutConfiguration - */ -const se_GridLayoutConfiguration = (input: GridLayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.CanvasSizeOptions != null && { - CanvasSizeOptions: se_GridLayoutCanvasSizeOptions(input.CanvasSizeOptions, context), - }), - ...(input.Elements != null && { Elements: se_GridLayoutElementList(input.Elements, context) }), - }; -}; +// se_ThemeConfiguration omitted. -/** - * serializeAws_restJson1GridLayoutElement - */ -const se_GridLayoutElement = (input: GridLayoutElement, context: __SerdeContext): any => { - return { - ...(input.ColumnIndex != null && { ColumnIndex: input.ColumnIndex }), - ...(input.ColumnSpan != null && { ColumnSpan: input.ColumnSpan }), - ...(input.ElementId != null && { ElementId: input.ElementId }), - ...(input.ElementType != null && { ElementType: input.ElementType }), - ...(input.RowIndex != null && { RowIndex: input.RowIndex }), - ...(input.RowSpan != null && { RowSpan: input.RowSpan }), - }; -}; +// se_ThousandSeparatorOptions omitted. -/** - * serializeAws_restJson1GridLayoutElementList - */ -const se_GridLayoutElementList = (input: GridLayoutElement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GridLayoutElement(entry, context); - }); -}; +// se_TileLayoutStyle omitted. -/** - * serializeAws_restJson1GridLayoutScreenCanvasSizeOptions - */ -const se_GridLayoutScreenCanvasSizeOptions = ( - input: GridLayoutScreenCanvasSizeOptions, - context: __SerdeContext -): any => { - return { - ...(input.OptimizedViewPortWidth != null && { OptimizedViewPortWidth: input.OptimizedViewPortWidth }), - ...(input.ResizeOption != null && { ResizeOption: input.ResizeOption }), - }; -}; +// se_TileStyle omitted. /** - * serializeAws_restJson1GroupSearchFilter + * serializeAws_restJson1TimeBasedForecastProperties */ -const se_GroupSearchFilter = (input: GroupSearchFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_TimeBasedForecastProperties = (input: TimeBasedForecastProperties, context: __SerdeContext): any => { + return take(input, { + LowerBoundary: __serializeFloat, + PeriodsBackward: [], + PeriodsForward: [], + PredictionInterval: [], + Seasonality: [], + UpperBoundary: __serializeFloat, + }); }; /** - * serializeAws_restJson1GroupSearchFilterList + * serializeAws_restJson1TimeEqualityFilter */ -const se_GroupSearchFilterList = (input: GroupSearchFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GroupSearchFilter(entry, context); - }); +const se_TimeEqualityFilter = (input: TimeEqualityFilter, context: __SerdeContext): any => { + return take(input, { + Column: _json, + FilterId: [], + ParameterName: [], + TimeGranularity: [], + Value: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * serializeAws_restJson1GroupsList + * serializeAws_restJson1TimeRangeDrillDownFilter */ -const se_GroupsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_TimeRangeDrillDownFilter = (input: TimeRangeDrillDownFilter, context: __SerdeContext): any => { + return take(input, { + Column: _json, + RangeMaximum: (_) => Math.round(_.getTime() / 1000), + RangeMinimum: (_) => Math.round(_.getTime() / 1000), + TimeGranularity: [], + }); }; /** - * serializeAws_restJson1GrowthRateComputation + * serializeAws_restJson1TimeRangeFilter */ -const se_GrowthRateComputation = (input: GrowthRateComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PeriodSize != null && { PeriodSize: input.PeriodSize }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; +const se_TimeRangeFilter = (input: TimeRangeFilter, context: __SerdeContext): any => { + return take(input, { + Column: _json, + ExcludePeriodConfiguration: _json, + FilterId: [], + IncludeMaximum: [], + IncludeMinimum: [], + NullOption: [], + RangeMaximumValue: (_) => se_TimeRangeFilterValue(_, context), + RangeMinimumValue: (_) => se_TimeRangeFilterValue(_, context), + TimeGranularity: [], + }); }; /** - * serializeAws_restJson1GutterStyle + * serializeAws_restJson1TimeRangeFilterValue */ -const se_GutterStyle = (input: GutterStyle, context: __SerdeContext): any => { - return { - ...(input.Show != null && { Show: input.Show }), - }; +const se_TimeRangeFilterValue = (input: TimeRangeFilterValue, context: __SerdeContext): any => { + return take(input, { + Parameter: [], + RollingDate: _json, + StaticValue: (_) => Math.round(_.getTime() / 1000), + }); }; /** - * serializeAws_restJson1HeaderFooterSectionConfiguration + * serializeAws_restJson1TooltipItem */ -const se_HeaderFooterSectionConfiguration = (input: HeaderFooterSectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.Layout != null && { Layout: se_SectionLayoutConfiguration(input.Layout, context) }), - ...(input.SectionId != null && { SectionId: input.SectionId }), - ...(input.Style != null && { Style: se_SectionStyle(input.Style, context) }), - }; +const se_TooltipItem = (input: TooltipItem, context: __SerdeContext): any => { + return take(input, { + ColumnTooltipItem: (_) => se_ColumnTooltipItem(_, context), + FieldTooltipItem: _json, + }); }; /** - * serializeAws_restJson1HeaderFooterSectionConfigurationList + * serializeAws_restJson1TooltipItemList */ -const se_HeaderFooterSectionConfigurationList = ( - input: HeaderFooterSectionConfiguration[], - context: __SerdeContext -): any => { +const se_TooltipItemList = (input: TooltipItem[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_HeaderFooterSectionConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1HeatMapAggregatedFieldWells - */ -const se_HeatMapAggregatedFieldWells = (input: HeatMapAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_HeatMapDimensionFieldList(input.Columns, context) }), - ...(input.Rows != null && { Rows: se_HeatMapDimensionFieldList(input.Rows, context) }), - ...(input.Values != null && { Values: se_HeatMapMeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1HeatMapConfiguration - */ -const se_HeatMapConfiguration = (input: HeatMapConfiguration, context: __SerdeContext): any => { - return { - ...(input.ColorScale != null && { ColorScale: se_ColorScale(input.ColorScale, context) }), - ...(input.ColumnLabelOptions != null && { - ColumnLabelOptions: se_ChartAxisLabelOptions(input.ColumnLabelOptions, context), - }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_HeatMapFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.RowLabelOptions != null && { RowLabelOptions: se_ChartAxisLabelOptions(input.RowLabelOptions, context) }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_HeatMapSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - }; -}; - -/** - * serializeAws_restJson1HeatMapDimensionFieldList - */ -const se_HeatMapDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1HeatMapFieldWells - */ -const se_HeatMapFieldWells = (input: HeatMapFieldWells, context: __SerdeContext): any => { - return { - ...(input.HeatMapAggregatedFieldWells != null && { - HeatMapAggregatedFieldWells: se_HeatMapAggregatedFieldWells(input.HeatMapAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1HeatMapMeasureFieldList - */ -const se_HeatMapMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1HeatMapSortConfiguration - */ -const se_HeatMapSortConfiguration = (input: HeatMapSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.HeatMapColumnItemsLimitConfiguration != null && { - HeatMapColumnItemsLimitConfiguration: se_ItemsLimitConfiguration( - input.HeatMapColumnItemsLimitConfiguration, - context - ), - }), - ...(input.HeatMapColumnSort != null && { - HeatMapColumnSort: se_FieldSortOptionsList(input.HeatMapColumnSort, context), - }), - ...(input.HeatMapRowItemsLimitConfiguration != null && { - HeatMapRowItemsLimitConfiguration: se_ItemsLimitConfiguration(input.HeatMapRowItemsLimitConfiguration, context), - }), - ...(input.HeatMapRowSort != null && { HeatMapRowSort: se_FieldSortOptionsList(input.HeatMapRowSort, context) }), - }; -}; - -/** - * serializeAws_restJson1HeatMapVisual - */ -const se_HeatMapVisual = (input: HeatMapVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_HeatMapConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1HistogramAggregatedFieldWells - */ -const se_HistogramAggregatedFieldWells = (input: HistogramAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Values != null && { Values: se_HistogramMeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1HistogramBinOptions - */ -const se_HistogramBinOptions = (input: HistogramBinOptions, context: __SerdeContext): any => { - return { - ...(input.BinCount != null && { BinCount: se_BinCountOptions(input.BinCount, context) }), - ...(input.BinWidth != null && { BinWidth: se_BinWidthOptions(input.BinWidth, context) }), - ...(input.SelectedBinType != null && { SelectedBinType: input.SelectedBinType }), - ...(input.StartValue != null && { StartValue: __serializeFloat(input.StartValue) }), - }; -}; - -/** - * serializeAws_restJson1HistogramConfiguration - */ -const se_HistogramConfiguration = (input: HistogramConfiguration, context: __SerdeContext): any => { - return { - ...(input.BinOptions != null && { BinOptions: se_HistogramBinOptions(input.BinOptions, context) }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_HistogramFieldWells(input.FieldWells, context) }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - ...(input.XAxisDisplayOptions != null && { - XAxisDisplayOptions: se_AxisDisplayOptions(input.XAxisDisplayOptions, context), - }), - ...(input.XAxisLabelOptions != null && { - XAxisLabelOptions: se_ChartAxisLabelOptions(input.XAxisLabelOptions, context), - }), - ...(input.YAxisDisplayOptions != null && { - YAxisDisplayOptions: se_AxisDisplayOptions(input.YAxisDisplayOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1HistogramFieldWells - */ -const se_HistogramFieldWells = (input: HistogramFieldWells, context: __SerdeContext): any => { - return { - ...(input.HistogramAggregatedFieldWells != null && { - HistogramAggregatedFieldWells: se_HistogramAggregatedFieldWells(input.HistogramAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1HistogramMeasureFieldList - */ -const se_HistogramMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1HistogramVisual - */ -const se_HistogramVisual = (input: HistogramVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_HistogramConfiguration(input.ChartConfiguration, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1IdentityMap - */ -const se_IdentityMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_IdentityNameList(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1IdentityNameList - */ -const se_IdentityNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1IncrementalRefresh - */ -const se_IncrementalRefresh = (input: IncrementalRefresh, context: __SerdeContext): any => { - return { - ...(input.LookbackWindow != null && { LookbackWindow: se_LookbackWindow(input.LookbackWindow, context) }), - }; -}; - -/** - * serializeAws_restJson1InputColumn - */ -const se_InputColumn = (input: InputColumn, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1InputColumnList - */ -const se_InputColumnList = (input: InputColumn[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InputColumn(entry, context); - }); -}; - -/** - * serializeAws_restJson1InsightConfiguration - */ -const se_InsightConfiguration = (input: InsightConfiguration, context: __SerdeContext): any => { - return { - ...(input.Computations != null && { Computations: se_ComputationList(input.Computations, context) }), - ...(input.CustomNarrative != null && { - CustomNarrative: se_CustomNarrativeOptions(input.CustomNarrative, context), - }), - }; -}; - -/** - * serializeAws_restJson1InsightVisual - */ -const se_InsightVisual = (input: InsightVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.DataSetIdentifier != null && { DataSetIdentifier: input.DataSetIdentifier }), - ...(input.InsightConfiguration != null && { - InsightConfiguration: se_InsightConfiguration(input.InsightConfiguration, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1IntegerDefaultValueList - */ -const se_IntegerDefaultValueList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1IntegerDefaultValues - */ -const se_IntegerDefaultValues = (input: IntegerDefaultValues, context: __SerdeContext): any => { - return { - ...(input.DynamicValue != null && { DynamicValue: se_DynamicDefaultValue(input.DynamicValue, context) }), - ...(input.StaticValues != null && { StaticValues: se_IntegerDefaultValueList(input.StaticValues, context) }), - }; -}; - -/** - * serializeAws_restJson1IntegerParameter - */ -const se_IntegerParameter = (input: IntegerParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_SensitiveLongList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1IntegerParameterDeclaration - */ -const se_IntegerParameterDeclaration = (input: IntegerParameterDeclaration, context: __SerdeContext): any => { - return { - ...(input.DefaultValues != null && { DefaultValues: se_IntegerDefaultValues(input.DefaultValues, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParameterValueType != null && { ParameterValueType: input.ParameterValueType }), - ...(input.ValueWhenUnset != null && { - ValueWhenUnset: se_IntegerValueWhenUnsetConfiguration(input.ValueWhenUnset, context), - }), - }; -}; - -/** - * serializeAws_restJson1IntegerParameterList - */ -const se_IntegerParameterList = (input: IntegerParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IntegerParameter(entry, context); - }); -}; - -/** - * serializeAws_restJson1IntegerValueWhenUnsetConfiguration - */ -const se_IntegerValueWhenUnsetConfiguration = ( - input: IntegerValueWhenUnsetConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomValue != null && { CustomValue: input.CustomValue }), - ...(input.ValueWhenUnsetOption != null && { ValueWhenUnsetOption: input.ValueWhenUnsetOption }), - }; -}; - -/** - * serializeAws_restJson1IpRestrictionRuleMap - */ -const se_IpRestrictionRuleMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1ItemsLimitConfiguration - */ -const se_ItemsLimitConfiguration = (input: ItemsLimitConfiguration, context: __SerdeContext): any => { - return { - ...(input.ItemsLimit != null && { ItemsLimit: input.ItemsLimit }), - ...(input.OtherCategories != null && { OtherCategories: input.OtherCategories }), - }; -}; - -/** - * serializeAws_restJson1JiraParameters - */ -const se_JiraParameters = (input: JiraParameters, context: __SerdeContext): any => { - return { - ...(input.SiteBaseUrl != null && { SiteBaseUrl: input.SiteBaseUrl }), - }; -}; - -/** - * serializeAws_restJson1JoinInstruction - */ -const se_JoinInstruction = (input: JoinInstruction, context: __SerdeContext): any => { - return { - ...(input.LeftJoinKeyProperties != null && { - LeftJoinKeyProperties: se_JoinKeyProperties(input.LeftJoinKeyProperties, context), - }), - ...(input.LeftOperand != null && { LeftOperand: input.LeftOperand }), - ...(input.OnClause != null && { OnClause: input.OnClause }), - ...(input.RightJoinKeyProperties != null && { - RightJoinKeyProperties: se_JoinKeyProperties(input.RightJoinKeyProperties, context), - }), - ...(input.RightOperand != null && { RightOperand: input.RightOperand }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1JoinKeyProperties - */ -const se_JoinKeyProperties = (input: JoinKeyProperties, context: __SerdeContext): any => { - return { - ...(input.UniqueKey != null && { UniqueKey: input.UniqueKey }), - }; -}; - -/** - * serializeAws_restJson1KPIConditionalFormatting - */ -const se_KPIConditionalFormatting = (input: KPIConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.ConditionalFormattingOptions != null && { - ConditionalFormattingOptions: se_KPIConditionalFormattingOptionList(input.ConditionalFormattingOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1KPIConditionalFormattingOption - */ -const se_KPIConditionalFormattingOption = (input: KPIConditionalFormattingOption, context: __SerdeContext): any => { - return { - ...(input.PrimaryValue != null && { - PrimaryValue: se_KPIPrimaryValueConditionalFormatting(input.PrimaryValue, context), - }), - ...(input.ProgressBar != null && { - ProgressBar: se_KPIProgressBarConditionalFormatting(input.ProgressBar, context), - }), - }; -}; - -/** - * serializeAws_restJson1KPIConditionalFormattingOptionList - */ -const se_KPIConditionalFormattingOptionList = ( - input: KPIConditionalFormattingOption[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KPIConditionalFormattingOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1KPIConfiguration - */ -const se_KPIConfiguration = (input: KPIConfiguration, context: __SerdeContext): any => { - return { - ...(input.FieldWells != null && { FieldWells: se_KPIFieldWells(input.FieldWells, context) }), - ...(input.KPIOptions != null && { KPIOptions: se_KPIOptions(input.KPIOptions, context) }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_KPISortConfiguration(input.SortConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1KPIFieldWells - */ -const se_KPIFieldWells = (input: KPIFieldWells, context: __SerdeContext): any => { - return { - ...(input.TargetValues != null && { TargetValues: se_MeasureFieldList(input.TargetValues, context) }), - ...(input.TrendGroups != null && { TrendGroups: se_DimensionFieldList(input.TrendGroups, context) }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1KPIOptions - */ -const se_KPIOptions = (input: KPIOptions, context: __SerdeContext): any => { - return { - ...(input.Comparison != null && { Comparison: se_ComparisonConfiguration(input.Comparison, context) }), - ...(input.PrimaryValueDisplayType != null && { PrimaryValueDisplayType: input.PrimaryValueDisplayType }), - ...(input.PrimaryValueFontConfiguration != null && { - PrimaryValueFontConfiguration: se_FontConfiguration(input.PrimaryValueFontConfiguration, context), - }), - ...(input.ProgressBar != null && { ProgressBar: se_ProgressBarOptions(input.ProgressBar, context) }), - ...(input.SecondaryValue != null && { SecondaryValue: se_SecondaryValueOptions(input.SecondaryValue, context) }), - ...(input.SecondaryValueFontConfiguration != null && { - SecondaryValueFontConfiguration: se_FontConfiguration(input.SecondaryValueFontConfiguration, context), - }), - ...(input.TrendArrows != null && { TrendArrows: se_TrendArrowOptions(input.TrendArrows, context) }), - }; -}; - -/** - * serializeAws_restJson1KPIPrimaryValueConditionalFormatting - */ -const se_KPIPrimaryValueConditionalFormatting = ( - input: KPIPrimaryValueConditionalFormatting, - context: __SerdeContext -): any => { - return { - ...(input.Icon != null && { Icon: se_ConditionalFormattingIcon(input.Icon, context) }), - ...(input.TextColor != null && { TextColor: se_ConditionalFormattingColor(input.TextColor, context) }), - }; -}; - -/** - * serializeAws_restJson1KPIProgressBarConditionalFormatting - */ -const se_KPIProgressBarConditionalFormatting = ( - input: KPIProgressBarConditionalFormatting, - context: __SerdeContext -): any => { - return { - ...(input.ForegroundColor != null && { - ForegroundColor: se_ConditionalFormattingColor(input.ForegroundColor, context), - }), - }; -}; - -/** - * serializeAws_restJson1KPISortConfiguration - */ -const se_KPISortConfiguration = (input: KPISortConfiguration, context: __SerdeContext): any => { - return { - ...(input.TrendGroupSort != null && { TrendGroupSort: se_FieldSortOptionsList(input.TrendGroupSort, context) }), - }; -}; - -/** - * serializeAws_restJson1KPIVisual - */ -const se_KPIVisual = (input: KPIVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_KPIConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.ConditionalFormatting != null && { - ConditionalFormatting: se_KPIConditionalFormatting(input.ConditionalFormatting, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1LabelOptions - */ -const se_LabelOptions = (input: LabelOptions, context: __SerdeContext): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.FontConfiguration != null && { - FontConfiguration: se_FontConfiguration(input.FontConfiguration, context), - }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1Layout - */ -const se_Layout = (input: Layout, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: se_LayoutConfiguration(input.Configuration, context) }), - }; -}; - -/** - * serializeAws_restJson1LayoutConfiguration - */ -const se_LayoutConfiguration = (input: LayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.FreeFormLayout != null && { - FreeFormLayout: se_FreeFormLayoutConfiguration(input.FreeFormLayout, context), - }), - ...(input.GridLayout != null && { GridLayout: se_GridLayoutConfiguration(input.GridLayout, context) }), - ...(input.SectionBasedLayout != null && { - SectionBasedLayout: se_SectionBasedLayoutConfiguration(input.SectionBasedLayout, context), - }), - }; -}; - -/** - * serializeAws_restJson1LayoutList - */ -const se_LayoutList = (input: Layout[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Layout(entry, context); - }); -}; - -/** - * serializeAws_restJson1LegendOptions - */ -const se_LegendOptions = (input: LegendOptions, context: __SerdeContext): any => { - return { - ...(input.Height != null && { Height: input.Height }), - ...(input.Position != null && { Position: input.Position }), - ...(input.Title != null && { Title: se_LabelOptions(input.Title, context) }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - ...(input.Width != null && { Width: input.Width }), - }; -}; - -/** - * serializeAws_restJson1LineChartAggregatedFieldWells - */ -const se_LineChartAggregatedFieldWells = (input: LineChartAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_DimensionFieldList(input.Category, context) }), - ...(input.Colors != null && { Colors: se_DimensionFieldList(input.Colors, context) }), - ...(input.SmallMultiples != null && { - SmallMultiples: se_SmallMultiplesDimensionFieldList(input.SmallMultiples, context), - }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1LineChartConfiguration - */ -const se_LineChartConfiguration = (input: LineChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.ContributionAnalysisDefaults != null && { - ContributionAnalysisDefaults: se_ContributionAnalysisDefaultList(input.ContributionAnalysisDefaults, context), - }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.DefaultSeriesSettings != null && { - DefaultSeriesSettings: se_LineChartDefaultSeriesSettings(input.DefaultSeriesSettings, context), - }), - ...(input.FieldWells != null && { FieldWells: se_LineChartFieldWells(input.FieldWells, context) }), - ...(input.ForecastConfigurations != null && { - ForecastConfigurations: se_ForecastConfigurationList(input.ForecastConfigurations, context), - }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.PrimaryYAxisDisplayOptions != null && { - PrimaryYAxisDisplayOptions: se_LineSeriesAxisDisplayOptions(input.PrimaryYAxisDisplayOptions, context), - }), - ...(input.PrimaryYAxisLabelOptions != null && { - PrimaryYAxisLabelOptions: se_ChartAxisLabelOptions(input.PrimaryYAxisLabelOptions, context), - }), - ...(input.ReferenceLines != null && { ReferenceLines: se_ReferenceLineList(input.ReferenceLines, context) }), - ...(input.SecondaryYAxisDisplayOptions != null && { - SecondaryYAxisDisplayOptions: se_LineSeriesAxisDisplayOptions(input.SecondaryYAxisDisplayOptions, context), - }), - ...(input.SecondaryYAxisLabelOptions != null && { - SecondaryYAxisLabelOptions: se_ChartAxisLabelOptions(input.SecondaryYAxisLabelOptions, context), - }), - ...(input.Series != null && { Series: se_SeriesItemList(input.Series, context) }), - ...(input.SmallMultiplesOptions != null && { - SmallMultiplesOptions: se_SmallMultiplesOptions(input.SmallMultiplesOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_LineChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - ...(input.XAxisDisplayOptions != null && { - XAxisDisplayOptions: se_AxisDisplayOptions(input.XAxisDisplayOptions, context), - }), - ...(input.XAxisLabelOptions != null && { - XAxisLabelOptions: se_ChartAxisLabelOptions(input.XAxisLabelOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1LineChartDefaultSeriesSettings - */ -const se_LineChartDefaultSeriesSettings = (input: LineChartDefaultSeriesSettings, context: __SerdeContext): any => { - return { - ...(input.AxisBinding != null && { AxisBinding: input.AxisBinding }), - ...(input.LineStyleSettings != null && { - LineStyleSettings: se_LineChartLineStyleSettings(input.LineStyleSettings, context), - }), - ...(input.MarkerStyleSettings != null && { - MarkerStyleSettings: se_LineChartMarkerStyleSettings(input.MarkerStyleSettings, context), - }), - }; -}; - -/** - * serializeAws_restJson1LineChartFieldWells - */ -const se_LineChartFieldWells = (input: LineChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.LineChartAggregatedFieldWells != null && { - LineChartAggregatedFieldWells: se_LineChartAggregatedFieldWells(input.LineChartAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1LineChartLineStyleSettings - */ -const se_LineChartLineStyleSettings = (input: LineChartLineStyleSettings, context: __SerdeContext): any => { - return { - ...(input.LineInterpolation != null && { LineInterpolation: input.LineInterpolation }), - ...(input.LineStyle != null && { LineStyle: input.LineStyle }), - ...(input.LineVisibility != null && { LineVisibility: input.LineVisibility }), - ...(input.LineWidth != null && { LineWidth: input.LineWidth }), - }; -}; - -/** - * serializeAws_restJson1LineChartMarkerStyleSettings - */ -const se_LineChartMarkerStyleSettings = (input: LineChartMarkerStyleSettings, context: __SerdeContext): any => { - return { - ...(input.MarkerColor != null && { MarkerColor: input.MarkerColor }), - ...(input.MarkerShape != null && { MarkerShape: input.MarkerShape }), - ...(input.MarkerSize != null && { MarkerSize: input.MarkerSize }), - ...(input.MarkerVisibility != null && { MarkerVisibility: input.MarkerVisibility }), - }; -}; - -/** - * serializeAws_restJson1LineChartSeriesSettings - */ -const se_LineChartSeriesSettings = (input: LineChartSeriesSettings, context: __SerdeContext): any => { - return { - ...(input.LineStyleSettings != null && { - LineStyleSettings: se_LineChartLineStyleSettings(input.LineStyleSettings, context), - }), - ...(input.MarkerStyleSettings != null && { - MarkerStyleSettings: se_LineChartMarkerStyleSettings(input.MarkerStyleSettings, context), - }), - }; -}; - -/** - * serializeAws_restJson1LineChartSortConfiguration - */ -const se_LineChartSortConfiguration = (input: LineChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimitConfiguration != null && { - CategoryItemsLimitConfiguration: se_ItemsLimitConfiguration(input.CategoryItemsLimitConfiguration, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - ...(input.ColorItemsLimitConfiguration != null && { - ColorItemsLimitConfiguration: se_ItemsLimitConfiguration(input.ColorItemsLimitConfiguration, context), - }), - ...(input.SmallMultiplesLimitConfiguration != null && { - SmallMultiplesLimitConfiguration: se_ItemsLimitConfiguration(input.SmallMultiplesLimitConfiguration, context), - }), - ...(input.SmallMultiplesSort != null && { - SmallMultiplesSort: se_FieldSortOptionsList(input.SmallMultiplesSort, context), - }), - }; -}; - -/** - * serializeAws_restJson1LineChartVisual - */ -const se_LineChartVisual = (input: LineChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_LineChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1LineSeriesAxisDisplayOptions - */ -const se_LineSeriesAxisDisplayOptions = (input: LineSeriesAxisDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.AxisOptions != null && { AxisOptions: se_AxisDisplayOptions(input.AxisOptions, context) }), - ...(input.MissingDataConfigurations != null && { - MissingDataConfigurations: se_MissingDataConfigurationList(input.MissingDataConfigurations, context), - }), - }; -}; - -/** - * serializeAws_restJson1ListControlDisplayOptions - */ -const se_ListControlDisplayOptions = (input: ListControlDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.SearchOptions != null && { SearchOptions: se_ListControlSearchOptions(input.SearchOptions, context) }), - ...(input.SelectAllOptions != null && { - SelectAllOptions: se_ListControlSelectAllOptions(input.SelectAllOptions, context), - }), - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1ListControlSearchOptions - */ -const se_ListControlSearchOptions = (input: ListControlSearchOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1ListControlSelectAllOptions - */ -const se_ListControlSelectAllOptions = (input: ListControlSelectAllOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1LoadingAnimation - */ -const se_LoadingAnimation = (input: LoadingAnimation, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1LocalNavigationConfiguration - */ -const se_LocalNavigationConfiguration = (input: LocalNavigationConfiguration, context: __SerdeContext): any => { - return { - ...(input.TargetSheetId != null && { TargetSheetId: input.TargetSheetId }), - }; -}; - -/** - * serializeAws_restJson1LogicalTable - */ -const se_LogicalTable = (input: LogicalTable, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.DataTransforms != null && { DataTransforms: se_TransformOperationList(input.DataTransforms, context) }), - ...(input.Source != null && { Source: se_LogicalTableSource(input.Source, context) }), - }; -}; - -/** - * serializeAws_restJson1LogicalTableMap - */ -const se_LogicalTableMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_LogicalTable(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1LogicalTableSource - */ -const se_LogicalTableSource = (input: LogicalTableSource, context: __SerdeContext): any => { - return { - ...(input.DataSetArn != null && { DataSetArn: input.DataSetArn }), - ...(input.JoinInstruction != null && { JoinInstruction: se_JoinInstruction(input.JoinInstruction, context) }), - ...(input.PhysicalTableId != null && { PhysicalTableId: input.PhysicalTableId }), - }; -}; - -/** - * serializeAws_restJson1LongFormatText - */ -const se_LongFormatText = (input: LongFormatText, context: __SerdeContext): any => { - return { - ...(input.PlainText != null && { PlainText: input.PlainText }), - ...(input.RichText != null && { RichText: input.RichText }), - }; -}; - -/** - * serializeAws_restJson1LookbackWindow - */ -const se_LookbackWindow = (input: LookbackWindow, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.Size != null && { Size: input.Size }), - ...(input.SizeUnit != null && { SizeUnit: input.SizeUnit }), - }; -}; - -/** - * serializeAws_restJson1ManifestFileLocation - */ -const se_ManifestFileLocation = (input: ManifestFileLocation, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - }; -}; - -/** - * serializeAws_restJson1MarginStyle - */ -const se_MarginStyle = (input: MarginStyle, context: __SerdeContext): any => { - return { - ...(input.Show != null && { Show: input.Show }), - }; -}; - -/** - * serializeAws_restJson1MariaDbParameters - */ -const se_MariaDbParameters = (input: MariaDbParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1MaximumLabelType - */ -const se_MaximumLabelType = (input: MaximumLabelType, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1MaximumMinimumComputation - */ -const se_MaximumMinimumComputation = (input: MaximumMinimumComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1MeasureField - */ -const se_MeasureField = (input: MeasureField, context: __SerdeContext): any => { - return { - ...(input.CalculatedMeasureField != null && { - CalculatedMeasureField: se_CalculatedMeasureField(input.CalculatedMeasureField, context), - }), - ...(input.CategoricalMeasureField != null && { - CategoricalMeasureField: se_CategoricalMeasureField(input.CategoricalMeasureField, context), - }), - ...(input.DateMeasureField != null && { DateMeasureField: se_DateMeasureField(input.DateMeasureField, context) }), - ...(input.NumericalMeasureField != null && { - NumericalMeasureField: se_NumericalMeasureField(input.NumericalMeasureField, context), - }), - }; -}; - -/** - * serializeAws_restJson1MeasureFieldList - */ -const se_MeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1MetricComparisonComputation - */ -const se_MetricComparisonComputation = (input: MetricComparisonComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.FromValue != null && { FromValue: se_MeasureField(input.FromValue, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetValue != null && { TargetValue: se_MeasureField(input.TargetValue, context) }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - }; -}; - -/** - * serializeAws_restJson1MinimumLabelType - */ -const se_MinimumLabelType = (input: MinimumLabelType, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1MissingDataConfiguration - */ -const se_MissingDataConfiguration = (input: MissingDataConfiguration, context: __SerdeContext): any => { - return { - ...(input.TreatmentOption != null && { TreatmentOption: input.TreatmentOption }), - }; -}; - -/** - * serializeAws_restJson1MissingDataConfigurationList - */ -const se_MissingDataConfigurationList = (input: MissingDataConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MissingDataConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1MySqlParameters - */ -const se_MySqlParameters = (input: MySqlParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1NegativeValueConfiguration - */ -const se_NegativeValueConfiguration = (input: NegativeValueConfiguration, context: __SerdeContext): any => { - return { - ...(input.DisplayMode != null && { DisplayMode: input.DisplayMode }), - }; -}; - -/** - * serializeAws_restJson1NullValueFormatConfiguration - */ -const se_NullValueFormatConfiguration = (input: NullValueFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.NullString != null && { NullString: input.NullString }), - }; -}; - -/** - * serializeAws_restJson1NumberDisplayFormatConfiguration - */ -const se_NumberDisplayFormatConfiguration = (input: NumberDisplayFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.DecimalPlacesConfiguration != null && { - DecimalPlacesConfiguration: se_DecimalPlacesConfiguration(input.DecimalPlacesConfiguration, context), - }), - ...(input.NegativeValueConfiguration != null && { - NegativeValueConfiguration: se_NegativeValueConfiguration(input.NegativeValueConfiguration, context), - }), - ...(input.NullValueFormatConfiguration != null && { - NullValueFormatConfiguration: se_NullValueFormatConfiguration(input.NullValueFormatConfiguration, context), - }), - ...(input.NumberScale != null && { NumberScale: input.NumberScale }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SeparatorConfiguration != null && { - SeparatorConfiguration: se_NumericSeparatorConfiguration(input.SeparatorConfiguration, context), - }), - ...(input.Suffix != null && { Suffix: input.Suffix }), - }; -}; - -/** - * serializeAws_restJson1NumberFormatConfiguration - */ -const se_NumberFormatConfiguration = (input: NumberFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_NumericFormatConfiguration(input.FormatConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1NumericalAggregationFunction - */ -const se_NumericalAggregationFunction = (input: NumericalAggregationFunction, context: __SerdeContext): any => { - return { - ...(input.PercentileAggregation != null && { - PercentileAggregation: se_PercentileAggregation(input.PercentileAggregation, context), - }), - ...(input.SimpleNumericalAggregation != null && { SimpleNumericalAggregation: input.SimpleNumericalAggregation }), - }; -}; - -/** - * serializeAws_restJson1NumericalDimensionField - */ -const se_NumericalDimensionField = (input: NumericalDimensionField, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_NumberFormatConfiguration(input.FormatConfiguration, context), - }), - ...(input.HierarchyId != null && { HierarchyId: input.HierarchyId }), - }; -}; - -/** - * serializeAws_restJson1NumericalMeasureField - */ -const se_NumericalMeasureField = (input: NumericalMeasureField, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { - AggregationFunction: se_NumericalAggregationFunction(input.AggregationFunction, context), - }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_NumberFormatConfiguration(input.FormatConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1NumericAxisOptions - */ -const se_NumericAxisOptions = (input: NumericAxisOptions, context: __SerdeContext): any => { - return { - ...(input.Range != null && { Range: se_AxisDisplayRange(input.Range, context) }), - ...(input.Scale != null && { Scale: se_AxisScale(input.Scale, context) }), - }; -}; - -/** - * serializeAws_restJson1NumericEqualityDrillDownFilter - */ -const se_NumericEqualityDrillDownFilter = (input: NumericEqualityDrillDownFilter, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1NumericEqualityFilter - */ -const se_NumericEqualityFilter = (input: NumericEqualityFilter, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { - AggregationFunction: se_AggregationFunction(input.AggregationFunction, context), - }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - ...(input.MatchOperator != null && { MatchOperator: input.MatchOperator }), - ...(input.NullOption != null && { NullOption: input.NullOption }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.SelectAllOptions != null && { SelectAllOptions: input.SelectAllOptions }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1NumericFormatConfiguration - */ -const se_NumericFormatConfiguration = (input: NumericFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.CurrencyDisplayFormatConfiguration != null && { - CurrencyDisplayFormatConfiguration: se_CurrencyDisplayFormatConfiguration( - input.CurrencyDisplayFormatConfiguration, - context - ), - }), - ...(input.NumberDisplayFormatConfiguration != null && { - NumberDisplayFormatConfiguration: se_NumberDisplayFormatConfiguration( - input.NumberDisplayFormatConfiguration, - context - ), - }), - ...(input.PercentageDisplayFormatConfiguration != null && { - PercentageDisplayFormatConfiguration: se_PercentageDisplayFormatConfiguration( - input.PercentageDisplayFormatConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1NumericRangeFilter - */ -const se_NumericRangeFilter = (input: NumericRangeFilter, context: __SerdeContext): any => { - return { - ...(input.AggregationFunction != null && { - AggregationFunction: se_AggregationFunction(input.AggregationFunction, context), - }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - ...(input.IncludeMaximum != null && { IncludeMaximum: input.IncludeMaximum }), - ...(input.IncludeMinimum != null && { IncludeMinimum: input.IncludeMinimum }), - ...(input.NullOption != null && { NullOption: input.NullOption }), - ...(input.RangeMaximum != null && { RangeMaximum: se_NumericRangeFilterValue(input.RangeMaximum, context) }), - ...(input.RangeMinimum != null && { RangeMinimum: se_NumericRangeFilterValue(input.RangeMinimum, context) }), - ...(input.SelectAllOptions != null && { SelectAllOptions: input.SelectAllOptions }), - }; -}; - -/** - * serializeAws_restJson1NumericRangeFilterValue - */ -const se_NumericRangeFilterValue = (input: NumericRangeFilterValue, context: __SerdeContext): any => { - return { - ...(input.Parameter != null && { Parameter: input.Parameter }), - ...(input.StaticValue != null && { StaticValue: __serializeFloat(input.StaticValue) }), - }; -}; - -/** - * serializeAws_restJson1NumericSeparatorConfiguration - */ -const se_NumericSeparatorConfiguration = (input: NumericSeparatorConfiguration, context: __SerdeContext): any => { - return { - ...(input.DecimalSeparator != null && { DecimalSeparator: input.DecimalSeparator }), - ...(input.ThousandsSeparator != null && { - ThousandsSeparator: se_ThousandSeparatorOptions(input.ThousandsSeparator, context), - }), - }; -}; - -/** - * serializeAws_restJson1OracleParameters - */ -const se_OracleParameters = (input: OracleParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1PaginationConfiguration - */ -const se_PaginationConfiguration = (input: PaginationConfiguration, context: __SerdeContext): any => { - return { - ...(input.PageNumber != null && { PageNumber: input.PageNumber }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - }; -}; - -/** - * serializeAws_restJson1PanelConfiguration - */ -const se_PanelConfiguration = (input: PanelConfiguration, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { BackgroundColor: input.BackgroundColor }), - ...(input.BackgroundVisibility != null && { BackgroundVisibility: input.BackgroundVisibility }), - ...(input.BorderColor != null && { BorderColor: input.BorderColor }), - ...(input.BorderStyle != null && { BorderStyle: input.BorderStyle }), - ...(input.BorderThickness != null && { BorderThickness: input.BorderThickness }), - ...(input.BorderVisibility != null && { BorderVisibility: input.BorderVisibility }), - ...(input.GutterSpacing != null && { GutterSpacing: input.GutterSpacing }), - ...(input.GutterVisibility != null && { GutterVisibility: input.GutterVisibility }), - ...(input.Title != null && { Title: se_PanelTitleOptions(input.Title, context) }), - }; -}; - -/** - * serializeAws_restJson1PanelTitleOptions - */ -const se_PanelTitleOptions = (input: PanelTitleOptions, context: __SerdeContext): any => { - return { - ...(input.FontConfiguration != null && { - FontConfiguration: se_FontConfiguration(input.FontConfiguration, context), - }), - ...(input.HorizontalTextAlignment != null && { HorizontalTextAlignment: input.HorizontalTextAlignment }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1ParameterControl - */ -const se_ParameterControl = (input: ParameterControl, context: __SerdeContext): any => { - return { - ...(input.DateTimePicker != null && { - DateTimePicker: se_ParameterDateTimePickerControl(input.DateTimePicker, context), - }), - ...(input.Dropdown != null && { Dropdown: se_ParameterDropDownControl(input.Dropdown, context) }), - ...(input.List != null && { List: se_ParameterListControl(input.List, context) }), - ...(input.Slider != null && { Slider: se_ParameterSliderControl(input.Slider, context) }), - ...(input.TextArea != null && { TextArea: se_ParameterTextAreaControl(input.TextArea, context) }), - ...(input.TextField != null && { TextField: se_ParameterTextFieldControl(input.TextField, context) }), - }; -}; - -/** - * serializeAws_restJson1ParameterControlList - */ -const se_ParameterControlList = (input: ParameterControl[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterControl(entry, context); - }); -}; - -/** - * serializeAws_restJson1ParameterDateTimePickerControl - */ -const se_ParameterDateTimePickerControl = (input: ParameterDateTimePickerControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_DateTimePickerControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.ParameterControlId != null && { ParameterControlId: input.ParameterControlId }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - ...(input.Title != null && { Title: input.Title }), - }; -}; - -/** - * serializeAws_restJson1ParameterDeclaration - */ -const se_ParameterDeclaration = (input: ParameterDeclaration, context: __SerdeContext): any => { - return { - ...(input.DateTimeParameterDeclaration != null && { - DateTimeParameterDeclaration: se_DateTimeParameterDeclaration(input.DateTimeParameterDeclaration, context), - }), - ...(input.DecimalParameterDeclaration != null && { - DecimalParameterDeclaration: se_DecimalParameterDeclaration(input.DecimalParameterDeclaration, context), - }), - ...(input.IntegerParameterDeclaration != null && { - IntegerParameterDeclaration: se_IntegerParameterDeclaration(input.IntegerParameterDeclaration, context), - }), - ...(input.StringParameterDeclaration != null && { - StringParameterDeclaration: se_StringParameterDeclaration(input.StringParameterDeclaration, context), - }), - }; -}; - -/** - * serializeAws_restJson1ParameterDeclarationList - */ -const se_ParameterDeclarationList = (input: ParameterDeclaration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterDeclaration(entry, context); - }); -}; - -/** - * serializeAws_restJson1ParameterDropDownControl - */ -const se_ParameterDropDownControl = (input: ParameterDropDownControl, context: __SerdeContext): any => { - return { - ...(input.CascadingControlConfiguration != null && { - CascadingControlConfiguration: se_CascadingControlConfiguration(input.CascadingControlConfiguration, context), - }), - ...(input.DisplayOptions != null && { - DisplayOptions: se_DropDownControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.ParameterControlId != null && { ParameterControlId: input.ParameterControlId }), - ...(input.SelectableValues != null && { - SelectableValues: se_ParameterSelectableValues(input.SelectableValues, context), - }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1ParameterListControl - */ -const se_ParameterListControl = (input: ParameterListControl, context: __SerdeContext): any => { - return { - ...(input.CascadingControlConfiguration != null && { - CascadingControlConfiguration: se_CascadingControlConfiguration(input.CascadingControlConfiguration, context), - }), - ...(input.DisplayOptions != null && { - DisplayOptions: se_ListControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.ParameterControlId != null && { ParameterControlId: input.ParameterControlId }), - ...(input.SelectableValues != null && { - SelectableValues: se_ParameterSelectableValues(input.SelectableValues, context), - }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1_Parameters - */ -const se__Parameters = (input: _Parameters, context: __SerdeContext): any => { - return { - ...(input.DateTimeParameters != null && { - DateTimeParameters: se_DateTimeParameterList(input.DateTimeParameters, context), - }), - ...(input.DecimalParameters != null && { - DecimalParameters: se_DecimalParameterList(input.DecimalParameters, context), - }), - ...(input.IntegerParameters != null && { - IntegerParameters: se_IntegerParameterList(input.IntegerParameters, context), - }), - ...(input.StringParameters != null && { - StringParameters: se_StringParameterList(input.StringParameters, context), - }), - }; -}; - -/** - * serializeAws_restJson1ParameterSelectableValueList - */ -const se_ParameterSelectableValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ParameterSelectableValues - */ -const se_ParameterSelectableValues = (input: ParameterSelectableValues, context: __SerdeContext): any => { - return { - ...(input.LinkToDataSetColumn != null && { - LinkToDataSetColumn: se_ColumnIdentifier(input.LinkToDataSetColumn, context), - }), - ...(input.Values != null && { Values: se_ParameterSelectableValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1ParameterSliderControl - */ -const se_ParameterSliderControl = (input: ParameterSliderControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_SliderControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.MaximumValue != null && { MaximumValue: __serializeFloat(input.MaximumValue) }), - ...(input.MinimumValue != null && { MinimumValue: __serializeFloat(input.MinimumValue) }), - ...(input.ParameterControlId != null && { ParameterControlId: input.ParameterControlId }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - ...(input.StepSize != null && { StepSize: __serializeFloat(input.StepSize) }), - ...(input.Title != null && { Title: input.Title }), - }; -}; - -/** - * serializeAws_restJson1ParameterTextAreaControl - */ -const se_ParameterTextAreaControl = (input: ParameterTextAreaControl, context: __SerdeContext): any => { - return { - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.DisplayOptions != null && { - DisplayOptions: se_TextAreaControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.ParameterControlId != null && { ParameterControlId: input.ParameterControlId }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - ...(input.Title != null && { Title: input.Title }), - }; -}; - -/** - * serializeAws_restJson1ParameterTextFieldControl - */ -const se_ParameterTextFieldControl = (input: ParameterTextFieldControl, context: __SerdeContext): any => { - return { - ...(input.DisplayOptions != null && { - DisplayOptions: se_TextFieldControlDisplayOptions(input.DisplayOptions, context), - }), - ...(input.ParameterControlId != null && { ParameterControlId: input.ParameterControlId }), - ...(input.SourceParameterName != null && { SourceParameterName: input.SourceParameterName }), - ...(input.Title != null && { Title: input.Title }), - }; -}; - -/** - * serializeAws_restJson1PercentageDisplayFormatConfiguration - */ -const se_PercentageDisplayFormatConfiguration = ( - input: PercentageDisplayFormatConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.DecimalPlacesConfiguration != null && { - DecimalPlacesConfiguration: se_DecimalPlacesConfiguration(input.DecimalPlacesConfiguration, context), - }), - ...(input.NegativeValueConfiguration != null && { - NegativeValueConfiguration: se_NegativeValueConfiguration(input.NegativeValueConfiguration, context), - }), - ...(input.NullValueFormatConfiguration != null && { - NullValueFormatConfiguration: se_NullValueFormatConfiguration(input.NullValueFormatConfiguration, context), - }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.SeparatorConfiguration != null && { - SeparatorConfiguration: se_NumericSeparatorConfiguration(input.SeparatorConfiguration, context), - }), - ...(input.Suffix != null && { Suffix: input.Suffix }), - }; -}; - -/** - * serializeAws_restJson1PercentileAggregation - */ -const se_PercentileAggregation = (input: PercentileAggregation, context: __SerdeContext): any => { - return { - ...(input.PercentileValue != null && { PercentileValue: __serializeFloat(input.PercentileValue) }), - }; -}; - -/** - * serializeAws_restJson1PercentVisibleRange - */ -const se_PercentVisibleRange = (input: PercentVisibleRange, context: __SerdeContext): any => { - return { - ...(input.From != null && { From: __serializeFloat(input.From) }), - ...(input.To != null && { To: __serializeFloat(input.To) }), - }; -}; - -/** - * serializeAws_restJson1PeriodOverPeriodComputation - */ -const se_PeriodOverPeriodComputation = (input: PeriodOverPeriodComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1PeriodToDateComputation - */ -const se_PeriodToDateComputation = (input: PeriodToDateComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PeriodTimeGranularity != null && { PeriodTimeGranularity: input.PeriodTimeGranularity }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1PhysicalTable - */ -const se_PhysicalTable = (input: PhysicalTable, context: __SerdeContext): any => { - return PhysicalTable.visit(input, { - CustomSql: (value) => ({ CustomSql: se_CustomSql(value, context) }), - RelationalTable: (value) => ({ RelationalTable: se_RelationalTable(value, context) }), - S3Source: (value) => ({ S3Source: se_S3Source(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1PhysicalTableMap - */ -const se_PhysicalTableMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_PhysicalTable(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1PieChartAggregatedFieldWells - */ -const se_PieChartAggregatedFieldWells = (input: PieChartAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_DimensionFieldList(input.Category, context) }), - ...(input.SmallMultiples != null && { - SmallMultiples: se_SmallMultiplesDimensionFieldList(input.SmallMultiples, context), - }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1PieChartConfiguration - */ -const se_PieChartConfiguration = (input: PieChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.ContributionAnalysisDefaults != null && { - ContributionAnalysisDefaults: se_ContributionAnalysisDefaultList(input.ContributionAnalysisDefaults, context), - }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.DonutOptions != null && { DonutOptions: se_DonutOptions(input.DonutOptions, context) }), - ...(input.FieldWells != null && { FieldWells: se_PieChartFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.SmallMultiplesOptions != null && { - SmallMultiplesOptions: se_SmallMultiplesOptions(input.SmallMultiplesOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_PieChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.ValueLabelOptions != null && { - ValueLabelOptions: se_ChartAxisLabelOptions(input.ValueLabelOptions, context), - }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; -}; - -/** - * serializeAws_restJson1PieChartFieldWells - */ -const se_PieChartFieldWells = (input: PieChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.PieChartAggregatedFieldWells != null && { - PieChartAggregatedFieldWells: se_PieChartAggregatedFieldWells(input.PieChartAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1PieChartSortConfiguration - */ -const se_PieChartSortConfiguration = (input: PieChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimit != null && { - CategoryItemsLimit: se_ItemsLimitConfiguration(input.CategoryItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - ...(input.SmallMultiplesLimitConfiguration != null && { - SmallMultiplesLimitConfiguration: se_ItemsLimitConfiguration(input.SmallMultiplesLimitConfiguration, context), - }), - ...(input.SmallMultiplesSort != null && { - SmallMultiplesSort: se_FieldSortOptionsList(input.SmallMultiplesSort, context), - }), - }; -}; - -/** - * serializeAws_restJson1PieChartVisual - */ -const se_PieChartVisual = (input: PieChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_PieChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1PivotFieldSortOptions - */ -const se_PivotFieldSortOptions = (input: PivotFieldSortOptions, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.SortBy != null && { SortBy: se_PivotTableSortBy(input.SortBy, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotFieldSortOptionsList - */ -const se_PivotFieldSortOptionsList = (input: PivotFieldSortOptions[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PivotFieldSortOptions(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotMeasureFieldList - */ -const se_PivotMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotTableAggregatedFieldWells - */ -const se_PivotTableAggregatedFieldWells = (input: PivotTableAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_PivotTableDimensionList(input.Columns, context) }), - ...(input.Rows != null && { Rows: se_PivotTableDimensionList(input.Rows, context) }), - ...(input.Values != null && { Values: se_PivotMeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotTableCellConditionalFormatting - */ -const se_PivotTableCellConditionalFormatting = ( - input: PivotTableCellConditionalFormatting, - context: __SerdeContext -): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.Scope != null && { Scope: se_PivotTableConditionalFormattingScope(input.Scope, context) }), - ...(input.TextFormat != null && { TextFormat: se_TextConditionalFormat(input.TextFormat, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotTableConditionalFormatting - */ -const se_PivotTableConditionalFormatting = (input: PivotTableConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.ConditionalFormattingOptions != null && { - ConditionalFormattingOptions: se_PivotTableConditionalFormattingOptionList( - input.ConditionalFormattingOptions, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1PivotTableConditionalFormattingOption - */ -const se_PivotTableConditionalFormattingOption = ( - input: PivotTableConditionalFormattingOption, - context: __SerdeContext -): any => { - return { - ...(input.Cell != null && { Cell: se_PivotTableCellConditionalFormatting(input.Cell, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotTableConditionalFormattingOptionList - */ -const se_PivotTableConditionalFormattingOptionList = ( - input: PivotTableConditionalFormattingOption[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PivotTableConditionalFormattingOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotTableConditionalFormattingScope - */ -const se_PivotTableConditionalFormattingScope = ( - input: PivotTableConditionalFormattingScope, - context: __SerdeContext -): any => { - return { - ...(input.Role != null && { Role: input.Role }), - }; -}; - -/** - * serializeAws_restJson1PivotTableConfiguration - */ -const se_PivotTableConfiguration = (input: PivotTableConfiguration, context: __SerdeContext): any => { - return { - ...(input.FieldOptions != null && { FieldOptions: se_PivotTableFieldOptions(input.FieldOptions, context) }), - ...(input.FieldWells != null && { FieldWells: se_PivotTableFieldWells(input.FieldWells, context) }), - ...(input.PaginatedReportOptions != null && { - PaginatedReportOptions: se_PivotTablePaginatedReportOptions(input.PaginatedReportOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_PivotTableSortConfiguration(input.SortConfiguration, context), - }), - ...(input.TableOptions != null && { TableOptions: se_PivotTableOptions(input.TableOptions, context) }), - ...(input.TotalOptions != null && { TotalOptions: se_PivotTableTotalOptions(input.TotalOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotTableDataPathOption - */ -const se_PivotTableDataPathOption = (input: PivotTableDataPathOption, context: __SerdeContext): any => { - return { - ...(input.DataPathList != null && { DataPathList: se_DataPathValueList(input.DataPathList, context) }), - ...(input.Width != null && { Width: input.Width }), - }; -}; - -/** - * serializeAws_restJson1PivotTableDataPathOptionList - */ -const se_PivotTableDataPathOptionList = (input: PivotTableDataPathOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PivotTableDataPathOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotTableDimensionList - */ -const se_PivotTableDimensionList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotTableFieldOption - */ -const se_PivotTableFieldOption = (input: PivotTableFieldOption, context: __SerdeContext): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1PivotTableFieldOptionList - */ -const se_PivotTableFieldOptionList = (input: PivotTableFieldOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PivotTableFieldOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotTableFieldOptions - */ -const se_PivotTableFieldOptions = (input: PivotTableFieldOptions, context: __SerdeContext): any => { - return { - ...(input.DataPathOptions != null && { - DataPathOptions: se_PivotTableDataPathOptionList(input.DataPathOptions, context), - }), - ...(input.SelectedFieldOptions != null && { - SelectedFieldOptions: se_PivotTableFieldOptionList(input.SelectedFieldOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1PivotTableFieldSubtotalOptions - */ -const se_PivotTableFieldSubtotalOptions = (input: PivotTableFieldSubtotalOptions, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - }; -}; - -/** - * serializeAws_restJson1PivotTableFieldSubtotalOptionsList - */ -const se_PivotTableFieldSubtotalOptionsList = ( - input: PivotTableFieldSubtotalOptions[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PivotTableFieldSubtotalOptions(entry, context); - }); -}; - -/** - * serializeAws_restJson1PivotTableFieldWells - */ -const se_PivotTableFieldWells = (input: PivotTableFieldWells, context: __SerdeContext): any => { - return { - ...(input.PivotTableAggregatedFieldWells != null && { - PivotTableAggregatedFieldWells: se_PivotTableAggregatedFieldWells(input.PivotTableAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1PivotTableOptions - */ -const se_PivotTableOptions = (input: PivotTableOptions, context: __SerdeContext): any => { - return { - ...(input.CellStyle != null && { CellStyle: se_TableCellStyle(input.CellStyle, context) }), - ...(input.CollapsedRowDimensionsVisibility != null && { - CollapsedRowDimensionsVisibility: input.CollapsedRowDimensionsVisibility, - }), - ...(input.ColumnHeaderStyle != null && { ColumnHeaderStyle: se_TableCellStyle(input.ColumnHeaderStyle, context) }), - ...(input.ColumnNamesVisibility != null && { ColumnNamesVisibility: input.ColumnNamesVisibility }), - ...(input.MetricPlacement != null && { MetricPlacement: input.MetricPlacement }), - ...(input.RowAlternateColorOptions != null && { - RowAlternateColorOptions: se_RowAlternateColorOptions(input.RowAlternateColorOptions, context), - }), - ...(input.RowFieldNamesStyle != null && { - RowFieldNamesStyle: se_TableCellStyle(input.RowFieldNamesStyle, context), - }), - ...(input.RowHeaderStyle != null && { RowHeaderStyle: se_TableCellStyle(input.RowHeaderStyle, context) }), - ...(input.SingleMetricVisibility != null && { SingleMetricVisibility: input.SingleMetricVisibility }), - ...(input.ToggleButtonsVisibility != null && { ToggleButtonsVisibility: input.ToggleButtonsVisibility }), - }; -}; - -/** - * serializeAws_restJson1PivotTablePaginatedReportOptions - */ -const se_PivotTablePaginatedReportOptions = (input: PivotTablePaginatedReportOptions, context: __SerdeContext): any => { - return { - ...(input.OverflowColumnHeaderVisibility != null && { - OverflowColumnHeaderVisibility: input.OverflowColumnHeaderVisibility, - }), - ...(input.VerticalOverflowVisibility != null && { VerticalOverflowVisibility: input.VerticalOverflowVisibility }), - }; -}; - -/** - * serializeAws_restJson1PivotTableSortBy - */ -const se_PivotTableSortBy = (input: PivotTableSortBy, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnSort(input.Column, context) }), - ...(input.DataPath != null && { DataPath: se_DataPathSort(input.DataPath, context) }), - ...(input.Field != null && { Field: se_FieldSort(input.Field, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotTableSortConfiguration - */ -const se_PivotTableSortConfiguration = (input: PivotTableSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.FieldSortOptions != null && { - FieldSortOptions: se_PivotFieldSortOptionsList(input.FieldSortOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1PivotTableTotalOptions - */ -const se_PivotTableTotalOptions = (input: PivotTableTotalOptions, context: __SerdeContext): any => { - return { - ...(input.ColumnSubtotalOptions != null && { - ColumnSubtotalOptions: se_SubtotalOptions(input.ColumnSubtotalOptions, context), - }), - ...(input.ColumnTotalOptions != null && { - ColumnTotalOptions: se_PivotTotalOptions(input.ColumnTotalOptions, context), - }), - ...(input.RowSubtotalOptions != null && { - RowSubtotalOptions: se_SubtotalOptions(input.RowSubtotalOptions, context), - }), - ...(input.RowTotalOptions != null && { RowTotalOptions: se_PivotTotalOptions(input.RowTotalOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1PivotTableVisual - */ -const se_PivotTableVisual = (input: PivotTableVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_PivotTableConfiguration(input.ChartConfiguration, context), - }), - ...(input.ConditionalFormatting != null && { - ConditionalFormatting: se_PivotTableConditionalFormatting(input.ConditionalFormatting, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1PivotTotalOptions - */ -const se_PivotTotalOptions = (input: PivotTotalOptions, context: __SerdeContext): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.MetricHeaderCellStyle != null && { - MetricHeaderCellStyle: se_TableCellStyle(input.MetricHeaderCellStyle, context), - }), - ...(input.Placement != null && { Placement: input.Placement }), - ...(input.ScrollStatus != null && { ScrollStatus: input.ScrollStatus }), - ...(input.TotalCellStyle != null && { TotalCellStyle: se_TableCellStyle(input.TotalCellStyle, context) }), - ...(input.TotalsVisibility != null && { TotalsVisibility: input.TotalsVisibility }), - ...(input.ValueCellStyle != null && { ValueCellStyle: se_TableCellStyle(input.ValueCellStyle, context) }), - }; -}; - -/** - * serializeAws_restJson1PostgreSqlParameters - */ -const se_PostgreSqlParameters = (input: PostgreSqlParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1PredefinedHierarchy - */ -const se_PredefinedHierarchy = (input: PredefinedHierarchy, context: __SerdeContext): any => { - return { - ...(input.Columns != null && { Columns: se_PredefinedHierarchyColumnList(input.Columns, context) }), - ...(input.DrillDownFilters != null && { - DrillDownFilters: se_DrillDownFilterList(input.DrillDownFilters, context), - }), - ...(input.HierarchyId != null && { HierarchyId: input.HierarchyId }), - }; -}; - -/** - * serializeAws_restJson1PredefinedHierarchyColumnList - */ -const se_PredefinedHierarchyColumnList = (input: ColumnIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ColumnIdentifier(entry, context); - }); -}; - -/** - * serializeAws_restJson1PrestoParameters - */ -const se_PrestoParameters = (input: PrestoParameters, context: __SerdeContext): any => { - return { - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1PrincipalList - */ -const se_PrincipalList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ProgressBarOptions - */ -const se_ProgressBarOptions = (input: ProgressBarOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1ProjectedColumnList - */ -const se_ProjectedColumnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1ProjectOperation - */ -const se_ProjectOperation = (input: ProjectOperation, context: __SerdeContext): any => { - return { - ...(input.ProjectedColumns != null && { - ProjectedColumns: se_ProjectedColumnList(input.ProjectedColumns, context), - }), - }; -}; - -/** - * serializeAws_restJson1RadarChartAggregatedFieldWells - */ -const se_RadarChartAggregatedFieldWells = (input: RadarChartAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_RadarChartCategoryFieldList(input.Category, context) }), - ...(input.Color != null && { Color: se_RadarChartColorFieldList(input.Color, context) }), - ...(input.Values != null && { Values: se_RadarChartValuesFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1RadarChartAreaStyleSettings - */ -const se_RadarChartAreaStyleSettings = (input: RadarChartAreaStyleSettings, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1RadarChartCategoryFieldList - */ -const se_RadarChartCategoryFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1RadarChartColorFieldList - */ -const se_RadarChartColorFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1RadarChartConfiguration - */ -const se_RadarChartConfiguration = (input: RadarChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.AlternateBandColorsVisibility != null && { - AlternateBandColorsVisibility: input.AlternateBandColorsVisibility, - }), - ...(input.AlternateBandEvenColor != null && { AlternateBandEvenColor: input.AlternateBandEvenColor }), - ...(input.AlternateBandOddColor != null && { AlternateBandOddColor: input.AlternateBandOddColor }), - ...(input.BaseSeriesSettings != null && { - BaseSeriesSettings: se_RadarChartSeriesSettings(input.BaseSeriesSettings, context), - }), - ...(input.CategoryAxis != null && { CategoryAxis: se_AxisDisplayOptions(input.CategoryAxis, context) }), - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.ColorAxis != null && { ColorAxis: se_AxisDisplayOptions(input.ColorAxis, context) }), - ...(input.ColorLabelOptions != null && { - ColorLabelOptions: se_ChartAxisLabelOptions(input.ColorLabelOptions, context), - }), - ...(input.FieldWells != null && { FieldWells: se_RadarChartFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.Shape != null && { Shape: input.Shape }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_RadarChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.StartAngle != null && { StartAngle: __serializeFloat(input.StartAngle) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - }; -}; - -/** - * serializeAws_restJson1RadarChartFieldWells - */ -const se_RadarChartFieldWells = (input: RadarChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.RadarChartAggregatedFieldWells != null && { - RadarChartAggregatedFieldWells: se_RadarChartAggregatedFieldWells(input.RadarChartAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1RadarChartSeriesSettings - */ -const se_RadarChartSeriesSettings = (input: RadarChartSeriesSettings, context: __SerdeContext): any => { - return { - ...(input.AreaStyleSettings != null && { - AreaStyleSettings: se_RadarChartAreaStyleSettings(input.AreaStyleSettings, context), - }), - }; -}; - -/** - * serializeAws_restJson1RadarChartSortConfiguration - */ -const se_RadarChartSortConfiguration = (input: RadarChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimit != null && { - CategoryItemsLimit: se_ItemsLimitConfiguration(input.CategoryItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - ...(input.ColorItemsLimit != null && { - ColorItemsLimit: se_ItemsLimitConfiguration(input.ColorItemsLimit, context), - }), - ...(input.ColorSort != null && { ColorSort: se_FieldSortOptionsList(input.ColorSort, context) }), - }; -}; - -/** - * serializeAws_restJson1RadarChartValuesFieldList - */ -const se_RadarChartValuesFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1RadarChartVisual - */ -const se_RadarChartVisual = (input: RadarChartVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_RadarChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1RangeEndsLabelType - */ -const se_RangeEndsLabelType = (input: RangeEndsLabelType, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1RdsParameters - */ -const se_RdsParameters = (input: RdsParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; - -/** - * serializeAws_restJson1RedshiftParameters - */ -const se_RedshiftParameters = (input: RedshiftParameters, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLine - */ -const se_ReferenceLine = (input: ReferenceLine, context: __SerdeContext): any => { - return { - ...(input.DataConfiguration != null && { - DataConfiguration: se_ReferenceLineDataConfiguration(input.DataConfiguration, context), - }), - ...(input.LabelConfiguration != null && { - LabelConfiguration: se_ReferenceLineLabelConfiguration(input.LabelConfiguration, context), - }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StyleConfiguration != null && { - StyleConfiguration: se_ReferenceLineStyleConfiguration(input.StyleConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineCustomLabelConfiguration - */ -const se_ReferenceLineCustomLabelConfiguration = ( - input: ReferenceLineCustomLabelConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineDataConfiguration - */ -const se_ReferenceLineDataConfiguration = (input: ReferenceLineDataConfiguration, context: __SerdeContext): any => { - return { - ...(input.AxisBinding != null && { AxisBinding: input.AxisBinding }), - ...(input.DynamicConfiguration != null && { - DynamicConfiguration: se_ReferenceLineDynamicDataConfiguration(input.DynamicConfiguration, context), - }), - ...(input.StaticConfiguration != null && { - StaticConfiguration: se_ReferenceLineStaticDataConfiguration(input.StaticConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineDynamicDataConfiguration - */ -const se_ReferenceLineDynamicDataConfiguration = ( - input: ReferenceLineDynamicDataConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Calculation != null && { Calculation: se_NumericalAggregationFunction(input.Calculation, context) }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.MeasureAggregationFunction != null && { - MeasureAggregationFunction: se_AggregationFunction(input.MeasureAggregationFunction, context), - }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineLabelConfiguration - */ -const se_ReferenceLineLabelConfiguration = (input: ReferenceLineLabelConfiguration, context: __SerdeContext): any => { - return { - ...(input.CustomLabelConfiguration != null && { - CustomLabelConfiguration: se_ReferenceLineCustomLabelConfiguration(input.CustomLabelConfiguration, context), - }), - ...(input.FontColor != null && { FontColor: input.FontColor }), - ...(input.FontConfiguration != null && { - FontConfiguration: se_FontConfiguration(input.FontConfiguration, context), - }), - ...(input.HorizontalPosition != null && { HorizontalPosition: input.HorizontalPosition }), - ...(input.ValueLabelConfiguration != null && { - ValueLabelConfiguration: se_ReferenceLineValueLabelConfiguration(input.ValueLabelConfiguration, context), - }), - ...(input.VerticalPosition != null && { VerticalPosition: input.VerticalPosition }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineList - */ -const se_ReferenceLineList = (input: ReferenceLine[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReferenceLine(entry, context); - }); -}; - -/** - * serializeAws_restJson1ReferenceLineStaticDataConfiguration - */ -const se_ReferenceLineStaticDataConfiguration = ( - input: ReferenceLineStaticDataConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineStyleConfiguration - */ -const se_ReferenceLineStyleConfiguration = (input: ReferenceLineStyleConfiguration, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.Pattern != null && { Pattern: input.Pattern }), - }; -}; - -/** - * serializeAws_restJson1ReferenceLineValueLabelConfiguration - */ -const se_ReferenceLineValueLabelConfiguration = ( - input: ReferenceLineValueLabelConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_NumericFormatConfiguration(input.FormatConfiguration, context), - }), - ...(input.RelativePosition != null && { RelativePosition: input.RelativePosition }), - }; -}; - -/** - * serializeAws_restJson1RefreshConfiguration - */ -const se_RefreshConfiguration = (input: RefreshConfiguration, context: __SerdeContext): any => { - return { - ...(input.IncrementalRefresh != null && { - IncrementalRefresh: se_IncrementalRefresh(input.IncrementalRefresh, context), - }), - }; -}; - -/** - * serializeAws_restJson1RefreshFrequency - */ -const se_RefreshFrequency = (input: RefreshFrequency, context: __SerdeContext): any => { - return { - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.RefreshOnDay != null && { RefreshOnDay: se_ScheduleRefreshOnEntity(input.RefreshOnDay, context) }), - ...(input.TimeOfTheDay != null && { TimeOfTheDay: input.TimeOfTheDay }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - }; -}; - -/** - * serializeAws_restJson1RefreshSchedule - */ -const se_RefreshSchedule = (input: RefreshSchedule, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.RefreshType != null && { RefreshType: input.RefreshType }), - ...(input.ScheduleFrequency != null && { - ScheduleFrequency: se_RefreshFrequency(input.ScheduleFrequency, context), - }), - ...(input.ScheduleId != null && { ScheduleId: input.ScheduleId }), - ...(input.StartAfterDateTime != null && { - StartAfterDateTime: Math.round(input.StartAfterDateTime.getTime() / 1000), - }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserConsoleFeatureConfigurations - */ -const se_RegisteredUserConsoleFeatureConfigurations = ( - input: RegisteredUserConsoleFeatureConfigurations, - context: __SerdeContext -): any => { - return { - ...(input.StatePersistence != null && { - StatePersistence: se_StatePersistenceConfigurations(input.StatePersistence, context), - }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserDashboardEmbeddingConfiguration - */ -const se_RegisteredUserDashboardEmbeddingConfiguration = ( - input: RegisteredUserDashboardEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FeatureConfigurations != null && { - FeatureConfigurations: se_RegisteredUserDashboardFeatureConfigurations(input.FeatureConfigurations, context), - }), - ...(input.InitialDashboardId != null && { InitialDashboardId: input.InitialDashboardId }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserDashboardFeatureConfigurations - */ -const se_RegisteredUserDashboardFeatureConfigurations = ( - input: RegisteredUserDashboardFeatureConfigurations, - context: __SerdeContext -): any => { - return { - ...(input.StatePersistence != null && { - StatePersistence: se_StatePersistenceConfigurations(input.StatePersistence, context), - }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserDashboardVisualEmbeddingConfiguration - */ -const se_RegisteredUserDashboardVisualEmbeddingConfiguration = ( - input: RegisteredUserDashboardVisualEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InitialDashboardVisualId != null && { - InitialDashboardVisualId: se_DashboardVisualId(input.InitialDashboardVisualId, context), - }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserEmbeddingExperienceConfiguration - */ -const se_RegisteredUserEmbeddingExperienceConfiguration = ( - input: RegisteredUserEmbeddingExperienceConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Dashboard != null && { - Dashboard: se_RegisteredUserDashboardEmbeddingConfiguration(input.Dashboard, context), - }), - ...(input.DashboardVisual != null && { - DashboardVisual: se_RegisteredUserDashboardVisualEmbeddingConfiguration(input.DashboardVisual, context), - }), - ...(input.QSearchBar != null && { - QSearchBar: se_RegisteredUserQSearchBarEmbeddingConfiguration(input.QSearchBar, context), - }), - ...(input.QuickSightConsole != null && { - QuickSightConsole: se_RegisteredUserQuickSightConsoleEmbeddingConfiguration(input.QuickSightConsole, context), - }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserQSearchBarEmbeddingConfiguration - */ -const se_RegisteredUserQSearchBarEmbeddingConfiguration = ( - input: RegisteredUserQSearchBarEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.InitialTopicId != null && { InitialTopicId: input.InitialTopicId }), - }; -}; - -/** - * serializeAws_restJson1RegisteredUserQuickSightConsoleEmbeddingConfiguration - */ -const se_RegisteredUserQuickSightConsoleEmbeddingConfiguration = ( - input: RegisteredUserQuickSightConsoleEmbeddingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.FeatureConfigurations != null && { - FeatureConfigurations: se_RegisteredUserConsoleFeatureConfigurations(input.FeatureConfigurations, context), - }), - ...(input.InitialPath != null && { InitialPath: input.InitialPath }), - }; -}; - -/** - * serializeAws_restJson1RelationalTable - */ -const se_RelationalTable = (input: RelationalTable, context: __SerdeContext): any => { - return { - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.DataSourceArn != null && { DataSourceArn: input.DataSourceArn }), - ...(input.InputColumns != null && { InputColumns: se_InputColumnList(input.InputColumns, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Schema != null && { Schema: input.Schema }), - }; -}; - -/** - * serializeAws_restJson1RelativeDatesFilter - */ -const se_RelativeDatesFilter = (input: RelativeDatesFilter, context: __SerdeContext): any => { - return { - ...(input.AnchorDateConfiguration != null && { - AnchorDateConfiguration: se_AnchorDateConfiguration(input.AnchorDateConfiguration, context), - }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.ExcludePeriodConfiguration != null && { - ExcludePeriodConfiguration: se_ExcludePeriodConfiguration(input.ExcludePeriodConfiguration, context), - }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - ...(input.MinimumGranularity != null && { MinimumGranularity: input.MinimumGranularity }), - ...(input.NullOption != null && { NullOption: input.NullOption }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.RelativeDateType != null && { RelativeDateType: input.RelativeDateType }), - ...(input.RelativeDateValue != null && { RelativeDateValue: input.RelativeDateValue }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - }; -}; - -/** - * serializeAws_restJson1RelativeDateTimeControlDisplayOptions - */ -const se_RelativeDateTimeControlDisplayOptions = ( - input: RelativeDateTimeControlDisplayOptions, - context: __SerdeContext -): any => { - return { - ...(input.DateTimeFormat != null && { DateTimeFormat: input.DateTimeFormat }), - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1RenameColumnOperation - */ -const se_RenameColumnOperation = (input: RenameColumnOperation, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.NewColumnName != null && { NewColumnName: input.NewColumnName }), - }; -}; - -/** - * serializeAws_restJson1ResourcePermission - */ -const se_ResourcePermission = (input: ResourcePermission, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_ActionList(input.Actions, context) }), - ...(input.Principal != null && { Principal: input.Principal }), - }; -}; - -/** - * serializeAws_restJson1ResourcePermissionList - */ -const se_ResourcePermissionList = (input: ResourcePermission[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourcePermission(entry, context); - }); -}; - -/** - * serializeAws_restJson1RollingDateConfiguration - */ -const se_RollingDateConfiguration = (input: RollingDateConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataSetIdentifier != null && { DataSetIdentifier: input.DataSetIdentifier }), - ...(input.Expression != null && { Expression: input.Expression }), - }; -}; - -/** - * serializeAws_restJson1RowAlternateColorList - */ -const se_RowAlternateColorList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RowAlternateColorOptions - */ -const se_RowAlternateColorOptions = (input: RowAlternateColorOptions, context: __SerdeContext): any => { - return { - ...(input.RowAlternateColors != null && { - RowAlternateColors: se_RowAlternateColorList(input.RowAlternateColors, context), - }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1RowLevelPermissionDataSet - */ -const se_RowLevelPermissionDataSet = (input: RowLevelPermissionDataSet, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.FormatVersion != null && { FormatVersion: input.FormatVersion }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.PermissionPolicy != null && { PermissionPolicy: input.PermissionPolicy }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1RowLevelPermissionTagConfiguration - */ -const se_RowLevelPermissionTagConfiguration = ( - input: RowLevelPermissionTagConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Status != null && { Status: input.Status }), - ...(input.TagRuleConfigurations != null && { - TagRuleConfigurations: se_RowLevelPermissionTagRuleConfigurationList(input.TagRuleConfigurations, context), - }), - ...(input.TagRules != null && { TagRules: se_RowLevelPermissionTagRuleList(input.TagRules, context) }), - }; -}; - -/** - * serializeAws_restJson1RowLevelPermissionTagRule - */ -const se_RowLevelPermissionTagRule = (input: RowLevelPermissionTagRule, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.MatchAllValue != null && { MatchAllValue: input.MatchAllValue }), - ...(input.TagKey != null && { TagKey: input.TagKey }), - ...(input.TagMultiValueDelimiter != null && { TagMultiValueDelimiter: input.TagMultiValueDelimiter }), - }; -}; - -/** - * serializeAws_restJson1RowLevelPermissionTagRuleConfiguration - */ -const se_RowLevelPermissionTagRuleConfiguration = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RowLevelPermissionTagRuleConfigurationList - */ -const se_RowLevelPermissionTagRuleConfigurationList = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RowLevelPermissionTagRuleConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1RowLevelPermissionTagRuleList - */ -const se_RowLevelPermissionTagRuleList = (input: RowLevelPermissionTagRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RowLevelPermissionTagRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1RowSortList - */ -const se_RowSortList = (input: FieldSortOptions[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldSortOptions(entry, context); - }); -}; - -/** - * serializeAws_restJson1S3Parameters - */ -const se_S3Parameters = (input: S3Parameters, context: __SerdeContext): any => { - return { - ...(input.ManifestFileLocation != null && { - ManifestFileLocation: se_ManifestFileLocation(input.ManifestFileLocation, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_restJson1S3Source - */ -const se_S3Source = (input: S3Source, context: __SerdeContext): any => { - return { - ...(input.DataSourceArn != null && { DataSourceArn: input.DataSourceArn }), - ...(input.InputColumns != null && { InputColumns: se_InputColumnList(input.InputColumns, context) }), - ...(input.UploadSettings != null && { UploadSettings: se_UploadSettings(input.UploadSettings, context) }), - }; -}; - -/** - * serializeAws_restJson1SameSheetTargetVisualConfiguration - */ -const se_SameSheetTargetVisualConfiguration = ( - input: SameSheetTargetVisualConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.TargetVisualOptions != null && { TargetVisualOptions: input.TargetVisualOptions }), - ...(input.TargetVisuals != null && { TargetVisuals: se_TargetVisualList(input.TargetVisuals, context) }), - }; -}; - -/** - * serializeAws_restJson1SankeyDiagramAggregatedFieldWells - */ -const se_SankeyDiagramAggregatedFieldWells = ( - input: SankeyDiagramAggregatedFieldWells, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: se_DimensionFieldList(input.Destination, context) }), - ...(input.Source != null && { Source: se_DimensionFieldList(input.Source, context) }), - ...(input.Weight != null && { Weight: se_MeasureFieldList(input.Weight, context) }), - }; -}; - -/** - * serializeAws_restJson1SankeyDiagramChartConfiguration - */ -const se_SankeyDiagramChartConfiguration = (input: SankeyDiagramChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_SankeyDiagramFieldWells(input.FieldWells, context) }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_SankeyDiagramSortConfiguration(input.SortConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1SankeyDiagramFieldWells - */ -const se_SankeyDiagramFieldWells = (input: SankeyDiagramFieldWells, context: __SerdeContext): any => { - return { - ...(input.SankeyDiagramAggregatedFieldWells != null && { - SankeyDiagramAggregatedFieldWells: se_SankeyDiagramAggregatedFieldWells( - input.SankeyDiagramAggregatedFieldWells, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1SankeyDiagramSortConfiguration - */ -const se_SankeyDiagramSortConfiguration = (input: SankeyDiagramSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.DestinationItemsLimit != null && { - DestinationItemsLimit: se_ItemsLimitConfiguration(input.DestinationItemsLimit, context), - }), - ...(input.SourceItemsLimit != null && { - SourceItemsLimit: se_ItemsLimitConfiguration(input.SourceItemsLimit, context), - }), - ...(input.WeightSort != null && { WeightSort: se_FieldSortOptionsList(input.WeightSort, context) }), - }; -}; - -/** - * serializeAws_restJson1SankeyDiagramVisual - */ -const se_SankeyDiagramVisual = (input: SankeyDiagramVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_SankeyDiagramChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1ScatterPlotCategoricallyAggregatedFieldWells - */ -const se_ScatterPlotCategoricallyAggregatedFieldWells = ( - input: ScatterPlotCategoricallyAggregatedFieldWells, - context: __SerdeContext -): any => { - return { - ...(input.Category != null && { Category: se_DimensionFieldList(input.Category, context) }), - ...(input.Size != null && { Size: se_MeasureFieldList(input.Size, context) }), - ...(input.XAxis != null && { XAxis: se_MeasureFieldList(input.XAxis, context) }), - ...(input.YAxis != null && { YAxis: se_MeasureFieldList(input.YAxis, context) }), - }; -}; - -/** - * serializeAws_restJson1ScatterPlotConfiguration - */ -const se_ScatterPlotConfiguration = (input: ScatterPlotConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_ScatterPlotFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - ...(input.XAxisDisplayOptions != null && { - XAxisDisplayOptions: se_AxisDisplayOptions(input.XAxisDisplayOptions, context), - }), - ...(input.XAxisLabelOptions != null && { - XAxisLabelOptions: se_ChartAxisLabelOptions(input.XAxisLabelOptions, context), - }), - ...(input.YAxisDisplayOptions != null && { - YAxisDisplayOptions: se_AxisDisplayOptions(input.YAxisDisplayOptions, context), - }), - ...(input.YAxisLabelOptions != null && { - YAxisLabelOptions: se_ChartAxisLabelOptions(input.YAxisLabelOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1ScatterPlotFieldWells - */ -const se_ScatterPlotFieldWells = (input: ScatterPlotFieldWells, context: __SerdeContext): any => { - return { - ...(input.ScatterPlotCategoricallyAggregatedFieldWells != null && { - ScatterPlotCategoricallyAggregatedFieldWells: se_ScatterPlotCategoricallyAggregatedFieldWells( - input.ScatterPlotCategoricallyAggregatedFieldWells, - context - ), - }), - ...(input.ScatterPlotUnaggregatedFieldWells != null && { - ScatterPlotUnaggregatedFieldWells: se_ScatterPlotUnaggregatedFieldWells( - input.ScatterPlotUnaggregatedFieldWells, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1ScatterPlotUnaggregatedFieldWells - */ -const se_ScatterPlotUnaggregatedFieldWells = ( - input: ScatterPlotUnaggregatedFieldWells, - context: __SerdeContext -): any => { - return { - ...(input.Size != null && { Size: se_MeasureFieldList(input.Size, context) }), - ...(input.XAxis != null && { XAxis: se_DimensionFieldList(input.XAxis, context) }), - ...(input.YAxis != null && { YAxis: se_DimensionFieldList(input.YAxis, context) }), - }; -}; - -/** - * serializeAws_restJson1ScatterPlotVisual - */ -const se_ScatterPlotVisual = (input: ScatterPlotVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_ScatterPlotConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1ScheduleRefreshOnEntity - */ -const se_ScheduleRefreshOnEntity = (input: ScheduleRefreshOnEntity, context: __SerdeContext): any => { - return { - ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }), - ...(input.DayOfWeek != null && { DayOfWeek: input.DayOfWeek }), - }; -}; - -/** - * serializeAws_restJson1ScrollBarOptions - */ -const se_ScrollBarOptions = (input: ScrollBarOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - ...(input.VisibleRange != null && { VisibleRange: se_VisibleRangeOptions(input.VisibleRange, context) }), - }; -}; - -/** - * serializeAws_restJson1SecondaryValueOptions - */ -const se_SecondaryValueOptions = (input: SecondaryValueOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1SectionAfterPageBreak - */ -const se_SectionAfterPageBreak = (input: SectionAfterPageBreak, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1SectionBasedLayoutCanvasSizeOptions - */ -const se_SectionBasedLayoutCanvasSizeOptions = ( - input: SectionBasedLayoutCanvasSizeOptions, - context: __SerdeContext -): any => { - return { - ...(input.PaperCanvasSizeOptions != null && { - PaperCanvasSizeOptions: se_SectionBasedLayoutPaperCanvasSizeOptions(input.PaperCanvasSizeOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1SectionBasedLayoutConfiguration - */ -const se_SectionBasedLayoutConfiguration = (input: SectionBasedLayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.BodySections != null && { BodySections: se_BodySectionConfigurationList(input.BodySections, context) }), - ...(input.CanvasSizeOptions != null && { - CanvasSizeOptions: se_SectionBasedLayoutCanvasSizeOptions(input.CanvasSizeOptions, context), - }), - ...(input.FooterSections != null && { - FooterSections: se_HeaderFooterSectionConfigurationList(input.FooterSections, context), - }), - ...(input.HeaderSections != null && { - HeaderSections: se_HeaderFooterSectionConfigurationList(input.HeaderSections, context), - }), - }; -}; - -/** - * serializeAws_restJson1SectionBasedLayoutPaperCanvasSizeOptions - */ -const se_SectionBasedLayoutPaperCanvasSizeOptions = ( - input: SectionBasedLayoutPaperCanvasSizeOptions, - context: __SerdeContext -): any => { - return { - ...(input.PaperMargin != null && { PaperMargin: se_Spacing(input.PaperMargin, context) }), - ...(input.PaperOrientation != null && { PaperOrientation: input.PaperOrientation }), - ...(input.PaperSize != null && { PaperSize: input.PaperSize }), - }; -}; - -/** - * serializeAws_restJson1SectionLayoutConfiguration - */ -const se_SectionLayoutConfiguration = (input: SectionLayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.FreeFormLayout != null && { - FreeFormLayout: se_FreeFormSectionLayoutConfiguration(input.FreeFormLayout, context), - }), - }; -}; - -/** - * serializeAws_restJson1SectionPageBreakConfiguration - */ -const se_SectionPageBreakConfiguration = (input: SectionPageBreakConfiguration, context: __SerdeContext): any => { - return { - ...(input.After != null && { After: se_SectionAfterPageBreak(input.After, context) }), - }; -}; - -/** - * serializeAws_restJson1SectionStyle - */ -const se_SectionStyle = (input: SectionStyle, context: __SerdeContext): any => { - return { - ...(input.Height != null && { Height: input.Height }), - ...(input.Padding != null && { Padding: se_Spacing(input.Padding, context) }), - }; -}; - -/** - * serializeAws_restJson1SelectedFieldList - */ -const se_SelectedFieldList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SelectedSheetsFilterScopeConfiguration - */ -const se_SelectedSheetsFilterScopeConfiguration = ( - input: SelectedSheetsFilterScopeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.SheetVisualScopingConfigurations != null && { - SheetVisualScopingConfigurations: se_SheetVisualScopingConfigurations( - input.SheetVisualScopingConfigurations, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1SensitiveDoubleList - */ -const se_SensitiveDoubleList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return __serializeFloat(entry); - }); -}; - -/** - * serializeAws_restJson1SensitiveLongList - */ -const se_SensitiveLongList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SensitiveStringList - */ -const se_SensitiveStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SensitiveTimestampList - */ -const se_SensitiveTimestampList = (input: Date[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return Math.round(entry.getTime() / 1000); - }); -}; - -/** - * serializeAws_restJson1SeriesItem - */ -const se_SeriesItem = (input: SeriesItem, context: __SerdeContext): any => { - return { - ...(input.DataFieldSeriesItem != null && { - DataFieldSeriesItem: se_DataFieldSeriesItem(input.DataFieldSeriesItem, context), - }), - ...(input.FieldSeriesItem != null && { FieldSeriesItem: se_FieldSeriesItem(input.FieldSeriesItem, context) }), - }; -}; - -/** - * serializeAws_restJson1SeriesItemList - */ -const se_SeriesItemList = (input: SeriesItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SeriesItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1ServiceNowParameters - */ -const se_ServiceNowParameters = (input: ServiceNowParameters, context: __SerdeContext): any => { - return { - ...(input.SiteBaseUrl != null && { SiteBaseUrl: input.SiteBaseUrl }), - }; -}; - -/** - * serializeAws_restJson1SessionTag - */ -const se_SessionTag = (input: SessionTag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1SessionTagList - */ -const se_SessionTagList = (input: SessionTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SessionTag(entry, context); - }); -}; - -/** - * serializeAws_restJson1SetParameterValueConfiguration - */ -const se_SetParameterValueConfiguration = (input: SetParameterValueConfiguration, context: __SerdeContext): any => { - return { - ...(input.DestinationParameterName != null && { DestinationParameterName: input.DestinationParameterName }), - ...(input.Value != null && { Value: se_DestinationParameterValueConfiguration(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1SetParameterValueConfigurationList - */ -const se_SetParameterValueConfigurationList = ( - input: SetParameterValueConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SetParameterValueConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1ShapeConditionalFormat - */ -const se_ShapeConditionalFormat = (input: ShapeConditionalFormat, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { - BackgroundColor: se_ConditionalFormattingColor(input.BackgroundColor, context), - }), - }; -}; - -/** - * serializeAws_restJson1SheetControlLayout - */ -const se_SheetControlLayout = (input: SheetControlLayout, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { - Configuration: se_SheetControlLayoutConfiguration(input.Configuration, context), - }), - }; -}; - -/** - * serializeAws_restJson1SheetControlLayoutConfiguration - */ -const se_SheetControlLayoutConfiguration = (input: SheetControlLayoutConfiguration, context: __SerdeContext): any => { - return { - ...(input.GridLayout != null && { GridLayout: se_GridLayoutConfiguration(input.GridLayout, context) }), - }; -}; - -/** - * serializeAws_restJson1SheetControlLayoutList - */ -const se_SheetControlLayoutList = (input: SheetControlLayout[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SheetControlLayout(entry, context); - }); -}; - -/** - * serializeAws_restJson1SheetControlsOption - */ -const se_SheetControlsOption = (input: SheetControlsOption, context: __SerdeContext): any => { - return { - ...(input.VisibilityState != null && { VisibilityState: input.VisibilityState }), - }; -}; - -/** - * serializeAws_restJson1SheetDefinition - */ -const se_SheetDefinition = (input: SheetDefinition, context: __SerdeContext): any => { - return { - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FilterControls != null && { FilterControls: se_FilterControlList(input.FilterControls, context) }), - ...(input.Layouts != null && { Layouts: se_LayoutList(input.Layouts, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParameterControls != null && { - ParameterControls: se_ParameterControlList(input.ParameterControls, context), - }), - ...(input.SheetControlLayouts != null && { - SheetControlLayouts: se_SheetControlLayoutList(input.SheetControlLayouts, context), - }), - ...(input.SheetId != null && { SheetId: input.SheetId }), - ...(input.TextBoxes != null && { TextBoxes: se_SheetTextBoxList(input.TextBoxes, context) }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Visuals != null && { Visuals: se_VisualList(input.Visuals, context) }), - }; -}; - -/** - * serializeAws_restJson1SheetDefinitionList - */ -const se_SheetDefinitionList = (input: SheetDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SheetDefinition(entry, context); - }); -}; - -/** - * serializeAws_restJson1SheetElementConfigurationOverrides - */ -const se_SheetElementConfigurationOverrides = ( - input: SheetElementConfigurationOverrides, - context: __SerdeContext -): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1SheetElementRenderingRule - */ -const se_SheetElementRenderingRule = (input: SheetElementRenderingRule, context: __SerdeContext): any => { - return { - ...(input.ConfigurationOverrides != null && { - ConfigurationOverrides: se_SheetElementConfigurationOverrides(input.ConfigurationOverrides, context), - }), - ...(input.Expression != null && { Expression: input.Expression }), - }; -}; - -/** - * serializeAws_restJson1SheetElementRenderingRuleList - */ -const se_SheetElementRenderingRuleList = (input: SheetElementRenderingRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SheetElementRenderingRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1SheetLayoutElementMaximizationOption - */ -const se_SheetLayoutElementMaximizationOption = ( - input: SheetLayoutElementMaximizationOption, - context: __SerdeContext -): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; -}; - -/** - * serializeAws_restJson1SheetStyle - */ -const se_SheetStyle = (input: SheetStyle, context: __SerdeContext): any => { - return { - ...(input.Tile != null && { Tile: se_TileStyle(input.Tile, context) }), - ...(input.TileLayout != null && { TileLayout: se_TileLayoutStyle(input.TileLayout, context) }), - }; -}; - -/** - * serializeAws_restJson1SheetTextBox - */ -const se_SheetTextBox = (input: SheetTextBox, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.SheetTextBoxId != null && { SheetTextBoxId: input.SheetTextBoxId }), - }; -}; - -/** - * serializeAws_restJson1SheetTextBoxList - */ -const se_SheetTextBoxList = (input: SheetTextBox[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SheetTextBox(entry, context); - }); -}; - -/** - * serializeAws_restJson1SheetVisualScopingConfiguration - */ -const se_SheetVisualScopingConfiguration = (input: SheetVisualScopingConfiguration, context: __SerdeContext): any => { - return { - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.SheetId != null && { SheetId: input.SheetId }), - ...(input.VisualIds != null && { VisualIds: se_FilteredVisualsList(input.VisualIds, context) }), - }; -}; - -/** - * serializeAws_restJson1SheetVisualScopingConfigurations - */ -const se_SheetVisualScopingConfigurations = ( - input: SheetVisualScopingConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SheetVisualScopingConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1ShortFormatText - */ -const se_ShortFormatText = (input: ShortFormatText, context: __SerdeContext): any => { - return { - ...(input.PlainText != null && { PlainText: input.PlainText }), - ...(input.RichText != null && { RichText: input.RichText }), - }; -}; - -/** - * serializeAws_restJson1SimpleClusterMarker - */ -const se_SimpleClusterMarker = (input: SimpleClusterMarker, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - }; -}; - -/** - * serializeAws_restJson1SliderControlDisplayOptions - */ -const se_SliderControlDisplayOptions = (input: SliderControlDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1SmallMultiplesDimensionFieldList - */ -const se_SmallMultiplesDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1SmallMultiplesOptions - */ -const se_SmallMultiplesOptions = (input: SmallMultiplesOptions, context: __SerdeContext): any => { - return { - ...(input.MaxVisibleColumns != null && { MaxVisibleColumns: input.MaxVisibleColumns }), - ...(input.MaxVisibleRows != null && { MaxVisibleRows: input.MaxVisibleRows }), - ...(input.PanelConfiguration != null && { - PanelConfiguration: se_PanelConfiguration(input.PanelConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1SnowflakeParameters - */ -const se_SnowflakeParameters = (input: SnowflakeParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Warehouse != null && { Warehouse: input.Warehouse }), - }; -}; - -/** - * serializeAws_restJson1Spacing - */ -const se_Spacing = (input: Spacing, context: __SerdeContext): any => { - return { - ...(input.Bottom != null && { Bottom: input.Bottom }), - ...(input.Left != null && { Left: input.Left }), - ...(input.Right != null && { Right: input.Right }), - ...(input.Top != null && { Top: input.Top }), - }; -}; - -/** - * serializeAws_restJson1SparkParameters - */ -const se_SparkParameters = (input: SparkParameters, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1SqlServerParameters - */ -const se_SqlServerParameters = (input: SqlServerParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1SslProperties - */ -const se_SslProperties = (input: SslProperties, context: __SerdeContext): any => { - return { - ...(input.DisableSsl != null && { DisableSsl: input.DisableSsl }), - }; -}; - -/** - * serializeAws_restJson1StatePersistenceConfigurations - */ -const se_StatePersistenceConfigurations = (input: StatePersistenceConfigurations, context: __SerdeContext): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1StringDefaultValueList - */ -const se_StringDefaultValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StringDefaultValues - */ -const se_StringDefaultValues = (input: StringDefaultValues, context: __SerdeContext): any => { - return { - ...(input.DynamicValue != null && { DynamicValue: se_DynamicDefaultValue(input.DynamicValue, context) }), - ...(input.StaticValues != null && { StaticValues: se_StringDefaultValueList(input.StaticValues, context) }), - }; -}; - -/** - * serializeAws_restJson1StringFormatConfiguration - */ -const se_StringFormatConfiguration = (input: StringFormatConfiguration, context: __SerdeContext): any => { - return { - ...(input.NullValueFormatConfiguration != null && { - NullValueFormatConfiguration: se_NullValueFormatConfiguration(input.NullValueFormatConfiguration, context), - }), - ...(input.NumericFormatConfiguration != null && { - NumericFormatConfiguration: se_NumericFormatConfiguration(input.NumericFormatConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StringParameter - */ -const se_StringParameter = (input: StringParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_SensitiveStringList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1StringParameterDeclaration - */ -const se_StringParameterDeclaration = (input: StringParameterDeclaration, context: __SerdeContext): any => { - return { - ...(input.DefaultValues != null && { DefaultValues: se_StringDefaultValues(input.DefaultValues, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParameterValueType != null && { ParameterValueType: input.ParameterValueType }), - ...(input.ValueWhenUnset != null && { - ValueWhenUnset: se_StringValueWhenUnsetConfiguration(input.ValueWhenUnset, context), - }), - }; -}; - -/** - * serializeAws_restJson1StringParameterList - */ -const se_StringParameterList = (input: StringParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StringParameter(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringValueWhenUnsetConfiguration - */ -const se_StringValueWhenUnsetConfiguration = ( - input: StringValueWhenUnsetConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomValue != null && { CustomValue: input.CustomValue }), - ...(input.ValueWhenUnsetOption != null && { ValueWhenUnsetOption: input.ValueWhenUnsetOption }), - }; -}; - -/** - * serializeAws_restJson1SubtotalOptions - */ -const se_SubtotalOptions = (input: SubtotalOptions, context: __SerdeContext): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.FieldLevel != null && { FieldLevel: input.FieldLevel }), - ...(input.FieldLevelOptions != null && { - FieldLevelOptions: se_PivotTableFieldSubtotalOptionsList(input.FieldLevelOptions, context), - }), - ...(input.MetricHeaderCellStyle != null && { - MetricHeaderCellStyle: se_TableCellStyle(input.MetricHeaderCellStyle, context), - }), - ...(input.TotalCellStyle != null && { TotalCellStyle: se_TableCellStyle(input.TotalCellStyle, context) }), - ...(input.TotalsVisibility != null && { TotalsVisibility: input.TotalsVisibility }), - ...(input.ValueCellStyle != null && { ValueCellStyle: se_TableCellStyle(input.ValueCellStyle, context) }), - }; -}; - -/** - * serializeAws_restJson1TableAggregatedFieldWells - */ -const se_TableAggregatedFieldWells = (input: TableAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.GroupBy != null && { GroupBy: se_DimensionFieldList(input.GroupBy, context) }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1TableBorderOptions - */ -const se_TableBorderOptions = (input: TableBorderOptions, context: __SerdeContext): any => { - return { - ...(input.Color != null && { Color: input.Color }), - ...(input.Style != null && { Style: input.Style }), - ...(input.Thickness != null && { Thickness: input.Thickness }), - }; -}; - -/** - * serializeAws_restJson1TableCellConditionalFormatting - */ -const se_TableCellConditionalFormatting = (input: TableCellConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.TextFormat != null && { TextFormat: se_TextConditionalFormat(input.TextFormat, context) }), - }; -}; - -/** - * serializeAws_restJson1TableCellImageSizingConfiguration - */ -const se_TableCellImageSizingConfiguration = ( - input: TableCellImageSizingConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.TableCellImageScalingConfiguration != null && { - TableCellImageScalingConfiguration: input.TableCellImageScalingConfiguration, - }), - }; -}; - -/** - * serializeAws_restJson1TableCellStyle - */ -const se_TableCellStyle = (input: TableCellStyle, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { BackgroundColor: input.BackgroundColor }), - ...(input.Border != null && { Border: se_GlobalTableBorderOptions(input.Border, context) }), - ...(input.FontConfiguration != null && { - FontConfiguration: se_FontConfiguration(input.FontConfiguration, context), - }), - ...(input.Height != null && { Height: input.Height }), - ...(input.HorizontalTextAlignment != null && { HorizontalTextAlignment: input.HorizontalTextAlignment }), - ...(input.TextWrap != null && { TextWrap: input.TextWrap }), - ...(input.VerticalTextAlignment != null && { VerticalTextAlignment: input.VerticalTextAlignment }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1TableConditionalFormatting - */ -const se_TableConditionalFormatting = (input: TableConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.ConditionalFormattingOptions != null && { - ConditionalFormattingOptions: se_TableConditionalFormattingOptionList( - input.ConditionalFormattingOptions, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1TableConditionalFormattingOption - */ -const se_TableConditionalFormattingOption = (input: TableConditionalFormattingOption, context: __SerdeContext): any => { - return { - ...(input.Cell != null && { Cell: se_TableCellConditionalFormatting(input.Cell, context) }), - ...(input.Row != null && { Row: se_TableRowConditionalFormatting(input.Row, context) }), - }; -}; - -/** - * serializeAws_restJson1TableConditionalFormattingOptionList - */ -const se_TableConditionalFormattingOptionList = ( - input: TableConditionalFormattingOption[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TableConditionalFormattingOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1TableConfiguration - */ -const se_TableConfiguration = (input: TableConfiguration, context: __SerdeContext): any => { - return { - ...(input.FieldOptions != null && { FieldOptions: se_TableFieldOptions(input.FieldOptions, context) }), - ...(input.FieldWells != null && { FieldWells: se_TableFieldWells(input.FieldWells, context) }), - ...(input.PaginatedReportOptions != null && { - PaginatedReportOptions: se_TablePaginatedReportOptions(input.PaginatedReportOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_TableSortConfiguration(input.SortConfiguration, context), - }), - ...(input.TableInlineVisualizations != null && { - TableInlineVisualizations: se_TableInlineVisualizationList(input.TableInlineVisualizations, context), - }), - ...(input.TableOptions != null && { TableOptions: se_TableOptions(input.TableOptions, context) }), - ...(input.TotalOptions != null && { TotalOptions: se_TotalOptions(input.TotalOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1TableFieldCustomIconContent - */ -const se_TableFieldCustomIconContent = (input: TableFieldCustomIconContent, context: __SerdeContext): any => { - return { - ...(input.Icon != null && { Icon: input.Icon }), - }; -}; - -/** - * serializeAws_restJson1TableFieldCustomTextContent - */ -const se_TableFieldCustomTextContent = (input: TableFieldCustomTextContent, context: __SerdeContext): any => { - return { - ...(input.FontConfiguration != null && { - FontConfiguration: se_FontConfiguration(input.FontConfiguration, context), - }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1TableFieldImageConfiguration - */ -const se_TableFieldImageConfiguration = (input: TableFieldImageConfiguration, context: __SerdeContext): any => { - return { - ...(input.SizingOptions != null && { - SizingOptions: se_TableCellImageSizingConfiguration(input.SizingOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1TableFieldLinkConfiguration - */ -const se_TableFieldLinkConfiguration = (input: TableFieldLinkConfiguration, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: se_TableFieldLinkContentConfiguration(input.Content, context) }), - ...(input.Target != null && { Target: input.Target }), - }; -}; - -/** - * serializeAws_restJson1TableFieldLinkContentConfiguration - */ -const se_TableFieldLinkContentConfiguration = ( - input: TableFieldLinkContentConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.CustomIconContent != null && { - CustomIconContent: se_TableFieldCustomIconContent(input.CustomIconContent, context), - }), - ...(input.CustomTextContent != null && { - CustomTextContent: se_TableFieldCustomTextContent(input.CustomTextContent, context), - }), - }; -}; - -/** - * serializeAws_restJson1TableFieldOption - */ -const se_TableFieldOption = (input: TableFieldOption, context: __SerdeContext): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.URLStyling != null && { URLStyling: se_TableFieldURLConfiguration(input.URLStyling, context) }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - ...(input.Width != null && { Width: input.Width }), - }; -}; - -/** - * serializeAws_restJson1TableFieldOptionList - */ -const se_TableFieldOptionList = (input: TableFieldOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TableFieldOption(entry, context); - }); -}; - -/** - * serializeAws_restJson1TableFieldOptions - */ -const se_TableFieldOptions = (input: TableFieldOptions, context: __SerdeContext): any => { - return { - ...(input.Order != null && { Order: se_FieldOrderList(input.Order, context) }), - ...(input.SelectedFieldOptions != null && { - SelectedFieldOptions: se_TableFieldOptionList(input.SelectedFieldOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1TableFieldURLConfiguration - */ -const se_TableFieldURLConfiguration = (input: TableFieldURLConfiguration, context: __SerdeContext): any => { - return { - ...(input.ImageConfiguration != null && { - ImageConfiguration: se_TableFieldImageConfiguration(input.ImageConfiguration, context), - }), - ...(input.LinkConfiguration != null && { - LinkConfiguration: se_TableFieldLinkConfiguration(input.LinkConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1TableFieldWells - */ -const se_TableFieldWells = (input: TableFieldWells, context: __SerdeContext): any => { - return { - ...(input.TableAggregatedFieldWells != null && { - TableAggregatedFieldWells: se_TableAggregatedFieldWells(input.TableAggregatedFieldWells, context), - }), - ...(input.TableUnaggregatedFieldWells != null && { - TableUnaggregatedFieldWells: se_TableUnaggregatedFieldWells(input.TableUnaggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1TableInlineVisualization - */ -const se_TableInlineVisualization = (input: TableInlineVisualization, context: __SerdeContext): any => { - return { - ...(input.DataBars != null && { DataBars: se_DataBarsOptions(input.DataBars, context) }), - }; -}; - -/** - * serializeAws_restJson1TableInlineVisualizationList - */ -const se_TableInlineVisualizationList = (input: TableInlineVisualization[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TableInlineVisualization(entry, context); - }); -}; - -/** - * serializeAws_restJson1TableOptions - */ -const se_TableOptions = (input: TableOptions, context: __SerdeContext): any => { - return { - ...(input.CellStyle != null && { CellStyle: se_TableCellStyle(input.CellStyle, context) }), - ...(input.HeaderStyle != null && { HeaderStyle: se_TableCellStyle(input.HeaderStyle, context) }), - ...(input.Orientation != null && { Orientation: input.Orientation }), - ...(input.RowAlternateColorOptions != null && { - RowAlternateColorOptions: se_RowAlternateColorOptions(input.RowAlternateColorOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1TablePaginatedReportOptions - */ -const se_TablePaginatedReportOptions = (input: TablePaginatedReportOptions, context: __SerdeContext): any => { - return { - ...(input.OverflowColumnHeaderVisibility != null && { - OverflowColumnHeaderVisibility: input.OverflowColumnHeaderVisibility, - }), - ...(input.VerticalOverflowVisibility != null && { VerticalOverflowVisibility: input.VerticalOverflowVisibility }), - }; -}; - -/** - * serializeAws_restJson1TableRowConditionalFormatting - */ -const se_TableRowConditionalFormatting = (input: TableRowConditionalFormatting, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { - BackgroundColor: se_ConditionalFormattingColor(input.BackgroundColor, context), - }), - ...(input.TextColor != null && { TextColor: se_ConditionalFormattingColor(input.TextColor, context) }), - }; -}; - -/** - * serializeAws_restJson1TableSideBorderOptions - */ -const se_TableSideBorderOptions = (input: TableSideBorderOptions, context: __SerdeContext): any => { - return { - ...(input.Bottom != null && { Bottom: se_TableBorderOptions(input.Bottom, context) }), - ...(input.InnerHorizontal != null && { InnerHorizontal: se_TableBorderOptions(input.InnerHorizontal, context) }), - ...(input.InnerVertical != null && { InnerVertical: se_TableBorderOptions(input.InnerVertical, context) }), - ...(input.Left != null && { Left: se_TableBorderOptions(input.Left, context) }), - ...(input.Right != null && { Right: se_TableBorderOptions(input.Right, context) }), - ...(input.Top != null && { Top: se_TableBorderOptions(input.Top, context) }), - }; -}; - -/** - * serializeAws_restJson1TableSortConfiguration - */ -const se_TableSortConfiguration = (input: TableSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.PaginationConfiguration != null && { - PaginationConfiguration: se_PaginationConfiguration(input.PaginationConfiguration, context), - }), - ...(input.RowSort != null && { RowSort: se_RowSortList(input.RowSort, context) }), - }; -}; - -/** - * serializeAws_restJson1TableUnaggregatedFieldWells - */ -const se_TableUnaggregatedFieldWells = (input: TableUnaggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Values != null && { Values: se_UnaggregatedFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1TableVisual - */ -const se_TableVisual = (input: TableVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_TableConfiguration(input.ChartConfiguration, context), - }), - ...(input.ConditionalFormatting != null && { - ConditionalFormatting: se_TableConditionalFormatting(input.ConditionalFormatting, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1TagColumnOperation - */ -const se_TagColumnOperation = (input: TagColumnOperation, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.Tags != null && { Tags: se_ColumnTagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_restJson1TargetVisualList - */ -const se_TargetVisualList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TemplateSourceAnalysis - */ -const se_TemplateSourceAnalysis = (input: TemplateSourceAnalysis, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.DataSetReferences != null && { - DataSetReferences: se_DataSetReferenceList(input.DataSetReferences, context), - }), - }; -}; - -/** - * serializeAws_restJson1TemplateSourceEntity - */ -const se_TemplateSourceEntity = (input: TemplateSourceEntity, context: __SerdeContext): any => { - return { - ...(input.SourceAnalysis != null && { SourceAnalysis: se_TemplateSourceAnalysis(input.SourceAnalysis, context) }), - ...(input.SourceTemplate != null && { SourceTemplate: se_TemplateSourceTemplate(input.SourceTemplate, context) }), - }; -}; - -/** - * serializeAws_restJson1TemplateSourceTemplate - */ -const se_TemplateSourceTemplate = (input: TemplateSourceTemplate, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; - -/** - * serializeAws_restJson1TemplateVersionDefinition - */ -const se_TemplateVersionDefinition = (input: TemplateVersionDefinition, context: __SerdeContext): any => { - return { - ...(input.AnalysisDefaults != null && { AnalysisDefaults: se_AnalysisDefaults(input.AnalysisDefaults, context) }), - ...(input.CalculatedFields != null && { CalculatedFields: se_CalculatedFields(input.CalculatedFields, context) }), - ...(input.ColumnConfigurations != null && { - ColumnConfigurations: se_ColumnConfigurationList(input.ColumnConfigurations, context), - }), - ...(input.DataSetConfigurations != null && { - DataSetConfigurations: se_DataSetConfigurationList(input.DataSetConfigurations, context), - }), - ...(input.FilterGroups != null && { FilterGroups: se_FilterGroupList(input.FilterGroups, context) }), - ...(input.ParameterDeclarations != null && { - ParameterDeclarations: se_ParameterDeclarationList(input.ParameterDeclarations, context), - }), - ...(input.Sheets != null && { Sheets: se_SheetDefinitionList(input.Sheets, context) }), - }; -}; - -/** - * serializeAws_restJson1TeradataParameters - */ -const se_TeradataParameters = (input: TeradataParameters, context: __SerdeContext): any => { - return { - ...(input.Database != null && { Database: input.Database }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1TextAreaControlDisplayOptions - */ -const se_TextAreaControlDisplayOptions = (input: TextAreaControlDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.PlaceholderOptions != null && { - PlaceholderOptions: se_TextControlPlaceholderOptions(input.PlaceholderOptions, context), - }), - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1TextConditionalFormat - */ -const se_TextConditionalFormat = (input: TextConditionalFormat, context: __SerdeContext): any => { - return { - ...(input.BackgroundColor != null && { - BackgroundColor: se_ConditionalFormattingColor(input.BackgroundColor, context), - }), - ...(input.Icon != null && { Icon: se_ConditionalFormattingIcon(input.Icon, context) }), - ...(input.TextColor != null && { TextColor: se_ConditionalFormattingColor(input.TextColor, context) }), - }; -}; - -/** - * serializeAws_restJson1TextControlPlaceholderOptions - */ -const se_TextControlPlaceholderOptions = (input: TextControlPlaceholderOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1TextFieldControlDisplayOptions - */ -const se_TextFieldControlDisplayOptions = (input: TextFieldControlDisplayOptions, context: __SerdeContext): any => { - return { - ...(input.PlaceholderOptions != null && { - PlaceholderOptions: se_TextControlPlaceholderOptions(input.PlaceholderOptions, context), - }), - ...(input.TitleOptions != null && { TitleOptions: se_LabelOptions(input.TitleOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1ThemeConfiguration - */ -const se_ThemeConfiguration = (input: ThemeConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataColorPalette != null && { DataColorPalette: se_DataColorPalette(input.DataColorPalette, context) }), - ...(input.Sheet != null && { Sheet: se_SheetStyle(input.Sheet, context) }), - ...(input.Typography != null && { Typography: se_Typography(input.Typography, context) }), - ...(input.UIColorPalette != null && { UIColorPalette: se_UIColorPalette(input.UIColorPalette, context) }), - }; -}; - -/** - * serializeAws_restJson1ThousandSeparatorOptions - */ -const se_ThousandSeparatorOptions = (input: ThousandSeparatorOptions, context: __SerdeContext): any => { - return { - ...(input.Symbol != null && { Symbol: input.Symbol }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1TileLayoutStyle - */ -const se_TileLayoutStyle = (input: TileLayoutStyle, context: __SerdeContext): any => { - return { - ...(input.Gutter != null && { Gutter: se_GutterStyle(input.Gutter, context) }), - ...(input.Margin != null && { Margin: se_MarginStyle(input.Margin, context) }), - }; -}; - -/** - * serializeAws_restJson1TileStyle - */ -const se_TileStyle = (input: TileStyle, context: __SerdeContext): any => { - return { - ...(input.Border != null && { Border: se_BorderStyle(input.Border, context) }), - }; -}; - -/** - * serializeAws_restJson1TimeBasedForecastProperties - */ -const se_TimeBasedForecastProperties = (input: TimeBasedForecastProperties, context: __SerdeContext): any => { - return { - ...(input.LowerBoundary != null && { LowerBoundary: __serializeFloat(input.LowerBoundary) }), - ...(input.PeriodsBackward != null && { PeriodsBackward: input.PeriodsBackward }), - ...(input.PeriodsForward != null && { PeriodsForward: input.PeriodsForward }), - ...(input.PredictionInterval != null && { PredictionInterval: input.PredictionInterval }), - ...(input.Seasonality != null && { Seasonality: input.Seasonality }), - ...(input.UpperBoundary != null && { UpperBoundary: __serializeFloat(input.UpperBoundary) }), - }; -}; - -/** - * serializeAws_restJson1TimeEqualityFilter - */ -const se_TimeEqualityFilter = (input: TimeEqualityFilter, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - ...(input.Value != null && { Value: Math.round(input.Value.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_restJson1TimeRangeDrillDownFilter - */ -const se_TimeRangeDrillDownFilter = (input: TimeRangeDrillDownFilter, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.RangeMaximum != null && { RangeMaximum: Math.round(input.RangeMaximum.getTime() / 1000) }), - ...(input.RangeMinimum != null && { RangeMinimum: Math.round(input.RangeMinimum.getTime() / 1000) }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - }; -}; - -/** - * serializeAws_restJson1TimeRangeFilter - */ -const se_TimeRangeFilter = (input: TimeRangeFilter, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.ExcludePeriodConfiguration != null && { - ExcludePeriodConfiguration: se_ExcludePeriodConfiguration(input.ExcludePeriodConfiguration, context), - }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - ...(input.IncludeMaximum != null && { IncludeMaximum: input.IncludeMaximum }), - ...(input.IncludeMinimum != null && { IncludeMinimum: input.IncludeMinimum }), - ...(input.NullOption != null && { NullOption: input.NullOption }), - ...(input.RangeMaximumValue != null && { - RangeMaximumValue: se_TimeRangeFilterValue(input.RangeMaximumValue, context), - }), - ...(input.RangeMinimumValue != null && { - RangeMinimumValue: se_TimeRangeFilterValue(input.RangeMinimumValue, context), - }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - }; -}; - -/** - * serializeAws_restJson1TimeRangeFilterValue - */ -const se_TimeRangeFilterValue = (input: TimeRangeFilterValue, context: __SerdeContext): any => { - return { - ...(input.Parameter != null && { Parameter: input.Parameter }), - ...(input.RollingDate != null && { RollingDate: se_RollingDateConfiguration(input.RollingDate, context) }), - ...(input.StaticValue != null && { StaticValue: Math.round(input.StaticValue.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_restJson1TooltipItem - */ -const se_TooltipItem = (input: TooltipItem, context: __SerdeContext): any => { - return { - ...(input.ColumnTooltipItem != null && { - ColumnTooltipItem: se_ColumnTooltipItem(input.ColumnTooltipItem, context), - }), - ...(input.FieldTooltipItem != null && { FieldTooltipItem: se_FieldTooltipItem(input.FieldTooltipItem, context) }), - }; -}; - -/** - * serializeAws_restJson1TooltipItemList - */ -const se_TooltipItemList = (input: TooltipItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TooltipItem(entry, context); - }); -}; - -/** - * serializeAws_restJson1TooltipOptions - */ -const se_TooltipOptions = (input: TooltipOptions, context: __SerdeContext): any => { - return { - ...(input.FieldBasedTooltip != null && { - FieldBasedTooltip: se_FieldBasedTooltip(input.FieldBasedTooltip, context), - }), - ...(input.SelectedTooltipType != null && { SelectedTooltipType: input.SelectedTooltipType }), - ...(input.TooltipVisibility != null && { TooltipVisibility: input.TooltipVisibility }), - }; -}; - -/** - * serializeAws_restJson1TopBottomFilter - */ -const se_TopBottomFilter = (input: TopBottomFilter, context: __SerdeContext): any => { - return { - ...(input.AggregationSortConfigurations != null && { - AggregationSortConfigurations: se_AggregationSortConfigurationList(input.AggregationSortConfigurations, context), - }), - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FilterId != null && { FilterId: input.FilterId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - ...(input.TimeGranularity != null && { TimeGranularity: input.TimeGranularity }), - }; -}; - -/** - * serializeAws_restJson1TopBottomMoversComputation - */ -const se_TopBottomMoversComputation = (input: TopBottomMoversComputation, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_DimensionField(input.Category, context) }), - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.MoverSize != null && { MoverSize: input.MoverSize }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.Time != null && { Time: se_DimensionField(input.Time, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1TopBottomRankedComputation - */ -const se_TopBottomRankedComputation = (input: TopBottomRankedComputation, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_DimensionField(input.Category, context) }), - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResultSize != null && { ResultSize: input.ResultSize }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1TotalAggregationComputation - */ -const se_TotalAggregationComputation = (input: TotalAggregationComputation, context: __SerdeContext): any => { - return { - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: se_MeasureField(input.Value, context) }), - }; -}; - -/** - * serializeAws_restJson1TotalOptions - */ -const se_TotalOptions = (input: TotalOptions, context: __SerdeContext): any => { - return { - ...(input.CustomLabel != null && { CustomLabel: input.CustomLabel }), - ...(input.Placement != null && { Placement: input.Placement }), - ...(input.ScrollStatus != null && { ScrollStatus: input.ScrollStatus }), - ...(input.TotalCellStyle != null && { TotalCellStyle: se_TableCellStyle(input.TotalCellStyle, context) }), - ...(input.TotalsVisibility != null && { TotalsVisibility: input.TotalsVisibility }), - }; -}; - -/** - * serializeAws_restJson1TransformOperation - */ -const se_TransformOperation = (input: TransformOperation, context: __SerdeContext): any => { - return TransformOperation.visit(input, { - CastColumnTypeOperation: (value) => ({ CastColumnTypeOperation: se_CastColumnTypeOperation(value, context) }), - CreateColumnsOperation: (value) => ({ CreateColumnsOperation: se_CreateColumnsOperation(value, context) }), - FilterOperation: (value) => ({ FilterOperation: se_FilterOperation(value, context) }), - ProjectOperation: (value) => ({ ProjectOperation: se_ProjectOperation(value, context) }), - RenameColumnOperation: (value) => ({ RenameColumnOperation: se_RenameColumnOperation(value, context) }), - TagColumnOperation: (value) => ({ TagColumnOperation: se_TagColumnOperation(value, context) }), - UntagColumnOperation: (value) => ({ UntagColumnOperation: se_UntagColumnOperation(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_restJson1TransformOperationList - */ -const se_TransformOperationList = (input: TransformOperation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TransformOperation(entry, context); - }); -}; - -/** - * serializeAws_restJson1TreeMapAggregatedFieldWells - */ -const se_TreeMapAggregatedFieldWells = (input: TreeMapAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.Colors != null && { Colors: se_TreeMapMeasureFieldList(input.Colors, context) }), - ...(input.Groups != null && { Groups: se_TreeMapDimensionFieldList(input.Groups, context) }), - ...(input.Sizes != null && { Sizes: se_TreeMapMeasureFieldList(input.Sizes, context) }), - }; -}; - -/** - * serializeAws_restJson1TreeMapConfiguration - */ -const se_TreeMapConfiguration = (input: TreeMapConfiguration, context: __SerdeContext): any => { - return { - ...(input.ColorLabelOptions != null && { - ColorLabelOptions: se_ChartAxisLabelOptions(input.ColorLabelOptions, context), - }), - ...(input.ColorScale != null && { ColorScale: se_ColorScale(input.ColorScale, context) }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_TreeMapFieldWells(input.FieldWells, context) }), - ...(input.GroupLabelOptions != null && { - GroupLabelOptions: se_ChartAxisLabelOptions(input.GroupLabelOptions, context), - }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.SizeLabelOptions != null && { - SizeLabelOptions: se_ChartAxisLabelOptions(input.SizeLabelOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_TreeMapSortConfiguration(input.SortConfiguration, context), - }), - ...(input.Tooltip != null && { Tooltip: se_TooltipOptions(input.Tooltip, context) }), - }; -}; - -/** - * serializeAws_restJson1TreeMapDimensionFieldList - */ -const se_TreeMapDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1TreeMapFieldWells - */ -const se_TreeMapFieldWells = (input: TreeMapFieldWells, context: __SerdeContext): any => { - return { - ...(input.TreeMapAggregatedFieldWells != null && { - TreeMapAggregatedFieldWells: se_TreeMapAggregatedFieldWells(input.TreeMapAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1TreeMapMeasureFieldList - */ -const se_TreeMapMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1TreeMapSortConfiguration - */ -const se_TreeMapSortConfiguration = (input: TreeMapSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.TreeMapGroupItemsLimitConfiguration != null && { - TreeMapGroupItemsLimitConfiguration: se_ItemsLimitConfiguration( - input.TreeMapGroupItemsLimitConfiguration, - context - ), - }), - ...(input.TreeMapSort != null && { TreeMapSort: se_FieldSortOptionsList(input.TreeMapSort, context) }), - }; -}; - -/** - * serializeAws_restJson1TreeMapVisual - */ -const se_TreeMapVisual = (input: TreeMapVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_TreeMapConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1TrendArrowOptions - */ -const se_TrendArrowOptions = (input: TrendArrowOptions, context: __SerdeContext): any => { - return { - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1TwitterParameters - */ -const se_TwitterParameters = (input: TwitterParameters, context: __SerdeContext): any => { - return { - ...(input.MaxRows != null && { MaxRows: input.MaxRows }), - ...(input.Query != null && { Query: input.Query }), - }; -}; - -/** - * serializeAws_restJson1Typography - */ -const se_Typography = (input: Typography, context: __SerdeContext): any => { - return { - ...(input.FontFamilies != null && { FontFamilies: se_FontList(input.FontFamilies, context) }), - }; -}; - -/** - * serializeAws_restJson1UIColorPalette - */ -const se_UIColorPalette = (input: UIColorPalette, context: __SerdeContext): any => { - return { - ...(input.Accent != null && { Accent: input.Accent }), - ...(input.AccentForeground != null && { AccentForeground: input.AccentForeground }), - ...(input.Danger != null && { Danger: input.Danger }), - ...(input.DangerForeground != null && { DangerForeground: input.DangerForeground }), - ...(input.Dimension != null && { Dimension: input.Dimension }), - ...(input.DimensionForeground != null && { DimensionForeground: input.DimensionForeground }), - ...(input.Measure != null && { Measure: input.Measure }), - ...(input.MeasureForeground != null && { MeasureForeground: input.MeasureForeground }), - ...(input.PrimaryBackground != null && { PrimaryBackground: input.PrimaryBackground }), - ...(input.PrimaryForeground != null && { PrimaryForeground: input.PrimaryForeground }), - ...(input.SecondaryBackground != null && { SecondaryBackground: input.SecondaryBackground }), - ...(input.SecondaryForeground != null && { SecondaryForeground: input.SecondaryForeground }), - ...(input.Success != null && { Success: input.Success }), - ...(input.SuccessForeground != null && { SuccessForeground: input.SuccessForeground }), - ...(input.Warning != null && { Warning: input.Warning }), - ...(input.WarningForeground != null && { WarningForeground: input.WarningForeground }), - }; -}; - -/** - * serializeAws_restJson1UnaggregatedField - */ -const se_UnaggregatedField = (input: UnaggregatedField, context: __SerdeContext): any => { - return { - ...(input.Column != null && { Column: se_ColumnIdentifier(input.Column, context) }), - ...(input.FieldId != null && { FieldId: input.FieldId }), - ...(input.FormatConfiguration != null && { - FormatConfiguration: se_FormatConfiguration(input.FormatConfiguration, context), - }), - }; -}; - -/** - * serializeAws_restJson1UnaggregatedFieldList - */ -const se_UnaggregatedFieldList = (input: UnaggregatedField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UnaggregatedField(entry, context); - }); -}; - -/** - * serializeAws_restJson1UniqueValuesComputation - */ -const se_UniqueValuesComputation = (input: UniqueValuesComputation, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: se_DimensionField(input.Category, context) }), - ...(input.ComputationId != null && { ComputationId: input.ComputationId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1UntagColumnOperation - */ -const se_UntagColumnOperation = (input: UntagColumnOperation, context: __SerdeContext): any => { - return { - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.TagNames != null && { TagNames: se_ColumnTagNames(input.TagNames, context) }), - }; -}; - -/** - * serializeAws_restJson1UpdateLinkPermissionList - */ -const se_UpdateLinkPermissionList = (input: ResourcePermission[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourcePermission(entry, context); - }); -}; - -/** - * serializeAws_restJson1UpdateResourcePermissionList - */ -const se_UpdateResourcePermissionList = (input: ResourcePermission[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourcePermission(entry, context); - }); -}; - -/** - * serializeAws_restJson1UploadSettings - */ -const se_UploadSettings = (input: UploadSettings, context: __SerdeContext): any => { - return { - ...(input.ContainsHeader != null && { ContainsHeader: input.ContainsHeader }), - ...(input.Delimiter != null && { Delimiter: input.Delimiter }), - ...(input.Format != null && { Format: input.Format }), - ...(input.StartFromRow != null && { StartFromRow: input.StartFromRow }), - ...(input.TextQualifier != null && { TextQualifier: input.TextQualifier }), - }; -}; - -/** - * serializeAws_restJson1VisibleRangeOptions - */ -const se_VisibleRangeOptions = (input: VisibleRangeOptions, context: __SerdeContext): any => { - return { - ...(input.PercentRange != null && { PercentRange: se_PercentVisibleRange(input.PercentRange, context) }), - }; -}; - -/** - * serializeAws_restJson1Visual - */ -const se_Visual = (input: Visual, context: __SerdeContext): any => { - return { - ...(input.BarChartVisual != null && { BarChartVisual: se_BarChartVisual(input.BarChartVisual, context) }), - ...(input.BoxPlotVisual != null && { BoxPlotVisual: se_BoxPlotVisual(input.BoxPlotVisual, context) }), - ...(input.ComboChartVisual != null && { ComboChartVisual: se_ComboChartVisual(input.ComboChartVisual, context) }), - ...(input.CustomContentVisual != null && { - CustomContentVisual: se_CustomContentVisual(input.CustomContentVisual, context), - }), - ...(input.EmptyVisual != null && { EmptyVisual: se_EmptyVisual(input.EmptyVisual, context) }), - ...(input.FilledMapVisual != null && { FilledMapVisual: se_FilledMapVisual(input.FilledMapVisual, context) }), - ...(input.FunnelChartVisual != null && { - FunnelChartVisual: se_FunnelChartVisual(input.FunnelChartVisual, context), - }), - ...(input.GaugeChartVisual != null && { GaugeChartVisual: se_GaugeChartVisual(input.GaugeChartVisual, context) }), - ...(input.GeospatialMapVisual != null && { - GeospatialMapVisual: se_GeospatialMapVisual(input.GeospatialMapVisual, context), - }), - ...(input.HeatMapVisual != null && { HeatMapVisual: se_HeatMapVisual(input.HeatMapVisual, context) }), - ...(input.HistogramVisual != null && { HistogramVisual: se_HistogramVisual(input.HistogramVisual, context) }), - ...(input.InsightVisual != null && { InsightVisual: se_InsightVisual(input.InsightVisual, context) }), - ...(input.KPIVisual != null && { KPIVisual: se_KPIVisual(input.KPIVisual, context) }), - ...(input.LineChartVisual != null && { LineChartVisual: se_LineChartVisual(input.LineChartVisual, context) }), - ...(input.PieChartVisual != null && { PieChartVisual: se_PieChartVisual(input.PieChartVisual, context) }), - ...(input.PivotTableVisual != null && { PivotTableVisual: se_PivotTableVisual(input.PivotTableVisual, context) }), - ...(input.RadarChartVisual != null && { RadarChartVisual: se_RadarChartVisual(input.RadarChartVisual, context) }), - ...(input.SankeyDiagramVisual != null && { - SankeyDiagramVisual: se_SankeyDiagramVisual(input.SankeyDiagramVisual, context), - }), - ...(input.ScatterPlotVisual != null && { - ScatterPlotVisual: se_ScatterPlotVisual(input.ScatterPlotVisual, context), - }), - ...(input.TableVisual != null && { TableVisual: se_TableVisual(input.TableVisual, context) }), - ...(input.TreeMapVisual != null && { TreeMapVisual: se_TreeMapVisual(input.TreeMapVisual, context) }), - ...(input.WaterfallVisual != null && { WaterfallVisual: se_WaterfallVisual(input.WaterfallVisual, context) }), - ...(input.WordCloudVisual != null && { WordCloudVisual: se_WordCloudVisual(input.WordCloudVisual, context) }), - }; -}; - -/** - * serializeAws_restJson1VisualAxisSortOption - */ -const se_VisualAxisSortOption = (input: VisualAxisSortOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; -}; - -/** - * serializeAws_restJson1VisualCustomAction - */ -const se_VisualCustomAction = (input: VisualCustomAction, context: __SerdeContext): any => { - return { - ...(input.ActionOperations != null && { - ActionOperations: se_VisualCustomActionOperationList(input.ActionOperations, context), - }), - ...(input.CustomActionId != null && { CustomActionId: input.CustomActionId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Trigger != null && { Trigger: input.Trigger }), - }; -}; - -/** - * serializeAws_restJson1VisualCustomActionList - */ -const se_VisualCustomActionList = (input: VisualCustomAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VisualCustomAction(entry, context); - }); -}; - -/** - * serializeAws_restJson1VisualCustomActionOperation - */ -const se_VisualCustomActionOperation = (input: VisualCustomActionOperation, context: __SerdeContext): any => { - return { - ...(input.FilterOperation != null && { - FilterOperation: se_CustomActionFilterOperation(input.FilterOperation, context), - }), - ...(input.NavigationOperation != null && { - NavigationOperation: se_CustomActionNavigationOperation(input.NavigationOperation, context), - }), - ...(input.SetParametersOperation != null && { - SetParametersOperation: se_CustomActionSetParametersOperation(input.SetParametersOperation, context), - }), - ...(input.URLOperation != null && { URLOperation: se_CustomActionURLOperation(input.URLOperation, context) }), - }; -}; - -/** - * serializeAws_restJson1VisualCustomActionOperationList - */ -const se_VisualCustomActionOperationList = (input: VisualCustomActionOperation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VisualCustomActionOperation(entry, context); - }); -}; - -/** - * serializeAws_restJson1VisualList - */ -const se_VisualList = (input: Visual[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Visual(entry, context); - }); -}; - -/** - * serializeAws_restJson1VisualMenuOption - */ -const se_VisualMenuOption = (input: VisualMenuOption, context: __SerdeContext): any => { - return { - ...(input.AvailabilityStatus != null && { AvailabilityStatus: input.AvailabilityStatus }), - }; -}; - -/** - * serializeAws_restJson1VisualPalette - */ -const se_VisualPalette = (input: VisualPalette, context: __SerdeContext): any => { - return { - ...(input.ChartColor != null && { ChartColor: input.ChartColor }), - ...(input.ColorMap != null && { ColorMap: se_DataPathColorList(input.ColorMap, context) }), - }; -}; - -/** - * serializeAws_restJson1VisualSubtitleLabelOptions - */ -const se_VisualSubtitleLabelOptions = (input: VisualSubtitleLabelOptions, context: __SerdeContext): any => { - return { - ...(input.FormatText != null && { FormatText: se_LongFormatText(input.FormatText, context) }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1VisualTitleLabelOptions - */ -const se_VisualTitleLabelOptions = (input: VisualTitleLabelOptions, context: __SerdeContext): any => { - return { - ...(input.FormatText != null && { FormatText: se_ShortFormatText(input.FormatText, context) }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }; -}; - -/** - * serializeAws_restJson1VpcConnectionProperties - */ -const se_VpcConnectionProperties = (input: VpcConnectionProperties, context: __SerdeContext): any => { - return { - ...(input.VpcConnectionArn != null && { VpcConnectionArn: input.VpcConnectionArn }), - }; -}; - -/** - * serializeAws_restJson1WaterfallChartAggregatedFieldWells - */ -const se_WaterfallChartAggregatedFieldWells = ( - input: WaterfallChartAggregatedFieldWells, - context: __SerdeContext -): any => { - return { - ...(input.Breakdowns != null && { Breakdowns: se_DimensionFieldList(input.Breakdowns, context) }), - ...(input.Categories != null && { Categories: se_DimensionFieldList(input.Categories, context) }), - ...(input.Values != null && { Values: se_MeasureFieldList(input.Values, context) }), - }; -}; - -/** - * serializeAws_restJson1WaterfallChartConfiguration - */ -const se_WaterfallChartConfiguration = (input: WaterfallChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryAxisDisplayOptions != null && { - CategoryAxisDisplayOptions: se_AxisDisplayOptions(input.CategoryAxisDisplayOptions, context), - }), - ...(input.CategoryAxisLabelOptions != null && { - CategoryAxisLabelOptions: se_ChartAxisLabelOptions(input.CategoryAxisLabelOptions, context), - }), - ...(input.DataLabels != null && { DataLabels: se_DataLabelOptions(input.DataLabels, context) }), - ...(input.FieldWells != null && { FieldWells: se_WaterfallChartFieldWells(input.FieldWells, context) }), - ...(input.Legend != null && { Legend: se_LegendOptions(input.Legend, context) }), - ...(input.PrimaryYAxisDisplayOptions != null && { - PrimaryYAxisDisplayOptions: se_AxisDisplayOptions(input.PrimaryYAxisDisplayOptions, context), - }), - ...(input.PrimaryYAxisLabelOptions != null && { - PrimaryYAxisLabelOptions: se_ChartAxisLabelOptions(input.PrimaryYAxisLabelOptions, context), - }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_WaterfallChartSortConfiguration(input.SortConfiguration, context), - }), - ...(input.VisualPalette != null && { VisualPalette: se_VisualPalette(input.VisualPalette, context) }), - ...(input.WaterfallChartOptions != null && { - WaterfallChartOptions: se_WaterfallChartOptions(input.WaterfallChartOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1WaterfallChartFieldWells - */ -const se_WaterfallChartFieldWells = (input: WaterfallChartFieldWells, context: __SerdeContext): any => { - return { - ...(input.WaterfallChartAggregatedFieldWells != null && { - WaterfallChartAggregatedFieldWells: se_WaterfallChartAggregatedFieldWells( - input.WaterfallChartAggregatedFieldWells, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1WaterfallChartOptions - */ -const se_WaterfallChartOptions = (input: WaterfallChartOptions, context: __SerdeContext): any => { - return { - ...(input.TotalBarLabel != null && { TotalBarLabel: input.TotalBarLabel }), - }; -}; - -/** - * serializeAws_restJson1WaterfallChartSortConfiguration - */ -const se_WaterfallChartSortConfiguration = (input: WaterfallChartSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.BreakdownItemsLimit != null && { - BreakdownItemsLimit: se_ItemsLimitConfiguration(input.BreakdownItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - }; -}; - -/** - * serializeAws_restJson1WaterfallVisual - */ -const se_WaterfallVisual = (input: WaterfallVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_WaterfallChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * serializeAws_restJson1WhatIfPointScenario - */ -const se_WhatIfPointScenario = (input: WhatIfPointScenario, context: __SerdeContext): any => { - return { - ...(input.Date != null && { Date: Math.round(input.Date.getTime() / 1000) }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1WhatIfRangeScenario - */ -const se_WhatIfRangeScenario = (input: WhatIfRangeScenario, context: __SerdeContext): any => { - return { - ...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }), - ...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1WordCloudAggregatedFieldWells - */ -const se_WordCloudAggregatedFieldWells = (input: WordCloudAggregatedFieldWells, context: __SerdeContext): any => { - return { - ...(input.GroupBy != null && { GroupBy: se_WordCloudDimensionFieldList(input.GroupBy, context) }), - ...(input.Size != null && { Size: se_WordCloudMeasureFieldList(input.Size, context) }), - }; -}; - -/** - * serializeAws_restJson1WordCloudChartConfiguration - */ -const se_WordCloudChartConfiguration = (input: WordCloudChartConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryLabelOptions != null && { - CategoryLabelOptions: se_ChartAxisLabelOptions(input.CategoryLabelOptions, context), - }), - ...(input.FieldWells != null && { FieldWells: se_WordCloudFieldWells(input.FieldWells, context) }), - ...(input.SortConfiguration != null && { - SortConfiguration: se_WordCloudSortConfiguration(input.SortConfiguration, context), - }), - ...(input.WordCloudOptions != null && { WordCloudOptions: se_WordCloudOptions(input.WordCloudOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1WordCloudDimensionFieldList - */ -const se_WordCloudDimensionFieldList = (input: DimensionField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionField(entry, context); - }); -}; - -/** - * serializeAws_restJson1WordCloudFieldWells - */ -const se_WordCloudFieldWells = (input: WordCloudFieldWells, context: __SerdeContext): any => { - return { - ...(input.WordCloudAggregatedFieldWells != null && { - WordCloudAggregatedFieldWells: se_WordCloudAggregatedFieldWells(input.WordCloudAggregatedFieldWells, context), - }), - }; -}; - -/** - * serializeAws_restJson1WordCloudMeasureFieldList - */ -const se_WordCloudMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureField(entry, context); - }); -}; - -/** - * serializeAws_restJson1WordCloudOptions - */ -const se_WordCloudOptions = (input: WordCloudOptions, context: __SerdeContext): any => { - return { - ...(input.CloudLayout != null && { CloudLayout: input.CloudLayout }), - ...(input.MaximumStringLength != null && { MaximumStringLength: input.MaximumStringLength }), - ...(input.WordCasing != null && { WordCasing: input.WordCasing }), - ...(input.WordOrientation != null && { WordOrientation: input.WordOrientation }), - ...(input.WordPadding != null && { WordPadding: input.WordPadding }), - ...(input.WordScaling != null && { WordScaling: input.WordScaling }), - }; -}; - -/** - * serializeAws_restJson1WordCloudSortConfiguration - */ -const se_WordCloudSortConfiguration = (input: WordCloudSortConfiguration, context: __SerdeContext): any => { - return { - ...(input.CategoryItemsLimit != null && { - CategoryItemsLimit: se_ItemsLimitConfiguration(input.CategoryItemsLimit, context), - }), - ...(input.CategorySort != null && { CategorySort: se_FieldSortOptionsList(input.CategorySort, context) }), - }; -}; - -/** - * serializeAws_restJson1WordCloudVisual - */ -const se_WordCloudVisual = (input: WordCloudVisual, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_VisualCustomActionList(input.Actions, context) }), - ...(input.ChartConfiguration != null && { - ChartConfiguration: se_WordCloudChartConfiguration(input.ChartConfiguration, context), - }), - ...(input.ColumnHierarchies != null && { - ColumnHierarchies: se_ColumnHierarchyList(input.ColumnHierarchies, context), - }), - ...(input.Subtitle != null && { Subtitle: se_VisualSubtitleLabelOptions(input.Subtitle, context) }), - ...(input.Title != null && { Title: se_VisualTitleLabelOptions(input.Title, context) }), - ...(input.VisualId != null && { VisualId: input.VisualId }), - }; -}; - -/** - * deserializeAws_restJson1AccountCustomization - */ -const de_AccountCustomization = (output: any, context: __SerdeContext): AccountCustomization => { - return { - DefaultEmailCustomizationTemplate: __expectString(output.DefaultEmailCustomizationTemplate), - DefaultTheme: __expectString(output.DefaultTheme), - } as any; -}; - -/** - * deserializeAws_restJson1AccountInfo - */ -const de_AccountInfo = (output: any, context: __SerdeContext): AccountInfo => { - return { - AccountName: __expectString(output.AccountName), - AccountSubscriptionStatus: __expectString(output.AccountSubscriptionStatus), - AuthenticationType: __expectString(output.AuthenticationType), - Edition: __expectString(output.Edition), - NotificationEmail: __expectString(output.NotificationEmail), - } as any; -}; - -/** - * deserializeAws_restJson1AccountSettings - */ -const de_AccountSettings = (output: any, context: __SerdeContext): AccountSettings => { - return { - AccountName: __expectString(output.AccountName), - DefaultNamespace: __expectString(output.DefaultNamespace), - Edition: __expectString(output.Edition), - NotificationEmail: __expectString(output.NotificationEmail), - PublicSharingEnabled: __expectBoolean(output.PublicSharingEnabled), - TerminationProtectionEnabled: __expectBoolean(output.TerminationProtectionEnabled), - } as any; -}; - -/** - * deserializeAws_restJson1ActionList - */ -const de_ActionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ActiveIAMPolicyAssignment - */ -const de_ActiveIAMPolicyAssignment = (output: any, context: __SerdeContext): ActiveIAMPolicyAssignment => { - return { - AssignmentName: __expectString(output.AssignmentName), - PolicyArn: __expectString(output.PolicyArn), - } as any; -}; - -/** - * deserializeAws_restJson1ActiveIAMPolicyAssignmentList - */ -const de_ActiveIAMPolicyAssignmentList = (output: any, context: __SerdeContext): ActiveIAMPolicyAssignment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActiveIAMPolicyAssignment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdHocFilteringOption - */ -const de_AdHocFilteringOption = (output: any, context: __SerdeContext): AdHocFilteringOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1AggregationFunction - */ -const de_AggregationFunction = (output: any, context: __SerdeContext): AggregationFunction => { - return { - CategoricalAggregationFunction: __expectString(output.CategoricalAggregationFunction), - DateAggregationFunction: __expectString(output.DateAggregationFunction), - NumericalAggregationFunction: - output.NumericalAggregationFunction != null - ? de_NumericalAggregationFunction(output.NumericalAggregationFunction, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AggregationSortConfiguration - */ -const de_AggregationSortConfiguration = (output: any, context: __SerdeContext): AggregationSortConfiguration => { - return { - AggregationFunction: - output.AggregationFunction != null ? de_AggregationFunction(output.AggregationFunction, context) : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - SortDirection: __expectString(output.SortDirection), - } as any; -}; - -/** - * deserializeAws_restJson1AggregationSortConfigurationList - */ -const de_AggregationSortConfigurationList = (output: any, context: __SerdeContext): AggregationSortConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AggregationSortConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AmazonElasticsearchParameters - */ -const de_AmazonElasticsearchParameters = (output: any, context: __SerdeContext): AmazonElasticsearchParameters => { - return { - Domain: __expectString(output.Domain), - } as any; -}; - -/** - * deserializeAws_restJson1AmazonOpenSearchParameters - */ -const de_AmazonOpenSearchParameters = (output: any, context: __SerdeContext): AmazonOpenSearchParameters => { - return { - Domain: __expectString(output.Domain), - } as any; -}; - -/** - * deserializeAws_restJson1Analysis - */ -const de_Analysis = (output: any, context: __SerdeContext): Analysis => { - return { - AnalysisId: __expectString(output.AnalysisId), - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSetArns: output.DataSetArns != null ? de_DataSetArnsList(output.DataSetArns, context) : undefined, - Errors: output.Errors != null ? de_AnalysisErrorList(output.Errors, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - Sheets: output.Sheets != null ? de_SheetList(output.Sheets, context) : undefined, - Status: __expectString(output.Status), - ThemeArn: __expectString(output.ThemeArn), - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisDefaults - */ -const de_AnalysisDefaults = (output: any, context: __SerdeContext): AnalysisDefaults => { - return { - DefaultNewSheetConfiguration: - output.DefaultNewSheetConfiguration != null - ? de_DefaultNewSheetConfiguration(output.DefaultNewSheetConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisDefinition - */ -const de_AnalysisDefinition = (output: any, context: __SerdeContext): AnalysisDefinition => { - return { - AnalysisDefaults: - output.AnalysisDefaults != null ? de_AnalysisDefaults(output.AnalysisDefaults, context) : undefined, - CalculatedFields: - output.CalculatedFields != null ? de_CalculatedFields(output.CalculatedFields, context) : undefined, - ColumnConfigurations: - output.ColumnConfigurations != null - ? de_ColumnConfigurationList(output.ColumnConfigurations, context) - : undefined, - DataSetIdentifierDeclarations: - output.DataSetIdentifierDeclarations != null - ? de_DataSetIdentifierDeclarationList(output.DataSetIdentifierDeclarations, context) - : undefined, - FilterGroups: output.FilterGroups != null ? de_FilterGroupList(output.FilterGroups, context) : undefined, - ParameterDeclarations: - output.ParameterDeclarations != null - ? de_ParameterDeclarationList(output.ParameterDeclarations, context) - : undefined, - Sheets: output.Sheets != null ? de_SheetDefinitionList(output.Sheets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisError - */ -const de_AnalysisError = (output: any, context: __SerdeContext): AnalysisError => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - ViolatedEntities: output.ViolatedEntities != null ? de_EntityList(output.ViolatedEntities, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisErrorList - */ -const de_AnalysisErrorList = (output: any, context: __SerdeContext): AnalysisError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnalysisError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnalysisSummary - */ -const de_AnalysisSummary = (output: any, context: __SerdeContext): AnalysisSummary => { - return { - AnalysisId: __expectString(output.AnalysisId), - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AnalysisSummaryList - */ -const de_AnalysisSummaryList = (output: any, context: __SerdeContext): AnalysisSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnalysisSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnchorDateConfiguration - */ -const de_AnchorDateConfiguration = (output: any, context: __SerdeContext): AnchorDateConfiguration => { - return { - AnchorOption: __expectString(output.AnchorOption), - ParameterName: __expectString(output.ParameterName), - } as any; -}; - -/** - * deserializeAws_restJson1ArcAxisConfiguration - */ -const de_ArcAxisConfiguration = (output: any, context: __SerdeContext): ArcAxisConfiguration => { - return { - Range: output.Range != null ? de_ArcAxisDisplayRange(output.Range, context) : undefined, - ReserveRange: __expectInt32(output.ReserveRange), - } as any; -}; - -/** - * deserializeAws_restJson1ArcAxisDisplayRange - */ -const de_ArcAxisDisplayRange = (output: any, context: __SerdeContext): ArcAxisDisplayRange => { - return { - Max: __limitedParseDouble(output.Max), - Min: __limitedParseDouble(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1ArcConfiguration - */ -const de_ArcConfiguration = (output: any, context: __SerdeContext): ArcConfiguration => { - return { - ArcAngle: __limitedParseDouble(output.ArcAngle), - ArcThickness: __expectString(output.ArcThickness), - } as any; -}; - -/** - * deserializeAws_restJson1ArcOptions - */ -const de_ArcOptions = (output: any, context: __SerdeContext): ArcOptions => { - return { - ArcThickness: __expectString(output.ArcThickness), - } as any; -}; - -/** - * deserializeAws_restJson1AthenaParameters - */ -const de_AthenaParameters = (output: any, context: __SerdeContext): AthenaParameters => { - return { - RoleArn: __expectString(output.RoleArn), - WorkGroup: __expectString(output.WorkGroup), - } as any; -}; - -/** - * deserializeAws_restJson1AuroraParameters - */ -const de_AuroraParameters = (output: any, context: __SerdeContext): AuroraParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; - -/** - * deserializeAws_restJson1AuroraPostgreSqlParameters - */ -const de_AuroraPostgreSqlParameters = (output: any, context: __SerdeContext): AuroraPostgreSqlParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; - -/** - * deserializeAws_restJson1AwsIotAnalyticsParameters - */ -const de_AwsIotAnalyticsParameters = (output: any, context: __SerdeContext): AwsIotAnalyticsParameters => { - return { - DataSetName: __expectString(output.DataSetName), - } as any; -}; - -/** - * deserializeAws_restJson1AxisDataOptions - */ -const de_AxisDataOptions = (output: any, context: __SerdeContext): AxisDataOptions => { - return { - DateAxisOptions: output.DateAxisOptions != null ? de_DateAxisOptions(output.DateAxisOptions, context) : undefined, - NumericAxisOptions: - output.NumericAxisOptions != null ? de_NumericAxisOptions(output.NumericAxisOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AxisDisplayDataDrivenRange - */ -const de_AxisDisplayDataDrivenRange = (output: any, context: __SerdeContext): AxisDisplayDataDrivenRange => { - return {} as any; -}; - -/** - * deserializeAws_restJson1AxisDisplayMinMaxRange - */ -const de_AxisDisplayMinMaxRange = (output: any, context: __SerdeContext): AxisDisplayMinMaxRange => { - return { - Maximum: __limitedParseDouble(output.Maximum), - Minimum: __limitedParseDouble(output.Minimum), - } as any; -}; - -/** - * deserializeAws_restJson1AxisDisplayOptions - */ -const de_AxisDisplayOptions = (output: any, context: __SerdeContext): AxisDisplayOptions => { - return { - AxisLineVisibility: __expectString(output.AxisLineVisibility), - AxisOffset: __expectString(output.AxisOffset), - DataOptions: output.DataOptions != null ? de_AxisDataOptions(output.DataOptions, context) : undefined, - GridLineVisibility: __expectString(output.GridLineVisibility), - ScrollbarOptions: - output.ScrollbarOptions != null ? de_ScrollBarOptions(output.ScrollbarOptions, context) : undefined, - TickLabelOptions: - output.TickLabelOptions != null ? de_AxisTickLabelOptions(output.TickLabelOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AxisDisplayRange - */ -const de_AxisDisplayRange = (output: any, context: __SerdeContext): AxisDisplayRange => { - return { - DataDriven: output.DataDriven != null ? de_AxisDisplayDataDrivenRange(output.DataDriven, context) : undefined, - MinMax: output.MinMax != null ? de_AxisDisplayMinMaxRange(output.MinMax, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AxisLabelOptions - */ -const de_AxisLabelOptions = (output: any, context: __SerdeContext): AxisLabelOptions => { - return { - ApplyTo: output.ApplyTo != null ? de_AxisLabelReferenceOptions(output.ApplyTo, context) : undefined, - CustomLabel: __expectString(output.CustomLabel), - FontConfiguration: - output.FontConfiguration != null ? de_FontConfiguration(output.FontConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AxisLabelOptionsList - */ -const de_AxisLabelOptionsList = (output: any, context: __SerdeContext): AxisLabelOptions[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AxisLabelOptions(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AxisLabelReferenceOptions - */ -const de_AxisLabelReferenceOptions = (output: any, context: __SerdeContext): AxisLabelReferenceOptions => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - } as any; -}; - -/** - * deserializeAws_restJson1AxisLinearScale - */ -const de_AxisLinearScale = (output: any, context: __SerdeContext): AxisLinearScale => { - return { - StepCount: __expectInt32(output.StepCount), - StepSize: __limitedParseDouble(output.StepSize), - } as any; -}; - -/** - * deserializeAws_restJson1AxisLogarithmicScale - */ -const de_AxisLogarithmicScale = (output: any, context: __SerdeContext): AxisLogarithmicScale => { - return { - Base: __limitedParseDouble(output.Base), - } as any; -}; - -/** - * deserializeAws_restJson1AxisScale - */ -const de_AxisScale = (output: any, context: __SerdeContext): AxisScale => { - return { - Linear: output.Linear != null ? de_AxisLinearScale(output.Linear, context) : undefined, - Logarithmic: output.Logarithmic != null ? de_AxisLogarithmicScale(output.Logarithmic, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AxisTickLabelOptions - */ -const de_AxisTickLabelOptions = (output: any, context: __SerdeContext): AxisTickLabelOptions => { - return { - LabelOptions: output.LabelOptions != null ? de_LabelOptions(output.LabelOptions, context) : undefined, - RotationAngle: __limitedParseDouble(output.RotationAngle), - } as any; -}; - -/** - * deserializeAws_restJson1BarChartAggregatedFieldWells - */ -const de_BarChartAggregatedFieldWells = (output: any, context: __SerdeContext): BarChartAggregatedFieldWells => { - return { - Category: output.Category != null ? de_DimensionFieldList(output.Category, context) : undefined, - Colors: output.Colors != null ? de_DimensionFieldList(output.Colors, context) : undefined, - SmallMultiples: - output.SmallMultiples != null ? de_SmallMultiplesDimensionFieldList(output.SmallMultiples, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BarChartConfiguration - */ -const de_BarChartConfiguration = (output: any, context: __SerdeContext): BarChartConfiguration => { - return { - BarsArrangement: __expectString(output.BarsArrangement), - CategoryAxis: output.CategoryAxis != null ? de_AxisDisplayOptions(output.CategoryAxis, context) : undefined, - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - ColorLabelOptions: - output.ColorLabelOptions != null ? de_ChartAxisLabelOptions(output.ColorLabelOptions, context) : undefined, - ContributionAnalysisDefaults: - output.ContributionAnalysisDefaults != null - ? de_ContributionAnalysisDefaultList(output.ContributionAnalysisDefaults, context) - : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_BarChartFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - Orientation: __expectString(output.Orientation), - ReferenceLines: output.ReferenceLines != null ? de_ReferenceLineList(output.ReferenceLines, context) : undefined, - SmallMultiplesOptions: - output.SmallMultiplesOptions != null - ? de_SmallMultiplesOptions(output.SmallMultiplesOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_BarChartSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - ValueAxis: output.ValueAxis != null ? de_AxisDisplayOptions(output.ValueAxis, context) : undefined, - ValueLabelOptions: - output.ValueLabelOptions != null ? de_ChartAxisLabelOptions(output.ValueLabelOptions, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BarChartFieldWells - */ -const de_BarChartFieldWells = (output: any, context: __SerdeContext): BarChartFieldWells => { - return { - BarChartAggregatedFieldWells: - output.BarChartAggregatedFieldWells != null - ? de_BarChartAggregatedFieldWells(output.BarChartAggregatedFieldWells, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BarChartSortConfiguration - */ -const de_BarChartSortConfiguration = (output: any, context: __SerdeContext): BarChartSortConfiguration => { - return { - CategoryItemsLimit: - output.CategoryItemsLimit != null ? de_ItemsLimitConfiguration(output.CategoryItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - ColorItemsLimit: - output.ColorItemsLimit != null ? de_ItemsLimitConfiguration(output.ColorItemsLimit, context) : undefined, - ColorSort: output.ColorSort != null ? de_FieldSortOptionsList(output.ColorSort, context) : undefined, - SmallMultiplesLimitConfiguration: - output.SmallMultiplesLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.SmallMultiplesLimitConfiguration, context) - : undefined, - SmallMultiplesSort: - output.SmallMultiplesSort != null ? de_FieldSortOptionsList(output.SmallMultiplesSort, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BarChartVisual - */ -const de_BarChartVisual = (output: any, context: __SerdeContext): BarChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_BarChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1BinCountOptions - */ -const de_BinCountOptions = (output: any, context: __SerdeContext): BinCountOptions => { - return { - Value: __expectInt32(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1BinWidthOptions - */ -const de_BinWidthOptions = (output: any, context: __SerdeContext): BinWidthOptions => { - return { - BinCountLimit: __expectLong(output.BinCountLimit), - Value: __limitedParseDouble(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1BodySectionConfiguration - */ -const de_BodySectionConfiguration = (output: any, context: __SerdeContext): BodySectionConfiguration => { - return { - Content: output.Content != null ? de_BodySectionContent(output.Content, context) : undefined, - PageBreakConfiguration: - output.PageBreakConfiguration != null - ? de_SectionPageBreakConfiguration(output.PageBreakConfiguration, context) - : undefined, - SectionId: __expectString(output.SectionId), - Style: output.Style != null ? de_SectionStyle(output.Style, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BodySectionConfigurationList - */ -const de_BodySectionConfigurationList = (output: any, context: __SerdeContext): BodySectionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BodySectionConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BodySectionContent - */ -const de_BodySectionContent = (output: any, context: __SerdeContext): BodySectionContent => { - return { - Layout: output.Layout != null ? de_SectionLayoutConfiguration(output.Layout, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BorderStyle - */ -const de_BorderStyle = (output: any, context: __SerdeContext): BorderStyle => { - return { - Show: __expectBoolean(output.Show), - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotAggregatedFieldWells - */ -const de_BoxPlotAggregatedFieldWells = (output: any, context: __SerdeContext): BoxPlotAggregatedFieldWells => { - return { - GroupBy: output.GroupBy != null ? de_BoxPlotDimensionFieldList(output.GroupBy, context) : undefined, - Values: output.Values != null ? de_BoxPlotMeasureFieldList(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotChartConfiguration - */ -const de_BoxPlotChartConfiguration = (output: any, context: __SerdeContext): BoxPlotChartConfiguration => { - return { - BoxPlotOptions: output.BoxPlotOptions != null ? de_BoxPlotOptions(output.BoxPlotOptions, context) : undefined, - CategoryAxis: output.CategoryAxis != null ? de_AxisDisplayOptions(output.CategoryAxis, context) : undefined, - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_BoxPlotFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - PrimaryYAxisDisplayOptions: - output.PrimaryYAxisDisplayOptions != null - ? de_AxisDisplayOptions(output.PrimaryYAxisDisplayOptions, context) - : undefined, - PrimaryYAxisLabelOptions: - output.PrimaryYAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.PrimaryYAxisLabelOptions, context) - : undefined, - ReferenceLines: output.ReferenceLines != null ? de_ReferenceLineList(output.ReferenceLines, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_BoxPlotSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotDimensionFieldList - */ -const de_BoxPlotDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BoxPlotFieldWells - */ -const de_BoxPlotFieldWells = (output: any, context: __SerdeContext): BoxPlotFieldWells => { - return { - BoxPlotAggregatedFieldWells: - output.BoxPlotAggregatedFieldWells != null - ? de_BoxPlotAggregatedFieldWells(output.BoxPlotAggregatedFieldWells, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotMeasureFieldList - */ -const de_BoxPlotMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BoxPlotOptions - */ -const de_BoxPlotOptions = (output: any, context: __SerdeContext): BoxPlotOptions => { - return { - AllDataPointsVisibility: __expectString(output.AllDataPointsVisibility), - OutlierVisibility: __expectString(output.OutlierVisibility), - StyleOptions: output.StyleOptions != null ? de_BoxPlotStyleOptions(output.StyleOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotSortConfiguration - */ -const de_BoxPlotSortConfiguration = (output: any, context: __SerdeContext): BoxPlotSortConfiguration => { - return { - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - PaginationConfiguration: - output.PaginationConfiguration != null - ? de_PaginationConfiguration(output.PaginationConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotStyleOptions - */ -const de_BoxPlotStyleOptions = (output: any, context: __SerdeContext): BoxPlotStyleOptions => { - return { - FillStyle: __expectString(output.FillStyle), - } as any; -}; - -/** - * deserializeAws_restJson1BoxPlotVisual - */ -const de_BoxPlotVisual = (output: any, context: __SerdeContext): BoxPlotVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_BoxPlotChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1CalculatedColumn - */ -const de_CalculatedColumn = (output: any, context: __SerdeContext): CalculatedColumn => { - return { - ColumnId: __expectString(output.ColumnId), - ColumnName: __expectString(output.ColumnName), - Expression: __expectString(output.Expression), - } as any; -}; - -/** - * deserializeAws_restJson1CalculatedColumnList - */ -const de_CalculatedColumnList = (output: any, context: __SerdeContext): CalculatedColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CalculatedColumn(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CalculatedField - */ -const de_CalculatedField = (output: any, context: __SerdeContext): CalculatedField => { - return { - DataSetIdentifier: __expectString(output.DataSetIdentifier), - Expression: __expectString(output.Expression), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1CalculatedFields - */ -const de_CalculatedFields = (output: any, context: __SerdeContext): CalculatedField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CalculatedField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CalculatedMeasureField - */ -const de_CalculatedMeasureField = (output: any, context: __SerdeContext): CalculatedMeasureField => { - return { - Expression: __expectString(output.Expression), - FieldId: __expectString(output.FieldId), - } as any; -}; - -/** - * deserializeAws_restJson1CascadingControlConfiguration - */ -const de_CascadingControlConfiguration = (output: any, context: __SerdeContext): CascadingControlConfiguration => { - return { - SourceControls: - output.SourceControls != null ? de_CascadingControlSourceList(output.SourceControls, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CascadingControlSource - */ -const de_CascadingControlSource = (output: any, context: __SerdeContext): CascadingControlSource => { - return { - ColumnToMatch: output.ColumnToMatch != null ? de_ColumnIdentifier(output.ColumnToMatch, context) : undefined, - SourceSheetControlId: __expectString(output.SourceSheetControlId), - } as any; -}; - -/** - * deserializeAws_restJson1CascadingControlSourceList - */ -const de_CascadingControlSourceList = (output: any, context: __SerdeContext): CascadingControlSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CascadingControlSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CastColumnTypeOperation - */ -const de_CastColumnTypeOperation = (output: any, context: __SerdeContext): CastColumnTypeOperation => { - return { - ColumnName: __expectString(output.ColumnName), - Format: __expectString(output.Format), - NewColumnType: __expectString(output.NewColumnType), - } as any; -}; - -/** - * deserializeAws_restJson1CategoricalDimensionField - */ -const de_CategoricalDimensionField = (output: any, context: __SerdeContext): CategoricalDimensionField => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null - ? de_StringFormatConfiguration(output.FormatConfiguration, context) - : undefined, - HierarchyId: __expectString(output.HierarchyId), - } as any; -}; - -/** - * deserializeAws_restJson1CategoricalMeasureField - */ -const de_CategoricalMeasureField = (output: any, context: __SerdeContext): CategoricalMeasureField => { - return { - AggregationFunction: __expectString(output.AggregationFunction), - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null - ? de_StringFormatConfiguration(output.FormatConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CategoryDrillDownFilter - */ -const de_CategoryDrillDownFilter = (output: any, context: __SerdeContext): CategoryDrillDownFilter => { - return { - CategoryValues: output.CategoryValues != null ? de_CategoryValueList(output.CategoryValues, context) : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CategoryFilter - */ -const de_CategoryFilter = (output: any, context: __SerdeContext): CategoryFilter => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - Configuration: - output.Configuration != null ? de_CategoryFilterConfiguration(output.Configuration, context) : undefined, - FilterId: __expectString(output.FilterId), - } as any; -}; - -/** - * deserializeAws_restJson1CategoryFilterConfiguration - */ -const de_CategoryFilterConfiguration = (output: any, context: __SerdeContext): CategoryFilterConfiguration => { - return { - CustomFilterConfiguration: - output.CustomFilterConfiguration != null - ? de_CustomFilterConfiguration(output.CustomFilterConfiguration, context) - : undefined, - CustomFilterListConfiguration: - output.CustomFilterListConfiguration != null - ? de_CustomFilterListConfiguration(output.CustomFilterListConfiguration, context) - : undefined, - FilterListConfiguration: - output.FilterListConfiguration != null - ? de_FilterListConfiguration(output.FilterListConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CategoryValueList - */ -const de_CategoryValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChartAxisLabelOptions - */ -const de_ChartAxisLabelOptions = (output: any, context: __SerdeContext): ChartAxisLabelOptions => { - return { - AxisLabelOptions: - output.AxisLabelOptions != null ? de_AxisLabelOptionsList(output.AxisLabelOptions, context) : undefined, - SortIconVisibility: __expectString(output.SortIconVisibility), - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1ClusterMarker - */ -const de_ClusterMarker = (output: any, context: __SerdeContext): ClusterMarker => { - return { - SimpleClusterMarker: - output.SimpleClusterMarker != null ? de_SimpleClusterMarker(output.SimpleClusterMarker, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ClusterMarkerConfiguration - */ -const de_ClusterMarkerConfiguration = (output: any, context: __SerdeContext): ClusterMarkerConfiguration => { - return { - ClusterMarker: output.ClusterMarker != null ? de_ClusterMarker(output.ClusterMarker, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColorList - */ -const de_ColorList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColorScale - */ -const de_ColorScale = (output: any, context: __SerdeContext): ColorScale => { - return { - ColorFillType: __expectString(output.ColorFillType), - Colors: output.Colors != null ? de_ColorScaleColorList(output.Colors, context) : undefined, - NullValueColor: output.NullValueColor != null ? de_DataColor(output.NullValueColor, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColorScaleColorList - */ -const de_ColorScaleColorList = (output: any, context: __SerdeContext): DataColor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataColor(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnConfiguration - */ -const de_ColumnConfiguration = (output: any, context: __SerdeContext): ColumnConfiguration => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FormatConfiguration: - output.FormatConfiguration != null ? de_FormatConfiguration(output.FormatConfiguration, context) : undefined, - Role: __expectString(output.Role), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnConfigurationList - */ -const de_ColumnConfigurationList = (output: any, context: __SerdeContext): ColumnConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnDescription - */ -const de_ColumnDescription = (output: any, context: __SerdeContext): ColumnDescription => { - return { - Text: __expectString(output.Text), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnGroup - */ -const de_ColumnGroup = (output: any, context: __SerdeContext): ColumnGroup => { - return { - GeoSpatialColumnGroup: - output.GeoSpatialColumnGroup != null - ? de_GeoSpatialColumnGroup(output.GeoSpatialColumnGroup, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColumnGroupColumnSchema - */ -const de_ColumnGroupColumnSchema = (output: any, context: __SerdeContext): ColumnGroupColumnSchema => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnGroupColumnSchemaList - */ -const de_ColumnGroupColumnSchemaList = (output: any, context: __SerdeContext): ColumnGroupColumnSchema[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnGroupColumnSchema(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnGroupList - */ -const de_ColumnGroupList = (output: any, context: __SerdeContext): ColumnGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnGroupSchema - */ -const de_ColumnGroupSchema = (output: any, context: __SerdeContext): ColumnGroupSchema => { - return { - ColumnGroupColumnSchemaList: - output.ColumnGroupColumnSchemaList != null - ? de_ColumnGroupColumnSchemaList(output.ColumnGroupColumnSchemaList, context) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnGroupSchemaList - */ -const de_ColumnGroupSchemaList = (output: any, context: __SerdeContext): ColumnGroupSchema[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnGroupSchema(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnHierarchy - */ -const de_ColumnHierarchy = (output: any, context: __SerdeContext): ColumnHierarchy => { - return { - DateTimeHierarchy: - output.DateTimeHierarchy != null ? de_DateTimeHierarchy(output.DateTimeHierarchy, context) : undefined, - ExplicitHierarchy: - output.ExplicitHierarchy != null ? de_ExplicitHierarchy(output.ExplicitHierarchy, context) : undefined, - PredefinedHierarchy: - output.PredefinedHierarchy != null ? de_PredefinedHierarchy(output.PredefinedHierarchy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColumnHierarchyList - */ -const de_ColumnHierarchyList = (output: any, context: __SerdeContext): ColumnHierarchy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnHierarchy(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnIdentifier - */ -const de_ColumnIdentifier = (output: any, context: __SerdeContext): ColumnIdentifier => { - return { - ColumnName: __expectString(output.ColumnName), - DataSetIdentifier: __expectString(output.DataSetIdentifier), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnLevelPermissionRule - */ -const de_ColumnLevelPermissionRule = (output: any, context: __SerdeContext): ColumnLevelPermissionRule => { - return { - ColumnNames: output.ColumnNames != null ? de_ColumnNameList(output.ColumnNames, context) : undefined, - Principals: output.Principals != null ? de_PrincipalList(output.Principals, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColumnLevelPermissionRuleList - */ -const de_ColumnLevelPermissionRuleList = (output: any, context: __SerdeContext): ColumnLevelPermissionRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnLevelPermissionRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnList - */ -const de_ColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnNameList - */ -const de_ColumnNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnSchema - */ -const de_ColumnSchema = (output: any, context: __SerdeContext): ColumnSchema => { - return { - DataType: __expectString(output.DataType), - GeographicRole: __expectString(output.GeographicRole), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnSchemaList - */ -const de_ColumnSchemaList = (output: any, context: __SerdeContext): ColumnSchema[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnSchema(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnSort - */ -const de_ColumnSort = (output: any, context: __SerdeContext): ColumnSort => { - return { - AggregationFunction: - output.AggregationFunction != null ? de_AggregationFunction(output.AggregationFunction, context) : undefined, - Direction: __expectString(output.Direction), - SortBy: output.SortBy != null ? de_ColumnIdentifier(output.SortBy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ColumnTag - */ -const de_ColumnTag = (output: any, context: __SerdeContext): ColumnTag => { - return { - ColumnDescription: - output.ColumnDescription != null ? de_ColumnDescription(output.ColumnDescription, context) : undefined, - ColumnGeographicRole: __expectString(output.ColumnGeographicRole), - } as any; -}; - -/** - * deserializeAws_restJson1ColumnTagList - */ -const de_ColumnTagList = (output: any, context: __SerdeContext): ColumnTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnTag(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnTagNames - */ -const de_ColumnTagNames = (output: any, context: __SerdeContext): (ColumnTagName | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ColumnTooltipItem - */ -const de_ColumnTooltipItem = (output: any, context: __SerdeContext): ColumnTooltipItem => { - return { - Aggregation: output.Aggregation != null ? de_AggregationFunction(output.Aggregation, context) : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - Label: __expectString(output.Label), - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1ComboChartAggregatedFieldWells - */ -const de_ComboChartAggregatedFieldWells = (output: any, context: __SerdeContext): ComboChartAggregatedFieldWells => { - return { - BarValues: output.BarValues != null ? de_MeasureFieldList(output.BarValues, context) : undefined, - Category: output.Category != null ? de_DimensionFieldList(output.Category, context) : undefined, - Colors: output.Colors != null ? de_DimensionFieldList(output.Colors, context) : undefined, - LineValues: output.LineValues != null ? de_MeasureFieldList(output.LineValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ComboChartConfiguration - */ -const de_ComboChartConfiguration = (output: any, context: __SerdeContext): ComboChartConfiguration => { - return { - BarDataLabels: output.BarDataLabels != null ? de_DataLabelOptions(output.BarDataLabels, context) : undefined, - BarsArrangement: __expectString(output.BarsArrangement), - CategoryAxis: output.CategoryAxis != null ? de_AxisDisplayOptions(output.CategoryAxis, context) : undefined, - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - ColorLabelOptions: - output.ColorLabelOptions != null ? de_ChartAxisLabelOptions(output.ColorLabelOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_ComboChartFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - LineDataLabels: output.LineDataLabels != null ? de_DataLabelOptions(output.LineDataLabels, context) : undefined, - PrimaryYAxisDisplayOptions: - output.PrimaryYAxisDisplayOptions != null - ? de_AxisDisplayOptions(output.PrimaryYAxisDisplayOptions, context) - : undefined, - PrimaryYAxisLabelOptions: - output.PrimaryYAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.PrimaryYAxisLabelOptions, context) - : undefined, - ReferenceLines: output.ReferenceLines != null ? de_ReferenceLineList(output.ReferenceLines, context) : undefined, - SecondaryYAxisDisplayOptions: - output.SecondaryYAxisDisplayOptions != null - ? de_AxisDisplayOptions(output.SecondaryYAxisDisplayOptions, context) - : undefined, - SecondaryYAxisLabelOptions: - output.SecondaryYAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.SecondaryYAxisLabelOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_ComboChartSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ComboChartFieldWells - */ -const de_ComboChartFieldWells = (output: any, context: __SerdeContext): ComboChartFieldWells => { - return { - ComboChartAggregatedFieldWells: - output.ComboChartAggregatedFieldWells != null - ? de_ComboChartAggregatedFieldWells(output.ComboChartAggregatedFieldWells, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ComboChartSortConfiguration - */ -const de_ComboChartSortConfiguration = (output: any, context: __SerdeContext): ComboChartSortConfiguration => { - return { - CategoryItemsLimit: - output.CategoryItemsLimit != null ? de_ItemsLimitConfiguration(output.CategoryItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - ColorItemsLimit: - output.ColorItemsLimit != null ? de_ItemsLimitConfiguration(output.ColorItemsLimit, context) : undefined, - ColorSort: output.ColorSort != null ? de_FieldSortOptionsList(output.ColorSort, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ComboChartVisual - */ -const de_ComboChartVisual = (output: any, context: __SerdeContext): ComboChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_ComboChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1ComparisonConfiguration - */ -const de_ComparisonConfiguration = (output: any, context: __SerdeContext): ComparisonConfiguration => { - return { - ComparisonFormat: - output.ComparisonFormat != null ? de_ComparisonFormatConfiguration(output.ComparisonFormat, context) : undefined, - ComparisonMethod: __expectString(output.ComparisonMethod), - } as any; -}; - -/** - * deserializeAws_restJson1ComparisonFormatConfiguration - */ -const de_ComparisonFormatConfiguration = (output: any, context: __SerdeContext): ComparisonFormatConfiguration => { - return { - NumberDisplayFormatConfiguration: - output.NumberDisplayFormatConfiguration != null - ? de_NumberDisplayFormatConfiguration(output.NumberDisplayFormatConfiguration, context) - : undefined, - PercentageDisplayFormatConfiguration: - output.PercentageDisplayFormatConfiguration != null - ? de_PercentageDisplayFormatConfiguration(output.PercentageDisplayFormatConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Computation - */ -const de_Computation = (output: any, context: __SerdeContext): Computation => { - return { - Forecast: output.Forecast != null ? de_ForecastComputation(output.Forecast, context) : undefined, - GrowthRate: output.GrowthRate != null ? de_GrowthRateComputation(output.GrowthRate, context) : undefined, - MaximumMinimum: - output.MaximumMinimum != null ? de_MaximumMinimumComputation(output.MaximumMinimum, context) : undefined, - MetricComparison: - output.MetricComparison != null ? de_MetricComparisonComputation(output.MetricComparison, context) : undefined, - PeriodOverPeriod: - output.PeriodOverPeriod != null ? de_PeriodOverPeriodComputation(output.PeriodOverPeriod, context) : undefined, - PeriodToDate: output.PeriodToDate != null ? de_PeriodToDateComputation(output.PeriodToDate, context) : undefined, - TopBottomMovers: - output.TopBottomMovers != null ? de_TopBottomMoversComputation(output.TopBottomMovers, context) : undefined, - TopBottomRanked: - output.TopBottomRanked != null ? de_TopBottomRankedComputation(output.TopBottomRanked, context) : undefined, - TotalAggregation: - output.TotalAggregation != null ? de_TotalAggregationComputation(output.TotalAggregation, context) : undefined, - UniqueValues: output.UniqueValues != null ? de_UniqueValuesComputation(output.UniqueValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ComputationList - */ -const de_ComputationList = (output: any, context: __SerdeContext): Computation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Computation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingColor - */ -const de_ConditionalFormattingColor = (output: any, context: __SerdeContext): ConditionalFormattingColor => { - return { - Gradient: output.Gradient != null ? de_ConditionalFormattingGradientColor(output.Gradient, context) : undefined, - Solid: output.Solid != null ? de_ConditionalFormattingSolidColor(output.Solid, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingCustomIconCondition - */ -const de_ConditionalFormattingCustomIconCondition = ( - output: any, - context: __SerdeContext -): ConditionalFormattingCustomIconCondition => { - return { - Color: __expectString(output.Color), - DisplayConfiguration: - output.DisplayConfiguration != null - ? de_ConditionalFormattingIconDisplayConfiguration(output.DisplayConfiguration, context) - : undefined, - Expression: __expectString(output.Expression), - IconOptions: - output.IconOptions != null ? de_ConditionalFormattingCustomIconOptions(output.IconOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingCustomIconOptions - */ -const de_ConditionalFormattingCustomIconOptions = ( - output: any, - context: __SerdeContext -): ConditionalFormattingCustomIconOptions => { - return { - Icon: __expectString(output.Icon), - UnicodeIcon: __expectString(output.UnicodeIcon), - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingGradientColor - */ -const de_ConditionalFormattingGradientColor = ( - output: any, - context: __SerdeContext -): ConditionalFormattingGradientColor => { - return { - Color: output.Color != null ? de_GradientColor(output.Color, context) : undefined, - Expression: __expectString(output.Expression), - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingIcon - */ -const de_ConditionalFormattingIcon = (output: any, context: __SerdeContext): ConditionalFormattingIcon => { - return { - CustomCondition: - output.CustomCondition != null - ? de_ConditionalFormattingCustomIconCondition(output.CustomCondition, context) - : undefined, - IconSet: output.IconSet != null ? de_ConditionalFormattingIconSet(output.IconSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingIconDisplayConfiguration - */ -const de_ConditionalFormattingIconDisplayConfiguration = ( - output: any, - context: __SerdeContext -): ConditionalFormattingIconDisplayConfiguration => { - return { - IconDisplayOption: __expectString(output.IconDisplayOption), - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingIconSet - */ -const de_ConditionalFormattingIconSet = (output: any, context: __SerdeContext): ConditionalFormattingIconSet => { - return { - Expression: __expectString(output.Expression), - IconSetType: __expectString(output.IconSetType), - } as any; -}; - -/** - * deserializeAws_restJson1ConditionalFormattingSolidColor - */ -const de_ConditionalFormattingSolidColor = (output: any, context: __SerdeContext): ConditionalFormattingSolidColor => { - return { - Color: __expectString(output.Color), - Expression: __expectString(output.Expression), - } as any; -}; - -/** - * deserializeAws_restJson1ContributionAnalysisDefault - */ -const de_ContributionAnalysisDefault = (output: any, context: __SerdeContext): ContributionAnalysisDefault => { - return { - ContributorDimensions: - output.ContributorDimensions != null - ? de_ContributorDimensionList(output.ContributorDimensions, context) - : undefined, - MeasureFieldId: __expectString(output.MeasureFieldId), - } as any; -}; - -/** - * deserializeAws_restJson1ContributionAnalysisDefaultList - */ -const de_ContributionAnalysisDefaultList = (output: any, context: __SerdeContext): ContributionAnalysisDefault[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContributionAnalysisDefault(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ContributorDimensionList - */ -const de_ContributorDimensionList = (output: any, context: __SerdeContext): ColumnIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnIdentifier(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CreateColumnsOperation - */ -const de_CreateColumnsOperation = (output: any, context: __SerdeContext): CreateColumnsOperation => { - return { - Columns: output.Columns != null ? de_CalculatedColumnList(output.Columns, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CurrencyDisplayFormatConfiguration - */ -const de_CurrencyDisplayFormatConfiguration = ( - output: any, - context: __SerdeContext -): CurrencyDisplayFormatConfiguration => { - return { - DecimalPlacesConfiguration: - output.DecimalPlacesConfiguration != null - ? de_DecimalPlacesConfiguration(output.DecimalPlacesConfiguration, context) - : undefined, - NegativeValueConfiguration: - output.NegativeValueConfiguration != null - ? de_NegativeValueConfiguration(output.NegativeValueConfiguration, context) - : undefined, - NullValueFormatConfiguration: - output.NullValueFormatConfiguration != null - ? de_NullValueFormatConfiguration(output.NullValueFormatConfiguration, context) - : undefined, - NumberScale: __expectString(output.NumberScale), - Prefix: __expectString(output.Prefix), - SeparatorConfiguration: - output.SeparatorConfiguration != null - ? de_NumericSeparatorConfiguration(output.SeparatorConfiguration, context) - : undefined, - Suffix: __expectString(output.Suffix), - Symbol: __expectString(output.Symbol), - } as any; -}; - -/** - * deserializeAws_restJson1CustomActionFilterOperation - */ -const de_CustomActionFilterOperation = (output: any, context: __SerdeContext): CustomActionFilterOperation => { - return { - SelectedFieldsConfiguration: - output.SelectedFieldsConfiguration != null - ? de_FilterOperationSelectedFieldsConfiguration(output.SelectedFieldsConfiguration, context) - : undefined, - TargetVisualsConfiguration: - output.TargetVisualsConfiguration != null - ? de_FilterOperationTargetVisualsConfiguration(output.TargetVisualsConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CustomActionNavigationOperation - */ -const de_CustomActionNavigationOperation = (output: any, context: __SerdeContext): CustomActionNavigationOperation => { - return { - LocalNavigationConfiguration: - output.LocalNavigationConfiguration != null - ? de_LocalNavigationConfiguration(output.LocalNavigationConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CustomActionSetParametersOperation - */ -const de_CustomActionSetParametersOperation = ( - output: any, - context: __SerdeContext -): CustomActionSetParametersOperation => { - return { - ParameterValueConfigurations: - output.ParameterValueConfigurations != null - ? de_SetParameterValueConfigurationList(output.ParameterValueConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CustomActionURLOperation - */ -const de_CustomActionURLOperation = (output: any, context: __SerdeContext): CustomActionURLOperation => { - return { - URLTarget: __expectString(output.URLTarget), - URLTemplate: __expectString(output.URLTemplate), - } as any; -}; - -/** - * deserializeAws_restJson1CustomContentConfiguration - */ -const de_CustomContentConfiguration = (output: any, context: __SerdeContext): CustomContentConfiguration => { - return { - ContentType: __expectString(output.ContentType), - ContentUrl: __expectString(output.ContentUrl), - ImageScaling: __expectString(output.ImageScaling), - } as any; -}; - -/** - * deserializeAws_restJson1CustomContentVisual - */ -const de_CustomContentVisual = (output: any, context: __SerdeContext): CustomContentVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_CustomContentConfiguration(output.ChartConfiguration, context) : undefined, - DataSetIdentifier: __expectString(output.DataSetIdentifier), - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1CustomFilterConfiguration - */ -const de_CustomFilterConfiguration = (output: any, context: __SerdeContext): CustomFilterConfiguration => { - return { - CategoryValue: __expectString(output.CategoryValue), - MatchOperator: __expectString(output.MatchOperator), - NullOption: __expectString(output.NullOption), - ParameterName: __expectString(output.ParameterName), - SelectAllOptions: __expectString(output.SelectAllOptions), - } as any; -}; - -/** - * deserializeAws_restJson1CustomFilterListConfiguration - */ -const de_CustomFilterListConfiguration = (output: any, context: __SerdeContext): CustomFilterListConfiguration => { - return { - CategoryValues: output.CategoryValues != null ? de_CategoryValueList(output.CategoryValues, context) : undefined, - MatchOperator: __expectString(output.MatchOperator), - NullOption: __expectString(output.NullOption), - SelectAllOptions: __expectString(output.SelectAllOptions), - } as any; -}; - -/** - * deserializeAws_restJson1CustomNarrativeOptions - */ -const de_CustomNarrativeOptions = (output: any, context: __SerdeContext): CustomNarrativeOptions => { - return { - Narrative: __expectString(output.Narrative), - } as any; -}; - -/** - * deserializeAws_restJson1CustomParameterValues - */ -const de_CustomParameterValues = (output: any, context: __SerdeContext): CustomParameterValues => { - return { - DateTimeValues: - output.DateTimeValues != null ? de_DateTimeDefaultValueList(output.DateTimeValues, context) : undefined, - DecimalValues: output.DecimalValues != null ? de_DecimalDefaultValueList(output.DecimalValues, context) : undefined, - IntegerValues: output.IntegerValues != null ? de_IntegerDefaultValueList(output.IntegerValues, context) : undefined, - StringValues: output.StringValues != null ? de_StringDefaultValueList(output.StringValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CustomSql - */ -const de_CustomSql = (output: any, context: __SerdeContext): CustomSql => { - return { - Columns: output.Columns != null ? de_InputColumnList(output.Columns, context) : undefined, - DataSourceArn: __expectString(output.DataSourceArn), - Name: __expectString(output.Name), - SqlQuery: __expectString(output.SqlQuery), - } as any; -}; - -/** - * deserializeAws_restJson1CustomValuesConfiguration - */ -const de_CustomValuesConfiguration = (output: any, context: __SerdeContext): CustomValuesConfiguration => { - return { - CustomValues: output.CustomValues != null ? de_CustomParameterValues(output.CustomValues, context) : undefined, - IncludeNullValue: __expectBoolean(output.IncludeNullValue), - } as any; -}; - -/** - * deserializeAws_restJson1Dashboard - */ -const de_Dashboard = (output: any, context: __SerdeContext): Dashboard => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DashboardId: __expectString(output.DashboardId), - LastPublishedTime: - output.LastPublishedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastPublishedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - Version: output.Version != null ? de_DashboardVersion(output.Version, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DashboardError - */ -const de_DashboardError = (output: any, context: __SerdeContext): DashboardError => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - ViolatedEntities: output.ViolatedEntities != null ? de_EntityList(output.ViolatedEntities, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DashboardErrorList - */ -const de_DashboardErrorList = (output: any, context: __SerdeContext): DashboardError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DashboardError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DashboardPublishOptions - */ -const de_DashboardPublishOptions = (output: any, context: __SerdeContext): DashboardPublishOptions => { - return { - AdHocFilteringOption: - output.AdHocFilteringOption != null ? de_AdHocFilteringOption(output.AdHocFilteringOption, context) : undefined, - DataPointDrillUpDownOption: - output.DataPointDrillUpDownOption != null - ? de_DataPointDrillUpDownOption(output.DataPointDrillUpDownOption, context) - : undefined, - DataPointMenuLabelOption: - output.DataPointMenuLabelOption != null - ? de_DataPointMenuLabelOption(output.DataPointMenuLabelOption, context) - : undefined, - DataPointTooltipOption: - output.DataPointTooltipOption != null - ? de_DataPointTooltipOption(output.DataPointTooltipOption, context) - : undefined, - ExportToCSVOption: - output.ExportToCSVOption != null ? de_ExportToCSVOption(output.ExportToCSVOption, context) : undefined, - ExportWithHiddenFieldsOption: - output.ExportWithHiddenFieldsOption != null - ? de_ExportWithHiddenFieldsOption(output.ExportWithHiddenFieldsOption, context) - : undefined, - SheetControlsOption: - output.SheetControlsOption != null ? de_SheetControlsOption(output.SheetControlsOption, context) : undefined, - SheetLayoutElementMaximizationOption: - output.SheetLayoutElementMaximizationOption != null - ? de_SheetLayoutElementMaximizationOption(output.SheetLayoutElementMaximizationOption, context) - : undefined, - VisualAxisSortOption: - output.VisualAxisSortOption != null ? de_VisualAxisSortOption(output.VisualAxisSortOption, context) : undefined, - VisualMenuOption: - output.VisualMenuOption != null ? de_VisualMenuOption(output.VisualMenuOption, context) : undefined, - VisualPublishOptions: - output.VisualPublishOptions != null - ? de_DashboardVisualPublishOptions(output.VisualPublishOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DashboardSummary - */ -const de_DashboardSummary = (output: any, context: __SerdeContext): DashboardSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DashboardId: __expectString(output.DashboardId), - LastPublishedTime: - output.LastPublishedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastPublishedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - PublishedVersionNumber: __expectLong(output.PublishedVersionNumber), - } as any; -}; - -/** - * deserializeAws_restJson1DashboardSummaryList - */ -const de_DashboardSummaryList = (output: any, context: __SerdeContext): DashboardSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DashboardSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DashboardVersion - */ -const de_DashboardVersion = (output: any, context: __SerdeContext): DashboardVersion => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSetArns: output.DataSetArns != null ? de_DataSetArnsList(output.DataSetArns, context) : undefined, - Description: __expectString(output.Description), - Errors: output.Errors != null ? de_DashboardErrorList(output.Errors, context) : undefined, - Sheets: output.Sheets != null ? de_SheetList(output.Sheets, context) : undefined, - SourceEntityArn: __expectString(output.SourceEntityArn), - Status: __expectString(output.Status), - ThemeArn: __expectString(output.ThemeArn), - VersionNumber: __expectLong(output.VersionNumber), - } as any; -}; - -/** - * deserializeAws_restJson1DashboardVersionDefinition - */ -const de_DashboardVersionDefinition = (output: any, context: __SerdeContext): DashboardVersionDefinition => { - return { - AnalysisDefaults: - output.AnalysisDefaults != null ? de_AnalysisDefaults(output.AnalysisDefaults, context) : undefined, - CalculatedFields: - output.CalculatedFields != null ? de_CalculatedFields(output.CalculatedFields, context) : undefined, - ColumnConfigurations: - output.ColumnConfigurations != null - ? de_ColumnConfigurationList(output.ColumnConfigurations, context) - : undefined, - DataSetIdentifierDeclarations: - output.DataSetIdentifierDeclarations != null - ? de_DataSetIdentifierDeclarationList(output.DataSetIdentifierDeclarations, context) - : undefined, - FilterGroups: output.FilterGroups != null ? de_FilterGroupList(output.FilterGroups, context) : undefined, - ParameterDeclarations: - output.ParameterDeclarations != null - ? de_ParameterDeclarationList(output.ParameterDeclarations, context) - : undefined, - Sheets: output.Sheets != null ? de_SheetDefinitionList(output.Sheets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DashboardVersionSummary - */ -const de_DashboardVersionSummary = (output: any, context: __SerdeContext): DashboardVersionSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - SourceEntityArn: __expectString(output.SourceEntityArn), - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; -}; - -/** - * deserializeAws_restJson1DashboardVersionSummaryList - */ -const de_DashboardVersionSummaryList = (output: any, context: __SerdeContext): DashboardVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DashboardVersionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DashboardVisualPublishOptions - */ -const de_DashboardVisualPublishOptions = (output: any, context: __SerdeContext): DashboardVisualPublishOptions => { - return { - ExportHiddenFieldsOption: - output.ExportHiddenFieldsOption != null - ? de_ExportHiddenFieldsOption(output.ExportHiddenFieldsOption, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataBarsOptions - */ -const de_DataBarsOptions = (output: any, context: __SerdeContext): DataBarsOptions => { - return { - FieldId: __expectString(output.FieldId), - NegativeColor: __expectString(output.NegativeColor), - PositiveColor: __expectString(output.PositiveColor), - } as any; -}; - -/** - * deserializeAws_restJson1DatabricksParameters - */ -const de_DatabricksParameters = (output: any, context: __SerdeContext): DatabricksParameters => { - return { - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - SqlEndpointPath: __expectString(output.SqlEndpointPath), - } as any; -}; - -/** - * deserializeAws_restJson1DataColor - */ -const de_DataColor = (output: any, context: __SerdeContext): DataColor => { - return { - Color: __expectString(output.Color), - DataValue: __limitedParseDouble(output.DataValue), - } as any; -}; - -/** - * deserializeAws_restJson1DataColorPalette - */ -const de_DataColorPalette = (output: any, context: __SerdeContext): DataColorPalette => { - return { - Colors: output.Colors != null ? de_ColorList(output.Colors, context) : undefined, - EmptyFillColor: __expectString(output.EmptyFillColor), - MinMaxGradient: output.MinMaxGradient != null ? de_ColorList(output.MinMaxGradient, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataFieldSeriesItem - */ -const de_DataFieldSeriesItem = (output: any, context: __SerdeContext): DataFieldSeriesItem => { - return { - AxisBinding: __expectString(output.AxisBinding), - FieldId: __expectString(output.FieldId), - FieldValue: __expectString(output.FieldValue), - Settings: output.Settings != null ? de_LineChartSeriesSettings(output.Settings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataLabelOptions - */ -const de_DataLabelOptions = (output: any, context: __SerdeContext): DataLabelOptions => { - return { - CategoryLabelVisibility: __expectString(output.CategoryLabelVisibility), - DataLabelTypes: output.DataLabelTypes != null ? de_DataLabelTypes(output.DataLabelTypes, context) : undefined, - LabelColor: __expectString(output.LabelColor), - LabelContent: __expectString(output.LabelContent), - LabelFontConfiguration: - output.LabelFontConfiguration != null ? de_FontConfiguration(output.LabelFontConfiguration, context) : undefined, - MeasureLabelVisibility: __expectString(output.MeasureLabelVisibility), - Overlap: __expectString(output.Overlap), - Position: __expectString(output.Position), - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1DataLabelType - */ -const de_DataLabelType = (output: any, context: __SerdeContext): DataLabelType => { - return { - DataPathLabelType: - output.DataPathLabelType != null ? de_DataPathLabelType(output.DataPathLabelType, context) : undefined, - FieldLabelType: output.FieldLabelType != null ? de_FieldLabelType(output.FieldLabelType, context) : undefined, - MaximumLabelType: - output.MaximumLabelType != null ? de_MaximumLabelType(output.MaximumLabelType, context) : undefined, - MinimumLabelType: - output.MinimumLabelType != null ? de_MinimumLabelType(output.MinimumLabelType, context) : undefined, - RangeEndsLabelType: - output.RangeEndsLabelType != null ? de_RangeEndsLabelType(output.RangeEndsLabelType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataLabelTypes - */ -const de_DataLabelTypes = (output: any, context: __SerdeContext): DataLabelType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataLabelType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataPathColor - */ -const de_DataPathColor = (output: any, context: __SerdeContext): DataPathColor => { - return { - Color: __expectString(output.Color), - Element: output.Element != null ? de_DataPathValue(output.Element, context) : undefined, - TimeGranularity: __expectString(output.TimeGranularity), - } as any; -}; - -/** - * deserializeAws_restJson1DataPathColorList - */ -const de_DataPathColorList = (output: any, context: __SerdeContext): DataPathColor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataPathColor(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataPathLabelType - */ -const de_DataPathLabelType = (output: any, context: __SerdeContext): DataPathLabelType => { - return { - FieldId: __expectString(output.FieldId), - FieldValue: __expectString(output.FieldValue), - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1DataPathSort - */ -const de_DataPathSort = (output: any, context: __SerdeContext): DataPathSort => { - return { - Direction: __expectString(output.Direction), - SortPaths: output.SortPaths != null ? de_DataPathValueList(output.SortPaths, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataPathValue - */ -const de_DataPathValue = (output: any, context: __SerdeContext): DataPathValue => { - return { - FieldId: __expectString(output.FieldId), - FieldValue: __expectString(output.FieldValue), - } as any; -}; - -/** - * deserializeAws_restJson1DataPathValueList - */ -const de_DataPathValueList = (output: any, context: __SerdeContext): DataPathValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataPathValue(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataPointDrillUpDownOption - */ -const de_DataPointDrillUpDownOption = (output: any, context: __SerdeContext): DataPointDrillUpDownOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1DataPointMenuLabelOption - */ -const de_DataPointMenuLabelOption = (output: any, context: __SerdeContext): DataPointMenuLabelOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1DataPointTooltipOption - */ -const de_DataPointTooltipOption = (output: any, context: __SerdeContext): DataPointTooltipOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1DataSet - */ -const de_DataSet = (output: any, context: __SerdeContext): DataSet => { - return { - Arn: __expectString(output.Arn), - ColumnGroups: output.ColumnGroups != null ? de_ColumnGroupList(output.ColumnGroups, context) : undefined, - ColumnLevelPermissionRules: - output.ColumnLevelPermissionRules != null - ? de_ColumnLevelPermissionRuleList(output.ColumnLevelPermissionRules, context) - : undefined, - ConsumedSpiceCapacityInBytes: __expectLong(output.ConsumedSpiceCapacityInBytes), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSetId: __expectString(output.DataSetId), - DataSetUsageConfiguration: - output.DataSetUsageConfiguration != null - ? de_DataSetUsageConfiguration(output.DataSetUsageConfiguration, context) - : undefined, - FieldFolders: output.FieldFolders != null ? de_FieldFolderMap(output.FieldFolders, context) : undefined, - ImportMode: __expectString(output.ImportMode), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - LogicalTableMap: output.LogicalTableMap != null ? de_LogicalTableMap(output.LogicalTableMap, context) : undefined, - Name: __expectString(output.Name), - OutputColumns: output.OutputColumns != null ? de_OutputColumnList(output.OutputColumns, context) : undefined, - PhysicalTableMap: - output.PhysicalTableMap != null ? de_PhysicalTableMap(output.PhysicalTableMap, context) : undefined, - RowLevelPermissionDataSet: - output.RowLevelPermissionDataSet != null - ? de_RowLevelPermissionDataSet(output.RowLevelPermissionDataSet, context) - : undefined, - RowLevelPermissionTagConfiguration: - output.RowLevelPermissionTagConfiguration != null - ? de_RowLevelPermissionTagConfiguration(output.RowLevelPermissionTagConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataSetArnsList - */ -const de_DataSetArnsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSetConfiguration - */ -const de_DataSetConfiguration = (output: any, context: __SerdeContext): DataSetConfiguration => { - return { - ColumnGroupSchemaList: - output.ColumnGroupSchemaList != null - ? de_ColumnGroupSchemaList(output.ColumnGroupSchemaList, context) - : undefined, - DataSetSchema: output.DataSetSchema != null ? de_DataSetSchema(output.DataSetSchema, context) : undefined, - Placeholder: __expectString(output.Placeholder), - } as any; -}; - -/** - * deserializeAws_restJson1DataSetConfigurationList - */ -const de_DataSetConfigurationList = (output: any, context: __SerdeContext): DataSetConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSetConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSetIdentifierDeclaration - */ -const de_DataSetIdentifierDeclaration = (output: any, context: __SerdeContext): DataSetIdentifierDeclaration => { - return { - DataSetArn: __expectString(output.DataSetArn), - Identifier: __expectString(output.Identifier), - } as any; -}; - -/** - * deserializeAws_restJson1DataSetIdentifierDeclarationList - */ -const de_DataSetIdentifierDeclarationList = (output: any, context: __SerdeContext): DataSetIdentifierDeclaration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSetIdentifierDeclaration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSetRefreshProperties - */ -const de_DataSetRefreshProperties = (output: any, context: __SerdeContext): DataSetRefreshProperties => { - return { - RefreshConfiguration: - output.RefreshConfiguration != null ? de_RefreshConfiguration(output.RefreshConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataSetSchema - */ -const de_DataSetSchema = (output: any, context: __SerdeContext): DataSetSchema => { - return { - ColumnSchemaList: - output.ColumnSchemaList != null ? de_ColumnSchemaList(output.ColumnSchemaList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataSetSummary - */ -const de_DataSetSummary = (output: any, context: __SerdeContext): DataSetSummary => { - return { - Arn: __expectString(output.Arn), - ColumnLevelPermissionRulesApplied: __expectBoolean(output.ColumnLevelPermissionRulesApplied), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSetId: __expectString(output.DataSetId), - ImportMode: __expectString(output.ImportMode), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - RowLevelPermissionDataSet: - output.RowLevelPermissionDataSet != null - ? de_RowLevelPermissionDataSet(output.RowLevelPermissionDataSet, context) - : undefined, - RowLevelPermissionTagConfigurationApplied: __expectBoolean(output.RowLevelPermissionTagConfigurationApplied), - } as any; -}; - -/** - * deserializeAws_restJson1DataSetSummaryList - */ -const de_DataSetSummaryList = (output: any, context: __SerdeContext): DataSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSetUsageConfiguration - */ -const de_DataSetUsageConfiguration = (output: any, context: __SerdeContext): DataSetUsageConfiguration => { - return { - DisableUseAsDirectQuerySource: __expectBoolean(output.DisableUseAsDirectQuerySource), - DisableUseAsImportedSource: __expectBoolean(output.DisableUseAsImportedSource), - } as any; -}; - -/** - * deserializeAws_restJson1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - AlternateDataSourceParameters: - output.AlternateDataSourceParameters != null - ? de_DataSourceParametersList(output.AlternateDataSourceParameters, context) - : undefined, - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSourceId: __expectString(output.DataSourceId), - DataSourceParameters: - output.DataSourceParameters != null - ? de_DataSourceParameters(__expectUnion(output.DataSourceParameters), context) - : undefined, - ErrorInfo: output.ErrorInfo != null ? de_DataSourceErrorInfo(output.ErrorInfo, context) : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - SecretArn: __expectString(output.SecretArn), - SslProperties: output.SslProperties != null ? de_SslProperties(output.SslProperties, context) : undefined, - Status: __expectString(output.Status), - Type: __expectString(output.Type), - VpcConnectionProperties: - output.VpcConnectionProperties != null - ? de_VpcConnectionProperties(output.VpcConnectionProperties, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DataSourceErrorInfo - */ -const de_DataSourceErrorInfo = (output: any, context: __SerdeContext): DataSourceErrorInfo => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1DataSourceList - */ -const de_DataSourceList = (output: any, context: __SerdeContext): DataSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSourceParameters - */ -const de_DataSourceParameters = (output: any, context: __SerdeContext): DataSourceParameters => { - if (output.AmazonElasticsearchParameters != null) { - return { - AmazonElasticsearchParameters: de_AmazonElasticsearchParameters(output.AmazonElasticsearchParameters, context), - }; - } - if (output.AmazonOpenSearchParameters != null) { - return { - AmazonOpenSearchParameters: de_AmazonOpenSearchParameters(output.AmazonOpenSearchParameters, context), - }; - } - if (output.AthenaParameters != null) { - return { - AthenaParameters: de_AthenaParameters(output.AthenaParameters, context), - }; - } - if (output.AuroraParameters != null) { - return { - AuroraParameters: de_AuroraParameters(output.AuroraParameters, context), - }; - } - if (output.AuroraPostgreSqlParameters != null) { - return { - AuroraPostgreSqlParameters: de_AuroraPostgreSqlParameters(output.AuroraPostgreSqlParameters, context), - }; - } - if (output.AwsIotAnalyticsParameters != null) { - return { - AwsIotAnalyticsParameters: de_AwsIotAnalyticsParameters(output.AwsIotAnalyticsParameters, context), - }; - } - if (output.DatabricksParameters != null) { - return { - DatabricksParameters: de_DatabricksParameters(output.DatabricksParameters, context), - }; - } - if (output.ExasolParameters != null) { - return { - ExasolParameters: de_ExasolParameters(output.ExasolParameters, context), - }; - } - if (output.JiraParameters != null) { - return { - JiraParameters: de_JiraParameters(output.JiraParameters, context), - }; - } - if (output.MariaDbParameters != null) { - return { - MariaDbParameters: de_MariaDbParameters(output.MariaDbParameters, context), - }; - } - if (output.MySqlParameters != null) { - return { - MySqlParameters: de_MySqlParameters(output.MySqlParameters, context), - }; - } - if (output.OracleParameters != null) { - return { - OracleParameters: de_OracleParameters(output.OracleParameters, context), - }; - } - if (output.PostgreSqlParameters != null) { - return { - PostgreSqlParameters: de_PostgreSqlParameters(output.PostgreSqlParameters, context), - }; - } - if (output.PrestoParameters != null) { - return { - PrestoParameters: de_PrestoParameters(output.PrestoParameters, context), - }; - } - if (output.RdsParameters != null) { - return { - RdsParameters: de_RdsParameters(output.RdsParameters, context), - }; - } - if (output.RedshiftParameters != null) { - return { - RedshiftParameters: de_RedshiftParameters(output.RedshiftParameters, context), - }; - } - if (output.S3Parameters != null) { - return { - S3Parameters: de_S3Parameters(output.S3Parameters, context), - }; - } - if (output.ServiceNowParameters != null) { - return { - ServiceNowParameters: de_ServiceNowParameters(output.ServiceNowParameters, context), - }; - } - if (output.SnowflakeParameters != null) { - return { - SnowflakeParameters: de_SnowflakeParameters(output.SnowflakeParameters, context), - }; - } - if (output.SparkParameters != null) { - return { - SparkParameters: de_SparkParameters(output.SparkParameters, context), - }; - } - if (output.SqlServerParameters != null) { - return { - SqlServerParameters: de_SqlServerParameters(output.SqlServerParameters, context), - }; - } - if (output.TeradataParameters != null) { - return { - TeradataParameters: de_TeradataParameters(output.TeradataParameters, context), - }; - } - if (output.TwitterParameters != null) { - return { - TwitterParameters: de_TwitterParameters(output.TwitterParameters, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_restJson1DataSourceParametersList - */ -const de_DataSourceParametersList = (output: any, context: __SerdeContext): DataSourceParameters[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSourceParameters(__expectUnion(entry), context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSourceSummary - */ -const de_DataSourceSummary = (output: any, context: __SerdeContext): DataSourceSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSourceId: __expectString(output.DataSourceId), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1DataSourceSummaryList - */ -const de_DataSourceSummaryList = (output: any, context: __SerdeContext): DataSourceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSourceSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DateAxisOptions - */ -const de_DateAxisOptions = (output: any, context: __SerdeContext): DateAxisOptions => { - return { - MissingDateVisibility: __expectString(output.MissingDateVisibility), - } as any; -}; - -/** - * deserializeAws_restJson1DateDimensionField - */ -const de_DateDimensionField = (output: any, context: __SerdeContext): DateDimensionField => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - DateGranularity: __expectString(output.DateGranularity), - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null - ? de_DateTimeFormatConfiguration(output.FormatConfiguration, context) - : undefined, - HierarchyId: __expectString(output.HierarchyId), - } as any; -}; - -/** - * deserializeAws_restJson1DateMeasureField - */ -const de_DateMeasureField = (output: any, context: __SerdeContext): DateMeasureField => { - return { - AggregationFunction: __expectString(output.AggregationFunction), - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null - ? de_DateTimeFormatConfiguration(output.FormatConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DateTimeDefaultValueList - */ -const de_DateTimeDefaultValueList = (output: any, context: __SerdeContext): Date[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry))); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DateTimeDefaultValues - */ -const de_DateTimeDefaultValues = (output: any, context: __SerdeContext): DateTimeDefaultValues => { - return { - DynamicValue: output.DynamicValue != null ? de_DynamicDefaultValue(output.DynamicValue, context) : undefined, - RollingDate: output.RollingDate != null ? de_RollingDateConfiguration(output.RollingDate, context) : undefined, - StaticValues: output.StaticValues != null ? de_DateTimeDefaultValueList(output.StaticValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DateTimeFormatConfiguration - */ -const de_DateTimeFormatConfiguration = (output: any, context: __SerdeContext): DateTimeFormatConfiguration => { - return { - DateTimeFormat: __expectString(output.DateTimeFormat), - NullValueFormatConfiguration: - output.NullValueFormatConfiguration != null - ? de_NullValueFormatConfiguration(output.NullValueFormatConfiguration, context) - : undefined, - NumericFormatConfiguration: - output.NumericFormatConfiguration != null - ? de_NumericFormatConfiguration(output.NumericFormatConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DateTimeHierarchy - */ -const de_DateTimeHierarchy = (output: any, context: __SerdeContext): DateTimeHierarchy => { - return { - DrillDownFilters: - output.DrillDownFilters != null ? de_DrillDownFilterList(output.DrillDownFilters, context) : undefined, - HierarchyId: __expectString(output.HierarchyId), - } as any; -}; - -/** - * deserializeAws_restJson1DateTimeParameterDeclaration - */ -const de_DateTimeParameterDeclaration = (output: any, context: __SerdeContext): DateTimeParameterDeclaration => { - return { - DefaultValues: output.DefaultValues != null ? de_DateTimeDefaultValues(output.DefaultValues, context) : undefined, - Name: __expectString(output.Name), - TimeGranularity: __expectString(output.TimeGranularity), - ValueWhenUnset: - output.ValueWhenUnset != null - ? de_DateTimeValueWhenUnsetConfiguration(output.ValueWhenUnset, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DateTimePickerControlDisplayOptions - */ -const de_DateTimePickerControlDisplayOptions = ( - output: any, - context: __SerdeContext -): DateTimePickerControlDisplayOptions => { - return { - DateTimeFormat: __expectString(output.DateTimeFormat), - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DateTimeValueWhenUnsetConfiguration - */ -const de_DateTimeValueWhenUnsetConfiguration = ( - output: any, - context: __SerdeContext -): DateTimeValueWhenUnsetConfiguration => { - return { - CustomValue: - output.CustomValue != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CustomValue))) - : undefined, - ValueWhenUnsetOption: __expectString(output.ValueWhenUnsetOption), - } as any; -}; - -/** - * deserializeAws_restJson1DecimalDefaultValueList - */ -const de_DecimalDefaultValueList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __limitedParseDouble(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DecimalDefaultValues - */ -const de_DecimalDefaultValues = (output: any, context: __SerdeContext): DecimalDefaultValues => { - return { - DynamicValue: output.DynamicValue != null ? de_DynamicDefaultValue(output.DynamicValue, context) : undefined, - StaticValues: output.StaticValues != null ? de_DecimalDefaultValueList(output.StaticValues, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DecimalParameterDeclaration - */ -const de_DecimalParameterDeclaration = (output: any, context: __SerdeContext): DecimalParameterDeclaration => { - return { - DefaultValues: output.DefaultValues != null ? de_DecimalDefaultValues(output.DefaultValues, context) : undefined, - Name: __expectString(output.Name), - ParameterValueType: __expectString(output.ParameterValueType), - ValueWhenUnset: - output.ValueWhenUnset != null ? de_DecimalValueWhenUnsetConfiguration(output.ValueWhenUnset, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DecimalPlacesConfiguration - */ -const de_DecimalPlacesConfiguration = (output: any, context: __SerdeContext): DecimalPlacesConfiguration => { - return { - DecimalPlaces: __expectLong(output.DecimalPlaces), - } as any; -}; - -/** - * deserializeAws_restJson1DecimalValueWhenUnsetConfiguration - */ -const de_DecimalValueWhenUnsetConfiguration = ( - output: any, - context: __SerdeContext -): DecimalValueWhenUnsetConfiguration => { - return { - CustomValue: __limitedParseDouble(output.CustomValue), - ValueWhenUnsetOption: __expectString(output.ValueWhenUnsetOption), - } as any; -}; - -/** - * deserializeAws_restJson1DefaultFreeFormLayoutConfiguration - */ -const de_DefaultFreeFormLayoutConfiguration = ( - output: any, - context: __SerdeContext -): DefaultFreeFormLayoutConfiguration => { - return { - CanvasSizeOptions: - output.CanvasSizeOptions != null - ? de_FreeFormLayoutCanvasSizeOptions(output.CanvasSizeOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DefaultGridLayoutConfiguration - */ -const de_DefaultGridLayoutConfiguration = (output: any, context: __SerdeContext): DefaultGridLayoutConfiguration => { - return { - CanvasSizeOptions: - output.CanvasSizeOptions != null ? de_GridLayoutCanvasSizeOptions(output.CanvasSizeOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DefaultInteractiveLayoutConfiguration - */ -const de_DefaultInteractiveLayoutConfiguration = ( - output: any, - context: __SerdeContext -): DefaultInteractiveLayoutConfiguration => { - return { - FreeForm: output.FreeForm != null ? de_DefaultFreeFormLayoutConfiguration(output.FreeForm, context) : undefined, - Grid: output.Grid != null ? de_DefaultGridLayoutConfiguration(output.Grid, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DefaultNewSheetConfiguration - */ -const de_DefaultNewSheetConfiguration = (output: any, context: __SerdeContext): DefaultNewSheetConfiguration => { - return { - InteractiveLayoutConfiguration: - output.InteractiveLayoutConfiguration != null - ? de_DefaultInteractiveLayoutConfiguration(output.InteractiveLayoutConfiguration, context) - : undefined, - PaginatedLayoutConfiguration: - output.PaginatedLayoutConfiguration != null - ? de_DefaultPaginatedLayoutConfiguration(output.PaginatedLayoutConfiguration, context) - : undefined, - SheetContentType: __expectString(output.SheetContentType), - } as any; -}; - -/** - * deserializeAws_restJson1DefaultPaginatedLayoutConfiguration - */ -const de_DefaultPaginatedLayoutConfiguration = ( - output: any, - context: __SerdeContext -): DefaultPaginatedLayoutConfiguration => { - return { - SectionBased: - output.SectionBased != null ? de_DefaultSectionBasedLayoutConfiguration(output.SectionBased, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DefaultSectionBasedLayoutConfiguration - */ -const de_DefaultSectionBasedLayoutConfiguration = ( - output: any, - context: __SerdeContext -): DefaultSectionBasedLayoutConfiguration => { - return { - CanvasSizeOptions: - output.CanvasSizeOptions != null - ? de_SectionBasedLayoutCanvasSizeOptions(output.CanvasSizeOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DestinationParameterValueConfiguration - */ -const de_DestinationParameterValueConfiguration = ( - output: any, - context: __SerdeContext -): DestinationParameterValueConfiguration => { - return { - CustomValuesConfiguration: - output.CustomValuesConfiguration != null - ? de_CustomValuesConfiguration(output.CustomValuesConfiguration, context) - : undefined, - SelectAllValueOptions: __expectString(output.SelectAllValueOptions), - SourceField: __expectString(output.SourceField), - SourceParameterName: __expectString(output.SourceParameterName), - } as any; -}; - -/** - * deserializeAws_restJson1DimensionField - */ -const de_DimensionField = (output: any, context: __SerdeContext): DimensionField => { - return { - CategoricalDimensionField: - output.CategoricalDimensionField != null - ? de_CategoricalDimensionField(output.CategoricalDimensionField, context) - : undefined, - DateDimensionField: - output.DateDimensionField != null ? de_DateDimensionField(output.DateDimensionField, context) : undefined, - NumericalDimensionField: - output.NumericalDimensionField != null - ? de_NumericalDimensionField(output.NumericalDimensionField, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DimensionFieldList - */ -const de_DimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DonutCenterOptions - */ -const de_DonutCenterOptions = (output: any, context: __SerdeContext): DonutCenterOptions => { - return { - LabelVisibility: __expectString(output.LabelVisibility), - } as any; -}; - -/** - * deserializeAws_restJson1DonutOptions - */ -const de_DonutOptions = (output: any, context: __SerdeContext): DonutOptions => { - return { - ArcOptions: output.ArcOptions != null ? de_ArcOptions(output.ArcOptions, context) : undefined, - DonutCenterOptions: - output.DonutCenterOptions != null ? de_DonutCenterOptions(output.DonutCenterOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DrillDownFilter - */ -const de_DrillDownFilter = (output: any, context: __SerdeContext): DrillDownFilter => { - return { - CategoryFilter: - output.CategoryFilter != null ? de_CategoryDrillDownFilter(output.CategoryFilter, context) : undefined, - NumericEqualityFilter: - output.NumericEqualityFilter != null - ? de_NumericEqualityDrillDownFilter(output.NumericEqualityFilter, context) - : undefined, - TimeRangeFilter: - output.TimeRangeFilter != null ? de_TimeRangeDrillDownFilter(output.TimeRangeFilter, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DrillDownFilterList - */ -const de_DrillDownFilterList = (output: any, context: __SerdeContext): DrillDownFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DrillDownFilter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DropDownControlDisplayOptions - */ -const de_DropDownControlDisplayOptions = (output: any, context: __SerdeContext): DropDownControlDisplayOptions => { - return { - SelectAllOptions: - output.SelectAllOptions != null ? de_ListControlSelectAllOptions(output.SelectAllOptions, context) : undefined, - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DynamicDefaultValue - */ -const de_DynamicDefaultValue = (output: any, context: __SerdeContext): DynamicDefaultValue => { - return { - DefaultValueColumn: - output.DefaultValueColumn != null ? de_ColumnIdentifier(output.DefaultValueColumn, context) : undefined, - GroupNameColumn: output.GroupNameColumn != null ? de_ColumnIdentifier(output.GroupNameColumn, context) : undefined, - UserNameColumn: output.UserNameColumn != null ? de_ColumnIdentifier(output.UserNameColumn, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1EmptyVisual - */ -const de_EmptyVisual = (output: any, context: __SerdeContext): EmptyVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - DataSetIdentifier: __expectString(output.DataSetIdentifier), - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1Entity - */ -const de_Entity = (output: any, context: __SerdeContext): Entity => { - return { - Path: __expectString(output.Path), - } as any; -}; - -/** - * deserializeAws_restJson1EntityList - */ -const de_EntityList = (output: any, context: __SerdeContext): Entity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Entity(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ErrorInfo - */ -const de_ErrorInfo = (output: any, context: __SerdeContext): ErrorInfo => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ExasolParameters - */ -const de_ExasolParameters = (output: any, context: __SerdeContext): ExasolParameters => { - return { - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; - -/** - * deserializeAws_restJson1ExcludePeriodConfiguration - */ -const de_ExcludePeriodConfiguration = (output: any, context: __SerdeContext): ExcludePeriodConfiguration => { - return { - Amount: __expectInt32(output.Amount), - Granularity: __expectString(output.Granularity), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1ExplicitHierarchy - */ -const de_ExplicitHierarchy = (output: any, context: __SerdeContext): ExplicitHierarchy => { - return { - Columns: output.Columns != null ? de_ExplicitHierarchyColumnList(output.Columns, context) : undefined, - DrillDownFilters: - output.DrillDownFilters != null ? de_DrillDownFilterList(output.DrillDownFilters, context) : undefined, - HierarchyId: __expectString(output.HierarchyId), - } as any; -}; - -/** - * deserializeAws_restJson1ExplicitHierarchyColumnList - */ -const de_ExplicitHierarchyColumnList = (output: any, context: __SerdeContext): ColumnIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnIdentifier(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ExportHiddenFieldsOption - */ -const de_ExportHiddenFieldsOption = (output: any, context: __SerdeContext): ExportHiddenFieldsOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1ExportToCSVOption - */ -const de_ExportToCSVOption = (output: any, context: __SerdeContext): ExportToCSVOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1ExportWithHiddenFieldsOption - */ -const de_ExportWithHiddenFieldsOption = (output: any, context: __SerdeContext): ExportWithHiddenFieldsOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; - -/** - * deserializeAws_restJson1FieldBasedTooltip - */ -const de_FieldBasedTooltip = (output: any, context: __SerdeContext): FieldBasedTooltip => { - return { - AggregationVisibility: __expectString(output.AggregationVisibility), - TooltipFields: output.TooltipFields != null ? de_TooltipItemList(output.TooltipFields, context) : undefined, - TooltipTitleType: __expectString(output.TooltipTitleType), - } as any; -}; - -/** - * deserializeAws_restJson1FieldFolder - */ -const de_FieldFolder = (output: any, context: __SerdeContext): FieldFolder => { - return { - columns: output.columns != null ? de_FolderColumnList(output.columns, context) : undefined, - description: __expectString(output.description), - } as any; -}; - -/** - * deserializeAws_restJson1FieldFolderMap - */ -const de_FieldFolderMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FieldFolder(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1FieldLabelType - */ -const de_FieldLabelType = (output: any, context: __SerdeContext): FieldLabelType => { - return { - FieldId: __expectString(output.FieldId), - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1FieldOrderList - */ -const de_FieldOrderList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FieldSeriesItem - */ -const de_FieldSeriesItem = (output: any, context: __SerdeContext): FieldSeriesItem => { - return { - AxisBinding: __expectString(output.AxisBinding), - FieldId: __expectString(output.FieldId), - Settings: output.Settings != null ? de_LineChartSeriesSettings(output.Settings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FieldSort - */ -const de_FieldSort = (output: any, context: __SerdeContext): FieldSort => { - return { - Direction: __expectString(output.Direction), - FieldId: __expectString(output.FieldId), - } as any; -}; - -/** - * deserializeAws_restJson1FieldSortOptions - */ -const de_FieldSortOptions = (output: any, context: __SerdeContext): FieldSortOptions => { - return { - ColumnSort: output.ColumnSort != null ? de_ColumnSort(output.ColumnSort, context) : undefined, - FieldSort: output.FieldSort != null ? de_FieldSort(output.FieldSort, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FieldSortOptionsList - */ -const de_FieldSortOptionsList = (output: any, context: __SerdeContext): FieldSortOptions[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldSortOptions(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FieldTooltipItem - */ -const de_FieldTooltipItem = (output: any, context: __SerdeContext): FieldTooltipItem => { - return { - FieldId: __expectString(output.FieldId), - Label: __expectString(output.Label), - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapAggregatedFieldWells - */ -const de_FilledMapAggregatedFieldWells = (output: any, context: __SerdeContext): FilledMapAggregatedFieldWells => { - return { - Geospatial: output.Geospatial != null ? de_FilledMapDimensionFieldList(output.Geospatial, context) : undefined, - Values: output.Values != null ? de_FilledMapMeasureFieldList(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapConditionalFormatting - */ -const de_FilledMapConditionalFormatting = (output: any, context: __SerdeContext): FilledMapConditionalFormatting => { - return { - ConditionalFormattingOptions: - output.ConditionalFormattingOptions != null - ? de_FilledMapConditionalFormattingOptionList(output.ConditionalFormattingOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapConditionalFormattingOption - */ -const de_FilledMapConditionalFormattingOption = ( - output: any, - context: __SerdeContext -): FilledMapConditionalFormattingOption => { - return { - Shape: output.Shape != null ? de_FilledMapShapeConditionalFormatting(output.Shape, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapConditionalFormattingOptionList - */ -const de_FilledMapConditionalFormattingOptionList = ( - output: any, - context: __SerdeContext -): FilledMapConditionalFormattingOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilledMapConditionalFormattingOption(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FilledMapConfiguration - */ -const de_FilledMapConfiguration = (output: any, context: __SerdeContext): FilledMapConfiguration => { - return { - FieldWells: output.FieldWells != null ? de_FilledMapFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - MapStyleOptions: - output.MapStyleOptions != null ? de_GeospatialMapStyleOptions(output.MapStyleOptions, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_FilledMapSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - WindowOptions: output.WindowOptions != null ? de_GeospatialWindowOptions(output.WindowOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapDimensionFieldList - */ -const de_FilledMapDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FilledMapFieldWells - */ -const de_FilledMapFieldWells = (output: any, context: __SerdeContext): FilledMapFieldWells => { - return { - FilledMapAggregatedFieldWells: - output.FilledMapAggregatedFieldWells != null - ? de_FilledMapAggregatedFieldWells(output.FilledMapAggregatedFieldWells, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapMeasureFieldList - */ -const de_FilledMapMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FilledMapShapeConditionalFormatting - */ -const de_FilledMapShapeConditionalFormatting = ( - output: any, - context: __SerdeContext -): FilledMapShapeConditionalFormatting => { - return { - FieldId: __expectString(output.FieldId), - Format: output.Format != null ? de_ShapeConditionalFormat(output.Format, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapSortConfiguration - */ -const de_FilledMapSortConfiguration = (output: any, context: __SerdeContext): FilledMapSortConfiguration => { - return { - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilledMapVisual - */ -const de_FilledMapVisual = (output: any, context: __SerdeContext): FilledMapVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_FilledMapConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - ConditionalFormatting: - output.ConditionalFormatting != null - ? de_FilledMapConditionalFormatting(output.ConditionalFormatting, context) - : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1Filter - */ -const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - CategoryFilter: output.CategoryFilter != null ? de_CategoryFilter(output.CategoryFilter, context) : undefined, - NumericEqualityFilter: - output.NumericEqualityFilter != null - ? de_NumericEqualityFilter(output.NumericEqualityFilter, context) - : undefined, - NumericRangeFilter: - output.NumericRangeFilter != null ? de_NumericRangeFilter(output.NumericRangeFilter, context) : undefined, - RelativeDatesFilter: - output.RelativeDatesFilter != null ? de_RelativeDatesFilter(output.RelativeDatesFilter, context) : undefined, - TimeEqualityFilter: - output.TimeEqualityFilter != null ? de_TimeEqualityFilter(output.TimeEqualityFilter, context) : undefined, - TimeRangeFilter: output.TimeRangeFilter != null ? de_TimeRangeFilter(output.TimeRangeFilter, context) : undefined, - TopBottomFilter: output.TopBottomFilter != null ? de_TopBottomFilter(output.TopBottomFilter, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilterControl - */ -const de_FilterControl = (output: any, context: __SerdeContext): FilterControl => { - return { - DateTimePicker: - output.DateTimePicker != null ? de_FilterDateTimePickerControl(output.DateTimePicker, context) : undefined, - Dropdown: output.Dropdown != null ? de_FilterDropDownControl(output.Dropdown, context) : undefined, - List: output.List != null ? de_FilterListControl(output.List, context) : undefined, - RelativeDateTime: - output.RelativeDateTime != null ? de_FilterRelativeDateTimeControl(output.RelativeDateTime, context) : undefined, - Slider: output.Slider != null ? de_FilterSliderControl(output.Slider, context) : undefined, - TextArea: output.TextArea != null ? de_FilterTextAreaControl(output.TextArea, context) : undefined, - TextField: output.TextField != null ? de_FilterTextFieldControl(output.TextField, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FilterControlList - */ -const de_FilterControlList = (output: any, context: __SerdeContext): FilterControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilterControl(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FilterDateTimePickerControl - */ -const de_FilterDateTimePickerControl = (output: any, context: __SerdeContext): FilterDateTimePickerControl => { - return { - DisplayOptions: - output.DisplayOptions != null - ? de_DateTimePickerControlDisplayOptions(output.DisplayOptions, context) - : undefined, - FilterControlId: __expectString(output.FilterControlId), - SourceFilterId: __expectString(output.SourceFilterId), - Title: __expectString(output.Title), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1FilterDropDownControl - */ -const de_FilterDropDownControl = (output: any, context: __SerdeContext): FilterDropDownControl => { - return { - CascadingControlConfiguration: - output.CascadingControlConfiguration != null - ? de_CascadingControlConfiguration(output.CascadingControlConfiguration, context) - : undefined, - DisplayOptions: - output.DisplayOptions != null ? de_DropDownControlDisplayOptions(output.DisplayOptions, context) : undefined, - FilterControlId: __expectString(output.FilterControlId), - SelectableValues: - output.SelectableValues != null ? de_FilterSelectableValues(output.SelectableValues, context) : undefined, - SourceFilterId: __expectString(output.SourceFilterId), - Title: __expectString(output.Title), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1FilteredVisualsList - */ -const de_FilteredVisualsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FilterGroup - */ -const de_FilterGroup = (output: any, context: __SerdeContext): FilterGroup => { - return { - CrossDataset: __expectString(output.CrossDataset), - FilterGroupId: __expectString(output.FilterGroupId), - Filters: output.Filters != null ? de_FilterList(output.Filters, context) : undefined, - ScopeConfiguration: - output.ScopeConfiguration != null ? de_FilterScopeConfiguration(output.ScopeConfiguration, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1FilterGroupList - */ -const de_FilterGroupList = (output: any, context: __SerdeContext): FilterGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilterGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FilterList - */ -const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Filter(entry, context); + return se_TooltipItem(entry, context); }); - return retVal; }; /** - * deserializeAws_restJson1FilterListConfiguration + * serializeAws_restJson1TooltipOptions */ -const de_FilterListConfiguration = (output: any, context: __SerdeContext): FilterListConfiguration => { - return { - CategoryValues: output.CategoryValues != null ? de_CategoryValueList(output.CategoryValues, context) : undefined, - MatchOperator: __expectString(output.MatchOperator), - SelectAllOptions: __expectString(output.SelectAllOptions), - } as any; +const se_TooltipOptions = (input: TooltipOptions, context: __SerdeContext): any => { + return take(input, { + FieldBasedTooltip: (_) => se_FieldBasedTooltip(_, context), + SelectedTooltipType: [], + TooltipVisibility: [], + }); }; /** - * deserializeAws_restJson1FilterListControl + * serializeAws_restJson1TopBottomFilter */ -const de_FilterListControl = (output: any, context: __SerdeContext): FilterListControl => { - return { - CascadingControlConfiguration: - output.CascadingControlConfiguration != null - ? de_CascadingControlConfiguration(output.CascadingControlConfiguration, context) - : undefined, - DisplayOptions: - output.DisplayOptions != null ? de_ListControlDisplayOptions(output.DisplayOptions, context) : undefined, - FilterControlId: __expectString(output.FilterControlId), - SelectableValues: - output.SelectableValues != null ? de_FilterSelectableValues(output.SelectableValues, context) : undefined, - SourceFilterId: __expectString(output.SourceFilterId), - Title: __expectString(output.Title), - Type: __expectString(output.Type), - } as any; +const se_TopBottomFilter = (input: TopBottomFilter, context: __SerdeContext): any => { + return take(input, { + AggregationSortConfigurations: (_) => se_AggregationSortConfigurationList(_, context), + Column: _json, + FilterId: [], + Limit: [], + ParameterName: [], + TimeGranularity: [], + }); }; /** - * deserializeAws_restJson1FilterOperation + * serializeAws_restJson1TopBottomMoversComputation */ -const de_FilterOperation = (output: any, context: __SerdeContext): FilterOperation => { - return { - ConditionExpression: __expectString(output.ConditionExpression), - } as any; +const se_TopBottomMoversComputation = (input: TopBottomMoversComputation, context: __SerdeContext): any => { + return take(input, { + Category: _json, + ComputationId: [], + MoverSize: [], + Name: [], + SortOrder: [], + Time: _json, + Type: [], + Value: (_) => se_MeasureField(_, context), + }); }; /** - * deserializeAws_restJson1FilterOperationSelectedFieldsConfiguration + * serializeAws_restJson1TopBottomRankedComputation */ -const de_FilterOperationSelectedFieldsConfiguration = ( - output: any, - context: __SerdeContext -): FilterOperationSelectedFieldsConfiguration => { - return { - SelectedFieldOptions: __expectString(output.SelectedFieldOptions), - SelectedFields: output.SelectedFields != null ? de_SelectedFieldList(output.SelectedFields, context) : undefined, - } as any; +const se_TopBottomRankedComputation = (input: TopBottomRankedComputation, context: __SerdeContext): any => { + return take(input, { + Category: _json, + ComputationId: [], + Name: [], + ResultSize: [], + Type: [], + Value: (_) => se_MeasureField(_, context), + }); }; /** - * deserializeAws_restJson1FilterOperationTargetVisualsConfiguration + * serializeAws_restJson1TotalAggregationComputation */ -const de_FilterOperationTargetVisualsConfiguration = ( - output: any, - context: __SerdeContext -): FilterOperationTargetVisualsConfiguration => { - return { - SameSheetTargetVisualConfiguration: - output.SameSheetTargetVisualConfiguration != null - ? de_SameSheetTargetVisualConfiguration(output.SameSheetTargetVisualConfiguration, context) - : undefined, - } as any; +const se_TotalAggregationComputation = (input: TotalAggregationComputation, context: __SerdeContext): any => { + return take(input, { + ComputationId: [], + Name: [], + Value: (_) => se_MeasureField(_, context), + }); }; +// se_TotalOptions omitted. + +// se_TransformOperation omitted. + +// se_TransformOperationList omitted. + /** - * deserializeAws_restJson1FilterRelativeDateTimeControl + * serializeAws_restJson1TreeMapAggregatedFieldWells */ -const de_FilterRelativeDateTimeControl = (output: any, context: __SerdeContext): FilterRelativeDateTimeControl => { - return { - DisplayOptions: - output.DisplayOptions != null - ? de_RelativeDateTimeControlDisplayOptions(output.DisplayOptions, context) - : undefined, - FilterControlId: __expectString(output.FilterControlId), - SourceFilterId: __expectString(output.SourceFilterId), - Title: __expectString(output.Title), - } as any; +const se_TreeMapAggregatedFieldWells = (input: TreeMapAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + Colors: (_) => se_TreeMapMeasureFieldList(_, context), + Groups: _json, + Sizes: (_) => se_TreeMapMeasureFieldList(_, context), + }); }; /** - * deserializeAws_restJson1FilterScopeConfiguration + * serializeAws_restJson1TreeMapConfiguration */ -const de_FilterScopeConfiguration = (output: any, context: __SerdeContext): FilterScopeConfiguration => { - return { - SelectedSheets: - output.SelectedSheets != null - ? de_SelectedSheetsFilterScopeConfiguration(output.SelectedSheets, context) - : undefined, - } as any; +const se_TreeMapConfiguration = (input: TreeMapConfiguration, context: __SerdeContext): any => { + return take(input, { + ColorLabelOptions: _json, + ColorScale: (_) => se_ColorScale(_, context), + DataLabels: _json, + FieldWells: (_) => se_TreeMapFieldWells(_, context), + GroupLabelOptions: _json, + Legend: _json, + SizeLabelOptions: _json, + SortConfiguration: (_) => se_TreeMapSortConfiguration(_, context), + Tooltip: (_) => se_TooltipOptions(_, context), + }); }; +// se_TreeMapDimensionFieldList omitted. + /** - * deserializeAws_restJson1FilterSelectableValues + * serializeAws_restJson1TreeMapFieldWells */ -const de_FilterSelectableValues = (output: any, context: __SerdeContext): FilterSelectableValues => { - return { - Values: output.Values != null ? de_ParameterSelectableValueList(output.Values, context) : undefined, - } as any; +const se_TreeMapFieldWells = (input: TreeMapFieldWells, context: __SerdeContext): any => { + return take(input, { + TreeMapAggregatedFieldWells: (_) => se_TreeMapAggregatedFieldWells(_, context), + }); }; /** - * deserializeAws_restJson1FilterSliderControl + * serializeAws_restJson1TreeMapMeasureFieldList */ -const de_FilterSliderControl = (output: any, context: __SerdeContext): FilterSliderControl => { - return { - DisplayOptions: - output.DisplayOptions != null ? de_SliderControlDisplayOptions(output.DisplayOptions, context) : undefined, - FilterControlId: __expectString(output.FilterControlId), - MaximumValue: __limitedParseDouble(output.MaximumValue), - MinimumValue: __limitedParseDouble(output.MinimumValue), - SourceFilterId: __expectString(output.SourceFilterId), - StepSize: __limitedParseDouble(output.StepSize), - Title: __expectString(output.Title), - Type: __expectString(output.Type), - } as any; +const se_TreeMapMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MeasureField(entry, context); + }); }; /** - * deserializeAws_restJson1FilterTextAreaControl + * serializeAws_restJson1TreeMapSortConfiguration */ -const de_FilterTextAreaControl = (output: any, context: __SerdeContext): FilterTextAreaControl => { - return { - Delimiter: __expectString(output.Delimiter), - DisplayOptions: - output.DisplayOptions != null ? de_TextAreaControlDisplayOptions(output.DisplayOptions, context) : undefined, - FilterControlId: __expectString(output.FilterControlId), - SourceFilterId: __expectString(output.SourceFilterId), - Title: __expectString(output.Title), - } as any; +const se_TreeMapSortConfiguration = (input: TreeMapSortConfiguration, context: __SerdeContext): any => { + return take(input, { + TreeMapGroupItemsLimitConfiguration: _json, + TreeMapSort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * deserializeAws_restJson1FilterTextFieldControl + * serializeAws_restJson1TreeMapVisual */ -const de_FilterTextFieldControl = (output: any, context: __SerdeContext): FilterTextFieldControl => { - return { - DisplayOptions: - output.DisplayOptions != null ? de_TextFieldControlDisplayOptions(output.DisplayOptions, context) : undefined, - FilterControlId: __expectString(output.FilterControlId), - SourceFilterId: __expectString(output.SourceFilterId), - Title: __expectString(output.Title), - } as any; +const se_TreeMapVisual = (input: TreeMapVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_TreeMapConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// se_TrendArrowOptions omitted. + +// se_TwitterParameters omitted. + +// se_Typography omitted. + +// se_UIColorPalette omitted. + +// se_UnaggregatedField omitted. + +// se_UnaggregatedFieldList omitted. + +// se_UniqueValuesComputation omitted. + +// se_UntagColumnOperation omitted. + +// se_UpdateLinkPermissionList omitted. + +// se_UpdateResourcePermissionList omitted. + +// se_UploadSettings omitted. + /** - * deserializeAws_restJson1Folder + * serializeAws_restJson1VisibleRangeOptions */ -const de_Folder = (output: any, context: __SerdeContext): Folder => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - FolderId: __expectString(output.FolderId), - FolderPath: output.FolderPath != null ? de_Path(output.FolderPath, context) : undefined, - FolderType: __expectString(output.FolderType), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1FolderColumnList - */ -const de_FolderColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_VisibleRangeOptions = (input: VisibleRangeOptions, context: __SerdeContext): any => { + return take(input, { + PercentRange: (_) => se_PercentVisibleRange(_, context), + }); }; /** - * deserializeAws_restJson1FolderMember + * serializeAws_restJson1Visual + */ +const se_Visual = (input: Visual, context: __SerdeContext): any => { + return take(input, { + BarChartVisual: (_) => se_BarChartVisual(_, context), + BoxPlotVisual: (_) => se_BoxPlotVisual(_, context), + ComboChartVisual: (_) => se_ComboChartVisual(_, context), + CustomContentVisual: (_) => se_CustomContentVisual(_, context), + EmptyVisual: (_) => se_EmptyVisual(_, context), + FilledMapVisual: (_) => se_FilledMapVisual(_, context), + FunnelChartVisual: (_) => se_FunnelChartVisual(_, context), + GaugeChartVisual: (_) => se_GaugeChartVisual(_, context), + GeospatialMapVisual: (_) => se_GeospatialMapVisual(_, context), + HeatMapVisual: (_) => se_HeatMapVisual(_, context), + HistogramVisual: (_) => se_HistogramVisual(_, context), + InsightVisual: (_) => se_InsightVisual(_, context), + KPIVisual: (_) => se_KPIVisual(_, context), + LineChartVisual: (_) => se_LineChartVisual(_, context), + PieChartVisual: (_) => se_PieChartVisual(_, context), + PivotTableVisual: (_) => se_PivotTableVisual(_, context), + RadarChartVisual: (_) => se_RadarChartVisual(_, context), + SankeyDiagramVisual: (_) => se_SankeyDiagramVisual(_, context), + ScatterPlotVisual: (_) => se_ScatterPlotVisual(_, context), + TableVisual: (_) => se_TableVisual(_, context), + TreeMapVisual: (_) => se_TreeMapVisual(_, context), + WaterfallVisual: (_) => se_WaterfallVisual(_, context), + WordCloudVisual: (_) => se_WordCloudVisual(_, context), + }); +}; + +// se_VisualAxisSortOption omitted. + +/** + * serializeAws_restJson1VisualCustomAction */ -const de_FolderMember = (output: any, context: __SerdeContext): FolderMember => { - return { - MemberId: __expectString(output.MemberId), - MemberType: __expectString(output.MemberType), - } as any; +const se_VisualCustomAction = (input: VisualCustomAction, context: __SerdeContext): any => { + return take(input, { + ActionOperations: (_) => se_VisualCustomActionOperationList(_, context), + CustomActionId: [], + Name: [], + Status: [], + Trigger: [], + }); }; /** - * deserializeAws_restJson1FolderMemberList + * serializeAws_restJson1VisualCustomActionList */ -const de_FolderMemberList = (output: any, context: __SerdeContext): MemberIdArnPair[] => { - const retVal = (output || []) +const se_VisualCustomActionList = (input: VisualCustomAction[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MemberIdArnPair(entry, context); + .map((entry) => { + return se_VisualCustomAction(entry, context); }); - return retVal; }; /** - * deserializeAws_restJson1FolderSummary + * serializeAws_restJson1VisualCustomActionOperation */ -const de_FolderSummary = (output: any, context: __SerdeContext): FolderSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - FolderId: __expectString(output.FolderId), - FolderType: __expectString(output.FolderType), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - } as any; +const se_VisualCustomActionOperation = (input: VisualCustomActionOperation, context: __SerdeContext): any => { + return take(input, { + FilterOperation: _json, + NavigationOperation: _json, + SetParametersOperation: (_) => se_CustomActionSetParametersOperation(_, context), + URLOperation: _json, + }); }; /** - * deserializeAws_restJson1FolderSummaryList + * serializeAws_restJson1VisualCustomActionOperationList */ -const de_FolderSummaryList = (output: any, context: __SerdeContext): FolderSummary[] => { - const retVal = (output || []) +const se_VisualCustomActionOperationList = (input: VisualCustomActionOperation[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FolderSummary(entry, context); + .map((entry) => { + return se_VisualCustomActionOperation(entry, context); }); - return retVal; }; /** - * deserializeAws_restJson1Font + * serializeAws_restJson1VisualList */ -const de_Font = (output: any, context: __SerdeContext): Font => { - return { - FontFamily: __expectString(output.FontFamily), - } as any; +const se_VisualList = (input: Visual[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_Visual(entry, context); + }); }; +// se_VisualMenuOption omitted. + +// se_VisualPalette omitted. + +// se_VisualSubtitleLabelOptions omitted. + +// se_VisualTitleLabelOptions omitted. + +// se_VpcConnectionProperties omitted. + /** - * deserializeAws_restJson1FontConfiguration + * serializeAws_restJson1WaterfallChartAggregatedFieldWells */ -const de_FontConfiguration = (output: any, context: __SerdeContext): FontConfiguration => { - return { - FontColor: __expectString(output.FontColor), - FontDecoration: __expectString(output.FontDecoration), - FontSize: output.FontSize != null ? de_FontSize(output.FontSize, context) : undefined, - FontStyle: __expectString(output.FontStyle), - FontWeight: output.FontWeight != null ? de_FontWeight(output.FontWeight, context) : undefined, - } as any; +const se_WaterfallChartAggregatedFieldWells = ( + input: WaterfallChartAggregatedFieldWells, + context: __SerdeContext +): any => { + return take(input, { + Breakdowns: _json, + Categories: _json, + Values: (_) => se_MeasureFieldList(_, context), + }); }; /** - * deserializeAws_restJson1FontList + * serializeAws_restJson1WaterfallChartConfiguration */ -const de_FontList = (output: any, context: __SerdeContext): Font[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Font(entry, context); - }); - return retVal; +const se_WaterfallChartConfiguration = (input: WaterfallChartConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + CategoryAxisLabelOptions: _json, + DataLabels: _json, + FieldWells: (_) => se_WaterfallChartFieldWells(_, context), + Legend: _json, + PrimaryYAxisDisplayOptions: (_) => se_AxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + SortConfiguration: (_) => se_WaterfallChartSortConfiguration(_, context), + VisualPalette: _json, + WaterfallChartOptions: _json, + }); }; /** - * deserializeAws_restJson1FontSize + * serializeAws_restJson1WaterfallChartFieldWells */ -const de_FontSize = (output: any, context: __SerdeContext): FontSize => { - return { - Relative: __expectString(output.Relative), - } as any; +const se_WaterfallChartFieldWells = (input: WaterfallChartFieldWells, context: __SerdeContext): any => { + return take(input, { + WaterfallChartAggregatedFieldWells: (_) => se_WaterfallChartAggregatedFieldWells(_, context), + }); }; +// se_WaterfallChartOptions omitted. + /** - * deserializeAws_restJson1FontWeight + * serializeAws_restJson1WaterfallChartSortConfiguration */ -const de_FontWeight = (output: any, context: __SerdeContext): FontWeight => { - return { - Name: __expectString(output.Name), - } as any; +const se_WaterfallChartSortConfiguration = (input: WaterfallChartSortConfiguration, context: __SerdeContext): any => { + return take(input, { + BreakdownItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * deserializeAws_restJson1ForecastComputation + * serializeAws_restJson1WaterfallVisual */ -const de_ForecastComputation = (output: any, context: __SerdeContext): ForecastComputation => { - return { - ComputationId: __expectString(output.ComputationId), - CustomSeasonalityValue: __expectInt32(output.CustomSeasonalityValue), - LowerBoundary: __limitedParseDouble(output.LowerBoundary), - Name: __expectString(output.Name), - PeriodsBackward: __expectInt32(output.PeriodsBackward), - PeriodsForward: __expectInt32(output.PeriodsForward), - PredictionInterval: __expectInt32(output.PredictionInterval), - Seasonality: __expectString(output.Seasonality), - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - UpperBoundary: __limitedParseDouble(output.UpperBoundary), - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; +const se_WaterfallVisual = (input: WaterfallVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_WaterfallChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; /** - * deserializeAws_restJson1ForecastConfiguration + * serializeAws_restJson1WhatIfPointScenario */ -const de_ForecastConfiguration = (output: any, context: __SerdeContext): ForecastConfiguration => { - return { - ForecastProperties: - output.ForecastProperties != null - ? de_TimeBasedForecastProperties(output.ForecastProperties, context) - : undefined, - Scenario: output.Scenario != null ? de_ForecastScenario(output.Scenario, context) : undefined, - } as any; +const se_WhatIfPointScenario = (input: WhatIfPointScenario, context: __SerdeContext): any => { + return take(input, { + Date: (_) => Math.round(_.getTime() / 1000), + Value: __serializeFloat, + }); }; /** - * deserializeAws_restJson1ForecastConfigurationList + * serializeAws_restJson1WhatIfRangeScenario */ -const de_ForecastConfigurationList = (output: any, context: __SerdeContext): ForecastConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ForecastConfiguration(entry, context); - }); - return retVal; +const se_WhatIfRangeScenario = (input: WhatIfRangeScenario, context: __SerdeContext): any => { + return take(input, { + EndDate: (_) => Math.round(_.getTime() / 1000), + StartDate: (_) => Math.round(_.getTime() / 1000), + Value: __serializeFloat, + }); }; /** - * deserializeAws_restJson1ForecastScenario + * serializeAws_restJson1WordCloudAggregatedFieldWells */ -const de_ForecastScenario = (output: any, context: __SerdeContext): ForecastScenario => { - return { - WhatIfPointScenario: - output.WhatIfPointScenario != null ? de_WhatIfPointScenario(output.WhatIfPointScenario, context) : undefined, - WhatIfRangeScenario: - output.WhatIfRangeScenario != null ? de_WhatIfRangeScenario(output.WhatIfRangeScenario, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FormatConfiguration - */ -const de_FormatConfiguration = (output: any, context: __SerdeContext): FormatConfiguration => { - return { - DateTimeFormatConfiguration: - output.DateTimeFormatConfiguration != null - ? de_DateTimeFormatConfiguration(output.DateTimeFormatConfiguration, context) - : undefined, - NumberFormatConfiguration: - output.NumberFormatConfiguration != null - ? de_NumberFormatConfiguration(output.NumberFormatConfiguration, context) - : undefined, - StringFormatConfiguration: - output.StringFormatConfiguration != null - ? de_StringFormatConfiguration(output.StringFormatConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FreeFormLayoutCanvasSizeOptions - */ -const de_FreeFormLayoutCanvasSizeOptions = (output: any, context: __SerdeContext): FreeFormLayoutCanvasSizeOptions => { - return { - ScreenCanvasSizeOptions: - output.ScreenCanvasSizeOptions != null - ? de_FreeFormLayoutScreenCanvasSizeOptions(output.ScreenCanvasSizeOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FreeFormLayoutConfiguration - */ -const de_FreeFormLayoutConfiguration = (output: any, context: __SerdeContext): FreeFormLayoutConfiguration => { - return { - CanvasSizeOptions: - output.CanvasSizeOptions != null - ? de_FreeFormLayoutCanvasSizeOptions(output.CanvasSizeOptions, context) - : undefined, - Elements: output.Elements != null ? de_FreeFromLayoutElementList(output.Elements, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FreeFormLayoutElement - */ -const de_FreeFormLayoutElement = (output: any, context: __SerdeContext): FreeFormLayoutElement => { - return { - BackgroundStyle: - output.BackgroundStyle != null - ? de_FreeFormLayoutElementBackgroundStyle(output.BackgroundStyle, context) - : undefined, - BorderStyle: - output.BorderStyle != null ? de_FreeFormLayoutElementBorderStyle(output.BorderStyle, context) : undefined, - ElementId: __expectString(output.ElementId), - ElementType: __expectString(output.ElementType), - Height: __expectString(output.Height), - LoadingAnimation: - output.LoadingAnimation != null ? de_LoadingAnimation(output.LoadingAnimation, context) : undefined, - RenderingRules: - output.RenderingRules != null ? de_SheetElementRenderingRuleList(output.RenderingRules, context) : undefined, - SelectedBorderStyle: - output.SelectedBorderStyle != null - ? de_FreeFormLayoutElementBorderStyle(output.SelectedBorderStyle, context) - : undefined, - Visibility: __expectString(output.Visibility), - Width: __expectString(output.Width), - XAxisLocation: __expectString(output.XAxisLocation), - YAxisLocation: __expectString(output.YAxisLocation), - } as any; -}; - -/** - * deserializeAws_restJson1FreeFormLayoutElementBackgroundStyle - */ -const de_FreeFormLayoutElementBackgroundStyle = ( - output: any, - context: __SerdeContext -): FreeFormLayoutElementBackgroundStyle => { - return { - Color: __expectString(output.Color), - Visibility: __expectString(output.Visibility), - } as any; +const se_WordCloudAggregatedFieldWells = (input: WordCloudAggregatedFieldWells, context: __SerdeContext): any => { + return take(input, { + GroupBy: _json, + Size: (_) => se_WordCloudMeasureFieldList(_, context), + }); }; /** - * deserializeAws_restJson1FreeFormLayoutElementBorderStyle + * serializeAws_restJson1WordCloudChartConfiguration */ -const de_FreeFormLayoutElementBorderStyle = ( - output: any, - context: __SerdeContext -): FreeFormLayoutElementBorderStyle => { - return { - Color: __expectString(output.Color), - Visibility: __expectString(output.Visibility), - } as any; +const se_WordCloudChartConfiguration = (input: WordCloudChartConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryLabelOptions: _json, + FieldWells: (_) => se_WordCloudFieldWells(_, context), + SortConfiguration: (_) => se_WordCloudSortConfiguration(_, context), + WordCloudOptions: _json, + }); }; +// se_WordCloudDimensionFieldList omitted. + /** - * deserializeAws_restJson1FreeFormLayoutScreenCanvasSizeOptions + * serializeAws_restJson1WordCloudFieldWells */ -const de_FreeFormLayoutScreenCanvasSizeOptions = ( - output: any, - context: __SerdeContext -): FreeFormLayoutScreenCanvasSizeOptions => { - return { - OptimizedViewPortWidth: __expectString(output.OptimizedViewPortWidth), - } as any; +const se_WordCloudFieldWells = (input: WordCloudFieldWells, context: __SerdeContext): any => { + return take(input, { + WordCloudAggregatedFieldWells: (_) => se_WordCloudAggregatedFieldWells(_, context), + }); }; /** - * deserializeAws_restJson1FreeFormSectionLayoutConfiguration + * serializeAws_restJson1WordCloudMeasureFieldList */ -const de_FreeFormSectionLayoutConfiguration = ( - output: any, - context: __SerdeContext -): FreeFormSectionLayoutConfiguration => { - return { - Elements: output.Elements != null ? de_FreeFromLayoutElementList(output.Elements, context) : undefined, - } as any; +const se_WordCloudMeasureFieldList = (input: MeasureField[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MeasureField(entry, context); + }); }; +// se_WordCloudOptions omitted. + /** - * deserializeAws_restJson1FreeFromLayoutElementList + * serializeAws_restJson1WordCloudSortConfiguration */ -const de_FreeFromLayoutElementList = (output: any, context: __SerdeContext): FreeFormLayoutElement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FreeFormLayoutElement(entry, context); - }); - return retVal; +const se_WordCloudSortConfiguration = (input: WordCloudSortConfiguration, context: __SerdeContext): any => { + return take(input, { + CategoryItemsLimit: _json, + CategorySort: (_) => se_FieldSortOptionsList(_, context), + }); }; /** - * deserializeAws_restJson1FunnelChartAggregatedFieldWells + * serializeAws_restJson1WordCloudVisual */ -const de_FunnelChartAggregatedFieldWells = (output: any, context: __SerdeContext): FunnelChartAggregatedFieldWells => { - return { - Category: output.Category != null ? de_FunnelChartDimensionFieldList(output.Category, context) : undefined, - Values: output.Values != null ? de_FunnelChartMeasureFieldList(output.Values, context) : undefined, - } as any; +const se_WordCloudVisual = (input: WordCloudVisual, context: __SerdeContext): any => { + return take(input, { + Actions: (_) => se_VisualCustomActionList(_, context), + ChartConfiguration: (_) => se_WordCloudChartConfiguration(_, context), + ColumnHierarchies: (_) => se_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: [], + }); }; +// de_AccountCustomization omitted. + +// de_AccountInfo omitted. + +// de_AccountSettings omitted. + +// de_ActionList omitted. + +// de_ActiveIAMPolicyAssignment omitted. + +// de_ActiveIAMPolicyAssignmentList omitted. + +// de_AdHocFilteringOption omitted. + /** - * deserializeAws_restJson1FunnelChartConfiguration + * deserializeAws_restJson1AggregationFunction */ -const de_FunnelChartConfiguration = (output: any, context: __SerdeContext): FunnelChartConfiguration => { - return { - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - DataLabelOptions: - output.DataLabelOptions != null ? de_FunnelChartDataLabelOptions(output.DataLabelOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_FunnelChartFieldWells(output.FieldWells, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_FunnelChartSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - ValueLabelOptions: - output.ValueLabelOptions != null ? de_ChartAxisLabelOptions(output.ValueLabelOptions, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; +const de_AggregationFunction = (output: any, context: __SerdeContext): AggregationFunction => { + return take(output, { + CategoricalAggregationFunction: __expectString, + DateAggregationFunction: __expectString, + NumericalAggregationFunction: (_: any) => de_NumericalAggregationFunction(_, context), + }) as any; }; /** - * deserializeAws_restJson1FunnelChartDataLabelOptions + * deserializeAws_restJson1AggregationSortConfiguration */ -const de_FunnelChartDataLabelOptions = (output: any, context: __SerdeContext): FunnelChartDataLabelOptions => { - return { - CategoryLabelVisibility: __expectString(output.CategoryLabelVisibility), - LabelColor: __expectString(output.LabelColor), - LabelFontConfiguration: - output.LabelFontConfiguration != null ? de_FontConfiguration(output.LabelFontConfiguration, context) : undefined, - MeasureDataLabelStyle: __expectString(output.MeasureDataLabelStyle), - MeasureLabelVisibility: __expectString(output.MeasureLabelVisibility), - Position: __expectString(output.Position), - Visibility: __expectString(output.Visibility), - } as any; +const de_AggregationSortConfiguration = (output: any, context: __SerdeContext): AggregationSortConfiguration => { + return take(output, { + AggregationFunction: (_: any) => de_AggregationFunction(_, context), + Column: _json, + SortDirection: __expectString, + }) as any; }; /** - * deserializeAws_restJson1FunnelChartDimensionFieldList + * deserializeAws_restJson1AggregationSortConfigurationList */ -const de_FunnelChartDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { +const de_AggregationSortConfigurationList = (output: any, context: __SerdeContext): AggregationSortConfiguration[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); + return de_AggregationSortConfiguration(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FunnelChartFieldWells - */ -const de_FunnelChartFieldWells = (output: any, context: __SerdeContext): FunnelChartFieldWells => { - return { - FunnelChartAggregatedFieldWells: - output.FunnelChartAggregatedFieldWells != null - ? de_FunnelChartAggregatedFieldWells(output.FunnelChartAggregatedFieldWells, context) - : undefined, - } as any; -}; +// de_AmazonElasticsearchParameters omitted. + +// de_AmazonOpenSearchParameters omitted. /** - * deserializeAws_restJson1FunnelChartMeasureFieldList + * deserializeAws_restJson1Analysis */ -const de_FunnelChartMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); - }); - return retVal; +const de_Analysis = (output: any, context: __SerdeContext): Analysis => { + return take(output, { + AnalysisId: __expectString, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSetArns: _json, + Errors: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Sheets: _json, + Status: __expectString, + ThemeArn: __expectString, + }) as any; }; +// de_AnalysisDefaults omitted. + /** - * deserializeAws_restJson1FunnelChartSortConfiguration + * deserializeAws_restJson1AnalysisDefinition */ -const de_FunnelChartSortConfiguration = (output: any, context: __SerdeContext): FunnelChartSortConfiguration => { - return { - CategoryItemsLimit: - output.CategoryItemsLimit != null ? de_ItemsLimitConfiguration(output.CategoryItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - } as any; +const de_AnalysisDefinition = (output: any, context: __SerdeContext): AnalysisDefinition => { + return take(output, { + AnalysisDefaults: _json, + CalculatedFields: _json, + ColumnConfigurations: _json, + DataSetIdentifierDeclarations: _json, + FilterGroups: (_: any) => de_FilterGroupList(_, context), + ParameterDeclarations: (_: any) => de_ParameterDeclarationList(_, context), + Sheets: (_: any) => de_SheetDefinitionList(_, context), + }) as any; }; +// de_AnalysisError omitted. + +// de_AnalysisErrorList omitted. + /** - * deserializeAws_restJson1FunnelChartVisual + * deserializeAws_restJson1AnalysisSummary */ -const de_FunnelChartVisual = (output: any, context: __SerdeContext): FunnelChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_FunnelChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_AnalysisSummary = (output: any, context: __SerdeContext): AnalysisSummary => { + return take(output, { + AnalysisId: __expectString, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_restJson1GaugeChartArcConditionalFormatting + * deserializeAws_restJson1AnalysisSummaryList */ -const de_GaugeChartArcConditionalFormatting = ( - output: any, - context: __SerdeContext -): GaugeChartArcConditionalFormatting => { - return { - ForegroundColor: - output.ForegroundColor != null ? de_ConditionalFormattingColor(output.ForegroundColor, context) : undefined, - } as any; +const de_AnalysisSummaryList = (output: any, context: __SerdeContext): AnalysisSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AnalysisSummary(entry, context); + }); + return retVal; }; +// de_AnchorDateConfiguration omitted. + /** - * deserializeAws_restJson1GaugeChartConditionalFormatting + * deserializeAws_restJson1ArcAxisConfiguration */ -const de_GaugeChartConditionalFormatting = (output: any, context: __SerdeContext): GaugeChartConditionalFormatting => { - return { - ConditionalFormattingOptions: - output.ConditionalFormattingOptions != null - ? de_GaugeChartConditionalFormattingOptionList(output.ConditionalFormattingOptions, context) - : undefined, - } as any; +const de_ArcAxisConfiguration = (output: any, context: __SerdeContext): ArcAxisConfiguration => { + return take(output, { + Range: (_: any) => de_ArcAxisDisplayRange(_, context), + ReserveRange: __expectInt32, + }) as any; }; /** - * deserializeAws_restJson1GaugeChartConditionalFormattingOption + * deserializeAws_restJson1ArcAxisDisplayRange */ -const de_GaugeChartConditionalFormattingOption = ( - output: any, - context: __SerdeContext -): GaugeChartConditionalFormattingOption => { - return { - Arc: output.Arc != null ? de_GaugeChartArcConditionalFormatting(output.Arc, context) : undefined, - PrimaryValue: - output.PrimaryValue != null - ? de_GaugeChartPrimaryValueConditionalFormatting(output.PrimaryValue, context) - : undefined, - } as any; +const de_ArcAxisDisplayRange = (output: any, context: __SerdeContext): ArcAxisDisplayRange => { + return take(output, { + Max: __limitedParseDouble, + Min: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1GaugeChartConditionalFormattingOptionList + * deserializeAws_restJson1ArcConfiguration */ -const de_GaugeChartConditionalFormattingOptionList = ( - output: any, - context: __SerdeContext -): GaugeChartConditionalFormattingOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GaugeChartConditionalFormattingOption(entry, context); - }); - return retVal; +const de_ArcConfiguration = (output: any, context: __SerdeContext): ArcConfiguration => { + return take(output, { + ArcAngle: __limitedParseDouble, + ArcThickness: __expectString, + }) as any; }; +// de_ArcOptions omitted. + +// de_AthenaParameters omitted. + +// de_AuroraParameters omitted. + +// de_AuroraPostgreSqlParameters omitted. + +// de_AwsIotAnalyticsParameters omitted. + /** - * deserializeAws_restJson1GaugeChartConfiguration + * deserializeAws_restJson1AxisDataOptions */ -const de_GaugeChartConfiguration = (output: any, context: __SerdeContext): GaugeChartConfiguration => { - return { - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_GaugeChartFieldWells(output.FieldWells, context) : undefined, - GaugeChartOptions: - output.GaugeChartOptions != null ? de_GaugeChartOptions(output.GaugeChartOptions, context) : undefined, - TooltipOptions: output.TooltipOptions != null ? de_TooltipOptions(output.TooltipOptions, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; +const de_AxisDataOptions = (output: any, context: __SerdeContext): AxisDataOptions => { + return take(output, { + DateAxisOptions: _json, + NumericAxisOptions: (_: any) => de_NumericAxisOptions(_, context), + }) as any; }; +// de_AxisDisplayDataDrivenRange omitted. + /** - * deserializeAws_restJson1GaugeChartFieldWells + * deserializeAws_restJson1AxisDisplayMinMaxRange */ -const de_GaugeChartFieldWells = (output: any, context: __SerdeContext): GaugeChartFieldWells => { - return { - TargetValues: output.TargetValues != null ? de_MeasureFieldList(output.TargetValues, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; +const de_AxisDisplayMinMaxRange = (output: any, context: __SerdeContext): AxisDisplayMinMaxRange => { + return take(output, { + Maximum: __limitedParseDouble, + Minimum: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1GaugeChartOptions + * deserializeAws_restJson1AxisDisplayOptions */ -const de_GaugeChartOptions = (output: any, context: __SerdeContext): GaugeChartOptions => { - return { - Arc: output.Arc != null ? de_ArcConfiguration(output.Arc, context) : undefined, - ArcAxis: output.ArcAxis != null ? de_ArcAxisConfiguration(output.ArcAxis, context) : undefined, - Comparison: output.Comparison != null ? de_ComparisonConfiguration(output.Comparison, context) : undefined, - PrimaryValueDisplayType: __expectString(output.PrimaryValueDisplayType), - PrimaryValueFontConfiguration: - output.PrimaryValueFontConfiguration != null - ? de_FontConfiguration(output.PrimaryValueFontConfiguration, context) - : undefined, - } as any; +const de_AxisDisplayOptions = (output: any, context: __SerdeContext): AxisDisplayOptions => { + return take(output, { + AxisLineVisibility: __expectString, + AxisOffset: __expectString, + DataOptions: (_: any) => de_AxisDataOptions(_, context), + GridLineVisibility: __expectString, + ScrollbarOptions: (_: any) => de_ScrollBarOptions(_, context), + TickLabelOptions: (_: any) => de_AxisTickLabelOptions(_, context), + }) as any; }; /** - * deserializeAws_restJson1GaugeChartPrimaryValueConditionalFormatting + * deserializeAws_restJson1AxisDisplayRange */ -const de_GaugeChartPrimaryValueConditionalFormatting = ( - output: any, - context: __SerdeContext -): GaugeChartPrimaryValueConditionalFormatting => { - return { - Icon: output.Icon != null ? de_ConditionalFormattingIcon(output.Icon, context) : undefined, - TextColor: output.TextColor != null ? de_ConditionalFormattingColor(output.TextColor, context) : undefined, - } as any; +const de_AxisDisplayRange = (output: any, context: __SerdeContext): AxisDisplayRange => { + return take(output, { + DataDriven: _json, + MinMax: (_: any) => de_AxisDisplayMinMaxRange(_, context), + }) as any; }; +// de_AxisLabelOptions omitted. + +// de_AxisLabelOptionsList omitted. + +// de_AxisLabelReferenceOptions omitted. + /** - * deserializeAws_restJson1GaugeChartVisual + * deserializeAws_restJson1AxisLinearScale */ -const de_GaugeChartVisual = (output: any, context: __SerdeContext): GaugeChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_GaugeChartConfiguration(output.ChartConfiguration, context) : undefined, - ConditionalFormatting: - output.ConditionalFormatting != null - ? de_GaugeChartConditionalFormatting(output.ConditionalFormatting, context) - : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_AxisLinearScale = (output: any, context: __SerdeContext): AxisLinearScale => { + return take(output, { + StepCount: __expectInt32, + StepSize: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1GeoSpatialColumnGroup + * deserializeAws_restJson1AxisLogarithmicScale */ -const de_GeoSpatialColumnGroup = (output: any, context: __SerdeContext): GeoSpatialColumnGroup => { - return { - Columns: output.Columns != null ? de_ColumnList(output.Columns, context) : undefined, - CountryCode: __expectString(output.CountryCode), - Name: __expectString(output.Name), - } as any; +const de_AxisLogarithmicScale = (output: any, context: __SerdeContext): AxisLogarithmicScale => { + return take(output, { + Base: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1GeospatialCoordinateBounds + * deserializeAws_restJson1AxisScale */ -const de_GeospatialCoordinateBounds = (output: any, context: __SerdeContext): GeospatialCoordinateBounds => { - return { - East: __limitedParseDouble(output.East), - North: __limitedParseDouble(output.North), - South: __limitedParseDouble(output.South), - West: __limitedParseDouble(output.West), - } as any; +const de_AxisScale = (output: any, context: __SerdeContext): AxisScale => { + return take(output, { + Linear: (_: any) => de_AxisLinearScale(_, context), + Logarithmic: (_: any) => de_AxisLogarithmicScale(_, context), + }) as any; }; /** - * deserializeAws_restJson1GeospatialMapAggregatedFieldWells + * deserializeAws_restJson1AxisTickLabelOptions */ -const de_GeospatialMapAggregatedFieldWells = ( - output: any, - context: __SerdeContext -): GeospatialMapAggregatedFieldWells => { - return { - Colors: output.Colors != null ? de_DimensionFieldList(output.Colors, context) : undefined, - Geospatial: output.Geospatial != null ? de_DimensionFieldList(output.Geospatial, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; +const de_AxisTickLabelOptions = (output: any, context: __SerdeContext): AxisTickLabelOptions => { + return take(output, { + LabelOptions: _json, + RotationAngle: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1GeospatialMapConfiguration + * deserializeAws_restJson1BarChartAggregatedFieldWells */ -const de_GeospatialMapConfiguration = (output: any, context: __SerdeContext): GeospatialMapConfiguration => { - return { - FieldWells: output.FieldWells != null ? de_GeospatialMapFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - MapStyleOptions: - output.MapStyleOptions != null ? de_GeospatialMapStyleOptions(output.MapStyleOptions, context) : undefined, - PointStyleOptions: - output.PointStyleOptions != null ? de_GeospatialPointStyleOptions(output.PointStyleOptions, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - WindowOptions: output.WindowOptions != null ? de_GeospatialWindowOptions(output.WindowOptions, context) : undefined, - } as any; +const de_BarChartAggregatedFieldWells = (output: any, context: __SerdeContext): BarChartAggregatedFieldWells => { + return take(output, { + Category: _json, + Colors: _json, + SmallMultiples: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1GeospatialMapFieldWells + * deserializeAws_restJson1BarChartConfiguration */ -const de_GeospatialMapFieldWells = (output: any, context: __SerdeContext): GeospatialMapFieldWells => { - return { - GeospatialMapAggregatedFieldWells: - output.GeospatialMapAggregatedFieldWells != null - ? de_GeospatialMapAggregatedFieldWells(output.GeospatialMapAggregatedFieldWells, context) - : undefined, - } as any; +const de_BarChartConfiguration = (output: any, context: __SerdeContext): BarChartConfiguration => { + return take(output, { + BarsArrangement: __expectString, + CategoryAxis: (_: any) => de_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + ColorLabelOptions: _json, + ContributionAnalysisDefaults: _json, + DataLabels: _json, + FieldWells: (_: any) => de_BarChartFieldWells(_, context), + Legend: _json, + Orientation: __expectString, + ReferenceLines: (_: any) => de_ReferenceLineList(_, context), + SmallMultiplesOptions: _json, + SortConfiguration: (_: any) => de_BarChartSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + ValueAxis: (_: any) => de_AxisDisplayOptions(_, context), + ValueLabelOptions: _json, + VisualPalette: _json, + }) as any; }; /** - * deserializeAws_restJson1GeospatialMapStyleOptions + * deserializeAws_restJson1BarChartFieldWells */ -const de_GeospatialMapStyleOptions = (output: any, context: __SerdeContext): GeospatialMapStyleOptions => { - return { - BaseMapStyle: __expectString(output.BaseMapStyle), - } as any; +const de_BarChartFieldWells = (output: any, context: __SerdeContext): BarChartFieldWells => { + return take(output, { + BarChartAggregatedFieldWells: (_: any) => de_BarChartAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1GeospatialMapVisual + * deserializeAws_restJson1BarChartSortConfiguration */ -const de_GeospatialMapVisual = (output: any, context: __SerdeContext): GeospatialMapVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_GeospatialMapConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_BarChartSortConfiguration = (output: any, context: __SerdeContext): BarChartSortConfiguration => { + return take(output, { + CategoryItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + ColorItemsLimit: _json, + ColorSort: (_: any) => de_FieldSortOptionsList(_, context), + SmallMultiplesLimitConfiguration: _json, + SmallMultiplesSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1GeospatialPointStyleOptions + * deserializeAws_restJson1BarChartVisual */ -const de_GeospatialPointStyleOptions = (output: any, context: __SerdeContext): GeospatialPointStyleOptions => { - return { - ClusterMarkerConfiguration: - output.ClusterMarkerConfiguration != null - ? de_ClusterMarkerConfiguration(output.ClusterMarkerConfiguration, context) - : undefined, - SelectedPointStyle: __expectString(output.SelectedPointStyle), - } as any; +const de_BarChartVisual = (output: any, context: __SerdeContext): BarChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_BarChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_BinCountOptions omitted. + /** - * deserializeAws_restJson1GeospatialWindowOptions + * deserializeAws_restJson1BinWidthOptions */ -const de_GeospatialWindowOptions = (output: any, context: __SerdeContext): GeospatialWindowOptions => { - return { - Bounds: output.Bounds != null ? de_GeospatialCoordinateBounds(output.Bounds, context) : undefined, - MapZoomMode: __expectString(output.MapZoomMode), - } as any; +const de_BinWidthOptions = (output: any, context: __SerdeContext): BinWidthOptions => { + return take(output, { + BinCountLimit: __expectLong, + Value: __limitedParseDouble, + }) as any; }; +// de_BodySectionConfiguration omitted. + +// de_BodySectionConfigurationList omitted. + +// de_BodySectionContent omitted. + +// de_BorderStyle omitted. + /** - * deserializeAws_restJson1GlobalTableBorderOptions + * deserializeAws_restJson1BoxPlotAggregatedFieldWells */ -const de_GlobalTableBorderOptions = (output: any, context: __SerdeContext): GlobalTableBorderOptions => { - return { - SideSpecificBorder: - output.SideSpecificBorder != null ? de_TableSideBorderOptions(output.SideSpecificBorder, context) : undefined, - UniformBorder: output.UniformBorder != null ? de_TableBorderOptions(output.UniformBorder, context) : undefined, - } as any; +const de_BoxPlotAggregatedFieldWells = (output: any, context: __SerdeContext): BoxPlotAggregatedFieldWells => { + return take(output, { + GroupBy: _json, + Values: (_: any) => de_BoxPlotMeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1GradientColor + * deserializeAws_restJson1BoxPlotChartConfiguration */ -const de_GradientColor = (output: any, context: __SerdeContext): GradientColor => { - return { - Stops: output.Stops != null ? de_GradientStopList(output.Stops, context) : undefined, - } as any; +const de_BoxPlotChartConfiguration = (output: any, context: __SerdeContext): BoxPlotChartConfiguration => { + return take(output, { + BoxPlotOptions: _json, + CategoryAxis: (_: any) => de_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + FieldWells: (_: any) => de_BoxPlotFieldWells(_, context), + Legend: _json, + PrimaryYAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + ReferenceLines: (_: any) => de_ReferenceLineList(_, context), + SortConfiguration: (_: any) => de_BoxPlotSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + VisualPalette: _json, + }) as any; }; +// de_BoxPlotDimensionFieldList omitted. + /** - * deserializeAws_restJson1GradientStop + * deserializeAws_restJson1BoxPlotFieldWells */ -const de_GradientStop = (output: any, context: __SerdeContext): GradientStop => { - return { - Color: __expectString(output.Color), - DataValue: __limitedParseDouble(output.DataValue), - GradientOffset: __limitedParseDouble(output.GradientOffset), - } as any; +const de_BoxPlotFieldWells = (output: any, context: __SerdeContext): BoxPlotFieldWells => { + return take(output, { + BoxPlotAggregatedFieldWells: (_: any) => de_BoxPlotAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1GradientStopList + * deserializeAws_restJson1BoxPlotMeasureFieldList */ -const de_GradientStopList = (output: any, context: __SerdeContext): GradientStop[] => { +const de_BoxPlotMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GradientStop(entry, context); + return de_MeasureField(entry, context); }); return retVal; }; +// de_BoxPlotOptions omitted. + /** - * deserializeAws_restJson1GridLayoutCanvasSizeOptions + * deserializeAws_restJson1BoxPlotSortConfiguration */ -const de_GridLayoutCanvasSizeOptions = (output: any, context: __SerdeContext): GridLayoutCanvasSizeOptions => { - return { - ScreenCanvasSizeOptions: - output.ScreenCanvasSizeOptions != null - ? de_GridLayoutScreenCanvasSizeOptions(output.ScreenCanvasSizeOptions, context) - : undefined, - } as any; +const de_BoxPlotSortConfiguration = (output: any, context: __SerdeContext): BoxPlotSortConfiguration => { + return take(output, { + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + PaginationConfiguration: _json, + }) as any; }; +// de_BoxPlotStyleOptions omitted. + /** - * deserializeAws_restJson1GridLayoutConfiguration + * deserializeAws_restJson1BoxPlotVisual */ -const de_GridLayoutConfiguration = (output: any, context: __SerdeContext): GridLayoutConfiguration => { - return { - CanvasSizeOptions: - output.CanvasSizeOptions != null ? de_GridLayoutCanvasSizeOptions(output.CanvasSizeOptions, context) : undefined, - Elements: output.Elements != null ? de_GridLayoutElementList(output.Elements, context) : undefined, - } as any; +const de_BoxPlotVisual = (output: any, context: __SerdeContext): BoxPlotVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_BoxPlotChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_CalculatedColumn omitted. + +// de_CalculatedColumnList omitted. + +// de_CalculatedField omitted. + +// de_CalculatedFields omitted. + +// de_CalculatedMeasureField omitted. + +// de_CascadingControlConfiguration omitted. + +// de_CascadingControlSource omitted. + +// de_CascadingControlSourceList omitted. + +// de_CastColumnTypeOperation omitted. + +// de_CategoricalDimensionField omitted. + +// de_CategoricalMeasureField omitted. + +// de_CategoryDrillDownFilter omitted. + +// de_CategoryFilter omitted. + +// de_CategoryFilterConfiguration omitted. + +// de_CategoryValueList omitted. + +// de_ChartAxisLabelOptions omitted. + +// de_ClusterMarker omitted. + +// de_ClusterMarkerConfiguration omitted. + +// de_ColorList omitted. + /** - * deserializeAws_restJson1GridLayoutElement + * deserializeAws_restJson1ColorScale */ -const de_GridLayoutElement = (output: any, context: __SerdeContext): GridLayoutElement => { - return { - ColumnIndex: __expectInt32(output.ColumnIndex), - ColumnSpan: __expectInt32(output.ColumnSpan), - ElementId: __expectString(output.ElementId), - ElementType: __expectString(output.ElementType), - RowIndex: __expectInt32(output.RowIndex), - RowSpan: __expectInt32(output.RowSpan), - } as any; +const de_ColorScale = (output: any, context: __SerdeContext): ColorScale => { + return take(output, { + ColorFillType: __expectString, + Colors: (_: any) => de_ColorScaleColorList(_, context), + NullValueColor: (_: any) => de_DataColor(_, context), + }) as any; }; /** - * deserializeAws_restJson1GridLayoutElementList + * deserializeAws_restJson1ColorScaleColorList */ -const de_GridLayoutElementList = (output: any, context: __SerdeContext): GridLayoutElement[] => { +const de_ColorScaleColorList = (output: any, context: __SerdeContext): DataColor[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GridLayoutElement(entry, context); + return de_DataColor(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1GridLayoutScreenCanvasSizeOptions - */ -const de_GridLayoutScreenCanvasSizeOptions = ( - output: any, - context: __SerdeContext -): GridLayoutScreenCanvasSizeOptions => { - return { - OptimizedViewPortWidth: __expectString(output.OptimizedViewPortWidth), - ResizeOption: __expectString(output.ResizeOption), - } as any; -}; +// de_ColumnConfiguration omitted. + +// de_ColumnConfigurationList omitted. + +// de_ColumnDescription omitted. + +// de_ColumnGroup omitted. + +// de_ColumnGroupColumnSchema omitted. + +// de_ColumnGroupColumnSchemaList omitted. + +// de_ColumnGroupList omitted. + +// de_ColumnGroupSchema omitted. + +// de_ColumnGroupSchemaList omitted. /** - * deserializeAws_restJson1Group + * deserializeAws_restJson1ColumnHierarchy */ -const de_Group = (output: any, context: __SerdeContext): Group => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - GroupName: __expectString(output.GroupName), - PrincipalId: __expectString(output.PrincipalId), - } as any; +const de_ColumnHierarchy = (output: any, context: __SerdeContext): ColumnHierarchy => { + return take(output, { + DateTimeHierarchy: (_: any) => de_DateTimeHierarchy(_, context), + ExplicitHierarchy: (_: any) => de_ExplicitHierarchy(_, context), + PredefinedHierarchy: (_: any) => de_PredefinedHierarchy(_, context), + }) as any; }; /** - * deserializeAws_restJson1GroupList + * deserializeAws_restJson1ColumnHierarchyList */ -const de_GroupList = (output: any, context: __SerdeContext): Group[] => { +const de_ColumnHierarchyList = (output: any, context: __SerdeContext): ColumnHierarchy[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Group(entry, context); + return de_ColumnHierarchy(entry, context); }); return retVal; }; +// de_ColumnIdentifier omitted. + +// de_ColumnLevelPermissionRule omitted. + +// de_ColumnLevelPermissionRuleList omitted. + +// de_ColumnList omitted. + +// de_ColumnNameList omitted. + +// de_ColumnSchema omitted. + +// de_ColumnSchemaList omitted. + /** - * deserializeAws_restJson1GroupMember + * deserializeAws_restJson1ColumnSort */ -const de_GroupMember = (output: any, context: __SerdeContext): GroupMember => { - return { - Arn: __expectString(output.Arn), - MemberName: __expectString(output.MemberName), - } as any; +const de_ColumnSort = (output: any, context: __SerdeContext): ColumnSort => { + return take(output, { + AggregationFunction: (_: any) => de_AggregationFunction(_, context), + Direction: __expectString, + SortBy: _json, + }) as any; }; +// de_ColumnTag omitted. + +// de_ColumnTagList omitted. + +// de_ColumnTagNames omitted. + /** - * deserializeAws_restJson1GroupMemberList + * deserializeAws_restJson1ColumnTooltipItem */ -const de_GroupMemberList = (output: any, context: __SerdeContext): GroupMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupMember(entry, context); - }); - return retVal; +const de_ColumnTooltipItem = (output: any, context: __SerdeContext): ColumnTooltipItem => { + return take(output, { + Aggregation: (_: any) => de_AggregationFunction(_, context), + Column: _json, + Label: __expectString, + Visibility: __expectString, + }) as any; }; /** - * deserializeAws_restJson1GrowthRateComputation + * deserializeAws_restJson1ComboChartAggregatedFieldWells */ -const de_GrowthRateComputation = (output: any, context: __SerdeContext): GrowthRateComputation => { - return { - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - PeriodSize: __expectInt32(output.PeriodSize), - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; +const de_ComboChartAggregatedFieldWells = (output: any, context: __SerdeContext): ComboChartAggregatedFieldWells => { + return take(output, { + BarValues: (_: any) => de_MeasureFieldList(_, context), + Category: _json, + Colors: _json, + LineValues: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1GutterStyle + * deserializeAws_restJson1ComboChartConfiguration */ -const de_GutterStyle = (output: any, context: __SerdeContext): GutterStyle => { - return { - Show: __expectBoolean(output.Show), - } as any; +const de_ComboChartConfiguration = (output: any, context: __SerdeContext): ComboChartConfiguration => { + return take(output, { + BarDataLabels: _json, + BarsArrangement: __expectString, + CategoryAxis: (_: any) => de_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + ColorLabelOptions: _json, + FieldWells: (_: any) => de_ComboChartFieldWells(_, context), + Legend: _json, + LineDataLabels: _json, + PrimaryYAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + ReferenceLines: (_: any) => de_ReferenceLineList(_, context), + SecondaryYAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + SecondaryYAxisLabelOptions: _json, + SortConfiguration: (_: any) => de_ComboChartSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + VisualPalette: _json, + }) as any; }; /** - * deserializeAws_restJson1HeaderFooterSectionConfiguration + * deserializeAws_restJson1ComboChartFieldWells */ -const de_HeaderFooterSectionConfiguration = ( - output: any, - context: __SerdeContext -): HeaderFooterSectionConfiguration => { - return { - Layout: output.Layout != null ? de_SectionLayoutConfiguration(output.Layout, context) : undefined, - SectionId: __expectString(output.SectionId), - Style: output.Style != null ? de_SectionStyle(output.Style, context) : undefined, - } as any; +const de_ComboChartFieldWells = (output: any, context: __SerdeContext): ComboChartFieldWells => { + return take(output, { + ComboChartAggregatedFieldWells: (_: any) => de_ComboChartAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1HeaderFooterSectionConfigurationList + * deserializeAws_restJson1ComboChartSortConfiguration */ -const de_HeaderFooterSectionConfigurationList = ( - output: any, - context: __SerdeContext -): HeaderFooterSectionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HeaderFooterSectionConfiguration(entry, context); - }); - return retVal; +const de_ComboChartSortConfiguration = (output: any, context: __SerdeContext): ComboChartSortConfiguration => { + return take(output, { + CategoryItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + ColorItemsLimit: _json, + ColorSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1HeatMapAggregatedFieldWells + * deserializeAws_restJson1ComboChartVisual */ -const de_HeatMapAggregatedFieldWells = (output: any, context: __SerdeContext): HeatMapAggregatedFieldWells => { - return { - Columns: output.Columns != null ? de_HeatMapDimensionFieldList(output.Columns, context) : undefined, - Rows: output.Rows != null ? de_HeatMapDimensionFieldList(output.Rows, context) : undefined, - Values: output.Values != null ? de_HeatMapMeasureFieldList(output.Values, context) : undefined, - } as any; +const de_ComboChartVisual = (output: any, context: __SerdeContext): ComboChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_ComboChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_ComparisonConfiguration omitted. + +// de_ComparisonFormatConfiguration omitted. + /** - * deserializeAws_restJson1HeatMapConfiguration + * deserializeAws_restJson1Computation */ -const de_HeatMapConfiguration = (output: any, context: __SerdeContext): HeatMapConfiguration => { - return { - ColorScale: output.ColorScale != null ? de_ColorScale(output.ColorScale, context) : undefined, - ColumnLabelOptions: - output.ColumnLabelOptions != null ? de_ChartAxisLabelOptions(output.ColumnLabelOptions, context) : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_HeatMapFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - RowLabelOptions: - output.RowLabelOptions != null ? de_ChartAxisLabelOptions(output.RowLabelOptions, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_HeatMapSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - } as any; +const de_Computation = (output: any, context: __SerdeContext): Computation => { + return take(output, { + Forecast: (_: any) => de_ForecastComputation(_, context), + GrowthRate: (_: any) => de_GrowthRateComputation(_, context), + MaximumMinimum: (_: any) => de_MaximumMinimumComputation(_, context), + MetricComparison: (_: any) => de_MetricComparisonComputation(_, context), + PeriodOverPeriod: (_: any) => de_PeriodOverPeriodComputation(_, context), + PeriodToDate: (_: any) => de_PeriodToDateComputation(_, context), + TopBottomMovers: (_: any) => de_TopBottomMoversComputation(_, context), + TopBottomRanked: (_: any) => de_TopBottomRankedComputation(_, context), + TotalAggregation: (_: any) => de_TotalAggregationComputation(_, context), + UniqueValues: _json, + }) as any; }; /** - * deserializeAws_restJson1HeatMapDimensionFieldList + * deserializeAws_restJson1ComputationList */ -const de_HeatMapDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { +const de_ComputationList = (output: any, context: __SerdeContext): Computation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); + return de_Computation(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1HeatMapFieldWells + * deserializeAws_restJson1ConditionalFormattingColor */ -const de_HeatMapFieldWells = (output: any, context: __SerdeContext): HeatMapFieldWells => { - return { - HeatMapAggregatedFieldWells: - output.HeatMapAggregatedFieldWells != null - ? de_HeatMapAggregatedFieldWells(output.HeatMapAggregatedFieldWells, context) - : undefined, - } as any; +const de_ConditionalFormattingColor = (output: any, context: __SerdeContext): ConditionalFormattingColor => { + return take(output, { + Gradient: (_: any) => de_ConditionalFormattingGradientColor(_, context), + Solid: _json, + }) as any; }; +// de_ConditionalFormattingCustomIconCondition omitted. + +// de_ConditionalFormattingCustomIconOptions omitted. + /** - * deserializeAws_restJson1HeatMapMeasureFieldList + * deserializeAws_restJson1ConditionalFormattingGradientColor */ -const de_HeatMapMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); - }); - return retVal; +const de_ConditionalFormattingGradientColor = ( + output: any, + context: __SerdeContext +): ConditionalFormattingGradientColor => { + return take(output, { + Color: (_: any) => de_GradientColor(_, context), + Expression: __expectString, + }) as any; }; +// de_ConditionalFormattingIcon omitted. + +// de_ConditionalFormattingIconDisplayConfiguration omitted. + +// de_ConditionalFormattingIconSet omitted. + +// de_ConditionalFormattingSolidColor omitted. + +// de_ContributionAnalysisDefault omitted. + +// de_ContributionAnalysisDefaultList omitted. + +// de_ContributorDimensionList omitted. + +// de_CreateColumnsOperation omitted. + +// de_CurrencyDisplayFormatConfiguration omitted. + +// de_CustomActionFilterOperation omitted. + +// de_CustomActionNavigationOperation omitted. + /** - * deserializeAws_restJson1HeatMapSortConfiguration + * deserializeAws_restJson1CustomActionSetParametersOperation */ -const de_HeatMapSortConfiguration = (output: any, context: __SerdeContext): HeatMapSortConfiguration => { - return { - HeatMapColumnItemsLimitConfiguration: - output.HeatMapColumnItemsLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.HeatMapColumnItemsLimitConfiguration, context) - : undefined, - HeatMapColumnSort: - output.HeatMapColumnSort != null ? de_FieldSortOptionsList(output.HeatMapColumnSort, context) : undefined, - HeatMapRowItemsLimitConfiguration: - output.HeatMapRowItemsLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.HeatMapRowItemsLimitConfiguration, context) - : undefined, - HeatMapRowSort: output.HeatMapRowSort != null ? de_FieldSortOptionsList(output.HeatMapRowSort, context) : undefined, - } as any; +const de_CustomActionSetParametersOperation = ( + output: any, + context: __SerdeContext +): CustomActionSetParametersOperation => { + return take(output, { + ParameterValueConfigurations: (_: any) => de_SetParameterValueConfigurationList(_, context), + }) as any; }; +// de_CustomActionURLOperation omitted. + +// de_CustomContentConfiguration omitted. + /** - * deserializeAws_restJson1HeatMapVisual + * deserializeAws_restJson1CustomContentVisual */ -const de_HeatMapVisual = (output: any, context: __SerdeContext): HeatMapVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_HeatMapConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_CustomContentVisual = (output: any, context: __SerdeContext): CustomContentVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: _json, + DataSetIdentifier: __expectString, + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_CustomFilterConfiguration omitted. + +// de_CustomFilterListConfiguration omitted. + +// de_CustomNarrativeOptions omitted. + /** - * deserializeAws_restJson1HistogramAggregatedFieldWells + * deserializeAws_restJson1CustomParameterValues */ -const de_HistogramAggregatedFieldWells = (output: any, context: __SerdeContext): HistogramAggregatedFieldWells => { - return { - Values: output.Values != null ? de_HistogramMeasureFieldList(output.Values, context) : undefined, - } as any; +const de_CustomParameterValues = (output: any, context: __SerdeContext): CustomParameterValues => { + return take(output, { + DateTimeValues: (_: any) => de_DateTimeDefaultValueList(_, context), + DecimalValues: (_: any) => de_DecimalDefaultValueList(_, context), + IntegerValues: _json, + StringValues: _json, + }) as any; }; +// de_CustomSql omitted. + /** - * deserializeAws_restJson1HistogramBinOptions + * deserializeAws_restJson1CustomValuesConfiguration */ -const de_HistogramBinOptions = (output: any, context: __SerdeContext): HistogramBinOptions => { - return { - BinCount: output.BinCount != null ? de_BinCountOptions(output.BinCount, context) : undefined, - BinWidth: output.BinWidth != null ? de_BinWidthOptions(output.BinWidth, context) : undefined, - SelectedBinType: __expectString(output.SelectedBinType), - StartValue: __limitedParseDouble(output.StartValue), - } as any; +const de_CustomValuesConfiguration = (output: any, context: __SerdeContext): CustomValuesConfiguration => { + return take(output, { + CustomValues: (_: any) => de_CustomParameterValues(_, context), + IncludeNullValue: __expectBoolean, + }) as any; }; /** - * deserializeAws_restJson1HistogramConfiguration + * deserializeAws_restJson1Dashboard */ -const de_HistogramConfiguration = (output: any, context: __SerdeContext): HistogramConfiguration => { - return { - BinOptions: output.BinOptions != null ? de_HistogramBinOptions(output.BinOptions, context) : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_HistogramFieldWells(output.FieldWells, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - XAxisDisplayOptions: - output.XAxisDisplayOptions != null ? de_AxisDisplayOptions(output.XAxisDisplayOptions, context) : undefined, - XAxisLabelOptions: - output.XAxisLabelOptions != null ? de_ChartAxisLabelOptions(output.XAxisLabelOptions, context) : undefined, - YAxisDisplayOptions: - output.YAxisDisplayOptions != null ? de_AxisDisplayOptions(output.YAxisDisplayOptions, context) : undefined, - } as any; +const de_Dashboard = (output: any, context: __SerdeContext): Dashboard => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DashboardId: __expectString, + LastPublishedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Version: (_: any) => de_DashboardVersion(_, context), + }) as any; }; +// de_DashboardError omitted. + +// de_DashboardErrorList omitted. + +// de_DashboardPublishOptions omitted. + /** - * deserializeAws_restJson1HistogramFieldWells + * deserializeAws_restJson1DashboardSummary */ -const de_HistogramFieldWells = (output: any, context: __SerdeContext): HistogramFieldWells => { - return { - HistogramAggregatedFieldWells: - output.HistogramAggregatedFieldWells != null - ? de_HistogramAggregatedFieldWells(output.HistogramAggregatedFieldWells, context) - : undefined, - } as any; +const de_DashboardSummary = (output: any, context: __SerdeContext): DashboardSummary => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DashboardId: __expectString, + LastPublishedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PublishedVersionNumber: __expectLong, + }) as any; }; /** - * deserializeAws_restJson1HistogramMeasureFieldList + * deserializeAws_restJson1DashboardSummaryList */ -const de_HistogramMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { +const de_DashboardSummaryList = (output: any, context: __SerdeContext): DashboardSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); + return de_DashboardSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1HistogramVisual + * deserializeAws_restJson1DashboardVersion */ -const de_HistogramVisual = (output: any, context: __SerdeContext): HistogramVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_HistogramConfiguration(output.ChartConfiguration, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_DashboardVersion = (output: any, context: __SerdeContext): DashboardVersion => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSetArns: _json, + Description: __expectString, + Errors: _json, + Sheets: _json, + SourceEntityArn: __expectString, + Status: __expectString, + ThemeArn: __expectString, + VersionNumber: __expectLong, + }) as any; }; /** - * deserializeAws_restJson1IAMPolicyAssignment + * deserializeAws_restJson1DashboardVersionDefinition */ -const de_IAMPolicyAssignment = (output: any, context: __SerdeContext): IAMPolicyAssignment => { - return { - AssignmentId: __expectString(output.AssignmentId), - AssignmentName: __expectString(output.AssignmentName), - AssignmentStatus: __expectString(output.AssignmentStatus), - AwsAccountId: __expectString(output.AwsAccountId), - Identities: output.Identities != null ? de_IdentityMap(output.Identities, context) : undefined, - PolicyArn: __expectString(output.PolicyArn), - } as any; +const de_DashboardVersionDefinition = (output: any, context: __SerdeContext): DashboardVersionDefinition => { + return take(output, { + AnalysisDefaults: _json, + CalculatedFields: _json, + ColumnConfigurations: _json, + DataSetIdentifierDeclarations: _json, + FilterGroups: (_: any) => de_FilterGroupList(_, context), + ParameterDeclarations: (_: any) => de_ParameterDeclarationList(_, context), + Sheets: (_: any) => de_SheetDefinitionList(_, context), + }) as any; }; /** - * deserializeAws_restJson1IAMPolicyAssignmentSummary + * deserializeAws_restJson1DashboardVersionSummary */ -const de_IAMPolicyAssignmentSummary = (output: any, context: __SerdeContext): IAMPolicyAssignmentSummary => { - return { - AssignmentName: __expectString(output.AssignmentName), - AssignmentStatus: __expectString(output.AssignmentStatus), - } as any; +const de_DashboardVersionSummary = (output: any, context: __SerdeContext): DashboardVersionSummary => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + SourceEntityArn: __expectString, + Status: __expectString, + VersionNumber: __expectLong, + }) as any; }; /** - * deserializeAws_restJson1IAMPolicyAssignmentSummaryList + * deserializeAws_restJson1DashboardVersionSummaryList */ -const de_IAMPolicyAssignmentSummaryList = (output: any, context: __SerdeContext): IAMPolicyAssignmentSummary[] => { +const de_DashboardVersionSummaryList = (output: any, context: __SerdeContext): DashboardVersionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IAMPolicyAssignmentSummary(entry, context); + return de_DashboardVersionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IdentityMap - */ -const de_IdentityMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_IdentityNameList(value, context); - return acc; - }, {}); -}; +// de_DashboardVisualPublishOptions omitted. + +// de_DataBarsOptions omitted. + +// de_DatabricksParameters omitted. /** - * deserializeAws_restJson1IdentityNameList + * deserializeAws_restJson1DataColor */ -const de_IdentityNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DataColor = (output: any, context: __SerdeContext): DataColor => { + return take(output, { + Color: __expectString, + DataValue: __limitedParseDouble, + }) as any; }; +// de_DataColorPalette omitted. + +// de_DataFieldSeriesItem omitted. + +// de_DataLabelOptions omitted. + +// de_DataLabelType omitted. + +// de_DataLabelTypes omitted. + +// de_DataPathColor omitted. + +// de_DataPathColorList omitted. + +// de_DataPathLabelType omitted. + +// de_DataPathSort omitted. + +// de_DataPathValue omitted. + +// de_DataPathValueList omitted. + +// de_DataPointDrillUpDownOption omitted. + +// de_DataPointMenuLabelOption omitted. + +// de_DataPointTooltipOption omitted. + /** - * deserializeAws_restJson1IncrementalRefresh + * deserializeAws_restJson1DataSet */ -const de_IncrementalRefresh = (output: any, context: __SerdeContext): IncrementalRefresh => { - return { - LookbackWindow: output.LookbackWindow != null ? de_LookbackWindow(output.LookbackWindow, context) : undefined, - } as any; +const de_DataSet = (output: any, context: __SerdeContext): DataSet => { + return take(output, { + Arn: __expectString, + ColumnGroups: _json, + ColumnLevelPermissionRules: _json, + ConsumedSpiceCapacityInBytes: __expectLong, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSetId: __expectString, + DataSetUsageConfiguration: _json, + FieldFolders: _json, + ImportMode: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LogicalTableMap: _json, + Name: __expectString, + OutputColumns: _json, + PhysicalTableMap: _json, + RowLevelPermissionDataSet: _json, + RowLevelPermissionTagConfiguration: _json, + }) as any; }; +// de_DataSetArnsList omitted. + +// de_DataSetConfiguration omitted. + +// de_DataSetConfigurationList omitted. + +// de_DataSetIdentifierDeclaration omitted. + +// de_DataSetIdentifierDeclarationList omitted. + +// de_DataSetRefreshProperties omitted. + +// de_DataSetSchema omitted. + /** - * deserializeAws_restJson1Ingestion + * deserializeAws_restJson1DataSetSummary */ -const de_Ingestion = (output: any, context: __SerdeContext): Ingestion => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - ErrorInfo: output.ErrorInfo != null ? de_ErrorInfo(output.ErrorInfo, context) : undefined, - IngestionId: __expectString(output.IngestionId), - IngestionSizeInBytes: __expectLong(output.IngestionSizeInBytes), - IngestionStatus: __expectString(output.IngestionStatus), - IngestionTimeInSeconds: __expectLong(output.IngestionTimeInSeconds), - QueueInfo: output.QueueInfo != null ? de_QueueInfo(output.QueueInfo, context) : undefined, - RequestSource: __expectString(output.RequestSource), - RequestType: __expectString(output.RequestType), - RowInfo: output.RowInfo != null ? de_RowInfo(output.RowInfo, context) : undefined, - } as any; +const de_DataSetSummary = (output: any, context: __SerdeContext): DataSetSummary => { + return take(output, { + Arn: __expectString, + ColumnLevelPermissionRulesApplied: __expectBoolean, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSetId: __expectString, + ImportMode: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RowLevelPermissionDataSet: _json, + RowLevelPermissionTagConfigurationApplied: __expectBoolean, + }) as any; }; /** - * deserializeAws_restJson1Ingestions + * deserializeAws_restJson1DataSetSummaryList */ -const de_Ingestions = (output: any, context: __SerdeContext): Ingestion[] => { +const de_DataSetSummaryList = (output: any, context: __SerdeContext): DataSetSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ingestion(entry, context); + return de_DataSetSummary(entry, context); }); return retVal; }; +// de_DataSetUsageConfiguration omitted. + /** - * deserializeAws_restJson1InputColumn + * deserializeAws_restJson1DataSource */ -const de_InputColumn = (output: any, context: __SerdeContext): InputColumn => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +const de_DataSource = (output: any, context: __SerdeContext): DataSource => { + return take(output, { + AlternateDataSourceParameters: _json, + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSourceId: __expectString, + DataSourceParameters: (_: any) => _json(__expectUnion(_)), + ErrorInfo: _json, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretArn: __expectString, + SslProperties: _json, + Status: __expectString, + Type: __expectString, + VpcConnectionProperties: _json, + }) as any; +}; + +// de_DataSourceErrorInfo omitted. /** - * deserializeAws_restJson1InputColumnList + * deserializeAws_restJson1DataSourceList */ -const de_InputColumnList = (output: any, context: __SerdeContext): InputColumn[] => { +const de_DataSourceList = (output: any, context: __SerdeContext): DataSource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InputColumn(entry, context); + return de_DataSource(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InsightConfiguration - */ -const de_InsightConfiguration = (output: any, context: __SerdeContext): InsightConfiguration => { - return { - Computations: output.Computations != null ? de_ComputationList(output.Computations, context) : undefined, - CustomNarrative: - output.CustomNarrative != null ? de_CustomNarrativeOptions(output.CustomNarrative, context) : undefined, - } as any; -}; +// de_DataSourceParameters omitted. + +// de_DataSourceParametersList omitted. /** - * deserializeAws_restJson1InsightVisual + * deserializeAws_restJson1DataSourceSummary */ -const de_InsightVisual = (output: any, context: __SerdeContext): InsightVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - DataSetIdentifier: __expectString(output.DataSetIdentifier), - InsightConfiguration: - output.InsightConfiguration != null ? de_InsightConfiguration(output.InsightConfiguration, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_DataSourceSummary = (output: any, context: __SerdeContext): DataSourceSummary => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSourceId: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Type: __expectString, + }) as any; }; /** - * deserializeAws_restJson1IntegerDefaultValueList + * deserializeAws_restJson1DataSourceSummaryList */ -const de_IntegerDefaultValueList = (output: any, context: __SerdeContext): number[] => { +const de_DataSourceSummaryList = (output: any, context: __SerdeContext): DataSourceSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; + return de_DataSourceSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IntegerDefaultValues - */ -const de_IntegerDefaultValues = (output: any, context: __SerdeContext): IntegerDefaultValues => { - return { - DynamicValue: output.DynamicValue != null ? de_DynamicDefaultValue(output.DynamicValue, context) : undefined, - StaticValues: output.StaticValues != null ? de_IntegerDefaultValueList(output.StaticValues, context) : undefined, - } as any; -}; +// de_DateAxisOptions omitted. -/** - * deserializeAws_restJson1IntegerParameterDeclaration - */ -const de_IntegerParameterDeclaration = (output: any, context: __SerdeContext): IntegerParameterDeclaration => { - return { - DefaultValues: output.DefaultValues != null ? de_IntegerDefaultValues(output.DefaultValues, context) : undefined, - Name: __expectString(output.Name), - ParameterValueType: __expectString(output.ParameterValueType), - ValueWhenUnset: - output.ValueWhenUnset != null ? de_IntegerValueWhenUnsetConfiguration(output.ValueWhenUnset, context) : undefined, - } as any; -}; +// de_DateDimensionField omitted. -/** - * deserializeAws_restJson1IntegerValueWhenUnsetConfiguration - */ -const de_IntegerValueWhenUnsetConfiguration = ( - output: any, - context: __SerdeContext -): IntegerValueWhenUnsetConfiguration => { - return { - CustomValue: __expectLong(output.CustomValue), - ValueWhenUnsetOption: __expectString(output.ValueWhenUnsetOption), - } as any; -}; +// de_DateMeasureField omitted. /** - * deserializeAws_restJson1IpRestrictionRuleMap + * deserializeAws_restJson1DateTimeDefaultValueList */ -const de_IpRestrictionRuleMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_DateTimeDefaultValueList = (output: any, context: __SerdeContext): Date[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry))); + }); + return retVal; }; /** - * deserializeAws_restJson1ItemsLimitConfiguration + * deserializeAws_restJson1DateTimeDefaultValues */ -const de_ItemsLimitConfiguration = (output: any, context: __SerdeContext): ItemsLimitConfiguration => { - return { - ItemsLimit: __expectLong(output.ItemsLimit), - OtherCategories: __expectString(output.OtherCategories), - } as any; +const de_DateTimeDefaultValues = (output: any, context: __SerdeContext): DateTimeDefaultValues => { + return take(output, { + DynamicValue: _json, + RollingDate: _json, + StaticValues: (_: any) => de_DateTimeDefaultValueList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1JiraParameters - */ -const de_JiraParameters = (output: any, context: __SerdeContext): JiraParameters => { - return { - SiteBaseUrl: __expectString(output.SiteBaseUrl), - } as any; -}; +// de_DateTimeFormatConfiguration omitted. /** - * deserializeAws_restJson1JoinInstruction + * deserializeAws_restJson1DateTimeHierarchy */ -const de_JoinInstruction = (output: any, context: __SerdeContext): JoinInstruction => { - return { - LeftJoinKeyProperties: - output.LeftJoinKeyProperties != null ? de_JoinKeyProperties(output.LeftJoinKeyProperties, context) : undefined, - LeftOperand: __expectString(output.LeftOperand), - OnClause: __expectString(output.OnClause), - RightJoinKeyProperties: - output.RightJoinKeyProperties != null ? de_JoinKeyProperties(output.RightJoinKeyProperties, context) : undefined, - RightOperand: __expectString(output.RightOperand), - Type: __expectString(output.Type), - } as any; +const de_DateTimeHierarchy = (output: any, context: __SerdeContext): DateTimeHierarchy => { + return take(output, { + DrillDownFilters: (_: any) => de_DrillDownFilterList(_, context), + HierarchyId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1JoinKeyProperties + * deserializeAws_restJson1DateTimeParameterDeclaration */ -const de_JoinKeyProperties = (output: any, context: __SerdeContext): JoinKeyProperties => { - return { - UniqueKey: __expectBoolean(output.UniqueKey), - } as any; +const de_DateTimeParameterDeclaration = (output: any, context: __SerdeContext): DateTimeParameterDeclaration => { + return take(output, { + DefaultValues: (_: any) => de_DateTimeDefaultValues(_, context), + Name: __expectString, + TimeGranularity: __expectString, + ValueWhenUnset: (_: any) => de_DateTimeValueWhenUnsetConfiguration(_, context), + }) as any; }; -/** - * deserializeAws_restJson1KPIConditionalFormatting - */ -const de_KPIConditionalFormatting = (output: any, context: __SerdeContext): KPIConditionalFormatting => { - return { - ConditionalFormattingOptions: - output.ConditionalFormattingOptions != null - ? de_KPIConditionalFormattingOptionList(output.ConditionalFormattingOptions, context) - : undefined, - } as any; -}; +// de_DateTimePickerControlDisplayOptions omitted. /** - * deserializeAws_restJson1KPIConditionalFormattingOption + * deserializeAws_restJson1DateTimeValueWhenUnsetConfiguration */ -const de_KPIConditionalFormattingOption = (output: any, context: __SerdeContext): KPIConditionalFormattingOption => { - return { - PrimaryValue: - output.PrimaryValue != null ? de_KPIPrimaryValueConditionalFormatting(output.PrimaryValue, context) : undefined, - ProgressBar: - output.ProgressBar != null ? de_KPIProgressBarConditionalFormatting(output.ProgressBar, context) : undefined, - } as any; +const de_DateTimeValueWhenUnsetConfiguration = ( + output: any, + context: __SerdeContext +): DateTimeValueWhenUnsetConfiguration => { + return take(output, { + CustomValue: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ValueWhenUnsetOption: __expectString, + }) as any; }; /** - * deserializeAws_restJson1KPIConditionalFormattingOptionList + * deserializeAws_restJson1DecimalDefaultValueList */ -const de_KPIConditionalFormattingOptionList = ( - output: any, - context: __SerdeContext -): KPIConditionalFormattingOption[] => { +const de_DecimalDefaultValueList = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KPIConditionalFormattingOption(entry, context); + return __limitedParseDouble(entry) as any; }); return retVal; }; /** - * deserializeAws_restJson1KPIConfiguration + * deserializeAws_restJson1DecimalDefaultValues */ -const de_KPIConfiguration = (output: any, context: __SerdeContext): KPIConfiguration => { - return { - FieldWells: output.FieldWells != null ? de_KPIFieldWells(output.FieldWells, context) : undefined, - KPIOptions: output.KPIOptions != null ? de_KPIOptions(output.KPIOptions, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_KPISortConfiguration(output.SortConfiguration, context) : undefined, - } as any; +const de_DecimalDefaultValues = (output: any, context: __SerdeContext): DecimalDefaultValues => { + return take(output, { + DynamicValue: _json, + StaticValues: (_: any) => de_DecimalDefaultValueList(_, context), + }) as any; }; /** - * deserializeAws_restJson1KPIFieldWells + * deserializeAws_restJson1DecimalParameterDeclaration */ -const de_KPIFieldWells = (output: any, context: __SerdeContext): KPIFieldWells => { - return { - TargetValues: output.TargetValues != null ? de_MeasureFieldList(output.TargetValues, context) : undefined, - TrendGroups: output.TrendGroups != null ? de_DimensionFieldList(output.TrendGroups, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; +const de_DecimalParameterDeclaration = (output: any, context: __SerdeContext): DecimalParameterDeclaration => { + return take(output, { + DefaultValues: (_: any) => de_DecimalDefaultValues(_, context), + Name: __expectString, + ParameterValueType: __expectString, + ValueWhenUnset: (_: any) => de_DecimalValueWhenUnsetConfiguration(_, context), + }) as any; }; -/** - * deserializeAws_restJson1KPIOptions - */ -const de_KPIOptions = (output: any, context: __SerdeContext): KPIOptions => { - return { - Comparison: output.Comparison != null ? de_ComparisonConfiguration(output.Comparison, context) : undefined, - PrimaryValueDisplayType: __expectString(output.PrimaryValueDisplayType), - PrimaryValueFontConfiguration: - output.PrimaryValueFontConfiguration != null - ? de_FontConfiguration(output.PrimaryValueFontConfiguration, context) - : undefined, - ProgressBar: output.ProgressBar != null ? de_ProgressBarOptions(output.ProgressBar, context) : undefined, - SecondaryValue: - output.SecondaryValue != null ? de_SecondaryValueOptions(output.SecondaryValue, context) : undefined, - SecondaryValueFontConfiguration: - output.SecondaryValueFontConfiguration != null - ? de_FontConfiguration(output.SecondaryValueFontConfiguration, context) - : undefined, - TrendArrows: output.TrendArrows != null ? de_TrendArrowOptions(output.TrendArrows, context) : undefined, - } as any; -}; +// de_DecimalPlacesConfiguration omitted. /** - * deserializeAws_restJson1KPIPrimaryValueConditionalFormatting + * deserializeAws_restJson1DecimalValueWhenUnsetConfiguration */ -const de_KPIPrimaryValueConditionalFormatting = ( +const de_DecimalValueWhenUnsetConfiguration = ( output: any, context: __SerdeContext -): KPIPrimaryValueConditionalFormatting => { - return { - Icon: output.Icon != null ? de_ConditionalFormattingIcon(output.Icon, context) : undefined, - TextColor: output.TextColor != null ? de_ConditionalFormattingColor(output.TextColor, context) : undefined, - } as any; +): DecimalValueWhenUnsetConfiguration => { + return take(output, { + CustomValue: __limitedParseDouble, + ValueWhenUnsetOption: __expectString, + }) as any; }; +// de_DefaultFreeFormLayoutConfiguration omitted. + +// de_DefaultGridLayoutConfiguration omitted. + +// de_DefaultInteractiveLayoutConfiguration omitted. + +// de_DefaultNewSheetConfiguration omitted. + +// de_DefaultPaginatedLayoutConfiguration omitted. + +// de_DefaultSectionBasedLayoutConfiguration omitted. + /** - * deserializeAws_restJson1KPIProgressBarConditionalFormatting + * deserializeAws_restJson1DestinationParameterValueConfiguration */ -const de_KPIProgressBarConditionalFormatting = ( +const de_DestinationParameterValueConfiguration = ( output: any, context: __SerdeContext -): KPIProgressBarConditionalFormatting => { - return { - ForegroundColor: - output.ForegroundColor != null ? de_ConditionalFormattingColor(output.ForegroundColor, context) : undefined, - } as any; +): DestinationParameterValueConfiguration => { + return take(output, { + CustomValuesConfiguration: (_: any) => de_CustomValuesConfiguration(_, context), + SelectAllValueOptions: __expectString, + SourceField: __expectString, + SourceParameterName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1KPISortConfiguration - */ -const de_KPISortConfiguration = (output: any, context: __SerdeContext): KPISortConfiguration => { - return { - TrendGroupSort: output.TrendGroupSort != null ? de_FieldSortOptionsList(output.TrendGroupSort, context) : undefined, - } as any; -}; +// de_DimensionField omitted. -/** - * deserializeAws_restJson1KPIVisual - */ -const de_KPIVisual = (output: any, context: __SerdeContext): KPIVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_KPIConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - ConditionalFormatting: - output.ConditionalFormatting != null - ? de_KPIConditionalFormatting(output.ConditionalFormatting, context) - : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; +// de_DimensionFieldList omitted. -/** - * deserializeAws_restJson1LabelOptions - */ -const de_LabelOptions = (output: any, context: __SerdeContext): LabelOptions => { - return { - CustomLabel: __expectString(output.CustomLabel), - FontConfiguration: - output.FontConfiguration != null ? de_FontConfiguration(output.FontConfiguration, context) : undefined, - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_DonutCenterOptions omitted. -/** - * deserializeAws_restJson1Layout - */ -const de_Layout = (output: any, context: __SerdeContext): Layout => { - return { - Configuration: output.Configuration != null ? de_LayoutConfiguration(output.Configuration, context) : undefined, - } as any; -}; +// de_DonutOptions omitted. /** - * deserializeAws_restJson1LayoutConfiguration + * deserializeAws_restJson1DrillDownFilter */ -const de_LayoutConfiguration = (output: any, context: __SerdeContext): LayoutConfiguration => { - return { - FreeFormLayout: - output.FreeFormLayout != null ? de_FreeFormLayoutConfiguration(output.FreeFormLayout, context) : undefined, - GridLayout: output.GridLayout != null ? de_GridLayoutConfiguration(output.GridLayout, context) : undefined, - SectionBasedLayout: - output.SectionBasedLayout != null - ? de_SectionBasedLayoutConfiguration(output.SectionBasedLayout, context) - : undefined, - } as any; +const de_DrillDownFilter = (output: any, context: __SerdeContext): DrillDownFilter => { + return take(output, { + CategoryFilter: _json, + NumericEqualityFilter: (_: any) => de_NumericEqualityDrillDownFilter(_, context), + TimeRangeFilter: (_: any) => de_TimeRangeDrillDownFilter(_, context), + }) as any; }; /** - * deserializeAws_restJson1LayoutList + * deserializeAws_restJson1DrillDownFilterList */ -const de_LayoutList = (output: any, context: __SerdeContext): Layout[] => { +const de_DrillDownFilterList = (output: any, context: __SerdeContext): DrillDownFilter[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Layout(entry, context); + return de_DrillDownFilter(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LegendOptions - */ -const de_LegendOptions = (output: any, context: __SerdeContext): LegendOptions => { - return { - Height: __expectString(output.Height), - Position: __expectString(output.Position), - Title: output.Title != null ? de_LabelOptions(output.Title, context) : undefined, - Visibility: __expectString(output.Visibility), - Width: __expectString(output.Width), - } as any; -}; +// de_DropDownControlDisplayOptions omitted. -/** - * deserializeAws_restJson1LineChartAggregatedFieldWells - */ -const de_LineChartAggregatedFieldWells = (output: any, context: __SerdeContext): LineChartAggregatedFieldWells => { - return { - Category: output.Category != null ? de_DimensionFieldList(output.Category, context) : undefined, - Colors: output.Colors != null ? de_DimensionFieldList(output.Colors, context) : undefined, - SmallMultiples: - output.SmallMultiples != null ? de_SmallMultiplesDimensionFieldList(output.SmallMultiples, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; -}; +// de_DynamicDefaultValue omitted. /** - * deserializeAws_restJson1LineChartConfiguration + * deserializeAws_restJson1EmptyVisual */ -const de_LineChartConfiguration = (output: any, context: __SerdeContext): LineChartConfiguration => { - return { - ContributionAnalysisDefaults: - output.ContributionAnalysisDefaults != null - ? de_ContributionAnalysisDefaultList(output.ContributionAnalysisDefaults, context) - : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - DefaultSeriesSettings: - output.DefaultSeriesSettings != null - ? de_LineChartDefaultSeriesSettings(output.DefaultSeriesSettings, context) - : undefined, - FieldWells: output.FieldWells != null ? de_LineChartFieldWells(output.FieldWells, context) : undefined, - ForecastConfigurations: - output.ForecastConfigurations != null - ? de_ForecastConfigurationList(output.ForecastConfigurations, context) - : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - PrimaryYAxisDisplayOptions: - output.PrimaryYAxisDisplayOptions != null - ? de_LineSeriesAxisDisplayOptions(output.PrimaryYAxisDisplayOptions, context) - : undefined, - PrimaryYAxisLabelOptions: - output.PrimaryYAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.PrimaryYAxisLabelOptions, context) - : undefined, - ReferenceLines: output.ReferenceLines != null ? de_ReferenceLineList(output.ReferenceLines, context) : undefined, - SecondaryYAxisDisplayOptions: - output.SecondaryYAxisDisplayOptions != null - ? de_LineSeriesAxisDisplayOptions(output.SecondaryYAxisDisplayOptions, context) - : undefined, - SecondaryYAxisLabelOptions: - output.SecondaryYAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.SecondaryYAxisLabelOptions, context) - : undefined, - Series: output.Series != null ? de_SeriesItemList(output.Series, context) : undefined, - SmallMultiplesOptions: - output.SmallMultiplesOptions != null - ? de_SmallMultiplesOptions(output.SmallMultiplesOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_LineChartSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - Type: __expectString(output.Type), - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - XAxisDisplayOptions: - output.XAxisDisplayOptions != null ? de_AxisDisplayOptions(output.XAxisDisplayOptions, context) : undefined, - XAxisLabelOptions: - output.XAxisLabelOptions != null ? de_ChartAxisLabelOptions(output.XAxisLabelOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LineChartDefaultSeriesSettings - */ -const de_LineChartDefaultSeriesSettings = (output: any, context: __SerdeContext): LineChartDefaultSeriesSettings => { - return { - AxisBinding: __expectString(output.AxisBinding), - LineStyleSettings: - output.LineStyleSettings != null ? de_LineChartLineStyleSettings(output.LineStyleSettings, context) : undefined, - MarkerStyleSettings: - output.MarkerStyleSettings != null - ? de_LineChartMarkerStyleSettings(output.MarkerStyleSettings, context) - : undefined, - } as any; +const de_EmptyVisual = (output: any, context: __SerdeContext): EmptyVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + DataSetIdentifier: __expectString, + VisualId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1LineChartFieldWells - */ -const de_LineChartFieldWells = (output: any, context: __SerdeContext): LineChartFieldWells => { - return { - LineChartAggregatedFieldWells: - output.LineChartAggregatedFieldWells != null - ? de_LineChartAggregatedFieldWells(output.LineChartAggregatedFieldWells, context) - : undefined, - } as any; -}; +// de_Entity omitted. -/** - * deserializeAws_restJson1LineChartLineStyleSettings - */ -const de_LineChartLineStyleSettings = (output: any, context: __SerdeContext): LineChartLineStyleSettings => { - return { - LineInterpolation: __expectString(output.LineInterpolation), - LineStyle: __expectString(output.LineStyle), - LineVisibility: __expectString(output.LineVisibility), - LineWidth: __expectString(output.LineWidth), - } as any; -}; +// de_EntityList omitted. -/** - * deserializeAws_restJson1LineChartMarkerStyleSettings - */ -const de_LineChartMarkerStyleSettings = (output: any, context: __SerdeContext): LineChartMarkerStyleSettings => { - return { - MarkerColor: __expectString(output.MarkerColor), - MarkerShape: __expectString(output.MarkerShape), - MarkerSize: __expectString(output.MarkerSize), - MarkerVisibility: __expectString(output.MarkerVisibility), - } as any; -}; +// de_ErrorInfo omitted. -/** - * deserializeAws_restJson1LineChartSeriesSettings - */ -const de_LineChartSeriesSettings = (output: any, context: __SerdeContext): LineChartSeriesSettings => { - return { - LineStyleSettings: - output.LineStyleSettings != null ? de_LineChartLineStyleSettings(output.LineStyleSettings, context) : undefined, - MarkerStyleSettings: - output.MarkerStyleSettings != null - ? de_LineChartMarkerStyleSettings(output.MarkerStyleSettings, context) - : undefined, - } as any; -}; +// de_ExasolParameters omitted. -/** - * deserializeAws_restJson1LineChartSortConfiguration - */ -const de_LineChartSortConfiguration = (output: any, context: __SerdeContext): LineChartSortConfiguration => { - return { - CategoryItemsLimitConfiguration: - output.CategoryItemsLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.CategoryItemsLimitConfiguration, context) - : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - ColorItemsLimitConfiguration: - output.ColorItemsLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.ColorItemsLimitConfiguration, context) - : undefined, - SmallMultiplesLimitConfiguration: - output.SmallMultiplesLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.SmallMultiplesLimitConfiguration, context) - : undefined, - SmallMultiplesSort: - output.SmallMultiplesSort != null ? de_FieldSortOptionsList(output.SmallMultiplesSort, context) : undefined, - } as any; -}; +// de_ExcludePeriodConfiguration omitted. /** - * deserializeAws_restJson1LineChartVisual + * deserializeAws_restJson1ExplicitHierarchy */ -const de_LineChartVisual = (output: any, context: __SerdeContext): LineChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_LineChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_ExplicitHierarchy = (output: any, context: __SerdeContext): ExplicitHierarchy => { + return take(output, { + Columns: _json, + DrillDownFilters: (_: any) => de_DrillDownFilterList(_, context), + HierarchyId: __expectString, + }) as any; }; +// de_ExplicitHierarchyColumnList omitted. + +// de_ExportHiddenFieldsOption omitted. + +// de_ExportToCSVOption omitted. + +// de_ExportWithHiddenFieldsOption omitted. + /** - * deserializeAws_restJson1LineSeriesAxisDisplayOptions + * deserializeAws_restJson1FieldBasedTooltip */ -const de_LineSeriesAxisDisplayOptions = (output: any, context: __SerdeContext): LineSeriesAxisDisplayOptions => { - return { - AxisOptions: output.AxisOptions != null ? de_AxisDisplayOptions(output.AxisOptions, context) : undefined, - MissingDataConfigurations: - output.MissingDataConfigurations != null - ? de_MissingDataConfigurationList(output.MissingDataConfigurations, context) - : undefined, - } as any; +const de_FieldBasedTooltip = (output: any, context: __SerdeContext): FieldBasedTooltip => { + return take(output, { + AggregationVisibility: __expectString, + TooltipFields: (_: any) => de_TooltipItemList(_, context), + TooltipTitleType: __expectString, + }) as any; }; +// de_FieldFolder omitted. + +// de_FieldFolderMap omitted. + +// de_FieldLabelType omitted. + +// de_FieldOrderList omitted. + +// de_FieldSeriesItem omitted. + +// de_FieldSort omitted. + /** - * deserializeAws_restJson1LinkSharingConfiguration + * deserializeAws_restJson1FieldSortOptions */ -const de_LinkSharingConfiguration = (output: any, context: __SerdeContext): LinkSharingConfiguration => { - return { - Permissions: output.Permissions != null ? de_ResourcePermissionList(output.Permissions, context) : undefined, - } as any; +const de_FieldSortOptions = (output: any, context: __SerdeContext): FieldSortOptions => { + return take(output, { + ColumnSort: (_: any) => de_ColumnSort(_, context), + FieldSort: _json, + }) as any; }; /** - * deserializeAws_restJson1ListControlDisplayOptions + * deserializeAws_restJson1FieldSortOptionsList */ -const de_ListControlDisplayOptions = (output: any, context: __SerdeContext): ListControlDisplayOptions => { - return { - SearchOptions: - output.SearchOptions != null ? de_ListControlSearchOptions(output.SearchOptions, context) : undefined, - SelectAllOptions: - output.SelectAllOptions != null ? de_ListControlSelectAllOptions(output.SelectAllOptions, context) : undefined, - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; +const de_FieldSortOptionsList = (output: any, context: __SerdeContext): FieldSortOptions[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_FieldSortOptions(entry, context); + }); + return retVal; }; -/** - * deserializeAws_restJson1ListControlSearchOptions - */ -const de_ListControlSearchOptions = (output: any, context: __SerdeContext): ListControlSearchOptions => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_FieldTooltipItem omitted. /** - * deserializeAws_restJson1ListControlSelectAllOptions + * deserializeAws_restJson1FilledMapAggregatedFieldWells */ -const de_ListControlSelectAllOptions = (output: any, context: __SerdeContext): ListControlSelectAllOptions => { - return { - Visibility: __expectString(output.Visibility), - } as any; +const de_FilledMapAggregatedFieldWells = (output: any, context: __SerdeContext): FilledMapAggregatedFieldWells => { + return take(output, { + Geospatial: _json, + Values: (_: any) => de_FilledMapMeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1LoadingAnimation + * deserializeAws_restJson1FilledMapConditionalFormatting */ -const de_LoadingAnimation = (output: any, context: __SerdeContext): LoadingAnimation => { - return { - Visibility: __expectString(output.Visibility), - } as any; +const de_FilledMapConditionalFormatting = (output: any, context: __SerdeContext): FilledMapConditionalFormatting => { + return take(output, { + ConditionalFormattingOptions: (_: any) => de_FilledMapConditionalFormattingOptionList(_, context), + }) as any; }; /** - * deserializeAws_restJson1LocalNavigationConfiguration + * deserializeAws_restJson1FilledMapConditionalFormattingOption */ -const de_LocalNavigationConfiguration = (output: any, context: __SerdeContext): LocalNavigationConfiguration => { - return { - TargetSheetId: __expectString(output.TargetSheetId), - } as any; +const de_FilledMapConditionalFormattingOption = ( + output: any, + context: __SerdeContext +): FilledMapConditionalFormattingOption => { + return take(output, { + Shape: (_: any) => de_FilledMapShapeConditionalFormatting(_, context), + }) as any; }; /** - * deserializeAws_restJson1LogicalTable + * deserializeAws_restJson1FilledMapConditionalFormattingOptionList */ -const de_LogicalTable = (output: any, context: __SerdeContext): LogicalTable => { - return { - Alias: __expectString(output.Alias), - DataTransforms: - output.DataTransforms != null ? de_TransformOperationList(output.DataTransforms, context) : undefined, - Source: output.Source != null ? de_LogicalTableSource(output.Source, context) : undefined, - } as any; +const de_FilledMapConditionalFormattingOptionList = ( + output: any, + context: __SerdeContext +): FilledMapConditionalFormattingOption[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_FilledMapConditionalFormattingOption(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1LogicalTableMap + * deserializeAws_restJson1FilledMapConfiguration */ -const de_LogicalTableMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_LogicalTable(value, context); - return acc; - }, {}); +const de_FilledMapConfiguration = (output: any, context: __SerdeContext): FilledMapConfiguration => { + return take(output, { + FieldWells: (_: any) => de_FilledMapFieldWells(_, context), + Legend: _json, + MapStyleOptions: _json, + SortConfiguration: (_: any) => de_FilledMapSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + WindowOptions: (_: any) => de_GeospatialWindowOptions(_, context), + }) as any; }; +// de_FilledMapDimensionFieldList omitted. + /** - * deserializeAws_restJson1LogicalTableSource + * deserializeAws_restJson1FilledMapFieldWells */ -const de_LogicalTableSource = (output: any, context: __SerdeContext): LogicalTableSource => { - return { - DataSetArn: __expectString(output.DataSetArn), - JoinInstruction: output.JoinInstruction != null ? de_JoinInstruction(output.JoinInstruction, context) : undefined, - PhysicalTableId: __expectString(output.PhysicalTableId), - } as any; +const de_FilledMapFieldWells = (output: any, context: __SerdeContext): FilledMapFieldWells => { + return take(output, { + FilledMapAggregatedFieldWells: (_: any) => de_FilledMapAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1LongFormatText + * deserializeAws_restJson1FilledMapMeasureFieldList */ -const de_LongFormatText = (output: any, context: __SerdeContext): LongFormatText => { - return { - PlainText: __expectString(output.PlainText), - RichText: __expectString(output.RichText), - } as any; +const de_FilledMapMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MeasureField(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1LookbackWindow + * deserializeAws_restJson1FilledMapShapeConditionalFormatting */ -const de_LookbackWindow = (output: any, context: __SerdeContext): LookbackWindow => { - return { - ColumnName: __expectString(output.ColumnName), - Size: __expectLong(output.Size), - SizeUnit: __expectString(output.SizeUnit), - } as any; +const de_FilledMapShapeConditionalFormatting = ( + output: any, + context: __SerdeContext +): FilledMapShapeConditionalFormatting => { + return take(output, { + FieldId: __expectString, + Format: (_: any) => de_ShapeConditionalFormat(_, context), + }) as any; }; /** - * deserializeAws_restJson1ManifestFileLocation + * deserializeAws_restJson1FilledMapSortConfiguration */ -const de_ManifestFileLocation = (output: any, context: __SerdeContext): ManifestFileLocation => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; +const de_FilledMapSortConfiguration = (output: any, context: __SerdeContext): FilledMapSortConfiguration => { + return take(output, { + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1MarginStyle + * deserializeAws_restJson1FilledMapVisual */ -const de_MarginStyle = (output: any, context: __SerdeContext): MarginStyle => { - return { - Show: __expectBoolean(output.Show), - } as any; +const de_FilledMapVisual = (output: any, context: __SerdeContext): FilledMapVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_FilledMapConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + ConditionalFormatting: (_: any) => de_FilledMapConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1MariaDbParameters + * deserializeAws_restJson1Filter */ -const de_MariaDbParameters = (output: any, context: __SerdeContext): MariaDbParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; +const de_Filter = (output: any, context: __SerdeContext): Filter => { + return take(output, { + CategoryFilter: _json, + NumericEqualityFilter: (_: any) => de_NumericEqualityFilter(_, context), + NumericRangeFilter: (_: any) => de_NumericRangeFilter(_, context), + RelativeDatesFilter: _json, + TimeEqualityFilter: (_: any) => de_TimeEqualityFilter(_, context), + TimeRangeFilter: (_: any) => de_TimeRangeFilter(_, context), + TopBottomFilter: (_: any) => de_TopBottomFilter(_, context), + }) as any; }; /** - * deserializeAws_restJson1MaximumLabelType + * deserializeAws_restJson1FilterControl */ -const de_MaximumLabelType = (output: any, context: __SerdeContext): MaximumLabelType => { - return { - Visibility: __expectString(output.Visibility), - } as any; +const de_FilterControl = (output: any, context: __SerdeContext): FilterControl => { + return take(output, { + DateTimePicker: _json, + Dropdown: _json, + List: _json, + RelativeDateTime: _json, + Slider: (_: any) => de_FilterSliderControl(_, context), + TextArea: _json, + TextField: _json, + }) as any; }; /** - * deserializeAws_restJson1MaximumMinimumComputation + * deserializeAws_restJson1FilterControlList */ -const de_MaximumMinimumComputation = (output: any, context: __SerdeContext): MaximumMinimumComputation => { - return { - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - Type: __expectString(output.Type), - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; +const de_FilterControlList = (output: any, context: __SerdeContext): FilterControl[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_FilterControl(entry, context); + }); + return retVal; }; +// de_FilterDateTimePickerControl omitted. + +// de_FilterDropDownControl omitted. + +// de_FilteredVisualsList omitted. + /** - * deserializeAws_restJson1MeasureField + * deserializeAws_restJson1FilterGroup */ -const de_MeasureField = (output: any, context: __SerdeContext): MeasureField => { - return { - CalculatedMeasureField: - output.CalculatedMeasureField != null - ? de_CalculatedMeasureField(output.CalculatedMeasureField, context) - : undefined, - CategoricalMeasureField: - output.CategoricalMeasureField != null - ? de_CategoricalMeasureField(output.CategoricalMeasureField, context) - : undefined, - DateMeasureField: - output.DateMeasureField != null ? de_DateMeasureField(output.DateMeasureField, context) : undefined, - NumericalMeasureField: - output.NumericalMeasureField != null - ? de_NumericalMeasureField(output.NumericalMeasureField, context) - : undefined, - } as any; +const de_FilterGroup = (output: any, context: __SerdeContext): FilterGroup => { + return take(output, { + CrossDataset: __expectString, + FilterGroupId: __expectString, + Filters: (_: any) => de_FilterList(_, context), + ScopeConfiguration: _json, + Status: __expectString, + }) as any; }; /** - * deserializeAws_restJson1MeasureFieldList + * deserializeAws_restJson1FilterGroupList */ -const de_MeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { +const de_FilterGroupList = (output: any, context: __SerdeContext): FilterGroup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); + return de_FilterGroup(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1MemberIdArnPair + * deserializeAws_restJson1FilterList */ -const de_MemberIdArnPair = (output: any, context: __SerdeContext): MemberIdArnPair => { - return { - MemberArn: __expectString(output.MemberArn), - MemberId: __expectString(output.MemberId), - } as any; +const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Filter(entry, context); + }); + return retVal; }; +// de_FilterListConfiguration omitted. + +// de_FilterListControl omitted. + +// de_FilterOperation omitted. + +// de_FilterOperationSelectedFieldsConfiguration omitted. + +// de_FilterOperationTargetVisualsConfiguration omitted. + +// de_FilterRelativeDateTimeControl omitted. + +// de_FilterScopeConfiguration omitted. + +// de_FilterSelectableValues omitted. + /** - * deserializeAws_restJson1MetricComparisonComputation + * deserializeAws_restJson1FilterSliderControl */ -const de_MetricComparisonComputation = (output: any, context: __SerdeContext): MetricComparisonComputation => { - return { - ComputationId: __expectString(output.ComputationId), - FromValue: output.FromValue != null ? de_MeasureField(output.FromValue, context) : undefined, - Name: __expectString(output.Name), - TargetValue: output.TargetValue != null ? de_MeasureField(output.TargetValue, context) : undefined, - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - } as any; +const de_FilterSliderControl = (output: any, context: __SerdeContext): FilterSliderControl => { + return take(output, { + DisplayOptions: _json, + FilterControlId: __expectString, + MaximumValue: __limitedParseDouble, + MinimumValue: __limitedParseDouble, + SourceFilterId: __expectString, + StepSize: __limitedParseDouble, + Title: __expectString, + Type: __expectString, + }) as any; }; +// de_FilterTextAreaControl omitted. + +// de_FilterTextFieldControl omitted. + /** - * deserializeAws_restJson1MinimumLabelType + * deserializeAws_restJson1Folder */ -const de_MinimumLabelType = (output: any, context: __SerdeContext): MinimumLabelType => { - return { - Visibility: __expectString(output.Visibility), - } as any; +const de_Folder = (output: any, context: __SerdeContext): Folder => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FolderId: __expectString, + FolderPath: _json, + FolderType: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; +// de_FolderColumnList omitted. + +// de_FolderMember omitted. + +// de_FolderMemberList omitted. + /** - * deserializeAws_restJson1MissingDataConfiguration + * deserializeAws_restJson1FolderSummary */ -const de_MissingDataConfiguration = (output: any, context: __SerdeContext): MissingDataConfiguration => { - return { - TreatmentOption: __expectString(output.TreatmentOption), - } as any; +const de_FolderSummary = (output: any, context: __SerdeContext): FolderSummary => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FolderId: __expectString, + FolderType: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_restJson1MissingDataConfigurationList + * deserializeAws_restJson1FolderSummaryList */ -const de_MissingDataConfigurationList = (output: any, context: __SerdeContext): MissingDataConfiguration[] => { +const de_FolderSummaryList = (output: any, context: __SerdeContext): FolderSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MissingDataConfiguration(entry, context); + return de_FolderSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MySqlParameters - */ -const de_MySqlParameters = (output: any, context: __SerdeContext): MySqlParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; +// de_Font omitted. + +// de_FontConfiguration omitted. + +// de_FontList omitted. + +// de_FontSize omitted. + +// de_FontWeight omitted. /** - * deserializeAws_restJson1NamespaceError + * deserializeAws_restJson1ForecastComputation */ -const de_NamespaceError = (output: any, context: __SerdeContext): NamespaceError => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; +const de_ForecastComputation = (output: any, context: __SerdeContext): ForecastComputation => { + return take(output, { + ComputationId: __expectString, + CustomSeasonalityValue: __expectInt32, + LowerBoundary: __limitedParseDouble, + Name: __expectString, + PeriodsBackward: __expectInt32, + PeriodsForward: __expectInt32, + PredictionInterval: __expectInt32, + Seasonality: __expectString, + Time: _json, + UpperBoundary: __limitedParseDouble, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; /** - * deserializeAws_restJson1NamespaceInfoV2 + * deserializeAws_restJson1ForecastConfiguration */ -const de_NamespaceInfoV2 = (output: any, context: __SerdeContext): NamespaceInfoV2 => { - return { - Arn: __expectString(output.Arn), - CapacityRegion: __expectString(output.CapacityRegion), - CreationStatus: __expectString(output.CreationStatus), - IdentityStore: __expectString(output.IdentityStore), - Name: __expectString(output.Name), - NamespaceError: output.NamespaceError != null ? de_NamespaceError(output.NamespaceError, context) : undefined, - } as any; +const de_ForecastConfiguration = (output: any, context: __SerdeContext): ForecastConfiguration => { + return take(output, { + ForecastProperties: (_: any) => de_TimeBasedForecastProperties(_, context), + Scenario: (_: any) => de_ForecastScenario(_, context), + }) as any; }; /** - * deserializeAws_restJson1Namespaces + * deserializeAws_restJson1ForecastConfigurationList */ -const de_Namespaces = (output: any, context: __SerdeContext): NamespaceInfoV2[] => { +const de_ForecastConfigurationList = (output: any, context: __SerdeContext): ForecastConfiguration[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NamespaceInfoV2(entry, context); + return de_ForecastConfiguration(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1NegativeValueConfiguration + * deserializeAws_restJson1ForecastScenario */ -const de_NegativeValueConfiguration = (output: any, context: __SerdeContext): NegativeValueConfiguration => { - return { - DisplayMode: __expectString(output.DisplayMode), - } as any; +const de_ForecastScenario = (output: any, context: __SerdeContext): ForecastScenario => { + return take(output, { + WhatIfPointScenario: (_: any) => de_WhatIfPointScenario(_, context), + WhatIfRangeScenario: (_: any) => de_WhatIfRangeScenario(_, context), + }) as any; }; -/** - * deserializeAws_restJson1NullValueFormatConfiguration - */ -const de_NullValueFormatConfiguration = (output: any, context: __SerdeContext): NullValueFormatConfiguration => { - return { - NullString: __expectString(output.NullString), - } as any; -}; +// de_FormatConfiguration omitted. + +// de_FreeFormLayoutCanvasSizeOptions omitted. + +// de_FreeFormLayoutConfiguration omitted. + +// de_FreeFormLayoutElement omitted. + +// de_FreeFormLayoutElementBackgroundStyle omitted. + +// de_FreeFormLayoutElementBorderStyle omitted. + +// de_FreeFormLayoutScreenCanvasSizeOptions omitted. + +// de_FreeFormSectionLayoutConfiguration omitted. + +// de_FreeFromLayoutElementList omitted. /** - * deserializeAws_restJson1NumberDisplayFormatConfiguration + * deserializeAws_restJson1FunnelChartAggregatedFieldWells */ -const de_NumberDisplayFormatConfiguration = ( - output: any, - context: __SerdeContext -): NumberDisplayFormatConfiguration => { - return { - DecimalPlacesConfiguration: - output.DecimalPlacesConfiguration != null - ? de_DecimalPlacesConfiguration(output.DecimalPlacesConfiguration, context) - : undefined, - NegativeValueConfiguration: - output.NegativeValueConfiguration != null - ? de_NegativeValueConfiguration(output.NegativeValueConfiguration, context) - : undefined, - NullValueFormatConfiguration: - output.NullValueFormatConfiguration != null - ? de_NullValueFormatConfiguration(output.NullValueFormatConfiguration, context) - : undefined, - NumberScale: __expectString(output.NumberScale), - Prefix: __expectString(output.Prefix), - SeparatorConfiguration: - output.SeparatorConfiguration != null - ? de_NumericSeparatorConfiguration(output.SeparatorConfiguration, context) - : undefined, - Suffix: __expectString(output.Suffix), - } as any; -}; - -/** - * deserializeAws_restJson1NumberFormatConfiguration - */ -const de_NumberFormatConfiguration = (output: any, context: __SerdeContext): NumberFormatConfiguration => { - return { - FormatConfiguration: - output.FormatConfiguration != null - ? de_NumericFormatConfiguration(output.FormatConfiguration, context) - : undefined, - } as any; +const de_FunnelChartAggregatedFieldWells = (output: any, context: __SerdeContext): FunnelChartAggregatedFieldWells => { + return take(output, { + Category: _json, + Values: (_: any) => de_FunnelChartMeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1NumericalAggregationFunction + * deserializeAws_restJson1FunnelChartConfiguration */ -const de_NumericalAggregationFunction = (output: any, context: __SerdeContext): NumericalAggregationFunction => { - return { - PercentileAggregation: - output.PercentileAggregation != null - ? de_PercentileAggregation(output.PercentileAggregation, context) - : undefined, - SimpleNumericalAggregation: __expectString(output.SimpleNumericalAggregation), - } as any; +const de_FunnelChartConfiguration = (output: any, context: __SerdeContext): FunnelChartConfiguration => { + return take(output, { + CategoryLabelOptions: _json, + DataLabelOptions: _json, + FieldWells: (_: any) => de_FunnelChartFieldWells(_, context), + SortConfiguration: (_: any) => de_FunnelChartSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + ValueLabelOptions: _json, + VisualPalette: _json, + }) as any; }; +// de_FunnelChartDataLabelOptions omitted. + +// de_FunnelChartDimensionFieldList omitted. + /** - * deserializeAws_restJson1NumericalDimensionField + * deserializeAws_restJson1FunnelChartFieldWells */ -const de_NumericalDimensionField = (output: any, context: __SerdeContext): NumericalDimensionField => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null - ? de_NumberFormatConfiguration(output.FormatConfiguration, context) - : undefined, - HierarchyId: __expectString(output.HierarchyId), - } as any; +const de_FunnelChartFieldWells = (output: any, context: __SerdeContext): FunnelChartFieldWells => { + return take(output, { + FunnelChartAggregatedFieldWells: (_: any) => de_FunnelChartAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1NumericalMeasureField + * deserializeAws_restJson1FunnelChartMeasureFieldList */ -const de_NumericalMeasureField = (output: any, context: __SerdeContext): NumericalMeasureField => { - return { - AggregationFunction: - output.AggregationFunction != null - ? de_NumericalAggregationFunction(output.AggregationFunction, context) - : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null - ? de_NumberFormatConfiguration(output.FormatConfiguration, context) - : undefined, - } as any; +const de_FunnelChartMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MeasureField(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1NumericAxisOptions + * deserializeAws_restJson1FunnelChartSortConfiguration */ -const de_NumericAxisOptions = (output: any, context: __SerdeContext): NumericAxisOptions => { - return { - Range: output.Range != null ? de_AxisDisplayRange(output.Range, context) : undefined, - Scale: output.Scale != null ? de_AxisScale(output.Scale, context) : undefined, - } as any; +const de_FunnelChartSortConfiguration = (output: any, context: __SerdeContext): FunnelChartSortConfiguration => { + return take(output, { + CategoryItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1NumericEqualityDrillDownFilter + * deserializeAws_restJson1FunnelChartVisual */ -const de_NumericEqualityDrillDownFilter = (output: any, context: __SerdeContext): NumericEqualityDrillDownFilter => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; +const de_FunnelChartVisual = (output: any, context: __SerdeContext): FunnelChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_FunnelChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1NumericEqualityFilter + * deserializeAws_restJson1GaugeChartArcConditionalFormatting */ -const de_NumericEqualityFilter = (output: any, context: __SerdeContext): NumericEqualityFilter => { - return { - AggregationFunction: - output.AggregationFunction != null ? de_AggregationFunction(output.AggregationFunction, context) : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FilterId: __expectString(output.FilterId), - MatchOperator: __expectString(output.MatchOperator), - NullOption: __expectString(output.NullOption), - ParameterName: __expectString(output.ParameterName), - SelectAllOptions: __expectString(output.SelectAllOptions), - Value: __limitedParseDouble(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1NumericFormatConfiguration - */ -const de_NumericFormatConfiguration = (output: any, context: __SerdeContext): NumericFormatConfiguration => { - return { - CurrencyDisplayFormatConfiguration: - output.CurrencyDisplayFormatConfiguration != null - ? de_CurrencyDisplayFormatConfiguration(output.CurrencyDisplayFormatConfiguration, context) - : undefined, - NumberDisplayFormatConfiguration: - output.NumberDisplayFormatConfiguration != null - ? de_NumberDisplayFormatConfiguration(output.NumberDisplayFormatConfiguration, context) - : undefined, - PercentageDisplayFormatConfiguration: - output.PercentageDisplayFormatConfiguration != null - ? de_PercentageDisplayFormatConfiguration(output.PercentageDisplayFormatConfiguration, context) - : undefined, - } as any; +const de_GaugeChartArcConditionalFormatting = ( + output: any, + context: __SerdeContext +): GaugeChartArcConditionalFormatting => { + return take(output, { + ForegroundColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; /** - * deserializeAws_restJson1NumericRangeFilter + * deserializeAws_restJson1GaugeChartConditionalFormatting */ -const de_NumericRangeFilter = (output: any, context: __SerdeContext): NumericRangeFilter => { - return { - AggregationFunction: - output.AggregationFunction != null ? de_AggregationFunction(output.AggregationFunction, context) : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FilterId: __expectString(output.FilterId), - IncludeMaximum: __expectBoolean(output.IncludeMaximum), - IncludeMinimum: __expectBoolean(output.IncludeMinimum), - NullOption: __expectString(output.NullOption), - RangeMaximum: output.RangeMaximum != null ? de_NumericRangeFilterValue(output.RangeMaximum, context) : undefined, - RangeMinimum: output.RangeMinimum != null ? de_NumericRangeFilterValue(output.RangeMinimum, context) : undefined, - SelectAllOptions: __expectString(output.SelectAllOptions), - } as any; +const de_GaugeChartConditionalFormatting = (output: any, context: __SerdeContext): GaugeChartConditionalFormatting => { + return take(output, { + ConditionalFormattingOptions: (_: any) => de_GaugeChartConditionalFormattingOptionList(_, context), + }) as any; }; /** - * deserializeAws_restJson1NumericRangeFilterValue + * deserializeAws_restJson1GaugeChartConditionalFormattingOption */ -const de_NumericRangeFilterValue = (output: any, context: __SerdeContext): NumericRangeFilterValue => { - return { - Parameter: __expectString(output.Parameter), - StaticValue: __limitedParseDouble(output.StaticValue), - } as any; +const de_GaugeChartConditionalFormattingOption = ( + output: any, + context: __SerdeContext +): GaugeChartConditionalFormattingOption => { + return take(output, { + Arc: (_: any) => de_GaugeChartArcConditionalFormatting(_, context), + PrimaryValue: (_: any) => de_GaugeChartPrimaryValueConditionalFormatting(_, context), + }) as any; }; /** - * deserializeAws_restJson1NumericSeparatorConfiguration + * deserializeAws_restJson1GaugeChartConditionalFormattingOptionList */ -const de_NumericSeparatorConfiguration = (output: any, context: __SerdeContext): NumericSeparatorConfiguration => { - return { - DecimalSeparator: __expectString(output.DecimalSeparator), - ThousandsSeparator: - output.ThousandsSeparator != null ? de_ThousandSeparatorOptions(output.ThousandsSeparator, context) : undefined, - } as any; +const de_GaugeChartConditionalFormattingOptionList = ( + output: any, + context: __SerdeContext +): GaugeChartConditionalFormattingOption[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_GaugeChartConditionalFormattingOption(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1OracleParameters + * deserializeAws_restJson1GaugeChartConfiguration */ -const de_OracleParameters = (output: any, context: __SerdeContext): OracleParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; +const de_GaugeChartConfiguration = (output: any, context: __SerdeContext): GaugeChartConfiguration => { + return take(output, { + DataLabels: _json, + FieldWells: (_: any) => de_GaugeChartFieldWells(_, context), + GaugeChartOptions: (_: any) => de_GaugeChartOptions(_, context), + TooltipOptions: (_: any) => de_TooltipOptions(_, context), + VisualPalette: _json, + }) as any; }; /** - * deserializeAws_restJson1OutputColumn + * deserializeAws_restJson1GaugeChartFieldWells */ -const de_OutputColumn = (output: any, context: __SerdeContext): OutputColumn => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; +const de_GaugeChartFieldWells = (output: any, context: __SerdeContext): GaugeChartFieldWells => { + return take(output, { + TargetValues: (_: any) => de_MeasureFieldList(_, context), + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1OutputColumnList + * deserializeAws_restJson1GaugeChartOptions */ -const de_OutputColumnList = (output: any, context: __SerdeContext): OutputColumn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputColumn(entry, context); - }); - return retVal; +const de_GaugeChartOptions = (output: any, context: __SerdeContext): GaugeChartOptions => { + return take(output, { + Arc: (_: any) => de_ArcConfiguration(_, context), + ArcAxis: (_: any) => de_ArcAxisConfiguration(_, context), + Comparison: _json, + PrimaryValueDisplayType: __expectString, + PrimaryValueFontConfiguration: _json, + }) as any; }; /** - * deserializeAws_restJson1PaginationConfiguration + * deserializeAws_restJson1GaugeChartPrimaryValueConditionalFormatting */ -const de_PaginationConfiguration = (output: any, context: __SerdeContext): PaginationConfiguration => { - return { - PageNumber: __expectLong(output.PageNumber), - PageSize: __expectLong(output.PageSize), - } as any; +const de_GaugeChartPrimaryValueConditionalFormatting = ( + output: any, + context: __SerdeContext +): GaugeChartPrimaryValueConditionalFormatting => { + return take(output, { + Icon: _json, + TextColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; /** - * deserializeAws_restJson1PanelConfiguration + * deserializeAws_restJson1GaugeChartVisual */ -const de_PanelConfiguration = (output: any, context: __SerdeContext): PanelConfiguration => { - return { - BackgroundColor: __expectString(output.BackgroundColor), - BackgroundVisibility: __expectString(output.BackgroundVisibility), - BorderColor: __expectString(output.BorderColor), - BorderStyle: __expectString(output.BorderStyle), - BorderThickness: __expectString(output.BorderThickness), - BorderVisibility: __expectString(output.BorderVisibility), - GutterSpacing: __expectString(output.GutterSpacing), - GutterVisibility: __expectString(output.GutterVisibility), - Title: output.Title != null ? de_PanelTitleOptions(output.Title, context) : undefined, - } as any; +const de_GaugeChartVisual = (output: any, context: __SerdeContext): GaugeChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_GaugeChartConfiguration(_, context), + ConditionalFormatting: (_: any) => de_GaugeChartConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_GeoSpatialColumnGroup omitted. + /** - * deserializeAws_restJson1PanelTitleOptions + * deserializeAws_restJson1GeospatialCoordinateBounds */ -const de_PanelTitleOptions = (output: any, context: __SerdeContext): PanelTitleOptions => { - return { - FontConfiguration: - output.FontConfiguration != null ? de_FontConfiguration(output.FontConfiguration, context) : undefined, - HorizontalTextAlignment: __expectString(output.HorizontalTextAlignment), - Visibility: __expectString(output.Visibility), - } as any; +const de_GeospatialCoordinateBounds = (output: any, context: __SerdeContext): GeospatialCoordinateBounds => { + return take(output, { + East: __limitedParseDouble, + North: __limitedParseDouble, + South: __limitedParseDouble, + West: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1ParameterControl + * deserializeAws_restJson1GeospatialMapAggregatedFieldWells */ -const de_ParameterControl = (output: any, context: __SerdeContext): ParameterControl => { - return { - DateTimePicker: - output.DateTimePicker != null ? de_ParameterDateTimePickerControl(output.DateTimePicker, context) : undefined, - Dropdown: output.Dropdown != null ? de_ParameterDropDownControl(output.Dropdown, context) : undefined, - List: output.List != null ? de_ParameterListControl(output.List, context) : undefined, - Slider: output.Slider != null ? de_ParameterSliderControl(output.Slider, context) : undefined, - TextArea: output.TextArea != null ? de_ParameterTextAreaControl(output.TextArea, context) : undefined, - TextField: output.TextField != null ? de_ParameterTextFieldControl(output.TextField, context) : undefined, - } as any; +const de_GeospatialMapAggregatedFieldWells = ( + output: any, + context: __SerdeContext +): GeospatialMapAggregatedFieldWells => { + return take(output, { + Colors: _json, + Geospatial: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1ParameterControlList + * deserializeAws_restJson1GeospatialMapConfiguration */ -const de_ParameterControlList = (output: any, context: __SerdeContext): ParameterControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterControl(entry, context); - }); - return retVal; +const de_GeospatialMapConfiguration = (output: any, context: __SerdeContext): GeospatialMapConfiguration => { + return take(output, { + FieldWells: (_: any) => de_GeospatialMapFieldWells(_, context), + Legend: _json, + MapStyleOptions: _json, + PointStyleOptions: _json, + Tooltip: (_: any) => de_TooltipOptions(_, context), + VisualPalette: _json, + WindowOptions: (_: any) => de_GeospatialWindowOptions(_, context), + }) as any; }; /** - * deserializeAws_restJson1ParameterDateTimePickerControl + * deserializeAws_restJson1GeospatialMapFieldWells */ -const de_ParameterDateTimePickerControl = (output: any, context: __SerdeContext): ParameterDateTimePickerControl => { - return { - DisplayOptions: - output.DisplayOptions != null - ? de_DateTimePickerControlDisplayOptions(output.DisplayOptions, context) - : undefined, - ParameterControlId: __expectString(output.ParameterControlId), - SourceParameterName: __expectString(output.SourceParameterName), - Title: __expectString(output.Title), - } as any; +const de_GeospatialMapFieldWells = (output: any, context: __SerdeContext): GeospatialMapFieldWells => { + return take(output, { + GeospatialMapAggregatedFieldWells: (_: any) => de_GeospatialMapAggregatedFieldWells(_, context), + }) as any; }; +// de_GeospatialMapStyleOptions omitted. + /** - * deserializeAws_restJson1ParameterDeclaration + * deserializeAws_restJson1GeospatialMapVisual */ -const de_ParameterDeclaration = (output: any, context: __SerdeContext): ParameterDeclaration => { - return { - DateTimeParameterDeclaration: - output.DateTimeParameterDeclaration != null - ? de_DateTimeParameterDeclaration(output.DateTimeParameterDeclaration, context) - : undefined, - DecimalParameterDeclaration: - output.DecimalParameterDeclaration != null - ? de_DecimalParameterDeclaration(output.DecimalParameterDeclaration, context) - : undefined, - IntegerParameterDeclaration: - output.IntegerParameterDeclaration != null - ? de_IntegerParameterDeclaration(output.IntegerParameterDeclaration, context) - : undefined, - StringParameterDeclaration: - output.StringParameterDeclaration != null - ? de_StringParameterDeclaration(output.StringParameterDeclaration, context) - : undefined, - } as any; +const de_GeospatialMapVisual = (output: any, context: __SerdeContext): GeospatialMapVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_GeospatialMapConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_GeospatialPointStyleOptions omitted. + /** - * deserializeAws_restJson1ParameterDeclarationList - */ -const de_ParameterDeclarationList = (output: any, context: __SerdeContext): ParameterDeclaration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterDeclaration(entry, context); - }); - return retVal; + * deserializeAws_restJson1GeospatialWindowOptions + */ +const de_GeospatialWindowOptions = (output: any, context: __SerdeContext): GeospatialWindowOptions => { + return take(output, { + Bounds: (_: any) => de_GeospatialCoordinateBounds(_, context), + MapZoomMode: __expectString, + }) as any; }; +// de_GlobalTableBorderOptions omitted. + /** - * deserializeAws_restJson1ParameterDropDownControl + * deserializeAws_restJson1GradientColor */ -const de_ParameterDropDownControl = (output: any, context: __SerdeContext): ParameterDropDownControl => { - return { - CascadingControlConfiguration: - output.CascadingControlConfiguration != null - ? de_CascadingControlConfiguration(output.CascadingControlConfiguration, context) - : undefined, - DisplayOptions: - output.DisplayOptions != null ? de_DropDownControlDisplayOptions(output.DisplayOptions, context) : undefined, - ParameterControlId: __expectString(output.ParameterControlId), - SelectableValues: - output.SelectableValues != null ? de_ParameterSelectableValues(output.SelectableValues, context) : undefined, - SourceParameterName: __expectString(output.SourceParameterName), - Title: __expectString(output.Title), - Type: __expectString(output.Type), - } as any; +const de_GradientColor = (output: any, context: __SerdeContext): GradientColor => { + return take(output, { + Stops: (_: any) => de_GradientStopList(_, context), + }) as any; }; /** - * deserializeAws_restJson1ParameterListControl + * deserializeAws_restJson1GradientStop */ -const de_ParameterListControl = (output: any, context: __SerdeContext): ParameterListControl => { - return { - CascadingControlConfiguration: - output.CascadingControlConfiguration != null - ? de_CascadingControlConfiguration(output.CascadingControlConfiguration, context) - : undefined, - DisplayOptions: - output.DisplayOptions != null ? de_ListControlDisplayOptions(output.DisplayOptions, context) : undefined, - ParameterControlId: __expectString(output.ParameterControlId), - SelectableValues: - output.SelectableValues != null ? de_ParameterSelectableValues(output.SelectableValues, context) : undefined, - SourceParameterName: __expectString(output.SourceParameterName), - Title: __expectString(output.Title), - Type: __expectString(output.Type), - } as any; +const de_GradientStop = (output: any, context: __SerdeContext): GradientStop => { + return take(output, { + Color: __expectString, + DataValue: __limitedParseDouble, + GradientOffset: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1ParameterSelectableValueList + * deserializeAws_restJson1GradientStopList */ -const de_ParameterSelectableValueList = (output: any, context: __SerdeContext): string[] => { +const de_GradientStopList = (output: any, context: __SerdeContext): GradientStop[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_GradientStop(entry, context); }); return retVal; }; +// de_GridLayoutCanvasSizeOptions omitted. + +// de_GridLayoutConfiguration omitted. + +// de_GridLayoutElement omitted. + +// de_GridLayoutElementList omitted. + +// de_GridLayoutScreenCanvasSizeOptions omitted. + +// de_Group omitted. + +// de_GroupList omitted. + +// de_GroupMember omitted. + +// de_GroupMemberList omitted. + /** - * deserializeAws_restJson1ParameterSelectableValues + * deserializeAws_restJson1GrowthRateComputation */ -const de_ParameterSelectableValues = (output: any, context: __SerdeContext): ParameterSelectableValues => { - return { - LinkToDataSetColumn: - output.LinkToDataSetColumn != null ? de_ColumnIdentifier(output.LinkToDataSetColumn, context) : undefined, - Values: output.Values != null ? de_ParameterSelectableValueList(output.Values, context) : undefined, - } as any; +const de_GrowthRateComputation = (output: any, context: __SerdeContext): GrowthRateComputation => { + return take(output, { + ComputationId: __expectString, + Name: __expectString, + PeriodSize: __expectInt32, + Time: _json, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; +// de_GutterStyle omitted. + +// de_HeaderFooterSectionConfiguration omitted. + +// de_HeaderFooterSectionConfigurationList omitted. + /** - * deserializeAws_restJson1ParameterSliderControl + * deserializeAws_restJson1HeatMapAggregatedFieldWells */ -const de_ParameterSliderControl = (output: any, context: __SerdeContext): ParameterSliderControl => { - return { - DisplayOptions: - output.DisplayOptions != null ? de_SliderControlDisplayOptions(output.DisplayOptions, context) : undefined, - MaximumValue: __limitedParseDouble(output.MaximumValue), - MinimumValue: __limitedParseDouble(output.MinimumValue), - ParameterControlId: __expectString(output.ParameterControlId), - SourceParameterName: __expectString(output.SourceParameterName), - StepSize: __limitedParseDouble(output.StepSize), - Title: __expectString(output.Title), - } as any; +const de_HeatMapAggregatedFieldWells = (output: any, context: __SerdeContext): HeatMapAggregatedFieldWells => { + return take(output, { + Columns: _json, + Rows: _json, + Values: (_: any) => de_HeatMapMeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1ParameterTextAreaControl + * deserializeAws_restJson1HeatMapConfiguration */ -const de_ParameterTextAreaControl = (output: any, context: __SerdeContext): ParameterTextAreaControl => { - return { - Delimiter: __expectString(output.Delimiter), - DisplayOptions: - output.DisplayOptions != null ? de_TextAreaControlDisplayOptions(output.DisplayOptions, context) : undefined, - ParameterControlId: __expectString(output.ParameterControlId), - SourceParameterName: __expectString(output.SourceParameterName), - Title: __expectString(output.Title), - } as any; +const de_HeatMapConfiguration = (output: any, context: __SerdeContext): HeatMapConfiguration => { + return take(output, { + ColorScale: (_: any) => de_ColorScale(_, context), + ColumnLabelOptions: _json, + DataLabels: _json, + FieldWells: (_: any) => de_HeatMapFieldWells(_, context), + Legend: _json, + RowLabelOptions: _json, + SortConfiguration: (_: any) => de_HeatMapSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + }) as any; }; +// de_HeatMapDimensionFieldList omitted. + /** - * deserializeAws_restJson1ParameterTextFieldControl + * deserializeAws_restJson1HeatMapFieldWells */ -const de_ParameterTextFieldControl = (output: any, context: __SerdeContext): ParameterTextFieldControl => { - return { - DisplayOptions: - output.DisplayOptions != null ? de_TextFieldControlDisplayOptions(output.DisplayOptions, context) : undefined, - ParameterControlId: __expectString(output.ParameterControlId), - SourceParameterName: __expectString(output.SourceParameterName), - Title: __expectString(output.Title), - } as any; +const de_HeatMapFieldWells = (output: any, context: __SerdeContext): HeatMapFieldWells => { + return take(output, { + HeatMapAggregatedFieldWells: (_: any) => de_HeatMapAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1Path + * deserializeAws_restJson1HeatMapMeasureFieldList */ -const de_Path = (output: any, context: __SerdeContext): string[] => { +const de_HeatMapMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MeasureField(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1PercentageDisplayFormatConfiguration + * deserializeAws_restJson1HeatMapSortConfiguration */ -const de_PercentageDisplayFormatConfiguration = ( - output: any, - context: __SerdeContext -): PercentageDisplayFormatConfiguration => { - return { - DecimalPlacesConfiguration: - output.DecimalPlacesConfiguration != null - ? de_DecimalPlacesConfiguration(output.DecimalPlacesConfiguration, context) - : undefined, - NegativeValueConfiguration: - output.NegativeValueConfiguration != null - ? de_NegativeValueConfiguration(output.NegativeValueConfiguration, context) - : undefined, - NullValueFormatConfiguration: - output.NullValueFormatConfiguration != null - ? de_NullValueFormatConfiguration(output.NullValueFormatConfiguration, context) - : undefined, - Prefix: __expectString(output.Prefix), - SeparatorConfiguration: - output.SeparatorConfiguration != null - ? de_NumericSeparatorConfiguration(output.SeparatorConfiguration, context) - : undefined, - Suffix: __expectString(output.Suffix), - } as any; +const de_HeatMapSortConfiguration = (output: any, context: __SerdeContext): HeatMapSortConfiguration => { + return take(output, { + HeatMapColumnItemsLimitConfiguration: _json, + HeatMapColumnSort: (_: any) => de_FieldSortOptionsList(_, context), + HeatMapRowItemsLimitConfiguration: _json, + HeatMapRowSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1PercentileAggregation + * deserializeAws_restJson1HeatMapVisual */ -const de_PercentileAggregation = (output: any, context: __SerdeContext): PercentileAggregation => { - return { - PercentileValue: __limitedParseDouble(output.PercentileValue), - } as any; +const de_HeatMapVisual = (output: any, context: __SerdeContext): HeatMapVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_HeatMapConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1PercentVisibleRange + * deserializeAws_restJson1HistogramAggregatedFieldWells */ -const de_PercentVisibleRange = (output: any, context: __SerdeContext): PercentVisibleRange => { - return { - From: __limitedParseDouble(output.From), - To: __limitedParseDouble(output.To), - } as any; +const de_HistogramAggregatedFieldWells = (output: any, context: __SerdeContext): HistogramAggregatedFieldWells => { + return take(output, { + Values: (_: any) => de_HistogramMeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1PeriodOverPeriodComputation + * deserializeAws_restJson1HistogramBinOptions */ -const de_PeriodOverPeriodComputation = (output: any, context: __SerdeContext): PeriodOverPeriodComputation => { - return { - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; +const de_HistogramBinOptions = (output: any, context: __SerdeContext): HistogramBinOptions => { + return take(output, { + BinCount: _json, + BinWidth: (_: any) => de_BinWidthOptions(_, context), + SelectedBinType: __expectString, + StartValue: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1PeriodToDateComputation + * deserializeAws_restJson1HistogramConfiguration */ -const de_PeriodToDateComputation = (output: any, context: __SerdeContext): PeriodToDateComputation => { - return { - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - PeriodTimeGranularity: __expectString(output.PeriodTimeGranularity), - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; +const de_HistogramConfiguration = (output: any, context: __SerdeContext): HistogramConfiguration => { + return take(output, { + BinOptions: (_: any) => de_HistogramBinOptions(_, context), + DataLabels: _json, + FieldWells: (_: any) => de_HistogramFieldWells(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + VisualPalette: _json, + XAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + XAxisLabelOptions: _json, + YAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + }) as any; }; /** - * deserializeAws_restJson1PhysicalTable + * deserializeAws_restJson1HistogramFieldWells */ -const de_PhysicalTable = (output: any, context: __SerdeContext): PhysicalTable => { - if (output.CustomSql != null) { - return { - CustomSql: de_CustomSql(output.CustomSql, context), - }; - } - if (output.RelationalTable != null) { - return { - RelationalTable: de_RelationalTable(output.RelationalTable, context), - }; - } - if (output.S3Source != null) { - return { - S3Source: de_S3Source(output.S3Source, context), - }; - } - return { $unknown: Object.entries(output)[0] }; +const de_HistogramFieldWells = (output: any, context: __SerdeContext): HistogramFieldWells => { + return take(output, { + HistogramAggregatedFieldWells: (_: any) => de_HistogramAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1PhysicalTableMap + * deserializeAws_restJson1HistogramMeasureFieldList */ -const de_PhysicalTableMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PhysicalTable(__expectUnion(value), context); - return acc; - }, {}); +const de_HistogramMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MeasureField(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1PieChartAggregatedFieldWells + * deserializeAws_restJson1HistogramVisual */ -const de_PieChartAggregatedFieldWells = (output: any, context: __SerdeContext): PieChartAggregatedFieldWells => { - return { - Category: output.Category != null ? de_DimensionFieldList(output.Category, context) : undefined, - SmallMultiples: - output.SmallMultiples != null ? de_SmallMultiplesDimensionFieldList(output.SmallMultiples, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; +const de_HistogramVisual = (output: any, context: __SerdeContext): HistogramVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_HistogramConfiguration(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_IAMPolicyAssignment omitted. + +// de_IAMPolicyAssignmentSummary omitted. + +// de_IAMPolicyAssignmentSummaryList omitted. + +// de_IdentityMap omitted. + +// de_IdentityNameList omitted. + +// de_IncrementalRefresh omitted. + /** - * deserializeAws_restJson1PieChartConfiguration + * deserializeAws_restJson1Ingestion */ -const de_PieChartConfiguration = (output: any, context: __SerdeContext): PieChartConfiguration => { - return { - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - ContributionAnalysisDefaults: - output.ContributionAnalysisDefaults != null - ? de_ContributionAnalysisDefaultList(output.ContributionAnalysisDefaults, context) - : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - DonutOptions: output.DonutOptions != null ? de_DonutOptions(output.DonutOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_PieChartFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - SmallMultiplesOptions: - output.SmallMultiplesOptions != null - ? de_SmallMultiplesOptions(output.SmallMultiplesOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_PieChartSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - ValueLabelOptions: - output.ValueLabelOptions != null ? de_ChartAxisLabelOptions(output.ValueLabelOptions, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; +const de_Ingestion = (output: any, context: __SerdeContext): Ingestion => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorInfo: _json, + IngestionId: __expectString, + IngestionSizeInBytes: __expectLong, + IngestionStatus: __expectString, + IngestionTimeInSeconds: __expectLong, + QueueInfo: _json, + RequestSource: __expectString, + RequestType: __expectString, + RowInfo: _json, + }) as any; }; /** - * deserializeAws_restJson1PieChartFieldWells + * deserializeAws_restJson1Ingestions */ -const de_PieChartFieldWells = (output: any, context: __SerdeContext): PieChartFieldWells => { - return { - PieChartAggregatedFieldWells: - output.PieChartAggregatedFieldWells != null - ? de_PieChartAggregatedFieldWells(output.PieChartAggregatedFieldWells, context) - : undefined, - } as any; +const de_Ingestions = (output: any, context: __SerdeContext): Ingestion[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Ingestion(entry, context); + }); + return retVal; }; +// de_InputColumn omitted. + +// de_InputColumnList omitted. + /** - * deserializeAws_restJson1PieChartSortConfiguration + * deserializeAws_restJson1InsightConfiguration */ -const de_PieChartSortConfiguration = (output: any, context: __SerdeContext): PieChartSortConfiguration => { - return { - CategoryItemsLimit: - output.CategoryItemsLimit != null ? de_ItemsLimitConfiguration(output.CategoryItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - SmallMultiplesLimitConfiguration: - output.SmallMultiplesLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.SmallMultiplesLimitConfiguration, context) - : undefined, - SmallMultiplesSort: - output.SmallMultiplesSort != null ? de_FieldSortOptionsList(output.SmallMultiplesSort, context) : undefined, - } as any; +const de_InsightConfiguration = (output: any, context: __SerdeContext): InsightConfiguration => { + return take(output, { + Computations: (_: any) => de_ComputationList(_, context), + CustomNarrative: _json, + }) as any; }; /** - * deserializeAws_restJson1PieChartVisual + * deserializeAws_restJson1InsightVisual */ -const de_PieChartVisual = (output: any, context: __SerdeContext): PieChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_PieChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_InsightVisual = (output: any, context: __SerdeContext): InsightVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + DataSetIdentifier: __expectString, + InsightConfiguration: (_: any) => de_InsightConfiguration(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_IntegerDefaultValueList omitted. + +// de_IntegerDefaultValues omitted. + +// de_IntegerParameterDeclaration omitted. + +// de_IntegerValueWhenUnsetConfiguration omitted. + +// de_IpRestrictionRuleMap omitted. + +// de_ItemsLimitConfiguration omitted. + +// de_JiraParameters omitted. + +// de_JoinInstruction omitted. + +// de_JoinKeyProperties omitted. + /** - * deserializeAws_restJson1PivotFieldSortOptions + * deserializeAws_restJson1KPIConditionalFormatting */ -const de_PivotFieldSortOptions = (output: any, context: __SerdeContext): PivotFieldSortOptions => { - return { - FieldId: __expectString(output.FieldId), - SortBy: output.SortBy != null ? de_PivotTableSortBy(output.SortBy, context) : undefined, - } as any; +const de_KPIConditionalFormatting = (output: any, context: __SerdeContext): KPIConditionalFormatting => { + return take(output, { + ConditionalFormattingOptions: (_: any) => de_KPIConditionalFormattingOptionList(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotFieldSortOptionsList + * deserializeAws_restJson1KPIConditionalFormattingOption */ -const de_PivotFieldSortOptionsList = (output: any, context: __SerdeContext): PivotFieldSortOptions[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PivotFieldSortOptions(entry, context); - }); - return retVal; +const de_KPIConditionalFormattingOption = (output: any, context: __SerdeContext): KPIConditionalFormattingOption => { + return take(output, { + PrimaryValue: (_: any) => de_KPIPrimaryValueConditionalFormatting(_, context), + ProgressBar: (_: any) => de_KPIProgressBarConditionalFormatting(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotMeasureFieldList + * deserializeAws_restJson1KPIConditionalFormattingOptionList */ -const de_PivotMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { +const de_KPIConditionalFormattingOptionList = ( + output: any, + context: __SerdeContext +): KPIConditionalFormattingOption[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); + return de_KPIConditionalFormattingOption(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1PivotTableAggregatedFieldWells + * deserializeAws_restJson1KPIConfiguration */ -const de_PivotTableAggregatedFieldWells = (output: any, context: __SerdeContext): PivotTableAggregatedFieldWells => { - return { - Columns: output.Columns != null ? de_PivotTableDimensionList(output.Columns, context) : undefined, - Rows: output.Rows != null ? de_PivotTableDimensionList(output.Rows, context) : undefined, - Values: output.Values != null ? de_PivotMeasureFieldList(output.Values, context) : undefined, - } as any; +const de_KPIConfiguration = (output: any, context: __SerdeContext): KPIConfiguration => { + return take(output, { + FieldWells: (_: any) => de_KPIFieldWells(_, context), + KPIOptions: _json, + SortConfiguration: (_: any) => de_KPISortConfiguration(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableCellConditionalFormatting + * deserializeAws_restJson1KPIFieldWells */ -const de_PivotTableCellConditionalFormatting = ( - output: any, - context: __SerdeContext -): PivotTableCellConditionalFormatting => { - return { - FieldId: __expectString(output.FieldId), - Scope: output.Scope != null ? de_PivotTableConditionalFormattingScope(output.Scope, context) : undefined, - TextFormat: output.TextFormat != null ? de_TextConditionalFormat(output.TextFormat, context) : undefined, - } as any; +const de_KPIFieldWells = (output: any, context: __SerdeContext): KPIFieldWells => { + return take(output, { + TargetValues: (_: any) => de_MeasureFieldList(_, context), + TrendGroups: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; +// de_KPIOptions omitted. + /** - * deserializeAws_restJson1PivotTableConditionalFormatting + * deserializeAws_restJson1KPIPrimaryValueConditionalFormatting */ -const de_PivotTableConditionalFormatting = (output: any, context: __SerdeContext): PivotTableConditionalFormatting => { - return { - ConditionalFormattingOptions: - output.ConditionalFormattingOptions != null - ? de_PivotTableConditionalFormattingOptionList(output.ConditionalFormattingOptions, context) - : undefined, - } as any; +const de_KPIPrimaryValueConditionalFormatting = ( + output: any, + context: __SerdeContext +): KPIPrimaryValueConditionalFormatting => { + return take(output, { + Icon: _json, + TextColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableConditionalFormattingOption + * deserializeAws_restJson1KPIProgressBarConditionalFormatting */ -const de_PivotTableConditionalFormattingOption = ( +const de_KPIProgressBarConditionalFormatting = ( output: any, context: __SerdeContext -): PivotTableConditionalFormattingOption => { - return { - Cell: output.Cell != null ? de_PivotTableCellConditionalFormatting(output.Cell, context) : undefined, - } as any; +): KPIProgressBarConditionalFormatting => { + return take(output, { + ForegroundColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableConditionalFormattingOptionList + * deserializeAws_restJson1KPISortConfiguration */ -const de_PivotTableConditionalFormattingOptionList = ( - output: any, - context: __SerdeContext -): PivotTableConditionalFormattingOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PivotTableConditionalFormattingOption(entry, context); - }); - return retVal; +const de_KPISortConfiguration = (output: any, context: __SerdeContext): KPISortConfiguration => { + return take(output, { + TrendGroupSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableConditionalFormattingScope + * deserializeAws_restJson1KPIVisual */ -const de_PivotTableConditionalFormattingScope = ( - output: any, - context: __SerdeContext -): PivotTableConditionalFormattingScope => { - return { - Role: __expectString(output.Role), - } as any; +const de_KPIVisual = (output: any, context: __SerdeContext): KPIVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_KPIConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + ConditionalFormatting: (_: any) => de_KPIConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_LabelOptions omitted. + /** - * deserializeAws_restJson1PivotTableConfiguration + * deserializeAws_restJson1Layout */ -const de_PivotTableConfiguration = (output: any, context: __SerdeContext): PivotTableConfiguration => { - return { - FieldOptions: output.FieldOptions != null ? de_PivotTableFieldOptions(output.FieldOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_PivotTableFieldWells(output.FieldWells, context) : undefined, - PaginatedReportOptions: - output.PaginatedReportOptions != null - ? de_PivotTablePaginatedReportOptions(output.PaginatedReportOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_PivotTableSortConfiguration(output.SortConfiguration, context) : undefined, - TableOptions: output.TableOptions != null ? de_PivotTableOptions(output.TableOptions, context) : undefined, - TotalOptions: output.TotalOptions != null ? de_PivotTableTotalOptions(output.TotalOptions, context) : undefined, - } as any; +const de_Layout = (output: any, context: __SerdeContext): Layout => { + return take(output, { + Configuration: (_: any) => de_LayoutConfiguration(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableDataPathOption + * deserializeAws_restJson1LayoutConfiguration */ -const de_PivotTableDataPathOption = (output: any, context: __SerdeContext): PivotTableDataPathOption => { - return { - DataPathList: output.DataPathList != null ? de_DataPathValueList(output.DataPathList, context) : undefined, - Width: __expectString(output.Width), - } as any; +const de_LayoutConfiguration = (output: any, context: __SerdeContext): LayoutConfiguration => { + return take(output, { + FreeFormLayout: _json, + GridLayout: _json, + SectionBasedLayout: (_: any) => de_SectionBasedLayoutConfiguration(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableDataPathOptionList + * deserializeAws_restJson1LayoutList */ -const de_PivotTableDataPathOptionList = (output: any, context: __SerdeContext): PivotTableDataPathOption[] => { +const de_LayoutList = (output: any, context: __SerdeContext): Layout[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PivotTableDataPathOption(entry, context); + return de_Layout(entry, context); }); return retVal; }; +// de_LegendOptions omitted. + /** - * deserializeAws_restJson1PivotTableDimensionList + * deserializeAws_restJson1LineChartAggregatedFieldWells */ -const de_PivotTableDimensionList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; +const de_LineChartAggregatedFieldWells = (output: any, context: __SerdeContext): LineChartAggregatedFieldWells => { + return take(output, { + Category: _json, + Colors: _json, + SmallMultiples: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; +}; + +/** + * deserializeAws_restJson1LineChartConfiguration + */ +const de_LineChartConfiguration = (output: any, context: __SerdeContext): LineChartConfiguration => { + return take(output, { + ContributionAnalysisDefaults: _json, + DataLabels: _json, + DefaultSeriesSettings: _json, + FieldWells: (_: any) => de_LineChartFieldWells(_, context), + ForecastConfigurations: (_: any) => de_ForecastConfigurationList(_, context), + Legend: _json, + PrimaryYAxisDisplayOptions: (_: any) => de_LineSeriesAxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + ReferenceLines: (_: any) => de_ReferenceLineList(_, context), + SecondaryYAxisDisplayOptions: (_: any) => de_LineSeriesAxisDisplayOptions(_, context), + SecondaryYAxisLabelOptions: _json, + Series: _json, + SmallMultiplesOptions: _json, + SortConfiguration: (_: any) => de_LineChartSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + Type: __expectString, + VisualPalette: _json, + XAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + XAxisLabelOptions: _json, + }) as any; +}; + +// de_LineChartDefaultSeriesSettings omitted. + +/** + * deserializeAws_restJson1LineChartFieldWells + */ +const de_LineChartFieldWells = (output: any, context: __SerdeContext): LineChartFieldWells => { + return take(output, { + LineChartAggregatedFieldWells: (_: any) => de_LineChartAggregatedFieldWells(_, context), + }) as any; }; +// de_LineChartLineStyleSettings omitted. + +// de_LineChartMarkerStyleSettings omitted. + +// de_LineChartSeriesSettings omitted. + /** - * deserializeAws_restJson1PivotTableFieldOption + * deserializeAws_restJson1LineChartSortConfiguration */ -const de_PivotTableFieldOption = (output: any, context: __SerdeContext): PivotTableFieldOption => { - return { - CustomLabel: __expectString(output.CustomLabel), - FieldId: __expectString(output.FieldId), - Visibility: __expectString(output.Visibility), - } as any; +const de_LineChartSortConfiguration = (output: any, context: __SerdeContext): LineChartSortConfiguration => { + return take(output, { + CategoryItemsLimitConfiguration: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + ColorItemsLimitConfiguration: _json, + SmallMultiplesLimitConfiguration: _json, + SmallMultiplesSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableFieldOptionList + * deserializeAws_restJson1LineChartVisual */ -const de_PivotTableFieldOptionList = (output: any, context: __SerdeContext): PivotTableFieldOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PivotTableFieldOption(entry, context); - }); - return retVal; +const de_LineChartVisual = (output: any, context: __SerdeContext): LineChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_LineChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1PivotTableFieldOptions + * deserializeAws_restJson1LineSeriesAxisDisplayOptions */ -const de_PivotTableFieldOptions = (output: any, context: __SerdeContext): PivotTableFieldOptions => { - return { - DataPathOptions: - output.DataPathOptions != null ? de_PivotTableDataPathOptionList(output.DataPathOptions, context) : undefined, - SelectedFieldOptions: - output.SelectedFieldOptions != null - ? de_PivotTableFieldOptionList(output.SelectedFieldOptions, context) - : undefined, - } as any; +const de_LineSeriesAxisDisplayOptions = (output: any, context: __SerdeContext): LineSeriesAxisDisplayOptions => { + return take(output, { + AxisOptions: (_: any) => de_AxisDisplayOptions(_, context), + MissingDataConfigurations: _json, + }) as any; }; +// de_LinkSharingConfiguration omitted. + +// de_ListControlDisplayOptions omitted. + +// de_ListControlSearchOptions omitted. + +// de_ListControlSelectAllOptions omitted. + +// de_LoadingAnimation omitted. + +// de_LocalNavigationConfiguration omitted. + +// de_LogicalTable omitted. + +// de_LogicalTableMap omitted. + +// de_LogicalTableSource omitted. + +// de_LongFormatText omitted. + +// de_LookbackWindow omitted. + +// de_ManifestFileLocation omitted. + +// de_MarginStyle omitted. + +// de_MariaDbParameters omitted. + +// de_MaximumLabelType omitted. + /** - * deserializeAws_restJson1PivotTableFieldSubtotalOptions + * deserializeAws_restJson1MaximumMinimumComputation */ -const de_PivotTableFieldSubtotalOptions = (output: any, context: __SerdeContext): PivotTableFieldSubtotalOptions => { - return { - FieldId: __expectString(output.FieldId), - } as any; +const de_MaximumMinimumComputation = (output: any, context: __SerdeContext): MaximumMinimumComputation => { + return take(output, { + ComputationId: __expectString, + Name: __expectString, + Time: _json, + Type: __expectString, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableFieldSubtotalOptionsList + * deserializeAws_restJson1MeasureField */ -const de_PivotTableFieldSubtotalOptionsList = ( - output: any, - context: __SerdeContext -): PivotTableFieldSubtotalOptions[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PivotTableFieldSubtotalOptions(entry, context); - }); - return retVal; +const de_MeasureField = (output: any, context: __SerdeContext): MeasureField => { + return take(output, { + CalculatedMeasureField: _json, + CategoricalMeasureField: _json, + DateMeasureField: _json, + NumericalMeasureField: (_: any) => de_NumericalMeasureField(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableFieldWells + * deserializeAws_restJson1MeasureFieldList */ -const de_PivotTableFieldWells = (output: any, context: __SerdeContext): PivotTableFieldWells => { - return { - PivotTableAggregatedFieldWells: - output.PivotTableAggregatedFieldWells != null - ? de_PivotTableAggregatedFieldWells(output.PivotTableAggregatedFieldWells, context) - : undefined, - } as any; +const de_MeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MeasureField(entry, context); + }); + return retVal; }; +// de_MemberIdArnPair omitted. + /** - * deserializeAws_restJson1PivotTableOptions + * deserializeAws_restJson1MetricComparisonComputation */ -const de_PivotTableOptions = (output: any, context: __SerdeContext): PivotTableOptions => { - return { - CellStyle: output.CellStyle != null ? de_TableCellStyle(output.CellStyle, context) : undefined, - CollapsedRowDimensionsVisibility: __expectString(output.CollapsedRowDimensionsVisibility), - ColumnHeaderStyle: - output.ColumnHeaderStyle != null ? de_TableCellStyle(output.ColumnHeaderStyle, context) : undefined, - ColumnNamesVisibility: __expectString(output.ColumnNamesVisibility), - MetricPlacement: __expectString(output.MetricPlacement), - RowAlternateColorOptions: - output.RowAlternateColorOptions != null - ? de_RowAlternateColorOptions(output.RowAlternateColorOptions, context) - : undefined, - RowFieldNamesStyle: - output.RowFieldNamesStyle != null ? de_TableCellStyle(output.RowFieldNamesStyle, context) : undefined, - RowHeaderStyle: output.RowHeaderStyle != null ? de_TableCellStyle(output.RowHeaderStyle, context) : undefined, - SingleMetricVisibility: __expectString(output.SingleMetricVisibility), - ToggleButtonsVisibility: __expectString(output.ToggleButtonsVisibility), - } as any; +const de_MetricComparisonComputation = (output: any, context: __SerdeContext): MetricComparisonComputation => { + return take(output, { + ComputationId: __expectString, + FromValue: (_: any) => de_MeasureField(_, context), + Name: __expectString, + TargetValue: (_: any) => de_MeasureField(_, context), + Time: _json, + }) as any; }; +// de_MinimumLabelType omitted. + +// de_MissingDataConfiguration omitted. + +// de_MissingDataConfigurationList omitted. + +// de_MySqlParameters omitted. + +// de_NamespaceError omitted. + +// de_NamespaceInfoV2 omitted. + +// de_Namespaces omitted. + +// de_NegativeValueConfiguration omitted. + +// de_NullValueFormatConfiguration omitted. + +// de_NumberDisplayFormatConfiguration omitted. + +// de_NumberFormatConfiguration omitted. + /** - * deserializeAws_restJson1PivotTablePaginatedReportOptions + * deserializeAws_restJson1NumericalAggregationFunction */ -const de_PivotTablePaginatedReportOptions = ( - output: any, - context: __SerdeContext -): PivotTablePaginatedReportOptions => { - return { - OverflowColumnHeaderVisibility: __expectString(output.OverflowColumnHeaderVisibility), - VerticalOverflowVisibility: __expectString(output.VerticalOverflowVisibility), - } as any; +const de_NumericalAggregationFunction = (output: any, context: __SerdeContext): NumericalAggregationFunction => { + return take(output, { + PercentileAggregation: (_: any) => de_PercentileAggregation(_, context), + SimpleNumericalAggregation: __expectString, + }) as any; }; +// de_NumericalDimensionField omitted. + /** - * deserializeAws_restJson1PivotTableSortBy + * deserializeAws_restJson1NumericalMeasureField */ -const de_PivotTableSortBy = (output: any, context: __SerdeContext): PivotTableSortBy => { - return { - Column: output.Column != null ? de_ColumnSort(output.Column, context) : undefined, - DataPath: output.DataPath != null ? de_DataPathSort(output.DataPath, context) : undefined, - Field: output.Field != null ? de_FieldSort(output.Field, context) : undefined, - } as any; +const de_NumericalMeasureField = (output: any, context: __SerdeContext): NumericalMeasureField => { + return take(output, { + AggregationFunction: (_: any) => de_NumericalAggregationFunction(_, context), + Column: _json, + FieldId: __expectString, + FormatConfiguration: _json, + }) as any; }; /** - * deserializeAws_restJson1PivotTableSortConfiguration + * deserializeAws_restJson1NumericAxisOptions */ -const de_PivotTableSortConfiguration = (output: any, context: __SerdeContext): PivotTableSortConfiguration => { - return { - FieldSortOptions: - output.FieldSortOptions != null ? de_PivotFieldSortOptionsList(output.FieldSortOptions, context) : undefined, - } as any; +const de_NumericAxisOptions = (output: any, context: __SerdeContext): NumericAxisOptions => { + return take(output, { + Range: (_: any) => de_AxisDisplayRange(_, context), + Scale: (_: any) => de_AxisScale(_, context), + }) as any; }; /** - * deserializeAws_restJson1PivotTableTotalOptions + * deserializeAws_restJson1NumericEqualityDrillDownFilter */ -const de_PivotTableTotalOptions = (output: any, context: __SerdeContext): PivotTableTotalOptions => { - return { - ColumnSubtotalOptions: - output.ColumnSubtotalOptions != null ? de_SubtotalOptions(output.ColumnSubtotalOptions, context) : undefined, - ColumnTotalOptions: - output.ColumnTotalOptions != null ? de_PivotTotalOptions(output.ColumnTotalOptions, context) : undefined, - RowSubtotalOptions: - output.RowSubtotalOptions != null ? de_SubtotalOptions(output.RowSubtotalOptions, context) : undefined, - RowTotalOptions: output.RowTotalOptions != null ? de_PivotTotalOptions(output.RowTotalOptions, context) : undefined, - } as any; +const de_NumericEqualityDrillDownFilter = (output: any, context: __SerdeContext): NumericEqualityDrillDownFilter => { + return take(output, { + Column: _json, + Value: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1PivotTableVisual + * deserializeAws_restJson1NumericEqualityFilter */ -const de_PivotTableVisual = (output: any, context: __SerdeContext): PivotTableVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_PivotTableConfiguration(output.ChartConfiguration, context) : undefined, - ConditionalFormatting: - output.ConditionalFormatting != null - ? de_PivotTableConditionalFormatting(output.ConditionalFormatting, context) - : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; +const de_NumericEqualityFilter = (output: any, context: __SerdeContext): NumericEqualityFilter => { + return take(output, { + AggregationFunction: (_: any) => de_AggregationFunction(_, context), + Column: _json, + FilterId: __expectString, + MatchOperator: __expectString, + NullOption: __expectString, + ParameterName: __expectString, + SelectAllOptions: __expectString, + Value: __limitedParseDouble, + }) as any; }; +// de_NumericFormatConfiguration omitted. + /** - * deserializeAws_restJson1PivotTotalOptions + * deserializeAws_restJson1NumericRangeFilter */ -const de_PivotTotalOptions = (output: any, context: __SerdeContext): PivotTotalOptions => { - return { - CustomLabel: __expectString(output.CustomLabel), - MetricHeaderCellStyle: - output.MetricHeaderCellStyle != null ? de_TableCellStyle(output.MetricHeaderCellStyle, context) : undefined, - Placement: __expectString(output.Placement), - ScrollStatus: __expectString(output.ScrollStatus), - TotalCellStyle: output.TotalCellStyle != null ? de_TableCellStyle(output.TotalCellStyle, context) : undefined, - TotalsVisibility: __expectString(output.TotalsVisibility), - ValueCellStyle: output.ValueCellStyle != null ? de_TableCellStyle(output.ValueCellStyle, context) : undefined, - } as any; +const de_NumericRangeFilter = (output: any, context: __SerdeContext): NumericRangeFilter => { + return take(output, { + AggregationFunction: (_: any) => de_AggregationFunction(_, context), + Column: _json, + FilterId: __expectString, + IncludeMaximum: __expectBoolean, + IncludeMinimum: __expectBoolean, + NullOption: __expectString, + RangeMaximum: (_: any) => de_NumericRangeFilterValue(_, context), + RangeMinimum: (_: any) => de_NumericRangeFilterValue(_, context), + SelectAllOptions: __expectString, + }) as any; }; /** - * deserializeAws_restJson1PostgreSqlParameters + * deserializeAws_restJson1NumericRangeFilterValue */ -const de_PostgreSqlParameters = (output: any, context: __SerdeContext): PostgreSqlParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; +const de_NumericRangeFilterValue = (output: any, context: __SerdeContext): NumericRangeFilterValue => { + return take(output, { + Parameter: __expectString, + StaticValue: __limitedParseDouble, + }) as any; }; +// de_NumericSeparatorConfiguration omitted. + +// de_OracleParameters omitted. + +// de_OutputColumn omitted. + +// de_OutputColumnList omitted. + +// de_PaginationConfiguration omitted. + +// de_PanelConfiguration omitted. + +// de_PanelTitleOptions omitted. + /** - * deserializeAws_restJson1PredefinedHierarchy + * deserializeAws_restJson1ParameterControl */ -const de_PredefinedHierarchy = (output: any, context: __SerdeContext): PredefinedHierarchy => { - return { - Columns: output.Columns != null ? de_PredefinedHierarchyColumnList(output.Columns, context) : undefined, - DrillDownFilters: - output.DrillDownFilters != null ? de_DrillDownFilterList(output.DrillDownFilters, context) : undefined, - HierarchyId: __expectString(output.HierarchyId), - } as any; +const de_ParameterControl = (output: any, context: __SerdeContext): ParameterControl => { + return take(output, { + DateTimePicker: _json, + Dropdown: _json, + List: _json, + Slider: (_: any) => de_ParameterSliderControl(_, context), + TextArea: _json, + TextField: _json, + }) as any; }; /** - * deserializeAws_restJson1PredefinedHierarchyColumnList + * deserializeAws_restJson1ParameterControlList */ -const de_PredefinedHierarchyColumnList = (output: any, context: __SerdeContext): ColumnIdentifier[] => { +const de_ParameterControlList = (output: any, context: __SerdeContext): ParameterControl[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnIdentifier(entry, context); + return de_ParameterControl(entry, context); }); return retVal; }; +// de_ParameterDateTimePickerControl omitted. + /** - * deserializeAws_restJson1PrestoParameters + * deserializeAws_restJson1ParameterDeclaration */ -const de_PrestoParameters = (output: any, context: __SerdeContext): PrestoParameters => { - return { - Catalog: __expectString(output.Catalog), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; +const de_ParameterDeclaration = (output: any, context: __SerdeContext): ParameterDeclaration => { + return take(output, { + DateTimeParameterDeclaration: (_: any) => de_DateTimeParameterDeclaration(_, context), + DecimalParameterDeclaration: (_: any) => de_DecimalParameterDeclaration(_, context), + IntegerParameterDeclaration: _json, + StringParameterDeclaration: _json, + }) as any; }; /** - * deserializeAws_restJson1PrincipalList + * deserializeAws_restJson1ParameterDeclarationList */ -const de_PrincipalList = (output: any, context: __SerdeContext): string[] => { +const de_ParameterDeclarationList = (output: any, context: __SerdeContext): ParameterDeclaration[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ParameterDeclaration(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ProgressBarOptions - */ -const de_ProgressBarOptions = (output: any, context: __SerdeContext): ProgressBarOptions => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_ParameterDropDownControl omitted. + +// de_ParameterListControl omitted. + +// de_ParameterSelectableValueList omitted. + +// de_ParameterSelectableValues omitted. /** - * deserializeAws_restJson1ProjectedColumnList + * deserializeAws_restJson1ParameterSliderControl */ -const de_ProjectedColumnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ParameterSliderControl = (output: any, context: __SerdeContext): ParameterSliderControl => { + return take(output, { + DisplayOptions: _json, + MaximumValue: __limitedParseDouble, + MinimumValue: __limitedParseDouble, + ParameterControlId: __expectString, + SourceParameterName: __expectString, + StepSize: __limitedParseDouble, + Title: __expectString, + }) as any; }; +// de_ParameterTextAreaControl omitted. + +// de_ParameterTextFieldControl omitted. + +// de_Path omitted. + +// de_PercentageDisplayFormatConfiguration omitted. + /** - * deserializeAws_restJson1ProjectOperation + * deserializeAws_restJson1PercentileAggregation */ -const de_ProjectOperation = (output: any, context: __SerdeContext): ProjectOperation => { - return { - ProjectedColumns: - output.ProjectedColumns != null ? de_ProjectedColumnList(output.ProjectedColumns, context) : undefined, - } as any; +const de_PercentileAggregation = (output: any, context: __SerdeContext): PercentileAggregation => { + return take(output, { + PercentileValue: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1QueueInfo + * deserializeAws_restJson1PercentVisibleRange */ -const de_QueueInfo = (output: any, context: __SerdeContext): QueueInfo => { - return { - QueuedIngestion: __expectString(output.QueuedIngestion), - WaitingOnIngestion: __expectString(output.WaitingOnIngestion), - } as any; +const de_PercentVisibleRange = (output: any, context: __SerdeContext): PercentVisibleRange => { + return take(output, { + From: __limitedParseDouble, + To: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1RadarChartAggregatedFieldWells + * deserializeAws_restJson1PeriodOverPeriodComputation */ -const de_RadarChartAggregatedFieldWells = (output: any, context: __SerdeContext): RadarChartAggregatedFieldWells => { - return { - Category: output.Category != null ? de_RadarChartCategoryFieldList(output.Category, context) : undefined, - Color: output.Color != null ? de_RadarChartColorFieldList(output.Color, context) : undefined, - Values: output.Values != null ? de_RadarChartValuesFieldList(output.Values, context) : undefined, - } as any; +const de_PeriodOverPeriodComputation = (output: any, context: __SerdeContext): PeriodOverPeriodComputation => { + return take(output, { + ComputationId: __expectString, + Name: __expectString, + Time: _json, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; /** - * deserializeAws_restJson1RadarChartAreaStyleSettings + * deserializeAws_restJson1PeriodToDateComputation */ -const de_RadarChartAreaStyleSettings = (output: any, context: __SerdeContext): RadarChartAreaStyleSettings => { - return { - Visibility: __expectString(output.Visibility), - } as any; +const de_PeriodToDateComputation = (output: any, context: __SerdeContext): PeriodToDateComputation => { + return take(output, { + ComputationId: __expectString, + Name: __expectString, + PeriodTimeGranularity: __expectString, + Time: _json, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; +// de_PhysicalTable omitted. + +// de_PhysicalTableMap omitted. + /** - * deserializeAws_restJson1RadarChartCategoryFieldList + * deserializeAws_restJson1PieChartAggregatedFieldWells */ -const de_RadarChartCategoryFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; +const de_PieChartAggregatedFieldWells = (output: any, context: __SerdeContext): PieChartAggregatedFieldWells => { + return take(output, { + Category: _json, + SmallMultiples: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1RadarChartColorFieldList + * deserializeAws_restJson1PieChartConfiguration */ -const de_RadarChartColorFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; +const de_PieChartConfiguration = (output: any, context: __SerdeContext): PieChartConfiguration => { + return take(output, { + CategoryLabelOptions: _json, + ContributionAnalysisDefaults: _json, + DataLabels: _json, + DonutOptions: _json, + FieldWells: (_: any) => de_PieChartFieldWells(_, context), + Legend: _json, + SmallMultiplesOptions: _json, + SortConfiguration: (_: any) => de_PieChartSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + ValueLabelOptions: _json, + VisualPalette: _json, + }) as any; }; /** - * deserializeAws_restJson1RadarChartConfiguration + * deserializeAws_restJson1PieChartFieldWells */ -const de_RadarChartConfiguration = (output: any, context: __SerdeContext): RadarChartConfiguration => { - return { - AlternateBandColorsVisibility: __expectString(output.AlternateBandColorsVisibility), - AlternateBandEvenColor: __expectString(output.AlternateBandEvenColor), - AlternateBandOddColor: __expectString(output.AlternateBandOddColor), - BaseSeriesSettings: - output.BaseSeriesSettings != null ? de_RadarChartSeriesSettings(output.BaseSeriesSettings, context) : undefined, - CategoryAxis: output.CategoryAxis != null ? de_AxisDisplayOptions(output.CategoryAxis, context) : undefined, - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - ColorAxis: output.ColorAxis != null ? de_AxisDisplayOptions(output.ColorAxis, context) : undefined, - ColorLabelOptions: - output.ColorLabelOptions != null ? de_ChartAxisLabelOptions(output.ColorLabelOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_RadarChartFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - Shape: __expectString(output.Shape), - SortConfiguration: - output.SortConfiguration != null ? de_RadarChartSortConfiguration(output.SortConfiguration, context) : undefined, - StartAngle: __limitedParseDouble(output.StartAngle), - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - } as any; +const de_PieChartFieldWells = (output: any, context: __SerdeContext): PieChartFieldWells => { + return take(output, { + PieChartAggregatedFieldWells: (_: any) => de_PieChartAggregatedFieldWells(_, context), + }) as any; }; /** - * deserializeAws_restJson1RadarChartFieldWells + * deserializeAws_restJson1PieChartSortConfiguration */ -const de_RadarChartFieldWells = (output: any, context: __SerdeContext): RadarChartFieldWells => { - return { - RadarChartAggregatedFieldWells: - output.RadarChartAggregatedFieldWells != null - ? de_RadarChartAggregatedFieldWells(output.RadarChartAggregatedFieldWells, context) - : undefined, - } as any; +const de_PieChartSortConfiguration = (output: any, context: __SerdeContext): PieChartSortConfiguration => { + return take(output, { + CategoryItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + SmallMultiplesLimitConfiguration: _json, + SmallMultiplesSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1RadarChartSeriesSettings + * deserializeAws_restJson1PieChartVisual */ -const de_RadarChartSeriesSettings = (output: any, context: __SerdeContext): RadarChartSeriesSettings => { - return { - AreaStyleSettings: - output.AreaStyleSettings != null ? de_RadarChartAreaStyleSettings(output.AreaStyleSettings, context) : undefined, - } as any; +const de_PieChartVisual = (output: any, context: __SerdeContext): PieChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_PieChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** - * deserializeAws_restJson1RadarChartSortConfiguration + * deserializeAws_restJson1PivotFieldSortOptions */ -const de_RadarChartSortConfiguration = (output: any, context: __SerdeContext): RadarChartSortConfiguration => { - return { - CategoryItemsLimit: - output.CategoryItemsLimit != null ? de_ItemsLimitConfiguration(output.CategoryItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - ColorItemsLimit: - output.ColorItemsLimit != null ? de_ItemsLimitConfiguration(output.ColorItemsLimit, context) : undefined, - ColorSort: output.ColorSort != null ? de_FieldSortOptionsList(output.ColorSort, context) : undefined, - } as any; +const de_PivotFieldSortOptions = (output: any, context: __SerdeContext): PivotFieldSortOptions => { + return take(output, { + FieldId: __expectString, + SortBy: (_: any) => de_PivotTableSortBy(_, context), + }) as any; }; /** - * deserializeAws_restJson1RadarChartValuesFieldList + * deserializeAws_restJson1PivotFieldSortOptionsList */ -const de_RadarChartValuesFieldList = (output: any, context: __SerdeContext): MeasureField[] => { +const de_PivotFieldSortOptionsList = (output: any, context: __SerdeContext): PivotFieldSortOptions[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MeasureField(entry, context); + return de_PivotFieldSortOptions(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1RadarChartVisual - */ -const de_RadarChartVisual = (output: any, context: __SerdeContext): RadarChartVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_RadarChartConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; -}; - -/** - * deserializeAws_restJson1RangeEndsLabelType - */ -const de_RangeEndsLabelType = (output: any, context: __SerdeContext): RangeEndsLabelType => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; - -/** - * deserializeAws_restJson1RdsParameters + * deserializeAws_restJson1PivotMeasureFieldList */ -const de_RdsParameters = (output: any, context: __SerdeContext): RdsParameters => { - return { - Database: __expectString(output.Database), - InstanceId: __expectString(output.InstanceId), - } as any; +const de_PivotMeasureFieldList = (output: any, context: __SerdeContext): MeasureField[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MeasureField(entry, context); + }); + return retVal; }; /** - * deserializeAws_restJson1RedshiftParameters + * deserializeAws_restJson1PivotTableAggregatedFieldWells */ -const de_RedshiftParameters = (output: any, context: __SerdeContext): RedshiftParameters => { - return { - ClusterId: __expectString(output.ClusterId), - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; +const de_PivotTableAggregatedFieldWells = (output: any, context: __SerdeContext): PivotTableAggregatedFieldWells => { + return take(output, { + Columns: _json, + Rows: _json, + Values: (_: any) => de_PivotMeasureFieldList(_, context), + }) as any; }; /** - * deserializeAws_restJson1ReferenceLine + * deserializeAws_restJson1PivotTableCellConditionalFormatting */ -const de_ReferenceLine = (output: any, context: __SerdeContext): ReferenceLine => { - return { - DataConfiguration: - output.DataConfiguration != null - ? de_ReferenceLineDataConfiguration(output.DataConfiguration, context) - : undefined, - LabelConfiguration: - output.LabelConfiguration != null - ? de_ReferenceLineLabelConfiguration(output.LabelConfiguration, context) - : undefined, - Status: __expectString(output.Status), - StyleConfiguration: - output.StyleConfiguration != null - ? de_ReferenceLineStyleConfiguration(output.StyleConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ReferenceLineCustomLabelConfiguration - */ -const de_ReferenceLineCustomLabelConfiguration = ( +const de_PivotTableCellConditionalFormatting = ( output: any, context: __SerdeContext -): ReferenceLineCustomLabelConfiguration => { - return { - CustomLabel: __expectString(output.CustomLabel), - } as any; +): PivotTableCellConditionalFormatting => { + return take(output, { + FieldId: __expectString, + Scope: _json, + TextFormat: (_: any) => de_TextConditionalFormat(_, context), + }) as any; }; /** - * deserializeAws_restJson1ReferenceLineDataConfiguration + * deserializeAws_restJson1PivotTableConditionalFormatting */ -const de_ReferenceLineDataConfiguration = (output: any, context: __SerdeContext): ReferenceLineDataConfiguration => { - return { - AxisBinding: __expectString(output.AxisBinding), - DynamicConfiguration: - output.DynamicConfiguration != null - ? de_ReferenceLineDynamicDataConfiguration(output.DynamicConfiguration, context) - : undefined, - StaticConfiguration: - output.StaticConfiguration != null - ? de_ReferenceLineStaticDataConfiguration(output.StaticConfiguration, context) - : undefined, - } as any; +const de_PivotTableConditionalFormatting = (output: any, context: __SerdeContext): PivotTableConditionalFormatting => { + return take(output, { + ConditionalFormattingOptions: (_: any) => de_PivotTableConditionalFormattingOptionList(_, context), + }) as any; }; /** - * deserializeAws_restJson1ReferenceLineDynamicDataConfiguration + * deserializeAws_restJson1PivotTableConditionalFormattingOption */ -const de_ReferenceLineDynamicDataConfiguration = ( +const de_PivotTableConditionalFormattingOption = ( output: any, context: __SerdeContext -): ReferenceLineDynamicDataConfiguration => { - return { - Calculation: output.Calculation != null ? de_NumericalAggregationFunction(output.Calculation, context) : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - MeasureAggregationFunction: - output.MeasureAggregationFunction != null - ? de_AggregationFunction(output.MeasureAggregationFunction, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ReferenceLineLabelConfiguration - */ -const de_ReferenceLineLabelConfiguration = (output: any, context: __SerdeContext): ReferenceLineLabelConfiguration => { - return { - CustomLabelConfiguration: - output.CustomLabelConfiguration != null - ? de_ReferenceLineCustomLabelConfiguration(output.CustomLabelConfiguration, context) - : undefined, - FontColor: __expectString(output.FontColor), - FontConfiguration: - output.FontConfiguration != null ? de_FontConfiguration(output.FontConfiguration, context) : undefined, - HorizontalPosition: __expectString(output.HorizontalPosition), - ValueLabelConfiguration: - output.ValueLabelConfiguration != null - ? de_ReferenceLineValueLabelConfiguration(output.ValueLabelConfiguration, context) - : undefined, - VerticalPosition: __expectString(output.VerticalPosition), - } as any; +): PivotTableConditionalFormattingOption => { + return take(output, { + Cell: (_: any) => de_PivotTableCellConditionalFormatting(_, context), + }) as any; }; /** - * deserializeAws_restJson1ReferenceLineList + * deserializeAws_restJson1PivotTableConditionalFormattingOptionList */ -const de_ReferenceLineList = (output: any, context: __SerdeContext): ReferenceLine[] => { +const de_PivotTableConditionalFormattingOptionList = ( + output: any, + context: __SerdeContext +): PivotTableConditionalFormattingOption[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReferenceLine(entry, context); + return de_PivotTableConditionalFormattingOption(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ReferenceLineStaticDataConfiguration - */ -const de_ReferenceLineStaticDataConfiguration = ( - output: any, - context: __SerdeContext -): ReferenceLineStaticDataConfiguration => { - return { - Value: __limitedParseDouble(output.Value), - } as any; -}; +// de_PivotTableConditionalFormattingScope omitted. /** - * deserializeAws_restJson1ReferenceLineStyleConfiguration + * deserializeAws_restJson1PivotTableConfiguration */ -const de_ReferenceLineStyleConfiguration = (output: any, context: __SerdeContext): ReferenceLineStyleConfiguration => { - return { - Color: __expectString(output.Color), - Pattern: __expectString(output.Pattern), - } as any; +const de_PivotTableConfiguration = (output: any, context: __SerdeContext): PivotTableConfiguration => { + return take(output, { + FieldOptions: _json, + FieldWells: (_: any) => de_PivotTableFieldWells(_, context), + PaginatedReportOptions: _json, + SortConfiguration: (_: any) => de_PivotTableSortConfiguration(_, context), + TableOptions: _json, + TotalOptions: _json, + }) as any; }; -/** - * deserializeAws_restJson1ReferenceLineValueLabelConfiguration - */ -const de_ReferenceLineValueLabelConfiguration = ( - output: any, - context: __SerdeContext -): ReferenceLineValueLabelConfiguration => { - return { - FormatConfiguration: - output.FormatConfiguration != null - ? de_NumericFormatConfiguration(output.FormatConfiguration, context) - : undefined, - RelativePosition: __expectString(output.RelativePosition), - } as any; -}; +// de_PivotTableDataPathOption omitted. -/** - * deserializeAws_restJson1RefreshConfiguration - */ -const de_RefreshConfiguration = (output: any, context: __SerdeContext): RefreshConfiguration => { - return { - IncrementalRefresh: - output.IncrementalRefresh != null ? de_IncrementalRefresh(output.IncrementalRefresh, context) : undefined, - } as any; -}; +// de_PivotTableDataPathOptionList omitted. -/** - * deserializeAws_restJson1RefreshFrequency - */ -const de_RefreshFrequency = (output: any, context: __SerdeContext): RefreshFrequency => { - return { - Interval: __expectString(output.Interval), - RefreshOnDay: output.RefreshOnDay != null ? de_ScheduleRefreshOnEntity(output.RefreshOnDay, context) : undefined, - TimeOfTheDay: __expectString(output.TimeOfTheDay), - Timezone: __expectString(output.Timezone), - } as any; -}; +// de_PivotTableDimensionList omitted. + +// de_PivotTableFieldOption omitted. + +// de_PivotTableFieldOptionList omitted. + +// de_PivotTableFieldOptions omitted. + +// de_PivotTableFieldSubtotalOptions omitted. + +// de_PivotTableFieldSubtotalOptionsList omitted. /** - * deserializeAws_restJson1RefreshSchedule + * deserializeAws_restJson1PivotTableFieldWells */ -const de_RefreshSchedule = (output: any, context: __SerdeContext): RefreshSchedule => { - return { - Arn: __expectString(output.Arn), - RefreshType: __expectString(output.RefreshType), - ScheduleFrequency: - output.ScheduleFrequency != null ? de_RefreshFrequency(output.ScheduleFrequency, context) : undefined, - ScheduleId: __expectString(output.ScheduleId), - StartAfterDateTime: - output.StartAfterDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartAfterDateTime))) - : undefined, - } as any; +const de_PivotTableFieldWells = (output: any, context: __SerdeContext): PivotTableFieldWells => { + return take(output, { + PivotTableAggregatedFieldWells: (_: any) => de_PivotTableAggregatedFieldWells(_, context), + }) as any; }; +// de_PivotTableOptions omitted. + +// de_PivotTablePaginatedReportOptions omitted. + /** - * deserializeAws_restJson1RefreshSchedules + * deserializeAws_restJson1PivotTableSortBy */ -const de_RefreshSchedules = (output: any, context: __SerdeContext): RefreshSchedule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RefreshSchedule(entry, context); - }); - return retVal; +const de_PivotTableSortBy = (output: any, context: __SerdeContext): PivotTableSortBy => { + return take(output, { + Column: (_: any) => de_ColumnSort(_, context), + DataPath: _json, + Field: _json, + }) as any; }; /** - * deserializeAws_restJson1RelationalTable + * deserializeAws_restJson1PivotTableSortConfiguration */ -const de_RelationalTable = (output: any, context: __SerdeContext): RelationalTable => { - return { - Catalog: __expectString(output.Catalog), - DataSourceArn: __expectString(output.DataSourceArn), - InputColumns: output.InputColumns != null ? de_InputColumnList(output.InputColumns, context) : undefined, - Name: __expectString(output.Name), - Schema: __expectString(output.Schema), - } as any; +const de_PivotTableSortConfiguration = (output: any, context: __SerdeContext): PivotTableSortConfiguration => { + return take(output, { + FieldSortOptions: (_: any) => de_PivotFieldSortOptionsList(_, context), + }) as any; }; +// de_PivotTableTotalOptions omitted. + /** - * deserializeAws_restJson1RelativeDatesFilter + * deserializeAws_restJson1PivotTableVisual */ -const de_RelativeDatesFilter = (output: any, context: __SerdeContext): RelativeDatesFilter => { - return { - AnchorDateConfiguration: - output.AnchorDateConfiguration != null - ? de_AnchorDateConfiguration(output.AnchorDateConfiguration, context) - : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - ExcludePeriodConfiguration: - output.ExcludePeriodConfiguration != null - ? de_ExcludePeriodConfiguration(output.ExcludePeriodConfiguration, context) - : undefined, - FilterId: __expectString(output.FilterId), - MinimumGranularity: __expectString(output.MinimumGranularity), - NullOption: __expectString(output.NullOption), - ParameterName: __expectString(output.ParameterName), - RelativeDateType: __expectString(output.RelativeDateType), - RelativeDateValue: __expectInt32(output.RelativeDateValue), - TimeGranularity: __expectString(output.TimeGranularity), - } as any; +const de_PivotTableVisual = (output: any, context: __SerdeContext): PivotTableVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_PivotTableConfiguration(_, context), + ConditionalFormatting: (_: any) => de_PivotTableConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_PivotTotalOptions omitted. + +// de_PostgreSqlParameters omitted. + /** - * deserializeAws_restJson1RelativeDateTimeControlDisplayOptions + * deserializeAws_restJson1PredefinedHierarchy */ -const de_RelativeDateTimeControlDisplayOptions = ( - output: any, - context: __SerdeContext -): RelativeDateTimeControlDisplayOptions => { - return { - DateTimeFormat: __expectString(output.DateTimeFormat), - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; +const de_PredefinedHierarchy = (output: any, context: __SerdeContext): PredefinedHierarchy => { + return take(output, { + Columns: _json, + DrillDownFilters: (_: any) => de_DrillDownFilterList(_, context), + HierarchyId: __expectString, + }) as any; }; +// de_PredefinedHierarchyColumnList omitted. + +// de_PrestoParameters omitted. + +// de_PrincipalList omitted. + +// de_ProgressBarOptions omitted. + +// de_ProjectedColumnList omitted. + +// de_ProjectOperation omitted. + +// de_QueueInfo omitted. + /** - * deserializeAws_restJson1RenameColumnOperation + * deserializeAws_restJson1RadarChartAggregatedFieldWells */ -const de_RenameColumnOperation = (output: any, context: __SerdeContext): RenameColumnOperation => { - return { - ColumnName: __expectString(output.ColumnName), - NewColumnName: __expectString(output.NewColumnName), - } as any; +const de_RadarChartAggregatedFieldWells = (output: any, context: __SerdeContext): RadarChartAggregatedFieldWells => { + return take(output, { + Category: _json, + Color: _json, + Values: (_: any) => de_RadarChartValuesFieldList(_, context), + }) as any; }; +// de_RadarChartAreaStyleSettings omitted. + +// de_RadarChartCategoryFieldList omitted. + +// de_RadarChartColorFieldList omitted. + /** - * deserializeAws_restJson1ResourcePermission + * deserializeAws_restJson1RadarChartConfiguration */ -const de_ResourcePermission = (output: any, context: __SerdeContext): ResourcePermission => { - return { - Actions: output.Actions != null ? de_ActionList(output.Actions, context) : undefined, - Principal: __expectString(output.Principal), - } as any; +const de_RadarChartConfiguration = (output: any, context: __SerdeContext): RadarChartConfiguration => { + return take(output, { + AlternateBandColorsVisibility: __expectString, + AlternateBandEvenColor: __expectString, + AlternateBandOddColor: __expectString, + BaseSeriesSettings: _json, + CategoryAxis: (_: any) => de_AxisDisplayOptions(_, context), + CategoryLabelOptions: _json, + ColorAxis: (_: any) => de_AxisDisplayOptions(_, context), + ColorLabelOptions: _json, + FieldWells: (_: any) => de_RadarChartFieldWells(_, context), + Legend: _json, + Shape: __expectString, + SortConfiguration: (_: any) => de_RadarChartSortConfiguration(_, context), + StartAngle: __limitedParseDouble, + VisualPalette: _json, + }) as any; }; /** - * deserializeAws_restJson1ResourcePermissionList + * deserializeAws_restJson1RadarChartFieldWells */ -const de_ResourcePermissionList = (output: any, context: __SerdeContext): ResourcePermission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourcePermission(entry, context); - }); - return retVal; +const de_RadarChartFieldWells = (output: any, context: __SerdeContext): RadarChartFieldWells => { + return take(output, { + RadarChartAggregatedFieldWells: (_: any) => de_RadarChartAggregatedFieldWells(_, context), + }) as any; }; +// de_RadarChartSeriesSettings omitted. + /** - * deserializeAws_restJson1RollingDateConfiguration + * deserializeAws_restJson1RadarChartSortConfiguration */ -const de_RollingDateConfiguration = (output: any, context: __SerdeContext): RollingDateConfiguration => { - return { - DataSetIdentifier: __expectString(output.DataSetIdentifier), - Expression: __expectString(output.Expression), - } as any; +const de_RadarChartSortConfiguration = (output: any, context: __SerdeContext): RadarChartSortConfiguration => { + return take(output, { + CategoryItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + ColorItemsLimit: _json, + ColorSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** - * deserializeAws_restJson1RowAlternateColorList + * deserializeAws_restJson1RadarChartValuesFieldList */ -const de_RowAlternateColorList = (output: any, context: __SerdeContext): string[] => { +const de_RadarChartValuesFieldList = (output: any, context: __SerdeContext): MeasureField[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MeasureField(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1RowAlternateColorOptions + * deserializeAws_restJson1RadarChartVisual */ -const de_RowAlternateColorOptions = (output: any, context: __SerdeContext): RowAlternateColorOptions => { - return { - RowAlternateColors: - output.RowAlternateColors != null ? de_RowAlternateColorList(output.RowAlternateColors, context) : undefined, - Status: __expectString(output.Status), - } as any; +const de_RadarChartVisual = (output: any, context: __SerdeContext): RadarChartVisual => { + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_RadarChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; +// de_RangeEndsLabelType omitted. + +// de_RdsParameters omitted. + +// de_RedshiftParameters omitted. + /** - * deserializeAws_restJson1RowInfo + * deserializeAws_restJson1ReferenceLine */ -const de_RowInfo = (output: any, context: __SerdeContext): RowInfo => { - return { - RowsDropped: __expectLong(output.RowsDropped), - RowsIngested: __expectLong(output.RowsIngested), - TotalRowsInDataset: __expectLong(output.TotalRowsInDataset), - } as any; +const de_ReferenceLine = (output: any, context: __SerdeContext): ReferenceLine => { + return take(output, { + DataConfiguration: (_: any) => de_ReferenceLineDataConfiguration(_, context), + LabelConfiguration: _json, + Status: __expectString, + StyleConfiguration: _json, + }) as any; }; +// de_ReferenceLineCustomLabelConfiguration omitted. + /** - * deserializeAws_restJson1RowLevelPermissionDataSet + * deserializeAws_restJson1ReferenceLineDataConfiguration */ -const de_RowLevelPermissionDataSet = (output: any, context: __SerdeContext): RowLevelPermissionDataSet => { - return { - Arn: __expectString(output.Arn), - FormatVersion: __expectString(output.FormatVersion), - Namespace: __expectString(output.Namespace), - PermissionPolicy: __expectString(output.PermissionPolicy), - Status: __expectString(output.Status), - } as any; +const de_ReferenceLineDataConfiguration = (output: any, context: __SerdeContext): ReferenceLineDataConfiguration => { + return take(output, { + AxisBinding: __expectString, + DynamicConfiguration: (_: any) => de_ReferenceLineDynamicDataConfiguration(_, context), + StaticConfiguration: (_: any) => de_ReferenceLineStaticDataConfiguration(_, context), + }) as any; }; /** - * deserializeAws_restJson1RowLevelPermissionTagConfiguration + * deserializeAws_restJson1ReferenceLineDynamicDataConfiguration */ -const de_RowLevelPermissionTagConfiguration = ( +const de_ReferenceLineDynamicDataConfiguration = ( output: any, context: __SerdeContext -): RowLevelPermissionTagConfiguration => { - return { - Status: __expectString(output.Status), - TagRuleConfigurations: - output.TagRuleConfigurations != null - ? de_RowLevelPermissionTagRuleConfigurationList(output.TagRuleConfigurations, context) - : undefined, - TagRules: output.TagRules != null ? de_RowLevelPermissionTagRuleList(output.TagRules, context) : undefined, - } as any; +): ReferenceLineDynamicDataConfiguration => { + return take(output, { + Calculation: (_: any) => de_NumericalAggregationFunction(_, context), + Column: _json, + MeasureAggregationFunction: (_: any) => de_AggregationFunction(_, context), + }) as any; }; -/** - * deserializeAws_restJson1RowLevelPermissionTagRule - */ -const de_RowLevelPermissionTagRule = (output: any, context: __SerdeContext): RowLevelPermissionTagRule => { - return { - ColumnName: __expectString(output.ColumnName), - MatchAllValue: __expectString(output.MatchAllValue), - TagKey: __expectString(output.TagKey), - TagMultiValueDelimiter: __expectString(output.TagMultiValueDelimiter), - } as any; -}; +// de_ReferenceLineLabelConfiguration omitted. /** - * deserializeAws_restJson1RowLevelPermissionTagRuleConfiguration + * deserializeAws_restJson1ReferenceLineList */ -const de_RowLevelPermissionTagRuleConfiguration = (output: any, context: __SerdeContext): string[] => { +const de_ReferenceLineList = (output: any, context: __SerdeContext): ReferenceLine[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ReferenceLine(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1RowLevelPermissionTagRuleConfigurationList + * deserializeAws_restJson1ReferenceLineStaticDataConfiguration */ -const de_RowLevelPermissionTagRuleConfigurationList = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RowLevelPermissionTagRuleConfiguration(entry, context); - }); - return retVal; +const de_ReferenceLineStaticDataConfiguration = ( + output: any, + context: __SerdeContext +): ReferenceLineStaticDataConfiguration => { + return take(output, { + Value: __limitedParseDouble, + }) as any; +}; + +// de_ReferenceLineStyleConfiguration omitted. + +// de_ReferenceLineValueLabelConfiguration omitted. + +// de_RefreshConfiguration omitted. + +// de_RefreshFrequency omitted. + +/** + * deserializeAws_restJson1RefreshSchedule + */ +const de_RefreshSchedule = (output: any, context: __SerdeContext): RefreshSchedule => { + return take(output, { + Arn: __expectString, + RefreshType: __expectString, + ScheduleFrequency: _json, + ScheduleId: __expectString, + StartAfterDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_restJson1RowLevelPermissionTagRuleList + * deserializeAws_restJson1RefreshSchedules */ -const de_RowLevelPermissionTagRuleList = (output: any, context: __SerdeContext): RowLevelPermissionTagRule[] => { +const de_RefreshSchedules = (output: any, context: __SerdeContext): RefreshSchedule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RowLevelPermissionTagRule(entry, context); + return de_RefreshSchedule(entry, context); }); return retVal; }; +// de_RelationalTable omitted. + +// de_RelativeDatesFilter omitted. + +// de_RelativeDateTimeControlDisplayOptions omitted. + +// de_RenameColumnOperation omitted. + +// de_ResourcePermission omitted. + +// de_ResourcePermissionList omitted. + +// de_RollingDateConfiguration omitted. + +// de_RowAlternateColorList omitted. + +// de_RowAlternateColorOptions omitted. + +// de_RowInfo omitted. + +// de_RowLevelPermissionDataSet omitted. + +// de_RowLevelPermissionTagConfiguration omitted. + +// de_RowLevelPermissionTagRule omitted. + +// de_RowLevelPermissionTagRuleConfiguration omitted. + +// de_RowLevelPermissionTagRuleConfigurationList omitted. + +// de_RowLevelPermissionTagRuleList omitted. + /** * deserializeAws_restJson1RowSortList */ @@ -33088,48 +23276,16 @@ const de_RowSortList = (output: any, context: __SerdeContext): FieldSortOptions[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FieldSortOptions(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3Parameters - */ -const de_S3Parameters = (output: any, context: __SerdeContext): S3Parameters => { - return { - ManifestFileLocation: - output.ManifestFileLocation != null ? de_ManifestFileLocation(output.ManifestFileLocation, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; +// de_S3Parameters omitted. -/** - * deserializeAws_restJson1S3Source - */ -const de_S3Source = (output: any, context: __SerdeContext): S3Source => { - return { - DataSourceArn: __expectString(output.DataSourceArn), - InputColumns: output.InputColumns != null ? de_InputColumnList(output.InputColumns, context) : undefined, - UploadSettings: output.UploadSettings != null ? de_UploadSettings(output.UploadSettings, context) : undefined, - } as any; -}; +// de_S3Source omitted. -/** - * deserializeAws_restJson1SameSheetTargetVisualConfiguration - */ -const de_SameSheetTargetVisualConfiguration = ( - output: any, - context: __SerdeContext -): SameSheetTargetVisualConfiguration => { - return { - TargetVisualOptions: __expectString(output.TargetVisualOptions), - TargetVisuals: output.TargetVisuals != null ? de_TargetVisualList(output.TargetVisuals, context) : undefined, - } as any; -}; +// de_SameSheetTargetVisualConfiguration omitted. /** * deserializeAws_restJson1SankeyDiagramAggregatedFieldWells @@ -33138,68 +23294,55 @@ const de_SankeyDiagramAggregatedFieldWells = ( output: any, context: __SerdeContext ): SankeyDiagramAggregatedFieldWells => { - return { - Destination: output.Destination != null ? de_DimensionFieldList(output.Destination, context) : undefined, - Source: output.Source != null ? de_DimensionFieldList(output.Source, context) : undefined, - Weight: output.Weight != null ? de_MeasureFieldList(output.Weight, context) : undefined, - } as any; + return take(output, { + Destination: _json, + Source: _json, + Weight: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** * deserializeAws_restJson1SankeyDiagramChartConfiguration */ const de_SankeyDiagramChartConfiguration = (output: any, context: __SerdeContext): SankeyDiagramChartConfiguration => { - return { - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_SankeyDiagramFieldWells(output.FieldWells, context) : undefined, - SortConfiguration: - output.SortConfiguration != null - ? de_SankeyDiagramSortConfiguration(output.SortConfiguration, context) - : undefined, - } as any; + return take(output, { + DataLabels: _json, + FieldWells: (_: any) => de_SankeyDiagramFieldWells(_, context), + SortConfiguration: (_: any) => de_SankeyDiagramSortConfiguration(_, context), + }) as any; }; /** * deserializeAws_restJson1SankeyDiagramFieldWells */ const de_SankeyDiagramFieldWells = (output: any, context: __SerdeContext): SankeyDiagramFieldWells => { - return { - SankeyDiagramAggregatedFieldWells: - output.SankeyDiagramAggregatedFieldWells != null - ? de_SankeyDiagramAggregatedFieldWells(output.SankeyDiagramAggregatedFieldWells, context) - : undefined, - } as any; + return take(output, { + SankeyDiagramAggregatedFieldWells: (_: any) => de_SankeyDiagramAggregatedFieldWells(_, context), + }) as any; }; /** * deserializeAws_restJson1SankeyDiagramSortConfiguration */ const de_SankeyDiagramSortConfiguration = (output: any, context: __SerdeContext): SankeyDiagramSortConfiguration => { - return { - DestinationItemsLimit: - output.DestinationItemsLimit != null - ? de_ItemsLimitConfiguration(output.DestinationItemsLimit, context) - : undefined, - SourceItemsLimit: - output.SourceItemsLimit != null ? de_ItemsLimitConfiguration(output.SourceItemsLimit, context) : undefined, - WeightSort: output.WeightSort != null ? de_FieldSortOptionsList(output.WeightSort, context) : undefined, - } as any; + return take(output, { + DestinationItemsLimit: _json, + SourceItemsLimit: _json, + WeightSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** * deserializeAws_restJson1SankeyDiagramVisual */ const de_SankeyDiagramVisual = (output: any, context: __SerdeContext): SankeyDiagramVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null - ? de_SankeyDiagramChartConfiguration(output.ChartConfiguration, context) - : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_SankeyDiagramChartConfiguration(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** @@ -33209,49 +23352,40 @@ const de_ScatterPlotCategoricallyAggregatedFieldWells = ( output: any, context: __SerdeContext ): ScatterPlotCategoricallyAggregatedFieldWells => { - return { - Category: output.Category != null ? de_DimensionFieldList(output.Category, context) : undefined, - Size: output.Size != null ? de_MeasureFieldList(output.Size, context) : undefined, - XAxis: output.XAxis != null ? de_MeasureFieldList(output.XAxis, context) : undefined, - YAxis: output.YAxis != null ? de_MeasureFieldList(output.YAxis, context) : undefined, - } as any; + return take(output, { + Category: _json, + Size: (_: any) => de_MeasureFieldList(_, context), + XAxis: (_: any) => de_MeasureFieldList(_, context), + YAxis: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** * deserializeAws_restJson1ScatterPlotConfiguration */ const de_ScatterPlotConfiguration = (output: any, context: __SerdeContext): ScatterPlotConfiguration => { - return { - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_ScatterPlotFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - XAxisDisplayOptions: - output.XAxisDisplayOptions != null ? de_AxisDisplayOptions(output.XAxisDisplayOptions, context) : undefined, - XAxisLabelOptions: - output.XAxisLabelOptions != null ? de_ChartAxisLabelOptions(output.XAxisLabelOptions, context) : undefined, - YAxisDisplayOptions: - output.YAxisDisplayOptions != null ? de_AxisDisplayOptions(output.YAxisDisplayOptions, context) : undefined, - YAxisLabelOptions: - output.YAxisLabelOptions != null ? de_ChartAxisLabelOptions(output.YAxisLabelOptions, context) : undefined, - } as any; + return take(output, { + DataLabels: _json, + FieldWells: (_: any) => de_ScatterPlotFieldWells(_, context), + Legend: _json, + Tooltip: (_: any) => de_TooltipOptions(_, context), + VisualPalette: _json, + XAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + XAxisLabelOptions: _json, + YAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + YAxisLabelOptions: _json, + }) as any; }; /** * deserializeAws_restJson1ScatterPlotFieldWells */ const de_ScatterPlotFieldWells = (output: any, context: __SerdeContext): ScatterPlotFieldWells => { - return { - ScatterPlotCategoricallyAggregatedFieldWells: - output.ScatterPlotCategoricallyAggregatedFieldWells != null - ? de_ScatterPlotCategoricallyAggregatedFieldWells(output.ScatterPlotCategoricallyAggregatedFieldWells, context) - : undefined, - ScatterPlotUnaggregatedFieldWells: - output.ScatterPlotUnaggregatedFieldWells != null - ? de_ScatterPlotUnaggregatedFieldWells(output.ScatterPlotUnaggregatedFieldWells, context) - : undefined, - } as any; + return take(output, { + ScatterPlotCategoricallyAggregatedFieldWells: (_: any) => + de_ScatterPlotCategoricallyAggregatedFieldWells(_, context), + ScatterPlotUnaggregatedFieldWells: (_: any) => de_ScatterPlotUnaggregatedFieldWells(_, context), + }) as any; }; /** @@ -33261,220 +23395,83 @@ const de_ScatterPlotUnaggregatedFieldWells = ( output: any, context: __SerdeContext ): ScatterPlotUnaggregatedFieldWells => { - return { - Size: output.Size != null ? de_MeasureFieldList(output.Size, context) : undefined, - XAxis: output.XAxis != null ? de_DimensionFieldList(output.XAxis, context) : undefined, - YAxis: output.YAxis != null ? de_DimensionFieldList(output.YAxis, context) : undefined, - } as any; + return take(output, { + Size: (_: any) => de_MeasureFieldList(_, context), + XAxis: _json, + YAxis: _json, + }) as any; }; /** * deserializeAws_restJson1ScatterPlotVisual */ const de_ScatterPlotVisual = (output: any, context: __SerdeContext): ScatterPlotVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_ScatterPlotConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_ScatterPlotConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ScheduleRefreshOnEntity - */ -const de_ScheduleRefreshOnEntity = (output: any, context: __SerdeContext): ScheduleRefreshOnEntity => { - return { - DayOfMonth: __expectString(output.DayOfMonth), - DayOfWeek: __expectString(output.DayOfWeek), - } as any; -}; +// de_ScheduleRefreshOnEntity omitted. /** * deserializeAws_restJson1ScrollBarOptions */ const de_ScrollBarOptions = (output: any, context: __SerdeContext): ScrollBarOptions => { - return { - Visibility: __expectString(output.Visibility), - VisibleRange: output.VisibleRange != null ? de_VisibleRangeOptions(output.VisibleRange, context) : undefined, - } as any; + return take(output, { + Visibility: __expectString, + VisibleRange: (_: any) => de_VisibleRangeOptions(_, context), + }) as any; }; -/** - * deserializeAws_restJson1SecondaryValueOptions - */ -const de_SecondaryValueOptions = (output: any, context: __SerdeContext): SecondaryValueOptions => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_SecondaryValueOptions omitted. -/** - * deserializeAws_restJson1SectionAfterPageBreak - */ -const de_SectionAfterPageBreak = (output: any, context: __SerdeContext): SectionAfterPageBreak => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_SectionAfterPageBreak omitted. -/** - * deserializeAws_restJson1SectionBasedLayoutCanvasSizeOptions - */ -const de_SectionBasedLayoutCanvasSizeOptions = ( - output: any, - context: __SerdeContext -): SectionBasedLayoutCanvasSizeOptions => { - return { - PaperCanvasSizeOptions: - output.PaperCanvasSizeOptions != null - ? de_SectionBasedLayoutPaperCanvasSizeOptions(output.PaperCanvasSizeOptions, context) - : undefined, - } as any; -}; +// de_SectionBasedLayoutCanvasSizeOptions omitted. /** * deserializeAws_restJson1SectionBasedLayoutConfiguration */ const de_SectionBasedLayoutConfiguration = (output: any, context: __SerdeContext): SectionBasedLayoutConfiguration => { - return { - BodySections: - output.BodySections != null ? de_BodySectionConfigurationList(output.BodySections, context) : undefined, - CanvasSizeOptions: - output.CanvasSizeOptions != null - ? de_SectionBasedLayoutCanvasSizeOptions(output.CanvasSizeOptions, context) - : undefined, - FooterSections: - output.FooterSections != null - ? de_HeaderFooterSectionConfigurationList(output.FooterSections, context) - : undefined, - HeaderSections: - output.HeaderSections != null - ? de_HeaderFooterSectionConfigurationList(output.HeaderSections, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1SectionBasedLayoutPaperCanvasSizeOptions - */ -const de_SectionBasedLayoutPaperCanvasSizeOptions = ( - output: any, - context: __SerdeContext -): SectionBasedLayoutPaperCanvasSizeOptions => { - return { - PaperMargin: output.PaperMargin != null ? de_Spacing(output.PaperMargin, context) : undefined, - PaperOrientation: __expectString(output.PaperOrientation), - PaperSize: __expectString(output.PaperSize), - } as any; + return take(output, { + BodySections: _json, + CanvasSizeOptions: _json, + FooterSections: _json, + HeaderSections: _json, + }) as any; }; -/** - * deserializeAws_restJson1SectionLayoutConfiguration - */ -const de_SectionLayoutConfiguration = (output: any, context: __SerdeContext): SectionLayoutConfiguration => { - return { - FreeFormLayout: - output.FreeFormLayout != null ? de_FreeFormSectionLayoutConfiguration(output.FreeFormLayout, context) : undefined, - } as any; -}; +// de_SectionBasedLayoutPaperCanvasSizeOptions omitted. -/** - * deserializeAws_restJson1SectionPageBreakConfiguration - */ -const de_SectionPageBreakConfiguration = (output: any, context: __SerdeContext): SectionPageBreakConfiguration => { - return { - After: output.After != null ? de_SectionAfterPageBreak(output.After, context) : undefined, - } as any; -}; +// de_SectionLayoutConfiguration omitted. -/** - * deserializeAws_restJson1SectionStyle - */ -const de_SectionStyle = (output: any, context: __SerdeContext): SectionStyle => { - return { - Height: __expectString(output.Height), - Padding: output.Padding != null ? de_Spacing(output.Padding, context) : undefined, - } as any; -}; +// de_SectionPageBreakConfiguration omitted. -/** - * deserializeAws_restJson1SelectedFieldList - */ -const de_SelectedFieldList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SectionStyle omitted. -/** - * deserializeAws_restJson1SelectedSheetsFilterScopeConfiguration - */ -const de_SelectedSheetsFilterScopeConfiguration = ( - output: any, - context: __SerdeContext -): SelectedSheetsFilterScopeConfiguration => { - return { - SheetVisualScopingConfigurations: - output.SheetVisualScopingConfigurations != null - ? de_SheetVisualScopingConfigurations(output.SheetVisualScopingConfigurations, context) - : undefined, - } as any; -}; +// de_SelectedFieldList omitted. -/** - * deserializeAws_restJson1SeriesItem - */ -const de_SeriesItem = (output: any, context: __SerdeContext): SeriesItem => { - return { - DataFieldSeriesItem: - output.DataFieldSeriesItem != null ? de_DataFieldSeriesItem(output.DataFieldSeriesItem, context) : undefined, - FieldSeriesItem: output.FieldSeriesItem != null ? de_FieldSeriesItem(output.FieldSeriesItem, context) : undefined, - } as any; -}; +// de_SelectedSheetsFilterScopeConfiguration omitted. -/** - * deserializeAws_restJson1SeriesItemList - */ -const de_SeriesItemList = (output: any, context: __SerdeContext): SeriesItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SeriesItem(entry, context); - }); - return retVal; -}; +// de_SeriesItem omitted. -/** - * deserializeAws_restJson1ServiceNowParameters - */ -const de_ServiceNowParameters = (output: any, context: __SerdeContext): ServiceNowParameters => { - return { - SiteBaseUrl: __expectString(output.SiteBaseUrl), - } as any; -}; +// de_SeriesItemList omitted. + +// de_ServiceNowParameters omitted. /** * deserializeAws_restJson1SetParameterValueConfiguration */ const de_SetParameterValueConfiguration = (output: any, context: __SerdeContext): SetParameterValueConfiguration => { - return { - DestinationParameterName: __expectString(output.DestinationParameterName), - Value: output.Value != null ? de_DestinationParameterValueConfiguration(output.Value, context) : undefined, - } as any; + return take(output, { + DestinationParameterName: __expectString, + Value: (_: any) => de_DestinationParameterValueConfiguration(_, context), + }) as any; }; /** @@ -33487,9 +23484,6 @@ const de_SetParameterValueConfigurationList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SetParameterValueConfiguration(entry, context); }); return retVal; @@ -33499,84 +23493,38 @@ const de_SetParameterValueConfigurationList = ( * deserializeAws_restJson1ShapeConditionalFormat */ const de_ShapeConditionalFormat = (output: any, context: __SerdeContext): ShapeConditionalFormat => { - return { - BackgroundColor: - output.BackgroundColor != null ? de_ConditionalFormattingColor(output.BackgroundColor, context) : undefined, - } as any; + return take(output, { + BackgroundColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; -/** - * deserializeAws_restJson1Sheet - */ -const de_Sheet = (output: any, context: __SerdeContext): Sheet => { - return { - Name: __expectString(output.Name), - SheetId: __expectString(output.SheetId), - } as any; -}; +// de_Sheet omitted. -/** - * deserializeAws_restJson1SheetControlLayout - */ -const de_SheetControlLayout = (output: any, context: __SerdeContext): SheetControlLayout => { - return { - Configuration: - output.Configuration != null ? de_SheetControlLayoutConfiguration(output.Configuration, context) : undefined, - } as any; -}; +// de_SheetControlLayout omitted. -/** - * deserializeAws_restJson1SheetControlLayoutConfiguration - */ -const de_SheetControlLayoutConfiguration = (output: any, context: __SerdeContext): SheetControlLayoutConfiguration => { - return { - GridLayout: output.GridLayout != null ? de_GridLayoutConfiguration(output.GridLayout, context) : undefined, - } as any; -}; +// de_SheetControlLayoutConfiguration omitted. -/** - * deserializeAws_restJson1SheetControlLayoutList - */ -const de_SheetControlLayoutList = (output: any, context: __SerdeContext): SheetControlLayout[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SheetControlLayout(entry, context); - }); - return retVal; -}; +// de_SheetControlLayoutList omitted. -/** - * deserializeAws_restJson1SheetControlsOption - */ -const de_SheetControlsOption = (output: any, context: __SerdeContext): SheetControlsOption => { - return { - VisibilityState: __expectString(output.VisibilityState), - } as any; -}; +// de_SheetControlsOption omitted. /** * deserializeAws_restJson1SheetDefinition */ const de_SheetDefinition = (output: any, context: __SerdeContext): SheetDefinition => { - return { - ContentType: __expectString(output.ContentType), - Description: __expectString(output.Description), - FilterControls: output.FilterControls != null ? de_FilterControlList(output.FilterControls, context) : undefined, - Layouts: output.Layouts != null ? de_LayoutList(output.Layouts, context) : undefined, - Name: __expectString(output.Name), - ParameterControls: - output.ParameterControls != null ? de_ParameterControlList(output.ParameterControls, context) : undefined, - SheetControlLayouts: - output.SheetControlLayouts != null ? de_SheetControlLayoutList(output.SheetControlLayouts, context) : undefined, - SheetId: __expectString(output.SheetId), - TextBoxes: output.TextBoxes != null ? de_SheetTextBoxList(output.TextBoxes, context) : undefined, - Title: __expectString(output.Title), - Visuals: output.Visuals != null ? de_VisualList(output.Visuals, context) : undefined, - } as any; + return take(output, { + ContentType: __expectString, + Description: __expectString, + FilterControls: (_: any) => de_FilterControlList(_, context), + Layouts: (_: any) => de_LayoutList(_, context), + Name: __expectString, + ParameterControls: (_: any) => de_ParameterControlList(_, context), + SheetControlLayouts: _json, + SheetId: __expectString, + TextBoxes: _json, + Title: __expectString, + Visuals: (_: any) => de_VisualList(_, context), + }) as any; }; /** @@ -33586,421 +23534,98 @@ const de_SheetDefinitionList = (output: any, context: __SerdeContext): SheetDefi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SheetDefinition(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SheetElementConfigurationOverrides - */ -const de_SheetElementConfigurationOverrides = ( - output: any, - context: __SerdeContext -): SheetElementConfigurationOverrides => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_SheetElementConfigurationOverrides omitted. -/** - * deserializeAws_restJson1SheetElementRenderingRule - */ -const de_SheetElementRenderingRule = (output: any, context: __SerdeContext): SheetElementRenderingRule => { - return { - ConfigurationOverrides: - output.ConfigurationOverrides != null - ? de_SheetElementConfigurationOverrides(output.ConfigurationOverrides, context) - : undefined, - Expression: __expectString(output.Expression), - } as any; -}; +// de_SheetElementRenderingRule omitted. -/** - * deserializeAws_restJson1SheetElementRenderingRuleList - */ -const de_SheetElementRenderingRuleList = (output: any, context: __SerdeContext): SheetElementRenderingRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SheetElementRenderingRule(entry, context); - }); - return retVal; -}; +// de_SheetElementRenderingRuleList omitted. -/** - * deserializeAws_restJson1SheetLayoutElementMaximizationOption - */ -const de_SheetLayoutElementMaximizationOption = ( - output: any, - context: __SerdeContext -): SheetLayoutElementMaximizationOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; +// de_SheetLayoutElementMaximizationOption omitted. -/** - * deserializeAws_restJson1SheetList - */ -const de_SheetList = (output: any, context: __SerdeContext): Sheet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Sheet(entry, context); - }); - return retVal; -}; +// de_SheetList omitted. -/** - * deserializeAws_restJson1SheetStyle - */ -const de_SheetStyle = (output: any, context: __SerdeContext): SheetStyle => { - return { - Tile: output.Tile != null ? de_TileStyle(output.Tile, context) : undefined, - TileLayout: output.TileLayout != null ? de_TileLayoutStyle(output.TileLayout, context) : undefined, - } as any; -}; +// de_SheetStyle omitted. -/** - * deserializeAws_restJson1SheetTextBox - */ -const de_SheetTextBox = (output: any, context: __SerdeContext): SheetTextBox => { - return { - Content: __expectString(output.Content), - SheetTextBoxId: __expectString(output.SheetTextBoxId), - } as any; -}; +// de_SheetTextBox omitted. -/** - * deserializeAws_restJson1SheetTextBoxList - */ -const de_SheetTextBoxList = (output: any, context: __SerdeContext): SheetTextBox[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SheetTextBox(entry, context); - }); - return retVal; -}; +// de_SheetTextBoxList omitted. -/** - * deserializeAws_restJson1SheetVisualScopingConfiguration - */ -const de_SheetVisualScopingConfiguration = (output: any, context: __SerdeContext): SheetVisualScopingConfiguration => { - return { - Scope: __expectString(output.Scope), - SheetId: __expectString(output.SheetId), - VisualIds: output.VisualIds != null ? de_FilteredVisualsList(output.VisualIds, context) : undefined, - } as any; -}; +// de_SheetVisualScopingConfiguration omitted. -/** - * deserializeAws_restJson1SheetVisualScopingConfigurations - */ -const de_SheetVisualScopingConfigurations = ( - output: any, - context: __SerdeContext -): SheetVisualScopingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SheetVisualScopingConfiguration(entry, context); - }); - return retVal; -}; +// de_SheetVisualScopingConfigurations omitted. -/** - * deserializeAws_restJson1ShortFormatText - */ -const de_ShortFormatText = (output: any, context: __SerdeContext): ShortFormatText => { - return { - PlainText: __expectString(output.PlainText), - RichText: __expectString(output.RichText), - } as any; -}; +// de_ShortFormatText omitted. -/** - * deserializeAws_restJson1SignupResponse - */ -const de_SignupResponse = (output: any, context: __SerdeContext): SignupResponse => { - return { - IAMUser: __expectBoolean(output.IAMUser), - accountName: __expectString(output.accountName), - directoryType: __expectString(output.directoryType), - userLoginName: __expectString(output.userLoginName), - } as any; -}; +// de_SignupResponse omitted. -/** - * deserializeAws_restJson1SimpleClusterMarker - */ -const de_SimpleClusterMarker = (output: any, context: __SerdeContext): SimpleClusterMarker => { - return { - Color: __expectString(output.Color), - } as any; -}; +// de_SimpleClusterMarker omitted. -/** - * deserializeAws_restJson1SliderControlDisplayOptions - */ -const de_SliderControlDisplayOptions = (output: any, context: __SerdeContext): SliderControlDisplayOptions => { - return { - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; -}; +// de_SliderControlDisplayOptions omitted. -/** - * deserializeAws_restJson1SmallMultiplesDimensionFieldList - */ -const de_SmallMultiplesDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; -}; +// de_SmallMultiplesDimensionFieldList omitted. -/** - * deserializeAws_restJson1SmallMultiplesOptions - */ -const de_SmallMultiplesOptions = (output: any, context: __SerdeContext): SmallMultiplesOptions => { - return { - MaxVisibleColumns: __expectLong(output.MaxVisibleColumns), - MaxVisibleRows: __expectLong(output.MaxVisibleRows), - PanelConfiguration: - output.PanelConfiguration != null ? de_PanelConfiguration(output.PanelConfiguration, context) : undefined, - } as any; -}; +// de_SmallMultiplesOptions omitted. -/** - * deserializeAws_restJson1SnowflakeParameters - */ -const de_SnowflakeParameters = (output: any, context: __SerdeContext): SnowflakeParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Warehouse: __expectString(output.Warehouse), - } as any; -}; +// de_SnowflakeParameters omitted. -/** - * deserializeAws_restJson1Spacing - */ -const de_Spacing = (output: any, context: __SerdeContext): Spacing => { - return { - Bottom: __expectString(output.Bottom), - Left: __expectString(output.Left), - Right: __expectString(output.Right), - Top: __expectString(output.Top), - } as any; -}; +// de_Spacing omitted. -/** - * deserializeAws_restJson1SparkParameters - */ -const de_SparkParameters = (output: any, context: __SerdeContext): SparkParameters => { - return { - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; +// de_SparkParameters omitted. -/** - * deserializeAws_restJson1SqlServerParameters - */ -const de_SqlServerParameters = (output: any, context: __SerdeContext): SqlServerParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; +// de_SqlServerParameters omitted. -/** - * deserializeAws_restJson1SslProperties - */ -const de_SslProperties = (output: any, context: __SerdeContext): SslProperties => { - return { - DisableSsl: __expectBoolean(output.DisableSsl), - } as any; -}; +// de_SslProperties omitted. -/** - * deserializeAws_restJson1StringDefaultValueList - */ -const de_StringDefaultValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringDefaultValueList omitted. -/** - * deserializeAws_restJson1StringDefaultValues - */ -const de_StringDefaultValues = (output: any, context: __SerdeContext): StringDefaultValues => { - return { - DynamicValue: output.DynamicValue != null ? de_DynamicDefaultValue(output.DynamicValue, context) : undefined, - StaticValues: output.StaticValues != null ? de_StringDefaultValueList(output.StaticValues, context) : undefined, - } as any; -}; +// de_StringDefaultValues omitted. -/** - * deserializeAws_restJson1StringFormatConfiguration - */ -const de_StringFormatConfiguration = (output: any, context: __SerdeContext): StringFormatConfiguration => { - return { - NullValueFormatConfiguration: - output.NullValueFormatConfiguration != null - ? de_NullValueFormatConfiguration(output.NullValueFormatConfiguration, context) - : undefined, - NumericFormatConfiguration: - output.NumericFormatConfiguration != null - ? de_NumericFormatConfiguration(output.NumericFormatConfiguration, context) - : undefined, - } as any; -}; +// de_StringFormatConfiguration omitted. -/** - * deserializeAws_restJson1StringParameterDeclaration - */ -const de_StringParameterDeclaration = (output: any, context: __SerdeContext): StringParameterDeclaration => { - return { - DefaultValues: output.DefaultValues != null ? de_StringDefaultValues(output.DefaultValues, context) : undefined, - Name: __expectString(output.Name), - ParameterValueType: __expectString(output.ParameterValueType), - ValueWhenUnset: - output.ValueWhenUnset != null ? de_StringValueWhenUnsetConfiguration(output.ValueWhenUnset, context) : undefined, - } as any; -}; +// de_StringParameterDeclaration omitted. -/** - * deserializeAws_restJson1StringValueWhenUnsetConfiguration - */ -const de_StringValueWhenUnsetConfiguration = ( - output: any, - context: __SerdeContext -): StringValueWhenUnsetConfiguration => { - return { - CustomValue: __expectString(output.CustomValue), - ValueWhenUnsetOption: __expectString(output.ValueWhenUnsetOption), - } as any; -}; +// de_StringValueWhenUnsetConfiguration omitted. -/** - * deserializeAws_restJson1SubtotalOptions - */ -const de_SubtotalOptions = (output: any, context: __SerdeContext): SubtotalOptions => { - return { - CustomLabel: __expectString(output.CustomLabel), - FieldLevel: __expectString(output.FieldLevel), - FieldLevelOptions: - output.FieldLevelOptions != null - ? de_PivotTableFieldSubtotalOptionsList(output.FieldLevelOptions, context) - : undefined, - MetricHeaderCellStyle: - output.MetricHeaderCellStyle != null ? de_TableCellStyle(output.MetricHeaderCellStyle, context) : undefined, - TotalCellStyle: output.TotalCellStyle != null ? de_TableCellStyle(output.TotalCellStyle, context) : undefined, - TotalsVisibility: __expectString(output.TotalsVisibility), - ValueCellStyle: output.ValueCellStyle != null ? de_TableCellStyle(output.ValueCellStyle, context) : undefined, - } as any; -}; +// de_SubtotalOptions omitted. /** * deserializeAws_restJson1TableAggregatedFieldWells */ const de_TableAggregatedFieldWells = (output: any, context: __SerdeContext): TableAggregatedFieldWells => { - return { - GroupBy: output.GroupBy != null ? de_DimensionFieldList(output.GroupBy, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1TableBorderOptions - */ -const de_TableBorderOptions = (output: any, context: __SerdeContext): TableBorderOptions => { - return { - Color: __expectString(output.Color), - Style: __expectString(output.Style), - Thickness: __expectInt32(output.Thickness), - } as any; + return take(output, { + GroupBy: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; +// de_TableBorderOptions omitted. + /** * deserializeAws_restJson1TableCellConditionalFormatting */ const de_TableCellConditionalFormatting = (output: any, context: __SerdeContext): TableCellConditionalFormatting => { - return { - FieldId: __expectString(output.FieldId), - TextFormat: output.TextFormat != null ? de_TextConditionalFormat(output.TextFormat, context) : undefined, - } as any; + return take(output, { + FieldId: __expectString, + TextFormat: (_: any) => de_TextConditionalFormat(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TableCellImageSizingConfiguration - */ -const de_TableCellImageSizingConfiguration = ( - output: any, - context: __SerdeContext -): TableCellImageSizingConfiguration => { - return { - TableCellImageScalingConfiguration: __expectString(output.TableCellImageScalingConfiguration), - } as any; -}; +// de_TableCellImageSizingConfiguration omitted. -/** - * deserializeAws_restJson1TableCellStyle - */ -const de_TableCellStyle = (output: any, context: __SerdeContext): TableCellStyle => { - return { - BackgroundColor: __expectString(output.BackgroundColor), - Border: output.Border != null ? de_GlobalTableBorderOptions(output.Border, context) : undefined, - FontConfiguration: - output.FontConfiguration != null ? de_FontConfiguration(output.FontConfiguration, context) : undefined, - Height: __expectInt32(output.Height), - HorizontalTextAlignment: __expectString(output.HorizontalTextAlignment), - TextWrap: __expectString(output.TextWrap), - VerticalTextAlignment: __expectString(output.VerticalTextAlignment), - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_TableCellStyle omitted. /** * deserializeAws_restJson1TableConditionalFormatting */ const de_TableConditionalFormatting = (output: any, context: __SerdeContext): TableConditionalFormatting => { - return { - ConditionalFormattingOptions: - output.ConditionalFormattingOptions != null - ? de_TableConditionalFormattingOptionList(output.ConditionalFormattingOptions, context) - : undefined, - } as any; + return take(output, { + ConditionalFormattingOptions: (_: any) => de_TableConditionalFormattingOptionList(_, context), + }) as any; }; /** @@ -34010,10 +23635,10 @@ const de_TableConditionalFormattingOption = ( output: any, context: __SerdeContext ): TableConditionalFormattingOption => { - return { - Cell: output.Cell != null ? de_TableCellConditionalFormatting(output.Cell, context) : undefined, - Row: output.Row != null ? de_TableRowConditionalFormatting(output.Row, context) : undefined, - } as any; + return take(output, { + Cell: (_: any) => de_TableCellConditionalFormatting(_, context), + Row: (_: any) => de_TableRowConditionalFormatting(_, context), + }) as any; }; /** @@ -34026,9 +23651,6 @@ const de_TableConditionalFormattingOptionList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TableConditionalFormattingOption(entry, context); }); return retVal; @@ -34038,403 +23660,133 @@ const de_TableConditionalFormattingOptionList = ( * deserializeAws_restJson1TableConfiguration */ const de_TableConfiguration = (output: any, context: __SerdeContext): TableConfiguration => { - return { - FieldOptions: output.FieldOptions != null ? de_TableFieldOptions(output.FieldOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_TableFieldWells(output.FieldWells, context) : undefined, - PaginatedReportOptions: - output.PaginatedReportOptions != null - ? de_TablePaginatedReportOptions(output.PaginatedReportOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_TableSortConfiguration(output.SortConfiguration, context) : undefined, - TableInlineVisualizations: - output.TableInlineVisualizations != null - ? de_TableInlineVisualizationList(output.TableInlineVisualizations, context) - : undefined, - TableOptions: output.TableOptions != null ? de_TableOptions(output.TableOptions, context) : undefined, - TotalOptions: output.TotalOptions != null ? de_TotalOptions(output.TotalOptions, context) : undefined, - } as any; + return take(output, { + FieldOptions: _json, + FieldWells: (_: any) => de_TableFieldWells(_, context), + PaginatedReportOptions: _json, + SortConfiguration: (_: any) => de_TableSortConfiguration(_, context), + TableInlineVisualizations: _json, + TableOptions: _json, + TotalOptions: _json, + }) as any; }; -/** - * deserializeAws_restJson1TableFieldCustomIconContent - */ -const de_TableFieldCustomIconContent = (output: any, context: __SerdeContext): TableFieldCustomIconContent => { - return { - Icon: __expectString(output.Icon), - } as any; -}; +// de_TableFieldCustomIconContent omitted. -/** - * deserializeAws_restJson1TableFieldCustomTextContent - */ -const de_TableFieldCustomTextContent = (output: any, context: __SerdeContext): TableFieldCustomTextContent => { - return { - FontConfiguration: - output.FontConfiguration != null ? de_FontConfiguration(output.FontConfiguration, context) : undefined, - Value: __expectString(output.Value), - } as any; -}; +// de_TableFieldCustomTextContent omitted. -/** - * deserializeAws_restJson1TableFieldImageConfiguration - */ -const de_TableFieldImageConfiguration = (output: any, context: __SerdeContext): TableFieldImageConfiguration => { - return { - SizingOptions: - output.SizingOptions != null ? de_TableCellImageSizingConfiguration(output.SizingOptions, context) : undefined, - } as any; -}; +// de_TableFieldImageConfiguration omitted. -/** - * deserializeAws_restJson1TableFieldLinkConfiguration - */ -const de_TableFieldLinkConfiguration = (output: any, context: __SerdeContext): TableFieldLinkConfiguration => { - return { - Content: output.Content != null ? de_TableFieldLinkContentConfiguration(output.Content, context) : undefined, - Target: __expectString(output.Target), - } as any; -}; +// de_TableFieldLinkConfiguration omitted. -/** - * deserializeAws_restJson1TableFieldLinkContentConfiguration - */ -const de_TableFieldLinkContentConfiguration = ( - output: any, - context: __SerdeContext -): TableFieldLinkContentConfiguration => { - return { - CustomIconContent: - output.CustomIconContent != null ? de_TableFieldCustomIconContent(output.CustomIconContent, context) : undefined, - CustomTextContent: - output.CustomTextContent != null ? de_TableFieldCustomTextContent(output.CustomTextContent, context) : undefined, - } as any; -}; +// de_TableFieldLinkContentConfiguration omitted. -/** - * deserializeAws_restJson1TableFieldOption - */ -const de_TableFieldOption = (output: any, context: __SerdeContext): TableFieldOption => { - return { - CustomLabel: __expectString(output.CustomLabel), - FieldId: __expectString(output.FieldId), - URLStyling: output.URLStyling != null ? de_TableFieldURLConfiguration(output.URLStyling, context) : undefined, - Visibility: __expectString(output.Visibility), - Width: __expectString(output.Width), - } as any; -}; +// de_TableFieldOption omitted. -/** - * deserializeAws_restJson1TableFieldOptionList - */ -const de_TableFieldOptionList = (output: any, context: __SerdeContext): TableFieldOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableFieldOption(entry, context); - }); - return retVal; -}; +// de_TableFieldOptionList omitted. -/** - * deserializeAws_restJson1TableFieldOptions - */ -const de_TableFieldOptions = (output: any, context: __SerdeContext): TableFieldOptions => { - return { - Order: output.Order != null ? de_FieldOrderList(output.Order, context) : undefined, - SelectedFieldOptions: - output.SelectedFieldOptions != null ? de_TableFieldOptionList(output.SelectedFieldOptions, context) : undefined, - } as any; -}; +// de_TableFieldOptions omitted. -/** - * deserializeAws_restJson1TableFieldURLConfiguration - */ -const de_TableFieldURLConfiguration = (output: any, context: __SerdeContext): TableFieldURLConfiguration => { - return { - ImageConfiguration: - output.ImageConfiguration != null - ? de_TableFieldImageConfiguration(output.ImageConfiguration, context) - : undefined, - LinkConfiguration: - output.LinkConfiguration != null ? de_TableFieldLinkConfiguration(output.LinkConfiguration, context) : undefined, - } as any; -}; +// de_TableFieldURLConfiguration omitted. /** * deserializeAws_restJson1TableFieldWells */ const de_TableFieldWells = (output: any, context: __SerdeContext): TableFieldWells => { - return { - TableAggregatedFieldWells: - output.TableAggregatedFieldWells != null - ? de_TableAggregatedFieldWells(output.TableAggregatedFieldWells, context) - : undefined, - TableUnaggregatedFieldWells: - output.TableUnaggregatedFieldWells != null - ? de_TableUnaggregatedFieldWells(output.TableUnaggregatedFieldWells, context) - : undefined, - } as any; + return take(output, { + TableAggregatedFieldWells: (_: any) => de_TableAggregatedFieldWells(_, context), + TableUnaggregatedFieldWells: _json, + }) as any; }; -/** - * deserializeAws_restJson1TableInlineVisualization - */ -const de_TableInlineVisualization = (output: any, context: __SerdeContext): TableInlineVisualization => { - return { - DataBars: output.DataBars != null ? de_DataBarsOptions(output.DataBars, context) : undefined, - } as any; -}; +// de_TableInlineVisualization omitted. -/** - * deserializeAws_restJson1TableInlineVisualizationList - */ -const de_TableInlineVisualizationList = (output: any, context: __SerdeContext): TableInlineVisualization[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableInlineVisualization(entry, context); - }); - return retVal; -}; +// de_TableInlineVisualizationList omitted. -/** - * deserializeAws_restJson1TableOptions - */ -const de_TableOptions = (output: any, context: __SerdeContext): TableOptions => { - return { - CellStyle: output.CellStyle != null ? de_TableCellStyle(output.CellStyle, context) : undefined, - HeaderStyle: output.HeaderStyle != null ? de_TableCellStyle(output.HeaderStyle, context) : undefined, - Orientation: __expectString(output.Orientation), - RowAlternateColorOptions: - output.RowAlternateColorOptions != null - ? de_RowAlternateColorOptions(output.RowAlternateColorOptions, context) - : undefined, - } as any; -}; +// de_TableOptions omitted. -/** - * deserializeAws_restJson1TablePaginatedReportOptions - */ -const de_TablePaginatedReportOptions = (output: any, context: __SerdeContext): TablePaginatedReportOptions => { - return { - OverflowColumnHeaderVisibility: __expectString(output.OverflowColumnHeaderVisibility), - VerticalOverflowVisibility: __expectString(output.VerticalOverflowVisibility), - } as any; -}; +// de_TablePaginatedReportOptions omitted. /** * deserializeAws_restJson1TableRowConditionalFormatting */ const de_TableRowConditionalFormatting = (output: any, context: __SerdeContext): TableRowConditionalFormatting => { - return { - BackgroundColor: - output.BackgroundColor != null ? de_ConditionalFormattingColor(output.BackgroundColor, context) : undefined, - TextColor: output.TextColor != null ? de_ConditionalFormattingColor(output.TextColor, context) : undefined, - } as any; + return take(output, { + BackgroundColor: (_: any) => de_ConditionalFormattingColor(_, context), + TextColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TableSideBorderOptions - */ -const de_TableSideBorderOptions = (output: any, context: __SerdeContext): TableSideBorderOptions => { - return { - Bottom: output.Bottom != null ? de_TableBorderOptions(output.Bottom, context) : undefined, - InnerHorizontal: - output.InnerHorizontal != null ? de_TableBorderOptions(output.InnerHorizontal, context) : undefined, - InnerVertical: output.InnerVertical != null ? de_TableBorderOptions(output.InnerVertical, context) : undefined, - Left: output.Left != null ? de_TableBorderOptions(output.Left, context) : undefined, - Right: output.Right != null ? de_TableBorderOptions(output.Right, context) : undefined, - Top: output.Top != null ? de_TableBorderOptions(output.Top, context) : undefined, - } as any; -}; +// de_TableSideBorderOptions omitted. /** * deserializeAws_restJson1TableSortConfiguration */ const de_TableSortConfiguration = (output: any, context: __SerdeContext): TableSortConfiguration => { - return { - PaginationConfiguration: - output.PaginationConfiguration != null - ? de_PaginationConfiguration(output.PaginationConfiguration, context) - : undefined, - RowSort: output.RowSort != null ? de_RowSortList(output.RowSort, context) : undefined, - } as any; + return take(output, { + PaginationConfiguration: _json, + RowSort: (_: any) => de_RowSortList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TableUnaggregatedFieldWells - */ -const de_TableUnaggregatedFieldWells = (output: any, context: __SerdeContext): TableUnaggregatedFieldWells => { - return { - Values: output.Values != null ? de_UnaggregatedFieldList(output.Values, context) : undefined, - } as any; -}; +// de_TableUnaggregatedFieldWells omitted. /** * deserializeAws_restJson1TableVisual */ const de_TableVisual = (output: any, context: __SerdeContext): TableVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_TableConfiguration(output.ChartConfiguration, context) : undefined, - ConditionalFormatting: - output.ConditionalFormatting != null - ? de_TableConditionalFormatting(output.ConditionalFormatting, context) - : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_TableConfiguration(_, context), + ConditionalFormatting: (_: any) => de_TableConditionalFormatting(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagColumnOperation - */ -const de_TagColumnOperation = (output: any, context: __SerdeContext): TagColumnOperation => { - return { - ColumnName: __expectString(output.ColumnName), - Tags: output.Tags != null ? de_ColumnTagList(output.Tags, context) : undefined, - } as any; -}; +// de_TagColumnOperation omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TargetVisualList - */ -const de_TargetVisualList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetVisualList omitted. /** * deserializeAws_restJson1Template */ const de_Template = (output: any, context: __SerdeContext): Template => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - TemplateId: __expectString(output.TemplateId), - Version: output.Version != null ? de_TemplateVersion(output.Version, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + TemplateId: __expectString, + Version: (_: any) => de_TemplateVersion(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TemplateAlias - */ -const de_TemplateAlias = (output: any, context: __SerdeContext): TemplateAlias => { - return { - AliasName: __expectString(output.AliasName), - Arn: __expectString(output.Arn), - TemplateVersionNumber: __expectLong(output.TemplateVersionNumber), - } as any; -}; +// de_TemplateAlias omitted. -/** - * deserializeAws_restJson1TemplateAliasList - */ -const de_TemplateAliasList = (output: any, context: __SerdeContext): TemplateAlias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateAlias(entry, context); - }); - return retVal; -}; +// de_TemplateAliasList omitted. -/** - * deserializeAws_restJson1TemplateError - */ -const de_TemplateError = (output: any, context: __SerdeContext): TemplateError => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - ViolatedEntities: output.ViolatedEntities != null ? de_EntityList(output.ViolatedEntities, context) : undefined, - } as any; -}; +// de_TemplateError omitted. -/** - * deserializeAws_restJson1TemplateErrorList - */ -const de_TemplateErrorList = (output: any, context: __SerdeContext): TemplateError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TemplateError(entry, context); - }); - return retVal; -}; +// de_TemplateErrorList omitted. /** * deserializeAws_restJson1TemplateSummary */ const de_TemplateSummary = (output: any, context: __SerdeContext): TemplateSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - LatestVersionNumber: __expectLong(output.LatestVersionNumber), - Name: __expectString(output.Name), - TemplateId: __expectString(output.TemplateId), - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestVersionNumber: __expectLong, + Name: __expectString, + TemplateId: __expectString, + }) as any; }; /** @@ -34444,9 +23796,6 @@ const de_TemplateSummaryList = (output: any, context: __SerdeContext): TemplateS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TemplateSummary(entry, context); }); return retVal; @@ -34456,65 +23805,45 @@ const de_TemplateSummaryList = (output: any, context: __SerdeContext): TemplateS * deserializeAws_restJson1TemplateVersion */ const de_TemplateVersion = (output: any, context: __SerdeContext): TemplateVersion => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DataSetConfigurations: - output.DataSetConfigurations != null - ? de_DataSetConfigurationList(output.DataSetConfigurations, context) - : undefined, - Description: __expectString(output.Description), - Errors: output.Errors != null ? de_TemplateErrorList(output.Errors, context) : undefined, - Sheets: output.Sheets != null ? de_SheetList(output.Sheets, context) : undefined, - SourceEntityArn: __expectString(output.SourceEntityArn), - Status: __expectString(output.Status), - ThemeArn: __expectString(output.ThemeArn), - VersionNumber: __expectLong(output.VersionNumber), - } as any; + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSetConfigurations: _json, + Description: __expectString, + Errors: _json, + Sheets: _json, + SourceEntityArn: __expectString, + Status: __expectString, + ThemeArn: __expectString, + VersionNumber: __expectLong, + }) as any; }; /** * deserializeAws_restJson1TemplateVersionDefinition */ const de_TemplateVersionDefinition = (output: any, context: __SerdeContext): TemplateVersionDefinition => { - return { - AnalysisDefaults: - output.AnalysisDefaults != null ? de_AnalysisDefaults(output.AnalysisDefaults, context) : undefined, - CalculatedFields: - output.CalculatedFields != null ? de_CalculatedFields(output.CalculatedFields, context) : undefined, - ColumnConfigurations: - output.ColumnConfigurations != null - ? de_ColumnConfigurationList(output.ColumnConfigurations, context) - : undefined, - DataSetConfigurations: - output.DataSetConfigurations != null - ? de_DataSetConfigurationList(output.DataSetConfigurations, context) - : undefined, - FilterGroups: output.FilterGroups != null ? de_FilterGroupList(output.FilterGroups, context) : undefined, - ParameterDeclarations: - output.ParameterDeclarations != null - ? de_ParameterDeclarationList(output.ParameterDeclarations, context) - : undefined, - Sheets: output.Sheets != null ? de_SheetDefinitionList(output.Sheets, context) : undefined, - } as any; + return take(output, { + AnalysisDefaults: _json, + CalculatedFields: _json, + ColumnConfigurations: _json, + DataSetConfigurations: _json, + FilterGroups: (_: any) => de_FilterGroupList(_, context), + ParameterDeclarations: (_: any) => de_ParameterDeclarationList(_, context), + Sheets: (_: any) => de_SheetDefinitionList(_, context), + }) as any; }; /** * deserializeAws_restJson1TemplateVersionSummary */ const de_TemplateVersionSummary = (output: any, context: __SerdeContext): TemplateVersionSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Status: __expectString, + VersionNumber: __expectLong, + }) as any; }; /** @@ -34524,175 +23853,67 @@ const de_TemplateVersionSummaryList = (output: any, context: __SerdeContext): Te const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TemplateVersionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TeradataParameters - */ -const de_TeradataParameters = (output: any, context: __SerdeContext): TeradataParameters => { - return { - Database: __expectString(output.Database), - Host: __expectString(output.Host), - Port: __expectInt32(output.Port), - } as any; -}; +// de_TeradataParameters omitted. -/** - * deserializeAws_restJson1TextAreaControlDisplayOptions - */ -const de_TextAreaControlDisplayOptions = (output: any, context: __SerdeContext): TextAreaControlDisplayOptions => { - return { - PlaceholderOptions: - output.PlaceholderOptions != null - ? de_TextControlPlaceholderOptions(output.PlaceholderOptions, context) - : undefined, - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; -}; +// de_TextAreaControlDisplayOptions omitted. /** * deserializeAws_restJson1TextConditionalFormat */ const de_TextConditionalFormat = (output: any, context: __SerdeContext): TextConditionalFormat => { - return { - BackgroundColor: - output.BackgroundColor != null ? de_ConditionalFormattingColor(output.BackgroundColor, context) : undefined, - Icon: output.Icon != null ? de_ConditionalFormattingIcon(output.Icon, context) : undefined, - TextColor: output.TextColor != null ? de_ConditionalFormattingColor(output.TextColor, context) : undefined, - } as any; + return take(output, { + BackgroundColor: (_: any) => de_ConditionalFormattingColor(_, context), + Icon: _json, + TextColor: (_: any) => de_ConditionalFormattingColor(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TextControlPlaceholderOptions - */ -const de_TextControlPlaceholderOptions = (output: any, context: __SerdeContext): TextControlPlaceholderOptions => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_TextControlPlaceholderOptions omitted. -/** - * deserializeAws_restJson1TextFieldControlDisplayOptions - */ -const de_TextFieldControlDisplayOptions = (output: any, context: __SerdeContext): TextFieldControlDisplayOptions => { - return { - PlaceholderOptions: - output.PlaceholderOptions != null - ? de_TextControlPlaceholderOptions(output.PlaceholderOptions, context) - : undefined, - TitleOptions: output.TitleOptions != null ? de_LabelOptions(output.TitleOptions, context) : undefined, - } as any; -}; +// de_TextFieldControlDisplayOptions omitted. /** * deserializeAws_restJson1Theme */ const de_Theme = (output: any, context: __SerdeContext): Theme => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - ThemeId: __expectString(output.ThemeId), - Type: __expectString(output.Type), - Version: output.Version != null ? de_ThemeVersion(output.Version, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ThemeId: __expectString, + Type: __expectString, + Version: (_: any) => de_ThemeVersion(_, context), + }) as any; }; -/** - * deserializeAws_restJson1ThemeAlias - */ -const de_ThemeAlias = (output: any, context: __SerdeContext): ThemeAlias => { - return { - AliasName: __expectString(output.AliasName), - Arn: __expectString(output.Arn), - ThemeVersionNumber: __expectLong(output.ThemeVersionNumber), - } as any; -}; +// de_ThemeAlias omitted. -/** - * deserializeAws_restJson1ThemeAliasList - */ -const de_ThemeAliasList = (output: any, context: __SerdeContext): ThemeAlias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThemeAlias(entry, context); - }); - return retVal; -}; +// de_ThemeAliasList omitted. -/** - * deserializeAws_restJson1ThemeConfiguration - */ -const de_ThemeConfiguration = (output: any, context: __SerdeContext): ThemeConfiguration => { - return { - DataColorPalette: - output.DataColorPalette != null ? de_DataColorPalette(output.DataColorPalette, context) : undefined, - Sheet: output.Sheet != null ? de_SheetStyle(output.Sheet, context) : undefined, - Typography: output.Typography != null ? de_Typography(output.Typography, context) : undefined, - UIColorPalette: output.UIColorPalette != null ? de_UIColorPalette(output.UIColorPalette, context) : undefined, - } as any; -}; +// de_ThemeConfiguration omitted. -/** - * deserializeAws_restJson1ThemeError - */ -const de_ThemeError = (output: any, context: __SerdeContext): ThemeError => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; +// de_ThemeError omitted. -/** - * deserializeAws_restJson1ThemeErrorList - */ -const de_ThemeErrorList = (output: any, context: __SerdeContext): ThemeError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThemeError(entry, context); - }); - return retVal; -}; +// de_ThemeErrorList omitted. /** * deserializeAws_restJson1ThemeSummary */ const de_ThemeSummary = (output: any, context: __SerdeContext): ThemeSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - LatestVersionNumber: __expectLong(output.LatestVersionNumber), - Name: __expectString(output.Name), - ThemeId: __expectString(output.ThemeId), - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestVersionNumber: __expectLong, + Name: __expectString, + ThemeId: __expectString, + }) as any; }; /** @@ -34702,9 +23923,6 @@ const de_ThemeSummaryList = (output: any, context: __SerdeContext): ThemeSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThemeSummary(entry, context); }); return retVal; @@ -34714,35 +23932,29 @@ const de_ThemeSummaryList = (output: any, context: __SerdeContext): ThemeSummary * deserializeAws_restJson1ThemeVersion */ const de_ThemeVersion = (output: any, context: __SerdeContext): ThemeVersion => { - return { - Arn: __expectString(output.Arn), - BaseThemeId: __expectString(output.BaseThemeId), - Configuration: output.Configuration != null ? de_ThemeConfiguration(output.Configuration, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Errors: output.Errors != null ? de_ThemeErrorList(output.Errors, context) : undefined, - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; + return take(output, { + Arn: __expectString, + BaseThemeId: __expectString, + Configuration: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Errors: _json, + Status: __expectString, + VersionNumber: __expectLong, + }) as any; }; /** * deserializeAws_restJson1ThemeVersionSummary */ const de_ThemeVersionSummary = (output: any, context: __SerdeContext): ThemeVersionSummary => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Status: __expectString(output.Status), - VersionNumber: __expectLong(output.VersionNumber), - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Status: __expectString, + VersionNumber: __expectLong, + }) as any; }; /** @@ -34752,134 +23964,92 @@ const de_ThemeVersionSummaryList = (output: any, context: __SerdeContext): Theme const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ThemeVersionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ThousandSeparatorOptions - */ -const de_ThousandSeparatorOptions = (output: any, context: __SerdeContext): ThousandSeparatorOptions => { - return { - Symbol: __expectString(output.Symbol), - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_ThousandSeparatorOptions omitted. -/** - * deserializeAws_restJson1TileLayoutStyle - */ -const de_TileLayoutStyle = (output: any, context: __SerdeContext): TileLayoutStyle => { - return { - Gutter: output.Gutter != null ? de_GutterStyle(output.Gutter, context) : undefined, - Margin: output.Margin != null ? de_MarginStyle(output.Margin, context) : undefined, - } as any; -}; +// de_TileLayoutStyle omitted. -/** - * deserializeAws_restJson1TileStyle - */ -const de_TileStyle = (output: any, context: __SerdeContext): TileStyle => { - return { - Border: output.Border != null ? de_BorderStyle(output.Border, context) : undefined, - } as any; -}; +// de_TileStyle omitted. /** * deserializeAws_restJson1TimeBasedForecastProperties */ const de_TimeBasedForecastProperties = (output: any, context: __SerdeContext): TimeBasedForecastProperties => { - return { - LowerBoundary: __limitedParseDouble(output.LowerBoundary), - PeriodsBackward: __expectInt32(output.PeriodsBackward), - PeriodsForward: __expectInt32(output.PeriodsForward), - PredictionInterval: __expectInt32(output.PredictionInterval), - Seasonality: __expectInt32(output.Seasonality), - UpperBoundary: __limitedParseDouble(output.UpperBoundary), - } as any; + return take(output, { + LowerBoundary: __limitedParseDouble, + PeriodsBackward: __expectInt32, + PeriodsForward: __expectInt32, + PredictionInterval: __expectInt32, + Seasonality: __expectInt32, + UpperBoundary: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1TimeEqualityFilter */ const de_TimeEqualityFilter = (output: any, context: __SerdeContext): TimeEqualityFilter => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FilterId: __expectString(output.FilterId), - ParameterName: __expectString(output.ParameterName), - TimeGranularity: __expectString(output.TimeGranularity), - Value: output.Value != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Value))) : undefined, - } as any; + return take(output, { + Column: _json, + FilterId: __expectString, + ParameterName: __expectString, + TimeGranularity: __expectString, + Value: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1TimeRangeDrillDownFilter */ const de_TimeRangeDrillDownFilter = (output: any, context: __SerdeContext): TimeRangeDrillDownFilter => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - RangeMaximum: - output.RangeMaximum != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RangeMaximum))) - : undefined, - RangeMinimum: - output.RangeMinimum != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RangeMinimum))) - : undefined, - TimeGranularity: __expectString(output.TimeGranularity), - } as any; + return take(output, { + Column: _json, + RangeMaximum: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RangeMinimum: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TimeGranularity: __expectString, + }) as any; }; /** * deserializeAws_restJson1TimeRangeFilter */ const de_TimeRangeFilter = (output: any, context: __SerdeContext): TimeRangeFilter => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - ExcludePeriodConfiguration: - output.ExcludePeriodConfiguration != null - ? de_ExcludePeriodConfiguration(output.ExcludePeriodConfiguration, context) - : undefined, - FilterId: __expectString(output.FilterId), - IncludeMaximum: __expectBoolean(output.IncludeMaximum), - IncludeMinimum: __expectBoolean(output.IncludeMinimum), - NullOption: __expectString(output.NullOption), - RangeMaximumValue: - output.RangeMaximumValue != null ? de_TimeRangeFilterValue(output.RangeMaximumValue, context) : undefined, - RangeMinimumValue: - output.RangeMinimumValue != null ? de_TimeRangeFilterValue(output.RangeMinimumValue, context) : undefined, - TimeGranularity: __expectString(output.TimeGranularity), - } as any; + return take(output, { + Column: _json, + ExcludePeriodConfiguration: _json, + FilterId: __expectString, + IncludeMaximum: __expectBoolean, + IncludeMinimum: __expectBoolean, + NullOption: __expectString, + RangeMaximumValue: (_: any) => de_TimeRangeFilterValue(_, context), + RangeMinimumValue: (_: any) => de_TimeRangeFilterValue(_, context), + TimeGranularity: __expectString, + }) as any; }; /** * deserializeAws_restJson1TimeRangeFilterValue */ const de_TimeRangeFilterValue = (output: any, context: __SerdeContext): TimeRangeFilterValue => { - return { - Parameter: __expectString(output.Parameter), - RollingDate: output.RollingDate != null ? de_RollingDateConfiguration(output.RollingDate, context) : undefined, - StaticValue: - output.StaticValue != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StaticValue))) - : undefined, - } as any; + return take(output, { + Parameter: __expectString, + RollingDate: _json, + StaticValue: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1TooltipItem */ const de_TooltipItem = (output: any, context: __SerdeContext): TooltipItem => { - return { - ColumnTooltipItem: - output.ColumnTooltipItem != null ? de_ColumnTooltipItem(output.ColumnTooltipItem, context) : undefined, - FieldTooltipItem: - output.FieldTooltipItem != null ? de_FieldTooltipItem(output.FieldTooltipItem, context) : undefined, - } as any; + return take(output, { + ColumnTooltipItem: (_: any) => de_ColumnTooltipItem(_, context), + FieldTooltipItem: _json, + }) as any; }; /** @@ -34889,9 +24059,6 @@ const de_TooltipItemList = (output: any, context: __SerdeContext): TooltipItem[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TooltipItem(entry, context); }); return retVal; @@ -34901,199 +24068,111 @@ const de_TooltipItemList = (output: any, context: __SerdeContext): TooltipItem[] * deserializeAws_restJson1TooltipOptions */ const de_TooltipOptions = (output: any, context: __SerdeContext): TooltipOptions => { - return { - FieldBasedTooltip: - output.FieldBasedTooltip != null ? de_FieldBasedTooltip(output.FieldBasedTooltip, context) : undefined, - SelectedTooltipType: __expectString(output.SelectedTooltipType), - TooltipVisibility: __expectString(output.TooltipVisibility), - } as any; + return take(output, { + FieldBasedTooltip: (_: any) => de_FieldBasedTooltip(_, context), + SelectedTooltipType: __expectString, + TooltipVisibility: __expectString, + }) as any; }; /** * deserializeAws_restJson1TopBottomFilter */ const de_TopBottomFilter = (output: any, context: __SerdeContext): TopBottomFilter => { - return { - AggregationSortConfigurations: - output.AggregationSortConfigurations != null - ? de_AggregationSortConfigurationList(output.AggregationSortConfigurations, context) - : undefined, - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FilterId: __expectString(output.FilterId), - Limit: __expectInt32(output.Limit), - ParameterName: __expectString(output.ParameterName), - TimeGranularity: __expectString(output.TimeGranularity), - } as any; + return take(output, { + AggregationSortConfigurations: (_: any) => de_AggregationSortConfigurationList(_, context), + Column: _json, + FilterId: __expectString, + Limit: __expectInt32, + ParameterName: __expectString, + TimeGranularity: __expectString, + }) as any; }; /** * deserializeAws_restJson1TopBottomMoversComputation */ const de_TopBottomMoversComputation = (output: any, context: __SerdeContext): TopBottomMoversComputation => { - return { - Category: output.Category != null ? de_DimensionField(output.Category, context) : undefined, - ComputationId: __expectString(output.ComputationId), - MoverSize: __expectInt32(output.MoverSize), - Name: __expectString(output.Name), - SortOrder: __expectString(output.SortOrder), - Time: output.Time != null ? de_DimensionField(output.Time, context) : undefined, - Type: __expectString(output.Type), - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; + return take(output, { + Category: _json, + ComputationId: __expectString, + MoverSize: __expectInt32, + Name: __expectString, + SortOrder: __expectString, + Time: _json, + Type: __expectString, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; /** * deserializeAws_restJson1TopBottomRankedComputation */ const de_TopBottomRankedComputation = (output: any, context: __SerdeContext): TopBottomRankedComputation => { - return { - Category: output.Category != null ? de_DimensionField(output.Category, context) : undefined, - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - ResultSize: __expectInt32(output.ResultSize), - Type: __expectString(output.Type), - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; + return take(output, { + Category: _json, + ComputationId: __expectString, + Name: __expectString, + ResultSize: __expectInt32, + Type: __expectString, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; /** * deserializeAws_restJson1TotalAggregationComputation */ const de_TotalAggregationComputation = (output: any, context: __SerdeContext): TotalAggregationComputation => { - return { - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - Value: output.Value != null ? de_MeasureField(output.Value, context) : undefined, - } as any; + return take(output, { + ComputationId: __expectString, + Name: __expectString, + Value: (_: any) => de_MeasureField(_, context), + }) as any; }; -/** - * deserializeAws_restJson1TotalOptions - */ -const de_TotalOptions = (output: any, context: __SerdeContext): TotalOptions => { - return { - CustomLabel: __expectString(output.CustomLabel), - Placement: __expectString(output.Placement), - ScrollStatus: __expectString(output.ScrollStatus), - TotalCellStyle: output.TotalCellStyle != null ? de_TableCellStyle(output.TotalCellStyle, context) : undefined, - TotalsVisibility: __expectString(output.TotalsVisibility), - } as any; -}; +// de_TotalOptions omitted. -/** - * deserializeAws_restJson1TransformOperation - */ -const de_TransformOperation = (output: any, context: __SerdeContext): TransformOperation => { - if (output.CastColumnTypeOperation != null) { - return { - CastColumnTypeOperation: de_CastColumnTypeOperation(output.CastColumnTypeOperation, context), - }; - } - if (output.CreateColumnsOperation != null) { - return { - CreateColumnsOperation: de_CreateColumnsOperation(output.CreateColumnsOperation, context), - }; - } - if (output.FilterOperation != null) { - return { - FilterOperation: de_FilterOperation(output.FilterOperation, context), - }; - } - if (output.ProjectOperation != null) { - return { - ProjectOperation: de_ProjectOperation(output.ProjectOperation, context), - }; - } - if (output.RenameColumnOperation != null) { - return { - RenameColumnOperation: de_RenameColumnOperation(output.RenameColumnOperation, context), - }; - } - if (output.TagColumnOperation != null) { - return { - TagColumnOperation: de_TagColumnOperation(output.TagColumnOperation, context), - }; - } - if (output.UntagColumnOperation != null) { - return { - UntagColumnOperation: de_UntagColumnOperation(output.UntagColumnOperation, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_TransformOperation omitted. -/** - * deserializeAws_restJson1TransformOperationList - */ -const de_TransformOperationList = (output: any, context: __SerdeContext): TransformOperation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TransformOperation(__expectUnion(entry), context); - }); - return retVal; -}; +// de_TransformOperationList omitted. /** * deserializeAws_restJson1TreeMapAggregatedFieldWells */ const de_TreeMapAggregatedFieldWells = (output: any, context: __SerdeContext): TreeMapAggregatedFieldWells => { - return { - Colors: output.Colors != null ? de_TreeMapMeasureFieldList(output.Colors, context) : undefined, - Groups: output.Groups != null ? de_TreeMapDimensionFieldList(output.Groups, context) : undefined, - Sizes: output.Sizes != null ? de_TreeMapMeasureFieldList(output.Sizes, context) : undefined, - } as any; + return take(output, { + Colors: (_: any) => de_TreeMapMeasureFieldList(_, context), + Groups: _json, + Sizes: (_: any) => de_TreeMapMeasureFieldList(_, context), + }) as any; }; /** * deserializeAws_restJson1TreeMapConfiguration */ const de_TreeMapConfiguration = (output: any, context: __SerdeContext): TreeMapConfiguration => { - return { - ColorLabelOptions: - output.ColorLabelOptions != null ? de_ChartAxisLabelOptions(output.ColorLabelOptions, context) : undefined, - ColorScale: output.ColorScale != null ? de_ColorScale(output.ColorScale, context) : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_TreeMapFieldWells(output.FieldWells, context) : undefined, - GroupLabelOptions: - output.GroupLabelOptions != null ? de_ChartAxisLabelOptions(output.GroupLabelOptions, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - SizeLabelOptions: - output.SizeLabelOptions != null ? de_ChartAxisLabelOptions(output.SizeLabelOptions, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_TreeMapSortConfiguration(output.SortConfiguration, context) : undefined, - Tooltip: output.Tooltip != null ? de_TooltipOptions(output.Tooltip, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1TreeMapDimensionFieldList - */ -const de_TreeMapDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; + return take(output, { + ColorLabelOptions: _json, + ColorScale: (_: any) => de_ColorScale(_, context), + DataLabels: _json, + FieldWells: (_: any) => de_TreeMapFieldWells(_, context), + GroupLabelOptions: _json, + Legend: _json, + SizeLabelOptions: _json, + SortConfiguration: (_: any) => de_TreeMapSortConfiguration(_, context), + Tooltip: (_: any) => de_TooltipOptions(_, context), + }) as any; }; +// de_TreeMapDimensionFieldList omitted. + /** * deserializeAws_restJson1TreeMapFieldWells */ const de_TreeMapFieldWells = (output: any, context: __SerdeContext): TreeMapFieldWells => { - return { - TreeMapAggregatedFieldWells: - output.TreeMapAggregatedFieldWells != null - ? de_TreeMapAggregatedFieldWells(output.TreeMapAggregatedFieldWells, context) - : undefined, - } as any; + return take(output, { + TreeMapAggregatedFieldWells: (_: any) => de_TreeMapAggregatedFieldWells(_, context), + }) as any; }; /** @@ -35103,9 +24182,6 @@ const de_TreeMapMeasureFieldList = (output: any, context: __SerdeContext): Measu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MeasureField(entry, context); }); return retVal; @@ -35115,250 +24191,101 @@ const de_TreeMapMeasureFieldList = (output: any, context: __SerdeContext): Measu * deserializeAws_restJson1TreeMapSortConfiguration */ const de_TreeMapSortConfiguration = (output: any, context: __SerdeContext): TreeMapSortConfiguration => { - return { - TreeMapGroupItemsLimitConfiguration: - output.TreeMapGroupItemsLimitConfiguration != null - ? de_ItemsLimitConfiguration(output.TreeMapGroupItemsLimitConfiguration, context) - : undefined, - TreeMapSort: output.TreeMapSort != null ? de_FieldSortOptionsList(output.TreeMapSort, context) : undefined, - } as any; + return take(output, { + TreeMapGroupItemsLimitConfiguration: _json, + TreeMapSort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** * deserializeAws_restJson1TreeMapVisual */ const de_TreeMapVisual = (output: any, context: __SerdeContext): TreeMapVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null ? de_TreeMapConfiguration(output.ChartConfiguration, context) : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_TreeMapConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TrendArrowOptions - */ -const de_TrendArrowOptions = (output: any, context: __SerdeContext): TrendArrowOptions => { - return { - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_TrendArrowOptions omitted. -/** - * deserializeAws_restJson1TwitterParameters - */ -const de_TwitterParameters = (output: any, context: __SerdeContext): TwitterParameters => { - return { - MaxRows: __expectInt32(output.MaxRows), - Query: __expectString(output.Query), - } as any; -}; +// de_TwitterParameters omitted. -/** - * deserializeAws_restJson1Typography - */ -const de_Typography = (output: any, context: __SerdeContext): Typography => { - return { - FontFamilies: output.FontFamilies != null ? de_FontList(output.FontFamilies, context) : undefined, - } as any; -}; +// de_Typography omitted. -/** - * deserializeAws_restJson1UIColorPalette - */ -const de_UIColorPalette = (output: any, context: __SerdeContext): UIColorPalette => { - return { - Accent: __expectString(output.Accent), - AccentForeground: __expectString(output.AccentForeground), - Danger: __expectString(output.Danger), - DangerForeground: __expectString(output.DangerForeground), - Dimension: __expectString(output.Dimension), - DimensionForeground: __expectString(output.DimensionForeground), - Measure: __expectString(output.Measure), - MeasureForeground: __expectString(output.MeasureForeground), - PrimaryBackground: __expectString(output.PrimaryBackground), - PrimaryForeground: __expectString(output.PrimaryForeground), - SecondaryBackground: __expectString(output.SecondaryBackground), - SecondaryForeground: __expectString(output.SecondaryForeground), - Success: __expectString(output.Success), - SuccessForeground: __expectString(output.SuccessForeground), - Warning: __expectString(output.Warning), - WarningForeground: __expectString(output.WarningForeground), - } as any; -}; +// de_UIColorPalette omitted. -/** - * deserializeAws_restJson1UnaggregatedField - */ -const de_UnaggregatedField = (output: any, context: __SerdeContext): UnaggregatedField => { - return { - Column: output.Column != null ? de_ColumnIdentifier(output.Column, context) : undefined, - FieldId: __expectString(output.FieldId), - FormatConfiguration: - output.FormatConfiguration != null ? de_FormatConfiguration(output.FormatConfiguration, context) : undefined, - } as any; -}; +// de_UnaggregatedField omitted. -/** - * deserializeAws_restJson1UnaggregatedFieldList - */ -const de_UnaggregatedFieldList = (output: any, context: __SerdeContext): UnaggregatedField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnaggregatedField(entry, context); - }); - return retVal; -}; +// de_UnaggregatedFieldList omitted. -/** - * deserializeAws_restJson1UniqueValuesComputation - */ -const de_UniqueValuesComputation = (output: any, context: __SerdeContext): UniqueValuesComputation => { - return { - Category: output.Category != null ? de_DimensionField(output.Category, context) : undefined, - ComputationId: __expectString(output.ComputationId), - Name: __expectString(output.Name), - } as any; -}; +// de_UniqueValuesComputation omitted. -/** - * deserializeAws_restJson1UntagColumnOperation - */ -const de_UntagColumnOperation = (output: any, context: __SerdeContext): UntagColumnOperation => { - return { - ColumnName: __expectString(output.ColumnName), - TagNames: output.TagNames != null ? de_ColumnTagNames(output.TagNames, context) : undefined, - } as any; -}; +// de_UntagColumnOperation omitted. -/** - * deserializeAws_restJson1UploadSettings - */ -const de_UploadSettings = (output: any, context: __SerdeContext): UploadSettings => { - return { - ContainsHeader: __expectBoolean(output.ContainsHeader), - Delimiter: __expectString(output.Delimiter), - Format: __expectString(output.Format), - StartFromRow: __expectInt32(output.StartFromRow), - TextQualifier: __expectString(output.TextQualifier), - } as any; -}; +// de_UploadSettings omitted. -/** - * deserializeAws_restJson1User - */ -const de_User = (output: any, context: __SerdeContext): User => { - return { - Active: __expectBoolean(output.Active), - Arn: __expectString(output.Arn), - CustomPermissionsName: __expectString(output.CustomPermissionsName), - Email: __expectString(output.Email), - ExternalLoginFederationProviderType: __expectString(output.ExternalLoginFederationProviderType), - ExternalLoginFederationProviderUrl: __expectString(output.ExternalLoginFederationProviderUrl), - ExternalLoginId: __expectString(output.ExternalLoginId), - IdentityType: __expectString(output.IdentityType), - PrincipalId: __expectString(output.PrincipalId), - Role: __expectString(output.Role), - UserName: __expectString(output.UserName), - } as any; -}; +// de_User omitted. -/** - * deserializeAws_restJson1UserList - */ -const de_UserList = (output: any, context: __SerdeContext): User[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_User(entry, context); - }); - return retVal; -}; +// de_UserList omitted. /** * deserializeAws_restJson1VisibleRangeOptions */ const de_VisibleRangeOptions = (output: any, context: __SerdeContext): VisibleRangeOptions => { - return { - PercentRange: output.PercentRange != null ? de_PercentVisibleRange(output.PercentRange, context) : undefined, - } as any; + return take(output, { + PercentRange: (_: any) => de_PercentVisibleRange(_, context), + }) as any; }; /** * deserializeAws_restJson1Visual */ const de_Visual = (output: any, context: __SerdeContext): Visual => { - return { - BarChartVisual: output.BarChartVisual != null ? de_BarChartVisual(output.BarChartVisual, context) : undefined, - BoxPlotVisual: output.BoxPlotVisual != null ? de_BoxPlotVisual(output.BoxPlotVisual, context) : undefined, - ComboChartVisual: - output.ComboChartVisual != null ? de_ComboChartVisual(output.ComboChartVisual, context) : undefined, - CustomContentVisual: - output.CustomContentVisual != null ? de_CustomContentVisual(output.CustomContentVisual, context) : undefined, - EmptyVisual: output.EmptyVisual != null ? de_EmptyVisual(output.EmptyVisual, context) : undefined, - FilledMapVisual: output.FilledMapVisual != null ? de_FilledMapVisual(output.FilledMapVisual, context) : undefined, - FunnelChartVisual: - output.FunnelChartVisual != null ? de_FunnelChartVisual(output.FunnelChartVisual, context) : undefined, - GaugeChartVisual: - output.GaugeChartVisual != null ? de_GaugeChartVisual(output.GaugeChartVisual, context) : undefined, - GeospatialMapVisual: - output.GeospatialMapVisual != null ? de_GeospatialMapVisual(output.GeospatialMapVisual, context) : undefined, - HeatMapVisual: output.HeatMapVisual != null ? de_HeatMapVisual(output.HeatMapVisual, context) : undefined, - HistogramVisual: output.HistogramVisual != null ? de_HistogramVisual(output.HistogramVisual, context) : undefined, - InsightVisual: output.InsightVisual != null ? de_InsightVisual(output.InsightVisual, context) : undefined, - KPIVisual: output.KPIVisual != null ? de_KPIVisual(output.KPIVisual, context) : undefined, - LineChartVisual: output.LineChartVisual != null ? de_LineChartVisual(output.LineChartVisual, context) : undefined, - PieChartVisual: output.PieChartVisual != null ? de_PieChartVisual(output.PieChartVisual, context) : undefined, - PivotTableVisual: - output.PivotTableVisual != null ? de_PivotTableVisual(output.PivotTableVisual, context) : undefined, - RadarChartVisual: - output.RadarChartVisual != null ? de_RadarChartVisual(output.RadarChartVisual, context) : undefined, - SankeyDiagramVisual: - output.SankeyDiagramVisual != null ? de_SankeyDiagramVisual(output.SankeyDiagramVisual, context) : undefined, - ScatterPlotVisual: - output.ScatterPlotVisual != null ? de_ScatterPlotVisual(output.ScatterPlotVisual, context) : undefined, - TableVisual: output.TableVisual != null ? de_TableVisual(output.TableVisual, context) : undefined, - TreeMapVisual: output.TreeMapVisual != null ? de_TreeMapVisual(output.TreeMapVisual, context) : undefined, - WaterfallVisual: output.WaterfallVisual != null ? de_WaterfallVisual(output.WaterfallVisual, context) : undefined, - WordCloudVisual: output.WordCloudVisual != null ? de_WordCloudVisual(output.WordCloudVisual, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1VisualAxisSortOption - */ -const de_VisualAxisSortOption = (output: any, context: __SerdeContext): VisualAxisSortOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; + return take(output, { + BarChartVisual: (_: any) => de_BarChartVisual(_, context), + BoxPlotVisual: (_: any) => de_BoxPlotVisual(_, context), + ComboChartVisual: (_: any) => de_ComboChartVisual(_, context), + CustomContentVisual: (_: any) => de_CustomContentVisual(_, context), + EmptyVisual: (_: any) => de_EmptyVisual(_, context), + FilledMapVisual: (_: any) => de_FilledMapVisual(_, context), + FunnelChartVisual: (_: any) => de_FunnelChartVisual(_, context), + GaugeChartVisual: (_: any) => de_GaugeChartVisual(_, context), + GeospatialMapVisual: (_: any) => de_GeospatialMapVisual(_, context), + HeatMapVisual: (_: any) => de_HeatMapVisual(_, context), + HistogramVisual: (_: any) => de_HistogramVisual(_, context), + InsightVisual: (_: any) => de_InsightVisual(_, context), + KPIVisual: (_: any) => de_KPIVisual(_, context), + LineChartVisual: (_: any) => de_LineChartVisual(_, context), + PieChartVisual: (_: any) => de_PieChartVisual(_, context), + PivotTableVisual: (_: any) => de_PivotTableVisual(_, context), + RadarChartVisual: (_: any) => de_RadarChartVisual(_, context), + SankeyDiagramVisual: (_: any) => de_SankeyDiagramVisual(_, context), + ScatterPlotVisual: (_: any) => de_ScatterPlotVisual(_, context), + TableVisual: (_: any) => de_TableVisual(_, context), + TreeMapVisual: (_: any) => de_TreeMapVisual(_, context), + WaterfallVisual: (_: any) => de_WaterfallVisual(_, context), + WordCloudVisual: (_: any) => de_WordCloudVisual(_, context), + }) as any; +}; + +// de_VisualAxisSortOption omitted. /** * deserializeAws_restJson1VisualCustomAction */ const de_VisualCustomAction = (output: any, context: __SerdeContext): VisualCustomAction => { - return { - ActionOperations: - output.ActionOperations != null - ? de_VisualCustomActionOperationList(output.ActionOperations, context) - : undefined, - CustomActionId: __expectString(output.CustomActionId), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Trigger: __expectString(output.Trigger), - } as any; + return take(output, { + ActionOperations: (_: any) => de_VisualCustomActionOperationList(_, context), + CustomActionId: __expectString, + Name: __expectString, + Status: __expectString, + Trigger: __expectString, + }) as any; }; /** @@ -35368,9 +24295,6 @@ const de_VisualCustomActionList = (output: any, context: __SerdeContext): Visual const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VisualCustomAction(entry, context); }); return retVal; @@ -35380,19 +24304,12 @@ const de_VisualCustomActionList = (output: any, context: __SerdeContext): Visual * deserializeAws_restJson1VisualCustomActionOperation */ const de_VisualCustomActionOperation = (output: any, context: __SerdeContext): VisualCustomActionOperation => { - return { - FilterOperation: - output.FilterOperation != null ? de_CustomActionFilterOperation(output.FilterOperation, context) : undefined, - NavigationOperation: - output.NavigationOperation != null - ? de_CustomActionNavigationOperation(output.NavigationOperation, context) - : undefined, - SetParametersOperation: - output.SetParametersOperation != null - ? de_CustomActionSetParametersOperation(output.SetParametersOperation, context) - : undefined, - URLOperation: output.URLOperation != null ? de_CustomActionURLOperation(output.URLOperation, context) : undefined, - } as any; + return take(output, { + FilterOperation: _json, + NavigationOperation: _json, + SetParametersOperation: (_: any) => de_CustomActionSetParametersOperation(_, context), + URLOperation: _json, + }) as any; }; /** @@ -35402,9 +24319,6 @@ const de_VisualCustomActionOperationList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VisualCustomActionOperation(entry, context); }); return retVal; @@ -35417,61 +24331,20 @@ const de_VisualList = (output: any, context: __SerdeContext): Visual[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Visual(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VisualMenuOption - */ -const de_VisualMenuOption = (output: any, context: __SerdeContext): VisualMenuOption => { - return { - AvailabilityStatus: __expectString(output.AvailabilityStatus), - } as any; -}; +// de_VisualMenuOption omitted. -/** - * deserializeAws_restJson1VisualPalette - */ -const de_VisualPalette = (output: any, context: __SerdeContext): VisualPalette => { - return { - ChartColor: __expectString(output.ChartColor), - ColorMap: output.ColorMap != null ? de_DataPathColorList(output.ColorMap, context) : undefined, - } as any; -}; +// de_VisualPalette omitted. -/** - * deserializeAws_restJson1VisualSubtitleLabelOptions - */ -const de_VisualSubtitleLabelOptions = (output: any, context: __SerdeContext): VisualSubtitleLabelOptions => { - return { - FormatText: output.FormatText != null ? de_LongFormatText(output.FormatText, context) : undefined, - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_VisualSubtitleLabelOptions omitted. -/** - * deserializeAws_restJson1VisualTitleLabelOptions - */ -const de_VisualTitleLabelOptions = (output: any, context: __SerdeContext): VisualTitleLabelOptions => { - return { - FormatText: output.FormatText != null ? de_ShortFormatText(output.FormatText, context) : undefined, - Visibility: __expectString(output.Visibility), - } as any; -}; +// de_VisualTitleLabelOptions omitted. -/** - * deserializeAws_restJson1VpcConnectionProperties - */ -const de_VpcConnectionProperties = (output: any, context: __SerdeContext): VpcConnectionProperties => { - return { - VpcConnectionArn: __expectString(output.VpcConnectionArn), - } as any; -}; +// de_VpcConnectionProperties omitted. /** * deserializeAws_restJson1WaterfallChartAggregatedFieldWells @@ -35480,172 +24353,118 @@ const de_WaterfallChartAggregatedFieldWells = ( output: any, context: __SerdeContext ): WaterfallChartAggregatedFieldWells => { - return { - Breakdowns: output.Breakdowns != null ? de_DimensionFieldList(output.Breakdowns, context) : undefined, - Categories: output.Categories != null ? de_DimensionFieldList(output.Categories, context) : undefined, - Values: output.Values != null ? de_MeasureFieldList(output.Values, context) : undefined, - } as any; + return take(output, { + Breakdowns: _json, + Categories: _json, + Values: (_: any) => de_MeasureFieldList(_, context), + }) as any; }; /** * deserializeAws_restJson1WaterfallChartConfiguration */ const de_WaterfallChartConfiguration = (output: any, context: __SerdeContext): WaterfallChartConfiguration => { - return { - CategoryAxisDisplayOptions: - output.CategoryAxisDisplayOptions != null - ? de_AxisDisplayOptions(output.CategoryAxisDisplayOptions, context) - : undefined, - CategoryAxisLabelOptions: - output.CategoryAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.CategoryAxisLabelOptions, context) - : undefined, - DataLabels: output.DataLabels != null ? de_DataLabelOptions(output.DataLabels, context) : undefined, - FieldWells: output.FieldWells != null ? de_WaterfallChartFieldWells(output.FieldWells, context) : undefined, - Legend: output.Legend != null ? de_LegendOptions(output.Legend, context) : undefined, - PrimaryYAxisDisplayOptions: - output.PrimaryYAxisDisplayOptions != null - ? de_AxisDisplayOptions(output.PrimaryYAxisDisplayOptions, context) - : undefined, - PrimaryYAxisLabelOptions: - output.PrimaryYAxisLabelOptions != null - ? de_ChartAxisLabelOptions(output.PrimaryYAxisLabelOptions, context) - : undefined, - SortConfiguration: - output.SortConfiguration != null - ? de_WaterfallChartSortConfiguration(output.SortConfiguration, context) - : undefined, - VisualPalette: output.VisualPalette != null ? de_VisualPalette(output.VisualPalette, context) : undefined, - WaterfallChartOptions: - output.WaterfallChartOptions != null - ? de_WaterfallChartOptions(output.WaterfallChartOptions, context) - : undefined, - } as any; + return take(output, { + CategoryAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + CategoryAxisLabelOptions: _json, + DataLabels: _json, + FieldWells: (_: any) => de_WaterfallChartFieldWells(_, context), + Legend: _json, + PrimaryYAxisDisplayOptions: (_: any) => de_AxisDisplayOptions(_, context), + PrimaryYAxisLabelOptions: _json, + SortConfiguration: (_: any) => de_WaterfallChartSortConfiguration(_, context), + VisualPalette: _json, + WaterfallChartOptions: _json, + }) as any; }; /** * deserializeAws_restJson1WaterfallChartFieldWells */ const de_WaterfallChartFieldWells = (output: any, context: __SerdeContext): WaterfallChartFieldWells => { - return { - WaterfallChartAggregatedFieldWells: - output.WaterfallChartAggregatedFieldWells != null - ? de_WaterfallChartAggregatedFieldWells(output.WaterfallChartAggregatedFieldWells, context) - : undefined, - } as any; + return take(output, { + WaterfallChartAggregatedFieldWells: (_: any) => de_WaterfallChartAggregatedFieldWells(_, context), + }) as any; }; -/** - * deserializeAws_restJson1WaterfallChartOptions - */ -const de_WaterfallChartOptions = (output: any, context: __SerdeContext): WaterfallChartOptions => { - return { - TotalBarLabel: __expectString(output.TotalBarLabel), - } as any; -}; +// de_WaterfallChartOptions omitted. /** * deserializeAws_restJson1WaterfallChartSortConfiguration */ const de_WaterfallChartSortConfiguration = (output: any, context: __SerdeContext): WaterfallChartSortConfiguration => { - return { - BreakdownItemsLimit: - output.BreakdownItemsLimit != null ? de_ItemsLimitConfiguration(output.BreakdownItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - } as any; + return take(output, { + BreakdownItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** * deserializeAws_restJson1WaterfallVisual */ const de_WaterfallVisual = (output: any, context: __SerdeContext): WaterfallVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null - ? de_WaterfallChartConfiguration(output.ChartConfiguration, context) - : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_WaterfallChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; /** * deserializeAws_restJson1WhatIfPointScenario */ const de_WhatIfPointScenario = (output: any, context: __SerdeContext): WhatIfPointScenario => { - return { - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1WhatIfRangeScenario */ const de_WhatIfRangeScenario = (output: any, context: __SerdeContext): WhatIfRangeScenario => { - return { - EndDate: - output.EndDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDate))) : undefined, - StartDate: - output.StartDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDate))) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + EndDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: __limitedParseDouble, + }) as any; }; /** * deserializeAws_restJson1WordCloudAggregatedFieldWells */ const de_WordCloudAggregatedFieldWells = (output: any, context: __SerdeContext): WordCloudAggregatedFieldWells => { - return { - GroupBy: output.GroupBy != null ? de_WordCloudDimensionFieldList(output.GroupBy, context) : undefined, - Size: output.Size != null ? de_WordCloudMeasureFieldList(output.Size, context) : undefined, - } as any; + return take(output, { + GroupBy: _json, + Size: (_: any) => de_WordCloudMeasureFieldList(_, context), + }) as any; }; /** * deserializeAws_restJson1WordCloudChartConfiguration */ const de_WordCloudChartConfiguration = (output: any, context: __SerdeContext): WordCloudChartConfiguration => { - return { - CategoryLabelOptions: - output.CategoryLabelOptions != null ? de_ChartAxisLabelOptions(output.CategoryLabelOptions, context) : undefined, - FieldWells: output.FieldWells != null ? de_WordCloudFieldWells(output.FieldWells, context) : undefined, - SortConfiguration: - output.SortConfiguration != null ? de_WordCloudSortConfiguration(output.SortConfiguration, context) : undefined, - WordCloudOptions: - output.WordCloudOptions != null ? de_WordCloudOptions(output.WordCloudOptions, context) : undefined, - } as any; + return take(output, { + CategoryLabelOptions: _json, + FieldWells: (_: any) => de_WordCloudFieldWells(_, context), + SortConfiguration: (_: any) => de_WordCloudSortConfiguration(_, context), + WordCloudOptions: _json, + }) as any; }; -/** - * deserializeAws_restJson1WordCloudDimensionFieldList - */ -const de_WordCloudDimensionFieldList = (output: any, context: __SerdeContext): DimensionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionField(entry, context); - }); - return retVal; -}; +// de_WordCloudDimensionFieldList omitted. /** * deserializeAws_restJson1WordCloudFieldWells */ const de_WordCloudFieldWells = (output: any, context: __SerdeContext): WordCloudFieldWells => { - return { - WordCloudAggregatedFieldWells: - output.WordCloudAggregatedFieldWells != null - ? de_WordCloudAggregatedFieldWells(output.WordCloudAggregatedFieldWells, context) - : undefined, - } as any; + return take(output, { + WordCloudAggregatedFieldWells: (_: any) => de_WordCloudAggregatedFieldWells(_, context), + }) as any; }; /** @@ -35655,55 +24474,35 @@ const de_WordCloudMeasureFieldList = (output: any, context: __SerdeContext): Mea const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MeasureField(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1WordCloudOptions - */ -const de_WordCloudOptions = (output: any, context: __SerdeContext): WordCloudOptions => { - return { - CloudLayout: __expectString(output.CloudLayout), - MaximumStringLength: __expectInt32(output.MaximumStringLength), - WordCasing: __expectString(output.WordCasing), - WordOrientation: __expectString(output.WordOrientation), - WordPadding: __expectString(output.WordPadding), - WordScaling: __expectString(output.WordScaling), - } as any; -}; +// de_WordCloudOptions omitted. /** * deserializeAws_restJson1WordCloudSortConfiguration */ const de_WordCloudSortConfiguration = (output: any, context: __SerdeContext): WordCloudSortConfiguration => { - return { - CategoryItemsLimit: - output.CategoryItemsLimit != null ? de_ItemsLimitConfiguration(output.CategoryItemsLimit, context) : undefined, - CategorySort: output.CategorySort != null ? de_FieldSortOptionsList(output.CategorySort, context) : undefined, - } as any; + return take(output, { + CategoryItemsLimit: _json, + CategorySort: (_: any) => de_FieldSortOptionsList(_, context), + }) as any; }; /** * deserializeAws_restJson1WordCloudVisual */ const de_WordCloudVisual = (output: any, context: __SerdeContext): WordCloudVisual => { - return { - Actions: output.Actions != null ? de_VisualCustomActionList(output.Actions, context) : undefined, - ChartConfiguration: - output.ChartConfiguration != null - ? de_WordCloudChartConfiguration(output.ChartConfiguration, context) - : undefined, - ColumnHierarchies: - output.ColumnHierarchies != null ? de_ColumnHierarchyList(output.ColumnHierarchies, context) : undefined, - Subtitle: output.Subtitle != null ? de_VisualSubtitleLabelOptions(output.Subtitle, context) : undefined, - Title: output.Title != null ? de_VisualTitleLabelOptions(output.Title, context) : undefined, - VisualId: __expectString(output.VisualId), - } as any; + return take(output, { + Actions: (_: any) => de_VisualCustomActionList(_, context), + ChartConfiguration: (_: any) => de_WordCloudChartConfiguration(_, context), + ColumnHierarchies: (_: any) => de_ColumnHierarchyList(_, context), + Subtitle: _json, + Title: _json, + VisualId: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-ram/src/protocols/Aws_restJson1.ts b/clients/client-ram/src/protocols/Aws_restJson1.ts index 10ef999146d5..7c3e6a018904 100644 --- a/clients/client-ram/src/protocols/Aws_restJson1.ts +++ b/clients/client-ram/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -8,9 +9,10 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -119,7 +121,6 @@ import { ResourceSharePermissionDetail, ResourceSharePermissionSummary, ServerInternalException, - ServiceNameAndResourceType, ServiceUnavailableException, Tag, TagFilter, @@ -144,10 +145,12 @@ export const se_AcceptResourceShareInvitationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/acceptresourceshareinvitation"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + resourceShareInvitationArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -173,12 +176,14 @@ export const se_AssociateResourceShareCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourceshare"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + principals: (_) => _json(_), + resourceArns: (_) => _json(_), + resourceShareArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -204,13 +209,15 @@ export const se_AssociateResourceSharePermissionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateresourcesharepermission"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.permissionArn != null && { permissionArn: input.permissionArn }), - ...(input.permissionVersion != null && { permissionVersion: input.permissionVersion }), - ...(input.replace != null && { replace: input.replace }), - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + permissionArn: [], + permissionVersion: [], + replace: [], + resourceShareArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -235,15 +242,17 @@ export const se_CreateResourceShareCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createresourceshare"; let body: any; - body = JSON.stringify({ - ...(input.allowExternalPrincipals != null && { allowExternalPrincipals: input.allowExternalPrincipals }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.name != null && { name: input.name }), - ...(input.permissionArns != null && { permissionArns: se_PermissionArnList(input.permissionArns, context) }), - ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + allowExternalPrincipals: [], + clientToken: [], + name: [], + permissionArns: (_) => _json(_), + principals: (_) => _json(_), + resourceArns: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -296,12 +305,14 @@ export const se_DisassociateResourceShareCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourceshare"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + principals: (_) => _json(_), + resourceArns: (_) => _json(_), + resourceShareArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -327,11 +338,13 @@ export const se_DisassociateResourceSharePermissionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateresourcesharepermission"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.permissionArn != null && { permissionArn: input.permissionArn }), - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + permissionArn: [], + resourceShareArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -382,10 +395,12 @@ export const se_GetPermissionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getpermission"; let body: any; - body = JSON.stringify({ - ...(input.permissionArn != null && { permissionArn: input.permissionArn }), - ...(input.permissionVersion != null && { permissionVersion: input.permissionVersion }), - }); + body = JSON.stringify( + take(input, { + permissionArn: [], + permissionVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -410,12 +425,14 @@ export const se_GetResourcePoliciesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourcepolicies"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.principal != null && { principal: input.principal }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + principal: [], + resourceArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -441,17 +458,17 @@ export const se_GetResourceShareAssociationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareassociations"; let body: any; - body = JSON.stringify({ - ...(input.associationStatus != null && { associationStatus: input.associationStatus }), - ...(input.associationType != null && { associationType: input.associationType }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.principal != null && { principal: input.principal }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.resourceShareArns != null && { - resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context), - }), - }); + body = JSON.stringify( + take(input, { + associationStatus: [], + associationType: [], + maxResults: [], + nextToken: [], + principal: [], + resourceArn: [], + resourceShareArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -477,16 +494,14 @@ export const se_GetResourceShareInvitationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshareinvitations"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceShareArns != null && { - resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context), - }), - ...(input.resourceShareInvitationArns != null && { - resourceShareInvitationArns: se_ResourceShareInvitationArnList(input.resourceShareInvitationArns, context), - }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + resourceShareArns: (_) => _json(_), + resourceShareInvitationArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -511,18 +526,18 @@ export const se_GetResourceSharesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getresourceshares"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.name != null && { name: input.name }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.permissionArn != null && { permissionArn: input.permissionArn }), - ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }), - ...(input.resourceShareArns != null && { - resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context), - }), - ...(input.resourceShareStatus != null && { resourceShareStatus: input.resourceShareStatus }), - ...(input.tagFilters != null && { tagFilters: se_TagFilters(input.tagFilters, context) }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + name: [], + nextToken: [], + permissionArn: [], + resourceOwner: [], + resourceShareArns: (_) => _json(_), + resourceShareStatus: [], + tagFilters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -548,12 +563,14 @@ export const se_ListPendingInvitationResourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpendinginvitationresources"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }), - ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + resourceRegionScope: [], + resourceShareInvitationArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -578,11 +595,13 @@ export const se_ListPermissionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissions"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + resourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -608,11 +627,13 @@ export const se_ListPermissionVersionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listpermissionversions"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.permissionArn != null && { permissionArn: input.permissionArn }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + permissionArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -637,17 +658,17 @@ export const se_ListPrincipalsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listprincipals"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.principals != null && { principals: se_PrincipalArnOrIdList(input.principals, context) }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }), - ...(input.resourceShareArns != null && { - resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context), - }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + principals: (_) => _json(_), + resourceArn: [], + resourceOwner: [], + resourceShareArns: (_) => _json(_), + resourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -672,18 +693,18 @@ export const se_ListResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresources"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.principal != null && { principal: input.principal }), - ...(input.resourceArns != null && { resourceArns: se_ResourceArnList(input.resourceArns, context) }), - ...(input.resourceOwner != null && { resourceOwner: input.resourceOwner }), - ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }), - ...(input.resourceShareArns != null && { - resourceShareArns: se_ResourceShareArnList(input.resourceShareArns, context), - }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + principal: [], + resourceArns: (_) => _json(_), + resourceOwner: [], + resourceRegionScope: [], + resourceShareArns: (_) => _json(_), + resourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -709,11 +730,13 @@ export const se_ListResourceSharePermissionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcesharepermissions"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + resourceShareArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -738,11 +761,13 @@ export const se_ListResourceTypesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listresourcetypes"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceRegionScope != null && { resourceRegionScope: input.resourceRegionScope }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + resourceRegionScope: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -795,10 +820,12 @@ export const se_RejectResourceShareInvitationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rejectresourceshareinvitation"; let body: any; - body = JSON.stringify({ - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.resourceShareInvitationArn != null && { resourceShareInvitationArn: input.resourceShareInvitationArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: [], + resourceShareInvitationArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -823,10 +850,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tagresource"; let body: any; - body = JSON.stringify({ - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + resourceShareArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -851,10 +880,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/untagresource"; let body: any; - body = JSON.stringify({ - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + resourceShareArn: [], + tagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -879,12 +910,14 @@ export const se_UpdateResourceShareCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateresourceshare"; let body: any; - body = JSON.stringify({ - ...(input.allowExternalPrincipals != null && { allowExternalPrincipals: input.allowExternalPrincipals }), - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.name != null && { name: input.name }), - ...(input.resourceShareArn != null && { resourceShareArn: input.resourceShareArn }), - }); + body = JSON.stringify( + take(input, { + allowExternalPrincipals: [], + clientToken: [], + name: [], + resourceShareArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -910,12 +943,11 @@ export const de_AcceptResourceShareInvitationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.resourceShareInvitation != null) { - contents.resourceShareInvitation = de_ResourceShareInvitation(data.resourceShareInvitation, context); - } + const doc = take(data, { + clientToken: __expectString, + resourceShareInvitation: (_) => de_ResourceShareInvitation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -964,10 +996,9 @@ const de_AcceptResourceShareInvitationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -987,12 +1018,11 @@ export const de_AssociateResourceShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.resourceShareAssociations != null) { - contents.resourceShareAssociations = de_ResourceShareAssociationList(data.resourceShareAssociations, context); - } + const doc = take(data, { + clientToken: __expectString, + resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1044,10 +1074,9 @@ const de_AssociateResourceShareCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1067,12 +1096,11 @@ export const de_AssociateResourceSharePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.returnValue != null) { - contents.returnValue = __expectBoolean(data.returnValue); - } + const doc = take(data, { + clientToken: __expectString, + returnValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1112,10 +1140,9 @@ const de_AssociateResourceSharePermissionCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1135,12 +1162,11 @@ export const de_CreateResourceShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.resourceShare != null) { - contents.resourceShare = de_ResourceShare(data.resourceShare, context); - } + const doc = take(data, { + clientToken: __expectString, + resourceShare: (_) => de_ResourceShare(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1192,10 +1218,9 @@ const de_CreateResourceShareCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1215,12 +1240,11 @@ export const de_DeleteResourceShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.returnValue != null) { - contents.returnValue = __expectBoolean(data.returnValue); - } + const doc = take(data, { + clientToken: __expectString, + returnValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1266,10 +1290,9 @@ const de_DeleteResourceShareCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1289,12 +1312,11 @@ export const de_DisassociateResourceShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.resourceShareAssociations != null) { - contents.resourceShareAssociations = de_ResourceShareAssociationList(data.resourceShareAssociations, context); - } + const doc = take(data, { + clientToken: __expectString, + resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1343,10 +1365,9 @@ const de_DisassociateResourceShareCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1366,12 +1387,11 @@ export const de_DisassociateResourceSharePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.returnValue != null) { - contents.returnValue = __expectBoolean(data.returnValue); - } + const doc = take(data, { + clientToken: __expectString, + returnValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1414,10 +1434,9 @@ const de_DisassociateResourceSharePermissionCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1437,9 +1456,10 @@ export const de_EnableSharingWithAwsOrganizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.returnValue != null) { - contents.returnValue = __expectBoolean(data.returnValue); - } + const doc = take(data, { + returnValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1467,10 +1487,9 @@ const de_EnableSharingWithAwsOrganizationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1490,9 +1509,10 @@ export const de_GetPermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.permission != null) { - contents.permission = de_ResourceSharePermissionDetail(data.permission, context); - } + const doc = take(data, { + permission: (_) => de_ResourceSharePermissionDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1529,10 +1549,9 @@ const de_GetPermissionCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1552,12 +1571,11 @@ export const de_GetResourcePoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.policies != null) { - contents.policies = de_PolicyList(data.policies, context); - } + const doc = take(data, { + nextToken: __expectString, + policies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1594,10 +1612,9 @@ const de_GetResourcePoliciesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1617,12 +1634,11 @@ export const de_GetResourceShareAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resourceShareAssociations != null) { - contents.resourceShareAssociations = de_ResourceShareAssociationList(data.resourceShareAssociations, context); - } + const doc = take(data, { + nextToken: __expectString, + resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1662,10 +1678,9 @@ const de_GetResourceShareAssociationsCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1685,12 +1700,11 @@ export const de_GetResourceShareInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resourceShareInvitations != null) { - contents.resourceShareInvitations = de_ResourceShareInvitationList(data.resourceShareInvitations, context); - } + const doc = take(data, { + nextToken: __expectString, + resourceShareInvitations: (_) => de_ResourceShareInvitationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1733,10 +1747,9 @@ const de_GetResourceShareInvitationsCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1756,12 +1769,11 @@ export const de_GetResourceSharesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resourceShares != null) { - contents.resourceShares = de_ResourceShareList(data.resourceShares, context); - } + const doc = take(data, { + nextToken: __expectString, + resourceShares: (_) => de_ResourceShareList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1798,10 +1810,9 @@ const de_GetResourceSharesCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1821,12 +1832,11 @@ export const de_ListPendingInvitationResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resources != null) { - contents.resources = de_ResourceList(data.resources, context); - } + const doc = take(data, { + nextToken: __expectString, + resources: (_) => de_ResourceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1872,10 +1882,9 @@ const de_ListPendingInvitationResourcesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1895,12 +1904,11 @@ export const de_ListPermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissions != null) { - contents.permissions = de_ResourceSharePermissionList(data.permissions, context); - } + const doc = take(data, { + nextToken: __expectString, + permissions: (_) => de_ResourceSharePermissionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1934,10 +1942,9 @@ const de_ListPermissionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1957,12 +1964,11 @@ export const de_ListPermissionVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissions != null) { - contents.permissions = de_ResourceSharePermissionList(data.permissions, context); - } + const doc = take(data, { + nextToken: __expectString, + permissions: (_) => de_ResourceSharePermissionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2002,10 +2008,9 @@ const de_ListPermissionVersionsCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2025,12 +2030,11 @@ export const de_ListPrincipalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.principals != null) { - contents.principals = de_PrincipalList(data.principals, context); - } + const doc = take(data, { + nextToken: __expectString, + principals: (_) => de_PrincipalList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2067,10 +2071,9 @@ const de_ListPrincipalsCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2090,12 +2093,11 @@ export const de_ListResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resources != null) { - contents.resources = de_ResourceList(data.resources, context); - } + const doc = take(data, { + nextToken: __expectString, + resources: (_) => de_ResourceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2135,10 +2137,9 @@ const de_ListResourcesCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2158,12 +2159,11 @@ export const de_ListResourceSharePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissions != null) { - contents.permissions = de_ResourceSharePermissionList(data.permissions, context); - } + const doc = take(data, { + nextToken: __expectString, + permissions: (_) => de_ResourceSharePermissionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2203,10 +2203,9 @@ const de_ListResourceSharePermissionsCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2226,12 +2225,11 @@ export const de_ListResourceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resourceTypes != null) { - contents.resourceTypes = de_ServiceNameAndResourceTypeList(data.resourceTypes, context); - } + const doc = take(data, { + nextToken: __expectString, + resourceTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2262,10 +2260,9 @@ const de_ListResourceTypesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2285,9 +2282,10 @@ export const de_PromoteResourceShareCreatedFromPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.returnValue != null) { - contents.returnValue = __expectBoolean(data.returnValue); - } + const doc = take(data, { + returnValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -2330,10 +2328,9 @@ const de_PromoteResourceShareCreatedFromPolicyCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2353,12 +2350,11 @@ export const de_RejectResourceShareInvitationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.resourceShareInvitation != null) { - contents.resourceShareInvitation = de_ResourceShareInvitation(data.resourceShareInvitation, context); - } + const doc = take(data, { + clientToken: __expectString, + resourceShareInvitation: (_) => de_ResourceShareInvitation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2407,10 +2403,9 @@ const de_RejectResourceShareInvitationCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2472,10 +2467,9 @@ const de_TagResourceCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2522,10 +2516,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2545,12 +2538,11 @@ export const de_UpdateResourceShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.clientToken != null) { - contents.clientToken = __expectString(data.clientToken); - } - if (data.resourceShare != null) { - contents.resourceShare = de_ResourceShare(data.resourceShare, context); - } + const doc = take(data, { + clientToken: __expectString, + resourceShare: (_) => de_ResourceShare(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2596,16 +2588,15 @@ const de_UpdateResourceShareCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1IdempotentParameterMismatchExceptionRes */ @@ -2615,9 +2606,10 @@ const de_IdempotentParameterMismatchExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2634,9 +2626,10 @@ const de_InvalidClientTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidClientTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2653,9 +2646,10 @@ const de_InvalidMaxResultsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidMaxResultsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2672,9 +2666,10 @@ const de_InvalidNextTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2691,9 +2686,10 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2710,9 +2706,10 @@ const de_InvalidResourceTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidResourceTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2729,9 +2726,10 @@ const de_InvalidStateTransitionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidStateTransitionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2748,9 +2746,10 @@ const de_MalformedArnExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MalformedArnException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2767,9 +2766,10 @@ const de_MissingRequiredParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MissingRequiredParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2786,9 +2786,10 @@ const de_OperationNotPermittedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new OperationNotPermittedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2805,9 +2806,10 @@ const de_ResourceArnNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceArnNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2824,9 +2826,10 @@ const de_ResourceShareInvitationAlreadyAcceptedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceShareInvitationAlreadyAcceptedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2843,9 +2846,10 @@ const de_ResourceShareInvitationAlreadyRejectedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceShareInvitationAlreadyRejectedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2862,9 +2866,10 @@ const de_ResourceShareInvitationArnNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceShareInvitationArnNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2881,9 +2886,10 @@ const de_ResourceShareInvitationExpiredExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceShareInvitationExpiredException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2900,9 +2906,10 @@ const de_ResourceShareLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceShareLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2919,9 +2926,10 @@ const de_ServerInternalExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServerInternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2938,9 +2946,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2957,9 +2966,10 @@ const de_TagLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TagLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2976,9 +2986,10 @@ const de_TagPolicyViolationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TagPolicyViolationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2992,9 +3003,10 @@ const de_TagPolicyViolationExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3011,9 +3023,10 @@ const de_UnknownResourceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnknownResourceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3021,157 +3034,41 @@ const de_UnknownResourceExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1PermissionArnList - */ -const se_PermissionArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PermissionArnList omitted. -/** - * serializeAws_restJson1PrincipalArnOrIdList - */ -const se_PrincipalArnOrIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PrincipalArnOrIdList omitted. -/** - * serializeAws_restJson1ResourceArnList - */ -const se_ResourceArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceArnList omitted. -/** - * serializeAws_restJson1ResourceShareArnList - */ -const se_ResourceShareArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceShareArnList omitted. -/** - * serializeAws_restJson1ResourceShareInvitationArnList - */ -const se_ResourceShareInvitationArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceShareInvitationArnList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagFilter - */ -const se_TagFilter = (input: TagFilter, context: __SerdeContext): any => { - return { - ...(input.tagKey != null && { tagKey: input.tagKey }), - ...(input.tagValues != null && { tagValues: se_TagValueList(input.tagValues, context) }), - }; -}; +// se_TagFilter omitted. -/** - * serializeAws_restJson1TagFilters - */ -const se_TagFilters = (input: TagFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagFilter(entry, context); - }); -}; +// se_TagFilters omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1TagValueList - */ -const se_TagValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagValueList omitted. -/** - * deserializeAws_restJson1PolicyList - */ -const de_PolicyList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PolicyList omitted. /** * deserializeAws_restJson1Principal */ const de_Principal = (output: any, context: __SerdeContext): Principal => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - external: __expectBoolean(output.external), - id: __expectString(output.id), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - resourceShareArn: __expectString(output.resourceShareArn), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + external: __expectBoolean, + id: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceShareArn: __expectString, + }) as any; }; /** @@ -3181,9 +3078,6 @@ const de_PrincipalList = (output: any, context: __SerdeContext): Principal[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Principal(entry, context); }); return retVal; @@ -3193,23 +3087,17 @@ const de_PrincipalList = (output: any, context: __SerdeContext): Principal[] => * deserializeAws_restJson1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - resourceGroupArn: __expectString(output.resourceGroupArn), - resourceRegionScope: __expectString(output.resourceRegionScope), - resourceShareArn: __expectString(output.resourceShareArn), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - type: __expectString(output.type), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceGroupArn: __expectString, + resourceRegionScope: __expectString, + resourceShareArn: __expectString, + status: __expectString, + statusMessage: __expectString, + type: __expectString, + }) as any; }; /** @@ -3219,9 +3107,6 @@ const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Resource(entry, context); }); return retVal; @@ -3231,47 +3116,35 @@ const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { * deserializeAws_restJson1ResourceShare */ const de_ResourceShare = (output: any, context: __SerdeContext): ResourceShare => { - return { - allowExternalPrincipals: __expectBoolean(output.allowExternalPrincipals), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - featureSet: __expectString(output.featureSet), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - name: __expectString(output.name), - owningAccountId: __expectString(output.owningAccountId), - resourceShareArn: __expectString(output.resourceShareArn), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; + return take(output, { + allowExternalPrincipals: __expectBoolean, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + featureSet: __expectString, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + owningAccountId: __expectString, + resourceShareArn: __expectString, + status: __expectString, + statusMessage: __expectString, + tags: _json, + }) as any; }; /** * deserializeAws_restJson1ResourceShareAssociation */ const de_ResourceShareAssociation = (output: any, context: __SerdeContext): ResourceShareAssociation => { - return { - associatedEntity: __expectString(output.associatedEntity), - associationType: __expectString(output.associationType), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - external: __expectBoolean(output.external), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - resourceShareArn: __expectString(output.resourceShareArn), - resourceShareName: __expectString(output.resourceShareName), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - } as any; + return take(output, { + associatedEntity: __expectString, + associationType: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + external: __expectBoolean, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + resourceShareArn: __expectString, + resourceShareName: __expectString, + status: __expectString, + statusMessage: __expectString, + }) as any; }; /** @@ -3281,9 +3154,6 @@ const de_ResourceShareAssociationList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceShareAssociation(entry, context); }); return retVal; @@ -3293,23 +3163,17 @@ const de_ResourceShareAssociationList = (output: any, context: __SerdeContext): * deserializeAws_restJson1ResourceShareInvitation */ const de_ResourceShareInvitation = (output: any, context: __SerdeContext): ResourceShareInvitation => { - return { - invitationTimestamp: - output.invitationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.invitationTimestamp))) - : undefined, - receiverAccountId: __expectString(output.receiverAccountId), - receiverArn: __expectString(output.receiverArn), - resourceShareArn: __expectString(output.resourceShareArn), - resourceShareAssociations: - output.resourceShareAssociations != null - ? de_ResourceShareAssociationList(output.resourceShareAssociations, context) - : undefined, - resourceShareInvitationArn: __expectString(output.resourceShareInvitationArn), - resourceShareName: __expectString(output.resourceShareName), - senderAccountId: __expectString(output.senderAccountId), - status: __expectString(output.status), - } as any; + return take(output, { + invitationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + receiverAccountId: __expectString, + receiverArn: __expectString, + resourceShareArn: __expectString, + resourceShareAssociations: (_: any) => de_ResourceShareAssociationList(_, context), + resourceShareInvitationArn: __expectString, + resourceShareName: __expectString, + senderAccountId: __expectString, + status: __expectString, + }) as any; }; /** @@ -3319,9 +3183,6 @@ const de_ResourceShareInvitationList = (output: any, context: __SerdeContext): R const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceShareInvitation(entry, context); }); return retVal; @@ -3334,9 +3195,6 @@ const de_ResourceShareList = (output: any, context: __SerdeContext): ResourceSha const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceShare(entry, context); }); return retVal; @@ -3346,23 +3204,17 @@ const de_ResourceShareList = (output: any, context: __SerdeContext): ResourceSha * deserializeAws_restJson1ResourceSharePermissionDetail */ const de_ResourceSharePermissionDetail = (output: any, context: __SerdeContext): ResourceSharePermissionDetail => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - defaultVersion: __expectBoolean(output.defaultVersion), - isResourceTypeDefault: __expectBoolean(output.isResourceTypeDefault), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - name: __expectString(output.name), - permission: __expectString(output.permission), - resourceType: __expectString(output.resourceType), - version: __expectString(output.version), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultVersion: __expectBoolean, + isResourceTypeDefault: __expectBoolean, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + permission: __expectString, + resourceType: __expectString, + version: __expectString, + }) as any; }; /** @@ -3372,9 +3224,6 @@ const de_ResourceSharePermissionList = (output: any, context: __SerdeContext): R const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceSharePermissionSummary(entry, context); }); return retVal; @@ -3384,75 +3233,26 @@ const de_ResourceSharePermissionList = (output: any, context: __SerdeContext): R * deserializeAws_restJson1ResourceSharePermissionSummary */ const de_ResourceSharePermissionSummary = (output: any, context: __SerdeContext): ResourceSharePermissionSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - defaultVersion: __expectBoolean(output.defaultVersion), - isResourceTypeDefault: __expectBoolean(output.isResourceTypeDefault), - lastUpdatedTime: - output.lastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedTime))) - : undefined, - name: __expectString(output.name), - resourceType: __expectString(output.resourceType), - status: __expectString(output.status), - version: __expectString(output.version), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + defaultVersion: __expectBoolean, + isResourceTypeDefault: __expectBoolean, + lastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + resourceType: __expectString, + status: __expectString, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ServiceNameAndResourceType - */ -const de_ServiceNameAndResourceType = (output: any, context: __SerdeContext): ServiceNameAndResourceType => { - return { - resourceRegionScope: __expectString(output.resourceRegionScope), - resourceType: __expectString(output.resourceType), - serviceName: __expectString(output.serviceName), - } as any; -}; +// de_ServiceNameAndResourceType omitted. -/** - * deserializeAws_restJson1ServiceNameAndResourceTypeList - */ -const de_ServiceNameAndResourceTypeList = (output: any, context: __SerdeContext): ServiceNameAndResourceType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceNameAndResourceType(entry, context); - }); - return retVal; -}; +// de_ServiceNameAndResourceTypeList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-rbin/src/protocols/Aws_restJson1.ts b/clients/client-rbin/src/protocols/Aws_restJson1.ts index 83242ef0d14e..7f3ca2b25a85 100644 --- a/clients/client-rbin/src/protocols/Aws_restJson1.ts +++ b/clients/client-rbin/src/protocols/Aws_restJson1.ts @@ -1,17 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -39,7 +40,6 @@ import { ResourceNotFoundException, ResourceTag, RetentionPeriod, - RuleSummary, ServiceQuotaExceededException, Tag, UnlockDelay, @@ -60,16 +60,16 @@ export const se_CreateRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.LockConfiguration != null && { - LockConfiguration: se_LockConfiguration(input.LockConfiguration, context), - }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTags(input.ResourceTags, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.RetentionPeriod != null && { RetentionPeriod: se_RetentionPeriod(input.RetentionPeriod, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + LockConfiguration: (_) => _json(_), + ResourceTags: (_) => _json(_), + ResourceType: [], + RetentionPeriod: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -140,13 +140,15 @@ export const se_ListRulesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-rules"; let body: any; - body = JSON.stringify({ - ...(input.LockState != null && { LockState: input.LockState }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTags(input.ResourceTags, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }); + body = JSON.stringify( + take(input, { + LockState: [], + MaxResults: [], + NextToken: [], + ResourceTags: (_) => _json(_), + ResourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -195,11 +197,11 @@ export const se_LockRuleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{Identifier}/lock"; resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); let body: any; - body = JSON.stringify({ - ...(input.LockConfiguration != null && { - LockConfiguration: se_LockConfiguration(input.LockConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + LockConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -225,9 +227,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -307,12 +311,14 @@ export const se_UpdateRuleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{Identifier}"; resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.ResourceTags != null && { ResourceTags: se_ResourceTags(input.ResourceTags, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.RetentionPeriod != null && { RetentionPeriod: se_RetentionPeriod(input.RetentionPeriod, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + ResourceTags: (_) => _json(_), + ResourceType: [], + RetentionPeriod: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -338,33 +344,18 @@ export const de_CreateRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Identifier != null) { - contents.Identifier = __expectString(data.Identifier); - } - if (data.LockConfiguration != null) { - contents.LockConfiguration = de_LockConfiguration(data.LockConfiguration, context); - } - if (data.LockState != null) { - contents.LockState = __expectString(data.LockState); - } - if (data.ResourceTags != null) { - contents.ResourceTags = de_ResourceTags(data.ResourceTags, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.RetentionPeriod != null) { - contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Description: __expectString, + Identifier: __expectString, + LockConfiguration: _json, + LockState: __expectString, + ResourceTags: _json, + ResourceType: __expectString, + RetentionPeriod: _json, + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -392,10 +383,9 @@ const de_CreateRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -445,10 +435,9 @@ const de_DeleteRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -468,33 +457,18 @@ export const de_GetRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Identifier != null) { - contents.Identifier = __expectString(data.Identifier); - } - if (data.LockConfiguration != null) { - contents.LockConfiguration = de_LockConfiguration(data.LockConfiguration, context); - } - if (data.LockEndTime != null) { - contents.LockEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockEndTime))); - } - if (data.LockState != null) { - contents.LockState = __expectString(data.LockState); - } - if (data.ResourceTags != null) { - contents.ResourceTags = de_ResourceTags(data.ResourceTags, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.RetentionPeriod != null) { - contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Description: __expectString, + Identifier: __expectString, + LockConfiguration: _json, + LockEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LockState: __expectString, + ResourceTags: _json, + ResourceType: __expectString, + RetentionPeriod: _json, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -522,10 +496,9 @@ const de_GetRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -545,12 +518,11 @@ export const de_ListRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Rules != null) { - contents.Rules = de_RuleSummaryList(data.Rules, context); - } + const doc = take(data, { + NextToken: __expectString, + Rules: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -575,10 +547,9 @@ const de_ListRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -598,9 +569,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -628,10 +600,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -651,30 +622,17 @@ export const de_LockRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Identifier != null) { - contents.Identifier = __expectString(data.Identifier); - } - if (data.LockConfiguration != null) { - contents.LockConfiguration = de_LockConfiguration(data.LockConfiguration, context); - } - if (data.LockState != null) { - contents.LockState = __expectString(data.LockState); - } - if (data.ResourceTags != null) { - contents.ResourceTags = de_ResourceTags(data.ResourceTags, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.RetentionPeriod != null) { - contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Description: __expectString, + Identifier: __expectString, + LockConfiguration: _json, + LockState: __expectString, + ResourceTags: _json, + ResourceType: __expectString, + RetentionPeriod: _json, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -705,10 +663,9 @@ const de_LockRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -758,10 +715,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -781,33 +737,18 @@ export const de_UnlockRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Identifier != null) { - contents.Identifier = __expectString(data.Identifier); - } - if (data.LockConfiguration != null) { - contents.LockConfiguration = de_LockConfiguration(data.LockConfiguration, context); - } - if (data.LockEndTime != null) { - contents.LockEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockEndTime))); - } - if (data.LockState != null) { - contents.LockState = __expectString(data.LockState); - } - if (data.ResourceTags != null) { - contents.ResourceTags = de_ResourceTags(data.ResourceTags, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.RetentionPeriod != null) { - contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Description: __expectString, + Identifier: __expectString, + LockConfiguration: _json, + LockEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LockState: __expectString, + ResourceTags: _json, + ResourceType: __expectString, + RetentionPeriod: _json, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -838,10 +779,9 @@ const de_UnlockRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -888,10 +828,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -911,30 +850,17 @@ export const de_UpdateRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Identifier != null) { - contents.Identifier = __expectString(data.Identifier); - } - if (data.LockEndTime != null) { - contents.LockEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockEndTime))); - } - if (data.LockState != null) { - contents.LockState = __expectString(data.LockState); - } - if (data.ResourceTags != null) { - contents.ResourceTags = de_ResourceTags(data.ResourceTags, context); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.RetentionPeriod != null) { - contents.RetentionPeriod = de_RetentionPeriod(data.RetentionPeriod, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + Description: __expectString, + Identifier: __expectString, + LockEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LockState: __expectString, + ResourceTags: _json, + ResourceType: __expectString, + RetentionPeriod: _json, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -965,28 +891,26 @@ const de_UpdateRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1003,9 +927,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1022,12 +947,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1044,12 +968,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1063,12 +986,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1076,182 +998,37 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1LockConfiguration - */ -const se_LockConfiguration = (input: LockConfiguration, context: __SerdeContext): any => { - return { - ...(input.UnlockDelay != null && { UnlockDelay: se_UnlockDelay(input.UnlockDelay, context) }), - }; -}; +// se_LockConfiguration omitted. -/** - * serializeAws_restJson1ResourceTag - */ -const se_ResourceTag = (input: ResourceTag, context: __SerdeContext): any => { - return { - ...(input.ResourceTagKey != null && { ResourceTagKey: input.ResourceTagKey }), - ...(input.ResourceTagValue != null && { ResourceTagValue: input.ResourceTagValue }), - }; -}; +// se_ResourceTag omitted. -/** - * serializeAws_restJson1ResourceTags - */ -const se_ResourceTags = (input: ResourceTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceTag(entry, context); - }); -}; +// se_ResourceTags omitted. -/** - * serializeAws_restJson1RetentionPeriod - */ -const se_RetentionPeriod = (input: RetentionPeriod, context: __SerdeContext): any => { - return { - ...(input.RetentionPeriodUnit != null && { RetentionPeriodUnit: input.RetentionPeriodUnit }), - ...(input.RetentionPeriodValue != null && { RetentionPeriodValue: input.RetentionPeriodValue }), - }; -}; +// se_RetentionPeriod omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1UnlockDelay - */ -const se_UnlockDelay = (input: UnlockDelay, context: __SerdeContext): any => { - return { - ...(input.UnlockDelayUnit != null && { UnlockDelayUnit: input.UnlockDelayUnit }), - ...(input.UnlockDelayValue != null && { UnlockDelayValue: input.UnlockDelayValue }), - }; -}; +// se_UnlockDelay omitted. -/** - * deserializeAws_restJson1LockConfiguration - */ -const de_LockConfiguration = (output: any, context: __SerdeContext): LockConfiguration => { - return { - UnlockDelay: output.UnlockDelay != null ? de_UnlockDelay(output.UnlockDelay, context) : undefined, - } as any; -}; +// de_LockConfiguration omitted. -/** - * deserializeAws_restJson1ResourceTag - */ -const de_ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { - return { - ResourceTagKey: __expectString(output.ResourceTagKey), - ResourceTagValue: __expectString(output.ResourceTagValue), - } as any; -}; +// de_ResourceTag omitted. -/** - * deserializeAws_restJson1ResourceTags - */ -const de_ResourceTags = (output: any, context: __SerdeContext): ResourceTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTag(entry, context); - }); - return retVal; -}; +// de_ResourceTags omitted. -/** - * deserializeAws_restJson1RetentionPeriod - */ -const de_RetentionPeriod = (output: any, context: __SerdeContext): RetentionPeriod => { - return { - RetentionPeriodUnit: __expectString(output.RetentionPeriodUnit), - RetentionPeriodValue: __expectInt32(output.RetentionPeriodValue), - } as any; -}; +// de_RetentionPeriod omitted. -/** - * deserializeAws_restJson1RuleSummary - */ -const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { - return { - Description: __expectString(output.Description), - Identifier: __expectString(output.Identifier), - LockState: __expectString(output.LockState), - RetentionPeriod: output.RetentionPeriod != null ? de_RetentionPeriod(output.RetentionPeriod, context) : undefined, - } as any; -}; +// de_RuleSummary omitted. -/** - * deserializeAws_restJson1RuleSummaryList - */ -const de_RuleSummaryList = (output: any, context: __SerdeContext): RuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleSummary(entry, context); - }); - return retVal; -}; +// de_RuleSummaryList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1UnlockDelay - */ -const de_UnlockDelay = (output: any, context: __SerdeContext): UnlockDelay => { - return { - UnlockDelayUnit: __expectString(output.UnlockDelayUnit), - UnlockDelayValue: __expectInt32(output.UnlockDelayValue), - } as any; -}; +// de_UnlockDelay omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-rds-data/src/protocols/Aws_restJson1.ts b/clients/client-rds-data/src/protocols/Aws_restJson1.ts index 168def7fcfc0..db1256b96899 100644 --- a/clients/client-rds-data/src/protocols/Aws_restJson1.ts +++ b/clients/client-rds-data/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,9 +12,10 @@ import { expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -38,13 +40,11 @@ import { AccessDeniedException, ArrayValue, BadRequestException, - ColumnMetadata, Field, ForbiddenException, InternalServerErrorException, NotFoundException, ResultFrame, - ResultSetMetadata, ResultSetOptions, ServiceUnavailableError, SqlParameter, @@ -69,15 +69,17 @@ export const se_BatchExecuteStatementCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchExecute"; let body: any; - body = JSON.stringify({ - ...(input.database != null && { database: input.database }), - ...(input.parameterSets != null && { parameterSets: se_SqlParameterSets(input.parameterSets, context) }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.schema != null && { schema: input.schema }), - ...(input.secretArn != null && { secretArn: input.secretArn }), - ...(input.sql != null && { sql: input.sql }), - ...(input.transactionId != null && { transactionId: input.transactionId }), - }); + body = JSON.stringify( + take(input, { + database: [], + parameterSets: (_) => se_SqlParameterSets(_, context), + resourceArn: [], + schema: [], + secretArn: [], + sql: [], + transactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -102,12 +104,14 @@ export const se_BeginTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BeginTransaction"; let body: any; - body = JSON.stringify({ - ...(input.database != null && { database: input.database }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.schema != null && { schema: input.schema }), - ...(input.secretArn != null && { secretArn: input.secretArn }), - }); + body = JSON.stringify( + take(input, { + database: [], + resourceArn: [], + schema: [], + secretArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -132,11 +136,13 @@ export const se_CommitTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CommitTransaction"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.secretArn != null && { secretArn: input.secretArn }), - ...(input.transactionId != null && { transactionId: input.transactionId }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + secretArn: [], + transactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -161,13 +167,15 @@ export const se_ExecuteSqlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ExecuteSql"; let body: any; - body = JSON.stringify({ - ...(input.awsSecretStoreArn != null && { awsSecretStoreArn: input.awsSecretStoreArn }), - ...(input.database != null && { database: input.database }), - ...(input.dbClusterOrInstanceArn != null && { dbClusterOrInstanceArn: input.dbClusterOrInstanceArn }), - ...(input.schema != null && { schema: input.schema }), - ...(input.sqlStatements != null && { sqlStatements: input.sqlStatements }), - }); + body = JSON.stringify( + take(input, { + awsSecretStoreArn: [], + database: [], + dbClusterOrInstanceArn: [], + schema: [], + sqlStatements: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -192,19 +200,21 @@ export const se_ExecuteStatementCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Execute"; let body: any; - body = JSON.stringify({ - ...(input.continueAfterTimeout != null && { continueAfterTimeout: input.continueAfterTimeout }), - ...(input.database != null && { database: input.database }), - ...(input.formatRecordsAs != null && { formatRecordsAs: input.formatRecordsAs }), - ...(input.includeResultMetadata != null && { includeResultMetadata: input.includeResultMetadata }), - ...(input.parameters != null && { parameters: se_SqlParametersList(input.parameters, context) }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.resultSetOptions != null && { resultSetOptions: se_ResultSetOptions(input.resultSetOptions, context) }), - ...(input.schema != null && { schema: input.schema }), - ...(input.secretArn != null && { secretArn: input.secretArn }), - ...(input.sql != null && { sql: input.sql }), - ...(input.transactionId != null && { transactionId: input.transactionId }), - }); + body = JSON.stringify( + take(input, { + continueAfterTimeout: [], + database: [], + formatRecordsAs: [], + includeResultMetadata: [], + parameters: (_) => se_SqlParametersList(_, context), + resourceArn: [], + resultSetOptions: (_) => _json(_), + schema: [], + secretArn: [], + sql: [], + transactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -229,11 +239,13 @@ export const se_RollbackTransactionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RollbackTransaction"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.secretArn != null && { secretArn: input.secretArn }), - ...(input.transactionId != null && { transactionId: input.transactionId }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + secretArn: [], + transactionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -259,9 +271,10 @@ export const de_BatchExecuteStatementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.updateResults != null) { - contents.updateResults = de_UpdateResults(data.updateResults, context); - } + const doc = take(data, { + updateResults: (_) => de_UpdateResults(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -298,10 +311,9 @@ const de_BatchExecuteStatementCommandError = async ( throw await de_StatementTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -321,9 +333,10 @@ export const de_BeginTransactionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.transactionId != null) { - contents.transactionId = __expectString(data.transactionId); - } + const doc = take(data, { + transactionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -360,10 +373,9 @@ const de_BeginTransactionCommandError = async ( throw await de_StatementTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -383,9 +395,10 @@ export const de_CommitTransactionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.transactionStatus != null) { - contents.transactionStatus = __expectString(data.transactionStatus); - } + const doc = take(data, { + transactionStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -425,10 +438,9 @@ const de_CommitTransactionCommandError = async ( throw await de_StatementTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -448,9 +460,10 @@ export const de_ExecuteSqlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.sqlStatementResults != null) { - contents.sqlStatementResults = de_SqlStatementResults(data.sqlStatementResults, context); - } + const doc = take(data, { + sqlStatementResults: (_) => de_SqlStatementResults(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -484,10 +497,9 @@ const de_ExecuteSqlCommandError = async ( throw await de_ServiceUnavailableErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -507,21 +519,14 @@ export const de_ExecuteStatementCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.columnMetadata != null) { - contents.columnMetadata = de_Metadata(data.columnMetadata, context); - } - if (data.formattedRecords != null) { - contents.formattedRecords = __expectString(data.formattedRecords); - } - if (data.generatedFields != null) { - contents.generatedFields = de_FieldList(data.generatedFields, context); - } - if (data.numberOfRecordsUpdated != null) { - contents.numberOfRecordsUpdated = __expectLong(data.numberOfRecordsUpdated); - } - if (data.records != null) { - contents.records = de_SqlRecords(data.records, context); - } + const doc = take(data, { + columnMetadata: _json, + formattedRecords: __expectString, + generatedFields: (_) => de_FieldList(_, context), + numberOfRecordsUpdated: __expectLong, + records: (_) => de_SqlRecords(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -558,10 +563,9 @@ const de_ExecuteStatementCommandError = async ( throw await de_StatementTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -581,9 +585,10 @@ export const de_RollbackTransactionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.transactionStatus != null) { - contents.transactionStatus = __expectString(data.transactionStatus); - } + const doc = take(data, { + transactionStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -623,16 +628,15 @@ const de_RollbackTransactionCommandError = async ( throw await de_StatementTimeoutExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -642,9 +646,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -658,9 +663,10 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -674,9 +680,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -693,6 +700,8 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -706,9 +715,10 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -725,6 +735,8 @@ const de_ServiceUnavailableErrorRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new ServiceUnavailableError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -741,12 +753,11 @@ const de_StatementTimeoutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.dbConnectionId != null) { - contents.dbConnectionId = __expectLong(data.dbConnectionId); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + dbConnectionId: __expectLong, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new StatementTimeoutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -771,24 +782,15 @@ const se_ArrayOfArray = (input: ArrayValue[], context: __SerdeContext): any => { const se_ArrayValue = (input: ArrayValue, context: __SerdeContext): any => { return ArrayValue.visit(input, { arrayValues: (value) => ({ arrayValues: se_ArrayOfArray(value, context) }), - booleanValues: (value) => ({ booleanValues: se_BooleanArray(value, context) }), + booleanValues: (value) => ({ booleanValues: _json(value) }), doubleValues: (value) => ({ doubleValues: se_DoubleArray(value, context) }), - longValues: (value) => ({ longValues: se_LongArray(value, context) }), - stringValues: (value) => ({ stringValues: se_StringArray(value, context) }), + longValues: (value) => ({ longValues: _json(value) }), + stringValues: (value) => ({ stringValues: _json(value) }), _: (name, value) => ({ name: value } as any), }); }; -/** - * serializeAws_restJson1BooleanArray - */ -const se_BooleanArray = (input: boolean[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BooleanArray omitted. /** * serializeAws_restJson1DoubleArray @@ -817,36 +819,19 @@ const se_Field = (input: Field, context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1LongArray - */ -const se_LongArray = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LongArray omitted. -/** - * serializeAws_restJson1ResultSetOptions - */ -const se_ResultSetOptions = (input: ResultSetOptions, context: __SerdeContext): any => { - return { - ...(input.decimalReturnType != null && { decimalReturnType: input.decimalReturnType }), - ...(input.longReturnType != null && { longReturnType: input.longReturnType }), - }; -}; +// se_ResultSetOptions omitted. /** * serializeAws_restJson1SqlParameter */ const se_SqlParameter = (input: SqlParameter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.typeHint != null && { typeHint: input.typeHint }), - ...(input.value != null && { value: se_Field(input.value, context) }), - }; + return take(input, { + name: [], + typeHint: [], + value: (_) => se_Field(_, context), + }); }; /** @@ -871,16 +856,7 @@ const se_SqlParametersList = (input: SqlParameter[], context: __SerdeContext): a }); }; -/** - * serializeAws_restJson1StringArray - */ -const se_StringArray = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringArray omitted. /** * deserializeAws_restJson1ArrayOfArray @@ -889,9 +865,6 @@ const de_ArrayOfArray = (output: any, context: __SerdeContext): ArrayValue[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ArrayValue(__expectUnion(entry), context); }); return retVal; @@ -908,7 +881,7 @@ const de_ArrayValue = (output: any, context: __SerdeContext): ArrayValue => { } if (output.booleanValues != null) { return { - booleanValues: de_BooleanArray(output.booleanValues, context), + booleanValues: _json(output.booleanValues), }; } if (output.doubleValues != null) { @@ -918,12 +891,12 @@ const de_ArrayValue = (output: any, context: __SerdeContext): ArrayValue => { } if (output.longValues != null) { return { - longValues: de_LongArray(output.longValues, context), + longValues: _json(output.longValues), }; } if (output.stringValues != null) { return { - stringValues: de_StringArray(output.stringValues, context), + stringValues: _json(output.stringValues), }; } return { $unknown: Object.entries(output)[0] }; @@ -936,50 +909,14 @@ const de_ArrayValueList = (output: any, context: __SerdeContext): Value[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Value(__expectUnion(entry), context); }); return retVal; }; -/** - * deserializeAws_restJson1BooleanArray - */ -const de_BooleanArray = (output: any, context: __SerdeContext): boolean[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectBoolean(entry) as any; - }); - return retVal; -}; +// de_BooleanArray omitted. -/** - * deserializeAws_restJson1ColumnMetadata - */ -const de_ColumnMetadata = (output: any, context: __SerdeContext): ColumnMetadata => { - return { - arrayBaseColumnType: __expectInt32(output.arrayBaseColumnType), - isAutoIncrement: __expectBoolean(output.isAutoIncrement), - isCaseSensitive: __expectBoolean(output.isCaseSensitive), - isCurrency: __expectBoolean(output.isCurrency), - isSigned: __expectBoolean(output.isSigned), - label: __expectString(output.label), - name: __expectString(output.name), - nullable: __expectInt32(output.nullable), - precision: __expectInt32(output.precision), - scale: __expectInt32(output.scale), - schemaName: __expectString(output.schemaName), - tableName: __expectString(output.tableName), - type: __expectInt32(output.type), - typeName: __expectString(output.typeName), - } as any; -}; +// de_ColumnMetadata omitted. /** * deserializeAws_restJson1DoubleArray @@ -988,9 +925,6 @@ const de_DoubleArray = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; @@ -1035,51 +969,22 @@ const de_FieldList = (output: any, context: __SerdeContext): Field[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Field(__expectUnion(entry), context); }); return retVal; }; -/** - * deserializeAws_restJson1LongArray - */ -const de_LongArray = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; - }); - return retVal; -}; +// de_LongArray omitted. -/** - * deserializeAws_restJson1Metadata - */ -const de_Metadata = (output: any, context: __SerdeContext): ColumnMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnMetadata(entry, context); - }); - return retVal; -}; +// de_Metadata omitted. /** * deserializeAws_restJson1_Record */ const de__Record = (output: any, context: __SerdeContext): _Record => { - return { - values: output.values != null ? de_Row(output.values, context) : undefined, - } as any; + return take(output, { + values: (_: any) => de_Row(_, context), + }) as any; }; /** @@ -1089,9 +994,6 @@ const de_Records = (output: any, context: __SerdeContext): _Record[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de__Record(entry, context); }); return retVal; @@ -1101,22 +1003,13 @@ const de_Records = (output: any, context: __SerdeContext): _Record[] => { * deserializeAws_restJson1ResultFrame */ const de_ResultFrame = (output: any, context: __SerdeContext): ResultFrame => { - return { - records: output.records != null ? de_Records(output.records, context) : undefined, - resultSetMetadata: - output.resultSetMetadata != null ? de_ResultSetMetadata(output.resultSetMetadata, context) : undefined, - } as any; + return take(output, { + records: (_: any) => de_Records(_, context), + resultSetMetadata: _json, + }) as any; }; -/** - * deserializeAws_restJson1ResultSetMetadata - */ -const de_ResultSetMetadata = (output: any, context: __SerdeContext): ResultSetMetadata => { - return { - columnCount: __expectLong(output.columnCount), - columnMetadata: output.columnMetadata != null ? de_Metadata(output.columnMetadata, context) : undefined, - } as any; -}; +// de_ResultSetMetadata omitted. /** * deserializeAws_restJson1Row @@ -1125,9 +1018,6 @@ const de_Row = (output: any, context: __SerdeContext): Value[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Value(__expectUnion(entry), context); }); return retVal; @@ -1140,9 +1030,6 @@ const de_SqlRecords = (output: any, context: __SerdeContext): Field[][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FieldList(entry, context); }); return retVal; @@ -1152,10 +1039,10 @@ const de_SqlRecords = (output: any, context: __SerdeContext): Field[][] => { * deserializeAws_restJson1SqlStatementResult */ const de_SqlStatementResult = (output: any, context: __SerdeContext): SqlStatementResult => { - return { - numberOfRecordsUpdated: __expectLong(output.numberOfRecordsUpdated), - resultFrame: output.resultFrame != null ? de_ResultFrame(output.resultFrame, context) : undefined, - } as any; + return take(output, { + numberOfRecordsUpdated: __expectLong, + resultFrame: (_: any) => de_ResultFrame(_, context), + }) as any; }; /** @@ -1165,45 +1052,29 @@ const de_SqlStatementResults = (output: any, context: __SerdeContext): SqlStatem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SqlStatementResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StringArray - */ -const de_StringArray = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringArray omitted. /** * deserializeAws_restJson1StructValue */ const de_StructValue = (output: any, context: __SerdeContext): StructValue => { - return { - attributes: output.attributes != null ? de_ArrayValueList(output.attributes, context) : undefined, - } as any; + return take(output, { + attributes: (_: any) => de_ArrayValueList(_, context), + }) as any; }; /** * deserializeAws_restJson1UpdateResult */ const de_UpdateResult = (output: any, context: __SerdeContext): UpdateResult => { - return { - generatedFields: output.generatedFields != null ? de_FieldList(output.generatedFields, context) : undefined, - } as any; + return take(output, { + generatedFields: (_: any) => de_FieldList(_, context), + }) as any; }; /** @@ -1213,9 +1084,6 @@ const de_UpdateResults = (output: any, context: __SerdeContext): UpdateResult[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UpdateResult(entry, context); }); return retVal; diff --git a/clients/client-rds/src/protocols/Aws_query.ts b/clients/client-rds/src/protocols/Aws_query.ts index d83c2c4a3405..167e8bb1a273 100644 --- a/clients/client-rds/src/protocols/Aws_query.ts +++ b/clients/client-rds/src/protocols/Aws_query.ts @@ -13,7 +13,7 @@ import { strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -3376,7 +3376,7 @@ export const de_AddRoleToDBClusterCommand = async ( const response: AddRoleToDBClusterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3406,10 +3406,9 @@ const de_AddRoleToDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3429,7 +3428,7 @@ export const de_AddRoleToDBInstanceCommand = async ( const response: AddRoleToDBInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3459,10 +3458,9 @@ const de_AddRoleToDBInstanceCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3485,7 +3483,7 @@ export const de_AddSourceIdentifierToSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3509,10 +3507,9 @@ const de_AddSourceIdentifierToSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3532,7 +3529,7 @@ export const de_AddTagsToResourceCommand = async ( const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3568,10 +3565,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3594,7 +3590,7 @@ export const de_ApplyPendingMaintenanceActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3621,10 +3617,9 @@ const de_ApplyPendingMaintenanceActionCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3647,7 +3642,7 @@ export const de_AuthorizeDBSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3677,10 +3672,9 @@ const de_AuthorizeDBSecurityGroupIngressCommandError = async ( throw await de_InvalidDBSecurityGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3703,7 +3697,7 @@ export const de_BacktrackDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3727,10 +3721,9 @@ const de_BacktrackDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3753,7 +3746,7 @@ export const de_CancelExportTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3777,10 +3770,9 @@ const de_CancelExportTaskCommandError = async ( throw await de_InvalidExportTaskStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3803,7 +3795,7 @@ export const de_CopyDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3830,10 +3822,9 @@ const de_CopyDBClusterParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3856,7 +3847,7 @@ export const de_CopyDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3892,10 +3883,9 @@ const de_CopyDBClusterSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3918,7 +3908,7 @@ export const de_CopyDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3945,10 +3935,9 @@ const de_CopyDBParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3971,7 +3960,7 @@ export const de_CopyDBSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4007,10 +3996,9 @@ const de_CopyDBSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4033,7 +4021,7 @@ export const de_CopyOptionGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4060,10 +4048,9 @@ const de_CopyOptionGroupCommandError = async ( throw await de_OptionGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4086,7 +4073,7 @@ export const de_CreateBlueGreenDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4137,10 +4124,9 @@ const de_CreateBlueGreenDeploymentCommandError = async ( throw await de_SourceDatabaseNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4163,7 +4149,7 @@ export const de_CreateCustomDBEngineVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4196,10 +4182,9 @@ const de_CreateCustomDBEngineVersionCommandError = async ( throw await de_KMSKeyNotAccessibleFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4222,7 +4207,7 @@ export const de_CreateDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4294,10 +4279,9 @@ const de_CreateDBClusterCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4320,7 +4304,7 @@ export const de_CreateDBClusterEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4356,10 +4340,9 @@ const de_CreateDBClusterEndpointCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4382,7 +4365,7 @@ export const de_CreateDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4406,10 +4389,9 @@ const de_CreateDBClusterParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4432,7 +4414,7 @@ export const de_CreateDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4465,10 +4447,9 @@ const de_CreateDBClusterSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4491,7 +4472,7 @@ export const de_CreateDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4572,10 +4553,9 @@ const de_CreateDBInstanceCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4598,7 +4578,7 @@ export const de_CreateDBInstanceReadReplicaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4682,10 +4662,9 @@ const de_CreateDBInstanceReadReplicaCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4708,7 +4687,7 @@ export const de_CreateDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4732,10 +4711,9 @@ const de_CreateDBParameterGroupCommandError = async ( throw await de_DBParameterGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4758,7 +4736,7 @@ export const de_CreateDBProxyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4785,10 +4763,9 @@ const de_CreateDBProxyCommandError = async ( throw await de_InvalidSubnetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4811,7 +4788,7 @@ export const de_CreateDBProxyEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4844,10 +4821,9 @@ const de_CreateDBProxyEndpointCommandError = async ( throw await de_InvalidSubnetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4870,7 +4846,7 @@ export const de_CreateDBSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4897,10 +4873,9 @@ const de_CreateDBSecurityGroupCommandError = async ( throw await de_DBSecurityGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4923,7 +4898,7 @@ export const de_CreateDBSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4953,10 +4928,9 @@ const de_CreateDBSnapshotCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4979,7 +4953,7 @@ export const de_CreateDBSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5012,10 +4986,9 @@ const de_CreateDBSubnetGroupCommandError = async ( throw await de_InvalidSubnetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5038,7 +5011,7 @@ export const de_CreateEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5077,10 +5050,9 @@ const de_CreateEventSubscriptionCommandError = async ( throw await de_SubscriptionCategoryNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5103,7 +5075,7 @@ export const de_CreateGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5133,10 +5105,9 @@ const de_CreateGlobalClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5159,7 +5130,7 @@ export const de_CreateOptionGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5183,10 +5154,9 @@ const de_CreateOptionGroupCommandError = async ( throw await de_OptionGroupQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5209,7 +5179,7 @@ export const de_DeleteBlueGreenDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5233,10 +5203,9 @@ const de_DeleteBlueGreenDeploymentCommandError = async ( throw await de_InvalidBlueGreenDeploymentStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5259,7 +5228,7 @@ export const de_DeleteCustomDBEngineVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5283,10 +5252,9 @@ const de_DeleteCustomDBEngineVersionCommandError = async ( throw await de_InvalidCustomDBEngineVersionStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5309,7 +5277,7 @@ export const de_DeleteDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5342,10 +5310,9 @@ const de_DeleteDBClusterCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5368,7 +5335,7 @@ export const de_DeleteDBClusterEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5395,10 +5362,9 @@ const de_DeleteDBClusterEndpointCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5418,7 +5384,7 @@ export const de_DeleteDBClusterParameterGroupCommand = async ( const response: DeleteDBClusterParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5442,10 +5408,9 @@ const de_DeleteDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5468,7 +5433,7 @@ export const de_DeleteDBClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5492,10 +5457,9 @@ const de_DeleteDBClusterSnapshotCommandError = async ( throw await de_InvalidDBClusterSnapshotStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5518,7 +5482,7 @@ export const de_DeleteDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5554,10 +5518,9 @@ const de_DeleteDBInstanceCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5580,7 +5543,7 @@ export const de_DeleteDBInstanceAutomatedBackupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5604,10 +5567,9 @@ const de_DeleteDBInstanceAutomatedBackupCommandError = async ( throw await de_InvalidDBInstanceAutomatedBackupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5627,7 +5589,7 @@ export const de_DeleteDBParameterGroupCommand = async ( const response: DeleteDBParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5651,10 +5613,9 @@ const de_DeleteDBParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5677,7 +5638,7 @@ export const de_DeleteDBProxyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5701,10 +5662,9 @@ const de_DeleteDBProxyCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5727,7 +5687,7 @@ export const de_DeleteDBProxyEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5751,10 +5711,9 @@ const de_DeleteDBProxyEndpointCommandError = async ( throw await de_InvalidDBProxyEndpointStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5774,7 +5733,7 @@ export const de_DeleteDBSecurityGroupCommand = async ( const response: DeleteDBSecurityGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5798,10 +5757,9 @@ const de_DeleteDBSecurityGroupCommandError = async ( throw await de_InvalidDBSecurityGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5824,7 +5782,7 @@ export const de_DeleteDBSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5848,10 +5806,9 @@ const de_DeleteDBSnapshotCommandError = async ( throw await de_InvalidDBSnapshotStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5871,7 +5828,7 @@ export const de_DeleteDBSubnetGroupCommand = async ( const response: DeleteDBSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5898,10 +5855,9 @@ const de_DeleteDBSubnetGroupCommandError = async ( throw await de_InvalidDBSubnetStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5924,7 +5880,7 @@ export const de_DeleteEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5948,10 +5904,9 @@ const de_DeleteEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5974,7 +5929,7 @@ export const de_DeleteGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5998,10 +5953,9 @@ const de_DeleteGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6021,7 +5975,7 @@ export const de_DeleteOptionGroupCommand = async ( const response: DeleteOptionGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6045,10 +5999,9 @@ const de_DeleteOptionGroupCommandError = async ( throw await de_OptionGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6071,7 +6024,7 @@ export const de_DeregisterDBProxyTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6101,10 +6054,9 @@ const de_DeregisterDBProxyTargetsCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6127,7 +6079,7 @@ export const de_DescribeAccountAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6143,10 +6095,9 @@ const de_DescribeAccountAttributesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6168,7 +6119,7 @@ export const de_DescribeBlueGreenDeploymentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6189,10 +6140,9 @@ const de_DescribeBlueGreenDeploymentsCommandError = async ( throw await de_BlueGreenDeploymentNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6215,7 +6165,7 @@ export const de_DescribeCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6236,10 +6186,9 @@ const de_DescribeCertificatesCommandError = async ( throw await de_CertificateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6262,7 +6211,7 @@ export const de_DescribeDBClusterBacktracksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6286,10 +6235,9 @@ const de_DescribeDBClusterBacktracksCommandError = async ( throw await de_DBClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6312,7 +6260,7 @@ export const de_DescribeDBClusterEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6333,10 +6281,9 @@ const de_DescribeDBClusterEndpointsCommandError = async ( throw await de_DBClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6359,7 +6306,7 @@ export const de_DescribeDBClusterParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6380,10 +6327,9 @@ const de_DescribeDBClusterParameterGroupsCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6406,7 +6352,7 @@ export const de_DescribeDBClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6427,10 +6373,9 @@ const de_DescribeDBClusterParametersCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6453,7 +6398,7 @@ export const de_DescribeDBClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6474,10 +6419,9 @@ const de_DescribeDBClustersCommandError = async ( throw await de_DBClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6500,7 +6444,7 @@ export const de_DescribeDBClusterSnapshotAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6521,10 +6465,9 @@ const de_DescribeDBClusterSnapshotAttributesCommandError = async ( throw await de_DBClusterSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6547,7 +6490,7 @@ export const de_DescribeDBClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6568,10 +6511,9 @@ const de_DescribeDBClusterSnapshotsCommandError = async ( throw await de_DBClusterSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6594,7 +6536,7 @@ export const de_DescribeDBEngineVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6610,10 +6552,9 @@ const de_DescribeDBEngineVersionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6635,7 +6576,7 @@ export const de_DescribeDBInstanceAutomatedBackupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6656,10 +6597,9 @@ const de_DescribeDBInstanceAutomatedBackupsCommandError = async ( throw await de_DBInstanceAutomatedBackupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6682,7 +6622,7 @@ export const de_DescribeDBInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6703,10 +6643,9 @@ const de_DescribeDBInstancesCommandError = async ( throw await de_DBInstanceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6729,7 +6668,7 @@ export const de_DescribeDBLogFilesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6750,10 +6689,9 @@ const de_DescribeDBLogFilesCommandError = async ( throw await de_DBInstanceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6776,7 +6714,7 @@ export const de_DescribeDBParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6797,10 +6735,9 @@ const de_DescribeDBParameterGroupsCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6823,7 +6760,7 @@ export const de_DescribeDBParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6844,10 +6781,9 @@ const de_DescribeDBParametersCommandError = async ( throw await de_DBParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6870,7 +6806,7 @@ export const de_DescribeDBProxiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6891,10 +6827,9 @@ const de_DescribeDBProxiesCommandError = async ( throw await de_DBProxyNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6917,7 +6852,7 @@ export const de_DescribeDBProxyEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6941,10 +6876,9 @@ const de_DescribeDBProxyEndpointsCommandError = async ( throw await de_DBProxyNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6967,7 +6901,7 @@ export const de_DescribeDBProxyTargetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6994,10 +6928,9 @@ const de_DescribeDBProxyTargetGroupsCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7020,7 +6953,7 @@ export const de_DescribeDBProxyTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7050,10 +6983,9 @@ const de_DescribeDBProxyTargetsCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7076,7 +7008,7 @@ export const de_DescribeDBSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7097,10 +7029,9 @@ const de_DescribeDBSecurityGroupsCommandError = async ( throw await de_DBSecurityGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7123,7 +7054,7 @@ export const de_DescribeDBSnapshotAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7144,10 +7075,9 @@ const de_DescribeDBSnapshotAttributesCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7170,7 +7100,7 @@ export const de_DescribeDBSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7191,10 +7121,9 @@ const de_DescribeDBSnapshotsCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7217,7 +7146,7 @@ export const de_DescribeDBSubnetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7238,10 +7167,9 @@ const de_DescribeDBSubnetGroupsCommandError = async ( throw await de_DBSubnetGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7267,7 +7195,7 @@ export const de_DescribeEngineDefaultClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7283,10 +7211,9 @@ const de_DescribeEngineDefaultClusterParametersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7308,7 +7235,7 @@ export const de_DescribeEngineDefaultParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7324,10 +7251,9 @@ const de_DescribeEngineDefaultParametersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7349,7 +7275,7 @@ export const de_DescribeEventCategoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7365,10 +7291,9 @@ const de_DescribeEventCategoriesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7390,7 +7315,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7406,10 +7331,9 @@ const de_DescribeEventsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7431,7 +7355,7 @@ export const de_DescribeEventSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7452,10 +7376,9 @@ const de_DescribeEventSubscriptionsCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7478,7 +7401,7 @@ export const de_DescribeExportTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7499,10 +7422,9 @@ const de_DescribeExportTasksCommandError = async ( throw await de_ExportTaskNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7525,7 +7447,7 @@ export const de_DescribeGlobalClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7546,10 +7468,9 @@ const de_DescribeGlobalClustersCommandError = async ( throw await de_GlobalClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7572,7 +7493,7 @@ export const de_DescribeOptionGroupOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7588,10 +7509,9 @@ const de_DescribeOptionGroupOptionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7613,7 +7533,7 @@ export const de_DescribeOptionGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7634,10 +7554,9 @@ const de_DescribeOptionGroupsCommandError = async ( throw await de_OptionGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7660,7 +7579,7 @@ export const de_DescribeOrderableDBInstanceOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7676,10 +7595,9 @@ const de_DescribeOrderableDBInstanceOptionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7701,7 +7619,7 @@ export const de_DescribePendingMaintenanceActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7722,10 +7640,9 @@ const de_DescribePendingMaintenanceActionsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7748,7 +7665,7 @@ export const de_DescribeReservedDBInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7769,10 +7686,9 @@ const de_DescribeReservedDBInstancesCommandError = async ( throw await de_ReservedDBInstanceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7795,7 +7711,7 @@ export const de_DescribeReservedDBInstancesOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7816,10 +7732,9 @@ const de_DescribeReservedDBInstancesOfferingsCommandError = async ( throw await de_ReservedDBInstancesOfferingNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7842,7 +7757,7 @@ export const de_DescribeSourceRegionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7858,10 +7773,9 @@ const de_DescribeSourceRegionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7883,7 +7797,7 @@ export const de_DescribeValidDBInstanceModificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7907,10 +7821,9 @@ const de_DescribeValidDBInstanceModificationsCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7933,7 +7846,7 @@ export const de_DownloadDBLogFilePortionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7957,10 +7870,9 @@ const de_DownloadDBLogFilePortionCommandError = async ( throw await de_DBLogFileNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7983,7 +7895,7 @@ export const de_FailoverDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8010,10 +7922,9 @@ const de_FailoverDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8036,7 +7947,7 @@ export const de_FailoverGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8066,10 +7977,9 @@ const de_FailoverGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8092,7 +8002,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8128,10 +8038,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8154,7 +8063,7 @@ export const de_ModifyActivityStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8181,10 +8090,9 @@ const de_ModifyActivityStreamCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8207,7 +8115,7 @@ export const de_ModifyCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8228,10 +8136,9 @@ const de_ModifyCertificatesCommandError = async ( throw await de_CertificateNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8254,7 +8161,7 @@ export const de_ModifyCurrentDBClusterCapacityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8281,10 +8188,9 @@ const de_ModifyCurrentDBClusterCapacityCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8307,7 +8213,7 @@ export const de_ModifyCustomDBEngineVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8331,10 +8237,9 @@ const de_ModifyCustomDBEngineVersionCommandError = async ( throw await de_InvalidCustomDBEngineVersionStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8357,7 +8262,7 @@ export const de_ModifyDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8414,10 +8319,9 @@ const de_ModifyDBClusterCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8440,7 +8344,7 @@ export const de_ModifyDBClusterEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8473,10 +8377,9 @@ const de_ModifyDBClusterEndpointCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8499,7 +8402,7 @@ export const de_ModifyDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8523,10 +8426,9 @@ const de_ModifyDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8549,7 +8451,7 @@ export const de_ModifyDBClusterSnapshotAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8576,10 +8478,9 @@ const de_ModifyDBClusterSnapshotAttributeCommandError = async ( throw await de_SharedSnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8602,7 +8503,7 @@ export const de_ModifyDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8680,10 +8581,9 @@ const de_ModifyDBInstanceCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8706,7 +8606,7 @@ export const de_ModifyDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8730,10 +8630,9 @@ const de_ModifyDBParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8756,7 +8655,7 @@ export const de_ModifyDBProxyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8783,10 +8682,9 @@ const de_ModifyDBProxyCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8809,7 +8707,7 @@ export const de_ModifyDBProxyEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8839,10 +8737,9 @@ const de_ModifyDBProxyEndpointCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8865,7 +8762,7 @@ export const de_ModifyDBProxyTargetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8892,10 +8789,9 @@ const de_ModifyDBProxyTargetGroupCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8918,7 +8814,7 @@ export const de_ModifyDBSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8939,10 +8835,9 @@ const de_ModifyDBSnapshotCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8965,7 +8860,7 @@ export const de_ModifyDBSnapshotAttributeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8992,10 +8887,9 @@ const de_ModifyDBSnapshotAttributeCommandError = async ( throw await de_SharedSnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9018,7 +8912,7 @@ export const de_ModifyDBSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9051,10 +8945,9 @@ const de_ModifyDBSubnetGroupCommandError = async ( throw await de_SubnetAlreadyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9077,7 +8970,7 @@ export const de_ModifyEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9113,10 +9006,9 @@ const de_ModifyEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9139,7 +9031,7 @@ export const de_ModifyGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9169,10 +9061,9 @@ const de_ModifyGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9195,7 +9086,7 @@ export const de_ModifyOptionGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9219,10 +9110,9 @@ const de_ModifyOptionGroupCommandError = async ( throw await de_OptionGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9245,7 +9135,7 @@ export const de_PromoteReadReplicaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9269,10 +9159,9 @@ const de_PromoteReadReplicaCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9295,7 +9184,7 @@ export const de_PromoteReadReplicaDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9319,10 +9208,9 @@ const de_PromoteReadReplicaDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9345,7 +9233,7 @@ export const de_PurchaseReservedDBInstancesOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9372,10 +9260,9 @@ const de_PurchaseReservedDBInstancesOfferingCommandError = async ( throw await de_ReservedDBInstancesOfferingNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9398,7 +9285,7 @@ export const de_RebootDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9425,10 +9312,9 @@ const de_RebootDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9451,7 +9337,7 @@ export const de_RebootDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9475,10 +9361,9 @@ const de_RebootDBInstanceCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9501,7 +9386,7 @@ export const de_RegisterDBProxyTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9546,10 +9431,9 @@ const de_RegisterDBProxyTargetsCommandError = async ( throw await de_InvalidDBProxyStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9572,7 +9456,7 @@ export const de_RemoveFromGlobalClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9599,10 +9483,9 @@ const de_RemoveFromGlobalClusterCommandError = async ( throw await de_InvalidGlobalClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9622,7 +9505,7 @@ export const de_RemoveRoleFromDBClusterCommand = async ( const response: RemoveRoleFromDBClusterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9649,10 +9532,9 @@ const de_RemoveRoleFromDBClusterCommandError = async ( throw await de_InvalidDBClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9672,7 +9554,7 @@ export const de_RemoveRoleFromDBInstanceCommand = async ( const response: RemoveRoleFromDBInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9699,10 +9581,9 @@ const de_RemoveRoleFromDBInstanceCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9728,7 +9609,7 @@ export const de_RemoveSourceIdentifierFromSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9752,10 +9633,9 @@ const de_RemoveSourceIdentifierFromSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9775,7 +9655,7 @@ export const de_RemoveTagsFromResourceCommand = async ( const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9811,10 +9691,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_DBSnapshotNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9837,7 +9716,7 @@ export const de_ResetDBClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9861,10 +9740,9 @@ const de_ResetDBClusterParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9887,7 +9765,7 @@ export const de_ResetDBParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9911,10 +9789,9 @@ const de_ResetDBParameterGroupCommandError = async ( throw await de_InvalidDBParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9937,7 +9814,7 @@ export const de_RestoreDBClusterFromS3Command = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9997,10 +9874,9 @@ const de_RestoreDBClusterFromS3CommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10023,7 +9899,7 @@ export const de_RestoreDBClusterFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10095,10 +9971,9 @@ const de_RestoreDBClusterFromSnapshotCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10121,7 +9996,7 @@ export const de_RestoreDBClusterToPointInTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10193,10 +10068,9 @@ const de_RestoreDBClusterToPointInTimeCommandError = async ( throw await de_StorageQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10219,7 +10093,7 @@ export const de_RestoreDBInstanceFromDBSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10303,10 +10177,9 @@ const de_RestoreDBInstanceFromDBSnapshotCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10329,7 +10202,7 @@ export const de_RestoreDBInstanceFromS3Command = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10401,10 +10274,9 @@ const de_RestoreDBInstanceFromS3CommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10427,7 +10299,7 @@ export const de_RestoreDBInstanceToPointInTimeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10514,10 +10386,9 @@ const de_RestoreDBInstanceToPointInTimeCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10540,7 +10411,7 @@ export const de_RevokeDBSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10567,10 +10438,9 @@ const de_RevokeDBSecurityGroupIngressCommandError = async ( throw await de_InvalidDBSecurityGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10593,7 +10463,7 @@ export const de_StartActivityStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10629,10 +10499,9 @@ const de_StartActivityStreamCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10655,7 +10524,7 @@ export const de_StartDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10682,10 +10551,9 @@ const de_StartDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10708,7 +10576,7 @@ export const de_StartDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10759,10 +10627,9 @@ const de_StartDBInstanceCommandError = async ( throw await de_KMSKeyNotAccessibleFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10788,7 +10655,7 @@ export const de_StartDBInstanceAutomatedBackupsReplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10821,10 +10688,9 @@ const de_StartDBInstanceAutomatedBackupsReplicationCommandError = async ( throw await de_StorageTypeNotSupportedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10847,7 +10713,7 @@ export const de_StartExportTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10895,10 +10761,9 @@ const de_StartExportTaskCommandError = async ( throw await de_KMSKeyNotAccessibleFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10921,7 +10786,7 @@ export const de_StopActivityStreamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10954,10 +10819,9 @@ const de_StopActivityStreamCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -10980,7 +10844,7 @@ export const de_StopDBClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11007,10 +10871,9 @@ const de_StopDBClusterCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11033,7 +10896,7 @@ export const de_StopDBInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11066,10 +10929,9 @@ const de_StopDBInstanceCommandError = async ( throw await de_SnapshotQuotaExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11095,7 +10957,7 @@ export const de_StopDBInstanceAutomatedBackupsReplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11119,10 +10981,9 @@ const de_StopDBInstanceAutomatedBackupsReplicationCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11145,7 +11006,7 @@ export const de_SwitchoverBlueGreenDeploymentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11169,10 +11030,9 @@ const de_SwitchoverBlueGreenDeploymentCommandError = async ( throw await de_InvalidBlueGreenDeploymentStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -11195,7 +11055,7 @@ export const de_SwitchoverReadReplicaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11219,10 +11079,9 @@ const de_SwitchoverReadReplicaCommandError = async ( throw await de_InvalidDBInstanceStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -26579,6 +26438,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-redshift-data/src/protocols/Aws_json1_1.ts b/clients/client-redshift-data/src/protocols/Aws_json1_1.ts index b7c41a4c958f..b4bf398b06cf 100644 --- a/clients/client-redshift-data/src/protocols/Aws_json1_1.ts +++ b/clients/client-redshift-data/src/protocols/Aws_json1_1.ts @@ -1,9 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, @@ -11,7 +11,8 @@ import { expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -40,13 +41,10 @@ import { BatchExecuteStatementInput, BatchExecuteStatementOutput, CancelStatementRequest, - CancelStatementResponse, - ColumnMetadata, DatabaseConnectionException, DescribeStatementRequest, DescribeStatementResponse, DescribeTableRequest, - DescribeTableResponse, ExecuteStatementException, ExecuteStatementInput, ExecuteStatementOutput, @@ -55,18 +53,14 @@ import { GetStatementResultResponse, InternalServerException, ListDatabasesRequest, - ListDatabasesResponse, ListSchemasRequest, - ListSchemasResponse, ListStatementsRequest, ListStatementsResponse, ListTablesRequest, - ListTablesResponse, ResourceNotFoundException, SqlParameter, StatementData, SubStatementData, - TableMember, ValidationException, } from "../models/models_0"; import { RedshiftDataServiceException as __BaseException } from "../models/RedshiftDataServiceException"; @@ -93,7 +87,7 @@ export const se_CancelStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelStatement"); let body: any; - body = JSON.stringify(se_CancelStatementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -106,7 +100,7 @@ export const se_DescribeStatementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStatement"); let body: any; - body = JSON.stringify(se_DescribeStatementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -119,7 +113,7 @@ export const se_DescribeTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTable"); let body: any; - body = JSON.stringify(se_DescribeTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -145,7 +139,7 @@ export const se_GetStatementResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetStatementResult"); let body: any; - body = JSON.stringify(se_GetStatementResultRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -158,7 +152,7 @@ export const se_ListDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatabases"); let body: any; - body = JSON.stringify(se_ListDatabasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -171,7 +165,7 @@ export const se_ListSchemasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSchemas"); let body: any; - body = JSON.stringify(se_ListSchemasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -184,7 +178,7 @@ export const se_ListStatementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStatements"); let body: any; - body = JSON.stringify(se_ListStatementsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -197,7 +191,7 @@ export const se_ListTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTables"); let body: any; - body = JSON.stringify(se_ListTablesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -218,7 +212,7 @@ export const de_BatchExecuteStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -245,10 +239,9 @@ const de_BatchExecuteStatementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -266,12 +259,12 @@ export const de_CancelStatementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelStatementResponse(data, context); + contents = _json(data); const response: CancelStatementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -301,10 +294,9 @@ const de_CancelStatementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -327,7 +319,7 @@ export const de_DescribeStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -354,10 +346,9 @@ const de_DescribeStatementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -375,12 +366,12 @@ export const de_DescribeTableCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTableResponse(data, context); + contents = _json(data); const response: DescribeTableCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -407,10 +398,9 @@ const de_DescribeTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -433,7 +423,7 @@ export const de_ExecuteStatementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -460,10 +450,9 @@ const de_ExecuteStatementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -486,7 +475,7 @@ export const de_GetStatementResultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -513,10 +502,9 @@ const de_GetStatementResultCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -534,12 +522,12 @@ export const de_ListDatabasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDatabasesResponse(data, context); + contents = _json(data); const response: ListDatabasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -566,10 +554,9 @@ const de_ListDatabasesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -587,12 +574,12 @@ export const de_ListSchemasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSchemasResponse(data, context); + contents = _json(data); const response: ListSchemasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -619,10 +606,9 @@ const de_ListSchemasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -645,7 +631,7 @@ export const de_ListStatementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -669,10 +655,9 @@ const de_ListStatementsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -690,12 +675,12 @@ export const de_ListTablesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTablesResponse(data, context); + contents = _json(data); const response: ListTablesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -722,10 +707,9 @@ const de_ListTablesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -739,7 +723,7 @@ const de_ActiveStatementsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActiveStatementsExceededException(body, context); + const deserialized: any = _json(body); const exception = new ActiveStatementsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -755,7 +739,7 @@ const de_BatchExecuteStatementExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BatchExecuteStatementException(body, context); + const deserialized: any = _json(body); const exception = new BatchExecuteStatementException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -771,7 +755,7 @@ const de_DatabaseConnectionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DatabaseConnectionException(body, context); + const deserialized: any = _json(body); const exception = new DatabaseConnectionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -787,7 +771,7 @@ const de_ExecuteStatementExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExecuteStatementException(body, context); + const deserialized: any = _json(body); const exception = new ExecuteStatementException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -803,7 +787,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -819,7 +803,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -832,7 +816,7 @@ const de_ResourceNotFoundExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -844,364 +828,134 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_1BatchExecuteStatementInput */ const se_BatchExecuteStatementInput = (input: BatchExecuteStatementInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.Sqls != null && { Sqls: se_SqlList(input.Sqls, context) }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WithEvent != null && { WithEvent: input.WithEvent }), - ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ClusterIdentifier: [], + Database: [], + DbUser: [], + SecretArn: [], + Sqls: _json, + StatementName: [], + WithEvent: [], + WorkgroupName: [], + }); }; -/** - * serializeAws_json1_1CancelStatementRequest - */ -const se_CancelStatementRequest = (input: CancelStatementRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_CancelStatementRequest omitted. -/** - * serializeAws_json1_1DescribeStatementRequest - */ -const se_DescribeStatementRequest = (input: DescribeStatementRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DescribeStatementRequest omitted. -/** - * serializeAws_json1_1DescribeTableRequest - */ -const se_DescribeTableRequest = (input: DescribeTableRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Schema != null && { Schema: input.Schema }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.Table != null && { Table: input.Table }), - ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }), - }; -}; +// se_DescribeTableRequest omitted. /** * serializeAws_json1_1ExecuteStatementInput */ const se_ExecuteStatementInput = (input: ExecuteStatementInput, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.Parameters != null && { Parameters: se_SqlParametersList(input.Parameters, context) }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.Sql != null && { Sql: input.Sql }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.WithEvent != null && { WithEvent: input.WithEvent }), - ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ClusterIdentifier: [], + Database: [], + DbUser: [], + Parameters: _json, + SecretArn: [], + Sql: [], + StatementName: [], + WithEvent: [], + WorkgroupName: [], + }); }; -/** - * serializeAws_json1_1GetStatementResultRequest - */ -const se_GetStatementResultRequest = (input: GetStatementResultRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetStatementResultRequest omitted. -/** - * serializeAws_json1_1ListDatabasesRequest - */ -const se_ListDatabasesRequest = (input: ListDatabasesRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }), - }; -}; +// se_ListDatabasesRequest omitted. -/** - * serializeAws_json1_1ListSchemasRequest - */ -const se_ListSchemasRequest = (input: ListSchemasRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }), - }; -}; +// se_ListSchemasRequest omitted. -/** - * serializeAws_json1_1ListStatementsRequest - */ -const se_ListStatementsRequest = (input: ListStatementsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RoleLevel != null && { RoleLevel: input.RoleLevel }), - ...(input.StatementName != null && { StatementName: input.StatementName }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListStatementsRequest omitted. -/** - * serializeAws_json1_1ListTablesRequest - */ -const se_ListTablesRequest = (input: ListTablesRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.ConnectedDatabase != null && { ConnectedDatabase: input.ConnectedDatabase }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SchemaPattern != null && { SchemaPattern: input.SchemaPattern }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - ...(input.TablePattern != null && { TablePattern: input.TablePattern }), - ...(input.WorkgroupName != null && { WorkgroupName: input.WorkgroupName }), - }; -}; +// se_ListTablesRequest omitted. -/** - * serializeAws_json1_1SqlList - */ -const se_SqlList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SqlList omitted. -/** - * serializeAws_json1_1SqlParameter - */ -const se_SqlParameter = (input: SqlParameter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_SqlParameter omitted. -/** - * serializeAws_json1_1SqlParametersList - */ -const se_SqlParametersList = (input: SqlParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SqlParameter(entry, context); - }); -}; +// se_SqlParametersList omitted. -/** - * deserializeAws_json1_1ActiveStatementsExceededException - */ -const de_ActiveStatementsExceededException = ( - output: any, - context: __SerdeContext -): ActiveStatementsExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ActiveStatementsExceededException omitted. -/** - * deserializeAws_json1_1BatchExecuteStatementException - */ -const de_BatchExecuteStatementException = (output: any, context: __SerdeContext): BatchExecuteStatementException => { - return { - Message: __expectString(output.Message), - StatementId: __expectString(output.StatementId), - } as any; -}; +// de_BatchExecuteStatementException omitted. /** * deserializeAws_json1_1BatchExecuteStatementOutput */ const de_BatchExecuteStatementOutput = (output: any, context: __SerdeContext): BatchExecuteStatementOutput => { - return { - ClusterIdentifier: __expectString(output.ClusterIdentifier), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - Id: __expectString(output.Id), - SecretArn: __expectString(output.SecretArn), - WorkgroupName: __expectString(output.WorkgroupName), - } as any; + return take(output, { + ClusterIdentifier: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Database: __expectString, + DbUser: __expectString, + Id: __expectString, + SecretArn: __expectString, + WorkgroupName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1CancelStatementResponse - */ -const de_CancelStatementResponse = (output: any, context: __SerdeContext): CancelStatementResponse => { - return { - Status: __expectBoolean(output.Status), - } as any; -}; +// de_CancelStatementResponse omitted. -/** - * deserializeAws_json1_1ColumnList - */ -const de_ColumnList = (output: any, context: __SerdeContext): ColumnMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnMetadata(entry, context); - }); - return retVal; -}; +// de_ColumnList omitted. -/** - * deserializeAws_json1_1ColumnMetadata - */ -const de_ColumnMetadata = (output: any, context: __SerdeContext): ColumnMetadata => { - return { - columnDefault: __expectString(output.columnDefault), - isCaseSensitive: __expectBoolean(output.isCaseSensitive), - isCurrency: __expectBoolean(output.isCurrency), - isSigned: __expectBoolean(output.isSigned), - label: __expectString(output.label), - length: __expectInt32(output.length), - name: __expectString(output.name), - nullable: __expectInt32(output.nullable), - precision: __expectInt32(output.precision), - scale: __expectInt32(output.scale), - schemaName: __expectString(output.schemaName), - tableName: __expectString(output.tableName), - typeName: __expectString(output.typeName), - } as any; -}; +// de_ColumnMetadata omitted. -/** - * deserializeAws_json1_1ColumnMetadataList - */ -const de_ColumnMetadataList = (output: any, context: __SerdeContext): ColumnMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ColumnMetadata(entry, context); - }); - return retVal; -}; +// de_ColumnMetadataList omitted. -/** - * deserializeAws_json1_1DatabaseConnectionException - */ -const de_DatabaseConnectionException = (output: any, context: __SerdeContext): DatabaseConnectionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DatabaseConnectionException omitted. -/** - * deserializeAws_json1_1DatabaseList - */ -const de_DatabaseList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DatabaseList omitted. /** * deserializeAws_json1_1DescribeStatementResponse */ const de_DescribeStatementResponse = (output: any, context: __SerdeContext): DescribeStatementResponse => { - return { - ClusterIdentifier: __expectString(output.ClusterIdentifier), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - Duration: __expectLong(output.Duration), - Error: __expectString(output.Error), - HasResultSet: __expectBoolean(output.HasResultSet), - Id: __expectString(output.Id), - QueryParameters: output.QueryParameters != null ? de_SqlParametersList(output.QueryParameters, context) : undefined, - QueryString: __expectString(output.QueryString), - RedshiftPid: __expectLong(output.RedshiftPid), - RedshiftQueryId: __expectLong(output.RedshiftQueryId), - ResultRows: __expectLong(output.ResultRows), - ResultSize: __expectLong(output.ResultSize), - SecretArn: __expectString(output.SecretArn), - Status: __expectString(output.Status), - SubStatements: output.SubStatements != null ? de_SubStatementList(output.SubStatements, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WorkgroupName: __expectString(output.WorkgroupName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTableResponse - */ -const de_DescribeTableResponse = (output: any, context: __SerdeContext): DescribeTableResponse => { - return { - ColumnList: output.ColumnList != null ? de_ColumnList(output.ColumnList, context) : undefined, - NextToken: __expectString(output.NextToken), - TableName: __expectString(output.TableName), - } as any; -}; - -/** - * deserializeAws_json1_1ExecuteStatementException - */ -const de_ExecuteStatementException = (output: any, context: __SerdeContext): ExecuteStatementException => { - return { - Message: __expectString(output.Message), - StatementId: __expectString(output.StatementId), - } as any; -}; + return take(output, { + ClusterIdentifier: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Database: __expectString, + DbUser: __expectString, + Duration: __expectLong, + Error: __expectString, + HasResultSet: __expectBoolean, + Id: __expectString, + QueryParameters: _json, + QueryString: __expectString, + RedshiftPid: __expectLong, + RedshiftQueryId: __expectLong, + ResultRows: __expectLong, + ResultSize: __expectLong, + SecretArn: __expectString, + Status: __expectString, + SubStatements: (_: any) => de_SubStatementList(_, context), + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkgroupName: __expectString, + }) as any; +}; + +// de_DescribeTableResponse omitted. + +// de_ExecuteStatementException omitted. /** * deserializeAws_json1_1ExecuteStatementOutput */ const de_ExecuteStatementOutput = (output: any, context: __SerdeContext): ExecuteStatementOutput => { - return { - ClusterIdentifier: __expectString(output.ClusterIdentifier), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - Id: __expectString(output.Id), - SecretArn: __expectString(output.SecretArn), - WorkgroupName: __expectString(output.WorkgroupName), - } as any; + return take(output, { + ClusterIdentifier: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Database: __expectString, + DbUser: __expectString, + Id: __expectString, + SecretArn: __expectString, + WorkgroupName: __expectString, + }) as any; }; /** @@ -1238,9 +992,6 @@ const de_FieldList = (output: any, context: __SerdeContext): Field[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Field(__expectUnion(entry), context); }); return retVal; @@ -1250,112 +1001,39 @@ const de_FieldList = (output: any, context: __SerdeContext): Field[] => { * deserializeAws_json1_1GetStatementResultResponse */ const de_GetStatementResultResponse = (output: any, context: __SerdeContext): GetStatementResultResponse => { - return { - ColumnMetadata: output.ColumnMetadata != null ? de_ColumnMetadataList(output.ColumnMetadata, context) : undefined, - NextToken: __expectString(output.NextToken), - Records: output.Records != null ? de_SqlRecords(output.Records, context) : undefined, - TotalNumRows: __expectLong(output.TotalNumRows), - } as any; + return take(output, { + ColumnMetadata: _json, + NextToken: __expectString, + Records: (_: any) => de_SqlRecords(_, context), + TotalNumRows: __expectLong, + }) as any; }; -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1ListDatabasesResponse - */ -const de_ListDatabasesResponse = (output: any, context: __SerdeContext): ListDatabasesResponse => { - return { - Databases: output.Databases != null ? de_DatabaseList(output.Databases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDatabasesResponse omitted. -/** - * deserializeAws_json1_1ListSchemasResponse - */ -const de_ListSchemasResponse = (output: any, context: __SerdeContext): ListSchemasResponse => { - return { - NextToken: __expectString(output.NextToken), - Schemas: output.Schemas != null ? de_SchemaList(output.Schemas, context) : undefined, - } as any; -}; +// de_ListSchemasResponse omitted. /** * deserializeAws_json1_1ListStatementsResponse */ const de_ListStatementsResponse = (output: any, context: __SerdeContext): ListStatementsResponse => { - return { - NextToken: __expectString(output.NextToken), - Statements: output.Statements != null ? de_StatementList(output.Statements, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Statements: (_: any) => de_StatementList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTablesResponse - */ -const de_ListTablesResponse = (output: any, context: __SerdeContext): ListTablesResponse => { - return { - NextToken: __expectString(output.NextToken), - Tables: output.Tables != null ? de_TableList(output.Tables, context) : undefined, - } as any; -}; +// de_ListTablesResponse omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceId: __expectString(output.ResourceId), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1SchemaList - */ -const de_SchemaList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SchemaList omitted. -/** - * deserializeAws_json1_1SqlParameter - */ -const de_SqlParameter = (output: any, context: __SerdeContext): SqlParameter => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_SqlParameter omitted. -/** - * deserializeAws_json1_1SqlParametersList - */ -const de_SqlParametersList = (output: any, context: __SerdeContext): SqlParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SqlParameter(entry, context); - }); - return retVal; -}; +// de_SqlParametersList omitted. /** * deserializeAws_json1_1SqlRecords @@ -1364,9 +1042,6 @@ const de_SqlRecords = (output: any, context: __SerdeContext): Field[][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FieldList(entry, context); }); return retVal; @@ -1376,20 +1051,18 @@ const de_SqlRecords = (output: any, context: __SerdeContext): Field[][] => { * deserializeAws_json1_1StatementData */ const de_StatementData = (output: any, context: __SerdeContext): StatementData => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Id: __expectString(output.Id), - IsBatchStatement: __expectBoolean(output.IsBatchStatement), - QueryParameters: output.QueryParameters != null ? de_SqlParametersList(output.QueryParameters, context) : undefined, - QueryString: __expectString(output.QueryString), - QueryStrings: output.QueryStrings != null ? de_StatementStringList(output.QueryStrings, context) : undefined, - SecretArn: __expectString(output.SecretArn), - StatementName: __expectString(output.StatementName), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + IsBatchStatement: __expectBoolean, + QueryParameters: _json, + QueryString: __expectString, + QueryStrings: _json, + SecretArn: __expectString, + StatementName: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1399,48 +1072,30 @@ const de_StatementList = (output: any, context: __SerdeContext): StatementData[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StatementData(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StatementStringList - */ -const de_StatementStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StatementStringList omitted. /** * deserializeAws_json1_1SubStatementData */ const de_SubStatementData = (output: any, context: __SerdeContext): SubStatementData => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Duration: __expectLong(output.Duration), - Error: __expectString(output.Error), - HasResultSet: __expectBoolean(output.HasResultSet), - Id: __expectString(output.Id), - QueryString: __expectString(output.QueryString), - RedshiftQueryId: __expectLong(output.RedshiftQueryId), - ResultRows: __expectLong(output.ResultRows), - ResultSize: __expectLong(output.ResultSize), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Duration: __expectLong, + Error: __expectString, + HasResultSet: __expectBoolean, + Id: __expectString, + QueryString: __expectString, + RedshiftQueryId: __expectLong, + ResultRows: __expectLong, + ResultSize: __expectLong, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1450,48 +1105,16 @@ const de_SubStatementList = (output: any, context: __SerdeContext): SubStatement const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SubStatementData(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TableList - */ -const de_TableList = (output: any, context: __SerdeContext): TableMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TableMember(entry, context); - }); - return retVal; -}; +// de_TableList omitted. -/** - * deserializeAws_json1_1TableMember - */ -const de_TableMember = (output: any, context: __SerdeContext): TableMember => { - return { - name: __expectString(output.name), - schema: __expectString(output.schema), - type: __expectString(output.type), - } as any; -}; +// de_TableMember omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1513,6 +1136,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts b/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts index d6869645ef26..1cdd32578909 100644 --- a/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts +++ b/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,7 +12,8 @@ import { limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -106,7 +108,6 @@ import { CreateSnapshotRequest, CreateSnapshotResponse, CreateUsageLimitRequest, - CreateUsageLimitResponse, CreateWorkgroupRequest, CreateWorkgroupResponse, DeleteEndpointAccessRequest, @@ -114,14 +115,11 @@ import { DeleteNamespaceRequest, DeleteNamespaceResponse, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DeleteSnapshotRequest, DeleteSnapshotResponse, DeleteUsageLimitRequest, - DeleteUsageLimitResponse, DeleteWorkgroupRequest, DeleteWorkgroupResponse, - Endpoint, EndpointAccess, GetCredentialsRequest, GetCredentialsResponse, @@ -132,13 +130,11 @@ import { GetRecoveryPointRequest, GetRecoveryPointResponse, GetResourcePolicyRequest, - GetResourcePolicyResponse, GetSnapshotRequest, GetSnapshotResponse, GetTableRestoreStatusRequest, GetTableRestoreStatusResponse, GetUsageLimitRequest, - GetUsageLimitResponse, GetWorkgroupRequest, GetWorkgroupResponse, InsufficientCapacityException, @@ -155,19 +151,14 @@ import { ListTableRestoreStatusRequest, ListTableRestoreStatusResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListUsageLimitsRequest, - ListUsageLimitsResponse, ListWorkgroupsRequest, ListWorkgroupsResponse, LogExport, Namespace, - NetworkInterface, PutResourcePolicyRequest, - PutResourcePolicyResponse, RecoveryPoint, ResourceNotFoundException, - ResourcePolicy, RestoreFromRecoveryPointRequest, RestoreFromRecoveryPointResponse, RestoreFromSnapshotRequest, @@ -179,11 +170,9 @@ import { TableRestoreStatus, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, TooManyTagsException, UntagResourceRequest, - UntagResourceResponse, UpdateEndpointAccessRequest, UpdateEndpointAccessResponse, UpdateNamespaceRequest, @@ -191,13 +180,9 @@ import { UpdateSnapshotRequest, UpdateSnapshotResponse, UpdateUsageLimitRequest, - UpdateUsageLimitResponse, UpdateWorkgroupRequest, UpdateWorkgroupResponse, - UsageLimit, ValidationException, - VpcEndpoint, - VpcSecurityGroupMembership, Workgroup, } from "../models/models_0"; import { RedshiftServerlessServiceException as __BaseException } from "../models/RedshiftServerlessServiceException"; @@ -211,7 +196,7 @@ export const se_ConvertRecoveryPointToSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ConvertRecoveryPointToSnapshot"); let body: any; - body = JSON.stringify(se_ConvertRecoveryPointToSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -224,7 +209,7 @@ export const se_CreateEndpointAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEndpointAccess"); let body: any; - body = JSON.stringify(se_CreateEndpointAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -237,7 +222,7 @@ export const se_CreateNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateNamespace"); let body: any; - body = JSON.stringify(se_CreateNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -250,7 +235,7 @@ export const se_CreateSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSnapshot"); let body: any; - body = JSON.stringify(se_CreateSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -263,7 +248,7 @@ export const se_CreateUsageLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUsageLimit"); let body: any; - body = JSON.stringify(se_CreateUsageLimitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -276,7 +261,7 @@ export const se_CreateWorkgroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkgroup"); let body: any; - body = JSON.stringify(se_CreateWorkgroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,7 +274,7 @@ export const se_DeleteEndpointAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpointAccess"); let body: any; - body = JSON.stringify(se_DeleteEndpointAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +287,7 @@ export const se_DeleteNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNamespace"); let body: any; - body = JSON.stringify(se_DeleteNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +300,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +313,7 @@ export const se_DeleteSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSnapshot"); let body: any; - body = JSON.stringify(se_DeleteSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -341,7 +326,7 @@ export const se_DeleteUsageLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUsageLimit"); let body: any; - body = JSON.stringify(se_DeleteUsageLimitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +339,7 @@ export const se_DeleteWorkgroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkgroup"); let body: any; - body = JSON.stringify(se_DeleteWorkgroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +352,7 @@ export const se_GetCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCredentials"); let body: any; - body = JSON.stringify(se_GetCredentialsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -380,7 +365,7 @@ export const se_GetEndpointAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetEndpointAccess"); let body: any; - body = JSON.stringify(se_GetEndpointAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -393,7 +378,7 @@ export const se_GetNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNamespace"); let body: any; - body = JSON.stringify(se_GetNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -406,7 +391,7 @@ export const se_GetRecoveryPointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRecoveryPoint"); let body: any; - body = JSON.stringify(se_GetRecoveryPointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -419,7 +404,7 @@ export const se_GetResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); let body: any; - body = JSON.stringify(se_GetResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -432,7 +417,7 @@ export const se_GetSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSnapshot"); let body: any; - body = JSON.stringify(se_GetSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -445,7 +430,7 @@ export const se_GetTableRestoreStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTableRestoreStatus"); let body: any; - body = JSON.stringify(se_GetTableRestoreStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -458,7 +443,7 @@ export const se_GetUsageLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetUsageLimit"); let body: any; - body = JSON.stringify(se_GetUsageLimitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -471,7 +456,7 @@ export const se_GetWorkgroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkgroup"); let body: any; - body = JSON.stringify(se_GetWorkgroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -484,7 +469,7 @@ export const se_ListEndpointAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListEndpointAccess"); let body: any; - body = JSON.stringify(se_ListEndpointAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -497,7 +482,7 @@ export const se_ListNamespacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListNamespaces"); let body: any; - body = JSON.stringify(se_ListNamespacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -536,7 +521,7 @@ export const se_ListTableRestoreStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTableRestoreStatus"); let body: any; - body = JSON.stringify(se_ListTableRestoreStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -549,7 +534,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -562,7 +547,7 @@ export const se_ListUsageLimitsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsageLimits"); let body: any; - body = JSON.stringify(se_ListUsageLimitsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -575,7 +560,7 @@ export const se_ListWorkgroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkgroups"); let body: any; - body = JSON.stringify(se_ListWorkgroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -588,7 +573,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -601,7 +586,7 @@ export const se_RestoreFromRecoveryPointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreFromRecoveryPoint"); let body: any; - body = JSON.stringify(se_RestoreFromRecoveryPointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -614,7 +599,7 @@ export const se_RestoreFromSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreFromSnapshot"); let body: any; - body = JSON.stringify(se_RestoreFromSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -627,7 +612,7 @@ export const se_RestoreTableFromSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreTableFromSnapshot"); let body: any; - body = JSON.stringify(se_RestoreTableFromSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -640,7 +625,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -653,7 +638,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -666,7 +651,7 @@ export const se_UpdateEndpointAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEndpointAccess"); let body: any; - body = JSON.stringify(se_UpdateEndpointAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -679,7 +664,7 @@ export const se_UpdateNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNamespace"); let body: any; - body = JSON.stringify(se_UpdateNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -692,7 +677,7 @@ export const se_UpdateSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSnapshot"); let body: any; - body = JSON.stringify(se_UpdateSnapshotRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -705,7 +690,7 @@ export const se_UpdateUsageLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUsageLimit"); let body: any; - body = JSON.stringify(se_UpdateUsageLimitRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -718,7 +703,7 @@ export const se_UpdateWorkgroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkgroup"); let body: any; - body = JSON.stringify(se_UpdateWorkgroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -739,7 +724,7 @@ export const de_ConvertRecoveryPointToSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -775,10 +760,9 @@ const de_ConvertRecoveryPointToSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -801,7 +785,7 @@ export const de_CreateEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -837,10 +821,9 @@ const de_CreateEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -863,7 +846,7 @@ export const de_CreateNamespaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -893,10 +876,9 @@ const de_CreateNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -919,7 +901,7 @@ export const de_CreateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -955,10 +937,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -976,12 +957,12 @@ export const de_CreateUsageLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUsageLimitResponse(data, context); + contents = _json(data); const response: CreateUsageLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1014,10 +995,9 @@ const de_CreateUsageLimitCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1040,7 +1020,7 @@ export const de_CreateWorkgroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1076,10 +1056,9 @@ const de_CreateWorkgroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1102,7 +1081,7 @@ export const de_DeleteEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1132,10 +1111,9 @@ const de_DeleteEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1158,7 +1136,7 @@ export const de_DeleteNamespaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1188,10 +1166,9 @@ const de_DeleteNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1209,12 +1186,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1241,10 +1218,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1267,7 +1243,7 @@ export const de_DeleteSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1297,10 +1273,9 @@ const de_DeleteSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1318,12 +1293,12 @@ export const de_DeleteUsageLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUsageLimitResponse(data, context); + contents = _json(data); const response: DeleteUsageLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1353,10 +1328,9 @@ const de_DeleteUsageLimitCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1379,7 +1353,7 @@ export const de_DeleteWorkgroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1409,10 +1383,9 @@ const de_DeleteWorkgroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1435,7 +1408,7 @@ export const de_GetCredentialsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1462,10 +1435,9 @@ const de_GetCredentialsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1488,7 +1460,7 @@ export const de_GetEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1518,10 +1490,9 @@ const de_GetEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1544,7 +1515,7 @@ export const de_GetNamespaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1571,10 +1542,9 @@ const de_GetNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1597,7 +1567,7 @@ export const de_GetRecoveryPointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1627,10 +1597,9 @@ const de_GetRecoveryPointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1648,12 +1617,12 @@ export const de_GetResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcePolicyResponse(data, context); + contents = _json(data); const response: GetResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1680,10 +1649,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1706,7 +1674,7 @@ export const de_GetSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1733,10 +1701,9 @@ const de_GetSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1759,7 +1726,7 @@ export const de_GetTableRestoreStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1783,10 +1750,9 @@ const de_GetTableRestoreStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1804,12 +1770,12 @@ export const de_GetUsageLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetUsageLimitResponse(data, context); + contents = _json(data); const response: GetUsageLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1839,10 +1805,9 @@ const de_GetUsageLimitCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1865,7 +1830,7 @@ export const de_GetWorkgroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1892,10 +1857,9 @@ const de_GetWorkgroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1918,7 +1882,7 @@ export const de_ListEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1948,10 +1912,9 @@ const de_ListEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1974,7 +1937,7 @@ export const de_ListNamespacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1998,10 +1961,9 @@ const de_ListNamespacesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2024,7 +1986,7 @@ export const de_ListRecoveryPointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2048,10 +2010,9 @@ const de_ListRecoveryPointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2074,7 +2035,7 @@ export const de_ListSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2101,10 +2062,9 @@ const de_ListSnapshotsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2127,7 +2087,7 @@ export const de_ListTableRestoreStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2154,10 +2114,9 @@ const de_ListTableRestoreStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2175,12 +2134,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2210,10 +2169,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2231,12 +2189,12 @@ export const de_ListUsageLimitsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListUsageLimitsResponse(data, context); + contents = _json(data); const response: ListUsageLimitsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2269,10 +2227,9 @@ const de_ListUsageLimitsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2295,7 +2252,7 @@ export const de_ListWorkgroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2319,10 +2276,9 @@ const de_ListWorkgroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2340,12 +2296,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2378,10 +2334,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2404,7 +2359,7 @@ export const de_RestoreFromRecoveryPointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2434,10 +2389,9 @@ const de_RestoreFromRecoveryPointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2460,7 +2414,7 @@ export const de_RestoreFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2493,10 +2447,9 @@ const de_RestoreFromSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,7 +2472,7 @@ export const de_RestoreTableFromSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2549,10 +2502,9 @@ const de_RestoreTableFromSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2570,12 +2522,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2608,10 +2560,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2629,12 +2580,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2664,10 +2615,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2690,7 +2640,7 @@ export const de_UpdateEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2723,10 +2673,9 @@ const de_UpdateEndpointAccessCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2749,7 +2698,7 @@ export const de_UpdateNamespaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2779,10 +2728,9 @@ const de_UpdateNamespaceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2805,7 +2753,7 @@ export const de_UpdateSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2835,10 +2783,9 @@ const de_UpdateSnapshotCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2856,12 +2803,12 @@ export const de_UpdateUsageLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUsageLimitResponse(data, context); + contents = _json(data); const response: UpdateUsageLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2891,10 +2838,9 @@ const de_UpdateUsageLimitCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2917,7 +2863,7 @@ export const de_UpdateWorkgroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2950,10 +2896,9 @@ const de_UpdateWorkgroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2967,7 +2912,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2980,7 +2925,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2996,7 +2941,7 @@ const de_InsufficientCapacityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InsufficientCapacityException(body, context); + const deserialized: any = _json(body); const exception = new InsufficientCapacityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3012,7 +2957,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3028,7 +2973,7 @@ const de_InvalidPaginationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPaginationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPaginationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3044,7 +2989,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3060,7 +3005,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3073,7 +3018,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3089,7 +3034,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3102,7 +3047,7 @@ const de_TooManyTagsExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3110,644 +3055,140 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ConfigParameter - */ -const se_ConfigParameter = (input: ConfigParameter, context: __SerdeContext): any => { - return { - ...(input.parameterKey != null && { parameterKey: input.parameterKey }), - ...(input.parameterValue != null && { parameterValue: input.parameterValue }), - }; -}; +// se_ConfigParameter omitted. -/** - * serializeAws_json1_1ConfigParameterList - */ -const se_ConfigParameterList = (input: ConfigParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ConfigParameter(entry, context); - }); -}; +// se_ConfigParameterList omitted. -/** - * serializeAws_json1_1ConvertRecoveryPointToSnapshotRequest - */ -const se_ConvertRecoveryPointToSnapshotRequest = ( - input: ConvertRecoveryPointToSnapshotRequest, - context: __SerdeContext -): any => { - return { - ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }), - ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_ConvertRecoveryPointToSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateEndpointAccessRequest - */ -const se_CreateEndpointAccessRequest = (input: CreateEndpointAccessRequest, context: __SerdeContext): any => { - return { - ...(input.endpointName != null && { endpointName: input.endpointName }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }), - ...(input.vpcSecurityGroupIds != null && { - vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context), - }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_CreateEndpointAccessRequest omitted. -/** - * serializeAws_json1_1CreateNamespaceRequest - */ -const se_CreateNamespaceRequest = (input: CreateNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }), - ...(input.adminUsername != null && { adminUsername: input.adminUsername }), - ...(input.dbName != null && { dbName: input.dbName }), - ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }), - ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateNamespaceRequest omitted. -/** - * serializeAws_json1_1CreateSnapshotRequest - */ -const se_CreateSnapshotRequest = (input: CreateSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateSnapshotRequest omitted. -/** - * serializeAws_json1_1CreateUsageLimitRequest - */ -const se_CreateUsageLimitRequest = (input: CreateUsageLimitRequest, context: __SerdeContext): any => { - return { - ...(input.amount != null && { amount: input.amount }), - ...(input.breachAction != null && { breachAction: input.breachAction }), - ...(input.period != null && { period: input.period }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.usageType != null && { usageType: input.usageType }), - }; -}; +// se_CreateUsageLimitRequest omitted. -/** - * serializeAws_json1_1CreateWorkgroupRequest - */ -const se_CreateWorkgroupRequest = (input: CreateWorkgroupRequest, context: __SerdeContext): any => { - return { - ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }), - ...(input.configParameters != null && { - configParameters: se_ConfigParameterList(input.configParameters, context), - }), - ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.port != null && { port: input.port }), - ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }), - ...(input.securityGroupIds != null && { - securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context), - }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_CreateWorkgroupRequest omitted. -/** - * serializeAws_json1_1DeleteEndpointAccessRequest - */ -const se_DeleteEndpointAccessRequest = (input: DeleteEndpointAccessRequest, context: __SerdeContext): any => { - return { - ...(input.endpointName != null && { endpointName: input.endpointName }), - }; -}; +// se_DeleteEndpointAccessRequest omitted. -/** - * serializeAws_json1_1DeleteNamespaceRequest - */ -const se_DeleteNamespaceRequest = (input: DeleteNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.finalSnapshotName != null && { finalSnapshotName: input.finalSnapshotName }), - ...(input.finalSnapshotRetentionPeriod != null && { - finalSnapshotRetentionPeriod: input.finalSnapshotRetentionPeriod, - }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - }; -}; +// se_DeleteNamespaceRequest omitted. -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * serializeAws_json1_1DeleteSnapshotRequest - */ -const se_DeleteSnapshotRequest = (input: DeleteSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - }; -}; +// se_DeleteSnapshotRequest omitted. -/** - * serializeAws_json1_1DeleteUsageLimitRequest - */ -const se_DeleteUsageLimitRequest = (input: DeleteUsageLimitRequest, context: __SerdeContext): any => { - return { - ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }), - }; -}; +// se_DeleteUsageLimitRequest omitted. -/** - * serializeAws_json1_1DeleteWorkgroupRequest - */ -const se_DeleteWorkgroupRequest = (input: DeleteWorkgroupRequest, context: __SerdeContext): any => { - return { - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_DeleteWorkgroupRequest omitted. -/** - * serializeAws_json1_1GetCredentialsRequest - */ -const se_GetCredentialsRequest = (input: GetCredentialsRequest, context: __SerdeContext): any => { - return { - ...(input.dbName != null && { dbName: input.dbName }), - ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_GetCredentialsRequest omitted. -/** - * serializeAws_json1_1GetEndpointAccessRequest - */ -const se_GetEndpointAccessRequest = (input: GetEndpointAccessRequest, context: __SerdeContext): any => { - return { - ...(input.endpointName != null && { endpointName: input.endpointName }), - }; -}; +// se_GetEndpointAccessRequest omitted. -/** - * serializeAws_json1_1GetNamespaceRequest - */ -const se_GetNamespaceRequest = (input: GetNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - }; -}; +// se_GetNamespaceRequest omitted. -/** - * serializeAws_json1_1GetRecoveryPointRequest - */ -const se_GetRecoveryPointRequest = (input: GetRecoveryPointRequest, context: __SerdeContext): any => { - return { - ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }), - }; -}; +// se_GetRecoveryPointRequest omitted. -/** - * serializeAws_json1_1GetResourcePolicyRequest - */ -const se_GetResourcePolicyRequest = (input: GetResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_GetResourcePolicyRequest omitted. -/** - * serializeAws_json1_1GetSnapshotRequest - */ -const se_GetSnapshotRequest = (input: GetSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - }; -}; +// se_GetSnapshotRequest omitted. -/** - * serializeAws_json1_1GetTableRestoreStatusRequest - */ -const se_GetTableRestoreStatusRequest = (input: GetTableRestoreStatusRequest, context: __SerdeContext): any => { - return { - ...(input.tableRestoreRequestId != null && { tableRestoreRequestId: input.tableRestoreRequestId }), - }; -}; +// se_GetTableRestoreStatusRequest omitted. -/** - * serializeAws_json1_1GetUsageLimitRequest - */ -const se_GetUsageLimitRequest = (input: GetUsageLimitRequest, context: __SerdeContext): any => { - return { - ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }), - }; -}; +// se_GetUsageLimitRequest omitted. -/** - * serializeAws_json1_1GetWorkgroupRequest - */ -const se_GetWorkgroupRequest = (input: GetWorkgroupRequest, context: __SerdeContext): any => { - return { - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_GetWorkgroupRequest omitted. -/** - * serializeAws_json1_1IamRoleArnList - */ -const se_IamRoleArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IamRoleArnList omitted. -/** - * serializeAws_json1_1ListEndpointAccessRequest - */ -const se_ListEndpointAccessRequest = (input: ListEndpointAccessRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_ListEndpointAccessRequest omitted. -/** - * serializeAws_json1_1ListNamespacesRequest - */ -const se_ListNamespacesRequest = (input: ListNamespacesRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListNamespacesRequest omitted. /** * serializeAws_json1_1ListRecoveryPointsRequest */ const se_ListRecoveryPointsRequest = (input: ListRecoveryPointsRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + maxResults: [], + namespaceArn: [], + namespaceName: [], + nextToken: [], + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1ListSnapshotsRequest */ const se_ListSnapshotsRequest = (input: ListSnapshotsRequest, context: __SerdeContext): any => { - return { - ...(input.endTime != null && { endTime: Math.round(input.endTime.getTime() / 1000) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.namespaceArn != null && { namespaceArn: input.namespaceArn }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - ...(input.startTime != null && { startTime: Math.round(input.startTime.getTime() / 1000) }), - }; + return take(input, { + endTime: (_) => Math.round(_.getTime() / 1000), + maxResults: [], + namespaceArn: [], + namespaceName: [], + nextToken: [], + ownerAccount: [], + startTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListTableRestoreStatusRequest - */ -const se_ListTableRestoreStatusRequest = (input: ListTableRestoreStatusRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_ListTableRestoreStatusRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListUsageLimitsRequest - */ -const se_ListUsageLimitsRequest = (input: ListUsageLimitsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.usageType != null && { usageType: input.usageType }), - }; -}; +// se_ListUsageLimitsRequest omitted. -/** - * serializeAws_json1_1ListWorkgroupsRequest - */ -const se_ListWorkgroupsRequest = (input: ListWorkgroupsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListWorkgroupsRequest omitted. -/** - * serializeAws_json1_1LogExportList - */ -const se_LogExportList = (input: (LogExport | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LogExportList omitted. -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.policy != null && { policy: input.policy }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_PutResourcePolicyRequest omitted. -/** - * serializeAws_json1_1RestoreFromRecoveryPointRequest - */ -const se_RestoreFromRecoveryPointRequest = (input: RestoreFromRecoveryPointRequest, context: __SerdeContext): any => { - return { - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.recoveryPointId != null && { recoveryPointId: input.recoveryPointId }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_RestoreFromRecoveryPointRequest omitted. -/** - * serializeAws_json1_1RestoreFromSnapshotRequest - */ -const se_RestoreFromSnapshotRequest = (input: RestoreFromSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.ownerAccount != null && { ownerAccount: input.ownerAccount }), - ...(input.snapshotArn != null && { snapshotArn: input.snapshotArn }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_RestoreFromSnapshotRequest omitted. -/** - * serializeAws_json1_1RestoreTableFromSnapshotRequest - */ -const se_RestoreTableFromSnapshotRequest = (input: RestoreTableFromSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.activateCaseSensitiveIdentifier != null && { - activateCaseSensitiveIdentifier: input.activateCaseSensitiveIdentifier, - }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - ...(input.newTableName != null && { newTableName: input.newTableName }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - ...(input.sourceDatabaseName != null && { sourceDatabaseName: input.sourceDatabaseName }), - ...(input.sourceSchemaName != null && { sourceSchemaName: input.sourceSchemaName }), - ...(input.sourceTableName != null && { sourceTableName: input.sourceTableName }), - ...(input.targetDatabaseName != null && { targetDatabaseName: input.targetDatabaseName }), - ...(input.targetSchemaName != null && { targetSchemaName: input.targetSchemaName }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_RestoreTableFromSnapshotRequest omitted. -/** - * serializeAws_json1_1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIdList omitted. -/** - * serializeAws_json1_1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIdList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateEndpointAccessRequest - */ -const se_UpdateEndpointAccessRequest = (input: UpdateEndpointAccessRequest, context: __SerdeContext): any => { - return { - ...(input.endpointName != null && { endpointName: input.endpointName }), - ...(input.vpcSecurityGroupIds != null && { - vpcSecurityGroupIds: se_VpcSecurityGroupIdList(input.vpcSecurityGroupIds, context), - }), - }; -}; +// se_UpdateEndpointAccessRequest omitted. -/** - * serializeAws_json1_1UpdateNamespaceRequest - */ -const se_UpdateNamespaceRequest = (input: UpdateNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.adminUserPassword != null && { adminUserPassword: input.adminUserPassword }), - ...(input.adminUsername != null && { adminUsername: input.adminUsername }), - ...(input.defaultIamRoleArn != null && { defaultIamRoleArn: input.defaultIamRoleArn }), - ...(input.iamRoles != null && { iamRoles: se_IamRoleArnList(input.iamRoles, context) }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.logExports != null && { logExports: se_LogExportList(input.logExports, context) }), - ...(input.namespaceName != null && { namespaceName: input.namespaceName }), - }; -}; +// se_UpdateNamespaceRequest omitted. -/** - * serializeAws_json1_1UpdateSnapshotRequest - */ -const se_UpdateSnapshotRequest = (input: UpdateSnapshotRequest, context: __SerdeContext): any => { - return { - ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }), - ...(input.snapshotName != null && { snapshotName: input.snapshotName }), - }; -}; +// se_UpdateSnapshotRequest omitted. -/** - * serializeAws_json1_1UpdateUsageLimitRequest - */ -const se_UpdateUsageLimitRequest = (input: UpdateUsageLimitRequest, context: __SerdeContext): any => { - return { - ...(input.amount != null && { amount: input.amount }), - ...(input.breachAction != null && { breachAction: input.breachAction }), - ...(input.usageLimitId != null && { usageLimitId: input.usageLimitId }), - }; -}; +// se_UpdateUsageLimitRequest omitted. -/** - * serializeAws_json1_1UpdateWorkgroupRequest - */ -const se_UpdateWorkgroupRequest = (input: UpdateWorkgroupRequest, context: __SerdeContext): any => { - return { - ...(input.baseCapacity != null && { baseCapacity: input.baseCapacity }), - ...(input.configParameters != null && { - configParameters: se_ConfigParameterList(input.configParameters, context), - }), - ...(input.enhancedVpcRouting != null && { enhancedVpcRouting: input.enhancedVpcRouting }), - ...(input.port != null && { port: input.port }), - ...(input.publiclyAccessible != null && { publiclyAccessible: input.publiclyAccessible }), - ...(input.securityGroupIds != null && { - securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context), - }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }), - ...(input.workgroupName != null && { workgroupName: input.workgroupName }), - }; -}; +// se_UpdateWorkgroupRequest omitted. -/** - * serializeAws_json1_1VpcSecurityGroupIdList - */ -const se_VpcSecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_VpcSecurityGroupIdList omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AccountIdList - */ -const de_AccountIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccountIdList omitted. -/** - * deserializeAws_json1_1ConfigParameter - */ -const de_ConfigParameter = (output: any, context: __SerdeContext): ConfigParameter => { - return { - parameterKey: __expectString(output.parameterKey), - parameterValue: __expectString(output.parameterValue), - } as any; -}; +// de_ConfigParameter omitted. -/** - * deserializeAws_json1_1ConfigParameterList - */ -const de_ConfigParameterList = (output: any, context: __SerdeContext): ConfigParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConfigParameter(entry, context); - }); - return retVal; -}; +// de_ConfigParameterList omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ConflictException omitted. /** * deserializeAws_json1_1ConvertRecoveryPointToSnapshotResponse @@ -3756,141 +3197,107 @@ const de_ConvertRecoveryPointToSnapshotResponse = ( output: any, context: __SerdeContext ): ConvertRecoveryPointToSnapshotResponse => { - return { - snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined, - } as any; + return take(output, { + snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateEndpointAccessResponse */ const de_CreateEndpointAccessResponse = (output: any, context: __SerdeContext): CreateEndpointAccessResponse => { - return { - endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined, - } as any; + return take(output, { + endpoint: (_: any) => de_EndpointAccess(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateNamespaceResponse */ const de_CreateNamespaceResponse = (output: any, context: __SerdeContext): CreateNamespaceResponse => { - return { - namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined, - } as any; + return take(output, { + namespace: (_: any) => de_Namespace(_, context), + }) as any; }; /** * deserializeAws_json1_1CreateSnapshotResponse */ const de_CreateSnapshotResponse = (output: any, context: __SerdeContext): CreateSnapshotResponse => { - return { - snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined, - } as any; + return take(output, { + snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateUsageLimitResponse - */ -const de_CreateUsageLimitResponse = (output: any, context: __SerdeContext): CreateUsageLimitResponse => { - return { - usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined, - } as any; -}; +// de_CreateUsageLimitResponse omitted. /** * deserializeAws_json1_1CreateWorkgroupResponse */ const de_CreateWorkgroupResponse = (output: any, context: __SerdeContext): CreateWorkgroupResponse => { - return { - workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined, - } as any; + return take(output, { + workgroup: (_: any) => de_Workgroup(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteEndpointAccessResponse */ const de_DeleteEndpointAccessResponse = (output: any, context: __SerdeContext): DeleteEndpointAccessResponse => { - return { - endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined, - } as any; + return take(output, { + endpoint: (_: any) => de_EndpointAccess(_, context), + }) as any; }; /** * deserializeAws_json1_1DeleteNamespaceResponse */ const de_DeleteNamespaceResponse = (output: any, context: __SerdeContext): DeleteNamespaceResponse => { - return { - namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined, - } as any; + return take(output, { + namespace: (_: any) => de_Namespace(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return {} as any; -}; +// de_DeleteResourcePolicyResponse omitted. /** * deserializeAws_json1_1DeleteSnapshotResponse */ const de_DeleteSnapshotResponse = (output: any, context: __SerdeContext): DeleteSnapshotResponse => { - return { - snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined, - } as any; + return take(output, { + snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteUsageLimitResponse - */ -const de_DeleteUsageLimitResponse = (output: any, context: __SerdeContext): DeleteUsageLimitResponse => { - return { - usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined, - } as any; -}; +// de_DeleteUsageLimitResponse omitted. /** * deserializeAws_json1_1DeleteWorkgroupResponse */ const de_DeleteWorkgroupResponse = (output: any, context: __SerdeContext): DeleteWorkgroupResponse => { - return { - workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined, - } as any; + return take(output, { + workgroup: (_: any) => de_Workgroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - address: __expectString(output.address), - port: __expectInt32(output.port), - vpcEndpoints: output.vpcEndpoints != null ? de_VpcEndpointList(output.vpcEndpoints, context) : undefined, - } as any; -}; +// de_Endpoint omitted. /** * deserializeAws_json1_1EndpointAccess */ const de_EndpointAccess = (output: any, context: __SerdeContext): EndpointAccess => { - return { - address: __expectString(output.address), - endpointArn: __expectString(output.endpointArn), - endpointCreateTime: - output.endpointCreateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.endpointCreateTime)) - : undefined, - endpointName: __expectString(output.endpointName), - endpointStatus: __expectString(output.endpointStatus), - port: __expectInt32(output.port), - subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - vpcEndpoint: output.vpcEndpoint != null ? de_VpcEndpoint(output.vpcEndpoint, context) : undefined, - vpcSecurityGroups: - output.vpcSecurityGroups != null - ? de_VpcSecurityGroupMembershipList(output.vpcSecurityGroups, context) - : undefined, - workgroupName: __expectString(output.workgroupName), - } as any; + return take(output, { + address: __expectString, + endpointArn: __expectString, + endpointCreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + endpointName: __expectString, + endpointStatus: __expectString, + port: __expectInt32, + subnetIds: _json, + vpcEndpoint: _json, + vpcSecurityGroups: _json, + workgroupName: __expectString, + }) as any; }; /** @@ -3900,9 +3307,6 @@ const de_EndpointAccessList = (output: any, context: __SerdeContext): EndpointAc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EndpointAccess(entry, context); }); return retVal; @@ -3912,246 +3316,163 @@ const de_EndpointAccessList = (output: any, context: __SerdeContext): EndpointAc * deserializeAws_json1_1GetCredentialsResponse */ const de_GetCredentialsResponse = (output: any, context: __SerdeContext): GetCredentialsResponse => { - return { - dbPassword: __expectString(output.dbPassword), - dbUser: __expectString(output.dbUser), - expiration: - output.expiration != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.expiration))) : undefined, - nextRefreshTime: - output.nextRefreshTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.nextRefreshTime))) - : undefined, - } as any; + return take(output, { + dbPassword: __expectString, + dbUser: __expectString, + expiration: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + nextRefreshTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1GetEndpointAccessResponse */ const de_GetEndpointAccessResponse = (output: any, context: __SerdeContext): GetEndpointAccessResponse => { - return { - endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined, - } as any; + return take(output, { + endpoint: (_: any) => de_EndpointAccess(_, context), + }) as any; }; /** * deserializeAws_json1_1GetNamespaceResponse */ const de_GetNamespaceResponse = (output: any, context: __SerdeContext): GetNamespaceResponse => { - return { - namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined, - } as any; + return take(output, { + namespace: (_: any) => de_Namespace(_, context), + }) as any; }; /** * deserializeAws_json1_1GetRecoveryPointResponse */ const de_GetRecoveryPointResponse = (output: any, context: __SerdeContext): GetRecoveryPointResponse => { - return { - recoveryPoint: output.recoveryPoint != null ? de_RecoveryPoint(output.recoveryPoint, context) : undefined, - } as any; + return take(output, { + recoveryPoint: (_: any) => de_RecoveryPoint(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetResourcePolicyResponse - */ -const de_GetResourcePolicyResponse = (output: any, context: __SerdeContext): GetResourcePolicyResponse => { - return { - resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined, - } as any; -}; +// de_GetResourcePolicyResponse omitted. /** * deserializeAws_json1_1GetSnapshotResponse */ const de_GetSnapshotResponse = (output: any, context: __SerdeContext): GetSnapshotResponse => { - return { - snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined, - } as any; + return take(output, { + snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTableRestoreStatusResponse */ const de_GetTableRestoreStatusResponse = (output: any, context: __SerdeContext): GetTableRestoreStatusResponse => { - return { - tableRestoreStatus: - output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined, - } as any; + return take(output, { + tableRestoreStatus: (_: any) => de_TableRestoreStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetUsageLimitResponse - */ -const de_GetUsageLimitResponse = (output: any, context: __SerdeContext): GetUsageLimitResponse => { - return { - usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined, - } as any; -}; +// de_GetUsageLimitResponse omitted. /** * deserializeAws_json1_1GetWorkgroupResponse */ const de_GetWorkgroupResponse = (output: any, context: __SerdeContext): GetWorkgroupResponse => { - return { - workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined, - } as any; + return take(output, { + workgroup: (_: any) => de_Workgroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1IamRoleArnList - */ -const de_IamRoleArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IamRoleArnList omitted. -/** - * deserializeAws_json1_1InsufficientCapacityException - */ -const de_InsufficientCapacityException = (output: any, context: __SerdeContext): InsufficientCapacityException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InsufficientCapacityException omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1InvalidPaginationException - */ -const de_InvalidPaginationException = (output: any, context: __SerdeContext): InvalidPaginationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidPaginationException omitted. /** * deserializeAws_json1_1ListEndpointAccessResponse */ const de_ListEndpointAccessResponse = (output: any, context: __SerdeContext): ListEndpointAccessResponse => { - return { - endpoints: output.endpoints != null ? de_EndpointAccessList(output.endpoints, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + endpoints: (_: any) => de_EndpointAccessList(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListNamespacesResponse */ const de_ListNamespacesResponse = (output: any, context: __SerdeContext): ListNamespacesResponse => { - return { - namespaces: output.namespaces != null ? de_NamespaceList(output.namespaces, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + namespaces: (_: any) => de_NamespaceList(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListRecoveryPointsResponse */ const de_ListRecoveryPointsResponse = (output: any, context: __SerdeContext): ListRecoveryPointsResponse => { - return { - nextToken: __expectString(output.nextToken), - recoveryPoints: output.recoveryPoints != null ? de_RecoveryPointList(output.recoveryPoints, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + recoveryPoints: (_: any) => de_RecoveryPointList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListSnapshotsResponse */ const de_ListSnapshotsResponse = (output: any, context: __SerdeContext): ListSnapshotsResponse => { - return { - nextToken: __expectString(output.nextToken), - snapshots: output.snapshots != null ? de_SnapshotList(output.snapshots, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + snapshots: (_: any) => de_SnapshotList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListTableRestoreStatusResponse */ const de_ListTableRestoreStatusResponse = (output: any, context: __SerdeContext): ListTableRestoreStatusResponse => { - return { - nextToken: __expectString(output.nextToken), - tableRestoreStatuses: - output.tableRestoreStatuses != null ? de_TableRestoreStatusList(output.tableRestoreStatuses, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + tableRestoreStatuses: (_: any) => de_TableRestoreStatusList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1ListUsageLimitsResponse - */ -const de_ListUsageLimitsResponse = (output: any, context: __SerdeContext): ListUsageLimitsResponse => { - return { - nextToken: __expectString(output.nextToken), - usageLimits: output.usageLimits != null ? de_UsageLimits(output.usageLimits, context) : undefined, - } as any; -}; +// de_ListUsageLimitsResponse omitted. /** * deserializeAws_json1_1ListWorkgroupsResponse */ const de_ListWorkgroupsResponse = (output: any, context: __SerdeContext): ListWorkgroupsResponse => { - return { - nextToken: __expectString(output.nextToken), - workgroups: output.workgroups != null ? de_WorkgroupList(output.workgroups, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + workgroups: (_: any) => de_WorkgroupList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1LogExportList - */ -const de_LogExportList = (output: any, context: __SerdeContext): (LogExport | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LogExportList omitted. /** * deserializeAws_json1_1Namespace */ const de_Namespace = (output: any, context: __SerdeContext): Namespace => { - return { - adminUsername: __expectString(output.adminUsername), - creationDate: - output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined, - dbName: __expectString(output.dbName), - defaultIamRoleArn: __expectString(output.defaultIamRoleArn), - iamRoles: output.iamRoles != null ? de_IamRoleArnList(output.iamRoles, context) : undefined, - kmsKeyId: __expectString(output.kmsKeyId), - logExports: output.logExports != null ? de_LogExportList(output.logExports, context) : undefined, - namespaceArn: __expectString(output.namespaceArn), - namespaceId: __expectString(output.namespaceId), - namespaceName: __expectString(output.namespaceName), - status: __expectString(output.status), - } as any; + return take(output, { + adminUsername: __expectString, + creationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + dbName: __expectString, + defaultIamRoleArn: __expectString, + iamRoles: _json, + kmsKeyId: __expectString, + logExports: _json, + namespaceArn: __expectString, + namespaceId: __expectString, + namespaceName: __expectString, + status: __expectString, + }) as any; }; /** @@ -4161,65 +3482,29 @@ const de_NamespaceList = (output: any, context: __SerdeContext): Namespace[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Namespace(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - availabilityZone: __expectString(output.availabilityZone), - networkInterfaceId: __expectString(output.networkInterfaceId), - privateIpAddress: __expectString(output.privateIpAddress), - subnetId: __expectString(output.subnetId), - } as any; -}; +// de_NetworkInterface omitted. -/** - * deserializeAws_json1_1NetworkInterfaceList - */ -const de_NetworkInterfaceList = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; -}; +// de_NetworkInterfaceList omitted. -/** - * deserializeAws_json1_1PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - resourcePolicy: output.resourcePolicy != null ? de_ResourcePolicy(output.resourcePolicy, context) : undefined, - } as any; -}; +// de_PutResourcePolicyResponse omitted. /** * deserializeAws_json1_1RecoveryPoint */ const de_RecoveryPoint = (output: any, context: __SerdeContext): RecoveryPoint => { - return { - namespaceArn: __expectString(output.namespaceArn), - namespaceName: __expectString(output.namespaceName), - recoveryPointCreateTime: - output.recoveryPointCreateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.recoveryPointCreateTime)) - : undefined, - recoveryPointId: __expectString(output.recoveryPointId), - totalSizeInMegaBytes: __limitedParseDouble(output.totalSizeInMegaBytes), - workgroupName: __expectString(output.workgroupName), - } as any; + return take(output, { + namespaceArn: __expectString, + namespaceName: __expectString, + recoveryPointCreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + recoveryPointId: __expectString, + totalSizeInMegaBytes: __limitedParseDouble, + workgroupName: __expectString, + }) as any; }; /** @@ -4229,33 +3514,14 @@ const de_RecoveryPointList = (output: any, context: __SerdeContext): RecoveryPoi const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecoveryPoint(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResourcePolicy - */ -const de_ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => { - return { - policy: __expectString(output.policy), - resourceArn: __expectString(output.resourceArn), - } as any; -}; +// de_ResourcePolicy omitted. /** * deserializeAws_json1_1RestoreFromRecoveryPointResponse @@ -4264,21 +3530,21 @@ const de_RestoreFromRecoveryPointResponse = ( output: any, context: __SerdeContext ): RestoreFromRecoveryPointResponse => { - return { - namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined, - recoveryPointId: __expectString(output.recoveryPointId), - } as any; + return take(output, { + namespace: (_: any) => de_Namespace(_, context), + recoveryPointId: __expectString, + }) as any; }; /** * deserializeAws_json1_1RestoreFromSnapshotResponse */ const de_RestoreFromSnapshotResponse = (output: any, context: __SerdeContext): RestoreFromSnapshotResponse => { - return { - namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined, - ownerAccount: __expectString(output.ownerAccount), - snapshotName: __expectString(output.snapshotName), - } as any; + return take(output, { + namespace: (_: any) => de_Namespace(_, context), + ownerAccount: __expectString, + snapshotName: __expectString, + }) as any; }; /** @@ -4288,74 +3554,41 @@ const de_RestoreTableFromSnapshotResponse = ( output: any, context: __SerdeContext ): RestoreTableFromSnapshotResponse => { - return { - tableRestoreStatus: - output.tableRestoreStatus != null ? de_TableRestoreStatus(output.tableRestoreStatus, context) : undefined, - } as any; + return take(output, { + tableRestoreStatus: (_: any) => de_TableRestoreStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1SecurityGroupIdList - */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIdList omitted. -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. /** * deserializeAws_json1_1Snapshot */ const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => { - return { - accountsWithProvisionedRestoreAccess: - output.accountsWithProvisionedRestoreAccess != null - ? de_AccountIdList(output.accountsWithProvisionedRestoreAccess, context) - : undefined, - accountsWithRestoreAccess: - output.accountsWithRestoreAccess != null - ? de_AccountIdList(output.accountsWithRestoreAccess, context) - : undefined, - actualIncrementalBackupSizeInMegaBytes: __limitedParseDouble(output.actualIncrementalBackupSizeInMegaBytes), - adminUsername: __expectString(output.adminUsername), - backupProgressInMegaBytes: __limitedParseDouble(output.backupProgressInMegaBytes), - currentBackupRateInMegaBytesPerSecond: __limitedParseDouble(output.currentBackupRateInMegaBytesPerSecond), - elapsedTimeInSeconds: __expectLong(output.elapsedTimeInSeconds), - estimatedSecondsToCompletion: __expectLong(output.estimatedSecondsToCompletion), - kmsKeyId: __expectString(output.kmsKeyId), - namespaceArn: __expectString(output.namespaceArn), - namespaceName: __expectString(output.namespaceName), - ownerAccount: __expectString(output.ownerAccount), - snapshotArn: __expectString(output.snapshotArn), - snapshotCreateTime: - output.snapshotCreateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.snapshotCreateTime)) - : undefined, - snapshotName: __expectString(output.snapshotName), - snapshotRemainingDays: __expectInt32(output.snapshotRemainingDays), - snapshotRetentionPeriod: __expectInt32(output.snapshotRetentionPeriod), - snapshotRetentionStartTime: - output.snapshotRetentionStartTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.snapshotRetentionStartTime)) - : undefined, - status: __expectString(output.status), - totalBackupSizeInMegaBytes: __limitedParseDouble(output.totalBackupSizeInMegaBytes), - } as any; + return take(output, { + accountsWithProvisionedRestoreAccess: _json, + accountsWithRestoreAccess: _json, + actualIncrementalBackupSizeInMegaBytes: __limitedParseDouble, + adminUsername: __expectString, + backupProgressInMegaBytes: __limitedParseDouble, + currentBackupRateInMegaBytesPerSecond: __limitedParseDouble, + elapsedTimeInSeconds: __expectLong, + estimatedSecondsToCompletion: __expectLong, + kmsKeyId: __expectString, + namespaceArn: __expectString, + namespaceName: __expectString, + ownerAccount: __expectString, + snapshotArn: __expectString, + snapshotCreateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + snapshotName: __expectString, + snapshotRemainingDays: __expectInt32, + snapshotRetentionPeriod: __expectInt32, + snapshotRetentionStartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + status: __expectString, + totalBackupSizeInMegaBytes: __limitedParseDouble, + }) as any; }; /** @@ -4365,53 +3598,34 @@ const de_SnapshotList = (output: any, context: __SerdeContext): Snapshot[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Snapshot(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIdList omitted. /** * deserializeAws_json1_1TableRestoreStatus */ const de_TableRestoreStatus = (output: any, context: __SerdeContext): TableRestoreStatus => { - return { - message: __expectString(output.message), - namespaceName: __expectString(output.namespaceName), - newTableName: __expectString(output.newTableName), - progressInMegaBytes: __expectLong(output.progressInMegaBytes), - requestTime: - output.requestTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.requestTime))) - : undefined, - snapshotName: __expectString(output.snapshotName), - sourceDatabaseName: __expectString(output.sourceDatabaseName), - sourceSchemaName: __expectString(output.sourceSchemaName), - sourceTableName: __expectString(output.sourceTableName), - status: __expectString(output.status), - tableRestoreRequestId: __expectString(output.tableRestoreRequestId), - targetDatabaseName: __expectString(output.targetDatabaseName), - targetSchemaName: __expectString(output.targetSchemaName), - totalDataInMegaBytes: __expectLong(output.totalDataInMegaBytes), - workgroupName: __expectString(output.workgroupName), - } as any; + return take(output, { + message: __expectString, + namespaceName: __expectString, + newTableName: __expectString, + progressInMegaBytes: __expectLong, + requestTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + snapshotName: __expectString, + sourceDatabaseName: __expectString, + sourceSchemaName: __expectString, + sourceTableName: __expectString, + status: __expectString, + tableRestoreRequestId: __expectString, + targetDatabaseName: __expectString, + targetSchemaName: __expectString, + totalDataInMegaBytes: __expectLong, + workgroupName: __expectString, + }) as any; }; /** @@ -4421,232 +3635,95 @@ const de_TableRestoreStatusList = (output: any, context: __SerdeContext): TableR const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TableRestoreStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - code: __expectString(output.code), - message: __expectString(output.message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateEndpointAccessResponse */ const de_UpdateEndpointAccessResponse = (output: any, context: __SerdeContext): UpdateEndpointAccessResponse => { - return { - endpoint: output.endpoint != null ? de_EndpointAccess(output.endpoint, context) : undefined, - } as any; + return take(output, { + endpoint: (_: any) => de_EndpointAccess(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateNamespaceResponse */ const de_UpdateNamespaceResponse = (output: any, context: __SerdeContext): UpdateNamespaceResponse => { - return { - namespace: output.namespace != null ? de_Namespace(output.namespace, context) : undefined, - } as any; + return take(output, { + namespace: (_: any) => de_Namespace(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateSnapshotResponse */ const de_UpdateSnapshotResponse = (output: any, context: __SerdeContext): UpdateSnapshotResponse => { - return { - snapshot: output.snapshot != null ? de_Snapshot(output.snapshot, context) : undefined, - } as any; + return take(output, { + snapshot: (_: any) => de_Snapshot(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateUsageLimitResponse - */ -const de_UpdateUsageLimitResponse = (output: any, context: __SerdeContext): UpdateUsageLimitResponse => { - return { - usageLimit: output.usageLimit != null ? de_UsageLimit(output.usageLimit, context) : undefined, - } as any; -}; +// de_UpdateUsageLimitResponse omitted. /** * deserializeAws_json1_1UpdateWorkgroupResponse */ const de_UpdateWorkgroupResponse = (output: any, context: __SerdeContext): UpdateWorkgroupResponse => { - return { - workgroup: output.workgroup != null ? de_Workgroup(output.workgroup, context) : undefined, - } as any; + return take(output, { + workgroup: (_: any) => de_Workgroup(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UsageLimit - */ -const de_UsageLimit = (output: any, context: __SerdeContext): UsageLimit => { - return { - amount: __expectLong(output.amount), - breachAction: __expectString(output.breachAction), - period: __expectString(output.period), - resourceArn: __expectString(output.resourceArn), - usageLimitArn: __expectString(output.usageLimitArn), - usageLimitId: __expectString(output.usageLimitId), - usageType: __expectString(output.usageType), - } as any; -}; +// de_UsageLimit omitted. -/** - * deserializeAws_json1_1UsageLimits - */ -const de_UsageLimits = (output: any, context: __SerdeContext): UsageLimit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UsageLimit(entry, context); - }); - return retVal; -}; +// de_UsageLimits omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1VpcEndpoint - */ -const de_VpcEndpoint = (output: any, context: __SerdeContext): VpcEndpoint => { - return { - networkInterfaces: - output.networkInterfaces != null ? de_NetworkInterfaceList(output.networkInterfaces, context) : undefined, - vpcEndpointId: __expectString(output.vpcEndpointId), - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VpcEndpoint omitted. -/** - * deserializeAws_json1_1VpcEndpointList - */ -const de_VpcEndpointList = (output: any, context: __SerdeContext): VpcEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcEndpoint(entry, context); - }); - return retVal; -}; +// de_VpcEndpointList omitted. -/** - * deserializeAws_json1_1VpcSecurityGroupMembership - */ -const de_VpcSecurityGroupMembership = (output: any, context: __SerdeContext): VpcSecurityGroupMembership => { - return { - status: __expectString(output.status), - vpcSecurityGroupId: __expectString(output.vpcSecurityGroupId), - } as any; -}; +// de_VpcSecurityGroupMembership omitted. -/** - * deserializeAws_json1_1VpcSecurityGroupMembershipList - */ -const de_VpcSecurityGroupMembershipList = (output: any, context: __SerdeContext): VpcSecurityGroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcSecurityGroupMembership(entry, context); - }); - return retVal; -}; +// de_VpcSecurityGroupMembershipList omitted. /** * deserializeAws_json1_1Workgroup */ const de_Workgroup = (output: any, context: __SerdeContext): Workgroup => { - return { - baseCapacity: __expectInt32(output.baseCapacity), - configParameters: - output.configParameters != null ? de_ConfigParameterList(output.configParameters, context) : undefined, - creationDate: - output.creationDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationDate)) : undefined, - endpoint: output.endpoint != null ? de_Endpoint(output.endpoint, context) : undefined, - enhancedVpcRouting: __expectBoolean(output.enhancedVpcRouting), - namespaceName: __expectString(output.namespaceName), - port: __expectInt32(output.port), - publiclyAccessible: __expectBoolean(output.publiclyAccessible), - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined, - status: __expectString(output.status), - subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - workgroupArn: __expectString(output.workgroupArn), - workgroupId: __expectString(output.workgroupId), - workgroupName: __expectString(output.workgroupName), - } as any; + return take(output, { + baseCapacity: __expectInt32, + configParameters: _json, + creationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + endpoint: _json, + enhancedVpcRouting: __expectBoolean, + namespaceName: __expectString, + port: __expectInt32, + publiclyAccessible: __expectBoolean, + securityGroupIds: _json, + status: __expectString, + subnetIds: _json, + workgroupArn: __expectString, + workgroupId: __expectString, + workgroupName: __expectString, + }) as any; }; /** @@ -4656,9 +3733,6 @@ const de_WorkgroupList = (output: any, context: __SerdeContext): Workgroup[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Workgroup(entry, context); }); return retVal; @@ -4684,6 +3758,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-redshift/src/protocols/Aws_query.ts b/clients/client-redshift/src/protocols/Aws_query.ts index 878dff7ab04f..29cb45737850 100644 --- a/clients/client-redshift/src/protocols/Aws_query.ts +++ b/clients/client-redshift/src/protocols/Aws_query.ts @@ -12,7 +12,7 @@ import { strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -2859,7 +2859,7 @@ export const de_AcceptReservedNodeExchangeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2898,10 +2898,9 @@ const de_AcceptReservedNodeExchangeCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2924,7 +2923,7 @@ export const de_AddPartnerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2951,10 +2950,9 @@ const de_AddPartnerCommandError = async ( throw await de_UnauthorizedPartnerIntegrationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2977,7 +2975,7 @@ export const de_AssociateDataShareConsumerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3001,10 +2999,9 @@ const de_AssociateDataShareConsumerCommandError = async ( throw await de_InvalidNamespaceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3027,7 +3024,7 @@ export const de_AuthorizeClusterSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3057,10 +3054,9 @@ const de_AuthorizeClusterSecurityGroupIngressCommandError = async ( throw await de_InvalidClusterSecurityGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3083,7 +3079,7 @@ export const de_AuthorizeDataShareCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3104,10 +3100,9 @@ const de_AuthorizeDataShareCommandError = async ( throw await de_InvalidDataShareFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3130,7 +3125,7 @@ export const de_AuthorizeEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3166,10 +3161,9 @@ const de_AuthorizeEndpointAccessCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3192,7 +3186,7 @@ export const de_AuthorizeSnapshotAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3231,10 +3225,9 @@ const de_AuthorizeSnapshotAccessCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3257,7 +3250,7 @@ export const de_BatchDeleteClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3278,10 +3271,9 @@ const de_BatchDeleteClusterSnapshotsCommandError = async ( throw await de_BatchDeleteRequestSizeExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3304,7 +3296,7 @@ export const de_BatchModifyClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3328,10 +3320,9 @@ const de_BatchModifyClusterSnapshotsCommandError = async ( throw await de_InvalidRetentionPeriodFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3354,7 +3345,7 @@ export const de_CancelResizeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3384,10 +3375,9 @@ const de_CancelResizeCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3410,7 +3400,7 @@ export const de_CopyClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3443,10 +3433,9 @@ const de_CopyClusterSnapshotCommandError = async ( throw await de_InvalidRetentionPeriodFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3469,7 +3458,7 @@ export const de_CreateAuthenticationProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3496,10 +3485,9 @@ const de_CreateAuthenticationProfileCommandError = async ( throw await de_InvalidAuthenticationProfileRequestFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3522,7 +3510,7 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3606,10 +3594,9 @@ const de_CreateClusterCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3632,7 +3619,7 @@ export const de_CreateClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3662,10 +3649,9 @@ const de_CreateClusterParameterGroupCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3688,7 +3674,7 @@ export const de_CreateClusterSecurityGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3718,10 +3704,9 @@ const de_CreateClusterSecurityGroupCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3744,7 +3729,7 @@ export const de_CreateClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3783,10 +3768,9 @@ const de_CreateClusterSnapshotCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3809,7 +3793,7 @@ export const de_CreateClusterSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3851,10 +3835,9 @@ const de_CreateClusterSubnetGroupCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3877,7 +3860,7 @@ export const de_CreateEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3925,10 +3908,9 @@ const de_CreateEndpointAccessCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3951,7 +3933,7 @@ export const de_CreateEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4002,10 +3984,9 @@ const de_CreateEventSubscriptionCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4028,7 +4009,7 @@ export const de_CreateHsmClientCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4058,10 +4039,9 @@ const de_CreateHsmClientCertificateCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4084,7 +4064,7 @@ export const de_CreateHsmConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4114,10 +4094,9 @@ const de_CreateHsmConfigurationCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4140,7 +4119,7 @@ export const de_CreateScheduledActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4176,10 +4155,9 @@ const de_CreateScheduledActionCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4202,7 +4180,7 @@ export const de_CreateSnapshotCopyGrantCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4238,10 +4216,9 @@ const de_CreateSnapshotCopyGrantCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4264,7 +4241,7 @@ export const de_CreateSnapshotScheduleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4300,10 +4277,9 @@ const de_CreateSnapshotScheduleCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4323,7 +4299,7 @@ export const de_CreateTagsCommand = async ( const response: CreateTagsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4353,10 +4329,9 @@ const de_CreateTagsCommandError = async ( throw await de_TagLimitExceededFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4379,7 +4354,7 @@ export const de_CreateUsageLimitCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4418,10 +4393,9 @@ const de_CreateUsageLimitCommandError = async ( throw await de_UsageLimitAlreadyExistsFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4444,7 +4418,7 @@ export const de_DeauthorizeDataShareCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4465,10 +4439,9 @@ const de_DeauthorizeDataShareCommandError = async ( throw await de_InvalidDataShareFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4491,7 +4464,7 @@ export const de_DeleteAuthenticationProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4515,10 +4488,9 @@ const de_DeleteAuthenticationProfileCommandError = async ( throw await de_InvalidAuthenticationProfileRequestFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4541,7 +4513,7 @@ export const de_DeleteClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4574,10 +4546,9 @@ const de_DeleteClusterCommandError = async ( throw await de_InvalidRetentionPeriodFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4597,7 +4568,7 @@ export const de_DeleteClusterParameterGroupCommand = async ( const response: DeleteClusterParameterGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4621,10 +4592,9 @@ const de_DeleteClusterParameterGroupCommandError = async ( throw await de_InvalidClusterParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4644,7 +4614,7 @@ export const de_DeleteClusterSecurityGroupCommand = async ( const response: DeleteClusterSecurityGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4668,10 +4638,9 @@ const de_DeleteClusterSecurityGroupCommandError = async ( throw await de_InvalidClusterSecurityGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4694,7 +4663,7 @@ export const de_DeleteClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4718,10 +4687,9 @@ const de_DeleteClusterSnapshotCommandError = async ( throw await de_InvalidClusterSnapshotStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4741,7 +4709,7 @@ export const de_DeleteClusterSubnetGroupCommand = async ( const response: DeleteClusterSubnetGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4768,10 +4736,9 @@ const de_DeleteClusterSubnetGroupCommandError = async ( throw await de_InvalidClusterSubnetStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4794,7 +4761,7 @@ export const de_DeleteEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4827,10 +4794,9 @@ const de_DeleteEndpointAccessCommandError = async ( throw await de_InvalidEndpointStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4850,7 +4816,7 @@ export const de_DeleteEventSubscriptionCommand = async ( const response: DeleteEventSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4874,10 +4840,9 @@ const de_DeleteEventSubscriptionCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4897,7 +4862,7 @@ export const de_DeleteHsmClientCertificateCommand = async ( const response: DeleteHsmClientCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4921,10 +4886,9 @@ const de_DeleteHsmClientCertificateCommandError = async ( throw await de_InvalidHsmClientCertificateStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4944,7 +4908,7 @@ export const de_DeleteHsmConfigurationCommand = async ( const response: DeleteHsmConfigurationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4968,10 +4932,9 @@ const de_DeleteHsmConfigurationCommandError = async ( throw await de_InvalidHsmConfigurationStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4994,7 +4957,7 @@ export const de_DeletePartnerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5021,10 +4984,9 @@ const de_DeletePartnerCommandError = async ( throw await de_UnauthorizedPartnerIntegrationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5044,7 +5006,7 @@ export const de_DeleteScheduledActionCommand = async ( const response: DeleteScheduledActionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5068,10 +5030,9 @@ const de_DeleteScheduledActionCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5091,7 +5052,7 @@ export const de_DeleteSnapshotCopyGrantCommand = async ( const response: DeleteSnapshotCopyGrantCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5115,10 +5076,9 @@ const de_DeleteSnapshotCopyGrantCommandError = async ( throw await de_SnapshotCopyGrantNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5138,7 +5098,7 @@ export const de_DeleteSnapshotScheduleCommand = async ( const response: DeleteSnapshotScheduleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5162,10 +5122,9 @@ const de_DeleteSnapshotScheduleCommandError = async ( throw await de_SnapshotScheduleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5185,7 +5144,7 @@ export const de_DeleteTagsCommand = async ( const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5209,10 +5168,9 @@ const de_DeleteTagsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5232,7 +5190,7 @@ export const de_DeleteUsageLimitCommand = async ( const response: DeleteUsageLimitCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -5256,10 +5214,9 @@ const de_DeleteUsageLimitCommandError = async ( throw await de_UsageLimitNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5282,7 +5239,7 @@ export const de_DescribeAccountAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5298,10 +5255,9 @@ const de_DescribeAccountAttributesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5323,7 +5279,7 @@ export const de_DescribeAuthenticationProfilesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5347,10 +5303,9 @@ const de_DescribeAuthenticationProfilesCommandError = async ( throw await de_InvalidAuthenticationProfileRequestFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5373,7 +5328,7 @@ export const de_DescribeClusterDbRevisionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5397,10 +5352,9 @@ const de_DescribeClusterDbRevisionsCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5423,7 +5377,7 @@ export const de_DescribeClusterParameterGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5447,10 +5401,9 @@ const de_DescribeClusterParameterGroupsCommandError = async ( throw await de_InvalidTagFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5473,7 +5426,7 @@ export const de_DescribeClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5494,10 +5447,9 @@ const de_DescribeClusterParametersCommandError = async ( throw await de_ClusterParameterGroupNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5520,7 +5472,7 @@ export const de_DescribeClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5544,10 +5496,9 @@ const de_DescribeClustersCommandError = async ( throw await de_InvalidTagFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5570,7 +5521,7 @@ export const de_DescribeClusterSecurityGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5594,10 +5545,9 @@ const de_DescribeClusterSecurityGroupsCommandError = async ( throw await de_InvalidTagFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5620,7 +5570,7 @@ export const de_DescribeClusterSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5650,10 +5600,9 @@ const de_DescribeClusterSnapshotsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5676,7 +5625,7 @@ export const de_DescribeClusterSubnetGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5700,10 +5649,9 @@ const de_DescribeClusterSubnetGroupsCommandError = async ( throw await de_InvalidTagFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5726,7 +5674,7 @@ export const de_DescribeClusterTracksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5750,10 +5698,9 @@ const de_DescribeClusterTracksCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5776,7 +5723,7 @@ export const de_DescribeClusterVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5792,10 +5739,9 @@ const de_DescribeClusterVersionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5817,7 +5763,7 @@ export const de_DescribeDataSharesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5838,10 +5784,9 @@ const de_DescribeDataSharesCommandError = async ( throw await de_InvalidDataShareFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5864,7 +5809,7 @@ export const de_DescribeDataSharesForConsumerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5885,10 +5830,9 @@ const de_DescribeDataSharesForConsumerCommandError = async ( throw await de_InvalidNamespaceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5911,7 +5855,7 @@ export const de_DescribeDataSharesForProducerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5932,10 +5876,9 @@ const de_DescribeDataSharesForProducerCommandError = async ( throw await de_InvalidNamespaceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5958,7 +5901,7 @@ export const de_DescribeDefaultClusterParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5974,10 +5917,9 @@ const de_DescribeDefaultClusterParametersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5999,7 +5941,7 @@ export const de_DescribeEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6026,10 +5968,9 @@ const de_DescribeEndpointAccessCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6052,7 +5993,7 @@ export const de_DescribeEndpointAuthorizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6076,10 +6017,9 @@ const de_DescribeEndpointAuthorizationCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6102,7 +6042,7 @@ export const de_DescribeEventCategoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6118,10 +6058,9 @@ const de_DescribeEventCategoriesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6143,7 +6082,7 @@ export const de_DescribeEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6159,10 +6098,9 @@ const de_DescribeEventsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6184,7 +6122,7 @@ export const de_DescribeEventSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6208,10 +6146,9 @@ const de_DescribeEventSubscriptionsCommandError = async ( throw await de_SubscriptionNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6234,7 +6171,7 @@ export const de_DescribeHsmClientCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6258,10 +6195,9 @@ const de_DescribeHsmClientCertificatesCommandError = async ( throw await de_InvalidTagFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6284,7 +6220,7 @@ export const de_DescribeHsmConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6308,10 +6244,9 @@ const de_DescribeHsmConfigurationsCommandError = async ( throw await de_InvalidTagFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6334,7 +6269,7 @@ export const de_DescribeLoggingStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6355,10 +6290,9 @@ const de_DescribeLoggingStatusCommandError = async ( throw await de_ClusterNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6381,7 +6315,7 @@ export const de_DescribeNodeConfigurationOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6414,10 +6348,9 @@ const de_DescribeNodeConfigurationOptionsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6440,7 +6373,7 @@ export const de_DescribeOrderableClusterOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6456,10 +6389,9 @@ const de_DescribeOrderableClusterOptionsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6481,7 +6413,7 @@ export const de_DescribePartnersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6505,10 +6437,9 @@ const de_DescribePartnersCommandError = async ( throw await de_UnauthorizedPartnerIntegrationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6531,7 +6462,7 @@ export const de_DescribeReservedNodeExchangeStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6558,10 +6489,9 @@ const de_DescribeReservedNodeExchangeStatusCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6584,7 +6514,7 @@ export const de_DescribeReservedNodeOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6611,10 +6541,9 @@ const de_DescribeReservedNodeOfferingsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6637,7 +6566,7 @@ export const de_DescribeReservedNodesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6661,10 +6590,9 @@ const de_DescribeReservedNodesCommandError = async ( throw await de_ReservedNodeNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6687,7 +6615,7 @@ export const de_DescribeResizeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6711,10 +6639,9 @@ const de_DescribeResizeCommandError = async ( throw await de_ResizeNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6737,7 +6664,7 @@ export const de_DescribeScheduledActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6761,10 +6688,9 @@ const de_DescribeScheduledActionsCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6787,7 +6713,7 @@ export const de_DescribeSnapshotCopyGrantsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6811,10 +6737,9 @@ const de_DescribeSnapshotCopyGrantsCommandError = async ( throw await de_SnapshotCopyGrantNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6837,7 +6762,7 @@ export const de_DescribeSnapshotSchedulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6853,10 +6778,9 @@ const de_DescribeSnapshotSchedulesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6878,7 +6802,7 @@ export const de_DescribeStorageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6894,10 +6818,9 @@ const de_DescribeStorageCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6919,7 +6842,7 @@ export const de_DescribeTableRestoreStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6943,10 +6866,9 @@ const de_DescribeTableRestoreStatusCommandError = async ( throw await de_TableRestoreNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6969,7 +6891,7 @@ export const de_DescribeTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6993,10 +6915,9 @@ const de_DescribeTagsCommandError = async ( throw await de_ResourceNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7019,7 +6940,7 @@ export const de_DescribeUsageLimitsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7043,10 +6964,9 @@ const de_DescribeUsageLimitsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7069,7 +6989,7 @@ export const de_DisableLoggingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7093,10 +7013,9 @@ const de_DisableLoggingCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7119,7 +7038,7 @@ export const de_DisableSnapshotCopyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7149,10 +7068,9 @@ const de_DisableSnapshotCopyCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7175,7 +7093,7 @@ export const de_DisassociateDataShareConsumerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7199,10 +7117,9 @@ const de_DisassociateDataShareConsumerCommandError = async ( throw await de_InvalidNamespaceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7225,7 +7142,7 @@ export const de_EnableLoggingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7261,10 +7178,9 @@ const de_EnableLoggingCommandError = async ( throw await de_InvalidS3KeyPrefixFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7287,7 +7203,7 @@ export const de_EnableSnapshotCopyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7338,10 +7254,9 @@ const de_EnableSnapshotCopyCommandError = async ( throw await de_UnknownSnapshotCopyRegionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7364,7 +7279,7 @@ export const de_GetClusterCredentialsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7388,10 +7303,9 @@ const de_GetClusterCredentialsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7414,7 +7328,7 @@ export const de_GetClusterCredentialsWithIAMCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7438,10 +7352,9 @@ const de_GetClusterCredentialsWithIAMCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7467,7 +7380,7 @@ export const de_GetReservedNodeExchangeConfigurationOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7509,10 +7422,9 @@ const de_GetReservedNodeExchangeConfigurationOptionsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7535,7 +7447,7 @@ export const de_GetReservedNodeExchangeOfferingsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7571,10 +7483,9 @@ const de_GetReservedNodeExchangeOfferingsCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7597,7 +7508,7 @@ export const de_ModifyAquaConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7624,10 +7535,9 @@ const de_ModifyAquaConfigurationCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7650,7 +7560,7 @@ export const de_ModifyAuthenticationProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7677,10 +7587,9 @@ const de_ModifyAuthenticationProfileCommandError = async ( throw await de_InvalidAuthenticationProfileRequestFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7703,7 +7612,7 @@ export const de_ModifyClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7778,10 +7687,9 @@ const de_ModifyClusterCommandError = async ( throw await de_UnsupportedOptionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7804,7 +7712,7 @@ export const de_ModifyClusterDbRevisionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7831,10 +7739,9 @@ const de_ModifyClusterDbRevisionCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7857,7 +7764,7 @@ export const de_ModifyClusterIamRolesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7881,10 +7788,9 @@ const de_ModifyClusterIamRolesCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7907,7 +7813,7 @@ export const de_ModifyClusterMaintenanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7931,10 +7837,9 @@ const de_ModifyClusterMaintenanceCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -7957,7 +7862,7 @@ export const de_ModifyClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7981,10 +7886,9 @@ const de_ModifyClusterParameterGroupCommandError = async ( throw await de_InvalidClusterParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8007,7 +7911,7 @@ export const de_ModifyClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8034,10 +7938,9 @@ const de_ModifyClusterSnapshotCommandError = async ( throw await de_InvalidRetentionPeriodFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8057,7 +7960,7 @@ export const de_ModifyClusterSnapshotScheduleCommand = async ( const response: ModifyClusterSnapshotScheduleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8084,10 +7987,9 @@ const de_ModifyClusterSnapshotScheduleCommandError = async ( throw await de_SnapshotScheduleNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8110,7 +8012,7 @@ export const de_ModifyClusterSubnetGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8146,10 +8048,9 @@ const de_ModifyClusterSubnetGroupCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8172,7 +8073,7 @@ export const de_ModifyEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8208,10 +8109,9 @@ const de_ModifyEndpointAccessCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8234,7 +8134,7 @@ export const de_ModifyEventSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8279,10 +8179,9 @@ const de_ModifyEventSubscriptionCommandError = async ( throw await de_SubscriptionSeverityNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8305,7 +8204,7 @@ export const de_ModifyScheduledActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8338,10 +8237,9 @@ const de_ModifyScheduledActionCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8364,7 +8262,7 @@ export const de_ModifySnapshotCopyRetentionPeriodCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8397,10 +8295,9 @@ const de_ModifySnapshotCopyRetentionPeriodCommandError = async ( throw await de_UnauthorizedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8423,7 +8320,7 @@ export const de_ModifySnapshotScheduleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8450,10 +8347,9 @@ const de_ModifySnapshotScheduleCommandError = async ( throw await de_SnapshotScheduleUpdateInProgressFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8476,7 +8372,7 @@ export const de_ModifyUsageLimitCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8503,10 +8399,9 @@ const de_ModifyUsageLimitCommandError = async ( throw await de_UsageLimitNotFoundFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8529,7 +8424,7 @@ export const de_PauseClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8553,10 +8448,9 @@ const de_PauseClusterCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8579,7 +8473,7 @@ export const de_PurchaseReservedNodeOfferingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8609,10 +8503,9 @@ const de_PurchaseReservedNodeOfferingCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8635,7 +8528,7 @@ export const de_RebootClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8659,10 +8552,9 @@ const de_RebootClusterCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8685,7 +8577,7 @@ export const de_RejectDataShareCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8706,10 +8598,9 @@ const de_RejectDataShareCommandError = async ( throw await de_InvalidDataShareFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8732,7 +8623,7 @@ export const de_ResetClusterParameterGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8756,10 +8647,9 @@ const de_ResetClusterParameterGroupCommandError = async ( throw await de_InvalidClusterParameterGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8782,7 +8672,7 @@ export const de_ResizeClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8845,10 +8735,9 @@ const de_ResizeClusterCommandError = async ( throw await de_UnsupportedOptionFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -8871,7 +8760,7 @@ export const de_RestoreFromClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8985,10 +8874,9 @@ const de_RestoreFromClusterSnapshotCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9011,7 +8899,7 @@ export const de_RestoreTableFromClusterSnapshotCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9050,10 +8938,9 @@ const de_RestoreTableFromClusterSnapshotCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9076,7 +8963,7 @@ export const de_ResumeClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9103,10 +8990,9 @@ const de_ResumeClusterCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9129,7 +9015,7 @@ export const de_RevokeClusterSecurityGroupIngressCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9156,10 +9042,9 @@ const de_RevokeClusterSecurityGroupIngressCommandError = async ( throw await de_InvalidClusterSecurityGroupStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9182,7 +9067,7 @@ export const de_RevokeEndpointAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9221,10 +9106,9 @@ const de_RevokeEndpointAccessCommandError = async ( throw await de_InvalidEndpointStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9247,7 +9131,7 @@ export const de_RevokeSnapshotAccessCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9277,10 +9161,9 @@ const de_RevokeSnapshotAccessCommandError = async ( throw await de_UnsupportedOperationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9303,7 +9186,7 @@ export const de_RotateEncryptionKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9330,10 +9213,9 @@ const de_RotateEncryptionKeyCommandError = async ( throw await de_InvalidClusterStateFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -9356,7 +9238,7 @@ export const de_UpdatePartnerStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9383,10 +9265,9 @@ const de_UpdatePartnerStatusCommandError = async ( throw await de_UnauthorizedPartnerIntegrationFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -20755,6 +20636,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-rekognition/src/protocols/Aws_json1_1.ts b/clients/client-rekognition/src/protocols/Aws_json1_1.ts index ca539d291080..d1f950124895 100644 --- a/clients/client-rekognition/src/protocols/Aws_json1_1.ts +++ b/clients/client-rekognition/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,7 +13,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -175,10 +177,8 @@ import { } from "../commands/UpdateStreamProcessorCommand"; import { AccessDeniedException, - AgeRange, Asset, Attribute, - AudioMetadata, AuditImage, Beard, BlackFrame, @@ -196,43 +196,26 @@ import { ContentClassifier, ContentModerationDetection, CopyProjectVersionRequest, - CopyProjectVersionResponse, CoversBodyPart, CreateCollectionRequest, - CreateCollectionResponse, CreateDatasetRequest, - CreateDatasetResponse, CreateFaceLivenessSessionRequest, CreateFaceLivenessSessionRequestSettings, - CreateFaceLivenessSessionResponse, CreateProjectRequest, - CreateProjectResponse, CreateProjectVersionRequest, - CreateProjectVersionResponse, CreateStreamProcessorRequest, - CreateStreamProcessorResponse, CustomLabel, DatasetChanges, DatasetDescription, - DatasetLabelDescription, - DatasetLabelStats, DatasetMetadata, DatasetSource, - DatasetStats, DeleteCollectionRequest, - DeleteCollectionResponse, DeleteDatasetRequest, - DeleteDatasetResponse, DeleteFacesRequest, - DeleteFacesResponse, DeleteProjectPolicyRequest, - DeleteProjectPolicyResponse, DeleteProjectRequest, - DeleteProjectResponse, DeleteProjectVersionRequest, - DeleteProjectVersionResponse, DeleteStreamProcessorRequest, - DeleteStreamProcessorResponse, DescribeCollectionRequest, DescribeCollectionResponse, DescribeDatasetRequest, @@ -266,7 +249,6 @@ import { DetectTextResponse, DistributeDataset, DistributeDatasetEntriesRequest, - DistributeDatasetEntriesResponse, DominantColor, Emotion, EquipmentDetection, @@ -283,7 +265,6 @@ import { GeneralLabelsSettings, Geometry, GetCelebrityInfoRequest, - GetCelebrityInfoResponse, GetCelebrityRecognitionRequest, GetCelebrityRecognitionResponse, GetContentModerationRequest, @@ -323,29 +304,21 @@ import { KinesisDataStream, KinesisVideoStream, KinesisVideoStreamStartSelector, - KnownGender, Label, - LabelAlias, - LabelCategory, LabelDetection, LabelDetectionFeatureName, LabelDetectionSettings, Landmark, LimitExceededException, ListCollectionsRequest, - ListCollectionsResponse, ListDatasetEntriesRequest, - ListDatasetEntriesResponse, ListDatasetLabelsRequest, - ListDatasetLabelsResponse, ListFacesRequest, ListFacesResponse, ListProjectPoliciesRequest, ListProjectPoliciesResponse, ListStreamProcessorsRequest, - ListStreamProcessorsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, LivenessOutputConfig, MalformedPolicyDocumentException, ModerationLabel, @@ -353,7 +326,6 @@ import { Mustache, NotificationChannel, OutputConfig, - Parent, PersonDetail, PersonDetection, PersonMatch, @@ -365,12 +337,9 @@ import { ProtectiveEquipmentBodyPart, ProtectiveEquipmentPerson, ProtectiveEquipmentSummarizationAttributes, - ProtectiveEquipmentSummary, ProtectiveEquipmentType, ProvisionedThroughputExceededException, PutProjectPolicyRequest, - PutProjectPolicyResponse, - Reason, RecognizeCelebritiesRequest, RecognizeCelebritiesResponse, RegionOfInterest, @@ -386,75 +355,50 @@ import { SearchFacesResponse, SegmentDetection, SegmentType, - SegmentTypeInfo, ServiceQuotaExceededException, SessionNotFoundException, ShotSegment, Smile, StartCelebrityRecognitionRequest, - StartCelebrityRecognitionResponse, StartContentModerationRequest, - StartContentModerationResponse, StartFaceDetectionRequest, - StartFaceDetectionResponse, StartFaceSearchRequest, - StartFaceSearchResponse, StartLabelDetectionRequest, - StartLabelDetectionResponse, StartPersonTrackingRequest, - StartPersonTrackingResponse, StartProjectVersionRequest, - StartProjectVersionResponse, StartSegmentDetectionFilters, StartSegmentDetectionRequest, - StartSegmentDetectionResponse, StartShotDetectionFilter, StartStreamProcessorRequest, - StartStreamProcessorResponse, StartTechnicalCueDetectionFilter, StartTextDetectionFilters, StartTextDetectionRequest, - StartTextDetectionResponse, StopProjectVersionRequest, - StopProjectVersionResponse, StopStreamProcessorRequest, - StopStreamProcessorResponse, StreamProcessingStartSelector, StreamProcessingStopSelector, - StreamProcessor, StreamProcessorDataSharingPreference, StreamProcessorInput, StreamProcessorNotificationChannel, StreamProcessorOutput, StreamProcessorParameterToDelete, StreamProcessorSettings, - Summary, Sunglasses, TagResourceRequest, - TagResourceResponse, TechnicalCueSegment, TestingData, - TestingDataResult, TextDetection, TextDetectionResult, ThrottlingException, TrainingData, - TrainingDataResult, UnindexedFace, UntagResourceRequest, - UntagResourceResponse, UpdateDatasetEntriesRequest, - UpdateDatasetEntriesResponse, - ValidationData, Video, VideoMetadata, VideoTooLargeException, } from "../models/models_0"; -import { - StreamProcessorSettingsForUpdate, - UpdateStreamProcessorRequest, - UpdateStreamProcessorResponse, -} from "../models/models_1"; +import { StreamProcessorSettingsForUpdate, UpdateStreamProcessorRequest } from "../models/models_1"; import { RekognitionServiceException as __BaseException } from "../models/RekognitionServiceException"; /** @@ -479,7 +423,7 @@ export const se_CopyProjectVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CopyProjectVersion"); let body: any; - body = JSON.stringify(se_CopyProjectVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -492,7 +436,7 @@ export const se_CreateCollectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCollection"); let body: any; - body = JSON.stringify(se_CreateCollectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -505,7 +449,7 @@ export const se_CreateDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDataset"); let body: any; - body = JSON.stringify(se_CreateDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -518,7 +462,7 @@ export const se_CreateFaceLivenessSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFaceLivenessSession"); let body: any; - body = JSON.stringify(se_CreateFaceLivenessSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -531,7 +475,7 @@ export const se_CreateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProject"); let body: any; - body = JSON.stringify(se_CreateProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -544,7 +488,7 @@ export const se_CreateProjectVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProjectVersion"); let body: any; - body = JSON.stringify(se_CreateProjectVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -570,7 +514,7 @@ export const se_DeleteCollectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCollection"); let body: any; - body = JSON.stringify(se_DeleteCollectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -583,7 +527,7 @@ export const se_DeleteDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataset"); let body: any; - body = JSON.stringify(se_DeleteDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -596,7 +540,7 @@ export const se_DeleteFacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFaces"); let body: any; - body = JSON.stringify(se_DeleteFacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -609,7 +553,7 @@ export const se_DeleteProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProject"); let body: any; - body = JSON.stringify(se_DeleteProjectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -622,7 +566,7 @@ export const se_DeleteProjectPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProjectPolicy"); let body: any; - body = JSON.stringify(se_DeleteProjectPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -635,7 +579,7 @@ export const se_DeleteProjectVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProjectVersion"); let body: any; - body = JSON.stringify(se_DeleteProjectVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -648,7 +592,7 @@ export const se_DeleteStreamProcessorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStreamProcessor"); let body: any; - body = JSON.stringify(se_DeleteStreamProcessorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -661,7 +605,7 @@ export const se_DescribeCollectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCollection"); let body: any; - body = JSON.stringify(se_DescribeCollectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -674,7 +618,7 @@ export const se_DescribeDatasetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataset"); let body: any; - body = JSON.stringify(se_DescribeDatasetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -687,7 +631,7 @@ export const se_DescribeProjectsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProjects"); let body: any; - body = JSON.stringify(se_DescribeProjectsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -700,7 +644,7 @@ export const se_DescribeProjectVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProjectVersions"); let body: any; - body = JSON.stringify(se_DescribeProjectVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -713,7 +657,7 @@ export const se_DescribeStreamProcessorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStreamProcessor"); let body: any; - body = JSON.stringify(se_DescribeStreamProcessorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -804,7 +748,7 @@ export const se_DistributeDatasetEntriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DistributeDatasetEntries"); let body: any; - body = JSON.stringify(se_DistributeDatasetEntriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -817,7 +761,7 @@ export const se_GetCelebrityInfoCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCelebrityInfo"); let body: any; - body = JSON.stringify(se_GetCelebrityInfoRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -830,7 +774,7 @@ export const se_GetCelebrityRecognitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCelebrityRecognition"); let body: any; - body = JSON.stringify(se_GetCelebrityRecognitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -843,7 +787,7 @@ export const se_GetContentModerationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContentModeration"); let body: any; - body = JSON.stringify(se_GetContentModerationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -856,7 +800,7 @@ export const se_GetFaceDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFaceDetection"); let body: any; - body = JSON.stringify(se_GetFaceDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -869,7 +813,7 @@ export const se_GetFaceLivenessSessionResultsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFaceLivenessSessionResults"); let body: any; - body = JSON.stringify(se_GetFaceLivenessSessionResultsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -882,7 +826,7 @@ export const se_GetFaceSearchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFaceSearch"); let body: any; - body = JSON.stringify(se_GetFaceSearchRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -895,7 +839,7 @@ export const se_GetLabelDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLabelDetection"); let body: any; - body = JSON.stringify(se_GetLabelDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -908,7 +852,7 @@ export const se_GetPersonTrackingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPersonTracking"); let body: any; - body = JSON.stringify(se_GetPersonTrackingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -921,7 +865,7 @@ export const se_GetSegmentDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSegmentDetection"); let body: any; - body = JSON.stringify(se_GetSegmentDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -934,7 +878,7 @@ export const se_GetTextDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTextDetection"); let body: any; - body = JSON.stringify(se_GetTextDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -960,7 +904,7 @@ export const se_ListCollectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCollections"); let body: any; - body = JSON.stringify(se_ListCollectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -973,7 +917,7 @@ export const se_ListDatasetEntriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetEntries"); let body: any; - body = JSON.stringify(se_ListDatasetEntriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -986,7 +930,7 @@ export const se_ListDatasetLabelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatasetLabels"); let body: any; - body = JSON.stringify(se_ListDatasetLabelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -999,7 +943,7 @@ export const se_ListFacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFaces"); let body: any; - body = JSON.stringify(se_ListFacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1012,7 +956,7 @@ export const se_ListProjectPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProjectPolicies"); let body: any; - body = JSON.stringify(se_ListProjectPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1025,7 +969,7 @@ export const se_ListStreamProcessorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStreamProcessors"); let body: any; - body = JSON.stringify(se_ListStreamProcessorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1038,7 +982,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1051,7 +995,7 @@ export const se_PutProjectPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutProjectPolicy"); let body: any; - body = JSON.stringify(se_PutProjectPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1103,7 +1047,7 @@ export const se_StartCelebrityRecognitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartCelebrityRecognition"); let body: any; - body = JSON.stringify(se_StartCelebrityRecognitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1129,7 +1073,7 @@ export const se_StartFaceDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartFaceDetection"); let body: any; - body = JSON.stringify(se_StartFaceDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1168,7 +1112,7 @@ export const se_StartPersonTrackingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartPersonTracking"); let body: any; - body = JSON.stringify(se_StartPersonTrackingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1181,7 +1125,7 @@ export const se_StartProjectVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartProjectVersion"); let body: any; - body = JSON.stringify(se_StartProjectVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1207,7 +1151,7 @@ export const se_StartStreamProcessorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartStreamProcessor"); let body: any; - body = JSON.stringify(se_StartStreamProcessorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1233,7 +1177,7 @@ export const se_StopProjectVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopProjectVersion"); let body: any; - body = JSON.stringify(se_StopProjectVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1246,7 +1190,7 @@ export const se_StopStreamProcessorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopStreamProcessor"); let body: any; - body = JSON.stringify(se_StopStreamProcessorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1259,7 +1203,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1272,7 +1216,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1319,7 +1263,7 @@ export const de_CompareFacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1361,10 +1305,9 @@ const de_CompareFacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1382,12 +1325,12 @@ export const de_CopyProjectVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CopyProjectVersionResponse(data, context); + contents = _json(data); const response: CopyProjectVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1432,10 +1375,9 @@ const de_CopyProjectVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1453,12 +1395,12 @@ export const de_CreateCollectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCollectionResponse(data, context); + contents = _json(data); const response: CreateCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1497,10 +1439,9 @@ const de_CreateCollectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1518,12 +1459,12 @@ export const de_CreateDatasetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDatasetResponse(data, context); + contents = _json(data); const response: CreateDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1568,10 +1509,9 @@ const de_CreateDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1589,12 +1529,12 @@ export const de_CreateFaceLivenessSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFaceLivenessSessionResponse(data, context); + contents = _json(data); const response: CreateFaceLivenessSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1627,10 +1567,9 @@ const de_CreateFaceLivenessSessionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1648,12 +1587,12 @@ export const de_CreateProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProjectResponse(data, context); + contents = _json(data); const response: CreateProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1692,10 +1631,9 @@ const de_CreateProjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1713,12 +1651,12 @@ export const de_CreateProjectVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProjectVersionResponse(data, context); + contents = _json(data); const response: CreateProjectVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1763,10 +1701,9 @@ const de_CreateProjectVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,12 +1721,12 @@ export const de_CreateStreamProcessorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateStreamProcessorResponse(data, context); + contents = _json(data); const response: CreateStreamProcessorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1831,10 +1768,9 @@ const de_CreateStreamProcessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1852,12 +1788,12 @@ export const de_DeleteCollectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCollectionResponse(data, context); + contents = _json(data); const response: DeleteCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1893,10 +1829,9 @@ const de_DeleteCollectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1914,12 +1849,12 @@ export const de_DeleteDatasetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDatasetResponse(data, context); + contents = _json(data); const response: DeleteDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1961,10 +1896,9 @@ const de_DeleteDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1982,12 +1916,12 @@ export const de_DeleteFacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFacesResponse(data, context); + contents = _json(data); const response: DeleteFacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2023,10 +1957,9 @@ const de_DeleteFacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2044,12 +1977,12 @@ export const de_DeleteProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProjectResponse(data, context); + contents = _json(data); const response: DeleteProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2088,10 +2021,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2109,12 +2041,12 @@ export const de_DeleteProjectPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProjectPolicyResponse(data, context); + contents = _json(data); const response: DeleteProjectPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2153,10 +2085,9 @@ const de_DeleteProjectPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2174,12 +2105,12 @@ export const de_DeleteProjectVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProjectVersionResponse(data, context); + contents = _json(data); const response: DeleteProjectVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2218,10 +2149,9 @@ const de_DeleteProjectVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2239,12 +2169,12 @@ export const de_DeleteStreamProcessorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteStreamProcessorResponse(data, context); + contents = _json(data); const response: DeleteStreamProcessorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2283,10 +2213,9 @@ const de_DeleteStreamProcessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2309,7 +2238,7 @@ export const de_DescribeCollectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2345,10 +2274,9 @@ const de_DescribeCollectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2371,7 +2299,7 @@ export const de_DescribeDatasetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2407,10 +2335,9 @@ const de_DescribeDatasetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2433,7 +2360,7 @@ export const de_DescribeProjectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2469,10 +2396,9 @@ const de_DescribeProjectsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2495,7 +2421,7 @@ export const de_DescribeProjectVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2534,10 +2460,9 @@ const de_DescribeProjectVersionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2560,7 +2485,7 @@ export const de_DescribeStreamProcessorCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2596,10 +2521,9 @@ const de_DescribeStreamProcessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2622,7 +2546,7 @@ export const de_DetectCustomLabelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2673,10 +2597,9 @@ const de_DetectCustomLabelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2699,7 +2622,7 @@ export const de_DetectFacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2741,10 +2664,9 @@ const de_DetectFacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2767,7 +2689,7 @@ export const de_DetectLabelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2809,10 +2731,9 @@ const de_DetectLabelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2835,7 +2756,7 @@ export const de_DetectModerationLabelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2880,10 +2801,9 @@ const de_DetectModerationLabelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2906,7 +2826,7 @@ export const de_DetectProtectiveEquipmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2948,10 +2868,9 @@ const de_DetectProtectiveEquipmentCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2974,7 +2893,7 @@ export const de_DetectTextCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3016,10 +2935,9 @@ const de_DetectTextCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3037,12 +2955,12 @@ export const de_DistributeDatasetEntriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DistributeDatasetEntriesResponse(data, context); + contents = _json(data); const response: DistributeDatasetEntriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3081,10 +2999,9 @@ const de_DistributeDatasetEntriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3102,12 +3019,12 @@ export const de_GetCelebrityInfoCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCelebrityInfoResponse(data, context); + contents = _json(data); const response: GetCelebrityInfoCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3143,10 +3060,9 @@ const de_GetCelebrityInfoCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3169,7 +3085,7 @@ export const de_GetCelebrityRecognitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3208,10 +3124,9 @@ const de_GetCelebrityRecognitionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3234,7 +3149,7 @@ export const de_GetContentModerationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3273,10 +3188,9 @@ const de_GetContentModerationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3299,7 +3213,7 @@ export const de_GetFaceDetectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3338,10 +3252,9 @@ const de_GetFaceDetectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3364,7 +3277,7 @@ export const de_GetFaceLivenessSessionResultsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3400,10 +3313,9 @@ const de_GetFaceLivenessSessionResultsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3426,7 +3338,7 @@ export const de_GetFaceSearchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3465,10 +3377,9 @@ const de_GetFaceSearchCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3491,7 +3402,7 @@ export const de_GetLabelDetectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3530,10 +3441,9 @@ const de_GetLabelDetectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3556,7 +3466,7 @@ export const de_GetPersonTrackingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3595,10 +3505,9 @@ const de_GetPersonTrackingCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3621,7 +3530,7 @@ export const de_GetSegmentDetectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3660,10 +3569,9 @@ const de_GetSegmentDetectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3686,7 +3594,7 @@ export const de_GetTextDetectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3725,10 +3633,9 @@ const de_GetTextDetectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3751,7 +3658,7 @@ export const de_IndexFacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3799,10 +3706,9 @@ const de_IndexFacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3820,12 +3726,12 @@ export const de_ListCollectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCollectionsResponse(data, context); + contents = _json(data); const response: ListCollectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3864,10 +3770,9 @@ const de_ListCollectionsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3885,12 +3790,12 @@ export const de_ListDatasetEntriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDatasetEntriesResponse(data, context); + contents = _json(data); const response: ListDatasetEntriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3935,10 +3840,9 @@ const de_ListDatasetEntriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3956,12 +3860,12 @@ export const de_ListDatasetLabelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListDatasetLabelsResponse(data, context); + contents = _json(data); const response: ListDatasetLabelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4006,10 +3910,9 @@ const de_ListDatasetLabelsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4032,7 +3935,7 @@ export const de_ListFacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4071,10 +3974,9 @@ const de_ListFacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4097,7 +3999,7 @@ export const de_ListProjectPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4136,10 +4038,9 @@ const de_ListProjectPoliciesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4157,12 +4058,12 @@ export const de_ListStreamProcessorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListStreamProcessorsResponse(data, context); + contents = _json(data); const response: ListStreamProcessorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4198,10 +4099,9 @@ const de_ListStreamProcessorsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4219,12 +4119,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4260,10 +4160,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4281,12 +4180,12 @@ export const de_PutProjectPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutProjectPolicyResponse(data, context); + contents = _json(data); const response: PutProjectPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4337,10 +4236,9 @@ const de_PutProjectPolicyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4363,7 +4261,7 @@ export const de_RecognizeCelebritiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4405,10 +4303,9 @@ const de_RecognizeCelebritiesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4431,7 +4328,7 @@ export const de_SearchFacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4467,10 +4364,9 @@ const de_SearchFacesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4493,7 +4389,7 @@ export const de_SearchFacesByImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4538,10 +4434,9 @@ const de_SearchFacesByImageCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4559,12 +4454,12 @@ export const de_StartCelebrityRecognitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartCelebrityRecognitionResponse(data, context); + contents = _json(data); const response: StartCelebrityRecognitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4609,10 +4504,9 @@ const de_StartCelebrityRecognitionCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4630,12 +4524,12 @@ export const de_StartContentModerationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartContentModerationResponse(data, context); + contents = _json(data); const response: StartContentModerationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4680,10 +4574,9 @@ const de_StartContentModerationCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4701,12 +4594,12 @@ export const de_StartFaceDetectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFaceDetectionResponse(data, context); + contents = _json(data); const response: StartFaceDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4751,10 +4644,9 @@ const de_StartFaceDetectionCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4772,12 +4664,12 @@ export const de_StartFaceSearchCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFaceSearchResponse(data, context); + contents = _json(data); const response: StartFaceSearchCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4825,10 +4717,9 @@ const de_StartFaceSearchCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4846,12 +4737,12 @@ export const de_StartLabelDetectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartLabelDetectionResponse(data, context); + contents = _json(data); const response: StartLabelDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4896,10 +4787,9 @@ const de_StartLabelDetectionCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4917,12 +4807,12 @@ export const de_StartPersonTrackingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartPersonTrackingResponse(data, context); + contents = _json(data); const response: StartPersonTrackingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4967,10 +4857,9 @@ const de_StartPersonTrackingCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4988,12 +4877,12 @@ export const de_StartProjectVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartProjectVersionResponse(data, context); + contents = _json(data); const response: StartProjectVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5035,10 +4924,9 @@ const de_StartProjectVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5056,12 +4944,12 @@ export const de_StartSegmentDetectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSegmentDetectionResponse(data, context); + contents = _json(data); const response: StartSegmentDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5106,10 +4994,9 @@ const de_StartSegmentDetectionCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5127,12 +5014,12 @@ export const de_StartStreamProcessorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartStreamProcessorResponse(data, context); + contents = _json(data); const response: StartStreamProcessorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5171,10 +5058,9 @@ const de_StartStreamProcessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5192,12 +5078,12 @@ export const de_StartTextDetectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartTextDetectionResponse(data, context); + contents = _json(data); const response: StartTextDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5242,10 +5128,9 @@ const de_StartTextDetectionCommandError = async ( throw await de_VideoTooLargeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5263,12 +5148,12 @@ export const de_StopProjectVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopProjectVersionResponse(data, context); + contents = _json(data); const response: StopProjectVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5307,10 +5192,9 @@ const de_StopProjectVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5328,12 +5212,12 @@ export const de_StopStreamProcessorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopStreamProcessorResponse(data, context); + contents = _json(data); const response: StopStreamProcessorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5372,10 +5256,9 @@ const de_StopStreamProcessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5393,12 +5276,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5437,10 +5320,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5458,12 +5340,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5499,10 +5381,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5520,12 +5401,12 @@ export const de_UpdateDatasetEntriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDatasetEntriesResponse(data, context); + contents = _json(data); const response: UpdateDatasetEntriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5567,10 +5448,9 @@ const de_UpdateDatasetEntriesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5588,12 +5468,12 @@ export const de_UpdateStreamProcessorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateStreamProcessorResponse(data, context); + contents = _json(data); const response: UpdateStreamProcessorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5632,10 +5512,9 @@ const de_UpdateStreamProcessorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5649,7 +5528,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5665,7 +5544,7 @@ const de_HumanLoopQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HumanLoopQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new HumanLoopQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5681,7 +5560,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5697,7 +5576,7 @@ const de_ImageTooLargeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ImageTooLargeException(body, context); + const deserialized: any = _json(body); const exception = new ImageTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5710,7 +5589,7 @@ const de_ImageTooLargeExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5726,7 +5605,7 @@ const de_InvalidImageFormatExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidImageFormatException(body, context); + const deserialized: any = _json(body); const exception = new InvalidImageFormatException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5742,7 +5621,7 @@ const de_InvalidPaginationTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPaginationTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPaginationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5758,7 +5637,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5774,7 +5653,7 @@ const de_InvalidPolicyRevisionIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPolicyRevisionIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPolicyRevisionIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5790,7 +5669,7 @@ const de_InvalidS3ObjectExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidS3ObjectException(body, context); + const deserialized: any = _json(body); const exception = new InvalidS3ObjectException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5806,7 +5685,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5822,7 +5701,7 @@ const de_MalformedPolicyDocumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedPolicyDocumentException(body, context); + const deserialized: any = _json(body); const exception = new MalformedPolicyDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5838,7 +5717,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProvisionedThroughputExceededException(body, context); + const deserialized: any = _json(body); const exception = new ProvisionedThroughputExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5854,7 +5733,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5870,7 +5749,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5886,7 +5765,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5902,7 +5781,7 @@ const de_ResourceNotReadyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotReadyException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5918,7 +5797,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5934,7 +5813,7 @@ const de_SessionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SessionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new SessionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5947,7 +5826,7 @@ const de_SessionNotFoundExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5963,7 +5842,7 @@ const de_VideoTooLargeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_VideoTooLargeException(body, context); + const deserialized: any = _json(body); const exception = new VideoTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5971,915 +5850,342 @@ const de_VideoTooLargeExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1Asset - */ -const se_Asset = (input: Asset, context: __SerdeContext): any => { - return { - ...(input.GroundTruthManifest != null && { - GroundTruthManifest: se_GroundTruthManifest(input.GroundTruthManifest, context), - }), - }; -}; +// se_Asset omitted. -/** - * serializeAws_json1_1Assets - */ -const se_Assets = (input: Asset[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Asset(entry, context); - }); -}; +// se_Assets omitted. -/** - * serializeAws_json1_1Attributes - */ -const se_Attributes = (input: (Attribute | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Attributes omitted. /** * serializeAws_json1_1BlackFrame */ const se_BlackFrame = (input: BlackFrame, context: __SerdeContext): any => { - return { - ...(input.MaxPixelThreshold != null && { MaxPixelThreshold: __serializeFloat(input.MaxPixelThreshold) }), - ...(input.MinCoveragePercentage != null && { - MinCoveragePercentage: __serializeFloat(input.MinCoveragePercentage), - }), - }; + return take(input, { + MaxPixelThreshold: __serializeFloat, + MinCoveragePercentage: __serializeFloat, + }); }; /** * serializeAws_json1_1BoundingBox */ const se_BoundingBox = (input: BoundingBox, context: __SerdeContext): any => { - return { - ...(input.Height != null && { Height: __serializeFloat(input.Height) }), - ...(input.Left != null && { Left: __serializeFloat(input.Left) }), - ...(input.Top != null && { Top: __serializeFloat(input.Top) }), - ...(input.Width != null && { Width: __serializeFloat(input.Width) }), - }; + return take(input, { + Height: __serializeFloat, + Left: __serializeFloat, + Top: __serializeFloat, + Width: __serializeFloat, + }); }; /** * serializeAws_json1_1CompareFacesRequest */ const se_CompareFacesRequest = (input: CompareFacesRequest, context: __SerdeContext): any => { - return { - ...(input.QualityFilter != null && { QualityFilter: input.QualityFilter }), - ...(input.SimilarityThreshold != null && { SimilarityThreshold: __serializeFloat(input.SimilarityThreshold) }), - ...(input.SourceImage != null && { SourceImage: se_Image(input.SourceImage, context) }), - ...(input.TargetImage != null && { TargetImage: se_Image(input.TargetImage, context) }), - }; + return take(input, { + QualityFilter: [], + SimilarityThreshold: __serializeFloat, + SourceImage: (_) => se_Image(_, context), + TargetImage: (_) => se_Image(_, context), + }); }; -/** - * serializeAws_json1_1ConnectedHomeLabels - */ -const se_ConnectedHomeLabels = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConnectedHomeLabels omitted. /** * serializeAws_json1_1ConnectedHomeSettings */ const se_ConnectedHomeSettings = (input: ConnectedHomeSettings, context: __SerdeContext): any => { - return { - ...(input.Labels != null && { Labels: se_ConnectedHomeLabels(input.Labels, context) }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - }; + return take(input, { + Labels: _json, + MinConfidence: __serializeFloat, + }); }; /** * serializeAws_json1_1ConnectedHomeSettingsForUpdate */ const se_ConnectedHomeSettingsForUpdate = (input: ConnectedHomeSettingsForUpdate, context: __SerdeContext): any => { - return { - ...(input.Labels != null && { Labels: se_ConnectedHomeLabels(input.Labels, context) }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - }; + return take(input, { + Labels: _json, + MinConfidence: __serializeFloat, + }); }; -/** - * serializeAws_json1_1ContentClassifiers - */ -const se_ContentClassifiers = (input: (ContentClassifier | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ContentClassifiers omitted. -/** - * serializeAws_json1_1CopyProjectVersionRequest - */ -const se_CopyProjectVersionRequest = (input: CopyProjectVersionRequest, context: __SerdeContext): any => { - return { - ...(input.DestinationProjectArn != null && { DestinationProjectArn: input.DestinationProjectArn }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - ...(input.SourceProjectArn != null && { SourceProjectArn: input.SourceProjectArn }), - ...(input.SourceProjectVersionArn != null && { SourceProjectVersionArn: input.SourceProjectVersionArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; +// se_CopyProjectVersionRequest omitted. -/** - * serializeAws_json1_1CreateCollectionRequest - */ -const se_CreateCollectionRequest = (input: CreateCollectionRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; -}; +// se_CreateCollectionRequest omitted. -/** - * serializeAws_json1_1CreateDatasetRequest - */ -const se_CreateDatasetRequest = (input: CreateDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetSource != null && { DatasetSource: se_DatasetSource(input.DatasetSource, context) }), - ...(input.DatasetType != null && { DatasetType: input.DatasetType }), - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - }; -}; +// se_CreateDatasetRequest omitted. -/** - * serializeAws_json1_1CreateFaceLivenessSessionRequest - */ -const se_CreateFaceLivenessSessionRequest = (input: CreateFaceLivenessSessionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Settings != null && { Settings: se_CreateFaceLivenessSessionRequestSettings(input.Settings, context) }), - }; -}; +// se_CreateFaceLivenessSessionRequest omitted. -/** - * serializeAws_json1_1CreateFaceLivenessSessionRequestSettings - */ -const se_CreateFaceLivenessSessionRequestSettings = ( - input: CreateFaceLivenessSessionRequestSettings, - context: __SerdeContext -): any => { - return { - ...(input.AuditImagesLimit != null && { AuditImagesLimit: input.AuditImagesLimit }), - ...(input.OutputConfig != null && { OutputConfig: se_LivenessOutputConfig(input.OutputConfig, context) }), - }; -}; +// se_CreateFaceLivenessSessionRequestSettings omitted. -/** - * serializeAws_json1_1CreateProjectRequest - */ -const se_CreateProjectRequest = (input: CreateProjectRequest, context: __SerdeContext): any => { - return { - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - }; -}; +// se_CreateProjectRequest omitted. -/** - * serializeAws_json1_1CreateProjectVersionRequest - */ -const se_CreateProjectVersionRequest = (input: CreateProjectVersionRequest, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.TestingData != null && { TestingData: se_TestingData(input.TestingData, context) }), - ...(input.TrainingData != null && { TrainingData: se_TrainingData(input.TrainingData, context) }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; +// se_CreateProjectVersionRequest omitted. /** * serializeAws_json1_1CreateStreamProcessorRequest */ const se_CreateStreamProcessorRequest = (input: CreateStreamProcessorRequest, context: __SerdeContext): any => { - return { - ...(input.DataSharingPreference != null && { - DataSharingPreference: se_StreamProcessorDataSharingPreference(input.DataSharingPreference, context), - }), - ...(input.Input != null && { Input: se_StreamProcessorInput(input.Input, context) }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_StreamProcessorNotificationChannel(input.NotificationChannel, context), - }), - ...(input.Output != null && { Output: se_StreamProcessorOutput(input.Output, context) }), - ...(input.RegionsOfInterest != null && { - RegionsOfInterest: se_RegionsOfInterest(input.RegionsOfInterest, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Settings != null && { Settings: se_StreamProcessorSettings(input.Settings, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; + return take(input, { + DataSharingPreference: _json, + Input: _json, + KmsKeyId: [], + Name: [], + NotificationChannel: _json, + Output: _json, + RegionsOfInterest: (_) => se_RegionsOfInterest(_, context), + RoleArn: [], + Settings: (_) => se_StreamProcessorSettings(_, context), + Tags: _json, + }); }; /** * serializeAws_json1_1DatasetChanges */ const se_DatasetChanges = (input: DatasetChanges, context: __SerdeContext): any => { - return { - ...(input.GroundTruth != null && { GroundTruth: context.base64Encoder(input.GroundTruth) }), - }; + return take(input, { + GroundTruth: context.base64Encoder, + }); }; -/** - * serializeAws_json1_1DatasetLabels - */ -const se_DatasetLabels = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DatasetLabels omitted. -/** - * serializeAws_json1_1DatasetSource - */ -const se_DatasetSource = (input: DatasetSource, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - ...(input.GroundTruthManifest != null && { - GroundTruthManifest: se_GroundTruthManifest(input.GroundTruthManifest, context), - }), - }; -}; +// se_DatasetSource omitted. -/** - * serializeAws_json1_1DeleteCollectionRequest - */ -const se_DeleteCollectionRequest = (input: DeleteCollectionRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - }; -}; +// se_DeleteCollectionRequest omitted. -/** - * serializeAws_json1_1DeleteDatasetRequest - */ -const se_DeleteDatasetRequest = (input: DeleteDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - }; -}; +// se_DeleteDatasetRequest omitted. -/** - * serializeAws_json1_1DeleteFacesRequest - */ -const se_DeleteFacesRequest = (input: DeleteFacesRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.FaceIds != null && { FaceIds: se_FaceIdList(input.FaceIds, context) }), - }; -}; +// se_DeleteFacesRequest omitted. -/** - * serializeAws_json1_1DeleteProjectPolicyRequest - */ -const se_DeleteProjectPolicyRequest = (input: DeleteProjectPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }), - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - }; -}; +// se_DeleteProjectPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteProjectRequest - */ -const se_DeleteProjectRequest = (input: DeleteProjectRequest, context: __SerdeContext): any => { - return { - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - }; -}; +// se_DeleteProjectRequest omitted. -/** - * serializeAws_json1_1DeleteProjectVersionRequest - */ -const se_DeleteProjectVersionRequest = (input: DeleteProjectVersionRequest, context: __SerdeContext): any => { - return { - ...(input.ProjectVersionArn != null && { ProjectVersionArn: input.ProjectVersionArn }), - }; -}; +// se_DeleteProjectVersionRequest omitted. -/** - * serializeAws_json1_1DeleteStreamProcessorRequest - */ -const se_DeleteStreamProcessorRequest = (input: DeleteStreamProcessorRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteStreamProcessorRequest omitted. -/** - * serializeAws_json1_1DescribeCollectionRequest - */ -const se_DescribeCollectionRequest = (input: DescribeCollectionRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - }; -}; +// se_DescribeCollectionRequest omitted. -/** - * serializeAws_json1_1DescribeDatasetRequest - */ -const se_DescribeDatasetRequest = (input: DescribeDatasetRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - }; -}; +// se_DescribeDatasetRequest omitted. -/** - * serializeAws_json1_1DescribeProjectsRequest - */ -const se_DescribeProjectsRequest = (input: DescribeProjectsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProjectNames != null && { ProjectNames: se_ProjectNames(input.ProjectNames, context) }), - }; -}; +// se_DescribeProjectsRequest omitted. -/** - * serializeAws_json1_1DescribeProjectVersionsRequest - */ -const se_DescribeProjectVersionsRequest = (input: DescribeProjectVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - ...(input.VersionNames != null && { VersionNames: se_VersionNames(input.VersionNames, context) }), - }; -}; +// se_DescribeProjectVersionsRequest omitted. -/** - * serializeAws_json1_1DescribeStreamProcessorRequest - */ -const se_DescribeStreamProcessorRequest = (input: DescribeStreamProcessorRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DescribeStreamProcessorRequest omitted. /** * serializeAws_json1_1DetectCustomLabelsRequest */ const se_DetectCustomLabelsRequest = (input: DetectCustomLabelsRequest, context: __SerdeContext): any => { - return { - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - ...(input.ProjectVersionArn != null && { ProjectVersionArn: input.ProjectVersionArn }), - }; + return take(input, { + Image: (_) => se_Image(_, context), + MaxResults: [], + MinConfidence: __serializeFloat, + ProjectVersionArn: [], + }); }; /** * serializeAws_json1_1DetectFacesRequest */ const se_DetectFacesRequest = (input: DetectFacesRequest, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - }; + return take(input, { + Attributes: _json, + Image: (_) => se_Image(_, context), + }); }; /** * serializeAws_json1_1DetectionFilter */ const se_DetectionFilter = (input: DetectionFilter, context: __SerdeContext): any => { - return { - ...(input.MinBoundingBoxHeight != null && { MinBoundingBoxHeight: __serializeFloat(input.MinBoundingBoxHeight) }), - ...(input.MinBoundingBoxWidth != null && { MinBoundingBoxWidth: __serializeFloat(input.MinBoundingBoxWidth) }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - }; + return take(input, { + MinBoundingBoxHeight: __serializeFloat, + MinBoundingBoxWidth: __serializeFloat, + MinConfidence: __serializeFloat, + }); }; -/** - * serializeAws_json1_1DetectLabelsFeatureList - */ -const se_DetectLabelsFeatureList = (input: (DetectLabelsFeatureName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DetectLabelsFeatureList omitted. -/** - * serializeAws_json1_1DetectLabelsImagePropertiesSettings - */ -const se_DetectLabelsImagePropertiesSettings = ( - input: DetectLabelsImagePropertiesSettings, - context: __SerdeContext -): any => { - return { - ...(input.MaxDominantColors != null && { MaxDominantColors: input.MaxDominantColors }), - }; -}; +// se_DetectLabelsImagePropertiesSettings omitted. /** * serializeAws_json1_1DetectLabelsRequest */ const se_DetectLabelsRequest = (input: DetectLabelsRequest, context: __SerdeContext): any => { - return { - ...(input.Features != null && { Features: se_DetectLabelsFeatureList(input.Features, context) }), - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - ...(input.MaxLabels != null && { MaxLabels: input.MaxLabels }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - ...(input.Settings != null && { Settings: se_DetectLabelsSettings(input.Settings, context) }), - }; + return take(input, { + Features: _json, + Image: (_) => se_Image(_, context), + MaxLabels: [], + MinConfidence: __serializeFloat, + Settings: _json, + }); }; -/** - * serializeAws_json1_1DetectLabelsSettings - */ -const se_DetectLabelsSettings = (input: DetectLabelsSettings, context: __SerdeContext): any => { - return { - ...(input.GeneralLabels != null && { GeneralLabels: se_GeneralLabelsSettings(input.GeneralLabels, context) }), - ...(input.ImageProperties != null && { - ImageProperties: se_DetectLabelsImagePropertiesSettings(input.ImageProperties, context), - }), - }; -}; +// se_DetectLabelsSettings omitted. /** * serializeAws_json1_1DetectModerationLabelsRequest */ const se_DetectModerationLabelsRequest = (input: DetectModerationLabelsRequest, context: __SerdeContext): any => { - return { - ...(input.HumanLoopConfig != null && { HumanLoopConfig: se_HumanLoopConfig(input.HumanLoopConfig, context) }), - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - }; + return take(input, { + HumanLoopConfig: _json, + Image: (_) => se_Image(_, context), + MinConfidence: __serializeFloat, + }); }; /** * serializeAws_json1_1DetectProtectiveEquipmentRequest */ const se_DetectProtectiveEquipmentRequest = (input: DetectProtectiveEquipmentRequest, context: __SerdeContext): any => { - return { - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - ...(input.SummarizationAttributes != null && { - SummarizationAttributes: se_ProtectiveEquipmentSummarizationAttributes(input.SummarizationAttributes, context), - }), - }; + return take(input, { + Image: (_) => se_Image(_, context), + SummarizationAttributes: (_) => se_ProtectiveEquipmentSummarizationAttributes(_, context), + }); }; /** * serializeAws_json1_1DetectTextFilters */ const se_DetectTextFilters = (input: DetectTextFilters, context: __SerdeContext): any => { - return { - ...(input.RegionsOfInterest != null && { - RegionsOfInterest: se_RegionsOfInterest(input.RegionsOfInterest, context), - }), - ...(input.WordFilter != null && { WordFilter: se_DetectionFilter(input.WordFilter, context) }), - }; + return take(input, { + RegionsOfInterest: (_) => se_RegionsOfInterest(_, context), + WordFilter: (_) => se_DetectionFilter(_, context), + }); }; /** * serializeAws_json1_1DetectTextRequest */ const se_DetectTextRequest = (input: DetectTextRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_DetectTextFilters(input.Filters, context) }), - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - }; + return take(input, { + Filters: (_) => se_DetectTextFilters(_, context), + Image: (_) => se_Image(_, context), + }); }; -/** - * serializeAws_json1_1DistributeDataset - */ -const se_DistributeDataset = (input: DistributeDataset, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_DistributeDataset omitted. -/** - * serializeAws_json1_1DistributeDatasetEntriesRequest - */ -const se_DistributeDatasetEntriesRequest = (input: DistributeDatasetEntriesRequest, context: __SerdeContext): any => { - return { - ...(input.Datasets != null && { Datasets: se_DistributeDatasetMetadataList(input.Datasets, context) }), - }; -}; +// se_DistributeDatasetEntriesRequest omitted. -/** - * serializeAws_json1_1DistributeDatasetMetadataList - */ -const se_DistributeDatasetMetadataList = (input: DistributeDataset[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DistributeDataset(entry, context); - }); -}; +// se_DistributeDatasetMetadataList omitted. -/** - * serializeAws_json1_1FaceIdList - */ -const se_FaceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FaceIdList omitted. /** * serializeAws_json1_1FaceSearchSettings */ const se_FaceSearchSettings = (input: FaceSearchSettings, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.FaceMatchThreshold != null && { FaceMatchThreshold: __serializeFloat(input.FaceMatchThreshold) }), - }; + return take(input, { + CollectionId: [], + FaceMatchThreshold: __serializeFloat, + }); }; +// se_GeneralLabelsFilterList omitted. + +// se_GeneralLabelsSettings omitted. + +// se_GetCelebrityInfoRequest omitted. + +// se_GetCelebrityRecognitionRequest omitted. + +// se_GetContentModerationRequest omitted. + +// se_GetFaceDetectionRequest omitted. + +// se_GetFaceLivenessSessionResultsRequest omitted. + +// se_GetFaceSearchRequest omitted. + +// se_GetLabelDetectionRequest omitted. + +// se_GetPersonTrackingRequest omitted. + +// se_GetSegmentDetectionRequest omitted. + +// se_GetTextDetectionRequest omitted. + +// se_GroundTruthManifest omitted. + +// se_HumanLoopConfig omitted. + +// se_HumanLoopDataAttributes omitted. + /** - * serializeAws_json1_1GeneralLabelsFilterList + * serializeAws_json1_1Image */ -const se_GeneralLabelsFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1GeneralLabelsSettings - */ -const se_GeneralLabelsSettings = (input: GeneralLabelsSettings, context: __SerdeContext): any => { - return { - ...(input.LabelCategoryExclusionFilters != null && { - LabelCategoryExclusionFilters: se_GeneralLabelsFilterList(input.LabelCategoryExclusionFilters, context), - }), - ...(input.LabelCategoryInclusionFilters != null && { - LabelCategoryInclusionFilters: se_GeneralLabelsFilterList(input.LabelCategoryInclusionFilters, context), - }), - ...(input.LabelExclusionFilters != null && { - LabelExclusionFilters: se_GeneralLabelsFilterList(input.LabelExclusionFilters, context), - }), - ...(input.LabelInclusionFilters != null && { - LabelInclusionFilters: se_GeneralLabelsFilterList(input.LabelInclusionFilters, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetCelebrityInfoRequest - */ -const se_GetCelebrityInfoRequest = (input: GetCelebrityInfoRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; - -/** - * serializeAws_json1_1GetCelebrityRecognitionRequest - */ -const se_GetCelebrityRecognitionRequest = (input: GetCelebrityRecognitionRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - }; -}; - -/** - * serializeAws_json1_1GetContentModerationRequest - */ -const se_GetContentModerationRequest = (input: GetContentModerationRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - }; -}; - -/** - * serializeAws_json1_1GetFaceDetectionRequest - */ -const se_GetFaceDetectionRequest = (input: GetFaceDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetFaceLivenessSessionResultsRequest - */ -const se_GetFaceLivenessSessionResultsRequest = ( - input: GetFaceLivenessSessionResultsRequest, - context: __SerdeContext -): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1GetFaceSearchRequest - */ -const se_GetFaceSearchRequest = (input: GetFaceSearchRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - }; -}; - -/** - * serializeAws_json1_1GetLabelDetectionRequest - */ -const se_GetLabelDetectionRequest = (input: GetLabelDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.AggregateBy != null && { AggregateBy: input.AggregateBy }), - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - }; -}; - -/** - * serializeAws_json1_1GetPersonTrackingRequest - */ -const se_GetPersonTrackingRequest = (input: GetPersonTrackingRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - }; -}; - -/** - * serializeAws_json1_1GetSegmentDetectionRequest - */ -const se_GetSegmentDetectionRequest = (input: GetSegmentDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GetTextDetectionRequest - */ -const se_GetTextDetectionRequest = (input: GetTextDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1GroundTruthManifest - */ -const se_GroundTruthManifest = (input: GroundTruthManifest, context: __SerdeContext): any => { - return { - ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }), - }; -}; - -/** - * serializeAws_json1_1HumanLoopConfig - */ -const se_HumanLoopConfig = (input: HumanLoopConfig, context: __SerdeContext): any => { - return { - ...(input.DataAttributes != null && { DataAttributes: se_HumanLoopDataAttributes(input.DataAttributes, context) }), - ...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }), - ...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }), - }; -}; - -/** - * serializeAws_json1_1HumanLoopDataAttributes - */ -const se_HumanLoopDataAttributes = (input: HumanLoopDataAttributes, context: __SerdeContext): any => { - return { - ...(input.ContentClassifiers != null && { - ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context), - }), - }; -}; - -/** - * serializeAws_json1_1Image - */ -const se_Image = (input: Image, context: __SerdeContext): any => { - return { - ...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }), - ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }), - }; +const se_Image = (input: Image, context: __SerdeContext): any => { + return take(input, { + Bytes: context.base64Encoder, + S3Object: _json, + }); }; /** * serializeAws_json1_1IndexFacesRequest */ const se_IndexFacesRequest = (input: IndexFacesRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.DetectionAttributes != null && { - DetectionAttributes: se_Attributes(input.DetectionAttributes, context), - }), - ...(input.ExternalImageId != null && { ExternalImageId: input.ExternalImageId }), - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - ...(input.MaxFaces != null && { MaxFaces: input.MaxFaces }), - ...(input.QualityFilter != null && { QualityFilter: input.QualityFilter }), - }; + return take(input, { + CollectionId: [], + DetectionAttributes: _json, + ExternalImageId: [], + Image: (_) => se_Image(_, context), + MaxFaces: [], + QualityFilter: [], + }); }; -/** - * serializeAws_json1_1KinesisDataStream - */ -const se_KinesisDataStream = (input: KinesisDataStream, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_KinesisDataStream omitted. -/** - * serializeAws_json1_1KinesisVideoStream - */ -const se_KinesisVideoStream = (input: KinesisVideoStream, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_KinesisVideoStream omitted. -/** - * serializeAws_json1_1KinesisVideoStreamStartSelector - */ -const se_KinesisVideoStreamStartSelector = (input: KinesisVideoStreamStartSelector, context: __SerdeContext): any => { - return { - ...(input.FragmentNumber != null && { FragmentNumber: input.FragmentNumber }), - ...(input.ProducerTimestamp != null && { ProducerTimestamp: input.ProducerTimestamp }), - }; -}; +// se_KinesisVideoStreamStartSelector omitted. -/** - * serializeAws_json1_1LabelDetectionFeatureList - */ -const se_LabelDetectionFeatureList = (input: (LabelDetectionFeatureName | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LabelDetectionFeatureList omitted. -/** - * serializeAws_json1_1LabelDetectionSettings - */ -const se_LabelDetectionSettings = (input: LabelDetectionSettings, context: __SerdeContext): any => { - return { - ...(input.GeneralLabels != null && { GeneralLabels: se_GeneralLabelsSettings(input.GeneralLabels, context) }), - }; -}; +// se_LabelDetectionSettings omitted. -/** - * serializeAws_json1_1ListCollectionsRequest - */ -const se_ListCollectionsRequest = (input: ListCollectionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCollectionsRequest omitted. -/** - * serializeAws_json1_1ListDatasetEntriesRequest - */ -const se_ListDatasetEntriesRequest = (input: ListDatasetEntriesRequest, context: __SerdeContext): any => { - return { - ...(input.ContainsLabels != null && { ContainsLabels: se_DatasetLabels(input.ContainsLabels, context) }), - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - ...(input.HasErrors != null && { HasErrors: input.HasErrors }), - ...(input.Labeled != null && { Labeled: input.Labeled }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SourceRefContains != null && { SourceRefContains: input.SourceRefContains }), - }; -}; +// se_ListDatasetEntriesRequest omitted. -/** - * serializeAws_json1_1ListDatasetLabelsRequest - */ -const se_ListDatasetLabelsRequest = (input: ListDatasetLabelsRequest, context: __SerdeContext): any => { - return { - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatasetLabelsRequest omitted. -/** - * serializeAws_json1_1ListFacesRequest - */ -const se_ListFacesRequest = (input: ListFacesRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFacesRequest omitted. -/** - * serializeAws_json1_1ListProjectPoliciesRequest - */ -const se_ListProjectPoliciesRequest = (input: ListProjectPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - }; -}; +// se_ListProjectPoliciesRequest omitted. -/** - * serializeAws_json1_1ListStreamProcessorsRequest - */ -const se_ListStreamProcessorsRequest = (input: ListStreamProcessorsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListStreamProcessorsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1LivenessOutputConfig - */ -const se_LivenessOutputConfig = (input: LivenessOutputConfig, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - }; -}; +// se_LivenessOutputConfig omitted. -/** - * serializeAws_json1_1NotificationChannel - */ -const se_NotificationChannel = (input: NotificationChannel, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }), - }; -}; +// se_NotificationChannel omitted. -/** - * serializeAws_json1_1OutputConfig - */ -const se_OutputConfig = (input: OutputConfig, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - }; -}; +// se_OutputConfig omitted. /** * serializeAws_json1_1Point */ const se_Point = (input: Point, context: __SerdeContext): any => { - return { - ...(input.X != null && { X: __serializeFloat(input.X) }), - ...(input.Y != null && { Y: __serializeFloat(input.Y) }), - }; + return take(input, { + X: __serializeFloat, + Y: __serializeFloat, + }); }; /** @@ -6889,654 +6195,305 @@ const se_Polygon = (input: Point[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Point(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProjectNames - */ -const se_ProjectNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProtectiveEquipmentSummarizationAttributes - */ -const se_ProtectiveEquipmentSummarizationAttributes = ( - input: ProtectiveEquipmentSummarizationAttributes, - context: __SerdeContext -): any => { - return { - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - ...(input.RequiredEquipmentTypes != null && { - RequiredEquipmentTypes: se_ProtectiveEquipmentTypes(input.RequiredEquipmentTypes, context), - }), - }; -}; - -/** - * serializeAws_json1_1ProtectiveEquipmentTypes - */ -const se_ProtectiveEquipmentTypes = (input: (ProtectiveEquipmentType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PutProjectPolicyRequest - */ -const se_PutProjectPolicyRequest = (input: PutProjectPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }), - ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }), - }; -}; - -/** - * serializeAws_json1_1RecognizeCelebritiesRequest - */ -const se_RecognizeCelebritiesRequest = (input: RecognizeCelebritiesRequest, context: __SerdeContext): any => { - return { - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - }; -}; - -/** - * serializeAws_json1_1RegionOfInterest - */ -const se_RegionOfInterest = (input: RegionOfInterest, context: __SerdeContext): any => { - return { - ...(input.BoundingBox != null && { BoundingBox: se_BoundingBox(input.BoundingBox, context) }), - ...(input.Polygon != null && { Polygon: se_Polygon(input.Polygon, context) }), - }; -}; - -/** - * serializeAws_json1_1RegionsOfInterest - */ -const se_RegionsOfInterest = (input: RegionOfInterest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegionOfInterest(entry, context); - }); -}; - -/** - * serializeAws_json1_1S3Destination - */ -const se_S3Destination = (input: S3Destination, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.KeyPrefix != null && { KeyPrefix: input.KeyPrefix }), - }; -}; - -/** - * serializeAws_json1_1S3Object - */ -const se_S3Object = (input: S3Object, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1SearchFacesByImageRequest - */ -const se_SearchFacesByImageRequest = (input: SearchFacesByImageRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.FaceMatchThreshold != null && { FaceMatchThreshold: __serializeFloat(input.FaceMatchThreshold) }), - ...(input.Image != null && { Image: se_Image(input.Image, context) }), - ...(input.MaxFaces != null && { MaxFaces: input.MaxFaces }), - ...(input.QualityFilter != null && { QualityFilter: input.QualityFilter }), - }; -}; - -/** - * serializeAws_json1_1SearchFacesRequest - */ -const se_SearchFacesRequest = (input: SearchFacesRequest, context: __SerdeContext): any => { - return { - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.FaceId != null && { FaceId: input.FaceId }), - ...(input.FaceMatchThreshold != null && { FaceMatchThreshold: __serializeFloat(input.FaceMatchThreshold) }), - ...(input.MaxFaces != null && { MaxFaces: input.MaxFaces }), - }; -}; - -/** - * serializeAws_json1_1SegmentTypes - */ -const se_SegmentTypes = (input: (SegmentType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StartCelebrityRecognitionRequest - */ -const se_StartCelebrityRecognitionRequest = (input: StartCelebrityRecognitionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartContentModerationRequest - */ -const se_StartContentModerationRequest = (input: StartContentModerationRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartFaceDetectionRequest - */ -const se_StartFaceDetectionRequest = (input: StartFaceDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.FaceAttributes != null && { FaceAttributes: input.FaceAttributes }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartFaceSearchRequest - */ -const se_StartFaceSearchRequest = (input: StartFaceSearchRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.CollectionId != null && { CollectionId: input.CollectionId }), - ...(input.FaceMatchThreshold != null && { FaceMatchThreshold: __serializeFloat(input.FaceMatchThreshold) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartLabelDetectionRequest - */ -const se_StartLabelDetectionRequest = (input: StartLabelDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Features != null && { Features: se_LabelDetectionFeatureList(input.Features, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.MinConfidence != null && { MinConfidence: __serializeFloat(input.MinConfidence) }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Settings != null && { Settings: se_LabelDetectionSettings(input.Settings, context) }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartPersonTrackingRequest - */ -const se_StartPersonTrackingRequest = (input: StartPersonTrackingRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartProjectVersionRequest - */ -const se_StartProjectVersionRequest = (input: StartProjectVersionRequest, context: __SerdeContext): any => { - return { - ...(input.MaxInferenceUnits != null && { MaxInferenceUnits: input.MaxInferenceUnits }), - ...(input.MinInferenceUnits != null && { MinInferenceUnits: input.MinInferenceUnits }), - ...(input.ProjectVersionArn != null && { ProjectVersionArn: input.ProjectVersionArn }), - }; -}; - -/** - * serializeAws_json1_1StartSegmentDetectionFilters - */ -const se_StartSegmentDetectionFilters = (input: StartSegmentDetectionFilters, context: __SerdeContext): any => { - return { - ...(input.ShotFilter != null && { ShotFilter: se_StartShotDetectionFilter(input.ShotFilter, context) }), - ...(input.TechnicalCueFilter != null && { - TechnicalCueFilter: se_StartTechnicalCueDetectionFilter(input.TechnicalCueFilter, context), - }), - }; -}; - -/** - * serializeAws_json1_1StartSegmentDetectionRequest - */ -const se_StartSegmentDetectionRequest = (input: StartSegmentDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Filters != null && { Filters: se_StartSegmentDetectionFilters(input.Filters, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.SegmentTypes != null && { SegmentTypes: se_SegmentTypes(input.SegmentTypes, context) }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StartShotDetectionFilter - */ -const se_StartShotDetectionFilter = (input: StartShotDetectionFilter, context: __SerdeContext): any => { - return { - ...(input.MinSegmentConfidence != null && { MinSegmentConfidence: __serializeFloat(input.MinSegmentConfidence) }), - }; -}; - -/** - * serializeAws_json1_1StartStreamProcessorRequest - */ -const se_StartStreamProcessorRequest = (input: StartStreamProcessorRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.StartSelector != null && { - StartSelector: se_StreamProcessingStartSelector(input.StartSelector, context), - }), - ...(input.StopSelector != null && { StopSelector: se_StreamProcessingStopSelector(input.StopSelector, context) }), - }; -}; - -/** - * serializeAws_json1_1StartTechnicalCueDetectionFilter - */ -const se_StartTechnicalCueDetectionFilter = (input: StartTechnicalCueDetectionFilter, context: __SerdeContext): any => { - return { - ...(input.BlackFrame != null && { BlackFrame: se_BlackFrame(input.BlackFrame, context) }), - ...(input.MinSegmentConfidence != null && { MinSegmentConfidence: __serializeFloat(input.MinSegmentConfidence) }), - }; -}; - -/** - * serializeAws_json1_1StartTextDetectionFilters - */ -const se_StartTextDetectionFilters = (input: StartTextDetectionFilters, context: __SerdeContext): any => { - return { - ...(input.RegionsOfInterest != null && { - RegionsOfInterest: se_RegionsOfInterest(input.RegionsOfInterest, context), - }), - ...(input.WordFilter != null && { WordFilter: se_DetectionFilter(input.WordFilter, context) }), - }; -}; - -/** - * serializeAws_json1_1StartTextDetectionRequest - */ -const se_StartTextDetectionRequest = (input: StartTextDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.Filters != null && { Filters: se_StartTextDetectionFilters(input.Filters, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.Video != null && { Video: se_Video(input.Video, context) }), - }; -}; - -/** - * serializeAws_json1_1StopProjectVersionRequest - */ -const se_StopProjectVersionRequest = (input: StopProjectVersionRequest, context: __SerdeContext): any => { - return { - ...(input.ProjectVersionArn != null && { ProjectVersionArn: input.ProjectVersionArn }), - }; -}; - -/** - * serializeAws_json1_1StopStreamProcessorRequest - */ -const se_StopStreamProcessorRequest = (input: StopStreamProcessorRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StreamProcessingStartSelector - */ -const se_StreamProcessingStartSelector = (input: StreamProcessingStartSelector, context: __SerdeContext): any => { - return { - ...(input.KVSStreamStartSelector != null && { - KVSStreamStartSelector: se_KinesisVideoStreamStartSelector(input.KVSStreamStartSelector, context), - }), - }; -}; - -/** - * serializeAws_json1_1StreamProcessingStopSelector - */ -const se_StreamProcessingStopSelector = (input: StreamProcessingStopSelector, context: __SerdeContext): any => { - return { - ...(input.MaxDurationInSeconds != null && { MaxDurationInSeconds: input.MaxDurationInSeconds }), - }; -}; - -/** - * serializeAws_json1_1StreamProcessorDataSharingPreference - */ -const se_StreamProcessorDataSharingPreference = ( - input: StreamProcessorDataSharingPreference, - context: __SerdeContext -): any => { - return { - ...(input.OptIn != null && { OptIn: input.OptIn }), - }; -}; - -/** - * serializeAws_json1_1StreamProcessorInput - */ -const se_StreamProcessorInput = (input: StreamProcessorInput, context: __SerdeContext): any => { - return { - ...(input.KinesisVideoStream != null && { - KinesisVideoStream: se_KinesisVideoStream(input.KinesisVideoStream, context), - }), - }; -}; - -/** - * serializeAws_json1_1StreamProcessorNotificationChannel - */ -const se_StreamProcessorNotificationChannel = ( - input: StreamProcessorNotificationChannel, - context: __SerdeContext -): any => { - return { - ...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }), - }; + return se_Point(entry, context); + }); }; -/** - * serializeAws_json1_1StreamProcessorOutput - */ -const se_StreamProcessorOutput = (input: StreamProcessorOutput, context: __SerdeContext): any => { - return { - ...(input.KinesisDataStream != null && { - KinesisDataStream: se_KinesisDataStream(input.KinesisDataStream, context), - }), - ...(input.S3Destination != null && { S3Destination: se_S3Destination(input.S3Destination, context) }), - }; -}; +// se_ProjectNames omitted. /** - * serializeAws_json1_1StreamProcessorParametersToDelete + * serializeAws_json1_1ProtectiveEquipmentSummarizationAttributes */ -const se_StreamProcessorParametersToDelete = ( - input: (StreamProcessorParameterToDelete | string)[], +const se_ProtectiveEquipmentSummarizationAttributes = ( + input: ProtectiveEquipmentSummarizationAttributes, context: __SerdeContext ): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return take(input, { + MinConfidence: __serializeFloat, + RequiredEquipmentTypes: _json, + }); }; +// se_ProtectiveEquipmentTypes omitted. + +// se_PutProjectPolicyRequest omitted. + /** - * serializeAws_json1_1StreamProcessorSettings + * serializeAws_json1_1RecognizeCelebritiesRequest */ -const se_StreamProcessorSettings = (input: StreamProcessorSettings, context: __SerdeContext): any => { - return { - ...(input.ConnectedHome != null && { ConnectedHome: se_ConnectedHomeSettings(input.ConnectedHome, context) }), - ...(input.FaceSearch != null && { FaceSearch: se_FaceSearchSettings(input.FaceSearch, context) }), - }; +const se_RecognizeCelebritiesRequest = (input: RecognizeCelebritiesRequest, context: __SerdeContext): any => { + return take(input, { + Image: (_) => se_Image(_, context), + }); }; /** - * serializeAws_json1_1StreamProcessorSettingsForUpdate + * serializeAws_json1_1RegionOfInterest */ -const se_StreamProcessorSettingsForUpdate = (input: StreamProcessorSettingsForUpdate, context: __SerdeContext): any => { - return { - ...(input.ConnectedHomeForUpdate != null && { - ConnectedHomeForUpdate: se_ConnectedHomeSettingsForUpdate(input.ConnectedHomeForUpdate, context), - }), - }; +const se_RegionOfInterest = (input: RegionOfInterest, context: __SerdeContext): any => { + return take(input, { + BoundingBox: (_) => se_BoundingBox(_, context), + Polygon: (_) => se_Polygon(_, context), + }); }; /** - * serializeAws_json1_1TagKeyList + * serializeAws_json1_1RegionsOfInterest */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { +const se_RegionsOfInterest = (input: RegionOfInterest[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_RegionOfInterest(entry, context); }); }; +// se_S3Destination omitted. + +// se_S3Object omitted. + /** - * serializeAws_json1_1TagMap + * serializeAws_json1_1SearchFacesByImageRequest */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); +const se_SearchFacesByImageRequest = (input: SearchFacesByImageRequest, context: __SerdeContext): any => { + return take(input, { + CollectionId: [], + FaceMatchThreshold: __serializeFloat, + Image: (_) => se_Image(_, context), + MaxFaces: [], + QualityFilter: [], + }); }; /** - * serializeAws_json1_1TagResourceRequest + * serializeAws_json1_1SearchFacesRequest */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; +const se_SearchFacesRequest = (input: SearchFacesRequest, context: __SerdeContext): any => { + return take(input, { + CollectionId: [], + FaceId: [], + FaceMatchThreshold: __serializeFloat, + MaxFaces: [], + }); }; +// se_SegmentTypes omitted. + +// se_StartCelebrityRecognitionRequest omitted. + /** - * serializeAws_json1_1TestingData + * serializeAws_json1_1StartContentModerationRequest */ -const se_TestingData = (input: TestingData, context: __SerdeContext): any => { - return { - ...(input.Assets != null && { Assets: se_Assets(input.Assets, context) }), - ...(input.AutoCreate != null && { AutoCreate: input.AutoCreate }), - }; +const se_StartContentModerationRequest = (input: StartContentModerationRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [], + JobTag: [], + MinConfidence: __serializeFloat, + NotificationChannel: _json, + Video: _json, + }); }; +// se_StartFaceDetectionRequest omitted. + /** - * serializeAws_json1_1TrainingData + * serializeAws_json1_1StartFaceSearchRequest */ -const se_TrainingData = (input: TrainingData, context: __SerdeContext): any => { - return { - ...(input.Assets != null && { Assets: se_Assets(input.Assets, context) }), - }; +const se_StartFaceSearchRequest = (input: StartFaceSearchRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [], + CollectionId: [], + FaceMatchThreshold: __serializeFloat, + JobTag: [], + NotificationChannel: _json, + Video: _json, + }); }; /** - * serializeAws_json1_1UntagResourceRequest + * serializeAws_json1_1StartLabelDetectionRequest */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; +const se_StartLabelDetectionRequest = (input: StartLabelDetectionRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [], + Features: _json, + JobTag: [], + MinConfidence: __serializeFloat, + NotificationChannel: _json, + Settings: _json, + Video: _json, + }); }; +// se_StartPersonTrackingRequest omitted. + +// se_StartProjectVersionRequest omitted. + /** - * serializeAws_json1_1UpdateDatasetEntriesRequest + * serializeAws_json1_1StartSegmentDetectionFilters */ -const se_UpdateDatasetEntriesRequest = (input: UpdateDatasetEntriesRequest, context: __SerdeContext): any => { - return { - ...(input.Changes != null && { Changes: se_DatasetChanges(input.Changes, context) }), - ...(input.DatasetArn != null && { DatasetArn: input.DatasetArn }), - }; +const se_StartSegmentDetectionFilters = (input: StartSegmentDetectionFilters, context: __SerdeContext): any => { + return take(input, { + ShotFilter: (_) => se_StartShotDetectionFilter(_, context), + TechnicalCueFilter: (_) => se_StartTechnicalCueDetectionFilter(_, context), + }); }; /** - * serializeAws_json1_1UpdateStreamProcessorRequest + * serializeAws_json1_1StartSegmentDetectionRequest */ -const se_UpdateStreamProcessorRequest = (input: UpdateStreamProcessorRequest, context: __SerdeContext): any => { - return { - ...(input.DataSharingPreferenceForUpdate != null && { - DataSharingPreferenceForUpdate: se_StreamProcessorDataSharingPreference( - input.DataSharingPreferenceForUpdate, - context - ), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParametersToDelete != null && { - ParametersToDelete: se_StreamProcessorParametersToDelete(input.ParametersToDelete, context), - }), - ...(input.RegionsOfInterestForUpdate != null && { - RegionsOfInterestForUpdate: se_RegionsOfInterest(input.RegionsOfInterestForUpdate, context), - }), - ...(input.SettingsForUpdate != null && { - SettingsForUpdate: se_StreamProcessorSettingsForUpdate(input.SettingsForUpdate, context), - }), - }; +const se_StartSegmentDetectionRequest = (input: StartSegmentDetectionRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [], + Filters: (_) => se_StartSegmentDetectionFilters(_, context), + JobTag: [], + NotificationChannel: _json, + SegmentTypes: _json, + Video: _json, + }); }; /** - * serializeAws_json1_1VersionNames + * serializeAws_json1_1StartShotDetectionFilter */ -const se_VersionNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_StartShotDetectionFilter = (input: StartShotDetectionFilter, context: __SerdeContext): any => { + return take(input, { + MinSegmentConfidence: __serializeFloat, + }); }; +// se_StartStreamProcessorRequest omitted. + /** - * serializeAws_json1_1Video + * serializeAws_json1_1StartTechnicalCueDetectionFilter */ -const se_Video = (input: Video, context: __SerdeContext): any => { - return { - ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }), - }; +const se_StartTechnicalCueDetectionFilter = (input: StartTechnicalCueDetectionFilter, context: __SerdeContext): any => { + return take(input, { + BlackFrame: (_) => se_BlackFrame(_, context), + MinSegmentConfidence: __serializeFloat, + }); }; /** - * deserializeAws_json1_1AccessDeniedException + * serializeAws_json1_1StartTextDetectionFilters */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; +const se_StartTextDetectionFilters = (input: StartTextDetectionFilters, context: __SerdeContext): any => { + return take(input, { + RegionsOfInterest: (_) => se_RegionsOfInterest(_, context), + WordFilter: (_) => se_DetectionFilter(_, context), + }); }; /** - * deserializeAws_json1_1AgeRange + * serializeAws_json1_1StartTextDetectionRequest */ -const de_AgeRange = (output: any, context: __SerdeContext): AgeRange => { - return { - High: __expectInt32(output.High), - Low: __expectInt32(output.Low), - } as any; +const se_StartTextDetectionRequest = (input: StartTextDetectionRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [], + Filters: (_) => se_StartTextDetectionFilters(_, context), + JobTag: [], + NotificationChannel: _json, + Video: _json, + }); }; +// se_StopProjectVersionRequest omitted. + +// se_StopStreamProcessorRequest omitted. + +// se_StreamProcessingStartSelector omitted. + +// se_StreamProcessingStopSelector omitted. + +// se_StreamProcessorDataSharingPreference omitted. + +// se_StreamProcessorInput omitted. + +// se_StreamProcessorNotificationChannel omitted. + +// se_StreamProcessorOutput omitted. + +// se_StreamProcessorParametersToDelete omitted. + /** - * deserializeAws_json1_1Asset + * serializeAws_json1_1StreamProcessorSettings */ -const de_Asset = (output: any, context: __SerdeContext): Asset => { - return { - GroundTruthManifest: - output.GroundTruthManifest != null ? de_GroundTruthManifest(output.GroundTruthManifest, context) : undefined, - } as any; +const se_StreamProcessorSettings = (input: StreamProcessorSettings, context: __SerdeContext): any => { + return take(input, { + ConnectedHome: (_) => se_ConnectedHomeSettings(_, context), + FaceSearch: (_) => se_FaceSearchSettings(_, context), + }); }; /** - * deserializeAws_json1_1Assets + * serializeAws_json1_1StreamProcessorSettingsForUpdate */ -const de_Assets = (output: any, context: __SerdeContext): Asset[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Asset(entry, context); - }); - return retVal; +const se_StreamProcessorSettingsForUpdate = (input: StreamProcessorSettingsForUpdate, context: __SerdeContext): any => { + return take(input, { + ConnectedHomeForUpdate: (_) => se_ConnectedHomeSettingsForUpdate(_, context), + }); }; +// se_TagKeyList omitted. + +// se_TagMap omitted. + +// se_TagResourceRequest omitted. + +// se_TestingData omitted. + +// se_TrainingData omitted. + +// se_UntagResourceRequest omitted. + /** - * deserializeAws_json1_1AudioMetadata + * serializeAws_json1_1UpdateDatasetEntriesRequest */ -const de_AudioMetadata = (output: any, context: __SerdeContext): AudioMetadata => { - return { - Codec: __expectString(output.Codec), - DurationMillis: __expectLong(output.DurationMillis), - NumberOfChannels: __expectLong(output.NumberOfChannels), - SampleRate: __expectLong(output.SampleRate), - } as any; +const se_UpdateDatasetEntriesRequest = (input: UpdateDatasetEntriesRequest, context: __SerdeContext): any => { + return take(input, { + Changes: (_) => se_DatasetChanges(_, context), + DatasetArn: [], + }); }; /** - * deserializeAws_json1_1AudioMetadataList + * serializeAws_json1_1UpdateStreamProcessorRequest */ -const de_AudioMetadataList = (output: any, context: __SerdeContext): AudioMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AudioMetadata(entry, context); - }); - return retVal; +const se_UpdateStreamProcessorRequest = (input: UpdateStreamProcessorRequest, context: __SerdeContext): any => { + return take(input, { + DataSharingPreferenceForUpdate: _json, + Name: [], + ParametersToDelete: _json, + RegionsOfInterestForUpdate: (_) => se_RegionsOfInterest(_, context), + SettingsForUpdate: (_) => se_StreamProcessorSettingsForUpdate(_, context), + }); }; +// se_VersionNames omitted. + +// se_Video omitted. + +// de_AccessDeniedException omitted. + +// de_AgeRange omitted. + +// de_Asset omitted. + +// de_Assets omitted. + +// de_AudioMetadata omitted. + +// de_AudioMetadataList omitted. + /** * deserializeAws_json1_1AuditImage */ const de_AuditImage = (output: any, context: __SerdeContext): AuditImage => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Bytes: output.Bytes != null ? context.base64Decoder(output.Bytes) : undefined, - S3Object: output.S3Object != null ? de_S3Object(output.S3Object, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Bytes: context.base64Decoder, + S3Object: _json, + }) as any; }; /** @@ -7546,9 +6503,6 @@ const de_AuditImages = (output: any, context: __SerdeContext): AuditImage[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AuditImage(entry, context); }); return retVal; @@ -7558,10 +6512,10 @@ const de_AuditImages = (output: any, context: __SerdeContext): AuditImage[] => { * deserializeAws_json1_1Beard */ const de_Beard = (output: any, context: __SerdeContext): Beard => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; /** @@ -7571,9 +6525,6 @@ const de_BodyParts = (output: any, context: __SerdeContext): ProtectiveEquipment const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProtectiveEquipmentBodyPart(entry, context); }); return retVal; @@ -7583,41 +6534,41 @@ const de_BodyParts = (output: any, context: __SerdeContext): ProtectiveEquipment * deserializeAws_json1_1BoundingBox */ const de_BoundingBox = (output: any, context: __SerdeContext): BoundingBox => { - return { - Height: __limitedParseFloat32(output.Height), - Left: __limitedParseFloat32(output.Left), - Top: __limitedParseFloat32(output.Top), - Width: __limitedParseFloat32(output.Width), - } as any; + return take(output, { + Height: __limitedParseFloat32, + Left: __limitedParseFloat32, + Top: __limitedParseFloat32, + Width: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1Celebrity */ const de_Celebrity = (output: any, context: __SerdeContext): Celebrity => { - return { - Face: output.Face != null ? de_ComparedFace(output.Face, context) : undefined, - Id: __expectString(output.Id), - KnownGender: output.KnownGender != null ? de_KnownGender(output.KnownGender, context) : undefined, - MatchConfidence: __limitedParseFloat32(output.MatchConfidence), - Name: __expectString(output.Name), - Urls: output.Urls != null ? de_Urls(output.Urls, context) : undefined, - } as any; + return take(output, { + Face: (_: any) => de_ComparedFace(_, context), + Id: __expectString, + KnownGender: _json, + MatchConfidence: __limitedParseFloat32, + Name: __expectString, + Urls: _json, + }) as any; }; /** * deserializeAws_json1_1CelebrityDetail */ const de_CelebrityDetail = (output: any, context: __SerdeContext): CelebrityDetail => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - Face: output.Face != null ? de_FaceDetail(output.Face, context) : undefined, - Id: __expectString(output.Id), - KnownGender: output.KnownGender != null ? de_KnownGender(output.KnownGender, context) : undefined, - Name: __expectString(output.Name), - Urls: output.Urls != null ? de_Urls(output.Urls, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + Face: (_: any) => de_FaceDetail(_, context), + Id: __expectString, + KnownGender: _json, + Name: __expectString, + Urls: _json, + }) as any; }; /** @@ -7627,9 +6578,6 @@ const de_CelebrityList = (output: any, context: __SerdeContext): Celebrity[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Celebrity(entry, context); }); return retVal; @@ -7639,10 +6587,10 @@ const de_CelebrityList = (output: any, context: __SerdeContext): Celebrity[] => * deserializeAws_json1_1CelebrityRecognition */ const de_CelebrityRecognition = (output: any, context: __SerdeContext): CelebrityRecognition => { - return { - Celebrity: output.Celebrity != null ? de_CelebrityDetail(output.Celebrity, context) : undefined, - Timestamp: __expectLong(output.Timestamp), - } as any; + return take(output, { + Celebrity: (_: any) => de_CelebrityDetail(_, context), + Timestamp: __expectLong, + }) as any; }; /** @@ -7652,42 +6600,26 @@ const de_CelebrityRecognitions = (output: any, context: __SerdeContext): Celebri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CelebrityRecognition(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CollectionIdList - */ -const de_CollectionIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CollectionIdList omitted. /** * deserializeAws_json1_1ComparedFace */ const de_ComparedFace = (output: any, context: __SerdeContext): ComparedFace => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - Emotions: output.Emotions != null ? de_Emotions(output.Emotions, context) : undefined, - Landmarks: output.Landmarks != null ? de_Landmarks(output.Landmarks, context) : undefined, - Pose: output.Pose != null ? de_Pose(output.Pose, context) : undefined, - Quality: output.Quality != null ? de_ImageQuality(output.Quality, context) : undefined, - Smile: output.Smile != null ? de_Smile(output.Smile, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + Emotions: (_: any) => de_Emotions(_, context), + Landmarks: (_: any) => de_Landmarks(_, context), + Pose: (_: any) => de_Pose(_, context), + Quality: (_: any) => de_ImageQuality(_, context), + Smile: (_: any) => de_Smile(_, context), + }) as any; }; /** @@ -7697,9 +6629,6 @@ const de_ComparedFaceList = (output: any, context: __SerdeContext): ComparedFace const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComparedFace(entry, context); }); return retVal; @@ -7709,20 +6638,20 @@ const de_ComparedFaceList = (output: any, context: __SerdeContext): ComparedFace * deserializeAws_json1_1ComparedSourceImageFace */ const de_ComparedSourceImageFace = (output: any, context: __SerdeContext): ComparedSourceImageFace => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1CompareFacesMatch */ const de_CompareFacesMatch = (output: any, context: __SerdeContext): CompareFacesMatch => { - return { - Face: output.Face != null ? de_ComparedFace(output.Face, context) : undefined, - Similarity: __limitedParseFloat32(output.Similarity), - } as any; + return take(output, { + Face: (_: any) => de_ComparedFace(_, context), + Similarity: __limitedParseFloat32, + }) as any; }; /** @@ -7732,9 +6661,6 @@ const de_CompareFacesMatchList = (output: any, context: __SerdeContext): Compare const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CompareFacesMatch(entry, context); }); return retVal; @@ -7744,15 +6670,13 @@ const de_CompareFacesMatchList = (output: any, context: __SerdeContext): Compare * deserializeAws_json1_1CompareFacesResponse */ const de_CompareFacesResponse = (output: any, context: __SerdeContext): CompareFacesResponse => { - return { - FaceMatches: output.FaceMatches != null ? de_CompareFacesMatchList(output.FaceMatches, context) : undefined, - SourceImageFace: - output.SourceImageFace != null ? de_ComparedSourceImageFace(output.SourceImageFace, context) : undefined, - SourceImageOrientationCorrection: __expectString(output.SourceImageOrientationCorrection), - TargetImageOrientationCorrection: __expectString(output.TargetImageOrientationCorrection), - UnmatchedFaces: - output.UnmatchedFaces != null ? de_CompareFacesUnmatchList(output.UnmatchedFaces, context) : undefined, - } as any; + return take(output, { + FaceMatches: (_: any) => de_CompareFacesMatchList(_, context), + SourceImageFace: (_: any) => de_ComparedSourceImageFace(_, context), + SourceImageOrientationCorrection: __expectString, + TargetImageOrientationCorrection: __expectString, + UnmatchedFaces: (_: any) => de_CompareFacesUnmatchList(_, context), + }) as any; }; /** @@ -7762,253 +6686,126 @@ const de_CompareFacesUnmatchList = (output: any, context: __SerdeContext): Compa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComparedFace(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ConnectedHomeLabels - */ -const de_ConnectedHomeLabels = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ConnectedHomeLabels omitted. /** * deserializeAws_json1_1ConnectedHomeSettings */ const de_ConnectedHomeSettings = (output: any, context: __SerdeContext): ConnectedHomeSettings => { - return { - Labels: output.Labels != null ? de_ConnectedHomeLabels(output.Labels, context) : undefined, - MinConfidence: __limitedParseFloat32(output.MinConfidence), - } as any; -}; - -/** - * deserializeAws_json1_1ContentModerationDetection - */ -const de_ContentModerationDetection = (output: any, context: __SerdeContext): ContentModerationDetection => { - return { - ModerationLabel: output.ModerationLabel != null ? de_ModerationLabel(output.ModerationLabel, context) : undefined, - Timestamp: __expectLong(output.Timestamp), - } as any; -}; - -/** - * deserializeAws_json1_1ContentModerationDetections - */ -const de_ContentModerationDetections = (output: any, context: __SerdeContext): ContentModerationDetection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContentModerationDetection(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CopyProjectVersionResponse - */ -const de_CopyProjectVersionResponse = (output: any, context: __SerdeContext): CopyProjectVersionResponse => { - return { - ProjectVersionArn: __expectString(output.ProjectVersionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CoversBodyPart - */ -const de_CoversBodyPart = (output: any, context: __SerdeContext): CoversBodyPart => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1CreateCollectionResponse - */ -const de_CreateCollectionResponse = (output: any, context: __SerdeContext): CreateCollectionResponse => { - return { - CollectionArn: __expectString(output.CollectionArn), - FaceModelVersion: __expectString(output.FaceModelVersion), - StatusCode: __expectInt32(output.StatusCode), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDatasetResponse - */ -const de_CreateDatasetResponse = (output: any, context: __SerdeContext): CreateDatasetResponse => { - return { - DatasetArn: __expectString(output.DatasetArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateFaceLivenessSessionResponse - */ -const de_CreateFaceLivenessSessionResponse = ( - output: any, - context: __SerdeContext -): CreateFaceLivenessSessionResponse => { - return { - SessionId: __expectString(output.SessionId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProjectResponse - */ -const de_CreateProjectResponse = (output: any, context: __SerdeContext): CreateProjectResponse => { - return { - ProjectArn: __expectString(output.ProjectArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProjectVersionResponse - */ -const de_CreateProjectVersionResponse = (output: any, context: __SerdeContext): CreateProjectVersionResponse => { - return { - ProjectVersionArn: __expectString(output.ProjectVersionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateStreamProcessorResponse - */ -const de_CreateStreamProcessorResponse = (output: any, context: __SerdeContext): CreateStreamProcessorResponse => { - return { - StreamProcessorArn: __expectString(output.StreamProcessorArn), - } as any; -}; - -/** - * deserializeAws_json1_1CustomLabel - */ -const de_CustomLabel = (output: any, context: __SerdeContext): CustomLabel => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CustomLabels - */ -const de_CustomLabels = (output: any, context: __SerdeContext): CustomLabel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomLabel(entry, context); - }); - return retVal; + return take(output, { + Labels: _json, + MinConfidence: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_1DatasetDescription + * deserializeAws_json1_1ContentModerationDetection */ -const de_DatasetDescription = (output: any, context: __SerdeContext): DatasetDescription => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - DatasetStats: output.DatasetStats != null ? de_DatasetStats(output.DatasetStats, context) : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - StatusMessageCode: __expectString(output.StatusMessageCode), - } as any; +const de_ContentModerationDetection = (output: any, context: __SerdeContext): ContentModerationDetection => { + return take(output, { + ModerationLabel: (_: any) => de_ModerationLabel(_, context), + Timestamp: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1DatasetEntries + * deserializeAws_json1_1ContentModerationDetections */ -const de_DatasetEntries = (output: any, context: __SerdeContext): string[] => { +const de_ContentModerationDetections = (output: any, context: __SerdeContext): ContentModerationDetection[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ContentModerationDetection(entry, context); }); return retVal; }; +// de_CopyProjectVersionResponse omitted. + /** - * deserializeAws_json1_1DatasetLabelDescription + * deserializeAws_json1_1CoversBodyPart */ -const de_DatasetLabelDescription = (output: any, context: __SerdeContext): DatasetLabelDescription => { - return { - LabelName: __expectString(output.LabelName), - LabelStats: output.LabelStats != null ? de_DatasetLabelStats(output.LabelStats, context) : undefined, - } as any; +const de_CoversBodyPart = (output: any, context: __SerdeContext): CoversBodyPart => { + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; +}; + +// de_CreateCollectionResponse omitted. + +// de_CreateDatasetResponse omitted. + +// de_CreateFaceLivenessSessionResponse omitted. + +// de_CreateProjectResponse omitted. + +// de_CreateProjectVersionResponse omitted. + +// de_CreateStreamProcessorResponse omitted. + +/** + * deserializeAws_json1_1CustomLabel + */ +const de_CustomLabel = (output: any, context: __SerdeContext): CustomLabel => { + return take(output, { + Confidence: __limitedParseFloat32, + Geometry: (_: any) => de_Geometry(_, context), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1DatasetLabelDescriptions + * deserializeAws_json1_1CustomLabels */ -const de_DatasetLabelDescriptions = (output: any, context: __SerdeContext): DatasetLabelDescription[] => { +const de_CustomLabels = (output: any, context: __SerdeContext): CustomLabel[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatasetLabelDescription(entry, context); + return de_CustomLabel(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1DatasetLabelStats + * deserializeAws_json1_1DatasetDescription */ -const de_DatasetLabelStats = (output: any, context: __SerdeContext): DatasetLabelStats => { - return { - BoundingBoxCount: __expectInt32(output.BoundingBoxCount), - EntryCount: __expectInt32(output.EntryCount), - } as any; +const de_DatasetDescription = (output: any, context: __SerdeContext): DatasetDescription => { + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetStats: _json, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + StatusMessageCode: __expectString, + }) as any; }; +// de_DatasetEntries omitted. + +// de_DatasetLabelDescription omitted. + +// de_DatasetLabelDescriptions omitted. + +// de_DatasetLabelStats omitted. + /** * deserializeAws_json1_1DatasetMetadata */ const de_DatasetMetadata = (output: any, context: __SerdeContext): DatasetMetadata => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - DatasetArn: __expectString(output.DatasetArn), - DatasetType: __expectString(output.DatasetType), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - StatusMessageCode: __expectString(output.StatusMessageCode), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatasetArn: __expectString, + DatasetType: __expectString, + Status: __expectString, + StatusMessage: __expectString, + StatusMessageCode: __expectString, + }) as any; }; /** @@ -8018,255 +6815,173 @@ const de_DatasetMetadataList = (output: any, context: __SerdeContext): DatasetMe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DatasetMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DatasetStats - */ -const de_DatasetStats = (output: any, context: __SerdeContext): DatasetStats => { - return { - ErrorEntries: __expectInt32(output.ErrorEntries), - LabeledEntries: __expectInt32(output.LabeledEntries), - TotalEntries: __expectInt32(output.TotalEntries), - TotalLabels: __expectInt32(output.TotalLabels), - } as any; -}; +// de_DatasetStats omitted. -/** - * deserializeAws_json1_1DeleteCollectionResponse - */ -const de_DeleteCollectionResponse = (output: any, context: __SerdeContext): DeleteCollectionResponse => { - return { - StatusCode: __expectInt32(output.StatusCode), - } as any; -}; +// de_DeleteCollectionResponse omitted. -/** - * deserializeAws_json1_1DeleteDatasetResponse - */ -const de_DeleteDatasetResponse = (output: any, context: __SerdeContext): DeleteDatasetResponse => { - return {} as any; -}; +// de_DeleteDatasetResponse omitted. -/** - * deserializeAws_json1_1DeleteFacesResponse - */ -const de_DeleteFacesResponse = (output: any, context: __SerdeContext): DeleteFacesResponse => { - return { - DeletedFaces: output.DeletedFaces != null ? de_FaceIdList(output.DeletedFaces, context) : undefined, - } as any; -}; +// de_DeleteFacesResponse omitted. -/** - * deserializeAws_json1_1DeleteProjectPolicyResponse - */ -const de_DeleteProjectPolicyResponse = (output: any, context: __SerdeContext): DeleteProjectPolicyResponse => { - return {} as any; -}; +// de_DeleteProjectPolicyResponse omitted. -/** - * deserializeAws_json1_1DeleteProjectResponse - */ -const de_DeleteProjectResponse = (output: any, context: __SerdeContext): DeleteProjectResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteProjectResponse omitted. -/** - * deserializeAws_json1_1DeleteProjectVersionResponse - */ -const de_DeleteProjectVersionResponse = (output: any, context: __SerdeContext): DeleteProjectVersionResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteProjectVersionResponse omitted. -/** - * deserializeAws_json1_1DeleteStreamProcessorResponse - */ -const de_DeleteStreamProcessorResponse = (output: any, context: __SerdeContext): DeleteStreamProcessorResponse => { - return {} as any; -}; +// de_DeleteStreamProcessorResponse omitted. /** * deserializeAws_json1_1DescribeCollectionResponse */ const de_DescribeCollectionResponse = (output: any, context: __SerdeContext): DescribeCollectionResponse => { - return { - CollectionARN: __expectString(output.CollectionARN), - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - FaceCount: __expectLong(output.FaceCount), - FaceModelVersion: __expectString(output.FaceModelVersion), - } as any; + return take(output, { + CollectionARN: __expectString, + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FaceCount: __expectLong, + FaceModelVersion: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeDatasetResponse */ const de_DescribeDatasetResponse = (output: any, context: __SerdeContext): DescribeDatasetResponse => { - return { - DatasetDescription: - output.DatasetDescription != null ? de_DatasetDescription(output.DatasetDescription, context) : undefined, - } as any; + return take(output, { + DatasetDescription: (_: any) => de_DatasetDescription(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeProjectsResponse */ const de_DescribeProjectsResponse = (output: any, context: __SerdeContext): DescribeProjectsResponse => { - return { - NextToken: __expectString(output.NextToken), - ProjectDescriptions: - output.ProjectDescriptions != null ? de_ProjectDescriptions(output.ProjectDescriptions, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ProjectDescriptions: (_: any) => de_ProjectDescriptions(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeProjectVersionsResponse */ const de_DescribeProjectVersionsResponse = (output: any, context: __SerdeContext): DescribeProjectVersionsResponse => { - return { - NextToken: __expectString(output.NextToken), - ProjectVersionDescriptions: - output.ProjectVersionDescriptions != null - ? de_ProjectVersionDescriptions(output.ProjectVersionDescriptions, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ProjectVersionDescriptions: (_: any) => de_ProjectVersionDescriptions(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeStreamProcessorResponse */ const de_DescribeStreamProcessorResponse = (output: any, context: __SerdeContext): DescribeStreamProcessorResponse => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - DataSharingPreference: - output.DataSharingPreference != null - ? de_StreamProcessorDataSharingPreference(output.DataSharingPreference, context) - : undefined, - Input: output.Input != null ? de_StreamProcessorInput(output.Input, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - Name: __expectString(output.Name), - NotificationChannel: - output.NotificationChannel != null - ? de_StreamProcessorNotificationChannel(output.NotificationChannel, context) - : undefined, - Output: output.Output != null ? de_StreamProcessorOutput(output.Output, context) : undefined, - RegionsOfInterest: - output.RegionsOfInterest != null ? de_RegionsOfInterest(output.RegionsOfInterest, context) : undefined, - RoleArn: __expectString(output.RoleArn), - Settings: output.Settings != null ? de_StreamProcessorSettings(output.Settings, context) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - StreamProcessorArn: __expectString(output.StreamProcessorArn), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSharingPreference: _json, + Input: _json, + KmsKeyId: __expectString, + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NotificationChannel: _json, + Output: _json, + RegionsOfInterest: (_: any) => de_RegionsOfInterest(_, context), + RoleArn: __expectString, + Settings: (_: any) => de_StreamProcessorSettings(_, context), + Status: __expectString, + StatusMessage: __expectString, + StreamProcessorArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1DetectCustomLabelsResponse */ const de_DetectCustomLabelsResponse = (output: any, context: __SerdeContext): DetectCustomLabelsResponse => { - return { - CustomLabels: output.CustomLabels != null ? de_CustomLabels(output.CustomLabels, context) : undefined, - } as any; + return take(output, { + CustomLabels: (_: any) => de_CustomLabels(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectFacesResponse */ const de_DetectFacesResponse = (output: any, context: __SerdeContext): DetectFacesResponse => { - return { - FaceDetails: output.FaceDetails != null ? de_FaceDetailList(output.FaceDetails, context) : undefined, - OrientationCorrection: __expectString(output.OrientationCorrection), - } as any; + return take(output, { + FaceDetails: (_: any) => de_FaceDetailList(_, context), + OrientationCorrection: __expectString, + }) as any; }; /** * deserializeAws_json1_1DetectLabelsImageBackground */ const de_DetectLabelsImageBackground = (output: any, context: __SerdeContext): DetectLabelsImageBackground => { - return { - DominantColors: output.DominantColors != null ? de_DominantColors(output.DominantColors, context) : undefined, - Quality: output.Quality != null ? de_DetectLabelsImageQuality(output.Quality, context) : undefined, - } as any; + return take(output, { + DominantColors: (_: any) => de_DominantColors(_, context), + Quality: (_: any) => de_DetectLabelsImageQuality(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectLabelsImageForeground */ const de_DetectLabelsImageForeground = (output: any, context: __SerdeContext): DetectLabelsImageForeground => { - return { - DominantColors: output.DominantColors != null ? de_DominantColors(output.DominantColors, context) : undefined, - Quality: output.Quality != null ? de_DetectLabelsImageQuality(output.Quality, context) : undefined, - } as any; + return take(output, { + DominantColors: (_: any) => de_DominantColors(_, context), + Quality: (_: any) => de_DetectLabelsImageQuality(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectLabelsImageProperties */ const de_DetectLabelsImageProperties = (output: any, context: __SerdeContext): DetectLabelsImageProperties => { - return { - Background: output.Background != null ? de_DetectLabelsImageBackground(output.Background, context) : undefined, - DominantColors: output.DominantColors != null ? de_DominantColors(output.DominantColors, context) : undefined, - Foreground: output.Foreground != null ? de_DetectLabelsImageForeground(output.Foreground, context) : undefined, - Quality: output.Quality != null ? de_DetectLabelsImageQuality(output.Quality, context) : undefined, - } as any; + return take(output, { + Background: (_: any) => de_DetectLabelsImageBackground(_, context), + DominantColors: (_: any) => de_DominantColors(_, context), + Foreground: (_: any) => de_DetectLabelsImageForeground(_, context), + Quality: (_: any) => de_DetectLabelsImageQuality(_, context), + }) as any; }; /** * deserializeAws_json1_1DetectLabelsImageQuality */ const de_DetectLabelsImageQuality = (output: any, context: __SerdeContext): DetectLabelsImageQuality => { - return { - Brightness: __limitedParseFloat32(output.Brightness), - Contrast: __limitedParseFloat32(output.Contrast), - Sharpness: __limitedParseFloat32(output.Sharpness), - } as any; + return take(output, { + Brightness: __limitedParseFloat32, + Contrast: __limitedParseFloat32, + Sharpness: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1DetectLabelsResponse */ const de_DetectLabelsResponse = (output: any, context: __SerdeContext): DetectLabelsResponse => { - return { - ImageProperties: - output.ImageProperties != null ? de_DetectLabelsImageProperties(output.ImageProperties, context) : undefined, - LabelModelVersion: __expectString(output.LabelModelVersion), - Labels: output.Labels != null ? de_Labels(output.Labels, context) : undefined, - OrientationCorrection: __expectString(output.OrientationCorrection), - } as any; + return take(output, { + ImageProperties: (_: any) => de_DetectLabelsImageProperties(_, context), + LabelModelVersion: __expectString, + Labels: (_: any) => de_Labels(_, context), + OrientationCorrection: __expectString, + }) as any; }; /** * deserializeAws_json1_1DetectModerationLabelsResponse */ const de_DetectModerationLabelsResponse = (output: any, context: __SerdeContext): DetectModerationLabelsResponse => { - return { - HumanLoopActivationOutput: - output.HumanLoopActivationOutput != null - ? de_HumanLoopActivationOutput(output.HumanLoopActivationOutput, context) - : undefined, - ModerationLabels: - output.ModerationLabels != null ? de_ModerationLabels(output.ModerationLabels, context) : undefined, - ModerationModelVersion: __expectString(output.ModerationModelVersion), - } as any; + return take(output, { + HumanLoopActivationOutput: (_: any) => de_HumanLoopActivationOutput(_, context), + ModerationLabels: (_: any) => de_ModerationLabels(_, context), + ModerationModelVersion: __expectString, + }) as any; }; /** @@ -8276,46 +6991,38 @@ const de_DetectProtectiveEquipmentResponse = ( output: any, context: __SerdeContext ): DetectProtectiveEquipmentResponse => { - return { - Persons: output.Persons != null ? de_ProtectiveEquipmentPersons(output.Persons, context) : undefined, - ProtectiveEquipmentModelVersion: __expectString(output.ProtectiveEquipmentModelVersion), - Summary: output.Summary != null ? de_ProtectiveEquipmentSummary(output.Summary, context) : undefined, - } as any; + return take(output, { + Persons: (_: any) => de_ProtectiveEquipmentPersons(_, context), + ProtectiveEquipmentModelVersion: __expectString, + Summary: _json, + }) as any; }; /** * deserializeAws_json1_1DetectTextResponse */ const de_DetectTextResponse = (output: any, context: __SerdeContext): DetectTextResponse => { - return { - TextDetections: output.TextDetections != null ? de_TextDetectionList(output.TextDetections, context) : undefined, - TextModelVersion: __expectString(output.TextModelVersion), - } as any; + return take(output, { + TextDetections: (_: any) => de_TextDetectionList(_, context), + TextModelVersion: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DistributeDatasetEntriesResponse - */ -const de_DistributeDatasetEntriesResponse = ( - output: any, - context: __SerdeContext -): DistributeDatasetEntriesResponse => { - return {} as any; -}; +// de_DistributeDatasetEntriesResponse omitted. /** * deserializeAws_json1_1DominantColor */ const de_DominantColor = (output: any, context: __SerdeContext): DominantColor => { - return { - Blue: __expectInt32(output.Blue), - CSSColor: __expectString(output.CSSColor), - Green: __expectInt32(output.Green), - HexCode: __expectString(output.HexCode), - PixelPercent: __limitedParseFloat32(output.PixelPercent), - Red: __expectInt32(output.Red), - SimplifiedColor: __expectString(output.SimplifiedColor), - } as any; + return take(output, { + Blue: __expectInt32, + CSSColor: __expectString, + Green: __expectInt32, + HexCode: __expectString, + PixelPercent: __limitedParseFloat32, + Red: __expectInt32, + SimplifiedColor: __expectString, + }) as any; }; /** @@ -8325,9 +7032,6 @@ const de_DominantColors = (output: any, context: __SerdeContext): DominantColor[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DominantColor(entry, context); }); return retVal; @@ -8337,10 +7041,10 @@ const de_DominantColors = (output: any, context: __SerdeContext): DominantColor[ * deserializeAws_json1_1Emotion */ const de_Emotion = (output: any, context: __SerdeContext): Emotion => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Type: __expectString(output.Type), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Type: __expectString, + }) as any; }; /** @@ -8350,9 +7054,6 @@ const de_Emotions = (output: any, context: __SerdeContext): Emotion[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Emotion(entry, context); }); return retVal; @@ -8362,12 +7063,12 @@ const de_Emotions = (output: any, context: __SerdeContext): Emotion[] => { * deserializeAws_json1_1EquipmentDetection */ const de_EquipmentDetection = (output: any, context: __SerdeContext): EquipmentDetection => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - CoversBodyPart: output.CoversBodyPart != null ? de_CoversBodyPart(output.CoversBodyPart, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + CoversBodyPart: (_: any) => de_CoversBodyPart(_, context), + Type: __expectString, + }) as any; }; /** @@ -8377,9 +7078,6 @@ const de_EquipmentDetections = (output: any, context: __SerdeContext): Equipment const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EquipmentDetection(entry, context); }); return retVal; @@ -8389,67 +7087,67 @@ const de_EquipmentDetections = (output: any, context: __SerdeContext): Equipment * deserializeAws_json1_1EvaluationResult */ const de_EvaluationResult = (output: any, context: __SerdeContext): EvaluationResult => { - return { - F1Score: __limitedParseFloat32(output.F1Score), - Summary: output.Summary != null ? de_Summary(output.Summary, context) : undefined, - } as any; + return take(output, { + F1Score: __limitedParseFloat32, + Summary: _json, + }) as any; }; /** * deserializeAws_json1_1Eyeglasses */ const de_Eyeglasses = (output: any, context: __SerdeContext): Eyeglasses => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_1EyeOpen */ const de_EyeOpen = (output: any, context: __SerdeContext): EyeOpen => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_1Face */ const de_Face = (output: any, context: __SerdeContext): Face => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - ExternalImageId: __expectString(output.ExternalImageId), - FaceId: __expectString(output.FaceId), - ImageId: __expectString(output.ImageId), - IndexFacesModelVersion: __expectString(output.IndexFacesModelVersion), - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + ExternalImageId: __expectString, + FaceId: __expectString, + ImageId: __expectString, + IndexFacesModelVersion: __expectString, + }) as any; }; /** * deserializeAws_json1_1FaceDetail */ const de_FaceDetail = (output: any, context: __SerdeContext): FaceDetail => { - return { - AgeRange: output.AgeRange != null ? de_AgeRange(output.AgeRange, context) : undefined, - Beard: output.Beard != null ? de_Beard(output.Beard, context) : undefined, - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - Emotions: output.Emotions != null ? de_Emotions(output.Emotions, context) : undefined, - Eyeglasses: output.Eyeglasses != null ? de_Eyeglasses(output.Eyeglasses, context) : undefined, - EyesOpen: output.EyesOpen != null ? de_EyeOpen(output.EyesOpen, context) : undefined, - Gender: output.Gender != null ? de_Gender(output.Gender, context) : undefined, - Landmarks: output.Landmarks != null ? de_Landmarks(output.Landmarks, context) : undefined, - MouthOpen: output.MouthOpen != null ? de_MouthOpen(output.MouthOpen, context) : undefined, - Mustache: output.Mustache != null ? de_Mustache(output.Mustache, context) : undefined, - Pose: output.Pose != null ? de_Pose(output.Pose, context) : undefined, - Quality: output.Quality != null ? de_ImageQuality(output.Quality, context) : undefined, - Smile: output.Smile != null ? de_Smile(output.Smile, context) : undefined, - Sunglasses: output.Sunglasses != null ? de_Sunglasses(output.Sunglasses, context) : undefined, - } as any; + return take(output, { + AgeRange: _json, + Beard: (_: any) => de_Beard(_, context), + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + Emotions: (_: any) => de_Emotions(_, context), + Eyeglasses: (_: any) => de_Eyeglasses(_, context), + EyesOpen: (_: any) => de_EyeOpen(_, context), + Gender: (_: any) => de_Gender(_, context), + Landmarks: (_: any) => de_Landmarks(_, context), + MouthOpen: (_: any) => de_MouthOpen(_, context), + Mustache: (_: any) => de_Mustache(_, context), + Pose: (_: any) => de_Pose(_, context), + Quality: (_: any) => de_ImageQuality(_, context), + Smile: (_: any) => de_Smile(_, context), + Sunglasses: (_: any) => de_Sunglasses(_, context), + }) as any; }; /** @@ -8459,9 +7157,6 @@ const de_FaceDetailList = (output: any, context: __SerdeContext): FaceDetail[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FaceDetail(entry, context); }); return retVal; @@ -8471,10 +7166,10 @@ const de_FaceDetailList = (output: any, context: __SerdeContext): FaceDetail[] = * deserializeAws_json1_1FaceDetection */ const de_FaceDetection = (output: any, context: __SerdeContext): FaceDetection => { - return { - Face: output.Face != null ? de_FaceDetail(output.Face, context) : undefined, - Timestamp: __expectLong(output.Timestamp), - } as any; + return take(output, { + Face: (_: any) => de_FaceDetail(_, context), + Timestamp: __expectLong, + }) as any; }; /** @@ -8484,28 +7179,12 @@ const de_FaceDetections = (output: any, context: __SerdeContext): FaceDetection[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FaceDetection(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1FaceIdList - */ -const de_FaceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FaceIdList omitted. /** * deserializeAws_json1_1FaceList @@ -8514,9 +7193,6 @@ const de_FaceList = (output: any, context: __SerdeContext): Face[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Face(entry, context); }); return retVal; @@ -8526,10 +7202,10 @@ const de_FaceList = (output: any, context: __SerdeContext): Face[] => { * deserializeAws_json1_1FaceMatch */ const de_FaceMatch = (output: any, context: __SerdeContext): FaceMatch => { - return { - Face: output.Face != null ? de_Face(output.Face, context) : undefined, - Similarity: __limitedParseFloat32(output.Similarity), - } as any; + return take(output, { + Face: (_: any) => de_Face(_, context), + Similarity: __limitedParseFloat32, + }) as any; }; /** @@ -8539,37 +7215,21 @@ const de_FaceMatchList = (output: any, context: __SerdeContext): FaceMatch[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FaceMatch(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1FaceModelVersionList - */ -const de_FaceModelVersionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FaceModelVersionList omitted. /** * deserializeAws_json1_1FaceRecord */ const de_FaceRecord = (output: any, context: __SerdeContext): FaceRecord => { - return { - Face: output.Face != null ? de_Face(output.Face, context) : undefined, - FaceDetail: output.FaceDetail != null ? de_FaceDetail(output.FaceDetail, context) : undefined, - } as any; + return take(output, { + Face: (_: any) => de_Face(_, context), + FaceDetail: (_: any) => de_FaceDetail(_, context), + }) as any; }; /** @@ -8579,9 +7239,6 @@ const de_FaceRecordList = (output: any, context: __SerdeContext): FaceRecord[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FaceRecord(entry, context); }); return retVal; @@ -8591,82 +7248,72 @@ const de_FaceRecordList = (output: any, context: __SerdeContext): FaceRecord[] = * deserializeAws_json1_1FaceSearchSettings */ const de_FaceSearchSettings = (output: any, context: __SerdeContext): FaceSearchSettings => { - return { - CollectionId: __expectString(output.CollectionId), - FaceMatchThreshold: __limitedParseFloat32(output.FaceMatchThreshold), - } as any; + return take(output, { + CollectionId: __expectString, + FaceMatchThreshold: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1Gender */ const de_Gender = (output: any, context: __SerdeContext): Gender => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectString(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectString, + }) as any; }; /** * deserializeAws_json1_1Geometry */ const de_Geometry = (output: any, context: __SerdeContext): Geometry => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Polygon: output.Polygon != null ? de_Polygon(output.Polygon, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Polygon: (_: any) => de_Polygon(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GetCelebrityInfoResponse - */ -const de_GetCelebrityInfoResponse = (output: any, context: __SerdeContext): GetCelebrityInfoResponse => { - return { - KnownGender: output.KnownGender != null ? de_KnownGender(output.KnownGender, context) : undefined, - Name: __expectString(output.Name), - Urls: output.Urls != null ? de_Urls(output.Urls, context) : undefined, - } as any; -}; +// de_GetCelebrityInfoResponse omitted. /** * deserializeAws_json1_1GetCelebrityRecognitionResponse */ const de_GetCelebrityRecognitionResponse = (output: any, context: __SerdeContext): GetCelebrityRecognitionResponse => { - return { - Celebrities: output.Celebrities != null ? de_CelebrityRecognitions(output.Celebrities, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + Celebrities: (_: any) => de_CelebrityRecognitions(_, context), + JobStatus: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetContentModerationResponse */ const de_GetContentModerationResponse = (output: any, context: __SerdeContext): GetContentModerationResponse => { - return { - JobStatus: __expectString(output.JobStatus), - ModerationLabels: - output.ModerationLabels != null ? de_ContentModerationDetections(output.ModerationLabels, context) : undefined, - ModerationModelVersion: __expectString(output.ModerationModelVersion), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + JobStatus: __expectString, + ModerationLabels: (_: any) => de_ContentModerationDetections(_, context), + ModerationModelVersion: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetFaceDetectionResponse */ const de_GetFaceDetectionResponse = (output: any, context: __SerdeContext): GetFaceDetectionResponse => { - return { - Faces: output.Faces != null ? de_FaceDetections(output.Faces, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + Faces: (_: any) => de_FaceDetections(_, context), + JobStatus: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; /** @@ -8676,196 +7323,136 @@ const de_GetFaceLivenessSessionResultsResponse = ( output: any, context: __SerdeContext ): GetFaceLivenessSessionResultsResponse => { - return { - AuditImages: output.AuditImages != null ? de_AuditImages(output.AuditImages, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - ReferenceImage: output.ReferenceImage != null ? de_AuditImage(output.ReferenceImage, context) : undefined, - SessionId: __expectString(output.SessionId), - Status: __expectString(output.Status), - } as any; + return take(output, { + AuditImages: (_: any) => de_AuditImages(_, context), + Confidence: __limitedParseFloat32, + ReferenceImage: (_: any) => de_AuditImage(_, context), + SessionId: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetFaceSearchResponse */ const de_GetFaceSearchResponse = (output: any, context: __SerdeContext): GetFaceSearchResponse => { - return { - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - Persons: output.Persons != null ? de_PersonMatches(output.Persons, context) : undefined, - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + JobStatus: __expectString, + NextToken: __expectString, + Persons: (_: any) => de_PersonMatches(_, context), + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetLabelDetectionResponse */ const de_GetLabelDetectionResponse = (output: any, context: __SerdeContext): GetLabelDetectionResponse => { - return { - JobStatus: __expectString(output.JobStatus), - LabelModelVersion: __expectString(output.LabelModelVersion), - Labels: output.Labels != null ? de_LabelDetections(output.Labels, context) : undefined, - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + JobStatus: __expectString, + LabelModelVersion: __expectString, + Labels: (_: any) => de_LabelDetections(_, context), + NextToken: __expectString, + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetPersonTrackingResponse */ const de_GetPersonTrackingResponse = (output: any, context: __SerdeContext): GetPersonTrackingResponse => { - return { - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - Persons: output.Persons != null ? de_PersonDetections(output.Persons, context) : undefined, - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + JobStatus: __expectString, + NextToken: __expectString, + Persons: (_: any) => de_PersonDetections(_, context), + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1GetSegmentDetectionResponse */ const de_GetSegmentDetectionResponse = (output: any, context: __SerdeContext): GetSegmentDetectionResponse => { - return { - AudioMetadata: output.AudioMetadata != null ? de_AudioMetadataList(output.AudioMetadata, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - Segments: output.Segments != null ? de_SegmentDetections(output.Segments, context) : undefined, - SelectedSegmentTypes: - output.SelectedSegmentTypes != null ? de_SegmentTypesInfo(output.SelectedSegmentTypes, context) : undefined, - StatusMessage: __expectString(output.StatusMessage), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadataList(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + AudioMetadata: _json, + JobStatus: __expectString, + NextToken: __expectString, + Segments: (_: any) => de_SegmentDetections(_, context), + SelectedSegmentTypes: _json, + StatusMessage: __expectString, + VideoMetadata: (_: any) => de_VideoMetadataList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTextDetectionResponse */ const de_GetTextDetectionResponse = (output: any, context: __SerdeContext): GetTextDetectionResponse => { - return { - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - TextDetections: output.TextDetections != null ? de_TextDetectionResults(output.TextDetections, context) : undefined, - TextModelVersion: __expectString(output.TextModelVersion), - VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined, - } as any; + return take(output, { + JobStatus: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + TextDetections: (_: any) => de_TextDetectionResults(_, context), + TextModelVersion: __expectString, + VideoMetadata: (_: any) => de_VideoMetadata(_, context), + }) as any; }; -/** - * deserializeAws_json1_1GroundTruthManifest - */ -const de_GroundTruthManifest = (output: any, context: __SerdeContext): GroundTruthManifest => { - return { - S3Object: output.S3Object != null ? de_S3Object(output.S3Object, context) : undefined, - } as any; -}; +// de_GroundTruthManifest omitted. /** * deserializeAws_json1_1HumanLoopActivationOutput */ const de_HumanLoopActivationOutput = (output: any, context: __SerdeContext): HumanLoopActivationOutput => { - return { - HumanLoopActivationConditionsEvaluationResults: - output.HumanLoopActivationConditionsEvaluationResults != null - ? new __LazyJsonString(output.HumanLoopActivationConditionsEvaluationResults) - : undefined, - HumanLoopActivationReasons: - output.HumanLoopActivationReasons != null - ? de_HumanLoopActivationReasons(output.HumanLoopActivationReasons, context) - : undefined, - HumanLoopArn: __expectString(output.HumanLoopArn), - } as any; + return take(output, { + HumanLoopActivationConditionsEvaluationResults: (_: any) => new __LazyJsonString(_), + HumanLoopActivationReasons: _json, + HumanLoopArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1HumanLoopActivationReasons - */ -const de_HumanLoopActivationReasons = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HumanLoopActivationReasons omitted. -/** - * deserializeAws_json1_1HumanLoopQuotaExceededException - */ -const de_HumanLoopQuotaExceededException = (output: any, context: __SerdeContext): HumanLoopQuotaExceededException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - QuotaCode: __expectString(output.QuotaCode), - ResourceType: __expectString(output.ResourceType), - ServiceCode: __expectString(output.ServiceCode), - } as any; -}; +// de_HumanLoopQuotaExceededException omitted. -/** - * deserializeAws_json1_1IdempotentParameterMismatchException - */ -const de_IdempotentParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotentParameterMismatchException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_IdempotentParameterMismatchException omitted. /** * deserializeAws_json1_1ImageQuality */ const de_ImageQuality = (output: any, context: __SerdeContext): ImageQuality => { - return { - Brightness: __limitedParseFloat32(output.Brightness), - Sharpness: __limitedParseFloat32(output.Sharpness), - } as any; + return take(output, { + Brightness: __limitedParseFloat32, + Sharpness: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1ImageTooLargeException - */ -const de_ImageTooLargeException = (output: any, context: __SerdeContext): ImageTooLargeException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ImageTooLargeException omitted. /** * deserializeAws_json1_1IndexFacesResponse */ const de_IndexFacesResponse = (output: any, context: __SerdeContext): IndexFacesResponse => { - return { - FaceModelVersion: __expectString(output.FaceModelVersion), - FaceRecords: output.FaceRecords != null ? de_FaceRecordList(output.FaceRecords, context) : undefined, - OrientationCorrection: __expectString(output.OrientationCorrection), - UnindexedFaces: output.UnindexedFaces != null ? de_UnindexedFaces(output.UnindexedFaces, context) : undefined, - } as any; + return take(output, { + FaceModelVersion: __expectString, + FaceRecords: (_: any) => de_FaceRecordList(_, context), + OrientationCorrection: __expectString, + UnindexedFaces: (_: any) => de_UnindexedFaces(_, context), + }) as any; }; /** * deserializeAws_json1_1Instance */ const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - DominantColors: output.DominantColors != null ? de_DominantColors(output.DominantColors, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + DominantColors: (_: any) => de_DominantColors(_, context), + }) as any; }; /** @@ -8875,183 +7462,62 @@ const de_Instances = (output: any, context: __SerdeContext): Instance[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Instance(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1InvalidImageFormatException - */ -const de_InvalidImageFormatException = (output: any, context: __SerdeContext): InvalidImageFormatException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidImageFormatException omitted. -/** - * deserializeAws_json1_1InvalidPaginationTokenException - */ -const de_InvalidPaginationTokenException = (output: any, context: __SerdeContext): InvalidPaginationTokenException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidPaginationTokenException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidPolicyRevisionIdException - */ -const de_InvalidPolicyRevisionIdException = ( - output: any, - context: __SerdeContext -): InvalidPolicyRevisionIdException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidPolicyRevisionIdException omitted. -/** - * deserializeAws_json1_1InvalidS3ObjectException - */ -const de_InvalidS3ObjectException = (output: any, context: __SerdeContext): InvalidS3ObjectException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidS3ObjectException omitted. -/** - * deserializeAws_json1_1KinesisDataStream - */ -const de_KinesisDataStream = (output: any, context: __SerdeContext): KinesisDataStream => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_KinesisDataStream omitted. -/** - * deserializeAws_json1_1KinesisVideoStream - */ -const de_KinesisVideoStream = (output: any, context: __SerdeContext): KinesisVideoStream => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_KinesisVideoStream omitted. -/** - * deserializeAws_json1_1KnownGender - */ -const de_KnownGender = (output: any, context: __SerdeContext): KnownGender => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_KnownGender omitted. /** * deserializeAws_json1_1Label */ const de_Label = (output: any, context: __SerdeContext): Label => { - return { - Aliases: output.Aliases != null ? de_LabelAliases(output.Aliases, context) : undefined, - Categories: output.Categories != null ? de_LabelCategories(output.Categories, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - Instances: output.Instances != null ? de_Instances(output.Instances, context) : undefined, - Name: __expectString(output.Name), - Parents: output.Parents != null ? de_Parents(output.Parents, context) : undefined, - } as any; + return take(output, { + Aliases: _json, + Categories: _json, + Confidence: __limitedParseFloat32, + Instances: (_: any) => de_Instances(_, context), + Name: __expectString, + Parents: _json, + }) as any; }; -/** - * deserializeAws_json1_1LabelAlias - */ -const de_LabelAlias = (output: any, context: __SerdeContext): LabelAlias => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_LabelAlias omitted. -/** - * deserializeAws_json1_1LabelAliases - */ -const de_LabelAliases = (output: any, context: __SerdeContext): LabelAlias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LabelAlias(entry, context); - }); - return retVal; -}; +// de_LabelAliases omitted. -/** - * deserializeAws_json1_1LabelCategories - */ -const de_LabelCategories = (output: any, context: __SerdeContext): LabelCategory[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LabelCategory(entry, context); - }); - return retVal; -}; +// de_LabelCategories omitted. -/** - * deserializeAws_json1_1LabelCategory - */ -const de_LabelCategory = (output: any, context: __SerdeContext): LabelCategory => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_LabelCategory omitted. /** * deserializeAws_json1_1LabelDetection */ const de_LabelDetection = (output: any, context: __SerdeContext): LabelDetection => { - return { - DurationMillis: __expectLong(output.DurationMillis), - EndTimestampMillis: __expectLong(output.EndTimestampMillis), - Label: output.Label != null ? de_Label(output.Label, context) : undefined, - StartTimestampMillis: __expectLong(output.StartTimestampMillis), - Timestamp: __expectLong(output.Timestamp), - } as any; + return take(output, { + DurationMillis: __expectLong, + EndTimestampMillis: __expectLong, + Label: (_: any) => de_Label(_, context), + StartTimestampMillis: __expectLong, + Timestamp: __expectLong, + }) as any; }; /** @@ -9061,9 +7527,6 @@ const de_LabelDetections = (output: any, context: __SerdeContext): LabelDetectio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LabelDetection(entry, context); }); return retVal; @@ -9076,9 +7539,6 @@ const de_Labels = (output: any, context: __SerdeContext): Label[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Label(entry, context); }); return retVal; @@ -9088,11 +7548,11 @@ const de_Labels = (output: any, context: __SerdeContext): Label[] => { * deserializeAws_json1_1Landmark */ const de_Landmark = (output: any, context: __SerdeContext): Landmark => { - return { - Type: __expectString(output.Type), - X: __limitedParseFloat32(output.X), - Y: __limitedParseFloat32(output.Y), - } as any; + return take(output, { + Type: __expectString, + X: __limitedParseFloat32, + Y: __limitedParseFloat32, + }) as any; }; /** @@ -9102,124 +7562,55 @@ const de_Landmarks = (output: any, context: __SerdeContext): Landmark[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Landmark(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListCollectionsResponse - */ -const de_ListCollectionsResponse = (output: any, context: __SerdeContext): ListCollectionsResponse => { - return { - CollectionIds: output.CollectionIds != null ? de_CollectionIdList(output.CollectionIds, context) : undefined, - FaceModelVersions: - output.FaceModelVersions != null ? de_FaceModelVersionList(output.FaceModelVersions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListCollectionsResponse omitted. -/** - * deserializeAws_json1_1ListDatasetEntriesResponse - */ -const de_ListDatasetEntriesResponse = (output: any, context: __SerdeContext): ListDatasetEntriesResponse => { - return { - DatasetEntries: output.DatasetEntries != null ? de_DatasetEntries(output.DatasetEntries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDatasetEntriesResponse omitted. -/** - * deserializeAws_json1_1ListDatasetLabelsResponse - */ -const de_ListDatasetLabelsResponse = (output: any, context: __SerdeContext): ListDatasetLabelsResponse => { - return { - DatasetLabelDescriptions: - output.DatasetLabelDescriptions != null - ? de_DatasetLabelDescriptions(output.DatasetLabelDescriptions, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListDatasetLabelsResponse omitted. /** * deserializeAws_json1_1ListFacesResponse */ const de_ListFacesResponse = (output: any, context: __SerdeContext): ListFacesResponse => { - return { - FaceModelVersion: __expectString(output.FaceModelVersion), - Faces: output.Faces != null ? de_FaceList(output.Faces, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + FaceModelVersion: __expectString, + Faces: (_: any) => de_FaceList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListProjectPoliciesResponse */ const de_ListProjectPoliciesResponse = (output: any, context: __SerdeContext): ListProjectPoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - ProjectPolicies: output.ProjectPolicies != null ? de_ProjectPolicies(output.ProjectPolicies, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ProjectPolicies: (_: any) => de_ProjectPolicies(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListStreamProcessorsResponse - */ -const de_ListStreamProcessorsResponse = (output: any, context: __SerdeContext): ListStreamProcessorsResponse => { - return { - NextToken: __expectString(output.NextToken), - StreamProcessors: - output.StreamProcessors != null ? de_StreamProcessorList(output.StreamProcessors, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MalformedPolicyDocumentException - */ -const de_MalformedPolicyDocumentException = ( - output: any, - context: __SerdeContext -): MalformedPolicyDocumentException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ListStreamProcessorsResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_MalformedPolicyDocumentException omitted. /** * deserializeAws_json1_1ModerationLabel */ const de_ModerationLabel = (output: any, context: __SerdeContext): ModerationLabel => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Name: __expectString(output.Name), - ParentName: __expectString(output.ParentName), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Name: __expectString, + ParentName: __expectString, + }) as any; }; /** @@ -9229,9 +7620,6 @@ const de_ModerationLabels = (output: any, context: __SerdeContext): ModerationLa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ModerationLabel(entry, context); }); return retVal; @@ -9241,75 +7629,47 @@ const de_ModerationLabels = (output: any, context: __SerdeContext): ModerationLa * deserializeAws_json1_1MouthOpen */ const de_MouthOpen = (output: any, context: __SerdeContext): MouthOpen => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_1Mustache */ const de_Mustache = (output: any, context: __SerdeContext): Mustache => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_1OutputConfig - */ -const de_OutputConfig = (output: any, context: __SerdeContext): OutputConfig => { - return { - S3Bucket: __expectString(output.S3Bucket), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - } as any; -}; +// de_OutputConfig omitted. -/** - * deserializeAws_json1_1Parent - */ -const de_Parent = (output: any, context: __SerdeContext): Parent => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_Parent omitted. -/** - * deserializeAws_json1_1Parents - */ -const de_Parents = (output: any, context: __SerdeContext): Parent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parent(entry, context); - }); - return retVal; -}; +// de_Parents omitted. /** * deserializeAws_json1_1PersonDetail */ const de_PersonDetail = (output: any, context: __SerdeContext): PersonDetail => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Face: output.Face != null ? de_FaceDetail(output.Face, context) : undefined, - Index: __expectLong(output.Index), - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Face: (_: any) => de_FaceDetail(_, context), + Index: __expectLong, + }) as any; }; /** * deserializeAws_json1_1PersonDetection */ const de_PersonDetection = (output: any, context: __SerdeContext): PersonDetection => { - return { - Person: output.Person != null ? de_PersonDetail(output.Person, context) : undefined, - Timestamp: __expectLong(output.Timestamp), - } as any; + return take(output, { + Person: (_: any) => de_PersonDetail(_, context), + Timestamp: __expectLong, + }) as any; }; /** @@ -9319,9 +7679,6 @@ const de_PersonDetections = (output: any, context: __SerdeContext): PersonDetect const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PersonDetection(entry, context); }); return retVal; @@ -9331,11 +7688,11 @@ const de_PersonDetections = (output: any, context: __SerdeContext): PersonDetect * deserializeAws_json1_1PersonMatch */ const de_PersonMatch = (output: any, context: __SerdeContext): PersonMatch => { - return { - FaceMatches: output.FaceMatches != null ? de_FaceMatchList(output.FaceMatches, context) : undefined, - Person: output.Person != null ? de_PersonDetail(output.Person, context) : undefined, - Timestamp: __expectLong(output.Timestamp), - } as any; + return take(output, { + FaceMatches: (_: any) => de_FaceMatchList(_, context), + Person: (_: any) => de_PersonDetail(_, context), + Timestamp: __expectLong, + }) as any; }; /** @@ -9345,9 +7702,6 @@ const de_PersonMatches = (output: any, context: __SerdeContext): PersonMatch[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PersonMatch(entry, context); }); return retVal; @@ -9357,10 +7711,10 @@ const de_PersonMatches = (output: any, context: __SerdeContext): PersonMatch[] = * deserializeAws_json1_1Point */ const de_Point = (output: any, context: __SerdeContext): Point => { - return { - X: __limitedParseFloat32(output.X), - Y: __limitedParseFloat32(output.Y), - } as any; + return take(output, { + X: __limitedParseFloat32, + Y: __limitedParseFloat32, + }) as any; }; /** @@ -9370,9 +7724,6 @@ const de_Polygon = (output: any, context: __SerdeContext): Point[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Point(entry, context); }); return retVal; @@ -9382,26 +7733,23 @@ const de_Polygon = (output: any, context: __SerdeContext): Point[] => { * deserializeAws_json1_1Pose */ const de_Pose = (output: any, context: __SerdeContext): Pose => { - return { - Pitch: __limitedParseFloat32(output.Pitch), - Roll: __limitedParseFloat32(output.Roll), - Yaw: __limitedParseFloat32(output.Yaw), - } as any; + return take(output, { + Pitch: __limitedParseFloat32, + Roll: __limitedParseFloat32, + Yaw: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1ProjectDescription */ const de_ProjectDescription = (output: any, context: __SerdeContext): ProjectDescription => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - Datasets: output.Datasets != null ? de_DatasetMetadataList(output.Datasets, context) : undefined, - ProjectArn: __expectString(output.ProjectArn), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Datasets: (_: any) => de_DatasetMetadataList(_, context), + ProjectArn: __expectString, + Status: __expectString, + }) as any; }; /** @@ -9411,9 +7759,6 @@ const de_ProjectDescriptions = (output: any, context: __SerdeContext): ProjectDe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectDescription(entry, context); }); return retVal; @@ -9426,9 +7771,6 @@ const de_ProjectPolicies = (output: any, context: __SerdeContext): ProjectPolicy const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectPolicy(entry, context); }); return retVal; @@ -9438,53 +7780,37 @@ const de_ProjectPolicies = (output: any, context: __SerdeContext): ProjectPolicy * deserializeAws_json1_1ProjectPolicy */ const de_ProjectPolicy = (output: any, context: __SerdeContext): ProjectPolicy => { - return { - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - PolicyDocument: __expectString(output.PolicyDocument), - PolicyName: __expectString(output.PolicyName), - PolicyRevisionId: __expectString(output.PolicyRevisionId), - ProjectArn: __expectString(output.ProjectArn), - } as any; + return take(output, { + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyDocument: __expectString, + PolicyName: __expectString, + PolicyRevisionId: __expectString, + ProjectArn: __expectString, + }) as any; }; /** * deserializeAws_json1_1ProjectVersionDescription */ const de_ProjectVersionDescription = (output: any, context: __SerdeContext): ProjectVersionDescription => { - return { - BillableTrainingTimeInSeconds: __expectLong(output.BillableTrainingTimeInSeconds), - CreationTimestamp: - output.CreationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTimestamp))) - : undefined, - EvaluationResult: - output.EvaluationResult != null ? de_EvaluationResult(output.EvaluationResult, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - ManifestSummary: - output.ManifestSummary != null ? de_GroundTruthManifest(output.ManifestSummary, context) : undefined, - MaxInferenceUnits: __expectInt32(output.MaxInferenceUnits), - MinInferenceUnits: __expectInt32(output.MinInferenceUnits), - OutputConfig: output.OutputConfig != null ? de_OutputConfig(output.OutputConfig, context) : undefined, - ProjectVersionArn: __expectString(output.ProjectVersionArn), - SourceProjectVersionArn: __expectString(output.SourceProjectVersionArn), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - TestingDataResult: - output.TestingDataResult != null ? de_TestingDataResult(output.TestingDataResult, context) : undefined, - TrainingDataResult: - output.TrainingDataResult != null ? de_TrainingDataResult(output.TrainingDataResult, context) : undefined, - TrainingEndTimestamp: - output.TrainingEndTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTimestamp))) - : undefined, - } as any; + return take(output, { + BillableTrainingTimeInSeconds: __expectLong, + CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EvaluationResult: (_: any) => de_EvaluationResult(_, context), + KmsKeyId: __expectString, + ManifestSummary: _json, + MaxInferenceUnits: __expectInt32, + MinInferenceUnits: __expectInt32, + OutputConfig: _json, + ProjectVersionArn: __expectString, + SourceProjectVersionArn: __expectString, + Status: __expectString, + StatusMessage: __expectString, + TestingDataResult: _json, + TrainingDataResult: _json, + TrainingEndTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -9494,9 +7820,6 @@ const de_ProjectVersionDescriptions = (output: any, context: __SerdeContext): Pr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProjectVersionDescription(entry, context); }); return retVal; @@ -9506,40 +7829,26 @@ const de_ProjectVersionDescriptions = (output: any, context: __SerdeContext): Pr * deserializeAws_json1_1ProtectiveEquipmentBodyPart */ const de_ProtectiveEquipmentBodyPart = (output: any, context: __SerdeContext): ProtectiveEquipmentBodyPart => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - EquipmentDetections: - output.EquipmentDetections != null ? de_EquipmentDetections(output.EquipmentDetections, context) : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + EquipmentDetections: (_: any) => de_EquipmentDetections(_, context), + Name: __expectString, + }) as any; }; /** * deserializeAws_json1_1ProtectiveEquipmentPerson */ const de_ProtectiveEquipmentPerson = (output: any, context: __SerdeContext): ProtectiveEquipmentPerson => { - return { - BodyParts: output.BodyParts != null ? de_BodyParts(output.BodyParts, context) : undefined, - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Confidence: __limitedParseFloat32(output.Confidence), - Id: __expectInt32(output.Id), - } as any; + return take(output, { + BodyParts: (_: any) => de_BodyParts(_, context), + BoundingBox: (_: any) => de_BoundingBox(_, context), + Confidence: __limitedParseFloat32, + Id: __expectInt32, + }) as any; }; -/** - * deserializeAws_json1_1ProtectiveEquipmentPersonIds - */ -const de_ProtectiveEquipmentPersonIds = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_ProtectiveEquipmentPersonIds omitted. /** * deserializeAws_json1_1ProtectiveEquipmentPersons @@ -9548,92 +7857,38 @@ const de_ProtectiveEquipmentPersons = (output: any, context: __SerdeContext): Pr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProtectiveEquipmentPerson(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ProtectiveEquipmentSummary - */ -const de_ProtectiveEquipmentSummary = (output: any, context: __SerdeContext): ProtectiveEquipmentSummary => { - return { - PersonsIndeterminate: - output.PersonsIndeterminate != null - ? de_ProtectiveEquipmentPersonIds(output.PersonsIndeterminate, context) - : undefined, - PersonsWithRequiredEquipment: - output.PersonsWithRequiredEquipment != null - ? de_ProtectiveEquipmentPersonIds(output.PersonsWithRequiredEquipment, context) - : undefined, - PersonsWithoutRequiredEquipment: - output.PersonsWithoutRequiredEquipment != null - ? de_ProtectiveEquipmentPersonIds(output.PersonsWithoutRequiredEquipment, context) - : undefined, - } as any; -}; +// de_ProtectiveEquipmentSummary omitted. -/** - * deserializeAws_json1_1ProvisionedThroughputExceededException - */ -const de_ProvisionedThroughputExceededException = ( - output: any, - context: __SerdeContext -): ProvisionedThroughputExceededException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ProvisionedThroughputExceededException omitted. -/** - * deserializeAws_json1_1PutProjectPolicyResponse - */ -const de_PutProjectPolicyResponse = (output: any, context: __SerdeContext): PutProjectPolicyResponse => { - return { - PolicyRevisionId: __expectString(output.PolicyRevisionId), - } as any; -}; +// de_PutProjectPolicyResponse omitted. -/** - * deserializeAws_json1_1Reasons - */ -const de_Reasons = (output: any, context: __SerdeContext): (Reason | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Reasons omitted. /** * deserializeAws_json1_1RecognizeCelebritiesResponse */ const de_RecognizeCelebritiesResponse = (output: any, context: __SerdeContext): RecognizeCelebritiesResponse => { - return { - CelebrityFaces: output.CelebrityFaces != null ? de_CelebrityList(output.CelebrityFaces, context) : undefined, - OrientationCorrection: __expectString(output.OrientationCorrection), - UnrecognizedFaces: - output.UnrecognizedFaces != null ? de_ComparedFaceList(output.UnrecognizedFaces, context) : undefined, - } as any; + return take(output, { + CelebrityFaces: (_: any) => de_CelebrityList(_, context), + OrientationCorrection: __expectString, + UnrecognizedFaces: (_: any) => de_ComparedFaceList(_, context), + }) as any; }; /** * deserializeAws_json1_1RegionOfInterest */ const de_RegionOfInterest = (output: any, context: __SerdeContext): RegionOfInterest => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Polygon: output.Polygon != null ? de_Polygon(output.Polygon, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Polygon: (_: any) => de_Polygon(_, context), + }) as any; }; /** @@ -9643,122 +7898,64 @@ const de_RegionsOfInterest = (output: any, context: __SerdeContext): RegionOfInt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RegionOfInterest(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ResourceNotReadyException - */ -const de_ResourceNotReadyException = (output: any, context: __SerdeContext): ResourceNotReadyException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotReadyException omitted. -/** - * deserializeAws_json1_1S3Destination - */ -const de_S3Destination = (output: any, context: __SerdeContext): S3Destination => { - return { - Bucket: __expectString(output.Bucket), - KeyPrefix: __expectString(output.KeyPrefix), - } as any; -}; +// de_S3Destination omitted. -/** - * deserializeAws_json1_1S3Object - */ -const de_S3Object = (output: any, context: __SerdeContext): S3Object => { - return { - Bucket: __expectString(output.Bucket), - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; +// de_S3Object omitted. /** * deserializeAws_json1_1SearchFacesByImageResponse */ const de_SearchFacesByImageResponse = (output: any, context: __SerdeContext): SearchFacesByImageResponse => { - return { - FaceMatches: output.FaceMatches != null ? de_FaceMatchList(output.FaceMatches, context) : undefined, - FaceModelVersion: __expectString(output.FaceModelVersion), - SearchedFaceBoundingBox: - output.SearchedFaceBoundingBox != null ? de_BoundingBox(output.SearchedFaceBoundingBox, context) : undefined, - SearchedFaceConfidence: __limitedParseFloat32(output.SearchedFaceConfidence), - } as any; + return take(output, { + FaceMatches: (_: any) => de_FaceMatchList(_, context), + FaceModelVersion: __expectString, + SearchedFaceBoundingBox: (_: any) => de_BoundingBox(_, context), + SearchedFaceConfidence: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1SearchFacesResponse */ const de_SearchFacesResponse = (output: any, context: __SerdeContext): SearchFacesResponse => { - return { - FaceMatches: output.FaceMatches != null ? de_FaceMatchList(output.FaceMatches, context) : undefined, - FaceModelVersion: __expectString(output.FaceModelVersion), - SearchedFaceId: __expectString(output.SearchedFaceId), - } as any; + return take(output, { + FaceMatches: (_: any) => de_FaceMatchList(_, context), + FaceModelVersion: __expectString, + SearchedFaceId: __expectString, + }) as any; }; /** * deserializeAws_json1_1SegmentDetection */ const de_SegmentDetection = (output: any, context: __SerdeContext): SegmentDetection => { - return { - DurationFrames: __expectLong(output.DurationFrames), - DurationMillis: __expectLong(output.DurationMillis), - DurationSMPTE: __expectString(output.DurationSMPTE), - EndFrameNumber: __expectLong(output.EndFrameNumber), - EndTimecodeSMPTE: __expectString(output.EndTimecodeSMPTE), - EndTimestampMillis: __expectLong(output.EndTimestampMillis), - ShotSegment: output.ShotSegment != null ? de_ShotSegment(output.ShotSegment, context) : undefined, - StartFrameNumber: __expectLong(output.StartFrameNumber), - StartTimecodeSMPTE: __expectString(output.StartTimecodeSMPTE), - StartTimestampMillis: __expectLong(output.StartTimestampMillis), - TechnicalCueSegment: - output.TechnicalCueSegment != null ? de_TechnicalCueSegment(output.TechnicalCueSegment, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + DurationFrames: __expectLong, + DurationMillis: __expectLong, + DurationSMPTE: __expectString, + EndFrameNumber: __expectLong, + EndTimecodeSMPTE: __expectString, + EndTimestampMillis: __expectLong, + ShotSegment: (_: any) => de_ShotSegment(_, context), + StartFrameNumber: __expectLong, + StartTimecodeSMPTE: __expectString, + StartTimestampMillis: __expectLong, + TechnicalCueSegment: (_: any) => de_TechnicalCueSegment(_, context), + Type: __expectString, + }) as any; }; /** @@ -9768,352 +7965,127 @@ const de_SegmentDetections = (output: any, context: __SerdeContext): SegmentDete const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SegmentDetection(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SegmentTypeInfo - */ -const de_SegmentTypeInfo = (output: any, context: __SerdeContext): SegmentTypeInfo => { - return { - ModelVersion: __expectString(output.ModelVersion), - Type: __expectString(output.Type), - } as any; -}; +// de_SegmentTypeInfo omitted. -/** - * deserializeAws_json1_1SegmentTypesInfo - */ -const de_SegmentTypesInfo = (output: any, context: __SerdeContext): SegmentTypeInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SegmentTypeInfo(entry, context); - }); - return retVal; -}; +// de_SegmentTypesInfo omitted. -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_1SessionNotFoundException - */ -const de_SessionNotFoundException = (output: any, context: __SerdeContext): SessionNotFoundException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_SessionNotFoundException omitted. /** * deserializeAws_json1_1ShotSegment */ const de_ShotSegment = (output: any, context: __SerdeContext): ShotSegment => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Index: __expectLong(output.Index), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Index: __expectLong, + }) as any; }; /** * deserializeAws_json1_1Smile */ const de_Smile = (output: any, context: __SerdeContext): Smile => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_1StartCelebrityRecognitionResponse - */ -const de_StartCelebrityRecognitionResponse = ( - output: any, - context: __SerdeContext -): StartCelebrityRecognitionResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartCelebrityRecognitionResponse omitted. -/** - * deserializeAws_json1_1StartContentModerationResponse - */ -const de_StartContentModerationResponse = (output: any, context: __SerdeContext): StartContentModerationResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartContentModerationResponse omitted. -/** - * deserializeAws_json1_1StartFaceDetectionResponse - */ -const de_StartFaceDetectionResponse = (output: any, context: __SerdeContext): StartFaceDetectionResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartFaceDetectionResponse omitted. -/** - * deserializeAws_json1_1StartFaceSearchResponse - */ -const de_StartFaceSearchResponse = (output: any, context: __SerdeContext): StartFaceSearchResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartFaceSearchResponse omitted. -/** - * deserializeAws_json1_1StartLabelDetectionResponse - */ -const de_StartLabelDetectionResponse = (output: any, context: __SerdeContext): StartLabelDetectionResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartLabelDetectionResponse omitted. -/** - * deserializeAws_json1_1StartPersonTrackingResponse - */ -const de_StartPersonTrackingResponse = (output: any, context: __SerdeContext): StartPersonTrackingResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartPersonTrackingResponse omitted. -/** - * deserializeAws_json1_1StartProjectVersionResponse - */ -const de_StartProjectVersionResponse = (output: any, context: __SerdeContext): StartProjectVersionResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_StartProjectVersionResponse omitted. -/** - * deserializeAws_json1_1StartSegmentDetectionResponse - */ -const de_StartSegmentDetectionResponse = (output: any, context: __SerdeContext): StartSegmentDetectionResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartSegmentDetectionResponse omitted. -/** - * deserializeAws_json1_1StartStreamProcessorResponse - */ -const de_StartStreamProcessorResponse = (output: any, context: __SerdeContext): StartStreamProcessorResponse => { - return { - SessionId: __expectString(output.SessionId), - } as any; -}; +// de_StartStreamProcessorResponse omitted. -/** - * deserializeAws_json1_1StartTextDetectionResponse - */ -const de_StartTextDetectionResponse = (output: any, context: __SerdeContext): StartTextDetectionResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartTextDetectionResponse omitted. -/** - * deserializeAws_json1_1StopProjectVersionResponse - */ -const de_StopProjectVersionResponse = (output: any, context: __SerdeContext): StopProjectVersionResponse => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_StopProjectVersionResponse omitted. -/** - * deserializeAws_json1_1StopStreamProcessorResponse - */ -const de_StopStreamProcessorResponse = (output: any, context: __SerdeContext): StopStreamProcessorResponse => { - return {} as any; -}; +// de_StopStreamProcessorResponse omitted. -/** - * deserializeAws_json1_1StreamProcessor - */ -const de_StreamProcessor = (output: any, context: __SerdeContext): StreamProcessor => { - return { - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_StreamProcessor omitted. -/** - * deserializeAws_json1_1StreamProcessorDataSharingPreference - */ -const de_StreamProcessorDataSharingPreference = ( - output: any, - context: __SerdeContext -): StreamProcessorDataSharingPreference => { - return { - OptIn: __expectBoolean(output.OptIn), - } as any; -}; +// de_StreamProcessorDataSharingPreference omitted. -/** - * deserializeAws_json1_1StreamProcessorInput - */ -const de_StreamProcessorInput = (output: any, context: __SerdeContext): StreamProcessorInput => { - return { - KinesisVideoStream: - output.KinesisVideoStream != null ? de_KinesisVideoStream(output.KinesisVideoStream, context) : undefined, - } as any; -}; +// de_StreamProcessorInput omitted. -/** - * deserializeAws_json1_1StreamProcessorList - */ -const de_StreamProcessorList = (output: any, context: __SerdeContext): StreamProcessor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StreamProcessor(entry, context); - }); - return retVal; -}; +// de_StreamProcessorList omitted. -/** - * deserializeAws_json1_1StreamProcessorNotificationChannel - */ -const de_StreamProcessorNotificationChannel = ( - output: any, - context: __SerdeContext -): StreamProcessorNotificationChannel => { - return { - SNSTopicArn: __expectString(output.SNSTopicArn), - } as any; -}; +// de_StreamProcessorNotificationChannel omitted. -/** - * deserializeAws_json1_1StreamProcessorOutput - */ -const de_StreamProcessorOutput = (output: any, context: __SerdeContext): StreamProcessorOutput => { - return { - KinesisDataStream: - output.KinesisDataStream != null ? de_KinesisDataStream(output.KinesisDataStream, context) : undefined, - S3Destination: output.S3Destination != null ? de_S3Destination(output.S3Destination, context) : undefined, - } as any; -}; +// de_StreamProcessorOutput omitted. /** * deserializeAws_json1_1StreamProcessorSettings */ const de_StreamProcessorSettings = (output: any, context: __SerdeContext): StreamProcessorSettings => { - return { - ConnectedHome: output.ConnectedHome != null ? de_ConnectedHomeSettings(output.ConnectedHome, context) : undefined, - FaceSearch: output.FaceSearch != null ? de_FaceSearchSettings(output.FaceSearch, context) : undefined, - } as any; + return take(output, { + ConnectedHome: (_: any) => de_ConnectedHomeSettings(_, context), + FaceSearch: (_: any) => de_FaceSearchSettings(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Summary - */ -const de_Summary = (output: any, context: __SerdeContext): Summary => { - return { - S3Object: output.S3Object != null ? de_S3Object(output.S3Object, context) : undefined, - } as any; -}; +// de_Summary omitted. /** * deserializeAws_json1_1Sunglasses */ const de_Sunglasses = (output: any, context: __SerdeContext): Sunglasses => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectBoolean(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1TechnicalCueSegment */ const de_TechnicalCueSegment = (output: any, context: __SerdeContext): TechnicalCueSegment => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Type: __expectString(output.Type), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1TestingData - */ -const de_TestingData = (output: any, context: __SerdeContext): TestingData => { - return { - Assets: output.Assets != null ? de_Assets(output.Assets, context) : undefined, - AutoCreate: __expectBoolean(output.AutoCreate), - } as any; -}; +// de_TestingData omitted. -/** - * deserializeAws_json1_1TestingDataResult - */ -const de_TestingDataResult = (output: any, context: __SerdeContext): TestingDataResult => { - return { - Input: output.Input != null ? de_TestingData(output.Input, context) : undefined, - Output: output.Output != null ? de_TestingData(output.Output, context) : undefined, - Validation: output.Validation != null ? de_ValidationData(output.Validation, context) : undefined, - } as any; -}; +// de_TestingDataResult omitted. /** * deserializeAws_json1_1TextDetection */ const de_TextDetection = (output: any, context: __SerdeContext): TextDetection => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - DetectedText: __expectString(output.DetectedText), - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - Id: __expectInt32(output.Id), - ParentId: __expectInt32(output.ParentId), - Type: __expectString(output.Type), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + DetectedText: __expectString, + Geometry: (_: any) => de_Geometry(_, context), + Id: __expectInt32, + ParentId: __expectInt32, + Type: __expectString, + }) as any; }; /** @@ -10123,9 +8095,6 @@ const de_TextDetectionList = (output: any, context: __SerdeContext): TextDetecti const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TextDetection(entry, context); }); return retVal; @@ -10135,10 +8104,10 @@ const de_TextDetectionList = (output: any, context: __SerdeContext): TextDetecti * deserializeAws_json1_1TextDetectionResult */ const de_TextDetectionResult = (output: any, context: __SerdeContext): TextDetectionResult => { - return { - TextDetection: output.TextDetection != null ? de_TextDetection(output.TextDetection, context) : undefined, - Timestamp: __expectLong(output.Timestamp), - } as any; + return take(output, { + TextDetection: (_: any) => de_TextDetection(_, context), + Timestamp: __expectLong, + }) as any; }; /** @@ -10148,53 +8117,25 @@ const de_TextDetectionResults = (output: any, context: __SerdeContext): TextDete const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TextDetectionResult(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1TrainingData - */ -const de_TrainingData = (output: any, context: __SerdeContext): TrainingData => { - return { - Assets: output.Assets != null ? de_Assets(output.Assets, context) : undefined, - } as any; -}; +// de_TrainingData omitted. -/** - * deserializeAws_json1_1TrainingDataResult - */ -const de_TrainingDataResult = (output: any, context: __SerdeContext): TrainingDataResult => { - return { - Input: output.Input != null ? de_TrainingData(output.Input, context) : undefined, - Output: output.Output != null ? de_TrainingData(output.Output, context) : undefined, - Validation: output.Validation != null ? de_ValidationData(output.Validation, context) : undefined, - } as any; -}; +// de_TrainingDataResult omitted. /** * deserializeAws_json1_1UnindexedFace */ const de_UnindexedFace = (output: any, context: __SerdeContext): UnindexedFace => { - return { - FaceDetail: output.FaceDetail != null ? de_FaceDetail(output.FaceDetail, context) : undefined, - Reasons: output.Reasons != null ? de_Reasons(output.Reasons, context) : undefined, - } as any; + return take(output, { + FaceDetail: (_: any) => de_FaceDetail(_, context), + Reasons: _json, + }) as any; }; /** @@ -10204,72 +8145,34 @@ const de_UnindexedFaces = (output: any, context: __SerdeContext): UnindexedFace[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UnindexedFace(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateDatasetEntriesResponse - */ -const de_UpdateDatasetEntriesResponse = (output: any, context: __SerdeContext): UpdateDatasetEntriesResponse => { - return {} as any; -}; +// de_UpdateDatasetEntriesResponse omitted. -/** - * deserializeAws_json1_1UpdateStreamProcessorResponse - */ -const de_UpdateStreamProcessorResponse = (output: any, context: __SerdeContext): UpdateStreamProcessorResponse => { - return {} as any; -}; +// de_UpdateStreamProcessorResponse omitted. -/** - * deserializeAws_json1_1Urls - */ -const de_Urls = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Urls omitted. -/** - * deserializeAws_json1_1ValidationData - */ -const de_ValidationData = (output: any, context: __SerdeContext): ValidationData => { - return { - Assets: output.Assets != null ? de_Assets(output.Assets, context) : undefined, - } as any; -}; +// de_ValidationData omitted. /** * deserializeAws_json1_1VideoMetadata */ const de_VideoMetadata = (output: any, context: __SerdeContext): VideoMetadata => { - return { - Codec: __expectString(output.Codec), - ColorRange: __expectString(output.ColorRange), - DurationMillis: __expectLong(output.DurationMillis), - Format: __expectString(output.Format), - FrameHeight: __expectLong(output.FrameHeight), - FrameRate: __limitedParseFloat32(output.FrameRate), - FrameWidth: __expectLong(output.FrameWidth), - } as any; + return take(output, { + Codec: __expectString, + ColorRange: __expectString, + DurationMillis: __expectLong, + Format: __expectString, + FrameHeight: __expectLong, + FrameRate: __limitedParseFloat32, + FrameWidth: __expectLong, + }) as any; }; /** @@ -10279,24 +8182,12 @@ const de_VideoMetadataList = (output: any, context: __SerdeContext): VideoMetada const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VideoMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1VideoTooLargeException - */ -const de_VideoTooLargeException = (output: any, context: __SerdeContext): VideoTooLargeException => { - return { - Code: __expectString(output.Code), - Logref: __expectString(output.Logref), - Message: __expectString(output.Message), - } as any; -}; +// de_VideoTooLargeException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -10318,6 +8209,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts b/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts index c2ba6646a2ab..bb41e2a73014 100644 --- a/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts +++ b/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectString as __expectString, expectUnion as __expectUnion, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -140,16 +140,15 @@ const de_StartFaceLivenessSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -159,12 +158,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -181,12 +179,11 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -203,12 +200,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -225,12 +221,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -247,12 +242,11 @@ const de_SessionNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new SessionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -266,12 +260,11 @@ const de_SessionNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -285,12 +278,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -393,7 +385,7 @@ const de_LivenessResponseStream = ( const de_DisconnectionEvent_event = async (output: any, context: __SerdeContext): Promise => { const contents: DisconnectionEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_DisconnectionEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; const de_InternalServerException_event = async ( @@ -453,12 +445,12 @@ const de_ValidationException_event = async (output: any, context: __SerdeContext * serializeAws_restJson1BoundingBox */ const se_BoundingBox = (input: BoundingBox, context: __SerdeContext): any => { - return { - ...(input.Height != null && { Height: __serializeFloat(input.Height) }), - ...(input.Left != null && { Left: __serializeFloat(input.Left) }), - ...(input.Top != null && { Top: __serializeFloat(input.Top) }), - ...(input.Width != null && { Width: __serializeFloat(input.Width) }), - }; + return take(input, { + Height: __serializeFloat, + Left: __serializeFloat, + Top: __serializeFloat, + Width: __serializeFloat, + }); }; /** @@ -477,33 +469,14 @@ const se_ClientChallenge = (input: ClientChallenge, context: __SerdeContext): an * serializeAws_restJson1ClientSessionInformationEvent */ const se_ClientSessionInformationEvent = (input: ClientSessionInformationEvent, context: __SerdeContext): any => { - return { - ...(input.Challenge != null && { Challenge: se_ClientChallenge(input.Challenge, context) }), - }; + return take(input, { + Challenge: (_) => se_ClientChallenge(_, context), + }); }; -/** - * serializeAws_restJson1ColorComponentList - */ -const se_ColorComponentList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ColorComponentList omitted. -/** - * serializeAws_restJson1ColorDisplayed - */ -const se_ColorDisplayed = (input: ColorDisplayed, context: __SerdeContext): any => { - return { - ...(input.CurrentColor != null && { CurrentColor: se_FreshnessColor(input.CurrentColor, context) }), - ...(input.CurrentColorStartTimestamp != null && { CurrentColorStartTimestamp: input.CurrentColorStartTimestamp }), - ...(input.PreviousColor != null && { PreviousColor: se_FreshnessColor(input.PreviousColor, context) }), - ...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }), - }; -}; +// se_ColorDisplayed omitted. /** * serializeAws_restJson1FaceMovementAndLightClientChallenge @@ -512,104 +485,78 @@ const se_FaceMovementAndLightClientChallenge = ( input: FaceMovementAndLightClientChallenge, context: __SerdeContext ): any => { - return { - ...(input.ChallengeId != null && { ChallengeId: input.ChallengeId }), - ...(input.ColorDisplayed != null && { ColorDisplayed: se_ColorDisplayed(input.ColorDisplayed, context) }), - ...(input.InitialFace != null && { InitialFace: se_InitialFace(input.InitialFace, context) }), - ...(input.TargetFace != null && { TargetFace: se_TargetFace(input.TargetFace, context) }), - ...(input.VideoEndTimestamp != null && { VideoEndTimestamp: input.VideoEndTimestamp }), - ...(input.VideoStartTimestamp != null && { VideoStartTimestamp: input.VideoStartTimestamp }), - }; + return take(input, { + ChallengeId: [], + ColorDisplayed: _json, + InitialFace: (_) => se_InitialFace(_, context), + TargetFace: (_) => se_TargetFace(_, context), + VideoEndTimestamp: [], + VideoStartTimestamp: [], + }); }; -/** - * serializeAws_restJson1FreshnessColor - */ -const se_FreshnessColor = (input: FreshnessColor, context: __SerdeContext): any => { - return { - ...(input.RGB != null && { RGB: se_ColorComponentList(input.RGB, context) }), - }; -}; +// se_FreshnessColor omitted. /** * serializeAws_restJson1InitialFace */ const se_InitialFace = (input: InitialFace, context: __SerdeContext): any => { - return { - ...(input.BoundingBox != null && { BoundingBox: se_BoundingBox(input.BoundingBox, context) }), - ...(input.InitialFaceDetectedTimestamp != null && { - InitialFaceDetectedTimestamp: input.InitialFaceDetectedTimestamp, - }), - }; + return take(input, { + BoundingBox: (_) => se_BoundingBox(_, context), + InitialFaceDetectedTimestamp: [], + }); }; /** * serializeAws_restJson1TargetFace */ const se_TargetFace = (input: TargetFace, context: __SerdeContext): any => { - return { - ...(input.BoundingBox != null && { BoundingBox: se_BoundingBox(input.BoundingBox, context) }), - ...(input.FaceDetectedInTargetPositionEndTimestamp != null && { - FaceDetectedInTargetPositionEndTimestamp: input.FaceDetectedInTargetPositionEndTimestamp, - }), - ...(input.FaceDetectedInTargetPositionStartTimestamp != null && { - FaceDetectedInTargetPositionStartTimestamp: input.FaceDetectedInTargetPositionStartTimestamp, - }), - }; + return take(input, { + BoundingBox: (_) => se_BoundingBox(_, context), + FaceDetectedInTargetPositionEndTimestamp: [], + FaceDetectedInTargetPositionStartTimestamp: [], + }); }; /** * serializeAws_restJson1VideoEvent */ const se_VideoEvent = (input: VideoEvent, context: __SerdeContext): any => { - return { - ...(input.TimestampMillis != null && { TimestampMillis: input.TimestampMillis }), - ...(input.VideoChunk != null && { VideoChunk: context.base64Encoder(input.VideoChunk) }), - }; + return take(input, { + TimestampMillis: [], + VideoChunk: context.base64Encoder, + }); }; /** * deserializeAws_restJson1ChallengeConfig */ const de_ChallengeConfig = (output: any, context: __SerdeContext): ChallengeConfig => { - return { - BlazeFaceDetectionThreshold: __limitedParseFloat32(output.BlazeFaceDetectionThreshold), - FaceDistanceThreshold: __limitedParseFloat32(output.FaceDistanceThreshold), - FaceDistanceThresholdMax: __limitedParseFloat32(output.FaceDistanceThresholdMax), - FaceDistanceThresholdMin: __limitedParseFloat32(output.FaceDistanceThresholdMin), - FaceIouHeightThreshold: __limitedParseFloat32(output.FaceIouHeightThreshold), - FaceIouWidthThreshold: __limitedParseFloat32(output.FaceIouWidthThreshold), - OvalHeightWidthRatio: __limitedParseFloat32(output.OvalHeightWidthRatio), - OvalIouHeightThreshold: __limitedParseFloat32(output.OvalIouHeightThreshold), - OvalIouThreshold: __limitedParseFloat32(output.OvalIouThreshold), - OvalIouWidthThreshold: __limitedParseFloat32(output.OvalIouWidthThreshold), - } as any; + return take(output, { + BlazeFaceDetectionThreshold: __limitedParseFloat32, + FaceDistanceThreshold: __limitedParseFloat32, + FaceDistanceThresholdMax: __limitedParseFloat32, + FaceDistanceThresholdMin: __limitedParseFloat32, + FaceIouHeightThreshold: __limitedParseFloat32, + FaceIouWidthThreshold: __limitedParseFloat32, + OvalHeightWidthRatio: __limitedParseFloat32, + OvalIouHeightThreshold: __limitedParseFloat32, + OvalIouThreshold: __limitedParseFloat32, + OvalIouWidthThreshold: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_restJson1ColorComponentList - */ -const de_ColorComponentList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_ColorComponentList omitted. /** * deserializeAws_restJson1ColorSequence */ const de_ColorSequence = (output: any, context: __SerdeContext): ColorSequence => { - return { - DownscrollDuration: __limitedParseFloat32(output.DownscrollDuration), - FlatDisplayDuration: __limitedParseFloat32(output.FlatDisplayDuration), - FreshnessColor: output.FreshnessColor != null ? de_FreshnessColor(output.FreshnessColor, context) : undefined, - } as any; + return take(output, { + DownscrollDuration: __limitedParseFloat32, + FlatDisplayDuration: __limitedParseFloat32, + FreshnessColor: _json, + }) as any; }; /** @@ -619,22 +566,12 @@ const de_ColorSequences = (output: any, context: __SerdeContext): ColorSequence[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ColorSequence(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DisconnectionEvent - */ -const de_DisconnectionEvent = (output: any, context: __SerdeContext): DisconnectionEvent => { - return { - TimestampMillis: __expectLong(output.TimestampMillis), - } as any; -}; +// de_DisconnectionEvent omitted. /** * deserializeAws_restJson1FaceMovementAndLightServerChallenge @@ -643,33 +580,26 @@ const de_FaceMovementAndLightServerChallenge = ( output: any, context: __SerdeContext ): FaceMovementAndLightServerChallenge => { - return { - ChallengeConfig: output.ChallengeConfig != null ? de_ChallengeConfig(output.ChallengeConfig, context) : undefined, - ColorSequences: output.ColorSequences != null ? de_ColorSequences(output.ColorSequences, context) : undefined, - LightChallengeType: __expectString(output.LightChallengeType), - OvalParameters: output.OvalParameters != null ? de_OvalParameters(output.OvalParameters, context) : undefined, - } as any; + return take(output, { + ChallengeConfig: (_: any) => de_ChallengeConfig(_, context), + ColorSequences: (_: any) => de_ColorSequences(_, context), + LightChallengeType: __expectString, + OvalParameters: (_: any) => de_OvalParameters(_, context), + }) as any; }; -/** - * deserializeAws_restJson1FreshnessColor - */ -const de_FreshnessColor = (output: any, context: __SerdeContext): FreshnessColor => { - return { - RGB: output.RGB != null ? de_ColorComponentList(output.RGB, context) : undefined, - } as any; -}; +// de_FreshnessColor omitted. /** * deserializeAws_restJson1OvalParameters */ const de_OvalParameters = (output: any, context: __SerdeContext): OvalParameters => { - return { - CenterX: __limitedParseFloat32(output.CenterX), - CenterY: __limitedParseFloat32(output.CenterY), - Height: __limitedParseFloat32(output.Height), - Width: __limitedParseFloat32(output.Width), - } as any; + return take(output, { + CenterX: __limitedParseFloat32, + CenterY: __limitedParseFloat32, + Height: __limitedParseFloat32, + Width: __limitedParseFloat32, + }) as any; }; /** @@ -691,19 +621,18 @@ const de_ServerChallenge = (output: any, context: __SerdeContext): ServerChallen * deserializeAws_restJson1ServerSessionInformationEvent */ const de_ServerSessionInformationEvent = (output: any, context: __SerdeContext): ServerSessionInformationEvent => { - return { - SessionInformation: - output.SessionInformation != null ? de_SessionInformation(output.SessionInformation, context) : undefined, - } as any; + return take(output, { + SessionInformation: (_: any) => de_SessionInformation(_, context), + }) as any; }; /** * deserializeAws_restJson1SessionInformation */ const de_SessionInformation = (output: any, context: __SerdeContext): SessionInformation => { - return { - Challenge: output.Challenge != null ? de_ServerChallenge(__expectUnion(output.Challenge), context) : undefined, - } as any; + return take(output, { + Challenge: (_: any) => de_ServerChallenge(__expectUnion(_), context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-resiliencehub/src/protocols/Aws_restJson1.ts b/clients/client-resiliencehub/src/protocols/Aws_restJson1.ts index 7cd5ee73f0fc..a07df76e5a60 100644 --- a/clients/client-resiliencehub/src/protocols/Aws_restJson1.ts +++ b/clients/client-resiliencehub/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,10 +11,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -193,45 +195,31 @@ import { } from "../commands/UpdateResiliencyPolicyCommand"; import { AccessDeniedException, - AlarmRecommendation, App, AppAssessment, AppAssessmentSummary, - AppComponent, AppComponentCompliance, - AppInputSource, AppSummary, - AppVersionSummary, ComponentRecommendation, ConfigRecommendation, ConflictException, Cost, - DisruptionCompliance, DisruptionType, EksSource, EksSourceClusterNamespace, FailurePolicy, InternalServerException, LogicalResourceId, - PhysicalResource, PhysicalResourceId, - RecommendationDisruptionCompliance, - RecommendationItem, RecommendationTemplate, RenderRecommendationType, ResiliencyPolicy, ResiliencyScore, - ResourceError, - ResourceErrorsDetails, ResourceMapping, ResourceNotFoundException, - S3Location, ServiceQuotaExceededException, - SopRecommendation, TerraformSource, - TestRecommendation, ThrottlingException, - UnsupportedResource, ValidationException, } from "../models/models_0"; import { ResiliencehubServiceException as __BaseException } from "../models/ResiliencehubServiceException"; @@ -250,12 +238,12 @@ export const se_AddDraftAppVersionResourceMappingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/add-draft-app-version-resource-mappings"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.resourceMappings != null && { - resourceMappings: se_ResourceMappingList(input.resourceMappings, context), - }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + resourceMappings: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -280,14 +268,16 @@ export const se_CreateAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-app"; let body: any; - body = JSON.stringify({ - ...(input.assessmentSchedule != null && { assessmentSchedule: input.assessmentSchedule }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.policyArn != null && { policyArn: input.policyArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + assessmentSchedule: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + policyArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -313,14 +303,16 @@ export const se_CreateAppVersionAppComponentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-app-version-app-component"; let body: any; - body = JSON.stringify({ - ...(input.additionalInfo != null && { additionalInfo: se_AdditionalInfoMap(input.additionalInfo, context) }), - ...(input.appArn != null && { appArn: input.appArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + additionalInfo: (_) => _json(_), + appArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + id: [], + name: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -346,20 +338,20 @@ export const se_CreateAppVersionResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-app-version-resource"; let body: any; - body = JSON.stringify({ - ...(input.additionalInfo != null && { additionalInfo: se_AdditionalInfoMap(input.additionalInfo, context) }), - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appComponents != null && { appComponents: se_AppComponentNameList(input.appComponents, context) }), - ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.logicalResourceId != null && { - logicalResourceId: se_LogicalResourceId(input.logicalResourceId, context), - }), - ...(input.physicalResourceId != null && { physicalResourceId: input.physicalResourceId }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }); + body = JSON.stringify( + take(input, { + additionalInfo: (_) => _json(_), + appArn: [], + appComponents: (_) => _json(_), + awsAccountId: [], + awsRegion: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + logicalResourceId: (_) => _json(_), + physicalResourceId: [], + resourceName: [], + resourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -385,20 +377,18 @@ export const se_CreateRecommendationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-recommendation-template"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - ...(input.bucketName != null && { bucketName: input.bucketName }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.format != null && { format: input.format }), - ...(input.name != null && { name: input.name }), - ...(input.recommendationIds != null && { - recommendationIds: se_RecommendationIdList(input.recommendationIds, context), - }), - ...(input.recommendationTypes != null && { - recommendationTypes: se_RenderRecommendationTypeList(input.recommendationTypes, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + bucketName: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + format: [], + name: [], + recommendationIds: (_) => _json(_), + recommendationTypes: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -424,15 +414,17 @@ export const se_CreateResiliencyPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-resiliency-policy"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.dataLocationConstraint != null && { dataLocationConstraint: input.dataLocationConstraint }), - ...(input.policy != null && { policy: se_DisruptionPolicy(input.policy, context) }), - ...(input.policyDescription != null && { policyDescription: input.policyDescription }), - ...(input.policyName != null && { policyName: input.policyName }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.tier != null && { tier: input.tier }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + dataLocationConstraint: [], + policy: (_) => _json(_), + policyDescription: [], + policyName: [], + tags: (_) => _json(_), + tier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -457,11 +449,13 @@ export const se_DeleteAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-app"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.forceDelete != null && { forceDelete: input.forceDelete }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + forceDelete: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -486,10 +480,12 @@ export const se_DeleteAppAssessmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-app-assessment"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -515,15 +511,15 @@ export const se_DeleteAppInputSourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-app-input-source"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.eksSourceClusterNamespace != null && { - eksSourceClusterNamespace: se_EksSourceClusterNamespace(input.eksSourceClusterNamespace, context), - }), - ...(input.sourceArn != null && { sourceArn: input.sourceArn }), - ...(input.terraformSource != null && { terraformSource: se_TerraformSource(input.terraformSource, context) }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + eksSourceClusterNamespace: (_) => _json(_), + sourceArn: [], + terraformSource: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -549,11 +545,13 @@ export const se_DeleteAppVersionAppComponentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-app-version-app-component"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.id != null && { id: input.id }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + id: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -579,17 +577,17 @@ export const se_DeleteAppVersionResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-app-version-resource"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.logicalResourceId != null && { - logicalResourceId: se_LogicalResourceId(input.logicalResourceId, context), - }), - ...(input.physicalResourceId != null && { physicalResourceId: input.physicalResourceId }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + awsAccountId: [], + awsRegion: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + logicalResourceId: (_) => _json(_), + physicalResourceId: [], + resourceName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -615,10 +613,12 @@ export const se_DeleteRecommendationTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-recommendation-template"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.recommendationTemplateArn != null && { recommendationTemplateArn: input.recommendationTemplateArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + recommendationTemplateArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -644,10 +644,12 @@ export const se_DeleteResiliencyPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-resiliency-policy"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.policyArn != null && { policyArn: input.policyArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + policyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -672,9 +674,11 @@ export const se_DescribeAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -700,9 +704,11 @@ export const se_DescribeAppAssessmentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app-assessment"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -727,10 +733,12 @@ export const se_DescribeAppVersionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app-version"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -756,11 +764,13 @@ export const se_DescribeAppVersionAppComponentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app-version-app-component"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.id != null && { id: input.id }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + id: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -786,17 +796,17 @@ export const se_DescribeAppVersionResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app-version-resource"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.logicalResourceId != null && { - logicalResourceId: se_LogicalResourceId(input.logicalResourceId, context), - }), - ...(input.physicalResourceId != null && { physicalResourceId: input.physicalResourceId }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + awsAccountId: [], + awsRegion: [], + logicalResourceId: (_) => _json(_), + physicalResourceId: [], + resourceName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -823,11 +833,13 @@ export const se_DescribeAppVersionResourcesResolutionStatusCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app-version-resources-resolution-status"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.resolutionId != null && { resolutionId: input.resolutionId }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + resolutionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -853,10 +865,12 @@ export const se_DescribeAppVersionTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-app-version-template"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -883,9 +897,11 @@ export const se_DescribeDraftAppVersionResourcesImportStatusCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-draft-app-version-resources-import-status"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -911,9 +927,11 @@ export const se_DescribeResiliencyPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describe-resiliency-policy"; let body: any; - body = JSON.stringify({ - ...(input.policyArn != null && { policyArn: input.policyArn }), - }); + body = JSON.stringify( + take(input, { + policyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -939,15 +957,15 @@ export const se_ImportResourcesToDraftAppVersionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/import-resources-to-draft-app-version"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.eksSources != null && { eksSources: se_EksSourceList(input.eksSources, context) }), - ...(input.importStrategy != null && { importStrategy: input.importStrategy }), - ...(input.sourceArns != null && { sourceArns: se_ArnList(input.sourceArns, context) }), - ...(input.terraformSources != null && { - terraformSources: se_TerraformSourceList(input.terraformSources, context), - }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + eksSources: (_) => _json(_), + importStrategy: [], + sourceArns: (_) => _json(_), + terraformSources: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -973,11 +991,13 @@ export const se_ListAlarmRecommendationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-alarm-recommendations"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1039,11 +1059,13 @@ export const se_ListAppComponentCompliancesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-component-compliances"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1069,11 +1091,13 @@ export const se_ListAppComponentRecommendationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-component-recommendations"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1099,12 +1123,14 @@ export const se_ListAppInputSourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-input-sources"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1159,12 +1185,14 @@ export const se_ListAppVersionAppComponentsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-version-app-components"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1190,12 +1218,14 @@ export const se_ListAppVersionResourceMappingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-version-resource-mappings"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1221,13 +1251,15 @@ export const se_ListAppVersionResourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-version-resources"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resolutionId != null && { resolutionId: input.resolutionId }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + maxResults: [], + nextToken: [], + resolutionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1252,11 +1284,13 @@ export const se_ListAppVersionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-app-versions"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1344,11 +1378,13 @@ export const se_ListSopRecommendationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-sop-recommendations"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1425,11 +1461,13 @@ export const se_ListTestRecommendationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-test-recommendations"; let body: any; - body = JSON.stringify({ - ...(input.assessmentArn != null && { assessmentArn: input.assessmentArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + assessmentArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1455,13 +1493,15 @@ export const se_ListUnsupportedAppVersionResourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-unsupported-app-version-resources"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.resolutionId != null && { resolutionId: input.resolutionId }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + maxResults: [], + nextToken: [], + resolutionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1486,9 +1526,11 @@ export const se_PublishAppVersionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/publish-app-version"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1514,10 +1556,12 @@ export const se_PutDraftAppVersionTemplateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-draft-app-version-template"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appTemplateBody != null && { appTemplateBody: input.appTemplateBody }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appTemplateBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1544,21 +1588,17 @@ export const se_RemoveDraftAppVersionResourceMappingsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/remove-draft-app-version-resource-mappings"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appRegistryAppNames != null && { - appRegistryAppNames: se_EntityNameList(input.appRegistryAppNames, context), - }), - ...(input.eksSourceNames != null && { eksSourceNames: se_String255List(input.eksSourceNames, context) }), - ...(input.logicalStackNames != null && { logicalStackNames: se_String255List(input.logicalStackNames, context) }), - ...(input.resourceGroupNames != null && { - resourceGroupNames: se_EntityNameList(input.resourceGroupNames, context), - }), - ...(input.resourceNames != null && { resourceNames: se_EntityNameList(input.resourceNames, context) }), - ...(input.terraformSourceNames != null && { - terraformSourceNames: se_String255List(input.terraformSourceNames, context), - }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appRegistryAppNames: (_) => _json(_), + eksSourceNames: (_) => _json(_), + logicalStackNames: (_) => _json(_), + resourceGroupNames: (_) => _json(_), + resourceNames: (_) => _json(_), + terraformSourceNames: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1584,10 +1624,12 @@ export const se_ResolveAppVersionResourcesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resolve-app-version-resources"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1612,13 +1654,15 @@ export const se_StartAppAssessmentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-app-assessment"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appVersion != null && { appVersion: input.appVersion }), - ...(input.assessmentName != null && { assessmentName: input.assessmentName }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + appVersion: [], + assessmentName: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1644,9 +1688,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1701,13 +1747,15 @@ export const se_UpdateAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-app"; let body: any; - body = JSON.stringify({ - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.assessmentSchedule != null && { assessmentSchedule: input.assessmentSchedule }), - ...(input.clearResiliencyPolicyArn != null && { clearResiliencyPolicyArn: input.clearResiliencyPolicyArn }), - ...(input.description != null && { description: input.description }), - ...(input.policyArn != null && { policyArn: input.policyArn }), - }); + body = JSON.stringify( + take(input, { + appArn: [], + assessmentSchedule: [], + clearResiliencyPolicyArn: [], + description: [], + policyArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1732,10 +1780,12 @@ export const se_UpdateAppVersionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-app-version"; let body: any; - body = JSON.stringify({ - ...(input.additionalInfo != null && { additionalInfo: se_AdditionalInfoMap(input.additionalInfo, context) }), - ...(input.appArn != null && { appArn: input.appArn }), - }); + body = JSON.stringify( + take(input, { + additionalInfo: (_) => _json(_), + appArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1761,13 +1811,15 @@ export const se_UpdateAppVersionAppComponentCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-app-version-app-component"; let body: any; - body = JSON.stringify({ - ...(input.additionalInfo != null && { additionalInfo: se_AdditionalInfoMap(input.additionalInfo, context) }), - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + additionalInfo: (_) => _json(_), + appArn: [], + id: [], + name: [], + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1793,20 +1845,20 @@ export const se_UpdateAppVersionResourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-app-version-resource"; let body: any; - body = JSON.stringify({ - ...(input.additionalInfo != null && { additionalInfo: se_AdditionalInfoMap(input.additionalInfo, context) }), - ...(input.appArn != null && { appArn: input.appArn }), - ...(input.appComponents != null && { appComponents: se_AppComponentNameList(input.appComponents, context) }), - ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.excluded != null && { excluded: input.excluded }), - ...(input.logicalResourceId != null && { - logicalResourceId: se_LogicalResourceId(input.logicalResourceId, context), - }), - ...(input.physicalResourceId != null && { physicalResourceId: input.physicalResourceId }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.resourceType != null && { resourceType: input.resourceType }), - }); + body = JSON.stringify( + take(input, { + additionalInfo: (_) => _json(_), + appArn: [], + appComponents: (_) => _json(_), + awsAccountId: [], + awsRegion: [], + excluded: [], + logicalResourceId: (_) => _json(_), + physicalResourceId: [], + resourceName: [], + resourceType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1832,14 +1884,16 @@ export const se_UpdateResiliencyPolicyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-resiliency-policy"; let body: any; - body = JSON.stringify({ - ...(input.dataLocationConstraint != null && { dataLocationConstraint: input.dataLocationConstraint }), - ...(input.policy != null && { policy: se_DisruptionPolicy(input.policy, context) }), - ...(input.policyArn != null && { policyArn: input.policyArn }), - ...(input.policyDescription != null && { policyDescription: input.policyDescription }), - ...(input.policyName != null && { policyName: input.policyName }), - ...(input.tier != null && { tier: input.tier }), - }); + body = JSON.stringify( + take(input, { + dataLocationConstraint: [], + policy: (_) => _json(_), + policyArn: [], + policyDescription: [], + policyName: [], + tier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1865,15 +1919,12 @@ export const de_AddDraftAppVersionResourceMappingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.resourceMappings != null) { - contents.resourceMappings = de_ResourceMappingList(data.resourceMappings, context); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + resourceMappings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1910,10 +1961,9 @@ const de_AddDraftAppVersionResourceMappingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1933,9 +1983,10 @@ export const de_CreateAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1975,10 +2026,9 @@ const de_CreateAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1998,15 +2048,12 @@ export const de_CreateAppVersionAppComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appComponent != null) { - contents.appComponent = de_AppComponent(data.appComponent, context); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appComponent: _json, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2046,10 +2093,9 @@ const de_CreateAppVersionAppComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2069,15 +2115,12 @@ export const de_CreateAppVersionResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.physicalResource != null) { - contents.physicalResource = de_PhysicalResource(data.physicalResource, context); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + physicalResource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2117,10 +2160,9 @@ const de_CreateAppVersionResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2140,9 +2182,10 @@ export const de_CreateRecommendationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.recommendationTemplate != null) { - contents.recommendationTemplate = de_RecommendationTemplate(data.recommendationTemplate, context); - } + const doc = take(data, { + recommendationTemplate: (_) => de_RecommendationTemplate(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2182,10 +2225,9 @@ const de_CreateRecommendationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2205,9 +2247,10 @@ export const de_CreateResiliencyPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResiliencyPolicy(data.policy, context); - } + const doc = take(data, { + policy: (_) => de_ResiliencyPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2244,10 +2287,9 @@ const de_CreateResiliencyPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2267,9 +2309,10 @@ export const de_DeleteAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } + const doc = take(data, { + appArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2303,10 +2346,9 @@ const de_DeleteAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2326,12 +2368,11 @@ export const de_DeleteAppAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentArn != null) { - contents.assessmentArn = __expectString(data.assessmentArn); - } - if (data.assessmentStatus != null) { - contents.assessmentStatus = __expectString(data.assessmentStatus); - } + const doc = take(data, { + assessmentArn: __expectString, + assessmentStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2368,10 +2409,9 @@ const de_DeleteAppAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2391,12 +2431,11 @@ export const de_DeleteAppInputSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appInputSource != null) { - contents.appInputSource = de_AppInputSource(data.appInputSource, context); - } + const doc = take(data, { + appArn: __expectString, + appInputSource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2433,10 +2472,9 @@ const de_DeleteAppInputSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2456,15 +2494,12 @@ export const de_DeleteAppVersionAppComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appComponent != null) { - contents.appComponent = de_AppComponent(data.appComponent, context); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appComponent: _json, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2501,10 +2536,9 @@ const de_DeleteAppVersionAppComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2524,15 +2558,12 @@ export const de_DeleteAppVersionResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.physicalResource != null) { - contents.physicalResource = de_PhysicalResource(data.physicalResource, context); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + physicalResource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2569,10 +2600,9 @@ const de_DeleteAppVersionResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2592,12 +2622,11 @@ export const de_DeleteRecommendationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.recommendationTemplateArn != null) { - contents.recommendationTemplateArn = __expectString(data.recommendationTemplateArn); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + recommendationTemplateArn: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2631,10 +2660,9 @@ const de_DeleteRecommendationTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2654,9 +2682,10 @@ export const de_DeleteResiliencyPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policyArn != null) { - contents.policyArn = __expectString(data.policyArn); - } + const doc = take(data, { + policyArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2693,10 +2722,9 @@ const de_DeleteResiliencyPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2716,9 +2744,10 @@ export const de_DescribeAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2752,10 +2781,9 @@ const de_DescribeAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2775,9 +2803,10 @@ export const de_DescribeAppAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessment != null) { - contents.assessment = de_AppAssessment(data.assessment, context); - } + const doc = take(data, { + assessment: (_) => de_AppAssessment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2811,10 +2840,9 @@ const de_DescribeAppAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2834,15 +2862,12 @@ export const de_DescribeAppVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalInfo != null) { - contents.additionalInfo = de_AdditionalInfoMap(data.additionalInfo, context); - } - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + additionalInfo: _json, + appArn: __expectString, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2876,10 +2901,9 @@ const de_DescribeAppVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2899,15 +2923,12 @@ export const de_DescribeAppVersionAppComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appComponent != null) { - contents.appComponent = de_AppComponent(data.appComponent, context); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appComponent: _json, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2944,10 +2965,9 @@ const de_DescribeAppVersionAppComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2967,15 +2987,12 @@ export const de_DescribeAppVersionResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.physicalResource != null) { - contents.physicalResource = de_PhysicalResource(data.physicalResource, context); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + physicalResource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3012,10 +3029,9 @@ const de_DescribeAppVersionResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3035,21 +3051,14 @@ export const de_DescribeAppVersionResourcesResolutionStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.errorMessage != null) { - contents.errorMessage = __expectString(data.errorMessage); - } - if (data.resolutionId != null) { - contents.resolutionId = __expectString(data.resolutionId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + errorMessage: __expectString, + resolutionId: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3083,10 +3092,9 @@ const de_DescribeAppVersionResourcesResolutionStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3106,15 +3114,12 @@ export const de_DescribeAppVersionTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appTemplateBody != null) { - contents.appTemplateBody = __expectString(data.appTemplateBody); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appTemplateBody: __expectString, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3148,10 +3153,9 @@ const de_DescribeAppVersionTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3171,21 +3175,14 @@ export const de_DescribeDraftAppVersionResourcesImportStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.errorMessage != null) { - contents.errorMessage = __expectString(data.errorMessage); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusChangeTime != null) { - contents.statusChangeTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.statusChangeTime))); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + errorMessage: __expectString, + status: __expectString, + statusChangeTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -3219,10 +3216,9 @@ const de_DescribeDraftAppVersionResourcesImportStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3242,9 +3238,10 @@ export const de_DescribeResiliencyPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResiliencyPolicy(data.policy, context); - } + const doc = take(data, { + policy: (_) => de_ResiliencyPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3278,10 +3275,9 @@ const de_DescribeResiliencyPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3301,24 +3297,15 @@ export const de_ImportResourcesToDraftAppVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.eksSources != null) { - contents.eksSources = de_EksSourceList(data.eksSources, context); - } - if (data.sourceArns != null) { - contents.sourceArns = de_ArnList(data.sourceArns, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.terraformSources != null) { - contents.terraformSources = de_TerraformSourceList(data.terraformSources, context); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + eksSources: _json, + sourceArns: _json, + status: __expectString, + terraformSources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3355,10 +3342,9 @@ const de_ImportResourcesToDraftAppVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3378,12 +3364,11 @@ export const de_ListAlarmRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.alarmRecommendations != null) { - contents.alarmRecommendations = de_AlarmRecommendationList(data.alarmRecommendations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + alarmRecommendations: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3417,10 +3402,9 @@ const de_ListAlarmRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3440,12 +3424,11 @@ export const de_ListAppAssessmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessmentSummaries != null) { - contents.assessmentSummaries = de_AppAssessmentSummaryList(data.assessmentSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assessmentSummaries: (_) => de_AppAssessmentSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3479,10 +3462,9 @@ const de_ListAppAssessmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3502,12 +3484,11 @@ export const de_ListAppComponentCompliancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentCompliances != null) { - contents.componentCompliances = de_ComponentCompliancesList(data.componentCompliances, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + componentCompliances: (_) => de_ComponentCompliancesList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3541,10 +3522,9 @@ const de_ListAppComponentCompliancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3564,12 +3544,11 @@ export const de_ListAppComponentRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.componentRecommendations != null) { - contents.componentRecommendations = de_ComponentRecommendationList(data.componentRecommendations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + componentRecommendations: (_) => de_ComponentRecommendationList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3603,10 +3582,9 @@ const de_ListAppComponentRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3626,12 +3604,11 @@ export const de_ListAppInputSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appInputSources != null) { - contents.appInputSources = de_AppInputSourceList(data.appInputSources, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + appInputSources: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3665,10 +3642,9 @@ const de_ListAppInputSourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3688,12 +3664,11 @@ export const de_ListAppsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appSummaries != null) { - contents.appSummaries = de_AppSummaryList(data.appSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + appSummaries: (_) => de_AppSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3724,10 +3699,9 @@ const de_ListAppsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3747,18 +3721,13 @@ export const de_ListAppVersionAppComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appComponents != null) { - contents.appComponents = de_AppComponentList(data.appComponents, context); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + appArn: __expectString, + appComponents: _json, + appVersion: __expectString, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3795,10 +3764,9 @@ const de_ListAppVersionAppComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3818,12 +3786,11 @@ export const de_ListAppVersionResourceMappingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resourceMappings != null) { - contents.resourceMappings = de_ResourceMappingList(data.resourceMappings, context); - } + const doc = take(data, { + nextToken: __expectString, + resourceMappings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3857,10 +3824,9 @@ const de_ListAppVersionResourceMappingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3880,15 +3846,12 @@ export const de_ListAppVersionResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.physicalResources != null) { - contents.physicalResources = de_PhysicalResourceList(data.physicalResources, context); - } - if (data.resolutionId != null) { - contents.resolutionId = __expectString(data.resolutionId); - } + const doc = take(data, { + nextToken: __expectString, + physicalResources: _json, + resolutionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3925,10 +3888,9 @@ const de_ListAppVersionResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3948,12 +3910,11 @@ export const de_ListAppVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appVersions != null) { - contents.appVersions = de_AppVersionList(data.appVersions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + appVersions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3984,10 +3945,9 @@ const de_ListAppVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4007,12 +3967,11 @@ export const de_ListRecommendationTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.recommendationTemplates != null) { - contents.recommendationTemplates = de_RecommendationTemplateList(data.recommendationTemplates, context); - } + const doc = take(data, { + nextToken: __expectString, + recommendationTemplates: (_) => de_RecommendationTemplateList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4043,10 +4002,9 @@ const de_ListRecommendationTemplatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4066,12 +4024,11 @@ export const de_ListResiliencyPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resiliencyPolicies != null) { - contents.resiliencyPolicies = de_ResiliencyPolicies(data.resiliencyPolicies, context); - } + const doc = take(data, { + nextToken: __expectString, + resiliencyPolicies: (_) => de_ResiliencyPolicies(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4105,10 +4062,9 @@ const de_ListResiliencyPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4128,12 +4084,11 @@ export const de_ListSopRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sopRecommendations != null) { - contents.sopRecommendations = de_SopRecommendationList(data.sopRecommendations, context); - } + const doc = take(data, { + nextToken: __expectString, + sopRecommendations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4170,10 +4125,9 @@ const de_ListSopRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4193,12 +4147,11 @@ export const de_ListSuggestedResiliencyPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resiliencyPolicies != null) { - contents.resiliencyPolicies = de_ResiliencyPolicies(data.resiliencyPolicies, context); - } + const doc = take(data, { + nextToken: __expectString, + resiliencyPolicies: (_) => de_ResiliencyPolicies(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4232,10 +4185,9 @@ const de_ListSuggestedResiliencyPoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4255,9 +4207,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4291,10 +4244,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4314,12 +4266,11 @@ export const de_ListTestRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.testRecommendations != null) { - contents.testRecommendations = de_TestRecommendationList(data.testRecommendations, context); - } + const doc = take(data, { + nextToken: __expectString, + testRecommendations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4356,10 +4307,9 @@ const de_ListTestRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4379,15 +4329,12 @@ export const de_ListUnsupportedAppVersionResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resolutionId != null) { - contents.resolutionId = __expectString(data.resolutionId); - } - if (data.unsupportedResources != null) { - contents.unsupportedResources = de_UnsupportedResourceList(data.unsupportedResources, context); - } + const doc = take(data, { + nextToken: __expectString, + resolutionId: __expectString, + unsupportedResources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4424,10 +4371,9 @@ const de_ListUnsupportedAppVersionResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4447,12 +4393,11 @@ export const de_PublishAppVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4489,10 +4434,9 @@ const de_PublishAppVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4512,12 +4456,11 @@ export const de_PutDraftAppVersionTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4554,10 +4497,9 @@ const de_PutDraftAppVersionTemplateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4577,12 +4519,11 @@ export const de_RemoveDraftAppVersionResourceMappingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4619,10 +4560,9 @@ const de_RemoveDraftAppVersionResourceMappingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4642,18 +4582,13 @@ export const de_ResolveAppVersionResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.resolutionId != null) { - contents.resolutionId = __expectString(data.resolutionId); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + resolutionId: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4690,10 +4625,9 @@ const de_ResolveAppVersionResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4713,9 +4647,10 @@ export const de_StartAppAssessmentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assessment != null) { - contents.assessment = de_AppAssessment(data.assessment, context); - } + const doc = take(data, { + assessment: (_) => de_AppAssessment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4755,10 +4690,9 @@ const de_StartAppAssessmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4811,10 +4745,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4867,10 +4800,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4890,9 +4822,10 @@ export const de_UpdateAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.app != null) { - contents.app = de_App(data.app, context); - } + const doc = take(data, { + app: (_) => de_App(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4929,10 +4862,9 @@ const de_UpdateAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4952,15 +4884,12 @@ export const de_UpdateAppVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.additionalInfo != null) { - contents.additionalInfo = de_AdditionalInfoMap(data.additionalInfo, context); - } - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + additionalInfo: _json, + appArn: __expectString, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4997,10 +4926,9 @@ const de_UpdateAppVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5020,15 +4948,12 @@ export const de_UpdateAppVersionAppComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appComponent != null) { - contents.appComponent = de_AppComponent(data.appComponent, context); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } + const doc = take(data, { + appArn: __expectString, + appComponent: _json, + appVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5065,10 +4990,9 @@ const de_UpdateAppVersionAppComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5088,15 +5012,12 @@ export const de_UpdateAppVersionResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.appArn != null) { - contents.appArn = __expectString(data.appArn); - } - if (data.appVersion != null) { - contents.appVersion = __expectString(data.appVersion); - } - if (data.physicalResource != null) { - contents.physicalResource = de_PhysicalResource(data.physicalResource, context); - } + const doc = take(data, { + appArn: __expectString, + appVersion: __expectString, + physicalResource: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5136,10 +5057,9 @@ const de_UpdateAppVersionResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5159,9 +5079,10 @@ export const de_UpdateResiliencyPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = de_ResiliencyPolicy(data.policy, context); - } + const doc = take(data, { + policy: (_) => de_ResiliencyPolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5198,16 +5119,15 @@ const de_UpdateResiliencyPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -5217,9 +5137,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5233,15 +5154,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5258,9 +5176,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5277,15 +5196,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5302,9 +5218,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5318,12 +5235,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.retryAfterSeconds != null) { - contents.retryAfterSeconds = __expectInt32(data.retryAfterSeconds); - } + const doc = take(data, { + message: __expectString, + retryAfterSeconds: __expectInt32, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5337,9 +5253,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5347,403 +5264,120 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdditionalInfoMap - */ -const se_AdditionalInfoMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AdditionalInfoValueList(value, context); - return acc; - }, {}); -}; +// se_AdditionalInfoMap omitted. -/** - * serializeAws_restJson1AdditionalInfoValueList - */ -const se_AdditionalInfoValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalInfoValueList omitted. -/** - * serializeAws_restJson1AppComponentNameList - */ -const se_AppComponentNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AppComponentNameList omitted. -/** - * serializeAws_restJson1ArnList - */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ArnList omitted. -/** - * serializeAws_restJson1DisruptionPolicy - */ -const se_DisruptionPolicy = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [DisruptionType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_FailurePolicy(value, context); - return acc; - }, {}); -}; +// se_DisruptionPolicy omitted. -/** - * serializeAws_restJson1EksNamespaceList - */ -const se_EksNamespaceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EksNamespaceList omitted. -/** - * serializeAws_restJson1EksSource - */ -const se_EksSource = (input: EksSource, context: __SerdeContext): any => { - return { - ...(input.eksClusterArn != null && { eksClusterArn: input.eksClusterArn }), - ...(input.namespaces != null && { namespaces: se_EksNamespaceList(input.namespaces, context) }), - }; -}; +// se_EksSource omitted. -/** - * serializeAws_restJson1EksSourceClusterNamespace - */ -const se_EksSourceClusterNamespace = (input: EksSourceClusterNamespace, context: __SerdeContext): any => { - return { - ...(input.eksClusterArn != null && { eksClusterArn: input.eksClusterArn }), - ...(input.namespace != null && { namespace: input.namespace }), - }; -}; +// se_EksSourceClusterNamespace omitted. -/** - * serializeAws_restJson1EksSourceList - */ -const se_EksSourceList = (input: EksSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EksSource(entry, context); - }); -}; +// se_EksSourceList omitted. -/** - * serializeAws_restJson1EntityNameList - */ -const se_EntityNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EntityNameList omitted. -/** - * serializeAws_restJson1FailurePolicy - */ -const se_FailurePolicy = (input: FailurePolicy, context: __SerdeContext): any => { - return { - ...(input.rpoInSecs != null && { rpoInSecs: input.rpoInSecs }), - ...(input.rtoInSecs != null && { rtoInSecs: input.rtoInSecs }), - }; -}; +// se_FailurePolicy omitted. -/** - * serializeAws_restJson1LogicalResourceId - */ -const se_LogicalResourceId = (input: LogicalResourceId, context: __SerdeContext): any => { - return { - ...(input.eksSourceName != null && { eksSourceName: input.eksSourceName }), - ...(input.identifier != null && { identifier: input.identifier }), - ...(input.logicalStackName != null && { logicalStackName: input.logicalStackName }), - ...(input.resourceGroupName != null && { resourceGroupName: input.resourceGroupName }), - ...(input.terraformSourceName != null && { terraformSourceName: input.terraformSourceName }), - }; -}; +// se_LogicalResourceId omitted. -/** - * serializeAws_restJson1PhysicalResourceId - */ -const se_PhysicalResourceId = (input: PhysicalResourceId, context: __SerdeContext): any => { - return { - ...(input.awsAccountId != null && { awsAccountId: input.awsAccountId }), - ...(input.awsRegion != null && { awsRegion: input.awsRegion }), - ...(input.identifier != null && { identifier: input.identifier }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_PhysicalResourceId omitted. -/** - * serializeAws_restJson1RecommendationIdList - */ -const se_RecommendationIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RecommendationIdList omitted. -/** - * serializeAws_restJson1RenderRecommendationTypeList - */ -const se_RenderRecommendationTypeList = ( - input: (RenderRecommendationType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RenderRecommendationTypeList omitted. -/** - * serializeAws_restJson1ResourceMapping - */ -const se_ResourceMapping = (input: ResourceMapping, context: __SerdeContext): any => { - return { - ...(input.appRegistryAppName != null && { appRegistryAppName: input.appRegistryAppName }), - ...(input.eksSourceName != null && { eksSourceName: input.eksSourceName }), - ...(input.logicalStackName != null && { logicalStackName: input.logicalStackName }), - ...(input.mappingType != null && { mappingType: input.mappingType }), - ...(input.physicalResourceId != null && { - physicalResourceId: se_PhysicalResourceId(input.physicalResourceId, context), - }), - ...(input.resourceGroupName != null && { resourceGroupName: input.resourceGroupName }), - ...(input.resourceName != null && { resourceName: input.resourceName }), - ...(input.terraformSourceName != null && { terraformSourceName: input.terraformSourceName }), - }; -}; +// se_ResourceMapping omitted. -/** - * serializeAws_restJson1ResourceMappingList - */ -const se_ResourceMappingList = (input: ResourceMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceMapping(entry, context); - }); -}; +// se_ResourceMappingList omitted. -/** - * serializeAws_restJson1String255List - */ -const se_String255List = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_String255List omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TerraformSource - */ -const se_TerraformSource = (input: TerraformSource, context: __SerdeContext): any => { - return { - ...(input.s3StateFileUrl != null && { s3StateFileUrl: input.s3StateFileUrl }), - }; -}; +// se_TerraformSource omitted. -/** - * serializeAws_restJson1TerraformSourceList - */ -const se_TerraformSourceList = (input: TerraformSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TerraformSource(entry, context); - }); -}; +// se_TerraformSourceList omitted. -/** - * deserializeAws_restJson1AdditionalInfoMap - */ -const de_AdditionalInfoMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AdditionalInfoValueList(value, context); - return acc; - }, {}); -}; +// de_AdditionalInfoMap omitted. -/** - * deserializeAws_restJson1AdditionalInfoValueList - */ -const de_AdditionalInfoValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AdditionalInfoValueList omitted. -/** - * deserializeAws_restJson1AlarmRecommendation - */ -const de_AlarmRecommendation = (output: any, context: __SerdeContext): AlarmRecommendation => { - return { - appComponentName: __expectString(output.appComponentName), - description: __expectString(output.description), - items: output.items != null ? de_RecommendationItemList(output.items, context) : undefined, - name: __expectString(output.name), - prerequisite: __expectString(output.prerequisite), - recommendationId: __expectString(output.recommendationId), - referenceId: __expectString(output.referenceId), - type: __expectString(output.type), - } as any; -}; +// de_AlarmRecommendation omitted. -/** - * deserializeAws_restJson1AlarmRecommendationList - */ -const de_AlarmRecommendationList = (output: any, context: __SerdeContext): AlarmRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlarmRecommendation(entry, context); - }); - return retVal; -}; +// de_AlarmRecommendationList omitted. -/** - * deserializeAws_restJson1AlarmReferenceIdList - */ -const de_AlarmReferenceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AlarmReferenceIdList omitted. /** * deserializeAws_restJson1App */ const de_App = (output: any, context: __SerdeContext): App => { - return { - appArn: __expectString(output.appArn), - assessmentSchedule: __expectString(output.assessmentSchedule), - complianceStatus: __expectString(output.complianceStatus), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - lastAppComplianceEvaluationTime: - output.lastAppComplianceEvaluationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastAppComplianceEvaluationTime))) - : undefined, - lastResiliencyScoreEvaluationTime: - output.lastResiliencyScoreEvaluationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastResiliencyScoreEvaluationTime))) - : undefined, - name: __expectString(output.name), - policyArn: __expectString(output.policyArn), - resiliencyScore: __limitedParseDouble(output.resiliencyScore), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + appArn: __expectString, + assessmentSchedule: __expectString, + complianceStatus: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastAppComplianceEvaluationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastResiliencyScoreEvaluationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + policyArn: __expectString, + resiliencyScore: __limitedParseDouble, + status: __expectString, + tags: _json, + }) as any; }; /** * deserializeAws_restJson1AppAssessment */ const de_AppAssessment = (output: any, context: __SerdeContext): AppAssessment => { - return { - appArn: __expectString(output.appArn), - appVersion: __expectString(output.appVersion), - assessmentArn: __expectString(output.assessmentArn), - assessmentName: __expectString(output.assessmentName), - assessmentStatus: __expectString(output.assessmentStatus), - compliance: output.compliance != null ? de_AssessmentCompliance(output.compliance, context) : undefined, - complianceStatus: __expectString(output.complianceStatus), - cost: output.cost != null ? de_Cost(output.cost, context) : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - invoker: __expectString(output.invoker), - message: __expectString(output.message), - policy: output.policy != null ? de_ResiliencyPolicy(output.policy, context) : undefined, - resiliencyScore: output.resiliencyScore != null ? de_ResiliencyScore(output.resiliencyScore, context) : undefined, - resourceErrorsDetails: - output.resourceErrorsDetails != null - ? de_ResourceErrorsDetails(output.resourceErrorsDetails, context) - : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; + return take(output, { + appArn: __expectString, + appVersion: __expectString, + assessmentArn: __expectString, + assessmentName: __expectString, + assessmentStatus: __expectString, + compliance: _json, + complianceStatus: __expectString, + cost: (_: any) => de_Cost(_, context), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + invoker: __expectString, + message: __expectString, + policy: (_: any) => de_ResiliencyPolicy(_, context), + resiliencyScore: (_: any) => de_ResiliencyScore(_, context), + resourceErrorsDetails: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tags: _json, + }) as any; }; /** * deserializeAws_restJson1AppAssessmentSummary */ const de_AppAssessmentSummary = (output: any, context: __SerdeContext): AppAssessmentSummary => { - return { - appArn: __expectString(output.appArn), - appVersion: __expectString(output.appVersion), - assessmentArn: __expectString(output.assessmentArn), - assessmentName: __expectString(output.assessmentName), - assessmentStatus: __expectString(output.assessmentStatus), - complianceStatus: __expectString(output.complianceStatus), - cost: output.cost != null ? de_Cost(output.cost, context) : undefined, - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - invoker: __expectString(output.invoker), - message: __expectString(output.message), - resiliencyScore: __limitedParseDouble(output.resiliencyScore), - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - } as any; + return take(output, { + appArn: __expectString, + appVersion: __expectString, + assessmentArn: __expectString, + assessmentName: __expectString, + assessmentStatus: __expectString, + complianceStatus: __expectString, + cost: (_: any) => de_Cost(_, context), + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + invoker: __expectString, + message: __expectString, + resiliencyScore: __limitedParseDouble, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -5753,104 +5387,47 @@ const de_AppAssessmentSummaryList = (output: any, context: __SerdeContext): AppA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AppAssessmentSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AppComponent - */ -const de_AppComponent = (output: any, context: __SerdeContext): AppComponent => { - return { - additionalInfo: output.additionalInfo != null ? de_AdditionalInfoMap(output.additionalInfo, context) : undefined, - id: __expectString(output.id), - name: __expectString(output.name), - type: __expectString(output.type), - } as any; -}; +// de_AppComponent omitted. /** * deserializeAws_restJson1AppComponentCompliance */ const de_AppComponentCompliance = (output: any, context: __SerdeContext): AppComponentCompliance => { - return { - appComponentName: __expectString(output.appComponentName), - compliance: output.compliance != null ? de_AssessmentCompliance(output.compliance, context) : undefined, - cost: output.cost != null ? de_Cost(output.cost, context) : undefined, - message: __expectString(output.message), - resiliencyScore: output.resiliencyScore != null ? de_ResiliencyScore(output.resiliencyScore, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + appComponentName: __expectString, + compliance: _json, + cost: (_: any) => de_Cost(_, context), + message: __expectString, + resiliencyScore: (_: any) => de_ResiliencyScore(_, context), + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AppComponentList - */ -const de_AppComponentList = (output: any, context: __SerdeContext): AppComponent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppComponent(entry, context); - }); - return retVal; -}; +// de_AppComponentList omitted. -/** - * deserializeAws_restJson1AppInputSource - */ -const de_AppInputSource = (output: any, context: __SerdeContext): AppInputSource => { - return { - eksSourceClusterNamespace: - output.eksSourceClusterNamespace != null - ? de_EksSourceClusterNamespace(output.eksSourceClusterNamespace, context) - : undefined, - importType: __expectString(output.importType), - resourceCount: __expectInt32(output.resourceCount), - sourceArn: __expectString(output.sourceArn), - sourceName: __expectString(output.sourceName), - terraformSource: output.terraformSource != null ? de_TerraformSource(output.terraformSource, context) : undefined, - } as any; -}; +// de_AppInputSource omitted. -/** - * deserializeAws_restJson1AppInputSourceList - */ -const de_AppInputSourceList = (output: any, context: __SerdeContext): AppInputSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppInputSource(entry, context); - }); - return retVal; -}; +// de_AppInputSourceList omitted. /** * deserializeAws_restJson1AppSummary */ const de_AppSummary = (output: any, context: __SerdeContext): AppSummary => { - return { - appArn: __expectString(output.appArn), - assessmentSchedule: __expectString(output.assessmentSchedule), - complianceStatus: __expectString(output.complianceStatus), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - name: __expectString(output.name), - resiliencyScore: __limitedParseDouble(output.resiliencyScore), - status: __expectString(output.status), - } as any; + return take(output, { + appArn: __expectString, + assessmentSchedule: __expectString, + complianceStatus: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + name: __expectString, + resiliencyScore: __limitedParseDouble, + status: __expectString, + }) as any; }; /** @@ -5860,68 +5437,18 @@ const de_AppSummaryList = (output: any, context: __SerdeContext): AppSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AppSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AppVersionList - */ -const de_AppVersionList = (output: any, context: __SerdeContext): AppVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppVersionSummary(entry, context); - }); - return retVal; -}; +// de_AppVersionList omitted. -/** - * deserializeAws_restJson1AppVersionSummary - */ -const de_AppVersionSummary = (output: any, context: __SerdeContext): AppVersionSummary => { - return { - appVersion: __expectString(output.appVersion), - } as any; -}; +// de_AppVersionSummary omitted. -/** - * deserializeAws_restJson1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArnList omitted. -/** - * deserializeAws_restJson1AssessmentCompliance - */ -const de_AssessmentCompliance = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DisruptionType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_DisruptionCompliance(value, context); - return acc; - }, - {} - ); -}; +// de_AssessmentCompliance omitted. /** * deserializeAws_restJson1ComponentCompliancesList @@ -5930,9 +5457,6 @@ const de_ComponentCompliancesList = (output: any, context: __SerdeContext): AppC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AppComponentCompliance(entry, context); }); return retVal; @@ -5942,14 +5466,11 @@ const de_ComponentCompliancesList = (output: any, context: __SerdeContext): AppC * deserializeAws_restJson1ComponentRecommendation */ const de_ComponentRecommendation = (output: any, context: __SerdeContext): ComponentRecommendation => { - return { - appComponentName: __expectString(output.appComponentName), - configRecommendations: - output.configRecommendations != null - ? de_ConfigRecommendationList(output.configRecommendations, context) - : undefined, - recommendationStatus: __expectString(output.recommendationStatus), - } as any; + return take(output, { + appComponentName: __expectString, + configRecommendations: (_: any) => de_ConfigRecommendationList(_, context), + recommendationStatus: __expectString, + }) as any; }; /** @@ -5959,9 +5480,6 @@ const de_ComponentRecommendationList = (output: any, context: __SerdeContext): C const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ComponentRecommendation(entry, context); }); return retVal; @@ -5971,22 +5489,18 @@ const de_ComponentRecommendationList = (output: any, context: __SerdeContext): C * deserializeAws_restJson1ConfigRecommendation */ const de_ConfigRecommendation = (output: any, context: __SerdeContext): ConfigRecommendation => { - return { - appComponentName: __expectString(output.appComponentName), - compliance: output.compliance != null ? de_AssessmentCompliance(output.compliance, context) : undefined, - cost: output.cost != null ? de_Cost(output.cost, context) : undefined, - description: __expectString(output.description), - haArchitecture: __expectString(output.haArchitecture), - name: __expectString(output.name), - optimizationType: __expectString(output.optimizationType), - recommendationCompliance: - output.recommendationCompliance != null - ? de_RecommendationCompliance(output.recommendationCompliance, context) - : undefined, - referenceId: __expectString(output.referenceId), - suggestedChanges: - output.suggestedChanges != null ? de_SuggestedChangesList(output.suggestedChanges, context) : undefined, - } as any; + return take(output, { + appComponentName: __expectString, + compliance: _json, + cost: (_: any) => de_Cost(_, context), + description: __expectString, + haArchitecture: __expectString, + name: __expectString, + optimizationType: __expectString, + recommendationCompliance: _json, + referenceId: __expectString, + suggestedChanges: _json, + }) as any; }; /** @@ -5996,9 +5510,6 @@ const de_ConfigRecommendationList = (output: any, context: __SerdeContext): Conf const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ConfigRecommendation(entry, context); }); return retVal; @@ -6008,46 +5519,16 @@ const de_ConfigRecommendationList = (output: any, context: __SerdeContext): Conf * deserializeAws_restJson1Cost */ const de_Cost = (output: any, context: __SerdeContext): Cost => { - return { - amount: __limitedParseDouble(output.amount), - currency: __expectString(output.currency), - frequency: __expectString(output.frequency), - } as any; + return take(output, { + amount: __limitedParseDouble, + currency: __expectString, + frequency: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DisruptionCompliance - */ -const de_DisruptionCompliance = (output: any, context: __SerdeContext): DisruptionCompliance => { - return { - achievableRpoInSecs: __expectInt32(output.achievableRpoInSecs), - achievableRtoInSecs: __expectInt32(output.achievableRtoInSecs), - complianceStatus: __expectString(output.complianceStatus), - currentRpoInSecs: __expectInt32(output.currentRpoInSecs), - currentRtoInSecs: __expectInt32(output.currentRtoInSecs), - message: __expectString(output.message), - rpoDescription: __expectString(output.rpoDescription), - rpoReferenceId: __expectString(output.rpoReferenceId), - rtoDescription: __expectString(output.rtoDescription), - rtoReferenceId: __expectString(output.rtoReferenceId), - } as any; -}; +// de_DisruptionCompliance omitted. -/** - * deserializeAws_restJson1DisruptionPolicy - */ -const de_DisruptionPolicy = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DisruptionType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FailurePolicy(value, context); - return acc; - }, - {} - ); -}; +// de_DisruptionPolicy omitted. /** * deserializeAws_restJson1DisruptionResiliencyScore @@ -6062,226 +5543,54 @@ const de_DisruptionResiliencyScore = (output: any, context: __SerdeContext): Rec }, {}); }; -/** - * deserializeAws_restJson1EksNamespaceList - */ -const de_EksNamespaceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EksNamespaceList omitted. -/** - * deserializeAws_restJson1EksSource - */ -const de_EksSource = (output: any, context: __SerdeContext): EksSource => { - return { - eksClusterArn: __expectString(output.eksClusterArn), - namespaces: output.namespaces != null ? de_EksNamespaceList(output.namespaces, context) : undefined, - } as any; -}; +// de_EksSource omitted. -/** - * deserializeAws_restJson1EksSourceClusterNamespace - */ -const de_EksSourceClusterNamespace = (output: any, context: __SerdeContext): EksSourceClusterNamespace => { - return { - eksClusterArn: __expectString(output.eksClusterArn), - namespace: __expectString(output.namespace), - } as any; -}; +// de_EksSourceClusterNamespace omitted. -/** - * deserializeAws_restJson1EksSourceList - */ -const de_EksSourceList = (output: any, context: __SerdeContext): EksSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EksSource(entry, context); - }); - return retVal; -}; +// de_EksSourceList omitted. -/** - * deserializeAws_restJson1FailurePolicy - */ -const de_FailurePolicy = (output: any, context: __SerdeContext): FailurePolicy => { - return { - rpoInSecs: __expectInt32(output.rpoInSecs), - rtoInSecs: __expectInt32(output.rtoInSecs), - } as any; -}; +// de_FailurePolicy omitted. -/** - * deserializeAws_restJson1LogicalResourceId - */ -const de_LogicalResourceId = (output: any, context: __SerdeContext): LogicalResourceId => { - return { - eksSourceName: __expectString(output.eksSourceName), - identifier: __expectString(output.identifier), - logicalStackName: __expectString(output.logicalStackName), - resourceGroupName: __expectString(output.resourceGroupName), - terraformSourceName: __expectString(output.terraformSourceName), - } as any; -}; +// de_LogicalResourceId omitted. -/** - * deserializeAws_restJson1PhysicalResource - */ -const de_PhysicalResource = (output: any, context: __SerdeContext): PhysicalResource => { - return { - additionalInfo: output.additionalInfo != null ? de_AdditionalInfoMap(output.additionalInfo, context) : undefined, - appComponents: output.appComponents != null ? de_AppComponentList(output.appComponents, context) : undefined, - excluded: __expectBoolean(output.excluded), - logicalResourceId: - output.logicalResourceId != null ? de_LogicalResourceId(output.logicalResourceId, context) : undefined, - physicalResourceId: - output.physicalResourceId != null ? de_PhysicalResourceId(output.physicalResourceId, context) : undefined, - resourceName: __expectString(output.resourceName), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_PhysicalResource omitted. -/** - * deserializeAws_restJson1PhysicalResourceId - */ -const de_PhysicalResourceId = (output: any, context: __SerdeContext): PhysicalResourceId => { - return { - awsAccountId: __expectString(output.awsAccountId), - awsRegion: __expectString(output.awsRegion), - identifier: __expectString(output.identifier), - type: __expectString(output.type), - } as any; -}; +// de_PhysicalResourceId omitted. -/** - * deserializeAws_restJson1PhysicalResourceList - */ -const de_PhysicalResourceList = (output: any, context: __SerdeContext): PhysicalResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhysicalResource(entry, context); - }); - return retVal; -}; +// de_PhysicalResourceList omitted. -/** - * deserializeAws_restJson1RecommendationCompliance - */ -const de_RecommendationCompliance = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DisruptionType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_RecommendationDisruptionCompliance(value, context); - return acc; - }, - {} - ); -}; +// de_RecommendationCompliance omitted. -/** - * deserializeAws_restJson1RecommendationDisruptionCompliance - */ -const de_RecommendationDisruptionCompliance = ( - output: any, - context: __SerdeContext -): RecommendationDisruptionCompliance => { - return { - expectedComplianceStatus: __expectString(output.expectedComplianceStatus), - expectedRpoDescription: __expectString(output.expectedRpoDescription), - expectedRpoInSecs: __expectInt32(output.expectedRpoInSecs), - expectedRtoDescription: __expectString(output.expectedRtoDescription), - expectedRtoInSecs: __expectInt32(output.expectedRtoInSecs), - } as any; -}; +// de_RecommendationDisruptionCompliance omitted. -/** - * deserializeAws_restJson1RecommendationIdList - */ -const de_RecommendationIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RecommendationIdList omitted. -/** - * deserializeAws_restJson1RecommendationItem - */ -const de_RecommendationItem = (output: any, context: __SerdeContext): RecommendationItem => { - return { - alreadyImplemented: __expectBoolean(output.alreadyImplemented), - resourceId: __expectString(output.resourceId), - targetAccountId: __expectString(output.targetAccountId), - targetRegion: __expectString(output.targetRegion), - } as any; -}; +// de_RecommendationItem omitted. -/** - * deserializeAws_restJson1RecommendationItemList - */ -const de_RecommendationItemList = (output: any, context: __SerdeContext): RecommendationItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationItem(entry, context); - }); - return retVal; -}; +// de_RecommendationItemList omitted. /** * deserializeAws_restJson1RecommendationTemplate */ const de_RecommendationTemplate = (output: any, context: __SerdeContext): RecommendationTemplate => { - return { - appArn: __expectString(output.appArn), - assessmentArn: __expectString(output.assessmentArn), - endTime: - output.endTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.endTime))) : undefined, - format: __expectString(output.format), - message: __expectString(output.message), - name: __expectString(output.name), - needsReplacements: __expectBoolean(output.needsReplacements), - recommendationIds: - output.recommendationIds != null ? de_RecommendationIdList(output.recommendationIds, context) : undefined, - recommendationTemplateArn: __expectString(output.recommendationTemplateArn), - recommendationTypes: - output.recommendationTypes != null - ? de_RenderRecommendationTypeList(output.recommendationTypes, context) - : undefined, - startTime: - output.startTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTime))) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - templatesLocation: output.templatesLocation != null ? de_S3Location(output.templatesLocation, context) : undefined, - } as any; + return take(output, { + appArn: __expectString, + assessmentArn: __expectString, + endTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + format: __expectString, + message: __expectString, + name: __expectString, + needsReplacements: __expectBoolean, + recommendationIds: _json, + recommendationTemplateArn: __expectString, + recommendationTypes: _json, + startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + tags: _json, + templatesLocation: _json, + }) as any; }; /** @@ -6291,31 +5600,12 @@ const de_RecommendationTemplateList = (output: any, context: __SerdeContext): Re const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecommendationTemplate(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RenderRecommendationTypeList - */ -const de_RenderRecommendationTypeList = ( - output: any, - context: __SerdeContext -): (RenderRecommendationType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RenderRecommendationTypeList omitted. /** * deserializeAws_restJson1ResiliencyPolicies @@ -6324,9 +5614,6 @@ const de_ResiliencyPolicies = (output: any, context: __SerdeContext): Resiliency const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResiliencyPolicy(entry, context); }); return retVal; @@ -6336,257 +5623,60 @@ const de_ResiliencyPolicies = (output: any, context: __SerdeContext): Resiliency * deserializeAws_restJson1ResiliencyPolicy */ const de_ResiliencyPolicy = (output: any, context: __SerdeContext): ResiliencyPolicy => { - return { - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - dataLocationConstraint: __expectString(output.dataLocationConstraint), - estimatedCostTier: __expectString(output.estimatedCostTier), - policy: output.policy != null ? de_DisruptionPolicy(output.policy, context) : undefined, - policyArn: __expectString(output.policyArn), - policyDescription: __expectString(output.policyDescription), - policyName: __expectString(output.policyName), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - tier: __expectString(output.tier), - } as any; + return take(output, { + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dataLocationConstraint: __expectString, + estimatedCostTier: __expectString, + policy: _json, + policyArn: __expectString, + policyDescription: __expectString, + policyName: __expectString, + tags: _json, + tier: __expectString, + }) as any; }; /** * deserializeAws_restJson1ResiliencyScore */ const de_ResiliencyScore = (output: any, context: __SerdeContext): ResiliencyScore => { - return { - disruptionScore: - output.disruptionScore != null ? de_DisruptionResiliencyScore(output.disruptionScore, context) : undefined, - score: __limitedParseDouble(output.score), - } as any; + return take(output, { + disruptionScore: (_: any) => de_DisruptionResiliencyScore(_, context), + score: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1ResourceError - */ -const de_ResourceError = (output: any, context: __SerdeContext): ResourceError => { - return { - logicalResourceId: __expectString(output.logicalResourceId), - physicalResourceId: __expectString(output.physicalResourceId), - reason: __expectString(output.reason), - } as any; -}; +// de_ResourceError omitted. -/** - * deserializeAws_restJson1ResourceErrorList - */ -const de_ResourceErrorList = (output: any, context: __SerdeContext): ResourceError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceError(entry, context); - }); - return retVal; -}; +// de_ResourceErrorList omitted. -/** - * deserializeAws_restJson1ResourceErrorsDetails - */ -const de_ResourceErrorsDetails = (output: any, context: __SerdeContext): ResourceErrorsDetails => { - return { - hasMoreErrors: __expectBoolean(output.hasMoreErrors), - resourceErrors: output.resourceErrors != null ? de_ResourceErrorList(output.resourceErrors, context) : undefined, - } as any; -}; +// de_ResourceErrorsDetails omitted. -/** - * deserializeAws_restJson1ResourceMapping - */ -const de_ResourceMapping = (output: any, context: __SerdeContext): ResourceMapping => { - return { - appRegistryAppName: __expectString(output.appRegistryAppName), - eksSourceName: __expectString(output.eksSourceName), - logicalStackName: __expectString(output.logicalStackName), - mappingType: __expectString(output.mappingType), - physicalResourceId: - output.physicalResourceId != null ? de_PhysicalResourceId(output.physicalResourceId, context) : undefined, - resourceGroupName: __expectString(output.resourceGroupName), - resourceName: __expectString(output.resourceName), - terraformSourceName: __expectString(output.terraformSourceName), - } as any; -}; +// de_ResourceMapping omitted. -/** - * deserializeAws_restJson1ResourceMappingList - */ -const de_ResourceMappingList = (output: any, context: __SerdeContext): ResourceMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceMapping(entry, context); - }); - return retVal; -}; +// de_ResourceMappingList omitted. -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - prefix: __expectString(output.prefix), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1SopRecommendation - */ -const de_SopRecommendation = (output: any, context: __SerdeContext): SopRecommendation => { - return { - appComponentName: __expectString(output.appComponentName), - description: __expectString(output.description), - items: output.items != null ? de_RecommendationItemList(output.items, context) : undefined, - name: __expectString(output.name), - prerequisite: __expectString(output.prerequisite), - recommendationId: __expectString(output.recommendationId), - referenceId: __expectString(output.referenceId), - serviceType: __expectString(output.serviceType), - } as any; -}; +// de_SopRecommendation omitted. -/** - * deserializeAws_restJson1SopRecommendationList - */ -const de_SopRecommendationList = (output: any, context: __SerdeContext): SopRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SopRecommendation(entry, context); - }); - return retVal; -}; +// de_SopRecommendationList omitted. -/** - * deserializeAws_restJson1SuggestedChangesList - */ -const de_SuggestedChangesList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SuggestedChangesList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TerraformSource - */ -const de_TerraformSource = (output: any, context: __SerdeContext): TerraformSource => { - return { - s3StateFileUrl: __expectString(output.s3StateFileUrl), - } as any; -}; +// de_TerraformSource omitted. -/** - * deserializeAws_restJson1TerraformSourceList - */ -const de_TerraformSourceList = (output: any, context: __SerdeContext): TerraformSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TerraformSource(entry, context); - }); - return retVal; -}; +// de_TerraformSourceList omitted. -/** - * deserializeAws_restJson1TestRecommendation - */ -const de_TestRecommendation = (output: any, context: __SerdeContext): TestRecommendation => { - return { - appComponentName: __expectString(output.appComponentName), - dependsOnAlarms: - output.dependsOnAlarms != null ? de_AlarmReferenceIdList(output.dependsOnAlarms, context) : undefined, - description: __expectString(output.description), - intent: __expectString(output.intent), - items: output.items != null ? de_RecommendationItemList(output.items, context) : undefined, - name: __expectString(output.name), - prerequisite: __expectString(output.prerequisite), - recommendationId: __expectString(output.recommendationId), - referenceId: __expectString(output.referenceId), - risk: __expectString(output.risk), - type: __expectString(output.type), - } as any; -}; +// de_TestRecommendation omitted. -/** - * deserializeAws_restJson1TestRecommendationList - */ -const de_TestRecommendationList = (output: any, context: __SerdeContext): TestRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TestRecommendation(entry, context); - }); - return retVal; -}; +// de_TestRecommendationList omitted. -/** - * deserializeAws_restJson1UnsupportedResource - */ -const de_UnsupportedResource = (output: any, context: __SerdeContext): UnsupportedResource => { - return { - logicalResourceId: - output.logicalResourceId != null ? de_LogicalResourceId(output.logicalResourceId, context) : undefined, - physicalResourceId: - output.physicalResourceId != null ? de_PhysicalResourceId(output.physicalResourceId, context) : undefined, - resourceType: __expectString(output.resourceType), - unsupportedResourceStatus: __expectString(output.unsupportedResourceStatus), - } as any; -}; +// de_UnsupportedResource omitted. -/** - * deserializeAws_restJson1UnsupportedResourceList - */ -const de_UnsupportedResourceList = (output: any, context: __SerdeContext): UnsupportedResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnsupportedResource(entry, context); - }); - return retVal; -}; +// de_UnsupportedResourceList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-resource-explorer-2/src/protocols/Aws_restJson1.ts b/clients/client-resource-explorer-2/src/protocols/Aws_restJson1.ts index 78677ae81d19..1fb324d3b246 100644 --- a/clients/client-resource-explorer-2/src/protocols/Aws_restJson1.ts +++ b/clients/client-resource-explorer-2/src/protocols/Aws_restJson1.ts @@ -1,17 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -54,22 +54,17 @@ import { UpdateIndexTypeCommandInput, UpdateIndexTypeCommandOutput } from "../co import { UpdateViewCommandInput, UpdateViewCommandOutput } from "../commands/UpdateViewCommand"; import { AccessDeniedException, - BatchGetViewError, ConflictException, IncludedProperty, - Index, InternalServerException, Resource, - ResourceCount, ResourceNotFoundException, ResourceProperty, SearchFilter, ServiceQuotaExceededException, - SupportedResourceType, ThrottlingException, UnauthorizedException, ValidationException, - ValidationExceptionField, View, } from "../models/models_0"; import { ResourceExplorer2ServiceException as __BaseException } from "../models/ResourceExplorer2ServiceException"; @@ -87,9 +82,11 @@ export const se_AssociateDefaultViewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/AssociateDefaultView"; let body: any; - body = JSON.stringify({ - ...(input.ViewArn != null && { ViewArn: input.ViewArn }), - }); + body = JSON.stringify( + take(input, { + ViewArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -114,9 +111,11 @@ export const se_BatchGetViewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetView"; let body: any; - body = JSON.stringify({ - ...(input.ViewArns != null && { ViewArns: se_ViewArnList(input.ViewArns, context) }), - }); + body = JSON.stringify( + take(input, { + ViewArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -141,10 +140,12 @@ export const se_CreateIndexCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateIndex"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -169,15 +170,15 @@ export const se_CreateViewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateView"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Filters != null && { Filters: se_SearchFilter(input.Filters, context) }), - ...(input.IncludedProperties != null && { - IncludedProperties: se_IncludedPropertyList(input.IncludedProperties, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.ViewName != null && { ViewName: input.ViewName }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Filters: (_) => _json(_), + IncludedProperties: (_) => _json(_), + Tags: (_) => _json(_), + ViewName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -202,9 +203,11 @@ export const se_DeleteIndexCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteIndex"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -229,9 +232,11 @@ export const se_DeleteViewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteView"; let body: any; - body = JSON.stringify({ - ...(input.ViewArn != null && { ViewArn: input.ViewArn }), - }); + body = JSON.stringify( + take(input, { + ViewArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -332,9 +337,11 @@ export const se_GetViewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetView"; let body: any; - body = JSON.stringify({ - ...(input.ViewArn != null && { ViewArn: input.ViewArn }), - }); + body = JSON.stringify( + take(input, { + ViewArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -359,12 +366,14 @@ export const se_ListIndexesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListIndexes"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Regions != null && { Regions: se_RegionList(input.Regions, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + Regions: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -390,10 +399,12 @@ export const se_ListSupportedResourceTypesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListSupportedResourceTypes"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -441,10 +452,12 @@ export const se_ListViewsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListViews"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -466,12 +479,14 @@ export const se_SearchCommand = async (input: SearchCommandInput, context: __Ser }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Search"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.ViewArn != null && { ViewArn: input.ViewArn }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + QueryString: [], + ViewArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -497,9 +512,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -554,10 +571,12 @@ export const se_UpdateIndexTypeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateIndexType"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -582,13 +601,13 @@ export const se_UpdateViewCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateView"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_SearchFilter(input.Filters, context) }), - ...(input.IncludedProperties != null && { - IncludedProperties: se_IncludedPropertyList(input.IncludedProperties, context), - }), - ...(input.ViewArn != null && { ViewArn: input.ViewArn }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + IncludedProperties: (_) => _json(_), + ViewArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -614,9 +633,10 @@ export const de_AssociateDefaultViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ViewArn != null) { - contents.ViewArn = __expectString(data.ViewArn); - } + const doc = take(data, { + ViewArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -650,10 +670,9 @@ const de_AssociateDefaultViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -673,12 +692,11 @@ export const de_BatchGetViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchGetViewErrors(data.Errors, context); - } - if (data.Views != null) { - contents.Views = de_ViewList(data.Views, context); - } + const doc = take(data, { + Errors: _json, + Views: (_) => de_ViewList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -712,10 +730,9 @@ const de_BatchGetViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -735,15 +752,12 @@ export const de_CreateIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -777,10 +791,9 @@ const de_CreateIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -800,9 +813,10 @@ export const de_CreateViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.View != null) { - contents.View = de_View(data.View, context); - } + const doc = take(data, { + View: (_) => de_View(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -842,10 +856,9 @@ const de_CreateViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -865,15 +878,12 @@ export const de_DeleteIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastUpdatedAt)); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + LastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -907,10 +917,9 @@ const de_DeleteIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -930,9 +939,10 @@ export const de_DeleteViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ViewArn != null) { - contents.ViewArn = __expectString(data.ViewArn); - } + const doc = take(data, { + ViewArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -969,10 +979,9 @@ const de_DeleteViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1022,10 +1031,9 @@ const de_DisassociateDefaultViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1045,9 +1053,10 @@ export const de_GetDefaultViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ViewArn != null) { - contents.ViewArn = __expectString(data.ViewArn); - } + const doc = take(data, { + ViewArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1081,10 +1090,9 @@ const de_GetDefaultViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1104,30 +1112,17 @@ export const de_GetIndexCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreatedAt != null) { - contents.CreatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreatedAt)); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastUpdatedAt)); - } - if (data.ReplicatingFrom != null) { - contents.ReplicatingFrom = de_RegionList(data.ReplicatingFrom, context); - } - if (data.ReplicatingTo != null) { - contents.ReplicatingTo = de_RegionList(data.ReplicatingTo, context); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ReplicatingFrom: _json, + ReplicatingTo: _json, + State: __expectString, + Tags: _json, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1161,10 +1156,9 @@ const de_GetIndexCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1184,12 +1178,11 @@ export const de_GetViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } - if (data.View != null) { - contents.View = de_View(data.View, context); - } + const doc = take(data, { + Tags: _json, + View: (_) => de_View(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1226,10 +1219,9 @@ const de_GetViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1249,12 +1241,11 @@ export const de_ListIndexesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Indexes != null) { - contents.Indexes = de_IndexList(data.Indexes, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Indexes: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1285,10 +1276,9 @@ const de_ListIndexesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1308,12 +1298,11 @@ export const de_ListSupportedResourceTypesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ResourceTypes != null) { - contents.ResourceTypes = de_ResourceTypeList(data.ResourceTypes, context); - } + const doc = take(data, { + NextToken: __expectString, + ResourceTypes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1344,10 +1333,9 @@ const de_ListSupportedResourceTypesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1367,9 +1355,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1406,10 +1395,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1429,12 +1417,11 @@ export const de_ListViewsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Views != null) { - contents.Views = de_ViewArnList(data.Views, context); - } + const doc = take(data, { + NextToken: __expectString, + Views: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1465,10 +1452,9 @@ const de_ListViewsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1488,18 +1474,13 @@ export const de_SearchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Count != null) { - contents.Count = de_ResourceCount(data.Count, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Resources != null) { - contents.Resources = de_ResourceList(data.Resources, context); - } - if (data.ViewArn != null) { - contents.ViewArn = __expectString(data.ViewArn); - } + const doc = take(data, { + Count: _json, + NextToken: __expectString, + Resources: (_) => de_ResourceList(_, context), + ViewArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1533,10 +1514,9 @@ const de_SearchCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1592,10 +1572,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1651,10 +1630,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1674,18 +1652,13 @@ export const de_UpdateIndexTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.LastUpdatedAt != null) { - contents.LastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastUpdatedAt)); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + LastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + State: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1725,10 +1698,9 @@ const de_UpdateIndexTypeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1748,9 +1720,10 @@ export const de_UpdateViewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.View != null) { - contents.View = de_View(data.View, context); - } + const doc = take(data, { + View: (_) => de_View(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1787,16 +1760,15 @@ const de_UpdateViewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1806,9 +1778,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1822,9 +1795,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1841,9 +1815,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1860,9 +1835,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1879,15 +1855,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Value != null) { - contents.Value = __expectString(data.Value); - } + const doc = take(data, { + Message: __expectString, + Name: __expectString, + Value: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1901,9 +1874,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1920,9 +1894,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1936,12 +1911,11 @@ const de_UnauthorizedExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.FieldList != null) { - contents.FieldList = de_ValidationExceptionFieldList(data.FieldList, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + FieldList: _json, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1949,187 +1923,48 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1IncludedProperty - */ -const se_IncludedProperty = (input: IncludedProperty, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_IncludedProperty omitted. -/** - * serializeAws_restJson1IncludedPropertyList - */ -const se_IncludedPropertyList = (input: IncludedProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IncludedProperty(entry, context); - }); -}; +// se_IncludedPropertyList omitted. -/** - * serializeAws_restJson1RegionList - */ -const se_RegionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RegionList omitted. -/** - * serializeAws_restJson1SearchFilter - */ -const se_SearchFilter = (input: SearchFilter, context: __SerdeContext): any => { - return { - ...(input.FilterString != null && { FilterString: input.FilterString }), - }; -}; +// se_SearchFilter omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1ViewArnList - */ -const se_ViewArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ViewArnList omitted. -/** - * deserializeAws_restJson1BatchGetViewError - */ -const de_BatchGetViewError = (output: any, context: __SerdeContext): BatchGetViewError => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - ViewArn: __expectString(output.ViewArn), - } as any; -}; +// de_BatchGetViewError omitted. -/** - * deserializeAws_restJson1BatchGetViewErrors - */ -const de_BatchGetViewErrors = (output: any, context: __SerdeContext): BatchGetViewError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetViewError(entry, context); - }); - return retVal; -}; +// de_BatchGetViewErrors omitted. -/** - * deserializeAws_restJson1IncludedProperty - */ -const de_IncludedProperty = (output: any, context: __SerdeContext): IncludedProperty => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_IncludedProperty omitted. -/** - * deserializeAws_restJson1IncludedPropertyList - */ -const de_IncludedPropertyList = (output: any, context: __SerdeContext): IncludedProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IncludedProperty(entry, context); - }); - return retVal; -}; +// de_IncludedPropertyList omitted. -/** - * deserializeAws_restJson1Index - */ -const de_Index = (output: any, context: __SerdeContext): Index => { - return { - Arn: __expectString(output.Arn), - Region: __expectString(output.Region), - Type: __expectString(output.Type), - } as any; -}; +// de_Index omitted. -/** - * deserializeAws_restJson1IndexList - */ -const de_IndexList = (output: any, context: __SerdeContext): Index[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Index(entry, context); - }); - return retVal; -}; +// de_IndexList omitted. -/** - * deserializeAws_restJson1RegionList - */ -const de_RegionList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RegionList omitted. /** * deserializeAws_restJson1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - Arn: __expectString(output.Arn), - LastReportedAt: - output.LastReportedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastReportedAt)) - : undefined, - OwningAccountId: __expectString(output.OwningAccountId), - Properties: output.Properties != null ? de_ResourcePropertyList(output.Properties, context) : undefined, - Region: __expectString(output.Region), - ResourceType: __expectString(output.ResourceType), - Service: __expectString(output.Service), - } as any; + return take(output, { + Arn: __expectString, + LastReportedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + OwningAccountId: __expectString, + Properties: (_: any) => de_ResourcePropertyList(_, context), + Region: __expectString, + ResourceType: __expectString, + Service: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ResourceCount - */ -const de_ResourceCount = (output: any, context: __SerdeContext): ResourceCount => { - return { - Complete: __expectBoolean(output.Complete), - TotalResources: __expectLong(output.TotalResources), - } as any; -}; +// de_ResourceCount omitted. /** * deserializeAws_restJson1ResourceList @@ -2138,9 +1973,6 @@ const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Resource(entry, context); }); return retVal; @@ -2150,14 +1982,11 @@ const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { * deserializeAws_restJson1ResourceProperty */ const de_ResourceProperty = (output: any, context: __SerdeContext): ResourceProperty => { - return { - Data: output.Data != null ? de_Document(output.Data, context) : undefined, - LastReportedAt: - output.LastReportedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastReportedAt)) - : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + Data: (_: any) => de_Document(_, context), + LastReportedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Name: __expectString, + }) as any; }; /** @@ -2167,118 +1996,38 @@ const de_ResourcePropertyList = (output: any, context: __SerdeContext): Resource const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceProperty(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ResourceTypeList - */ -const de_ResourceTypeList = (output: any, context: __SerdeContext): SupportedResourceType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SupportedResourceType(entry, context); - }); - return retVal; -}; +// de_ResourceTypeList omitted. -/** - * deserializeAws_restJson1SearchFilter - */ -const de_SearchFilter = (output: any, context: __SerdeContext): SearchFilter => { - return { - FilterString: __expectString(output.FilterString), - } as any; -}; +// de_SearchFilter omitted. -/** - * deserializeAws_restJson1SupportedResourceType - */ -const de_SupportedResourceType = (output: any, context: __SerdeContext): SupportedResourceType => { - return { - ResourceType: __expectString(output.ResourceType), - Service: __expectString(output.Service), - } as any; -}; +// de_SupportedResourceType omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Name: __expectString(output.Name), - ValidationIssue: __expectString(output.ValidationIssue), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. /** * deserializeAws_restJson1View */ const de_View = (output: any, context: __SerdeContext): View => { - return { - Filters: output.Filters != null ? de_SearchFilter(output.Filters, context) : undefined, - IncludedProperties: - output.IncludedProperties != null ? de_IncludedPropertyList(output.IncludedProperties, context) : undefined, - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastUpdatedAt)) - : undefined, - Owner: __expectString(output.Owner), - Scope: __expectString(output.Scope), - ViewArn: __expectString(output.ViewArn), - } as any; + return take(output, { + Filters: _json, + IncludedProperties: _json, + LastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Owner: __expectString, + Scope: __expectString, + ViewArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ViewArnList - */ -const de_ViewArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ViewArnList omitted. /** * deserializeAws_restJson1ViewList @@ -2287,9 +2036,6 @@ const de_ViewList = (output: any, context: __SerdeContext): View[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_View(entry, context); }); return retVal; diff --git a/clients/client-resource-groups-tagging-api/src/protocols/Aws_json1_1.ts b/clients/client-resource-groups-tagging-api/src/protocols/Aws_json1_1.ts index 6862305ec8d4..6ae8d80a51df 100644 --- a/clients/client-resource-groups-tagging-api/src/protocols/Aws_json1_1.ts +++ b/clients/client-resource-groups-tagging-api/src/protocols/Aws_json1_1.ts @@ -1,12 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -33,35 +30,22 @@ import { import { TagResourcesCommandInput, TagResourcesCommandOutput } from "../commands/TagResourcesCommand"; import { UntagResourcesCommandInput, UntagResourcesCommandOutput } from "../commands/UntagResourcesCommand"; import { - ComplianceDetails, ConcurrentModificationException, ConstraintViolationException, DescribeReportCreationInput, - DescribeReportCreationOutput, - FailureInfo, GetComplianceSummaryInput, - GetComplianceSummaryOutput, GetResourcesInput, - GetResourcesOutput, GetTagKeysInput, - GetTagKeysOutput, GetTagValuesInput, - GetTagValuesOutput, GroupByAttribute, InternalServiceException, InvalidParameterException, PaginationTokenExpiredException, - ResourceTagMapping, StartReportCreationInput, - StartReportCreationOutput, - Summary, - Tag, TagFilter, TagResourcesInput, - TagResourcesOutput, ThrottledException, UntagResourcesInput, - UntagResourcesOutput, } from "../models/models_0"; import { ResourceGroupsTaggingAPIServiceException as __BaseException } from "../models/ResourceGroupsTaggingAPIServiceException"; @@ -74,7 +58,7 @@ export const se_DescribeReportCreationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReportCreation"); let body: any; - body = JSON.stringify(se_DescribeReportCreationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -87,7 +71,7 @@ export const se_GetComplianceSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetComplianceSummary"); let body: any; - body = JSON.stringify(se_GetComplianceSummaryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -100,7 +84,7 @@ export const se_GetResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResources"); let body: any; - body = JSON.stringify(se_GetResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -113,7 +97,7 @@ export const se_GetTagKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTagKeys"); let body: any; - body = JSON.stringify(se_GetTagKeysInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -126,7 +110,7 @@ export const se_GetTagValuesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTagValues"); let body: any; - body = JSON.stringify(se_GetTagValuesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -139,7 +123,7 @@ export const se_StartReportCreationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartReportCreation"); let body: any; - body = JSON.stringify(se_StartReportCreationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -152,7 +136,7 @@ export const se_TagResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResources"); let body: any; - body = JSON.stringify(se_TagResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -165,7 +149,7 @@ export const se_UntagResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResources"); let body: any; - body = JSON.stringify(se_UntagResourcesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -181,12 +165,12 @@ export const de_DescribeReportCreationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeReportCreationOutput(data, context); + contents = _json(data); const response: DescribeReportCreationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -216,10 +200,9 @@ const de_DescribeReportCreationCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -237,12 +220,12 @@ export const de_GetComplianceSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetComplianceSummaryOutput(data, context); + contents = _json(data); const response: GetComplianceSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -272,10 +255,9 @@ const de_GetComplianceSummaryCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -293,12 +275,12 @@ export const de_GetResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcesOutput(data, context); + contents = _json(data); const response: GetResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -328,10 +310,9 @@ const de_GetResourcesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -349,12 +330,12 @@ export const de_GetTagKeysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTagKeysOutput(data, context); + contents = _json(data); const response: GetTagKeysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -384,10 +365,9 @@ const de_GetTagKeysCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -405,12 +385,12 @@ export const de_GetTagValuesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetTagValuesOutput(data, context); + contents = _json(data); const response: GetTagValuesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -440,10 +420,9 @@ const de_GetTagValuesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -461,12 +440,12 @@ export const de_StartReportCreationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartReportCreationOutput(data, context); + contents = _json(data); const response: StartReportCreationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -499,10 +478,9 @@ const de_StartReportCreationCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -520,12 +498,12 @@ export const de_TagResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourcesOutput(data, context); + contents = _json(data); const response: TagResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -552,10 +530,9 @@ const de_TagResourcesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -573,12 +550,12 @@ export const de_UntagResourcesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourcesOutput(data, context); + contents = _json(data); const response: UntagResourcesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -605,10 +582,9 @@ const de_UntagResourcesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -622,7 +598,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -638,7 +614,7 @@ const de_ConstraintViolationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConstraintViolationException(body, context); + const deserialized: any = _json(body); const exception = new ConstraintViolationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -654,7 +630,7 @@ const de_InternalServiceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -670,7 +646,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -686,7 +662,7 @@ const de_PaginationTokenExpiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PaginationTokenExpiredException(body, context); + const deserialized: any = _json(body); const exception = new PaginationTokenExpiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -699,7 +675,7 @@ const de_PaginationTokenExpiredExceptionRes = async ( */ const de_ThrottledExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottledException(body, context); + const deserialized: any = _json(body); const exception = new ThrottledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -707,515 +683,95 @@ const de_ThrottledExceptionRes = async (parsedOutput: any, context: __SerdeConte return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1DescribeReportCreationInput - */ -const se_DescribeReportCreationInput = (input: DescribeReportCreationInput, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeReportCreationInput omitted. -/** - * serializeAws_json1_1GetComplianceSummaryInput - */ -const se_GetComplianceSummaryInput = (input: GetComplianceSummaryInput, context: __SerdeContext): any => { - return { - ...(input.GroupBy != null && { GroupBy: se_GroupBy(input.GroupBy, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - ...(input.RegionFilters != null && { RegionFilters: se_RegionFilterList(input.RegionFilters, context) }), - ...(input.ResourceTypeFilters != null && { - ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context), - }), - ...(input.TagKeyFilters != null && { TagKeyFilters: se_TagKeyFilterList(input.TagKeyFilters, context) }), - ...(input.TargetIdFilters != null && { TargetIdFilters: se_TargetIdFilterList(input.TargetIdFilters, context) }), - }; -}; +// se_GetComplianceSummaryInput omitted. -/** - * serializeAws_json1_1GetResourcesInput - */ -const se_GetResourcesInput = (input: GetResourcesInput, context: __SerdeContext): any => { - return { - ...(input.ExcludeCompliantResources != null && { ExcludeCompliantResources: input.ExcludeCompliantResources }), - ...(input.IncludeComplianceDetails != null && { IncludeComplianceDetails: input.IncludeComplianceDetails }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - ...(input.ResourceARNList != null && { ResourceARNList: se_ResourceARNListForGet(input.ResourceARNList, context) }), - ...(input.ResourceTypeFilters != null && { - ResourceTypeFilters: se_ResourceTypeFilterList(input.ResourceTypeFilters, context), - }), - ...(input.ResourcesPerPage != null && { ResourcesPerPage: input.ResourcesPerPage }), - ...(input.TagFilters != null && { TagFilters: se_TagFilterList(input.TagFilters, context) }), - ...(input.TagsPerPage != null && { TagsPerPage: input.TagsPerPage }), - }; -}; +// se_GetResourcesInput omitted. -/** - * serializeAws_json1_1GetTagKeysInput - */ -const se_GetTagKeysInput = (input: GetTagKeysInput, context: __SerdeContext): any => { - return { - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - }; -}; +// se_GetTagKeysInput omitted. -/** - * serializeAws_json1_1GetTagValuesInput - */ -const se_GetTagValuesInput = (input: GetTagValuesInput, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.PaginationToken != null && { PaginationToken: input.PaginationToken }), - }; -}; +// se_GetTagValuesInput omitted. -/** - * serializeAws_json1_1GroupBy - */ -const se_GroupBy = (input: (GroupByAttribute | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GroupBy omitted. -/** - * serializeAws_json1_1RegionFilterList - */ -const se_RegionFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RegionFilterList omitted. -/** - * serializeAws_json1_1ResourceARNListForGet - */ -const se_ResourceARNListForGet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceARNListForGet omitted. -/** - * serializeAws_json1_1ResourceARNListForTagUntag - */ -const se_ResourceARNListForTagUntag = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceARNListForTagUntag omitted. -/** - * serializeAws_json1_1ResourceTypeFilterList - */ -const se_ResourceTypeFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceTypeFilterList omitted. -/** - * serializeAws_json1_1StartReportCreationInput - */ -const se_StartReportCreationInput = (input: StartReportCreationInput, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - }; -}; +// se_StartReportCreationInput omitted. -/** - * serializeAws_json1_1TagFilter - */ -const se_TagFilter = (input: TagFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_TagValueList(input.Values, context) }), - }; -}; +// se_TagFilter omitted. -/** - * serializeAws_json1_1TagFilterList - */ -const se_TagFilterList = (input: TagFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagFilter(entry, context); - }); -}; +// se_TagFilterList omitted. -/** - * serializeAws_json1_1TagKeyFilterList - */ -const se_TagKeyFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyFilterList omitted. -/** - * serializeAws_json1_1TagKeyListForUntag - */ -const se_TagKeyListForUntag = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyListForUntag omitted. -/** - * serializeAws_json1_1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_json1_1TagResourcesInput - */ -const se_TagResourcesInput = (input: TagResourcesInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARNList != null && { - ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context), - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }; -}; +// se_TagResourcesInput omitted. -/** - * serializeAws_json1_1TagValueList - */ -const se_TagValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagValueList omitted. -/** - * serializeAws_json1_1TargetIdFilterList - */ -const se_TargetIdFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetIdFilterList omitted. -/** - * serializeAws_json1_1UntagResourcesInput - */ -const se_UntagResourcesInput = (input: UntagResourcesInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARNList != null && { - ResourceARNList: se_ResourceARNListForTagUntag(input.ResourceARNList, context), - }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyListForUntag(input.TagKeys, context) }), - }; -}; +// se_UntagResourcesInput omitted. -/** - * deserializeAws_json1_1ComplianceDetails - */ -const de_ComplianceDetails = (output: any, context: __SerdeContext): ComplianceDetails => { - return { - ComplianceStatus: __expectBoolean(output.ComplianceStatus), - KeysWithNoncompliantValues: - output.KeysWithNoncompliantValues != null ? de_TagKeyList(output.KeysWithNoncompliantValues, context) : undefined, - NoncompliantKeys: output.NoncompliantKeys != null ? de_TagKeyList(output.NoncompliantKeys, context) : undefined, - } as any; -}; +// de_ComplianceDetails omitted. -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1ConstraintViolationException - */ -const de_ConstraintViolationException = (output: any, context: __SerdeContext): ConstraintViolationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConstraintViolationException omitted. -/** - * deserializeAws_json1_1DescribeReportCreationOutput - */ -const de_DescribeReportCreationOutput = (output: any, context: __SerdeContext): DescribeReportCreationOutput => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - S3Location: __expectString(output.S3Location), - StartDate: __expectString(output.StartDate), - Status: __expectString(output.Status), - } as any; -}; +// de_DescribeReportCreationOutput omitted. -/** - * deserializeAws_json1_1FailedResourcesMap - */ -const de_FailedResourcesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_FailureInfo(value, context); - return acc; - }, {}); -}; +// de_FailedResourcesMap omitted. -/** - * deserializeAws_json1_1FailureInfo - */ -const de_FailureInfo = (output: any, context: __SerdeContext): FailureInfo => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - StatusCode: __expectInt32(output.StatusCode), - } as any; -}; +// de_FailureInfo omitted. -/** - * deserializeAws_json1_1GetComplianceSummaryOutput - */ -const de_GetComplianceSummaryOutput = (output: any, context: __SerdeContext): GetComplianceSummaryOutput => { - return { - PaginationToken: __expectString(output.PaginationToken), - SummaryList: output.SummaryList != null ? de_SummaryList(output.SummaryList, context) : undefined, - } as any; -}; +// de_GetComplianceSummaryOutput omitted. -/** - * deserializeAws_json1_1GetResourcesOutput - */ -const de_GetResourcesOutput = (output: any, context: __SerdeContext): GetResourcesOutput => { - return { - PaginationToken: __expectString(output.PaginationToken), - ResourceTagMappingList: - output.ResourceTagMappingList != null - ? de_ResourceTagMappingList(output.ResourceTagMappingList, context) - : undefined, - } as any; -}; +// de_GetResourcesOutput omitted. -/** - * deserializeAws_json1_1GetTagKeysOutput - */ -const de_GetTagKeysOutput = (output: any, context: __SerdeContext): GetTagKeysOutput => { - return { - PaginationToken: __expectString(output.PaginationToken), - TagKeys: output.TagKeys != null ? de_TagKeyList(output.TagKeys, context) : undefined, - } as any; -}; +// de_GetTagKeysOutput omitted. -/** - * deserializeAws_json1_1GetTagValuesOutput - */ -const de_GetTagValuesOutput = (output: any, context: __SerdeContext): GetTagValuesOutput => { - return { - PaginationToken: __expectString(output.PaginationToken), - TagValues: output.TagValues != null ? de_TagValuesOutputList(output.TagValues, context) : undefined, - } as any; -}; +// de_GetTagValuesOutput omitted. -/** - * deserializeAws_json1_1InternalServiceException - */ -const de_InternalServiceException = (output: any, context: __SerdeContext): InternalServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1PaginationTokenExpiredException - */ -const de_PaginationTokenExpiredException = (output: any, context: __SerdeContext): PaginationTokenExpiredException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PaginationTokenExpiredException omitted. -/** - * deserializeAws_json1_1ResourceTagMapping - */ -const de_ResourceTagMapping = (output: any, context: __SerdeContext): ResourceTagMapping => { - return { - ComplianceDetails: - output.ComplianceDetails != null ? de_ComplianceDetails(output.ComplianceDetails, context) : undefined, - ResourceARN: __expectString(output.ResourceARN), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ResourceTagMapping omitted. -/** - * deserializeAws_json1_1ResourceTagMappingList - */ -const de_ResourceTagMappingList = (output: any, context: __SerdeContext): ResourceTagMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTagMapping(entry, context); - }); - return retVal; -}; +// de_ResourceTagMappingList omitted. -/** - * deserializeAws_json1_1StartReportCreationOutput - */ -const de_StartReportCreationOutput = (output: any, context: __SerdeContext): StartReportCreationOutput => { - return {} as any; -}; +// de_StartReportCreationOutput omitted. -/** - * deserializeAws_json1_1Summary - */ -const de_Summary = (output: any, context: __SerdeContext): Summary => { - return { - LastUpdated: __expectString(output.LastUpdated), - NonCompliantResources: __expectLong(output.NonCompliantResources), - Region: __expectString(output.Region), - ResourceType: __expectString(output.ResourceType), - TargetId: __expectString(output.TargetId), - TargetIdType: __expectString(output.TargetIdType), - } as any; -}; +// de_Summary omitted. -/** - * deserializeAws_json1_1SummaryList - */ -const de_SummaryList = (output: any, context: __SerdeContext): Summary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Summary(entry, context); - }); - return retVal; -}; +// de_SummaryList omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagKeyList - */ -const de_TagKeyList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagKeyList omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourcesOutput - */ -const de_TagResourcesOutput = (output: any, context: __SerdeContext): TagResourcesOutput => { - return { - FailedResourcesMap: - output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined, - } as any; -}; +// de_TagResourcesOutput omitted. -/** - * deserializeAws_json1_1TagValuesOutputList - */ -const de_TagValuesOutputList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagValuesOutputList omitted. -/** - * deserializeAws_json1_1ThrottledException - */ -const de_ThrottledException = (output: any, context: __SerdeContext): ThrottledException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottledException omitted. -/** - * deserializeAws_json1_1UntagResourcesOutput - */ -const de_UntagResourcesOutput = (output: any, context: __SerdeContext): UntagResourcesOutput => { - return { - FailedResourcesMap: - output.FailedResourcesMap != null ? de_FailedResourcesMap(output.FailedResourcesMap, context) : undefined, - } as any; -}; +// de_UntagResourcesOutput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1237,6 +793,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-resource-groups/src/protocols/Aws_restJson1.ts b/clients/client-resource-groups/src/protocols/Aws_restJson1.ts index 729ee5a075f5..8391e7a51d62 100644 --- a/clients/client-resource-groups/src/protocols/Aws_restJson1.ts +++ b/clients/client-resource-groups/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -44,27 +46,16 @@ import { import { UpdateGroupCommandInput, UpdateGroupCommandOutput } from "../commands/UpdateGroupCommand"; import { UpdateGroupQueryCommandInput, UpdateGroupQueryCommandOutput } from "../commands/UpdateGroupQueryCommand"; import { - AccountSettings, BadRequestException, - FailedResource, ForbiddenException, - Group, - GroupConfiguration, GroupConfigurationItem, GroupConfigurationParameter, GroupFilter, - GroupIdentifier, - GroupQuery, InternalServerErrorException, - ListGroupResourcesItem, MethodNotAllowedException, NotFoundException, - PendingResource, - QueryError, ResourceFilter, - ResourceIdentifier, ResourceQuery, - ResourceStatus, TooManyRequestsException, UnauthorizedException, } from "../models/models_0"; @@ -83,13 +74,15 @@ export const se_CreateGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups"; let body: any; - body = JSON.stringify({ - ...(input.Configuration != null && { Configuration: se_GroupConfigurationList(input.Configuration, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceQuery != null && { ResourceQuery: se_ResourceQuery(input.ResourceQuery, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Configuration: (_) => _json(_), + Description: [], + Name: [], + ResourceQuery: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -114,10 +107,12 @@ export const se_DeleteGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-group"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + Group: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -167,10 +162,12 @@ export const se_GetGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + Group: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -196,9 +193,11 @@ export const se_GetGroupConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-configuration"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - }); + body = JSON.stringify( + take(input, { + Group: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -223,10 +222,12 @@ export const se_GetGroupQueryCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-group-query"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + Group: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -274,10 +275,12 @@ export const se_GroupResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group-resources"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnList(input.ResourceArns, context) }), - }); + body = JSON.stringify( + take(input, { + Group: [], + ResourceArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -302,13 +305,15 @@ export const se_ListGroupResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-group-resources"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_ResourceFilterList(input.Filters, context) }), - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + Group: [], + GroupName: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -337,9 +342,11 @@ export const se_ListGroupsCommand = async ( nextToken: [, input.NextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_GroupFilterList(input.Filters, context) }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -366,10 +373,12 @@ export const se_PutGroupConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-group-configuration"; let body: any; - body = JSON.stringify({ - ...(input.Configuration != null && { Configuration: se_GroupConfigurationList(input.Configuration, context) }), - ...(input.Group != null && { Group: input.Group }), - }); + body = JSON.stringify( + take(input, { + Configuration: (_) => _json(_), + Group: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -394,11 +403,13 @@ export const se_SearchResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/search"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceQuery != null && { ResourceQuery: se_ResourceQuery(input.ResourceQuery, context) }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + ResourceQuery: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -421,9 +432,11 @@ export const se_TagCommand = async (input: TagCommandInput, context: __SerdeCont let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags"; resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn!, "{Arn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -448,10 +461,12 @@ export const se_UngroupResourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ungroup-resources"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnList(input.ResourceArns, context) }), - }); + body = JSON.stringify( + take(input, { + Group: [], + ResourceArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -474,9 +489,11 @@ export const se_UntagCommand = async (input: UntagCommandInput, context: __Serde let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resources/{Arn}/tags"; resolvedPath = __resolvedPath(resolvedPath, input, "Arn", () => input.Arn!, "{Arn}", false); let body: any; - body = JSON.stringify({ - ...(input.Keys != null && { Keys: se_TagKeyList(input.Keys, context) }), - }); + body = JSON.stringify( + take(input, { + Keys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -502,11 +519,11 @@ export const se_UpdateAccountSettingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-account-settings"; let body: any; - body = JSON.stringify({ - ...(input.GroupLifecycleEventsDesiredStatus != null && { - GroupLifecycleEventsDesiredStatus: input.GroupLifecycleEventsDesiredStatus, - }), - }); + body = JSON.stringify( + take(input, { + GroupLifecycleEventsDesiredStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -531,11 +548,13 @@ export const se_UpdateGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Group: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -560,11 +579,13 @@ export const se_UpdateGroupQueryCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-group-query"; let body: any; - body = JSON.stringify({ - ...(input.Group != null && { Group: input.Group }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.ResourceQuery != null && { ResourceQuery: se_ResourceQuery(input.ResourceQuery, context) }), - }); + body = JSON.stringify( + take(input, { + Group: [], + GroupName: [], + ResourceQuery: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -590,18 +611,13 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } - if (data.GroupConfiguration != null) { - contents.GroupConfiguration = de_GroupConfiguration(data.GroupConfiguration, context); - } - if (data.ResourceQuery != null) { - contents.ResourceQuery = de_ResourceQuery(data.ResourceQuery, context); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Group: _json, + GroupConfiguration: _json, + ResourceQuery: _json, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -635,10 +651,9 @@ const de_CreateGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -658,9 +673,10 @@ export const de_DeleteGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -697,10 +713,9 @@ const de_DeleteGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -720,9 +735,10 @@ export const de_GetAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountSettings != null) { - contents.AccountSettings = de_AccountSettings(data.AccountSettings, context); - } + const doc = take(data, { + AccountSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -756,10 +772,9 @@ const de_GetAccountSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -779,9 +794,10 @@ export const de_GetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -818,10 +834,9 @@ const de_GetGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -841,9 +856,10 @@ export const de_GetGroupConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupConfiguration != null) { - contents.GroupConfiguration = de_GroupConfiguration(data.GroupConfiguration, context); - } + const doc = take(data, { + GroupConfiguration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -880,10 +896,9 @@ const de_GetGroupConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -903,9 +918,10 @@ export const de_GetGroupQueryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupQuery != null) { - contents.GroupQuery = de_GroupQuery(data.GroupQuery, context); - } + const doc = take(data, { + GroupQuery: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -942,10 +958,9 @@ const de_GetGroupQueryCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -965,12 +980,11 @@ export const de_GetTagsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1007,10 +1021,9 @@ const de_GetTagsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1030,15 +1043,12 @@ export const de_GroupResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Failed != null) { - contents.Failed = de_FailedResourceList(data.Failed, context); - } - if (data.Pending != null) { - contents.Pending = de_PendingResourceList(data.Pending, context); - } - if (data.Succeeded != null) { - contents.Succeeded = de_ResourceArnList(data.Succeeded, context); - } + const doc = take(data, { + Failed: _json, + Pending: _json, + Succeeded: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1075,10 +1085,9 @@ const de_GroupResourcesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1098,18 +1107,13 @@ export const de_ListGroupResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.QueryErrors != null) { - contents.QueryErrors = de_QueryErrorList(data.QueryErrors, context); - } - if (data.ResourceIdentifiers != null) { - contents.ResourceIdentifiers = de_ResourceIdentifierList(data.ResourceIdentifiers, context); - } - if (data.Resources != null) { - contents.Resources = de_ListGroupResourcesItemList(data.Resources, context); - } + const doc = take(data, { + NextToken: __expectString, + QueryErrors: _json, + ResourceIdentifiers: _json, + Resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1149,10 +1153,9 @@ const de_ListGroupResourcesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1172,15 +1175,12 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupIdentifiers != null) { - contents.GroupIdentifiers = de_GroupIdentifierList(data.GroupIdentifiers, context); - } - if (data.Groups != null) { - contents.Groups = de_GroupList(data.Groups, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + GroupIdentifiers: _json, + Groups: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1214,10 +1214,9 @@ const de_ListGroupsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,10 +1272,9 @@ const de_PutGroupConfigurationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1296,15 +1294,12 @@ export const de_SearchResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.QueryErrors != null) { - contents.QueryErrors = de_QueryErrorList(data.QueryErrors, context); - } - if (data.ResourceIdentifiers != null) { - contents.ResourceIdentifiers = de_ResourceIdentifierList(data.ResourceIdentifiers, context); - } + const doc = take(data, { + NextToken: __expectString, + QueryErrors: _json, + ResourceIdentifiers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1341,10 +1336,9 @@ const de_SearchResourcesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1361,12 +1355,11 @@ export const de_TagCommand = async (output: __HttpResponse, context: __SerdeCont $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1400,10 +1393,9 @@ const de_TagCommandError = async (output: __HttpResponse, context: __SerdeContex throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1423,15 +1415,12 @@ export const de_UngroupResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Failed != null) { - contents.Failed = de_FailedResourceList(data.Failed, context); - } - if (data.Pending != null) { - contents.Pending = de_PendingResourceList(data.Pending, context); - } - if (data.Succeeded != null) { - contents.Succeeded = de_ResourceArnList(data.Succeeded, context); - } + const doc = take(data, { + Failed: _json, + Pending: _json, + Succeeded: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1468,10 +1457,9 @@ const de_UngroupResourcesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1488,12 +1476,11 @@ export const de_UntagCommand = async (output: __HttpResponse, context: __SerdeCo $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Keys != null) { - contents.Keys = de_TagKeyList(data.Keys, context); - } + const doc = take(data, { + Arn: __expectString, + Keys: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1527,10 +1514,9 @@ const de_UntagCommandError = async (output: __HttpResponse, context: __SerdeCont throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1550,9 +1536,10 @@ export const de_UpdateAccountSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountSettings != null) { - contents.AccountSettings = de_AccountSettings(data.AccountSettings, context); - } + const doc = take(data, { + AccountSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1586,10 +1573,9 @@ const de_UpdateAccountSettingsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1609,9 +1595,10 @@ export const de_UpdateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1648,10 +1635,9 @@ const de_UpdateGroupCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1671,9 +1657,10 @@ export const de_UpdateGroupQueryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.GroupQuery != null) { - contents.GroupQuery = de_GroupQuery(data.GroupQuery, context); - } + const doc = take(data, { + GroupQuery: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1710,25 +1697,25 @@ const de_UpdateGroupQueryCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1742,9 +1729,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1761,9 +1749,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1780,9 +1769,10 @@ const de_MethodNotAllowedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new MethodNotAllowedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1796,9 +1786,10 @@ const de_MethodNotAllowedExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1815,9 +1806,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1834,9 +1826,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1844,506 +1837,89 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1GroupConfigurationItem - */ -const se_GroupConfigurationItem = (input: GroupConfigurationItem, context: __SerdeContext): any => { - return { - ...(input.Parameters != null && { Parameters: se_GroupParameterList(input.Parameters, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_GroupConfigurationItem omitted. -/** - * serializeAws_restJson1GroupConfigurationList - */ -const se_GroupConfigurationList = (input: GroupConfigurationItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GroupConfigurationItem(entry, context); - }); -}; +// se_GroupConfigurationList omitted. -/** - * serializeAws_restJson1GroupConfigurationParameter - */ -const se_GroupConfigurationParameter = (input: GroupConfigurationParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_GroupConfigurationParameterValueList(input.Values, context) }), - }; -}; +// se_GroupConfigurationParameter omitted. -/** - * serializeAws_restJson1GroupConfigurationParameterValueList - */ -const se_GroupConfigurationParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GroupConfigurationParameterValueList omitted. -/** - * serializeAws_restJson1GroupFilter - */ -const se_GroupFilter = (input: GroupFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_GroupFilterValues(input.Values, context) }), - }; -}; +// se_GroupFilter omitted. -/** - * serializeAws_restJson1GroupFilterList - */ -const se_GroupFilterList = (input: GroupFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GroupFilter(entry, context); - }); -}; +// se_GroupFilterList omitted. -/** - * serializeAws_restJson1GroupFilterValues - */ -const se_GroupFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GroupFilterValues omitted. -/** - * serializeAws_restJson1GroupParameterList - */ -const se_GroupParameterList = (input: GroupConfigurationParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GroupConfigurationParameter(entry, context); - }); -}; +// se_GroupParameterList omitted. -/** - * serializeAws_restJson1ResourceArnList - */ -const se_ResourceArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceArnList omitted. -/** - * serializeAws_restJson1ResourceFilter - */ -const se_ResourceFilter = (input: ResourceFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_ResourceFilterValues(input.Values, context) }), - }; -}; +// se_ResourceFilter omitted. -/** - * serializeAws_restJson1ResourceFilterList - */ -const se_ResourceFilterList = (input: ResourceFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceFilter(entry, context); - }); -}; +// se_ResourceFilterList omitted. -/** - * serializeAws_restJson1ResourceFilterValues - */ -const se_ResourceFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceFilterValues omitted. -/** - * serializeAws_restJson1ResourceQuery - */ -const se_ResourceQuery = (input: ResourceQuery, context: __SerdeContext): any => { - return { - ...(input.Query != null && { Query: input.Query }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ResourceQuery omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1AccountSettings - */ -const de_AccountSettings = (output: any, context: __SerdeContext): AccountSettings => { - return { - GroupLifecycleEventsDesiredStatus: __expectString(output.GroupLifecycleEventsDesiredStatus), - GroupLifecycleEventsStatus: __expectString(output.GroupLifecycleEventsStatus), - GroupLifecycleEventsStatusMessage: __expectString(output.GroupLifecycleEventsStatusMessage), - } as any; -}; +// de_AccountSettings omitted. -/** - * deserializeAws_restJson1FailedResource - */ -const de_FailedResource = (output: any, context: __SerdeContext): FailedResource => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_FailedResource omitted. -/** - * deserializeAws_restJson1FailedResourceList - */ -const de_FailedResourceList = (output: any, context: __SerdeContext): FailedResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedResource(entry, context); - }); - return retVal; -}; +// de_FailedResourceList omitted. -/** - * deserializeAws_restJson1Group - */ -const de_Group = (output: any, context: __SerdeContext): Group => { - return { - Description: __expectString(output.Description), - GroupArn: __expectString(output.GroupArn), - Name: __expectString(output.Name), - } as any; -}; +// de_Group omitted. -/** - * deserializeAws_restJson1GroupConfiguration - */ -const de_GroupConfiguration = (output: any, context: __SerdeContext): GroupConfiguration => { - return { - Configuration: output.Configuration != null ? de_GroupConfigurationList(output.Configuration, context) : undefined, - FailureReason: __expectString(output.FailureReason), - ProposedConfiguration: - output.ProposedConfiguration != null - ? de_GroupConfigurationList(output.ProposedConfiguration, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; +// de_GroupConfiguration omitted. -/** - * deserializeAws_restJson1GroupConfigurationItem - */ -const de_GroupConfigurationItem = (output: any, context: __SerdeContext): GroupConfigurationItem => { - return { - Parameters: output.Parameters != null ? de_GroupParameterList(output.Parameters, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_GroupConfigurationItem omitted. -/** - * deserializeAws_restJson1GroupConfigurationList - */ -const de_GroupConfigurationList = (output: any, context: __SerdeContext): GroupConfigurationItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupConfigurationItem(entry, context); - }); - return retVal; -}; +// de_GroupConfigurationList omitted. -/** - * deserializeAws_restJson1GroupConfigurationParameter - */ -const de_GroupConfigurationParameter = (output: any, context: __SerdeContext): GroupConfigurationParameter => { - return { - Name: __expectString(output.Name), - Values: output.Values != null ? de_GroupConfigurationParameterValueList(output.Values, context) : undefined, - } as any; -}; +// de_GroupConfigurationParameter omitted. -/** - * deserializeAws_restJson1GroupConfigurationParameterValueList - */ -const de_GroupConfigurationParameterValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_GroupConfigurationParameterValueList omitted. -/** - * deserializeAws_restJson1GroupIdentifier - */ -const de_GroupIdentifier = (output: any, context: __SerdeContext): GroupIdentifier => { - return { - GroupArn: __expectString(output.GroupArn), - GroupName: __expectString(output.GroupName), - } as any; -}; +// de_GroupIdentifier omitted. -/** - * deserializeAws_restJson1GroupIdentifierList - */ -const de_GroupIdentifierList = (output: any, context: __SerdeContext): GroupIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupIdentifier(entry, context); - }); - return retVal; -}; +// de_GroupIdentifierList omitted. -/** - * deserializeAws_restJson1GroupList - */ -const de_GroupList = (output: any, context: __SerdeContext): Group[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Group(entry, context); - }); - return retVal; -}; +// de_GroupList omitted. -/** - * deserializeAws_restJson1GroupParameterList - */ -const de_GroupParameterList = (output: any, context: __SerdeContext): GroupConfigurationParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupConfigurationParameter(entry, context); - }); - return retVal; -}; +// de_GroupParameterList omitted. -/** - * deserializeAws_restJson1GroupQuery - */ -const de_GroupQuery = (output: any, context: __SerdeContext): GroupQuery => { - return { - GroupName: __expectString(output.GroupName), - ResourceQuery: output.ResourceQuery != null ? de_ResourceQuery(output.ResourceQuery, context) : undefined, - } as any; -}; +// de_GroupQuery omitted. -/** - * deserializeAws_restJson1ListGroupResourcesItem - */ -const de_ListGroupResourcesItem = (output: any, context: __SerdeContext): ListGroupResourcesItem => { - return { - Identifier: output.Identifier != null ? de_ResourceIdentifier(output.Identifier, context) : undefined, - Status: output.Status != null ? de_ResourceStatus(output.Status, context) : undefined, - } as any; -}; +// de_ListGroupResourcesItem omitted. -/** - * deserializeAws_restJson1ListGroupResourcesItemList - */ -const de_ListGroupResourcesItemList = (output: any, context: __SerdeContext): ListGroupResourcesItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListGroupResourcesItem(entry, context); - }); - return retVal; -}; +// de_ListGroupResourcesItemList omitted. -/** - * deserializeAws_restJson1PendingResource - */ -const de_PendingResource = (output: any, context: __SerdeContext): PendingResource => { - return { - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_PendingResource omitted. -/** - * deserializeAws_restJson1PendingResourceList - */ -const de_PendingResourceList = (output: any, context: __SerdeContext): PendingResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PendingResource(entry, context); - }); - return retVal; -}; +// de_PendingResourceList omitted. -/** - * deserializeAws_restJson1QueryError - */ -const de_QueryError = (output: any, context: __SerdeContext): QueryError => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_QueryError omitted. -/** - * deserializeAws_restJson1QueryErrorList - */ -const de_QueryErrorList = (output: any, context: __SerdeContext): QueryError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QueryError(entry, context); - }); - return retVal; -}; +// de_QueryErrorList omitted. -/** - * deserializeAws_restJson1ResourceArnList - */ -const de_ResourceArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceArnList omitted. -/** - * deserializeAws_restJson1ResourceIdentifier - */ -const de_ResourceIdentifier = (output: any, context: __SerdeContext): ResourceIdentifier => { - return { - ResourceArn: __expectString(output.ResourceArn), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResourceIdentifier omitted. -/** - * deserializeAws_restJson1ResourceIdentifierList - */ -const de_ResourceIdentifierList = (output: any, context: __SerdeContext): ResourceIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceIdentifier(entry, context); - }); - return retVal; -}; +// de_ResourceIdentifierList omitted. -/** - * deserializeAws_restJson1ResourceQuery - */ -const de_ResourceQuery = (output: any, context: __SerdeContext): ResourceQuery => { - return { - Query: __expectString(output.Query), - Type: __expectString(output.Type), - } as any; -}; +// de_ResourceQuery omitted. -/** - * deserializeAws_restJson1ResourceStatus - */ -const de_ResourceStatus = (output: any, context: __SerdeContext): ResourceStatus => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_ResourceStatus omitted. -/** - * deserializeAws_restJson1TagKeyList - */ -const de_TagKeyList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TagKeyList omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-robomaker/src/protocols/Aws_restJson1.ts b/clients/client-robomaker/src/protocols/Aws_restJson1.ts index f7cc5cc228d0..2da730d3248c 100644 --- a/clients/client-robomaker/src/protocols/Aws_restJson1.ts +++ b/clients/client-robomaker/src/protocols/Aws_restJson1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -11,10 +11,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -197,9 +198,7 @@ import { import { BatchPolicy, Compute, - ComputeResponse, ConcurrentDeploymentException, - DataSource, DataSourceConfig, DeploymentApplicationConfig, DeploymentConfig, @@ -207,9 +206,7 @@ import { DeploymentLaunchConfig, Environment, FailedCreateSimulationJobRequest, - FailureSummary, Filter, - FinishedWorldsSummary, Fleet, IdempotentParameterMismatchException, InternalServerException, @@ -217,7 +214,6 @@ import { LaunchConfig, LimitExceededException, LoggingConfig, - NetworkInterface, OutputLocation, PortForwardingConfig, PortMapping, @@ -230,7 +226,6 @@ import { RobotApplicationSummary, RobotDeployment, RobotSoftwareSuite, - S3KeyOutput, S3Object, ServiceUnavailableException, SimulationApplicationConfig, @@ -240,7 +235,6 @@ import { SimulationJobRequest, SimulationJobSummary, SimulationSoftwareSuite, - Source, SourceConfig, TemplateLocation, TemplateSummary, @@ -248,11 +242,9 @@ import { Tool, UploadConfiguration, VPCConfig, - VPCConfigResponse, WorldConfig, WorldCount, WorldExportJobSummary, - WorldFailure, WorldGenerationJobSummary, WorldSummary, } from "../models/models_0"; @@ -271,9 +263,11 @@ export const se_BatchDeleteWorldsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batchDeleteWorlds"; let body: any; - body = JSON.stringify({ - ...(input.worlds != null && { worlds: se_Arns(input.worlds, context) }), - }); + body = JSON.stringify( + take(input, { + worlds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -299,9 +293,11 @@ export const se_BatchDescribeSimulationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/batchDescribeSimulationJob"; let body: any; - body = JSON.stringify({ - ...(input.jobs != null && { jobs: se_Arns(input.jobs, context) }), - }); + body = JSON.stringify( + take(input, { + jobs: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -326,9 +322,11 @@ export const se_CancelDeploymentJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cancelDeploymentJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -353,9 +351,11 @@ export const se_CancelSimulationJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cancelSimulationJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -381,9 +381,11 @@ export const se_CancelSimulationJobBatchCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cancelSimulationJobBatch"; let body: any; - body = JSON.stringify({ - ...(input.batch != null && { batch: input.batch }), - }); + body = JSON.stringify( + take(input, { + batch: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -408,9 +410,11 @@ export const se_CancelWorldExportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cancelWorldExportJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -436,9 +440,11 @@ export const se_CancelWorldGenerationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cancelWorldGenerationJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -463,15 +469,15 @@ export const se_CreateDeploymentJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createDeploymentJob"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.deploymentApplicationConfigs != null && { - deploymentApplicationConfigs: se_DeploymentApplicationConfigs(input.deploymentApplicationConfigs, context), - }), - ...(input.deploymentConfig != null && { deploymentConfig: se_DeploymentConfig(input.deploymentConfig, context) }), - ...(input.fleet != null && { fleet: input.fleet }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + deploymentApplicationConfigs: (_) => _json(_), + deploymentConfig: (_) => _json(_), + fleet: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -496,10 +502,12 @@ export const se_CreateFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createFleet"; let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -524,12 +532,14 @@ export const se_CreateRobotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createRobot"; let body: any; - body = JSON.stringify({ - ...(input.architecture != null && { architecture: input.architecture }), - ...(input.greengrassGroupId != null && { greengrassGroupId: input.greengrassGroupId }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + architecture: [], + greengrassGroupId: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -555,15 +565,15 @@ export const se_CreateRobotApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createRobotApplication"; let body: any; - body = JSON.stringify({ - ...(input.environment != null && { environment: se_Environment(input.environment, context) }), - ...(input.name != null && { name: input.name }), - ...(input.robotSoftwareSuite != null && { - robotSoftwareSuite: se_RobotSoftwareSuite(input.robotSoftwareSuite, context), - }), - ...(input.sources != null && { sources: se_SourceConfigs(input.sources, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + environment: (_) => _json(_), + name: [], + robotSoftwareSuite: (_) => _json(_), + sources: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -589,12 +599,14 @@ export const se_CreateRobotApplicationVersionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createRobotApplicationVersion"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.currentRevisionId != null && { currentRevisionId: input.currentRevisionId }), - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.s3Etags != null && { s3Etags: se_S3Etags(input.s3Etags, context) }), - }); + body = JSON.stringify( + take(input, { + application: [], + currentRevisionId: [], + imageDigest: [], + s3Etags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -620,19 +632,17 @@ export const se_CreateSimulationApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createSimulationApplication"; let body: any; - body = JSON.stringify({ - ...(input.environment != null && { environment: se_Environment(input.environment, context) }), - ...(input.name != null && { name: input.name }), - ...(input.renderingEngine != null && { renderingEngine: se_RenderingEngine(input.renderingEngine, context) }), - ...(input.robotSoftwareSuite != null && { - robotSoftwareSuite: se_RobotSoftwareSuite(input.robotSoftwareSuite, context), - }), - ...(input.simulationSoftwareSuite != null && { - simulationSoftwareSuite: se_SimulationSoftwareSuite(input.simulationSoftwareSuite, context), - }), - ...(input.sources != null && { sources: se_SourceConfigs(input.sources, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + environment: (_) => _json(_), + name: [], + renderingEngine: (_) => _json(_), + robotSoftwareSuite: (_) => _json(_), + simulationSoftwareSuite: (_) => _json(_), + sources: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -658,12 +668,14 @@ export const se_CreateSimulationApplicationVersionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createSimulationApplicationVersion"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.currentRevisionId != null && { currentRevisionId: input.currentRevisionId }), - ...(input.imageDigest != null && { imageDigest: input.imageDigest }), - ...(input.s3Etags != null && { s3Etags: se_S3Etags(input.s3Etags, context) }), - }); + body = JSON.stringify( + take(input, { + application: [], + currentRevisionId: [], + imageDigest: [], + s3Etags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -688,24 +700,22 @@ export const se_CreateSimulationJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createSimulationJob"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.compute != null && { compute: se_Compute(input.compute, context) }), - ...(input.dataSources != null && { dataSources: se_DataSourceConfigs(input.dataSources, context) }), - ...(input.failureBehavior != null && { failureBehavior: input.failureBehavior }), - ...(input.iamRole != null && { iamRole: input.iamRole }), - ...(input.loggingConfig != null && { loggingConfig: se_LoggingConfig(input.loggingConfig, context) }), - ...(input.maxJobDurationInSeconds != null && { maxJobDurationInSeconds: input.maxJobDurationInSeconds }), - ...(input.outputLocation != null && { outputLocation: se_OutputLocation(input.outputLocation, context) }), - ...(input.robotApplications != null && { - robotApplications: se_RobotApplicationConfigs(input.robotApplications, context), - }), - ...(input.simulationApplications != null && { - simulationApplications: se_SimulationApplicationConfigs(input.simulationApplications, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.vpcConfig != null && { vpcConfig: se_VPCConfig(input.vpcConfig, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + compute: (_) => _json(_), + dataSources: (_) => _json(_), + failureBehavior: [], + iamRole: [], + loggingConfig: (_) => _json(_), + maxJobDurationInSeconds: [], + outputLocation: (_) => _json(_), + robotApplications: (_) => _json(_), + simulationApplications: (_) => _json(_), + tags: (_) => _json(_), + vpcConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -730,13 +740,15 @@ export const se_CreateWorldExportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createWorldExportJob"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.iamRole != null && { iamRole: input.iamRole }), - ...(input.outputLocation != null && { outputLocation: se_OutputLocation(input.outputLocation, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.worlds != null && { worlds: se_Arns(input.worlds, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + iamRole: [], + outputLocation: (_) => _json(_), + tags: (_) => _json(_), + worlds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -762,13 +774,15 @@ export const se_CreateWorldGenerationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createWorldGenerationJob"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.template != null && { template: input.template }), - ...(input.worldCount != null && { worldCount: se_WorldCount(input.worldCount, context) }), - ...(input.worldTags != null && { worldTags: se_TagMap(input.worldTags, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + template: [], + worldCount: (_) => _json(_), + worldTags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -793,13 +807,15 @@ export const se_CreateWorldTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createWorldTemplate"; let body: any; - body = JSON.stringify({ - ...(input.clientRequestToken != null && { clientRequestToken: input.clientRequestToken }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.templateBody != null && { templateBody: input.templateBody }), - ...(input.templateLocation != null && { templateLocation: se_TemplateLocation(input.templateLocation, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: [], + name: [], + tags: (_) => _json(_), + templateBody: [], + templateLocation: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -824,9 +840,11 @@ export const se_DeleteFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteFleet"; let body: any; - body = JSON.stringify({ - ...(input.fleet != null && { fleet: input.fleet }), - }); + body = JSON.stringify( + take(input, { + fleet: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -851,9 +869,11 @@ export const se_DeleteRobotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteRobot"; let body: any; - body = JSON.stringify({ - ...(input.robot != null && { robot: input.robot }), - }); + body = JSON.stringify( + take(input, { + robot: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -879,10 +899,12 @@ export const se_DeleteRobotApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteRobotApplication"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - }); + body = JSON.stringify( + take(input, { + application: [], + applicationVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -908,10 +930,12 @@ export const se_DeleteSimulationApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteSimulationApplication"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - }); + body = JSON.stringify( + take(input, { + application: [], + applicationVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -936,9 +960,11 @@ export const se_DeleteWorldTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteWorldTemplate"; let body: any; - body = JSON.stringify({ - ...(input.template != null && { template: input.template }), - }); + body = JSON.stringify( + take(input, { + template: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -963,10 +989,12 @@ export const se_DeregisterRobotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deregisterRobot"; let body: any; - body = JSON.stringify({ - ...(input.fleet != null && { fleet: input.fleet }), - ...(input.robot != null && { robot: input.robot }), - }); + body = JSON.stringify( + take(input, { + fleet: [], + robot: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -991,9 +1019,11 @@ export const se_DescribeDeploymentJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeDeploymentJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1018,9 +1048,11 @@ export const se_DescribeFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeFleet"; let body: any; - body = JSON.stringify({ - ...(input.fleet != null && { fleet: input.fleet }), - }); + body = JSON.stringify( + take(input, { + fleet: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1045,9 +1077,11 @@ export const se_DescribeRobotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeRobot"; let body: any; - body = JSON.stringify({ - ...(input.robot != null && { robot: input.robot }), - }); + body = JSON.stringify( + take(input, { + robot: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1073,10 +1107,12 @@ export const se_DescribeRobotApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeRobotApplication"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - }); + body = JSON.stringify( + take(input, { + application: [], + applicationVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1102,10 +1138,12 @@ export const se_DescribeSimulationApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeSimulationApplication"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - }); + body = JSON.stringify( + take(input, { + application: [], + applicationVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1130,9 +1168,11 @@ export const se_DescribeSimulationJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeSimulationJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1158,9 +1198,11 @@ export const se_DescribeSimulationJobBatchCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeSimulationJobBatch"; let body: any; - body = JSON.stringify({ - ...(input.batch != null && { batch: input.batch }), - }); + body = JSON.stringify( + take(input, { + batch: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1185,9 +1227,11 @@ export const se_DescribeWorldCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeWorld"; let body: any; - body = JSON.stringify({ - ...(input.world != null && { world: input.world }), - }); + body = JSON.stringify( + take(input, { + world: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1213,9 +1257,11 @@ export const se_DescribeWorldExportJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeWorldExportJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1241,9 +1287,11 @@ export const se_DescribeWorldGenerationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeWorldGenerationJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1268,9 +1316,11 @@ export const se_DescribeWorldTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeWorldTemplate"; let body: any; - body = JSON.stringify({ - ...(input.template != null && { template: input.template }), - }); + body = JSON.stringify( + take(input, { + template: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1295,10 +1345,12 @@ export const se_GetWorldTemplateBodyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/getWorldTemplateBody"; let body: any; - body = JSON.stringify({ - ...(input.generationJob != null && { generationJob: input.generationJob }), - ...(input.template != null && { template: input.template }), - }); + body = JSON.stringify( + take(input, { + generationJob: [], + template: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1323,11 +1375,13 @@ export const se_ListDeploymentJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listDeploymentJobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1352,11 +1406,13 @@ export const se_ListFleetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listFleets"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1381,12 +1437,14 @@ export const se_ListRobotApplicationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRobotApplications"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.versionQualifier != null && { versionQualifier: input.versionQualifier }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + versionQualifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1411,11 +1469,13 @@ export const se_ListRobotsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRobots"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1441,12 +1501,14 @@ export const se_ListSimulationApplicationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listSimulationApplications"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.versionQualifier != null && { versionQualifier: input.versionQualifier }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + versionQualifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1472,11 +1534,13 @@ export const se_ListSimulationJobBatchesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listSimulationJobBatches"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1501,11 +1565,13 @@ export const se_ListSimulationJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listSimulationJobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1553,11 +1619,13 @@ export const se_ListWorldExportJobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listWorldExportJobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1583,11 +1651,13 @@ export const se_ListWorldGenerationJobsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listWorldGenerationJobs"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1612,11 +1682,13 @@ export const se_ListWorldsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listWorlds"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_Filters(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1641,10 +1713,12 @@ export const se_ListWorldTemplatesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listWorldTemplates"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1669,10 +1743,12 @@ export const se_RegisterRobotCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/registerRobot"; let body: any; - body = JSON.stringify({ - ...(input.fleet != null && { fleet: input.fleet }), - ...(input.robot != null && { robot: input.robot }), - }); + body = JSON.stringify( + take(input, { + fleet: [], + robot: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1697,9 +1773,11 @@ export const se_RestartSimulationJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restartSimulationJob"; let body: any; - body = JSON.stringify({ - ...(input.job != null && { job: input.job }), - }); + body = JSON.stringify( + take(input, { + job: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1725,14 +1803,14 @@ export const se_StartSimulationJobBatchCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startSimulationJobBatch"; let body: any; - body = JSON.stringify({ - ...(input.batchPolicy != null && { batchPolicy: se_BatchPolicy(input.batchPolicy, context) }), - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.createSimulationJobRequests != null && { - createSimulationJobRequests: se_CreateSimulationJobRequests(input.createSimulationJobRequests, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + batchPolicy: (_) => _json(_), + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + createSimulationJobRequests: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1757,10 +1835,12 @@ export const se_SyncDeploymentJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/syncDeploymentJob"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.fleet != null && { fleet: input.fleet }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + fleet: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1786,9 +1866,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1844,15 +1926,15 @@ export const se_UpdateRobotApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateRobotApplication"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.currentRevisionId != null && { currentRevisionId: input.currentRevisionId }), - ...(input.environment != null && { environment: se_Environment(input.environment, context) }), - ...(input.robotSoftwareSuite != null && { - robotSoftwareSuite: se_RobotSoftwareSuite(input.robotSoftwareSuite, context), - }), - ...(input.sources != null && { sources: se_SourceConfigs(input.sources, context) }), - }); + body = JSON.stringify( + take(input, { + application: [], + currentRevisionId: [], + environment: (_) => _json(_), + robotSoftwareSuite: (_) => _json(_), + sources: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1878,19 +1960,17 @@ export const se_UpdateSimulationApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateSimulationApplication"; let body: any; - body = JSON.stringify({ - ...(input.application != null && { application: input.application }), - ...(input.currentRevisionId != null && { currentRevisionId: input.currentRevisionId }), - ...(input.environment != null && { environment: se_Environment(input.environment, context) }), - ...(input.renderingEngine != null && { renderingEngine: se_RenderingEngine(input.renderingEngine, context) }), - ...(input.robotSoftwareSuite != null && { - robotSoftwareSuite: se_RobotSoftwareSuite(input.robotSoftwareSuite, context), - }), - ...(input.simulationSoftwareSuite != null && { - simulationSoftwareSuite: se_SimulationSoftwareSuite(input.simulationSoftwareSuite, context), - }), - ...(input.sources != null && { sources: se_SourceConfigs(input.sources, context) }), - }); + body = JSON.stringify( + take(input, { + application: [], + currentRevisionId: [], + environment: (_) => _json(_), + renderingEngine: (_) => _json(_), + robotSoftwareSuite: (_) => _json(_), + simulationSoftwareSuite: (_) => _json(_), + sources: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1915,12 +1995,14 @@ export const se_UpdateWorldTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateWorldTemplate"; let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - ...(input.template != null && { template: input.template }), - ...(input.templateBody != null && { templateBody: input.templateBody }), - ...(input.templateLocation != null && { templateLocation: se_TemplateLocation(input.templateLocation, context) }), - }); + body = JSON.stringify( + take(input, { + name: [], + template: [], + templateBody: [], + templateLocation: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1946,9 +2028,10 @@ export const de_BatchDeleteWorldsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.unprocessedWorlds != null) { - contents.unprocessedWorlds = de_Arns(data.unprocessedWorlds, context); - } + const doc = take(data, { + unprocessedWorlds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1976,10 +2059,9 @@ const de_BatchDeleteWorldsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1999,12 +2081,11 @@ export const de_BatchDescribeSimulationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.jobs = de_SimulationJobs(data.jobs, context); - } - if (data.unprocessedJobs != null) { - contents.unprocessedJobs = de_Arns(data.unprocessedJobs, context); - } + const doc = take(data, { + jobs: (_) => de_SimulationJobs(_, context), + unprocessedJobs: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2035,10 +2116,9 @@ const de_BatchDescribeSimulationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2088,10 +2168,9 @@ const de_CancelDeploymentJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2141,10 +2220,9 @@ const de_CancelSimulationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2194,10 +2272,9 @@ const de_CancelSimulationJobBatchCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2247,10 +2324,9 @@ const de_CancelWorldExportJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2300,10 +2376,9 @@ const de_CancelWorldGenerationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2323,33 +2398,18 @@ export const de_CreateDeploymentJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.deploymentApplicationConfigs != null) { - contents.deploymentApplicationConfigs = de_DeploymentApplicationConfigs(data.deploymentApplicationConfigs, context); - } - if (data.deploymentConfig != null) { - contents.deploymentConfig = de_DeploymentConfig(data.deploymentConfig, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentApplicationConfigs: _json, + deploymentConfig: _json, + failureCode: __expectString, + failureReason: __expectString, + fleet: __expectString, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2389,10 +2449,9 @@ const de_CreateDeploymentJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2412,18 +2471,13 @@ export const de_CreateFleetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2454,10 +2508,9 @@ const de_CreateFleetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2477,24 +2530,15 @@ export const de_CreateRobotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.architecture != null) { - contents.architecture = __expectString(data.architecture); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.greengrassGroupId != null) { - contents.greengrassGroupId = __expectString(data.greengrassGroupId); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + architecture: __expectString, + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + greengrassGroupId: __expectString, + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2528,10 +2572,9 @@ const de_CreateRobotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2551,33 +2594,18 @@ export const de_CreateRobotApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + revisionId: __expectString, + robotSoftwareSuite: _json, + sources: _json, + tags: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2614,10 +2642,9 @@ const de_CreateRobotApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2637,30 +2664,17 @@ export const de_CreateRobotApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + revisionId: __expectString, + robotSoftwareSuite: _json, + sources: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2694,10 +2708,9 @@ const de_CreateRobotApplicationVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2717,39 +2730,20 @@ export const de_CreateSimulationApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.renderingEngine != null) { - contents.renderingEngine = de_RenderingEngine(data.renderingEngine, context); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.simulationSoftwareSuite != null) { - contents.simulationSoftwareSuite = de_SimulationSoftwareSuite(data.simulationSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + renderingEngine: _json, + revisionId: __expectString, + robotSoftwareSuite: _json, + simulationSoftwareSuite: _json, + sources: _json, + tags: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2786,10 +2780,9 @@ const de_CreateSimulationApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2809,36 +2802,19 @@ export const de_CreateSimulationApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.renderingEngine != null) { - contents.renderingEngine = de_RenderingEngine(data.renderingEngine, context); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.simulationSoftwareSuite != null) { - contents.simulationSoftwareSuite = de_SimulationSoftwareSuite(data.simulationSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + renderingEngine: _json, + revisionId: __expectString, + robotSoftwareSuite: _json, + simulationSoftwareSuite: _json, + sources: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2872,10 +2848,9 @@ const de_CreateSimulationApplicationVersionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2895,60 +2870,27 @@ export const de_CreateSimulationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.compute != null) { - contents.compute = de_ComputeResponse(data.compute, context); - } - if (data.dataSources != null) { - contents.dataSources = de_DataSources(data.dataSources, context); - } - if (data.failureBehavior != null) { - contents.failureBehavior = __expectString(data.failureBehavior); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.iamRole != null) { - contents.iamRole = __expectString(data.iamRole); - } - if (data.lastStartedAt != null) { - contents.lastStartedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartedAt))); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.loggingConfig != null) { - contents.loggingConfig = de_LoggingConfig(data.loggingConfig, context); - } - if (data.maxJobDurationInSeconds != null) { - contents.maxJobDurationInSeconds = __expectLong(data.maxJobDurationInSeconds); - } - if (data.outputLocation != null) { - contents.outputLocation = de_OutputLocation(data.outputLocation, context); - } - if (data.robotApplications != null) { - contents.robotApplications = de_RobotApplicationConfigs(data.robotApplications, context); - } - if (data.simulationApplications != null) { - contents.simulationApplications = de_SimulationApplicationConfigs(data.simulationApplications, context); - } - if (data.simulationTimeMillis != null) { - contents.simulationTimeMillis = __expectLong(data.simulationTimeMillis); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.vpcConfig != null) { - contents.vpcConfig = de_VPCConfigResponse(data.vpcConfig, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + compute: _json, + dataSources: _json, + failureBehavior: __expectString, + failureCode: __expectString, + iamRole: __expectString, + lastStartedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + loggingConfig: _json, + maxJobDurationInSeconds: __expectLong, + outputLocation: _json, + robotApplications: _json, + simulationApplications: _json, + simulationTimeMillis: __expectLong, + status: __expectString, + tags: _json, + vpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2988,10 +2930,9 @@ const de_CreateSimulationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3011,30 +2952,17 @@ export const de_CreateWorldExportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.iamRole != null) { - contents.iamRole = __expectString(data.iamRole); - } - if (data.outputLocation != null) { - contents.outputLocation = de_OutputLocation(data.outputLocation, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCode: __expectString, + iamRole: __expectString, + outputLocation: _json, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3071,10 +2999,9 @@ const de_CreateWorldExportJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3094,33 +3021,18 @@ export const de_CreateWorldGenerationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.template != null) { - contents.template = __expectString(data.template); - } - if (data.worldCount != null) { - contents.worldCount = de_WorldCount(data.worldCount, context); - } - if (data.worldTags != null) { - contents.worldTags = de_TagMap(data.worldTags, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCode: __expectString, + status: __expectString, + tags: _json, + template: __expectString, + worldCount: _json, + worldTags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3160,10 +3072,9 @@ const de_CreateWorldGenerationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3183,21 +3094,14 @@ export const de_CreateWorldTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3234,10 +3138,9 @@ const de_CreateWorldTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3284,10 +3187,9 @@ const de_DeleteFleetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3334,10 +3236,9 @@ const de_DeleteRobotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3384,10 +3285,9 @@ const de_DeleteRobotApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3434,10 +3334,9 @@ const de_DeleteSimulationApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3487,10 +3386,9 @@ const de_DeleteWorldTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3510,12 +3408,11 @@ export const de_DeregisterRobotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.robot != null) { - contents.robot = __expectString(data.robot); - } + const doc = take(data, { + fleet: __expectString, + robot: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3546,10 +3443,9 @@ const de_DeregisterRobotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3569,36 +3465,19 @@ export const de_DescribeDeploymentJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.deploymentApplicationConfigs != null) { - contents.deploymentApplicationConfigs = de_DeploymentApplicationConfigs(data.deploymentApplicationConfigs, context); - } - if (data.deploymentConfig != null) { - contents.deploymentConfig = de_DeploymentConfig(data.deploymentConfig, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.robotDeploymentSummary != null) { - contents.robotDeploymentSummary = de_RobotDeploymentSummary(data.robotDeploymentSummary, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentApplicationConfigs: _json, + deploymentConfig: _json, + failureCode: __expectString, + failureReason: __expectString, + fleet: __expectString, + robotDeploymentSummary: (_) => de_RobotDeploymentSummary(_, context), + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3629,10 +3508,9 @@ const de_DescribeDeploymentJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3652,30 +3530,17 @@ export const de_DescribeFleetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.lastDeploymentJob != null) { - contents.lastDeploymentJob = __expectString(data.lastDeploymentJob); - } - if (data.lastDeploymentStatus != null) { - contents.lastDeploymentStatus = __expectString(data.lastDeploymentStatus); - } - if (data.lastDeploymentTime != null) { - contents.lastDeploymentTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastDeploymentTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.robots != null) { - contents.robots = de_Robots(data.robots, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentJob: __expectString, + lastDeploymentStatus: __expectString, + lastDeploymentTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + robots: (_) => de_Robots(_, context), + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3706,10 +3571,9 @@ const de_DescribeFleetCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3729,36 +3593,19 @@ export const de_DescribeRobotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.architecture != null) { - contents.architecture = __expectString(data.architecture); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.fleetArn != null) { - contents.fleetArn = __expectString(data.fleetArn); - } - if (data.greengrassGroupId != null) { - contents.greengrassGroupId = __expectString(data.greengrassGroupId); - } - if (data.lastDeploymentJob != null) { - contents.lastDeploymentJob = __expectString(data.lastDeploymentJob); - } - if (data.lastDeploymentTime != null) { - contents.lastDeploymentTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastDeploymentTime))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + architecture: __expectString, + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fleetArn: __expectString, + greengrassGroupId: __expectString, + lastDeploymentJob: __expectString, + lastDeploymentTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3789,10 +3636,9 @@ const de_DescribeRobotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3812,36 +3658,19 @@ export const de_DescribeRobotApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.imageDigest != null) { - contents.imageDigest = __expectString(data.imageDigest); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + imageDigest: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + revisionId: __expectString, + robotSoftwareSuite: _json, + sources: _json, + tags: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3872,10 +3701,9 @@ const de_DescribeRobotApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3895,42 +3723,21 @@ export const de_DescribeSimulationApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.imageDigest != null) { - contents.imageDigest = __expectString(data.imageDigest); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.renderingEngine != null) { - contents.renderingEngine = de_RenderingEngine(data.renderingEngine, context); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.simulationSoftwareSuite != null) { - contents.simulationSoftwareSuite = de_SimulationSoftwareSuite(data.simulationSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + imageDigest: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + renderingEngine: _json, + revisionId: __expectString, + robotSoftwareSuite: _json, + simulationSoftwareSuite: _json, + sources: _json, + tags: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3961,10 +3768,9 @@ const de_DescribeSimulationApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3984,69 +3790,30 @@ export const de_DescribeSimulationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.compute != null) { - contents.compute = de_ComputeResponse(data.compute, context); - } - if (data.dataSources != null) { - contents.dataSources = de_DataSources(data.dataSources, context); - } - if (data.failureBehavior != null) { - contents.failureBehavior = __expectString(data.failureBehavior); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.iamRole != null) { - contents.iamRole = __expectString(data.iamRole); - } - if (data.lastStartedAt != null) { - contents.lastStartedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastStartedAt))); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.loggingConfig != null) { - contents.loggingConfig = de_LoggingConfig(data.loggingConfig, context); - } - if (data.maxJobDurationInSeconds != null) { - contents.maxJobDurationInSeconds = __expectLong(data.maxJobDurationInSeconds); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.networkInterface != null) { - contents.networkInterface = de_NetworkInterface(data.networkInterface, context); - } - if (data.outputLocation != null) { - contents.outputLocation = de_OutputLocation(data.outputLocation, context); - } - if (data.robotApplications != null) { - contents.robotApplications = de_RobotApplicationConfigs(data.robotApplications, context); - } - if (data.simulationApplications != null) { - contents.simulationApplications = de_SimulationApplicationConfigs(data.simulationApplications, context); - } - if (data.simulationTimeMillis != null) { - contents.simulationTimeMillis = __expectLong(data.simulationTimeMillis); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.vpcConfig != null) { - contents.vpcConfig = de_VPCConfigResponse(data.vpcConfig, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + compute: _json, + dataSources: _json, + failureBehavior: __expectString, + failureCode: __expectString, + failureReason: __expectString, + iamRole: __expectString, + lastStartedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + loggingConfig: _json, + maxJobDurationInSeconds: __expectLong, + name: __expectString, + networkInterface: _json, + outputLocation: _json, + robotApplications: _json, + simulationApplications: _json, + simulationTimeMillis: __expectLong, + status: __expectString, + tags: _json, + vpcConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4077,10 +3844,9 @@ const de_DescribeSimulationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4100,42 +3866,21 @@ export const de_DescribeSimulationJobBatchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.batchPolicy != null) { - contents.batchPolicy = de_BatchPolicy(data.batchPolicy, context); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.createdRequests != null) { - contents.createdRequests = de_SimulationJobSummaries(data.createdRequests, context); - } - if (data.failedRequests != null) { - contents.failedRequests = de_FailedCreateSimulationJobRequests(data.failedRequests, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.pendingRequests != null) { - contents.pendingRequests = de_CreateSimulationJobRequests(data.pendingRequests, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + batchPolicy: _json, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdRequests: (_) => de_SimulationJobSummaries(_, context), + failedRequests: (_) => de_FailedCreateSimulationJobRequests(_, context), + failureCode: __expectString, + failureReason: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pendingRequests: _json, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4163,10 +3908,9 @@ const de_DescribeSimulationJobBatchCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4186,24 +3930,15 @@ export const de_DescribeWorldCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.generationJob != null) { - contents.generationJob = __expectString(data.generationJob); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.template != null) { - contents.template = __expectString(data.template); - } - if (data.worldDescriptionBody != null) { - contents.worldDescriptionBody = __expectString(data.worldDescriptionBody); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + generationJob: __expectString, + tags: _json, + template: __expectString, + worldDescriptionBody: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4234,10 +3969,9 @@ const de_DescribeWorldCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4257,36 +3991,19 @@ export const de_DescribeWorldExportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.iamRole != null) { - contents.iamRole = __expectString(data.iamRole); - } - if (data.outputLocation != null) { - contents.outputLocation = de_OutputLocation(data.outputLocation, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.worlds != null) { - contents.worlds = de_Arns(data.worlds, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCode: __expectString, + failureReason: __expectString, + iamRole: __expectString, + outputLocation: _json, + status: __expectString, + tags: _json, + worlds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4317,10 +4034,9 @@ const de_DescribeWorldExportJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4340,39 +4056,20 @@ export const de_DescribeWorldGenerationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.finishedWorldsSummary != null) { - contents.finishedWorldsSummary = de_FinishedWorldsSummary(data.finishedWorldsSummary, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.template != null) { - contents.template = __expectString(data.template); - } - if (data.worldCount != null) { - contents.worldCount = de_WorldCount(data.worldCount, context); - } - if (data.worldTags != null) { - contents.worldTags = de_TagMap(data.worldTags, context); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCode: __expectString, + failureReason: __expectString, + finishedWorldsSummary: _json, + status: __expectString, + tags: _json, + template: __expectString, + worldCount: _json, + worldTags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4403,10 +4100,9 @@ const de_DescribeWorldGenerationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4426,27 +4122,16 @@ export const de_DescribeWorldTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + tags: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4477,10 +4162,9 @@ const de_DescribeWorldTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4500,9 +4184,10 @@ export const de_GetWorldTemplateBodyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.templateBody != null) { - contents.templateBody = __expectString(data.templateBody); - } + const doc = take(data, { + templateBody: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4533,10 +4218,9 @@ const de_GetWorldTemplateBodyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4556,12 +4240,11 @@ export const de_ListDeploymentJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deploymentJobs != null) { - contents.deploymentJobs = de_DeploymentJobs(data.deploymentJobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + deploymentJobs: (_) => de_DeploymentJobs(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4592,10 +4275,9 @@ const de_ListDeploymentJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4615,12 +4297,11 @@ export const de_ListFleetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fleetDetails != null) { - contents.fleetDetails = de_Fleets(data.fleetDetails, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + fleetDetails: (_) => de_Fleets(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4651,10 +4332,9 @@ const de_ListFleetsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4674,12 +4354,11 @@ export const de_ListRobotApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.robotApplicationSummaries != null) { - contents.robotApplicationSummaries = de_RobotApplicationSummaries(data.robotApplicationSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + robotApplicationSummaries: (_) => de_RobotApplicationSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4707,10 +4386,9 @@ const de_ListRobotApplicationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4730,12 +4408,11 @@ export const de_ListRobotsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.robots != null) { - contents.robots = de_Robots(data.robots, context); - } + const doc = take(data, { + nextToken: __expectString, + robots: (_) => de_Robots(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4766,10 +4443,9 @@ const de_ListRobotsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4789,15 +4465,11 @@ export const de_ListSimulationApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.simulationApplicationSummaries != null) { - contents.simulationApplicationSummaries = de_SimulationApplicationSummaries( - data.simulationApplicationSummaries, - context - ); - } + const doc = take(data, { + nextToken: __expectString, + simulationApplicationSummaries: (_) => de_SimulationApplicationSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4825,10 +4497,9 @@ const de_ListSimulationApplicationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4848,12 +4519,11 @@ export const de_ListSimulationJobBatchesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.simulationJobBatchSummaries != null) { - contents.simulationJobBatchSummaries = de_SimulationJobBatchSummaries(data.simulationJobBatchSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + simulationJobBatchSummaries: (_) => de_SimulationJobBatchSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4878,10 +4548,9 @@ const de_ListSimulationJobBatchesCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4901,12 +4570,11 @@ export const de_ListSimulationJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.simulationJobSummaries != null) { - contents.simulationJobSummaries = de_SimulationJobSummaries(data.simulationJobSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + simulationJobSummaries: (_) => de_SimulationJobSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4934,10 +4602,9 @@ const de_ListSimulationJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4957,9 +4624,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4990,10 +4658,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5013,12 +4680,11 @@ export const de_ListWorldExportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.worldExportJobSummaries != null) { - contents.worldExportJobSummaries = de_WorldExportJobSummaries(data.worldExportJobSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + worldExportJobSummaries: (_) => de_WorldExportJobSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5046,10 +4712,9 @@ const de_ListWorldExportJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5069,12 +4734,11 @@ export const de_ListWorldGenerationJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.worldGenerationJobSummaries != null) { - contents.worldGenerationJobSummaries = de_WorldGenerationJobSummaries(data.worldGenerationJobSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + worldGenerationJobSummaries: (_) => de_WorldGenerationJobSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5102,10 +4766,9 @@ const de_ListWorldGenerationJobsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5125,12 +4788,11 @@ export const de_ListWorldsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.worldSummaries != null) { - contents.worldSummaries = de_WorldSummaries(data.worldSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + worldSummaries: (_) => de_WorldSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5158,10 +4820,9 @@ const de_ListWorldsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5181,12 +4842,11 @@ export const de_ListWorldTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.templateSummaries != null) { - contents.templateSummaries = de_TemplateSummaries(data.templateSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + templateSummaries: (_) => de_TemplateSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5214,10 +4874,9 @@ const de_ListWorldTemplatesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5237,12 +4896,11 @@ export const de_RegisterRobotCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.robot != null) { - contents.robot = __expectString(data.robot); - } + const doc = take(data, { + fleet: __expectString, + robot: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5276,10 +4934,9 @@ const de_RegisterRobotCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5332,10 +4989,9 @@ const de_RestartSimulationJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5355,39 +5011,20 @@ export const de_StartSimulationJobBatchCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.batchPolicy != null) { - contents.batchPolicy = de_BatchPolicy(data.batchPolicy, context); - } - if (data.clientRequestToken != null) { - contents.clientRequestToken = __expectString(data.clientRequestToken); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.createdRequests != null) { - contents.createdRequests = de_SimulationJobSummaries(data.createdRequests, context); - } - if (data.failedRequests != null) { - contents.failedRequests = de_FailedCreateSimulationJobRequests(data.failedRequests, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.pendingRequests != null) { - contents.pendingRequests = de_CreateSimulationJobRequests(data.pendingRequests, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + batchPolicy: _json, + clientRequestToken: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdRequests: (_) => de_SimulationJobSummaries(_, context), + failedRequests: (_) => de_FailedCreateSimulationJobRequests(_, context), + failureCode: __expectString, + failureReason: __expectString, + pendingRequests: _json, + status: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5421,10 +5058,9 @@ const de_StartSimulationJobBatchCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5444,30 +5080,17 @@ export const de_SyncDeploymentJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.deploymentApplicationConfigs != null) { - contents.deploymentApplicationConfigs = de_DeploymentApplicationConfigs(data.deploymentApplicationConfigs, context); - } - if (data.deploymentConfig != null) { - contents.deploymentConfig = de_DeploymentConfig(data.deploymentConfig, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureReason != null) { - contents.failureReason = __expectString(data.failureReason); - } - if (data.fleet != null) { - contents.fleet = __expectString(data.fleet); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentApplicationConfigs: _json, + deploymentConfig: _json, + failureCode: __expectString, + failureReason: __expectString, + fleet: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5507,10 +5130,9 @@ const de_SyncDeploymentJobCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5560,10 +5182,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5613,10 +5234,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5636,30 +5256,17 @@ export const de_UpdateRobotApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + revisionId: __expectString, + robotSoftwareSuite: _json, + sources: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5693,10 +5300,9 @@ const de_UpdateRobotApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5716,36 +5322,19 @@ export const de_UpdateSimulationApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.environment != null) { - contents.environment = de_Environment(data.environment, context); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.renderingEngine != null) { - contents.renderingEngine = de_RenderingEngine(data.renderingEngine, context); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } - if (data.robotSoftwareSuite != null) { - contents.robotSoftwareSuite = de_RobotSoftwareSuite(data.robotSoftwareSuite, context); - } - if (data.simulationSoftwareSuite != null) { - contents.simulationSoftwareSuite = de_SimulationSoftwareSuite(data.simulationSoftwareSuite, context); - } - if (data.sources != null) { - contents.sources = de_Sources(data.sources, context); - } - if (data.version != null) { - contents.version = __expectString(data.version); - } + const doc = take(data, { + arn: __expectString, + environment: _json, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + renderingEngine: _json, + revisionId: __expectString, + robotSoftwareSuite: _json, + simulationSoftwareSuite: _json, + sources: _json, + version: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5779,10 +5368,9 @@ const de_UpdateSimulationApplicationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5802,18 +5390,13 @@ export const de_UpdateWorldTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5844,16 +5427,15 @@ const de_UpdateWorldTemplateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConcurrentDeploymentExceptionRes */ @@ -5863,9 +5445,10 @@ const de_ConcurrentDeploymentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentDeploymentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5882,9 +5465,10 @@ const de_IdempotentParameterMismatchExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5901,9 +5485,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5920,9 +5505,10 @@ const de_InvalidParameterExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5939,9 +5525,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5958,9 +5545,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5977,9 +5565,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5996,9 +5585,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6012,9 +5602,10 @@ const de_ServiceUnavailableExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6022,1131 +5613,311 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Arns - */ -const se_Arns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Arns omitted. + +// se_BatchPolicy omitted. + +// se_CommandList omitted. + +// se_Compute omitted. + +// se_CreateSimulationJobRequests omitted. + +// se_DataSourceConfig omitted. + +// se_DataSourceConfigs omitted. + +// se_DeploymentApplicationConfig omitted. + +// se_DeploymentApplicationConfigs omitted. + +// se_DeploymentConfig omitted. + +// se_DeploymentLaunchConfig omitted. + +// se_Environment omitted. + +// se_EnvironmentVariableMap omitted. + +// se_Filter omitted. + +// se_Filters omitted. + +// se_FilterValues omitted. + +// se_LaunchConfig omitted. + +// se_LoggingConfig omitted. + +// se_OutputLocation omitted. + +// se_PortForwardingConfig omitted. + +// se_PortMapping omitted. + +// se_PortMappingList omitted. + +// se_RenderingEngine omitted. + +// se_RobotApplicationConfig omitted. + +// se_RobotApplicationConfigs omitted. + +// se_RobotSoftwareSuite omitted. + +// se_S3Etags omitted. + +// se_S3KeysOrPrefixes omitted. + +// se_S3Object omitted. + +// se_SecurityGroups omitted. + +// se_SimulationApplicationConfig omitted. + +// se_SimulationApplicationConfigs omitted. + +// se_SimulationJobRequest omitted. + +// se_SimulationSoftwareSuite omitted. + +// se_SourceConfig omitted. + +// se_SourceConfigs omitted. + +// se_Subnets omitted. + +// se_TagMap omitted. + +// se_TemplateLocation omitted. + +// se_Tool omitted. + +// se_Tools omitted. + +// se_UploadConfiguration omitted. + +// se_UploadConfigurations omitted. + +// se_VPCConfig omitted. + +// se_WorldConfig omitted. + +// se_WorldConfigs omitted. + +// se_WorldCount omitted. + +// de_Arns omitted. + +// de_BatchPolicy omitted. + +// de_CommandList omitted. + +// de_Compute omitted. + +// de_ComputeResponse omitted. + +// de_CreateSimulationJobRequests omitted. + +// de_DataSource omitted. + +// de_DataSourceConfig omitted. + +// de_DataSourceConfigs omitted. + +// de_DataSourceNames omitted. + +// de_DataSources omitted. + +// de_DeploymentApplicationConfig omitted. + +// de_DeploymentApplicationConfigs omitted. + +// de_DeploymentConfig omitted. /** - * serializeAws_restJson1BatchPolicy + * deserializeAws_restJson1DeploymentJob */ -const se_BatchPolicy = (input: BatchPolicy, context: __SerdeContext): any => { - return { - ...(input.maxConcurrency != null && { maxConcurrency: input.maxConcurrency }), - ...(input.timeoutInSeconds != null && { timeoutInSeconds: input.timeoutInSeconds }), - }; +const de_DeploymentJob = (output: any, context: __SerdeContext): DeploymentJob => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentApplicationConfigs: _json, + deploymentConfig: _json, + failureCode: __expectString, + failureReason: __expectString, + fleet: __expectString, + status: __expectString, + }) as any; }; /** - * serializeAws_restJson1CommandList + * deserializeAws_restJson1DeploymentJobs */ -const se_CommandList = (input: string[], context: __SerdeContext): any => { - return input +const de_DeploymentJobs = (output: any, context: __SerdeContext): DeploymentJob[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_DeploymentJob(entry, context); }); + return retVal; }; +// de_DeploymentLaunchConfig omitted. + +// de_Environment omitted. + +// de_EnvironmentVariableMap omitted. + /** - * serializeAws_restJson1Compute + * deserializeAws_restJson1FailedCreateSimulationJobRequest */ -const se_Compute = (input: Compute, context: __SerdeContext): any => { - return { - ...(input.computeType != null && { computeType: input.computeType }), - ...(input.gpuUnitLimit != null && { gpuUnitLimit: input.gpuUnitLimit }), - ...(input.simulationUnitLimit != null && { simulationUnitLimit: input.simulationUnitLimit }), - }; +const de_FailedCreateSimulationJobRequest = ( + output: any, + context: __SerdeContext +): FailedCreateSimulationJobRequest => { + return take(output, { + failedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCode: __expectString, + failureReason: __expectString, + request: _json, + }) as any; }; /** - * serializeAws_restJson1CreateSimulationJobRequests + * deserializeAws_restJson1FailedCreateSimulationJobRequests */ -const se_CreateSimulationJobRequests = (input: SimulationJobRequest[], context: __SerdeContext): any => { - return input +const de_FailedCreateSimulationJobRequests = ( + output: any, + context: __SerdeContext +): FailedCreateSimulationJobRequest[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_SimulationJobRequest(entry, context); + .map((entry: any) => { + return de_FailedCreateSimulationJobRequest(entry, context); }); + return retVal; }; +// de_FailureSummary omitted. + +// de_FinishedWorldsSummary omitted. + /** - * serializeAws_restJson1DataSourceConfig + * deserializeAws_restJson1Fleet */ -const se_DataSourceConfig = (input: DataSourceConfig, context: __SerdeContext): any => { - return { - ...(input.destination != null && { destination: input.destination }), - ...(input.name != null && { name: input.name }), - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3Keys != null && { s3Keys: se_S3KeysOrPrefixes(input.s3Keys, context) }), - ...(input.type != null && { type: input.type }), - }; +const de_Fleet = (output: any, context: __SerdeContext): Fleet => { + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastDeploymentJob: __expectString, + lastDeploymentStatus: __expectString, + lastDeploymentTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** - * serializeAws_restJson1DataSourceConfigs + * deserializeAws_restJson1Fleets */ -const se_DataSourceConfigs = (input: DataSourceConfig[], context: __SerdeContext): any => { - return input +const de_Fleets = (output: any, context: __SerdeContext): Fleet[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_DataSourceConfig(entry, context); + .map((entry: any) => { + return de_Fleet(entry, context); }); + return retVal; }; +// de_LaunchConfig omitted. + +// de_LoggingConfig omitted. + +// de_NetworkInterface omitted. + +// de_OutputLocation omitted. + +// de_PortForwardingConfig omitted. + +// de_PortMapping omitted. + +// de_PortMappingList omitted. + /** - * serializeAws_restJson1DeploymentApplicationConfig + * deserializeAws_restJson1ProgressDetail */ -const se_DeploymentApplicationConfig = (input: DeploymentApplicationConfig, context: __SerdeContext): any => { - return { - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - ...(input.launchConfig != null && { launchConfig: se_DeploymentLaunchConfig(input.launchConfig, context) }), - }; +const de_ProgressDetail = (output: any, context: __SerdeContext): ProgressDetail => { + return take(output, { + currentProgress: __expectString, + estimatedTimeRemainingSeconds: __expectInt32, + percentDone: __limitedParseFloat32, + targetResource: __expectString, + }) as any; }; +// de_RenderingEngine omitted. + /** - * serializeAws_restJson1DeploymentApplicationConfigs + * deserializeAws_restJson1Robot */ -const se_DeploymentApplicationConfigs = (input: DeploymentApplicationConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeploymentApplicationConfig(entry, context); - }); +const de_Robot = (output: any, context: __SerdeContext): Robot => { + return take(output, { + architecture: __expectString, + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + fleetArn: __expectString, + greenGrassGroupId: __expectString, + lastDeploymentJob: __expectString, + lastDeploymentTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + status: __expectString, + }) as any; }; +// de_RobotApplicationConfig omitted. + +// de_RobotApplicationConfigs omitted. + +// de_RobotApplicationNames omitted. + /** - * serializeAws_restJson1DeploymentConfig + * deserializeAws_restJson1RobotApplicationSummaries */ -const se_DeploymentConfig = (input: DeploymentConfig, context: __SerdeContext): any => { - return { - ...(input.concurrentDeploymentPercentage != null && { - concurrentDeploymentPercentage: input.concurrentDeploymentPercentage, - }), - ...(input.downloadConditionFile != null && { - downloadConditionFile: se_S3Object(input.downloadConditionFile, context), - }), - ...(input.failureThresholdPercentage != null && { failureThresholdPercentage: input.failureThresholdPercentage }), - ...(input.robotDeploymentTimeoutInSeconds != null && { - robotDeploymentTimeoutInSeconds: input.robotDeploymentTimeoutInSeconds, - }), - }; +const de_RobotApplicationSummaries = (output: any, context: __SerdeContext): RobotApplicationSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_RobotApplicationSummary(entry, context); + }); + return retVal; }; /** - * serializeAws_restJson1DeploymentLaunchConfig + * deserializeAws_restJson1RobotApplicationSummary */ -const se_DeploymentLaunchConfig = (input: DeploymentLaunchConfig, context: __SerdeContext): any => { - return { - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariableMap(input.environmentVariables, context), - }), - ...(input.launchFile != null && { launchFile: input.launchFile }), - ...(input.packageName != null && { packageName: input.packageName }), - ...(input.postLaunchFile != null && { postLaunchFile: input.postLaunchFile }), - ...(input.preLaunchFile != null && { preLaunchFile: input.preLaunchFile }), - }; +const de_RobotApplicationSummary = (output: any, context: __SerdeContext): RobotApplicationSummary => { + return take(output, { + arn: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + robotSoftwareSuite: _json, + version: __expectString, + }) as any; }; /** - * serializeAws_restJson1Environment - */ -const se_Environment = (input: Environment, context: __SerdeContext): any => { - return { - ...(input.uri != null && { uri: input.uri }), - }; -}; - -/** - * serializeAws_restJson1EnvironmentVariableMap - */ -const se_EnvironmentVariableMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValues(input.values, context) }), - }; -}; - -/** - * serializeAws_restJson1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; - -/** - * serializeAws_restJson1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1LaunchConfig - */ -const se_LaunchConfig = (input: LaunchConfig, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: se_CommandList(input.command, context) }), - ...(input.environmentVariables != null && { - environmentVariables: se_EnvironmentVariableMap(input.environmentVariables, context), - }), - ...(input.launchFile != null && { launchFile: input.launchFile }), - ...(input.packageName != null && { packageName: input.packageName }), - ...(input.portForwardingConfig != null && { - portForwardingConfig: se_PortForwardingConfig(input.portForwardingConfig, context), - }), - ...(input.streamUI != null && { streamUI: input.streamUI }), - }; -}; - -/** - * serializeAws_restJson1LoggingConfig - */ -const se_LoggingConfig = (input: LoggingConfig, context: __SerdeContext): any => { - return { - ...(input.recordAllRosTopics != null && { recordAllRosTopics: input.recordAllRosTopics }), - }; -}; - -/** - * serializeAws_restJson1OutputLocation - */ -const se_OutputLocation = (input: OutputLocation, context: __SerdeContext): any => { - return { - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3Prefix != null && { s3Prefix: input.s3Prefix }), - }; -}; - -/** - * serializeAws_restJson1PortForwardingConfig - */ -const se_PortForwardingConfig = (input: PortForwardingConfig, context: __SerdeContext): any => { - return { - ...(input.portMappings != null && { portMappings: se_PortMappingList(input.portMappings, context) }), - }; -}; - -/** - * serializeAws_restJson1PortMapping - */ -const se_PortMapping = (input: PortMapping, context: __SerdeContext): any => { - return { - ...(input.applicationPort != null && { applicationPort: input.applicationPort }), - ...(input.enableOnPublicIp != null && { enableOnPublicIp: input.enableOnPublicIp }), - ...(input.jobPort != null && { jobPort: input.jobPort }), - }; -}; - -/** - * serializeAws_restJson1PortMappingList - */ -const se_PortMappingList = (input: PortMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortMapping(entry, context); - }); -}; - -/** - * serializeAws_restJson1RenderingEngine - */ -const se_RenderingEngine = (input: RenderingEngine, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_restJson1RobotApplicationConfig - */ -const se_RobotApplicationConfig = (input: RobotApplicationConfig, context: __SerdeContext): any => { - return { - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - ...(input.launchConfig != null && { launchConfig: se_LaunchConfig(input.launchConfig, context) }), - ...(input.tools != null && { tools: se_Tools(input.tools, context) }), - ...(input.uploadConfigurations != null && { - uploadConfigurations: se_UploadConfigurations(input.uploadConfigurations, context), - }), - ...(input.useDefaultTools != null && { useDefaultTools: input.useDefaultTools }), - ...(input.useDefaultUploadConfigurations != null && { - useDefaultUploadConfigurations: input.useDefaultUploadConfigurations, - }), - }; -}; - -/** - * serializeAws_restJson1RobotApplicationConfigs - */ -const se_RobotApplicationConfigs = (input: RobotApplicationConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RobotApplicationConfig(entry, context); - }); -}; - -/** - * serializeAws_restJson1RobotSoftwareSuite - */ -const se_RobotSoftwareSuite = (input: RobotSoftwareSuite, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_restJson1S3Etags - */ -const se_S3Etags = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1S3KeysOrPrefixes - */ -const se_S3KeysOrPrefixes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1S3Object - */ -const se_S3Object = (input: S3Object, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.etag != null && { etag: input.etag }), - ...(input.key != null && { key: input.key }), - }; -}; - -/** - * serializeAws_restJson1SecurityGroups - */ -const se_SecurityGroups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SimulationApplicationConfig - */ -const se_SimulationApplicationConfig = (input: SimulationApplicationConfig, context: __SerdeContext): any => { - return { - ...(input.application != null && { application: input.application }), - ...(input.applicationVersion != null && { applicationVersion: input.applicationVersion }), - ...(input.launchConfig != null && { launchConfig: se_LaunchConfig(input.launchConfig, context) }), - ...(input.tools != null && { tools: se_Tools(input.tools, context) }), - ...(input.uploadConfigurations != null && { - uploadConfigurations: se_UploadConfigurations(input.uploadConfigurations, context), - }), - ...(input.useDefaultTools != null && { useDefaultTools: input.useDefaultTools }), - ...(input.useDefaultUploadConfigurations != null && { - useDefaultUploadConfigurations: input.useDefaultUploadConfigurations, - }), - ...(input.worldConfigs != null && { worldConfigs: se_WorldConfigs(input.worldConfigs, context) }), - }; -}; - -/** - * serializeAws_restJson1SimulationApplicationConfigs - */ -const se_SimulationApplicationConfigs = (input: SimulationApplicationConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SimulationApplicationConfig(entry, context); - }); -}; - -/** - * serializeAws_restJson1SimulationJobRequest - */ -const se_SimulationJobRequest = (input: SimulationJobRequest, context: __SerdeContext): any => { - return { - ...(input.compute != null && { compute: se_Compute(input.compute, context) }), - ...(input.dataSources != null && { dataSources: se_DataSourceConfigs(input.dataSources, context) }), - ...(input.failureBehavior != null && { failureBehavior: input.failureBehavior }), - ...(input.iamRole != null && { iamRole: input.iamRole }), - ...(input.loggingConfig != null && { loggingConfig: se_LoggingConfig(input.loggingConfig, context) }), - ...(input.maxJobDurationInSeconds != null && { maxJobDurationInSeconds: input.maxJobDurationInSeconds }), - ...(input.outputLocation != null && { outputLocation: se_OutputLocation(input.outputLocation, context) }), - ...(input.robotApplications != null && { - robotApplications: se_RobotApplicationConfigs(input.robotApplications, context), - }), - ...(input.simulationApplications != null && { - simulationApplications: se_SimulationApplicationConfigs(input.simulationApplications, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.useDefaultApplications != null && { useDefaultApplications: input.useDefaultApplications }), - ...(input.vpcConfig != null && { vpcConfig: se_VPCConfig(input.vpcConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1SimulationSoftwareSuite - */ -const se_SimulationSoftwareSuite = (input: SimulationSoftwareSuite, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; - -/** - * serializeAws_restJson1SourceConfig - */ -const se_SourceConfig = (input: SourceConfig, context: __SerdeContext): any => { - return { - ...(input.architecture != null && { architecture: input.architecture }), - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3Key != null && { s3Key: input.s3Key }), - }; -}; - -/** - * serializeAws_restJson1SourceConfigs - */ -const se_SourceConfigs = (input: SourceConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceConfig(entry, context); - }); -}; - -/** - * serializeAws_restJson1Subnets - */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1TemplateLocation - */ -const se_TemplateLocation = (input: TemplateLocation, context: __SerdeContext): any => { - return { - ...(input.s3Bucket != null && { s3Bucket: input.s3Bucket }), - ...(input.s3Key != null && { s3Key: input.s3Key }), - }; -}; - -/** - * serializeAws_restJson1Tool - */ -const se_Tool = (input: Tool, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: input.command }), - ...(input.exitBehavior != null && { exitBehavior: input.exitBehavior }), - ...(input.name != null && { name: input.name }), - ...(input.streamOutputToCloudWatch != null && { streamOutputToCloudWatch: input.streamOutputToCloudWatch }), - ...(input.streamUI != null && { streamUI: input.streamUI }), - }; -}; - -/** - * serializeAws_restJson1Tools - */ -const se_Tools = (input: Tool[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tool(entry, context); - }); -}; - -/** - * serializeAws_restJson1UploadConfiguration - */ -const se_UploadConfiguration = (input: UploadConfiguration, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.path != null && { path: input.path }), - ...(input.uploadBehavior != null && { uploadBehavior: input.uploadBehavior }), - }; -}; - -/** - * serializeAws_restJson1UploadConfigurations - */ -const se_UploadConfigurations = (input: UploadConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UploadConfiguration(entry, context); - }); -}; - -/** - * serializeAws_restJson1VPCConfig - */ -const se_VPCConfig = (input: VPCConfig, context: __SerdeContext): any => { - return { - ...(input.assignPublicIp != null && { assignPublicIp: input.assignPublicIp }), - ...(input.securityGroups != null && { securityGroups: se_SecurityGroups(input.securityGroups, context) }), - ...(input.subnets != null && { subnets: se_Subnets(input.subnets, context) }), - }; -}; - -/** - * serializeAws_restJson1WorldConfig - */ -const se_WorldConfig = (input: WorldConfig, context: __SerdeContext): any => { - return { - ...(input.world != null && { world: input.world }), - }; -}; - -/** - * serializeAws_restJson1WorldConfigs - */ -const se_WorldConfigs = (input: WorldConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WorldConfig(entry, context); - }); -}; - -/** - * serializeAws_restJson1WorldCount - */ -const se_WorldCount = (input: WorldCount, context: __SerdeContext): any => { - return { - ...(input.floorplanCount != null && { floorplanCount: input.floorplanCount }), - ...(input.interiorCountPerFloorplan != null && { interiorCountPerFloorplan: input.interiorCountPerFloorplan }), - }; -}; - -/** - * deserializeAws_restJson1Arns - */ -const de_Arns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1BatchPolicy - */ -const de_BatchPolicy = (output: any, context: __SerdeContext): BatchPolicy => { - return { - maxConcurrency: __expectInt32(output.maxConcurrency), - timeoutInSeconds: __expectLong(output.timeoutInSeconds), - } as any; -}; - -/** - * deserializeAws_restJson1CommandList - */ -const de_CommandList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Compute - */ -const de_Compute = (output: any, context: __SerdeContext): Compute => { - return { - computeType: __expectString(output.computeType), - gpuUnitLimit: __expectInt32(output.gpuUnitLimit), - simulationUnitLimit: __expectInt32(output.simulationUnitLimit), - } as any; -}; - -/** - * deserializeAws_restJson1ComputeResponse - */ -const de_ComputeResponse = (output: any, context: __SerdeContext): ComputeResponse => { - return { - computeType: __expectString(output.computeType), - gpuUnitLimit: __expectInt32(output.gpuUnitLimit), - simulationUnitLimit: __expectInt32(output.simulationUnitLimit), - } as any; -}; - -/** - * deserializeAws_restJson1CreateSimulationJobRequests - */ -const de_CreateSimulationJobRequests = (output: any, context: __SerdeContext): SimulationJobRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimulationJobRequest(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - destination: __expectString(output.destination), - name: __expectString(output.name), - s3Bucket: __expectString(output.s3Bucket), - s3Keys: output.s3Keys != null ? de_S3KeyOutputs(output.s3Keys, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1DataSourceConfig - */ -const de_DataSourceConfig = (output: any, context: __SerdeContext): DataSourceConfig => { - return { - destination: __expectString(output.destination), - name: __expectString(output.name), - s3Bucket: __expectString(output.s3Bucket), - s3Keys: output.s3Keys != null ? de_S3KeysOrPrefixes(output.s3Keys, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_restJson1DataSourceConfigs - */ -const de_DataSourceConfigs = (output: any, context: __SerdeContext): DataSourceConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSourceConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSourceNames - */ -const de_DataSourceNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DataSources - */ -const de_DataSources = (output: any, context: __SerdeContext): DataSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DataSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DeploymentApplicationConfig - */ -const de_DeploymentApplicationConfig = (output: any, context: __SerdeContext): DeploymentApplicationConfig => { - return { - application: __expectString(output.application), - applicationVersion: __expectString(output.applicationVersion), - launchConfig: output.launchConfig != null ? de_DeploymentLaunchConfig(output.launchConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1DeploymentApplicationConfigs - */ -const de_DeploymentApplicationConfigs = (output: any, context: __SerdeContext): DeploymentApplicationConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeploymentApplicationConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DeploymentConfig - */ -const de_DeploymentConfig = (output: any, context: __SerdeContext): DeploymentConfig => { - return { - concurrentDeploymentPercentage: __expectInt32(output.concurrentDeploymentPercentage), - downloadConditionFile: - output.downloadConditionFile != null ? de_S3Object(output.downloadConditionFile, context) : undefined, - failureThresholdPercentage: __expectInt32(output.failureThresholdPercentage), - robotDeploymentTimeoutInSeconds: __expectLong(output.robotDeploymentTimeoutInSeconds), - } as any; -}; - -/** - * deserializeAws_restJson1DeploymentJob - */ -const de_DeploymentJob = (output: any, context: __SerdeContext): DeploymentJob => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - deploymentApplicationConfigs: - output.deploymentApplicationConfigs != null - ? de_DeploymentApplicationConfigs(output.deploymentApplicationConfigs, context) - : undefined, - deploymentConfig: - output.deploymentConfig != null ? de_DeploymentConfig(output.deploymentConfig, context) : undefined, - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - fleet: __expectString(output.fleet), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1DeploymentJobs - */ -const de_DeploymentJobs = (output: any, context: __SerdeContext): DeploymentJob[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeploymentJob(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1DeploymentLaunchConfig - */ -const de_DeploymentLaunchConfig = (output: any, context: __SerdeContext): DeploymentLaunchConfig => { - return { - environmentVariables: - output.environmentVariables != null ? de_EnvironmentVariableMap(output.environmentVariables, context) : undefined, - launchFile: __expectString(output.launchFile), - packageName: __expectString(output.packageName), - postLaunchFile: __expectString(output.postLaunchFile), - preLaunchFile: __expectString(output.preLaunchFile), - } as any; -}; - -/** - * deserializeAws_restJson1Environment - */ -const de_Environment = (output: any, context: __SerdeContext): Environment => { - return { - uri: __expectString(output.uri), - } as any; -}; - -/** - * deserializeAws_restJson1EnvironmentVariableMap - */ -const de_EnvironmentVariableMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1FailedCreateSimulationJobRequest - */ -const de_FailedCreateSimulationJobRequest = ( - output: any, - context: __SerdeContext -): FailedCreateSimulationJobRequest => { - return { - failedAt: - output.failedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.failedAt))) : undefined, - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - request: output.request != null ? de_SimulationJobRequest(output.request, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1FailedCreateSimulationJobRequests - */ -const de_FailedCreateSimulationJobRequests = ( - output: any, - context: __SerdeContext -): FailedCreateSimulationJobRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedCreateSimulationJobRequest(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1FailureSummary - */ -const de_FailureSummary = (output: any, context: __SerdeContext): FailureSummary => { - return { - failures: output.failures != null ? de_WorldFailures(output.failures, context) : undefined, - totalFailureCount: __expectInt32(output.totalFailureCount), - } as any; -}; - -/** - * deserializeAws_restJson1FinishedWorldsSummary - */ -const de_FinishedWorldsSummary = (output: any, context: __SerdeContext): FinishedWorldsSummary => { - return { - failureSummary: output.failureSummary != null ? de_FailureSummary(output.failureSummary, context) : undefined, - finishedCount: __expectInt32(output.finishedCount), - succeededWorlds: output.succeededWorlds != null ? de_Arns(output.succeededWorlds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Fleet - */ -const de_Fleet = (output: any, context: __SerdeContext): Fleet => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastDeploymentJob: __expectString(output.lastDeploymentJob), - lastDeploymentStatus: __expectString(output.lastDeploymentStatus), - lastDeploymentTime: - output.lastDeploymentTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentTime))) - : undefined, - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_restJson1Fleets - */ -const de_Fleets = (output: any, context: __SerdeContext): Fleet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Fleet(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LaunchConfig - */ -const de_LaunchConfig = (output: any, context: __SerdeContext): LaunchConfig => { - return { - command: output.command != null ? de_CommandList(output.command, context) : undefined, - environmentVariables: - output.environmentVariables != null ? de_EnvironmentVariableMap(output.environmentVariables, context) : undefined, - launchFile: __expectString(output.launchFile), - packageName: __expectString(output.packageName), - portForwardingConfig: - output.portForwardingConfig != null ? de_PortForwardingConfig(output.portForwardingConfig, context) : undefined, - streamUI: __expectBoolean(output.streamUI), - } as any; -}; - -/** - * deserializeAws_restJson1LoggingConfig - */ -const de_LoggingConfig = (output: any, context: __SerdeContext): LoggingConfig => { - return { - recordAllRosTopics: __expectBoolean(output.recordAllRosTopics), - } as any; -}; - -/** - * deserializeAws_restJson1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - networkInterfaceId: __expectString(output.networkInterfaceId), - privateIpAddress: __expectString(output.privateIpAddress), - publicIpAddress: __expectString(output.publicIpAddress), - } as any; -}; - -/** - * deserializeAws_restJson1OutputLocation - */ -const de_OutputLocation = (output: any, context: __SerdeContext): OutputLocation => { - return { - s3Bucket: __expectString(output.s3Bucket), - s3Prefix: __expectString(output.s3Prefix), - } as any; -}; - -/** - * deserializeAws_restJson1PortForwardingConfig - */ -const de_PortForwardingConfig = (output: any, context: __SerdeContext): PortForwardingConfig => { - return { - portMappings: output.portMappings != null ? de_PortMappingList(output.portMappings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1PortMapping - */ -const de_PortMapping = (output: any, context: __SerdeContext): PortMapping => { - return { - applicationPort: __expectInt32(output.applicationPort), - enableOnPublicIp: __expectBoolean(output.enableOnPublicIp), - jobPort: __expectInt32(output.jobPort), - } as any; -}; - -/** - * deserializeAws_restJson1PortMappingList - */ -const de_PortMappingList = (output: any, context: __SerdeContext): PortMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortMapping(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ProgressDetail - */ -const de_ProgressDetail = (output: any, context: __SerdeContext): ProgressDetail => { - return { - currentProgress: __expectString(output.currentProgress), - estimatedTimeRemainingSeconds: __expectInt32(output.estimatedTimeRemainingSeconds), - percentDone: __limitedParseFloat32(output.percentDone), - targetResource: __expectString(output.targetResource), - } as any; -}; - -/** - * deserializeAws_restJson1RenderingEngine - */ -const de_RenderingEngine = (output: any, context: __SerdeContext): RenderingEngine => { - return { - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1Robot - */ -const de_Robot = (output: any, context: __SerdeContext): Robot => { - return { - architecture: __expectString(output.architecture), - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - fleetArn: __expectString(output.fleetArn), - greenGrassGroupId: __expectString(output.greenGrassGroupId), - lastDeploymentJob: __expectString(output.lastDeploymentJob), - lastDeploymentTime: - output.lastDeploymentTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastDeploymentTime))) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1RobotApplicationConfig - */ -const de_RobotApplicationConfig = (output: any, context: __SerdeContext): RobotApplicationConfig => { - return { - application: __expectString(output.application), - applicationVersion: __expectString(output.applicationVersion), - launchConfig: output.launchConfig != null ? de_LaunchConfig(output.launchConfig, context) : undefined, - tools: output.tools != null ? de_Tools(output.tools, context) : undefined, - uploadConfigurations: - output.uploadConfigurations != null ? de_UploadConfigurations(output.uploadConfigurations, context) : undefined, - useDefaultTools: __expectBoolean(output.useDefaultTools), - useDefaultUploadConfigurations: __expectBoolean(output.useDefaultUploadConfigurations), - } as any; -}; - -/** - * deserializeAws_restJson1RobotApplicationConfigs - */ -const de_RobotApplicationConfigs = (output: any, context: __SerdeContext): RobotApplicationConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RobotApplicationConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1RobotApplicationNames - */ -const de_RobotApplicationNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1RobotApplicationSummaries - */ -const de_RobotApplicationSummaries = (output: any, context: __SerdeContext): RobotApplicationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RobotApplicationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1RobotApplicationSummary - */ -const de_RobotApplicationSummary = (output: any, context: __SerdeContext): RobotApplicationSummary => { - return { - arn: __expectString(output.arn), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - name: __expectString(output.name), - robotSoftwareSuite: - output.robotSoftwareSuite != null ? de_RobotSoftwareSuite(output.robotSoftwareSuite, context) : undefined, - version: __expectString(output.version), - } as any; -}; - -/** - * deserializeAws_restJson1RobotDeployment + * deserializeAws_restJson1RobotDeployment */ const de_RobotDeployment = (output: any, context: __SerdeContext): RobotDeployment => { - return { - arn: __expectString(output.arn), - deploymentFinishTime: - output.deploymentFinishTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deploymentFinishTime))) - : undefined, - deploymentStartTime: - output.deploymentStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deploymentStartTime))) - : undefined, - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - progressDetail: output.progressDetail != null ? de_ProgressDetail(output.progressDetail, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + deploymentFinishTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deploymentStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failureCode: __expectString, + failureReason: __expectString, + progressDetail: (_: any) => de_ProgressDetail(_, context), + status: __expectString, + }) as any; }; /** @@ -7156,9 +5927,6 @@ const de_RobotDeploymentSummary = (output: any, context: __SerdeContext): RobotD const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RobotDeployment(entry, context); }); return retVal; @@ -7171,136 +5939,28 @@ const de_Robots = (output: any, context: __SerdeContext): Robot[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Robot(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RobotSoftwareSuite - */ -const de_RobotSoftwareSuite = (output: any, context: __SerdeContext): RobotSoftwareSuite => { - return { - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; +// de_RobotSoftwareSuite omitted. -/** - * deserializeAws_restJson1S3KeyOutput - */ -const de_S3KeyOutput = (output: any, context: __SerdeContext): S3KeyOutput => { - return { - etag: __expectString(output.etag), - s3Key: __expectString(output.s3Key), - } as any; -}; +// de_S3KeyOutput omitted. -/** - * deserializeAws_restJson1S3KeyOutputs - */ -const de_S3KeyOutputs = (output: any, context: __SerdeContext): S3KeyOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3KeyOutput(entry, context); - }); - return retVal; -}; +// de_S3KeyOutputs omitted. -/** - * deserializeAws_restJson1S3KeysOrPrefixes - */ -const de_S3KeysOrPrefixes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_S3KeysOrPrefixes omitted. -/** - * deserializeAws_restJson1S3Object - */ -const de_S3Object = (output: any, context: __SerdeContext): S3Object => { - return { - bucket: __expectString(output.bucket), - etag: __expectString(output.etag), - key: __expectString(output.key), - } as any; -}; +// de_S3Object omitted. -/** - * deserializeAws_restJson1SecurityGroups - */ -const de_SecurityGroups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroups omitted. -/** - * deserializeAws_restJson1SimulationApplicationConfig - */ -const de_SimulationApplicationConfig = (output: any, context: __SerdeContext): SimulationApplicationConfig => { - return { - application: __expectString(output.application), - applicationVersion: __expectString(output.applicationVersion), - launchConfig: output.launchConfig != null ? de_LaunchConfig(output.launchConfig, context) : undefined, - tools: output.tools != null ? de_Tools(output.tools, context) : undefined, - uploadConfigurations: - output.uploadConfigurations != null ? de_UploadConfigurations(output.uploadConfigurations, context) : undefined, - useDefaultTools: __expectBoolean(output.useDefaultTools), - useDefaultUploadConfigurations: __expectBoolean(output.useDefaultUploadConfigurations), - worldConfigs: output.worldConfigs != null ? de_WorldConfigs(output.worldConfigs, context) : undefined, - } as any; -}; +// de_SimulationApplicationConfig omitted. -/** - * deserializeAws_restJson1SimulationApplicationConfigs - */ -const de_SimulationApplicationConfigs = (output: any, context: __SerdeContext): SimulationApplicationConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimulationApplicationConfig(entry, context); - }); - return retVal; -}; +// de_SimulationApplicationConfigs omitted. -/** - * deserializeAws_restJson1SimulationApplicationNames - */ -const de_SimulationApplicationNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SimulationApplicationNames omitted. /** * deserializeAws_restJson1SimulationApplicationSummaries @@ -7309,9 +5969,6 @@ const de_SimulationApplicationSummaries = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SimulationApplicationSummary(entry, context); }); return retVal; @@ -7321,61 +5978,43 @@ const de_SimulationApplicationSummaries = (output: any, context: __SerdeContext) * deserializeAws_restJson1SimulationApplicationSummary */ const de_SimulationApplicationSummary = (output: any, context: __SerdeContext): SimulationApplicationSummary => { - return { - arn: __expectString(output.arn), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - name: __expectString(output.name), - robotSoftwareSuite: - output.robotSoftwareSuite != null ? de_RobotSoftwareSuite(output.robotSoftwareSuite, context) : undefined, - simulationSoftwareSuite: - output.simulationSoftwareSuite != null - ? de_SimulationSoftwareSuite(output.simulationSoftwareSuite, context) - : undefined, - version: __expectString(output.version), - } as any; + return take(output, { + arn: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + robotSoftwareSuite: _json, + simulationSoftwareSuite: _json, + version: __expectString, + }) as any; }; /** * deserializeAws_restJson1SimulationJob */ const de_SimulationJob = (output: any, context: __SerdeContext): SimulationJob => { - return { - arn: __expectString(output.arn), - clientRequestToken: __expectString(output.clientRequestToken), - compute: output.compute != null ? de_ComputeResponse(output.compute, context) : undefined, - dataSources: output.dataSources != null ? de_DataSources(output.dataSources, context) : undefined, - failureBehavior: __expectString(output.failureBehavior), - failureCode: __expectString(output.failureCode), - failureReason: __expectString(output.failureReason), - iamRole: __expectString(output.iamRole), - lastStartedAt: - output.lastStartedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastStartedAt))) - : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - loggingConfig: output.loggingConfig != null ? de_LoggingConfig(output.loggingConfig, context) : undefined, - maxJobDurationInSeconds: __expectLong(output.maxJobDurationInSeconds), - name: __expectString(output.name), - networkInterface: - output.networkInterface != null ? de_NetworkInterface(output.networkInterface, context) : undefined, - outputLocation: output.outputLocation != null ? de_OutputLocation(output.outputLocation, context) : undefined, - robotApplications: - output.robotApplications != null ? de_RobotApplicationConfigs(output.robotApplications, context) : undefined, - simulationApplications: - output.simulationApplications != null - ? de_SimulationApplicationConfigs(output.simulationApplications, context) - : undefined, - simulationTimeMillis: __expectLong(output.simulationTimeMillis), - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - vpcConfig: output.vpcConfig != null ? de_VPCConfigResponse(output.vpcConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + clientRequestToken: __expectString, + compute: _json, + dataSources: _json, + failureBehavior: __expectString, + failureCode: __expectString, + failureReason: __expectString, + iamRole: __expectString, + lastStartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + loggingConfig: _json, + maxJobDurationInSeconds: __expectLong, + name: __expectString, + networkInterface: _json, + outputLocation: _json, + robotApplications: _json, + simulationApplications: _json, + simulationTimeMillis: __expectLong, + status: __expectString, + tags: _json, + vpcConfig: _json, + }) as any; }; /** @@ -7385,9 +6024,6 @@ const de_SimulationJobBatchSummaries = (output: any, context: __SerdeContext): S const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SimulationJobBatchSummary(entry, context); }); return retVal; @@ -7397,45 +6033,19 @@ const de_SimulationJobBatchSummaries = (output: any, context: __SerdeContext): S * deserializeAws_restJson1SimulationJobBatchSummary */ const de_SimulationJobBatchSummary = (output: any, context: __SerdeContext): SimulationJobBatchSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - createdRequestCount: __expectInt32(output.createdRequestCount), - failedRequestCount: __expectInt32(output.failedRequestCount), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - pendingRequestCount: __expectInt32(output.pendingRequestCount), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1SimulationJobRequest - */ -const de_SimulationJobRequest = (output: any, context: __SerdeContext): SimulationJobRequest => { - return { - compute: output.compute != null ? de_Compute(output.compute, context) : undefined, - dataSources: output.dataSources != null ? de_DataSourceConfigs(output.dataSources, context) : undefined, - failureBehavior: __expectString(output.failureBehavior), - iamRole: __expectString(output.iamRole), - loggingConfig: output.loggingConfig != null ? de_LoggingConfig(output.loggingConfig, context) : undefined, - maxJobDurationInSeconds: __expectLong(output.maxJobDurationInSeconds), - outputLocation: output.outputLocation != null ? de_OutputLocation(output.outputLocation, context) : undefined, - robotApplications: - output.robotApplications != null ? de_RobotApplicationConfigs(output.robotApplications, context) : undefined, - simulationApplications: - output.simulationApplications != null - ? de_SimulationApplicationConfigs(output.simulationApplications, context) - : undefined, - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - useDefaultApplications: __expectBoolean(output.useDefaultApplications), - vpcConfig: output.vpcConfig != null ? de_VPCConfig(output.vpcConfig, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdRequestCount: __expectInt32, + failedRequestCount: __expectInt32, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + pendingRequestCount: __expectInt32, + status: __expectString, + }) as any; }; +// de_SimulationJobRequest omitted. + /** * deserializeAws_restJson1SimulationJobs */ @@ -7443,9 +6053,6 @@ const de_SimulationJobs = (output: any, context: __SerdeContext): SimulationJob[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SimulationJob(entry, context); }); return retVal; @@ -7458,9 +6065,6 @@ const de_SimulationJobSummaries = (output: any, context: __SerdeContext): Simula const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SimulationJobSummary(entry, context); }); return retVal; @@ -7470,91 +6074,27 @@ const de_SimulationJobSummaries = (output: any, context: __SerdeContext): Simula * deserializeAws_restJson1SimulationJobSummary */ const de_SimulationJobSummary = (output: any, context: __SerdeContext): SimulationJobSummary => { - return { - arn: __expectString(output.arn), - computeType: __expectString(output.computeType), - dataSourceNames: output.dataSourceNames != null ? de_DataSourceNames(output.dataSourceNames, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - name: __expectString(output.name), - robotApplicationNames: - output.robotApplicationNames != null - ? de_RobotApplicationNames(output.robotApplicationNames, context) - : undefined, - simulationApplicationNames: - output.simulationApplicationNames != null - ? de_SimulationApplicationNames(output.simulationApplicationNames, context) - : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + computeType: __expectString, + dataSourceNames: _json, + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + robotApplicationNames: _json, + simulationApplicationNames: _json, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SimulationSoftwareSuite - */ -const de_SimulationSoftwareSuite = (output: any, context: __SerdeContext): SimulationSoftwareSuite => { - return { - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; +// de_SimulationSoftwareSuite omitted. -/** - * deserializeAws_restJson1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - architecture: __expectString(output.architecture), - etag: __expectString(output.etag), - s3Bucket: __expectString(output.s3Bucket), - s3Key: __expectString(output.s3Key), - } as any; -}; +// de_Source omitted. -/** - * deserializeAws_restJson1Sources - */ -const de_Sources = (output: any, context: __SerdeContext): Source[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Source(entry, context); - }); - return retVal; -}; +// de_Sources omitted. -/** - * deserializeAws_restJson1Subnets - */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Subnets omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1TemplateSummaries @@ -7563,9 +6103,6 @@ const de_TemplateSummaries = (output: any, context: __SerdeContext): TemplateSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TemplateSummary(entry, context); }); return retVal; @@ -7575,129 +6112,32 @@ const de_TemplateSummaries = (output: any, context: __SerdeContext): TemplateSum * deserializeAws_restJson1TemplateSummary */ const de_TemplateSummary = (output: any, context: __SerdeContext): TemplateSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - name: __expectString(output.name), - version: __expectString(output.version), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + version: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Tool - */ -const de_Tool = (output: any, context: __SerdeContext): Tool => { - return { - command: __expectString(output.command), - exitBehavior: __expectString(output.exitBehavior), - name: __expectString(output.name), - streamOutputToCloudWatch: __expectBoolean(output.streamOutputToCloudWatch), - streamUI: __expectBoolean(output.streamUI), - } as any; -}; +// de_Tool omitted. -/** - * deserializeAws_restJson1Tools - */ -const de_Tools = (output: any, context: __SerdeContext): Tool[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tool(entry, context); - }); - return retVal; -}; +// de_Tools omitted. -/** - * deserializeAws_restJson1UploadConfiguration - */ -const de_UploadConfiguration = (output: any, context: __SerdeContext): UploadConfiguration => { - return { - name: __expectString(output.name), - path: __expectString(output.path), - uploadBehavior: __expectString(output.uploadBehavior), - } as any; -}; +// de_UploadConfiguration omitted. -/** - * deserializeAws_restJson1UploadConfigurations - */ -const de_UploadConfigurations = (output: any, context: __SerdeContext): UploadConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UploadConfiguration(entry, context); - }); - return retVal; -}; +// de_UploadConfigurations omitted. -/** - * deserializeAws_restJson1VPCConfig - */ -const de_VPCConfig = (output: any, context: __SerdeContext): VPCConfig => { - return { - assignPublicIp: __expectBoolean(output.assignPublicIp), - securityGroups: output.securityGroups != null ? de_SecurityGroups(output.securityGroups, context) : undefined, - subnets: output.subnets != null ? de_Subnets(output.subnets, context) : undefined, - } as any; -}; +// de_VPCConfig omitted. -/** - * deserializeAws_restJson1VPCConfigResponse - */ -const de_VPCConfigResponse = (output: any, context: __SerdeContext): VPCConfigResponse => { - return { - assignPublicIp: __expectBoolean(output.assignPublicIp), - securityGroups: output.securityGroups != null ? de_SecurityGroups(output.securityGroups, context) : undefined, - subnets: output.subnets != null ? de_Subnets(output.subnets, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_VPCConfigResponse omitted. -/** - * deserializeAws_restJson1WorldConfig - */ -const de_WorldConfig = (output: any, context: __SerdeContext): WorldConfig => { - return { - world: __expectString(output.world), - } as any; -}; +// de_WorldConfig omitted. -/** - * deserializeAws_restJson1WorldConfigs - */ -const de_WorldConfigs = (output: any, context: __SerdeContext): WorldConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorldConfig(entry, context); - }); - return retVal; -}; +// de_WorldConfigs omitted. -/** - * deserializeAws_restJson1WorldCount - */ -const de_WorldCount = (output: any, context: __SerdeContext): WorldCount => { - return { - floorplanCount: __expectInt32(output.floorplanCount), - interiorCountPerFloorplan: __expectInt32(output.interiorCountPerFloorplan), - } as any; -}; +// de_WorldCount omitted. /** * deserializeAws_restJson1WorldExportJobSummaries @@ -7706,9 +6146,6 @@ const de_WorldExportJobSummaries = (output: any, context: __SerdeContext): World const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorldExportJobSummary(entry, context); }); return retVal; @@ -7718,41 +6155,18 @@ const de_WorldExportJobSummaries = (output: any, context: __SerdeContext): World * deserializeAws_restJson1WorldExportJobSummary */ const de_WorldExportJobSummary = (output: any, context: __SerdeContext): WorldExportJobSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - outputLocation: output.outputLocation != null ? de_OutputLocation(output.outputLocation, context) : undefined, - status: __expectString(output.status), - worlds: output.worlds != null ? de_Arns(output.worlds, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + outputLocation: _json, + status: __expectString, + worlds: _json, + }) as any; }; -/** - * deserializeAws_restJson1WorldFailure - */ -const de_WorldFailure = (output: any, context: __SerdeContext): WorldFailure => { - return { - failureCode: __expectString(output.failureCode), - failureCount: __expectInt32(output.failureCount), - sampleFailureReason: __expectString(output.sampleFailureReason), - } as any; -}; +// de_WorldFailure omitted. -/** - * deserializeAws_restJson1WorldFailures - */ -const de_WorldFailures = (output: any, context: __SerdeContext): WorldFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorldFailure(entry, context); - }); - return retVal; -}; +// de_WorldFailures omitted. /** * deserializeAws_restJson1WorldGenerationJobSummaries @@ -7761,9 +6175,6 @@ const de_WorldGenerationJobSummaries = (output: any, context: __SerdeContext): W const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorldGenerationJobSummary(entry, context); }); return retVal; @@ -7773,16 +6184,15 @@ const de_WorldGenerationJobSummaries = (output: any, context: __SerdeContext): W * deserializeAws_restJson1WorldGenerationJobSummary */ const de_WorldGenerationJobSummary = (output: any, context: __SerdeContext): WorldGenerationJobSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - failedWorldCount: __expectInt32(output.failedWorldCount), - status: __expectString(output.status), - succeededWorldCount: __expectInt32(output.succeededWorldCount), - template: __expectString(output.template), - worldCount: output.worldCount != null ? de_WorldCount(output.worldCount, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + failedWorldCount: __expectInt32, + status: __expectString, + succeededWorldCount: __expectInt32, + template: __expectString, + worldCount: _json, + }) as any; }; /** @@ -7792,9 +6202,6 @@ const de_WorldSummaries = (output: any, context: __SerdeContext): WorldSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorldSummary(entry, context); }); return retVal; @@ -7804,13 +6211,12 @@ const de_WorldSummaries = (output: any, context: __SerdeContext): WorldSummary[] * deserializeAws_restJson1WorldSummary */ const de_WorldSummary = (output: any, context: __SerdeContext): WorldSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - generationJob: __expectString(output.generationJob), - template: __expectString(output.template), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + generationJob: __expectString, + template: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-rolesanywhere/src/protocols/Aws_restJson1.ts b/clients/client-rolesanywhere/src/protocols/Aws_restJson1.ts index 455109974243..e8a03e031e46 100644 --- a/clients/client-rolesanywhere/src/protocols/Aws_restJson1.ts +++ b/clients/client-rolesanywhere/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -80,18 +81,18 @@ export const se_CreateProfileCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profiles"; let body: any; - body = JSON.stringify({ - ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.managedPolicyArns != null && { - managedPolicyArns: se_ManagedPolicyList(input.managedPolicyArns, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.requireInstanceProperties != null && { requireInstanceProperties: input.requireInstanceProperties }), - ...(input.roleArns != null && { roleArns: se_RoleArnList(input.roleArns, context) }), - ...(input.sessionPolicy != null && { sessionPolicy: input.sessionPolicy }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + durationSeconds: [], + enabled: [], + managedPolicyArns: (_) => _json(_), + name: [], + requireInstanceProperties: [], + roleArns: (_) => _json(_), + sessionPolicy: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -116,12 +117,14 @@ export const se_CreateTrustAnchorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/trustanchors"; let body: any; - body = JSON.stringify({ - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.name != null && { name: input.name }), - ...(input.source != null && { source: se_Source(input.source, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + enabled: [], + name: [], + source: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -476,13 +479,15 @@ export const se_ImportCrlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/crls"; let body: any; - body = JSON.stringify({ - ...(input.crlData != null && { crlData: context.base64Encoder(input.crlData) }), - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.trustAnchorArn != null && { trustAnchorArn: input.trustAnchorArn }), - }); + body = JSON.stringify( + take(input, { + crlData: (_) => context.base64Encoder(_), + enabled: [], + name: [], + tags: (_) => _json(_), + trustAnchorArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -641,10 +646,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -669,10 +676,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + tagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -698,10 +707,12 @@ export const se_UpdateCrlCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/crl/{crlId}"; resolvedPath = __resolvedPath(resolvedPath, input, "crlId", () => input.crlId!, "{crlId}", false); let body: any; - body = JSON.stringify({ - ...(input.crlData != null && { crlData: context.base64Encoder(input.crlData) }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + crlData: (_) => context.base64Encoder(_), + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -727,15 +738,15 @@ export const se_UpdateProfileCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/profile/{profileId}"; resolvedPath = __resolvedPath(resolvedPath, input, "profileId", () => input.profileId!, "{profileId}", false); let body: any; - body = JSON.stringify({ - ...(input.durationSeconds != null && { durationSeconds: input.durationSeconds }), - ...(input.managedPolicyArns != null && { - managedPolicyArns: se_ManagedPolicyList(input.managedPolicyArns, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.roleArns != null && { roleArns: se_RoleArnList(input.roleArns, context) }), - ...(input.sessionPolicy != null && { sessionPolicy: input.sessionPolicy }), - }); + body = JSON.stringify( + take(input, { + durationSeconds: [], + managedPolicyArns: (_) => _json(_), + name: [], + roleArns: (_) => _json(_), + sessionPolicy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -769,10 +780,12 @@ export const se_UpdateTrustAnchorCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.name != null && { name: input.name }), - ...(input.source != null && { source: se_Source(input.source, context) }), - }); + body = JSON.stringify( + take(input, { + name: [], + source: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -798,9 +811,10 @@ export const de_CreateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profile != null) { - contents.profile = de_ProfileDetail(data.profile, context); - } + const doc = take(data, { + profile: (_) => de_ProfileDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -825,10 +839,9 @@ const de_CreateProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -848,9 +861,10 @@ export const de_CreateTrustAnchorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustAnchor != null) { - contents.trustAnchor = de_TrustAnchorDetail(data.trustAnchor, context); - } + const doc = take(data, { + trustAnchor: (_) => de_TrustAnchorDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -875,10 +889,9 @@ const de_CreateTrustAnchorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -898,9 +911,10 @@ export const de_DeleteCrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crl != null) { - contents.crl = de_CrlDetail(data.crl, context); - } + const doc = take(data, { + crl: (_) => de_CrlDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -925,10 +939,9 @@ const de_DeleteCrlCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -948,9 +961,10 @@ export const de_DeleteProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profile != null) { - contents.profile = de_ProfileDetail(data.profile, context); - } + const doc = take(data, { + profile: (_) => de_ProfileDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -975,10 +989,9 @@ const de_DeleteProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -998,9 +1011,10 @@ export const de_DeleteTrustAnchorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustAnchor != null) { - contents.trustAnchor = de_TrustAnchorDetail(data.trustAnchor, context); - } + const doc = take(data, { + trustAnchor: (_) => de_TrustAnchorDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1025,10 +1039,9 @@ const de_DeleteTrustAnchorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1048,9 +1061,10 @@ export const de_DisableCrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crl != null) { - contents.crl = de_CrlDetail(data.crl, context); - } + const doc = take(data, { + crl: (_) => de_CrlDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1075,10 +1089,9 @@ const de_DisableCrlCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1098,9 +1111,10 @@ export const de_DisableProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profile != null) { - contents.profile = de_ProfileDetail(data.profile, context); - } + const doc = take(data, { + profile: (_) => de_ProfileDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1125,10 +1139,9 @@ const de_DisableProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1148,9 +1161,10 @@ export const de_DisableTrustAnchorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustAnchor != null) { - contents.trustAnchor = de_TrustAnchorDetail(data.trustAnchor, context); - } + const doc = take(data, { + trustAnchor: (_) => de_TrustAnchorDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1175,10 +1189,9 @@ const de_DisableTrustAnchorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1198,9 +1211,10 @@ export const de_EnableCrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crl != null) { - contents.crl = de_CrlDetail(data.crl, context); - } + const doc = take(data, { + crl: (_) => de_CrlDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1225,10 +1239,9 @@ const de_EnableCrlCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1248,9 +1261,10 @@ export const de_EnableProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profile != null) { - contents.profile = de_ProfileDetail(data.profile, context); - } + const doc = take(data, { + profile: (_) => de_ProfileDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1275,10 +1289,9 @@ const de_EnableProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,9 +1311,10 @@ export const de_EnableTrustAnchorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustAnchor != null) { - contents.trustAnchor = de_TrustAnchorDetail(data.trustAnchor, context); - } + const doc = take(data, { + trustAnchor: (_) => de_TrustAnchorDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1325,10 +1339,9 @@ const de_EnableTrustAnchorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1348,9 +1361,10 @@ export const de_GetCrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crl != null) { - contents.crl = de_CrlDetail(data.crl, context); - } + const doc = take(data, { + crl: (_) => de_CrlDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1369,10 +1383,9 @@ const de_GetCrlCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1392,9 +1405,10 @@ export const de_GetProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profile != null) { - contents.profile = de_ProfileDetail(data.profile, context); - } + const doc = take(data, { + profile: (_) => de_ProfileDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1419,10 +1433,9 @@ const de_GetProfileCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1442,9 +1455,10 @@ export const de_GetSubjectCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.subject != null) { - contents.subject = de_SubjectDetail(data.subject, context); - } + const doc = take(data, { + subject: (_) => de_SubjectDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1469,10 +1483,9 @@ const de_GetSubjectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1492,9 +1505,10 @@ export const de_GetTrustAnchorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustAnchor != null) { - contents.trustAnchor = de_TrustAnchorDetail(data.trustAnchor, context); - } + const doc = take(data, { + trustAnchor: (_) => de_TrustAnchorDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1522,10 +1536,9 @@ const de_GetTrustAnchorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1545,9 +1558,10 @@ export const de_ImportCrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crl != null) { - contents.crl = de_CrlDetail(data.crl, context); - } + const doc = take(data, { + crl: (_) => de_CrlDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1572,10 +1586,9 @@ const de_ImportCrlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1595,12 +1608,11 @@ export const de_ListCrlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crls != null) { - contents.crls = de_CrlDetails(data.crls, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + crls: (_) => de_CrlDetails(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1625,10 +1637,9 @@ const de_ListCrlsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1648,12 +1659,11 @@ export const de_ListProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.profiles != null) { - contents.profiles = de_ProfileDetails(data.profiles, context); - } + const doc = take(data, { + nextToken: __expectString, + profiles: (_) => de_ProfileDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1678,10 +1688,9 @@ const de_ListProfilesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1701,12 +1710,11 @@ export const de_ListSubjectsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.subjects != null) { - contents.subjects = de_SubjectSummaries(data.subjects, context); - } + const doc = take(data, { + nextToken: __expectString, + subjects: (_) => de_SubjectSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1731,10 +1739,9 @@ const de_ListSubjectsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1754,9 +1761,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1784,10 +1792,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1807,12 +1814,11 @@ export const de_ListTrustAnchorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.trustAnchors != null) { - contents.trustAnchors = de_TrustAnchorDetails(data.trustAnchors, context); - } + const doc = take(data, { + nextToken: __expectString, + trustAnchors: (_) => de_TrustAnchorDetails(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1837,10 +1843,9 @@ const de_ListTrustAnchorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1890,10 +1895,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1940,10 +1944,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1963,9 +1966,10 @@ export const de_UpdateCrlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crl != null) { - contents.crl = de_CrlDetail(data.crl, context); - } + const doc = take(data, { + crl: (_) => de_CrlDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1993,10 +1997,9 @@ const de_UpdateCrlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2016,9 +2019,10 @@ export const de_UpdateProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.profile != null) { - contents.profile = de_ProfileDetail(data.profile, context); - } + const doc = take(data, { + profile: (_) => de_ProfileDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2046,10 +2050,9 @@ const de_UpdateProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2069,9 +2072,10 @@ export const de_UpdateTrustAnchorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustAnchor != null) { - contents.trustAnchor = de_TrustAnchorDetail(data.trustAnchor, context); - } + const doc = take(data, { + trustAnchor: (_) => de_TrustAnchorDetail(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2099,16 +2103,15 @@ const de_UpdateTrustAnchorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2118,9 +2121,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2137,9 +2141,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2156,9 +2161,10 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2172,9 +2178,10 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2182,80 +2189,19 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ManagedPolicyList - */ -const se_ManagedPolicyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ManagedPolicyList omitted. -/** - * serializeAws_restJson1RoleArnList - */ -const se_RoleArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RoleArnList omitted. -/** - * serializeAws_restJson1Source - */ -const se_Source = (input: Source, context: __SerdeContext): any => { - return { - ...(input.sourceData != null && { sourceData: se_SourceData(input.sourceData, context) }), - ...(input.sourceType != null && { sourceType: input.sourceType }), - }; -}; +// se_Source omitted. -/** - * serializeAws_restJson1SourceData - */ -const se_SourceData = (input: SourceData, context: __SerdeContext): any => { - return SourceData.visit(input, { - acmPcaArn: (value) => ({ acmPcaArn: value }), - x509CertificateData: (value) => ({ x509CertificateData: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_SourceData omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. /** * deserializeAws_restJson1CredentialSummaries @@ -2264,9 +2210,6 @@ const de_CredentialSummaries = (output: any, context: __SerdeContext): Credentia const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CredentialSummary(entry, context); }); return retVal; @@ -2276,32 +2219,30 @@ const de_CredentialSummaries = (output: any, context: __SerdeContext): Credentia * deserializeAws_restJson1CredentialSummary */ const de_CredentialSummary = (output: any, context: __SerdeContext): CredentialSummary => { - return { - enabled: __expectBoolean(output.enabled), - failed: __expectBoolean(output.failed), - issuer: __expectString(output.issuer), - seenAt: output.seenAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.seenAt)) : undefined, - serialNumber: __expectString(output.serialNumber), - x509CertificateData: __expectString(output.x509CertificateData), - } as any; + return take(output, { + enabled: __expectBoolean, + failed: __expectBoolean, + issuer: __expectString, + seenAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + serialNumber: __expectString, + x509CertificateData: __expectString, + }) as any; }; /** * deserializeAws_restJson1CrlDetail */ const de_CrlDetail = (output: any, context: __SerdeContext): CrlDetail => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - crlArn: __expectString(output.crlArn), - crlData: output.crlData != null ? context.base64Decoder(output.crlData) : undefined, - crlId: __expectString(output.crlId), - enabled: __expectBoolean(output.enabled), - name: __expectString(output.name), - trustAnchorArn: __expectString(output.trustAnchorArn), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + crlArn: __expectString, + crlData: context.base64Decoder, + crlId: __expectString, + enabled: __expectBoolean, + name: __expectString, + trustAnchorArn: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2311,9 +2252,6 @@ const de_CrlDetails = (output: any, context: __SerdeContext): CrlDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CrlDetail(entry, context); }); return retVal; @@ -2326,9 +2264,6 @@ const de_InstanceProperties = (output: any, context: __SerdeContext): InstancePr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstanceProperty(entry, context); }); return retVal; @@ -2338,62 +2273,35 @@ const de_InstanceProperties = (output: any, context: __SerdeContext): InstancePr * deserializeAws_restJson1InstanceProperty */ const de_InstanceProperty = (output: any, context: __SerdeContext): InstanceProperty => { - return { - failed: __expectBoolean(output.failed), - properties: output.properties != null ? de_InstancePropertyMap(output.properties, context) : undefined, - seenAt: output.seenAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.seenAt)) : undefined, - } as any; + return take(output, { + failed: __expectBoolean, + properties: _json, + seenAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; -/** - * deserializeAws_restJson1InstancePropertyMap - */ -const de_InstancePropertyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_InstancePropertyMap omitted. -/** - * deserializeAws_restJson1ManagedPolicyList - */ -const de_ManagedPolicyList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ManagedPolicyList omitted. /** * deserializeAws_restJson1ProfileDetail */ const de_ProfileDetail = (output: any, context: __SerdeContext): ProfileDetail => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - durationSeconds: __expectInt32(output.durationSeconds), - enabled: __expectBoolean(output.enabled), - managedPolicyArns: - output.managedPolicyArns != null ? de_ManagedPolicyList(output.managedPolicyArns, context) : undefined, - name: __expectString(output.name), - profileArn: __expectString(output.profileArn), - profileId: __expectString(output.profileId), - requireInstanceProperties: __expectBoolean(output.requireInstanceProperties), - roleArns: output.roleArns != null ? de_RoleArnList(output.roleArns, context) : undefined, - sessionPolicy: __expectString(output.sessionPolicy), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + durationSeconds: __expectInt32, + enabled: __expectBoolean, + managedPolicyArns: _json, + name: __expectString, + profileArn: __expectString, + profileId: __expectString, + requireInstanceProperties: __expectBoolean, + roleArns: _json, + sessionPolicy: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2403,71 +2311,32 @@ const de_ProfileDetails = (output: any, context: __SerdeContext): ProfileDetail[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ProfileDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RoleArnList - */ -const de_RoleArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RoleArnList omitted. -/** - * deserializeAws_restJson1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - sourceData: output.sourceData != null ? de_SourceData(__expectUnion(output.sourceData), context) : undefined, - sourceType: __expectString(output.sourceType), - } as any; -}; +// de_Source omitted. -/** - * deserializeAws_restJson1SourceData - */ -const de_SourceData = (output: any, context: __SerdeContext): SourceData => { - if (__expectString(output.acmPcaArn) !== undefined) { - return { acmPcaArn: __expectString(output.acmPcaArn) as any }; - } - if (__expectString(output.x509CertificateData) !== undefined) { - return { x509CertificateData: __expectString(output.x509CertificateData) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_SourceData omitted. /** * deserializeAws_restJson1SubjectDetail */ const de_SubjectDetail = (output: any, context: __SerdeContext): SubjectDetail => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - credentials: output.credentials != null ? de_CredentialSummaries(output.credentials, context) : undefined, - enabled: __expectBoolean(output.enabled), - instanceProperties: - output.instanceProperties != null ? de_InstanceProperties(output.instanceProperties, context) : undefined, - lastSeenAt: - output.lastSeenAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastSeenAt)) : undefined, - subjectArn: __expectString(output.subjectArn), - subjectId: __expectString(output.subjectId), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - x509Subject: __expectString(output.x509Subject), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + credentials: (_: any) => de_CredentialSummaries(_, context), + enabled: __expectBoolean, + instanceProperties: (_: any) => de_InstanceProperties(_, context), + lastSeenAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + subjectArn: __expectString, + subjectId: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + x509Subject: __expectString, + }) as any; }; /** @@ -2477,9 +2346,6 @@ const de_SubjectSummaries = (output: any, context: __SerdeContext): SubjectSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SubjectSummary(entry, context); }); return retVal; @@ -2489,60 +2355,34 @@ const de_SubjectSummaries = (output: any, context: __SerdeContext): SubjectSumma * deserializeAws_restJson1SubjectSummary */ const de_SubjectSummary = (output: any, context: __SerdeContext): SubjectSummary => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - enabled: __expectBoolean(output.enabled), - lastSeenAt: - output.lastSeenAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastSeenAt)) : undefined, - subjectArn: __expectString(output.subjectArn), - subjectId: __expectString(output.subjectId), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - x509Subject: __expectString(output.x509Subject), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + enabled: __expectBoolean, + lastSeenAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + subjectArn: __expectString, + subjectId: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + x509Subject: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1TrustAnchorDetail */ const de_TrustAnchorDetail = (output: any, context: __SerdeContext): TrustAnchorDetail => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - enabled: __expectBoolean(output.enabled), - name: __expectString(output.name), - source: output.source != null ? de_Source(output.source, context) : undefined, - trustAnchorArn: __expectString(output.trustAnchorArn), - trustAnchorId: __expectString(output.trustAnchorId), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + enabled: __expectBoolean, + name: __expectString, + source: _json, + trustAnchorArn: __expectString, + trustAnchorId: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -2552,9 +2392,6 @@ const de_TrustAnchorDetails = (output: any, context: __SerdeContext): TrustAncho const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrustAnchorDetail(entry, context); }); return retVal; diff --git a/clients/client-route-53-domains/src/protocols/Aws_json1_1.ts b/clients/client-route-53-domains/src/protocols/Aws_json1_1.ts index 43f5052b8e28..84bdd1b120ec 100644 --- a/clients/client-route-53-domains/src/protocols/Aws_json1_1.ts +++ b/clients/client-route-53-domains/src/protocols/Aws_json1_1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -121,49 +122,32 @@ import { import { ViewBillingCommandInput, ViewBillingCommandOutput } from "../commands/ViewBillingCommand"; import { AcceptDomainTransferFromAnotherAwsAccountRequest, - AcceptDomainTransferFromAnotherAwsAccountResponse, AssociateDelegationSignerToDomainRequest, - AssociateDelegationSignerToDomainResponse, BillingRecord, CancelDomainTransferToAnotherAwsAccountRequest, - CancelDomainTransferToAnotherAwsAccountResponse, CheckDomainAvailabilityRequest, - CheckDomainAvailabilityResponse, CheckDomainTransferabilityRequest, - CheckDomainTransferabilityResponse, Consent, ContactDetail, DeleteDomainRequest, - DeleteDomainResponse, DeleteTagsForDomainRequest, - DeleteTagsForDomainResponse, DisableDomainAutoRenewRequest, - DisableDomainAutoRenewResponse, DisableDomainTransferLockRequest, - DisableDomainTransferLockResponse, DisassociateDelegationSignerFromDomainRequest, - DisassociateDelegationSignerFromDomainResponse, - DnssecKey, DnssecLimitExceeded, DnssecSigningAttributes, DomainLimitExceeded, DomainPrice, - DomainSuggestion, DomainSummary, - DomainTransferability, DuplicateRequest, EnableDomainAutoRenewRequest, - EnableDomainAutoRenewResponse, EnableDomainTransferLockRequest, - EnableDomainTransferLockResponse, ExtraParam, FilterCondition, GetContactReachabilityStatusRequest, - GetContactReachabilityStatusResponse, GetDomainDetailRequest, GetDomainDetailResponse, GetDomainSuggestionsRequest, - GetDomainSuggestionsResponse, GetOperationDetailRequest, GetOperationDetailResponse, InvalidInput, @@ -174,7 +158,6 @@ import { ListPricesRequest, ListPricesResponse, ListTagsForDomainRequest, - ListTagsForDomainResponse, Nameserver, OperationLimitExceeded, OperationStatus, @@ -183,32 +166,21 @@ import { PriceWithCurrency, PushDomainRequest, RegisterDomainRequest, - RegisterDomainResponse, RejectDomainTransferFromAnotherAwsAccountRequest, - RejectDomainTransferFromAnotherAwsAccountResponse, RenewDomainRequest, - RenewDomainResponse, ResendContactReachabilityEmailRequest, - ResendContactReachabilityEmailResponse, ResendOperationAuthorizationRequest, RetrieveDomainAuthCodeRequest, - RetrieveDomainAuthCodeResponse, SortCondition, Tag, TLDRulesViolation, TransferDomainRequest, - TransferDomainResponse, TransferDomainToAnotherAwsAccountRequest, - TransferDomainToAnotherAwsAccountResponse, UnsupportedTLD, UpdateDomainContactPrivacyRequest, - UpdateDomainContactPrivacyResponse, UpdateDomainContactRequest, - UpdateDomainContactResponse, UpdateDomainNameserversRequest, - UpdateDomainNameserversResponse, UpdateTagsForDomainRequest, - UpdateTagsForDomainResponse, ViewBillingRequest, ViewBillingResponse, } from "../models/models_0"; @@ -223,7 +195,7 @@ export const se_AcceptDomainTransferFromAnotherAwsAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptDomainTransferFromAnotherAwsAccount"); let body: any; - body = JSON.stringify(se_AcceptDomainTransferFromAnotherAwsAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -236,7 +208,7 @@ export const se_AssociateDelegationSignerToDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDelegationSignerToDomain"); let body: any; - body = JSON.stringify(se_AssociateDelegationSignerToDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -249,7 +221,7 @@ export const se_CancelDomainTransferToAnotherAwsAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelDomainTransferToAnotherAwsAccount"); let body: any; - body = JSON.stringify(se_CancelDomainTransferToAnotherAwsAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -262,7 +234,7 @@ export const se_CheckDomainAvailabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CheckDomainAvailability"); let body: any; - body = JSON.stringify(se_CheckDomainAvailabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -275,7 +247,7 @@ export const se_CheckDomainTransferabilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CheckDomainTransferability"); let body: any; - body = JSON.stringify(se_CheckDomainTransferabilityRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -288,7 +260,7 @@ export const se_DeleteDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDomain"); let body: any; - body = JSON.stringify(se_DeleteDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -301,7 +273,7 @@ export const se_DeleteTagsForDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTagsForDomain"); let body: any; - body = JSON.stringify(se_DeleteTagsForDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -314,7 +286,7 @@ export const se_DisableDomainAutoRenewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableDomainAutoRenew"); let body: any; - body = JSON.stringify(se_DisableDomainAutoRenewRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -327,7 +299,7 @@ export const se_DisableDomainTransferLockCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableDomainTransferLock"); let body: any; - body = JSON.stringify(se_DisableDomainTransferLockRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -340,7 +312,7 @@ export const se_DisassociateDelegationSignerFromDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateDelegationSignerFromDomain"); let body: any; - body = JSON.stringify(se_DisassociateDelegationSignerFromDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -353,7 +325,7 @@ export const se_EnableDomainAutoRenewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableDomainAutoRenew"); let body: any; - body = JSON.stringify(se_EnableDomainAutoRenewRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -366,7 +338,7 @@ export const se_EnableDomainTransferLockCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableDomainTransferLock"); let body: any; - body = JSON.stringify(se_EnableDomainTransferLockRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -379,7 +351,7 @@ export const se_GetContactReachabilityStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContactReachabilityStatus"); let body: any; - body = JSON.stringify(se_GetContactReachabilityStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -392,7 +364,7 @@ export const se_GetDomainDetailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDomainDetail"); let body: any; - body = JSON.stringify(se_GetDomainDetailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +377,7 @@ export const se_GetDomainSuggestionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDomainSuggestions"); let body: any; - body = JSON.stringify(se_GetDomainSuggestionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +390,7 @@ export const se_GetOperationDetailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOperationDetail"); let body: any; - body = JSON.stringify(se_GetOperationDetailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +403,7 @@ export const se_ListDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDomains"); let body: any; - body = JSON.stringify(se_ListDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +429,7 @@ export const se_ListPricesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPrices"); let body: any; - body = JSON.stringify(se_ListPricesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -470,7 +442,7 @@ export const se_ListTagsForDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForDomain"); let body: any; - body = JSON.stringify(se_ListTagsForDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -483,7 +455,7 @@ export const se_PushDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PushDomain"); let body: any; - body = JSON.stringify(se_PushDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -496,7 +468,7 @@ export const se_RegisterDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterDomain"); let body: any; - body = JSON.stringify(se_RegisterDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -509,7 +481,7 @@ export const se_RejectDomainTransferFromAnotherAwsAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectDomainTransferFromAnotherAwsAccount"); let body: any; - body = JSON.stringify(se_RejectDomainTransferFromAnotherAwsAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +494,7 @@ export const se_RenewDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RenewDomain"); let body: any; - body = JSON.stringify(se_RenewDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -535,7 +507,7 @@ export const se_ResendContactReachabilityEmailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResendContactReachabilityEmail"); let body: any; - body = JSON.stringify(se_ResendContactReachabilityEmailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -548,7 +520,7 @@ export const se_ResendOperationAuthorizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResendOperationAuthorization"); let body: any; - body = JSON.stringify(se_ResendOperationAuthorizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +533,7 @@ export const se_RetrieveDomainAuthCodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetrieveDomainAuthCode"); let body: any; - body = JSON.stringify(se_RetrieveDomainAuthCodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -574,7 +546,7 @@ export const se_TransferDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TransferDomain"); let body: any; - body = JSON.stringify(se_TransferDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -587,7 +559,7 @@ export const se_TransferDomainToAnotherAwsAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TransferDomainToAnotherAwsAccount"); let body: any; - body = JSON.stringify(se_TransferDomainToAnotherAwsAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -613,7 +585,7 @@ export const se_UpdateDomainContactPrivacyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDomainContactPrivacy"); let body: any; - body = JSON.stringify(se_UpdateDomainContactPrivacyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -626,7 +598,7 @@ export const se_UpdateDomainNameserversCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDomainNameservers"); let body: any; - body = JSON.stringify(se_UpdateDomainNameserversRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -639,7 +611,7 @@ export const se_UpdateTagsForDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTagsForDomain"); let body: any; - body = JSON.stringify(se_UpdateTagsForDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -668,12 +640,12 @@ export const de_AcceptDomainTransferFromAnotherAwsAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptDomainTransferFromAnotherAwsAccountResponse(data, context); + contents = _json(data); const response: AcceptDomainTransferFromAnotherAwsAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -703,10 +675,9 @@ const de_AcceptDomainTransferFromAnotherAwsAccountCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -724,12 +695,12 @@ export const de_AssociateDelegationSignerToDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDelegationSignerToDomainResponse(data, context); + contents = _json(data); const response: AssociateDelegationSignerToDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -765,10 +736,9 @@ const de_AssociateDelegationSignerToDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -786,12 +756,12 @@ export const de_CancelDomainTransferToAnotherAwsAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelDomainTransferToAnotherAwsAccountResponse(data, context); + contents = _json(data); const response: CancelDomainTransferToAnotherAwsAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -818,10 +788,9 @@ const de_CancelDomainTransferToAnotherAwsAccountCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -839,12 +808,12 @@ export const de_CheckDomainAvailabilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckDomainAvailabilityResponse(data, context); + contents = _json(data); const response: CheckDomainAvailabilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -868,10 +837,9 @@ const de_CheckDomainAvailabilityCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -889,12 +857,12 @@ export const de_CheckDomainTransferabilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckDomainTransferabilityResponse(data, context); + contents = _json(data); const response: CheckDomainTransferabilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -918,10 +886,9 @@ const de_CheckDomainTransferabilityCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -939,12 +906,12 @@ export const de_DeleteDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDomainResponse(data, context); + contents = _json(data); const response: DeleteDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -974,10 +941,9 @@ const de_DeleteDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -995,12 +961,12 @@ export const de_DeleteTagsForDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTagsForDomainResponse(data, context); + contents = _json(data); const response: DeleteTagsForDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1027,10 +993,9 @@ const de_DeleteTagsForDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1048,12 +1013,12 @@ export const de_DisableDomainAutoRenewCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableDomainAutoRenewResponse(data, context); + contents = _json(data); const response: DisableDomainAutoRenewCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1077,10 +1042,9 @@ const de_DisableDomainAutoRenewCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1098,12 +1062,12 @@ export const de_DisableDomainTransferLockCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableDomainTransferLockResponse(data, context); + contents = _json(data); const response: DisableDomainTransferLockCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1136,10 +1100,9 @@ const de_DisableDomainTransferLockCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1157,12 +1120,12 @@ export const de_DisassociateDelegationSignerFromDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateDelegationSignerFromDomainResponse(data, context); + contents = _json(data); const response: DisassociateDelegationSignerFromDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1195,10 +1158,9 @@ const de_DisassociateDelegationSignerFromDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1216,12 +1178,12 @@ export const de_EnableDomainAutoRenewCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableDomainAutoRenewResponse(data, context); + contents = _json(data); const response: EnableDomainAutoRenewCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1248,10 +1210,9 @@ const de_EnableDomainAutoRenewCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1269,12 +1230,12 @@ export const de_EnableDomainTransferLockCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableDomainTransferLockResponse(data, context); + contents = _json(data); const response: EnableDomainTransferLockCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1307,10 +1268,9 @@ const de_EnableDomainTransferLockCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1328,12 +1288,12 @@ export const de_GetContactReachabilityStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContactReachabilityStatusResponse(data, context); + contents = _json(data); const response: GetContactReachabilityStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1360,10 +1320,9 @@ const de_GetContactReachabilityStatusCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1386,7 +1345,7 @@ export const de_GetDomainDetailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1410,10 +1369,9 @@ const de_GetDomainDetailCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1431,12 +1389,12 @@ export const de_GetDomainSuggestionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDomainSuggestionsResponse(data, context); + contents = _json(data); const response: GetDomainSuggestionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1460,10 +1418,9 @@ const de_GetDomainSuggestionsCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1486,7 +1443,7 @@ export const de_GetOperationDetailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1507,10 +1464,9 @@ const de_GetOperationDetailCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,7 +1489,7 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1554,10 +1510,9 @@ const de_ListDomainsCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1580,7 +1535,7 @@ export const de_ListOperationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1601,10 +1556,9 @@ const de_ListOperationsCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1627,7 +1581,7 @@ export const de_ListPricesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1651,10 +1605,9 @@ const de_ListPricesCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1672,12 +1625,12 @@ export const de_ListTagsForDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForDomainResponse(data, context); + contents = _json(data); const response: ListTagsForDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1704,10 +1657,9 @@ const de_ListTagsForDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1727,7 +1679,7 @@ export const de_PushDomainCommand = async ( const response: PushDomainCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1754,10 +1706,9 @@ const de_PushDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1775,12 +1726,12 @@ export const de_RegisterDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterDomainResponse(data, context); + contents = _json(data); const response: RegisterDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1816,10 +1767,9 @@ const de_RegisterDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1837,12 +1787,12 @@ export const de_RejectDomainTransferFromAnotherAwsAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectDomainTransferFromAnotherAwsAccountResponse(data, context); + contents = _json(data); const response: RejectDomainTransferFromAnotherAwsAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1869,10 +1819,9 @@ const de_RejectDomainTransferFromAnotherAwsAccountCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1890,12 +1839,12 @@ export const de_RenewDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RenewDomainResponse(data, context); + contents = _json(data); const response: RenewDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1928,10 +1877,9 @@ const de_RenewDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1949,12 +1897,12 @@ export const de_ResendContactReachabilityEmailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResendContactReachabilityEmailResponse(data, context); + contents = _json(data); const response: ResendContactReachabilityEmailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1981,10 +1929,9 @@ const de_ResendContactReachabilityEmailCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2004,7 +1951,7 @@ export const de_ResendOperationAuthorizationCommand = async ( const response: ResendOperationAuthorizationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2025,10 +1972,9 @@ const de_ResendOperationAuthorizationCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2046,12 +1992,12 @@ export const de_RetrieveDomainAuthCodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RetrieveDomainAuthCodeResponse(data, context); + contents = _json(data); const response: RetrieveDomainAuthCodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2075,10 +2021,9 @@ const de_RetrieveDomainAuthCodeCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2096,12 +2041,12 @@ export const de_TransferDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TransferDomainResponse(data, context); + contents = _json(data); const response: TransferDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2137,10 +2082,9 @@ const de_TransferDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2158,12 +2102,12 @@ export const de_TransferDomainToAnotherAwsAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TransferDomainToAnotherAwsAccountResponse(data, context); + contents = _json(data); const response: TransferDomainToAnotherAwsAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2193,10 +2137,9 @@ const de_TransferDomainToAnotherAwsAccountCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2214,12 +2157,12 @@ export const de_UpdateDomainContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDomainContactResponse(data, context); + contents = _json(data); const response: UpdateDomainContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2252,10 +2195,9 @@ const de_UpdateDomainContactCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2273,12 +2215,12 @@ export const de_UpdateDomainContactPrivacyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDomainContactPrivacyResponse(data, context); + contents = _json(data); const response: UpdateDomainContactPrivacyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2311,10 +2253,9 @@ const de_UpdateDomainContactPrivacyCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2332,12 +2273,12 @@ export const de_UpdateDomainNameserversCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDomainNameserversResponse(data, context); + contents = _json(data); const response: UpdateDomainNameserversCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2370,10 +2311,9 @@ const de_UpdateDomainNameserversCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2391,12 +2331,12 @@ export const de_UpdateTagsForDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTagsForDomainResponse(data, context); + contents = _json(data); const response: UpdateTagsForDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2423,10 +2363,9 @@ const de_UpdateTagsForDomainCommandError = async ( throw await de_UnsupportedTLDRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2449,7 +2388,7 @@ export const de_ViewBillingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2470,10 +2409,9 @@ const de_ViewBillingCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2484,7 +2422,7 @@ const de_ViewBillingCommandError = async ( */ const de_DnssecLimitExceededRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DnssecLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new DnssecLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2497,7 +2435,7 @@ const de_DnssecLimitExceededRes = async (parsedOutput: any, context: __SerdeCont */ const de_DomainLimitExceededRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DomainLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new DomainLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2510,7 +2448,7 @@ const de_DomainLimitExceededRes = async (parsedOutput: any, context: __SerdeCont */ const de_DuplicateRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateRequest(body, context); + const deserialized: any = _json(body); const exception = new DuplicateRequest({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2523,7 +2461,7 @@ const de_DuplicateRequestRes = async (parsedOutput: any, context: __SerdeContext */ const de_InvalidInputRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInput(body, context); + const deserialized: any = _json(body); const exception = new InvalidInput({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2539,7 +2477,7 @@ const de_OperationLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new OperationLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2552,7 +2490,7 @@ const de_OperationLimitExceededRes = async ( */ const de_TLDRulesViolationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TLDRulesViolation(body, context); + const deserialized: any = _json(body); const exception = new TLDRulesViolation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2565,7 +2503,7 @@ const de_TLDRulesViolationRes = async (parsedOutput: any, context: __SerdeContex */ const de_UnsupportedTLDRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedTLD(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedTLD({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2573,636 +2511,165 @@ const de_UnsupportedTLDRes = async (parsedOutput: any, context: __SerdeContext): return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptDomainTransferFromAnotherAwsAccountRequest - */ -const se_AcceptDomainTransferFromAnotherAwsAccountRequest = ( - input: AcceptDomainTransferFromAnotherAwsAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.Password != null && { Password: input.Password }), - }; -}; +// se_AcceptDomainTransferFromAnotherAwsAccountRequest omitted. -/** - * serializeAws_json1_1AssociateDelegationSignerToDomainRequest - */ -const se_AssociateDelegationSignerToDomainRequest = ( - input: AssociateDelegationSignerToDomainRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.SigningAttributes != null && { - SigningAttributes: se_DnssecSigningAttributes(input.SigningAttributes, context), - }), - }; -}; +// se_AssociateDelegationSignerToDomainRequest omitted. -/** - * serializeAws_json1_1CancelDomainTransferToAnotherAwsAccountRequest - */ -const se_CancelDomainTransferToAnotherAwsAccountRequest = ( - input: CancelDomainTransferToAnotherAwsAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_CancelDomainTransferToAnotherAwsAccountRequest omitted. -/** - * serializeAws_json1_1CheckDomainAvailabilityRequest - */ -const se_CheckDomainAvailabilityRequest = (input: CheckDomainAvailabilityRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.IdnLangCode != null && { IdnLangCode: input.IdnLangCode }), - }; -}; +// se_CheckDomainAvailabilityRequest omitted. -/** - * serializeAws_json1_1CheckDomainTransferabilityRequest - */ -const se_CheckDomainTransferabilityRequest = ( - input: CheckDomainTransferabilityRequest, - context: __SerdeContext -): any => { - return { - ...(input.AuthCode != null && { AuthCode: input.AuthCode }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_CheckDomainTransferabilityRequest omitted. /** * serializeAws_json1_1Consent */ const se_Consent = (input: Consent, context: __SerdeContext): any => { - return { - ...(input.Currency != null && { Currency: input.Currency }), - ...(input.MaxPrice != null && { MaxPrice: __serializeFloat(input.MaxPrice) }), - }; + return take(input, { + Currency: [], + MaxPrice: __serializeFloat, + }); }; -/** - * serializeAws_json1_1ContactDetail - */ -const se_ContactDetail = (input: ContactDetail, context: __SerdeContext): any => { - return { - ...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }), - ...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }), - ...(input.City != null && { City: input.City }), - ...(input.ContactType != null && { ContactType: input.ContactType }), - ...(input.CountryCode != null && { CountryCode: input.CountryCode }), - ...(input.Email != null && { Email: input.Email }), - ...(input.ExtraParams != null && { ExtraParams: se_ExtraParamList(input.ExtraParams, context) }), - ...(input.Fax != null && { Fax: input.Fax }), - ...(input.FirstName != null && { FirstName: input.FirstName }), - ...(input.LastName != null && { LastName: input.LastName }), - ...(input.OrganizationName != null && { OrganizationName: input.OrganizationName }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.State != null && { State: input.State }), - ...(input.ZipCode != null && { ZipCode: input.ZipCode }), - }; -}; +// se_ContactDetail omitted. -/** - * serializeAws_json1_1DeleteDomainRequest - */ -const se_DeleteDomainRequest = (input: DeleteDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_DeleteDomainRequest omitted. -/** - * serializeAws_json1_1DeleteTagsForDomainRequest - */ -const se_DeleteTagsForDomainRequest = (input: DeleteTagsForDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.TagsToDelete != null && { TagsToDelete: se_TagKeyList(input.TagsToDelete, context) }), - }; -}; +// se_DeleteTagsForDomainRequest omitted. -/** - * serializeAws_json1_1DisableDomainAutoRenewRequest - */ -const se_DisableDomainAutoRenewRequest = (input: DisableDomainAutoRenewRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_DisableDomainAutoRenewRequest omitted. -/** - * serializeAws_json1_1DisableDomainTransferLockRequest - */ -const se_DisableDomainTransferLockRequest = (input: DisableDomainTransferLockRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_DisableDomainTransferLockRequest omitted. -/** - * serializeAws_json1_1DisassociateDelegationSignerFromDomainRequest - */ -const se_DisassociateDelegationSignerFromDomainRequest = ( - input: DisassociateDelegationSignerFromDomainRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DisassociateDelegationSignerFromDomainRequest omitted. -/** - * serializeAws_json1_1DnssecSigningAttributes - */ -const se_DnssecSigningAttributes = (input: DnssecSigningAttributes, context: __SerdeContext): any => { - return { - ...(input.Algorithm != null && { Algorithm: input.Algorithm }), - ...(input.Flags != null && { Flags: input.Flags }), - ...(input.PublicKey != null && { PublicKey: input.PublicKey }), - }; -}; +// se_DnssecSigningAttributes omitted. -/** - * serializeAws_json1_1EnableDomainAutoRenewRequest - */ -const se_EnableDomainAutoRenewRequest = (input: EnableDomainAutoRenewRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_EnableDomainAutoRenewRequest omitted. -/** - * serializeAws_json1_1EnableDomainTransferLockRequest - */ -const se_EnableDomainTransferLockRequest = (input: EnableDomainTransferLockRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_EnableDomainTransferLockRequest omitted. -/** - * serializeAws_json1_1ExtraParam - */ -const se_ExtraParam = (input: ExtraParam, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ExtraParam omitted. -/** - * serializeAws_json1_1ExtraParamList - */ -const se_ExtraParamList = (input: ExtraParam[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExtraParam(entry, context); - }); -}; +// se_ExtraParamList omitted. -/** - * serializeAws_json1_1FilterCondition - */ -const se_FilterCondition = (input: FilterCondition, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_Values(input.Values, context) }), - }; -}; +// se_FilterCondition omitted. -/** - * serializeAws_json1_1FilterConditions - */ -const se_FilterConditions = (input: FilterCondition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilterCondition(entry, context); - }); -}; +// se_FilterConditions omitted. -/** - * serializeAws_json1_1GetContactReachabilityStatusRequest - */ -const se_GetContactReachabilityStatusRequest = ( - input: GetContactReachabilityStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.domainName != null && { domainName: input.domainName }), - }; -}; +// se_GetContactReachabilityStatusRequest omitted. -/** - * serializeAws_json1_1GetDomainDetailRequest - */ -const se_GetDomainDetailRequest = (input: GetDomainDetailRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_GetDomainDetailRequest omitted. -/** - * serializeAws_json1_1GetDomainSuggestionsRequest - */ -const se_GetDomainSuggestionsRequest = (input: GetDomainSuggestionsRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OnlyAvailable != null && { OnlyAvailable: input.OnlyAvailable }), - ...(input.SuggestionCount != null && { SuggestionCount: input.SuggestionCount }), - }; -}; +// se_GetDomainSuggestionsRequest omitted. -/** - * serializeAws_json1_1GetOperationDetailRequest - */ -const se_GetOperationDetailRequest = (input: GetOperationDetailRequest, context: __SerdeContext): any => { - return { - ...(input.OperationId != null && { OperationId: input.OperationId }), - }; -}; +// se_GetOperationDetailRequest omitted. -/** - * serializeAws_json1_1GlueIpList - */ -const se_GlueIpList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_GlueIpList omitted. -/** - * serializeAws_json1_1ListDomainsRequest - */ -const se_ListDomainsRequest = (input: ListDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.FilterConditions != null && { FilterConditions: se_FilterConditions(input.FilterConditions, context) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.SortCondition != null && { SortCondition: se_SortCondition(input.SortCondition, context) }), - }; -}; +// se_ListDomainsRequest omitted. /** * serializeAws_json1_1ListOperationsRequest */ const se_ListOperationsRequest = (input: ListOperationsRequest, context: __SerdeContext): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.Status != null && { Status: se_OperationStatusList(input.Status, context) }), - ...(input.SubmittedSince != null && { SubmittedSince: Math.round(input.SubmittedSince.getTime() / 1000) }), - ...(input.Type != null && { Type: se_OperationTypeList(input.Type, context) }), - }; + return take(input, { + Marker: [], + MaxItems: [], + SortBy: [], + SortOrder: [], + Status: _json, + SubmittedSince: (_) => Math.round(_.getTime() / 1000), + Type: _json, + }); }; -/** - * serializeAws_json1_1ListPricesRequest - */ -const se_ListPricesRequest = (input: ListPricesRequest, context: __SerdeContext): any => { - return { - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.Tld != null && { Tld: input.Tld }), - }; -}; +// se_ListPricesRequest omitted. -/** - * serializeAws_json1_1ListTagsForDomainRequest - */ -const se_ListTagsForDomainRequest = (input: ListTagsForDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_ListTagsForDomainRequest omitted. -/** - * serializeAws_json1_1Nameserver - */ -const se_Nameserver = (input: Nameserver, context: __SerdeContext): any => { - return { - ...(input.GlueIps != null && { GlueIps: se_GlueIpList(input.GlueIps, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_Nameserver omitted. -/** - * serializeAws_json1_1NameserverList - */ -const se_NameserverList = (input: Nameserver[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Nameserver(entry, context); - }); -}; +// se_NameserverList omitted. -/** - * serializeAws_json1_1OperationStatusList - */ -const se_OperationStatusList = (input: (OperationStatus | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OperationStatusList omitted. -/** - * serializeAws_json1_1OperationTypeList - */ -const se_OperationTypeList = (input: (OperationType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_OperationTypeList omitted. -/** - * serializeAws_json1_1PushDomainRequest - */ -const se_PushDomainRequest = (input: PushDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.Target != null && { Target: input.Target }), - }; -}; +// se_PushDomainRequest omitted. -/** - * serializeAws_json1_1RegisterDomainRequest - */ -const se_RegisterDomainRequest = (input: RegisterDomainRequest, context: __SerdeContext): any => { - return { - ...(input.AdminContact != null && { AdminContact: se_ContactDetail(input.AdminContact, context) }), - ...(input.AutoRenew != null && { AutoRenew: input.AutoRenew }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.DurationInYears != null && { DurationInYears: input.DurationInYears }), - ...(input.IdnLangCode != null && { IdnLangCode: input.IdnLangCode }), - ...(input.PrivacyProtectAdminContact != null && { PrivacyProtectAdminContact: input.PrivacyProtectAdminContact }), - ...(input.PrivacyProtectRegistrantContact != null && { - PrivacyProtectRegistrantContact: input.PrivacyProtectRegistrantContact, - }), - ...(input.PrivacyProtectTechContact != null && { PrivacyProtectTechContact: input.PrivacyProtectTechContact }), - ...(input.RegistrantContact != null && { RegistrantContact: se_ContactDetail(input.RegistrantContact, context) }), - ...(input.TechContact != null && { TechContact: se_ContactDetail(input.TechContact, context) }), - }; -}; +// se_RegisterDomainRequest omitted. -/** - * serializeAws_json1_1RejectDomainTransferFromAnotherAwsAccountRequest - */ -const se_RejectDomainTransferFromAnotherAwsAccountRequest = ( - input: RejectDomainTransferFromAnotherAwsAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_RejectDomainTransferFromAnotherAwsAccountRequest omitted. -/** - * serializeAws_json1_1RenewDomainRequest - */ -const se_RenewDomainRequest = (input: RenewDomainRequest, context: __SerdeContext): any => { - return { - ...(input.CurrentExpiryYear != null && { CurrentExpiryYear: input.CurrentExpiryYear }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.DurationInYears != null && { DurationInYears: input.DurationInYears }), - }; -}; +// se_RenewDomainRequest omitted. -/** - * serializeAws_json1_1ResendContactReachabilityEmailRequest - */ -const se_ResendContactReachabilityEmailRequest = ( - input: ResendContactReachabilityEmailRequest, - context: __SerdeContext -): any => { - return { - ...(input.domainName != null && { domainName: input.domainName }), - }; -}; +// se_ResendContactReachabilityEmailRequest omitted. -/** - * serializeAws_json1_1ResendOperationAuthorizationRequest - */ -const se_ResendOperationAuthorizationRequest = ( - input: ResendOperationAuthorizationRequest, - context: __SerdeContext -): any => { - return { - ...(input.OperationId != null && { OperationId: input.OperationId }), - }; -}; +// se_ResendOperationAuthorizationRequest omitted. -/** - * serializeAws_json1_1RetrieveDomainAuthCodeRequest - */ -const se_RetrieveDomainAuthCodeRequest = (input: RetrieveDomainAuthCodeRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_RetrieveDomainAuthCodeRequest omitted. -/** - * serializeAws_json1_1SortCondition - */ -const se_SortCondition = (input: SortCondition, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_SortCondition omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TransferDomainRequest - */ -const se_TransferDomainRequest = (input: TransferDomainRequest, context: __SerdeContext): any => { - return { - ...(input.AdminContact != null && { AdminContact: se_ContactDetail(input.AdminContact, context) }), - ...(input.AuthCode != null && { AuthCode: input.AuthCode }), - ...(input.AutoRenew != null && { AutoRenew: input.AutoRenew }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.DurationInYears != null && { DurationInYears: input.DurationInYears }), - ...(input.IdnLangCode != null && { IdnLangCode: input.IdnLangCode }), - ...(input.Nameservers != null && { Nameservers: se_NameserverList(input.Nameservers, context) }), - ...(input.PrivacyProtectAdminContact != null && { PrivacyProtectAdminContact: input.PrivacyProtectAdminContact }), - ...(input.PrivacyProtectRegistrantContact != null && { - PrivacyProtectRegistrantContact: input.PrivacyProtectRegistrantContact, - }), - ...(input.PrivacyProtectTechContact != null && { PrivacyProtectTechContact: input.PrivacyProtectTechContact }), - ...(input.RegistrantContact != null && { RegistrantContact: se_ContactDetail(input.RegistrantContact, context) }), - ...(input.TechContact != null && { TechContact: se_ContactDetail(input.TechContact, context) }), - }; -}; +// se_TransferDomainRequest omitted. -/** - * serializeAws_json1_1TransferDomainToAnotherAwsAccountRequest - */ -const se_TransferDomainToAnotherAwsAccountRequest = ( - input: TransferDomainToAnotherAwsAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - }; -}; +// se_TransferDomainToAnotherAwsAccountRequest omitted. -/** - * serializeAws_json1_1UpdateDomainContactPrivacyRequest - */ -const se_UpdateDomainContactPrivacyRequest = ( - input: UpdateDomainContactPrivacyRequest, - context: __SerdeContext -): any => { - return { - ...(input.AdminPrivacy != null && { AdminPrivacy: input.AdminPrivacy }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.RegistrantPrivacy != null && { RegistrantPrivacy: input.RegistrantPrivacy }), - ...(input.TechPrivacy != null && { TechPrivacy: input.TechPrivacy }), - }; -}; +// se_UpdateDomainContactPrivacyRequest omitted. /** * serializeAws_json1_1UpdateDomainContactRequest */ const se_UpdateDomainContactRequest = (input: UpdateDomainContactRequest, context: __SerdeContext): any => { - return { - ...(input.AdminContact != null && { AdminContact: se_ContactDetail(input.AdminContact, context) }), - ...(input.Consent != null && { Consent: se_Consent(input.Consent, context) }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.RegistrantContact != null && { RegistrantContact: se_ContactDetail(input.RegistrantContact, context) }), - ...(input.TechContact != null && { TechContact: se_ContactDetail(input.TechContact, context) }), - }; + return take(input, { + AdminContact: _json, + Consent: (_) => se_Consent(_, context), + DomainName: [], + RegistrantContact: _json, + TechContact: _json, + }); }; -/** - * serializeAws_json1_1UpdateDomainNameserversRequest - */ -const se_UpdateDomainNameserversRequest = (input: UpdateDomainNameserversRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FIAuthKey != null && { FIAuthKey: input.FIAuthKey }), - ...(input.Nameservers != null && { Nameservers: se_NameserverList(input.Nameservers, context) }), - }; -}; +// se_UpdateDomainNameserversRequest omitted. -/** - * serializeAws_json1_1UpdateTagsForDomainRequest - */ -const se_UpdateTagsForDomainRequest = (input: UpdateTagsForDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.TagsToUpdate != null && { TagsToUpdate: se_TagList(input.TagsToUpdate, context) }), - }; -}; +// se_UpdateTagsForDomainRequest omitted. -/** - * serializeAws_json1_1Values - */ -const se_Values = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Values omitted. /** * serializeAws_json1_1ViewBillingRequest */ const se_ViewBillingRequest = (input: ViewBillingRequest, context: __SerdeContext): any => { - return { - ...(input.End != null && { End: Math.round(input.End.getTime() / 1000) }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.Start != null && { Start: Math.round(input.Start.getTime() / 1000) }), - }; + return take(input, { + End: (_) => Math.round(_.getTime() / 1000), + Marker: [], + MaxItems: [], + Start: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * deserializeAws_json1_1AcceptDomainTransferFromAnotherAwsAccountResponse - */ -const de_AcceptDomainTransferFromAnotherAwsAccountResponse = ( - output: any, - context: __SerdeContext -): AcceptDomainTransferFromAnotherAwsAccountResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_AcceptDomainTransferFromAnotherAwsAccountResponse omitted. -/** - * deserializeAws_json1_1AssociateDelegationSignerToDomainResponse - */ -const de_AssociateDelegationSignerToDomainResponse = ( - output: any, - context: __SerdeContext -): AssociateDelegationSignerToDomainResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_AssociateDelegationSignerToDomainResponse omitted. /** * deserializeAws_json1_1BillingRecord */ const de_BillingRecord = (output: any, context: __SerdeContext): BillingRecord => { - return { - BillDate: - output.BillDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.BillDate))) : undefined, - DomainName: __expectString(output.DomainName), - InvoiceId: __expectString(output.InvoiceId), - Operation: __expectString(output.Operation), - Price: __limitedParseDouble(output.Price), - } as any; + return take(output, { + BillDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + InvoiceId: __expectString, + Operation: __expectString, + Price: __limitedParseDouble, + }) as any; }; /** @@ -3212,180 +2679,49 @@ const de_BillingRecords = (output: any, context: __SerdeContext): BillingRecord[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BillingRecord(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1CancelDomainTransferToAnotherAwsAccountResponse - */ -const de_CancelDomainTransferToAnotherAwsAccountResponse = ( - output: any, - context: __SerdeContext -): CancelDomainTransferToAnotherAwsAccountResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_CancelDomainTransferToAnotherAwsAccountResponse omitted. -/** - * deserializeAws_json1_1CheckDomainAvailabilityResponse - */ -const de_CheckDomainAvailabilityResponse = (output: any, context: __SerdeContext): CheckDomainAvailabilityResponse => { - return { - Availability: __expectString(output.Availability), - } as any; -}; +// de_CheckDomainAvailabilityResponse omitted. -/** - * deserializeAws_json1_1CheckDomainTransferabilityResponse - */ -const de_CheckDomainTransferabilityResponse = ( - output: any, - context: __SerdeContext -): CheckDomainTransferabilityResponse => { - return { - Transferability: - output.Transferability != null ? de_DomainTransferability(output.Transferability, context) : undefined, - } as any; -}; +// de_CheckDomainTransferabilityResponse omitted. -/** - * deserializeAws_json1_1ContactDetail - */ -const de_ContactDetail = (output: any, context: __SerdeContext): ContactDetail => { - return { - AddressLine1: __expectString(output.AddressLine1), - AddressLine2: __expectString(output.AddressLine2), - City: __expectString(output.City), - ContactType: __expectString(output.ContactType), - CountryCode: __expectString(output.CountryCode), - Email: __expectString(output.Email), - ExtraParams: output.ExtraParams != null ? de_ExtraParamList(output.ExtraParams, context) : undefined, - Fax: __expectString(output.Fax), - FirstName: __expectString(output.FirstName), - LastName: __expectString(output.LastName), - OrganizationName: __expectString(output.OrganizationName), - PhoneNumber: __expectString(output.PhoneNumber), - State: __expectString(output.State), - ZipCode: __expectString(output.ZipCode), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteDomainResponse - */ -const de_DeleteDomainResponse = (output: any, context: __SerdeContext): DeleteDomainResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_ContactDetail omitted. -/** - * deserializeAws_json1_1DeleteTagsForDomainResponse - */ -const de_DeleteTagsForDomainResponse = (output: any, context: __SerdeContext): DeleteTagsForDomainResponse => { - return {} as any; -}; +// de_DeleteDomainResponse omitted. -/** - * deserializeAws_json1_1DisableDomainAutoRenewResponse - */ -const de_DisableDomainAutoRenewResponse = (output: any, context: __SerdeContext): DisableDomainAutoRenewResponse => { - return {} as any; -}; +// de_DeleteTagsForDomainResponse omitted. -/** - * deserializeAws_json1_1DisableDomainTransferLockResponse - */ -const de_DisableDomainTransferLockResponse = ( - output: any, - context: __SerdeContext -): DisableDomainTransferLockResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_DisableDomainAutoRenewResponse omitted. -/** - * deserializeAws_json1_1DisassociateDelegationSignerFromDomainResponse - */ -const de_DisassociateDelegationSignerFromDomainResponse = ( - output: any, - context: __SerdeContext -): DisassociateDelegationSignerFromDomainResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_DisableDomainTransferLockResponse omitted. -/** - * deserializeAws_json1_1DnssecKey - */ -const de_DnssecKey = (output: any, context: __SerdeContext): DnssecKey => { - return { - Algorithm: __expectInt32(output.Algorithm), - Digest: __expectString(output.Digest), - DigestType: __expectInt32(output.DigestType), - Flags: __expectInt32(output.Flags), - Id: __expectString(output.Id), - KeyTag: __expectInt32(output.KeyTag), - PublicKey: __expectString(output.PublicKey), - } as any; -}; +// de_DisassociateDelegationSignerFromDomainResponse omitted. -/** - * deserializeAws_json1_1DnssecKeyList - */ -const de_DnssecKeyList = (output: any, context: __SerdeContext): DnssecKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DnssecKey(entry, context); - }); - return retVal; -}; +// de_DnssecKey omitted. -/** - * deserializeAws_json1_1DnssecLimitExceeded - */ -const de_DnssecLimitExceeded = (output: any, context: __SerdeContext): DnssecLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DnssecKeyList omitted. -/** - * deserializeAws_json1_1DomainLimitExceeded - */ -const de_DomainLimitExceeded = (output: any, context: __SerdeContext): DomainLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DnssecLimitExceeded omitted. + +// de_DomainLimitExceeded omitted. /** * deserializeAws_json1_1DomainPrice */ const de_DomainPrice = (output: any, context: __SerdeContext): DomainPrice => { - return { - ChangeOwnershipPrice: - output.ChangeOwnershipPrice != null ? de_PriceWithCurrency(output.ChangeOwnershipPrice, context) : undefined, - Name: __expectString(output.Name), - RegistrationPrice: - output.RegistrationPrice != null ? de_PriceWithCurrency(output.RegistrationPrice, context) : undefined, - RenewalPrice: output.RenewalPrice != null ? de_PriceWithCurrency(output.RenewalPrice, context) : undefined, - RestorationPrice: - output.RestorationPrice != null ? de_PriceWithCurrency(output.RestorationPrice, context) : undefined, - TransferPrice: output.TransferPrice != null ? de_PriceWithCurrency(output.TransferPrice, context) : undefined, - } as any; + return take(output, { + ChangeOwnershipPrice: (_: any) => de_PriceWithCurrency(_, context), + Name: __expectString, + RegistrationPrice: (_: any) => de_PriceWithCurrency(_, context), + RenewalPrice: (_: any) => de_PriceWithCurrency(_, context), + RestorationPrice: (_: any) => de_PriceWithCurrency(_, context), + TransferPrice: (_: any) => de_PriceWithCurrency(_, context), + }) as any; }; /** @@ -3395,64 +2731,27 @@ const de_DomainPriceList = (output: any, context: __SerdeContext): DomainPrice[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainPrice(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DomainStatusList - */ -const de_DomainStatusList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DomainStatusList omitted. -/** - * deserializeAws_json1_1DomainSuggestion - */ -const de_DomainSuggestion = (output: any, context: __SerdeContext): DomainSuggestion => { - return { - Availability: __expectString(output.Availability), - DomainName: __expectString(output.DomainName), - } as any; -}; +// de_DomainSuggestion omitted. -/** - * deserializeAws_json1_1DomainSuggestionsList - */ -const de_DomainSuggestionsList = (output: any, context: __SerdeContext): DomainSuggestion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainSuggestion(entry, context); - }); - return retVal; -}; +// de_DomainSuggestionsList omitted. /** * deserializeAws_json1_1DomainSummary */ const de_DomainSummary = (output: any, context: __SerdeContext): DomainSummary => { - return { - AutoRenew: __expectBoolean(output.AutoRenew), - DomainName: __expectString(output.DomainName), - Expiry: output.Expiry != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Expiry))) : undefined, - TransferLock: __expectBoolean(output.TransferLock), - } as any; + return take(output, { + AutoRenew: __expectBoolean, + DomainName: __expectString, + Expiry: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransferLock: __expectBoolean, + }) as any; }; /** @@ -3462,278 +2761,129 @@ const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1DomainTransferability - */ -const de_DomainTransferability = (output: any, context: __SerdeContext): DomainTransferability => { - return { - Transferable: __expectString(output.Transferable), - } as any; -}; +// de_DomainTransferability omitted. -/** - * deserializeAws_json1_1DuplicateRequest - */ -const de_DuplicateRequest = (output: any, context: __SerdeContext): DuplicateRequest => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DuplicateRequest omitted. -/** - * deserializeAws_json1_1EnableDomainAutoRenewResponse - */ -const de_EnableDomainAutoRenewResponse = (output: any, context: __SerdeContext): EnableDomainAutoRenewResponse => { - return {} as any; -}; +// de_EnableDomainAutoRenewResponse omitted. -/** - * deserializeAws_json1_1EnableDomainTransferLockResponse - */ -const de_EnableDomainTransferLockResponse = ( - output: any, - context: __SerdeContext -): EnableDomainTransferLockResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_EnableDomainTransferLockResponse omitted. -/** - * deserializeAws_json1_1ExtraParam - */ -const de_ExtraParam = (output: any, context: __SerdeContext): ExtraParam => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_ExtraParam omitted. -/** - * deserializeAws_json1_1ExtraParamList - */ -const de_ExtraParamList = (output: any, context: __SerdeContext): ExtraParam[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExtraParam(entry, context); - }); - return retVal; -}; +// de_ExtraParamList omitted. -/** - * deserializeAws_json1_1GetContactReachabilityStatusResponse - */ -const de_GetContactReachabilityStatusResponse = ( - output: any, - context: __SerdeContext -): GetContactReachabilityStatusResponse => { - return { - domainName: __expectString(output.domainName), - status: __expectString(output.status), - } as any; -}; +// de_GetContactReachabilityStatusResponse omitted. /** * deserializeAws_json1_1GetDomainDetailResponse */ const de_GetDomainDetailResponse = (output: any, context: __SerdeContext): GetDomainDetailResponse => { - return { - AbuseContactEmail: __expectString(output.AbuseContactEmail), - AbuseContactPhone: __expectString(output.AbuseContactPhone), - AdminContact: output.AdminContact != null ? de_ContactDetail(output.AdminContact, context) : undefined, - AdminPrivacy: __expectBoolean(output.AdminPrivacy), - AutoRenew: __expectBoolean(output.AutoRenew), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - DnsSec: __expectString(output.DnsSec), - DnssecKeys: output.DnssecKeys != null ? de_DnssecKeyList(output.DnssecKeys, context) : undefined, - DomainName: __expectString(output.DomainName), - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationDate))) - : undefined, - Nameservers: output.Nameservers != null ? de_NameserverList(output.Nameservers, context) : undefined, - RegistrantContact: - output.RegistrantContact != null ? de_ContactDetail(output.RegistrantContact, context) : undefined, - RegistrantPrivacy: __expectBoolean(output.RegistrantPrivacy), - RegistrarName: __expectString(output.RegistrarName), - RegistrarUrl: __expectString(output.RegistrarUrl), - RegistryDomainId: __expectString(output.RegistryDomainId), - Reseller: __expectString(output.Reseller), - StatusList: output.StatusList != null ? de_DomainStatusList(output.StatusList, context) : undefined, - TechContact: output.TechContact != null ? de_ContactDetail(output.TechContact, context) : undefined, - TechPrivacy: __expectBoolean(output.TechPrivacy), - UpdatedDate: - output.UpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedDate))) - : undefined, - WhoIsServer: __expectString(output.WhoIsServer), - } as any; -}; - -/** - * deserializeAws_json1_1GetDomainSuggestionsResponse - */ -const de_GetDomainSuggestionsResponse = (output: any, context: __SerdeContext): GetDomainSuggestionsResponse => { - return { - SuggestionsList: - output.SuggestionsList != null ? de_DomainSuggestionsList(output.SuggestionsList, context) : undefined, - } as any; -}; + return take(output, { + AbuseContactEmail: __expectString, + AbuseContactPhone: __expectString, + AdminContact: _json, + AdminPrivacy: __expectBoolean, + AutoRenew: __expectBoolean, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DnsSec: __expectString, + DnssecKeys: _json, + DomainName: __expectString, + ExpirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Nameservers: _json, + RegistrantContact: _json, + RegistrantPrivacy: __expectBoolean, + RegistrarName: __expectString, + RegistrarUrl: __expectString, + RegistryDomainId: __expectString, + Reseller: __expectString, + StatusList: _json, + TechContact: _json, + TechPrivacy: __expectBoolean, + UpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WhoIsServer: __expectString, + }) as any; +}; + +// de_GetDomainSuggestionsResponse omitted. /** * deserializeAws_json1_1GetOperationDetailResponse */ const de_GetOperationDetailResponse = (output: any, context: __SerdeContext): GetOperationDetailResponse => { - return { - DomainName: __expectString(output.DomainName), - LastUpdatedDate: - output.LastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDate))) - : undefined, - Message: __expectString(output.Message), - OperationId: __expectString(output.OperationId), - Status: __expectString(output.Status), - StatusFlag: __expectString(output.StatusFlag), - SubmittedDate: - output.SubmittedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmittedDate))) - : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1GlueIpList - */ -const de_GlueIpList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + DomainName: __expectString, + LastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + OperationId: __expectString, + Status: __expectString, + StatusFlag: __expectString, + SubmittedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InvalidInput - */ -const de_InvalidInput = (output: any, context: __SerdeContext): InvalidInput => { - return { - message: __expectString(output.message), - } as any; -}; +// de_GlueIpList omitted. + +// de_InvalidInput omitted. /** * deserializeAws_json1_1ListDomainsResponse */ const de_ListDomainsResponse = (output: any, context: __SerdeContext): ListDomainsResponse => { - return { - Domains: output.Domains != null ? de_DomainSummaryList(output.Domains, context) : undefined, - NextPageMarker: __expectString(output.NextPageMarker), - } as any; + return take(output, { + Domains: (_: any) => de_DomainSummaryList(_, context), + NextPageMarker: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListOperationsResponse */ const de_ListOperationsResponse = (output: any, context: __SerdeContext): ListOperationsResponse => { - return { - NextPageMarker: __expectString(output.NextPageMarker), - Operations: output.Operations != null ? de_OperationSummaryList(output.Operations, context) : undefined, - } as any; + return take(output, { + NextPageMarker: __expectString, + Operations: (_: any) => de_OperationSummaryList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListPricesResponse */ const de_ListPricesResponse = (output: any, context: __SerdeContext): ListPricesResponse => { - return { - NextPageMarker: __expectString(output.NextPageMarker), - Prices: output.Prices != null ? de_DomainPriceList(output.Prices, context) : undefined, - } as any; + return take(output, { + NextPageMarker: __expectString, + Prices: (_: any) => de_DomainPriceList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForDomainResponse - */ -const de_ListTagsForDomainResponse = (output: any, context: __SerdeContext): ListTagsForDomainResponse => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_ListTagsForDomainResponse omitted. -/** - * deserializeAws_json1_1Nameserver - */ -const de_Nameserver = (output: any, context: __SerdeContext): Nameserver => { - return { - GlueIps: output.GlueIps != null ? de_GlueIpList(output.GlueIps, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_Nameserver omitted. -/** - * deserializeAws_json1_1NameserverList - */ -const de_NameserverList = (output: any, context: __SerdeContext): Nameserver[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Nameserver(entry, context); - }); - return retVal; -}; +// de_NameserverList omitted. -/** - * deserializeAws_json1_1OperationLimitExceeded - */ -const de_OperationLimitExceeded = (output: any, context: __SerdeContext): OperationLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_OperationLimitExceeded omitted. /** * deserializeAws_json1_1OperationSummary */ const de_OperationSummary = (output: any, context: __SerdeContext): OperationSummary => { - return { - DomainName: __expectString(output.DomainName), - LastUpdatedDate: - output.LastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDate))) - : undefined, - Message: __expectString(output.Message), - OperationId: __expectString(output.OperationId), - Status: __expectString(output.Status), - StatusFlag: __expectString(output.StatusFlag), - SubmittedDate: - output.SubmittedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmittedDate))) - : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + DomainName: __expectString, + LastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + OperationId: __expectString, + Status: __expectString, + StatusFlag: __expectString, + SubmittedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + }) as any; }; /** @@ -3743,9 +2893,6 @@ const de_OperationSummaryList = (output: any, context: __SerdeContext): Operatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_OperationSummary(entry, context); }); return retVal; @@ -3755,175 +2902,50 @@ const de_OperationSummaryList = (output: any, context: __SerdeContext): Operatio * deserializeAws_json1_1PriceWithCurrency */ const de_PriceWithCurrency = (output: any, context: __SerdeContext): PriceWithCurrency => { - return { - Currency: __expectString(output.Currency), - Price: __limitedParseDouble(output.Price), - } as any; + return take(output, { + Currency: __expectString, + Price: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1RegisterDomainResponse - */ -const de_RegisterDomainResponse = (output: any, context: __SerdeContext): RegisterDomainResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_RegisterDomainResponse omitted. -/** - * deserializeAws_json1_1RejectDomainTransferFromAnotherAwsAccountResponse - */ -const de_RejectDomainTransferFromAnotherAwsAccountResponse = ( - output: any, - context: __SerdeContext -): RejectDomainTransferFromAnotherAwsAccountResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_RejectDomainTransferFromAnotherAwsAccountResponse omitted. -/** - * deserializeAws_json1_1RenewDomainResponse - */ -const de_RenewDomainResponse = (output: any, context: __SerdeContext): RenewDomainResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_RenewDomainResponse omitted. -/** - * deserializeAws_json1_1ResendContactReachabilityEmailResponse - */ -const de_ResendContactReachabilityEmailResponse = ( - output: any, - context: __SerdeContext -): ResendContactReachabilityEmailResponse => { - return { - domainName: __expectString(output.domainName), - emailAddress: __expectString(output.emailAddress), - isAlreadyVerified: __expectBoolean(output.isAlreadyVerified), - } as any; -}; +// de_ResendContactReachabilityEmailResponse omitted. -/** - * deserializeAws_json1_1RetrieveDomainAuthCodeResponse - */ -const de_RetrieveDomainAuthCodeResponse = (output: any, context: __SerdeContext): RetrieveDomainAuthCodeResponse => { - return { - AuthCode: __expectString(output.AuthCode), - } as any; -}; +// de_RetrieveDomainAuthCodeResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TLDRulesViolation - */ -const de_TLDRulesViolation = (output: any, context: __SerdeContext): TLDRulesViolation => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TLDRulesViolation omitted. -/** - * deserializeAws_json1_1TransferDomainResponse - */ -const de_TransferDomainResponse = (output: any, context: __SerdeContext): TransferDomainResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_TransferDomainResponse omitted. -/** - * deserializeAws_json1_1TransferDomainToAnotherAwsAccountResponse - */ -const de_TransferDomainToAnotherAwsAccountResponse = ( - output: any, - context: __SerdeContext -): TransferDomainToAnotherAwsAccountResponse => { - return { - OperationId: __expectString(output.OperationId), - Password: __expectString(output.Password), - } as any; -}; +// de_TransferDomainToAnotherAwsAccountResponse omitted. -/** - * deserializeAws_json1_1UnsupportedTLD - */ -const de_UnsupportedTLD = (output: any, context: __SerdeContext): UnsupportedTLD => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnsupportedTLD omitted. -/** - * deserializeAws_json1_1UpdateDomainContactPrivacyResponse - */ -const de_UpdateDomainContactPrivacyResponse = ( - output: any, - context: __SerdeContext -): UpdateDomainContactPrivacyResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UpdateDomainContactPrivacyResponse omitted. -/** - * deserializeAws_json1_1UpdateDomainContactResponse - */ -const de_UpdateDomainContactResponse = (output: any, context: __SerdeContext): UpdateDomainContactResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UpdateDomainContactResponse omitted. -/** - * deserializeAws_json1_1UpdateDomainNameserversResponse - */ -const de_UpdateDomainNameserversResponse = (output: any, context: __SerdeContext): UpdateDomainNameserversResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UpdateDomainNameserversResponse omitted. -/** - * deserializeAws_json1_1UpdateTagsForDomainResponse - */ -const de_UpdateTagsForDomainResponse = (output: any, context: __SerdeContext): UpdateTagsForDomainResponse => { - return {} as any; -}; +// de_UpdateTagsForDomainResponse omitted. /** * deserializeAws_json1_1ViewBillingResponse */ const de_ViewBillingResponse = (output: any, context: __SerdeContext): ViewBillingResponse => { - return { - BillingRecords: output.BillingRecords != null ? de_BillingRecords(output.BillingRecords, context) : undefined, - NextPageMarker: __expectString(output.NextPageMarker), - } as any; + return take(output, { + BillingRecords: (_: any) => de_BillingRecords(_, context), + NextPageMarker: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -3946,6 +2968,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-route-53/src/protocols/Aws_restXml.ts b/clients/client-route-53/src/protocols/Aws_restXml.ts index 00ce1ee5450d..6a7e9209a57c 100644 --- a/clients/client-route-53/src/protocols/Aws_restXml.ts +++ b/clients/client-route-53/src/protocols/Aws_restXml.ts @@ -8,14 +8,14 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, - map as __map, + map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -2808,10 +2808,9 @@ const de_ActivateKeySigningKeyCommandError = async ( throw await de_NoSuchKeySigningKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2876,10 +2875,9 @@ const de_AssociateVPCWithHostedZoneCommandError = async ( throw await de_PublicZoneVPCAssociationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2938,10 +2936,9 @@ const de_ChangeCidrCollectionCommandError = async ( throw await de_NoSuchCidrCollectionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2997,10 +2994,9 @@ const de_ChangeResourceRecordSetsCommandError = async ( throw await de_PriorRequestNotCompleteRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3053,10 +3049,9 @@ const de_ChangeTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3110,10 +3105,9 @@ const de_CreateCidrCollectionCommandError = async ( throw await de_LimitsExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3164,10 +3158,9 @@ const de_CreateHealthCheckCommandError = async ( throw await de_TooManyHealthChecksRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3245,10 +3238,9 @@ const de_CreateHostedZoneCommandError = async ( throw await de_TooManyHostedZonesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3323,10 +3315,9 @@ const de_CreateKeySigningKeyCommandError = async ( throw await de_TooManyKeySigningKeysRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3386,10 +3377,9 @@ const de_CreateQueryLoggingConfigCommandError = async ( throw await de_QueryLoggingConfigAlreadyExistsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3452,10 +3442,9 @@ const de_CreateReusableDelegationSetCommandError = async ( throw await de_LimitsExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3509,10 +3498,9 @@ const de_CreateTrafficPolicyCommandError = async ( throw await de_TrafficPolicyAlreadyExistsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3569,10 +3557,9 @@ const de_CreateTrafficPolicyInstanceCommandError = async ( throw await de_TrafficPolicyInstanceAlreadyExistsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3629,10 +3616,9 @@ const de_CreateTrafficPolicyVersionCommandError = async ( throw await de_TooManyTrafficPolicyVersionsForCurrentPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3691,10 +3677,9 @@ const de_CreateVPCAssociationAuthorizationCommandError = async ( throw await de_TooManyVPCAssociationAuthorizationsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3756,10 +3741,9 @@ const de_DeactivateKeySigningKeyCommandError = async ( throw await de_NoSuchKeySigningKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3809,10 +3793,9 @@ const de_DeleteCidrCollectionCommandError = async ( throw await de_NoSuchCidrCollectionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3859,10 +3842,9 @@ const de_DeleteHealthCheckCommandError = async ( throw await de_NoSuchHealthCheckRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3918,10 +3900,9 @@ const de_DeleteHostedZoneCommandError = async ( throw await de_PriorRequestNotCompleteRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3980,10 +3961,9 @@ const de_DeleteKeySigningKeyCommandError = async ( throw await de_NoSuchKeySigningKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4030,10 +4010,9 @@ const de_DeleteQueryLoggingConfigCommandError = async ( throw await de_NoSuchQueryLoggingConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4083,10 +4062,9 @@ const de_DeleteReusableDelegationSetCommandError = async ( throw await de_NoSuchDelegationSetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4136,10 +4114,9 @@ const de_DeleteTrafficPolicyCommandError = async ( throw await de_TrafficPolicyInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4186,10 +4163,9 @@ const de_DeleteTrafficPolicyInstanceCommandError = async ( throw await de_PriorRequestNotCompleteRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4242,10 +4218,9 @@ const de_DeleteVPCAssociationAuthorizationCommandError = async ( throw await de_VPCAssociationAuthorizationNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4310,10 +4285,9 @@ const de_DisableHostedZoneDNSSECCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4369,10 +4343,9 @@ const de_DisassociateVPCFromHostedZoneCommandError = async ( throw await de_VPCAssociationNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4440,10 +4413,9 @@ const de_EnableHostedZoneDNSSECCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4490,10 +4462,9 @@ const de_GetAccountLimitCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4540,10 +4511,9 @@ const de_GetChangeCommandError = async ( throw await de_NoSuchChangeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4584,10 +4554,9 @@ const de_GetCheckerIpRangesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4641,10 +4610,9 @@ const de_GetDNSSECCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4691,10 +4659,9 @@ const de_GetGeoLocationCommandError = async ( throw await de_NoSuchGeoLocationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4744,10 +4711,9 @@ const de_GetHealthCheckCommandError = async ( throw await de_NoSuchHealthCheckRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4786,10 +4752,9 @@ const de_GetHealthCheckCountCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4843,10 +4808,9 @@ const de_GetHealthCheckLastFailureReasonCommandError = async ( throw await de_NoSuchHealthCheckRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4901,10 +4865,9 @@ const de_GetHealthCheckStatusCommandError = async ( throw await de_NoSuchHealthCheckRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4959,10 +4922,9 @@ const de_GetHostedZoneCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5006,10 +4968,9 @@ const de_GetHostedZoneCountCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5062,10 +5023,9 @@ const de_GetHostedZoneLimitCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5112,10 +5072,9 @@ const de_GetQueryLoggingConfigCommandError = async ( throw await de_NoSuchQueryLoggingConfigRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5165,10 +5124,9 @@ const de_GetReusableDelegationSetCommandError = async ( throw await de_NoSuchDelegationSetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5218,10 +5176,9 @@ const de_GetReusableDelegationSetLimitCommandError = async ( throw await de_NoSuchDelegationSetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5268,10 +5225,9 @@ const de_GetTrafficPolicyCommandError = async ( throw await de_NoSuchTrafficPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5318,10 +5274,9 @@ const de_GetTrafficPolicyInstanceCommandError = async ( throw await de_NoSuchTrafficPolicyInstanceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5360,10 +5315,9 @@ const de_GetTrafficPolicyInstanceCountCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5417,10 +5371,9 @@ const de_ListCidrBlocksCommandError = async ( throw await de_NoSuchCidrLocationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5472,10 +5425,9 @@ const de_ListCidrCollectionsCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5527,10 +5479,9 @@ const de_ListCidrLocationsCommandError = async ( throw await de_NoSuchCidrCollectionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5597,10 +5548,9 @@ const de_ListGeoLocationsCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5661,10 +5611,9 @@ const de_ListHealthChecksCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5728,10 +5677,9 @@ const de_ListHostedZonesCommandError = async ( throw await de_NoSuchDelegationSetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5798,10 +5746,9 @@ const de_ListHostedZonesByNameCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5862,10 +5809,9 @@ const de_ListHostedZonesByVPCCommandError = async ( throw await de_InvalidPaginationTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5926,10 +5872,9 @@ const de_ListQueryLoggingConfigsCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5999,10 +5944,9 @@ const de_ListResourceRecordSetsCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6063,10 +6007,9 @@ const de_ListReusableDelegationSetsCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6122,10 +6065,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6186,10 +6128,9 @@ const de_ListTagsForResourcesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6250,10 +6191,9 @@ const de_ListTrafficPoliciesCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6323,10 +6263,9 @@ const de_ListTrafficPolicyInstancesCommandError = async ( throw await de_NoSuchTrafficPolicyInstanceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6396,10 +6335,9 @@ const de_ListTrafficPolicyInstancesByHostedZoneCommandError = async ( throw await de_NoSuchTrafficPolicyInstanceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6472,10 +6410,9 @@ const de_ListTrafficPolicyInstancesByPolicyCommandError = async ( throw await de_NoSuchTrafficPolicyInstanceRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6536,10 +6473,9 @@ const de_ListTrafficPolicyVersionsCommandError = async ( throw await de_NoSuchTrafficPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6597,10 +6533,9 @@ const de_ListVPCAssociationAuthorizationsCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6664,10 +6599,9 @@ const de_TestDNSAnswerCommandError = async ( throw await de_NoSuchHostedZoneRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6717,10 +6651,9 @@ const de_UpdateHealthCheckCommandError = async ( throw await de_NoSuchHealthCheckRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6770,10 +6703,9 @@ const de_UpdateHostedZoneCommentCommandError = async ( throw await de_PriorRequestNotCompleteRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6823,10 +6755,9 @@ const de_UpdateTrafficPolicyCommentCommandError = async ( throw await de_NoSuchTrafficPolicyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -6882,16 +6813,15 @@ const de_UpdateTrafficPolicyInstanceCommandError = async ( throw await de_PriorRequestNotCompleteRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restXmlCidrBlockInUseExceptionRes */ diff --git a/clients/client-route53-recovery-cluster/src/protocols/Aws_json1_0.ts b/clients/client-route53-recovery-cluster/src/protocols/Aws_json1_0.ts index d1750c94d412..50d48d6b1be2 100644 --- a/clients/client-route53-recovery-cluster/src/protocols/Aws_json1_0.ts +++ b/clients/client-route53-recovery-cluster/src/protocols/Aws_json1_0.ts @@ -1,10 +1,9 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, - expectString as __expectString, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -34,21 +33,15 @@ import { ConflictException, EndpointTemporarilyUnavailableException, GetRoutingControlStateRequest, - GetRoutingControlStateResponse, InternalServerException, ListRoutingControlsRequest, - ListRoutingControlsResponse, ResourceNotFoundException, - RoutingControl, ServiceLimitExceededException, ThrottlingException, UpdateRoutingControlStateEntry, UpdateRoutingControlStateRequest, - UpdateRoutingControlStateResponse, UpdateRoutingControlStatesRequest, - UpdateRoutingControlStatesResponse, ValidationException, - ValidationExceptionField, } from "../models/models_0"; import { Route53RecoveryClusterServiceException as __BaseException } from "../models/Route53RecoveryClusterServiceException"; @@ -61,7 +54,7 @@ export const se_GetRoutingControlStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRoutingControlState"); let body: any; - body = JSON.stringify(se_GetRoutingControlStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -74,7 +67,7 @@ export const se_ListRoutingControlsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRoutingControls"); let body: any; - body = JSON.stringify(se_ListRoutingControlsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -87,7 +80,7 @@ export const se_UpdateRoutingControlStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRoutingControlState"); let body: any; - body = JSON.stringify(se_UpdateRoutingControlStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -100,7 +93,7 @@ export const se_UpdateRoutingControlStatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRoutingControlStates"); let body: any; - body = JSON.stringify(se_UpdateRoutingControlStatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -116,12 +109,12 @@ export const de_GetRoutingControlStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRoutingControlStateResponse(data, context); + contents = _json(data); const response: GetRoutingControlStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -157,10 +150,9 @@ const de_GetRoutingControlStateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -178,12 +170,12 @@ export const de_ListRoutingControlsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRoutingControlsResponse(data, context); + contents = _json(data); const response: ListRoutingControlsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -219,10 +211,9 @@ const de_ListRoutingControlsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -240,12 +231,12 @@ export const de_UpdateRoutingControlStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRoutingControlStateResponse(data, context); + contents = _json(data); const response: UpdateRoutingControlStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -284,10 +275,9 @@ const de_UpdateRoutingControlStateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -305,12 +295,12 @@ export const de_UpdateRoutingControlStatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRoutingControlStatesResponse(data, context); + contents = _json(data); const response: UpdateRoutingControlStatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -352,10 +342,9 @@ const de_UpdateRoutingControlStatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -369,7 +358,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -382,7 +371,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -398,7 +387,7 @@ const de_EndpointTemporarilyUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EndpointTemporarilyUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new EndpointTemporarilyUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -414,7 +403,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -430,7 +419,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -446,7 +435,7 @@ const de_ServiceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -459,7 +448,7 @@ const de_ServiceLimitExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -472,7 +461,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -480,271 +469,51 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0Arns - */ -const se_Arns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Arns omitted. -/** - * serializeAws_json1_0GetRoutingControlStateRequest - */ -const se_GetRoutingControlStateRequest = (input: GetRoutingControlStateRequest, context: __SerdeContext): any => { - return { - ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }), - }; -}; +// se_GetRoutingControlStateRequest omitted. -/** - * serializeAws_json1_0ListRoutingControlsRequest - */ -const se_ListRoutingControlsRequest = (input: ListRoutingControlsRequest, context: __SerdeContext): any => { - return { - ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListRoutingControlsRequest omitted. -/** - * serializeAws_json1_0UpdateRoutingControlStateEntries - */ -const se_UpdateRoutingControlStateEntries = (input: UpdateRoutingControlStateEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateRoutingControlStateEntry(entry, context); - }); -}; +// se_UpdateRoutingControlStateEntries omitted. -/** - * serializeAws_json1_0UpdateRoutingControlStateEntry - */ -const se_UpdateRoutingControlStateEntry = (input: UpdateRoutingControlStateEntry, context: __SerdeContext): any => { - return { - ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }), - ...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }), - }; -}; +// se_UpdateRoutingControlStateEntry omitted. -/** - * serializeAws_json1_0UpdateRoutingControlStateRequest - */ -const se_UpdateRoutingControlStateRequest = (input: UpdateRoutingControlStateRequest, context: __SerdeContext): any => { - return { - ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }), - ...(input.RoutingControlState != null && { RoutingControlState: input.RoutingControlState }), - ...(input.SafetyRulesToOverride != null && { - SafetyRulesToOverride: se_Arns(input.SafetyRulesToOverride, context), - }), - }; -}; +// se_UpdateRoutingControlStateRequest omitted. -/** - * serializeAws_json1_0UpdateRoutingControlStatesRequest - */ -const se_UpdateRoutingControlStatesRequest = ( - input: UpdateRoutingControlStatesRequest, - context: __SerdeContext -): any => { - return { - ...(input.SafetyRulesToOverride != null && { - SafetyRulesToOverride: se_Arns(input.SafetyRulesToOverride, context), - }), - ...(input.UpdateRoutingControlStateEntries != null && { - UpdateRoutingControlStateEntries: se_UpdateRoutingControlStateEntries( - input.UpdateRoutingControlStateEntries, - context - ), - }), - }; -}; +// se_UpdateRoutingControlStatesRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - message: __expectString(output.message), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0EndpointTemporarilyUnavailableException - */ -const de_EndpointTemporarilyUnavailableException = ( - output: any, - context: __SerdeContext -): EndpointTemporarilyUnavailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_EndpointTemporarilyUnavailableException omitted. -/** - * deserializeAws_json1_0GetRoutingControlStateResponse - */ -const de_GetRoutingControlStateResponse = (output: any, context: __SerdeContext): GetRoutingControlStateResponse => { - return { - RoutingControlArn: __expectString(output.RoutingControlArn), - RoutingControlName: __expectString(output.RoutingControlName), - RoutingControlState: __expectString(output.RoutingControlState), - } as any; -}; +// de_GetRoutingControlStateResponse omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - message: __expectString(output.message), - retryAfterSeconds: __expectInt32(output.retryAfterSeconds), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0ListRoutingControlsResponse - */ -const de_ListRoutingControlsResponse = (output: any, context: __SerdeContext): ListRoutingControlsResponse => { - return { - NextToken: __expectString(output.NextToken), - RoutingControls: output.RoutingControls != null ? de_RoutingControls(output.RoutingControls, context) : undefined, - } as any; -}; +// de_ListRoutingControlsResponse omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0RoutingControl - */ -const de_RoutingControl = (output: any, context: __SerdeContext): RoutingControl => { - return { - ControlPanelArn: __expectString(output.ControlPanelArn), - ControlPanelName: __expectString(output.ControlPanelName), - RoutingControlArn: __expectString(output.RoutingControlArn), - RoutingControlName: __expectString(output.RoutingControlName), - RoutingControlState: __expectString(output.RoutingControlState), - } as any; -}; +// de_RoutingControl omitted. -/** - * deserializeAws_json1_0RoutingControls - */ -const de_RoutingControls = (output: any, context: __SerdeContext): RoutingControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoutingControl(entry, context); - }); - return retVal; -}; +// de_RoutingControls omitted. -/** - * deserializeAws_json1_0ServiceLimitExceededException - */ -const de_ServiceLimitExceededException = (output: any, context: __SerdeContext): ServiceLimitExceededException => { - return { - limitCode: __expectString(output.limitCode), - message: __expectString(output.message), - resourceId: __expectString(output.resourceId), - resourceType: __expectString(output.resourceType), - serviceCode: __expectString(output.serviceCode), - } as any; -}; +// de_ServiceLimitExceededException omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - message: __expectString(output.message), - retryAfterSeconds: __expectInt32(output.retryAfterSeconds), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UpdateRoutingControlStateResponse - */ -const de_UpdateRoutingControlStateResponse = ( - output: any, - context: __SerdeContext -): UpdateRoutingControlStateResponse => { - return {} as any; -}; +// de_UpdateRoutingControlStateResponse omitted. -/** - * deserializeAws_json1_0UpdateRoutingControlStatesResponse - */ -const de_UpdateRoutingControlStatesResponse = ( - output: any, - context: __SerdeContext -): UpdateRoutingControlStatesResponse => { - return {} as any; -}; +// de_UpdateRoutingControlStatesResponse omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - fields: output.fields != null ? de_ValidationExceptionFieldList(output.fields, context) : undefined, - message: __expectString(output.message), - reason: __expectString(output.reason), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_0ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_json1_0ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -766,6 +535,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-route53-recovery-control-config/src/protocols/Aws_restJson1.ts b/clients/client-route53-recovery-control-config/src/protocols/Aws_restJson1.ts index 3c9f41e9eac7..88b2e2c5b50a 100644 --- a/clients/client-route53-recovery-control-config/src/protocols/Aws_restJson1.ts +++ b/clients/client-route53-recovery-control-config/src/protocols/Aws_restJson1.ts @@ -1,16 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -68,20 +68,13 @@ import { import { UpdateSafetyRuleCommandInput, UpdateSafetyRuleCommandOutput } from "../commands/UpdateSafetyRuleCommand"; import { AccessDeniedException, - AssertionRule, AssertionRuleUpdate, - Cluster, - ClusterEndpoint, ConflictException, - ControlPanel, - GatingRule, GatingRuleUpdate, InternalServerException, NewAssertionRule, NewGatingRule, ResourceNotFoundException, - RoutingControl, - Rule, RuleConfig, ServiceQuotaExceededException, ThrottlingException, @@ -102,11 +95,13 @@ export const se_CreateClusterCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.Tags != null && { Tags: se___mapOf__stringMin0Max256PatternS(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ClusterName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -131,12 +126,14 @@ export const se_CreateControlPanelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controlpanel"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ClusterArn != null && { ClusterArn: input.ClusterArn }), - ...(input.ControlPanelName != null && { ControlPanelName: input.ControlPanelName }), - ...(input.Tags != null && { Tags: se___mapOf__stringMin0Max256PatternS(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ClusterArn: [], + ControlPanelName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -161,12 +158,14 @@ export const se_CreateRoutingControlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routingcontrol"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ClusterArn != null && { ClusterArn: input.ClusterArn }), - ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }), - ...(input.RoutingControlName != null && { RoutingControlName: input.RoutingControlName }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ClusterArn: [], + ControlPanelArn: [], + RoutingControlName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -191,12 +190,14 @@ export const se_CreateSafetyRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/safetyrule"; let body: any; - body = JSON.stringify({ - ...(input.AssertionRule != null && { AssertionRule: se_NewAssertionRule(input.AssertionRule, context) }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.GatingRule != null && { GatingRule: se_NewGatingRule(input.GatingRule, context) }), - ...(input.Tags != null && { Tags: se___mapOf__stringMin0Max256PatternS(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AssertionRule: (_) => _json(_), + ClientToken: (_) => _ ?? generateIdempotencyToken(), + GatingRule: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -643,9 +644,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se___mapOf__stringMin0Max256PatternS(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -700,10 +703,12 @@ export const se_UpdateControlPanelCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/controlpanel"; let body: any; - body = JSON.stringify({ - ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }), - ...(input.ControlPanelName != null && { ControlPanelName: input.ControlPanelName }), - }); + body = JSON.stringify( + take(input, { + ControlPanelArn: [], + ControlPanelName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -728,10 +733,12 @@ export const se_UpdateRoutingControlCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/routingcontrol"; let body: any; - body = JSON.stringify({ - ...(input.RoutingControlArn != null && { RoutingControlArn: input.RoutingControlArn }), - ...(input.RoutingControlName != null && { RoutingControlName: input.RoutingControlName }), - }); + body = JSON.stringify( + take(input, { + RoutingControlArn: [], + RoutingControlName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -756,12 +763,12 @@ export const se_UpdateSafetyRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/safetyrule"; let body: any; - body = JSON.stringify({ - ...(input.AssertionRuleUpdate != null && { - AssertionRuleUpdate: se_AssertionRuleUpdate(input.AssertionRuleUpdate, context), - }), - ...(input.GatingRuleUpdate != null && { GatingRuleUpdate: se_GatingRuleUpdate(input.GatingRuleUpdate, context) }), - }); + body = JSON.stringify( + take(input, { + AssertionRuleUpdate: (_) => _json(_), + GatingRuleUpdate: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -787,9 +794,10 @@ export const de_CreateClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Cluster != null) { - contents.Cluster = de_Cluster(data.Cluster, context); - } + const doc = take(data, { + Cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -829,10 +837,9 @@ const de_CreateClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -852,9 +859,10 @@ export const de_CreateControlPanelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ControlPanel != null) { - contents.ControlPanel = de_ControlPanel(data.ControlPanel, context); - } + const doc = take(data, { + ControlPanel: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -894,10 +902,9 @@ const de_CreateControlPanelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -917,9 +924,10 @@ export const de_CreateRoutingControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoutingControl != null) { - contents.RoutingControl = de_RoutingControl(data.RoutingControl, context); - } + const doc = take(data, { + RoutingControl: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -959,10 +967,9 @@ const de_CreateRoutingControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -982,12 +989,11 @@ export const de_CreateSafetyRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssertionRule != null) { - contents.AssertionRule = de_AssertionRule(data.AssertionRule, context); - } - if (data.GatingRule != null) { - contents.GatingRule = de_GatingRule(data.GatingRule, context); - } + const doc = take(data, { + AssertionRule: _json, + GatingRule: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1012,10 +1018,9 @@ const de_CreateSafetyRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1071,10 +1076,9 @@ const de_DeleteClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1130,10 +1134,9 @@ const de_DeleteControlPanelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1189,10 +1192,9 @@ const de_DeleteRoutingControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1239,10 +1241,9 @@ const de_DeleteSafetyRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1262,9 +1263,10 @@ export const de_DescribeClusterCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Cluster != null) { - contents.Cluster = de_Cluster(data.Cluster, context); - } + const doc = take(data, { + Cluster: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1301,10 +1303,9 @@ const de_DescribeClusterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1324,9 +1325,10 @@ export const de_DescribeControlPanelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ControlPanel != null) { - contents.ControlPanel = de_ControlPanel(data.ControlPanel, context); - } + const doc = take(data, { + ControlPanel: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1363,10 +1365,9 @@ const de_DescribeControlPanelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1386,9 +1387,10 @@ export const de_DescribeRoutingControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoutingControl != null) { - contents.RoutingControl = de_RoutingControl(data.RoutingControl, context); - } + const doc = take(data, { + RoutingControl: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1425,10 +1427,9 @@ const de_DescribeRoutingControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1448,12 +1449,11 @@ export const de_DescribeSafetyRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssertionRule != null) { - contents.AssertionRule = de_AssertionRule(data.AssertionRule, context); - } - if (data.GatingRule != null) { - contents.GatingRule = de_GatingRule(data.GatingRule, context); - } + const doc = take(data, { + AssertionRule: _json, + GatingRule: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1478,10 +1478,9 @@ const de_DescribeSafetyRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1501,12 +1500,11 @@ export const de_ListAssociatedRoute53HealthChecksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HealthCheckIds != null) { - contents.HealthCheckIds = de___listOf__stringMax36PatternS(data.HealthCheckIds, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + HealthCheckIds: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1534,10 +1532,9 @@ const de_ListAssociatedRoute53HealthChecksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1557,12 +1554,11 @@ export const de_ListClustersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Clusters != null) { - contents.Clusters = de___listOfCluster(data.Clusters, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Clusters: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1596,10 +1592,9 @@ const de_ListClustersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1619,12 +1614,11 @@ export const de_ListControlPanelsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ControlPanels != null) { - contents.ControlPanels = de___listOfControlPanel(data.ControlPanels, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ControlPanels: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1658,10 +1652,9 @@ const de_ListControlPanelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1681,12 +1674,11 @@ export const de_ListRoutingControlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RoutingControls != null) { - contents.RoutingControls = de___listOfRoutingControl(data.RoutingControls, context); - } + const doc = take(data, { + NextToken: __expectString, + RoutingControls: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1720,10 +1712,9 @@ const de_ListRoutingControlsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1743,12 +1734,11 @@ export const de_ListSafetyRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SafetyRules != null) { - contents.SafetyRules = de___listOfRule(data.SafetyRules, context); - } + const doc = take(data, { + NextToken: __expectString, + SafetyRules: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1782,10 +1772,9 @@ const de_ListSafetyRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1805,9 +1794,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de___mapOf__stringMin0Max256PatternS(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1835,10 +1825,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1885,10 +1874,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1935,10 +1923,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,9 +1945,10 @@ export const de_UpdateControlPanelCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ControlPanel != null) { - contents.ControlPanel = de_ControlPanel(data.ControlPanel, context); - } + const doc = take(data, { + ControlPanel: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1997,10 +1985,9 @@ const de_UpdateControlPanelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2020,9 +2007,10 @@ export const de_UpdateRoutingControlCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RoutingControl != null) { - contents.RoutingControl = de_RoutingControl(data.RoutingControl, context); - } + const doc = take(data, { + RoutingControl: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2059,10 +2047,9 @@ const de_UpdateRoutingControlCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2082,12 +2069,11 @@ export const de_UpdateSafetyRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AssertionRule != null) { - contents.AssertionRule = de_AssertionRule(data.AssertionRule, context); - } - if (data.GatingRule != null) { - contents.GatingRule = de_GatingRule(data.GatingRule, context); - } + const doc = take(data, { + AssertionRule: _json, + GatingRule: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2115,16 +2101,15 @@ const de_UpdateSafetyRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2134,9 +2119,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2150,9 +2136,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2169,9 +2156,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2188,9 +2176,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2207,9 +2196,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2223,9 +2213,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2239,9 +2230,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2249,323 +2241,51 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__stringMin1Max256PatternAZaZ09 - */ -const se___listOf__stringMin1Max256PatternAZaZ09 = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__stringMin1Max256PatternAZaZ09 omitted. -/** - * serializeAws_restJson1__mapOf__stringMin0Max256PatternS - */ -const se___mapOf__stringMin0Max256PatternS = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se___mapOf__stringMin0Max256PatternS omitted. -/** - * serializeAws_restJson1AssertionRuleUpdate - */ -const se_AssertionRuleUpdate = (input: AssertionRuleUpdate, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SafetyRuleArn != null && { SafetyRuleArn: input.SafetyRuleArn }), - ...(input.WaitPeriodMs != null && { WaitPeriodMs: input.WaitPeriodMs }), - }; -}; +// se_AssertionRuleUpdate omitted. -/** - * serializeAws_restJson1GatingRuleUpdate - */ -const se_GatingRuleUpdate = (input: GatingRuleUpdate, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SafetyRuleArn != null && { SafetyRuleArn: input.SafetyRuleArn }), - ...(input.WaitPeriodMs != null && { WaitPeriodMs: input.WaitPeriodMs }), - }; -}; +// se_GatingRuleUpdate omitted. -/** - * serializeAws_restJson1NewAssertionRule - */ -const se_NewAssertionRule = (input: NewAssertionRule, context: __SerdeContext): any => { - return { - ...(input.AssertedControls != null && { - AssertedControls: se___listOf__stringMin1Max256PatternAZaZ09(input.AssertedControls, context), - }), - ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RuleConfig != null && { RuleConfig: se_RuleConfig(input.RuleConfig, context) }), - ...(input.WaitPeriodMs != null && { WaitPeriodMs: input.WaitPeriodMs }), - }; -}; +// se_NewAssertionRule omitted. -/** - * serializeAws_restJson1NewGatingRule - */ -const se_NewGatingRule = (input: NewGatingRule, context: __SerdeContext): any => { - return { - ...(input.ControlPanelArn != null && { ControlPanelArn: input.ControlPanelArn }), - ...(input.GatingControls != null && { - GatingControls: se___listOf__stringMin1Max256PatternAZaZ09(input.GatingControls, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RuleConfig != null && { RuleConfig: se_RuleConfig(input.RuleConfig, context) }), - ...(input.TargetControls != null && { - TargetControls: se___listOf__stringMin1Max256PatternAZaZ09(input.TargetControls, context), - }), - ...(input.WaitPeriodMs != null && { WaitPeriodMs: input.WaitPeriodMs }), - }; -}; +// se_NewGatingRule omitted. -/** - * serializeAws_restJson1RuleConfig - */ -const se_RuleConfig = (input: RuleConfig, context: __SerdeContext): any => { - return { - ...(input.Inverted != null && { Inverted: input.Inverted }), - ...(input.Threshold != null && { Threshold: input.Threshold }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_RuleConfig omitted. -/** - * deserializeAws_restJson1__listOf__stringMax36PatternS - */ -const de___listOf__stringMax36PatternS = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__stringMax36PatternS omitted. -/** - * deserializeAws_restJson1__listOf__stringMin1Max256PatternAZaZ09 - */ -const de___listOf__stringMin1Max256PatternAZaZ09 = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__stringMin1Max256PatternAZaZ09 omitted. -/** - * deserializeAws_restJson1__listOfCluster - */ -const de___listOfCluster = (output: any, context: __SerdeContext): Cluster[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Cluster(entry, context); - }); - return retVal; -}; +// de___listOfCluster omitted. -/** - * deserializeAws_restJson1__listOfClusterEndpoint - */ -const de___listOfClusterEndpoint = (output: any, context: __SerdeContext): ClusterEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterEndpoint(entry, context); - }); - return retVal; -}; +// de___listOfClusterEndpoint omitted. -/** - * deserializeAws_restJson1__listOfControlPanel - */ -const de___listOfControlPanel = (output: any, context: __SerdeContext): ControlPanel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ControlPanel(entry, context); - }); - return retVal; -}; +// de___listOfControlPanel omitted. -/** - * deserializeAws_restJson1__listOfRoutingControl - */ -const de___listOfRoutingControl = (output: any, context: __SerdeContext): RoutingControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoutingControl(entry, context); - }); - return retVal; -}; +// de___listOfRoutingControl omitted. -/** - * deserializeAws_restJson1__listOfRule - */ -const de___listOfRule = (output: any, context: __SerdeContext): Rule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Rule(entry, context); - }); - return retVal; -}; +// de___listOfRule omitted. -/** - * deserializeAws_restJson1__mapOf__stringMin0Max256PatternS - */ -const de___mapOf__stringMin0Max256PatternS = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de___mapOf__stringMin0Max256PatternS omitted. -/** - * deserializeAws_restJson1AssertionRule - */ -const de_AssertionRule = (output: any, context: __SerdeContext): AssertionRule => { - return { - AssertedControls: - output.AssertedControls != null - ? de___listOf__stringMin1Max256PatternAZaZ09(output.AssertedControls, context) - : undefined, - ControlPanelArn: __expectString(output.ControlPanelArn), - Name: __expectString(output.Name), - RuleConfig: output.RuleConfig != null ? de_RuleConfig(output.RuleConfig, context) : undefined, - SafetyRuleArn: __expectString(output.SafetyRuleArn), - Status: __expectString(output.Status), - WaitPeriodMs: __expectInt32(output.WaitPeriodMs), - } as any; -}; +// de_AssertionRule omitted. -/** - * deserializeAws_restJson1Cluster - */ -const de_Cluster = (output: any, context: __SerdeContext): Cluster => { - return { - ClusterArn: __expectString(output.ClusterArn), - ClusterEndpoints: - output.ClusterEndpoints != null ? de___listOfClusterEndpoint(output.ClusterEndpoints, context) : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_Cluster omitted. -/** - * deserializeAws_restJson1ClusterEndpoint - */ -const de_ClusterEndpoint = (output: any, context: __SerdeContext): ClusterEndpoint => { - return { - Endpoint: __expectString(output.Endpoint), - Region: __expectString(output.Region), - } as any; -}; +// de_ClusterEndpoint omitted. -/** - * deserializeAws_restJson1ControlPanel - */ -const de_ControlPanel = (output: any, context: __SerdeContext): ControlPanel => { - return { - ClusterArn: __expectString(output.ClusterArn), - ControlPanelArn: __expectString(output.ControlPanelArn), - DefaultControlPanel: __expectBoolean(output.DefaultControlPanel), - Name: __expectString(output.Name), - RoutingControlCount: __expectInt32(output.RoutingControlCount), - Status: __expectString(output.Status), - } as any; -}; +// de_ControlPanel omitted. -/** - * deserializeAws_restJson1GatingRule - */ -const de_GatingRule = (output: any, context: __SerdeContext): GatingRule => { - return { - ControlPanelArn: __expectString(output.ControlPanelArn), - GatingControls: - output.GatingControls != null - ? de___listOf__stringMin1Max256PatternAZaZ09(output.GatingControls, context) - : undefined, - Name: __expectString(output.Name), - RuleConfig: output.RuleConfig != null ? de_RuleConfig(output.RuleConfig, context) : undefined, - SafetyRuleArn: __expectString(output.SafetyRuleArn), - Status: __expectString(output.Status), - TargetControls: - output.TargetControls != null - ? de___listOf__stringMin1Max256PatternAZaZ09(output.TargetControls, context) - : undefined, - WaitPeriodMs: __expectInt32(output.WaitPeriodMs), - } as any; -}; +// de_GatingRule omitted. -/** - * deserializeAws_restJson1RoutingControl - */ -const de_RoutingControl = (output: any, context: __SerdeContext): RoutingControl => { - return { - ControlPanelArn: __expectString(output.ControlPanelArn), - Name: __expectString(output.Name), - RoutingControlArn: __expectString(output.RoutingControlArn), - Status: __expectString(output.Status), - } as any; -}; +// de_RoutingControl omitted. -/** - * deserializeAws_restJson1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - ASSERTION: output.ASSERTION != null ? de_AssertionRule(output.ASSERTION, context) : undefined, - GATING: output.GATING != null ? de_GatingRule(output.GATING, context) : undefined, - } as any; -}; +// de_Rule omitted. -/** - * deserializeAws_restJson1RuleConfig - */ -const de_RuleConfig = (output: any, context: __SerdeContext): RuleConfig => { - return { - Inverted: __expectBoolean(output.Inverted), - Threshold: __expectInt32(output.Threshold), - Type: __expectString(output.Type), - } as any; -}; +// de_RuleConfig omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-route53-recovery-readiness/src/protocols/Aws_restJson1.ts b/clients/client-route53-recovery-readiness/src/protocols/Aws_restJson1.ts index 3ca565f844b0..cf107aa9c942 100644 --- a/clients/client-route53-recovery-readiness/src/protocols/Aws_restJson1.ts +++ b/clients/client-route53-recovery-readiness/src/protocols/Aws_restJson1.ts @@ -1,15 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -135,11 +137,13 @@ export const se_CreateCellCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells"; let body: any; - body = JSON.stringify({ - ...(input.CellName != null && { cellName: input.CellName }), - ...(input.Cells != null && { cells: se___listOf__string(input.Cells, context) }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + cellName: [, , `CellName`], + cells: [, (_) => _json(_), `Cells`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -165,9 +169,11 @@ export const se_CreateCrossAccountAuthorizationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/crossaccountauthorizations"; let body: any; - body = JSON.stringify({ - ...(input.CrossAccountAuthorization != null && { crossAccountAuthorization: input.CrossAccountAuthorization }), - }); + body = JSON.stringify( + take(input, { + crossAccountAuthorization: [, , `CrossAccountAuthorization`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -192,11 +198,13 @@ export const se_CreateReadinessCheckCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/readinesschecks"; let body: any; - body = JSON.stringify({ - ...(input.ReadinessCheckName != null && { readinessCheckName: input.ReadinessCheckName }), - ...(input.ResourceSetName != null && { resourceSetName: input.ResourceSetName }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + readinessCheckName: [, , `ReadinessCheckName`], + resourceSetName: [, , `ResourceSetName`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -221,11 +229,13 @@ export const se_CreateRecoveryGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/recoverygroups"; let body: any; - body = JSON.stringify({ - ...(input.Cells != null && { cells: se___listOf__string(input.Cells, context) }), - ...(input.RecoveryGroupName != null && { recoveryGroupName: input.RecoveryGroupName }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + cells: [, (_) => _json(_), `Cells`], + recoveryGroupName: [, , `RecoveryGroupName`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -250,12 +260,14 @@ export const se_CreateResourceSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcesets"; let body: any; - body = JSON.stringify({ - ...(input.ResourceSetName != null && { resourceSetName: input.ResourceSetName }), - ...(input.ResourceSetType != null && { resourceSetType: input.ResourceSetType }), - ...(input.Resources != null && { resources: se___listOfResource(input.Resources, context) }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + resourceSetName: [, , `ResourceSetName`], + resourceSetType: [, , `ResourceSetType`], + resources: [, (_) => se___listOfResource(_, context), `Resources`], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -917,9 +929,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -975,9 +989,11 @@ export const se_UpdateCellCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cells/{CellName}"; resolvedPath = __resolvedPath(resolvedPath, input, "CellName", () => input.CellName!, "{CellName}", false); let body: any; - body = JSON.stringify({ - ...(input.Cells != null && { cells: se___listOf__string(input.Cells, context) }), - }); + body = JSON.stringify( + take(input, { + cells: [, (_) => _json(_), `Cells`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1011,9 +1027,11 @@ export const se_UpdateReadinessCheckCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceSetName != null && { resourceSetName: input.ResourceSetName }), - }); + body = JSON.stringify( + take(input, { + resourceSetName: [, , `ResourceSetName`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1047,9 +1065,11 @@ export const se_UpdateRecoveryGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Cells != null && { cells: se___listOf__string(input.Cells, context) }), - }); + body = JSON.stringify( + take(input, { + cells: [, (_) => _json(_), `Cells`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1083,10 +1103,12 @@ export const se_UpdateResourceSetCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceSetType != null && { resourceSetType: input.ResourceSetType }), - ...(input.Resources != null && { resources: se___listOfResource(input.Resources, context) }), - }); + body = JSON.stringify( + take(input, { + resourceSetType: [, , `ResourceSetType`], + resources: [, (_) => se___listOfResource(_, context), `Resources`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1112,21 +1134,14 @@ export const de_CreateCellCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cellArn != null) { - contents.CellArn = __expectString(data.cellArn); - } - if (data.cellName != null) { - contents.CellName = __expectString(data.cellName); - } - if (data.cells != null) { - contents.Cells = de___listOf__string(data.cells, context); - } - if (data.parentReadinessScopes != null) { - contents.ParentReadinessScopes = de___listOf__string(data.parentReadinessScopes, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + CellArn: [, __expectString, `cellArn`], + CellName: [, __expectString, `cellName`], + Cells: [, _json, `cells`], + ParentReadinessScopes: [, _json, `parentReadinessScopes`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1160,10 +1175,9 @@ const de_CreateCellCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1183,9 +1197,10 @@ export const de_CreateCrossAccountAuthorizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crossAccountAuthorization != null) { - contents.CrossAccountAuthorization = __expectString(data.crossAccountAuthorization); - } + const doc = take(data, { + CrossAccountAuthorization: [, __expectString, `crossAccountAuthorization`], + }); + Object.assign(contents, doc); return contents; }; @@ -1219,10 +1234,9 @@ const de_CreateCrossAccountAuthorizationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1242,18 +1256,13 @@ export const de_CreateReadinessCheckCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.readinessCheckArn != null) { - contents.ReadinessCheckArn = __expectString(data.readinessCheckArn); - } - if (data.readinessCheckName != null) { - contents.ReadinessCheckName = __expectString(data.readinessCheckName); - } - if (data.resourceSet != null) { - contents.ResourceSet = __expectString(data.resourceSet); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ReadinessCheckArn: [, __expectString, `readinessCheckArn`], + ReadinessCheckName: [, __expectString, `readinessCheckName`], + ResourceSet: [, __expectString, `resourceSet`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1287,10 +1296,9 @@ const de_CreateReadinessCheckCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1310,18 +1318,13 @@ export const de_CreateRecoveryGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cells != null) { - contents.Cells = de___listOf__string(data.cells, context); - } - if (data.recoveryGroupArn != null) { - contents.RecoveryGroupArn = __expectString(data.recoveryGroupArn); - } - if (data.recoveryGroupName != null) { - contents.RecoveryGroupName = __expectString(data.recoveryGroupName); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Cells: [, _json, `cells`], + RecoveryGroupArn: [, __expectString, `recoveryGroupArn`], + RecoveryGroupName: [, __expectString, `recoveryGroupName`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1355,10 +1358,9 @@ const de_CreateRecoveryGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1378,21 +1380,14 @@ export const de_CreateResourceSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceSetArn != null) { - contents.ResourceSetArn = __expectString(data.resourceSetArn); - } - if (data.resourceSetName != null) { - contents.ResourceSetName = __expectString(data.resourceSetName); - } - if (data.resourceSetType != null) { - contents.ResourceSetType = __expectString(data.resourceSetType); - } - if (data.resources != null) { - contents.Resources = de___listOfResource(data.resources, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ResourceSetArn: [, __expectString, `resourceSetArn`], + ResourceSetName: [, __expectString, `resourceSetName`], + ResourceSetType: [, __expectString, `resourceSetType`], + Resources: [, (_) => de___listOfResource(_, context), `resources`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1426,10 +1421,9 @@ const de_CreateResourceSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1482,10 +1476,9 @@ const de_DeleteCellCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1535,10 +1528,9 @@ const de_DeleteCrossAccountAuthorizationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1591,10 +1583,9 @@ const de_DeleteReadinessCheckCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1647,10 +1638,9 @@ const de_DeleteRecoveryGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1703,10 +1693,9 @@ const de_DeleteResourceSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1726,15 +1715,12 @@ export const de_GetArchitectureRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.lastAuditTimestamp != null) { - contents.LastAuditTimestamp = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastAuditTimestamp)); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.recommendations != null) { - contents.Recommendations = de___listOfRecommendation(data.recommendations, context); - } + const doc = take(data, { + LastAuditTimestamp: [, (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastAuditTimestamp`], + NextToken: [, __expectString, `nextToken`], + Recommendations: [, (_) => de___listOfRecommendation(_, context), `recommendations`], + }); + Object.assign(contents, doc); return contents; }; @@ -1768,10 +1754,9 @@ const de_GetArchitectureRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1791,21 +1776,14 @@ export const de_GetCellCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cellArn != null) { - contents.CellArn = __expectString(data.cellArn); - } - if (data.cellName != null) { - contents.CellName = __expectString(data.cellName); - } - if (data.cells != null) { - contents.Cells = de___listOf__string(data.cells, context); - } - if (data.parentReadinessScopes != null) { - contents.ParentReadinessScopes = de___listOf__string(data.parentReadinessScopes, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + CellArn: [, __expectString, `cellArn`], + CellName: [, __expectString, `cellName`], + Cells: [, _json, `cells`], + ParentReadinessScopes: [, _json, `parentReadinessScopes`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1839,10 +1817,9 @@ const de_GetCellCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1862,15 +1839,12 @@ export const de_GetCellReadinessSummaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.readiness != null) { - contents.Readiness = __expectString(data.readiness); - } - if (data.readinessChecks != null) { - contents.ReadinessChecks = de___listOfReadinessCheckSummary(data.readinessChecks, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Readiness: [, __expectString, `readiness`], + ReadinessChecks: [, (_) => de___listOfReadinessCheckSummary(_, context), `readinessChecks`], + }); + Object.assign(contents, doc); return contents; }; @@ -1904,10 +1878,9 @@ const de_GetCellReadinessSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1927,18 +1900,13 @@ export const de_GetReadinessCheckCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.readinessCheckArn != null) { - contents.ReadinessCheckArn = __expectString(data.readinessCheckArn); - } - if (data.readinessCheckName != null) { - contents.ReadinessCheckName = __expectString(data.readinessCheckName); - } - if (data.resourceSet != null) { - contents.ResourceSet = __expectString(data.resourceSet); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ReadinessCheckArn: [, __expectString, `readinessCheckArn`], + ReadinessCheckName: [, __expectString, `readinessCheckName`], + ResourceSet: [, __expectString, `resourceSet`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1972,10 +1940,9 @@ const de_GetReadinessCheckCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1995,15 +1962,12 @@ export const de_GetReadinessCheckResourceStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.readiness != null) { - contents.Readiness = __expectString(data.readiness); - } - if (data.rules != null) { - contents.Rules = de___listOfRuleResult(data.rules, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Readiness: [, __expectString, `readiness`], + Rules: [, (_) => de___listOfRuleResult(_, context), `rules`], + }); + Object.assign(contents, doc); return contents; }; @@ -2037,10 +2001,9 @@ const de_GetReadinessCheckResourceStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2060,18 +2023,13 @@ export const de_GetReadinessCheckStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.messages != null) { - contents.Messages = de___listOfMessage(data.messages, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.readiness != null) { - contents.Readiness = __expectString(data.readiness); - } - if (data.resources != null) { - contents.Resources = de___listOfResourceResult(data.resources, context); - } + const doc = take(data, { + Messages: [, (_) => de___listOfMessage(_, context), `messages`], + NextToken: [, __expectString, `nextToken`], + Readiness: [, __expectString, `readiness`], + Resources: [, (_) => de___listOfResourceResult(_, context), `resources`], + }); + Object.assign(contents, doc); return contents; }; @@ -2105,10 +2063,9 @@ const de_GetReadinessCheckStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2128,18 +2085,13 @@ export const de_GetRecoveryGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cells != null) { - contents.Cells = de___listOf__string(data.cells, context); - } - if (data.recoveryGroupArn != null) { - contents.RecoveryGroupArn = __expectString(data.recoveryGroupArn); - } - if (data.recoveryGroupName != null) { - contents.RecoveryGroupName = __expectString(data.recoveryGroupName); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Cells: [, _json, `cells`], + RecoveryGroupArn: [, __expectString, `recoveryGroupArn`], + RecoveryGroupName: [, __expectString, `recoveryGroupName`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2173,10 +2125,9 @@ const de_GetRecoveryGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2196,15 +2147,12 @@ export const de_GetRecoveryGroupReadinessSummaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.readiness != null) { - contents.Readiness = __expectString(data.readiness); - } - if (data.readinessChecks != null) { - contents.ReadinessChecks = de___listOfReadinessCheckSummary(data.readinessChecks, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Readiness: [, __expectString, `readiness`], + ReadinessChecks: [, (_) => de___listOfReadinessCheckSummary(_, context), `readinessChecks`], + }); + Object.assign(contents, doc); return contents; }; @@ -2238,10 +2186,9 @@ const de_GetRecoveryGroupReadinessSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,21 +2208,14 @@ export const de_GetResourceSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceSetArn != null) { - contents.ResourceSetArn = __expectString(data.resourceSetArn); - } - if (data.resourceSetName != null) { - contents.ResourceSetName = __expectString(data.resourceSetName); - } - if (data.resourceSetType != null) { - contents.ResourceSetType = __expectString(data.resourceSetType); - } - if (data.resources != null) { - contents.Resources = de___listOfResource(data.resources, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ResourceSetArn: [, __expectString, `resourceSetArn`], + ResourceSetName: [, __expectString, `resourceSetName`], + ResourceSetType: [, __expectString, `resourceSetType`], + Resources: [, (_) => de___listOfResource(_, context), `resources`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2309,10 +2249,9 @@ const de_GetResourceSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2332,12 +2271,11 @@ export const de_ListCellsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cells != null) { - contents.Cells = de___listOfCellOutput(data.cells, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Cells: [, (_) => de___listOfCellOutput(_, context), `cells`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2368,10 +2306,9 @@ const de_ListCellsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2391,15 +2328,11 @@ export const de_ListCrossAccountAuthorizationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.crossAccountAuthorizations != null) { - contents.CrossAccountAuthorizations = de___listOfCrossAccountAuthorization( - data.crossAccountAuthorizations, - context - ); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + CrossAccountAuthorizations: [, _json, `crossAccountAuthorizations`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -2430,10 +2363,9 @@ const de_ListCrossAccountAuthorizationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2453,12 +2385,11 @@ export const de_ListReadinessChecksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.readinessChecks != null) { - contents.ReadinessChecks = de___listOfReadinessCheckOutput(data.readinessChecks, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + ReadinessChecks: [, (_) => de___listOfReadinessCheckOutput(_, context), `readinessChecks`], + }); + Object.assign(contents, doc); return contents; }; @@ -2489,10 +2420,9 @@ const de_ListReadinessChecksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2512,12 +2442,11 @@ export const de_ListRecoveryGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.recoveryGroups != null) { - contents.RecoveryGroups = de___listOfRecoveryGroupOutput(data.recoveryGroups, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + RecoveryGroups: [, (_) => de___listOfRecoveryGroupOutput(_, context), `recoveryGroups`], + }); + Object.assign(contents, doc); return contents; }; @@ -2548,10 +2477,9 @@ const de_ListRecoveryGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2571,12 +2499,11 @@ export const de_ListResourceSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.resourceSets != null) { - contents.ResourceSets = de___listOfResourceSetOutput(data.resourceSets, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + ResourceSets: [, (_) => de___listOfResourceSetOutput(_, context), `resourceSets`], + }); + Object.assign(contents, doc); return contents; }; @@ -2607,10 +2534,9 @@ const de_ListResourceSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2630,12 +2556,11 @@ export const de_ListRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.rules != null) { - contents.Rules = de___listOfListRulesOutput(data.rules, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Rules: [, (_) => de___listOfListRulesOutput(_, context), `rules`], + }); + Object.assign(contents, doc); return contents; }; @@ -2666,10 +2591,9 @@ const de_ListRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2689,9 +2613,10 @@ export const de_ListTagsForResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2719,10 +2644,9 @@ const de_ListTagsForResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2769,10 +2693,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2819,10 +2742,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2842,21 +2764,14 @@ export const de_UpdateCellCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cellArn != null) { - contents.CellArn = __expectString(data.cellArn); - } - if (data.cellName != null) { - contents.CellName = __expectString(data.cellName); - } - if (data.cells != null) { - contents.Cells = de___listOf__string(data.cells, context); - } - if (data.parentReadinessScopes != null) { - contents.ParentReadinessScopes = de___listOf__string(data.parentReadinessScopes, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + CellArn: [, __expectString, `cellArn`], + CellName: [, __expectString, `cellName`], + Cells: [, _json, `cells`], + ParentReadinessScopes: [, _json, `parentReadinessScopes`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2890,10 +2805,9 @@ const de_UpdateCellCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2913,18 +2827,13 @@ export const de_UpdateReadinessCheckCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.readinessCheckArn != null) { - contents.ReadinessCheckArn = __expectString(data.readinessCheckArn); - } - if (data.readinessCheckName != null) { - contents.ReadinessCheckName = __expectString(data.readinessCheckName); - } - if (data.resourceSet != null) { - contents.ResourceSet = __expectString(data.resourceSet); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ReadinessCheckArn: [, __expectString, `readinessCheckArn`], + ReadinessCheckName: [, __expectString, `readinessCheckName`], + ResourceSet: [, __expectString, `resourceSet`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2958,10 +2867,9 @@ const de_UpdateReadinessCheckCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,18 +2889,13 @@ export const de_UpdateRecoveryGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.cells != null) { - contents.Cells = de___listOf__string(data.cells, context); - } - if (data.recoveryGroupArn != null) { - contents.RecoveryGroupArn = __expectString(data.recoveryGroupArn); - } - if (data.recoveryGroupName != null) { - contents.RecoveryGroupName = __expectString(data.recoveryGroupName); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Cells: [, _json, `cells`], + RecoveryGroupArn: [, __expectString, `recoveryGroupArn`], + RecoveryGroupName: [, __expectString, `recoveryGroupName`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3026,10 +2929,9 @@ const de_UpdateRecoveryGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3049,21 +2951,14 @@ export const de_UpdateResourceSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceSetArn != null) { - contents.ResourceSetArn = __expectString(data.resourceSetArn); - } - if (data.resourceSetName != null) { - contents.ResourceSetName = __expectString(data.resourceSetName); - } - if (data.resourceSetType != null) { - contents.ResourceSetType = __expectString(data.resourceSetType); - } - if (data.resources != null) { - contents.Resources = de___listOfResource(data.resources, context); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + ResourceSetArn: [, __expectString, `resourceSetArn`], + ResourceSetName: [, __expectString, `resourceSetName`], + ResourceSetType: [, __expectString, `resourceSetType`], + Resources: [, (_) => de___listOfResource(_, context), `resources`], + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3097,16 +2992,15 @@ const de_UpdateResourceSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3116,9 +3010,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3132,9 +3027,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3151,9 +3047,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3170,9 +3067,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3186,9 +3084,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3202,9 +3101,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3212,16 +3112,7 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfResource @@ -3238,85 +3129,59 @@ const se___listOfResource = (input: Resource[], context: __SerdeContext): any => * serializeAws_restJson1DNSTargetResource */ const se_DNSTargetResource = (input: DNSTargetResource, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { domainName: input.DomainName }), - ...(input.HostedZoneArn != null && { hostedZoneArn: input.HostedZoneArn }), - ...(input.RecordSetId != null && { recordSetId: input.RecordSetId }), - ...(input.RecordType != null && { recordType: input.RecordType }), - ...(input.TargetResource != null && { targetResource: se_TargetResource(input.TargetResource, context) }), - }; + return take(input, { + domainName: [, , `DomainName`], + hostedZoneArn: [, , `HostedZoneArn`], + recordSetId: [, , `RecordSetId`], + recordType: [, , `RecordType`], + targetResource: [, (_) => se_TargetResource(_, context), `TargetResource`], + }); }; /** * serializeAws_restJson1NLBResource */ const se_NLBResource = (input: NLBResource, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { arn: input.Arn }), - }; + return take(input, { + arn: [, , `Arn`], + }); }; /** * serializeAws_restJson1R53ResourceRecord */ const se_R53ResourceRecord = (input: R53ResourceRecord, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { domainName: input.DomainName }), - ...(input.RecordSetId != null && { recordSetId: input.RecordSetId }), - }; + return take(input, { + domainName: [, , `DomainName`], + recordSetId: [, , `RecordSetId`], + }); }; /** * serializeAws_restJson1Resource */ const se_Resource = (input: Resource, context: __SerdeContext): any => { - return { - ...(input.ComponentId != null && { componentId: input.ComponentId }), - ...(input.DnsTargetResource != null && { - dnsTargetResource: se_DNSTargetResource(input.DnsTargetResource, context), - }), - ...(input.ReadinessScopes != null && { readinessScopes: se___listOf__string(input.ReadinessScopes, context) }), - ...(input.ResourceArn != null && { resourceArn: input.ResourceArn }), - }; + return take(input, { + componentId: [, , `ComponentId`], + dnsTargetResource: [, (_) => se_DNSTargetResource(_, context), `DnsTargetResource`], + readinessScopes: [, _json, `ReadinessScopes`], + resourceArn: [, , `ResourceArn`], + }); }; -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. /** * serializeAws_restJson1TargetResource */ const se_TargetResource = (input: TargetResource, context: __SerdeContext): any => { - return { - ...(input.NLBResource != null && { nLBResource: se_NLBResource(input.NLBResource, context) }), - ...(input.R53Resource != null && { r53Resource: se_R53ResourceRecord(input.R53Resource, context) }), - }; + return take(input, { + nLBResource: [, (_) => se_NLBResource(_, context), `NLBResource`], + r53Resource: [, (_) => se_R53ResourceRecord(_, context), `R53Resource`], + }); }; -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfCellOutput @@ -3325,28 +3190,12 @@ const de___listOfCellOutput = (output: any, context: __SerdeContext): CellOutput const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CellOutput(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfCrossAccountAuthorization - */ -const de___listOfCrossAccountAuthorization = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfCrossAccountAuthorization omitted. /** * deserializeAws_restJson1__listOfListRulesOutput @@ -3355,9 +3204,6 @@ const de___listOfListRulesOutput = (output: any, context: __SerdeContext): ListR const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListRulesOutput(entry, context); }); return retVal; @@ -3370,9 +3216,6 @@ const de___listOfMessage = (output: any, context: __SerdeContext): Message[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Message(entry, context); }); return retVal; @@ -3385,9 +3228,6 @@ const de___listOfReadinessCheckOutput = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReadinessCheckOutput(entry, context); }); return retVal; @@ -3400,9 +3240,6 @@ const de___listOfReadinessCheckSummary = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReadinessCheckSummary(entry, context); }); return retVal; @@ -3415,9 +3252,6 @@ const de___listOfRecommendation = (output: any, context: __SerdeContext): Recomm const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Recommendation(entry, context); }); return retVal; @@ -3430,9 +3264,6 @@ const de___listOfRecoveryGroupOutput = (output: any, context: __SerdeContext): R const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecoveryGroupOutput(entry, context); }); return retVal; @@ -3445,9 +3276,6 @@ const de___listOfResource = (output: any, context: __SerdeContext): Resource[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Resource(entry, context); }); return retVal; @@ -3460,9 +3288,6 @@ const de___listOfResourceResult = (output: any, context: __SerdeContext): Resour const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceResult(entry, context); }); return retVal; @@ -3475,9 +3300,6 @@ const de___listOfResourceSetOutput = (output: any, context: __SerdeContext): Res const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourceSetOutput(entry, context); }); return retVal; @@ -3490,9 +3312,6 @@ const de___listOfRuleResult = (output: any, context: __SerdeContext): RuleResult const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RuleResult(entry, context); }); return retVal; @@ -3502,188 +3321,169 @@ const de___listOfRuleResult = (output: any, context: __SerdeContext): RuleResult * deserializeAws_restJson1CellOutput */ const de_CellOutput = (output: any, context: __SerdeContext): CellOutput => { - return { - CellArn: __expectString(output.cellArn), - CellName: __expectString(output.cellName), - Cells: output.cells != null ? de___listOf__string(output.cells, context) : undefined, - ParentReadinessScopes: - output.parentReadinessScopes != null ? de___listOf__string(output.parentReadinessScopes, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + CellArn: [, __expectString, `cellArn`], + CellName: [, __expectString, `cellName`], + Cells: [, _json, `cells`], + ParentReadinessScopes: [, _json, `parentReadinessScopes`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1DNSTargetResource */ const de_DNSTargetResource = (output: any, context: __SerdeContext): DNSTargetResource => { - return { - DomainName: __expectString(output.domainName), - HostedZoneArn: __expectString(output.hostedZoneArn), - RecordSetId: __expectString(output.recordSetId), - RecordType: __expectString(output.recordType), - TargetResource: output.targetResource != null ? de_TargetResource(output.targetResource, context) : undefined, - } as any; + return take(output, { + DomainName: [, __expectString, `domainName`], + HostedZoneArn: [, __expectString, `hostedZoneArn`], + RecordSetId: [, __expectString, `recordSetId`], + RecordType: [, __expectString, `recordType`], + TargetResource: (_) => [, de_TargetResource(_, context), `targetResource`], + }) as any; }; /** * deserializeAws_restJson1ListRulesOutput */ const de_ListRulesOutput = (output: any, context: __SerdeContext): ListRulesOutput => { - return { - ResourceType: __expectString(output.resourceType), - RuleDescription: __expectString(output.ruleDescription), - RuleId: __expectString(output.ruleId), - } as any; + return take(output, { + ResourceType: [, __expectString, `resourceType`], + RuleDescription: [, __expectString, `ruleDescription`], + RuleId: [, __expectString, `ruleId`], + }) as any; }; /** * deserializeAws_restJson1Message */ const de_Message = (output: any, context: __SerdeContext): Message => { - return { - MessageText: __expectString(output.messageText), - } as any; + return take(output, { + MessageText: [, __expectString, `messageText`], + }) as any; }; /** * deserializeAws_restJson1NLBResource */ const de_NLBResource = (output: any, context: __SerdeContext): NLBResource => { - return { - Arn: __expectString(output.arn), - } as any; + return take(output, { + Arn: [, __expectString, `arn`], + }) as any; }; /** * deserializeAws_restJson1R53ResourceRecord */ const de_R53ResourceRecord = (output: any, context: __SerdeContext): R53ResourceRecord => { - return { - DomainName: __expectString(output.domainName), - RecordSetId: __expectString(output.recordSetId), - } as any; + return take(output, { + DomainName: [, __expectString, `domainName`], + RecordSetId: [, __expectString, `recordSetId`], + }) as any; }; /** * deserializeAws_restJson1ReadinessCheckOutput */ const de_ReadinessCheckOutput = (output: any, context: __SerdeContext): ReadinessCheckOutput => { - return { - ReadinessCheckArn: __expectString(output.readinessCheckArn), - ReadinessCheckName: __expectString(output.readinessCheckName), - ResourceSet: __expectString(output.resourceSet), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + ReadinessCheckArn: [, __expectString, `readinessCheckArn`], + ReadinessCheckName: [, __expectString, `readinessCheckName`], + ResourceSet: [, __expectString, `resourceSet`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1ReadinessCheckSummary */ const de_ReadinessCheckSummary = (output: any, context: __SerdeContext): ReadinessCheckSummary => { - return { - Readiness: __expectString(output.readiness), - ReadinessCheckName: __expectString(output.readinessCheckName), - } as any; + return take(output, { + Readiness: [, __expectString, `readiness`], + ReadinessCheckName: [, __expectString, `readinessCheckName`], + }) as any; }; /** * deserializeAws_restJson1Recommendation */ const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - RecommendationText: __expectString(output.recommendationText), - } as any; + return take(output, { + RecommendationText: [, __expectString, `recommendationText`], + }) as any; }; /** * deserializeAws_restJson1RecoveryGroupOutput */ const de_RecoveryGroupOutput = (output: any, context: __SerdeContext): RecoveryGroupOutput => { - return { - Cells: output.cells != null ? de___listOf__string(output.cells, context) : undefined, - RecoveryGroupArn: __expectString(output.recoveryGroupArn), - RecoveryGroupName: __expectString(output.recoveryGroupName), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + Cells: [, _json, `cells`], + RecoveryGroupArn: [, __expectString, `recoveryGroupArn`], + RecoveryGroupName: [, __expectString, `recoveryGroupName`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - ComponentId: __expectString(output.componentId), - DnsTargetResource: - output.dnsTargetResource != null ? de_DNSTargetResource(output.dnsTargetResource, context) : undefined, - ReadinessScopes: output.readinessScopes != null ? de___listOf__string(output.readinessScopes, context) : undefined, - ResourceArn: __expectString(output.resourceArn), - } as any; + return take(output, { + ComponentId: [, __expectString, `componentId`], + DnsTargetResource: (_) => [, de_DNSTargetResource(_, context), `dnsTargetResource`], + ReadinessScopes: [, _json, `readinessScopes`], + ResourceArn: [, __expectString, `resourceArn`], + }) as any; }; /** * deserializeAws_restJson1ResourceResult */ const de_ResourceResult = (output: any, context: __SerdeContext): ResourceResult => { - return { - ComponentId: __expectString(output.componentId), - LastCheckedTimestamp: - output.lastCheckedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastCheckedTimestamp)) - : undefined, - Readiness: __expectString(output.readiness), - ResourceArn: __expectString(output.resourceArn), - } as any; + return take(output, { + ComponentId: [, __expectString, `componentId`], + LastCheckedTimestamp: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastCheckedTimestamp`], + Readiness: [, __expectString, `readiness`], + ResourceArn: [, __expectString, `resourceArn`], + }) as any; }; /** * deserializeAws_restJson1ResourceSetOutput */ const de_ResourceSetOutput = (output: any, context: __SerdeContext): ResourceSetOutput => { - return { - ResourceSetArn: __expectString(output.resourceSetArn), - ResourceSetName: __expectString(output.resourceSetName), - ResourceSetType: __expectString(output.resourceSetType), - Resources: output.resources != null ? de___listOfResource(output.resources, context) : undefined, - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + ResourceSetArn: [, __expectString, `resourceSetArn`], + ResourceSetName: [, __expectString, `resourceSetName`], + ResourceSetType: [, __expectString, `resourceSetType`], + Resources: (_) => [, de___listOfResource(_, context), `resources`], + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1RuleResult */ const de_RuleResult = (output: any, context: __SerdeContext): RuleResult => { - return { - LastCheckedTimestamp: - output.lastCheckedTimestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastCheckedTimestamp)) - : undefined, - Messages: output.messages != null ? de___listOfMessage(output.messages, context) : undefined, - Readiness: __expectString(output.readiness), - RuleId: __expectString(output.ruleId), - } as any; + return take(output, { + LastCheckedTimestamp: (_) => [, __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), `lastCheckedTimestamp`], + Messages: (_) => [, de___listOfMessage(_, context), `messages`], + Readiness: [, __expectString, `readiness`], + RuleId: [, __expectString, `ruleId`], + }) as any; }; -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. /** * deserializeAws_restJson1TargetResource */ const de_TargetResource = (output: any, context: __SerdeContext): TargetResource => { - return { - NLBResource: output.nLBResource != null ? de_NLBResource(output.nLBResource, context) : undefined, - R53Resource: output.r53Resource != null ? de_R53ResourceRecord(output.r53Resource, context) : undefined, - } as any; + return take(output, { + NLBResource: (_) => [, de_NLBResource(_, context), `nLBResource`], + R53Resource: (_) => [, de_R53ResourceRecord(_, context), `r53Resource`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-route53resolver/src/protocols/Aws_json1_1.ts b/clients/client-route53resolver/src/protocols/Aws_json1_1.ts index aa5f397d6b5d..30aa69138904 100644 --- a/clients/client-route53resolver/src/protocols/Aws_json1_1.ts +++ b/clients/client-route53resolver/src/protocols/Aws_json1_1.ts @@ -1,11 +1,10 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectString as __expectString, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -231,84 +230,42 @@ import { UpdateResolverRuleCommandInput, UpdateResolverRuleCommandOutput } from import { AccessDeniedException, AssociateFirewallRuleGroupRequest, - AssociateFirewallRuleGroupResponse, AssociateResolverEndpointIpAddressRequest, - AssociateResolverEndpointIpAddressResponse, AssociateResolverQueryLogConfigRequest, - AssociateResolverQueryLogConfigResponse, AssociateResolverRuleRequest, - AssociateResolverRuleResponse, ConflictException, CreateFirewallDomainListRequest, - CreateFirewallDomainListResponse, CreateFirewallRuleGroupRequest, - CreateFirewallRuleGroupResponse, CreateFirewallRuleRequest, - CreateFirewallRuleResponse, CreateResolverEndpointRequest, - CreateResolverEndpointResponse, CreateResolverQueryLogConfigRequest, - CreateResolverQueryLogConfigResponse, CreateResolverRuleRequest, - CreateResolverRuleResponse, DeleteFirewallDomainListRequest, - DeleteFirewallDomainListResponse, DeleteFirewallRuleGroupRequest, - DeleteFirewallRuleGroupResponse, DeleteFirewallRuleRequest, - DeleteFirewallRuleResponse, DeleteResolverEndpointRequest, - DeleteResolverEndpointResponse, DeleteResolverQueryLogConfigRequest, - DeleteResolverQueryLogConfigResponse, DeleteResolverRuleRequest, - DeleteResolverRuleResponse, DisassociateFirewallRuleGroupRequest, - DisassociateFirewallRuleGroupResponse, DisassociateResolverEndpointIpAddressRequest, - DisassociateResolverEndpointIpAddressResponse, DisassociateResolverQueryLogConfigRequest, - DisassociateResolverQueryLogConfigResponse, DisassociateResolverRuleRequest, - DisassociateResolverRuleResponse, Filter, - FirewallConfig, - FirewallDomainList, - FirewallDomainListMetadata, - FirewallRule, - FirewallRuleGroup, - FirewallRuleGroupAssociation, - FirewallRuleGroupMetadata, GetFirewallConfigRequest, - GetFirewallConfigResponse, GetFirewallDomainListRequest, - GetFirewallDomainListResponse, GetFirewallRuleGroupAssociationRequest, - GetFirewallRuleGroupAssociationResponse, GetFirewallRuleGroupPolicyRequest, - GetFirewallRuleGroupPolicyResponse, GetFirewallRuleGroupRequest, - GetFirewallRuleGroupResponse, GetResolverConfigRequest, - GetResolverConfigResponse, GetResolverDnssecConfigRequest, - GetResolverDnssecConfigResponse, GetResolverEndpointRequest, - GetResolverEndpointResponse, GetResolverQueryLogConfigAssociationRequest, - GetResolverQueryLogConfigAssociationResponse, GetResolverQueryLogConfigPolicyRequest, - GetResolverQueryLogConfigPolicyResponse, GetResolverQueryLogConfigRequest, - GetResolverQueryLogConfigResponse, GetResolverRuleAssociationRequest, - GetResolverRuleAssociationResponse, GetResolverRulePolicyRequest, - GetResolverRulePolicyResponse, GetResolverRuleRequest, - GetResolverRuleResponse, ImportFirewallDomainsRequest, - ImportFirewallDomainsResponse, InternalServiceErrorException, InvalidNextTokenException, InvalidParameterException, @@ -316,52 +273,26 @@ import { InvalidRequestException, InvalidTagException, IpAddressRequest, - IpAddressResponse, IpAddressUpdate, LimitExceededException, ListFirewallConfigsRequest, - ListFirewallConfigsResponse, ListFirewallDomainListsRequest, - ListFirewallDomainListsResponse, ListFirewallDomainsRequest, - ListFirewallDomainsResponse, ListFirewallRuleGroupAssociationsRequest, - ListFirewallRuleGroupAssociationsResponse, ListFirewallRuleGroupsRequest, - ListFirewallRuleGroupsResponse, ListFirewallRulesRequest, - ListFirewallRulesResponse, ListResolverConfigsRequest, - ListResolverConfigsResponse, ListResolverDnssecConfigsRequest, - ListResolverDnssecConfigsResponse, ListResolverEndpointIpAddressesRequest, - ListResolverEndpointIpAddressesResponse, ListResolverEndpointsRequest, - ListResolverEndpointsResponse, ListResolverQueryLogConfigAssociationsRequest, - ListResolverQueryLogConfigAssociationsResponse, ListResolverQueryLogConfigsRequest, - ListResolverQueryLogConfigsResponse, ListResolverRuleAssociationsRequest, - ListResolverRuleAssociationsResponse, ListResolverRulesRequest, - ListResolverRulesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, PutFirewallRuleGroupPolicyRequest, - PutFirewallRuleGroupPolicyResponse, PutResolverQueryLogConfigPolicyRequest, - PutResolverQueryLogConfigPolicyResponse, PutResolverRulePolicyRequest, - PutResolverRulePolicyResponse, - ResolverConfig, - ResolverDnssecConfig, - ResolverEndpoint, - ResolverQueryLogConfig, - ResolverQueryLogConfigAssociation, - ResolverRule, - ResolverRuleAssociation, ResolverRuleConfig, ResourceExistsException, ResourceInUseException, @@ -369,29 +300,19 @@ import { ResourceUnavailableException, Tag, TagResourceRequest, - TagResourceResponse, TargetAddress, ThrottlingException, UnknownResourceException, UntagResourceRequest, - UntagResourceResponse, UpdateFirewallConfigRequest, - UpdateFirewallConfigResponse, UpdateFirewallDomainsRequest, - UpdateFirewallDomainsResponse, UpdateFirewallRuleGroupAssociationRequest, - UpdateFirewallRuleGroupAssociationResponse, UpdateFirewallRuleRequest, - UpdateFirewallRuleResponse, UpdateIpAddress, UpdateResolverConfigRequest, - UpdateResolverConfigResponse, UpdateResolverDnssecConfigRequest, - UpdateResolverDnssecConfigResponse, UpdateResolverEndpointRequest, - UpdateResolverEndpointResponse, UpdateResolverRuleRequest, - UpdateResolverRuleResponse, ValidationException, } from "../models/models_0"; import { Route53ResolverServiceException as __BaseException } from "../models/Route53ResolverServiceException"; @@ -418,7 +339,7 @@ export const se_AssociateResolverEndpointIpAddressCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateResolverEndpointIpAddress"); let body: any; - body = JSON.stringify(se_AssociateResolverEndpointIpAddressRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -431,7 +352,7 @@ export const se_AssociateResolverQueryLogConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateResolverQueryLogConfig"); let body: any; - body = JSON.stringify(se_AssociateResolverQueryLogConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +365,7 @@ export const se_AssociateResolverRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateResolverRule"); let body: any; - body = JSON.stringify(se_AssociateResolverRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -496,7 +417,7 @@ export const se_CreateResolverEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateResolverEndpoint"); let body: any; - body = JSON.stringify(se_CreateResolverEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +443,7 @@ export const se_CreateResolverRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateResolverRule"); let body: any; - body = JSON.stringify(se_CreateResolverRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -535,7 +456,7 @@ export const se_DeleteFirewallDomainListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFirewallDomainList"); let body: any; - body = JSON.stringify(se_DeleteFirewallDomainListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -548,7 +469,7 @@ export const se_DeleteFirewallRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFirewallRule"); let body: any; - body = JSON.stringify(se_DeleteFirewallRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +482,7 @@ export const se_DeleteFirewallRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFirewallRuleGroup"); let body: any; - body = JSON.stringify(se_DeleteFirewallRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -574,7 +495,7 @@ export const se_DeleteResolverEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResolverEndpoint"); let body: any; - body = JSON.stringify(se_DeleteResolverEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -587,7 +508,7 @@ export const se_DeleteResolverQueryLogConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResolverQueryLogConfig"); let body: any; - body = JSON.stringify(se_DeleteResolverQueryLogConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -600,7 +521,7 @@ export const se_DeleteResolverRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResolverRule"); let body: any; - body = JSON.stringify(se_DeleteResolverRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -613,7 +534,7 @@ export const se_DisassociateFirewallRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateFirewallRuleGroup"); let body: any; - body = JSON.stringify(se_DisassociateFirewallRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -626,7 +547,7 @@ export const se_DisassociateResolverEndpointIpAddressCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateResolverEndpointIpAddress"); let body: any; - body = JSON.stringify(se_DisassociateResolverEndpointIpAddressRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -639,7 +560,7 @@ export const se_DisassociateResolverQueryLogConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateResolverQueryLogConfig"); let body: any; - body = JSON.stringify(se_DisassociateResolverQueryLogConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -652,7 +573,7 @@ export const se_DisassociateResolverRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateResolverRule"); let body: any; - body = JSON.stringify(se_DisassociateResolverRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -665,7 +586,7 @@ export const se_GetFirewallConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFirewallConfig"); let body: any; - body = JSON.stringify(se_GetFirewallConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -678,7 +599,7 @@ export const se_GetFirewallDomainListCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFirewallDomainList"); let body: any; - body = JSON.stringify(se_GetFirewallDomainListRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -691,7 +612,7 @@ export const se_GetFirewallRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFirewallRuleGroup"); let body: any; - body = JSON.stringify(se_GetFirewallRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -704,7 +625,7 @@ export const se_GetFirewallRuleGroupAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFirewallRuleGroupAssociation"); let body: any; - body = JSON.stringify(se_GetFirewallRuleGroupAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -717,7 +638,7 @@ export const se_GetFirewallRuleGroupPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetFirewallRuleGroupPolicy"); let body: any; - body = JSON.stringify(se_GetFirewallRuleGroupPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -730,7 +651,7 @@ export const se_GetResolverConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverConfig"); let body: any; - body = JSON.stringify(se_GetResolverConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -743,7 +664,7 @@ export const se_GetResolverDnssecConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverDnssecConfig"); let body: any; - body = JSON.stringify(se_GetResolverDnssecConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -756,7 +677,7 @@ export const se_GetResolverEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverEndpoint"); let body: any; - body = JSON.stringify(se_GetResolverEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -769,7 +690,7 @@ export const se_GetResolverQueryLogConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverQueryLogConfig"); let body: any; - body = JSON.stringify(se_GetResolverQueryLogConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -782,7 +703,7 @@ export const se_GetResolverQueryLogConfigAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverQueryLogConfigAssociation"); let body: any; - body = JSON.stringify(se_GetResolverQueryLogConfigAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -795,7 +716,7 @@ export const se_GetResolverQueryLogConfigPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverQueryLogConfigPolicy"); let body: any; - body = JSON.stringify(se_GetResolverQueryLogConfigPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -808,7 +729,7 @@ export const se_GetResolverRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverRule"); let body: any; - body = JSON.stringify(se_GetResolverRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -821,7 +742,7 @@ export const se_GetResolverRuleAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverRuleAssociation"); let body: any; - body = JSON.stringify(se_GetResolverRuleAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -834,7 +755,7 @@ export const se_GetResolverRulePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResolverRulePolicy"); let body: any; - body = JSON.stringify(se_GetResolverRulePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -847,7 +768,7 @@ export const se_ImportFirewallDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportFirewallDomains"); let body: any; - body = JSON.stringify(se_ImportFirewallDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -860,7 +781,7 @@ export const se_ListFirewallConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallConfigs"); let body: any; - body = JSON.stringify(se_ListFirewallConfigsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -873,7 +794,7 @@ export const se_ListFirewallDomainListsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallDomainLists"); let body: any; - body = JSON.stringify(se_ListFirewallDomainListsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -886,7 +807,7 @@ export const se_ListFirewallDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallDomains"); let body: any; - body = JSON.stringify(se_ListFirewallDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -899,7 +820,7 @@ export const se_ListFirewallRuleGroupAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallRuleGroupAssociations"); let body: any; - body = JSON.stringify(se_ListFirewallRuleGroupAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -912,7 +833,7 @@ export const se_ListFirewallRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallRuleGroups"); let body: any; - body = JSON.stringify(se_ListFirewallRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -925,7 +846,7 @@ export const se_ListFirewallRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFirewallRules"); let body: any; - body = JSON.stringify(se_ListFirewallRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -938,7 +859,7 @@ export const se_ListResolverConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverConfigs"); let body: any; - body = JSON.stringify(se_ListResolverConfigsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -951,7 +872,7 @@ export const se_ListResolverDnssecConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverDnssecConfigs"); let body: any; - body = JSON.stringify(se_ListResolverDnssecConfigsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -964,7 +885,7 @@ export const se_ListResolverEndpointIpAddressesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverEndpointIpAddresses"); let body: any; - body = JSON.stringify(se_ListResolverEndpointIpAddressesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -977,7 +898,7 @@ export const se_ListResolverEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverEndpoints"); let body: any; - body = JSON.stringify(se_ListResolverEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -990,7 +911,7 @@ export const se_ListResolverQueryLogConfigAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverQueryLogConfigAssociations"); let body: any; - body = JSON.stringify(se_ListResolverQueryLogConfigAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1003,7 +924,7 @@ export const se_ListResolverQueryLogConfigsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverQueryLogConfigs"); let body: any; - body = JSON.stringify(se_ListResolverQueryLogConfigsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1016,7 +937,7 @@ export const se_ListResolverRuleAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverRuleAssociations"); let body: any; - body = JSON.stringify(se_ListResolverRuleAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1029,7 +950,7 @@ export const se_ListResolverRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResolverRules"); let body: any; - body = JSON.stringify(se_ListResolverRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1042,7 +963,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1055,7 +976,7 @@ export const se_PutFirewallRuleGroupPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutFirewallRuleGroupPolicy"); let body: any; - body = JSON.stringify(se_PutFirewallRuleGroupPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1068,7 +989,7 @@ export const se_PutResolverQueryLogConfigPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResolverQueryLogConfigPolicy"); let body: any; - body = JSON.stringify(se_PutResolverQueryLogConfigPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1081,7 +1002,7 @@ export const se_PutResolverRulePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResolverRulePolicy"); let body: any; - body = JSON.stringify(se_PutResolverRulePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1094,7 +1015,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1107,7 +1028,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1120,7 +1041,7 @@ export const se_UpdateFirewallConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallConfig"); let body: any; - body = JSON.stringify(se_UpdateFirewallConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1133,7 +1054,7 @@ export const se_UpdateFirewallDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallDomains"); let body: any; - body = JSON.stringify(se_UpdateFirewallDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1146,7 +1067,7 @@ export const se_UpdateFirewallRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallRule"); let body: any; - body = JSON.stringify(se_UpdateFirewallRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1159,7 +1080,7 @@ export const se_UpdateFirewallRuleGroupAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFirewallRuleGroupAssociation"); let body: any; - body = JSON.stringify(se_UpdateFirewallRuleGroupAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1172,7 +1093,7 @@ export const se_UpdateResolverConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResolverConfig"); let body: any; - body = JSON.stringify(se_UpdateResolverConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1185,7 +1106,7 @@ export const se_UpdateResolverDnssecConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResolverDnssecConfig"); let body: any; - body = JSON.stringify(se_UpdateResolverDnssecConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1198,7 +1119,7 @@ export const se_UpdateResolverEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResolverEndpoint"); let body: any; - body = JSON.stringify(se_UpdateResolverEndpointRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1211,7 +1132,7 @@ export const se_UpdateResolverRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResolverRule"); let body: any; - body = JSON.stringify(se_UpdateResolverRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1227,12 +1148,12 @@ export const de_AssociateFirewallRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateFirewallRuleGroupResponse(data, context); + contents = _json(data); const response: AssociateFirewallRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1271,10 +1192,9 @@ const de_AssociateFirewallRuleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1292,12 +1212,12 @@ export const de_AssociateResolverEndpointIpAddressCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateResolverEndpointIpAddressResponse(data, context); + contents = _json(data); const response: AssociateResolverEndpointIpAddressCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1336,10 +1256,9 @@ const de_AssociateResolverEndpointIpAddressCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1357,12 +1276,12 @@ export const de_AssociateResolverQueryLogConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateResolverQueryLogConfigResponse(data, context); + contents = _json(data); const response: AssociateResolverQueryLogConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1404,10 +1323,9 @@ const de_AssociateResolverQueryLogConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1425,12 +1343,12 @@ export const de_AssociateResolverRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateResolverRuleResponse(data, context); + contents = _json(data); const response: AssociateResolverRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1472,10 +1390,9 @@ const de_AssociateResolverRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1493,12 +1410,12 @@ export const de_CreateFirewallDomainListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFirewallDomainListResponse(data, context); + contents = _json(data); const response: CreateFirewallDomainListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1531,10 +1448,9 @@ const de_CreateFirewallDomainListCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1552,12 +1468,12 @@ export const de_CreateFirewallRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFirewallRuleResponse(data, context); + contents = _json(data); const response: CreateFirewallRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1593,10 +1509,9 @@ const de_CreateFirewallRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1614,12 +1529,12 @@ export const de_CreateFirewallRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFirewallRuleGroupResponse(data, context); + contents = _json(data); const response: CreateFirewallRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1652,10 +1567,9 @@ const de_CreateFirewallRuleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1673,12 +1587,12 @@ export const de_CreateResolverEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResolverEndpointResponse(data, context); + contents = _json(data); const response: CreateResolverEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1717,10 +1631,9 @@ const de_CreateResolverEndpointCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1738,12 +1651,12 @@ export const de_CreateResolverQueryLogConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResolverQueryLogConfigResponse(data, context); + contents = _json(data); const response: CreateResolverQueryLogConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1785,10 +1698,9 @@ const de_CreateResolverQueryLogConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1806,12 +1718,12 @@ export const de_CreateResolverRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResolverRuleResponse(data, context); + contents = _json(data); const response: CreateResolverRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1853,10 +1765,9 @@ const de_CreateResolverRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1874,12 +1785,12 @@ export const de_DeleteFirewallDomainListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFirewallDomainListResponse(data, context); + contents = _json(data); const response: DeleteFirewallDomainListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1912,10 +1823,9 @@ const de_DeleteFirewallDomainListCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1933,12 +1843,12 @@ export const de_DeleteFirewallRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFirewallRuleResponse(data, context); + contents = _json(data); const response: DeleteFirewallRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1968,10 +1878,9 @@ const de_DeleteFirewallRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1989,12 +1898,12 @@ export const de_DeleteFirewallRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFirewallRuleGroupResponse(data, context); + contents = _json(data); const response: DeleteFirewallRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2030,10 +1939,9 @@ const de_DeleteFirewallRuleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2051,12 +1959,12 @@ export const de_DeleteResolverEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResolverEndpointResponse(data, context); + contents = _json(data); const response: DeleteResolverEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2089,10 +1997,9 @@ const de_DeleteResolverEndpointCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2110,12 +2017,12 @@ export const de_DeleteResolverQueryLogConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResolverQueryLogConfigResponse(data, context); + contents = _json(data); const response: DeleteResolverQueryLogConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2151,10 +2058,9 @@ const de_DeleteResolverQueryLogConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2172,12 +2078,12 @@ export const de_DeleteResolverRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResolverRuleResponse(data, context); + contents = _json(data); const response: DeleteResolverRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2210,10 +2116,9 @@ const de_DeleteResolverRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2231,12 +2136,12 @@ export const de_DisassociateFirewallRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateFirewallRuleGroupResponse(data, context); + contents = _json(data); const response: DisassociateFirewallRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2272,10 +2177,9 @@ const de_DisassociateFirewallRuleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2293,12 +2197,12 @@ export const de_DisassociateResolverEndpointIpAddressCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateResolverEndpointIpAddressResponse(data, context); + contents = _json(data); const response: DisassociateResolverEndpointIpAddressCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2334,10 +2238,9 @@ const de_DisassociateResolverEndpointIpAddressCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2355,12 +2258,12 @@ export const de_DisassociateResolverQueryLogConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateResolverQueryLogConfigResponse(data, context); + contents = _json(data); const response: DisassociateResolverQueryLogConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2396,10 +2299,9 @@ const de_DisassociateResolverQueryLogConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2417,12 +2319,12 @@ export const de_DisassociateResolverRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateResolverRuleResponse(data, context); + contents = _json(data); const response: DisassociateResolverRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2452,10 +2354,9 @@ const de_DisassociateResolverRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2473,12 +2374,12 @@ export const de_GetFirewallConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFirewallConfigResponse(data, context); + contents = _json(data); const response: GetFirewallConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2511,10 +2412,9 @@ const de_GetFirewallConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2532,12 +2432,12 @@ export const de_GetFirewallDomainListCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFirewallDomainListResponse(data, context); + contents = _json(data); const response: GetFirewallDomainListCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2567,10 +2467,9 @@ const de_GetFirewallDomainListCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2588,12 +2487,12 @@ export const de_GetFirewallRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFirewallRuleGroupResponse(data, context); + contents = _json(data); const response: GetFirewallRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2623,10 +2522,9 @@ const de_GetFirewallRuleGroupCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2644,12 +2542,12 @@ export const de_GetFirewallRuleGroupAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFirewallRuleGroupAssociationResponse(data, context); + contents = _json(data); const response: GetFirewallRuleGroupAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2679,10 +2577,9 @@ const de_GetFirewallRuleGroupAssociationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2700,12 +2597,12 @@ export const de_GetFirewallRuleGroupPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetFirewallRuleGroupPolicyResponse(data, context); + contents = _json(data); const response: GetFirewallRuleGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2738,10 +2635,9 @@ const de_GetFirewallRuleGroupPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2759,12 +2655,12 @@ export const de_GetResolverConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverConfigResponse(data, context); + contents = _json(data); const response: GetResolverConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2800,10 +2696,9 @@ const de_GetResolverConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2821,12 +2716,12 @@ export const de_GetResolverDnssecConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverDnssecConfigResponse(data, context); + contents = _json(data); const response: GetResolverDnssecConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2862,10 +2757,9 @@ const de_GetResolverDnssecConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2883,12 +2777,12 @@ export const de_GetResolverEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverEndpointResponse(data, context); + contents = _json(data); const response: GetResolverEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2918,10 +2812,9 @@ const de_GetResolverEndpointCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2939,12 +2832,12 @@ export const de_GetResolverQueryLogConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverQueryLogConfigResponse(data, context); + contents = _json(data); const response: GetResolverQueryLogConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2980,10 +2873,9 @@ const de_GetResolverQueryLogConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3001,12 +2893,12 @@ export const de_GetResolverQueryLogConfigAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverQueryLogConfigAssociationResponse(data, context); + contents = _json(data); const response: GetResolverQueryLogConfigAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3042,10 +2934,9 @@ const de_GetResolverQueryLogConfigAssociationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3063,12 +2954,12 @@ export const de_GetResolverQueryLogConfigPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverQueryLogConfigPolicyResponse(data, context); + contents = _json(data); const response: GetResolverQueryLogConfigPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3101,10 +2992,9 @@ const de_GetResolverQueryLogConfigPolicyCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3122,12 +3012,12 @@ export const de_GetResolverRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverRuleResponse(data, context); + contents = _json(data); const response: GetResolverRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3157,10 +3047,9 @@ const de_GetResolverRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3178,12 +3067,12 @@ export const de_GetResolverRuleAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverRuleAssociationResponse(data, context); + contents = _json(data); const response: GetResolverRuleAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3213,10 +3102,9 @@ const de_GetResolverRuleAssociationCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3234,12 +3122,12 @@ export const de_GetResolverRulePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResolverRulePolicyResponse(data, context); + contents = _json(data); const response: GetResolverRulePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3269,10 +3157,9 @@ const de_GetResolverRulePolicyCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3290,12 +3177,12 @@ export const de_ImportFirewallDomainsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportFirewallDomainsResponse(data, context); + contents = _json(data); const response: ImportFirewallDomainsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3334,10 +3221,9 @@ const de_ImportFirewallDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3355,12 +3241,12 @@ export const de_ListFirewallConfigsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallConfigsResponse(data, context); + contents = _json(data); const response: ListFirewallConfigsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3390,10 +3276,9 @@ const de_ListFirewallConfigsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3411,12 +3296,12 @@ export const de_ListFirewallDomainListsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallDomainListsResponse(data, context); + contents = _json(data); const response: ListFirewallDomainListsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3446,10 +3331,9 @@ const de_ListFirewallDomainListsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3467,12 +3351,12 @@ export const de_ListFirewallDomainsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallDomainsResponse(data, context); + contents = _json(data); const response: ListFirewallDomainsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3505,10 +3389,9 @@ const de_ListFirewallDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3526,12 +3409,12 @@ export const de_ListFirewallRuleGroupAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallRuleGroupAssociationsResponse(data, context); + contents = _json(data); const response: ListFirewallRuleGroupAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3561,10 +3444,9 @@ const de_ListFirewallRuleGroupAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3582,12 +3464,12 @@ export const de_ListFirewallRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallRuleGroupsResponse(data, context); + contents = _json(data); const response: ListFirewallRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3617,10 +3499,9 @@ const de_ListFirewallRuleGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3638,12 +3519,12 @@ export const de_ListFirewallRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFirewallRulesResponse(data, context); + contents = _json(data); const response: ListFirewallRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3676,10 +3557,9 @@ const de_ListFirewallRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3697,12 +3577,12 @@ export const de_ListResolverConfigsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverConfigsResponse(data, context); + contents = _json(data); const response: ListResolverConfigsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3741,10 +3621,9 @@ const de_ListResolverConfigsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3762,12 +3641,12 @@ export const de_ListResolverDnssecConfigsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverDnssecConfigsResponse(data, context); + contents = _json(data); const response: ListResolverDnssecConfigsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3803,10 +3682,9 @@ const de_ListResolverDnssecConfigsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3824,12 +3702,12 @@ export const de_ListResolverEndpointIpAddressesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverEndpointIpAddressesResponse(data, context); + contents = _json(data); const response: ListResolverEndpointIpAddressesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3862,10 +3740,9 @@ const de_ListResolverEndpointIpAddressesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3883,12 +3760,12 @@ export const de_ListResolverEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverEndpointsResponse(data, context); + contents = _json(data); const response: ListResolverEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3921,10 +3798,9 @@ const de_ListResolverEndpointsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3942,12 +3818,12 @@ export const de_ListResolverQueryLogConfigAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverQueryLogConfigAssociationsResponse(data, context); + contents = _json(data); const response: ListResolverQueryLogConfigAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3983,10 +3859,9 @@ const de_ListResolverQueryLogConfigAssociationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4004,12 +3879,12 @@ export const de_ListResolverQueryLogConfigsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverQueryLogConfigsResponse(data, context); + contents = _json(data); const response: ListResolverQueryLogConfigsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4045,10 +3920,9 @@ const de_ListResolverQueryLogConfigsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4066,12 +3940,12 @@ export const de_ListResolverRuleAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverRuleAssociationsResponse(data, context); + contents = _json(data); const response: ListResolverRuleAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4104,10 +3978,9 @@ const de_ListResolverRuleAssociationsCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4125,12 +3998,12 @@ export const de_ListResolverRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResolverRulesResponse(data, context); + contents = _json(data); const response: ListResolverRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4163,10 +4036,9 @@ const de_ListResolverRulesCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4184,12 +4056,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4225,10 +4097,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4246,12 +4117,12 @@ export const de_PutFirewallRuleGroupPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutFirewallRuleGroupPolicyResponse(data, context); + contents = _json(data); const response: PutFirewallRuleGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4284,10 +4155,9 @@ const de_PutFirewallRuleGroupPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4305,12 +4175,12 @@ export const de_PutResolverQueryLogConfigPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResolverQueryLogConfigPolicyResponse(data, context); + contents = _json(data); const response: PutResolverQueryLogConfigPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4346,10 +4216,9 @@ const de_PutResolverQueryLogConfigPolicyCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4367,12 +4236,12 @@ export const de_PutResolverRulePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResolverRulePolicyResponse(data, context); + contents = _json(data); const response: PutResolverRulePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4405,10 +4274,9 @@ const de_PutResolverRulePolicyCommandError = async ( throw await de_UnknownResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4426,12 +4294,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4470,10 +4338,9 @@ const de_TagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4491,12 +4358,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4529,10 +4396,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4550,12 +4416,12 @@ export const de_UpdateFirewallConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallConfigResponse(data, context); + contents = _json(data); const response: UpdateFirewallConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4588,10 +4454,9 @@ const de_UpdateFirewallConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4609,12 +4474,12 @@ export const de_UpdateFirewallDomainsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallDomainsResponse(data, context); + contents = _json(data); const response: UpdateFirewallDomainsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4653,10 +4518,9 @@ const de_UpdateFirewallDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4674,12 +4538,12 @@ export const de_UpdateFirewallRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallRuleResponse(data, context); + contents = _json(data); const response: UpdateFirewallRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4715,10 +4579,9 @@ const de_UpdateFirewallRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4736,12 +4599,12 @@ export const de_UpdateFirewallRuleGroupAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFirewallRuleGroupAssociationResponse(data, context); + contents = _json(data); const response: UpdateFirewallRuleGroupAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4777,10 +4640,9 @@ const de_UpdateFirewallRuleGroupAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4798,12 +4660,12 @@ export const de_UpdateResolverConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResolverConfigResponse(data, context); + contents = _json(data); const response: UpdateResolverConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4848,10 +4710,9 @@ const de_UpdateResolverConfigCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4869,12 +4730,12 @@ export const de_UpdateResolverDnssecConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResolverDnssecConfigResponse(data, context); + contents = _json(data); const response: UpdateResolverDnssecConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4910,10 +4771,9 @@ const de_UpdateResolverDnssecConfigCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4931,12 +4791,12 @@ export const de_UpdateResolverEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResolverEndpointResponse(data, context); + contents = _json(data); const response: UpdateResolverEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4969,10 +4829,9 @@ const de_UpdateResolverEndpointCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4990,12 +4849,12 @@ export const de_UpdateResolverRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResolverRuleResponse(data, context); + contents = _json(data); const response: UpdateResolverRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5034,10 +4893,9 @@ const de_UpdateResolverRuleCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5051,7 +4909,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5064,7 +4922,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5080,7 +4938,7 @@ const de_InternalServiceErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5096,7 +4954,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5112,7 +4970,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5128,7 +4986,7 @@ const de_InvalidPolicyDocumentRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPolicyDocument(body, context); + const deserialized: any = _json(body); const exception = new InvalidPolicyDocument({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5144,7 +5002,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5157,7 +5015,7 @@ const de_InvalidRequestExceptionRes = async ( */ const de_InvalidTagExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTagException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTagException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5173,7 +5031,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5189,7 +5047,7 @@ const de_ResourceExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5205,7 +5063,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5221,7 +5079,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5237,7 +5095,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5250,7 +5108,7 @@ const de_ResourceUnavailableExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5266,7 +5124,7 @@ const de_UnknownResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnknownResourceException(body, context); + const deserialized: any = _json(body); const exception = new UnknownResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5279,7 +5137,7 @@ const de_UnknownResourceExceptionRes = async ( */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5294,108 +5152,64 @@ const se_AssociateFirewallRuleGroupRequest = ( input: AssociateFirewallRuleGroupRequest, context: __SerdeContext ): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - ...(input.MutationProtection != null && { MutationProtection: input.MutationProtection }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + FirewallRuleGroupId: [], + MutationProtection: [], + Name: [], + Priority: [], + Tags: _json, + VpcId: [], + }); }; -/** - * serializeAws_json1_1AssociateResolverEndpointIpAddressRequest - */ -const se_AssociateResolverEndpointIpAddressRequest = ( - input: AssociateResolverEndpointIpAddressRequest, - context: __SerdeContext -): any => { - return { - ...(input.IpAddress != null && { IpAddress: se_IpAddressUpdate(input.IpAddress, context) }), - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - }; -}; +// se_AssociateResolverEndpointIpAddressRequest omitted. -/** - * serializeAws_json1_1AssociateResolverQueryLogConfigRequest - */ -const se_AssociateResolverQueryLogConfigRequest = ( - input: AssociateResolverQueryLogConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResolverQueryLogConfigId != null && { ResolverQueryLogConfigId: input.ResolverQueryLogConfigId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_AssociateResolverQueryLogConfigRequest omitted. -/** - * serializeAws_json1_1AssociateResolverRuleRequest - */ -const se_AssociateResolverRuleRequest = (input: AssociateResolverRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ResolverRuleId != null && { ResolverRuleId: input.ResolverRuleId }), - ...(input.VPCId != null && { VPCId: input.VPCId }), - }; -}; +// se_AssociateResolverRuleRequest omitted. /** * serializeAws_json1_1CreateFirewallDomainListRequest */ const se_CreateFirewallDomainListRequest = (input: CreateFirewallDomainListRequest, context: __SerdeContext): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + Name: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateFirewallRuleGroupRequest */ const se_CreateFirewallRuleGroupRequest = (input: CreateFirewallRuleGroupRequest, context: __SerdeContext): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + Name: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreateFirewallRuleRequest */ const se_CreateFirewallRuleRequest = (input: CreateFirewallRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.BlockOverrideDnsType != null && { BlockOverrideDnsType: input.BlockOverrideDnsType }), - ...(input.BlockOverrideDomain != null && { BlockOverrideDomain: input.BlockOverrideDomain }), - ...(input.BlockOverrideTtl != null && { BlockOverrideTtl: input.BlockOverrideTtl }), - ...(input.BlockResponse != null && { BlockResponse: input.BlockResponse }), - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - }; + return take(input, { + Action: [], + BlockOverrideDnsType: [], + BlockOverrideDomain: [], + BlockOverrideTtl: [], + BlockResponse: [], + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + FirewallDomainListId: [], + FirewallRuleGroupId: [], + Name: [], + Priority: [], + }); }; -/** - * serializeAws_json1_1CreateResolverEndpointRequest - */ -const se_CreateResolverEndpointRequest = (input: CreateResolverEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.CreatorRequestId != null && { CreatorRequestId: input.CreatorRequestId }), - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.IpAddresses != null && { IpAddresses: se_IpAddressesRequest(input.IpAddresses, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResolverEndpointType != null && { ResolverEndpointType: input.ResolverEndpointType }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateResolverEndpointRequest omitted. /** * serializeAws_json1_1CreateResolverQueryLogConfigRequest @@ -5404,2241 +5218,379 @@ const se_CreateResolverQueryLogConfigRequest = ( input: CreateResolverQueryLogConfigRequest, context: __SerdeContext ): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + DestinationArn: [], + Name: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreateResolverRuleRequest - */ -const se_CreateResolverRuleRequest = (input: CreateResolverRuleRequest, context: __SerdeContext): any => { - return { - ...(input.CreatorRequestId != null && { CreatorRequestId: input.CreatorRequestId }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - ...(input.RuleType != null && { RuleType: input.RuleType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetIps != null && { TargetIps: se_TargetList(input.TargetIps, context) }), - }; -}; +// se_CreateResolverRuleRequest omitted. -/** - * serializeAws_json1_1DeleteFirewallDomainListRequest - */ -const se_DeleteFirewallDomainListRequest = (input: DeleteFirewallDomainListRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - }; -}; +// se_DeleteFirewallDomainListRequest omitted. -/** - * serializeAws_json1_1DeleteFirewallRuleGroupRequest - */ -const se_DeleteFirewallRuleGroupRequest = (input: DeleteFirewallRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - }; -}; +// se_DeleteFirewallRuleGroupRequest omitted. -/** - * serializeAws_json1_1DeleteFirewallRuleRequest - */ -const se_DeleteFirewallRuleRequest = (input: DeleteFirewallRuleRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - }; -}; +// se_DeleteFirewallRuleRequest omitted. -/** - * serializeAws_json1_1DeleteResolverEndpointRequest - */ -const se_DeleteResolverEndpointRequest = (input: DeleteResolverEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - }; -}; +// se_DeleteResolverEndpointRequest omitted. -/** - * serializeAws_json1_1DeleteResolverQueryLogConfigRequest - */ -const se_DeleteResolverQueryLogConfigRequest = ( - input: DeleteResolverQueryLogConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResolverQueryLogConfigId != null && { ResolverQueryLogConfigId: input.ResolverQueryLogConfigId }), - }; -}; +// se_DeleteResolverQueryLogConfigRequest omitted. -/** - * serializeAws_json1_1DeleteResolverRuleRequest - */ -const se_DeleteResolverRuleRequest = (input: DeleteResolverRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ResolverRuleId != null && { ResolverRuleId: input.ResolverRuleId }), - }; -}; +// se_DeleteResolverRuleRequest omitted. -/** - * serializeAws_json1_1DisassociateFirewallRuleGroupRequest - */ -const se_DisassociateFirewallRuleGroupRequest = ( - input: DisassociateFirewallRuleGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallRuleGroupAssociationId != null && { - FirewallRuleGroupAssociationId: input.FirewallRuleGroupAssociationId, - }), - }; -}; +// se_DisassociateFirewallRuleGroupRequest omitted. -/** - * serializeAws_json1_1DisassociateResolverEndpointIpAddressRequest - */ -const se_DisassociateResolverEndpointIpAddressRequest = ( - input: DisassociateResolverEndpointIpAddressRequest, - context: __SerdeContext -): any => { - return { - ...(input.IpAddress != null && { IpAddress: se_IpAddressUpdate(input.IpAddress, context) }), - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - }; -}; +// se_DisassociateResolverEndpointIpAddressRequest omitted. -/** - * serializeAws_json1_1DisassociateResolverQueryLogConfigRequest - */ -const se_DisassociateResolverQueryLogConfigRequest = ( - input: DisassociateResolverQueryLogConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResolverQueryLogConfigId != null && { ResolverQueryLogConfigId: input.ResolverQueryLogConfigId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DisassociateResolverQueryLogConfigRequest omitted. -/** - * serializeAws_json1_1DisassociateResolverRuleRequest - */ -const se_DisassociateResolverRuleRequest = (input: DisassociateResolverRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ResolverRuleId != null && { ResolverRuleId: input.ResolverRuleId }), - ...(input.VPCId != null && { VPCId: input.VPCId }), - }; -}; +// se_DisassociateResolverRuleRequest omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_Filters omitted. -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_1FirewallDomains - */ -const se_FirewallDomains = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FirewallDomains omitted. -/** - * serializeAws_json1_1GetFirewallConfigRequest - */ -const se_GetFirewallConfigRequest = (input: GetFirewallConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_GetFirewallConfigRequest omitted. -/** - * serializeAws_json1_1GetFirewallDomainListRequest - */ -const se_GetFirewallDomainListRequest = (input: GetFirewallDomainListRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - }; -}; +// se_GetFirewallDomainListRequest omitted. -/** - * serializeAws_json1_1GetFirewallRuleGroupAssociationRequest - */ -const se_GetFirewallRuleGroupAssociationRequest = ( - input: GetFirewallRuleGroupAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallRuleGroupAssociationId != null && { - FirewallRuleGroupAssociationId: input.FirewallRuleGroupAssociationId, - }), - }; -}; +// se_GetFirewallRuleGroupAssociationRequest omitted. -/** - * serializeAws_json1_1GetFirewallRuleGroupPolicyRequest - */ -const se_GetFirewallRuleGroupPolicyRequest = ( - input: GetFirewallRuleGroupPolicyRequest, - context: __SerdeContext -): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_GetFirewallRuleGroupPolicyRequest omitted. -/** - * serializeAws_json1_1GetFirewallRuleGroupRequest - */ -const se_GetFirewallRuleGroupRequest = (input: GetFirewallRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - }; -}; +// se_GetFirewallRuleGroupRequest omitted. -/** - * serializeAws_json1_1GetResolverConfigRequest - */ -const se_GetResolverConfigRequest = (input: GetResolverConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_GetResolverConfigRequest omitted. -/** - * serializeAws_json1_1GetResolverDnssecConfigRequest - */ -const se_GetResolverDnssecConfigRequest = (input: GetResolverDnssecConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_GetResolverDnssecConfigRequest omitted. -/** - * serializeAws_json1_1GetResolverEndpointRequest - */ -const se_GetResolverEndpointRequest = (input: GetResolverEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - }; -}; +// se_GetResolverEndpointRequest omitted. -/** - * serializeAws_json1_1GetResolverQueryLogConfigAssociationRequest - */ -const se_GetResolverQueryLogConfigAssociationRequest = ( - input: GetResolverQueryLogConfigAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResolverQueryLogConfigAssociationId != null && { - ResolverQueryLogConfigAssociationId: input.ResolverQueryLogConfigAssociationId, - }), - }; -}; +// se_GetResolverQueryLogConfigAssociationRequest omitted. -/** - * serializeAws_json1_1GetResolverQueryLogConfigPolicyRequest - */ -const se_GetResolverQueryLogConfigPolicyRequest = ( - input: GetResolverQueryLogConfigPolicyRequest, - context: __SerdeContext -): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_GetResolverQueryLogConfigPolicyRequest omitted. -/** - * serializeAws_json1_1GetResolverQueryLogConfigRequest - */ -const se_GetResolverQueryLogConfigRequest = (input: GetResolverQueryLogConfigRequest, context: __SerdeContext): any => { - return { - ...(input.ResolverQueryLogConfigId != null && { ResolverQueryLogConfigId: input.ResolverQueryLogConfigId }), - }; -}; +// se_GetResolverQueryLogConfigRequest omitted. -/** - * serializeAws_json1_1GetResolverRuleAssociationRequest - */ -const se_GetResolverRuleAssociationRequest = ( - input: GetResolverRuleAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResolverRuleAssociationId != null && { ResolverRuleAssociationId: input.ResolverRuleAssociationId }), - }; -}; +// se_GetResolverRuleAssociationRequest omitted. -/** - * serializeAws_json1_1GetResolverRulePolicyRequest - */ -const se_GetResolverRulePolicyRequest = (input: GetResolverRulePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_GetResolverRulePolicyRequest omitted. -/** - * serializeAws_json1_1GetResolverRuleRequest - */ -const se_GetResolverRuleRequest = (input: GetResolverRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ResolverRuleId != null && { ResolverRuleId: input.ResolverRuleId }), - }; -}; +// se_GetResolverRuleRequest omitted. -/** - * serializeAws_json1_1ImportFirewallDomainsRequest - */ -const se_ImportFirewallDomainsRequest = (input: ImportFirewallDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.DomainFileUrl != null && { DomainFileUrl: input.DomainFileUrl }), - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - ...(input.Operation != null && { Operation: input.Operation }), - }; -}; +// se_ImportFirewallDomainsRequest omitted. -/** - * serializeAws_json1_1IpAddressesRequest - */ -const se_IpAddressesRequest = (input: IpAddressRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IpAddressRequest(entry, context); - }); -}; +// se_IpAddressesRequest omitted. -/** - * serializeAws_json1_1IpAddressRequest - */ -const se_IpAddressRequest = (input: IpAddressRequest, context: __SerdeContext): any => { - return { - ...(input.Ip != null && { Ip: input.Ip }), - ...(input.Ipv6 != null && { Ipv6: input.Ipv6 }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; +// se_IpAddressRequest omitted. -/** - * serializeAws_json1_1IpAddressUpdate - */ -const se_IpAddressUpdate = (input: IpAddressUpdate, context: __SerdeContext): any => { - return { - ...(input.Ip != null && { Ip: input.Ip }), - ...(input.IpId != null && { IpId: input.IpId }), - ...(input.Ipv6 != null && { Ipv6: input.Ipv6 }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; +// se_IpAddressUpdate omitted. -/** - * serializeAws_json1_1ListFirewallConfigsRequest - */ -const se_ListFirewallConfigsRequest = (input: ListFirewallConfigsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFirewallConfigsRequest omitted. -/** - * serializeAws_json1_1ListFirewallDomainListsRequest - */ -const se_ListFirewallDomainListsRequest = (input: ListFirewallDomainListsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFirewallDomainListsRequest omitted. -/** - * serializeAws_json1_1ListFirewallDomainsRequest - */ -const se_ListFirewallDomainsRequest = (input: ListFirewallDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFirewallDomainsRequest omitted. -/** - * serializeAws_json1_1ListFirewallRuleGroupAssociationsRequest - */ -const se_ListFirewallRuleGroupAssociationsRequest = ( - input: ListFirewallRuleGroupAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Status != null && { Status: input.Status }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_ListFirewallRuleGroupAssociationsRequest omitted. -/** - * serializeAws_json1_1ListFirewallRuleGroupsRequest - */ -const se_ListFirewallRuleGroupsRequest = (input: ListFirewallRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFirewallRuleGroupsRequest omitted. -/** - * serializeAws_json1_1ListFirewallRulesRequest - */ -const se_ListFirewallRulesRequest = (input: ListFirewallRulesRequest, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Priority != null && { Priority: input.Priority }), - }; -}; +// se_ListFirewallRulesRequest omitted. -/** - * serializeAws_json1_1ListResolverConfigsRequest - */ -const se_ListResolverConfigsRequest = (input: ListResolverConfigsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResolverConfigsRequest omitted. -/** - * serializeAws_json1_1ListResolverDnssecConfigsRequest - */ -const se_ListResolverDnssecConfigsRequest = (input: ListResolverDnssecConfigsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResolverDnssecConfigsRequest omitted. -/** - * serializeAws_json1_1ListResolverEndpointIpAddressesRequest - */ -const se_ListResolverEndpointIpAddressesRequest = ( - input: ListResolverEndpointIpAddressesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - }; -}; +// se_ListResolverEndpointIpAddressesRequest omitted. -/** - * serializeAws_json1_1ListResolverEndpointsRequest - */ -const se_ListResolverEndpointsRequest = (input: ListResolverEndpointsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResolverEndpointsRequest omitted. -/** - * serializeAws_json1_1ListResolverQueryLogConfigAssociationsRequest - */ -const se_ListResolverQueryLogConfigAssociationsRequest = ( - input: ListResolverQueryLogConfigAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_ListResolverQueryLogConfigAssociationsRequest omitted. -/** - * serializeAws_json1_1ListResolverQueryLogConfigsRequest - */ -const se_ListResolverQueryLogConfigsRequest = ( - input: ListResolverQueryLogConfigsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_ListResolverQueryLogConfigsRequest omitted. -/** - * serializeAws_json1_1ListResolverRuleAssociationsRequest - */ -const se_ListResolverRuleAssociationsRequest = ( - input: ListResolverRuleAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResolverRuleAssociationsRequest omitted. -/** - * serializeAws_json1_1ListResolverRulesRequest - */ -const se_ListResolverRulesRequest = (input: ListResolverRulesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListResolverRulesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1PutFirewallRuleGroupPolicyRequest - */ -const se_PutFirewallRuleGroupPolicyRequest = ( - input: PutFirewallRuleGroupPolicyRequest, - context: __SerdeContext -): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.FirewallRuleGroupPolicy != null && { FirewallRuleGroupPolicy: input.FirewallRuleGroupPolicy }), - }; -}; +// se_PutFirewallRuleGroupPolicyRequest omitted. -/** - * serializeAws_json1_1PutResolverQueryLogConfigPolicyRequest - */ -const se_PutResolverQueryLogConfigPolicyRequest = ( - input: PutResolverQueryLogConfigPolicyRequest, - context: __SerdeContext -): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ResolverQueryLogConfigPolicy != null && { - ResolverQueryLogConfigPolicy: input.ResolverQueryLogConfigPolicy, - }), - }; -}; +// se_PutResolverQueryLogConfigPolicyRequest omitted. -/** - * serializeAws_json1_1PutResolverRulePolicyRequest - */ -const se_PutResolverRulePolicyRequest = (input: PutResolverRulePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ResolverRulePolicy != null && { ResolverRulePolicy: input.ResolverRulePolicy }), - }; -}; +// se_PutResolverRulePolicyRequest omitted. -/** - * serializeAws_json1_1ResolverRuleConfig - */ -const se_ResolverRuleConfig = (input: ResolverRuleConfig, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - ...(input.TargetIps != null && { TargetIps: se_TargetList(input.TargetIps, context) }), - }; -}; +// se_ResolverRuleConfig omitted. -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1TargetAddress - */ -const se_TargetAddress = (input: TargetAddress, context: __SerdeContext): any => { - return { - ...(input.Ip != null && { Ip: input.Ip }), - ...(input.Ipv6 != null && { Ipv6: input.Ipv6 }), - ...(input.Port != null && { Port: input.Port }), - }; -}; +// se_TargetAddress omitted. -/** - * serializeAws_json1_1TargetList - */ -const se_TargetList = (input: TargetAddress[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetAddress(entry, context); - }); -}; +// se_TargetList omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateFirewallConfigRequest - */ -const se_UpdateFirewallConfigRequest = (input: UpdateFirewallConfigRequest, context: __SerdeContext): any => { - return { - ...(input.FirewallFailOpen != null && { FirewallFailOpen: input.FirewallFailOpen }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_UpdateFirewallConfigRequest omitted. -/** - * serializeAws_json1_1UpdateFirewallDomainsRequest - */ -const se_UpdateFirewallDomainsRequest = (input: UpdateFirewallDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.Domains != null && { Domains: se_FirewallDomains(input.Domains, context) }), - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - ...(input.Operation != null && { Operation: input.Operation }), - }; -}; +// se_UpdateFirewallDomainsRequest omitted. -/** - * serializeAws_json1_1UpdateFirewallRuleGroupAssociationRequest - */ -const se_UpdateFirewallRuleGroupAssociationRequest = ( - input: UpdateFirewallRuleGroupAssociationRequest, - context: __SerdeContext -): any => { - return { - ...(input.FirewallRuleGroupAssociationId != null && { - FirewallRuleGroupAssociationId: input.FirewallRuleGroupAssociationId, - }), - ...(input.MutationProtection != null && { MutationProtection: input.MutationProtection }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - }; -}; +// se_UpdateFirewallRuleGroupAssociationRequest omitted. -/** - * serializeAws_json1_1UpdateFirewallRuleRequest - */ -const se_UpdateFirewallRuleRequest = (input: UpdateFirewallRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.BlockOverrideDnsType != null && { BlockOverrideDnsType: input.BlockOverrideDnsType }), - ...(input.BlockOverrideDomain != null && { BlockOverrideDomain: input.BlockOverrideDomain }), - ...(input.BlockOverrideTtl != null && { BlockOverrideTtl: input.BlockOverrideTtl }), - ...(input.BlockResponse != null && { BlockResponse: input.BlockResponse }), - ...(input.FirewallDomainListId != null && { FirewallDomainListId: input.FirewallDomainListId }), - ...(input.FirewallRuleGroupId != null && { FirewallRuleGroupId: input.FirewallRuleGroupId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - }; -}; +// se_UpdateFirewallRuleRequest omitted. -/** - * serializeAws_json1_1UpdateIpAddress - */ -const se_UpdateIpAddress = (input: UpdateIpAddress, context: __SerdeContext): any => { - return { - ...(input.IpId != null && { IpId: input.IpId }), - ...(input.Ipv6 != null && { Ipv6: input.Ipv6 }), - }; -}; +// se_UpdateIpAddress omitted. -/** - * serializeAws_json1_1UpdateIpAddresses - */ -const se_UpdateIpAddresses = (input: UpdateIpAddress[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateIpAddress(entry, context); - }); -}; +// se_UpdateIpAddresses omitted. -/** - * serializeAws_json1_1UpdateResolverConfigRequest - */ -const se_UpdateResolverConfigRequest = (input: UpdateResolverConfigRequest, context: __SerdeContext): any => { - return { - ...(input.AutodefinedReverseFlag != null && { AutodefinedReverseFlag: input.AutodefinedReverseFlag }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_UpdateResolverConfigRequest omitted. -/** - * serializeAws_json1_1UpdateResolverDnssecConfigRequest - */ -const se_UpdateResolverDnssecConfigRequest = ( - input: UpdateResolverDnssecConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.Validation != null && { Validation: input.Validation }), - }; -}; +// se_UpdateResolverDnssecConfigRequest omitted. -/** - * serializeAws_json1_1UpdateResolverEndpointRequest - */ -const se_UpdateResolverEndpointRequest = (input: UpdateResolverEndpointRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ResolverEndpointId != null && { ResolverEndpointId: input.ResolverEndpointId }), - ...(input.ResolverEndpointType != null && { ResolverEndpointType: input.ResolverEndpointType }), - ...(input.UpdateIpAddresses != null && { - UpdateIpAddresses: se_UpdateIpAddresses(input.UpdateIpAddresses, context), - }), - }; -}; +// se_UpdateResolverEndpointRequest omitted. -/** - * serializeAws_json1_1UpdateResolverRuleRequest - */ -const se_UpdateResolverRuleRequest = (input: UpdateResolverRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Config != null && { Config: se_ResolverRuleConfig(input.Config, context) }), - ...(input.ResolverRuleId != null && { ResolverRuleId: input.ResolverRuleId }), - }; -}; +// se_UpdateResolverRuleRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AssociateFirewallRuleGroupResponse - */ -const de_AssociateFirewallRuleGroupResponse = ( - output: any, - context: __SerdeContext -): AssociateFirewallRuleGroupResponse => { - return { - FirewallRuleGroupAssociation: - output.FirewallRuleGroupAssociation != null - ? de_FirewallRuleGroupAssociation(output.FirewallRuleGroupAssociation, context) - : undefined, - } as any; -}; +// de_AssociateFirewallRuleGroupResponse omitted. -/** - * deserializeAws_json1_1AssociateResolverEndpointIpAddressResponse - */ -const de_AssociateResolverEndpointIpAddressResponse = ( - output: any, - context: __SerdeContext -): AssociateResolverEndpointIpAddressResponse => { - return { - ResolverEndpoint: - output.ResolverEndpoint != null ? de_ResolverEndpoint(output.ResolverEndpoint, context) : undefined, - } as any; -}; +// de_AssociateResolverEndpointIpAddressResponse omitted. -/** - * deserializeAws_json1_1AssociateResolverQueryLogConfigResponse - */ -const de_AssociateResolverQueryLogConfigResponse = ( - output: any, - context: __SerdeContext -): AssociateResolverQueryLogConfigResponse => { - return { - ResolverQueryLogConfigAssociation: - output.ResolverQueryLogConfigAssociation != null - ? de_ResolverQueryLogConfigAssociation(output.ResolverQueryLogConfigAssociation, context) - : undefined, - } as any; -}; +// de_AssociateResolverQueryLogConfigResponse omitted. -/** - * deserializeAws_json1_1AssociateResolverRuleResponse - */ -const de_AssociateResolverRuleResponse = (output: any, context: __SerdeContext): AssociateResolverRuleResponse => { - return { - ResolverRuleAssociation: - output.ResolverRuleAssociation != null - ? de_ResolverRuleAssociation(output.ResolverRuleAssociation, context) - : undefined, - } as any; -}; +// de_AssociateResolverRuleResponse omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1CreateFirewallDomainListResponse - */ -const de_CreateFirewallDomainListResponse = ( - output: any, - context: __SerdeContext -): CreateFirewallDomainListResponse => { - return { - FirewallDomainList: - output.FirewallDomainList != null ? de_FirewallDomainList(output.FirewallDomainList, context) : undefined, - } as any; -}; +// de_CreateFirewallDomainListResponse omitted. -/** - * deserializeAws_json1_1CreateFirewallRuleGroupResponse - */ -const de_CreateFirewallRuleGroupResponse = (output: any, context: __SerdeContext): CreateFirewallRuleGroupResponse => { - return { - FirewallRuleGroup: - output.FirewallRuleGroup != null ? de_FirewallRuleGroup(output.FirewallRuleGroup, context) : undefined, - } as any; -}; +// de_CreateFirewallRuleGroupResponse omitted. -/** - * deserializeAws_json1_1CreateFirewallRuleResponse - */ -const de_CreateFirewallRuleResponse = (output: any, context: __SerdeContext): CreateFirewallRuleResponse => { - return { - FirewallRule: output.FirewallRule != null ? de_FirewallRule(output.FirewallRule, context) : undefined, - } as any; -}; +// de_CreateFirewallRuleResponse omitted. -/** - * deserializeAws_json1_1CreateResolverEndpointResponse - */ -const de_CreateResolverEndpointResponse = (output: any, context: __SerdeContext): CreateResolverEndpointResponse => { - return { - ResolverEndpoint: - output.ResolverEndpoint != null ? de_ResolverEndpoint(output.ResolverEndpoint, context) : undefined, - } as any; -}; +// de_CreateResolverEndpointResponse omitted. -/** - * deserializeAws_json1_1CreateResolverQueryLogConfigResponse - */ -const de_CreateResolverQueryLogConfigResponse = ( - output: any, - context: __SerdeContext -): CreateResolverQueryLogConfigResponse => { - return { - ResolverQueryLogConfig: - output.ResolverQueryLogConfig != null - ? de_ResolverQueryLogConfig(output.ResolverQueryLogConfig, context) - : undefined, - } as any; -}; +// de_CreateResolverQueryLogConfigResponse omitted. -/** - * deserializeAws_json1_1CreateResolverRuleResponse - */ -const de_CreateResolverRuleResponse = (output: any, context: __SerdeContext): CreateResolverRuleResponse => { - return { - ResolverRule: output.ResolverRule != null ? de_ResolverRule(output.ResolverRule, context) : undefined, - } as any; -}; +// de_CreateResolverRuleResponse omitted. -/** - * deserializeAws_json1_1DeleteFirewallDomainListResponse - */ -const de_DeleteFirewallDomainListResponse = ( - output: any, - context: __SerdeContext -): DeleteFirewallDomainListResponse => { - return { - FirewallDomainList: - output.FirewallDomainList != null ? de_FirewallDomainList(output.FirewallDomainList, context) : undefined, - } as any; -}; +// de_DeleteFirewallDomainListResponse omitted. -/** - * deserializeAws_json1_1DeleteFirewallRuleGroupResponse - */ -const de_DeleteFirewallRuleGroupResponse = (output: any, context: __SerdeContext): DeleteFirewallRuleGroupResponse => { - return { - FirewallRuleGroup: - output.FirewallRuleGroup != null ? de_FirewallRuleGroup(output.FirewallRuleGroup, context) : undefined, - } as any; -}; +// de_DeleteFirewallRuleGroupResponse omitted. -/** - * deserializeAws_json1_1DeleteFirewallRuleResponse - */ -const de_DeleteFirewallRuleResponse = (output: any, context: __SerdeContext): DeleteFirewallRuleResponse => { - return { - FirewallRule: output.FirewallRule != null ? de_FirewallRule(output.FirewallRule, context) : undefined, - } as any; -}; +// de_DeleteFirewallRuleResponse omitted. -/** - * deserializeAws_json1_1DeleteResolverEndpointResponse - */ -const de_DeleteResolverEndpointResponse = (output: any, context: __SerdeContext): DeleteResolverEndpointResponse => { - return { - ResolverEndpoint: - output.ResolverEndpoint != null ? de_ResolverEndpoint(output.ResolverEndpoint, context) : undefined, - } as any; -}; +// de_DeleteResolverEndpointResponse omitted. -/** - * deserializeAws_json1_1DeleteResolverQueryLogConfigResponse - */ -const de_DeleteResolverQueryLogConfigResponse = ( - output: any, - context: __SerdeContext -): DeleteResolverQueryLogConfigResponse => { - return { - ResolverQueryLogConfig: - output.ResolverQueryLogConfig != null - ? de_ResolverQueryLogConfig(output.ResolverQueryLogConfig, context) - : undefined, - } as any; -}; +// de_DeleteResolverQueryLogConfigResponse omitted. -/** - * deserializeAws_json1_1DeleteResolverRuleResponse - */ -const de_DeleteResolverRuleResponse = (output: any, context: __SerdeContext): DeleteResolverRuleResponse => { - return { - ResolverRule: output.ResolverRule != null ? de_ResolverRule(output.ResolverRule, context) : undefined, - } as any; -}; +// de_DeleteResolverRuleResponse omitted. -/** - * deserializeAws_json1_1DisassociateFirewallRuleGroupResponse - */ -const de_DisassociateFirewallRuleGroupResponse = ( - output: any, - context: __SerdeContext -): DisassociateFirewallRuleGroupResponse => { - return { - FirewallRuleGroupAssociation: - output.FirewallRuleGroupAssociation != null - ? de_FirewallRuleGroupAssociation(output.FirewallRuleGroupAssociation, context) - : undefined, - } as any; -}; +// de_DisassociateFirewallRuleGroupResponse omitted. -/** - * deserializeAws_json1_1DisassociateResolverEndpointIpAddressResponse - */ -const de_DisassociateResolverEndpointIpAddressResponse = ( - output: any, - context: __SerdeContext -): DisassociateResolverEndpointIpAddressResponse => { - return { - ResolverEndpoint: - output.ResolverEndpoint != null ? de_ResolverEndpoint(output.ResolverEndpoint, context) : undefined, - } as any; -}; +// de_DisassociateResolverEndpointIpAddressResponse omitted. -/** - * deserializeAws_json1_1DisassociateResolverQueryLogConfigResponse - */ -const de_DisassociateResolverQueryLogConfigResponse = ( - output: any, - context: __SerdeContext -): DisassociateResolverQueryLogConfigResponse => { - return { - ResolverQueryLogConfigAssociation: - output.ResolverQueryLogConfigAssociation != null - ? de_ResolverQueryLogConfigAssociation(output.ResolverQueryLogConfigAssociation, context) - : undefined, - } as any; -}; +// de_DisassociateResolverQueryLogConfigResponse omitted. -/** - * deserializeAws_json1_1DisassociateResolverRuleResponse - */ -const de_DisassociateResolverRuleResponse = ( - output: any, - context: __SerdeContext -): DisassociateResolverRuleResponse => { - return { - ResolverRuleAssociation: - output.ResolverRuleAssociation != null - ? de_ResolverRuleAssociation(output.ResolverRuleAssociation, context) - : undefined, - } as any; -}; +// de_DisassociateResolverRuleResponse omitted. -/** - * deserializeAws_json1_1FirewallConfig - */ -const de_FirewallConfig = (output: any, context: __SerdeContext): FirewallConfig => { - return { - FirewallFailOpen: __expectString(output.FirewallFailOpen), - Id: __expectString(output.Id), - OwnerId: __expectString(output.OwnerId), - ResourceId: __expectString(output.ResourceId), - } as any; -}; +// de_FirewallConfig omitted. -/** - * deserializeAws_json1_1FirewallConfigList - */ -const de_FirewallConfigList = (output: any, context: __SerdeContext): FirewallConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallConfig(entry, context); - }); - return retVal; -}; +// de_FirewallConfigList omitted. -/** - * deserializeAws_json1_1FirewallDomainList - */ -const de_FirewallDomainList = (output: any, context: __SerdeContext): FirewallDomainList => { - return { - Arn: __expectString(output.Arn), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - DomainCount: __expectInt32(output.DomainCount), - Id: __expectString(output.Id), - ManagedOwnerName: __expectString(output.ManagedOwnerName), - ModificationTime: __expectString(output.ModificationTime), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_FirewallDomainList omitted. -/** - * deserializeAws_json1_1FirewallDomainListMetadata - */ -const de_FirewallDomainListMetadata = (output: any, context: __SerdeContext): FirewallDomainListMetadata => { - return { - Arn: __expectString(output.Arn), - CreatorRequestId: __expectString(output.CreatorRequestId), - Id: __expectString(output.Id), - ManagedOwnerName: __expectString(output.ManagedOwnerName), - Name: __expectString(output.Name), - } as any; -}; +// de_FirewallDomainListMetadata omitted. -/** - * deserializeAws_json1_1FirewallDomainListMetadataList - */ -const de_FirewallDomainListMetadataList = (output: any, context: __SerdeContext): FirewallDomainListMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallDomainListMetadata(entry, context); - }); - return retVal; -}; +// de_FirewallDomainListMetadataList omitted. -/** - * deserializeAws_json1_1FirewallDomains - */ -const de_FirewallDomains = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FirewallDomains omitted. -/** - * deserializeAws_json1_1FirewallRule - */ -const de_FirewallRule = (output: any, context: __SerdeContext): FirewallRule => { - return { - Action: __expectString(output.Action), - BlockOverrideDnsType: __expectString(output.BlockOverrideDnsType), - BlockOverrideDomain: __expectString(output.BlockOverrideDomain), - BlockOverrideTtl: __expectInt32(output.BlockOverrideTtl), - BlockResponse: __expectString(output.BlockResponse), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - FirewallDomainListId: __expectString(output.FirewallDomainListId), - FirewallRuleGroupId: __expectString(output.FirewallRuleGroupId), - ModificationTime: __expectString(output.ModificationTime), - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - } as any; -}; +// de_FirewallRule omitted. -/** - * deserializeAws_json1_1FirewallRuleGroup - */ -const de_FirewallRuleGroup = (output: any, context: __SerdeContext): FirewallRuleGroup => { - return { - Arn: __expectString(output.Arn), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - Id: __expectString(output.Id), - ModificationTime: __expectString(output.ModificationTime), - Name: __expectString(output.Name), - OwnerId: __expectString(output.OwnerId), - RuleCount: __expectInt32(output.RuleCount), - ShareStatus: __expectString(output.ShareStatus), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_FirewallRuleGroup omitted. -/** - * deserializeAws_json1_1FirewallRuleGroupAssociation - */ -const de_FirewallRuleGroupAssociation = (output: any, context: __SerdeContext): FirewallRuleGroupAssociation => { - return { - Arn: __expectString(output.Arn), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - FirewallRuleGroupId: __expectString(output.FirewallRuleGroupId), - Id: __expectString(output.Id), - ManagedOwnerName: __expectString(output.ManagedOwnerName), - ModificationTime: __expectString(output.ModificationTime), - MutationProtection: __expectString(output.MutationProtection), - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_FirewallRuleGroupAssociation omitted. -/** - * deserializeAws_json1_1FirewallRuleGroupAssociations - */ -const de_FirewallRuleGroupAssociations = (output: any, context: __SerdeContext): FirewallRuleGroupAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallRuleGroupAssociation(entry, context); - }); - return retVal; -}; +// de_FirewallRuleGroupAssociations omitted. -/** - * deserializeAws_json1_1FirewallRuleGroupMetadata - */ -const de_FirewallRuleGroupMetadata = (output: any, context: __SerdeContext): FirewallRuleGroupMetadata => { - return { - Arn: __expectString(output.Arn), - CreatorRequestId: __expectString(output.CreatorRequestId), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - OwnerId: __expectString(output.OwnerId), - ShareStatus: __expectString(output.ShareStatus), - } as any; -}; +// de_FirewallRuleGroupMetadata omitted. -/** - * deserializeAws_json1_1FirewallRuleGroupMetadataList - */ -const de_FirewallRuleGroupMetadataList = (output: any, context: __SerdeContext): FirewallRuleGroupMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallRuleGroupMetadata(entry, context); - }); - return retVal; -}; +// de_FirewallRuleGroupMetadataList omitted. -/** - * deserializeAws_json1_1FirewallRules - */ -const de_FirewallRules = (output: any, context: __SerdeContext): FirewallRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallRule(entry, context); - }); - return retVal; -}; +// de_FirewallRules omitted. -/** - * deserializeAws_json1_1GetFirewallConfigResponse - */ -const de_GetFirewallConfigResponse = (output: any, context: __SerdeContext): GetFirewallConfigResponse => { - return { - FirewallConfig: output.FirewallConfig != null ? de_FirewallConfig(output.FirewallConfig, context) : undefined, - } as any; -}; +// de_GetFirewallConfigResponse omitted. -/** - * deserializeAws_json1_1GetFirewallDomainListResponse - */ -const de_GetFirewallDomainListResponse = (output: any, context: __SerdeContext): GetFirewallDomainListResponse => { - return { - FirewallDomainList: - output.FirewallDomainList != null ? de_FirewallDomainList(output.FirewallDomainList, context) : undefined, - } as any; -}; +// de_GetFirewallDomainListResponse omitted. -/** - * deserializeAws_json1_1GetFirewallRuleGroupAssociationResponse - */ -const de_GetFirewallRuleGroupAssociationResponse = ( - output: any, - context: __SerdeContext -): GetFirewallRuleGroupAssociationResponse => { - return { - FirewallRuleGroupAssociation: - output.FirewallRuleGroupAssociation != null - ? de_FirewallRuleGroupAssociation(output.FirewallRuleGroupAssociation, context) - : undefined, - } as any; -}; +// de_GetFirewallRuleGroupAssociationResponse omitted. -/** - * deserializeAws_json1_1GetFirewallRuleGroupPolicyResponse - */ -const de_GetFirewallRuleGroupPolicyResponse = ( - output: any, - context: __SerdeContext -): GetFirewallRuleGroupPolicyResponse => { - return { - FirewallRuleGroupPolicy: __expectString(output.FirewallRuleGroupPolicy), - } as any; -}; +// de_GetFirewallRuleGroupPolicyResponse omitted. -/** - * deserializeAws_json1_1GetFirewallRuleGroupResponse - */ -const de_GetFirewallRuleGroupResponse = (output: any, context: __SerdeContext): GetFirewallRuleGroupResponse => { - return { - FirewallRuleGroup: - output.FirewallRuleGroup != null ? de_FirewallRuleGroup(output.FirewallRuleGroup, context) : undefined, - } as any; -}; +// de_GetFirewallRuleGroupResponse omitted. -/** - * deserializeAws_json1_1GetResolverConfigResponse - */ -const de_GetResolverConfigResponse = (output: any, context: __SerdeContext): GetResolverConfigResponse => { - return { - ResolverConfig: output.ResolverConfig != null ? de_ResolverConfig(output.ResolverConfig, context) : undefined, - } as any; -}; +// de_GetResolverConfigResponse omitted. -/** - * deserializeAws_json1_1GetResolverDnssecConfigResponse - */ -const de_GetResolverDnssecConfigResponse = (output: any, context: __SerdeContext): GetResolverDnssecConfigResponse => { - return { - ResolverDNSSECConfig: - output.ResolverDNSSECConfig != null ? de_ResolverDnssecConfig(output.ResolverDNSSECConfig, context) : undefined, - } as any; -}; +// de_GetResolverDnssecConfigResponse omitted. -/** - * deserializeAws_json1_1GetResolverEndpointResponse - */ -const de_GetResolverEndpointResponse = (output: any, context: __SerdeContext): GetResolverEndpointResponse => { - return { - ResolverEndpoint: - output.ResolverEndpoint != null ? de_ResolverEndpoint(output.ResolverEndpoint, context) : undefined, - } as any; -}; +// de_GetResolverEndpointResponse omitted. -/** - * deserializeAws_json1_1GetResolverQueryLogConfigAssociationResponse - */ -const de_GetResolverQueryLogConfigAssociationResponse = ( - output: any, - context: __SerdeContext -): GetResolverQueryLogConfigAssociationResponse => { - return { - ResolverQueryLogConfigAssociation: - output.ResolverQueryLogConfigAssociation != null - ? de_ResolverQueryLogConfigAssociation(output.ResolverQueryLogConfigAssociation, context) - : undefined, - } as any; -}; +// de_GetResolverQueryLogConfigAssociationResponse omitted. -/** - * deserializeAws_json1_1GetResolverQueryLogConfigPolicyResponse - */ -const de_GetResolverQueryLogConfigPolicyResponse = ( - output: any, - context: __SerdeContext -): GetResolverQueryLogConfigPolicyResponse => { - return { - ResolverQueryLogConfigPolicy: __expectString(output.ResolverQueryLogConfigPolicy), - } as any; -}; +// de_GetResolverQueryLogConfigPolicyResponse omitted. -/** - * deserializeAws_json1_1GetResolverQueryLogConfigResponse - */ -const de_GetResolverQueryLogConfigResponse = ( - output: any, - context: __SerdeContext -): GetResolverQueryLogConfigResponse => { - return { - ResolverQueryLogConfig: - output.ResolverQueryLogConfig != null - ? de_ResolverQueryLogConfig(output.ResolverQueryLogConfig, context) - : undefined, - } as any; -}; +// de_GetResolverQueryLogConfigResponse omitted. -/** - * deserializeAws_json1_1GetResolverRuleAssociationResponse - */ -const de_GetResolverRuleAssociationResponse = ( - output: any, - context: __SerdeContext -): GetResolverRuleAssociationResponse => { - return { - ResolverRuleAssociation: - output.ResolverRuleAssociation != null - ? de_ResolverRuleAssociation(output.ResolverRuleAssociation, context) - : undefined, - } as any; -}; +// de_GetResolverRuleAssociationResponse omitted. + +// de_GetResolverRulePolicyResponse omitted. -/** - * deserializeAws_json1_1GetResolverRulePolicyResponse - */ -const de_GetResolverRulePolicyResponse = (output: any, context: __SerdeContext): GetResolverRulePolicyResponse => { - return { - ResolverRulePolicy: __expectString(output.ResolverRulePolicy), - } as any; -}; +// de_GetResolverRuleResponse omitted. -/** - * deserializeAws_json1_1GetResolverRuleResponse - */ -const de_GetResolverRuleResponse = (output: any, context: __SerdeContext): GetResolverRuleResponse => { - return { - ResolverRule: output.ResolverRule != null ? de_ResolverRule(output.ResolverRule, context) : undefined, - } as any; -}; +// de_ImportFirewallDomainsResponse omitted. -/** - * deserializeAws_json1_1ImportFirewallDomainsResponse - */ -const de_ImportFirewallDomainsResponse = (output: any, context: __SerdeContext): ImportFirewallDomainsResponse => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_InternalServiceErrorException omitted. -/** - * deserializeAws_json1_1InternalServiceErrorException - */ -const de_InternalServiceErrorException = (output: any, context: __SerdeContext): InternalServiceErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - FieldName: __expectString(output.FieldName), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidPolicyDocument omitted. -/** - * deserializeAws_json1_1InvalidPolicyDocument - */ -const de_InvalidPolicyDocument = (output: any, context: __SerdeContext): InvalidPolicyDocument => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidTagException omitted. -/** - * deserializeAws_json1_1InvalidTagException - */ -const de_InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_IpAddressesResponse omitted. -/** - * deserializeAws_json1_1IpAddressesResponse - */ -const de_IpAddressesResponse = (output: any, context: __SerdeContext): IpAddressResponse[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IpAddressResponse(entry, context); - }); - return retVal; -}; +// de_IpAddressResponse omitted. -/** - * deserializeAws_json1_1IpAddressResponse - */ -const de_IpAddressResponse = (output: any, context: __SerdeContext): IpAddressResponse => { - return { - CreationTime: __expectString(output.CreationTime), - Ip: __expectString(output.Ip), - IpId: __expectString(output.IpId), - Ipv6: __expectString(output.Ipv6), - ModificationTime: __expectString(output.ModificationTime), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - SubnetId: __expectString(output.SubnetId), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ListFirewallConfigsResponse omitted. -/** - * deserializeAws_json1_1ListFirewallConfigsResponse - */ -const de_ListFirewallConfigsResponse = (output: any, context: __SerdeContext): ListFirewallConfigsResponse => { - return { - FirewallConfigs: - output.FirewallConfigs != null ? de_FirewallConfigList(output.FirewallConfigs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListFirewallDomainListsResponse omitted. -/** - * deserializeAws_json1_1ListFirewallDomainListsResponse - */ -const de_ListFirewallDomainListsResponse = (output: any, context: __SerdeContext): ListFirewallDomainListsResponse => { - return { - FirewallDomainLists: - output.FirewallDomainLists != null - ? de_FirewallDomainListMetadataList(output.FirewallDomainLists, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListFirewallDomainsResponse omitted. -/** - * deserializeAws_json1_1ListFirewallDomainsResponse - */ -const de_ListFirewallDomainsResponse = (output: any, context: __SerdeContext): ListFirewallDomainsResponse => { - return { - Domains: output.Domains != null ? de_FirewallDomains(output.Domains, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListFirewallRuleGroupAssociationsResponse omitted. -/** - * deserializeAws_json1_1ListFirewallRuleGroupAssociationsResponse - */ -const de_ListFirewallRuleGroupAssociationsResponse = ( - output: any, - context: __SerdeContext -): ListFirewallRuleGroupAssociationsResponse => { - return { - FirewallRuleGroupAssociations: - output.FirewallRuleGroupAssociations != null - ? de_FirewallRuleGroupAssociations(output.FirewallRuleGroupAssociations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListFirewallRuleGroupsResponse omitted. -/** - * deserializeAws_json1_1ListFirewallRuleGroupsResponse - */ -const de_ListFirewallRuleGroupsResponse = (output: any, context: __SerdeContext): ListFirewallRuleGroupsResponse => { - return { - FirewallRuleGroups: - output.FirewallRuleGroups != null - ? de_FirewallRuleGroupMetadataList(output.FirewallRuleGroups, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListFirewallRulesResponse omitted. -/** - * deserializeAws_json1_1ListFirewallRulesResponse - */ -const de_ListFirewallRulesResponse = (output: any, context: __SerdeContext): ListFirewallRulesResponse => { - return { - FirewallRules: output.FirewallRules != null ? de_FirewallRules(output.FirewallRules, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListResolverConfigsResponse omitted. -/** - * deserializeAws_json1_1ListResolverConfigsResponse - */ -const de_ListResolverConfigsResponse = (output: any, context: __SerdeContext): ListResolverConfigsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResolverConfigs: - output.ResolverConfigs != null ? de_ResolverConfigList(output.ResolverConfigs, context) : undefined, - } as any; -}; +// de_ListResolverDnssecConfigsResponse omitted. -/** - * deserializeAws_json1_1ListResolverDnssecConfigsResponse - */ -const de_ListResolverDnssecConfigsResponse = ( - output: any, - context: __SerdeContext -): ListResolverDnssecConfigsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResolverDnssecConfigs: - output.ResolverDnssecConfigs != null - ? de_ResolverDnssecConfigList(output.ResolverDnssecConfigs, context) - : undefined, - } as any; -}; +// de_ListResolverEndpointIpAddressesResponse omitted. -/** - * deserializeAws_json1_1ListResolverEndpointIpAddressesResponse - */ -const de_ListResolverEndpointIpAddressesResponse = ( - output: any, - context: __SerdeContext -): ListResolverEndpointIpAddressesResponse => { - return { - IpAddresses: output.IpAddresses != null ? de_IpAddressesResponse(output.IpAddresses, context) : undefined, - MaxResults: __expectInt32(output.MaxResults), - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListResolverEndpointsResponse omitted. -/** - * deserializeAws_json1_1ListResolverEndpointsResponse - */ -const de_ListResolverEndpointsResponse = (output: any, context: __SerdeContext): ListResolverEndpointsResponse => { - return { - MaxResults: __expectInt32(output.MaxResults), - NextToken: __expectString(output.NextToken), - ResolverEndpoints: - output.ResolverEndpoints != null ? de_ResolverEndpoints(output.ResolverEndpoints, context) : undefined, - } as any; -}; +// de_ListResolverQueryLogConfigAssociationsResponse omitted. -/** - * deserializeAws_json1_1ListResolverQueryLogConfigAssociationsResponse - */ -const de_ListResolverQueryLogConfigAssociationsResponse = ( - output: any, - context: __SerdeContext -): ListResolverQueryLogConfigAssociationsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResolverQueryLogConfigAssociations: - output.ResolverQueryLogConfigAssociations != null - ? de_ResolverQueryLogConfigAssociationList(output.ResolverQueryLogConfigAssociations, context) - : undefined, - TotalCount: __expectInt32(output.TotalCount), - TotalFilteredCount: __expectInt32(output.TotalFilteredCount), - } as any; -}; +// de_ListResolverQueryLogConfigsResponse omitted. -/** - * deserializeAws_json1_1ListResolverQueryLogConfigsResponse - */ -const de_ListResolverQueryLogConfigsResponse = ( - output: any, - context: __SerdeContext -): ListResolverQueryLogConfigsResponse => { - return { - NextToken: __expectString(output.NextToken), - ResolverQueryLogConfigs: - output.ResolverQueryLogConfigs != null - ? de_ResolverQueryLogConfigList(output.ResolverQueryLogConfigs, context) - : undefined, - TotalCount: __expectInt32(output.TotalCount), - TotalFilteredCount: __expectInt32(output.TotalFilteredCount), - } as any; -}; +// de_ListResolverRuleAssociationsResponse omitted. -/** - * deserializeAws_json1_1ListResolverRuleAssociationsResponse - */ -const de_ListResolverRuleAssociationsResponse = ( - output: any, - context: __SerdeContext -): ListResolverRuleAssociationsResponse => { - return { - MaxResults: __expectInt32(output.MaxResults), - NextToken: __expectString(output.NextToken), - ResolverRuleAssociations: - output.ResolverRuleAssociations != null - ? de_ResolverRuleAssociations(output.ResolverRuleAssociations, context) - : undefined, - } as any; -}; +// de_ListResolverRulesResponse omitted. -/** - * deserializeAws_json1_1ListResolverRulesResponse - */ -const de_ListResolverRulesResponse = (output: any, context: __SerdeContext): ListResolverRulesResponse => { - return { - MaxResults: __expectInt32(output.MaxResults), - NextToken: __expectString(output.NextToken), - ResolverRules: output.ResolverRules != null ? de_ResolverRules(output.ResolverRules, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_PutFirewallRuleGroupPolicyResponse omitted. -/** - * deserializeAws_json1_1PutFirewallRuleGroupPolicyResponse - */ -const de_PutFirewallRuleGroupPolicyResponse = ( - output: any, - context: __SerdeContext -): PutFirewallRuleGroupPolicyResponse => { - return { - ReturnValue: __expectBoolean(output.ReturnValue), - } as any; -}; +// de_PutResolverQueryLogConfigPolicyResponse omitted. -/** - * deserializeAws_json1_1PutResolverQueryLogConfigPolicyResponse - */ -const de_PutResolverQueryLogConfigPolicyResponse = ( - output: any, - context: __SerdeContext -): PutResolverQueryLogConfigPolicyResponse => { - return { - ReturnValue: __expectBoolean(output.ReturnValue), - } as any; -}; +// de_PutResolverRulePolicyResponse omitted. -/** - * deserializeAws_json1_1PutResolverRulePolicyResponse - */ -const de_PutResolverRulePolicyResponse = (output: any, context: __SerdeContext): PutResolverRulePolicyResponse => { - return { - ReturnValue: __expectBoolean(output.ReturnValue), - } as any; -}; +// de_ResolverConfig omitted. -/** - * deserializeAws_json1_1ResolverConfig - */ -const de_ResolverConfig = (output: any, context: __SerdeContext): ResolverConfig => { - return { - AutodefinedReverse: __expectString(output.AutodefinedReverse), - Id: __expectString(output.Id), - OwnerId: __expectString(output.OwnerId), - ResourceId: __expectString(output.ResourceId), - } as any; -}; +// de_ResolverConfigList omitted. -/** - * deserializeAws_json1_1ResolverConfigList - */ -const de_ResolverConfigList = (output: any, context: __SerdeContext): ResolverConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverConfig(entry, context); - }); - return retVal; -}; +// de_ResolverDnssecConfig omitted. -/** - * deserializeAws_json1_1ResolverDnssecConfig - */ -const de_ResolverDnssecConfig = (output: any, context: __SerdeContext): ResolverDnssecConfig => { - return { - Id: __expectString(output.Id), - OwnerId: __expectString(output.OwnerId), - ResourceId: __expectString(output.ResourceId), - ValidationStatus: __expectString(output.ValidationStatus), - } as any; -}; +// de_ResolverDnssecConfigList omitted. -/** - * deserializeAws_json1_1ResolverDnssecConfigList - */ -const de_ResolverDnssecConfigList = (output: any, context: __SerdeContext): ResolverDnssecConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverDnssecConfig(entry, context); - }); - return retVal; -}; +// de_ResolverEndpoint omitted. -/** - * deserializeAws_json1_1ResolverEndpoint - */ -const de_ResolverEndpoint = (output: any, context: __SerdeContext): ResolverEndpoint => { - return { - Arn: __expectString(output.Arn), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - Direction: __expectString(output.Direction), - HostVPCId: __expectString(output.HostVPCId), - Id: __expectString(output.Id), - IpAddressCount: __expectInt32(output.IpAddressCount), - ModificationTime: __expectString(output.ModificationTime), - Name: __expectString(output.Name), - ResolverEndpointType: __expectString(output.ResolverEndpointType), - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_json1_1ResolverEndpoints - */ -const de_ResolverEndpoints = (output: any, context: __SerdeContext): ResolverEndpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverEndpoint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ResolverQueryLogConfig - */ -const de_ResolverQueryLogConfig = (output: any, context: __SerdeContext): ResolverQueryLogConfig => { - return { - Arn: __expectString(output.Arn), - AssociationCount: __expectInt32(output.AssociationCount), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - DestinationArn: __expectString(output.DestinationArn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - OwnerId: __expectString(output.OwnerId), - ShareStatus: __expectString(output.ShareStatus), - Status: __expectString(output.Status), - } as any; -}; +// de_ResolverEndpoints omitted. -/** - * deserializeAws_json1_1ResolverQueryLogConfigAssociation - */ -const de_ResolverQueryLogConfigAssociation = ( - output: any, - context: __SerdeContext -): ResolverQueryLogConfigAssociation => { - return { - CreationTime: __expectString(output.CreationTime), - Error: __expectString(output.Error), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - ResolverQueryLogConfigId: __expectString(output.ResolverQueryLogConfigId), - ResourceId: __expectString(output.ResourceId), - Status: __expectString(output.Status), - } as any; -}; +// de_ResolverQueryLogConfig omitted. -/** - * deserializeAws_json1_1ResolverQueryLogConfigAssociationList - */ -const de_ResolverQueryLogConfigAssociationList = ( - output: any, - context: __SerdeContext -): ResolverQueryLogConfigAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverQueryLogConfigAssociation(entry, context); - }); - return retVal; -}; +// de_ResolverQueryLogConfigAssociation omitted. -/** - * deserializeAws_json1_1ResolverQueryLogConfigList - */ -const de_ResolverQueryLogConfigList = (output: any, context: __SerdeContext): ResolverQueryLogConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverQueryLogConfig(entry, context); - }); - return retVal; -}; +// de_ResolverQueryLogConfigAssociationList omitted. -/** - * deserializeAws_json1_1ResolverRule - */ -const de_ResolverRule = (output: any, context: __SerdeContext): ResolverRule => { - return { - Arn: __expectString(output.Arn), - CreationTime: __expectString(output.CreationTime), - CreatorRequestId: __expectString(output.CreatorRequestId), - DomainName: __expectString(output.DomainName), - Id: __expectString(output.Id), - ModificationTime: __expectString(output.ModificationTime), - Name: __expectString(output.Name), - OwnerId: __expectString(output.OwnerId), - ResolverEndpointId: __expectString(output.ResolverEndpointId), - RuleType: __expectString(output.RuleType), - ShareStatus: __expectString(output.ShareStatus), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - TargetIps: output.TargetIps != null ? de_TargetList(output.TargetIps, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResolverRuleAssociation - */ -const de_ResolverRuleAssociation = (output: any, context: __SerdeContext): ResolverRuleAssociation => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ResolverRuleId: __expectString(output.ResolverRuleId), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - VPCId: __expectString(output.VPCId), - } as any; -}; +// de_ResolverQueryLogConfigList omitted. -/** - * deserializeAws_json1_1ResolverRuleAssociations - */ -const de_ResolverRuleAssociations = (output: any, context: __SerdeContext): ResolverRuleAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverRuleAssociation(entry, context); - }); - return retVal; -}; +// de_ResolverRule omitted. -/** - * deserializeAws_json1_1ResolverRules - */ -const de_ResolverRules = (output: any, context: __SerdeContext): ResolverRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolverRule(entry, context); - }); - return retVal; -}; +// de_ResolverRuleAssociation omitted. -/** - * deserializeAws_json1_1ResourceExistsException - */ -const de_ResourceExistsException = (output: any, context: __SerdeContext): ResourceExistsException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResolverRuleAssociations omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResolverRules omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResourceExistsException omitted. -/** - * deserializeAws_json1_1ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResourceInUseException omitted. -/** - * deserializeAws_json1_1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_ResourceUnavailableException omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TargetAddress - */ -const de_TargetAddress = (output: any, context: __SerdeContext): TargetAddress => { - return { - Ip: __expectString(output.Ip), - Ipv6: __expectString(output.Ipv6), - Port: __expectInt32(output.Port), - } as any; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TargetList - */ -const de_TargetList = (output: any, context: __SerdeContext): TargetAddress[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetAddress(entry, context); - }); - return retVal; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetAddress omitted. -/** - * deserializeAws_json1_1UnknownResourceException - */ -const de_UnknownResourceException = (output: any, context: __SerdeContext): UnknownResourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetList omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UpdateFirewallConfigResponse - */ -const de_UpdateFirewallConfigResponse = (output: any, context: __SerdeContext): UpdateFirewallConfigResponse => { - return { - FirewallConfig: output.FirewallConfig != null ? de_FirewallConfig(output.FirewallConfig, context) : undefined, - } as any; -}; +// de_UnknownResourceException omitted. -/** - * deserializeAws_json1_1UpdateFirewallDomainsResponse - */ -const de_UpdateFirewallDomainsResponse = (output: any, context: __SerdeContext): UpdateFirewallDomainsResponse => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateFirewallRuleGroupAssociationResponse - */ -const de_UpdateFirewallRuleGroupAssociationResponse = ( - output: any, - context: __SerdeContext -): UpdateFirewallRuleGroupAssociationResponse => { - return { - FirewallRuleGroupAssociation: - output.FirewallRuleGroupAssociation != null - ? de_FirewallRuleGroupAssociation(output.FirewallRuleGroupAssociation, context) - : undefined, - } as any; -}; +// de_UpdateFirewallConfigResponse omitted. -/** - * deserializeAws_json1_1UpdateFirewallRuleResponse - */ -const de_UpdateFirewallRuleResponse = (output: any, context: __SerdeContext): UpdateFirewallRuleResponse => { - return { - FirewallRule: output.FirewallRule != null ? de_FirewallRule(output.FirewallRule, context) : undefined, - } as any; -}; +// de_UpdateFirewallDomainsResponse omitted. -/** - * deserializeAws_json1_1UpdateResolverConfigResponse - */ -const de_UpdateResolverConfigResponse = (output: any, context: __SerdeContext): UpdateResolverConfigResponse => { - return { - ResolverConfig: output.ResolverConfig != null ? de_ResolverConfig(output.ResolverConfig, context) : undefined, - } as any; -}; +// de_UpdateFirewallRuleGroupAssociationResponse omitted. -/** - * deserializeAws_json1_1UpdateResolverDnssecConfigResponse - */ -const de_UpdateResolverDnssecConfigResponse = ( - output: any, - context: __SerdeContext -): UpdateResolverDnssecConfigResponse => { - return { - ResolverDNSSECConfig: - output.ResolverDNSSECConfig != null ? de_ResolverDnssecConfig(output.ResolverDNSSECConfig, context) : undefined, - } as any; -}; +// de_UpdateFirewallRuleResponse omitted. -/** - * deserializeAws_json1_1UpdateResolverEndpointResponse - */ -const de_UpdateResolverEndpointResponse = (output: any, context: __SerdeContext): UpdateResolverEndpointResponse => { - return { - ResolverEndpoint: - output.ResolverEndpoint != null ? de_ResolverEndpoint(output.ResolverEndpoint, context) : undefined, - } as any; -}; +// de_UpdateResolverConfigResponse omitted. -/** - * deserializeAws_json1_1UpdateResolverRuleResponse - */ -const de_UpdateResolverRuleResponse = (output: any, context: __SerdeContext): UpdateResolverRuleResponse => { - return { - ResolverRule: output.ResolverRule != null ? de_ResolverRule(output.ResolverRule, context) : undefined, - } as any; -}; +// de_UpdateResolverDnssecConfigResponse omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UpdateResolverEndpointResponse omitted. + +// de_UpdateResolverRuleResponse omitted. + +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -7660,6 +5612,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-rum/src/protocols/Aws_restJson1.ts b/clients/client-rum/src/protocols/Aws_restJson1.ts index 541dff2f5667..6733690743f6 100644 --- a/clients/client-rum/src/protocols/Aws_restJson1.ts +++ b/clients/client-rum/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -13,11 +14,12 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, - map as __map, + map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -71,17 +73,10 @@ import { AppMonitor, AppMonitorConfiguration, AppMonitorDetails, - AppMonitorSummary, - BatchCreateRumMetricDefinitionsError, - BatchDeleteRumMetricDefinitionsError, ConflictException, CustomEvents, - CwLog, - DataStorage, InternalServerException, - MetricDefinition, MetricDefinitionRequest, - MetricDestinationSummary, QueryFilter, ResourceNotFoundException, RumEvent, @@ -116,13 +111,13 @@ export const se_BatchCreateRumMetricDefinitionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.MetricDefinitions != null && { - MetricDefinitions: se_MetricDefinitionsRequest(input.MetricDefinitions, context), - }), - }); + body = JSON.stringify( + take(input, { + Destination: [], + DestinationArn: [], + MetricDefinitions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -225,16 +220,16 @@ export const se_CreateAppMonitorCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor"; let body: any; - body = JSON.stringify({ - ...(input.AppMonitorConfiguration != null && { - AppMonitorConfiguration: se_AppMonitorConfiguration(input.AppMonitorConfiguration, context), - }), - ...(input.CustomEvents != null && { CustomEvents: se_CustomEvents(input.CustomEvents, context) }), - ...(input.CwLogEnabled != null && { CwLogEnabled: input.CwLogEnabled }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context), + CustomEvents: (_) => _json(_), + CwLogEnabled: [], + Domain: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -343,12 +338,14 @@ export const se_GetAppMonitorDataCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}/data"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_QueryFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TimeRange != null && { TimeRange: se_TimeRange(input.TimeRange, context) }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + TimeRange: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -461,14 +458,14 @@ export const se_PutRumEventsCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitors/{Id}"; resolvedPath = __resolvedPath(resolvedPath, input, "Id", () => input.Id!, "{Id}", false); let body: any; - body = JSON.stringify({ - ...(input.AppMonitorDetails != null && { - AppMonitorDetails: se_AppMonitorDetails(input.AppMonitorDetails, context), - }), - ...(input.BatchId != null && { BatchId: input.BatchId }), - ...(input.RumEvents != null && { RumEvents: se_RumEventList(input.RumEvents, context) }), - ...(input.UserDetails != null && { UserDetails: se_UserDetails(input.UserDetails, context) }), - }); + body = JSON.stringify( + take(input, { + AppMonitorDetails: (_) => _json(_), + BatchId: [], + RumEvents: (_) => se_RumEventList(_, context), + UserDetails: (_) => _json(_), + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "dataplane." + resolvedHostname; @@ -510,11 +507,13 @@ export const se_PutRumMetricsDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - }); + body = JSON.stringify( + take(input, { + Destination: [], + DestinationArn: [], + IamRoleArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -540,9 +539,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -598,14 +599,14 @@ export const se_UpdateAppMonitorCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/appmonitor/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.AppMonitorConfiguration != null && { - AppMonitorConfiguration: se_AppMonitorConfiguration(input.AppMonitorConfiguration, context), - }), - ...(input.CustomEvents != null && { CustomEvents: se_CustomEvents(input.CustomEvents, context) }), - ...(input.CwLogEnabled != null && { CwLogEnabled: input.CwLogEnabled }), - ...(input.Domain != null && { Domain: input.Domain }), - }); + body = JSON.stringify( + take(input, { + AppMonitorConfiguration: (_) => se_AppMonitorConfiguration(_, context), + CustomEvents: (_) => _json(_), + CwLogEnabled: [], + Domain: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -639,14 +640,14 @@ export const se_UpdateRumMetricDefinitionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.MetricDefinition != null && { - MetricDefinition: se_MetricDefinitionRequest(input.MetricDefinition, context), - }), - ...(input.MetricDefinitionId != null && { MetricDefinitionId: input.MetricDefinitionId }), - }); + body = JSON.stringify( + take(input, { + Destination: [], + DestinationArn: [], + MetricDefinition: (_) => _json(_), + MetricDefinitionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -672,12 +673,11 @@ export const de_BatchCreateRumMetricDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchCreateRumMetricDefinitionsErrors(data.Errors, context); - } - if (data.MetricDefinitions != null) { - contents.MetricDefinitions = de_MetricDefinitions(data.MetricDefinitions, context); - } + const doc = take(data, { + Errors: _json, + MetricDefinitions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -717,10 +717,9 @@ const de_BatchCreateRumMetricDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -740,12 +739,11 @@ export const de_BatchDeleteRumMetricDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchDeleteRumMetricDefinitionsErrors(data.Errors, context); - } - if (data.MetricDefinitionIds != null) { - contents.MetricDefinitionIds = de_MetricDefinitionIds(data.MetricDefinitionIds, context); - } + const doc = take(data, { + Errors: _json, + MetricDefinitionIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -782,10 +780,9 @@ const de_BatchDeleteRumMetricDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -805,12 +802,11 @@ export const de_BatchGetRumMetricDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MetricDefinitions != null) { - contents.MetricDefinitions = de_MetricDefinitions(data.MetricDefinitions, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + MetricDefinitions: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -841,10 +837,9 @@ const de_BatchGetRumMetricDefinitionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -864,9 +859,10 @@ export const de_CreateAppMonitorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Id != null) { - contents.Id = __expectString(data.Id); - } + const doc = take(data, { + Id: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -906,10 +902,9 @@ const de_CreateAppMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -965,10 +960,9 @@ const de_DeleteAppMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1024,10 +1018,9 @@ const de_DeleteRumMetricsDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1047,9 +1040,10 @@ export const de_GetAppMonitorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppMonitor != null) { - contents.AppMonitor = de_AppMonitor(data.AppMonitor, context); - } + const doc = take(data, { + AppMonitor: (_) => de_AppMonitor(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1083,10 +1077,9 @@ const de_GetAppMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1106,12 +1099,11 @@ export const de_GetAppMonitorDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Events != null) { - contents.Events = de_EventDataList(data.Events, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Events: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1145,10 +1137,9 @@ const de_GetAppMonitorDataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1168,12 +1159,11 @@ export const de_ListAppMonitorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AppMonitorSummaries != null) { - contents.AppMonitorSummaries = de_AppMonitorSummaryList(data.AppMonitorSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AppMonitorSummaries: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1204,10 +1194,9 @@ const de_ListAppMonitorsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1227,12 +1216,11 @@ export const de_ListRumMetricsDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Destinations != null) { - contents.Destinations = de_MetricDestinationSummaryList(data.Destinations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Destinations: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1263,10 +1251,9 @@ const de_ListRumMetricsDestinationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1286,12 +1273,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourceArn != null) { - contents.ResourceArn = __expectString(data.ResourceArn); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + ResourceArn: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1319,10 +1305,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1375,10 +1360,9 @@ const de_PutRumEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1434,10 +1418,9 @@ const de_PutRumMetricsDestinationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1484,10 +1467,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,10 +1516,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1593,10 +1574,9 @@ const de_UpdateAppMonitorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1655,16 +1635,15 @@ const de_UpdateRumMetricDefinitionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1674,9 +1653,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1690,15 +1670,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceName != null) { - contents.resourceName = __expectString(data.resourceName); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1720,9 +1697,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1739,15 +1717,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceName != null) { - contents.resourceName = __expectString(data.resourceName); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1764,9 +1739,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1785,15 +1761,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1807,9 +1780,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1821,142 +1795,50 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_restJson1AppMonitorConfiguration */ const se_AppMonitorConfiguration = (input: AppMonitorConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowCookies != null && { AllowCookies: input.AllowCookies }), - ...(input.EnableXRay != null && { EnableXRay: input.EnableXRay }), - ...(input.ExcludedPages != null && { ExcludedPages: se_Pages(input.ExcludedPages, context) }), - ...(input.FavoritePages != null && { FavoritePages: se_FavoritePages(input.FavoritePages, context) }), - ...(input.GuestRoleArn != null && { GuestRoleArn: input.GuestRoleArn }), - ...(input.IdentityPoolId != null && { IdentityPoolId: input.IdentityPoolId }), - ...(input.IncludedPages != null && { IncludedPages: se_Pages(input.IncludedPages, context) }), - ...(input.SessionSampleRate != null && { SessionSampleRate: __serializeFloat(input.SessionSampleRate) }), - ...(input.Telemetries != null && { Telemetries: se_Telemetries(input.Telemetries, context) }), - }; + return take(input, { + AllowCookies: [], + EnableXRay: [], + ExcludedPages: _json, + FavoritePages: _json, + GuestRoleArn: [], + IdentityPoolId: [], + IncludedPages: _json, + SessionSampleRate: __serializeFloat, + Telemetries: _json, + }); }; -/** - * serializeAws_restJson1AppMonitorDetails - */ -const se_AppMonitorDetails = (input: AppMonitorDetails, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_AppMonitorDetails omitted. -/** - * serializeAws_restJson1CustomEvents - */ -const se_CustomEvents = (input: CustomEvents, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_CustomEvents omitted. -/** - * serializeAws_restJson1DimensionKeysMap - */ -const se_DimensionKeysMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DimensionKeysMap omitted. -/** - * serializeAws_restJson1FavoritePages - */ -const se_FavoritePages = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FavoritePages omitted. -/** - * serializeAws_restJson1MetricDefinitionRequest - */ -const se_MetricDefinitionRequest = (input: MetricDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.DimensionKeys != null && { DimensionKeys: se_DimensionKeysMap(input.DimensionKeys, context) }), - ...(input.EventPattern != null && { EventPattern: input.EventPattern }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.UnitLabel != null && { UnitLabel: input.UnitLabel }), - ...(input.ValueKey != null && { ValueKey: input.ValueKey }), - }; -}; +// se_MetricDefinitionRequest omitted. -/** - * serializeAws_restJson1MetricDefinitionsRequest - */ -const se_MetricDefinitionsRequest = (input: MetricDefinitionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricDefinitionRequest(entry, context); - }); -}; +// se_MetricDefinitionsRequest omitted. -/** - * serializeAws_restJson1Pages - */ -const se_Pages = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Pages omitted. -/** - * serializeAws_restJson1QueryFilter - */ -const se_QueryFilter = (input: QueryFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_QueryFilterValueList(input.Values, context) }), - }; -}; +// se_QueryFilter omitted. -/** - * serializeAws_restJson1QueryFilters - */ -const se_QueryFilters = (input: QueryFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_QueryFilter(entry, context); - }); -}; +// se_QueryFilters omitted. -/** - * serializeAws_restJson1QueryFilterValueList - */ -const se_QueryFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_QueryFilterValueList omitted. /** * serializeAws_restJson1RumEvent */ const se_RumEvent = (input: RumEvent, context: __SerdeContext): any => { - return { - ...(input.details != null && { details: __LazyJsonString.fromObject(input.details) }), - ...(input.id != null && { id: input.id }), - ...(input.metadata != null && { metadata: __LazyJsonString.fromObject(input.metadata) }), - ...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }), - ...(input.type != null && { type: input.type }), - }; + return take(input, { + details: __LazyJsonString.fromObject, + id: [], + metadata: __LazyJsonString.fromObject, + timestamp: (_) => Math.round(_.getTime() / 1000), + type: [], + }); }; /** @@ -1970,379 +1852,90 @@ const se_RumEventList = (input: RumEvent[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1Telemetries - */ -const se_Telemetries = (input: (Telemetry | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Telemetries omitted. -/** - * serializeAws_restJson1TimeRange - */ -const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { - return { - ...(input.After != null && { After: input.After }), - ...(input.Before != null && { Before: input.Before }), - }; -}; +// se_TimeRange omitted. -/** - * serializeAws_restJson1UserDetails - */ -const se_UserDetails = (input: UserDetails, context: __SerdeContext): any => { - return { - ...(input.sessionId != null && { sessionId: input.sessionId }), - ...(input.userId != null && { userId: input.userId }), - }; -}; +// se_UserDetails omitted. /** * deserializeAws_restJson1AppMonitor */ const de_AppMonitor = (output: any, context: __SerdeContext): AppMonitor => { - return { - AppMonitorConfiguration: - output.AppMonitorConfiguration != null - ? de_AppMonitorConfiguration(output.AppMonitorConfiguration, context) - : undefined, - Created: __expectString(output.Created), - CustomEvents: output.CustomEvents != null ? de_CustomEvents(output.CustomEvents, context) : undefined, - DataStorage: output.DataStorage != null ? de_DataStorage(output.DataStorage, context) : undefined, - Domain: __expectString(output.Domain), - Id: __expectString(output.Id), - LastModified: __expectString(output.LastModified), - Name: __expectString(output.Name), - State: __expectString(output.State), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + AppMonitorConfiguration: (_: any) => de_AppMonitorConfiguration(_, context), + Created: __expectString, + CustomEvents: _json, + DataStorage: _json, + Domain: __expectString, + Id: __expectString, + LastModified: __expectString, + Name: __expectString, + State: __expectString, + Tags: _json, + }) as any; }; /** * deserializeAws_restJson1AppMonitorConfiguration */ const de_AppMonitorConfiguration = (output: any, context: __SerdeContext): AppMonitorConfiguration => { - return { - AllowCookies: __expectBoolean(output.AllowCookies), - EnableXRay: __expectBoolean(output.EnableXRay), - ExcludedPages: output.ExcludedPages != null ? de_Pages(output.ExcludedPages, context) : undefined, - FavoritePages: output.FavoritePages != null ? de_FavoritePages(output.FavoritePages, context) : undefined, - GuestRoleArn: __expectString(output.GuestRoleArn), - IdentityPoolId: __expectString(output.IdentityPoolId), - IncludedPages: output.IncludedPages != null ? de_Pages(output.IncludedPages, context) : undefined, - SessionSampleRate: __limitedParseDouble(output.SessionSampleRate), - Telemetries: output.Telemetries != null ? de_Telemetries(output.Telemetries, context) : undefined, - } as any; + return take(output, { + AllowCookies: __expectBoolean, + EnableXRay: __expectBoolean, + ExcludedPages: _json, + FavoritePages: _json, + GuestRoleArn: __expectString, + IdentityPoolId: __expectString, + IncludedPages: _json, + SessionSampleRate: __limitedParseDouble, + Telemetries: _json, + }) as any; }; -/** - * deserializeAws_restJson1AppMonitorSummary - */ -const de_AppMonitorSummary = (output: any, context: __SerdeContext): AppMonitorSummary => { - return { - Created: __expectString(output.Created), - Id: __expectString(output.Id), - LastModified: __expectString(output.LastModified), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; +// de_AppMonitorSummary omitted. -/** - * deserializeAws_restJson1AppMonitorSummaryList - */ -const de_AppMonitorSummaryList = (output: any, context: __SerdeContext): AppMonitorSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppMonitorSummary(entry, context); - }); - return retVal; -}; +// de_AppMonitorSummaryList omitted. -/** - * deserializeAws_restJson1BatchCreateRumMetricDefinitionsError - */ -const de_BatchCreateRumMetricDefinitionsError = ( - output: any, - context: __SerdeContext -): BatchCreateRumMetricDefinitionsError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - MetricDefinition: - output.MetricDefinition != null ? de_MetricDefinitionRequest(output.MetricDefinition, context) : undefined, - } as any; -}; +// de_BatchCreateRumMetricDefinitionsError omitted. -/** - * deserializeAws_restJson1BatchCreateRumMetricDefinitionsErrors - */ -const de_BatchCreateRumMetricDefinitionsErrors = ( - output: any, - context: __SerdeContext -): BatchCreateRumMetricDefinitionsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchCreateRumMetricDefinitionsError(entry, context); - }); - return retVal; -}; +// de_BatchCreateRumMetricDefinitionsErrors omitted. -/** - * deserializeAws_restJson1BatchDeleteRumMetricDefinitionsError - */ -const de_BatchDeleteRumMetricDefinitionsError = ( - output: any, - context: __SerdeContext -): BatchDeleteRumMetricDefinitionsError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - MetricDefinitionId: __expectString(output.MetricDefinitionId), - } as any; -}; +// de_BatchDeleteRumMetricDefinitionsError omitted. -/** - * deserializeAws_restJson1BatchDeleteRumMetricDefinitionsErrors - */ -const de_BatchDeleteRumMetricDefinitionsErrors = ( - output: any, - context: __SerdeContext -): BatchDeleteRumMetricDefinitionsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchDeleteRumMetricDefinitionsError(entry, context); - }); - return retVal; -}; +// de_BatchDeleteRumMetricDefinitionsErrors omitted. -/** - * deserializeAws_restJson1CustomEvents - */ -const de_CustomEvents = (output: any, context: __SerdeContext): CustomEvents => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_CustomEvents omitted. -/** - * deserializeAws_restJson1CwLog - */ -const de_CwLog = (output: any, context: __SerdeContext): CwLog => { - return { - CwLogEnabled: __expectBoolean(output.CwLogEnabled), - CwLogGroup: __expectString(output.CwLogGroup), - } as any; -}; +// de_CwLog omitted. -/** - * deserializeAws_restJson1DataStorage - */ -const de_DataStorage = (output: any, context: __SerdeContext): DataStorage => { - return { - CwLog: output.CwLog != null ? de_CwLog(output.CwLog, context) : undefined, - } as any; -}; +// de_DataStorage omitted. -/** - * deserializeAws_restJson1DimensionKeysMap - */ -const de_DimensionKeysMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DimensionKeysMap omitted. -/** - * deserializeAws_restJson1EventDataList - */ -const de_EventDataList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EventDataList omitted. -/** - * deserializeAws_restJson1FavoritePages - */ -const de_FavoritePages = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FavoritePages omitted. -/** - * deserializeAws_restJson1MetricDefinition - */ -const de_MetricDefinition = (output: any, context: __SerdeContext): MetricDefinition => { - return { - DimensionKeys: output.DimensionKeys != null ? de_DimensionKeysMap(output.DimensionKeys, context) : undefined, - EventPattern: __expectString(output.EventPattern), - MetricDefinitionId: __expectString(output.MetricDefinitionId), - Name: __expectString(output.Name), - Namespace: __expectString(output.Namespace), - UnitLabel: __expectString(output.UnitLabel), - ValueKey: __expectString(output.ValueKey), - } as any; -}; +// de_MetricDefinition omitted. -/** - * deserializeAws_restJson1MetricDefinitionIds - */ -const de_MetricDefinitionIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MetricDefinitionIds omitted. -/** - * deserializeAws_restJson1MetricDefinitionRequest - */ -const de_MetricDefinitionRequest = (output: any, context: __SerdeContext): MetricDefinitionRequest => { - return { - DimensionKeys: output.DimensionKeys != null ? de_DimensionKeysMap(output.DimensionKeys, context) : undefined, - EventPattern: __expectString(output.EventPattern), - Name: __expectString(output.Name), - Namespace: __expectString(output.Namespace), - UnitLabel: __expectString(output.UnitLabel), - ValueKey: __expectString(output.ValueKey), - } as any; -}; +// de_MetricDefinitionRequest omitted. -/** - * deserializeAws_restJson1MetricDefinitions - */ -const de_MetricDefinitions = (output: any, context: __SerdeContext): MetricDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDefinition(entry, context); - }); - return retVal; -}; +// de_MetricDefinitions omitted. -/** - * deserializeAws_restJson1MetricDestinationSummary - */ -const de_MetricDestinationSummary = (output: any, context: __SerdeContext): MetricDestinationSummary => { - return { - Destination: __expectString(output.Destination), - DestinationArn: __expectString(output.DestinationArn), - IamRoleArn: __expectString(output.IamRoleArn), - } as any; -}; +// de_MetricDestinationSummary omitted. -/** - * deserializeAws_restJson1MetricDestinationSummaryList - */ -const de_MetricDestinationSummaryList = (output: any, context: __SerdeContext): MetricDestinationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDestinationSummary(entry, context); - }); - return retVal; -}; +// de_MetricDestinationSummaryList omitted. -/** - * deserializeAws_restJson1Pages - */ -const de_Pages = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Pages omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Telemetries - */ -const de_Telemetries = (output: any, context: __SerdeContext): (Telemetry | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Telemetries omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-s3-control/src/protocols/Aws_restXml.ts b/clients/client-s3-control/src/protocols/Aws_restXml.ts index 68d8b6b66b55..c393e498dcea 100644 --- a/clients/client-s3-control/src/protocols/Aws_restXml.ts +++ b/clients/client-s3-control/src/protocols/Aws_restXml.ts @@ -13,14 +13,14 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, - map as __map, + map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -3107,10 +3107,9 @@ const de_CreateAccessPointCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3151,10 +3150,9 @@ const de_CreateAccessPointForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3201,10 +3199,9 @@ const de_CreateBucketCommandError = async ( throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3257,10 +3254,9 @@ const de_CreateJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3299,10 +3295,9 @@ const de_CreateMultiRegionAccessPointCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3337,10 +3332,9 @@ const de_DeleteAccessPointCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3375,10 +3369,9 @@ const de_DeleteAccessPointForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3413,10 +3406,9 @@ const de_DeleteAccessPointPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3451,10 +3443,9 @@ const de_DeleteAccessPointPolicyForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3489,10 +3480,9 @@ const de_DeleteBucketCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3527,10 +3517,9 @@ const de_DeleteBucketLifecycleConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3565,10 +3554,9 @@ const de_DeleteBucketPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3603,10 +3591,9 @@ const de_DeleteBucketReplicationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3641,10 +3628,9 @@ const de_DeleteBucketTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3690,10 +3676,9 @@ const de_DeleteJobTaggingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3732,10 +3717,9 @@ const de_DeleteMultiRegionAccessPointCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3770,10 +3754,9 @@ const de_DeletePublicAccessBlockCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3808,10 +3791,9 @@ const de_DeleteStorageLensConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3846,10 +3828,9 @@ const de_DeleteStorageLensConfigurationTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3901,10 +3882,9 @@ const de_DescribeJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3943,10 +3923,9 @@ const de_DescribeMultiRegionAccessPointOperationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4016,10 +3995,9 @@ const de_GetAccessPointCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4057,10 +4035,9 @@ const de_GetAccessPointConfigurationForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4110,10 +4087,9 @@ const de_GetAccessPointForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4151,10 +4127,9 @@ const de_GetAccessPointPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4192,10 +4167,9 @@ const de_GetAccessPointPolicyForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4233,10 +4207,9 @@ const de_GetAccessPointPolicyStatusCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4274,10 +4247,9 @@ const de_GetAccessPointPolicyStatusForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4321,10 +4293,9 @@ const de_GetBucketCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4364,10 +4335,9 @@ const de_GetBucketLifecycleConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4405,10 +4375,9 @@ const de_GetBucketPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4446,10 +4415,9 @@ const de_GetBucketReplicationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4489,10 +4457,9 @@ const de_GetBucketTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4533,10 +4500,9 @@ const de_GetBucketVersioningCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4587,10 +4553,9 @@ const de_GetJobTaggingCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4629,10 +4594,9 @@ const de_GetMultiRegionAccessPointCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4670,10 +4634,9 @@ const de_GetMultiRegionAccessPointPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4711,10 +4674,9 @@ const de_GetMultiRegionAccessPointPolicyStatusCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4757,10 +4719,9 @@ const de_GetMultiRegionAccessPointRoutesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4801,10 +4762,9 @@ const de_GetPublicAccessBlockCommandError = async ( throw await de_NoSuchPublicAccessBlockConfigurationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4841,10 +4801,9 @@ const de_GetStorageLensConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4884,10 +4843,9 @@ const de_GetStorageLensConfigurationTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4933,10 +4891,9 @@ const de_ListAccessPointsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4985,10 +4942,9 @@ const de_ListAccessPointsForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5042,10 +4998,9 @@ const de_ListJobsCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5092,10 +5047,9 @@ const de_ListMultiRegionAccessPointsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5141,10 +5095,9 @@ const de_ListRegionalBucketsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5190,10 +5143,9 @@ const de_ListStorageLensConfigurationsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5228,10 +5180,9 @@ const de_PutAccessPointConfigurationForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5266,10 +5217,9 @@ const de_PutAccessPointPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5304,10 +5254,9 @@ const de_PutAccessPointPolicyForObjectLambdaCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5342,10 +5291,9 @@ const de_PutBucketLifecycleConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5380,10 +5328,9 @@ const de_PutBucketPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5418,10 +5365,9 @@ const de_PutBucketReplicationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5456,10 +5402,9 @@ const de_PutBucketTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5494,10 +5439,9 @@ const de_PutBucketVersioningCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5546,10 +5490,9 @@ const de_PutJobTaggingCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5588,10 +5531,9 @@ const de_PutMultiRegionAccessPointPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5626,10 +5568,9 @@ const de_PutPublicAccessBlockCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5664,10 +5605,9 @@ const de_PutStorageLensConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5702,10 +5642,9 @@ const de_PutStorageLensConfigurationTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5740,10 +5679,9 @@ const de_SubmitMultiRegionAccessPointRoutesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5798,10 +5736,9 @@ const de_UpdateJobPriorityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5863,16 +5800,15 @@ const de_UpdateJobStatusCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restXmlBadRequestExceptionRes */ diff --git a/clients/client-s3/src/protocols/Aws_restXml.ts b/clients/client-s3/src/protocols/Aws_restXml.ts index af2ec97322d9..458e00beb8c7 100644 --- a/clients/client-s3/src/protocols/Aws_restXml.ts +++ b/clients/client-s3/src/protocols/Aws_restXml.ts @@ -14,14 +14,14 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, - map as __map, + map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, parseRfc7231DateTime as __parseRfc7231DateTime, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -4015,10 +4015,9 @@ const de_AbortMultipartUploadCommandError = async ( throw await de_NoSuchUploadRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4087,10 +4086,9 @@ const de_CompleteMultipartUploadCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4144,10 +4142,9 @@ const de_CopyObjectCommandError = async ( throw await de_ObjectNotInActiveTierErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4192,10 +4189,9 @@ const de_CreateBucketCommandError = async ( throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4256,10 +4252,9 @@ const de_CreateMultipartUploadCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4294,10 +4289,9 @@ const de_DeleteBucketCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4332,10 +4326,9 @@ const de_DeleteBucketAnalyticsConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4370,10 +4363,9 @@ const de_DeleteBucketCorsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4408,10 +4400,9 @@ const de_DeleteBucketEncryptionCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4446,10 +4437,9 @@ const de_DeleteBucketIntelligentTieringConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4484,10 +4474,9 @@ const de_DeleteBucketInventoryConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4522,10 +4511,9 @@ const de_DeleteBucketLifecycleCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4560,10 +4548,9 @@ const de_DeleteBucketMetricsConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4598,10 +4585,9 @@ const de_DeleteBucketOwnershipControlsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4636,10 +4622,9 @@ const de_DeleteBucketPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4674,10 +4659,9 @@ const de_DeleteBucketReplicationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4712,10 +4696,9 @@ const de_DeleteBucketTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4750,10 +4733,9 @@ const de_DeleteBucketWebsiteCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4794,10 +4776,9 @@ const de_DeleteObjectCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4843,10 +4824,9 @@ const de_DeleteObjectsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4882,10 +4862,9 @@ const de_DeleteObjectTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4920,10 +4899,9 @@ const de_DeletePublicAccessBlockCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4961,10 +4939,9 @@ const de_GetBucketAccelerateConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5007,10 +4984,9 @@ const de_GetBucketAclCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5046,10 +5022,9 @@ const de_GetBucketAnalyticsConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5089,10 +5064,9 @@ const de_GetBucketCorsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5128,10 +5102,9 @@ const de_GetBucketEncryptionCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5167,10 +5140,9 @@ const de_GetBucketIntelligentTieringConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5206,10 +5178,9 @@ const de_GetBucketInventoryConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5249,10 +5220,9 @@ const de_GetBucketLifecycleConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5290,10 +5260,9 @@ const de_GetBucketLocationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5331,10 +5300,9 @@ const de_GetBucketLoggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5370,10 +5338,9 @@ const de_GetBucketMetricsConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5435,10 +5402,9 @@ const de_GetBucketNotificationConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5474,10 +5440,9 @@ const de_GetBucketOwnershipControlsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5513,10 +5478,9 @@ const de_GetBucketPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5552,10 +5516,9 @@ const de_GetBucketPolicyStatusCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5591,10 +5554,9 @@ const de_GetBucketReplicationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5632,10 +5594,9 @@ const de_GetBucketRequestPaymentCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5675,10 +5636,9 @@ const de_GetBucketTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5719,10 +5679,9 @@ const de_GetBucketVersioningCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5771,10 +5730,9 @@ const de_GetBucketWebsiteCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5889,10 +5847,9 @@ const de_GetObjectCommandError = async ( throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5942,10 +5899,9 @@ const de_GetObjectAclCommandError = async ( throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6011,10 +5967,9 @@ const de_GetObjectAttributesCommandError = async ( throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6051,10 +6006,9 @@ const de_GetObjectLegalHoldCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6090,10 +6044,9 @@ const de_GetObjectLockConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6129,10 +6082,9 @@ const de_GetObjectRetentionCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6173,10 +6125,9 @@ const de_GetObjectTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6214,10 +6165,9 @@ const de_GetObjectTorrentCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6253,10 +6203,9 @@ const de_GetPublicAccessBlockCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6296,10 +6245,9 @@ const de_HeadBucketCommandError = async ( throw await de_NotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6406,10 +6354,9 @@ const de_HeadObjectCommandError = async ( throw await de_NotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6462,10 +6409,9 @@ const de_ListBucketAnalyticsConfigurationsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6517,10 +6463,9 @@ const de_ListBucketIntelligentTieringConfigurationsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6572,10 +6517,9 @@ const de_ListBucketInventoryConfigurationsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6627,10 +6571,9 @@ const de_ListBucketMetricsConfigurationsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6673,10 +6616,9 @@ const de_ListBucketsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6751,10 +6693,9 @@ const de_ListMultipartUploadsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6828,10 +6769,9 @@ const de_ListObjectsCommandError = async ( throw await de_NoSuchBucketRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6912,10 +6852,9 @@ const de_ListObjectsV2CommandError = async ( throw await de_NoSuchBucketRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6996,10 +6935,9 @@ const de_ListObjectVersionsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7078,10 +7016,9 @@ const de_ListPartsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7116,10 +7053,9 @@ const de_PutBucketAccelerateConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7154,10 +7090,9 @@ const de_PutBucketAclCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7192,10 +7127,9 @@ const de_PutBucketAnalyticsConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7230,10 +7164,9 @@ const de_PutBucketCorsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7268,10 +7201,9 @@ const de_PutBucketEncryptionCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7306,10 +7238,9 @@ const de_PutBucketIntelligentTieringConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7344,10 +7275,9 @@ const de_PutBucketInventoryConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7382,10 +7312,9 @@ const de_PutBucketLifecycleConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7420,10 +7349,9 @@ const de_PutBucketLoggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7458,10 +7386,9 @@ const de_PutBucketMetricsConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7496,10 +7423,9 @@ const de_PutBucketNotificationConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7534,10 +7460,9 @@ const de_PutBucketOwnershipControlsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7572,10 +7497,9 @@ const de_PutBucketPolicyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7610,10 +7534,9 @@ const de_PutBucketReplicationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7648,10 +7571,9 @@ const de_PutBucketRequestPaymentCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7686,10 +7608,9 @@ const de_PutBucketTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7724,10 +7645,9 @@ const de_PutBucketVersioningCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7762,10 +7682,9 @@ const de_PutBucketWebsiteCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7817,10 +7736,9 @@ const de_PutObjectCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7861,10 +7779,9 @@ const de_PutObjectAclCommandError = async ( throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7901,10 +7818,9 @@ const de_PutObjectLegalHoldCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7940,10 +7856,9 @@ const de_PutObjectLockConfigurationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -7979,10 +7894,9 @@ const de_PutObjectRetentionCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8018,10 +7932,9 @@ const de_PutObjectTaggingCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8056,10 +7969,9 @@ const de_PutPublicAccessBlockCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8101,10 +8013,9 @@ const de_RestoreObjectCommandError = async ( throw await de_ObjectAlreadyInActiveTierErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8141,10 +8052,9 @@ const de_SelectObjectContentCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8193,10 +8103,9 @@ const de_UploadPartCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8242,10 +8151,9 @@ const de_UploadPartCopyCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8280,15 +8188,14 @@ const de_WriteGetObjectResponseCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restXmlBucketAlreadyExistsRes */ diff --git a/clients/client-s3outposts/src/protocols/Aws_restJson1.ts b/clients/client-s3outposts/src/protocols/Aws_restJson1.ts index 9fba51616329..a387a3ffa1c3 100644 --- a/clients/client-s3outposts/src/protocols/Aws_restJson1.ts +++ b/clients/client-s3outposts/src/protocols/Aws_restJson1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -30,10 +31,7 @@ import { AccessDeniedException, ConflictException, Endpoint, - FailedReason, InternalServerException, - NetworkInterface, - Outpost, OutpostOfflineException, ResourceNotFoundException, ThrottlingException, @@ -55,13 +53,15 @@ export const se_CreateEndpointCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/S3Outposts/CreateEndpoint"; let body: any; - body = JSON.stringify({ - ...(input.AccessType != null && { AccessType: input.AccessType }), - ...(input.CustomerOwnedIpv4Pool != null && { CustomerOwnedIpv4Pool: input.CustomerOwnedIpv4Pool }), - ...(input.OutpostId != null && { OutpostId: input.OutpostId }), - ...(input.SecurityGroupId != null && { SecurityGroupId: input.SecurityGroupId }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }); + body = JSON.stringify( + take(input, { + AccessType: [], + CustomerOwnedIpv4Pool: [], + OutpostId: [], + SecurityGroupId: [], + SubnetId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -200,9 +200,10 @@ export const de_CreateEndpointCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EndpointArn != null) { - contents.EndpointArn = __expectString(data.EndpointArn); - } + const doc = take(data, { + EndpointArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -242,10 +243,9 @@ const de_CreateEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -301,10 +301,9 @@ const de_DeleteEndpointCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -324,12 +323,11 @@ export const de_ListEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Endpoints != null) { - contents.Endpoints = de_Endpoints(data.Endpoints, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Endpoints: (_) => de_Endpoints(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -363,10 +361,9 @@ const de_ListEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -386,12 +383,11 @@ export const de_ListOutpostsWithS3Command = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Outposts != null) { - contents.Outposts = de_Outposts(data.Outposts, context); - } + const doc = take(data, { + NextToken: __expectString, + Outposts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -422,10 +418,9 @@ const de_ListOutpostsWithS3CommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -445,12 +440,11 @@ export const de_ListSharedEndpointsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Endpoints != null) { - contents.Endpoints = de_Endpoints(data.Endpoints, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Endpoints: (_) => de_Endpoints(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -484,16 +478,15 @@ const de_ListSharedEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -503,9 +496,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -519,9 +513,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -538,9 +533,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -557,9 +553,10 @@ const de_OutpostOfflineExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new OutpostOfflineException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -576,9 +573,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -592,9 +590,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -608,9 +607,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -622,24 +622,20 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * deserializeAws_restJson1Endpoint */ const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - AccessType: __expectString(output.AccessType), - CidrBlock: __expectString(output.CidrBlock), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CustomerOwnedIpv4Pool: __expectString(output.CustomerOwnedIpv4Pool), - EndpointArn: __expectString(output.EndpointArn), - FailedReason: output.FailedReason != null ? de_FailedReason(output.FailedReason, context) : undefined, - NetworkInterfaces: - output.NetworkInterfaces != null ? de_NetworkInterfaces(output.NetworkInterfaces, context) : undefined, - OutpostsId: __expectString(output.OutpostsId), - SecurityGroupId: __expectString(output.SecurityGroupId), - Status: __expectString(output.Status), - SubnetId: __expectString(output.SubnetId), - VpcId: __expectString(output.VpcId), - } as any; + return take(output, { + AccessType: __expectString, + CidrBlock: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomerOwnedIpv4Pool: __expectString, + EndpointArn: __expectString, + FailedReason: _json, + NetworkInterfaces: _json, + OutpostsId: __expectString, + SecurityGroupId: __expectString, + Status: __expectString, + SubnetId: __expectString, + VpcId: __expectString, + }) as any; }; /** @@ -649,74 +645,20 @@ const de_Endpoints = (output: any, context: __SerdeContext): Endpoint[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Endpoint(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1FailedReason - */ -const de_FailedReason = (output: any, context: __SerdeContext): FailedReason => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// de_FailedReason omitted. -/** - * deserializeAws_restJson1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - } as any; -}; +// de_NetworkInterface omitted. -/** - * deserializeAws_restJson1NetworkInterfaces - */ -const de_NetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; -}; +// de_NetworkInterfaces omitted. -/** - * deserializeAws_restJson1Outpost - */ -const de_Outpost = (output: any, context: __SerdeContext): Outpost => { - return { - CapacityInBytes: __expectLong(output.CapacityInBytes), - OutpostArn: __expectString(output.OutpostArn), - OutpostId: __expectString(output.OutpostId), - OwnerId: __expectString(output.OwnerId), - } as any; -}; +// de_Outpost omitted. -/** - * deserializeAws_restJson1Outposts - */ -const de_Outposts = (output: any, context: __SerdeContext): Outpost[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Outpost(entry, context); - }); - return retVal; -}; +// de_Outposts omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sagemaker-a2i-runtime/src/protocols/Aws_restJson1.ts b/clients/client-sagemaker-a2i-runtime/src/protocols/Aws_restJson1.ts index eb53a1128ed0..c323e83e92ae 100644 --- a/clients/client-sagemaker-a2i-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-sagemaker-a2i-runtime/src/protocols/Aws_restJson1.ts @@ -1,15 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -27,7 +29,6 @@ import { ContentClassifier, HumanLoopDataAttributes, HumanLoopInput, - HumanLoopOutput, HumanLoopSummary, InternalServerException, ResourceNotFoundException, @@ -149,12 +150,14 @@ export const se_StartHumanLoopCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops"; let body: any; - body = JSON.stringify({ - ...(input.DataAttributes != null && { DataAttributes: se_HumanLoopDataAttributes(input.DataAttributes, context) }), - ...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }), - ...(input.HumanLoopInput != null && { HumanLoopInput: se_HumanLoopInput(input.HumanLoopInput, context) }), - ...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }), - }); + body = JSON.stringify( + take(input, { + DataAttributes: (_) => _json(_), + FlowDefinitionArn: [], + HumanLoopInput: (_) => _json(_), + HumanLoopName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -179,9 +182,11 @@ export const se_StopHumanLoopCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/stop"; let body: any; - body = JSON.stringify({ - ...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }), - }); + body = JSON.stringify( + take(input, { + HumanLoopName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -237,10 +242,9 @@ const de_DeleteHumanLoopCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -260,30 +264,17 @@ export const de_DescribeHumanLoopCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.FailureCode != null) { - contents.FailureCode = __expectString(data.FailureCode); - } - if (data.FailureReason != null) { - contents.FailureReason = __expectString(data.FailureReason); - } - if (data.FlowDefinitionArn != null) { - contents.FlowDefinitionArn = __expectString(data.FlowDefinitionArn); - } - if (data.HumanLoopArn != null) { - contents.HumanLoopArn = __expectString(data.HumanLoopArn); - } - if (data.HumanLoopName != null) { - contents.HumanLoopName = __expectString(data.HumanLoopName); - } - if (data.HumanLoopOutput != null) { - contents.HumanLoopOutput = de_HumanLoopOutput(data.HumanLoopOutput, context); - } - if (data.HumanLoopStatus != null) { - contents.HumanLoopStatus = __expectString(data.HumanLoopStatus); - } + const doc = take(data, { + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + FailureCode: __expectString, + FailureReason: __expectString, + FlowDefinitionArn: __expectString, + HumanLoopArn: __expectString, + HumanLoopName: __expectString, + HumanLoopOutput: _json, + HumanLoopStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -314,10 +305,9 @@ const de_DescribeHumanLoopCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -337,12 +327,11 @@ export const de_ListHumanLoopsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HumanLoopSummaries != null) { - contents.HumanLoopSummaries = de_HumanLoopSummaries(data.HumanLoopSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + HumanLoopSummaries: (_) => de_HumanLoopSummaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -373,10 +362,9 @@ const de_ListHumanLoopsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -396,9 +384,10 @@ export const de_StartHumanLoopCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.HumanLoopArn != null) { - contents.HumanLoopArn = __expectString(data.HumanLoopArn); - } + const doc = take(data, { + HumanLoopArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -432,10 +421,9 @@ const de_StartHumanLoopCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -485,25 +473,25 @@ const de_StopHumanLoopCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -520,9 +508,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -539,9 +528,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -558,9 +548,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -574,9 +565,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -590,9 +582,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -600,45 +593,13 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ContentClassifiers - */ -const se_ContentClassifiers = (input: (ContentClassifier | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ContentClassifiers omitted. -/** - * serializeAws_restJson1HumanLoopDataAttributes - */ -const se_HumanLoopDataAttributes = (input: HumanLoopDataAttributes, context: __SerdeContext): any => { - return { - ...(input.ContentClassifiers != null && { - ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context), - }), - }; -}; +// se_HumanLoopDataAttributes omitted. -/** - * serializeAws_restJson1HumanLoopInput - */ -const se_HumanLoopInput = (input: HumanLoopInput, context: __SerdeContext): any => { - return { - ...(input.InputContent != null && { InputContent: input.InputContent }), - }; -}; +// se_HumanLoopInput omitted. -/** - * deserializeAws_restJson1HumanLoopOutput - */ -const de_HumanLoopOutput = (output: any, context: __SerdeContext): HumanLoopOutput => { - return { - OutputS3Uri: __expectString(output.OutputS3Uri), - } as any; -}; +// de_HumanLoopOutput omitted. /** * deserializeAws_restJson1HumanLoopSummaries @@ -647,9 +608,6 @@ const de_HumanLoopSummaries = (output: any, context: __SerdeContext): HumanLoopS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HumanLoopSummary(entry, context); }); return retVal; @@ -659,14 +617,13 @@ const de_HumanLoopSummaries = (output: any, context: __SerdeContext): HumanLoopS * deserializeAws_restJson1HumanLoopSummary */ const de_HumanLoopSummary = (output: any, context: __SerdeContext): HumanLoopSummary => { - return { - CreationTime: - output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationTime)) : undefined, - FailureReason: __expectString(output.FailureReason), - FlowDefinitionArn: __expectString(output.FlowDefinitionArn), - HumanLoopName: __expectString(output.HumanLoopName), - HumanLoopStatus: __expectString(output.HumanLoopStatus), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + FailureReason: __expectString, + FlowDefinitionArn: __expectString, + HumanLoopName: __expectString, + HumanLoopStatus: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-sagemaker-edge/src/protocols/Aws_restJson1.ts b/clients/client-sagemaker-edge/src/protocols/Aws_restJson1.ts index ba69859ebf5b..48902862a6d3 100644 --- a/clients/client-sagemaker-edge/src/protocols/Aws_restJson1.ts +++ b/clients/client-sagemaker-edge/src/protocols/Aws_restJson1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -21,16 +23,7 @@ import { GetDeviceRegistrationCommandOutput, } from "../commands/GetDeviceRegistrationCommand"; import { SendHeartbeatCommandInput, SendHeartbeatCommandOutput } from "../commands/SendHeartbeatCommand"; -import { - Checksum, - Definition, - DeploymentModel, - DeploymentResult, - EdgeDeployment, - EdgeMetric, - InternalServiceException, - Model, -} from "../models/models_0"; +import { DeploymentModel, DeploymentResult, EdgeMetric, InternalServiceException, Model } from "../models/models_0"; import { SagemakerEdgeServiceException as __BaseException } from "../models/SagemakerEdgeServiceException"; /** @@ -46,10 +39,12 @@ export const se_GetDeploymentsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeployments"; let body: any; - body = JSON.stringify({ - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - }); + body = JSON.stringify( + take(input, { + DeviceFleetName: [], + DeviceName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -74,10 +69,12 @@ export const se_GetDeviceRegistrationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeviceRegistration"; let body: any; - body = JSON.stringify({ - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - }); + body = JSON.stringify( + take(input, { + DeviceFleetName: [], + DeviceName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -102,14 +99,16 @@ export const se_SendHeartbeatCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SendHeartbeat"; let body: any; - body = JSON.stringify({ - ...(input.AgentMetrics != null && { AgentMetrics: se_EdgeMetrics(input.AgentMetrics, context) }), - ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }), - ...(input.DeploymentResult != null && { DeploymentResult: se_DeploymentResult(input.DeploymentResult, context) }), - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.Models != null && { Models: se_Models(input.Models, context) }), - }); + body = JSON.stringify( + take(input, { + AgentMetrics: (_) => se_EdgeMetrics(_, context), + AgentVersion: [], + DeploymentResult: (_) => se_DeploymentResult(_, context), + DeviceFleetName: [], + DeviceName: [], + Models: (_) => se_Models(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -135,9 +134,10 @@ export const de_GetDeploymentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Deployments != null) { - contents.Deployments = de_EdgeDeployments(data.Deployments, context); - } + const doc = take(data, { + Deployments: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -159,10 +159,9 @@ const de_GetDeploymentsCommandError = async ( throw await de_InternalServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -182,12 +181,11 @@ export const de_GetDeviceRegistrationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CacheTTL != null) { - contents.CacheTTL = __expectString(data.CacheTTL); - } - if (data.DeviceRegistration != null) { - contents.DeviceRegistration = __expectString(data.DeviceRegistration); - } + const doc = take(data, { + CacheTTL: __expectString, + DeviceRegistration: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -209,10 +207,9 @@ const de_GetDeviceRegistrationCommandError = async ( throw await de_InternalServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -253,16 +250,15 @@ const de_SendHeartbeatCommandError = async ( throw await de_InternalServiceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServiceExceptionRes */ @@ -272,9 +268,10 @@ const de_InternalServiceExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -282,59 +279,34 @@ const de_InternalServiceExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DeploymentModel - */ -const se_DeploymentModel = (input: DeploymentModel, context: __SerdeContext): any => { - return { - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.ModelHandle != null && { ModelHandle: input.ModelHandle }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }), - ...(input.RollbackFailureReason != null && { RollbackFailureReason: input.RollbackFailureReason }), - ...(input.State != null && { State: input.State }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusReason != null && { StatusReason: input.StatusReason }), - }; -}; +// se_DeploymentModel omitted. -/** - * serializeAws_restJson1DeploymentModels - */ -const se_DeploymentModels = (input: DeploymentModel[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeploymentModel(entry, context); - }); -}; +// se_DeploymentModels omitted. /** * serializeAws_restJson1DeploymentResult */ const se_DeploymentResult = (input: DeploymentResult, context: __SerdeContext): any => { - return { - ...(input.DeploymentEndTime != null && { DeploymentEndTime: Math.round(input.DeploymentEndTime.getTime() / 1000) }), - ...(input.DeploymentModels != null && { DeploymentModels: se_DeploymentModels(input.DeploymentModels, context) }), - ...(input.DeploymentName != null && { DeploymentName: input.DeploymentName }), - ...(input.DeploymentStartTime != null && { - DeploymentStartTime: Math.round(input.DeploymentStartTime.getTime() / 1000), - }), - ...(input.DeploymentStatus != null && { DeploymentStatus: input.DeploymentStatus }), - ...(input.DeploymentStatusMessage != null && { DeploymentStatusMessage: input.DeploymentStatusMessage }), - }; + return take(input, { + DeploymentEndTime: (_) => Math.round(_.getTime() / 1000), + DeploymentModels: _json, + DeploymentName: [], + DeploymentStartTime: (_) => Math.round(_.getTime() / 1000), + DeploymentStatus: [], + DeploymentStatusMessage: [], + }); }; /** * serializeAws_restJson1EdgeMetric */ const se_EdgeMetric = (input: EdgeMetric, context: __SerdeContext): any => { - return { - ...(input.Dimension != null && { Dimension: input.Dimension }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + Dimension: [], + MetricName: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + Value: __serializeFloat, + }); }; /** @@ -352,13 +324,13 @@ const se_EdgeMetrics = (input: EdgeMetric[], context: __SerdeContext): any => { * serializeAws_restJson1Model */ const se_Model = (input: Model, context: __SerdeContext): any => { - return { - ...(input.LatestInference != null && { LatestInference: Math.round(input.LatestInference.getTime() / 1000) }), - ...(input.LatestSampleTime != null && { LatestSampleTime: Math.round(input.LatestSampleTime.getTime() / 1000) }), - ...(input.ModelMetrics != null && { ModelMetrics: se_EdgeMetrics(input.ModelMetrics, context) }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }), - }; + return take(input, { + LatestInference: (_) => Math.round(_.getTime() / 1000), + LatestSampleTime: (_) => Math.round(_.getTime() / 1000), + ModelMetrics: (_) => se_EdgeMetrics(_, context), + ModelName: [], + ModelVersion: [], + }); }; /** @@ -372,69 +344,15 @@ const se_Models = (input: Model[], context: __SerdeContext): any => { }); }; -/** - * deserializeAws_restJson1Checksum - */ -const de_Checksum = (output: any, context: __SerdeContext): Checksum => { - return { - Sum: __expectString(output.Sum), - Type: __expectString(output.Type), - } as any; -}; +// de_Checksum omitted. -/** - * deserializeAws_restJson1Definition - */ -const de_Definition = (output: any, context: __SerdeContext): Definition => { - return { - Checksum: output.Checksum != null ? de_Checksum(output.Checksum, context) : undefined, - ModelHandle: __expectString(output.ModelHandle), - S3Url: __expectString(output.S3Url), - State: __expectString(output.State), - } as any; -}; +// de_Definition omitted. -/** - * deserializeAws_restJson1Definitions - */ -const de_Definitions = (output: any, context: __SerdeContext): Definition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Definition(entry, context); - }); - return retVal; -}; +// de_Definitions omitted. -/** - * deserializeAws_restJson1EdgeDeployment - */ -const de_EdgeDeployment = (output: any, context: __SerdeContext): EdgeDeployment => { - return { - Definitions: output.Definitions != null ? de_Definitions(output.Definitions, context) : undefined, - DeploymentName: __expectString(output.DeploymentName), - FailureHandlingPolicy: __expectString(output.FailureHandlingPolicy), - Type: __expectString(output.Type), - } as any; -}; +// de_EdgeDeployment omitted. -/** - * deserializeAws_restJson1EdgeDeployments - */ -const de_EdgeDeployments = (output: any, context: __SerdeContext): EdgeDeployment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgeDeployment(entry, context); - }); - return retVal; -}; +// de_EdgeDeployments omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sagemaker-featurestore-runtime/src/protocols/Aws_restJson1.ts b/clients/client-sagemaker-featurestore-runtime/src/protocols/Aws_restJson1.ts index 3b5f0ce2376e..408bf362c2c6 100644 --- a/clients/client-sagemaker-featurestore-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-sagemaker-featurestore-runtime/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -22,9 +24,7 @@ import { GetRecordCommandInput, GetRecordCommandOutput } from "../commands/GetRe import { PutRecordCommandInput, PutRecordCommandOutput } from "../commands/PutRecordCommand"; import { AccessForbidden, - BatchGetRecordError, BatchGetRecordIdentifier, - BatchGetRecordResultDetail, FeatureValue, InternalFailure, ResourceNotFound, @@ -47,9 +47,11 @@ export const se_BatchGetRecordCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchGetRecord"; let body: any; - body = JSON.stringify({ - ...(input.Identifiers != null && { Identifiers: se_BatchGetRecordIdentifiers(input.Identifiers, context) }), - }); + body = JSON.stringify( + take(input, { + Identifiers: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -169,10 +171,12 @@ export const se_PutRecordCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Record != null && { Record: se_Record(input.Record, context) }), - ...(input.TargetStores != null && { TargetStores: se_TargetStores(input.TargetStores, context) }), - }); + body = JSON.stringify( + take(input, { + Record: (_) => _json(_), + TargetStores: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -198,15 +202,12 @@ export const de_BatchGetRecordCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchGetRecordErrors(data.Errors, context); - } - if (data.Records != null) { - contents.Records = de_BatchGetRecordResultDetails(data.Records, context); - } - if (data.UnprocessedIdentifiers != null) { - contents.UnprocessedIdentifiers = de_UnprocessedIdentifiers(data.UnprocessedIdentifiers, context); - } + const doc = take(data, { + Errors: _json, + Records: _json, + UnprocessedIdentifiers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -237,10 +238,9 @@ const de_BatchGetRecordCommandError = async ( throw await de_ValidationErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -290,10 +290,9 @@ const de_DeleteRecordCommandError = async ( throw await de_ValidationErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -313,9 +312,10 @@ export const de_GetRecordCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Record != null) { - contents.Record = de_Record(data.Record, context); - } + const doc = take(data, { + Record: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -349,10 +349,9 @@ const de_GetRecordCommandError = async ( throw await de_ValidationErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -402,25 +401,25 @@ const de_PutRecordCommandError = async ( throw await de_ValidationErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessForbiddenRes */ const de_AccessForbiddenRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessForbidden({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -434,9 +433,10 @@ const de_AccessForbiddenRes = async (parsedOutput: any, context: __SerdeContext) const de_InternalFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailure({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -450,9 +450,10 @@ const de_InternalFailureRes = async (parsedOutput: any, context: __SerdeContext) const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -466,9 +467,10 @@ const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext const de_ServiceUnavailableRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailable({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -482,9 +484,10 @@ const de_ServiceUnavailableRes = async (parsedOutput: any, context: __SerdeConte const de_ValidationErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -492,220 +495,39 @@ const de_ValidationErrorRes = async (parsedOutput: any, context: __SerdeContext) return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1BatchGetRecordIdentifier - */ -const se_BatchGetRecordIdentifier = (input: BatchGetRecordIdentifier, context: __SerdeContext): any => { - return { - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - ...(input.FeatureNames != null && { FeatureNames: se_FeatureNames(input.FeatureNames, context) }), - ...(input.RecordIdentifiersValueAsString != null && { - RecordIdentifiersValueAsString: se_RecordIdentifiers(input.RecordIdentifiersValueAsString, context), - }), - }; -}; +// se_BatchGetRecordIdentifier omitted. -/** - * serializeAws_restJson1BatchGetRecordIdentifiers - */ -const se_BatchGetRecordIdentifiers = (input: BatchGetRecordIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BatchGetRecordIdentifier(entry, context); - }); -}; +// se_BatchGetRecordIdentifiers omitted. -/** - * serializeAws_restJson1FeatureNames - */ -const se_FeatureNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FeatureNames omitted. -/** - * serializeAws_restJson1FeatureValue - */ -const se_FeatureValue = (input: FeatureValue, context: __SerdeContext): any => { - return { - ...(input.FeatureName != null && { FeatureName: input.FeatureName }), - ...(input.ValueAsString != null && { ValueAsString: input.ValueAsString }), - }; -}; +// se_FeatureValue omitted. -/** - * serializeAws_restJson1Record - */ -const se_Record = (input: FeatureValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FeatureValue(entry, context); - }); -}; +// se_Record omitted. -/** - * serializeAws_restJson1RecordIdentifiers - */ -const se_RecordIdentifiers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RecordIdentifiers omitted. -/** - * serializeAws_restJson1TargetStores - */ -const se_TargetStores = (input: (TargetStore | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetStores omitted. -/** - * deserializeAws_restJson1BatchGetRecordError - */ -const de_BatchGetRecordError = (output: any, context: __SerdeContext): BatchGetRecordError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - FeatureGroupName: __expectString(output.FeatureGroupName), - RecordIdentifierValueAsString: __expectString(output.RecordIdentifierValueAsString), - } as any; -}; +// de_BatchGetRecordError omitted. -/** - * deserializeAws_restJson1BatchGetRecordErrors - */ -const de_BatchGetRecordErrors = (output: any, context: __SerdeContext): BatchGetRecordError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetRecordError(entry, context); - }); - return retVal; -}; +// de_BatchGetRecordErrors omitted. -/** - * deserializeAws_restJson1BatchGetRecordIdentifier - */ -const de_BatchGetRecordIdentifier = (output: any, context: __SerdeContext): BatchGetRecordIdentifier => { - return { - FeatureGroupName: __expectString(output.FeatureGroupName), - FeatureNames: output.FeatureNames != null ? de_FeatureNames(output.FeatureNames, context) : undefined, - RecordIdentifiersValueAsString: - output.RecordIdentifiersValueAsString != null - ? de_RecordIdentifiers(output.RecordIdentifiersValueAsString, context) - : undefined, - } as any; -}; +// de_BatchGetRecordIdentifier omitted. -/** - * deserializeAws_restJson1BatchGetRecordResultDetail - */ -const de_BatchGetRecordResultDetail = (output: any, context: __SerdeContext): BatchGetRecordResultDetail => { - return { - FeatureGroupName: __expectString(output.FeatureGroupName), - Record: output.Record != null ? de_Record(output.Record, context) : undefined, - RecordIdentifierValueAsString: __expectString(output.RecordIdentifierValueAsString), - } as any; -}; +// de_BatchGetRecordResultDetail omitted. -/** - * deserializeAws_restJson1BatchGetRecordResultDetails - */ -const de_BatchGetRecordResultDetails = (output: any, context: __SerdeContext): BatchGetRecordResultDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetRecordResultDetail(entry, context); - }); - return retVal; -}; +// de_BatchGetRecordResultDetails omitted. -/** - * deserializeAws_restJson1FeatureNames - */ -const de_FeatureNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FeatureNames omitted. -/** - * deserializeAws_restJson1FeatureValue - */ -const de_FeatureValue = (output: any, context: __SerdeContext): FeatureValue => { - return { - FeatureName: __expectString(output.FeatureName), - ValueAsString: __expectString(output.ValueAsString), - } as any; -}; +// de_FeatureValue omitted. -/** - * deserializeAws_restJson1Record - */ -const de_Record = (output: any, context: __SerdeContext): FeatureValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeatureValue(entry, context); - }); - return retVal; -}; +// de_Record omitted. -/** - * deserializeAws_restJson1RecordIdentifiers - */ -const de_RecordIdentifiers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RecordIdentifiers omitted. -/** - * deserializeAws_restJson1UnprocessedIdentifiers - */ -const de_UnprocessedIdentifiers = (output: any, context: __SerdeContext): BatchGetRecordIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchGetRecordIdentifier(entry, context); - }); - return retVal; -}; +// de_UnprocessedIdentifiers omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sagemaker-geospatial/src/protocols/Aws_restJson1.ts b/clients/client-sagemaker-geospatial/src/protocols/Aws_restJson1.ts index 15065f8c22c5..29ee7de33856 100644 --- a/clients/client-sagemaker-geospatial/src/protocols/Aws_restJson1.ts +++ b/clients/client-sagemaker-geospatial/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -12,12 +13,13 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -98,17 +100,13 @@ import { AccessDeniedException, AreaOfInterest, AreaOfInterestGeometry, - AssetValue, BandMathConfigInput, CloudMaskingConfigInput, CloudRemovalConfigInput, ConflictException, CustomIndicesInput, - EarthObservationJobErrorDetails, EoCloudCoverInput, EojDataSourceConfigInput, - ExportErrorDetails, - ExportErrorDetailsOutput, ExportS3DataInput, ExportVectorEnrichmentJobOutputConfig, Filter, @@ -126,7 +124,6 @@ import { MapMatchingConfig, MultiPolygonGeometryInput, Operation, - OutputBand, OutputConfigInput, OutputResolutionResamplingInput, OutputResolutionStackInput, @@ -155,8 +152,6 @@ import { ValidationException, VectorEnrichmentJobConfig, VectorEnrichmentJobDataSourceConfigInput, - VectorEnrichmentJobErrorDetails, - VectorEnrichmentJobExportErrorDetails, VectorEnrichmentJobInputConfig, VectorEnrichmentJobS3Data, ViewOffNadirInput, @@ -229,13 +224,15 @@ export const se_ExportEarthObservationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/export-earth-observation-job"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.ExportSourceImages != null && { ExportSourceImages: input.ExportSourceImages }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfigInput(input.OutputConfig, context) }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ExecutionRoleArn: [], + ExportSourceImages: [], + OutputConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -261,14 +258,14 @@ export const se_ExportVectorEnrichmentJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/export-vector-enrichment-jobs"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.OutputConfig != null && { - OutputConfig: se_ExportVectorEnrichmentJobOutputConfig(input.OutputConfig, context), - }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ExecutionRoleArn: [], + OutputConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -406,13 +403,15 @@ export const se_ListEarthObservationJobsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-earth-observation-jobs"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -489,13 +488,15 @@ export const se_ListVectorEnrichmentJobsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-vector-enrichment-jobs"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -521,16 +522,13 @@ export const se_SearchRasterDataCollectionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/search-raster-data-collection"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RasterDataCollectionQuery != null && { - RasterDataCollectionQuery: se_RasterDataCollectionQueryWithBandFilterInput( - input.RasterDataCollectionQuery, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + NextToken: [], + RasterDataCollectionQuery: (_) => se_RasterDataCollectionQueryWithBandFilterInput(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -556,15 +554,17 @@ export const se_StartEarthObservationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/earth-observation-jobs"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.InputConfig != null && { InputConfig: se_InputConfigInput(input.InputConfig, context) }), - ...(input.JobConfig != null && { JobConfig: se_JobConfigInput(input.JobConfig, context) }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ExecutionRoleArn: [], + InputConfig: (_) => se_InputConfigInput(_, context), + JobConfig: (_) => se_JobConfigInput(_, context), + KmsKeyId: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -590,15 +590,17 @@ export const se_StartVectorEnrichmentJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vector-enrichment-jobs"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.InputConfig != null && { InputConfig: se_VectorEnrichmentJobInputConfig(input.InputConfig, context) }), - ...(input.JobConfig != null && { JobConfig: se_VectorEnrichmentJobConfig(input.JobConfig, context) }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ExecutionRoleArn: [], + InputConfig: (_) => _json(_), + JobConfig: (_) => _json(_), + KmsKeyId: [], + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -624,9 +626,11 @@ export const se_StopEarthObservationJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/earth-observation-jobs/stop"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -652,9 +656,11 @@ export const se_StopVectorEnrichmentJobCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vector-enrichment-jobs/stop"; let body: any; - body = JSON.stringify({ - ...(input.Arn != null && { Arn: input.Arn }), - }); + body = JSON.stringify( + take(input, { + Arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -680,9 +686,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -774,10 +782,9 @@ const de_DeleteEarthObservationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -833,10 +840,9 @@ const de_DeleteVectorEnrichmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -856,24 +862,15 @@ export const de_ExportEarthObservationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.ExecutionRoleArn != null) { - contents.ExecutionRoleArn = __expectString(data.ExecutionRoleArn); - } - if (data.ExportSourceImages != null) { - contents.ExportSourceImages = __expectBoolean(data.ExportSourceImages); - } - if (data.ExportStatus != null) { - contents.ExportStatus = __expectString(data.ExportStatus); - } - if (data.OutputConfig != null) { - contents.OutputConfig = de_OutputConfigInput(data.OutputConfig, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExecutionRoleArn: __expectString, + ExportSourceImages: __expectBoolean, + ExportStatus: __expectString, + OutputConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -913,10 +910,9 @@ const de_ExportEarthObservationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -936,21 +932,14 @@ export const de_ExportVectorEnrichmentJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.ExecutionRoleArn != null) { - contents.ExecutionRoleArn = __expectString(data.ExecutionRoleArn); - } - if (data.ExportStatus != null) { - contents.ExportStatus = __expectString(data.ExportStatus); - } - if (data.OutputConfig != null) { - contents.OutputConfig = de_ExportVectorEnrichmentJobOutputConfig(data.OutputConfig, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + ExecutionRoleArn: __expectString, + ExportStatus: __expectString, + OutputConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -990,10 +979,9 @@ const de_ExportVectorEnrichmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1013,48 +1001,23 @@ export const de_GetEarthObservationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.DurationInSeconds != null) { - contents.DurationInSeconds = __expectInt32(data.DurationInSeconds); - } - if (data.ErrorDetails != null) { - contents.ErrorDetails = de_EarthObservationJobErrorDetails(data.ErrorDetails, context); - } - if (data.ExecutionRoleArn != null) { - contents.ExecutionRoleArn = __expectString(data.ExecutionRoleArn); - } - if (data.ExportErrorDetails != null) { - contents.ExportErrorDetails = de_ExportErrorDetails(data.ExportErrorDetails, context); - } - if (data.ExportStatus != null) { - contents.ExportStatus = __expectString(data.ExportStatus); - } - if (data.InputConfig != null) { - contents.InputConfig = de_InputConfigOutput(data.InputConfig, context); - } - if (data.JobConfig != null) { - contents.JobConfig = de_JobConfigInput(__expectUnion(data.JobConfig), context); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.OutputBands != null) { - contents.OutputBands = de_EarthObservationJobOutputBands(data.OutputBands, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DurationInSeconds: __expectInt32, + ErrorDetails: _json, + ExecutionRoleArn: __expectString, + ExportErrorDetails: _json, + ExportStatus: __expectString, + InputConfig: (_) => de_InputConfigOutput(_, context), + JobConfig: (_) => de_JobConfigInput(__expectUnion(_), context), + KmsKeyId: __expectString, + Name: __expectString, + OutputBands: _json, + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1088,10 +1051,9 @@ const de_GetEarthObservationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1111,30 +1073,17 @@ export const de_GetRasterDataCollectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DescriptionPageUrl != null) { - contents.DescriptionPageUrl = __expectString(data.DescriptionPageUrl); - } - if (data.ImageSourceBands != null) { - contents.ImageSourceBands = de_ImageSourceBandList(data.ImageSourceBands, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.SupportedFilters != null) { - contents.SupportedFilters = de_FilterList(data.SupportedFilters, context); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + Description: __expectString, + DescriptionPageUrl: __expectString, + ImageSourceBands: _json, + Name: __expectString, + SupportedFilters: (_) => de_FilterList(_, context), + Tags: _json, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1168,10 +1117,9 @@ const de_GetRasterDataCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1226,10 +1174,9 @@ const de_GetTileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1249,48 +1196,23 @@ export const de_GetVectorEnrichmentJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.DurationInSeconds != null) { - contents.DurationInSeconds = __expectInt32(data.DurationInSeconds); - } - if (data.ErrorDetails != null) { - contents.ErrorDetails = de_VectorEnrichmentJobErrorDetails(data.ErrorDetails, context); - } - if (data.ExecutionRoleArn != null) { - contents.ExecutionRoleArn = __expectString(data.ExecutionRoleArn); - } - if (data.ExportErrorDetails != null) { - contents.ExportErrorDetails = de_VectorEnrichmentJobExportErrorDetails(data.ExportErrorDetails, context); - } - if (data.ExportStatus != null) { - contents.ExportStatus = __expectString(data.ExportStatus); - } - if (data.InputConfig != null) { - contents.InputConfig = de_VectorEnrichmentJobInputConfig(data.InputConfig, context); - } - if (data.JobConfig != null) { - contents.JobConfig = de_VectorEnrichmentJobConfig(__expectUnion(data.JobConfig), context); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DurationInSeconds: __expectInt32, + ErrorDetails: _json, + ExecutionRoleArn: __expectString, + ExportErrorDetails: _json, + ExportStatus: __expectString, + InputConfig: _json, + JobConfig: (_) => _json(__expectUnion(_)), + KmsKeyId: __expectString, + Name: __expectString, + Status: __expectString, + Tags: _json, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1324,10 +1246,9 @@ const de_GetVectorEnrichmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1347,12 +1268,11 @@ export const de_ListEarthObservationJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EarthObservationJobSummaries != null) { - contents.EarthObservationJobSummaries = de_EarthObservationJobList(data.EarthObservationJobSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EarthObservationJobSummaries: (_) => de_EarthObservationJobList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1386,10 +1306,9 @@ const de_ListEarthObservationJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1409,12 +1328,11 @@ export const de_ListRasterDataCollectionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RasterDataCollectionSummaries != null) { - contents.RasterDataCollectionSummaries = de_DataCollectionsList(data.RasterDataCollectionSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + RasterDataCollectionSummaries: (_) => de_DataCollectionsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1448,10 +1366,9 @@ const de_ListRasterDataCollectionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1471,9 +1388,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1507,10 +1425,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1530,12 +1447,11 @@ export const de_ListVectorEnrichmentJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.VectorEnrichmentJobSummaries != null) { - contents.VectorEnrichmentJobSummaries = de_VectorEnrichmentJobList(data.VectorEnrichmentJobSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + VectorEnrichmentJobSummaries: (_) => de_VectorEnrichmentJobList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1569,10 +1485,9 @@ const de_ListVectorEnrichmentJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1592,15 +1507,12 @@ export const de_SearchRasterDataCollectionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateResultCount != null) { - contents.ApproximateResultCount = __expectInt32(data.ApproximateResultCount); - } - if (data.Items != null) { - contents.Items = de_ItemSourceList(data.Items, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ApproximateResultCount: __expectInt32, + Items: (_) => de_ItemSourceList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1634,10 +1546,9 @@ const de_SearchRasterDataCollectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1657,36 +1568,19 @@ export const de_StartEarthObservationJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.DurationInSeconds != null) { - contents.DurationInSeconds = __expectInt32(data.DurationInSeconds); - } - if (data.ExecutionRoleArn != null) { - contents.ExecutionRoleArn = __expectString(data.ExecutionRoleArn); - } - if (data.InputConfig != null) { - contents.InputConfig = de_InputConfigOutput(data.InputConfig, context); - } - if (data.JobConfig != null) { - contents.JobConfig = de_JobConfigInput(__expectUnion(data.JobConfig), context); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DurationInSeconds: __expectInt32, + ExecutionRoleArn: __expectString, + InputConfig: (_) => de_InputConfigOutput(_, context), + JobConfig: (_) => de_JobConfigInput(__expectUnion(_), context), + KmsKeyId: __expectString, + Name: __expectString, + Status: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1726,10 +1620,9 @@ const de_StartEarthObservationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1749,39 +1642,20 @@ export const de_StartVectorEnrichmentJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationTime)); - } - if (data.DurationInSeconds != null) { - contents.DurationInSeconds = __expectInt32(data.DurationInSeconds); - } - if (data.ExecutionRoleArn != null) { - contents.ExecutionRoleArn = __expectString(data.ExecutionRoleArn); - } - if (data.InputConfig != null) { - contents.InputConfig = de_VectorEnrichmentJobInputConfig(data.InputConfig, context); - } - if (data.JobConfig != null) { - contents.JobConfig = de_VectorEnrichmentJobConfig(__expectUnion(data.JobConfig), context); - } - if (data.KmsKeyId != null) { - contents.KmsKeyId = __expectString(data.KmsKeyId); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Tags != null) { - contents.Tags = de_Tags(data.Tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DurationInSeconds: __expectInt32, + ExecutionRoleArn: __expectString, + InputConfig: _json, + JobConfig: (_) => _json(__expectUnion(_)), + KmsKeyId: __expectString, + Name: __expectString, + Status: __expectString, + Tags: _json, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1821,10 +1695,9 @@ const de_StartVectorEnrichmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1880,10 +1753,9 @@ const de_StopEarthObservationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1939,10 +1811,9 @@ const de_StopVectorEnrichmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1995,10 +1866,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2051,16 +1921,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2070,9 +1939,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2086,12 +1956,11 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2108,12 +1977,11 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2130,12 +1998,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2152,12 +2019,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2171,12 +2037,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2190,12 +2055,11 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2224,110 +2088,41 @@ const se_AreaOfInterestGeometry = (input: AreaOfInterestGeometry, context: __Ser }); }; -/** - * serializeAws_restJson1BandMathConfigInput - */ -const se_BandMathConfigInput = (input: BandMathConfigInput, context: __SerdeContext): any => { - return { - ...(input.CustomIndices != null && { CustomIndices: se_CustomIndicesInput(input.CustomIndices, context) }), - ...(input.PredefinedIndices != null && { PredefinedIndices: se_StringListInput(input.PredefinedIndices, context) }), - }; -}; +// se_BandMathConfigInput omitted. -/** - * serializeAws_restJson1CloudMaskingConfigInput - */ -const se_CloudMaskingConfigInput = (input: CloudMaskingConfigInput, context: __SerdeContext): any => { - return {}; -}; +// se_CloudMaskingConfigInput omitted. -/** - * serializeAws_restJson1CloudRemovalConfigInput - */ -const se_CloudRemovalConfigInput = (input: CloudRemovalConfigInput, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.InterpolationValue != null && { InterpolationValue: input.InterpolationValue }), - ...(input.TargetBands != null && { TargetBands: se_StringListInput(input.TargetBands, context) }), - }; -}; +// se_CloudRemovalConfigInput omitted. -/** - * serializeAws_restJson1CustomIndicesInput - */ -const se_CustomIndicesInput = (input: CustomIndicesInput, context: __SerdeContext): any => { - return { - ...(input.Operations != null && { Operations: se_OperationsListInput(input.Operations, context) }), - }; -}; +// se_CustomIndicesInput omitted. /** * serializeAws_restJson1EoCloudCoverInput */ const se_EoCloudCoverInput = (input: EoCloudCoverInput, context: __SerdeContext): any => { - return { - ...(input.LowerBound != null && { LowerBound: __serializeFloat(input.LowerBound) }), - ...(input.UpperBound != null && { UpperBound: __serializeFloat(input.UpperBound) }), - }; -}; - -/** - * serializeAws_restJson1EojDataSourceConfigInput - */ -const se_EojDataSourceConfigInput = (input: EojDataSourceConfigInput, context: __SerdeContext): any => { - return EojDataSourceConfigInput.visit(input, { - S3Data: (value) => ({ S3Data: se_S3DataInput(value, context) }), - _: (name, value) => ({ name: value } as any), + return take(input, { + LowerBound: __serializeFloat, + UpperBound: __serializeFloat, }); }; -/** - * serializeAws_restJson1ExportS3DataInput - */ -const se_ExportS3DataInput = (input: ExportS3DataInput, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_EojDataSourceConfigInput omitted. -/** - * serializeAws_restJson1ExportVectorEnrichmentJobOutputConfig - */ -const se_ExportVectorEnrichmentJobOutputConfig = ( - input: ExportVectorEnrichmentJobOutputConfig, - context: __SerdeContext -): any => { - return { - ...(input.S3Data != null && { S3Data: se_VectorEnrichmentJobS3Data(input.S3Data, context) }), - }; -}; +// se_ExportS3DataInput omitted. -/** - * serializeAws_restJson1GeoMosaicConfigInput - */ -const se_GeoMosaicConfigInput = (input: GeoMosaicConfigInput, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.TargetBands != null && { TargetBands: se_StringListInput(input.TargetBands, context) }), - }; -}; +// se_ExportVectorEnrichmentJobOutputConfig omitted. + +// se_GeoMosaicConfigInput omitted. /** * serializeAws_restJson1InputConfigInput */ const se_InputConfigInput = (input: InputConfigInput, context: __SerdeContext): any => { - return { - ...(input.DataSourceConfig != null && { - DataSourceConfig: se_EojDataSourceConfigInput(input.DataSourceConfig, context), - }), - ...(input.PreviousEarthObservationJobArn != null && { - PreviousEarthObservationJobArn: input.PreviousEarthObservationJobArn, - }), - ...(input.RasterDataCollectionQuery != null && { - RasterDataCollectionQuery: se_RasterDataCollectionQueryInput(input.RasterDataCollectionQuery, context), - }), - }; + return take(input, { + DataSourceConfig: _json, + PreviousEarthObservationJobArn: [], + RasterDataCollectionQuery: (_) => se_RasterDataCollectionQueryInput(_, context), + }); }; /** @@ -2335,38 +2130,29 @@ const se_InputConfigInput = (input: InputConfigInput, context: __SerdeContext): */ const se_JobConfigInput = (input: JobConfigInput, context: __SerdeContext): any => { return JobConfigInput.visit(input, { - BandMathConfig: (value) => ({ BandMathConfig: se_BandMathConfigInput(value, context) }), - CloudMaskingConfig: (value) => ({ CloudMaskingConfig: se_CloudMaskingConfigInput(value, context) }), - CloudRemovalConfig: (value) => ({ CloudRemovalConfig: se_CloudRemovalConfigInput(value, context) }), - GeoMosaicConfig: (value) => ({ GeoMosaicConfig: se_GeoMosaicConfigInput(value, context) }), - LandCoverSegmentationConfig: (value) => ({ - LandCoverSegmentationConfig: se_LandCoverSegmentationConfigInput(value, context), - }), + BandMathConfig: (value) => ({ BandMathConfig: _json(value) }), + CloudMaskingConfig: (value) => ({ CloudMaskingConfig: _json(value) }), + CloudRemovalConfig: (value) => ({ CloudRemovalConfig: _json(value) }), + GeoMosaicConfig: (value) => ({ GeoMosaicConfig: _json(value) }), + LandCoverSegmentationConfig: (value) => ({ LandCoverSegmentationConfig: _json(value) }), ResamplingConfig: (value) => ({ ResamplingConfig: se_ResamplingConfigInput(value, context) }), StackConfig: (value) => ({ StackConfig: se_StackConfigInput(value, context) }), - TemporalStatisticsConfig: (value) => ({ - TemporalStatisticsConfig: se_TemporalStatisticsConfigInput(value, context), - }), - ZonalStatisticsConfig: (value) => ({ ZonalStatisticsConfig: se_ZonalStatisticsConfigInput(value, context) }), + TemporalStatisticsConfig: (value) => ({ TemporalStatisticsConfig: _json(value) }), + ZonalStatisticsConfig: (value) => ({ ZonalStatisticsConfig: _json(value) }), _: (name, value) => ({ name: value } as any), }); }; -/** - * serializeAws_restJson1LandCoverSegmentationConfigInput - */ -const se_LandCoverSegmentationConfigInput = (input: LandCoverSegmentationConfigInput, context: __SerdeContext): any => { - return {}; -}; +// se_LandCoverSegmentationConfigInput omitted. /** * serializeAws_restJson1LandsatCloudCoverLandInput */ const se_LandsatCloudCoverLandInput = (input: LandsatCloudCoverLandInput, context: __SerdeContext): any => { - return { - ...(input.LowerBound != null && { LowerBound: __serializeFloat(input.LowerBound) }), - ...(input.UpperBound != null && { UpperBound: __serializeFloat(input.UpperBound) }), - }; + return take(input, { + LowerBound: __serializeFloat, + UpperBound: __serializeFloat, + }); }; /** @@ -2402,94 +2188,51 @@ const se_LinearRingsList = (input: number[][][][], context: __SerdeContext): any }); }; -/** - * serializeAws_restJson1MapMatchingConfig - */ -const se_MapMatchingConfig = (input: MapMatchingConfig, context: __SerdeContext): any => { - return { - ...(input.IdAttributeName != null && { IdAttributeName: input.IdAttributeName }), - ...(input.TimestampAttributeName != null && { TimestampAttributeName: input.TimestampAttributeName }), - ...(input.XAttributeName != null && { XAttributeName: input.XAttributeName }), - ...(input.YAttributeName != null && { YAttributeName: input.YAttributeName }), - }; -}; +// se_MapMatchingConfig omitted. /** * serializeAws_restJson1MultiPolygonGeometryInput */ const se_MultiPolygonGeometryInput = (input: MultiPolygonGeometryInput, context: __SerdeContext): any => { - return { - ...(input.Coordinates != null && { Coordinates: se_LinearRingsList(input.Coordinates, context) }), - }; + return take(input, { + Coordinates: (_) => se_LinearRingsList(_, context), + }); }; -/** - * serializeAws_restJson1Operation - */ -const se_Operation = (input: Operation, context: __SerdeContext): any => { - return { - ...(input.Equation != null && { Equation: input.Equation }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputType != null && { OutputType: input.OutputType }), - }; -}; +// se_Operation omitted. -/** - * serializeAws_restJson1OperationsListInput - */ -const se_OperationsListInput = (input: Operation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Operation(entry, context); - }); -}; +// se_OperationsListInput omitted. -/** - * serializeAws_restJson1OutputConfigInput - */ -const se_OutputConfigInput = (input: OutputConfigInput, context: __SerdeContext): any => { - return { - ...(input.S3Data != null && { S3Data: se_ExportS3DataInput(input.S3Data, context) }), - }; -}; +// se_OutputConfigInput omitted. /** * serializeAws_restJson1OutputResolutionResamplingInput */ const se_OutputResolutionResamplingInput = (input: OutputResolutionResamplingInput, context: __SerdeContext): any => { - return { - ...(input.UserDefined != null && { UserDefined: se_UserDefined(input.UserDefined, context) }), - }; + return take(input, { + UserDefined: (_) => se_UserDefined(_, context), + }); }; /** * serializeAws_restJson1OutputResolutionStackInput */ const se_OutputResolutionStackInput = (input: OutputResolutionStackInput, context: __SerdeContext): any => { - return { - ...(input.Predefined != null && { Predefined: input.Predefined }), - ...(input.UserDefined != null && { UserDefined: se_UserDefined(input.UserDefined, context) }), - }; + return take(input, { + Predefined: [], + UserDefined: (_) => se_UserDefined(_, context), + }); }; -/** - * serializeAws_restJson1PlatformInput - */ -const se_PlatformInput = (input: PlatformInput, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_PlatformInput omitted. /** * serializeAws_restJson1PolygonGeometryInput */ const se_PolygonGeometryInput = (input: PolygonGeometryInput, context: __SerdeContext): any => { - return { - ...(input.Coordinates != null && { Coordinates: se_LinearRings(input.Coordinates, context) }), - }; + return take(input, { + Coordinates: (_) => se_LinearRings(_, context), + }); }; /** @@ -2510,7 +2253,7 @@ const se_Property = (input: Property, context: __SerdeContext): any => { return Property.visit(input, { EoCloudCover: (value) => ({ EoCloudCover: se_EoCloudCoverInput(value, context) }), LandsatCloudCoverLand: (value) => ({ LandsatCloudCoverLand: se_LandsatCloudCoverLandInput(value, context) }), - Platform: (value) => ({ Platform: se_PlatformInput(value, context) }), + Platform: (value) => ({ Platform: _json(value) }), ViewOffNadir: (value) => ({ ViewOffNadir: se_ViewOffNadirInput(value, context) }), ViewSunAzimuth: (value) => ({ ViewSunAzimuth: se_ViewSunAzimuthInput(value, context) }), ViewSunElevation: (value) => ({ ViewSunElevation: se_ViewSunElevationInput(value, context) }), @@ -2522,19 +2265,19 @@ const se_Property = (input: Property, context: __SerdeContext): any => { * serializeAws_restJson1PropertyFilter */ const se_PropertyFilter = (input: PropertyFilter, context: __SerdeContext): any => { - return { - ...(input.Property != null && { Property: se_Property(input.Property, context) }), - }; + return take(input, { + Property: (_) => se_Property(_, context), + }); }; /** * serializeAws_restJson1PropertyFilters */ const se_PropertyFilters = (input: PropertyFilters, context: __SerdeContext): any => { - return { - ...(input.LogicalOperator != null && { LogicalOperator: input.LogicalOperator }), - ...(input.Properties != null && { Properties: se_PropertyFiltersList(input.Properties, context) }), - }; + return take(input, { + LogicalOperator: [], + Properties: (_) => se_PropertyFiltersList(_, context), + }); }; /** @@ -2552,12 +2295,12 @@ const se_PropertyFiltersList = (input: PropertyFilter[], context: __SerdeContext * serializeAws_restJson1RasterDataCollectionQueryInput */ const se_RasterDataCollectionQueryInput = (input: RasterDataCollectionQueryInput, context: __SerdeContext): any => { - return { - ...(input.AreaOfInterest != null && { AreaOfInterest: se_AreaOfInterest(input.AreaOfInterest, context) }), - ...(input.PropertyFilters != null && { PropertyFilters: se_PropertyFilters(input.PropertyFilters, context) }), - ...(input.RasterDataCollectionArn != null && { RasterDataCollectionArn: input.RasterDataCollectionArn }), - ...(input.TimeRangeFilter != null && { TimeRangeFilter: se_TimeRangeFilterInput(input.TimeRangeFilter, context) }), - }; + return take(input, { + AreaOfInterest: (_) => se_AreaOfInterest(_, context), + PropertyFilters: (_) => se_PropertyFilters(_, context), + RasterDataCollectionArn: [], + TimeRangeFilter: (_) => se_TimeRangeFilterInput(_, context), + }); }; /** @@ -2567,224 +2310,108 @@ const se_RasterDataCollectionQueryWithBandFilterInput = ( input: RasterDataCollectionQueryWithBandFilterInput, context: __SerdeContext ): any => { - return { - ...(input.AreaOfInterest != null && { AreaOfInterest: se_AreaOfInterest(input.AreaOfInterest, context) }), - ...(input.BandFilter != null && { BandFilter: se_StringListInput(input.BandFilter, context) }), - ...(input.PropertyFilters != null && { PropertyFilters: se_PropertyFilters(input.PropertyFilters, context) }), - ...(input.TimeRangeFilter != null && { TimeRangeFilter: se_TimeRangeFilterInput(input.TimeRangeFilter, context) }), - }; + return take(input, { + AreaOfInterest: (_) => se_AreaOfInterest(_, context), + BandFilter: _json, + PropertyFilters: (_) => se_PropertyFilters(_, context), + TimeRangeFilter: (_) => se_TimeRangeFilterInput(_, context), + }); }; /** * serializeAws_restJson1ResamplingConfigInput */ const se_ResamplingConfigInput = (input: ResamplingConfigInput, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.OutputResolution != null && { - OutputResolution: se_OutputResolutionResamplingInput(input.OutputResolution, context), - }), - ...(input.TargetBands != null && { TargetBands: se_StringListInput(input.TargetBands, context) }), - }; + return take(input, { + AlgorithmName: [], + OutputResolution: (_) => se_OutputResolutionResamplingInput(_, context), + TargetBands: _json, + }); }; -/** - * serializeAws_restJson1ReverseGeocodingConfig - */ -const se_ReverseGeocodingConfig = (input: ReverseGeocodingConfig, context: __SerdeContext): any => { - return { - ...(input.XAttributeName != null && { XAttributeName: input.XAttributeName }), - ...(input.YAttributeName != null && { YAttributeName: input.YAttributeName }), - }; -}; +// se_ReverseGeocodingConfig omitted. -/** - * serializeAws_restJson1S3DataInput - */ -const se_S3DataInput = (input: S3DataInput, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MetadataProvider != null && { MetadataProvider: input.MetadataProvider }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_S3DataInput omitted. /** * serializeAws_restJson1StackConfigInput */ const se_StackConfigInput = (input: StackConfigInput, context: __SerdeContext): any => { - return { - ...(input.OutputResolution != null && { - OutputResolution: se_OutputResolutionStackInput(input.OutputResolution, context), - }), - ...(input.TargetBands != null && { TargetBands: se_StringListInput(input.TargetBands, context) }), - }; + return take(input, { + OutputResolution: (_) => se_OutputResolutionStackInput(_, context), + TargetBands: _json, + }); }; -/** - * serializeAws_restJson1StringListInput - */ -const se_StringListInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringListInput omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1TemporalStatisticsConfigInput - */ -const se_TemporalStatisticsConfigInput = (input: TemporalStatisticsConfigInput, context: __SerdeContext): any => { - return { - ...(input.GroupBy != null && { GroupBy: input.GroupBy }), - ...(input.Statistics != null && { Statistics: se_TemporalStatisticsListInput(input.Statistics, context) }), - ...(input.TargetBands != null && { TargetBands: se_StringListInput(input.TargetBands, context) }), - }; -}; +// se_TemporalStatisticsConfigInput omitted. -/** - * serializeAws_restJson1TemporalStatisticsListInput - */ -const se_TemporalStatisticsListInput = (input: (TemporalStatistics | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TemporalStatisticsListInput omitted. /** * serializeAws_restJson1TimeRangeFilterInput */ const se_TimeRangeFilterInput = (input: TimeRangeFilterInput, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_restJson1UserDefined */ const se_UserDefined = (input: UserDefined, context: __SerdeContext): any => { - return { - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; -}; - -/** - * serializeAws_restJson1VectorEnrichmentJobConfig - */ -const se_VectorEnrichmentJobConfig = (input: VectorEnrichmentJobConfig, context: __SerdeContext): any => { - return VectorEnrichmentJobConfig.visit(input, { - MapMatchingConfig: (value) => ({ MapMatchingConfig: se_MapMatchingConfig(value, context) }), - ReverseGeocodingConfig: (value) => ({ ReverseGeocodingConfig: se_ReverseGeocodingConfig(value, context) }), - _: (name, value) => ({ name: value } as any), + return take(input, { + Unit: [], + Value: __serializeFloat, }); }; -/** - * serializeAws_restJson1VectorEnrichmentJobDataSourceConfigInput - */ -const se_VectorEnrichmentJobDataSourceConfigInput = ( - input: VectorEnrichmentJobDataSourceConfigInput, - context: __SerdeContext -): any => { - return VectorEnrichmentJobDataSourceConfigInput.visit(input, { - S3Data: (value) => ({ S3Data: se_VectorEnrichmentJobS3Data(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_VectorEnrichmentJobConfig omitted. -/** - * serializeAws_restJson1VectorEnrichmentJobInputConfig - */ -const se_VectorEnrichmentJobInputConfig = (input: VectorEnrichmentJobInputConfig, context: __SerdeContext): any => { - return { - ...(input.DataSourceConfig != null && { - DataSourceConfig: se_VectorEnrichmentJobDataSourceConfigInput(input.DataSourceConfig, context), - }), - ...(input.DocumentType != null && { DocumentType: input.DocumentType }), - }; -}; +// se_VectorEnrichmentJobDataSourceConfigInput omitted. -/** - * serializeAws_restJson1VectorEnrichmentJobS3Data - */ -const se_VectorEnrichmentJobS3Data = (input: VectorEnrichmentJobS3Data, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_VectorEnrichmentJobInputConfig omitted. + +// se_VectorEnrichmentJobS3Data omitted. /** * serializeAws_restJson1ViewOffNadirInput */ const se_ViewOffNadirInput = (input: ViewOffNadirInput, context: __SerdeContext): any => { - return { - ...(input.LowerBound != null && { LowerBound: __serializeFloat(input.LowerBound) }), - ...(input.UpperBound != null && { UpperBound: __serializeFloat(input.UpperBound) }), - }; + return take(input, { + LowerBound: __serializeFloat, + UpperBound: __serializeFloat, + }); }; /** * serializeAws_restJson1ViewSunAzimuthInput */ const se_ViewSunAzimuthInput = (input: ViewSunAzimuthInput, context: __SerdeContext): any => { - return { - ...(input.LowerBound != null && { LowerBound: __serializeFloat(input.LowerBound) }), - ...(input.UpperBound != null && { UpperBound: __serializeFloat(input.UpperBound) }), - }; + return take(input, { + LowerBound: __serializeFloat, + UpperBound: __serializeFloat, + }); }; /** * serializeAws_restJson1ViewSunElevationInput */ const se_ViewSunElevationInput = (input: ViewSunElevationInput, context: __SerdeContext): any => { - return { - ...(input.LowerBound != null && { LowerBound: __serializeFloat(input.LowerBound) }), - ...(input.UpperBound != null && { UpperBound: __serializeFloat(input.UpperBound) }), - }; + return take(input, { + LowerBound: __serializeFloat, + UpperBound: __serializeFloat, + }); }; -/** - * serializeAws_restJson1ZonalStatisticsConfigInput - */ -const se_ZonalStatisticsConfigInput = (input: ZonalStatisticsConfigInput, context: __SerdeContext): any => { - return { - ...(input.Statistics != null && { Statistics: se_ZonalStatisticsListInput(input.Statistics, context) }), - ...(input.TargetBands != null && { TargetBands: se_StringListInput(input.TargetBands, context) }), - ...(input.ZoneS3Path != null && { ZoneS3Path: input.ZoneS3Path }), - ...(input.ZoneS3PathKmsKeyId != null && { ZoneS3PathKmsKeyId: input.ZoneS3PathKmsKeyId }), - }; -}; +// se_ZonalStatisticsConfigInput omitted. -/** - * serializeAws_restJson1ZonalStatisticsListInput - */ -const se_ZonalStatisticsListInput = (input: (ZonalStatistics | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ZonalStatisticsListInput omitted. /** * deserializeAws_restJson1AreaOfInterest @@ -2815,65 +2442,17 @@ const de_AreaOfInterestGeometry = (output: any, context: __SerdeContext): AreaOf return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1AssetsMap - */ -const de_AssetsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AssetValue(value, context); - return acc; - }, {}); -}; +// de_AssetsMap omitted. -/** - * deserializeAws_restJson1AssetValue - */ -const de_AssetValue = (output: any, context: __SerdeContext): AssetValue => { - return { - Href: __expectString(output.Href), - } as any; -}; +// de_AssetValue omitted. -/** - * deserializeAws_restJson1BandMathConfigInput - */ -const de_BandMathConfigInput = (output: any, context: __SerdeContext): BandMathConfigInput => { - return { - CustomIndices: output.CustomIndices != null ? de_CustomIndicesInput(output.CustomIndices, context) : undefined, - PredefinedIndices: - output.PredefinedIndices != null ? de_StringListInput(output.PredefinedIndices, context) : undefined, - } as any; -}; +// de_BandMathConfigInput omitted. -/** - * deserializeAws_restJson1CloudMaskingConfigInput - */ -const de_CloudMaskingConfigInput = (output: any, context: __SerdeContext): CloudMaskingConfigInput => { - return {} as any; -}; +// de_CloudMaskingConfigInput omitted. -/** - * deserializeAws_restJson1CloudRemovalConfigInput - */ -const de_CloudRemovalConfigInput = (output: any, context: __SerdeContext): CloudRemovalConfigInput => { - return { - AlgorithmName: __expectString(output.AlgorithmName), - InterpolationValue: __expectString(output.InterpolationValue), - TargetBands: output.TargetBands != null ? de_StringListInput(output.TargetBands, context) : undefined, - } as any; -}; +// de_CloudRemovalConfigInput omitted. -/** - * deserializeAws_restJson1CustomIndicesInput - */ -const de_CustomIndicesInput = (output: any, context: __SerdeContext): CustomIndicesInput => { - return { - Operations: output.Operations != null ? de_OperationsListInput(output.Operations, context) : undefined, - } as any; -}; +// de_CustomIndicesInput omitted. /** * deserializeAws_restJson1DataCollectionsList @@ -2882,23 +2461,12 @@ const de_DataCollectionsList = (output: any, context: __SerdeContext): RasterDat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RasterDataCollectionMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EarthObservationJobErrorDetails - */ -const de_EarthObservationJobErrorDetails = (output: any, context: __SerdeContext): EarthObservationJobErrorDetails => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; +// de_EarthObservationJobErrorDetails omitted. /** * deserializeAws_restJson1EarthObservationJobList @@ -2907,105 +2475,43 @@ const de_EarthObservationJobList = (output: any, context: __SerdeContext): ListE const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListEarthObservationJobOutputConfig(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EarthObservationJobOutputBands - */ -const de_EarthObservationJobOutputBands = (output: any, context: __SerdeContext): OutputBand[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputBand(entry, context); - }); - return retVal; -}; +// de_EarthObservationJobOutputBands omitted. /** * deserializeAws_restJson1EoCloudCoverInput */ const de_EoCloudCoverInput = (output: any, context: __SerdeContext): EoCloudCoverInput => { - return { - LowerBound: __limitedParseFloat32(output.LowerBound), - UpperBound: __limitedParseFloat32(output.UpperBound), - } as any; + return take(output, { + LowerBound: __limitedParseFloat32, + UpperBound: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_restJson1EojDataSourceConfigInput - */ -const de_EojDataSourceConfigInput = (output: any, context: __SerdeContext): EojDataSourceConfigInput => { - if (output.S3Data != null) { - return { - S3Data: de_S3DataInput(output.S3Data, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_EojDataSourceConfigInput omitted. -/** - * deserializeAws_restJson1ExportErrorDetails - */ -const de_ExportErrorDetails = (output: any, context: __SerdeContext): ExportErrorDetails => { - return { - ExportResults: - output.ExportResults != null ? de_ExportErrorDetailsOutput(output.ExportResults, context) : undefined, - ExportSourceImages: - output.ExportSourceImages != null ? de_ExportErrorDetailsOutput(output.ExportSourceImages, context) : undefined, - } as any; -}; +// de_ExportErrorDetails omitted. -/** - * deserializeAws_restJson1ExportErrorDetailsOutput - */ -const de_ExportErrorDetailsOutput = (output: any, context: __SerdeContext): ExportErrorDetailsOutput => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; +// de_ExportErrorDetailsOutput omitted. -/** - * deserializeAws_restJson1ExportS3DataInput - */ -const de_ExportS3DataInput = (output: any, context: __SerdeContext): ExportS3DataInput => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_ExportS3DataInput omitted. -/** - * deserializeAws_restJson1ExportVectorEnrichmentJobOutputConfig - */ -const de_ExportVectorEnrichmentJobOutputConfig = ( - output: any, - context: __SerdeContext -): ExportVectorEnrichmentJobOutputConfig => { - return { - S3Data: output.S3Data != null ? de_VectorEnrichmentJobS3Data(output.S3Data, context) : undefined, - } as any; -}; +// de_ExportVectorEnrichmentJobOutputConfig omitted. /** * deserializeAws_restJson1Filter */ const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - Maximum: __limitedParseFloat32(output.Maximum), - Minimum: __limitedParseFloat32(output.Minimum), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; + return take(output, { + Maximum: __limitedParseFloat32, + Minimum: __limitedParseFloat32, + Name: __expectString, + Type: __expectString, + }) as any; }; /** @@ -3015,9 +2521,6 @@ const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Filter(entry, context); }); return retVal; @@ -3027,66 +2530,38 @@ const de_FilterList = (output: any, context: __SerdeContext): Filter[] => { * deserializeAws_restJson1Geometry */ const de_Geometry = (output: any, context: __SerdeContext): Geometry => { - return { - Coordinates: output.Coordinates != null ? de_LinearRings(output.Coordinates, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Coordinates: (_: any) => de_LinearRings(_, context), + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1GeoMosaicConfigInput - */ -const de_GeoMosaicConfigInput = (output: any, context: __SerdeContext): GeoMosaicConfigInput => { - return { - AlgorithmName: __expectString(output.AlgorithmName), - TargetBands: output.TargetBands != null ? de_StringListInput(output.TargetBands, context) : undefined, - } as any; -}; +// de_GeoMosaicConfigInput omitted. -/** - * deserializeAws_restJson1ImageSourceBandList - */ -const de_ImageSourceBandList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ImageSourceBandList omitted. /** * deserializeAws_restJson1InputConfigOutput */ const de_InputConfigOutput = (output: any, context: __SerdeContext): InputConfigOutput => { - return { - DataSourceConfig: - output.DataSourceConfig != null - ? de_EojDataSourceConfigInput(__expectUnion(output.DataSourceConfig), context) - : undefined, - PreviousEarthObservationJobArn: __expectString(output.PreviousEarthObservationJobArn), - RasterDataCollectionQuery: - output.RasterDataCollectionQuery != null - ? de_RasterDataCollectionQueryOutput(output.RasterDataCollectionQuery, context) - : undefined, - } as any; + return take(output, { + DataSourceConfig: (_: any) => _json(__expectUnion(_)), + PreviousEarthObservationJobArn: __expectString, + RasterDataCollectionQuery: (_: any) => de_RasterDataCollectionQueryOutput(_, context), + }) as any; }; /** * deserializeAws_restJson1ItemSource */ const de_ItemSource = (output: any, context: __SerdeContext): ItemSource => { - return { - Assets: output.Assets != null ? de_AssetsMap(output.Assets, context) : undefined, - DateTime: - output.DateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateTime))) : undefined, - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - Id: __expectString(output.Id), - Properties: output.Properties != null ? de_Properties(output.Properties, context) : undefined, - } as any; + return take(output, { + Assets: _json, + DateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Geometry: (_: any) => de_Geometry(_, context), + Id: __expectString, + Properties: (_: any) => de_Properties(_, context), + }) as any; }; /** @@ -3096,9 +2571,6 @@ const de_ItemSourceList = (output: any, context: __SerdeContext): ItemSource[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ItemSource(entry, context); }); return retVal; @@ -3110,27 +2582,27 @@ const de_ItemSourceList = (output: any, context: __SerdeContext): ItemSource[] = const de_JobConfigInput = (output: any, context: __SerdeContext): JobConfigInput => { if (output.BandMathConfig != null) { return { - BandMathConfig: de_BandMathConfigInput(output.BandMathConfig, context), + BandMathConfig: _json(output.BandMathConfig), }; } if (output.CloudMaskingConfig != null) { return { - CloudMaskingConfig: de_CloudMaskingConfigInput(output.CloudMaskingConfig, context), + CloudMaskingConfig: _json(output.CloudMaskingConfig), }; } if (output.CloudRemovalConfig != null) { return { - CloudRemovalConfig: de_CloudRemovalConfigInput(output.CloudRemovalConfig, context), + CloudRemovalConfig: _json(output.CloudRemovalConfig), }; } if (output.GeoMosaicConfig != null) { return { - GeoMosaicConfig: de_GeoMosaicConfigInput(output.GeoMosaicConfig, context), + GeoMosaicConfig: _json(output.GeoMosaicConfig), }; } if (output.LandCoverSegmentationConfig != null) { return { - LandCoverSegmentationConfig: de_LandCoverSegmentationConfigInput(output.LandCoverSegmentationConfig, context), + LandCoverSegmentationConfig: _json(output.LandCoverSegmentationConfig), }; } if (output.ResamplingConfig != null) { @@ -3145,35 +2617,27 @@ const de_JobConfigInput = (output: any, context: __SerdeContext): JobConfigInput } if (output.TemporalStatisticsConfig != null) { return { - TemporalStatisticsConfig: de_TemporalStatisticsConfigInput(output.TemporalStatisticsConfig, context), + TemporalStatisticsConfig: _json(output.TemporalStatisticsConfig), }; } if (output.ZonalStatisticsConfig != null) { return { - ZonalStatisticsConfig: de_ZonalStatisticsConfigInput(output.ZonalStatisticsConfig, context), + ZonalStatisticsConfig: _json(output.ZonalStatisticsConfig), }; } return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1LandCoverSegmentationConfigInput - */ -const de_LandCoverSegmentationConfigInput = ( - output: any, - context: __SerdeContext -): LandCoverSegmentationConfigInput => { - return {} as any; -}; +// de_LandCoverSegmentationConfigInput omitted. /** * deserializeAws_restJson1LandsatCloudCoverLandInput */ const de_LandsatCloudCoverLandInput = (output: any, context: __SerdeContext): LandsatCloudCoverLandInput => { - return { - LowerBound: __limitedParseFloat32(output.LowerBound), - UpperBound: __limitedParseFloat32(output.UpperBound), - } as any; + return take(output, { + LowerBound: __limitedParseFloat32, + UpperBound: __limitedParseFloat32, + }) as any; }; /** @@ -3183,9 +2647,6 @@ const de_LinearRing = (output: any, context: __SerdeContext): number[][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Position(entry, context); }); return retVal; @@ -3198,9 +2659,6 @@ const de_LinearRings = (output: any, context: __SerdeContext): number[][][] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LinearRing(entry, context); }); return retVal; @@ -3213,9 +2671,6 @@ const de_LinearRingsList = (output: any, context: __SerdeContext): number[][][][ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LinearRings(entry, context); }); return retVal; @@ -3228,16 +2683,15 @@ const de_ListEarthObservationJobOutputConfig = ( output: any, context: __SerdeContext ): ListEarthObservationJobOutputConfig => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationTime)) : undefined, - DurationInSeconds: __expectInt32(output.DurationInSeconds), - Name: __expectString(output.Name), - OperationType: __expectString(output.OperationType), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DurationInSeconds: __expectInt32, + Name: __expectString, + OperationType: __expectString, + Status: __expectString, + Tags: _json, + }) as any; }; /** @@ -3247,120 +2701,64 @@ const de_ListVectorEnrichmentJobOutputConfig = ( output: any, context: __SerdeContext ): ListVectorEnrichmentJobOutputConfig => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreationTime)) : undefined, - DurationInSeconds: __expectInt32(output.DurationInSeconds), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DurationInSeconds: __expectInt32, + Name: __expectString, + Status: __expectString, + Tags: _json, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1MapMatchingConfig - */ -const de_MapMatchingConfig = (output: any, context: __SerdeContext): MapMatchingConfig => { - return { - IdAttributeName: __expectString(output.IdAttributeName), - TimestampAttributeName: __expectString(output.TimestampAttributeName), - XAttributeName: __expectString(output.XAttributeName), - YAttributeName: __expectString(output.YAttributeName), - } as any; -}; +// de_MapMatchingConfig omitted. /** * deserializeAws_restJson1MultiPolygonGeometryInput */ const de_MultiPolygonGeometryInput = (output: any, context: __SerdeContext): MultiPolygonGeometryInput => { - return { - Coordinates: output.Coordinates != null ? de_LinearRingsList(output.Coordinates, context) : undefined, - } as any; + return take(output, { + Coordinates: (_: any) => de_LinearRingsList(_, context), + }) as any; }; -/** - * deserializeAws_restJson1Operation - */ -const de_Operation = (output: any, context: __SerdeContext): Operation => { - return { - Equation: __expectString(output.Equation), - Name: __expectString(output.Name), - OutputType: __expectString(output.OutputType), - } as any; -}; +// de_Operation omitted. -/** - * deserializeAws_restJson1OperationsListInput - */ -const de_OperationsListInput = (output: any, context: __SerdeContext): Operation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Operation(entry, context); - }); - return retVal; -}; +// de_OperationsListInput omitted. -/** - * deserializeAws_restJson1OutputBand - */ -const de_OutputBand = (output: any, context: __SerdeContext): OutputBand => { - return { - BandName: __expectString(output.BandName), - OutputDataType: __expectString(output.OutputDataType), - } as any; -}; +// de_OutputBand omitted. -/** - * deserializeAws_restJson1OutputConfigInput - */ -const de_OutputConfigInput = (output: any, context: __SerdeContext): OutputConfigInput => { - return { - S3Data: output.S3Data != null ? de_ExportS3DataInput(output.S3Data, context) : undefined, - } as any; -}; +// de_OutputConfigInput omitted. /** * deserializeAws_restJson1OutputResolutionResamplingInput */ const de_OutputResolutionResamplingInput = (output: any, context: __SerdeContext): OutputResolutionResamplingInput => { - return { - UserDefined: output.UserDefined != null ? de_UserDefined(output.UserDefined, context) : undefined, - } as any; + return take(output, { + UserDefined: (_: any) => de_UserDefined(_, context), + }) as any; }; /** * deserializeAws_restJson1OutputResolutionStackInput */ const de_OutputResolutionStackInput = (output: any, context: __SerdeContext): OutputResolutionStackInput => { - return { - Predefined: __expectString(output.Predefined), - UserDefined: output.UserDefined != null ? de_UserDefined(output.UserDefined, context) : undefined, - } as any; + return take(output, { + Predefined: __expectString, + UserDefined: (_: any) => de_UserDefined(_, context), + }) as any; }; -/** - * deserializeAws_restJson1PlatformInput - */ -const de_PlatformInput = (output: any, context: __SerdeContext): PlatformInput => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - Value: __expectString(output.Value), - } as any; -}; +// de_PlatformInput omitted. /** * deserializeAws_restJson1PolygonGeometryInput */ const de_PolygonGeometryInput = (output: any, context: __SerdeContext): PolygonGeometryInput => { - return { - Coordinates: output.Coordinates != null ? de_LinearRings(output.Coordinates, context) : undefined, - } as any; + return take(output, { + Coordinates: (_: any) => de_LinearRings(_, context), + }) as any; }; /** @@ -3370,9 +2768,6 @@ const de_Position = (output: any, context: __SerdeContext): number[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __limitedParseDouble(entry) as any; }); return retVal; @@ -3382,14 +2777,14 @@ const de_Position = (output: any, context: __SerdeContext): number[] => { * deserializeAws_restJson1Properties */ const de_Properties = (output: any, context: __SerdeContext): Properties => { - return { - EoCloudCover: __limitedParseFloat32(output.EoCloudCover), - LandsatCloudCoverLand: __limitedParseFloat32(output.LandsatCloudCoverLand), - Platform: __expectString(output.Platform), - ViewOffNadir: __limitedParseFloat32(output.ViewOffNadir), - ViewSunAzimuth: __limitedParseFloat32(output.ViewSunAzimuth), - ViewSunElevation: __limitedParseFloat32(output.ViewSunElevation), - } as any; + return take(output, { + EoCloudCover: __limitedParseFloat32, + LandsatCloudCoverLand: __limitedParseFloat32, + Platform: __expectString, + ViewOffNadir: __limitedParseFloat32, + ViewSunAzimuth: __limitedParseFloat32, + ViewSunElevation: __limitedParseFloat32, + }) as any; }; /** @@ -3408,7 +2803,7 @@ const de_Property = (output: any, context: __SerdeContext): Property => { } if (output.Platform != null) { return { - Platform: de_PlatformInput(output.Platform, context), + Platform: _json(output.Platform), }; } if (output.ViewOffNadir != null) { @@ -3433,19 +2828,19 @@ const de_Property = (output: any, context: __SerdeContext): Property => { * deserializeAws_restJson1PropertyFilter */ const de_PropertyFilter = (output: any, context: __SerdeContext): PropertyFilter => { - return { - Property: output.Property != null ? de_Property(__expectUnion(output.Property), context) : undefined, - } as any; + return take(output, { + Property: (_: any) => de_Property(__expectUnion(_), context), + }) as any; }; /** * deserializeAws_restJson1PropertyFilters */ const de_PropertyFilters = (output: any, context: __SerdeContext): PropertyFilters => { - return { - LogicalOperator: __expectString(output.LogicalOperator), - Properties: output.Properties != null ? de_PropertyFiltersList(output.Properties, context) : undefined, - } as any; + return take(output, { + LogicalOperator: __expectString, + Properties: (_: any) => de_PropertyFiltersList(_, context), + }) as any; }; /** @@ -3455,9 +2850,6 @@ const de_PropertyFiltersList = (output: any, context: __SerdeContext): PropertyF const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PropertyFilter(entry, context); }); return retVal; @@ -3467,220 +2859,92 @@ const de_PropertyFiltersList = (output: any, context: __SerdeContext): PropertyF * deserializeAws_restJson1RasterDataCollectionMetadata */ const de_RasterDataCollectionMetadata = (output: any, context: __SerdeContext): RasterDataCollectionMetadata => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - DescriptionPageUrl: __expectString(output.DescriptionPageUrl), - Name: __expectString(output.Name), - SupportedFilters: output.SupportedFilters != null ? de_FilterList(output.SupportedFilters, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + Arn: __expectString, + Description: __expectString, + DescriptionPageUrl: __expectString, + Name: __expectString, + SupportedFilters: (_: any) => de_FilterList(_, context), + Tags: _json, + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1RasterDataCollectionQueryOutput */ const de_RasterDataCollectionQueryOutput = (output: any, context: __SerdeContext): RasterDataCollectionQueryOutput => { - return { - AreaOfInterest: - output.AreaOfInterest != null ? de_AreaOfInterest(__expectUnion(output.AreaOfInterest), context) : undefined, - PropertyFilters: output.PropertyFilters != null ? de_PropertyFilters(output.PropertyFilters, context) : undefined, - RasterDataCollectionArn: __expectString(output.RasterDataCollectionArn), - RasterDataCollectionName: __expectString(output.RasterDataCollectionName), - TimeRangeFilter: - output.TimeRangeFilter != null ? de_TimeRangeFilterOutput(output.TimeRangeFilter, context) : undefined, - } as any; + return take(output, { + AreaOfInterest: (_: any) => de_AreaOfInterest(__expectUnion(_), context), + PropertyFilters: (_: any) => de_PropertyFilters(_, context), + RasterDataCollectionArn: __expectString, + RasterDataCollectionName: __expectString, + TimeRangeFilter: (_: any) => de_TimeRangeFilterOutput(_, context), + }) as any; }; /** * deserializeAws_restJson1ResamplingConfigInput */ const de_ResamplingConfigInput = (output: any, context: __SerdeContext): ResamplingConfigInput => { - return { - AlgorithmName: __expectString(output.AlgorithmName), - OutputResolution: - output.OutputResolution != null - ? de_OutputResolutionResamplingInput(output.OutputResolution, context) - : undefined, - TargetBands: output.TargetBands != null ? de_StringListInput(output.TargetBands, context) : undefined, - } as any; + return take(output, { + AlgorithmName: __expectString, + OutputResolution: (_: any) => de_OutputResolutionResamplingInput(_, context), + TargetBands: _json, + }) as any; }; -/** - * deserializeAws_restJson1ReverseGeocodingConfig - */ -const de_ReverseGeocodingConfig = (output: any, context: __SerdeContext): ReverseGeocodingConfig => { - return { - XAttributeName: __expectString(output.XAttributeName), - YAttributeName: __expectString(output.YAttributeName), - } as any; -}; +// de_ReverseGeocodingConfig omitted. -/** - * deserializeAws_restJson1S3DataInput - */ -const de_S3DataInput = (output: any, context: __SerdeContext): S3DataInput => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - MetadataProvider: __expectString(output.MetadataProvider), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_S3DataInput omitted. /** * deserializeAws_restJson1StackConfigInput */ const de_StackConfigInput = (output: any, context: __SerdeContext): StackConfigInput => { - return { - OutputResolution: - output.OutputResolution != null ? de_OutputResolutionStackInput(output.OutputResolution, context) : undefined, - TargetBands: output.TargetBands != null ? de_StringListInput(output.TargetBands, context) : undefined, - } as any; + return take(output, { + OutputResolution: (_: any) => de_OutputResolutionStackInput(_, context), + TargetBands: _json, + }) as any; }; -/** - * deserializeAws_restJson1StringListInput - */ -const de_StringListInput = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringListInput omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1TemporalStatisticsConfigInput - */ -const de_TemporalStatisticsConfigInput = (output: any, context: __SerdeContext): TemporalStatisticsConfigInput => { - return { - GroupBy: __expectString(output.GroupBy), - Statistics: output.Statistics != null ? de_TemporalStatisticsListInput(output.Statistics, context) : undefined, - TargetBands: output.TargetBands != null ? de_StringListInput(output.TargetBands, context) : undefined, - } as any; -}; +// de_TemporalStatisticsConfigInput omitted. -/** - * deserializeAws_restJson1TemporalStatisticsListInput - */ -const de_TemporalStatisticsListInput = (output: any, context: __SerdeContext): (TemporalStatistics | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TemporalStatisticsListInput omitted. /** * deserializeAws_restJson1TimeRangeFilterOutput */ const de_TimeRangeFilterOutput = (output: any, context: __SerdeContext): TimeRangeFilterOutput => { - return { - EndTime: output.EndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.EndTime)) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.StartTime)) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + StartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1UserDefined */ const de_UserDefined = (output: any, context: __SerdeContext): UserDefined => { - return { - Unit: __expectString(output.Unit), - Value: __limitedParseFloat32(output.Value), - } as any; + return take(output, { + Unit: __expectString, + Value: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_restJson1VectorEnrichmentJobConfig - */ -const de_VectorEnrichmentJobConfig = (output: any, context: __SerdeContext): VectorEnrichmentJobConfig => { - if (output.MapMatchingConfig != null) { - return { - MapMatchingConfig: de_MapMatchingConfig(output.MapMatchingConfig, context), - }; - } - if (output.ReverseGeocodingConfig != null) { - return { - ReverseGeocodingConfig: de_ReverseGeocodingConfig(output.ReverseGeocodingConfig, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VectorEnrichmentJobConfig omitted. -/** - * deserializeAws_restJson1VectorEnrichmentJobDataSourceConfigInput - */ -const de_VectorEnrichmentJobDataSourceConfigInput = ( - output: any, - context: __SerdeContext -): VectorEnrichmentJobDataSourceConfigInput => { - if (output.S3Data != null) { - return { - S3Data: de_VectorEnrichmentJobS3Data(output.S3Data, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_VectorEnrichmentJobDataSourceConfigInput omitted. -/** - * deserializeAws_restJson1VectorEnrichmentJobErrorDetails - */ -const de_VectorEnrichmentJobErrorDetails = (output: any, context: __SerdeContext): VectorEnrichmentJobErrorDetails => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - ErrorType: __expectString(output.ErrorType), - } as any; -}; +// de_VectorEnrichmentJobErrorDetails omitted. -/** - * deserializeAws_restJson1VectorEnrichmentJobExportErrorDetails - */ -const de_VectorEnrichmentJobExportErrorDetails = ( - output: any, - context: __SerdeContext -): VectorEnrichmentJobExportErrorDetails => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; +// de_VectorEnrichmentJobExportErrorDetails omitted. -/** - * deserializeAws_restJson1VectorEnrichmentJobInputConfig - */ -const de_VectorEnrichmentJobInputConfig = (output: any, context: __SerdeContext): VectorEnrichmentJobInputConfig => { - return { - DataSourceConfig: - output.DataSourceConfig != null - ? de_VectorEnrichmentJobDataSourceConfigInput(__expectUnion(output.DataSourceConfig), context) - : undefined, - DocumentType: __expectString(output.DocumentType), - } as any; -}; +// de_VectorEnrichmentJobInputConfig omitted. /** * deserializeAws_restJson1VectorEnrichmentJobList @@ -3689,80 +2953,46 @@ const de_VectorEnrichmentJobList = (output: any, context: __SerdeContext): ListV const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListVectorEnrichmentJobOutputConfig(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VectorEnrichmentJobS3Data - */ -const de_VectorEnrichmentJobS3Data = (output: any, context: __SerdeContext): VectorEnrichmentJobS3Data => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_VectorEnrichmentJobS3Data omitted. /** * deserializeAws_restJson1ViewOffNadirInput */ const de_ViewOffNadirInput = (output: any, context: __SerdeContext): ViewOffNadirInput => { - return { - LowerBound: __limitedParseFloat32(output.LowerBound), - UpperBound: __limitedParseFloat32(output.UpperBound), - } as any; + return take(output, { + LowerBound: __limitedParseFloat32, + UpperBound: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_restJson1ViewSunAzimuthInput */ const de_ViewSunAzimuthInput = (output: any, context: __SerdeContext): ViewSunAzimuthInput => { - return { - LowerBound: __limitedParseFloat32(output.LowerBound), - UpperBound: __limitedParseFloat32(output.UpperBound), - } as any; + return take(output, { + LowerBound: __limitedParseFloat32, + UpperBound: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_restJson1ViewSunElevationInput */ const de_ViewSunElevationInput = (output: any, context: __SerdeContext): ViewSunElevationInput => { - return { - LowerBound: __limitedParseFloat32(output.LowerBound), - UpperBound: __limitedParseFloat32(output.UpperBound), - } as any; + return take(output, { + LowerBound: __limitedParseFloat32, + UpperBound: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_restJson1ZonalStatisticsConfigInput - */ -const de_ZonalStatisticsConfigInput = (output: any, context: __SerdeContext): ZonalStatisticsConfigInput => { - return { - Statistics: output.Statistics != null ? de_ZonalStatisticsListInput(output.Statistics, context) : undefined, - TargetBands: output.TargetBands != null ? de_StringListInput(output.TargetBands, context) : undefined, - ZoneS3Path: __expectString(output.ZoneS3Path), - ZoneS3PathKmsKeyId: __expectString(output.ZoneS3PathKmsKeyId), - } as any; -}; +// de_ZonalStatisticsConfigInput omitted. -/** - * deserializeAws_restJson1ZonalStatisticsListInput - */ -const de_ZonalStatisticsListInput = (output: any, context: __SerdeContext): (ZonalStatistics | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ZonalStatisticsListInput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sagemaker-metrics/src/protocols/Aws_restJson1.ts b/clients/client-sagemaker-metrics/src/protocols/Aws_restJson1.ts index 30fe7bcb10b5..2f580df58c96 100644 --- a/clients/client-sagemaker-metrics/src/protocols/Aws_restJson1.ts +++ b/clients/client-sagemaker-metrics/src/protocols/Aws_restJson1.ts @@ -1,13 +1,13 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { - expectInt32 as __expectInt32, + _json, expectNonNull as __expectNonNull, expectObject as __expectObject, - expectString as __expectString, - map as __map, + map, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -16,7 +16,7 @@ import { } from "@aws-sdk/types"; import { BatchPutMetricsCommandInput, BatchPutMetricsCommandOutput } from "../commands/BatchPutMetricsCommand"; -import { BatchPutMetricsError, RawMetricData } from "../models/models_0"; +import { RawMetricData } from "../models/models_0"; import { SageMakerMetricsServiceException as __BaseException } from "../models/SageMakerMetricsServiceException"; /** @@ -32,10 +32,12 @@ export const se_BatchPutMetricsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchPutMetrics"; let body: any; - body = JSON.stringify({ - ...(input.MetricData != null && { MetricData: se_RawMetricDataList(input.MetricData, context) }), - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - }); + body = JSON.stringify( + take(input, { + MetricData: (_) => se_RawMetricDataList(_, context), + TrialComponentName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -61,9 +63,10 @@ export const de_BatchPutMetricsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_BatchPutMetricsErrorList(data.Errors, context); - } + const doc = take(data, { + Errors: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -80,25 +83,24 @@ const de_BatchPutMetricsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * serializeAws_restJson1RawMetricData */ const se_RawMetricData = (input: RawMetricData, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Step != null && { Step: input.Step }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + MetricName: [], + Step: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + Value: __serializeFloat, + }); }; /** @@ -112,30 +114,9 @@ const se_RawMetricDataList = (input: RawMetricData[], context: __SerdeContext): }); }; -/** - * deserializeAws_restJson1BatchPutMetricsError - */ -const de_BatchPutMetricsError = (output: any, context: __SerdeContext): BatchPutMetricsError => { - return { - Code: __expectString(output.Code), - MetricIndex: __expectInt32(output.MetricIndex), - } as any; -}; +// de_BatchPutMetricsError omitted. -/** - * deserializeAws_restJson1BatchPutMetricsErrorList - */ -const de_BatchPutMetricsErrorList = (output: any, context: __SerdeContext): BatchPutMetricsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchPutMetricsError(entry, context); - }); - return retVal; -}; +// de_BatchPutMetricsErrorList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sagemaker-runtime/src/protocols/Aws_restJson1.ts b/clients/client-sagemaker-runtime/src/protocols/Aws_restJson1.ts index 06f0ca40e5d6..2fc547f7e8e7 100644 --- a/clients/client-sagemaker-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-sagemaker-runtime/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -174,10 +176,9 @@ const de_InvokeEndpointCommandError = async ( throw await de_ValidationErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -199,9 +200,10 @@ export const de_InvokeEndpointAsyncCommand = async ( FailureLocation: [, output.headers["x-amzn-sagemaker-failurelocation"]], }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InferenceId != null) { - contents.InferenceId = __expectString(data.InferenceId); - } + const doc = take(data, { + InferenceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -229,16 +231,15 @@ const de_InvokeEndpointAsyncCommandError = async ( throw await de_ValidationErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalDependencyExceptionRes */ @@ -248,9 +249,10 @@ const de_InternalDependencyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalDependencyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -264,9 +266,10 @@ const de_InternalDependencyExceptionRes = async ( const de_InternalFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailure({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -280,18 +283,13 @@ const de_InternalFailureRes = async (parsedOutput: any, context: __SerdeContext) const de_ModelErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.LogStreamArn != null) { - contents.LogStreamArn = __expectString(data.LogStreamArn); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.OriginalMessage != null) { - contents.OriginalMessage = __expectString(data.OriginalMessage); - } - if (data.OriginalStatusCode != null) { - contents.OriginalStatusCode = __expectInt32(data.OriginalStatusCode); - } + const doc = take(data, { + LogStreamArn: __expectString, + Message: __expectString, + OriginalMessage: __expectString, + OriginalStatusCode: __expectInt32, + }); + Object.assign(contents, doc); const exception = new ModelError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -308,9 +306,10 @@ const de_ModelNotReadyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ModelNotReadyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -324,9 +323,10 @@ const de_ModelNotReadyExceptionRes = async ( const de_ServiceUnavailableRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailable({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -340,9 +340,10 @@ const de_ServiceUnavailableRes = async (parsedOutput: any, context: __SerdeConte const de_ValidationErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationError({ $metadata: deserializeMetadata(parsedOutput), ...contents, diff --git a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts index e04fa366c9c7..0e0f2936d282 100644 --- a/clients/client-sagemaker/src/protocols/Aws_json1_1.ts +++ b/clients/client-sagemaker/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -14,7 +15,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -786,15 +788,10 @@ import { ActionSource, ActionSummary, AddAssociationRequest, - AddAssociationResponse, AdditionalInferenceSpecificationDefinition, AddTagsInput, - AddTagsOutput, - AgentVersion, Alarm, AlgorithmSpecification, - AlgorithmStatusDetails, - AlgorithmStatusItem, AlgorithmSummary, AlgorithmValidationProfile, AlgorithmValidationSpecification, @@ -806,7 +803,6 @@ import { ArtifactSourceType, ArtifactSummary, AssociateTrialComponentRequest, - AssociateTrialComponentResponse, AssociationSummary, AsyncInferenceClientConfig, AsyncInferenceConfig, @@ -818,27 +814,20 @@ import { AutoMLAlgorithmConfig, AutoMLCandidate, AutoMLCandidateGenerationConfig, - AutoMLCandidateStep, AutoMLChannel, - AutoMLContainerDefinition, AutoMLDataSource, AutoMLDataSplitConfig, - AutoMLJobArtifacts, AutoMLJobChannel, AutoMLJobCompletionCriteria, AutoMLJobConfig, AutoMLJobObjective, - AutoMLJobStepMetadata, AutoMLJobSummary, AutoMLOutputDataConfig, - AutoMLPartialFailureReason, AutoMLProblemTypeConfig, - AutoMLProcessingUnit, AutoMLS3DataSource, AutoMLSecurityConfig, AutoRollbackConfig, BatchDataCaptureConfig, - BatchDescribeModelPackageError, BatchDescribeModelPackageInput, BatchDescribeModelPackageOutput, BatchDescribeModelPackageSummary, @@ -846,9 +835,6 @@ import { BestObjectiveNotImproving, Bias, BlueGreenUpdatePolicy, - CacheHitResult, - CallbackStepMetadata, - CandidateArtifactLocations, CandidateProperties, CanvasAppSettings, CapacitySize, @@ -860,7 +846,6 @@ import { Channel, ChannelSpecification, CheckpointConfig, - ClarifyCheckStepMetadata, ClarifyExplainerConfig, ClarifyFeatureType, ClarifyInferenceConfig, @@ -874,7 +859,6 @@ import { CollectionConfiguration, CompilationJobSummary, CompressionType, - ConditionStepMetadata, ConflictException, ContainerDefinition, ContentClassifier, @@ -884,32 +868,19 @@ import { ContinuousParameterRangeSpecification, ConvergenceDetected, CreateActionRequest, - CreateActionResponse, CreateAlgorithmInput, - CreateAlgorithmOutput, CreateAppImageConfigRequest, - CreateAppImageConfigResponse, CreateAppRequest, - CreateAppResponse, CreateArtifactRequest, - CreateArtifactResponse, CreateAutoMLJobRequest, - CreateAutoMLJobResponse, CreateAutoMLJobV2Request, - CreateAutoMLJobV2Response, CreateCodeRepositoryInput, - CreateCodeRepositoryOutput, CreateCompilationJobRequest, - CreateCompilationJobResponse, CreateContextRequest, - CreateContextResponse, CreateDataQualityJobDefinitionRequest, - CreateDataQualityJobDefinitionResponse, CreateDeviceFleetRequest, CreateDomainRequest, - CreateDomainResponse, CreateEdgeDeploymentPlanRequest, - CreateEdgeDeploymentPlanResponse, CreateEdgeDeploymentStageRequest, CreateEdgePackagingJobRequest, CustomImage, @@ -931,7 +902,6 @@ import { GitConfig, HyperParameterSpecification, HyperParameterTuningJobObjective, - IamIdentity, ImageClassificationJobConfig, ImageConfig, InferenceSpecification, @@ -1001,89 +971,49 @@ import { TransformOutput, TransformResources, TransformS3DataSource, - UserContext, UserSettings, VpcConfig, } from "../models/models_0"; import { CreateEndpointConfigInput, - CreateEndpointConfigOutput, CreateEndpointInput, - CreateEndpointOutput, CreateExperimentRequest, - CreateExperimentResponse, CreateFeatureGroupRequest, - CreateFeatureGroupResponse, CreateFlowDefinitionRequest, - CreateFlowDefinitionResponse, CreateHubRequest, - CreateHubResponse, CreateHumanTaskUiRequest, - CreateHumanTaskUiResponse, CreateHyperParameterTuningJobRequest, - CreateHyperParameterTuningJobResponse, CreateImageRequest, - CreateImageResponse, CreateImageVersionRequest, - CreateImageVersionResponse, CreateInferenceExperimentRequest, - CreateInferenceExperimentResponse, CreateInferenceRecommendationsJobRequest, - CreateInferenceRecommendationsJobResponse, CreateLabelingJobRequest, - CreateLabelingJobResponse, CreateModelBiasJobDefinitionRequest, - CreateModelBiasJobDefinitionResponse, CreateModelCardExportJobRequest, - CreateModelCardExportJobResponse, CreateModelCardRequest, - CreateModelCardResponse, CreateModelExplainabilityJobDefinitionRequest, - CreateModelExplainabilityJobDefinitionResponse, CreateModelInput, - CreateModelOutput, CreateModelPackageGroupInput, - CreateModelPackageGroupOutput, CreateModelPackageInput, - CreateModelPackageOutput, CreateModelQualityJobDefinitionRequest, - CreateModelQualityJobDefinitionResponse, CreateMonitoringScheduleRequest, - CreateMonitoringScheduleResponse, CreateNotebookInstanceInput, CreateNotebookInstanceLifecycleConfigInput, - CreateNotebookInstanceLifecycleConfigOutput, - CreateNotebookInstanceOutput, CreatePipelineRequest, - CreatePipelineResponse, CreatePresignedDomainUrlRequest, - CreatePresignedDomainUrlResponse, CreatePresignedNotebookInstanceUrlInput, - CreatePresignedNotebookInstanceUrlOutput, CreateProcessingJobRequest, - CreateProcessingJobResponse, CreateProjectInput, - CreateProjectOutput, CreateSpaceRequest, - CreateSpaceResponse, CreateStudioLifecycleConfigRequest, - CreateStudioLifecycleConfigResponse, CreateTrainingJobRequest, - CreateTrainingJobResponse, CreateTransformJobRequest, - CreateTransformJobResponse, CreateTrialComponentRequest, - CreateTrialComponentResponse, CreateTrialRequest, - CreateTrialResponse, CreateUserProfileRequest, - CreateUserProfileResponse, CreateWorkforceRequest, - CreateWorkforceResponse, CreateWorkteamRequest, - CreateWorkteamResponse, DataCaptureConfig, - DataCaptureConfigSummary, DataCatalogConfig, DataProcessing, DatasetDefinition, @@ -1091,17 +1021,13 @@ import { DebugRuleConfiguration, DebugRuleEvaluationStatus, DeleteActionRequest, - DeleteActionResponse, DeleteAlgorithmInput, DeleteAppImageConfigRequest, DeleteAppRequest, DeleteArtifactRequest, - DeleteArtifactResponse, DeleteAssociationRequest, - DeleteAssociationResponse, DeleteCodeRepositoryInput, DeleteContextRequest, - DeleteContextResponse, DeleteDataQualityJobDefinitionRequest, DeleteDeviceFleetRequest, DeleteDomainRequest, @@ -1110,20 +1036,14 @@ import { DeleteEndpointConfigInput, DeleteEndpointInput, DeleteExperimentRequest, - DeleteExperimentResponse, DeleteFeatureGroupRequest, DeleteFlowDefinitionRequest, - DeleteFlowDefinitionResponse, DeleteHubContentRequest, DeleteHubRequest, DeleteHumanTaskUiRequest, - DeleteHumanTaskUiResponse, DeleteImageRequest, - DeleteImageResponse, DeleteImageVersionRequest, - DeleteImageVersionResponse, DeleteInferenceExperimentRequest, - DeleteInferenceExperimentResponse, DeleteModelBiasJobDefinitionRequest, DeleteModelCardRequest, DeleteModelExplainabilityJobDefinitionRequest, @@ -1136,7 +1056,6 @@ import { DeleteNotebookInstanceInput, DeleteNotebookInstanceLifecycleConfigInput, DeletePipelineRequest, - DeletePipelineResponse, DeleteProjectInput, DeleteSpaceRequest, DeleteStudioLifecycleConfigRequest, @@ -1275,16 +1194,11 @@ import { WorkforceVpcConfigRequest, } from "../models/models_1"; import { - DeleteTagsOutput, DeleteTrialComponentRequest, - DeleteTrialComponentResponse, DeleteTrialRequest, - DeleteTrialResponse, DeleteUserProfileRequest, DeleteWorkforceRequest, - DeleteWorkforceResponse, DeleteWorkteamRequest, - DeleteWorkteamResponse, DeployedImage, DeploymentStageStatusSummary, DeregisterDevicesRequest, @@ -1389,7 +1303,6 @@ import { DescribeStudioLifecycleConfigRequest, DescribeStudioLifecycleConfigResponse, DescribeSubscribedWorkteamRequest, - DescribeSubscribedWorkteamResponse, DescribeTrainingJobRequest, DescribeTrainingJobResponse, DescribeTransformJobRequest, @@ -1408,36 +1321,21 @@ import { Device, DeviceDeploymentSummary, DeviceFleetSummary, - DeviceStats, DeviceSummary, DisableSagemakerServicecatalogPortfolioInput, - DisableSagemakerServicecatalogPortfolioOutput, DisassociateTrialComponentRequest, - DisassociateTrialComponentResponse, DomainDetails, DomainSettingsForUpdate, - Edge, EdgeDeploymentPlanSummary, EdgeDeploymentStatus, EdgeModel, - EdgeModelStat, - EdgeModelSummary, EdgePackagingJobSummary, - EdgePresetDeploymentOutput, - EMRStepMetadata, EnableSagemakerServicecatalogPortfolioInput, - EnableSagemakerServicecatalogPortfolioOutput, Endpoint, EndpointConfigSummary, - EndpointMetadata, - EndpointOutputConfiguration, - EndpointPerformance, EndpointSummary, - EnvironmentParameter, Experiment, - ExperimentSource, ExperimentSummary, - FailStepMetadata, FeatureGroup, FeatureGroupSummary, FeatureMetadata, @@ -1448,80 +1346,45 @@ import { GetDeviceFleetReportRequest, GetDeviceFleetReportResponse, GetLineageGroupPolicyRequest, - GetLineageGroupPolicyResponse, GetModelPackageGroupPolicyInput, - GetModelPackageGroupPolicyOutput, GetSagemakerServicecatalogPortfolioStatusInput, - GetSagemakerServicecatalogPortfolioStatusOutput, GetSearchSuggestionsRequest, - GetSearchSuggestionsResponse, GitConfigForUpdate, - HubContentDependency, HubContentInfo, HubInfo, HumanTaskUiSummary, HyperParameterTrainingJobSummary, HyperParameterTuningJobCompletionDetails, - HyperParameterTuningJobConsumedResources, HyperParameterTuningJobSearchEntity, HyperParameterTuningJobSummary, Image, ImageVersion, ImportHubContentRequest, - ImportHubContentResponse, InferenceExperimentSummary, - InferenceMetrics, InferenceRecommendation, InferenceRecommendationsJob, InferenceRecommendationsJobStep, - LabelCounters, - LabelCountersForWorkteam, LabelingJobForWorkteamSummary, - LabelingJobOutput, - LastUpdateStatus, MetricData, - ModelArtifacts, - ModelCardExportArtifacts, - ModelConfiguration, - ModelDeployResult, - ModelDigests, - ModelPackageStatusDetails, - ModelPackageStatusItem, - ModelVariantConfigSummary, MonitoringExecutionSummary, MonitoringSchedule, - ObjectiveStatusCounters, - OfflineStoreStatus, - OidcConfigForResponse, PendingDeploymentSummary, PendingProductionVariantSummary, - PipelineExperimentConfig, ProductionVariantStatus, ProductionVariantSummary, ProfilerRuleEvaluationStatus, PropertyNameQuery, - PropertyNameSuggestion, RecommendationJobInferenceBenchmark, RecommendationMetrics, - ResolvedAttributes, RStudioServerProDomainSettingsForUpdate, SecondaryStatusTransition, - ServiceCatalogProvisionedProductDetails, - SubscribedWorkteam, SuggestionQuery, - TrainingJobStatusCounters, TrialComponentMetricSummary, - TrialComponentSource, - TrialSource, - UiTemplateInfo, - WarmPoolStatus, Workforce, - WorkforceVpcConfigResponse, Workteam, } from "../models/models_2"; import { LabelingJobSummary, - LambdaStepMetadata, LineageGroupSummary, LineageType, ListActionsRequest, @@ -1529,7 +1392,6 @@ import { ListAlgorithmsInput, ListAlgorithmsOutput, ListAliasesRequest, - ListAliasesResponse, ListAppImageConfigsRequest, ListAppImageConfigsResponse, ListAppsRequest, @@ -1607,7 +1469,6 @@ import { ListModelExplainabilityJobDefinitionsRequest, ListModelExplainabilityJobDefinitionsResponse, ListModelMetadataRequest, - ListModelMetadataResponse, ListModelPackageGroupsInput, ListModelPackageGroupsOutput, ListModelPackagesInput, @@ -1633,7 +1494,6 @@ import { ListPipelineExecutionStepsRequest, ListPipelineExecutionStepsResponse, ListPipelineParametersForExecutionRequest, - ListPipelineParametersForExecutionResponse, ListPipelinesRequest, ListPipelinesResponse, ListProcessingJobsRequest, @@ -1647,9 +1507,7 @@ import { ListStudioLifecycleConfigsRequest, ListStudioLifecycleConfigsResponse, ListSubscribedWorkteamsRequest, - ListSubscribedWorkteamsResponse, ListTagsInput, - ListTagsOutput, ListTrainingJobsForHyperParameterTuningJobRequest, ListTrainingJobsForHyperParameterTuningJobResponse, ListTrainingJobsRequest, @@ -1672,21 +1530,17 @@ import { ModelCardSummary, ModelCardVersionSummary, ModelDashboardEndpoint, - ModelDashboardIndicatorAction, ModelDashboardModel, ModelDashboardModelCard, ModelDashboardMonitoringSchedule, ModelMetadataFilter, ModelMetadataSearchExpression, - ModelMetadataSummary, ModelPackage, ModelPackageGroup, ModelPackageGroupSummary, ModelPackageSummary, - ModelStepMetadata, ModelSummary, ModelVariantAction, - MonitoringAlertActions, MonitoringAlertHistorySummary, MonitoringAlertSummary, MonitoringJobDefinitionSummary, @@ -1695,70 +1549,52 @@ import { NotebookInstanceLifecycleConfigSummary, NotebookInstanceSummary, Parameter, - Parent, Pipeline, PipelineExecution, PipelineExecutionStep, - PipelineExecutionStepMetadata, PipelineExecutionSummary, PipelineSummary, ProcessingJob, - ProcessingJobStepMetadata, ProcessingJobSummary, ProfilerConfigForUpdate, Project, ProjectSummary, PutModelPackageGroupPolicyInput, - PutModelPackageGroupPolicyOutput, - QualityCheckStepMetadata, QueryFilters, QueryLineageRequest, - QueryLineageResponse, RegisterDevicesRequest, - RegisterModelStepMetadata, RenderableTask, - RenderingError, RenderUiTemplateRequest, - RenderUiTemplateResponse, ResourceConfigForUpdate, RetryPipelineExecutionRequest, - RetryPipelineExecutionResponse, SearchRecord, SearchResponse, SendPipelineExecutionStepFailureRequest, - SendPipelineExecutionStepFailureResponse, SendPipelineExecutionStepSuccessRequest, - SendPipelineExecutionStepSuccessResponse, SpaceDetails, StartEdgeDeploymentStageRequest, StartInferenceExperimentRequest, - StartInferenceExperimentResponse, StartMonitoringScheduleRequest, StartNotebookInstanceInput, StartPipelineExecutionRequest, - StartPipelineExecutionResponse, StopAutoMLJobRequest, StopCompilationJobRequest, StopEdgeDeploymentStageRequest, StopEdgePackagingJobRequest, StopHyperParameterTuningJobRequest, StopInferenceExperimentRequest, - StopInferenceExperimentResponse, StopInferenceRecommendationsJobRequest, StopLabelingJobRequest, StopMonitoringScheduleRequest, StopNotebookInstanceInput, StopPipelineExecutionRequest, - StopPipelineExecutionResponse, StopProcessingJobRequest, StopTrainingJobRequest, StopTransformJobRequest, StudioLifecycleConfigDetails, TrainingJob, - TrainingJobStepMetadata, TrainingJobSummary, TransformJob, - TransformJobStepMetadata, TransformJobSummary, Trial, TrialComponent, @@ -1766,73 +1602,43 @@ import { TrialComponentSourceDetail, TrialComponentSummary, TrialSummary, - TuningJobStepMetaData, UpdateActionRequest, - UpdateActionResponse, UserProfileDetails, - Vertex, } from "../models/models_3"; import { SearchExpression, SearchRequest, ServiceCatalogProvisioningUpdateDetails, UpdateAppImageConfigRequest, - UpdateAppImageConfigResponse, UpdateArtifactRequest, - UpdateArtifactResponse, UpdateCodeRepositoryInput, - UpdateCodeRepositoryOutput, UpdateContextRequest, - UpdateContextResponse, UpdateDeviceFleetRequest, UpdateDevicesRequest, UpdateDomainRequest, - UpdateDomainResponse, UpdateEndpointInput, - UpdateEndpointOutput, UpdateEndpointWeightsAndCapacitiesInput, - UpdateEndpointWeightsAndCapacitiesOutput, UpdateExperimentRequest, - UpdateExperimentResponse, UpdateFeatureGroupRequest, - UpdateFeatureGroupResponse, UpdateFeatureMetadataRequest, UpdateHubRequest, - UpdateHubResponse, UpdateImageRequest, - UpdateImageResponse, UpdateImageVersionRequest, - UpdateImageVersionResponse, UpdateInferenceExperimentRequest, - UpdateInferenceExperimentResponse, UpdateModelCardRequest, - UpdateModelCardResponse, UpdateModelPackageInput, - UpdateModelPackageOutput, UpdateMonitoringAlertRequest, - UpdateMonitoringAlertResponse, UpdateMonitoringScheduleRequest, - UpdateMonitoringScheduleResponse, UpdateNotebookInstanceInput, UpdateNotebookInstanceLifecycleConfigInput, - UpdateNotebookInstanceLifecycleConfigOutput, - UpdateNotebookInstanceOutput, UpdatePipelineExecutionRequest, - UpdatePipelineExecutionResponse, UpdatePipelineRequest, - UpdatePipelineResponse, UpdateProjectInput, - UpdateProjectOutput, UpdateSpaceRequest, - UpdateSpaceResponse, UpdateTrainingJobRequest, - UpdateTrainingJobResponse, UpdateTrialComponentRequest, - UpdateTrialComponentResponse, UpdateTrialRequest, - UpdateTrialResponse, UpdateUserProfileRequest, - UpdateUserProfileResponse, UpdateWorkforceRequest, UpdateWorkforceResponse, UpdateWorkteamRequest, @@ -1850,7 +1656,7 @@ export const se_AddAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddAssociation"); let body: any; - body = JSON.stringify(se_AddAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1863,7 +1669,7 @@ export const se_AddTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTags"); let body: any; - body = JSON.stringify(se_AddTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1876,7 +1682,7 @@ export const se_AssociateTrialComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateTrialComponent"); let body: any; - body = JSON.stringify(se_AssociateTrialComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1889,7 +1695,7 @@ export const se_BatchDescribeModelPackageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDescribeModelPackage"); let body: any; - body = JSON.stringify(se_BatchDescribeModelPackageInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1902,7 +1708,7 @@ export const se_CreateActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAction"); let body: any; - body = JSON.stringify(se_CreateActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1915,7 +1721,7 @@ export const se_CreateAlgorithmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAlgorithm"); let body: any; - body = JSON.stringify(se_CreateAlgorithmInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1928,7 +1734,7 @@ export const se_CreateAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApp"); let body: any; - body = JSON.stringify(se_CreateAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1941,7 +1747,7 @@ export const se_CreateAppImageConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAppImageConfig"); let body: any; - body = JSON.stringify(se_CreateAppImageConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1954,7 +1760,7 @@ export const se_CreateArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateArtifact"); let body: any; - body = JSON.stringify(se_CreateArtifactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1993,7 +1799,7 @@ export const se_CreateCodeRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCodeRepository"); let body: any; - body = JSON.stringify(se_CreateCodeRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2006,7 +1812,7 @@ export const se_CreateCompilationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCompilationJob"); let body: any; - body = JSON.stringify(se_CreateCompilationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2019,7 +1825,7 @@ export const se_CreateContextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateContext"); let body: any; - body = JSON.stringify(se_CreateContextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2045,7 +1851,7 @@ export const se_CreateDeviceFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDeviceFleet"); let body: any; - body = JSON.stringify(se_CreateDeviceFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2058,7 +1864,7 @@ export const se_CreateDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDomain"); let body: any; - body = JSON.stringify(se_CreateDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2071,7 +1877,7 @@ export const se_CreateEdgeDeploymentPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEdgeDeploymentPlan"); let body: any; - body = JSON.stringify(se_CreateEdgeDeploymentPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2084,7 +1890,7 @@ export const se_CreateEdgeDeploymentStageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEdgeDeploymentStage"); let body: any; - body = JSON.stringify(se_CreateEdgeDeploymentStageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2097,7 +1903,7 @@ export const se_CreateEdgePackagingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEdgePackagingJob"); let body: any; - body = JSON.stringify(se_CreateEdgePackagingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2110,7 +1916,7 @@ export const se_CreateEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateEndpoint"); let body: any; - body = JSON.stringify(se_CreateEndpointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2136,7 +1942,7 @@ export const se_CreateExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateExperiment"); let body: any; - body = JSON.stringify(se_CreateExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2149,7 +1955,7 @@ export const se_CreateFeatureGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateFeatureGroup"); let body: any; - body = JSON.stringify(se_CreateFeatureGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2175,7 +1981,7 @@ export const se_CreateHubCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHub"); let body: any; - body = JSON.stringify(se_CreateHubRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2188,7 +1994,7 @@ export const se_CreateHumanTaskUiCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateHumanTaskUi"); let body: any; - body = JSON.stringify(se_CreateHumanTaskUiRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2214,7 +2020,7 @@ export const se_CreateImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateImage"); let body: any; - body = JSON.stringify(se_CreateImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2253,7 +2059,7 @@ export const se_CreateInferenceRecommendationsJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInferenceRecommendationsJob"); let body: any; - body = JSON.stringify(se_CreateInferenceRecommendationsJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2266,7 +2072,7 @@ export const se_CreateLabelingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLabelingJob"); let body: any; - body = JSON.stringify(se_CreateLabelingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2279,7 +2085,7 @@ export const se_CreateModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModel"); let body: any; - body = JSON.stringify(se_CreateModelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2305,7 +2111,7 @@ export const se_CreateModelCardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModelCard"); let body: any; - body = JSON.stringify(se_CreateModelCardRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2318,7 +2124,7 @@ export const se_CreateModelCardExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModelCardExportJob"); let body: any; - body = JSON.stringify(se_CreateModelCardExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2357,7 +2163,7 @@ export const se_CreateModelPackageGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateModelPackageGroup"); let body: any; - body = JSON.stringify(se_CreateModelPackageGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2396,7 +2202,7 @@ export const se_CreateNotebookInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateNotebookInstance"); let body: any; - body = JSON.stringify(se_CreateNotebookInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2409,7 +2215,7 @@ export const se_CreateNotebookInstanceLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateNotebookInstanceLifecycleConfig"); let body: any; - body = JSON.stringify(se_CreateNotebookInstanceLifecycleConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2435,7 +2241,7 @@ export const se_CreatePresignedDomainUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePresignedDomainUrl"); let body: any; - body = JSON.stringify(se_CreatePresignedDomainUrlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2448,7 +2254,7 @@ export const se_CreatePresignedNotebookInstanceUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePresignedNotebookInstanceUrl"); let body: any; - body = JSON.stringify(se_CreatePresignedNotebookInstanceUrlInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2461,7 +2267,7 @@ export const se_CreateProcessingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProcessingJob"); let body: any; - body = JSON.stringify(se_CreateProcessingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2474,7 +2280,7 @@ export const se_CreateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProject"); let body: any; - body = JSON.stringify(se_CreateProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2487,7 +2293,7 @@ export const se_CreateSpaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSpace"); let body: any; - body = JSON.stringify(se_CreateSpaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2500,7 +2306,7 @@ export const se_CreateStudioLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStudioLifecycleConfig"); let body: any; - body = JSON.stringify(se_CreateStudioLifecycleConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2513,7 +2319,7 @@ export const se_CreateTrainingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTrainingJob"); let body: any; - body = JSON.stringify(se_CreateTrainingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2526,7 +2332,7 @@ export const se_CreateTransformJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTransformJob"); let body: any; - body = JSON.stringify(se_CreateTransformJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2539,7 +2345,7 @@ export const se_CreateTrialCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTrial"); let body: any; - body = JSON.stringify(se_CreateTrialRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2565,7 +2371,7 @@ export const se_CreateUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUserProfile"); let body: any; - body = JSON.stringify(se_CreateUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2578,7 +2384,7 @@ export const se_CreateWorkforceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkforce"); let body: any; - body = JSON.stringify(se_CreateWorkforceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2591,7 +2397,7 @@ export const se_CreateWorkteamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkteam"); let body: any; - body = JSON.stringify(se_CreateWorkteamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2604,7 +2410,7 @@ export const se_DeleteActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAction"); let body: any; - body = JSON.stringify(se_DeleteActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2617,7 +2423,7 @@ export const se_DeleteAlgorithmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAlgorithm"); let body: any; - body = JSON.stringify(se_DeleteAlgorithmInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2630,7 +2436,7 @@ export const se_DeleteAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApp"); let body: any; - body = JSON.stringify(se_DeleteAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2643,7 +2449,7 @@ export const se_DeleteAppImageConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAppImageConfig"); let body: any; - body = JSON.stringify(se_DeleteAppImageConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2656,7 +2462,7 @@ export const se_DeleteArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteArtifact"); let body: any; - body = JSON.stringify(se_DeleteArtifactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2669,7 +2475,7 @@ export const se_DeleteAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAssociation"); let body: any; - body = JSON.stringify(se_DeleteAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2682,7 +2488,7 @@ export const se_DeleteCodeRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCodeRepository"); let body: any; - body = JSON.stringify(se_DeleteCodeRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2695,7 +2501,7 @@ export const se_DeleteContextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContext"); let body: any; - body = JSON.stringify(se_DeleteContextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2708,7 +2514,7 @@ export const se_DeleteDataQualityJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDataQualityJobDefinition"); let body: any; - body = JSON.stringify(se_DeleteDataQualityJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2721,7 +2527,7 @@ export const se_DeleteDeviceFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDeviceFleet"); let body: any; - body = JSON.stringify(se_DeleteDeviceFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2734,7 +2540,7 @@ export const se_DeleteDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDomain"); let body: any; - body = JSON.stringify(se_DeleteDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2747,7 +2553,7 @@ export const se_DeleteEdgeDeploymentPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEdgeDeploymentPlan"); let body: any; - body = JSON.stringify(se_DeleteEdgeDeploymentPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2760,7 +2566,7 @@ export const se_DeleteEdgeDeploymentStageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEdgeDeploymentStage"); let body: any; - body = JSON.stringify(se_DeleteEdgeDeploymentStageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2773,7 +2579,7 @@ export const se_DeleteEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpoint"); let body: any; - body = JSON.stringify(se_DeleteEndpointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2786,7 +2592,7 @@ export const se_DeleteEndpointConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEndpointConfig"); let body: any; - body = JSON.stringify(se_DeleteEndpointConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2799,7 +2605,7 @@ export const se_DeleteExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteExperiment"); let body: any; - body = JSON.stringify(se_DeleteExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2812,7 +2618,7 @@ export const se_DeleteFeatureGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFeatureGroup"); let body: any; - body = JSON.stringify(se_DeleteFeatureGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2825,7 +2631,7 @@ export const se_DeleteFlowDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFlowDefinition"); let body: any; - body = JSON.stringify(se_DeleteFlowDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2838,7 +2644,7 @@ export const se_DeleteHubCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHub"); let body: any; - body = JSON.stringify(se_DeleteHubRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2851,7 +2657,7 @@ export const se_DeleteHubContentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHubContent"); let body: any; - body = JSON.stringify(se_DeleteHubContentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2864,7 +2670,7 @@ export const se_DeleteHumanTaskUiCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHumanTaskUi"); let body: any; - body = JSON.stringify(se_DeleteHumanTaskUiRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2877,7 +2683,7 @@ export const se_DeleteImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImage"); let body: any; - body = JSON.stringify(se_DeleteImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2890,7 +2696,7 @@ export const se_DeleteImageVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImageVersion"); let body: any; - body = JSON.stringify(se_DeleteImageVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2903,7 +2709,7 @@ export const se_DeleteInferenceExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInferenceExperiment"); let body: any; - body = JSON.stringify(se_DeleteInferenceExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2916,7 +2722,7 @@ export const se_DeleteModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModel"); let body: any; - body = JSON.stringify(se_DeleteModelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2929,7 +2735,7 @@ export const se_DeleteModelBiasJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelBiasJobDefinition"); let body: any; - body = JSON.stringify(se_DeleteModelBiasJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2942,7 +2748,7 @@ export const se_DeleteModelCardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelCard"); let body: any; - body = JSON.stringify(se_DeleteModelCardRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2955,7 +2761,7 @@ export const se_DeleteModelExplainabilityJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelExplainabilityJobDefinition"); let body: any; - body = JSON.stringify(se_DeleteModelExplainabilityJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2968,7 +2774,7 @@ export const se_DeleteModelPackageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelPackage"); let body: any; - body = JSON.stringify(se_DeleteModelPackageInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2981,7 +2787,7 @@ export const se_DeleteModelPackageGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelPackageGroup"); let body: any; - body = JSON.stringify(se_DeleteModelPackageGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2994,7 +2800,7 @@ export const se_DeleteModelPackageGroupPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelPackageGroupPolicy"); let body: any; - body = JSON.stringify(se_DeleteModelPackageGroupPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3007,7 +2813,7 @@ export const se_DeleteModelQualityJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteModelQualityJobDefinition"); let body: any; - body = JSON.stringify(se_DeleteModelQualityJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3020,7 +2826,7 @@ export const se_DeleteMonitoringScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMonitoringSchedule"); let body: any; - body = JSON.stringify(se_DeleteMonitoringScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3033,7 +2839,7 @@ export const se_DeleteNotebookInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNotebookInstance"); let body: any; - body = JSON.stringify(se_DeleteNotebookInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3046,7 +2852,7 @@ export const se_DeleteNotebookInstanceLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNotebookInstanceLifecycleConfig"); let body: any; - body = JSON.stringify(se_DeleteNotebookInstanceLifecycleConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3072,7 +2878,7 @@ export const se_DeleteProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProject"); let body: any; - body = JSON.stringify(se_DeleteProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3085,7 +2891,7 @@ export const se_DeleteSpaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSpace"); let body: any; - body = JSON.stringify(se_DeleteSpaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3098,7 +2904,7 @@ export const se_DeleteStudioLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStudioLifecycleConfig"); let body: any; - body = JSON.stringify(se_DeleteStudioLifecycleConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3111,7 +2917,7 @@ export const se_DeleteTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTags"); let body: any; - body = JSON.stringify(se_DeleteTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3124,7 +2930,7 @@ export const se_DeleteTrialCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTrial"); let body: any; - body = JSON.stringify(se_DeleteTrialRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3137,7 +2943,7 @@ export const se_DeleteTrialComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTrialComponent"); let body: any; - body = JSON.stringify(se_DeleteTrialComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3150,7 +2956,7 @@ export const se_DeleteUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUserProfile"); let body: any; - body = JSON.stringify(se_DeleteUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3163,7 +2969,7 @@ export const se_DeleteWorkforceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkforce"); let body: any; - body = JSON.stringify(se_DeleteWorkforceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3176,7 +2982,7 @@ export const se_DeleteWorkteamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkteam"); let body: any; - body = JSON.stringify(se_DeleteWorkteamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3189,7 +2995,7 @@ export const se_DeregisterDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterDevices"); let body: any; - body = JSON.stringify(se_DeregisterDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3202,7 +3008,7 @@ export const se_DescribeActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAction"); let body: any; - body = JSON.stringify(se_DescribeActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3215,7 +3021,7 @@ export const se_DescribeAlgorithmCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAlgorithm"); let body: any; - body = JSON.stringify(se_DescribeAlgorithmInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3228,7 +3034,7 @@ export const se_DescribeAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeApp"); let body: any; - body = JSON.stringify(se_DescribeAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3241,7 +3047,7 @@ export const se_DescribeAppImageConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAppImageConfig"); let body: any; - body = JSON.stringify(se_DescribeAppImageConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3254,7 +3060,7 @@ export const se_DescribeArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeArtifact"); let body: any; - body = JSON.stringify(se_DescribeArtifactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3267,7 +3073,7 @@ export const se_DescribeAutoMLJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAutoMLJob"); let body: any; - body = JSON.stringify(se_DescribeAutoMLJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3280,7 +3086,7 @@ export const se_DescribeAutoMLJobV2Command = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAutoMLJobV2"); let body: any; - body = JSON.stringify(se_DescribeAutoMLJobV2Request(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3293,7 +3099,7 @@ export const se_DescribeCodeRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCodeRepository"); let body: any; - body = JSON.stringify(se_DescribeCodeRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3306,7 +3112,7 @@ export const se_DescribeCompilationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCompilationJob"); let body: any; - body = JSON.stringify(se_DescribeCompilationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3319,7 +3125,7 @@ export const se_DescribeContextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeContext"); let body: any; - body = JSON.stringify(se_DescribeContextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3332,7 +3138,7 @@ export const se_DescribeDataQualityJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDataQualityJobDefinition"); let body: any; - body = JSON.stringify(se_DescribeDataQualityJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3345,7 +3151,7 @@ export const se_DescribeDeviceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDevice"); let body: any; - body = JSON.stringify(se_DescribeDeviceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3358,7 +3164,7 @@ export const se_DescribeDeviceFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDeviceFleet"); let body: any; - body = JSON.stringify(se_DescribeDeviceFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3371,7 +3177,7 @@ export const se_DescribeDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDomain"); let body: any; - body = JSON.stringify(se_DescribeDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3384,7 +3190,7 @@ export const se_DescribeEdgeDeploymentPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEdgeDeploymentPlan"); let body: any; - body = JSON.stringify(se_DescribeEdgeDeploymentPlanRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3397,7 +3203,7 @@ export const se_DescribeEdgePackagingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEdgePackagingJob"); let body: any; - body = JSON.stringify(se_DescribeEdgePackagingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3410,7 +3216,7 @@ export const se_DescribeEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoint"); let body: any; - body = JSON.stringify(se_DescribeEndpointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3423,7 +3229,7 @@ export const se_DescribeEndpointConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpointConfig"); let body: any; - body = JSON.stringify(se_DescribeEndpointConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3436,7 +3242,7 @@ export const se_DescribeExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExperiment"); let body: any; - body = JSON.stringify(se_DescribeExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3449,7 +3255,7 @@ export const se_DescribeFeatureGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFeatureGroup"); let body: any; - body = JSON.stringify(se_DescribeFeatureGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3462,7 +3268,7 @@ export const se_DescribeFeatureMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFeatureMetadata"); let body: any; - body = JSON.stringify(se_DescribeFeatureMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3475,7 +3281,7 @@ export const se_DescribeFlowDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFlowDefinition"); let body: any; - body = JSON.stringify(se_DescribeFlowDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3488,7 +3294,7 @@ export const se_DescribeHubCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHub"); let body: any; - body = JSON.stringify(se_DescribeHubRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3501,7 +3307,7 @@ export const se_DescribeHubContentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHubContent"); let body: any; - body = JSON.stringify(se_DescribeHubContentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3514,7 +3320,7 @@ export const se_DescribeHumanTaskUiCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHumanTaskUi"); let body: any; - body = JSON.stringify(se_DescribeHumanTaskUiRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3527,7 +3333,7 @@ export const se_DescribeHyperParameterTuningJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHyperParameterTuningJob"); let body: any; - body = JSON.stringify(se_DescribeHyperParameterTuningJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3540,7 +3346,7 @@ export const se_DescribeImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImage"); let body: any; - body = JSON.stringify(se_DescribeImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3553,7 +3359,7 @@ export const se_DescribeImageVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeImageVersion"); let body: any; - body = JSON.stringify(se_DescribeImageVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3566,7 +3372,7 @@ export const se_DescribeInferenceExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInferenceExperiment"); let body: any; - body = JSON.stringify(se_DescribeInferenceExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3579,7 +3385,7 @@ export const se_DescribeInferenceRecommendationsJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInferenceRecommendationsJob"); let body: any; - body = JSON.stringify(se_DescribeInferenceRecommendationsJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3592,7 +3398,7 @@ export const se_DescribeLabelingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLabelingJob"); let body: any; - body = JSON.stringify(se_DescribeLabelingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3605,7 +3411,7 @@ export const se_DescribeLineageGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLineageGroup"); let body: any; - body = JSON.stringify(se_DescribeLineageGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3618,7 +3424,7 @@ export const se_DescribeModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModel"); let body: any; - body = JSON.stringify(se_DescribeModelInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3631,7 +3437,7 @@ export const se_DescribeModelBiasJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelBiasJobDefinition"); let body: any; - body = JSON.stringify(se_DescribeModelBiasJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3644,7 +3450,7 @@ export const se_DescribeModelCardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelCard"); let body: any; - body = JSON.stringify(se_DescribeModelCardRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3657,7 +3463,7 @@ export const se_DescribeModelCardExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelCardExportJob"); let body: any; - body = JSON.stringify(se_DescribeModelCardExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3670,7 +3476,7 @@ export const se_DescribeModelExplainabilityJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelExplainabilityJobDefinition"); let body: any; - body = JSON.stringify(se_DescribeModelExplainabilityJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3683,7 +3489,7 @@ export const se_DescribeModelPackageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelPackage"); let body: any; - body = JSON.stringify(se_DescribeModelPackageInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3696,7 +3502,7 @@ export const se_DescribeModelPackageGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelPackageGroup"); let body: any; - body = JSON.stringify(se_DescribeModelPackageGroupInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3709,7 +3515,7 @@ export const se_DescribeModelQualityJobDefinitionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeModelQualityJobDefinition"); let body: any; - body = JSON.stringify(se_DescribeModelQualityJobDefinitionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3722,7 +3528,7 @@ export const se_DescribeMonitoringScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMonitoringSchedule"); let body: any; - body = JSON.stringify(se_DescribeMonitoringScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3735,7 +3541,7 @@ export const se_DescribeNotebookInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNotebookInstance"); let body: any; - body = JSON.stringify(se_DescribeNotebookInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3748,7 +3554,7 @@ export const se_DescribeNotebookInstanceLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNotebookInstanceLifecycleConfig"); let body: any; - body = JSON.stringify(se_DescribeNotebookInstanceLifecycleConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3761,7 +3567,7 @@ export const se_DescribePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePipeline"); let body: any; - body = JSON.stringify(se_DescribePipelineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3774,7 +3580,7 @@ export const se_DescribePipelineDefinitionForExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePipelineDefinitionForExecution"); let body: any; - body = JSON.stringify(se_DescribePipelineDefinitionForExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3787,7 +3593,7 @@ export const se_DescribePipelineExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePipelineExecution"); let body: any; - body = JSON.stringify(se_DescribePipelineExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3800,7 +3606,7 @@ export const se_DescribeProcessingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProcessingJob"); let body: any; - body = JSON.stringify(se_DescribeProcessingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3813,7 +3619,7 @@ export const se_DescribeProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProject"); let body: any; - body = JSON.stringify(se_DescribeProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3826,7 +3632,7 @@ export const se_DescribeSpaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSpace"); let body: any; - body = JSON.stringify(se_DescribeSpaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3839,7 +3645,7 @@ export const se_DescribeStudioLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStudioLifecycleConfig"); let body: any; - body = JSON.stringify(se_DescribeStudioLifecycleConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3852,7 +3658,7 @@ export const se_DescribeSubscribedWorkteamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSubscribedWorkteam"); let body: any; - body = JSON.stringify(se_DescribeSubscribedWorkteamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3865,7 +3671,7 @@ export const se_DescribeTrainingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrainingJob"); let body: any; - body = JSON.stringify(se_DescribeTrainingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3878,7 +3684,7 @@ export const se_DescribeTransformJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTransformJob"); let body: any; - body = JSON.stringify(se_DescribeTransformJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3891,7 +3697,7 @@ export const se_DescribeTrialCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrial"); let body: any; - body = JSON.stringify(se_DescribeTrialRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3904,7 +3710,7 @@ export const se_DescribeTrialComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrialComponent"); let body: any; - body = JSON.stringify(se_DescribeTrialComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3917,7 +3723,7 @@ export const se_DescribeUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUserProfile"); let body: any; - body = JSON.stringify(se_DescribeUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3930,7 +3736,7 @@ export const se_DescribeWorkforceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkforce"); let body: any; - body = JSON.stringify(se_DescribeWorkforceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3943,7 +3749,7 @@ export const se_DescribeWorkteamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkteam"); let body: any; - body = JSON.stringify(se_DescribeWorkteamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3956,7 +3762,7 @@ export const se_DisableSagemakerServicecatalogPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableSagemakerServicecatalogPortfolio"); let body: any; - body = JSON.stringify(se_DisableSagemakerServicecatalogPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3969,7 +3775,7 @@ export const se_DisassociateTrialComponentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateTrialComponent"); let body: any; - body = JSON.stringify(se_DisassociateTrialComponentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3982,7 +3788,7 @@ export const se_EnableSagemakerServicecatalogPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableSagemakerServicecatalogPortfolio"); let body: any; - body = JSON.stringify(se_EnableSagemakerServicecatalogPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -3995,7 +3801,7 @@ export const se_GetDeviceFleetReportCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeviceFleetReport"); let body: any; - body = JSON.stringify(se_GetDeviceFleetReportRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4008,7 +3814,7 @@ export const se_GetLineageGroupPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLineageGroupPolicy"); let body: any; - body = JSON.stringify(se_GetLineageGroupPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4021,7 +3827,7 @@ export const se_GetModelPackageGroupPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetModelPackageGroupPolicy"); let body: any; - body = JSON.stringify(se_GetModelPackageGroupPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4034,7 +3840,7 @@ export const se_GetSagemakerServicecatalogPortfolioStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSagemakerServicecatalogPortfolioStatus"); let body: any; - body = JSON.stringify(se_GetSagemakerServicecatalogPortfolioStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4047,7 +3853,7 @@ export const se_GetSearchSuggestionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSearchSuggestions"); let body: any; - body = JSON.stringify(se_GetSearchSuggestionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4060,7 +3866,7 @@ export const se_ImportHubContentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportHubContent"); let body: any; - body = JSON.stringify(se_ImportHubContentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4099,7 +3905,7 @@ export const se_ListAliasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAliases"); let body: any; - body = JSON.stringify(se_ListAliasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4125,7 +3931,7 @@ export const se_ListAppsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApps"); let body: any; - body = JSON.stringify(se_ListAppsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4177,7 +3983,7 @@ export const se_ListCandidatesForAutoMLJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCandidatesForAutoMLJob"); let body: any; - body = JSON.stringify(se_ListCandidatesForAutoMLJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4268,7 +4074,7 @@ export const se_ListDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDomains"); let body: any; - body = JSON.stringify(se_ListDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4489,7 +4295,7 @@ export const se_ListInferenceRecommendationsJobStepsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInferenceRecommendationsJobSteps"); let body: any; - body = JSON.stringify(se_ListInferenceRecommendationsJobStepsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4606,7 +4412,7 @@ export const se_ListModelMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListModelMetadata"); let body: any; - body = JSON.stringify(se_ListModelMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4684,7 +4490,7 @@ export const se_ListMonitoringAlertsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMonitoringAlerts"); let body: any; - body = JSON.stringify(se_ListMonitoringAlertsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4762,7 +4568,7 @@ export const se_ListPipelineExecutionStepsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPipelineExecutionSteps"); let body: any; - body = JSON.stringify(se_ListPipelineExecutionStepsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4775,7 +4581,7 @@ export const se_ListPipelineParametersForExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPipelineParametersForExecution"); let body: any; - body = JSON.stringify(se_ListPipelineParametersForExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4827,7 +4633,7 @@ export const se_ListSpacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSpaces"); let body: any; - body = JSON.stringify(se_ListSpacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4840,7 +4646,7 @@ export const se_ListStageDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStageDevices"); let body: any; - body = JSON.stringify(se_ListStageDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4866,7 +4672,7 @@ export const se_ListSubscribedWorkteamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSubscribedWorkteams"); let body: any; - body = JSON.stringify(se_ListSubscribedWorkteamsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4879,7 +4685,7 @@ export const se_ListTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTags"); let body: any; - body = JSON.stringify(se_ListTagsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4905,7 +4711,7 @@ export const se_ListTrainingJobsForHyperParameterTuningJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTrainingJobsForHyperParameterTuningJob"); let body: any; - body = JSON.stringify(se_ListTrainingJobsForHyperParameterTuningJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4957,7 +4763,7 @@ export const se_ListUserProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUserProfiles"); let body: any; - body = JSON.stringify(se_ListUserProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4970,7 +4776,7 @@ export const se_ListWorkforcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkforces"); let body: any; - body = JSON.stringify(se_ListWorkforcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4983,7 +4789,7 @@ export const se_ListWorkteamsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkteams"); let body: any; - body = JSON.stringify(se_ListWorkteamsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -4996,7 +4802,7 @@ export const se_PutModelPackageGroupPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutModelPackageGroupPolicy"); let body: any; - body = JSON.stringify(se_PutModelPackageGroupPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5022,7 +4828,7 @@ export const se_RegisterDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterDevices"); let body: any; - body = JSON.stringify(se_RegisterDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5035,7 +4841,7 @@ export const se_RenderUiTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RenderUiTemplate"); let body: any; - body = JSON.stringify(se_RenderUiTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5097,7 +4903,7 @@ export const se_StartEdgeDeploymentStageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartEdgeDeploymentStage"); let body: any; - body = JSON.stringify(se_StartEdgeDeploymentStageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5110,7 +4916,7 @@ export const se_StartInferenceExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartInferenceExperiment"); let body: any; - body = JSON.stringify(se_StartInferenceExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5123,7 +4929,7 @@ export const se_StartMonitoringScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartMonitoringSchedule"); let body: any; - body = JSON.stringify(se_StartMonitoringScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5136,7 +4942,7 @@ export const se_StartNotebookInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartNotebookInstance"); let body: any; - body = JSON.stringify(se_StartNotebookInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5162,7 +4968,7 @@ export const se_StopAutoMLJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopAutoMLJob"); let body: any; - body = JSON.stringify(se_StopAutoMLJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5175,7 +4981,7 @@ export const se_StopCompilationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopCompilationJob"); let body: any; - body = JSON.stringify(se_StopCompilationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5188,7 +4994,7 @@ export const se_StopEdgeDeploymentStageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopEdgeDeploymentStage"); let body: any; - body = JSON.stringify(se_StopEdgeDeploymentStageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5201,7 +5007,7 @@ export const se_StopEdgePackagingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopEdgePackagingJob"); let body: any; - body = JSON.stringify(se_StopEdgePackagingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5214,7 +5020,7 @@ export const se_StopHyperParameterTuningJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopHyperParameterTuningJob"); let body: any; - body = JSON.stringify(se_StopHyperParameterTuningJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5227,7 +5033,7 @@ export const se_StopInferenceExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopInferenceExperiment"); let body: any; - body = JSON.stringify(se_StopInferenceExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5240,7 +5046,7 @@ export const se_StopInferenceRecommendationsJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopInferenceRecommendationsJob"); let body: any; - body = JSON.stringify(se_StopInferenceRecommendationsJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5253,7 +5059,7 @@ export const se_StopLabelingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopLabelingJob"); let body: any; - body = JSON.stringify(se_StopLabelingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5266,7 +5072,7 @@ export const se_StopMonitoringScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopMonitoringSchedule"); let body: any; - body = JSON.stringify(se_StopMonitoringScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5279,7 +5085,7 @@ export const se_StopNotebookInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopNotebookInstance"); let body: any; - body = JSON.stringify(se_StopNotebookInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5305,7 +5111,7 @@ export const se_StopProcessingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopProcessingJob"); let body: any; - body = JSON.stringify(se_StopProcessingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5318,7 +5124,7 @@ export const se_StopTrainingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTrainingJob"); let body: any; - body = JSON.stringify(se_StopTrainingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5331,7 +5137,7 @@ export const se_StopTransformJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTransformJob"); let body: any; - body = JSON.stringify(se_StopTransformJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5344,7 +5150,7 @@ export const se_UpdateActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAction"); let body: any; - body = JSON.stringify(se_UpdateActionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5357,7 +5163,7 @@ export const se_UpdateAppImageConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAppImageConfig"); let body: any; - body = JSON.stringify(se_UpdateAppImageConfigRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5370,7 +5176,7 @@ export const se_UpdateArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateArtifact"); let body: any; - body = JSON.stringify(se_UpdateArtifactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5383,7 +5189,7 @@ export const se_UpdateCodeRepositoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCodeRepository"); let body: any; - body = JSON.stringify(se_UpdateCodeRepositoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5396,7 +5202,7 @@ export const se_UpdateContextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContext"); let body: any; - body = JSON.stringify(se_UpdateContextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5409,7 +5215,7 @@ export const se_UpdateDeviceFleetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDeviceFleet"); let body: any; - body = JSON.stringify(se_UpdateDeviceFleetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5422,7 +5228,7 @@ export const se_UpdateDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDevices"); let body: any; - body = JSON.stringify(se_UpdateDevicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5435,7 +5241,7 @@ export const se_UpdateDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDomain"); let body: any; - body = JSON.stringify(se_UpdateDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5448,7 +5254,7 @@ export const se_UpdateEndpointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEndpoint"); let body: any; - body = JSON.stringify(se_UpdateEndpointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5474,7 +5280,7 @@ export const se_UpdateExperimentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateExperiment"); let body: any; - body = JSON.stringify(se_UpdateExperimentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5487,7 +5293,7 @@ export const se_UpdateFeatureGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFeatureGroup"); let body: any; - body = JSON.stringify(se_UpdateFeatureGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5500,7 +5306,7 @@ export const se_UpdateFeatureMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFeatureMetadata"); let body: any; - body = JSON.stringify(se_UpdateFeatureMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5513,7 +5319,7 @@ export const se_UpdateHubCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateHub"); let body: any; - body = JSON.stringify(se_UpdateHubRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5526,7 +5332,7 @@ export const se_UpdateImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateImage"); let body: any; - body = JSON.stringify(se_UpdateImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5539,7 +5345,7 @@ export const se_UpdateImageVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateImageVersion"); let body: any; - body = JSON.stringify(se_UpdateImageVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5565,7 +5371,7 @@ export const se_UpdateModelCardCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateModelCard"); let body: any; - body = JSON.stringify(se_UpdateModelCardRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5578,7 +5384,7 @@ export const se_UpdateModelPackageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateModelPackage"); let body: any; - body = JSON.stringify(se_UpdateModelPackageInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5591,7 +5397,7 @@ export const se_UpdateMonitoringAlertCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMonitoringAlert"); let body: any; - body = JSON.stringify(se_UpdateMonitoringAlertRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5617,7 +5423,7 @@ export const se_UpdateNotebookInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNotebookInstance"); let body: any; - body = JSON.stringify(se_UpdateNotebookInstanceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5630,7 +5436,7 @@ export const se_UpdateNotebookInstanceLifecycleConfigCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNotebookInstanceLifecycleConfig"); let body: any; - body = JSON.stringify(se_UpdateNotebookInstanceLifecycleConfigInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5643,7 +5449,7 @@ export const se_UpdatePipelineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePipeline"); let body: any; - body = JSON.stringify(se_UpdatePipelineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5656,7 +5462,7 @@ export const se_UpdatePipelineExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePipelineExecution"); let body: any; - body = JSON.stringify(se_UpdatePipelineExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5669,7 +5475,7 @@ export const se_UpdateProjectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProject"); let body: any; - body = JSON.stringify(se_UpdateProjectInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5682,7 +5488,7 @@ export const se_UpdateSpaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSpace"); let body: any; - body = JSON.stringify(se_UpdateSpaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5695,7 +5501,7 @@ export const se_UpdateTrainingJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTrainingJob"); let body: any; - body = JSON.stringify(se_UpdateTrainingJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5708,7 +5514,7 @@ export const se_UpdateTrialCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTrial"); let body: any; - body = JSON.stringify(se_UpdateTrialRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5734,7 +5540,7 @@ export const se_UpdateUserProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUserProfile"); let body: any; - body = JSON.stringify(se_UpdateUserProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5747,7 +5553,7 @@ export const se_UpdateWorkforceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkforce"); let body: any; - body = JSON.stringify(se_UpdateWorkforceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5760,7 +5566,7 @@ export const se_UpdateWorkteamCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkteam"); let body: any; - body = JSON.stringify(se_UpdateWorkteamRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -5776,12 +5582,12 @@ export const de_AddAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddAssociationResponse(data, context); + contents = _json(data); const response: AddAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5805,10 +5611,9 @@ const de_AddAssociationCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5826,12 +5631,12 @@ export const de_AddTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsOutput(data, context); + contents = _json(data); const response: AddTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5847,10 +5652,9 @@ const de_AddTagsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5867,12 +5671,12 @@ export const de_AssociateTrialComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateTrialComponentResponse(data, context); + contents = _json(data); const response: AssociateTrialComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5896,10 +5700,9 @@ const de_AssociateTrialComponentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5922,7 +5725,7 @@ export const de_BatchDescribeModelPackageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5938,10 +5741,9 @@ const de_BatchDescribeModelPackageCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5958,12 +5760,12 @@ export const de_CreateActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateActionResponse(data, context); + contents = _json(data); const response: CreateActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5984,10 +5786,9 @@ const de_CreateActionCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6005,12 +5806,12 @@ export const de_CreateAlgorithmCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAlgorithmOutput(data, context); + contents = _json(data); const response: CreateAlgorithmCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6026,10 +5827,9 @@ const de_CreateAlgorithmCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6046,12 +5846,12 @@ export const de_CreateAppCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAppResponse(data, context); + contents = _json(data); const response: CreateAppCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6075,10 +5875,9 @@ const de_CreateAppCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6096,12 +5895,12 @@ export const de_CreateAppImageConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAppImageConfigResponse(data, context); + contents = _json(data); const response: CreateAppImageConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6122,10 +5921,9 @@ const de_CreateAppImageConfigCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6143,12 +5941,12 @@ export const de_CreateArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateArtifactResponse(data, context); + contents = _json(data); const response: CreateArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6169,10 +5967,9 @@ const de_CreateArtifactCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6190,12 +5987,12 @@ export const de_CreateAutoMLJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAutoMLJobResponse(data, context); + contents = _json(data); const response: CreateAutoMLJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6219,10 +6016,9 @@ const de_CreateAutoMLJobCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6240,12 +6036,12 @@ export const de_CreateAutoMLJobV2Command = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAutoMLJobV2Response(data, context); + contents = _json(data); const response: CreateAutoMLJobV2CommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6269,10 +6065,9 @@ const de_CreateAutoMLJobV2CommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6290,12 +6085,12 @@ export const de_CreateCodeRepositoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCodeRepositoryOutput(data, context); + contents = _json(data); const response: CreateCodeRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6311,10 +6106,9 @@ const de_CreateCodeRepositoryCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6331,12 +6125,12 @@ export const de_CreateCompilationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCompilationJobResponse(data, context); + contents = _json(data); const response: CreateCompilationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6360,10 +6154,9 @@ const de_CreateCompilationJobCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6381,12 +6174,12 @@ export const de_CreateContextCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateContextResponse(data, context); + contents = _json(data); const response: CreateContextCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6407,10 +6200,9 @@ const de_CreateContextCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6428,12 +6220,12 @@ export const de_CreateDataQualityJobDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDataQualityJobDefinitionResponse(data, context); + contents = _json(data); const response: CreateDataQualityJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6457,10 +6249,9 @@ const de_CreateDataQualityJobDefinitionCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6480,7 +6271,7 @@ export const de_CreateDeviceFleetCommand = async ( const response: CreateDeviceFleetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6504,10 +6295,9 @@ const de_CreateDeviceFleetCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6525,12 +6315,12 @@ export const de_CreateDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateDomainResponse(data, context); + contents = _json(data); const response: CreateDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6554,10 +6344,9 @@ const de_CreateDomainCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6575,12 +6364,12 @@ export const de_CreateEdgeDeploymentPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEdgeDeploymentPlanResponse(data, context); + contents = _json(data); const response: CreateEdgeDeploymentPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6601,10 +6390,9 @@ const de_CreateEdgeDeploymentPlanCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6624,7 +6412,7 @@ export const de_CreateEdgeDeploymentStageCommand = async ( const response: CreateEdgeDeploymentStageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6645,10 +6433,9 @@ const de_CreateEdgeDeploymentStageCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6668,7 +6455,7 @@ export const de_CreateEdgePackagingJobCommand = async ( const response: CreateEdgePackagingJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -6689,10 +6476,9 @@ const de_CreateEdgePackagingJobCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6710,12 +6496,12 @@ export const de_CreateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEndpointOutput(data, context); + contents = _json(data); const response: CreateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6736,10 +6522,9 @@ const de_CreateEndpointCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6757,12 +6542,12 @@ export const de_CreateEndpointConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateEndpointConfigOutput(data, context); + contents = _json(data); const response: CreateEndpointConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6783,10 +6568,9 @@ const de_CreateEndpointConfigCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6804,12 +6588,12 @@ export const de_CreateExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateExperimentResponse(data, context); + contents = _json(data); const response: CreateExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6830,10 +6614,9 @@ const de_CreateExperimentCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6851,12 +6634,12 @@ export const de_CreateFeatureGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFeatureGroupResponse(data, context); + contents = _json(data); const response: CreateFeatureGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6880,10 +6663,9 @@ const de_CreateFeatureGroupCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6901,12 +6683,12 @@ export const de_CreateFlowDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateFlowDefinitionResponse(data, context); + contents = _json(data); const response: CreateFlowDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6930,10 +6712,9 @@ const de_CreateFlowDefinitionCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6951,12 +6732,12 @@ export const de_CreateHubCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHubResponse(data, context); + contents = _json(data); const response: CreateHubCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6980,10 +6761,9 @@ const de_CreateHubCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7001,12 +6781,12 @@ export const de_CreateHumanTaskUiCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHumanTaskUiResponse(data, context); + contents = _json(data); const response: CreateHumanTaskUiCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7030,10 +6810,9 @@ const de_CreateHumanTaskUiCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7051,12 +6830,12 @@ export const de_CreateHyperParameterTuningJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHyperParameterTuningJobResponse(data, context); + contents = _json(data); const response: CreateHyperParameterTuningJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7080,10 +6859,9 @@ const de_CreateHyperParameterTuningJobCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7101,12 +6879,12 @@ export const de_CreateImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateImageResponse(data, context); + contents = _json(data); const response: CreateImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7130,10 +6908,9 @@ const de_CreateImageCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7151,12 +6928,12 @@ export const de_CreateImageVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateImageVersionResponse(data, context); + contents = _json(data); const response: CreateImageVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7183,10 +6960,9 @@ const de_CreateImageVersionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7204,12 +6980,12 @@ export const de_CreateInferenceExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateInferenceExperimentResponse(data, context); + contents = _json(data); const response: CreateInferenceExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7233,10 +7009,9 @@ const de_CreateInferenceExperimentCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7254,12 +7029,12 @@ export const de_CreateInferenceRecommendationsJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateInferenceRecommendationsJobResponse(data, context); + contents = _json(data); const response: CreateInferenceRecommendationsJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7283,10 +7058,9 @@ const de_CreateInferenceRecommendationsJobCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7304,12 +7078,12 @@ export const de_CreateLabelingJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLabelingJobResponse(data, context); + contents = _json(data); const response: CreateLabelingJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7333,10 +7107,9 @@ const de_CreateLabelingJobCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7354,12 +7127,12 @@ export const de_CreateModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelOutput(data, context); + contents = _json(data); const response: CreateModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7380,10 +7153,9 @@ const de_CreateModelCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7401,12 +7173,12 @@ export const de_CreateModelBiasJobDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelBiasJobDefinitionResponse(data, context); + contents = _json(data); const response: CreateModelBiasJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7430,10 +7202,9 @@ const de_CreateModelBiasJobDefinitionCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7451,12 +7222,12 @@ export const de_CreateModelCardCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelCardResponse(data, context); + contents = _json(data); const response: CreateModelCardCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7480,10 +7251,9 @@ const de_CreateModelCardCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7501,12 +7271,12 @@ export const de_CreateModelCardExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelCardExportJobResponse(data, context); + contents = _json(data); const response: CreateModelCardExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7533,10 +7303,9 @@ const de_CreateModelCardExportJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7554,12 +7323,12 @@ export const de_CreateModelExplainabilityJobDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelExplainabilityJobDefinitionResponse(data, context); + contents = _json(data); const response: CreateModelExplainabilityJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7583,10 +7352,9 @@ const de_CreateModelExplainabilityJobDefinitionCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7604,12 +7372,12 @@ export const de_CreateModelPackageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelPackageOutput(data, context); + contents = _json(data); const response: CreateModelPackageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7633,10 +7401,9 @@ const de_CreateModelPackageCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7654,12 +7421,12 @@ export const de_CreateModelPackageGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelPackageGroupOutput(data, context); + contents = _json(data); const response: CreateModelPackageGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7680,10 +7447,9 @@ const de_CreateModelPackageGroupCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7701,12 +7467,12 @@ export const de_CreateModelQualityJobDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateModelQualityJobDefinitionResponse(data, context); + contents = _json(data); const response: CreateModelQualityJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7730,10 +7496,9 @@ const de_CreateModelQualityJobDefinitionCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7751,12 +7516,12 @@ export const de_CreateMonitoringScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMonitoringScheduleResponse(data, context); + contents = _json(data); const response: CreateMonitoringScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7780,10 +7545,9 @@ const de_CreateMonitoringScheduleCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7801,12 +7565,12 @@ export const de_CreateNotebookInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNotebookInstanceOutput(data, context); + contents = _json(data); const response: CreateNotebookInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7827,10 +7591,9 @@ const de_CreateNotebookInstanceCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7848,12 +7611,12 @@ export const de_CreateNotebookInstanceLifecycleConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNotebookInstanceLifecycleConfigOutput(data, context); + contents = _json(data); const response: CreateNotebookInstanceLifecycleConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7874,10 +7637,9 @@ const de_CreateNotebookInstanceLifecycleConfigCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7895,12 +7657,12 @@ export const de_CreatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePipelineResponse(data, context); + contents = _json(data); const response: CreatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7924,10 +7686,9 @@ const de_CreatePipelineCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7945,12 +7706,12 @@ export const de_CreatePresignedDomainUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePresignedDomainUrlResponse(data, context); + contents = _json(data); const response: CreatePresignedDomainUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7971,10 +7732,9 @@ const de_CreatePresignedDomainUrlCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7992,12 +7752,12 @@ export const de_CreatePresignedNotebookInstanceUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePresignedNotebookInstanceUrlOutput(data, context); + contents = _json(data); const response: CreatePresignedNotebookInstanceUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8013,10 +7773,9 @@ const de_CreatePresignedNotebookInstanceUrlCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8033,12 +7792,12 @@ export const de_CreateProcessingJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProcessingJobResponse(data, context); + contents = _json(data); const response: CreateProcessingJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8065,10 +7824,9 @@ const de_CreateProcessingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8086,12 +7844,12 @@ export const de_CreateProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProjectOutput(data, context); + contents = _json(data); const response: CreateProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8112,10 +7870,9 @@ const de_CreateProjectCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8133,12 +7890,12 @@ export const de_CreateSpaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSpaceResponse(data, context); + contents = _json(data); const response: CreateSpaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8162,10 +7919,9 @@ const de_CreateSpaceCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8183,12 +7939,12 @@ export const de_CreateStudioLifecycleConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateStudioLifecycleConfigResponse(data, context); + contents = _json(data); const response: CreateStudioLifecycleConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8209,10 +7965,9 @@ const de_CreateStudioLifecycleConfigCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8230,12 +7985,12 @@ export const de_CreateTrainingJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTrainingJobResponse(data, context); + contents = _json(data); const response: CreateTrainingJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8262,10 +8017,9 @@ const de_CreateTrainingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8283,12 +8037,12 @@ export const de_CreateTransformJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTransformJobResponse(data, context); + contents = _json(data); const response: CreateTransformJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8315,10 +8069,9 @@ const de_CreateTransformJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8336,12 +8089,12 @@ export const de_CreateTrialCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTrialResponse(data, context); + contents = _json(data); const response: CreateTrialCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8365,10 +8118,9 @@ const de_CreateTrialCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8386,12 +8138,12 @@ export const de_CreateTrialComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTrialComponentResponse(data, context); + contents = _json(data); const response: CreateTrialComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8412,10 +8164,9 @@ const de_CreateTrialComponentCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8433,12 +8184,12 @@ export const de_CreateUserProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserProfileResponse(data, context); + contents = _json(data); const response: CreateUserProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8462,10 +8213,9 @@ const de_CreateUserProfileCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8483,12 +8233,12 @@ export const de_CreateWorkforceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkforceResponse(data, context); + contents = _json(data); const response: CreateWorkforceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8504,10 +8254,9 @@ const de_CreateWorkforceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8524,12 +8273,12 @@ export const de_CreateWorkteamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkteamResponse(data, context); + contents = _json(data); const response: CreateWorkteamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8553,10 +8302,9 @@ const de_CreateWorkteamCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8574,12 +8322,12 @@ export const de_DeleteActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteActionResponse(data, context); + contents = _json(data); const response: DeleteActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8600,10 +8348,9 @@ const de_DeleteActionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8623,7 +8370,7 @@ export const de_DeleteAlgorithmCommand = async ( const response: DeleteAlgorithmCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8639,10 +8386,9 @@ const de_DeleteAlgorithmCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8661,7 +8407,7 @@ export const de_DeleteAppCommand = async ( const response: DeleteAppCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8685,10 +8431,9 @@ const de_DeleteAppCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8708,7 +8453,7 @@ export const de_DeleteAppImageConfigCommand = async ( const response: DeleteAppImageConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8729,10 +8474,9 @@ const de_DeleteAppImageConfigCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8750,12 +8494,12 @@ export const de_DeleteArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteArtifactResponse(data, context); + contents = _json(data); const response: DeleteArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8776,10 +8520,9 @@ const de_DeleteArtifactCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8797,12 +8540,12 @@ export const de_DeleteAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAssociationResponse(data, context); + contents = _json(data); const response: DeleteAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8823,10 +8566,9 @@ const de_DeleteAssociationCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8846,7 +8588,7 @@ export const de_DeleteCodeRepositoryCommand = async ( const response: DeleteCodeRepositoryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8862,10 +8604,9 @@ const de_DeleteCodeRepositoryCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -8882,12 +8623,12 @@ export const de_DeleteContextCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContextResponse(data, context); + contents = _json(data); const response: DeleteContextCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8908,10 +8649,9 @@ const de_DeleteContextCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8931,7 +8671,7 @@ export const de_DeleteDataQualityJobDefinitionCommand = async ( const response: DeleteDataQualityJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8952,10 +8692,9 @@ const de_DeleteDataQualityJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8975,7 +8714,7 @@ export const de_DeleteDeviceFleetCommand = async ( const response: DeleteDeviceFleetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -8996,10 +8735,9 @@ const de_DeleteDeviceFleetCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9019,7 +8757,7 @@ export const de_DeleteDomainCommand = async ( const response: DeleteDomainCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9043,10 +8781,9 @@ const de_DeleteDomainCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9066,7 +8803,7 @@ export const de_DeleteEdgeDeploymentPlanCommand = async ( const response: DeleteEdgeDeploymentPlanCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9087,10 +8824,9 @@ const de_DeleteEdgeDeploymentPlanCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9110,7 +8846,7 @@ export const de_DeleteEdgeDeploymentStageCommand = async ( const response: DeleteEdgeDeploymentStageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9131,10 +8867,9 @@ const de_DeleteEdgeDeploymentStageCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9154,7 +8889,7 @@ export const de_DeleteEndpointCommand = async ( const response: DeleteEndpointCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9170,10 +8905,9 @@ const de_DeleteEndpointCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9192,7 +8926,7 @@ export const de_DeleteEndpointConfigCommand = async ( const response: DeleteEndpointConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9208,10 +8942,9 @@ const de_DeleteEndpointConfigCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9228,12 +8961,12 @@ export const de_DeleteExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteExperimentResponse(data, context); + contents = _json(data); const response: DeleteExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9254,10 +8987,9 @@ const de_DeleteExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9277,7 +9009,7 @@ export const de_DeleteFeatureGroupCommand = async ( const response: DeleteFeatureGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9298,10 +9030,9 @@ const de_DeleteFeatureGroupCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9319,12 +9050,12 @@ export const de_DeleteFlowDefinitionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFlowDefinitionResponse(data, context); + contents = _json(data); const response: DeleteFlowDefinitionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9348,10 +9079,9 @@ const de_DeleteFlowDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9371,7 +9101,7 @@ export const de_DeleteHubCommand = async ( const response: DeleteHubCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9395,10 +9125,9 @@ const de_DeleteHubCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9418,7 +9147,7 @@ export const de_DeleteHubContentCommand = async ( const response: DeleteHubContentCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9442,10 +9171,9 @@ const de_DeleteHubContentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9463,12 +9191,12 @@ export const de_DeleteHumanTaskUiCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteHumanTaskUiResponse(data, context); + contents = _json(data); const response: DeleteHumanTaskUiCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9489,10 +9217,9 @@ const de_DeleteHumanTaskUiCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9510,12 +9237,12 @@ export const de_DeleteImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteImageResponse(data, context); + contents = _json(data); const response: DeleteImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9539,10 +9266,9 @@ const de_DeleteImageCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9560,12 +9286,12 @@ export const de_DeleteImageVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteImageVersionResponse(data, context); + contents = _json(data); const response: DeleteImageVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9589,10 +9315,9 @@ const de_DeleteImageVersionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9610,12 +9335,12 @@ export const de_DeleteInferenceExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteInferenceExperimentResponse(data, context); + contents = _json(data); const response: DeleteInferenceExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9639,10 +9364,9 @@ const de_DeleteInferenceExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9662,7 +9386,7 @@ export const de_DeleteModelCommand = async ( const response: DeleteModelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9678,10 +9402,9 @@ const de_DeleteModelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9700,7 +9423,7 @@ export const de_DeleteModelBiasJobDefinitionCommand = async ( const response: DeleteModelBiasJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9721,10 +9444,9 @@ const de_DeleteModelBiasJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9744,7 +9466,7 @@ export const de_DeleteModelCardCommand = async ( const response: DeleteModelCardCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9768,10 +9490,9 @@ const de_DeleteModelCardCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9791,7 +9512,7 @@ export const de_DeleteModelExplainabilityJobDefinitionCommand = async ( const response: DeleteModelExplainabilityJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9812,10 +9533,9 @@ const de_DeleteModelExplainabilityJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9835,7 +9555,7 @@ export const de_DeleteModelPackageCommand = async ( const response: DeleteModelPackageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9856,10 +9576,9 @@ const de_DeleteModelPackageCommandError = async ( throw await de_ConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9879,7 +9598,7 @@ export const de_DeleteModelPackageGroupCommand = async ( const response: DeleteModelPackageGroupCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9900,10 +9619,9 @@ const de_DeleteModelPackageGroupCommandError = async ( throw await de_ConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9923,7 +9641,7 @@ export const de_DeleteModelPackageGroupPolicyCommand = async ( const response: DeleteModelPackageGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9939,10 +9657,9 @@ const de_DeleteModelPackageGroupPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9961,7 +9678,7 @@ export const de_DeleteModelQualityJobDefinitionCommand = async ( const response: DeleteModelQualityJobDefinitionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -9982,10 +9699,9 @@ const de_DeleteModelQualityJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10005,7 +9721,7 @@ export const de_DeleteMonitoringScheduleCommand = async ( const response: DeleteMonitoringScheduleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10026,10 +9742,9 @@ const de_DeleteMonitoringScheduleCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10049,7 +9764,7 @@ export const de_DeleteNotebookInstanceCommand = async ( const response: DeleteNotebookInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10065,10 +9780,9 @@ const de_DeleteNotebookInstanceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10087,7 +9801,7 @@ export const de_DeleteNotebookInstanceLifecycleConfigCommand = async ( const response: DeleteNotebookInstanceLifecycleConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10103,10 +9817,9 @@ const de_DeleteNotebookInstanceLifecycleConfigCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10123,12 +9836,12 @@ export const de_DeletePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePipelineResponse(data, context); + contents = _json(data); const response: DeletePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10149,10 +9862,9 @@ const de_DeletePipelineCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10172,7 +9884,7 @@ export const de_DeleteProjectCommand = async ( const response: DeleteProjectCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10193,10 +9905,9 @@ const de_DeleteProjectCommandError = async ( throw await de_ConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10216,7 +9927,7 @@ export const de_DeleteSpaceCommand = async ( const response: DeleteSpaceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10240,10 +9951,9 @@ const de_DeleteSpaceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10263,7 +9973,7 @@ export const de_DeleteStudioLifecycleConfigCommand = async ( const response: DeleteStudioLifecycleConfigCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10287,10 +9997,9 @@ const de_DeleteStudioLifecycleConfigCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10308,12 +10017,12 @@ export const de_DeleteTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTagsOutput(data, context); + contents = _json(data); const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10329,10 +10038,9 @@ const de_DeleteTagsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10349,12 +10057,12 @@ export const de_DeleteTrialCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTrialResponse(data, context); + contents = _json(data); const response: DeleteTrialCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10375,10 +10083,9 @@ const de_DeleteTrialCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10396,12 +10103,12 @@ export const de_DeleteTrialComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTrialComponentResponse(data, context); + contents = _json(data); const response: DeleteTrialComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10422,10 +10129,9 @@ const de_DeleteTrialComponentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10445,7 +10151,7 @@ export const de_DeleteUserProfileCommand = async ( const response: DeleteUserProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10469,10 +10175,9 @@ const de_DeleteUserProfileCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10490,12 +10195,12 @@ export const de_DeleteWorkforceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkforceResponse(data, context); + contents = _json(data); const response: DeleteWorkforceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10511,10 +10216,9 @@ const de_DeleteWorkforceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10531,12 +10235,12 @@ export const de_DeleteWorkteamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkteamResponse(data, context); + contents = _json(data); const response: DeleteWorkteamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10557,10 +10261,9 @@ const de_DeleteWorkteamCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10580,7 +10283,7 @@ export const de_DeregisterDevicesCommand = async ( const response: DeregisterDevicesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -10596,10 +10299,9 @@ const de_DeregisterDevicesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10621,7 +10323,7 @@ export const de_DescribeActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10642,10 +10344,9 @@ const de_DescribeActionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10668,7 +10369,7 @@ export const de_DescribeAlgorithmCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10684,10 +10385,9 @@ const de_DescribeAlgorithmCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10709,7 +10409,7 @@ export const de_DescribeAppCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10730,10 +10430,9 @@ const de_DescribeAppCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10756,7 +10455,7 @@ export const de_DescribeAppImageConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10777,10 +10476,9 @@ const de_DescribeAppImageConfigCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10803,7 +10501,7 @@ export const de_DescribeArtifactCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10824,10 +10522,9 @@ const de_DescribeArtifactCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10850,7 +10547,7 @@ export const de_DescribeAutoMLJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10871,10 +10568,9 @@ const de_DescribeAutoMLJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10897,7 +10593,7 @@ export const de_DescribeAutoMLJobV2Command = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10918,10 +10614,9 @@ const de_DescribeAutoMLJobV2CommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10944,7 +10639,7 @@ export const de_DescribeCodeRepositoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10960,10 +10655,9 @@ const de_DescribeCodeRepositoryCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -10985,7 +10679,7 @@ export const de_DescribeCompilationJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11006,10 +10700,9 @@ const de_DescribeCompilationJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11032,7 +10725,7 @@ export const de_DescribeContextCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11053,10 +10746,9 @@ const de_DescribeContextCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11079,7 +10771,7 @@ export const de_DescribeDataQualityJobDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11100,10 +10792,9 @@ const de_DescribeDataQualityJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11126,7 +10817,7 @@ export const de_DescribeDeviceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11147,10 +10838,9 @@ const de_DescribeDeviceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11173,7 +10863,7 @@ export const de_DescribeDeviceFleetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11194,10 +10884,9 @@ const de_DescribeDeviceFleetCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11220,7 +10909,7 @@ export const de_DescribeDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11241,10 +10930,9 @@ const de_DescribeDomainCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11267,7 +10955,7 @@ export const de_DescribeEdgeDeploymentPlanCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11288,10 +10976,9 @@ const de_DescribeEdgeDeploymentPlanCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11314,7 +11001,7 @@ export const de_DescribeEdgePackagingJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11335,10 +11022,9 @@ const de_DescribeEdgePackagingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11361,7 +11047,7 @@ export const de_DescribeEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11377,10 +11063,9 @@ const de_DescribeEndpointCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -11402,7 +11087,7 @@ export const de_DescribeEndpointConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11418,10 +11103,9 @@ const de_DescribeEndpointConfigCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -11443,7 +11127,7 @@ export const de_DescribeExperimentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11464,10 +11148,9 @@ const de_DescribeExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11490,7 +11173,7 @@ export const de_DescribeFeatureGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11511,10 +11194,9 @@ const de_DescribeFeatureGroupCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11537,7 +11219,7 @@ export const de_DescribeFeatureMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11558,10 +11240,9 @@ const de_DescribeFeatureMetadataCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11584,7 +11265,7 @@ export const de_DescribeFlowDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11605,10 +11286,9 @@ const de_DescribeFlowDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11631,7 +11311,7 @@ export const de_DescribeHubCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11652,10 +11332,9 @@ const de_DescribeHubCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11678,7 +11357,7 @@ export const de_DescribeHubContentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11699,10 +11378,9 @@ const de_DescribeHubContentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11725,7 +11403,7 @@ export const de_DescribeHumanTaskUiCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11746,10 +11424,9 @@ const de_DescribeHumanTaskUiCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11772,7 +11449,7 @@ export const de_DescribeHyperParameterTuningJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11793,10 +11470,9 @@ const de_DescribeHyperParameterTuningJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11819,7 +11495,7 @@ export const de_DescribeImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11840,10 +11516,9 @@ const de_DescribeImageCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11866,7 +11541,7 @@ export const de_DescribeImageVersionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11887,10 +11562,9 @@ const de_DescribeImageVersionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11913,7 +11587,7 @@ export const de_DescribeInferenceExperimentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11934,10 +11608,9 @@ const de_DescribeInferenceExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -11960,7 +11633,7 @@ export const de_DescribeInferenceRecommendationsJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -11981,10 +11654,9 @@ const de_DescribeInferenceRecommendationsJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12007,7 +11679,7 @@ export const de_DescribeLabelingJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12028,10 +11700,9 @@ const de_DescribeLabelingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12054,7 +11725,7 @@ export const de_DescribeLineageGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12075,10 +11746,9 @@ const de_DescribeLineageGroupCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12101,7 +11771,7 @@ export const de_DescribeModelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12117,10 +11787,9 @@ const de_DescribeModelCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12142,7 +11811,7 @@ export const de_DescribeModelBiasJobDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12163,10 +11832,9 @@ const de_DescribeModelBiasJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12189,7 +11857,7 @@ export const de_DescribeModelCardCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12210,10 +11878,9 @@ const de_DescribeModelCardCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12236,7 +11903,7 @@ export const de_DescribeModelCardExportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12257,10 +11924,9 @@ const de_DescribeModelCardExportJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12283,7 +11949,7 @@ export const de_DescribeModelExplainabilityJobDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12304,10 +11970,9 @@ const de_DescribeModelExplainabilityJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12330,7 +11995,7 @@ export const de_DescribeModelPackageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12346,10 +12011,9 @@ const de_DescribeModelPackageCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12371,7 +12035,7 @@ export const de_DescribeModelPackageGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12387,10 +12051,9 @@ const de_DescribeModelPackageGroupCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12412,7 +12075,7 @@ export const de_DescribeModelQualityJobDefinitionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12433,10 +12096,9 @@ const de_DescribeModelQualityJobDefinitionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12459,7 +12121,7 @@ export const de_DescribeMonitoringScheduleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12480,10 +12142,9 @@ const de_DescribeMonitoringScheduleCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12506,7 +12167,7 @@ export const de_DescribeNotebookInstanceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12522,10 +12183,9 @@ const de_DescribeNotebookInstanceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12547,7 +12207,7 @@ export const de_DescribeNotebookInstanceLifecycleConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12563,10 +12223,9 @@ const de_DescribeNotebookInstanceLifecycleConfigCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12588,7 +12247,7 @@ export const de_DescribePipelineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12609,10 +12268,9 @@ const de_DescribePipelineCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12635,7 +12293,7 @@ export const de_DescribePipelineDefinitionForExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12656,10 +12314,9 @@ const de_DescribePipelineDefinitionForExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12682,7 +12339,7 @@ export const de_DescribePipelineExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12703,10 +12360,9 @@ const de_DescribePipelineExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12729,7 +12385,7 @@ export const de_DescribeProcessingJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12750,10 +12406,9 @@ const de_DescribeProcessingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12776,7 +12431,7 @@ export const de_DescribeProjectCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12792,10 +12447,9 @@ const de_DescribeProjectCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12817,7 +12471,7 @@ export const de_DescribeSpaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12838,10 +12492,9 @@ const de_DescribeSpaceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12864,7 +12517,7 @@ export const de_DescribeStudioLifecycleConfigCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12885,10 +12538,9 @@ const de_DescribeStudioLifecycleConfigCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12906,12 +12558,12 @@ export const de_DescribeSubscribedWorkteamCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSubscribedWorkteamResponse(data, context); + contents = _json(data); const response: DescribeSubscribedWorkteamCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12927,10 +12579,9 @@ const de_DescribeSubscribedWorkteamCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -12952,7 +12603,7 @@ export const de_DescribeTrainingJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -12973,10 +12624,9 @@ const de_DescribeTrainingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -12999,7 +12649,7 @@ export const de_DescribeTransformJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13020,10 +12670,9 @@ const de_DescribeTransformJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13046,7 +12695,7 @@ export const de_DescribeTrialCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13067,10 +12716,9 @@ const de_DescribeTrialCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13093,7 +12741,7 @@ export const de_DescribeTrialComponentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13114,10 +12762,9 @@ const de_DescribeTrialComponentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13140,7 +12787,7 @@ export const de_DescribeUserProfileCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13161,10 +12808,9 @@ const de_DescribeUserProfileCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13187,7 +12833,7 @@ export const de_DescribeWorkforceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13203,10 +12849,9 @@ const de_DescribeWorkforceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13228,7 +12873,7 @@ export const de_DescribeWorkteamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13244,10 +12889,9 @@ const de_DescribeWorkteamCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13264,12 +12908,12 @@ export const de_DisableSagemakerServicecatalogPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableSagemakerServicecatalogPortfolioOutput(data, context); + contents = _json(data); const response: DisableSagemakerServicecatalogPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13285,10 +12929,9 @@ const de_DisableSagemakerServicecatalogPortfolioCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13305,12 +12948,12 @@ export const de_DisassociateTrialComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateTrialComponentResponse(data, context); + contents = _json(data); const response: DisassociateTrialComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13331,10 +12974,9 @@ const de_DisassociateTrialComponentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13352,12 +12994,12 @@ export const de_EnableSagemakerServicecatalogPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableSagemakerServicecatalogPortfolioOutput(data, context); + contents = _json(data); const response: EnableSagemakerServicecatalogPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13373,10 +13015,9 @@ const de_EnableSagemakerServicecatalogPortfolioCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13398,7 +13039,7 @@ export const de_GetDeviceFleetReportCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13414,10 +13055,9 @@ const de_GetDeviceFleetReportCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13434,12 +13074,12 @@ export const de_GetLineageGroupPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLineageGroupPolicyResponse(data, context); + contents = _json(data); const response: GetLineageGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13460,10 +13100,9 @@ const de_GetLineageGroupPolicyCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13481,12 +13120,12 @@ export const de_GetModelPackageGroupPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetModelPackageGroupPolicyOutput(data, context); + contents = _json(data); const response: GetModelPackageGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13502,10 +13141,9 @@ const de_GetModelPackageGroupPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13522,12 +13160,12 @@ export const de_GetSagemakerServicecatalogPortfolioStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSagemakerServicecatalogPortfolioStatusOutput(data, context); + contents = _json(data); const response: GetSagemakerServicecatalogPortfolioStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13543,10 +13181,9 @@ const de_GetSagemakerServicecatalogPortfolioStatusCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13563,12 +13200,12 @@ export const de_GetSearchSuggestionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSearchSuggestionsResponse(data, context); + contents = _json(data); const response: GetSearchSuggestionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13584,10 +13221,9 @@ const de_GetSearchSuggestionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13604,12 +13240,12 @@ export const de_ImportHubContentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportHubContentResponse(data, context); + contents = _json(data); const response: ImportHubContentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13636,10 +13272,9 @@ const de_ImportHubContentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13662,7 +13297,7 @@ export const de_ListActionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13683,10 +13318,9 @@ const de_ListActionsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13709,7 +13343,7 @@ export const de_ListAlgorithmsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13725,10 +13359,9 @@ const de_ListAlgorithmsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13745,12 +13378,12 @@ export const de_ListAliasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAliasesResponse(data, context); + contents = _json(data); const response: ListAliasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13771,10 +13404,9 @@ const de_ListAliasesCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13797,7 +13429,7 @@ export const de_ListAppImageConfigsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13813,10 +13445,9 @@ const de_ListAppImageConfigsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13838,7 +13469,7 @@ export const de_ListAppsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13854,10 +13485,9 @@ const de_ListAppsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -13879,7 +13509,7 @@ export const de_ListArtifactsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13900,10 +13530,9 @@ const de_ListArtifactsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13926,7 +13555,7 @@ export const de_ListAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13947,10 +13576,9 @@ const de_ListAssociationsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -13973,7 +13601,7 @@ export const de_ListAutoMLJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -13989,10 +13617,9 @@ const de_ListAutoMLJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14014,7 +13641,7 @@ export const de_ListCandidatesForAutoMLJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14035,10 +13662,9 @@ const de_ListCandidatesForAutoMLJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14061,7 +13687,7 @@ export const de_ListCodeRepositoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14077,10 +13703,9 @@ const de_ListCodeRepositoriesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14102,7 +13727,7 @@ export const de_ListCompilationJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14118,10 +13743,9 @@ const de_ListCompilationJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14143,7 +13767,7 @@ export const de_ListContextsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14164,10 +13788,9 @@ const de_ListContextsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14190,7 +13813,7 @@ export const de_ListDataQualityJobDefinitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14206,10 +13829,9 @@ const de_ListDataQualityJobDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14231,7 +13853,7 @@ export const de_ListDeviceFleetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14247,10 +13869,9 @@ const de_ListDeviceFleetsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14272,7 +13893,7 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14288,10 +13909,9 @@ const de_ListDevicesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14313,7 +13933,7 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14329,10 +13949,9 @@ const de_ListDomainsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14354,7 +13973,7 @@ export const de_ListEdgeDeploymentPlansCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14370,10 +13989,9 @@ const de_ListEdgeDeploymentPlansCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14395,7 +14013,7 @@ export const de_ListEdgePackagingJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14411,10 +14029,9 @@ const de_ListEdgePackagingJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14436,7 +14053,7 @@ export const de_ListEndpointConfigsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14452,10 +14069,9 @@ const de_ListEndpointConfigsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14477,7 +14093,7 @@ export const de_ListEndpointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14493,10 +14109,9 @@ const de_ListEndpointsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14518,7 +14133,7 @@ export const de_ListExperimentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14534,10 +14149,9 @@ const de_ListExperimentsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14559,7 +14173,7 @@ export const de_ListFeatureGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14575,10 +14189,9 @@ const de_ListFeatureGroupsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14600,7 +14213,7 @@ export const de_ListFlowDefinitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14616,10 +14229,9 @@ const de_ListFlowDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14641,7 +14253,7 @@ export const de_ListHubContentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14662,10 +14274,9 @@ const de_ListHubContentsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14688,7 +14299,7 @@ export const de_ListHubContentVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14709,10 +14320,9 @@ const de_ListHubContentVersionsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14735,7 +14345,7 @@ export const de_ListHubsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14751,10 +14361,9 @@ const de_ListHubsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14776,7 +14385,7 @@ export const de_ListHumanTaskUisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14792,10 +14401,9 @@ const de_ListHumanTaskUisCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14817,7 +14425,7 @@ export const de_ListHyperParameterTuningJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14833,10 +14441,9 @@ const de_ListHyperParameterTuningJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14858,7 +14465,7 @@ export const de_ListImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14874,10 +14481,9 @@ const de_ListImagesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14899,7 +14505,7 @@ export const de_ListImageVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14920,10 +14526,9 @@ const de_ListImageVersionsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -14946,7 +14551,7 @@ export const de_ListInferenceExperimentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -14962,10 +14567,9 @@ const de_ListInferenceExperimentsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -14987,7 +14591,7 @@ export const de_ListInferenceRecommendationsJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15003,10 +14607,9 @@ const de_ListInferenceRecommendationsJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15028,7 +14631,7 @@ export const de_ListInferenceRecommendationsJobStepsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15049,10 +14652,9 @@ const de_ListInferenceRecommendationsJobStepsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15075,7 +14677,7 @@ export const de_ListLabelingJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15091,10 +14693,9 @@ const de_ListLabelingJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15116,7 +14717,7 @@ export const de_ListLabelingJobsForWorkteamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15137,10 +14738,9 @@ const de_ListLabelingJobsForWorkteamCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15163,7 +14763,7 @@ export const de_ListLineageGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15179,10 +14779,9 @@ const de_ListLineageGroupsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15204,7 +14803,7 @@ export const de_ListModelBiasJobDefinitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15220,10 +14819,9 @@ const de_ListModelBiasJobDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15245,7 +14843,7 @@ export const de_ListModelCardExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15261,10 +14859,9 @@ const de_ListModelCardExportJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15286,7 +14883,7 @@ export const de_ListModelCardsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15302,10 +14899,9 @@ const de_ListModelCardsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15327,7 +14923,7 @@ export const de_ListModelCardVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15348,10 +14944,9 @@ const de_ListModelCardVersionsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15374,7 +14969,7 @@ export const de_ListModelExplainabilityJobDefinitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15390,10 +14985,9 @@ const de_ListModelExplainabilityJobDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15410,12 +15004,12 @@ export const de_ListModelMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListModelMetadataResponse(data, context); + contents = _json(data); const response: ListModelMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15431,10 +15025,9 @@ const de_ListModelMetadataCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15456,7 +15049,7 @@ export const de_ListModelPackageGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15472,10 +15065,9 @@ const de_ListModelPackageGroupsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15497,7 +15089,7 @@ export const de_ListModelPackagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15513,10 +15105,9 @@ const de_ListModelPackagesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15538,7 +15129,7 @@ export const de_ListModelQualityJobDefinitionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15554,10 +15145,9 @@ const de_ListModelQualityJobDefinitionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15579,7 +15169,7 @@ export const de_ListModelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15595,10 +15185,9 @@ const de_ListModelsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15620,7 +15209,7 @@ export const de_ListMonitoringAlertHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15641,10 +15230,9 @@ const de_ListMonitoringAlertHistoryCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15667,7 +15255,7 @@ export const de_ListMonitoringAlertsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15688,10 +15276,9 @@ const de_ListMonitoringAlertsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15714,7 +15301,7 @@ export const de_ListMonitoringExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15730,10 +15317,9 @@ const de_ListMonitoringExecutionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15755,7 +15341,7 @@ export const de_ListMonitoringSchedulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15771,10 +15357,9 @@ const de_ListMonitoringSchedulesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15796,7 +15381,7 @@ export const de_ListNotebookInstanceLifecycleConfigsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15812,10 +15397,9 @@ const de_ListNotebookInstanceLifecycleConfigsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15837,7 +15421,7 @@ export const de_ListNotebookInstancesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15853,10 +15437,9 @@ const de_ListNotebookInstancesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -15878,7 +15461,7 @@ export const de_ListPipelineExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15899,10 +15482,9 @@ const de_ListPipelineExecutionsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15925,7 +15507,7 @@ export const de_ListPipelineExecutionStepsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15946,10 +15528,9 @@ const de_ListPipelineExecutionStepsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -15967,12 +15548,12 @@ export const de_ListPipelineParametersForExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPipelineParametersForExecutionResponse(data, context); + contents = _json(data); const response: ListPipelineParametersForExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -15993,10 +15574,9 @@ const de_ListPipelineParametersForExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16019,7 +15599,7 @@ export const de_ListPipelinesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16035,10 +15615,9 @@ const de_ListPipelinesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16060,7 +15639,7 @@ export const de_ListProcessingJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16076,10 +15655,9 @@ const de_ListProcessingJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16101,7 +15679,7 @@ export const de_ListProjectsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16117,10 +15695,9 @@ const de_ListProjectsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16142,7 +15719,7 @@ export const de_ListSpacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16158,10 +15735,9 @@ const de_ListSpacesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16183,7 +15759,7 @@ export const de_ListStageDevicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16199,10 +15775,9 @@ const de_ListStageDevicesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16224,7 +15799,7 @@ export const de_ListStudioLifecycleConfigsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16245,10 +15820,9 @@ const de_ListStudioLifecycleConfigsCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16266,12 +15840,12 @@ export const de_ListSubscribedWorkteamsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSubscribedWorkteamsResponse(data, context); + contents = _json(data); const response: ListSubscribedWorkteamsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16287,10 +15861,9 @@ const de_ListSubscribedWorkteamsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16307,12 +15880,12 @@ export const de_ListTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsOutput(data, context); + contents = _json(data); const response: ListTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16328,10 +15901,9 @@ const de_ListTagsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16353,7 +15925,7 @@ export const de_ListTrainingJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16369,10 +15941,9 @@ const de_ListTrainingJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16394,7 +15965,7 @@ export const de_ListTrainingJobsForHyperParameterTuningJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16415,10 +15986,9 @@ const de_ListTrainingJobsForHyperParameterTuningJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16441,7 +16011,7 @@ export const de_ListTransformJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16457,10 +16027,9 @@ const de_ListTransformJobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16482,7 +16051,7 @@ export const de_ListTrialComponentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16503,10 +16072,9 @@ const de_ListTrialComponentsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16529,7 +16097,7 @@ export const de_ListTrialsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16550,10 +16118,9 @@ const de_ListTrialsCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16576,7 +16143,7 @@ export const de_ListUserProfilesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16592,10 +16159,9 @@ const de_ListUserProfilesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16617,7 +16183,7 @@ export const de_ListWorkforcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16633,10 +16199,9 @@ const de_ListWorkforcesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16658,7 +16223,7 @@ export const de_ListWorkteamsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16674,10 +16239,9 @@ const de_ListWorkteamsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16694,12 +16258,12 @@ export const de_PutModelPackageGroupPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutModelPackageGroupPolicyOutput(data, context); + contents = _json(data); const response: PutModelPackageGroupPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16715,10 +16279,9 @@ const de_PutModelPackageGroupPolicyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16735,12 +16298,12 @@ export const de_QueryLineageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_QueryLineageResponse(data, context); + contents = _json(data); const response: QueryLineageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16761,10 +16324,9 @@ const de_QueryLineageCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16784,7 +16346,7 @@ export const de_RegisterDevicesCommand = async ( const response: RegisterDevicesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -16805,10 +16367,9 @@ const de_RegisterDevicesCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16826,12 +16387,12 @@ export const de_RenderUiTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RenderUiTemplateResponse(data, context); + contents = _json(data); const response: RenderUiTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16852,10 +16413,9 @@ const de_RenderUiTemplateCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16873,12 +16433,12 @@ export const de_RetryPipelineExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RetryPipelineExecutionResponse(data, context); + contents = _json(data); const response: RetryPipelineExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16905,10 +16465,9 @@ const de_RetryPipelineExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -16931,7 +16490,7 @@ export const de_SearchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16944,10 +16503,9 @@ const de_SearchCommandError = async (output: __HttpResponse, context: __SerdeCon }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -16964,12 +16522,12 @@ export const de_SendPipelineExecutionStepFailureCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendPipelineExecutionStepFailureResponse(data, context); + contents = _json(data); const response: SendPipelineExecutionStepFailureCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -16993,10 +16551,9 @@ const de_SendPipelineExecutionStepFailureCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17014,12 +16571,12 @@ export const de_SendPipelineExecutionStepSuccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendPipelineExecutionStepSuccessResponse(data, context); + contents = _json(data); const response: SendPipelineExecutionStepSuccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17043,10 +16600,9 @@ const de_SendPipelineExecutionStepSuccessCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17066,7 +16622,7 @@ export const de_StartEdgeDeploymentStageCommand = async ( const response: StartEdgeDeploymentStageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17082,10 +16638,9 @@ const de_StartEdgeDeploymentStageCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17102,12 +16657,12 @@ export const de_StartInferenceExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartInferenceExperimentResponse(data, context); + contents = _json(data); const response: StartInferenceExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17131,10 +16686,9 @@ const de_StartInferenceExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17154,7 +16708,7 @@ export const de_StartMonitoringScheduleCommand = async ( const response: StartMonitoringScheduleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17175,10 +16729,9 @@ const de_StartMonitoringScheduleCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17198,7 +16751,7 @@ export const de_StartNotebookInstanceCommand = async ( const response: StartNotebookInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17219,10 +16772,9 @@ const de_StartNotebookInstanceCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17240,12 +16792,12 @@ export const de_StartPipelineExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartPipelineExecutionResponse(data, context); + contents = _json(data); const response: StartPipelineExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17269,10 +16821,9 @@ const de_StartPipelineExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17292,7 +16843,7 @@ export const de_StopAutoMLJobCommand = async ( const response: StopAutoMLJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17313,10 +16864,9 @@ const de_StopAutoMLJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17336,7 +16886,7 @@ export const de_StopCompilationJobCommand = async ( const response: StopCompilationJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17357,10 +16907,9 @@ const de_StopCompilationJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17380,7 +16929,7 @@ export const de_StopEdgeDeploymentStageCommand = async ( const response: StopEdgeDeploymentStageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17396,10 +16945,9 @@ const de_StopEdgeDeploymentStageCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17418,7 +16966,7 @@ export const de_StopEdgePackagingJobCommand = async ( const response: StopEdgePackagingJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17434,10 +16982,9 @@ const de_StopEdgePackagingJobCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17456,7 +17003,7 @@ export const de_StopHyperParameterTuningJobCommand = async ( const response: StopHyperParameterTuningJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17477,10 +17024,9 @@ const de_StopHyperParameterTuningJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17498,12 +17044,12 @@ export const de_StopInferenceExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopInferenceExperimentResponse(data, context); + contents = _json(data); const response: StopInferenceExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17527,10 +17073,9 @@ const de_StopInferenceExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17550,7 +17095,7 @@ export const de_StopInferenceRecommendationsJobCommand = async ( const response: StopInferenceRecommendationsJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17571,10 +17116,9 @@ const de_StopInferenceRecommendationsJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17594,7 +17138,7 @@ export const de_StopLabelingJobCommand = async ( const response: StopLabelingJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17615,10 +17159,9 @@ const de_StopLabelingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17638,7 +17181,7 @@ export const de_StopMonitoringScheduleCommand = async ( const response: StopMonitoringScheduleCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17659,10 +17202,9 @@ const de_StopMonitoringScheduleCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17682,7 +17224,7 @@ export const de_StopNotebookInstanceCommand = async ( const response: StopNotebookInstanceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17698,10 +17240,9 @@ const de_StopNotebookInstanceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -17718,12 +17259,12 @@ export const de_StopPipelineExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopPipelineExecutionResponse(data, context); + contents = _json(data); const response: StopPipelineExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17744,10 +17285,9 @@ const de_StopPipelineExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17767,7 +17307,7 @@ export const de_StopProcessingJobCommand = async ( const response: StopProcessingJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17788,10 +17328,9 @@ const de_StopProcessingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17811,7 +17350,7 @@ export const de_StopTrainingJobCommand = async ( const response: StopTrainingJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17832,10 +17371,9 @@ const de_StopTrainingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17855,7 +17393,7 @@ export const de_StopTransformJobCommand = async ( const response: StopTransformJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -17876,10 +17414,9 @@ const de_StopTransformJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17897,12 +17434,12 @@ export const de_UpdateActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateActionResponse(data, context); + contents = _json(data); const response: UpdateActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17926,10 +17463,9 @@ const de_UpdateActionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17947,12 +17483,12 @@ export const de_UpdateAppImageConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAppImageConfigResponse(data, context); + contents = _json(data); const response: UpdateAppImageConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -17973,10 +17509,9 @@ const de_UpdateAppImageConfigCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -17994,12 +17529,12 @@ export const de_UpdateArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateArtifactResponse(data, context); + contents = _json(data); const response: UpdateArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18023,10 +17558,9 @@ const de_UpdateArtifactCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18044,12 +17578,12 @@ export const de_UpdateCodeRepositoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCodeRepositoryOutput(data, context); + contents = _json(data); const response: UpdateCodeRepositoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18065,10 +17599,9 @@ const de_UpdateCodeRepositoryCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18085,12 +17618,12 @@ export const de_UpdateContextCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateContextResponse(data, context); + contents = _json(data); const response: UpdateContextCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18114,10 +17647,9 @@ const de_UpdateContextCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18137,7 +17669,7 @@ export const de_UpdateDeviceFleetCommand = async ( const response: UpdateDeviceFleetCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -18158,10 +17690,9 @@ const de_UpdateDeviceFleetCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18181,7 +17712,7 @@ export const de_UpdateDevicesCommand = async ( const response: UpdateDevicesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -18197,10 +17728,9 @@ const de_UpdateDevicesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18217,12 +17747,12 @@ export const de_UpdateDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDomainResponse(data, context); + contents = _json(data); const response: UpdateDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18249,10 +17779,9 @@ const de_UpdateDomainCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18270,12 +17799,12 @@ export const de_UpdateEndpointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEndpointOutput(data, context); + contents = _json(data); const response: UpdateEndpointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18296,10 +17825,9 @@ const de_UpdateEndpointCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18317,12 +17845,12 @@ export const de_UpdateEndpointWeightsAndCapacitiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEndpointWeightsAndCapacitiesOutput(data, context); + contents = _json(data); const response: UpdateEndpointWeightsAndCapacitiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18343,10 +17871,9 @@ const de_UpdateEndpointWeightsAndCapacitiesCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18364,12 +17891,12 @@ export const de_UpdateExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateExperimentResponse(data, context); + contents = _json(data); const response: UpdateExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18393,10 +17920,9 @@ const de_UpdateExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18414,12 +17940,12 @@ export const de_UpdateFeatureGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFeatureGroupResponse(data, context); + contents = _json(data); const response: UpdateFeatureGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18440,10 +17966,9 @@ const de_UpdateFeatureGroupCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18463,7 +17988,7 @@ export const de_UpdateFeatureMetadataCommand = async ( const response: UpdateFeatureMetadataCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -18484,10 +18009,9 @@ const de_UpdateFeatureMetadataCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18505,12 +18029,12 @@ export const de_UpdateHubCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHubResponse(data, context); + contents = _json(data); const response: UpdateHubCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18531,10 +18055,9 @@ const de_UpdateHubCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18552,12 +18075,12 @@ export const de_UpdateImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateImageResponse(data, context); + contents = _json(data); const response: UpdateImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18581,10 +18104,9 @@ const de_UpdateImageCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18602,12 +18124,12 @@ export const de_UpdateImageVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateImageVersionResponse(data, context); + contents = _json(data); const response: UpdateImageVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18631,10 +18153,9 @@ const de_UpdateImageVersionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18652,12 +18173,12 @@ export const de_UpdateInferenceExperimentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateInferenceExperimentResponse(data, context); + contents = _json(data); const response: UpdateInferenceExperimentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18681,10 +18202,9 @@ const de_UpdateInferenceExperimentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18702,12 +18222,12 @@ export const de_UpdateModelCardCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateModelCardResponse(data, context); + contents = _json(data); const response: UpdateModelCardCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18734,10 +18254,9 @@ const de_UpdateModelCardCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18755,12 +18274,12 @@ export const de_UpdateModelPackageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateModelPackageOutput(data, context); + contents = _json(data); const response: UpdateModelPackageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18776,10 +18295,9 @@ const de_UpdateModelPackageCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -18796,12 +18314,12 @@ export const de_UpdateMonitoringAlertCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMonitoringAlertResponse(data, context); + contents = _json(data); const response: UpdateMonitoringAlertCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18825,10 +18343,9 @@ const de_UpdateMonitoringAlertCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18846,12 +18363,12 @@ export const de_UpdateMonitoringScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMonitoringScheduleResponse(data, context); + contents = _json(data); const response: UpdateMonitoringScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18875,10 +18392,9 @@ const de_UpdateMonitoringScheduleCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18896,12 +18412,12 @@ export const de_UpdateNotebookInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNotebookInstanceOutput(data, context); + contents = _json(data); const response: UpdateNotebookInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18922,10 +18438,9 @@ const de_UpdateNotebookInstanceCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18943,12 +18458,12 @@ export const de_UpdateNotebookInstanceLifecycleConfigCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNotebookInstanceLifecycleConfigOutput(data, context); + contents = _json(data); const response: UpdateNotebookInstanceLifecycleConfigCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -18969,10 +18484,9 @@ const de_UpdateNotebookInstanceLifecycleConfigCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -18990,12 +18504,12 @@ export const de_UpdatePipelineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePipelineResponse(data, context); + contents = _json(data); const response: UpdatePipelineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19016,10 +18530,9 @@ const de_UpdatePipelineCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19037,12 +18550,12 @@ export const de_UpdatePipelineExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePipelineExecutionResponse(data, context); + contents = _json(data); const response: UpdatePipelineExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19063,10 +18576,9 @@ const de_UpdatePipelineExecutionCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19084,12 +18596,12 @@ export const de_UpdateProjectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProjectOutput(data, context); + contents = _json(data); const response: UpdateProjectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19105,10 +18617,9 @@ const de_UpdateProjectCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -19125,12 +18636,12 @@ export const de_UpdateSpaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSpaceResponse(data, context); + contents = _json(data); const response: UpdateSpaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19157,10 +18668,9 @@ const de_UpdateSpaceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19178,12 +18688,12 @@ export const de_UpdateTrainingJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTrainingJobResponse(data, context); + contents = _json(data); const response: UpdateTrainingJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19204,10 +18714,9 @@ const de_UpdateTrainingJobCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19225,12 +18734,12 @@ export const de_UpdateTrialCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTrialResponse(data, context); + contents = _json(data); const response: UpdateTrialCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19254,10 +18763,9 @@ const de_UpdateTrialCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19275,12 +18783,12 @@ export const de_UpdateTrialComponentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTrialComponentResponse(data, context); + contents = _json(data); const response: UpdateTrialComponentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19304,10 +18812,9 @@ const de_UpdateTrialComponentCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19325,12 +18832,12 @@ export const de_UpdateUserProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserProfileResponse(data, context); + contents = _json(data); const response: UpdateUserProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19357,10 +18864,9 @@ const de_UpdateUserProfileCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19383,7 +18889,7 @@ export const de_UpdateWorkforceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19404,10 +18910,9 @@ const de_UpdateWorkforceCommandError = async ( throw await de_ConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19430,7 +18935,7 @@ export const de_UpdateWorkteamCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -19451,10 +18956,9 @@ const de_UpdateWorkteamCommandError = async ( throw await de_ResourceLimitExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -19465,7 +18969,7 @@ const de_UpdateWorkteamCommandError = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -19478,7 +18982,7 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex */ const de_ResourceInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUse(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUse({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -19494,7 +18998,7 @@ const de_ResourceLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ResourceLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -19507,7 +19011,7 @@ const de_ResourceLimitExceededRes = async ( */ const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFound(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -19515,22731 +19019,8710 @@ const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActionSource - */ -const se_ActionSource = (input: ActionSource, context: __SerdeContext): any => { - return { - ...(input.SourceId != null && { SourceId: input.SourceId }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.SourceUri != null && { SourceUri: input.SourceUri }), - }; -}; +// se_ActionSource omitted. -/** - * serializeAws_json1_1AddAssociationRequest - */ -const se_AddAssociationRequest = (input: AddAssociationRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationType != null && { AssociationType: input.AssociationType }), - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - }; -}; +// se_AddAssociationRequest omitted. -/** - * serializeAws_json1_1AdditionalCodeRepositoryNamesOrUrls - */ -const se_AdditionalCodeRepositoryNamesOrUrls = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalCodeRepositoryNamesOrUrls omitted. -/** - * serializeAws_json1_1AdditionalInferenceSpecificationDefinition - */ -const se_AdditionalInferenceSpecificationDefinition = ( - input: AdditionalInferenceSpecificationDefinition, - context: __SerdeContext -): any => { - return { - ...(input.Containers != null && { Containers: se_ModelPackageContainerDefinitionList(input.Containers, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SupportedContentTypes != null && { - SupportedContentTypes: se_ContentTypes(input.SupportedContentTypes, context), - }), - ...(input.SupportedRealtimeInferenceInstanceTypes != null && { - SupportedRealtimeInferenceInstanceTypes: se_RealtimeInferenceInstanceTypes( - input.SupportedRealtimeInferenceInstanceTypes, - context - ), - }), - ...(input.SupportedResponseMIMETypes != null && { - SupportedResponseMIMETypes: se_ResponseMIMETypes(input.SupportedResponseMIMETypes, context), - }), - ...(input.SupportedTransformInstanceTypes != null && { - SupportedTransformInstanceTypes: se_TransformInstanceTypes(input.SupportedTransformInstanceTypes, context), - }), - }; -}; +// se_AdditionalInferenceSpecificationDefinition omitted. -/** - * serializeAws_json1_1AdditionalInferenceSpecifications - */ -const se_AdditionalInferenceSpecifications = ( - input: AdditionalInferenceSpecificationDefinition[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AdditionalInferenceSpecificationDefinition(entry, context); - }); -}; +// se_AdditionalInferenceSpecifications omitted. -/** - * serializeAws_json1_1AddTagsInput - */ -const se_AddTagsInput = (input: AddTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AddTagsInput omitted. -/** - * serializeAws_json1_1Alarm - */ -const se_Alarm = (input: Alarm, context: __SerdeContext): any => { - return { - ...(input.AlarmName != null && { AlarmName: input.AlarmName }), - }; -}; +// se_Alarm omitted. + +// se_AlarmList omitted. + +// se_AlgorithmSpecification omitted. + +// se_AlgorithmValidationProfile omitted. + +// se_AlgorithmValidationProfiles omitted. + +// se_AlgorithmValidationSpecification omitted. + +// se_AnnotationConsolidationConfig omitted. + +// se_AppSpecification omitted. + +// se_ArtifactSource omitted. + +// se_ArtifactSourceType omitted. + +// se_ArtifactSourceTypes omitted. + +// se_AssociateTrialComponentRequest omitted. + +// se_AsyncInferenceClientConfig omitted. + +// se_AsyncInferenceConfig omitted. + +// se_AsyncInferenceNotificationConfig omitted. + +// se_AsyncInferenceOutputConfig omitted. + +// se_AsyncNotificationTopicTypeList omitted. + +// se_AthenaDatasetDefinition omitted. + +// se_AttributeNames omitted. + +// se_AutoMLAlgorithmConfig omitted. + +// se_AutoMLAlgorithms omitted. + +// se_AutoMLAlgorithmsConfig omitted. + +// se_AutoMLCandidateGenerationConfig omitted. + +// se_AutoMLChannel omitted. + +// se_AutoMLDataSource omitted. /** - * serializeAws_json1_1AlarmList + * serializeAws_json1_1AutoMLDataSplitConfig */ -const se_AlarmList = (input: Alarm[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Alarm(entry, context); - }); +const se_AutoMLDataSplitConfig = (input: AutoMLDataSplitConfig, context: __SerdeContext): any => { + return take(input, { + ValidationFraction: __serializeFloat, + }); }; +// se_AutoMLInputDataConfig omitted. + +// se_AutoMLJobChannel omitted. + +// se_AutoMLJobCompletionCriteria omitted. + /** - * serializeAws_json1_1AlgorithmSpecification + * serializeAws_json1_1AutoMLJobConfig */ -const se_AlgorithmSpecification = (input: AlgorithmSpecification, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.ContainerArguments != null && { - ContainerArguments: se_TrainingContainerArguments(input.ContainerArguments, context), - }), - ...(input.ContainerEntrypoint != null && { - ContainerEntrypoint: se_TrainingContainerEntrypoint(input.ContainerEntrypoint, context), - }), - ...(input.EnableSageMakerMetricsTimeSeries != null && { - EnableSageMakerMetricsTimeSeries: input.EnableSageMakerMetricsTimeSeries, - }), - ...(input.MetricDefinitions != null && { - MetricDefinitions: se_MetricDefinitionList(input.MetricDefinitions, context), - }), - ...(input.TrainingImage != null && { TrainingImage: input.TrainingImage }), - ...(input.TrainingImageConfig != null && { - TrainingImageConfig: se_TrainingImageConfig(input.TrainingImageConfig, context), - }), - ...(input.TrainingInputMode != null && { TrainingInputMode: input.TrainingInputMode }), - }; -}; - -/** - * serializeAws_json1_1AlgorithmValidationProfile - */ -const se_AlgorithmValidationProfile = (input: AlgorithmValidationProfile, context: __SerdeContext): any => { - return { - ...(input.ProfileName != null && { ProfileName: input.ProfileName }), - ...(input.TrainingJobDefinition != null && { - TrainingJobDefinition: se_TrainingJobDefinition(input.TrainingJobDefinition, context), - }), - ...(input.TransformJobDefinition != null && { - TransformJobDefinition: se_TransformJobDefinition(input.TransformJobDefinition, context), - }), - }; +const se_AutoMLJobConfig = (input: AutoMLJobConfig, context: __SerdeContext): any => { + return take(input, { + CandidateGenerationConfig: _json, + CompletionCriteria: _json, + DataSplitConfig: (_) => se_AutoMLDataSplitConfig(_, context), + Mode: [], + SecurityConfig: _json, + }); }; +// se_AutoMLJobInputDataConfig omitted. + +// se_AutoMLJobObjective omitted. + +// se_AutoMLOutputDataConfig omitted. + +// se_AutoMLProblemTypeConfig omitted. + +// se_AutoMLS3DataSource omitted. + +// se_AutoMLSecurityConfig omitted. + +// se_AutoRollbackConfig omitted. + +// se_BatchDataCaptureConfig omitted. + +// se_BatchDescribeModelPackageInput omitted. + /** - * serializeAws_json1_1AlgorithmValidationProfiles + * serializeAws_json1_1BatchTransformInput */ -const se_AlgorithmValidationProfiles = (input: AlgorithmValidationProfile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AlgorithmValidationProfile(entry, context); - }); +const se_BatchTransformInput = (input: BatchTransformInput, context: __SerdeContext): any => { + return take(input, { + DataCapturedDestinationS3Uri: [], + DatasetFormat: _json, + EndTimeOffset: [], + FeaturesAttribute: [], + InferenceAttribute: [], + LocalPath: [], + ProbabilityAttribute: [], + ProbabilityThresholdAttribute: __serializeFloat, + S3DataDistributionType: [], + S3InputMode: [], + StartTimeOffset: [], + }); }; +// se_BestObjectiveNotImproving omitted. + +// se_Bias omitted. + +// se_BlueGreenUpdatePolicy omitted. + +// se_CanvasAppSettings omitted. + +// se_CapacitySize omitted. + +// se_CaptureContentTypeHeader omitted. + +// se_CaptureOption omitted. + +// se_CaptureOptionList omitted. + +// se_CategoricalParameter omitted. + +// se_CategoricalParameterRange omitted. + +// se_CategoricalParameterRanges omitted. + +// se_CategoricalParameterRangeSpecification omitted. + +// se_CategoricalParameterRangeValues omitted. + +// se_CategoricalParameters omitted. + +// se_Channel omitted. + +// se_ChannelSpecification omitted. + +// se_ChannelSpecifications omitted. + +// se_CheckpointConfig omitted. + +// se_Cidrs omitted. + +// se_ClarifyExplainerConfig omitted. + +// se_ClarifyFeatureHeaders omitted. + +// se_ClarifyFeatureTypes omitted. + +// se_ClarifyInferenceConfig omitted. + +// se_ClarifyLabelHeaders omitted. + +// se_ClarifyShapBaselineConfig omitted. + +// se_ClarifyShapConfig omitted. + +// se_ClarifyTextConfig omitted. + +// se_CodeRepositories omitted. + +// se_CodeRepository omitted. + +// se_CognitoConfig omitted. + +// se_CognitoMemberDefinition omitted. + +// se_CollectionConfiguration omitted. + +// se_CollectionConfigurations omitted. + +// se_CollectionParameters omitted. + +// se_CompressionTypes omitted. + +// se_ContainerArguments omitted. + +// se_ContainerDefinition omitted. + +// se_ContainerDefinitionList omitted. + +// se_ContainerEntrypoint omitted. + +// se_ContentClassifiers omitted. + +// se_ContentTypes omitted. + +// se_ContextSource omitted. + +// se_ContinuousParameterRange omitted. + +// se_ContinuousParameterRanges omitted. + +// se_ContinuousParameterRangeSpecification omitted. + +// se_ConvergenceDetected omitted. + +// se_CreateActionRequest omitted. + +// se_CreateAlgorithmInput omitted. + +// se_CreateAppImageConfigRequest omitted. + +// se_CreateAppRequest omitted. + +// se_CreateArtifactRequest omitted. + /** - * serializeAws_json1_1AlgorithmValidationSpecification + * serializeAws_json1_1CreateAutoMLJobRequest */ -const se_AlgorithmValidationSpecification = (input: AlgorithmValidationSpecification, context: __SerdeContext): any => { - return { - ...(input.ValidationProfiles != null && { - ValidationProfiles: se_AlgorithmValidationProfiles(input.ValidationProfiles, context), - }), - ...(input.ValidationRole != null && { ValidationRole: input.ValidationRole }), - }; +const se_CreateAutoMLJobRequest = (input: CreateAutoMLJobRequest, context: __SerdeContext): any => { + return take(input, { + AutoMLJobConfig: (_) => se_AutoMLJobConfig(_, context), + AutoMLJobName: [], + AutoMLJobObjective: _json, + GenerateCandidateDefinitionsOnly: [], + InputDataConfig: _json, + ModelDeployConfig: _json, + OutputDataConfig: _json, + ProblemType: [], + RoleArn: [], + Tags: _json, + }); }; /** - * serializeAws_json1_1AnnotationConsolidationConfig + * serializeAws_json1_1CreateAutoMLJobV2Request */ -const se_AnnotationConsolidationConfig = (input: AnnotationConsolidationConfig, context: __SerdeContext): any => { - return { - ...(input.AnnotationConsolidationLambdaArn != null && { - AnnotationConsolidationLambdaArn: input.AnnotationConsolidationLambdaArn, - }), - }; +const se_CreateAutoMLJobV2Request = (input: CreateAutoMLJobV2Request, context: __SerdeContext): any => { + return take(input, { + AutoMLJobInputDataConfig: _json, + AutoMLJobName: [], + AutoMLJobObjective: _json, + AutoMLProblemTypeConfig: _json, + DataSplitConfig: (_) => se_AutoMLDataSplitConfig(_, context), + ModelDeployConfig: _json, + OutputDataConfig: _json, + RoleArn: [], + SecurityConfig: _json, + Tags: _json, + }); }; +// se_CreateCodeRepositoryInput omitted. + +// se_CreateCompilationJobRequest omitted. + +// se_CreateContextRequest omitted. + /** - * serializeAws_json1_1AppSpecification + * serializeAws_json1_1CreateDataQualityJobDefinitionRequest */ -const se_AppSpecification = (input: AppSpecification, context: __SerdeContext): any => { - return { - ...(input.ContainerArguments != null && { - ContainerArguments: se_ContainerArguments(input.ContainerArguments, context), - }), - ...(input.ContainerEntrypoint != null && { - ContainerEntrypoint: se_ContainerEntrypoint(input.ContainerEntrypoint, context), - }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - }; +const se_CreateDataQualityJobDefinitionRequest = ( + input: CreateDataQualityJobDefinitionRequest, + context: __SerdeContext +): any => { + return take(input, { + DataQualityAppSpecification: _json, + DataQualityBaselineConfig: _json, + DataQualityJobInput: (_) => se_DataQualityJobInput(_, context), + DataQualityJobOutputConfig: _json, + JobDefinitionName: [], + JobResources: _json, + NetworkConfig: _json, + RoleArn: [], + StoppingCondition: _json, + Tags: _json, + }); }; +// se_CreateDeviceFleetRequest omitted. + +// se_CreateDomainRequest omitted. + +// se_CreateEdgeDeploymentPlanRequest omitted. + +// se_CreateEdgeDeploymentStageRequest omitted. + +// se_CreateEdgePackagingJobRequest omitted. + /** - * serializeAws_json1_1ArtifactSource + * serializeAws_json1_1CreateEndpointConfigInput */ -const se_ArtifactSource = (input: ArtifactSource, context: __SerdeContext): any => { - return { - ...(input.SourceTypes != null && { SourceTypes: se_ArtifactSourceTypes(input.SourceTypes, context) }), - ...(input.SourceUri != null && { SourceUri: input.SourceUri }), - }; +const se_CreateEndpointConfigInput = (input: CreateEndpointConfigInput, context: __SerdeContext): any => { + return take(input, { + AsyncInferenceConfig: _json, + DataCaptureConfig: _json, + EndpointConfigName: [], + ExplainerConfig: _json, + KmsKeyId: [], + ProductionVariants: (_) => se_ProductionVariantList(_, context), + ShadowProductionVariants: (_) => se_ProductionVariantList(_, context), + Tags: _json, + }); }; +// se_CreateEndpointInput omitted. + +// se_CreateExperimentRequest omitted. + +// se_CreateFeatureGroupRequest omitted. + /** - * serializeAws_json1_1ArtifactSourceType + * serializeAws_json1_1CreateFlowDefinitionRequest */ -const se_ArtifactSourceType = (input: ArtifactSourceType, context: __SerdeContext): any => { - return { - ...(input.SourceIdType != null && { SourceIdType: input.SourceIdType }), - ...(input.Value != null && { Value: input.Value }), - }; +const se_CreateFlowDefinitionRequest = (input: CreateFlowDefinitionRequest, context: __SerdeContext): any => { + return take(input, { + FlowDefinitionName: [], + HumanLoopActivationConfig: (_) => se_HumanLoopActivationConfig(_, context), + HumanLoopConfig: _json, + HumanLoopRequestSource: _json, + OutputConfig: _json, + RoleArn: [], + Tags: _json, + }); }; +// se_CreateHubRequest omitted. + +// se_CreateHumanTaskUiRequest omitted. + /** - * serializeAws_json1_1ArtifactSourceTypes + * serializeAws_json1_1CreateHyperParameterTuningJobRequest */ -const se_ArtifactSourceTypes = (input: ArtifactSourceType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ArtifactSourceType(entry, context); - }); +const se_CreateHyperParameterTuningJobRequest = ( + input: CreateHyperParameterTuningJobRequest, + context: __SerdeContext +): any => { + return take(input, { + HyperParameterTuningJobConfig: (_) => se_HyperParameterTuningJobConfig(_, context), + HyperParameterTuningJobName: [], + Tags: _json, + TrainingJobDefinition: _json, + TrainingJobDefinitions: _json, + WarmStartConfig: _json, + }); }; +// se_CreateImageRequest omitted. + /** - * serializeAws_json1_1AssociateTrialComponentRequest + * serializeAws_json1_1CreateImageVersionRequest */ -const se_AssociateTrialComponentRequest = (input: AssociateTrialComponentRequest, context: __SerdeContext): any => { - return { - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; +const se_CreateImageVersionRequest = (input: CreateImageVersionRequest, context: __SerdeContext): any => { + return take(input, { + Aliases: _json, + BaseImage: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Horovod: [], + ImageName: [], + JobType: [], + MLFramework: [], + Processor: [], + ProgrammingLang: [], + ReleaseNotes: [], + VendorGuidance: [], + }); }; /** - * serializeAws_json1_1AsyncInferenceClientConfig + * serializeAws_json1_1CreateInferenceExperimentRequest */ -const se_AsyncInferenceClientConfig = (input: AsyncInferenceClientConfig, context: __SerdeContext): any => { - return { - ...(input.MaxConcurrentInvocationsPerInstance != null && { - MaxConcurrentInvocationsPerInstance: input.MaxConcurrentInvocationsPerInstance, - }), - }; +const se_CreateInferenceExperimentRequest = (input: CreateInferenceExperimentRequest, context: __SerdeContext): any => { + return take(input, { + DataStorageConfig: _json, + Description: [], + EndpointName: [], + KmsKey: [], + ModelVariants: _json, + Name: [], + RoleArn: [], + Schedule: (_) => se_InferenceExperimentSchedule(_, context), + ShadowModeConfig: _json, + Tags: _json, + Type: [], + }); }; +// se_CreateInferenceRecommendationsJobRequest omitted. + +// se_CreateLabelingJobRequest omitted. + /** - * serializeAws_json1_1AsyncInferenceConfig + * serializeAws_json1_1CreateModelBiasJobDefinitionRequest */ -const se_AsyncInferenceConfig = (input: AsyncInferenceConfig, context: __SerdeContext): any => { - return { - ...(input.ClientConfig != null && { ClientConfig: se_AsyncInferenceClientConfig(input.ClientConfig, context) }), - ...(input.OutputConfig != null && { OutputConfig: se_AsyncInferenceOutputConfig(input.OutputConfig, context) }), - }; +const se_CreateModelBiasJobDefinitionRequest = ( + input: CreateModelBiasJobDefinitionRequest, + context: __SerdeContext +): any => { + return take(input, { + JobDefinitionName: [], + JobResources: _json, + ModelBiasAppSpecification: _json, + ModelBiasBaselineConfig: _json, + ModelBiasJobInput: (_) => se_ModelBiasJobInput(_, context), + ModelBiasJobOutputConfig: _json, + NetworkConfig: _json, + RoleArn: [], + StoppingCondition: _json, + Tags: _json, + }); }; +// se_CreateModelCardExportJobRequest omitted. + +// se_CreateModelCardRequest omitted. + /** - * serializeAws_json1_1AsyncInferenceNotificationConfig + * serializeAws_json1_1CreateModelExplainabilityJobDefinitionRequest */ -const se_AsyncInferenceNotificationConfig = (input: AsyncInferenceNotificationConfig, context: __SerdeContext): any => { - return { - ...(input.ErrorTopic != null && { ErrorTopic: input.ErrorTopic }), - ...(input.IncludeInferenceResponseIn != null && { - IncludeInferenceResponseIn: se_AsyncNotificationTopicTypeList(input.IncludeInferenceResponseIn, context), - }), - ...(input.SuccessTopic != null && { SuccessTopic: input.SuccessTopic }), - }; +const se_CreateModelExplainabilityJobDefinitionRequest = ( + input: CreateModelExplainabilityJobDefinitionRequest, + context: __SerdeContext +): any => { + return take(input, { + JobDefinitionName: [], + JobResources: _json, + ModelExplainabilityAppSpecification: _json, + ModelExplainabilityBaselineConfig: _json, + ModelExplainabilityJobInput: (_) => se_ModelExplainabilityJobInput(_, context), + ModelExplainabilityJobOutputConfig: _json, + NetworkConfig: _json, + RoleArn: [], + StoppingCondition: _json, + Tags: _json, + }); }; +// se_CreateModelInput omitted. + +// se_CreateModelPackageGroupInput omitted. + /** - * serializeAws_json1_1AsyncInferenceOutputConfig + * serializeAws_json1_1CreateModelPackageInput */ -const se_AsyncInferenceOutputConfig = (input: AsyncInferenceOutputConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.NotificationConfig != null && { - NotificationConfig: se_AsyncInferenceNotificationConfig(input.NotificationConfig, context), - }), - ...(input.S3FailurePath != null && { S3FailurePath: input.S3FailurePath }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; +const se_CreateModelPackageInput = (input: CreateModelPackageInput, context: __SerdeContext): any => { + return take(input, { + AdditionalInferenceSpecifications: _json, + CertifyForMarketplace: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CustomerMetadataProperties: _json, + Domain: [], + DriftCheckBaselines: _json, + InferenceSpecification: _json, + MetadataProperties: _json, + ModelApprovalStatus: [], + ModelMetrics: _json, + ModelPackageDescription: [], + ModelPackageGroupName: [], + ModelPackageName: [], + SamplePayloadUrl: [], + SourceAlgorithmSpecification: _json, + Tags: _json, + Task: [], + ValidationSpecification: _json, + }); }; /** - * serializeAws_json1_1AsyncNotificationTopicTypeList + * serializeAws_json1_1CreateModelQualityJobDefinitionRequest */ -const se_AsyncNotificationTopicTypeList = ( - input: (AsyncNotificationTopicTypes | string)[], +const se_CreateModelQualityJobDefinitionRequest = ( + input: CreateModelQualityJobDefinitionRequest, context: __SerdeContext ): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return take(input, { + JobDefinitionName: [], + JobResources: _json, + ModelQualityAppSpecification: _json, + ModelQualityBaselineConfig: _json, + ModelQualityJobInput: (_) => se_ModelQualityJobInput(_, context), + ModelQualityJobOutputConfig: _json, + NetworkConfig: _json, + RoleArn: [], + StoppingCondition: _json, + Tags: _json, + }); }; /** - * serializeAws_json1_1AthenaDatasetDefinition + * serializeAws_json1_1CreateMonitoringScheduleRequest */ -const se_AthenaDatasetDefinition = (input: AthenaDatasetDefinition, context: __SerdeContext): any => { - return { - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.Database != null && { Database: input.Database }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.OutputCompression != null && { OutputCompression: input.OutputCompression }), - ...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }), - ...(input.OutputS3Uri != null && { OutputS3Uri: input.OutputS3Uri }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.WorkGroup != null && { WorkGroup: input.WorkGroup }), - }; +const se_CreateMonitoringScheduleRequest = (input: CreateMonitoringScheduleRequest, context: __SerdeContext): any => { + return take(input, { + MonitoringScheduleConfig: (_) => se_MonitoringScheduleConfig(_, context), + MonitoringScheduleName: [], + Tags: _json, + }); }; +// se_CreateNotebookInstanceInput omitted. + +// se_CreateNotebookInstanceLifecycleConfigInput omitted. + /** - * serializeAws_json1_1AttributeNames + * serializeAws_json1_1CreatePipelineRequest */ -const se_AttributeNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_CreatePipelineRequest = (input: CreatePipelineRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ParallelismConfiguration: _json, + PipelineDefinition: [], + PipelineDefinitionS3Location: _json, + PipelineDescription: [], + PipelineDisplayName: [], + PipelineName: [], + RoleArn: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1AutoMLAlgorithmConfig - */ -const se_AutoMLAlgorithmConfig = (input: AutoMLAlgorithmConfig, context: __SerdeContext): any => { - return { - ...(input.AutoMLAlgorithms != null && { AutoMLAlgorithms: se_AutoMLAlgorithms(input.AutoMLAlgorithms, context) }), - }; -}; +// se_CreatePresignedDomainUrlRequest omitted. -/** - * serializeAws_json1_1AutoMLAlgorithms - */ -const se_AutoMLAlgorithms = (input: (AutoMLAlgorithm | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CreatePresignedNotebookInstanceUrlInput omitted. -/** - * serializeAws_json1_1AutoMLAlgorithmsConfig - */ -const se_AutoMLAlgorithmsConfig = (input: AutoMLAlgorithmConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AutoMLAlgorithmConfig(entry, context); - }); -}; +// se_CreateProcessingJobRequest omitted. -/** - * serializeAws_json1_1AutoMLCandidateGenerationConfig - */ -const se_AutoMLCandidateGenerationConfig = (input: AutoMLCandidateGenerationConfig, context: __SerdeContext): any => { - return { - ...(input.AlgorithmsConfig != null && { - AlgorithmsConfig: se_AutoMLAlgorithmsConfig(input.AlgorithmsConfig, context), - }), - ...(input.FeatureSpecificationS3Uri != null && { FeatureSpecificationS3Uri: input.FeatureSpecificationS3Uri }), - }; -}; +// se_CreateProjectInput omitted. -/** - * serializeAws_json1_1AutoMLChannel - */ -const se_AutoMLChannel = (input: AutoMLChannel, context: __SerdeContext): any => { - return { - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.DataSource != null && { DataSource: se_AutoMLDataSource(input.DataSource, context) }), - ...(input.TargetAttributeName != null && { TargetAttributeName: input.TargetAttributeName }), - }; -}; +// se_CreateSpaceRequest omitted. -/** - * serializeAws_json1_1AutoMLDataSource - */ -const se_AutoMLDataSource = (input: AutoMLDataSource, context: __SerdeContext): any => { - return { - ...(input.S3DataSource != null && { S3DataSource: se_AutoMLS3DataSource(input.S3DataSource, context) }), - }; -}; +// se_CreateStudioLifecycleConfigRequest omitted. -/** - * serializeAws_json1_1AutoMLDataSplitConfig - */ -const se_AutoMLDataSplitConfig = (input: AutoMLDataSplitConfig, context: __SerdeContext): any => { - return { - ...(input.ValidationFraction != null && { ValidationFraction: __serializeFloat(input.ValidationFraction) }), - }; -}; +// se_CreateTrainingJobRequest omitted. -/** - * serializeAws_json1_1AutoMLInputDataConfig - */ -const se_AutoMLInputDataConfig = (input: AutoMLChannel[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AutoMLChannel(entry, context); - }); -}; +// se_CreateTransformJobRequest omitted. /** - * serializeAws_json1_1AutoMLJobChannel + * serializeAws_json1_1CreateTrialComponentRequest */ -const se_AutoMLJobChannel = (input: AutoMLJobChannel, context: __SerdeContext): any => { - return { - ...(input.ChannelType != null && { ChannelType: input.ChannelType }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.DataSource != null && { DataSource: se_AutoMLDataSource(input.DataSource, context) }), - }; +const se_CreateTrialComponentRequest = (input: CreateTrialComponentRequest, context: __SerdeContext): any => { + return take(input, { + DisplayName: [], + EndTime: (_) => Math.round(_.getTime() / 1000), + InputArtifacts: _json, + MetadataProperties: _json, + OutputArtifacts: _json, + Parameters: (_) => se_TrialComponentParameters(_, context), + StartTime: (_) => Math.round(_.getTime() / 1000), + Status: _json, + Tags: _json, + TrialComponentName: [], + }); }; -/** - * serializeAws_json1_1AutoMLJobCompletionCriteria - */ -const se_AutoMLJobCompletionCriteria = (input: AutoMLJobCompletionCriteria, context: __SerdeContext): any => { - return { - ...(input.MaxAutoMLJobRuntimeInSeconds != null && { - MaxAutoMLJobRuntimeInSeconds: input.MaxAutoMLJobRuntimeInSeconds, - }), - ...(input.MaxCandidates != null && { MaxCandidates: input.MaxCandidates }), - ...(input.MaxRuntimePerTrainingJobInSeconds != null && { - MaxRuntimePerTrainingJobInSeconds: input.MaxRuntimePerTrainingJobInSeconds, - }), - }; -}; +// se_CreateTrialRequest omitted. -/** - * serializeAws_json1_1AutoMLJobConfig - */ -const se_AutoMLJobConfig = (input: AutoMLJobConfig, context: __SerdeContext): any => { - return { - ...(input.CandidateGenerationConfig != null && { - CandidateGenerationConfig: se_AutoMLCandidateGenerationConfig(input.CandidateGenerationConfig, context), - }), - ...(input.CompletionCriteria != null && { - CompletionCriteria: se_AutoMLJobCompletionCriteria(input.CompletionCriteria, context), - }), - ...(input.DataSplitConfig != null && { DataSplitConfig: se_AutoMLDataSplitConfig(input.DataSplitConfig, context) }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.SecurityConfig != null && { SecurityConfig: se_AutoMLSecurityConfig(input.SecurityConfig, context) }), - }; -}; +// se_CreateUserProfileRequest omitted. -/** - * serializeAws_json1_1AutoMLJobInputDataConfig - */ -const se_AutoMLJobInputDataConfig = (input: AutoMLJobChannel[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AutoMLJobChannel(entry, context); - }); -}; +// se_CreateWorkforceRequest omitted. -/** - * serializeAws_json1_1AutoMLJobObjective - */ -const se_AutoMLJobObjective = (input: AutoMLJobObjective, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - }; -}; +// se_CreateWorkteamRequest omitted. -/** - * serializeAws_json1_1AutoMLOutputDataConfig - */ -const se_AutoMLOutputDataConfig = (input: AutoMLOutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; +// se_CsvContentTypes omitted. -/** - * serializeAws_json1_1AutoMLProblemTypeConfig - */ -const se_AutoMLProblemTypeConfig = (input: AutoMLProblemTypeConfig, context: __SerdeContext): any => { - return AutoMLProblemTypeConfig.visit(input, { - ImageClassificationJobConfig: (value) => ({ - ImageClassificationJobConfig: se_ImageClassificationJobConfig(value, context), - }), - TextClassificationJobConfig: (value) => ({ - TextClassificationJobConfig: se_TextClassificationJobConfig(value, context), - }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_CustomerMetadataKeyList omitted. -/** - * serializeAws_json1_1AutoMLS3DataSource - */ -const se_AutoMLS3DataSource = (input: AutoMLS3DataSource, context: __SerdeContext): any => { - return { - ...(input.S3DataType != null && { S3DataType: input.S3DataType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_CustomerMetadataMap omitted. -/** - * serializeAws_json1_1AutoMLSecurityConfig - */ -const se_AutoMLSecurityConfig = (input: AutoMLSecurityConfig, context: __SerdeContext): any => { - return { - ...(input.EnableInterContainerTrafficEncryption != null && { - EnableInterContainerTrafficEncryption: input.EnableInterContainerTrafficEncryption, - }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; +// se_CustomImage omitted. -/** - * serializeAws_json1_1AutoRollbackConfig - */ -const se_AutoRollbackConfig = (input: AutoRollbackConfig, context: __SerdeContext): any => { - return { - ...(input.Alarms != null && { Alarms: se_AlarmList(input.Alarms, context) }), - }; -}; +// se_CustomImages omitted. -/** - * serializeAws_json1_1BatchDataCaptureConfig - */ -const se_BatchDataCaptureConfig = (input: BatchDataCaptureConfig, context: __SerdeContext): any => { - return { - ...(input.DestinationS3Uri != null && { DestinationS3Uri: input.DestinationS3Uri }), - ...(input.GenerateInferenceId != null && { GenerateInferenceId: input.GenerateInferenceId }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; +// se_DataCaptureConfig omitted. -/** - * serializeAws_json1_1BatchDescribeModelPackageInput - */ -const se_BatchDescribeModelPackageInput = (input: BatchDescribeModelPackageInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageArnList != null && { - ModelPackageArnList: se_ModelPackageArnList(input.ModelPackageArnList, context), - }), - }; -}; +// se_DataCatalogConfig omitted. -/** - * serializeAws_json1_1BatchTransformInput - */ -const se_BatchTransformInput = (input: BatchTransformInput, context: __SerdeContext): any => { - return { - ...(input.DataCapturedDestinationS3Uri != null && { - DataCapturedDestinationS3Uri: input.DataCapturedDestinationS3Uri, - }), - ...(input.DatasetFormat != null && { DatasetFormat: se_MonitoringDatasetFormat(input.DatasetFormat, context) }), - ...(input.EndTimeOffset != null && { EndTimeOffset: input.EndTimeOffset }), - ...(input.FeaturesAttribute != null && { FeaturesAttribute: input.FeaturesAttribute }), - ...(input.InferenceAttribute != null && { InferenceAttribute: input.InferenceAttribute }), - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.ProbabilityAttribute != null && { ProbabilityAttribute: input.ProbabilityAttribute }), - ...(input.ProbabilityThresholdAttribute != null && { - ProbabilityThresholdAttribute: __serializeFloat(input.ProbabilityThresholdAttribute), - }), - ...(input.S3DataDistributionType != null && { S3DataDistributionType: input.S3DataDistributionType }), - ...(input.S3InputMode != null && { S3InputMode: input.S3InputMode }), - ...(input.StartTimeOffset != null && { StartTimeOffset: input.StartTimeOffset }), - }; -}; +// se_DataProcessing omitted. -/** - * serializeAws_json1_1BestObjectiveNotImproving - */ -const se_BestObjectiveNotImproving = (input: BestObjectiveNotImproving, context: __SerdeContext): any => { - return { - ...(input.MaxNumberOfTrainingJobsNotImproving != null && { - MaxNumberOfTrainingJobsNotImproving: input.MaxNumberOfTrainingJobsNotImproving, - }), - }; -}; +// se_DataQualityAppSpecification omitted. -/** - * serializeAws_json1_1Bias - */ -const se_Bias = (input: Bias, context: __SerdeContext): any => { - return { - ...(input.PostTrainingReport != null && { - PostTrainingReport: se_MetricsSource(input.PostTrainingReport, context), - }), - ...(input.PreTrainingReport != null && { PreTrainingReport: se_MetricsSource(input.PreTrainingReport, context) }), - ...(input.Report != null && { Report: se_MetricsSource(input.Report, context) }), - }; -}; +// se_DataQualityBaselineConfig omitted. /** - * serializeAws_json1_1BlueGreenUpdatePolicy + * serializeAws_json1_1DataQualityJobInput */ -const se_BlueGreenUpdatePolicy = (input: BlueGreenUpdatePolicy, context: __SerdeContext): any => { - return { - ...(input.MaximumExecutionTimeoutInSeconds != null && { - MaximumExecutionTimeoutInSeconds: input.MaximumExecutionTimeoutInSeconds, - }), - ...(input.TerminationWaitInSeconds != null && { TerminationWaitInSeconds: input.TerminationWaitInSeconds }), - ...(input.TrafficRoutingConfiguration != null && { - TrafficRoutingConfiguration: se_TrafficRoutingConfig(input.TrafficRoutingConfiguration, context), - }), - }; +const se_DataQualityJobInput = (input: DataQualityJobInput, context: __SerdeContext): any => { + return take(input, { + BatchTransformInput: (_) => se_BatchTransformInput(_, context), + EndpointInput: (_) => se_EndpointInput(_, context), + }); }; -/** - * serializeAws_json1_1CanvasAppSettings - */ -const se_CanvasAppSettings = (input: CanvasAppSettings, context: __SerdeContext): any => { - return { - ...(input.TimeSeriesForecastingSettings != null && { - TimeSeriesForecastingSettings: se_TimeSeriesForecastingSettings(input.TimeSeriesForecastingSettings, context), - }), - }; -}; +// se_DatasetDefinition omitted. -/** - * serializeAws_json1_1CapacitySize - */ -const se_CapacitySize = (input: CapacitySize, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_DataSource omitted. -/** - * serializeAws_json1_1CaptureContentTypeHeader - */ -const se_CaptureContentTypeHeader = (input: CaptureContentTypeHeader, context: __SerdeContext): any => { - return { - ...(input.CsvContentTypes != null && { CsvContentTypes: se_CsvContentTypes(input.CsvContentTypes, context) }), - ...(input.JsonContentTypes != null && { JsonContentTypes: se_JsonContentTypes(input.JsonContentTypes, context) }), - }; -}; +// se_DebugHookConfig omitted. -/** - * serializeAws_json1_1CaptureOption - */ -const se_CaptureOption = (input: CaptureOption, context: __SerdeContext): any => { - return { - ...(input.CaptureMode != null && { CaptureMode: input.CaptureMode }), - }; -}; +// se_DebugRuleConfiguration omitted. -/** - * serializeAws_json1_1CaptureOptionList - */ -const se_CaptureOptionList = (input: CaptureOption[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CaptureOption(entry, context); - }); -}; +// se_DebugRuleConfigurations omitted. -/** - * serializeAws_json1_1CategoricalParameter - */ -const se_CategoricalParameter = (input: CategoricalParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: se_CategoricalParameterRangeValues(input.Value, context) }), - }; -}; +// se_DefaultSpaceSettings omitted. -/** - * serializeAws_json1_1CategoricalParameterRange - */ -const se_CategoricalParameterRange = (input: CategoricalParameterRange, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_ParameterValues(input.Values, context) }), - }; -}; +// se_DeleteActionRequest omitted. -/** - * serializeAws_json1_1CategoricalParameterRanges - */ -const se_CategoricalParameterRanges = (input: CategoricalParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CategoricalParameterRange(entry, context); - }); -}; +// se_DeleteAlgorithmInput omitted. -/** - * serializeAws_json1_1CategoricalParameterRangeSpecification - */ -const se_CategoricalParameterRangeSpecification = ( - input: CategoricalParameterRangeSpecification, - context: __SerdeContext -): any => { - return { - ...(input.Values != null && { Values: se_ParameterValues(input.Values, context) }), - }; -}; +// se_DeleteAppImageConfigRequest omitted. -/** - * serializeAws_json1_1CategoricalParameterRangeValues - */ -const se_CategoricalParameterRangeValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteAppRequest omitted. -/** - * serializeAws_json1_1CategoricalParameters - */ -const se_CategoricalParameters = (input: CategoricalParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CategoricalParameter(entry, context); - }); -}; +// se_DeleteArtifactRequest omitted. -/** - * serializeAws_json1_1Channel - */ -const se_Channel = (input: Channel, context: __SerdeContext): any => { - return { - ...(input.ChannelName != null && { ChannelName: input.ChannelName }), - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.DataSource != null && { DataSource: se_DataSource(input.DataSource, context) }), - ...(input.InputMode != null && { InputMode: input.InputMode }), - ...(input.RecordWrapperType != null && { RecordWrapperType: input.RecordWrapperType }), - ...(input.ShuffleConfig != null && { ShuffleConfig: se_ShuffleConfig(input.ShuffleConfig, context) }), - }; -}; +// se_DeleteAssociationRequest omitted. -/** - * serializeAws_json1_1ChannelSpecification - */ -const se_ChannelSpecification = (input: ChannelSpecification, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.IsRequired != null && { IsRequired: input.IsRequired }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SupportedCompressionTypes != null && { - SupportedCompressionTypes: se_CompressionTypes(input.SupportedCompressionTypes, context), - }), - ...(input.SupportedContentTypes != null && { - SupportedContentTypes: se_ContentTypes(input.SupportedContentTypes, context), - }), - ...(input.SupportedInputModes != null && { - SupportedInputModes: se_InputModes(input.SupportedInputModes, context), - }), - }; -}; +// se_DeleteCodeRepositoryInput omitted. -/** - * serializeAws_json1_1ChannelSpecifications - */ -const se_ChannelSpecifications = (input: ChannelSpecification[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ChannelSpecification(entry, context); - }); -}; +// se_DeleteContextRequest omitted. -/** - * serializeAws_json1_1CheckpointConfig - */ -const se_CheckpointConfig = (input: CheckpointConfig, context: __SerdeContext): any => { - return { - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_DeleteDataQualityJobDefinitionRequest omitted. -/** - * serializeAws_json1_1Cidrs - */ -const se_Cidrs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteDeviceFleetRequest omitted. -/** - * serializeAws_json1_1ClarifyExplainerConfig - */ -const se_ClarifyExplainerConfig = (input: ClarifyExplainerConfig, context: __SerdeContext): any => { - return { - ...(input.EnableExplanations != null && { EnableExplanations: input.EnableExplanations }), - ...(input.InferenceConfig != null && { - InferenceConfig: se_ClarifyInferenceConfig(input.InferenceConfig, context), - }), - ...(input.ShapConfig != null && { ShapConfig: se_ClarifyShapConfig(input.ShapConfig, context) }), - }; -}; +// se_DeleteDomainRequest omitted. -/** - * serializeAws_json1_1ClarifyFeatureHeaders - */ -const se_ClarifyFeatureHeaders = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteEdgeDeploymentPlanRequest omitted. -/** - * serializeAws_json1_1ClarifyFeatureTypes - */ -const se_ClarifyFeatureTypes = (input: (ClarifyFeatureType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteEdgeDeploymentStageRequest omitted. -/** - * serializeAws_json1_1ClarifyInferenceConfig - */ -const se_ClarifyInferenceConfig = (input: ClarifyInferenceConfig, context: __SerdeContext): any => { - return { - ...(input.ContentTemplate != null && { ContentTemplate: input.ContentTemplate }), - ...(input.FeatureHeaders != null && { FeatureHeaders: se_ClarifyFeatureHeaders(input.FeatureHeaders, context) }), - ...(input.FeatureTypes != null && { FeatureTypes: se_ClarifyFeatureTypes(input.FeatureTypes, context) }), - ...(input.FeaturesAttribute != null && { FeaturesAttribute: input.FeaturesAttribute }), - ...(input.LabelAttribute != null && { LabelAttribute: input.LabelAttribute }), - ...(input.LabelHeaders != null && { LabelHeaders: se_ClarifyLabelHeaders(input.LabelHeaders, context) }), - ...(input.LabelIndex != null && { LabelIndex: input.LabelIndex }), - ...(input.MaxPayloadInMB != null && { MaxPayloadInMB: input.MaxPayloadInMB }), - ...(input.MaxRecordCount != null && { MaxRecordCount: input.MaxRecordCount }), - ...(input.ProbabilityAttribute != null && { ProbabilityAttribute: input.ProbabilityAttribute }), - ...(input.ProbabilityIndex != null && { ProbabilityIndex: input.ProbabilityIndex }), - }; -}; +// se_DeleteEndpointConfigInput omitted. -/** - * serializeAws_json1_1ClarifyLabelHeaders - */ -const se_ClarifyLabelHeaders = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteEndpointInput omitted. -/** - * serializeAws_json1_1ClarifyShapBaselineConfig - */ -const se_ClarifyShapBaselineConfig = (input: ClarifyShapBaselineConfig, context: __SerdeContext): any => { - return { - ...(input.MimeType != null && { MimeType: input.MimeType }), - ...(input.ShapBaseline != null && { ShapBaseline: input.ShapBaseline }), - ...(input.ShapBaselineUri != null && { ShapBaselineUri: input.ShapBaselineUri }), - }; -}; +// se_DeleteExperimentRequest omitted. -/** - * serializeAws_json1_1ClarifyShapConfig - */ -const se_ClarifyShapConfig = (input: ClarifyShapConfig, context: __SerdeContext): any => { - return { - ...(input.NumberOfSamples != null && { NumberOfSamples: input.NumberOfSamples }), - ...(input.Seed != null && { Seed: input.Seed }), - ...(input.ShapBaselineConfig != null && { - ShapBaselineConfig: se_ClarifyShapBaselineConfig(input.ShapBaselineConfig, context), - }), - ...(input.TextConfig != null && { TextConfig: se_ClarifyTextConfig(input.TextConfig, context) }), - ...(input.UseLogit != null && { UseLogit: input.UseLogit }), - }; -}; +// se_DeleteFeatureGroupRequest omitted. -/** - * serializeAws_json1_1ClarifyTextConfig - */ -const se_ClarifyTextConfig = (input: ClarifyTextConfig, context: __SerdeContext): any => { - return { - ...(input.Granularity != null && { Granularity: input.Granularity }), - ...(input.Language != null && { Language: input.Language }), - }; -}; +// se_DeleteFlowDefinitionRequest omitted. -/** - * serializeAws_json1_1CodeRepositories - */ -const se_CodeRepositories = (input: CodeRepository[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CodeRepository(entry, context); - }); -}; +// se_DeleteHubContentRequest omitted. -/** - * serializeAws_json1_1CodeRepository - */ -const se_CodeRepository = (input: CodeRepository, context: __SerdeContext): any => { - return { - ...(input.RepositoryUrl != null && { RepositoryUrl: input.RepositoryUrl }), - }; -}; +// se_DeleteHubRequest omitted. -/** - * serializeAws_json1_1CognitoConfig - */ -const se_CognitoConfig = (input: CognitoConfig, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.UserPool != null && { UserPool: input.UserPool }), - }; -}; +// se_DeleteHumanTaskUiRequest omitted. -/** - * serializeAws_json1_1CognitoMemberDefinition - */ -const se_CognitoMemberDefinition = (input: CognitoMemberDefinition, context: __SerdeContext): any => { - return { - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.UserGroup != null && { UserGroup: input.UserGroup }), - ...(input.UserPool != null && { UserPool: input.UserPool }), - }; -}; +// se_DeleteImageRequest omitted. -/** - * serializeAws_json1_1CollectionConfiguration - */ -const se_CollectionConfiguration = (input: CollectionConfiguration, context: __SerdeContext): any => { - return { - ...(input.CollectionName != null && { CollectionName: input.CollectionName }), - ...(input.CollectionParameters != null && { - CollectionParameters: se_CollectionParameters(input.CollectionParameters, context), - }), - }; -}; +// se_DeleteImageVersionRequest omitted. -/** - * serializeAws_json1_1CollectionConfigurations - */ -const se_CollectionConfigurations = (input: CollectionConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CollectionConfiguration(entry, context); - }); -}; +// se_DeleteInferenceExperimentRequest omitted. -/** - * serializeAws_json1_1CollectionParameters - */ -const se_CollectionParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DeleteModelBiasJobDefinitionRequest omitted. -/** - * serializeAws_json1_1CompressionTypes - */ -const se_CompressionTypes = (input: (CompressionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteModelCardRequest omitted. -/** - * serializeAws_json1_1ContainerArguments - */ -const se_ContainerArguments = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteModelExplainabilityJobDefinitionRequest omitted. -/** - * serializeAws_json1_1ContainerDefinition - */ -const se_ContainerDefinition = (input: ContainerDefinition, context: __SerdeContext): any => { - return { - ...(input.ContainerHostname != null && { ContainerHostname: input.ContainerHostname }), - ...(input.Environment != null && { Environment: se_EnvironmentMap(input.Environment, context) }), - ...(input.Image != null && { Image: input.Image }), - ...(input.ImageConfig != null && { ImageConfig: se_ImageConfig(input.ImageConfig, context) }), - ...(input.InferenceSpecificationName != null && { InferenceSpecificationName: input.InferenceSpecificationName }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.ModelDataUrl != null && { ModelDataUrl: input.ModelDataUrl }), - ...(input.ModelPackageName != null && { ModelPackageName: input.ModelPackageName }), - ...(input.MultiModelConfig != null && { MultiModelConfig: se_MultiModelConfig(input.MultiModelConfig, context) }), - }; -}; +// se_DeleteModelInput omitted. -/** - * serializeAws_json1_1ContainerDefinitionList - */ -const se_ContainerDefinitionList = (input: ContainerDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContainerDefinition(entry, context); - }); -}; +// se_DeleteModelPackageGroupInput omitted. -/** - * serializeAws_json1_1ContainerEntrypoint - */ -const se_ContainerEntrypoint = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteModelPackageGroupPolicyInput omitted. -/** - * serializeAws_json1_1ContentClassifiers - */ -const se_ContentClassifiers = (input: (ContentClassifier | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteModelPackageInput omitted. -/** - * serializeAws_json1_1ContentTypes - */ -const se_ContentTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeleteModelQualityJobDefinitionRequest omitted. -/** - * serializeAws_json1_1ContextSource - */ -const se_ContextSource = (input: ContextSource, context: __SerdeContext): any => { - return { - ...(input.SourceId != null && { SourceId: input.SourceId }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.SourceUri != null && { SourceUri: input.SourceUri }), - }; -}; +// se_DeleteMonitoringScheduleRequest omitted. -/** - * serializeAws_json1_1ContinuousParameterRange - */ -const se_ContinuousParameterRange = (input: ContinuousParameterRange, context: __SerdeContext): any => { - return { - ...(input.MaxValue != null && { MaxValue: input.MaxValue }), - ...(input.MinValue != null && { MinValue: input.MinValue }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ScalingType != null && { ScalingType: input.ScalingType }), - }; -}; +// se_DeleteNotebookInstanceInput omitted. -/** - * serializeAws_json1_1ContinuousParameterRanges - */ -const se_ContinuousParameterRanges = (input: ContinuousParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ContinuousParameterRange(entry, context); - }); -}; +// se_DeleteNotebookInstanceLifecycleConfigInput omitted. /** - * serializeAws_json1_1ContinuousParameterRangeSpecification + * serializeAws_json1_1DeletePipelineRequest */ -const se_ContinuousParameterRangeSpecification = ( - input: ContinuousParameterRangeSpecification, - context: __SerdeContext -): any => { - return { - ...(input.MaxValue != null && { MaxValue: input.MaxValue }), - ...(input.MinValue != null && { MinValue: input.MinValue }), - }; +const se_DeletePipelineRequest = (input: DeletePipelineRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + PipelineName: [], + }); }; -/** - * serializeAws_json1_1ConvergenceDetected - */ -const se_ConvergenceDetected = (input: ConvergenceDetected, context: __SerdeContext): any => { - return { - ...(input.CompleteOnConvergence != null && { CompleteOnConvergence: input.CompleteOnConvergence }), - }; -}; +// se_DeleteProjectInput omitted. -/** - * serializeAws_json1_1CreateActionRequest - */ -const se_CreateActionRequest = (input: CreateActionRequest, context: __SerdeContext): any => { - return { - ...(input.ActionName != null && { ActionName: input.ActionName }), - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.MetadataProperties != null && { - MetadataProperties: se_MetadataProperties(input.MetadataProperties, context), - }), - ...(input.Properties != null && { Properties: se_LineageEntityParameters(input.Properties, context) }), - ...(input.Source != null && { Source: se_ActionSource(input.Source, context) }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeleteSpaceRequest omitted. -/** - * serializeAws_json1_1CreateAlgorithmInput - */ -const se_CreateAlgorithmInput = (input: CreateAlgorithmInput, context: __SerdeContext): any => { - return { - ...(input.AlgorithmDescription != null && { AlgorithmDescription: input.AlgorithmDescription }), - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.CertifyForMarketplace != null && { CertifyForMarketplace: input.CertifyForMarketplace }), - ...(input.InferenceSpecification != null && { - InferenceSpecification: se_InferenceSpecification(input.InferenceSpecification, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrainingSpecification != null && { - TrainingSpecification: se_TrainingSpecification(input.TrainingSpecification, context), - }), - ...(input.ValidationSpecification != null && { - ValidationSpecification: se_AlgorithmValidationSpecification(input.ValidationSpecification, context), - }), - }; -}; +// se_DeleteStudioLifecycleConfigRequest omitted. -/** - * serializeAws_json1_1CreateAppImageConfigRequest - */ -const se_CreateAppImageConfigRequest = (input: CreateAppImageConfigRequest, context: __SerdeContext): any => { - return { - ...(input.AppImageConfigName != null && { AppImageConfigName: input.AppImageConfigName }), - ...(input.KernelGatewayImageConfig != null && { - KernelGatewayImageConfig: se_KernelGatewayImageConfig(input.KernelGatewayImageConfig, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeleteTagsInput omitted. -/** - * serializeAws_json1_1CreateAppRequest - */ -const se_CreateAppRequest = (input: CreateAppRequest, context: __SerdeContext): any => { - return { - ...(input.AppName != null && { AppName: input.AppName }), - ...(input.AppType != null && { AppType: input.AppType }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.ResourceSpec != null && { ResourceSpec: se_ResourceSpec(input.ResourceSpec, context) }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - }; -}; +// se_DeleteTrialComponentRequest omitted. -/** - * serializeAws_json1_1CreateArtifactRequest - */ -const se_CreateArtifactRequest = (input: CreateArtifactRequest, context: __SerdeContext): any => { - return { - ...(input.ArtifactName != null && { ArtifactName: input.ArtifactName }), - ...(input.ArtifactType != null && { ArtifactType: input.ArtifactType }), - ...(input.MetadataProperties != null && { - MetadataProperties: se_MetadataProperties(input.MetadataProperties, context), - }), - ...(input.Properties != null && { Properties: se_LineageEntityParameters(input.Properties, context) }), - ...(input.Source != null && { Source: se_ArtifactSource(input.Source, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeleteTrialRequest omitted. -/** - * serializeAws_json1_1CreateAutoMLJobRequest - */ -const se_CreateAutoMLJobRequest = (input: CreateAutoMLJobRequest, context: __SerdeContext): any => { - return { - ...(input.AutoMLJobConfig != null && { AutoMLJobConfig: se_AutoMLJobConfig(input.AutoMLJobConfig, context) }), - ...(input.AutoMLJobName != null && { AutoMLJobName: input.AutoMLJobName }), - ...(input.AutoMLJobObjective != null && { - AutoMLJobObjective: se_AutoMLJobObjective(input.AutoMLJobObjective, context), - }), - ...(input.GenerateCandidateDefinitionsOnly != null && { - GenerateCandidateDefinitionsOnly: input.GenerateCandidateDefinitionsOnly, - }), - ...(input.InputDataConfig != null && { InputDataConfig: se_AutoMLInputDataConfig(input.InputDataConfig, context) }), - ...(input.ModelDeployConfig != null && { - ModelDeployConfig: se_ModelDeployConfig(input.ModelDeployConfig, context), - }), - ...(input.OutputDataConfig != null && { - OutputDataConfig: se_AutoMLOutputDataConfig(input.OutputDataConfig, context), - }), - ...(input.ProblemType != null && { ProblemType: input.ProblemType }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeleteUserProfileRequest omitted. -/** - * serializeAws_json1_1CreateAutoMLJobV2Request - */ -const se_CreateAutoMLJobV2Request = (input: CreateAutoMLJobV2Request, context: __SerdeContext): any => { - return { - ...(input.AutoMLJobInputDataConfig != null && { - AutoMLJobInputDataConfig: se_AutoMLJobInputDataConfig(input.AutoMLJobInputDataConfig, context), - }), - ...(input.AutoMLJobName != null && { AutoMLJobName: input.AutoMLJobName }), - ...(input.AutoMLJobObjective != null && { - AutoMLJobObjective: se_AutoMLJobObjective(input.AutoMLJobObjective, context), - }), - ...(input.AutoMLProblemTypeConfig != null && { - AutoMLProblemTypeConfig: se_AutoMLProblemTypeConfig(input.AutoMLProblemTypeConfig, context), - }), - ...(input.DataSplitConfig != null && { DataSplitConfig: se_AutoMLDataSplitConfig(input.DataSplitConfig, context) }), - ...(input.ModelDeployConfig != null && { - ModelDeployConfig: se_ModelDeployConfig(input.ModelDeployConfig, context), - }), - ...(input.OutputDataConfig != null && { - OutputDataConfig: se_AutoMLOutputDataConfig(input.OutputDataConfig, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SecurityConfig != null && { SecurityConfig: se_AutoMLSecurityConfig(input.SecurityConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateCodeRepositoryInput - */ -const se_CreateCodeRepositoryInput = (input: CreateCodeRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.CodeRepositoryName != null && { CodeRepositoryName: input.CodeRepositoryName }), - ...(input.GitConfig != null && { GitConfig: se_GitConfig(input.GitConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeleteWorkforceRequest omitted. -/** - * serializeAws_json1_1CreateCompilationJobRequest - */ -const se_CreateCompilationJobRequest = (input: CreateCompilationJobRequest, context: __SerdeContext): any => { - return { - ...(input.CompilationJobName != null && { CompilationJobName: input.CompilationJobName }), - ...(input.InputConfig != null && { InputConfig: se_InputConfig(input.InputConfig, context) }), - ...(input.ModelPackageVersionArn != null && { ModelPackageVersionArn: input.ModelPackageVersionArn }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_StoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_NeoVpcConfig(input.VpcConfig, context) }), - }; -}; +// se_DeleteWorkteamRequest omitted. -/** - * serializeAws_json1_1CreateContextRequest - */ -const se_CreateContextRequest = (input: CreateContextRequest, context: __SerdeContext): any => { - return { - ...(input.ContextName != null && { ContextName: input.ContextName }), - ...(input.ContextType != null && { ContextType: input.ContextType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Properties != null && { Properties: se_LineageEntityParameters(input.Properties, context) }), - ...(input.Source != null && { Source: se_ContextSource(input.Source, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeploymentConfig omitted. -/** - * serializeAws_json1_1CreateDataQualityJobDefinitionRequest - */ -const se_CreateDataQualityJobDefinitionRequest = ( - input: CreateDataQualityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.DataQualityAppSpecification != null && { - DataQualityAppSpecification: se_DataQualityAppSpecification(input.DataQualityAppSpecification, context), - }), - ...(input.DataQualityBaselineConfig != null && { - DataQualityBaselineConfig: se_DataQualityBaselineConfig(input.DataQualityBaselineConfig, context), - }), - ...(input.DataQualityJobInput != null && { - DataQualityJobInput: se_DataQualityJobInput(input.DataQualityJobInput, context), - }), - ...(input.DataQualityJobOutputConfig != null && { - DataQualityJobOutputConfig: se_MonitoringOutputConfig(input.DataQualityJobOutputConfig, context), - }), - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - ...(input.JobResources != null && { JobResources: se_MonitoringResources(input.JobResources, context) }), - ...(input.NetworkConfig != null && { NetworkConfig: se_MonitoringNetworkConfig(input.NetworkConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_MonitoringStoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateDeviceFleetRequest - */ -const se_CreateDeviceFleetRequest = (input: CreateDeviceFleetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.EnableIotRoleAlias != null && { EnableIotRoleAlias: input.EnableIotRoleAlias }), - ...(input.OutputConfig != null && { OutputConfig: se_EdgeOutputConfig(input.OutputConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeploymentStage omitted. -/** - * serializeAws_json1_1CreateDomainRequest - */ -const se_CreateDomainRequest = (input: CreateDomainRequest, context: __SerdeContext): any => { - return { - ...(input.AppNetworkAccessType != null && { AppNetworkAccessType: input.AppNetworkAccessType }), - ...(input.AppSecurityGroupManagement != null && { AppSecurityGroupManagement: input.AppSecurityGroupManagement }), - ...(input.AuthMode != null && { AuthMode: input.AuthMode }), - ...(input.DefaultSpaceSettings != null && { - DefaultSpaceSettings: se_DefaultSpaceSettings(input.DefaultSpaceSettings, context), - }), - ...(input.DefaultUserSettings != null && { - DefaultUserSettings: se_UserSettings(input.DefaultUserSettings, context), - }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.DomainSettings != null && { DomainSettings: se_DomainSettings(input.DomainSettings, context) }), - ...(input.HomeEfsFileSystemKmsKeyId != null && { HomeEfsFileSystemKmsKeyId: input.HomeEfsFileSystemKmsKeyId }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.SubnetIds != null && { SubnetIds: se_Subnets(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_DeploymentStages omitted. -/** - * serializeAws_json1_1CreateEdgeDeploymentPlanRequest - */ -const se_CreateEdgeDeploymentPlanRequest = (input: CreateEdgeDeploymentPlanRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.ModelConfigs != null && { ModelConfigs: se_EdgeDeploymentModelConfigs(input.ModelConfigs, context) }), - ...(input.Stages != null && { Stages: se_DeploymentStages(input.Stages, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DeregisterDevicesRequest omitted. -/** - * serializeAws_json1_1CreateEdgeDeploymentStageRequest - */ -const se_CreateEdgeDeploymentStageRequest = (input: CreateEdgeDeploymentStageRequest, context: __SerdeContext): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.Stages != null && { Stages: se_DeploymentStages(input.Stages, context) }), - }; -}; +// se_DescribeActionRequest omitted. -/** - * serializeAws_json1_1CreateEdgePackagingJobRequest - */ -const se_CreateEdgePackagingJobRequest = (input: CreateEdgePackagingJobRequest, context: __SerdeContext): any => { - return { - ...(input.CompilationJobName != null && { CompilationJobName: input.CompilationJobName }), - ...(input.EdgePackagingJobName != null && { EdgePackagingJobName: input.EdgePackagingJobName }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }), - ...(input.OutputConfig != null && { OutputConfig: se_EdgeOutputConfig(input.OutputConfig, context) }), - ...(input.ResourceKey != null && { ResourceKey: input.ResourceKey }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeAlgorithmInput omitted. -/** - * serializeAws_json1_1CreateEndpointConfigInput - */ -const se_CreateEndpointConfigInput = (input: CreateEndpointConfigInput, context: __SerdeContext): any => { - return { - ...(input.AsyncInferenceConfig != null && { - AsyncInferenceConfig: se_AsyncInferenceConfig(input.AsyncInferenceConfig, context), - }), - ...(input.DataCaptureConfig != null && { - DataCaptureConfig: se_DataCaptureConfig(input.DataCaptureConfig, context), - }), - ...(input.EndpointConfigName != null && { EndpointConfigName: input.EndpointConfigName }), - ...(input.ExplainerConfig != null && { ExplainerConfig: se_ExplainerConfig(input.ExplainerConfig, context) }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.ProductionVariants != null && { - ProductionVariants: se_ProductionVariantList(input.ProductionVariants, context), - }), - ...(input.ShadowProductionVariants != null && { - ShadowProductionVariants: se_ProductionVariantList(input.ShadowProductionVariants, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeAppImageConfigRequest omitted. -/** - * serializeAws_json1_1CreateEndpointInput - */ -const se_CreateEndpointInput = (input: CreateEndpointInput, context: __SerdeContext): any => { - return { - ...(input.DeploymentConfig != null && { DeploymentConfig: se_DeploymentConfig(input.DeploymentConfig, context) }), - ...(input.EndpointConfigName != null && { EndpointConfigName: input.EndpointConfigName }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeAppRequest omitted. -/** - * serializeAws_json1_1CreateExperimentRequest - */ -const se_CreateExperimentRequest = (input: CreateExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeArtifactRequest omitted. -/** - * serializeAws_json1_1CreateFeatureGroupRequest - */ -const se_CreateFeatureGroupRequest = (input: CreateFeatureGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EventTimeFeatureName != null && { EventTimeFeatureName: input.EventTimeFeatureName }), - ...(input.FeatureDefinitions != null && { - FeatureDefinitions: se_FeatureDefinitions(input.FeatureDefinitions, context), - }), - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - ...(input.OfflineStoreConfig != null && { - OfflineStoreConfig: se_OfflineStoreConfig(input.OfflineStoreConfig, context), - }), - ...(input.OnlineStoreConfig != null && { - OnlineStoreConfig: se_OnlineStoreConfig(input.OnlineStoreConfig, context), - }), - ...(input.RecordIdentifierFeatureName != null && { - RecordIdentifierFeatureName: input.RecordIdentifierFeatureName, - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeAutoMLJobRequest omitted. -/** - * serializeAws_json1_1CreateFlowDefinitionRequest - */ -const se_CreateFlowDefinitionRequest = (input: CreateFlowDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.FlowDefinitionName != null && { FlowDefinitionName: input.FlowDefinitionName }), - ...(input.HumanLoopActivationConfig != null && { - HumanLoopActivationConfig: se_HumanLoopActivationConfig(input.HumanLoopActivationConfig, context), - }), - ...(input.HumanLoopConfig != null && { HumanLoopConfig: se_HumanLoopConfig(input.HumanLoopConfig, context) }), - ...(input.HumanLoopRequestSource != null && { - HumanLoopRequestSource: se_HumanLoopRequestSource(input.HumanLoopRequestSource, context), - }), - ...(input.OutputConfig != null && { OutputConfig: se_FlowDefinitionOutputConfig(input.OutputConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeAutoMLJobV2Request omitted. -/** - * serializeAws_json1_1CreateHubRequest - */ -const se_CreateHubRequest = (input: CreateHubRequest, context: __SerdeContext): any => { - return { - ...(input.HubDescription != null && { HubDescription: input.HubDescription }), - ...(input.HubDisplayName != null && { HubDisplayName: input.HubDisplayName }), - ...(input.HubName != null && { HubName: input.HubName }), - ...(input.HubSearchKeywords != null && { - HubSearchKeywords: se_HubSearchKeywordList(input.HubSearchKeywords, context), - }), - ...(input.S3StorageConfig != null && { S3StorageConfig: se_HubS3StorageConfig(input.S3StorageConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeCodeRepositoryInput omitted. -/** - * serializeAws_json1_1CreateHumanTaskUiRequest - */ -const se_CreateHumanTaskUiRequest = (input: CreateHumanTaskUiRequest, context: __SerdeContext): any => { - return { - ...(input.HumanTaskUiName != null && { HumanTaskUiName: input.HumanTaskUiName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UiTemplate != null && { UiTemplate: se_UiTemplate(input.UiTemplate, context) }), - }; -}; +// se_DescribeCompilationJobRequest omitted. -/** - * serializeAws_json1_1CreateHyperParameterTuningJobRequest - */ -const se_CreateHyperParameterTuningJobRequest = ( - input: CreateHyperParameterTuningJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.HyperParameterTuningJobConfig != null && { - HyperParameterTuningJobConfig: se_HyperParameterTuningJobConfig(input.HyperParameterTuningJobConfig, context), - }), - ...(input.HyperParameterTuningJobName != null && { - HyperParameterTuningJobName: input.HyperParameterTuningJobName, - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrainingJobDefinition != null && { - TrainingJobDefinition: se_HyperParameterTrainingJobDefinition(input.TrainingJobDefinition, context), - }), - ...(input.TrainingJobDefinitions != null && { - TrainingJobDefinitions: se_HyperParameterTrainingJobDefinitions(input.TrainingJobDefinitions, context), - }), - ...(input.WarmStartConfig != null && { - WarmStartConfig: se_HyperParameterTuningJobWarmStartConfig(input.WarmStartConfig, context), - }), - }; -}; +// se_DescribeContextRequest omitted. -/** - * serializeAws_json1_1CreateImageRequest - */ -const se_CreateImageRequest = (input: CreateImageRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeDataQualityJobDefinitionRequest omitted. -/** - * serializeAws_json1_1CreateImageVersionRequest - */ -const se_CreateImageVersionRequest = (input: CreateImageVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Aliases != null && { Aliases: se_SageMakerImageVersionAliases(input.Aliases, context) }), - ...(input.BaseImage != null && { BaseImage: input.BaseImage }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Horovod != null && { Horovod: input.Horovod }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.JobType != null && { JobType: input.JobType }), - ...(input.MLFramework != null && { MLFramework: input.MLFramework }), - ...(input.Processor != null && { Processor: input.Processor }), - ...(input.ProgrammingLang != null && { ProgrammingLang: input.ProgrammingLang }), - ...(input.ReleaseNotes != null && { ReleaseNotes: input.ReleaseNotes }), - ...(input.VendorGuidance != null && { VendorGuidance: input.VendorGuidance }), - }; -}; +// se_DescribeDeviceFleetRequest omitted. -/** - * serializeAws_json1_1CreateInferenceExperimentRequest - */ -const se_CreateInferenceExperimentRequest = (input: CreateInferenceExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.DataStorageConfig != null && { - DataStorageConfig: se_InferenceExperimentDataStorageConfig(input.DataStorageConfig, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - ...(input.ModelVariants != null && { ModelVariants: se_ModelVariantConfigList(input.ModelVariants, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Schedule != null && { Schedule: se_InferenceExperimentSchedule(input.Schedule, context) }), - ...(input.ShadowModeConfig != null && { ShadowModeConfig: se_ShadowModeConfig(input.ShadowModeConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribeDeviceRequest omitted. -/** - * serializeAws_json1_1CreateInferenceRecommendationsJobRequest - */ -const se_CreateInferenceRecommendationsJobRequest = ( - input: CreateInferenceRecommendationsJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.InputConfig != null && { InputConfig: se_RecommendationJobInputConfig(input.InputConfig, context) }), - ...(input.JobDescription != null && { JobDescription: input.JobDescription }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobType != null && { JobType: input.JobType }), - ...(input.OutputConfig != null && { OutputConfig: se_RecommendationJobOutputConfig(input.OutputConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingConditions != null && { - StoppingConditions: se_RecommendationJobStoppingConditions(input.StoppingConditions, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeDomainRequest omitted. -/** - * serializeAws_json1_1CreateLabelingJobRequest - */ -const se_CreateLabelingJobRequest = (input: CreateLabelingJobRequest, context: __SerdeContext): any => { - return { - ...(input.HumanTaskConfig != null && { HumanTaskConfig: se_HumanTaskConfig(input.HumanTaskConfig, context) }), - ...(input.InputConfig != null && { InputConfig: se_LabelingJobInputConfig(input.InputConfig, context) }), - ...(input.LabelAttributeName != null && { LabelAttributeName: input.LabelAttributeName }), - ...(input.LabelCategoryConfigS3Uri != null && { LabelCategoryConfigS3Uri: input.LabelCategoryConfigS3Uri }), - ...(input.LabelingJobAlgorithmsConfig != null && { - LabelingJobAlgorithmsConfig: se_LabelingJobAlgorithmsConfig(input.LabelingJobAlgorithmsConfig, context), - }), - ...(input.LabelingJobName != null && { LabelingJobName: input.LabelingJobName }), - ...(input.OutputConfig != null && { OutputConfig: se_LabelingJobOutputConfig(input.OutputConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingConditions != null && { - StoppingConditions: se_LabelingJobStoppingConditions(input.StoppingConditions, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeEdgeDeploymentPlanRequest omitted. -/** - * serializeAws_json1_1CreateModelBiasJobDefinitionRequest - */ -const se_CreateModelBiasJobDefinitionRequest = ( - input: CreateModelBiasJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - ...(input.JobResources != null && { JobResources: se_MonitoringResources(input.JobResources, context) }), - ...(input.ModelBiasAppSpecification != null && { - ModelBiasAppSpecification: se_ModelBiasAppSpecification(input.ModelBiasAppSpecification, context), - }), - ...(input.ModelBiasBaselineConfig != null && { - ModelBiasBaselineConfig: se_ModelBiasBaselineConfig(input.ModelBiasBaselineConfig, context), - }), - ...(input.ModelBiasJobInput != null && { - ModelBiasJobInput: se_ModelBiasJobInput(input.ModelBiasJobInput, context), - }), - ...(input.ModelBiasJobOutputConfig != null && { - ModelBiasJobOutputConfig: se_MonitoringOutputConfig(input.ModelBiasJobOutputConfig, context), - }), - ...(input.NetworkConfig != null && { NetworkConfig: se_MonitoringNetworkConfig(input.NetworkConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_MonitoringStoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateModelCardExportJobRequest - */ -const se_CreateModelCardExportJobRequest = (input: CreateModelCardExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.ModelCardExportJobName != null && { ModelCardExportJobName: input.ModelCardExportJobName }), - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - ...(input.ModelCardVersion != null && { ModelCardVersion: input.ModelCardVersion }), - ...(input.OutputConfig != null && { OutputConfig: se_ModelCardExportOutputConfig(input.OutputConfig, context) }), - }; -}; +// se_DescribeEdgePackagingJobRequest omitted. -/** - * serializeAws_json1_1CreateModelCardRequest - */ -const se_CreateModelCardRequest = (input: CreateModelCardRequest, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - ...(input.ModelCardStatus != null && { ModelCardStatus: input.ModelCardStatus }), - ...(input.SecurityConfig != null && { SecurityConfig: se_ModelCardSecurityConfig(input.SecurityConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeEndpointConfigInput omitted. -/** - * serializeAws_json1_1CreateModelExplainabilityJobDefinitionRequest - */ -const se_CreateModelExplainabilityJobDefinitionRequest = ( - input: CreateModelExplainabilityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - ...(input.JobResources != null && { JobResources: se_MonitoringResources(input.JobResources, context) }), - ...(input.ModelExplainabilityAppSpecification != null && { - ModelExplainabilityAppSpecification: se_ModelExplainabilityAppSpecification( - input.ModelExplainabilityAppSpecification, - context - ), - }), - ...(input.ModelExplainabilityBaselineConfig != null && { - ModelExplainabilityBaselineConfig: se_ModelExplainabilityBaselineConfig( - input.ModelExplainabilityBaselineConfig, - context - ), - }), - ...(input.ModelExplainabilityJobInput != null && { - ModelExplainabilityJobInput: se_ModelExplainabilityJobInput(input.ModelExplainabilityJobInput, context), - }), - ...(input.ModelExplainabilityJobOutputConfig != null && { - ModelExplainabilityJobOutputConfig: se_MonitoringOutputConfig(input.ModelExplainabilityJobOutputConfig, context), - }), - ...(input.NetworkConfig != null && { NetworkConfig: se_MonitoringNetworkConfig(input.NetworkConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_MonitoringStoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateModelInput - */ -const se_CreateModelInput = (input: CreateModelInput, context: __SerdeContext): any => { - return { - ...(input.Containers != null && { Containers: se_ContainerDefinitionList(input.Containers, context) }), - ...(input.EnableNetworkIsolation != null && { EnableNetworkIsolation: input.EnableNetworkIsolation }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.InferenceExecutionConfig != null && { - InferenceExecutionConfig: se_InferenceExecutionConfig(input.InferenceExecutionConfig, context), - }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.PrimaryContainer != null && { - PrimaryContainer: se_ContainerDefinition(input.PrimaryContainer, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; +// se_DescribeEndpointInput omitted. -/** - * serializeAws_json1_1CreateModelPackageGroupInput - */ -const se_CreateModelPackageGroupInput = (input: CreateModelPackageGroupInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageGroupDescription != null && { - ModelPackageGroupDescription: input.ModelPackageGroupDescription, - }), - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeExperimentRequest omitted. -/** - * serializeAws_json1_1CreateModelPackageInput - */ -const se_CreateModelPackageInput = (input: CreateModelPackageInput, context: __SerdeContext): any => { - return { - ...(input.AdditionalInferenceSpecifications != null && { - AdditionalInferenceSpecifications: se_AdditionalInferenceSpecifications( - input.AdditionalInferenceSpecifications, - context - ), - }), - ...(input.CertifyForMarketplace != null && { CertifyForMarketplace: input.CertifyForMarketplace }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CustomerMetadataProperties != null && { - CustomerMetadataProperties: se_CustomerMetadataMap(input.CustomerMetadataProperties, context), - }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.DriftCheckBaselines != null && { - DriftCheckBaselines: se_DriftCheckBaselines(input.DriftCheckBaselines, context), - }), - ...(input.InferenceSpecification != null && { - InferenceSpecification: se_InferenceSpecification(input.InferenceSpecification, context), - }), - ...(input.MetadataProperties != null && { - MetadataProperties: se_MetadataProperties(input.MetadataProperties, context), - }), - ...(input.ModelApprovalStatus != null && { ModelApprovalStatus: input.ModelApprovalStatus }), - ...(input.ModelMetrics != null && { ModelMetrics: se_ModelMetrics(input.ModelMetrics, context) }), - ...(input.ModelPackageDescription != null && { ModelPackageDescription: input.ModelPackageDescription }), - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - ...(input.ModelPackageName != null && { ModelPackageName: input.ModelPackageName }), - ...(input.SamplePayloadUrl != null && { SamplePayloadUrl: input.SamplePayloadUrl }), - ...(input.SourceAlgorithmSpecification != null && { - SourceAlgorithmSpecification: se_SourceAlgorithmSpecification(input.SourceAlgorithmSpecification, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Task != null && { Task: input.Task }), - ...(input.ValidationSpecification != null && { - ValidationSpecification: se_ModelPackageValidationSpecification(input.ValidationSpecification, context), - }), - }; -}; +// se_DescribeFeatureGroupRequest omitted. -/** - * serializeAws_json1_1CreateModelQualityJobDefinitionRequest - */ -const se_CreateModelQualityJobDefinitionRequest = ( - input: CreateModelQualityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - ...(input.JobResources != null && { JobResources: se_MonitoringResources(input.JobResources, context) }), - ...(input.ModelQualityAppSpecification != null && { - ModelQualityAppSpecification: se_ModelQualityAppSpecification(input.ModelQualityAppSpecification, context), - }), - ...(input.ModelQualityBaselineConfig != null && { - ModelQualityBaselineConfig: se_ModelQualityBaselineConfig(input.ModelQualityBaselineConfig, context), - }), - ...(input.ModelQualityJobInput != null && { - ModelQualityJobInput: se_ModelQualityJobInput(input.ModelQualityJobInput, context), - }), - ...(input.ModelQualityJobOutputConfig != null && { - ModelQualityJobOutputConfig: se_MonitoringOutputConfig(input.ModelQualityJobOutputConfig, context), - }), - ...(input.NetworkConfig != null && { NetworkConfig: se_MonitoringNetworkConfig(input.NetworkConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_MonitoringStoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeFeatureMetadataRequest omitted. -/** - * serializeAws_json1_1CreateMonitoringScheduleRequest - */ -const se_CreateMonitoringScheduleRequest = (input: CreateMonitoringScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.MonitoringScheduleConfig != null && { - MonitoringScheduleConfig: se_MonitoringScheduleConfig(input.MonitoringScheduleConfig, context), - }), - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeFlowDefinitionRequest omitted. -/** - * serializeAws_json1_1CreateNotebookInstanceInput - */ -const se_CreateNotebookInstanceInput = (input: CreateNotebookInstanceInput, context: __SerdeContext): any => { - return { - ...(input.AcceleratorTypes != null && { - AcceleratorTypes: se_NotebookInstanceAcceleratorTypes(input.AcceleratorTypes, context), - }), - ...(input.AdditionalCodeRepositories != null && { - AdditionalCodeRepositories: se_AdditionalCodeRepositoryNamesOrUrls(input.AdditionalCodeRepositories, context), - }), - ...(input.DefaultCodeRepository != null && { DefaultCodeRepository: input.DefaultCodeRepository }), - ...(input.DirectInternetAccess != null && { DirectInternetAccess: input.DirectInternetAccess }), - ...(input.InstanceMetadataServiceConfiguration != null && { - InstanceMetadataServiceConfiguration: se_InstanceMetadataServiceConfiguration( - input.InstanceMetadataServiceConfiguration, - context - ), - }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LifecycleConfigName != null && { LifecycleConfigName: input.LifecycleConfigName }), - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - ...(input.PlatformIdentifier != null && { PlatformIdentifier: input.PlatformIdentifier }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RootAccess != null && { RootAccess: input.RootAccess }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1CreateNotebookInstanceLifecycleConfigInput - */ -const se_CreateNotebookInstanceLifecycleConfigInput = ( - input: CreateNotebookInstanceLifecycleConfigInput, - context: __SerdeContext -): any => { - return { - ...(input.NotebookInstanceLifecycleConfigName != null && { - NotebookInstanceLifecycleConfigName: input.NotebookInstanceLifecycleConfigName, - }), - ...(input.OnCreate != null && { OnCreate: se_NotebookInstanceLifecycleConfigList(input.OnCreate, context) }), - ...(input.OnStart != null && { OnStart: se_NotebookInstanceLifecycleConfigList(input.OnStart, context) }), - }; -}; +// se_DescribeHubContentRequest omitted. -/** - * serializeAws_json1_1CreatePipelineRequest - */ -const se_CreatePipelineRequest = (input: CreatePipelineRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ParallelismConfiguration != null && { - ParallelismConfiguration: se_ParallelismConfiguration(input.ParallelismConfiguration, context), - }), - ...(input.PipelineDefinition != null && { PipelineDefinition: input.PipelineDefinition }), - ...(input.PipelineDefinitionS3Location != null && { - PipelineDefinitionS3Location: se_PipelineDefinitionS3Location(input.PipelineDefinitionS3Location, context), - }), - ...(input.PipelineDescription != null && { PipelineDescription: input.PipelineDescription }), - ...(input.PipelineDisplayName != null && { PipelineDisplayName: input.PipelineDisplayName }), - ...(input.PipelineName != null && { PipelineName: input.PipelineName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeHubRequest omitted. -/** - * serializeAws_json1_1CreatePresignedDomainUrlRequest - */ -const se_CreatePresignedDomainUrlRequest = (input: CreatePresignedDomainUrlRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.ExpiresInSeconds != null && { ExpiresInSeconds: input.ExpiresInSeconds }), - ...(input.SessionExpirationDurationInSeconds != null && { - SessionExpirationDurationInSeconds: input.SessionExpirationDurationInSeconds, - }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - }; -}; +// se_DescribeHumanTaskUiRequest omitted. -/** - * serializeAws_json1_1CreatePresignedNotebookInstanceUrlInput - */ -const se_CreatePresignedNotebookInstanceUrlInput = ( - input: CreatePresignedNotebookInstanceUrlInput, - context: __SerdeContext -): any => { - return { - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - ...(input.SessionExpirationDurationInSeconds != null && { - SessionExpirationDurationInSeconds: input.SessionExpirationDurationInSeconds, - }), - }; -}; +// se_DescribeHyperParameterTuningJobRequest omitted. -/** - * serializeAws_json1_1CreateProcessingJobRequest - */ -const se_CreateProcessingJobRequest = (input: CreateProcessingJobRequest, context: __SerdeContext): any => { - return { - ...(input.AppSpecification != null && { AppSpecification: se_AppSpecification(input.AppSpecification, context) }), - ...(input.Environment != null && { Environment: se_ProcessingEnvironmentMap(input.Environment, context) }), - ...(input.ExperimentConfig != null && { ExperimentConfig: se_ExperimentConfig(input.ExperimentConfig, context) }), - ...(input.NetworkConfig != null && { NetworkConfig: se_NetworkConfig(input.NetworkConfig, context) }), - ...(input.ProcessingInputs != null && { ProcessingInputs: se_ProcessingInputs(input.ProcessingInputs, context) }), - ...(input.ProcessingJobName != null && { ProcessingJobName: input.ProcessingJobName }), - ...(input.ProcessingOutputConfig != null && { - ProcessingOutputConfig: se_ProcessingOutputConfig(input.ProcessingOutputConfig, context), - }), - ...(input.ProcessingResources != null && { - ProcessingResources: se_ProcessingResources(input.ProcessingResources, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_ProcessingStoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateProjectInput - */ -const se_CreateProjectInput = (input: CreateProjectInput, context: __SerdeContext): any => { - return { - ...(input.ProjectDescription != null && { ProjectDescription: input.ProjectDescription }), - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - ...(input.ServiceCatalogProvisioningDetails != null && { - ServiceCatalogProvisioningDetails: se_ServiceCatalogProvisioningDetails( - input.ServiceCatalogProvisioningDetails, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeImageRequest omitted. -/** - * serializeAws_json1_1CreateSpaceRequest - */ -const se_CreateSpaceRequest = (input: CreateSpaceRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - ...(input.SpaceSettings != null && { SpaceSettings: se_SpaceSettings(input.SpaceSettings, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeImageVersionRequest omitted. -/** - * serializeAws_json1_1CreateStudioLifecycleConfigRequest - */ -const se_CreateStudioLifecycleConfigRequest = ( - input: CreateStudioLifecycleConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.StudioLifecycleConfigAppType != null && { - StudioLifecycleConfigAppType: input.StudioLifecycleConfigAppType, - }), - ...(input.StudioLifecycleConfigContent != null && { - StudioLifecycleConfigContent: input.StudioLifecycleConfigContent, - }), - ...(input.StudioLifecycleConfigName != null && { StudioLifecycleConfigName: input.StudioLifecycleConfigName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_DescribeInferenceExperimentRequest omitted. -/** - * serializeAws_json1_1CreateTrainingJobRequest - */ -const se_CreateTrainingJobRequest = (input: CreateTrainingJobRequest, context: __SerdeContext): any => { - return { - ...(input.AlgorithmSpecification != null && { - AlgorithmSpecification: se_AlgorithmSpecification(input.AlgorithmSpecification, context), - }), - ...(input.CheckpointConfig != null && { CheckpointConfig: se_CheckpointConfig(input.CheckpointConfig, context) }), - ...(input.DebugHookConfig != null && { DebugHookConfig: se_DebugHookConfig(input.DebugHookConfig, context) }), - ...(input.DebugRuleConfigurations != null && { - DebugRuleConfigurations: se_DebugRuleConfigurations(input.DebugRuleConfigurations, context), - }), - ...(input.EnableInterContainerTrafficEncryption != null && { - EnableInterContainerTrafficEncryption: input.EnableInterContainerTrafficEncryption, - }), - ...(input.EnableManagedSpotTraining != null && { EnableManagedSpotTraining: input.EnableManagedSpotTraining }), - ...(input.EnableNetworkIsolation != null && { EnableNetworkIsolation: input.EnableNetworkIsolation }), - ...(input.Environment != null && { Environment: se_TrainingEnvironmentMap(input.Environment, context) }), - ...(input.ExperimentConfig != null && { ExperimentConfig: se_ExperimentConfig(input.ExperimentConfig, context) }), - ...(input.HyperParameters != null && { HyperParameters: se_HyperParameters(input.HyperParameters, context) }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.ProfilerConfig != null && { ProfilerConfig: se_ProfilerConfig(input.ProfilerConfig, context) }), - ...(input.ProfilerRuleConfigurations != null && { - ProfilerRuleConfigurations: se_ProfilerRuleConfigurations(input.ProfilerRuleConfigurations, context), - }), - ...(input.ResourceConfig != null && { ResourceConfig: se_ResourceConfig(input.ResourceConfig, context) }), - ...(input.RetryStrategy != null && { RetryStrategy: se_RetryStrategy(input.RetryStrategy, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_StoppingCondition(input.StoppingCondition, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TensorBoardOutputConfig != null && { - TensorBoardOutputConfig: se_TensorBoardOutputConfig(input.TensorBoardOutputConfig, context), - }), - ...(input.TrainingJobName != null && { TrainingJobName: input.TrainingJobName }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateTransformJobRequest - */ -const se_CreateTransformJobRequest = (input: CreateTransformJobRequest, context: __SerdeContext): any => { - return { - ...(input.BatchStrategy != null && { BatchStrategy: input.BatchStrategy }), - ...(input.DataCaptureConfig != null && { - DataCaptureConfig: se_BatchDataCaptureConfig(input.DataCaptureConfig, context), - }), - ...(input.DataProcessing != null && { DataProcessing: se_DataProcessing(input.DataProcessing, context) }), - ...(input.Environment != null && { Environment: se_TransformEnvironmentMap(input.Environment, context) }), - ...(input.ExperimentConfig != null && { ExperimentConfig: se_ExperimentConfig(input.ExperimentConfig, context) }), - ...(input.MaxConcurrentTransforms != null && { MaxConcurrentTransforms: input.MaxConcurrentTransforms }), - ...(input.MaxPayloadInMB != null && { MaxPayloadInMB: input.MaxPayloadInMB }), - ...(input.ModelClientConfig != null && { - ModelClientConfig: se_ModelClientConfig(input.ModelClientConfig, context), - }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TransformInput != null && { TransformInput: se_TransformInput(input.TransformInput, context) }), - ...(input.TransformJobName != null && { TransformJobName: input.TransformJobName }), - ...(input.TransformOutput != null && { TransformOutput: se_TransformOutput(input.TransformOutput, context) }), - ...(input.TransformResources != null && { - TransformResources: se_TransformResources(input.TransformResources, context), - }), - }; -}; +// se_DescribeInferenceRecommendationsJobRequest omitted. -/** - * serializeAws_json1_1CreateTrialComponentRequest - */ -const se_CreateTrialComponentRequest = (input: CreateTrialComponentRequest, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.InputArtifacts != null && { InputArtifacts: se_TrialComponentArtifacts(input.InputArtifacts, context) }), - ...(input.MetadataProperties != null && { - MetadataProperties: se_MetadataProperties(input.MetadataProperties, context), - }), - ...(input.OutputArtifacts != null && { - OutputArtifacts: se_TrialComponentArtifacts(input.OutputArtifacts, context), - }), - ...(input.Parameters != null && { Parameters: se_TrialComponentParameters(input.Parameters, context) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.Status != null && { Status: se_TrialComponentStatus(input.Status, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - }; -}; +// se_DescribeLabelingJobRequest omitted. -/** - * serializeAws_json1_1CreateTrialRequest - */ -const se_CreateTrialRequest = (input: CreateTrialRequest, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - ...(input.MetadataProperties != null && { - MetadataProperties: se_MetadataProperties(input.MetadataProperties, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; +// se_DescribeLineageGroupRequest omitted. -/** - * serializeAws_json1_1CreateUserProfileRequest - */ -const se_CreateUserProfileRequest = (input: CreateUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SingleSignOnUserIdentifier != null && { SingleSignOnUserIdentifier: input.SingleSignOnUserIdentifier }), - ...(input.SingleSignOnUserValue != null && { SingleSignOnUserValue: input.SingleSignOnUserValue }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - ...(input.UserSettings != null && { UserSettings: se_UserSettings(input.UserSettings, context) }), - }; -}; +// se_DescribeModelBiasJobDefinitionRequest omitted. -/** - * serializeAws_json1_1CreateWorkforceRequest - */ -const se_CreateWorkforceRequest = (input: CreateWorkforceRequest, context: __SerdeContext): any => { - return { - ...(input.CognitoConfig != null && { CognitoConfig: se_CognitoConfig(input.CognitoConfig, context) }), - ...(input.OidcConfig != null && { OidcConfig: se_OidcConfig(input.OidcConfig, context) }), - ...(input.SourceIpConfig != null && { SourceIpConfig: se_SourceIpConfig(input.SourceIpConfig, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.WorkforceName != null && { WorkforceName: input.WorkforceName }), - ...(input.WorkforceVpcConfig != null && { - WorkforceVpcConfig: se_WorkforceVpcConfigRequest(input.WorkforceVpcConfig, context), - }), - }; -}; +// se_DescribeModelCardExportJobRequest omitted. -/** - * serializeAws_json1_1CreateWorkteamRequest - */ -const se_CreateWorkteamRequest = (input: CreateWorkteamRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.MemberDefinitions != null && { - MemberDefinitions: se_MemberDefinitions(input.MemberDefinitions, context), - }), - ...(input.NotificationConfiguration != null && { - NotificationConfiguration: se_NotificationConfiguration(input.NotificationConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.WorkforceName != null && { WorkforceName: input.WorkforceName }), - ...(input.WorkteamName != null && { WorkteamName: input.WorkteamName }), - }; -}; +// se_DescribeModelCardRequest omitted. -/** - * serializeAws_json1_1CsvContentTypes - */ -const se_CsvContentTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeModelExplainabilityJobDefinitionRequest omitted. -/** - * serializeAws_json1_1CustomerMetadataKeyList - */ -const se_CustomerMetadataKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeModelInput omitted. -/** - * serializeAws_json1_1CustomerMetadataMap - */ -const se_CustomerMetadataMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DescribeModelPackageGroupInput omitted. -/** - * serializeAws_json1_1CustomImage - */ -const se_CustomImage = (input: CustomImage, context: __SerdeContext): any => { - return { - ...(input.AppImageConfigName != null && { AppImageConfigName: input.AppImageConfigName }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.ImageVersionNumber != null && { ImageVersionNumber: input.ImageVersionNumber }), - }; -}; +// se_DescribeModelPackageInput omitted. -/** - * serializeAws_json1_1CustomImages - */ -const se_CustomImages = (input: CustomImage[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomImage(entry, context); - }); -}; +// se_DescribeModelQualityJobDefinitionRequest omitted. -/** - * serializeAws_json1_1DataCaptureConfig - */ -const se_DataCaptureConfig = (input: DataCaptureConfig, context: __SerdeContext): any => { - return { - ...(input.CaptureContentTypeHeader != null && { - CaptureContentTypeHeader: se_CaptureContentTypeHeader(input.CaptureContentTypeHeader, context), - }), - ...(input.CaptureOptions != null && { CaptureOptions: se_CaptureOptionList(input.CaptureOptions, context) }), - ...(input.DestinationS3Uri != null && { DestinationS3Uri: input.DestinationS3Uri }), - ...(input.EnableCapture != null && { EnableCapture: input.EnableCapture }), - ...(input.InitialSamplingPercentage != null && { InitialSamplingPercentage: input.InitialSamplingPercentage }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; +// se_DescribeMonitoringScheduleRequest omitted. -/** - * serializeAws_json1_1DataCatalogConfig - */ -const se_DataCatalogConfig = (input: DataCatalogConfig, context: __SerdeContext): any => { - return { - ...(input.Catalog != null && { Catalog: input.Catalog }), - ...(input.Database != null && { Database: input.Database }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeNotebookInstanceInput omitted. -/** - * serializeAws_json1_1DataProcessing - */ -const se_DataProcessing = (input: DataProcessing, context: __SerdeContext): any => { - return { - ...(input.InputFilter != null && { InputFilter: input.InputFilter }), - ...(input.JoinSource != null && { JoinSource: input.JoinSource }), - ...(input.OutputFilter != null && { OutputFilter: input.OutputFilter }), - }; -}; +// se_DescribeNotebookInstanceLifecycleConfigInput omitted. -/** - * serializeAws_json1_1DataQualityAppSpecification - */ -const se_DataQualityAppSpecification = (input: DataQualityAppSpecification, context: __SerdeContext): any => { - return { - ...(input.ContainerArguments != null && { - ContainerArguments: se_MonitoringContainerArguments(input.ContainerArguments, context), - }), - ...(input.ContainerEntrypoint != null && { - ContainerEntrypoint: se_ContainerEntrypoint(input.ContainerEntrypoint, context), - }), - ...(input.Environment != null && { Environment: se_MonitoringEnvironmentMap(input.Environment, context) }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - ...(input.PostAnalyticsProcessorSourceUri != null && { - PostAnalyticsProcessorSourceUri: input.PostAnalyticsProcessorSourceUri, - }), - ...(input.RecordPreprocessorSourceUri != null && { - RecordPreprocessorSourceUri: input.RecordPreprocessorSourceUri, - }), - }; -}; +// se_DescribePipelineDefinitionForExecutionRequest omitted. -/** - * serializeAws_json1_1DataQualityBaselineConfig - */ -const se_DataQualityBaselineConfig = (input: DataQualityBaselineConfig, context: __SerdeContext): any => { - return { - ...(input.BaseliningJobName != null && { BaseliningJobName: input.BaseliningJobName }), - ...(input.ConstraintsResource != null && { - ConstraintsResource: se_MonitoringConstraintsResource(input.ConstraintsResource, context), - }), - ...(input.StatisticsResource != null && { - StatisticsResource: se_MonitoringStatisticsResource(input.StatisticsResource, context), - }), - }; -}; +// se_DescribePipelineExecutionRequest omitted. -/** - * serializeAws_json1_1DataQualityJobInput - */ -const se_DataQualityJobInput = (input: DataQualityJobInput, context: __SerdeContext): any => { - return { - ...(input.BatchTransformInput != null && { - BatchTransformInput: se_BatchTransformInput(input.BatchTransformInput, context), - }), - ...(input.EndpointInput != null && { EndpointInput: se_EndpointInput(input.EndpointInput, context) }), - }; -}; +// se_DescribePipelineRequest omitted. -/** - * serializeAws_json1_1DatasetDefinition - */ -const se_DatasetDefinition = (input: DatasetDefinition, context: __SerdeContext): any => { - return { - ...(input.AthenaDatasetDefinition != null && { - AthenaDatasetDefinition: se_AthenaDatasetDefinition(input.AthenaDatasetDefinition, context), - }), - ...(input.DataDistributionType != null && { DataDistributionType: input.DataDistributionType }), - ...(input.InputMode != null && { InputMode: input.InputMode }), - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.RedshiftDatasetDefinition != null && { - RedshiftDatasetDefinition: se_RedshiftDatasetDefinition(input.RedshiftDatasetDefinition, context), - }), - }; -}; +// se_DescribeProcessingJobRequest omitted. -/** - * serializeAws_json1_1DataSource - */ -const se_DataSource = (input: DataSource, context: __SerdeContext): any => { - return { - ...(input.FileSystemDataSource != null && { - FileSystemDataSource: se_FileSystemDataSource(input.FileSystemDataSource, context), - }), - ...(input.S3DataSource != null && { S3DataSource: se_S3DataSource(input.S3DataSource, context) }), - }; -}; - -/** - * serializeAws_json1_1DebugHookConfig - */ -const se_DebugHookConfig = (input: DebugHookConfig, context: __SerdeContext): any => { - return { - ...(input.CollectionConfigurations != null && { - CollectionConfigurations: se_CollectionConfigurations(input.CollectionConfigurations, context), - }), - ...(input.HookParameters != null && { HookParameters: se_HookParameters(input.HookParameters, context) }), - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1DebugRuleConfiguration - */ -const se_DebugRuleConfiguration = (input: DebugRuleConfiguration, context: __SerdeContext): any => { - return { - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.RuleConfigurationName != null && { RuleConfigurationName: input.RuleConfigurationName }), - ...(input.RuleEvaluatorImage != null && { RuleEvaluatorImage: input.RuleEvaluatorImage }), - ...(input.RuleParameters != null && { RuleParameters: se_RuleParameters(input.RuleParameters, context) }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1DebugRuleConfigurations - */ -const se_DebugRuleConfigurations = (input: DebugRuleConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DebugRuleConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1DefaultSpaceSettings - */ -const se_DefaultSpaceSettings = (input: DefaultSpaceSettings, context: __SerdeContext): any => { - return { - ...(input.ExecutionRole != null && { ExecutionRole: input.ExecutionRole }), - ...(input.JupyterServerAppSettings != null && { - JupyterServerAppSettings: se_JupyterServerAppSettings(input.JupyterServerAppSettings, context), - }), - ...(input.KernelGatewayAppSettings != null && { - KernelGatewayAppSettings: se_KernelGatewayAppSettings(input.KernelGatewayAppSettings, context), - }), - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroupIds(input.SecurityGroups, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteActionRequest - */ -const se_DeleteActionRequest = (input: DeleteActionRequest, context: __SerdeContext): any => { - return { - ...(input.ActionName != null && { ActionName: input.ActionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteAlgorithmInput - */ -const se_DeleteAlgorithmInput = (input: DeleteAlgorithmInput, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - }; -}; - -/** - * serializeAws_json1_1DeleteAppImageConfigRequest - */ -const se_DeleteAppImageConfigRequest = (input: DeleteAppImageConfigRequest, context: __SerdeContext): any => { - return { - ...(input.AppImageConfigName != null && { AppImageConfigName: input.AppImageConfigName }), - }; -}; - -/** - * serializeAws_json1_1DeleteAppRequest - */ -const se_DeleteAppRequest = (input: DeleteAppRequest, context: __SerdeContext): any => { - return { - ...(input.AppName != null && { AppName: input.AppName }), - ...(input.AppType != null && { AppType: input.AppType }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - }; -}; - -/** - * serializeAws_json1_1DeleteArtifactRequest - */ -const se_DeleteArtifactRequest = (input: DeleteArtifactRequest, context: __SerdeContext): any => { - return { - ...(input.ArtifactArn != null && { ArtifactArn: input.ArtifactArn }), - ...(input.Source != null && { Source: se_ArtifactSource(input.Source, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteAssociationRequest - */ -const se_DeleteAssociationRequest = (input: DeleteAssociationRequest, context: __SerdeContext): any => { - return { - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteCodeRepositoryInput - */ -const se_DeleteCodeRepositoryInput = (input: DeleteCodeRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.CodeRepositoryName != null && { CodeRepositoryName: input.CodeRepositoryName }), - }; -}; - -/** - * serializeAws_json1_1DeleteContextRequest - */ -const se_DeleteContextRequest = (input: DeleteContextRequest, context: __SerdeContext): any => { - return { - ...(input.ContextName != null && { ContextName: input.ContextName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDataQualityJobDefinitionRequest - */ -const se_DeleteDataQualityJobDefinitionRequest = ( - input: DeleteDataQualityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDeviceFleetRequest - */ -const se_DeleteDeviceFleetRequest = (input: DeleteDeviceFleetRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - }; -}; - -/** - * serializeAws_json1_1DeleteDomainRequest - */ -const se_DeleteDomainRequest = (input: DeleteDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.RetentionPolicy != null && { RetentionPolicy: se_RetentionPolicy(input.RetentionPolicy, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteEdgeDeploymentPlanRequest - */ -const se_DeleteEdgeDeploymentPlanRequest = (input: DeleteEdgeDeploymentPlanRequest, context: __SerdeContext): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - }; -}; - -/** - * serializeAws_json1_1DeleteEdgeDeploymentStageRequest - */ -const se_DeleteEdgeDeploymentStageRequest = (input: DeleteEdgeDeploymentStageRequest, context: __SerdeContext): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.StageName != null && { StageName: input.StageName }), - }; -}; - -/** - * serializeAws_json1_1DeleteEndpointConfigInput - */ -const se_DeleteEndpointConfigInput = (input: DeleteEndpointConfigInput, context: __SerdeContext): any => { - return { - ...(input.EndpointConfigName != null && { EndpointConfigName: input.EndpointConfigName }), - }; -}; - -/** - * serializeAws_json1_1DeleteEndpointInput - */ -const se_DeleteEndpointInput = (input: DeleteEndpointInput, context: __SerdeContext): any => { - return { - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; -}; - -/** - * serializeAws_json1_1DeleteExperimentRequest - */ -const se_DeleteExperimentRequest = (input: DeleteExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - }; -}; - -/** - * serializeAws_json1_1DeleteFeatureGroupRequest - */ -const se_DeleteFeatureGroupRequest = (input: DeleteFeatureGroupRequest, context: __SerdeContext): any => { - return { - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - }; -}; - -/** - * serializeAws_json1_1DeleteFlowDefinitionRequest - */ -const se_DeleteFlowDefinitionRequest = (input: DeleteFlowDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.FlowDefinitionName != null && { FlowDefinitionName: input.FlowDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteHubContentRequest - */ -const se_DeleteHubContentRequest = (input: DeleteHubContentRequest, context: __SerdeContext): any => { - return { - ...(input.HubContentName != null && { HubContentName: input.HubContentName }), - ...(input.HubContentType != null && { HubContentType: input.HubContentType }), - ...(input.HubContentVersion != null && { HubContentVersion: input.HubContentVersion }), - ...(input.HubName != null && { HubName: input.HubName }), - }; -}; - -/** - * serializeAws_json1_1DeleteHubRequest - */ -const se_DeleteHubRequest = (input: DeleteHubRequest, context: __SerdeContext): any => { - return { - ...(input.HubName != null && { HubName: input.HubName }), - }; -}; - -/** - * serializeAws_json1_1DeleteHumanTaskUiRequest - */ -const se_DeleteHumanTaskUiRequest = (input: DeleteHumanTaskUiRequest, context: __SerdeContext): any => { - return { - ...(input.HumanTaskUiName != null && { HumanTaskUiName: input.HumanTaskUiName }), - }; -}; - -/** - * serializeAws_json1_1DeleteImageRequest - */ -const se_DeleteImageRequest = (input: DeleteImageRequest, context: __SerdeContext): any => { - return { - ...(input.ImageName != null && { ImageName: input.ImageName }), - }; -}; - -/** - * serializeAws_json1_1DeleteImageVersionRequest - */ -const se_DeleteImageVersionRequest = (input: DeleteImageVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1DeleteInferenceExperimentRequest - */ -const se_DeleteInferenceExperimentRequest = (input: DeleteInferenceExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelBiasJobDefinitionRequest - */ -const se_DeleteModelBiasJobDefinitionRequest = ( - input: DeleteModelBiasJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelCardRequest - */ -const se_DeleteModelCardRequest = (input: DeleteModelCardRequest, context: __SerdeContext): any => { - return { - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelExplainabilityJobDefinitionRequest - */ -const se_DeleteModelExplainabilityJobDefinitionRequest = ( - input: DeleteModelExplainabilityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelInput - */ -const se_DeleteModelInput = (input: DeleteModelInput, context: __SerdeContext): any => { - return { - ...(input.ModelName != null && { ModelName: input.ModelName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelPackageGroupInput - */ -const se_DeleteModelPackageGroupInput = (input: DeleteModelPackageGroupInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelPackageGroupPolicyInput - */ -const se_DeleteModelPackageGroupPolicyInput = ( - input: DeleteModelPackageGroupPolicyInput, - context: __SerdeContext -): any => { - return { - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelPackageInput - */ -const se_DeleteModelPackageInput = (input: DeleteModelPackageInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageName != null && { ModelPackageName: input.ModelPackageName }), - }; -}; - -/** - * serializeAws_json1_1DeleteModelQualityJobDefinitionRequest - */ -const se_DeleteModelQualityJobDefinitionRequest = ( - input: DeleteModelQualityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteMonitoringScheduleRequest - */ -const se_DeleteMonitoringScheduleRequest = (input: DeleteMonitoringScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - }; -}; - -/** - * serializeAws_json1_1DeleteNotebookInstanceInput - */ -const se_DeleteNotebookInstanceInput = (input: DeleteNotebookInstanceInput, context: __SerdeContext): any => { - return { - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteNotebookInstanceLifecycleConfigInput - */ -const se_DeleteNotebookInstanceLifecycleConfigInput = ( - input: DeleteNotebookInstanceLifecycleConfigInput, - context: __SerdeContext -): any => { - return { - ...(input.NotebookInstanceLifecycleConfigName != null && { - NotebookInstanceLifecycleConfigName: input.NotebookInstanceLifecycleConfigName, - }), - }; -}; - -/** - * serializeAws_json1_1DeletePipelineRequest - */ -const se_DeletePipelineRequest = (input: DeletePipelineRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.PipelineName != null && { PipelineName: input.PipelineName }), - }; -}; - -/** - * serializeAws_json1_1DeleteProjectInput - */ -const se_DeleteProjectInput = (input: DeleteProjectInput, context: __SerdeContext): any => { - return { - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - }; -}; - -/** - * serializeAws_json1_1DeleteSpaceRequest - */ -const se_DeleteSpaceRequest = (input: DeleteSpaceRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteStudioLifecycleConfigRequest - */ -const se_DeleteStudioLifecycleConfigRequest = ( - input: DeleteStudioLifecycleConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.StudioLifecycleConfigName != null && { StudioLifecycleConfigName: input.StudioLifecycleConfigName }), - }; -}; - -/** - * serializeAws_json1_1DeleteTagsInput - */ -const se_DeleteTagsInput = (input: DeleteTagsInput, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteTrialComponentRequest - */ -const se_DeleteTrialComponentRequest = (input: DeleteTrialComponentRequest, context: __SerdeContext): any => { - return { - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - }; -}; - -/** - * serializeAws_json1_1DeleteTrialRequest - */ -const se_DeleteTrialRequest = (input: DeleteTrialRequest, context: __SerdeContext): any => { - return { - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; - -/** - * serializeAws_json1_1DeleteUserProfileRequest - */ -const se_DeleteUserProfileRequest = (input: DeleteUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - }; -}; - -/** - * serializeAws_json1_1DeleteWorkforceRequest - */ -const se_DeleteWorkforceRequest = (input: DeleteWorkforceRequest, context: __SerdeContext): any => { - return { - ...(input.WorkforceName != null && { WorkforceName: input.WorkforceName }), - }; -}; - -/** - * serializeAws_json1_1DeleteWorkteamRequest - */ -const se_DeleteWorkteamRequest = (input: DeleteWorkteamRequest, context: __SerdeContext): any => { - return { - ...(input.WorkteamName != null && { WorkteamName: input.WorkteamName }), - }; -}; - -/** - * serializeAws_json1_1DeploymentConfig - */ -const se_DeploymentConfig = (input: DeploymentConfig, context: __SerdeContext): any => { - return { - ...(input.AutoRollbackConfiguration != null && { - AutoRollbackConfiguration: se_AutoRollbackConfig(input.AutoRollbackConfiguration, context), - }), - ...(input.BlueGreenUpdatePolicy != null && { - BlueGreenUpdatePolicy: se_BlueGreenUpdatePolicy(input.BlueGreenUpdatePolicy, context), - }), - }; -}; - -/** - * serializeAws_json1_1DeploymentStage - */ -const se_DeploymentStage = (input: DeploymentStage, context: __SerdeContext): any => { - return { - ...(input.DeploymentConfig != null && { - DeploymentConfig: se_EdgeDeploymentConfig(input.DeploymentConfig, context), - }), - ...(input.DeviceSelectionConfig != null && { - DeviceSelectionConfig: se_DeviceSelectionConfig(input.DeviceSelectionConfig, context), - }), - ...(input.StageName != null && { StageName: input.StageName }), - }; -}; - -/** - * serializeAws_json1_1DeploymentStages - */ -const se_DeploymentStages = (input: DeploymentStage[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeploymentStage(entry, context); - }); -}; - -/** - * serializeAws_json1_1DeregisterDevicesRequest - */ -const se_DeregisterDevicesRequest = (input: DeregisterDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.DeviceNames != null && { DeviceNames: se_DeviceNames(input.DeviceNames, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeActionRequest - */ -const se_DescribeActionRequest = (input: DescribeActionRequest, context: __SerdeContext): any => { - return { - ...(input.ActionName != null && { ActionName: input.ActionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeAlgorithmInput - */ -const se_DescribeAlgorithmInput = (input: DescribeAlgorithmInput, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - }; -}; - -/** - * serializeAws_json1_1DescribeAppImageConfigRequest - */ -const se_DescribeAppImageConfigRequest = (input: DescribeAppImageConfigRequest, context: __SerdeContext): any => { - return { - ...(input.AppImageConfigName != null && { AppImageConfigName: input.AppImageConfigName }), - }; -}; - -/** - * serializeAws_json1_1DescribeAppRequest - */ -const se_DescribeAppRequest = (input: DescribeAppRequest, context: __SerdeContext): any => { - return { - ...(input.AppName != null && { AppName: input.AppName }), - ...(input.AppType != null && { AppType: input.AppType }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - }; -}; - -/** - * serializeAws_json1_1DescribeArtifactRequest - */ -const se_DescribeArtifactRequest = (input: DescribeArtifactRequest, context: __SerdeContext): any => { - return { - ...(input.ArtifactArn != null && { ArtifactArn: input.ArtifactArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeAutoMLJobRequest - */ -const se_DescribeAutoMLJobRequest = (input: DescribeAutoMLJobRequest, context: __SerdeContext): any => { - return { - ...(input.AutoMLJobName != null && { AutoMLJobName: input.AutoMLJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeAutoMLJobV2Request - */ -const se_DescribeAutoMLJobV2Request = (input: DescribeAutoMLJobV2Request, context: __SerdeContext): any => { - return { - ...(input.AutoMLJobName != null && { AutoMLJobName: input.AutoMLJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeCodeRepositoryInput - */ -const se_DescribeCodeRepositoryInput = (input: DescribeCodeRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.CodeRepositoryName != null && { CodeRepositoryName: input.CodeRepositoryName }), - }; -}; - -/** - * serializeAws_json1_1DescribeCompilationJobRequest - */ -const se_DescribeCompilationJobRequest = (input: DescribeCompilationJobRequest, context: __SerdeContext): any => { - return { - ...(input.CompilationJobName != null && { CompilationJobName: input.CompilationJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeContextRequest - */ -const se_DescribeContextRequest = (input: DescribeContextRequest, context: __SerdeContext): any => { - return { - ...(input.ContextName != null && { ContextName: input.ContextName }), - }; -}; - -/** - * serializeAws_json1_1DescribeDataQualityJobDefinitionRequest - */ -const se_DescribeDataQualityJobDefinitionRequest = ( - input: DescribeDataQualityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeDeviceFleetRequest - */ -const se_DescribeDeviceFleetRequest = (input: DescribeDeviceFleetRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - }; -}; - -/** - * serializeAws_json1_1DescribeDeviceRequest - */ -const se_DescribeDeviceRequest = (input: DescribeDeviceRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeDomainRequest - */ -const se_DescribeDomainRequest = (input: DescribeDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - }; -}; - -/** - * serializeAws_json1_1DescribeEdgeDeploymentPlanRequest - */ -const se_DescribeEdgeDeploymentPlanRequest = ( - input: DescribeEdgeDeploymentPlanRequest, - context: __SerdeContext -): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeEdgePackagingJobRequest - */ -const se_DescribeEdgePackagingJobRequest = (input: DescribeEdgePackagingJobRequest, context: __SerdeContext): any => { - return { - ...(input.EdgePackagingJobName != null && { EdgePackagingJobName: input.EdgePackagingJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeEndpointConfigInput - */ -const se_DescribeEndpointConfigInput = (input: DescribeEndpointConfigInput, context: __SerdeContext): any => { - return { - ...(input.EndpointConfigName != null && { EndpointConfigName: input.EndpointConfigName }), - }; -}; - -/** - * serializeAws_json1_1DescribeEndpointInput - */ -const se_DescribeEndpointInput = (input: DescribeEndpointInput, context: __SerdeContext): any => { - return { - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; -}; - -/** - * serializeAws_json1_1DescribeExperimentRequest - */ -const se_DescribeExperimentRequest = (input: DescribeExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - }; -}; - -/** - * serializeAws_json1_1DescribeFeatureGroupRequest - */ -const se_DescribeFeatureGroupRequest = (input: DescribeFeatureGroupRequest, context: __SerdeContext): any => { - return { - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeFeatureMetadataRequest - */ -const se_DescribeFeatureMetadataRequest = (input: DescribeFeatureMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - ...(input.FeatureName != null && { FeatureName: input.FeatureName }), - }; -}; - -/** - * serializeAws_json1_1DescribeFlowDefinitionRequest - */ -const se_DescribeFlowDefinitionRequest = (input: DescribeFlowDefinitionRequest, context: __SerdeContext): any => { - return { - ...(input.FlowDefinitionName != null && { FlowDefinitionName: input.FlowDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeHubContentRequest - */ -const se_DescribeHubContentRequest = (input: DescribeHubContentRequest, context: __SerdeContext): any => { - return { - ...(input.HubContentName != null && { HubContentName: input.HubContentName }), - ...(input.HubContentType != null && { HubContentType: input.HubContentType }), - ...(input.HubContentVersion != null && { HubContentVersion: input.HubContentVersion }), - ...(input.HubName != null && { HubName: input.HubName }), - }; -}; - -/** - * serializeAws_json1_1DescribeHubRequest - */ -const se_DescribeHubRequest = (input: DescribeHubRequest, context: __SerdeContext): any => { - return { - ...(input.HubName != null && { HubName: input.HubName }), - }; -}; - -/** - * serializeAws_json1_1DescribeHumanTaskUiRequest - */ -const se_DescribeHumanTaskUiRequest = (input: DescribeHumanTaskUiRequest, context: __SerdeContext): any => { - return { - ...(input.HumanTaskUiName != null && { HumanTaskUiName: input.HumanTaskUiName }), - }; -}; - -/** - * serializeAws_json1_1DescribeHyperParameterTuningJobRequest - */ -const se_DescribeHyperParameterTuningJobRequest = ( - input: DescribeHyperParameterTuningJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.HyperParameterTuningJobName != null && { - HyperParameterTuningJobName: input.HyperParameterTuningJobName, - }), - }; -}; - -/** - * serializeAws_json1_1DescribeImageRequest - */ -const se_DescribeImageRequest = (input: DescribeImageRequest, context: __SerdeContext): any => { - return { - ...(input.ImageName != null && { ImageName: input.ImageName }), - }; -}; - -/** - * serializeAws_json1_1DescribeImageVersionRequest - */ -const se_DescribeImageVersionRequest = (input: DescribeImageVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1DescribeInferenceExperimentRequest - */ -const se_DescribeInferenceExperimentRequest = ( - input: DescribeInferenceExperimentRequest, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DescribeInferenceRecommendationsJobRequest - */ -const se_DescribeInferenceRecommendationsJobRequest = ( - input: DescribeInferenceRecommendationsJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeLabelingJobRequest - */ -const se_DescribeLabelingJobRequest = (input: DescribeLabelingJobRequest, context: __SerdeContext): any => { - return { - ...(input.LabelingJobName != null && { LabelingJobName: input.LabelingJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeLineageGroupRequest - */ -const se_DescribeLineageGroupRequest = (input: DescribeLineageGroupRequest, context: __SerdeContext): any => { - return { - ...(input.LineageGroupName != null && { LineageGroupName: input.LineageGroupName }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelBiasJobDefinitionRequest - */ -const se_DescribeModelBiasJobDefinitionRequest = ( - input: DescribeModelBiasJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelCardExportJobRequest - */ -const se_DescribeModelCardExportJobRequest = ( - input: DescribeModelCardExportJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.ModelCardExportJobArn != null && { ModelCardExportJobArn: input.ModelCardExportJobArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelCardRequest - */ -const se_DescribeModelCardRequest = (input: DescribeModelCardRequest, context: __SerdeContext): any => { - return { - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - ...(input.ModelCardVersion != null && { ModelCardVersion: input.ModelCardVersion }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelExplainabilityJobDefinitionRequest - */ -const se_DescribeModelExplainabilityJobDefinitionRequest = ( - input: DescribeModelExplainabilityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelInput - */ -const se_DescribeModelInput = (input: DescribeModelInput, context: __SerdeContext): any => { - return { - ...(input.ModelName != null && { ModelName: input.ModelName }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelPackageGroupInput - */ -const se_DescribeModelPackageGroupInput = (input: DescribeModelPackageGroupInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelPackageInput - */ -const se_DescribeModelPackageInput = (input: DescribeModelPackageInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageName != null && { ModelPackageName: input.ModelPackageName }), - }; -}; - -/** - * serializeAws_json1_1DescribeModelQualityJobDefinitionRequest - */ -const se_DescribeModelQualityJobDefinitionRequest = ( - input: DescribeModelQualityJobDefinitionRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobDefinitionName != null && { JobDefinitionName: input.JobDefinitionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeMonitoringScheduleRequest - */ -const se_DescribeMonitoringScheduleRequest = ( - input: DescribeMonitoringScheduleRequest, - context: __SerdeContext -): any => { - return { - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - }; -}; - -/** - * serializeAws_json1_1DescribeNotebookInstanceInput - */ -const se_DescribeNotebookInstanceInput = (input: DescribeNotebookInstanceInput, context: __SerdeContext): any => { - return { - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - }; -}; - -/** - * serializeAws_json1_1DescribeNotebookInstanceLifecycleConfigInput - */ -const se_DescribeNotebookInstanceLifecycleConfigInput = ( - input: DescribeNotebookInstanceLifecycleConfigInput, - context: __SerdeContext -): any => { - return { - ...(input.NotebookInstanceLifecycleConfigName != null && { - NotebookInstanceLifecycleConfigName: input.NotebookInstanceLifecycleConfigName, - }), - }; -}; - -/** - * serializeAws_json1_1DescribePipelineDefinitionForExecutionRequest - */ -const se_DescribePipelineDefinitionForExecutionRequest = ( - input: DescribePipelineDefinitionForExecutionRequest, - context: __SerdeContext -): any => { - return { - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - }; -}; - -/** - * serializeAws_json1_1DescribePipelineExecutionRequest - */ -const se_DescribePipelineExecutionRequest = (input: DescribePipelineExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - }; -}; - -/** - * serializeAws_json1_1DescribePipelineRequest - */ -const se_DescribePipelineRequest = (input: DescribePipelineRequest, context: __SerdeContext): any => { - return { - ...(input.PipelineName != null && { PipelineName: input.PipelineName }), - }; -}; - -/** - * serializeAws_json1_1DescribeProcessingJobRequest - */ -const se_DescribeProcessingJobRequest = (input: DescribeProcessingJobRequest, context: __SerdeContext): any => { - return { - ...(input.ProcessingJobName != null && { ProcessingJobName: input.ProcessingJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeProjectInput - */ -const se_DescribeProjectInput = (input: DescribeProjectInput, context: __SerdeContext): any => { - return { - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - }; -}; - -/** - * serializeAws_json1_1DescribeSpaceRequest - */ -const se_DescribeSpaceRequest = (input: DescribeSpaceRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - }; -}; - -/** - * serializeAws_json1_1DescribeStudioLifecycleConfigRequest - */ -const se_DescribeStudioLifecycleConfigRequest = ( - input: DescribeStudioLifecycleConfigRequest, - context: __SerdeContext -): any => { - return { - ...(input.StudioLifecycleConfigName != null && { StudioLifecycleConfigName: input.StudioLifecycleConfigName }), - }; -}; - -/** - * serializeAws_json1_1DescribeSubscribedWorkteamRequest - */ -const se_DescribeSubscribedWorkteamRequest = ( - input: DescribeSubscribedWorkteamRequest, - context: __SerdeContext -): any => { - return { - ...(input.WorkteamArn != null && { WorkteamArn: input.WorkteamArn }), - }; -}; - -/** - * serializeAws_json1_1DescribeTrainingJobRequest - */ -const se_DescribeTrainingJobRequest = (input: DescribeTrainingJobRequest, context: __SerdeContext): any => { - return { - ...(input.TrainingJobName != null && { TrainingJobName: input.TrainingJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeTransformJobRequest - */ -const se_DescribeTransformJobRequest = (input: DescribeTransformJobRequest, context: __SerdeContext): any => { - return { - ...(input.TransformJobName != null && { TransformJobName: input.TransformJobName }), - }; -}; - -/** - * serializeAws_json1_1DescribeTrialComponentRequest - */ -const se_DescribeTrialComponentRequest = (input: DescribeTrialComponentRequest, context: __SerdeContext): any => { - return { - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - }; -}; - -/** - * serializeAws_json1_1DescribeTrialRequest - */ -const se_DescribeTrialRequest = (input: DescribeTrialRequest, context: __SerdeContext): any => { - return { - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; - -/** - * serializeAws_json1_1DescribeUserProfileRequest - */ -const se_DescribeUserProfileRequest = (input: DescribeUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - }; -}; - -/** - * serializeAws_json1_1DescribeWorkforceRequest - */ -const se_DescribeWorkforceRequest = (input: DescribeWorkforceRequest, context: __SerdeContext): any => { - return { - ...(input.WorkforceName != null && { WorkforceName: input.WorkforceName }), - }; -}; - -/** - * serializeAws_json1_1DescribeWorkteamRequest - */ -const se_DescribeWorkteamRequest = (input: DescribeWorkteamRequest, context: __SerdeContext): any => { - return { - ...(input.WorkteamName != null && { WorkteamName: input.WorkteamName }), - }; -}; - -/** - * serializeAws_json1_1DesiredWeightAndCapacity - */ -const se_DesiredWeightAndCapacity = (input: DesiredWeightAndCapacity, context: __SerdeContext): any => { - return { - ...(input.DesiredInstanceCount != null && { DesiredInstanceCount: input.DesiredInstanceCount }), - ...(input.DesiredWeight != null && { DesiredWeight: __serializeFloat(input.DesiredWeight) }), - ...(input.VariantName != null && { VariantName: input.VariantName }), - }; -}; - -/** - * serializeAws_json1_1DesiredWeightAndCapacityList - */ -const se_DesiredWeightAndCapacityList = (input: DesiredWeightAndCapacity[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DesiredWeightAndCapacity(entry, context); - }); -}; - -/** - * serializeAws_json1_1Device - */ -const se_Device = (input: Device, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.IotThingName != null && { IotThingName: input.IotThingName }), - }; -}; - -/** - * serializeAws_json1_1DeviceNames - */ -const se_DeviceNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Devices - */ -const se_Devices = (input: Device[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Device(entry, context); - }); -}; - -/** - * serializeAws_json1_1DeviceSelectionConfig - */ -const se_DeviceSelectionConfig = (input: DeviceSelectionConfig, context: __SerdeContext): any => { - return { - ...(input.DeviceNameContains != null && { DeviceNameContains: input.DeviceNameContains }), - ...(input.DeviceNames != null && { DeviceNames: se_DeviceNames(input.DeviceNames, context) }), - ...(input.DeviceSubsetType != null && { DeviceSubsetType: input.DeviceSubsetType }), - ...(input.Percentage != null && { Percentage: input.Percentage }), - }; -}; - -/** - * serializeAws_json1_1DisableSagemakerServicecatalogPortfolioInput - */ -const se_DisableSagemakerServicecatalogPortfolioInput = ( - input: DisableSagemakerServicecatalogPortfolioInput, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_json1_1DisassociateTrialComponentRequest - */ -const se_DisassociateTrialComponentRequest = ( - input: DisassociateTrialComponentRequest, - context: __SerdeContext -): any => { - return { - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; - -/** - * serializeAws_json1_1DomainSecurityGroupIds - */ -const se_DomainSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1DomainSettings - */ -const se_DomainSettings = (input: DomainSettings, context: __SerdeContext): any => { - return { - ...(input.ExecutionRoleIdentityConfig != null && { - ExecutionRoleIdentityConfig: input.ExecutionRoleIdentityConfig, - }), - ...(input.RStudioServerProDomainSettings != null && { - RStudioServerProDomainSettings: se_RStudioServerProDomainSettings(input.RStudioServerProDomainSettings, context), - }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_DomainSecurityGroupIds(input.SecurityGroupIds, context), - }), - }; -}; - -/** - * serializeAws_json1_1DomainSettingsForUpdate - */ -const se_DomainSettingsForUpdate = (input: DomainSettingsForUpdate, context: __SerdeContext): any => { - return { - ...(input.ExecutionRoleIdentityConfig != null && { - ExecutionRoleIdentityConfig: input.ExecutionRoleIdentityConfig, - }), - ...(input.RStudioServerProDomainSettingsForUpdate != null && { - RStudioServerProDomainSettingsForUpdate: se_RStudioServerProDomainSettingsForUpdate( - input.RStudioServerProDomainSettingsForUpdate, - context - ), - }), - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_DomainSecurityGroupIds(input.SecurityGroupIds, context), - }), - }; -}; - -/** - * serializeAws_json1_1DriftCheckBaselines - */ -const se_DriftCheckBaselines = (input: DriftCheckBaselines, context: __SerdeContext): any => { - return { - ...(input.Bias != null && { Bias: se_DriftCheckBias(input.Bias, context) }), - ...(input.Explainability != null && { Explainability: se_DriftCheckExplainability(input.Explainability, context) }), - ...(input.ModelDataQuality != null && { - ModelDataQuality: se_DriftCheckModelDataQuality(input.ModelDataQuality, context), - }), - ...(input.ModelQuality != null && { ModelQuality: se_DriftCheckModelQuality(input.ModelQuality, context) }), - }; -}; - -/** - * serializeAws_json1_1DriftCheckBias - */ -const se_DriftCheckBias = (input: DriftCheckBias, context: __SerdeContext): any => { - return { - ...(input.ConfigFile != null && { ConfigFile: se_FileSource(input.ConfigFile, context) }), - ...(input.PostTrainingConstraints != null && { - PostTrainingConstraints: se_MetricsSource(input.PostTrainingConstraints, context), - }), - ...(input.PreTrainingConstraints != null && { - PreTrainingConstraints: se_MetricsSource(input.PreTrainingConstraints, context), - }), - }; -}; - -/** - * serializeAws_json1_1DriftCheckExplainability - */ -const se_DriftCheckExplainability = (input: DriftCheckExplainability, context: __SerdeContext): any => { - return { - ...(input.ConfigFile != null && { ConfigFile: se_FileSource(input.ConfigFile, context) }), - ...(input.Constraints != null && { Constraints: se_MetricsSource(input.Constraints, context) }), - }; -}; - -/** - * serializeAws_json1_1DriftCheckModelDataQuality - */ -const se_DriftCheckModelDataQuality = (input: DriftCheckModelDataQuality, context: __SerdeContext): any => { - return { - ...(input.Constraints != null && { Constraints: se_MetricsSource(input.Constraints, context) }), - ...(input.Statistics != null && { Statistics: se_MetricsSource(input.Statistics, context) }), - }; -}; - -/** - * serializeAws_json1_1DriftCheckModelQuality - */ -const se_DriftCheckModelQuality = (input: DriftCheckModelQuality, context: __SerdeContext): any => { - return { - ...(input.Constraints != null && { Constraints: se_MetricsSource(input.Constraints, context) }), - ...(input.Statistics != null && { Statistics: se_MetricsSource(input.Statistics, context) }), - }; -}; - -/** - * serializeAws_json1_1EdgeDeploymentConfig - */ -const se_EdgeDeploymentConfig = (input: EdgeDeploymentConfig, context: __SerdeContext): any => { - return { - ...(input.FailureHandlingPolicy != null && { FailureHandlingPolicy: input.FailureHandlingPolicy }), - }; -}; - -/** - * serializeAws_json1_1EdgeDeploymentModelConfig - */ -const se_EdgeDeploymentModelConfig = (input: EdgeDeploymentModelConfig, context: __SerdeContext): any => { - return { - ...(input.EdgePackagingJobName != null && { EdgePackagingJobName: input.EdgePackagingJobName }), - ...(input.ModelHandle != null && { ModelHandle: input.ModelHandle }), - }; -}; - -/** - * serializeAws_json1_1EdgeDeploymentModelConfigs - */ -const se_EdgeDeploymentModelConfigs = (input: EdgeDeploymentModelConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EdgeDeploymentModelConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1EdgeOutputConfig - */ -const se_EdgeOutputConfig = (input: EdgeOutputConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.PresetDeploymentConfig != null && { PresetDeploymentConfig: input.PresetDeploymentConfig }), - ...(input.PresetDeploymentType != null && { PresetDeploymentType: input.PresetDeploymentType }), - ...(input.S3OutputLocation != null && { S3OutputLocation: input.S3OutputLocation }), - }; -}; - -/** - * serializeAws_json1_1EnableSagemakerServicecatalogPortfolioInput - */ -const se_EnableSagemakerServicecatalogPortfolioInput = ( - input: EnableSagemakerServicecatalogPortfolioInput, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_json1_1EndpointInfo - */ -const se_EndpointInfo = (input: EndpointInfo, context: __SerdeContext): any => { - return { - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; -}; - -/** - * serializeAws_json1_1EndpointInput - */ -const se_EndpointInput = (input: EndpointInput, context: __SerdeContext): any => { - return { - ...(input.EndTimeOffset != null && { EndTimeOffset: input.EndTimeOffset }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.FeaturesAttribute != null && { FeaturesAttribute: input.FeaturesAttribute }), - ...(input.InferenceAttribute != null && { InferenceAttribute: input.InferenceAttribute }), - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.ProbabilityAttribute != null && { ProbabilityAttribute: input.ProbabilityAttribute }), - ...(input.ProbabilityThresholdAttribute != null && { - ProbabilityThresholdAttribute: __serializeFloat(input.ProbabilityThresholdAttribute), - }), - ...(input.S3DataDistributionType != null && { S3DataDistributionType: input.S3DataDistributionType }), - ...(input.S3InputMode != null && { S3InputMode: input.S3InputMode }), - ...(input.StartTimeOffset != null && { StartTimeOffset: input.StartTimeOffset }), - }; -}; - -/** - * serializeAws_json1_1EndpointInputConfiguration - */ -const se_EndpointInputConfiguration = (input: EndpointInputConfiguration, context: __SerdeContext): any => { - return { - ...(input.EnvironmentParameterRanges != null && { - EnvironmentParameterRanges: se_EnvironmentParameterRanges(input.EnvironmentParameterRanges, context), - }), - ...(input.InferenceSpecificationName != null && { InferenceSpecificationName: input.InferenceSpecificationName }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - }; -}; - -/** - * serializeAws_json1_1EndpointInputConfigurations - */ -const se_EndpointInputConfigurations = (input: EndpointInputConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EndpointInputConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1Endpoints - */ -const se_Endpoints = (input: EndpointInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EndpointInfo(entry, context); - }); -}; - -/** - * serializeAws_json1_1EnvironmentMap - */ -const se_EnvironmentMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1EnvironmentParameterRanges - */ -const se_EnvironmentParameterRanges = (input: EnvironmentParameterRanges, context: __SerdeContext): any => { - return { - ...(input.CategoricalParameterRanges != null && { - CategoricalParameterRanges: se_CategoricalParameters(input.CategoricalParameterRanges, context), - }), - }; -}; - -/** - * serializeAws_json1_1ExperimentConfig - */ -const se_ExperimentConfig = (input: ExperimentConfig, context: __SerdeContext): any => { - return { - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - ...(input.RunName != null && { RunName: input.RunName }), - ...(input.TrialComponentDisplayName != null && { TrialComponentDisplayName: input.TrialComponentDisplayName }), - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; - -/** - * serializeAws_json1_1Explainability - */ -const se_Explainability = (input: Explainability, context: __SerdeContext): any => { - return { - ...(input.Report != null && { Report: se_MetricsSource(input.Report, context) }), - }; -}; - -/** - * serializeAws_json1_1ExplainerConfig - */ -const se_ExplainerConfig = (input: ExplainerConfig, context: __SerdeContext): any => { - return { - ...(input.ClarifyExplainerConfig != null && { - ClarifyExplainerConfig: se_ClarifyExplainerConfig(input.ClarifyExplainerConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1FeatureAdditions - */ -const se_FeatureAdditions = (input: FeatureDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FeatureDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1FeatureDefinition - */ -const se_FeatureDefinition = (input: FeatureDefinition, context: __SerdeContext): any => { - return { - ...(input.FeatureName != null && { FeatureName: input.FeatureName }), - ...(input.FeatureType != null && { FeatureType: input.FeatureType }), - }; -}; - -/** - * serializeAws_json1_1FeatureDefinitions - */ -const se_FeatureDefinitions = (input: FeatureDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FeatureDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1FeatureParameter - */ -const se_FeatureParameter = (input: FeatureParameter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1FeatureParameterAdditions - */ -const se_FeatureParameterAdditions = (input: FeatureParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FeatureParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1FeatureParameterRemovals - */ -const se_FeatureParameterRemovals = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1FileSource - */ -const se_FileSource = (input: FileSource, context: __SerdeContext): any => { - return { - ...(input.ContentDigest != null && { ContentDigest: input.ContentDigest }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1FileSystemConfig - */ -const se_FileSystemConfig = (input: FileSystemConfig, context: __SerdeContext): any => { - return { - ...(input.DefaultGid != null && { DefaultGid: input.DefaultGid }), - ...(input.DefaultUid != null && { DefaultUid: input.DefaultUid }), - ...(input.MountPath != null && { MountPath: input.MountPath }), - }; -}; - -/** - * serializeAws_json1_1FileSystemDataSource - */ -const se_FileSystemDataSource = (input: FileSystemDataSource, context: __SerdeContext): any => { - return { - ...(input.DirectoryPath != null && { DirectoryPath: input.DirectoryPath }), - ...(input.FileSystemAccessMode != null && { FileSystemAccessMode: input.FileSystemAccessMode }), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.FileSystemType != null && { FileSystemType: input.FileSystemType }), - }; -}; - -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; - -/** - * serializeAws_json1_1FlowDefinitionOutputConfig - */ -const se_FlowDefinitionOutputConfig = (input: FlowDefinitionOutputConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1FlowDefinitionTaskKeywords - */ -const se_FlowDefinitionTaskKeywords = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1GetDeviceFleetReportRequest - */ -const se_GetDeviceFleetReportRequest = (input: GetDeviceFleetReportRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - }; -}; - -/** - * serializeAws_json1_1GetLineageGroupPolicyRequest - */ -const se_GetLineageGroupPolicyRequest = (input: GetLineageGroupPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.LineageGroupName != null && { LineageGroupName: input.LineageGroupName }), - }; -}; - -/** - * serializeAws_json1_1GetModelPackageGroupPolicyInput - */ -const se_GetModelPackageGroupPolicyInput = (input: GetModelPackageGroupPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - }; -}; - -/** - * serializeAws_json1_1GetSagemakerServicecatalogPortfolioStatusInput - */ -const se_GetSagemakerServicecatalogPortfolioStatusInput = ( - input: GetSagemakerServicecatalogPortfolioStatusInput, - context: __SerdeContext -): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetSearchSuggestionsRequest - */ -const se_GetSearchSuggestionsRequest = (input: GetSearchSuggestionsRequest, context: __SerdeContext): any => { - return { - ...(input.Resource != null && { Resource: input.Resource }), - ...(input.SuggestionQuery != null && { SuggestionQuery: se_SuggestionQuery(input.SuggestionQuery, context) }), - }; -}; - -/** - * serializeAws_json1_1GitConfig - */ -const se_GitConfig = (input: GitConfig, context: __SerdeContext): any => { - return { - ...(input.Branch != null && { Branch: input.Branch }), - ...(input.RepositoryUrl != null && { RepositoryUrl: input.RepositoryUrl }), - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - }; -}; - -/** - * serializeAws_json1_1GitConfigForUpdate - */ -const se_GitConfigForUpdate = (input: GitConfigForUpdate, context: __SerdeContext): any => { - return { - ...(input.SecretArn != null && { SecretArn: input.SecretArn }), - }; -}; - -/** - * serializeAws_json1_1Groups - */ -const se_Groups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1HookParameters - */ -const se_HookParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1HubContentSearchKeywordList - */ -const se_HubContentSearchKeywordList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1HubS3StorageConfig - */ -const se_HubS3StorageConfig = (input: HubS3StorageConfig, context: __SerdeContext): any => { - return { - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1HubSearchKeywordList - */ -const se_HubSearchKeywordList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1HumanLoopActivationConditionsConfig - */ -const se_HumanLoopActivationConditionsConfig = ( - input: HumanLoopActivationConditionsConfig, - context: __SerdeContext -): any => { - return { - ...(input.HumanLoopActivationConditions != null && { - HumanLoopActivationConditions: __LazyJsonString.fromObject(input.HumanLoopActivationConditions), - }), - }; -}; - -/** - * serializeAws_json1_1HumanLoopActivationConfig - */ -const se_HumanLoopActivationConfig = (input: HumanLoopActivationConfig, context: __SerdeContext): any => { - return { - ...(input.HumanLoopActivationConditionsConfig != null && { - HumanLoopActivationConditionsConfig: se_HumanLoopActivationConditionsConfig( - input.HumanLoopActivationConditionsConfig, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1HumanLoopConfig - */ -const se_HumanLoopConfig = (input: HumanLoopConfig, context: __SerdeContext): any => { - return { - ...(input.HumanTaskUiArn != null && { HumanTaskUiArn: input.HumanTaskUiArn }), - ...(input.PublicWorkforceTaskPrice != null && { - PublicWorkforceTaskPrice: se_PublicWorkforceTaskPrice(input.PublicWorkforceTaskPrice, context), - }), - ...(input.TaskAvailabilityLifetimeInSeconds != null && { - TaskAvailabilityLifetimeInSeconds: input.TaskAvailabilityLifetimeInSeconds, - }), - ...(input.TaskCount != null && { TaskCount: input.TaskCount }), - ...(input.TaskDescription != null && { TaskDescription: input.TaskDescription }), - ...(input.TaskKeywords != null && { TaskKeywords: se_FlowDefinitionTaskKeywords(input.TaskKeywords, context) }), - ...(input.TaskTimeLimitInSeconds != null && { TaskTimeLimitInSeconds: input.TaskTimeLimitInSeconds }), - ...(input.TaskTitle != null && { TaskTitle: input.TaskTitle }), - ...(input.WorkteamArn != null && { WorkteamArn: input.WorkteamArn }), - }; -}; - -/** - * serializeAws_json1_1HumanLoopRequestSource - */ -const se_HumanLoopRequestSource = (input: HumanLoopRequestSource, context: __SerdeContext): any => { - return { - ...(input.AwsManagedHumanLoopRequestSource != null && { - AwsManagedHumanLoopRequestSource: input.AwsManagedHumanLoopRequestSource, - }), - }; -}; - -/** - * serializeAws_json1_1HumanTaskConfig - */ -const se_HumanTaskConfig = (input: HumanTaskConfig, context: __SerdeContext): any => { - return { - ...(input.AnnotationConsolidationConfig != null && { - AnnotationConsolidationConfig: se_AnnotationConsolidationConfig(input.AnnotationConsolidationConfig, context), - }), - ...(input.MaxConcurrentTaskCount != null && { MaxConcurrentTaskCount: input.MaxConcurrentTaskCount }), - ...(input.NumberOfHumanWorkersPerDataObject != null && { - NumberOfHumanWorkersPerDataObject: input.NumberOfHumanWorkersPerDataObject, - }), - ...(input.PreHumanTaskLambdaArn != null && { PreHumanTaskLambdaArn: input.PreHumanTaskLambdaArn }), - ...(input.PublicWorkforceTaskPrice != null && { - PublicWorkforceTaskPrice: se_PublicWorkforceTaskPrice(input.PublicWorkforceTaskPrice, context), - }), - ...(input.TaskAvailabilityLifetimeInSeconds != null && { - TaskAvailabilityLifetimeInSeconds: input.TaskAvailabilityLifetimeInSeconds, - }), - ...(input.TaskDescription != null && { TaskDescription: input.TaskDescription }), - ...(input.TaskKeywords != null && { TaskKeywords: se_TaskKeywords(input.TaskKeywords, context) }), - ...(input.TaskTimeLimitInSeconds != null && { TaskTimeLimitInSeconds: input.TaskTimeLimitInSeconds }), - ...(input.TaskTitle != null && { TaskTitle: input.TaskTitle }), - ...(input.UiConfig != null && { UiConfig: se_UiConfig(input.UiConfig, context) }), - ...(input.WorkteamArn != null && { WorkteamArn: input.WorkteamArn }), - }; -}; - -/** - * serializeAws_json1_1HyperbandStrategyConfig - */ -const se_HyperbandStrategyConfig = (input: HyperbandStrategyConfig, context: __SerdeContext): any => { - return { - ...(input.MaxResource != null && { MaxResource: input.MaxResource }), - ...(input.MinResource != null && { MinResource: input.MinResource }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterAlgorithmSpecification - */ -const se_HyperParameterAlgorithmSpecification = ( - input: HyperParameterAlgorithmSpecification, - context: __SerdeContext -): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.MetricDefinitions != null && { - MetricDefinitions: se_MetricDefinitionList(input.MetricDefinitions, context), - }), - ...(input.TrainingImage != null && { TrainingImage: input.TrainingImage }), - ...(input.TrainingInputMode != null && { TrainingInputMode: input.TrainingInputMode }), - }; -}; - -/** - * serializeAws_json1_1HyperParameters - */ -const se_HyperParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1HyperParameterSpecification - */ -const se_HyperParameterSpecification = (input: HyperParameterSpecification, context: __SerdeContext): any => { - return { - ...(input.DefaultValue != null && { DefaultValue: input.DefaultValue }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IsRequired != null && { IsRequired: input.IsRequired }), - ...(input.IsTunable != null && { IsTunable: input.IsTunable }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Range != null && { Range: se_ParameterRange(input.Range, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterSpecifications - */ -const se_HyperParameterSpecifications = (input: HyperParameterSpecification[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HyperParameterSpecification(entry, context); - }); -}; - -/** - * serializeAws_json1_1HyperParameterTrainingJobDefinition - */ -const se_HyperParameterTrainingJobDefinition = ( - input: HyperParameterTrainingJobDefinition, - context: __SerdeContext -): any => { - return { - ...(input.AlgorithmSpecification != null && { - AlgorithmSpecification: se_HyperParameterAlgorithmSpecification(input.AlgorithmSpecification, context), - }), - ...(input.CheckpointConfig != null && { CheckpointConfig: se_CheckpointConfig(input.CheckpointConfig, context) }), - ...(input.DefinitionName != null && { DefinitionName: input.DefinitionName }), - ...(input.EnableInterContainerTrafficEncryption != null && { - EnableInterContainerTrafficEncryption: input.EnableInterContainerTrafficEncryption, - }), - ...(input.EnableManagedSpotTraining != null && { EnableManagedSpotTraining: input.EnableManagedSpotTraining }), - ...(input.EnableNetworkIsolation != null && { EnableNetworkIsolation: input.EnableNetworkIsolation }), - ...(input.Environment != null && { - Environment: se_HyperParameterTrainingJobEnvironmentMap(input.Environment, context), - }), - ...(input.HyperParameterRanges != null && { - HyperParameterRanges: se_ParameterRanges(input.HyperParameterRanges, context), - }), - ...(input.HyperParameterTuningResourceConfig != null && { - HyperParameterTuningResourceConfig: se_HyperParameterTuningResourceConfig( - input.HyperParameterTuningResourceConfig, - context - ), - }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.ResourceConfig != null && { ResourceConfig: se_ResourceConfig(input.ResourceConfig, context) }), - ...(input.RetryStrategy != null && { RetryStrategy: se_RetryStrategy(input.RetryStrategy, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StaticHyperParameters != null && { - StaticHyperParameters: se_HyperParameters(input.StaticHyperParameters, context), - }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_StoppingCondition(input.StoppingCondition, context), - }), - ...(input.TuningObjective != null && { - TuningObjective: se_HyperParameterTuningJobObjective(input.TuningObjective, context), - }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterTrainingJobDefinitions - */ -const se_HyperParameterTrainingJobDefinitions = ( - input: HyperParameterTrainingJobDefinition[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HyperParameterTrainingJobDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1HyperParameterTrainingJobEnvironmentMap - */ -const se_HyperParameterTrainingJobEnvironmentMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1HyperParameterTuningInstanceConfig - */ -const se_HyperParameterTuningInstanceConfig = ( - input: HyperParameterTuningInstanceConfig, - context: __SerdeContext -): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterTuningInstanceConfigs - */ -const se_HyperParameterTuningInstanceConfigs = ( - input: HyperParameterTuningInstanceConfig[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HyperParameterTuningInstanceConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1HyperParameterTuningJobConfig - */ -const se_HyperParameterTuningJobConfig = (input: HyperParameterTuningJobConfig, context: __SerdeContext): any => { - return { - ...(input.HyperParameterTuningJobObjective != null && { - HyperParameterTuningJobObjective: se_HyperParameterTuningJobObjective( - input.HyperParameterTuningJobObjective, - context - ), - }), - ...(input.ParameterRanges != null && { ParameterRanges: se_ParameterRanges(input.ParameterRanges, context) }), - ...(input.RandomSeed != null && { RandomSeed: input.RandomSeed }), - ...(input.ResourceLimits != null && { ResourceLimits: se_ResourceLimits(input.ResourceLimits, context) }), - ...(input.Strategy != null && { Strategy: input.Strategy }), - ...(input.StrategyConfig != null && { - StrategyConfig: se_HyperParameterTuningJobStrategyConfig(input.StrategyConfig, context), - }), - ...(input.TrainingJobEarlyStoppingType != null && { - TrainingJobEarlyStoppingType: input.TrainingJobEarlyStoppingType, - }), - ...(input.TuningJobCompletionCriteria != null && { - TuningJobCompletionCriteria: se_TuningJobCompletionCriteria(input.TuningJobCompletionCriteria, context), - }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterTuningJobObjective - */ -const se_HyperParameterTuningJobObjective = (input: HyperParameterTuningJobObjective, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterTuningJobObjectives - */ -const se_HyperParameterTuningJobObjectives = ( - input: HyperParameterTuningJobObjective[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HyperParameterTuningJobObjective(entry, context); - }); -}; - -/** - * serializeAws_json1_1HyperParameterTuningJobStrategyConfig - */ -const se_HyperParameterTuningJobStrategyConfig = ( - input: HyperParameterTuningJobStrategyConfig, - context: __SerdeContext -): any => { - return { - ...(input.HyperbandStrategyConfig != null && { - HyperbandStrategyConfig: se_HyperbandStrategyConfig(input.HyperbandStrategyConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterTuningJobWarmStartConfig - */ -const se_HyperParameterTuningJobWarmStartConfig = ( - input: HyperParameterTuningJobWarmStartConfig, - context: __SerdeContext -): any => { - return { - ...(input.ParentHyperParameterTuningJobs != null && { - ParentHyperParameterTuningJobs: se_ParentHyperParameterTuningJobs(input.ParentHyperParameterTuningJobs, context), - }), - ...(input.WarmStartType != null && { WarmStartType: input.WarmStartType }), - }; -}; - -/** - * serializeAws_json1_1HyperParameterTuningResourceConfig - */ -const se_HyperParameterTuningResourceConfig = ( - input: HyperParameterTuningResourceConfig, - context: __SerdeContext -): any => { - return { - ...(input.AllocationStrategy != null && { AllocationStrategy: input.AllocationStrategy }), - ...(input.InstanceConfigs != null && { - InstanceConfigs: se_HyperParameterTuningInstanceConfigs(input.InstanceConfigs, context), - }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1ImageClassificationJobConfig - */ -const se_ImageClassificationJobConfig = (input: ImageClassificationJobConfig, context: __SerdeContext): any => { - return { - ...(input.CompletionCriteria != null && { - CompletionCriteria: se_AutoMLJobCompletionCriteria(input.CompletionCriteria, context), - }), - }; -}; - -/** - * serializeAws_json1_1ImageConfig - */ -const se_ImageConfig = (input: ImageConfig, context: __SerdeContext): any => { - return { - ...(input.RepositoryAccessMode != null && { RepositoryAccessMode: input.RepositoryAccessMode }), - ...(input.RepositoryAuthConfig != null && { - RepositoryAuthConfig: se_RepositoryAuthConfig(input.RepositoryAuthConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1ImageDeletePropertyList - */ -const se_ImageDeletePropertyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ImportHubContentRequest - */ -const se_ImportHubContentRequest = (input: ImportHubContentRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentSchemaVersion != null && { DocumentSchemaVersion: input.DocumentSchemaVersion }), - ...(input.HubContentDescription != null && { HubContentDescription: input.HubContentDescription }), - ...(input.HubContentDisplayName != null && { HubContentDisplayName: input.HubContentDisplayName }), - ...(input.HubContentDocument != null && { HubContentDocument: input.HubContentDocument }), - ...(input.HubContentMarkdown != null && { HubContentMarkdown: input.HubContentMarkdown }), - ...(input.HubContentName != null && { HubContentName: input.HubContentName }), - ...(input.HubContentSearchKeywords != null && { - HubContentSearchKeywords: se_HubContentSearchKeywordList(input.HubContentSearchKeywords, context), - }), - ...(input.HubContentType != null && { HubContentType: input.HubContentType }), - ...(input.HubContentVersion != null && { HubContentVersion: input.HubContentVersion }), - ...(input.HubName != null && { HubName: input.HubName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1InferenceExecutionConfig - */ -const se_InferenceExecutionConfig = (input: InferenceExecutionConfig, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; - -/** - * serializeAws_json1_1InferenceExperimentDataStorageConfig - */ -const se_InferenceExperimentDataStorageConfig = ( - input: InferenceExperimentDataStorageConfig, - context: __SerdeContext -): any => { - return { - ...(input.ContentType != null && { ContentType: se_CaptureContentTypeHeader(input.ContentType, context) }), - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.KmsKey != null && { KmsKey: input.KmsKey }), - }; -}; - -/** - * serializeAws_json1_1InferenceExperimentSchedule - */ -const se_InferenceExperimentSchedule = (input: InferenceExperimentSchedule, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1InferenceSpecification - */ -const se_InferenceSpecification = (input: InferenceSpecification, context: __SerdeContext): any => { - return { - ...(input.Containers != null && { Containers: se_ModelPackageContainerDefinitionList(input.Containers, context) }), - ...(input.SupportedContentTypes != null && { - SupportedContentTypes: se_ContentTypes(input.SupportedContentTypes, context), - }), - ...(input.SupportedRealtimeInferenceInstanceTypes != null && { - SupportedRealtimeInferenceInstanceTypes: se_RealtimeInferenceInstanceTypes( - input.SupportedRealtimeInferenceInstanceTypes, - context - ), - }), - ...(input.SupportedResponseMIMETypes != null && { - SupportedResponseMIMETypes: se_ResponseMIMETypes(input.SupportedResponseMIMETypes, context), - }), - ...(input.SupportedTransformInstanceTypes != null && { - SupportedTransformInstanceTypes: se_TransformInstanceTypes(input.SupportedTransformInstanceTypes, context), - }), - }; -}; - -/** - * serializeAws_json1_1InputConfig - */ -const se_InputConfig = (input: InputConfig, context: __SerdeContext): any => { - return { - ...(input.DataInputConfig != null && { DataInputConfig: input.DataInputConfig }), - ...(input.Framework != null && { Framework: input.Framework }), - ...(input.FrameworkVersion != null && { FrameworkVersion: input.FrameworkVersion }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1InputDataConfig - */ -const se_InputDataConfig = (input: Channel[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Channel(entry, context); - }); -}; - -/** - * serializeAws_json1_1InputModes - */ -const se_InputModes = (input: (TrainingInputMode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstanceGroup - */ -const se_InstanceGroup = (input: InstanceGroup, context: __SerdeContext): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceGroupName != null && { InstanceGroupName: input.InstanceGroupName }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - }; -}; - -/** - * serializeAws_json1_1InstanceGroupNames - */ -const se_InstanceGroupNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstanceGroups - */ -const se_InstanceGroups = (input: InstanceGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceGroup(entry, context); - }); -}; - -/** - * serializeAws_json1_1InstanceMetadataServiceConfiguration - */ -const se_InstanceMetadataServiceConfiguration = ( - input: InstanceMetadataServiceConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.MinimumInstanceMetadataServiceVersion != null && { - MinimumInstanceMetadataServiceVersion: input.MinimumInstanceMetadataServiceVersion, - }), - }; -}; - -/** - * serializeAws_json1_1IntegerParameterRange - */ -const se_IntegerParameterRange = (input: IntegerParameterRange, context: __SerdeContext): any => { - return { - ...(input.MaxValue != null && { MaxValue: input.MaxValue }), - ...(input.MinValue != null && { MinValue: input.MinValue }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ScalingType != null && { ScalingType: input.ScalingType }), - }; -}; - -/** - * serializeAws_json1_1IntegerParameterRanges - */ -const se_IntegerParameterRanges = (input: IntegerParameterRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IntegerParameterRange(entry, context); - }); -}; - -/** - * serializeAws_json1_1IntegerParameterRangeSpecification - */ -const se_IntegerParameterRangeSpecification = ( - input: IntegerParameterRangeSpecification, - context: __SerdeContext -): any => { - return { - ...(input.MaxValue != null && { MaxValue: input.MaxValue }), - ...(input.MinValue != null && { MinValue: input.MinValue }), - }; -}; - -/** - * serializeAws_json1_1JsonContentTypes - */ -const se_JsonContentTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1JupyterServerAppSettings - */ -const se_JupyterServerAppSettings = (input: JupyterServerAppSettings, context: __SerdeContext): any => { - return { - ...(input.CodeRepositories != null && { CodeRepositories: se_CodeRepositories(input.CodeRepositories, context) }), - ...(input.DefaultResourceSpec != null && { - DefaultResourceSpec: se_ResourceSpec(input.DefaultResourceSpec, context), - }), - ...(input.LifecycleConfigArns != null && { - LifecycleConfigArns: se_LifecycleConfigArns(input.LifecycleConfigArns, context), - }), - }; -}; - -/** - * serializeAws_json1_1KernelGatewayAppSettings - */ -const se_KernelGatewayAppSettings = (input: KernelGatewayAppSettings, context: __SerdeContext): any => { - return { - ...(input.CustomImages != null && { CustomImages: se_CustomImages(input.CustomImages, context) }), - ...(input.DefaultResourceSpec != null && { - DefaultResourceSpec: se_ResourceSpec(input.DefaultResourceSpec, context), - }), - ...(input.LifecycleConfigArns != null && { - LifecycleConfigArns: se_LifecycleConfigArns(input.LifecycleConfigArns, context), - }), - }; -}; - -/** - * serializeAws_json1_1KernelGatewayImageConfig - */ -const se_KernelGatewayImageConfig = (input: KernelGatewayImageConfig, context: __SerdeContext): any => { - return { - ...(input.FileSystemConfig != null && { FileSystemConfig: se_FileSystemConfig(input.FileSystemConfig, context) }), - ...(input.KernelSpecs != null && { KernelSpecs: se_KernelSpecs(input.KernelSpecs, context) }), - }; -}; - -/** - * serializeAws_json1_1KernelSpec - */ -const se_KernelSpec = (input: KernelSpec, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1KernelSpecs - */ -const se_KernelSpecs = (input: KernelSpec[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KernelSpec(entry, context); - }); -}; - -/** - * serializeAws_json1_1LabelingJobAlgorithmsConfig - */ -const se_LabelingJobAlgorithmsConfig = (input: LabelingJobAlgorithmsConfig, context: __SerdeContext): any => { - return { - ...(input.InitialActiveLearningModelArn != null && { - InitialActiveLearningModelArn: input.InitialActiveLearningModelArn, - }), - ...(input.LabelingJobAlgorithmSpecificationArn != null && { - LabelingJobAlgorithmSpecificationArn: input.LabelingJobAlgorithmSpecificationArn, - }), - ...(input.LabelingJobResourceConfig != null && { - LabelingJobResourceConfig: se_LabelingJobResourceConfig(input.LabelingJobResourceConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobDataAttributes - */ -const se_LabelingJobDataAttributes = (input: LabelingJobDataAttributes, context: __SerdeContext): any => { - return { - ...(input.ContentClassifiers != null && { - ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context), - }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobDataSource - */ -const se_LabelingJobDataSource = (input: LabelingJobDataSource, context: __SerdeContext): any => { - return { - ...(input.S3DataSource != null && { S3DataSource: se_LabelingJobS3DataSource(input.S3DataSource, context) }), - ...(input.SnsDataSource != null && { SnsDataSource: se_LabelingJobSnsDataSource(input.SnsDataSource, context) }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobInputConfig - */ -const se_LabelingJobInputConfig = (input: LabelingJobInputConfig, context: __SerdeContext): any => { - return { - ...(input.DataAttributes != null && { - DataAttributes: se_LabelingJobDataAttributes(input.DataAttributes, context), - }), - ...(input.DataSource != null && { DataSource: se_LabelingJobDataSource(input.DataSource, context) }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobOutputConfig - */ -const se_LabelingJobOutputConfig = (input: LabelingJobOutputConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobResourceConfig - */ -const se_LabelingJobResourceConfig = (input: LabelingJobResourceConfig, context: __SerdeContext): any => { - return { - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobS3DataSource - */ -const se_LabelingJobS3DataSource = (input: LabelingJobS3DataSource, context: __SerdeContext): any => { - return { - ...(input.ManifestS3Uri != null && { ManifestS3Uri: input.ManifestS3Uri }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobSnsDataSource - */ -const se_LabelingJobSnsDataSource = (input: LabelingJobSnsDataSource, context: __SerdeContext): any => { - return { - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - }; -}; - -/** - * serializeAws_json1_1LabelingJobStoppingConditions - */ -const se_LabelingJobStoppingConditions = (input: LabelingJobStoppingConditions, context: __SerdeContext): any => { - return { - ...(input.MaxHumanLabeledObjectCount != null && { MaxHumanLabeledObjectCount: input.MaxHumanLabeledObjectCount }), - ...(input.MaxPercentageOfInputDatasetLabeled != null && { - MaxPercentageOfInputDatasetLabeled: input.MaxPercentageOfInputDatasetLabeled, - }), - }; -}; - -/** - * serializeAws_json1_1LifecycleConfigArns - */ -const se_LifecycleConfigArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LineageEntityParameters - */ -const se_LineageEntityParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ListActionsRequest - */ -const se_ListActionsRequest = (input: ListActionsRequest, context: __SerdeContext): any => { - return { - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SourceUri != null && { SourceUri: input.SourceUri }), - }; -}; - -/** - * serializeAws_json1_1ListAlgorithmsInput - */ -const se_ListAlgorithmsInput = (input: ListAlgorithmsInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListAliasesRequest - */ -const se_ListAliasesRequest = (input: ListAliasesRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1ListAppImageConfigsRequest - */ -const se_ListAppImageConfigsRequest = (input: ListAppImageConfigsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModifiedTimeAfter != null && { ModifiedTimeAfter: Math.round(input.ModifiedTimeAfter.getTime() / 1000) }), - ...(input.ModifiedTimeBefore != null && { - ModifiedTimeBefore: Math.round(input.ModifiedTimeBefore.getTime() / 1000), - }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListAppsRequest - */ -const se_ListAppsRequest = (input: ListAppsRequest, context: __SerdeContext): any => { - return { - ...(input.DomainIdEquals != null && { DomainIdEquals: input.DomainIdEquals }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SpaceNameEquals != null && { SpaceNameEquals: input.SpaceNameEquals }), - ...(input.UserProfileNameEquals != null && { UserProfileNameEquals: input.UserProfileNameEquals }), - }; -}; - -/** - * serializeAws_json1_1ListArtifactsRequest - */ -const se_ListArtifactsRequest = (input: ListArtifactsRequest, context: __SerdeContext): any => { - return { - ...(input.ArtifactType != null && { ArtifactType: input.ArtifactType }), - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SourceUri != null && { SourceUri: input.SourceUri }), - }; -}; - -/** - * serializeAws_json1_1ListAssociationsRequest - */ -const se_ListAssociationsRequest = (input: ListAssociationsRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationType != null && { AssociationType: input.AssociationType }), - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.DestinationType != null && { DestinationType: input.DestinationType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - }; -}; - -/** - * serializeAws_json1_1ListAutoMLJobsRequest - */ -const se_ListAutoMLJobsRequest = (input: ListAutoMLJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListCandidatesForAutoMLJobRequest - */ -const se_ListCandidatesForAutoMLJobRequest = ( - input: ListCandidatesForAutoMLJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoMLJobName != null && { AutoMLJobName: input.AutoMLJobName }), - ...(input.CandidateNameEquals != null && { CandidateNameEquals: input.CandidateNameEquals }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListCodeRepositoriesInput - */ -const se_ListCodeRepositoriesInput = (input: ListCodeRepositoriesInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListCompilationJobsRequest - */ -const se_ListCompilationJobsRequest = (input: ListCompilationJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListContextsRequest - */ -const se_ListContextsRequest = (input: ListContextsRequest, context: __SerdeContext): any => { - return { - ...(input.ContextType != null && { ContextType: input.ContextType }), - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SourceUri != null && { SourceUri: input.SourceUri }), - }; -}; - -/** - * serializeAws_json1_1ListDataQualityJobDefinitionsRequest - */ -const se_ListDataQualityJobDefinitionsRequest = ( - input: ListDataQualityJobDefinitionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListDeviceFleetsRequest - */ -const se_ListDeviceFleetsRequest = (input: ListDeviceFleetsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListDevicesRequest - */ -const se_ListDevicesRequest = (input: ListDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.LatestHeartbeatAfter != null && { - LatestHeartbeatAfter: Math.round(input.LatestHeartbeatAfter.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDomainsRequest - */ -const se_ListDomainsRequest = (input: ListDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListEdgeDeploymentPlansRequest - */ -const se_ListEdgeDeploymentPlansRequest = (input: ListEdgeDeploymentPlansRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.DeviceFleetNameContains != null && { DeviceFleetNameContains: input.DeviceFleetNameContains }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListEdgePackagingJobsRequest - */ -const se_ListEdgePackagingJobsRequest = (input: ListEdgePackagingJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelNameContains != null && { ModelNameContains: input.ModelNameContains }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListEndpointConfigsInput - */ -const se_ListEndpointConfigsInput = (input: ListEndpointConfigsInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListEndpointsInput - */ -const se_ListEndpointsInput = (input: ListEndpointsInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListExperimentsRequest - */ -const se_ListExperimentsRequest = (input: ListExperimentsRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListFeatureGroupsRequest - */ -const se_ListFeatureGroupsRequest = (input: ListFeatureGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.FeatureGroupStatusEquals != null && { FeatureGroupStatusEquals: input.FeatureGroupStatusEquals }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OfflineStoreStatusEquals != null && { OfflineStoreStatusEquals: input.OfflineStoreStatusEquals }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListFlowDefinitionsRequest - */ -const se_ListFlowDefinitionsRequest = (input: ListFlowDefinitionsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListHubContentsRequest - */ -const se_ListHubContentsRequest = (input: ListHubContentsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.HubContentType != null && { HubContentType: input.HubContentType }), - ...(input.HubName != null && { HubName: input.HubName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MaxSchemaVersion != null && { MaxSchemaVersion: input.MaxSchemaVersion }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListHubContentVersionsRequest - */ -const se_ListHubContentVersionsRequest = (input: ListHubContentVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.HubContentName != null && { HubContentName: input.HubContentName }), - ...(input.HubContentType != null && { HubContentType: input.HubContentType }), - ...(input.HubName != null && { HubName: input.HubName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MaxSchemaVersion != null && { MaxSchemaVersion: input.MaxSchemaVersion }), - ...(input.MinVersion != null && { MinVersion: input.MinVersion }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListHubsRequest - */ -const se_ListHubsRequest = (input: ListHubsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListHumanTaskUisRequest - */ -const se_ListHumanTaskUisRequest = (input: ListHumanTaskUisRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListHyperParameterTuningJobsRequest - */ -const se_ListHyperParameterTuningJobsRequest = ( - input: ListHyperParameterTuningJobsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListImagesRequest - */ -const se_ListImagesRequest = (input: ListImagesRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListImageVersionsRequest - */ -const se_ListImageVersionsRequest = (input: ListImageVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListInferenceExperimentsRequest - */ -const se_ListInferenceExperimentsRequest = (input: ListInferenceExperimentsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1ListInferenceRecommendationsJobsRequest - */ -const se_ListInferenceRecommendationsJobsRequest = ( - input: ListInferenceRecommendationsJobsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListInferenceRecommendationsJobStepsRequest - */ -const se_ListInferenceRecommendationsJobStepsRequest = ( - input: ListInferenceRecommendationsJobStepsRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StepType != null && { StepType: input.StepType }), - }; -}; - -/** - * serializeAws_json1_1ListLabelingJobsForWorkteamRequest - */ -const se_ListLabelingJobsForWorkteamRequest = ( - input: ListLabelingJobsForWorkteamRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.JobReferenceCodeContains != null && { JobReferenceCodeContains: input.JobReferenceCodeContains }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.WorkteamArn != null && { WorkteamArn: input.WorkteamArn }), - }; -}; - -/** - * serializeAws_json1_1ListLabelingJobsRequest - */ -const se_ListLabelingJobsRequest = (input: ListLabelingJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListLineageEntityParameterKey - */ -const se_ListLineageEntityParameterKey = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ListLineageGroupsRequest - */ -const se_ListLineageGroupsRequest = (input: ListLineageGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelBiasJobDefinitionsRequest - */ -const se_ListModelBiasJobDefinitionsRequest = ( - input: ListModelBiasJobDefinitionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelCardExportJobsRequest - */ -const se_ListModelCardExportJobsRequest = (input: ListModelCardExportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelCardExportJobNameContains != null && { - ModelCardExportJobNameContains: input.ModelCardExportJobNameContains, - }), - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - ...(input.ModelCardVersion != null && { ModelCardVersion: input.ModelCardVersion }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListModelCardsRequest - */ -const se_ListModelCardsRequest = (input: ListModelCardsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelCardStatus != null && { ModelCardStatus: input.ModelCardStatus }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelCardVersionsRequest - */ -const se_ListModelCardVersionsRequest = (input: ListModelCardVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - ...(input.ModelCardStatus != null && { ModelCardStatus: input.ModelCardStatus }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelExplainabilityJobDefinitionsRequest - */ -const se_ListModelExplainabilityJobDefinitionsRequest = ( - input: ListModelExplainabilityJobDefinitionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelMetadataRequest - */ -const se_ListModelMetadataRequest = (input: ListModelMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SearchExpression != null && { - SearchExpression: se_ModelMetadataSearchExpression(input.SearchExpression, context), - }), - }; -}; - -/** - * serializeAws_json1_1ListModelPackageGroupsInput - */ -const se_ListModelPackageGroupsInput = (input: ListModelPackageGroupsInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelPackagesInput - */ -const se_ListModelPackagesInput = (input: ListModelPackagesInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModelApprovalStatus != null && { ModelApprovalStatus: input.ModelApprovalStatus }), - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - ...(input.ModelPackageType != null && { ModelPackageType: input.ModelPackageType }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelQualityJobDefinitionsRequest - */ -const se_ListModelQualityJobDefinitionsRequest = ( - input: ListModelQualityJobDefinitionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListModelsInput - */ -const se_ListModelsInput = (input: ListModelsInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListMonitoringAlertHistoryRequest - */ -const se_ListMonitoringAlertHistoryRequest = ( - input: ListMonitoringAlertHistoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitoringAlertName != null && { MonitoringAlertName: input.MonitoringAlertName }), - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListMonitoringAlertsRequest - */ -const se_ListMonitoringAlertsRequest = (input: ListMonitoringAlertsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListMonitoringExecutionsRequest - */ -const se_ListMonitoringExecutionsRequest = (input: ListMonitoringExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitoringJobDefinitionName != null && { - MonitoringJobDefinitionName: input.MonitoringJobDefinitionName, - }), - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - ...(input.MonitoringTypeEquals != null && { MonitoringTypeEquals: input.MonitoringTypeEquals }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ScheduledTimeAfter != null && { - ScheduledTimeAfter: Math.round(input.ScheduledTimeAfter.getTime() / 1000), - }), - ...(input.ScheduledTimeBefore != null && { - ScheduledTimeBefore: Math.round(input.ScheduledTimeBefore.getTime() / 1000), - }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListMonitoringSchedulesRequest - */ -const se_ListMonitoringSchedulesRequest = (input: ListMonitoringSchedulesRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.MonitoringJobDefinitionName != null && { - MonitoringJobDefinitionName: input.MonitoringJobDefinitionName, - }), - ...(input.MonitoringTypeEquals != null && { MonitoringTypeEquals: input.MonitoringTypeEquals }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListNotebookInstanceLifecycleConfigsInput - */ -const se_ListNotebookInstanceLifecycleConfigsInput = ( - input: ListNotebookInstanceLifecycleConfigsInput, - context: __SerdeContext -): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListNotebookInstancesInput - */ -const se_ListNotebookInstancesInput = (input: ListNotebookInstancesInput, context: __SerdeContext): any => { - return { - ...(input.AdditionalCodeRepositoryEquals != null && { - AdditionalCodeRepositoryEquals: input.AdditionalCodeRepositoryEquals, - }), - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.DefaultCodeRepositoryContains != null && { - DefaultCodeRepositoryContains: input.DefaultCodeRepositoryContains, - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.NotebookInstanceLifecycleConfigNameContains != null && { - NotebookInstanceLifecycleConfigNameContains: input.NotebookInstanceLifecycleConfigNameContains, - }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListPipelineExecutionsRequest - */ -const se_ListPipelineExecutionsRequest = (input: ListPipelineExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PipelineName != null && { PipelineName: input.PipelineName }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListPipelineExecutionStepsRequest - */ -const se_ListPipelineExecutionStepsRequest = ( - input: ListPipelineExecutionStepsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListPipelineParametersForExecutionRequest - */ -const se_ListPipelineParametersForExecutionRequest = ( - input: ListPipelineParametersForExecutionRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - }; -}; - -/** - * serializeAws_json1_1ListPipelinesRequest - */ -const se_ListPipelinesRequest = (input: ListPipelinesRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PipelineNamePrefix != null && { PipelineNamePrefix: input.PipelineNamePrefix }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListProcessingJobsRequest - */ -const se_ListProcessingJobsRequest = (input: ListProcessingJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListProjectsInput - */ -const se_ListProjectsInput = (input: ListProjectsInput, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListSpacesRequest - */ -const se_ListSpacesRequest = (input: ListSpacesRequest, context: __SerdeContext): any => { - return { - ...(input.DomainIdEquals != null && { DomainIdEquals: input.DomainIdEquals }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SpaceNameContains != null && { SpaceNameContains: input.SpaceNameContains }), - }; -}; - -/** - * serializeAws_json1_1ListStageDevicesRequest - */ -const se_ListStageDevicesRequest = (input: ListStageDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.ExcludeDevicesDeployedInOtherStage != null && { - ExcludeDevicesDeployedInOtherStage: input.ExcludeDevicesDeployedInOtherStage, - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StageName != null && { StageName: input.StageName }), - }; -}; - -/** - * serializeAws_json1_1ListStudioLifecycleConfigsRequest - */ -const se_ListStudioLifecycleConfigsRequest = ( - input: ListStudioLifecycleConfigsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AppTypeEquals != null && { AppTypeEquals: input.AppTypeEquals }), - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.ModifiedTimeAfter != null && { ModifiedTimeAfter: Math.round(input.ModifiedTimeAfter.getTime() / 1000) }), - ...(input.ModifiedTimeBefore != null && { - ModifiedTimeBefore: Math.round(input.ModifiedTimeBefore.getTime() / 1000), - }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListSubscribedWorkteamsRequest - */ -const se_ListSubscribedWorkteamsRequest = (input: ListSubscribedWorkteamsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListTagsInput - */ -const se_ListTagsInput = (input: ListTagsInput, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1ListTrainingJobsForHyperParameterTuningJobRequest - */ -const se_ListTrainingJobsForHyperParameterTuningJobRequest = ( - input: ListTrainingJobsForHyperParameterTuningJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.HyperParameterTuningJobName != null && { - HyperParameterTuningJobName: input.HyperParameterTuningJobName, - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListTrainingJobsRequest - */ -const se_ListTrainingJobsRequest = (input: ListTrainingJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - ...(input.WarmPoolStatusEquals != null && { WarmPoolStatusEquals: input.WarmPoolStatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListTransformJobsRequest - */ -const se_ListTransformJobsRequest = (input: ListTransformJobsRequest, context: __SerdeContext): any => { - return { - ...(input.CreationTimeAfter != null && { CreationTimeAfter: Math.round(input.CreationTimeAfter.getTime() / 1000) }), - ...(input.CreationTimeBefore != null && { - CreationTimeBefore: Math.round(input.CreationTimeBefore.getTime() / 1000), - }), - ...(input.LastModifiedTimeAfter != null && { - LastModifiedTimeAfter: Math.round(input.LastModifiedTimeAfter.getTime() / 1000), - }), - ...(input.LastModifiedTimeBefore != null && { - LastModifiedTimeBefore: Math.round(input.LastModifiedTimeBefore.getTime() / 1000), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; - -/** - * serializeAws_json1_1ListTrialComponentKey256 - */ -const se_ListTrialComponentKey256 = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ListTrialComponentsRequest - */ -const se_ListTrialComponentsRequest = (input: ListTrialComponentsRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; - -/** - * serializeAws_json1_1ListTrialsRequest - */ -const se_ListTrialsRequest = (input: ListTrialsRequest, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - }; -}; - -/** - * serializeAws_json1_1ListUserProfilesRequest - */ -const se_ListUserProfilesRequest = (input: ListUserProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.DomainIdEquals != null && { DomainIdEquals: input.DomainIdEquals }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - ...(input.UserProfileNameContains != null && { UserProfileNameContains: input.UserProfileNameContains }), - }; -}; - -/** - * serializeAws_json1_1ListWorkforcesRequest - */ -const se_ListWorkforcesRequest = (input: ListWorkforcesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ListWorkteamsRequest - */ -const se_ListWorkteamsRequest = (input: ListWorkteamsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1MemberDefinition - */ -const se_MemberDefinition = (input: MemberDefinition, context: __SerdeContext): any => { - return { - ...(input.CognitoMemberDefinition != null && { - CognitoMemberDefinition: se_CognitoMemberDefinition(input.CognitoMemberDefinition, context), - }), - ...(input.OidcMemberDefinition != null && { - OidcMemberDefinition: se_OidcMemberDefinition(input.OidcMemberDefinition, context), - }), - }; -}; - -/** - * serializeAws_json1_1MemberDefinitions - */ -const se_MemberDefinitions = (input: MemberDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MemberDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1MetadataProperties - */ -const se_MetadataProperties = (input: MetadataProperties, context: __SerdeContext): any => { - return { - ...(input.CommitId != null && { CommitId: input.CommitId }), - ...(input.GeneratedBy != null && { GeneratedBy: input.GeneratedBy }), - ...(input.ProjectId != null && { ProjectId: input.ProjectId }), - ...(input.Repository != null && { Repository: input.Repository }), - }; -}; - -/** - * serializeAws_json1_1MetricDefinition - */ -const se_MetricDefinition = (input: MetricDefinition, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Regex != null && { Regex: input.Regex }), - }; -}; - -/** - * serializeAws_json1_1MetricDefinitionList - */ -const se_MetricDefinitionList = (input: MetricDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MetricDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1MetricsSource - */ -const se_MetricsSource = (input: MetricsSource, context: __SerdeContext): any => { - return { - ...(input.ContentDigest != null && { ContentDigest: input.ContentDigest }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1ModelBiasAppSpecification - */ -const se_ModelBiasAppSpecification = (input: ModelBiasAppSpecification, context: __SerdeContext): any => { - return { - ...(input.ConfigUri != null && { ConfigUri: input.ConfigUri }), - ...(input.Environment != null && { Environment: se_MonitoringEnvironmentMap(input.Environment, context) }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - }; -}; - -/** - * serializeAws_json1_1ModelBiasBaselineConfig - */ -const se_ModelBiasBaselineConfig = (input: ModelBiasBaselineConfig, context: __SerdeContext): any => { - return { - ...(input.BaseliningJobName != null && { BaseliningJobName: input.BaseliningJobName }), - ...(input.ConstraintsResource != null && { - ConstraintsResource: se_MonitoringConstraintsResource(input.ConstraintsResource, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelBiasJobInput - */ -const se_ModelBiasJobInput = (input: ModelBiasJobInput, context: __SerdeContext): any => { - return { - ...(input.BatchTransformInput != null && { - BatchTransformInput: se_BatchTransformInput(input.BatchTransformInput, context), - }), - ...(input.EndpointInput != null && { EndpointInput: se_EndpointInput(input.EndpointInput, context) }), - ...(input.GroundTruthS3Input != null && { - GroundTruthS3Input: se_MonitoringGroundTruthS3Input(input.GroundTruthS3Input, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelCardExportOutputConfig - */ -const se_ModelCardExportOutputConfig = (input: ModelCardExportOutputConfig, context: __SerdeContext): any => { - return { - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1ModelCardSecurityConfig - */ -const se_ModelCardSecurityConfig = (input: ModelCardSecurityConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1ModelClientConfig - */ -const se_ModelClientConfig = (input: ModelClientConfig, context: __SerdeContext): any => { - return { - ...(input.InvocationsMaxRetries != null && { InvocationsMaxRetries: input.InvocationsMaxRetries }), - ...(input.InvocationsTimeoutInSeconds != null && { - InvocationsTimeoutInSeconds: input.InvocationsTimeoutInSeconds, - }), - }; -}; - -/** - * serializeAws_json1_1ModelDataQuality - */ -const se_ModelDataQuality = (input: ModelDataQuality, context: __SerdeContext): any => { - return { - ...(input.Constraints != null && { Constraints: se_MetricsSource(input.Constraints, context) }), - ...(input.Statistics != null && { Statistics: se_MetricsSource(input.Statistics, context) }), - }; -}; - -/** - * serializeAws_json1_1ModelDeployConfig - */ -const se_ModelDeployConfig = (input: ModelDeployConfig, context: __SerdeContext): any => { - return { - ...(input.AutoGenerateEndpointName != null && { AutoGenerateEndpointName: input.AutoGenerateEndpointName }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; -}; - -/** - * serializeAws_json1_1ModelExplainabilityAppSpecification - */ -const se_ModelExplainabilityAppSpecification = ( - input: ModelExplainabilityAppSpecification, - context: __SerdeContext -): any => { - return { - ...(input.ConfigUri != null && { ConfigUri: input.ConfigUri }), - ...(input.Environment != null && { Environment: se_MonitoringEnvironmentMap(input.Environment, context) }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - }; -}; - -/** - * serializeAws_json1_1ModelExplainabilityBaselineConfig - */ -const se_ModelExplainabilityBaselineConfig = ( - input: ModelExplainabilityBaselineConfig, - context: __SerdeContext -): any => { - return { - ...(input.BaseliningJobName != null && { BaseliningJobName: input.BaseliningJobName }), - ...(input.ConstraintsResource != null && { - ConstraintsResource: se_MonitoringConstraintsResource(input.ConstraintsResource, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelExplainabilityJobInput - */ -const se_ModelExplainabilityJobInput = (input: ModelExplainabilityJobInput, context: __SerdeContext): any => { - return { - ...(input.BatchTransformInput != null && { - BatchTransformInput: se_BatchTransformInput(input.BatchTransformInput, context), - }), - ...(input.EndpointInput != null && { EndpointInput: se_EndpointInput(input.EndpointInput, context) }), - }; -}; - -/** - * serializeAws_json1_1ModelInfrastructureConfig - */ -const se_ModelInfrastructureConfig = (input: ModelInfrastructureConfig, context: __SerdeContext): any => { - return { - ...(input.InfrastructureType != null && { InfrastructureType: input.InfrastructureType }), - ...(input.RealTimeInferenceConfig != null && { - RealTimeInferenceConfig: se_RealTimeInferenceConfig(input.RealTimeInferenceConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelInput - */ -const se_ModelInput = (input: ModelInput, context: __SerdeContext): any => { - return { - ...(input.DataInputConfig != null && { DataInputConfig: input.DataInputConfig }), - }; -}; - -/** - * serializeAws_json1_1ModelLatencyThreshold - */ -const se_ModelLatencyThreshold = (input: ModelLatencyThreshold, context: __SerdeContext): any => { - return { - ...(input.Percentile != null && { Percentile: input.Percentile }), - ...(input.ValueInMilliseconds != null && { ValueInMilliseconds: input.ValueInMilliseconds }), - }; -}; - -/** - * serializeAws_json1_1ModelLatencyThresholds - */ -const se_ModelLatencyThresholds = (input: ModelLatencyThreshold[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ModelLatencyThreshold(entry, context); - }); -}; - -/** - * serializeAws_json1_1ModelMetadataFilter - */ -const se_ModelMetadataFilter = (input: ModelMetadataFilter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ModelMetadataFilters - */ -const se_ModelMetadataFilters = (input: ModelMetadataFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ModelMetadataFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ModelMetadataSearchExpression - */ -const se_ModelMetadataSearchExpression = (input: ModelMetadataSearchExpression, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ModelMetadataFilters(input.Filters, context) }), - }; -}; - -/** - * serializeAws_json1_1ModelMetrics - */ -const se_ModelMetrics = (input: ModelMetrics, context: __SerdeContext): any => { - return { - ...(input.Bias != null && { Bias: se_Bias(input.Bias, context) }), - ...(input.Explainability != null && { Explainability: se_Explainability(input.Explainability, context) }), - ...(input.ModelDataQuality != null && { ModelDataQuality: se_ModelDataQuality(input.ModelDataQuality, context) }), - ...(input.ModelQuality != null && { ModelQuality: se_ModelQuality(input.ModelQuality, context) }), - }; -}; - -/** - * serializeAws_json1_1ModelPackageArnList - */ -const se_ModelPackageArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ModelPackageContainerDefinition - */ -const se_ModelPackageContainerDefinition = (input: ModelPackageContainerDefinition, context: __SerdeContext): any => { - return { - ...(input.ContainerHostname != null && { ContainerHostname: input.ContainerHostname }), - ...(input.Environment != null && { Environment: se_EnvironmentMap(input.Environment, context) }), - ...(input.Framework != null && { Framework: input.Framework }), - ...(input.FrameworkVersion != null && { FrameworkVersion: input.FrameworkVersion }), - ...(input.Image != null && { Image: input.Image }), - ...(input.ImageDigest != null && { ImageDigest: input.ImageDigest }), - ...(input.ModelDataUrl != null && { ModelDataUrl: input.ModelDataUrl }), - ...(input.ModelInput != null && { ModelInput: se_ModelInput(input.ModelInput, context) }), - ...(input.NearestModelName != null && { NearestModelName: input.NearestModelName }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; -}; - -/** - * serializeAws_json1_1ModelPackageContainerDefinitionList - */ -const se_ModelPackageContainerDefinitionList = ( - input: ModelPackageContainerDefinition[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ModelPackageContainerDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1ModelPackageValidationProfile - */ -const se_ModelPackageValidationProfile = (input: ModelPackageValidationProfile, context: __SerdeContext): any => { - return { - ...(input.ProfileName != null && { ProfileName: input.ProfileName }), - ...(input.TransformJobDefinition != null && { - TransformJobDefinition: se_TransformJobDefinition(input.TransformJobDefinition, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelPackageValidationProfiles - */ -const se_ModelPackageValidationProfiles = (input: ModelPackageValidationProfile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ModelPackageValidationProfile(entry, context); - }); -}; - -/** - * serializeAws_json1_1ModelPackageValidationSpecification - */ -const se_ModelPackageValidationSpecification = ( - input: ModelPackageValidationSpecification, - context: __SerdeContext -): any => { - return { - ...(input.ValidationProfiles != null && { - ValidationProfiles: se_ModelPackageValidationProfiles(input.ValidationProfiles, context), - }), - ...(input.ValidationRole != null && { ValidationRole: input.ValidationRole }), - }; -}; - -/** - * serializeAws_json1_1ModelQuality - */ -const se_ModelQuality = (input: ModelQuality, context: __SerdeContext): any => { - return { - ...(input.Constraints != null && { Constraints: se_MetricsSource(input.Constraints, context) }), - ...(input.Statistics != null && { Statistics: se_MetricsSource(input.Statistics, context) }), - }; -}; - -/** - * serializeAws_json1_1ModelQualityAppSpecification - */ -const se_ModelQualityAppSpecification = (input: ModelQualityAppSpecification, context: __SerdeContext): any => { - return { - ...(input.ContainerArguments != null && { - ContainerArguments: se_MonitoringContainerArguments(input.ContainerArguments, context), - }), - ...(input.ContainerEntrypoint != null && { - ContainerEntrypoint: se_ContainerEntrypoint(input.ContainerEntrypoint, context), - }), - ...(input.Environment != null && { Environment: se_MonitoringEnvironmentMap(input.Environment, context) }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - ...(input.PostAnalyticsProcessorSourceUri != null && { - PostAnalyticsProcessorSourceUri: input.PostAnalyticsProcessorSourceUri, - }), - ...(input.ProblemType != null && { ProblemType: input.ProblemType }), - ...(input.RecordPreprocessorSourceUri != null && { - RecordPreprocessorSourceUri: input.RecordPreprocessorSourceUri, - }), - }; -}; - -/** - * serializeAws_json1_1ModelQualityBaselineConfig - */ -const se_ModelQualityBaselineConfig = (input: ModelQualityBaselineConfig, context: __SerdeContext): any => { - return { - ...(input.BaseliningJobName != null && { BaseliningJobName: input.BaseliningJobName }), - ...(input.ConstraintsResource != null && { - ConstraintsResource: se_MonitoringConstraintsResource(input.ConstraintsResource, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelQualityJobInput - */ -const se_ModelQualityJobInput = (input: ModelQualityJobInput, context: __SerdeContext): any => { - return { - ...(input.BatchTransformInput != null && { - BatchTransformInput: se_BatchTransformInput(input.BatchTransformInput, context), - }), - ...(input.EndpointInput != null && { EndpointInput: se_EndpointInput(input.EndpointInput, context) }), - ...(input.GroundTruthS3Input != null && { - GroundTruthS3Input: se_MonitoringGroundTruthS3Input(input.GroundTruthS3Input, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModelVariantActionMap - */ -const se_ModelVariantActionMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ModelVariantConfig - */ -const se_ModelVariantConfig = (input: ModelVariantConfig, context: __SerdeContext): any => { - return { - ...(input.InfrastructureConfig != null && { - InfrastructureConfig: se_ModelInfrastructureConfig(input.InfrastructureConfig, context), - }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.VariantName != null && { VariantName: input.VariantName }), - }; -}; - -/** - * serializeAws_json1_1ModelVariantConfigList - */ -const se_ModelVariantConfigList = (input: ModelVariantConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ModelVariantConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1MonitoringAppSpecification - */ -const se_MonitoringAppSpecification = (input: MonitoringAppSpecification, context: __SerdeContext): any => { - return { - ...(input.ContainerArguments != null && { - ContainerArguments: se_MonitoringContainerArguments(input.ContainerArguments, context), - }), - ...(input.ContainerEntrypoint != null && { - ContainerEntrypoint: se_ContainerEntrypoint(input.ContainerEntrypoint, context), - }), - ...(input.ImageUri != null && { ImageUri: input.ImageUri }), - ...(input.PostAnalyticsProcessorSourceUri != null && { - PostAnalyticsProcessorSourceUri: input.PostAnalyticsProcessorSourceUri, - }), - ...(input.RecordPreprocessorSourceUri != null && { - RecordPreprocessorSourceUri: input.RecordPreprocessorSourceUri, - }), - }; -}; - -/** - * serializeAws_json1_1MonitoringBaselineConfig - */ -const se_MonitoringBaselineConfig = (input: MonitoringBaselineConfig, context: __SerdeContext): any => { - return { - ...(input.BaseliningJobName != null && { BaseliningJobName: input.BaseliningJobName }), - ...(input.ConstraintsResource != null && { - ConstraintsResource: se_MonitoringConstraintsResource(input.ConstraintsResource, context), - }), - ...(input.StatisticsResource != null && { - StatisticsResource: se_MonitoringStatisticsResource(input.StatisticsResource, context), - }), - }; -}; - -/** - * serializeAws_json1_1MonitoringClusterConfig - */ -const se_MonitoringClusterConfig = (input: MonitoringClusterConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1MonitoringConstraintsResource - */ -const se_MonitoringConstraintsResource = (input: MonitoringConstraintsResource, context: __SerdeContext): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1MonitoringContainerArguments - */ -const se_MonitoringContainerArguments = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1MonitoringCsvDatasetFormat - */ -const se_MonitoringCsvDatasetFormat = (input: MonitoringCsvDatasetFormat, context: __SerdeContext): any => { - return { - ...(input.Header != null && { Header: input.Header }), - }; -}; - -/** - * serializeAws_json1_1MonitoringDatasetFormat - */ -const se_MonitoringDatasetFormat = (input: MonitoringDatasetFormat, context: __SerdeContext): any => { - return { - ...(input.Csv != null && { Csv: se_MonitoringCsvDatasetFormat(input.Csv, context) }), - ...(input.Json != null && { Json: se_MonitoringJsonDatasetFormat(input.Json, context) }), - ...(input.Parquet != null && { Parquet: se_MonitoringParquetDatasetFormat(input.Parquet, context) }), - }; -}; - -/** - * serializeAws_json1_1MonitoringEnvironmentMap - */ -const se_MonitoringEnvironmentMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1MonitoringGroundTruthS3Input - */ -const se_MonitoringGroundTruthS3Input = (input: MonitoringGroundTruthS3Input, context: __SerdeContext): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1MonitoringInput - */ -const se_MonitoringInput = (input: MonitoringInput, context: __SerdeContext): any => { - return { - ...(input.BatchTransformInput != null && { - BatchTransformInput: se_BatchTransformInput(input.BatchTransformInput, context), - }), - ...(input.EndpointInput != null && { EndpointInput: se_EndpointInput(input.EndpointInput, context) }), - }; -}; - -/** - * serializeAws_json1_1MonitoringInputs - */ -const se_MonitoringInputs = (input: MonitoringInput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MonitoringInput(entry, context); - }); -}; - -/** - * serializeAws_json1_1MonitoringJobDefinition - */ -const se_MonitoringJobDefinition = (input: MonitoringJobDefinition, context: __SerdeContext): any => { - return { - ...(input.BaselineConfig != null && { BaselineConfig: se_MonitoringBaselineConfig(input.BaselineConfig, context) }), - ...(input.Environment != null && { Environment: se_MonitoringEnvironmentMap(input.Environment, context) }), - ...(input.MonitoringAppSpecification != null && { - MonitoringAppSpecification: se_MonitoringAppSpecification(input.MonitoringAppSpecification, context), - }), - ...(input.MonitoringInputs != null && { MonitoringInputs: se_MonitoringInputs(input.MonitoringInputs, context) }), - ...(input.MonitoringOutputConfig != null && { - MonitoringOutputConfig: se_MonitoringOutputConfig(input.MonitoringOutputConfig, context), - }), - ...(input.MonitoringResources != null && { - MonitoringResources: se_MonitoringResources(input.MonitoringResources, context), - }), - ...(input.NetworkConfig != null && { NetworkConfig: se_NetworkConfig(input.NetworkConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_MonitoringStoppingCondition(input.StoppingCondition, context), - }), - }; -}; - -/** - * serializeAws_json1_1MonitoringJsonDatasetFormat - */ -const se_MonitoringJsonDatasetFormat = (input: MonitoringJsonDatasetFormat, context: __SerdeContext): any => { - return { - ...(input.Line != null && { Line: input.Line }), - }; -}; - -/** - * serializeAws_json1_1MonitoringNetworkConfig - */ -const se_MonitoringNetworkConfig = (input: MonitoringNetworkConfig, context: __SerdeContext): any => { - return { - ...(input.EnableInterContainerTrafficEncryption != null && { - EnableInterContainerTrafficEncryption: input.EnableInterContainerTrafficEncryption, - }), - ...(input.EnableNetworkIsolation != null && { EnableNetworkIsolation: input.EnableNetworkIsolation }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1MonitoringOutput - */ -const se_MonitoringOutput = (input: MonitoringOutput, context: __SerdeContext): any => { - return { - ...(input.S3Output != null && { S3Output: se_MonitoringS3Output(input.S3Output, context) }), - }; -}; - -/** - * serializeAws_json1_1MonitoringOutputConfig - */ -const se_MonitoringOutputConfig = (input: MonitoringOutputConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MonitoringOutputs != null && { - MonitoringOutputs: se_MonitoringOutputs(input.MonitoringOutputs, context), - }), - }; -}; - -/** - * serializeAws_json1_1MonitoringOutputs - */ -const se_MonitoringOutputs = (input: MonitoringOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MonitoringOutput(entry, context); - }); -}; - -/** - * serializeAws_json1_1MonitoringParquetDatasetFormat - */ -const se_MonitoringParquetDatasetFormat = (input: MonitoringParquetDatasetFormat, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1MonitoringResources - */ -const se_MonitoringResources = (input: MonitoringResources, context: __SerdeContext): any => { - return { - ...(input.ClusterConfig != null && { ClusterConfig: se_MonitoringClusterConfig(input.ClusterConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1MonitoringS3Output - */ -const se_MonitoringS3Output = (input: MonitoringS3Output, context: __SerdeContext): any => { - return { - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.S3UploadMode != null && { S3UploadMode: input.S3UploadMode }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1MonitoringScheduleConfig - */ -const se_MonitoringScheduleConfig = (input: MonitoringScheduleConfig, context: __SerdeContext): any => { - return { - ...(input.MonitoringJobDefinition != null && { - MonitoringJobDefinition: se_MonitoringJobDefinition(input.MonitoringJobDefinition, context), - }), - ...(input.MonitoringJobDefinitionName != null && { - MonitoringJobDefinitionName: input.MonitoringJobDefinitionName, - }), - ...(input.MonitoringType != null && { MonitoringType: input.MonitoringType }), - ...(input.ScheduleConfig != null && { ScheduleConfig: se_ScheduleConfig(input.ScheduleConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1MonitoringStatisticsResource - */ -const se_MonitoringStatisticsResource = (input: MonitoringStatisticsResource, context: __SerdeContext): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1MonitoringStoppingCondition - */ -const se_MonitoringStoppingCondition = (input: MonitoringStoppingCondition, context: __SerdeContext): any => { - return { - ...(input.MaxRuntimeInSeconds != null && { MaxRuntimeInSeconds: input.MaxRuntimeInSeconds }), - }; -}; - -/** - * serializeAws_json1_1MultiModelConfig - */ -const se_MultiModelConfig = (input: MultiModelConfig, context: __SerdeContext): any => { - return { - ...(input.ModelCacheSetting != null && { ModelCacheSetting: input.ModelCacheSetting }), - }; -}; - -/** - * serializeAws_json1_1NeoVpcConfig - */ -const se_NeoVpcConfig = (input: NeoVpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_NeoVpcSecurityGroupIds(input.SecurityGroupIds, context), - }), - ...(input.Subnets != null && { Subnets: se_NeoVpcSubnets(input.Subnets, context) }), - }; -}; - -/** - * serializeAws_json1_1NeoVpcSecurityGroupIds - */ -const se_NeoVpcSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NeoVpcSubnets - */ -const se_NeoVpcSubnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NestedFilters - */ -const se_NestedFilters = (input: NestedFilters, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.NestedPropertyName != null && { NestedPropertyName: input.NestedPropertyName }), - }; -}; - -/** - * serializeAws_json1_1NestedFiltersList - */ -const se_NestedFiltersList = (input: NestedFilters[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NestedFilters(entry, context); - }); -}; - -/** - * serializeAws_json1_1NetworkConfig - */ -const se_NetworkConfig = (input: NetworkConfig, context: __SerdeContext): any => { - return { - ...(input.EnableInterContainerTrafficEncryption != null && { - EnableInterContainerTrafficEncryption: input.EnableInterContainerTrafficEncryption, - }), - ...(input.EnableNetworkIsolation != null && { EnableNetworkIsolation: input.EnableNetworkIsolation }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1NotebookInstanceAcceleratorTypes - */ -const se_NotebookInstanceAcceleratorTypes = ( - input: (NotebookInstanceAcceleratorType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NotebookInstanceLifecycleConfigList - */ -const se_NotebookInstanceLifecycleConfigList = ( - input: NotebookInstanceLifecycleHook[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NotebookInstanceLifecycleHook(entry, context); - }); -}; - -/** - * serializeAws_json1_1NotebookInstanceLifecycleHook - */ -const se_NotebookInstanceLifecycleHook = (input: NotebookInstanceLifecycleHook, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - }; -}; - -/** - * serializeAws_json1_1NotificationConfiguration - */ -const se_NotificationConfiguration = (input: NotificationConfiguration, context: __SerdeContext): any => { - return { - ...(input.NotificationTopicArn != null && { NotificationTopicArn: input.NotificationTopicArn }), - }; -}; - -/** - * serializeAws_json1_1OfflineStoreConfig - */ -const se_OfflineStoreConfig = (input: OfflineStoreConfig, context: __SerdeContext): any => { - return { - ...(input.DataCatalogConfig != null && { - DataCatalogConfig: se_DataCatalogConfig(input.DataCatalogConfig, context), - }), - ...(input.DisableGlueTableCreation != null && { DisableGlueTableCreation: input.DisableGlueTableCreation }), - ...(input.S3StorageConfig != null && { S3StorageConfig: se_S3StorageConfig(input.S3StorageConfig, context) }), - ...(input.TableFormat != null && { TableFormat: input.TableFormat }), - }; -}; - -/** - * serializeAws_json1_1OidcConfig - */ -const se_OidcConfig = (input: OidcConfig, context: __SerdeContext): any => { - return { - ...(input.AuthorizationEndpoint != null && { AuthorizationEndpoint: input.AuthorizationEndpoint }), - ...(input.ClientId != null && { ClientId: input.ClientId }), - ...(input.ClientSecret != null && { ClientSecret: input.ClientSecret }), - ...(input.Issuer != null && { Issuer: input.Issuer }), - ...(input.JwksUri != null && { JwksUri: input.JwksUri }), - ...(input.LogoutEndpoint != null && { LogoutEndpoint: input.LogoutEndpoint }), - ...(input.TokenEndpoint != null && { TokenEndpoint: input.TokenEndpoint }), - ...(input.UserInfoEndpoint != null && { UserInfoEndpoint: input.UserInfoEndpoint }), - }; -}; - -/** - * serializeAws_json1_1OidcMemberDefinition - */ -const se_OidcMemberDefinition = (input: OidcMemberDefinition, context: __SerdeContext): any => { - return { - ...(input.Groups != null && { Groups: se_Groups(input.Groups, context) }), - }; -}; - -/** - * serializeAws_json1_1OnlineStoreConfig - */ -const se_OnlineStoreConfig = (input: OnlineStoreConfig, context: __SerdeContext): any => { - return { - ...(input.EnableOnlineStore != null && { EnableOnlineStore: input.EnableOnlineStore }), - ...(input.SecurityConfig != null && { - SecurityConfig: se_OnlineStoreSecurityConfig(input.SecurityConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1OnlineStoreSecurityConfig - */ -const se_OnlineStoreSecurityConfig = (input: OnlineStoreSecurityConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1OutputConfig - */ -const se_OutputConfig = (input: OutputConfig, context: __SerdeContext): any => { - return { - ...(input.CompilerOptions != null && { CompilerOptions: input.CompilerOptions }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputLocation != null && { S3OutputLocation: input.S3OutputLocation }), - ...(input.TargetDevice != null && { TargetDevice: input.TargetDevice }), - ...(input.TargetPlatform != null && { TargetPlatform: se_TargetPlatform(input.TargetPlatform, context) }), - }; -}; - -/** - * serializeAws_json1_1OutputDataConfig - */ -const se_OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1OutputParameter - */ -const se_OutputParameter = (input: OutputParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1OutputParameterList - */ -const se_OutputParameterList = (input: OutputParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OutputParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ParallelismConfiguration - */ -const se_ParallelismConfiguration = (input: ParallelismConfiguration, context: __SerdeContext): any => { - return { - ...(input.MaxParallelExecutionSteps != null && { MaxParallelExecutionSteps: input.MaxParallelExecutionSteps }), - }; -}; - -/** - * serializeAws_json1_1Parameter - */ -const se_Parameter = (input: Parameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ParameterList - */ -const se_ParameterList = (input: Parameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Parameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ParameterRange - */ -const se_ParameterRange = (input: ParameterRange, context: __SerdeContext): any => { - return { - ...(input.CategoricalParameterRangeSpecification != null && { - CategoricalParameterRangeSpecification: se_CategoricalParameterRangeSpecification( - input.CategoricalParameterRangeSpecification, - context - ), - }), - ...(input.ContinuousParameterRangeSpecification != null && { - ContinuousParameterRangeSpecification: se_ContinuousParameterRangeSpecification( - input.ContinuousParameterRangeSpecification, - context - ), - }), - ...(input.IntegerParameterRangeSpecification != null && { - IntegerParameterRangeSpecification: se_IntegerParameterRangeSpecification( - input.IntegerParameterRangeSpecification, - context - ), - }), - }; -}; - -/** - * serializeAws_json1_1ParameterRanges - */ -const se_ParameterRanges = (input: ParameterRanges, context: __SerdeContext): any => { - return { - ...(input.CategoricalParameterRanges != null && { - CategoricalParameterRanges: se_CategoricalParameterRanges(input.CategoricalParameterRanges, context), - }), - ...(input.ContinuousParameterRanges != null && { - ContinuousParameterRanges: se_ContinuousParameterRanges(input.ContinuousParameterRanges, context), - }), - ...(input.IntegerParameterRanges != null && { - IntegerParameterRanges: se_IntegerParameterRanges(input.IntegerParameterRanges, context), - }), - }; -}; - -/** - * serializeAws_json1_1ParameterValues - */ -const se_ParameterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ParentHyperParameterTuningJob - */ -const se_ParentHyperParameterTuningJob = (input: ParentHyperParameterTuningJob, context: __SerdeContext): any => { - return { - ...(input.HyperParameterTuningJobName != null && { - HyperParameterTuningJobName: input.HyperParameterTuningJobName, - }), - }; -}; - -/** - * serializeAws_json1_1ParentHyperParameterTuningJobs - */ -const se_ParentHyperParameterTuningJobs = (input: ParentHyperParameterTuningJob[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParentHyperParameterTuningJob(entry, context); - }); -}; - -/** - * serializeAws_json1_1Phase - */ -const se_Phase = (input: Phase, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - ...(input.InitialNumberOfUsers != null && { InitialNumberOfUsers: input.InitialNumberOfUsers }), - ...(input.SpawnRate != null && { SpawnRate: input.SpawnRate }), - }; -}; - -/** - * serializeAws_json1_1Phases - */ -const se_Phases = (input: Phase[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Phase(entry, context); - }); -}; - -/** - * serializeAws_json1_1PipelineDefinitionS3Location - */ -const se_PipelineDefinitionS3Location = (input: PipelineDefinitionS3Location, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.ObjectKey != null && { ObjectKey: input.ObjectKey }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_json1_1ProcessingClusterConfig - */ -const se_ProcessingClusterConfig = (input: ProcessingClusterConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1ProcessingEnvironmentMap - */ -const se_ProcessingEnvironmentMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ProcessingFeatureStoreOutput - */ -const se_ProcessingFeatureStoreOutput = (input: ProcessingFeatureStoreOutput, context: __SerdeContext): any => { - return { - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - }; -}; - -/** - * serializeAws_json1_1ProcessingInput - */ -const se_ProcessingInput = (input: ProcessingInput, context: __SerdeContext): any => { - return { - ...(input.AppManaged != null && { AppManaged: input.AppManaged }), - ...(input.DatasetDefinition != null && { - DatasetDefinition: se_DatasetDefinition(input.DatasetDefinition, context), - }), - ...(input.InputName != null && { InputName: input.InputName }), - ...(input.S3Input != null && { S3Input: se_ProcessingS3Input(input.S3Input, context) }), - }; -}; - -/** - * serializeAws_json1_1ProcessingInputs - */ -const se_ProcessingInputs = (input: ProcessingInput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProcessingInput(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProcessingOutput - */ -const se_ProcessingOutput = (input: ProcessingOutput, context: __SerdeContext): any => { - return { - ...(input.AppManaged != null && { AppManaged: input.AppManaged }), - ...(input.FeatureStoreOutput != null && { - FeatureStoreOutput: se_ProcessingFeatureStoreOutput(input.FeatureStoreOutput, context), - }), - ...(input.OutputName != null && { OutputName: input.OutputName }), - ...(input.S3Output != null && { S3Output: se_ProcessingS3Output(input.S3Output, context) }), - }; -}; - -/** - * serializeAws_json1_1ProcessingOutputConfig - */ -const se_ProcessingOutputConfig = (input: ProcessingOutputConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Outputs != null && { Outputs: se_ProcessingOutputs(input.Outputs, context) }), - }; -}; - -/** - * serializeAws_json1_1ProcessingOutputs - */ -const se_ProcessingOutputs = (input: ProcessingOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProcessingOutput(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProcessingResources - */ -const se_ProcessingResources = (input: ProcessingResources, context: __SerdeContext): any => { - return { - ...(input.ClusterConfig != null && { ClusterConfig: se_ProcessingClusterConfig(input.ClusterConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1ProcessingS3Input - */ -const se_ProcessingS3Input = (input: ProcessingS3Input, context: __SerdeContext): any => { - return { - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.S3CompressionType != null && { S3CompressionType: input.S3CompressionType }), - ...(input.S3DataDistributionType != null && { S3DataDistributionType: input.S3DataDistributionType }), - ...(input.S3DataType != null && { S3DataType: input.S3DataType }), - ...(input.S3InputMode != null && { S3InputMode: input.S3InputMode }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1ProcessingS3Output - */ -const se_ProcessingS3Output = (input: ProcessingS3Output, context: __SerdeContext): any => { - return { - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.S3UploadMode != null && { S3UploadMode: input.S3UploadMode }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1ProcessingStoppingCondition - */ -const se_ProcessingStoppingCondition = (input: ProcessingStoppingCondition, context: __SerdeContext): any => { - return { - ...(input.MaxRuntimeInSeconds != null && { MaxRuntimeInSeconds: input.MaxRuntimeInSeconds }), - }; -}; - -/** - * serializeAws_json1_1ProductionVariant - */ -const se_ProductionVariant = (input: ProductionVariant, context: __SerdeContext): any => { - return { - ...(input.AcceleratorType != null && { AcceleratorType: input.AcceleratorType }), - ...(input.ContainerStartupHealthCheckTimeoutInSeconds != null && { - ContainerStartupHealthCheckTimeoutInSeconds: input.ContainerStartupHealthCheckTimeoutInSeconds, - }), - ...(input.CoreDumpConfig != null && { - CoreDumpConfig: se_ProductionVariantCoreDumpConfig(input.CoreDumpConfig, context), - }), - ...(input.EnableSSMAccess != null && { EnableSSMAccess: input.EnableSSMAccess }), - ...(input.InitialInstanceCount != null && { InitialInstanceCount: input.InitialInstanceCount }), - ...(input.InitialVariantWeight != null && { InitialVariantWeight: __serializeFloat(input.InitialVariantWeight) }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.ModelDataDownloadTimeoutInSeconds != null && { - ModelDataDownloadTimeoutInSeconds: input.ModelDataDownloadTimeoutInSeconds, - }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.ServerlessConfig != null && { - ServerlessConfig: se_ProductionVariantServerlessConfig(input.ServerlessConfig, context), - }), - ...(input.VariantName != null && { VariantName: input.VariantName }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1ProductionVariantCoreDumpConfig - */ -const se_ProductionVariantCoreDumpConfig = (input: ProductionVariantCoreDumpConfig, context: __SerdeContext): any => { - return { - ...(input.DestinationS3Uri != null && { DestinationS3Uri: input.DestinationS3Uri }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1ProductionVariantList - */ -const se_ProductionVariantList = (input: ProductionVariant[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProductionVariant(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProductionVariantServerlessConfig - */ -const se_ProductionVariantServerlessConfig = ( - input: ProductionVariantServerlessConfig, - context: __SerdeContext -): any => { - return { - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MemorySizeInMB != null && { MemorySizeInMB: input.MemorySizeInMB }), - }; -}; - -/** - * serializeAws_json1_1ProfilerConfig - */ -const se_ProfilerConfig = (input: ProfilerConfig, context: __SerdeContext): any => { - return { - ...(input.DisableProfiler != null && { DisableProfiler: input.DisableProfiler }), - ...(input.ProfilingIntervalInMilliseconds != null && { - ProfilingIntervalInMilliseconds: input.ProfilingIntervalInMilliseconds, - }), - ...(input.ProfilingParameters != null && { - ProfilingParameters: se_ProfilingParameters(input.ProfilingParameters, context), - }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1ProfilerConfigForUpdate - */ -const se_ProfilerConfigForUpdate = (input: ProfilerConfigForUpdate, context: __SerdeContext): any => { - return { - ...(input.DisableProfiler != null && { DisableProfiler: input.DisableProfiler }), - ...(input.ProfilingIntervalInMilliseconds != null && { - ProfilingIntervalInMilliseconds: input.ProfilingIntervalInMilliseconds, - }), - ...(input.ProfilingParameters != null && { - ProfilingParameters: se_ProfilingParameters(input.ProfilingParameters, context), - }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1ProfilerRuleConfiguration - */ -const se_ProfilerRuleConfiguration = (input: ProfilerRuleConfiguration, context: __SerdeContext): any => { - return { - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.RuleConfigurationName != null && { RuleConfigurationName: input.RuleConfigurationName }), - ...(input.RuleEvaluatorImage != null && { RuleEvaluatorImage: input.RuleEvaluatorImage }), - ...(input.RuleParameters != null && { RuleParameters: se_RuleParameters(input.RuleParameters, context) }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1ProfilerRuleConfigurations - */ -const se_ProfilerRuleConfigurations = (input: ProfilerRuleConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProfilerRuleConfiguration(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProfilingParameters - */ -const se_ProfilingParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1PropertyNameQuery - */ -const se_PropertyNameQuery = (input: PropertyNameQuery, context: __SerdeContext): any => { - return { - ...(input.PropertyNameHint != null && { PropertyNameHint: input.PropertyNameHint }), - }; -}; - -/** - * serializeAws_json1_1ProvisioningParameter - */ -const se_ProvisioningParameter = (input: ProvisioningParameter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ProvisioningParameters - */ -const se_ProvisioningParameters = (input: ProvisioningParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProvisioningParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1PublicWorkforceTaskPrice - */ -const se_PublicWorkforceTaskPrice = (input: PublicWorkforceTaskPrice, context: __SerdeContext): any => { - return { - ...(input.AmountInUsd != null && { AmountInUsd: se_USD(input.AmountInUsd, context) }), - }; -}; - -/** - * serializeAws_json1_1PutModelPackageGroupPolicyInput - */ -const se_PutModelPackageGroupPolicyInput = (input: PutModelPackageGroupPolicyInput, context: __SerdeContext): any => { - return { - ...(input.ModelPackageGroupName != null && { ModelPackageGroupName: input.ModelPackageGroupName }), - ...(input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy }), - }; -}; - -/** - * serializeAws_json1_1QueryFilters - */ -const se_QueryFilters = (input: QueryFilters, context: __SerdeContext): any => { - return { - ...(input.CreatedAfter != null && { CreatedAfter: Math.round(input.CreatedAfter.getTime() / 1000) }), - ...(input.CreatedBefore != null && { CreatedBefore: Math.round(input.CreatedBefore.getTime() / 1000) }), - ...(input.LineageTypes != null && { LineageTypes: se_QueryLineageTypes(input.LineageTypes, context) }), - ...(input.ModifiedAfter != null && { ModifiedAfter: Math.round(input.ModifiedAfter.getTime() / 1000) }), - ...(input.ModifiedBefore != null && { ModifiedBefore: Math.round(input.ModifiedBefore.getTime() / 1000) }), - ...(input.Properties != null && { Properties: se_QueryProperties(input.Properties, context) }), - ...(input.Types != null && { Types: se_QueryTypes(input.Types, context) }), - }; -}; - -/** - * serializeAws_json1_1QueryLineageRequest - */ -const se_QueryLineageRequest = (input: QueryLineageRequest, context: __SerdeContext): any => { - return { - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.Filters != null && { Filters: se_QueryFilters(input.Filters, context) }), - ...(input.IncludeEdges != null && { IncludeEdges: input.IncludeEdges }), - ...(input.MaxDepth != null && { MaxDepth: input.MaxDepth }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartArns != null && { StartArns: se_QueryLineageStartArns(input.StartArns, context) }), - }; -}; - -/** - * serializeAws_json1_1QueryLineageStartArns - */ -const se_QueryLineageStartArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1QueryLineageTypes - */ -const se_QueryLineageTypes = (input: (LineageType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1QueryProperties - */ -const se_QueryProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1QueryTypes - */ -const se_QueryTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RealTimeInferenceConfig - */ -const se_RealTimeInferenceConfig = (input: RealTimeInferenceConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - }; -}; - -/** - * serializeAws_json1_1RealtimeInferenceInstanceTypes - */ -const se_RealtimeInferenceInstanceTypes = ( - input: (ProductionVariantInstanceType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RecommendationJobCompiledOutputConfig - */ -const se_RecommendationJobCompiledOutputConfig = ( - input: RecommendationJobCompiledOutputConfig, - context: __SerdeContext -): any => { - return { - ...(input.S3OutputUri != null && { S3OutputUri: input.S3OutputUri }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobContainerConfig - */ -const se_RecommendationJobContainerConfig = (input: RecommendationJobContainerConfig, context: __SerdeContext): any => { - return { - ...(input.DataInputConfig != null && { DataInputConfig: input.DataInputConfig }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.Framework != null && { Framework: input.Framework }), - ...(input.FrameworkVersion != null && { FrameworkVersion: input.FrameworkVersion }), - ...(input.NearestModelName != null && { NearestModelName: input.NearestModelName }), - ...(input.PayloadConfig != null && { - PayloadConfig: se_RecommendationJobPayloadConfig(input.PayloadConfig, context), - }), - ...(input.SupportedInstanceTypes != null && { - SupportedInstanceTypes: se_RecommendationJobSupportedInstanceTypes(input.SupportedInstanceTypes, context), - }), - ...(input.Task != null && { Task: input.Task }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobInputConfig - */ -const se_RecommendationJobInputConfig = (input: RecommendationJobInputConfig, context: __SerdeContext): any => { - return { - ...(input.ContainerConfig != null && { - ContainerConfig: se_RecommendationJobContainerConfig(input.ContainerConfig, context), - }), - ...(input.EndpointConfigurations != null && { - EndpointConfigurations: se_EndpointInputConfigurations(input.EndpointConfigurations, context), - }), - ...(input.Endpoints != null && { Endpoints: se_Endpoints(input.Endpoints, context) }), - ...(input.JobDurationInSeconds != null && { JobDurationInSeconds: input.JobDurationInSeconds }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.ModelPackageVersionArn != null && { ModelPackageVersionArn: input.ModelPackageVersionArn }), - ...(input.ResourceLimit != null && { - ResourceLimit: se_RecommendationJobResourceLimit(input.ResourceLimit, context), - }), - ...(input.TrafficPattern != null && { TrafficPattern: se_TrafficPattern(input.TrafficPattern, context) }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VpcConfig != null && { VpcConfig: se_RecommendationJobVpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobOutputConfig - */ -const se_RecommendationJobOutputConfig = (input: RecommendationJobOutputConfig, context: __SerdeContext): any => { - return { - ...(input.CompiledOutputConfig != null && { - CompiledOutputConfig: se_RecommendationJobCompiledOutputConfig(input.CompiledOutputConfig, context), - }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobPayloadConfig - */ -const se_RecommendationJobPayloadConfig = (input: RecommendationJobPayloadConfig, context: __SerdeContext): any => { - return { - ...(input.SamplePayloadUrl != null && { SamplePayloadUrl: input.SamplePayloadUrl }), - ...(input.SupportedContentTypes != null && { - SupportedContentTypes: se_RecommendationJobSupportedContentTypes(input.SupportedContentTypes, context), - }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobResourceLimit - */ -const se_RecommendationJobResourceLimit = (input: RecommendationJobResourceLimit, context: __SerdeContext): any => { - return { - ...(input.MaxNumberOfTests != null && { MaxNumberOfTests: input.MaxNumberOfTests }), - ...(input.MaxParallelOfTests != null && { MaxParallelOfTests: input.MaxParallelOfTests }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobStoppingConditions - */ -const se_RecommendationJobStoppingConditions = ( - input: RecommendationJobStoppingConditions, - context: __SerdeContext -): any => { - return { - ...(input.MaxInvocations != null && { MaxInvocations: input.MaxInvocations }), - ...(input.ModelLatencyThresholds != null && { - ModelLatencyThresholds: se_ModelLatencyThresholds(input.ModelLatencyThresholds, context), - }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobSupportedContentTypes - */ -const se_RecommendationJobSupportedContentTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RecommendationJobSupportedInstanceTypes - */ -const se_RecommendationJobSupportedInstanceTypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RecommendationJobVpcConfig - */ -const se_RecommendationJobVpcConfig = (input: RecommendationJobVpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_RecommendationJobVpcSecurityGroupIds(input.SecurityGroupIds, context), - }), - ...(input.Subnets != null && { Subnets: se_RecommendationJobVpcSubnets(input.Subnets, context) }), - }; -}; - -/** - * serializeAws_json1_1RecommendationJobVpcSecurityGroupIds - */ -const se_RecommendationJobVpcSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RecommendationJobVpcSubnets - */ -const se_RecommendationJobVpcSubnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RedshiftDatasetDefinition - */ -const se_RedshiftDatasetDefinition = (input: RedshiftDatasetDefinition, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.ClusterRoleArn != null && { ClusterRoleArn: input.ClusterRoleArn }), - ...(input.Database != null && { Database: input.Database }), - ...(input.DbUser != null && { DbUser: input.DbUser }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.OutputCompression != null && { OutputCompression: input.OutputCompression }), - ...(input.OutputFormat != null && { OutputFormat: input.OutputFormat }), - ...(input.OutputS3Uri != null && { OutputS3Uri: input.OutputS3Uri }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - }; -}; - -/** - * serializeAws_json1_1RegisterDevicesRequest - */ -const se_RegisterDevicesRequest = (input: RegisterDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.Devices != null && { Devices: se_Devices(input.Devices, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1RenderableTask - */ -const se_RenderableTask = (input: RenderableTask, context: __SerdeContext): any => { - return { - ...(input.Input != null && { Input: input.Input }), - }; -}; - -/** - * serializeAws_json1_1RenderUiTemplateRequest - */ -const se_RenderUiTemplateRequest = (input: RenderUiTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.HumanTaskUiArn != null && { HumanTaskUiArn: input.HumanTaskUiArn }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Task != null && { Task: se_RenderableTask(input.Task, context) }), - ...(input.UiTemplate != null && { UiTemplate: se_UiTemplate(input.UiTemplate, context) }), - }; -}; - -/** - * serializeAws_json1_1RepositoryAuthConfig - */ -const se_RepositoryAuthConfig = (input: RepositoryAuthConfig, context: __SerdeContext): any => { - return { - ...(input.RepositoryCredentialsProviderArn != null && { - RepositoryCredentialsProviderArn: input.RepositoryCredentialsProviderArn, - }), - }; -}; - -/** - * serializeAws_json1_1ResourceConfig - */ -const se_ResourceConfig = (input: ResourceConfig, context: __SerdeContext): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceGroups != null && { InstanceGroups: se_InstanceGroups(input.InstanceGroups, context) }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KeepAlivePeriodInSeconds != null && { KeepAlivePeriodInSeconds: input.KeepAlivePeriodInSeconds }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1ResourceConfigForUpdate - */ -const se_ResourceConfigForUpdate = (input: ResourceConfigForUpdate, context: __SerdeContext): any => { - return { - ...(input.KeepAlivePeriodInSeconds != null && { KeepAlivePeriodInSeconds: input.KeepAlivePeriodInSeconds }), - }; -}; - -/** - * serializeAws_json1_1ResourceLimits - */ -const se_ResourceLimits = (input: ResourceLimits, context: __SerdeContext): any => { - return { - ...(input.MaxNumberOfTrainingJobs != null && { MaxNumberOfTrainingJobs: input.MaxNumberOfTrainingJobs }), - ...(input.MaxParallelTrainingJobs != null && { MaxParallelTrainingJobs: input.MaxParallelTrainingJobs }), - ...(input.MaxRuntimeInSeconds != null && { MaxRuntimeInSeconds: input.MaxRuntimeInSeconds }), - }; -}; - -/** - * serializeAws_json1_1ResourceSpec - */ -const se_ResourceSpec = (input: ResourceSpec, context: __SerdeContext): any => { - return { - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LifecycleConfigArn != null && { LifecycleConfigArn: input.LifecycleConfigArn }), - ...(input.SageMakerImageArn != null && { SageMakerImageArn: input.SageMakerImageArn }), - ...(input.SageMakerImageVersionArn != null && { SageMakerImageVersionArn: input.SageMakerImageVersionArn }), - }; -}; - -/** - * serializeAws_json1_1ResponseMIMETypes - */ -const se_ResponseMIMETypes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RetentionPolicy - */ -const se_RetentionPolicy = (input: RetentionPolicy, context: __SerdeContext): any => { - return { - ...(input.HomeEfsFileSystem != null && { HomeEfsFileSystem: input.HomeEfsFileSystem }), - }; -}; - -/** - * serializeAws_json1_1RetryPipelineExecutionRequest - */ -const se_RetryPipelineExecutionRequest = (input: RetryPipelineExecutionRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ParallelismConfiguration != null && { - ParallelismConfiguration: se_ParallelismConfiguration(input.ParallelismConfiguration, context), - }), - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - }; -}; - -/** - * serializeAws_json1_1RetryStrategy - */ -const se_RetryStrategy = (input: RetryStrategy, context: __SerdeContext): any => { - return { - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - }; -}; - -/** - * serializeAws_json1_1RSessionAppSettings - */ -const se_RSessionAppSettings = (input: RSessionAppSettings, context: __SerdeContext): any => { - return { - ...(input.CustomImages != null && { CustomImages: se_CustomImages(input.CustomImages, context) }), - ...(input.DefaultResourceSpec != null && { - DefaultResourceSpec: se_ResourceSpec(input.DefaultResourceSpec, context), - }), - }; -}; - -/** - * serializeAws_json1_1RStudioServerProAppSettings - */ -const se_RStudioServerProAppSettings = (input: RStudioServerProAppSettings, context: __SerdeContext): any => { - return { - ...(input.AccessStatus != null && { AccessStatus: input.AccessStatus }), - ...(input.UserGroup != null && { UserGroup: input.UserGroup }), - }; -}; - -/** - * serializeAws_json1_1RStudioServerProDomainSettings - */ -const se_RStudioServerProDomainSettings = (input: RStudioServerProDomainSettings, context: __SerdeContext): any => { - return { - ...(input.DefaultResourceSpec != null && { - DefaultResourceSpec: se_ResourceSpec(input.DefaultResourceSpec, context), - }), - ...(input.DomainExecutionRoleArn != null && { DomainExecutionRoleArn: input.DomainExecutionRoleArn }), - ...(input.RStudioConnectUrl != null && { RStudioConnectUrl: input.RStudioConnectUrl }), - ...(input.RStudioPackageManagerUrl != null && { RStudioPackageManagerUrl: input.RStudioPackageManagerUrl }), - }; -}; - -/** - * serializeAws_json1_1RStudioServerProDomainSettingsForUpdate - */ -const se_RStudioServerProDomainSettingsForUpdate = ( - input: RStudioServerProDomainSettingsForUpdate, - context: __SerdeContext -): any => { - return { - ...(input.DefaultResourceSpec != null && { - DefaultResourceSpec: se_ResourceSpec(input.DefaultResourceSpec, context), - }), - ...(input.DomainExecutionRoleArn != null && { DomainExecutionRoleArn: input.DomainExecutionRoleArn }), - ...(input.RStudioConnectUrl != null && { RStudioConnectUrl: input.RStudioConnectUrl }), - ...(input.RStudioPackageManagerUrl != null && { RStudioPackageManagerUrl: input.RStudioPackageManagerUrl }), - }; -}; - -/** - * serializeAws_json1_1RuleParameters - */ -const se_RuleParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1S3DataSource - */ -const se_S3DataSource = (input: S3DataSource, context: __SerdeContext): any => { - return { - ...(input.AttributeNames != null && { AttributeNames: se_AttributeNames(input.AttributeNames, context) }), - ...(input.InstanceGroupNames != null && { - InstanceGroupNames: se_InstanceGroupNames(input.InstanceGroupNames, context), - }), - ...(input.S3DataDistributionType != null && { S3DataDistributionType: input.S3DataDistributionType }), - ...(input.S3DataType != null && { S3DataType: input.S3DataType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1S3StorageConfig - */ -const se_S3StorageConfig = (input: S3StorageConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.ResolvedOutputS3Uri != null && { ResolvedOutputS3Uri: input.ResolvedOutputS3Uri }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1SageMakerImageVersionAliases - */ -const se_SageMakerImageVersionAliases = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ScheduleConfig - */ -const se_ScheduleConfig = (input: ScheduleConfig, context: __SerdeContext): any => { - return { - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - }; -}; - -/** - * serializeAws_json1_1SearchExpression - */ -const se_SearchExpression = (input: SearchExpression, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.NestedFilters != null && { NestedFilters: se_NestedFiltersList(input.NestedFilters, context) }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.SubExpressions != null && { SubExpressions: se_SearchExpressionList(input.SubExpressions, context) }), - }; -}; - -/** - * serializeAws_json1_1SearchExpressionList - */ -const se_SearchExpressionList = (input: SearchExpression[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchExpression(entry, context); - }); -}; - -/** - * serializeAws_json1_1SearchRequest - */ -const se_SearchRequest = (input: SearchRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Resource != null && { Resource: input.Resource }), - ...(input.SearchExpression != null && { SearchExpression: se_SearchExpression(input.SearchExpression, context) }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SendPipelineExecutionStepFailureRequest - */ -const se_SendPipelineExecutionStepFailureRequest = ( - input: SendPipelineExecutionStepFailureRequest, - context: __SerdeContext -): any => { - return { - ...(input.CallbackToken != null && { CallbackToken: input.CallbackToken }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.FailureReason != null && { FailureReason: input.FailureReason }), - }; -}; - -/** - * serializeAws_json1_1SendPipelineExecutionStepSuccessRequest - */ -const se_SendPipelineExecutionStepSuccessRequest = ( - input: SendPipelineExecutionStepSuccessRequest, - context: __SerdeContext -): any => { - return { - ...(input.CallbackToken != null && { CallbackToken: input.CallbackToken }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.OutputParameters != null && { - OutputParameters: se_OutputParameterList(input.OutputParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1ServiceCatalogProvisioningDetails - */ -const se_ServiceCatalogProvisioningDetails = ( - input: ServiceCatalogProvisioningDetails, - context: __SerdeContext -): any => { - return { - ...(input.PathId != null && { PathId: input.PathId }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningParameters != null && { - ProvisioningParameters: se_ProvisioningParameters(input.ProvisioningParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1ServiceCatalogProvisioningUpdateDetails - */ -const se_ServiceCatalogProvisioningUpdateDetails = ( - input: ServiceCatalogProvisioningUpdateDetails, - context: __SerdeContext -): any => { - return { - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningParameters != null && { - ProvisioningParameters: se_ProvisioningParameters(input.ProvisioningParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1ShadowModeConfig - */ -const se_ShadowModeConfig = (input: ShadowModeConfig, context: __SerdeContext): any => { - return { - ...(input.ShadowModelVariants != null && { - ShadowModelVariants: se_ShadowModelVariantConfigList(input.ShadowModelVariants, context), - }), - ...(input.SourceModelVariantName != null && { SourceModelVariantName: input.SourceModelVariantName }), - }; -}; - -/** - * serializeAws_json1_1ShadowModelVariantConfig - */ -const se_ShadowModelVariantConfig = (input: ShadowModelVariantConfig, context: __SerdeContext): any => { - return { - ...(input.SamplingPercentage != null && { SamplingPercentage: input.SamplingPercentage }), - ...(input.ShadowModelVariantName != null && { ShadowModelVariantName: input.ShadowModelVariantName }), - }; -}; - -/** - * serializeAws_json1_1ShadowModelVariantConfigList - */ -const se_ShadowModelVariantConfigList = (input: ShadowModelVariantConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ShadowModelVariantConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1SharingSettings - */ -const se_SharingSettings = (input: SharingSettings, context: __SerdeContext): any => { - return { - ...(input.NotebookOutputOption != null && { NotebookOutputOption: input.NotebookOutputOption }), - ...(input.S3KmsKeyId != null && { S3KmsKeyId: input.S3KmsKeyId }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1ShuffleConfig - */ -const se_ShuffleConfig = (input: ShuffleConfig, context: __SerdeContext): any => { - return { - ...(input.Seed != null && { Seed: input.Seed }), - }; -}; - -/** - * serializeAws_json1_1SourceAlgorithm - */ -const se_SourceAlgorithm = (input: SourceAlgorithm, context: __SerdeContext): any => { - return { - ...(input.AlgorithmName != null && { AlgorithmName: input.AlgorithmName }), - ...(input.ModelDataUrl != null && { ModelDataUrl: input.ModelDataUrl }), - }; -}; - -/** - * serializeAws_json1_1SourceAlgorithmList - */ -const se_SourceAlgorithmList = (input: SourceAlgorithm[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceAlgorithm(entry, context); - }); -}; - -/** - * serializeAws_json1_1SourceAlgorithmSpecification - */ -const se_SourceAlgorithmSpecification = (input: SourceAlgorithmSpecification, context: __SerdeContext): any => { - return { - ...(input.SourceAlgorithms != null && { - SourceAlgorithms: se_SourceAlgorithmList(input.SourceAlgorithms, context), - }), - }; -}; - -/** - * serializeAws_json1_1SourceIpConfig - */ -const se_SourceIpConfig = (input: SourceIpConfig, context: __SerdeContext): any => { - return { - ...(input.Cidrs != null && { Cidrs: se_Cidrs(input.Cidrs, context) }), - }; -}; - -/** - * serializeAws_json1_1SpaceSettings - */ -const se_SpaceSettings = (input: SpaceSettings, context: __SerdeContext): any => { - return { - ...(input.JupyterServerAppSettings != null && { - JupyterServerAppSettings: se_JupyterServerAppSettings(input.JupyterServerAppSettings, context), - }), - ...(input.KernelGatewayAppSettings != null && { - KernelGatewayAppSettings: se_KernelGatewayAppSettings(input.KernelGatewayAppSettings, context), - }), - }; -}; - -/** - * serializeAws_json1_1StartEdgeDeploymentStageRequest - */ -const se_StartEdgeDeploymentStageRequest = (input: StartEdgeDeploymentStageRequest, context: __SerdeContext): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.StageName != null && { StageName: input.StageName }), - }; -}; - -/** - * serializeAws_json1_1StartInferenceExperimentRequest - */ -const se_StartInferenceExperimentRequest = (input: StartInferenceExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1StartMonitoringScheduleRequest - */ -const se_StartMonitoringScheduleRequest = (input: StartMonitoringScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - }; -}; - -/** - * serializeAws_json1_1StartNotebookInstanceInput - */ -const se_StartNotebookInstanceInput = (input: StartNotebookInstanceInput, context: __SerdeContext): any => { - return { - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - }; -}; - -/** - * serializeAws_json1_1StartPipelineExecutionRequest - */ -const se_StartPipelineExecutionRequest = (input: StartPipelineExecutionRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.ParallelismConfiguration != null && { - ParallelismConfiguration: se_ParallelismConfiguration(input.ParallelismConfiguration, context), - }), - ...(input.PipelineExecutionDescription != null && { - PipelineExecutionDescription: input.PipelineExecutionDescription, - }), - ...(input.PipelineExecutionDisplayName != null && { - PipelineExecutionDisplayName: input.PipelineExecutionDisplayName, - }), - ...(input.PipelineName != null && { PipelineName: input.PipelineName }), - ...(input.PipelineParameters != null && { - PipelineParameters: se_ParameterList(input.PipelineParameters, context), - }), - }; -}; - -/** - * serializeAws_json1_1StopAutoMLJobRequest - */ -const se_StopAutoMLJobRequest = (input: StopAutoMLJobRequest, context: __SerdeContext): any => { - return { - ...(input.AutoMLJobName != null && { AutoMLJobName: input.AutoMLJobName }), - }; -}; - -/** - * serializeAws_json1_1StopCompilationJobRequest - */ -const se_StopCompilationJobRequest = (input: StopCompilationJobRequest, context: __SerdeContext): any => { - return { - ...(input.CompilationJobName != null && { CompilationJobName: input.CompilationJobName }), - }; -}; - -/** - * serializeAws_json1_1StopEdgeDeploymentStageRequest - */ -const se_StopEdgeDeploymentStageRequest = (input: StopEdgeDeploymentStageRequest, context: __SerdeContext): any => { - return { - ...(input.EdgeDeploymentPlanName != null && { EdgeDeploymentPlanName: input.EdgeDeploymentPlanName }), - ...(input.StageName != null && { StageName: input.StageName }), - }; -}; - -/** - * serializeAws_json1_1StopEdgePackagingJobRequest - */ -const se_StopEdgePackagingJobRequest = (input: StopEdgePackagingJobRequest, context: __SerdeContext): any => { - return { - ...(input.EdgePackagingJobName != null && { EdgePackagingJobName: input.EdgePackagingJobName }), - }; -}; - -/** - * serializeAws_json1_1StopHyperParameterTuningJobRequest - */ -const se_StopHyperParameterTuningJobRequest = ( - input: StopHyperParameterTuningJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.HyperParameterTuningJobName != null && { - HyperParameterTuningJobName: input.HyperParameterTuningJobName, - }), - }; -}; - -/** - * serializeAws_json1_1StopInferenceExperimentRequest - */ -const se_StopInferenceExperimentRequest = (input: StopInferenceExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.DesiredModelVariants != null && { - DesiredModelVariants: se_ModelVariantConfigList(input.DesiredModelVariants, context), - }), - ...(input.DesiredState != null && { DesiredState: input.DesiredState }), - ...(input.ModelVariantActions != null && { - ModelVariantActions: se_ModelVariantActionMap(input.ModelVariantActions, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Reason != null && { Reason: input.Reason }), - }; -}; - -/** - * serializeAws_json1_1StopInferenceRecommendationsJobRequest - */ -const se_StopInferenceRecommendationsJobRequest = ( - input: StopInferenceRecommendationsJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - }; -}; - -/** - * serializeAws_json1_1StopLabelingJobRequest - */ -const se_StopLabelingJobRequest = (input: StopLabelingJobRequest, context: __SerdeContext): any => { - return { - ...(input.LabelingJobName != null && { LabelingJobName: input.LabelingJobName }), - }; -}; - -/** - * serializeAws_json1_1StopMonitoringScheduleRequest - */ -const se_StopMonitoringScheduleRequest = (input: StopMonitoringScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - }; -}; - -/** - * serializeAws_json1_1StopNotebookInstanceInput - */ -const se_StopNotebookInstanceInput = (input: StopNotebookInstanceInput, context: __SerdeContext): any => { - return { - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - }; -}; - -/** - * serializeAws_json1_1StoppingCondition - */ -const se_StoppingCondition = (input: StoppingCondition, context: __SerdeContext): any => { - return { - ...(input.MaxRuntimeInSeconds != null && { MaxRuntimeInSeconds: input.MaxRuntimeInSeconds }), - ...(input.MaxWaitTimeInSeconds != null && { MaxWaitTimeInSeconds: input.MaxWaitTimeInSeconds }), - }; -}; - -/** - * serializeAws_json1_1StopPipelineExecutionRequest - */ -const se_StopPipelineExecutionRequest = (input: StopPipelineExecutionRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - }; -}; - -/** - * serializeAws_json1_1StopProcessingJobRequest - */ -const se_StopProcessingJobRequest = (input: StopProcessingJobRequest, context: __SerdeContext): any => { - return { - ...(input.ProcessingJobName != null && { ProcessingJobName: input.ProcessingJobName }), - }; -}; - -/** - * serializeAws_json1_1StopTrainingJobRequest - */ -const se_StopTrainingJobRequest = (input: StopTrainingJobRequest, context: __SerdeContext): any => { - return { - ...(input.TrainingJobName != null && { TrainingJobName: input.TrainingJobName }), - }; -}; - -/** - * serializeAws_json1_1StopTransformJobRequest - */ -const se_StopTransformJobRequest = (input: StopTransformJobRequest, context: __SerdeContext): any => { - return { - ...(input.TransformJobName != null && { TransformJobName: input.TransformJobName }), - }; -}; - -/** - * serializeAws_json1_1Subnets - */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1SuggestionQuery - */ -const se_SuggestionQuery = (input: SuggestionQuery, context: __SerdeContext): any => { - return { - ...(input.PropertyNameQuery != null && { - PropertyNameQuery: se_PropertyNameQuery(input.PropertyNameQuery, context), - }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TargetPlatform - */ -const se_TargetPlatform = (input: TargetPlatform, context: __SerdeContext): any => { - return { - ...(input.Accelerator != null && { Accelerator: input.Accelerator }), - ...(input.Arch != null && { Arch: input.Arch }), - ...(input.Os != null && { Os: input.Os }), - }; -}; - -/** - * serializeAws_json1_1TaskKeywords - */ -const se_TaskKeywords = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TensorBoardAppSettings - */ -const se_TensorBoardAppSettings = (input: TensorBoardAppSettings, context: __SerdeContext): any => { - return { - ...(input.DefaultResourceSpec != null && { - DefaultResourceSpec: se_ResourceSpec(input.DefaultResourceSpec, context), - }), - }; -}; - -/** - * serializeAws_json1_1TensorBoardOutputConfig - */ -const se_TensorBoardOutputConfig = (input: TensorBoardOutputConfig, context: __SerdeContext): any => { - return { - ...(input.LocalPath != null && { LocalPath: input.LocalPath }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1TextClassificationJobConfig - */ -const se_TextClassificationJobConfig = (input: TextClassificationJobConfig, context: __SerdeContext): any => { - return { - ...(input.CompletionCriteria != null && { - CompletionCriteria: se_AutoMLJobCompletionCriteria(input.CompletionCriteria, context), - }), - ...(input.ContentColumn != null && { ContentColumn: input.ContentColumn }), - ...(input.TargetLabelColumn != null && { TargetLabelColumn: input.TargetLabelColumn }), - }; -}; - -/** - * serializeAws_json1_1TimeSeriesForecastingSettings - */ -const se_TimeSeriesForecastingSettings = (input: TimeSeriesForecastingSettings, context: __SerdeContext): any => { - return { - ...(input.AmazonForecastRoleArn != null && { AmazonForecastRoleArn: input.AmazonForecastRoleArn }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_json1_1TrafficPattern - */ -const se_TrafficPattern = (input: TrafficPattern, context: __SerdeContext): any => { - return { - ...(input.Phases != null && { Phases: se_Phases(input.Phases, context) }), - ...(input.TrafficType != null && { TrafficType: input.TrafficType }), - }; -}; - -/** - * serializeAws_json1_1TrafficRoutingConfig - */ -const se_TrafficRoutingConfig = (input: TrafficRoutingConfig, context: __SerdeContext): any => { - return { - ...(input.CanarySize != null && { CanarySize: se_CapacitySize(input.CanarySize, context) }), - ...(input.LinearStepSize != null && { LinearStepSize: se_CapacitySize(input.LinearStepSize, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.WaitIntervalInSeconds != null && { WaitIntervalInSeconds: input.WaitIntervalInSeconds }), - }; -}; - -/** - * serializeAws_json1_1TrainingContainerArguments - */ -const se_TrainingContainerArguments = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TrainingContainerEntrypoint - */ -const se_TrainingContainerEntrypoint = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TrainingEnvironmentMap - */ -const se_TrainingEnvironmentMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TrainingImageConfig - */ -const se_TrainingImageConfig = (input: TrainingImageConfig, context: __SerdeContext): any => { - return { - ...(input.TrainingRepositoryAccessMode != null && { - TrainingRepositoryAccessMode: input.TrainingRepositoryAccessMode, - }), - ...(input.TrainingRepositoryAuthConfig != null && { - TrainingRepositoryAuthConfig: se_TrainingRepositoryAuthConfig(input.TrainingRepositoryAuthConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1TrainingInstanceTypes - */ -const se_TrainingInstanceTypes = (input: (TrainingInstanceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TrainingJobDefinition - */ -const se_TrainingJobDefinition = (input: TrainingJobDefinition, context: __SerdeContext): any => { - return { - ...(input.HyperParameters != null && { HyperParameters: se_HyperParameters(input.HyperParameters, context) }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.ResourceConfig != null && { ResourceConfig: se_ResourceConfig(input.ResourceConfig, context) }), - ...(input.StoppingCondition != null && { - StoppingCondition: se_StoppingCondition(input.StoppingCondition, context), - }), - ...(input.TrainingInputMode != null && { TrainingInputMode: input.TrainingInputMode }), - }; -}; - -/** - * serializeAws_json1_1TrainingRepositoryAuthConfig - */ -const se_TrainingRepositoryAuthConfig = (input: TrainingRepositoryAuthConfig, context: __SerdeContext): any => { - return { - ...(input.TrainingRepositoryCredentialsProviderArn != null && { - TrainingRepositoryCredentialsProviderArn: input.TrainingRepositoryCredentialsProviderArn, - }), - }; -}; - -/** - * serializeAws_json1_1TrainingSpecification - */ -const se_TrainingSpecification = (input: TrainingSpecification, context: __SerdeContext): any => { - return { - ...(input.MetricDefinitions != null && { - MetricDefinitions: se_MetricDefinitionList(input.MetricDefinitions, context), - }), - ...(input.SupportedHyperParameters != null && { - SupportedHyperParameters: se_HyperParameterSpecifications(input.SupportedHyperParameters, context), - }), - ...(input.SupportedTrainingInstanceTypes != null && { - SupportedTrainingInstanceTypes: se_TrainingInstanceTypes(input.SupportedTrainingInstanceTypes, context), - }), - ...(input.SupportedTuningJobObjectiveMetrics != null && { - SupportedTuningJobObjectiveMetrics: se_HyperParameterTuningJobObjectives( - input.SupportedTuningJobObjectiveMetrics, - context - ), - }), - ...(input.SupportsDistributedTraining != null && { - SupportsDistributedTraining: input.SupportsDistributedTraining, - }), - ...(input.TrainingChannels != null && { - TrainingChannels: se_ChannelSpecifications(input.TrainingChannels, context), - }), - ...(input.TrainingImage != null && { TrainingImage: input.TrainingImage }), - ...(input.TrainingImageDigest != null && { TrainingImageDigest: input.TrainingImageDigest }), - }; -}; - -/** - * serializeAws_json1_1TransformDataSource - */ -const se_TransformDataSource = (input: TransformDataSource, context: __SerdeContext): any => { - return { - ...(input.S3DataSource != null && { S3DataSource: se_TransformS3DataSource(input.S3DataSource, context) }), - }; -}; - -/** - * serializeAws_json1_1TransformEnvironmentMap - */ -const se_TransformEnvironmentMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TransformInput - */ -const se_TransformInput = (input: TransformInput, context: __SerdeContext): any => { - return { - ...(input.CompressionType != null && { CompressionType: input.CompressionType }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.DataSource != null && { DataSource: se_TransformDataSource(input.DataSource, context) }), - ...(input.SplitType != null && { SplitType: input.SplitType }), - }; -}; - -/** - * serializeAws_json1_1TransformInstanceTypes - */ -const se_TransformInstanceTypes = (input: (TransformInstanceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TransformJobDefinition - */ -const se_TransformJobDefinition = (input: TransformJobDefinition, context: __SerdeContext): any => { - return { - ...(input.BatchStrategy != null && { BatchStrategy: input.BatchStrategy }), - ...(input.Environment != null && { Environment: se_TransformEnvironmentMap(input.Environment, context) }), - ...(input.MaxConcurrentTransforms != null && { MaxConcurrentTransforms: input.MaxConcurrentTransforms }), - ...(input.MaxPayloadInMB != null && { MaxPayloadInMB: input.MaxPayloadInMB }), - ...(input.TransformInput != null && { TransformInput: se_TransformInput(input.TransformInput, context) }), - ...(input.TransformOutput != null && { TransformOutput: se_TransformOutput(input.TransformOutput, context) }), - ...(input.TransformResources != null && { - TransformResources: se_TransformResources(input.TransformResources, context), - }), - }; -}; - -/** - * serializeAws_json1_1TransformOutput - */ -const se_TransformOutput = (input: TransformOutput, context: __SerdeContext): any => { - return { - ...(input.Accept != null && { Accept: input.Accept }), - ...(input.AssembleWith != null && { AssembleWith: input.AssembleWith }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3OutputPath != null && { S3OutputPath: input.S3OutputPath }), - }; -}; - -/** - * serializeAws_json1_1TransformResources - */ -const se_TransformResources = (input: TransformResources, context: __SerdeContext): any => { - return { - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.VolumeKmsKeyId != null && { VolumeKmsKeyId: input.VolumeKmsKeyId }), - }; -}; - -/** - * serializeAws_json1_1TransformS3DataSource - */ -const se_TransformS3DataSource = (input: TransformS3DataSource, context: __SerdeContext): any => { - return { - ...(input.S3DataType != null && { S3DataType: input.S3DataType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; - -/** - * serializeAws_json1_1TrialComponentArtifact - */ -const se_TrialComponentArtifact = (input: TrialComponentArtifact, context: __SerdeContext): any => { - return { - ...(input.MediaType != null && { MediaType: input.MediaType }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TrialComponentArtifacts - */ -const se_TrialComponentArtifacts = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_TrialComponentArtifact(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TrialComponentParameters - */ -const se_TrialComponentParameters = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_TrialComponentParameterValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TrialComponentParameterValue - */ -const se_TrialComponentParameterValue = (input: TrialComponentParameterValue, context: __SerdeContext): any => { - return TrialComponentParameterValue.visit(input, { - NumberValue: (value) => ({ NumberValue: __serializeFloat(value) }), - StringValue: (value) => ({ StringValue: value }), - _: (name, value) => ({ name: value } as any), - }); -}; - -/** - * serializeAws_json1_1TrialComponentStatus - */ -const se_TrialComponentStatus = (input: TrialComponentStatus, context: __SerdeContext): any => { - return { - ...(input.Message != null && { Message: input.Message }), - ...(input.PrimaryStatus != null && { PrimaryStatus: input.PrimaryStatus }), - }; -}; - -/** - * serializeAws_json1_1TuningJobCompletionCriteria - */ -const se_TuningJobCompletionCriteria = (input: TuningJobCompletionCriteria, context: __SerdeContext): any => { - return { - ...(input.BestObjectiveNotImproving != null && { - BestObjectiveNotImproving: se_BestObjectiveNotImproving(input.BestObjectiveNotImproving, context), - }), - ...(input.ConvergenceDetected != null && { - ConvergenceDetected: se_ConvergenceDetected(input.ConvergenceDetected, context), - }), - ...(input.TargetObjectiveMetricValue != null && { - TargetObjectiveMetricValue: __serializeFloat(input.TargetObjectiveMetricValue), - }), - }; -}; - -/** - * serializeAws_json1_1UiConfig - */ -const se_UiConfig = (input: UiConfig, context: __SerdeContext): any => { - return { - ...(input.HumanTaskUiArn != null && { HumanTaskUiArn: input.HumanTaskUiArn }), - ...(input.UiTemplateS3Uri != null && { UiTemplateS3Uri: input.UiTemplateS3Uri }), - }; -}; - -/** - * serializeAws_json1_1UiTemplate - */ -const se_UiTemplate = (input: UiTemplate, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - }; -}; - -/** - * serializeAws_json1_1UpdateActionRequest - */ -const se_UpdateActionRequest = (input: UpdateActionRequest, context: __SerdeContext): any => { - return { - ...(input.ActionName != null && { ActionName: input.ActionName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Properties != null && { Properties: se_LineageEntityParameters(input.Properties, context) }), - ...(input.PropertiesToRemove != null && { - PropertiesToRemove: se_ListLineageEntityParameterKey(input.PropertiesToRemove, context), - }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_json1_1UpdateAppImageConfigRequest - */ -const se_UpdateAppImageConfigRequest = (input: UpdateAppImageConfigRequest, context: __SerdeContext): any => { - return { - ...(input.AppImageConfigName != null && { AppImageConfigName: input.AppImageConfigName }), - ...(input.KernelGatewayImageConfig != null && { - KernelGatewayImageConfig: se_KernelGatewayImageConfig(input.KernelGatewayImageConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateArtifactRequest - */ -const se_UpdateArtifactRequest = (input: UpdateArtifactRequest, context: __SerdeContext): any => { - return { - ...(input.ArtifactArn != null && { ArtifactArn: input.ArtifactArn }), - ...(input.ArtifactName != null && { ArtifactName: input.ArtifactName }), - ...(input.Properties != null && { Properties: se_LineageEntityParameters(input.Properties, context) }), - ...(input.PropertiesToRemove != null && { - PropertiesToRemove: se_ListLineageEntityParameterKey(input.PropertiesToRemove, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateCodeRepositoryInput - */ -const se_UpdateCodeRepositoryInput = (input: UpdateCodeRepositoryInput, context: __SerdeContext): any => { - return { - ...(input.CodeRepositoryName != null && { CodeRepositoryName: input.CodeRepositoryName }), - ...(input.GitConfig != null && { GitConfig: se_GitConfigForUpdate(input.GitConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateContextRequest - */ -const se_UpdateContextRequest = (input: UpdateContextRequest, context: __SerdeContext): any => { - return { - ...(input.ContextName != null && { ContextName: input.ContextName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Properties != null && { Properties: se_LineageEntityParameters(input.Properties, context) }), - ...(input.PropertiesToRemove != null && { - PropertiesToRemove: se_ListLineageEntityParameterKey(input.PropertiesToRemove, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateDeviceFleetRequest - */ -const se_UpdateDeviceFleetRequest = (input: UpdateDeviceFleetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.EnableIotRoleAlias != null && { EnableIotRoleAlias: input.EnableIotRoleAlias }), - ...(input.OutputConfig != null && { OutputConfig: se_EdgeOutputConfig(input.OutputConfig, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_json1_1UpdateDevicesRequest - */ -const se_UpdateDevicesRequest = (input: UpdateDevicesRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }), - ...(input.Devices != null && { Devices: se_Devices(input.Devices, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateDomainRequest - */ -const se_UpdateDomainRequest = (input: UpdateDomainRequest, context: __SerdeContext): any => { - return { - ...(input.AppSecurityGroupManagement != null && { AppSecurityGroupManagement: input.AppSecurityGroupManagement }), - ...(input.DefaultSpaceSettings != null && { - DefaultSpaceSettings: se_DefaultSpaceSettings(input.DefaultSpaceSettings, context), - }), - ...(input.DefaultUserSettings != null && { - DefaultUserSettings: se_UserSettings(input.DefaultUserSettings, context), - }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.DomainSettingsForUpdate != null && { - DomainSettingsForUpdate: se_DomainSettingsForUpdate(input.DomainSettingsForUpdate, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateEndpointInput - */ -const se_UpdateEndpointInput = (input: UpdateEndpointInput, context: __SerdeContext): any => { - return { - ...(input.DeploymentConfig != null && { DeploymentConfig: se_DeploymentConfig(input.DeploymentConfig, context) }), - ...(input.EndpointConfigName != null && { EndpointConfigName: input.EndpointConfigName }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - ...(input.ExcludeRetainedVariantProperties != null && { - ExcludeRetainedVariantProperties: se_VariantPropertyList(input.ExcludeRetainedVariantProperties, context), - }), - ...(input.RetainAllVariantProperties != null && { RetainAllVariantProperties: input.RetainAllVariantProperties }), - ...(input.RetainDeploymentConfig != null && { RetainDeploymentConfig: input.RetainDeploymentConfig }), - }; -}; - -/** - * serializeAws_json1_1UpdateEndpointWeightsAndCapacitiesInput - */ -const se_UpdateEndpointWeightsAndCapacitiesInput = ( - input: UpdateEndpointWeightsAndCapacitiesInput, - context: __SerdeContext -): any => { - return { - ...(input.DesiredWeightsAndCapacities != null && { - DesiredWeightsAndCapacities: se_DesiredWeightAndCapacityList(input.DesiredWeightsAndCapacities, context), - }), - ...(input.EndpointName != null && { EndpointName: input.EndpointName }), - }; -}; - -/** - * serializeAws_json1_1UpdateExperimentRequest - */ -const se_UpdateExperimentRequest = (input: UpdateExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.ExperimentName != null && { ExperimentName: input.ExperimentName }), - }; -}; - -/** - * serializeAws_json1_1UpdateFeatureGroupRequest - */ -const se_UpdateFeatureGroupRequest = (input: UpdateFeatureGroupRequest, context: __SerdeContext): any => { - return { - ...(input.FeatureAdditions != null && { FeatureAdditions: se_FeatureAdditions(input.FeatureAdditions, context) }), - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - }; -}; - -/** - * serializeAws_json1_1UpdateFeatureMetadataRequest - */ -const se_UpdateFeatureMetadataRequest = (input: UpdateFeatureMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FeatureGroupName != null && { FeatureGroupName: input.FeatureGroupName }), - ...(input.FeatureName != null && { FeatureName: input.FeatureName }), - ...(input.ParameterAdditions != null && { - ParameterAdditions: se_FeatureParameterAdditions(input.ParameterAdditions, context), - }), - ...(input.ParameterRemovals != null && { - ParameterRemovals: se_FeatureParameterRemovals(input.ParameterRemovals, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateHubRequest - */ -const se_UpdateHubRequest = (input: UpdateHubRequest, context: __SerdeContext): any => { - return { - ...(input.HubDescription != null && { HubDescription: input.HubDescription }), - ...(input.HubDisplayName != null && { HubDisplayName: input.HubDisplayName }), - ...(input.HubName != null && { HubName: input.HubName }), - ...(input.HubSearchKeywords != null && { - HubSearchKeywords: se_HubSearchKeywordList(input.HubSearchKeywords, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateImageRequest - */ -const se_UpdateImageRequest = (input: UpdateImageRequest, context: __SerdeContext): any => { - return { - ...(input.DeleteProperties != null && { - DeleteProperties: se_ImageDeletePropertyList(input.DeleteProperties, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_json1_1UpdateImageVersionRequest - */ -const se_UpdateImageVersionRequest = (input: UpdateImageVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.AliasesToAdd != null && { AliasesToAdd: se_SageMakerImageVersionAliases(input.AliasesToAdd, context) }), - ...(input.AliasesToDelete != null && { - AliasesToDelete: se_SageMakerImageVersionAliases(input.AliasesToDelete, context), - }), - ...(input.Horovod != null && { Horovod: input.Horovod }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.JobType != null && { JobType: input.JobType }), - ...(input.MLFramework != null && { MLFramework: input.MLFramework }), - ...(input.Processor != null && { Processor: input.Processor }), - ...(input.ProgrammingLang != null && { ProgrammingLang: input.ProgrammingLang }), - ...(input.ReleaseNotes != null && { ReleaseNotes: input.ReleaseNotes }), - ...(input.VendorGuidance != null && { VendorGuidance: input.VendorGuidance }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1UpdateInferenceExperimentRequest - */ -const se_UpdateInferenceExperimentRequest = (input: UpdateInferenceExperimentRequest, context: __SerdeContext): any => { - return { - ...(input.DataStorageConfig != null && { - DataStorageConfig: se_InferenceExperimentDataStorageConfig(input.DataStorageConfig, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ModelVariants != null && { ModelVariants: se_ModelVariantConfigList(input.ModelVariants, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Schedule != null && { Schedule: se_InferenceExperimentSchedule(input.Schedule, context) }), - ...(input.ShadowModeConfig != null && { ShadowModeConfig: se_ShadowModeConfig(input.ShadowModeConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateModelCardRequest - */ -const se_UpdateModelCardRequest = (input: UpdateModelCardRequest, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.ModelCardName != null && { ModelCardName: input.ModelCardName }), - ...(input.ModelCardStatus != null && { ModelCardStatus: input.ModelCardStatus }), - }; -}; - -/** - * serializeAws_json1_1UpdateModelPackageInput - */ -const se_UpdateModelPackageInput = (input: UpdateModelPackageInput, context: __SerdeContext): any => { - return { - ...(input.AdditionalInferenceSpecificationsToAdd != null && { - AdditionalInferenceSpecificationsToAdd: se_AdditionalInferenceSpecifications( - input.AdditionalInferenceSpecificationsToAdd, - context - ), - }), - ...(input.ApprovalDescription != null && { ApprovalDescription: input.ApprovalDescription }), - ...(input.CustomerMetadataProperties != null && { - CustomerMetadataProperties: se_CustomerMetadataMap(input.CustomerMetadataProperties, context), - }), - ...(input.CustomerMetadataPropertiesToRemove != null && { - CustomerMetadataPropertiesToRemove: se_CustomerMetadataKeyList(input.CustomerMetadataPropertiesToRemove, context), - }), - ...(input.ModelApprovalStatus != null && { ModelApprovalStatus: input.ModelApprovalStatus }), - ...(input.ModelPackageArn != null && { ModelPackageArn: input.ModelPackageArn }), - }; -}; - -/** - * serializeAws_json1_1UpdateMonitoringAlertRequest - */ -const se_UpdateMonitoringAlertRequest = (input: UpdateMonitoringAlertRequest, context: __SerdeContext): any => { - return { - ...(input.DatapointsToAlert != null && { DatapointsToAlert: input.DatapointsToAlert }), - ...(input.EvaluationPeriod != null && { EvaluationPeriod: input.EvaluationPeriod }), - ...(input.MonitoringAlertName != null && { MonitoringAlertName: input.MonitoringAlertName }), - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - }; -}; - -/** - * serializeAws_json1_1UpdateMonitoringScheduleRequest - */ -const se_UpdateMonitoringScheduleRequest = (input: UpdateMonitoringScheduleRequest, context: __SerdeContext): any => { - return { - ...(input.MonitoringScheduleConfig != null && { - MonitoringScheduleConfig: se_MonitoringScheduleConfig(input.MonitoringScheduleConfig, context), - }), - ...(input.MonitoringScheduleName != null && { MonitoringScheduleName: input.MonitoringScheduleName }), - }; -}; - -/** - * serializeAws_json1_1UpdateNotebookInstanceInput - */ -const se_UpdateNotebookInstanceInput = (input: UpdateNotebookInstanceInput, context: __SerdeContext): any => { - return { - ...(input.AcceleratorTypes != null && { - AcceleratorTypes: se_NotebookInstanceAcceleratorTypes(input.AcceleratorTypes, context), - }), - ...(input.AdditionalCodeRepositories != null && { - AdditionalCodeRepositories: se_AdditionalCodeRepositoryNamesOrUrls(input.AdditionalCodeRepositories, context), - }), - ...(input.DefaultCodeRepository != null && { DefaultCodeRepository: input.DefaultCodeRepository }), - ...(input.DisassociateAcceleratorTypes != null && { - DisassociateAcceleratorTypes: input.DisassociateAcceleratorTypes, - }), - ...(input.DisassociateAdditionalCodeRepositories != null && { - DisassociateAdditionalCodeRepositories: input.DisassociateAdditionalCodeRepositories, - }), - ...(input.DisassociateDefaultCodeRepository != null && { - DisassociateDefaultCodeRepository: input.DisassociateDefaultCodeRepository, - }), - ...(input.DisassociateLifecycleConfig != null && { - DisassociateLifecycleConfig: input.DisassociateLifecycleConfig, - }), - ...(input.InstanceMetadataServiceConfiguration != null && { - InstanceMetadataServiceConfiguration: se_InstanceMetadataServiceConfiguration( - input.InstanceMetadataServiceConfiguration, - context - ), - }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.LifecycleConfigName != null && { LifecycleConfigName: input.LifecycleConfigName }), - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RootAccess != null && { RootAccess: input.RootAccess }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_json1_1UpdateNotebookInstanceLifecycleConfigInput - */ -const se_UpdateNotebookInstanceLifecycleConfigInput = ( - input: UpdateNotebookInstanceLifecycleConfigInput, - context: __SerdeContext -): any => { - return { - ...(input.NotebookInstanceLifecycleConfigName != null && { - NotebookInstanceLifecycleConfigName: input.NotebookInstanceLifecycleConfigName, - }), - ...(input.OnCreate != null && { OnCreate: se_NotebookInstanceLifecycleConfigList(input.OnCreate, context) }), - ...(input.OnStart != null && { OnStart: se_NotebookInstanceLifecycleConfigList(input.OnStart, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdatePipelineExecutionRequest - */ -const se_UpdatePipelineExecutionRequest = (input: UpdatePipelineExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.ParallelismConfiguration != null && { - ParallelismConfiguration: se_ParallelismConfiguration(input.ParallelismConfiguration, context), - }), - ...(input.PipelineExecutionArn != null && { PipelineExecutionArn: input.PipelineExecutionArn }), - ...(input.PipelineExecutionDescription != null && { - PipelineExecutionDescription: input.PipelineExecutionDescription, - }), - ...(input.PipelineExecutionDisplayName != null && { - PipelineExecutionDisplayName: input.PipelineExecutionDisplayName, - }), - }; -}; - -/** - * serializeAws_json1_1UpdatePipelineRequest - */ -const se_UpdatePipelineRequest = (input: UpdatePipelineRequest, context: __SerdeContext): any => { - return { - ...(input.ParallelismConfiguration != null && { - ParallelismConfiguration: se_ParallelismConfiguration(input.ParallelismConfiguration, context), - }), - ...(input.PipelineDefinition != null && { PipelineDefinition: input.PipelineDefinition }), - ...(input.PipelineDefinitionS3Location != null && { - PipelineDefinitionS3Location: se_PipelineDefinitionS3Location(input.PipelineDefinitionS3Location, context), - }), - ...(input.PipelineDescription != null && { PipelineDescription: input.PipelineDescription }), - ...(input.PipelineDisplayName != null && { PipelineDisplayName: input.PipelineDisplayName }), - ...(input.PipelineName != null && { PipelineName: input.PipelineName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; - -/** - * serializeAws_json1_1UpdateProjectInput - */ -const se_UpdateProjectInput = (input: UpdateProjectInput, context: __SerdeContext): any => { - return { - ...(input.ProjectDescription != null && { ProjectDescription: input.ProjectDescription }), - ...(input.ProjectName != null && { ProjectName: input.ProjectName }), - ...(input.ServiceCatalogProvisioningUpdateDetails != null && { - ServiceCatalogProvisioningUpdateDetails: se_ServiceCatalogProvisioningUpdateDetails( - input.ServiceCatalogProvisioningUpdateDetails, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateSpaceRequest - */ -const se_UpdateSpaceRequest = (input: UpdateSpaceRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpaceName != null && { SpaceName: input.SpaceName }), - ...(input.SpaceSettings != null && { SpaceSettings: se_SpaceSettings(input.SpaceSettings, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateTrainingJobRequest - */ -const se_UpdateTrainingJobRequest = (input: UpdateTrainingJobRequest, context: __SerdeContext): any => { - return { - ...(input.ProfilerConfig != null && { ProfilerConfig: se_ProfilerConfigForUpdate(input.ProfilerConfig, context) }), - ...(input.ProfilerRuleConfigurations != null && { - ProfilerRuleConfigurations: se_ProfilerRuleConfigurations(input.ProfilerRuleConfigurations, context), - }), - ...(input.ResourceConfig != null && { ResourceConfig: se_ResourceConfigForUpdate(input.ResourceConfig, context) }), - ...(input.TrainingJobName != null && { TrainingJobName: input.TrainingJobName }), - }; -}; - -/** - * serializeAws_json1_1UpdateTrialComponentRequest - */ -const se_UpdateTrialComponentRequest = (input: UpdateTrialComponentRequest, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.InputArtifacts != null && { InputArtifacts: se_TrialComponentArtifacts(input.InputArtifacts, context) }), - ...(input.InputArtifactsToRemove != null && { - InputArtifactsToRemove: se_ListTrialComponentKey256(input.InputArtifactsToRemove, context), - }), - ...(input.OutputArtifacts != null && { - OutputArtifacts: se_TrialComponentArtifacts(input.OutputArtifacts, context), - }), - ...(input.OutputArtifactsToRemove != null && { - OutputArtifactsToRemove: se_ListTrialComponentKey256(input.OutputArtifactsToRemove, context), - }), - ...(input.Parameters != null && { Parameters: se_TrialComponentParameters(input.Parameters, context) }), - ...(input.ParametersToRemove != null && { - ParametersToRemove: se_ListTrialComponentKey256(input.ParametersToRemove, context), - }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.Status != null && { Status: se_TrialComponentStatus(input.Status, context) }), - ...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }), - }; -}; - -/** - * serializeAws_json1_1UpdateTrialRequest - */ -const se_UpdateTrialRequest = (input: UpdateTrialRequest, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.TrialName != null && { TrialName: input.TrialName }), - }; -}; - -/** - * serializeAws_json1_1UpdateUserProfileRequest - */ -const se_UpdateUserProfileRequest = (input: UpdateUserProfileRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.UserProfileName != null && { UserProfileName: input.UserProfileName }), - ...(input.UserSettings != null && { UserSettings: se_UserSettings(input.UserSettings, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateWorkforceRequest - */ -const se_UpdateWorkforceRequest = (input: UpdateWorkforceRequest, context: __SerdeContext): any => { - return { - ...(input.OidcConfig != null && { OidcConfig: se_OidcConfig(input.OidcConfig, context) }), - ...(input.SourceIpConfig != null && { SourceIpConfig: se_SourceIpConfig(input.SourceIpConfig, context) }), - ...(input.WorkforceName != null && { WorkforceName: input.WorkforceName }), - ...(input.WorkforceVpcConfig != null && { - WorkforceVpcConfig: se_WorkforceVpcConfigRequest(input.WorkforceVpcConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateWorkteamRequest - */ -const se_UpdateWorkteamRequest = (input: UpdateWorkteamRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.MemberDefinitions != null && { - MemberDefinitions: se_MemberDefinitions(input.MemberDefinitions, context), - }), - ...(input.NotificationConfiguration != null && { - NotificationConfiguration: se_NotificationConfiguration(input.NotificationConfiguration, context), - }), - ...(input.WorkteamName != null && { WorkteamName: input.WorkteamName }), - }; -}; - -/** - * serializeAws_json1_1USD - */ -const se_USD = (input: USD, context: __SerdeContext): any => { - return { - ...(input.Cents != null && { Cents: input.Cents }), - ...(input.Dollars != null && { Dollars: input.Dollars }), - ...(input.TenthFractionsOfACent != null && { TenthFractionsOfACent: input.TenthFractionsOfACent }), - }; -}; - -/** - * serializeAws_json1_1UserSettings - */ -const se_UserSettings = (input: UserSettings, context: __SerdeContext): any => { - return { - ...(input.CanvasAppSettings != null && { - CanvasAppSettings: se_CanvasAppSettings(input.CanvasAppSettings, context), - }), - ...(input.ExecutionRole != null && { ExecutionRole: input.ExecutionRole }), - ...(input.JupyterServerAppSettings != null && { - JupyterServerAppSettings: se_JupyterServerAppSettings(input.JupyterServerAppSettings, context), - }), - ...(input.KernelGatewayAppSettings != null && { - KernelGatewayAppSettings: se_KernelGatewayAppSettings(input.KernelGatewayAppSettings, context), - }), - ...(input.RSessionAppSettings != null && { - RSessionAppSettings: se_RSessionAppSettings(input.RSessionAppSettings, context), - }), - ...(input.RStudioServerProAppSettings != null && { - RStudioServerProAppSettings: se_RStudioServerProAppSettings(input.RStudioServerProAppSettings, context), - }), - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroupIds(input.SecurityGroups, context) }), - ...(input.SharingSettings != null && { SharingSettings: se_SharingSettings(input.SharingSettings, context) }), - ...(input.TensorBoardAppSettings != null && { - TensorBoardAppSettings: se_TensorBoardAppSettings(input.TensorBoardAppSettings, context), - }), - }; -}; - -/** - * serializeAws_json1_1VariantProperty - */ -const se_VariantProperty = (input: VariantProperty, context: __SerdeContext): any => { - return { - ...(input.VariantPropertyType != null && { VariantPropertyType: input.VariantPropertyType }), - }; -}; - -/** - * serializeAws_json1_1VariantPropertyList - */ -const se_VariantPropertyList = (input: VariantProperty[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VariantProperty(entry, context); - }); -}; - -/** - * serializeAws_json1_1VpcConfig - */ -const se_VpcConfig = (input: VpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_VpcSecurityGroupIds(input.SecurityGroupIds, context), - }), - ...(input.Subnets != null && { Subnets: se_Subnets(input.Subnets, context) }), - }; -}; - -/** - * serializeAws_json1_1VpcSecurityGroupIds - */ -const se_VpcSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkforceSecurityGroupIds - */ -const se_WorkforceSecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkforceSubnets - */ -const se_WorkforceSubnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkforceVpcConfigRequest - */ -const se_WorkforceVpcConfigRequest = (input: WorkforceVpcConfigRequest, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { - SecurityGroupIds: se_WorkforceSecurityGroupIds(input.SecurityGroupIds, context), - }), - ...(input.Subnets != null && { Subnets: se_WorkforceSubnets(input.Subnets, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * deserializeAws_json1_1ActionSource - */ -const de_ActionSource = (output: any, context: __SerdeContext): ActionSource => { - return { - SourceId: __expectString(output.SourceId), - SourceType: __expectString(output.SourceType), - SourceUri: __expectString(output.SourceUri), - } as any; -}; - -/** - * deserializeAws_json1_1ActionSummaries - */ -const de_ActionSummaries = (output: any, context: __SerdeContext): ActionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionSummary - */ -const de_ActionSummary = (output: any, context: __SerdeContext): ActionSummary => { - return { - ActionArn: __expectString(output.ActionArn), - ActionName: __expectString(output.ActionName), - ActionType: __expectString(output.ActionType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Source: output.Source != null ? de_ActionSource(output.Source, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AddAssociationResponse - */ -const de_AddAssociationResponse = (output: any, context: __SerdeContext): AddAssociationResponse => { - return { - DestinationArn: __expectString(output.DestinationArn), - SourceArn: __expectString(output.SourceArn), - } as any; -}; - -/** - * deserializeAws_json1_1AdditionalCodeRepositoryNamesOrUrls - */ -const de_AdditionalCodeRepositoryNamesOrUrls = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AdditionalInferenceSpecificationDefinition - */ -const de_AdditionalInferenceSpecificationDefinition = ( - output: any, - context: __SerdeContext -): AdditionalInferenceSpecificationDefinition => { - return { - Containers: - output.Containers != null ? de_ModelPackageContainerDefinitionList(output.Containers, context) : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - SupportedContentTypes: - output.SupportedContentTypes != null ? de_ContentTypes(output.SupportedContentTypes, context) : undefined, - SupportedRealtimeInferenceInstanceTypes: - output.SupportedRealtimeInferenceInstanceTypes != null - ? de_RealtimeInferenceInstanceTypes(output.SupportedRealtimeInferenceInstanceTypes, context) - : undefined, - SupportedResponseMIMETypes: - output.SupportedResponseMIMETypes != null - ? de_ResponseMIMETypes(output.SupportedResponseMIMETypes, context) - : undefined, - SupportedTransformInstanceTypes: - output.SupportedTransformInstanceTypes != null - ? de_TransformInstanceTypes(output.SupportedTransformInstanceTypes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AdditionalInferenceSpecifications - */ -const de_AdditionalInferenceSpecifications = ( - output: any, - context: __SerdeContext -): AdditionalInferenceSpecificationDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalInferenceSpecificationDefinition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AddTagsOutput - */ -const de_AddTagsOutput = (output: any, context: __SerdeContext): AddTagsOutput => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AgentVersion - */ -const de_AgentVersion = (output: any, context: __SerdeContext): AgentVersion => { - return { - AgentCount: __expectLong(output.AgentCount), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1AgentVersions - */ -const de_AgentVersions = (output: any, context: __SerdeContext): AgentVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AgentVersion(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Alarm - */ -const de_Alarm = (output: any, context: __SerdeContext): Alarm => { - return { - AlarmName: __expectString(output.AlarmName), - } as any; -}; - -/** - * deserializeAws_json1_1AlarmList - */ -const de_AlarmList = (output: any, context: __SerdeContext): Alarm[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Alarm(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlgorithmSpecification - */ -const de_AlgorithmSpecification = (output: any, context: __SerdeContext): AlgorithmSpecification => { - return { - AlgorithmName: __expectString(output.AlgorithmName), - ContainerArguments: - output.ContainerArguments != null ? de_TrainingContainerArguments(output.ContainerArguments, context) : undefined, - ContainerEntrypoint: - output.ContainerEntrypoint != null - ? de_TrainingContainerEntrypoint(output.ContainerEntrypoint, context) - : undefined, - EnableSageMakerMetricsTimeSeries: __expectBoolean(output.EnableSageMakerMetricsTimeSeries), - MetricDefinitions: - output.MetricDefinitions != null ? de_MetricDefinitionList(output.MetricDefinitions, context) : undefined, - TrainingImage: __expectString(output.TrainingImage), - TrainingImageConfig: - output.TrainingImageConfig != null ? de_TrainingImageConfig(output.TrainingImageConfig, context) : undefined, - TrainingInputMode: __expectString(output.TrainingInputMode), - } as any; -}; - -/** - * deserializeAws_json1_1AlgorithmStatusDetails - */ -const de_AlgorithmStatusDetails = (output: any, context: __SerdeContext): AlgorithmStatusDetails => { - return { - ImageScanStatuses: - output.ImageScanStatuses != null ? de_AlgorithmStatusItemList(output.ImageScanStatuses, context) : undefined, - ValidationStatuses: - output.ValidationStatuses != null ? de_AlgorithmStatusItemList(output.ValidationStatuses, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AlgorithmStatusItem - */ -const de_AlgorithmStatusItem = (output: any, context: __SerdeContext): AlgorithmStatusItem => { - return { - FailureReason: __expectString(output.FailureReason), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AlgorithmStatusItemList - */ -const de_AlgorithmStatusItemList = (output: any, context: __SerdeContext): AlgorithmStatusItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlgorithmStatusItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlgorithmSummary - */ -const de_AlgorithmSummary = (output: any, context: __SerdeContext): AlgorithmSummary => { - return { - AlgorithmArn: __expectString(output.AlgorithmArn), - AlgorithmDescription: __expectString(output.AlgorithmDescription), - AlgorithmName: __expectString(output.AlgorithmName), - AlgorithmStatus: __expectString(output.AlgorithmStatus), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AlgorithmSummaryList - */ -const de_AlgorithmSummaryList = (output: any, context: __SerdeContext): AlgorithmSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlgorithmSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlgorithmValidationProfile - */ -const de_AlgorithmValidationProfile = (output: any, context: __SerdeContext): AlgorithmValidationProfile => { - return { - ProfileName: __expectString(output.ProfileName), - TrainingJobDefinition: - output.TrainingJobDefinition != null - ? de_TrainingJobDefinition(output.TrainingJobDefinition, context) - : undefined, - TransformJobDefinition: - output.TransformJobDefinition != null - ? de_TransformJobDefinition(output.TransformJobDefinition, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AlgorithmValidationProfiles - */ -const de_AlgorithmValidationProfiles = (output: any, context: __SerdeContext): AlgorithmValidationProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlgorithmValidationProfile(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlgorithmValidationSpecification - */ -const de_AlgorithmValidationSpecification = ( - output: any, - context: __SerdeContext -): AlgorithmValidationSpecification => { - return { - ValidationProfiles: - output.ValidationProfiles != null - ? de_AlgorithmValidationProfiles(output.ValidationProfiles, context) - : undefined, - ValidationRole: __expectString(output.ValidationRole), - } as any; -}; - -/** - * deserializeAws_json1_1AnnotationConsolidationConfig - */ -const de_AnnotationConsolidationConfig = (output: any, context: __SerdeContext): AnnotationConsolidationConfig => { - return { - AnnotationConsolidationLambdaArn: __expectString(output.AnnotationConsolidationLambdaArn), - } as any; -}; - -/** - * deserializeAws_json1_1AppDetails - */ -const de_AppDetails = (output: any, context: __SerdeContext): AppDetails => { - return { - AppName: __expectString(output.AppName), - AppType: __expectString(output.AppType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainId: __expectString(output.DomainId), - SpaceName: __expectString(output.SpaceName), - Status: __expectString(output.Status), - UserProfileName: __expectString(output.UserProfileName), - } as any; -}; - -/** - * deserializeAws_json1_1AppImageConfigDetails - */ -const de_AppImageConfigDetails = (output: any, context: __SerdeContext): AppImageConfigDetails => { - return { - AppImageConfigArn: __expectString(output.AppImageConfigArn), - AppImageConfigName: __expectString(output.AppImageConfigName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - KernelGatewayImageConfig: - output.KernelGatewayImageConfig != null - ? de_KernelGatewayImageConfig(output.KernelGatewayImageConfig, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AppImageConfigList - */ -const de_AppImageConfigList = (output: any, context: __SerdeContext): AppImageConfigDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppImageConfigDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AppList - */ -const de_AppList = (output: any, context: __SerdeContext): AppDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AppSpecification - */ -const de_AppSpecification = (output: any, context: __SerdeContext): AppSpecification => { - return { - ContainerArguments: - output.ContainerArguments != null ? de_ContainerArguments(output.ContainerArguments, context) : undefined, - ContainerEntrypoint: - output.ContainerEntrypoint != null ? de_ContainerEntrypoint(output.ContainerEntrypoint, context) : undefined, - ImageUri: __expectString(output.ImageUri), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactSource - */ -const de_ArtifactSource = (output: any, context: __SerdeContext): ArtifactSource => { - return { - SourceTypes: output.SourceTypes != null ? de_ArtifactSourceTypes(output.SourceTypes, context) : undefined, - SourceUri: __expectString(output.SourceUri), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactSourceType - */ -const de_ArtifactSourceType = (output: any, context: __SerdeContext): ArtifactSourceType => { - return { - SourceIdType: __expectString(output.SourceIdType), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ArtifactSourceTypes - */ -const de_ArtifactSourceTypes = (output: any, context: __SerdeContext): ArtifactSourceType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ArtifactSourceType(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ArtifactSummaries - */ -const de_ArtifactSummaries = (output: any, context: __SerdeContext): ArtifactSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ArtifactSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ArtifactSummary - */ -const de_ArtifactSummary = (output: any, context: __SerdeContext): ArtifactSummary => { - return { - ArtifactArn: __expectString(output.ArtifactArn), - ArtifactName: __expectString(output.ArtifactName), - ArtifactType: __expectString(output.ArtifactType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Source: output.Source != null ? de_ArtifactSource(output.Source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociateTrialComponentResponse - */ -const de_AssociateTrialComponentResponse = (output: any, context: __SerdeContext): AssociateTrialComponentResponse => { - return { - TrialArn: __expectString(output.TrialArn), - TrialComponentArn: __expectString(output.TrialComponentArn), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationSummaries - */ -const de_AssociationSummaries = (output: any, context: __SerdeContext): AssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociationSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociationSummary - */ -const de_AssociationSummary = (output: any, context: __SerdeContext): AssociationSummary => { - return { - AssociationType: __expectString(output.AssociationType), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DestinationArn: __expectString(output.DestinationArn), - DestinationName: __expectString(output.DestinationName), - DestinationType: __expectString(output.DestinationType), - SourceArn: __expectString(output.SourceArn), - SourceName: __expectString(output.SourceName), - SourceType: __expectString(output.SourceType), - } as any; -}; - -/** - * deserializeAws_json1_1AsyncInferenceClientConfig - */ -const de_AsyncInferenceClientConfig = (output: any, context: __SerdeContext): AsyncInferenceClientConfig => { - return { - MaxConcurrentInvocationsPerInstance: __expectInt32(output.MaxConcurrentInvocationsPerInstance), - } as any; -}; - -/** - * deserializeAws_json1_1AsyncInferenceConfig - */ -const de_AsyncInferenceConfig = (output: any, context: __SerdeContext): AsyncInferenceConfig => { - return { - ClientConfig: output.ClientConfig != null ? de_AsyncInferenceClientConfig(output.ClientConfig, context) : undefined, - OutputConfig: output.OutputConfig != null ? de_AsyncInferenceOutputConfig(output.OutputConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AsyncInferenceNotificationConfig - */ -const de_AsyncInferenceNotificationConfig = ( - output: any, - context: __SerdeContext -): AsyncInferenceNotificationConfig => { - return { - ErrorTopic: __expectString(output.ErrorTopic), - IncludeInferenceResponseIn: - output.IncludeInferenceResponseIn != null - ? de_AsyncNotificationTopicTypeList(output.IncludeInferenceResponseIn, context) - : undefined, - SuccessTopic: __expectString(output.SuccessTopic), - } as any; -}; - -/** - * deserializeAws_json1_1AsyncInferenceOutputConfig - */ -const de_AsyncInferenceOutputConfig = (output: any, context: __SerdeContext): AsyncInferenceOutputConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - NotificationConfig: - output.NotificationConfig != null - ? de_AsyncInferenceNotificationConfig(output.NotificationConfig, context) - : undefined, - S3FailurePath: __expectString(output.S3FailurePath), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; -}; - -/** - * deserializeAws_json1_1AsyncNotificationTopicTypeList - */ -const de_AsyncNotificationTopicTypeList = ( - output: any, - context: __SerdeContext -): (AsyncNotificationTopicTypes | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AthenaDatasetDefinition - */ -const de_AthenaDatasetDefinition = (output: any, context: __SerdeContext): AthenaDatasetDefinition => { - return { - Catalog: __expectString(output.Catalog), - Database: __expectString(output.Database), - KmsKeyId: __expectString(output.KmsKeyId), - OutputCompression: __expectString(output.OutputCompression), - OutputFormat: __expectString(output.OutputFormat), - OutputS3Uri: __expectString(output.OutputS3Uri), - QueryString: __expectString(output.QueryString), - WorkGroup: __expectString(output.WorkGroup), - } as any; -}; - -/** - * deserializeAws_json1_1AttributeNames - */ -const de_AttributeNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLAlgorithmConfig - */ -const de_AutoMLAlgorithmConfig = (output: any, context: __SerdeContext): AutoMLAlgorithmConfig => { - return { - AutoMLAlgorithms: - output.AutoMLAlgorithms != null ? de_AutoMLAlgorithms(output.AutoMLAlgorithms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLAlgorithms - */ -const de_AutoMLAlgorithms = (output: any, context: __SerdeContext): (AutoMLAlgorithm | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLAlgorithmsConfig - */ -const de_AutoMLAlgorithmsConfig = (output: any, context: __SerdeContext): AutoMLAlgorithmConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLAlgorithmConfig(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLCandidate - */ -const de_AutoMLCandidate = (output: any, context: __SerdeContext): AutoMLCandidate => { - return { - CandidateName: __expectString(output.CandidateName), - CandidateProperties: - output.CandidateProperties != null ? de_CandidateProperties(output.CandidateProperties, context) : undefined, - CandidateStatus: __expectString(output.CandidateStatus), - CandidateSteps: output.CandidateSteps != null ? de_CandidateSteps(output.CandidateSteps, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FailureReason: __expectString(output.FailureReason), - FinalAutoMLJobObjectiveMetric: - output.FinalAutoMLJobObjectiveMetric != null - ? de_FinalAutoMLJobObjectiveMetric(output.FinalAutoMLJobObjectiveMetric, context) - : undefined, - InferenceContainerDefinitions: - output.InferenceContainerDefinitions != null - ? de_AutoMLInferenceContainerDefinitions(output.InferenceContainerDefinitions, context) - : undefined, - InferenceContainers: - output.InferenceContainers != null - ? de_AutoMLContainerDefinitions(output.InferenceContainers, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ObjectiveStatus: __expectString(output.ObjectiveStatus), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLCandidateGenerationConfig - */ -const de_AutoMLCandidateGenerationConfig = (output: any, context: __SerdeContext): AutoMLCandidateGenerationConfig => { - return { - AlgorithmsConfig: - output.AlgorithmsConfig != null ? de_AutoMLAlgorithmsConfig(output.AlgorithmsConfig, context) : undefined, - FeatureSpecificationS3Uri: __expectString(output.FeatureSpecificationS3Uri), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLCandidates - */ -const de_AutoMLCandidates = (output: any, context: __SerdeContext): AutoMLCandidate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLCandidate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLCandidateStep - */ -const de_AutoMLCandidateStep = (output: any, context: __SerdeContext): AutoMLCandidateStep => { - return { - CandidateStepArn: __expectString(output.CandidateStepArn), - CandidateStepName: __expectString(output.CandidateStepName), - CandidateStepType: __expectString(output.CandidateStepType), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLChannel - */ -const de_AutoMLChannel = (output: any, context: __SerdeContext): AutoMLChannel => { - return { - ChannelType: __expectString(output.ChannelType), - CompressionType: __expectString(output.CompressionType), - ContentType: __expectString(output.ContentType), - DataSource: output.DataSource != null ? de_AutoMLDataSource(output.DataSource, context) : undefined, - TargetAttributeName: __expectString(output.TargetAttributeName), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLContainerDefinition - */ -const de_AutoMLContainerDefinition = (output: any, context: __SerdeContext): AutoMLContainerDefinition => { - return { - Environment: output.Environment != null ? de_EnvironmentMap(output.Environment, context) : undefined, - Image: __expectString(output.Image), - ModelDataUrl: __expectString(output.ModelDataUrl), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLContainerDefinitions - */ -const de_AutoMLContainerDefinitions = (output: any, context: __SerdeContext): AutoMLContainerDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLContainerDefinition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLDataSource - */ -const de_AutoMLDataSource = (output: any, context: __SerdeContext): AutoMLDataSource => { - return { - S3DataSource: output.S3DataSource != null ? de_AutoMLS3DataSource(output.S3DataSource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLDataSplitConfig - */ -const de_AutoMLDataSplitConfig = (output: any, context: __SerdeContext): AutoMLDataSplitConfig => { - return { - ValidationFraction: __limitedParseFloat32(output.ValidationFraction), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLInferenceContainerDefinitions - */ -const de_AutoMLInferenceContainerDefinitions = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [AutoMLProcessingUnit | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AutoMLContainerDefinitions(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1AutoMLInputDataConfig - */ -const de_AutoMLInputDataConfig = (output: any, context: __SerdeContext): AutoMLChannel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLChannel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLJobArtifacts - */ -const de_AutoMLJobArtifacts = (output: any, context: __SerdeContext): AutoMLJobArtifacts => { - return { - CandidateDefinitionNotebookLocation: __expectString(output.CandidateDefinitionNotebookLocation), - DataExplorationNotebookLocation: __expectString(output.DataExplorationNotebookLocation), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLJobChannel - */ -const de_AutoMLJobChannel = (output: any, context: __SerdeContext): AutoMLJobChannel => { - return { - ChannelType: __expectString(output.ChannelType), - CompressionType: __expectString(output.CompressionType), - ContentType: __expectString(output.ContentType), - DataSource: output.DataSource != null ? de_AutoMLDataSource(output.DataSource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLJobCompletionCriteria - */ -const de_AutoMLJobCompletionCriteria = (output: any, context: __SerdeContext): AutoMLJobCompletionCriteria => { - return { - MaxAutoMLJobRuntimeInSeconds: __expectInt32(output.MaxAutoMLJobRuntimeInSeconds), - MaxCandidates: __expectInt32(output.MaxCandidates), - MaxRuntimePerTrainingJobInSeconds: __expectInt32(output.MaxRuntimePerTrainingJobInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLJobConfig - */ -const de_AutoMLJobConfig = (output: any, context: __SerdeContext): AutoMLJobConfig => { - return { - CandidateGenerationConfig: - output.CandidateGenerationConfig != null - ? de_AutoMLCandidateGenerationConfig(output.CandidateGenerationConfig, context) - : undefined, - CompletionCriteria: - output.CompletionCriteria != null - ? de_AutoMLJobCompletionCriteria(output.CompletionCriteria, context) - : undefined, - DataSplitConfig: - output.DataSplitConfig != null ? de_AutoMLDataSplitConfig(output.DataSplitConfig, context) : undefined, - Mode: __expectString(output.Mode), - SecurityConfig: output.SecurityConfig != null ? de_AutoMLSecurityConfig(output.SecurityConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLJobInputDataConfig - */ -const de_AutoMLJobInputDataConfig = (output: any, context: __SerdeContext): AutoMLJobChannel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLJobChannel(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLJobObjective - */ -const de_AutoMLJobObjective = (output: any, context: __SerdeContext): AutoMLJobObjective => { - return { - MetricName: __expectString(output.MetricName), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLJobStepMetadata - */ -const de_AutoMLJobStepMetadata = (output: any, context: __SerdeContext): AutoMLJobStepMetadata => { - return { - Arn: __expectString(output.Arn), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLJobSummaries - */ -const de_AutoMLJobSummaries = (output: any, context: __SerdeContext): AutoMLJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLJobSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLJobSummary - */ -const de_AutoMLJobSummary = (output: any, context: __SerdeContext): AutoMLJobSummary => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - AutoMLJobName: __expectString(output.AutoMLJobName), - AutoMLJobSecondaryStatus: __expectString(output.AutoMLJobSecondaryStatus), - AutoMLJobStatus: __expectString(output.AutoMLJobStatus), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - PartialFailureReasons: - output.PartialFailureReasons != null - ? de_AutoMLPartialFailureReasons(output.PartialFailureReasons, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLOutputDataConfig - */ -const de_AutoMLOutputDataConfig = (output: any, context: __SerdeContext): AutoMLOutputDataConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLPartialFailureReason - */ -const de_AutoMLPartialFailureReason = (output: any, context: __SerdeContext): AutoMLPartialFailureReason => { - return { - PartialFailureMessage: __expectString(output.PartialFailureMessage), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLPartialFailureReasons - */ -const de_AutoMLPartialFailureReasons = (output: any, context: __SerdeContext): AutoMLPartialFailureReason[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLPartialFailureReason(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutoMLProblemTypeConfig - */ -const de_AutoMLProblemTypeConfig = (output: any, context: __SerdeContext): AutoMLProblemTypeConfig => { - if (output.ImageClassificationJobConfig != null) { - return { - ImageClassificationJobConfig: de_ImageClassificationJobConfig(output.ImageClassificationJobConfig, context), - }; - } - if (output.TextClassificationJobConfig != null) { - return { - TextClassificationJobConfig: de_TextClassificationJobConfig(output.TextClassificationJobConfig, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; - -/** - * deserializeAws_json1_1AutoMLS3DataSource - */ -const de_AutoMLS3DataSource = (output: any, context: __SerdeContext): AutoMLS3DataSource => { - return { - S3DataType: __expectString(output.S3DataType), - S3Uri: __expectString(output.S3Uri), - } as any; -}; - -/** - * deserializeAws_json1_1AutoMLSecurityConfig - */ -const de_AutoMLSecurityConfig = (output: any, context: __SerdeContext): AutoMLSecurityConfig => { - return { - EnableInterContainerTrafficEncryption: __expectBoolean(output.EnableInterContainerTrafficEncryption), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutoRollbackConfig - */ -const de_AutoRollbackConfig = (output: any, context: __SerdeContext): AutoRollbackConfig => { - return { - Alarms: output.Alarms != null ? de_AlarmList(output.Alarms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDataCaptureConfig - */ -const de_BatchDataCaptureConfig = (output: any, context: __SerdeContext): BatchDataCaptureConfig => { - return { - DestinationS3Uri: __expectString(output.DestinationS3Uri), - GenerateInferenceId: __expectBoolean(output.GenerateInferenceId), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDescribeModelPackageError - */ -const de_BatchDescribeModelPackageError = (output: any, context: __SerdeContext): BatchDescribeModelPackageError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorResponse: __expectString(output.ErrorResponse), - } as any; -}; - -/** - * deserializeAws_json1_1BatchDescribeModelPackageErrorMap - */ -const de_BatchDescribeModelPackageErrorMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_BatchDescribeModelPackageError(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1BatchDescribeModelPackageOutput - */ -const de_BatchDescribeModelPackageOutput = (output: any, context: __SerdeContext): BatchDescribeModelPackageOutput => { - return { - BatchDescribeModelPackageErrorMap: - output.BatchDescribeModelPackageErrorMap != null - ? de_BatchDescribeModelPackageErrorMap(output.BatchDescribeModelPackageErrorMap, context) - : undefined, - ModelPackageSummaries: - output.ModelPackageSummaries != null - ? de_ModelPackageSummaries(output.ModelPackageSummaries, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDescribeModelPackageSummary - */ -const de_BatchDescribeModelPackageSummary = ( - output: any, - context: __SerdeContext -): BatchDescribeModelPackageSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - InferenceSpecification: - output.InferenceSpecification != null - ? de_InferenceSpecification(output.InferenceSpecification, context) - : undefined, - ModelApprovalStatus: __expectString(output.ModelApprovalStatus), - ModelPackageArn: __expectString(output.ModelPackageArn), - ModelPackageDescription: __expectString(output.ModelPackageDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageStatus: __expectString(output.ModelPackageStatus), - ModelPackageVersion: __expectInt32(output.ModelPackageVersion), - } as any; -}; - -/** - * deserializeAws_json1_1BatchTransformInput - */ -const de_BatchTransformInput = (output: any, context: __SerdeContext): BatchTransformInput => { - return { - DataCapturedDestinationS3Uri: __expectString(output.DataCapturedDestinationS3Uri), - DatasetFormat: output.DatasetFormat != null ? de_MonitoringDatasetFormat(output.DatasetFormat, context) : undefined, - EndTimeOffset: __expectString(output.EndTimeOffset), - FeaturesAttribute: __expectString(output.FeaturesAttribute), - InferenceAttribute: __expectString(output.InferenceAttribute), - LocalPath: __expectString(output.LocalPath), - ProbabilityAttribute: __expectString(output.ProbabilityAttribute), - ProbabilityThresholdAttribute: __limitedParseDouble(output.ProbabilityThresholdAttribute), - S3DataDistributionType: __expectString(output.S3DataDistributionType), - S3InputMode: __expectString(output.S3InputMode), - StartTimeOffset: __expectString(output.StartTimeOffset), - } as any; -}; - -/** - * deserializeAws_json1_1BestObjectiveNotImproving - */ -const de_BestObjectiveNotImproving = (output: any, context: __SerdeContext): BestObjectiveNotImproving => { - return { - MaxNumberOfTrainingJobsNotImproving: __expectInt32(output.MaxNumberOfTrainingJobsNotImproving), - } as any; -}; - -/** - * deserializeAws_json1_1Bias - */ -const de_Bias = (output: any, context: __SerdeContext): Bias => { - return { - PostTrainingReport: - output.PostTrainingReport != null ? de_MetricsSource(output.PostTrainingReport, context) : undefined, - PreTrainingReport: - output.PreTrainingReport != null ? de_MetricsSource(output.PreTrainingReport, context) : undefined, - Report: output.Report != null ? de_MetricsSource(output.Report, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BlueGreenUpdatePolicy - */ -const de_BlueGreenUpdatePolicy = (output: any, context: __SerdeContext): BlueGreenUpdatePolicy => { - return { - MaximumExecutionTimeoutInSeconds: __expectInt32(output.MaximumExecutionTimeoutInSeconds), - TerminationWaitInSeconds: __expectInt32(output.TerminationWaitInSeconds), - TrafficRoutingConfiguration: - output.TrafficRoutingConfiguration != null - ? de_TrafficRoutingConfig(output.TrafficRoutingConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CacheHitResult - */ -const de_CacheHitResult = (output: any, context: __SerdeContext): CacheHitResult => { - return { - SourcePipelineExecutionArn: __expectString(output.SourcePipelineExecutionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CallbackStepMetadata - */ -const de_CallbackStepMetadata = (output: any, context: __SerdeContext): CallbackStepMetadata => { - return { - CallbackToken: __expectString(output.CallbackToken), - OutputParameters: - output.OutputParameters != null ? de_OutputParameterList(output.OutputParameters, context) : undefined, - SqsQueueUrl: __expectString(output.SqsQueueUrl), - } as any; -}; - -/** - * deserializeAws_json1_1CandidateArtifactLocations - */ -const de_CandidateArtifactLocations = (output: any, context: __SerdeContext): CandidateArtifactLocations => { - return { - Explainability: __expectString(output.Explainability), - ModelInsights: __expectString(output.ModelInsights), - } as any; -}; - -/** - * deserializeAws_json1_1CandidateProperties - */ -const de_CandidateProperties = (output: any, context: __SerdeContext): CandidateProperties => { - return { - CandidateArtifactLocations: - output.CandidateArtifactLocations != null - ? de_CandidateArtifactLocations(output.CandidateArtifactLocations, context) - : undefined, - CandidateMetrics: output.CandidateMetrics != null ? de_MetricDataList(output.CandidateMetrics, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CandidateSteps - */ -const de_CandidateSteps = (output: any, context: __SerdeContext): AutoMLCandidateStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoMLCandidateStep(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CanvasAppSettings - */ -const de_CanvasAppSettings = (output: any, context: __SerdeContext): CanvasAppSettings => { - return { - TimeSeriesForecastingSettings: - output.TimeSeriesForecastingSettings != null - ? de_TimeSeriesForecastingSettings(output.TimeSeriesForecastingSettings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CapacitySize - */ -const de_CapacitySize = (output: any, context: __SerdeContext): CapacitySize => { - return { - Type: __expectString(output.Type), - Value: __expectInt32(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1CaptureContentTypeHeader - */ -const de_CaptureContentTypeHeader = (output: any, context: __SerdeContext): CaptureContentTypeHeader => { - return { - CsvContentTypes: output.CsvContentTypes != null ? de_CsvContentTypes(output.CsvContentTypes, context) : undefined, - JsonContentTypes: - output.JsonContentTypes != null ? de_JsonContentTypes(output.JsonContentTypes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CaptureOption - */ -const de_CaptureOption = (output: any, context: __SerdeContext): CaptureOption => { - return { - CaptureMode: __expectString(output.CaptureMode), - } as any; -}; - -/** - * deserializeAws_json1_1CaptureOptionList - */ -const de_CaptureOptionList = (output: any, context: __SerdeContext): CaptureOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CaptureOption(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CategoricalParameter - */ -const de_CategoricalParameter = (output: any, context: __SerdeContext): CategoricalParameter => { - return { - Name: __expectString(output.Name), - Value: output.Value != null ? de_CategoricalParameterRangeValues(output.Value, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CategoricalParameterRange - */ -const de_CategoricalParameterRange = (output: any, context: __SerdeContext): CategoricalParameterRange => { - return { - Name: __expectString(output.Name), - Values: output.Values != null ? de_ParameterValues(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CategoricalParameterRanges - */ -const de_CategoricalParameterRanges = (output: any, context: __SerdeContext): CategoricalParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CategoricalParameterRange(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CategoricalParameterRangeSpecification - */ -const de_CategoricalParameterRangeSpecification = ( - output: any, - context: __SerdeContext -): CategoricalParameterRangeSpecification => { - return { - Values: output.Values != null ? de_ParameterValues(output.Values, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CategoricalParameterRangeValues - */ -const de_CategoricalParameterRangeValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CategoricalParameters - */ -const de_CategoricalParameters = (output: any, context: __SerdeContext): CategoricalParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CategoricalParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Channel - */ -const de_Channel = (output: any, context: __SerdeContext): Channel => { - return { - ChannelName: __expectString(output.ChannelName), - CompressionType: __expectString(output.CompressionType), - ContentType: __expectString(output.ContentType), - DataSource: output.DataSource != null ? de_DataSource(output.DataSource, context) : undefined, - InputMode: __expectString(output.InputMode), - RecordWrapperType: __expectString(output.RecordWrapperType), - ShuffleConfig: output.ShuffleConfig != null ? de_ShuffleConfig(output.ShuffleConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ChannelSpecification - */ -const de_ChannelSpecification = (output: any, context: __SerdeContext): ChannelSpecification => { - return { - Description: __expectString(output.Description), - IsRequired: __expectBoolean(output.IsRequired), - Name: __expectString(output.Name), - SupportedCompressionTypes: - output.SupportedCompressionTypes != null - ? de_CompressionTypes(output.SupportedCompressionTypes, context) - : undefined, - SupportedContentTypes: - output.SupportedContentTypes != null ? de_ContentTypes(output.SupportedContentTypes, context) : undefined, - SupportedInputModes: - output.SupportedInputModes != null ? de_InputModes(output.SupportedInputModes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ChannelSpecifications - */ -const de_ChannelSpecifications = (output: any, context: __SerdeContext): ChannelSpecification[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelSpecification(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CheckpointConfig - */ -const de_CheckpointConfig = (output: any, context: __SerdeContext): CheckpointConfig => { - return { - LocalPath: __expectString(output.LocalPath), - S3Uri: __expectString(output.S3Uri), - } as any; -}; - -/** - * deserializeAws_json1_1Cidrs - */ -const de_Cidrs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClarifyCheckStepMetadata - */ -const de_ClarifyCheckStepMetadata = (output: any, context: __SerdeContext): ClarifyCheckStepMetadata => { - return { - BaselineUsedForDriftCheckConstraints: __expectString(output.BaselineUsedForDriftCheckConstraints), - CalculatedBaselineConstraints: __expectString(output.CalculatedBaselineConstraints), - CheckJobArn: __expectString(output.CheckJobArn), - CheckType: __expectString(output.CheckType), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - RegisterNewBaseline: __expectBoolean(output.RegisterNewBaseline), - SkipCheck: __expectBoolean(output.SkipCheck), - ViolationReport: __expectString(output.ViolationReport), - } as any; -}; - -/** - * deserializeAws_json1_1ClarifyExplainerConfig - */ -const de_ClarifyExplainerConfig = (output: any, context: __SerdeContext): ClarifyExplainerConfig => { - return { - EnableExplanations: __expectString(output.EnableExplanations), - InferenceConfig: - output.InferenceConfig != null ? de_ClarifyInferenceConfig(output.InferenceConfig, context) : undefined, - ShapConfig: output.ShapConfig != null ? de_ClarifyShapConfig(output.ShapConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ClarifyFeatureHeaders - */ -const de_ClarifyFeatureHeaders = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClarifyFeatureTypes - */ -const de_ClarifyFeatureTypes = (output: any, context: __SerdeContext): (ClarifyFeatureType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClarifyInferenceConfig - */ -const de_ClarifyInferenceConfig = (output: any, context: __SerdeContext): ClarifyInferenceConfig => { - return { - ContentTemplate: __expectString(output.ContentTemplate), - FeatureHeaders: - output.FeatureHeaders != null ? de_ClarifyFeatureHeaders(output.FeatureHeaders, context) : undefined, - FeatureTypes: output.FeatureTypes != null ? de_ClarifyFeatureTypes(output.FeatureTypes, context) : undefined, - FeaturesAttribute: __expectString(output.FeaturesAttribute), - LabelAttribute: __expectString(output.LabelAttribute), - LabelHeaders: output.LabelHeaders != null ? de_ClarifyLabelHeaders(output.LabelHeaders, context) : undefined, - LabelIndex: __expectInt32(output.LabelIndex), - MaxPayloadInMB: __expectInt32(output.MaxPayloadInMB), - MaxRecordCount: __expectInt32(output.MaxRecordCount), - ProbabilityAttribute: __expectString(output.ProbabilityAttribute), - ProbabilityIndex: __expectInt32(output.ProbabilityIndex), - } as any; -}; - -/** - * deserializeAws_json1_1ClarifyLabelHeaders - */ -const de_ClarifyLabelHeaders = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClarifyShapBaselineConfig - */ -const de_ClarifyShapBaselineConfig = (output: any, context: __SerdeContext): ClarifyShapBaselineConfig => { - return { - MimeType: __expectString(output.MimeType), - ShapBaseline: __expectString(output.ShapBaseline), - ShapBaselineUri: __expectString(output.ShapBaselineUri), - } as any; -}; - -/** - * deserializeAws_json1_1ClarifyShapConfig - */ -const de_ClarifyShapConfig = (output: any, context: __SerdeContext): ClarifyShapConfig => { - return { - NumberOfSamples: __expectInt32(output.NumberOfSamples), - Seed: __expectInt32(output.Seed), - ShapBaselineConfig: - output.ShapBaselineConfig != null ? de_ClarifyShapBaselineConfig(output.ShapBaselineConfig, context) : undefined, - TextConfig: output.TextConfig != null ? de_ClarifyTextConfig(output.TextConfig, context) : undefined, - UseLogit: __expectBoolean(output.UseLogit), - } as any; -}; - -/** - * deserializeAws_json1_1ClarifyTextConfig - */ -const de_ClarifyTextConfig = (output: any, context: __SerdeContext): ClarifyTextConfig => { - return { - Granularity: __expectString(output.Granularity), - Language: __expectString(output.Language), - } as any; -}; - -/** - * deserializeAws_json1_1CodeRepositories - */ -const de_CodeRepositories = (output: any, context: __SerdeContext): CodeRepository[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeRepository(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CodeRepository - */ -const de_CodeRepository = (output: any, context: __SerdeContext): CodeRepository => { - return { - RepositoryUrl: __expectString(output.RepositoryUrl), - } as any; -}; - -/** - * deserializeAws_json1_1CodeRepositorySummary - */ -const de_CodeRepositorySummary = (output: any, context: __SerdeContext): CodeRepositorySummary => { - return { - CodeRepositoryArn: __expectString(output.CodeRepositoryArn), - CodeRepositoryName: __expectString(output.CodeRepositoryName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - GitConfig: output.GitConfig != null ? de_GitConfig(output.GitConfig, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CodeRepositorySummaryList - */ -const de_CodeRepositorySummaryList = (output: any, context: __SerdeContext): CodeRepositorySummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CodeRepositorySummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CognitoConfig - */ -const de_CognitoConfig = (output: any, context: __SerdeContext): CognitoConfig => { - return { - ClientId: __expectString(output.ClientId), - UserPool: __expectString(output.UserPool), - } as any; -}; - -/** - * deserializeAws_json1_1CognitoMemberDefinition - */ -const de_CognitoMemberDefinition = (output: any, context: __SerdeContext): CognitoMemberDefinition => { - return { - ClientId: __expectString(output.ClientId), - UserGroup: __expectString(output.UserGroup), - UserPool: __expectString(output.UserPool), - } as any; -}; - -/** - * deserializeAws_json1_1CollectionConfiguration - */ -const de_CollectionConfiguration = (output: any, context: __SerdeContext): CollectionConfiguration => { - return { - CollectionName: __expectString(output.CollectionName), - CollectionParameters: - output.CollectionParameters != null ? de_CollectionParameters(output.CollectionParameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CollectionConfigurations - */ -const de_CollectionConfigurations = (output: any, context: __SerdeContext): CollectionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CollectionConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CollectionParameters - */ -const de_CollectionParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1CompilationJobSummaries - */ -const de_CompilationJobSummaries = (output: any, context: __SerdeContext): CompilationJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CompilationJobSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CompilationJobSummary - */ -const de_CompilationJobSummary = (output: any, context: __SerdeContext): CompilationJobSummary => { - return { - CompilationEndTime: - output.CompilationEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompilationEndTime))) - : undefined, - CompilationJobArn: __expectString(output.CompilationJobArn), - CompilationJobName: __expectString(output.CompilationJobName), - CompilationJobStatus: __expectString(output.CompilationJobStatus), - CompilationStartTime: - output.CompilationStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompilationStartTime))) - : undefined, - CompilationTargetDevice: __expectString(output.CompilationTargetDevice), - CompilationTargetPlatformAccelerator: __expectString(output.CompilationTargetPlatformAccelerator), - CompilationTargetPlatformArch: __expectString(output.CompilationTargetPlatformArch), - CompilationTargetPlatformOs: __expectString(output.CompilationTargetPlatformOs), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CompressionTypes - */ -const de_CompressionTypes = (output: any, context: __SerdeContext): (CompressionType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConditionStepMetadata - */ -const de_ConditionStepMetadata = (output: any, context: __SerdeContext): ConditionStepMetadata => { - return { - Outcome: __expectString(output.Outcome), - } as any; -}; - -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ContainerArguments - */ -const de_ContainerArguments = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContainerDefinition - */ -const de_ContainerDefinition = (output: any, context: __SerdeContext): ContainerDefinition => { - return { - ContainerHostname: __expectString(output.ContainerHostname), - Environment: output.Environment != null ? de_EnvironmentMap(output.Environment, context) : undefined, - Image: __expectString(output.Image), - ImageConfig: output.ImageConfig != null ? de_ImageConfig(output.ImageConfig, context) : undefined, - InferenceSpecificationName: __expectString(output.InferenceSpecificationName), - Mode: __expectString(output.Mode), - ModelDataUrl: __expectString(output.ModelDataUrl), - ModelPackageName: __expectString(output.ModelPackageName), - MultiModelConfig: - output.MultiModelConfig != null ? de_MultiModelConfig(output.MultiModelConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContainerDefinitionList - */ -const de_ContainerDefinitionList = (output: any, context: __SerdeContext): ContainerDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContainerDefinition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContainerEntrypoint - */ -const de_ContainerEntrypoint = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContentClassifiers - */ -const de_ContentClassifiers = (output: any, context: __SerdeContext): (ContentClassifier | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContentTypes - */ -const de_ContentTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContextSource - */ -const de_ContextSource = (output: any, context: __SerdeContext): ContextSource => { - return { - SourceId: __expectString(output.SourceId), - SourceType: __expectString(output.SourceType), - SourceUri: __expectString(output.SourceUri), - } as any; -}; - -/** - * deserializeAws_json1_1ContextSummaries - */ -const de_ContextSummaries = (output: any, context: __SerdeContext): ContextSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContextSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContextSummary - */ -const de_ContextSummary = (output: any, context: __SerdeContext): ContextSummary => { - return { - ContextArn: __expectString(output.ContextArn), - ContextName: __expectString(output.ContextName), - ContextType: __expectString(output.ContextType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Source: output.Source != null ? de_ContextSource(output.Source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ContinuousParameterRange - */ -const de_ContinuousParameterRange = (output: any, context: __SerdeContext): ContinuousParameterRange => { - return { - MaxValue: __expectString(output.MaxValue), - MinValue: __expectString(output.MinValue), - Name: __expectString(output.Name), - ScalingType: __expectString(output.ScalingType), - } as any; -}; - -/** - * deserializeAws_json1_1ContinuousParameterRanges - */ -const de_ContinuousParameterRanges = (output: any, context: __SerdeContext): ContinuousParameterRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContinuousParameterRange(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ContinuousParameterRangeSpecification - */ -const de_ContinuousParameterRangeSpecification = ( - output: any, - context: __SerdeContext -): ContinuousParameterRangeSpecification => { - return { - MaxValue: __expectString(output.MaxValue), - MinValue: __expectString(output.MinValue), - } as any; -}; - -/** - * deserializeAws_json1_1ConvergenceDetected - */ -const de_ConvergenceDetected = (output: any, context: __SerdeContext): ConvergenceDetected => { - return { - CompleteOnConvergence: __expectString(output.CompleteOnConvergence), - } as any; -}; - -/** - * deserializeAws_json1_1CreateActionResponse - */ -const de_CreateActionResponse = (output: any, context: __SerdeContext): CreateActionResponse => { - return { - ActionArn: __expectString(output.ActionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAlgorithmOutput - */ -const de_CreateAlgorithmOutput = (output: any, context: __SerdeContext): CreateAlgorithmOutput => { - return { - AlgorithmArn: __expectString(output.AlgorithmArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAppImageConfigResponse - */ -const de_CreateAppImageConfigResponse = (output: any, context: __SerdeContext): CreateAppImageConfigResponse => { - return { - AppImageConfigArn: __expectString(output.AppImageConfigArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAppResponse - */ -const de_CreateAppResponse = (output: any, context: __SerdeContext): CreateAppResponse => { - return { - AppArn: __expectString(output.AppArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateArtifactResponse - */ -const de_CreateArtifactResponse = (output: any, context: __SerdeContext): CreateArtifactResponse => { - return { - ArtifactArn: __expectString(output.ArtifactArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAutoMLJobResponse - */ -const de_CreateAutoMLJobResponse = (output: any, context: __SerdeContext): CreateAutoMLJobResponse => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAutoMLJobV2Response - */ -const de_CreateAutoMLJobV2Response = (output: any, context: __SerdeContext): CreateAutoMLJobV2Response => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateCodeRepositoryOutput - */ -const de_CreateCodeRepositoryOutput = (output: any, context: __SerdeContext): CreateCodeRepositoryOutput => { - return { - CodeRepositoryArn: __expectString(output.CodeRepositoryArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateCompilationJobResponse - */ -const de_CreateCompilationJobResponse = (output: any, context: __SerdeContext): CreateCompilationJobResponse => { - return { - CompilationJobArn: __expectString(output.CompilationJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateContextResponse - */ -const de_CreateContextResponse = (output: any, context: __SerdeContext): CreateContextResponse => { - return { - ContextArn: __expectString(output.ContextArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDataQualityJobDefinitionResponse - */ -const de_CreateDataQualityJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): CreateDataQualityJobDefinitionResponse => { - return { - JobDefinitionArn: __expectString(output.JobDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateDomainResponse - */ -const de_CreateDomainResponse = (output: any, context: __SerdeContext): CreateDomainResponse => { - return { - DomainArn: __expectString(output.DomainArn), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1CreateEdgeDeploymentPlanResponse - */ -const de_CreateEdgeDeploymentPlanResponse = ( - output: any, - context: __SerdeContext -): CreateEdgeDeploymentPlanResponse => { - return { - EdgeDeploymentPlanArn: __expectString(output.EdgeDeploymentPlanArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateEndpointConfigOutput - */ -const de_CreateEndpointConfigOutput = (output: any, context: __SerdeContext): CreateEndpointConfigOutput => { - return { - EndpointConfigArn: __expectString(output.EndpointConfigArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateEndpointOutput - */ -const de_CreateEndpointOutput = (output: any, context: __SerdeContext): CreateEndpointOutput => { - return { - EndpointArn: __expectString(output.EndpointArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateExperimentResponse - */ -const de_CreateExperimentResponse = (output: any, context: __SerdeContext): CreateExperimentResponse => { - return { - ExperimentArn: __expectString(output.ExperimentArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateFeatureGroupResponse - */ -const de_CreateFeatureGroupResponse = (output: any, context: __SerdeContext): CreateFeatureGroupResponse => { - return { - FeatureGroupArn: __expectString(output.FeatureGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateFlowDefinitionResponse - */ -const de_CreateFlowDefinitionResponse = (output: any, context: __SerdeContext): CreateFlowDefinitionResponse => { - return { - FlowDefinitionArn: __expectString(output.FlowDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateHubResponse - */ -const de_CreateHubResponse = (output: any, context: __SerdeContext): CreateHubResponse => { - return { - HubArn: __expectString(output.HubArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateHumanTaskUiResponse - */ -const de_CreateHumanTaskUiResponse = (output: any, context: __SerdeContext): CreateHumanTaskUiResponse => { - return { - HumanTaskUiArn: __expectString(output.HumanTaskUiArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateHyperParameterTuningJobResponse - */ -const de_CreateHyperParameterTuningJobResponse = ( - output: any, - context: __SerdeContext -): CreateHyperParameterTuningJobResponse => { - return { - HyperParameterTuningJobArn: __expectString(output.HyperParameterTuningJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateImageResponse - */ -const de_CreateImageResponse = (output: any, context: __SerdeContext): CreateImageResponse => { - return { - ImageArn: __expectString(output.ImageArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateImageVersionResponse - */ -const de_CreateImageVersionResponse = (output: any, context: __SerdeContext): CreateImageVersionResponse => { - return { - ImageVersionArn: __expectString(output.ImageVersionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateInferenceExperimentResponse - */ -const de_CreateInferenceExperimentResponse = ( - output: any, - context: __SerdeContext -): CreateInferenceExperimentResponse => { - return { - InferenceExperimentArn: __expectString(output.InferenceExperimentArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateInferenceRecommendationsJobResponse - */ -const de_CreateInferenceRecommendationsJobResponse = ( - output: any, - context: __SerdeContext -): CreateInferenceRecommendationsJobResponse => { - return { - JobArn: __expectString(output.JobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateLabelingJobResponse - */ -const de_CreateLabelingJobResponse = (output: any, context: __SerdeContext): CreateLabelingJobResponse => { - return { - LabelingJobArn: __expectString(output.LabelingJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelBiasJobDefinitionResponse - */ -const de_CreateModelBiasJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): CreateModelBiasJobDefinitionResponse => { - return { - JobDefinitionArn: __expectString(output.JobDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelCardExportJobResponse - */ -const de_CreateModelCardExportJobResponse = ( - output: any, - context: __SerdeContext -): CreateModelCardExportJobResponse => { - return { - ModelCardExportJobArn: __expectString(output.ModelCardExportJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelCardResponse - */ -const de_CreateModelCardResponse = (output: any, context: __SerdeContext): CreateModelCardResponse => { - return { - ModelCardArn: __expectString(output.ModelCardArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelExplainabilityJobDefinitionResponse - */ -const de_CreateModelExplainabilityJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): CreateModelExplainabilityJobDefinitionResponse => { - return { - JobDefinitionArn: __expectString(output.JobDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelOutput - */ -const de_CreateModelOutput = (output: any, context: __SerdeContext): CreateModelOutput => { - return { - ModelArn: __expectString(output.ModelArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelPackageGroupOutput - */ -const de_CreateModelPackageGroupOutput = (output: any, context: __SerdeContext): CreateModelPackageGroupOutput => { - return { - ModelPackageGroupArn: __expectString(output.ModelPackageGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelPackageOutput - */ -const de_CreateModelPackageOutput = (output: any, context: __SerdeContext): CreateModelPackageOutput => { - return { - ModelPackageArn: __expectString(output.ModelPackageArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateModelQualityJobDefinitionResponse - */ -const de_CreateModelQualityJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): CreateModelQualityJobDefinitionResponse => { - return { - JobDefinitionArn: __expectString(output.JobDefinitionArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateMonitoringScheduleResponse - */ -const de_CreateMonitoringScheduleResponse = ( - output: any, - context: __SerdeContext -): CreateMonitoringScheduleResponse => { - return { - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateNotebookInstanceLifecycleConfigOutput - */ -const de_CreateNotebookInstanceLifecycleConfigOutput = ( - output: any, - context: __SerdeContext -): CreateNotebookInstanceLifecycleConfigOutput => { - return { - NotebookInstanceLifecycleConfigArn: __expectString(output.NotebookInstanceLifecycleConfigArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateNotebookInstanceOutput - */ -const de_CreateNotebookInstanceOutput = (output: any, context: __SerdeContext): CreateNotebookInstanceOutput => { - return { - NotebookInstanceArn: __expectString(output.NotebookInstanceArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePipelineResponse - */ -const de_CreatePipelineResponse = (output: any, context: __SerdeContext): CreatePipelineResponse => { - return { - PipelineArn: __expectString(output.PipelineArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePresignedDomainUrlResponse - */ -const de_CreatePresignedDomainUrlResponse = ( - output: any, - context: __SerdeContext -): CreatePresignedDomainUrlResponse => { - return { - AuthorizedUrl: __expectString(output.AuthorizedUrl), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePresignedNotebookInstanceUrlOutput - */ -const de_CreatePresignedNotebookInstanceUrlOutput = ( - output: any, - context: __SerdeContext -): CreatePresignedNotebookInstanceUrlOutput => { - return { - AuthorizedUrl: __expectString(output.AuthorizedUrl), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProcessingJobResponse - */ -const de_CreateProcessingJobResponse = (output: any, context: __SerdeContext): CreateProcessingJobResponse => { - return { - ProcessingJobArn: __expectString(output.ProcessingJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProjectOutput - */ -const de_CreateProjectOutput = (output: any, context: __SerdeContext): CreateProjectOutput => { - return { - ProjectArn: __expectString(output.ProjectArn), - ProjectId: __expectString(output.ProjectId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSpaceResponse - */ -const de_CreateSpaceResponse = (output: any, context: __SerdeContext): CreateSpaceResponse => { - return { - SpaceArn: __expectString(output.SpaceArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateStudioLifecycleConfigResponse - */ -const de_CreateStudioLifecycleConfigResponse = ( - output: any, - context: __SerdeContext -): CreateStudioLifecycleConfigResponse => { - return { - StudioLifecycleConfigArn: __expectString(output.StudioLifecycleConfigArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateTrainingJobResponse - */ -const de_CreateTrainingJobResponse = (output: any, context: __SerdeContext): CreateTrainingJobResponse => { - return { - TrainingJobArn: __expectString(output.TrainingJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateTransformJobResponse - */ -const de_CreateTransformJobResponse = (output: any, context: __SerdeContext): CreateTransformJobResponse => { - return { - TransformJobArn: __expectString(output.TransformJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateTrialComponentResponse - */ -const de_CreateTrialComponentResponse = (output: any, context: __SerdeContext): CreateTrialComponentResponse => { - return { - TrialComponentArn: __expectString(output.TrialComponentArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateTrialResponse - */ -const de_CreateTrialResponse = (output: any, context: __SerdeContext): CreateTrialResponse => { - return { - TrialArn: __expectString(output.TrialArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserProfileResponse - */ -const de_CreateUserProfileResponse = (output: any, context: __SerdeContext): CreateUserProfileResponse => { - return { - UserProfileArn: __expectString(output.UserProfileArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateWorkforceResponse - */ -const de_CreateWorkforceResponse = (output: any, context: __SerdeContext): CreateWorkforceResponse => { - return { - WorkforceArn: __expectString(output.WorkforceArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreateWorkteamResponse - */ -const de_CreateWorkteamResponse = (output: any, context: __SerdeContext): CreateWorkteamResponse => { - return { - WorkteamArn: __expectString(output.WorkteamArn), - } as any; -}; - -/** - * deserializeAws_json1_1CsvContentTypes - */ -const de_CsvContentTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomerMetadataMap - */ -const de_CustomerMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1CustomImage - */ -const de_CustomImage = (output: any, context: __SerdeContext): CustomImage => { - return { - AppImageConfigName: __expectString(output.AppImageConfigName), - ImageName: __expectString(output.ImageName), - ImageVersionNumber: __expectInt32(output.ImageVersionNumber), - } as any; -}; - -/** - * deserializeAws_json1_1CustomImages - */ -const de_CustomImages = (output: any, context: __SerdeContext): CustomImage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomImage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DataCaptureConfig - */ -const de_DataCaptureConfig = (output: any, context: __SerdeContext): DataCaptureConfig => { - return { - CaptureContentTypeHeader: - output.CaptureContentTypeHeader != null - ? de_CaptureContentTypeHeader(output.CaptureContentTypeHeader, context) - : undefined, - CaptureOptions: output.CaptureOptions != null ? de_CaptureOptionList(output.CaptureOptions, context) : undefined, - DestinationS3Uri: __expectString(output.DestinationS3Uri), - EnableCapture: __expectBoolean(output.EnableCapture), - InitialSamplingPercentage: __expectInt32(output.InitialSamplingPercentage), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; - -/** - * deserializeAws_json1_1DataCaptureConfigSummary - */ -const de_DataCaptureConfigSummary = (output: any, context: __SerdeContext): DataCaptureConfigSummary => { - return { - CaptureStatus: __expectString(output.CaptureStatus), - CurrentSamplingPercentage: __expectInt32(output.CurrentSamplingPercentage), - DestinationS3Uri: __expectString(output.DestinationS3Uri), - EnableCapture: __expectBoolean(output.EnableCapture), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; - -/** - * deserializeAws_json1_1DataCatalogConfig - */ -const de_DataCatalogConfig = (output: any, context: __SerdeContext): DataCatalogConfig => { - return { - Catalog: __expectString(output.Catalog), - Database: __expectString(output.Database), - TableName: __expectString(output.TableName), - } as any; -}; - -/** - * deserializeAws_json1_1DataProcessing - */ -const de_DataProcessing = (output: any, context: __SerdeContext): DataProcessing => { - return { - InputFilter: __expectString(output.InputFilter), - JoinSource: __expectString(output.JoinSource), - OutputFilter: __expectString(output.OutputFilter), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityAppSpecification - */ -const de_DataQualityAppSpecification = (output: any, context: __SerdeContext): DataQualityAppSpecification => { - return { - ContainerArguments: - output.ContainerArguments != null - ? de_MonitoringContainerArguments(output.ContainerArguments, context) - : undefined, - ContainerEntrypoint: - output.ContainerEntrypoint != null ? de_ContainerEntrypoint(output.ContainerEntrypoint, context) : undefined, - Environment: output.Environment != null ? de_MonitoringEnvironmentMap(output.Environment, context) : undefined, - ImageUri: __expectString(output.ImageUri), - PostAnalyticsProcessorSourceUri: __expectString(output.PostAnalyticsProcessorSourceUri), - RecordPreprocessorSourceUri: __expectString(output.RecordPreprocessorSourceUri), - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityBaselineConfig - */ -const de_DataQualityBaselineConfig = (output: any, context: __SerdeContext): DataQualityBaselineConfig => { - return { - BaseliningJobName: __expectString(output.BaseliningJobName), - ConstraintsResource: - output.ConstraintsResource != null - ? de_MonitoringConstraintsResource(output.ConstraintsResource, context) - : undefined, - StatisticsResource: - output.StatisticsResource != null - ? de_MonitoringStatisticsResource(output.StatisticsResource, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataQualityJobInput - */ -const de_DataQualityJobInput = (output: any, context: __SerdeContext): DataQualityJobInput => { - return { - BatchTransformInput: - output.BatchTransformInput != null ? de_BatchTransformInput(output.BatchTransformInput, context) : undefined, - EndpointInput: output.EndpointInput != null ? de_EndpointInput(output.EndpointInput, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DatasetDefinition - */ -const de_DatasetDefinition = (output: any, context: __SerdeContext): DatasetDefinition => { - return { - AthenaDatasetDefinition: - output.AthenaDatasetDefinition != null - ? de_AthenaDatasetDefinition(output.AthenaDatasetDefinition, context) - : undefined, - DataDistributionType: __expectString(output.DataDistributionType), - InputMode: __expectString(output.InputMode), - LocalPath: __expectString(output.LocalPath), - RedshiftDatasetDefinition: - output.RedshiftDatasetDefinition != null - ? de_RedshiftDatasetDefinition(output.RedshiftDatasetDefinition, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DataSource - */ -const de_DataSource = (output: any, context: __SerdeContext): DataSource => { - return { - FileSystemDataSource: - output.FileSystemDataSource != null ? de_FileSystemDataSource(output.FileSystemDataSource, context) : undefined, - S3DataSource: output.S3DataSource != null ? de_S3DataSource(output.S3DataSource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DebugHookConfig - */ -const de_DebugHookConfig = (output: any, context: __SerdeContext): DebugHookConfig => { - return { - CollectionConfigurations: - output.CollectionConfigurations != null - ? de_CollectionConfigurations(output.CollectionConfigurations, context) - : undefined, - HookParameters: output.HookParameters != null ? de_HookParameters(output.HookParameters, context) : undefined, - LocalPath: __expectString(output.LocalPath), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; -}; - -/** - * deserializeAws_json1_1DebugRuleConfiguration - */ -const de_DebugRuleConfiguration = (output: any, context: __SerdeContext): DebugRuleConfiguration => { - return { - InstanceType: __expectString(output.InstanceType), - LocalPath: __expectString(output.LocalPath), - RuleConfigurationName: __expectString(output.RuleConfigurationName), - RuleEvaluatorImage: __expectString(output.RuleEvaluatorImage), - RuleParameters: output.RuleParameters != null ? de_RuleParameters(output.RuleParameters, context) : undefined, - S3OutputPath: __expectString(output.S3OutputPath), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; -}; - -/** - * deserializeAws_json1_1DebugRuleConfigurations - */ -const de_DebugRuleConfigurations = (output: any, context: __SerdeContext): DebugRuleConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DebugRuleConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DebugRuleEvaluationStatus - */ -const de_DebugRuleEvaluationStatus = (output: any, context: __SerdeContext): DebugRuleEvaluationStatus => { - return { - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RuleConfigurationName: __expectString(output.RuleConfigurationName), - RuleEvaluationJobArn: __expectString(output.RuleEvaluationJobArn), - RuleEvaluationStatus: __expectString(output.RuleEvaluationStatus), - StatusDetails: __expectString(output.StatusDetails), - } as any; -}; - -/** - * deserializeAws_json1_1DebugRuleEvaluationStatuses - */ -const de_DebugRuleEvaluationStatuses = (output: any, context: __SerdeContext): DebugRuleEvaluationStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DebugRuleEvaluationStatus(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DefaultSpaceSettings - */ -const de_DefaultSpaceSettings = (output: any, context: __SerdeContext): DefaultSpaceSettings => { - return { - ExecutionRole: __expectString(output.ExecutionRole), - JupyterServerAppSettings: - output.JupyterServerAppSettings != null - ? de_JupyterServerAppSettings(output.JupyterServerAppSettings, context) - : undefined, - KernelGatewayAppSettings: - output.KernelGatewayAppSettings != null - ? de_KernelGatewayAppSettings(output.KernelGatewayAppSettings, context) - : undefined, - SecurityGroups: output.SecurityGroups != null ? de_SecurityGroupIds(output.SecurityGroups, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteActionResponse - */ -const de_DeleteActionResponse = (output: any, context: __SerdeContext): DeleteActionResponse => { - return { - ActionArn: __expectString(output.ActionArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteArtifactResponse - */ -const de_DeleteArtifactResponse = (output: any, context: __SerdeContext): DeleteArtifactResponse => { - return { - ArtifactArn: __expectString(output.ArtifactArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteAssociationResponse - */ -const de_DeleteAssociationResponse = (output: any, context: __SerdeContext): DeleteAssociationResponse => { - return { - DestinationArn: __expectString(output.DestinationArn), - SourceArn: __expectString(output.SourceArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteContextResponse - */ -const de_DeleteContextResponse = (output: any, context: __SerdeContext): DeleteContextResponse => { - return { - ContextArn: __expectString(output.ContextArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteExperimentResponse - */ -const de_DeleteExperimentResponse = (output: any, context: __SerdeContext): DeleteExperimentResponse => { - return { - ExperimentArn: __expectString(output.ExperimentArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFlowDefinitionResponse - */ -const de_DeleteFlowDefinitionResponse = (output: any, context: __SerdeContext): DeleteFlowDefinitionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteHumanTaskUiResponse - */ -const de_DeleteHumanTaskUiResponse = (output: any, context: __SerdeContext): DeleteHumanTaskUiResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteImageResponse - */ -const de_DeleteImageResponse = (output: any, context: __SerdeContext): DeleteImageResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteImageVersionResponse - */ -const de_DeleteImageVersionResponse = (output: any, context: __SerdeContext): DeleteImageVersionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteInferenceExperimentResponse - */ -const de_DeleteInferenceExperimentResponse = ( - output: any, - context: __SerdeContext -): DeleteInferenceExperimentResponse => { - return { - InferenceExperimentArn: __expectString(output.InferenceExperimentArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeletePipelineResponse - */ -const de_DeletePipelineResponse = (output: any, context: __SerdeContext): DeletePipelineResponse => { - return { - PipelineArn: __expectString(output.PipelineArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTagsOutput - */ -const de_DeleteTagsOutput = (output: any, context: __SerdeContext): DeleteTagsOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteTrialComponentResponse - */ -const de_DeleteTrialComponentResponse = (output: any, context: __SerdeContext): DeleteTrialComponentResponse => { - return { - TrialComponentArn: __expectString(output.TrialComponentArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTrialResponse - */ -const de_DeleteTrialResponse = (output: any, context: __SerdeContext): DeleteTrialResponse => { - return { - TrialArn: __expectString(output.TrialArn), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteWorkforceResponse - */ -const de_DeleteWorkforceResponse = (output: any, context: __SerdeContext): DeleteWorkforceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteWorkteamResponse - */ -const de_DeleteWorkteamResponse = (output: any, context: __SerdeContext): DeleteWorkteamResponse => { - return { - Success: __expectBoolean(output.Success), - } as any; -}; - -/** - * deserializeAws_json1_1DeployedImage - */ -const de_DeployedImage = (output: any, context: __SerdeContext): DeployedImage => { - return { - ResolutionTime: - output.ResolutionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResolutionTime))) - : undefined, - ResolvedImage: __expectString(output.ResolvedImage), - SpecifiedImage: __expectString(output.SpecifiedImage), - } as any; -}; - -/** - * deserializeAws_json1_1DeployedImages - */ -const de_DeployedImages = (output: any, context: __SerdeContext): DeployedImage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeployedImage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentConfig - */ -const de_DeploymentConfig = (output: any, context: __SerdeContext): DeploymentConfig => { - return { - AutoRollbackConfiguration: - output.AutoRollbackConfiguration != null - ? de_AutoRollbackConfig(output.AutoRollbackConfiguration, context) - : undefined, - BlueGreenUpdatePolicy: - output.BlueGreenUpdatePolicy != null - ? de_BlueGreenUpdatePolicy(output.BlueGreenUpdatePolicy, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeploymentStageStatusSummaries - */ -const de_DeploymentStageStatusSummaries = (output: any, context: __SerdeContext): DeploymentStageStatusSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeploymentStageStatusSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeploymentStageStatusSummary - */ -const de_DeploymentStageStatusSummary = (output: any, context: __SerdeContext): DeploymentStageStatusSummary => { - return { - DeploymentConfig: - output.DeploymentConfig != null ? de_EdgeDeploymentConfig(output.DeploymentConfig, context) : undefined, - DeploymentStatus: - output.DeploymentStatus != null ? de_EdgeDeploymentStatus(output.DeploymentStatus, context) : undefined, - DeviceSelectionConfig: - output.DeviceSelectionConfig != null - ? de_DeviceSelectionConfig(output.DeviceSelectionConfig, context) - : undefined, - StageName: __expectString(output.StageName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeActionResponse - */ -const de_DescribeActionResponse = (output: any, context: __SerdeContext): DescribeActionResponse => { - return { - ActionArn: __expectString(output.ActionArn), - ActionName: __expectString(output.ActionName), - ActionType: __expectString(output.ActionType), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - Properties: output.Properties != null ? de_LineageEntityParameters(output.Properties, context) : undefined, - Source: output.Source != null ? de_ActionSource(output.Source, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAlgorithmOutput - */ -const de_DescribeAlgorithmOutput = (output: any, context: __SerdeContext): DescribeAlgorithmOutput => { - return { - AlgorithmArn: __expectString(output.AlgorithmArn), - AlgorithmDescription: __expectString(output.AlgorithmDescription), - AlgorithmName: __expectString(output.AlgorithmName), - AlgorithmStatus: __expectString(output.AlgorithmStatus), - AlgorithmStatusDetails: - output.AlgorithmStatusDetails != null - ? de_AlgorithmStatusDetails(output.AlgorithmStatusDetails, context) - : undefined, - CertifyForMarketplace: __expectBoolean(output.CertifyForMarketplace), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - InferenceSpecification: - output.InferenceSpecification != null - ? de_InferenceSpecification(output.InferenceSpecification, context) - : undefined, - ProductId: __expectString(output.ProductId), - TrainingSpecification: - output.TrainingSpecification != null - ? de_TrainingSpecification(output.TrainingSpecification, context) - : undefined, - ValidationSpecification: - output.ValidationSpecification != null - ? de_AlgorithmValidationSpecification(output.ValidationSpecification, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAppImageConfigResponse - */ -const de_DescribeAppImageConfigResponse = (output: any, context: __SerdeContext): DescribeAppImageConfigResponse => { - return { - AppImageConfigArn: __expectString(output.AppImageConfigArn), - AppImageConfigName: __expectString(output.AppImageConfigName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - KernelGatewayImageConfig: - output.KernelGatewayImageConfig != null - ? de_KernelGatewayImageConfig(output.KernelGatewayImageConfig, context) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAppResponse - */ -const de_DescribeAppResponse = (output: any, context: __SerdeContext): DescribeAppResponse => { - return { - AppArn: __expectString(output.AppArn), - AppName: __expectString(output.AppName), - AppType: __expectString(output.AppType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainId: __expectString(output.DomainId), - FailureReason: __expectString(output.FailureReason), - LastHealthCheckTimestamp: - output.LastHealthCheckTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastHealthCheckTimestamp))) - : undefined, - LastUserActivityTimestamp: - output.LastUserActivityTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUserActivityTimestamp))) - : undefined, - ResourceSpec: output.ResourceSpec != null ? de_ResourceSpec(output.ResourceSpec, context) : undefined, - SpaceName: __expectString(output.SpaceName), - Status: __expectString(output.Status), - UserProfileName: __expectString(output.UserProfileName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeArtifactResponse - */ -const de_DescribeArtifactResponse = (output: any, context: __SerdeContext): DescribeArtifactResponse => { - return { - ArtifactArn: __expectString(output.ArtifactArn), - ArtifactName: __expectString(output.ArtifactName), - ArtifactType: __expectString(output.ArtifactType), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - Properties: output.Properties != null ? de_LineageEntityParameters(output.Properties, context) : undefined, - Source: output.Source != null ? de_ArtifactSource(output.Source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAutoMLJobResponse - */ -const de_DescribeAutoMLJobResponse = (output: any, context: __SerdeContext): DescribeAutoMLJobResponse => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - AutoMLJobArtifacts: - output.AutoMLJobArtifacts != null ? de_AutoMLJobArtifacts(output.AutoMLJobArtifacts, context) : undefined, - AutoMLJobConfig: output.AutoMLJobConfig != null ? de_AutoMLJobConfig(output.AutoMLJobConfig, context) : undefined, - AutoMLJobName: __expectString(output.AutoMLJobName), - AutoMLJobObjective: - output.AutoMLJobObjective != null ? de_AutoMLJobObjective(output.AutoMLJobObjective, context) : undefined, - AutoMLJobSecondaryStatus: __expectString(output.AutoMLJobSecondaryStatus), - AutoMLJobStatus: __expectString(output.AutoMLJobStatus), - BestCandidate: output.BestCandidate != null ? de_AutoMLCandidate(output.BestCandidate, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FailureReason: __expectString(output.FailureReason), - GenerateCandidateDefinitionsOnly: __expectBoolean(output.GenerateCandidateDefinitionsOnly), - InputDataConfig: - output.InputDataConfig != null ? de_AutoMLInputDataConfig(output.InputDataConfig, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelDeployConfig: - output.ModelDeployConfig != null ? de_ModelDeployConfig(output.ModelDeployConfig, context) : undefined, - ModelDeployResult: - output.ModelDeployResult != null ? de_ModelDeployResult(output.ModelDeployResult, context) : undefined, - OutputDataConfig: - output.OutputDataConfig != null ? de_AutoMLOutputDataConfig(output.OutputDataConfig, context) : undefined, - PartialFailureReasons: - output.PartialFailureReasons != null - ? de_AutoMLPartialFailureReasons(output.PartialFailureReasons, context) - : undefined, - ProblemType: __expectString(output.ProblemType), - ResolvedAttributes: - output.ResolvedAttributes != null ? de_ResolvedAttributes(output.ResolvedAttributes, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAutoMLJobV2Response - */ -const de_DescribeAutoMLJobV2Response = (output: any, context: __SerdeContext): DescribeAutoMLJobV2Response => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - AutoMLJobInputDataConfig: - output.AutoMLJobInputDataConfig != null - ? de_AutoMLJobInputDataConfig(output.AutoMLJobInputDataConfig, context) - : undefined, - AutoMLJobName: __expectString(output.AutoMLJobName), - AutoMLJobObjective: - output.AutoMLJobObjective != null ? de_AutoMLJobObjective(output.AutoMLJobObjective, context) : undefined, - AutoMLJobSecondaryStatus: __expectString(output.AutoMLJobSecondaryStatus), - AutoMLJobStatus: __expectString(output.AutoMLJobStatus), - AutoMLProblemTypeConfig: - output.AutoMLProblemTypeConfig != null - ? de_AutoMLProblemTypeConfig(__expectUnion(output.AutoMLProblemTypeConfig), context) - : undefined, - BestCandidate: output.BestCandidate != null ? de_AutoMLCandidate(output.BestCandidate, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataSplitConfig: - output.DataSplitConfig != null ? de_AutoMLDataSplitConfig(output.DataSplitConfig, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelDeployConfig: - output.ModelDeployConfig != null ? de_ModelDeployConfig(output.ModelDeployConfig, context) : undefined, - ModelDeployResult: - output.ModelDeployResult != null ? de_ModelDeployResult(output.ModelDeployResult, context) : undefined, - OutputDataConfig: - output.OutputDataConfig != null ? de_AutoMLOutputDataConfig(output.OutputDataConfig, context) : undefined, - PartialFailureReasons: - output.PartialFailureReasons != null - ? de_AutoMLPartialFailureReasons(output.PartialFailureReasons, context) - : undefined, - RoleArn: __expectString(output.RoleArn), - SecurityConfig: output.SecurityConfig != null ? de_AutoMLSecurityConfig(output.SecurityConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCodeRepositoryOutput - */ -const de_DescribeCodeRepositoryOutput = (output: any, context: __SerdeContext): DescribeCodeRepositoryOutput => { - return { - CodeRepositoryArn: __expectString(output.CodeRepositoryArn), - CodeRepositoryName: __expectString(output.CodeRepositoryName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - GitConfig: output.GitConfig != null ? de_GitConfig(output.GitConfig, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCompilationJobResponse - */ -const de_DescribeCompilationJobResponse = (output: any, context: __SerdeContext): DescribeCompilationJobResponse => { - return { - CompilationEndTime: - output.CompilationEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompilationEndTime))) - : undefined, - CompilationJobArn: __expectString(output.CompilationJobArn), - CompilationJobName: __expectString(output.CompilationJobName), - CompilationJobStatus: __expectString(output.CompilationJobStatus), - CompilationStartTime: - output.CompilationStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompilationStartTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - InferenceImage: __expectString(output.InferenceImage), - InputConfig: output.InputConfig != null ? de_InputConfig(output.InputConfig, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelArtifacts: output.ModelArtifacts != null ? de_ModelArtifacts(output.ModelArtifacts, context) : undefined, - ModelDigests: output.ModelDigests != null ? de_ModelDigests(output.ModelDigests, context) : undefined, - ModelPackageVersionArn: __expectString(output.ModelPackageVersionArn), - OutputConfig: output.OutputConfig != null ? de_OutputConfig(output.OutputConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_StoppingCondition(output.StoppingCondition, context) : undefined, - VpcConfig: output.VpcConfig != null ? de_NeoVpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeContextResponse - */ -const de_DescribeContextResponse = (output: any, context: __SerdeContext): DescribeContextResponse => { - return { - ContextArn: __expectString(output.ContextArn), - ContextName: __expectString(output.ContextName), - ContextType: __expectString(output.ContextType), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - Properties: output.Properties != null ? de_LineageEntityParameters(output.Properties, context) : undefined, - Source: output.Source != null ? de_ContextSource(output.Source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDataQualityJobDefinitionResponse - */ -const de_DescribeDataQualityJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): DescribeDataQualityJobDefinitionResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataQualityAppSpecification: - output.DataQualityAppSpecification != null - ? de_DataQualityAppSpecification(output.DataQualityAppSpecification, context) - : undefined, - DataQualityBaselineConfig: - output.DataQualityBaselineConfig != null - ? de_DataQualityBaselineConfig(output.DataQualityBaselineConfig, context) - : undefined, - DataQualityJobInput: - output.DataQualityJobInput != null ? de_DataQualityJobInput(output.DataQualityJobInput, context) : undefined, - DataQualityJobOutputConfig: - output.DataQualityJobOutputConfig != null - ? de_MonitoringOutputConfig(output.DataQualityJobOutputConfig, context) - : undefined, - JobDefinitionArn: __expectString(output.JobDefinitionArn), - JobDefinitionName: __expectString(output.JobDefinitionName), - JobResources: output.JobResources != null ? de_MonitoringResources(output.JobResources, context) : undefined, - NetworkConfig: output.NetworkConfig != null ? de_MonitoringNetworkConfig(output.NetworkConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_MonitoringStoppingCondition(output.StoppingCondition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDeviceFleetResponse - */ -const de_DescribeDeviceFleetResponse = (output: any, context: __SerdeContext): DescribeDeviceFleetResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - DeviceFleetArn: __expectString(output.DeviceFleetArn), - DeviceFleetName: __expectString(output.DeviceFleetName), - IotRoleAlias: __expectString(output.IotRoleAlias), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - OutputConfig: output.OutputConfig != null ? de_EdgeOutputConfig(output.OutputConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDeviceResponse - */ -const de_DescribeDeviceResponse = (output: any, context: __SerdeContext): DescribeDeviceResponse => { - return { - AgentVersion: __expectString(output.AgentVersion), - Description: __expectString(output.Description), - DeviceArn: __expectString(output.DeviceArn), - DeviceFleetName: __expectString(output.DeviceFleetName), - DeviceName: __expectString(output.DeviceName), - IotThingName: __expectString(output.IotThingName), - LatestHeartbeat: - output.LatestHeartbeat != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestHeartbeat))) - : undefined, - MaxModels: __expectInt32(output.MaxModels), - Models: output.Models != null ? de_EdgeModels(output.Models, context) : undefined, - NextToken: __expectString(output.NextToken), - RegistrationTime: - output.RegistrationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RegistrationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDomainResponse - */ -const de_DescribeDomainResponse = (output: any, context: __SerdeContext): DescribeDomainResponse => { - return { - AppNetworkAccessType: __expectString(output.AppNetworkAccessType), - AppSecurityGroupManagement: __expectString(output.AppSecurityGroupManagement), - AuthMode: __expectString(output.AuthMode), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DefaultSpaceSettings: - output.DefaultSpaceSettings != null ? de_DefaultSpaceSettings(output.DefaultSpaceSettings, context) : undefined, - DefaultUserSettings: - output.DefaultUserSettings != null ? de_UserSettings(output.DefaultUserSettings, context) : undefined, - DomainArn: __expectString(output.DomainArn), - DomainId: __expectString(output.DomainId), - DomainName: __expectString(output.DomainName), - DomainSettings: output.DomainSettings != null ? de_DomainSettings(output.DomainSettings, context) : undefined, - FailureReason: __expectString(output.FailureReason), - HomeEfsFileSystemId: __expectString(output.HomeEfsFileSystemId), - HomeEfsFileSystemKmsKeyId: __expectString(output.HomeEfsFileSystemKmsKeyId), - KmsKeyId: __expectString(output.KmsKeyId), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SecurityGroupIdForDomainBoundary: __expectString(output.SecurityGroupIdForDomainBoundary), - SingleSignOnManagedApplicationInstanceId: __expectString(output.SingleSignOnManagedApplicationInstanceId), - Status: __expectString(output.Status), - SubnetIds: output.SubnetIds != null ? de_Subnets(output.SubnetIds, context) : undefined, - Url: __expectString(output.Url), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEdgeDeploymentPlanResponse - */ -const de_DescribeEdgeDeploymentPlanResponse = ( - output: any, - context: __SerdeContext -): DescribeEdgeDeploymentPlanResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DeviceFleetName: __expectString(output.DeviceFleetName), - EdgeDeploymentFailed: __expectInt32(output.EdgeDeploymentFailed), - EdgeDeploymentPending: __expectInt32(output.EdgeDeploymentPending), - EdgeDeploymentPlanArn: __expectString(output.EdgeDeploymentPlanArn), - EdgeDeploymentPlanName: __expectString(output.EdgeDeploymentPlanName), - EdgeDeploymentSuccess: __expectInt32(output.EdgeDeploymentSuccess), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelConfigs: output.ModelConfigs != null ? de_EdgeDeploymentModelConfigs(output.ModelConfigs, context) : undefined, - NextToken: __expectString(output.NextToken), - Stages: output.Stages != null ? de_DeploymentStageStatusSummaries(output.Stages, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEdgePackagingJobResponse - */ -const de_DescribeEdgePackagingJobResponse = ( - output: any, - context: __SerdeContext -): DescribeEdgePackagingJobResponse => { - return { - CompilationJobName: __expectString(output.CompilationJobName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EdgePackagingJobArn: __expectString(output.EdgePackagingJobArn), - EdgePackagingJobName: __expectString(output.EdgePackagingJobName), - EdgePackagingJobStatus: __expectString(output.EdgePackagingJobStatus), - EdgePackagingJobStatusMessage: __expectString(output.EdgePackagingJobStatusMessage), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelArtifact: __expectString(output.ModelArtifact), - ModelName: __expectString(output.ModelName), - ModelSignature: __expectString(output.ModelSignature), - ModelVersion: __expectString(output.ModelVersion), - OutputConfig: output.OutputConfig != null ? de_EdgeOutputConfig(output.OutputConfig, context) : undefined, - PresetDeploymentOutput: - output.PresetDeploymentOutput != null - ? de_EdgePresetDeploymentOutput(output.PresetDeploymentOutput, context) - : undefined, - ResourceKey: __expectString(output.ResourceKey), - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEndpointConfigOutput - */ -const de_DescribeEndpointConfigOutput = (output: any, context: __SerdeContext): DescribeEndpointConfigOutput => { - return { - AsyncInferenceConfig: - output.AsyncInferenceConfig != null ? de_AsyncInferenceConfig(output.AsyncInferenceConfig, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataCaptureConfig: - output.DataCaptureConfig != null ? de_DataCaptureConfig(output.DataCaptureConfig, context) : undefined, - EndpointConfigArn: __expectString(output.EndpointConfigArn), - EndpointConfigName: __expectString(output.EndpointConfigName), - ExplainerConfig: output.ExplainerConfig != null ? de_ExplainerConfig(output.ExplainerConfig, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - ProductionVariants: - output.ProductionVariants != null ? de_ProductionVariantList(output.ProductionVariants, context) : undefined, - ShadowProductionVariants: - output.ShadowProductionVariants != null - ? de_ProductionVariantList(output.ShadowProductionVariants, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEndpointOutput - */ -const de_DescribeEndpointOutput = (output: any, context: __SerdeContext): DescribeEndpointOutput => { - return { - AsyncInferenceConfig: - output.AsyncInferenceConfig != null ? de_AsyncInferenceConfig(output.AsyncInferenceConfig, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataCaptureConfig: - output.DataCaptureConfig != null ? de_DataCaptureConfigSummary(output.DataCaptureConfig, context) : undefined, - EndpointArn: __expectString(output.EndpointArn), - EndpointConfigName: __expectString(output.EndpointConfigName), - EndpointName: __expectString(output.EndpointName), - EndpointStatus: __expectString(output.EndpointStatus), - ExplainerConfig: output.ExplainerConfig != null ? de_ExplainerConfig(output.ExplainerConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - LastDeploymentConfig: - output.LastDeploymentConfig != null ? de_DeploymentConfig(output.LastDeploymentConfig, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - PendingDeploymentSummary: - output.PendingDeploymentSummary != null - ? de_PendingDeploymentSummary(output.PendingDeploymentSummary, context) - : undefined, - ProductionVariants: - output.ProductionVariants != null - ? de_ProductionVariantSummaryList(output.ProductionVariants, context) - : undefined, - ShadowProductionVariants: - output.ShadowProductionVariants != null - ? de_ProductionVariantSummaryList(output.ShadowProductionVariants, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeExperimentResponse - */ -const de_DescribeExperimentResponse = (output: any, context: __SerdeContext): DescribeExperimentResponse => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - ExperimentArn: __expectString(output.ExperimentArn), - ExperimentName: __expectString(output.ExperimentName), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Source: output.Source != null ? de_ExperimentSource(output.Source, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFeatureGroupResponse - */ -const de_DescribeFeatureGroupResponse = (output: any, context: __SerdeContext): DescribeFeatureGroupResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EventTimeFeatureName: __expectString(output.EventTimeFeatureName), - FailureReason: __expectString(output.FailureReason), - FeatureDefinitions: - output.FeatureDefinitions != null ? de_FeatureDefinitions(output.FeatureDefinitions, context) : undefined, - FeatureGroupArn: __expectString(output.FeatureGroupArn), - FeatureGroupName: __expectString(output.FeatureGroupName), - FeatureGroupStatus: __expectString(output.FeatureGroupStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastUpdateStatus: - output.LastUpdateStatus != null ? de_LastUpdateStatus(output.LastUpdateStatus, context) : undefined, - NextToken: __expectString(output.NextToken), - OfflineStoreConfig: - output.OfflineStoreConfig != null ? de_OfflineStoreConfig(output.OfflineStoreConfig, context) : undefined, - OfflineStoreStatus: - output.OfflineStoreStatus != null ? de_OfflineStoreStatus(output.OfflineStoreStatus, context) : undefined, - OnlineStoreConfig: - output.OnlineStoreConfig != null ? de_OnlineStoreConfig(output.OnlineStoreConfig, context) : undefined, - OnlineStoreTotalSizeBytes: __expectLong(output.OnlineStoreTotalSizeBytes), - RecordIdentifierFeatureName: __expectString(output.RecordIdentifierFeatureName), - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFeatureMetadataResponse - */ -const de_DescribeFeatureMetadataResponse = (output: any, context: __SerdeContext): DescribeFeatureMetadataResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - FeatureGroupArn: __expectString(output.FeatureGroupArn), - FeatureGroupName: __expectString(output.FeatureGroupName), - FeatureName: __expectString(output.FeatureName), - FeatureType: __expectString(output.FeatureType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Parameters: output.Parameters != null ? de_FeatureParameters(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFlowDefinitionResponse - */ -const de_DescribeFlowDefinitionResponse = (output: any, context: __SerdeContext): DescribeFlowDefinitionResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - FlowDefinitionArn: __expectString(output.FlowDefinitionArn), - FlowDefinitionName: __expectString(output.FlowDefinitionName), - FlowDefinitionStatus: __expectString(output.FlowDefinitionStatus), - HumanLoopActivationConfig: - output.HumanLoopActivationConfig != null - ? de_HumanLoopActivationConfig(output.HumanLoopActivationConfig, context) - : undefined, - HumanLoopConfig: output.HumanLoopConfig != null ? de_HumanLoopConfig(output.HumanLoopConfig, context) : undefined, - HumanLoopRequestSource: - output.HumanLoopRequestSource != null - ? de_HumanLoopRequestSource(output.HumanLoopRequestSource, context) - : undefined, - OutputConfig: output.OutputConfig != null ? de_FlowDefinitionOutputConfig(output.OutputConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHubContentResponse - */ -const de_DescribeHubContentResponse = (output: any, context: __SerdeContext): DescribeHubContentResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DocumentSchemaVersion: __expectString(output.DocumentSchemaVersion), - FailureReason: __expectString(output.FailureReason), - HubArn: __expectString(output.HubArn), - HubContentArn: __expectString(output.HubContentArn), - HubContentDependencies: - output.HubContentDependencies != null - ? de_HubContentDependencyList(output.HubContentDependencies, context) - : undefined, - HubContentDescription: __expectString(output.HubContentDescription), - HubContentDisplayName: __expectString(output.HubContentDisplayName), - HubContentDocument: __expectString(output.HubContentDocument), - HubContentMarkdown: __expectString(output.HubContentMarkdown), - HubContentName: __expectString(output.HubContentName), - HubContentSearchKeywords: - output.HubContentSearchKeywords != null - ? de_HubContentSearchKeywordList(output.HubContentSearchKeywords, context) - : undefined, - HubContentStatus: __expectString(output.HubContentStatus), - HubContentType: __expectString(output.HubContentType), - HubContentVersion: __expectString(output.HubContentVersion), - HubName: __expectString(output.HubName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHubResponse - */ -const de_DescribeHubResponse = (output: any, context: __SerdeContext): DescribeHubResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - HubArn: __expectString(output.HubArn), - HubDescription: __expectString(output.HubDescription), - HubDisplayName: __expectString(output.HubDisplayName), - HubName: __expectString(output.HubName), - HubSearchKeywords: - output.HubSearchKeywords != null ? de_HubSearchKeywordList(output.HubSearchKeywords, context) : undefined, - HubStatus: __expectString(output.HubStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - S3StorageConfig: - output.S3StorageConfig != null ? de_HubS3StorageConfig(output.S3StorageConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHumanTaskUiResponse - */ -const de_DescribeHumanTaskUiResponse = (output: any, context: __SerdeContext): DescribeHumanTaskUiResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HumanTaskUiArn: __expectString(output.HumanTaskUiArn), - HumanTaskUiName: __expectString(output.HumanTaskUiName), - HumanTaskUiStatus: __expectString(output.HumanTaskUiStatus), - UiTemplate: output.UiTemplate != null ? de_UiTemplateInfo(output.UiTemplate, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHyperParameterTuningJobResponse - */ -const de_DescribeHyperParameterTuningJobResponse = ( - output: any, - context: __SerdeContext -): DescribeHyperParameterTuningJobResponse => { - return { - BestTrainingJob: - output.BestTrainingJob != null ? de_HyperParameterTrainingJobSummary(output.BestTrainingJob, context) : undefined, - ConsumedResources: - output.ConsumedResources != null - ? de_HyperParameterTuningJobConsumedResources(output.ConsumedResources, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - HyperParameterTuningEndTime: - output.HyperParameterTuningEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.HyperParameterTuningEndTime))) - : undefined, - HyperParameterTuningJobArn: __expectString(output.HyperParameterTuningJobArn), - HyperParameterTuningJobConfig: - output.HyperParameterTuningJobConfig != null - ? de_HyperParameterTuningJobConfig(output.HyperParameterTuningJobConfig, context) - : undefined, - HyperParameterTuningJobName: __expectString(output.HyperParameterTuningJobName), - HyperParameterTuningJobStatus: __expectString(output.HyperParameterTuningJobStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ObjectiveStatusCounters: - output.ObjectiveStatusCounters != null - ? de_ObjectiveStatusCounters(output.ObjectiveStatusCounters, context) - : undefined, - OverallBestTrainingJob: - output.OverallBestTrainingJob != null - ? de_HyperParameterTrainingJobSummary(output.OverallBestTrainingJob, context) - : undefined, - TrainingJobDefinition: - output.TrainingJobDefinition != null - ? de_HyperParameterTrainingJobDefinition(output.TrainingJobDefinition, context) - : undefined, - TrainingJobDefinitions: - output.TrainingJobDefinitions != null - ? de_HyperParameterTrainingJobDefinitions(output.TrainingJobDefinitions, context) - : undefined, - TrainingJobStatusCounters: - output.TrainingJobStatusCounters != null - ? de_TrainingJobStatusCounters(output.TrainingJobStatusCounters, context) - : undefined, - TuningJobCompletionDetails: - output.TuningJobCompletionDetails != null - ? de_HyperParameterTuningJobCompletionDetails(output.TuningJobCompletionDetails, context) - : undefined, - WarmStartConfig: - output.WarmStartConfig != null - ? de_HyperParameterTuningJobWarmStartConfig(output.WarmStartConfig, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeImageResponse - */ -const de_DescribeImageResponse = (output: any, context: __SerdeContext): DescribeImageResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - FailureReason: __expectString(output.FailureReason), - ImageArn: __expectString(output.ImageArn), - ImageName: __expectString(output.ImageName), - ImageStatus: __expectString(output.ImageStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeImageVersionResponse - */ -const de_DescribeImageVersionResponse = (output: any, context: __SerdeContext): DescribeImageVersionResponse => { - return { - BaseImage: __expectString(output.BaseImage), - ContainerImage: __expectString(output.ContainerImage), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - Horovod: __expectBoolean(output.Horovod), - ImageArn: __expectString(output.ImageArn), - ImageVersionArn: __expectString(output.ImageVersionArn), - ImageVersionStatus: __expectString(output.ImageVersionStatus), - JobType: __expectString(output.JobType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MLFramework: __expectString(output.MLFramework), - Processor: __expectString(output.Processor), - ProgrammingLang: __expectString(output.ProgrammingLang), - ReleaseNotes: __expectString(output.ReleaseNotes), - VendorGuidance: __expectString(output.VendorGuidance), - Version: __expectInt32(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInferenceExperimentResponse - */ -const de_DescribeInferenceExperimentResponse = ( - output: any, - context: __SerdeContext -): DescribeInferenceExperimentResponse => { - return { - Arn: __expectString(output.Arn), - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataStorageConfig: - output.DataStorageConfig != null - ? de_InferenceExperimentDataStorageConfig(output.DataStorageConfig, context) - : undefined, - Description: __expectString(output.Description), - EndpointMetadata: - output.EndpointMetadata != null ? de_EndpointMetadata(output.EndpointMetadata, context) : undefined, - KmsKey: __expectString(output.KmsKey), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelVariants: - output.ModelVariants != null ? de_ModelVariantConfigSummaryList(output.ModelVariants, context) : undefined, - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - Schedule: output.Schedule != null ? de_InferenceExperimentSchedule(output.Schedule, context) : undefined, - ShadowModeConfig: - output.ShadowModeConfig != null ? de_ShadowModeConfig(output.ShadowModeConfig, context) : undefined, - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInferenceRecommendationsJobResponse - */ -const de_DescribeInferenceRecommendationsJobResponse = ( - output: any, - context: __SerdeContext -): DescribeInferenceRecommendationsJobResponse => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointPerformances: - output.EndpointPerformances != null ? de_EndpointPerformances(output.EndpointPerformances, context) : undefined, - FailureReason: __expectString(output.FailureReason), - InferenceRecommendations: - output.InferenceRecommendations != null - ? de_InferenceRecommendations(output.InferenceRecommendations, context) - : undefined, - InputConfig: output.InputConfig != null ? de_RecommendationJobInputConfig(output.InputConfig, context) : undefined, - JobArn: __expectString(output.JobArn), - JobDescription: __expectString(output.JobDescription), - JobName: __expectString(output.JobName), - JobType: __expectString(output.JobType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - StoppingConditions: - output.StoppingConditions != null - ? de_RecommendationJobStoppingConditions(output.StoppingConditions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeLabelingJobResponse - */ -const de_DescribeLabelingJobResponse = (output: any, context: __SerdeContext): DescribeLabelingJobResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - HumanTaskConfig: output.HumanTaskConfig != null ? de_HumanTaskConfig(output.HumanTaskConfig, context) : undefined, - InputConfig: output.InputConfig != null ? de_LabelingJobInputConfig(output.InputConfig, context) : undefined, - JobReferenceCode: __expectString(output.JobReferenceCode), - LabelAttributeName: __expectString(output.LabelAttributeName), - LabelCategoryConfigS3Uri: __expectString(output.LabelCategoryConfigS3Uri), - LabelCounters: output.LabelCounters != null ? de_LabelCounters(output.LabelCounters, context) : undefined, - LabelingJobAlgorithmsConfig: - output.LabelingJobAlgorithmsConfig != null - ? de_LabelingJobAlgorithmsConfig(output.LabelingJobAlgorithmsConfig, context) - : undefined, - LabelingJobArn: __expectString(output.LabelingJobArn), - LabelingJobName: __expectString(output.LabelingJobName), - LabelingJobOutput: - output.LabelingJobOutput != null ? de_LabelingJobOutput(output.LabelingJobOutput, context) : undefined, - LabelingJobStatus: __expectString(output.LabelingJobStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - OutputConfig: output.OutputConfig != null ? de_LabelingJobOutputConfig(output.OutputConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingConditions: - output.StoppingConditions != null - ? de_LabelingJobStoppingConditions(output.StoppingConditions, context) - : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeLineageGroupResponse - */ -const de_DescribeLineageGroupResponse = (output: any, context: __SerdeContext): DescribeLineageGroupResponse => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - LineageGroupName: __expectString(output.LineageGroupName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelBiasJobDefinitionResponse - */ -const de_DescribeModelBiasJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): DescribeModelBiasJobDefinitionResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - JobDefinitionArn: __expectString(output.JobDefinitionArn), - JobDefinitionName: __expectString(output.JobDefinitionName), - JobResources: output.JobResources != null ? de_MonitoringResources(output.JobResources, context) : undefined, - ModelBiasAppSpecification: - output.ModelBiasAppSpecification != null - ? de_ModelBiasAppSpecification(output.ModelBiasAppSpecification, context) - : undefined, - ModelBiasBaselineConfig: - output.ModelBiasBaselineConfig != null - ? de_ModelBiasBaselineConfig(output.ModelBiasBaselineConfig, context) - : undefined, - ModelBiasJobInput: - output.ModelBiasJobInput != null ? de_ModelBiasJobInput(output.ModelBiasJobInput, context) : undefined, - ModelBiasJobOutputConfig: - output.ModelBiasJobOutputConfig != null - ? de_MonitoringOutputConfig(output.ModelBiasJobOutputConfig, context) - : undefined, - NetworkConfig: output.NetworkConfig != null ? de_MonitoringNetworkConfig(output.NetworkConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_MonitoringStoppingCondition(output.StoppingCondition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelCardExportJobResponse - */ -const de_DescribeModelCardExportJobResponse = ( - output: any, - context: __SerdeContext -): DescribeModelCardExportJobResponse => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ExportArtifacts: - output.ExportArtifacts != null ? de_ModelCardExportArtifacts(output.ExportArtifacts, context) : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedAt: - output.LastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedAt))) - : undefined, - ModelCardExportJobArn: __expectString(output.ModelCardExportJobArn), - ModelCardExportJobName: __expectString(output.ModelCardExportJobName), - ModelCardName: __expectString(output.ModelCardName), - ModelCardVersion: __expectInt32(output.ModelCardVersion), - OutputConfig: - output.OutputConfig != null ? de_ModelCardExportOutputConfig(output.OutputConfig, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelCardResponse - */ -const de_DescribeModelCardResponse = (output: any, context: __SerdeContext): DescribeModelCardResponse => { - return { - Content: __expectString(output.Content), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelCardArn: __expectString(output.ModelCardArn), - ModelCardName: __expectString(output.ModelCardName), - ModelCardProcessingStatus: __expectString(output.ModelCardProcessingStatus), - ModelCardStatus: __expectString(output.ModelCardStatus), - ModelCardVersion: __expectInt32(output.ModelCardVersion), - SecurityConfig: - output.SecurityConfig != null ? de_ModelCardSecurityConfig(output.SecurityConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelExplainabilityJobDefinitionResponse - */ -const de_DescribeModelExplainabilityJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): DescribeModelExplainabilityJobDefinitionResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - JobDefinitionArn: __expectString(output.JobDefinitionArn), - JobDefinitionName: __expectString(output.JobDefinitionName), - JobResources: output.JobResources != null ? de_MonitoringResources(output.JobResources, context) : undefined, - ModelExplainabilityAppSpecification: - output.ModelExplainabilityAppSpecification != null - ? de_ModelExplainabilityAppSpecification(output.ModelExplainabilityAppSpecification, context) - : undefined, - ModelExplainabilityBaselineConfig: - output.ModelExplainabilityBaselineConfig != null - ? de_ModelExplainabilityBaselineConfig(output.ModelExplainabilityBaselineConfig, context) - : undefined, - ModelExplainabilityJobInput: - output.ModelExplainabilityJobInput != null - ? de_ModelExplainabilityJobInput(output.ModelExplainabilityJobInput, context) - : undefined, - ModelExplainabilityJobOutputConfig: - output.ModelExplainabilityJobOutputConfig != null - ? de_MonitoringOutputConfig(output.ModelExplainabilityJobOutputConfig, context) - : undefined, - NetworkConfig: output.NetworkConfig != null ? de_MonitoringNetworkConfig(output.NetworkConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_MonitoringStoppingCondition(output.StoppingCondition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelOutput - */ -const de_DescribeModelOutput = (output: any, context: __SerdeContext): DescribeModelOutput => { - return { - Containers: output.Containers != null ? de_ContainerDefinitionList(output.Containers, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - InferenceExecutionConfig: - output.InferenceExecutionConfig != null - ? de_InferenceExecutionConfig(output.InferenceExecutionConfig, context) - : undefined, - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - PrimaryContainer: - output.PrimaryContainer != null ? de_ContainerDefinition(output.PrimaryContainer, context) : undefined, - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelPackageGroupOutput - */ -const de_DescribeModelPackageGroupOutput = (output: any, context: __SerdeContext): DescribeModelPackageGroupOutput => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ModelPackageGroupArn: __expectString(output.ModelPackageGroupArn), - ModelPackageGroupDescription: __expectString(output.ModelPackageGroupDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageGroupStatus: __expectString(output.ModelPackageGroupStatus), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelPackageOutput - */ -const de_DescribeModelPackageOutput = (output: any, context: __SerdeContext): DescribeModelPackageOutput => { - return { - AdditionalInferenceSpecifications: - output.AdditionalInferenceSpecifications != null - ? de_AdditionalInferenceSpecifications(output.AdditionalInferenceSpecifications, context) - : undefined, - ApprovalDescription: __expectString(output.ApprovalDescription), - CertifyForMarketplace: __expectBoolean(output.CertifyForMarketplace), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CustomerMetadataProperties: - output.CustomerMetadataProperties != null - ? de_CustomerMetadataMap(output.CustomerMetadataProperties, context) - : undefined, - Domain: __expectString(output.Domain), - DriftCheckBaselines: - output.DriftCheckBaselines != null ? de_DriftCheckBaselines(output.DriftCheckBaselines, context) : undefined, - InferenceSpecification: - output.InferenceSpecification != null - ? de_InferenceSpecification(output.InferenceSpecification, context) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - ModelApprovalStatus: __expectString(output.ModelApprovalStatus), - ModelMetrics: output.ModelMetrics != null ? de_ModelMetrics(output.ModelMetrics, context) : undefined, - ModelPackageArn: __expectString(output.ModelPackageArn), - ModelPackageDescription: __expectString(output.ModelPackageDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageName: __expectString(output.ModelPackageName), - ModelPackageStatus: __expectString(output.ModelPackageStatus), - ModelPackageStatusDetails: - output.ModelPackageStatusDetails != null - ? de_ModelPackageStatusDetails(output.ModelPackageStatusDetails, context) - : undefined, - ModelPackageVersion: __expectInt32(output.ModelPackageVersion), - SamplePayloadUrl: __expectString(output.SamplePayloadUrl), - SourceAlgorithmSpecification: - output.SourceAlgorithmSpecification != null - ? de_SourceAlgorithmSpecification(output.SourceAlgorithmSpecification, context) - : undefined, - Task: __expectString(output.Task), - ValidationSpecification: - output.ValidationSpecification != null - ? de_ModelPackageValidationSpecification(output.ValidationSpecification, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeModelQualityJobDefinitionResponse - */ -const de_DescribeModelQualityJobDefinitionResponse = ( - output: any, - context: __SerdeContext -): DescribeModelQualityJobDefinitionResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - JobDefinitionArn: __expectString(output.JobDefinitionArn), - JobDefinitionName: __expectString(output.JobDefinitionName), - JobResources: output.JobResources != null ? de_MonitoringResources(output.JobResources, context) : undefined, - ModelQualityAppSpecification: - output.ModelQualityAppSpecification != null - ? de_ModelQualityAppSpecification(output.ModelQualityAppSpecification, context) - : undefined, - ModelQualityBaselineConfig: - output.ModelQualityBaselineConfig != null - ? de_ModelQualityBaselineConfig(output.ModelQualityBaselineConfig, context) - : undefined, - ModelQualityJobInput: - output.ModelQualityJobInput != null ? de_ModelQualityJobInput(output.ModelQualityJobInput, context) : undefined, - ModelQualityJobOutputConfig: - output.ModelQualityJobOutputConfig != null - ? de_MonitoringOutputConfig(output.ModelQualityJobOutputConfig, context) - : undefined, - NetworkConfig: output.NetworkConfig != null ? de_MonitoringNetworkConfig(output.NetworkConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_MonitoringStoppingCondition(output.StoppingCondition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMonitoringScheduleResponse - */ -const de_DescribeMonitoringScheduleResponse = ( - output: any, - context: __SerdeContext -): DescribeMonitoringScheduleResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointName: __expectString(output.EndpointName), - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastMonitoringExecutionSummary: - output.LastMonitoringExecutionSummary != null - ? de_MonitoringExecutionSummary(output.LastMonitoringExecutionSummary, context) - : undefined, - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - MonitoringScheduleConfig: - output.MonitoringScheduleConfig != null - ? de_MonitoringScheduleConfig(output.MonitoringScheduleConfig, context) - : undefined, - MonitoringScheduleName: __expectString(output.MonitoringScheduleName), - MonitoringScheduleStatus: __expectString(output.MonitoringScheduleStatus), - MonitoringType: __expectString(output.MonitoringType), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeNotebookInstanceLifecycleConfigOutput - */ -const de_DescribeNotebookInstanceLifecycleConfigOutput = ( - output: any, - context: __SerdeContext -): DescribeNotebookInstanceLifecycleConfigOutput => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NotebookInstanceLifecycleConfigArn: __expectString(output.NotebookInstanceLifecycleConfigArn), - NotebookInstanceLifecycleConfigName: __expectString(output.NotebookInstanceLifecycleConfigName), - OnCreate: output.OnCreate != null ? de_NotebookInstanceLifecycleConfigList(output.OnCreate, context) : undefined, - OnStart: output.OnStart != null ? de_NotebookInstanceLifecycleConfigList(output.OnStart, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeNotebookInstanceOutput - */ -const de_DescribeNotebookInstanceOutput = (output: any, context: __SerdeContext): DescribeNotebookInstanceOutput => { - return { - AcceleratorTypes: - output.AcceleratorTypes != null - ? de_NotebookInstanceAcceleratorTypes(output.AcceleratorTypes, context) - : undefined, - AdditionalCodeRepositories: - output.AdditionalCodeRepositories != null - ? de_AdditionalCodeRepositoryNamesOrUrls(output.AdditionalCodeRepositories, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DefaultCodeRepository: __expectString(output.DefaultCodeRepository), - DirectInternetAccess: __expectString(output.DirectInternetAccess), - FailureReason: __expectString(output.FailureReason), - InstanceMetadataServiceConfiguration: - output.InstanceMetadataServiceConfiguration != null - ? de_InstanceMetadataServiceConfiguration(output.InstanceMetadataServiceConfiguration, context) - : undefined, - InstanceType: __expectString(output.InstanceType), - KmsKeyId: __expectString(output.KmsKeyId), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - NotebookInstanceArn: __expectString(output.NotebookInstanceArn), - NotebookInstanceLifecycleConfigName: __expectString(output.NotebookInstanceLifecycleConfigName), - NotebookInstanceName: __expectString(output.NotebookInstanceName), - NotebookInstanceStatus: __expectString(output.NotebookInstanceStatus), - PlatformIdentifier: __expectString(output.PlatformIdentifier), - RoleArn: __expectString(output.RoleArn), - RootAccess: __expectString(output.RootAccess), - SecurityGroups: output.SecurityGroups != null ? de_SecurityGroupIds(output.SecurityGroups, context) : undefined, - SubnetId: __expectString(output.SubnetId), - Url: __expectString(output.Url), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePipelineDefinitionForExecutionResponse - */ -const de_DescribePipelineDefinitionForExecutionResponse = ( - output: any, - context: __SerdeContext -): DescribePipelineDefinitionForExecutionResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - PipelineDefinition: __expectString(output.PipelineDefinition), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePipelineExecutionResponse - */ -const de_DescribePipelineExecutionResponse = ( - output: any, - context: __SerdeContext -): DescribePipelineExecutionResponse => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ParallelismConfiguration: - output.ParallelismConfiguration != null - ? de_ParallelismConfiguration(output.ParallelismConfiguration, context) - : undefined, - PipelineArn: __expectString(output.PipelineArn), - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - PipelineExecutionDescription: __expectString(output.PipelineExecutionDescription), - PipelineExecutionDisplayName: __expectString(output.PipelineExecutionDisplayName), - PipelineExecutionStatus: __expectString(output.PipelineExecutionStatus), - PipelineExperimentConfig: - output.PipelineExperimentConfig != null - ? de_PipelineExperimentConfig(output.PipelineExperimentConfig, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePipelineResponse - */ -const de_DescribePipelineResponse = (output: any, context: __SerdeContext): DescribePipelineResponse => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastRunTime: - output.LastRunTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRunTime))) - : undefined, - ParallelismConfiguration: - output.ParallelismConfiguration != null - ? de_ParallelismConfiguration(output.ParallelismConfiguration, context) - : undefined, - PipelineArn: __expectString(output.PipelineArn), - PipelineDefinition: __expectString(output.PipelineDefinition), - PipelineDescription: __expectString(output.PipelineDescription), - PipelineDisplayName: __expectString(output.PipelineDisplayName), - PipelineName: __expectString(output.PipelineName), - PipelineStatus: __expectString(output.PipelineStatus), - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProcessingJobResponse - */ -const de_DescribeProcessingJobResponse = (output: any, context: __SerdeContext): DescribeProcessingJobResponse => { - return { - AppSpecification: - output.AppSpecification != null ? de_AppSpecification(output.AppSpecification, context) : undefined, - AutoMLJobArn: __expectString(output.AutoMLJobArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Environment: output.Environment != null ? de_ProcessingEnvironmentMap(output.Environment, context) : undefined, - ExitMessage: __expectString(output.ExitMessage), - ExperimentConfig: - output.ExperimentConfig != null ? de_ExperimentConfig(output.ExperimentConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - NetworkConfig: output.NetworkConfig != null ? de_NetworkConfig(output.NetworkConfig, context) : undefined, - ProcessingEndTime: - output.ProcessingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ProcessingEndTime))) - : undefined, - ProcessingInputs: - output.ProcessingInputs != null ? de_ProcessingInputs(output.ProcessingInputs, context) : undefined, - ProcessingJobArn: __expectString(output.ProcessingJobArn), - ProcessingJobName: __expectString(output.ProcessingJobName), - ProcessingJobStatus: __expectString(output.ProcessingJobStatus), - ProcessingOutputConfig: - output.ProcessingOutputConfig != null - ? de_ProcessingOutputConfig(output.ProcessingOutputConfig, context) - : undefined, - ProcessingResources: - output.ProcessingResources != null ? de_ProcessingResources(output.ProcessingResources, context) : undefined, - ProcessingStartTime: - output.ProcessingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ProcessingStartTime))) - : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_ProcessingStoppingCondition(output.StoppingCondition, context) : undefined, - TrainingJobArn: __expectString(output.TrainingJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProjectOutput - */ -const de_DescribeProjectOutput = (output: any, context: __SerdeContext): DescribeProjectOutput => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ProjectArn: __expectString(output.ProjectArn), - ProjectDescription: __expectString(output.ProjectDescription), - ProjectId: __expectString(output.ProjectId), - ProjectName: __expectString(output.ProjectName), - ProjectStatus: __expectString(output.ProjectStatus), - ServiceCatalogProvisionedProductDetails: - output.ServiceCatalogProvisionedProductDetails != null - ? de_ServiceCatalogProvisionedProductDetails(output.ServiceCatalogProvisionedProductDetails, context) - : undefined, - ServiceCatalogProvisioningDetails: - output.ServiceCatalogProvisioningDetails != null - ? de_ServiceCatalogProvisioningDetails(output.ServiceCatalogProvisioningDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSpaceResponse - */ -const de_DescribeSpaceResponse = (output: any, context: __SerdeContext): DescribeSpaceResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainId: __expectString(output.DomainId), - FailureReason: __expectString(output.FailureReason), - HomeEfsFileSystemUid: __expectString(output.HomeEfsFileSystemUid), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SpaceArn: __expectString(output.SpaceArn), - SpaceName: __expectString(output.SpaceName), - SpaceSettings: output.SpaceSettings != null ? de_SpaceSettings(output.SpaceSettings, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeStudioLifecycleConfigResponse - */ -const de_DescribeStudioLifecycleConfigResponse = ( - output: any, - context: __SerdeContext -): DescribeStudioLifecycleConfigResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - StudioLifecycleConfigAppType: __expectString(output.StudioLifecycleConfigAppType), - StudioLifecycleConfigArn: __expectString(output.StudioLifecycleConfigArn), - StudioLifecycleConfigContent: __expectString(output.StudioLifecycleConfigContent), - StudioLifecycleConfigName: __expectString(output.StudioLifecycleConfigName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSubscribedWorkteamResponse - */ -const de_DescribeSubscribedWorkteamResponse = ( - output: any, - context: __SerdeContext -): DescribeSubscribedWorkteamResponse => { - return { - SubscribedWorkteam: - output.SubscribedWorkteam != null ? de_SubscribedWorkteam(output.SubscribedWorkteam, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTrainingJobResponse - */ -const de_DescribeTrainingJobResponse = (output: any, context: __SerdeContext): DescribeTrainingJobResponse => { - return { - AlgorithmSpecification: - output.AlgorithmSpecification != null - ? de_AlgorithmSpecification(output.AlgorithmSpecification, context) - : undefined, - AutoMLJobArn: __expectString(output.AutoMLJobArn), - BillableTimeInSeconds: __expectInt32(output.BillableTimeInSeconds), - CheckpointConfig: - output.CheckpointConfig != null ? de_CheckpointConfig(output.CheckpointConfig, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DebugHookConfig: output.DebugHookConfig != null ? de_DebugHookConfig(output.DebugHookConfig, context) : undefined, - DebugRuleConfigurations: - output.DebugRuleConfigurations != null - ? de_DebugRuleConfigurations(output.DebugRuleConfigurations, context) - : undefined, - DebugRuleEvaluationStatuses: - output.DebugRuleEvaluationStatuses != null - ? de_DebugRuleEvaluationStatuses(output.DebugRuleEvaluationStatuses, context) - : undefined, - EnableInterContainerTrafficEncryption: __expectBoolean(output.EnableInterContainerTrafficEncryption), - EnableManagedSpotTraining: __expectBoolean(output.EnableManagedSpotTraining), - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - Environment: output.Environment != null ? de_TrainingEnvironmentMap(output.Environment, context) : undefined, - ExperimentConfig: - output.ExperimentConfig != null ? de_ExperimentConfig(output.ExperimentConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - FinalMetricDataList: - output.FinalMetricDataList != null ? de_FinalMetricDataList(output.FinalMetricDataList, context) : undefined, - HyperParameters: output.HyperParameters != null ? de_HyperParameters(output.HyperParameters, context) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - LabelingJobArn: __expectString(output.LabelingJobArn), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelArtifacts: output.ModelArtifacts != null ? de_ModelArtifacts(output.ModelArtifacts, context) : undefined, - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - ProfilerConfig: output.ProfilerConfig != null ? de_ProfilerConfig(output.ProfilerConfig, context) : undefined, - ProfilerRuleConfigurations: - output.ProfilerRuleConfigurations != null - ? de_ProfilerRuleConfigurations(output.ProfilerRuleConfigurations, context) - : undefined, - ProfilerRuleEvaluationStatuses: - output.ProfilerRuleEvaluationStatuses != null - ? de_ProfilerRuleEvaluationStatuses(output.ProfilerRuleEvaluationStatuses, context) - : undefined, - ProfilingStatus: __expectString(output.ProfilingStatus), - ResourceConfig: output.ResourceConfig != null ? de_ResourceConfig(output.ResourceConfig, context) : undefined, - RetryStrategy: output.RetryStrategy != null ? de_RetryStrategy(output.RetryStrategy, context) : undefined, - RoleArn: __expectString(output.RoleArn), - SecondaryStatus: __expectString(output.SecondaryStatus), - SecondaryStatusTransitions: - output.SecondaryStatusTransitions != null - ? de_SecondaryStatusTransitions(output.SecondaryStatusTransitions, context) - : undefined, - StoppingCondition: - output.StoppingCondition != null ? de_StoppingCondition(output.StoppingCondition, context) : undefined, - TensorBoardOutputConfig: - output.TensorBoardOutputConfig != null - ? de_TensorBoardOutputConfig(output.TensorBoardOutputConfig, context) - : undefined, - TrainingEndTime: - output.TrainingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime))) - : undefined, - TrainingJobArn: __expectString(output.TrainingJobArn), - TrainingJobName: __expectString(output.TrainingJobName), - TrainingJobStatus: __expectString(output.TrainingJobStatus), - TrainingStartTime: - output.TrainingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime))) - : undefined, - TrainingTimeInSeconds: __expectInt32(output.TrainingTimeInSeconds), - TuningJobArn: __expectString(output.TuningJobArn), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - WarmPoolStatus: output.WarmPoolStatus != null ? de_WarmPoolStatus(output.WarmPoolStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTransformJobResponse - */ -const de_DescribeTransformJobResponse = (output: any, context: __SerdeContext): DescribeTransformJobResponse => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - BatchStrategy: __expectString(output.BatchStrategy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataCaptureConfig: - output.DataCaptureConfig != null ? de_BatchDataCaptureConfig(output.DataCaptureConfig, context) : undefined, - DataProcessing: output.DataProcessing != null ? de_DataProcessing(output.DataProcessing, context) : undefined, - Environment: output.Environment != null ? de_TransformEnvironmentMap(output.Environment, context) : undefined, - ExperimentConfig: - output.ExperimentConfig != null ? de_ExperimentConfig(output.ExperimentConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - LabelingJobArn: __expectString(output.LabelingJobArn), - MaxConcurrentTransforms: __expectInt32(output.MaxConcurrentTransforms), - MaxPayloadInMB: __expectInt32(output.MaxPayloadInMB), - ModelClientConfig: - output.ModelClientConfig != null ? de_ModelClientConfig(output.ModelClientConfig, context) : undefined, - ModelName: __expectString(output.ModelName), - TransformEndTime: - output.TransformEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransformEndTime))) - : undefined, - TransformInput: output.TransformInput != null ? de_TransformInput(output.TransformInput, context) : undefined, - TransformJobArn: __expectString(output.TransformJobArn), - TransformJobName: __expectString(output.TransformJobName), - TransformJobStatus: __expectString(output.TransformJobStatus), - TransformOutput: output.TransformOutput != null ? de_TransformOutput(output.TransformOutput, context) : undefined, - TransformResources: - output.TransformResources != null ? de_TransformResources(output.TransformResources, context) : undefined, - TransformStartTime: - output.TransformStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransformStartTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTrialComponentResponse - */ -const de_DescribeTrialComponentResponse = (output: any, context: __SerdeContext): DescribeTrialComponentResponse => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputArtifacts: - output.InputArtifacts != null ? de_TrialComponentArtifacts(output.InputArtifacts, context) : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - Metrics: output.Metrics != null ? de_TrialComponentMetricSummaries(output.Metrics, context) : undefined, - OutputArtifacts: - output.OutputArtifacts != null ? de_TrialComponentArtifacts(output.OutputArtifacts, context) : undefined, - Parameters: output.Parameters != null ? de_TrialComponentParameters(output.Parameters, context) : undefined, - Source: output.Source != null ? de_TrialComponentSource(output.Source, context) : undefined, - Sources: output.Sources != null ? de_TrialComponentSources(output.Sources, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: output.Status != null ? de_TrialComponentStatus(output.Status, context) : undefined, - TrialComponentArn: __expectString(output.TrialComponentArn), - TrialComponentName: __expectString(output.TrialComponentName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTrialResponse - */ -const de_DescribeTrialResponse = (output: any, context: __SerdeContext): DescribeTrialResponse => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - ExperimentName: __expectString(output.ExperimentName), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - Source: output.Source != null ? de_TrialSource(output.Source, context) : undefined, - TrialArn: __expectString(output.TrialArn), - TrialName: __expectString(output.TrialName), - } as any; -}; +// se_DescribeProjectInput omitted. -/** - * deserializeAws_json1_1DescribeUserProfileResponse - */ -const de_DescribeUserProfileResponse = (output: any, context: __SerdeContext): DescribeUserProfileResponse => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainId: __expectString(output.DomainId), - FailureReason: __expectString(output.FailureReason), - HomeEfsFileSystemUid: __expectString(output.HomeEfsFileSystemUid), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SingleSignOnUserIdentifier: __expectString(output.SingleSignOnUserIdentifier), - SingleSignOnUserValue: __expectString(output.SingleSignOnUserValue), - Status: __expectString(output.Status), - UserProfileArn: __expectString(output.UserProfileArn), - UserProfileName: __expectString(output.UserProfileName), - UserSettings: output.UserSettings != null ? de_UserSettings(output.UserSettings, context) : undefined, - } as any; -}; +// se_DescribeSpaceRequest omitted. -/** - * deserializeAws_json1_1DescribeWorkforceResponse - */ -const de_DescribeWorkforceResponse = (output: any, context: __SerdeContext): DescribeWorkforceResponse => { - return { - Workforce: output.Workforce != null ? de_Workforce(output.Workforce, context) : undefined, - } as any; -}; +// se_DescribeStudioLifecycleConfigRequest omitted. -/** - * deserializeAws_json1_1DescribeWorkteamResponse - */ -const de_DescribeWorkteamResponse = (output: any, context: __SerdeContext): DescribeWorkteamResponse => { - return { - Workteam: output.Workteam != null ? de_Workteam(output.Workteam, context) : undefined, - } as any; -}; +// se_DescribeSubscribedWorkteamRequest omitted. -/** - * deserializeAws_json1_1DeviceDeploymentSummaries - */ -const de_DeviceDeploymentSummaries = (output: any, context: __SerdeContext): DeviceDeploymentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceDeploymentSummary(entry, context); - }); - return retVal; -}; +// se_DescribeTrainingJobRequest omitted. -/** - * deserializeAws_json1_1DeviceDeploymentSummary - */ -const de_DeviceDeploymentSummary = (output: any, context: __SerdeContext): DeviceDeploymentSummary => { - return { - DeployedStageName: __expectString(output.DeployedStageName), - DeploymentStartTime: - output.DeploymentStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeploymentStartTime))) - : undefined, - Description: __expectString(output.Description), - DeviceArn: __expectString(output.DeviceArn), - DeviceDeploymentStatus: __expectString(output.DeviceDeploymentStatus), - DeviceDeploymentStatusMessage: __expectString(output.DeviceDeploymentStatusMessage), - DeviceFleetName: __expectString(output.DeviceFleetName), - DeviceName: __expectString(output.DeviceName), - EdgeDeploymentPlanArn: __expectString(output.EdgeDeploymentPlanArn), - EdgeDeploymentPlanName: __expectString(output.EdgeDeploymentPlanName), - StageName: __expectString(output.StageName), - } as any; -}; +// se_DescribeTransformJobRequest omitted. -/** - * deserializeAws_json1_1DeviceFleetSummaries - */ -const de_DeviceFleetSummaries = (output: any, context: __SerdeContext): DeviceFleetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceFleetSummary(entry, context); - }); - return retVal; -}; +// se_DescribeTrialComponentRequest omitted. -/** - * deserializeAws_json1_1DeviceFleetSummary - */ -const de_DeviceFleetSummary = (output: any, context: __SerdeContext): DeviceFleetSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DeviceFleetArn: __expectString(output.DeviceFleetArn), - DeviceFleetName: __expectString(output.DeviceFleetName), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_DescribeTrialRequest omitted. -/** - * deserializeAws_json1_1DeviceNames - */ -const de_DeviceNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_DescribeUserProfileRequest omitted. -/** - * deserializeAws_json1_1DeviceSelectionConfig - */ -const de_DeviceSelectionConfig = (output: any, context: __SerdeContext): DeviceSelectionConfig => { - return { - DeviceNameContains: __expectString(output.DeviceNameContains), - DeviceNames: output.DeviceNames != null ? de_DeviceNames(output.DeviceNames, context) : undefined, - DeviceSubsetType: __expectString(output.DeviceSubsetType), - Percentage: __expectInt32(output.Percentage), - } as any; -}; +// se_DescribeWorkforceRequest omitted. + +// se_DescribeWorkteamRequest omitted. /** - * deserializeAws_json1_1DeviceStats + * serializeAws_json1_1DesiredWeightAndCapacity */ -const de_DeviceStats = (output: any, context: __SerdeContext): DeviceStats => { - return { - ConnectedDeviceCount: __expectLong(output.ConnectedDeviceCount), - RegisteredDeviceCount: __expectLong(output.RegisteredDeviceCount), - } as any; +const se_DesiredWeightAndCapacity = (input: DesiredWeightAndCapacity, context: __SerdeContext): any => { + return take(input, { + DesiredInstanceCount: [], + DesiredWeight: __serializeFloat, + VariantName: [], + }); }; /** - * deserializeAws_json1_1DeviceSummaries + * serializeAws_json1_1DesiredWeightAndCapacityList */ -const de_DeviceSummaries = (output: any, context: __SerdeContext): DeviceSummary[] => { - const retVal = (output || []) +const se_DesiredWeightAndCapacityList = (input: DesiredWeightAndCapacity[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceSummary(entry, context); + .map((entry) => { + return se_DesiredWeightAndCapacity(entry, context); }); - return retVal; }; -/** - * deserializeAws_json1_1DeviceSummary - */ -const de_DeviceSummary = (output: any, context: __SerdeContext): DeviceSummary => { - return { - AgentVersion: __expectString(output.AgentVersion), - Description: __expectString(output.Description), - DeviceArn: __expectString(output.DeviceArn), - DeviceFleetName: __expectString(output.DeviceFleetName), - DeviceName: __expectString(output.DeviceName), - IotThingName: __expectString(output.IotThingName), - LatestHeartbeat: - output.LatestHeartbeat != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestHeartbeat))) - : undefined, - Models: output.Models != null ? de_EdgeModelSummaries(output.Models, context) : undefined, - RegistrationTime: - output.RegistrationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RegistrationTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisableSagemakerServicecatalogPortfolioOutput - */ -const de_DisableSagemakerServicecatalogPortfolioOutput = ( - output: any, - context: __SerdeContext -): DisableSagemakerServicecatalogPortfolioOutput => { - return {} as any; -}; +// se_Device omitted. -/** - * deserializeAws_json1_1DisassociateTrialComponentResponse - */ -const de_DisassociateTrialComponentResponse = ( - output: any, - context: __SerdeContext -): DisassociateTrialComponentResponse => { - return { - TrialArn: __expectString(output.TrialArn), - TrialComponentArn: __expectString(output.TrialComponentArn), - } as any; -}; +// se_DeviceNames omitted. -/** - * deserializeAws_json1_1DomainDetails - */ -const de_DomainDetails = (output: any, context: __SerdeContext): DomainDetails => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainArn: __expectString(output.DomainArn), - DomainId: __expectString(output.DomainId), - DomainName: __expectString(output.DomainName), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Status: __expectString(output.Status), - Url: __expectString(output.Url), - } as any; -}; +// se_Devices omitted. -/** - * deserializeAws_json1_1DomainList - */ -const de_DomainList = (output: any, context: __SerdeContext): DomainDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainDetails(entry, context); - }); - return retVal; -}; +// se_DeviceSelectionConfig omitted. -/** - * deserializeAws_json1_1DomainSecurityGroupIds - */ -const de_DomainSecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_DisableSagemakerServicecatalogPortfolioInput omitted. -/** - * deserializeAws_json1_1DomainSettings - */ -const de_DomainSettings = (output: any, context: __SerdeContext): DomainSettings => { - return { - ExecutionRoleIdentityConfig: __expectString(output.ExecutionRoleIdentityConfig), - RStudioServerProDomainSettings: - output.RStudioServerProDomainSettings != null - ? de_RStudioServerProDomainSettings(output.RStudioServerProDomainSettings, context) - : undefined, - SecurityGroupIds: - output.SecurityGroupIds != null ? de_DomainSecurityGroupIds(output.SecurityGroupIds, context) : undefined, - } as any; -}; +// se_DisassociateTrialComponentRequest omitted. -/** - * deserializeAws_json1_1DriftCheckBaselines - */ -const de_DriftCheckBaselines = (output: any, context: __SerdeContext): DriftCheckBaselines => { - return { - Bias: output.Bias != null ? de_DriftCheckBias(output.Bias, context) : undefined, - Explainability: - output.Explainability != null ? de_DriftCheckExplainability(output.Explainability, context) : undefined, - ModelDataQuality: - output.ModelDataQuality != null ? de_DriftCheckModelDataQuality(output.ModelDataQuality, context) : undefined, - ModelQuality: output.ModelQuality != null ? de_DriftCheckModelQuality(output.ModelQuality, context) : undefined, - } as any; -}; +// se_DomainSecurityGroupIds omitted. -/** - * deserializeAws_json1_1DriftCheckBias - */ -const de_DriftCheckBias = (output: any, context: __SerdeContext): DriftCheckBias => { - return { - ConfigFile: output.ConfigFile != null ? de_FileSource(output.ConfigFile, context) : undefined, - PostTrainingConstraints: - output.PostTrainingConstraints != null ? de_MetricsSource(output.PostTrainingConstraints, context) : undefined, - PreTrainingConstraints: - output.PreTrainingConstraints != null ? de_MetricsSource(output.PreTrainingConstraints, context) : undefined, - } as any; -}; +// se_DomainSettings omitted. -/** - * deserializeAws_json1_1DriftCheckExplainability - */ -const de_DriftCheckExplainability = (output: any, context: __SerdeContext): DriftCheckExplainability => { - return { - ConfigFile: output.ConfigFile != null ? de_FileSource(output.ConfigFile, context) : undefined, - Constraints: output.Constraints != null ? de_MetricsSource(output.Constraints, context) : undefined, - } as any; -}; +// se_DomainSettingsForUpdate omitted. -/** - * deserializeAws_json1_1DriftCheckModelDataQuality - */ -const de_DriftCheckModelDataQuality = (output: any, context: __SerdeContext): DriftCheckModelDataQuality => { - return { - Constraints: output.Constraints != null ? de_MetricsSource(output.Constraints, context) : undefined, - Statistics: output.Statistics != null ? de_MetricsSource(output.Statistics, context) : undefined, - } as any; -}; +// se_DriftCheckBaselines omitted. -/** - * deserializeAws_json1_1DriftCheckModelQuality - */ -const de_DriftCheckModelQuality = (output: any, context: __SerdeContext): DriftCheckModelQuality => { - return { - Constraints: output.Constraints != null ? de_MetricsSource(output.Constraints, context) : undefined, - Statistics: output.Statistics != null ? de_MetricsSource(output.Statistics, context) : undefined, - } as any; -}; +// se_DriftCheckBias omitted. -/** - * deserializeAws_json1_1Edge - */ -const de_Edge = (output: any, context: __SerdeContext): Edge => { - return { - AssociationType: __expectString(output.AssociationType), - DestinationArn: __expectString(output.DestinationArn), - SourceArn: __expectString(output.SourceArn), - } as any; -}; +// se_DriftCheckExplainability omitted. -/** - * deserializeAws_json1_1EdgeDeploymentConfig - */ -const de_EdgeDeploymentConfig = (output: any, context: __SerdeContext): EdgeDeploymentConfig => { - return { - FailureHandlingPolicy: __expectString(output.FailureHandlingPolicy), - } as any; -}; +// se_DriftCheckModelDataQuality omitted. -/** - * deserializeAws_json1_1EdgeDeploymentModelConfig - */ -const de_EdgeDeploymentModelConfig = (output: any, context: __SerdeContext): EdgeDeploymentModelConfig => { - return { - EdgePackagingJobName: __expectString(output.EdgePackagingJobName), - ModelHandle: __expectString(output.ModelHandle), - } as any; -}; +// se_DriftCheckModelQuality omitted. -/** - * deserializeAws_json1_1EdgeDeploymentModelConfigs - */ -const de_EdgeDeploymentModelConfigs = (output: any, context: __SerdeContext): EdgeDeploymentModelConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgeDeploymentModelConfig(entry, context); - }); - return retVal; -}; +// se_EdgeDeploymentConfig omitted. -/** - * deserializeAws_json1_1EdgeDeploymentPlanSummaries - */ -const de_EdgeDeploymentPlanSummaries = (output: any, context: __SerdeContext): EdgeDeploymentPlanSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgeDeploymentPlanSummary(entry, context); - }); - return retVal; -}; +// se_EdgeDeploymentModelConfig omitted. -/** - * deserializeAws_json1_1EdgeDeploymentPlanSummary - */ -const de_EdgeDeploymentPlanSummary = (output: any, context: __SerdeContext): EdgeDeploymentPlanSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DeviceFleetName: __expectString(output.DeviceFleetName), - EdgeDeploymentFailed: __expectInt32(output.EdgeDeploymentFailed), - EdgeDeploymentPending: __expectInt32(output.EdgeDeploymentPending), - EdgeDeploymentPlanArn: __expectString(output.EdgeDeploymentPlanArn), - EdgeDeploymentPlanName: __expectString(output.EdgeDeploymentPlanName), - EdgeDeploymentSuccess: __expectInt32(output.EdgeDeploymentSuccess), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_EdgeDeploymentModelConfigs omitted. -/** - * deserializeAws_json1_1EdgeDeploymentStatus - */ -const de_EdgeDeploymentStatus = (output: any, context: __SerdeContext): EdgeDeploymentStatus => { - return { - EdgeDeploymentFailedInStage: __expectInt32(output.EdgeDeploymentFailedInStage), - EdgeDeploymentPendingInStage: __expectInt32(output.EdgeDeploymentPendingInStage), - EdgeDeploymentStageStartTime: - output.EdgeDeploymentStageStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EdgeDeploymentStageStartTime))) - : undefined, - EdgeDeploymentStatusMessage: __expectString(output.EdgeDeploymentStatusMessage), - EdgeDeploymentSuccessInStage: __expectInt32(output.EdgeDeploymentSuccessInStage), - StageStatus: __expectString(output.StageStatus), - } as any; -}; +// se_EdgeOutputConfig omitted. -/** - * deserializeAws_json1_1EdgeModel - */ -const de_EdgeModel = (output: any, context: __SerdeContext): EdgeModel => { - return { - LatestInference: - output.LatestInference != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestInference))) - : undefined, - LatestSampleTime: - output.LatestSampleTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestSampleTime))) - : undefined, - ModelName: __expectString(output.ModelName), - ModelVersion: __expectString(output.ModelVersion), - } as any; -}; +// se_EnableSagemakerServicecatalogPortfolioInput omitted. -/** - * deserializeAws_json1_1EdgeModels - */ -const de_EdgeModels = (output: any, context: __SerdeContext): EdgeModel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgeModel(entry, context); - }); - return retVal; -}; +// se_EndpointInfo omitted. /** - * deserializeAws_json1_1EdgeModelStat + * serializeAws_json1_1EndpointInput */ -const de_EdgeModelStat = (output: any, context: __SerdeContext): EdgeModelStat => { - return { - ActiveDeviceCount: __expectLong(output.ActiveDeviceCount), - ConnectedDeviceCount: __expectLong(output.ConnectedDeviceCount), - ModelName: __expectString(output.ModelName), - ModelVersion: __expectString(output.ModelVersion), - OfflineDeviceCount: __expectLong(output.OfflineDeviceCount), - SamplingDeviceCount: __expectLong(output.SamplingDeviceCount), - } as any; +const se_EndpointInput = (input: EndpointInput, context: __SerdeContext): any => { + return take(input, { + EndTimeOffset: [], + EndpointName: [], + FeaturesAttribute: [], + InferenceAttribute: [], + LocalPath: [], + ProbabilityAttribute: [], + ProbabilityThresholdAttribute: __serializeFloat, + S3DataDistributionType: [], + S3InputMode: [], + StartTimeOffset: [], + }); }; -/** - * deserializeAws_json1_1EdgeModelStats - */ -const de_EdgeModelStats = (output: any, context: __SerdeContext): EdgeModelStat[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgeModelStat(entry, context); - }); - return retVal; -}; +// se_EndpointInputConfiguration omitted. -/** - * deserializeAws_json1_1EdgeModelSummaries - */ -const de_EdgeModelSummaries = (output: any, context: __SerdeContext): EdgeModelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgeModelSummary(entry, context); - }); - return retVal; -}; +// se_EndpointInputConfigurations omitted. -/** - * deserializeAws_json1_1EdgeModelSummary - */ -const de_EdgeModelSummary = (output: any, context: __SerdeContext): EdgeModelSummary => { - return { - ModelName: __expectString(output.ModelName), - ModelVersion: __expectString(output.ModelVersion), - } as any; -}; +// se_Endpoints omitted. -/** - * deserializeAws_json1_1EdgeOutputConfig - */ -const de_EdgeOutputConfig = (output: any, context: __SerdeContext): EdgeOutputConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - PresetDeploymentConfig: __expectString(output.PresetDeploymentConfig), - PresetDeploymentType: __expectString(output.PresetDeploymentType), - S3OutputLocation: __expectString(output.S3OutputLocation), - } as any; -}; +// se_EnvironmentMap omitted. -/** - * deserializeAws_json1_1EdgePackagingJobSummaries - */ -const de_EdgePackagingJobSummaries = (output: any, context: __SerdeContext): EdgePackagingJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EdgePackagingJobSummary(entry, context); - }); - return retVal; -}; +// se_EnvironmentParameterRanges omitted. -/** - * deserializeAws_json1_1EdgePackagingJobSummary - */ -const de_EdgePackagingJobSummary = (output: any, context: __SerdeContext): EdgePackagingJobSummary => { - return { - CompilationJobName: __expectString(output.CompilationJobName), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EdgePackagingJobArn: __expectString(output.EdgePackagingJobArn), - EdgePackagingJobName: __expectString(output.EdgePackagingJobName), - EdgePackagingJobStatus: __expectString(output.EdgePackagingJobStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelName: __expectString(output.ModelName), - ModelVersion: __expectString(output.ModelVersion), - } as any; -}; - -/** - * deserializeAws_json1_1EdgePresetDeploymentOutput - */ -const de_EdgePresetDeploymentOutput = (output: any, context: __SerdeContext): EdgePresetDeploymentOutput => { - return { - Artifact: __expectString(output.Artifact), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Type: __expectString(output.Type), - } as any; -}; +// se_ExperimentConfig omitted. -/** - * deserializeAws_json1_1Edges - */ -const de_Edges = (output: any, context: __SerdeContext): Edge[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Edge(entry, context); - }); - return retVal; -}; +// se_Explainability omitted. -/** - * deserializeAws_json1_1EMRStepMetadata - */ -const de_EMRStepMetadata = (output: any, context: __SerdeContext): EMRStepMetadata => { - return { - ClusterId: __expectString(output.ClusterId), - LogFilePath: __expectString(output.LogFilePath), - StepId: __expectString(output.StepId), - StepName: __expectString(output.StepName), - } as any; -}; +// se_ExplainerConfig omitted. -/** - * deserializeAws_json1_1EnableSagemakerServicecatalogPortfolioOutput - */ -const de_EnableSagemakerServicecatalogPortfolioOutput = ( - output: any, - context: __SerdeContext -): EnableSagemakerServicecatalogPortfolioOutput => { - return {} as any; -}; +// se_FeatureAdditions omitted. -/** - * deserializeAws_json1_1Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataCaptureConfig: - output.DataCaptureConfig != null ? de_DataCaptureConfigSummary(output.DataCaptureConfig, context) : undefined, - EndpointArn: __expectString(output.EndpointArn), - EndpointConfigName: __expectString(output.EndpointConfigName), - EndpointName: __expectString(output.EndpointName), - EndpointStatus: __expectString(output.EndpointStatus), - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MonitoringSchedules: - output.MonitoringSchedules != null ? de_MonitoringScheduleList(output.MonitoringSchedules, context) : undefined, - ProductionVariants: - output.ProductionVariants != null - ? de_ProductionVariantSummaryList(output.ProductionVariants, context) - : undefined, - ShadowProductionVariants: - output.ShadowProductionVariants != null - ? de_ProductionVariantSummaryList(output.ShadowProductionVariants, context) - : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// se_FeatureDefinition omitted. + +// se_FeatureDefinitions omitted. + +// se_FeatureParameter omitted. + +// se_FeatureParameterAdditions omitted. + +// se_FeatureParameterRemovals omitted. + +// se_FileSource omitted. + +// se_FileSystemConfig omitted. + +// se_FileSystemDataSource omitted. + +// se_Filter omitted. + +// se_FilterList omitted. + +// se_FlowDefinitionOutputConfig omitted. + +// se_FlowDefinitionTaskKeywords omitted. + +// se_GetDeviceFleetReportRequest omitted. + +// se_GetLineageGroupPolicyRequest omitted. + +// se_GetModelPackageGroupPolicyInput omitted. + +// se_GetSagemakerServicecatalogPortfolioStatusInput omitted. + +// se_GetSearchSuggestionsRequest omitted. + +// se_GitConfig omitted. + +// se_GitConfigForUpdate omitted. + +// se_Groups omitted. -/** - * deserializeAws_json1_1EndpointConfigSummary - */ -const de_EndpointConfigSummary = (output: any, context: __SerdeContext): EndpointConfigSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointConfigArn: __expectString(output.EndpointConfigArn), - EndpointConfigName: __expectString(output.EndpointConfigName), - } as any; -}; +// se_HookParameters omitted. -/** - * deserializeAws_json1_1EndpointConfigSummaryList - */ -const de_EndpointConfigSummaryList = (output: any, context: __SerdeContext): EndpointConfigSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointConfigSummary(entry, context); - }); - return retVal; -}; +// se_HubContentSearchKeywordList omitted. -/** - * deserializeAws_json1_1EndpointInfo - */ -const de_EndpointInfo = (output: any, context: __SerdeContext): EndpointInfo => { - return { - EndpointName: __expectString(output.EndpointName), - } as any; -}; +// se_HubS3StorageConfig omitted. -/** - * deserializeAws_json1_1EndpointInput - */ -const de_EndpointInput = (output: any, context: __SerdeContext): EndpointInput => { - return { - EndTimeOffset: __expectString(output.EndTimeOffset), - EndpointName: __expectString(output.EndpointName), - FeaturesAttribute: __expectString(output.FeaturesAttribute), - InferenceAttribute: __expectString(output.InferenceAttribute), - LocalPath: __expectString(output.LocalPath), - ProbabilityAttribute: __expectString(output.ProbabilityAttribute), - ProbabilityThresholdAttribute: __limitedParseDouble(output.ProbabilityThresholdAttribute), - S3DataDistributionType: __expectString(output.S3DataDistributionType), - S3InputMode: __expectString(output.S3InputMode), - StartTimeOffset: __expectString(output.StartTimeOffset), - } as any; -}; +// se_HubSearchKeywordList omitted. /** - * deserializeAws_json1_1EndpointInputConfiguration + * serializeAws_json1_1HumanLoopActivationConditionsConfig */ -const de_EndpointInputConfiguration = (output: any, context: __SerdeContext): EndpointInputConfiguration => { - return { - EnvironmentParameterRanges: - output.EnvironmentParameterRanges != null - ? de_EnvironmentParameterRanges(output.EnvironmentParameterRanges, context) - : undefined, - InferenceSpecificationName: __expectString(output.InferenceSpecificationName), - InstanceType: __expectString(output.InstanceType), - } as any; +const se_HumanLoopActivationConditionsConfig = ( + input: HumanLoopActivationConditionsConfig, + context: __SerdeContext +): any => { + return take(input, { + HumanLoopActivationConditions: __LazyJsonString.fromObject, + }); }; /** - * deserializeAws_json1_1EndpointInputConfigurations + * serializeAws_json1_1HumanLoopActivationConfig */ -const de_EndpointInputConfigurations = (output: any, context: __SerdeContext): EndpointInputConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointInputConfiguration(entry, context); - }); - return retVal; +const se_HumanLoopActivationConfig = (input: HumanLoopActivationConfig, context: __SerdeContext): any => { + return take(input, { + HumanLoopActivationConditionsConfig: (_) => se_HumanLoopActivationConditionsConfig(_, context), + }); }; -/** - * deserializeAws_json1_1EndpointMetadata - */ -const de_EndpointMetadata = (output: any, context: __SerdeContext): EndpointMetadata => { - return { - EndpointConfigName: __expectString(output.EndpointConfigName), - EndpointName: __expectString(output.EndpointName), - EndpointStatus: __expectString(output.EndpointStatus), - FailureReason: __expectString(output.FailureReason), - } as any; -}; +// se_HumanLoopConfig omitted. -/** - * deserializeAws_json1_1EndpointOutputConfiguration - */ -const de_EndpointOutputConfiguration = (output: any, context: __SerdeContext): EndpointOutputConfiguration => { - return { - EndpointName: __expectString(output.EndpointName), - InitialInstanceCount: __expectInt32(output.InitialInstanceCount), - InstanceType: __expectString(output.InstanceType), - VariantName: __expectString(output.VariantName), - } as any; -}; +// se_HumanLoopRequestSource omitted. -/** - * deserializeAws_json1_1EndpointPerformance - */ -const de_EndpointPerformance = (output: any, context: __SerdeContext): EndpointPerformance => { - return { - EndpointInfo: output.EndpointInfo != null ? de_EndpointInfo(output.EndpointInfo, context) : undefined, - Metrics: output.Metrics != null ? de_InferenceMetrics(output.Metrics, context) : undefined, - } as any; -}; +// se_HumanTaskConfig omitted. -/** - * deserializeAws_json1_1EndpointPerformances - */ -const de_EndpointPerformances = (output: any, context: __SerdeContext): EndpointPerformance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointPerformance(entry, context); - }); - return retVal; -}; +// se_HyperbandStrategyConfig omitted. -/** - * deserializeAws_json1_1Endpoints - */ -const de_Endpoints = (output: any, context: __SerdeContext): EndpointInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointInfo(entry, context); - }); - return retVal; -}; +// se_HyperParameterAlgorithmSpecification omitted. -/** - * deserializeAws_json1_1EndpointSummary - */ -const de_EndpointSummary = (output: any, context: __SerdeContext): EndpointSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointArn: __expectString(output.EndpointArn), - EndpointName: __expectString(output.EndpointName), - EndpointStatus: __expectString(output.EndpointStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; +// se_HyperParameters omitted. -/** - * deserializeAws_json1_1EndpointSummaryList - */ -const de_EndpointSummaryList = (output: any, context: __SerdeContext): EndpointSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EndpointSummary(entry, context); - }); - return retVal; -}; +// se_HyperParameterSpecification omitted. -/** - * deserializeAws_json1_1EnvironmentMap - */ -const de_EnvironmentMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_HyperParameterSpecifications omitted. -/** - * deserializeAws_json1_1EnvironmentParameter - */ -const de_EnvironmentParameter = (output: any, context: __SerdeContext): EnvironmentParameter => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - ValueType: __expectString(output.ValueType), - } as any; -}; +// se_HyperParameterTrainingJobDefinition omitted. + +// se_HyperParameterTrainingJobDefinitions omitted. + +// se_HyperParameterTrainingJobEnvironmentMap omitted. + +// se_HyperParameterTuningInstanceConfig omitted. + +// se_HyperParameterTuningInstanceConfigs omitted. /** - * deserializeAws_json1_1EnvironmentParameterRanges + * serializeAws_json1_1HyperParameterTuningJobConfig */ -const de_EnvironmentParameterRanges = (output: any, context: __SerdeContext): EnvironmentParameterRanges => { - return { - CategoricalParameterRanges: - output.CategoricalParameterRanges != null - ? de_CategoricalParameters(output.CategoricalParameterRanges, context) - : undefined, - } as any; +const se_HyperParameterTuningJobConfig = (input: HyperParameterTuningJobConfig, context: __SerdeContext): any => { + return take(input, { + HyperParameterTuningJobObjective: _json, + ParameterRanges: _json, + RandomSeed: [], + ResourceLimits: _json, + Strategy: [], + StrategyConfig: _json, + TrainingJobEarlyStoppingType: [], + TuningJobCompletionCriteria: (_) => se_TuningJobCompletionCriteria(_, context), + }); }; +// se_HyperParameterTuningJobObjective omitted. + +// se_HyperParameterTuningJobObjectives omitted. + +// se_HyperParameterTuningJobStrategyConfig omitted. + +// se_HyperParameterTuningJobWarmStartConfig omitted. + +// se_HyperParameterTuningResourceConfig omitted. + +// se_ImageClassificationJobConfig omitted. + +// se_ImageConfig omitted. + +// se_ImageDeletePropertyList omitted. + +// se_ImportHubContentRequest omitted. + +// se_InferenceExecutionConfig omitted. + +// se_InferenceExperimentDataStorageConfig omitted. + /** - * deserializeAws_json1_1EnvironmentParameters + * serializeAws_json1_1InferenceExperimentSchedule */ -const de_EnvironmentParameters = (output: any, context: __SerdeContext): EnvironmentParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EnvironmentParameter(entry, context); - }); - return retVal; +const se_InferenceExperimentSchedule = (input: InferenceExperimentSchedule, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_InferenceSpecification omitted. + +// se_InputConfig omitted. + +// se_InputDataConfig omitted. + +// se_InputModes omitted. + +// se_InstanceGroup omitted. + +// se_InstanceGroupNames omitted. + +// se_InstanceGroups omitted. + +// se_InstanceMetadataServiceConfiguration omitted. + +// se_IntegerParameterRange omitted. + +// se_IntegerParameterRanges omitted. + +// se_IntegerParameterRangeSpecification omitted. + +// se_JsonContentTypes omitted. + +// se_JupyterServerAppSettings omitted. + +// se_KernelGatewayAppSettings omitted. + +// se_KernelGatewayImageConfig omitted. + +// se_KernelSpec omitted. + +// se_KernelSpecs omitted. + +// se_LabelingJobAlgorithmsConfig omitted. + +// se_LabelingJobDataAttributes omitted. + +// se_LabelingJobDataSource omitted. + +// se_LabelingJobInputConfig omitted. + +// se_LabelingJobOutputConfig omitted. + +// se_LabelingJobResourceConfig omitted. + +// se_LabelingJobS3DataSource omitted. + +// se_LabelingJobSnsDataSource omitted. + +// se_LabelingJobStoppingConditions omitted. + +// se_LifecycleConfigArns omitted. + +// se_LineageEntityParameters omitted. + /** - * deserializeAws_json1_1Experiment + * serializeAws_json1_1ListActionsRequest */ -const de_Experiment = (output: any, context: __SerdeContext): Experiment => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - ExperimentArn: __expectString(output.ExperimentArn), - ExperimentName: __expectString(output.ExperimentName), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Source: output.Source != null ? de_ExperimentSource(output.Source, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExperimentConfig - */ -const de_ExperimentConfig = (output: any, context: __SerdeContext): ExperimentConfig => { - return { - ExperimentName: __expectString(output.ExperimentName), - RunName: __expectString(output.RunName), - TrialComponentDisplayName: __expectString(output.TrialComponentDisplayName), - TrialName: __expectString(output.TrialName), - } as any; +const se_ListActionsRequest = (input: ListActionsRequest, context: __SerdeContext): any => { + return take(input, { + ActionType: [], + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + SourceUri: [], + }); }; /** - * deserializeAws_json1_1ExperimentSource + * serializeAws_json1_1ListAlgorithmsInput */ -const de_ExperimentSource = (output: any, context: __SerdeContext): ExperimentSource => { - return { - SourceArn: __expectString(output.SourceArn), - SourceType: __expectString(output.SourceType), - } as any; +const se_ListAlgorithmsInput = (input: ListAlgorithmsInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; +// se_ListAliasesRequest omitted. + /** - * deserializeAws_json1_1ExperimentSummaries + * serializeAws_json1_1ListAppImageConfigsRequest */ -const de_ExperimentSummaries = (output: any, context: __SerdeContext): ExperimentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExperimentSummary(entry, context); - }); - return retVal; +const se_ListAppImageConfigsRequest = (input: ListAppImageConfigsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + ModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; +// se_ListAppsRequest omitted. + /** - * deserializeAws_json1_1ExperimentSummary + * serializeAws_json1_1ListArtifactsRequest */ -const de_ExperimentSummary = (output: any, context: __SerdeContext): ExperimentSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - ExperimentArn: __expectString(output.ExperimentArn), - ExperimentName: __expectString(output.ExperimentName), - ExperimentSource: - output.ExperimentSource != null ? de_ExperimentSource(output.ExperimentSource, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Explainability - */ -const de_Explainability = (output: any, context: __SerdeContext): Explainability => { - return { - Report: output.Report != null ? de_MetricsSource(output.Report, context) : undefined, - } as any; +const se_ListArtifactsRequest = (input: ListArtifactsRequest, context: __SerdeContext): any => { + return take(input, { + ArtifactType: [], + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + SourceUri: [], + }); }; /** - * deserializeAws_json1_1ExplainerConfig + * serializeAws_json1_1ListAssociationsRequest */ -const de_ExplainerConfig = (output: any, context: __SerdeContext): ExplainerConfig => { - return { - ClarifyExplainerConfig: - output.ClarifyExplainerConfig != null - ? de_ClarifyExplainerConfig(output.ClarifyExplainerConfig, context) - : undefined, - } as any; +const se_ListAssociationsRequest = (input: ListAssociationsRequest, context: __SerdeContext): any => { + return take(input, { + AssociationType: [], + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + DestinationArn: [], + DestinationType: [], + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + SourceArn: [], + SourceType: [], + }); }; /** - * deserializeAws_json1_1FailStepMetadata + * serializeAws_json1_1ListAutoMLJobsRequest */ -const de_FailStepMetadata = (output: any, context: __SerdeContext): FailStepMetadata => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - } as any; +const se_ListAutoMLJobsRequest = (input: ListAutoMLJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; +// se_ListCandidatesForAutoMLJobRequest omitted. + /** - * deserializeAws_json1_1FeatureDefinition + * serializeAws_json1_1ListCodeRepositoriesInput */ -const de_FeatureDefinition = (output: any, context: __SerdeContext): FeatureDefinition => { - return { - FeatureName: __expectString(output.FeatureName), - FeatureType: __expectString(output.FeatureType), - } as any; +const se_ListCodeRepositoriesInput = (input: ListCodeRepositoriesInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FeatureDefinitions + * serializeAws_json1_1ListCompilationJobsRequest */ -const de_FeatureDefinitions = (output: any, context: __SerdeContext): FeatureDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeatureDefinition(entry, context); - }); - return retVal; +const se_ListCompilationJobsRequest = (input: ListCompilationJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1FeatureGroup + * serializeAws_json1_1ListContextsRequest */ -const de_FeatureGroup = (output: any, context: __SerdeContext): FeatureGroup => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - EventTimeFeatureName: __expectString(output.EventTimeFeatureName), - FailureReason: __expectString(output.FailureReason), - FeatureDefinitions: - output.FeatureDefinitions != null ? de_FeatureDefinitions(output.FeatureDefinitions, context) : undefined, - FeatureGroupArn: __expectString(output.FeatureGroupArn), - FeatureGroupName: __expectString(output.FeatureGroupName), - FeatureGroupStatus: __expectString(output.FeatureGroupStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastUpdateStatus: - output.LastUpdateStatus != null ? de_LastUpdateStatus(output.LastUpdateStatus, context) : undefined, - OfflineStoreConfig: - output.OfflineStoreConfig != null ? de_OfflineStoreConfig(output.OfflineStoreConfig, context) : undefined, - OfflineStoreStatus: - output.OfflineStoreStatus != null ? de_OfflineStoreStatus(output.OfflineStoreStatus, context) : undefined, - OnlineStoreConfig: - output.OnlineStoreConfig != null ? de_OnlineStoreConfig(output.OnlineStoreConfig, context) : undefined, - RecordIdentifierFeatureName: __expectString(output.RecordIdentifierFeatureName), - RoleArn: __expectString(output.RoleArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const se_ListContextsRequest = (input: ListContextsRequest, context: __SerdeContext): any => { + return take(input, { + ContextType: [], + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + SourceUri: [], + }); }; /** - * deserializeAws_json1_1FeatureGroupSummaries + * serializeAws_json1_1ListDataQualityJobDefinitionsRequest */ -const de_FeatureGroupSummaries = (output: any, context: __SerdeContext): FeatureGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeatureGroupSummary(entry, context); - }); - return retVal; +const se_ListDataQualityJobDefinitionsRequest = ( + input: ListDataQualityJobDefinitionsRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + EndpointName: [], + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FeatureGroupSummary + * serializeAws_json1_1ListDeviceFleetsRequest */ -const de_FeatureGroupSummary = (output: any, context: __SerdeContext): FeatureGroupSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FeatureGroupArn: __expectString(output.FeatureGroupArn), - FeatureGroupName: __expectString(output.FeatureGroupName), - FeatureGroupStatus: __expectString(output.FeatureGroupStatus), - OfflineStoreStatus: - output.OfflineStoreStatus != null ? de_OfflineStoreStatus(output.OfflineStoreStatus, context) : undefined, - } as any; +const se_ListDeviceFleetsRequest = (input: ListDeviceFleetsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FeatureMetadata + * serializeAws_json1_1ListDevicesRequest */ -const de_FeatureMetadata = (output: any, context: __SerdeContext): FeatureMetadata => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - FeatureGroupArn: __expectString(output.FeatureGroupArn), - FeatureGroupName: __expectString(output.FeatureGroupName), - FeatureName: __expectString(output.FeatureName), - FeatureType: __expectString(output.FeatureType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Parameters: output.Parameters != null ? de_FeatureParameters(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FeatureParameter - */ -const de_FeatureParameter = (output: any, context: __SerdeContext): FeatureParameter => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const se_ListDevicesRequest = (input: ListDevicesRequest, context: __SerdeContext): any => { + return take(input, { + DeviceFleetName: [], + LatestHeartbeatAfter: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModelName: [], + NextToken: [], + }); }; +// se_ListDomainsRequest omitted. + /** - * deserializeAws_json1_1FeatureParameters + * serializeAws_json1_1ListEdgeDeploymentPlansRequest */ -const de_FeatureParameters = (output: any, context: __SerdeContext): FeatureParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FeatureParameter(entry, context); - }); - return retVal; +const se_ListEdgeDeploymentPlansRequest = (input: ListEdgeDeploymentPlansRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + DeviceFleetNameContains: [], + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FileSource + * serializeAws_json1_1ListEdgePackagingJobsRequest */ -const de_FileSource = (output: any, context: __SerdeContext): FileSource => { - return { - ContentDigest: __expectString(output.ContentDigest), - ContentType: __expectString(output.ContentType), - S3Uri: __expectString(output.S3Uri), - } as any; +const se_ListEdgePackagingJobsRequest = (input: ListEdgePackagingJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModelNameContains: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1FileSystemConfig + * serializeAws_json1_1ListEndpointConfigsInput */ -const de_FileSystemConfig = (output: any, context: __SerdeContext): FileSystemConfig => { - return { - DefaultGid: __expectInt32(output.DefaultGid), - DefaultUid: __expectInt32(output.DefaultUid), - MountPath: __expectString(output.MountPath), - } as any; +const se_ListEndpointConfigsInput = (input: ListEndpointConfigsInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FileSystemDataSource + * serializeAws_json1_1ListEndpointsInput */ -const de_FileSystemDataSource = (output: any, context: __SerdeContext): FileSystemDataSource => { - return { - DirectoryPath: __expectString(output.DirectoryPath), - FileSystemAccessMode: __expectString(output.FileSystemAccessMode), - FileSystemId: __expectString(output.FileSystemId), - FileSystemType: __expectString(output.FileSystemType), - } as any; +const se_ListEndpointsInput = (input: ListEndpointsInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1FinalAutoMLJobObjectiveMetric + * serializeAws_json1_1ListExperimentsRequest */ -const de_FinalAutoMLJobObjectiveMetric = (output: any, context: __SerdeContext): FinalAutoMLJobObjectiveMetric => { - return { - MetricName: __expectString(output.MetricName), - StandardMetricName: __expectString(output.StandardMetricName), - Type: __expectString(output.Type), - Value: __limitedParseFloat32(output.Value), - } as any; +const se_ListExperimentsRequest = (input: ListExperimentsRequest, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FinalHyperParameterTuningJobObjectiveMetric + * serializeAws_json1_1ListFeatureGroupsRequest */ -const de_FinalHyperParameterTuningJobObjectiveMetric = ( - output: any, - context: __SerdeContext -): FinalHyperParameterTuningJobObjectiveMetric => { - return { - MetricName: __expectString(output.MetricName), - Type: __expectString(output.Type), - Value: __limitedParseFloat32(output.Value), - } as any; +const se_ListFeatureGroupsRequest = (input: ListFeatureGroupsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + FeatureGroupStatusEquals: [], + MaxResults: [], + NameContains: [], + NextToken: [], + OfflineStoreStatusEquals: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FinalMetricDataList + * serializeAws_json1_1ListFlowDefinitionsRequest */ -const de_FinalMetricDataList = (output: any, context: __SerdeContext): MetricData[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricData(entry, context); - }); - return retVal; +const se_ListFlowDefinitionsRequest = (input: ListFlowDefinitionsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FlowDefinitionOutputConfig + * serializeAws_json1_1ListHubContentsRequest */ -const de_FlowDefinitionOutputConfig = (output: any, context: __SerdeContext): FlowDefinitionOutputConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; +const se_ListHubContentsRequest = (input: ListHubContentsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + HubContentType: [], + HubName: [], + MaxResults: [], + MaxSchemaVersion: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FlowDefinitionSummaries + * serializeAws_json1_1ListHubContentVersionsRequest */ -const de_FlowDefinitionSummaries = (output: any, context: __SerdeContext): FlowDefinitionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FlowDefinitionSummary(entry, context); - }); - return retVal; +const se_ListHubContentVersionsRequest = (input: ListHubContentVersionsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + HubContentName: [], + HubContentType: [], + HubName: [], + MaxResults: [], + MaxSchemaVersion: [], + MinVersion: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FlowDefinitionSummary + * serializeAws_json1_1ListHubsRequest */ -const de_FlowDefinitionSummary = (output: any, context: __SerdeContext): FlowDefinitionSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - FlowDefinitionArn: __expectString(output.FlowDefinitionArn), - FlowDefinitionName: __expectString(output.FlowDefinitionName), - FlowDefinitionStatus: __expectString(output.FlowDefinitionStatus), - } as any; +const se_ListHubsRequest = (input: ListHubsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1FlowDefinitionTaskKeywords + * serializeAws_json1_1ListHumanTaskUisRequest */ -const de_FlowDefinitionTaskKeywords = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_ListHumanTaskUisRequest = (input: ListHumanTaskUisRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1GetDeviceFleetReportResponse + * serializeAws_json1_1ListHyperParameterTuningJobsRequest */ -const de_GetDeviceFleetReportResponse = (output: any, context: __SerdeContext): GetDeviceFleetReportResponse => { - return { - AgentVersions: output.AgentVersions != null ? de_AgentVersions(output.AgentVersions, context) : undefined, - Description: __expectString(output.Description), - DeviceFleetArn: __expectString(output.DeviceFleetArn), - DeviceFleetName: __expectString(output.DeviceFleetName), - DeviceStats: output.DeviceStats != null ? de_DeviceStats(output.DeviceStats, context) : undefined, - ModelStats: output.ModelStats != null ? de_EdgeModelStats(output.ModelStats, context) : undefined, - OutputConfig: output.OutputConfig != null ? de_EdgeOutputConfig(output.OutputConfig, context) : undefined, - ReportGenerated: - output.ReportGenerated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReportGenerated))) - : undefined, - } as any; +const se_ListHyperParameterTuningJobsRequest = ( + input: ListHyperParameterTuningJobsRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1GetLineageGroupPolicyResponse + * serializeAws_json1_1ListImagesRequest */ -const de_GetLineageGroupPolicyResponse = (output: any, context: __SerdeContext): GetLineageGroupPolicyResponse => { - return { - LineageGroupArn: __expectString(output.LineageGroupArn), - ResourcePolicy: __expectString(output.ResourcePolicy), - } as any; +const se_ListImagesRequest = (input: ListImagesRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1GetModelPackageGroupPolicyOutput + * serializeAws_json1_1ListImageVersionsRequest */ -const de_GetModelPackageGroupPolicyOutput = ( - output: any, - context: __SerdeContext -): GetModelPackageGroupPolicyOutput => { - return { - ResourcePolicy: __expectString(output.ResourcePolicy), - } as any; +const se_ListImageVersionsRequest = (input: ListImageVersionsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + ImageName: [], + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1GetSagemakerServicecatalogPortfolioStatusOutput + * serializeAws_json1_1ListInferenceExperimentsRequest */ -const de_GetSagemakerServicecatalogPortfolioStatusOutput = ( - output: any, - context: __SerdeContext -): GetSagemakerServicecatalogPortfolioStatusOutput => { - return { - Status: __expectString(output.Status), - } as any; +const se_ListInferenceExperimentsRequest = (input: ListInferenceExperimentsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + Type: [], + }); }; /** - * deserializeAws_json1_1GetSearchSuggestionsResponse + * serializeAws_json1_1ListInferenceRecommendationsJobsRequest */ -const de_GetSearchSuggestionsResponse = (output: any, context: __SerdeContext): GetSearchSuggestionsResponse => { - return { - PropertyNameSuggestions: - output.PropertyNameSuggestions != null - ? de_PropertyNameSuggestionList(output.PropertyNameSuggestions, context) - : undefined, - } as any; +const se_ListInferenceRecommendationsJobsRequest = ( + input: ListInferenceRecommendationsJobsRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; +// se_ListInferenceRecommendationsJobStepsRequest omitted. + /** - * deserializeAws_json1_1GitConfig + * serializeAws_json1_1ListLabelingJobsForWorkteamRequest */ -const de_GitConfig = (output: any, context: __SerdeContext): GitConfig => { - return { - Branch: __expectString(output.Branch), - RepositoryUrl: __expectString(output.RepositoryUrl), - SecretArn: __expectString(output.SecretArn), - } as any; +const se_ListLabelingJobsForWorkteamRequest = ( + input: ListLabelingJobsForWorkteamRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + JobReferenceCodeContains: [], + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + WorkteamArn: [], + }); }; /** - * deserializeAws_json1_1Groups + * serializeAws_json1_1ListLabelingJobsRequest */ -const de_Groups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_ListLabelingJobsRequest = (input: ListLabelingJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; +// se_ListLineageEntityParameterKey omitted. + /** - * deserializeAws_json1_1HookParameters + * serializeAws_json1_1ListLineageGroupsRequest */ -const de_HookParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const se_ListLineageGroupsRequest = (input: ListLineageGroupsRequest, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubContentDependency + * serializeAws_json1_1ListModelBiasJobDefinitionsRequest */ -const de_HubContentDependency = (output: any, context: __SerdeContext): HubContentDependency => { - return { - DependencyCopyPath: __expectString(output.DependencyCopyPath), - DependencyOriginPath: __expectString(output.DependencyOriginPath), - } as any; +const se_ListModelBiasJobDefinitionsRequest = ( + input: ListModelBiasJobDefinitionsRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + EndpointName: [], + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubContentDependencyList + * serializeAws_json1_1ListModelCardExportJobsRequest */ -const de_HubContentDependencyList = (output: any, context: __SerdeContext): HubContentDependency[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HubContentDependency(entry, context); - }); - return retVal; +const se_ListModelCardExportJobsRequest = (input: ListModelCardExportJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModelCardExportJobNameContains: [], + ModelCardName: [], + ModelCardVersion: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1HubContentInfo + * serializeAws_json1_1ListModelCardsRequest */ -const de_HubContentInfo = (output: any, context: __SerdeContext): HubContentInfo => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DocumentSchemaVersion: __expectString(output.DocumentSchemaVersion), - HubContentArn: __expectString(output.HubContentArn), - HubContentDescription: __expectString(output.HubContentDescription), - HubContentDisplayName: __expectString(output.HubContentDisplayName), - HubContentName: __expectString(output.HubContentName), - HubContentSearchKeywords: - output.HubContentSearchKeywords != null - ? de_HubContentSearchKeywordList(output.HubContentSearchKeywords, context) - : undefined, - HubContentStatus: __expectString(output.HubContentStatus), - HubContentType: __expectString(output.HubContentType), - HubContentVersion: __expectString(output.HubContentVersion), - } as any; +const se_ListModelCardsRequest = (input: ListModelCardsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModelCardStatus: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubContentInfoList + * serializeAws_json1_1ListModelCardVersionsRequest */ -const de_HubContentInfoList = (output: any, context: __SerdeContext): HubContentInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HubContentInfo(entry, context); - }); - return retVal; +const se_ListModelCardVersionsRequest = (input: ListModelCardVersionsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModelCardName: [], + ModelCardStatus: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubContentSearchKeywordList + * serializeAws_json1_1ListModelExplainabilityJobDefinitionsRequest */ -const de_HubContentSearchKeywordList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_ListModelExplainabilityJobDefinitionsRequest = ( + input: ListModelExplainabilityJobDefinitionsRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + EndpointName: [], + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; +// se_ListModelMetadataRequest omitted. + /** - * deserializeAws_json1_1HubInfo + * serializeAws_json1_1ListModelPackageGroupsInput */ -const de_HubInfo = (output: any, context: __SerdeContext): HubInfo => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HubArn: __expectString(output.HubArn), - HubDescription: __expectString(output.HubDescription), - HubDisplayName: __expectString(output.HubDisplayName), - HubName: __expectString(output.HubName), - HubSearchKeywords: - output.HubSearchKeywords != null ? de_HubSearchKeywordList(output.HubSearchKeywords, context) : undefined, - HubStatus: __expectString(output.HubStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; +const se_ListModelPackageGroupsInput = (input: ListModelPackageGroupsInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubInfoList + * serializeAws_json1_1ListModelPackagesInput */ -const de_HubInfoList = (output: any, context: __SerdeContext): HubInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HubInfo(entry, context); - }); - return retVal; +const se_ListModelPackagesInput = (input: ListModelPackagesInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModelApprovalStatus: [], + ModelPackageGroupName: [], + ModelPackageType: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubS3StorageConfig + * serializeAws_json1_1ListModelQualityJobDefinitionsRequest */ -const de_HubS3StorageConfig = (output: any, context: __SerdeContext): HubS3StorageConfig => { - return { - S3OutputPath: __expectString(output.S3OutputPath), - } as any; +const se_ListModelQualityJobDefinitionsRequest = ( + input: ListModelQualityJobDefinitionsRequest, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + EndpointName: [], + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HubSearchKeywordList + * serializeAws_json1_1ListModelsInput */ -const de_HubSearchKeywordList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const se_ListModelsInput = (input: ListModelsInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HumanLoopActivationConditionsConfig + * serializeAws_json1_1ListMonitoringAlertHistoryRequest */ -const de_HumanLoopActivationConditionsConfig = ( - output: any, +const se_ListMonitoringAlertHistoryRequest = ( + input: ListMonitoringAlertHistoryRequest, context: __SerdeContext -): HumanLoopActivationConditionsConfig => { - return { - HumanLoopActivationConditions: - output.HumanLoopActivationConditions != null - ? new __LazyJsonString(output.HumanLoopActivationConditions) - : undefined, - } as any; +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + MonitoringAlertName: [], + MonitoringScheduleName: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; +// se_ListMonitoringAlertsRequest omitted. + /** - * deserializeAws_json1_1HumanLoopActivationConfig + * serializeAws_json1_1ListMonitoringExecutionsRequest */ -const de_HumanLoopActivationConfig = (output: any, context: __SerdeContext): HumanLoopActivationConfig => { - return { - HumanLoopActivationConditionsConfig: - output.HumanLoopActivationConditionsConfig != null - ? de_HumanLoopActivationConditionsConfig(output.HumanLoopActivationConditionsConfig, context) - : undefined, - } as any; +const se_ListMonitoringExecutionsRequest = (input: ListMonitoringExecutionsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + EndpointName: [], + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + MonitoringJobDefinitionName: [], + MonitoringScheduleName: [], + MonitoringTypeEquals: [], + NextToken: [], + ScheduledTimeAfter: (_) => Math.round(_.getTime() / 1000), + ScheduledTimeBefore: (_) => Math.round(_.getTime() / 1000), + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1HumanLoopConfig + * serializeAws_json1_1ListMonitoringSchedulesRequest */ -const de_HumanLoopConfig = (output: any, context: __SerdeContext): HumanLoopConfig => { - return { - HumanTaskUiArn: __expectString(output.HumanTaskUiArn), - PublicWorkforceTaskPrice: - output.PublicWorkforceTaskPrice != null - ? de_PublicWorkforceTaskPrice(output.PublicWorkforceTaskPrice, context) - : undefined, - TaskAvailabilityLifetimeInSeconds: __expectInt32(output.TaskAvailabilityLifetimeInSeconds), - TaskCount: __expectInt32(output.TaskCount), - TaskDescription: __expectString(output.TaskDescription), - TaskKeywords: output.TaskKeywords != null ? de_FlowDefinitionTaskKeywords(output.TaskKeywords, context) : undefined, - TaskTimeLimitInSeconds: __expectInt32(output.TaskTimeLimitInSeconds), - TaskTitle: __expectString(output.TaskTitle), - WorkteamArn: __expectString(output.WorkteamArn), - } as any; +const se_ListMonitoringSchedulesRequest = (input: ListMonitoringSchedulesRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + EndpointName: [], + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + MonitoringJobDefinitionName: [], + MonitoringTypeEquals: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1HumanLoopRequestSource + * serializeAws_json1_1ListNotebookInstanceLifecycleConfigsInput */ -const de_HumanLoopRequestSource = (output: any, context: __SerdeContext): HumanLoopRequestSource => { - return { - AwsManagedHumanLoopRequestSource: __expectString(output.AwsManagedHumanLoopRequestSource), - } as any; +const se_ListNotebookInstanceLifecycleConfigsInput = ( + input: ListNotebookInstanceLifecycleConfigsInput, + context: __SerdeContext +): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HumanTaskConfig + * serializeAws_json1_1ListNotebookInstancesInput */ -const de_HumanTaskConfig = (output: any, context: __SerdeContext): HumanTaskConfig => { - return { - AnnotationConsolidationConfig: - output.AnnotationConsolidationConfig != null - ? de_AnnotationConsolidationConfig(output.AnnotationConsolidationConfig, context) - : undefined, - MaxConcurrentTaskCount: __expectInt32(output.MaxConcurrentTaskCount), - NumberOfHumanWorkersPerDataObject: __expectInt32(output.NumberOfHumanWorkersPerDataObject), - PreHumanTaskLambdaArn: __expectString(output.PreHumanTaskLambdaArn), - PublicWorkforceTaskPrice: - output.PublicWorkforceTaskPrice != null - ? de_PublicWorkforceTaskPrice(output.PublicWorkforceTaskPrice, context) - : undefined, - TaskAvailabilityLifetimeInSeconds: __expectInt32(output.TaskAvailabilityLifetimeInSeconds), - TaskDescription: __expectString(output.TaskDescription), - TaskKeywords: output.TaskKeywords != null ? de_TaskKeywords(output.TaskKeywords, context) : undefined, - TaskTimeLimitInSeconds: __expectInt32(output.TaskTimeLimitInSeconds), - TaskTitle: __expectString(output.TaskTitle), - UiConfig: output.UiConfig != null ? de_UiConfig(output.UiConfig, context) : undefined, - WorkteamArn: __expectString(output.WorkteamArn), - } as any; +const se_ListNotebookInstancesInput = (input: ListNotebookInstancesInput, context: __SerdeContext): any => { + return take(input, { + AdditionalCodeRepositoryEquals: [], + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + DefaultCodeRepositoryContains: [], + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + NotebookInstanceLifecycleConfigNameContains: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1HumanTaskUiSummaries + * serializeAws_json1_1ListPipelineExecutionsRequest */ -const de_HumanTaskUiSummaries = (output: any, context: __SerdeContext): HumanTaskUiSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HumanTaskUiSummary(entry, context); - }); - return retVal; +const se_ListPipelineExecutionsRequest = (input: ListPipelineExecutionsRequest, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + PipelineName: [], + SortBy: [], + SortOrder: [], + }); }; +// se_ListPipelineExecutionStepsRequest omitted. + +// se_ListPipelineParametersForExecutionRequest omitted. + /** - * deserializeAws_json1_1HumanTaskUiSummary + * serializeAws_json1_1ListPipelinesRequest */ -const de_HumanTaskUiSummary = (output: any, context: __SerdeContext): HumanTaskUiSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HumanTaskUiArn: __expectString(output.HumanTaskUiArn), - HumanTaskUiName: __expectString(output.HumanTaskUiName), - } as any; +const se_ListPipelinesRequest = (input: ListPipelinesRequest, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + PipelineNamePrefix: [], + SortBy: [], + SortOrder: [], + }); }; /** - * deserializeAws_json1_1HyperbandStrategyConfig + * serializeAws_json1_1ListProcessingJobsRequest */ -const de_HyperbandStrategyConfig = (output: any, context: __SerdeContext): HyperbandStrategyConfig => { - return { - MaxResource: __expectInt32(output.MaxResource), - MinResource: __expectInt32(output.MinResource), - } as any; +const se_ListProcessingJobsRequest = (input: ListProcessingJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; /** - * deserializeAws_json1_1HyperParameterAlgorithmSpecification + * serializeAws_json1_1ListProjectsInput */ -const de_HyperParameterAlgorithmSpecification = ( - output: any, - context: __SerdeContext -): HyperParameterAlgorithmSpecification => { - return { - AlgorithmName: __expectString(output.AlgorithmName), - MetricDefinitions: - output.MetricDefinitions != null ? de_MetricDefinitionList(output.MetricDefinitions, context) : undefined, - TrainingImage: __expectString(output.TrainingImage), - TrainingInputMode: __expectString(output.TrainingInputMode), - } as any; +const se_ListProjectsInput = (input: ListProjectsInput, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; +// se_ListSpacesRequest omitted. + +// se_ListStageDevicesRequest omitted. + /** - * deserializeAws_json1_1HyperParameters + * serializeAws_json1_1ListStudioLifecycleConfigsRequest */ -const de_HyperParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const se_ListStudioLifecycleConfigsRequest = ( + input: ListStudioLifecycleConfigsRequest, + context: __SerdeContext +): any => { + return take(input, { + AppTypeEquals: [], + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + ModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + ModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + }); }; +// se_ListSubscribedWorkteamsRequest omitted. + +// se_ListTagsInput omitted. + +// se_ListTrainingJobsForHyperParameterTuningJobRequest omitted. + /** - * deserializeAws_json1_1HyperParameterSpecification + * serializeAws_json1_1ListTrainingJobsRequest */ -const de_HyperParameterSpecification = (output: any, context: __SerdeContext): HyperParameterSpecification => { - return { - DefaultValue: __expectString(output.DefaultValue), - Description: __expectString(output.Description), - IsRequired: __expectBoolean(output.IsRequired), - IsTunable: __expectBoolean(output.IsTunable), - Name: __expectString(output.Name), - Range: output.Range != null ? de_ParameterRange(output.Range, context) : undefined, - Type: __expectString(output.Type), - } as any; +const se_ListTrainingJobsRequest = (input: ListTrainingJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + WarmPoolStatusEquals: [], + }); }; /** - * deserializeAws_json1_1HyperParameterSpecifications + * serializeAws_json1_1ListTransformJobsRequest */ -const de_HyperParameterSpecifications = (output: any, context: __SerdeContext): HyperParameterSpecification[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HyperParameterSpecification(entry, context); - }); - return retVal; +const se_ListTransformJobsRequest = (input: ListTransformJobsRequest, context: __SerdeContext): any => { + return take(input, { + CreationTimeAfter: (_) => Math.round(_.getTime() / 1000), + CreationTimeBefore: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeAfter: (_) => Math.round(_.getTime() / 1000), + LastModifiedTimeBefore: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NameContains: [], + NextToken: [], + SortBy: [], + SortOrder: [], + StatusEquals: [], + }); }; +// se_ListTrialComponentKey256 omitted. + /** - * deserializeAws_json1_1HyperParameterTrainingJobDefinition + * serializeAws_json1_1ListTrialComponentsRequest */ -const de_HyperParameterTrainingJobDefinition = ( - output: any, - context: __SerdeContext -): HyperParameterTrainingJobDefinition => { - return { - AlgorithmSpecification: - output.AlgorithmSpecification != null - ? de_HyperParameterAlgorithmSpecification(output.AlgorithmSpecification, context) - : undefined, - CheckpointConfig: - output.CheckpointConfig != null ? de_CheckpointConfig(output.CheckpointConfig, context) : undefined, - DefinitionName: __expectString(output.DefinitionName), - EnableInterContainerTrafficEncryption: __expectBoolean(output.EnableInterContainerTrafficEncryption), - EnableManagedSpotTraining: __expectBoolean(output.EnableManagedSpotTraining), - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - Environment: - output.Environment != null ? de_HyperParameterTrainingJobEnvironmentMap(output.Environment, context) : undefined, - HyperParameterRanges: - output.HyperParameterRanges != null ? de_ParameterRanges(output.HyperParameterRanges, context) : undefined, - HyperParameterTuningResourceConfig: - output.HyperParameterTuningResourceConfig != null - ? de_HyperParameterTuningResourceConfig(output.HyperParameterTuningResourceConfig, context) - : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - ResourceConfig: output.ResourceConfig != null ? de_ResourceConfig(output.ResourceConfig, context) : undefined, - RetryStrategy: output.RetryStrategy != null ? de_RetryStrategy(output.RetryStrategy, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StaticHyperParameters: - output.StaticHyperParameters != null ? de_HyperParameters(output.StaticHyperParameters, context) : undefined, - StoppingCondition: - output.StoppingCondition != null ? de_StoppingCondition(output.StoppingCondition, context) : undefined, - TuningObjective: - output.TuningObjective != null ? de_HyperParameterTuningJobObjective(output.TuningObjective, context) : undefined, - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HyperParameterTrainingJobDefinitions - */ -const de_HyperParameterTrainingJobDefinitions = ( - output: any, - context: __SerdeContext -): HyperParameterTrainingJobDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HyperParameterTrainingJobDefinition(entry, context); - }); - return retVal; +const se_ListTrialComponentsRequest = (input: ListTrialComponentsRequest, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + ExperimentName: [], + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + SourceArn: [], + TrialName: [], + }); }; /** - * deserializeAws_json1_1HyperParameterTrainingJobEnvironmentMap + * serializeAws_json1_1ListTrialsRequest */ -const de_HyperParameterTrainingJobEnvironmentMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const se_ListTrialsRequest = (input: ListTrialsRequest, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + ExperimentName: [], + MaxResults: [], + NextToken: [], + SortBy: [], + SortOrder: [], + TrialComponentName: [], + }); }; +// se_ListUserProfilesRequest omitted. + +// se_ListWorkforcesRequest omitted. + +// se_ListWorkteamsRequest omitted. + +// se_MemberDefinition omitted. + +// se_MemberDefinitions omitted. + +// se_MetadataProperties omitted. + +// se_MetricDefinition omitted. + +// se_MetricDefinitionList omitted. + +// se_MetricsSource omitted. + +// se_ModelBiasAppSpecification omitted. + +// se_ModelBiasBaselineConfig omitted. + /** - * deserializeAws_json1_1HyperParameterTrainingJobSummaries + * serializeAws_json1_1ModelBiasJobInput */ -const de_HyperParameterTrainingJobSummaries = ( - output: any, - context: __SerdeContext -): HyperParameterTrainingJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HyperParameterTrainingJobSummary(entry, context); - }); - return retVal; +const se_ModelBiasJobInput = (input: ModelBiasJobInput, context: __SerdeContext): any => { + return take(input, { + BatchTransformInput: (_) => se_BatchTransformInput(_, context), + EndpointInput: (_) => se_EndpointInput(_, context), + GroundTruthS3Input: _json, + }); }; +// se_ModelCardExportOutputConfig omitted. + +// se_ModelCardSecurityConfig omitted. + +// se_ModelClientConfig omitted. + +// se_ModelDataQuality omitted. + +// se_ModelDeployConfig omitted. + +// se_ModelExplainabilityAppSpecification omitted. + +// se_ModelExplainabilityBaselineConfig omitted. + /** - * deserializeAws_json1_1HyperParameterTrainingJobSummary + * serializeAws_json1_1ModelExplainabilityJobInput */ -const de_HyperParameterTrainingJobSummary = ( - output: any, - context: __SerdeContext -): HyperParameterTrainingJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - FinalHyperParameterTuningJobObjectiveMetric: - output.FinalHyperParameterTuningJobObjectiveMetric != null - ? de_FinalHyperParameterTuningJobObjectiveMetric(output.FinalHyperParameterTuningJobObjectiveMetric, context) - : undefined, - ObjectiveStatus: __expectString(output.ObjectiveStatus), - TrainingEndTime: - output.TrainingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime))) - : undefined, - TrainingJobArn: __expectString(output.TrainingJobArn), - TrainingJobDefinitionName: __expectString(output.TrainingJobDefinitionName), - TrainingJobName: __expectString(output.TrainingJobName), - TrainingJobStatus: __expectString(output.TrainingJobStatus), - TrainingStartTime: - output.TrainingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime))) - : undefined, - TunedHyperParameters: - output.TunedHyperParameters != null ? de_HyperParameters(output.TunedHyperParameters, context) : undefined, - TuningJobName: __expectString(output.TuningJobName), - } as any; -}; - -/** - * deserializeAws_json1_1HyperParameterTuningInstanceConfig - */ -const de_HyperParameterTuningInstanceConfig = ( - output: any, - context: __SerdeContext -): HyperParameterTuningInstanceConfig => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; +const se_ModelExplainabilityJobInput = (input: ModelExplainabilityJobInput, context: __SerdeContext): any => { + return take(input, { + BatchTransformInput: (_) => se_BatchTransformInput(_, context), + EndpointInput: (_) => se_EndpointInput(_, context), + }); }; +// se_ModelInfrastructureConfig omitted. + +// se_ModelInput omitted. + +// se_ModelLatencyThreshold omitted. + +// se_ModelLatencyThresholds omitted. + +// se_ModelMetadataFilter omitted. + +// se_ModelMetadataFilters omitted. + +// se_ModelMetadataSearchExpression omitted. + +// se_ModelMetrics omitted. + +// se_ModelPackageArnList omitted. + +// se_ModelPackageContainerDefinition omitted. + +// se_ModelPackageContainerDefinitionList omitted. + +// se_ModelPackageValidationProfile omitted. + +// se_ModelPackageValidationProfiles omitted. + +// se_ModelPackageValidationSpecification omitted. + +// se_ModelQuality omitted. + +// se_ModelQualityAppSpecification omitted. + +// se_ModelQualityBaselineConfig omitted. + /** - * deserializeAws_json1_1HyperParameterTuningInstanceConfigs + * serializeAws_json1_1ModelQualityJobInput */ -const de_HyperParameterTuningInstanceConfigs = ( - output: any, - context: __SerdeContext -): HyperParameterTuningInstanceConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HyperParameterTuningInstanceConfig(entry, context); - }); - return retVal; +const se_ModelQualityJobInput = (input: ModelQualityJobInput, context: __SerdeContext): any => { + return take(input, { + BatchTransformInput: (_) => se_BatchTransformInput(_, context), + EndpointInput: (_) => se_EndpointInput(_, context), + GroundTruthS3Input: _json, + }); }; +// se_ModelVariantActionMap omitted. + +// se_ModelVariantConfig omitted. + +// se_ModelVariantConfigList omitted. + +// se_MonitoringAppSpecification omitted. + +// se_MonitoringBaselineConfig omitted. + +// se_MonitoringClusterConfig omitted. + +// se_MonitoringConstraintsResource omitted. + +// se_MonitoringContainerArguments omitted. + +// se_MonitoringCsvDatasetFormat omitted. + +// se_MonitoringDatasetFormat omitted. + +// se_MonitoringEnvironmentMap omitted. + +// se_MonitoringGroundTruthS3Input omitted. + /** - * deserializeAws_json1_1HyperParameterTuningJobCompletionDetails + * serializeAws_json1_1MonitoringInput */ -const de_HyperParameterTuningJobCompletionDetails = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobCompletionDetails => { - return { - ConvergenceDetectedTime: - output.ConvergenceDetectedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConvergenceDetectedTime))) - : undefined, - NumberOfTrainingJobsObjectiveNotImproving: __expectInt32(output.NumberOfTrainingJobsObjectiveNotImproving), - } as any; +const se_MonitoringInput = (input: MonitoringInput, context: __SerdeContext): any => { + return take(input, { + BatchTransformInput: (_) => se_BatchTransformInput(_, context), + EndpointInput: (_) => se_EndpointInput(_, context), + }); }; /** - * deserializeAws_json1_1HyperParameterTuningJobConfig + * serializeAws_json1_1MonitoringInputs */ -const de_HyperParameterTuningJobConfig = (output: any, context: __SerdeContext): HyperParameterTuningJobConfig => { - return { - HyperParameterTuningJobObjective: - output.HyperParameterTuningJobObjective != null - ? de_HyperParameterTuningJobObjective(output.HyperParameterTuningJobObjective, context) - : undefined, - ParameterRanges: output.ParameterRanges != null ? de_ParameterRanges(output.ParameterRanges, context) : undefined, - RandomSeed: __expectInt32(output.RandomSeed), - ResourceLimits: output.ResourceLimits != null ? de_ResourceLimits(output.ResourceLimits, context) : undefined, - Strategy: __expectString(output.Strategy), - StrategyConfig: - output.StrategyConfig != null - ? de_HyperParameterTuningJobStrategyConfig(output.StrategyConfig, context) - : undefined, - TrainingJobEarlyStoppingType: __expectString(output.TrainingJobEarlyStoppingType), - TuningJobCompletionCriteria: - output.TuningJobCompletionCriteria != null - ? de_TuningJobCompletionCriteria(output.TuningJobCompletionCriteria, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HyperParameterTuningJobConsumedResources - */ -const de_HyperParameterTuningJobConsumedResources = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobConsumedResources => { - return { - RuntimeInSeconds: __expectInt32(output.RuntimeInSeconds), - } as any; +const se_MonitoringInputs = (input: MonitoringInput[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_MonitoringInput(entry, context); + }); }; /** - * deserializeAws_json1_1HyperParameterTuningJobObjective + * serializeAws_json1_1MonitoringJobDefinition */ -const de_HyperParameterTuningJobObjective = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobObjective => { - return { - MetricName: __expectString(output.MetricName), - Type: __expectString(output.Type), - } as any; +const se_MonitoringJobDefinition = (input: MonitoringJobDefinition, context: __SerdeContext): any => { + return take(input, { + BaselineConfig: _json, + Environment: _json, + MonitoringAppSpecification: _json, + MonitoringInputs: (_) => se_MonitoringInputs(_, context), + MonitoringOutputConfig: _json, + MonitoringResources: _json, + NetworkConfig: _json, + RoleArn: [], + StoppingCondition: _json, + }); }; +// se_MonitoringJsonDatasetFormat omitted. + +// se_MonitoringNetworkConfig omitted. + +// se_MonitoringOutput omitted. + +// se_MonitoringOutputConfig omitted. + +// se_MonitoringOutputs omitted. + +// se_MonitoringParquetDatasetFormat omitted. + +// se_MonitoringResources omitted. + +// se_MonitoringS3Output omitted. + /** - * deserializeAws_json1_1HyperParameterTuningJobObjectives + * serializeAws_json1_1MonitoringScheduleConfig */ -const de_HyperParameterTuningJobObjectives = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobObjective[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HyperParameterTuningJobObjective(entry, context); - }); - return retVal; +const se_MonitoringScheduleConfig = (input: MonitoringScheduleConfig, context: __SerdeContext): any => { + return take(input, { + MonitoringJobDefinition: (_) => se_MonitoringJobDefinition(_, context), + MonitoringJobDefinitionName: [], + MonitoringType: [], + ScheduleConfig: _json, + }); }; +// se_MonitoringStatisticsResource omitted. + +// se_MonitoringStoppingCondition omitted. + +// se_MultiModelConfig omitted. + +// se_NeoVpcConfig omitted. + +// se_NeoVpcSecurityGroupIds omitted. + +// se_NeoVpcSubnets omitted. + +// se_NestedFilters omitted. + +// se_NestedFiltersList omitted. + +// se_NetworkConfig omitted. + +// se_NotebookInstanceAcceleratorTypes omitted. + +// se_NotebookInstanceLifecycleConfigList omitted. + +// se_NotebookInstanceLifecycleHook omitted. + +// se_NotificationConfiguration omitted. + +// se_OfflineStoreConfig omitted. + +// se_OidcConfig omitted. + +// se_OidcMemberDefinition omitted. + +// se_OnlineStoreConfig omitted. + +// se_OnlineStoreSecurityConfig omitted. + +// se_OutputConfig omitted. + +// se_OutputDataConfig omitted. + +// se_OutputParameter omitted. + +// se_OutputParameterList omitted. + +// se_ParallelismConfiguration omitted. + +// se_Parameter omitted. + +// se_ParameterList omitted. + +// se_ParameterRange omitted. + +// se_ParameterRanges omitted. + +// se_ParameterValues omitted. + +// se_ParentHyperParameterTuningJob omitted. + +// se_ParentHyperParameterTuningJobs omitted. + +// se_Phase omitted. + +// se_Phases omitted. + +// se_PipelineDefinitionS3Location omitted. + +// se_ProcessingClusterConfig omitted. + +// se_ProcessingEnvironmentMap omitted. + +// se_ProcessingFeatureStoreOutput omitted. + +// se_ProcessingInput omitted. + +// se_ProcessingInputs omitted. + +// se_ProcessingOutput omitted. + +// se_ProcessingOutputConfig omitted. + +// se_ProcessingOutputs omitted. + +// se_ProcessingResources omitted. + +// se_ProcessingS3Input omitted. + +// se_ProcessingS3Output omitted. + +// se_ProcessingStoppingCondition omitted. + /** - * deserializeAws_json1_1HyperParameterTuningJobSearchEntity - */ -const de_HyperParameterTuningJobSearchEntity = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobSearchEntity => { - return { - BestTrainingJob: - output.BestTrainingJob != null ? de_HyperParameterTrainingJobSummary(output.BestTrainingJob, context) : undefined, - ConsumedResources: - output.ConsumedResources != null - ? de_HyperParameterTuningJobConsumedResources(output.ConsumedResources, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - HyperParameterTuningEndTime: - output.HyperParameterTuningEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.HyperParameterTuningEndTime))) - : undefined, - HyperParameterTuningJobArn: __expectString(output.HyperParameterTuningJobArn), - HyperParameterTuningJobConfig: - output.HyperParameterTuningJobConfig != null - ? de_HyperParameterTuningJobConfig(output.HyperParameterTuningJobConfig, context) - : undefined, - HyperParameterTuningJobName: __expectString(output.HyperParameterTuningJobName), - HyperParameterTuningJobStatus: __expectString(output.HyperParameterTuningJobStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ObjectiveStatusCounters: - output.ObjectiveStatusCounters != null - ? de_ObjectiveStatusCounters(output.ObjectiveStatusCounters, context) - : undefined, - OverallBestTrainingJob: - output.OverallBestTrainingJob != null - ? de_HyperParameterTrainingJobSummary(output.OverallBestTrainingJob, context) - : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TrainingJobDefinition: - output.TrainingJobDefinition != null - ? de_HyperParameterTrainingJobDefinition(output.TrainingJobDefinition, context) - : undefined, - TrainingJobDefinitions: - output.TrainingJobDefinitions != null - ? de_HyperParameterTrainingJobDefinitions(output.TrainingJobDefinitions, context) - : undefined, - TrainingJobStatusCounters: - output.TrainingJobStatusCounters != null - ? de_TrainingJobStatusCounters(output.TrainingJobStatusCounters, context) - : undefined, - TuningJobCompletionDetails: - output.TuningJobCompletionDetails != null - ? de_HyperParameterTuningJobCompletionDetails(output.TuningJobCompletionDetails, context) - : undefined, - WarmStartConfig: - output.WarmStartConfig != null - ? de_HyperParameterTuningJobWarmStartConfig(output.WarmStartConfig, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HyperParameterTuningJobStrategyConfig - */ -const de_HyperParameterTuningJobStrategyConfig = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobStrategyConfig => { - return { - HyperbandStrategyConfig: - output.HyperbandStrategyConfig != null - ? de_HyperbandStrategyConfig(output.HyperbandStrategyConfig, context) - : undefined, - } as any; + * serializeAws_json1_1ProductionVariant + */ +const se_ProductionVariant = (input: ProductionVariant, context: __SerdeContext): any => { + return take(input, { + AcceleratorType: [], + ContainerStartupHealthCheckTimeoutInSeconds: [], + CoreDumpConfig: _json, + EnableSSMAccess: [], + InitialInstanceCount: [], + InitialVariantWeight: __serializeFloat, + InstanceType: [], + ModelDataDownloadTimeoutInSeconds: [], + ModelName: [], + ServerlessConfig: _json, + VariantName: [], + VolumeSizeInGB: [], + }); }; +// se_ProductionVariantCoreDumpConfig omitted. + /** - * deserializeAws_json1_1HyperParameterTuningJobSummaries + * serializeAws_json1_1ProductionVariantList */ -const de_HyperParameterTuningJobSummaries = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobSummary[] => { - const retVal = (output || []) +const se_ProductionVariantList = (input: ProductionVariant[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HyperParameterTuningJobSummary(entry, context); + .map((entry) => { + return se_ProductionVariant(entry, context); }); - return retVal; }; +// se_ProductionVariantServerlessConfig omitted. + +// se_ProfilerConfig omitted. + +// se_ProfilerConfigForUpdate omitted. + +// se_ProfilerRuleConfiguration omitted. + +// se_ProfilerRuleConfigurations omitted. + +// se_ProfilingParameters omitted. + +// se_PropertyNameQuery omitted. + +// se_ProvisioningParameter omitted. + +// se_ProvisioningParameters omitted. + +// se_PublicWorkforceTaskPrice omitted. + +// se_PutModelPackageGroupPolicyInput omitted. + /** - * deserializeAws_json1_1HyperParameterTuningJobSummary + * serializeAws_json1_1QueryFilters */ -const de_HyperParameterTuningJobSummary = (output: any, context: __SerdeContext): HyperParameterTuningJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - HyperParameterTuningEndTime: - output.HyperParameterTuningEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.HyperParameterTuningEndTime))) - : undefined, - HyperParameterTuningJobArn: __expectString(output.HyperParameterTuningJobArn), - HyperParameterTuningJobName: __expectString(output.HyperParameterTuningJobName), - HyperParameterTuningJobStatus: __expectString(output.HyperParameterTuningJobStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ObjectiveStatusCounters: - output.ObjectiveStatusCounters != null - ? de_ObjectiveStatusCounters(output.ObjectiveStatusCounters, context) - : undefined, - ResourceLimits: output.ResourceLimits != null ? de_ResourceLimits(output.ResourceLimits, context) : undefined, - Strategy: __expectString(output.Strategy), - TrainingJobStatusCounters: - output.TrainingJobStatusCounters != null - ? de_TrainingJobStatusCounters(output.TrainingJobStatusCounters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HyperParameterTuningJobWarmStartConfig - */ -const de_HyperParameterTuningJobWarmStartConfig = ( - output: any, - context: __SerdeContext -): HyperParameterTuningJobWarmStartConfig => { - return { - ParentHyperParameterTuningJobs: - output.ParentHyperParameterTuningJobs != null - ? de_ParentHyperParameterTuningJobs(output.ParentHyperParameterTuningJobs, context) - : undefined, - WarmStartType: __expectString(output.WarmStartType), - } as any; +const se_QueryFilters = (input: QueryFilters, context: __SerdeContext): any => { + return take(input, { + CreatedAfter: (_) => Math.round(_.getTime() / 1000), + CreatedBefore: (_) => Math.round(_.getTime() / 1000), + LineageTypes: _json, + ModifiedAfter: (_) => Math.round(_.getTime() / 1000), + ModifiedBefore: (_) => Math.round(_.getTime() / 1000), + Properties: _json, + Types: _json, + }); }; /** - * deserializeAws_json1_1HyperParameterTuningResourceConfig + * serializeAws_json1_1QueryLineageRequest */ -const de_HyperParameterTuningResourceConfig = ( - output: any, - context: __SerdeContext -): HyperParameterTuningResourceConfig => { - return { - AllocationStrategy: __expectString(output.AllocationStrategy), - InstanceConfigs: - output.InstanceConfigs != null - ? de_HyperParameterTuningInstanceConfigs(output.InstanceConfigs, context) - : undefined, - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; +const se_QueryLineageRequest = (input: QueryLineageRequest, context: __SerdeContext): any => { + return take(input, { + Direction: [], + Filters: (_) => se_QueryFilters(_, context), + IncludeEdges: [], + MaxDepth: [], + MaxResults: [], + NextToken: [], + StartArns: _json, + }); }; +// se_QueryLineageStartArns omitted. + +// se_QueryLineageTypes omitted. + +// se_QueryProperties omitted. + +// se_QueryTypes omitted. + +// se_RealTimeInferenceConfig omitted. + +// se_RealtimeInferenceInstanceTypes omitted. + +// se_RecommendationJobCompiledOutputConfig omitted. + +// se_RecommendationJobContainerConfig omitted. + +// se_RecommendationJobInputConfig omitted. + +// se_RecommendationJobOutputConfig omitted. + +// se_RecommendationJobPayloadConfig omitted. + +// se_RecommendationJobResourceLimit omitted. + +// se_RecommendationJobStoppingConditions omitted. + +// se_RecommendationJobSupportedContentTypes omitted. + +// se_RecommendationJobSupportedInstanceTypes omitted. + +// se_RecommendationJobVpcConfig omitted. + +// se_RecommendationJobVpcSecurityGroupIds omitted. + +// se_RecommendationJobVpcSubnets omitted. + +// se_RedshiftDatasetDefinition omitted. + +// se_RegisterDevicesRequest omitted. + +// se_RenderableTask omitted. + +// se_RenderUiTemplateRequest omitted. + +// se_RepositoryAuthConfig omitted. + +// se_ResourceConfig omitted. + +// se_ResourceConfigForUpdate omitted. + +// se_ResourceLimits omitted. + +// se_ResourceSpec omitted. + +// se_ResponseMIMETypes omitted. + +// se_RetentionPolicy omitted. + /** - * deserializeAws_json1_1IamIdentity + * serializeAws_json1_1RetryPipelineExecutionRequest */ -const de_IamIdentity = (output: any, context: __SerdeContext): IamIdentity => { - return { - Arn: __expectString(output.Arn), - PrincipalId: __expectString(output.PrincipalId), - SourceIdentity: __expectString(output.SourceIdentity), - } as any; +const se_RetryPipelineExecutionRequest = (input: RetryPipelineExecutionRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ParallelismConfiguration: _json, + PipelineExecutionArn: [], + }); }; +// se_RetryStrategy omitted. + +// se_RSessionAppSettings omitted. + +// se_RStudioServerProAppSettings omitted. + +// se_RStudioServerProDomainSettings omitted. + +// se_RStudioServerProDomainSettingsForUpdate omitted. + +// se_RuleParameters omitted. + +// se_S3DataSource omitted. + +// se_S3StorageConfig omitted. + +// se_SageMakerImageVersionAliases omitted. + +// se_ScheduleConfig omitted. + /** - * deserializeAws_json1_1Image + * serializeAws_json1_1SearchExpression */ -const de_Image = (output: any, context: __SerdeContext): Image => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - FailureReason: __expectString(output.FailureReason), - ImageArn: __expectString(output.ImageArn), - ImageName: __expectString(output.ImageName), - ImageStatus: __expectString(output.ImageStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ImageClassificationJobConfig - */ -const de_ImageClassificationJobConfig = (output: any, context: __SerdeContext): ImageClassificationJobConfig => { - return { - CompletionCriteria: - output.CompletionCriteria != null - ? de_AutoMLJobCompletionCriteria(output.CompletionCriteria, context) - : undefined, - } as any; +const se_SearchExpression = (input: SearchExpression, context: __SerdeContext): any => { + return take(input, { + Filters: _json, + NestedFilters: _json, + Operator: [], + SubExpressions: (_) => se_SearchExpressionList(_, context), + }); }; /** - * deserializeAws_json1_1ImageConfig + * serializeAws_json1_1SearchExpressionList */ -const de_ImageConfig = (output: any, context: __SerdeContext): ImageConfig => { - return { - RepositoryAccessMode: __expectString(output.RepositoryAccessMode), - RepositoryAuthConfig: - output.RepositoryAuthConfig != null ? de_RepositoryAuthConfig(output.RepositoryAuthConfig, context) : undefined, - } as any; +const se_SearchExpressionList = (input: SearchExpression[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_SearchExpression(entry, context); + }); }; /** - * deserializeAws_json1_1Images + * serializeAws_json1_1SearchRequest */ -const de_Images = (output: any, context: __SerdeContext): Image[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Image(entry, context); - }); - return retVal; +const se_SearchRequest = (input: SearchRequest, context: __SerdeContext): any => { + return take(input, { + MaxResults: [], + NextToken: [], + Resource: [], + SearchExpression: (_) => se_SearchExpression(_, context), + SortBy: [], + SortOrder: [], + }); }; +// se_SecurityGroupIds omitted. + /** - * deserializeAws_json1_1ImageVersion + * serializeAws_json1_1SendPipelineExecutionStepFailureRequest */ -const de_ImageVersion = (output: any, context: __SerdeContext): ImageVersion => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - ImageArn: __expectString(output.ImageArn), - ImageVersionArn: __expectString(output.ImageVersionArn), - ImageVersionStatus: __expectString(output.ImageVersionStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Version: __expectInt32(output.Version), - } as any; +const se_SendPipelineExecutionStepFailureRequest = ( + input: SendPipelineExecutionStepFailureRequest, + context: __SerdeContext +): any => { + return take(input, { + CallbackToken: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + FailureReason: [], + }); }; /** - * deserializeAws_json1_1ImageVersions + * serializeAws_json1_1SendPipelineExecutionStepSuccessRequest */ -const de_ImageVersions = (output: any, context: __SerdeContext): ImageVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImageVersion(entry, context); - }); - return retVal; +const se_SendPipelineExecutionStepSuccessRequest = ( + input: SendPipelineExecutionStepSuccessRequest, + context: __SerdeContext +): any => { + return take(input, { + CallbackToken: [], + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + OutputParameters: _json, + }); }; +// se_ServiceCatalogProvisioningDetails omitted. + +// se_ServiceCatalogProvisioningUpdateDetails omitted. + +// se_ShadowModeConfig omitted. + +// se_ShadowModelVariantConfig omitted. + +// se_ShadowModelVariantConfigList omitted. + +// se_SharingSettings omitted. + +// se_ShuffleConfig omitted. + +// se_SourceAlgorithm omitted. + +// se_SourceAlgorithmList omitted. + +// se_SourceAlgorithmSpecification omitted. + +// se_SourceIpConfig omitted. + +// se_SpaceSettings omitted. + +// se_StartEdgeDeploymentStageRequest omitted. + +// se_StartInferenceExperimentRequest omitted. + +// se_StartMonitoringScheduleRequest omitted. + +// se_StartNotebookInstanceInput omitted. + /** - * deserializeAws_json1_1ImportHubContentResponse + * serializeAws_json1_1StartPipelineExecutionRequest */ -const de_ImportHubContentResponse = (output: any, context: __SerdeContext): ImportHubContentResponse => { - return { - HubArn: __expectString(output.HubArn), - HubContentArn: __expectString(output.HubContentArn), - } as any; +const se_StartPipelineExecutionRequest = (input: StartPipelineExecutionRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + ParallelismConfiguration: _json, + PipelineExecutionDescription: [], + PipelineExecutionDisplayName: [], + PipelineName: [], + PipelineParameters: _json, + }); }; +// se_StopAutoMLJobRequest omitted. + +// se_StopCompilationJobRequest omitted. + +// se_StopEdgeDeploymentStageRequest omitted. + +// se_StopEdgePackagingJobRequest omitted. + +// se_StopHyperParameterTuningJobRequest omitted. + +// se_StopInferenceExperimentRequest omitted. + +// se_StopInferenceRecommendationsJobRequest omitted. + +// se_StopLabelingJobRequest omitted. + +// se_StopMonitoringScheduleRequest omitted. + +// se_StopNotebookInstanceInput omitted. + +// se_StoppingCondition omitted. + /** - * deserializeAws_json1_1InferenceExecutionConfig + * serializeAws_json1_1StopPipelineExecutionRequest */ -const de_InferenceExecutionConfig = (output: any, context: __SerdeContext): InferenceExecutionConfig => { - return { - Mode: __expectString(output.Mode), - } as any; +const se_StopPipelineExecutionRequest = (input: StopPipelineExecutionRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + PipelineExecutionArn: [], + }); }; +// se_StopProcessingJobRequest omitted. + +// se_StopTrainingJobRequest omitted. + +// se_StopTransformJobRequest omitted. + +// se_Subnets omitted. + +// se_SuggestionQuery omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TargetPlatform omitted. + +// se_TaskKeywords omitted. + +// se_TensorBoardAppSettings omitted. + +// se_TensorBoardOutputConfig omitted. + +// se_TextClassificationJobConfig omitted. + +// se_TimeSeriesForecastingSettings omitted. + +// se_TrafficPattern omitted. + +// se_TrafficRoutingConfig omitted. + +// se_TrainingContainerArguments omitted. + +// se_TrainingContainerEntrypoint omitted. + +// se_TrainingEnvironmentMap omitted. + +// se_TrainingImageConfig omitted. + +// se_TrainingInstanceTypes omitted. + +// se_TrainingJobDefinition omitted. + +// se_TrainingRepositoryAuthConfig omitted. + +// se_TrainingSpecification omitted. + +// se_TransformDataSource omitted. + +// se_TransformEnvironmentMap omitted. + +// se_TransformInput omitted. + +// se_TransformInstanceTypes omitted. + +// se_TransformJobDefinition omitted. + +// se_TransformOutput omitted. + +// se_TransformResources omitted. + +// se_TransformS3DataSource omitted. + +// se_TrialComponentArtifact omitted. + +// se_TrialComponentArtifacts omitted. + /** - * deserializeAws_json1_1InferenceExperimentDataStorageConfig + * serializeAws_json1_1TrialComponentParameters */ -const de_InferenceExperimentDataStorageConfig = ( - output: any, +const se_TrialComponentParameters = ( + input: Record, context: __SerdeContext -): InferenceExperimentDataStorageConfig => { - return { - ContentType: output.ContentType != null ? de_CaptureContentTypeHeader(output.ContentType, context) : undefined, - Destination: __expectString(output.Destination), - KmsKey: __expectString(output.KmsKey), - } as any; +): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_TrialComponentParameterValue(value, context); + return acc; + }, {}); }; /** - * deserializeAws_json1_1InferenceExperimentList + * serializeAws_json1_1TrialComponentParameterValue */ -const de_InferenceExperimentList = (output: any, context: __SerdeContext): InferenceExperimentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceExperimentSummary(entry, context); - }); - return retVal; +const se_TrialComponentParameterValue = (input: TrialComponentParameterValue, context: __SerdeContext): any => { + return TrialComponentParameterValue.visit(input, { + NumberValue: (value) => ({ NumberValue: __serializeFloat(value) }), + StringValue: (value) => ({ StringValue: value }), + _: (name, value) => ({ name: value } as any), + }); +}; + +// se_TrialComponentStatus omitted. + +/** + * serializeAws_json1_1TuningJobCompletionCriteria + */ +const se_TuningJobCompletionCriteria = (input: TuningJobCompletionCriteria, context: __SerdeContext): any => { + return take(input, { + BestObjectiveNotImproving: _json, + ConvergenceDetected: _json, + TargetObjectiveMetricValue: __serializeFloat, + }); }; -/** - * deserializeAws_json1_1InferenceExperimentSchedule - */ -const de_InferenceExperimentSchedule = (output: any, context: __SerdeContext): InferenceExperimentSchedule => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; -}; +// se_UiConfig omitted. + +// se_UiTemplate omitted. + +// se_UpdateActionRequest omitted. + +// se_UpdateAppImageConfigRequest omitted. + +// se_UpdateArtifactRequest omitted. + +// se_UpdateCodeRepositoryInput omitted. + +// se_UpdateContextRequest omitted. + +// se_UpdateDeviceFleetRequest omitted. + +// se_UpdateDevicesRequest omitted. + +// se_UpdateDomainRequest omitted. + +// se_UpdateEndpointInput omitted. /** - * deserializeAws_json1_1InferenceExperimentSummary + * serializeAws_json1_1UpdateEndpointWeightsAndCapacitiesInput */ -const de_InferenceExperimentSummary = (output: any, context: __SerdeContext): InferenceExperimentSummary => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - RoleArn: __expectString(output.RoleArn), - Schedule: output.Schedule != null ? de_InferenceExperimentSchedule(output.Schedule, context) : undefined, - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1InferenceMetrics - */ -const de_InferenceMetrics = (output: any, context: __SerdeContext): InferenceMetrics => { - return { - MaxInvocations: __expectInt32(output.MaxInvocations), - ModelLatency: __expectInt32(output.ModelLatency), - } as any; +const se_UpdateEndpointWeightsAndCapacitiesInput = ( + input: UpdateEndpointWeightsAndCapacitiesInput, + context: __SerdeContext +): any => { + return take(input, { + DesiredWeightsAndCapacities: (_) => se_DesiredWeightAndCapacityList(_, context), + EndpointName: [], + }); }; +// se_UpdateExperimentRequest omitted. + +// se_UpdateFeatureGroupRequest omitted. + +// se_UpdateFeatureMetadataRequest omitted. + +// se_UpdateHubRequest omitted. + +// se_UpdateImageRequest omitted. + +// se_UpdateImageVersionRequest omitted. + /** - * deserializeAws_json1_1InferenceRecommendation + * serializeAws_json1_1UpdateInferenceExperimentRequest */ -const de_InferenceRecommendation = (output: any, context: __SerdeContext): InferenceRecommendation => { - return { - EndpointConfiguration: - output.EndpointConfiguration != null - ? de_EndpointOutputConfiguration(output.EndpointConfiguration, context) - : undefined, - Metrics: output.Metrics != null ? de_RecommendationMetrics(output.Metrics, context) : undefined, - ModelConfiguration: - output.ModelConfiguration != null ? de_ModelConfiguration(output.ModelConfiguration, context) : undefined, - RecommendationId: __expectString(output.RecommendationId), - } as any; +const se_UpdateInferenceExperimentRequest = (input: UpdateInferenceExperimentRequest, context: __SerdeContext): any => { + return take(input, { + DataStorageConfig: _json, + Description: [], + ModelVariants: _json, + Name: [], + Schedule: (_) => se_InferenceExperimentSchedule(_, context), + ShadowModeConfig: _json, + }); }; +// se_UpdateModelCardRequest omitted. + +// se_UpdateModelPackageInput omitted. + +// se_UpdateMonitoringAlertRequest omitted. + /** - * deserializeAws_json1_1InferenceRecommendations + * serializeAws_json1_1UpdateMonitoringScheduleRequest */ -const de_InferenceRecommendations = (output: any, context: __SerdeContext): InferenceRecommendation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceRecommendation(entry, context); - }); - return retVal; +const se_UpdateMonitoringScheduleRequest = (input: UpdateMonitoringScheduleRequest, context: __SerdeContext): any => { + return take(input, { + MonitoringScheduleConfig: (_) => se_MonitoringScheduleConfig(_, context), + MonitoringScheduleName: [], + }); }; +// se_UpdateNotebookInstanceInput omitted. + +// se_UpdateNotebookInstanceLifecycleConfigInput omitted. + +// se_UpdatePipelineExecutionRequest omitted. + +// se_UpdatePipelineRequest omitted. + +// se_UpdateProjectInput omitted. + +// se_UpdateSpaceRequest omitted. + +// se_UpdateTrainingJobRequest omitted. + /** - * deserializeAws_json1_1InferenceRecommendationsJob + * serializeAws_json1_1UpdateTrialComponentRequest */ -const de_InferenceRecommendationsJob = (output: any, context: __SerdeContext): InferenceRecommendationsJob => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - JobArn: __expectString(output.JobArn), - JobDescription: __expectString(output.JobDescription), - JobName: __expectString(output.JobName), - JobType: __expectString(output.JobType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - } as any; +const se_UpdateTrialComponentRequest = (input: UpdateTrialComponentRequest, context: __SerdeContext): any => { + return take(input, { + DisplayName: [], + EndTime: (_) => Math.round(_.getTime() / 1000), + InputArtifacts: _json, + InputArtifactsToRemove: _json, + OutputArtifacts: _json, + OutputArtifactsToRemove: _json, + Parameters: (_) => se_TrialComponentParameters(_, context), + ParametersToRemove: _json, + StartTime: (_) => Math.round(_.getTime() / 1000), + Status: _json, + TrialComponentName: [], + }); }; +// se_UpdateTrialRequest omitted. + +// se_UpdateUserProfileRequest omitted. + +// se_UpdateWorkforceRequest omitted. + +// se_UpdateWorkteamRequest omitted. + +// se_USD omitted. + +// se_UserSettings omitted. + +// se_VariantProperty omitted. + +// se_VariantPropertyList omitted. + +// se_VpcConfig omitted. + +// se_VpcSecurityGroupIds omitted. + +// se_WorkforceSecurityGroupIds omitted. + +// se_WorkforceSubnets omitted. + +// se_WorkforceVpcConfigRequest omitted. + +// de_ActionSource omitted. + /** - * deserializeAws_json1_1InferenceRecommendationsJobs + * deserializeAws_json1_1ActionSummaries */ -const de_InferenceRecommendationsJobs = (output: any, context: __SerdeContext): InferenceRecommendationsJob[] => { +const de_ActionSummaries = (output: any, context: __SerdeContext): ActionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceRecommendationsJob(entry, context); + return de_ActionSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1InferenceRecommendationsJobStep + * deserializeAws_json1_1ActionSummary */ -const de_InferenceRecommendationsJobStep = (output: any, context: __SerdeContext): InferenceRecommendationsJobStep => { - return { - InferenceBenchmark: - output.InferenceBenchmark != null - ? de_RecommendationJobInferenceBenchmark(output.InferenceBenchmark, context) - : undefined, - JobName: __expectString(output.JobName), - Status: __expectString(output.Status), - StepType: __expectString(output.StepType), - } as any; +const de_ActionSummary = (output: any, context: __SerdeContext): ActionSummary => { + return take(output, { + ActionArn: __expectString, + ActionName: __expectString, + ActionType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Source: _json, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InferenceRecommendationsJobSteps - */ -const de_InferenceRecommendationsJobSteps = ( - output: any, - context: __SerdeContext -): InferenceRecommendationsJobStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InferenceRecommendationsJobStep(entry, context); - }); - return retVal; -}; +// de_AddAssociationResponse omitted. + +// de_AdditionalCodeRepositoryNamesOrUrls omitted. + +// de_AdditionalInferenceSpecificationDefinition omitted. + +// de_AdditionalInferenceSpecifications omitted. + +// de_AddTagsOutput omitted. + +// de_AgentVersion omitted. + +// de_AgentVersions omitted. + +// de_Alarm omitted. + +// de_AlarmList omitted. + +// de_AlgorithmSpecification omitted. + +// de_AlgorithmStatusDetails omitted. + +// de_AlgorithmStatusItem omitted. + +// de_AlgorithmStatusItemList omitted. /** - * deserializeAws_json1_1InferenceSpecification + * deserializeAws_json1_1AlgorithmSummary */ -const de_InferenceSpecification = (output: any, context: __SerdeContext): InferenceSpecification => { - return { - Containers: - output.Containers != null ? de_ModelPackageContainerDefinitionList(output.Containers, context) : undefined, - SupportedContentTypes: - output.SupportedContentTypes != null ? de_ContentTypes(output.SupportedContentTypes, context) : undefined, - SupportedRealtimeInferenceInstanceTypes: - output.SupportedRealtimeInferenceInstanceTypes != null - ? de_RealtimeInferenceInstanceTypes(output.SupportedRealtimeInferenceInstanceTypes, context) - : undefined, - SupportedResponseMIMETypes: - output.SupportedResponseMIMETypes != null - ? de_ResponseMIMETypes(output.SupportedResponseMIMETypes, context) - : undefined, - SupportedTransformInstanceTypes: - output.SupportedTransformInstanceTypes != null - ? de_TransformInstanceTypes(output.SupportedTransformInstanceTypes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InputConfig - */ -const de_InputConfig = (output: any, context: __SerdeContext): InputConfig => { - return { - DataInputConfig: __expectString(output.DataInputConfig), - Framework: __expectString(output.Framework), - FrameworkVersion: __expectString(output.FrameworkVersion), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_AlgorithmSummary = (output: any, context: __SerdeContext): AlgorithmSummary => { + return take(output, { + AlgorithmArn: __expectString, + AlgorithmDescription: __expectString, + AlgorithmName: __expectString, + AlgorithmStatus: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1InputDataConfig + * deserializeAws_json1_1AlgorithmSummaryList */ -const de_InputDataConfig = (output: any, context: __SerdeContext): Channel[] => { +const de_AlgorithmSummaryList = (output: any, context: __SerdeContext): AlgorithmSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Channel(entry, context); + return de_AlgorithmSummary(entry, context); }); return retVal; }; +// de_AlgorithmValidationProfile omitted. + +// de_AlgorithmValidationProfiles omitted. + +// de_AlgorithmValidationSpecification omitted. + +// de_AnnotationConsolidationConfig omitted. + /** - * deserializeAws_json1_1InputModes + * deserializeAws_json1_1AppDetails */ -const de_InputModes = (output: any, context: __SerdeContext): (TrainingInputMode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_AppDetails = (output: any, context: __SerdeContext): AppDetails => { + return take(output, { + AppName: __expectString, + AppType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + SpaceName: __expectString, + Status: __expectString, + UserProfileName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1InstanceGroup + * deserializeAws_json1_1AppImageConfigDetails */ -const de_InstanceGroup = (output: any, context: __SerdeContext): InstanceGroup => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceGroupName: __expectString(output.InstanceGroupName), - InstanceType: __expectString(output.InstanceType), - } as any; +const de_AppImageConfigDetails = (output: any, context: __SerdeContext): AppImageConfigDetails => { + return take(output, { + AppImageConfigArn: __expectString, + AppImageConfigName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KernelGatewayImageConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1InstanceGroupNames + * deserializeAws_json1_1AppImageConfigList */ -const de_InstanceGroupNames = (output: any, context: __SerdeContext): string[] => { +const de_AppImageConfigList = (output: any, context: __SerdeContext): AppImageConfigDetails[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AppImageConfigDetails(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1InstanceGroups + * deserializeAws_json1_1AppList */ -const de_InstanceGroups = (output: any, context: __SerdeContext): InstanceGroup[] => { +const de_AppList = (output: any, context: __SerdeContext): AppDetails[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceGroup(entry, context); + return de_AppDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1InstanceMetadataServiceConfiguration - */ -const de_InstanceMetadataServiceConfiguration = ( - output: any, - context: __SerdeContext -): InstanceMetadataServiceConfiguration => { - return { - MinimumInstanceMetadataServiceVersion: __expectString(output.MinimumInstanceMetadataServiceVersion), - } as any; -}; +// de_AppSpecification omitted. -/** - * deserializeAws_json1_1IntegerParameterRange - */ -const de_IntegerParameterRange = (output: any, context: __SerdeContext): IntegerParameterRange => { - return { - MaxValue: __expectString(output.MaxValue), - MinValue: __expectString(output.MinValue), - Name: __expectString(output.Name), - ScalingType: __expectString(output.ScalingType), - } as any; -}; +// de_ArtifactSource omitted. + +// de_ArtifactSourceType omitted. + +// de_ArtifactSourceTypes omitted. /** - * deserializeAws_json1_1IntegerParameterRanges + * deserializeAws_json1_1ArtifactSummaries */ -const de_IntegerParameterRanges = (output: any, context: __SerdeContext): IntegerParameterRange[] => { +const de_ArtifactSummaries = (output: any, context: __SerdeContext): ArtifactSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IntegerParameterRange(entry, context); + return de_ArtifactSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1IntegerParameterRangeSpecification + * deserializeAws_json1_1ArtifactSummary */ -const de_IntegerParameterRangeSpecification = ( - output: any, - context: __SerdeContext -): IntegerParameterRangeSpecification => { - return { - MaxValue: __expectString(output.MaxValue), - MinValue: __expectString(output.MinValue), - } as any; +const de_ArtifactSummary = (output: any, context: __SerdeContext): ArtifactSummary => { + return take(output, { + ArtifactArn: __expectString, + ArtifactName: __expectString, + ArtifactType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Source: _json, + }) as any; }; +// de_AssociateTrialComponentResponse omitted. + /** - * deserializeAws_json1_1JsonContentTypes + * deserializeAws_json1_1AssociationSummaries */ -const de_JsonContentTypes = (output: any, context: __SerdeContext): string[] => { +const de_AssociationSummaries = (output: any, context: __SerdeContext): AssociationSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AssociationSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1JupyterServerAppSettings + * deserializeAws_json1_1AssociationSummary */ -const de_JupyterServerAppSettings = (output: any, context: __SerdeContext): JupyterServerAppSettings => { - return { - CodeRepositories: - output.CodeRepositories != null ? de_CodeRepositories(output.CodeRepositories, context) : undefined, - DefaultResourceSpec: - output.DefaultResourceSpec != null ? de_ResourceSpec(output.DefaultResourceSpec, context) : undefined, - LifecycleConfigArns: - output.LifecycleConfigArns != null ? de_LifecycleConfigArns(output.LifecycleConfigArns, context) : undefined, - } as any; +const de_AssociationSummary = (output: any, context: __SerdeContext): AssociationSummary => { + return take(output, { + AssociationType: __expectString, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DestinationArn: __expectString, + DestinationName: __expectString, + DestinationType: __expectString, + SourceArn: __expectString, + SourceName: __expectString, + SourceType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1KernelGatewayAppSettings - */ -const de_KernelGatewayAppSettings = (output: any, context: __SerdeContext): KernelGatewayAppSettings => { - return { - CustomImages: output.CustomImages != null ? de_CustomImages(output.CustomImages, context) : undefined, - DefaultResourceSpec: - output.DefaultResourceSpec != null ? de_ResourceSpec(output.DefaultResourceSpec, context) : undefined, - LifecycleConfigArns: - output.LifecycleConfigArns != null ? de_LifecycleConfigArns(output.LifecycleConfigArns, context) : undefined, - } as any; -}; +// de_AsyncInferenceClientConfig omitted. -/** - * deserializeAws_json1_1KernelGatewayImageConfig - */ -const de_KernelGatewayImageConfig = (output: any, context: __SerdeContext): KernelGatewayImageConfig => { - return { - FileSystemConfig: - output.FileSystemConfig != null ? de_FileSystemConfig(output.FileSystemConfig, context) : undefined, - KernelSpecs: output.KernelSpecs != null ? de_KernelSpecs(output.KernelSpecs, context) : undefined, - } as any; -}; +// de_AsyncInferenceConfig omitted. + +// de_AsyncInferenceNotificationConfig omitted. + +// de_AsyncInferenceOutputConfig omitted. + +// de_AsyncNotificationTopicTypeList omitted. + +// de_AthenaDatasetDefinition omitted. + +// de_AttributeNames omitted. + +// de_AutoMLAlgorithmConfig omitted. + +// de_AutoMLAlgorithms omitted. + +// de_AutoMLAlgorithmsConfig omitted. /** - * deserializeAws_json1_1KernelSpec + * deserializeAws_json1_1AutoMLCandidate */ -const de_KernelSpec = (output: any, context: __SerdeContext): KernelSpec => { - return { - DisplayName: __expectString(output.DisplayName), - Name: __expectString(output.Name), - } as any; +const de_AutoMLCandidate = (output: any, context: __SerdeContext): AutoMLCandidate => { + return take(output, { + CandidateName: __expectString, + CandidateProperties: (_: any) => de_CandidateProperties(_, context), + CandidateStatus: __expectString, + CandidateSteps: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + FinalAutoMLJobObjectiveMetric: (_: any) => de_FinalAutoMLJobObjectiveMetric(_, context), + InferenceContainerDefinitions: _json, + InferenceContainers: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectiveStatus: __expectString, + }) as any; }; +// de_AutoMLCandidateGenerationConfig omitted. + /** - * deserializeAws_json1_1KernelSpecs + * deserializeAws_json1_1AutoMLCandidates */ -const de_KernelSpecs = (output: any, context: __SerdeContext): KernelSpec[] => { +const de_AutoMLCandidates = (output: any, context: __SerdeContext): AutoMLCandidate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KernelSpec(entry, context); + return de_AutoMLCandidate(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LabelCounters - */ -const de_LabelCounters = (output: any, context: __SerdeContext): LabelCounters => { - return { - FailedNonRetryableError: __expectInt32(output.FailedNonRetryableError), - HumanLabeled: __expectInt32(output.HumanLabeled), - MachineLabeled: __expectInt32(output.MachineLabeled), - TotalLabeled: __expectInt32(output.TotalLabeled), - Unlabeled: __expectInt32(output.Unlabeled), - } as any; -}; +// de_AutoMLCandidateStep omitted. -/** - * deserializeAws_json1_1LabelCountersForWorkteam - */ -const de_LabelCountersForWorkteam = (output: any, context: __SerdeContext): LabelCountersForWorkteam => { - return { - HumanLabeled: __expectInt32(output.HumanLabeled), - PendingHuman: __expectInt32(output.PendingHuman), - Total: __expectInt32(output.Total), - } as any; -}; +// de_AutoMLChannel omitted. -/** - * deserializeAws_json1_1LabelingJobAlgorithmsConfig - */ -const de_LabelingJobAlgorithmsConfig = (output: any, context: __SerdeContext): LabelingJobAlgorithmsConfig => { - return { - InitialActiveLearningModelArn: __expectString(output.InitialActiveLearningModelArn), - LabelingJobAlgorithmSpecificationArn: __expectString(output.LabelingJobAlgorithmSpecificationArn), - LabelingJobResourceConfig: - output.LabelingJobResourceConfig != null - ? de_LabelingJobResourceConfig(output.LabelingJobResourceConfig, context) - : undefined, - } as any; -}; +// de_AutoMLContainerDefinition omitted. -/** - * deserializeAws_json1_1LabelingJobDataAttributes - */ -const de_LabelingJobDataAttributes = (output: any, context: __SerdeContext): LabelingJobDataAttributes => { - return { - ContentClassifiers: - output.ContentClassifiers != null ? de_ContentClassifiers(output.ContentClassifiers, context) : undefined, - } as any; -}; +// de_AutoMLContainerDefinitions omitted. + +// de_AutoMLDataSource omitted. /** - * deserializeAws_json1_1LabelingJobDataSource + * deserializeAws_json1_1AutoMLDataSplitConfig */ -const de_LabelingJobDataSource = (output: any, context: __SerdeContext): LabelingJobDataSource => { - return { - S3DataSource: output.S3DataSource != null ? de_LabelingJobS3DataSource(output.S3DataSource, context) : undefined, - SnsDataSource: - output.SnsDataSource != null ? de_LabelingJobSnsDataSource(output.SnsDataSource, context) : undefined, - } as any; +const de_AutoMLDataSplitConfig = (output: any, context: __SerdeContext): AutoMLDataSplitConfig => { + return take(output, { + ValidationFraction: __limitedParseFloat32, + }) as any; }; +// de_AutoMLInferenceContainerDefinitions omitted. + +// de_AutoMLInputDataConfig omitted. + +// de_AutoMLJobArtifacts omitted. + +// de_AutoMLJobChannel omitted. + +// de_AutoMLJobCompletionCriteria omitted. + /** - * deserializeAws_json1_1LabelingJobForWorkteamSummary + * deserializeAws_json1_1AutoMLJobConfig */ -const de_LabelingJobForWorkteamSummary = (output: any, context: __SerdeContext): LabelingJobForWorkteamSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - JobReferenceCode: __expectString(output.JobReferenceCode), - LabelCounters: - output.LabelCounters != null ? de_LabelCountersForWorkteam(output.LabelCounters, context) : undefined, - LabelingJobName: __expectString(output.LabelingJobName), - NumberOfHumanWorkersPerDataObject: __expectInt32(output.NumberOfHumanWorkersPerDataObject), - WorkRequesterAccountId: __expectString(output.WorkRequesterAccountId), - } as any; +const de_AutoMLJobConfig = (output: any, context: __SerdeContext): AutoMLJobConfig => { + return take(output, { + CandidateGenerationConfig: _json, + CompletionCriteria: _json, + DataSplitConfig: (_: any) => de_AutoMLDataSplitConfig(_, context), + Mode: __expectString, + SecurityConfig: _json, + }) as any; }; +// de_AutoMLJobInputDataConfig omitted. + +// de_AutoMLJobObjective omitted. + +// de_AutoMLJobStepMetadata omitted. + /** - * deserializeAws_json1_1LabelingJobForWorkteamSummaryList + * deserializeAws_json1_1AutoMLJobSummaries */ -const de_LabelingJobForWorkteamSummaryList = ( - output: any, - context: __SerdeContext -): LabelingJobForWorkteamSummary[] => { +const de_AutoMLJobSummaries = (output: any, context: __SerdeContext): AutoMLJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LabelingJobForWorkteamSummary(entry, context); + return de_AutoMLJobSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1LabelingJobInputConfig + * deserializeAws_json1_1AutoMLJobSummary */ -const de_LabelingJobInputConfig = (output: any, context: __SerdeContext): LabelingJobInputConfig => { - return { - DataAttributes: - output.DataAttributes != null ? de_LabelingJobDataAttributes(output.DataAttributes, context) : undefined, - DataSource: output.DataSource != null ? de_LabelingJobDataSource(output.DataSource, context) : undefined, - } as any; +const de_AutoMLJobSummary = (output: any, context: __SerdeContext): AutoMLJobSummary => { + return take(output, { + AutoMLJobArn: __expectString, + AutoMLJobName: __expectString, + AutoMLJobSecondaryStatus: __expectString, + AutoMLJobStatus: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PartialFailureReasons: _json, + }) as any; }; -/** - * deserializeAws_json1_1LabelingJobOutput - */ -const de_LabelingJobOutput = (output: any, context: __SerdeContext): LabelingJobOutput => { - return { - FinalActiveLearningModelArn: __expectString(output.FinalActiveLearningModelArn), - OutputDatasetS3Uri: __expectString(output.OutputDatasetS3Uri), - } as any; -}; +// de_AutoMLOutputDataConfig omitted. -/** - * deserializeAws_json1_1LabelingJobOutputConfig - */ -const de_LabelingJobOutputConfig = (output: any, context: __SerdeContext): LabelingJobOutputConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputPath: __expectString(output.S3OutputPath), - SnsTopicArn: __expectString(output.SnsTopicArn), - } as any; -}; +// de_AutoMLPartialFailureReason omitted. + +// de_AutoMLPartialFailureReasons omitted. + +// de_AutoMLProblemTypeConfig omitted. + +// de_AutoMLS3DataSource omitted. + +// de_AutoMLSecurityConfig omitted. + +// de_AutoRollbackConfig omitted. + +// de_BatchDataCaptureConfig omitted. + +// de_BatchDescribeModelPackageError omitted. + +// de_BatchDescribeModelPackageErrorMap omitted. /** - * deserializeAws_json1_1LabelingJobResourceConfig + * deserializeAws_json1_1BatchDescribeModelPackageOutput */ -const de_LabelingJobResourceConfig = (output: any, context: __SerdeContext): LabelingJobResourceConfig => { - return { - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; +const de_BatchDescribeModelPackageOutput = (output: any, context: __SerdeContext): BatchDescribeModelPackageOutput => { + return take(output, { + BatchDescribeModelPackageErrorMap: _json, + ModelPackageSummaries: (_: any) => de_ModelPackageSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1LabelingJobS3DataSource + * deserializeAws_json1_1BatchDescribeModelPackageSummary */ -const de_LabelingJobS3DataSource = (output: any, context: __SerdeContext): LabelingJobS3DataSource => { - return { - ManifestS3Uri: __expectString(output.ManifestS3Uri), - } as any; +const de_BatchDescribeModelPackageSummary = ( + output: any, + context: __SerdeContext +): BatchDescribeModelPackageSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InferenceSpecification: _json, + ModelApprovalStatus: __expectString, + ModelPackageArn: __expectString, + ModelPackageDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageStatus: __expectString, + ModelPackageVersion: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1LabelingJobSnsDataSource + * deserializeAws_json1_1BatchTransformInput */ -const de_LabelingJobSnsDataSource = (output: any, context: __SerdeContext): LabelingJobSnsDataSource => { - return { - SnsTopicArn: __expectString(output.SnsTopicArn), - } as any; +const de_BatchTransformInput = (output: any, context: __SerdeContext): BatchTransformInput => { + return take(output, { + DataCapturedDestinationS3Uri: __expectString, + DatasetFormat: _json, + EndTimeOffset: __expectString, + FeaturesAttribute: __expectString, + InferenceAttribute: __expectString, + LocalPath: __expectString, + ProbabilityAttribute: __expectString, + ProbabilityThresholdAttribute: __limitedParseDouble, + S3DataDistributionType: __expectString, + S3InputMode: __expectString, + StartTimeOffset: __expectString, + }) as any; }; +// de_BestObjectiveNotImproving omitted. + +// de_Bias omitted. + +// de_BlueGreenUpdatePolicy omitted. + +// de_CacheHitResult omitted. + +// de_CallbackStepMetadata omitted. + +// de_CandidateArtifactLocations omitted. + /** - * deserializeAws_json1_1LabelingJobStoppingConditions + * deserializeAws_json1_1CandidateProperties */ -const de_LabelingJobStoppingConditions = (output: any, context: __SerdeContext): LabelingJobStoppingConditions => { - return { - MaxHumanLabeledObjectCount: __expectInt32(output.MaxHumanLabeledObjectCount), - MaxPercentageOfInputDatasetLabeled: __expectInt32(output.MaxPercentageOfInputDatasetLabeled), - } as any; +const de_CandidateProperties = (output: any, context: __SerdeContext): CandidateProperties => { + return take(output, { + CandidateArtifactLocations: _json, + CandidateMetrics: (_: any) => de_MetricDataList(_, context), + }) as any; }; +// de_CandidateSteps omitted. + +// de_CanvasAppSettings omitted. + +// de_CapacitySize omitted. + +// de_CaptureContentTypeHeader omitted. + +// de_CaptureOption omitted. + +// de_CaptureOptionList omitted. + +// de_CategoricalParameter omitted. + +// de_CategoricalParameterRange omitted. + +// de_CategoricalParameterRanges omitted. + +// de_CategoricalParameterRangeSpecification omitted. + +// de_CategoricalParameterRangeValues omitted. + +// de_CategoricalParameters omitted. + +// de_Channel omitted. + +// de_ChannelSpecification omitted. + +// de_ChannelSpecifications omitted. + +// de_CheckpointConfig omitted. + +// de_Cidrs omitted. + +// de_ClarifyCheckStepMetadata omitted. + +// de_ClarifyExplainerConfig omitted. + +// de_ClarifyFeatureHeaders omitted. + +// de_ClarifyFeatureTypes omitted. + +// de_ClarifyInferenceConfig omitted. + +// de_ClarifyLabelHeaders omitted. + +// de_ClarifyShapBaselineConfig omitted. + +// de_ClarifyShapConfig omitted. + +// de_ClarifyTextConfig omitted. + +// de_CodeRepositories omitted. + +// de_CodeRepository omitted. + /** - * deserializeAws_json1_1LabelingJobSummary + * deserializeAws_json1_1CodeRepositorySummary */ -const de_LabelingJobSummary = (output: any, context: __SerdeContext): LabelingJobSummary => { - return { - AnnotationConsolidationLambdaArn: __expectString(output.AnnotationConsolidationLambdaArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - InputConfig: output.InputConfig != null ? de_LabelingJobInputConfig(output.InputConfig, context) : undefined, - LabelCounters: output.LabelCounters != null ? de_LabelCounters(output.LabelCounters, context) : undefined, - LabelingJobArn: __expectString(output.LabelingJobArn), - LabelingJobName: __expectString(output.LabelingJobName), - LabelingJobOutput: - output.LabelingJobOutput != null ? de_LabelingJobOutput(output.LabelingJobOutput, context) : undefined, - LabelingJobStatus: __expectString(output.LabelingJobStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - PreHumanTaskLambdaArn: __expectString(output.PreHumanTaskLambdaArn), - WorkteamArn: __expectString(output.WorkteamArn), - } as any; +const de_CodeRepositorySummary = (output: any, context: __SerdeContext): CodeRepositorySummary => { + return take(output, { + CodeRepositoryArn: __expectString, + CodeRepositoryName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GitConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1LabelingJobSummaryList + * deserializeAws_json1_1CodeRepositorySummaryList */ -const de_LabelingJobSummaryList = (output: any, context: __SerdeContext): LabelingJobSummary[] => { +const de_CodeRepositorySummaryList = (output: any, context: __SerdeContext): CodeRepositorySummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LabelingJobSummary(entry, context); + return de_CodeRepositorySummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LambdaStepMetadata - */ -const de_LambdaStepMetadata = (output: any, context: __SerdeContext): LambdaStepMetadata => { - return { - Arn: __expectString(output.Arn), - OutputParameters: - output.OutputParameters != null ? de_OutputParameterList(output.OutputParameters, context) : undefined, - } as any; -}; +// de_CognitoConfig omitted. -/** - * deserializeAws_json1_1LastUpdateStatus - */ -const de_LastUpdateStatus = (output: any, context: __SerdeContext): LastUpdateStatus => { - return { - FailureReason: __expectString(output.FailureReason), - Status: __expectString(output.Status), - } as any; -}; +// de_CognitoMemberDefinition omitted. + +// de_CollectionConfiguration omitted. + +// de_CollectionConfigurations omitted. + +// de_CollectionParameters omitted. /** - * deserializeAws_json1_1LifecycleConfigArns + * deserializeAws_json1_1CompilationJobSummaries */ -const de_LifecycleConfigArns = (output: any, context: __SerdeContext): string[] => { +const de_CompilationJobSummaries = (output: any, context: __SerdeContext): CompilationJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_CompilationJobSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1LineageEntityParameters + * deserializeAws_json1_1CompilationJobSummary */ -const de_LineageEntityParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_CompilationJobSummary = (output: any, context: __SerdeContext): CompilationJobSummary => { + return take(output, { + CompilationEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompilationJobArn: __expectString, + CompilationJobName: __expectString, + CompilationJobStatus: __expectString, + CompilationStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompilationTargetDevice: __expectString, + CompilationTargetPlatformAccelerator: __expectString, + CompilationTargetPlatformArch: __expectString, + CompilationTargetPlatformOs: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_CompressionTypes omitted. + +// de_ConditionStepMetadata omitted. + +// de_ConflictException omitted. + +// de_ContainerArguments omitted. + +// de_ContainerDefinition omitted. + +// de_ContainerDefinitionList omitted. + +// de_ContainerEntrypoint omitted. + +// de_ContentClassifiers omitted. + +// de_ContentTypes omitted. + +// de_ContextSource omitted. + /** - * deserializeAws_json1_1LineageGroupSummaries + * deserializeAws_json1_1ContextSummaries */ -const de_LineageGroupSummaries = (output: any, context: __SerdeContext): LineageGroupSummary[] => { +const de_ContextSummaries = (output: any, context: __SerdeContext): ContextSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LineageGroupSummary(entry, context); + return de_ContextSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1LineageGroupSummary + * deserializeAws_json1_1ContextSummary */ -const de_LineageGroupSummary = (output: any, context: __SerdeContext): LineageGroupSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - LineageGroupName: __expectString(output.LineageGroupName), - } as any; +const de_ContextSummary = (output: any, context: __SerdeContext): ContextSummary => { + return take(output, { + ContextArn: __expectString, + ContextName: __expectString, + ContextType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Source: _json, + }) as any; }; -/** - * deserializeAws_json1_1ListActionsResponse - */ -const de_ListActionsResponse = (output: any, context: __SerdeContext): ListActionsResponse => { - return { - ActionSummaries: output.ActionSummaries != null ? de_ActionSummaries(output.ActionSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ContinuousParameterRange omitted. -/** - * deserializeAws_json1_1ListAlgorithmsOutput - */ -const de_ListAlgorithmsOutput = (output: any, context: __SerdeContext): ListAlgorithmsOutput => { - return { - AlgorithmSummaryList: - output.AlgorithmSummaryList != null ? de_AlgorithmSummaryList(output.AlgorithmSummaryList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ContinuousParameterRanges omitted. -/** - * deserializeAws_json1_1ListAliasesResponse - */ -const de_ListAliasesResponse = (output: any, context: __SerdeContext): ListAliasesResponse => { - return { - NextToken: __expectString(output.NextToken), - SageMakerImageVersionAliases: - output.SageMakerImageVersionAliases != null - ? de_SageMakerImageVersionAliases(output.SageMakerImageVersionAliases, context) - : undefined, - } as any; -}; +// de_ContinuousParameterRangeSpecification omitted. -/** - * deserializeAws_json1_1ListAppImageConfigsResponse - */ -const de_ListAppImageConfigsResponse = (output: any, context: __SerdeContext): ListAppImageConfigsResponse => { - return { - AppImageConfigs: - output.AppImageConfigs != null ? de_AppImageConfigList(output.AppImageConfigs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ConvergenceDetected omitted. -/** - * deserializeAws_json1_1ListAppsResponse - */ -const de_ListAppsResponse = (output: any, context: __SerdeContext): ListAppsResponse => { - return { - Apps: output.Apps != null ? de_AppList(output.Apps, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateActionResponse omitted. -/** - * deserializeAws_json1_1ListArtifactsResponse - */ -const de_ListArtifactsResponse = (output: any, context: __SerdeContext): ListArtifactsResponse => { - return { - ArtifactSummaries: - output.ArtifactSummaries != null ? de_ArtifactSummaries(output.ArtifactSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateAlgorithmOutput omitted. -/** - * deserializeAws_json1_1ListAssociationsResponse - */ -const de_ListAssociationsResponse = (output: any, context: __SerdeContext): ListAssociationsResponse => { - return { - AssociationSummaries: - output.AssociationSummaries != null ? de_AssociationSummaries(output.AssociationSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateAppImageConfigResponse omitted. -/** - * deserializeAws_json1_1ListAutoMLJobsResponse - */ -const de_ListAutoMLJobsResponse = (output: any, context: __SerdeContext): ListAutoMLJobsResponse => { - return { - AutoMLJobSummaries: - output.AutoMLJobSummaries != null ? de_AutoMLJobSummaries(output.AutoMLJobSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateAppResponse omitted. -/** - * deserializeAws_json1_1ListCandidatesForAutoMLJobResponse - */ -const de_ListCandidatesForAutoMLJobResponse = ( - output: any, - context: __SerdeContext -): ListCandidatesForAutoMLJobResponse => { - return { - Candidates: output.Candidates != null ? de_AutoMLCandidates(output.Candidates, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateArtifactResponse omitted. -/** - * deserializeAws_json1_1ListCodeRepositoriesOutput - */ -const de_ListCodeRepositoriesOutput = (output: any, context: __SerdeContext): ListCodeRepositoriesOutput => { - return { - CodeRepositorySummaryList: - output.CodeRepositorySummaryList != null - ? de_CodeRepositorySummaryList(output.CodeRepositorySummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateAutoMLJobResponse omitted. -/** - * deserializeAws_json1_1ListCompilationJobsResponse - */ -const de_ListCompilationJobsResponse = (output: any, context: __SerdeContext): ListCompilationJobsResponse => { - return { - CompilationJobSummaries: - output.CompilationJobSummaries != null - ? de_CompilationJobSummaries(output.CompilationJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateAutoMLJobV2Response omitted. -/** - * deserializeAws_json1_1ListContextsResponse - */ -const de_ListContextsResponse = (output: any, context: __SerdeContext): ListContextsResponse => { - return { - ContextSummaries: - output.ContextSummaries != null ? de_ContextSummaries(output.ContextSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateCodeRepositoryOutput omitted. -/** - * deserializeAws_json1_1ListDataQualityJobDefinitionsResponse - */ -const de_ListDataQualityJobDefinitionsResponse = ( - output: any, - context: __SerdeContext -): ListDataQualityJobDefinitionsResponse => { - return { - JobDefinitionSummaries: - output.JobDefinitionSummaries != null - ? de_MonitoringJobDefinitionSummaryList(output.JobDefinitionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateCompilationJobResponse omitted. -/** - * deserializeAws_json1_1ListDeviceFleetsResponse - */ -const de_ListDeviceFleetsResponse = (output: any, context: __SerdeContext): ListDeviceFleetsResponse => { - return { - DeviceFleetSummaries: - output.DeviceFleetSummaries != null ? de_DeviceFleetSummaries(output.DeviceFleetSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateContextResponse omitted. -/** - * deserializeAws_json1_1ListDevicesResponse - */ -const de_ListDevicesResponse = (output: any, context: __SerdeContext): ListDevicesResponse => { - return { - DeviceSummaries: output.DeviceSummaries != null ? de_DeviceSummaries(output.DeviceSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateDataQualityJobDefinitionResponse omitted. -/** - * deserializeAws_json1_1ListDomainsResponse - */ -const de_ListDomainsResponse = (output: any, context: __SerdeContext): ListDomainsResponse => { - return { - Domains: output.Domains != null ? de_DomainList(output.Domains, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateDomainResponse omitted. -/** - * deserializeAws_json1_1ListEdgeDeploymentPlansResponse - */ -const de_ListEdgeDeploymentPlansResponse = (output: any, context: __SerdeContext): ListEdgeDeploymentPlansResponse => { - return { - EdgeDeploymentPlanSummaries: - output.EdgeDeploymentPlanSummaries != null - ? de_EdgeDeploymentPlanSummaries(output.EdgeDeploymentPlanSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_CreateEdgeDeploymentPlanResponse omitted. + +// de_CreateEndpointConfigOutput omitted. + +// de_CreateEndpointOutput omitted. + +// de_CreateExperimentResponse omitted. + +// de_CreateFeatureGroupResponse omitted. + +// de_CreateFlowDefinitionResponse omitted. + +// de_CreateHubResponse omitted. + +// de_CreateHumanTaskUiResponse omitted. + +// de_CreateHyperParameterTuningJobResponse omitted. + +// de_CreateImageResponse omitted. + +// de_CreateImageVersionResponse omitted. + +// de_CreateInferenceExperimentResponse omitted. + +// de_CreateInferenceRecommendationsJobResponse omitted. + +// de_CreateLabelingJobResponse omitted. + +// de_CreateModelBiasJobDefinitionResponse omitted. + +// de_CreateModelCardExportJobResponse omitted. + +// de_CreateModelCardResponse omitted. + +// de_CreateModelExplainabilityJobDefinitionResponse omitted. + +// de_CreateModelOutput omitted. + +// de_CreateModelPackageGroupOutput omitted. + +// de_CreateModelPackageOutput omitted. + +// de_CreateModelQualityJobDefinitionResponse omitted. + +// de_CreateMonitoringScheduleResponse omitted. + +// de_CreateNotebookInstanceLifecycleConfigOutput omitted. + +// de_CreateNotebookInstanceOutput omitted. + +// de_CreatePipelineResponse omitted. + +// de_CreatePresignedDomainUrlResponse omitted. + +// de_CreatePresignedNotebookInstanceUrlOutput omitted. + +// de_CreateProcessingJobResponse omitted. + +// de_CreateProjectOutput omitted. + +// de_CreateSpaceResponse omitted. + +// de_CreateStudioLifecycleConfigResponse omitted. + +// de_CreateTrainingJobResponse omitted. + +// de_CreateTransformJobResponse omitted. + +// de_CreateTrialComponentResponse omitted. + +// de_CreateTrialResponse omitted. + +// de_CreateUserProfileResponse omitted. + +// de_CreateWorkforceResponse omitted. + +// de_CreateWorkteamResponse omitted. + +// de_CsvContentTypes omitted. + +// de_CustomerMetadataMap omitted. + +// de_CustomImage omitted. + +// de_CustomImages omitted. + +// de_DataCaptureConfig omitted. + +// de_DataCaptureConfigSummary omitted. + +// de_DataCatalogConfig omitted. -/** - * deserializeAws_json1_1ListEdgePackagingJobsResponse - */ -const de_ListEdgePackagingJobsResponse = (output: any, context: __SerdeContext): ListEdgePackagingJobsResponse => { - return { - EdgePackagingJobSummaries: - output.EdgePackagingJobSummaries != null - ? de_EdgePackagingJobSummaries(output.EdgePackagingJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DataProcessing omitted. -/** - * deserializeAws_json1_1ListEndpointConfigsOutput - */ -const de_ListEndpointConfigsOutput = (output: any, context: __SerdeContext): ListEndpointConfigsOutput => { - return { - EndpointConfigs: - output.EndpointConfigs != null ? de_EndpointConfigSummaryList(output.EndpointConfigs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DataQualityAppSpecification omitted. -/** - * deserializeAws_json1_1ListEndpointsOutput - */ -const de_ListEndpointsOutput = (output: any, context: __SerdeContext): ListEndpointsOutput => { - return { - Endpoints: output.Endpoints != null ? de_EndpointSummaryList(output.Endpoints, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DataQualityBaselineConfig omitted. /** - * deserializeAws_json1_1ListExperimentsResponse + * deserializeAws_json1_1DataQualityJobInput */ -const de_ListExperimentsResponse = (output: any, context: __SerdeContext): ListExperimentsResponse => { - return { - ExperimentSummaries: - output.ExperimentSummaries != null ? de_ExperimentSummaries(output.ExperimentSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DataQualityJobInput = (output: any, context: __SerdeContext): DataQualityJobInput => { + return take(output, { + BatchTransformInput: (_: any) => de_BatchTransformInput(_, context), + EndpointInput: (_: any) => de_EndpointInput(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListFeatureGroupsResponse - */ -const de_ListFeatureGroupsResponse = (output: any, context: __SerdeContext): ListFeatureGroupsResponse => { - return { - FeatureGroupSummaries: - output.FeatureGroupSummaries != null - ? de_FeatureGroupSummaries(output.FeatureGroupSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DatasetDefinition omitted. -/** - * deserializeAws_json1_1ListFlowDefinitionsResponse - */ -const de_ListFlowDefinitionsResponse = (output: any, context: __SerdeContext): ListFlowDefinitionsResponse => { - return { - FlowDefinitionSummaries: - output.FlowDefinitionSummaries != null - ? de_FlowDefinitionSummaries(output.FlowDefinitionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DataSource omitted. -/** - * deserializeAws_json1_1ListHubContentsResponse - */ -const de_ListHubContentsResponse = (output: any, context: __SerdeContext): ListHubContentsResponse => { - return { - HubContentSummaries: - output.HubContentSummaries != null ? de_HubContentInfoList(output.HubContentSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DebugHookConfig omitted. -/** - * deserializeAws_json1_1ListHubContentVersionsResponse - */ -const de_ListHubContentVersionsResponse = (output: any, context: __SerdeContext): ListHubContentVersionsResponse => { - return { - HubContentSummaries: - output.HubContentSummaries != null ? de_HubContentInfoList(output.HubContentSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DebugRuleConfiguration omitted. -/** - * deserializeAws_json1_1ListHubsResponse - */ -const de_ListHubsResponse = (output: any, context: __SerdeContext): ListHubsResponse => { - return { - HubSummaries: output.HubSummaries != null ? de_HubInfoList(output.HubSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DebugRuleConfigurations omitted. /** - * deserializeAws_json1_1ListHumanTaskUisResponse + * deserializeAws_json1_1DebugRuleEvaluationStatus */ -const de_ListHumanTaskUisResponse = (output: any, context: __SerdeContext): ListHumanTaskUisResponse => { - return { - HumanTaskUiSummaries: - output.HumanTaskUiSummaries != null ? de_HumanTaskUiSummaries(output.HumanTaskUiSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DebugRuleEvaluationStatus = (output: any, context: __SerdeContext): DebugRuleEvaluationStatus => { + return take(output, { + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuleConfigurationName: __expectString, + RuleEvaluationJobArn: __expectString, + RuleEvaluationStatus: __expectString, + StatusDetails: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListHyperParameterTuningJobsResponse + * deserializeAws_json1_1DebugRuleEvaluationStatuses */ -const de_ListHyperParameterTuningJobsResponse = ( - output: any, - context: __SerdeContext -): ListHyperParameterTuningJobsResponse => { - return { - HyperParameterTuningJobSummaries: - output.HyperParameterTuningJobSummaries != null - ? de_HyperParameterTuningJobSummaries(output.HyperParameterTuningJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DebugRuleEvaluationStatuses = (output: any, context: __SerdeContext): DebugRuleEvaluationStatus[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DebugRuleEvaluationStatus(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1ListImagesResponse - */ -const de_ListImagesResponse = (output: any, context: __SerdeContext): ListImagesResponse => { - return { - Images: output.Images != null ? de_Images(output.Images, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DefaultSpaceSettings omitted. -/** - * deserializeAws_json1_1ListImageVersionsResponse - */ -const de_ListImageVersionsResponse = (output: any, context: __SerdeContext): ListImageVersionsResponse => { - return { - ImageVersions: output.ImageVersions != null ? de_ImageVersions(output.ImageVersions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DeleteActionResponse omitted. + +// de_DeleteArtifactResponse omitted. + +// de_DeleteAssociationResponse omitted. + +// de_DeleteContextResponse omitted. + +// de_DeleteExperimentResponse omitted. + +// de_DeleteFlowDefinitionResponse omitted. + +// de_DeleteHumanTaskUiResponse omitted. + +// de_DeleteImageResponse omitted. + +// de_DeleteImageVersionResponse omitted. + +// de_DeleteInferenceExperimentResponse omitted. + +// de_DeletePipelineResponse omitted. + +// de_DeleteTagsOutput omitted. + +// de_DeleteTrialComponentResponse omitted. + +// de_DeleteTrialResponse omitted. + +// de_DeleteWorkforceResponse omitted. + +// de_DeleteWorkteamResponse omitted. /** - * deserializeAws_json1_1ListInferenceExperimentsResponse + * deserializeAws_json1_1DeployedImage */ -const de_ListInferenceExperimentsResponse = ( - output: any, - context: __SerdeContext -): ListInferenceExperimentsResponse => { - return { - InferenceExperiments: - output.InferenceExperiments != null - ? de_InferenceExperimentList(output.InferenceExperiments, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DeployedImage = (output: any, context: __SerdeContext): DeployedImage => { + return take(output, { + ResolutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResolvedImage: __expectString, + SpecifiedImage: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListInferenceRecommendationsJobsResponse + * deserializeAws_json1_1DeployedImages */ -const de_ListInferenceRecommendationsJobsResponse = ( - output: any, - context: __SerdeContext -): ListInferenceRecommendationsJobsResponse => { - return { - InferenceRecommendationsJobs: - output.InferenceRecommendationsJobs != null - ? de_InferenceRecommendationsJobs(output.InferenceRecommendationsJobs, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DeployedImages = (output: any, context: __SerdeContext): DeployedImage[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DeployedImage(entry, context); + }); + return retVal; }; +// de_DeploymentConfig omitted. + /** - * deserializeAws_json1_1ListInferenceRecommendationsJobStepsResponse + * deserializeAws_json1_1DeploymentStageStatusSummaries */ -const de_ListInferenceRecommendationsJobStepsResponse = ( - output: any, - context: __SerdeContext -): ListInferenceRecommendationsJobStepsResponse => { - return { - NextToken: __expectString(output.NextToken), - Steps: output.Steps != null ? de_InferenceRecommendationsJobSteps(output.Steps, context) : undefined, - } as any; +const de_DeploymentStageStatusSummaries = (output: any, context: __SerdeContext): DeploymentStageStatusSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DeploymentStageStatusSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ListLabelingJobsForWorkteamResponse + * deserializeAws_json1_1DeploymentStageStatusSummary */ -const de_ListLabelingJobsForWorkteamResponse = ( - output: any, - context: __SerdeContext -): ListLabelingJobsForWorkteamResponse => { - return { - LabelingJobSummaryList: - output.LabelingJobSummaryList != null - ? de_LabelingJobForWorkteamSummaryList(output.LabelingJobSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DeploymentStageStatusSummary = (output: any, context: __SerdeContext): DeploymentStageStatusSummary => { + return take(output, { + DeploymentConfig: _json, + DeploymentStatus: (_: any) => de_EdgeDeploymentStatus(_, context), + DeviceSelectionConfig: _json, + StageName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListLabelingJobsResponse + * deserializeAws_json1_1DescribeActionResponse */ -const de_ListLabelingJobsResponse = (output: any, context: __SerdeContext): ListLabelingJobsResponse => { - return { - LabelingJobSummaryList: - output.LabelingJobSummaryList != null - ? de_LabelingJobSummaryList(output.LabelingJobSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeActionResponse = (output: any, context: __SerdeContext): DescribeActionResponse => { + return take(output, { + ActionArn: __expectString, + ActionName: __expectString, + ActionType: __expectString, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + MetadataProperties: _json, + Properties: _json, + Source: _json, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListLineageGroupsResponse + * deserializeAws_json1_1DescribeAlgorithmOutput */ -const de_ListLineageGroupsResponse = (output: any, context: __SerdeContext): ListLineageGroupsResponse => { - return { - LineageGroupSummaries: - output.LineageGroupSummaries != null - ? de_LineageGroupSummaries(output.LineageGroupSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeAlgorithmOutput = (output: any, context: __SerdeContext): DescribeAlgorithmOutput => { + return take(output, { + AlgorithmArn: __expectString, + AlgorithmDescription: __expectString, + AlgorithmName: __expectString, + AlgorithmStatus: __expectString, + AlgorithmStatusDetails: _json, + CertifyForMarketplace: __expectBoolean, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InferenceSpecification: _json, + ProductId: __expectString, + TrainingSpecification: _json, + ValidationSpecification: _json, + }) as any; }; /** - * deserializeAws_json1_1ListModelBiasJobDefinitionsResponse + * deserializeAws_json1_1DescribeAppImageConfigResponse */ -const de_ListModelBiasJobDefinitionsResponse = ( - output: any, - context: __SerdeContext -): ListModelBiasJobDefinitionsResponse => { - return { - JobDefinitionSummaries: - output.JobDefinitionSummaries != null - ? de_MonitoringJobDefinitionSummaryList(output.JobDefinitionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeAppImageConfigResponse = (output: any, context: __SerdeContext): DescribeAppImageConfigResponse => { + return take(output, { + AppImageConfigArn: __expectString, + AppImageConfigName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KernelGatewayImageConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ListModelCardExportJobsResponse + * deserializeAws_json1_1DescribeAppResponse */ -const de_ListModelCardExportJobsResponse = (output: any, context: __SerdeContext): ListModelCardExportJobsResponse => { - return { - ModelCardExportJobSummaries: - output.ModelCardExportJobSummaries != null - ? de_ModelCardExportJobSummaryList(output.ModelCardExportJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeAppResponse = (output: any, context: __SerdeContext): DescribeAppResponse => { + return take(output, { + AppArn: __expectString, + AppName: __expectString, + AppType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + FailureReason: __expectString, + LastHealthCheckTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUserActivityTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceSpec: _json, + SpaceName: __expectString, + Status: __expectString, + UserProfileName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListModelCardsResponse + * deserializeAws_json1_1DescribeArtifactResponse */ -const de_ListModelCardsResponse = (output: any, context: __SerdeContext): ListModelCardsResponse => { - return { - ModelCardSummaries: - output.ModelCardSummaries != null ? de_ModelCardSummaryList(output.ModelCardSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeArtifactResponse = (output: any, context: __SerdeContext): DescribeArtifactResponse => { + return take(output, { + ArtifactArn: __expectString, + ArtifactName: __expectString, + ArtifactType: __expectString, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + MetadataProperties: _json, + Properties: _json, + Source: _json, + }) as any; }; /** - * deserializeAws_json1_1ListModelCardVersionsResponse + * deserializeAws_json1_1DescribeAutoMLJobResponse */ -const de_ListModelCardVersionsResponse = (output: any, context: __SerdeContext): ListModelCardVersionsResponse => { - return { - ModelCardVersionSummaryList: - output.ModelCardVersionSummaryList != null - ? de_ModelCardVersionSummaryList(output.ModelCardVersionSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeAutoMLJobResponse = (output: any, context: __SerdeContext): DescribeAutoMLJobResponse => { + return take(output, { + AutoMLJobArn: __expectString, + AutoMLJobArtifacts: _json, + AutoMLJobConfig: (_: any) => de_AutoMLJobConfig(_, context), + AutoMLJobName: __expectString, + AutoMLJobObjective: _json, + AutoMLJobSecondaryStatus: __expectString, + AutoMLJobStatus: __expectString, + BestCandidate: (_: any) => de_AutoMLCandidate(_, context), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + GenerateCandidateDefinitionsOnly: __expectBoolean, + InputDataConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelDeployConfig: _json, + ModelDeployResult: _json, + OutputDataConfig: _json, + PartialFailureReasons: _json, + ProblemType: __expectString, + ResolvedAttributes: _json, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListModelExplainabilityJobDefinitionsResponse + * deserializeAws_json1_1DescribeAutoMLJobV2Response */ -const de_ListModelExplainabilityJobDefinitionsResponse = ( - output: any, - context: __SerdeContext -): ListModelExplainabilityJobDefinitionsResponse => { - return { - JobDefinitionSummaries: - output.JobDefinitionSummaries != null - ? de_MonitoringJobDefinitionSummaryList(output.JobDefinitionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeAutoMLJobV2Response = (output: any, context: __SerdeContext): DescribeAutoMLJobV2Response => { + return take(output, { + AutoMLJobArn: __expectString, + AutoMLJobInputDataConfig: _json, + AutoMLJobName: __expectString, + AutoMLJobObjective: _json, + AutoMLJobSecondaryStatus: __expectString, + AutoMLJobStatus: __expectString, + AutoMLProblemTypeConfig: (_: any) => _json(__expectUnion(_)), + BestCandidate: (_: any) => de_AutoMLCandidate(_, context), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataSplitConfig: (_: any) => de_AutoMLDataSplitConfig(_, context), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelDeployConfig: _json, + ModelDeployResult: _json, + OutputDataConfig: _json, + PartialFailureReasons: _json, + RoleArn: __expectString, + SecurityConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1ListModelMetadataResponse + * deserializeAws_json1_1DescribeCodeRepositoryOutput */ -const de_ListModelMetadataResponse = (output: any, context: __SerdeContext): ListModelMetadataResponse => { - return { - ModelMetadataSummaries: - output.ModelMetadataSummaries != null - ? de_ModelMetadataSummaries(output.ModelMetadataSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeCodeRepositoryOutput = (output: any, context: __SerdeContext): DescribeCodeRepositoryOutput => { + return take(output, { + CodeRepositoryArn: __expectString, + CodeRepositoryName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GitConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ListModelPackageGroupsOutput + * deserializeAws_json1_1DescribeCompilationJobResponse */ -const de_ListModelPackageGroupsOutput = (output: any, context: __SerdeContext): ListModelPackageGroupsOutput => { - return { - ModelPackageGroupSummaryList: - output.ModelPackageGroupSummaryList != null - ? de_ModelPackageGroupSummaryList(output.ModelPackageGroupSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeCompilationJobResponse = (output: any, context: __SerdeContext): DescribeCompilationJobResponse => { + return take(output, { + CompilationEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CompilationJobArn: __expectString, + CompilationJobName: __expectString, + CompilationJobStatus: __expectString, + CompilationStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + InferenceImage: __expectString, + InputConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelArtifacts: _json, + ModelDigests: _json, + ModelPackageVersionArn: __expectString, + OutputConfig: _json, + RoleArn: __expectString, + StoppingCondition: _json, + VpcConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1ListModelPackagesOutput + * deserializeAws_json1_1DescribeContextResponse */ -const de_ListModelPackagesOutput = (output: any, context: __SerdeContext): ListModelPackagesOutput => { - return { - ModelPackageSummaryList: - output.ModelPackageSummaryList != null - ? de_ModelPackageSummaryList(output.ModelPackageSummaryList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeContextResponse = (output: any, context: __SerdeContext): DescribeContextResponse => { + return take(output, { + ContextArn: __expectString, + ContextName: __expectString, + ContextType: __expectString, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + Properties: _json, + Source: _json, + }) as any; }; /** - * deserializeAws_json1_1ListModelQualityJobDefinitionsResponse + * deserializeAws_json1_1DescribeDataQualityJobDefinitionResponse */ -const de_ListModelQualityJobDefinitionsResponse = ( +const de_DescribeDataQualityJobDefinitionResponse = ( output: any, context: __SerdeContext -): ListModelQualityJobDefinitionsResponse => { - return { - JobDefinitionSummaries: - output.JobDefinitionSummaries != null - ? de_MonitoringJobDefinitionSummaryList(output.JobDefinitionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +): DescribeDataQualityJobDefinitionResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataQualityAppSpecification: _json, + DataQualityBaselineConfig: _json, + DataQualityJobInput: (_: any) => de_DataQualityJobInput(_, context), + DataQualityJobOutputConfig: _json, + JobDefinitionArn: __expectString, + JobDefinitionName: __expectString, + JobResources: _json, + NetworkConfig: _json, + RoleArn: __expectString, + StoppingCondition: _json, + }) as any; }; /** - * deserializeAws_json1_1ListModelsOutput + * deserializeAws_json1_1DescribeDeviceFleetResponse */ -const de_ListModelsOutput = (output: any, context: __SerdeContext): ListModelsOutput => { - return { - Models: output.Models != null ? de_ModelSummaryList(output.Models, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeDeviceFleetResponse = (output: any, context: __SerdeContext): DescribeDeviceFleetResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceFleetArn: __expectString, + DeviceFleetName: __expectString, + IotRoleAlias: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OutputConfig: _json, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListMonitoringAlertHistoryResponse + * deserializeAws_json1_1DescribeDeviceResponse */ -const de_ListMonitoringAlertHistoryResponse = ( - output: any, - context: __SerdeContext -): ListMonitoringAlertHistoryResponse => { - return { - MonitoringAlertHistory: - output.MonitoringAlertHistory != null - ? de_MonitoringAlertHistoryList(output.MonitoringAlertHistory, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeDeviceResponse = (output: any, context: __SerdeContext): DescribeDeviceResponse => { + return take(output, { + AgentVersion: __expectString, + Description: __expectString, + DeviceArn: __expectString, + DeviceFleetName: __expectString, + DeviceName: __expectString, + IotThingName: __expectString, + LatestHeartbeat: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxModels: __expectInt32, + Models: (_: any) => de_EdgeModels(_, context), + NextToken: __expectString, + RegistrationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ListMonitoringAlertsResponse + * deserializeAws_json1_1DescribeDomainResponse */ -const de_ListMonitoringAlertsResponse = (output: any, context: __SerdeContext): ListMonitoringAlertsResponse => { - return { - MonitoringAlertSummaries: - output.MonitoringAlertSummaries != null - ? de_MonitoringAlertSummaryList(output.MonitoringAlertSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeDomainResponse = (output: any, context: __SerdeContext): DescribeDomainResponse => { + return take(output, { + AppNetworkAccessType: __expectString, + AppSecurityGroupManagement: __expectString, + AuthMode: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultSpaceSettings: _json, + DefaultUserSettings: _json, + DomainArn: __expectString, + DomainId: __expectString, + DomainName: __expectString, + DomainSettings: _json, + FailureReason: __expectString, + HomeEfsFileSystemId: __expectString, + HomeEfsFileSystemKmsKeyId: __expectString, + KmsKeyId: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SecurityGroupIdForDomainBoundary: __expectString, + SingleSignOnManagedApplicationInstanceId: __expectString, + Status: __expectString, + SubnetIds: _json, + Url: __expectString, + VpcId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListMonitoringExecutionsResponse + * deserializeAws_json1_1DescribeEdgeDeploymentPlanResponse */ -const de_ListMonitoringExecutionsResponse = ( +const de_DescribeEdgeDeploymentPlanResponse = ( output: any, context: __SerdeContext -): ListMonitoringExecutionsResponse => { - return { - MonitoringExecutionSummaries: - output.MonitoringExecutionSummaries != null - ? de_MonitoringExecutionSummaryList(output.MonitoringExecutionSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListMonitoringSchedulesResponse - */ -const de_ListMonitoringSchedulesResponse = (output: any, context: __SerdeContext): ListMonitoringSchedulesResponse => { - return { - MonitoringScheduleSummaries: - output.MonitoringScheduleSummaries != null - ? de_MonitoringScheduleSummaryList(output.MonitoringScheduleSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +): DescribeEdgeDeploymentPlanResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceFleetName: __expectString, + EdgeDeploymentFailed: __expectInt32, + EdgeDeploymentPending: __expectInt32, + EdgeDeploymentPlanArn: __expectString, + EdgeDeploymentPlanName: __expectString, + EdgeDeploymentSuccess: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelConfigs: _json, + NextToken: __expectString, + Stages: (_: any) => de_DeploymentStageStatusSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListNotebookInstanceLifecycleConfigsOutput + * deserializeAws_json1_1DescribeEdgePackagingJobResponse */ -const de_ListNotebookInstanceLifecycleConfigsOutput = ( +const de_DescribeEdgePackagingJobResponse = ( output: any, context: __SerdeContext -): ListNotebookInstanceLifecycleConfigsOutput => { - return { - NextToken: __expectString(output.NextToken), - NotebookInstanceLifecycleConfigs: - output.NotebookInstanceLifecycleConfigs != null - ? de_NotebookInstanceLifecycleConfigSummaryList(output.NotebookInstanceLifecycleConfigs, context) - : undefined, - } as any; +): DescribeEdgePackagingJobResponse => { + return take(output, { + CompilationJobName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgePackagingJobArn: __expectString, + EdgePackagingJobName: __expectString, + EdgePackagingJobStatus: __expectString, + EdgePackagingJobStatusMessage: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelArtifact: __expectString, + ModelName: __expectString, + ModelSignature: __expectString, + ModelVersion: __expectString, + OutputConfig: _json, + PresetDeploymentOutput: _json, + ResourceKey: __expectString, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListNotebookInstancesOutput + * deserializeAws_json1_1DescribeEndpointConfigOutput */ -const de_ListNotebookInstancesOutput = (output: any, context: __SerdeContext): ListNotebookInstancesOutput => { - return { - NextToken: __expectString(output.NextToken), - NotebookInstances: - output.NotebookInstances != null ? de_NotebookInstanceSummaryList(output.NotebookInstances, context) : undefined, - } as any; +const de_DescribeEndpointConfigOutput = (output: any, context: __SerdeContext): DescribeEndpointConfigOutput => { + return take(output, { + AsyncInferenceConfig: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataCaptureConfig: _json, + EndpointConfigArn: __expectString, + EndpointConfigName: __expectString, + ExplainerConfig: _json, + KmsKeyId: __expectString, + ProductionVariants: (_: any) => de_ProductionVariantList(_, context), + ShadowProductionVariants: (_: any) => de_ProductionVariantList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListPipelineExecutionsResponse + * deserializeAws_json1_1DescribeEndpointOutput */ -const de_ListPipelineExecutionsResponse = (output: any, context: __SerdeContext): ListPipelineExecutionsResponse => { - return { - NextToken: __expectString(output.NextToken), - PipelineExecutionSummaries: - output.PipelineExecutionSummaries != null - ? de_PipelineExecutionSummaryList(output.PipelineExecutionSummaries, context) - : undefined, - } as any; +const de_DescribeEndpointOutput = (output: any, context: __SerdeContext): DescribeEndpointOutput => { + return take(output, { + AsyncInferenceConfig: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataCaptureConfig: _json, + EndpointArn: __expectString, + EndpointConfigName: __expectString, + EndpointName: __expectString, + EndpointStatus: __expectString, + ExplainerConfig: _json, + FailureReason: __expectString, + LastDeploymentConfig: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PendingDeploymentSummary: (_: any) => de_PendingDeploymentSummary(_, context), + ProductionVariants: (_: any) => de_ProductionVariantSummaryList(_, context), + ShadowProductionVariants: (_: any) => de_ProductionVariantSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ListPipelineExecutionStepsResponse + * deserializeAws_json1_1DescribeExperimentResponse */ -const de_ListPipelineExecutionStepsResponse = ( - output: any, - context: __SerdeContext -): ListPipelineExecutionStepsResponse => { - return { - NextToken: __expectString(output.NextToken), - PipelineExecutionSteps: - output.PipelineExecutionSteps != null - ? de_PipelineExecutionStepList(output.PipelineExecutionSteps, context) - : undefined, - } as any; +const de_DescribeExperimentResponse = (output: any, context: __SerdeContext): DescribeExperimentResponse => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + ExperimentArn: __expectString, + ExperimentName: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Source: _json, + }) as any; }; /** - * deserializeAws_json1_1ListPipelineParametersForExecutionResponse + * deserializeAws_json1_1DescribeFeatureGroupResponse */ -const de_ListPipelineParametersForExecutionResponse = ( - output: any, - context: __SerdeContext -): ListPipelineParametersForExecutionResponse => { - return { - NextToken: __expectString(output.NextToken), - PipelineParameters: - output.PipelineParameters != null ? de_ParameterList(output.PipelineParameters, context) : undefined, - } as any; +const de_DescribeFeatureGroupResponse = (output: any, context: __SerdeContext): DescribeFeatureGroupResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EventTimeFeatureName: __expectString, + FailureReason: __expectString, + FeatureDefinitions: _json, + FeatureGroupArn: __expectString, + FeatureGroupName: __expectString, + FeatureGroupStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateStatus: _json, + NextToken: __expectString, + OfflineStoreConfig: _json, + OfflineStoreStatus: _json, + OnlineStoreConfig: _json, + OnlineStoreTotalSizeBytes: __expectLong, + RecordIdentifierFeatureName: __expectString, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListPipelinesResponse + * deserializeAws_json1_1DescribeFeatureMetadataResponse */ -const de_ListPipelinesResponse = (output: any, context: __SerdeContext): ListPipelinesResponse => { - return { - NextToken: __expectString(output.NextToken), - PipelineSummaries: - output.PipelineSummaries != null ? de_PipelineSummaryList(output.PipelineSummaries, context) : undefined, - } as any; +const de_DescribeFeatureMetadataResponse = (output: any, context: __SerdeContext): DescribeFeatureMetadataResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + FeatureGroupArn: __expectString, + FeatureGroupName: __expectString, + FeatureName: __expectString, + FeatureType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Parameters: _json, + }) as any; }; /** - * deserializeAws_json1_1ListProcessingJobsResponse + * deserializeAws_json1_1DescribeFlowDefinitionResponse */ -const de_ListProcessingJobsResponse = (output: any, context: __SerdeContext): ListProcessingJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - ProcessingJobSummaries: - output.ProcessingJobSummaries != null - ? de_ProcessingJobSummaries(output.ProcessingJobSummaries, context) - : undefined, - } as any; +const de_DescribeFlowDefinitionResponse = (output: any, context: __SerdeContext): DescribeFlowDefinitionResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + FlowDefinitionArn: __expectString, + FlowDefinitionName: __expectString, + FlowDefinitionStatus: __expectString, + HumanLoopActivationConfig: (_: any) => de_HumanLoopActivationConfig(_, context), + HumanLoopConfig: _json, + HumanLoopRequestSource: _json, + OutputConfig: _json, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListProjectsOutput + * deserializeAws_json1_1DescribeHubContentResponse */ -const de_ListProjectsOutput = (output: any, context: __SerdeContext): ListProjectsOutput => { - return { - NextToken: __expectString(output.NextToken), - ProjectSummaryList: - output.ProjectSummaryList != null ? de_ProjectSummaryList(output.ProjectSummaryList, context) : undefined, - } as any; +const de_DescribeHubContentResponse = (output: any, context: __SerdeContext): DescribeHubContentResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DocumentSchemaVersion: __expectString, + FailureReason: __expectString, + HubArn: __expectString, + HubContentArn: __expectString, + HubContentDependencies: _json, + HubContentDescription: __expectString, + HubContentDisplayName: __expectString, + HubContentDocument: __expectString, + HubContentMarkdown: __expectString, + HubContentName: __expectString, + HubContentSearchKeywords: _json, + HubContentStatus: __expectString, + HubContentType: __expectString, + HubContentVersion: __expectString, + HubName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListSpacesResponse + * deserializeAws_json1_1DescribeHubResponse */ -const de_ListSpacesResponse = (output: any, context: __SerdeContext): ListSpacesResponse => { - return { - NextToken: __expectString(output.NextToken), - Spaces: output.Spaces != null ? de_SpaceList(output.Spaces, context) : undefined, - } as any; +const de_DescribeHubResponse = (output: any, context: __SerdeContext): DescribeHubResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + HubArn: __expectString, + HubDescription: __expectString, + HubDisplayName: __expectString, + HubName: __expectString, + HubSearchKeywords: _json, + HubStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + S3StorageConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1ListStageDevicesResponse + * deserializeAws_json1_1DescribeHumanTaskUiResponse */ -const de_ListStageDevicesResponse = (output: any, context: __SerdeContext): ListStageDevicesResponse => { - return { - DeviceDeploymentSummaries: - output.DeviceDeploymentSummaries != null - ? de_DeviceDeploymentSummaries(output.DeviceDeploymentSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_DescribeHumanTaskUiResponse = (output: any, context: __SerdeContext): DescribeHumanTaskUiResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HumanTaskUiArn: __expectString, + HumanTaskUiName: __expectString, + HumanTaskUiStatus: __expectString, + UiTemplate: _json, + }) as any; }; /** - * deserializeAws_json1_1ListStudioLifecycleConfigsResponse + * deserializeAws_json1_1DescribeHyperParameterTuningJobResponse */ -const de_ListStudioLifecycleConfigsResponse = ( +const de_DescribeHyperParameterTuningJobResponse = ( output: any, context: __SerdeContext -): ListStudioLifecycleConfigsResponse => { - return { - NextToken: __expectString(output.NextToken), - StudioLifecycleConfigs: - output.StudioLifecycleConfigs != null - ? de_StudioLifecycleConfigsList(output.StudioLifecycleConfigs, context) - : undefined, - } as any; +): DescribeHyperParameterTuningJobResponse => { + return take(output, { + BestTrainingJob: (_: any) => de_HyperParameterTrainingJobSummary(_, context), + ConsumedResources: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + HyperParameterTuningEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HyperParameterTuningJobArn: __expectString, + HyperParameterTuningJobConfig: (_: any) => de_HyperParameterTuningJobConfig(_, context), + HyperParameterTuningJobName: __expectString, + HyperParameterTuningJobStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectiveStatusCounters: _json, + OverallBestTrainingJob: (_: any) => de_HyperParameterTrainingJobSummary(_, context), + TrainingJobDefinition: _json, + TrainingJobDefinitions: _json, + TrainingJobStatusCounters: _json, + TuningJobCompletionDetails: (_: any) => de_HyperParameterTuningJobCompletionDetails(_, context), + WarmStartConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1ListSubscribedWorkteamsResponse + * deserializeAws_json1_1DescribeImageResponse */ -const de_ListSubscribedWorkteamsResponse = (output: any, context: __SerdeContext): ListSubscribedWorkteamsResponse => { - return { - NextToken: __expectString(output.NextToken), - SubscribedWorkteams: - output.SubscribedWorkteams != null ? de_SubscribedWorkteams(output.SubscribedWorkteams, context) : undefined, - } as any; +const de_DescribeImageResponse = (output: any, context: __SerdeContext): DescribeImageResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + FailureReason: __expectString, + ImageArn: __expectString, + ImageName: __expectString, + ImageStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListTagsOutput + * deserializeAws_json1_1DescribeImageVersionResponse */ -const de_ListTagsOutput = (output: any, context: __SerdeContext): ListTagsOutput => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_DescribeImageVersionResponse = (output: any, context: __SerdeContext): DescribeImageVersionResponse => { + return take(output, { + BaseImage: __expectString, + ContainerImage: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + Horovod: __expectBoolean, + ImageArn: __expectString, + ImageVersionArn: __expectString, + ImageVersionStatus: __expectString, + JobType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MLFramework: __expectString, + Processor: __expectString, + ProgrammingLang: __expectString, + ReleaseNotes: __expectString, + VendorGuidance: __expectString, + Version: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1ListTrainingJobsForHyperParameterTuningJobResponse + * deserializeAws_json1_1DescribeInferenceExperimentResponse */ -const de_ListTrainingJobsForHyperParameterTuningJobResponse = ( +const de_DescribeInferenceExperimentResponse = ( output: any, context: __SerdeContext -): ListTrainingJobsForHyperParameterTuningJobResponse => { - return { - NextToken: __expectString(output.NextToken), - TrainingJobSummaries: - output.TrainingJobSummaries != null - ? de_HyperParameterTrainingJobSummaries(output.TrainingJobSummaries, context) - : undefined, - } as any; +): DescribeInferenceExperimentResponse => { + return take(output, { + Arn: __expectString, + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataStorageConfig: _json, + Description: __expectString, + EndpointMetadata: _json, + KmsKey: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelVariants: _json, + Name: __expectString, + RoleArn: __expectString, + Schedule: (_: any) => de_InferenceExperimentSchedule(_, context), + ShadowModeConfig: _json, + Status: __expectString, + StatusReason: __expectString, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListTrainingJobsResponse + * deserializeAws_json1_1DescribeInferenceRecommendationsJobResponse */ -const de_ListTrainingJobsResponse = (output: any, context: __SerdeContext): ListTrainingJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - TrainingJobSummaries: - output.TrainingJobSummaries != null ? de_TrainingJobSummaries(output.TrainingJobSummaries, context) : undefined, - } as any; +const de_DescribeInferenceRecommendationsJobResponse = ( + output: any, + context: __SerdeContext +): DescribeInferenceRecommendationsJobResponse => { + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointPerformances: _json, + FailureReason: __expectString, + InferenceRecommendations: (_: any) => de_InferenceRecommendations(_, context), + InputConfig: _json, + JobArn: __expectString, + JobDescription: __expectString, + JobName: __expectString, + JobType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + Status: __expectString, + StoppingConditions: _json, + }) as any; }; /** - * deserializeAws_json1_1ListTransformJobsResponse + * deserializeAws_json1_1DescribeLabelingJobResponse */ -const de_ListTransformJobsResponse = (output: any, context: __SerdeContext): ListTransformJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - TransformJobSummaries: - output.TransformJobSummaries != null - ? de_TransformJobSummaries(output.TransformJobSummaries, context) - : undefined, - } as any; +const de_DescribeLabelingJobResponse = (output: any, context: __SerdeContext): DescribeLabelingJobResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + HumanTaskConfig: _json, + InputConfig: _json, + JobReferenceCode: __expectString, + LabelAttributeName: __expectString, + LabelCategoryConfigS3Uri: __expectString, + LabelCounters: _json, + LabelingJobAlgorithmsConfig: _json, + LabelingJobArn: __expectString, + LabelingJobName: __expectString, + LabelingJobOutput: _json, + LabelingJobStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OutputConfig: _json, + RoleArn: __expectString, + StoppingConditions: _json, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1ListTrialComponentsResponse + * deserializeAws_json1_1DescribeLineageGroupResponse */ -const de_ListTrialComponentsResponse = (output: any, context: __SerdeContext): ListTrialComponentsResponse => { - return { - NextToken: __expectString(output.NextToken), - TrialComponentSummaries: - output.TrialComponentSummaries != null - ? de_TrialComponentSummaries(output.TrialComponentSummaries, context) - : undefined, - } as any; +const de_DescribeLineageGroupResponse = (output: any, context: __SerdeContext): DescribeLineageGroupResponse => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + LineageGroupName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListTrialsResponse + * deserializeAws_json1_1DescribeModelBiasJobDefinitionResponse */ -const de_ListTrialsResponse = (output: any, context: __SerdeContext): ListTrialsResponse => { - return { - NextToken: __expectString(output.NextToken), - TrialSummaries: output.TrialSummaries != null ? de_TrialSummaries(output.TrialSummaries, context) : undefined, - } as any; +const de_DescribeModelBiasJobDefinitionResponse = ( + output: any, + context: __SerdeContext +): DescribeModelBiasJobDefinitionResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobDefinitionArn: __expectString, + JobDefinitionName: __expectString, + JobResources: _json, + ModelBiasAppSpecification: _json, + ModelBiasBaselineConfig: _json, + ModelBiasJobInput: (_: any) => de_ModelBiasJobInput(_, context), + ModelBiasJobOutputConfig: _json, + NetworkConfig: _json, + RoleArn: __expectString, + StoppingCondition: _json, + }) as any; }; /** - * deserializeAws_json1_1ListUserProfilesResponse + * deserializeAws_json1_1DescribeModelCardExportJobResponse */ -const de_ListUserProfilesResponse = (output: any, context: __SerdeContext): ListUserProfilesResponse => { - return { - NextToken: __expectString(output.NextToken), - UserProfiles: output.UserProfiles != null ? de_UserProfileList(output.UserProfiles, context) : undefined, - } as any; +const de_DescribeModelCardExportJobResponse = ( + output: any, + context: __SerdeContext +): DescribeModelCardExportJobResponse => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExportArtifacts: _json, + FailureReason: __expectString, + LastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardExportJobArn: __expectString, + ModelCardExportJobName: __expectString, + ModelCardName: __expectString, + ModelCardVersion: __expectInt32, + OutputConfig: _json, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ListWorkforcesResponse + * deserializeAws_json1_1DescribeModelCardResponse */ -const de_ListWorkforcesResponse = (output: any, context: __SerdeContext): ListWorkforcesResponse => { - return { - NextToken: __expectString(output.NextToken), - Workforces: output.Workforces != null ? de_Workforces(output.Workforces, context) : undefined, - } as any; +const de_DescribeModelCardResponse = (output: any, context: __SerdeContext): DescribeModelCardResponse => { + return take(output, { + Content: __expectString, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardArn: __expectString, + ModelCardName: __expectString, + ModelCardProcessingStatus: __expectString, + ModelCardStatus: __expectString, + ModelCardVersion: __expectInt32, + SecurityConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1ListWorkteamsResponse + * deserializeAws_json1_1DescribeModelExplainabilityJobDefinitionResponse */ -const de_ListWorkteamsResponse = (output: any, context: __SerdeContext): ListWorkteamsResponse => { - return { - NextToken: __expectString(output.NextToken), - Workteams: output.Workteams != null ? de_Workteams(output.Workteams, context) : undefined, - } as any; +const de_DescribeModelExplainabilityJobDefinitionResponse = ( + output: any, + context: __SerdeContext +): DescribeModelExplainabilityJobDefinitionResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobDefinitionArn: __expectString, + JobDefinitionName: __expectString, + JobResources: _json, + ModelExplainabilityAppSpecification: _json, + ModelExplainabilityBaselineConfig: _json, + ModelExplainabilityJobInput: (_: any) => de_ModelExplainabilityJobInput(_, context), + ModelExplainabilityJobOutputConfig: _json, + NetworkConfig: _json, + RoleArn: __expectString, + StoppingCondition: _json, + }) as any; }; /** - * deserializeAws_json1_1MemberDefinition + * deserializeAws_json1_1DescribeModelOutput */ -const de_MemberDefinition = (output: any, context: __SerdeContext): MemberDefinition => { - return { - CognitoMemberDefinition: - output.CognitoMemberDefinition != null - ? de_CognitoMemberDefinition(output.CognitoMemberDefinition, context) - : undefined, - OidcMemberDefinition: - output.OidcMemberDefinition != null ? de_OidcMemberDefinition(output.OidcMemberDefinition, context) : undefined, - } as any; +const de_DescribeModelOutput = (output: any, context: __SerdeContext): DescribeModelOutput => { + return take(output, { + Containers: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnableNetworkIsolation: __expectBoolean, + ExecutionRoleArn: __expectString, + InferenceExecutionConfig: _json, + ModelArn: __expectString, + ModelName: __expectString, + PrimaryContainer: _json, + VpcConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1MemberDefinitions + * deserializeAws_json1_1DescribeModelPackageGroupOutput */ -const de_MemberDefinitions = (output: any, context: __SerdeContext): MemberDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MemberDefinition(entry, context); - }); - return retVal; +const de_DescribeModelPackageGroupOutput = (output: any, context: __SerdeContext): DescribeModelPackageGroupOutput => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelPackageGroupArn: __expectString, + ModelPackageGroupDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageGroupStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MetadataProperties + * deserializeAws_json1_1DescribeModelPackageOutput */ -const de_MetadataProperties = (output: any, context: __SerdeContext): MetadataProperties => { - return { - CommitId: __expectString(output.CommitId), - GeneratedBy: __expectString(output.GeneratedBy), - ProjectId: __expectString(output.ProjectId), - Repository: __expectString(output.Repository), - } as any; +const de_DescribeModelPackageOutput = (output: any, context: __SerdeContext): DescribeModelPackageOutput => { + return take(output, { + AdditionalInferenceSpecifications: _json, + ApprovalDescription: __expectString, + CertifyForMarketplace: __expectBoolean, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomerMetadataProperties: _json, + Domain: __expectString, + DriftCheckBaselines: _json, + InferenceSpecification: _json, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetadataProperties: _json, + ModelApprovalStatus: __expectString, + ModelMetrics: _json, + ModelPackageArn: __expectString, + ModelPackageDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageName: __expectString, + ModelPackageStatus: __expectString, + ModelPackageStatusDetails: _json, + ModelPackageVersion: __expectInt32, + SamplePayloadUrl: __expectString, + SourceAlgorithmSpecification: _json, + Task: __expectString, + ValidationSpecification: _json, + }) as any; }; /** - * deserializeAws_json1_1MetricData + * deserializeAws_json1_1DescribeModelQualityJobDefinitionResponse */ -const de_MetricData = (output: any, context: __SerdeContext): MetricData => { - return { - MetricName: __expectString(output.MetricName), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Value: __limitedParseFloat32(output.Value), - } as any; +const de_DescribeModelQualityJobDefinitionResponse = ( + output: any, + context: __SerdeContext +): DescribeModelQualityJobDefinitionResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobDefinitionArn: __expectString, + JobDefinitionName: __expectString, + JobResources: _json, + ModelQualityAppSpecification: _json, + ModelQualityBaselineConfig: _json, + ModelQualityJobInput: (_: any) => de_ModelQualityJobInput(_, context), + ModelQualityJobOutputConfig: _json, + NetworkConfig: _json, + RoleArn: __expectString, + StoppingCondition: _json, + }) as any; }; /** - * deserializeAws_json1_1MetricDataList + * deserializeAws_json1_1DescribeMonitoringScheduleResponse */ -const de_MetricDataList = (output: any, context: __SerdeContext): MetricDatum[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDatum(entry, context); - }); - return retVal; +const de_DescribeMonitoringScheduleResponse = ( + output: any, + context: __SerdeContext +): DescribeMonitoringScheduleResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastMonitoringExecutionSummary: (_: any) => de_MonitoringExecutionSummary(_, context), + MonitoringScheduleArn: __expectString, + MonitoringScheduleConfig: (_: any) => de_MonitoringScheduleConfig(_, context), + MonitoringScheduleName: __expectString, + MonitoringScheduleStatus: __expectString, + MonitoringType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MetricDatum + * deserializeAws_json1_1DescribeNotebookInstanceLifecycleConfigOutput */ -const de_MetricDatum = (output: any, context: __SerdeContext): MetricDatum => { - return { - MetricName: __expectString(output.MetricName), - Set: __expectString(output.Set), - StandardMetricName: __expectString(output.StandardMetricName), - Value: __limitedParseFloat32(output.Value), - } as any; +const de_DescribeNotebookInstanceLifecycleConfigOutput = ( + output: any, + context: __SerdeContext +): DescribeNotebookInstanceLifecycleConfigOutput => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotebookInstanceLifecycleConfigArn: __expectString, + NotebookInstanceLifecycleConfigName: __expectString, + OnCreate: _json, + OnStart: _json, + }) as any; }; /** - * deserializeAws_json1_1MetricDefinition + * deserializeAws_json1_1DescribeNotebookInstanceOutput */ -const de_MetricDefinition = (output: any, context: __SerdeContext): MetricDefinition => { - return { - Name: __expectString(output.Name), - Regex: __expectString(output.Regex), - } as any; +const de_DescribeNotebookInstanceOutput = (output: any, context: __SerdeContext): DescribeNotebookInstanceOutput => { + return take(output, { + AcceleratorTypes: _json, + AdditionalCodeRepositories: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultCodeRepository: __expectString, + DirectInternetAccess: __expectString, + FailureReason: __expectString, + InstanceMetadataServiceConfiguration: _json, + InstanceType: __expectString, + KmsKeyId: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NetworkInterfaceId: __expectString, + NotebookInstanceArn: __expectString, + NotebookInstanceLifecycleConfigName: __expectString, + NotebookInstanceName: __expectString, + NotebookInstanceStatus: __expectString, + PlatformIdentifier: __expectString, + RoleArn: __expectString, + RootAccess: __expectString, + SecurityGroups: _json, + SubnetId: __expectString, + Url: __expectString, + VolumeSizeInGB: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1MetricDefinitionList + * deserializeAws_json1_1DescribePipelineDefinitionForExecutionResponse */ -const de_MetricDefinitionList = (output: any, context: __SerdeContext): MetricDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDefinition(entry, context); - }); - return retVal; +const de_DescribePipelineDefinitionForExecutionResponse = ( + output: any, + context: __SerdeContext +): DescribePipelineDefinitionForExecutionResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PipelineDefinition: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MetricsSource + * deserializeAws_json1_1DescribePipelineExecutionResponse */ -const de_MetricsSource = (output: any, context: __SerdeContext): MetricsSource => { - return { - ContentDigest: __expectString(output.ContentDigest), - ContentType: __expectString(output.ContentType), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_DescribePipelineExecutionResponse = ( + output: any, + context: __SerdeContext +): DescribePipelineExecutionResponse => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParallelismConfiguration: _json, + PipelineArn: __expectString, + PipelineExecutionArn: __expectString, + PipelineExecutionDescription: __expectString, + PipelineExecutionDisplayName: __expectString, + PipelineExecutionStatus: __expectString, + PipelineExperimentConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1Model + * deserializeAws_json1_1DescribePipelineResponse */ -const de_Model = (output: any, context: __SerdeContext): Model => { - return { - Containers: output.Containers != null ? de_ContainerDefinitionList(output.Containers, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - InferenceExecutionConfig: - output.InferenceExecutionConfig != null - ? de_InferenceExecutionConfig(output.InferenceExecutionConfig, context) - : undefined, - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - PrimaryContainer: - output.PrimaryContainer != null ? de_ContainerDefinition(output.PrimaryContainer, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ModelArtifacts - */ -const de_ModelArtifacts = (output: any, context: __SerdeContext): ModelArtifacts => { - return { - S3ModelArtifacts: __expectString(output.S3ModelArtifacts), - } as any; +const de_DescribePipelineResponse = (output: any, context: __SerdeContext): DescribePipelineResponse => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRunTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParallelismConfiguration: _json, + PipelineArn: __expectString, + PipelineDefinition: __expectString, + PipelineDescription: __expectString, + PipelineDisplayName: __expectString, + PipelineName: __expectString, + PipelineStatus: __expectString, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelBiasAppSpecification + * deserializeAws_json1_1DescribeProcessingJobResponse */ -const de_ModelBiasAppSpecification = (output: any, context: __SerdeContext): ModelBiasAppSpecification => { - return { - ConfigUri: __expectString(output.ConfigUri), - Environment: output.Environment != null ? de_MonitoringEnvironmentMap(output.Environment, context) : undefined, - ImageUri: __expectString(output.ImageUri), - } as any; +const de_DescribeProcessingJobResponse = (output: any, context: __SerdeContext): DescribeProcessingJobResponse => { + return take(output, { + AppSpecification: _json, + AutoMLJobArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Environment: _json, + ExitMessage: __expectString, + ExperimentConfig: _json, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringScheduleArn: __expectString, + NetworkConfig: _json, + ProcessingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProcessingInputs: _json, + ProcessingJobArn: __expectString, + ProcessingJobName: __expectString, + ProcessingJobStatus: __expectString, + ProcessingOutputConfig: _json, + ProcessingResources: _json, + ProcessingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + StoppingCondition: _json, + TrainingJobArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelBiasBaselineConfig + * deserializeAws_json1_1DescribeProjectOutput */ -const de_ModelBiasBaselineConfig = (output: any, context: __SerdeContext): ModelBiasBaselineConfig => { - return { - BaseliningJobName: __expectString(output.BaseliningJobName), - ConstraintsResource: - output.ConstraintsResource != null - ? de_MonitoringConstraintsResource(output.ConstraintsResource, context) - : undefined, - } as any; +const de_DescribeProjectOutput = (output: any, context: __SerdeContext): DescribeProjectOutput => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectArn: __expectString, + ProjectDescription: __expectString, + ProjectId: __expectString, + ProjectName: __expectString, + ProjectStatus: __expectString, + ServiceCatalogProvisionedProductDetails: _json, + ServiceCatalogProvisioningDetails: _json, + }) as any; }; /** - * deserializeAws_json1_1ModelBiasJobInput + * deserializeAws_json1_1DescribeSpaceResponse */ -const de_ModelBiasJobInput = (output: any, context: __SerdeContext): ModelBiasJobInput => { - return { - BatchTransformInput: - output.BatchTransformInput != null ? de_BatchTransformInput(output.BatchTransformInput, context) : undefined, - EndpointInput: output.EndpointInput != null ? de_EndpointInput(output.EndpointInput, context) : undefined, - GroundTruthS3Input: - output.GroundTruthS3Input != null - ? de_MonitoringGroundTruthS3Input(output.GroundTruthS3Input, context) - : undefined, - } as any; +const de_DescribeSpaceResponse = (output: any, context: __SerdeContext): DescribeSpaceResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + FailureReason: __expectString, + HomeEfsFileSystemUid: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SpaceArn: __expectString, + SpaceName: __expectString, + SpaceSettings: _json, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelCard + * deserializeAws_json1_1DescribeStudioLifecycleConfigResponse */ -const de_ModelCard = (output: any, context: __SerdeContext): ModelCard => { - return { - Content: __expectString(output.Content), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelCardArn: __expectString(output.ModelCardArn), - ModelCardName: __expectString(output.ModelCardName), - ModelCardStatus: __expectString(output.ModelCardStatus), - ModelCardVersion: __expectInt32(output.ModelCardVersion), - ModelId: __expectString(output.ModelId), - RiskRating: __expectString(output.RiskRating), - SecurityConfig: - output.SecurityConfig != null ? de_ModelCardSecurityConfig(output.SecurityConfig, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ModelCardExportArtifacts - */ -const de_ModelCardExportArtifacts = (output: any, context: __SerdeContext): ModelCardExportArtifacts => { - return { - S3ExportArtifacts: __expectString(output.S3ExportArtifacts), - } as any; +const de_DescribeStudioLifecycleConfigResponse = ( + output: any, + context: __SerdeContext +): DescribeStudioLifecycleConfigResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StudioLifecycleConfigAppType: __expectString, + StudioLifecycleConfigArn: __expectString, + StudioLifecycleConfigContent: __expectString, + StudioLifecycleConfigName: __expectString, + }) as any; }; +// de_DescribeSubscribedWorkteamResponse omitted. + /** - * deserializeAws_json1_1ModelCardExportJobSummary + * deserializeAws_json1_1DescribeTrainingJobResponse */ -const de_ModelCardExportJobSummary = (output: any, context: __SerdeContext): ModelCardExportJobSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - LastModifiedAt: - output.LastModifiedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedAt))) - : undefined, - ModelCardExportJobArn: __expectString(output.ModelCardExportJobArn), - ModelCardExportJobName: __expectString(output.ModelCardExportJobName), - ModelCardName: __expectString(output.ModelCardName), - ModelCardVersion: __expectInt32(output.ModelCardVersion), - Status: __expectString(output.Status), - } as any; +const de_DescribeTrainingJobResponse = (output: any, context: __SerdeContext): DescribeTrainingJobResponse => { + return take(output, { + AlgorithmSpecification: _json, + AutoMLJobArn: __expectString, + BillableTimeInSeconds: __expectInt32, + CheckpointConfig: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DebugHookConfig: _json, + DebugRuleConfigurations: _json, + DebugRuleEvaluationStatuses: (_: any) => de_DebugRuleEvaluationStatuses(_, context), + EnableInterContainerTrafficEncryption: __expectBoolean, + EnableManagedSpotTraining: __expectBoolean, + EnableNetworkIsolation: __expectBoolean, + Environment: _json, + ExperimentConfig: _json, + FailureReason: __expectString, + FinalMetricDataList: (_: any) => de_FinalMetricDataList(_, context), + HyperParameters: _json, + InputDataConfig: _json, + LabelingJobArn: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelArtifacts: _json, + OutputDataConfig: _json, + ProfilerConfig: _json, + ProfilerRuleConfigurations: _json, + ProfilerRuleEvaluationStatuses: (_: any) => de_ProfilerRuleEvaluationStatuses(_, context), + ProfilingStatus: __expectString, + ResourceConfig: _json, + RetryStrategy: _json, + RoleArn: __expectString, + SecondaryStatus: __expectString, + SecondaryStatusTransitions: (_: any) => de_SecondaryStatusTransitions(_, context), + StoppingCondition: _json, + TensorBoardOutputConfig: _json, + TrainingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingJobArn: __expectString, + TrainingJobName: __expectString, + TrainingJobStatus: __expectString, + TrainingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingTimeInSeconds: __expectInt32, + TuningJobArn: __expectString, + VpcConfig: _json, + WarmPoolStatus: _json, + }) as any; }; /** - * deserializeAws_json1_1ModelCardExportJobSummaryList + * deserializeAws_json1_1DescribeTransformJobResponse */ -const de_ModelCardExportJobSummaryList = (output: any, context: __SerdeContext): ModelCardExportJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelCardExportJobSummary(entry, context); - }); - return retVal; +const de_DescribeTransformJobResponse = (output: any, context: __SerdeContext): DescribeTransformJobResponse => { + return take(output, { + AutoMLJobArn: __expectString, + BatchStrategy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataCaptureConfig: _json, + DataProcessing: _json, + Environment: _json, + ExperimentConfig: _json, + FailureReason: __expectString, + LabelingJobArn: __expectString, + MaxConcurrentTransforms: __expectInt32, + MaxPayloadInMB: __expectInt32, + ModelClientConfig: _json, + ModelName: __expectString, + TransformEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransformInput: _json, + TransformJobArn: __expectString, + TransformJobName: __expectString, + TransformJobStatus: __expectString, + TransformOutput: _json, + TransformResources: _json, + TransformStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ModelCardExportOutputConfig + * deserializeAws_json1_1DescribeTrialComponentResponse */ -const de_ModelCardExportOutputConfig = (output: any, context: __SerdeContext): ModelCardExportOutputConfig => { - return { - S3OutputPath: __expectString(output.S3OutputPath), - } as any; +const de_DescribeTrialComponentResponse = (output: any, context: __SerdeContext): DescribeTrialComponentResponse => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputArtifacts: _json, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + MetadataProperties: _json, + Metrics: (_: any) => de_TrialComponentMetricSummaries(_, context), + OutputArtifacts: _json, + Parameters: (_: any) => de_TrialComponentParameters(_, context), + Source: _json, + Sources: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: _json, + TrialComponentArn: __expectString, + TrialComponentName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelCardSecurityConfig + * deserializeAws_json1_1DescribeTrialResponse */ -const de_ModelCardSecurityConfig = (output: any, context: __SerdeContext): ModelCardSecurityConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - } as any; +const de_DescribeTrialResponse = (output: any, context: __SerdeContext): DescribeTrialResponse => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + ExperimentName: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetadataProperties: _json, + Source: _json, + TrialArn: __expectString, + TrialName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelCardSummary + * deserializeAws_json1_1DescribeUserProfileResponse */ -const de_ModelCardSummary = (output: any, context: __SerdeContext): ModelCardSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelCardArn: __expectString(output.ModelCardArn), - ModelCardName: __expectString(output.ModelCardName), - ModelCardStatus: __expectString(output.ModelCardStatus), - } as any; +const de_DescribeUserProfileResponse = (output: any, context: __SerdeContext): DescribeUserProfileResponse => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + FailureReason: __expectString, + HomeEfsFileSystemUid: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SingleSignOnUserIdentifier: __expectString, + SingleSignOnUserValue: __expectString, + Status: __expectString, + UserProfileArn: __expectString, + UserProfileName: __expectString, + UserSettings: _json, + }) as any; }; /** - * deserializeAws_json1_1ModelCardSummaryList + * deserializeAws_json1_1DescribeWorkforceResponse */ -const de_ModelCardSummaryList = (output: any, context: __SerdeContext): ModelCardSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelCardSummary(entry, context); - }); - return retVal; +const de_DescribeWorkforceResponse = (output: any, context: __SerdeContext): DescribeWorkforceResponse => { + return take(output, { + Workforce: (_: any) => de_Workforce(_, context), + }) as any; }; /** - * deserializeAws_json1_1ModelCardVersionSummary + * deserializeAws_json1_1DescribeWorkteamResponse */ -const de_ModelCardVersionSummary = (output: any, context: __SerdeContext): ModelCardVersionSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelCardArn: __expectString(output.ModelCardArn), - ModelCardName: __expectString(output.ModelCardName), - ModelCardStatus: __expectString(output.ModelCardStatus), - ModelCardVersion: __expectInt32(output.ModelCardVersion), - } as any; +const de_DescribeWorkteamResponse = (output: any, context: __SerdeContext): DescribeWorkteamResponse => { + return take(output, { + Workteam: (_: any) => de_Workteam(_, context), + }) as any; }; /** - * deserializeAws_json1_1ModelCardVersionSummaryList + * deserializeAws_json1_1DeviceDeploymentSummaries */ -const de_ModelCardVersionSummaryList = (output: any, context: __SerdeContext): ModelCardVersionSummary[] => { +const de_DeviceDeploymentSummaries = (output: any, context: __SerdeContext): DeviceDeploymentSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelCardVersionSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ModelClientConfig - */ -const de_ModelClientConfig = (output: any, context: __SerdeContext): ModelClientConfig => { - return { - InvocationsMaxRetries: __expectInt32(output.InvocationsMaxRetries), - InvocationsTimeoutInSeconds: __expectInt32(output.InvocationsTimeoutInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1ModelConfiguration - */ -const de_ModelConfiguration = (output: any, context: __SerdeContext): ModelConfiguration => { - return { - CompilationJobName: __expectString(output.CompilationJobName), - EnvironmentParameters: - output.EnvironmentParameters != null - ? de_EnvironmentParameters(output.EnvironmentParameters, context) - : undefined, - InferenceSpecificationName: __expectString(output.InferenceSpecificationName), - } as any; + return de_DeviceDeploymentSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ModelDashboardEndpoint + * deserializeAws_json1_1DeviceDeploymentSummary */ -const de_ModelDashboardEndpoint = (output: any, context: __SerdeContext): ModelDashboardEndpoint => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointArn: __expectString(output.EndpointArn), - EndpointName: __expectString(output.EndpointName), - EndpointStatus: __expectString(output.EndpointStatus), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - } as any; +const de_DeviceDeploymentSummary = (output: any, context: __SerdeContext): DeviceDeploymentSummary => { + return take(output, { + DeployedStageName: __expectString, + DeploymentStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceArn: __expectString, + DeviceDeploymentStatus: __expectString, + DeviceDeploymentStatusMessage: __expectString, + DeviceFleetName: __expectString, + DeviceName: __expectString, + EdgeDeploymentPlanArn: __expectString, + EdgeDeploymentPlanName: __expectString, + StageName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelDashboardEndpoints + * deserializeAws_json1_1DeviceFleetSummaries */ -const de_ModelDashboardEndpoints = (output: any, context: __SerdeContext): ModelDashboardEndpoint[] => { +const de_DeviceFleetSummaries = (output: any, context: __SerdeContext): DeviceFleetSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelDashboardEndpoint(entry, context); + return de_DeviceFleetSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ModelDashboardIndicatorAction + * deserializeAws_json1_1DeviceFleetSummary */ -const de_ModelDashboardIndicatorAction = (output: any, context: __SerdeContext): ModelDashboardIndicatorAction => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; +const de_DeviceFleetSummary = (output: any, context: __SerdeContext): DeviceFleetSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceFleetArn: __expectString, + DeviceFleetName: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DeviceNames omitted. + +// de_DeviceSelectionConfig omitted. + +// de_DeviceStats omitted. + /** - * deserializeAws_json1_1ModelDashboardModel + * deserializeAws_json1_1DeviceSummaries */ -const de_ModelDashboardModel = (output: any, context: __SerdeContext): ModelDashboardModel => { - return { - Endpoints: output.Endpoints != null ? de_ModelDashboardEndpoints(output.Endpoints, context) : undefined, - LastBatchTransformJob: - output.LastBatchTransformJob != null ? de_TransformJob(output.LastBatchTransformJob, context) : undefined, - Model: output.Model != null ? de_Model(output.Model, context) : undefined, - ModelCard: output.ModelCard != null ? de_ModelDashboardModelCard(output.ModelCard, context) : undefined, - MonitoringSchedules: - output.MonitoringSchedules != null - ? de_ModelDashboardMonitoringSchedules(output.MonitoringSchedules, context) - : undefined, - } as any; +const de_DeviceSummaries = (output: any, context: __SerdeContext): DeviceSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DeviceSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ModelDashboardModelCard + * deserializeAws_json1_1DeviceSummary */ -const de_ModelDashboardModelCard = (output: any, context: __SerdeContext): ModelDashboardModelCard => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelCardArn: __expectString(output.ModelCardArn), - ModelCardName: __expectString(output.ModelCardName), - ModelCardStatus: __expectString(output.ModelCardStatus), - ModelCardVersion: __expectInt32(output.ModelCardVersion), - ModelId: __expectString(output.ModelId), - RiskRating: __expectString(output.RiskRating), - SecurityConfig: - output.SecurityConfig != null ? de_ModelCardSecurityConfig(output.SecurityConfig, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_DeviceSummary = (output: any, context: __SerdeContext): DeviceSummary => { + return take(output, { + AgentVersion: __expectString, + Description: __expectString, + DeviceArn: __expectString, + DeviceFleetName: __expectString, + DeviceName: __expectString, + IotThingName: __expectString, + LatestHeartbeat: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Models: _json, + RegistrationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_DisableSagemakerServicecatalogPortfolioOutput omitted. + +// de_DisassociateTrialComponentResponse omitted. + /** - * deserializeAws_json1_1ModelDashboardMonitoringSchedule + * deserializeAws_json1_1DomainDetails */ -const de_ModelDashboardMonitoringSchedule = ( - output: any, - context: __SerdeContext -): ModelDashboardMonitoringSchedule => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointName: __expectString(output.EndpointName), - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastMonitoringExecutionSummary: - output.LastMonitoringExecutionSummary != null - ? de_MonitoringExecutionSummary(output.LastMonitoringExecutionSummary, context) - : undefined, - MonitoringAlertSummaries: - output.MonitoringAlertSummaries != null - ? de_MonitoringAlertSummaryList(output.MonitoringAlertSummaries, context) - : undefined, - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - MonitoringScheduleConfig: - output.MonitoringScheduleConfig != null - ? de_MonitoringScheduleConfig(output.MonitoringScheduleConfig, context) - : undefined, - MonitoringScheduleName: __expectString(output.MonitoringScheduleName), - MonitoringScheduleStatus: __expectString(output.MonitoringScheduleStatus), - MonitoringType: __expectString(output.MonitoringType), - } as any; +const de_DomainDetails = (output: any, context: __SerdeContext): DomainDetails => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainArn: __expectString, + DomainId: __expectString, + DomainName: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Url: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelDashboardMonitoringSchedules + * deserializeAws_json1_1DomainList */ -const de_ModelDashboardMonitoringSchedules = ( - output: any, - context: __SerdeContext -): ModelDashboardMonitoringSchedule[] => { +const de_DomainList = (output: any, context: __SerdeContext): DomainDetails[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelDashboardMonitoringSchedule(entry, context); + return de_DomainDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ModelDataQuality - */ -const de_ModelDataQuality = (output: any, context: __SerdeContext): ModelDataQuality => { - return { - Constraints: output.Constraints != null ? de_MetricsSource(output.Constraints, context) : undefined, - Statistics: output.Statistics != null ? de_MetricsSource(output.Statistics, context) : undefined, - } as any; -}; +// de_DomainSecurityGroupIds omitted. + +// de_DomainSettings omitted. + +// de_DriftCheckBaselines omitted. + +// de_DriftCheckBias omitted. + +// de_DriftCheckExplainability omitted. + +// de_DriftCheckModelDataQuality omitted. + +// de_DriftCheckModelQuality omitted. + +// de_Edge omitted. + +// de_EdgeDeploymentConfig omitted. + +// de_EdgeDeploymentModelConfig omitted. + +// de_EdgeDeploymentModelConfigs omitted. /** - * deserializeAws_json1_1ModelDeployConfig + * deserializeAws_json1_1EdgeDeploymentPlanSummaries */ -const de_ModelDeployConfig = (output: any, context: __SerdeContext): ModelDeployConfig => { - return { - AutoGenerateEndpointName: __expectBoolean(output.AutoGenerateEndpointName), - EndpointName: __expectString(output.EndpointName), - } as any; +const de_EdgeDeploymentPlanSummaries = (output: any, context: __SerdeContext): EdgeDeploymentPlanSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_EdgeDeploymentPlanSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ModelDeployResult + * deserializeAws_json1_1EdgeDeploymentPlanSummary */ -const de_ModelDeployResult = (output: any, context: __SerdeContext): ModelDeployResult => { - return { - EndpointName: __expectString(output.EndpointName), - } as any; +const de_EdgeDeploymentPlanSummary = (output: any, context: __SerdeContext): EdgeDeploymentPlanSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeviceFleetName: __expectString, + EdgeDeploymentFailed: __expectInt32, + EdgeDeploymentPending: __expectInt32, + EdgeDeploymentPlanArn: __expectString, + EdgeDeploymentPlanName: __expectString, + EdgeDeploymentSuccess: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ModelDigests + * deserializeAws_json1_1EdgeDeploymentStatus */ -const de_ModelDigests = (output: any, context: __SerdeContext): ModelDigests => { - return { - ArtifactDigest: __expectString(output.ArtifactDigest), - } as any; +const de_EdgeDeploymentStatus = (output: any, context: __SerdeContext): EdgeDeploymentStatus => { + return take(output, { + EdgeDeploymentFailedInStage: __expectInt32, + EdgeDeploymentPendingInStage: __expectInt32, + EdgeDeploymentStageStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgeDeploymentStatusMessage: __expectString, + EdgeDeploymentSuccessInStage: __expectInt32, + StageStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelExplainabilityAppSpecification + * deserializeAws_json1_1EdgeModel */ -const de_ModelExplainabilityAppSpecification = ( - output: any, - context: __SerdeContext -): ModelExplainabilityAppSpecification => { - return { - ConfigUri: __expectString(output.ConfigUri), - Environment: output.Environment != null ? de_MonitoringEnvironmentMap(output.Environment, context) : undefined, - ImageUri: __expectString(output.ImageUri), - } as any; +const de_EdgeModel = (output: any, context: __SerdeContext): EdgeModel => { + return take(output, { + LatestInference: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestSampleTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelName: __expectString, + ModelVersion: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelExplainabilityBaselineConfig + * deserializeAws_json1_1EdgeModels */ -const de_ModelExplainabilityBaselineConfig = ( - output: any, - context: __SerdeContext -): ModelExplainabilityBaselineConfig => { - return { - BaseliningJobName: __expectString(output.BaseliningJobName), - ConstraintsResource: - output.ConstraintsResource != null - ? de_MonitoringConstraintsResource(output.ConstraintsResource, context) - : undefined, - } as any; +const de_EdgeModels = (output: any, context: __SerdeContext): EdgeModel[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_EdgeModel(entry, context); + }); + return retVal; }; +// de_EdgeModelStat omitted. + +// de_EdgeModelStats omitted. + +// de_EdgeModelSummaries omitted. + +// de_EdgeModelSummary omitted. + +// de_EdgeOutputConfig omitted. + /** - * deserializeAws_json1_1ModelExplainabilityJobInput + * deserializeAws_json1_1EdgePackagingJobSummaries */ -const de_ModelExplainabilityJobInput = (output: any, context: __SerdeContext): ModelExplainabilityJobInput => { - return { - BatchTransformInput: - output.BatchTransformInput != null ? de_BatchTransformInput(output.BatchTransformInput, context) : undefined, - EndpointInput: output.EndpointInput != null ? de_EndpointInput(output.EndpointInput, context) : undefined, - } as any; +const de_EdgePackagingJobSummaries = (output: any, context: __SerdeContext): EdgePackagingJobSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_EdgePackagingJobSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ModelInfrastructureConfig + * deserializeAws_json1_1EdgePackagingJobSummary */ -const de_ModelInfrastructureConfig = (output: any, context: __SerdeContext): ModelInfrastructureConfig => { - return { - InfrastructureType: __expectString(output.InfrastructureType), - RealTimeInferenceConfig: - output.RealTimeInferenceConfig != null - ? de_RealTimeInferenceConfig(output.RealTimeInferenceConfig, context) - : undefined, - } as any; +const de_EdgePackagingJobSummary = (output: any, context: __SerdeContext): EdgePackagingJobSummary => { + return take(output, { + CompilationJobName: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EdgePackagingJobArn: __expectString, + EdgePackagingJobName: __expectString, + EdgePackagingJobStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelName: __expectString, + ModelVersion: __expectString, + }) as any; }; +// de_EdgePresetDeploymentOutput omitted. + +// de_Edges omitted. + +// de_EMRStepMetadata omitted. + +// de_EnableSagemakerServicecatalogPortfolioOutput omitted. + /** - * deserializeAws_json1_1ModelInput + * deserializeAws_json1_1Endpoint */ -const de_ModelInput = (output: any, context: __SerdeContext): ModelInput => { - return { - DataInputConfig: __expectString(output.DataInputConfig), - } as any; +const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataCaptureConfig: _json, + EndpointArn: __expectString, + EndpointConfigName: __expectString, + EndpointName: __expectString, + EndpointStatus: __expectString, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringSchedules: (_: any) => de_MonitoringScheduleList(_, context), + ProductionVariants: (_: any) => de_ProductionVariantSummaryList(_, context), + ShadowProductionVariants: (_: any) => de_ProductionVariantSummaryList(_, context), + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1ModelLatencyThreshold + * deserializeAws_json1_1EndpointConfigSummary */ -const de_ModelLatencyThreshold = (output: any, context: __SerdeContext): ModelLatencyThreshold => { - return { - Percentile: __expectString(output.Percentile), - ValueInMilliseconds: __expectInt32(output.ValueInMilliseconds), - } as any; +const de_EndpointConfigSummary = (output: any, context: __SerdeContext): EndpointConfigSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointConfigArn: __expectString, + EndpointConfigName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelLatencyThresholds + * deserializeAws_json1_1EndpointConfigSummaryList */ -const de_ModelLatencyThresholds = (output: any, context: __SerdeContext): ModelLatencyThreshold[] => { +const de_EndpointConfigSummaryList = (output: any, context: __SerdeContext): EndpointConfigSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelLatencyThreshold(entry, context); + return de_EndpointConfigSummary(entry, context); }); return retVal; }; +// de_EndpointInfo omitted. + /** - * deserializeAws_json1_1ModelMetadataSummaries + * deserializeAws_json1_1EndpointInput */ -const de_ModelMetadataSummaries = (output: any, context: __SerdeContext): ModelMetadataSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelMetadataSummary(entry, context); - }); - return retVal; +const de_EndpointInput = (output: any, context: __SerdeContext): EndpointInput => { + return take(output, { + EndTimeOffset: __expectString, + EndpointName: __expectString, + FeaturesAttribute: __expectString, + InferenceAttribute: __expectString, + LocalPath: __expectString, + ProbabilityAttribute: __expectString, + ProbabilityThresholdAttribute: __limitedParseDouble, + S3DataDistributionType: __expectString, + S3InputMode: __expectString, + StartTimeOffset: __expectString, + }) as any; }; +// de_EndpointInputConfiguration omitted. + +// de_EndpointInputConfigurations omitted. + +// de_EndpointMetadata omitted. + +// de_EndpointOutputConfiguration omitted. + +// de_EndpointPerformance omitted. + +// de_EndpointPerformances omitted. + +// de_Endpoints omitted. + /** - * deserializeAws_json1_1ModelMetadataSummary + * deserializeAws_json1_1EndpointSummary */ -const de_ModelMetadataSummary = (output: any, context: __SerdeContext): ModelMetadataSummary => { - return { - Domain: __expectString(output.Domain), - Framework: __expectString(output.Framework), - FrameworkVersion: __expectString(output.FrameworkVersion), - Model: __expectString(output.Model), - Task: __expectString(output.Task), - } as any; +const de_EndpointSummary = (output: any, context: __SerdeContext): EndpointSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointArn: __expectString, + EndpointName: __expectString, + EndpointStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ModelMetrics + * deserializeAws_json1_1EndpointSummaryList */ -const de_ModelMetrics = (output: any, context: __SerdeContext): ModelMetrics => { - return { - Bias: output.Bias != null ? de_Bias(output.Bias, context) : undefined, - Explainability: output.Explainability != null ? de_Explainability(output.Explainability, context) : undefined, - ModelDataQuality: - output.ModelDataQuality != null ? de_ModelDataQuality(output.ModelDataQuality, context) : undefined, - ModelQuality: output.ModelQuality != null ? de_ModelQuality(output.ModelQuality, context) : undefined, - } as any; +const de_EndpointSummaryList = (output: any, context: __SerdeContext): EndpointSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_EndpointSummary(entry, context); + }); + return retVal; }; +// de_EnvironmentMap omitted. + +// de_EnvironmentParameter omitted. + +// de_EnvironmentParameterRanges omitted. + +// de_EnvironmentParameters omitted. + /** - * deserializeAws_json1_1ModelPackage + * deserializeAws_json1_1Experiment */ -const de_ModelPackage = (output: any, context: __SerdeContext): ModelPackage => { - return { - AdditionalInferenceSpecifications: - output.AdditionalInferenceSpecifications != null - ? de_AdditionalInferenceSpecifications(output.AdditionalInferenceSpecifications, context) - : undefined, - ApprovalDescription: __expectString(output.ApprovalDescription), - CertifyForMarketplace: __expectBoolean(output.CertifyForMarketplace), - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - CustomerMetadataProperties: - output.CustomerMetadataProperties != null - ? de_CustomerMetadataMap(output.CustomerMetadataProperties, context) - : undefined, - Domain: __expectString(output.Domain), - DriftCheckBaselines: - output.DriftCheckBaselines != null ? de_DriftCheckBaselines(output.DriftCheckBaselines, context) : undefined, - InferenceSpecification: - output.InferenceSpecification != null - ? de_InferenceSpecification(output.InferenceSpecification, context) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - ModelApprovalStatus: __expectString(output.ModelApprovalStatus), - ModelMetrics: output.ModelMetrics != null ? de_ModelMetrics(output.ModelMetrics, context) : undefined, - ModelPackageArn: __expectString(output.ModelPackageArn), - ModelPackageDescription: __expectString(output.ModelPackageDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageName: __expectString(output.ModelPackageName), - ModelPackageStatus: __expectString(output.ModelPackageStatus), - ModelPackageStatusDetails: - output.ModelPackageStatusDetails != null - ? de_ModelPackageStatusDetails(output.ModelPackageStatusDetails, context) - : undefined, - ModelPackageVersion: __expectInt32(output.ModelPackageVersion), - SamplePayloadUrl: __expectString(output.SamplePayloadUrl), - SourceAlgorithmSpecification: - output.SourceAlgorithmSpecification != null - ? de_SourceAlgorithmSpecification(output.SourceAlgorithmSpecification, context) - : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Task: __expectString(output.Task), - ValidationSpecification: - output.ValidationSpecification != null - ? de_ModelPackageValidationSpecification(output.ValidationSpecification, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ModelPackageContainerDefinition - */ -const de_ModelPackageContainerDefinition = (output: any, context: __SerdeContext): ModelPackageContainerDefinition => { - return { - ContainerHostname: __expectString(output.ContainerHostname), - Environment: output.Environment != null ? de_EnvironmentMap(output.Environment, context) : undefined, - Framework: __expectString(output.Framework), - FrameworkVersion: __expectString(output.FrameworkVersion), - Image: __expectString(output.Image), - ImageDigest: __expectString(output.ImageDigest), - ModelDataUrl: __expectString(output.ModelDataUrl), - ModelInput: output.ModelInput != null ? de_ModelInput(output.ModelInput, context) : undefined, - NearestModelName: __expectString(output.NearestModelName), - ProductId: __expectString(output.ProductId), - } as any; +const de_Experiment = (output: any, context: __SerdeContext): Experiment => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + ExperimentArn: __expectString, + ExperimentName: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Source: _json, + Tags: _json, + }) as any; }; +// de_ExperimentConfig omitted. + +// de_ExperimentSource omitted. + /** - * deserializeAws_json1_1ModelPackageContainerDefinitionList + * deserializeAws_json1_1ExperimentSummaries */ -const de_ModelPackageContainerDefinitionList = ( - output: any, - context: __SerdeContext -): ModelPackageContainerDefinition[] => { +const de_ExperimentSummaries = (output: any, context: __SerdeContext): ExperimentSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelPackageContainerDefinition(entry, context); + return de_ExperimentSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ModelPackageGroup + * deserializeAws_json1_1ExperimentSummary */ -const de_ModelPackageGroup = (output: any, context: __SerdeContext): ModelPackageGroup => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ModelPackageGroupArn: __expectString(output.ModelPackageGroupArn), - ModelPackageGroupDescription: __expectString(output.ModelPackageGroupDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageGroupStatus: __expectString(output.ModelPackageGroupStatus), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_ExperimentSummary = (output: any, context: __SerdeContext): ExperimentSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + ExperimentArn: __expectString, + ExperimentName: __expectString, + ExperimentSource: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_Explainability omitted. + +// de_ExplainerConfig omitted. + +// de_FailStepMetadata omitted. + +// de_FeatureDefinition omitted. + +// de_FeatureDefinitions omitted. + /** - * deserializeAws_json1_1ModelPackageGroupSummary + * deserializeAws_json1_1FeatureGroup */ -const de_ModelPackageGroupSummary = (output: any, context: __SerdeContext): ModelPackageGroupSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ModelPackageGroupArn: __expectString(output.ModelPackageGroupArn), - ModelPackageGroupDescription: __expectString(output.ModelPackageGroupDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageGroupStatus: __expectString(output.ModelPackageGroupStatus), - } as any; +const de_FeatureGroup = (output: any, context: __SerdeContext): FeatureGroup => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EventTimeFeatureName: __expectString, + FailureReason: __expectString, + FeatureDefinitions: _json, + FeatureGroupArn: __expectString, + FeatureGroupName: __expectString, + FeatureGroupStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateStatus: _json, + OfflineStoreConfig: _json, + OfflineStoreStatus: _json, + OnlineStoreConfig: _json, + RecordIdentifierFeatureName: __expectString, + RoleArn: __expectString, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1ModelPackageGroupSummaryList + * deserializeAws_json1_1FeatureGroupSummaries */ -const de_ModelPackageGroupSummaryList = (output: any, context: __SerdeContext): ModelPackageGroupSummary[] => { +const de_FeatureGroupSummaries = (output: any, context: __SerdeContext): FeatureGroupSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelPackageGroupSummary(entry, context); + return de_FeatureGroupSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ModelPackageStatusDetails + * deserializeAws_json1_1FeatureGroupSummary */ -const de_ModelPackageStatusDetails = (output: any, context: __SerdeContext): ModelPackageStatusDetails => { - return { - ImageScanStatuses: - output.ImageScanStatuses != null ? de_ModelPackageStatusItemList(output.ImageScanStatuses, context) : undefined, - ValidationStatuses: - output.ValidationStatuses != null ? de_ModelPackageStatusItemList(output.ValidationStatuses, context) : undefined, - } as any; +const de_FeatureGroupSummary = (output: any, context: __SerdeContext): FeatureGroupSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FeatureGroupArn: __expectString, + FeatureGroupName: __expectString, + FeatureGroupStatus: __expectString, + OfflineStoreStatus: _json, + }) as any; }; /** - * deserializeAws_json1_1ModelPackageStatusItem + * deserializeAws_json1_1FeatureMetadata */ -const de_ModelPackageStatusItem = (output: any, context: __SerdeContext): ModelPackageStatusItem => { - return { - FailureReason: __expectString(output.FailureReason), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; +const de_FeatureMetadata = (output: any, context: __SerdeContext): FeatureMetadata => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + FeatureGroupArn: __expectString, + FeatureGroupName: __expectString, + FeatureName: __expectString, + FeatureType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Parameters: _json, + }) as any; }; +// de_FeatureParameter omitted. + +// de_FeatureParameters omitted. + +// de_FileSource omitted. + +// de_FileSystemConfig omitted. + +// de_FileSystemDataSource omitted. + /** - * deserializeAws_json1_1ModelPackageStatusItemList + * deserializeAws_json1_1FinalAutoMLJobObjectiveMetric */ -const de_ModelPackageStatusItemList = (output: any, context: __SerdeContext): ModelPackageStatusItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelPackageStatusItem(entry, context); - }); - return retVal; +const de_FinalAutoMLJobObjectiveMetric = (output: any, context: __SerdeContext): FinalAutoMLJobObjectiveMetric => { + return take(output, { + MetricName: __expectString, + StandardMetricName: __expectString, + Type: __expectString, + Value: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_1ModelPackageSummaries + * deserializeAws_json1_1FinalHyperParameterTuningJobObjectiveMetric */ -const de_ModelPackageSummaries = ( +const de_FinalHyperParameterTuningJobObjectiveMetric = ( output: any, context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_BatchDescribeModelPackageSummary(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1ModelPackageSummary - */ -const de_ModelPackageSummary = (output: any, context: __SerdeContext): ModelPackageSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ModelApprovalStatus: __expectString(output.ModelApprovalStatus), - ModelPackageArn: __expectString(output.ModelPackageArn), - ModelPackageDescription: __expectString(output.ModelPackageDescription), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - ModelPackageName: __expectString(output.ModelPackageName), - ModelPackageStatus: __expectString(output.ModelPackageStatus), - ModelPackageVersion: __expectInt32(output.ModelPackageVersion), - } as any; +): FinalHyperParameterTuningJobObjectiveMetric => { + return take(output, { + MetricName: __expectString, + Type: __expectString, + Value: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_1ModelPackageSummaryList + * deserializeAws_json1_1FinalMetricDataList */ -const de_ModelPackageSummaryList = (output: any, context: __SerdeContext): ModelPackageSummary[] => { +const de_FinalMetricDataList = (output: any, context: __SerdeContext): MetricData[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelPackageSummary(entry, context); + return de_MetricData(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ModelPackageValidationProfile - */ -const de_ModelPackageValidationProfile = (output: any, context: __SerdeContext): ModelPackageValidationProfile => { - return { - ProfileName: __expectString(output.ProfileName), - TransformJobDefinition: - output.TransformJobDefinition != null - ? de_TransformJobDefinition(output.TransformJobDefinition, context) - : undefined, - } as any; -}; +// de_FlowDefinitionOutputConfig omitted. /** - * deserializeAws_json1_1ModelPackageValidationProfiles + * deserializeAws_json1_1FlowDefinitionSummaries */ -const de_ModelPackageValidationProfiles = (output: any, context: __SerdeContext): ModelPackageValidationProfile[] => { +const de_FlowDefinitionSummaries = (output: any, context: __SerdeContext): FlowDefinitionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelPackageValidationProfile(entry, context); + return de_FlowDefinitionSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ModelPackageValidationSpecification + * deserializeAws_json1_1FlowDefinitionSummary */ -const de_ModelPackageValidationSpecification = ( - output: any, - context: __SerdeContext -): ModelPackageValidationSpecification => { - return { - ValidationProfiles: - output.ValidationProfiles != null - ? de_ModelPackageValidationProfiles(output.ValidationProfiles, context) - : undefined, - ValidationRole: __expectString(output.ValidationRole), - } as any; +const de_FlowDefinitionSummary = (output: any, context: __SerdeContext): FlowDefinitionSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + FlowDefinitionArn: __expectString, + FlowDefinitionName: __expectString, + FlowDefinitionStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ModelQuality - */ -const de_ModelQuality = (output: any, context: __SerdeContext): ModelQuality => { - return { - Constraints: output.Constraints != null ? de_MetricsSource(output.Constraints, context) : undefined, - Statistics: output.Statistics != null ? de_MetricsSource(output.Statistics, context) : undefined, - } as any; -}; +// de_FlowDefinitionTaskKeywords omitted. /** - * deserializeAws_json1_1ModelQualityAppSpecification + * deserializeAws_json1_1GetDeviceFleetReportResponse */ -const de_ModelQualityAppSpecification = (output: any, context: __SerdeContext): ModelQualityAppSpecification => { - return { - ContainerArguments: - output.ContainerArguments != null - ? de_MonitoringContainerArguments(output.ContainerArguments, context) - : undefined, - ContainerEntrypoint: - output.ContainerEntrypoint != null ? de_ContainerEntrypoint(output.ContainerEntrypoint, context) : undefined, - Environment: output.Environment != null ? de_MonitoringEnvironmentMap(output.Environment, context) : undefined, - ImageUri: __expectString(output.ImageUri), - PostAnalyticsProcessorSourceUri: __expectString(output.PostAnalyticsProcessorSourceUri), - ProblemType: __expectString(output.ProblemType), - RecordPreprocessorSourceUri: __expectString(output.RecordPreprocessorSourceUri), - } as any; +const de_GetDeviceFleetReportResponse = (output: any, context: __SerdeContext): GetDeviceFleetReportResponse => { + return take(output, { + AgentVersions: _json, + Description: __expectString, + DeviceFleetArn: __expectString, + DeviceFleetName: __expectString, + DeviceStats: _json, + ModelStats: _json, + OutputConfig: _json, + ReportGenerated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1ModelQualityBaselineConfig - */ -const de_ModelQualityBaselineConfig = (output: any, context: __SerdeContext): ModelQualityBaselineConfig => { - return { - BaseliningJobName: __expectString(output.BaseliningJobName), - ConstraintsResource: - output.ConstraintsResource != null - ? de_MonitoringConstraintsResource(output.ConstraintsResource, context) - : undefined, - } as any; -}; +// de_GetLineageGroupPolicyResponse omitted. -/** - * deserializeAws_json1_1ModelQualityJobInput - */ -const de_ModelQualityJobInput = (output: any, context: __SerdeContext): ModelQualityJobInput => { - return { - BatchTransformInput: - output.BatchTransformInput != null ? de_BatchTransformInput(output.BatchTransformInput, context) : undefined, - EndpointInput: output.EndpointInput != null ? de_EndpointInput(output.EndpointInput, context) : undefined, - GroundTruthS3Input: - output.GroundTruthS3Input != null - ? de_MonitoringGroundTruthS3Input(output.GroundTruthS3Input, context) - : undefined, - } as any; -}; +// de_GetModelPackageGroupPolicyOutput omitted. -/** - * deserializeAws_json1_1ModelStepMetadata - */ -const de_ModelStepMetadata = (output: any, context: __SerdeContext): ModelStepMetadata => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_GetSagemakerServicecatalogPortfolioStatusOutput omitted. + +// de_GetSearchSuggestionsResponse omitted. + +// de_GitConfig omitted. + +// de_Groups omitted. + +// de_HookParameters omitted. + +// de_HubContentDependency omitted. + +// de_HubContentDependencyList omitted. /** - * deserializeAws_json1_1ModelSummary + * deserializeAws_json1_1HubContentInfo */ -const de_ModelSummary = (output: any, context: __SerdeContext): ModelSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ModelArn: __expectString(output.ModelArn), - ModelName: __expectString(output.ModelName), - } as any; +const de_HubContentInfo = (output: any, context: __SerdeContext): HubContentInfo => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DocumentSchemaVersion: __expectString, + HubContentArn: __expectString, + HubContentDescription: __expectString, + HubContentDisplayName: __expectString, + HubContentName: __expectString, + HubContentSearchKeywords: _json, + HubContentStatus: __expectString, + HubContentType: __expectString, + HubContentVersion: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ModelSummaryList + * deserializeAws_json1_1HubContentInfoList */ -const de_ModelSummaryList = (output: any, context: __SerdeContext): ModelSummary[] => { +const de_HubContentInfoList = (output: any, context: __SerdeContext): HubContentInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelSummary(entry, context); + return de_HubContentInfo(entry, context); }); return retVal; }; +// de_HubContentSearchKeywordList omitted. + /** - * deserializeAws_json1_1ModelVariantConfigSummary + * deserializeAws_json1_1HubInfo */ -const de_ModelVariantConfigSummary = (output: any, context: __SerdeContext): ModelVariantConfigSummary => { - return { - InfrastructureConfig: - output.InfrastructureConfig != null - ? de_ModelInfrastructureConfig(output.InfrastructureConfig, context) - : undefined, - ModelName: __expectString(output.ModelName), - Status: __expectString(output.Status), - VariantName: __expectString(output.VariantName), - } as any; +const de_HubInfo = (output: any, context: __SerdeContext): HubInfo => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HubArn: __expectString, + HubDescription: __expectString, + HubDisplayName: __expectString, + HubName: __expectString, + HubSearchKeywords: _json, + HubStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ModelVariantConfigSummaryList + * deserializeAws_json1_1HubInfoList */ -const de_ModelVariantConfigSummaryList = (output: any, context: __SerdeContext): ModelVariantConfigSummary[] => { +const de_HubInfoList = (output: any, context: __SerdeContext): HubInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModelVariantConfigSummary(entry, context); + return de_HubInfo(entry, context); }); return retVal; }; +// de_HubS3StorageConfig omitted. + +// de_HubSearchKeywordList omitted. + /** - * deserializeAws_json1_1MonitoringAlertActions + * deserializeAws_json1_1HumanLoopActivationConditionsConfig */ -const de_MonitoringAlertActions = (output: any, context: __SerdeContext): MonitoringAlertActions => { - return { - ModelDashboardIndicator: - output.ModelDashboardIndicator != null - ? de_ModelDashboardIndicatorAction(output.ModelDashboardIndicator, context) - : undefined, - } as any; +const de_HumanLoopActivationConditionsConfig = ( + output: any, + context: __SerdeContext +): HumanLoopActivationConditionsConfig => { + return take(output, { + HumanLoopActivationConditions: (_: any) => new __LazyJsonString(_), + }) as any; }; /** - * deserializeAws_json1_1MonitoringAlertHistoryList + * deserializeAws_json1_1HumanLoopActivationConfig */ -const de_MonitoringAlertHistoryList = (output: any, context: __SerdeContext): MonitoringAlertHistorySummary[] => { +const de_HumanLoopActivationConfig = (output: any, context: __SerdeContext): HumanLoopActivationConfig => { + return take(output, { + HumanLoopActivationConditionsConfig: (_: any) => de_HumanLoopActivationConditionsConfig(_, context), + }) as any; +}; + +// de_HumanLoopConfig omitted. + +// de_HumanLoopRequestSource omitted. + +// de_HumanTaskConfig omitted. + +/** + * deserializeAws_json1_1HumanTaskUiSummaries + */ +const de_HumanTaskUiSummaries = (output: any, context: __SerdeContext): HumanTaskUiSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringAlertHistorySummary(entry, context); + return de_HumanTaskUiSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MonitoringAlertHistorySummary + * deserializeAws_json1_1HumanTaskUiSummary */ -const de_MonitoringAlertHistorySummary = (output: any, context: __SerdeContext): MonitoringAlertHistorySummary => { - return { - AlertStatus: __expectString(output.AlertStatus), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - MonitoringAlertName: __expectString(output.MonitoringAlertName), - MonitoringScheduleName: __expectString(output.MonitoringScheduleName), - } as any; +const de_HumanTaskUiSummary = (output: any, context: __SerdeContext): HumanTaskUiSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HumanTaskUiArn: __expectString, + HumanTaskUiName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1MonitoringAlertSummary - */ -const de_MonitoringAlertSummary = (output: any, context: __SerdeContext): MonitoringAlertSummary => { - return { - Actions: output.Actions != null ? de_MonitoringAlertActions(output.Actions, context) : undefined, - AlertStatus: __expectString(output.AlertStatus), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatapointsToAlert: __expectInt32(output.DatapointsToAlert), - EvaluationPeriod: __expectInt32(output.EvaluationPeriod), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MonitoringAlertName: __expectString(output.MonitoringAlertName), - } as any; -}; +// de_HyperbandStrategyConfig omitted. + +// de_HyperParameterAlgorithmSpecification omitted. + +// de_HyperParameters omitted. + +// de_HyperParameterSpecification omitted. + +// de_HyperParameterSpecifications omitted. + +// de_HyperParameterTrainingJobDefinition omitted. + +// de_HyperParameterTrainingJobDefinitions omitted. + +// de_HyperParameterTrainingJobEnvironmentMap omitted. /** - * deserializeAws_json1_1MonitoringAlertSummaryList + * deserializeAws_json1_1HyperParameterTrainingJobSummaries */ -const de_MonitoringAlertSummaryList = (output: any, context: __SerdeContext): MonitoringAlertSummary[] => { +const de_HyperParameterTrainingJobSummaries = ( + output: any, + context: __SerdeContext +): HyperParameterTrainingJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringAlertSummary(entry, context); + return de_HyperParameterTrainingJobSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MonitoringAppSpecification + * deserializeAws_json1_1HyperParameterTrainingJobSummary */ -const de_MonitoringAppSpecification = (output: any, context: __SerdeContext): MonitoringAppSpecification => { - return { - ContainerArguments: - output.ContainerArguments != null - ? de_MonitoringContainerArguments(output.ContainerArguments, context) - : undefined, - ContainerEntrypoint: - output.ContainerEntrypoint != null ? de_ContainerEntrypoint(output.ContainerEntrypoint, context) : undefined, - ImageUri: __expectString(output.ImageUri), - PostAnalyticsProcessorSourceUri: __expectString(output.PostAnalyticsProcessorSourceUri), - RecordPreprocessorSourceUri: __expectString(output.RecordPreprocessorSourceUri), - } as any; +const de_HyperParameterTrainingJobSummary = ( + output: any, + context: __SerdeContext +): HyperParameterTrainingJobSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + FinalHyperParameterTuningJobObjectiveMetric: (_: any) => de_FinalHyperParameterTuningJobObjectiveMetric(_, context), + ObjectiveStatus: __expectString, + TrainingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingJobArn: __expectString, + TrainingJobDefinitionName: __expectString, + TrainingJobName: __expectString, + TrainingJobStatus: __expectString, + TrainingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TunedHyperParameters: _json, + TuningJobName: __expectString, + }) as any; }; +// de_HyperParameterTuningInstanceConfig omitted. + +// de_HyperParameterTuningInstanceConfigs omitted. + /** - * deserializeAws_json1_1MonitoringBaselineConfig + * deserializeAws_json1_1HyperParameterTuningJobCompletionDetails */ -const de_MonitoringBaselineConfig = (output: any, context: __SerdeContext): MonitoringBaselineConfig => { - return { - BaseliningJobName: __expectString(output.BaseliningJobName), - ConstraintsResource: - output.ConstraintsResource != null - ? de_MonitoringConstraintsResource(output.ConstraintsResource, context) - : undefined, - StatisticsResource: - output.StatisticsResource != null - ? de_MonitoringStatisticsResource(output.StatisticsResource, context) - : undefined, - } as any; +const de_HyperParameterTuningJobCompletionDetails = ( + output: any, + context: __SerdeContext +): HyperParameterTuningJobCompletionDetails => { + return take(output, { + ConvergenceDetectedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NumberOfTrainingJobsObjectiveNotImproving: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1MonitoringClusterConfig + * deserializeAws_json1_1HyperParameterTuningJobConfig */ -const de_MonitoringClusterConfig = (output: any, context: __SerdeContext): MonitoringClusterConfig => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; +const de_HyperParameterTuningJobConfig = (output: any, context: __SerdeContext): HyperParameterTuningJobConfig => { + return take(output, { + HyperParameterTuningJobObjective: _json, + ParameterRanges: _json, + RandomSeed: __expectInt32, + ResourceLimits: _json, + Strategy: __expectString, + StrategyConfig: _json, + TrainingJobEarlyStoppingType: __expectString, + TuningJobCompletionCriteria: (_: any) => de_TuningJobCompletionCriteria(_, context), + }) as any; }; +// de_HyperParameterTuningJobConsumedResources omitted. + +// de_HyperParameterTuningJobObjective omitted. + +// de_HyperParameterTuningJobObjectives omitted. + /** - * deserializeAws_json1_1MonitoringConstraintsResource + * deserializeAws_json1_1HyperParameterTuningJobSearchEntity */ -const de_MonitoringConstraintsResource = (output: any, context: __SerdeContext): MonitoringConstraintsResource => { - return { - S3Uri: __expectString(output.S3Uri), - } as any; -}; +const de_HyperParameterTuningJobSearchEntity = ( + output: any, + context: __SerdeContext +): HyperParameterTuningJobSearchEntity => { + return take(output, { + BestTrainingJob: (_: any) => de_HyperParameterTrainingJobSummary(_, context), + ConsumedResources: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + HyperParameterTuningEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HyperParameterTuningJobArn: __expectString, + HyperParameterTuningJobConfig: (_: any) => de_HyperParameterTuningJobConfig(_, context), + HyperParameterTuningJobName: __expectString, + HyperParameterTuningJobStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectiveStatusCounters: _json, + OverallBestTrainingJob: (_: any) => de_HyperParameterTrainingJobSummary(_, context), + Tags: _json, + TrainingJobDefinition: _json, + TrainingJobDefinitions: _json, + TrainingJobStatusCounters: _json, + TuningJobCompletionDetails: (_: any) => de_HyperParameterTuningJobCompletionDetails(_, context), + WarmStartConfig: _json, + }) as any; +}; + +// de_HyperParameterTuningJobStrategyConfig omitted. /** - * deserializeAws_json1_1MonitoringContainerArguments + * deserializeAws_json1_1HyperParameterTuningJobSummaries */ -const de_MonitoringContainerArguments = (output: any, context: __SerdeContext): string[] => { +const de_HyperParameterTuningJobSummaries = ( + output: any, + context: __SerdeContext +): HyperParameterTuningJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_HyperParameterTuningJobSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MonitoringCsvDatasetFormat + * deserializeAws_json1_1HyperParameterTuningJobSummary */ -const de_MonitoringCsvDatasetFormat = (output: any, context: __SerdeContext): MonitoringCsvDatasetFormat => { - return { - Header: __expectBoolean(output.Header), - } as any; +const de_HyperParameterTuningJobSummary = (output: any, context: __SerdeContext): HyperParameterTuningJobSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HyperParameterTuningEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + HyperParameterTuningJobArn: __expectString, + HyperParameterTuningJobName: __expectString, + HyperParameterTuningJobStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ObjectiveStatusCounters: _json, + ResourceLimits: _json, + Strategy: __expectString, + TrainingJobStatusCounters: _json, + }) as any; }; -/** - * deserializeAws_json1_1MonitoringDatasetFormat - */ -const de_MonitoringDatasetFormat = (output: any, context: __SerdeContext): MonitoringDatasetFormat => { - return { - Csv: output.Csv != null ? de_MonitoringCsvDatasetFormat(output.Csv, context) : undefined, - Json: output.Json != null ? de_MonitoringJsonDatasetFormat(output.Json, context) : undefined, - Parquet: output.Parquet != null ? de_MonitoringParquetDatasetFormat(output.Parquet, context) : undefined, - } as any; -}; +// de_HyperParameterTuningJobWarmStartConfig omitted. -/** - * deserializeAws_json1_1MonitoringEnvironmentMap - */ -const de_MonitoringEnvironmentMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_HyperParameterTuningResourceConfig omitted. + +// de_IamIdentity omitted. /** - * deserializeAws_json1_1MonitoringExecutionSummary + * deserializeAws_json1_1Image */ -const de_MonitoringExecutionSummary = (output: any, context: __SerdeContext): MonitoringExecutionSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointName: __expectString(output.EndpointName), - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MonitoringExecutionStatus: __expectString(output.MonitoringExecutionStatus), - MonitoringJobDefinitionName: __expectString(output.MonitoringJobDefinitionName), - MonitoringScheduleName: __expectString(output.MonitoringScheduleName), - MonitoringType: __expectString(output.MonitoringType), - ProcessingJobArn: __expectString(output.ProcessingJobArn), - ScheduledTime: - output.ScheduledTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTime))) - : undefined, - } as any; +const de_Image = (output: any, context: __SerdeContext): Image => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + FailureReason: __expectString, + ImageArn: __expectString, + ImageName: __expectString, + ImageStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ImageClassificationJobConfig omitted. + +// de_ImageConfig omitted. + /** - * deserializeAws_json1_1MonitoringExecutionSummaryList + * deserializeAws_json1_1Images */ -const de_MonitoringExecutionSummaryList = (output: any, context: __SerdeContext): MonitoringExecutionSummary[] => { +const de_Images = (output: any, context: __SerdeContext): Image[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringExecutionSummary(entry, context); + return de_Image(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MonitoringGroundTruthS3Input - */ -const de_MonitoringGroundTruthS3Input = (output: any, context: __SerdeContext): MonitoringGroundTruthS3Input => { - return { - S3Uri: __expectString(output.S3Uri), - } as any; -}; - -/** - * deserializeAws_json1_1MonitoringInput + * deserializeAws_json1_1ImageVersion */ -const de_MonitoringInput = (output: any, context: __SerdeContext): MonitoringInput => { - return { - BatchTransformInput: - output.BatchTransformInput != null ? de_BatchTransformInput(output.BatchTransformInput, context) : undefined, - EndpointInput: output.EndpointInput != null ? de_EndpointInput(output.EndpointInput, context) : undefined, - } as any; +const de_ImageVersion = (output: any, context: __SerdeContext): ImageVersion => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + ImageArn: __expectString, + ImageVersionArn: __expectString, + ImageVersionStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Version: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1MonitoringInputs + * deserializeAws_json1_1ImageVersions */ -const de_MonitoringInputs = (output: any, context: __SerdeContext): MonitoringInput[] => { +const de_ImageVersions = (output: any, context: __SerdeContext): ImageVersion[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringInput(entry, context); + return de_ImageVersion(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1MonitoringJobDefinition - */ -const de_MonitoringJobDefinition = (output: any, context: __SerdeContext): MonitoringJobDefinition => { - return { - BaselineConfig: - output.BaselineConfig != null ? de_MonitoringBaselineConfig(output.BaselineConfig, context) : undefined, - Environment: output.Environment != null ? de_MonitoringEnvironmentMap(output.Environment, context) : undefined, - MonitoringAppSpecification: - output.MonitoringAppSpecification != null - ? de_MonitoringAppSpecification(output.MonitoringAppSpecification, context) - : undefined, - MonitoringInputs: - output.MonitoringInputs != null ? de_MonitoringInputs(output.MonitoringInputs, context) : undefined, - MonitoringOutputConfig: - output.MonitoringOutputConfig != null - ? de_MonitoringOutputConfig(output.MonitoringOutputConfig, context) - : undefined, - MonitoringResources: - output.MonitoringResources != null ? de_MonitoringResources(output.MonitoringResources, context) : undefined, - NetworkConfig: output.NetworkConfig != null ? de_NetworkConfig(output.NetworkConfig, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_MonitoringStoppingCondition(output.StoppingCondition, context) : undefined, - } as any; -}; +// de_ImportHubContentResponse omitted. -/** - * deserializeAws_json1_1MonitoringJobDefinitionSummary - */ -const de_MonitoringJobDefinitionSummary = (output: any, context: __SerdeContext): MonitoringJobDefinitionSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointName: __expectString(output.EndpointName), - MonitoringJobDefinitionArn: __expectString(output.MonitoringJobDefinitionArn), - MonitoringJobDefinitionName: __expectString(output.MonitoringJobDefinitionName), - } as any; -}; +// de_InferenceExecutionConfig omitted. + +// de_InferenceExperimentDataStorageConfig omitted. /** - * deserializeAws_json1_1MonitoringJobDefinitionSummaryList + * deserializeAws_json1_1InferenceExperimentList */ -const de_MonitoringJobDefinitionSummaryList = ( - output: any, - context: __SerdeContext -): MonitoringJobDefinitionSummary[] => { +const de_InferenceExperimentList = (output: any, context: __SerdeContext): InferenceExperimentSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringJobDefinitionSummary(entry, context); + return de_InferenceExperimentSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MonitoringJsonDatasetFormat + * deserializeAws_json1_1InferenceExperimentSchedule */ -const de_MonitoringJsonDatasetFormat = (output: any, context: __SerdeContext): MonitoringJsonDatasetFormat => { - return { - Line: __expectBoolean(output.Line), - } as any; +const de_InferenceExperimentSchedule = (output: any, context: __SerdeContext): InferenceExperimentSchedule => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1MonitoringNetworkConfig + * deserializeAws_json1_1InferenceExperimentSummary */ -const de_MonitoringNetworkConfig = (output: any, context: __SerdeContext): MonitoringNetworkConfig => { - return { - EnableInterContainerTrafficEncryption: __expectBoolean(output.EnableInterContainerTrafficEncryption), - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; +const de_InferenceExperimentSummary = (output: any, context: __SerdeContext): InferenceExperimentSummary => { + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + RoleArn: __expectString, + Schedule: (_: any) => de_InferenceExperimentSchedule(_, context), + Status: __expectString, + StatusReason: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1MonitoringOutput - */ -const de_MonitoringOutput = (output: any, context: __SerdeContext): MonitoringOutput => { - return { - S3Output: output.S3Output != null ? de_MonitoringS3Output(output.S3Output, context) : undefined, - } as any; -}; +// de_InferenceMetrics omitted. /** - * deserializeAws_json1_1MonitoringOutputConfig + * deserializeAws_json1_1InferenceRecommendation */ -const de_MonitoringOutputConfig = (output: any, context: __SerdeContext): MonitoringOutputConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - MonitoringOutputs: - output.MonitoringOutputs != null ? de_MonitoringOutputs(output.MonitoringOutputs, context) : undefined, - } as any; +const de_InferenceRecommendation = (output: any, context: __SerdeContext): InferenceRecommendation => { + return take(output, { + EndpointConfiguration: _json, + Metrics: (_: any) => de_RecommendationMetrics(_, context), + ModelConfiguration: _json, + RecommendationId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MonitoringOutputs + * deserializeAws_json1_1InferenceRecommendations */ -const de_MonitoringOutputs = (output: any, context: __SerdeContext): MonitoringOutput[] => { +const de_InferenceRecommendations = (output: any, context: __SerdeContext): InferenceRecommendation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringOutput(entry, context); + return de_InferenceRecommendation(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1MonitoringParquetDatasetFormat - */ -const de_MonitoringParquetDatasetFormat = (output: any, context: __SerdeContext): MonitoringParquetDatasetFormat => { - return {} as any; -}; - -/** - * deserializeAws_json1_1MonitoringResources - */ -const de_MonitoringResources = (output: any, context: __SerdeContext): MonitoringResources => { - return { - ClusterConfig: output.ClusterConfig != null ? de_MonitoringClusterConfig(output.ClusterConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1MonitoringS3Output + * deserializeAws_json1_1InferenceRecommendationsJob */ -const de_MonitoringS3Output = (output: any, context: __SerdeContext): MonitoringS3Output => { - return { - LocalPath: __expectString(output.LocalPath), - S3UploadMode: __expectString(output.S3UploadMode), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_InferenceRecommendationsJob = (output: any, context: __SerdeContext): InferenceRecommendationsJob => { + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + JobArn: __expectString, + JobDescription: __expectString, + JobName: __expectString, + JobType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MonitoringSchedule + * deserializeAws_json1_1InferenceRecommendationsJobs */ -const de_MonitoringSchedule = (output: any, context: __SerdeContext): MonitoringSchedule => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointName: __expectString(output.EndpointName), - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastMonitoringExecutionSummary: - output.LastMonitoringExecutionSummary != null - ? de_MonitoringExecutionSummary(output.LastMonitoringExecutionSummary, context) - : undefined, - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - MonitoringScheduleConfig: - output.MonitoringScheduleConfig != null - ? de_MonitoringScheduleConfig(output.MonitoringScheduleConfig, context) - : undefined, - MonitoringScheduleName: __expectString(output.MonitoringScheduleName), - MonitoringScheduleStatus: __expectString(output.MonitoringScheduleStatus), - MonitoringType: __expectString(output.MonitoringType), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_InferenceRecommendationsJobs = (output: any, context: __SerdeContext): InferenceRecommendationsJob[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_InferenceRecommendationsJob(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1MonitoringScheduleConfig + * deserializeAws_json1_1InferenceRecommendationsJobStep */ -const de_MonitoringScheduleConfig = (output: any, context: __SerdeContext): MonitoringScheduleConfig => { - return { - MonitoringJobDefinition: - output.MonitoringJobDefinition != null - ? de_MonitoringJobDefinition(output.MonitoringJobDefinition, context) - : undefined, - MonitoringJobDefinitionName: __expectString(output.MonitoringJobDefinitionName), - MonitoringType: __expectString(output.MonitoringType), - ScheduleConfig: output.ScheduleConfig != null ? de_ScheduleConfig(output.ScheduleConfig, context) : undefined, - } as any; +const de_InferenceRecommendationsJobStep = (output: any, context: __SerdeContext): InferenceRecommendationsJobStep => { + return take(output, { + InferenceBenchmark: (_: any) => de_RecommendationJobInferenceBenchmark(_, context), + JobName: __expectString, + Status: __expectString, + StepType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MonitoringScheduleList + * deserializeAws_json1_1InferenceRecommendationsJobSteps */ -const de_MonitoringScheduleList = (output: any, context: __SerdeContext): MonitoringSchedule[] => { +const de_InferenceRecommendationsJobSteps = ( + output: any, + context: __SerdeContext +): InferenceRecommendationsJobStep[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringSchedule(entry, context); + return de_InferenceRecommendationsJobStep(entry, context); }); return retVal; }; +// de_InferenceSpecification omitted. + +// de_InputConfig omitted. + +// de_InputDataConfig omitted. + +// de_InputModes omitted. + +// de_InstanceGroup omitted. + +// de_InstanceGroupNames omitted. + +// de_InstanceGroups omitted. + +// de_InstanceMetadataServiceConfiguration omitted. + +// de_IntegerParameterRange omitted. + +// de_IntegerParameterRanges omitted. + +// de_IntegerParameterRangeSpecification omitted. + +// de_JsonContentTypes omitted. + +// de_JupyterServerAppSettings omitted. + +// de_KernelGatewayAppSettings omitted. + +// de_KernelGatewayImageConfig omitted. + +// de_KernelSpec omitted. + +// de_KernelSpecs omitted. + +// de_LabelCounters omitted. + +// de_LabelCountersForWorkteam omitted. + +// de_LabelingJobAlgorithmsConfig omitted. + +// de_LabelingJobDataAttributes omitted. + +// de_LabelingJobDataSource omitted. + /** - * deserializeAws_json1_1MonitoringScheduleSummary + * deserializeAws_json1_1LabelingJobForWorkteamSummary */ -const de_MonitoringScheduleSummary = (output: any, context: __SerdeContext): MonitoringScheduleSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - EndpointName: __expectString(output.EndpointName), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MonitoringJobDefinitionName: __expectString(output.MonitoringJobDefinitionName), - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - MonitoringScheduleName: __expectString(output.MonitoringScheduleName), - MonitoringScheduleStatus: __expectString(output.MonitoringScheduleStatus), - MonitoringType: __expectString(output.MonitoringType), - } as any; +const de_LabelingJobForWorkteamSummary = (output: any, context: __SerdeContext): LabelingJobForWorkteamSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + JobReferenceCode: __expectString, + LabelCounters: _json, + LabelingJobName: __expectString, + NumberOfHumanWorkersPerDataObject: __expectInt32, + WorkRequesterAccountId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1MonitoringScheduleSummaryList + * deserializeAws_json1_1LabelingJobForWorkteamSummaryList */ -const de_MonitoringScheduleSummaryList = (output: any, context: __SerdeContext): MonitoringScheduleSummary[] => { +const de_LabelingJobForWorkteamSummaryList = ( + output: any, + context: __SerdeContext +): LabelingJobForWorkteamSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonitoringScheduleSummary(entry, context); + return de_LabelingJobForWorkteamSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1MonitoringStatisticsResource - */ -const de_MonitoringStatisticsResource = (output: any, context: __SerdeContext): MonitoringStatisticsResource => { - return { - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_LabelingJobInputConfig omitted. -/** - * deserializeAws_json1_1MonitoringStoppingCondition - */ -const de_MonitoringStoppingCondition = (output: any, context: __SerdeContext): MonitoringStoppingCondition => { - return { - MaxRuntimeInSeconds: __expectInt32(output.MaxRuntimeInSeconds), - } as any; -}; +// de_LabelingJobOutput omitted. -/** - * deserializeAws_json1_1MultiModelConfig - */ -const de_MultiModelConfig = (output: any, context: __SerdeContext): MultiModelConfig => { - return { - ModelCacheSetting: __expectString(output.ModelCacheSetting), - } as any; -}; +// de_LabelingJobOutputConfig omitted. + +// de_LabelingJobResourceConfig omitted. + +// de_LabelingJobS3DataSource omitted. + +// de_LabelingJobSnsDataSource omitted. + +// de_LabelingJobStoppingConditions omitted. /** - * deserializeAws_json1_1NeoVpcConfig + * deserializeAws_json1_1LabelingJobSummary */ -const de_NeoVpcConfig = (output: any, context: __SerdeContext): NeoVpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_NeoVpcSecurityGroupIds(output.SecurityGroupIds, context) : undefined, - Subnets: output.Subnets != null ? de_NeoVpcSubnets(output.Subnets, context) : undefined, - } as any; +const de_LabelingJobSummary = (output: any, context: __SerdeContext): LabelingJobSummary => { + return take(output, { + AnnotationConsolidationLambdaArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + InputConfig: _json, + LabelCounters: _json, + LabelingJobArn: __expectString, + LabelingJobName: __expectString, + LabelingJobOutput: _json, + LabelingJobStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PreHumanTaskLambdaArn: __expectString, + WorkteamArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NeoVpcSecurityGroupIds + * deserializeAws_json1_1LabelingJobSummaryList */ -const de_NeoVpcSecurityGroupIds = (output: any, context: __SerdeContext): string[] => { +const de_LabelingJobSummaryList = (output: any, context: __SerdeContext): LabelingJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_LabelingJobSummary(entry, context); }); return retVal; }; +// de_LambdaStepMetadata omitted. + +// de_LastUpdateStatus omitted. + +// de_LifecycleConfigArns omitted. + +// de_LineageEntityParameters omitted. + /** - * deserializeAws_json1_1NeoVpcSubnets + * deserializeAws_json1_1LineageGroupSummaries */ -const de_NeoVpcSubnets = (output: any, context: __SerdeContext): string[] => { +const de_LineageGroupSummaries = (output: any, context: __SerdeContext): LineageGroupSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_LineageGroupSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1NetworkConfig + * deserializeAws_json1_1LineageGroupSummary */ -const de_NetworkConfig = (output: any, context: __SerdeContext): NetworkConfig => { - return { - EnableInterContainerTrafficEncryption: __expectBoolean(output.EnableInterContainerTrafficEncryption), - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; +const de_LineageGroupSummary = (output: any, context: __SerdeContext): LineageGroupSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + LineageGroupName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotebookInstanceAcceleratorTypes + * deserializeAws_json1_1ListActionsResponse */ -const de_NotebookInstanceAcceleratorTypes = ( - output: any, - context: __SerdeContext -): (NotebookInstanceAcceleratorType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListActionsResponse = (output: any, context: __SerdeContext): ListActionsResponse => { + return take(output, { + ActionSummaries: (_: any) => de_ActionSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotebookInstanceLifecycleConfigList + * deserializeAws_json1_1ListAlgorithmsOutput */ -const de_NotebookInstanceLifecycleConfigList = ( - output: any, - context: __SerdeContext -): NotebookInstanceLifecycleHook[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotebookInstanceLifecycleHook(entry, context); - }); - return retVal; +const de_ListAlgorithmsOutput = (output: any, context: __SerdeContext): ListAlgorithmsOutput => { + return take(output, { + AlgorithmSummaryList: (_: any) => de_AlgorithmSummaryList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1NotebookInstanceLifecycleConfigSummary - */ -const de_NotebookInstanceLifecycleConfigSummary = ( - output: any, - context: __SerdeContext -): NotebookInstanceLifecycleConfigSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NotebookInstanceLifecycleConfigArn: __expectString(output.NotebookInstanceLifecycleConfigArn), - NotebookInstanceLifecycleConfigName: __expectString(output.NotebookInstanceLifecycleConfigName), - } as any; -}; +// de_ListAliasesResponse omitted. /** - * deserializeAws_json1_1NotebookInstanceLifecycleConfigSummaryList + * deserializeAws_json1_1ListAppImageConfigsResponse */ -const de_NotebookInstanceLifecycleConfigSummaryList = ( - output: any, - context: __SerdeContext -): NotebookInstanceLifecycleConfigSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotebookInstanceLifecycleConfigSummary(entry, context); - }); - return retVal; +const de_ListAppImageConfigsResponse = (output: any, context: __SerdeContext): ListAppImageConfigsResponse => { + return take(output, { + AppImageConfigs: (_: any) => de_AppImageConfigList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotebookInstanceLifecycleHook + * deserializeAws_json1_1ListAppsResponse */ -const de_NotebookInstanceLifecycleHook = (output: any, context: __SerdeContext): NotebookInstanceLifecycleHook => { - return { - Content: __expectString(output.Content), - } as any; +const de_ListAppsResponse = (output: any, context: __SerdeContext): ListAppsResponse => { + return take(output, { + Apps: (_: any) => de_AppList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotebookInstanceSummary + * deserializeAws_json1_1ListArtifactsResponse */ -const de_NotebookInstanceSummary = (output: any, context: __SerdeContext): NotebookInstanceSummary => { - return { - AdditionalCodeRepositories: - output.AdditionalCodeRepositories != null - ? de_AdditionalCodeRepositoryNamesOrUrls(output.AdditionalCodeRepositories, context) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DefaultCodeRepository: __expectString(output.DefaultCodeRepository), - InstanceType: __expectString(output.InstanceType), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - NotebookInstanceArn: __expectString(output.NotebookInstanceArn), - NotebookInstanceLifecycleConfigName: __expectString(output.NotebookInstanceLifecycleConfigName), - NotebookInstanceName: __expectString(output.NotebookInstanceName), - NotebookInstanceStatus: __expectString(output.NotebookInstanceStatus), - Url: __expectString(output.Url), - } as any; +const de_ListArtifactsResponse = (output: any, context: __SerdeContext): ListArtifactsResponse => { + return take(output, { + ArtifactSummaries: (_: any) => de_ArtifactSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotebookInstanceSummaryList + * deserializeAws_json1_1ListAssociationsResponse */ -const de_NotebookInstanceSummaryList = (output: any, context: __SerdeContext): NotebookInstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotebookInstanceSummary(entry, context); - }); - return retVal; +const de_ListAssociationsResponse = (output: any, context: __SerdeContext): ListAssociationsResponse => { + return take(output, { + AssociationSummaries: (_: any) => de_AssociationSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1NotificationConfiguration + * deserializeAws_json1_1ListAutoMLJobsResponse */ -const de_NotificationConfiguration = (output: any, context: __SerdeContext): NotificationConfiguration => { - return { - NotificationTopicArn: __expectString(output.NotificationTopicArn), - } as any; +const de_ListAutoMLJobsResponse = (output: any, context: __SerdeContext): ListAutoMLJobsResponse => { + return take(output, { + AutoMLJobSummaries: (_: any) => de_AutoMLJobSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ObjectiveStatusCounters + * deserializeAws_json1_1ListCandidatesForAutoMLJobResponse */ -const de_ObjectiveStatusCounters = (output: any, context: __SerdeContext): ObjectiveStatusCounters => { - return { - Failed: __expectInt32(output.Failed), - Pending: __expectInt32(output.Pending), - Succeeded: __expectInt32(output.Succeeded), - } as any; +const de_ListCandidatesForAutoMLJobResponse = ( + output: any, + context: __SerdeContext +): ListCandidatesForAutoMLJobResponse => { + return take(output, { + Candidates: (_: any) => de_AutoMLCandidates(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OfflineStoreConfig + * deserializeAws_json1_1ListCodeRepositoriesOutput */ -const de_OfflineStoreConfig = (output: any, context: __SerdeContext): OfflineStoreConfig => { - return { - DataCatalogConfig: - output.DataCatalogConfig != null ? de_DataCatalogConfig(output.DataCatalogConfig, context) : undefined, - DisableGlueTableCreation: __expectBoolean(output.DisableGlueTableCreation), - S3StorageConfig: output.S3StorageConfig != null ? de_S3StorageConfig(output.S3StorageConfig, context) : undefined, - TableFormat: __expectString(output.TableFormat), - } as any; +const de_ListCodeRepositoriesOutput = (output: any, context: __SerdeContext): ListCodeRepositoriesOutput => { + return take(output, { + CodeRepositorySummaryList: (_: any) => de_CodeRepositorySummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OfflineStoreStatus + * deserializeAws_json1_1ListCompilationJobsResponse */ -const de_OfflineStoreStatus = (output: any, context: __SerdeContext): OfflineStoreStatus => { - return { - BlockedReason: __expectString(output.BlockedReason), - Status: __expectString(output.Status), - } as any; +const de_ListCompilationJobsResponse = (output: any, context: __SerdeContext): ListCompilationJobsResponse => { + return take(output, { + CompilationJobSummaries: (_: any) => de_CompilationJobSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OidcConfigForResponse + * deserializeAws_json1_1ListContextsResponse */ -const de_OidcConfigForResponse = (output: any, context: __SerdeContext): OidcConfigForResponse => { - return { - AuthorizationEndpoint: __expectString(output.AuthorizationEndpoint), - ClientId: __expectString(output.ClientId), - Issuer: __expectString(output.Issuer), - JwksUri: __expectString(output.JwksUri), - LogoutEndpoint: __expectString(output.LogoutEndpoint), - TokenEndpoint: __expectString(output.TokenEndpoint), - UserInfoEndpoint: __expectString(output.UserInfoEndpoint), - } as any; +const de_ListContextsResponse = (output: any, context: __SerdeContext): ListContextsResponse => { + return take(output, { + ContextSummaries: (_: any) => de_ContextSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OidcMemberDefinition + * deserializeAws_json1_1ListDataQualityJobDefinitionsResponse */ -const de_OidcMemberDefinition = (output: any, context: __SerdeContext): OidcMemberDefinition => { - return { - Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined, - } as any; +const de_ListDataQualityJobDefinitionsResponse = ( + output: any, + context: __SerdeContext +): ListDataQualityJobDefinitionsResponse => { + return take(output, { + JobDefinitionSummaries: (_: any) => de_MonitoringJobDefinitionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OnlineStoreConfig + * deserializeAws_json1_1ListDeviceFleetsResponse */ -const de_OnlineStoreConfig = (output: any, context: __SerdeContext): OnlineStoreConfig => { - return { - EnableOnlineStore: __expectBoolean(output.EnableOnlineStore), - SecurityConfig: - output.SecurityConfig != null ? de_OnlineStoreSecurityConfig(output.SecurityConfig, context) : undefined, - } as any; +const de_ListDeviceFleetsResponse = (output: any, context: __SerdeContext): ListDeviceFleetsResponse => { + return take(output, { + DeviceFleetSummaries: (_: any) => de_DeviceFleetSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OnlineStoreSecurityConfig + * deserializeAws_json1_1ListDevicesResponse */ -const de_OnlineStoreSecurityConfig = (output: any, context: __SerdeContext): OnlineStoreSecurityConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - } as any; +const de_ListDevicesResponse = (output: any, context: __SerdeContext): ListDevicesResponse => { + return take(output, { + DeviceSummaries: (_: any) => de_DeviceSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OutputConfig + * deserializeAws_json1_1ListDomainsResponse */ -const de_OutputConfig = (output: any, context: __SerdeContext): OutputConfig => { - return { - CompilerOptions: __expectString(output.CompilerOptions), - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputLocation: __expectString(output.S3OutputLocation), - TargetDevice: __expectString(output.TargetDevice), - TargetPlatform: output.TargetPlatform != null ? de_TargetPlatform(output.TargetPlatform, context) : undefined, - } as any; +const de_ListDomainsResponse = (output: any, context: __SerdeContext): ListDomainsResponse => { + return take(output, { + Domains: (_: any) => de_DomainList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OutputDataConfig + * deserializeAws_json1_1ListEdgeDeploymentPlansResponse */ -const de_OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; +const de_ListEdgeDeploymentPlansResponse = (output: any, context: __SerdeContext): ListEdgeDeploymentPlansResponse => { + return take(output, { + EdgeDeploymentPlanSummaries: (_: any) => de_EdgeDeploymentPlanSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OutputParameter + * deserializeAws_json1_1ListEdgePackagingJobsResponse */ -const de_OutputParameter = (output: any, context: __SerdeContext): OutputParameter => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; +const de_ListEdgePackagingJobsResponse = (output: any, context: __SerdeContext): ListEdgePackagingJobsResponse => { + return take(output, { + EdgePackagingJobSummaries: (_: any) => de_EdgePackagingJobSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OutputParameterList + * deserializeAws_json1_1ListEndpointConfigsOutput */ -const de_OutputParameterList = (output: any, context: __SerdeContext): OutputParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OutputParameter(entry, context); - }); - return retVal; +const de_ListEndpointConfigsOutput = (output: any, context: __SerdeContext): ListEndpointConfigsOutput => { + return take(output, { + EndpointConfigs: (_: any) => de_EndpointConfigSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParallelismConfiguration + * deserializeAws_json1_1ListEndpointsOutput */ -const de_ParallelismConfiguration = (output: any, context: __SerdeContext): ParallelismConfiguration => { - return { - MaxParallelExecutionSteps: __expectInt32(output.MaxParallelExecutionSteps), - } as any; +const de_ListEndpointsOutput = (output: any, context: __SerdeContext): ListEndpointsOutput => { + return take(output, { + Endpoints: (_: any) => de_EndpointSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Parameter + * deserializeAws_json1_1ListExperimentsResponse */ -const de_Parameter = (output: any, context: __SerdeContext): Parameter => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; +const de_ListExperimentsResponse = (output: any, context: __SerdeContext): ListExperimentsResponse => { + return take(output, { + ExperimentSummaries: (_: any) => de_ExperimentSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterList + * deserializeAws_json1_1ListFeatureGroupsResponse */ -const de_ParameterList = (output: any, context: __SerdeContext): Parameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parameter(entry, context); - }); - return retVal; +const de_ListFeatureGroupsResponse = (output: any, context: __SerdeContext): ListFeatureGroupsResponse => { + return take(output, { + FeatureGroupSummaries: (_: any) => de_FeatureGroupSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterRange + * deserializeAws_json1_1ListFlowDefinitionsResponse */ -const de_ParameterRange = (output: any, context: __SerdeContext): ParameterRange => { - return { - CategoricalParameterRangeSpecification: - output.CategoricalParameterRangeSpecification != null - ? de_CategoricalParameterRangeSpecification(output.CategoricalParameterRangeSpecification, context) - : undefined, - ContinuousParameterRangeSpecification: - output.ContinuousParameterRangeSpecification != null - ? de_ContinuousParameterRangeSpecification(output.ContinuousParameterRangeSpecification, context) - : undefined, - IntegerParameterRangeSpecification: - output.IntegerParameterRangeSpecification != null - ? de_IntegerParameterRangeSpecification(output.IntegerParameterRangeSpecification, context) - : undefined, - } as any; +const de_ListFlowDefinitionsResponse = (output: any, context: __SerdeContext): ListFlowDefinitionsResponse => { + return take(output, { + FlowDefinitionSummaries: (_: any) => de_FlowDefinitionSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterRanges + * deserializeAws_json1_1ListHubContentsResponse */ -const de_ParameterRanges = (output: any, context: __SerdeContext): ParameterRanges => { - return { - CategoricalParameterRanges: - output.CategoricalParameterRanges != null - ? de_CategoricalParameterRanges(output.CategoricalParameterRanges, context) - : undefined, - ContinuousParameterRanges: - output.ContinuousParameterRanges != null - ? de_ContinuousParameterRanges(output.ContinuousParameterRanges, context) - : undefined, - IntegerParameterRanges: - output.IntegerParameterRanges != null - ? de_IntegerParameterRanges(output.IntegerParameterRanges, context) - : undefined, - } as any; +const de_ListHubContentsResponse = (output: any, context: __SerdeContext): ListHubContentsResponse => { + return take(output, { + HubContentSummaries: (_: any) => de_HubContentInfoList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterValues + * deserializeAws_json1_1ListHubContentVersionsResponse */ -const de_ParameterValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListHubContentVersionsResponse = (output: any, context: __SerdeContext): ListHubContentVersionsResponse => { + return take(output, { + HubContentSummaries: (_: any) => de_HubContentInfoList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Parent + * deserializeAws_json1_1ListHubsResponse */ -const de_Parent = (output: any, context: __SerdeContext): Parent => { - return { - ExperimentName: __expectString(output.ExperimentName), - TrialName: __expectString(output.TrialName), - } as any; +const de_ListHubsResponse = (output: any, context: __SerdeContext): ListHubsResponse => { + return take(output, { + HubSummaries: (_: any) => de_HubInfoList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParentHyperParameterTuningJob + * deserializeAws_json1_1ListHumanTaskUisResponse */ -const de_ParentHyperParameterTuningJob = (output: any, context: __SerdeContext): ParentHyperParameterTuningJob => { - return { - HyperParameterTuningJobName: __expectString(output.HyperParameterTuningJobName), - } as any; +const de_ListHumanTaskUisResponse = (output: any, context: __SerdeContext): ListHumanTaskUisResponse => { + return take(output, { + HumanTaskUiSummaries: (_: any) => de_HumanTaskUiSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParentHyperParameterTuningJobs + * deserializeAws_json1_1ListHyperParameterTuningJobsResponse */ -const de_ParentHyperParameterTuningJobs = (output: any, context: __SerdeContext): ParentHyperParameterTuningJob[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParentHyperParameterTuningJob(entry, context); - }); - return retVal; +const de_ListHyperParameterTuningJobsResponse = ( + output: any, + context: __SerdeContext +): ListHyperParameterTuningJobsResponse => { + return take(output, { + HyperParameterTuningJobSummaries: (_: any) => de_HyperParameterTuningJobSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Parents + * deserializeAws_json1_1ListImagesResponse */ -const de_Parents = (output: any, context: __SerdeContext): Parent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parent(entry, context); - }); - return retVal; +const de_ListImagesResponse = (output: any, context: __SerdeContext): ListImagesResponse => { + return take(output, { + Images: (_: any) => de_Images(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PendingDeploymentSummary + * deserializeAws_json1_1ListImageVersionsResponse */ -const de_PendingDeploymentSummary = (output: any, context: __SerdeContext): PendingDeploymentSummary => { - return { - EndpointConfigName: __expectString(output.EndpointConfigName), - ProductionVariants: - output.ProductionVariants != null - ? de_PendingProductionVariantSummaryList(output.ProductionVariants, context) - : undefined, - ShadowProductionVariants: - output.ShadowProductionVariants != null - ? de_PendingProductionVariantSummaryList(output.ShadowProductionVariants, context) - : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; +const de_ListImageVersionsResponse = (output: any, context: __SerdeContext): ListImageVersionsResponse => { + return take(output, { + ImageVersions: (_: any) => de_ImageVersions(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PendingProductionVariantSummary + * deserializeAws_json1_1ListInferenceExperimentsResponse */ -const de_PendingProductionVariantSummary = (output: any, context: __SerdeContext): PendingProductionVariantSummary => { - return { - AcceleratorType: __expectString(output.AcceleratorType), - CurrentInstanceCount: __expectInt32(output.CurrentInstanceCount), - CurrentServerlessConfig: - output.CurrentServerlessConfig != null - ? de_ProductionVariantServerlessConfig(output.CurrentServerlessConfig, context) - : undefined, - CurrentWeight: __limitedParseFloat32(output.CurrentWeight), - DeployedImages: output.DeployedImages != null ? de_DeployedImages(output.DeployedImages, context) : undefined, - DesiredInstanceCount: __expectInt32(output.DesiredInstanceCount), - DesiredServerlessConfig: - output.DesiredServerlessConfig != null - ? de_ProductionVariantServerlessConfig(output.DesiredServerlessConfig, context) - : undefined, - DesiredWeight: __limitedParseFloat32(output.DesiredWeight), - InstanceType: __expectString(output.InstanceType), - VariantName: __expectString(output.VariantName), - VariantStatus: - output.VariantStatus != null ? de_ProductionVariantStatusList(output.VariantStatus, context) : undefined, - } as any; +const de_ListInferenceExperimentsResponse = ( + output: any, + context: __SerdeContext +): ListInferenceExperimentsResponse => { + return take(output, { + InferenceExperiments: (_: any) => de_InferenceExperimentList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PendingProductionVariantSummaryList + * deserializeAws_json1_1ListInferenceRecommendationsJobsResponse */ -const de_PendingProductionVariantSummaryList = ( +const de_ListInferenceRecommendationsJobsResponse = ( output: any, context: __SerdeContext -): PendingProductionVariantSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PendingProductionVariantSummary(entry, context); - }); - return retVal; +): ListInferenceRecommendationsJobsResponse => { + return take(output, { + InferenceRecommendationsJobs: (_: any) => de_InferenceRecommendationsJobs(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Phase + * deserializeAws_json1_1ListInferenceRecommendationsJobStepsResponse */ -const de_Phase = (output: any, context: __SerdeContext): Phase => { - return { - DurationInSeconds: __expectInt32(output.DurationInSeconds), - InitialNumberOfUsers: __expectInt32(output.InitialNumberOfUsers), - SpawnRate: __expectInt32(output.SpawnRate), - } as any; +const de_ListInferenceRecommendationsJobStepsResponse = ( + output: any, + context: __SerdeContext +): ListInferenceRecommendationsJobStepsResponse => { + return take(output, { + NextToken: __expectString, + Steps: (_: any) => de_InferenceRecommendationsJobSteps(_, context), + }) as any; }; /** - * deserializeAws_json1_1Phases + * deserializeAws_json1_1ListLabelingJobsForWorkteamResponse */ -const de_Phases = (output: any, context: __SerdeContext): Phase[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Phase(entry, context); - }); - return retVal; +const de_ListLabelingJobsForWorkteamResponse = ( + output: any, + context: __SerdeContext +): ListLabelingJobsForWorkteamResponse => { + return take(output, { + LabelingJobSummaryList: (_: any) => de_LabelingJobForWorkteamSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Pipeline + * deserializeAws_json1_1ListLabelingJobsResponse */ -const de_Pipeline = (output: any, context: __SerdeContext): Pipeline => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LastRunTime: - output.LastRunTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRunTime))) - : undefined, - ParallelismConfiguration: - output.ParallelismConfiguration != null - ? de_ParallelismConfiguration(output.ParallelismConfiguration, context) - : undefined, - PipelineArn: __expectString(output.PipelineArn), - PipelineDescription: __expectString(output.PipelineDescription), - PipelineDisplayName: __expectString(output.PipelineDisplayName), - PipelineName: __expectString(output.PipelineName), - PipelineStatus: __expectString(output.PipelineStatus), - RoleArn: __expectString(output.RoleArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_ListLabelingJobsResponse = (output: any, context: __SerdeContext): ListLabelingJobsResponse => { + return take(output, { + LabelingJobSummaryList: (_: any) => de_LabelingJobSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineExecution + * deserializeAws_json1_1ListLineageGroupsResponse */ -const de_PipelineExecution = (output: any, context: __SerdeContext): PipelineExecution => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ParallelismConfiguration: - output.ParallelismConfiguration != null - ? de_ParallelismConfiguration(output.ParallelismConfiguration, context) - : undefined, - PipelineArn: __expectString(output.PipelineArn), - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - PipelineExecutionDescription: __expectString(output.PipelineExecutionDescription), - PipelineExecutionDisplayName: __expectString(output.PipelineExecutionDisplayName), - PipelineExecutionStatus: __expectString(output.PipelineExecutionStatus), - PipelineExperimentConfig: - output.PipelineExperimentConfig != null - ? de_PipelineExperimentConfig(output.PipelineExperimentConfig, context) - : undefined, - PipelineParameters: - output.PipelineParameters != null ? de_ParameterList(output.PipelineParameters, context) : undefined, - } as any; +const de_ListLineageGroupsResponse = (output: any, context: __SerdeContext): ListLineageGroupsResponse => { + return take(output, { + LineageGroupSummaries: (_: any) => de_LineageGroupSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineExecutionStep + * deserializeAws_json1_1ListModelBiasJobDefinitionsResponse */ -const de_PipelineExecutionStep = (output: any, context: __SerdeContext): PipelineExecutionStep => { - return { - AttemptCount: __expectInt32(output.AttemptCount), - CacheHitResult: output.CacheHitResult != null ? de_CacheHitResult(output.CacheHitResult, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - FailureReason: __expectString(output.FailureReason), - Metadata: output.Metadata != null ? de_PipelineExecutionStepMetadata(output.Metadata, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - StepDescription: __expectString(output.StepDescription), - StepDisplayName: __expectString(output.StepDisplayName), - StepName: __expectString(output.StepName), - StepStatus: __expectString(output.StepStatus), - } as any; +const de_ListModelBiasJobDefinitionsResponse = ( + output: any, + context: __SerdeContext +): ListModelBiasJobDefinitionsResponse => { + return take(output, { + JobDefinitionSummaries: (_: any) => de_MonitoringJobDefinitionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineExecutionStepList + * deserializeAws_json1_1ListModelCardExportJobsResponse */ -const de_PipelineExecutionStepList = (output: any, context: __SerdeContext): PipelineExecutionStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineExecutionStep(entry, context); - }); - return retVal; +const de_ListModelCardExportJobsResponse = (output: any, context: __SerdeContext): ListModelCardExportJobsResponse => { + return take(output, { + ModelCardExportJobSummaries: (_: any) => de_ModelCardExportJobSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineExecutionStepMetadata + * deserializeAws_json1_1ListModelCardsResponse */ -const de_PipelineExecutionStepMetadata = (output: any, context: __SerdeContext): PipelineExecutionStepMetadata => { - return { - AutoMLJob: output.AutoMLJob != null ? de_AutoMLJobStepMetadata(output.AutoMLJob, context) : undefined, - Callback: output.Callback != null ? de_CallbackStepMetadata(output.Callback, context) : undefined, - ClarifyCheck: output.ClarifyCheck != null ? de_ClarifyCheckStepMetadata(output.ClarifyCheck, context) : undefined, - Condition: output.Condition != null ? de_ConditionStepMetadata(output.Condition, context) : undefined, - EMR: output.EMR != null ? de_EMRStepMetadata(output.EMR, context) : undefined, - Fail: output.Fail != null ? de_FailStepMetadata(output.Fail, context) : undefined, - Lambda: output.Lambda != null ? de_LambdaStepMetadata(output.Lambda, context) : undefined, - Model: output.Model != null ? de_ModelStepMetadata(output.Model, context) : undefined, - ProcessingJob: - output.ProcessingJob != null ? de_ProcessingJobStepMetadata(output.ProcessingJob, context) : undefined, - QualityCheck: output.QualityCheck != null ? de_QualityCheckStepMetadata(output.QualityCheck, context) : undefined, - RegisterModel: - output.RegisterModel != null ? de_RegisterModelStepMetadata(output.RegisterModel, context) : undefined, - TrainingJob: output.TrainingJob != null ? de_TrainingJobStepMetadata(output.TrainingJob, context) : undefined, - TransformJob: output.TransformJob != null ? de_TransformJobStepMetadata(output.TransformJob, context) : undefined, - TuningJob: output.TuningJob != null ? de_TuningJobStepMetaData(output.TuningJob, context) : undefined, - } as any; +const de_ListModelCardsResponse = (output: any, context: __SerdeContext): ListModelCardsResponse => { + return take(output, { + ModelCardSummaries: (_: any) => de_ModelCardSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineExecutionSummary + * deserializeAws_json1_1ListModelCardVersionsResponse */ -const de_PipelineExecutionSummary = (output: any, context: __SerdeContext): PipelineExecutionSummary => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - PipelineExecutionDescription: __expectString(output.PipelineExecutionDescription), - PipelineExecutionDisplayName: __expectString(output.PipelineExecutionDisplayName), - PipelineExecutionFailureReason: __expectString(output.PipelineExecutionFailureReason), - PipelineExecutionStatus: __expectString(output.PipelineExecutionStatus), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; +const de_ListModelCardVersionsResponse = (output: any, context: __SerdeContext): ListModelCardVersionsResponse => { + return take(output, { + ModelCardVersionSummaryList: (_: any) => de_ModelCardVersionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineExecutionSummaryList + * deserializeAws_json1_1ListModelExplainabilityJobDefinitionsResponse */ -const de_PipelineExecutionSummaryList = (output: any, context: __SerdeContext): PipelineExecutionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineExecutionSummary(entry, context); - }); - return retVal; +const de_ListModelExplainabilityJobDefinitionsResponse = ( + output: any, + context: __SerdeContext +): ListModelExplainabilityJobDefinitionsResponse => { + return take(output, { + JobDefinitionSummaries: (_: any) => de_MonitoringJobDefinitionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListModelMetadataResponse omitted. + /** - * deserializeAws_json1_1PipelineExperimentConfig + * deserializeAws_json1_1ListModelPackageGroupsOutput */ -const de_PipelineExperimentConfig = (output: any, context: __SerdeContext): PipelineExperimentConfig => { - return { - ExperimentName: __expectString(output.ExperimentName), - TrialName: __expectString(output.TrialName), - } as any; +const de_ListModelPackageGroupsOutput = (output: any, context: __SerdeContext): ListModelPackageGroupsOutput => { + return take(output, { + ModelPackageGroupSummaryList: (_: any) => de_ModelPackageGroupSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineSummary + * deserializeAws_json1_1ListModelPackagesOutput */ -const de_PipelineSummary = (output: any, context: __SerdeContext): PipelineSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastExecutionTime: - output.LastExecutionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastExecutionTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - PipelineArn: __expectString(output.PipelineArn), - PipelineDescription: __expectString(output.PipelineDescription), - PipelineDisplayName: __expectString(output.PipelineDisplayName), - PipelineName: __expectString(output.PipelineName), - RoleArn: __expectString(output.RoleArn), - } as any; +const de_ListModelPackagesOutput = (output: any, context: __SerdeContext): ListModelPackagesOutput => { + return take(output, { + ModelPackageSummaryList: (_: any) => de_ModelPackageSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PipelineSummaryList + * deserializeAws_json1_1ListModelQualityJobDefinitionsResponse */ -const de_PipelineSummaryList = (output: any, context: __SerdeContext): PipelineSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PipelineSummary(entry, context); - }); - return retVal; +const de_ListModelQualityJobDefinitionsResponse = ( + output: any, + context: __SerdeContext +): ListModelQualityJobDefinitionsResponse => { + return take(output, { + JobDefinitionSummaries: (_: any) => de_MonitoringJobDefinitionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProcessingClusterConfig + * deserializeAws_json1_1ListModelsOutput */ -const de_ProcessingClusterConfig = (output: any, context: __SerdeContext): ProcessingClusterConfig => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; +const de_ListModelsOutput = (output: any, context: __SerdeContext): ListModelsOutput => { + return take(output, { + Models: (_: any) => de_ModelSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProcessingEnvironmentMap + * deserializeAws_json1_1ListMonitoringAlertHistoryResponse */ -const de_ProcessingEnvironmentMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_ListMonitoringAlertHistoryResponse = ( + output: any, + context: __SerdeContext +): ListMonitoringAlertHistoryResponse => { + return take(output, { + MonitoringAlertHistory: (_: any) => de_MonitoringAlertHistoryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProcessingFeatureStoreOutput + * deserializeAws_json1_1ListMonitoringAlertsResponse */ -const de_ProcessingFeatureStoreOutput = (output: any, context: __SerdeContext): ProcessingFeatureStoreOutput => { - return { - FeatureGroupName: __expectString(output.FeatureGroupName), - } as any; +const de_ListMonitoringAlertsResponse = (output: any, context: __SerdeContext): ListMonitoringAlertsResponse => { + return take(output, { + MonitoringAlertSummaries: (_: any) => de_MonitoringAlertSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProcessingInput + * deserializeAws_json1_1ListMonitoringExecutionsResponse */ -const de_ProcessingInput = (output: any, context: __SerdeContext): ProcessingInput => { - return { - AppManaged: __expectBoolean(output.AppManaged), - DatasetDefinition: - output.DatasetDefinition != null ? de_DatasetDefinition(output.DatasetDefinition, context) : undefined, - InputName: __expectString(output.InputName), - S3Input: output.S3Input != null ? de_ProcessingS3Input(output.S3Input, context) : undefined, - } as any; +const de_ListMonitoringExecutionsResponse = ( + output: any, + context: __SerdeContext +): ListMonitoringExecutionsResponse => { + return take(output, { + MonitoringExecutionSummaries: (_: any) => de_MonitoringExecutionSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProcessingInputs + * deserializeAws_json1_1ListMonitoringSchedulesResponse */ -const de_ProcessingInputs = (output: any, context: __SerdeContext): ProcessingInput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProcessingInput(entry, context); - }); - return retVal; +const de_ListMonitoringSchedulesResponse = (output: any, context: __SerdeContext): ListMonitoringSchedulesResponse => { + return take(output, { + MonitoringScheduleSummaries: (_: any) => de_MonitoringScheduleSummaryList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProcessingJob + * deserializeAws_json1_1ListNotebookInstanceLifecycleConfigsOutput */ -const de_ProcessingJob = (output: any, context: __SerdeContext): ProcessingJob => { - return { - AppSpecification: - output.AppSpecification != null ? de_AppSpecification(output.AppSpecification, context) : undefined, - AutoMLJobArn: __expectString(output.AutoMLJobArn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Environment: output.Environment != null ? de_ProcessingEnvironmentMap(output.Environment, context) : undefined, - ExitMessage: __expectString(output.ExitMessage), - ExperimentConfig: - output.ExperimentConfig != null ? de_ExperimentConfig(output.ExperimentConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - NetworkConfig: output.NetworkConfig != null ? de_NetworkConfig(output.NetworkConfig, context) : undefined, - ProcessingEndTime: - output.ProcessingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ProcessingEndTime))) - : undefined, - ProcessingInputs: - output.ProcessingInputs != null ? de_ProcessingInputs(output.ProcessingInputs, context) : undefined, - ProcessingJobArn: __expectString(output.ProcessingJobArn), - ProcessingJobName: __expectString(output.ProcessingJobName), - ProcessingJobStatus: __expectString(output.ProcessingJobStatus), - ProcessingOutputConfig: - output.ProcessingOutputConfig != null - ? de_ProcessingOutputConfig(output.ProcessingOutputConfig, context) - : undefined, - ProcessingResources: - output.ProcessingResources != null ? de_ProcessingResources(output.ProcessingResources, context) : undefined, - ProcessingStartTime: - output.ProcessingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ProcessingStartTime))) - : undefined, - RoleArn: __expectString(output.RoleArn), - StoppingCondition: - output.StoppingCondition != null ? de_ProcessingStoppingCondition(output.StoppingCondition, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TrainingJobArn: __expectString(output.TrainingJobArn), - } as any; -}; - -/** - * deserializeAws_json1_1ProcessingJobStepMetadata - */ -const de_ProcessingJobStepMetadata = (output: any, context: __SerdeContext): ProcessingJobStepMetadata => { - return { - Arn: __expectString(output.Arn), - } as any; +const de_ListNotebookInstanceLifecycleConfigsOutput = ( + output: any, + context: __SerdeContext +): ListNotebookInstanceLifecycleConfigsOutput => { + return take(output, { + NextToken: __expectString, + NotebookInstanceLifecycleConfigs: (_: any) => de_NotebookInstanceLifecycleConfigSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingJobSummaries + * deserializeAws_json1_1ListNotebookInstancesOutput */ -const de_ProcessingJobSummaries = (output: any, context: __SerdeContext): ProcessingJobSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProcessingJobSummary(entry, context); - }); - return retVal; +const de_ListNotebookInstancesOutput = (output: any, context: __SerdeContext): ListNotebookInstancesOutput => { + return take(output, { + NextToken: __expectString, + NotebookInstances: (_: any) => de_NotebookInstanceSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingJobSummary + * deserializeAws_json1_1ListPipelineExecutionsResponse */ -const de_ProcessingJobSummary = (output: any, context: __SerdeContext): ProcessingJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ExitMessage: __expectString(output.ExitMessage), - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ProcessingEndTime: - output.ProcessingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ProcessingEndTime))) - : undefined, - ProcessingJobArn: __expectString(output.ProcessingJobArn), - ProcessingJobName: __expectString(output.ProcessingJobName), - ProcessingJobStatus: __expectString(output.ProcessingJobStatus), - } as any; -}; - -/** - * deserializeAws_json1_1ProcessingOutput - */ -const de_ProcessingOutput = (output: any, context: __SerdeContext): ProcessingOutput => { - return { - AppManaged: __expectBoolean(output.AppManaged), - FeatureStoreOutput: - output.FeatureStoreOutput != null - ? de_ProcessingFeatureStoreOutput(output.FeatureStoreOutput, context) - : undefined, - OutputName: __expectString(output.OutputName), - S3Output: output.S3Output != null ? de_ProcessingS3Output(output.S3Output, context) : undefined, - } as any; +const de_ListPipelineExecutionsResponse = (output: any, context: __SerdeContext): ListPipelineExecutionsResponse => { + return take(output, { + NextToken: __expectString, + PipelineExecutionSummaries: (_: any) => de_PipelineExecutionSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingOutputConfig + * deserializeAws_json1_1ListPipelineExecutionStepsResponse */ -const de_ProcessingOutputConfig = (output: any, context: __SerdeContext): ProcessingOutputConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - Outputs: output.Outputs != null ? de_ProcessingOutputs(output.Outputs, context) : undefined, - } as any; +const de_ListPipelineExecutionStepsResponse = ( + output: any, + context: __SerdeContext +): ListPipelineExecutionStepsResponse => { + return take(output, { + NextToken: __expectString, + PipelineExecutionSteps: (_: any) => de_PipelineExecutionStepList(_, context), + }) as any; }; +// de_ListPipelineParametersForExecutionResponse omitted. + /** - * deserializeAws_json1_1ProcessingOutputs + * deserializeAws_json1_1ListPipelinesResponse */ -const de_ProcessingOutputs = (output: any, context: __SerdeContext): ProcessingOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProcessingOutput(entry, context); - }); - return retVal; +const de_ListPipelinesResponse = (output: any, context: __SerdeContext): ListPipelinesResponse => { + return take(output, { + NextToken: __expectString, + PipelineSummaries: (_: any) => de_PipelineSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingResources + * deserializeAws_json1_1ListProcessingJobsResponse */ -const de_ProcessingResources = (output: any, context: __SerdeContext): ProcessingResources => { - return { - ClusterConfig: output.ClusterConfig != null ? de_ProcessingClusterConfig(output.ClusterConfig, context) : undefined, - } as any; +const de_ListProcessingJobsResponse = (output: any, context: __SerdeContext): ListProcessingJobsResponse => { + return take(output, { + NextToken: __expectString, + ProcessingJobSummaries: (_: any) => de_ProcessingJobSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingS3Input + * deserializeAws_json1_1ListProjectsOutput */ -const de_ProcessingS3Input = (output: any, context: __SerdeContext): ProcessingS3Input => { - return { - LocalPath: __expectString(output.LocalPath), - S3CompressionType: __expectString(output.S3CompressionType), - S3DataDistributionType: __expectString(output.S3DataDistributionType), - S3DataType: __expectString(output.S3DataType), - S3InputMode: __expectString(output.S3InputMode), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_ListProjectsOutput = (output: any, context: __SerdeContext): ListProjectsOutput => { + return take(output, { + NextToken: __expectString, + ProjectSummaryList: (_: any) => de_ProjectSummaryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingS3Output + * deserializeAws_json1_1ListSpacesResponse */ -const de_ProcessingS3Output = (output: any, context: __SerdeContext): ProcessingS3Output => { - return { - LocalPath: __expectString(output.LocalPath), - S3UploadMode: __expectString(output.S3UploadMode), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_ListSpacesResponse = (output: any, context: __SerdeContext): ListSpacesResponse => { + return take(output, { + NextToken: __expectString, + Spaces: (_: any) => de_SpaceList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProcessingStoppingCondition + * deserializeAws_json1_1ListStageDevicesResponse */ -const de_ProcessingStoppingCondition = (output: any, context: __SerdeContext): ProcessingStoppingCondition => { - return { - MaxRuntimeInSeconds: __expectInt32(output.MaxRuntimeInSeconds), - } as any; +const de_ListStageDevicesResponse = (output: any, context: __SerdeContext): ListStageDevicesResponse => { + return take(output, { + DeviceDeploymentSummaries: (_: any) => de_DeviceDeploymentSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProductionVariant + * deserializeAws_json1_1ListStudioLifecycleConfigsResponse */ -const de_ProductionVariant = (output: any, context: __SerdeContext): ProductionVariant => { - return { - AcceleratorType: __expectString(output.AcceleratorType), - ContainerStartupHealthCheckTimeoutInSeconds: __expectInt32(output.ContainerStartupHealthCheckTimeoutInSeconds), - CoreDumpConfig: - output.CoreDumpConfig != null ? de_ProductionVariantCoreDumpConfig(output.CoreDumpConfig, context) : undefined, - EnableSSMAccess: __expectBoolean(output.EnableSSMAccess), - InitialInstanceCount: __expectInt32(output.InitialInstanceCount), - InitialVariantWeight: __limitedParseFloat32(output.InitialVariantWeight), - InstanceType: __expectString(output.InstanceType), - ModelDataDownloadTimeoutInSeconds: __expectInt32(output.ModelDataDownloadTimeoutInSeconds), - ModelName: __expectString(output.ModelName), - ServerlessConfig: - output.ServerlessConfig != null - ? de_ProductionVariantServerlessConfig(output.ServerlessConfig, context) - : undefined, - VariantName: __expectString(output.VariantName), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; -}; - -/** - * deserializeAws_json1_1ProductionVariantCoreDumpConfig - */ -const de_ProductionVariantCoreDumpConfig = (output: any, context: __SerdeContext): ProductionVariantCoreDumpConfig => { - return { - DestinationS3Uri: __expectString(output.DestinationS3Uri), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; +const de_ListStudioLifecycleConfigsResponse = ( + output: any, + context: __SerdeContext +): ListStudioLifecycleConfigsResponse => { + return take(output, { + NextToken: __expectString, + StudioLifecycleConfigs: (_: any) => de_StudioLifecycleConfigsList(_, context), + }) as any; }; +// de_ListSubscribedWorkteamsResponse omitted. + +// de_ListTagsOutput omitted. + /** - * deserializeAws_json1_1ProductionVariantList + * deserializeAws_json1_1ListTrainingJobsForHyperParameterTuningJobResponse */ -const de_ProductionVariantList = (output: any, context: __SerdeContext): ProductionVariant[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductionVariant(entry, context); - }); - return retVal; +const de_ListTrainingJobsForHyperParameterTuningJobResponse = ( + output: any, + context: __SerdeContext +): ListTrainingJobsForHyperParameterTuningJobResponse => { + return take(output, { + NextToken: __expectString, + TrainingJobSummaries: (_: any) => de_HyperParameterTrainingJobSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProductionVariantServerlessConfig + * deserializeAws_json1_1ListTrainingJobsResponse */ -const de_ProductionVariantServerlessConfig = ( - output: any, - context: __SerdeContext -): ProductionVariantServerlessConfig => { - return { - MaxConcurrency: __expectInt32(output.MaxConcurrency), - MemorySizeInMB: __expectInt32(output.MemorySizeInMB), - } as any; +const de_ListTrainingJobsResponse = (output: any, context: __SerdeContext): ListTrainingJobsResponse => { + return take(output, { + NextToken: __expectString, + TrainingJobSummaries: (_: any) => de_TrainingJobSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProductionVariantStatus + * deserializeAws_json1_1ListTransformJobsResponse */ -const de_ProductionVariantStatus = (output: any, context: __SerdeContext): ProductionVariantStatus => { - return { - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; +const de_ListTransformJobsResponse = (output: any, context: __SerdeContext): ListTransformJobsResponse => { + return take(output, { + NextToken: __expectString, + TransformJobSummaries: (_: any) => de_TransformJobSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProductionVariantStatusList + * deserializeAws_json1_1ListTrialComponentsResponse */ -const de_ProductionVariantStatusList = (output: any, context: __SerdeContext): ProductionVariantStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductionVariantStatus(entry, context); - }); - return retVal; +const de_ListTrialComponentsResponse = (output: any, context: __SerdeContext): ListTrialComponentsResponse => { + return take(output, { + NextToken: __expectString, + TrialComponentSummaries: (_: any) => de_TrialComponentSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProductionVariantSummary + * deserializeAws_json1_1ListTrialsResponse */ -const de_ProductionVariantSummary = (output: any, context: __SerdeContext): ProductionVariantSummary => { - return { - CurrentInstanceCount: __expectInt32(output.CurrentInstanceCount), - CurrentServerlessConfig: - output.CurrentServerlessConfig != null - ? de_ProductionVariantServerlessConfig(output.CurrentServerlessConfig, context) - : undefined, - CurrentWeight: __limitedParseFloat32(output.CurrentWeight), - DeployedImages: output.DeployedImages != null ? de_DeployedImages(output.DeployedImages, context) : undefined, - DesiredInstanceCount: __expectInt32(output.DesiredInstanceCount), - DesiredServerlessConfig: - output.DesiredServerlessConfig != null - ? de_ProductionVariantServerlessConfig(output.DesiredServerlessConfig, context) - : undefined, - DesiredWeight: __limitedParseFloat32(output.DesiredWeight), - VariantName: __expectString(output.VariantName), - VariantStatus: - output.VariantStatus != null ? de_ProductionVariantStatusList(output.VariantStatus, context) : undefined, - } as any; +const de_ListTrialsResponse = (output: any, context: __SerdeContext): ListTrialsResponse => { + return take(output, { + NextToken: __expectString, + TrialSummaries: (_: any) => de_TrialSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProductionVariantSummaryList + * deserializeAws_json1_1ListUserProfilesResponse */ -const de_ProductionVariantSummaryList = (output: any, context: __SerdeContext): ProductionVariantSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductionVariantSummary(entry, context); - }); - return retVal; +const de_ListUserProfilesResponse = (output: any, context: __SerdeContext): ListUserProfilesResponse => { + return take(output, { + NextToken: __expectString, + UserProfiles: (_: any) => de_UserProfileList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProductListings + * deserializeAws_json1_1ListWorkforcesResponse */ -const de_ProductListings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListWorkforcesResponse = (output: any, context: __SerdeContext): ListWorkforcesResponse => { + return take(output, { + NextToken: __expectString, + Workforces: (_: any) => de_Workforces(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProfilerConfig + * deserializeAws_json1_1ListWorkteamsResponse */ -const de_ProfilerConfig = (output: any, context: __SerdeContext): ProfilerConfig => { - return { - DisableProfiler: __expectBoolean(output.DisableProfiler), - ProfilingIntervalInMilliseconds: __expectLong(output.ProfilingIntervalInMilliseconds), - ProfilingParameters: - output.ProfilingParameters != null ? de_ProfilingParameters(output.ProfilingParameters, context) : undefined, - S3OutputPath: __expectString(output.S3OutputPath), - } as any; +const de_ListWorkteamsResponse = (output: any, context: __SerdeContext): ListWorkteamsResponse => { + return take(output, { + NextToken: __expectString, + Workteams: (_: any) => de_Workteams(_, context), + }) as any; }; +// de_MemberDefinition omitted. + +// de_MemberDefinitions omitted. + +// de_MetadataProperties omitted. + /** - * deserializeAws_json1_1ProfilerRuleConfiguration + * deserializeAws_json1_1MetricData */ -const de_ProfilerRuleConfiguration = (output: any, context: __SerdeContext): ProfilerRuleConfiguration => { - return { - InstanceType: __expectString(output.InstanceType), - LocalPath: __expectString(output.LocalPath), - RuleConfigurationName: __expectString(output.RuleConfigurationName), - RuleEvaluatorImage: __expectString(output.RuleEvaluatorImage), - RuleParameters: output.RuleParameters != null ? de_RuleParameters(output.RuleParameters, context) : undefined, - S3OutputPath: __expectString(output.S3OutputPath), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; +const de_MetricData = (output: any, context: __SerdeContext): MetricData => { + return take(output, { + MetricName: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Value: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_1ProfilerRuleConfigurations + * deserializeAws_json1_1MetricDataList */ -const de_ProfilerRuleConfigurations = (output: any, context: __SerdeContext): ProfilerRuleConfiguration[] => { +const de_MetricDataList = (output: any, context: __SerdeContext): MetricDatum[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProfilerRuleConfiguration(entry, context); + return de_MetricDatum(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ProfilerRuleEvaluationStatus + * deserializeAws_json1_1MetricDatum */ -const de_ProfilerRuleEvaluationStatus = (output: any, context: __SerdeContext): ProfilerRuleEvaluationStatus => { - return { - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - RuleConfigurationName: __expectString(output.RuleConfigurationName), - RuleEvaluationJobArn: __expectString(output.RuleEvaluationJobArn), - RuleEvaluationStatus: __expectString(output.RuleEvaluationStatus), - StatusDetails: __expectString(output.StatusDetails), - } as any; +const de_MetricDatum = (output: any, context: __SerdeContext): MetricDatum => { + return take(output, { + MetricName: __expectString, + Set: __expectString, + StandardMetricName: __expectString, + Value: __limitedParseFloat32, + }) as any; }; +// de_MetricDefinition omitted. + +// de_MetricDefinitionList omitted. + +// de_MetricsSource omitted. + /** - * deserializeAws_json1_1ProfilerRuleEvaluationStatuses + * deserializeAws_json1_1Model */ -const de_ProfilerRuleEvaluationStatuses = (output: any, context: __SerdeContext): ProfilerRuleEvaluationStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProfilerRuleEvaluationStatus(entry, context); - }); - return retVal; +const de_Model = (output: any, context: __SerdeContext): Model => { + return take(output, { + Containers: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnableNetworkIsolation: __expectBoolean, + ExecutionRoleArn: __expectString, + InferenceExecutionConfig: _json, + ModelArn: __expectString, + ModelName: __expectString, + PrimaryContainer: _json, + Tags: _json, + VpcConfig: _json, + }) as any; }; +// de_ModelArtifacts omitted. + +// de_ModelBiasAppSpecification omitted. + +// de_ModelBiasBaselineConfig omitted. + /** - * deserializeAws_json1_1ProfilingParameters + * deserializeAws_json1_1ModelBiasJobInput */ -const de_ProfilingParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_ModelBiasJobInput = (output: any, context: __SerdeContext): ModelBiasJobInput => { + return take(output, { + BatchTransformInput: (_: any) => de_BatchTransformInput(_, context), + EndpointInput: (_: any) => de_EndpointInput(_, context), + GroundTruthS3Input: _json, + }) as any; }; /** - * deserializeAws_json1_1Project + * deserializeAws_json1_1ModelCard */ -const de_Project = (output: any, context: __SerdeContext): Project => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ProjectArn: __expectString(output.ProjectArn), - ProjectDescription: __expectString(output.ProjectDescription), - ProjectId: __expectString(output.ProjectId), - ProjectName: __expectString(output.ProjectName), - ProjectStatus: __expectString(output.ProjectStatus), - ServiceCatalogProvisionedProductDetails: - output.ServiceCatalogProvisionedProductDetails != null - ? de_ServiceCatalogProvisionedProductDetails(output.ServiceCatalogProvisionedProductDetails, context) - : undefined, - ServiceCatalogProvisioningDetails: - output.ServiceCatalogProvisioningDetails != null - ? de_ServiceCatalogProvisioningDetails(output.ServiceCatalogProvisioningDetails, context) - : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +const de_ModelCard = (output: any, context: __SerdeContext): ModelCard => { + return take(output, { + Content: __expectString, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardArn: __expectString, + ModelCardName: __expectString, + ModelCardStatus: __expectString, + ModelCardVersion: __expectInt32, + ModelId: __expectString, + RiskRating: __expectString, + SecurityConfig: _json, + Tags: _json, + }) as any; +}; + +// de_ModelCardExportArtifacts omitted. /** - * deserializeAws_json1_1ProjectSummary + * deserializeAws_json1_1ModelCardExportJobSummary */ -const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ProjectArn: __expectString(output.ProjectArn), - ProjectDescription: __expectString(output.ProjectDescription), - ProjectId: __expectString(output.ProjectId), - ProjectName: __expectString(output.ProjectName), - ProjectStatus: __expectString(output.ProjectStatus), - } as any; +const de_ModelCardExportJobSummary = (output: any, context: __SerdeContext): ModelCardExportJobSummary => { + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardExportJobArn: __expectString, + ModelCardExportJobName: __expectString, + ModelCardName: __expectString, + ModelCardVersion: __expectInt32, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ProjectSummaryList + * deserializeAws_json1_1ModelCardExportJobSummaryList */ -const de_ProjectSummaryList = (output: any, context: __SerdeContext): ProjectSummary[] => { +const de_ModelCardExportJobSummaryList = (output: any, context: __SerdeContext): ModelCardExportJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProjectSummary(entry, context); + return de_ModelCardExportJobSummary(entry, context); }); return retVal; }; +// de_ModelCardExportOutputConfig omitted. + +// de_ModelCardSecurityConfig omitted. + /** - * deserializeAws_json1_1PropertyNameSuggestion + * deserializeAws_json1_1ModelCardSummary */ -const de_PropertyNameSuggestion = (output: any, context: __SerdeContext): PropertyNameSuggestion => { - return { - PropertyName: __expectString(output.PropertyName), - } as any; +const de_ModelCardSummary = (output: any, context: __SerdeContext): ModelCardSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardArn: __expectString, + ModelCardName: __expectString, + ModelCardStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PropertyNameSuggestionList + * deserializeAws_json1_1ModelCardSummaryList */ -const de_PropertyNameSuggestionList = (output: any, context: __SerdeContext): PropertyNameSuggestion[] => { +const de_ModelCardSummaryList = (output: any, context: __SerdeContext): ModelCardSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PropertyNameSuggestion(entry, context); + return de_ModelCardSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ProvisioningParameter + * deserializeAws_json1_1ModelCardVersionSummary */ -const de_ProvisioningParameter = (output: any, context: __SerdeContext): ProvisioningParameter => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_ModelCardVersionSummary = (output: any, context: __SerdeContext): ModelCardVersionSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardArn: __expectString, + ModelCardName: __expectString, + ModelCardStatus: __expectString, + ModelCardVersion: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1ProvisioningParameters + * deserializeAws_json1_1ModelCardVersionSummaryList */ -const de_ProvisioningParameters = (output: any, context: __SerdeContext): ProvisioningParameter[] => { +const de_ModelCardVersionSummaryList = (output: any, context: __SerdeContext): ModelCardVersionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningParameter(entry, context); + return de_ModelCardVersionSummary(entry, context); }); return retVal; }; +// de_ModelClientConfig omitted. + +// de_ModelConfiguration omitted. + /** - * deserializeAws_json1_1PublicWorkforceTaskPrice + * deserializeAws_json1_1ModelDashboardEndpoint */ -const de_PublicWorkforceTaskPrice = (output: any, context: __SerdeContext): PublicWorkforceTaskPrice => { - return { - AmountInUsd: output.AmountInUsd != null ? de_USD(output.AmountInUsd, context) : undefined, - } as any; +const de_ModelDashboardEndpoint = (output: any, context: __SerdeContext): ModelDashboardEndpoint => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointArn: __expectString, + EndpointName: __expectString, + EndpointStatus: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1PutModelPackageGroupPolicyOutput + * deserializeAws_json1_1ModelDashboardEndpoints */ -const de_PutModelPackageGroupPolicyOutput = ( - output: any, - context: __SerdeContext -): PutModelPackageGroupPolicyOutput => { - return { - ModelPackageGroupArn: __expectString(output.ModelPackageGroupArn), - } as any; +const de_ModelDashboardEndpoints = (output: any, context: __SerdeContext): ModelDashboardEndpoint[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ModelDashboardEndpoint(entry, context); + }); + return retVal; }; +// de_ModelDashboardIndicatorAction omitted. + /** - * deserializeAws_json1_1QualityCheckStepMetadata + * deserializeAws_json1_1ModelDashboardModel */ -const de_QualityCheckStepMetadata = (output: any, context: __SerdeContext): QualityCheckStepMetadata => { - return { - BaselineUsedForDriftCheckConstraints: __expectString(output.BaselineUsedForDriftCheckConstraints), - BaselineUsedForDriftCheckStatistics: __expectString(output.BaselineUsedForDriftCheckStatistics), - CalculatedBaselineConstraints: __expectString(output.CalculatedBaselineConstraints), - CalculatedBaselineStatistics: __expectString(output.CalculatedBaselineStatistics), - CheckJobArn: __expectString(output.CheckJobArn), - CheckType: __expectString(output.CheckType), - ModelPackageGroupName: __expectString(output.ModelPackageGroupName), - RegisterNewBaseline: __expectBoolean(output.RegisterNewBaseline), - SkipCheck: __expectBoolean(output.SkipCheck), - ViolationReport: __expectString(output.ViolationReport), - } as any; +const de_ModelDashboardModel = (output: any, context: __SerdeContext): ModelDashboardModel => { + return take(output, { + Endpoints: (_: any) => de_ModelDashboardEndpoints(_, context), + LastBatchTransformJob: (_: any) => de_TransformJob(_, context), + Model: (_: any) => de_Model(_, context), + ModelCard: (_: any) => de_ModelDashboardModelCard(_, context), + MonitoringSchedules: (_: any) => de_ModelDashboardMonitoringSchedules(_, context), + }) as any; }; /** - * deserializeAws_json1_1QueryLineageResponse + * deserializeAws_json1_1ModelDashboardModelCard */ -const de_QueryLineageResponse = (output: any, context: __SerdeContext): QueryLineageResponse => { - return { - Edges: output.Edges != null ? de_Edges(output.Edges, context) : undefined, - NextToken: __expectString(output.NextToken), - Vertices: output.Vertices != null ? de_Vertices(output.Vertices, context) : undefined, - } as any; +const de_ModelDashboardModelCard = (output: any, context: __SerdeContext): ModelDashboardModelCard => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelCardArn: __expectString, + ModelCardName: __expectString, + ModelCardStatus: __expectString, + ModelCardVersion: __expectInt32, + ModelId: __expectString, + RiskRating: __expectString, + SecurityConfig: _json, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1RealTimeInferenceConfig + * deserializeAws_json1_1ModelDashboardMonitoringSchedule */ -const de_RealTimeInferenceConfig = (output: any, context: __SerdeContext): RealTimeInferenceConfig => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - } as any; +const de_ModelDashboardMonitoringSchedule = ( + output: any, + context: __SerdeContext +): ModelDashboardMonitoringSchedule => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastMonitoringExecutionSummary: (_: any) => de_MonitoringExecutionSummary(_, context), + MonitoringAlertSummaries: (_: any) => de_MonitoringAlertSummaryList(_, context), + MonitoringScheduleArn: __expectString, + MonitoringScheduleConfig: (_: any) => de_MonitoringScheduleConfig(_, context), + MonitoringScheduleName: __expectString, + MonitoringScheduleStatus: __expectString, + MonitoringType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RealtimeInferenceInstanceTypes + * deserializeAws_json1_1ModelDashboardMonitoringSchedules */ -const de_RealtimeInferenceInstanceTypes = ( +const de_ModelDashboardMonitoringSchedules = ( output: any, context: __SerdeContext -): (ProductionVariantInstanceType | string)[] => { +): ModelDashboardMonitoringSchedule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ModelDashboardMonitoringSchedule(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RecommendationJobContainerConfig - */ -const de_RecommendationJobContainerConfig = ( - output: any, - context: __SerdeContext -): RecommendationJobContainerConfig => { - return { - DataInputConfig: __expectString(output.DataInputConfig), - Domain: __expectString(output.Domain), - Framework: __expectString(output.Framework), - FrameworkVersion: __expectString(output.FrameworkVersion), - NearestModelName: __expectString(output.NearestModelName), - PayloadConfig: - output.PayloadConfig != null ? de_RecommendationJobPayloadConfig(output.PayloadConfig, context) : undefined, - SupportedInstanceTypes: - output.SupportedInstanceTypes != null - ? de_RecommendationJobSupportedInstanceTypes(output.SupportedInstanceTypes, context) - : undefined, - Task: __expectString(output.Task), - } as any; -}; +// de_ModelDataQuality omitted. + +// de_ModelDeployConfig omitted. + +// de_ModelDeployResult omitted. + +// de_ModelDigests omitted. + +// de_ModelExplainabilityAppSpecification omitted. + +// de_ModelExplainabilityBaselineConfig omitted. /** - * deserializeAws_json1_1RecommendationJobInferenceBenchmark + * deserializeAws_json1_1ModelExplainabilityJobInput */ -const de_RecommendationJobInferenceBenchmark = ( - output: any, - context: __SerdeContext -): RecommendationJobInferenceBenchmark => { - return { - EndpointConfiguration: - output.EndpointConfiguration != null - ? de_EndpointOutputConfiguration(output.EndpointConfiguration, context) - : undefined, - EndpointMetrics: output.EndpointMetrics != null ? de_InferenceMetrics(output.EndpointMetrics, context) : undefined, - FailureReason: __expectString(output.FailureReason), - Metrics: output.Metrics != null ? de_RecommendationMetrics(output.Metrics, context) : undefined, - ModelConfiguration: - output.ModelConfiguration != null ? de_ModelConfiguration(output.ModelConfiguration, context) : undefined, - } as any; +const de_ModelExplainabilityJobInput = (output: any, context: __SerdeContext): ModelExplainabilityJobInput => { + return take(output, { + BatchTransformInput: (_: any) => de_BatchTransformInput(_, context), + EndpointInput: (_: any) => de_EndpointInput(_, context), + }) as any; }; +// de_ModelInfrastructureConfig omitted. + +// de_ModelInput omitted. + +// de_ModelLatencyThreshold omitted. + +// de_ModelLatencyThresholds omitted. + +// de_ModelMetadataSummaries omitted. + +// de_ModelMetadataSummary omitted. + +// de_ModelMetrics omitted. + /** - * deserializeAws_json1_1RecommendationJobInputConfig + * deserializeAws_json1_1ModelPackage */ -const de_RecommendationJobInputConfig = (output: any, context: __SerdeContext): RecommendationJobInputConfig => { - return { - ContainerConfig: - output.ContainerConfig != null ? de_RecommendationJobContainerConfig(output.ContainerConfig, context) : undefined, - EndpointConfigurations: - output.EndpointConfigurations != null - ? de_EndpointInputConfigurations(output.EndpointConfigurations, context) - : undefined, - Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined, - JobDurationInSeconds: __expectInt32(output.JobDurationInSeconds), - ModelName: __expectString(output.ModelName), - ModelPackageVersionArn: __expectString(output.ModelPackageVersionArn), - ResourceLimit: - output.ResourceLimit != null ? de_RecommendationJobResourceLimit(output.ResourceLimit, context) : undefined, - TrafficPattern: output.TrafficPattern != null ? de_TrafficPattern(output.TrafficPattern, context) : undefined, - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VpcConfig: output.VpcConfig != null ? de_RecommendationJobVpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RecommendationJobPayloadConfig - */ -const de_RecommendationJobPayloadConfig = (output: any, context: __SerdeContext): RecommendationJobPayloadConfig => { - return { - SamplePayloadUrl: __expectString(output.SamplePayloadUrl), - SupportedContentTypes: - output.SupportedContentTypes != null - ? de_RecommendationJobSupportedContentTypes(output.SupportedContentTypes, context) - : undefined, - } as any; -}; +const de_ModelPackage = (output: any, context: __SerdeContext): ModelPackage => { + return take(output, { + AdditionalInferenceSpecifications: _json, + ApprovalDescription: __expectString, + CertifyForMarketplace: __expectBoolean, + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomerMetadataProperties: _json, + Domain: __expectString, + DriftCheckBaselines: _json, + InferenceSpecification: _json, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetadataProperties: _json, + ModelApprovalStatus: __expectString, + ModelMetrics: _json, + ModelPackageArn: __expectString, + ModelPackageDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageName: __expectString, + ModelPackageStatus: __expectString, + ModelPackageStatusDetails: _json, + ModelPackageVersion: __expectInt32, + SamplePayloadUrl: __expectString, + SourceAlgorithmSpecification: _json, + Tags: _json, + Task: __expectString, + ValidationSpecification: _json, + }) as any; +}; + +// de_ModelPackageContainerDefinition omitted. + +// de_ModelPackageContainerDefinitionList omitted. /** - * deserializeAws_json1_1RecommendationJobResourceLimit + * deserializeAws_json1_1ModelPackageGroup */ -const de_RecommendationJobResourceLimit = (output: any, context: __SerdeContext): RecommendationJobResourceLimit => { - return { - MaxNumberOfTests: __expectInt32(output.MaxNumberOfTests), - MaxParallelOfTests: __expectInt32(output.MaxParallelOfTests), - } as any; +const de_ModelPackageGroup = (output: any, context: __SerdeContext): ModelPackageGroup => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelPackageGroupArn: __expectString, + ModelPackageGroupDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageGroupStatus: __expectString, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1RecommendationJobStoppingConditions + * deserializeAws_json1_1ModelPackageGroupSummary */ -const de_RecommendationJobStoppingConditions = ( - output: any, - context: __SerdeContext -): RecommendationJobStoppingConditions => { - return { - MaxInvocations: __expectInt32(output.MaxInvocations), - ModelLatencyThresholds: - output.ModelLatencyThresholds != null - ? de_ModelLatencyThresholds(output.ModelLatencyThresholds, context) - : undefined, - } as any; +const de_ModelPackageGroupSummary = (output: any, context: __SerdeContext): ModelPackageGroupSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelPackageGroupArn: __expectString, + ModelPackageGroupDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageGroupStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RecommendationJobSupportedContentTypes + * deserializeAws_json1_1ModelPackageGroupSummaryList */ -const de_RecommendationJobSupportedContentTypes = (output: any, context: __SerdeContext): string[] => { +const de_ModelPackageGroupSummaryList = (output: any, context: __SerdeContext): ModelPackageGroupSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ModelPackageGroupSummary(entry, context); }); return retVal; }; +// de_ModelPackageStatusDetails omitted. + +// de_ModelPackageStatusItem omitted. + +// de_ModelPackageStatusItemList omitted. + /** - * deserializeAws_json1_1RecommendationJobSupportedInstanceTypes + * deserializeAws_json1_1ModelPackageSummaries */ -const de_RecommendationJobSupportedInstanceTypes = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; +const de_ModelPackageSummaries = ( + output: any, + context: __SerdeContext +): Record => { + return Object.entries(output).reduce( + (acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; } - return __expectString(entry) as any; - }); - return retVal; + acc[key] = de_BatchDescribeModelPackageSummary(value, context); + return acc; + }, + {} + ); }; /** - * deserializeAws_json1_1RecommendationJobVpcConfig + * deserializeAws_json1_1ModelPackageSummary */ -const de_RecommendationJobVpcConfig = (output: any, context: __SerdeContext): RecommendationJobVpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null - ? de_RecommendationJobVpcSecurityGroupIds(output.SecurityGroupIds, context) - : undefined, - Subnets: output.Subnets != null ? de_RecommendationJobVpcSubnets(output.Subnets, context) : undefined, - } as any; +const de_ModelPackageSummary = (output: any, context: __SerdeContext): ModelPackageSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelApprovalStatus: __expectString, + ModelPackageArn: __expectString, + ModelPackageDescription: __expectString, + ModelPackageGroupName: __expectString, + ModelPackageName: __expectString, + ModelPackageStatus: __expectString, + ModelPackageVersion: __expectInt32, + }) as any; }; /** - * deserializeAws_json1_1RecommendationJobVpcSecurityGroupIds + * deserializeAws_json1_1ModelPackageSummaryList */ -const de_RecommendationJobVpcSecurityGroupIds = (output: any, context: __SerdeContext): string[] => { +const de_ModelPackageSummaryList = (output: any, context: __SerdeContext): ModelPackageSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ModelPackageSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RecommendationJobVpcSubnets - */ -const de_RecommendationJobVpcSubnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ModelPackageValidationProfile omitted. -/** - * deserializeAws_json1_1RecommendationMetrics - */ -const de_RecommendationMetrics = (output: any, context: __SerdeContext): RecommendationMetrics => { - return { - CostPerHour: __limitedParseFloat32(output.CostPerHour), - CostPerInference: __limitedParseFloat32(output.CostPerInference), - CpuUtilization: __limitedParseFloat32(output.CpuUtilization), - MaxInvocations: __expectInt32(output.MaxInvocations), - MemoryUtilization: __limitedParseFloat32(output.MemoryUtilization), - ModelLatency: __expectInt32(output.ModelLatency), - } as any; -}; +// de_ModelPackageValidationProfiles omitted. -/** - * deserializeAws_json1_1RedshiftDatasetDefinition - */ -const de_RedshiftDatasetDefinition = (output: any, context: __SerdeContext): RedshiftDatasetDefinition => { - return { - ClusterId: __expectString(output.ClusterId), - ClusterRoleArn: __expectString(output.ClusterRoleArn), - Database: __expectString(output.Database), - DbUser: __expectString(output.DbUser), - KmsKeyId: __expectString(output.KmsKeyId), - OutputCompression: __expectString(output.OutputCompression), - OutputFormat: __expectString(output.OutputFormat), - OutputS3Uri: __expectString(output.OutputS3Uri), - QueryString: __expectString(output.QueryString), - } as any; -}; +// de_ModelPackageValidationSpecification omitted. + +// de_ModelQuality omitted. + +// de_ModelQualityAppSpecification omitted. + +// de_ModelQualityBaselineConfig omitted. /** - * deserializeAws_json1_1RegisterModelStepMetadata + * deserializeAws_json1_1ModelQualityJobInput */ -const de_RegisterModelStepMetadata = (output: any, context: __SerdeContext): RegisterModelStepMetadata => { - return { - Arn: __expectString(output.Arn), - } as any; +const de_ModelQualityJobInput = (output: any, context: __SerdeContext): ModelQualityJobInput => { + return take(output, { + BatchTransformInput: (_: any) => de_BatchTransformInput(_, context), + EndpointInput: (_: any) => de_EndpointInput(_, context), + GroundTruthS3Input: _json, + }) as any; }; +// de_ModelStepMetadata omitted. + /** - * deserializeAws_json1_1RenderingError + * deserializeAws_json1_1ModelSummary */ -const de_RenderingError = (output: any, context: __SerdeContext): RenderingError => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; +const de_ModelSummary = (output: any, context: __SerdeContext): ModelSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelArn: __expectString, + ModelName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RenderingErrorList + * deserializeAws_json1_1ModelSummaryList */ -const de_RenderingErrorList = (output: any, context: __SerdeContext): RenderingError[] => { +const de_ModelSummaryList = (output: any, context: __SerdeContext): ModelSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RenderingError(entry, context); + return de_ModelSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RenderUiTemplateResponse - */ -const de_RenderUiTemplateResponse = (output: any, context: __SerdeContext): RenderUiTemplateResponse => { - return { - Errors: output.Errors != null ? de_RenderingErrorList(output.Errors, context) : undefined, - RenderedContent: __expectString(output.RenderedContent), - } as any; -}; - -/** - * deserializeAws_json1_1RepositoryAuthConfig - */ -const de_RepositoryAuthConfig = (output: any, context: __SerdeContext): RepositoryAuthConfig => { - return { - RepositoryCredentialsProviderArn: __expectString(output.RepositoryCredentialsProviderArn), - } as any; -}; - -/** - * deserializeAws_json1_1ResolvedAttributes - */ -const de_ResolvedAttributes = (output: any, context: __SerdeContext): ResolvedAttributes => { - return { - AutoMLJobObjective: - output.AutoMLJobObjective != null ? de_AutoMLJobObjective(output.AutoMLJobObjective, context) : undefined, - CompletionCriteria: - output.CompletionCriteria != null - ? de_AutoMLJobCompletionCriteria(output.CompletionCriteria, context) - : undefined, - ProblemType: __expectString(output.ProblemType), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceConfig - */ -const de_ResourceConfig = (output: any, context: __SerdeContext): ResourceConfig => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceGroups: output.InstanceGroups != null ? de_InstanceGroups(output.InstanceGroups, context) : undefined, - InstanceType: __expectString(output.InstanceType), - KeepAlivePeriodInSeconds: __expectInt32(output.KeepAlivePeriodInSeconds), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; -}; +// de_ModelVariantConfigSummary omitted. -/** - * deserializeAws_json1_1ResourceInUse - */ -const de_ResourceInUse = (output: any, context: __SerdeContext): ResourceInUse => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ModelVariantConfigSummaryList omitted. -/** - * deserializeAws_json1_1ResourceLimitExceeded - */ -const de_ResourceLimitExceeded = (output: any, context: __SerdeContext): ResourceLimitExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MonitoringAlertActions omitted. /** - * deserializeAws_json1_1ResourceLimits + * deserializeAws_json1_1MonitoringAlertHistoryList */ -const de_ResourceLimits = (output: any, context: __SerdeContext): ResourceLimits => { - return { - MaxNumberOfTrainingJobs: __expectInt32(output.MaxNumberOfTrainingJobs), - MaxParallelTrainingJobs: __expectInt32(output.MaxParallelTrainingJobs), - MaxRuntimeInSeconds: __expectInt32(output.MaxRuntimeInSeconds), - } as any; +const de_MonitoringAlertHistoryList = (output: any, context: __SerdeContext): MonitoringAlertHistorySummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MonitoringAlertHistorySummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ResourceNotFound + * deserializeAws_json1_1MonitoringAlertHistorySummary */ -const de_ResourceNotFound = (output: any, context: __SerdeContext): ResourceNotFound => { - return { - Message: __expectString(output.Message), - } as any; +const de_MonitoringAlertHistorySummary = (output: any, context: __SerdeContext): MonitoringAlertHistorySummary => { + return take(output, { + AlertStatus: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringAlertName: __expectString, + MonitoringScheduleName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceSpec + * deserializeAws_json1_1MonitoringAlertSummary */ -const de_ResourceSpec = (output: any, context: __SerdeContext): ResourceSpec => { - return { - InstanceType: __expectString(output.InstanceType), - LifecycleConfigArn: __expectString(output.LifecycleConfigArn), - SageMakerImageArn: __expectString(output.SageMakerImageArn), - SageMakerImageVersionArn: __expectString(output.SageMakerImageVersionArn), - } as any; +const de_MonitoringAlertSummary = (output: any, context: __SerdeContext): MonitoringAlertSummary => { + return take(output, { + Actions: _json, + AlertStatus: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatapointsToAlert: __expectInt32, + EvaluationPeriod: __expectInt32, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringAlertName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResponseMIMETypes + * deserializeAws_json1_1MonitoringAlertSummaryList */ -const de_ResponseMIMETypes = (output: any, context: __SerdeContext): string[] => { +const de_MonitoringAlertSummaryList = (output: any, context: __SerdeContext): MonitoringAlertSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MonitoringAlertSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RetryPipelineExecutionResponse - */ -const de_RetryPipelineExecutionResponse = (output: any, context: __SerdeContext): RetryPipelineExecutionResponse => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - } as any; -}; +// de_MonitoringAppSpecification omitted. -/** - * deserializeAws_json1_1RetryStrategy - */ -const de_RetryStrategy = (output: any, context: __SerdeContext): RetryStrategy => { - return { - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - } as any; -}; +// de_MonitoringBaselineConfig omitted. + +// de_MonitoringClusterConfig omitted. + +// de_MonitoringConstraintsResource omitted. + +// de_MonitoringContainerArguments omitted. + +// de_MonitoringCsvDatasetFormat omitted. + +// de_MonitoringDatasetFormat omitted. + +// de_MonitoringEnvironmentMap omitted. /** - * deserializeAws_json1_1RSessionAppSettings + * deserializeAws_json1_1MonitoringExecutionSummary */ -const de_RSessionAppSettings = (output: any, context: __SerdeContext): RSessionAppSettings => { - return { - CustomImages: output.CustomImages != null ? de_CustomImages(output.CustomImages, context) : undefined, - DefaultResourceSpec: - output.DefaultResourceSpec != null ? de_ResourceSpec(output.DefaultResourceSpec, context) : undefined, - } as any; +const de_MonitoringExecutionSummary = (output: any, context: __SerdeContext): MonitoringExecutionSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringExecutionStatus: __expectString, + MonitoringJobDefinitionName: __expectString, + MonitoringScheduleName: __expectString, + MonitoringType: __expectString, + ProcessingJobArn: __expectString, + ScheduledTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1RStudioServerProAppSettings + * deserializeAws_json1_1MonitoringExecutionSummaryList */ -const de_RStudioServerProAppSettings = (output: any, context: __SerdeContext): RStudioServerProAppSettings => { - return { - AccessStatus: __expectString(output.AccessStatus), - UserGroup: __expectString(output.UserGroup), - } as any; +const de_MonitoringExecutionSummaryList = (output: any, context: __SerdeContext): MonitoringExecutionSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MonitoringExecutionSummary(entry, context); + }); + return retVal; }; +// de_MonitoringGroundTruthS3Input omitted. + /** - * deserializeAws_json1_1RStudioServerProDomainSettings + * deserializeAws_json1_1MonitoringInput */ -const de_RStudioServerProDomainSettings = (output: any, context: __SerdeContext): RStudioServerProDomainSettings => { - return { - DefaultResourceSpec: - output.DefaultResourceSpec != null ? de_ResourceSpec(output.DefaultResourceSpec, context) : undefined, - DomainExecutionRoleArn: __expectString(output.DomainExecutionRoleArn), - RStudioConnectUrl: __expectString(output.RStudioConnectUrl), - RStudioPackageManagerUrl: __expectString(output.RStudioPackageManagerUrl), - } as any; +const de_MonitoringInput = (output: any, context: __SerdeContext): MonitoringInput => { + return take(output, { + BatchTransformInput: (_: any) => de_BatchTransformInput(_, context), + EndpointInput: (_: any) => de_EndpointInput(_, context), + }) as any; }; /** - * deserializeAws_json1_1RuleParameters + * deserializeAws_json1_1MonitoringInputs */ -const de_RuleParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_MonitoringInputs = (output: any, context: __SerdeContext): MonitoringInput[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_MonitoringInput(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1S3DataSource + * deserializeAws_json1_1MonitoringJobDefinition */ -const de_S3DataSource = (output: any, context: __SerdeContext): S3DataSource => { - return { - AttributeNames: output.AttributeNames != null ? de_AttributeNames(output.AttributeNames, context) : undefined, - InstanceGroupNames: - output.InstanceGroupNames != null ? de_InstanceGroupNames(output.InstanceGroupNames, context) : undefined, - S3DataDistributionType: __expectString(output.S3DataDistributionType), - S3DataType: __expectString(output.S3DataType), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_MonitoringJobDefinition = (output: any, context: __SerdeContext): MonitoringJobDefinition => { + return take(output, { + BaselineConfig: _json, + Environment: _json, + MonitoringAppSpecification: _json, + MonitoringInputs: (_: any) => de_MonitoringInputs(_, context), + MonitoringOutputConfig: _json, + MonitoringResources: _json, + NetworkConfig: _json, + RoleArn: __expectString, + StoppingCondition: _json, + }) as any; }; /** - * deserializeAws_json1_1S3StorageConfig + * deserializeAws_json1_1MonitoringJobDefinitionSummary */ -const de_S3StorageConfig = (output: any, context: __SerdeContext): S3StorageConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - ResolvedOutputS3Uri: __expectString(output.ResolvedOutputS3Uri), - S3Uri: __expectString(output.S3Uri), - } as any; +const de_MonitoringJobDefinitionSummary = (output: any, context: __SerdeContext): MonitoringJobDefinitionSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + MonitoringJobDefinitionArn: __expectString, + MonitoringJobDefinitionName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SageMakerImageVersionAliases + * deserializeAws_json1_1MonitoringJobDefinitionSummaryList */ -const de_SageMakerImageVersionAliases = (output: any, context: __SerdeContext): string[] => { +const de_MonitoringJobDefinitionSummaryList = ( + output: any, + context: __SerdeContext +): MonitoringJobDefinitionSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MonitoringJobDefinitionSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ScheduleConfig - */ -const de_ScheduleConfig = (output: any, context: __SerdeContext): ScheduleConfig => { - return { - ScheduleExpression: __expectString(output.ScheduleExpression), - } as any; -}; +// de_MonitoringJsonDatasetFormat omitted. + +// de_MonitoringNetworkConfig omitted. + +// de_MonitoringOutput omitted. + +// de_MonitoringOutputConfig omitted. + +// de_MonitoringOutputs omitted. + +// de_MonitoringParquetDatasetFormat omitted. + +// de_MonitoringResources omitted. + +// de_MonitoringS3Output omitted. /** - * deserializeAws_json1_1SearchRecord + * deserializeAws_json1_1MonitoringSchedule */ -const de_SearchRecord = (output: any, context: __SerdeContext): SearchRecord => { - return { - Endpoint: output.Endpoint != null ? de_Endpoint(output.Endpoint, context) : undefined, - Experiment: output.Experiment != null ? de_Experiment(output.Experiment, context) : undefined, - FeatureGroup: output.FeatureGroup != null ? de_FeatureGroup(output.FeatureGroup, context) : undefined, - FeatureMetadata: output.FeatureMetadata != null ? de_FeatureMetadata(output.FeatureMetadata, context) : undefined, - HyperParameterTuningJob: - output.HyperParameterTuningJob != null - ? de_HyperParameterTuningJobSearchEntity(output.HyperParameterTuningJob, context) - : undefined, - Model: output.Model != null ? de_ModelDashboardModel(output.Model, context) : undefined, - ModelCard: output.ModelCard != null ? de_ModelCard(output.ModelCard, context) : undefined, - ModelPackage: output.ModelPackage != null ? de_ModelPackage(output.ModelPackage, context) : undefined, - ModelPackageGroup: - output.ModelPackageGroup != null ? de_ModelPackageGroup(output.ModelPackageGroup, context) : undefined, - Pipeline: output.Pipeline != null ? de_Pipeline(output.Pipeline, context) : undefined, - PipelineExecution: - output.PipelineExecution != null ? de_PipelineExecution(output.PipelineExecution, context) : undefined, - Project: output.Project != null ? de_Project(output.Project, context) : undefined, - TrainingJob: output.TrainingJob != null ? de_TrainingJob(output.TrainingJob, context) : undefined, - Trial: output.Trial != null ? de_Trial(output.Trial, context) : undefined, - TrialComponent: output.TrialComponent != null ? de_TrialComponent(output.TrialComponent, context) : undefined, - } as any; +const de_MonitoringSchedule = (output: any, context: __SerdeContext): MonitoringSchedule => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastMonitoringExecutionSummary: (_: any) => de_MonitoringExecutionSummary(_, context), + MonitoringScheduleArn: __expectString, + MonitoringScheduleConfig: (_: any) => de_MonitoringScheduleConfig(_, context), + MonitoringScheduleName: __expectString, + MonitoringScheduleStatus: __expectString, + MonitoringType: __expectString, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1SearchResponse + * deserializeAws_json1_1MonitoringScheduleConfig */ -const de_SearchResponse = (output: any, context: __SerdeContext): SearchResponse => { - return { - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_SearchResultsList(output.Results, context) : undefined, - } as any; +const de_MonitoringScheduleConfig = (output: any, context: __SerdeContext): MonitoringScheduleConfig => { + return take(output, { + MonitoringJobDefinition: (_: any) => de_MonitoringJobDefinition(_, context), + MonitoringJobDefinitionName: __expectString, + MonitoringType: __expectString, + ScheduleConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1SearchResultsList + * deserializeAws_json1_1MonitoringScheduleList */ -const de_SearchResultsList = (output: any, context: __SerdeContext): SearchRecord[] => { +const de_MonitoringScheduleList = (output: any, context: __SerdeContext): MonitoringSchedule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SearchRecord(entry, context); + return de_MonitoringSchedule(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SecondaryStatusTransition + * deserializeAws_json1_1MonitoringScheduleSummary */ -const de_SecondaryStatusTransition = (output: any, context: __SerdeContext): SecondaryStatusTransition => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; +const de_MonitoringScheduleSummary = (output: any, context: __SerdeContext): MonitoringScheduleSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndpointName: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringJobDefinitionName: __expectString, + MonitoringScheduleArn: __expectString, + MonitoringScheduleName: __expectString, + MonitoringScheduleStatus: __expectString, + MonitoringType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SecondaryStatusTransitions + * deserializeAws_json1_1MonitoringScheduleSummaryList */ -const de_SecondaryStatusTransitions = (output: any, context: __SerdeContext): SecondaryStatusTransition[] => { +const de_MonitoringScheduleSummaryList = (output: any, context: __SerdeContext): MonitoringScheduleSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecondaryStatusTransition(entry, context); + return de_MonitoringScheduleSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_MonitoringStatisticsResource omitted. + +// de_MonitoringStoppingCondition omitted. + +// de_MultiModelConfig omitted. + +// de_NeoVpcConfig omitted. + +// de_NeoVpcSecurityGroupIds omitted. + +// de_NeoVpcSubnets omitted. + +// de_NetworkConfig omitted. + +// de_NotebookInstanceAcceleratorTypes omitted. + +// de_NotebookInstanceLifecycleConfigList omitted. /** - * deserializeAws_json1_1SendPipelineExecutionStepFailureResponse + * deserializeAws_json1_1NotebookInstanceLifecycleConfigSummary */ -const de_SendPipelineExecutionStepFailureResponse = ( +const de_NotebookInstanceLifecycleConfigSummary = ( output: any, context: __SerdeContext -): SendPipelineExecutionStepFailureResponse => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - } as any; +): NotebookInstanceLifecycleConfigSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotebookInstanceLifecycleConfigArn: __expectString, + NotebookInstanceLifecycleConfigName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SendPipelineExecutionStepSuccessResponse + * deserializeAws_json1_1NotebookInstanceLifecycleConfigSummaryList */ -const de_SendPipelineExecutionStepSuccessResponse = ( +const de_NotebookInstanceLifecycleConfigSummaryList = ( output: any, context: __SerdeContext -): SendPipelineExecutionStepSuccessResponse => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - } as any; +): NotebookInstanceLifecycleConfigSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_NotebookInstanceLifecycleConfigSummary(entry, context); + }); + return retVal; }; +// de_NotebookInstanceLifecycleHook omitted. + /** - * deserializeAws_json1_1ServiceCatalogProvisionedProductDetails + * deserializeAws_json1_1NotebookInstanceSummary */ -const de_ServiceCatalogProvisionedProductDetails = ( - output: any, - context: __SerdeContext -): ServiceCatalogProvisionedProductDetails => { - return { - ProvisionedProductId: __expectString(output.ProvisionedProductId), - ProvisionedProductStatusMessage: __expectString(output.ProvisionedProductStatusMessage), - } as any; +const de_NotebookInstanceSummary = (output: any, context: __SerdeContext): NotebookInstanceSummary => { + return take(output, { + AdditionalCodeRepositories: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultCodeRepository: __expectString, + InstanceType: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotebookInstanceArn: __expectString, + NotebookInstanceLifecycleConfigName: __expectString, + NotebookInstanceName: __expectString, + NotebookInstanceStatus: __expectString, + Url: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ServiceCatalogProvisioningDetails + * deserializeAws_json1_1NotebookInstanceSummaryList */ -const de_ServiceCatalogProvisioningDetails = ( - output: any, - context: __SerdeContext -): ServiceCatalogProvisioningDetails => { - return { - PathId: __expectString(output.PathId), - ProductId: __expectString(output.ProductId), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - ProvisioningParameters: - output.ProvisioningParameters != null - ? de_ProvisioningParameters(output.ProvisioningParameters, context) - : undefined, - } as any; +const de_NotebookInstanceSummaryList = (output: any, context: __SerdeContext): NotebookInstanceSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_NotebookInstanceSummary(entry, context); + }); + return retVal; }; +// de_NotificationConfiguration omitted. + +// de_ObjectiveStatusCounters omitted. + +// de_OfflineStoreConfig omitted. + +// de_OfflineStoreStatus omitted. + +// de_OidcConfigForResponse omitted. + +// de_OidcMemberDefinition omitted. + +// de_OnlineStoreConfig omitted. + +// de_OnlineStoreSecurityConfig omitted. + +// de_OutputConfig omitted. + +// de_OutputDataConfig omitted. + +// de_OutputParameter omitted. + +// de_OutputParameterList omitted. + +// de_ParallelismConfiguration omitted. + +// de_Parameter omitted. + +// de_ParameterList omitted. + +// de_ParameterRange omitted. + +// de_ParameterRanges omitted. + +// de_ParameterValues omitted. + +// de_Parent omitted. + +// de_ParentHyperParameterTuningJob omitted. + +// de_ParentHyperParameterTuningJobs omitted. + +// de_Parents omitted. + /** - * deserializeAws_json1_1ShadowModeConfig + * deserializeAws_json1_1PendingDeploymentSummary */ -const de_ShadowModeConfig = (output: any, context: __SerdeContext): ShadowModeConfig => { - return { - ShadowModelVariants: - output.ShadowModelVariants != null - ? de_ShadowModelVariantConfigList(output.ShadowModelVariants, context) - : undefined, - SourceModelVariantName: __expectString(output.SourceModelVariantName), - } as any; +const de_PendingDeploymentSummary = (output: any, context: __SerdeContext): PendingDeploymentSummary => { + return take(output, { + EndpointConfigName: __expectString, + ProductionVariants: (_: any) => de_PendingProductionVariantSummaryList(_, context), + ShadowProductionVariants: (_: any) => de_PendingProductionVariantSummaryList(_, context), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1ShadowModelVariantConfig + * deserializeAws_json1_1PendingProductionVariantSummary */ -const de_ShadowModelVariantConfig = (output: any, context: __SerdeContext): ShadowModelVariantConfig => { - return { - SamplingPercentage: __expectInt32(output.SamplingPercentage), - ShadowModelVariantName: __expectString(output.ShadowModelVariantName), - } as any; +const de_PendingProductionVariantSummary = (output: any, context: __SerdeContext): PendingProductionVariantSummary => { + return take(output, { + AcceleratorType: __expectString, + CurrentInstanceCount: __expectInt32, + CurrentServerlessConfig: _json, + CurrentWeight: __limitedParseFloat32, + DeployedImages: (_: any) => de_DeployedImages(_, context), + DesiredInstanceCount: __expectInt32, + DesiredServerlessConfig: _json, + DesiredWeight: __limitedParseFloat32, + InstanceType: __expectString, + VariantName: __expectString, + VariantStatus: (_: any) => de_ProductionVariantStatusList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ShadowModelVariantConfigList + * deserializeAws_json1_1PendingProductionVariantSummaryList */ -const de_ShadowModelVariantConfigList = (output: any, context: __SerdeContext): ShadowModelVariantConfig[] => { +const de_PendingProductionVariantSummaryList = ( + output: any, + context: __SerdeContext +): PendingProductionVariantSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ShadowModelVariantConfig(entry, context); + return de_PendingProductionVariantSummary(entry, context); }); return retVal; }; +// de_Phase omitted. + +// de_Phases omitted. + /** - * deserializeAws_json1_1SharingSettings + * deserializeAws_json1_1Pipeline */ -const de_SharingSettings = (output: any, context: __SerdeContext): SharingSettings => { - return { - NotebookOutputOption: __expectString(output.NotebookOutputOption), - S3KmsKeyId: __expectString(output.S3KmsKeyId), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; +const de_Pipeline = (output: any, context: __SerdeContext): Pipeline => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRunTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParallelismConfiguration: _json, + PipelineArn: __expectString, + PipelineDescription: __expectString, + PipelineDisplayName: __expectString, + PipelineName: __expectString, + PipelineStatus: __expectString, + RoleArn: __expectString, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1ShuffleConfig + * deserializeAws_json1_1PipelineExecution */ -const de_ShuffleConfig = (output: any, context: __SerdeContext): ShuffleConfig => { - return { - Seed: __expectLong(output.Seed), - } as any; +const de_PipelineExecution = (output: any, context: __SerdeContext): PipelineExecution => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParallelismConfiguration: _json, + PipelineArn: __expectString, + PipelineExecutionArn: __expectString, + PipelineExecutionDescription: __expectString, + PipelineExecutionDisplayName: __expectString, + PipelineExecutionStatus: __expectString, + PipelineExperimentConfig: _json, + PipelineParameters: _json, + }) as any; }; /** - * deserializeAws_json1_1SourceAlgorithm + * deserializeAws_json1_1PipelineExecutionStep */ -const de_SourceAlgorithm = (output: any, context: __SerdeContext): SourceAlgorithm => { - return { - AlgorithmName: __expectString(output.AlgorithmName), - ModelDataUrl: __expectString(output.ModelDataUrl), - } as any; +const de_PipelineExecutionStep = (output: any, context: __SerdeContext): PipelineExecutionStep => { + return take(output, { + AttemptCount: __expectInt32, + CacheHitResult: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + Metadata: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StepDescription: __expectString, + StepDisplayName: __expectString, + StepName: __expectString, + StepStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SourceAlgorithmList + * deserializeAws_json1_1PipelineExecutionStepList */ -const de_SourceAlgorithmList = (output: any, context: __SerdeContext): SourceAlgorithm[] => { +const de_PipelineExecutionStepList = (output: any, context: __SerdeContext): PipelineExecutionStep[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceAlgorithm(entry, context); + return de_PipelineExecutionStep(entry, context); }); return retVal; }; +// de_PipelineExecutionStepMetadata omitted. + /** - * deserializeAws_json1_1SourceAlgorithmSpecification + * deserializeAws_json1_1PipelineExecutionSummary */ -const de_SourceAlgorithmSpecification = (output: any, context: __SerdeContext): SourceAlgorithmSpecification => { - return { - SourceAlgorithms: - output.SourceAlgorithms != null ? de_SourceAlgorithmList(output.SourceAlgorithms, context) : undefined, - } as any; +const de_PipelineExecutionSummary = (output: any, context: __SerdeContext): PipelineExecutionSummary => { + return take(output, { + PipelineExecutionArn: __expectString, + PipelineExecutionDescription: __expectString, + PipelineExecutionDisplayName: __expectString, + PipelineExecutionFailureReason: __expectString, + PipelineExecutionStatus: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1SourceIpConfig + * deserializeAws_json1_1PipelineExecutionSummaryList */ -const de_SourceIpConfig = (output: any, context: __SerdeContext): SourceIpConfig => { - return { - Cidrs: output.Cidrs != null ? de_Cidrs(output.Cidrs, context) : undefined, - } as any; +const de_PipelineExecutionSummaryList = (output: any, context: __SerdeContext): PipelineExecutionSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_PipelineExecutionSummary(entry, context); + }); + return retVal; }; +// de_PipelineExperimentConfig omitted. + /** - * deserializeAws_json1_1SpaceDetails + * deserializeAws_json1_1PipelineSummary */ -const de_SpaceDetails = (output: any, context: __SerdeContext): SpaceDetails => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainId: __expectString(output.DomainId), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - SpaceName: __expectString(output.SpaceName), - Status: __expectString(output.Status), - } as any; +const de_PipelineSummary = (output: any, context: __SerdeContext): PipelineSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastExecutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PipelineArn: __expectString, + PipelineDescription: __expectString, + PipelineDisplayName: __expectString, + PipelineName: __expectString, + RoleArn: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SpaceList + * deserializeAws_json1_1PipelineSummaryList */ -const de_SpaceList = (output: any, context: __SerdeContext): SpaceDetails[] => { +const de_PipelineSummaryList = (output: any, context: __SerdeContext): PipelineSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SpaceDetails(entry, context); + return de_PipelineSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SpaceSettings - */ -const de_SpaceSettings = (output: any, context: __SerdeContext): SpaceSettings => { - return { - JupyterServerAppSettings: - output.JupyterServerAppSettings != null - ? de_JupyterServerAppSettings(output.JupyterServerAppSettings, context) - : undefined, - KernelGatewayAppSettings: - output.KernelGatewayAppSettings != null - ? de_KernelGatewayAppSettings(output.KernelGatewayAppSettings, context) - : undefined, - } as any; -}; +// de_ProcessingClusterConfig omitted. -/** - * deserializeAws_json1_1StartInferenceExperimentResponse - */ -const de_StartInferenceExperimentResponse = ( - output: any, - context: __SerdeContext -): StartInferenceExperimentResponse => { - return { - InferenceExperimentArn: __expectString(output.InferenceExperimentArn), - } as any; -}; +// de_ProcessingEnvironmentMap omitted. -/** - * deserializeAws_json1_1StartPipelineExecutionResponse - */ -const de_StartPipelineExecutionResponse = (output: any, context: __SerdeContext): StartPipelineExecutionResponse => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - } as any; -}; +// de_ProcessingFeatureStoreOutput omitted. + +// de_ProcessingInput omitted. + +// de_ProcessingInputs omitted. /** - * deserializeAws_json1_1StopInferenceExperimentResponse + * deserializeAws_json1_1ProcessingJob */ -const de_StopInferenceExperimentResponse = (output: any, context: __SerdeContext): StopInferenceExperimentResponse => { - return { - InferenceExperimentArn: __expectString(output.InferenceExperimentArn), - } as any; -}; +const de_ProcessingJob = (output: any, context: __SerdeContext): ProcessingJob => { + return take(output, { + AppSpecification: _json, + AutoMLJobArn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Environment: _json, + ExitMessage: __expectString, + ExperimentConfig: _json, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MonitoringScheduleArn: __expectString, + NetworkConfig: _json, + ProcessingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProcessingInputs: _json, + ProcessingJobArn: __expectString, + ProcessingJobName: __expectString, + ProcessingJobStatus: __expectString, + ProcessingOutputConfig: _json, + ProcessingResources: _json, + ProcessingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RoleArn: __expectString, + StoppingCondition: _json, + Tags: _json, + TrainingJobArn: __expectString, + }) as any; +}; + +// de_ProcessingJobStepMetadata omitted. /** - * deserializeAws_json1_1StoppingCondition + * deserializeAws_json1_1ProcessingJobSummaries */ -const de_StoppingCondition = (output: any, context: __SerdeContext): StoppingCondition => { - return { - MaxRuntimeInSeconds: __expectInt32(output.MaxRuntimeInSeconds), - MaxWaitTimeInSeconds: __expectInt32(output.MaxWaitTimeInSeconds), - } as any; +const de_ProcessingJobSummaries = (output: any, context: __SerdeContext): ProcessingJobSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ProcessingJobSummary(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1StopPipelineExecutionResponse + * deserializeAws_json1_1ProcessingJobSummary */ -const de_StopPipelineExecutionResponse = (output: any, context: __SerdeContext): StopPipelineExecutionResponse => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - } as any; +const de_ProcessingJobSummary = (output: any, context: __SerdeContext): ProcessingJobSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExitMessage: __expectString, + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProcessingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProcessingJobArn: __expectString, + ProcessingJobName: __expectString, + ProcessingJobStatus: __expectString, + }) as any; }; +// de_ProcessingOutput omitted. + +// de_ProcessingOutputConfig omitted. + +// de_ProcessingOutputs omitted. + +// de_ProcessingResources omitted. + +// de_ProcessingS3Input omitted. + +// de_ProcessingS3Output omitted. + +// de_ProcessingStoppingCondition omitted. + /** - * deserializeAws_json1_1StudioLifecycleConfigDetails + * deserializeAws_json1_1ProductionVariant */ -const de_StudioLifecycleConfigDetails = (output: any, context: __SerdeContext): StudioLifecycleConfigDetails => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - StudioLifecycleConfigAppType: __expectString(output.StudioLifecycleConfigAppType), - StudioLifecycleConfigArn: __expectString(output.StudioLifecycleConfigArn), - StudioLifecycleConfigName: __expectString(output.StudioLifecycleConfigName), - } as any; +const de_ProductionVariant = (output: any, context: __SerdeContext): ProductionVariant => { + return take(output, { + AcceleratorType: __expectString, + ContainerStartupHealthCheckTimeoutInSeconds: __expectInt32, + CoreDumpConfig: _json, + EnableSSMAccess: __expectBoolean, + InitialInstanceCount: __expectInt32, + InitialVariantWeight: __limitedParseFloat32, + InstanceType: __expectString, + ModelDataDownloadTimeoutInSeconds: __expectInt32, + ModelName: __expectString, + ServerlessConfig: _json, + VariantName: __expectString, + VolumeSizeInGB: __expectInt32, + }) as any; }; +// de_ProductionVariantCoreDumpConfig omitted. + /** - * deserializeAws_json1_1StudioLifecycleConfigsList + * deserializeAws_json1_1ProductionVariantList */ -const de_StudioLifecycleConfigsList = (output: any, context: __SerdeContext): StudioLifecycleConfigDetails[] => { +const de_ProductionVariantList = (output: any, context: __SerdeContext): ProductionVariant[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StudioLifecycleConfigDetails(entry, context); + return de_ProductionVariant(entry, context); }); return retVal; }; +// de_ProductionVariantServerlessConfig omitted. + +/** + * deserializeAws_json1_1ProductionVariantStatus + */ +const de_ProductionVariantStatus = (output: any, context: __SerdeContext): ProductionVariantStatus => { + return take(output, { + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + }) as any; +}; + /** - * deserializeAws_json1_1Subnets + * deserializeAws_json1_1ProductionVariantStatusList */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { +const de_ProductionVariantStatusList = (output: any, context: __SerdeContext): ProductionVariantStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ProductionVariantStatus(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SubscribedWorkteam + * deserializeAws_json1_1ProductionVariantSummary */ -const de_SubscribedWorkteam = (output: any, context: __SerdeContext): SubscribedWorkteam => { - return { - ListingId: __expectString(output.ListingId), - MarketplaceDescription: __expectString(output.MarketplaceDescription), - MarketplaceTitle: __expectString(output.MarketplaceTitle), - SellerName: __expectString(output.SellerName), - WorkteamArn: __expectString(output.WorkteamArn), - } as any; +const de_ProductionVariantSummary = (output: any, context: __SerdeContext): ProductionVariantSummary => { + return take(output, { + CurrentInstanceCount: __expectInt32, + CurrentServerlessConfig: _json, + CurrentWeight: __limitedParseFloat32, + DeployedImages: (_: any) => de_DeployedImages(_, context), + DesiredInstanceCount: __expectInt32, + DesiredServerlessConfig: _json, + DesiredWeight: __limitedParseFloat32, + VariantName: __expectString, + VariantStatus: (_: any) => de_ProductionVariantStatusList(_, context), + }) as any; }; /** - * deserializeAws_json1_1SubscribedWorkteams + * deserializeAws_json1_1ProductionVariantSummaryList */ -const de_SubscribedWorkteams = (output: any, context: __SerdeContext): SubscribedWorkteam[] => { +const de_ProductionVariantSummaryList = (output: any, context: __SerdeContext): ProductionVariantSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubscribedWorkteam(entry, context); + return de_ProductionVariantSummary(entry, context); }); return retVal; }; +// de_ProductListings omitted. + +// de_ProfilerConfig omitted. + +// de_ProfilerRuleConfiguration omitted. + +// de_ProfilerRuleConfigurations omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1ProfilerRuleEvaluationStatus */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_ProfilerRuleEvaluationStatus = (output: any, context: __SerdeContext): ProfilerRuleEvaluationStatus => { + return take(output, { + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuleConfigurationName: __expectString, + RuleEvaluationJobArn: __expectString, + RuleEvaluationStatus: __expectString, + StatusDetails: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1ProfilerRuleEvaluationStatuses */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_ProfilerRuleEvaluationStatuses = (output: any, context: __SerdeContext): ProfilerRuleEvaluationStatus[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_ProfilerRuleEvaluationStatus(entry, context); }); return retVal; }; +// de_ProfilingParameters omitted. + /** - * deserializeAws_json1_1TargetPlatform + * deserializeAws_json1_1Project */ -const de_TargetPlatform = (output: any, context: __SerdeContext): TargetPlatform => { - return { - Accelerator: __expectString(output.Accelerator), - Arch: __expectString(output.Arch), - Os: __expectString(output.Os), - } as any; +const de_Project = (output: any, context: __SerdeContext): Project => { + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectArn: __expectString, + ProjectDescription: __expectString, + ProjectId: __expectString, + ProjectName: __expectString, + ProjectStatus: __expectString, + ServiceCatalogProvisionedProductDetails: _json, + ServiceCatalogProvisioningDetails: _json, + Tags: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1ProjectSummary + */ +const de_ProjectSummary = (output: any, context: __SerdeContext): ProjectSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectArn: __expectString, + ProjectDescription: __expectString, + ProjectId: __expectString, + ProjectName: __expectString, + ProjectStatus: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TaskKeywords + * deserializeAws_json1_1ProjectSummaryList */ -const de_TaskKeywords = (output: any, context: __SerdeContext): string[] => { +const de_ProjectSummaryList = (output: any, context: __SerdeContext): ProjectSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ProjectSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TensorBoardAppSettings - */ -const de_TensorBoardAppSettings = (output: any, context: __SerdeContext): TensorBoardAppSettings => { - return { - DefaultResourceSpec: - output.DefaultResourceSpec != null ? de_ResourceSpec(output.DefaultResourceSpec, context) : undefined, - } as any; -}; +// de_PropertyNameSuggestion omitted. -/** - * deserializeAws_json1_1TensorBoardOutputConfig - */ -const de_TensorBoardOutputConfig = (output: any, context: __SerdeContext): TensorBoardOutputConfig => { - return { - LocalPath: __expectString(output.LocalPath), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; -}; +// de_PropertyNameSuggestionList omitted. + +// de_ProvisioningParameter omitted. + +// de_ProvisioningParameters omitted. + +// de_PublicWorkforceTaskPrice omitted. + +// de_PutModelPackageGroupPolicyOutput omitted. + +// de_QualityCheckStepMetadata omitted. + +// de_QueryLineageResponse omitted. + +// de_RealTimeInferenceConfig omitted. + +// de_RealtimeInferenceInstanceTypes omitted. + +// de_RecommendationJobContainerConfig omitted. /** - * deserializeAws_json1_1TextClassificationJobConfig + * deserializeAws_json1_1RecommendationJobInferenceBenchmark */ -const de_TextClassificationJobConfig = (output: any, context: __SerdeContext): TextClassificationJobConfig => { - return { - CompletionCriteria: - output.CompletionCriteria != null - ? de_AutoMLJobCompletionCriteria(output.CompletionCriteria, context) - : undefined, - ContentColumn: __expectString(output.ContentColumn), - TargetLabelColumn: __expectString(output.TargetLabelColumn), - } as any; +const de_RecommendationJobInferenceBenchmark = ( + output: any, + context: __SerdeContext +): RecommendationJobInferenceBenchmark => { + return take(output, { + EndpointConfiguration: _json, + EndpointMetrics: _json, + FailureReason: __expectString, + Metrics: (_: any) => de_RecommendationMetrics(_, context), + ModelConfiguration: _json, + }) as any; }; +// de_RecommendationJobInputConfig omitted. + +// de_RecommendationJobPayloadConfig omitted. + +// de_RecommendationJobResourceLimit omitted. + +// de_RecommendationJobStoppingConditions omitted. + +// de_RecommendationJobSupportedContentTypes omitted. + +// de_RecommendationJobSupportedInstanceTypes omitted. + +// de_RecommendationJobVpcConfig omitted. + +// de_RecommendationJobVpcSecurityGroupIds omitted. + +// de_RecommendationJobVpcSubnets omitted. + /** - * deserializeAws_json1_1TimeSeriesForecastingSettings + * deserializeAws_json1_1RecommendationMetrics */ -const de_TimeSeriesForecastingSettings = (output: any, context: __SerdeContext): TimeSeriesForecastingSettings => { - return { - AmazonForecastRoleArn: __expectString(output.AmazonForecastRoleArn), - Status: __expectString(output.Status), - } as any; +const de_RecommendationMetrics = (output: any, context: __SerdeContext): RecommendationMetrics => { + return take(output, { + CostPerHour: __limitedParseFloat32, + CostPerInference: __limitedParseFloat32, + CpuUtilization: __limitedParseFloat32, + MaxInvocations: __expectInt32, + MemoryUtilization: __limitedParseFloat32, + ModelLatency: __expectInt32, + }) as any; }; +// de_RedshiftDatasetDefinition omitted. + +// de_RegisterModelStepMetadata omitted. + +// de_RenderingError omitted. + +// de_RenderingErrorList omitted. + +// de_RenderUiTemplateResponse omitted. + +// de_RepositoryAuthConfig omitted. + +// de_ResolvedAttributes omitted. + +// de_ResourceConfig omitted. + +// de_ResourceInUse omitted. + +// de_ResourceLimitExceeded omitted. + +// de_ResourceLimits omitted. + +// de_ResourceNotFound omitted. + +// de_ResourceSpec omitted. + +// de_ResponseMIMETypes omitted. + +// de_RetryPipelineExecutionResponse omitted. + +// de_RetryStrategy omitted. + +// de_RSessionAppSettings omitted. + +// de_RStudioServerProAppSettings omitted. + +// de_RStudioServerProDomainSettings omitted. + +// de_RuleParameters omitted. + +// de_S3DataSource omitted. + +// de_S3StorageConfig omitted. + +// de_SageMakerImageVersionAliases omitted. + +// de_ScheduleConfig omitted. + /** - * deserializeAws_json1_1TrafficPattern + * deserializeAws_json1_1SearchRecord */ -const de_TrafficPattern = (output: any, context: __SerdeContext): TrafficPattern => { - return { - Phases: output.Phases != null ? de_Phases(output.Phases, context) : undefined, - TrafficType: __expectString(output.TrafficType), - } as any; +const de_SearchRecord = (output: any, context: __SerdeContext): SearchRecord => { + return take(output, { + Endpoint: (_: any) => de_Endpoint(_, context), + Experiment: (_: any) => de_Experiment(_, context), + FeatureGroup: (_: any) => de_FeatureGroup(_, context), + FeatureMetadata: (_: any) => de_FeatureMetadata(_, context), + HyperParameterTuningJob: (_: any) => de_HyperParameterTuningJobSearchEntity(_, context), + Model: (_: any) => de_ModelDashboardModel(_, context), + ModelCard: (_: any) => de_ModelCard(_, context), + ModelPackage: (_: any) => de_ModelPackage(_, context), + ModelPackageGroup: (_: any) => de_ModelPackageGroup(_, context), + Pipeline: (_: any) => de_Pipeline(_, context), + PipelineExecution: (_: any) => de_PipelineExecution(_, context), + Project: (_: any) => de_Project(_, context), + TrainingJob: (_: any) => de_TrainingJob(_, context), + Trial: (_: any) => de_Trial(_, context), + TrialComponent: (_: any) => de_TrialComponent(_, context), + }) as any; }; /** - * deserializeAws_json1_1TrafficRoutingConfig + * deserializeAws_json1_1SearchResponse */ -const de_TrafficRoutingConfig = (output: any, context: __SerdeContext): TrafficRoutingConfig => { - return { - CanarySize: output.CanarySize != null ? de_CapacitySize(output.CanarySize, context) : undefined, - LinearStepSize: output.LinearStepSize != null ? de_CapacitySize(output.LinearStepSize, context) : undefined, - Type: __expectString(output.Type), - WaitIntervalInSeconds: __expectInt32(output.WaitIntervalInSeconds), - } as any; +const de_SearchResponse = (output: any, context: __SerdeContext): SearchResponse => { + return take(output, { + NextToken: __expectString, + Results: (_: any) => de_SearchResultsList(_, context), + }) as any; }; /** - * deserializeAws_json1_1TrainingContainerArguments + * deserializeAws_json1_1SearchResultsList */ -const de_TrainingContainerArguments = (output: any, context: __SerdeContext): string[] => { +const de_SearchResultsList = (output: any, context: __SerdeContext): SearchRecord[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_SearchRecord(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1TrainingContainerEntrypoint + * deserializeAws_json1_1SecondaryStatusTransition + */ +const de_SecondaryStatusTransition = (output: any, context: __SerdeContext): SecondaryStatusTransition => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1SecondaryStatusTransitions */ -const de_TrainingContainerEntrypoint = (output: any, context: __SerdeContext): string[] => { +const de_SecondaryStatusTransitions = (output: any, context: __SerdeContext): SecondaryStatusTransition[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_SecondaryStatusTransition(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TrainingEnvironmentMap - */ -const de_TrainingEnvironmentMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SecurityGroupIds omitted. + +// de_SendPipelineExecutionStepFailureResponse omitted. + +// de_SendPipelineExecutionStepSuccessResponse omitted. + +// de_ServiceCatalogProvisionedProductDetails omitted. + +// de_ServiceCatalogProvisioningDetails omitted. + +// de_ShadowModeConfig omitted. + +// de_ShadowModelVariantConfig omitted. + +// de_ShadowModelVariantConfigList omitted. + +// de_SharingSettings omitted. + +// de_ShuffleConfig omitted. + +// de_SourceAlgorithm omitted. + +// de_SourceAlgorithmList omitted. + +// de_SourceAlgorithmSpecification omitted. + +// de_SourceIpConfig omitted. /** - * deserializeAws_json1_1TrainingImageConfig + * deserializeAws_json1_1SpaceDetails */ -const de_TrainingImageConfig = (output: any, context: __SerdeContext): TrainingImageConfig => { - return { - TrainingRepositoryAccessMode: __expectString(output.TrainingRepositoryAccessMode), - TrainingRepositoryAuthConfig: - output.TrainingRepositoryAuthConfig != null - ? de_TrainingRepositoryAuthConfig(output.TrainingRepositoryAuthConfig, context) - : undefined, - } as any; +const de_SpaceDetails = (output: any, context: __SerdeContext): SpaceDetails => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SpaceName: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TrainingInstanceTypes + * deserializeAws_json1_1SpaceList */ -const de_TrainingInstanceTypes = (output: any, context: __SerdeContext): (TrainingInstanceType | string)[] => { +const de_SpaceList = (output: any, context: __SerdeContext): SpaceDetails[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_SpaceDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TrainingJob - */ -const de_TrainingJob = (output: any, context: __SerdeContext): TrainingJob => { - return { - AlgorithmSpecification: - output.AlgorithmSpecification != null - ? de_AlgorithmSpecification(output.AlgorithmSpecification, context) - : undefined, - AutoMLJobArn: __expectString(output.AutoMLJobArn), - BillableTimeInSeconds: __expectInt32(output.BillableTimeInSeconds), - CheckpointConfig: - output.CheckpointConfig != null ? de_CheckpointConfig(output.CheckpointConfig, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DebugHookConfig: output.DebugHookConfig != null ? de_DebugHookConfig(output.DebugHookConfig, context) : undefined, - DebugRuleConfigurations: - output.DebugRuleConfigurations != null - ? de_DebugRuleConfigurations(output.DebugRuleConfigurations, context) - : undefined, - DebugRuleEvaluationStatuses: - output.DebugRuleEvaluationStatuses != null - ? de_DebugRuleEvaluationStatuses(output.DebugRuleEvaluationStatuses, context) - : undefined, - EnableInterContainerTrafficEncryption: __expectBoolean(output.EnableInterContainerTrafficEncryption), - EnableManagedSpotTraining: __expectBoolean(output.EnableManagedSpotTraining), - EnableNetworkIsolation: __expectBoolean(output.EnableNetworkIsolation), - Environment: output.Environment != null ? de_TrainingEnvironmentMap(output.Environment, context) : undefined, - ExperimentConfig: - output.ExperimentConfig != null ? de_ExperimentConfig(output.ExperimentConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - FinalMetricDataList: - output.FinalMetricDataList != null ? de_FinalMetricDataList(output.FinalMetricDataList, context) : undefined, - HyperParameters: output.HyperParameters != null ? de_HyperParameters(output.HyperParameters, context) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - LabelingJobArn: __expectString(output.LabelingJobArn), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelArtifacts: output.ModelArtifacts != null ? de_ModelArtifacts(output.ModelArtifacts, context) : undefined, - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - ResourceConfig: output.ResourceConfig != null ? de_ResourceConfig(output.ResourceConfig, context) : undefined, - RetryStrategy: output.RetryStrategy != null ? de_RetryStrategy(output.RetryStrategy, context) : undefined, - RoleArn: __expectString(output.RoleArn), - SecondaryStatus: __expectString(output.SecondaryStatus), - SecondaryStatusTransitions: - output.SecondaryStatusTransitions != null - ? de_SecondaryStatusTransitions(output.SecondaryStatusTransitions, context) - : undefined, - StoppingCondition: - output.StoppingCondition != null ? de_StoppingCondition(output.StoppingCondition, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TensorBoardOutputConfig: - output.TensorBoardOutputConfig != null - ? de_TensorBoardOutputConfig(output.TensorBoardOutputConfig, context) - : undefined, - TrainingEndTime: - output.TrainingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime))) - : undefined, - TrainingJobArn: __expectString(output.TrainingJobArn), - TrainingJobName: __expectString(output.TrainingJobName), - TrainingJobStatus: __expectString(output.TrainingJobStatus), - TrainingStartTime: - output.TrainingStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingStartTime))) - : undefined, - TrainingTimeInSeconds: __expectInt32(output.TrainingTimeInSeconds), - TuningJobArn: __expectString(output.TuningJobArn), - VpcConfig: output.VpcConfig != null ? de_VpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TrainingJobDefinition - */ -const de_TrainingJobDefinition = (output: any, context: __SerdeContext): TrainingJobDefinition => { - return { - HyperParameters: output.HyperParameters != null ? de_HyperParameters(output.HyperParameters, context) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - ResourceConfig: output.ResourceConfig != null ? de_ResourceConfig(output.ResourceConfig, context) : undefined, - StoppingCondition: - output.StoppingCondition != null ? de_StoppingCondition(output.StoppingCondition, context) : undefined, - TrainingInputMode: __expectString(output.TrainingInputMode), - } as any; -}; +// de_SpaceSettings omitted. -/** - * deserializeAws_json1_1TrainingJobStatusCounters - */ -const de_TrainingJobStatusCounters = (output: any, context: __SerdeContext): TrainingJobStatusCounters => { - return { - Completed: __expectInt32(output.Completed), - InProgress: __expectInt32(output.InProgress), - NonRetryableError: __expectInt32(output.NonRetryableError), - RetryableError: __expectInt32(output.RetryableError), - Stopped: __expectInt32(output.Stopped), - } as any; -}; +// de_StartInferenceExperimentResponse omitted. + +// de_StartPipelineExecutionResponse omitted. + +// de_StopInferenceExperimentResponse omitted. + +// de_StoppingCondition omitted. + +// de_StopPipelineExecutionResponse omitted. /** - * deserializeAws_json1_1TrainingJobStepMetadata + * deserializeAws_json1_1StudioLifecycleConfigDetails */ -const de_TrainingJobStepMetadata = (output: any, context: __SerdeContext): TrainingJobStepMetadata => { - return { - Arn: __expectString(output.Arn), - } as any; +const de_StudioLifecycleConfigDetails = (output: any, context: __SerdeContext): StudioLifecycleConfigDetails => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StudioLifecycleConfigAppType: __expectString, + StudioLifecycleConfigArn: __expectString, + StudioLifecycleConfigName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TrainingJobSummaries + * deserializeAws_json1_1StudioLifecycleConfigsList */ -const de_TrainingJobSummaries = (output: any, context: __SerdeContext): TrainingJobSummary[] => { +const de_StudioLifecycleConfigsList = (output: any, context: __SerdeContext): StudioLifecycleConfigDetails[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrainingJobSummary(entry, context); + return de_StudioLifecycleConfigDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TrainingJobSummary - */ -const de_TrainingJobSummary = (output: any, context: __SerdeContext): TrainingJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - TrainingEndTime: - output.TrainingEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TrainingEndTime))) - : undefined, - TrainingJobArn: __expectString(output.TrainingJobArn), - TrainingJobName: __expectString(output.TrainingJobName), - TrainingJobStatus: __expectString(output.TrainingJobStatus), - WarmPoolStatus: output.WarmPoolStatus != null ? de_WarmPoolStatus(output.WarmPoolStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TrainingRepositoryAuthConfig - */ -const de_TrainingRepositoryAuthConfig = (output: any, context: __SerdeContext): TrainingRepositoryAuthConfig => { - return { - TrainingRepositoryCredentialsProviderArn: __expectString(output.TrainingRepositoryCredentialsProviderArn), - } as any; -}; +// de_Subnets omitted. -/** - * deserializeAws_json1_1TrainingSpecification - */ -const de_TrainingSpecification = (output: any, context: __SerdeContext): TrainingSpecification => { - return { - MetricDefinitions: - output.MetricDefinitions != null ? de_MetricDefinitionList(output.MetricDefinitions, context) : undefined, - SupportedHyperParameters: - output.SupportedHyperParameters != null - ? de_HyperParameterSpecifications(output.SupportedHyperParameters, context) - : undefined, - SupportedTrainingInstanceTypes: - output.SupportedTrainingInstanceTypes != null - ? de_TrainingInstanceTypes(output.SupportedTrainingInstanceTypes, context) - : undefined, - SupportedTuningJobObjectiveMetrics: - output.SupportedTuningJobObjectiveMetrics != null - ? de_HyperParameterTuningJobObjectives(output.SupportedTuningJobObjectiveMetrics, context) - : undefined, - SupportsDistributedTraining: __expectBoolean(output.SupportsDistributedTraining), - TrainingChannels: - output.TrainingChannels != null ? de_ChannelSpecifications(output.TrainingChannels, context) : undefined, - TrainingImage: __expectString(output.TrainingImage), - TrainingImageDigest: __expectString(output.TrainingImageDigest), - } as any; -}; - -/** - * deserializeAws_json1_1TransformDataSource - */ -const de_TransformDataSource = (output: any, context: __SerdeContext): TransformDataSource => { - return { - S3DataSource: output.S3DataSource != null ? de_TransformS3DataSource(output.S3DataSource, context) : undefined, - } as any; -}; +// de_SubscribedWorkteam omitted. -/** - * deserializeAws_json1_1TransformEnvironmentMap - */ -const de_TransformEnvironmentMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SubscribedWorkteams omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TargetPlatform omitted. + +// de_TaskKeywords omitted. + +// de_TensorBoardAppSettings omitted. + +// de_TensorBoardOutputConfig omitted. + +// de_TextClassificationJobConfig omitted. + +// de_TimeSeriesForecastingSettings omitted. + +// de_TrafficPattern omitted. + +// de_TrafficRoutingConfig omitted. + +// de_TrainingContainerArguments omitted. + +// de_TrainingContainerEntrypoint omitted. + +// de_TrainingEnvironmentMap omitted. + +// de_TrainingImageConfig omitted. + +// de_TrainingInstanceTypes omitted. /** - * deserializeAws_json1_1TransformInput + * deserializeAws_json1_1TrainingJob */ -const de_TransformInput = (output: any, context: __SerdeContext): TransformInput => { - return { - CompressionType: __expectString(output.CompressionType), - ContentType: __expectString(output.ContentType), - DataSource: output.DataSource != null ? de_TransformDataSource(output.DataSource, context) : undefined, - SplitType: __expectString(output.SplitType), - } as any; -}; +const de_TrainingJob = (output: any, context: __SerdeContext): TrainingJob => { + return take(output, { + AlgorithmSpecification: _json, + AutoMLJobArn: __expectString, + BillableTimeInSeconds: __expectInt32, + CheckpointConfig: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DebugHookConfig: _json, + DebugRuleConfigurations: _json, + DebugRuleEvaluationStatuses: (_: any) => de_DebugRuleEvaluationStatuses(_, context), + EnableInterContainerTrafficEncryption: __expectBoolean, + EnableManagedSpotTraining: __expectBoolean, + EnableNetworkIsolation: __expectBoolean, + Environment: _json, + ExperimentConfig: _json, + FailureReason: __expectString, + FinalMetricDataList: (_: any) => de_FinalMetricDataList(_, context), + HyperParameters: _json, + InputDataConfig: _json, + LabelingJobArn: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelArtifacts: _json, + OutputDataConfig: _json, + ResourceConfig: _json, + RetryStrategy: _json, + RoleArn: __expectString, + SecondaryStatus: __expectString, + SecondaryStatusTransitions: (_: any) => de_SecondaryStatusTransitions(_, context), + StoppingCondition: _json, + Tags: _json, + TensorBoardOutputConfig: _json, + TrainingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingJobArn: __expectString, + TrainingJobName: __expectString, + TrainingJobStatus: __expectString, + TrainingStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingTimeInSeconds: __expectInt32, + TuningJobArn: __expectString, + VpcConfig: _json, + }) as any; +}; + +// de_TrainingJobDefinition omitted. + +// de_TrainingJobStatusCounters omitted. + +// de_TrainingJobStepMetadata omitted. /** - * deserializeAws_json1_1TransformInstanceTypes + * deserializeAws_json1_1TrainingJobSummaries */ -const de_TransformInstanceTypes = (output: any, context: __SerdeContext): (TransformInstanceType | string)[] => { +const de_TrainingJobSummaries = (output: any, context: __SerdeContext): TrainingJobSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_TrainingJobSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1TransformJob + * deserializeAws_json1_1TrainingJobSummary */ -const de_TransformJob = (output: any, context: __SerdeContext): TransformJob => { - return { - AutoMLJobArn: __expectString(output.AutoMLJobArn), - BatchStrategy: __expectString(output.BatchStrategy), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataProcessing: output.DataProcessing != null ? de_DataProcessing(output.DataProcessing, context) : undefined, - Environment: output.Environment != null ? de_TransformEnvironmentMap(output.Environment, context) : undefined, - ExperimentConfig: - output.ExperimentConfig != null ? de_ExperimentConfig(output.ExperimentConfig, context) : undefined, - FailureReason: __expectString(output.FailureReason), - LabelingJobArn: __expectString(output.LabelingJobArn), - MaxConcurrentTransforms: __expectInt32(output.MaxConcurrentTransforms), - MaxPayloadInMB: __expectInt32(output.MaxPayloadInMB), - ModelClientConfig: - output.ModelClientConfig != null ? de_ModelClientConfig(output.ModelClientConfig, context) : undefined, - ModelName: __expectString(output.ModelName), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TransformEndTime: - output.TransformEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransformEndTime))) - : undefined, - TransformInput: output.TransformInput != null ? de_TransformInput(output.TransformInput, context) : undefined, - TransformJobArn: __expectString(output.TransformJobArn), - TransformJobName: __expectString(output.TransformJobName), - TransformJobStatus: __expectString(output.TransformJobStatus), - TransformOutput: output.TransformOutput != null ? de_TransformOutput(output.TransformOutput, context) : undefined, - TransformResources: - output.TransformResources != null ? de_TransformResources(output.TransformResources, context) : undefined, - TransformStartTime: - output.TransformStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransformStartTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TransformJobDefinition - */ -const de_TransformJobDefinition = (output: any, context: __SerdeContext): TransformJobDefinition => { - return { - BatchStrategy: __expectString(output.BatchStrategy), - Environment: output.Environment != null ? de_TransformEnvironmentMap(output.Environment, context) : undefined, - MaxConcurrentTransforms: __expectInt32(output.MaxConcurrentTransforms), - MaxPayloadInMB: __expectInt32(output.MaxPayloadInMB), - TransformInput: output.TransformInput != null ? de_TransformInput(output.TransformInput, context) : undefined, - TransformOutput: output.TransformOutput != null ? de_TransformOutput(output.TransformOutput, context) : undefined, - TransformResources: - output.TransformResources != null ? de_TransformResources(output.TransformResources, context) : undefined, - } as any; +const de_TrainingJobSummary = (output: any, context: __SerdeContext): TrainingJobSummary => { + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrainingJobArn: __expectString, + TrainingJobName: __expectString, + TrainingJobStatus: __expectString, + WarmPoolStatus: _json, + }) as any; }; +// de_TrainingRepositoryAuthConfig omitted. + +// de_TrainingSpecification omitted. + +// de_TransformDataSource omitted. + +// de_TransformEnvironmentMap omitted. + +// de_TransformInput omitted. + +// de_TransformInstanceTypes omitted. + /** - * deserializeAws_json1_1TransformJobStepMetadata - */ -const de_TransformJobStepMetadata = (output: any, context: __SerdeContext): TransformJobStepMetadata => { - return { - Arn: __expectString(output.Arn), - } as any; -}; + * deserializeAws_json1_1TransformJob + */ +const de_TransformJob = (output: any, context: __SerdeContext): TransformJob => { + return take(output, { + AutoMLJobArn: __expectString, + BatchStrategy: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataProcessing: _json, + Environment: _json, + ExperimentConfig: _json, + FailureReason: __expectString, + LabelingJobArn: __expectString, + MaxConcurrentTransforms: __expectInt32, + MaxPayloadInMB: __expectInt32, + ModelClientConfig: _json, + ModelName: __expectString, + Tags: _json, + TransformEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransformInput: _json, + TransformJobArn: __expectString, + TransformJobName: __expectString, + TransformJobStatus: __expectString, + TransformOutput: _json, + TransformResources: _json, + TransformStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + +// de_TransformJobDefinition omitted. + +// de_TransformJobStepMetadata omitted. /** * deserializeAws_json1_1TransformJobSummaries @@ -42248,9 +27731,6 @@ const de_TransformJobSummaries = (output: any, context: __SerdeContext): Transfo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TransformJobSummary(entry, context); }); return retVal; @@ -42260,151 +27740,75 @@ const de_TransformJobSummaries = (output: any, context: __SerdeContext): Transfo * deserializeAws_json1_1TransformJobSummary */ const de_TransformJobSummary = (output: any, context: __SerdeContext): TransformJobSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - TransformEndTime: - output.TransformEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TransformEndTime))) - : undefined, - TransformJobArn: __expectString(output.TransformJobArn), - TransformJobName: __expectString(output.TransformJobName), - TransformJobStatus: __expectString(output.TransformJobStatus), - } as any; -}; - -/** - * deserializeAws_json1_1TransformOutput - */ -const de_TransformOutput = (output: any, context: __SerdeContext): TransformOutput => { - return { - Accept: __expectString(output.Accept), - AssembleWith: __expectString(output.AssembleWith), - KmsKeyId: __expectString(output.KmsKeyId), - S3OutputPath: __expectString(output.S3OutputPath), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransformEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TransformJobArn: __expectString, + TransformJobName: __expectString, + TransformJobStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1TransformResources - */ -const de_TransformResources = (output: any, context: __SerdeContext): TransformResources => { - return { - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - VolumeKmsKeyId: __expectString(output.VolumeKmsKeyId), - } as any; -}; +// de_TransformOutput omitted. -/** - * deserializeAws_json1_1TransformS3DataSource - */ -const de_TransformS3DataSource = (output: any, context: __SerdeContext): TransformS3DataSource => { - return { - S3DataType: __expectString(output.S3DataType), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_TransformResources omitted. + +// de_TransformS3DataSource omitted. /** * deserializeAws_json1_1Trial */ const de_Trial = (output: any, context: __SerdeContext): Trial => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - ExperimentName: __expectString(output.ExperimentName), - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - Source: output.Source != null ? de_TrialSource(output.Source, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TrialArn: __expectString(output.TrialArn), - TrialComponentSummaries: - output.TrialComponentSummaries != null - ? de_TrialComponentSimpleSummaries(output.TrialComponentSummaries, context) - : undefined, - TrialName: __expectString(output.TrialName), - } as any; + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + ExperimentName: __expectString, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MetadataProperties: _json, + Source: _json, + Tags: _json, + TrialArn: __expectString, + TrialComponentSummaries: (_: any) => de_TrialComponentSimpleSummaries(_, context), + TrialName: __expectString, + }) as any; }; /** * deserializeAws_json1_1TrialComponent */ const de_TrialComponent = (output: any, context: __SerdeContext): TrialComponent => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputArtifacts: - output.InputArtifacts != null ? de_TrialComponentArtifacts(output.InputArtifacts, context) : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - LineageGroupArn: __expectString(output.LineageGroupArn), - MetadataProperties: - output.MetadataProperties != null ? de_MetadataProperties(output.MetadataProperties, context) : undefined, - Metrics: output.Metrics != null ? de_TrialComponentMetricSummaries(output.Metrics, context) : undefined, - OutputArtifacts: - output.OutputArtifacts != null ? de_TrialComponentArtifacts(output.OutputArtifacts, context) : undefined, - Parameters: output.Parameters != null ? de_TrialComponentParameters(output.Parameters, context) : undefined, - Parents: output.Parents != null ? de_Parents(output.Parents, context) : undefined, - RunName: __expectString(output.RunName), - Source: output.Source != null ? de_TrialComponentSource(output.Source, context) : undefined, - SourceDetail: output.SourceDetail != null ? de_TrialComponentSourceDetail(output.SourceDetail, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: output.Status != null ? de_TrialComponentStatus(output.Status, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TrialComponentArn: __expectString(output.TrialComponentArn), - TrialComponentName: __expectString(output.TrialComponentName), - } as any; -}; - -/** - * deserializeAws_json1_1TrialComponentArtifact - */ -const de_TrialComponentArtifact = (output: any, context: __SerdeContext): TrialComponentArtifact => { - return { - MediaType: __expectString(output.MediaType), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1TrialComponentArtifacts - */ -const de_TrialComponentArtifacts = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_TrialComponentArtifact(value, context); - return acc; - }, {}); -}; + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputArtifacts: _json, + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LineageGroupArn: __expectString, + MetadataProperties: _json, + Metrics: (_: any) => de_TrialComponentMetricSummaries(_, context), + OutputArtifacts: _json, + Parameters: (_: any) => de_TrialComponentParameters(_, context), + Parents: _json, + RunName: __expectString, + Source: _json, + SourceDetail: (_: any) => de_TrialComponentSourceDetail(_, context), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: _json, + Tags: _json, + TrialComponentArn: __expectString, + TrialComponentName: __expectString, + }) as any; +}; + +// de_TrialComponentArtifact omitted. + +// de_TrialComponentArtifacts omitted. /** * deserializeAws_json1_1TrialComponentMetricSummaries @@ -42413,9 +27817,6 @@ const de_TrialComponentMetricSummaries = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrialComponentMetricSummary(entry, context); }); return retVal; @@ -42425,18 +27826,17 @@ const de_TrialComponentMetricSummaries = (output: any, context: __SerdeContext): * deserializeAws_json1_1TrialComponentMetricSummary */ const de_TrialComponentMetricSummary = (output: any, context: __SerdeContext): TrialComponentMetricSummary => { - return { - Avg: __limitedParseDouble(output.Avg), - Count: __expectInt32(output.Count), - Last: __limitedParseDouble(output.Last), - Max: __limitedParseDouble(output.Max), - MetricName: __expectString(output.MetricName), - Min: __limitedParseDouble(output.Min), - SourceArn: __expectString(output.SourceArn), - StdDev: __limitedParseDouble(output.StdDev), - TimeStamp: - output.TimeStamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TimeStamp))) : undefined, - } as any; + return take(output, { + Avg: __limitedParseDouble, + Count: __expectInt32, + Last: __limitedParseDouble, + Max: __limitedParseDouble, + MetricName: __expectString, + Min: __limitedParseDouble, + SourceArn: __expectString, + StdDev: __limitedParseDouble, + TimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -42478,9 +27878,6 @@ const de_TrialComponentSimpleSummaries = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrialComponentSimpleSummary(entry, context); }); return retVal; @@ -42490,65 +27887,32 @@ const de_TrialComponentSimpleSummaries = (output: any, context: __SerdeContext): * deserializeAws_json1_1TrialComponentSimpleSummary */ const de_TrialComponentSimpleSummary = (output: any, context: __SerdeContext): TrialComponentSimpleSummary => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - TrialComponentArn: __expectString(output.TrialComponentArn), - TrialComponentName: __expectString(output.TrialComponentName), - TrialComponentSource: - output.TrialComponentSource != null ? de_TrialComponentSource(output.TrialComponentSource, context) : undefined, - } as any; + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrialComponentArn: __expectString, + TrialComponentName: __expectString, + TrialComponentSource: _json, + }) as any; }; -/** - * deserializeAws_json1_1TrialComponentSource - */ -const de_TrialComponentSource = (output: any, context: __SerdeContext): TrialComponentSource => { - return { - SourceArn: __expectString(output.SourceArn), - SourceType: __expectString(output.SourceType), - } as any; -}; +// de_TrialComponentSource omitted. /** * deserializeAws_json1_1TrialComponentSourceDetail */ const de_TrialComponentSourceDetail = (output: any, context: __SerdeContext): TrialComponentSourceDetail => { - return { - ProcessingJob: output.ProcessingJob != null ? de_ProcessingJob(output.ProcessingJob, context) : undefined, - SourceArn: __expectString(output.SourceArn), - TrainingJob: output.TrainingJob != null ? de_TrainingJob(output.TrainingJob, context) : undefined, - TransformJob: output.TransformJob != null ? de_TransformJob(output.TransformJob, context) : undefined, - } as any; + return take(output, { + ProcessingJob: (_: any) => de_ProcessingJob(_, context), + SourceArn: __expectString, + TrainingJob: (_: any) => de_TrainingJob(_, context), + TransformJob: (_: any) => de_TransformJob(_, context), + }) as any; }; -/** - * deserializeAws_json1_1TrialComponentSources - */ -const de_TrialComponentSources = (output: any, context: __SerdeContext): TrialComponentSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrialComponentSource(entry, context); - }); - return retVal; -}; +// de_TrialComponentSources omitted. -/** - * deserializeAws_json1_1TrialComponentStatus - */ -const de_TrialComponentStatus = (output: any, context: __SerdeContext): TrialComponentStatus => { - return { - Message: __expectString(output.Message), - PrimaryStatus: __expectString(output.PrimaryStatus), - } as any; -}; +// de_TrialComponentStatus omitted. /** * deserializeAws_json1_1TrialComponentSummaries @@ -42557,9 +27921,6 @@ const de_TrialComponentSummaries = (output: any, context: __SerdeContext): Trial const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrialComponentSummary(entry, context); }); return retVal; @@ -42569,40 +27930,23 @@ const de_TrialComponentSummaries = (output: any, context: __SerdeContext): Trial * deserializeAws_json1_1TrialComponentSummary */ const de_TrialComponentSummary = (output: any, context: __SerdeContext): TrialComponentSummary => { - return { - CreatedBy: output.CreatedBy != null ? de_UserContext(output.CreatedBy, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_UserContext(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: output.Status != null ? de_TrialComponentStatus(output.Status, context) : undefined, - TrialComponentArn: __expectString(output.TrialComponentArn), - TrialComponentName: __expectString(output.TrialComponentName), - TrialComponentSource: - output.TrialComponentSource != null ? de_TrialComponentSource(output.TrialComponentSource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1TrialSource - */ -const de_TrialSource = (output: any, context: __SerdeContext): TrialSource => { - return { - SourceArn: __expectString(output.SourceArn), - SourceType: __expectString(output.SourceType), - } as any; + return take(output, { + CreatedBy: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: _json, + TrialComponentArn: __expectString, + TrialComponentName: __expectString, + TrialComponentSource: _json, + }) as any; }; +// de_TrialSource omitted. + /** * deserializeAws_json1_1TrialSummaries */ @@ -42610,9 +27954,6 @@ const de_TrialSummaries = (output: any, context: __SerdeContext): TrialSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrialSummary(entry, context); }); return retVal; @@ -42622,385 +27963,122 @@ const de_TrialSummaries = (output: any, context: __SerdeContext): TrialSummary[] * deserializeAws_json1_1TrialSummary */ const de_TrialSummary = (output: any, context: __SerdeContext): TrialSummary => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - TrialArn: __expectString(output.TrialArn), - TrialName: __expectString(output.TrialName), - TrialSource: output.TrialSource != null ? de_TrialSource(output.TrialSource, context) : undefined, - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TrialArn: __expectString, + TrialName: __expectString, + TrialSource: _json, + }) as any; }; /** * deserializeAws_json1_1TuningJobCompletionCriteria */ const de_TuningJobCompletionCriteria = (output: any, context: __SerdeContext): TuningJobCompletionCriteria => { - return { - BestObjectiveNotImproving: - output.BestObjectiveNotImproving != null - ? de_BestObjectiveNotImproving(output.BestObjectiveNotImproving, context) - : undefined, - ConvergenceDetected: - output.ConvergenceDetected != null ? de_ConvergenceDetected(output.ConvergenceDetected, context) : undefined, - TargetObjectiveMetricValue: __limitedParseFloat32(output.TargetObjectiveMetricValue), - } as any; + return take(output, { + BestObjectiveNotImproving: _json, + ConvergenceDetected: _json, + TargetObjectiveMetricValue: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1TuningJobStepMetaData - */ -const de_TuningJobStepMetaData = (output: any, context: __SerdeContext): TuningJobStepMetaData => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_TuningJobStepMetaData omitted. -/** - * deserializeAws_json1_1UiConfig - */ -const de_UiConfig = (output: any, context: __SerdeContext): UiConfig => { - return { - HumanTaskUiArn: __expectString(output.HumanTaskUiArn), - UiTemplateS3Uri: __expectString(output.UiTemplateS3Uri), - } as any; -}; +// de_UiConfig omitted. -/** - * deserializeAws_json1_1UiTemplateInfo - */ -const de_UiTemplateInfo = (output: any, context: __SerdeContext): UiTemplateInfo => { - return { - ContentSha256: __expectString(output.ContentSha256), - Url: __expectString(output.Url), - } as any; -}; +// de_UiTemplateInfo omitted. -/** - * deserializeAws_json1_1UpdateActionResponse - */ -const de_UpdateActionResponse = (output: any, context: __SerdeContext): UpdateActionResponse => { - return { - ActionArn: __expectString(output.ActionArn), - } as any; -}; +// de_UpdateActionResponse omitted. -/** - * deserializeAws_json1_1UpdateAppImageConfigResponse - */ -const de_UpdateAppImageConfigResponse = (output: any, context: __SerdeContext): UpdateAppImageConfigResponse => { - return { - AppImageConfigArn: __expectString(output.AppImageConfigArn), - } as any; -}; +// de_UpdateAppImageConfigResponse omitted. -/** - * deserializeAws_json1_1UpdateArtifactResponse - */ -const de_UpdateArtifactResponse = (output: any, context: __SerdeContext): UpdateArtifactResponse => { - return { - ArtifactArn: __expectString(output.ArtifactArn), - } as any; -}; +// de_UpdateArtifactResponse omitted. -/** - * deserializeAws_json1_1UpdateCodeRepositoryOutput - */ -const de_UpdateCodeRepositoryOutput = (output: any, context: __SerdeContext): UpdateCodeRepositoryOutput => { - return { - CodeRepositoryArn: __expectString(output.CodeRepositoryArn), - } as any; -}; +// de_UpdateCodeRepositoryOutput omitted. -/** - * deserializeAws_json1_1UpdateContextResponse - */ -const de_UpdateContextResponse = (output: any, context: __SerdeContext): UpdateContextResponse => { - return { - ContextArn: __expectString(output.ContextArn), - } as any; -}; +// de_UpdateContextResponse omitted. -/** - * deserializeAws_json1_1UpdateDomainResponse - */ -const de_UpdateDomainResponse = (output: any, context: __SerdeContext): UpdateDomainResponse => { - return { - DomainArn: __expectString(output.DomainArn), - } as any; -}; +// de_UpdateDomainResponse omitted. -/** - * deserializeAws_json1_1UpdateEndpointOutput - */ -const de_UpdateEndpointOutput = (output: any, context: __SerdeContext): UpdateEndpointOutput => { - return { - EndpointArn: __expectString(output.EndpointArn), - } as any; -}; +// de_UpdateEndpointOutput omitted. -/** - * deserializeAws_json1_1UpdateEndpointWeightsAndCapacitiesOutput - */ -const de_UpdateEndpointWeightsAndCapacitiesOutput = ( - output: any, - context: __SerdeContext -): UpdateEndpointWeightsAndCapacitiesOutput => { - return { - EndpointArn: __expectString(output.EndpointArn), - } as any; -}; +// de_UpdateEndpointWeightsAndCapacitiesOutput omitted. -/** - * deserializeAws_json1_1UpdateExperimentResponse - */ -const de_UpdateExperimentResponse = (output: any, context: __SerdeContext): UpdateExperimentResponse => { - return { - ExperimentArn: __expectString(output.ExperimentArn), - } as any; -}; +// de_UpdateExperimentResponse omitted. -/** - * deserializeAws_json1_1UpdateFeatureGroupResponse - */ -const de_UpdateFeatureGroupResponse = (output: any, context: __SerdeContext): UpdateFeatureGroupResponse => { - return { - FeatureGroupArn: __expectString(output.FeatureGroupArn), - } as any; -}; +// de_UpdateFeatureGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateHubResponse - */ -const de_UpdateHubResponse = (output: any, context: __SerdeContext): UpdateHubResponse => { - return { - HubArn: __expectString(output.HubArn), - } as any; -}; +// de_UpdateHubResponse omitted. -/** - * deserializeAws_json1_1UpdateImageResponse - */ -const de_UpdateImageResponse = (output: any, context: __SerdeContext): UpdateImageResponse => { - return { - ImageArn: __expectString(output.ImageArn), - } as any; -}; +// de_UpdateImageResponse omitted. -/** - * deserializeAws_json1_1UpdateImageVersionResponse - */ -const de_UpdateImageVersionResponse = (output: any, context: __SerdeContext): UpdateImageVersionResponse => { - return { - ImageVersionArn: __expectString(output.ImageVersionArn), - } as any; -}; +// de_UpdateImageVersionResponse omitted. -/** - * deserializeAws_json1_1UpdateInferenceExperimentResponse - */ -const de_UpdateInferenceExperimentResponse = ( - output: any, - context: __SerdeContext -): UpdateInferenceExperimentResponse => { - return { - InferenceExperimentArn: __expectString(output.InferenceExperimentArn), - } as any; -}; +// de_UpdateInferenceExperimentResponse omitted. -/** - * deserializeAws_json1_1UpdateModelCardResponse - */ -const de_UpdateModelCardResponse = (output: any, context: __SerdeContext): UpdateModelCardResponse => { - return { - ModelCardArn: __expectString(output.ModelCardArn), - } as any; -}; +// de_UpdateModelCardResponse omitted. -/** - * deserializeAws_json1_1UpdateModelPackageOutput - */ -const de_UpdateModelPackageOutput = (output: any, context: __SerdeContext): UpdateModelPackageOutput => { - return { - ModelPackageArn: __expectString(output.ModelPackageArn), - } as any; -}; +// de_UpdateModelPackageOutput omitted. -/** - * deserializeAws_json1_1UpdateMonitoringAlertResponse - */ -const de_UpdateMonitoringAlertResponse = (output: any, context: __SerdeContext): UpdateMonitoringAlertResponse => { - return { - MonitoringAlertName: __expectString(output.MonitoringAlertName), - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - } as any; -}; +// de_UpdateMonitoringAlertResponse omitted. -/** - * deserializeAws_json1_1UpdateMonitoringScheduleResponse - */ -const de_UpdateMonitoringScheduleResponse = ( - output: any, - context: __SerdeContext -): UpdateMonitoringScheduleResponse => { - return { - MonitoringScheduleArn: __expectString(output.MonitoringScheduleArn), - } as any; -}; +// de_UpdateMonitoringScheduleResponse omitted. -/** - * deserializeAws_json1_1UpdateNotebookInstanceLifecycleConfigOutput - */ -const de_UpdateNotebookInstanceLifecycleConfigOutput = ( - output: any, - context: __SerdeContext -): UpdateNotebookInstanceLifecycleConfigOutput => { - return {} as any; -}; +// de_UpdateNotebookInstanceLifecycleConfigOutput omitted. -/** - * deserializeAws_json1_1UpdateNotebookInstanceOutput - */ -const de_UpdateNotebookInstanceOutput = (output: any, context: __SerdeContext): UpdateNotebookInstanceOutput => { - return {} as any; -}; +// de_UpdateNotebookInstanceOutput omitted. -/** - * deserializeAws_json1_1UpdatePipelineExecutionResponse - */ -const de_UpdatePipelineExecutionResponse = (output: any, context: __SerdeContext): UpdatePipelineExecutionResponse => { - return { - PipelineExecutionArn: __expectString(output.PipelineExecutionArn), - } as any; -}; +// de_UpdatePipelineExecutionResponse omitted. -/** - * deserializeAws_json1_1UpdatePipelineResponse - */ -const de_UpdatePipelineResponse = (output: any, context: __SerdeContext): UpdatePipelineResponse => { - return { - PipelineArn: __expectString(output.PipelineArn), - } as any; -}; +// de_UpdatePipelineResponse omitted. -/** - * deserializeAws_json1_1UpdateProjectOutput - */ -const de_UpdateProjectOutput = (output: any, context: __SerdeContext): UpdateProjectOutput => { - return { - ProjectArn: __expectString(output.ProjectArn), - } as any; -}; +// de_UpdateProjectOutput omitted. -/** - * deserializeAws_json1_1UpdateSpaceResponse - */ -const de_UpdateSpaceResponse = (output: any, context: __SerdeContext): UpdateSpaceResponse => { - return { - SpaceArn: __expectString(output.SpaceArn), - } as any; -}; +// de_UpdateSpaceResponse omitted. -/** - * deserializeAws_json1_1UpdateTrainingJobResponse - */ -const de_UpdateTrainingJobResponse = (output: any, context: __SerdeContext): UpdateTrainingJobResponse => { - return { - TrainingJobArn: __expectString(output.TrainingJobArn), - } as any; -}; +// de_UpdateTrainingJobResponse omitted. -/** - * deserializeAws_json1_1UpdateTrialComponentResponse - */ -const de_UpdateTrialComponentResponse = (output: any, context: __SerdeContext): UpdateTrialComponentResponse => { - return { - TrialComponentArn: __expectString(output.TrialComponentArn), - } as any; -}; +// de_UpdateTrialComponentResponse omitted. -/** - * deserializeAws_json1_1UpdateTrialResponse - */ -const de_UpdateTrialResponse = (output: any, context: __SerdeContext): UpdateTrialResponse => { - return { - TrialArn: __expectString(output.TrialArn), - } as any; -}; +// de_UpdateTrialResponse omitted. -/** - * deserializeAws_json1_1UpdateUserProfileResponse - */ -const de_UpdateUserProfileResponse = (output: any, context: __SerdeContext): UpdateUserProfileResponse => { - return { - UserProfileArn: __expectString(output.UserProfileArn), - } as any; -}; +// de_UpdateUserProfileResponse omitted. /** * deserializeAws_json1_1UpdateWorkforceResponse */ const de_UpdateWorkforceResponse = (output: any, context: __SerdeContext): UpdateWorkforceResponse => { - return { - Workforce: output.Workforce != null ? de_Workforce(output.Workforce, context) : undefined, - } as any; + return take(output, { + Workforce: (_: any) => de_Workforce(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateWorkteamResponse */ const de_UpdateWorkteamResponse = (output: any, context: __SerdeContext): UpdateWorkteamResponse => { - return { - Workteam: output.Workteam != null ? de_Workteam(output.Workteam, context) : undefined, - } as any; + return take(output, { + Workteam: (_: any) => de_Workteam(_, context), + }) as any; }; -/** - * deserializeAws_json1_1USD - */ -const de_USD = (output: any, context: __SerdeContext): USD => { - return { - Cents: __expectInt32(output.Cents), - Dollars: __expectInt32(output.Dollars), - TenthFractionsOfACent: __expectInt32(output.TenthFractionsOfACent), - } as any; -}; +// de_USD omitted. -/** - * deserializeAws_json1_1UserContext - */ -const de_UserContext = (output: any, context: __SerdeContext): UserContext => { - return { - DomainId: __expectString(output.DomainId), - IamIdentity: output.IamIdentity != null ? de_IamIdentity(output.IamIdentity, context) : undefined, - UserProfileArn: __expectString(output.UserProfileArn), - UserProfileName: __expectString(output.UserProfileName), - } as any; -}; +// de_UserContext omitted. /** * deserializeAws_json1_1UserProfileDetails */ const de_UserProfileDetails = (output: any, context: __SerdeContext): UserProfileDetails => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DomainId: __expectString(output.DomainId), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Status: __expectString(output.Status), - UserProfileName: __expectString(output.UserProfileName), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + UserProfileName: __expectString, + }) as any; }; /** @@ -43010,130 +28088,40 @@ const de_UserProfileList = (output: any, context: __SerdeContext): UserProfileDe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_UserProfileDetails(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UserSettings - */ -const de_UserSettings = (output: any, context: __SerdeContext): UserSettings => { - return { - CanvasAppSettings: - output.CanvasAppSettings != null ? de_CanvasAppSettings(output.CanvasAppSettings, context) : undefined, - ExecutionRole: __expectString(output.ExecutionRole), - JupyterServerAppSettings: - output.JupyterServerAppSettings != null - ? de_JupyterServerAppSettings(output.JupyterServerAppSettings, context) - : undefined, - KernelGatewayAppSettings: - output.KernelGatewayAppSettings != null - ? de_KernelGatewayAppSettings(output.KernelGatewayAppSettings, context) - : undefined, - RSessionAppSettings: - output.RSessionAppSettings != null ? de_RSessionAppSettings(output.RSessionAppSettings, context) : undefined, - RStudioServerProAppSettings: - output.RStudioServerProAppSettings != null - ? de_RStudioServerProAppSettings(output.RStudioServerProAppSettings, context) - : undefined, - SecurityGroups: output.SecurityGroups != null ? de_SecurityGroupIds(output.SecurityGroups, context) : undefined, - SharingSettings: output.SharingSettings != null ? de_SharingSettings(output.SharingSettings, context) : undefined, - TensorBoardAppSettings: - output.TensorBoardAppSettings != null - ? de_TensorBoardAppSettings(output.TensorBoardAppSettings, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Vertex - */ -const de_Vertex = (output: any, context: __SerdeContext): Vertex => { - return { - Arn: __expectString(output.Arn), - LineageType: __expectString(output.LineageType), - Type: __expectString(output.Type), - } as any; -}; +// de_UserSettings omitted. -/** - * deserializeAws_json1_1Vertices - */ -const de_Vertices = (output: any, context: __SerdeContext): Vertex[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Vertex(entry, context); - }); - return retVal; -}; +// de_Vertex omitted. -/** - * deserializeAws_json1_1VpcConfig - */ -const de_VpcConfig = (output: any, context: __SerdeContext): VpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_VpcSecurityGroupIds(output.SecurityGroupIds, context) : undefined, - Subnets: output.Subnets != null ? de_Subnets(output.Subnets, context) : undefined, - } as any; -}; +// de_Vertices omitted. -/** - * deserializeAws_json1_1VpcSecurityGroupIds - */ -const de_VpcSecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VpcConfig omitted. -/** - * deserializeAws_json1_1WarmPoolStatus - */ -const de_WarmPoolStatus = (output: any, context: __SerdeContext): WarmPoolStatus => { - return { - ResourceRetainedBillableTimeInSeconds: __expectInt32(output.ResourceRetainedBillableTimeInSeconds), - ReusedByJob: __expectString(output.ReusedByJob), - Status: __expectString(output.Status), - } as any; -}; +// de_VpcSecurityGroupIds omitted. + +// de_WarmPoolStatus omitted. /** * deserializeAws_json1_1Workforce */ const de_Workforce = (output: any, context: __SerdeContext): Workforce => { - return { - CognitoConfig: output.CognitoConfig != null ? de_CognitoConfig(output.CognitoConfig, context) : undefined, - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - FailureReason: __expectString(output.FailureReason), - LastUpdatedDate: - output.LastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDate))) - : undefined, - OidcConfig: output.OidcConfig != null ? de_OidcConfigForResponse(output.OidcConfig, context) : undefined, - SourceIpConfig: output.SourceIpConfig != null ? de_SourceIpConfig(output.SourceIpConfig, context) : undefined, - Status: __expectString(output.Status), - SubDomain: __expectString(output.SubDomain), - WorkforceArn: __expectString(output.WorkforceArn), - WorkforceName: __expectString(output.WorkforceName), - WorkforceVpcConfig: - output.WorkforceVpcConfig != null ? de_WorkforceVpcConfigResponse(output.WorkforceVpcConfig, context) : undefined, - } as any; + return take(output, { + CognitoConfig: _json, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OidcConfig: _json, + SourceIpConfig: _json, + Status: __expectString, + SubDomain: __expectString, + WorkforceArn: __expectString, + WorkforceName: __expectString, + WorkforceVpcConfig: _json, + }) as any; }; /** @@ -43143,82 +28131,33 @@ const de_Workforces = (output: any, context: __SerdeContext): Workforce[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Workforce(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1WorkforceSecurityGroupIds - */ -const de_WorkforceSecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkforceSecurityGroupIds omitted. -/** - * deserializeAws_json1_1WorkforceSubnets - */ -const de_WorkforceSubnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkforceSubnets omitted. -/** - * deserializeAws_json1_1WorkforceVpcConfigResponse - */ -const de_WorkforceVpcConfigResponse = (output: any, context: __SerdeContext): WorkforceVpcConfigResponse => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_WorkforceSecurityGroupIds(output.SecurityGroupIds, context) : undefined, - Subnets: output.Subnets != null ? de_WorkforceSubnets(output.Subnets, context) : undefined, - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_WorkforceVpcConfigResponse omitted. /** * deserializeAws_json1_1Workteam */ const de_Workteam = (output: any, context: __SerdeContext): Workteam => { - return { - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - Description: __expectString(output.Description), - LastUpdatedDate: - output.LastUpdatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedDate))) - : undefined, - MemberDefinitions: - output.MemberDefinitions != null ? de_MemberDefinitions(output.MemberDefinitions, context) : undefined, - NotificationConfiguration: - output.NotificationConfiguration != null - ? de_NotificationConfiguration(output.NotificationConfiguration, context) - : undefined, - ProductListingIds: - output.ProductListingIds != null ? de_ProductListings(output.ProductListingIds, context) : undefined, - SubDomain: __expectString(output.SubDomain), - WorkforceArn: __expectString(output.WorkforceArn), - WorkteamArn: __expectString(output.WorkteamArn), - WorkteamName: __expectString(output.WorkteamName), - } as any; + return take(output, { + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastUpdatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MemberDefinitions: _json, + NotificationConfiguration: _json, + ProductListingIds: _json, + SubDomain: __expectString, + WorkforceArn: __expectString, + WorkteamArn: __expectString, + WorkteamName: __expectString, + }) as any; }; /** @@ -43228,9 +28167,6 @@ const de_Workteams = (output: any, context: __SerdeContext): Workteam[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Workteam(entry, context); }); return retVal; @@ -43256,6 +28192,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-savingsplans/src/protocols/Aws_restJson1.ts b/clients/client-savingsplans/src/protocols/Aws_restJson1.ts index 96da54c6ed5a..7afa4daae1dd 100644 --- a/clients/client-savingsplans/src/protocols/Aws_restJson1.ts +++ b/clients/client-savingsplans/src/protocols/Aws_restJson1.ts @@ -1,13 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -46,21 +47,13 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { CurrencyCode, InternalServerException, - ParentSavingsPlanOffering, ResourceNotFoundException, - SavingsPlan, SavingsPlanFilter, - SavingsPlanOffering, SavingsPlanOfferingFilterElement, - SavingsPlanOfferingProperty, - SavingsPlanOfferingRate, SavingsPlanOfferingRateFilterElement, - SavingsPlanOfferingRateProperty, SavingsPlanPaymentOption, SavingsPlanProductType, - SavingsPlanRate, SavingsPlanRateFilter, - SavingsPlanRateProperty, SavingsPlanRateServiceCode, SavingsPlanState, SavingsPlanType, @@ -82,14 +75,16 @@ export const se_CreateSavingsPlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSavingsPlan"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.commitment != null && { commitment: input.commitment }), - ...(input.purchaseTime != null && { purchaseTime: Math.round(input.purchaseTime.getTime() / 1000) }), - ...(input.savingsPlanOfferingId != null && { savingsPlanOfferingId: input.savingsPlanOfferingId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.upfrontPaymentAmount != null && { upfrontPaymentAmount: input.upfrontPaymentAmount }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + commitment: [], + purchaseTime: (_) => Math.round(_.getTime() / 1000), + savingsPlanOfferingId: [], + tags: (_) => _json(_), + upfrontPaymentAmount: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -115,9 +110,11 @@ export const se_DeleteQueuedSavingsPlanCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteQueuedSavingsPlan"; let body: any; - body = JSON.stringify({ - ...(input.savingsPlanId != null && { savingsPlanId: input.savingsPlanId }), - }); + body = JSON.stringify( + take(input, { + savingsPlanId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -143,12 +140,14 @@ export const se_DescribeSavingsPlanRatesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlanRates"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SavingsPlanRateFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.savingsPlanId != null && { savingsPlanId: input.savingsPlanId }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + savingsPlanId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -173,14 +172,16 @@ export const se_DescribeSavingsPlansCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlans"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SavingsPlanFilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.savingsPlanArns != null && { savingsPlanArns: se_SavingsPlanArnList(input.savingsPlanArns, context) }), - ...(input.savingsPlanIds != null && { savingsPlanIds: se_SavingsPlanIdList(input.savingsPlanIds, context) }), - ...(input.states != null && { states: se_SavingsPlanStateList(input.states, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + savingsPlanArns: (_) => _json(_), + savingsPlanIds: (_) => _json(_), + states: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -206,24 +207,20 @@ export const se_DescribeSavingsPlansOfferingRatesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlansOfferingRates"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_SavingsPlanOfferingRateFiltersList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.operations != null && { operations: se_SavingsPlanRateOperationList(input.operations, context) }), - ...(input.products != null && { products: se_SavingsPlanProductTypeList(input.products, context) }), - ...(input.savingsPlanOfferingIds != null && { - savingsPlanOfferingIds: se_UUIDs(input.savingsPlanOfferingIds, context), - }), - ...(input.savingsPlanPaymentOptions != null && { - savingsPlanPaymentOptions: se_SavingsPlanPaymentOptionList(input.savingsPlanPaymentOptions, context), - }), - ...(input.savingsPlanTypes != null && { - savingsPlanTypes: se_SavingsPlanTypeList(input.savingsPlanTypes, context), - }), - ...(input.serviceCodes != null && { serviceCodes: se_SavingsPlanRateServiceCodeList(input.serviceCodes, context) }), - ...(input.usageTypes != null && { usageTypes: se_SavingsPlanRateUsageTypeList(input.usageTypes, context) }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + operations: (_) => _json(_), + products: (_) => _json(_), + savingsPlanOfferingIds: (_) => _json(_), + savingsPlanPaymentOptions: (_) => _json(_), + savingsPlanTypes: (_) => _json(_), + serviceCodes: (_) => _json(_), + usageTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -249,23 +246,23 @@ export const se_DescribeSavingsPlansOfferingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DescribeSavingsPlansOfferings"; let body: any; - body = JSON.stringify({ - ...(input.currencies != null && { currencies: se_CurrencyList(input.currencies, context) }), - ...(input.descriptions != null && { descriptions: se_SavingsPlanDescriptionsList(input.descriptions, context) }), - ...(input.durations != null && { durations: se_DurationsList(input.durations, context) }), - ...(input.filters != null && { filters: se_SavingsPlanOfferingFiltersList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.offeringIds != null && { offeringIds: se_UUIDs(input.offeringIds, context) }), - ...(input.operations != null && { operations: se_SavingsPlanOperationList(input.operations, context) }), - ...(input.paymentOptions != null && { - paymentOptions: se_SavingsPlanPaymentOptionList(input.paymentOptions, context), - }), - ...(input.planTypes != null && { planTypes: se_SavingsPlanTypeList(input.planTypes, context) }), - ...(input.productType != null && { productType: input.productType }), - ...(input.serviceCodes != null && { serviceCodes: se_SavingsPlanServiceCodeList(input.serviceCodes, context) }), - ...(input.usageTypes != null && { usageTypes: se_SavingsPlanUsageTypeList(input.usageTypes, context) }), - }); + body = JSON.stringify( + take(input, { + currencies: (_) => _json(_), + descriptions: (_) => _json(_), + durations: (_) => _json(_), + filters: (_) => _json(_), + maxResults: [], + nextToken: [], + offeringIds: (_) => _json(_), + operations: (_) => _json(_), + paymentOptions: (_) => _json(_), + planTypes: (_) => _json(_), + productType: [], + serviceCodes: (_) => _json(_), + usageTypes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -290,9 +287,11 @@ export const se_ListTagsForResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -317,10 +316,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -345,10 +346,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource"; let body: any; - body = JSON.stringify({ - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + resourceArn: [], + tagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -374,9 +377,10 @@ export const de_CreateSavingsPlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.savingsPlanId != null) { - contents.savingsPlanId = __expectString(data.savingsPlanId); - } + const doc = take(data, { + savingsPlanId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -407,10 +411,9 @@ const de_CreateSavingsPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -460,10 +463,9 @@ const de_DeleteQueuedSavingsPlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -483,15 +485,12 @@ export const de_DescribeSavingsPlanRatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.savingsPlanId != null) { - contents.savingsPlanId = __expectString(data.savingsPlanId); - } - if (data.searchResults != null) { - contents.searchResults = de_SavingsPlanRateList(data.searchResults, context); - } + const doc = take(data, { + nextToken: __expectString, + savingsPlanId: __expectString, + searchResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -516,10 +515,9 @@ const de_DescribeSavingsPlanRatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -539,12 +537,11 @@ export const de_DescribeSavingsPlansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.savingsPlans != null) { - contents.savingsPlans = de_SavingsPlanList(data.savingsPlans, context); - } + const doc = take(data, { + nextToken: __expectString, + savingsPlans: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -569,10 +566,9 @@ const de_DescribeSavingsPlansCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -592,12 +588,11 @@ export const de_DescribeSavingsPlansOfferingRatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.searchResults != null) { - contents.searchResults = de_SavingsPlanOfferingRatesList(data.searchResults, context); - } + const doc = take(data, { + nextToken: __expectString, + searchResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -622,10 +617,9 @@ const de_DescribeSavingsPlansOfferingRatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -645,12 +639,11 @@ export const de_DescribeSavingsPlansOfferingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.searchResults != null) { - contents.searchResults = de_SavingsPlanOfferingsList(data.searchResults, context); - } + const doc = take(data, { + nextToken: __expectString, + searchResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -675,10 +668,9 @@ const de_DescribeSavingsPlansOfferingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -698,9 +690,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -728,10 +721,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -781,10 +773,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -831,16 +822,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServerExceptionRes */ @@ -850,9 +840,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -869,9 +860,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -888,9 +880,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -904,9 +897,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -914,584 +908,95 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1CurrencyList - */ -const se_CurrencyList = (input: (CurrencyCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CurrencyList omitted. -/** - * serializeAws_restJson1DurationsList - */ -const se_DurationsList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DurationsList omitted. -/** - * serializeAws_restJson1FilterValuesList - */ -const se_FilterValuesList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValuesList omitted. -/** - * serializeAws_restJson1ListOfStrings - */ -const se_ListOfStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfStrings omitted. -/** - * serializeAws_restJson1SavingsPlanArnList - */ -const se_SavingsPlanArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanArnList omitted. -/** - * serializeAws_restJson1SavingsPlanDescriptionsList - */ -const se_SavingsPlanDescriptionsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanDescriptionsList omitted. -/** - * serializeAws_restJson1SavingsPlanFilter - */ -const se_SavingsPlanFilter = (input: SavingsPlanFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_ListOfStrings(input.values, context) }), - }; -}; +// se_SavingsPlanFilter omitted. -/** - * serializeAws_restJson1SavingsPlanFilterList - */ -const se_SavingsPlanFilterList = (input: SavingsPlanFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SavingsPlanFilter(entry, context); - }); -}; +// se_SavingsPlanFilterList omitted. -/** - * serializeAws_restJson1SavingsPlanIdList - */ -const se_SavingsPlanIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanIdList omitted. -/** - * serializeAws_restJson1SavingsPlanOfferingFilterElement - */ -const se_SavingsPlanOfferingFilterElement = (input: SavingsPlanOfferingFilterElement, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValuesList(input.values, context) }), - }; -}; +// se_SavingsPlanOfferingFilterElement omitted. -/** - * serializeAws_restJson1SavingsPlanOfferingFiltersList - */ -const se_SavingsPlanOfferingFiltersList = (input: SavingsPlanOfferingFilterElement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SavingsPlanOfferingFilterElement(entry, context); - }); -}; +// se_SavingsPlanOfferingFiltersList omitted. -/** - * serializeAws_restJson1SavingsPlanOfferingRateFilterElement - */ -const se_SavingsPlanOfferingRateFilterElement = ( - input: SavingsPlanOfferingRateFilterElement, - context: __SerdeContext -): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_FilterValuesList(input.values, context) }), - }; -}; +// se_SavingsPlanOfferingRateFilterElement omitted. -/** - * serializeAws_restJson1SavingsPlanOfferingRateFiltersList - */ -const se_SavingsPlanOfferingRateFiltersList = ( - input: SavingsPlanOfferingRateFilterElement[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SavingsPlanOfferingRateFilterElement(entry, context); - }); -}; +// se_SavingsPlanOfferingRateFiltersList omitted. -/** - * serializeAws_restJson1SavingsPlanOperationList - */ -const se_SavingsPlanOperationList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanOperationList omitted. -/** - * serializeAws_restJson1SavingsPlanPaymentOptionList - */ -const se_SavingsPlanPaymentOptionList = ( - input: (SavingsPlanPaymentOption | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanPaymentOptionList omitted. -/** - * serializeAws_restJson1SavingsPlanProductTypeList - */ -const se_SavingsPlanProductTypeList = (input: (SavingsPlanProductType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanProductTypeList omitted. -/** - * serializeAws_restJson1SavingsPlanRateFilter - */ -const se_SavingsPlanRateFilter = (input: SavingsPlanRateFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.values != null && { values: se_ListOfStrings(input.values, context) }), - }; -}; +// se_SavingsPlanRateFilter omitted. -/** - * serializeAws_restJson1SavingsPlanRateFilterList - */ -const se_SavingsPlanRateFilterList = (input: SavingsPlanRateFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SavingsPlanRateFilter(entry, context); - }); -}; +// se_SavingsPlanRateFilterList omitted. -/** - * serializeAws_restJson1SavingsPlanRateOperationList - */ -const se_SavingsPlanRateOperationList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanRateOperationList omitted. -/** - * serializeAws_restJson1SavingsPlanRateServiceCodeList - */ -const se_SavingsPlanRateServiceCodeList = ( - input: (SavingsPlanRateServiceCode | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanRateServiceCodeList omitted. -/** - * serializeAws_restJson1SavingsPlanRateUsageTypeList - */ -const se_SavingsPlanRateUsageTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanRateUsageTypeList omitted. -/** - * serializeAws_restJson1SavingsPlanServiceCodeList - */ -const se_SavingsPlanServiceCodeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanServiceCodeList omitted. -/** - * serializeAws_restJson1SavingsPlanStateList - */ -const se_SavingsPlanStateList = (input: (SavingsPlanState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanStateList omitted. -/** - * serializeAws_restJson1SavingsPlanTypeList - */ -const se_SavingsPlanTypeList = (input: (SavingsPlanType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanTypeList omitted. -/** - * serializeAws_restJson1SavingsPlanUsageTypeList - */ -const se_SavingsPlanUsageTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SavingsPlanUsageTypeList omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1UUIDs - */ -const se_UUIDs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UUIDs omitted. -/** - * deserializeAws_restJson1ParentSavingsPlanOffering - */ -const de_ParentSavingsPlanOffering = (output: any, context: __SerdeContext): ParentSavingsPlanOffering => { - return { - currency: __expectString(output.currency), - durationSeconds: __expectLong(output.durationSeconds), - offeringId: __expectString(output.offeringId), - paymentOption: __expectString(output.paymentOption), - planDescription: __expectString(output.planDescription), - planType: __expectString(output.planType), - } as any; -}; +// de_ParentSavingsPlanOffering omitted. -/** - * deserializeAws_restJson1SavingsPlan - */ -const de_SavingsPlan = (output: any, context: __SerdeContext): SavingsPlan => { - return { - commitment: __expectString(output.commitment), - currency: __expectString(output.currency), - description: __expectString(output.description), - ec2InstanceFamily: __expectString(output.ec2InstanceFamily), - end: __expectString(output.end), - offeringId: __expectString(output.offeringId), - paymentOption: __expectString(output.paymentOption), - productTypes: output.productTypes != null ? de_SavingsPlanProductTypeList(output.productTypes, context) : undefined, - recurringPaymentAmount: __expectString(output.recurringPaymentAmount), - region: __expectString(output.region), - savingsPlanArn: __expectString(output.savingsPlanArn), - savingsPlanId: __expectString(output.savingsPlanId), - savingsPlanType: __expectString(output.savingsPlanType), - start: __expectString(output.start), - state: __expectString(output.state), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - termDurationInSeconds: __expectLong(output.termDurationInSeconds), - upfrontPaymentAmount: __expectString(output.upfrontPaymentAmount), - } as any; -}; +// de_SavingsPlan omitted. -/** - * deserializeAws_restJson1SavingsPlanList - */ -const de_SavingsPlanList = (output: any, context: __SerdeContext): SavingsPlan[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlan(entry, context); - }); - return retVal; -}; +// de_SavingsPlanList omitted. -/** - * deserializeAws_restJson1SavingsPlanOffering - */ -const de_SavingsPlanOffering = (output: any, context: __SerdeContext): SavingsPlanOffering => { - return { - currency: __expectString(output.currency), - description: __expectString(output.description), - durationSeconds: __expectLong(output.durationSeconds), - offeringId: __expectString(output.offeringId), - operation: __expectString(output.operation), - paymentOption: __expectString(output.paymentOption), - planType: __expectString(output.planType), - productTypes: output.productTypes != null ? de_SavingsPlanProductTypeList(output.productTypes, context) : undefined, - properties: output.properties != null ? de_SavingsPlanOfferingPropertyList(output.properties, context) : undefined, - serviceCode: __expectString(output.serviceCode), - usageType: __expectString(output.usageType), - } as any; -}; +// de_SavingsPlanOffering omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingProperty - */ -const de_SavingsPlanOfferingProperty = (output: any, context: __SerdeContext): SavingsPlanOfferingProperty => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_SavingsPlanOfferingProperty omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingPropertyList - */ -const de_SavingsPlanOfferingPropertyList = (output: any, context: __SerdeContext): SavingsPlanOfferingProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlanOfferingProperty(entry, context); - }); - return retVal; -}; +// de_SavingsPlanOfferingPropertyList omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingRate - */ -const de_SavingsPlanOfferingRate = (output: any, context: __SerdeContext): SavingsPlanOfferingRate => { - return { - operation: __expectString(output.operation), - productType: __expectString(output.productType), - properties: - output.properties != null ? de_SavingsPlanOfferingRatePropertyList(output.properties, context) : undefined, - rate: __expectString(output.rate), - savingsPlanOffering: - output.savingsPlanOffering != null - ? de_ParentSavingsPlanOffering(output.savingsPlanOffering, context) - : undefined, - serviceCode: __expectString(output.serviceCode), - unit: __expectString(output.unit), - usageType: __expectString(output.usageType), - } as any; -}; +// de_SavingsPlanOfferingRate omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingRateProperty - */ -const de_SavingsPlanOfferingRateProperty = (output: any, context: __SerdeContext): SavingsPlanOfferingRateProperty => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_SavingsPlanOfferingRateProperty omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingRatePropertyList - */ -const de_SavingsPlanOfferingRatePropertyList = ( - output: any, - context: __SerdeContext -): SavingsPlanOfferingRateProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlanOfferingRateProperty(entry, context); - }); - return retVal; -}; +// de_SavingsPlanOfferingRatePropertyList omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingRatesList - */ -const de_SavingsPlanOfferingRatesList = (output: any, context: __SerdeContext): SavingsPlanOfferingRate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlanOfferingRate(entry, context); - }); - return retVal; -}; +// de_SavingsPlanOfferingRatesList omitted. -/** - * deserializeAws_restJson1SavingsPlanOfferingsList - */ -const de_SavingsPlanOfferingsList = (output: any, context: __SerdeContext): SavingsPlanOffering[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlanOffering(entry, context); - }); - return retVal; -}; +// de_SavingsPlanOfferingsList omitted. -/** - * deserializeAws_restJson1SavingsPlanProductTypeList - */ -const de_SavingsPlanProductTypeList = (output: any, context: __SerdeContext): (SavingsPlanProductType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SavingsPlanProductTypeList omitted. -/** - * deserializeAws_restJson1SavingsPlanRate - */ -const de_SavingsPlanRate = (output: any, context: __SerdeContext): SavingsPlanRate => { - return { - currency: __expectString(output.currency), - operation: __expectString(output.operation), - productType: __expectString(output.productType), - properties: output.properties != null ? de_SavingsPlanRatePropertyList(output.properties, context) : undefined, - rate: __expectString(output.rate), - serviceCode: __expectString(output.serviceCode), - unit: __expectString(output.unit), - usageType: __expectString(output.usageType), - } as any; -}; +// de_SavingsPlanRate omitted. -/** - * deserializeAws_restJson1SavingsPlanRateList - */ -const de_SavingsPlanRateList = (output: any, context: __SerdeContext): SavingsPlanRate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlanRate(entry, context); - }); - return retVal; -}; +// de_SavingsPlanRateList omitted. -/** - * deserializeAws_restJson1SavingsPlanRateProperty - */ -const de_SavingsPlanRateProperty = (output: any, context: __SerdeContext): SavingsPlanRateProperty => { - return { - name: __expectString(output.name), - value: __expectString(output.value), - } as any; -}; +// de_SavingsPlanRateProperty omitted. -/** - * deserializeAws_restJson1SavingsPlanRatePropertyList - */ -const de_SavingsPlanRatePropertyList = (output: any, context: __SerdeContext): SavingsPlanRateProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SavingsPlanRateProperty(entry, context); - }); - return retVal; -}; +// de_SavingsPlanRatePropertyList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-scheduler/src/protocols/Aws_restJson1.ts b/clients/client-scheduler/src/protocols/Aws_restJson1.ts index d600461f26b6..0cf9068226dc 100644 --- a/clients/client-scheduler/src/protocols/Aws_restJson1.ts +++ b/clients/client-scheduler/src/protocols/Aws_restJson1.ts @@ -1,18 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -65,7 +65,6 @@ import { SqsParameters, Tag, Target, - TargetSummary, ThrottlingException, ValidationException, } from "../models/models_0"; @@ -85,21 +84,21 @@ export const se_CreateScheduleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }), - ...(input.FlexibleTimeWindow != null && { - FlexibleTimeWindow: se_FlexibleTimeWindow(input.FlexibleTimeWindow, context), - }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.ScheduleExpressionTimezone != null && { ScheduleExpressionTimezone: input.ScheduleExpressionTimezone }), - ...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }), - ...(input.State != null && { State: input.State }), - ...(input.Target != null && { Target: se_Target(input.Target, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + EndDate: (_) => Math.round(_.getTime() / 1000), + FlexibleTimeWindow: (_) => _json(_), + GroupName: [], + KmsKeyArn: [], + ScheduleExpression: [], + ScheduleExpressionTimezone: [], + StartDate: (_) => Math.round(_.getTime() / 1000), + State: [], + Target: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -125,10 +124,12 @@ export const se_CreateScheduleGroupCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedule-groups/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -340,9 +341,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -398,21 +401,21 @@ export const se_UpdateScheduleCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/schedules/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }), - ...(input.FlexibleTimeWindow != null && { - FlexibleTimeWindow: se_FlexibleTimeWindow(input.FlexibleTimeWindow, context), - }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.ScheduleExpressionTimezone != null && { ScheduleExpressionTimezone: input.ScheduleExpressionTimezone }), - ...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }), - ...(input.State != null && { State: input.State }), - ...(input.Target != null && { Target: se_Target(input.Target, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + EndDate: (_) => Math.round(_.getTime() / 1000), + FlexibleTimeWindow: (_) => _json(_), + GroupName: [], + KmsKeyArn: [], + ScheduleExpression: [], + ScheduleExpressionTimezone: [], + StartDate: (_) => Math.round(_.getTime() / 1000), + State: [], + Target: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -438,9 +441,10 @@ export const de_CreateScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ScheduleArn != null) { - contents.ScheduleArn = __expectString(data.ScheduleArn); - } + const doc = take(data, { + ScheduleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -477,10 +481,9 @@ const de_CreateScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -500,9 +503,10 @@ export const de_CreateScheduleGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ScheduleGroupArn != null) { - contents.ScheduleGroupArn = __expectString(data.ScheduleGroupArn); - } + const doc = take(data, { + ScheduleGroupArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -536,10 +540,9 @@ const de_CreateScheduleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -592,10 +595,9 @@ const de_DeleteScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -648,10 +650,9 @@ const de_DeleteScheduleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -671,48 +672,23 @@ export const de_GetScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.EndDate != null) { - contents.EndDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.EndDate))); - } - if (data.FlexibleTimeWindow != null) { - contents.FlexibleTimeWindow = de_FlexibleTimeWindow(data.FlexibleTimeWindow, context); - } - if (data.GroupName != null) { - contents.GroupName = __expectString(data.GroupName); - } - if (data.KmsKeyArn != null) { - contents.KmsKeyArn = __expectString(data.KmsKeyArn); - } - if (data.LastModificationDate != null) { - contents.LastModificationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModificationDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.ScheduleExpression != null) { - contents.ScheduleExpression = __expectString(data.ScheduleExpression); - } - if (data.ScheduleExpressionTimezone != null) { - contents.ScheduleExpressionTimezone = __expectString(data.ScheduleExpressionTimezone); - } - if (data.StartDate != null) { - contents.StartDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartDate))); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.Target != null) { - contents.Target = de_Target(data.Target, context); - } + const doc = take(data, { + Arn: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EndDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FlexibleTimeWindow: _json, + GroupName: __expectString, + KmsKeyArn: __expectString, + LastModificationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ScheduleExpression: __expectString, + ScheduleExpressionTimezone: __expectString, + StartDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + Target: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -743,10 +719,9 @@ const de_GetScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -766,21 +741,14 @@ export const de_GetScheduleGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationDate))); - } - if (data.LastModificationDate != null) { - contents.LastModificationDate = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastModificationDate))); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + Arn: __expectString, + CreationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -811,10 +779,9 @@ const de_GetScheduleGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -834,12 +801,11 @@ export const de_ListScheduleGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ScheduleGroups != null) { - contents.ScheduleGroups = de_ScheduleGroupList(data.ScheduleGroups, context); - } + const doc = take(data, { + NextToken: __expectString, + ScheduleGroups: (_) => de_ScheduleGroupList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -867,10 +833,9 @@ const de_ListScheduleGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -890,12 +855,11 @@ export const de_ListSchedulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Schedules != null) { - contents.Schedules = de_ScheduleList(data.Schedules, context); - } + const doc = take(data, { + NextToken: __expectString, + Schedules: (_) => de_ScheduleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -926,10 +890,9 @@ const de_ListSchedulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -949,9 +912,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -982,10 +946,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1038,10 +1001,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1094,10 +1056,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,9 +1078,10 @@ export const de_UpdateScheduleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ScheduleArn != null) { - contents.ScheduleArn = __expectString(data.ScheduleArn); - } + const doc = take(data, { + ScheduleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1153,25 +1115,25 @@ const de_UpdateScheduleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1188,9 +1150,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1207,9 +1170,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1226,9 +1190,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1242,9 +1207,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1258,9 +1224,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1268,511 +1235,89 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AwsVpcConfiguration - */ -const se_AwsVpcConfiguration = (input: AwsVpcConfiguration, context: __SerdeContext): any => { - return { - ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }), - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }), - ...(input.Subnets != null && { Subnets: se_Subnets(input.Subnets, context) }), - }; -}; +// se_AwsVpcConfiguration omitted. -/** - * serializeAws_restJson1CapacityProviderStrategy - */ -const se_CapacityProviderStrategy = (input: CapacityProviderStrategyItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CapacityProviderStrategyItem(entry, context); - }); -}; +// se_CapacityProviderStrategy omitted. -/** - * serializeAws_restJson1CapacityProviderStrategyItem - */ -const se_CapacityProviderStrategyItem = (input: CapacityProviderStrategyItem, context: __SerdeContext): any => { - return { - ...(input.base != null && { base: input.base }), - ...(input.capacityProvider != null && { capacityProvider: input.capacityProvider }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_CapacityProviderStrategyItem omitted. -/** - * serializeAws_restJson1DeadLetterConfig - */ -const se_DeadLetterConfig = (input: DeadLetterConfig, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; +// se_DeadLetterConfig omitted. -/** - * serializeAws_restJson1EcsParameters - */ -const se_EcsParameters = (input: EcsParameters, context: __SerdeContext): any => { - return { - ...(input.CapacityProviderStrategy != null && { - CapacityProviderStrategy: se_CapacityProviderStrategy(input.CapacityProviderStrategy, context), - }), - ...(input.EnableECSManagedTags != null && { EnableECSManagedTags: input.EnableECSManagedTags }), - ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }), - ...(input.Group != null && { Group: input.Group }), - ...(input.LaunchType != null && { LaunchType: input.LaunchType }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_NetworkConfiguration(input.NetworkConfiguration, context), - }), - ...(input.PlacementConstraints != null && { - PlacementConstraints: se_PlacementConstraints(input.PlacementConstraints, context), - }), - ...(input.PlacementStrategy != null && { - PlacementStrategy: se_PlacementStrategies(input.PlacementStrategy, context), - }), - ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }), - ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }), - ...(input.ReferenceId != null && { ReferenceId: input.ReferenceId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TaskCount != null && { TaskCount: input.TaskCount }), - ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }), - }; -}; +// se_EcsParameters omitted. -/** - * serializeAws_restJson1EventBridgeParameters - */ -const se_EventBridgeParameters = (input: EventBridgeParameters, context: __SerdeContext): any => { - return { - ...(input.DetailType != null && { DetailType: input.DetailType }), - ...(input.Source != null && { Source: input.Source }), - }; -}; +// se_EventBridgeParameters omitted. -/** - * serializeAws_restJson1FlexibleTimeWindow - */ -const se_FlexibleTimeWindow = (input: FlexibleTimeWindow, context: __SerdeContext): any => { - return { - ...(input.MaximumWindowInMinutes != null && { MaximumWindowInMinutes: input.MaximumWindowInMinutes }), - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; +// se_FlexibleTimeWindow omitted. -/** - * serializeAws_restJson1KinesisParameters - */ -const se_KinesisParameters = (input: KinesisParameters, context: __SerdeContext): any => { - return { - ...(input.PartitionKey != null && { PartitionKey: input.PartitionKey }), - }; -}; +// se_KinesisParameters omitted. -/** - * serializeAws_restJson1NetworkConfiguration - */ -const se_NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.awsvpcConfiguration != null && { - awsvpcConfiguration: se_AwsVpcConfiguration(input.awsvpcConfiguration, context), - }), - }; -}; +// se_NetworkConfiguration omitted. -/** - * serializeAws_restJson1PlacementConstraint - */ -const se_PlacementConstraint = (input: PlacementConstraint, context: __SerdeContext): any => { - return { - ...(input.expression != null && { expression: input.expression }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_PlacementConstraint omitted. -/** - * serializeAws_restJson1PlacementConstraints - */ -const se_PlacementConstraints = (input: PlacementConstraint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementConstraint(entry, context); - }); -}; +// se_PlacementConstraints omitted. -/** - * serializeAws_restJson1PlacementStrategies - */ -const se_PlacementStrategies = (input: PlacementStrategy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PlacementStrategy(entry, context); - }); -}; +// se_PlacementStrategies omitted. -/** - * serializeAws_restJson1PlacementStrategy - */ -const se_PlacementStrategy = (input: PlacementStrategy, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_PlacementStrategy omitted. -/** - * serializeAws_restJson1RetryPolicy - */ -const se_RetryPolicy = (input: RetryPolicy, context: __SerdeContext): any => { - return { - ...(input.MaximumEventAgeInSeconds != null && { MaximumEventAgeInSeconds: input.MaximumEventAgeInSeconds }), - ...(input.MaximumRetryAttempts != null && { MaximumRetryAttempts: input.MaximumRetryAttempts }), - }; -}; +// se_RetryPolicy omitted. -/** - * serializeAws_restJson1SageMakerPipelineParameter - */ -const se_SageMakerPipelineParameter = (input: SageMakerPipelineParameter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_SageMakerPipelineParameter omitted. -/** - * serializeAws_restJson1SageMakerPipelineParameterList - */ -const se_SageMakerPipelineParameterList = (input: SageMakerPipelineParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SageMakerPipelineParameter(entry, context); - }); -}; +// se_SageMakerPipelineParameterList omitted. -/** - * serializeAws_restJson1SageMakerPipelineParameters - */ -const se_SageMakerPipelineParameters = (input: SageMakerPipelineParameters, context: __SerdeContext): any => { - return { - ...(input.PipelineParameterList != null && { - PipelineParameterList: se_SageMakerPipelineParameterList(input.PipelineParameterList, context), - }), - }; -}; +// se_SageMakerPipelineParameters omitted. -/** - * serializeAws_restJson1SecurityGroups - */ -const se_SecurityGroups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroups omitted. -/** - * serializeAws_restJson1SqsParameters - */ -const se_SqsParameters = (input: SqsParameters, context: __SerdeContext): any => { - return { - ...(input.MessageGroupId != null && { MessageGroupId: input.MessageGroupId }), - }; -}; +// se_SqsParameters omitted. -/** - * serializeAws_restJson1Subnets - */ -const se_Subnets = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Subnets omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TagMap(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_restJson1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.DeadLetterConfig != null && { DeadLetterConfig: se_DeadLetterConfig(input.DeadLetterConfig, context) }), - ...(input.EcsParameters != null && { EcsParameters: se_EcsParameters(input.EcsParameters, context) }), - ...(input.EventBridgeParameters != null && { - EventBridgeParameters: se_EventBridgeParameters(input.EventBridgeParameters, context), - }), - ...(input.Input != null && { Input: input.Input }), - ...(input.KinesisParameters != null && { - KinesisParameters: se_KinesisParameters(input.KinesisParameters, context), - }), - ...(input.RetryPolicy != null && { RetryPolicy: se_RetryPolicy(input.RetryPolicy, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SageMakerPipelineParameters != null && { - SageMakerPipelineParameters: se_SageMakerPipelineParameters(input.SageMakerPipelineParameters, context), - }), - ...(input.SqsParameters != null && { SqsParameters: se_SqsParameters(input.SqsParameters, context) }), - }; -}; +// se_Target omitted. -/** - * deserializeAws_restJson1AwsVpcConfiguration - */ -const de_AwsVpcConfiguration = (output: any, context: __SerdeContext): AwsVpcConfiguration => { - return { - AssignPublicIp: __expectString(output.AssignPublicIp), - SecurityGroups: output.SecurityGroups != null ? de_SecurityGroups(output.SecurityGroups, context) : undefined, - Subnets: output.Subnets != null ? de_Subnets(output.Subnets, context) : undefined, - } as any; -}; +// de_AwsVpcConfiguration omitted. -/** - * deserializeAws_restJson1CapacityProviderStrategy - */ -const de_CapacityProviderStrategy = (output: any, context: __SerdeContext): CapacityProviderStrategyItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CapacityProviderStrategyItem(entry, context); - }); - return retVal; -}; +// de_CapacityProviderStrategy omitted. -/** - * deserializeAws_restJson1CapacityProviderStrategyItem - */ -const de_CapacityProviderStrategyItem = (output: any, context: __SerdeContext): CapacityProviderStrategyItem => { - return { - base: __expectInt32(output.base), - capacityProvider: __expectString(output.capacityProvider), - weight: __expectInt32(output.weight), - } as any; -}; +// de_CapacityProviderStrategyItem omitted. -/** - * deserializeAws_restJson1DeadLetterConfig - */ -const de_DeadLetterConfig = (output: any, context: __SerdeContext): DeadLetterConfig => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_DeadLetterConfig omitted. -/** - * deserializeAws_restJson1EcsParameters - */ -const de_EcsParameters = (output: any, context: __SerdeContext): EcsParameters => { - return { - CapacityProviderStrategy: - output.CapacityProviderStrategy != null - ? de_CapacityProviderStrategy(output.CapacityProviderStrategy, context) - : undefined, - EnableECSManagedTags: __expectBoolean(output.EnableECSManagedTags), - EnableExecuteCommand: __expectBoolean(output.EnableExecuteCommand), - Group: __expectString(output.Group), - LaunchType: __expectString(output.LaunchType), - NetworkConfiguration: - output.NetworkConfiguration != null ? de_NetworkConfiguration(output.NetworkConfiguration, context) : undefined, - PlacementConstraints: - output.PlacementConstraints != null ? de_PlacementConstraints(output.PlacementConstraints, context) : undefined, - PlacementStrategy: - output.PlacementStrategy != null ? de_PlacementStrategies(output.PlacementStrategy, context) : undefined, - PlatformVersion: __expectString(output.PlatformVersion), - PropagateTags: __expectString(output.PropagateTags), - ReferenceId: __expectString(output.ReferenceId), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - TaskCount: __expectInt32(output.TaskCount), - TaskDefinitionArn: __expectString(output.TaskDefinitionArn), - } as any; -}; +// de_EcsParameters omitted. -/** - * deserializeAws_restJson1EventBridgeParameters - */ -const de_EventBridgeParameters = (output: any, context: __SerdeContext): EventBridgeParameters => { - return { - DetailType: __expectString(output.DetailType), - Source: __expectString(output.Source), - } as any; -}; +// de_EventBridgeParameters omitted. -/** - * deserializeAws_restJson1FlexibleTimeWindow - */ -const de_FlexibleTimeWindow = (output: any, context: __SerdeContext): FlexibleTimeWindow => { - return { - MaximumWindowInMinutes: __expectInt32(output.MaximumWindowInMinutes), - Mode: __expectString(output.Mode), - } as any; -}; +// de_FlexibleTimeWindow omitted. -/** - * deserializeAws_restJson1KinesisParameters - */ -const de_KinesisParameters = (output: any, context: __SerdeContext): KinesisParameters => { - return { - PartitionKey: __expectString(output.PartitionKey), - } as any; -}; +// de_KinesisParameters omitted. -/** - * deserializeAws_restJson1NetworkConfiguration - */ -const de_NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => { - return { - awsvpcConfiguration: - output.awsvpcConfiguration != null ? de_AwsVpcConfiguration(output.awsvpcConfiguration, context) : undefined, - } as any; -}; +// de_NetworkConfiguration omitted. -/** - * deserializeAws_restJson1PlacementConstraint - */ -const de_PlacementConstraint = (output: any, context: __SerdeContext): PlacementConstraint => { - return { - expression: __expectString(output.expression), - type: __expectString(output.type), - } as any; -}; +// de_PlacementConstraint omitted. -/** - * deserializeAws_restJson1PlacementConstraints - */ -const de_PlacementConstraints = (output: any, context: __SerdeContext): PlacementConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementConstraint(entry, context); - }); - return retVal; -}; +// de_PlacementConstraints omitted. -/** - * deserializeAws_restJson1PlacementStrategies - */ -const de_PlacementStrategies = (output: any, context: __SerdeContext): PlacementStrategy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PlacementStrategy(entry, context); - }); - return retVal; -}; +// de_PlacementStrategies omitted. -/** - * deserializeAws_restJson1PlacementStrategy - */ -const de_PlacementStrategy = (output: any, context: __SerdeContext): PlacementStrategy => { - return { - field: __expectString(output.field), - type: __expectString(output.type), - } as any; -}; +// de_PlacementStrategy omitted. -/** - * deserializeAws_restJson1RetryPolicy - */ -const de_RetryPolicy = (output: any, context: __SerdeContext): RetryPolicy => { - return { - MaximumEventAgeInSeconds: __expectInt32(output.MaximumEventAgeInSeconds), - MaximumRetryAttempts: __expectInt32(output.MaximumRetryAttempts), - } as any; -}; +// de_RetryPolicy omitted. -/** - * deserializeAws_restJson1SageMakerPipelineParameter - */ -const de_SageMakerPipelineParameter = (output: any, context: __SerdeContext): SageMakerPipelineParameter => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_SageMakerPipelineParameter omitted. -/** - * deserializeAws_restJson1SageMakerPipelineParameterList - */ -const de_SageMakerPipelineParameterList = (output: any, context: __SerdeContext): SageMakerPipelineParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SageMakerPipelineParameter(entry, context); - }); - return retVal; -}; +// de_SageMakerPipelineParameterList omitted. -/** - * deserializeAws_restJson1SageMakerPipelineParameters - */ -const de_SageMakerPipelineParameters = (output: any, context: __SerdeContext): SageMakerPipelineParameters => { - return { - PipelineParameterList: - output.PipelineParameterList != null - ? de_SageMakerPipelineParameterList(output.PipelineParameterList, context) - : undefined, - } as any; -}; +// de_SageMakerPipelineParameters omitted. /** * deserializeAws_restJson1ScheduleGroupList @@ -1781,9 +1326,6 @@ const de_ScheduleGroupList = (output: any, context: __SerdeContext): ScheduleGro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduleGroupSummary(entry, context); }); return retVal; @@ -1793,19 +1335,13 @@ const de_ScheduleGroupList = (output: any, context: __SerdeContext): ScheduleGro * deserializeAws_restJson1ScheduleGroupSummary */ const de_ScheduleGroupSummary = (output: any, context: __SerdeContext): ScheduleGroupSummary => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - LastModificationDate: - output.LastModificationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationDate))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModificationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + }) as any; }; /** @@ -1815,9 +1351,6 @@ const de_ScheduleList = (output: any, context: __SerdeContext): ScheduleSummary[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduleSummary(entry, context); }); return retVal; @@ -1827,149 +1360,34 @@ const de_ScheduleList = (output: any, context: __SerdeContext): ScheduleSummary[ * deserializeAws_restJson1ScheduleSummary */ const de_ScheduleSummary = (output: any, context: __SerdeContext): ScheduleSummary => { - return { - Arn: __expectString(output.Arn), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - GroupName: __expectString(output.GroupName), - LastModificationDate: - output.LastModificationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModificationDate))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - Target: output.Target != null ? de_TargetSummary(output.Target, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GroupName: __expectString, + LastModificationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + Target: _json, + }) as any; }; -/** - * deserializeAws_restJson1SecurityGroups - */ -const de_SecurityGroups = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroups omitted. -/** - * deserializeAws_restJson1SqsParameters - */ -const de_SqsParameters = (output: any, context: __SerdeContext): SqsParameters => { - return { - MessageGroupId: __expectString(output.MessageGroupId), - } as any; -}; +// de_SqsParameters omitted. -/** - * deserializeAws_restJson1Subnets - */ -const de_Subnets = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Subnets omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagMap(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_restJson1Target - */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - Arn: __expectString(output.Arn), - DeadLetterConfig: - output.DeadLetterConfig != null ? de_DeadLetterConfig(output.DeadLetterConfig, context) : undefined, - EcsParameters: output.EcsParameters != null ? de_EcsParameters(output.EcsParameters, context) : undefined, - EventBridgeParameters: - output.EventBridgeParameters != null - ? de_EventBridgeParameters(output.EventBridgeParameters, context) - : undefined, - Input: __expectString(output.Input), - KinesisParameters: - output.KinesisParameters != null ? de_KinesisParameters(output.KinesisParameters, context) : undefined, - RetryPolicy: output.RetryPolicy != null ? de_RetryPolicy(output.RetryPolicy, context) : undefined, - RoleArn: __expectString(output.RoleArn), - SageMakerPipelineParameters: - output.SageMakerPipelineParameters != null - ? de_SageMakerPipelineParameters(output.SageMakerPipelineParameters, context) - : undefined, - SqsParameters: output.SqsParameters != null ? de_SqsParameters(output.SqsParameters, context) : undefined, - } as any; -}; +// de_Target omitted. -/** - * deserializeAws_restJson1TargetSummary - */ -const de_TargetSummary = (output: any, context: __SerdeContext): TargetSummary => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_TargetSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-schemas/src/protocols/Aws_restJson1.ts b/clients/client-schemas/src/protocols/Aws_restJson1.ts index afa25852e1bd..5a4a6980b115 100644 --- a/clients/client-schemas/src/protocols/Aws_restJson1.ts +++ b/clients/client-schemas/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -9,10 +10,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, LazyJsonString as __LazyJsonString, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -81,7 +83,6 @@ import { PreconditionFailedException, RegistrySummary, SchemaSummary, - SchemaVersionSummary, SearchSchemaSummary, SearchSchemaVersionSummary, ServiceUnavailableException, @@ -103,12 +104,14 @@ export const se_CreateDiscovererCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discoverers"; let body: any; - body = JSON.stringify({ - ...(input.CrossAccount != null && { CrossAccount: input.CrossAccount }), - ...(input.Description != null && { Description: input.Description }), - ...(input.SourceArn != null && { SourceArn: input.SourceArn }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + CrossAccount: [], + Description: [], + SourceArn: [], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -142,10 +145,12 @@ export const se_CreateRegistryCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -181,12 +186,14 @@ export const se_CreateSchemaCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName!, "{SchemaName}", false); let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: input.Content }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Content: [], + Description: [], + tags: [, (_) => _json(_), `Tags`], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -586,10 +593,12 @@ export const se_GetDiscoveredSchemaCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/discover"; let body: any; - body = JSON.stringify({ - ...(input.Events != null && { Events: se___listOfGetDiscoveredSchemaVersionItemInput(input.Events, context) }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + Events: (_) => _json(_), + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -838,10 +847,12 @@ export const se_PutResourcePolicyCommand = async ( registryName: [, input.RegistryName!], }); let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: __LazyJsonString.fromObject(input.Policy) }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - }); + body = JSON.stringify( + take(input, { + Policy: (_) => __LazyJsonString.fromObject(_), + RevisionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -968,9 +979,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { tags: se_Tags(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: [, (_) => _json(_), `Tags`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1034,10 +1047,12 @@ export const se_UpdateDiscovererCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CrossAccount != null && { CrossAccount: input.CrossAccount }), - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + CrossAccount: [], + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1071,9 +1086,11 @@ export const se_UpdateRegistryCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - }); + body = JSON.stringify( + take(input, { + Description: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1109,12 +1126,14 @@ export const se_UpdateSchemaCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "SchemaName", () => input.SchemaName!, "{SchemaName}", false); let body: any; - body = JSON.stringify({ - ClientTokenId: input.ClientTokenId ?? generateIdempotencyToken(), - ...(input.Content != null && { Content: input.Content }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + ClientTokenId: (_) => _ ?? generateIdempotencyToken(), + Content: [], + Description: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1140,27 +1159,16 @@ export const de_CreateDiscovererCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossAccount != null) { - contents.CrossAccount = __expectBoolean(data.CrossAccount); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DiscovererArn != null) { - contents.DiscovererArn = __expectString(data.DiscovererArn); - } - if (data.DiscovererId != null) { - contents.DiscovererId = __expectString(data.DiscovererId); - } - if (data.SourceArn != null) { - contents.SourceArn = __expectString(data.SourceArn); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + CrossAccount: __expectBoolean, + Description: __expectString, + DiscovererArn: __expectString, + DiscovererId: __expectString, + SourceArn: __expectString, + State: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1197,10 +1205,9 @@ const de_CreateDiscovererCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1220,18 +1227,13 @@ export const de_CreateRegistryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.RegistryArn != null) { - contents.RegistryArn = __expectString(data.RegistryArn); - } - if (data.RegistryName != null) { - contents.RegistryName = __expectString(data.RegistryName); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Description: __expectString, + RegistryArn: __expectString, + RegistryName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1268,10 +1270,9 @@ const de_CreateRegistryCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1291,30 +1292,17 @@ export const de_CreateSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastModified)); - } - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } - if (data.SchemaName != null) { - contents.SchemaName = __expectString(data.SchemaName); - } - if (data.SchemaVersion != null) { - contents.SchemaVersion = __expectString(data.SchemaVersion); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.VersionCreatedDate != null) { - contents.VersionCreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.VersionCreatedDate)); - } + const doc = take(data, { + Description: __expectString, + LastModified: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaArn: __expectString, + SchemaName: __expectString, + SchemaVersion: __expectString, + Tags: [, _json, `tags`], + Type: __expectString, + VersionCreatedDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1345,10 +1333,9 @@ const de_CreateSchemaCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1404,10 +1391,9 @@ const de_DeleteDiscovererCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1463,10 +1449,9 @@ const de_DeleteRegistryCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1522,10 +1507,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1581,10 +1565,9 @@ const de_DeleteSchemaCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1640,10 +1623,9 @@ const de_DeleteSchemaVersionCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1663,18 +1645,13 @@ export const de_DescribeCodeBindingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationDate)); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastModified)); - } - if (data.SchemaVersion != null) { - contents.SchemaVersion = __expectString(data.SchemaVersion); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastModified: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaVersion: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1711,10 +1688,9 @@ const de_DescribeCodeBindingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1734,27 +1710,16 @@ export const de_DescribeDiscovererCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossAccount != null) { - contents.CrossAccount = __expectBoolean(data.CrossAccount); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DiscovererArn != null) { - contents.DiscovererArn = __expectString(data.DiscovererArn); - } - if (data.DiscovererId != null) { - contents.DiscovererId = __expectString(data.DiscovererId); - } - if (data.SourceArn != null) { - contents.SourceArn = __expectString(data.SourceArn); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + CrossAccount: __expectBoolean, + Description: __expectString, + DiscovererArn: __expectString, + DiscovererId: __expectString, + SourceArn: __expectString, + State: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1791,10 +1756,9 @@ const de_DescribeDiscovererCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1814,18 +1778,13 @@ export const de_DescribeRegistryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.RegistryArn != null) { - contents.RegistryArn = __expectString(data.RegistryArn); - } - if (data.RegistryName != null) { - contents.RegistryName = __expectString(data.RegistryName); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Description: __expectString, + RegistryArn: __expectString, + RegistryName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -1862,10 +1821,9 @@ const de_DescribeRegistryCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1885,33 +1843,18 @@ export const de_DescribeSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Content != null) { - contents.Content = __expectString(data.Content); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastModified)); - } - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } - if (data.SchemaName != null) { - contents.SchemaName = __expectString(data.SchemaName); - } - if (data.SchemaVersion != null) { - contents.SchemaVersion = __expectString(data.SchemaVersion); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.VersionCreatedDate != null) { - contents.VersionCreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.VersionCreatedDate)); - } + const doc = take(data, { + Content: __expectString, + Description: __expectString, + LastModified: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaArn: __expectString, + SchemaName: __expectString, + SchemaVersion: __expectString, + Tags: [, _json, `tags`], + Type: __expectString, + VersionCreatedDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -1948,10 +1891,9 @@ const de_DescribeSchemaCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1971,21 +1913,14 @@ export const de_ExportSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Content != null) { - contents.Content = __expectString(data.Content); - } - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } - if (data.SchemaName != null) { - contents.SchemaName = __expectString(data.SchemaName); - } - if (data.SchemaVersion != null) { - contents.SchemaVersion = __expectString(data.SchemaVersion); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } + const doc = take(data, { + Content: __expectString, + SchemaArn: __expectString, + SchemaName: __expectString, + SchemaVersion: __expectString, + Type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2025,10 +1960,9 @@ const de_ExportSchemaCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2085,10 +2019,9 @@ const de_GetCodeBindingSourceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2108,9 +2041,10 @@ export const de_GetDiscoveredSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Content != null) { - contents.Content = __expectString(data.Content); - } + const doc = take(data, { + Content: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2144,10 +2078,9 @@ const de_GetDiscoveredSchemaCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2167,12 +2100,11 @@ export const de_GetResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = new __LazyJsonString(data.Policy); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } + const doc = take(data, { + Policy: (_) => new __LazyJsonString(_), + RevisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2209,10 +2141,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2232,12 +2163,11 @@ export const de_ListDiscoverersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Discoverers != null) { - contents.Discoverers = de___listOfDiscovererSummary(data.Discoverers, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Discoverers: (_) => de___listOfDiscovererSummary(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2271,10 +2201,9 @@ const de_ListDiscoverersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2294,12 +2223,11 @@ export const de_ListRegistriesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Registries != null) { - contents.Registries = de___listOfRegistrySummary(data.Registries, context); - } + const doc = take(data, { + NextToken: __expectString, + Registries: (_) => de___listOfRegistrySummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2333,10 +2261,9 @@ const de_ListRegistriesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2356,12 +2283,11 @@ export const de_ListSchemasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Schemas != null) { - contents.Schemas = de___listOfSchemaSummary(data.Schemas, context); - } + const doc = take(data, { + NextToken: __expectString, + Schemas: (_) => de___listOfSchemaSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2395,10 +2321,9 @@ const de_ListSchemasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2418,12 +2343,11 @@ export const de_ListSchemaVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SchemaVersions != null) { - contents.SchemaVersions = de___listOfSchemaVersionSummary(data.SchemaVersions, context); - } + const doc = take(data, { + NextToken: __expectString, + SchemaVersions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2460,10 +2384,9 @@ const de_ListSchemaVersionsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2483,9 +2406,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -2516,10 +2440,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2539,18 +2462,13 @@ export const de_PutCodeBindingCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CreationDate != null) { - contents.CreationDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.CreationDate)); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastModified)); - } - if (data.SchemaVersion != null) { - contents.SchemaVersion = __expectString(data.SchemaVersion); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + CreationDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + LastModified: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaVersion: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2590,10 +2508,9 @@ const de_PutCodeBindingCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2613,12 +2530,11 @@ export const de_PutResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = new __LazyJsonString(data.Policy); - } - if (data.RevisionId != null) { - contents.RevisionId = __expectString(data.RevisionId); - } + const doc = take(data, { + Policy: (_) => new __LazyJsonString(_), + RevisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2658,10 +2574,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2681,12 +2596,11 @@ export const de_SearchSchemasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Schemas != null) { - contents.Schemas = de___listOfSearchSchemaSummary(data.Schemas, context); - } + const doc = take(data, { + NextToken: __expectString, + Schemas: (_) => de___listOfSearchSchemaSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2720,10 +2634,9 @@ const de_SearchSchemasCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2743,12 +2656,11 @@ export const de_StartDiscovererCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DiscovererId != null) { - contents.DiscovererId = __expectString(data.DiscovererId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + DiscovererId: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2785,10 +2697,9 @@ const de_StartDiscovererCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2808,12 +2719,11 @@ export const de_StopDiscovererCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DiscovererId != null) { - contents.DiscovererId = __expectString(data.DiscovererId); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } + const doc = take(data, { + DiscovererId: __expectString, + State: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2850,10 +2760,9 @@ const de_StopDiscovererCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2903,10 +2812,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2956,10 +2864,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2979,27 +2886,16 @@ export const de_UpdateDiscovererCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CrossAccount != null) { - contents.CrossAccount = __expectBoolean(data.CrossAccount); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.DiscovererArn != null) { - contents.DiscovererArn = __expectString(data.DiscovererArn); - } - if (data.DiscovererId != null) { - contents.DiscovererId = __expectString(data.DiscovererId); - } - if (data.SourceArn != null) { - contents.SourceArn = __expectString(data.SourceArn); - } - if (data.State != null) { - contents.State = __expectString(data.State); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + CrossAccount: __expectBoolean, + Description: __expectString, + DiscovererArn: __expectString, + DiscovererId: __expectString, + SourceArn: __expectString, + State: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3036,10 +2932,9 @@ const de_UpdateDiscovererCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3059,18 +2954,13 @@ export const de_UpdateRegistryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.RegistryArn != null) { - contents.RegistryArn = __expectString(data.RegistryArn); - } - if (data.RegistryName != null) { - contents.RegistryName = __expectString(data.RegistryName); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } + const doc = take(data, { + Description: __expectString, + RegistryArn: __expectString, + RegistryName: __expectString, + Tags: [, _json, `tags`], + }); + Object.assign(contents, doc); return contents; }; @@ -3107,10 +2997,9 @@ const de_UpdateRegistryCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3130,30 +3019,17 @@ export const de_UpdateSchemaCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastModified != null) { - contents.LastModified = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.LastModified)); - } - if (data.SchemaArn != null) { - contents.SchemaArn = __expectString(data.SchemaArn); - } - if (data.SchemaName != null) { - contents.SchemaName = __expectString(data.SchemaName); - } - if (data.SchemaVersion != null) { - contents.SchemaVersion = __expectString(data.SchemaVersion); - } - if (data.tags != null) { - contents.Tags = de_Tags(data.tags, context); - } - if (data.Type != null) { - contents.Type = __expectString(data.Type); - } - if (data.VersionCreatedDate != null) { - contents.VersionCreatedDate = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.VersionCreatedDate)); - } + const doc = take(data, { + Description: __expectString, + LastModified: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaArn: __expectString, + SchemaName: __expectString, + SchemaVersion: __expectString, + Tags: [, _json, `tags`], + Type: __expectString, + VersionCreatedDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3187,28 +3063,26 @@ const de_UpdateSchemaCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3222,12 +3096,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3241,12 +3114,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3260,12 +3132,11 @@ const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeConte const de_GoneExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new GoneException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3282,12 +3153,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3301,12 +3171,11 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3323,12 +3192,11 @@ const de_PreconditionFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new PreconditionFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3345,12 +3213,11 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3367,12 +3234,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3389,12 +3255,11 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3402,29 +3267,9 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOfGetDiscoveredSchemaVersionItemInput - */ -const se___listOfGetDiscoveredSchemaVersionItemInput = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOfGetDiscoveredSchemaVersionItemInput omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. /** * deserializeAws_restJson1__listOfDiscovererSummary @@ -3433,9 +3278,6 @@ const de___listOfDiscovererSummary = (output: any, context: __SerdeContext): Dis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DiscovererSummary(entry, context); }); return retVal; @@ -3448,9 +3290,6 @@ const de___listOfRegistrySummary = (output: any, context: __SerdeContext): Regis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RegistrySummary(entry, context); }); return retVal; @@ -3463,28 +3302,12 @@ const de___listOfSchemaSummary = (output: any, context: __SerdeContext): SchemaS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SchemaSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfSchemaVersionSummary - */ -const de___listOfSchemaVersionSummary = (output: any, context: __SerdeContext): SchemaVersionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SchemaVersionSummary(entry, context); - }); - return retVal; -}; +// de___listOfSchemaVersionSummary omitted. /** * deserializeAws_restJson1__listOfSearchSchemaSummary @@ -3493,9 +3316,6 @@ const de___listOfSearchSchemaSummary = (output: any, context: __SerdeContext): S const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SearchSchemaSummary(entry, context); }); return retVal; @@ -3508,9 +3328,6 @@ const de___listOfSearchSchemaVersionSummary = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SearchSchemaVersionSummary(entry, context); }); return retVal; @@ -3520,90 +3337,66 @@ const de___listOfSearchSchemaVersionSummary = (output: any, context: __SerdeCont * deserializeAws_restJson1DiscovererSummary */ const de_DiscovererSummary = (output: any, context: __SerdeContext): DiscovererSummary => { - return { - CrossAccount: __expectBoolean(output.CrossAccount), - DiscovererArn: __expectString(output.DiscovererArn), - DiscovererId: __expectString(output.DiscovererId), - SourceArn: __expectString(output.SourceArn), - State: __expectString(output.State), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + CrossAccount: __expectBoolean, + DiscovererArn: __expectString, + DiscovererId: __expectString, + SourceArn: __expectString, + State: __expectString, + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1RegistrySummary */ const de_RegistrySummary = (output: any, context: __SerdeContext): RegistrySummary => { - return { - RegistryArn: __expectString(output.RegistryArn), - RegistryName: __expectString(output.RegistryName), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + RegistryArn: __expectString, + RegistryName: __expectString, + Tags: [, _json, `tags`], + }) as any; }; /** * deserializeAws_restJson1SchemaSummary */ const de_SchemaSummary = (output: any, context: __SerdeContext): SchemaSummary => { - return { - LastModified: - output.LastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.LastModified)) : undefined, - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - Tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - VersionCount: __expectLong(output.VersionCount), - } as any; + return take(output, { + LastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaArn: __expectString, + SchemaName: __expectString, + Tags: [, _json, `tags`], + VersionCount: __expectLong, + }) as any; }; -/** - * deserializeAws_restJson1SchemaVersionSummary - */ -const de_SchemaVersionSummary = (output: any, context: __SerdeContext): SchemaVersionSummary => { - return { - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - SchemaVersion: __expectString(output.SchemaVersion), - Type: __expectString(output.Type), - } as any; -}; +// de_SchemaVersionSummary omitted. /** * deserializeAws_restJson1SearchSchemaSummary */ const de_SearchSchemaSummary = (output: any, context: __SerdeContext): SearchSchemaSummary => { - return { - RegistryName: __expectString(output.RegistryName), - SchemaArn: __expectString(output.SchemaArn), - SchemaName: __expectString(output.SchemaName), - SchemaVersions: - output.SchemaVersions != null ? de___listOfSearchSchemaVersionSummary(output.SchemaVersions, context) : undefined, - } as any; + return take(output, { + RegistryName: __expectString, + SchemaArn: __expectString, + SchemaName: __expectString, + SchemaVersions: (_: any) => de___listOfSearchSchemaVersionSummary(_, context), + }) as any; }; /** * deserializeAws_restJson1SearchSchemaVersionSummary */ const de_SearchSchemaVersionSummary = (output: any, context: __SerdeContext): SearchSchemaVersionSummary => { - return { - CreatedDate: - output.CreatedDate != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.CreatedDate)) : undefined, - SchemaVersion: __expectString(output.SchemaVersion), - Type: __expectString(output.Type), - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + SchemaVersion: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts b/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts index 9091679feba8..b903b83608e5 100644 --- a/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts +++ b/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -63,12 +64,10 @@ import { } from "../commands/ValidateResourcePolicyCommand"; import { CancelRotateSecretRequest, - CancelRotateSecretResponse, CreateSecretRequest, CreateSecretResponse, DecryptionFailure, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DeleteSecretRequest, DeleteSecretResponse, DescribeSecretRequest, @@ -76,9 +75,7 @@ import { EncryptionFailure, Filter, GetRandomPasswordRequest, - GetRandomPasswordResponse, GetResourcePolicyRequest, - GetResourcePolicyResponse, GetSecretValueRequest, GetSecretValueResponse, InternalServiceError, @@ -94,9 +91,7 @@ import { PreconditionNotMetException, PublicPolicyException, PutResourcePolicyRequest, - PutResourcePolicyResponse, PutSecretValueRequest, - PutSecretValueResponse, RemoveRegionsFromReplicationRequest, RemoveRegionsFromReplicationResponse, ReplicaRegionType, @@ -106,24 +101,17 @@ import { ResourceExistsException, ResourceNotFoundException, RestoreSecretRequest, - RestoreSecretResponse, RotateSecretRequest, - RotateSecretResponse, RotationRulesType, SecretListEntry, SecretVersionsListEntry, StopReplicationToReplicaRequest, - StopReplicationToReplicaResponse, Tag, TagResourceRequest, UntagResourceRequest, UpdateSecretRequest, - UpdateSecretResponse, UpdateSecretVersionStageRequest, - UpdateSecretVersionStageResponse, ValidateResourcePolicyRequest, - ValidateResourcePolicyResponse, - ValidationErrorsEntry, } from "../models/models_0"; import { SecretsManagerServiceException as __BaseException } from "../models/SecretsManagerServiceException"; @@ -136,7 +124,7 @@ export const se_CancelRotateSecretCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelRotateSecret"); let body: any; - body = JSON.stringify(se_CancelRotateSecretRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -162,7 +150,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -175,7 +163,7 @@ export const se_DeleteSecretCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSecret"); let body: any; - body = JSON.stringify(se_DeleteSecretRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -188,7 +176,7 @@ export const se_DescribeSecretCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSecret"); let body: any; - body = JSON.stringify(se_DescribeSecretRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -201,7 +189,7 @@ export const se_GetRandomPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRandomPassword"); let body: any; - body = JSON.stringify(se_GetRandomPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -214,7 +202,7 @@ export const se_GetResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); let body: any; - body = JSON.stringify(se_GetResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -227,7 +215,7 @@ export const se_GetSecretValueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSecretValue"); let body: any; - body = JSON.stringify(se_GetSecretValueRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -240,7 +228,7 @@ export const se_ListSecretsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSecrets"); let body: any; - body = JSON.stringify(se_ListSecretsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -253,7 +241,7 @@ export const se_ListSecretVersionIdsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSecretVersionIds"); let body: any; - body = JSON.stringify(se_ListSecretVersionIdsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -266,7 +254,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -292,7 +280,7 @@ export const se_RemoveRegionsFromReplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveRegionsFromReplication"); let body: any; - body = JSON.stringify(se_RemoveRegionsFromReplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -305,7 +293,7 @@ export const se_ReplicateSecretToRegionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReplicateSecretToRegions"); let body: any; - body = JSON.stringify(se_ReplicateSecretToRegionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -318,7 +306,7 @@ export const se_RestoreSecretCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreSecret"); let body: any; - body = JSON.stringify(se_RestoreSecretRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -344,7 +332,7 @@ export const se_StopReplicationToReplicaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopReplicationToReplica"); let body: any; - body = JSON.stringify(se_StopReplicationToReplicaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -357,7 +345,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,7 +358,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -396,7 +384,7 @@ export const se_UpdateSecretVersionStageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSecretVersionStage"); let body: any; - body = JSON.stringify(se_UpdateSecretVersionStageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -409,7 +397,7 @@ export const se_ValidateResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ValidateResourcePolicy"); let body: any; - body = JSON.stringify(se_ValidateResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,12 +413,12 @@ export const de_CancelRotateSecretCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelRotateSecretResponse(data, context); + contents = _json(data); const response: CancelRotateSecretCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -460,10 +448,9 @@ const de_CancelRotateSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -486,7 +473,7 @@ export const de_CreateSecretCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -534,10 +521,9 @@ const de_CreateSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -555,12 +541,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -590,10 +576,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -616,7 +601,7 @@ export const de_DeleteSecretCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -646,10 +631,9 @@ const de_DeleteSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -672,7 +656,7 @@ export const de_DescribeSecretCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -699,10 +683,9 @@ const de_DescribeSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -720,12 +703,12 @@ export const de_GetRandomPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRandomPasswordResponse(data, context); + contents = _json(data); const response: GetRandomPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -752,10 +735,9 @@ const de_GetRandomPasswordCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -773,12 +755,12 @@ export const de_GetResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcePolicyResponse(data, context); + contents = _json(data); const response: GetResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -808,10 +790,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -834,7 +815,7 @@ export const de_GetSecretValueCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -867,10 +848,9 @@ const de_GetSecretValueCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -893,7 +873,7 @@ export const de_ListSecretsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -920,10 +900,9 @@ const de_ListSecretsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -946,7 +925,7 @@ export const de_ListSecretVersionIdsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -976,10 +955,9 @@ const de_ListSecretVersionIdsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -997,12 +975,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1038,10 +1016,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1059,12 +1036,12 @@ export const de_PutSecretValueCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutSecretValueResponse(data, context); + contents = _json(data); const response: PutSecretValueCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1106,10 +1083,9 @@ const de_PutSecretValueCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1132,7 +1108,7 @@ export const de_RemoveRegionsFromReplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1162,10 +1138,9 @@ const de_RemoveRegionsFromReplicationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1188,7 +1163,7 @@ export const de_ReplicateSecretToRegionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1218,10 +1193,9 @@ const de_ReplicateSecretToRegionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1239,12 +1213,12 @@ export const de_RestoreSecretCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RestoreSecretResponse(data, context); + contents = _json(data); const response: RestoreSecretCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1274,10 +1248,9 @@ const de_RestoreSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1295,12 +1268,12 @@ export const de_RotateSecretCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RotateSecretResponse(data, context); + contents = _json(data); const response: RotateSecretCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1330,10 +1303,9 @@ const de_RotateSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1351,12 +1323,12 @@ export const de_StopReplicationToReplicaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopReplicationToReplicaResponse(data, context); + contents = _json(data); const response: StopReplicationToReplicaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1386,10 +1358,9 @@ const de_StopReplicationToReplicaCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1409,7 +1380,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1439,10 +1410,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1462,7 +1432,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1492,10 +1462,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1513,12 +1482,12 @@ export const de_UpdateSecretCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSecretResponse(data, context); + contents = _json(data); const response: UpdateSecretCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1566,10 +1535,9 @@ const de_UpdateSecretCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1587,12 +1555,12 @@ export const de_UpdateSecretVersionStageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSecretVersionStageResponse(data, context); + contents = _json(data); const response: UpdateSecretVersionStageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1625,10 +1593,9 @@ const de_UpdateSecretVersionStageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1646,12 +1613,12 @@ export const de_ValidateResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ValidateResourcePolicyResponse(data, context); + contents = _json(data); const response: ValidateResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1684,10 +1651,9 @@ const de_ValidateResourcePolicyCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1698,7 +1664,7 @@ const de_ValidateResourcePolicyCommandError = async ( */ const de_DecryptionFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DecryptionFailure(body, context); + const deserialized: any = _json(body); const exception = new DecryptionFailure({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1711,7 +1677,7 @@ const de_DecryptionFailureRes = async (parsedOutput: any, context: __SerdeContex */ const de_EncryptionFailureRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EncryptionFailure(body, context); + const deserialized: any = _json(body); const exception = new EncryptionFailure({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1727,7 +1693,7 @@ const de_InternalServiceErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceError(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1743,7 +1709,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1759,7 +1725,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1775,7 +1741,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1791,7 +1757,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1807,7 +1773,7 @@ const de_MalformedPolicyDocumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MalformedPolicyDocumentException(body, context); + const deserialized: any = _json(body); const exception = new MalformedPolicyDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1823,7 +1789,7 @@ const de_PreconditionNotMetExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PreconditionNotMetException(body, context); + const deserialized: any = _json(body); const exception = new PreconditionNotMetException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1839,7 +1805,7 @@ const de_PublicPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PublicPolicyException(body, context); + const deserialized: any = _json(body); const exception = new PublicPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1855,7 +1821,7 @@ const de_ResourceExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1871,7 +1837,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1879,670 +1845,240 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddReplicaRegionListType - */ -const se_AddReplicaRegionListType = (input: ReplicaRegionType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ReplicaRegionType(entry, context); - }); -}; +// se_AddReplicaRegionListType omitted. -/** - * serializeAws_json1_1CancelRotateSecretRequest - */ -const se_CancelRotateSecretRequest = (input: CancelRotateSecretRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_CancelRotateSecretRequest omitted. /** * serializeAws_json1_1CreateSecretRequest */ const se_CreateSecretRequest = (input: CreateSecretRequest, context: __SerdeContext): any => { - return { - ...(input.AddReplicaRegions != null && { - AddReplicaRegions: se_AddReplicaRegionListType(input.AddReplicaRegions, context), - }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.ForceOverwriteReplicaSecret != null && { - ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret, - }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SecretBinary != null && { SecretBinary: context.base64Encoder(input.SecretBinary) }), - ...(input.SecretString != null && { SecretString: input.SecretString }), - ...(input.Tags != null && { Tags: se_TagListType(input.Tags, context) }), - }; + return take(input, { + AddReplicaRegions: _json, + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + ForceOverwriteReplicaSecret: [], + KmsKeyId: [], + Name: [], + SecretBinary: context.base64Encoder, + SecretString: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * serializeAws_json1_1DeleteSecretRequest - */ -const se_DeleteSecretRequest = (input: DeleteSecretRequest, context: __SerdeContext): any => { - return { - ...(input.ForceDeleteWithoutRecovery != null && { ForceDeleteWithoutRecovery: input.ForceDeleteWithoutRecovery }), - ...(input.RecoveryWindowInDays != null && { RecoveryWindowInDays: input.RecoveryWindowInDays }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_DeleteSecretRequest omitted. -/** - * serializeAws_json1_1DescribeSecretRequest - */ -const se_DescribeSecretRequest = (input: DescribeSecretRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_DescribeSecretRequest omitted. -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_FilterValuesStringList(input.Values, context) }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_json1_1FiltersListType - */ -const se_FiltersListType = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FiltersListType omitted. -/** - * serializeAws_json1_1FilterValuesStringList - */ -const se_FilterValuesStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValuesStringList omitted. -/** - * serializeAws_json1_1GetRandomPasswordRequest - */ -const se_GetRandomPasswordRequest = (input: GetRandomPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.ExcludeCharacters != null && { ExcludeCharacters: input.ExcludeCharacters }), - ...(input.ExcludeLowercase != null && { ExcludeLowercase: input.ExcludeLowercase }), - ...(input.ExcludeNumbers != null && { ExcludeNumbers: input.ExcludeNumbers }), - ...(input.ExcludePunctuation != null && { ExcludePunctuation: input.ExcludePunctuation }), - ...(input.ExcludeUppercase != null && { ExcludeUppercase: input.ExcludeUppercase }), - ...(input.IncludeSpace != null && { IncludeSpace: input.IncludeSpace }), - ...(input.PasswordLength != null && { PasswordLength: input.PasswordLength }), - ...(input.RequireEachIncludedType != null && { RequireEachIncludedType: input.RequireEachIncludedType }), - }; -}; +// se_GetRandomPasswordRequest omitted. -/** - * serializeAws_json1_1GetResourcePolicyRequest - */ -const se_GetResourcePolicyRequest = (input: GetResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_GetResourcePolicyRequest omitted. -/** - * serializeAws_json1_1GetSecretValueRequest - */ -const se_GetSecretValueRequest = (input: GetSecretValueRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - ...(input.VersionStage != null && { VersionStage: input.VersionStage }), - }; -}; +// se_GetSecretValueRequest omitted. -/** - * serializeAws_json1_1ListSecretsRequest - */ -const se_ListSecretsRequest = (input: ListSecretsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_FiltersListType(input.Filters, context) }), - ...(input.IncludePlannedDeletion != null && { IncludePlannedDeletion: input.IncludePlannedDeletion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; +// se_ListSecretsRequest omitted. -/** - * serializeAws_json1_1ListSecretVersionIdsRequest - */ -const se_ListSecretVersionIdsRequest = (input: ListSecretVersionIdsRequest, context: __SerdeContext): any => { - return { - ...(input.IncludeDeprecated != null && { IncludeDeprecated: input.IncludeDeprecated }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_ListSecretVersionIdsRequest omitted. -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.BlockPublicPolicy != null && { BlockPublicPolicy: input.BlockPublicPolicy }), - ...(input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_PutResourcePolicyRequest omitted. /** * serializeAws_json1_1PutSecretValueRequest */ const se_PutSecretValueRequest = (input: PutSecretValueRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.SecretBinary != null && { SecretBinary: context.base64Encoder(input.SecretBinary) }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - ...(input.SecretString != null && { SecretString: input.SecretString }), - ...(input.VersionStages != null && { VersionStages: se_SecretVersionStagesType(input.VersionStages, context) }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + VersionStages: _json, + }); }; -/** - * serializeAws_json1_1RemoveRegionsFromReplicationRequest - */ -const se_RemoveRegionsFromReplicationRequest = ( - input: RemoveRegionsFromReplicationRequest, - context: __SerdeContext -): any => { - return { - ...(input.RemoveReplicaRegions != null && { - RemoveReplicaRegions: se_RemoveReplicaRegionListType(input.RemoveReplicaRegions, context), - }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_RemoveRegionsFromReplicationRequest omitted. -/** - * serializeAws_json1_1RemoveReplicaRegionListType - */ -const se_RemoveReplicaRegionListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RemoveReplicaRegionListType omitted. -/** - * serializeAws_json1_1ReplicaRegionType - */ -const se_ReplicaRegionType = (input: ReplicaRegionType, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Region != null && { Region: input.Region }), - }; -}; +// se_ReplicaRegionType omitted. -/** - * serializeAws_json1_1ReplicateSecretToRegionsRequest - */ -const se_ReplicateSecretToRegionsRequest = (input: ReplicateSecretToRegionsRequest, context: __SerdeContext): any => { - return { - ...(input.AddReplicaRegions != null && { - AddReplicaRegions: se_AddReplicaRegionListType(input.AddReplicaRegions, context), - }), - ...(input.ForceOverwriteReplicaSecret != null && { - ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret, - }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_ReplicateSecretToRegionsRequest omitted. -/** - * serializeAws_json1_1RestoreSecretRequest - */ -const se_RestoreSecretRequest = (input: RestoreSecretRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_RestoreSecretRequest omitted. /** * serializeAws_json1_1RotateSecretRequest */ const se_RotateSecretRequest = (input: RotateSecretRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.RotateImmediately != null && { RotateImmediately: input.RotateImmediately }), - ...(input.RotationLambdaARN != null && { RotationLambdaARN: input.RotationLambdaARN }), - ...(input.RotationRules != null && { RotationRules: se_RotationRulesType(input.RotationRules, context) }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + RotateImmediately: [], + RotationLambdaARN: [], + RotationRules: _json, + SecretId: [], + }); }; -/** - * serializeAws_json1_1RotationRulesType - */ -const se_RotationRulesType = (input: RotationRulesType, context: __SerdeContext): any => { - return { - ...(input.AutomaticallyAfterDays != null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays }), - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - }; -}; +// se_RotationRulesType omitted. -/** - * serializeAws_json1_1SecretVersionStagesType - */ -const se_SecretVersionStagesType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecretVersionStagesType omitted. -/** - * serializeAws_json1_1StopReplicationToReplicaRequest - */ -const se_StopReplicationToReplicaRequest = (input: StopReplicationToReplicaRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_StopReplicationToReplicaRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyListType - */ -const se_TagKeyListType = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyListType omitted. -/** - * serializeAws_json1_1TagListType - */ -const se_TagListType = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagListType omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - ...(input.Tags != null && { Tags: se_TagListType(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.SecretId != null && { SecretId: input.SecretId }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyListType(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. /** * serializeAws_json1_1UpdateSecretRequest */ const se_UpdateSecretRequest = (input: UpdateSecretRequest, context: __SerdeContext): any => { - return { - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.SecretBinary != null && { SecretBinary: context.base64Encoder(input.SecretBinary) }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - ...(input.SecretString != null && { SecretString: input.SecretString }), - }; + return take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + KmsKeyId: [], + SecretBinary: context.base64Encoder, + SecretId: [], + SecretString: [], + }); }; -/** - * serializeAws_json1_1UpdateSecretVersionStageRequest - */ -const se_UpdateSecretVersionStageRequest = (input: UpdateSecretVersionStageRequest, context: __SerdeContext): any => { - return { - ...(input.MoveToVersionId != null && { MoveToVersionId: input.MoveToVersionId }), - ...(input.RemoveFromVersionId != null && { RemoveFromVersionId: input.RemoveFromVersionId }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - ...(input.VersionStage != null && { VersionStage: input.VersionStage }), - }; -}; +// se_UpdateSecretVersionStageRequest omitted. -/** - * serializeAws_json1_1ValidateResourcePolicyRequest - */ -const se_ValidateResourcePolicyRequest = (input: ValidateResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_ValidateResourcePolicyRequest omitted. -/** - * deserializeAws_json1_1CancelRotateSecretResponse - */ -const de_CancelRotateSecretResponse = (output: any, context: __SerdeContext): CancelRotateSecretResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_CancelRotateSecretResponse omitted. /** * deserializeAws_json1_1CreateSecretResponse */ const de_CreateSecretResponse = (output: any, context: __SerdeContext): CreateSecretResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - ReplicationStatus: - output.ReplicationStatus != null ? de_ReplicationStatusListType(output.ReplicationStatus, context) : undefined, - VersionId: __expectString(output.VersionId), - } as any; + return take(output, { + ARN: __expectString, + Name: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + VersionId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DecryptionFailure - */ -const de_DecryptionFailure = (output: any, context: __SerdeContext): DecryptionFailure => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DecryptionFailure omitted. -/** - * deserializeAws_json1_1DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - } as any; -}; +// de_DeleteResourcePolicyResponse omitted. /** * deserializeAws_json1_1DeleteSecretResponse */ const de_DeleteSecretResponse = (output: any, context: __SerdeContext): DeleteSecretResponse => { - return { - ARN: __expectString(output.ARN), - DeletionDate: - output.DeletionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletionDate))) - : undefined, - Name: __expectString(output.Name), - } as any; + return take(output, { + ARN: __expectString, + DeletionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeSecretResponse */ const de_DescribeSecretResponse = (output: any, context: __SerdeContext): DescribeSecretResponse => { - return { - ARN: __expectString(output.ARN), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DeletedDate: - output.DeletedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedDate))) - : undefined, - Description: __expectString(output.Description), - KmsKeyId: __expectString(output.KmsKeyId), - LastAccessedDate: - output.LastAccessedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate))) - : undefined, - LastChangedDate: - output.LastChangedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastChangedDate))) - : undefined, - LastRotatedDate: - output.LastRotatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRotatedDate))) - : undefined, - Name: __expectString(output.Name), - NextRotationDate: - output.NextRotationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextRotationDate))) - : undefined, - OwningService: __expectString(output.OwningService), - PrimaryRegion: __expectString(output.PrimaryRegion), - ReplicationStatus: - output.ReplicationStatus != null ? de_ReplicationStatusListType(output.ReplicationStatus, context) : undefined, - RotationEnabled: __expectBoolean(output.RotationEnabled), - RotationLambdaARN: __expectString(output.RotationLambdaARN), - RotationRules: output.RotationRules != null ? de_RotationRulesType(output.RotationRules, context) : undefined, - Tags: output.Tags != null ? de_TagListType(output.Tags, context) : undefined, - VersionIdsToStages: - output.VersionIdsToStages != null - ? de_SecretVersionsToStagesMapType(output.VersionIdsToStages, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EncryptionFailure - */ -const de_EncryptionFailure = (output: any, context: __SerdeContext): EncryptionFailure => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1GetRandomPasswordResponse - */ -const de_GetRandomPasswordResponse = (output: any, context: __SerdeContext): GetRandomPasswordResponse => { - return { - RandomPassword: __expectString(output.RandomPassword), - } as any; -}; - -/** - * deserializeAws_json1_1GetResourcePolicyResponse - */ -const de_GetResourcePolicyResponse = (output: any, context: __SerdeContext): GetResourcePolicyResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - ResourcePolicy: __expectString(output.ResourcePolicy), - } as any; -}; + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + KmsKeyId: __expectString, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwningService: __expectString, + PrimaryRegion: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + RotationEnabled: __expectBoolean, + RotationLambdaARN: __expectString, + RotationRules: _json, + Tags: _json, + VersionIdsToStages: _json, + }) as any; +}; + +// de_EncryptionFailure omitted. + +// de_GetRandomPasswordResponse omitted. + +// de_GetResourcePolicyResponse omitted. /** * deserializeAws_json1_1GetSecretValueResponse */ const de_GetSecretValueResponse = (output: any, context: __SerdeContext): GetSecretValueResponse => { - return { - ARN: __expectString(output.ARN), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - Name: __expectString(output.Name), - SecretBinary: output.SecretBinary != null ? context.base64Decoder(output.SecretBinary) : undefined, - SecretString: __expectString(output.SecretString), - VersionId: __expectString(output.VersionId), - VersionStages: output.VersionStages != null ? de_SecretVersionStagesType(output.VersionStages, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + SecretBinary: context.base64Decoder, + SecretString: __expectString, + VersionId: __expectString, + VersionStages: _json, + }) as any; }; -/** - * deserializeAws_json1_1InternalServiceError - */ -const de_InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServiceError omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1KmsKeyIdListType - */ -const de_KmsKeyIdListType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_KmsKeyIdListType omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListSecretsResponse */ const de_ListSecretsResponse = (output: any, context: __SerdeContext): ListSecretsResponse => { - return { - NextToken: __expectString(output.NextToken), - SecretList: output.SecretList != null ? de_SecretListType(output.SecretList, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SecretList: (_: any) => de_SecretListType(_, context), + }) as any; }; /** * deserializeAws_json1_1ListSecretVersionIdsResponse */ const de_ListSecretVersionIdsResponse = (output: any, context: __SerdeContext): ListSecretVersionIdsResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - NextToken: __expectString(output.NextToken), - Versions: output.Versions != null ? de_SecretVersionsListType(output.Versions, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + Name: __expectString, + NextToken: __expectString, + Versions: (_: any) => de_SecretVersionsListType(_, context), + }) as any; }; -/** - * deserializeAws_json1_1MalformedPolicyDocumentException - */ -const de_MalformedPolicyDocumentException = ( - output: any, - context: __SerdeContext -): MalformedPolicyDocumentException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MalformedPolicyDocumentException omitted. -/** - * deserializeAws_json1_1PreconditionNotMetException - */ -const de_PreconditionNotMetException = (output: any, context: __SerdeContext): PreconditionNotMetException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PreconditionNotMetException omitted. -/** - * deserializeAws_json1_1PublicPolicyException - */ -const de_PublicPolicyException = (output: any, context: __SerdeContext): PublicPolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_PublicPolicyException omitted. -/** - * deserializeAws_json1_1PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - } as any; -}; +// de_PutResourcePolicyResponse omitted. -/** - * deserializeAws_json1_1PutSecretValueResponse - */ -const de_PutSecretValueResponse = (output: any, context: __SerdeContext): PutSecretValueResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - VersionId: __expectString(output.VersionId), - VersionStages: output.VersionStages != null ? de_SecretVersionStagesType(output.VersionStages, context) : undefined, - } as any; -}; +// de_PutSecretValueResponse omitted. /** * deserializeAws_json1_1RemoveRegionsFromReplicationResponse @@ -2551,11 +2087,10 @@ const de_RemoveRegionsFromReplicationResponse = ( output: any, context: __SerdeContext ): RemoveRegionsFromReplicationResponse => { - return { - ARN: __expectString(output.ARN), - ReplicationStatus: - output.ReplicationStatus != null ? de_ReplicationStatusListType(output.ReplicationStatus, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + }) as any; }; /** @@ -2565,11 +2100,10 @@ const de_ReplicateSecretToRegionsResponse = ( output: any, context: __SerdeContext ): ReplicateSecretToRegionsResponse => { - return { - ARN: __expectString(output.ARN), - ReplicationStatus: - output.ReplicationStatus != null ? de_ReplicationStatusListType(output.ReplicationStatus, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + ReplicationStatus: (_: any) => de_ReplicationStatusListType(_, context), + }) as any; }; /** @@ -2579,9 +2113,6 @@ const de_ReplicationStatusListType = (output: any, context: __SerdeContext): Rep const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationStatusType(entry, context); }); return retVal; @@ -2591,112 +2122,48 @@ const de_ReplicationStatusListType = (output: any, context: __SerdeContext): Rep * deserializeAws_json1_1ReplicationStatusType */ const de_ReplicationStatusType = (output: any, context: __SerdeContext): ReplicationStatusType => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - LastAccessedDate: - output.LastAccessedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate))) - : undefined, - Region: __expectString(output.Region), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; + return take(output, { + KmsKeyId: __expectString, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Region: __expectString, + Status: __expectString, + StatusMessage: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceExistsException - */ -const de_ResourceExistsException = (output: any, context: __SerdeContext): ResourceExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceExistsException omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1RestoreSecretResponse - */ -const de_RestoreSecretResponse = (output: any, context: __SerdeContext): RestoreSecretResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - } as any; -}; +// de_RestoreSecretResponse omitted. -/** - * deserializeAws_json1_1RotateSecretResponse - */ -const de_RotateSecretResponse = (output: any, context: __SerdeContext): RotateSecretResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_RotateSecretResponse omitted. -/** - * deserializeAws_json1_1RotationRulesType - */ -const de_RotationRulesType = (output: any, context: __SerdeContext): RotationRulesType => { - return { - AutomaticallyAfterDays: __expectLong(output.AutomaticallyAfterDays), - Duration: __expectString(output.Duration), - ScheduleExpression: __expectString(output.ScheduleExpression), - } as any; -}; +// de_RotationRulesType omitted. /** * deserializeAws_json1_1SecretListEntry */ const de_SecretListEntry = (output: any, context: __SerdeContext): SecretListEntry => { - return { - ARN: __expectString(output.ARN), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DeletedDate: - output.DeletedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletedDate))) - : undefined, - Description: __expectString(output.Description), - KmsKeyId: __expectString(output.KmsKeyId), - LastAccessedDate: - output.LastAccessedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate))) - : undefined, - LastChangedDate: - output.LastChangedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastChangedDate))) - : undefined, - LastRotatedDate: - output.LastRotatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRotatedDate))) - : undefined, - Name: __expectString(output.Name), - NextRotationDate: - output.NextRotationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextRotationDate))) - : undefined, - OwningService: __expectString(output.OwningService), - PrimaryRegion: __expectString(output.PrimaryRegion), - RotationEnabled: __expectBoolean(output.RotationEnabled), - RotationLambdaARN: __expectString(output.RotationLambdaARN), - RotationRules: output.RotationRules != null ? de_RotationRulesType(output.RotationRules, context) : undefined, - SecretVersionsToStages: - output.SecretVersionsToStages != null - ? de_SecretVersionsToStagesMapType(output.SecretVersionsToStages, context) - : undefined, - Tags: output.Tags != null ? de_TagListType(output.Tags, context) : undefined, - } as any; + return take(output, { + ARN: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + KmsKeyId: __expectString, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastChangedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastRotatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextRotationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OwningService: __expectString, + PrimaryRegion: __expectString, + RotationEnabled: __expectBoolean, + RotationLambdaARN: __expectString, + RotationRules: _json, + SecretVersionsToStages: _json, + Tags: _json, + }) as any; }; /** @@ -2706,9 +2173,6 @@ const de_SecretListType = (output: any, context: __SerdeContext): SecretListEntr const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SecretListEntry(entry, context); }); return retVal; @@ -2718,19 +2182,13 @@ const de_SecretListType = (output: any, context: __SerdeContext): SecretListEntr * deserializeAws_json1_1SecretVersionsListEntry */ const de_SecretVersionsListEntry = (output: any, context: __SerdeContext): SecretVersionsListEntry => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - KmsKeyIds: output.KmsKeyIds != null ? de_KmsKeyIdListType(output.KmsKeyIds, context) : undefined, - LastAccessedDate: - output.LastAccessedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedDate))) - : undefined, - VersionId: __expectString(output.VersionId), - VersionStages: output.VersionStages != null ? de_SecretVersionStagesType(output.VersionStages, context) : undefined, - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KmsKeyIds: _json, + LastAccessedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionId: __expectString, + VersionStages: _json, + }) as any; }; /** @@ -2740,138 +2198,30 @@ const de_SecretVersionsListType = (output: any, context: __SerdeContext): Secret const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SecretVersionsListEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SecretVersionStagesType - */ -const de_SecretVersionStagesType = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecretVersionStagesType omitted. -/** - * deserializeAws_json1_1SecretVersionsToStagesMapType - */ -const de_SecretVersionsToStagesMapType = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SecretVersionStagesType(value, context); - return acc; - }, {}); -}; +// de_SecretVersionsToStagesMapType omitted. -/** - * deserializeAws_json1_1StopReplicationToReplicaResponse - */ -const de_StopReplicationToReplicaResponse = ( - output: any, - context: __SerdeContext -): StopReplicationToReplicaResponse => { - return { - ARN: __expectString(output.ARN), - } as any; -}; +// de_StopReplicationToReplicaResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagListType - */ -const de_TagListType = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagListType omitted. -/** - * deserializeAws_json1_1UpdateSecretResponse - */ -const de_UpdateSecretResponse = (output: any, context: __SerdeContext): UpdateSecretResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_UpdateSecretResponse omitted. -/** - * deserializeAws_json1_1UpdateSecretVersionStageResponse - */ -const de_UpdateSecretVersionStageResponse = ( - output: any, - context: __SerdeContext -): UpdateSecretVersionStageResponse => { - return { - ARN: __expectString(output.ARN), - Name: __expectString(output.Name), - } as any; -}; +// de_UpdateSecretVersionStageResponse omitted. -/** - * deserializeAws_json1_1ValidateResourcePolicyResponse - */ -const de_ValidateResourcePolicyResponse = (output: any, context: __SerdeContext): ValidateResourcePolicyResponse => { - return { - PolicyValidationPassed: __expectBoolean(output.PolicyValidationPassed), - ValidationErrors: - output.ValidationErrors != null ? de_ValidationErrorsType(output.ValidationErrors, context) : undefined, - } as any; -}; +// de_ValidateResourcePolicyResponse omitted. -/** - * deserializeAws_json1_1ValidationErrorsEntry - */ -const de_ValidationErrorsEntry = (output: any, context: __SerdeContext): ValidationErrorsEntry => { - return { - CheckName: __expectString(output.CheckName), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; +// de_ValidationErrorsEntry omitted. -/** - * deserializeAws_json1_1ValidationErrorsType - */ -const de_ValidationErrorsType = (output: any, context: __SerdeContext): ValidationErrorsEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationErrorsEntry(entry, context); - }); - return retVal; -}; +// de_ValidationErrorsType omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2893,6 +2243,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-securityhub/src/protocols/Aws_restJson1.ts b/clients/client-securityhub/src/protocols/Aws_restJson1.ts index 9d765153ff1f..6db26b0b9938 100644 --- a/clients/client-securityhub/src/protocols/Aws_restJson1.ts +++ b/clients/client-securityhub/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,11 +11,12 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -193,9 +195,7 @@ import { ActionLocalPortDetails, ActionRemoteIpDetails, ActionRemotePortDetails, - ActionTarget, Adjustment, - AdminAccount, AssociatedStandard, AssociationSetDetails, AssociationStateDetails, @@ -646,7 +646,6 @@ import { AwsWafWebAclDetails, AwsWafWebAclRule, AwsXrayEncryptionConfigDetails, - BatchUpdateFindingsUnprocessedFinding, BooleanFilter, Cell, ClassificationResult, @@ -666,7 +665,6 @@ import { FirewallPolicyStatefulRuleGroupReferencesDetails, FirewallPolicyStatelessCustomActionsDetails, FirewallPolicyStatelessRuleGroupReferencesDetails, - ImportFindingsError, IpFilter, KeywordFilter, Malware, @@ -709,7 +707,6 @@ import { RuleGroupVariables, RuleGroupVariablesIpSetsDetails, RuleGroupVariablesPortSetsDetails, - SecurityControl, SensitiveDataDetections, SensitiveDataResult, Severity, @@ -718,8 +715,6 @@ import { StandardsControlAssociationDetail, StandardsControlAssociationId, StandardsControlAssociationUpdate, - StandardsStatusReason, - StandardsSubscription, StandardsSubscriptionRequest, StatelessCustomActionDefinition, StatelessCustomPublishMetricAction, @@ -728,9 +723,6 @@ import { StringFilter, Threat, ThreatIntelIndicator, - UnprocessedSecurityControl, - UnprocessedStandardsControlAssociation, - UnprocessedStandardsControlAssociationUpdate, VolumeMount, Vulnerability, VulnerabilityVendor, @@ -741,21 +733,12 @@ import { WorkflowUpdate, } from "../models/models_1"; import { - FindingAggregator, Insight, - InsightResults, - InsightResultValue, - IntegrationType, Invitation, Member, - Product, - Result, - SecurityControlDefinition, SortCriterion, - Standard, StandardsControl, StandardsControlAssociationSummary, - StandardsManagedBy, } from "../models/models_2"; import { SecurityHubServiceException as __BaseException } from "../models/SecurityHubServiceException"; @@ -772,10 +755,12 @@ export const se_AcceptAdministratorInvitationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/administrator"; let body: any; - body = JSON.stringify({ - ...(input.AdministratorId != null && { AdministratorId: input.AdministratorId }), - ...(input.InvitationId != null && { InvitationId: input.InvitationId }), - }); + body = JSON.stringify( + take(input, { + AdministratorId: [], + InvitationId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -800,10 +785,12 @@ export const se_AcceptInvitationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/master"; let body: any; - body = JSON.stringify({ - ...(input.InvitationId != null && { InvitationId: input.InvitationId }), - ...(input.MasterId != null && { MasterId: input.MasterId }), - }); + body = JSON.stringify( + take(input, { + InvitationId: [], + MasterId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -828,11 +815,11 @@ export const se_BatchDisableStandardsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/standards/deregister"; let body: any; - body = JSON.stringify({ - ...(input.StandardsSubscriptionArns != null && { - StandardsSubscriptionArns: se_StandardsSubscriptionArns(input.StandardsSubscriptionArns, context), - }), - }); + body = JSON.stringify( + take(input, { + StandardsSubscriptionArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -857,11 +844,11 @@ export const se_BatchEnableStandardsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/standards/register"; let body: any; - body = JSON.stringify({ - ...(input.StandardsSubscriptionRequests != null && { - StandardsSubscriptionRequests: se_StandardsSubscriptionRequests(input.StandardsSubscriptionRequests, context), - }), - }); + body = JSON.stringify( + take(input, { + StandardsSubscriptionRequests: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -887,9 +874,11 @@ export const se_BatchGetSecurityControlsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/securityControls/batchGet"; let body: any; - body = JSON.stringify({ - ...(input.SecurityControlIds != null && { SecurityControlIds: se_StringList(input.SecurityControlIds, context) }), - }); + body = JSON.stringify( + take(input, { + SecurityControlIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -914,11 +903,11 @@ export const se_BatchGetStandardsControlAssociationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations/batchGet"; let body: any; - body = JSON.stringify({ - ...(input.StandardsControlAssociationIds != null && { - StandardsControlAssociationIds: se_StandardsControlAssociationIds(input.StandardsControlAssociationIds, context), - }), - }); + body = JSON.stringify( + take(input, { + StandardsControlAssociationIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -943,9 +932,11 @@ export const se_BatchImportFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/import"; let body: any; - body = JSON.stringify({ - ...(input.Findings != null && { Findings: se_BatchImportFindingsRequestFindingList(input.Findings, context) }), - }); + body = JSON.stringify( + take(input, { + Findings: (_) => se_BatchImportFindingsRequestFindingList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -970,20 +961,20 @@ export const se_BatchUpdateFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings/batchupdate"; let body: any; - body = JSON.stringify({ - ...(input.Confidence != null && { Confidence: input.Confidence }), - ...(input.Criticality != null && { Criticality: input.Criticality }), - ...(input.FindingIdentifiers != null && { - FindingIdentifiers: se_AwsSecurityFindingIdentifierList(input.FindingIdentifiers, context), - }), - ...(input.Note != null && { Note: se_NoteUpdate(input.Note, context) }), - ...(input.RelatedFindings != null && { RelatedFindings: se_RelatedFindingList(input.RelatedFindings, context) }), - ...(input.Severity != null && { Severity: se_SeverityUpdate(input.Severity, context) }), - ...(input.Types != null && { Types: se_TypeList(input.Types, context) }), - ...(input.UserDefinedFields != null && { UserDefinedFields: se_FieldMap(input.UserDefinedFields, context) }), - ...(input.VerificationState != null && { VerificationState: input.VerificationState }), - ...(input.Workflow != null && { Workflow: se_WorkflowUpdate(input.Workflow, context) }), - }); + body = JSON.stringify( + take(input, { + Confidence: [], + Criticality: [], + FindingIdentifiers: (_) => _json(_), + Note: (_) => _json(_), + RelatedFindings: (_) => _json(_), + Severity: (_) => se_SeverityUpdate(_, context), + Types: (_) => _json(_), + UserDefinedFields: (_) => _json(_), + VerificationState: [], + Workflow: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1008,14 +999,11 @@ export const se_BatchUpdateStandardsControlAssociationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associations"; let body: any; - body = JSON.stringify({ - ...(input.StandardsControlAssociationUpdates != null && { - StandardsControlAssociationUpdates: se_StandardsControlAssociationUpdates( - input.StandardsControlAssociationUpdates, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + StandardsControlAssociationUpdates: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1040,11 +1028,13 @@ export const se_CreateActionTargetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/actionTargets"; let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Id: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1070,10 +1060,12 @@ export const se_CreateFindingAggregatorCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingAggregator/create"; let body: any; - body = JSON.stringify({ - ...(input.RegionLinkingMode != null && { RegionLinkingMode: input.RegionLinkingMode }), - ...(input.Regions != null && { Regions: se_StringList(input.Regions, context) }), - }); + body = JSON.stringify( + take(input, { + RegionLinkingMode: [], + Regions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1098,11 +1090,13 @@ export const se_CreateInsightCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_AwsSecurityFindingFilters(input.Filters, context) }), - ...(input.GroupByAttribute != null && { GroupByAttribute: input.GroupByAttribute }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => se_AwsSecurityFindingFilters(_, context), + GroupByAttribute: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1127,9 +1121,11 @@ export const se_CreateMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members"; let body: any; - body = JSON.stringify({ - ...(input.AccountDetails != null && { AccountDetails: se_AccountDetailsList(input.AccountDetails, context) }), - }); + body = JSON.stringify( + take(input, { + AccountDetails: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1154,9 +1150,11 @@ export const se_DeclineInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/decline"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1267,9 +1265,11 @@ export const se_DeleteInvitationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/invitations/delete"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1294,9 +1294,11 @@ export const se_DeleteMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/delete"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1321,11 +1323,13 @@ export const se_DescribeActionTargetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/actionTargets/get"; let body: any; - body = JSON.stringify({ - ...(input.ActionTargetArns != null && { ActionTargetArns: se_ArnList(input.ActionTargetArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + ActionTargetArns: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1527,9 +1531,11 @@ export const se_DisableOrganizationAdminAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/admin/disable"; let body: any; - body = JSON.stringify({ - ...(input.AdminAccountId != null && { AdminAccountId: input.AdminAccountId }), - }); + body = JSON.stringify( + take(input, { + AdminAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1630,9 +1636,11 @@ export const se_DisassociateMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/disassociate"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1657,9 +1665,11 @@ export const se_EnableImportFindingsForProductCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/productSubscriptions"; let body: any; - body = JSON.stringify({ - ...(input.ProductArn != null && { ProductArn: input.ProductArn }), - }); + body = JSON.stringify( + take(input, { + ProductArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1685,9 +1695,11 @@ export const se_EnableOrganizationAdminAccountCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/admin/enable"; let body: any; - body = JSON.stringify({ - ...(input.AdminAccountId != null && { AdminAccountId: input.AdminAccountId }), - }); + body = JSON.stringify( + take(input, { + AdminAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1712,11 +1724,13 @@ export const se_EnableSecurityHubCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts"; let body: any; - body = JSON.stringify({ - ...(input.ControlFindingGenerator != null && { ControlFindingGenerator: input.ControlFindingGenerator }), - ...(input.EnableDefaultStandards != null && { EnableDefaultStandards: input.EnableDefaultStandards }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ControlFindingGenerator: [], + EnableDefaultStandards: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1766,13 +1780,13 @@ export const se_GetEnabledStandardsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/standards/get"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StandardsSubscriptionArns != null && { - StandardsSubscriptionArns: se_StandardsSubscriptionArns(input.StandardsSubscriptionArns, context), - }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + StandardsSubscriptionArns: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1829,12 +1843,14 @@ export const se_GetFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_AwsSecurityFindingFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SortCriteria != null && { SortCriteria: se_SortCriteria(input.SortCriteria, context) }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => se_AwsSecurityFindingFilters(_, context), + MaxResults: [], + NextToken: [], + SortCriteria: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1883,11 +1899,13 @@ export const se_GetInsightsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/get"; let body: any; - body = JSON.stringify({ - ...(input.InsightArns != null && { InsightArns: se_ArnList(input.InsightArns, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + InsightArns: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1962,9 +1980,11 @@ export const se_GetMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/get"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1989,9 +2009,11 @@ export const se_InviteMembersCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/members/invite"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_AccountIdList(input.AccountIds, context) }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2234,9 +2256,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2300,10 +2324,12 @@ export const se_UpdateActionTargetCommand = async ( true ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2329,11 +2355,13 @@ export const se_UpdateFindingAggregatorCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findingAggregator/update"; let body: any; - body = JSON.stringify({ - ...(input.FindingAggregatorArn != null && { FindingAggregatorArn: input.FindingAggregatorArn }), - ...(input.RegionLinkingMode != null && { RegionLinkingMode: input.RegionLinkingMode }), - ...(input.Regions != null && { Regions: se_StringList(input.Regions, context) }), - }); + body = JSON.stringify( + take(input, { + FindingAggregatorArn: [], + RegionLinkingMode: [], + Regions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2358,11 +2386,13 @@ export const se_UpdateFindingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/findings"; let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_AwsSecurityFindingFilters(input.Filters, context) }), - ...(input.Note != null && { Note: se_NoteUpdate(input.Note, context) }), - ...(input.RecordState != null && { RecordState: input.RecordState }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => se_AwsSecurityFindingFilters(_, context), + Note: (_) => _json(_), + RecordState: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2388,11 +2418,13 @@ export const se_UpdateInsightCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/insights/{InsightArn+}"; resolvedPath = __resolvedPath(resolvedPath, input, "InsightArn", () => input.InsightArn!, "{InsightArn+}", true); let body: any; - body = JSON.stringify({ - ...(input.Filters != null && { Filters: se_AwsSecurityFindingFilters(input.Filters, context) }), - ...(input.GroupByAttribute != null && { GroupByAttribute: input.GroupByAttribute }), - ...(input.Name != null && { Name: input.Name }), - }); + body = JSON.stringify( + take(input, { + Filters: (_) => se_AwsSecurityFindingFilters(_, context), + GroupByAttribute: [], + Name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2418,10 +2450,12 @@ export const se_UpdateOrganizationConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organization/configuration"; let body: any; - body = JSON.stringify({ - ...(input.AutoEnable != null && { AutoEnable: input.AutoEnable }), - ...(input.AutoEnableStandards != null && { AutoEnableStandards: input.AutoEnableStandards }), - }); + body = JSON.stringify( + take(input, { + AutoEnable: [], + AutoEnableStandards: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2446,10 +2480,12 @@ export const se_UpdateSecurityHubConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accounts"; let body: any; - body = JSON.stringify({ - ...(input.AutoEnableControls != null && { AutoEnableControls: input.AutoEnableControls }), - ...(input.ControlFindingGenerator != null && { ControlFindingGenerator: input.ControlFindingGenerator }), - }); + body = JSON.stringify( + take(input, { + AutoEnableControls: [], + ControlFindingGenerator: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2483,10 +2519,12 @@ export const se_UpdateStandardsControlCommand = async ( true ); let body: any; - body = JSON.stringify({ - ...(input.ControlStatus != null && { ControlStatus: input.ControlStatus }), - ...(input.DisabledReason != null && { DisabledReason: input.DisabledReason }), - }); + body = JSON.stringify( + take(input, { + ControlStatus: [], + DisabledReason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2545,10 +2583,9 @@ const de_AcceptAdministratorInvitationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2601,10 +2638,9 @@ const de_AcceptInvitationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2624,9 +2660,10 @@ export const de_BatchDisableStandardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StandardsSubscriptions != null) { - contents.StandardsSubscriptions = de_StandardsSubscriptions(data.StandardsSubscriptions, context); - } + const doc = take(data, { + StandardsSubscriptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2657,10 +2694,9 @@ const de_BatchDisableStandardsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2680,9 +2716,10 @@ export const de_BatchEnableStandardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StandardsSubscriptions != null) { - contents.StandardsSubscriptions = de_StandardsSubscriptions(data.StandardsSubscriptions, context); - } + const doc = take(data, { + StandardsSubscriptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2713,10 +2750,9 @@ const de_BatchEnableStandardsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2736,12 +2772,11 @@ export const de_BatchGetSecurityControlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SecurityControls != null) { - contents.SecurityControls = de_SecurityControls(data.SecurityControls, context); - } - if (data.UnprocessedIds != null) { - contents.UnprocessedIds = de_UnprocessedSecurityControls(data.UnprocessedIds, context); - } + const doc = take(data, { + SecurityControls: _json, + UnprocessedIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2772,10 +2807,9 @@ const de_BatchGetSecurityControlsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2795,18 +2829,11 @@ export const de_BatchGetStandardsControlAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.StandardsControlAssociationDetails != null) { - contents.StandardsControlAssociationDetails = de_StandardsControlAssociationDetails( - data.StandardsControlAssociationDetails, - context - ); - } - if (data.UnprocessedAssociations != null) { - contents.UnprocessedAssociations = de_UnprocessedStandardsControlAssociations( - data.UnprocessedAssociations, - context - ); - } + const doc = take(data, { + StandardsControlAssociationDetails: (_) => de_StandardsControlAssociationDetails(_, context), + UnprocessedAssociations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2837,10 +2864,9 @@ const de_BatchGetStandardsControlAssociationsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2860,15 +2886,12 @@ export const de_BatchImportFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FailedCount != null) { - contents.FailedCount = __expectInt32(data.FailedCount); - } - if (data.FailedFindings != null) { - contents.FailedFindings = de_ImportFindingsErrorList(data.FailedFindings, context); - } - if (data.SuccessCount != null) { - contents.SuccessCount = __expectInt32(data.SuccessCount); - } + const doc = take(data, { + FailedCount: __expectInt32, + FailedFindings: _json, + SuccessCount: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2899,10 +2922,9 @@ const de_BatchImportFindingsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2922,12 +2944,11 @@ export const de_BatchUpdateFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProcessedFindings != null) { - contents.ProcessedFindings = de_AwsSecurityFindingIdentifierList(data.ProcessedFindings, context); - } - if (data.UnprocessedFindings != null) { - contents.UnprocessedFindings = de_BatchUpdateFindingsUnprocessedFindingsList(data.UnprocessedFindings, context); - } + const doc = take(data, { + ProcessedFindings: _json, + UnprocessedFindings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2958,10 +2979,9 @@ const de_BatchUpdateFindingsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,12 +3001,10 @@ export const de_BatchUpdateStandardsControlAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedAssociationUpdates != null) { - contents.UnprocessedAssociationUpdates = de_UnprocessedStandardsControlAssociationUpdates( - data.UnprocessedAssociationUpdates, - context - ); - } + const doc = take(data, { + UnprocessedAssociationUpdates: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3017,10 +3035,9 @@ const de_BatchUpdateStandardsControlAssociationsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3040,9 +3057,10 @@ export const de_CreateActionTargetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ActionTargetArn != null) { - contents.ActionTargetArn = __expectString(data.ActionTargetArn); - } + const doc = take(data, { + ActionTargetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3076,10 +3094,9 @@ const de_CreateActionTargetCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3099,18 +3116,13 @@ export const de_CreateFindingAggregatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FindingAggregationRegion != null) { - contents.FindingAggregationRegion = __expectString(data.FindingAggregationRegion); - } - if (data.FindingAggregatorArn != null) { - contents.FindingAggregatorArn = __expectString(data.FindingAggregatorArn); - } - if (data.RegionLinkingMode != null) { - contents.RegionLinkingMode = __expectString(data.RegionLinkingMode); - } - if (data.Regions != null) { - contents.Regions = de_StringList(data.Regions, context); - } + const doc = take(data, { + FindingAggregationRegion: __expectString, + FindingAggregatorArn: __expectString, + RegionLinkingMode: __expectString, + Regions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3144,10 +3156,9 @@ const de_CreateFindingAggregatorCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3167,9 +3178,10 @@ export const de_CreateInsightCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InsightArn != null) { - contents.InsightArn = __expectString(data.InsightArn); - } + const doc = take(data, { + InsightArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3203,10 +3215,9 @@ const de_CreateInsightCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3226,9 +3237,10 @@ export const de_CreateMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_ResultList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3262,10 +3274,9 @@ const de_CreateMembersCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3285,9 +3296,10 @@ export const de_DeclineInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_ResultList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3318,10 +3330,9 @@ const de_DeclineInvitationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3341,9 +3352,10 @@ export const de_DeleteActionTargetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ActionTargetArn != null) { - contents.ActionTargetArn = __expectString(data.ActionTargetArn); - } + const doc = take(data, { + ActionTargetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3374,10 +3386,9 @@ const de_DeleteActionTargetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3433,10 +3444,9 @@ const de_DeleteFindingAggregatorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3456,9 +3466,10 @@ export const de_DeleteInsightCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InsightArn != null) { - contents.InsightArn = __expectString(data.InsightArn); - } + const doc = take(data, { + InsightArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3492,10 +3503,9 @@ const de_DeleteInsightCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3515,9 +3525,10 @@ export const de_DeleteInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_ResultList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3551,10 +3562,9 @@ const de_DeleteInvitationsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3574,9 +3584,10 @@ export const de_DeleteMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_ResultList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3610,10 +3621,9 @@ const de_DeleteMembersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3633,12 +3643,11 @@ export const de_DescribeActionTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ActionTargets != null) { - contents.ActionTargets = de_ActionTargetList(data.ActionTargets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ActionTargets: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3669,10 +3678,9 @@ const de_DescribeActionTargetsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3692,18 +3700,13 @@ export const de_DescribeHubCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AutoEnableControls != null) { - contents.AutoEnableControls = __expectBoolean(data.AutoEnableControls); - } - if (data.ControlFindingGenerator != null) { - contents.ControlFindingGenerator = __expectString(data.ControlFindingGenerator); - } - if (data.HubArn != null) { - contents.HubArn = __expectString(data.HubArn); - } - if (data.SubscribedAt != null) { - contents.SubscribedAt = __expectString(data.SubscribedAt); - } + const doc = take(data, { + AutoEnableControls: __expectBoolean, + ControlFindingGenerator: __expectString, + HubArn: __expectString, + SubscribedAt: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3737,10 +3740,9 @@ const de_DescribeHubCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3760,15 +3762,12 @@ export const de_DescribeOrganizationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AutoEnable != null) { - contents.AutoEnable = __expectBoolean(data.AutoEnable); - } - if (data.AutoEnableStandards != null) { - contents.AutoEnableStandards = __expectString(data.AutoEnableStandards); - } - if (data.MemberAccountLimitReached != null) { - contents.MemberAccountLimitReached = __expectBoolean(data.MemberAccountLimitReached); - } + const doc = take(data, { + AutoEnable: __expectBoolean, + AutoEnableStandards: __expectString, + MemberAccountLimitReached: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -3799,10 +3798,9 @@ const de_DescribeOrganizationConfigurationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3822,12 +3820,11 @@ export const de_DescribeProductsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Products != null) { - contents.Products = de_ProductsList(data.Products, context); - } + const doc = take(data, { + NextToken: __expectString, + Products: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3858,10 +3855,9 @@ const de_DescribeProductsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3881,12 +3877,11 @@ export const de_DescribeStandardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Standards != null) { - contents.Standards = de_Standards(data.Standards, context); - } + const doc = take(data, { + NextToken: __expectString, + Standards: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3914,10 +3909,9 @@ const de_DescribeStandardsCommandError = async ( throw await de_InvalidInputExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3937,12 +3931,11 @@ export const de_DescribeStandardsControlsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Controls != null) { - contents.Controls = de_StandardsControls(data.Controls, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Controls: (_) => de_StandardsControls(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3973,10 +3966,9 @@ const de_DescribeStandardsControlsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4029,10 +4021,9 @@ const de_DisableImportFindingsForProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4082,10 +4073,9 @@ const de_DisableOrganizationAdminAccountCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4135,10 +4125,9 @@ const de_DisableSecurityHubCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4191,10 +4180,9 @@ const de_DisassociateFromAdministratorAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4247,10 +4235,9 @@ const de_DisassociateFromMasterAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4303,10 +4290,9 @@ const de_DisassociateMembersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4326,9 +4312,10 @@ export const de_EnableImportFindingsForProductCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ProductSubscriptionArn != null) { - contents.ProductSubscriptionArn = __expectString(data.ProductSubscriptionArn); - } + const doc = take(data, { + ProductSubscriptionArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4362,10 +4349,9 @@ const de_EnableImportFindingsForProductCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4415,10 +4401,9 @@ const de_EnableOrganizationAdminAccountCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4471,10 +4456,9 @@ const de_EnableSecurityHubCommandError = async ( throw await de_ResourceConflictExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4494,9 +4478,10 @@ export const de_GetAdministratorAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Administrator != null) { - contents.Administrator = de_Invitation(data.Administrator, context); - } + const doc = take(data, { + Administrator: (_) => de_Invitation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4530,10 +4515,9 @@ const de_GetAdministratorAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4553,12 +4537,11 @@ export const de_GetEnabledStandardsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.StandardsSubscriptions != null) { - contents.StandardsSubscriptions = de_StandardsSubscriptions(data.StandardsSubscriptions, context); - } + const doc = take(data, { + NextToken: __expectString, + StandardsSubscriptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4589,10 +4572,9 @@ const de_GetEnabledStandardsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4612,18 +4594,13 @@ export const de_GetFindingAggregatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FindingAggregationRegion != null) { - contents.FindingAggregationRegion = __expectString(data.FindingAggregationRegion); - } - if (data.FindingAggregatorArn != null) { - contents.FindingAggregatorArn = __expectString(data.FindingAggregatorArn); - } - if (data.RegionLinkingMode != null) { - contents.RegionLinkingMode = __expectString(data.RegionLinkingMode); - } - if (data.Regions != null) { - contents.Regions = de_StringList(data.Regions, context); - } + const doc = take(data, { + FindingAggregationRegion: __expectString, + FindingAggregatorArn: __expectString, + RegionLinkingMode: __expectString, + Regions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4660,10 +4637,9 @@ const de_GetFindingAggregatorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4683,12 +4659,11 @@ export const de_GetFindingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Findings != null) { - contents.Findings = de_AwsSecurityFindingList(data.Findings, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Findings: (_) => de_AwsSecurityFindingList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4719,10 +4694,9 @@ const de_GetFindingsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4742,9 +4716,10 @@ export const de_GetInsightResultsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InsightResults != null) { - contents.InsightResults = de_InsightResults(data.InsightResults, context); - } + const doc = take(data, { + InsightResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4778,10 +4753,9 @@ const de_GetInsightResultsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4801,12 +4775,11 @@ export const de_GetInsightsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Insights != null) { - contents.Insights = de_InsightList(data.Insights, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Insights: (_) => de_InsightList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4840,10 +4813,9 @@ const de_GetInsightsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4863,9 +4835,10 @@ export const de_GetInvitationsCountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InvitationsCount != null) { - contents.InvitationsCount = __expectInt32(data.InvitationsCount); - } + const doc = take(data, { + InvitationsCount: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -4896,10 +4869,9 @@ const de_GetInvitationsCountCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4919,9 +4891,10 @@ export const de_GetMasterAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Master != null) { - contents.Master = de_Invitation(data.Master, context); - } + const doc = take(data, { + Master: (_) => de_Invitation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4955,10 +4928,9 @@ const de_GetMasterAccountCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4978,12 +4950,11 @@ export const de_GetMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Members != null) { - contents.Members = de_MemberList(data.Members, context); - } - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_ResultList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + Members: (_) => de_MemberList(_, context), + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5017,10 +4988,9 @@ const de_GetMembersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5040,9 +5010,10 @@ export const de_InviteMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedAccounts != null) { - contents.UnprocessedAccounts = de_ResultList(data.UnprocessedAccounts, context); - } + const doc = take(data, { + UnprocessedAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5076,10 +5047,9 @@ const de_InviteMembersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5099,12 +5069,11 @@ export const de_ListEnabledProductsForImportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ProductSubscriptions != null) { - contents.ProductSubscriptions = de_ProductSubscriptionArnList(data.ProductSubscriptions, context); - } + const doc = take(data, { + NextToken: __expectString, + ProductSubscriptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5132,10 +5101,9 @@ const de_ListEnabledProductsForImportCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5155,12 +5123,11 @@ export const de_ListFindingAggregatorsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FindingAggregators != null) { - contents.FindingAggregators = de_FindingAggregatorList(data.FindingAggregators, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + FindingAggregators: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5194,10 +5161,9 @@ const de_ListFindingAggregatorsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5217,12 +5183,11 @@ export const de_ListInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Invitations != null) { - contents.Invitations = de_InvitationList(data.Invitations, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Invitations: (_) => de_InvitationList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5253,10 +5218,9 @@ const de_ListInvitationsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5276,12 +5240,11 @@ export const de_ListMembersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Members != null) { - contents.Members = de_MemberList(data.Members, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Members: (_) => de_MemberList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5312,10 +5275,9 @@ const de_ListMembersCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5335,12 +5297,11 @@ export const de_ListOrganizationAdminAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AdminAccounts != null) { - contents.AdminAccounts = de_AdminAccounts(data.AdminAccounts, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + AdminAccounts: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5371,10 +5332,9 @@ const de_ListOrganizationAdminAccountsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5394,12 +5354,11 @@ export const de_ListSecurityControlDefinitionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SecurityControlDefinitions != null) { - contents.SecurityControlDefinitions = de_SecurityControlDefinitions(data.SecurityControlDefinitions, context); - } + const doc = take(data, { + NextToken: __expectString, + SecurityControlDefinitions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5430,10 +5389,9 @@ const de_ListSecurityControlDefinitionsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5453,15 +5411,11 @@ export const de_ListStandardsControlAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.StandardsControlAssociationSummaries != null) { - contents.StandardsControlAssociationSummaries = de_StandardsControlAssociationSummaries( - data.StandardsControlAssociationSummaries, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + StandardsControlAssociationSummaries: (_) => de_StandardsControlAssociationSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5492,10 +5446,9 @@ const de_ListStandardsControlAssociationsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5515,9 +5468,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5545,10 +5499,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5595,10 +5548,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5645,10 +5597,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5698,10 +5649,9 @@ const de_UpdateActionTargetCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5721,18 +5671,13 @@ export const de_UpdateFindingAggregatorCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FindingAggregationRegion != null) { - contents.FindingAggregationRegion = __expectString(data.FindingAggregationRegion); - } - if (data.FindingAggregatorArn != null) { - contents.FindingAggregatorArn = __expectString(data.FindingAggregatorArn); - } - if (data.RegionLinkingMode != null) { - contents.RegionLinkingMode = __expectString(data.RegionLinkingMode); - } - if (data.Regions != null) { - contents.Regions = de_StringList(data.Regions, context); - } + const doc = take(data, { + FindingAggregationRegion: __expectString, + FindingAggregatorArn: __expectString, + RegionLinkingMode: __expectString, + Regions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5769,10 +5714,9 @@ const de_UpdateFindingAggregatorCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5825,10 +5769,9 @@ const de_UpdateFindingsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5881,10 +5824,9 @@ const de_UpdateInsightCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5934,10 +5876,9 @@ const de_UpdateOrganizationConfigurationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5990,10 +5931,9 @@ const de_UpdateSecurityHubConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6043,16 +5983,15 @@ const de_UpdateStandardsControlCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -6062,12 +6001,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6081,12 +6019,11 @@ const de_AccessDeniedExceptionRes = async ( const de_InternalExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6103,12 +6040,11 @@ const de_InvalidAccessExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidAccessException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6125,12 +6061,11 @@ const de_InvalidInputExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6147,12 +6082,11 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6169,12 +6103,11 @@ const de_ResourceConflictExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6191,12 +6124,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6204,24516 +6136,4659 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccountDetails - */ -const se_AccountDetails = (input: AccountDetails, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Email != null && { Email: input.Email }), - }; -}; +// se_AccountDetails omitted. -/** - * serializeAws_restJson1AccountDetailsList - */ -const se_AccountDetailsList = (input: AccountDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AccountDetails(entry, context); - }); -}; +// se_AccountDetailsList omitted. -/** - * serializeAws_restJson1AccountIdList - */ -const se_AccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdList omitted. /** * serializeAws_restJson1Action */ const se_Action = (input: Action, context: __SerdeContext): any => { - return { - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.AwsApiCallAction != null && { AwsApiCallAction: se_AwsApiCallAction(input.AwsApiCallAction, context) }), - ...(input.DnsRequestAction != null && { DnsRequestAction: se_DnsRequestAction(input.DnsRequestAction, context) }), - ...(input.NetworkConnectionAction != null && { - NetworkConnectionAction: se_NetworkConnectionAction(input.NetworkConnectionAction, context), - }), - ...(input.PortProbeAction != null && { PortProbeAction: se_PortProbeAction(input.PortProbeAction, context) }), - }; + return take(input, { + ActionType: [], + AwsApiCallAction: (_) => se_AwsApiCallAction(_, context), + DnsRequestAction: _json, + NetworkConnectionAction: (_) => se_NetworkConnectionAction(_, context), + PortProbeAction: (_) => se_PortProbeAction(_, context), + }); }; -/** - * serializeAws_restJson1ActionLocalIpDetails - */ -const se_ActionLocalIpDetails = (input: ActionLocalIpDetails, context: __SerdeContext): any => { - return { - ...(input.IpAddressV4 != null && { IpAddressV4: input.IpAddressV4 }), - }; -}; +// se_ActionLocalIpDetails omitted. -/** - * serializeAws_restJson1ActionLocalPortDetails - */ -const se_ActionLocalPortDetails = (input: ActionLocalPortDetails, context: __SerdeContext): any => { - return { - ...(input.Port != null && { Port: input.Port }), - ...(input.PortName != null && { PortName: input.PortName }), - }; -}; +// se_ActionLocalPortDetails omitted. /** * serializeAws_restJson1ActionRemoteIpDetails */ const se_ActionRemoteIpDetails = (input: ActionRemoteIpDetails, context: __SerdeContext): any => { - return { - ...(input.City != null && { City: se_City(input.City, context) }), - ...(input.Country != null && { Country: se_Country(input.Country, context) }), - ...(input.GeoLocation != null && { GeoLocation: se_GeoLocation(input.GeoLocation, context) }), - ...(input.IpAddressV4 != null && { IpAddressV4: input.IpAddressV4 }), - ...(input.Organization != null && { Organization: se_IpOrganizationDetails(input.Organization, context) }), - }; + return take(input, { + City: _json, + Country: _json, + GeoLocation: (_) => se_GeoLocation(_, context), + IpAddressV4: [], + Organization: _json, + }); }; +// se_ActionRemotePortDetails omitted. + +// se_Adjustment omitted. + +// se_AdjustmentList omitted. + +// se_ArnList omitted. + +// se_AssociatedStandard omitted. + +// se_AssociatedStandardsList omitted. + +// se_AssociationSetDetails omitted. + +// se_AssociationSetList omitted. + +// se_AssociationStateDetails omitted. + +// se_AvailabilityZone omitted. + +// se_AvailabilityZones omitted. + /** - * serializeAws_restJson1ActionRemotePortDetails + * serializeAws_restJson1AwsApiCallAction */ -const se_ActionRemotePortDetails = (input: ActionRemotePortDetails, context: __SerdeContext): any => { - return { - ...(input.Port != null && { Port: input.Port }), - ...(input.PortName != null && { PortName: input.PortName }), - }; +const se_AwsApiCallAction = (input: AwsApiCallAction, context: __SerdeContext): any => { + return take(input, { + AffectedResources: _json, + Api: [], + CallerType: [], + DomainDetails: _json, + FirstSeen: [], + LastSeen: [], + RemoteIpDetails: (_) => se_ActionRemoteIpDetails(_, context), + ServiceName: [], + }); }; +// se_AwsApiCallActionDomainDetails omitted. + +// se_AwsApiGatewayAccessLogSettings omitted. + /** - * serializeAws_restJson1Adjustment + * serializeAws_restJson1AwsApiGatewayCanarySettings */ -const se_Adjustment = (input: Adjustment, context: __SerdeContext): any => { - return { - ...(input.Metric != null && { Metric: input.Metric }), - ...(input.Reason != null && { Reason: input.Reason }), - }; +const se_AwsApiGatewayCanarySettings = (input: AwsApiGatewayCanarySettings, context: __SerdeContext): any => { + return take(input, { + DeploymentId: [], + PercentTraffic: __serializeFloat, + StageVariableOverrides: _json, + UseStageCache: [], + }); }; +// se_AwsApiGatewayEndpointConfiguration omitted. + /** - * serializeAws_restJson1AdjustmentList + * serializeAws_restJson1AwsApiGatewayMethodSettings */ -const se_AdjustmentList = (input: Adjustment[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Adjustment(entry, context); - }); +const se_AwsApiGatewayMethodSettings = (input: AwsApiGatewayMethodSettings, context: __SerdeContext): any => { + return take(input, { + CacheDataEncrypted: [], + CacheTtlInSeconds: [], + CachingEnabled: [], + DataTraceEnabled: [], + HttpMethod: [], + LoggingLevel: [], + MetricsEnabled: [], + RequireAuthorizationForCacheControl: [], + ResourcePath: [], + ThrottlingBurstLimit: [], + ThrottlingRateLimit: __serializeFloat, + UnauthorizedCacheControlHeaderStrategy: [], + }); }; /** - * serializeAws_restJson1ArnList + * serializeAws_restJson1AwsApiGatewayMethodSettingsList */ -const se_ArnList = (input: string[], context: __SerdeContext): any => { +const se_AwsApiGatewayMethodSettingsList = (input: AwsApiGatewayMethodSettings[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_AwsApiGatewayMethodSettings(entry, context); }); }; -/** - * serializeAws_restJson1AssociatedStandard - */ -const se_AssociatedStandard = (input: AssociatedStandard, context: __SerdeContext): any => { - return { - ...(input.StandardsId != null && { StandardsId: input.StandardsId }), - }; -}; +// se_AwsApiGatewayRestApiDetails omitted. /** - * serializeAws_restJson1AssociatedStandardsList + * serializeAws_restJson1AwsApiGatewayStageDetails */ -const se_AssociatedStandardsList = (input: AssociatedStandard[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociatedStandard(entry, context); - }); +const se_AwsApiGatewayStageDetails = (input: AwsApiGatewayStageDetails, context: __SerdeContext): any => { + return take(input, { + AccessLogSettings: _json, + CacheClusterEnabled: [], + CacheClusterSize: [], + CacheClusterStatus: [], + CanarySettings: (_) => se_AwsApiGatewayCanarySettings(_, context), + ClientCertificateId: [], + CreatedDate: [], + DeploymentId: [], + Description: [], + DocumentationVersion: [], + LastUpdatedDate: [], + MethodSettings: (_) => se_AwsApiGatewayMethodSettingsList(_, context), + StageName: [], + TracingEnabled: [], + Variables: _json, + WebAclArn: [], + }); }; -/** - * serializeAws_restJson1AssociationSetDetails - */ -const se_AssociationSetDetails = (input: AssociationSetDetails, context: __SerdeContext): any => { - return { - ...(input.AssociationState != null && { - AssociationState: se_AssociationStateDetails(input.AssociationState, context), - }), - ...(input.GatewayId != null && { GatewayId: input.GatewayId }), - ...(input.Main != null && { Main: input.Main }), - ...(input.RouteTableAssociationId != null && { RouteTableAssociationId: input.RouteTableAssociationId }), - ...(input.RouteTableId != null && { RouteTableId: input.RouteTableId }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; +// se_AwsApiGatewayV2ApiDetails omitted. /** - * serializeAws_restJson1AssociationSetList + * serializeAws_restJson1AwsApiGatewayV2RouteSettings */ -const se_AssociationSetList = (input: AssociationSetDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociationSetDetails(entry, context); - }); +const se_AwsApiGatewayV2RouteSettings = (input: AwsApiGatewayV2RouteSettings, context: __SerdeContext): any => { + return take(input, { + DataTraceEnabled: [], + DetailedMetricsEnabled: [], + LoggingLevel: [], + ThrottlingBurstLimit: [], + ThrottlingRateLimit: __serializeFloat, + }); }; /** - * serializeAws_restJson1AssociationStateDetails + * serializeAws_restJson1AwsApiGatewayV2StageDetails */ -const se_AssociationStateDetails = (input: AssociationStateDetails, context: __SerdeContext): any => { - return { - ...(input.State != null && { State: input.State }), - ...(input.StatusMessage != null && { StatusMessage: input.StatusMessage }), - }; +const se_AwsApiGatewayV2StageDetails = (input: AwsApiGatewayV2StageDetails, context: __SerdeContext): any => { + return take(input, { + AccessLogSettings: _json, + ApiGatewayManaged: [], + AutoDeploy: [], + ClientCertificateId: [], + CreatedDate: [], + DefaultRouteSettings: (_) => se_AwsApiGatewayV2RouteSettings(_, context), + DeploymentId: [], + Description: [], + LastDeploymentStatusMessage: [], + LastUpdatedDate: [], + RouteSettings: (_) => se_AwsApiGatewayV2RouteSettings(_, context), + StageName: [], + StageVariables: _json, + }); }; -/** - * serializeAws_restJson1AvailabilityZone - */ -const se_AvailabilityZone = (input: AvailabilityZone, context: __SerdeContext): any => { - return { - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.ZoneName != null && { ZoneName: input.ZoneName }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupAvailabilityZonesList omitted. -/** - * serializeAws_restJson1AvailabilityZones - */ -const se_AvailabilityZones = (input: AvailabilityZone[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AvailabilityZone(entry, context); - }); -}; +// se_AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails omitted. -/** - * serializeAws_restJson1AwsApiCallAction - */ -const se_AwsApiCallAction = (input: AwsApiCallAction, context: __SerdeContext): any => { - return { - ...(input.AffectedResources != null && { AffectedResources: se_FieldMap(input.AffectedResources, context) }), - ...(input.Api != null && { Api: input.Api }), - ...(input.CallerType != null && { CallerType: input.CallerType }), - ...(input.DomainDetails != null && { - DomainDetails: se_AwsApiCallActionDomainDetails(input.DomainDetails, context), - }), - ...(input.FirstSeen != null && { FirstSeen: input.FirstSeen }), - ...(input.LastSeen != null && { LastSeen: input.LastSeen }), - ...(input.RemoteIpDetails != null && { RemoteIpDetails: se_ActionRemoteIpDetails(input.RemoteIpDetails, context) }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupDetails omitted. -/** - * serializeAws_restJson1AwsApiCallActionDomainDetails - */ -const se_AwsApiCallActionDomainDetails = (input: AwsApiCallActionDomainDetails, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification omitted. -/** - * serializeAws_restJson1AwsApiGatewayAccessLogSettings - */ -const se_AwsApiGatewayAccessLogSettings = (input: AwsApiGatewayAccessLogSettings, context: __SerdeContext): any => { - return { - ...(input.DestinationArn != null && { DestinationArn: input.DestinationArn }), - ...(input.Format != null && { Format: input.Format }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails omitted. -/** - * serializeAws_restJson1AwsApiGatewayCanarySettings - */ -const se_AwsApiGatewayCanarySettings = (input: AwsApiGatewayCanarySettings, context: __SerdeContext): any => { - return { - ...(input.DeploymentId != null && { DeploymentId: input.DeploymentId }), - ...(input.PercentTraffic != null && { PercentTraffic: __serializeFloat(input.PercentTraffic) }), - ...(input.StageVariableOverrides != null && { - StageVariableOverrides: se_FieldMap(input.StageVariableOverrides, context), - }), - ...(input.UseStageCache != null && { UseStageCache: input.UseStageCache }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails omitted. -/** - * serializeAws_restJson1AwsApiGatewayEndpointConfiguration - */ -const se_AwsApiGatewayEndpointConfiguration = ( - input: AwsApiGatewayEndpointConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Types != null && { Types: se_NonEmptyStringList(input.Types, context) }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails omitted. -/** - * serializeAws_restJson1AwsApiGatewayMethodSettings - */ -const se_AwsApiGatewayMethodSettings = (input: AwsApiGatewayMethodSettings, context: __SerdeContext): any => { - return { - ...(input.CacheDataEncrypted != null && { CacheDataEncrypted: input.CacheDataEncrypted }), - ...(input.CacheTtlInSeconds != null && { CacheTtlInSeconds: input.CacheTtlInSeconds }), - ...(input.CachingEnabled != null && { CachingEnabled: input.CachingEnabled }), - ...(input.DataTraceEnabled != null && { DataTraceEnabled: input.DataTraceEnabled }), - ...(input.HttpMethod != null && { HttpMethod: input.HttpMethod }), - ...(input.LoggingLevel != null && { LoggingLevel: input.LoggingLevel }), - ...(input.MetricsEnabled != null && { MetricsEnabled: input.MetricsEnabled }), - ...(input.RequireAuthorizationForCacheControl != null && { - RequireAuthorizationForCacheControl: input.RequireAuthorizationForCacheControl, - }), - ...(input.ResourcePath != null && { ResourcePath: input.ResourcePath }), - ...(input.ThrottlingBurstLimit != null && { ThrottlingBurstLimit: input.ThrottlingBurstLimit }), - ...(input.ThrottlingRateLimit != null && { ThrottlingRateLimit: __serializeFloat(input.ThrottlingRateLimit) }), - ...(input.UnauthorizedCacheControlHeaderStrategy != null && { - UnauthorizedCacheControlHeaderStrategy: input.UnauthorizedCacheControlHeaderStrategy, - }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification omitted. -/** - * serializeAws_restJson1AwsApiGatewayMethodSettingsList - */ -const se_AwsApiGatewayMethodSettingsList = (input: AwsApiGatewayMethodSettings[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsApiGatewayMethodSettings(entry, context); - }); -}; +// se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList omitted. -/** - * serializeAws_restJson1AwsApiGatewayRestApiDetails - */ -const se_AwsApiGatewayRestApiDetails = (input: AwsApiGatewayRestApiDetails, context: __SerdeContext): any => { - return { - ...(input.ApiKeySource != null && { ApiKeySource: input.ApiKeySource }), - ...(input.BinaryMediaTypes != null && { BinaryMediaTypes: se_NonEmptyStringList(input.BinaryMediaTypes, context) }), - ...(input.CreatedDate != null && { CreatedDate: input.CreatedDate }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EndpointConfiguration != null && { - EndpointConfiguration: se_AwsApiGatewayEndpointConfiguration(input.EndpointConfiguration, context), - }), - ...(input.Id != null && { Id: input.Id }), - ...(input.MinimumCompressionSize != null && { MinimumCompressionSize: input.MinimumCompressionSize }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails omitted. -/** - * serializeAws_restJson1AwsApiGatewayStageDetails - */ -const se_AwsApiGatewayStageDetails = (input: AwsApiGatewayStageDetails, context: __SerdeContext): any => { - return { - ...(input.AccessLogSettings != null && { - AccessLogSettings: se_AwsApiGatewayAccessLogSettings(input.AccessLogSettings, context), - }), - ...(input.CacheClusterEnabled != null && { CacheClusterEnabled: input.CacheClusterEnabled }), - ...(input.CacheClusterSize != null && { CacheClusterSize: input.CacheClusterSize }), - ...(input.CacheClusterStatus != null && { CacheClusterStatus: input.CacheClusterStatus }), - ...(input.CanarySettings != null && { - CanarySettings: se_AwsApiGatewayCanarySettings(input.CanarySettings, context), - }), - ...(input.ClientCertificateId != null && { ClientCertificateId: input.ClientCertificateId }), - ...(input.CreatedDate != null && { CreatedDate: input.CreatedDate }), - ...(input.DeploymentId != null && { DeploymentId: input.DeploymentId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DocumentationVersion != null && { DocumentationVersion: input.DocumentationVersion }), - ...(input.LastUpdatedDate != null && { LastUpdatedDate: input.LastUpdatedDate }), - ...(input.MethodSettings != null && { - MethodSettings: se_AwsApiGatewayMethodSettingsList(input.MethodSettings, context), - }), - ...(input.StageName != null && { StageName: input.StageName }), - ...(input.TracingEnabled != null && { TracingEnabled: input.TracingEnabled }), - ...(input.Variables != null && { Variables: se_FieldMap(input.Variables, context) }), - ...(input.WebAclArn != null && { WebAclArn: input.WebAclArn }), - }; -}; +// se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails omitted. -/** - * serializeAws_restJson1AwsApiGatewayV2ApiDetails - */ -const se_AwsApiGatewayV2ApiDetails = (input: AwsApiGatewayV2ApiDetails, context: __SerdeContext): any => { - return { - ...(input.ApiEndpoint != null && { ApiEndpoint: input.ApiEndpoint }), - ...(input.ApiId != null && { ApiId: input.ApiId }), - ...(input.ApiKeySelectionExpression != null && { ApiKeySelectionExpression: input.ApiKeySelectionExpression }), - ...(input.CorsConfiguration != null && { - CorsConfiguration: se_AwsCorsConfiguration(input.CorsConfiguration, context), - }), - ...(input.CreatedDate != null && { CreatedDate: input.CreatedDate }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ProtocolType != null && { ProtocolType: input.ProtocolType }), - ...(input.RouteSelectionExpression != null && { RouteSelectionExpression: input.RouteSelectionExpression }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails omitted. + +// se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList omitted. + +// se_AwsAutoScalingLaunchConfigurationDetails omitted. + +// se_AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails omitted. + +// se_AwsAutoScalingLaunchConfigurationMetadataOptions omitted. + +// se_AwsBackupBackupPlanAdvancedBackupSettingsDetails omitted. + +// se_AwsBackupBackupPlanAdvancedBackupSettingsList omitted. + +// se_AwsBackupBackupPlanBackupPlanDetails omitted. + +// se_AwsBackupBackupPlanDetails omitted. + +// se_AwsBackupBackupPlanLifecycleDetails omitted. + +// se_AwsBackupBackupPlanRuleCopyActionsDetails omitted. + +// se_AwsBackupBackupPlanRuleCopyActionsList omitted. + +// se_AwsBackupBackupPlanRuleDetails omitted. + +// se_AwsBackupBackupPlanRuleList omitted. + +// se_AwsBackupBackupVaultDetails omitted. + +// se_AwsBackupBackupVaultNotificationsDetails omitted. + +// se_AwsBackupRecoveryPointCalculatedLifecycleDetails omitted. + +// se_AwsBackupRecoveryPointCreatedByDetails omitted. + +// se_AwsBackupRecoveryPointDetails omitted. + +// se_AwsBackupRecoveryPointLifecycleDetails omitted. + +// se_AwsCertificateManagerCertificateDetails omitted. + +// se_AwsCertificateManagerCertificateDomainValidationOption omitted. + +// se_AwsCertificateManagerCertificateDomainValidationOptions omitted. + +// se_AwsCertificateManagerCertificateExtendedKeyUsage omitted. + +// se_AwsCertificateManagerCertificateExtendedKeyUsages omitted. + +// se_AwsCertificateManagerCertificateKeyUsage omitted. + +// se_AwsCertificateManagerCertificateKeyUsages omitted. + +// se_AwsCertificateManagerCertificateOptions omitted. + +// se_AwsCertificateManagerCertificateRenewalSummary omitted. + +// se_AwsCertificateManagerCertificateResourceRecord omitted. + +// se_AwsCloudFormationStackDetails omitted. + +// se_AwsCloudFormationStackDriftInformationDetails omitted. + +// se_AwsCloudFormationStackOutputsDetails omitted. + +// se_AwsCloudFormationStackOutputsList omitted. + +// se_AwsCloudFrontDistributionCacheBehavior omitted. + +// se_AwsCloudFrontDistributionCacheBehaviors omitted. + +// se_AwsCloudFrontDistributionCacheBehaviorsItemList omitted. + +// se_AwsCloudFrontDistributionDefaultCacheBehavior omitted. + +// se_AwsCloudFrontDistributionDetails omitted. + +// se_AwsCloudFrontDistributionLogging omitted. + +// se_AwsCloudFrontDistributionOriginCustomOriginConfig omitted. + +// se_AwsCloudFrontDistributionOriginGroup omitted. + +// se_AwsCloudFrontDistributionOriginGroupFailover omitted. + +// se_AwsCloudFrontDistributionOriginGroupFailoverStatusCodes omitted. + +// se_AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList omitted. + +// se_AwsCloudFrontDistributionOriginGroups omitted. + +// se_AwsCloudFrontDistributionOriginGroupsItemList omitted. + +// se_AwsCloudFrontDistributionOriginItem omitted. + +// se_AwsCloudFrontDistributionOriginItemList omitted. + +// se_AwsCloudFrontDistributionOrigins omitted. + +// se_AwsCloudFrontDistributionOriginS3OriginConfig omitted. + +// se_AwsCloudFrontDistributionOriginSslProtocols omitted. + +// se_AwsCloudFrontDistributionViewerCertificate omitted. + +// se_AwsCloudTrailTrailDetails omitted. /** - * serializeAws_restJson1AwsApiGatewayV2RouteSettings + * serializeAws_restJson1AwsCloudWatchAlarmDetails */ -const se_AwsApiGatewayV2RouteSettings = (input: AwsApiGatewayV2RouteSettings, context: __SerdeContext): any => { - return { - ...(input.DataTraceEnabled != null && { DataTraceEnabled: input.DataTraceEnabled }), - ...(input.DetailedMetricsEnabled != null && { DetailedMetricsEnabled: input.DetailedMetricsEnabled }), - ...(input.LoggingLevel != null && { LoggingLevel: input.LoggingLevel }), - ...(input.ThrottlingBurstLimit != null && { ThrottlingBurstLimit: input.ThrottlingBurstLimit }), - ...(input.ThrottlingRateLimit != null && { ThrottlingRateLimit: __serializeFloat(input.ThrottlingRateLimit) }), - }; +const se_AwsCloudWatchAlarmDetails = (input: AwsCloudWatchAlarmDetails, context: __SerdeContext): any => { + return take(input, { + ActionsEnabled: [], + AlarmActions: _json, + AlarmArn: [], + AlarmConfigurationUpdatedTimestamp: [], + AlarmDescription: [], + AlarmName: [], + ComparisonOperator: [], + DatapointsToAlarm: [], + Dimensions: _json, + EvaluateLowSampleCountPercentile: [], + EvaluationPeriods: [], + ExtendedStatistic: [], + InsufficientDataActions: _json, + MetricName: [], + Namespace: [], + OkActions: _json, + Period: [], + Statistic: [], + Threshold: __serializeFloat, + ThresholdMetricId: [], + TreatMissingData: [], + Unit: [], + }); }; +// se_AwsCloudWatchAlarmDimensionsDetails omitted. + +// se_AwsCloudWatchAlarmDimensionsList omitted. + +// se_AwsCodeBuildProjectArtifactsDetails omitted. + +// se_AwsCodeBuildProjectArtifactsList omitted. + +// se_AwsCodeBuildProjectDetails omitted. + +// se_AwsCodeBuildProjectEnvironment omitted. + +// se_AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails omitted. + +// se_AwsCodeBuildProjectEnvironmentEnvironmentVariablesList omitted. + +// se_AwsCodeBuildProjectEnvironmentRegistryCredential omitted. + +// se_AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails omitted. + +// se_AwsCodeBuildProjectLogsConfigDetails omitted. + +// se_AwsCodeBuildProjectLogsConfigS3LogsDetails omitted. + +// se_AwsCodeBuildProjectSource omitted. + +// se_AwsCodeBuildProjectVpcConfig omitted. + +// se_AwsCorsConfiguration omitted. + +// se_AwsDynamoDbTableAttributeDefinition omitted. + +// se_AwsDynamoDbTableAttributeDefinitionList omitted. + +// se_AwsDynamoDbTableBillingModeSummary omitted. + +// se_AwsDynamoDbTableDetails omitted. + +// se_AwsDynamoDbTableGlobalSecondaryIndex omitted. + +// se_AwsDynamoDbTableGlobalSecondaryIndexList omitted. + +// se_AwsDynamoDbTableKeySchema omitted. + +// se_AwsDynamoDbTableKeySchemaList omitted. + +// se_AwsDynamoDbTableLocalSecondaryIndex omitted. + +// se_AwsDynamoDbTableLocalSecondaryIndexList omitted. + +// se_AwsDynamoDbTableProjection omitted. + +// se_AwsDynamoDbTableProvisionedThroughput omitted. + +// se_AwsDynamoDbTableProvisionedThroughputOverride omitted. + +// se_AwsDynamoDbTableReplica omitted. + +// se_AwsDynamoDbTableReplicaGlobalSecondaryIndex omitted. + +// se_AwsDynamoDbTableReplicaGlobalSecondaryIndexList omitted. + +// se_AwsDynamoDbTableReplicaList omitted. + +// se_AwsDynamoDbTableRestoreSummary omitted. + +// se_AwsDynamoDbTableSseDescription omitted. + +// se_AwsDynamoDbTableStreamSpecification omitted. + +// se_AwsEc2EipDetails omitted. + +// se_AwsEc2InstanceDetails omitted. + +// se_AwsEc2InstanceMetadataOptions omitted. + +// se_AwsEc2InstanceMonitoringDetails omitted. + +// se_AwsEc2InstanceNetworkInterfacesDetails omitted. + +// se_AwsEc2InstanceNetworkInterfacesList omitted. + +// se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails omitted. + +// se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails omitted. + +// se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetList omitted. + +// se_AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails omitted. + +// se_AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails omitted. + +// se_AwsEc2LaunchTemplateDataCpuOptionsDetails omitted. + +// se_AwsEc2LaunchTemplateDataCreditSpecificationDetails omitted. + /** - * serializeAws_restJson1AwsApiGatewayV2StageDetails + * serializeAws_restJson1AwsEc2LaunchTemplateDataDetails */ -const se_AwsApiGatewayV2StageDetails = (input: AwsApiGatewayV2StageDetails, context: __SerdeContext): any => { - return { - ...(input.AccessLogSettings != null && { - AccessLogSettings: se_AwsApiGatewayAccessLogSettings(input.AccessLogSettings, context), - }), - ...(input.ApiGatewayManaged != null && { ApiGatewayManaged: input.ApiGatewayManaged }), - ...(input.AutoDeploy != null && { AutoDeploy: input.AutoDeploy }), - ...(input.ClientCertificateId != null && { ClientCertificateId: input.ClientCertificateId }), - ...(input.CreatedDate != null && { CreatedDate: input.CreatedDate }), - ...(input.DefaultRouteSettings != null && { - DefaultRouteSettings: se_AwsApiGatewayV2RouteSettings(input.DefaultRouteSettings, context), - }), - ...(input.DeploymentId != null && { DeploymentId: input.DeploymentId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LastDeploymentStatusMessage != null && { - LastDeploymentStatusMessage: input.LastDeploymentStatusMessage, - }), - ...(input.LastUpdatedDate != null && { LastUpdatedDate: input.LastUpdatedDate }), - ...(input.RouteSettings != null && { - RouteSettings: se_AwsApiGatewayV2RouteSettings(input.RouteSettings, context), - }), - ...(input.StageName != null && { StageName: input.StageName }), - ...(input.StageVariables != null && { StageVariables: se_FieldMap(input.StageVariables, context) }), - }; +const se_AwsEc2LaunchTemplateDataDetails = (input: AwsEc2LaunchTemplateDataDetails, context: __SerdeContext): any => { + return take(input, { + BlockDeviceMappingSet: _json, + CapacityReservationSpecification: _json, + CpuOptions: _json, + CreditSpecification: _json, + DisableApiStop: [], + DisableApiTermination: [], + EbsOptimized: [], + ElasticGpuSpecificationSet: _json, + ElasticInferenceAcceleratorSet: _json, + EnclaveOptions: _json, + HibernationOptions: _json, + IamInstanceProfile: _json, + ImageId: [], + InstanceInitiatedShutdownBehavior: [], + InstanceMarketOptions: _json, + InstanceRequirements: (_) => se_AwsEc2LaunchTemplateDataInstanceRequirementsDetails(_, context), + InstanceType: [], + KernelId: [], + KeyName: [], + LicenseSet: _json, + MaintenanceOptions: _json, + MetadataOptions: _json, + Monitoring: _json, + NetworkInterfaceSet: _json, + Placement: _json, + PrivateDnsNameOptions: _json, + RamDiskId: [], + SecurityGroupIdSet: _json, + SecurityGroupSet: _json, + UserData: [], + }); }; +// se_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails omitted. + +// se_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList omitted. + +// se_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails omitted. + +// se_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList omitted. + +// se_AwsEc2LaunchTemplateDataEnclaveOptionsDetails omitted. + +// se_AwsEc2LaunchTemplateDataHibernationOptionsDetails omitted. + +// se_AwsEc2LaunchTemplateDataIamInstanceProfileDetails omitted. + +// se_AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails omitted. + +// se_AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails omitted. + +// se_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails omitted. + +// se_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails omitted. + +// se_AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails omitted. + /** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupAvailabilityZonesList + * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsDetails */ -const se_AwsAutoScalingAutoScalingGroupAvailabilityZonesList = ( - input: AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails[], +const se_AwsEc2LaunchTemplateDataInstanceRequirementsDetails = ( + input: AwsEc2LaunchTemplateDataInstanceRequirementsDetails, context: __SerdeContext ): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails(entry, context); - }); + return take(input, { + AcceleratorCount: _json, + AcceleratorManufacturers: _json, + AcceleratorNames: _json, + AcceleratorTotalMemoryMiB: _json, + AcceleratorTypes: _json, + BareMetal: [], + BaselineEbsBandwidthMbps: _json, + BurstablePerformance: [], + CpuManufacturers: _json, + ExcludedInstanceTypes: _json, + InstanceGenerations: _json, + LocalStorage: [], + LocalStorageTypes: _json, + MemoryGiBPerVCpu: (_) => se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails(_, context), + MemoryMiB: _json, + NetworkInterfaceCount: _json, + OnDemandMaxPricePercentageOverLowestPrice: [], + RequireHibernateSupport: [], + SpotMaxPricePercentageOverLowestPrice: [], + TotalLocalStorageGB: (_) => se_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails(_, context), + VCpuCount: _json, + }); }; /** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails + * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails */ -const se_AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails = ( - input: AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails, +const se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails = ( + input: AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails, context: __SerdeContext ): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; + return take(input, { + Max: __serializeFloat, + Min: __serializeFloat, + }); }; +// se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails omitted. + +// se_AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails omitted. + /** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupDetails + * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails */ -const se_AwsAutoScalingAutoScalingGroupDetails = ( - input: AwsAutoScalingAutoScalingGroupDetails, +const se_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails = ( + input: AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails, context: __SerdeContext ): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_AwsAutoScalingAutoScalingGroupAvailabilityZonesList(input.AvailabilityZones, context), - }), - ...(input.CapacityRebalance != null && { CapacityRebalance: input.CapacityRebalance }), - ...(input.CreatedTime != null && { CreatedTime: input.CreatedTime }), - ...(input.HealthCheckGracePeriod != null && { HealthCheckGracePeriod: input.HealthCheckGracePeriod }), - ...(input.HealthCheckType != null && { HealthCheckType: input.HealthCheckType }), - ...(input.LaunchConfigurationName != null && { LaunchConfigurationName: input.LaunchConfigurationName }), - ...(input.LaunchTemplate != null && { - LaunchTemplate: se_AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification( - input.LaunchTemplate, - context - ), - }), - ...(input.LoadBalancerNames != null && { LoadBalancerNames: se_StringList(input.LoadBalancerNames, context) }), - ...(input.MixedInstancesPolicy != null && { - MixedInstancesPolicy: se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails( - input.MixedInstancesPolicy, - context - ), - }), - }; + return take(input, { + Max: __serializeFloat, + Min: __serializeFloat, + }); }; -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification - */ -const se_AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification = ( - input: AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification, - context: __SerdeContext -): any => { - return { - ...(input.LaunchTemplateId != null && { LaunchTemplateId: input.LaunchTemplateId }), - ...(input.LaunchTemplateName != null && { LaunchTemplateName: input.LaunchTemplateName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails - */ -const se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails = ( - input: AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails, - context: __SerdeContext -): any => { - return { - ...(input.InstancesDistribution != null && { - InstancesDistribution: se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails( - input.InstancesDistribution, - context - ), - }), - ...(input.LaunchTemplate != null && { - LaunchTemplate: se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails( - input.LaunchTemplate, - context - ), - }), - }; -}; +// se_AwsEc2LaunchTemplateDataLicenseSetDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails - */ -const se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails = ( - input: AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails, - context: __SerdeContext -): any => { - return { - ...(input.OnDemandAllocationStrategy != null && { OnDemandAllocationStrategy: input.OnDemandAllocationStrategy }), - ...(input.OnDemandBaseCapacity != null && { OnDemandBaseCapacity: input.OnDemandBaseCapacity }), - ...(input.OnDemandPercentageAboveBaseCapacity != null && { - OnDemandPercentageAboveBaseCapacity: input.OnDemandPercentageAboveBaseCapacity, - }), - ...(input.SpotAllocationStrategy != null && { SpotAllocationStrategy: input.SpotAllocationStrategy }), - ...(input.SpotInstancePools != null && { SpotInstancePools: input.SpotInstancePools }), - ...(input.SpotMaxPrice != null && { SpotMaxPrice: input.SpotMaxPrice }), - }; -}; +// se_AwsEc2LaunchTemplateDataLicenseSetList omitted. -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails - */ -const se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails = ( - input: AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails, - context: __SerdeContext -): any => { - return { - ...(input.LaunchTemplateSpecification != null && { - LaunchTemplateSpecification: - se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification( - input.LaunchTemplateSpecification, - context - ), - }), - ...(input.Overrides != null && { - Overrides: se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList( - input.Overrides, - context - ), - }), - }; -}; +// se_AwsEc2LaunchTemplateDataMaintenanceOptionsDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification - */ -const se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification = ( - input: AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification, - context: __SerdeContext -): any => { - return { - ...(input.LaunchTemplateId != null && { LaunchTemplateId: input.LaunchTemplateId }), - ...(input.LaunchTemplateName != null && { LaunchTemplateName: input.LaunchTemplateName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_AwsEc2LaunchTemplateDataMetadataOptionsDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList - */ -const se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList = ( - input: AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails(entry, context); - }); -}; +// se_AwsEc2LaunchTemplateDataMonitoringDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails - */ -const se_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails = ( - input: AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails, - context: __SerdeContext -): any => { - return { - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.WeightedCapacity != null && { WeightedCapacity: input.WeightedCapacity }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails - */ -const se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails = ( - input: AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.Ebs != null && { - Ebs: se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails(input.Ebs, context), - }), - ...(input.NoDevice != null && { NoDevice: input.NoDevice }), - ...(input.VirtualName != null && { VirtualName: input.VirtualName }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails - */ -const se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails = ( - input: AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeleteOnTermination != null && { DeleteOnTermination: input.DeleteOnTermination }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList omitted. -/** - * serializeAws_restJson1AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList - */ -const se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList = ( - input: AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails(entry, context); - }); -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingLaunchConfigurationDetails - */ -const se_AwsAutoScalingLaunchConfigurationDetails = ( - input: AwsAutoScalingLaunchConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssociatePublicIpAddress != null && { AssociatePublicIpAddress: input.AssociatePublicIpAddress }), - ...(input.BlockDeviceMappings != null && { - BlockDeviceMappings: se_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList( - input.BlockDeviceMappings, - context - ), - }), - ...(input.ClassicLinkVpcId != null && { ClassicLinkVpcId: input.ClassicLinkVpcId }), - ...(input.ClassicLinkVpcSecurityGroups != null && { - ClassicLinkVpcSecurityGroups: se_NonEmptyStringList(input.ClassicLinkVpcSecurityGroups, context), - }), - ...(input.CreatedTime != null && { CreatedTime: input.CreatedTime }), - ...(input.EbsOptimized != null && { EbsOptimized: input.EbsOptimized }), - ...(input.IamInstanceProfile != null && { IamInstanceProfile: input.IamInstanceProfile }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.InstanceMonitoring != null && { - InstanceMonitoring: se_AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails( - input.InstanceMonitoring, - context - ), - }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KernelId != null && { KernelId: input.KernelId }), - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.LaunchConfigurationName != null && { LaunchConfigurationName: input.LaunchConfigurationName }), - ...(input.MetadataOptions != null && { - MetadataOptions: se_AwsAutoScalingLaunchConfigurationMetadataOptions(input.MetadataOptions, context), - }), - ...(input.PlacementTenancy != null && { PlacementTenancy: input.PlacementTenancy }), - ...(input.RamdiskId != null && { RamdiskId: input.RamdiskId }), - ...(input.SecurityGroups != null && { SecurityGroups: se_NonEmptyStringList(input.SecurityGroups, context) }), - ...(input.SpotPrice != null && { SpotPrice: input.SpotPrice }), - ...(input.UserData != null && { UserData: input.UserData }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList omitted. -/** - * serializeAws_restJson1AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails - */ -const se_AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails = ( - input: AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails omitted. -/** - * serializeAws_restJson1AwsAutoScalingLaunchConfigurationMetadataOptions - */ -const se_AwsAutoScalingLaunchConfigurationMetadataOptions = ( - input: AwsAutoScalingLaunchConfigurationMetadataOptions, - context: __SerdeContext -): any => { - return { - ...(input.HttpEndpoint != null && { HttpEndpoint: input.HttpEndpoint }), - ...(input.HttpPutResponseHopLimit != null && { HttpPutResponseHopLimit: input.HttpPutResponseHopLimit }), - ...(input.HttpTokens != null && { HttpTokens: input.HttpTokens }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanAdvancedBackupSettingsDetails - */ -const se_AwsBackupBackupPlanAdvancedBackupSettingsDetails = ( - input: AwsBackupBackupPlanAdvancedBackupSettingsDetails, - context: __SerdeContext -): any => { - return { - ...(input.BackupOptions != null && { BackupOptions: se_FieldMap(input.BackupOptions, context) }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetList omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanAdvancedBackupSettingsList - */ -const se_AwsBackupBackupPlanAdvancedBackupSettingsList = ( - input: AwsBackupBackupPlanAdvancedBackupSettingsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsBackupBackupPlanAdvancedBackupSettingsDetails(entry, context); - }); -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanBackupPlanDetails - */ -const se_AwsBackupBackupPlanBackupPlanDetails = ( - input: AwsBackupBackupPlanBackupPlanDetails, - context: __SerdeContext -): any => { - return { - ...(input.AdvancedBackupSettings != null && { - AdvancedBackupSettings: se_AwsBackupBackupPlanAdvancedBackupSettingsList(input.AdvancedBackupSettings, context), - }), - ...(input.BackupPlanName != null && { BackupPlanName: input.BackupPlanName }), - ...(input.BackupPlanRule != null && { - BackupPlanRule: se_AwsBackupBackupPlanRuleList(input.BackupPlanRule, context), - }), - }; -}; +// se_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanDetails - */ -const se_AwsBackupBackupPlanDetails = (input: AwsBackupBackupPlanDetails, context: __SerdeContext): any => { - return { - ...(input.BackupPlan != null && { BackupPlan: se_AwsBackupBackupPlanBackupPlanDetails(input.BackupPlan, context) }), - ...(input.BackupPlanArn != null && { BackupPlanArn: input.BackupPlanArn }), - ...(input.BackupPlanId != null && { BackupPlanId: input.BackupPlanId }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; +// se_AwsEc2LaunchTemplateDataPlacementDetails omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanLifecycleDetails - */ -const se_AwsBackupBackupPlanLifecycleDetails = ( - input: AwsBackupBackupPlanLifecycleDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeleteAfterDays != null && { DeleteAfterDays: input.DeleteAfterDays }), - ...(input.MoveToColdStorageAfterDays != null && { MoveToColdStorageAfterDays: input.MoveToColdStorageAfterDays }), - }; -}; +// se_AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails omitted. /** - * serializeAws_restJson1AwsBackupBackupPlanRuleCopyActionsDetails + * serializeAws_restJson1AwsEc2LaunchTemplateDetails */ -const se_AwsBackupBackupPlanRuleCopyActionsDetails = ( - input: AwsBackupBackupPlanRuleCopyActionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.DestinationBackupVaultArn != null && { DestinationBackupVaultArn: input.DestinationBackupVaultArn }), - ...(input.Lifecycle != null && { Lifecycle: se_AwsBackupBackupPlanLifecycleDetails(input.Lifecycle, context) }), - }; +const se_AwsEc2LaunchTemplateDetails = (input: AwsEc2LaunchTemplateDetails, context: __SerdeContext): any => { + return take(input, { + DefaultVersionNumber: [], + Id: [], + LatestVersionNumber: [], + LaunchTemplateData: (_) => se_AwsEc2LaunchTemplateDataDetails(_, context), + LaunchTemplateName: [], + }); }; -/** - * serializeAws_restJson1AwsBackupBackupPlanRuleCopyActionsList - */ -const se_AwsBackupBackupPlanRuleCopyActionsList = ( - input: AwsBackupBackupPlanRuleCopyActionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsBackupBackupPlanRuleCopyActionsDetails(entry, context); - }); -}; +// se_AwsEc2NetworkAclAssociation omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanRuleDetails - */ -const se_AwsBackupBackupPlanRuleDetails = (input: AwsBackupBackupPlanRuleDetails, context: __SerdeContext): any => { - return { - ...(input.CompletionWindowMinutes != null && { CompletionWindowMinutes: input.CompletionWindowMinutes }), - ...(input.CopyActions != null && { - CopyActions: se_AwsBackupBackupPlanRuleCopyActionsList(input.CopyActions, context), - }), - ...(input.EnableContinuousBackup != null && { EnableContinuousBackup: input.EnableContinuousBackup }), - ...(input.Lifecycle != null && { Lifecycle: se_AwsBackupBackupPlanLifecycleDetails(input.Lifecycle, context) }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.StartWindowMinutes != null && { StartWindowMinutes: input.StartWindowMinutes }), - ...(input.TargetBackupVault != null && { TargetBackupVault: input.TargetBackupVault }), - }; -}; +// se_AwsEc2NetworkAclAssociationList omitted. -/** - * serializeAws_restJson1AwsBackupBackupPlanRuleList - */ -const se_AwsBackupBackupPlanRuleList = (input: AwsBackupBackupPlanRuleDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsBackupBackupPlanRuleDetails(entry, context); - }); -}; +// se_AwsEc2NetworkAclDetails omitted. -/** - * serializeAws_restJson1AwsBackupBackupVaultDetails - */ -const se_AwsBackupBackupVaultDetails = (input: AwsBackupBackupVaultDetails, context: __SerdeContext): any => { - return { - ...(input.AccessPolicy != null && { AccessPolicy: input.AccessPolicy }), - ...(input.BackupVaultArn != null && { BackupVaultArn: input.BackupVaultArn }), - ...(input.BackupVaultName != null && { BackupVaultName: input.BackupVaultName }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - ...(input.Notifications != null && { - Notifications: se_AwsBackupBackupVaultNotificationsDetails(input.Notifications, context), - }), - }; -}; +// se_AwsEc2NetworkAclEntry omitted. -/** - * serializeAws_restJson1AwsBackupBackupVaultNotificationsDetails - */ -const se_AwsBackupBackupVaultNotificationsDetails = ( - input: AwsBackupBackupVaultNotificationsDetails, - context: __SerdeContext -): any => { - return { - ...(input.BackupVaultEvents != null && { - BackupVaultEvents: se_NonEmptyStringList(input.BackupVaultEvents, context), - }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - }; -}; +// se_AwsEc2NetworkAclEntryList omitted. -/** - * serializeAws_restJson1AwsBackupRecoveryPointCalculatedLifecycleDetails - */ -const se_AwsBackupRecoveryPointCalculatedLifecycleDetails = ( - input: AwsBackupRecoveryPointCalculatedLifecycleDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeleteAt != null && { DeleteAt: input.DeleteAt }), - ...(input.MoveToColdStorageAt != null && { MoveToColdStorageAt: input.MoveToColdStorageAt }), - }; -}; +// se_AwsEc2NetworkInterfaceAttachment omitted. -/** - * serializeAws_restJson1AwsBackupRecoveryPointCreatedByDetails - */ -const se_AwsBackupRecoveryPointCreatedByDetails = ( - input: AwsBackupRecoveryPointCreatedByDetails, - context: __SerdeContext -): any => { - return { - ...(input.BackupPlanArn != null && { BackupPlanArn: input.BackupPlanArn }), - ...(input.BackupPlanId != null && { BackupPlanId: input.BackupPlanId }), - ...(input.BackupPlanVersion != null && { BackupPlanVersion: input.BackupPlanVersion }), - ...(input.BackupRuleId != null && { BackupRuleId: input.BackupRuleId }), - }; -}; +// se_AwsEc2NetworkInterfaceDetails omitted. -/** - * serializeAws_restJson1AwsBackupRecoveryPointDetails - */ -const se_AwsBackupRecoveryPointDetails = (input: AwsBackupRecoveryPointDetails, context: __SerdeContext): any => { - return { - ...(input.BackupSizeInBytes != null && { BackupSizeInBytes: input.BackupSizeInBytes }), - ...(input.BackupVaultArn != null && { BackupVaultArn: input.BackupVaultArn }), - ...(input.BackupVaultName != null && { BackupVaultName: input.BackupVaultName }), - ...(input.CalculatedLifecycle != null && { - CalculatedLifecycle: se_AwsBackupRecoveryPointCalculatedLifecycleDetails(input.CalculatedLifecycle, context), - }), - ...(input.CompletionDate != null && { CompletionDate: input.CompletionDate }), - ...(input.CreatedBy != null && { CreatedBy: se_AwsBackupRecoveryPointCreatedByDetails(input.CreatedBy, context) }), - ...(input.CreationDate != null && { CreationDate: input.CreationDate }), - ...(input.EncryptionKeyArn != null && { EncryptionKeyArn: input.EncryptionKeyArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - ...(input.IsEncrypted != null && { IsEncrypted: input.IsEncrypted }), - ...(input.LastRestoreTime != null && { LastRestoreTime: input.LastRestoreTime }), - ...(input.Lifecycle != null && { Lifecycle: se_AwsBackupRecoveryPointLifecycleDetails(input.Lifecycle, context) }), - ...(input.RecoveryPointArn != null && { RecoveryPointArn: input.RecoveryPointArn }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.SourceBackupVaultArn != null && { SourceBackupVaultArn: input.SourceBackupVaultArn }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusMessage != null && { StatusMessage: input.StatusMessage }), - ...(input.StorageClass != null && { StorageClass: input.StorageClass }), - }; -}; +// se_AwsEc2NetworkInterfaceIpV6AddressDetail omitted. -/** - * serializeAws_restJson1AwsBackupRecoveryPointLifecycleDetails - */ -const se_AwsBackupRecoveryPointLifecycleDetails = ( - input: AwsBackupRecoveryPointLifecycleDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeleteAfterDays != null && { DeleteAfterDays: input.DeleteAfterDays }), - ...(input.MoveToColdStorageAfterDays != null && { MoveToColdStorageAfterDays: input.MoveToColdStorageAfterDays }), - }; -}; +// se_AwsEc2NetworkInterfaceIpV6AddressList omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateDetails - */ -const se_AwsCertificateManagerCertificateDetails = ( - input: AwsCertificateManagerCertificateDetails, - context: __SerdeContext -): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.CreatedAt != null && { CreatedAt: input.CreatedAt }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.DomainValidationOptions != null && { - DomainValidationOptions: se_AwsCertificateManagerCertificateDomainValidationOptions( - input.DomainValidationOptions, - context - ), - }), - ...(input.ExtendedKeyUsages != null && { - ExtendedKeyUsages: se_AwsCertificateManagerCertificateExtendedKeyUsages(input.ExtendedKeyUsages, context), - }), - ...(input.FailureReason != null && { FailureReason: input.FailureReason }), - ...(input.ImportedAt != null && { ImportedAt: input.ImportedAt }), - ...(input.InUseBy != null && { InUseBy: se_StringList(input.InUseBy, context) }), - ...(input.IssuedAt != null && { IssuedAt: input.IssuedAt }), - ...(input.Issuer != null && { Issuer: input.Issuer }), - ...(input.KeyAlgorithm != null && { KeyAlgorithm: input.KeyAlgorithm }), - ...(input.KeyUsages != null && { - KeyUsages: se_AwsCertificateManagerCertificateKeyUsages(input.KeyUsages, context), - }), - ...(input.NotAfter != null && { NotAfter: input.NotAfter }), - ...(input.NotBefore != null && { NotBefore: input.NotBefore }), - ...(input.Options != null && { Options: se_AwsCertificateManagerCertificateOptions(input.Options, context) }), - ...(input.RenewalEligibility != null && { RenewalEligibility: input.RenewalEligibility }), - ...(input.RenewalSummary != null && { - RenewalSummary: se_AwsCertificateManagerCertificateRenewalSummary(input.RenewalSummary, context), - }), - ...(input.Serial != null && { Serial: input.Serial }), - ...(input.SignatureAlgorithm != null && { SignatureAlgorithm: input.SignatureAlgorithm }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Subject != null && { Subject: input.Subject }), - ...(input.SubjectAlternativeNames != null && { - SubjectAlternativeNames: se_StringList(input.SubjectAlternativeNames, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AwsEc2NetworkInterfacePrivateIpAddressDetail omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateDomainValidationOption - */ -const se_AwsCertificateManagerCertificateDomainValidationOption = ( - input: AwsCertificateManagerCertificateDomainValidationOption, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.ResourceRecord != null && { - ResourceRecord: se_AwsCertificateManagerCertificateResourceRecord(input.ResourceRecord, context), - }), - ...(input.ValidationDomain != null && { ValidationDomain: input.ValidationDomain }), - ...(input.ValidationEmails != null && { ValidationEmails: se_StringList(input.ValidationEmails, context) }), - ...(input.ValidationMethod != null && { ValidationMethod: input.ValidationMethod }), - ...(input.ValidationStatus != null && { ValidationStatus: input.ValidationStatus }), - }; -}; +// se_AwsEc2NetworkInterfacePrivateIpAddressList omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateDomainValidationOptions - */ -const se_AwsCertificateManagerCertificateDomainValidationOptions = ( - input: AwsCertificateManagerCertificateDomainValidationOption[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCertificateManagerCertificateDomainValidationOption(entry, context); - }); -}; +// se_AwsEc2NetworkInterfaceSecurityGroup omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateExtendedKeyUsage - */ -const se_AwsCertificateManagerCertificateExtendedKeyUsage = ( - input: AwsCertificateManagerCertificateExtendedKeyUsage, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.OId != null && { OId: input.OId }), - }; -}; +// se_AwsEc2NetworkInterfaceSecurityGroupList omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateExtendedKeyUsages - */ -const se_AwsCertificateManagerCertificateExtendedKeyUsages = ( - input: AwsCertificateManagerCertificateExtendedKeyUsage[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCertificateManagerCertificateExtendedKeyUsage(entry, context); - }); -}; +// se_AwsEc2RouteTableDetails omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateKeyUsage - */ -const se_AwsCertificateManagerCertificateKeyUsage = ( - input: AwsCertificateManagerCertificateKeyUsage, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_AwsEc2SecurityGroupDetails omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateKeyUsages - */ -const se_AwsCertificateManagerCertificateKeyUsages = ( - input: AwsCertificateManagerCertificateKeyUsage[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCertificateManagerCertificateKeyUsage(entry, context); - }); -}; +// se_AwsEc2SecurityGroupIpPermission omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateOptions - */ -const se_AwsCertificateManagerCertificateOptions = ( - input: AwsCertificateManagerCertificateOptions, - context: __SerdeContext -): any => { - return { - ...(input.CertificateTransparencyLoggingPreference != null && { - CertificateTransparencyLoggingPreference: input.CertificateTransparencyLoggingPreference, - }), - }; -}; +// se_AwsEc2SecurityGroupIpPermissionList omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateRenewalSummary - */ -const se_AwsCertificateManagerCertificateRenewalSummary = ( - input: AwsCertificateManagerCertificateRenewalSummary, - context: __SerdeContext -): any => { - return { - ...(input.DomainValidationOptions != null && { - DomainValidationOptions: se_AwsCertificateManagerCertificateDomainValidationOptions( - input.DomainValidationOptions, - context - ), - }), - ...(input.RenewalStatus != null && { RenewalStatus: input.RenewalStatus }), - ...(input.RenewalStatusReason != null && { RenewalStatusReason: input.RenewalStatusReason }), - ...(input.UpdatedAt != null && { UpdatedAt: input.UpdatedAt }), - }; -}; +// se_AwsEc2SecurityGroupIpRange omitted. -/** - * serializeAws_restJson1AwsCertificateManagerCertificateResourceRecord - */ -const se_AwsCertificateManagerCertificateResourceRecord = ( - input: AwsCertificateManagerCertificateResourceRecord, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AwsEc2SecurityGroupIpRangeList omitted. -/** - * serializeAws_restJson1AwsCloudFormationStackDetails - */ -const se_AwsCloudFormationStackDetails = (input: AwsCloudFormationStackDetails, context: __SerdeContext): any => { - return { - ...(input.Capabilities != null && { Capabilities: se_NonEmptyStringList(input.Capabilities, context) }), - ...(input.CreationTime != null && { CreationTime: input.CreationTime }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisableRollback != null && { DisableRollback: input.DisableRollback }), - ...(input.DriftInformation != null && { - DriftInformation: se_AwsCloudFormationStackDriftInformationDetails(input.DriftInformation, context), - }), - ...(input.EnableTerminationProtection != null && { - EnableTerminationProtection: input.EnableTerminationProtection, - }), - ...(input.LastUpdatedTime != null && { LastUpdatedTime: input.LastUpdatedTime }), - ...(input.NotificationArns != null && { NotificationArns: se_NonEmptyStringList(input.NotificationArns, context) }), - ...(input.Outputs != null && { Outputs: se_AwsCloudFormationStackOutputsList(input.Outputs, context) }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.StackId != null && { StackId: input.StackId }), - ...(input.StackName != null && { StackName: input.StackName }), - ...(input.StackStatus != null && { StackStatus: input.StackStatus }), - ...(input.StackStatusReason != null && { StackStatusReason: input.StackStatusReason }), - ...(input.TimeoutInMinutes != null && { TimeoutInMinutes: input.TimeoutInMinutes }), - }; -}; +// se_AwsEc2SecurityGroupIpv6Range omitted. -/** - * serializeAws_restJson1AwsCloudFormationStackDriftInformationDetails - */ -const se_AwsCloudFormationStackDriftInformationDetails = ( - input: AwsCloudFormationStackDriftInformationDetails, - context: __SerdeContext -): any => { - return { - ...(input.StackDriftStatus != null && { StackDriftStatus: input.StackDriftStatus }), - }; -}; +// se_AwsEc2SecurityGroupIpv6RangeList omitted. -/** - * serializeAws_restJson1AwsCloudFormationStackOutputsDetails - */ -const se_AwsCloudFormationStackOutputsDetails = ( - input: AwsCloudFormationStackOutputsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.OutputKey != null && { OutputKey: input.OutputKey }), - ...(input.OutputValue != null && { OutputValue: input.OutputValue }), - }; -}; +// se_AwsEc2SecurityGroupPrefixListId omitted. -/** - * serializeAws_restJson1AwsCloudFormationStackOutputsList - */ -const se_AwsCloudFormationStackOutputsList = ( - input: AwsCloudFormationStackOutputsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCloudFormationStackOutputsDetails(entry, context); - }); -}; +// se_AwsEc2SecurityGroupPrefixListIdList omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionCacheBehavior - */ -const se_AwsCloudFrontDistributionCacheBehavior = ( - input: AwsCloudFrontDistributionCacheBehavior, - context: __SerdeContext -): any => { - return { - ...(input.ViewerProtocolPolicy != null && { ViewerProtocolPolicy: input.ViewerProtocolPolicy }), - }; -}; +// se_AwsEc2SecurityGroupUserIdGroupPair omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionCacheBehaviors - */ -const se_AwsCloudFrontDistributionCacheBehaviors = ( - input: AwsCloudFrontDistributionCacheBehaviors, - context: __SerdeContext -): any => { - return { - ...(input.Items != null && { Items: se_AwsCloudFrontDistributionCacheBehaviorsItemList(input.Items, context) }), - }; -}; +// se_AwsEc2SecurityGroupUserIdGroupPairList omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionCacheBehaviorsItemList - */ -const se_AwsCloudFrontDistributionCacheBehaviorsItemList = ( - input: AwsCloudFrontDistributionCacheBehavior[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCloudFrontDistributionCacheBehavior(entry, context); - }); -}; +// se_AwsEc2SubnetDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionDefaultCacheBehavior - */ -const se_AwsCloudFrontDistributionDefaultCacheBehavior = ( - input: AwsCloudFrontDistributionDefaultCacheBehavior, - context: __SerdeContext -): any => { - return { - ...(input.ViewerProtocolPolicy != null && { ViewerProtocolPolicy: input.ViewerProtocolPolicy }), - }; -}; +// se_AwsEc2TransitGatewayDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionDetails - */ -const se_AwsCloudFrontDistributionDetails = (input: AwsCloudFrontDistributionDetails, context: __SerdeContext): any => { - return { - ...(input.CacheBehaviors != null && { - CacheBehaviors: se_AwsCloudFrontDistributionCacheBehaviors(input.CacheBehaviors, context), - }), - ...(input.DefaultCacheBehavior != null && { - DefaultCacheBehavior: se_AwsCloudFrontDistributionDefaultCacheBehavior(input.DefaultCacheBehavior, context), - }), - ...(input.DefaultRootObject != null && { DefaultRootObject: input.DefaultRootObject }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.ETag != null && { ETag: input.ETag }), - ...(input.LastModifiedTime != null && { LastModifiedTime: input.LastModifiedTime }), - ...(input.Logging != null && { Logging: se_AwsCloudFrontDistributionLogging(input.Logging, context) }), - ...(input.OriginGroups != null && { - OriginGroups: se_AwsCloudFrontDistributionOriginGroups(input.OriginGroups, context), - }), - ...(input.Origins != null && { Origins: se_AwsCloudFrontDistributionOrigins(input.Origins, context) }), - ...(input.Status != null && { Status: input.Status }), - ...(input.ViewerCertificate != null && { - ViewerCertificate: se_AwsCloudFrontDistributionViewerCertificate(input.ViewerCertificate, context), - }), - ...(input.WebAclId != null && { WebAclId: input.WebAclId }), - }; -}; +// se_AwsEc2VolumeAttachment omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionLogging - */ -const se_AwsCloudFrontDistributionLogging = (input: AwsCloudFrontDistributionLogging, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.IncludeCookies != null && { IncludeCookies: input.IncludeCookies }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - }; -}; +// se_AwsEc2VolumeAttachmentList omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginCustomOriginConfig - */ -const se_AwsCloudFrontDistributionOriginCustomOriginConfig = ( - input: AwsCloudFrontDistributionOriginCustomOriginConfig, - context: __SerdeContext -): any => { - return { - ...(input.HttpPort != null && { HttpPort: input.HttpPort }), - ...(input.HttpsPort != null && { HttpsPort: input.HttpsPort }), - ...(input.OriginKeepaliveTimeout != null && { OriginKeepaliveTimeout: input.OriginKeepaliveTimeout }), - ...(input.OriginProtocolPolicy != null && { OriginProtocolPolicy: input.OriginProtocolPolicy }), - ...(input.OriginReadTimeout != null && { OriginReadTimeout: input.OriginReadTimeout }), - ...(input.OriginSslProtocols != null && { - OriginSslProtocols: se_AwsCloudFrontDistributionOriginSslProtocols(input.OriginSslProtocols, context), - }), - }; -}; +// se_AwsEc2VolumeDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginGroup - */ -const se_AwsCloudFrontDistributionOriginGroup = ( - input: AwsCloudFrontDistributionOriginGroup, - context: __SerdeContext -): any => { - return { - ...(input.FailoverCriteria != null && { - FailoverCriteria: se_AwsCloudFrontDistributionOriginGroupFailover(input.FailoverCriteria, context), - }), - }; -}; +// se_AwsEc2VpcDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginGroupFailover - */ -const se_AwsCloudFrontDistributionOriginGroupFailover = ( - input: AwsCloudFrontDistributionOriginGroupFailover, - context: __SerdeContext -): any => { - return { - ...(input.StatusCodes != null && { - StatusCodes: se_AwsCloudFrontDistributionOriginGroupFailoverStatusCodes(input.StatusCodes, context), - }), - }; -}; +// se_AwsEc2VpcEndpointServiceDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginGroupFailoverStatusCodes - */ -const se_AwsCloudFrontDistributionOriginGroupFailoverStatusCodes = ( - input: AwsCloudFrontDistributionOriginGroupFailoverStatusCodes, - context: __SerdeContext -): any => { - return { - ...(input.Items != null && { - Items: se_AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList(input.Items, context), - }), - ...(input.Quantity != null && { Quantity: input.Quantity }), - }; -}; +// se_AwsEc2VpcEndpointServiceServiceTypeDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList - */ -const se_AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList = ( - input: number[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AwsEc2VpcEndpointServiceServiceTypeList omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginGroups - */ -const se_AwsCloudFrontDistributionOriginGroups = ( - input: AwsCloudFrontDistributionOriginGroups, - context: __SerdeContext -): any => { - return { - ...(input.Items != null && { Items: se_AwsCloudFrontDistributionOriginGroupsItemList(input.Items, context) }), - }; -}; +// se_AwsEc2VpcPeeringConnectionDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginGroupsItemList - */ -const se_AwsCloudFrontDistributionOriginGroupsItemList = ( - input: AwsCloudFrontDistributionOriginGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCloudFrontDistributionOriginGroup(entry, context); - }); -}; +// se_AwsEc2VpcPeeringConnectionStatusDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginItem - */ -const se_AwsCloudFrontDistributionOriginItem = ( - input: AwsCloudFrontDistributionOriginItem, - context: __SerdeContext -): any => { - return { - ...(input.CustomOriginConfig != null && { - CustomOriginConfig: se_AwsCloudFrontDistributionOriginCustomOriginConfig(input.CustomOriginConfig, context), - }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.Id != null && { Id: input.Id }), - ...(input.OriginPath != null && { OriginPath: input.OriginPath }), - ...(input.S3OriginConfig != null && { - S3OriginConfig: se_AwsCloudFrontDistributionOriginS3OriginConfig(input.S3OriginConfig, context), - }), - }; -}; +// se_AwsEc2VpcPeeringConnectionVpcInfoDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginItemList - */ -const se_AwsCloudFrontDistributionOriginItemList = ( - input: AwsCloudFrontDistributionOriginItem[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCloudFrontDistributionOriginItem(entry, context); - }); -}; +// se_AwsEc2VpnConnectionDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOrigins - */ -const se_AwsCloudFrontDistributionOrigins = (input: AwsCloudFrontDistributionOrigins, context: __SerdeContext): any => { - return { - ...(input.Items != null && { Items: se_AwsCloudFrontDistributionOriginItemList(input.Items, context) }), - }; -}; +// se_AwsEc2VpnConnectionOptionsDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginS3OriginConfig - */ -const se_AwsCloudFrontDistributionOriginS3OriginConfig = ( - input: AwsCloudFrontDistributionOriginS3OriginConfig, - context: __SerdeContext -): any => { - return { - ...(input.OriginAccessIdentity != null && { OriginAccessIdentity: input.OriginAccessIdentity }), - }; -}; +// se_AwsEc2VpnConnectionOptionsTunnelOptionsDetails omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionOriginSslProtocols - */ -const se_AwsCloudFrontDistributionOriginSslProtocols = ( - input: AwsCloudFrontDistributionOriginSslProtocols, - context: __SerdeContext -): any => { - return { - ...(input.Items != null && { Items: se_NonEmptyStringList(input.Items, context) }), - ...(input.Quantity != null && { Quantity: input.Quantity }), - }; -}; +// se_AwsEc2VpnConnectionOptionsTunnelOptionsList omitted. -/** - * serializeAws_restJson1AwsCloudFrontDistributionViewerCertificate - */ -const se_AwsCloudFrontDistributionViewerCertificate = ( - input: AwsCloudFrontDistributionViewerCertificate, - context: __SerdeContext -): any => { - return { - ...(input.AcmCertificateArn != null && { AcmCertificateArn: input.AcmCertificateArn }), - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.CertificateSource != null && { CertificateSource: input.CertificateSource }), - ...(input.CloudFrontDefaultCertificate != null && { - CloudFrontDefaultCertificate: input.CloudFrontDefaultCertificate, - }), - ...(input.IamCertificateId != null && { IamCertificateId: input.IamCertificateId }), - ...(input.MinimumProtocolVersion != null && { MinimumProtocolVersion: input.MinimumProtocolVersion }), - ...(input.SslSupportMethod != null && { SslSupportMethod: input.SslSupportMethod }), - }; -}; +// se_AwsEc2VpnConnectionRoutesDetails omitted. -/** - * serializeAws_restJson1AwsCloudTrailTrailDetails - */ -const se_AwsCloudTrailTrailDetails = (input: AwsCloudTrailTrailDetails, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.CloudWatchLogsRoleArn != null && { CloudWatchLogsRoleArn: input.CloudWatchLogsRoleArn }), - ...(input.HasCustomEventSelectors != null && { HasCustomEventSelectors: input.HasCustomEventSelectors }), - ...(input.HomeRegion != null && { HomeRegion: input.HomeRegion }), - ...(input.IncludeGlobalServiceEvents != null && { IncludeGlobalServiceEvents: input.IncludeGlobalServiceEvents }), - ...(input.IsMultiRegionTrail != null && { IsMultiRegionTrail: input.IsMultiRegionTrail }), - ...(input.IsOrganizationTrail != null && { IsOrganizationTrail: input.IsOrganizationTrail }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LogFileValidationEnabled != null && { LogFileValidationEnabled: input.LogFileValidationEnabled }), - ...(input.Name != null && { Name: input.Name }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SnsTopicName != null && { SnsTopicName: input.SnsTopicName }), - ...(input.TrailArn != null && { TrailArn: input.TrailArn }), - }; -}; +// se_AwsEc2VpnConnectionRoutesList omitted. -/** - * serializeAws_restJson1AwsCloudWatchAlarmDetails - */ -const se_AwsCloudWatchAlarmDetails = (input: AwsCloudWatchAlarmDetails, context: __SerdeContext): any => { - return { - ...(input.ActionsEnabled != null && { ActionsEnabled: input.ActionsEnabled }), - ...(input.AlarmActions != null && { AlarmActions: se_NonEmptyStringList(input.AlarmActions, context) }), - ...(input.AlarmArn != null && { AlarmArn: input.AlarmArn }), - ...(input.AlarmConfigurationUpdatedTimestamp != null && { - AlarmConfigurationUpdatedTimestamp: input.AlarmConfigurationUpdatedTimestamp, - }), - ...(input.AlarmDescription != null && { AlarmDescription: input.AlarmDescription }), - ...(input.AlarmName != null && { AlarmName: input.AlarmName }), - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.DatapointsToAlarm != null && { DatapointsToAlarm: input.DatapointsToAlarm }), - ...(input.Dimensions != null && { Dimensions: se_AwsCloudWatchAlarmDimensionsList(input.Dimensions, context) }), - ...(input.EvaluateLowSampleCountPercentile != null && { - EvaluateLowSampleCountPercentile: input.EvaluateLowSampleCountPercentile, - }), - ...(input.EvaluationPeriods != null && { EvaluationPeriods: input.EvaluationPeriods }), - ...(input.ExtendedStatistic != null && { ExtendedStatistic: input.ExtendedStatistic }), - ...(input.InsufficientDataActions != null && { - InsufficientDataActions: se_NonEmptyStringList(input.InsufficientDataActions, context), - }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.OkActions != null && { OkActions: se_NonEmptyStringList(input.OkActions, context) }), - ...(input.Period != null && { Period: input.Period }), - ...(input.Statistic != null && { Statistic: input.Statistic }), - ...(input.Threshold != null && { Threshold: __serializeFloat(input.Threshold) }), - ...(input.ThresholdMetricId != null && { ThresholdMetricId: input.ThresholdMetricId }), - ...(input.TreatMissingData != null && { TreatMissingData: input.TreatMissingData }), - ...(input.Unit != null && { Unit: input.Unit }), - }; -}; +// se_AwsEc2VpnConnectionVgwTelemetryDetails omitted. -/** - * serializeAws_restJson1AwsCloudWatchAlarmDimensionsDetails - */ -const se_AwsCloudWatchAlarmDimensionsDetails = ( - input: AwsCloudWatchAlarmDimensionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AwsEc2VpnConnectionVgwTelemetryList omitted. -/** - * serializeAws_restJson1AwsCloudWatchAlarmDimensionsList - */ -const se_AwsCloudWatchAlarmDimensionsList = ( - input: AwsCloudWatchAlarmDimensionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCloudWatchAlarmDimensionsDetails(entry, context); - }); -}; +// se_AwsEcrContainerImageDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectArtifactsDetails - */ -const se_AwsCodeBuildProjectArtifactsDetails = ( - input: AwsCodeBuildProjectArtifactsDetails, - context: __SerdeContext -): any => { - return { - ...(input.ArtifactIdentifier != null && { ArtifactIdentifier: input.ArtifactIdentifier }), - ...(input.EncryptionDisabled != null && { EncryptionDisabled: input.EncryptionDisabled }), - ...(input.Location != null && { Location: input.Location }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NamespaceType != null && { NamespaceType: input.NamespaceType }), - ...(input.OverrideArtifactName != null && { OverrideArtifactName: input.OverrideArtifactName }), - ...(input.Packaging != null && { Packaging: input.Packaging }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AwsEcrRepositoryDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectArtifactsList - */ -const se_AwsCodeBuildProjectArtifactsList = ( - input: AwsCodeBuildProjectArtifactsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCodeBuildProjectArtifactsDetails(entry, context); - }); -}; +// se_AwsEcrRepositoryImageScanningConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectDetails - */ -const se_AwsCodeBuildProjectDetails = (input: AwsCodeBuildProjectDetails, context: __SerdeContext): any => { - return { - ...(input.Artifacts != null && { Artifacts: se_AwsCodeBuildProjectArtifactsList(input.Artifacts, context) }), - ...(input.EncryptionKey != null && { EncryptionKey: input.EncryptionKey }), - ...(input.Environment != null && { Environment: se_AwsCodeBuildProjectEnvironment(input.Environment, context) }), - ...(input.LogsConfig != null && { LogsConfig: se_AwsCodeBuildProjectLogsConfigDetails(input.LogsConfig, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SecondaryArtifacts != null && { - SecondaryArtifacts: se_AwsCodeBuildProjectArtifactsList(input.SecondaryArtifacts, context), - }), - ...(input.ServiceRole != null && { ServiceRole: input.ServiceRole }), - ...(input.Source != null && { Source: se_AwsCodeBuildProjectSource(input.Source, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_AwsCodeBuildProjectVpcConfig(input.VpcConfig, context) }), - }; -}; +// se_AwsEcrRepositoryLifecyclePolicyDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectEnvironment - */ -const se_AwsCodeBuildProjectEnvironment = (input: AwsCodeBuildProjectEnvironment, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.EnvironmentVariables != null && { - EnvironmentVariables: se_AwsCodeBuildProjectEnvironmentEnvironmentVariablesList( - input.EnvironmentVariables, - context - ), - }), - ...(input.ImagePullCredentialsType != null && { ImagePullCredentialsType: input.ImagePullCredentialsType }), - ...(input.PrivilegedMode != null && { PrivilegedMode: input.PrivilegedMode }), - ...(input.RegistryCredential != null && { - RegistryCredential: se_AwsCodeBuildProjectEnvironmentRegistryCredential(input.RegistryCredential, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AwsEcsClusterClusterSettingsDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails - */ -const se_AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails = ( - input: AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AwsEcsClusterClusterSettingsList omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectEnvironmentEnvironmentVariablesList - */ -const se_AwsCodeBuildProjectEnvironmentEnvironmentVariablesList = ( - input: AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails(entry, context); - }); -}; +// se_AwsEcsClusterConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectEnvironmentRegistryCredential - */ -const se_AwsCodeBuildProjectEnvironmentRegistryCredential = ( - input: AwsCodeBuildProjectEnvironmentRegistryCredential, - context: __SerdeContext -): any => { - return { - ...(input.Credential != null && { Credential: input.Credential }), - ...(input.CredentialProvider != null && { CredentialProvider: input.CredentialProvider }), - }; -}; +// se_AwsEcsClusterConfigurationExecuteCommandConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails - */ -const se_AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails = ( - input: AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails, - context: __SerdeContext -): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StreamName != null && { StreamName: input.StreamName }), - }; -}; +// se_AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectLogsConfigDetails - */ -const se_AwsCodeBuildProjectLogsConfigDetails = ( - input: AwsCodeBuildProjectLogsConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.CloudWatchLogs != null && { - CloudWatchLogs: se_AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails(input.CloudWatchLogs, context), - }), - ...(input.S3Logs != null && { S3Logs: se_AwsCodeBuildProjectLogsConfigS3LogsDetails(input.S3Logs, context) }), - }; -}; +// se_AwsEcsClusterDefaultCapacityProviderStrategyDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectLogsConfigS3LogsDetails - */ -const se_AwsCodeBuildProjectLogsConfigS3LogsDetails = ( - input: AwsCodeBuildProjectLogsConfigS3LogsDetails, - context: __SerdeContext -): any => { - return { - ...(input.EncryptionDisabled != null && { EncryptionDisabled: input.EncryptionDisabled }), - ...(input.Location != null && { Location: input.Location }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_AwsEcsClusterDefaultCapacityProviderStrategyList omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectSource - */ -const se_AwsCodeBuildProjectSource = (input: AwsCodeBuildProjectSource, context: __SerdeContext): any => { - return { - ...(input.GitCloneDepth != null && { GitCloneDepth: input.GitCloneDepth }), - ...(input.InsecureSsl != null && { InsecureSsl: input.InsecureSsl }), - ...(input.Location != null && { Location: input.Location }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AwsEcsClusterDetails omitted. -/** - * serializeAws_restJson1AwsCodeBuildProjectVpcConfig - */ -const se_AwsCodeBuildProjectVpcConfig = (input: AwsCodeBuildProjectVpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_NonEmptyStringList(input.SecurityGroupIds, context) }), - ...(input.Subnets != null && { Subnets: se_NonEmptyStringList(input.Subnets, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsEcsContainerDetails omitted. -/** - * serializeAws_restJson1AwsCorsConfiguration - */ -const se_AwsCorsConfiguration = (input: AwsCorsConfiguration, context: __SerdeContext): any => { - return { - ...(input.AllowCredentials != null && { AllowCredentials: input.AllowCredentials }), - ...(input.AllowHeaders != null && { AllowHeaders: se_NonEmptyStringList(input.AllowHeaders, context) }), - ...(input.AllowMethods != null && { AllowMethods: se_NonEmptyStringList(input.AllowMethods, context) }), - ...(input.AllowOrigins != null && { AllowOrigins: se_NonEmptyStringList(input.AllowOrigins, context) }), - ...(input.ExposeHeaders != null && { ExposeHeaders: se_NonEmptyStringList(input.ExposeHeaders, context) }), - ...(input.MaxAge != null && { MaxAge: input.MaxAge }), - }; -}; +// se_AwsEcsContainerDetailsList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableAttributeDefinition - */ -const se_AwsDynamoDbTableAttributeDefinition = ( - input: AwsDynamoDbTableAttributeDefinition, - context: __SerdeContext -): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.AttributeType != null && { AttributeType: input.AttributeType }), - }; -}; +// se_AwsEcsServiceCapacityProviderStrategyDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableAttributeDefinitionList - */ -const se_AwsDynamoDbTableAttributeDefinitionList = ( - input: AwsDynamoDbTableAttributeDefinition[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsDynamoDbTableAttributeDefinition(entry, context); - }); -}; +// se_AwsEcsServiceCapacityProviderStrategyList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableBillingModeSummary - */ -const se_AwsDynamoDbTableBillingModeSummary = ( - input: AwsDynamoDbTableBillingModeSummary, - context: __SerdeContext -): any => { - return { - ...(input.BillingMode != null && { BillingMode: input.BillingMode }), - ...(input.LastUpdateToPayPerRequestDateTime != null && { - LastUpdateToPayPerRequestDateTime: input.LastUpdateToPayPerRequestDateTime, - }), - }; -}; +// se_AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableDetails - */ -const se_AwsDynamoDbTableDetails = (input: AwsDynamoDbTableDetails, context: __SerdeContext): any => { - return { - ...(input.AttributeDefinitions != null && { - AttributeDefinitions: se_AwsDynamoDbTableAttributeDefinitionList(input.AttributeDefinitions, context), - }), - ...(input.BillingModeSummary != null && { - BillingModeSummary: se_AwsDynamoDbTableBillingModeSummary(input.BillingModeSummary, context), - }), - ...(input.CreationDateTime != null && { CreationDateTime: input.CreationDateTime }), - ...(input.GlobalSecondaryIndexes != null && { - GlobalSecondaryIndexes: se_AwsDynamoDbTableGlobalSecondaryIndexList(input.GlobalSecondaryIndexes, context), - }), - ...(input.GlobalTableVersion != null && { GlobalTableVersion: input.GlobalTableVersion }), - ...(input.ItemCount != null && { ItemCount: input.ItemCount }), - ...(input.KeySchema != null && { KeySchema: se_AwsDynamoDbTableKeySchemaList(input.KeySchema, context) }), - ...(input.LatestStreamArn != null && { LatestStreamArn: input.LatestStreamArn }), - ...(input.LatestStreamLabel != null && { LatestStreamLabel: input.LatestStreamLabel }), - ...(input.LocalSecondaryIndexes != null && { - LocalSecondaryIndexes: se_AwsDynamoDbTableLocalSecondaryIndexList(input.LocalSecondaryIndexes, context), - }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_AwsDynamoDbTableProvisionedThroughput(input.ProvisionedThroughput, context), - }), - ...(input.Replicas != null && { Replicas: se_AwsDynamoDbTableReplicaList(input.Replicas, context) }), - ...(input.RestoreSummary != null && { - RestoreSummary: se_AwsDynamoDbTableRestoreSummary(input.RestoreSummary, context), - }), - ...(input.SseDescription != null && { - SseDescription: se_AwsDynamoDbTableSseDescription(input.SseDescription, context), - }), - ...(input.StreamSpecification != null && { - StreamSpecification: se_AwsDynamoDbTableStreamSpecification(input.StreamSpecification, context), - }), - ...(input.TableId != null && { TableId: input.TableId }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TableSizeBytes != null && { TableSizeBytes: input.TableSizeBytes }), - ...(input.TableStatus != null && { TableStatus: input.TableStatus }), - }; -}; +// se_AwsEcsServiceDeploymentConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableGlobalSecondaryIndex - */ -const se_AwsDynamoDbTableGlobalSecondaryIndex = ( - input: AwsDynamoDbTableGlobalSecondaryIndex, - context: __SerdeContext -): any => { - return { - ...(input.Backfilling != null && { Backfilling: input.Backfilling }), - ...(input.IndexArn != null && { IndexArn: input.IndexArn }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.IndexSizeBytes != null && { IndexSizeBytes: input.IndexSizeBytes }), - ...(input.IndexStatus != null && { IndexStatus: input.IndexStatus }), - ...(input.ItemCount != null && { ItemCount: input.ItemCount }), - ...(input.KeySchema != null && { KeySchema: se_AwsDynamoDbTableKeySchemaList(input.KeySchema, context) }), - ...(input.Projection != null && { Projection: se_AwsDynamoDbTableProjection(input.Projection, context) }), - ...(input.ProvisionedThroughput != null && { - ProvisionedThroughput: se_AwsDynamoDbTableProvisionedThroughput(input.ProvisionedThroughput, context), - }), - }; -}; +// se_AwsEcsServiceDeploymentControllerDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableGlobalSecondaryIndexList - */ -const se_AwsDynamoDbTableGlobalSecondaryIndexList = ( - input: AwsDynamoDbTableGlobalSecondaryIndex[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsDynamoDbTableGlobalSecondaryIndex(entry, context); - }); -}; +// se_AwsEcsServiceDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableKeySchema - */ -const se_AwsDynamoDbTableKeySchema = (input: AwsDynamoDbTableKeySchema, context: __SerdeContext): any => { - return { - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.KeyType != null && { KeyType: input.KeyType }), - }; -}; +// se_AwsEcsServiceLoadBalancersDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableKeySchemaList - */ -const se_AwsDynamoDbTableKeySchemaList = (input: AwsDynamoDbTableKeySchema[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsDynamoDbTableKeySchema(entry, context); - }); -}; +// se_AwsEcsServiceLoadBalancersList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableLocalSecondaryIndex - */ -const se_AwsDynamoDbTableLocalSecondaryIndex = ( - input: AwsDynamoDbTableLocalSecondaryIndex, - context: __SerdeContext -): any => { - return { - ...(input.IndexArn != null && { IndexArn: input.IndexArn }), - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.KeySchema != null && { KeySchema: se_AwsDynamoDbTableKeySchemaList(input.KeySchema, context) }), - ...(input.Projection != null && { Projection: se_AwsDynamoDbTableProjection(input.Projection, context) }), - }; -}; +// se_AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableLocalSecondaryIndexList - */ -const se_AwsDynamoDbTableLocalSecondaryIndexList = ( - input: AwsDynamoDbTableLocalSecondaryIndex[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsDynamoDbTableLocalSecondaryIndex(entry, context); - }); -}; +// se_AwsEcsServiceNetworkConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableProjection - */ -const se_AwsDynamoDbTableProjection = (input: AwsDynamoDbTableProjection, context: __SerdeContext): any => { - return { - ...(input.NonKeyAttributes != null && { NonKeyAttributes: se_StringList(input.NonKeyAttributes, context) }), - ...(input.ProjectionType != null && { ProjectionType: input.ProjectionType }), - }; -}; +// se_AwsEcsServicePlacementConstraintsDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableProvisionedThroughput - */ -const se_AwsDynamoDbTableProvisionedThroughput = ( - input: AwsDynamoDbTableProvisionedThroughput, - context: __SerdeContext -): any => { - return { - ...(input.LastDecreaseDateTime != null && { LastDecreaseDateTime: input.LastDecreaseDateTime }), - ...(input.LastIncreaseDateTime != null && { LastIncreaseDateTime: input.LastIncreaseDateTime }), - ...(input.NumberOfDecreasesToday != null && { NumberOfDecreasesToday: input.NumberOfDecreasesToday }), - ...(input.ReadCapacityUnits != null && { ReadCapacityUnits: input.ReadCapacityUnits }), - ...(input.WriteCapacityUnits != null && { WriteCapacityUnits: input.WriteCapacityUnits }), - }; -}; +// se_AwsEcsServicePlacementConstraintsList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableProvisionedThroughputOverride - */ -const se_AwsDynamoDbTableProvisionedThroughputOverride = ( - input: AwsDynamoDbTableProvisionedThroughputOverride, - context: __SerdeContext -): any => { - return { - ...(input.ReadCapacityUnits != null && { ReadCapacityUnits: input.ReadCapacityUnits }), - }; -}; +// se_AwsEcsServicePlacementStrategiesDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableReplica - */ -const se_AwsDynamoDbTableReplica = (input: AwsDynamoDbTableReplica, context: __SerdeContext): any => { - return { - ...(input.GlobalSecondaryIndexes != null && { - GlobalSecondaryIndexes: se_AwsDynamoDbTableReplicaGlobalSecondaryIndexList(input.GlobalSecondaryIndexes, context), - }), - ...(input.KmsMasterKeyId != null && { KmsMasterKeyId: input.KmsMasterKeyId }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_AwsDynamoDbTableProvisionedThroughputOverride( - input.ProvisionedThroughputOverride, - context - ), - }), - ...(input.RegionName != null && { RegionName: input.RegionName }), - ...(input.ReplicaStatus != null && { ReplicaStatus: input.ReplicaStatus }), - ...(input.ReplicaStatusDescription != null && { ReplicaStatusDescription: input.ReplicaStatusDescription }), - }; -}; +// se_AwsEcsServicePlacementStrategiesList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableReplicaGlobalSecondaryIndex - */ -const se_AwsDynamoDbTableReplicaGlobalSecondaryIndex = ( - input: AwsDynamoDbTableReplicaGlobalSecondaryIndex, - context: __SerdeContext -): any => { - return { - ...(input.IndexName != null && { IndexName: input.IndexName }), - ...(input.ProvisionedThroughputOverride != null && { - ProvisionedThroughputOverride: se_AwsDynamoDbTableProvisionedThroughputOverride( - input.ProvisionedThroughputOverride, - context - ), - }), - }; -}; +// se_AwsEcsServiceServiceRegistriesDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableReplicaGlobalSecondaryIndexList - */ -const se_AwsDynamoDbTableReplicaGlobalSecondaryIndexList = ( - input: AwsDynamoDbTableReplicaGlobalSecondaryIndex[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsDynamoDbTableReplicaGlobalSecondaryIndex(entry, context); - }); -}; +// se_AwsEcsServiceServiceRegistriesList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableReplicaList - */ -const se_AwsDynamoDbTableReplicaList = (input: AwsDynamoDbTableReplica[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsDynamoDbTableReplica(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableRestoreSummary - */ -const se_AwsDynamoDbTableRestoreSummary = (input: AwsDynamoDbTableRestoreSummary, context: __SerdeContext): any => { - return { - ...(input.RestoreDateTime != null && { RestoreDateTime: input.RestoreDateTime }), - ...(input.RestoreInProgress != null && { RestoreInProgress: input.RestoreInProgress }), - ...(input.SourceBackupArn != null && { SourceBackupArn: input.SourceBackupArn }), - ...(input.SourceTableArn != null && { SourceTableArn: input.SourceTableArn }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsDependsOnList omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableSseDescription - */ -const se_AwsDynamoDbTableSseDescription = (input: AwsDynamoDbTableSseDescription, context: __SerdeContext): any => { - return { - ...(input.InaccessibleEncryptionDateTime != null && { - InaccessibleEncryptionDateTime: input.InaccessibleEncryptionDateTime, - }), - ...(input.KmsMasterKeyArn != null && { KmsMasterKeyArn: input.KmsMasterKeyArn }), - ...(input.SseType != null && { SseType: input.SseType }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsDetails omitted. -/** - * serializeAws_restJson1AwsDynamoDbTableStreamSpecification - */ -const se_AwsDynamoDbTableStreamSpecification = ( - input: AwsDynamoDbTableStreamSpecification, - context: __SerdeContext -): any => { - return { - ...(input.StreamEnabled != null && { StreamEnabled: input.StreamEnabled }), - ...(input.StreamViewType != null && { StreamViewType: input.StreamViewType }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails omitted. -/** - * serializeAws_restJson1AwsEc2EipDetails - */ -const se_AwsEc2EipDetails = (input: AwsEc2EipDetails, context: __SerdeContext): any => { - return { - ...(input.AllocationId != null && { AllocationId: input.AllocationId }), - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.NetworkBorderGroup != null && { NetworkBorderGroup: input.NetworkBorderGroup }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.NetworkInterfaceOwnerId != null && { NetworkInterfaceOwnerId: input.NetworkInterfaceOwnerId }), - ...(input.PrivateIpAddress != null && { PrivateIpAddress: input.PrivateIpAddress }), - ...(input.PublicIp != null && { PublicIp: input.PublicIp }), - ...(input.PublicIpv4Pool != null && { PublicIpv4Pool: input.PublicIpv4Pool }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails omitted. -/** - * serializeAws_restJson1AwsEc2InstanceDetails - */ -const se_AwsEc2InstanceDetails = (input: AwsEc2InstanceDetails, context: __SerdeContext): any => { - return { - ...(input.IamInstanceProfileArn != null && { IamInstanceProfileArn: input.IamInstanceProfileArn }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.IpV4Addresses != null && { IpV4Addresses: se_StringList(input.IpV4Addresses, context) }), - ...(input.IpV6Addresses != null && { IpV6Addresses: se_StringList(input.IpV6Addresses, context) }), - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.LaunchedAt != null && { LaunchedAt: input.LaunchedAt }), - ...(input.MetadataOptions != null && { - MetadataOptions: se_AwsEc2InstanceMetadataOptions(input.MetadataOptions, context), - }), - ...(input.Monitoring != null && { Monitoring: se_AwsEc2InstanceMonitoringDetails(input.Monitoring, context) }), - ...(input.NetworkInterfaces != null && { - NetworkInterfaces: se_AwsEc2InstanceNetworkInterfacesList(input.NetworkInterfaces, context), - }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VirtualizationType != null && { VirtualizationType: input.VirtualizationType }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList omitted. -/** - * serializeAws_restJson1AwsEc2InstanceMetadataOptions - */ -const se_AwsEc2InstanceMetadataOptions = (input: AwsEc2InstanceMetadataOptions, context: __SerdeContext): any => { - return { - ...(input.HttpEndpoint != null && { HttpEndpoint: input.HttpEndpoint }), - ...(input.HttpProtocolIpv6 != null && { HttpProtocolIpv6: input.HttpProtocolIpv6 }), - ...(input.HttpPutResponseHopLimit != null && { HttpPutResponseHopLimit: input.HttpPutResponseHopLimit }), - ...(input.HttpTokens != null && { HttpTokens: input.HttpTokens }), - ...(input.InstanceMetadataTags != null && { InstanceMetadataTags: input.InstanceMetadataTags }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList omitted. -/** - * serializeAws_restJson1AwsEc2InstanceMonitoringDetails - */ -const se_AwsEc2InstanceMonitoringDetails = (input: AwsEc2InstanceMonitoringDetails, context: __SerdeContext): any => { - return { - ...(input.State != null && { State: input.State }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails omitted. -/** - * serializeAws_restJson1AwsEc2InstanceNetworkInterfacesDetails - */ -const se_AwsEc2InstanceNetworkInterfacesDetails = ( - input: AwsEc2InstanceNetworkInterfacesDetails, - context: __SerdeContext -): any => { - return { - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList omitted. -/** - * serializeAws_restJson1AwsEc2InstanceNetworkInterfacesList - */ -const se_AwsEc2InstanceNetworkInterfacesList = ( - input: AwsEc2InstanceNetworkInterfacesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2InstanceNetworkInterfacesDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails - */ -const se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails = ( - input: AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.Ebs != null && { Ebs: se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails(input.Ebs, context) }), - ...(input.NoDevice != null && { NoDevice: input.NoDevice }), - ...(input.VirtualName != null && { VirtualName: input.VirtualName }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails - */ -const se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails = ( - input: AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeleteOnTermination != null && { DeleteOnTermination: input.DeleteOnTermination }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.Throughput != null && { Throughput: input.Throughput }), - ...(input.VolumeSize != null && { VolumeSize: input.VolumeSize }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataBlockDeviceMappingSetList - */ -const se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetList = ( - input: AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails - */ -const se_AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails = ( - input: AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails, - context: __SerdeContext -): any => { - return { - ...(input.CapacityReservationId != null && { CapacityReservationId: input.CapacityReservationId }), - ...(input.CapacityReservationResourceGroupArn != null && { - CapacityReservationResourceGroupArn: input.CapacityReservationResourceGroupArn, - }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails - */ -const se_AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails = ( - input: AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails, - context: __SerdeContext -): any => { - return { - ...(input.CapacityReservationPreference != null && { - CapacityReservationPreference: input.CapacityReservationPreference, - }), - ...(input.CapacityReservationTarget != null && { - CapacityReservationTarget: - se_AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails( - input.CapacityReservationTarget, - context - ), - }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataCpuOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataCpuOptionsDetails = ( - input: AwsEc2LaunchTemplateDataCpuOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.CoreCount != null && { CoreCount: input.CoreCount }), - ...(input.ThreadsPerCore != null && { ThreadsPerCore: input.ThreadsPerCore }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataCreditSpecificationDetails - */ -const se_AwsEc2LaunchTemplateDataCreditSpecificationDetails = ( - input: AwsEc2LaunchTemplateDataCreditSpecificationDetails, - context: __SerdeContext -): any => { - return { - ...(input.CpuCredits != null && { CpuCredits: input.CpuCredits }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataDetails - */ -const se_AwsEc2LaunchTemplateDataDetails = (input: AwsEc2LaunchTemplateDataDetails, context: __SerdeContext): any => { - return { - ...(input.BlockDeviceMappingSet != null && { - BlockDeviceMappingSet: se_AwsEc2LaunchTemplateDataBlockDeviceMappingSetList(input.BlockDeviceMappingSet, context), - }), - ...(input.CapacityReservationSpecification != null && { - CapacityReservationSpecification: se_AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails( - input.CapacityReservationSpecification, - context - ), - }), - ...(input.CpuOptions != null && { - CpuOptions: se_AwsEc2LaunchTemplateDataCpuOptionsDetails(input.CpuOptions, context), - }), - ...(input.CreditSpecification != null && { - CreditSpecification: se_AwsEc2LaunchTemplateDataCreditSpecificationDetails(input.CreditSpecification, context), - }), - ...(input.DisableApiStop != null && { DisableApiStop: input.DisableApiStop }), - ...(input.DisableApiTermination != null && { DisableApiTermination: input.DisableApiTermination }), - ...(input.EbsOptimized != null && { EbsOptimized: input.EbsOptimized }), - ...(input.ElasticGpuSpecificationSet != null && { - ElasticGpuSpecificationSet: se_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList( - input.ElasticGpuSpecificationSet, - context - ), - }), - ...(input.ElasticInferenceAcceleratorSet != null && { - ElasticInferenceAcceleratorSet: se_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList( - input.ElasticInferenceAcceleratorSet, - context - ), - }), - ...(input.EnclaveOptions != null && { - EnclaveOptions: se_AwsEc2LaunchTemplateDataEnclaveOptionsDetails(input.EnclaveOptions, context), - }), - ...(input.HibernationOptions != null && { - HibernationOptions: se_AwsEc2LaunchTemplateDataHibernationOptionsDetails(input.HibernationOptions, context), - }), - ...(input.IamInstanceProfile != null && { - IamInstanceProfile: se_AwsEc2LaunchTemplateDataIamInstanceProfileDetails(input.IamInstanceProfile, context), - }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.InstanceInitiatedShutdownBehavior != null && { - InstanceInitiatedShutdownBehavior: input.InstanceInitiatedShutdownBehavior, - }), - ...(input.InstanceMarketOptions != null && { - InstanceMarketOptions: se_AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails( - input.InstanceMarketOptions, - context - ), - }), - ...(input.InstanceRequirements != null && { - InstanceRequirements: se_AwsEc2LaunchTemplateDataInstanceRequirementsDetails(input.InstanceRequirements, context), - }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KernelId != null && { KernelId: input.KernelId }), - ...(input.KeyName != null && { KeyName: input.KeyName }), - ...(input.LicenseSet != null && { - LicenseSet: se_AwsEc2LaunchTemplateDataLicenseSetList(input.LicenseSet, context), - }), - ...(input.MaintenanceOptions != null && { - MaintenanceOptions: se_AwsEc2LaunchTemplateDataMaintenanceOptionsDetails(input.MaintenanceOptions, context), - }), - ...(input.MetadataOptions != null && { - MetadataOptions: se_AwsEc2LaunchTemplateDataMetadataOptionsDetails(input.MetadataOptions, context), - }), - ...(input.Monitoring != null && { - Monitoring: se_AwsEc2LaunchTemplateDataMonitoringDetails(input.Monitoring, context), - }), - ...(input.NetworkInterfaceSet != null && { - NetworkInterfaceSet: se_AwsEc2LaunchTemplateDataNetworkInterfaceSetList(input.NetworkInterfaceSet, context), - }), - ...(input.Placement != null && { - Placement: se_AwsEc2LaunchTemplateDataPlacementDetails(input.Placement, context), - }), - ...(input.PrivateDnsNameOptions != null && { - PrivateDnsNameOptions: se_AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails( - input.PrivateDnsNameOptions, - context - ), - }), - ...(input.RamDiskId != null && { RamDiskId: input.RamDiskId }), - ...(input.SecurityGroupIdSet != null && { - SecurityGroupIdSet: se_NonEmptyStringList(input.SecurityGroupIdSet, context), - }), - ...(input.SecurityGroupSet != null && { SecurityGroupSet: se_NonEmptyStringList(input.SecurityGroupSet, context) }), - ...(input.UserData != null && { UserData: input.UserData }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails - */ -const se_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails = ( - input: AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList - */ -const se_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList = ( - input: AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails - */ -const se_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails = ( - input: AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails, - context: __SerdeContext -): any => { - return { - ...(input.Count != null && { Count: input.Count }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList - */ -const se_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList = ( - input: AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataEnclaveOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataEnclaveOptionsDetails = ( - input: AwsEc2LaunchTemplateDataEnclaveOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsMountPointsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataHibernationOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataHibernationOptionsDetails = ( - input: AwsEc2LaunchTemplateDataHibernationOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Configured != null && { Configured: input.Configured }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataIamInstanceProfileDetails - */ -const se_AwsEc2LaunchTemplateDataIamInstanceProfileDetails = ( - input: AwsEc2LaunchTemplateDataIamInstanceProfileDetails, - context: __SerdeContext -): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails = ( - input: AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.MarketType != null && { MarketType: input.MarketType }), - ...(input.SpotOptions != null && { - SpotOptions: se_AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails(input.SpotOptions, context), - }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails = ( - input: AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.BlockDurationMinutes != null && { BlockDurationMinutes: input.BlockDurationMinutes }), - ...(input.InstanceInterruptionBehavior != null && { - InstanceInterruptionBehavior: input.InstanceInterruptionBehavior, - }), - ...(input.MaxPrice != null && { MaxPrice: input.MaxPrice }), - ...(input.SpotInstanceType != null && { SpotInstanceType: input.SpotInstanceType }), - ...(input.ValidUntil != null && { ValidUntil: input.ValidUntil }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: input.Max }), - ...(input.Min != null && { Min: input.Min }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: input.Max }), - ...(input.Min != null && { Min: input.Min }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: input.Max }), - ...(input.Min != null && { Min: input.Min }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsSecretsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsDetails, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorCount != null && { - AcceleratorCount: se_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails( - input.AcceleratorCount, - context - ), - }), - ...(input.AcceleratorManufacturers != null && { - AcceleratorManufacturers: se_NonEmptyStringList(input.AcceleratorManufacturers, context), - }), - ...(input.AcceleratorNames != null && { AcceleratorNames: se_NonEmptyStringList(input.AcceleratorNames, context) }), - ...(input.AcceleratorTotalMemoryMiB != null && { - AcceleratorTotalMemoryMiB: se_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails( - input.AcceleratorTotalMemoryMiB, - context - ), - }), - ...(input.AcceleratorTypes != null && { AcceleratorTypes: se_NonEmptyStringList(input.AcceleratorTypes, context) }), - ...(input.BareMetal != null && { BareMetal: input.BareMetal }), - ...(input.BaselineEbsBandwidthMbps != null && { - BaselineEbsBandwidthMbps: se_AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails( - input.BaselineEbsBandwidthMbps, - context - ), - }), - ...(input.BurstablePerformance != null && { BurstablePerformance: input.BurstablePerformance }), - ...(input.CpuManufacturers != null && { CpuManufacturers: se_NonEmptyStringList(input.CpuManufacturers, context) }), - ...(input.ExcludedInstanceTypes != null && { - ExcludedInstanceTypes: se_NonEmptyStringList(input.ExcludedInstanceTypes, context), - }), - ...(input.InstanceGenerations != null && { - InstanceGenerations: se_NonEmptyStringList(input.InstanceGenerations, context), - }), - ...(input.LocalStorage != null && { LocalStorage: input.LocalStorage }), - ...(input.LocalStorageTypes != null && { - LocalStorageTypes: se_NonEmptyStringList(input.LocalStorageTypes, context), - }), - ...(input.MemoryGiBPerVCpu != null && { - MemoryGiBPerVCpu: se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails( - input.MemoryGiBPerVCpu, - context - ), - }), - ...(input.MemoryMiB != null && { - MemoryMiB: se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails(input.MemoryMiB, context), - }), - ...(input.NetworkInterfaceCount != null && { - NetworkInterfaceCount: se_AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails( - input.NetworkInterfaceCount, - context - ), - }), - ...(input.OnDemandMaxPricePercentageOverLowestPrice != null && { - OnDemandMaxPricePercentageOverLowestPrice: input.OnDemandMaxPricePercentageOverLowestPrice, - }), - ...(input.RequireHibernateSupport != null && { RequireHibernateSupport: input.RequireHibernateSupport }), - ...(input.SpotMaxPricePercentageOverLowestPrice != null && { - SpotMaxPricePercentageOverLowestPrice: input.SpotMaxPricePercentageOverLowestPrice, - }), - ...(input.TotalLocalStorageGB != null && { - TotalLocalStorageGB: se_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails( - input.TotalLocalStorageGB, - context - ), - }), - ...(input.VCpuCount != null && { - VCpuCount: se_AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails(input.VCpuCount, context), - }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: __serializeFloat(input.Max) }), - ...(input.Min != null && { Min: __serializeFloat(input.Min) }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: input.Max }), - ...(input.Min != null && { Min: input.Min }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: input.Max }), - ...(input.Min != null && { Min: input.Min }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsUlimitsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: __serializeFloat(input.Max) }), - ...(input.Min != null && { Min: __serializeFloat(input.Min) }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails - */ -const se_AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails = ( - input: AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails, - context: __SerdeContext -): any => { - return { - ...(input.Max != null && { Max: input.Max }), - ...(input.Min != null && { Min: input.Min }), - }; -}; +// se_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataLicenseSetDetails - */ -const se_AwsEc2LaunchTemplateDataLicenseSetDetails = ( - input: AwsEc2LaunchTemplateDataLicenseSetDetails, - context: __SerdeContext -): any => { - return { - ...(input.LicenseConfigurationArn != null && { LicenseConfigurationArn: input.LicenseConfigurationArn }), - }; -}; +// se_AwsEcsTaskDefinitionDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataLicenseSetList - */ -const se_AwsEc2LaunchTemplateDataLicenseSetList = ( - input: AwsEc2LaunchTemplateDataLicenseSetDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataLicenseSetDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionInferenceAcceleratorsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataMaintenanceOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataMaintenanceOptionsDetails = ( - input: AwsEc2LaunchTemplateDataMaintenanceOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.AutoRecovery != null && { AutoRecovery: input.AutoRecovery }), - }; -}; +// se_AwsEcsTaskDefinitionInferenceAcceleratorsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataMetadataOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataMetadataOptionsDetails = ( - input: AwsEc2LaunchTemplateDataMetadataOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.HttpEndpoint != null && { HttpEndpoint: input.HttpEndpoint }), - ...(input.HttpProtocolIpv6 != null && { HttpProtocolIpv6: input.HttpProtocolIpv6 }), - ...(input.HttpPutResponseHopLimit != null && { HttpPutResponseHopLimit: input.HttpPutResponseHopLimit }), - ...(input.HttpTokens != null && { HttpTokens: input.HttpTokens }), - ...(input.InstanceMetadataTags != null && { InstanceMetadataTags: input.InstanceMetadataTags }), - }; -}; +// se_AwsEcsTaskDefinitionPlacementConstraintsDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataMonitoringDetails - */ -const se_AwsEc2LaunchTemplateDataMonitoringDetails = ( - input: AwsEc2LaunchTemplateDataMonitoringDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; +// se_AwsEcsTaskDefinitionPlacementConstraintsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssociateCarrierIpAddress != null && { AssociateCarrierIpAddress: input.AssociateCarrierIpAddress }), - ...(input.AssociatePublicIpAddress != null && { AssociatePublicIpAddress: input.AssociatePublicIpAddress }), - ...(input.DeleteOnTermination != null && { DeleteOnTermination: input.DeleteOnTermination }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceIndex != null && { DeviceIndex: input.DeviceIndex }), - ...(input.Groups != null && { Groups: se_NonEmptyStringList(input.Groups, context) }), - ...(input.InterfaceType != null && { InterfaceType: input.InterfaceType }), - ...(input.Ipv4PrefixCount != null && { Ipv4PrefixCount: input.Ipv4PrefixCount }), - ...(input.Ipv4Prefixes != null && { - Ipv4Prefixes: se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList(input.Ipv4Prefixes, context), - }), - ...(input.Ipv6AddressCount != null && { Ipv6AddressCount: input.Ipv6AddressCount }), - ...(input.Ipv6Addresses != null && { - Ipv6Addresses: se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList(input.Ipv6Addresses, context), - }), - ...(input.Ipv6PrefixCount != null && { Ipv6PrefixCount: input.Ipv6PrefixCount }), - ...(input.Ipv6Prefixes != null && { - Ipv6Prefixes: se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList(input.Ipv6Prefixes, context), - }), - ...(input.NetworkCardIndex != null && { NetworkCardIndex: input.NetworkCardIndex }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.PrivateIpAddress != null && { PrivateIpAddress: input.PrivateIpAddress }), - ...(input.PrivateIpAddresses != null && { - PrivateIpAddresses: se_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList( - input.PrivateIpAddresses, - context - ), - }), - ...(input.SecondaryPrivateIpAddressCount != null && { - SecondaryPrivateIpAddressCount: input.SecondaryPrivateIpAddressCount, - }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; +// se_AwsEcsTaskDefinitionProxyConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Ipv4Prefix != null && { Ipv4Prefix: input.Ipv4Prefix }), - }; -}; +// se_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Ipv6Address != null && { Ipv6Address: input.Ipv6Address }), - }; -}; +// se_AwsEcsTaskDefinitionVolumesDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Ipv6Prefix != null && { Ipv6Prefix: input.Ipv6Prefix }), - }; -}; +// se_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetList - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetList = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails(entry, context); - }); -}; +// se_AwsEcsTaskDefinitionVolumesHostDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Primary != null && { Primary: input.Primary }), - ...(input.PrivateIpAddress != null && { PrivateIpAddress: input.PrivateIpAddress }), - }; -}; +// se_AwsEcsTaskDefinitionVolumesList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList - */ -const se_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList = ( - input: AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails(entry, context); - }); -}; +// se_AwsEcsTaskDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataPlacementDetails - */ -const se_AwsEc2LaunchTemplateDataPlacementDetails = ( - input: AwsEc2LaunchTemplateDataPlacementDetails, - context: __SerdeContext -): any => { - return { - ...(input.Affinity != null && { Affinity: input.Affinity }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.HostId != null && { HostId: input.HostId }), - ...(input.HostResourceGroupArn != null && { HostResourceGroupArn: input.HostResourceGroupArn }), - ...(input.PartitionNumber != null && { PartitionNumber: input.PartitionNumber }), - ...(input.SpreadDomain != null && { SpreadDomain: input.SpreadDomain }), - ...(input.Tenancy != null && { Tenancy: input.Tenancy }), - }; -}; +// se_AwsEcsTaskVolumeDetails omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails - */ -const se_AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails = ( - input: AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.EnableResourceNameDnsAAAARecord != null && { - EnableResourceNameDnsAAAARecord: input.EnableResourceNameDnsAAAARecord, - }), - ...(input.EnableResourceNameDnsARecord != null && { - EnableResourceNameDnsARecord: input.EnableResourceNameDnsARecord, - }), - ...(input.HostnameType != null && { HostnameType: input.HostnameType }), - }; -}; +// se_AwsEcsTaskVolumeDetailsList omitted. -/** - * serializeAws_restJson1AwsEc2LaunchTemplateDetails - */ -const se_AwsEc2LaunchTemplateDetails = (input: AwsEc2LaunchTemplateDetails, context: __SerdeContext): any => { - return { - ...(input.DefaultVersionNumber != null && { DefaultVersionNumber: input.DefaultVersionNumber }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LatestVersionNumber != null && { LatestVersionNumber: input.LatestVersionNumber }), - ...(input.LaunchTemplateData != null && { - LaunchTemplateData: se_AwsEc2LaunchTemplateDataDetails(input.LaunchTemplateData, context), - }), - ...(input.LaunchTemplateName != null && { LaunchTemplateName: input.LaunchTemplateName }), - }; -}; +// se_AwsEcsTaskVolumeHostDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkAclAssociation - */ -const se_AwsEc2NetworkAclAssociation = (input: AwsEc2NetworkAclAssociation, context: __SerdeContext): any => { - return { - ...(input.NetworkAclAssociationId != null && { NetworkAclAssociationId: input.NetworkAclAssociationId }), - ...(input.NetworkAclId != null && { NetworkAclId: input.NetworkAclId }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; +// se_AwsEfsAccessPointDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkAclAssociationList - */ -const se_AwsEc2NetworkAclAssociationList = (input: AwsEc2NetworkAclAssociation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2NetworkAclAssociation(entry, context); - }); -}; +// se_AwsEfsAccessPointPosixUserDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkAclDetails - */ -const se_AwsEc2NetworkAclDetails = (input: AwsEc2NetworkAclDetails, context: __SerdeContext): any => { - return { - ...(input.Associations != null && { - Associations: se_AwsEc2NetworkAclAssociationList(input.Associations, context), - }), - ...(input.Entries != null && { Entries: se_AwsEc2NetworkAclEntryList(input.Entries, context) }), - ...(input.IsDefault != null && { IsDefault: input.IsDefault }), - ...(input.NetworkAclId != null && { NetworkAclId: input.NetworkAclId }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsEfsAccessPointRootDirectoryCreationInfoDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkAclEntry - */ -const se_AwsEc2NetworkAclEntry = (input: AwsEc2NetworkAclEntry, context: __SerdeContext): any => { - return { - ...(input.CidrBlock != null && { CidrBlock: input.CidrBlock }), - ...(input.Egress != null && { Egress: input.Egress }), - ...(input.IcmpTypeCode != null && { IcmpTypeCode: se_IcmpTypeCode(input.IcmpTypeCode, context) }), - ...(input.Ipv6CidrBlock != null && { Ipv6CidrBlock: input.Ipv6CidrBlock }), - ...(input.PortRange != null && { PortRange: se_PortRangeFromTo(input.PortRange, context) }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.RuleAction != null && { RuleAction: input.RuleAction }), - ...(input.RuleNumber != null && { RuleNumber: input.RuleNumber }), - }; -}; +// se_AwsEfsAccessPointRootDirectoryDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkAclEntryList - */ -const se_AwsEc2NetworkAclEntryList = (input: AwsEc2NetworkAclEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2NetworkAclEntry(entry, context); - }); -}; +// se_AwsEksClusterDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfaceAttachment - */ -const se_AwsEc2NetworkInterfaceAttachment = (input: AwsEc2NetworkInterfaceAttachment, context: __SerdeContext): any => { - return { - ...(input.AttachTime != null && { AttachTime: input.AttachTime }), - ...(input.AttachmentId != null && { AttachmentId: input.AttachmentId }), - ...(input.DeleteOnTermination != null && { DeleteOnTermination: input.DeleteOnTermination }), - ...(input.DeviceIndex != null && { DeviceIndex: input.DeviceIndex }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.InstanceOwnerId != null && { InstanceOwnerId: input.InstanceOwnerId }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_AwsEksClusterLoggingClusterLoggingDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfaceDetails - */ -const se_AwsEc2NetworkInterfaceDetails = (input: AwsEc2NetworkInterfaceDetails, context: __SerdeContext): any => { - return { - ...(input.Attachment != null && { Attachment: se_AwsEc2NetworkInterfaceAttachment(input.Attachment, context) }), - ...(input.IpV6Addresses != null && { - IpV6Addresses: se_AwsEc2NetworkInterfaceIpV6AddressList(input.IpV6Addresses, context), - }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.PrivateIpAddresses != null && { - PrivateIpAddresses: se_AwsEc2NetworkInterfacePrivateIpAddressList(input.PrivateIpAddresses, context), - }), - ...(input.PublicDnsName != null && { PublicDnsName: input.PublicDnsName }), - ...(input.PublicIp != null && { PublicIp: input.PublicIp }), - ...(input.SecurityGroups != null && { - SecurityGroups: se_AwsEc2NetworkInterfaceSecurityGroupList(input.SecurityGroups, context), - }), - ...(input.SourceDestCheck != null && { SourceDestCheck: input.SourceDestCheck }), - }; -}; +// se_AwsEksClusterLoggingClusterLoggingList omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfaceIpV6AddressDetail - */ -const se_AwsEc2NetworkInterfaceIpV6AddressDetail = ( - input: AwsEc2NetworkInterfaceIpV6AddressDetail, - context: __SerdeContext -): any => { - return { - ...(input.IpV6Address != null && { IpV6Address: input.IpV6Address }), - }; -}; +// se_AwsEksClusterLoggingDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfaceIpV6AddressList - */ -const se_AwsEc2NetworkInterfaceIpV6AddressList = ( - input: AwsEc2NetworkInterfaceIpV6AddressDetail[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2NetworkInterfaceIpV6AddressDetail(entry, context); - }); -}; +// se_AwsEksClusterResourcesVpcConfigDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfacePrivateIpAddressDetail - */ -const se_AwsEc2NetworkInterfacePrivateIpAddressDetail = ( - input: AwsEc2NetworkInterfacePrivateIpAddressDetail, - context: __SerdeContext -): any => { - return { - ...(input.PrivateDnsName != null && { PrivateDnsName: input.PrivateDnsName }), - ...(input.PrivateIpAddress != null && { PrivateIpAddress: input.PrivateIpAddress }), - }; -}; +// se_AwsElasticBeanstalkEnvironmentDetails omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfacePrivateIpAddressList - */ -const se_AwsEc2NetworkInterfacePrivateIpAddressList = ( - input: AwsEc2NetworkInterfacePrivateIpAddressDetail[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2NetworkInterfacePrivateIpAddressDetail(entry, context); - }); -}; +// se_AwsElasticBeanstalkEnvironmentEnvironmentLink omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfaceSecurityGroup - */ -const se_AwsEc2NetworkInterfaceSecurityGroup = ( - input: AwsEc2NetworkInterfaceSecurityGroup, - context: __SerdeContext -): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }; -}; +// se_AwsElasticBeanstalkEnvironmentEnvironmentLinks omitted. -/** - * serializeAws_restJson1AwsEc2NetworkInterfaceSecurityGroupList - */ -const se_AwsEc2NetworkInterfaceSecurityGroupList = ( - input: AwsEc2NetworkInterfaceSecurityGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2NetworkInterfaceSecurityGroup(entry, context); - }); -}; +// se_AwsElasticBeanstalkEnvironmentOptionSetting omitted. -/** - * serializeAws_restJson1AwsEc2RouteTableDetails - */ -const se_AwsEc2RouteTableDetails = (input: AwsEc2RouteTableDetails, context: __SerdeContext): any => { - return { - ...(input.AssociationSet != null && { AssociationSet: se_AssociationSetList(input.AssociationSet, context) }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.PropagatingVgwSet != null && { - PropagatingVgwSet: se_PropagatingVgwSetList(input.PropagatingVgwSet, context), - }), - ...(input.RouteSet != null && { RouteSet: se_RouteSetList(input.RouteSet, context) }), - ...(input.RouteTableId != null && { RouteTableId: input.RouteTableId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsElasticBeanstalkEnvironmentOptionSettings omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupDetails - */ -const se_AwsEc2SecurityGroupDetails = (input: AwsEc2SecurityGroupDetails, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.IpPermissions != null && { - IpPermissions: se_AwsEc2SecurityGroupIpPermissionList(input.IpPermissions, context), - }), - ...(input.IpPermissionsEgress != null && { - IpPermissionsEgress: se_AwsEc2SecurityGroupIpPermissionList(input.IpPermissionsEgress, context), - }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsElasticBeanstalkEnvironmentTier omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupIpPermission - */ -const se_AwsEc2SecurityGroupIpPermission = (input: AwsEc2SecurityGroupIpPermission, context: __SerdeContext): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.IpProtocol != null && { IpProtocol: input.IpProtocol }), - ...(input.IpRanges != null && { IpRanges: se_AwsEc2SecurityGroupIpRangeList(input.IpRanges, context) }), - ...(input.Ipv6Ranges != null && { Ipv6Ranges: se_AwsEc2SecurityGroupIpv6RangeList(input.Ipv6Ranges, context) }), - ...(input.PrefixListIds != null && { - PrefixListIds: se_AwsEc2SecurityGroupPrefixListIdList(input.PrefixListIds, context), - }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - ...(input.UserIdGroupPairs != null && { - UserIdGroupPairs: se_AwsEc2SecurityGroupUserIdGroupPairList(input.UserIdGroupPairs, context), - }), - }; -}; +// se_AwsElasticsearchDomainDetails omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupIpPermissionList - */ -const se_AwsEc2SecurityGroupIpPermissionList = ( - input: AwsEc2SecurityGroupIpPermission[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2SecurityGroupIpPermission(entry, context); - }); -}; +// se_AwsElasticsearchDomainDomainEndpointOptions omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupIpRange - */ -const se_AwsEc2SecurityGroupIpRange = (input: AwsEc2SecurityGroupIpRange, context: __SerdeContext): any => { - return { - ...(input.CidrIp != null && { CidrIp: input.CidrIp }), - }; -}; +// se_AwsElasticsearchDomainElasticsearchClusterConfigDetails omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupIpRangeList - */ -const se_AwsEc2SecurityGroupIpRangeList = (input: AwsEc2SecurityGroupIpRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2SecurityGroupIpRange(entry, context); - }); -}; +// se_AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupIpv6Range - */ -const se_AwsEc2SecurityGroupIpv6Range = (input: AwsEc2SecurityGroupIpv6Range, context: __SerdeContext): any => { - return { - ...(input.CidrIpv6 != null && { CidrIpv6: input.CidrIpv6 }), - }; -}; +// se_AwsElasticsearchDomainEncryptionAtRestOptions omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupIpv6RangeList - */ -const se_AwsEc2SecurityGroupIpv6RangeList = (input: AwsEc2SecurityGroupIpv6Range[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2SecurityGroupIpv6Range(entry, context); - }); -}; +// se_AwsElasticsearchDomainLogPublishingOptions omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupPrefixListId - */ -const se_AwsEc2SecurityGroupPrefixListId = (input: AwsEc2SecurityGroupPrefixListId, context: __SerdeContext): any => { - return { - ...(input.PrefixListId != null && { PrefixListId: input.PrefixListId }), - }; -}; +// se_AwsElasticsearchDomainLogPublishingOptionsLogConfig omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupPrefixListIdList - */ -const se_AwsEc2SecurityGroupPrefixListIdList = ( - input: AwsEc2SecurityGroupPrefixListId[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2SecurityGroupPrefixListId(entry, context); - }); -}; +// se_AwsElasticsearchDomainNodeToNodeEncryptionOptions omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupUserIdGroupPair - */ -const se_AwsEc2SecurityGroupUserIdGroupPair = ( - input: AwsEc2SecurityGroupUserIdGroupPair, - context: __SerdeContext -): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.PeeringStatus != null && { PeeringStatus: input.PeeringStatus }), - ...(input.UserId != null && { UserId: input.UserId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - ...(input.VpcPeeringConnectionId != null && { VpcPeeringConnectionId: input.VpcPeeringConnectionId }), - }; -}; +// se_AwsElasticsearchDomainServiceSoftwareOptions omitted. -/** - * serializeAws_restJson1AwsEc2SecurityGroupUserIdGroupPairList - */ -const se_AwsEc2SecurityGroupUserIdGroupPairList = ( - input: AwsEc2SecurityGroupUserIdGroupPair[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2SecurityGroupUserIdGroupPair(entry, context); - }); -}; +// se_AwsElasticsearchDomainVPCOptions omitted. -/** - * serializeAws_restJson1AwsEc2SubnetDetails - */ -const se_AwsEc2SubnetDetails = (input: AwsEc2SubnetDetails, context: __SerdeContext): any => { - return { - ...(input.AssignIpv6AddressOnCreation != null && { - AssignIpv6AddressOnCreation: input.AssignIpv6AddressOnCreation, - }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.AvailabilityZoneId != null && { AvailabilityZoneId: input.AvailabilityZoneId }), - ...(input.AvailableIpAddressCount != null && { AvailableIpAddressCount: input.AvailableIpAddressCount }), - ...(input.CidrBlock != null && { CidrBlock: input.CidrBlock }), - ...(input.DefaultForAz != null && { DefaultForAz: input.DefaultForAz }), - ...(input.Ipv6CidrBlockAssociationSet != null && { - Ipv6CidrBlockAssociationSet: se_Ipv6CidrBlockAssociationList(input.Ipv6CidrBlockAssociationSet, context), - }), - ...(input.MapPublicIpOnLaunch != null && { MapPublicIpOnLaunch: input.MapPublicIpOnLaunch }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.State != null && { State: input.State }), - ...(input.SubnetArn != null && { SubnetArn: input.SubnetArn }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsElbAppCookieStickinessPolicies omitted. -/** - * serializeAws_restJson1AwsEc2TransitGatewayDetails - */ -const se_AwsEc2TransitGatewayDetails = (input: AwsEc2TransitGatewayDetails, context: __SerdeContext): any => { - return { - ...(input.AmazonSideAsn != null && { AmazonSideAsn: input.AmazonSideAsn }), - ...(input.AssociationDefaultRouteTableId != null && { - AssociationDefaultRouteTableId: input.AssociationDefaultRouteTableId, - }), - ...(input.AutoAcceptSharedAttachments != null && { - AutoAcceptSharedAttachments: input.AutoAcceptSharedAttachments, - }), - ...(input.DefaultRouteTableAssociation != null && { - DefaultRouteTableAssociation: input.DefaultRouteTableAssociation, - }), - ...(input.DefaultRouteTablePropagation != null && { - DefaultRouteTablePropagation: input.DefaultRouteTablePropagation, - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DnsSupport != null && { DnsSupport: input.DnsSupport }), - ...(input.Id != null && { Id: input.Id }), - ...(input.MulticastSupport != null && { MulticastSupport: input.MulticastSupport }), - ...(input.PropagationDefaultRouteTableId != null && { - PropagationDefaultRouteTableId: input.PropagationDefaultRouteTableId, - }), - ...(input.TransitGatewayCidrBlocks != null && { - TransitGatewayCidrBlocks: se_NonEmptyStringList(input.TransitGatewayCidrBlocks, context), - }), - ...(input.VpnEcmpSupport != null && { VpnEcmpSupport: input.VpnEcmpSupport }), - }; -}; +// se_AwsElbAppCookieStickinessPolicy omitted. -/** - * serializeAws_restJson1AwsEc2VolumeAttachment - */ -const se_AwsEc2VolumeAttachment = (input: AwsEc2VolumeAttachment, context: __SerdeContext): any => { - return { - ...(input.AttachTime != null && { AttachTime: input.AttachTime }), - ...(input.DeleteOnTermination != null && { DeleteOnTermination: input.DeleteOnTermination }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_AwsElbLbCookieStickinessPolicies omitted. -/** - * serializeAws_restJson1AwsEc2VolumeAttachmentList - */ -const se_AwsEc2VolumeAttachmentList = (input: AwsEc2VolumeAttachment[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2VolumeAttachment(entry, context); - }); -}; +// se_AwsElbLbCookieStickinessPolicy omitted. -/** - * serializeAws_restJson1AwsEc2VolumeDetails - */ -const se_AwsEc2VolumeDetails = (input: AwsEc2VolumeDetails, context: __SerdeContext): any => { - return { - ...(input.Attachments != null && { Attachments: se_AwsEc2VolumeAttachmentList(input.Attachments, context) }), - ...(input.CreateTime != null && { CreateTime: input.CreateTime }), - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Size != null && { Size: input.Size }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.VolumeId != null && { VolumeId: input.VolumeId }), - ...(input.VolumeScanStatus != null && { VolumeScanStatus: input.VolumeScanStatus }), - ...(input.VolumeType != null && { VolumeType: input.VolumeType }), - }; -}; +// se_AwsElbLoadBalancerAccessLog omitted. -/** - * serializeAws_restJson1AwsEc2VpcDetails - */ -const se_AwsEc2VpcDetails = (input: AwsEc2VpcDetails, context: __SerdeContext): any => { - return { - ...(input.CidrBlockAssociationSet != null && { - CidrBlockAssociationSet: se_CidrBlockAssociationList(input.CidrBlockAssociationSet, context), - }), - ...(input.DhcpOptionsId != null && { DhcpOptionsId: input.DhcpOptionsId }), - ...(input.Ipv6CidrBlockAssociationSet != null && { - Ipv6CidrBlockAssociationSet: se_Ipv6CidrBlockAssociationList(input.Ipv6CidrBlockAssociationSet, context), - }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_AwsElbLoadBalancerAdditionalAttribute omitted. -/** - * serializeAws_restJson1AwsEc2VpcEndpointServiceDetails - */ -const se_AwsEc2VpcEndpointServiceDetails = (input: AwsEc2VpcEndpointServiceDetails, context: __SerdeContext): any => { - return { - ...(input.AcceptanceRequired != null && { AcceptanceRequired: input.AcceptanceRequired }), - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_NonEmptyStringList(input.AvailabilityZones, context), - }), - ...(input.BaseEndpointDnsNames != null && { - BaseEndpointDnsNames: se_NonEmptyStringList(input.BaseEndpointDnsNames, context), - }), - ...(input.GatewayLoadBalancerArns != null && { - GatewayLoadBalancerArns: se_NonEmptyStringList(input.GatewayLoadBalancerArns, context), - }), - ...(input.ManagesVpcEndpoints != null && { ManagesVpcEndpoints: input.ManagesVpcEndpoints }), - ...(input.NetworkLoadBalancerArns != null && { - NetworkLoadBalancerArns: se_NonEmptyStringList(input.NetworkLoadBalancerArns, context), - }), - ...(input.PrivateDnsName != null && { PrivateDnsName: input.PrivateDnsName }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.ServiceState != null && { ServiceState: input.ServiceState }), - ...(input.ServiceType != null && { - ServiceType: se_AwsEc2VpcEndpointServiceServiceTypeList(input.ServiceType, context), - }), - }; -}; +// se_AwsElbLoadBalancerAdditionalAttributeList omitted. -/** - * serializeAws_restJson1AwsEc2VpcEndpointServiceServiceTypeDetails - */ -const se_AwsEc2VpcEndpointServiceServiceTypeDetails = ( - input: AwsEc2VpcEndpointServiceServiceTypeDetails, - context: __SerdeContext -): any => { - return { - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - }; -}; +// se_AwsElbLoadBalancerAttributes omitted. -/** - * serializeAws_restJson1AwsEc2VpcEndpointServiceServiceTypeList - */ -const se_AwsEc2VpcEndpointServiceServiceTypeList = ( - input: AwsEc2VpcEndpointServiceServiceTypeDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2VpcEndpointServiceServiceTypeDetails(entry, context); - }); -}; +// se_AwsElbLoadBalancerBackendServerDescription omitted. -/** - * serializeAws_restJson1AwsEc2VpcPeeringConnectionDetails - */ -const se_AwsEc2VpcPeeringConnectionDetails = ( - input: AwsEc2VpcPeeringConnectionDetails, - context: __SerdeContext -): any => { - return { - ...(input.AccepterVpcInfo != null && { - AccepterVpcInfo: se_AwsEc2VpcPeeringConnectionVpcInfoDetails(input.AccepterVpcInfo, context), - }), - ...(input.ExpirationTime != null && { ExpirationTime: input.ExpirationTime }), - ...(input.RequesterVpcInfo != null && { - RequesterVpcInfo: se_AwsEc2VpcPeeringConnectionVpcInfoDetails(input.RequesterVpcInfo, context), - }), - ...(input.Status != null && { Status: se_AwsEc2VpcPeeringConnectionStatusDetails(input.Status, context) }), - ...(input.VpcPeeringConnectionId != null && { VpcPeeringConnectionId: input.VpcPeeringConnectionId }), - }; -}; +// se_AwsElbLoadBalancerBackendServerDescriptions omitted. -/** - * serializeAws_restJson1AwsEc2VpcPeeringConnectionStatusDetails - */ -const se_AwsEc2VpcPeeringConnectionStatusDetails = ( - input: AwsEc2VpcPeeringConnectionStatusDetails, - context: __SerdeContext -): any => { - return { - ...(input.Code != null && { Code: input.Code }), - ...(input.Message != null && { Message: input.Message }), - }; -}; +// se_AwsElbLoadBalancerConnectionDraining omitted. -/** - * serializeAws_restJson1AwsEc2VpcPeeringConnectionVpcInfoDetails - */ -const se_AwsEc2VpcPeeringConnectionVpcInfoDetails = ( - input: AwsEc2VpcPeeringConnectionVpcInfoDetails, - context: __SerdeContext -): any => { - return { - ...(input.CidrBlock != null && { CidrBlock: input.CidrBlock }), - ...(input.CidrBlockSet != null && { CidrBlockSet: se_VpcInfoCidrBlockSetList(input.CidrBlockSet, context) }), - ...(input.Ipv6CidrBlockSet != null && { - Ipv6CidrBlockSet: se_VpcInfoIpv6CidrBlockSetList(input.Ipv6CidrBlockSet, context), - }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.PeeringOptions != null && { - PeeringOptions: se_VpcInfoPeeringOptionsDetails(input.PeeringOptions, context), - }), - ...(input.Region != null && { Region: input.Region }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_AwsElbLoadBalancerConnectionSettings omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionDetails - */ -const se_AwsEc2VpnConnectionDetails = (input: AwsEc2VpnConnectionDetails, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: input.Category }), - ...(input.CustomerGatewayConfiguration != null && { - CustomerGatewayConfiguration: input.CustomerGatewayConfiguration, - }), - ...(input.CustomerGatewayId != null && { CustomerGatewayId: input.CustomerGatewayId }), - ...(input.Options != null && { Options: se_AwsEc2VpnConnectionOptionsDetails(input.Options, context) }), - ...(input.Routes != null && { Routes: se_AwsEc2VpnConnectionRoutesList(input.Routes, context) }), - ...(input.State != null && { State: input.State }), - ...(input.TransitGatewayId != null && { TransitGatewayId: input.TransitGatewayId }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VgwTelemetry != null && { - VgwTelemetry: se_AwsEc2VpnConnectionVgwTelemetryList(input.VgwTelemetry, context), - }), - ...(input.VpnConnectionId != null && { VpnConnectionId: input.VpnConnectionId }), - ...(input.VpnGatewayId != null && { VpnGatewayId: input.VpnGatewayId }), - }; -}; +// se_AwsElbLoadBalancerCrossZoneLoadBalancing omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionOptionsDetails - */ -const se_AwsEc2VpnConnectionOptionsDetails = ( - input: AwsEc2VpnConnectionOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.StaticRoutesOnly != null && { StaticRoutesOnly: input.StaticRoutesOnly }), - ...(input.TunnelOptions != null && { - TunnelOptions: se_AwsEc2VpnConnectionOptionsTunnelOptionsList(input.TunnelOptions, context), - }), - }; -}; +// se_AwsElbLoadBalancerDetails omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionOptionsTunnelOptionsDetails - */ -const se_AwsEc2VpnConnectionOptionsTunnelOptionsDetails = ( - input: AwsEc2VpnConnectionOptionsTunnelOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.DpdTimeoutSeconds != null && { DpdTimeoutSeconds: input.DpdTimeoutSeconds }), - ...(input.IkeVersions != null && { IkeVersions: se_NonEmptyStringList(input.IkeVersions, context) }), - ...(input.OutsideIpAddress != null && { OutsideIpAddress: input.OutsideIpAddress }), - ...(input.Phase1DhGroupNumbers != null && { - Phase1DhGroupNumbers: se_IntegerList(input.Phase1DhGroupNumbers, context), - }), - ...(input.Phase1EncryptionAlgorithms != null && { - Phase1EncryptionAlgorithms: se_NonEmptyStringList(input.Phase1EncryptionAlgorithms, context), - }), - ...(input.Phase1IntegrityAlgorithms != null && { - Phase1IntegrityAlgorithms: se_NonEmptyStringList(input.Phase1IntegrityAlgorithms, context), - }), - ...(input.Phase1LifetimeSeconds != null && { Phase1LifetimeSeconds: input.Phase1LifetimeSeconds }), - ...(input.Phase2DhGroupNumbers != null && { - Phase2DhGroupNumbers: se_IntegerList(input.Phase2DhGroupNumbers, context), - }), - ...(input.Phase2EncryptionAlgorithms != null && { - Phase2EncryptionAlgorithms: se_NonEmptyStringList(input.Phase2EncryptionAlgorithms, context), - }), - ...(input.Phase2IntegrityAlgorithms != null && { - Phase2IntegrityAlgorithms: se_NonEmptyStringList(input.Phase2IntegrityAlgorithms, context), - }), - ...(input.Phase2LifetimeSeconds != null && { Phase2LifetimeSeconds: input.Phase2LifetimeSeconds }), - ...(input.PreSharedKey != null && { PreSharedKey: input.PreSharedKey }), - ...(input.RekeyFuzzPercentage != null && { RekeyFuzzPercentage: input.RekeyFuzzPercentage }), - ...(input.RekeyMarginTimeSeconds != null && { RekeyMarginTimeSeconds: input.RekeyMarginTimeSeconds }), - ...(input.ReplayWindowSize != null && { ReplayWindowSize: input.ReplayWindowSize }), - ...(input.TunnelInsideCidr != null && { TunnelInsideCidr: input.TunnelInsideCidr }), - }; -}; +// se_AwsElbLoadBalancerHealthCheck omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionOptionsTunnelOptionsList - */ -const se_AwsEc2VpnConnectionOptionsTunnelOptionsList = ( - input: AwsEc2VpnConnectionOptionsTunnelOptionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2VpnConnectionOptionsTunnelOptionsDetails(entry, context); - }); -}; +// se_AwsElbLoadBalancerInstance omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionRoutesDetails - */ -const se_AwsEc2VpnConnectionRoutesDetails = (input: AwsEc2VpnConnectionRoutesDetails, context: __SerdeContext): any => { - return { - ...(input.DestinationCidrBlock != null && { DestinationCidrBlock: input.DestinationCidrBlock }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_AwsElbLoadBalancerInstances omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionRoutesList - */ -const se_AwsEc2VpnConnectionRoutesList = (input: AwsEc2VpnConnectionRoutesDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2VpnConnectionRoutesDetails(entry, context); - }); -}; +// se_AwsElbLoadBalancerListener omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionVgwTelemetryDetails - */ -const se_AwsEc2VpnConnectionVgwTelemetryDetails = ( - input: AwsEc2VpnConnectionVgwTelemetryDetails, - context: __SerdeContext -): any => { - return { - ...(input.AcceptedRouteCount != null && { AcceptedRouteCount: input.AcceptedRouteCount }), - ...(input.CertificateArn != null && { CertificateArn: input.CertificateArn }), - ...(input.LastStatusChange != null && { LastStatusChange: input.LastStatusChange }), - ...(input.OutsideIpAddress != null && { OutsideIpAddress: input.OutsideIpAddress }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusMessage != null && { StatusMessage: input.StatusMessage }), - }; -}; +// se_AwsElbLoadBalancerListenerDescription omitted. -/** - * serializeAws_restJson1AwsEc2VpnConnectionVgwTelemetryList - */ -const se_AwsEc2VpnConnectionVgwTelemetryList = ( - input: AwsEc2VpnConnectionVgwTelemetryDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEc2VpnConnectionVgwTelemetryDetails(entry, context); - }); -}; +// se_AwsElbLoadBalancerListenerDescriptions omitted. -/** - * serializeAws_restJson1AwsEcrContainerImageDetails - */ -const se_AwsEcrContainerImageDetails = (input: AwsEcrContainerImageDetails, context: __SerdeContext): any => { - return { - ...(input.Architecture != null && { Architecture: input.Architecture }), - ...(input.ImageDigest != null && { ImageDigest: input.ImageDigest }), - ...(input.ImagePublishedAt != null && { ImagePublishedAt: input.ImagePublishedAt }), - ...(input.ImageTags != null && { ImageTags: se_NonEmptyStringList(input.ImageTags, context) }), - ...(input.RegistryId != null && { RegistryId: input.RegistryId }), - ...(input.RepositoryName != null && { RepositoryName: input.RepositoryName }), - }; -}; +// se_AwsElbLoadBalancerPolicies omitted. -/** - * serializeAws_restJson1AwsEcrRepositoryDetails - */ -const se_AwsEcrRepositoryDetails = (input: AwsEcrRepositoryDetails, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ImageScanningConfiguration != null && { - ImageScanningConfiguration: se_AwsEcrRepositoryImageScanningConfigurationDetails( - input.ImageScanningConfiguration, - context - ), - }), - ...(input.ImageTagMutability != null && { ImageTagMutability: input.ImageTagMutability }), - ...(input.LifecyclePolicy != null && { - LifecyclePolicy: se_AwsEcrRepositoryLifecyclePolicyDetails(input.LifecyclePolicy, context), - }), - ...(input.RepositoryName != null && { RepositoryName: input.RepositoryName }), - ...(input.RepositoryPolicyText != null && { RepositoryPolicyText: input.RepositoryPolicyText }), - }; -}; +// se_AwsElbLoadBalancerSourceSecurityGroup omitted. -/** - * serializeAws_restJson1AwsEcrRepositoryImageScanningConfigurationDetails - */ -const se_AwsEcrRepositoryImageScanningConfigurationDetails = ( - input: AwsEcrRepositoryImageScanningConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.ScanOnPush != null && { ScanOnPush: input.ScanOnPush }), - }; -}; +// se_AwsElbv2LoadBalancerAttribute omitted. -/** - * serializeAws_restJson1AwsEcrRepositoryLifecyclePolicyDetails - */ -const se_AwsEcrRepositoryLifecyclePolicyDetails = ( - input: AwsEcrRepositoryLifecyclePolicyDetails, - context: __SerdeContext -): any => { - return { - ...(input.LifecyclePolicyText != null && { LifecyclePolicyText: input.LifecyclePolicyText }), - ...(input.RegistryId != null && { RegistryId: input.RegistryId }), - }; -}; +// se_AwsElbv2LoadBalancerAttributes omitted. -/** - * serializeAws_restJson1AwsEcsClusterClusterSettingsDetails - */ -const se_AwsEcsClusterClusterSettingsDetails = ( - input: AwsEcsClusterClusterSettingsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AwsElbv2LoadBalancerDetails omitted. -/** - * serializeAws_restJson1AwsEcsClusterClusterSettingsList - */ -const se_AwsEcsClusterClusterSettingsList = ( - input: AwsEcsClusterClusterSettingsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsClusterClusterSettingsDetails(entry, context); - }); -}; +// se_AwsIamAccessKeyDetails omitted. -/** - * serializeAws_restJson1AwsEcsClusterConfigurationDetails - */ -const se_AwsEcsClusterConfigurationDetails = ( - input: AwsEcsClusterConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.ExecuteCommandConfiguration != null && { - ExecuteCommandConfiguration: se_AwsEcsClusterConfigurationExecuteCommandConfigurationDetails( - input.ExecuteCommandConfiguration, - context - ), - }), - }; -}; +// se_AwsIamAccessKeySessionContext omitted. -/** - * serializeAws_restJson1AwsEcsClusterConfigurationExecuteCommandConfigurationDetails - */ -const se_AwsEcsClusterConfigurationExecuteCommandConfigurationDetails = ( - input: AwsEcsClusterConfigurationExecuteCommandConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LogConfiguration != null && { - LogConfiguration: se_AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails( - input.LogConfiguration, - context - ), - }), - ...(input.Logging != null && { Logging: input.Logging }), - }; -}; +// se_AwsIamAccessKeySessionContextAttributes omitted. -/** - * serializeAws_restJson1AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails - */ -const se_AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails = ( - input: AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.CloudWatchEncryptionEnabled != null && { - CloudWatchEncryptionEnabled: input.CloudWatchEncryptionEnabled, - }), - ...(input.CloudWatchLogGroupName != null && { CloudWatchLogGroupName: input.CloudWatchLogGroupName }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3EncryptionEnabled != null && { S3EncryptionEnabled: input.S3EncryptionEnabled }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - }; -}; +// se_AwsIamAccessKeySessionContextSessionIssuer omitted. -/** - * serializeAws_restJson1AwsEcsClusterDefaultCapacityProviderStrategyDetails - */ -const se_AwsEcsClusterDefaultCapacityProviderStrategyDetails = ( - input: AwsEcsClusterDefaultCapacityProviderStrategyDetails, - context: __SerdeContext -): any => { - return { - ...(input.Base != null && { Base: input.Base }), - ...(input.CapacityProvider != null && { CapacityProvider: input.CapacityProvider }), - ...(input.Weight != null && { Weight: input.Weight }), - }; -}; +// se_AwsIamAttachedManagedPolicy omitted. -/** - * serializeAws_restJson1AwsEcsClusterDefaultCapacityProviderStrategyList - */ -const se_AwsEcsClusterDefaultCapacityProviderStrategyList = ( - input: AwsEcsClusterDefaultCapacityProviderStrategyDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsClusterDefaultCapacityProviderStrategyDetails(entry, context); - }); -}; +// se_AwsIamAttachedManagedPolicyList omitted. -/** - * serializeAws_restJson1AwsEcsClusterDetails - */ -const se_AwsEcsClusterDetails = (input: AwsEcsClusterDetails, context: __SerdeContext): any => { - return { - ...(input.ActiveServicesCount != null && { ActiveServicesCount: input.ActiveServicesCount }), - ...(input.CapacityProviders != null && { - CapacityProviders: se_NonEmptyStringList(input.CapacityProviders, context), - }), - ...(input.ClusterArn != null && { ClusterArn: input.ClusterArn }), - ...(input.ClusterName != null && { ClusterName: input.ClusterName }), - ...(input.ClusterSettings != null && { - ClusterSettings: se_AwsEcsClusterClusterSettingsList(input.ClusterSettings, context), - }), - ...(input.Configuration != null && { - Configuration: se_AwsEcsClusterConfigurationDetails(input.Configuration, context), - }), - ...(input.DefaultCapacityProviderStrategy != null && { - DefaultCapacityProviderStrategy: se_AwsEcsClusterDefaultCapacityProviderStrategyList( - input.DefaultCapacityProviderStrategy, - context - ), - }), - ...(input.RegisteredContainerInstancesCount != null && { - RegisteredContainerInstancesCount: input.RegisteredContainerInstancesCount, - }), - ...(input.RunningTasksCount != null && { RunningTasksCount: input.RunningTasksCount }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_AwsIamGroupDetails omitted. + +// se_AwsIamGroupPolicy omitted. + +// se_AwsIamGroupPolicyList omitted. + +// se_AwsIamInstanceProfile omitted. + +// se_AwsIamInstanceProfileList omitted. + +// se_AwsIamInstanceProfileRole omitted. + +// se_AwsIamInstanceProfileRoles omitted. + +// se_AwsIamPermissionsBoundary omitted. + +// se_AwsIamPolicyDetails omitted. + +// se_AwsIamPolicyVersion omitted. + +// se_AwsIamPolicyVersionList omitted. + +// se_AwsIamRoleDetails omitted. + +// se_AwsIamRolePolicy omitted. + +// se_AwsIamRolePolicyList omitted. + +// se_AwsIamUserDetails omitted. + +// se_AwsIamUserPolicy omitted. + +// se_AwsIamUserPolicyList omitted. + +// se_AwsKinesisStreamDetails omitted. + +// se_AwsKinesisStreamStreamEncryptionDetails omitted. /** - * serializeAws_restJson1AwsEcsContainerDetails + * serializeAws_restJson1AwsKmsKeyDetails */ -const se_AwsEcsContainerDetails = (input: AwsEcsContainerDetails, context: __SerdeContext): any => { - return { - ...(input.Image != null && { Image: input.Image }), - ...(input.MountPoints != null && { MountPoints: se_AwsMountPointList(input.MountPoints, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Privileged != null && { Privileged: input.Privileged }), - }; +const se_AwsKmsKeyDetails = (input: AwsKmsKeyDetails, context: __SerdeContext): any => { + return take(input, { + AWSAccountId: [], + CreationDate: __serializeFloat, + Description: [], + KeyId: [], + KeyManager: [], + KeyRotationStatus: [], + KeyState: [], + Origin: [], + }); }; -/** - * serializeAws_restJson1AwsEcsContainerDetailsList - */ -const se_AwsEcsContainerDetailsList = (input: AwsEcsContainerDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsContainerDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsServiceCapacityProviderStrategyDetails - */ -const se_AwsEcsServiceCapacityProviderStrategyDetails = ( - input: AwsEcsServiceCapacityProviderStrategyDetails, - context: __SerdeContext -): any => { - return { - ...(input.Base != null && { Base: input.Base }), - ...(input.CapacityProvider != null && { CapacityProvider: input.CapacityProvider }), - ...(input.Weight != null && { Weight: input.Weight }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceCapacityProviderStrategyList - */ -const se_AwsEcsServiceCapacityProviderStrategyList = ( - input: AwsEcsServiceCapacityProviderStrategyDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsServiceCapacityProviderStrategyDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails - */ -const se_AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails = ( - input: AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enable != null && { Enable: input.Enable }), - ...(input.Rollback != null && { Rollback: input.Rollback }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceDeploymentConfigurationDetails - */ -const se_AwsEcsServiceDeploymentConfigurationDetails = ( - input: AwsEcsServiceDeploymentConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeploymentCircuitBreaker != null && { - DeploymentCircuitBreaker: se_AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails( - input.DeploymentCircuitBreaker, - context - ), - }), - ...(input.MaximumPercent != null && { MaximumPercent: input.MaximumPercent }), - ...(input.MinimumHealthyPercent != null && { MinimumHealthyPercent: input.MinimumHealthyPercent }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceDeploymentControllerDetails - */ -const se_AwsEcsServiceDeploymentControllerDetails = ( - input: AwsEcsServiceDeploymentControllerDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceDetails - */ -const se_AwsEcsServiceDetails = (input: AwsEcsServiceDetails, context: __SerdeContext): any => { - return { - ...(input.CapacityProviderStrategy != null && { - CapacityProviderStrategy: se_AwsEcsServiceCapacityProviderStrategyList(input.CapacityProviderStrategy, context), - }), - ...(input.Cluster != null && { Cluster: input.Cluster }), - ...(input.DeploymentConfiguration != null && { - DeploymentConfiguration: se_AwsEcsServiceDeploymentConfigurationDetails(input.DeploymentConfiguration, context), - }), - ...(input.DeploymentController != null && { - DeploymentController: se_AwsEcsServiceDeploymentControllerDetails(input.DeploymentController, context), - }), - ...(input.DesiredCount != null && { DesiredCount: input.DesiredCount }), - ...(input.EnableEcsManagedTags != null && { EnableEcsManagedTags: input.EnableEcsManagedTags }), - ...(input.EnableExecuteCommand != null && { EnableExecuteCommand: input.EnableExecuteCommand }), - ...(input.HealthCheckGracePeriodSeconds != null && { - HealthCheckGracePeriodSeconds: input.HealthCheckGracePeriodSeconds, - }), - ...(input.LaunchType != null && { LaunchType: input.LaunchType }), - ...(input.LoadBalancers != null && { - LoadBalancers: se_AwsEcsServiceLoadBalancersList(input.LoadBalancers, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NetworkConfiguration != null && { - NetworkConfiguration: se_AwsEcsServiceNetworkConfigurationDetails(input.NetworkConfiguration, context), - }), - ...(input.PlacementConstraints != null && { - PlacementConstraints: se_AwsEcsServicePlacementConstraintsList(input.PlacementConstraints, context), - }), - ...(input.PlacementStrategies != null && { - PlacementStrategies: se_AwsEcsServicePlacementStrategiesList(input.PlacementStrategies, context), - }), - ...(input.PlatformVersion != null && { PlatformVersion: input.PlatformVersion }), - ...(input.PropagateTags != null && { PropagateTags: input.PropagateTags }), - ...(input.Role != null && { Role: input.Role }), - ...(input.SchedulingStrategy != null && { SchedulingStrategy: input.SchedulingStrategy }), - ...(input.ServiceArn != null && { ServiceArn: input.ServiceArn }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.ServiceRegistries != null && { - ServiceRegistries: se_AwsEcsServiceServiceRegistriesList(input.ServiceRegistries, context), - }), - ...(input.TaskDefinition != null && { TaskDefinition: input.TaskDefinition }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceLoadBalancersDetails - */ -const se_AwsEcsServiceLoadBalancersDetails = ( - input: AwsEcsServiceLoadBalancersDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.ContainerPort != null && { ContainerPort: input.ContainerPort }), - ...(input.LoadBalancerName != null && { LoadBalancerName: input.LoadBalancerName }), - ...(input.TargetGroupArn != null && { TargetGroupArn: input.TargetGroupArn }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceLoadBalancersList - */ -const se_AwsEcsServiceLoadBalancersList = ( - input: AwsEcsServiceLoadBalancersDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsServiceLoadBalancersDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails - */ -const se_AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails = ( - input: AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.AssignPublicIp != null && { AssignPublicIp: input.AssignPublicIp }), - ...(input.SecurityGroups != null && { SecurityGroups: se_NonEmptyStringList(input.SecurityGroups, context) }), - ...(input.Subnets != null && { Subnets: se_NonEmptyStringList(input.Subnets, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceNetworkConfigurationDetails - */ -const se_AwsEcsServiceNetworkConfigurationDetails = ( - input: AwsEcsServiceNetworkConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.AwsVpcConfiguration != null && { - AwsVpcConfiguration: se_AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails( - input.AwsVpcConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServicePlacementConstraintsDetails - */ -const se_AwsEcsServicePlacementConstraintsDetails = ( - input: AwsEcsServicePlacementConstraintsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServicePlacementConstraintsList - */ -const se_AwsEcsServicePlacementConstraintsList = ( - input: AwsEcsServicePlacementConstraintsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsServicePlacementConstraintsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsServicePlacementStrategiesDetails - */ -const se_AwsEcsServicePlacementStrategiesDetails = ( - input: AwsEcsServicePlacementStrategiesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Field != null && { Field: input.Field }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServicePlacementStrategiesList - */ -const se_AwsEcsServicePlacementStrategiesList = ( - input: AwsEcsServicePlacementStrategiesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsServicePlacementStrategiesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsServiceServiceRegistriesDetails - */ -const se_AwsEcsServiceServiceRegistriesDetails = ( - input: AwsEcsServiceServiceRegistriesDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.ContainerPort != null && { ContainerPort: input.ContainerPort }), - ...(input.Port != null && { Port: input.Port }), - ...(input.RegistryArn != null && { RegistryArn: input.RegistryArn }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsServiceServiceRegistriesList - */ -const se_AwsEcsServiceServiceRegistriesList = ( - input: AwsEcsServiceServiceRegistriesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsServiceServiceRegistriesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails, - context: __SerdeContext -): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsDependsOnList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsDependsOnList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Command != null && { Command: se_NonEmptyStringList(input.Command, context) }), - ...(input.Cpu != null && { Cpu: input.Cpu }), - ...(input.DependsOn != null && { - DependsOn: se_AwsEcsTaskDefinitionContainerDefinitionsDependsOnList(input.DependsOn, context), - }), - ...(input.DisableNetworking != null && { DisableNetworking: input.DisableNetworking }), - ...(input.DnsSearchDomains != null && { DnsSearchDomains: se_NonEmptyStringList(input.DnsSearchDomains, context) }), - ...(input.DnsServers != null && { DnsServers: se_NonEmptyStringList(input.DnsServers, context) }), - ...(input.DockerLabels != null && { DockerLabels: se_FieldMap(input.DockerLabels, context) }), - ...(input.DockerSecurityOptions != null && { - DockerSecurityOptions: se_NonEmptyStringList(input.DockerSecurityOptions, context), - }), - ...(input.EntryPoint != null && { EntryPoint: se_NonEmptyStringList(input.EntryPoint, context) }), - ...(input.Environment != null && { - Environment: se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList(input.Environment, context), - }), - ...(input.EnvironmentFiles != null && { - EnvironmentFiles: se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList( - input.EnvironmentFiles, - context - ), - }), - ...(input.Essential != null && { Essential: input.Essential }), - ...(input.ExtraHosts != null && { - ExtraHosts: se_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList(input.ExtraHosts, context), - }), - ...(input.FirelensConfiguration != null && { - FirelensConfiguration: se_AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails( - input.FirelensConfiguration, - context - ), - }), - ...(input.HealthCheck != null && { - HealthCheck: se_AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails(input.HealthCheck, context), - }), - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.Image != null && { Image: input.Image }), - ...(input.Interactive != null && { Interactive: input.Interactive }), - ...(input.Links != null && { Links: se_NonEmptyStringList(input.Links, context) }), - ...(input.LinuxParameters != null && { - LinuxParameters: se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails( - input.LinuxParameters, - context - ), - }), - ...(input.LogConfiguration != null && { - LogConfiguration: se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails( - input.LogConfiguration, - context - ), - }), - ...(input.Memory != null && { Memory: input.Memory }), - ...(input.MemoryReservation != null && { MemoryReservation: input.MemoryReservation }), - ...(input.MountPoints != null && { - MountPoints: se_AwsEcsTaskDefinitionContainerDefinitionsMountPointsList(input.MountPoints, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PortMappings != null && { - PortMappings: se_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList(input.PortMappings, context), - }), - ...(input.Privileged != null && { Privileged: input.Privileged }), - ...(input.PseudoTerminal != null && { PseudoTerminal: input.PseudoTerminal }), - ...(input.ReadonlyRootFilesystem != null && { ReadonlyRootFilesystem: input.ReadonlyRootFilesystem }), - ...(input.RepositoryCredentials != null && { - RepositoryCredentials: se_AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails( - input.RepositoryCredentials, - context - ), - }), - ...(input.ResourceRequirements != null && { - ResourceRequirements: se_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList( - input.ResourceRequirements, - context - ), - }), - ...(input.Secrets != null && { - Secrets: se_AwsEcsTaskDefinitionContainerDefinitionsSecretsList(input.Secrets, context), - }), - ...(input.StartTimeout != null && { StartTimeout: input.StartTimeout }), - ...(input.StopTimeout != null && { StopTimeout: input.StopTimeout }), - ...(input.SystemControls != null && { - SystemControls: se_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList(input.SystemControls, context), - }), - ...(input.Ulimits != null && { - Ulimits: se_AwsEcsTaskDefinitionContainerDefinitionsUlimitsList(input.Ulimits, context), - }), - ...(input.User != null && { User: input.User }), - ...(input.VolumesFrom != null && { - VolumesFrom: se_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList(input.VolumesFrom, context), - }), - ...(input.WorkingDirectory != null && { WorkingDirectory: input.WorkingDirectory }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.Options != null && { Options: se_FieldMap(input.Options, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails, - context: __SerdeContext -): any => { - return { - ...(input.Command != null && { Command: se_NonEmptyStringList(input.Command, context) }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.Retries != null && { Retries: input.Retries }), - ...(input.StartPeriod != null && { StartPeriod: input.StartPeriod }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Add != null && { Add: se_NonEmptyStringList(input.Add, context) }), - ...(input.Drop != null && { Drop: se_NonEmptyStringList(input.Drop, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails, - context: __SerdeContext -): any => { - return { - ...(input.Capabilities != null && { - Capabilities: se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails( - input.Capabilities, - context - ), - }), - ...(input.Devices != null && { - Devices: se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList(input.Devices, context), - }), - ...(input.InitProcessEnabled != null && { InitProcessEnabled: input.InitProcessEnabled }), - ...(input.MaxSwap != null && { MaxSwap: input.MaxSwap }), - ...(input.SharedMemorySize != null && { SharedMemorySize: input.SharedMemorySize }), - ...(input.Swappiness != null && { Swappiness: input.Swappiness }), - ...(input.Tmpfs != null && { - Tmpfs: se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList(input.Tmpfs, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerPath != null && { ContainerPath: input.ContainerPath }), - ...(input.HostPath != null && { HostPath: input.HostPath }), - ...(input.Permissions != null && { Permissions: se_NonEmptyStringList(input.Permissions, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerPath != null && { ContainerPath: input.ContainerPath }), - ...(input.MountOptions != null && { MountOptions: se_NonEmptyStringList(input.MountOptions, context) }), - ...(input.Size != null && { Size: input.Size }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.LogDriver != null && { LogDriver: input.LogDriver }), - ...(input.Options != null && { Options: se_FieldMap(input.Options, context) }), - ...(input.SecretOptions != null && { - SecretOptions: se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList( - input.SecretOptions, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ValueFrom != null && { ValueFrom: input.ValueFrom }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerPath != null && { ContainerPath: input.ContainerPath }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.SourceVolume != null && { SourceVolume: input.SourceVolume }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsMountPointsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsMountPointsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerPort != null && { ContainerPort: input.ContainerPort }), - ...(input.HostPort != null && { HostPort: input.HostPort }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails, - context: __SerdeContext -): any => { - return { - ...(input.CredentialsParameter != null && { CredentialsParameter: input.CredentialsParameter }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ValueFrom != null && { ValueFrom: input.ValueFrom }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSecretsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsSecretsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails, - context: __SerdeContext -): any => { - return { - ...(input.HardLimit != null && { HardLimit: input.HardLimit }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SoftLimit != null && { SoftLimit: input.SoftLimit }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsUlimitsList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsUlimitsList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails = ( - input: AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails, - context: __SerdeContext -): any => { - return { - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.SourceContainer != null && { SourceContainer: input.SourceContainer }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList - */ -const se_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList = ( - input: AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionDetails - */ -const se_AwsEcsTaskDefinitionDetails = (input: AwsEcsTaskDefinitionDetails, context: __SerdeContext): any => { - return { - ...(input.ContainerDefinitions != null && { - ContainerDefinitions: se_AwsEcsTaskDefinitionContainerDefinitionsList(input.ContainerDefinitions, context), - }), - ...(input.Cpu != null && { Cpu: input.Cpu }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.Family != null && { Family: input.Family }), - ...(input.InferenceAccelerators != null && { - InferenceAccelerators: se_AwsEcsTaskDefinitionInferenceAcceleratorsList(input.InferenceAccelerators, context), - }), - ...(input.IpcMode != null && { IpcMode: input.IpcMode }), - ...(input.Memory != null && { Memory: input.Memory }), - ...(input.NetworkMode != null && { NetworkMode: input.NetworkMode }), - ...(input.PidMode != null && { PidMode: input.PidMode }), - ...(input.PlacementConstraints != null && { - PlacementConstraints: se_AwsEcsTaskDefinitionPlacementConstraintsList(input.PlacementConstraints, context), - }), - ...(input.ProxyConfiguration != null && { - ProxyConfiguration: se_AwsEcsTaskDefinitionProxyConfigurationDetails(input.ProxyConfiguration, context), - }), - ...(input.RequiresCompatibilities != null && { - RequiresCompatibilities: se_NonEmptyStringList(input.RequiresCompatibilities, context), - }), - ...(input.TaskRoleArn != null && { TaskRoleArn: input.TaskRoleArn }), - ...(input.Volumes != null && { Volumes: se_AwsEcsTaskDefinitionVolumesList(input.Volumes, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionInferenceAcceleratorsDetails - */ -const se_AwsEcsTaskDefinitionInferenceAcceleratorsDetails = ( - input: AwsEcsTaskDefinitionInferenceAcceleratorsDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeviceName != null && { DeviceName: input.DeviceName }), - ...(input.DeviceType != null && { DeviceType: input.DeviceType }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionInferenceAcceleratorsList - */ -const se_AwsEcsTaskDefinitionInferenceAcceleratorsList = ( - input: AwsEcsTaskDefinitionInferenceAcceleratorsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionInferenceAcceleratorsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionPlacementConstraintsDetails - */ -const se_AwsEcsTaskDefinitionPlacementConstraintsDetails = ( - input: AwsEcsTaskDefinitionPlacementConstraintsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionPlacementConstraintsList - */ -const se_AwsEcsTaskDefinitionPlacementConstraintsList = ( - input: AwsEcsTaskDefinitionPlacementConstraintsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionPlacementConstraintsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionProxyConfigurationDetails - */ -const se_AwsEcsTaskDefinitionProxyConfigurationDetails = ( - input: AwsEcsTaskDefinitionProxyConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.ContainerName != null && { ContainerName: input.ContainerName }), - ...(input.ProxyConfigurationProperties != null && { - ProxyConfigurationProperties: se_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList( - input.ProxyConfigurationProperties, - context - ), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails - */ -const se_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails = ( - input: AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList - */ -const se_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList = ( - input: AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionVolumesDetails - */ -const se_AwsEcsTaskDefinitionVolumesDetails = ( - input: AwsEcsTaskDefinitionVolumesDetails, - context: __SerdeContext -): any => { - return { - ...(input.DockerVolumeConfiguration != null && { - DockerVolumeConfiguration: se_AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails( - input.DockerVolumeConfiguration, - context - ), - }), - ...(input.EfsVolumeConfiguration != null && { - EfsVolumeConfiguration: se_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails( - input.EfsVolumeConfiguration, - context - ), - }), - ...(input.Host != null && { Host: se_AwsEcsTaskDefinitionVolumesHostDetails(input.Host, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails - */ -const se_AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails = ( - input: AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.Autoprovision != null && { Autoprovision: input.Autoprovision }), - ...(input.Driver != null && { Driver: input.Driver }), - ...(input.DriverOpts != null && { DriverOpts: se_FieldMap(input.DriverOpts, context) }), - ...(input.Labels != null && { Labels: se_FieldMap(input.Labels, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails - */ -const se_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails = ( - input: AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.AccessPointId != null && { AccessPointId: input.AccessPointId }), - ...(input.Iam != null && { Iam: input.Iam }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails - */ -const se_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails = ( - input: AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.AuthorizationConfig != null && { - AuthorizationConfig: se_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails( - input.AuthorizationConfig, - context - ), - }), - ...(input.FilesystemId != null && { FilesystemId: input.FilesystemId }), - ...(input.RootDirectory != null && { RootDirectory: input.RootDirectory }), - ...(input.TransitEncryption != null && { TransitEncryption: input.TransitEncryption }), - ...(input.TransitEncryptionPort != null && { TransitEncryptionPort: input.TransitEncryptionPort }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionVolumesHostDetails - */ -const se_AwsEcsTaskDefinitionVolumesHostDetails = ( - input: AwsEcsTaskDefinitionVolumesHostDetails, - context: __SerdeContext -): any => { - return { - ...(input.SourcePath != null && { SourcePath: input.SourcePath }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskDefinitionVolumesList - */ -const se_AwsEcsTaskDefinitionVolumesList = ( - input: AwsEcsTaskDefinitionVolumesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskDefinitionVolumesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskDetails - */ -const se_AwsEcsTaskDetails = (input: AwsEcsTaskDetails, context: __SerdeContext): any => { - return { - ...(input.ClusterArn != null && { ClusterArn: input.ClusterArn }), - ...(input.Containers != null && { Containers: se_AwsEcsContainerDetailsList(input.Containers, context) }), - ...(input.CreatedAt != null && { CreatedAt: input.CreatedAt }), - ...(input.Group != null && { Group: input.Group }), - ...(input.StartedAt != null && { StartedAt: input.StartedAt }), - ...(input.StartedBy != null && { StartedBy: input.StartedBy }), - ...(input.TaskDefinitionArn != null && { TaskDefinitionArn: input.TaskDefinitionArn }), - ...(input.Version != null && { Version: input.Version }), - ...(input.Volumes != null && { Volumes: se_AwsEcsTaskVolumeDetailsList(input.Volumes, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskVolumeDetails - */ -const se_AwsEcsTaskVolumeDetails = (input: AwsEcsTaskVolumeDetails, context: __SerdeContext): any => { - return { - ...(input.Host != null && { Host: se_AwsEcsTaskVolumeHostDetails(input.Host, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1AwsEcsTaskVolumeDetailsList - */ -const se_AwsEcsTaskVolumeDetailsList = (input: AwsEcsTaskVolumeDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEcsTaskVolumeDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEcsTaskVolumeHostDetails - */ -const se_AwsEcsTaskVolumeHostDetails = (input: AwsEcsTaskVolumeHostDetails, context: __SerdeContext): any => { - return { - ...(input.SourcePath != null && { SourcePath: input.SourcePath }), - }; -}; - -/** - * serializeAws_restJson1AwsEfsAccessPointDetails - */ -const se_AwsEfsAccessPointDetails = (input: AwsEfsAccessPointDetails, context: __SerdeContext): any => { - return { - ...(input.AccessPointId != null && { AccessPointId: input.AccessPointId }), - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.PosixUser != null && { PosixUser: se_AwsEfsAccessPointPosixUserDetails(input.PosixUser, context) }), - ...(input.RootDirectory != null && { - RootDirectory: se_AwsEfsAccessPointRootDirectoryDetails(input.RootDirectory, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsEfsAccessPointPosixUserDetails - */ -const se_AwsEfsAccessPointPosixUserDetails = ( - input: AwsEfsAccessPointPosixUserDetails, - context: __SerdeContext -): any => { - return { - ...(input.Gid != null && { Gid: input.Gid }), - ...(input.SecondaryGids != null && { SecondaryGids: se_NonEmptyStringList(input.SecondaryGids, context) }), - ...(input.Uid != null && { Uid: input.Uid }), - }; -}; - -/** - * serializeAws_restJson1AwsEfsAccessPointRootDirectoryCreationInfoDetails - */ -const se_AwsEfsAccessPointRootDirectoryCreationInfoDetails = ( - input: AwsEfsAccessPointRootDirectoryCreationInfoDetails, - context: __SerdeContext -): any => { - return { - ...(input.OwnerGid != null && { OwnerGid: input.OwnerGid }), - ...(input.OwnerUid != null && { OwnerUid: input.OwnerUid }), - ...(input.Permissions != null && { Permissions: input.Permissions }), - }; -}; - -/** - * serializeAws_restJson1AwsEfsAccessPointRootDirectoryDetails - */ -const se_AwsEfsAccessPointRootDirectoryDetails = ( - input: AwsEfsAccessPointRootDirectoryDetails, - context: __SerdeContext -): any => { - return { - ...(input.CreationInfo != null && { - CreationInfo: se_AwsEfsAccessPointRootDirectoryCreationInfoDetails(input.CreationInfo, context), - }), - ...(input.Path != null && { Path: input.Path }), - }; -}; - -/** - * serializeAws_restJson1AwsEksClusterDetails - */ -const se_AwsEksClusterDetails = (input: AwsEksClusterDetails, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.CertificateAuthorityData != null && { CertificateAuthorityData: input.CertificateAuthorityData }), - ...(input.ClusterStatus != null && { ClusterStatus: input.ClusterStatus }), - ...(input.Endpoint != null && { Endpoint: input.Endpoint }), - ...(input.Logging != null && { Logging: se_AwsEksClusterLoggingDetails(input.Logging, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourcesVpcConfig != null && { - ResourcesVpcConfig: se_AwsEksClusterResourcesVpcConfigDetails(input.ResourcesVpcConfig, context), - }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_restJson1AwsEksClusterLoggingClusterLoggingDetails - */ -const se_AwsEksClusterLoggingClusterLoggingDetails = ( - input: AwsEksClusterLoggingClusterLoggingDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.Types != null && { Types: se_NonEmptyStringList(input.Types, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsEksClusterLoggingClusterLoggingList - */ -const se_AwsEksClusterLoggingClusterLoggingList = ( - input: AwsEksClusterLoggingClusterLoggingDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsEksClusterLoggingClusterLoggingDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsEksClusterLoggingDetails - */ -const se_AwsEksClusterLoggingDetails = (input: AwsEksClusterLoggingDetails, context: __SerdeContext): any => { - return { - ...(input.ClusterLogging != null && { - ClusterLogging: se_AwsEksClusterLoggingClusterLoggingList(input.ClusterLogging, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsEksClusterResourcesVpcConfigDetails - */ -const se_AwsEksClusterResourcesVpcConfigDetails = ( - input: AwsEksClusterResourcesVpcConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.EndpointPublicAccess != null && { EndpointPublicAccess: input.EndpointPublicAccess }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_NonEmptyStringList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_NonEmptyStringList(input.SubnetIds, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticBeanstalkEnvironmentDetails - */ -const se_AwsElasticBeanstalkEnvironmentDetails = ( - input: AwsElasticBeanstalkEnvironmentDetails, - context: __SerdeContext -): any => { - return { - ...(input.ApplicationName != null && { ApplicationName: input.ApplicationName }), - ...(input.Cname != null && { Cname: input.Cname }), - ...(input.DateCreated != null && { DateCreated: input.DateCreated }), - ...(input.DateUpdated != null && { DateUpdated: input.DateUpdated }), - ...(input.Description != null && { Description: input.Description }), - ...(input.EndpointUrl != null && { EndpointUrl: input.EndpointUrl }), - ...(input.EnvironmentArn != null && { EnvironmentArn: input.EnvironmentArn }), - ...(input.EnvironmentId != null && { EnvironmentId: input.EnvironmentId }), - ...(input.EnvironmentLinks != null && { - EnvironmentLinks: se_AwsElasticBeanstalkEnvironmentEnvironmentLinks(input.EnvironmentLinks, context), - }), - ...(input.EnvironmentName != null && { EnvironmentName: input.EnvironmentName }), - ...(input.OptionSettings != null && { - OptionSettings: se_AwsElasticBeanstalkEnvironmentOptionSettings(input.OptionSettings, context), - }), - ...(input.PlatformArn != null && { PlatformArn: input.PlatformArn }), - ...(input.SolutionStackName != null && { SolutionStackName: input.SolutionStackName }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Tier != null && { Tier: se_AwsElasticBeanstalkEnvironmentTier(input.Tier, context) }), - ...(input.VersionLabel != null && { VersionLabel: input.VersionLabel }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticBeanstalkEnvironmentEnvironmentLink - */ -const se_AwsElasticBeanstalkEnvironmentEnvironmentLink = ( - input: AwsElasticBeanstalkEnvironmentEnvironmentLink, - context: __SerdeContext -): any => { - return { - ...(input.EnvironmentName != null && { EnvironmentName: input.EnvironmentName }), - ...(input.LinkName != null && { LinkName: input.LinkName }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticBeanstalkEnvironmentEnvironmentLinks - */ -const se_AwsElasticBeanstalkEnvironmentEnvironmentLinks = ( - input: AwsElasticBeanstalkEnvironmentEnvironmentLink[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElasticBeanstalkEnvironmentEnvironmentLink(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElasticBeanstalkEnvironmentOptionSetting - */ -const se_AwsElasticBeanstalkEnvironmentOptionSetting = ( - input: AwsElasticBeanstalkEnvironmentOptionSetting, - context: __SerdeContext -): any => { - return { - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.OptionName != null && { OptionName: input.OptionName }), - ...(input.ResourceName != null && { ResourceName: input.ResourceName }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticBeanstalkEnvironmentOptionSettings - */ -const se_AwsElasticBeanstalkEnvironmentOptionSettings = ( - input: AwsElasticBeanstalkEnvironmentOptionSetting[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElasticBeanstalkEnvironmentOptionSetting(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElasticBeanstalkEnvironmentTier - */ -const se_AwsElasticBeanstalkEnvironmentTier = ( - input: AwsElasticBeanstalkEnvironmentTier, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainDetails - */ -const se_AwsElasticsearchDomainDetails = (input: AwsElasticsearchDomainDetails, context: __SerdeContext): any => { - return { - ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }), - ...(input.DomainEndpointOptions != null && { - DomainEndpointOptions: se_AwsElasticsearchDomainDomainEndpointOptions(input.DomainEndpointOptions, context), - }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.ElasticsearchClusterConfig != null && { - ElasticsearchClusterConfig: se_AwsElasticsearchDomainElasticsearchClusterConfigDetails( - input.ElasticsearchClusterConfig, - context - ), - }), - ...(input.ElasticsearchVersion != null && { ElasticsearchVersion: input.ElasticsearchVersion }), - ...(input.EncryptionAtRestOptions != null && { - EncryptionAtRestOptions: se_AwsElasticsearchDomainEncryptionAtRestOptions(input.EncryptionAtRestOptions, context), - }), - ...(input.Endpoint != null && { Endpoint: input.Endpoint }), - ...(input.Endpoints != null && { Endpoints: se_FieldMap(input.Endpoints, context) }), - ...(input.LogPublishingOptions != null && { - LogPublishingOptions: se_AwsElasticsearchDomainLogPublishingOptions(input.LogPublishingOptions, context), - }), - ...(input.NodeToNodeEncryptionOptions != null && { - NodeToNodeEncryptionOptions: se_AwsElasticsearchDomainNodeToNodeEncryptionOptions( - input.NodeToNodeEncryptionOptions, - context - ), - }), - ...(input.ServiceSoftwareOptions != null && { - ServiceSoftwareOptions: se_AwsElasticsearchDomainServiceSoftwareOptions(input.ServiceSoftwareOptions, context), - }), - ...(input.VPCOptions != null && { VPCOptions: se_AwsElasticsearchDomainVPCOptions(input.VPCOptions, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainDomainEndpointOptions - */ -const se_AwsElasticsearchDomainDomainEndpointOptions = ( - input: AwsElasticsearchDomainDomainEndpointOptions, - context: __SerdeContext -): any => { - return { - ...(input.EnforceHTTPS != null && { EnforceHTTPS: input.EnforceHTTPS }), - ...(input.TLSSecurityPolicy != null && { TLSSecurityPolicy: input.TLSSecurityPolicy }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainElasticsearchClusterConfigDetails - */ -const se_AwsElasticsearchDomainElasticsearchClusterConfigDetails = ( - input: AwsElasticsearchDomainElasticsearchClusterConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.DedicatedMasterCount != null && { DedicatedMasterCount: input.DedicatedMasterCount }), - ...(input.DedicatedMasterEnabled != null && { DedicatedMasterEnabled: input.DedicatedMasterEnabled }), - ...(input.DedicatedMasterType != null && { DedicatedMasterType: input.DedicatedMasterType }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.ZoneAwarenessConfig != null && { - ZoneAwarenessConfig: se_AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails( - input.ZoneAwarenessConfig, - context - ), - }), - ...(input.ZoneAwarenessEnabled != null && { ZoneAwarenessEnabled: input.ZoneAwarenessEnabled }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails - */ -const se_AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails = ( - input: AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainEncryptionAtRestOptions - */ -const se_AwsElasticsearchDomainEncryptionAtRestOptions = ( - input: AwsElasticsearchDomainEncryptionAtRestOptions, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainLogPublishingOptions - */ -const se_AwsElasticsearchDomainLogPublishingOptions = ( - input: AwsElasticsearchDomainLogPublishingOptions, - context: __SerdeContext -): any => { - return { - ...(input.AuditLogs != null && { - AuditLogs: se_AwsElasticsearchDomainLogPublishingOptionsLogConfig(input.AuditLogs, context), - }), - ...(input.IndexSlowLogs != null && { - IndexSlowLogs: se_AwsElasticsearchDomainLogPublishingOptionsLogConfig(input.IndexSlowLogs, context), - }), - ...(input.SearchSlowLogs != null && { - SearchSlowLogs: se_AwsElasticsearchDomainLogPublishingOptionsLogConfig(input.SearchSlowLogs, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainLogPublishingOptionsLogConfig - */ -const se_AwsElasticsearchDomainLogPublishingOptionsLogConfig = ( - input: AwsElasticsearchDomainLogPublishingOptionsLogConfig, - context: __SerdeContext -): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainNodeToNodeEncryptionOptions - */ -const se_AwsElasticsearchDomainNodeToNodeEncryptionOptions = ( - input: AwsElasticsearchDomainNodeToNodeEncryptionOptions, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainServiceSoftwareOptions - */ -const se_AwsElasticsearchDomainServiceSoftwareOptions = ( - input: AwsElasticsearchDomainServiceSoftwareOptions, - context: __SerdeContext -): any => { - return { - ...(input.AutomatedUpdateDate != null && { AutomatedUpdateDate: input.AutomatedUpdateDate }), - ...(input.Cancellable != null && { Cancellable: input.Cancellable }), - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - ...(input.Description != null && { Description: input.Description }), - ...(input.NewVersion != null && { NewVersion: input.NewVersion }), - ...(input.UpdateAvailable != null && { UpdateAvailable: input.UpdateAvailable }), - ...(input.UpdateStatus != null && { UpdateStatus: input.UpdateStatus }), - }; -}; - -/** - * serializeAws_restJson1AwsElasticsearchDomainVPCOptions - */ -const se_AwsElasticsearchDomainVPCOptions = (input: AwsElasticsearchDomainVPCOptions, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_NonEmptyStringList(input.AvailabilityZones, context), - }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_NonEmptyStringList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_NonEmptyStringList(input.SubnetIds, context) }), - ...(input.VPCId != null && { VPCId: input.VPCId }), - }; -}; - -/** - * serializeAws_restJson1AwsElbAppCookieStickinessPolicies - */ -const se_AwsElbAppCookieStickinessPolicies = ( - input: AwsElbAppCookieStickinessPolicy[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbAppCookieStickinessPolicy(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbAppCookieStickinessPolicy - */ -const se_AwsElbAppCookieStickinessPolicy = (input: AwsElbAppCookieStickinessPolicy, context: __SerdeContext): any => { - return { - ...(input.CookieName != null && { CookieName: input.CookieName }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLbCookieStickinessPolicies - */ -const se_AwsElbLbCookieStickinessPolicies = (input: AwsElbLbCookieStickinessPolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbLbCookieStickinessPolicy(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbLbCookieStickinessPolicy - */ -const se_AwsElbLbCookieStickinessPolicy = (input: AwsElbLbCookieStickinessPolicy, context: __SerdeContext): any => { - return { - ...(input.CookieExpirationPeriod != null && { CookieExpirationPeriod: input.CookieExpirationPeriod }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerAccessLog - */ -const se_AwsElbLoadBalancerAccessLog = (input: AwsElbLoadBalancerAccessLog, context: __SerdeContext): any => { - return { - ...(input.EmitInterval != null && { EmitInterval: input.EmitInterval }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3BucketPrefix != null && { S3BucketPrefix: input.S3BucketPrefix }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerAdditionalAttribute - */ -const se_AwsElbLoadBalancerAdditionalAttribute = ( - input: AwsElbLoadBalancerAdditionalAttribute, - context: __SerdeContext -): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerAdditionalAttributeList - */ -const se_AwsElbLoadBalancerAdditionalAttributeList = ( - input: AwsElbLoadBalancerAdditionalAttribute[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbLoadBalancerAdditionalAttribute(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerAttributes - */ -const se_AwsElbLoadBalancerAttributes = (input: AwsElbLoadBalancerAttributes, context: __SerdeContext): any => { - return { - ...(input.AccessLog != null && { AccessLog: se_AwsElbLoadBalancerAccessLog(input.AccessLog, context) }), - ...(input.AdditionalAttributes != null && { - AdditionalAttributes: se_AwsElbLoadBalancerAdditionalAttributeList(input.AdditionalAttributes, context), - }), - ...(input.ConnectionDraining != null && { - ConnectionDraining: se_AwsElbLoadBalancerConnectionDraining(input.ConnectionDraining, context), - }), - ...(input.ConnectionSettings != null && { - ConnectionSettings: se_AwsElbLoadBalancerConnectionSettings(input.ConnectionSettings, context), - }), - ...(input.CrossZoneLoadBalancing != null && { - CrossZoneLoadBalancing: se_AwsElbLoadBalancerCrossZoneLoadBalancing(input.CrossZoneLoadBalancing, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerBackendServerDescription - */ -const se_AwsElbLoadBalancerBackendServerDescription = ( - input: AwsElbLoadBalancerBackendServerDescription, - context: __SerdeContext -): any => { - return { - ...(input.InstancePort != null && { InstancePort: input.InstancePort }), - ...(input.PolicyNames != null && { PolicyNames: se_StringList(input.PolicyNames, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerBackendServerDescriptions - */ -const se_AwsElbLoadBalancerBackendServerDescriptions = ( - input: AwsElbLoadBalancerBackendServerDescription[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbLoadBalancerBackendServerDescription(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerConnectionDraining - */ -const se_AwsElbLoadBalancerConnectionDraining = ( - input: AwsElbLoadBalancerConnectionDraining, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerConnectionSettings - */ -const se_AwsElbLoadBalancerConnectionSettings = ( - input: AwsElbLoadBalancerConnectionSettings, - context: __SerdeContext -): any => { - return { - ...(input.IdleTimeout != null && { IdleTimeout: input.IdleTimeout }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerCrossZoneLoadBalancing - */ -const se_AwsElbLoadBalancerCrossZoneLoadBalancing = ( - input: AwsElbLoadBalancerCrossZoneLoadBalancing, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerDetails - */ -const se_AwsElbLoadBalancerDetails = (input: AwsElbLoadBalancerDetails, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { AvailabilityZones: se_StringList(input.AvailabilityZones, context) }), - ...(input.BackendServerDescriptions != null && { - BackendServerDescriptions: se_AwsElbLoadBalancerBackendServerDescriptions( - input.BackendServerDescriptions, - context - ), - }), - ...(input.CanonicalHostedZoneName != null && { CanonicalHostedZoneName: input.CanonicalHostedZoneName }), - ...(input.CanonicalHostedZoneNameID != null && { CanonicalHostedZoneNameID: input.CanonicalHostedZoneNameID }), - ...(input.CreatedTime != null && { CreatedTime: input.CreatedTime }), - ...(input.DnsName != null && { DnsName: input.DnsName }), - ...(input.HealthCheck != null && { HealthCheck: se_AwsElbLoadBalancerHealthCheck(input.HealthCheck, context) }), - ...(input.Instances != null && { Instances: se_AwsElbLoadBalancerInstances(input.Instances, context) }), - ...(input.ListenerDescriptions != null && { - ListenerDescriptions: se_AwsElbLoadBalancerListenerDescriptions(input.ListenerDescriptions, context), - }), - ...(input.LoadBalancerAttributes != null && { - LoadBalancerAttributes: se_AwsElbLoadBalancerAttributes(input.LoadBalancerAttributes, context), - }), - ...(input.LoadBalancerName != null && { LoadBalancerName: input.LoadBalancerName }), - ...(input.Policies != null && { Policies: se_AwsElbLoadBalancerPolicies(input.Policies, context) }), - ...(input.Scheme != null && { Scheme: input.Scheme }), - ...(input.SecurityGroups != null && { SecurityGroups: se_StringList(input.SecurityGroups, context) }), - ...(input.SourceSecurityGroup != null && { - SourceSecurityGroup: se_AwsElbLoadBalancerSourceSecurityGroup(input.SourceSecurityGroup, context), - }), - ...(input.Subnets != null && { Subnets: se_StringList(input.Subnets, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerHealthCheck - */ -const se_AwsElbLoadBalancerHealthCheck = (input: AwsElbLoadBalancerHealthCheck, context: __SerdeContext): any => { - return { - ...(input.HealthyThreshold != null && { HealthyThreshold: input.HealthyThreshold }), - ...(input.Interval != null && { Interval: input.Interval }), - ...(input.Target != null && { Target: input.Target }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.UnhealthyThreshold != null && { UnhealthyThreshold: input.UnhealthyThreshold }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerInstance - */ -const se_AwsElbLoadBalancerInstance = (input: AwsElbLoadBalancerInstance, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerInstances - */ -const se_AwsElbLoadBalancerInstances = (input: AwsElbLoadBalancerInstance[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbLoadBalancerInstance(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerListener - */ -const se_AwsElbLoadBalancerListener = (input: AwsElbLoadBalancerListener, context: __SerdeContext): any => { - return { - ...(input.InstancePort != null && { InstancePort: input.InstancePort }), - ...(input.InstanceProtocol != null && { InstanceProtocol: input.InstanceProtocol }), - ...(input.LoadBalancerPort != null && { LoadBalancerPort: input.LoadBalancerPort }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.SslCertificateId != null && { SslCertificateId: input.SslCertificateId }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerListenerDescription - */ -const se_AwsElbLoadBalancerListenerDescription = ( - input: AwsElbLoadBalancerListenerDescription, - context: __SerdeContext -): any => { - return { - ...(input.Listener != null && { Listener: se_AwsElbLoadBalancerListener(input.Listener, context) }), - ...(input.PolicyNames != null && { PolicyNames: se_StringList(input.PolicyNames, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerListenerDescriptions - */ -const se_AwsElbLoadBalancerListenerDescriptions = ( - input: AwsElbLoadBalancerListenerDescription[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbLoadBalancerListenerDescription(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerPolicies - */ -const se_AwsElbLoadBalancerPolicies = (input: AwsElbLoadBalancerPolicies, context: __SerdeContext): any => { - return { - ...(input.AppCookieStickinessPolicies != null && { - AppCookieStickinessPolicies: se_AwsElbAppCookieStickinessPolicies(input.AppCookieStickinessPolicies, context), - }), - ...(input.LbCookieStickinessPolicies != null && { - LbCookieStickinessPolicies: se_AwsElbLbCookieStickinessPolicies(input.LbCookieStickinessPolicies, context), - }), - ...(input.OtherPolicies != null && { OtherPolicies: se_StringList(input.OtherPolicies, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsElbLoadBalancerSourceSecurityGroup - */ -const se_AwsElbLoadBalancerSourceSecurityGroup = ( - input: AwsElbLoadBalancerSourceSecurityGroup, - context: __SerdeContext -): any => { - return { - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.OwnerAlias != null && { OwnerAlias: input.OwnerAlias }), - }; -}; - -/** - * serializeAws_restJson1AwsElbv2LoadBalancerAttribute - */ -const se_AwsElbv2LoadBalancerAttribute = (input: AwsElbv2LoadBalancerAttribute, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsElbv2LoadBalancerAttributes - */ -const se_AwsElbv2LoadBalancerAttributes = (input: AwsElbv2LoadBalancerAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsElbv2LoadBalancerAttribute(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsElbv2LoadBalancerDetails - */ -const se_AwsElbv2LoadBalancerDetails = (input: AwsElbv2LoadBalancerDetails, context: __SerdeContext): any => { - return { - ...(input.AvailabilityZones != null && { - AvailabilityZones: se_AvailabilityZones(input.AvailabilityZones, context), - }), - ...(input.CanonicalHostedZoneId != null && { CanonicalHostedZoneId: input.CanonicalHostedZoneId }), - ...(input.CreatedTime != null && { CreatedTime: input.CreatedTime }), - ...(input.DNSName != null && { DNSName: input.DNSName }), - ...(input.IpAddressType != null && { IpAddressType: input.IpAddressType }), - ...(input.LoadBalancerAttributes != null && { - LoadBalancerAttributes: se_AwsElbv2LoadBalancerAttributes(input.LoadBalancerAttributes, context), - }), - ...(input.Scheme != null && { Scheme: input.Scheme }), - ...(input.SecurityGroups != null && { SecurityGroups: se_SecurityGroups(input.SecurityGroups, context) }), - ...(input.State != null && { State: se_LoadBalancerState(input.State, context) }), - ...(input.Type != null && { Type: input.Type }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsIamAccessKeyDetails - */ -const se_AwsIamAccessKeyDetails = (input: AwsIamAccessKeyDetails, context: __SerdeContext): any => { - return { - ...(input.AccessKeyId != null && { AccessKeyId: input.AccessKeyId }), - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.CreatedAt != null && { CreatedAt: input.CreatedAt }), - ...(input.PrincipalId != null && { PrincipalId: input.PrincipalId }), - ...(input.PrincipalName != null && { PrincipalName: input.PrincipalName }), - ...(input.PrincipalType != null && { PrincipalType: input.PrincipalType }), - ...(input.SessionContext != null && { - SessionContext: se_AwsIamAccessKeySessionContext(input.SessionContext, context), - }), - ...(input.Status != null && { Status: input.Status }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamAccessKeySessionContext - */ -const se_AwsIamAccessKeySessionContext = (input: AwsIamAccessKeySessionContext, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { - Attributes: se_AwsIamAccessKeySessionContextAttributes(input.Attributes, context), - }), - ...(input.SessionIssuer != null && { - SessionIssuer: se_AwsIamAccessKeySessionContextSessionIssuer(input.SessionIssuer, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsIamAccessKeySessionContextAttributes - */ -const se_AwsIamAccessKeySessionContextAttributes = ( - input: AwsIamAccessKeySessionContextAttributes, - context: __SerdeContext -): any => { - return { - ...(input.CreationDate != null && { CreationDate: input.CreationDate }), - ...(input.MfaAuthenticated != null && { MfaAuthenticated: input.MfaAuthenticated }), - }; -}; - -/** - * serializeAws_restJson1AwsIamAccessKeySessionContextSessionIssuer - */ -const se_AwsIamAccessKeySessionContextSessionIssuer = ( - input: AwsIamAccessKeySessionContextSessionIssuer, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.PrincipalId != null && { PrincipalId: input.PrincipalId }), - ...(input.Type != null && { Type: input.Type }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamAttachedManagedPolicy - */ -const se_AwsIamAttachedManagedPolicy = (input: AwsIamAttachedManagedPolicy, context: __SerdeContext): any => { - return { - ...(input.PolicyArn != null && { PolicyArn: input.PolicyArn }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamAttachedManagedPolicyList - */ -const se_AwsIamAttachedManagedPolicyList = (input: AwsIamAttachedManagedPolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamAttachedManagedPolicy(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsIamGroupDetails - */ -const se_AwsIamGroupDetails = (input: AwsIamGroupDetails, context: __SerdeContext): any => { - return { - ...(input.AttachedManagedPolicies != null && { - AttachedManagedPolicies: se_AwsIamAttachedManagedPolicyList(input.AttachedManagedPolicies, context), - }), - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.GroupPolicyList != null && { GroupPolicyList: se_AwsIamGroupPolicyList(input.GroupPolicyList, context) }), - ...(input.Path != null && { Path: input.Path }), - }; -}; - -/** - * serializeAws_restJson1AwsIamGroupPolicy - */ -const se_AwsIamGroupPolicy = (input: AwsIamGroupPolicy, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamGroupPolicyList - */ -const se_AwsIamGroupPolicyList = (input: AwsIamGroupPolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamGroupPolicy(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsIamInstanceProfile - */ -const se_AwsIamInstanceProfile = (input: AwsIamInstanceProfile, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.InstanceProfileId != null && { InstanceProfileId: input.InstanceProfileId }), - ...(input.InstanceProfileName != null && { InstanceProfileName: input.InstanceProfileName }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Roles != null && { Roles: se_AwsIamInstanceProfileRoles(input.Roles, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsIamInstanceProfileList - */ -const se_AwsIamInstanceProfileList = (input: AwsIamInstanceProfile[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamInstanceProfile(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsIamInstanceProfileRole - */ -const se_AwsIamInstanceProfileRole = (input: AwsIamInstanceProfileRole, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.AssumeRolePolicyDocument != null && { AssumeRolePolicyDocument: input.AssumeRolePolicyDocument }), - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.Path != null && { Path: input.Path }), - ...(input.RoleId != null && { RoleId: input.RoleId }), - ...(input.RoleName != null && { RoleName: input.RoleName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamInstanceProfileRoles - */ -const se_AwsIamInstanceProfileRoles = (input: AwsIamInstanceProfileRole[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamInstanceProfileRole(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsIamPermissionsBoundary - */ -const se_AwsIamPermissionsBoundary = (input: AwsIamPermissionsBoundary, context: __SerdeContext): any => { - return { - ...(input.PermissionsBoundaryArn != null && { PermissionsBoundaryArn: input.PermissionsBoundaryArn }), - ...(input.PermissionsBoundaryType != null && { PermissionsBoundaryType: input.PermissionsBoundaryType }), - }; -}; - -/** - * serializeAws_restJson1AwsIamPolicyDetails - */ -const se_AwsIamPolicyDetails = (input: AwsIamPolicyDetails, context: __SerdeContext): any => { - return { - ...(input.AttachmentCount != null && { AttachmentCount: input.AttachmentCount }), - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.DefaultVersionId != null && { DefaultVersionId: input.DefaultVersionId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IsAttachable != null && { IsAttachable: input.IsAttachable }), - ...(input.Path != null && { Path: input.Path }), - ...(input.PermissionsBoundaryUsageCount != null && { - PermissionsBoundaryUsageCount: input.PermissionsBoundaryUsageCount, - }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyVersionList != null && { - PolicyVersionList: se_AwsIamPolicyVersionList(input.PolicyVersionList, context), - }), - ...(input.UpdateDate != null && { UpdateDate: input.UpdateDate }), - }; -}; - -/** - * serializeAws_restJson1AwsIamPolicyVersion - */ -const se_AwsIamPolicyVersion = (input: AwsIamPolicyVersion, context: __SerdeContext): any => { - return { - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.IsDefaultVersion != null && { IsDefaultVersion: input.IsDefaultVersion }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_restJson1AwsIamPolicyVersionList - */ -const se_AwsIamPolicyVersionList = (input: AwsIamPolicyVersion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamPolicyVersion(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsIamRoleDetails - */ -const se_AwsIamRoleDetails = (input: AwsIamRoleDetails, context: __SerdeContext): any => { - return { - ...(input.AssumeRolePolicyDocument != null && { AssumeRolePolicyDocument: input.AssumeRolePolicyDocument }), - ...(input.AttachedManagedPolicies != null && { - AttachedManagedPolicies: se_AwsIamAttachedManagedPolicyList(input.AttachedManagedPolicies, context), - }), - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.InstanceProfileList != null && { - InstanceProfileList: se_AwsIamInstanceProfileList(input.InstanceProfileList, context), - }), - ...(input.MaxSessionDuration != null && { MaxSessionDuration: input.MaxSessionDuration }), - ...(input.Path != null && { Path: input.Path }), - ...(input.PermissionsBoundary != null && { - PermissionsBoundary: se_AwsIamPermissionsBoundary(input.PermissionsBoundary, context), - }), - ...(input.RoleId != null && { RoleId: input.RoleId }), - ...(input.RoleName != null && { RoleName: input.RoleName }), - ...(input.RolePolicyList != null && { RolePolicyList: se_AwsIamRolePolicyList(input.RolePolicyList, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsIamRolePolicy - */ -const se_AwsIamRolePolicy = (input: AwsIamRolePolicy, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamRolePolicyList - */ -const se_AwsIamRolePolicyList = (input: AwsIamRolePolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamRolePolicy(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsIamUserDetails - */ -const se_AwsIamUserDetails = (input: AwsIamUserDetails, context: __SerdeContext): any => { - return { - ...(input.AttachedManagedPolicies != null && { - AttachedManagedPolicies: se_AwsIamAttachedManagedPolicyList(input.AttachedManagedPolicies, context), - }), - ...(input.CreateDate != null && { CreateDate: input.CreateDate }), - ...(input.GroupList != null && { GroupList: se_StringList(input.GroupList, context) }), - ...(input.Path != null && { Path: input.Path }), - ...(input.PermissionsBoundary != null && { - PermissionsBoundary: se_AwsIamPermissionsBoundary(input.PermissionsBoundary, context), - }), - ...(input.UserId != null && { UserId: input.UserId }), - ...(input.UserName != null && { UserName: input.UserName }), - ...(input.UserPolicyList != null && { UserPolicyList: se_AwsIamUserPolicyList(input.UserPolicyList, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsIamUserPolicy - */ -const se_AwsIamUserPolicy = (input: AwsIamUserPolicy, context: __SerdeContext): any => { - return { - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsIamUserPolicyList - */ -const se_AwsIamUserPolicyList = (input: AwsIamUserPolicy[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsIamUserPolicy(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsKinesisStreamDetails - */ -const se_AwsKinesisStreamDetails = (input: AwsKinesisStreamDetails, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RetentionPeriodHours != null && { RetentionPeriodHours: input.RetentionPeriodHours }), - ...(input.ShardCount != null && { ShardCount: input.ShardCount }), - ...(input.StreamEncryption != null && { - StreamEncryption: se_AwsKinesisStreamStreamEncryptionDetails(input.StreamEncryption, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsKinesisStreamStreamEncryptionDetails - */ -const se_AwsKinesisStreamStreamEncryptionDetails = ( - input: AwsKinesisStreamStreamEncryptionDetails, - context: __SerdeContext -): any => { - return { - ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - }; -}; - -/** - * serializeAws_restJson1AwsKmsKeyDetails - */ -const se_AwsKmsKeyDetails = (input: AwsKmsKeyDetails, context: __SerdeContext): any => { - return { - ...(input.AWSAccountId != null && { AWSAccountId: input.AWSAccountId }), - ...(input.CreationDate != null && { CreationDate: __serializeFloat(input.CreationDate) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.KeyManager != null && { KeyManager: input.KeyManager }), - ...(input.KeyRotationStatus != null && { KeyRotationStatus: input.KeyRotationStatus }), - ...(input.KeyState != null && { KeyState: input.KeyState }), - ...(input.Origin != null && { Origin: input.Origin }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionCode - */ -const se_AwsLambdaFunctionCode = (input: AwsLambdaFunctionCode, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - ...(input.S3ObjectVersion != null && { S3ObjectVersion: input.S3ObjectVersion }), - ...(input.ZipFile != null && { ZipFile: input.ZipFile }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionDeadLetterConfig - */ -const se_AwsLambdaFunctionDeadLetterConfig = ( - input: AwsLambdaFunctionDeadLetterConfig, - context: __SerdeContext -): any => { - return { - ...(input.TargetArn != null && { TargetArn: input.TargetArn }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionDetails - */ -const se_AwsLambdaFunctionDetails = (input: AwsLambdaFunctionDetails, context: __SerdeContext): any => { - return { - ...(input.Architectures != null && { Architectures: se_NonEmptyStringList(input.Architectures, context) }), - ...(input.Code != null && { Code: se_AwsLambdaFunctionCode(input.Code, context) }), - ...(input.CodeSha256 != null && { CodeSha256: input.CodeSha256 }), - ...(input.DeadLetterConfig != null && { - DeadLetterConfig: se_AwsLambdaFunctionDeadLetterConfig(input.DeadLetterConfig, context), - }), - ...(input.Environment != null && { Environment: se_AwsLambdaFunctionEnvironment(input.Environment, context) }), - ...(input.FunctionName != null && { FunctionName: input.FunctionName }), - ...(input.Handler != null && { Handler: input.Handler }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.LastModified != null && { LastModified: input.LastModified }), - ...(input.Layers != null && { Layers: se_AwsLambdaFunctionLayerList(input.Layers, context) }), - ...(input.MasterArn != null && { MasterArn: input.MasterArn }), - ...(input.MemorySize != null && { MemorySize: input.MemorySize }), - ...(input.PackageType != null && { PackageType: input.PackageType }), - ...(input.RevisionId != null && { RevisionId: input.RevisionId }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Runtime != null && { Runtime: input.Runtime }), - ...(input.Timeout != null && { Timeout: input.Timeout }), - ...(input.TracingConfig != null && { - TracingConfig: se_AwsLambdaFunctionTracingConfig(input.TracingConfig, context), - }), - ...(input.Version != null && { Version: input.Version }), - ...(input.VpcConfig != null && { VpcConfig: se_AwsLambdaFunctionVpcConfig(input.VpcConfig, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionEnvironment - */ -const se_AwsLambdaFunctionEnvironment = (input: AwsLambdaFunctionEnvironment, context: __SerdeContext): any => { - return { - ...(input.Error != null && { Error: se_AwsLambdaFunctionEnvironmentError(input.Error, context) }), - ...(input.Variables != null && { Variables: se_FieldMap(input.Variables, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionEnvironmentError - */ -const se_AwsLambdaFunctionEnvironmentError = ( - input: AwsLambdaFunctionEnvironmentError, - context: __SerdeContext -): any => { - return { - ...(input.ErrorCode != null && { ErrorCode: input.ErrorCode }), - ...(input.Message != null && { Message: input.Message }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionLayer - */ -const se_AwsLambdaFunctionLayer = (input: AwsLambdaFunctionLayer, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.CodeSize != null && { CodeSize: input.CodeSize }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionLayerList - */ -const se_AwsLambdaFunctionLayerList = (input: AwsLambdaFunctionLayer[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsLambdaFunctionLayer(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionTracingConfig - */ -const se_AwsLambdaFunctionTracingConfig = (input: AwsLambdaFunctionTracingConfig, context: __SerdeContext): any => { - return { - ...(input.Mode != null && { Mode: input.Mode }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaFunctionVpcConfig - */ -const se_AwsLambdaFunctionVpcConfig = (input: AwsLambdaFunctionVpcConfig, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_NonEmptyStringList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_NonEmptyStringList(input.SubnetIds, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsLambdaLayerVersionDetails - */ -const se_AwsLambdaLayerVersionDetails = (input: AwsLambdaLayerVersionDetails, context: __SerdeContext): any => { - return { - ...(input.CompatibleRuntimes != null && { - CompatibleRuntimes: se_NonEmptyStringList(input.CompatibleRuntimes, context), - }), - ...(input.CreatedDate != null && { CreatedDate: input.CreatedDate }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_restJson1AwsMountPoint - */ -const se_AwsMountPoint = (input: AwsMountPoint, context: __SerdeContext): any => { - return { - ...(input.ContainerPath != null && { ContainerPath: input.ContainerPath }), - ...(input.SourceVolume != null && { SourceVolume: input.SourceVolume }), - }; -}; - -/** - * serializeAws_restJson1AwsMountPointList - */ -const se_AwsMountPointList = (input: AwsMountPoint[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsMountPoint(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsNetworkFirewallFirewallDetails - */ -const se_AwsNetworkFirewallFirewallDetails = ( - input: AwsNetworkFirewallFirewallDetails, - context: __SerdeContext -): any => { - return { - ...(input.DeleteProtection != null && { DeleteProtection: input.DeleteProtection }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FirewallArn != null && { FirewallArn: input.FirewallArn }), - ...(input.FirewallId != null && { FirewallId: input.FirewallId }), - ...(input.FirewallName != null && { FirewallName: input.FirewallName }), - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.FirewallPolicyChangeProtection != null && { - FirewallPolicyChangeProtection: input.FirewallPolicyChangeProtection, - }), - ...(input.SubnetChangeProtection != null && { SubnetChangeProtection: input.SubnetChangeProtection }), - ...(input.SubnetMappings != null && { - SubnetMappings: se_AwsNetworkFirewallFirewallSubnetMappingsList(input.SubnetMappings, context), - }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsNetworkFirewallFirewallPolicyDetails - */ -const se_AwsNetworkFirewallFirewallPolicyDetails = ( - input: AwsNetworkFirewallFirewallPolicyDetails, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FirewallPolicy != null && { FirewallPolicy: se_FirewallPolicyDetails(input.FirewallPolicy, context) }), - ...(input.FirewallPolicyArn != null && { FirewallPolicyArn: input.FirewallPolicyArn }), - ...(input.FirewallPolicyId != null && { FirewallPolicyId: input.FirewallPolicyId }), - ...(input.FirewallPolicyName != null && { FirewallPolicyName: input.FirewallPolicyName }), - }; -}; - -/** - * serializeAws_restJson1AwsNetworkFirewallFirewallSubnetMappingsDetails - */ -const se_AwsNetworkFirewallFirewallSubnetMappingsDetails = ( - input: AwsNetworkFirewallFirewallSubnetMappingsDetails, - context: __SerdeContext -): any => { - return { - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - }; -}; - -/** - * serializeAws_restJson1AwsNetworkFirewallFirewallSubnetMappingsList - */ -const se_AwsNetworkFirewallFirewallSubnetMappingsList = ( - input: AwsNetworkFirewallFirewallSubnetMappingsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsNetworkFirewallFirewallSubnetMappingsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsNetworkFirewallRuleGroupDetails - */ -const se_AwsNetworkFirewallRuleGroupDetails = ( - input: AwsNetworkFirewallRuleGroupDetails, - context: __SerdeContext -): any => { - return { - ...(input.Capacity != null && { Capacity: input.Capacity }), - ...(input.Description != null && { Description: input.Description }), - ...(input.RuleGroup != null && { RuleGroup: se_RuleGroupDetails(input.RuleGroup, context) }), - ...(input.RuleGroupArn != null && { RuleGroupArn: input.RuleGroupArn }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - ...(input.RuleGroupName != null && { RuleGroupName: input.RuleGroupName }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails - */ -const se_AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails = ( - input: AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.InternalUserDatabaseEnabled != null && { - InternalUserDatabaseEnabled: input.InternalUserDatabaseEnabled, - }), - ...(input.MasterUserOptions != null && { - MasterUserOptions: se_AwsOpenSearchServiceDomainMasterUserOptionsDetails(input.MasterUserOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainClusterConfigDetails - */ -const se_AwsOpenSearchServiceDomainClusterConfigDetails = ( - input: AwsOpenSearchServiceDomainClusterConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.DedicatedMasterCount != null && { DedicatedMasterCount: input.DedicatedMasterCount }), - ...(input.DedicatedMasterEnabled != null && { DedicatedMasterEnabled: input.DedicatedMasterEnabled }), - ...(input.DedicatedMasterType != null && { DedicatedMasterType: input.DedicatedMasterType }), - ...(input.InstanceCount != null && { InstanceCount: input.InstanceCount }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.WarmCount != null && { WarmCount: input.WarmCount }), - ...(input.WarmEnabled != null && { WarmEnabled: input.WarmEnabled }), - ...(input.WarmType != null && { WarmType: input.WarmType }), - ...(input.ZoneAwarenessConfig != null && { - ZoneAwarenessConfig: se_AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails( - input.ZoneAwarenessConfig, - context - ), - }), - ...(input.ZoneAwarenessEnabled != null && { ZoneAwarenessEnabled: input.ZoneAwarenessEnabled }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails - */ -const se_AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails = ( - input: AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.AvailabilityZoneCount != null && { AvailabilityZoneCount: input.AvailabilityZoneCount }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainDetails - */ -const se_AwsOpenSearchServiceDomainDetails = ( - input: AwsOpenSearchServiceDomainDetails, - context: __SerdeContext -): any => { - return { - ...(input.AccessPolicies != null && { AccessPolicies: input.AccessPolicies }), - ...(input.AdvancedSecurityOptions != null && { - AdvancedSecurityOptions: se_AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails( - input.AdvancedSecurityOptions, - context - ), - }), - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.ClusterConfig != null && { - ClusterConfig: se_AwsOpenSearchServiceDomainClusterConfigDetails(input.ClusterConfig, context), - }), - ...(input.DomainEndpoint != null && { DomainEndpoint: input.DomainEndpoint }), - ...(input.DomainEndpointOptions != null && { - DomainEndpointOptions: se_AwsOpenSearchServiceDomainDomainEndpointOptionsDetails( - input.DomainEndpointOptions, - context - ), - }), - ...(input.DomainEndpoints != null && { DomainEndpoints: se_FieldMap(input.DomainEndpoints, context) }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EncryptionAtRestOptions != null && { - EncryptionAtRestOptions: se_AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails( - input.EncryptionAtRestOptions, - context - ), - }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LogPublishingOptions != null && { - LogPublishingOptions: se_AwsOpenSearchServiceDomainLogPublishingOptionsDetails( - input.LogPublishingOptions, - context - ), - }), - ...(input.NodeToNodeEncryptionOptions != null && { - NodeToNodeEncryptionOptions: se_AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails( - input.NodeToNodeEncryptionOptions, - context - ), - }), - ...(input.ServiceSoftwareOptions != null && { - ServiceSoftwareOptions: se_AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails( - input.ServiceSoftwareOptions, - context - ), - }), - ...(input.VpcOptions != null && { - VpcOptions: se_AwsOpenSearchServiceDomainVpcOptionsDetails(input.VpcOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainDomainEndpointOptionsDetails - */ -const se_AwsOpenSearchServiceDomainDomainEndpointOptionsDetails = ( - input: AwsOpenSearchServiceDomainDomainEndpointOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.CustomEndpoint != null && { CustomEndpoint: input.CustomEndpoint }), - ...(input.CustomEndpointCertificateArn != null && { - CustomEndpointCertificateArn: input.CustomEndpointCertificateArn, - }), - ...(input.CustomEndpointEnabled != null && { CustomEndpointEnabled: input.CustomEndpointEnabled }), - ...(input.EnforceHTTPS != null && { EnforceHTTPS: input.EnforceHTTPS }), - ...(input.TLSSecurityPolicy != null && { TLSSecurityPolicy: input.TLSSecurityPolicy }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails - */ -const se_AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails = ( - input: AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainLogPublishingOption - */ -const se_AwsOpenSearchServiceDomainLogPublishingOption = ( - input: AwsOpenSearchServiceDomainLogPublishingOption, - context: __SerdeContext -): any => { - return { - ...(input.CloudWatchLogsLogGroupArn != null && { CloudWatchLogsLogGroupArn: input.CloudWatchLogsLogGroupArn }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainLogPublishingOptionsDetails - */ -const se_AwsOpenSearchServiceDomainLogPublishingOptionsDetails = ( - input: AwsOpenSearchServiceDomainLogPublishingOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.AuditLogs != null && { - AuditLogs: se_AwsOpenSearchServiceDomainLogPublishingOption(input.AuditLogs, context), - }), - ...(input.IndexSlowLogs != null && { - IndexSlowLogs: se_AwsOpenSearchServiceDomainLogPublishingOption(input.IndexSlowLogs, context), - }), - ...(input.SearchSlowLogs != null && { - SearchSlowLogs: se_AwsOpenSearchServiceDomainLogPublishingOption(input.SearchSlowLogs, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainMasterUserOptionsDetails - */ -const se_AwsOpenSearchServiceDomainMasterUserOptionsDetails = ( - input: AwsOpenSearchServiceDomainMasterUserOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.MasterUserArn != null && { MasterUserArn: input.MasterUserArn }), - ...(input.MasterUserName != null && { MasterUserName: input.MasterUserName }), - ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails - */ -const se_AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails = ( - input: AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Enabled != null && { Enabled: input.Enabled }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails - */ -const se_AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails = ( - input: AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.AutomatedUpdateDate != null && { AutomatedUpdateDate: input.AutomatedUpdateDate }), - ...(input.Cancellable != null && { Cancellable: input.Cancellable }), - ...(input.CurrentVersion != null && { CurrentVersion: input.CurrentVersion }), - ...(input.Description != null && { Description: input.Description }), - ...(input.NewVersion != null && { NewVersion: input.NewVersion }), - ...(input.OptionalDeployment != null && { OptionalDeployment: input.OptionalDeployment }), - ...(input.UpdateAvailable != null && { UpdateAvailable: input.UpdateAvailable }), - ...(input.UpdateStatus != null && { UpdateStatus: input.UpdateStatus }), - }; -}; - -/** - * serializeAws_restJson1AwsOpenSearchServiceDomainVpcOptionsDetails - */ -const se_AwsOpenSearchServiceDomainVpcOptionsDetails = ( - input: AwsOpenSearchServiceDomainVpcOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_NonEmptyStringList(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_NonEmptyStringList(input.SubnetIds, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterAssociatedRole - */ -const se_AwsRdsDbClusterAssociatedRole = (input: AwsRdsDbClusterAssociatedRole, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterAssociatedRoles - */ -const se_AwsRdsDbClusterAssociatedRoles = (input: AwsRdsDbClusterAssociatedRole[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbClusterAssociatedRole(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterDetails - */ -const se_AwsRdsDbClusterDetails = (input: AwsRdsDbClusterDetails, context: __SerdeContext): any => { - return { - ...(input.ActivityStreamStatus != null && { ActivityStreamStatus: input.ActivityStreamStatus }), - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.AssociatedRoles != null && { - AssociatedRoles: se_AwsRdsDbClusterAssociatedRoles(input.AssociatedRoles, context), - }), - ...(input.AvailabilityZones != null && { AvailabilityZones: se_StringList(input.AvailabilityZones, context) }), - ...(input.BackupRetentionPeriod != null && { BackupRetentionPeriod: input.BackupRetentionPeriod }), - ...(input.ClusterCreateTime != null && { ClusterCreateTime: input.ClusterCreateTime }), - ...(input.CopyTagsToSnapshot != null && { CopyTagsToSnapshot: input.CopyTagsToSnapshot }), - ...(input.CrossAccountClone != null && { CrossAccountClone: input.CrossAccountClone }), - ...(input.CustomEndpoints != null && { CustomEndpoints: se_StringList(input.CustomEndpoints, context) }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DbClusterIdentifier != null && { DbClusterIdentifier: input.DbClusterIdentifier }), - ...(input.DbClusterMembers != null && { - DbClusterMembers: se_AwsRdsDbClusterMembers(input.DbClusterMembers, context), - }), - ...(input.DbClusterOptionGroupMemberships != null && { - DbClusterOptionGroupMemberships: se_AwsRdsDbClusterOptionGroupMemberships( - input.DbClusterOptionGroupMemberships, - context - ), - }), - ...(input.DbClusterParameterGroup != null && { DbClusterParameterGroup: input.DbClusterParameterGroup }), - ...(input.DbClusterResourceId != null && { DbClusterResourceId: input.DbClusterResourceId }), - ...(input.DbSubnetGroup != null && { DbSubnetGroup: input.DbSubnetGroup }), - ...(input.DeletionProtection != null && { DeletionProtection: input.DeletionProtection }), - ...(input.DomainMemberships != null && { - DomainMemberships: se_AwsRdsDbDomainMemberships(input.DomainMemberships, context), - }), - ...(input.EnabledCloudWatchLogsExports != null && { - EnabledCloudWatchLogsExports: se_StringList(input.EnabledCloudWatchLogsExports, context), - }), - ...(input.Endpoint != null && { Endpoint: input.Endpoint }), - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.EngineMode != null && { EngineMode: input.EngineMode }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.HostedZoneId != null && { HostedZoneId: input.HostedZoneId }), - ...(input.HttpEndpointEnabled != null && { HttpEndpointEnabled: input.HttpEndpointEnabled }), - ...(input.IamDatabaseAuthenticationEnabled != null && { - IamDatabaseAuthenticationEnabled: input.IamDatabaseAuthenticationEnabled, - }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.MasterUsername != null && { MasterUsername: input.MasterUsername }), - ...(input.MultiAz != null && { MultiAz: input.MultiAz }), - ...(input.Port != null && { Port: input.Port }), - ...(input.PreferredBackupWindow != null && { PreferredBackupWindow: input.PreferredBackupWindow }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.ReadReplicaIdentifiers != null && { - ReadReplicaIdentifiers: se_StringList(input.ReadReplicaIdentifiers, context), - }), - ...(input.ReaderEndpoint != null && { ReaderEndpoint: input.ReaderEndpoint }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StorageEncrypted != null && { StorageEncrypted: input.StorageEncrypted }), - ...(input.VpcSecurityGroups != null && { - VpcSecurityGroups: se_AwsRdsDbInstanceVpcSecurityGroups(input.VpcSecurityGroups, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterMember - */ -const se_AwsRdsDbClusterMember = (input: AwsRdsDbClusterMember, context: __SerdeContext): any => { - return { - ...(input.DbClusterParameterGroupStatus != null && { - DbClusterParameterGroupStatus: input.DbClusterParameterGroupStatus, - }), - ...(input.DbInstanceIdentifier != null && { DbInstanceIdentifier: input.DbInstanceIdentifier }), - ...(input.IsClusterWriter != null && { IsClusterWriter: input.IsClusterWriter }), - ...(input.PromotionTier != null && { PromotionTier: input.PromotionTier }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterMembers - */ -const se_AwsRdsDbClusterMembers = (input: AwsRdsDbClusterMember[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbClusterMember(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterOptionGroupMembership - */ -const se_AwsRdsDbClusterOptionGroupMembership = ( - input: AwsRdsDbClusterOptionGroupMembership, - context: __SerdeContext -): any => { - return { - ...(input.DbClusterOptionGroupName != null && { DbClusterOptionGroupName: input.DbClusterOptionGroupName }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterOptionGroupMemberships - */ -const se_AwsRdsDbClusterOptionGroupMemberships = ( - input: AwsRdsDbClusterOptionGroupMembership[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbClusterOptionGroupMembership(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbClusterSnapshotDetails - */ -const se_AwsRdsDbClusterSnapshotDetails = (input: AwsRdsDbClusterSnapshotDetails, context: __SerdeContext): any => { - return { - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.AvailabilityZones != null && { AvailabilityZones: se_StringList(input.AvailabilityZones, context) }), - ...(input.ClusterCreateTime != null && { ClusterCreateTime: input.ClusterCreateTime }), - ...(input.DbClusterIdentifier != null && { DbClusterIdentifier: input.DbClusterIdentifier }), - ...(input.DbClusterSnapshotIdentifier != null && { - DbClusterSnapshotIdentifier: input.DbClusterSnapshotIdentifier, - }), - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.IamDatabaseAuthenticationEnabled != null && { - IamDatabaseAuthenticationEnabled: input.IamDatabaseAuthenticationEnabled, - }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LicenseModel != null && { LicenseModel: input.LicenseModel }), - ...(input.MasterUsername != null && { MasterUsername: input.MasterUsername }), - ...(input.PercentProgress != null && { PercentProgress: input.PercentProgress }), - ...(input.Port != null && { Port: input.Port }), - ...(input.SnapshotCreateTime != null && { SnapshotCreateTime: input.SnapshotCreateTime }), - ...(input.SnapshotType != null && { SnapshotType: input.SnapshotType }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StorageEncrypted != null && { StorageEncrypted: input.StorageEncrypted }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbDomainMembership - */ -const se_AwsRdsDbDomainMembership = (input: AwsRdsDbDomainMembership, context: __SerdeContext): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.Fqdn != null && { Fqdn: input.Fqdn }), - ...(input.IamRoleName != null && { IamRoleName: input.IamRoleName }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbDomainMemberships - */ -const se_AwsRdsDbDomainMemberships = (input: AwsRdsDbDomainMembership[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbDomainMembership(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbInstanceAssociatedRole - */ -const se_AwsRdsDbInstanceAssociatedRole = (input: AwsRdsDbInstanceAssociatedRole, context: __SerdeContext): any => { - return { - ...(input.FeatureName != null && { FeatureName: input.FeatureName }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbInstanceAssociatedRoles - */ -const se_AwsRdsDbInstanceAssociatedRoles = (input: AwsRdsDbInstanceAssociatedRole[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbInstanceAssociatedRole(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbInstanceDetails - */ -const se_AwsRdsDbInstanceDetails = (input: AwsRdsDbInstanceDetails, context: __SerdeContext): any => { - return { - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.AssociatedRoles != null && { - AssociatedRoles: se_AwsRdsDbInstanceAssociatedRoles(input.AssociatedRoles, context), - }), - ...(input.AutoMinorVersionUpgrade != null && { AutoMinorVersionUpgrade: input.AutoMinorVersionUpgrade }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.BackupRetentionPeriod != null && { BackupRetentionPeriod: input.BackupRetentionPeriod }), - ...(input.CACertificateIdentifier != null && { CACertificateIdentifier: input.CACertificateIdentifier }), - ...(input.CharacterSetName != null && { CharacterSetName: input.CharacterSetName }), - ...(input.CopyTagsToSnapshot != null && { CopyTagsToSnapshot: input.CopyTagsToSnapshot }), - ...(input.DBClusterIdentifier != null && { DBClusterIdentifier: input.DBClusterIdentifier }), - ...(input.DBInstanceClass != null && { DBInstanceClass: input.DBInstanceClass }), - ...(input.DBInstanceIdentifier != null && { DBInstanceIdentifier: input.DBInstanceIdentifier }), - ...(input.DBName != null && { DBName: input.DBName }), - ...(input.DbInstancePort != null && { DbInstancePort: input.DbInstancePort }), - ...(input.DbInstanceStatus != null && { DbInstanceStatus: input.DbInstanceStatus }), - ...(input.DbParameterGroups != null && { - DbParameterGroups: se_AwsRdsDbParameterGroups(input.DbParameterGroups, context), - }), - ...(input.DbSecurityGroups != null && { DbSecurityGroups: se_StringList(input.DbSecurityGroups, context) }), - ...(input.DbSubnetGroup != null && { DbSubnetGroup: se_AwsRdsDbSubnetGroup(input.DbSubnetGroup, context) }), - ...(input.DbiResourceId != null && { DbiResourceId: input.DbiResourceId }), - ...(input.DeletionProtection != null && { DeletionProtection: input.DeletionProtection }), - ...(input.DomainMemberships != null && { - DomainMemberships: se_AwsRdsDbDomainMemberships(input.DomainMemberships, context), - }), - ...(input.EnabledCloudWatchLogsExports != null && { - EnabledCloudWatchLogsExports: se_StringList(input.EnabledCloudWatchLogsExports, context), - }), - ...(input.Endpoint != null && { Endpoint: se_AwsRdsDbInstanceEndpoint(input.Endpoint, context) }), - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.EnhancedMonitoringResourceArn != null && { - EnhancedMonitoringResourceArn: input.EnhancedMonitoringResourceArn, - }), - ...(input.IAMDatabaseAuthenticationEnabled != null && { - IAMDatabaseAuthenticationEnabled: input.IAMDatabaseAuthenticationEnabled, - }), - ...(input.InstanceCreateTime != null && { InstanceCreateTime: input.InstanceCreateTime }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LatestRestorableTime != null && { LatestRestorableTime: input.LatestRestorableTime }), - ...(input.LicenseModel != null && { LicenseModel: input.LicenseModel }), - ...(input.ListenerEndpoint != null && { - ListenerEndpoint: se_AwsRdsDbInstanceEndpoint(input.ListenerEndpoint, context), - }), - ...(input.MasterUsername != null && { MasterUsername: input.MasterUsername }), - ...(input.MaxAllocatedStorage != null && { MaxAllocatedStorage: input.MaxAllocatedStorage }), - ...(input.MonitoringInterval != null && { MonitoringInterval: input.MonitoringInterval }), - ...(input.MonitoringRoleArn != null && { MonitoringRoleArn: input.MonitoringRoleArn }), - ...(input.MultiAz != null && { MultiAz: input.MultiAz }), - ...(input.OptionGroupMemberships != null && { - OptionGroupMemberships: se_AwsRdsDbOptionGroupMemberships(input.OptionGroupMemberships, context), - }), - ...(input.PendingModifiedValues != null && { - PendingModifiedValues: se_AwsRdsDbPendingModifiedValues(input.PendingModifiedValues, context), - }), - ...(input.PerformanceInsightsEnabled != null && { PerformanceInsightsEnabled: input.PerformanceInsightsEnabled }), - ...(input.PerformanceInsightsKmsKeyId != null && { - PerformanceInsightsKmsKeyId: input.PerformanceInsightsKmsKeyId, - }), - ...(input.PerformanceInsightsRetentionPeriod != null && { - PerformanceInsightsRetentionPeriod: input.PerformanceInsightsRetentionPeriod, - }), - ...(input.PreferredBackupWindow != null && { PreferredBackupWindow: input.PreferredBackupWindow }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.ProcessorFeatures != null && { - ProcessorFeatures: se_AwsRdsDbProcessorFeatures(input.ProcessorFeatures, context), - }), - ...(input.PromotionTier != null && { PromotionTier: input.PromotionTier }), - ...(input.PubliclyAccessible != null && { PubliclyAccessible: input.PubliclyAccessible }), - ...(input.ReadReplicaDBClusterIdentifiers != null && { - ReadReplicaDBClusterIdentifiers: se_StringList(input.ReadReplicaDBClusterIdentifiers, context), - }), - ...(input.ReadReplicaDBInstanceIdentifiers != null && { - ReadReplicaDBInstanceIdentifiers: se_StringList(input.ReadReplicaDBInstanceIdentifiers, context), - }), - ...(input.ReadReplicaSourceDBInstanceIdentifier != null && { - ReadReplicaSourceDBInstanceIdentifier: input.ReadReplicaSourceDBInstanceIdentifier, - }), - ...(input.SecondaryAvailabilityZone != null && { SecondaryAvailabilityZone: input.SecondaryAvailabilityZone }), - ...(input.StatusInfos != null && { StatusInfos: se_AwsRdsDbStatusInfos(input.StatusInfos, context) }), - ...(input.StorageEncrypted != null && { StorageEncrypted: input.StorageEncrypted }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - ...(input.TdeCredentialArn != null && { TdeCredentialArn: input.TdeCredentialArn }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - ...(input.VpcSecurityGroups != null && { - VpcSecurityGroups: se_AwsRdsDbInstanceVpcSecurityGroups(input.VpcSecurityGroups, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbInstanceEndpoint - */ -const se_AwsRdsDbInstanceEndpoint = (input: AwsRdsDbInstanceEndpoint, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.HostedZoneId != null && { HostedZoneId: input.HostedZoneId }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbInstanceVpcSecurityGroup - */ -const se_AwsRdsDbInstanceVpcSecurityGroup = (input: AwsRdsDbInstanceVpcSecurityGroup, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - ...(input.VpcSecurityGroupId != null && { VpcSecurityGroupId: input.VpcSecurityGroupId }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbInstanceVpcSecurityGroups - */ -const se_AwsRdsDbInstanceVpcSecurityGroups = ( - input: AwsRdsDbInstanceVpcSecurityGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbInstanceVpcSecurityGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbOptionGroupMembership - */ -const se_AwsRdsDbOptionGroupMembership = (input: AwsRdsDbOptionGroupMembership, context: __SerdeContext): any => { - return { - ...(input.OptionGroupName != null && { OptionGroupName: input.OptionGroupName }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbOptionGroupMemberships - */ -const se_AwsRdsDbOptionGroupMemberships = (input: AwsRdsDbOptionGroupMembership[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbOptionGroupMembership(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbParameterGroup - */ -const se_AwsRdsDbParameterGroup = (input: AwsRdsDbParameterGroup, context: __SerdeContext): any => { - return { - ...(input.DbParameterGroupName != null && { DbParameterGroupName: input.DbParameterGroupName }), - ...(input.ParameterApplyStatus != null && { ParameterApplyStatus: input.ParameterApplyStatus }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbParameterGroups - */ -const se_AwsRdsDbParameterGroups = (input: AwsRdsDbParameterGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbParameterGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbPendingModifiedValues - */ -const se_AwsRdsDbPendingModifiedValues = (input: AwsRdsDbPendingModifiedValues, context: __SerdeContext): any => { - return { - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.BackupRetentionPeriod != null && { BackupRetentionPeriod: input.BackupRetentionPeriod }), - ...(input.CaCertificateIdentifier != null && { CaCertificateIdentifier: input.CaCertificateIdentifier }), - ...(input.DbInstanceClass != null && { DbInstanceClass: input.DbInstanceClass }), - ...(input.DbInstanceIdentifier != null && { DbInstanceIdentifier: input.DbInstanceIdentifier }), - ...(input.DbSubnetGroupName != null && { DbSubnetGroupName: input.DbSubnetGroupName }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.LicenseModel != null && { LicenseModel: input.LicenseModel }), - ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }), - ...(input.MultiAZ != null && { MultiAZ: input.MultiAZ }), - ...(input.PendingCloudWatchLogsExports != null && { - PendingCloudWatchLogsExports: se_AwsRdsPendingCloudWatchLogsExports(input.PendingCloudWatchLogsExports, context), - }), - ...(input.Port != null && { Port: input.Port }), - ...(input.ProcessorFeatures != null && { - ProcessorFeatures: se_AwsRdsDbProcessorFeatures(input.ProcessorFeatures, context), - }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbProcessorFeature - */ -const se_AwsRdsDbProcessorFeature = (input: AwsRdsDbProcessorFeature, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbProcessorFeatures - */ -const se_AwsRdsDbProcessorFeatures = (input: AwsRdsDbProcessorFeature[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbProcessorFeature(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbSecurityGroupDetails - */ -const se_AwsRdsDbSecurityGroupDetails = (input: AwsRdsDbSecurityGroupDetails, context: __SerdeContext): any => { - return { - ...(input.DbSecurityGroupArn != null && { DbSecurityGroupArn: input.DbSecurityGroupArn }), - ...(input.DbSecurityGroupDescription != null && { DbSecurityGroupDescription: input.DbSecurityGroupDescription }), - ...(input.DbSecurityGroupName != null && { DbSecurityGroupName: input.DbSecurityGroupName }), - ...(input.Ec2SecurityGroups != null && { - Ec2SecurityGroups: se_AwsRdsDbSecurityGroupEc2SecurityGroups(input.Ec2SecurityGroups, context), - }), - ...(input.IpRanges != null && { IpRanges: se_AwsRdsDbSecurityGroupIpRanges(input.IpRanges, context) }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbSecurityGroupEc2SecurityGroup - */ -const se_AwsRdsDbSecurityGroupEc2SecurityGroup = ( - input: AwsRdsDbSecurityGroupEc2SecurityGroup, - context: __SerdeContext -): any => { - return { - ...(input.Ec2SecurityGroupId != null && { Ec2SecurityGroupId: input.Ec2SecurityGroupId }), - ...(input.Ec2SecurityGroupName != null && { Ec2SecurityGroupName: input.Ec2SecurityGroupName }), - ...(input.Ec2SecurityGroupOwnerId != null && { Ec2SecurityGroupOwnerId: input.Ec2SecurityGroupOwnerId }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbSecurityGroupEc2SecurityGroups - */ -const se_AwsRdsDbSecurityGroupEc2SecurityGroups = ( - input: AwsRdsDbSecurityGroupEc2SecurityGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbSecurityGroupEc2SecurityGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbSecurityGroupIpRange - */ -const se_AwsRdsDbSecurityGroupIpRange = (input: AwsRdsDbSecurityGroupIpRange, context: __SerdeContext): any => { - return { - ...(input.CidrIp != null && { CidrIp: input.CidrIp }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbSecurityGroupIpRanges - */ -const se_AwsRdsDbSecurityGroupIpRanges = (input: AwsRdsDbSecurityGroupIpRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbSecurityGroupIpRange(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbSnapshotDetails - */ -const se_AwsRdsDbSnapshotDetails = (input: AwsRdsDbSnapshotDetails, context: __SerdeContext): any => { - return { - ...(input.AllocatedStorage != null && { AllocatedStorage: input.AllocatedStorage }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.DbInstanceIdentifier != null && { DbInstanceIdentifier: input.DbInstanceIdentifier }), - ...(input.DbSnapshotIdentifier != null && { DbSnapshotIdentifier: input.DbSnapshotIdentifier }), - ...(input.DbiResourceId != null && { DbiResourceId: input.DbiResourceId }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.Engine != null && { Engine: input.Engine }), - ...(input.EngineVersion != null && { EngineVersion: input.EngineVersion }), - ...(input.IamDatabaseAuthenticationEnabled != null && { - IamDatabaseAuthenticationEnabled: input.IamDatabaseAuthenticationEnabled, - }), - ...(input.InstanceCreateTime != null && { InstanceCreateTime: input.InstanceCreateTime }), - ...(input.Iops != null && { Iops: input.Iops }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LicenseModel != null && { LicenseModel: input.LicenseModel }), - ...(input.MasterUsername != null && { MasterUsername: input.MasterUsername }), - ...(input.OptionGroupName != null && { OptionGroupName: input.OptionGroupName }), - ...(input.PercentProgress != null && { PercentProgress: input.PercentProgress }), - ...(input.Port != null && { Port: input.Port }), - ...(input.ProcessorFeatures != null && { - ProcessorFeatures: se_AwsRdsDbProcessorFeatures(input.ProcessorFeatures, context), - }), - ...(input.SnapshotCreateTime != null && { SnapshotCreateTime: input.SnapshotCreateTime }), - ...(input.SnapshotType != null && { SnapshotType: input.SnapshotType }), - ...(input.SourceDbSnapshotIdentifier != null && { SourceDbSnapshotIdentifier: input.SourceDbSnapshotIdentifier }), - ...(input.SourceRegion != null && { SourceRegion: input.SourceRegion }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - ...(input.TdeCredentialArn != null && { TdeCredentialArn: input.TdeCredentialArn }), - ...(input.Timezone != null && { Timezone: input.Timezone }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbStatusInfo - */ -const se_AwsRdsDbStatusInfo = (input: AwsRdsDbStatusInfo, context: __SerdeContext): any => { - return { - ...(input.Message != null && { Message: input.Message }), - ...(input.Normal != null && { Normal: input.Normal }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusType != null && { StatusType: input.StatusType }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbStatusInfos - */ -const se_AwsRdsDbStatusInfos = (input: AwsRdsDbStatusInfo[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbStatusInfo(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsDbSubnetGroup - */ -const se_AwsRdsDbSubnetGroup = (input: AwsRdsDbSubnetGroup, context: __SerdeContext): any => { - return { - ...(input.DbSubnetGroupArn != null && { DbSubnetGroupArn: input.DbSubnetGroupArn }), - ...(input.DbSubnetGroupDescription != null && { DbSubnetGroupDescription: input.DbSubnetGroupDescription }), - ...(input.DbSubnetGroupName != null && { DbSubnetGroupName: input.DbSubnetGroupName }), - ...(input.SubnetGroupStatus != null && { SubnetGroupStatus: input.SubnetGroupStatus }), - ...(input.Subnets != null && { Subnets: se_AwsRdsDbSubnetGroupSubnets(input.Subnets, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbSubnetGroupSubnet - */ -const se_AwsRdsDbSubnetGroupSubnet = (input: AwsRdsDbSubnetGroupSubnet, context: __SerdeContext): any => { - return { - ...(input.SubnetAvailabilityZone != null && { - SubnetAvailabilityZone: se_AwsRdsDbSubnetGroupSubnetAvailabilityZone(input.SubnetAvailabilityZone, context), - }), - ...(input.SubnetIdentifier != null && { SubnetIdentifier: input.SubnetIdentifier }), - ...(input.SubnetStatus != null && { SubnetStatus: input.SubnetStatus }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbSubnetGroupSubnetAvailabilityZone - */ -const se_AwsRdsDbSubnetGroupSubnetAvailabilityZone = ( - input: AwsRdsDbSubnetGroupSubnetAvailabilityZone, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsDbSubnetGroupSubnets - */ -const se_AwsRdsDbSubnetGroupSubnets = (input: AwsRdsDbSubnetGroupSubnet[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRdsDbSubnetGroupSubnet(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRdsEventSubscriptionDetails - */ -const se_AwsRdsEventSubscriptionDetails = (input: AwsRdsEventSubscriptionDetails, context: __SerdeContext): any => { - return { - ...(input.CustSubscriptionId != null && { CustSubscriptionId: input.CustSubscriptionId }), - ...(input.CustomerAwsId != null && { CustomerAwsId: input.CustomerAwsId }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.EventCategoriesList != null && { - EventCategoriesList: se_NonEmptyStringList(input.EventCategoriesList, context), - }), - ...(input.EventSubscriptionArn != null && { EventSubscriptionArn: input.EventSubscriptionArn }), - ...(input.SnsTopicArn != null && { SnsTopicArn: input.SnsTopicArn }), - ...(input.SourceIdsList != null && { SourceIdsList: se_NonEmptyStringList(input.SourceIdsList, context) }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - ...(input.Status != null && { Status: input.Status }), - ...(input.SubscriptionCreationTime != null && { SubscriptionCreationTime: input.SubscriptionCreationTime }), - }; -}; - -/** - * serializeAws_restJson1AwsRdsPendingCloudWatchLogsExports - */ -const se_AwsRdsPendingCloudWatchLogsExports = ( - input: AwsRdsPendingCloudWatchLogsExports, - context: __SerdeContext -): any => { - return { - ...(input.LogTypesToDisable != null && { LogTypesToDisable: se_StringList(input.LogTypesToDisable, context) }), - ...(input.LogTypesToEnable != null && { LogTypesToEnable: se_StringList(input.LogTypesToEnable, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterNode - */ -const se_AwsRedshiftClusterClusterNode = (input: AwsRedshiftClusterClusterNode, context: __SerdeContext): any => { - return { - ...(input.NodeRole != null && { NodeRole: input.NodeRole }), - ...(input.PrivateIpAddress != null && { PrivateIpAddress: input.PrivateIpAddress }), - ...(input.PublicIpAddress != null && { PublicIpAddress: input.PublicIpAddress }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterNodes - */ -const se_AwsRedshiftClusterClusterNodes = (input: AwsRedshiftClusterClusterNode[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterClusterNode(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterParameterGroup - */ -const se_AwsRedshiftClusterClusterParameterGroup = ( - input: AwsRedshiftClusterClusterParameterGroup, - context: __SerdeContext -): any => { - return { - ...(input.ClusterParameterStatusList != null && { - ClusterParameterStatusList: se_AwsRedshiftClusterClusterParameterStatusList( - input.ClusterParameterStatusList, - context - ), - }), - ...(input.ParameterApplyStatus != null && { ParameterApplyStatus: input.ParameterApplyStatus }), - ...(input.ParameterGroupName != null && { ParameterGroupName: input.ParameterGroupName }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterParameterGroups - */ -const se_AwsRedshiftClusterClusterParameterGroups = ( - input: AwsRedshiftClusterClusterParameterGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterClusterParameterGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterParameterStatus - */ -const se_AwsRedshiftClusterClusterParameterStatus = ( - input: AwsRedshiftClusterClusterParameterStatus, - context: __SerdeContext -): any => { - return { - ...(input.ParameterApplyErrorDescription != null && { - ParameterApplyErrorDescription: input.ParameterApplyErrorDescription, - }), - ...(input.ParameterApplyStatus != null && { ParameterApplyStatus: input.ParameterApplyStatus }), - ...(input.ParameterName != null && { ParameterName: input.ParameterName }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterParameterStatusList - */ -const se_AwsRedshiftClusterClusterParameterStatusList = ( - input: AwsRedshiftClusterClusterParameterStatus[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterClusterParameterStatus(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterSecurityGroup - */ -const se_AwsRedshiftClusterClusterSecurityGroup = ( - input: AwsRedshiftClusterClusterSecurityGroup, - context: __SerdeContext -): any => { - return { - ...(input.ClusterSecurityGroupName != null && { ClusterSecurityGroupName: input.ClusterSecurityGroupName }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterSecurityGroups - */ -const se_AwsRedshiftClusterClusterSecurityGroups = ( - input: AwsRedshiftClusterClusterSecurityGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterClusterSecurityGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterClusterSnapshotCopyStatus - */ -const se_AwsRedshiftClusterClusterSnapshotCopyStatus = ( - input: AwsRedshiftClusterClusterSnapshotCopyStatus, - context: __SerdeContext -): any => { - return { - ...(input.DestinationRegion != null && { DestinationRegion: input.DestinationRegion }), - ...(input.ManualSnapshotRetentionPeriod != null && { - ManualSnapshotRetentionPeriod: input.ManualSnapshotRetentionPeriod, - }), - ...(input.RetentionPeriod != null && { RetentionPeriod: input.RetentionPeriod }), - ...(input.SnapshotCopyGrantName != null && { SnapshotCopyGrantName: input.SnapshotCopyGrantName }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterDeferredMaintenanceWindow - */ -const se_AwsRedshiftClusterDeferredMaintenanceWindow = ( - input: AwsRedshiftClusterDeferredMaintenanceWindow, - context: __SerdeContext -): any => { - return { - ...(input.DeferMaintenanceEndTime != null && { DeferMaintenanceEndTime: input.DeferMaintenanceEndTime }), - ...(input.DeferMaintenanceIdentifier != null && { DeferMaintenanceIdentifier: input.DeferMaintenanceIdentifier }), - ...(input.DeferMaintenanceStartTime != null && { DeferMaintenanceStartTime: input.DeferMaintenanceStartTime }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterDeferredMaintenanceWindows - */ -const se_AwsRedshiftClusterDeferredMaintenanceWindows = ( - input: AwsRedshiftClusterDeferredMaintenanceWindow[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterDeferredMaintenanceWindow(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterDetails - */ -const se_AwsRedshiftClusterDetails = (input: AwsRedshiftClusterDetails, context: __SerdeContext): any => { - return { - ...(input.AllowVersionUpgrade != null && { AllowVersionUpgrade: input.AllowVersionUpgrade }), - ...(input.AutomatedSnapshotRetentionPeriod != null && { - AutomatedSnapshotRetentionPeriod: input.AutomatedSnapshotRetentionPeriod, - }), - ...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }), - ...(input.ClusterAvailabilityStatus != null && { ClusterAvailabilityStatus: input.ClusterAvailabilityStatus }), - ...(input.ClusterCreateTime != null && { ClusterCreateTime: input.ClusterCreateTime }), - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.ClusterNodes != null && { ClusterNodes: se_AwsRedshiftClusterClusterNodes(input.ClusterNodes, context) }), - ...(input.ClusterParameterGroups != null && { - ClusterParameterGroups: se_AwsRedshiftClusterClusterParameterGroups(input.ClusterParameterGroups, context), - }), - ...(input.ClusterPublicKey != null && { ClusterPublicKey: input.ClusterPublicKey }), - ...(input.ClusterRevisionNumber != null && { ClusterRevisionNumber: input.ClusterRevisionNumber }), - ...(input.ClusterSecurityGroups != null && { - ClusterSecurityGroups: se_AwsRedshiftClusterClusterSecurityGroups(input.ClusterSecurityGroups, context), - }), - ...(input.ClusterSnapshotCopyStatus != null && { - ClusterSnapshotCopyStatus: se_AwsRedshiftClusterClusterSnapshotCopyStatus( - input.ClusterSnapshotCopyStatus, - context - ), - }), - ...(input.ClusterStatus != null && { ClusterStatus: input.ClusterStatus }), - ...(input.ClusterSubnetGroupName != null && { ClusterSubnetGroupName: input.ClusterSubnetGroupName }), - ...(input.ClusterVersion != null && { ClusterVersion: input.ClusterVersion }), - ...(input.DBName != null && { DBName: input.DBName }), - ...(input.DeferredMaintenanceWindows != null && { - DeferredMaintenanceWindows: se_AwsRedshiftClusterDeferredMaintenanceWindows( - input.DeferredMaintenanceWindows, - context - ), - }), - ...(input.ElasticIpStatus != null && { - ElasticIpStatus: se_AwsRedshiftClusterElasticIpStatus(input.ElasticIpStatus, context), - }), - ...(input.ElasticResizeNumberOfNodeOptions != null && { - ElasticResizeNumberOfNodeOptions: input.ElasticResizeNumberOfNodeOptions, - }), - ...(input.Encrypted != null && { Encrypted: input.Encrypted }), - ...(input.Endpoint != null && { Endpoint: se_AwsRedshiftClusterEndpoint(input.Endpoint, context) }), - ...(input.EnhancedVpcRouting != null && { EnhancedVpcRouting: input.EnhancedVpcRouting }), - ...(input.ExpectedNextSnapshotScheduleTime != null && { - ExpectedNextSnapshotScheduleTime: input.ExpectedNextSnapshotScheduleTime, - }), - ...(input.ExpectedNextSnapshotScheduleTimeStatus != null && { - ExpectedNextSnapshotScheduleTimeStatus: input.ExpectedNextSnapshotScheduleTimeStatus, - }), - ...(input.HsmStatus != null && { HsmStatus: se_AwsRedshiftClusterHsmStatus(input.HsmStatus, context) }), - ...(input.IamRoles != null && { IamRoles: se_AwsRedshiftClusterIamRoles(input.IamRoles, context) }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.LoggingStatus != null && { - LoggingStatus: se_AwsRedshiftClusterLoggingStatus(input.LoggingStatus, context), - }), - ...(input.MaintenanceTrackName != null && { MaintenanceTrackName: input.MaintenanceTrackName }), - ...(input.ManualSnapshotRetentionPeriod != null && { - ManualSnapshotRetentionPeriod: input.ManualSnapshotRetentionPeriod, - }), - ...(input.MasterUsername != null && { MasterUsername: input.MasterUsername }), - ...(input.NextMaintenanceWindowStartTime != null && { - NextMaintenanceWindowStartTime: input.NextMaintenanceWindowStartTime, - }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.NumberOfNodes != null && { NumberOfNodes: input.NumberOfNodes }), - ...(input.PendingActions != null && { PendingActions: se_StringList(input.PendingActions, context) }), - ...(input.PendingModifiedValues != null && { - PendingModifiedValues: se_AwsRedshiftClusterPendingModifiedValues(input.PendingModifiedValues, context), - }), - ...(input.PreferredMaintenanceWindow != null && { PreferredMaintenanceWindow: input.PreferredMaintenanceWindow }), - ...(input.PubliclyAccessible != null && { PubliclyAccessible: input.PubliclyAccessible }), - ...(input.ResizeInfo != null && { ResizeInfo: se_AwsRedshiftClusterResizeInfo(input.ResizeInfo, context) }), - ...(input.RestoreStatus != null && { - RestoreStatus: se_AwsRedshiftClusterRestoreStatus(input.RestoreStatus, context), - }), - ...(input.SnapshotScheduleIdentifier != null && { SnapshotScheduleIdentifier: input.SnapshotScheduleIdentifier }), - ...(input.SnapshotScheduleState != null && { SnapshotScheduleState: input.SnapshotScheduleState }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - ...(input.VpcSecurityGroups != null && { - VpcSecurityGroups: se_AwsRedshiftClusterVpcSecurityGroups(input.VpcSecurityGroups, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterElasticIpStatus - */ -const se_AwsRedshiftClusterElasticIpStatus = ( - input: AwsRedshiftClusterElasticIpStatus, - context: __SerdeContext -): any => { - return { - ...(input.ElasticIp != null && { ElasticIp: input.ElasticIp }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterEndpoint - */ -const se_AwsRedshiftClusterEndpoint = (input: AwsRedshiftClusterEndpoint, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: input.Address }), - ...(input.Port != null && { Port: input.Port }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterHsmStatus - */ -const se_AwsRedshiftClusterHsmStatus = (input: AwsRedshiftClusterHsmStatus, context: __SerdeContext): any => { - return { - ...(input.HsmClientCertificateIdentifier != null && { - HsmClientCertificateIdentifier: input.HsmClientCertificateIdentifier, - }), - ...(input.HsmConfigurationIdentifier != null && { HsmConfigurationIdentifier: input.HsmConfigurationIdentifier }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterIamRole - */ -const se_AwsRedshiftClusterIamRole = (input: AwsRedshiftClusterIamRole, context: __SerdeContext): any => { - return { - ...(input.ApplyStatus != null && { ApplyStatus: input.ApplyStatus }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterIamRoles - */ -const se_AwsRedshiftClusterIamRoles = (input: AwsRedshiftClusterIamRole[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterIamRole(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterLoggingStatus - */ -const se_AwsRedshiftClusterLoggingStatus = (input: AwsRedshiftClusterLoggingStatus, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.LastFailureMessage != null && { LastFailureMessage: input.LastFailureMessage }), - ...(input.LastFailureTime != null && { LastFailureTime: input.LastFailureTime }), - ...(input.LastSuccessfulDeliveryTime != null && { LastSuccessfulDeliveryTime: input.LastSuccessfulDeliveryTime }), - ...(input.LoggingEnabled != null && { LoggingEnabled: input.LoggingEnabled }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterPendingModifiedValues - */ -const se_AwsRedshiftClusterPendingModifiedValues = ( - input: AwsRedshiftClusterPendingModifiedValues, - context: __SerdeContext -): any => { - return { - ...(input.AutomatedSnapshotRetentionPeriod != null && { - AutomatedSnapshotRetentionPeriod: input.AutomatedSnapshotRetentionPeriod, - }), - ...(input.ClusterIdentifier != null && { ClusterIdentifier: input.ClusterIdentifier }), - ...(input.ClusterType != null && { ClusterType: input.ClusterType }), - ...(input.ClusterVersion != null && { ClusterVersion: input.ClusterVersion }), - ...(input.EncryptionType != null && { EncryptionType: input.EncryptionType }), - ...(input.EnhancedVpcRouting != null && { EnhancedVpcRouting: input.EnhancedVpcRouting }), - ...(input.MaintenanceTrackName != null && { MaintenanceTrackName: input.MaintenanceTrackName }), - ...(input.MasterUserPassword != null && { MasterUserPassword: input.MasterUserPassword }), - ...(input.NodeType != null && { NodeType: input.NodeType }), - ...(input.NumberOfNodes != null && { NumberOfNodes: input.NumberOfNodes }), - ...(input.PubliclyAccessible != null && { PubliclyAccessible: input.PubliclyAccessible }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterResizeInfo - */ -const se_AwsRedshiftClusterResizeInfo = (input: AwsRedshiftClusterResizeInfo, context: __SerdeContext): any => { - return { - ...(input.AllowCancelResize != null && { AllowCancelResize: input.AllowCancelResize }), - ...(input.ResizeType != null && { ResizeType: input.ResizeType }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterRestoreStatus - */ -const se_AwsRedshiftClusterRestoreStatus = (input: AwsRedshiftClusterRestoreStatus, context: __SerdeContext): any => { - return { - ...(input.CurrentRestoreRateInMegaBytesPerSecond != null && { - CurrentRestoreRateInMegaBytesPerSecond: __serializeFloat(input.CurrentRestoreRateInMegaBytesPerSecond), - }), - ...(input.ElapsedTimeInSeconds != null && { ElapsedTimeInSeconds: input.ElapsedTimeInSeconds }), - ...(input.EstimatedTimeToCompletionInSeconds != null && { - EstimatedTimeToCompletionInSeconds: input.EstimatedTimeToCompletionInSeconds, - }), - ...(input.ProgressInMegaBytes != null && { ProgressInMegaBytes: input.ProgressInMegaBytes }), - ...(input.SnapshotSizeInMegaBytes != null && { SnapshotSizeInMegaBytes: input.SnapshotSizeInMegaBytes }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterVpcSecurityGroup - */ -const se_AwsRedshiftClusterVpcSecurityGroup = ( - input: AwsRedshiftClusterVpcSecurityGroup, - context: __SerdeContext -): any => { - return { - ...(input.Status != null && { Status: input.Status }), - ...(input.VpcSecurityGroupId != null && { VpcSecurityGroupId: input.VpcSecurityGroupId }), - }; -}; - -/** - * serializeAws_restJson1AwsRedshiftClusterVpcSecurityGroups - */ -const se_AwsRedshiftClusterVpcSecurityGroups = ( - input: AwsRedshiftClusterVpcSecurityGroup[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsRedshiftClusterVpcSecurityGroup(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3AccountPublicAccessBlockDetails - */ -const se_AwsS3AccountPublicAccessBlockDetails = ( - input: AwsS3AccountPublicAccessBlockDetails, - context: __SerdeContext -): any => { - return { - ...(input.BlockPublicAcls != null && { BlockPublicAcls: input.BlockPublicAcls }), - ...(input.BlockPublicPolicy != null && { BlockPublicPolicy: input.BlockPublicPolicy }), - ...(input.IgnorePublicAcls != null && { IgnorePublicAcls: input.IgnorePublicAcls }), - ...(input.RestrictPublicBuckets != null && { RestrictPublicBuckets: input.RestrictPublicBuckets }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.Rules != null && { Rules: se_AwsS3BucketBucketLifecycleConfigurationRulesList(input.Rules, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails, - context: __SerdeContext -): any => { - return { - ...(input.DaysAfterInitiation != null && { DaysAfterInitiation: input.DaysAfterInitiation }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesDetails, - context: __SerdeContext -): any => { - return { - ...(input.AbortIncompleteMultipartUpload != null && { - AbortIncompleteMultipartUpload: - se_AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails( - input.AbortIncompleteMultipartUpload, - context - ), - }), - ...(input.ExpirationDate != null && { ExpirationDate: input.ExpirationDate }), - ...(input.ExpirationInDays != null && { ExpirationInDays: input.ExpirationInDays }), - ...(input.ExpiredObjectDeleteMarker != null && { ExpiredObjectDeleteMarker: input.ExpiredObjectDeleteMarker }), - ...(input.Filter != null && { - Filter: se_AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails(input.Filter, context), - }), - ...(input.ID != null && { ID: input.ID }), - ...(input.NoncurrentVersionExpirationInDays != null && { - NoncurrentVersionExpirationInDays: input.NoncurrentVersionExpirationInDays, - }), - ...(input.NoncurrentVersionTransitions != null && { - NoncurrentVersionTransitions: se_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList( - input.NoncurrentVersionTransitions, - context - ), - }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Transitions != null && { - Transitions: se_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList(input.Transitions, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails, - context: __SerdeContext -): any => { - return { - ...(input.Predicate != null && { - Predicate: se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails(input.Predicate, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails, - context: __SerdeContext -): any => { - return { - ...(input.Operands != null && { - Operands: se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList(input.Operands, context), - }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.Tag != null && { - Tag: se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails(input.Tag, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.Tag != null && { - Tag: se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails(input.Tag, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails, - context: __SerdeContext -): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails, - context: __SerdeContext -): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesList - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesList = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketBucketLifecycleConfigurationRulesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Days != null && { Days: input.Days }), - ...(input.StorageClass != null && { StorageClass: input.StorageClass }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Date != null && { Date: input.Date }), - ...(input.Days != null && { Days: input.Days }), - ...(input.StorageClass != null && { StorageClass: input.StorageClass }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList - */ -const se_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList = ( - input: AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketBucketVersioningConfiguration - */ -const se_AwsS3BucketBucketVersioningConfiguration = ( - input: AwsS3BucketBucketVersioningConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.IsMfaDeleteEnabled != null && { IsMfaDeleteEnabled: input.IsMfaDeleteEnabled }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketDetails - */ -const se_AwsS3BucketDetails = (input: AwsS3BucketDetails, context: __SerdeContext): any => { - return { - ...(input.AccessControlList != null && { AccessControlList: input.AccessControlList }), - ...(input.BucketLifecycleConfiguration != null && { - BucketLifecycleConfiguration: se_AwsS3BucketBucketLifecycleConfigurationDetails( - input.BucketLifecycleConfiguration, - context - ), - }), - ...(input.BucketLoggingConfiguration != null && { - BucketLoggingConfiguration: se_AwsS3BucketLoggingConfiguration(input.BucketLoggingConfiguration, context), - }), - ...(input.BucketNotificationConfiguration != null && { - BucketNotificationConfiguration: se_AwsS3BucketNotificationConfiguration( - input.BucketNotificationConfiguration, - context - ), - }), - ...(input.BucketVersioningConfiguration != null && { - BucketVersioningConfiguration: se_AwsS3BucketBucketVersioningConfiguration( - input.BucketVersioningConfiguration, - context - ), - }), - ...(input.BucketWebsiteConfiguration != null && { - BucketWebsiteConfiguration: se_AwsS3BucketWebsiteConfiguration(input.BucketWebsiteConfiguration, context), - }), - ...(input.CreatedAt != null && { CreatedAt: input.CreatedAt }), - ...(input.ObjectLockConfiguration != null && { - ObjectLockConfiguration: se_AwsS3BucketObjectLockConfiguration(input.ObjectLockConfiguration, context), - }), - ...(input.OwnerAccountId != null && { OwnerAccountId: input.OwnerAccountId }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - ...(input.OwnerName != null && { OwnerName: input.OwnerName }), - ...(input.PublicAccessBlockConfiguration != null && { - PublicAccessBlockConfiguration: se_AwsS3AccountPublicAccessBlockDetails( - input.PublicAccessBlockConfiguration, - context - ), - }), - ...(input.ServerSideEncryptionConfiguration != null && { - ServerSideEncryptionConfiguration: se_AwsS3BucketServerSideEncryptionConfiguration( - input.ServerSideEncryptionConfiguration, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketLoggingConfiguration - */ -const se_AwsS3BucketLoggingConfiguration = (input: AwsS3BucketLoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.DestinationBucketName != null && { DestinationBucketName: input.DestinationBucketName }), - ...(input.LogFilePrefix != null && { LogFilePrefix: input.LogFilePrefix }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfiguration - */ -const se_AwsS3BucketNotificationConfiguration = ( - input: AwsS3BucketNotificationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Configurations != null && { - Configurations: se_AwsS3BucketNotificationConfigurationDetails(input.Configurations, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationDetail - */ -const se_AwsS3BucketNotificationConfigurationDetail = ( - input: AwsS3BucketNotificationConfigurationDetail, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.Events != null && { Events: se_AwsS3BucketNotificationConfigurationEvents(input.Events, context) }), - ...(input.Filter != null && { Filter: se_AwsS3BucketNotificationConfigurationFilter(input.Filter, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationDetails - */ -const se_AwsS3BucketNotificationConfigurationDetails = ( - input: AwsS3BucketNotificationConfigurationDetail[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketNotificationConfigurationDetail(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationEvents - */ -const se_AwsS3BucketNotificationConfigurationEvents = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationFilter - */ -const se_AwsS3BucketNotificationConfigurationFilter = ( - input: AwsS3BucketNotificationConfigurationFilter, - context: __SerdeContext -): any => { - return { - ...(input.S3KeyFilter != null && { - S3KeyFilter: se_AwsS3BucketNotificationConfigurationS3KeyFilter(input.S3KeyFilter, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationS3KeyFilter - */ -const se_AwsS3BucketNotificationConfigurationS3KeyFilter = ( - input: AwsS3BucketNotificationConfigurationS3KeyFilter, - context: __SerdeContext -): any => { - return { - ...(input.FilterRules != null && { - FilterRules: se_AwsS3BucketNotificationConfigurationS3KeyFilterRules(input.FilterRules, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationS3KeyFilterRule - */ -const se_AwsS3BucketNotificationConfigurationS3KeyFilterRule = ( - input: AwsS3BucketNotificationConfigurationS3KeyFilterRule, - context: __SerdeContext -): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketNotificationConfigurationS3KeyFilterRules - */ -const se_AwsS3BucketNotificationConfigurationS3KeyFilterRules = ( - input: AwsS3BucketNotificationConfigurationS3KeyFilterRule[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketNotificationConfigurationS3KeyFilterRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketObjectLockConfiguration - */ -const se_AwsS3BucketObjectLockConfiguration = ( - input: AwsS3BucketObjectLockConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.ObjectLockEnabled != null && { ObjectLockEnabled: input.ObjectLockEnabled }), - ...(input.Rule != null && { Rule: se_AwsS3BucketObjectLockConfigurationRuleDetails(input.Rule, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails - */ -const se_AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails = ( - input: AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails, - context: __SerdeContext -): any => { - return { - ...(input.Days != null && { Days: input.Days }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Years != null && { Years: input.Years }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketObjectLockConfigurationRuleDetails - */ -const se_AwsS3BucketObjectLockConfigurationRuleDetails = ( - input: AwsS3BucketObjectLockConfigurationRuleDetails, - context: __SerdeContext -): any => { - return { - ...(input.DefaultRetention != null && { - DefaultRetention: se_AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails( - input.DefaultRetention, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketServerSideEncryptionByDefault - */ -const se_AwsS3BucketServerSideEncryptionByDefault = ( - input: AwsS3BucketServerSideEncryptionByDefault, - context: __SerdeContext -): any => { - return { - ...(input.KMSMasterKeyID != null && { KMSMasterKeyID: input.KMSMasterKeyID }), - ...(input.SSEAlgorithm != null && { SSEAlgorithm: input.SSEAlgorithm }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketServerSideEncryptionConfiguration - */ -const se_AwsS3BucketServerSideEncryptionConfiguration = ( - input: AwsS3BucketServerSideEncryptionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.Rules != null && { Rules: se_AwsS3BucketServerSideEncryptionRules(input.Rules, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketServerSideEncryptionRule - */ -const se_AwsS3BucketServerSideEncryptionRule = ( - input: AwsS3BucketServerSideEncryptionRule, - context: __SerdeContext -): any => { - return { - ...(input.ApplyServerSideEncryptionByDefault != null && { - ApplyServerSideEncryptionByDefault: se_AwsS3BucketServerSideEncryptionByDefault( - input.ApplyServerSideEncryptionByDefault, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketServerSideEncryptionRules - */ -const se_AwsS3BucketServerSideEncryptionRules = ( - input: AwsS3BucketServerSideEncryptionRule[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketServerSideEncryptionRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3BucketWebsiteConfiguration - */ -const se_AwsS3BucketWebsiteConfiguration = (input: AwsS3BucketWebsiteConfiguration, context: __SerdeContext): any => { - return { - ...(input.ErrorDocument != null && { ErrorDocument: input.ErrorDocument }), - ...(input.IndexDocumentSuffix != null && { IndexDocumentSuffix: input.IndexDocumentSuffix }), - ...(input.RedirectAllRequestsTo != null && { - RedirectAllRequestsTo: se_AwsS3BucketWebsiteConfigurationRedirectTo(input.RedirectAllRequestsTo, context), - }), - ...(input.RoutingRules != null && { - RoutingRules: se_AwsS3BucketWebsiteConfigurationRoutingRules(input.RoutingRules, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketWebsiteConfigurationRedirectTo - */ -const se_AwsS3BucketWebsiteConfigurationRedirectTo = ( - input: AwsS3BucketWebsiteConfigurationRedirectTo, - context: __SerdeContext -): any => { - return { - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRule - */ -const se_AwsS3BucketWebsiteConfigurationRoutingRule = ( - input: AwsS3BucketWebsiteConfigurationRoutingRule, - context: __SerdeContext -): any => { - return { - ...(input.Condition != null && { - Condition: se_AwsS3BucketWebsiteConfigurationRoutingRuleCondition(input.Condition, context), - }), - ...(input.Redirect != null && { - Redirect: se_AwsS3BucketWebsiteConfigurationRoutingRuleRedirect(input.Redirect, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRuleCondition - */ -const se_AwsS3BucketWebsiteConfigurationRoutingRuleCondition = ( - input: AwsS3BucketWebsiteConfigurationRoutingRuleCondition, - context: __SerdeContext -): any => { - return { - ...(input.HttpErrorCodeReturnedEquals != null && { - HttpErrorCodeReturnedEquals: input.HttpErrorCodeReturnedEquals, - }), - ...(input.KeyPrefixEquals != null && { KeyPrefixEquals: input.KeyPrefixEquals }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRuleRedirect - */ -const se_AwsS3BucketWebsiteConfigurationRoutingRuleRedirect = ( - input: AwsS3BucketWebsiteConfigurationRoutingRuleRedirect, - context: __SerdeContext -): any => { - return { - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.HttpRedirectCode != null && { HttpRedirectCode: input.HttpRedirectCode }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.ReplaceKeyPrefixWith != null && { ReplaceKeyPrefixWith: input.ReplaceKeyPrefixWith }), - ...(input.ReplaceKeyWith != null && { ReplaceKeyWith: input.ReplaceKeyWith }), - }; -}; - -/** - * serializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRules - */ -const se_AwsS3BucketWebsiteConfigurationRoutingRules = ( - input: AwsS3BucketWebsiteConfigurationRoutingRule[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsS3BucketWebsiteConfigurationRoutingRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsS3ObjectDetails - */ -const se_AwsS3ObjectDetails = (input: AwsS3ObjectDetails, context: __SerdeContext): any => { - return { - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.ETag != null && { ETag: input.ETag }), - ...(input.LastModified != null && { LastModified: input.LastModified }), - ...(input.SSEKMSKeyId != null && { SSEKMSKeyId: input.SSEKMSKeyId }), - ...(input.ServerSideEncryption != null && { ServerSideEncryption: input.ServerSideEncryption }), - ...(input.VersionId != null && { VersionId: input.VersionId }), - }; -}; - -/** - * serializeAws_restJson1AwsSageMakerNotebookInstanceDetails - */ -const se_AwsSageMakerNotebookInstanceDetails = ( - input: AwsSageMakerNotebookInstanceDetails, - context: __SerdeContext -): any => { - return { - ...(input.AcceleratorTypes != null && { AcceleratorTypes: se_NonEmptyStringList(input.AcceleratorTypes, context) }), - ...(input.AdditionalCodeRepositories != null && { - AdditionalCodeRepositories: se_NonEmptyStringList(input.AdditionalCodeRepositories, context), - }), - ...(input.DefaultCodeRepository != null && { DefaultCodeRepository: input.DefaultCodeRepository }), - ...(input.DirectInternetAccess != null && { DirectInternetAccess: input.DirectInternetAccess }), - ...(input.FailureReason != null && { FailureReason: input.FailureReason }), - ...(input.InstanceMetadataServiceConfiguration != null && { - InstanceMetadataServiceConfiguration: se_AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails( - input.InstanceMetadataServiceConfiguration, - context - ), - }), - ...(input.InstanceType != null && { InstanceType: input.InstanceType }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.NotebookInstanceArn != null && { NotebookInstanceArn: input.NotebookInstanceArn }), - ...(input.NotebookInstanceLifecycleConfigName != null && { - NotebookInstanceLifecycleConfigName: input.NotebookInstanceLifecycleConfigName, - }), - ...(input.NotebookInstanceName != null && { NotebookInstanceName: input.NotebookInstanceName }), - ...(input.NotebookInstanceStatus != null && { NotebookInstanceStatus: input.NotebookInstanceStatus }), - ...(input.PlatformIdentifier != null && { PlatformIdentifier: input.PlatformIdentifier }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.RootAccess != null && { RootAccess: input.RootAccess }), - ...(input.SecurityGroups != null && { SecurityGroups: se_NonEmptyStringList(input.SecurityGroups, context) }), - ...(input.SubnetId != null && { SubnetId: input.SubnetId }), - ...(input.Url != null && { Url: input.Url }), - ...(input.VolumeSizeInGB != null && { VolumeSizeInGB: input.VolumeSizeInGB }), - }; -}; - -/** - * serializeAws_restJson1AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails - */ -const se_AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails = ( - input: AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails, - context: __SerdeContext -): any => { - return { - ...(input.MinimumInstanceMetadataServiceVersion != null && { - MinimumInstanceMetadataServiceVersion: input.MinimumInstanceMetadataServiceVersion, - }), - }; -}; - -/** - * serializeAws_restJson1AwsSecretsManagerSecretDetails - */ -const se_AwsSecretsManagerSecretDetails = (input: AwsSecretsManagerSecretDetails, context: __SerdeContext): any => { - return { - ...(input.Deleted != null && { Deleted: input.Deleted }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RotationEnabled != null && { RotationEnabled: input.RotationEnabled }), - ...(input.RotationLambdaArn != null && { RotationLambdaArn: input.RotationLambdaArn }), - ...(input.RotationOccurredWithinFrequency != null && { - RotationOccurredWithinFrequency: input.RotationOccurredWithinFrequency, - }), - ...(input.RotationRules != null && { - RotationRules: se_AwsSecretsManagerSecretRotationRules(input.RotationRules, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsSecretsManagerSecretRotationRules - */ -const se_AwsSecretsManagerSecretRotationRules = ( - input: AwsSecretsManagerSecretRotationRules, - context: __SerdeContext -): any => { - return { - ...(input.AutomaticallyAfterDays != null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays }), - }; -}; - -/** - * serializeAws_restJson1AwsSecurityFinding - */ -const se_AwsSecurityFinding = (input: AwsSecurityFinding, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_Action(input.Action, context) }), - ...(input.AwsAccountId != null && { AwsAccountId: input.AwsAccountId }), - ...(input.CompanyName != null && { CompanyName: input.CompanyName }), - ...(input.Compliance != null && { Compliance: se_Compliance(input.Compliance, context) }), - ...(input.Confidence != null && { Confidence: input.Confidence }), - ...(input.CreatedAt != null && { CreatedAt: input.CreatedAt }), - ...(input.Criticality != null && { Criticality: input.Criticality }), - ...(input.Description != null && { Description: input.Description }), - ...(input.FindingProviderFields != null && { - FindingProviderFields: se_FindingProviderFields(input.FindingProviderFields, context), - }), - ...(input.FirstObservedAt != null && { FirstObservedAt: input.FirstObservedAt }), - ...(input.GeneratorId != null && { GeneratorId: input.GeneratorId }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LastObservedAt != null && { LastObservedAt: input.LastObservedAt }), - ...(input.Malware != null && { Malware: se_MalwareList(input.Malware, context) }), - ...(input.Network != null && { Network: se_Network(input.Network, context) }), - ...(input.NetworkPath != null && { NetworkPath: se_NetworkPathList(input.NetworkPath, context) }), - ...(input.Note != null && { Note: se_Note(input.Note, context) }), - ...(input.PatchSummary != null && { PatchSummary: se_PatchSummary(input.PatchSummary, context) }), - ...(input.Process != null && { Process: se_ProcessDetails(input.Process, context) }), - ...(input.ProductArn != null && { ProductArn: input.ProductArn }), - ...(input.ProductFields != null && { ProductFields: se_FieldMap(input.ProductFields, context) }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ...(input.RecordState != null && { RecordState: input.RecordState }), - ...(input.Region != null && { Region: input.Region }), - ...(input.RelatedFindings != null && { RelatedFindings: se_RelatedFindingList(input.RelatedFindings, context) }), - ...(input.Remediation != null && { Remediation: se_Remediation(input.Remediation, context) }), - ...(input.Resources != null && { Resources: se_ResourceList(input.Resources, context) }), - ...(input.Sample != null && { Sample: input.Sample }), - ...(input.SchemaVersion != null && { SchemaVersion: input.SchemaVersion }), - ...(input.Severity != null && { Severity: se_Severity(input.Severity, context) }), - ...(input.SourceUrl != null && { SourceUrl: input.SourceUrl }), - ...(input.ThreatIntelIndicators != null && { - ThreatIntelIndicators: se_ThreatIntelIndicatorList(input.ThreatIntelIndicators, context), - }), - ...(input.Threats != null && { Threats: se_ThreatList(input.Threats, context) }), - ...(input.Title != null && { Title: input.Title }), - ...(input.Types != null && { Types: se_TypeList(input.Types, context) }), - ...(input.UpdatedAt != null && { UpdatedAt: input.UpdatedAt }), - ...(input.UserDefinedFields != null && { UserDefinedFields: se_FieldMap(input.UserDefinedFields, context) }), - ...(input.VerificationState != null && { VerificationState: input.VerificationState }), - ...(input.Vulnerabilities != null && { Vulnerabilities: se_VulnerabilityList(input.Vulnerabilities, context) }), - ...(input.Workflow != null && { Workflow: se_Workflow(input.Workflow, context) }), - ...(input.WorkflowState != null && { WorkflowState: input.WorkflowState }), - }; -}; - -/** - * serializeAws_restJson1AwsSecurityFindingFilters - */ -const se_AwsSecurityFindingFilters = (input: AwsSecurityFindingFilters, context: __SerdeContext): any => { - return { - ...(input.AwsAccountId != null && { AwsAccountId: se_StringFilterList(input.AwsAccountId, context) }), - ...(input.CompanyName != null && { CompanyName: se_StringFilterList(input.CompanyName, context) }), - ...(input.ComplianceAssociatedStandardsId != null && { - ComplianceAssociatedStandardsId: se_StringFilterList(input.ComplianceAssociatedStandardsId, context), - }), - ...(input.ComplianceSecurityControlId != null && { - ComplianceSecurityControlId: se_StringFilterList(input.ComplianceSecurityControlId, context), - }), - ...(input.ComplianceStatus != null && { ComplianceStatus: se_StringFilterList(input.ComplianceStatus, context) }), - ...(input.Confidence != null && { Confidence: se_NumberFilterList(input.Confidence, context) }), - ...(input.CreatedAt != null && { CreatedAt: se_DateFilterList(input.CreatedAt, context) }), - ...(input.Criticality != null && { Criticality: se_NumberFilterList(input.Criticality, context) }), - ...(input.Description != null && { Description: se_StringFilterList(input.Description, context) }), - ...(input.FindingProviderFieldsConfidence != null && { - FindingProviderFieldsConfidence: se_NumberFilterList(input.FindingProviderFieldsConfidence, context), - }), - ...(input.FindingProviderFieldsCriticality != null && { - FindingProviderFieldsCriticality: se_NumberFilterList(input.FindingProviderFieldsCriticality, context), - }), - ...(input.FindingProviderFieldsRelatedFindingsId != null && { - FindingProviderFieldsRelatedFindingsId: se_StringFilterList( - input.FindingProviderFieldsRelatedFindingsId, - context - ), - }), - ...(input.FindingProviderFieldsRelatedFindingsProductArn != null && { - FindingProviderFieldsRelatedFindingsProductArn: se_StringFilterList( - input.FindingProviderFieldsRelatedFindingsProductArn, - context - ), - }), - ...(input.FindingProviderFieldsSeverityLabel != null && { - FindingProviderFieldsSeverityLabel: se_StringFilterList(input.FindingProviderFieldsSeverityLabel, context), - }), - ...(input.FindingProviderFieldsSeverityOriginal != null && { - FindingProviderFieldsSeverityOriginal: se_StringFilterList(input.FindingProviderFieldsSeverityOriginal, context), - }), - ...(input.FindingProviderFieldsTypes != null && { - FindingProviderFieldsTypes: se_StringFilterList(input.FindingProviderFieldsTypes, context), - }), - ...(input.FirstObservedAt != null && { FirstObservedAt: se_DateFilterList(input.FirstObservedAt, context) }), - ...(input.GeneratorId != null && { GeneratorId: se_StringFilterList(input.GeneratorId, context) }), - ...(input.Id != null && { Id: se_StringFilterList(input.Id, context) }), - ...(input.Keyword != null && { Keyword: se_KeywordFilterList(input.Keyword, context) }), - ...(input.LastObservedAt != null && { LastObservedAt: se_DateFilterList(input.LastObservedAt, context) }), - ...(input.MalwareName != null && { MalwareName: se_StringFilterList(input.MalwareName, context) }), - ...(input.MalwarePath != null && { MalwarePath: se_StringFilterList(input.MalwarePath, context) }), - ...(input.MalwareState != null && { MalwareState: se_StringFilterList(input.MalwareState, context) }), - ...(input.MalwareType != null && { MalwareType: se_StringFilterList(input.MalwareType, context) }), - ...(input.NetworkDestinationDomain != null && { - NetworkDestinationDomain: se_StringFilterList(input.NetworkDestinationDomain, context), - }), - ...(input.NetworkDestinationIpV4 != null && { - NetworkDestinationIpV4: se_IpFilterList(input.NetworkDestinationIpV4, context), - }), - ...(input.NetworkDestinationIpV6 != null && { - NetworkDestinationIpV6: se_IpFilterList(input.NetworkDestinationIpV6, context), - }), - ...(input.NetworkDestinationPort != null && { - NetworkDestinationPort: se_NumberFilterList(input.NetworkDestinationPort, context), - }), - ...(input.NetworkDirection != null && { NetworkDirection: se_StringFilterList(input.NetworkDirection, context) }), - ...(input.NetworkProtocol != null && { NetworkProtocol: se_StringFilterList(input.NetworkProtocol, context) }), - ...(input.NetworkSourceDomain != null && { - NetworkSourceDomain: se_StringFilterList(input.NetworkSourceDomain, context), - }), - ...(input.NetworkSourceIpV4 != null && { NetworkSourceIpV4: se_IpFilterList(input.NetworkSourceIpV4, context) }), - ...(input.NetworkSourceIpV6 != null && { NetworkSourceIpV6: se_IpFilterList(input.NetworkSourceIpV6, context) }), - ...(input.NetworkSourceMac != null && { NetworkSourceMac: se_StringFilterList(input.NetworkSourceMac, context) }), - ...(input.NetworkSourcePort != null && { - NetworkSourcePort: se_NumberFilterList(input.NetworkSourcePort, context), - }), - ...(input.NoteText != null && { NoteText: se_StringFilterList(input.NoteText, context) }), - ...(input.NoteUpdatedAt != null && { NoteUpdatedAt: se_DateFilterList(input.NoteUpdatedAt, context) }), - ...(input.NoteUpdatedBy != null && { NoteUpdatedBy: se_StringFilterList(input.NoteUpdatedBy, context) }), - ...(input.ProcessLaunchedAt != null && { ProcessLaunchedAt: se_DateFilterList(input.ProcessLaunchedAt, context) }), - ...(input.ProcessName != null && { ProcessName: se_StringFilterList(input.ProcessName, context) }), - ...(input.ProcessParentPid != null && { ProcessParentPid: se_NumberFilterList(input.ProcessParentPid, context) }), - ...(input.ProcessPath != null && { ProcessPath: se_StringFilterList(input.ProcessPath, context) }), - ...(input.ProcessPid != null && { ProcessPid: se_NumberFilterList(input.ProcessPid, context) }), - ...(input.ProcessTerminatedAt != null && { - ProcessTerminatedAt: se_DateFilterList(input.ProcessTerminatedAt, context), - }), - ...(input.ProductArn != null && { ProductArn: se_StringFilterList(input.ProductArn, context) }), - ...(input.ProductFields != null && { ProductFields: se_MapFilterList(input.ProductFields, context) }), - ...(input.ProductName != null && { ProductName: se_StringFilterList(input.ProductName, context) }), - ...(input.RecommendationText != null && { - RecommendationText: se_StringFilterList(input.RecommendationText, context), - }), - ...(input.RecordState != null && { RecordState: se_StringFilterList(input.RecordState, context) }), - ...(input.Region != null && { Region: se_StringFilterList(input.Region, context) }), - ...(input.RelatedFindingsId != null && { - RelatedFindingsId: se_StringFilterList(input.RelatedFindingsId, context), - }), - ...(input.RelatedFindingsProductArn != null && { - RelatedFindingsProductArn: se_StringFilterList(input.RelatedFindingsProductArn, context), - }), - ...(input.ResourceAwsEc2InstanceIamInstanceProfileArn != null && { - ResourceAwsEc2InstanceIamInstanceProfileArn: se_StringFilterList( - input.ResourceAwsEc2InstanceIamInstanceProfileArn, - context - ), - }), - ...(input.ResourceAwsEc2InstanceImageId != null && { - ResourceAwsEc2InstanceImageId: se_StringFilterList(input.ResourceAwsEc2InstanceImageId, context), - }), - ...(input.ResourceAwsEc2InstanceIpV4Addresses != null && { - ResourceAwsEc2InstanceIpV4Addresses: se_IpFilterList(input.ResourceAwsEc2InstanceIpV4Addresses, context), - }), - ...(input.ResourceAwsEc2InstanceIpV6Addresses != null && { - ResourceAwsEc2InstanceIpV6Addresses: se_IpFilterList(input.ResourceAwsEc2InstanceIpV6Addresses, context), - }), - ...(input.ResourceAwsEc2InstanceKeyName != null && { - ResourceAwsEc2InstanceKeyName: se_StringFilterList(input.ResourceAwsEc2InstanceKeyName, context), - }), - ...(input.ResourceAwsEc2InstanceLaunchedAt != null && { - ResourceAwsEc2InstanceLaunchedAt: se_DateFilterList(input.ResourceAwsEc2InstanceLaunchedAt, context), - }), - ...(input.ResourceAwsEc2InstanceSubnetId != null && { - ResourceAwsEc2InstanceSubnetId: se_StringFilterList(input.ResourceAwsEc2InstanceSubnetId, context), - }), - ...(input.ResourceAwsEc2InstanceType != null && { - ResourceAwsEc2InstanceType: se_StringFilterList(input.ResourceAwsEc2InstanceType, context), - }), - ...(input.ResourceAwsEc2InstanceVpcId != null && { - ResourceAwsEc2InstanceVpcId: se_StringFilterList(input.ResourceAwsEc2InstanceVpcId, context), - }), - ...(input.ResourceAwsIamAccessKeyCreatedAt != null && { - ResourceAwsIamAccessKeyCreatedAt: se_DateFilterList(input.ResourceAwsIamAccessKeyCreatedAt, context), - }), - ...(input.ResourceAwsIamAccessKeyPrincipalName != null && { - ResourceAwsIamAccessKeyPrincipalName: se_StringFilterList(input.ResourceAwsIamAccessKeyPrincipalName, context), - }), - ...(input.ResourceAwsIamAccessKeyStatus != null && { - ResourceAwsIamAccessKeyStatus: se_StringFilterList(input.ResourceAwsIamAccessKeyStatus, context), - }), - ...(input.ResourceAwsIamAccessKeyUserName != null && { - ResourceAwsIamAccessKeyUserName: se_StringFilterList(input.ResourceAwsIamAccessKeyUserName, context), - }), - ...(input.ResourceAwsIamUserUserName != null && { - ResourceAwsIamUserUserName: se_StringFilterList(input.ResourceAwsIamUserUserName, context), - }), - ...(input.ResourceAwsS3BucketOwnerId != null && { - ResourceAwsS3BucketOwnerId: se_StringFilterList(input.ResourceAwsS3BucketOwnerId, context), - }), - ...(input.ResourceAwsS3BucketOwnerName != null && { - ResourceAwsS3BucketOwnerName: se_StringFilterList(input.ResourceAwsS3BucketOwnerName, context), - }), - ...(input.ResourceContainerImageId != null && { - ResourceContainerImageId: se_StringFilterList(input.ResourceContainerImageId, context), - }), - ...(input.ResourceContainerImageName != null && { - ResourceContainerImageName: se_StringFilterList(input.ResourceContainerImageName, context), - }), - ...(input.ResourceContainerLaunchedAt != null && { - ResourceContainerLaunchedAt: se_DateFilterList(input.ResourceContainerLaunchedAt, context), - }), - ...(input.ResourceContainerName != null && { - ResourceContainerName: se_StringFilterList(input.ResourceContainerName, context), - }), - ...(input.ResourceDetailsOther != null && { - ResourceDetailsOther: se_MapFilterList(input.ResourceDetailsOther, context), - }), - ...(input.ResourceId != null && { ResourceId: se_StringFilterList(input.ResourceId, context) }), - ...(input.ResourcePartition != null && { - ResourcePartition: se_StringFilterList(input.ResourcePartition, context), - }), - ...(input.ResourceRegion != null && { ResourceRegion: se_StringFilterList(input.ResourceRegion, context) }), - ...(input.ResourceTags != null && { ResourceTags: se_MapFilterList(input.ResourceTags, context) }), - ...(input.ResourceType != null && { ResourceType: se_StringFilterList(input.ResourceType, context) }), - ...(input.Sample != null && { Sample: se_BooleanFilterList(input.Sample, context) }), - ...(input.SeverityLabel != null && { SeverityLabel: se_StringFilterList(input.SeverityLabel, context) }), - ...(input.SeverityNormalized != null && { - SeverityNormalized: se_NumberFilterList(input.SeverityNormalized, context), - }), - ...(input.SeverityProduct != null && { SeverityProduct: se_NumberFilterList(input.SeverityProduct, context) }), - ...(input.SourceUrl != null && { SourceUrl: se_StringFilterList(input.SourceUrl, context) }), - ...(input.ThreatIntelIndicatorCategory != null && { - ThreatIntelIndicatorCategory: se_StringFilterList(input.ThreatIntelIndicatorCategory, context), - }), - ...(input.ThreatIntelIndicatorLastObservedAt != null && { - ThreatIntelIndicatorLastObservedAt: se_DateFilterList(input.ThreatIntelIndicatorLastObservedAt, context), - }), - ...(input.ThreatIntelIndicatorSource != null && { - ThreatIntelIndicatorSource: se_StringFilterList(input.ThreatIntelIndicatorSource, context), - }), - ...(input.ThreatIntelIndicatorSourceUrl != null && { - ThreatIntelIndicatorSourceUrl: se_StringFilterList(input.ThreatIntelIndicatorSourceUrl, context), - }), - ...(input.ThreatIntelIndicatorType != null && { - ThreatIntelIndicatorType: se_StringFilterList(input.ThreatIntelIndicatorType, context), - }), - ...(input.ThreatIntelIndicatorValue != null && { - ThreatIntelIndicatorValue: se_StringFilterList(input.ThreatIntelIndicatorValue, context), - }), - ...(input.Title != null && { Title: se_StringFilterList(input.Title, context) }), - ...(input.Type != null && { Type: se_StringFilterList(input.Type, context) }), - ...(input.UpdatedAt != null && { UpdatedAt: se_DateFilterList(input.UpdatedAt, context) }), - ...(input.UserDefinedFields != null && { UserDefinedFields: se_MapFilterList(input.UserDefinedFields, context) }), - ...(input.VerificationState != null && { - VerificationState: se_StringFilterList(input.VerificationState, context), - }), - ...(input.WorkflowState != null && { WorkflowState: se_StringFilterList(input.WorkflowState, context) }), - ...(input.WorkflowStatus != null && { WorkflowStatus: se_StringFilterList(input.WorkflowStatus, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsSecurityFindingIdentifier - */ -const se_AwsSecurityFindingIdentifier = (input: AwsSecurityFindingIdentifier, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.ProductArn != null && { ProductArn: input.ProductArn }), - }; -}; - -/** - * serializeAws_restJson1AwsSecurityFindingIdentifierList - */ -const se_AwsSecurityFindingIdentifierList = (input: AwsSecurityFindingIdentifier[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsSecurityFindingIdentifier(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsSnsTopicDetails - */ -const se_AwsSnsTopicDetails = (input: AwsSnsTopicDetails, context: __SerdeContext): any => { - return { - ...(input.ApplicationSuccessFeedbackRoleArn != null && { - ApplicationSuccessFeedbackRoleArn: input.ApplicationSuccessFeedbackRoleArn, - }), - ...(input.FirehoseFailureFeedbackRoleArn != null && { - FirehoseFailureFeedbackRoleArn: input.FirehoseFailureFeedbackRoleArn, - }), - ...(input.FirehoseSuccessFeedbackRoleArn != null && { - FirehoseSuccessFeedbackRoleArn: input.FirehoseSuccessFeedbackRoleArn, - }), - ...(input.HttpFailureFeedbackRoleArn != null && { HttpFailureFeedbackRoleArn: input.HttpFailureFeedbackRoleArn }), - ...(input.HttpSuccessFeedbackRoleArn != null && { HttpSuccessFeedbackRoleArn: input.HttpSuccessFeedbackRoleArn }), - ...(input.KmsMasterKeyId != null && { KmsMasterKeyId: input.KmsMasterKeyId }), - ...(input.Owner != null && { Owner: input.Owner }), - ...(input.SqsFailureFeedbackRoleArn != null && { SqsFailureFeedbackRoleArn: input.SqsFailureFeedbackRoleArn }), - ...(input.SqsSuccessFeedbackRoleArn != null && { SqsSuccessFeedbackRoleArn: input.SqsSuccessFeedbackRoleArn }), - ...(input.Subscription != null && { Subscription: se_AwsSnsTopicSubscriptionList(input.Subscription, context) }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; - -/** - * serializeAws_restJson1AwsSnsTopicSubscription - */ -const se_AwsSnsTopicSubscription = (input: AwsSnsTopicSubscription, context: __SerdeContext): any => { - return { - ...(input.Endpoint != null && { Endpoint: input.Endpoint }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; - -/** - * serializeAws_restJson1AwsSnsTopicSubscriptionList - */ -const se_AwsSnsTopicSubscriptionList = (input: AwsSnsTopicSubscription[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsSnsTopicSubscription(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsSqsQueueDetails - */ -const se_AwsSqsQueueDetails = (input: AwsSqsQueueDetails, context: __SerdeContext): any => { - return { - ...(input.DeadLetterTargetArn != null && { DeadLetterTargetArn: input.DeadLetterTargetArn }), - ...(input.KmsDataKeyReusePeriodSeconds != null && { - KmsDataKeyReusePeriodSeconds: input.KmsDataKeyReusePeriodSeconds, - }), - ...(input.KmsMasterKeyId != null && { KmsMasterKeyId: input.KmsMasterKeyId }), - ...(input.QueueName != null && { QueueName: input.QueueName }), - }; -}; - -/** - * serializeAws_restJson1AwsSsmComplianceSummary - */ -const se_AwsSsmComplianceSummary = (input: AwsSsmComplianceSummary, context: __SerdeContext): any => { - return { - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.CompliantCriticalCount != null && { CompliantCriticalCount: input.CompliantCriticalCount }), - ...(input.CompliantHighCount != null && { CompliantHighCount: input.CompliantHighCount }), - ...(input.CompliantInformationalCount != null && { - CompliantInformationalCount: input.CompliantInformationalCount, - }), - ...(input.CompliantLowCount != null && { CompliantLowCount: input.CompliantLowCount }), - ...(input.CompliantMediumCount != null && { CompliantMediumCount: input.CompliantMediumCount }), - ...(input.CompliantUnspecifiedCount != null && { CompliantUnspecifiedCount: input.CompliantUnspecifiedCount }), - ...(input.ExecutionType != null && { ExecutionType: input.ExecutionType }), - ...(input.NonCompliantCriticalCount != null && { NonCompliantCriticalCount: input.NonCompliantCriticalCount }), - ...(input.NonCompliantHighCount != null && { NonCompliantHighCount: input.NonCompliantHighCount }), - ...(input.NonCompliantInformationalCount != null && { - NonCompliantInformationalCount: input.NonCompliantInformationalCount, - }), - ...(input.NonCompliantLowCount != null && { NonCompliantLowCount: input.NonCompliantLowCount }), - ...(input.NonCompliantMediumCount != null && { NonCompliantMediumCount: input.NonCompliantMediumCount }), - ...(input.NonCompliantUnspecifiedCount != null && { - NonCompliantUnspecifiedCount: input.NonCompliantUnspecifiedCount, - }), - ...(input.OverallSeverity != null && { OverallSeverity: input.OverallSeverity }), - ...(input.PatchBaselineId != null && { PatchBaselineId: input.PatchBaselineId }), - ...(input.PatchGroup != null && { PatchGroup: input.PatchGroup }), - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1AwsSsmPatch - */ -const se_AwsSsmPatch = (input: AwsSsmPatch, context: __SerdeContext): any => { - return { - ...(input.ComplianceSummary != null && { - ComplianceSummary: se_AwsSsmComplianceSummary(input.ComplianceSummary, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsSsmPatchComplianceDetails - */ -const se_AwsSsmPatchComplianceDetails = (input: AwsSsmPatchComplianceDetails, context: __SerdeContext): any => { - return { - ...(input.Patch != null && { Patch: se_AwsSsmPatch(input.Patch, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRateBasedRuleDetails - */ -const se_AwsWafRateBasedRuleDetails = (input: AwsWafRateBasedRuleDetails, context: __SerdeContext): any => { - return { - ...(input.MatchPredicates != null && { - MatchPredicates: se_AwsWafRateBasedRuleMatchPredicateList(input.MatchPredicates, context), - }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RateKey != null && { RateKey: input.RateKey }), - ...(input.RateLimit != null && { RateLimit: input.RateLimit }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRateBasedRuleMatchPredicate - */ -const se_AwsWafRateBasedRuleMatchPredicate = ( - input: AwsWafRateBasedRuleMatchPredicate, - context: __SerdeContext -): any => { - return { - ...(input.DataId != null && { DataId: input.DataId }), - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRateBasedRuleMatchPredicateList - */ -const se_AwsWafRateBasedRuleMatchPredicateList = ( - input: AwsWafRateBasedRuleMatchPredicate[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRateBasedRuleMatchPredicate(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRegionalRateBasedRuleDetails - */ -const se_AwsWafRegionalRateBasedRuleDetails = ( - input: AwsWafRegionalRateBasedRuleDetails, - context: __SerdeContext -): any => { - return { - ...(input.MatchPredicates != null && { - MatchPredicates: se_AwsWafRegionalRateBasedRuleMatchPredicateList(input.MatchPredicates, context), - }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RateKey != null && { RateKey: input.RateKey }), - ...(input.RateLimit != null && { RateLimit: input.RateLimit }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalRateBasedRuleMatchPredicate - */ -const se_AwsWafRegionalRateBasedRuleMatchPredicate = ( - input: AwsWafRegionalRateBasedRuleMatchPredicate, - context: __SerdeContext -): any => { - return { - ...(input.DataId != null && { DataId: input.DataId }), - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalRateBasedRuleMatchPredicateList - */ -const se_AwsWafRegionalRateBasedRuleMatchPredicateList = ( - input: AwsWafRegionalRateBasedRuleMatchPredicate[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRegionalRateBasedRuleMatchPredicate(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRegionalRuleDetails - */ -const se_AwsWafRegionalRuleDetails = (input: AwsWafRegionalRuleDetails, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PredicateList != null && { - PredicateList: se_AwsWafRegionalRulePredicateList(input.PredicateList, context), - }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalRuleGroupDetails - */ -const se_AwsWafRegionalRuleGroupDetails = (input: AwsWafRegionalRuleGroupDetails, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - ...(input.Rules != null && { Rules: se_AwsWafRegionalRuleGroupRulesList(input.Rules, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalRuleGroupRulesActionDetails - */ -const se_AwsWafRegionalRuleGroupRulesActionDetails = ( - input: AwsWafRegionalRuleGroupRulesActionDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalRuleGroupRulesDetails - */ -const se_AwsWafRegionalRuleGroupRulesDetails = ( - input: AwsWafRegionalRuleGroupRulesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Action != null && { Action: se_AwsWafRegionalRuleGroupRulesActionDetails(input.Action, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalRuleGroupRulesList - */ -const se_AwsWafRegionalRuleGroupRulesList = ( - input: AwsWafRegionalRuleGroupRulesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRegionalRuleGroupRulesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRegionalRulePredicateList - */ -const se_AwsWafRegionalRulePredicateList = ( - input: AwsWafRegionalRulePredicateListDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRegionalRulePredicateListDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRegionalRulePredicateListDetails - */ -const se_AwsWafRegionalRulePredicateListDetails = ( - input: AwsWafRegionalRulePredicateListDetails, - context: __SerdeContext -): any => { - return { - ...(input.DataId != null && { DataId: input.DataId }), - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalWebAclDetails - */ -const se_AwsWafRegionalWebAclDetails = (input: AwsWafRegionalWebAclDetails, context: __SerdeContext): any => { - return { - ...(input.DefaultAction != null && { DefaultAction: input.DefaultAction }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RulesList != null && { RulesList: se_AwsWafRegionalWebAclRulesList(input.RulesList, context) }), - ...(input.WebAclId != null && { WebAclId: input.WebAclId }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalWebAclRulesList - */ -const se_AwsWafRegionalWebAclRulesList = ( - input: AwsWafRegionalWebAclRulesListDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRegionalWebAclRulesListDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRegionalWebAclRulesListActionDetails - */ -const se_AwsWafRegionalWebAclRulesListActionDetails = ( - input: AwsWafRegionalWebAclRulesListActionDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalWebAclRulesListDetails - */ -const se_AwsWafRegionalWebAclRulesListDetails = ( - input: AwsWafRegionalWebAclRulesListDetails, - context: __SerdeContext -): any => { - return { - ...(input.Action != null && { Action: se_AwsWafRegionalWebAclRulesListActionDetails(input.Action, context) }), - ...(input.OverrideAction != null && { - OverrideAction: se_AwsWafRegionalWebAclRulesListOverrideActionDetails(input.OverrideAction, context), - }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRegionalWebAclRulesListOverrideActionDetails - */ -const se_AwsWafRegionalWebAclRulesListOverrideActionDetails = ( - input: AwsWafRegionalWebAclRulesListOverrideActionDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRuleDetails - */ -const se_AwsWafRuleDetails = (input: AwsWafRuleDetails, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PredicateList != null && { PredicateList: se_AwsWafRulePredicateList(input.PredicateList, context) }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRuleGroupDetails - */ -const se_AwsWafRuleGroupDetails = (input: AwsWafRuleGroupDetails, context: __SerdeContext): any => { - return { - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - ...(input.Rules != null && { Rules: se_AwsWafRuleGroupRulesList(input.Rules, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRuleGroupRulesActionDetails - */ -const se_AwsWafRuleGroupRulesActionDetails = ( - input: AwsWafRuleGroupRulesActionDetails, - context: __SerdeContext -): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRuleGroupRulesDetails - */ -const se_AwsWafRuleGroupRulesDetails = (input: AwsWafRuleGroupRulesDetails, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_AwsWafRuleGroupRulesActionDetails(input.Action, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafRuleGroupRulesList - */ -const se_AwsWafRuleGroupRulesList = (input: AwsWafRuleGroupRulesDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRuleGroupRulesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRulePredicateList - */ -const se_AwsWafRulePredicateList = (input: AwsWafRulePredicateListDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafRulePredicateListDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafRulePredicateListDetails - */ -const se_AwsWafRulePredicateListDetails = (input: AwsWafRulePredicateListDetails, context: __SerdeContext): any => { - return { - ...(input.DataId != null && { DataId: input.DataId }), - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2ActionAllowDetails - */ -const se_AwsWafv2ActionAllowDetails = (input: AwsWafv2ActionAllowDetails, context: __SerdeContext): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_AwsWafv2CustomRequestHandlingDetails(input.CustomRequestHandling, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2ActionBlockDetails - */ -const se_AwsWafv2ActionBlockDetails = (input: AwsWafv2ActionBlockDetails, context: __SerdeContext): any => { - return { - ...(input.CustomResponse != null && { - CustomResponse: se_AwsWafv2CustomResponseDetails(input.CustomResponse, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2CustomHttpHeader - */ -const se_AwsWafv2CustomHttpHeader = (input: AwsWafv2CustomHttpHeader, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2CustomRequestHandlingDetails - */ -const se_AwsWafv2CustomRequestHandlingDetails = ( - input: AwsWafv2CustomRequestHandlingDetails, - context: __SerdeContext -): any => { - return { - ...(input.InsertHeaders != null && { InsertHeaders: se_AwsWafv2InsertHeadersList(input.InsertHeaders, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2CustomResponseDetails - */ -const se_AwsWafv2CustomResponseDetails = (input: AwsWafv2CustomResponseDetails, context: __SerdeContext): any => { - return { - ...(input.CustomResponseBodyKey != null && { CustomResponseBodyKey: input.CustomResponseBodyKey }), - ...(input.ResponseCode != null && { ResponseCode: input.ResponseCode }), - ...(input.ResponseHeaders != null && { - ResponseHeaders: se_AwsWafv2InsertHeadersList(input.ResponseHeaders, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2InsertHeadersList - */ -const se_AwsWafv2InsertHeadersList = (input: AwsWafv2CustomHttpHeader[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafv2CustomHttpHeader(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafv2RuleGroupDetails - */ -const se_AwsWafv2RuleGroupDetails = (input: AwsWafv2RuleGroupDetails, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Capacity != null && { Capacity: input.Capacity }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_AwsWafv2RulesList(input.Rules, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.VisibilityConfig != null && { - VisibilityConfig: se_AwsWafv2VisibilityConfigDetails(input.VisibilityConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2RulesActionCaptchaDetails - */ -const se_AwsWafv2RulesActionCaptchaDetails = ( - input: AwsWafv2RulesActionCaptchaDetails, - context: __SerdeContext -): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_AwsWafv2CustomRequestHandlingDetails(input.CustomRequestHandling, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2RulesActionCountDetails - */ -const se_AwsWafv2RulesActionCountDetails = (input: AwsWafv2RulesActionCountDetails, context: __SerdeContext): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_AwsWafv2CustomRequestHandlingDetails(input.CustomRequestHandling, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2RulesActionDetails - */ -const se_AwsWafv2RulesActionDetails = (input: AwsWafv2RulesActionDetails, context: __SerdeContext): any => { - return { - ...(input.Allow != null && { Allow: se_AwsWafv2ActionAllowDetails(input.Allow, context) }), - ...(input.Block != null && { Block: se_AwsWafv2ActionBlockDetails(input.Block, context) }), - ...(input.Captcha != null && { Captcha: se_AwsWafv2RulesActionCaptchaDetails(input.Captcha, context) }), - ...(input.Count != null && { Count: se_AwsWafv2RulesActionCountDetails(input.Count, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2RulesDetails - */ -const se_AwsWafv2RulesDetails = (input: AwsWafv2RulesDetails, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_AwsWafv2RulesActionDetails(input.Action, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OverrideAction != null && { OverrideAction: input.OverrideAction }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.VisibilityConfig != null && { - VisibilityConfig: se_AwsWafv2VisibilityConfigDetails(input.VisibilityConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2RulesList - */ -const se_AwsWafv2RulesList = (input: AwsWafv2RulesDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafv2RulesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsWafv2VisibilityConfigDetails - */ -const se_AwsWafv2VisibilityConfigDetails = (input: AwsWafv2VisibilityConfigDetails, context: __SerdeContext): any => { - return { - ...(input.CloudWatchMetricsEnabled != null && { CloudWatchMetricsEnabled: input.CloudWatchMetricsEnabled }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.SampledRequestsEnabled != null && { SampledRequestsEnabled: input.SampledRequestsEnabled }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2WebAclActionDetails - */ -const se_AwsWafv2WebAclActionDetails = (input: AwsWafv2WebAclActionDetails, context: __SerdeContext): any => { - return { - ...(input.Allow != null && { Allow: se_AwsWafv2ActionAllowDetails(input.Allow, context) }), - ...(input.Block != null && { Block: se_AwsWafv2ActionBlockDetails(input.Block, context) }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2WebAclCaptchaConfigDetails - */ -const se_AwsWafv2WebAclCaptchaConfigDetails = ( - input: AwsWafv2WebAclCaptchaConfigDetails, - context: __SerdeContext -): any => { - return { - ...(input.ImmunityTimeProperty != null && { - ImmunityTimeProperty: se_AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails( - input.ImmunityTimeProperty, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails - */ -const se_AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails = ( - input: AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails, - context: __SerdeContext -): any => { - return { - ...(input.ImmunityTime != null && { ImmunityTime: input.ImmunityTime }), - }; -}; - -/** - * serializeAws_restJson1AwsWafv2WebAclDetails - */ -const se_AwsWafv2WebAclDetails = (input: AwsWafv2WebAclDetails, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Capacity != null && { Capacity: input.Capacity }), - ...(input.CaptchaConfig != null && { - CaptchaConfig: se_AwsWafv2WebAclCaptchaConfigDetails(input.CaptchaConfig, context), - }), - ...(input.DefaultAction != null && { DefaultAction: se_AwsWafv2WebAclActionDetails(input.DefaultAction, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.ManagedbyFirewallManager != null && { ManagedbyFirewallManager: input.ManagedbyFirewallManager }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_AwsWafv2RulesList(input.Rules, context) }), - ...(input.VisibilityConfig != null && { - VisibilityConfig: se_AwsWafv2VisibilityConfigDetails(input.VisibilityConfig, context), - }), - }; -}; - -/** - * serializeAws_restJson1AwsWafWebAclDetails - */ -const se_AwsWafWebAclDetails = (input: AwsWafWebAclDetails, context: __SerdeContext): any => { - return { - ...(input.DefaultAction != null && { DefaultAction: input.DefaultAction }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_AwsWafWebAclRuleList(input.Rules, context) }), - ...(input.WebAclId != null && { WebAclId: input.WebAclId }), - }; -}; - -/** - * serializeAws_restJson1AwsWafWebAclRule - */ -const se_AwsWafWebAclRule = (input: AwsWafWebAclRule, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_WafAction(input.Action, context) }), - ...(input.ExcludedRules != null && { ExcludedRules: se_WafExcludedRuleList(input.ExcludedRules, context) }), - ...(input.OverrideAction != null && { OverrideAction: se_WafOverrideAction(input.OverrideAction, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1AwsWafWebAclRuleList - */ -const se_AwsWafWebAclRuleList = (input: AwsWafWebAclRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsWafWebAclRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1AwsXrayEncryptionConfigDetails - */ -const se_AwsXrayEncryptionConfigDetails = (input: AwsXrayEncryptionConfigDetails, context: __SerdeContext): any => { - return { - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1BatchImportFindingsRequestFindingList - */ -const se_BatchImportFindingsRequestFindingList = (input: AwsSecurityFinding[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AwsSecurityFinding(entry, context); - }); -}; - -/** - * serializeAws_restJson1BooleanFilter - */ -const se_BooleanFilter = (input: BooleanFilter, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1BooleanFilterList - */ -const se_BooleanFilterList = (input: BooleanFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BooleanFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1Cell - */ -const se_Cell = (input: Cell, context: __SerdeContext): any => { - return { - ...(input.CellReference != null && { CellReference: input.CellReference }), - ...(input.Column != null && { Column: input.Column }), - ...(input.ColumnName != null && { ColumnName: input.ColumnName }), - ...(input.Row != null && { Row: input.Row }), - }; -}; - -/** - * serializeAws_restJson1Cells - */ -const se_Cells = (input: Cell[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Cell(entry, context); - }); -}; - -/** - * serializeAws_restJson1CidrBlockAssociation - */ -const se_CidrBlockAssociation = (input: CidrBlockAssociation, context: __SerdeContext): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.CidrBlock != null && { CidrBlock: input.CidrBlock }), - ...(input.CidrBlockState != null && { CidrBlockState: input.CidrBlockState }), - }; -}; - -/** - * serializeAws_restJson1CidrBlockAssociationList - */ -const se_CidrBlockAssociationList = (input: CidrBlockAssociation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CidrBlockAssociation(entry, context); - }); -}; - -/** - * serializeAws_restJson1City - */ -const se_City = (input: City, context: __SerdeContext): any => { - return { - ...(input.CityName != null && { CityName: input.CityName }), - }; -}; - -/** - * serializeAws_restJson1ClassificationResult - */ -const se_ClassificationResult = (input: ClassificationResult, context: __SerdeContext): any => { - return { - ...(input.AdditionalOccurrences != null && { AdditionalOccurrences: input.AdditionalOccurrences }), - ...(input.CustomDataIdentifiers != null && { - CustomDataIdentifiers: se_CustomDataIdentifiersResult(input.CustomDataIdentifiers, context), - }), - ...(input.MimeType != null && { MimeType: input.MimeType }), - ...(input.SensitiveData != null && { SensitiveData: se_SensitiveDataResultList(input.SensitiveData, context) }), - ...(input.SizeClassified != null && { SizeClassified: input.SizeClassified }), - ...(input.Status != null && { Status: se_ClassificationStatus(input.Status, context) }), - }; -}; - -/** - * serializeAws_restJson1ClassificationStatus - */ -const se_ClassificationStatus = (input: ClassificationStatus, context: __SerdeContext): any => { - return { - ...(input.Code != null && { Code: input.Code }), - ...(input.Reason != null && { Reason: input.Reason }), - }; -}; - -/** - * serializeAws_restJson1Compliance - */ -const se_Compliance = (input: Compliance, context: __SerdeContext): any => { - return { - ...(input.AssociatedStandards != null && { - AssociatedStandards: se_AssociatedStandardsList(input.AssociatedStandards, context), - }), - ...(input.RelatedRequirements != null && { - RelatedRequirements: se_RelatedRequirementsList(input.RelatedRequirements, context), - }), - ...(input.SecurityControlId != null && { SecurityControlId: input.SecurityControlId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.StatusReasons != null && { StatusReasons: se_StatusReasonsList(input.StatusReasons, context) }), - }; -}; - -/** - * serializeAws_restJson1ContainerDetails - */ -const se_ContainerDetails = (input: ContainerDetails, context: __SerdeContext): any => { - return { - ...(input.ContainerRuntime != null && { ContainerRuntime: input.ContainerRuntime }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.LaunchedAt != null && { LaunchedAt: input.LaunchedAt }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Privileged != null && { Privileged: input.Privileged }), - ...(input.VolumeMounts != null && { VolumeMounts: se_VolumeMountList(input.VolumeMounts, context) }), - }; -}; - -/** - * serializeAws_restJson1Country - */ -const se_Country = (input: Country, context: __SerdeContext): any => { - return { - ...(input.CountryCode != null && { CountryCode: input.CountryCode }), - ...(input.CountryName != null && { CountryName: input.CountryName }), - }; -}; - -/** - * serializeAws_restJson1CustomDataIdentifiersDetections - */ -const se_CustomDataIdentifiersDetections = (input: CustomDataIdentifiersDetections, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Count != null && { Count: input.Count }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Occurrences != null && { Occurrences: se_Occurrences(input.Occurrences, context) }), - }; -}; - -/** - * serializeAws_restJson1CustomDataIdentifiersDetectionsList - */ -const se_CustomDataIdentifiersDetectionsList = ( - input: CustomDataIdentifiersDetections[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomDataIdentifiersDetections(entry, context); - }); -}; - -/** - * serializeAws_restJson1CustomDataIdentifiersResult - */ -const se_CustomDataIdentifiersResult = (input: CustomDataIdentifiersResult, context: __SerdeContext): any => { - return { - ...(input.Detections != null && { Detections: se_CustomDataIdentifiersDetectionsList(input.Detections, context) }), - ...(input.TotalCount != null && { TotalCount: input.TotalCount }), - }; -}; - -/** - * serializeAws_restJson1Cvss - */ -const se_Cvss = (input: Cvss, context: __SerdeContext): any => { - return { - ...(input.Adjustments != null && { Adjustments: se_AdjustmentList(input.Adjustments, context) }), - ...(input.BaseScore != null && { BaseScore: __serializeFloat(input.BaseScore) }), - ...(input.BaseVector != null && { BaseVector: input.BaseVector }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_restJson1CvssList - */ -const se_CvssList = (input: Cvss[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Cvss(entry, context); - }); -}; - -/** - * serializeAws_restJson1DataClassificationDetails - */ -const se_DataClassificationDetails = (input: DataClassificationDetails, context: __SerdeContext): any => { - return { - ...(input.DetailedResultsLocation != null && { DetailedResultsLocation: input.DetailedResultsLocation }), - ...(input.Result != null && { Result: se_ClassificationResult(input.Result, context) }), - }; -}; - -/** - * serializeAws_restJson1DateFilter - */ -const se_DateFilter = (input: DateFilter, context: __SerdeContext): any => { - return { - ...(input.DateRange != null && { DateRange: se_DateRange(input.DateRange, context) }), - ...(input.End != null && { End: input.End }), - ...(input.Start != null && { Start: input.Start }), - }; -}; - -/** - * serializeAws_restJson1DateFilterList - */ -const se_DateFilterList = (input: DateFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DateFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1DateRange - */ -const se_DateRange = (input: DateRange, context: __SerdeContext): any => { - return { - ...(input.Unit != null && { Unit: input.Unit }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1DnsRequestAction - */ -const se_DnsRequestAction = (input: DnsRequestAction, context: __SerdeContext): any => { - return { - ...(input.Blocked != null && { Blocked: input.Blocked }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - }; -}; - -/** - * serializeAws_restJson1FieldMap - */ -const se_FieldMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1FilePathList - */ -const se_FilePathList = (input: FilePaths[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FilePaths(entry, context); - }); -}; - -/** - * serializeAws_restJson1FilePaths - */ -const se_FilePaths = (input: FilePaths, context: __SerdeContext): any => { - return { - ...(input.FileName != null && { FileName: input.FileName }), - ...(input.FilePath != null && { FilePath: input.FilePath }), - ...(input.Hash != null && { Hash: input.Hash }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; - -/** - * serializeAws_restJson1FindingProviderFields - */ -const se_FindingProviderFields = (input: FindingProviderFields, context: __SerdeContext): any => { - return { - ...(input.Confidence != null && { Confidence: input.Confidence }), - ...(input.Criticality != null && { Criticality: input.Criticality }), - ...(input.RelatedFindings != null && { RelatedFindings: se_RelatedFindingList(input.RelatedFindings, context) }), - ...(input.Severity != null && { Severity: se_FindingProviderSeverity(input.Severity, context) }), - ...(input.Types != null && { Types: se_TypeList(input.Types, context) }), - }; -}; - -/** - * serializeAws_restJson1FindingProviderSeverity - */ -const se_FindingProviderSeverity = (input: FindingProviderSeverity, context: __SerdeContext): any => { - return { - ...(input.Label != null && { Label: input.Label }), - ...(input.Original != null && { Original: input.Original }), - }; -}; - -/** - * serializeAws_restJson1FirewallPolicyDetails - */ -const se_FirewallPolicyDetails = (input: FirewallPolicyDetails, context: __SerdeContext): any => { - return { - ...(input.StatefulRuleGroupReferences != null && { - StatefulRuleGroupReferences: se_FirewallPolicyStatefulRuleGroupReferencesList( - input.StatefulRuleGroupReferences, - context - ), - }), - ...(input.StatelessCustomActions != null && { - StatelessCustomActions: se_FirewallPolicyStatelessCustomActionsList(input.StatelessCustomActions, context), - }), - ...(input.StatelessDefaultActions != null && { - StatelessDefaultActions: se_NonEmptyStringList(input.StatelessDefaultActions, context), - }), - ...(input.StatelessFragmentDefaultActions != null && { - StatelessFragmentDefaultActions: se_NonEmptyStringList(input.StatelessFragmentDefaultActions, context), - }), - ...(input.StatelessRuleGroupReferences != null && { - StatelessRuleGroupReferences: se_FirewallPolicyStatelessRuleGroupReferencesList( - input.StatelessRuleGroupReferences, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1FirewallPolicyStatefulRuleGroupReferencesDetails - */ -const se_FirewallPolicyStatefulRuleGroupReferencesDetails = ( - input: FirewallPolicyStatefulRuleGroupReferencesDetails, - context: __SerdeContext -): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_restJson1FirewallPolicyStatefulRuleGroupReferencesList - */ -const se_FirewallPolicyStatefulRuleGroupReferencesList = ( - input: FirewallPolicyStatefulRuleGroupReferencesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FirewallPolicyStatefulRuleGroupReferencesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1FirewallPolicyStatelessCustomActionsDetails - */ -const se_FirewallPolicyStatelessCustomActionsDetails = ( - input: FirewallPolicyStatelessCustomActionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.ActionDefinition != null && { - ActionDefinition: se_StatelessCustomActionDefinition(input.ActionDefinition, context), - }), - ...(input.ActionName != null && { ActionName: input.ActionName }), - }; -}; - -/** - * serializeAws_restJson1FirewallPolicyStatelessCustomActionsList - */ -const se_FirewallPolicyStatelessCustomActionsList = ( - input: FirewallPolicyStatelessCustomActionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FirewallPolicyStatelessCustomActionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1FirewallPolicyStatelessRuleGroupReferencesDetails - */ -const se_FirewallPolicyStatelessRuleGroupReferencesDetails = ( - input: FirewallPolicyStatelessRuleGroupReferencesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_restJson1FirewallPolicyStatelessRuleGroupReferencesList - */ -const se_FirewallPolicyStatelessRuleGroupReferencesList = ( - input: FirewallPolicyStatelessRuleGroupReferencesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FirewallPolicyStatelessRuleGroupReferencesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1GeoLocation - */ -const se_GeoLocation = (input: GeoLocation, context: __SerdeContext): any => { - return { - ...(input.Lat != null && { Lat: __serializeFloat(input.Lat) }), - ...(input.Lon != null && { Lon: __serializeFloat(input.Lon) }), - }; -}; - -/** - * serializeAws_restJson1IcmpTypeCode - */ -const se_IcmpTypeCode = (input: IcmpTypeCode, context: __SerdeContext): any => { - return { - ...(input.Code != null && { Code: input.Code }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1IntegerList - */ -const se_IntegerList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1IpFilter - */ -const se_IpFilter = (input: IpFilter, context: __SerdeContext): any => { - return { - ...(input.Cidr != null && { Cidr: input.Cidr }), - }; -}; - -/** - * serializeAws_restJson1IpFilterList - */ -const se_IpFilterList = (input: IpFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IpFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1IpOrganizationDetails - */ -const se_IpOrganizationDetails = (input: IpOrganizationDetails, context: __SerdeContext): any => { - return { - ...(input.Asn != null && { Asn: input.Asn }), - ...(input.AsnOrg != null && { AsnOrg: input.AsnOrg }), - ...(input.Isp != null && { Isp: input.Isp }), - ...(input.Org != null && { Org: input.Org }), - }; -}; - -/** - * serializeAws_restJson1Ipv6CidrBlockAssociation - */ -const se_Ipv6CidrBlockAssociation = (input: Ipv6CidrBlockAssociation, context: __SerdeContext): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.CidrBlockState != null && { CidrBlockState: input.CidrBlockState }), - ...(input.Ipv6CidrBlock != null && { Ipv6CidrBlock: input.Ipv6CidrBlock }), - }; -}; - -/** - * serializeAws_restJson1Ipv6CidrBlockAssociationList - */ -const se_Ipv6CidrBlockAssociationList = (input: Ipv6CidrBlockAssociation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Ipv6CidrBlockAssociation(entry, context); - }); -}; - -/** - * serializeAws_restJson1KeywordFilter - */ -const se_KeywordFilter = (input: KeywordFilter, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1KeywordFilterList - */ -const se_KeywordFilterList = (input: KeywordFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_KeywordFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1LoadBalancerState - */ -const se_LoadBalancerState = (input: LoadBalancerState, context: __SerdeContext): any => { - return { - ...(input.Code != null && { Code: input.Code }), - ...(input.Reason != null && { Reason: input.Reason }), - }; -}; - -/** - * serializeAws_restJson1Malware - */ -const se_Malware = (input: Malware, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Path != null && { Path: input.Path }), - ...(input.State != null && { State: input.State }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1MalwareList - */ -const se_MalwareList = (input: Malware[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Malware(entry, context); - }); -}; - -/** - * serializeAws_restJson1MapFilter - */ -const se_MapFilter = (input: MapFilter, context: __SerdeContext): any => { - return { - ...(input.Comparison != null && { Comparison: input.Comparison }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1MapFilterList - */ -const se_MapFilterList = (input: MapFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MapFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1Network - */ -const se_Network = (input: Network, context: __SerdeContext): any => { - return { - ...(input.DestinationDomain != null && { DestinationDomain: input.DestinationDomain }), - ...(input.DestinationIpV4 != null && { DestinationIpV4: input.DestinationIpV4 }), - ...(input.DestinationIpV6 != null && { DestinationIpV6: input.DestinationIpV6 }), - ...(input.DestinationPort != null && { DestinationPort: input.DestinationPort }), - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.OpenPortRange != null && { OpenPortRange: se_PortRange(input.OpenPortRange, context) }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.SourceDomain != null && { SourceDomain: input.SourceDomain }), - ...(input.SourceIpV4 != null && { SourceIpV4: input.SourceIpV4 }), - ...(input.SourceIpV6 != null && { SourceIpV6: input.SourceIpV6 }), - ...(input.SourceMac != null && { SourceMac: input.SourceMac }), - ...(input.SourcePort != null && { SourcePort: input.SourcePort }), - }; -}; - -/** - * serializeAws_restJson1NetworkConnectionAction - */ -const se_NetworkConnectionAction = (input: NetworkConnectionAction, context: __SerdeContext): any => { - return { - ...(input.Blocked != null && { Blocked: input.Blocked }), - ...(input.ConnectionDirection != null && { ConnectionDirection: input.ConnectionDirection }), - ...(input.LocalPortDetails != null && { - LocalPortDetails: se_ActionLocalPortDetails(input.LocalPortDetails, context), - }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.RemoteIpDetails != null && { RemoteIpDetails: se_ActionRemoteIpDetails(input.RemoteIpDetails, context) }), - ...(input.RemotePortDetails != null && { - RemotePortDetails: se_ActionRemotePortDetails(input.RemotePortDetails, context), - }), - }; -}; - -/** - * serializeAws_restJson1NetworkHeader - */ -const se_NetworkHeader = (input: NetworkHeader, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: se_NetworkPathComponentDetails(input.Destination, context) }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.Source != null && { Source: se_NetworkPathComponentDetails(input.Source, context) }), - }; -}; - -/** - * serializeAws_restJson1NetworkPathComponent - */ -const se_NetworkPathComponent = (input: NetworkPathComponent, context: __SerdeContext): any => { - return { - ...(input.ComponentId != null && { ComponentId: input.ComponentId }), - ...(input.ComponentType != null && { ComponentType: input.ComponentType }), - ...(input.Egress != null && { Egress: se_NetworkHeader(input.Egress, context) }), - ...(input.Ingress != null && { Ingress: se_NetworkHeader(input.Ingress, context) }), - }; -}; - -/** - * serializeAws_restJson1NetworkPathComponentDetails - */ -const se_NetworkPathComponentDetails = (input: NetworkPathComponentDetails, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: se_StringList(input.Address, context) }), - ...(input.PortRanges != null && { PortRanges: se_PortRangeList(input.PortRanges, context) }), - }; -}; - -/** - * serializeAws_restJson1NetworkPathList - */ -const se_NetworkPathList = (input: NetworkPathComponent[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NetworkPathComponent(entry, context); - }); -}; - -/** - * serializeAws_restJson1NonEmptyStringList - */ -const se_NonEmptyStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Note - */ -const se_Note = (input: Note, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - ...(input.UpdatedAt != null && { UpdatedAt: input.UpdatedAt }), - ...(input.UpdatedBy != null && { UpdatedBy: input.UpdatedBy }), - }; -}; - -/** - * serializeAws_restJson1NoteUpdate - */ -const se_NoteUpdate = (input: NoteUpdate, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - ...(input.UpdatedBy != null && { UpdatedBy: input.UpdatedBy }), - }; -}; - -/** - * serializeAws_restJson1NumberFilter - */ -const se_NumberFilter = (input: NumberFilter, context: __SerdeContext): any => { - return { - ...(input.Eq != null && { Eq: __serializeFloat(input.Eq) }), - ...(input.Gte != null && { Gte: __serializeFloat(input.Gte) }), - ...(input.Lte != null && { Lte: __serializeFloat(input.Lte) }), - }; -}; - -/** - * serializeAws_restJson1NumberFilterList - */ -const se_NumberFilterList = (input: NumberFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NumberFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1Occurrences - */ -const se_Occurrences = (input: Occurrences, context: __SerdeContext): any => { - return { - ...(input.Cells != null && { Cells: se_Cells(input.Cells, context) }), - ...(input.LineRanges != null && { LineRanges: se_Ranges(input.LineRanges, context) }), - ...(input.OffsetRanges != null && { OffsetRanges: se_Ranges(input.OffsetRanges, context) }), - ...(input.Pages != null && { Pages: se_Pages(input.Pages, context) }), - ...(input.Records != null && { Records: se_Records(input.Records, context) }), - }; -}; - -/** - * serializeAws_restJson1Page - */ -const se_Page = (input: Page, context: __SerdeContext): any => { - return { - ...(input.LineRange != null && { LineRange: se_Range(input.LineRange, context) }), - ...(input.OffsetRange != null && { OffsetRange: se_Range(input.OffsetRange, context) }), - ...(input.PageNumber != null && { PageNumber: input.PageNumber }), - }; -}; - -/** - * serializeAws_restJson1Pages - */ -const se_Pages = (input: Page[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Page(entry, context); - }); -}; - -/** - * serializeAws_restJson1PatchSummary - */ -const se_PatchSummary = (input: PatchSummary, context: __SerdeContext): any => { - return { - ...(input.FailedCount != null && { FailedCount: input.FailedCount }), - ...(input.Id != null && { Id: input.Id }), - ...(input.InstalledCount != null && { InstalledCount: input.InstalledCount }), - ...(input.InstalledOtherCount != null && { InstalledOtherCount: input.InstalledOtherCount }), - ...(input.InstalledPendingReboot != null && { InstalledPendingReboot: input.InstalledPendingReboot }), - ...(input.InstalledRejectedCount != null && { InstalledRejectedCount: input.InstalledRejectedCount }), - ...(input.MissingCount != null && { MissingCount: input.MissingCount }), - ...(input.Operation != null && { Operation: input.Operation }), - ...(input.OperationEndTime != null && { OperationEndTime: input.OperationEndTime }), - ...(input.OperationStartTime != null && { OperationStartTime: input.OperationStartTime }), - ...(input.RebootOption != null && { RebootOption: input.RebootOption }), - }; -}; - -/** - * serializeAws_restJson1PortProbeAction - */ -const se_PortProbeAction = (input: PortProbeAction, context: __SerdeContext): any => { - return { - ...(input.Blocked != null && { Blocked: input.Blocked }), - ...(input.PortProbeDetails != null && { - PortProbeDetails: se_PortProbeDetailList(input.PortProbeDetails, context), - }), - }; -}; - -/** - * serializeAws_restJson1PortProbeDetail - */ -const se_PortProbeDetail = (input: PortProbeDetail, context: __SerdeContext): any => { - return { - ...(input.LocalIpDetails != null && { LocalIpDetails: se_ActionLocalIpDetails(input.LocalIpDetails, context) }), - ...(input.LocalPortDetails != null && { - LocalPortDetails: se_ActionLocalPortDetails(input.LocalPortDetails, context), - }), - ...(input.RemoteIpDetails != null && { RemoteIpDetails: se_ActionRemoteIpDetails(input.RemoteIpDetails, context) }), - }; -}; - -/** - * serializeAws_restJson1PortProbeDetailList - */ -const se_PortProbeDetailList = (input: PortProbeDetail[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortProbeDetail(entry, context); - }); -}; - -/** - * serializeAws_restJson1PortRange - */ -const se_PortRange = (input: PortRange, context: __SerdeContext): any => { - return { - ...(input.Begin != null && { Begin: input.Begin }), - ...(input.End != null && { End: input.End }), - }; -}; - -/** - * serializeAws_restJson1PortRangeFromTo - */ -const se_PortRangeFromTo = (input: PortRangeFromTo, context: __SerdeContext): any => { - return { - ...(input.From != null && { From: input.From }), - ...(input.To != null && { To: input.To }), - }; -}; - -/** - * serializeAws_restJson1PortRangeList - */ -const se_PortRangeList = (input: PortRange[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PortRange(entry, context); - }); -}; - -/** - * serializeAws_restJson1ProcessDetails - */ -const se_ProcessDetails = (input: ProcessDetails, context: __SerdeContext): any => { - return { - ...(input.LaunchedAt != null && { LaunchedAt: input.LaunchedAt }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentPid != null && { ParentPid: input.ParentPid }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Pid != null && { Pid: input.Pid }), - ...(input.TerminatedAt != null && { TerminatedAt: input.TerminatedAt }), - }; -}; - -/** - * serializeAws_restJson1PropagatingVgwSetDetails - */ -const se_PropagatingVgwSetDetails = (input: PropagatingVgwSetDetails, context: __SerdeContext): any => { - return { - ...(input.GatewayId != null && { GatewayId: input.GatewayId }), - }; -}; - -/** - * serializeAws_restJson1PropagatingVgwSetList - */ -const se_PropagatingVgwSetList = (input: PropagatingVgwSetDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PropagatingVgwSetDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1Range - */ -const se_Range = (input: Range, context: __SerdeContext): any => { - return { - ...(input.End != null && { End: input.End }), - ...(input.Start != null && { Start: input.Start }), - ...(input.StartColumn != null && { StartColumn: input.StartColumn }), - }; -}; - -/** - * serializeAws_restJson1Ranges - */ -const se_Ranges = (input: Range[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Range(entry, context); - }); -}; - -/** - * serializeAws_restJson1Recommendation - */ -const se_Recommendation = (input: Recommendation, context: __SerdeContext): any => { - return { - ...(input.Text != null && { Text: input.Text }), - ...(input.Url != null && { Url: input.Url }), - }; -}; - -/** - * serializeAws_restJson1_Record - */ -const se__Record = (input: _Record, context: __SerdeContext): any => { - return { - ...(input.JsonPath != null && { JsonPath: input.JsonPath }), - ...(input.RecordIndex != null && { RecordIndex: input.RecordIndex }), - }; -}; - -/** - * serializeAws_restJson1Records - */ -const se_Records = (input: _Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se__Record(entry, context); - }); -}; - -/** - * serializeAws_restJson1RelatedFinding - */ -const se_RelatedFinding = (input: RelatedFinding, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.ProductArn != null && { ProductArn: input.ProductArn }), - }; -}; - -/** - * serializeAws_restJson1RelatedFindingList - */ -const se_RelatedFindingList = (input: RelatedFinding[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RelatedFinding(entry, context); - }); -}; - -/** - * serializeAws_restJson1RelatedRequirementsList - */ -const se_RelatedRequirementsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1Remediation - */ -const se_Remediation = (input: Remediation, context: __SerdeContext): any => { - return { - ...(input.Recommendation != null && { Recommendation: se_Recommendation(input.Recommendation, context) }), - }; -}; - -/** - * serializeAws_restJson1Resource - */ -const se_Resource = (input: Resource, context: __SerdeContext): any => { - return { - ...(input.DataClassification != null && { - DataClassification: se_DataClassificationDetails(input.DataClassification, context), - }), - ...(input.Details != null && { Details: se_ResourceDetails(input.Details, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Partition != null && { Partition: input.Partition }), - ...(input.Region != null && { Region: input.Region }), - ...(input.ResourceRole != null && { ResourceRole: input.ResourceRole }), - ...(input.Tags != null && { Tags: se_FieldMap(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1ResourceDetails - */ -const se_ResourceDetails = (input: ResourceDetails, context: __SerdeContext): any => { - return { - ...(input.AwsApiGatewayRestApi != null && { - AwsApiGatewayRestApi: se_AwsApiGatewayRestApiDetails(input.AwsApiGatewayRestApi, context), - }), - ...(input.AwsApiGatewayStage != null && { - AwsApiGatewayStage: se_AwsApiGatewayStageDetails(input.AwsApiGatewayStage, context), - }), - ...(input.AwsApiGatewayV2Api != null && { - AwsApiGatewayV2Api: se_AwsApiGatewayV2ApiDetails(input.AwsApiGatewayV2Api, context), - }), - ...(input.AwsApiGatewayV2Stage != null && { - AwsApiGatewayV2Stage: se_AwsApiGatewayV2StageDetails(input.AwsApiGatewayV2Stage, context), - }), - ...(input.AwsAutoScalingAutoScalingGroup != null && { - AwsAutoScalingAutoScalingGroup: se_AwsAutoScalingAutoScalingGroupDetails( - input.AwsAutoScalingAutoScalingGroup, - context - ), - }), - ...(input.AwsAutoScalingLaunchConfiguration != null && { - AwsAutoScalingLaunchConfiguration: se_AwsAutoScalingLaunchConfigurationDetails( - input.AwsAutoScalingLaunchConfiguration, - context - ), - }), - ...(input.AwsBackupBackupPlan != null && { - AwsBackupBackupPlan: se_AwsBackupBackupPlanDetails(input.AwsBackupBackupPlan, context), - }), - ...(input.AwsBackupBackupVault != null && { - AwsBackupBackupVault: se_AwsBackupBackupVaultDetails(input.AwsBackupBackupVault, context), - }), - ...(input.AwsBackupRecoveryPoint != null && { - AwsBackupRecoveryPoint: se_AwsBackupRecoveryPointDetails(input.AwsBackupRecoveryPoint, context), - }), - ...(input.AwsCertificateManagerCertificate != null && { - AwsCertificateManagerCertificate: se_AwsCertificateManagerCertificateDetails( - input.AwsCertificateManagerCertificate, - context - ), - }), - ...(input.AwsCloudFormationStack != null && { - AwsCloudFormationStack: se_AwsCloudFormationStackDetails(input.AwsCloudFormationStack, context), - }), - ...(input.AwsCloudFrontDistribution != null && { - AwsCloudFrontDistribution: se_AwsCloudFrontDistributionDetails(input.AwsCloudFrontDistribution, context), - }), - ...(input.AwsCloudTrailTrail != null && { - AwsCloudTrailTrail: se_AwsCloudTrailTrailDetails(input.AwsCloudTrailTrail, context), - }), - ...(input.AwsCloudWatchAlarm != null && { - AwsCloudWatchAlarm: se_AwsCloudWatchAlarmDetails(input.AwsCloudWatchAlarm, context), - }), - ...(input.AwsCodeBuildProject != null && { - AwsCodeBuildProject: se_AwsCodeBuildProjectDetails(input.AwsCodeBuildProject, context), - }), - ...(input.AwsDynamoDbTable != null && { - AwsDynamoDbTable: se_AwsDynamoDbTableDetails(input.AwsDynamoDbTable, context), - }), - ...(input.AwsEc2Eip != null && { AwsEc2Eip: se_AwsEc2EipDetails(input.AwsEc2Eip, context) }), - ...(input.AwsEc2Instance != null && { AwsEc2Instance: se_AwsEc2InstanceDetails(input.AwsEc2Instance, context) }), - ...(input.AwsEc2LaunchTemplate != null && { - AwsEc2LaunchTemplate: se_AwsEc2LaunchTemplateDetails(input.AwsEc2LaunchTemplate, context), - }), - ...(input.AwsEc2NetworkAcl != null && { - AwsEc2NetworkAcl: se_AwsEc2NetworkAclDetails(input.AwsEc2NetworkAcl, context), - }), - ...(input.AwsEc2NetworkInterface != null && { - AwsEc2NetworkInterface: se_AwsEc2NetworkInterfaceDetails(input.AwsEc2NetworkInterface, context), - }), - ...(input.AwsEc2RouteTable != null && { - AwsEc2RouteTable: se_AwsEc2RouteTableDetails(input.AwsEc2RouteTable, context), - }), - ...(input.AwsEc2SecurityGroup != null && { - AwsEc2SecurityGroup: se_AwsEc2SecurityGroupDetails(input.AwsEc2SecurityGroup, context), - }), - ...(input.AwsEc2Subnet != null && { AwsEc2Subnet: se_AwsEc2SubnetDetails(input.AwsEc2Subnet, context) }), - ...(input.AwsEc2TransitGateway != null && { - AwsEc2TransitGateway: se_AwsEc2TransitGatewayDetails(input.AwsEc2TransitGateway, context), - }), - ...(input.AwsEc2Volume != null && { AwsEc2Volume: se_AwsEc2VolumeDetails(input.AwsEc2Volume, context) }), - ...(input.AwsEc2Vpc != null && { AwsEc2Vpc: se_AwsEc2VpcDetails(input.AwsEc2Vpc, context) }), - ...(input.AwsEc2VpcEndpointService != null && { - AwsEc2VpcEndpointService: se_AwsEc2VpcEndpointServiceDetails(input.AwsEc2VpcEndpointService, context), - }), - ...(input.AwsEc2VpcPeeringConnection != null && { - AwsEc2VpcPeeringConnection: se_AwsEc2VpcPeeringConnectionDetails(input.AwsEc2VpcPeeringConnection, context), - }), - ...(input.AwsEc2VpnConnection != null && { - AwsEc2VpnConnection: se_AwsEc2VpnConnectionDetails(input.AwsEc2VpnConnection, context), - }), - ...(input.AwsEcrContainerImage != null && { - AwsEcrContainerImage: se_AwsEcrContainerImageDetails(input.AwsEcrContainerImage, context), - }), - ...(input.AwsEcrRepository != null && { - AwsEcrRepository: se_AwsEcrRepositoryDetails(input.AwsEcrRepository, context), - }), - ...(input.AwsEcsCluster != null && { AwsEcsCluster: se_AwsEcsClusterDetails(input.AwsEcsCluster, context) }), - ...(input.AwsEcsContainer != null && { - AwsEcsContainer: se_AwsEcsContainerDetails(input.AwsEcsContainer, context), - }), - ...(input.AwsEcsService != null && { AwsEcsService: se_AwsEcsServiceDetails(input.AwsEcsService, context) }), - ...(input.AwsEcsTask != null && { AwsEcsTask: se_AwsEcsTaskDetails(input.AwsEcsTask, context) }), - ...(input.AwsEcsTaskDefinition != null && { - AwsEcsTaskDefinition: se_AwsEcsTaskDefinitionDetails(input.AwsEcsTaskDefinition, context), - }), - ...(input.AwsEfsAccessPoint != null && { - AwsEfsAccessPoint: se_AwsEfsAccessPointDetails(input.AwsEfsAccessPoint, context), - }), - ...(input.AwsEksCluster != null && { AwsEksCluster: se_AwsEksClusterDetails(input.AwsEksCluster, context) }), - ...(input.AwsElasticBeanstalkEnvironment != null && { - AwsElasticBeanstalkEnvironment: se_AwsElasticBeanstalkEnvironmentDetails( - input.AwsElasticBeanstalkEnvironment, - context - ), - }), - ...(input.AwsElasticsearchDomain != null && { - AwsElasticsearchDomain: se_AwsElasticsearchDomainDetails(input.AwsElasticsearchDomain, context), - }), - ...(input.AwsElbLoadBalancer != null && { - AwsElbLoadBalancer: se_AwsElbLoadBalancerDetails(input.AwsElbLoadBalancer, context), - }), - ...(input.AwsElbv2LoadBalancer != null && { - AwsElbv2LoadBalancer: se_AwsElbv2LoadBalancerDetails(input.AwsElbv2LoadBalancer, context), - }), - ...(input.AwsIamAccessKey != null && { - AwsIamAccessKey: se_AwsIamAccessKeyDetails(input.AwsIamAccessKey, context), - }), - ...(input.AwsIamGroup != null && { AwsIamGroup: se_AwsIamGroupDetails(input.AwsIamGroup, context) }), - ...(input.AwsIamPolicy != null && { AwsIamPolicy: se_AwsIamPolicyDetails(input.AwsIamPolicy, context) }), - ...(input.AwsIamRole != null && { AwsIamRole: se_AwsIamRoleDetails(input.AwsIamRole, context) }), - ...(input.AwsIamUser != null && { AwsIamUser: se_AwsIamUserDetails(input.AwsIamUser, context) }), - ...(input.AwsKinesisStream != null && { - AwsKinesisStream: se_AwsKinesisStreamDetails(input.AwsKinesisStream, context), - }), - ...(input.AwsKmsKey != null && { AwsKmsKey: se_AwsKmsKeyDetails(input.AwsKmsKey, context) }), - ...(input.AwsLambdaFunction != null && { - AwsLambdaFunction: se_AwsLambdaFunctionDetails(input.AwsLambdaFunction, context), - }), - ...(input.AwsLambdaLayerVersion != null && { - AwsLambdaLayerVersion: se_AwsLambdaLayerVersionDetails(input.AwsLambdaLayerVersion, context), - }), - ...(input.AwsNetworkFirewallFirewall != null && { - AwsNetworkFirewallFirewall: se_AwsNetworkFirewallFirewallDetails(input.AwsNetworkFirewallFirewall, context), - }), - ...(input.AwsNetworkFirewallFirewallPolicy != null && { - AwsNetworkFirewallFirewallPolicy: se_AwsNetworkFirewallFirewallPolicyDetails( - input.AwsNetworkFirewallFirewallPolicy, - context - ), - }), - ...(input.AwsNetworkFirewallRuleGroup != null && { - AwsNetworkFirewallRuleGroup: se_AwsNetworkFirewallRuleGroupDetails(input.AwsNetworkFirewallRuleGroup, context), - }), - ...(input.AwsOpenSearchServiceDomain != null && { - AwsOpenSearchServiceDomain: se_AwsOpenSearchServiceDomainDetails(input.AwsOpenSearchServiceDomain, context), - }), - ...(input.AwsRdsDbCluster != null && { - AwsRdsDbCluster: se_AwsRdsDbClusterDetails(input.AwsRdsDbCluster, context), - }), - ...(input.AwsRdsDbClusterSnapshot != null && { - AwsRdsDbClusterSnapshot: se_AwsRdsDbClusterSnapshotDetails(input.AwsRdsDbClusterSnapshot, context), - }), - ...(input.AwsRdsDbInstance != null && { - AwsRdsDbInstance: se_AwsRdsDbInstanceDetails(input.AwsRdsDbInstance, context), - }), - ...(input.AwsRdsDbSecurityGroup != null && { - AwsRdsDbSecurityGroup: se_AwsRdsDbSecurityGroupDetails(input.AwsRdsDbSecurityGroup, context), - }), - ...(input.AwsRdsDbSnapshot != null && { - AwsRdsDbSnapshot: se_AwsRdsDbSnapshotDetails(input.AwsRdsDbSnapshot, context), - }), - ...(input.AwsRdsEventSubscription != null && { - AwsRdsEventSubscription: se_AwsRdsEventSubscriptionDetails(input.AwsRdsEventSubscription, context), - }), - ...(input.AwsRedshiftCluster != null && { - AwsRedshiftCluster: se_AwsRedshiftClusterDetails(input.AwsRedshiftCluster, context), - }), - ...(input.AwsS3AccountPublicAccessBlock != null && { - AwsS3AccountPublicAccessBlock: se_AwsS3AccountPublicAccessBlockDetails( - input.AwsS3AccountPublicAccessBlock, - context - ), - }), - ...(input.AwsS3Bucket != null && { AwsS3Bucket: se_AwsS3BucketDetails(input.AwsS3Bucket, context) }), - ...(input.AwsS3Object != null && { AwsS3Object: se_AwsS3ObjectDetails(input.AwsS3Object, context) }), - ...(input.AwsSageMakerNotebookInstance != null && { - AwsSageMakerNotebookInstance: se_AwsSageMakerNotebookInstanceDetails(input.AwsSageMakerNotebookInstance, context), - }), - ...(input.AwsSecretsManagerSecret != null && { - AwsSecretsManagerSecret: se_AwsSecretsManagerSecretDetails(input.AwsSecretsManagerSecret, context), - }), - ...(input.AwsSnsTopic != null && { AwsSnsTopic: se_AwsSnsTopicDetails(input.AwsSnsTopic, context) }), - ...(input.AwsSqsQueue != null && { AwsSqsQueue: se_AwsSqsQueueDetails(input.AwsSqsQueue, context) }), - ...(input.AwsSsmPatchCompliance != null && { - AwsSsmPatchCompliance: se_AwsSsmPatchComplianceDetails(input.AwsSsmPatchCompliance, context), - }), - ...(input.AwsWafRateBasedRule != null && { - AwsWafRateBasedRule: se_AwsWafRateBasedRuleDetails(input.AwsWafRateBasedRule, context), - }), - ...(input.AwsWafRegionalRateBasedRule != null && { - AwsWafRegionalRateBasedRule: se_AwsWafRegionalRateBasedRuleDetails(input.AwsWafRegionalRateBasedRule, context), - }), - ...(input.AwsWafRegionalRule != null && { - AwsWafRegionalRule: se_AwsWafRegionalRuleDetails(input.AwsWafRegionalRule, context), - }), - ...(input.AwsWafRegionalRuleGroup != null && { - AwsWafRegionalRuleGroup: se_AwsWafRegionalRuleGroupDetails(input.AwsWafRegionalRuleGroup, context), - }), - ...(input.AwsWafRegionalWebAcl != null && { - AwsWafRegionalWebAcl: se_AwsWafRegionalWebAclDetails(input.AwsWafRegionalWebAcl, context), - }), - ...(input.AwsWafRule != null && { AwsWafRule: se_AwsWafRuleDetails(input.AwsWafRule, context) }), - ...(input.AwsWafRuleGroup != null && { - AwsWafRuleGroup: se_AwsWafRuleGroupDetails(input.AwsWafRuleGroup, context), - }), - ...(input.AwsWafWebAcl != null && { AwsWafWebAcl: se_AwsWafWebAclDetails(input.AwsWafWebAcl, context) }), - ...(input.AwsWafv2RuleGroup != null && { - AwsWafv2RuleGroup: se_AwsWafv2RuleGroupDetails(input.AwsWafv2RuleGroup, context), - }), - ...(input.AwsWafv2WebAcl != null && { AwsWafv2WebAcl: se_AwsWafv2WebAclDetails(input.AwsWafv2WebAcl, context) }), - ...(input.AwsXrayEncryptionConfig != null && { - AwsXrayEncryptionConfig: se_AwsXrayEncryptionConfigDetails(input.AwsXrayEncryptionConfig, context), - }), - ...(input.Container != null && { Container: se_ContainerDetails(input.Container, context) }), - ...(input.Other != null && { Other: se_FieldMap(input.Other, context) }), - }; -}; - -/** - * serializeAws_restJson1ResourceList - */ -const se_ResourceList = (input: Resource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Resource(entry, context); - }); -}; - -/** - * serializeAws_restJson1RouteSetDetails - */ -const se_RouteSetDetails = (input: RouteSetDetails, context: __SerdeContext): any => { - return { - ...(input.CarrierGatewayId != null && { CarrierGatewayId: input.CarrierGatewayId }), - ...(input.CoreNetworkArn != null && { CoreNetworkArn: input.CoreNetworkArn }), - ...(input.DestinationCidrBlock != null && { DestinationCidrBlock: input.DestinationCidrBlock }), - ...(input.DestinationIpv6CidrBlock != null && { DestinationIpv6CidrBlock: input.DestinationIpv6CidrBlock }), - ...(input.DestinationPrefixListId != null && { DestinationPrefixListId: input.DestinationPrefixListId }), - ...(input.EgressOnlyInternetGatewayId != null && { - EgressOnlyInternetGatewayId: input.EgressOnlyInternetGatewayId, - }), - ...(input.GatewayId != null && { GatewayId: input.GatewayId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.InstanceOwnerId != null && { InstanceOwnerId: input.InstanceOwnerId }), - ...(input.LocalGatewayId != null && { LocalGatewayId: input.LocalGatewayId }), - ...(input.NatGatewayId != null && { NatGatewayId: input.NatGatewayId }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.Origin != null && { Origin: input.Origin }), - ...(input.State != null && { State: input.State }), - ...(input.TransitGatewayId != null && { TransitGatewayId: input.TransitGatewayId }), - ...(input.VpcPeeringConnectionId != null && { VpcPeeringConnectionId: input.VpcPeeringConnectionId }), - }; -}; - -/** - * serializeAws_restJson1RouteSetList - */ -const se_RouteSetList = (input: RouteSetDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RouteSetDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupDetails - */ -const se_RuleGroupDetails = (input: RuleGroupDetails, context: __SerdeContext): any => { - return { - ...(input.RuleVariables != null && { RuleVariables: se_RuleGroupVariables(input.RuleVariables, context) }), - ...(input.RulesSource != null && { RulesSource: se_RuleGroupSource(input.RulesSource, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSource - */ -const se_RuleGroupSource = (input: RuleGroupSource, context: __SerdeContext): any => { - return { - ...(input.RulesSourceList != null && { - RulesSourceList: se_RuleGroupSourceListDetails(input.RulesSourceList, context), - }), - ...(input.RulesString != null && { RulesString: input.RulesString }), - ...(input.StatefulRules != null && { - StatefulRules: se_RuleGroupSourceStatefulRulesList(input.StatefulRules, context), - }), - ...(input.StatelessRulesAndCustomActions != null && { - StatelessRulesAndCustomActions: se_RuleGroupSourceStatelessRulesAndCustomActionsDetails( - input.StatelessRulesAndCustomActions, - context - ), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceCustomActionsDetails - */ -const se_RuleGroupSourceCustomActionsDetails = ( - input: RuleGroupSourceCustomActionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.ActionDefinition != null && { - ActionDefinition: se_StatelessCustomActionDefinition(input.ActionDefinition, context), - }), - ...(input.ActionName != null && { ActionName: input.ActionName }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceCustomActionsList - */ -const se_RuleGroupSourceCustomActionsList = ( - input: RuleGroupSourceCustomActionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceCustomActionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceListDetails - */ -const se_RuleGroupSourceListDetails = (input: RuleGroupSourceListDetails, context: __SerdeContext): any => { - return { - ...(input.GeneratedRulesType != null && { GeneratedRulesType: input.GeneratedRulesType }), - ...(input.TargetTypes != null && { TargetTypes: se_NonEmptyStringList(input.TargetTypes, context) }), - ...(input.Targets != null && { Targets: se_NonEmptyStringList(input.Targets, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatefulRulesDetails - */ -const se_RuleGroupSourceStatefulRulesDetails = ( - input: RuleGroupSourceStatefulRulesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Header != null && { Header: se_RuleGroupSourceStatefulRulesHeaderDetails(input.Header, context) }), - ...(input.RuleOptions != null && { - RuleOptions: se_RuleGroupSourceStatefulRulesOptionsList(input.RuleOptions, context), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatefulRulesHeaderDetails - */ -const se_RuleGroupSourceStatefulRulesHeaderDetails = ( - input: RuleGroupSourceStatefulRulesHeaderDetails, - context: __SerdeContext -): any => { - return { - ...(input.Destination != null && { Destination: input.Destination }), - ...(input.DestinationPort != null && { DestinationPort: input.DestinationPort }), - ...(input.Direction != null && { Direction: input.Direction }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.Source != null && { Source: input.Source }), - ...(input.SourcePort != null && { SourcePort: input.SourcePort }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatefulRulesList - */ -const se_RuleGroupSourceStatefulRulesList = ( - input: RuleGroupSourceStatefulRulesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatefulRulesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatefulRulesOptionsDetails - */ -const se_RuleGroupSourceStatefulRulesOptionsDetails = ( - input: RuleGroupSourceStatefulRulesOptionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Keyword != null && { Keyword: input.Keyword }), - ...(input.Settings != null && { - Settings: se_RuleGroupSourceStatefulRulesRuleOptionsSettingsList(input.Settings, context), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatefulRulesOptionsList - */ -const se_RuleGroupSourceStatefulRulesOptionsList = ( - input: RuleGroupSourceStatefulRulesOptionsDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatefulRulesOptionsDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatefulRulesRuleOptionsSettingsList - */ -const se_RuleGroupSourceStatefulRulesRuleOptionsSettingsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleDefinition - */ -const se_RuleGroupSourceStatelessRuleDefinition = ( - input: RuleGroupSourceStatelessRuleDefinition, - context: __SerdeContext -): any => { - return { - ...(input.Actions != null && { Actions: se_NonEmptyStringList(input.Actions, context) }), - ...(input.MatchAttributes != null && { - MatchAttributes: se_RuleGroupSourceStatelessRuleMatchAttributes(input.MatchAttributes, context), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributes - */ -const se_RuleGroupSourceStatelessRuleMatchAttributes = ( - input: RuleGroupSourceStatelessRuleMatchAttributes, - context: __SerdeContext -): any => { - return { - ...(input.DestinationPorts != null && { - DestinationPorts: se_RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList( - input.DestinationPorts, - context - ), - }), - ...(input.Destinations != null && { - Destinations: se_RuleGroupSourceStatelessRuleMatchAttributesDestinationsList(input.Destinations, context), - }), - ...(input.Protocols != null && { - Protocols: se_RuleGroupSourceStatelessRuleMatchAttributesProtocolsList(input.Protocols, context), - }), - ...(input.SourcePorts != null && { - SourcePorts: se_RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList(input.SourcePorts, context), - }), - ...(input.Sources != null && { - Sources: se_RuleGroupSourceStatelessRuleMatchAttributesSourcesList(input.Sources, context), - }), - ...(input.TcpFlags != null && { - TcpFlags: se_RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList(input.TcpFlags, context), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts = ( - input: RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts, - context: __SerdeContext -): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList = ( - input: RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinations - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesDestinations = ( - input: RuleGroupSourceStatelessRuleMatchAttributesDestinations, - context: __SerdeContext -): any => { - return { - ...(input.AddressDefinition != null && { AddressDefinition: input.AddressDefinition }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinationsList - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesDestinationsList = ( - input: RuleGroupSourceStatelessRuleMatchAttributesDestinations[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatelessRuleMatchAttributesDestinations(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesProtocolsList - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesProtocolsList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSourcePorts - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesSourcePorts = ( - input: RuleGroupSourceStatelessRuleMatchAttributesSourcePorts, - context: __SerdeContext -): any => { - return { - ...(input.FromPort != null && { FromPort: input.FromPort }), - ...(input.ToPort != null && { ToPort: input.ToPort }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList = ( - input: RuleGroupSourceStatelessRuleMatchAttributesSourcePorts[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatelessRuleMatchAttributesSourcePorts(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSources - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesSources = ( - input: RuleGroupSourceStatelessRuleMatchAttributesSources, - context: __SerdeContext -): any => { - return { - ...(input.AddressDefinition != null && { AddressDefinition: input.AddressDefinition }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSourcesList - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesSourcesList = ( - input: RuleGroupSourceStatelessRuleMatchAttributesSources[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatelessRuleMatchAttributesSources(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesTcpFlags - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesTcpFlags = ( - input: RuleGroupSourceStatelessRuleMatchAttributesTcpFlags, - context: __SerdeContext -): any => { - return { - ...(input.Flags != null && { Flags: se_NonEmptyStringList(input.Flags, context) }), - ...(input.Masks != null && { Masks: se_NonEmptyStringList(input.Masks, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList - */ -const se_RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList = ( - input: RuleGroupSourceStatelessRuleMatchAttributesTcpFlags[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatelessRuleMatchAttributesTcpFlags(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRulesAndCustomActionsDetails - */ -const se_RuleGroupSourceStatelessRulesAndCustomActionsDetails = ( - input: RuleGroupSourceStatelessRulesAndCustomActionsDetails, - context: __SerdeContext -): any => { - return { - ...(input.CustomActions != null && { - CustomActions: se_RuleGroupSourceCustomActionsList(input.CustomActions, context), - }), - ...(input.StatelessRules != null && { - StatelessRules: se_RuleGroupSourceStatelessRulesList(input.StatelessRules, context), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRulesDetails - */ -const se_RuleGroupSourceStatelessRulesDetails = ( - input: RuleGroupSourceStatelessRulesDetails, - context: __SerdeContext -): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleDefinition != null && { - RuleDefinition: se_RuleGroupSourceStatelessRuleDefinition(input.RuleDefinition, context), - }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupSourceStatelessRulesList - */ -const se_RuleGroupSourceStatelessRulesList = ( - input: RuleGroupSourceStatelessRulesDetails[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupSourceStatelessRulesDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1RuleGroupVariables - */ -const se_RuleGroupVariables = (input: RuleGroupVariables, context: __SerdeContext): any => { - return { - ...(input.IpSets != null && { IpSets: se_RuleGroupVariablesIpSetsDetails(input.IpSets, context) }), - ...(input.PortSets != null && { PortSets: se_RuleGroupVariablesPortSetsDetails(input.PortSets, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupVariablesIpSetsDetails - */ -const se_RuleGroupVariablesIpSetsDetails = (input: RuleGroupVariablesIpSetsDetails, context: __SerdeContext): any => { - return { - ...(input.Definition != null && { Definition: se_NonEmptyStringList(input.Definition, context) }), - }; -}; - -/** - * serializeAws_restJson1RuleGroupVariablesPortSetsDetails - */ -const se_RuleGroupVariablesPortSetsDetails = ( - input: RuleGroupVariablesPortSetsDetails, - context: __SerdeContext -): any => { - return { - ...(input.Definition != null && { Definition: se_NonEmptyStringList(input.Definition, context) }), - }; -}; - -/** - * serializeAws_restJson1SecurityGroups - */ -const se_SecurityGroups = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1SensitiveDataDetections - */ -const se_SensitiveDataDetections = (input: SensitiveDataDetections, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: input.Count }), - ...(input.Occurrences != null && { Occurrences: se_Occurrences(input.Occurrences, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1SensitiveDataDetectionsList - */ -const se_SensitiveDataDetectionsList = (input: SensitiveDataDetections[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SensitiveDataDetections(entry, context); - }); -}; - -/** - * serializeAws_restJson1SensitiveDataResult - */ -const se_SensitiveDataResult = (input: SensitiveDataResult, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: input.Category }), - ...(input.Detections != null && { Detections: se_SensitiveDataDetectionsList(input.Detections, context) }), - ...(input.TotalCount != null && { TotalCount: input.TotalCount }), - }; -}; - -/** - * serializeAws_restJson1SensitiveDataResultList - */ -const se_SensitiveDataResultList = (input: SensitiveDataResult[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SensitiveDataResult(entry, context); - }); -}; - -/** - * serializeAws_restJson1Severity - */ -const se_Severity = (input: Severity, context: __SerdeContext): any => { - return { - ...(input.Label != null && { Label: input.Label }), - ...(input.Normalized != null && { Normalized: input.Normalized }), - ...(input.Original != null && { Original: input.Original }), - ...(input.Product != null && { Product: __serializeFloat(input.Product) }), - }; -}; - -/** - * serializeAws_restJson1SeverityUpdate - */ -const se_SeverityUpdate = (input: SeverityUpdate, context: __SerdeContext): any => { - return { - ...(input.Label != null && { Label: input.Label }), - ...(input.Normalized != null && { Normalized: input.Normalized }), - ...(input.Product != null && { Product: __serializeFloat(input.Product) }), - }; -}; - -/** - * serializeAws_restJson1SoftwarePackage - */ -const se_SoftwarePackage = (input: SoftwarePackage, context: __SerdeContext): any => { - return { - ...(input.Architecture != null && { Architecture: input.Architecture }), - ...(input.Epoch != null && { Epoch: input.Epoch }), - ...(input.FilePath != null && { FilePath: input.FilePath }), - ...(input.FixedInVersion != null && { FixedInVersion: input.FixedInVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PackageManager != null && { PackageManager: input.PackageManager }), - ...(input.Release != null && { Release: input.Release }), - ...(input.Remediation != null && { Remediation: input.Remediation }), - ...(input.SourceLayerArn != null && { SourceLayerArn: input.SourceLayerArn }), - ...(input.SourceLayerHash != null && { SourceLayerHash: input.SourceLayerHash }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_restJson1SoftwarePackageList - */ -const se_SoftwarePackageList = (input: SoftwarePackage[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SoftwarePackage(entry, context); - }); -}; - -/** - * serializeAws_restJson1SortCriteria - */ -const se_SortCriteria = (input: SortCriterion[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SortCriterion(entry, context); - }); -}; - -/** - * serializeAws_restJson1SortCriterion - */ -const se_SortCriterion = (input: SortCriterion, context: __SerdeContext): any => { - return { - ...(input.Field != null && { Field: input.Field }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_restJson1StandardsControlAssociationId - */ -const se_StandardsControlAssociationId = (input: StandardsControlAssociationId, context: __SerdeContext): any => { - return { - ...(input.SecurityControlId != null && { SecurityControlId: input.SecurityControlId }), - ...(input.StandardsArn != null && { StandardsArn: input.StandardsArn }), - }; -}; - -/** - * serializeAws_restJson1StandardsControlAssociationIds - */ -const se_StandardsControlAssociationIds = (input: StandardsControlAssociationId[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StandardsControlAssociationId(entry, context); - }); -}; - -/** - * serializeAws_restJson1StandardsControlAssociationUpdate - */ -const se_StandardsControlAssociationUpdate = ( - input: StandardsControlAssociationUpdate, - context: __SerdeContext -): any => { - return { - ...(input.AssociationStatus != null && { AssociationStatus: input.AssociationStatus }), - ...(input.SecurityControlId != null && { SecurityControlId: input.SecurityControlId }), - ...(input.StandardsArn != null && { StandardsArn: input.StandardsArn }), - ...(input.UpdatedReason != null && { UpdatedReason: input.UpdatedReason }), - }; -}; - -/** - * serializeAws_restJson1StandardsControlAssociationUpdates - */ -const se_StandardsControlAssociationUpdates = ( - input: StandardsControlAssociationUpdate[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StandardsControlAssociationUpdate(entry, context); - }); -}; - -/** - * serializeAws_restJson1StandardsInputParameterMap - */ -const se_StandardsInputParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1StandardsSubscriptionArns - */ -const se_StandardsSubscriptionArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1StandardsSubscriptionRequest - */ -const se_StandardsSubscriptionRequest = (input: StandardsSubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.StandardsArn != null && { StandardsArn: input.StandardsArn }), - ...(input.StandardsInput != null && { - StandardsInput: se_StandardsInputParameterMap(input.StandardsInput, context), - }), - }; -}; - -/** - * serializeAws_restJson1StandardsSubscriptionRequests - */ -const se_StandardsSubscriptionRequests = (input: StandardsSubscriptionRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StandardsSubscriptionRequest(entry, context); - }); -}; - -/** - * serializeAws_restJson1StatelessCustomActionDefinition - */ -const se_StatelessCustomActionDefinition = (input: StatelessCustomActionDefinition, context: __SerdeContext): any => { - return { - ...(input.PublishMetricAction != null && { - PublishMetricAction: se_StatelessCustomPublishMetricAction(input.PublishMetricAction, context), - }), - }; -}; - -/** - * serializeAws_restJson1StatelessCustomPublishMetricAction - */ -const se_StatelessCustomPublishMetricAction = ( - input: StatelessCustomPublishMetricAction, - context: __SerdeContext -): any => { - return { - ...(input.Dimensions != null && { - Dimensions: se_StatelessCustomPublishMetricActionDimensionsList(input.Dimensions, context), - }), - }; -}; - -/** - * serializeAws_restJson1StatelessCustomPublishMetricActionDimension - */ -const se_StatelessCustomPublishMetricActionDimension = ( - input: StatelessCustomPublishMetricActionDimension, - context: __SerdeContext -): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1StatelessCustomPublishMetricActionDimensionsList - */ -const se_StatelessCustomPublishMetricActionDimensionsList = ( - input: StatelessCustomPublishMetricActionDimension[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatelessCustomPublishMetricActionDimension(entry, context); - }); -}; - -/** - * serializeAws_restJson1StatusReason - */ -const se_StatusReason = (input: StatusReason, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.ReasonCode != null && { ReasonCode: input.ReasonCode }), - }; -}; - -/** - * serializeAws_restJson1StatusReasonsList - */ -const se_StatusReasonsList = (input: StatusReason[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StatusReason(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringFilter - */ -const se_StringFilter = (input: StringFilter, context: __SerdeContext): any => { - return { - ...(input.Comparison != null && { Comparison: input.Comparison }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1StringFilterList - */ -const se_StringFilterList = (input: StringFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StringFilter(entry, context); - }); -}; - -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1Threat - */ -const se_Threat = (input: Threat, context: __SerdeContext): any => { - return { - ...(input.FilePaths != null && { FilePaths: se_FilePathList(input.FilePaths, context) }), - ...(input.ItemCount != null && { ItemCount: input.ItemCount }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Severity != null && { Severity: input.Severity }), - }; -}; - -/** - * serializeAws_restJson1ThreatIntelIndicator - */ -const se_ThreatIntelIndicator = (input: ThreatIntelIndicator, context: __SerdeContext): any => { - return { - ...(input.Category != null && { Category: input.Category }), - ...(input.LastObservedAt != null && { LastObservedAt: input.LastObservedAt }), - ...(input.Source != null && { Source: input.Source }), - ...(input.SourceUrl != null && { SourceUrl: input.SourceUrl }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_restJson1ThreatIntelIndicatorList - */ -const se_ThreatIntelIndicatorList = (input: ThreatIntelIndicator[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ThreatIntelIndicator(entry, context); - }); -}; - -/** - * serializeAws_restJson1ThreatList - */ -const se_ThreatList = (input: Threat[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Threat(entry, context); - }); -}; - -/** - * serializeAws_restJson1TypeList - */ -const se_TypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1VolumeMount - */ -const se_VolumeMount = (input: VolumeMount, context: __SerdeContext): any => { - return { - ...(input.MountPath != null && { MountPath: input.MountPath }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_restJson1VolumeMountList - */ -const se_VolumeMountList = (input: VolumeMount[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VolumeMount(entry, context); - }); -}; - -/** - * serializeAws_restJson1VpcInfoCidrBlockSetDetails - */ -const se_VpcInfoCidrBlockSetDetails = (input: VpcInfoCidrBlockSetDetails, context: __SerdeContext): any => { - return { - ...(input.CidrBlock != null && { CidrBlock: input.CidrBlock }), - }; -}; - -/** - * serializeAws_restJson1VpcInfoCidrBlockSetList - */ -const se_VpcInfoCidrBlockSetList = (input: VpcInfoCidrBlockSetDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VpcInfoCidrBlockSetDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1VpcInfoIpv6CidrBlockSetDetails - */ -const se_VpcInfoIpv6CidrBlockSetDetails = (input: VpcInfoIpv6CidrBlockSetDetails, context: __SerdeContext): any => { - return { - ...(input.Ipv6CidrBlock != null && { Ipv6CidrBlock: input.Ipv6CidrBlock }), - }; -}; - -/** - * serializeAws_restJson1VpcInfoIpv6CidrBlockSetList - */ -const se_VpcInfoIpv6CidrBlockSetList = (input: VpcInfoIpv6CidrBlockSetDetails[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VpcInfoIpv6CidrBlockSetDetails(entry, context); - }); -}; - -/** - * serializeAws_restJson1VpcInfoPeeringOptionsDetails - */ -const se_VpcInfoPeeringOptionsDetails = (input: VpcInfoPeeringOptionsDetails, context: __SerdeContext): any => { - return { - ...(input.AllowDnsResolutionFromRemoteVpc != null && { - AllowDnsResolutionFromRemoteVpc: input.AllowDnsResolutionFromRemoteVpc, - }), - ...(input.AllowEgressFromLocalClassicLinkToRemoteVpc != null && { - AllowEgressFromLocalClassicLinkToRemoteVpc: input.AllowEgressFromLocalClassicLinkToRemoteVpc, - }), - ...(input.AllowEgressFromLocalVpcToRemoteClassicLink != null && { - AllowEgressFromLocalVpcToRemoteClassicLink: input.AllowEgressFromLocalVpcToRemoteClassicLink, - }), - }; -}; - -/** - * serializeAws_restJson1Vulnerability - */ -const se_Vulnerability = (input: Vulnerability, context: __SerdeContext): any => { - return { - ...(input.Cvss != null && { Cvss: se_CvssList(input.Cvss, context) }), - ...(input.FixAvailable != null && { FixAvailable: input.FixAvailable }), - ...(input.Id != null && { Id: input.Id }), - ...(input.ReferenceUrls != null && { ReferenceUrls: se_StringList(input.ReferenceUrls, context) }), - ...(input.RelatedVulnerabilities != null && { - RelatedVulnerabilities: se_StringList(input.RelatedVulnerabilities, context), - }), - ...(input.Vendor != null && { Vendor: se_VulnerabilityVendor(input.Vendor, context) }), - ...(input.VulnerablePackages != null && { - VulnerablePackages: se_SoftwarePackageList(input.VulnerablePackages, context), - }), - }; -}; - -/** - * serializeAws_restJson1VulnerabilityList - */ -const se_VulnerabilityList = (input: Vulnerability[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Vulnerability(entry, context); - }); -}; - -/** - * serializeAws_restJson1VulnerabilityVendor - */ -const se_VulnerabilityVendor = (input: VulnerabilityVendor, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Url != null && { Url: input.Url }), - ...(input.VendorCreatedAt != null && { VendorCreatedAt: input.VendorCreatedAt }), - ...(input.VendorSeverity != null && { VendorSeverity: input.VendorSeverity }), - ...(input.VendorUpdatedAt != null && { VendorUpdatedAt: input.VendorUpdatedAt }), - }; -}; - -/** - * serializeAws_restJson1WafAction - */ -const se_WafAction = (input: WafAction, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1WafExcludedRule - */ -const se_WafExcludedRule = (input: WafExcludedRule, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; - -/** - * serializeAws_restJson1WafExcludedRuleList - */ -const se_WafExcludedRuleList = (input: WafExcludedRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WafExcludedRule(entry, context); - }); -}; - -/** - * serializeAws_restJson1WafOverrideAction - */ -const se_WafOverrideAction = (input: WafOverrideAction, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_restJson1Workflow - */ -const se_Workflow = (input: Workflow, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * serializeAws_restJson1WorkflowUpdate - */ -const se_WorkflowUpdate = (input: WorkflowUpdate, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; - -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - return { - ActionType: __expectString(output.ActionType), - AwsApiCallAction: - output.AwsApiCallAction != null ? de_AwsApiCallAction(output.AwsApiCallAction, context) : undefined, - DnsRequestAction: - output.DnsRequestAction != null ? de_DnsRequestAction(output.DnsRequestAction, context) : undefined, - NetworkConnectionAction: - output.NetworkConnectionAction != null - ? de_NetworkConnectionAction(output.NetworkConnectionAction, context) - : undefined, - PortProbeAction: output.PortProbeAction != null ? de_PortProbeAction(output.PortProbeAction, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ActionLocalIpDetails - */ -const de_ActionLocalIpDetails = (output: any, context: __SerdeContext): ActionLocalIpDetails => { - return { - IpAddressV4: __expectString(output.IpAddressV4), - } as any; -}; - -/** - * deserializeAws_restJson1ActionLocalPortDetails - */ -const de_ActionLocalPortDetails = (output: any, context: __SerdeContext): ActionLocalPortDetails => { - return { - Port: __expectInt32(output.Port), - PortName: __expectString(output.PortName), - } as any; -}; - -/** - * deserializeAws_restJson1ActionRemoteIpDetails - */ -const de_ActionRemoteIpDetails = (output: any, context: __SerdeContext): ActionRemoteIpDetails => { - return { - City: output.City != null ? de_City(output.City, context) : undefined, - Country: output.Country != null ? de_Country(output.Country, context) : undefined, - GeoLocation: output.GeoLocation != null ? de_GeoLocation(output.GeoLocation, context) : undefined, - IpAddressV4: __expectString(output.IpAddressV4), - Organization: output.Organization != null ? de_IpOrganizationDetails(output.Organization, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ActionRemotePortDetails - */ -const de_ActionRemotePortDetails = (output: any, context: __SerdeContext): ActionRemotePortDetails => { - return { - Port: __expectInt32(output.Port), - PortName: __expectString(output.PortName), - } as any; -}; - -/** - * deserializeAws_restJson1ActionTarget - */ -const de_ActionTarget = (output: any, context: __SerdeContext): ActionTarget => { - return { - ActionTargetArn: __expectString(output.ActionTargetArn), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1ActionTargetList - */ -const de_ActionTargetList = (output: any, context: __SerdeContext): ActionTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActionTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Adjustment - */ -const de_Adjustment = (output: any, context: __SerdeContext): Adjustment => { - return { - Metric: __expectString(output.Metric), - Reason: __expectString(output.Reason), - } as any; -}; - -/** - * deserializeAws_restJson1AdjustmentList - */ -const de_AdjustmentList = (output: any, context: __SerdeContext): Adjustment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Adjustment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AdminAccount - */ -const de_AdminAccount = (output: any, context: __SerdeContext): AdminAccount => { - return { - AccountId: __expectString(output.AccountId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AdminAccounts - */ -const de_AdminAccounts = (output: any, context: __SerdeContext): AdminAccount[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdminAccount(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssociatedStandard - */ -const de_AssociatedStandard = (output: any, context: __SerdeContext): AssociatedStandard => { - return { - StandardsId: __expectString(output.StandardsId), - } as any; -}; - -/** - * deserializeAws_restJson1AssociatedStandardsList - */ -const de_AssociatedStandardsList = (output: any, context: __SerdeContext): AssociatedStandard[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociatedStandard(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssociationSetDetails - */ -const de_AssociationSetDetails = (output: any, context: __SerdeContext): AssociationSetDetails => { - return { - AssociationState: - output.AssociationState != null ? de_AssociationStateDetails(output.AssociationState, context) : undefined, - GatewayId: __expectString(output.GatewayId), - Main: __expectBoolean(output.Main), - RouteTableAssociationId: __expectString(output.RouteTableAssociationId), - RouteTableId: __expectString(output.RouteTableId), - SubnetId: __expectString(output.SubnetId), - } as any; -}; - -/** - * deserializeAws_restJson1AssociationSetList - */ -const de_AssociationSetList = (output: any, context: __SerdeContext): AssociationSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociationSetDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AssociationStateDetails - */ -const de_AssociationStateDetails = (output: any, context: __SerdeContext): AssociationStateDetails => { - return { - State: __expectString(output.State), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1AvailabilityZone - */ -const de_AvailabilityZone = (output: any, context: __SerdeContext): AvailabilityZone => { - return { - SubnetId: __expectString(output.SubnetId), - ZoneName: __expectString(output.ZoneName), - } as any; -}; - -/** - * deserializeAws_restJson1AvailabilityZones - */ -const de_AvailabilityZones = (output: any, context: __SerdeContext): AvailabilityZone[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AvailabilityZone(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsApiCallAction - */ -const de_AwsApiCallAction = (output: any, context: __SerdeContext): AwsApiCallAction => { - return { - AffectedResources: output.AffectedResources != null ? de_FieldMap(output.AffectedResources, context) : undefined, - Api: __expectString(output.Api), - CallerType: __expectString(output.CallerType), - DomainDetails: - output.DomainDetails != null ? de_AwsApiCallActionDomainDetails(output.DomainDetails, context) : undefined, - FirstSeen: __expectString(output.FirstSeen), - LastSeen: __expectString(output.LastSeen), - RemoteIpDetails: - output.RemoteIpDetails != null ? de_ActionRemoteIpDetails(output.RemoteIpDetails, context) : undefined, - ServiceName: __expectString(output.ServiceName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiCallActionDomainDetails - */ -const de_AwsApiCallActionDomainDetails = (output: any, context: __SerdeContext): AwsApiCallActionDomainDetails => { - return { - Domain: __expectString(output.Domain), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayAccessLogSettings - */ -const de_AwsApiGatewayAccessLogSettings = (output: any, context: __SerdeContext): AwsApiGatewayAccessLogSettings => { - return { - DestinationArn: __expectString(output.DestinationArn), - Format: __expectString(output.Format), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayCanarySettings - */ -const de_AwsApiGatewayCanarySettings = (output: any, context: __SerdeContext): AwsApiGatewayCanarySettings => { - return { - DeploymentId: __expectString(output.DeploymentId), - PercentTraffic: __limitedParseDouble(output.PercentTraffic), - StageVariableOverrides: - output.StageVariableOverrides != null ? de_FieldMap(output.StageVariableOverrides, context) : undefined, - UseStageCache: __expectBoolean(output.UseStageCache), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayEndpointConfiguration - */ -const de_AwsApiGatewayEndpointConfiguration = ( - output: any, - context: __SerdeContext -): AwsApiGatewayEndpointConfiguration => { - return { - Types: output.Types != null ? de_NonEmptyStringList(output.Types, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayMethodSettings - */ -const de_AwsApiGatewayMethodSettings = (output: any, context: __SerdeContext): AwsApiGatewayMethodSettings => { - return { - CacheDataEncrypted: __expectBoolean(output.CacheDataEncrypted), - CacheTtlInSeconds: __expectInt32(output.CacheTtlInSeconds), - CachingEnabled: __expectBoolean(output.CachingEnabled), - DataTraceEnabled: __expectBoolean(output.DataTraceEnabled), - HttpMethod: __expectString(output.HttpMethod), - LoggingLevel: __expectString(output.LoggingLevel), - MetricsEnabled: __expectBoolean(output.MetricsEnabled), - RequireAuthorizationForCacheControl: __expectBoolean(output.RequireAuthorizationForCacheControl), - ResourcePath: __expectString(output.ResourcePath), - ThrottlingBurstLimit: __expectInt32(output.ThrottlingBurstLimit), - ThrottlingRateLimit: __limitedParseDouble(output.ThrottlingRateLimit), - UnauthorizedCacheControlHeaderStrategy: __expectString(output.UnauthorizedCacheControlHeaderStrategy), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayMethodSettingsList - */ -const de_AwsApiGatewayMethodSettingsList = (output: any, context: __SerdeContext): AwsApiGatewayMethodSettings[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsApiGatewayMethodSettings(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayRestApiDetails - */ -const de_AwsApiGatewayRestApiDetails = (output: any, context: __SerdeContext): AwsApiGatewayRestApiDetails => { - return { - ApiKeySource: __expectString(output.ApiKeySource), - BinaryMediaTypes: - output.BinaryMediaTypes != null ? de_NonEmptyStringList(output.BinaryMediaTypes, context) : undefined, - CreatedDate: __expectString(output.CreatedDate), - Description: __expectString(output.Description), - EndpointConfiguration: - output.EndpointConfiguration != null - ? de_AwsApiGatewayEndpointConfiguration(output.EndpointConfiguration, context) - : undefined, - Id: __expectString(output.Id), - MinimumCompressionSize: __expectInt32(output.MinimumCompressionSize), - Name: __expectString(output.Name), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayStageDetails - */ -const de_AwsApiGatewayStageDetails = (output: any, context: __SerdeContext): AwsApiGatewayStageDetails => { - return { - AccessLogSettings: - output.AccessLogSettings != null - ? de_AwsApiGatewayAccessLogSettings(output.AccessLogSettings, context) - : undefined, - CacheClusterEnabled: __expectBoolean(output.CacheClusterEnabled), - CacheClusterSize: __expectString(output.CacheClusterSize), - CacheClusterStatus: __expectString(output.CacheClusterStatus), - CanarySettings: - output.CanarySettings != null ? de_AwsApiGatewayCanarySettings(output.CanarySettings, context) : undefined, - ClientCertificateId: __expectString(output.ClientCertificateId), - CreatedDate: __expectString(output.CreatedDate), - DeploymentId: __expectString(output.DeploymentId), - Description: __expectString(output.Description), - DocumentationVersion: __expectString(output.DocumentationVersion), - LastUpdatedDate: __expectString(output.LastUpdatedDate), - MethodSettings: - output.MethodSettings != null ? de_AwsApiGatewayMethodSettingsList(output.MethodSettings, context) : undefined, - StageName: __expectString(output.StageName), - TracingEnabled: __expectBoolean(output.TracingEnabled), - Variables: output.Variables != null ? de_FieldMap(output.Variables, context) : undefined, - WebAclArn: __expectString(output.WebAclArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayV2ApiDetails - */ -const de_AwsApiGatewayV2ApiDetails = (output: any, context: __SerdeContext): AwsApiGatewayV2ApiDetails => { - return { - ApiEndpoint: __expectString(output.ApiEndpoint), - ApiId: __expectString(output.ApiId), - ApiKeySelectionExpression: __expectString(output.ApiKeySelectionExpression), - CorsConfiguration: - output.CorsConfiguration != null ? de_AwsCorsConfiguration(output.CorsConfiguration, context) : undefined, - CreatedDate: __expectString(output.CreatedDate), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - ProtocolType: __expectString(output.ProtocolType), - RouteSelectionExpression: __expectString(output.RouteSelectionExpression), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayV2RouteSettings - */ -const de_AwsApiGatewayV2RouteSettings = (output: any, context: __SerdeContext): AwsApiGatewayV2RouteSettings => { - return { - DataTraceEnabled: __expectBoolean(output.DataTraceEnabled), - DetailedMetricsEnabled: __expectBoolean(output.DetailedMetricsEnabled), - LoggingLevel: __expectString(output.LoggingLevel), - ThrottlingBurstLimit: __expectInt32(output.ThrottlingBurstLimit), - ThrottlingRateLimit: __limitedParseDouble(output.ThrottlingRateLimit), - } as any; -}; - -/** - * deserializeAws_restJson1AwsApiGatewayV2StageDetails - */ -const de_AwsApiGatewayV2StageDetails = (output: any, context: __SerdeContext): AwsApiGatewayV2StageDetails => { - return { - AccessLogSettings: - output.AccessLogSettings != null - ? de_AwsApiGatewayAccessLogSettings(output.AccessLogSettings, context) - : undefined, - ApiGatewayManaged: __expectBoolean(output.ApiGatewayManaged), - AutoDeploy: __expectBoolean(output.AutoDeploy), - ClientCertificateId: __expectString(output.ClientCertificateId), - CreatedDate: __expectString(output.CreatedDate), - DefaultRouteSettings: - output.DefaultRouteSettings != null - ? de_AwsApiGatewayV2RouteSettings(output.DefaultRouteSettings, context) - : undefined, - DeploymentId: __expectString(output.DeploymentId), - Description: __expectString(output.Description), - LastDeploymentStatusMessage: __expectString(output.LastDeploymentStatusMessage), - LastUpdatedDate: __expectString(output.LastUpdatedDate), - RouteSettings: - output.RouteSettings != null ? de_AwsApiGatewayV2RouteSettings(output.RouteSettings, context) : undefined, - StageName: __expectString(output.StageName), - StageVariables: output.StageVariables != null ? de_FieldMap(output.StageVariables, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupAvailabilityZonesList - */ -const de_AwsAutoScalingAutoScalingGroupAvailabilityZonesList = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails - */ -const de_AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails => { - return { - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupDetails - */ -const de_AwsAutoScalingAutoScalingGroupDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupDetails => { - return { - AvailabilityZones: - output.AvailabilityZones != null - ? de_AwsAutoScalingAutoScalingGroupAvailabilityZonesList(output.AvailabilityZones, context) - : undefined, - CapacityRebalance: __expectBoolean(output.CapacityRebalance), - CreatedTime: __expectString(output.CreatedTime), - HealthCheckGracePeriod: __expectInt32(output.HealthCheckGracePeriod), - HealthCheckType: __expectString(output.HealthCheckType), - LaunchConfigurationName: __expectString(output.LaunchConfigurationName), - LaunchTemplate: - output.LaunchTemplate != null - ? de_AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification(output.LaunchTemplate, context) - : undefined, - LoadBalancerNames: output.LoadBalancerNames != null ? de_StringList(output.LoadBalancerNames, context) : undefined, - MixedInstancesPolicy: - output.MixedInstancesPolicy != null - ? de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails(output.MixedInstancesPolicy, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification - */ -const de_AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification => { - return { - LaunchTemplateId: __expectString(output.LaunchTemplateId), - LaunchTemplateName: __expectString(output.LaunchTemplateName), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails - */ -const de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails => { - return { - InstancesDistribution: - output.InstancesDistribution != null - ? de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails( - output.InstancesDistribution, - context - ) - : undefined, - LaunchTemplate: - output.LaunchTemplate != null - ? de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails(output.LaunchTemplate, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails - */ -const de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails => { - return { - OnDemandAllocationStrategy: __expectString(output.OnDemandAllocationStrategy), - OnDemandBaseCapacity: __expectInt32(output.OnDemandBaseCapacity), - OnDemandPercentageAboveBaseCapacity: __expectInt32(output.OnDemandPercentageAboveBaseCapacity), - SpotAllocationStrategy: __expectString(output.SpotAllocationStrategy), - SpotInstancePools: __expectInt32(output.SpotInstancePools), - SpotMaxPrice: __expectString(output.SpotMaxPrice), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails - */ -const de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails => { - return { - LaunchTemplateSpecification: - output.LaunchTemplateSpecification != null - ? de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification( - output.LaunchTemplateSpecification, - context - ) - : undefined, - Overrides: - output.Overrides != null - ? de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList(output.Overrides, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification - */ -const de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification => { - return { - LaunchTemplateId: __expectString(output.LaunchTemplateId), - LaunchTemplateName: __expectString(output.LaunchTemplateName), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList - */ -const de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails - */ -const de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails => { - return { - InstanceType: __expectString(output.InstanceType), - WeightedCapacity: __expectString(output.WeightedCapacity), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails - */ -const de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails => { - return { - DeviceName: __expectString(output.DeviceName), - Ebs: - output.Ebs != null - ? de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails(output.Ebs, context) - : undefined, - NoDevice: __expectBoolean(output.NoDevice), - VirtualName: __expectString(output.VirtualName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails - */ -const de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails => { - return { - DeleteOnTermination: __expectBoolean(output.DeleteOnTermination), - Encrypted: __expectBoolean(output.Encrypted), - Iops: __expectInt32(output.Iops), - SnapshotId: __expectString(output.SnapshotId), - VolumeSize: __expectInt32(output.VolumeSize), - VolumeType: __expectString(output.VolumeType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList - */ -const de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList = ( - output: any, - context: __SerdeContext -): AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingLaunchConfigurationDetails - */ -const de_AwsAutoScalingLaunchConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingLaunchConfigurationDetails => { - return { - AssociatePublicIpAddress: __expectBoolean(output.AssociatePublicIpAddress), - BlockDeviceMappings: - output.BlockDeviceMappings != null - ? de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList(output.BlockDeviceMappings, context) - : undefined, - ClassicLinkVpcId: __expectString(output.ClassicLinkVpcId), - ClassicLinkVpcSecurityGroups: - output.ClassicLinkVpcSecurityGroups != null - ? de_NonEmptyStringList(output.ClassicLinkVpcSecurityGroups, context) - : undefined, - CreatedTime: __expectString(output.CreatedTime), - EbsOptimized: __expectBoolean(output.EbsOptimized), - IamInstanceProfile: __expectString(output.IamInstanceProfile), - ImageId: __expectString(output.ImageId), - InstanceMonitoring: - output.InstanceMonitoring != null - ? de_AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails(output.InstanceMonitoring, context) - : undefined, - InstanceType: __expectString(output.InstanceType), - KernelId: __expectString(output.KernelId), - KeyName: __expectString(output.KeyName), - LaunchConfigurationName: __expectString(output.LaunchConfigurationName), - MetadataOptions: - output.MetadataOptions != null - ? de_AwsAutoScalingLaunchConfigurationMetadataOptions(output.MetadataOptions, context) - : undefined, - PlacementTenancy: __expectString(output.PlacementTenancy), - RamdiskId: __expectString(output.RamdiskId), - SecurityGroups: output.SecurityGroups != null ? de_NonEmptyStringList(output.SecurityGroups, context) : undefined, - SpotPrice: __expectString(output.SpotPrice), - UserData: __expectString(output.UserData), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails - */ -const de_AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails = ( - output: any, - context: __SerdeContext -): AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; - -/** - * deserializeAws_restJson1AwsAutoScalingLaunchConfigurationMetadataOptions - */ -const de_AwsAutoScalingLaunchConfigurationMetadataOptions = ( - output: any, - context: __SerdeContext -): AwsAutoScalingLaunchConfigurationMetadataOptions => { - return { - HttpEndpoint: __expectString(output.HttpEndpoint), - HttpPutResponseHopLimit: __expectInt32(output.HttpPutResponseHopLimit), - HttpTokens: __expectString(output.HttpTokens), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanAdvancedBackupSettingsDetails - */ -const de_AwsBackupBackupPlanAdvancedBackupSettingsDetails = ( - output: any, - context: __SerdeContext -): AwsBackupBackupPlanAdvancedBackupSettingsDetails => { - return { - BackupOptions: output.BackupOptions != null ? de_FieldMap(output.BackupOptions, context) : undefined, - ResourceType: __expectString(output.ResourceType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanAdvancedBackupSettingsList - */ -const de_AwsBackupBackupPlanAdvancedBackupSettingsList = ( - output: any, - context: __SerdeContext -): AwsBackupBackupPlanAdvancedBackupSettingsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsBackupBackupPlanAdvancedBackupSettingsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanBackupPlanDetails - */ -const de_AwsBackupBackupPlanBackupPlanDetails = ( - output: any, - context: __SerdeContext -): AwsBackupBackupPlanBackupPlanDetails => { - return { - AdvancedBackupSettings: - output.AdvancedBackupSettings != null - ? de_AwsBackupBackupPlanAdvancedBackupSettingsList(output.AdvancedBackupSettings, context) - : undefined, - BackupPlanName: __expectString(output.BackupPlanName), - BackupPlanRule: - output.BackupPlanRule != null ? de_AwsBackupBackupPlanRuleList(output.BackupPlanRule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanDetails - */ -const de_AwsBackupBackupPlanDetails = (output: any, context: __SerdeContext): AwsBackupBackupPlanDetails => { - return { - BackupPlan: - output.BackupPlan != null ? de_AwsBackupBackupPlanBackupPlanDetails(output.BackupPlan, context) : undefined, - BackupPlanArn: __expectString(output.BackupPlanArn), - BackupPlanId: __expectString(output.BackupPlanId), - VersionId: __expectString(output.VersionId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanLifecycleDetails - */ -const de_AwsBackupBackupPlanLifecycleDetails = ( - output: any, - context: __SerdeContext -): AwsBackupBackupPlanLifecycleDetails => { - return { - DeleteAfterDays: __expectLong(output.DeleteAfterDays), - MoveToColdStorageAfterDays: __expectLong(output.MoveToColdStorageAfterDays), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanRuleCopyActionsDetails - */ -const de_AwsBackupBackupPlanRuleCopyActionsDetails = ( - output: any, - context: __SerdeContext -): AwsBackupBackupPlanRuleCopyActionsDetails => { - return { - DestinationBackupVaultArn: __expectString(output.DestinationBackupVaultArn), - Lifecycle: output.Lifecycle != null ? de_AwsBackupBackupPlanLifecycleDetails(output.Lifecycle, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanRuleCopyActionsList - */ -const de_AwsBackupBackupPlanRuleCopyActionsList = ( - output: any, - context: __SerdeContext -): AwsBackupBackupPlanRuleCopyActionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsBackupBackupPlanRuleCopyActionsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanRuleDetails - */ -const de_AwsBackupBackupPlanRuleDetails = (output: any, context: __SerdeContext): AwsBackupBackupPlanRuleDetails => { - return { - CompletionWindowMinutes: __expectLong(output.CompletionWindowMinutes), - CopyActions: - output.CopyActions != null ? de_AwsBackupBackupPlanRuleCopyActionsList(output.CopyActions, context) : undefined, - EnableContinuousBackup: __expectBoolean(output.EnableContinuousBackup), - Lifecycle: output.Lifecycle != null ? de_AwsBackupBackupPlanLifecycleDetails(output.Lifecycle, context) : undefined, - RuleId: __expectString(output.RuleId), - RuleName: __expectString(output.RuleName), - ScheduleExpression: __expectString(output.ScheduleExpression), - StartWindowMinutes: __expectLong(output.StartWindowMinutes), - TargetBackupVault: __expectString(output.TargetBackupVault), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupPlanRuleList - */ -const de_AwsBackupBackupPlanRuleList = (output: any, context: __SerdeContext): AwsBackupBackupPlanRuleDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsBackupBackupPlanRuleDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupVaultDetails - */ -const de_AwsBackupBackupVaultDetails = (output: any, context: __SerdeContext): AwsBackupBackupVaultDetails => { - return { - AccessPolicy: __expectString(output.AccessPolicy), - BackupVaultArn: __expectString(output.BackupVaultArn), - BackupVaultName: __expectString(output.BackupVaultName), - EncryptionKeyArn: __expectString(output.EncryptionKeyArn), - Notifications: - output.Notifications != null - ? de_AwsBackupBackupVaultNotificationsDetails(output.Notifications, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupBackupVaultNotificationsDetails - */ -const de_AwsBackupBackupVaultNotificationsDetails = ( - output: any, - context: __SerdeContext -): AwsBackupBackupVaultNotificationsDetails => { - return { - BackupVaultEvents: - output.BackupVaultEvents != null ? de_NonEmptyStringList(output.BackupVaultEvents, context) : undefined, - SnsTopicArn: __expectString(output.SnsTopicArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupRecoveryPointCalculatedLifecycleDetails - */ -const de_AwsBackupRecoveryPointCalculatedLifecycleDetails = ( - output: any, - context: __SerdeContext -): AwsBackupRecoveryPointCalculatedLifecycleDetails => { - return { - DeleteAt: __expectString(output.DeleteAt), - MoveToColdStorageAt: __expectString(output.MoveToColdStorageAt), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupRecoveryPointCreatedByDetails - */ -const de_AwsBackupRecoveryPointCreatedByDetails = ( - output: any, - context: __SerdeContext -): AwsBackupRecoveryPointCreatedByDetails => { - return { - BackupPlanArn: __expectString(output.BackupPlanArn), - BackupPlanId: __expectString(output.BackupPlanId), - BackupPlanVersion: __expectString(output.BackupPlanVersion), - BackupRuleId: __expectString(output.BackupRuleId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupRecoveryPointDetails - */ -const de_AwsBackupRecoveryPointDetails = (output: any, context: __SerdeContext): AwsBackupRecoveryPointDetails => { - return { - BackupSizeInBytes: __expectLong(output.BackupSizeInBytes), - BackupVaultArn: __expectString(output.BackupVaultArn), - BackupVaultName: __expectString(output.BackupVaultName), - CalculatedLifecycle: - output.CalculatedLifecycle != null - ? de_AwsBackupRecoveryPointCalculatedLifecycleDetails(output.CalculatedLifecycle, context) - : undefined, - CompletionDate: __expectString(output.CompletionDate), - CreatedBy: - output.CreatedBy != null ? de_AwsBackupRecoveryPointCreatedByDetails(output.CreatedBy, context) : undefined, - CreationDate: __expectString(output.CreationDate), - EncryptionKeyArn: __expectString(output.EncryptionKeyArn), - IamRoleArn: __expectString(output.IamRoleArn), - IsEncrypted: __expectBoolean(output.IsEncrypted), - LastRestoreTime: __expectString(output.LastRestoreTime), - Lifecycle: - output.Lifecycle != null ? de_AwsBackupRecoveryPointLifecycleDetails(output.Lifecycle, context) : undefined, - RecoveryPointArn: __expectString(output.RecoveryPointArn), - ResourceArn: __expectString(output.ResourceArn), - ResourceType: __expectString(output.ResourceType), - SourceBackupVaultArn: __expectString(output.SourceBackupVaultArn), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - StorageClass: __expectString(output.StorageClass), - } as any; -}; - -/** - * deserializeAws_restJson1AwsBackupRecoveryPointLifecycleDetails - */ -const de_AwsBackupRecoveryPointLifecycleDetails = ( - output: any, - context: __SerdeContext -): AwsBackupRecoveryPointLifecycleDetails => { - return { - DeleteAfterDays: __expectLong(output.DeleteAfterDays), - MoveToColdStorageAfterDays: __expectLong(output.MoveToColdStorageAfterDays), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateDetails - */ -const de_AwsCertificateManagerCertificateDetails = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateDetails => { - return { - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - CreatedAt: __expectString(output.CreatedAt), - DomainName: __expectString(output.DomainName), - DomainValidationOptions: - output.DomainValidationOptions != null - ? de_AwsCertificateManagerCertificateDomainValidationOptions(output.DomainValidationOptions, context) - : undefined, - ExtendedKeyUsages: - output.ExtendedKeyUsages != null - ? de_AwsCertificateManagerCertificateExtendedKeyUsages(output.ExtendedKeyUsages, context) - : undefined, - FailureReason: __expectString(output.FailureReason), - ImportedAt: __expectString(output.ImportedAt), - InUseBy: output.InUseBy != null ? de_StringList(output.InUseBy, context) : undefined, - IssuedAt: __expectString(output.IssuedAt), - Issuer: __expectString(output.Issuer), - KeyAlgorithm: __expectString(output.KeyAlgorithm), - KeyUsages: - output.KeyUsages != null ? de_AwsCertificateManagerCertificateKeyUsages(output.KeyUsages, context) : undefined, - NotAfter: __expectString(output.NotAfter), - NotBefore: __expectString(output.NotBefore), - Options: output.Options != null ? de_AwsCertificateManagerCertificateOptions(output.Options, context) : undefined, - RenewalEligibility: __expectString(output.RenewalEligibility), - RenewalSummary: - output.RenewalSummary != null - ? de_AwsCertificateManagerCertificateRenewalSummary(output.RenewalSummary, context) - : undefined, - Serial: __expectString(output.Serial), - SignatureAlgorithm: __expectString(output.SignatureAlgorithm), - Status: __expectString(output.Status), - Subject: __expectString(output.Subject), - SubjectAlternativeNames: - output.SubjectAlternativeNames != null ? de_StringList(output.SubjectAlternativeNames, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateDomainValidationOption - */ -const de_AwsCertificateManagerCertificateDomainValidationOption = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateDomainValidationOption => { - return { - DomainName: __expectString(output.DomainName), - ResourceRecord: - output.ResourceRecord != null - ? de_AwsCertificateManagerCertificateResourceRecord(output.ResourceRecord, context) - : undefined, - ValidationDomain: __expectString(output.ValidationDomain), - ValidationEmails: output.ValidationEmails != null ? de_StringList(output.ValidationEmails, context) : undefined, - ValidationMethod: __expectString(output.ValidationMethod), - ValidationStatus: __expectString(output.ValidationStatus), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateDomainValidationOptions - */ -const de_AwsCertificateManagerCertificateDomainValidationOptions = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateDomainValidationOption[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCertificateManagerCertificateDomainValidationOption(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateExtendedKeyUsage - */ -const de_AwsCertificateManagerCertificateExtendedKeyUsage = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateExtendedKeyUsage => { - return { - Name: __expectString(output.Name), - OId: __expectString(output.OId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateExtendedKeyUsages - */ -const de_AwsCertificateManagerCertificateExtendedKeyUsages = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateExtendedKeyUsage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCertificateManagerCertificateExtendedKeyUsage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateKeyUsage - */ -const de_AwsCertificateManagerCertificateKeyUsage = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateKeyUsage => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateKeyUsages - */ -const de_AwsCertificateManagerCertificateKeyUsages = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateKeyUsage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCertificateManagerCertificateKeyUsage(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateOptions - */ -const de_AwsCertificateManagerCertificateOptions = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateOptions => { - return { - CertificateTransparencyLoggingPreference: __expectString(output.CertificateTransparencyLoggingPreference), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateRenewalSummary - */ -const de_AwsCertificateManagerCertificateRenewalSummary = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateRenewalSummary => { - return { - DomainValidationOptions: - output.DomainValidationOptions != null - ? de_AwsCertificateManagerCertificateDomainValidationOptions(output.DomainValidationOptions, context) - : undefined, - RenewalStatus: __expectString(output.RenewalStatus), - RenewalStatusReason: __expectString(output.RenewalStatusReason), - UpdatedAt: __expectString(output.UpdatedAt), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCertificateManagerCertificateResourceRecord - */ -const de_AwsCertificateManagerCertificateResourceRecord = ( - output: any, - context: __SerdeContext -): AwsCertificateManagerCertificateResourceRecord => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFormationStackDetails - */ -const de_AwsCloudFormationStackDetails = (output: any, context: __SerdeContext): AwsCloudFormationStackDetails => { - return { - Capabilities: output.Capabilities != null ? de_NonEmptyStringList(output.Capabilities, context) : undefined, - CreationTime: __expectString(output.CreationTime), - Description: __expectString(output.Description), - DisableRollback: __expectBoolean(output.DisableRollback), - DriftInformation: - output.DriftInformation != null - ? de_AwsCloudFormationStackDriftInformationDetails(output.DriftInformation, context) - : undefined, - EnableTerminationProtection: __expectBoolean(output.EnableTerminationProtection), - LastUpdatedTime: __expectString(output.LastUpdatedTime), - NotificationArns: - output.NotificationArns != null ? de_NonEmptyStringList(output.NotificationArns, context) : undefined, - Outputs: output.Outputs != null ? de_AwsCloudFormationStackOutputsList(output.Outputs, context) : undefined, - RoleArn: __expectString(output.RoleArn), - StackId: __expectString(output.StackId), - StackName: __expectString(output.StackName), - StackStatus: __expectString(output.StackStatus), - StackStatusReason: __expectString(output.StackStatusReason), - TimeoutInMinutes: __expectInt32(output.TimeoutInMinutes), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFormationStackDriftInformationDetails - */ -const de_AwsCloudFormationStackDriftInformationDetails = ( - output: any, - context: __SerdeContext -): AwsCloudFormationStackDriftInformationDetails => { - return { - StackDriftStatus: __expectString(output.StackDriftStatus), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFormationStackOutputsDetails - */ -const de_AwsCloudFormationStackOutputsDetails = ( - output: any, - context: __SerdeContext -): AwsCloudFormationStackOutputsDetails => { - return { - Description: __expectString(output.Description), - OutputKey: __expectString(output.OutputKey), - OutputValue: __expectString(output.OutputValue), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFormationStackOutputsList - */ -const de_AwsCloudFormationStackOutputsList = ( - output: any, - context: __SerdeContext -): AwsCloudFormationStackOutputsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCloudFormationStackOutputsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionCacheBehavior - */ -const de_AwsCloudFrontDistributionCacheBehavior = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionCacheBehavior => { - return { - ViewerProtocolPolicy: __expectString(output.ViewerProtocolPolicy), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionCacheBehaviors - */ -const de_AwsCloudFrontDistributionCacheBehaviors = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionCacheBehaviors => { - return { - Items: output.Items != null ? de_AwsCloudFrontDistributionCacheBehaviorsItemList(output.Items, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionCacheBehaviorsItemList - */ -const de_AwsCloudFrontDistributionCacheBehaviorsItemList = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionCacheBehavior[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCloudFrontDistributionCacheBehavior(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionDefaultCacheBehavior - */ -const de_AwsCloudFrontDistributionDefaultCacheBehavior = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionDefaultCacheBehavior => { - return { - ViewerProtocolPolicy: __expectString(output.ViewerProtocolPolicy), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionDetails - */ -const de_AwsCloudFrontDistributionDetails = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionDetails => { - return { - CacheBehaviors: - output.CacheBehaviors != null - ? de_AwsCloudFrontDistributionCacheBehaviors(output.CacheBehaviors, context) - : undefined, - DefaultCacheBehavior: - output.DefaultCacheBehavior != null - ? de_AwsCloudFrontDistributionDefaultCacheBehavior(output.DefaultCacheBehavior, context) - : undefined, - DefaultRootObject: __expectString(output.DefaultRootObject), - DomainName: __expectString(output.DomainName), - ETag: __expectString(output.ETag), - LastModifiedTime: __expectString(output.LastModifiedTime), - Logging: output.Logging != null ? de_AwsCloudFrontDistributionLogging(output.Logging, context) : undefined, - OriginGroups: - output.OriginGroups != null ? de_AwsCloudFrontDistributionOriginGroups(output.OriginGroups, context) : undefined, - Origins: output.Origins != null ? de_AwsCloudFrontDistributionOrigins(output.Origins, context) : undefined, - Status: __expectString(output.Status), - ViewerCertificate: - output.ViewerCertificate != null - ? de_AwsCloudFrontDistributionViewerCertificate(output.ViewerCertificate, context) - : undefined, - WebAclId: __expectString(output.WebAclId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionLogging - */ -const de_AwsCloudFrontDistributionLogging = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionLogging => { - return { - Bucket: __expectString(output.Bucket), - Enabled: __expectBoolean(output.Enabled), - IncludeCookies: __expectBoolean(output.IncludeCookies), - Prefix: __expectString(output.Prefix), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginCustomOriginConfig - */ -const de_AwsCloudFrontDistributionOriginCustomOriginConfig = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginCustomOriginConfig => { - return { - HttpPort: __expectInt32(output.HttpPort), - HttpsPort: __expectInt32(output.HttpsPort), - OriginKeepaliveTimeout: __expectInt32(output.OriginKeepaliveTimeout), - OriginProtocolPolicy: __expectString(output.OriginProtocolPolicy), - OriginReadTimeout: __expectInt32(output.OriginReadTimeout), - OriginSslProtocols: - output.OriginSslProtocols != null - ? de_AwsCloudFrontDistributionOriginSslProtocols(output.OriginSslProtocols, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginGroup - */ -const de_AwsCloudFrontDistributionOriginGroup = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginGroup => { - return { - FailoverCriteria: - output.FailoverCriteria != null - ? de_AwsCloudFrontDistributionOriginGroupFailover(output.FailoverCriteria, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginGroupFailover - */ -const de_AwsCloudFrontDistributionOriginGroupFailover = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginGroupFailover => { - return { - StatusCodes: - output.StatusCodes != null - ? de_AwsCloudFrontDistributionOriginGroupFailoverStatusCodes(output.StatusCodes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginGroupFailoverStatusCodes - */ -const de_AwsCloudFrontDistributionOriginGroupFailoverStatusCodes = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginGroupFailoverStatusCodes => { - return { - Items: - output.Items != null - ? de_AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList(output.Items, context) - : undefined, - Quantity: __expectInt32(output.Quantity), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList - */ -const de_AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList = ( - output: any, - context: __SerdeContext -): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginGroups - */ -const de_AwsCloudFrontDistributionOriginGroups = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginGroups => { - return { - Items: output.Items != null ? de_AwsCloudFrontDistributionOriginGroupsItemList(output.Items, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginGroupsItemList - */ -const de_AwsCloudFrontDistributionOriginGroupsItemList = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCloudFrontDistributionOriginGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginItem - */ -const de_AwsCloudFrontDistributionOriginItem = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginItem => { - return { - CustomOriginConfig: - output.CustomOriginConfig != null - ? de_AwsCloudFrontDistributionOriginCustomOriginConfig(output.CustomOriginConfig, context) - : undefined, - DomainName: __expectString(output.DomainName), - Id: __expectString(output.Id), - OriginPath: __expectString(output.OriginPath), - S3OriginConfig: - output.S3OriginConfig != null - ? de_AwsCloudFrontDistributionOriginS3OriginConfig(output.S3OriginConfig, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginItemList - */ -const de_AwsCloudFrontDistributionOriginItemList = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCloudFrontDistributionOriginItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOrigins - */ -const de_AwsCloudFrontDistributionOrigins = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOrigins => { - return { - Items: output.Items != null ? de_AwsCloudFrontDistributionOriginItemList(output.Items, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginS3OriginConfig - */ -const de_AwsCloudFrontDistributionOriginS3OriginConfig = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginS3OriginConfig => { - return { - OriginAccessIdentity: __expectString(output.OriginAccessIdentity), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionOriginSslProtocols - */ -const de_AwsCloudFrontDistributionOriginSslProtocols = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionOriginSslProtocols => { - return { - Items: output.Items != null ? de_NonEmptyStringList(output.Items, context) : undefined, - Quantity: __expectInt32(output.Quantity), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudFrontDistributionViewerCertificate - */ -const de_AwsCloudFrontDistributionViewerCertificate = ( - output: any, - context: __SerdeContext -): AwsCloudFrontDistributionViewerCertificate => { - return { - AcmCertificateArn: __expectString(output.AcmCertificateArn), - Certificate: __expectString(output.Certificate), - CertificateSource: __expectString(output.CertificateSource), - CloudFrontDefaultCertificate: __expectBoolean(output.CloudFrontDefaultCertificate), - IamCertificateId: __expectString(output.IamCertificateId), - MinimumProtocolVersion: __expectString(output.MinimumProtocolVersion), - SslSupportMethod: __expectString(output.SslSupportMethod), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudTrailTrailDetails - */ -const de_AwsCloudTrailTrailDetails = (output: any, context: __SerdeContext): AwsCloudTrailTrailDetails => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - CloudWatchLogsRoleArn: __expectString(output.CloudWatchLogsRoleArn), - HasCustomEventSelectors: __expectBoolean(output.HasCustomEventSelectors), - HomeRegion: __expectString(output.HomeRegion), - IncludeGlobalServiceEvents: __expectBoolean(output.IncludeGlobalServiceEvents), - IsMultiRegionTrail: __expectBoolean(output.IsMultiRegionTrail), - IsOrganizationTrail: __expectBoolean(output.IsOrganizationTrail), - KmsKeyId: __expectString(output.KmsKeyId), - LogFileValidationEnabled: __expectBoolean(output.LogFileValidationEnabled), - Name: __expectString(output.Name), - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - SnsTopicArn: __expectString(output.SnsTopicArn), - SnsTopicName: __expectString(output.SnsTopicName), - TrailArn: __expectString(output.TrailArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudWatchAlarmDetails - */ -const de_AwsCloudWatchAlarmDetails = (output: any, context: __SerdeContext): AwsCloudWatchAlarmDetails => { - return { - ActionsEnabled: __expectBoolean(output.ActionsEnabled), - AlarmActions: output.AlarmActions != null ? de_NonEmptyStringList(output.AlarmActions, context) : undefined, - AlarmArn: __expectString(output.AlarmArn), - AlarmConfigurationUpdatedTimestamp: __expectString(output.AlarmConfigurationUpdatedTimestamp), - AlarmDescription: __expectString(output.AlarmDescription), - AlarmName: __expectString(output.AlarmName), - ComparisonOperator: __expectString(output.ComparisonOperator), - DatapointsToAlarm: __expectInt32(output.DatapointsToAlarm), - Dimensions: output.Dimensions != null ? de_AwsCloudWatchAlarmDimensionsList(output.Dimensions, context) : undefined, - EvaluateLowSampleCountPercentile: __expectString(output.EvaluateLowSampleCountPercentile), - EvaluationPeriods: __expectInt32(output.EvaluationPeriods), - ExtendedStatistic: __expectString(output.ExtendedStatistic), - InsufficientDataActions: - output.InsufficientDataActions != null - ? de_NonEmptyStringList(output.InsufficientDataActions, context) - : undefined, - MetricName: __expectString(output.MetricName), - Namespace: __expectString(output.Namespace), - OkActions: output.OkActions != null ? de_NonEmptyStringList(output.OkActions, context) : undefined, - Period: __expectInt32(output.Period), - Statistic: __expectString(output.Statistic), - Threshold: __limitedParseDouble(output.Threshold), - ThresholdMetricId: __expectString(output.ThresholdMetricId), - TreatMissingData: __expectString(output.TreatMissingData), - Unit: __expectString(output.Unit), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudWatchAlarmDimensionsDetails - */ -const de_AwsCloudWatchAlarmDimensionsDetails = ( - output: any, - context: __SerdeContext -): AwsCloudWatchAlarmDimensionsDetails => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCloudWatchAlarmDimensionsList - */ -const de_AwsCloudWatchAlarmDimensionsList = ( - output: any, - context: __SerdeContext -): AwsCloudWatchAlarmDimensionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCloudWatchAlarmDimensionsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectArtifactsDetails - */ -const de_AwsCodeBuildProjectArtifactsDetails = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectArtifactsDetails => { - return { - ArtifactIdentifier: __expectString(output.ArtifactIdentifier), - EncryptionDisabled: __expectBoolean(output.EncryptionDisabled), - Location: __expectString(output.Location), - Name: __expectString(output.Name), - NamespaceType: __expectString(output.NamespaceType), - OverrideArtifactName: __expectBoolean(output.OverrideArtifactName), - Packaging: __expectString(output.Packaging), - Path: __expectString(output.Path), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectArtifactsList - */ -const de_AwsCodeBuildProjectArtifactsList = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectArtifactsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCodeBuildProjectArtifactsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectDetails - */ -const de_AwsCodeBuildProjectDetails = (output: any, context: __SerdeContext): AwsCodeBuildProjectDetails => { - return { - Artifacts: output.Artifacts != null ? de_AwsCodeBuildProjectArtifactsList(output.Artifacts, context) : undefined, - EncryptionKey: __expectString(output.EncryptionKey), - Environment: - output.Environment != null ? de_AwsCodeBuildProjectEnvironment(output.Environment, context) : undefined, - LogsConfig: - output.LogsConfig != null ? de_AwsCodeBuildProjectLogsConfigDetails(output.LogsConfig, context) : undefined, - Name: __expectString(output.Name), - SecondaryArtifacts: - output.SecondaryArtifacts != null - ? de_AwsCodeBuildProjectArtifactsList(output.SecondaryArtifacts, context) - : undefined, - ServiceRole: __expectString(output.ServiceRole), - Source: output.Source != null ? de_AwsCodeBuildProjectSource(output.Source, context) : undefined, - VpcConfig: output.VpcConfig != null ? de_AwsCodeBuildProjectVpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectEnvironment - */ -const de_AwsCodeBuildProjectEnvironment = (output: any, context: __SerdeContext): AwsCodeBuildProjectEnvironment => { - return { - Certificate: __expectString(output.Certificate), - EnvironmentVariables: - output.EnvironmentVariables != null - ? de_AwsCodeBuildProjectEnvironmentEnvironmentVariablesList(output.EnvironmentVariables, context) - : undefined, - ImagePullCredentialsType: __expectString(output.ImagePullCredentialsType), - PrivilegedMode: __expectBoolean(output.PrivilegedMode), - RegistryCredential: - output.RegistryCredential != null - ? de_AwsCodeBuildProjectEnvironmentRegistryCredential(output.RegistryCredential, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails - */ -const de_AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectEnvironmentEnvironmentVariablesList - */ -const de_AwsCodeBuildProjectEnvironmentEnvironmentVariablesList = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectEnvironmentRegistryCredential - */ -const de_AwsCodeBuildProjectEnvironmentRegistryCredential = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectEnvironmentRegistryCredential => { - return { - Credential: __expectString(output.Credential), - CredentialProvider: __expectString(output.CredentialProvider), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails - */ -const de_AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails => { - return { - GroupName: __expectString(output.GroupName), - Status: __expectString(output.Status), - StreamName: __expectString(output.StreamName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectLogsConfigDetails - */ -const de_AwsCodeBuildProjectLogsConfigDetails = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectLogsConfigDetails => { - return { - CloudWatchLogs: - output.CloudWatchLogs != null - ? de_AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails(output.CloudWatchLogs, context) - : undefined, - S3Logs: output.S3Logs != null ? de_AwsCodeBuildProjectLogsConfigS3LogsDetails(output.S3Logs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectLogsConfigS3LogsDetails - */ -const de_AwsCodeBuildProjectLogsConfigS3LogsDetails = ( - output: any, - context: __SerdeContext -): AwsCodeBuildProjectLogsConfigS3LogsDetails => { - return { - EncryptionDisabled: __expectBoolean(output.EncryptionDisabled), - Location: __expectString(output.Location), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectSource - */ -const de_AwsCodeBuildProjectSource = (output: any, context: __SerdeContext): AwsCodeBuildProjectSource => { - return { - GitCloneDepth: __expectInt32(output.GitCloneDepth), - InsecureSsl: __expectBoolean(output.InsecureSsl), - Location: __expectString(output.Location), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCodeBuildProjectVpcConfig - */ -const de_AwsCodeBuildProjectVpcConfig = (output: any, context: __SerdeContext): AwsCodeBuildProjectVpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_NonEmptyStringList(output.SecurityGroupIds, context) : undefined, - Subnets: output.Subnets != null ? de_NonEmptyStringList(output.Subnets, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsCorsConfiguration - */ -const de_AwsCorsConfiguration = (output: any, context: __SerdeContext): AwsCorsConfiguration => { - return { - AllowCredentials: __expectBoolean(output.AllowCredentials), - AllowHeaders: output.AllowHeaders != null ? de_NonEmptyStringList(output.AllowHeaders, context) : undefined, - AllowMethods: output.AllowMethods != null ? de_NonEmptyStringList(output.AllowMethods, context) : undefined, - AllowOrigins: output.AllowOrigins != null ? de_NonEmptyStringList(output.AllowOrigins, context) : undefined, - ExposeHeaders: output.ExposeHeaders != null ? de_NonEmptyStringList(output.ExposeHeaders, context) : undefined, - MaxAge: __expectInt32(output.MaxAge), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableAttributeDefinition - */ -const de_AwsDynamoDbTableAttributeDefinition = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableAttributeDefinition => { - return { - AttributeName: __expectString(output.AttributeName), - AttributeType: __expectString(output.AttributeType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableAttributeDefinitionList - */ -const de_AwsDynamoDbTableAttributeDefinitionList = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableAttributeDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsDynamoDbTableAttributeDefinition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableBillingModeSummary - */ -const de_AwsDynamoDbTableBillingModeSummary = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableBillingModeSummary => { - return { - BillingMode: __expectString(output.BillingMode), - LastUpdateToPayPerRequestDateTime: __expectString(output.LastUpdateToPayPerRequestDateTime), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableDetails - */ -const de_AwsDynamoDbTableDetails = (output: any, context: __SerdeContext): AwsDynamoDbTableDetails => { - return { - AttributeDefinitions: - output.AttributeDefinitions != null - ? de_AwsDynamoDbTableAttributeDefinitionList(output.AttributeDefinitions, context) - : undefined, - BillingModeSummary: - output.BillingModeSummary != null - ? de_AwsDynamoDbTableBillingModeSummary(output.BillingModeSummary, context) - : undefined, - CreationDateTime: __expectString(output.CreationDateTime), - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_AwsDynamoDbTableGlobalSecondaryIndexList(output.GlobalSecondaryIndexes, context) - : undefined, - GlobalTableVersion: __expectString(output.GlobalTableVersion), - ItemCount: __expectInt32(output.ItemCount), - KeySchema: output.KeySchema != null ? de_AwsDynamoDbTableKeySchemaList(output.KeySchema, context) : undefined, - LatestStreamArn: __expectString(output.LatestStreamArn), - LatestStreamLabel: __expectString(output.LatestStreamLabel), - LocalSecondaryIndexes: - output.LocalSecondaryIndexes != null - ? de_AwsDynamoDbTableLocalSecondaryIndexList(output.LocalSecondaryIndexes, context) - : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_AwsDynamoDbTableProvisionedThroughput(output.ProvisionedThroughput, context) - : undefined, - Replicas: output.Replicas != null ? de_AwsDynamoDbTableReplicaList(output.Replicas, context) : undefined, - RestoreSummary: - output.RestoreSummary != null ? de_AwsDynamoDbTableRestoreSummary(output.RestoreSummary, context) : undefined, - SseDescription: - output.SseDescription != null ? de_AwsDynamoDbTableSseDescription(output.SseDescription, context) : undefined, - StreamSpecification: - output.StreamSpecification != null - ? de_AwsDynamoDbTableStreamSpecification(output.StreamSpecification, context) - : undefined, - TableId: __expectString(output.TableId), - TableName: __expectString(output.TableName), - TableSizeBytes: __expectLong(output.TableSizeBytes), - TableStatus: __expectString(output.TableStatus), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableGlobalSecondaryIndex - */ -const de_AwsDynamoDbTableGlobalSecondaryIndex = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableGlobalSecondaryIndex => { - return { - Backfilling: __expectBoolean(output.Backfilling), - IndexArn: __expectString(output.IndexArn), - IndexName: __expectString(output.IndexName), - IndexSizeBytes: __expectLong(output.IndexSizeBytes), - IndexStatus: __expectString(output.IndexStatus), - ItemCount: __expectInt32(output.ItemCount), - KeySchema: output.KeySchema != null ? de_AwsDynamoDbTableKeySchemaList(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_AwsDynamoDbTableProjection(output.Projection, context) : undefined, - ProvisionedThroughput: - output.ProvisionedThroughput != null - ? de_AwsDynamoDbTableProvisionedThroughput(output.ProvisionedThroughput, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableGlobalSecondaryIndexList - */ -const de_AwsDynamoDbTableGlobalSecondaryIndexList = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableGlobalSecondaryIndex[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsDynamoDbTableGlobalSecondaryIndex(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableKeySchema - */ -const de_AwsDynamoDbTableKeySchema = (output: any, context: __SerdeContext): AwsDynamoDbTableKeySchema => { - return { - AttributeName: __expectString(output.AttributeName), - KeyType: __expectString(output.KeyType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableKeySchemaList - */ -const de_AwsDynamoDbTableKeySchemaList = (output: any, context: __SerdeContext): AwsDynamoDbTableKeySchema[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsDynamoDbTableKeySchema(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableLocalSecondaryIndex - */ -const de_AwsDynamoDbTableLocalSecondaryIndex = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableLocalSecondaryIndex => { - return { - IndexArn: __expectString(output.IndexArn), - IndexName: __expectString(output.IndexName), - KeySchema: output.KeySchema != null ? de_AwsDynamoDbTableKeySchemaList(output.KeySchema, context) : undefined, - Projection: output.Projection != null ? de_AwsDynamoDbTableProjection(output.Projection, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableLocalSecondaryIndexList - */ -const de_AwsDynamoDbTableLocalSecondaryIndexList = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableLocalSecondaryIndex[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsDynamoDbTableLocalSecondaryIndex(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableProjection - */ -const de_AwsDynamoDbTableProjection = (output: any, context: __SerdeContext): AwsDynamoDbTableProjection => { - return { - NonKeyAttributes: output.NonKeyAttributes != null ? de_StringList(output.NonKeyAttributes, context) : undefined, - ProjectionType: __expectString(output.ProjectionType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableProvisionedThroughput - */ -const de_AwsDynamoDbTableProvisionedThroughput = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableProvisionedThroughput => { - return { - LastDecreaseDateTime: __expectString(output.LastDecreaseDateTime), - LastIncreaseDateTime: __expectString(output.LastIncreaseDateTime), - NumberOfDecreasesToday: __expectInt32(output.NumberOfDecreasesToday), - ReadCapacityUnits: __expectInt32(output.ReadCapacityUnits), - WriteCapacityUnits: __expectInt32(output.WriteCapacityUnits), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableProvisionedThroughputOverride - */ -const de_AwsDynamoDbTableProvisionedThroughputOverride = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableProvisionedThroughputOverride => { - return { - ReadCapacityUnits: __expectInt32(output.ReadCapacityUnits), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableReplica - */ -const de_AwsDynamoDbTableReplica = (output: any, context: __SerdeContext): AwsDynamoDbTableReplica => { - return { - GlobalSecondaryIndexes: - output.GlobalSecondaryIndexes != null - ? de_AwsDynamoDbTableReplicaGlobalSecondaryIndexList(output.GlobalSecondaryIndexes, context) - : undefined, - KmsMasterKeyId: __expectString(output.KmsMasterKeyId), - ProvisionedThroughputOverride: - output.ProvisionedThroughputOverride != null - ? de_AwsDynamoDbTableProvisionedThroughputOverride(output.ProvisionedThroughputOverride, context) - : undefined, - RegionName: __expectString(output.RegionName), - ReplicaStatus: __expectString(output.ReplicaStatus), - ReplicaStatusDescription: __expectString(output.ReplicaStatusDescription), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableReplicaGlobalSecondaryIndex - */ -const de_AwsDynamoDbTableReplicaGlobalSecondaryIndex = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableReplicaGlobalSecondaryIndex => { - return { - IndexName: __expectString(output.IndexName), - ProvisionedThroughputOverride: - output.ProvisionedThroughputOverride != null - ? de_AwsDynamoDbTableProvisionedThroughputOverride(output.ProvisionedThroughputOverride, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableReplicaGlobalSecondaryIndexList - */ -const de_AwsDynamoDbTableReplicaGlobalSecondaryIndexList = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableReplicaGlobalSecondaryIndex[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsDynamoDbTableReplicaGlobalSecondaryIndex(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableReplicaList - */ -const de_AwsDynamoDbTableReplicaList = (output: any, context: __SerdeContext): AwsDynamoDbTableReplica[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsDynamoDbTableReplica(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableRestoreSummary - */ -const de_AwsDynamoDbTableRestoreSummary = (output: any, context: __SerdeContext): AwsDynamoDbTableRestoreSummary => { - return { - RestoreDateTime: __expectString(output.RestoreDateTime), - RestoreInProgress: __expectBoolean(output.RestoreInProgress), - SourceBackupArn: __expectString(output.SourceBackupArn), - SourceTableArn: __expectString(output.SourceTableArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableSseDescription - */ -const de_AwsDynamoDbTableSseDescription = (output: any, context: __SerdeContext): AwsDynamoDbTableSseDescription => { - return { - InaccessibleEncryptionDateTime: __expectString(output.InaccessibleEncryptionDateTime), - KmsMasterKeyArn: __expectString(output.KmsMasterKeyArn), - SseType: __expectString(output.SseType), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AwsDynamoDbTableStreamSpecification - */ -const de_AwsDynamoDbTableStreamSpecification = ( - output: any, - context: __SerdeContext -): AwsDynamoDbTableStreamSpecification => { - return { - StreamEnabled: __expectBoolean(output.StreamEnabled), - StreamViewType: __expectString(output.StreamViewType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2EipDetails - */ -const de_AwsEc2EipDetails = (output: any, context: __SerdeContext): AwsEc2EipDetails => { - return { - AllocationId: __expectString(output.AllocationId), - AssociationId: __expectString(output.AssociationId), - Domain: __expectString(output.Domain), - InstanceId: __expectString(output.InstanceId), - NetworkBorderGroup: __expectString(output.NetworkBorderGroup), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - NetworkInterfaceOwnerId: __expectString(output.NetworkInterfaceOwnerId), - PrivateIpAddress: __expectString(output.PrivateIpAddress), - PublicIp: __expectString(output.PublicIp), - PublicIpv4Pool: __expectString(output.PublicIpv4Pool), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2InstanceDetails - */ -const de_AwsEc2InstanceDetails = (output: any, context: __SerdeContext): AwsEc2InstanceDetails => { - return { - IamInstanceProfileArn: __expectString(output.IamInstanceProfileArn), - ImageId: __expectString(output.ImageId), - IpV4Addresses: output.IpV4Addresses != null ? de_StringList(output.IpV4Addresses, context) : undefined, - IpV6Addresses: output.IpV6Addresses != null ? de_StringList(output.IpV6Addresses, context) : undefined, - KeyName: __expectString(output.KeyName), - LaunchedAt: __expectString(output.LaunchedAt), - MetadataOptions: - output.MetadataOptions != null ? de_AwsEc2InstanceMetadataOptions(output.MetadataOptions, context) : undefined, - Monitoring: output.Monitoring != null ? de_AwsEc2InstanceMonitoringDetails(output.Monitoring, context) : undefined, - NetworkInterfaces: - output.NetworkInterfaces != null - ? de_AwsEc2InstanceNetworkInterfacesList(output.NetworkInterfaces, context) - : undefined, - SubnetId: __expectString(output.SubnetId), - Type: __expectString(output.Type), - VirtualizationType: __expectString(output.VirtualizationType), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2InstanceMetadataOptions - */ -const de_AwsEc2InstanceMetadataOptions = (output: any, context: __SerdeContext): AwsEc2InstanceMetadataOptions => { - return { - HttpEndpoint: __expectString(output.HttpEndpoint), - HttpProtocolIpv6: __expectString(output.HttpProtocolIpv6), - HttpPutResponseHopLimit: __expectInt32(output.HttpPutResponseHopLimit), - HttpTokens: __expectString(output.HttpTokens), - InstanceMetadataTags: __expectString(output.InstanceMetadataTags), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2InstanceMonitoringDetails - */ -const de_AwsEc2InstanceMonitoringDetails = (output: any, context: __SerdeContext): AwsEc2InstanceMonitoringDetails => { - return { - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2InstanceNetworkInterfacesDetails - */ -const de_AwsEc2InstanceNetworkInterfacesDetails = ( - output: any, - context: __SerdeContext -): AwsEc2InstanceNetworkInterfacesDetails => { - return { - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2InstanceNetworkInterfacesList - */ -const de_AwsEc2InstanceNetworkInterfacesList = ( - output: any, - context: __SerdeContext -): AwsEc2InstanceNetworkInterfacesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2InstanceNetworkInterfacesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails - */ -const de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails => { - return { - DeviceName: __expectString(output.DeviceName), - Ebs: - output.Ebs != null ? de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails(output.Ebs, context) : undefined, - NoDevice: __expectString(output.NoDevice), - VirtualName: __expectString(output.VirtualName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails - */ -const de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails => { - return { - DeleteOnTermination: __expectBoolean(output.DeleteOnTermination), - Encrypted: __expectBoolean(output.Encrypted), - Iops: __expectInt32(output.Iops), - KmsKeyId: __expectString(output.KmsKeyId), - SnapshotId: __expectString(output.SnapshotId), - Throughput: __expectInt32(output.Throughput), - VolumeSize: __expectInt32(output.VolumeSize), - VolumeType: __expectString(output.VolumeType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataBlockDeviceMappingSetList - */ -const de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails - */ -const de_AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails => { - return { - CapacityReservationId: __expectString(output.CapacityReservationId), - CapacityReservationResourceGroupArn: __expectString(output.CapacityReservationResourceGroupArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails - */ -const de_AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails => { - return { - CapacityReservationPreference: __expectString(output.CapacityReservationPreference), - CapacityReservationTarget: - output.CapacityReservationTarget != null - ? de_AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails( - output.CapacityReservationTarget, - context - ) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataCpuOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataCpuOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataCpuOptionsDetails => { - return { - CoreCount: __expectInt32(output.CoreCount), - ThreadsPerCore: __expectInt32(output.ThreadsPerCore), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataCreditSpecificationDetails - */ -const de_AwsEc2LaunchTemplateDataCreditSpecificationDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataCreditSpecificationDetails => { - return { - CpuCredits: __expectString(output.CpuCredits), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataDetails - */ -const de_AwsEc2LaunchTemplateDataDetails = (output: any, context: __SerdeContext): AwsEc2LaunchTemplateDataDetails => { - return { - BlockDeviceMappingSet: - output.BlockDeviceMappingSet != null - ? de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetList(output.BlockDeviceMappingSet, context) - : undefined, - CapacityReservationSpecification: - output.CapacityReservationSpecification != null - ? de_AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails( - output.CapacityReservationSpecification, - context - ) - : undefined, - CpuOptions: - output.CpuOptions != null ? de_AwsEc2LaunchTemplateDataCpuOptionsDetails(output.CpuOptions, context) : undefined, - CreditSpecification: - output.CreditSpecification != null - ? de_AwsEc2LaunchTemplateDataCreditSpecificationDetails(output.CreditSpecification, context) - : undefined, - DisableApiStop: __expectBoolean(output.DisableApiStop), - DisableApiTermination: __expectBoolean(output.DisableApiTermination), - EbsOptimized: __expectBoolean(output.EbsOptimized), - ElasticGpuSpecificationSet: - output.ElasticGpuSpecificationSet != null - ? de_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList(output.ElasticGpuSpecificationSet, context) - : undefined, - ElasticInferenceAcceleratorSet: - output.ElasticInferenceAcceleratorSet != null - ? de_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList(output.ElasticInferenceAcceleratorSet, context) - : undefined, - EnclaveOptions: - output.EnclaveOptions != null - ? de_AwsEc2LaunchTemplateDataEnclaveOptionsDetails(output.EnclaveOptions, context) - : undefined, - HibernationOptions: - output.HibernationOptions != null - ? de_AwsEc2LaunchTemplateDataHibernationOptionsDetails(output.HibernationOptions, context) - : undefined, - IamInstanceProfile: - output.IamInstanceProfile != null - ? de_AwsEc2LaunchTemplateDataIamInstanceProfileDetails(output.IamInstanceProfile, context) - : undefined, - ImageId: __expectString(output.ImageId), - InstanceInitiatedShutdownBehavior: __expectString(output.InstanceInitiatedShutdownBehavior), - InstanceMarketOptions: - output.InstanceMarketOptions != null - ? de_AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails(output.InstanceMarketOptions, context) - : undefined, - InstanceRequirements: - output.InstanceRequirements != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsDetails(output.InstanceRequirements, context) - : undefined, - InstanceType: __expectString(output.InstanceType), - KernelId: __expectString(output.KernelId), - KeyName: __expectString(output.KeyName), - LicenseSet: - output.LicenseSet != null ? de_AwsEc2LaunchTemplateDataLicenseSetList(output.LicenseSet, context) : undefined, - MaintenanceOptions: - output.MaintenanceOptions != null - ? de_AwsEc2LaunchTemplateDataMaintenanceOptionsDetails(output.MaintenanceOptions, context) - : undefined, - MetadataOptions: - output.MetadataOptions != null - ? de_AwsEc2LaunchTemplateDataMetadataOptionsDetails(output.MetadataOptions, context) - : undefined, - Monitoring: - output.Monitoring != null ? de_AwsEc2LaunchTemplateDataMonitoringDetails(output.Monitoring, context) : undefined, - NetworkInterfaceSet: - output.NetworkInterfaceSet != null - ? de_AwsEc2LaunchTemplateDataNetworkInterfaceSetList(output.NetworkInterfaceSet, context) - : undefined, - Placement: - output.Placement != null ? de_AwsEc2LaunchTemplateDataPlacementDetails(output.Placement, context) : undefined, - PrivateDnsNameOptions: - output.PrivateDnsNameOptions != null - ? de_AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails(output.PrivateDnsNameOptions, context) - : undefined, - RamDiskId: __expectString(output.RamDiskId), - SecurityGroupIdSet: - output.SecurityGroupIdSet != null ? de_NonEmptyStringList(output.SecurityGroupIdSet, context) : undefined, - SecurityGroupSet: - output.SecurityGroupSet != null ? de_NonEmptyStringList(output.SecurityGroupSet, context) : undefined, - UserData: __expectString(output.UserData), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails - */ -const de_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails => { - return { - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList - */ -const de_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails - */ -const de_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails => { - return { - Count: __expectInt32(output.Count), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList - */ -const de_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataEnclaveOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataEnclaveOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataEnclaveOptionsDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataHibernationOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataHibernationOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataHibernationOptionsDetails => { - return { - Configured: __expectBoolean(output.Configured), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataIamInstanceProfileDetails - */ -const de_AwsEc2LaunchTemplateDataIamInstanceProfileDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataIamInstanceProfileDetails => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails => { - return { - MarketType: __expectString(output.MarketType), - SpotOptions: - output.SpotOptions != null - ? de_AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails(output.SpotOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails => { - return { - BlockDurationMinutes: __expectInt32(output.BlockDurationMinutes), - InstanceInterruptionBehavior: __expectString(output.InstanceInterruptionBehavior), - MaxPrice: __expectString(output.MaxPrice), - SpotInstanceType: __expectString(output.SpotInstanceType), - ValidUntil: __expectString(output.ValidUntil), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails => { - return { - Max: __expectInt32(output.Max), - Min: __expectInt32(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails => { - return { - Max: __expectInt32(output.Max), - Min: __expectInt32(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails => { - return { - Max: __expectInt32(output.Max), - Min: __expectInt32(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsDetails => { - return { - AcceleratorCount: - output.AcceleratorCount != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails(output.AcceleratorCount, context) - : undefined, - AcceleratorManufacturers: - output.AcceleratorManufacturers != null - ? de_NonEmptyStringList(output.AcceleratorManufacturers, context) - : undefined, - AcceleratorNames: - output.AcceleratorNames != null ? de_NonEmptyStringList(output.AcceleratorNames, context) : undefined, - AcceleratorTotalMemoryMiB: - output.AcceleratorTotalMemoryMiB != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails( - output.AcceleratorTotalMemoryMiB, - context - ) - : undefined, - AcceleratorTypes: - output.AcceleratorTypes != null ? de_NonEmptyStringList(output.AcceleratorTypes, context) : undefined, - BareMetal: __expectString(output.BareMetal), - BaselineEbsBandwidthMbps: - output.BaselineEbsBandwidthMbps != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails( - output.BaselineEbsBandwidthMbps, - context - ) - : undefined, - BurstablePerformance: __expectString(output.BurstablePerformance), - CpuManufacturers: - output.CpuManufacturers != null ? de_NonEmptyStringList(output.CpuManufacturers, context) : undefined, - ExcludedInstanceTypes: - output.ExcludedInstanceTypes != null ? de_NonEmptyStringList(output.ExcludedInstanceTypes, context) : undefined, - InstanceGenerations: - output.InstanceGenerations != null ? de_NonEmptyStringList(output.InstanceGenerations, context) : undefined, - LocalStorage: __expectString(output.LocalStorage), - LocalStorageTypes: - output.LocalStorageTypes != null ? de_NonEmptyStringList(output.LocalStorageTypes, context) : undefined, - MemoryGiBPerVCpu: - output.MemoryGiBPerVCpu != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails(output.MemoryGiBPerVCpu, context) - : undefined, - MemoryMiB: - output.MemoryMiB != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails(output.MemoryMiB, context) - : undefined, - NetworkInterfaceCount: - output.NetworkInterfaceCount != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails( - output.NetworkInterfaceCount, - context - ) - : undefined, - OnDemandMaxPricePercentageOverLowestPrice: __expectInt32(output.OnDemandMaxPricePercentageOverLowestPrice), - RequireHibernateSupport: __expectBoolean(output.RequireHibernateSupport), - SpotMaxPricePercentageOverLowestPrice: __expectInt32(output.SpotMaxPricePercentageOverLowestPrice), - TotalLocalStorageGB: - output.TotalLocalStorageGB != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails(output.TotalLocalStorageGB, context) - : undefined, - VCpuCount: - output.VCpuCount != null - ? de_AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails(output.VCpuCount, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails => { - return { - Max: __limitedParseDouble(output.Max), - Min: __limitedParseDouble(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails => { - return { - Max: __expectInt32(output.Max), - Min: __expectInt32(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails => { - return { - Max: __expectInt32(output.Max), - Min: __expectInt32(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails => { - return { - Max: __limitedParseDouble(output.Max), - Min: __limitedParseDouble(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails - */ -const de_AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails => { - return { - Max: __expectInt32(output.Max), - Min: __expectInt32(output.Min), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataLicenseSetDetails - */ -const de_AwsEc2LaunchTemplateDataLicenseSetDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataLicenseSetDetails => { - return { - LicenseConfigurationArn: __expectString(output.LicenseConfigurationArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataLicenseSetList - */ -const de_AwsEc2LaunchTemplateDataLicenseSetList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataLicenseSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataLicenseSetDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataMaintenanceOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataMaintenanceOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataMaintenanceOptionsDetails => { - return { - AutoRecovery: __expectString(output.AutoRecovery), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataMetadataOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataMetadataOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataMetadataOptionsDetails => { - return { - HttpEndpoint: __expectString(output.HttpEndpoint), - HttpProtocolIpv6: __expectString(output.HttpProtocolIpv6), - HttpPutResponseHopLimit: __expectInt32(output.HttpPutResponseHopLimit), - HttpTokens: __expectString(output.HttpTokens), - InstanceMetadataTags: __expectString(output.InstanceMetadataTags), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataMonitoringDetails - */ -const de_AwsEc2LaunchTemplateDataMonitoringDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataMonitoringDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails => { - return { - AssociateCarrierIpAddress: __expectBoolean(output.AssociateCarrierIpAddress), - AssociatePublicIpAddress: __expectBoolean(output.AssociatePublicIpAddress), - DeleteOnTermination: __expectBoolean(output.DeleteOnTermination), - Description: __expectString(output.Description), - DeviceIndex: __expectInt32(output.DeviceIndex), - Groups: output.Groups != null ? de_NonEmptyStringList(output.Groups, context) : undefined, - InterfaceType: __expectString(output.InterfaceType), - Ipv4PrefixCount: __expectInt32(output.Ipv4PrefixCount), - Ipv4Prefixes: - output.Ipv4Prefixes != null - ? de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList(output.Ipv4Prefixes, context) - : undefined, - Ipv6AddressCount: __expectInt32(output.Ipv6AddressCount), - Ipv6Addresses: - output.Ipv6Addresses != null - ? de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList(output.Ipv6Addresses, context) - : undefined, - Ipv6PrefixCount: __expectInt32(output.Ipv6PrefixCount), - Ipv6Prefixes: - output.Ipv6Prefixes != null - ? de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList(output.Ipv6Prefixes, context) - : undefined, - NetworkCardIndex: __expectInt32(output.NetworkCardIndex), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - PrivateIpAddress: __expectString(output.PrivateIpAddress), - PrivateIpAddresses: - output.PrivateIpAddresses != null - ? de_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList(output.PrivateIpAddresses, context) - : undefined, - SecondaryPrivateIpAddressCount: __expectInt32(output.SecondaryPrivateIpAddressCount), - SubnetId: __expectString(output.SubnetId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails => { - return { - Ipv4Prefix: __expectString(output.Ipv4Prefix), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails => { - return { - Ipv6Address: __expectString(output.Ipv6Address), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails => { - return { - Ipv6Prefix: __expectString(output.Ipv6Prefix), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetList - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails => { - return { - Primary: __expectBoolean(output.Primary), - PrivateIpAddress: __expectString(output.PrivateIpAddress), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList - */ -const de_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataPlacementDetails - */ -const de_AwsEc2LaunchTemplateDataPlacementDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataPlacementDetails => { - return { - Affinity: __expectString(output.Affinity), - AvailabilityZone: __expectString(output.AvailabilityZone), - GroupName: __expectString(output.GroupName), - HostId: __expectString(output.HostId), - HostResourceGroupArn: __expectString(output.HostResourceGroupArn), - PartitionNumber: __expectInt32(output.PartitionNumber), - SpreadDomain: __expectString(output.SpreadDomain), - Tenancy: __expectString(output.Tenancy), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails - */ -const de_AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails => { - return { - EnableResourceNameDnsAAAARecord: __expectBoolean(output.EnableResourceNameDnsAAAARecord), - EnableResourceNameDnsARecord: __expectBoolean(output.EnableResourceNameDnsARecord), - HostnameType: __expectString(output.HostnameType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2LaunchTemplateDetails - */ -const de_AwsEc2LaunchTemplateDetails = (output: any, context: __SerdeContext): AwsEc2LaunchTemplateDetails => { - return { - DefaultVersionNumber: __expectLong(output.DefaultVersionNumber), - Id: __expectString(output.Id), - LatestVersionNumber: __expectLong(output.LatestVersionNumber), - LaunchTemplateData: - output.LaunchTemplateData != null - ? de_AwsEc2LaunchTemplateDataDetails(output.LaunchTemplateData, context) - : undefined, - LaunchTemplateName: __expectString(output.LaunchTemplateName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkAclAssociation - */ -const de_AwsEc2NetworkAclAssociation = (output: any, context: __SerdeContext): AwsEc2NetworkAclAssociation => { - return { - NetworkAclAssociationId: __expectString(output.NetworkAclAssociationId), - NetworkAclId: __expectString(output.NetworkAclId), - SubnetId: __expectString(output.SubnetId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkAclAssociationList - */ -const de_AwsEc2NetworkAclAssociationList = (output: any, context: __SerdeContext): AwsEc2NetworkAclAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2NetworkAclAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkAclDetails - */ -const de_AwsEc2NetworkAclDetails = (output: any, context: __SerdeContext): AwsEc2NetworkAclDetails => { - return { - Associations: - output.Associations != null ? de_AwsEc2NetworkAclAssociationList(output.Associations, context) : undefined, - Entries: output.Entries != null ? de_AwsEc2NetworkAclEntryList(output.Entries, context) : undefined, - IsDefault: __expectBoolean(output.IsDefault), - NetworkAclId: __expectString(output.NetworkAclId), - OwnerId: __expectString(output.OwnerId), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkAclEntry - */ -const de_AwsEc2NetworkAclEntry = (output: any, context: __SerdeContext): AwsEc2NetworkAclEntry => { - return { - CidrBlock: __expectString(output.CidrBlock), - Egress: __expectBoolean(output.Egress), - IcmpTypeCode: output.IcmpTypeCode != null ? de_IcmpTypeCode(output.IcmpTypeCode, context) : undefined, - Ipv6CidrBlock: __expectString(output.Ipv6CidrBlock), - PortRange: output.PortRange != null ? de_PortRangeFromTo(output.PortRange, context) : undefined, - Protocol: __expectString(output.Protocol), - RuleAction: __expectString(output.RuleAction), - RuleNumber: __expectInt32(output.RuleNumber), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkAclEntryList - */ -const de_AwsEc2NetworkAclEntryList = (output: any, context: __SerdeContext): AwsEc2NetworkAclEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2NetworkAclEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfaceAttachment - */ -const de_AwsEc2NetworkInterfaceAttachment = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfaceAttachment => { - return { - AttachTime: __expectString(output.AttachTime), - AttachmentId: __expectString(output.AttachmentId), - DeleteOnTermination: __expectBoolean(output.DeleteOnTermination), - DeviceIndex: __expectInt32(output.DeviceIndex), - InstanceId: __expectString(output.InstanceId), - InstanceOwnerId: __expectString(output.InstanceOwnerId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfaceDetails - */ -const de_AwsEc2NetworkInterfaceDetails = (output: any, context: __SerdeContext): AwsEc2NetworkInterfaceDetails => { - return { - Attachment: output.Attachment != null ? de_AwsEc2NetworkInterfaceAttachment(output.Attachment, context) : undefined, - IpV6Addresses: - output.IpV6Addresses != null - ? de_AwsEc2NetworkInterfaceIpV6AddressList(output.IpV6Addresses, context) - : undefined, - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - PrivateIpAddresses: - output.PrivateIpAddresses != null - ? de_AwsEc2NetworkInterfacePrivateIpAddressList(output.PrivateIpAddresses, context) - : undefined, - PublicDnsName: __expectString(output.PublicDnsName), - PublicIp: __expectString(output.PublicIp), - SecurityGroups: - output.SecurityGroups != null - ? de_AwsEc2NetworkInterfaceSecurityGroupList(output.SecurityGroups, context) - : undefined, - SourceDestCheck: __expectBoolean(output.SourceDestCheck), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfaceIpV6AddressDetail - */ -const de_AwsEc2NetworkInterfaceIpV6AddressDetail = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfaceIpV6AddressDetail => { - return { - IpV6Address: __expectString(output.IpV6Address), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfaceIpV6AddressList - */ -const de_AwsEc2NetworkInterfaceIpV6AddressList = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfaceIpV6AddressDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2NetworkInterfaceIpV6AddressDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfacePrivateIpAddressDetail - */ -const de_AwsEc2NetworkInterfacePrivateIpAddressDetail = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfacePrivateIpAddressDetail => { - return { - PrivateDnsName: __expectString(output.PrivateDnsName), - PrivateIpAddress: __expectString(output.PrivateIpAddress), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfacePrivateIpAddressList - */ -const de_AwsEc2NetworkInterfacePrivateIpAddressList = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfacePrivateIpAddressDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2NetworkInterfacePrivateIpAddressDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfaceSecurityGroup - */ -const de_AwsEc2NetworkInterfaceSecurityGroup = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfaceSecurityGroup => { - return { - GroupId: __expectString(output.GroupId), - GroupName: __expectString(output.GroupName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2NetworkInterfaceSecurityGroupList - */ -const de_AwsEc2NetworkInterfaceSecurityGroupList = ( - output: any, - context: __SerdeContext -): AwsEc2NetworkInterfaceSecurityGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2NetworkInterfaceSecurityGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2RouteTableDetails - */ -const de_AwsEc2RouteTableDetails = (output: any, context: __SerdeContext): AwsEc2RouteTableDetails => { - return { - AssociationSet: output.AssociationSet != null ? de_AssociationSetList(output.AssociationSet, context) : undefined, - OwnerId: __expectString(output.OwnerId), - PropagatingVgwSet: - output.PropagatingVgwSet != null ? de_PropagatingVgwSetList(output.PropagatingVgwSet, context) : undefined, - RouteSet: output.RouteSet != null ? de_RouteSetList(output.RouteSet, context) : undefined, - RouteTableId: __expectString(output.RouteTableId), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupDetails - */ -const de_AwsEc2SecurityGroupDetails = (output: any, context: __SerdeContext): AwsEc2SecurityGroupDetails => { - return { - GroupId: __expectString(output.GroupId), - GroupName: __expectString(output.GroupName), - IpPermissions: - output.IpPermissions != null ? de_AwsEc2SecurityGroupIpPermissionList(output.IpPermissions, context) : undefined, - IpPermissionsEgress: - output.IpPermissionsEgress != null - ? de_AwsEc2SecurityGroupIpPermissionList(output.IpPermissionsEgress, context) - : undefined, - OwnerId: __expectString(output.OwnerId), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupIpPermission - */ -const de_AwsEc2SecurityGroupIpPermission = (output: any, context: __SerdeContext): AwsEc2SecurityGroupIpPermission => { - return { - FromPort: __expectInt32(output.FromPort), - IpProtocol: __expectString(output.IpProtocol), - IpRanges: output.IpRanges != null ? de_AwsEc2SecurityGroupIpRangeList(output.IpRanges, context) : undefined, - Ipv6Ranges: output.Ipv6Ranges != null ? de_AwsEc2SecurityGroupIpv6RangeList(output.Ipv6Ranges, context) : undefined, - PrefixListIds: - output.PrefixListIds != null ? de_AwsEc2SecurityGroupPrefixListIdList(output.PrefixListIds, context) : undefined, - ToPort: __expectInt32(output.ToPort), - UserIdGroupPairs: - output.UserIdGroupPairs != null - ? de_AwsEc2SecurityGroupUserIdGroupPairList(output.UserIdGroupPairs, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupIpPermissionList - */ -const de_AwsEc2SecurityGroupIpPermissionList = ( - output: any, - context: __SerdeContext -): AwsEc2SecurityGroupIpPermission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2SecurityGroupIpPermission(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupIpRange - */ -const de_AwsEc2SecurityGroupIpRange = (output: any, context: __SerdeContext): AwsEc2SecurityGroupIpRange => { - return { - CidrIp: __expectString(output.CidrIp), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupIpRangeList - */ -const de_AwsEc2SecurityGroupIpRangeList = (output: any, context: __SerdeContext): AwsEc2SecurityGroupIpRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2SecurityGroupIpRange(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupIpv6Range - */ -const de_AwsEc2SecurityGroupIpv6Range = (output: any, context: __SerdeContext): AwsEc2SecurityGroupIpv6Range => { - return { - CidrIpv6: __expectString(output.CidrIpv6), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupIpv6RangeList - */ -const de_AwsEc2SecurityGroupIpv6RangeList = (output: any, context: __SerdeContext): AwsEc2SecurityGroupIpv6Range[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2SecurityGroupIpv6Range(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupPrefixListId - */ -const de_AwsEc2SecurityGroupPrefixListId = (output: any, context: __SerdeContext): AwsEc2SecurityGroupPrefixListId => { - return { - PrefixListId: __expectString(output.PrefixListId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupPrefixListIdList - */ -const de_AwsEc2SecurityGroupPrefixListIdList = ( - output: any, - context: __SerdeContext -): AwsEc2SecurityGroupPrefixListId[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2SecurityGroupPrefixListId(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupUserIdGroupPair - */ -const de_AwsEc2SecurityGroupUserIdGroupPair = ( - output: any, - context: __SerdeContext -): AwsEc2SecurityGroupUserIdGroupPair => { - return { - GroupId: __expectString(output.GroupId), - GroupName: __expectString(output.GroupName), - PeeringStatus: __expectString(output.PeeringStatus), - UserId: __expectString(output.UserId), - VpcId: __expectString(output.VpcId), - VpcPeeringConnectionId: __expectString(output.VpcPeeringConnectionId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2SecurityGroupUserIdGroupPairList - */ -const de_AwsEc2SecurityGroupUserIdGroupPairList = ( - output: any, - context: __SerdeContext -): AwsEc2SecurityGroupUserIdGroupPair[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2SecurityGroupUserIdGroupPair(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2SubnetDetails - */ -const de_AwsEc2SubnetDetails = (output: any, context: __SerdeContext): AwsEc2SubnetDetails => { - return { - AssignIpv6AddressOnCreation: __expectBoolean(output.AssignIpv6AddressOnCreation), - AvailabilityZone: __expectString(output.AvailabilityZone), - AvailabilityZoneId: __expectString(output.AvailabilityZoneId), - AvailableIpAddressCount: __expectInt32(output.AvailableIpAddressCount), - CidrBlock: __expectString(output.CidrBlock), - DefaultForAz: __expectBoolean(output.DefaultForAz), - Ipv6CidrBlockAssociationSet: - output.Ipv6CidrBlockAssociationSet != null - ? de_Ipv6CidrBlockAssociationList(output.Ipv6CidrBlockAssociationSet, context) - : undefined, - MapPublicIpOnLaunch: __expectBoolean(output.MapPublicIpOnLaunch), - OwnerId: __expectString(output.OwnerId), - State: __expectString(output.State), - SubnetArn: __expectString(output.SubnetArn), - SubnetId: __expectString(output.SubnetId), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2TransitGatewayDetails - */ -const de_AwsEc2TransitGatewayDetails = (output: any, context: __SerdeContext): AwsEc2TransitGatewayDetails => { - return { - AmazonSideAsn: __expectInt32(output.AmazonSideAsn), - AssociationDefaultRouteTableId: __expectString(output.AssociationDefaultRouteTableId), - AutoAcceptSharedAttachments: __expectString(output.AutoAcceptSharedAttachments), - DefaultRouteTableAssociation: __expectString(output.DefaultRouteTableAssociation), - DefaultRouteTablePropagation: __expectString(output.DefaultRouteTablePropagation), - Description: __expectString(output.Description), - DnsSupport: __expectString(output.DnsSupport), - Id: __expectString(output.Id), - MulticastSupport: __expectString(output.MulticastSupport), - PropagationDefaultRouteTableId: __expectString(output.PropagationDefaultRouteTableId), - TransitGatewayCidrBlocks: - output.TransitGatewayCidrBlocks != null - ? de_NonEmptyStringList(output.TransitGatewayCidrBlocks, context) - : undefined, - VpnEcmpSupport: __expectString(output.VpnEcmpSupport), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VolumeAttachment - */ -const de_AwsEc2VolumeAttachment = (output: any, context: __SerdeContext): AwsEc2VolumeAttachment => { - return { - AttachTime: __expectString(output.AttachTime), - DeleteOnTermination: __expectBoolean(output.DeleteOnTermination), - InstanceId: __expectString(output.InstanceId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VolumeAttachmentList - */ -const de_AwsEc2VolumeAttachmentList = (output: any, context: __SerdeContext): AwsEc2VolumeAttachment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2VolumeAttachment(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2VolumeDetails - */ -const de_AwsEc2VolumeDetails = (output: any, context: __SerdeContext): AwsEc2VolumeDetails => { - return { - Attachments: output.Attachments != null ? de_AwsEc2VolumeAttachmentList(output.Attachments, context) : undefined, - CreateTime: __expectString(output.CreateTime), - DeviceName: __expectString(output.DeviceName), - Encrypted: __expectBoolean(output.Encrypted), - KmsKeyId: __expectString(output.KmsKeyId), - Size: __expectInt32(output.Size), - SnapshotId: __expectString(output.SnapshotId), - Status: __expectString(output.Status), - VolumeId: __expectString(output.VolumeId), - VolumeScanStatus: __expectString(output.VolumeScanStatus), - VolumeType: __expectString(output.VolumeType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcDetails - */ -const de_AwsEc2VpcDetails = (output: any, context: __SerdeContext): AwsEc2VpcDetails => { - return { - CidrBlockAssociationSet: - output.CidrBlockAssociationSet != null - ? de_CidrBlockAssociationList(output.CidrBlockAssociationSet, context) - : undefined, - DhcpOptionsId: __expectString(output.DhcpOptionsId), - Ipv6CidrBlockAssociationSet: - output.Ipv6CidrBlockAssociationSet != null - ? de_Ipv6CidrBlockAssociationList(output.Ipv6CidrBlockAssociationSet, context) - : undefined, - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcEndpointServiceDetails - */ -const de_AwsEc2VpcEndpointServiceDetails = (output: any, context: __SerdeContext): AwsEc2VpcEndpointServiceDetails => { - return { - AcceptanceRequired: __expectBoolean(output.AcceptanceRequired), - AvailabilityZones: - output.AvailabilityZones != null ? de_NonEmptyStringList(output.AvailabilityZones, context) : undefined, - BaseEndpointDnsNames: - output.BaseEndpointDnsNames != null ? de_NonEmptyStringList(output.BaseEndpointDnsNames, context) : undefined, - GatewayLoadBalancerArns: - output.GatewayLoadBalancerArns != null - ? de_NonEmptyStringList(output.GatewayLoadBalancerArns, context) - : undefined, - ManagesVpcEndpoints: __expectBoolean(output.ManagesVpcEndpoints), - NetworkLoadBalancerArns: - output.NetworkLoadBalancerArns != null - ? de_NonEmptyStringList(output.NetworkLoadBalancerArns, context) - : undefined, - PrivateDnsName: __expectString(output.PrivateDnsName), - ServiceId: __expectString(output.ServiceId), - ServiceName: __expectString(output.ServiceName), - ServiceState: __expectString(output.ServiceState), - ServiceType: - output.ServiceType != null ? de_AwsEc2VpcEndpointServiceServiceTypeList(output.ServiceType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcEndpointServiceServiceTypeDetails - */ -const de_AwsEc2VpcEndpointServiceServiceTypeDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpcEndpointServiceServiceTypeDetails => { - return { - ServiceType: __expectString(output.ServiceType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcEndpointServiceServiceTypeList - */ -const de_AwsEc2VpcEndpointServiceServiceTypeList = ( - output: any, - context: __SerdeContext -): AwsEc2VpcEndpointServiceServiceTypeDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2VpcEndpointServiceServiceTypeDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcPeeringConnectionDetails - */ -const de_AwsEc2VpcPeeringConnectionDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpcPeeringConnectionDetails => { - return { - AccepterVpcInfo: - output.AccepterVpcInfo != null - ? de_AwsEc2VpcPeeringConnectionVpcInfoDetails(output.AccepterVpcInfo, context) - : undefined, - ExpirationTime: __expectString(output.ExpirationTime), - RequesterVpcInfo: - output.RequesterVpcInfo != null - ? de_AwsEc2VpcPeeringConnectionVpcInfoDetails(output.RequesterVpcInfo, context) - : undefined, - Status: output.Status != null ? de_AwsEc2VpcPeeringConnectionStatusDetails(output.Status, context) : undefined, - VpcPeeringConnectionId: __expectString(output.VpcPeeringConnectionId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcPeeringConnectionStatusDetails - */ -const de_AwsEc2VpcPeeringConnectionStatusDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpcPeeringConnectionStatusDetails => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpcPeeringConnectionVpcInfoDetails - */ -const de_AwsEc2VpcPeeringConnectionVpcInfoDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpcPeeringConnectionVpcInfoDetails => { - return { - CidrBlock: __expectString(output.CidrBlock), - CidrBlockSet: output.CidrBlockSet != null ? de_VpcInfoCidrBlockSetList(output.CidrBlockSet, context) : undefined, - Ipv6CidrBlockSet: - output.Ipv6CidrBlockSet != null ? de_VpcInfoIpv6CidrBlockSetList(output.Ipv6CidrBlockSet, context) : undefined, - OwnerId: __expectString(output.OwnerId), - PeeringOptions: - output.PeeringOptions != null ? de_VpcInfoPeeringOptionsDetails(output.PeeringOptions, context) : undefined, - Region: __expectString(output.Region), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionDetails - */ -const de_AwsEc2VpnConnectionDetails = (output: any, context: __SerdeContext): AwsEc2VpnConnectionDetails => { - return { - Category: __expectString(output.Category), - CustomerGatewayConfiguration: __expectString(output.CustomerGatewayConfiguration), - CustomerGatewayId: __expectString(output.CustomerGatewayId), - Options: output.Options != null ? de_AwsEc2VpnConnectionOptionsDetails(output.Options, context) : undefined, - Routes: output.Routes != null ? de_AwsEc2VpnConnectionRoutesList(output.Routes, context) : undefined, - State: __expectString(output.State), - TransitGatewayId: __expectString(output.TransitGatewayId), - Type: __expectString(output.Type), - VgwTelemetry: - output.VgwTelemetry != null ? de_AwsEc2VpnConnectionVgwTelemetryList(output.VgwTelemetry, context) : undefined, - VpnConnectionId: __expectString(output.VpnConnectionId), - VpnGatewayId: __expectString(output.VpnGatewayId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionOptionsDetails - */ -const de_AwsEc2VpnConnectionOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpnConnectionOptionsDetails => { - return { - StaticRoutesOnly: __expectBoolean(output.StaticRoutesOnly), - TunnelOptions: - output.TunnelOptions != null - ? de_AwsEc2VpnConnectionOptionsTunnelOptionsList(output.TunnelOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionOptionsTunnelOptionsDetails - */ -const de_AwsEc2VpnConnectionOptionsTunnelOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpnConnectionOptionsTunnelOptionsDetails => { - return { - DpdTimeoutSeconds: __expectInt32(output.DpdTimeoutSeconds), - IkeVersions: output.IkeVersions != null ? de_NonEmptyStringList(output.IkeVersions, context) : undefined, - OutsideIpAddress: __expectString(output.OutsideIpAddress), - Phase1DhGroupNumbers: - output.Phase1DhGroupNumbers != null ? de_IntegerList(output.Phase1DhGroupNumbers, context) : undefined, - Phase1EncryptionAlgorithms: - output.Phase1EncryptionAlgorithms != null - ? de_NonEmptyStringList(output.Phase1EncryptionAlgorithms, context) - : undefined, - Phase1IntegrityAlgorithms: - output.Phase1IntegrityAlgorithms != null - ? de_NonEmptyStringList(output.Phase1IntegrityAlgorithms, context) - : undefined, - Phase1LifetimeSeconds: __expectInt32(output.Phase1LifetimeSeconds), - Phase2DhGroupNumbers: - output.Phase2DhGroupNumbers != null ? de_IntegerList(output.Phase2DhGroupNumbers, context) : undefined, - Phase2EncryptionAlgorithms: - output.Phase2EncryptionAlgorithms != null - ? de_NonEmptyStringList(output.Phase2EncryptionAlgorithms, context) - : undefined, - Phase2IntegrityAlgorithms: - output.Phase2IntegrityAlgorithms != null - ? de_NonEmptyStringList(output.Phase2IntegrityAlgorithms, context) - : undefined, - Phase2LifetimeSeconds: __expectInt32(output.Phase2LifetimeSeconds), - PreSharedKey: __expectString(output.PreSharedKey), - RekeyFuzzPercentage: __expectInt32(output.RekeyFuzzPercentage), - RekeyMarginTimeSeconds: __expectInt32(output.RekeyMarginTimeSeconds), - ReplayWindowSize: __expectInt32(output.ReplayWindowSize), - TunnelInsideCidr: __expectString(output.TunnelInsideCidr), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionOptionsTunnelOptionsList - */ -const de_AwsEc2VpnConnectionOptionsTunnelOptionsList = ( - output: any, - context: __SerdeContext -): AwsEc2VpnConnectionOptionsTunnelOptionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2VpnConnectionOptionsTunnelOptionsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionRoutesDetails - */ -const de_AwsEc2VpnConnectionRoutesDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpnConnectionRoutesDetails => { - return { - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionRoutesList - */ -const de_AwsEc2VpnConnectionRoutesList = (output: any, context: __SerdeContext): AwsEc2VpnConnectionRoutesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2VpnConnectionRoutesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionVgwTelemetryDetails - */ -const de_AwsEc2VpnConnectionVgwTelemetryDetails = ( - output: any, - context: __SerdeContext -): AwsEc2VpnConnectionVgwTelemetryDetails => { - return { - AcceptedRouteCount: __expectInt32(output.AcceptedRouteCount), - CertificateArn: __expectString(output.CertificateArn), - LastStatusChange: __expectString(output.LastStatusChange), - OutsideIpAddress: __expectString(output.OutsideIpAddress), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEc2VpnConnectionVgwTelemetryList - */ -const de_AwsEc2VpnConnectionVgwTelemetryList = ( - output: any, - context: __SerdeContext -): AwsEc2VpnConnectionVgwTelemetryDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEc2VpnConnectionVgwTelemetryDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcrContainerImageDetails - */ -const de_AwsEcrContainerImageDetails = (output: any, context: __SerdeContext): AwsEcrContainerImageDetails => { - return { - Architecture: __expectString(output.Architecture), - ImageDigest: __expectString(output.ImageDigest), - ImagePublishedAt: __expectString(output.ImagePublishedAt), - ImageTags: output.ImageTags != null ? de_NonEmptyStringList(output.ImageTags, context) : undefined, - RegistryId: __expectString(output.RegistryId), - RepositoryName: __expectString(output.RepositoryName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcrRepositoryDetails - */ -const de_AwsEcrRepositoryDetails = (output: any, context: __SerdeContext): AwsEcrRepositoryDetails => { - return { - Arn: __expectString(output.Arn), - ImageScanningConfiguration: - output.ImageScanningConfiguration != null - ? de_AwsEcrRepositoryImageScanningConfigurationDetails(output.ImageScanningConfiguration, context) - : undefined, - ImageTagMutability: __expectString(output.ImageTagMutability), - LifecyclePolicy: - output.LifecyclePolicy != null - ? de_AwsEcrRepositoryLifecyclePolicyDetails(output.LifecyclePolicy, context) - : undefined, - RepositoryName: __expectString(output.RepositoryName), - RepositoryPolicyText: __expectString(output.RepositoryPolicyText), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcrRepositoryImageScanningConfigurationDetails - */ -const de_AwsEcrRepositoryImageScanningConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcrRepositoryImageScanningConfigurationDetails => { - return { - ScanOnPush: __expectBoolean(output.ScanOnPush), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcrRepositoryLifecyclePolicyDetails - */ -const de_AwsEcrRepositoryLifecyclePolicyDetails = ( - output: any, - context: __SerdeContext -): AwsEcrRepositoryLifecyclePolicyDetails => { - return { - LifecyclePolicyText: __expectString(output.LifecyclePolicyText), - RegistryId: __expectString(output.RegistryId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterClusterSettingsDetails - */ -const de_AwsEcsClusterClusterSettingsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsClusterClusterSettingsDetails => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterClusterSettingsList - */ -const de_AwsEcsClusterClusterSettingsList = ( - output: any, - context: __SerdeContext -): AwsEcsClusterClusterSettingsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsClusterClusterSettingsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterConfigurationDetails - */ -const de_AwsEcsClusterConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsClusterConfigurationDetails => { - return { - ExecuteCommandConfiguration: - output.ExecuteCommandConfiguration != null - ? de_AwsEcsClusterConfigurationExecuteCommandConfigurationDetails(output.ExecuteCommandConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterConfigurationExecuteCommandConfigurationDetails - */ -const de_AwsEcsClusterConfigurationExecuteCommandConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsClusterConfigurationExecuteCommandConfigurationDetails => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - LogConfiguration: - output.LogConfiguration != null - ? de_AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails( - output.LogConfiguration, - context - ) - : undefined, - Logging: __expectString(output.Logging), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails - */ -const de_AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails => { - return { - CloudWatchEncryptionEnabled: __expectBoolean(output.CloudWatchEncryptionEnabled), - CloudWatchLogGroupName: __expectString(output.CloudWatchLogGroupName), - S3BucketName: __expectString(output.S3BucketName), - S3EncryptionEnabled: __expectBoolean(output.S3EncryptionEnabled), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterDefaultCapacityProviderStrategyDetails - */ -const de_AwsEcsClusterDefaultCapacityProviderStrategyDetails = ( - output: any, - context: __SerdeContext -): AwsEcsClusterDefaultCapacityProviderStrategyDetails => { - return { - Base: __expectInt32(output.Base), - CapacityProvider: __expectString(output.CapacityProvider), - Weight: __expectInt32(output.Weight), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterDefaultCapacityProviderStrategyList - */ -const de_AwsEcsClusterDefaultCapacityProviderStrategyList = ( - output: any, - context: __SerdeContext -): AwsEcsClusterDefaultCapacityProviderStrategyDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsClusterDefaultCapacityProviderStrategyDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsClusterDetails - */ -const de_AwsEcsClusterDetails = (output: any, context: __SerdeContext): AwsEcsClusterDetails => { - return { - ActiveServicesCount: __expectInt32(output.ActiveServicesCount), - CapacityProviders: - output.CapacityProviders != null ? de_NonEmptyStringList(output.CapacityProviders, context) : undefined, - ClusterArn: __expectString(output.ClusterArn), - ClusterName: __expectString(output.ClusterName), - ClusterSettings: - output.ClusterSettings != null ? de_AwsEcsClusterClusterSettingsList(output.ClusterSettings, context) : undefined, - Configuration: - output.Configuration != null ? de_AwsEcsClusterConfigurationDetails(output.Configuration, context) : undefined, - DefaultCapacityProviderStrategy: - output.DefaultCapacityProviderStrategy != null - ? de_AwsEcsClusterDefaultCapacityProviderStrategyList(output.DefaultCapacityProviderStrategy, context) - : undefined, - RegisteredContainerInstancesCount: __expectInt32(output.RegisteredContainerInstancesCount), - RunningTasksCount: __expectInt32(output.RunningTasksCount), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsContainerDetails - */ -const de_AwsEcsContainerDetails = (output: any, context: __SerdeContext): AwsEcsContainerDetails => { - return { - Image: __expectString(output.Image), - MountPoints: output.MountPoints != null ? de_AwsMountPointList(output.MountPoints, context) : undefined, - Name: __expectString(output.Name), - Privileged: __expectBoolean(output.Privileged), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsContainerDetailsList - */ -const de_AwsEcsContainerDetailsList = (output: any, context: __SerdeContext): AwsEcsContainerDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsContainerDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceCapacityProviderStrategyDetails - */ -const de_AwsEcsServiceCapacityProviderStrategyDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceCapacityProviderStrategyDetails => { - return { - Base: __expectInt32(output.Base), - CapacityProvider: __expectString(output.CapacityProvider), - Weight: __expectInt32(output.Weight), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceCapacityProviderStrategyList - */ -const de_AwsEcsServiceCapacityProviderStrategyList = ( - output: any, - context: __SerdeContext -): AwsEcsServiceCapacityProviderStrategyDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsServiceCapacityProviderStrategyDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails - */ -const de_AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails => { - return { - Enable: __expectBoolean(output.Enable), - Rollback: __expectBoolean(output.Rollback), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceDeploymentConfigurationDetails - */ -const de_AwsEcsServiceDeploymentConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceDeploymentConfigurationDetails => { - return { - DeploymentCircuitBreaker: - output.DeploymentCircuitBreaker != null - ? de_AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails( - output.DeploymentCircuitBreaker, - context - ) - : undefined, - MaximumPercent: __expectInt32(output.MaximumPercent), - MinimumHealthyPercent: __expectInt32(output.MinimumHealthyPercent), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceDeploymentControllerDetails - */ -const de_AwsEcsServiceDeploymentControllerDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceDeploymentControllerDetails => { - return { - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceDetails - */ -const de_AwsEcsServiceDetails = (output: any, context: __SerdeContext): AwsEcsServiceDetails => { - return { - CapacityProviderStrategy: - output.CapacityProviderStrategy != null - ? de_AwsEcsServiceCapacityProviderStrategyList(output.CapacityProviderStrategy, context) - : undefined, - Cluster: __expectString(output.Cluster), - DeploymentConfiguration: - output.DeploymentConfiguration != null - ? de_AwsEcsServiceDeploymentConfigurationDetails(output.DeploymentConfiguration, context) - : undefined, - DeploymentController: - output.DeploymentController != null - ? de_AwsEcsServiceDeploymentControllerDetails(output.DeploymentController, context) - : undefined, - DesiredCount: __expectInt32(output.DesiredCount), - EnableEcsManagedTags: __expectBoolean(output.EnableEcsManagedTags), - EnableExecuteCommand: __expectBoolean(output.EnableExecuteCommand), - HealthCheckGracePeriodSeconds: __expectInt32(output.HealthCheckGracePeriodSeconds), - LaunchType: __expectString(output.LaunchType), - LoadBalancers: - output.LoadBalancers != null ? de_AwsEcsServiceLoadBalancersList(output.LoadBalancers, context) : undefined, - Name: __expectString(output.Name), - NetworkConfiguration: - output.NetworkConfiguration != null - ? de_AwsEcsServiceNetworkConfigurationDetails(output.NetworkConfiguration, context) - : undefined, - PlacementConstraints: - output.PlacementConstraints != null - ? de_AwsEcsServicePlacementConstraintsList(output.PlacementConstraints, context) - : undefined, - PlacementStrategies: - output.PlacementStrategies != null - ? de_AwsEcsServicePlacementStrategiesList(output.PlacementStrategies, context) - : undefined, - PlatformVersion: __expectString(output.PlatformVersion), - PropagateTags: __expectString(output.PropagateTags), - Role: __expectString(output.Role), - SchedulingStrategy: __expectString(output.SchedulingStrategy), - ServiceArn: __expectString(output.ServiceArn), - ServiceName: __expectString(output.ServiceName), - ServiceRegistries: - output.ServiceRegistries != null - ? de_AwsEcsServiceServiceRegistriesList(output.ServiceRegistries, context) - : undefined, - TaskDefinition: __expectString(output.TaskDefinition), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceLoadBalancersDetails - */ -const de_AwsEcsServiceLoadBalancersDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceLoadBalancersDetails => { - return { - ContainerName: __expectString(output.ContainerName), - ContainerPort: __expectInt32(output.ContainerPort), - LoadBalancerName: __expectString(output.LoadBalancerName), - TargetGroupArn: __expectString(output.TargetGroupArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceLoadBalancersList - */ -const de_AwsEcsServiceLoadBalancersList = ( - output: any, - context: __SerdeContext -): AwsEcsServiceLoadBalancersDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsServiceLoadBalancersDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails - */ -const de_AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails => { - return { - AssignPublicIp: __expectString(output.AssignPublicIp), - SecurityGroups: output.SecurityGroups != null ? de_NonEmptyStringList(output.SecurityGroups, context) : undefined, - Subnets: output.Subnets != null ? de_NonEmptyStringList(output.Subnets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceNetworkConfigurationDetails - */ -const de_AwsEcsServiceNetworkConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceNetworkConfigurationDetails => { - return { - AwsVpcConfiguration: - output.AwsVpcConfiguration != null - ? de_AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails(output.AwsVpcConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServicePlacementConstraintsDetails - */ -const de_AwsEcsServicePlacementConstraintsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServicePlacementConstraintsDetails => { - return { - Expression: __expectString(output.Expression), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServicePlacementConstraintsList - */ -const de_AwsEcsServicePlacementConstraintsList = ( - output: any, - context: __SerdeContext -): AwsEcsServicePlacementConstraintsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsServicePlacementConstraintsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsServicePlacementStrategiesDetails - */ -const de_AwsEcsServicePlacementStrategiesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServicePlacementStrategiesDetails => { - return { - Field: __expectString(output.Field), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServicePlacementStrategiesList - */ -const de_AwsEcsServicePlacementStrategiesList = ( - output: any, - context: __SerdeContext -): AwsEcsServicePlacementStrategiesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsServicePlacementStrategiesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceServiceRegistriesDetails - */ -const de_AwsEcsServiceServiceRegistriesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsServiceServiceRegistriesDetails => { - return { - ContainerName: __expectString(output.ContainerName), - ContainerPort: __expectInt32(output.ContainerPort), - Port: __expectInt32(output.Port), - RegistryArn: __expectString(output.RegistryArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsServiceServiceRegistriesList - */ -const de_AwsEcsServiceServiceRegistriesList = ( - output: any, - context: __SerdeContext -): AwsEcsServiceServiceRegistriesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsServiceServiceRegistriesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails => { - return { - Condition: __expectString(output.Condition), - ContainerName: __expectString(output.ContainerName), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsDependsOnList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsDependsOnList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsDetails => { - return { - Command: output.Command != null ? de_NonEmptyStringList(output.Command, context) : undefined, - Cpu: __expectInt32(output.Cpu), - DependsOn: - output.DependsOn != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsDependsOnList(output.DependsOn, context) - : undefined, - DisableNetworking: __expectBoolean(output.DisableNetworking), - DnsSearchDomains: - output.DnsSearchDomains != null ? de_NonEmptyStringList(output.DnsSearchDomains, context) : undefined, - DnsServers: output.DnsServers != null ? de_NonEmptyStringList(output.DnsServers, context) : undefined, - DockerLabels: output.DockerLabels != null ? de_FieldMap(output.DockerLabels, context) : undefined, - DockerSecurityOptions: - output.DockerSecurityOptions != null ? de_NonEmptyStringList(output.DockerSecurityOptions, context) : undefined, - EntryPoint: output.EntryPoint != null ? de_NonEmptyStringList(output.EntryPoint, context) : undefined, - Environment: - output.Environment != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList(output.Environment, context) - : undefined, - EnvironmentFiles: - output.EnvironmentFiles != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList(output.EnvironmentFiles, context) - : undefined, - Essential: __expectBoolean(output.Essential), - ExtraHosts: - output.ExtraHosts != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList(output.ExtraHosts, context) - : undefined, - FirelensConfiguration: - output.FirelensConfiguration != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails(output.FirelensConfiguration, context) - : undefined, - HealthCheck: - output.HealthCheck != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails(output.HealthCheck, context) - : undefined, - Hostname: __expectString(output.Hostname), - Image: __expectString(output.Image), - Interactive: __expectBoolean(output.Interactive), - Links: output.Links != null ? de_NonEmptyStringList(output.Links, context) : undefined, - LinuxParameters: - output.LinuxParameters != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails(output.LinuxParameters, context) - : undefined, - LogConfiguration: - output.LogConfiguration != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails(output.LogConfiguration, context) - : undefined, - Memory: __expectInt32(output.Memory), - MemoryReservation: __expectInt32(output.MemoryReservation), - MountPoints: - output.MountPoints != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsMountPointsList(output.MountPoints, context) - : undefined, - Name: __expectString(output.Name), - PortMappings: - output.PortMappings != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList(output.PortMappings, context) - : undefined, - Privileged: __expectBoolean(output.Privileged), - PseudoTerminal: __expectBoolean(output.PseudoTerminal), - ReadonlyRootFilesystem: __expectBoolean(output.ReadonlyRootFilesystem), - RepositoryCredentials: - output.RepositoryCredentials != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails(output.RepositoryCredentials, context) - : undefined, - ResourceRequirements: - output.ResourceRequirements != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList(output.ResourceRequirements, context) - : undefined, - Secrets: - output.Secrets != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsSecretsList(output.Secrets, context) - : undefined, - StartTimeout: __expectInt32(output.StartTimeout), - StopTimeout: __expectInt32(output.StopTimeout), - SystemControls: - output.SystemControls != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList(output.SystemControls, context) - : undefined, - Ulimits: - output.Ulimits != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsUlimitsList(output.Ulimits, context) - : undefined, - User: __expectString(output.User), - VolumesFrom: - output.VolumesFrom != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList(output.VolumesFrom, context) - : undefined, - WorkingDirectory: __expectString(output.WorkingDirectory), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails => { - return { - Hostname: __expectString(output.Hostname), - IpAddress: __expectString(output.IpAddress), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails => { - return { - Options: output.Options != null ? de_FieldMap(output.Options, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails => { - return { - Command: output.Command != null ? de_NonEmptyStringList(output.Command, context) : undefined, - Interval: __expectInt32(output.Interval), - Retries: __expectInt32(output.Retries), - StartPeriod: __expectInt32(output.StartPeriod), - Timeout: __expectInt32(output.Timeout), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails => { - return { - Add: output.Add != null ? de_NonEmptyStringList(output.Add, context) : undefined, - Drop: output.Drop != null ? de_NonEmptyStringList(output.Drop, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails => { - return { - Capabilities: - output.Capabilities != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails(output.Capabilities, context) - : undefined, - Devices: - output.Devices != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList(output.Devices, context) - : undefined, - InitProcessEnabled: __expectBoolean(output.InitProcessEnabled), - MaxSwap: __expectInt32(output.MaxSwap), - SharedMemorySize: __expectInt32(output.SharedMemorySize), - Swappiness: __expectInt32(output.Swappiness), - Tmpfs: - output.Tmpfs != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList(output.Tmpfs, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails => { - return { - ContainerPath: __expectString(output.ContainerPath), - HostPath: __expectString(output.HostPath), - Permissions: output.Permissions != null ? de_NonEmptyStringList(output.Permissions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails => { - return { - ContainerPath: __expectString(output.ContainerPath), - MountOptions: output.MountOptions != null ? de_NonEmptyStringList(output.MountOptions, context) : undefined, - Size: __expectInt32(output.Size), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails => { - return { - LogDriver: __expectString(output.LogDriver), - Options: output.Options != null ? de_FieldMap(output.Options, context) : undefined, - SecretOptions: - output.SecretOptions != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList(output.SecretOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails => { - return { - Name: __expectString(output.Name), - ValueFrom: __expectString(output.ValueFrom), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails => { - return { - ContainerPath: __expectString(output.ContainerPath), - ReadOnly: __expectBoolean(output.ReadOnly), - SourceVolume: __expectString(output.SourceVolume), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsMountPointsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsMountPointsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails => { - return { - ContainerPort: __expectInt32(output.ContainerPort), - HostPort: __expectInt32(output.HostPort), - Protocol: __expectString(output.Protocol), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails => { - return { - CredentialsParameter: __expectString(output.CredentialsParameter), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails => { - return { - Name: __expectString(output.Name), - ValueFrom: __expectString(output.ValueFrom), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSecretsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsSecretsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails => { - return { - Namespace: __expectString(output.Namespace), - Value: __expectString(output.Value), - } as any; -}; +// se_AwsLambdaFunctionCode omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails(entry, context); - }); - return retVal; -}; +// se_AwsLambdaFunctionDeadLetterConfig omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails => { - return { - HardLimit: __expectInt32(output.HardLimit), - Name: __expectString(output.Name), - SoftLimit: __expectInt32(output.SoftLimit), - } as any; -}; +// se_AwsLambdaFunctionDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsUlimitsList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsUlimitsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails(entry, context); - }); - return retVal; -}; +// se_AwsLambdaFunctionEnvironment omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails => { - return { - ReadOnly: __expectBoolean(output.ReadOnly), - SourceContainer: __expectString(output.SourceContainer), - } as any; -}; +// se_AwsLambdaFunctionEnvironmentError omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList - */ -const de_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails(entry, context); - }); - return retVal; -}; +// se_AwsLambdaFunctionLayer omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionDetails - */ -const de_AwsEcsTaskDefinitionDetails = (output: any, context: __SerdeContext): AwsEcsTaskDefinitionDetails => { - return { - ContainerDefinitions: - output.ContainerDefinitions != null - ? de_AwsEcsTaskDefinitionContainerDefinitionsList(output.ContainerDefinitions, context) - : undefined, - Cpu: __expectString(output.Cpu), - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - Family: __expectString(output.Family), - InferenceAccelerators: - output.InferenceAccelerators != null - ? de_AwsEcsTaskDefinitionInferenceAcceleratorsList(output.InferenceAccelerators, context) - : undefined, - IpcMode: __expectString(output.IpcMode), - Memory: __expectString(output.Memory), - NetworkMode: __expectString(output.NetworkMode), - PidMode: __expectString(output.PidMode), - PlacementConstraints: - output.PlacementConstraints != null - ? de_AwsEcsTaskDefinitionPlacementConstraintsList(output.PlacementConstraints, context) - : undefined, - ProxyConfiguration: - output.ProxyConfiguration != null - ? de_AwsEcsTaskDefinitionProxyConfigurationDetails(output.ProxyConfiguration, context) - : undefined, - RequiresCompatibilities: - output.RequiresCompatibilities != null - ? de_NonEmptyStringList(output.RequiresCompatibilities, context) - : undefined, - TaskRoleArn: __expectString(output.TaskRoleArn), - Volumes: output.Volumes != null ? de_AwsEcsTaskDefinitionVolumesList(output.Volumes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionInferenceAcceleratorsDetails - */ -const de_AwsEcsTaskDefinitionInferenceAcceleratorsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionInferenceAcceleratorsDetails => { - return { - DeviceName: __expectString(output.DeviceName), - DeviceType: __expectString(output.DeviceType), - } as any; -}; +// se_AwsLambdaFunctionLayerList omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionInferenceAcceleratorsList - */ -const de_AwsEcsTaskDefinitionInferenceAcceleratorsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionInferenceAcceleratorsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionInferenceAcceleratorsDetails(entry, context); - }); - return retVal; -}; +// se_AwsLambdaFunctionTracingConfig omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionPlacementConstraintsDetails - */ -const de_AwsEcsTaskDefinitionPlacementConstraintsDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionPlacementConstraintsDetails => { - return { - Expression: __expectString(output.Expression), - Type: __expectString(output.Type), - } as any; -}; +// se_AwsLambdaFunctionVpcConfig omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionPlacementConstraintsList - */ -const de_AwsEcsTaskDefinitionPlacementConstraintsList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionPlacementConstraintsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionPlacementConstraintsDetails(entry, context); - }); - return retVal; -}; +// se_AwsLambdaLayerVersionDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionProxyConfigurationDetails - */ -const de_AwsEcsTaskDefinitionProxyConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionProxyConfigurationDetails => { - return { - ContainerName: __expectString(output.ContainerName), - ProxyConfigurationProperties: - output.ProxyConfigurationProperties != null - ? de_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList( - output.ProxyConfigurationProperties, - context - ) - : undefined, - Type: __expectString(output.Type), - } as any; -}; +// se_AwsMountPoint omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails - */ -const de_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// se_AwsMountPointList omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList - */ -const de_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails(entry, context); - }); - return retVal; -}; +// se_AwsNetworkFirewallFirewallDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionVolumesDetails - */ -const de_AwsEcsTaskDefinitionVolumesDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionVolumesDetails => { - return { - DockerVolumeConfiguration: - output.DockerVolumeConfiguration != null - ? de_AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails(output.DockerVolumeConfiguration, context) - : undefined, - EfsVolumeConfiguration: - output.EfsVolumeConfiguration != null - ? de_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails(output.EfsVolumeConfiguration, context) - : undefined, - Host: output.Host != null ? de_AwsEcsTaskDefinitionVolumesHostDetails(output.Host, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// se_AwsNetworkFirewallFirewallPolicyDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails - */ -const de_AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails => { - return { - Autoprovision: __expectBoolean(output.Autoprovision), - Driver: __expectString(output.Driver), - DriverOpts: output.DriverOpts != null ? de_FieldMap(output.DriverOpts, context) : undefined, - Labels: output.Labels != null ? de_FieldMap(output.Labels, context) : undefined, - Scope: __expectString(output.Scope), - } as any; -}; +// se_AwsNetworkFirewallFirewallSubnetMappingsDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails - */ -const de_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails => { - return { - AccessPointId: __expectString(output.AccessPointId), - Iam: __expectString(output.Iam), - } as any; -}; +// se_AwsNetworkFirewallFirewallSubnetMappingsList omitted. /** - * deserializeAws_restJson1AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails + * serializeAws_restJson1AwsNetworkFirewallRuleGroupDetails */ -const de_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails => { - return { - AuthorizationConfig: - output.AuthorizationConfig != null - ? de_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails( - output.AuthorizationConfig, - context - ) - : undefined, - FilesystemId: __expectString(output.FilesystemId), - RootDirectory: __expectString(output.RootDirectory), - TransitEncryption: __expectString(output.TransitEncryption), - TransitEncryptionPort: __expectInt32(output.TransitEncryptionPort), - } as any; -}; - -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionVolumesHostDetails - */ -const de_AwsEcsTaskDefinitionVolumesHostDetails = ( - output: any, +const se_AwsNetworkFirewallRuleGroupDetails = ( + input: AwsNetworkFirewallRuleGroupDetails, context: __SerdeContext -): AwsEcsTaskDefinitionVolumesHostDetails => { - return { - SourcePath: __expectString(output.SourcePath), - } as any; +): any => { + return take(input, { + Capacity: [], + Description: [], + RuleGroup: _json, + RuleGroupArn: [], + RuleGroupId: [], + RuleGroupName: [], + Type: [], + }); }; -/** - * deserializeAws_restJson1AwsEcsTaskDefinitionVolumesList - */ -const de_AwsEcsTaskDefinitionVolumesList = ( - output: any, - context: __SerdeContext -): AwsEcsTaskDefinitionVolumesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskDefinitionVolumesDetails(entry, context); - }); - return retVal; -}; +// se_AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskDetails - */ -const de_AwsEcsTaskDetails = (output: any, context: __SerdeContext): AwsEcsTaskDetails => { - return { - ClusterArn: __expectString(output.ClusterArn), - Containers: output.Containers != null ? de_AwsEcsContainerDetailsList(output.Containers, context) : undefined, - CreatedAt: __expectString(output.CreatedAt), - Group: __expectString(output.Group), - StartedAt: __expectString(output.StartedAt), - StartedBy: __expectString(output.StartedBy), - TaskDefinitionArn: __expectString(output.TaskDefinitionArn), - Version: __expectString(output.Version), - Volumes: output.Volumes != null ? de_AwsEcsTaskVolumeDetailsList(output.Volumes, context) : undefined, - } as any; -}; +// se_AwsOpenSearchServiceDomainClusterConfigDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskVolumeDetails - */ -const de_AwsEcsTaskVolumeDetails = (output: any, context: __SerdeContext): AwsEcsTaskVolumeDetails => { - return { - Host: output.Host != null ? de_AwsEcsTaskVolumeHostDetails(output.Host, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// se_AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskVolumeDetailsList - */ -const de_AwsEcsTaskVolumeDetailsList = (output: any, context: __SerdeContext): AwsEcsTaskVolumeDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEcsTaskVolumeDetails(entry, context); - }); - return retVal; -}; +// se_AwsOpenSearchServiceDomainDetails omitted. -/** - * deserializeAws_restJson1AwsEcsTaskVolumeHostDetails - */ -const de_AwsEcsTaskVolumeHostDetails = (output: any, context: __SerdeContext): AwsEcsTaskVolumeHostDetails => { - return { - SourcePath: __expectString(output.SourcePath), - } as any; -}; +// se_AwsOpenSearchServiceDomainDomainEndpointOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEfsAccessPointDetails - */ -const de_AwsEfsAccessPointDetails = (output: any, context: __SerdeContext): AwsEfsAccessPointDetails => { - return { - AccessPointId: __expectString(output.AccessPointId), - Arn: __expectString(output.Arn), - ClientToken: __expectString(output.ClientToken), - FileSystemId: __expectString(output.FileSystemId), - PosixUser: output.PosixUser != null ? de_AwsEfsAccessPointPosixUserDetails(output.PosixUser, context) : undefined, - RootDirectory: - output.RootDirectory != null - ? de_AwsEfsAccessPointRootDirectoryDetails(output.RootDirectory, context) - : undefined, - } as any; -}; +// se_AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEfsAccessPointPosixUserDetails - */ -const de_AwsEfsAccessPointPosixUserDetails = ( - output: any, - context: __SerdeContext -): AwsEfsAccessPointPosixUserDetails => { - return { - Gid: __expectString(output.Gid), - SecondaryGids: output.SecondaryGids != null ? de_NonEmptyStringList(output.SecondaryGids, context) : undefined, - Uid: __expectString(output.Uid), - } as any; -}; +// se_AwsOpenSearchServiceDomainLogPublishingOption omitted. -/** - * deserializeAws_restJson1AwsEfsAccessPointRootDirectoryCreationInfoDetails - */ -const de_AwsEfsAccessPointRootDirectoryCreationInfoDetails = ( - output: any, - context: __SerdeContext -): AwsEfsAccessPointRootDirectoryCreationInfoDetails => { - return { - OwnerGid: __expectString(output.OwnerGid), - OwnerUid: __expectString(output.OwnerUid), - Permissions: __expectString(output.Permissions), - } as any; -}; +// se_AwsOpenSearchServiceDomainLogPublishingOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEfsAccessPointRootDirectoryDetails - */ -const de_AwsEfsAccessPointRootDirectoryDetails = ( - output: any, - context: __SerdeContext -): AwsEfsAccessPointRootDirectoryDetails => { - return { - CreationInfo: - output.CreationInfo != null - ? de_AwsEfsAccessPointRootDirectoryCreationInfoDetails(output.CreationInfo, context) - : undefined, - Path: __expectString(output.Path), - } as any; -}; +// se_AwsOpenSearchServiceDomainMasterUserOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEksClusterDetails - */ -const de_AwsEksClusterDetails = (output: any, context: __SerdeContext): AwsEksClusterDetails => { - return { - Arn: __expectString(output.Arn), - CertificateAuthorityData: __expectString(output.CertificateAuthorityData), - ClusterStatus: __expectString(output.ClusterStatus), - Endpoint: __expectString(output.Endpoint), - Logging: output.Logging != null ? de_AwsEksClusterLoggingDetails(output.Logging, context) : undefined, - Name: __expectString(output.Name), - ResourcesVpcConfig: - output.ResourcesVpcConfig != null - ? de_AwsEksClusterResourcesVpcConfigDetails(output.ResourcesVpcConfig, context) - : undefined, - RoleArn: __expectString(output.RoleArn), - Version: __expectString(output.Version), - } as any; -}; +// se_AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEksClusterLoggingClusterLoggingDetails - */ -const de_AwsEksClusterLoggingClusterLoggingDetails = ( - output: any, - context: __SerdeContext -): AwsEksClusterLoggingClusterLoggingDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - Types: output.Types != null ? de_NonEmptyStringList(output.Types, context) : undefined, - } as any; -}; +// se_AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEksClusterLoggingClusterLoggingList - */ -const de_AwsEksClusterLoggingClusterLoggingList = ( - output: any, - context: __SerdeContext -): AwsEksClusterLoggingClusterLoggingDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsEksClusterLoggingClusterLoggingDetails(entry, context); - }); - return retVal; -}; +// se_AwsOpenSearchServiceDomainVpcOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsEksClusterLoggingDetails - */ -const de_AwsEksClusterLoggingDetails = (output: any, context: __SerdeContext): AwsEksClusterLoggingDetails => { - return { - ClusterLogging: - output.ClusterLogging != null - ? de_AwsEksClusterLoggingClusterLoggingList(output.ClusterLogging, context) - : undefined, - } as any; -}; +// se_AwsRdsDbClusterAssociatedRole omitted. -/** - * deserializeAws_restJson1AwsEksClusterResourcesVpcConfigDetails - */ -const de_AwsEksClusterResourcesVpcConfigDetails = ( - output: any, - context: __SerdeContext -): AwsEksClusterResourcesVpcConfigDetails => { - return { - EndpointPublicAccess: __expectBoolean(output.EndpointPublicAccess), - SecurityGroupIds: - output.SecurityGroupIds != null ? de_NonEmptyStringList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_NonEmptyStringList(output.SubnetIds, context) : undefined, - } as any; -}; +// se_AwsRdsDbClusterAssociatedRoles omitted. -/** - * deserializeAws_restJson1AwsElasticBeanstalkEnvironmentDetails - */ -const de_AwsElasticBeanstalkEnvironmentDetails = ( - output: any, - context: __SerdeContext -): AwsElasticBeanstalkEnvironmentDetails => { - return { - ApplicationName: __expectString(output.ApplicationName), - Cname: __expectString(output.Cname), - DateCreated: __expectString(output.DateCreated), - DateUpdated: __expectString(output.DateUpdated), - Description: __expectString(output.Description), - EndpointUrl: __expectString(output.EndpointUrl), - EnvironmentArn: __expectString(output.EnvironmentArn), - EnvironmentId: __expectString(output.EnvironmentId), - EnvironmentLinks: - output.EnvironmentLinks != null - ? de_AwsElasticBeanstalkEnvironmentEnvironmentLinks(output.EnvironmentLinks, context) - : undefined, - EnvironmentName: __expectString(output.EnvironmentName), - OptionSettings: - output.OptionSettings != null - ? de_AwsElasticBeanstalkEnvironmentOptionSettings(output.OptionSettings, context) - : undefined, - PlatformArn: __expectString(output.PlatformArn), - SolutionStackName: __expectString(output.SolutionStackName), - Status: __expectString(output.Status), - Tier: output.Tier != null ? de_AwsElasticBeanstalkEnvironmentTier(output.Tier, context) : undefined, - VersionLabel: __expectString(output.VersionLabel), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElasticBeanstalkEnvironmentEnvironmentLink - */ -const de_AwsElasticBeanstalkEnvironmentEnvironmentLink = ( - output: any, - context: __SerdeContext -): AwsElasticBeanstalkEnvironmentEnvironmentLink => { - return { - EnvironmentName: __expectString(output.EnvironmentName), - LinkName: __expectString(output.LinkName), - } as any; -}; +// se_AwsRdsDbClusterDetails omitted. -/** - * deserializeAws_restJson1AwsElasticBeanstalkEnvironmentEnvironmentLinks - */ -const de_AwsElasticBeanstalkEnvironmentEnvironmentLinks = ( - output: any, - context: __SerdeContext -): AwsElasticBeanstalkEnvironmentEnvironmentLink[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElasticBeanstalkEnvironmentEnvironmentLink(entry, context); - }); - return retVal; -}; +// se_AwsRdsDbClusterMember omitted. -/** - * deserializeAws_restJson1AwsElasticBeanstalkEnvironmentOptionSetting - */ -const de_AwsElasticBeanstalkEnvironmentOptionSetting = ( - output: any, - context: __SerdeContext -): AwsElasticBeanstalkEnvironmentOptionSetting => { - return { - Namespace: __expectString(output.Namespace), - OptionName: __expectString(output.OptionName), - ResourceName: __expectString(output.ResourceName), - Value: __expectString(output.Value), - } as any; -}; +// se_AwsRdsDbClusterMembers omitted. -/** - * deserializeAws_restJson1AwsElasticBeanstalkEnvironmentOptionSettings - */ -const de_AwsElasticBeanstalkEnvironmentOptionSettings = ( - output: any, - context: __SerdeContext -): AwsElasticBeanstalkEnvironmentOptionSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElasticBeanstalkEnvironmentOptionSetting(entry, context); - }); - return retVal; -}; +// se_AwsRdsDbClusterOptionGroupMembership omitted. -/** - * deserializeAws_restJson1AwsElasticBeanstalkEnvironmentTier - */ -const de_AwsElasticBeanstalkEnvironmentTier = ( - output: any, - context: __SerdeContext -): AwsElasticBeanstalkEnvironmentTier => { - return { - Name: __expectString(output.Name), - Type: __expectString(output.Type), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElasticsearchDomainDetails - */ -const de_AwsElasticsearchDomainDetails = (output: any, context: __SerdeContext): AwsElasticsearchDomainDetails => { - return { - AccessPolicies: __expectString(output.AccessPolicies), - DomainEndpointOptions: - output.DomainEndpointOptions != null - ? de_AwsElasticsearchDomainDomainEndpointOptions(output.DomainEndpointOptions, context) - : undefined, - DomainId: __expectString(output.DomainId), - DomainName: __expectString(output.DomainName), - ElasticsearchClusterConfig: - output.ElasticsearchClusterConfig != null - ? de_AwsElasticsearchDomainElasticsearchClusterConfigDetails(output.ElasticsearchClusterConfig, context) - : undefined, - ElasticsearchVersion: __expectString(output.ElasticsearchVersion), - EncryptionAtRestOptions: - output.EncryptionAtRestOptions != null - ? de_AwsElasticsearchDomainEncryptionAtRestOptions(output.EncryptionAtRestOptions, context) - : undefined, - Endpoint: __expectString(output.Endpoint), - Endpoints: output.Endpoints != null ? de_FieldMap(output.Endpoints, context) : undefined, - LogPublishingOptions: - output.LogPublishingOptions != null - ? de_AwsElasticsearchDomainLogPublishingOptions(output.LogPublishingOptions, context) - : undefined, - NodeToNodeEncryptionOptions: - output.NodeToNodeEncryptionOptions != null - ? de_AwsElasticsearchDomainNodeToNodeEncryptionOptions(output.NodeToNodeEncryptionOptions, context) - : undefined, - ServiceSoftwareOptions: - output.ServiceSoftwareOptions != null - ? de_AwsElasticsearchDomainServiceSoftwareOptions(output.ServiceSoftwareOptions, context) - : undefined, - VPCOptions: output.VPCOptions != null ? de_AwsElasticsearchDomainVPCOptions(output.VPCOptions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsElasticsearchDomainDomainEndpointOptions - */ -const de_AwsElasticsearchDomainDomainEndpointOptions = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainDomainEndpointOptions => { - return { - EnforceHTTPS: __expectBoolean(output.EnforceHTTPS), - TLSSecurityPolicy: __expectString(output.TLSSecurityPolicy), - } as any; -}; +// se_AwsRdsDbClusterOptionGroupMemberships omitted. -/** - * deserializeAws_restJson1AwsElasticsearchDomainElasticsearchClusterConfigDetails - */ -const de_AwsElasticsearchDomainElasticsearchClusterConfigDetails = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainElasticsearchClusterConfigDetails => { - return { - DedicatedMasterCount: __expectInt32(output.DedicatedMasterCount), - DedicatedMasterEnabled: __expectBoolean(output.DedicatedMasterEnabled), - DedicatedMasterType: __expectString(output.DedicatedMasterType), - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - ZoneAwarenessConfig: - output.ZoneAwarenessConfig != null - ? de_AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails( - output.ZoneAwarenessConfig, - context - ) - : undefined, - ZoneAwarenessEnabled: __expectBoolean(output.ZoneAwarenessEnabled), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails - */ -const de_AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails => { - return { - AvailabilityZoneCount: __expectInt32(output.AvailabilityZoneCount), - } as any; -}; +// se_AwsRdsDbClusterSnapshotDetails omitted. -/** - * deserializeAws_restJson1AwsElasticsearchDomainEncryptionAtRestOptions - */ -const de_AwsElasticsearchDomainEncryptionAtRestOptions = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainEncryptionAtRestOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// se_AwsRdsDbDomainMembership omitted. -/** - * deserializeAws_restJson1AwsElasticsearchDomainLogPublishingOptions - */ -const de_AwsElasticsearchDomainLogPublishingOptions = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainLogPublishingOptions => { - return { - AuditLogs: - output.AuditLogs != null - ? de_AwsElasticsearchDomainLogPublishingOptionsLogConfig(output.AuditLogs, context) - : undefined, - IndexSlowLogs: - output.IndexSlowLogs != null - ? de_AwsElasticsearchDomainLogPublishingOptionsLogConfig(output.IndexSlowLogs, context) - : undefined, - SearchSlowLogs: - output.SearchSlowLogs != null - ? de_AwsElasticsearchDomainLogPublishingOptionsLogConfig(output.SearchSlowLogs, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsElasticsearchDomainLogPublishingOptionsLogConfig - */ -const de_AwsElasticsearchDomainLogPublishingOptionsLogConfig = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainLogPublishingOptionsLogConfig => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// se_AwsRdsDbDomainMemberships omitted. -/** - * deserializeAws_restJson1AwsElasticsearchDomainNodeToNodeEncryptionOptions - */ -const de_AwsElasticsearchDomainNodeToNodeEncryptionOptions = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainNodeToNodeEncryptionOptions => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// se_AwsRdsDbInstanceAssociatedRole omitted. -/** - * deserializeAws_restJson1AwsElasticsearchDomainServiceSoftwareOptions - */ -const de_AwsElasticsearchDomainServiceSoftwareOptions = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainServiceSoftwareOptions => { - return { - AutomatedUpdateDate: __expectString(output.AutomatedUpdateDate), - Cancellable: __expectBoolean(output.Cancellable), - CurrentVersion: __expectString(output.CurrentVersion), - Description: __expectString(output.Description), - NewVersion: __expectString(output.NewVersion), - UpdateAvailable: __expectBoolean(output.UpdateAvailable), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; -}; +// se_AwsRdsDbInstanceAssociatedRoles omitted. -/** - * deserializeAws_restJson1AwsElasticsearchDomainVPCOptions - */ -const de_AwsElasticsearchDomainVPCOptions = ( - output: any, - context: __SerdeContext -): AwsElasticsearchDomainVPCOptions => { - return { - AvailabilityZones: - output.AvailabilityZones != null ? de_NonEmptyStringList(output.AvailabilityZones, context) : undefined, - SecurityGroupIds: - output.SecurityGroupIds != null ? de_NonEmptyStringList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_NonEmptyStringList(output.SubnetIds, context) : undefined, - VPCId: __expectString(output.VPCId), - } as any; -}; +// se_AwsRdsDbInstanceDetails omitted. -/** - * deserializeAws_restJson1AwsElbAppCookieStickinessPolicies - */ -const de_AwsElbAppCookieStickinessPolicies = ( - output: any, - context: __SerdeContext -): AwsElbAppCookieStickinessPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbAppCookieStickinessPolicy(entry, context); - }); - return retVal; -}; +// se_AwsRdsDbInstanceEndpoint omitted. -/** - * deserializeAws_restJson1AwsElbAppCookieStickinessPolicy - */ -const de_AwsElbAppCookieStickinessPolicy = (output: any, context: __SerdeContext): AwsElbAppCookieStickinessPolicy => { - return { - CookieName: __expectString(output.CookieName), - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// se_AwsRdsDbInstanceVpcSecurityGroup omitted. -/** - * deserializeAws_restJson1AwsElbLbCookieStickinessPolicies - */ -const de_AwsElbLbCookieStickinessPolicies = ( - output: any, - context: __SerdeContext -): AwsElbLbCookieStickinessPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbLbCookieStickinessPolicy(entry, context); - }); - return retVal; -}; +// se_AwsRdsDbInstanceVpcSecurityGroups omitted. -/** - * deserializeAws_restJson1AwsElbLbCookieStickinessPolicy - */ -const de_AwsElbLbCookieStickinessPolicy = (output: any, context: __SerdeContext): AwsElbLbCookieStickinessPolicy => { - return { - CookieExpirationPeriod: __expectLong(output.CookieExpirationPeriod), - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// se_AwsRdsDbOptionGroupMembership omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerAccessLog - */ -const de_AwsElbLoadBalancerAccessLog = (output: any, context: __SerdeContext): AwsElbLoadBalancerAccessLog => { - return { - EmitInterval: __expectInt32(output.EmitInterval), - Enabled: __expectBoolean(output.Enabled), - S3BucketName: __expectString(output.S3BucketName), - S3BucketPrefix: __expectString(output.S3BucketPrefix), - } as any; -}; +// se_AwsRdsDbOptionGroupMemberships omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerAdditionalAttribute - */ -const de_AwsElbLoadBalancerAdditionalAttribute = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerAdditionalAttribute => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// se_AwsRdsDbParameterGroup omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerAdditionalAttributeList - */ -const de_AwsElbLoadBalancerAdditionalAttributeList = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerAdditionalAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbLoadBalancerAdditionalAttribute(entry, context); - }); - return retVal; -}; +// se_AwsRdsDbParameterGroups omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerAttributes - */ -const de_AwsElbLoadBalancerAttributes = (output: any, context: __SerdeContext): AwsElbLoadBalancerAttributes => { - return { - AccessLog: output.AccessLog != null ? de_AwsElbLoadBalancerAccessLog(output.AccessLog, context) : undefined, - AdditionalAttributes: - output.AdditionalAttributes != null - ? de_AwsElbLoadBalancerAdditionalAttributeList(output.AdditionalAttributes, context) - : undefined, - ConnectionDraining: - output.ConnectionDraining != null - ? de_AwsElbLoadBalancerConnectionDraining(output.ConnectionDraining, context) - : undefined, - ConnectionSettings: - output.ConnectionSettings != null - ? de_AwsElbLoadBalancerConnectionSettings(output.ConnectionSettings, context) - : undefined, - CrossZoneLoadBalancing: - output.CrossZoneLoadBalancing != null - ? de_AwsElbLoadBalancerCrossZoneLoadBalancing(output.CrossZoneLoadBalancing, context) - : undefined, - } as any; -}; +// se_AwsRdsDbPendingModifiedValues omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerBackendServerDescription - */ -const de_AwsElbLoadBalancerBackendServerDescription = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerBackendServerDescription => { - return { - InstancePort: __expectInt32(output.InstancePort), - PolicyNames: output.PolicyNames != null ? de_StringList(output.PolicyNames, context) : undefined, - } as any; -}; +// se_AwsRdsDbProcessorFeature omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerBackendServerDescriptions - */ -const de_AwsElbLoadBalancerBackendServerDescriptions = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerBackendServerDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbLoadBalancerBackendServerDescription(entry, context); - }); - return retVal; -}; +// se_AwsRdsDbProcessorFeatures omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerConnectionDraining - */ -const de_AwsElbLoadBalancerConnectionDraining = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerConnectionDraining => { - return { - Enabled: __expectBoolean(output.Enabled), - Timeout: __expectInt32(output.Timeout), - } as any; -}; +// se_AwsRdsDbSecurityGroupDetails omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerConnectionSettings - */ -const de_AwsElbLoadBalancerConnectionSettings = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerConnectionSettings => { - return { - IdleTimeout: __expectInt32(output.IdleTimeout), - } as any; -}; +// se_AwsRdsDbSecurityGroupEc2SecurityGroup omitted. + +// se_AwsRdsDbSecurityGroupEc2SecurityGroups omitted. + +// se_AwsRdsDbSecurityGroupIpRange omitted. + +// se_AwsRdsDbSecurityGroupIpRanges omitted. + +// se_AwsRdsDbSnapshotDetails omitted. + +// se_AwsRdsDbStatusInfo omitted. + +// se_AwsRdsDbStatusInfos omitted. + +// se_AwsRdsDbSubnetGroup omitted. + +// se_AwsRdsDbSubnetGroupSubnet omitted. + +// se_AwsRdsDbSubnetGroupSubnetAvailabilityZone omitted. + +// se_AwsRdsDbSubnetGroupSubnets omitted. + +// se_AwsRdsEventSubscriptionDetails omitted. + +// se_AwsRdsPendingCloudWatchLogsExports omitted. + +// se_AwsRedshiftClusterClusterNode omitted. + +// se_AwsRedshiftClusterClusterNodes omitted. + +// se_AwsRedshiftClusterClusterParameterGroup omitted. + +// se_AwsRedshiftClusterClusterParameterGroups omitted. + +// se_AwsRedshiftClusterClusterParameterStatus omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerCrossZoneLoadBalancing - */ -const de_AwsElbLoadBalancerCrossZoneLoadBalancing = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerCrossZoneLoadBalancing => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElbLoadBalancerDetails - */ -const de_AwsElbLoadBalancerDetails = (output: any, context: __SerdeContext): AwsElbLoadBalancerDetails => { - return { - AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined, - BackendServerDescriptions: - output.BackendServerDescriptions != null - ? de_AwsElbLoadBalancerBackendServerDescriptions(output.BackendServerDescriptions, context) - : undefined, - CanonicalHostedZoneName: __expectString(output.CanonicalHostedZoneName), - CanonicalHostedZoneNameID: __expectString(output.CanonicalHostedZoneNameID), - CreatedTime: __expectString(output.CreatedTime), - DnsName: __expectString(output.DnsName), - HealthCheck: output.HealthCheck != null ? de_AwsElbLoadBalancerHealthCheck(output.HealthCheck, context) : undefined, - Instances: output.Instances != null ? de_AwsElbLoadBalancerInstances(output.Instances, context) : undefined, - ListenerDescriptions: - output.ListenerDescriptions != null - ? de_AwsElbLoadBalancerListenerDescriptions(output.ListenerDescriptions, context) - : undefined, - LoadBalancerAttributes: - output.LoadBalancerAttributes != null - ? de_AwsElbLoadBalancerAttributes(output.LoadBalancerAttributes, context) - : undefined, - LoadBalancerName: __expectString(output.LoadBalancerName), - Policies: output.Policies != null ? de_AwsElbLoadBalancerPolicies(output.Policies, context) : undefined, - Scheme: __expectString(output.Scheme), - SecurityGroups: output.SecurityGroups != null ? de_StringList(output.SecurityGroups, context) : undefined, - SourceSecurityGroup: - output.SourceSecurityGroup != null - ? de_AwsElbLoadBalancerSourceSecurityGroup(output.SourceSecurityGroup, context) - : undefined, - Subnets: output.Subnets != null ? de_StringList(output.Subnets, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElbLoadBalancerHealthCheck - */ -const de_AwsElbLoadBalancerHealthCheck = (output: any, context: __SerdeContext): AwsElbLoadBalancerHealthCheck => { - return { - HealthyThreshold: __expectInt32(output.HealthyThreshold), - Interval: __expectInt32(output.Interval), - Target: __expectString(output.Target), - Timeout: __expectInt32(output.Timeout), - UnhealthyThreshold: __expectInt32(output.UnhealthyThreshold), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElbLoadBalancerInstance - */ -const de_AwsElbLoadBalancerInstance = (output: any, context: __SerdeContext): AwsElbLoadBalancerInstance => { - return { - InstanceId: __expectString(output.InstanceId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsElbLoadBalancerInstances - */ -const de_AwsElbLoadBalancerInstances = (output: any, context: __SerdeContext): AwsElbLoadBalancerInstance[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbLoadBalancerInstance(entry, context); - }); - return retVal; -}; +// se_AwsRedshiftClusterClusterParameterStatusList omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerListener - */ -const de_AwsElbLoadBalancerListener = (output: any, context: __SerdeContext): AwsElbLoadBalancerListener => { - return { - InstancePort: __expectInt32(output.InstancePort), - InstanceProtocol: __expectString(output.InstanceProtocol), - LoadBalancerPort: __expectInt32(output.LoadBalancerPort), - Protocol: __expectString(output.Protocol), - SslCertificateId: __expectString(output.SslCertificateId), - } as any; -}; +// se_AwsRedshiftClusterClusterSecurityGroup omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerListenerDescription - */ -const de_AwsElbLoadBalancerListenerDescription = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerListenerDescription => { - return { - Listener: output.Listener != null ? de_AwsElbLoadBalancerListener(output.Listener, context) : undefined, - PolicyNames: output.PolicyNames != null ? de_StringList(output.PolicyNames, context) : undefined, - } as any; -}; +// se_AwsRedshiftClusterClusterSecurityGroups omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerListenerDescriptions - */ -const de_AwsElbLoadBalancerListenerDescriptions = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerListenerDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbLoadBalancerListenerDescription(entry, context); - }); - return retVal; -}; +// se_AwsRedshiftClusterClusterSnapshotCopyStatus omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerPolicies - */ -const de_AwsElbLoadBalancerPolicies = (output: any, context: __SerdeContext): AwsElbLoadBalancerPolicies => { - return { - AppCookieStickinessPolicies: - output.AppCookieStickinessPolicies != null - ? de_AwsElbAppCookieStickinessPolicies(output.AppCookieStickinessPolicies, context) - : undefined, - LbCookieStickinessPolicies: - output.LbCookieStickinessPolicies != null - ? de_AwsElbLbCookieStickinessPolicies(output.LbCookieStickinessPolicies, context) - : undefined, - OtherPolicies: output.OtherPolicies != null ? de_StringList(output.OtherPolicies, context) : undefined, - } as any; -}; +// se_AwsRedshiftClusterDeferredMaintenanceWindow omitted. -/** - * deserializeAws_restJson1AwsElbLoadBalancerSourceSecurityGroup - */ -const de_AwsElbLoadBalancerSourceSecurityGroup = ( - output: any, - context: __SerdeContext -): AwsElbLoadBalancerSourceSecurityGroup => { - return { - GroupName: __expectString(output.GroupName), - OwnerAlias: __expectString(output.OwnerAlias), - } as any; -}; +// se_AwsRedshiftClusterDeferredMaintenanceWindows omitted. /** - * deserializeAws_restJson1AwsElbv2LoadBalancerAttribute + * serializeAws_restJson1AwsRedshiftClusterDetails */ -const de_AwsElbv2LoadBalancerAttribute = (output: any, context: __SerdeContext): AwsElbv2LoadBalancerAttribute => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +const se_AwsRedshiftClusterDetails = (input: AwsRedshiftClusterDetails, context: __SerdeContext): any => { + return take(input, { + AllowVersionUpgrade: [], + AutomatedSnapshotRetentionPeriod: [], + AvailabilityZone: [], + ClusterAvailabilityStatus: [], + ClusterCreateTime: [], + ClusterIdentifier: [], + ClusterNodes: _json, + ClusterParameterGroups: _json, + ClusterPublicKey: [], + ClusterRevisionNumber: [], + ClusterSecurityGroups: _json, + ClusterSnapshotCopyStatus: _json, + ClusterStatus: [], + ClusterSubnetGroupName: [], + ClusterVersion: [], + DBName: [], + DeferredMaintenanceWindows: _json, + ElasticIpStatus: _json, + ElasticResizeNumberOfNodeOptions: [], + Encrypted: [], + Endpoint: _json, + EnhancedVpcRouting: [], + ExpectedNextSnapshotScheduleTime: [], + ExpectedNextSnapshotScheduleTimeStatus: [], + HsmStatus: _json, + IamRoles: _json, + KmsKeyId: [], + LoggingStatus: _json, + MaintenanceTrackName: [], + ManualSnapshotRetentionPeriod: [], + MasterUsername: [], + NextMaintenanceWindowStartTime: [], + NodeType: [], + NumberOfNodes: [], + PendingActions: _json, + PendingModifiedValues: _json, + PreferredMaintenanceWindow: [], + PubliclyAccessible: [], + ResizeInfo: _json, + RestoreStatus: (_) => se_AwsRedshiftClusterRestoreStatus(_, context), + SnapshotScheduleIdentifier: [], + SnapshotScheduleState: [], + VpcId: [], + VpcSecurityGroups: _json, + }); +}; + +// se_AwsRedshiftClusterElasticIpStatus omitted. + +// se_AwsRedshiftClusterEndpoint omitted. + +// se_AwsRedshiftClusterHsmStatus omitted. + +// se_AwsRedshiftClusterIamRole omitted. + +// se_AwsRedshiftClusterIamRoles omitted. + +// se_AwsRedshiftClusterLoggingStatus omitted. + +// se_AwsRedshiftClusterPendingModifiedValues omitted. + +// se_AwsRedshiftClusterResizeInfo omitted. /** - * deserializeAws_restJson1AwsElbv2LoadBalancerAttributes + * serializeAws_restJson1AwsRedshiftClusterRestoreStatus */ -const de_AwsElbv2LoadBalancerAttributes = (output: any, context: __SerdeContext): AwsElbv2LoadBalancerAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsElbv2LoadBalancerAttribute(entry, context); - }); - return retVal; +const se_AwsRedshiftClusterRestoreStatus = (input: AwsRedshiftClusterRestoreStatus, context: __SerdeContext): any => { + return take(input, { + CurrentRestoreRateInMegaBytesPerSecond: __serializeFloat, + ElapsedTimeInSeconds: [], + EstimatedTimeToCompletionInSeconds: [], + ProgressInMegaBytes: [], + SnapshotSizeInMegaBytes: [], + Status: [], + }); }; -/** - * deserializeAws_restJson1AwsElbv2LoadBalancerDetails - */ -const de_AwsElbv2LoadBalancerDetails = (output: any, context: __SerdeContext): AwsElbv2LoadBalancerDetails => { - return { - AvailabilityZones: - output.AvailabilityZones != null ? de_AvailabilityZones(output.AvailabilityZones, context) : undefined, - CanonicalHostedZoneId: __expectString(output.CanonicalHostedZoneId), - CreatedTime: __expectString(output.CreatedTime), - DNSName: __expectString(output.DNSName), - IpAddressType: __expectString(output.IpAddressType), - LoadBalancerAttributes: - output.LoadBalancerAttributes != null - ? de_AwsElbv2LoadBalancerAttributes(output.LoadBalancerAttributes, context) - : undefined, - Scheme: __expectString(output.Scheme), - SecurityGroups: output.SecurityGroups != null ? de_SecurityGroups(output.SecurityGroups, context) : undefined, - State: output.State != null ? de_LoadBalancerState(output.State, context) : undefined, - Type: __expectString(output.Type), - VpcId: __expectString(output.VpcId), - } as any; -}; +// se_AwsRedshiftClusterVpcSecurityGroup omitted. -/** - * deserializeAws_restJson1AwsIamAccessKeyDetails - */ -const de_AwsIamAccessKeyDetails = (output: any, context: __SerdeContext): AwsIamAccessKeyDetails => { - return { - AccessKeyId: __expectString(output.AccessKeyId), - AccountId: __expectString(output.AccountId), - CreatedAt: __expectString(output.CreatedAt), - PrincipalId: __expectString(output.PrincipalId), - PrincipalName: __expectString(output.PrincipalName), - PrincipalType: __expectString(output.PrincipalType), - SessionContext: - output.SessionContext != null ? de_AwsIamAccessKeySessionContext(output.SessionContext, context) : undefined, - Status: __expectString(output.Status), - UserName: __expectString(output.UserName), - } as any; -}; +// se_AwsRedshiftClusterVpcSecurityGroups omitted. -/** - * deserializeAws_restJson1AwsIamAccessKeySessionContext - */ -const de_AwsIamAccessKeySessionContext = (output: any, context: __SerdeContext): AwsIamAccessKeySessionContext => { - return { - Attributes: - output.Attributes != null ? de_AwsIamAccessKeySessionContextAttributes(output.Attributes, context) : undefined, - SessionIssuer: - output.SessionIssuer != null - ? de_AwsIamAccessKeySessionContextSessionIssuer(output.SessionIssuer, context) - : undefined, - } as any; -}; +// se_AwsS3AccountPublicAccessBlockDetails omitted. -/** - * deserializeAws_restJson1AwsIamAccessKeySessionContextAttributes - */ -const de_AwsIamAccessKeySessionContextAttributes = ( - output: any, - context: __SerdeContext -): AwsIamAccessKeySessionContextAttributes => { - return { - CreationDate: __expectString(output.CreationDate), - MfaAuthenticated: __expectBoolean(output.MfaAuthenticated), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationDetails omitted. -/** - * deserializeAws_restJson1AwsIamAccessKeySessionContextSessionIssuer - */ -const de_AwsIamAccessKeySessionContextSessionIssuer = ( - output: any, - context: __SerdeContext -): AwsIamAccessKeySessionContextSessionIssuer => { - return { - AccountId: __expectString(output.AccountId), - Arn: __expectString(output.Arn), - PrincipalId: __expectString(output.PrincipalId), - Type: __expectString(output.Type), - UserName: __expectString(output.UserName), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails omitted. -/** - * deserializeAws_restJson1AwsIamAttachedManagedPolicy - */ -const de_AwsIamAttachedManagedPolicy = (output: any, context: __SerdeContext): AwsIamAttachedManagedPolicy => { - return { - PolicyArn: __expectString(output.PolicyArn), - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesDetails omitted. -/** - * deserializeAws_restJson1AwsIamAttachedManagedPolicyList - */ -const de_AwsIamAttachedManagedPolicyList = (output: any, context: __SerdeContext): AwsIamAttachedManagedPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamAttachedManagedPolicy(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails omitted. -/** - * deserializeAws_restJson1AwsIamGroupDetails - */ -const de_AwsIamGroupDetails = (output: any, context: __SerdeContext): AwsIamGroupDetails => { - return { - AttachedManagedPolicies: - output.AttachedManagedPolicies != null - ? de_AwsIamAttachedManagedPolicyList(output.AttachedManagedPolicies, context) - : undefined, - CreateDate: __expectString(output.CreateDate), - GroupId: __expectString(output.GroupId), - GroupName: __expectString(output.GroupName), - GroupPolicyList: - output.GroupPolicyList != null ? de_AwsIamGroupPolicyList(output.GroupPolicyList, context) : undefined, - Path: __expectString(output.Path), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails omitted. -/** - * deserializeAws_restJson1AwsIamGroupPolicy - */ -const de_AwsIamGroupPolicy = (output: any, context: __SerdeContext): AwsIamGroupPolicy => { - return { - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails omitted. -/** - * deserializeAws_restJson1AwsIamGroupPolicyList - */ -const de_AwsIamGroupPolicyList = (output: any, context: __SerdeContext): AwsIamGroupPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamGroupPolicy(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList omitted. -/** - * deserializeAws_restJson1AwsIamInstanceProfile - */ -const de_AwsIamInstanceProfile = (output: any, context: __SerdeContext): AwsIamInstanceProfile => { - return { - Arn: __expectString(output.Arn), - CreateDate: __expectString(output.CreateDate), - InstanceProfileId: __expectString(output.InstanceProfileId), - InstanceProfileName: __expectString(output.InstanceProfileName), - Path: __expectString(output.Path), - Roles: output.Roles != null ? de_AwsIamInstanceProfileRoles(output.Roles, context) : undefined, - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails omitted. -/** - * deserializeAws_restJson1AwsIamInstanceProfileList - */ -const de_AwsIamInstanceProfileList = (output: any, context: __SerdeContext): AwsIamInstanceProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamInstanceProfile(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails omitted. -/** - * deserializeAws_restJson1AwsIamInstanceProfileRole - */ -const de_AwsIamInstanceProfileRole = (output: any, context: __SerdeContext): AwsIamInstanceProfileRole => { - return { - Arn: __expectString(output.Arn), - AssumeRolePolicyDocument: __expectString(output.AssumeRolePolicyDocument), - CreateDate: __expectString(output.CreateDate), - Path: __expectString(output.Path), - RoleId: __expectString(output.RoleId), - RoleName: __expectString(output.RoleName), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesList omitted. -/** - * deserializeAws_restJson1AwsIamInstanceProfileRoles - */ -const de_AwsIamInstanceProfileRoles = (output: any, context: __SerdeContext): AwsIamInstanceProfileRole[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamInstanceProfileRole(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails omitted. -/** - * deserializeAws_restJson1AwsIamPermissionsBoundary - */ -const de_AwsIamPermissionsBoundary = (output: any, context: __SerdeContext): AwsIamPermissionsBoundary => { - return { - PermissionsBoundaryArn: __expectString(output.PermissionsBoundaryArn), - PermissionsBoundaryType: __expectString(output.PermissionsBoundaryType), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList omitted. -/** - * deserializeAws_restJson1AwsIamPolicyDetails - */ -const de_AwsIamPolicyDetails = (output: any, context: __SerdeContext): AwsIamPolicyDetails => { - return { - AttachmentCount: __expectInt32(output.AttachmentCount), - CreateDate: __expectString(output.CreateDate), - DefaultVersionId: __expectString(output.DefaultVersionId), - Description: __expectString(output.Description), - IsAttachable: __expectBoolean(output.IsAttachable), - Path: __expectString(output.Path), - PermissionsBoundaryUsageCount: __expectInt32(output.PermissionsBoundaryUsageCount), - PolicyId: __expectString(output.PolicyId), - PolicyName: __expectString(output.PolicyName), - PolicyVersionList: - output.PolicyVersionList != null ? de_AwsIamPolicyVersionList(output.PolicyVersionList, context) : undefined, - UpdateDate: __expectString(output.UpdateDate), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails omitted. -/** - * deserializeAws_restJson1AwsIamPolicyVersion - */ -const de_AwsIamPolicyVersion = (output: any, context: __SerdeContext): AwsIamPolicyVersion => { - return { - CreateDate: __expectString(output.CreateDate), - IsDefaultVersion: __expectBoolean(output.IsDefaultVersion), - VersionId: __expectString(output.VersionId), - } as any; -}; +// se_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList omitted. -/** - * deserializeAws_restJson1AwsIamPolicyVersionList - */ -const de_AwsIamPolicyVersionList = (output: any, context: __SerdeContext): AwsIamPolicyVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamPolicyVersion(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketBucketVersioningConfiguration omitted. -/** - * deserializeAws_restJson1AwsIamRoleDetails - */ -const de_AwsIamRoleDetails = (output: any, context: __SerdeContext): AwsIamRoleDetails => { - return { - AssumeRolePolicyDocument: __expectString(output.AssumeRolePolicyDocument), - AttachedManagedPolicies: - output.AttachedManagedPolicies != null - ? de_AwsIamAttachedManagedPolicyList(output.AttachedManagedPolicies, context) - : undefined, - CreateDate: __expectString(output.CreateDate), - InstanceProfileList: - output.InstanceProfileList != null - ? de_AwsIamInstanceProfileList(output.InstanceProfileList, context) - : undefined, - MaxSessionDuration: __expectInt32(output.MaxSessionDuration), - Path: __expectString(output.Path), - PermissionsBoundary: - output.PermissionsBoundary != null - ? de_AwsIamPermissionsBoundary(output.PermissionsBoundary, context) - : undefined, - RoleId: __expectString(output.RoleId), - RoleName: __expectString(output.RoleName), - RolePolicyList: output.RolePolicyList != null ? de_AwsIamRolePolicyList(output.RolePolicyList, context) : undefined, - } as any; -}; +// se_AwsS3BucketDetails omitted. -/** - * deserializeAws_restJson1AwsIamRolePolicy - */ -const de_AwsIamRolePolicy = (output: any, context: __SerdeContext): AwsIamRolePolicy => { - return { - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// se_AwsS3BucketLoggingConfiguration omitted. -/** - * deserializeAws_restJson1AwsIamRolePolicyList - */ -const de_AwsIamRolePolicyList = (output: any, context: __SerdeContext): AwsIamRolePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamRolePolicy(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketNotificationConfiguration omitted. -/** - * deserializeAws_restJson1AwsIamUserDetails - */ -const de_AwsIamUserDetails = (output: any, context: __SerdeContext): AwsIamUserDetails => { - return { - AttachedManagedPolicies: - output.AttachedManagedPolicies != null - ? de_AwsIamAttachedManagedPolicyList(output.AttachedManagedPolicies, context) - : undefined, - CreateDate: __expectString(output.CreateDate), - GroupList: output.GroupList != null ? de_StringList(output.GroupList, context) : undefined, - Path: __expectString(output.Path), - PermissionsBoundary: - output.PermissionsBoundary != null - ? de_AwsIamPermissionsBoundary(output.PermissionsBoundary, context) - : undefined, - UserId: __expectString(output.UserId), - UserName: __expectString(output.UserName), - UserPolicyList: output.UserPolicyList != null ? de_AwsIamUserPolicyList(output.UserPolicyList, context) : undefined, - } as any; -}; +// se_AwsS3BucketNotificationConfigurationDetail omitted. -/** - * deserializeAws_restJson1AwsIamUserPolicy - */ -const de_AwsIamUserPolicy = (output: any, context: __SerdeContext): AwsIamUserPolicy => { - return { - PolicyName: __expectString(output.PolicyName), - } as any; -}; +// se_AwsS3BucketNotificationConfigurationDetails omitted. -/** - * deserializeAws_restJson1AwsIamUserPolicyList - */ -const de_AwsIamUserPolicyList = (output: any, context: __SerdeContext): AwsIamUserPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsIamUserPolicy(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketNotificationConfigurationEvents omitted. -/** - * deserializeAws_restJson1AwsKinesisStreamDetails - */ -const de_AwsKinesisStreamDetails = (output: any, context: __SerdeContext): AwsKinesisStreamDetails => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - RetentionPeriodHours: __expectInt32(output.RetentionPeriodHours), - ShardCount: __expectInt32(output.ShardCount), - StreamEncryption: - output.StreamEncryption != null - ? de_AwsKinesisStreamStreamEncryptionDetails(output.StreamEncryption, context) - : undefined, - } as any; -}; +// se_AwsS3BucketNotificationConfigurationFilter omitted. -/** - * deserializeAws_restJson1AwsKinesisStreamStreamEncryptionDetails - */ -const de_AwsKinesisStreamStreamEncryptionDetails = ( - output: any, - context: __SerdeContext -): AwsKinesisStreamStreamEncryptionDetails => { - return { - EncryptionType: __expectString(output.EncryptionType), - KeyId: __expectString(output.KeyId), - } as any; -}; +// se_AwsS3BucketNotificationConfigurationS3KeyFilter omitted. -/** - * deserializeAws_restJson1AwsKmsKeyDetails - */ -const de_AwsKmsKeyDetails = (output: any, context: __SerdeContext): AwsKmsKeyDetails => { - return { - AWSAccountId: __expectString(output.AWSAccountId), - CreationDate: __limitedParseDouble(output.CreationDate), - Description: __expectString(output.Description), - KeyId: __expectString(output.KeyId), - KeyManager: __expectString(output.KeyManager), - KeyRotationStatus: __expectBoolean(output.KeyRotationStatus), - KeyState: __expectString(output.KeyState), - Origin: __expectString(output.Origin), - } as any; -}; +// se_AwsS3BucketNotificationConfigurationS3KeyFilterRule omitted. -/** - * deserializeAws_restJson1AwsLambdaFunctionCode - */ -const de_AwsLambdaFunctionCode = (output: any, context: __SerdeContext): AwsLambdaFunctionCode => { - return { - S3Bucket: __expectString(output.S3Bucket), - S3Key: __expectString(output.S3Key), - S3ObjectVersion: __expectString(output.S3ObjectVersion), - ZipFile: __expectString(output.ZipFile), - } as any; -}; +// se_AwsS3BucketNotificationConfigurationS3KeyFilterRules omitted. -/** - * deserializeAws_restJson1AwsLambdaFunctionDeadLetterConfig - */ -const de_AwsLambdaFunctionDeadLetterConfig = ( - output: any, - context: __SerdeContext -): AwsLambdaFunctionDeadLetterConfig => { - return { - TargetArn: __expectString(output.TargetArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsLambdaFunctionDetails - */ -const de_AwsLambdaFunctionDetails = (output: any, context: __SerdeContext): AwsLambdaFunctionDetails => { - return { - Architectures: output.Architectures != null ? de_NonEmptyStringList(output.Architectures, context) : undefined, - Code: output.Code != null ? de_AwsLambdaFunctionCode(output.Code, context) : undefined, - CodeSha256: __expectString(output.CodeSha256), - DeadLetterConfig: - output.DeadLetterConfig != null - ? de_AwsLambdaFunctionDeadLetterConfig(output.DeadLetterConfig, context) - : undefined, - Environment: output.Environment != null ? de_AwsLambdaFunctionEnvironment(output.Environment, context) : undefined, - FunctionName: __expectString(output.FunctionName), - Handler: __expectString(output.Handler), - KmsKeyArn: __expectString(output.KmsKeyArn), - LastModified: __expectString(output.LastModified), - Layers: output.Layers != null ? de_AwsLambdaFunctionLayerList(output.Layers, context) : undefined, - MasterArn: __expectString(output.MasterArn), - MemorySize: __expectInt32(output.MemorySize), - PackageType: __expectString(output.PackageType), - RevisionId: __expectString(output.RevisionId), - Role: __expectString(output.Role), - Runtime: __expectString(output.Runtime), - Timeout: __expectInt32(output.Timeout), - TracingConfig: - output.TracingConfig != null ? de_AwsLambdaFunctionTracingConfig(output.TracingConfig, context) : undefined, - Version: __expectString(output.Version), - VpcConfig: output.VpcConfig != null ? de_AwsLambdaFunctionVpcConfig(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsLambdaFunctionEnvironment - */ -const de_AwsLambdaFunctionEnvironment = (output: any, context: __SerdeContext): AwsLambdaFunctionEnvironment => { - return { - Error: output.Error != null ? de_AwsLambdaFunctionEnvironmentError(output.Error, context) : undefined, - Variables: output.Variables != null ? de_FieldMap(output.Variables, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsLambdaFunctionEnvironmentError - */ -const de_AwsLambdaFunctionEnvironmentError = ( - output: any, - context: __SerdeContext -): AwsLambdaFunctionEnvironmentError => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - } as any; -}; +// se_AwsS3BucketObjectLockConfiguration omitted. -/** - * deserializeAws_restJson1AwsLambdaFunctionLayer - */ -const de_AwsLambdaFunctionLayer = (output: any, context: __SerdeContext): AwsLambdaFunctionLayer => { - return { - Arn: __expectString(output.Arn), - CodeSize: __expectInt32(output.CodeSize), - } as any; -}; +// se_AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails omitted. -/** - * deserializeAws_restJson1AwsLambdaFunctionLayerList - */ -const de_AwsLambdaFunctionLayerList = (output: any, context: __SerdeContext): AwsLambdaFunctionLayer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsLambdaFunctionLayer(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketObjectLockConfigurationRuleDetails omitted. -/** - * deserializeAws_restJson1AwsLambdaFunctionTracingConfig - */ -const de_AwsLambdaFunctionTracingConfig = (output: any, context: __SerdeContext): AwsLambdaFunctionTracingConfig => { - return { - Mode: __expectString(output.Mode), - } as any; -}; +// se_AwsS3BucketServerSideEncryptionByDefault omitted. -/** - * deserializeAws_restJson1AwsLambdaFunctionVpcConfig - */ -const de_AwsLambdaFunctionVpcConfig = (output: any, context: __SerdeContext): AwsLambdaFunctionVpcConfig => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_NonEmptyStringList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_NonEmptyStringList(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// se_AwsS3BucketServerSideEncryptionConfiguration omitted. -/** - * deserializeAws_restJson1AwsLambdaLayerVersionDetails - */ -const de_AwsLambdaLayerVersionDetails = (output: any, context: __SerdeContext): AwsLambdaLayerVersionDetails => { - return { - CompatibleRuntimes: - output.CompatibleRuntimes != null ? de_NonEmptyStringList(output.CompatibleRuntimes, context) : undefined, - CreatedDate: __expectString(output.CreatedDate), - Version: __expectLong(output.Version), - } as any; -}; +// se_AwsS3BucketServerSideEncryptionRule omitted. -/** - * deserializeAws_restJson1AwsMountPoint - */ -const de_AwsMountPoint = (output: any, context: __SerdeContext): AwsMountPoint => { - return { - ContainerPath: __expectString(output.ContainerPath), - SourceVolume: __expectString(output.SourceVolume), - } as any; -}; +// se_AwsS3BucketServerSideEncryptionRules omitted. -/** - * deserializeAws_restJson1AwsMountPointList - */ -const de_AwsMountPointList = (output: any, context: __SerdeContext): AwsMountPoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsMountPoint(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketWebsiteConfiguration omitted. -/** - * deserializeAws_restJson1AwsNetworkFirewallFirewallDetails - */ -const de_AwsNetworkFirewallFirewallDetails = ( - output: any, - context: __SerdeContext -): AwsNetworkFirewallFirewallDetails => { - return { - DeleteProtection: __expectBoolean(output.DeleteProtection), - Description: __expectString(output.Description), - FirewallArn: __expectString(output.FirewallArn), - FirewallId: __expectString(output.FirewallId), - FirewallName: __expectString(output.FirewallName), - FirewallPolicyArn: __expectString(output.FirewallPolicyArn), - FirewallPolicyChangeProtection: __expectBoolean(output.FirewallPolicyChangeProtection), - SubnetChangeProtection: __expectBoolean(output.SubnetChangeProtection), - SubnetMappings: - output.SubnetMappings != null - ? de_AwsNetworkFirewallFirewallSubnetMappingsList(output.SubnetMappings, context) - : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsNetworkFirewallFirewallPolicyDetails - */ -const de_AwsNetworkFirewallFirewallPolicyDetails = ( - output: any, - context: __SerdeContext -): AwsNetworkFirewallFirewallPolicyDetails => { - return { - Description: __expectString(output.Description), - FirewallPolicy: - output.FirewallPolicy != null ? de_FirewallPolicyDetails(output.FirewallPolicy, context) : undefined, - FirewallPolicyArn: __expectString(output.FirewallPolicyArn), - FirewallPolicyId: __expectString(output.FirewallPolicyId), - FirewallPolicyName: __expectString(output.FirewallPolicyName), - } as any; -}; +// se_AwsS3BucketWebsiteConfigurationRedirectTo omitted. -/** - * deserializeAws_restJson1AwsNetworkFirewallFirewallSubnetMappingsDetails - */ -const de_AwsNetworkFirewallFirewallSubnetMappingsDetails = ( - output: any, - context: __SerdeContext -): AwsNetworkFirewallFirewallSubnetMappingsDetails => { - return { - SubnetId: __expectString(output.SubnetId), - } as any; -}; +// se_AwsS3BucketWebsiteConfigurationRoutingRule omitted. -/** - * deserializeAws_restJson1AwsNetworkFirewallFirewallSubnetMappingsList - */ -const de_AwsNetworkFirewallFirewallSubnetMappingsList = ( - output: any, - context: __SerdeContext -): AwsNetworkFirewallFirewallSubnetMappingsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsNetworkFirewallFirewallSubnetMappingsDetails(entry, context); - }); - return retVal; -}; +// se_AwsS3BucketWebsiteConfigurationRoutingRuleCondition omitted. -/** - * deserializeAws_restJson1AwsNetworkFirewallRuleGroupDetails - */ -const de_AwsNetworkFirewallRuleGroupDetails = ( - output: any, - context: __SerdeContext -): AwsNetworkFirewallRuleGroupDetails => { - return { - Capacity: __expectInt32(output.Capacity), - Description: __expectString(output.Description), - RuleGroup: output.RuleGroup != null ? de_RuleGroupDetails(output.RuleGroup, context) : undefined, - RuleGroupArn: __expectString(output.RuleGroupArn), - RuleGroupId: __expectString(output.RuleGroupId), - RuleGroupName: __expectString(output.RuleGroupName), - Type: __expectString(output.Type), - } as any; -}; +// se_AwsS3BucketWebsiteConfigurationRoutingRuleRedirect omitted. -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails - */ -const de_AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - InternalUserDatabaseEnabled: __expectBoolean(output.InternalUserDatabaseEnabled), - MasterUserOptions: - output.MasterUserOptions != null - ? de_AwsOpenSearchServiceDomainMasterUserOptionsDetails(output.MasterUserOptions, context) - : undefined, - } as any; -}; +// se_AwsS3BucketWebsiteConfigurationRoutingRules omitted. -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainClusterConfigDetails - */ -const de_AwsOpenSearchServiceDomainClusterConfigDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainClusterConfigDetails => { - return { - DedicatedMasterCount: __expectInt32(output.DedicatedMasterCount), - DedicatedMasterEnabled: __expectBoolean(output.DedicatedMasterEnabled), - DedicatedMasterType: __expectString(output.DedicatedMasterType), - InstanceCount: __expectInt32(output.InstanceCount), - InstanceType: __expectString(output.InstanceType), - WarmCount: __expectInt32(output.WarmCount), - WarmEnabled: __expectBoolean(output.WarmEnabled), - WarmType: __expectString(output.WarmType), - ZoneAwarenessConfig: - output.ZoneAwarenessConfig != null - ? de_AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails(output.ZoneAwarenessConfig, context) - : undefined, - ZoneAwarenessEnabled: __expectBoolean(output.ZoneAwarenessEnabled), - } as any; -}; - -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails - */ -const de_AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails => { - return { - AvailabilityZoneCount: __expectInt32(output.AvailabilityZoneCount), - } as any; -}; +// se_AwsS3ObjectDetails omitted. + +// se_AwsSageMakerNotebookInstanceDetails omitted. + +// se_AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails omitted. -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainDetails - */ -const de_AwsOpenSearchServiceDomainDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainDetails => { - return { - AccessPolicies: __expectString(output.AccessPolicies), - AdvancedSecurityOptions: - output.AdvancedSecurityOptions != null - ? de_AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails(output.AdvancedSecurityOptions, context) - : undefined, - Arn: __expectString(output.Arn), - ClusterConfig: - output.ClusterConfig != null - ? de_AwsOpenSearchServiceDomainClusterConfigDetails(output.ClusterConfig, context) - : undefined, - DomainEndpoint: __expectString(output.DomainEndpoint), - DomainEndpointOptions: - output.DomainEndpointOptions != null - ? de_AwsOpenSearchServiceDomainDomainEndpointOptionsDetails(output.DomainEndpointOptions, context) - : undefined, - DomainEndpoints: output.DomainEndpoints != null ? de_FieldMap(output.DomainEndpoints, context) : undefined, - DomainName: __expectString(output.DomainName), - EncryptionAtRestOptions: - output.EncryptionAtRestOptions != null - ? de_AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails(output.EncryptionAtRestOptions, context) - : undefined, - EngineVersion: __expectString(output.EngineVersion), - Id: __expectString(output.Id), - LogPublishingOptions: - output.LogPublishingOptions != null - ? de_AwsOpenSearchServiceDomainLogPublishingOptionsDetails(output.LogPublishingOptions, context) - : undefined, - NodeToNodeEncryptionOptions: - output.NodeToNodeEncryptionOptions != null - ? de_AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails(output.NodeToNodeEncryptionOptions, context) - : undefined, - ServiceSoftwareOptions: - output.ServiceSoftwareOptions != null - ? de_AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails(output.ServiceSoftwareOptions, context) - : undefined, - VpcOptions: - output.VpcOptions != null - ? de_AwsOpenSearchServiceDomainVpcOptionsDetails(output.VpcOptions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainDomainEndpointOptionsDetails - */ -const de_AwsOpenSearchServiceDomainDomainEndpointOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainDomainEndpointOptionsDetails => { - return { - CustomEndpoint: __expectString(output.CustomEndpoint), - CustomEndpointCertificateArn: __expectString(output.CustomEndpointCertificateArn), - CustomEndpointEnabled: __expectBoolean(output.CustomEndpointEnabled), - EnforceHTTPS: __expectBoolean(output.EnforceHTTPS), - TLSSecurityPolicy: __expectString(output.TLSSecurityPolicy), - } as any; -}; +// se_AwsSecretsManagerSecretDetails omitted. -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails - */ -const de_AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// se_AwsSecretsManagerSecretRotationRules omitted. /** - * deserializeAws_restJson1AwsOpenSearchServiceDomainLogPublishingOption + * serializeAws_restJson1AwsSecurityFinding */ -const de_AwsOpenSearchServiceDomainLogPublishingOption = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainLogPublishingOption => { - return { - CloudWatchLogsLogGroupArn: __expectString(output.CloudWatchLogsLogGroupArn), - Enabled: __expectBoolean(output.Enabled), - } as any; +const se_AwsSecurityFinding = (input: AwsSecurityFinding, context: __SerdeContext): any => { + return take(input, { + Action: (_) => se_Action(_, context), + AwsAccountId: [], + CompanyName: [], + Compliance: _json, + Confidence: [], + CreatedAt: [], + Criticality: [], + Description: [], + FindingProviderFields: _json, + FirstObservedAt: [], + GeneratorId: [], + Id: [], + LastObservedAt: [], + Malware: _json, + Network: _json, + NetworkPath: _json, + Note: _json, + PatchSummary: _json, + Process: _json, + ProductArn: [], + ProductFields: _json, + ProductName: [], + RecordState: [], + Region: [], + RelatedFindings: _json, + Remediation: _json, + Resources: (_) => se_ResourceList(_, context), + Sample: [], + SchemaVersion: [], + Severity: (_) => se_Severity(_, context), + SourceUrl: [], + ThreatIntelIndicators: _json, + Threats: _json, + Title: [], + Types: _json, + UpdatedAt: [], + UserDefinedFields: _json, + VerificationState: [], + Vulnerabilities: (_) => se_VulnerabilityList(_, context), + Workflow: _json, + WorkflowState: [], + }); }; /** - * deserializeAws_restJson1AwsOpenSearchServiceDomainLogPublishingOptionsDetails + * serializeAws_restJson1AwsSecurityFindingFilters */ -const de_AwsOpenSearchServiceDomainLogPublishingOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainLogPublishingOptionsDetails => { - return { - AuditLogs: - output.AuditLogs != null - ? de_AwsOpenSearchServiceDomainLogPublishingOption(output.AuditLogs, context) - : undefined, - IndexSlowLogs: - output.IndexSlowLogs != null - ? de_AwsOpenSearchServiceDomainLogPublishingOption(output.IndexSlowLogs, context) - : undefined, - SearchSlowLogs: - output.SearchSlowLogs != null - ? de_AwsOpenSearchServiceDomainLogPublishingOption(output.SearchSlowLogs, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainMasterUserOptionsDetails - */ -const de_AwsOpenSearchServiceDomainMasterUserOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainMasterUserOptionsDetails => { - return { - MasterUserArn: __expectString(output.MasterUserArn), - MasterUserName: __expectString(output.MasterUserName), - MasterUserPassword: __expectString(output.MasterUserPassword), - } as any; +const se_AwsSecurityFindingFilters = (input: AwsSecurityFindingFilters, context: __SerdeContext): any => { + return take(input, { + AwsAccountId: _json, + CompanyName: _json, + ComplianceAssociatedStandardsId: _json, + ComplianceSecurityControlId: _json, + ComplianceStatus: _json, + Confidence: (_) => se_NumberFilterList(_, context), + CreatedAt: _json, + Criticality: (_) => se_NumberFilterList(_, context), + Description: _json, + FindingProviderFieldsConfidence: (_) => se_NumberFilterList(_, context), + FindingProviderFieldsCriticality: (_) => se_NumberFilterList(_, context), + FindingProviderFieldsRelatedFindingsId: _json, + FindingProviderFieldsRelatedFindingsProductArn: _json, + FindingProviderFieldsSeverityLabel: _json, + FindingProviderFieldsSeverityOriginal: _json, + FindingProviderFieldsTypes: _json, + FirstObservedAt: _json, + GeneratorId: _json, + Id: _json, + Keyword: _json, + LastObservedAt: _json, + MalwareName: _json, + MalwarePath: _json, + MalwareState: _json, + MalwareType: _json, + NetworkDestinationDomain: _json, + NetworkDestinationIpV4: _json, + NetworkDestinationIpV6: _json, + NetworkDestinationPort: (_) => se_NumberFilterList(_, context), + NetworkDirection: _json, + NetworkProtocol: _json, + NetworkSourceDomain: _json, + NetworkSourceIpV4: _json, + NetworkSourceIpV6: _json, + NetworkSourceMac: _json, + NetworkSourcePort: (_) => se_NumberFilterList(_, context), + NoteText: _json, + NoteUpdatedAt: _json, + NoteUpdatedBy: _json, + ProcessLaunchedAt: _json, + ProcessName: _json, + ProcessParentPid: (_) => se_NumberFilterList(_, context), + ProcessPath: _json, + ProcessPid: (_) => se_NumberFilterList(_, context), + ProcessTerminatedAt: _json, + ProductArn: _json, + ProductFields: _json, + ProductName: _json, + RecommendationText: _json, + RecordState: _json, + Region: _json, + RelatedFindingsId: _json, + RelatedFindingsProductArn: _json, + ResourceAwsEc2InstanceIamInstanceProfileArn: _json, + ResourceAwsEc2InstanceImageId: _json, + ResourceAwsEc2InstanceIpV4Addresses: _json, + ResourceAwsEc2InstanceIpV6Addresses: _json, + ResourceAwsEc2InstanceKeyName: _json, + ResourceAwsEc2InstanceLaunchedAt: _json, + ResourceAwsEc2InstanceSubnetId: _json, + ResourceAwsEc2InstanceType: _json, + ResourceAwsEc2InstanceVpcId: _json, + ResourceAwsIamAccessKeyCreatedAt: _json, + ResourceAwsIamAccessKeyPrincipalName: _json, + ResourceAwsIamAccessKeyStatus: _json, + ResourceAwsIamAccessKeyUserName: _json, + ResourceAwsIamUserUserName: _json, + ResourceAwsS3BucketOwnerId: _json, + ResourceAwsS3BucketOwnerName: _json, + ResourceContainerImageId: _json, + ResourceContainerImageName: _json, + ResourceContainerLaunchedAt: _json, + ResourceContainerName: _json, + ResourceDetailsOther: _json, + ResourceId: _json, + ResourcePartition: _json, + ResourceRegion: _json, + ResourceTags: _json, + ResourceType: _json, + Sample: _json, + SeverityLabel: _json, + SeverityNormalized: (_) => se_NumberFilterList(_, context), + SeverityProduct: (_) => se_NumberFilterList(_, context), + SourceUrl: _json, + ThreatIntelIndicatorCategory: _json, + ThreatIntelIndicatorLastObservedAt: _json, + ThreatIntelIndicatorSource: _json, + ThreatIntelIndicatorSourceUrl: _json, + ThreatIntelIndicatorType: _json, + ThreatIntelIndicatorValue: _json, + Title: _json, + Type: _json, + UpdatedAt: _json, + UserDefinedFields: _json, + VerificationState: _json, + WorkflowState: _json, + WorkflowStatus: _json, + }); }; -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails - */ -const de_AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails => { - return { - Enabled: __expectBoolean(output.Enabled), - } as any; -}; +// se_AwsSecurityFindingIdentifier omitted. -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails - */ -const de_AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails => { - return { - AutomatedUpdateDate: __expectString(output.AutomatedUpdateDate), - Cancellable: __expectBoolean(output.Cancellable), - CurrentVersion: __expectString(output.CurrentVersion), - Description: __expectString(output.Description), - NewVersion: __expectString(output.NewVersion), - OptionalDeployment: __expectBoolean(output.OptionalDeployment), - UpdateAvailable: __expectBoolean(output.UpdateAvailable), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; -}; +// se_AwsSecurityFindingIdentifierList omitted. -/** - * deserializeAws_restJson1AwsOpenSearchServiceDomainVpcOptionsDetails - */ -const de_AwsOpenSearchServiceDomainVpcOptionsDetails = ( - output: any, - context: __SerdeContext -): AwsOpenSearchServiceDomainVpcOptionsDetails => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_NonEmptyStringList(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_NonEmptyStringList(output.SubnetIds, context) : undefined, - } as any; -}; +// se_AwsSnsTopicDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbClusterAssociatedRole - */ -const de_AwsRdsDbClusterAssociatedRole = (output: any, context: __SerdeContext): AwsRdsDbClusterAssociatedRole => { - return { - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsSnsTopicSubscription omitted. -/** - * deserializeAws_restJson1AwsRdsDbClusterAssociatedRoles - */ -const de_AwsRdsDbClusterAssociatedRoles = (output: any, context: __SerdeContext): AwsRdsDbClusterAssociatedRole[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbClusterAssociatedRole(entry, context); - }); - return retVal; -}; +// se_AwsSnsTopicSubscriptionList omitted. -/** - * deserializeAws_restJson1AwsRdsDbClusterDetails - */ -const de_AwsRdsDbClusterDetails = (output: any, context: __SerdeContext): AwsRdsDbClusterDetails => { - return { - ActivityStreamStatus: __expectString(output.ActivityStreamStatus), - AllocatedStorage: __expectInt32(output.AllocatedStorage), - AssociatedRoles: - output.AssociatedRoles != null ? de_AwsRdsDbClusterAssociatedRoles(output.AssociatedRoles, context) : undefined, - AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined, - BackupRetentionPeriod: __expectInt32(output.BackupRetentionPeriod), - ClusterCreateTime: __expectString(output.ClusterCreateTime), - CopyTagsToSnapshot: __expectBoolean(output.CopyTagsToSnapshot), - CrossAccountClone: __expectBoolean(output.CrossAccountClone), - CustomEndpoints: output.CustomEndpoints != null ? de_StringList(output.CustomEndpoints, context) : undefined, - DatabaseName: __expectString(output.DatabaseName), - DbClusterIdentifier: __expectString(output.DbClusterIdentifier), - DbClusterMembers: - output.DbClusterMembers != null ? de_AwsRdsDbClusterMembers(output.DbClusterMembers, context) : undefined, - DbClusterOptionGroupMemberships: - output.DbClusterOptionGroupMemberships != null - ? de_AwsRdsDbClusterOptionGroupMemberships(output.DbClusterOptionGroupMemberships, context) - : undefined, - DbClusterParameterGroup: __expectString(output.DbClusterParameterGroup), - DbClusterResourceId: __expectString(output.DbClusterResourceId), - DbSubnetGroup: __expectString(output.DbSubnetGroup), - DeletionProtection: __expectBoolean(output.DeletionProtection), - DomainMemberships: - output.DomainMemberships != null ? de_AwsRdsDbDomainMemberships(output.DomainMemberships, context) : undefined, - EnabledCloudWatchLogsExports: - output.EnabledCloudWatchLogsExports != null - ? de_StringList(output.EnabledCloudWatchLogsExports, context) - : undefined, - Endpoint: __expectString(output.Endpoint), - Engine: __expectString(output.Engine), - EngineMode: __expectString(output.EngineMode), - EngineVersion: __expectString(output.EngineVersion), - HostedZoneId: __expectString(output.HostedZoneId), - HttpEndpointEnabled: __expectBoolean(output.HttpEndpointEnabled), - IamDatabaseAuthenticationEnabled: __expectBoolean(output.IamDatabaseAuthenticationEnabled), - KmsKeyId: __expectString(output.KmsKeyId), - MasterUsername: __expectString(output.MasterUsername), - MultiAz: __expectBoolean(output.MultiAz), - Port: __expectInt32(output.Port), - PreferredBackupWindow: __expectString(output.PreferredBackupWindow), - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - ReadReplicaIdentifiers: - output.ReadReplicaIdentifiers != null ? de_StringList(output.ReadReplicaIdentifiers, context) : undefined, - ReaderEndpoint: __expectString(output.ReaderEndpoint), - Status: __expectString(output.Status), - StorageEncrypted: __expectBoolean(output.StorageEncrypted), - VpcSecurityGroups: - output.VpcSecurityGroups != null - ? de_AwsRdsDbInstanceVpcSecurityGroups(output.VpcSecurityGroups, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsRdsDbClusterMember - */ -const de_AwsRdsDbClusterMember = (output: any, context: __SerdeContext): AwsRdsDbClusterMember => { - return { - DbClusterParameterGroupStatus: __expectString(output.DbClusterParameterGroupStatus), - DbInstanceIdentifier: __expectString(output.DbInstanceIdentifier), - IsClusterWriter: __expectBoolean(output.IsClusterWriter), - PromotionTier: __expectInt32(output.PromotionTier), - } as any; -}; - -/** - * deserializeAws_restJson1AwsRdsDbClusterMembers - */ -const de_AwsRdsDbClusterMembers = (output: any, context: __SerdeContext): AwsRdsDbClusterMember[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbClusterMember(entry, context); - }); - return retVal; -}; +// se_AwsSqsQueueDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbClusterOptionGroupMembership - */ -const de_AwsRdsDbClusterOptionGroupMembership = ( - output: any, - context: __SerdeContext -): AwsRdsDbClusterOptionGroupMembership => { - return { - DbClusterOptionGroupName: __expectString(output.DbClusterOptionGroupName), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsSsmComplianceSummary omitted. -/** - * deserializeAws_restJson1AwsRdsDbClusterOptionGroupMemberships - */ -const de_AwsRdsDbClusterOptionGroupMemberships = ( - output: any, - context: __SerdeContext -): AwsRdsDbClusterOptionGroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbClusterOptionGroupMembership(entry, context); - }); - return retVal; -}; +// se_AwsSsmPatch omitted. -/** - * deserializeAws_restJson1AwsRdsDbClusterSnapshotDetails - */ -const de_AwsRdsDbClusterSnapshotDetails = (output: any, context: __SerdeContext): AwsRdsDbClusterSnapshotDetails => { - return { - AllocatedStorage: __expectInt32(output.AllocatedStorage), - AvailabilityZones: output.AvailabilityZones != null ? de_StringList(output.AvailabilityZones, context) : undefined, - ClusterCreateTime: __expectString(output.ClusterCreateTime), - DbClusterIdentifier: __expectString(output.DbClusterIdentifier), - DbClusterSnapshotIdentifier: __expectString(output.DbClusterSnapshotIdentifier), - Engine: __expectString(output.Engine), - EngineVersion: __expectString(output.EngineVersion), - IamDatabaseAuthenticationEnabled: __expectBoolean(output.IamDatabaseAuthenticationEnabled), - KmsKeyId: __expectString(output.KmsKeyId), - LicenseModel: __expectString(output.LicenseModel), - MasterUsername: __expectString(output.MasterUsername), - PercentProgress: __expectInt32(output.PercentProgress), - Port: __expectInt32(output.Port), - SnapshotCreateTime: __expectString(output.SnapshotCreateTime), - SnapshotType: __expectString(output.SnapshotType), - Status: __expectString(output.Status), - StorageEncrypted: __expectBoolean(output.StorageEncrypted), - VpcId: __expectString(output.VpcId), - } as any; -}; +// se_AwsSsmPatchComplianceDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbDomainMembership - */ -const de_AwsRdsDbDomainMembership = (output: any, context: __SerdeContext): AwsRdsDbDomainMembership => { - return { - Domain: __expectString(output.Domain), - Fqdn: __expectString(output.Fqdn), - IamRoleName: __expectString(output.IamRoleName), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsWafRateBasedRuleDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbDomainMemberships - */ -const de_AwsRdsDbDomainMemberships = (output: any, context: __SerdeContext): AwsRdsDbDomainMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbDomainMembership(entry, context); - }); - return retVal; -}; +// se_AwsWafRateBasedRuleMatchPredicate omitted. -/** - * deserializeAws_restJson1AwsRdsDbInstanceAssociatedRole - */ -const de_AwsRdsDbInstanceAssociatedRole = (output: any, context: __SerdeContext): AwsRdsDbInstanceAssociatedRole => { - return { - FeatureName: __expectString(output.FeatureName), - RoleArn: __expectString(output.RoleArn), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsWafRateBasedRuleMatchPredicateList omitted. -/** - * deserializeAws_restJson1AwsRdsDbInstanceAssociatedRoles - */ -const de_AwsRdsDbInstanceAssociatedRoles = (output: any, context: __SerdeContext): AwsRdsDbInstanceAssociatedRole[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbInstanceAssociatedRole(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalRateBasedRuleDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbInstanceDetails - */ -const de_AwsRdsDbInstanceDetails = (output: any, context: __SerdeContext): AwsRdsDbInstanceDetails => { - return { - AllocatedStorage: __expectInt32(output.AllocatedStorage), - AssociatedRoles: - output.AssociatedRoles != null ? de_AwsRdsDbInstanceAssociatedRoles(output.AssociatedRoles, context) : undefined, - AutoMinorVersionUpgrade: __expectBoolean(output.AutoMinorVersionUpgrade), - AvailabilityZone: __expectString(output.AvailabilityZone), - BackupRetentionPeriod: __expectInt32(output.BackupRetentionPeriod), - CACertificateIdentifier: __expectString(output.CACertificateIdentifier), - CharacterSetName: __expectString(output.CharacterSetName), - CopyTagsToSnapshot: __expectBoolean(output.CopyTagsToSnapshot), - DBClusterIdentifier: __expectString(output.DBClusterIdentifier), - DBInstanceClass: __expectString(output.DBInstanceClass), - DBInstanceIdentifier: __expectString(output.DBInstanceIdentifier), - DBName: __expectString(output.DBName), - DbInstancePort: __expectInt32(output.DbInstancePort), - DbInstanceStatus: __expectString(output.DbInstanceStatus), - DbParameterGroups: - output.DbParameterGroups != null ? de_AwsRdsDbParameterGroups(output.DbParameterGroups, context) : undefined, - DbSecurityGroups: output.DbSecurityGroups != null ? de_StringList(output.DbSecurityGroups, context) : undefined, - DbSubnetGroup: output.DbSubnetGroup != null ? de_AwsRdsDbSubnetGroup(output.DbSubnetGroup, context) : undefined, - DbiResourceId: __expectString(output.DbiResourceId), - DeletionProtection: __expectBoolean(output.DeletionProtection), - DomainMemberships: - output.DomainMemberships != null ? de_AwsRdsDbDomainMemberships(output.DomainMemberships, context) : undefined, - EnabledCloudWatchLogsExports: - output.EnabledCloudWatchLogsExports != null - ? de_StringList(output.EnabledCloudWatchLogsExports, context) - : undefined, - Endpoint: output.Endpoint != null ? de_AwsRdsDbInstanceEndpoint(output.Endpoint, context) : undefined, - Engine: __expectString(output.Engine), - EngineVersion: __expectString(output.EngineVersion), - EnhancedMonitoringResourceArn: __expectString(output.EnhancedMonitoringResourceArn), - IAMDatabaseAuthenticationEnabled: __expectBoolean(output.IAMDatabaseAuthenticationEnabled), - InstanceCreateTime: __expectString(output.InstanceCreateTime), - Iops: __expectInt32(output.Iops), - KmsKeyId: __expectString(output.KmsKeyId), - LatestRestorableTime: __expectString(output.LatestRestorableTime), - LicenseModel: __expectString(output.LicenseModel), - ListenerEndpoint: - output.ListenerEndpoint != null ? de_AwsRdsDbInstanceEndpoint(output.ListenerEndpoint, context) : undefined, - MasterUsername: __expectString(output.MasterUsername), - MaxAllocatedStorage: __expectInt32(output.MaxAllocatedStorage), - MonitoringInterval: __expectInt32(output.MonitoringInterval), - MonitoringRoleArn: __expectString(output.MonitoringRoleArn), - MultiAz: __expectBoolean(output.MultiAz), - OptionGroupMemberships: - output.OptionGroupMemberships != null - ? de_AwsRdsDbOptionGroupMemberships(output.OptionGroupMemberships, context) - : undefined, - PendingModifiedValues: - output.PendingModifiedValues != null - ? de_AwsRdsDbPendingModifiedValues(output.PendingModifiedValues, context) - : undefined, - PerformanceInsightsEnabled: __expectBoolean(output.PerformanceInsightsEnabled), - PerformanceInsightsKmsKeyId: __expectString(output.PerformanceInsightsKmsKeyId), - PerformanceInsightsRetentionPeriod: __expectInt32(output.PerformanceInsightsRetentionPeriod), - PreferredBackupWindow: __expectString(output.PreferredBackupWindow), - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - ProcessorFeatures: - output.ProcessorFeatures != null ? de_AwsRdsDbProcessorFeatures(output.ProcessorFeatures, context) : undefined, - PromotionTier: __expectInt32(output.PromotionTier), - PubliclyAccessible: __expectBoolean(output.PubliclyAccessible), - ReadReplicaDBClusterIdentifiers: - output.ReadReplicaDBClusterIdentifiers != null - ? de_StringList(output.ReadReplicaDBClusterIdentifiers, context) - : undefined, - ReadReplicaDBInstanceIdentifiers: - output.ReadReplicaDBInstanceIdentifiers != null - ? de_StringList(output.ReadReplicaDBInstanceIdentifiers, context) - : undefined, - ReadReplicaSourceDBInstanceIdentifier: __expectString(output.ReadReplicaSourceDBInstanceIdentifier), - SecondaryAvailabilityZone: __expectString(output.SecondaryAvailabilityZone), - StatusInfos: output.StatusInfos != null ? de_AwsRdsDbStatusInfos(output.StatusInfos, context) : undefined, - StorageEncrypted: __expectBoolean(output.StorageEncrypted), - StorageType: __expectString(output.StorageType), - TdeCredentialArn: __expectString(output.TdeCredentialArn), - Timezone: __expectString(output.Timezone), - VpcSecurityGroups: - output.VpcSecurityGroups != null - ? de_AwsRdsDbInstanceVpcSecurityGroups(output.VpcSecurityGroups, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsRdsDbInstanceEndpoint - */ -const de_AwsRdsDbInstanceEndpoint = (output: any, context: __SerdeContext): AwsRdsDbInstanceEndpoint => { - return { - Address: __expectString(output.Address), - HostedZoneId: __expectString(output.HostedZoneId), - Port: __expectInt32(output.Port), - } as any; -}; - -/** - * deserializeAws_restJson1AwsRdsDbInstanceVpcSecurityGroup - */ -const de_AwsRdsDbInstanceVpcSecurityGroup = ( - output: any, - context: __SerdeContext -): AwsRdsDbInstanceVpcSecurityGroup => { - return { - Status: __expectString(output.Status), - VpcSecurityGroupId: __expectString(output.VpcSecurityGroupId), - } as any; -}; +// se_AwsWafRegionalRateBasedRuleMatchPredicate omitted. -/** - * deserializeAws_restJson1AwsRdsDbInstanceVpcSecurityGroups - */ -const de_AwsRdsDbInstanceVpcSecurityGroups = ( - output: any, - context: __SerdeContext -): AwsRdsDbInstanceVpcSecurityGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbInstanceVpcSecurityGroup(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalRateBasedRuleMatchPredicateList omitted. -/** - * deserializeAws_restJson1AwsRdsDbOptionGroupMembership - */ -const de_AwsRdsDbOptionGroupMembership = (output: any, context: __SerdeContext): AwsRdsDbOptionGroupMembership => { - return { - OptionGroupName: __expectString(output.OptionGroupName), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsWafRegionalRuleDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbOptionGroupMemberships - */ -const de_AwsRdsDbOptionGroupMemberships = (output: any, context: __SerdeContext): AwsRdsDbOptionGroupMembership[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbOptionGroupMembership(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalRuleGroupDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbParameterGroup - */ -const de_AwsRdsDbParameterGroup = (output: any, context: __SerdeContext): AwsRdsDbParameterGroup => { - return { - DbParameterGroupName: __expectString(output.DbParameterGroupName), - ParameterApplyStatus: __expectString(output.ParameterApplyStatus), - } as any; -}; +// se_AwsWafRegionalRuleGroupRulesActionDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbParameterGroups - */ -const de_AwsRdsDbParameterGroups = (output: any, context: __SerdeContext): AwsRdsDbParameterGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbParameterGroup(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalRuleGroupRulesDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbPendingModifiedValues - */ -const de_AwsRdsDbPendingModifiedValues = (output: any, context: __SerdeContext): AwsRdsDbPendingModifiedValues => { - return { - AllocatedStorage: __expectInt32(output.AllocatedStorage), - BackupRetentionPeriod: __expectInt32(output.BackupRetentionPeriod), - CaCertificateIdentifier: __expectString(output.CaCertificateIdentifier), - DbInstanceClass: __expectString(output.DbInstanceClass), - DbInstanceIdentifier: __expectString(output.DbInstanceIdentifier), - DbSubnetGroupName: __expectString(output.DbSubnetGroupName), - EngineVersion: __expectString(output.EngineVersion), - Iops: __expectInt32(output.Iops), - LicenseModel: __expectString(output.LicenseModel), - MasterUserPassword: __expectString(output.MasterUserPassword), - MultiAZ: __expectBoolean(output.MultiAZ), - PendingCloudWatchLogsExports: - output.PendingCloudWatchLogsExports != null - ? de_AwsRdsPendingCloudWatchLogsExports(output.PendingCloudWatchLogsExports, context) - : undefined, - Port: __expectInt32(output.Port), - ProcessorFeatures: - output.ProcessorFeatures != null ? de_AwsRdsDbProcessorFeatures(output.ProcessorFeatures, context) : undefined, - StorageType: __expectString(output.StorageType), - } as any; -}; +// se_AwsWafRegionalRuleGroupRulesList omitted. -/** - * deserializeAws_restJson1AwsRdsDbProcessorFeature - */ -const de_AwsRdsDbProcessorFeature = (output: any, context: __SerdeContext): AwsRdsDbProcessorFeature => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// se_AwsWafRegionalRulePredicateList omitted. -/** - * deserializeAws_restJson1AwsRdsDbProcessorFeatures - */ -const de_AwsRdsDbProcessorFeatures = (output: any, context: __SerdeContext): AwsRdsDbProcessorFeature[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbProcessorFeature(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalRulePredicateListDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSecurityGroupDetails - */ -const de_AwsRdsDbSecurityGroupDetails = (output: any, context: __SerdeContext): AwsRdsDbSecurityGroupDetails => { - return { - DbSecurityGroupArn: __expectString(output.DbSecurityGroupArn), - DbSecurityGroupDescription: __expectString(output.DbSecurityGroupDescription), - DbSecurityGroupName: __expectString(output.DbSecurityGroupName), - Ec2SecurityGroups: - output.Ec2SecurityGroups != null - ? de_AwsRdsDbSecurityGroupEc2SecurityGroups(output.Ec2SecurityGroups, context) - : undefined, - IpRanges: output.IpRanges != null ? de_AwsRdsDbSecurityGroupIpRanges(output.IpRanges, context) : undefined, - OwnerId: __expectString(output.OwnerId), - VpcId: __expectString(output.VpcId), - } as any; -}; +// se_AwsWafRegionalWebAclDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSecurityGroupEc2SecurityGroup - */ -const de_AwsRdsDbSecurityGroupEc2SecurityGroup = ( - output: any, - context: __SerdeContext -): AwsRdsDbSecurityGroupEc2SecurityGroup => { - return { - Ec2SecurityGroupId: __expectString(output.Ec2SecurityGroupId), - Ec2SecurityGroupName: __expectString(output.Ec2SecurityGroupName), - Ec2SecurityGroupOwnerId: __expectString(output.Ec2SecurityGroupOwnerId), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsWafRegionalWebAclRulesList omitted. -/** - * deserializeAws_restJson1AwsRdsDbSecurityGroupEc2SecurityGroups - */ -const de_AwsRdsDbSecurityGroupEc2SecurityGroups = ( - output: any, - context: __SerdeContext -): AwsRdsDbSecurityGroupEc2SecurityGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbSecurityGroupEc2SecurityGroup(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalWebAclRulesListActionDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSecurityGroupIpRange - */ -const de_AwsRdsDbSecurityGroupIpRange = (output: any, context: __SerdeContext): AwsRdsDbSecurityGroupIpRange => { - return { - CidrIp: __expectString(output.CidrIp), - Status: __expectString(output.Status), - } as any; -}; +// se_AwsWafRegionalWebAclRulesListDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSecurityGroupIpRanges - */ -const de_AwsRdsDbSecurityGroupIpRanges = (output: any, context: __SerdeContext): AwsRdsDbSecurityGroupIpRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbSecurityGroupIpRange(entry, context); - }); - return retVal; -}; +// se_AwsWafRegionalWebAclRulesListOverrideActionDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSnapshotDetails - */ -const de_AwsRdsDbSnapshotDetails = (output: any, context: __SerdeContext): AwsRdsDbSnapshotDetails => { - return { - AllocatedStorage: __expectInt32(output.AllocatedStorage), - AvailabilityZone: __expectString(output.AvailabilityZone), - DbInstanceIdentifier: __expectString(output.DbInstanceIdentifier), - DbSnapshotIdentifier: __expectString(output.DbSnapshotIdentifier), - DbiResourceId: __expectString(output.DbiResourceId), - Encrypted: __expectBoolean(output.Encrypted), - Engine: __expectString(output.Engine), - EngineVersion: __expectString(output.EngineVersion), - IamDatabaseAuthenticationEnabled: __expectBoolean(output.IamDatabaseAuthenticationEnabled), - InstanceCreateTime: __expectString(output.InstanceCreateTime), - Iops: __expectInt32(output.Iops), - KmsKeyId: __expectString(output.KmsKeyId), - LicenseModel: __expectString(output.LicenseModel), - MasterUsername: __expectString(output.MasterUsername), - OptionGroupName: __expectString(output.OptionGroupName), - PercentProgress: __expectInt32(output.PercentProgress), - Port: __expectInt32(output.Port), - ProcessorFeatures: - output.ProcessorFeatures != null ? de_AwsRdsDbProcessorFeatures(output.ProcessorFeatures, context) : undefined, - SnapshotCreateTime: __expectString(output.SnapshotCreateTime), - SnapshotType: __expectString(output.SnapshotType), - SourceDbSnapshotIdentifier: __expectString(output.SourceDbSnapshotIdentifier), - SourceRegion: __expectString(output.SourceRegion), - Status: __expectString(output.Status), - StorageType: __expectString(output.StorageType), - TdeCredentialArn: __expectString(output.TdeCredentialArn), - Timezone: __expectString(output.Timezone), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_restJson1AwsRdsDbStatusInfo - */ -const de_AwsRdsDbStatusInfo = (output: any, context: __SerdeContext): AwsRdsDbStatusInfo => { - return { - Message: __expectString(output.Message), - Normal: __expectBoolean(output.Normal), - Status: __expectString(output.Status), - StatusType: __expectString(output.StatusType), - } as any; -}; - -/** - * deserializeAws_restJson1AwsRdsDbStatusInfos - */ -const de_AwsRdsDbStatusInfos = (output: any, context: __SerdeContext): AwsRdsDbStatusInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbStatusInfo(entry, context); - }); - return retVal; -}; +// se_AwsWafRuleDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSubnetGroup - */ -const de_AwsRdsDbSubnetGroup = (output: any, context: __SerdeContext): AwsRdsDbSubnetGroup => { - return { - DbSubnetGroupArn: __expectString(output.DbSubnetGroupArn), - DbSubnetGroupDescription: __expectString(output.DbSubnetGroupDescription), - DbSubnetGroupName: __expectString(output.DbSubnetGroupName), - SubnetGroupStatus: __expectString(output.SubnetGroupStatus), - Subnets: output.Subnets != null ? de_AwsRdsDbSubnetGroupSubnets(output.Subnets, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// se_AwsWafRuleGroupDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSubnetGroupSubnet - */ -const de_AwsRdsDbSubnetGroupSubnet = (output: any, context: __SerdeContext): AwsRdsDbSubnetGroupSubnet => { - return { - SubnetAvailabilityZone: - output.SubnetAvailabilityZone != null - ? de_AwsRdsDbSubnetGroupSubnetAvailabilityZone(output.SubnetAvailabilityZone, context) - : undefined, - SubnetIdentifier: __expectString(output.SubnetIdentifier), - SubnetStatus: __expectString(output.SubnetStatus), - } as any; -}; +// se_AwsWafRuleGroupRulesActionDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSubnetGroupSubnetAvailabilityZone - */ -const de_AwsRdsDbSubnetGroupSubnetAvailabilityZone = ( - output: any, - context: __SerdeContext -): AwsRdsDbSubnetGroupSubnetAvailabilityZone => { - return { - Name: __expectString(output.Name), - } as any; -}; +// se_AwsWafRuleGroupRulesDetails omitted. -/** - * deserializeAws_restJson1AwsRdsDbSubnetGroupSubnets - */ -const de_AwsRdsDbSubnetGroupSubnets = (output: any, context: __SerdeContext): AwsRdsDbSubnetGroupSubnet[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRdsDbSubnetGroupSubnet(entry, context); - }); - return retVal; -}; +// se_AwsWafRuleGroupRulesList omitted. -/** - * deserializeAws_restJson1AwsRdsEventSubscriptionDetails - */ -const de_AwsRdsEventSubscriptionDetails = (output: any, context: __SerdeContext): AwsRdsEventSubscriptionDetails => { - return { - CustSubscriptionId: __expectString(output.CustSubscriptionId), - CustomerAwsId: __expectString(output.CustomerAwsId), - Enabled: __expectBoolean(output.Enabled), - EventCategoriesList: - output.EventCategoriesList != null ? de_NonEmptyStringList(output.EventCategoriesList, context) : undefined, - EventSubscriptionArn: __expectString(output.EventSubscriptionArn), - SnsTopicArn: __expectString(output.SnsTopicArn), - SourceIdsList: output.SourceIdsList != null ? de_NonEmptyStringList(output.SourceIdsList, context) : undefined, - SourceType: __expectString(output.SourceType), - Status: __expectString(output.Status), - SubscriptionCreationTime: __expectString(output.SubscriptionCreationTime), - } as any; -}; +// se_AwsWafRulePredicateList omitted. -/** - * deserializeAws_restJson1AwsRdsPendingCloudWatchLogsExports - */ -const de_AwsRdsPendingCloudWatchLogsExports = ( - output: any, - context: __SerdeContext -): AwsRdsPendingCloudWatchLogsExports => { - return { - LogTypesToDisable: output.LogTypesToDisable != null ? de_StringList(output.LogTypesToDisable, context) : undefined, - LogTypesToEnable: output.LogTypesToEnable != null ? de_StringList(output.LogTypesToEnable, context) : undefined, - } as any; -}; +// se_AwsWafRulePredicateListDetails omitted. -/** - * deserializeAws_restJson1AwsRedshiftClusterClusterNode - */ -const de_AwsRedshiftClusterClusterNode = (output: any, context: __SerdeContext): AwsRedshiftClusterClusterNode => { - return { - NodeRole: __expectString(output.NodeRole), - PrivateIpAddress: __expectString(output.PrivateIpAddress), - PublicIpAddress: __expectString(output.PublicIpAddress), - } as any; -}; +// se_AwsWafv2ActionAllowDetails omitted. + +// se_AwsWafv2ActionBlockDetails omitted. + +// se_AwsWafv2CustomHttpHeader omitted. + +// se_AwsWafv2CustomRequestHandlingDetails omitted. + +// se_AwsWafv2CustomResponseDetails omitted. + +// se_AwsWafv2InsertHeadersList omitted. + +// se_AwsWafv2RuleGroupDetails omitted. + +// se_AwsWafv2RulesActionCaptchaDetails omitted. + +// se_AwsWafv2RulesActionCountDetails omitted. + +// se_AwsWafv2RulesActionDetails omitted. + +// se_AwsWafv2RulesDetails omitted. + +// se_AwsWafv2RulesList omitted. + +// se_AwsWafv2VisibilityConfigDetails omitted. + +// se_AwsWafv2WebAclActionDetails omitted. + +// se_AwsWafv2WebAclCaptchaConfigDetails omitted. + +// se_AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails omitted. + +// se_AwsWafv2WebAclDetails omitted. + +// se_AwsWafWebAclDetails omitted. + +// se_AwsWafWebAclRule omitted. + +// se_AwsWafWebAclRuleList omitted. + +// se_AwsXrayEncryptionConfigDetails omitted. /** - * deserializeAws_restJson1AwsRedshiftClusterClusterNodes + * serializeAws_restJson1BatchImportFindingsRequestFindingList */ -const de_AwsRedshiftClusterClusterNodes = (output: any, context: __SerdeContext): AwsRedshiftClusterClusterNode[] => { - const retVal = (output || []) +const se_BatchImportFindingsRequestFindingList = (input: AwsSecurityFinding[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterClusterNode(entry, context); + .map((entry) => { + return se_AwsSecurityFinding(entry, context); }); - return retVal; }; +// se_BooleanFilter omitted. + +// se_BooleanFilterList omitted. + +// se_Cell omitted. + +// se_Cells omitted. + +// se_CidrBlockAssociation omitted. + +// se_CidrBlockAssociationList omitted. + +// se_City omitted. + +// se_ClassificationResult omitted. + +// se_ClassificationStatus omitted. + +// se_Compliance omitted. + +// se_ContainerDetails omitted. + +// se_Country omitted. + +// se_CustomDataIdentifiersDetections omitted. + +// se_CustomDataIdentifiersDetectionsList omitted. + +// se_CustomDataIdentifiersResult omitted. + /** - * deserializeAws_restJson1AwsRedshiftClusterClusterParameterGroup + * serializeAws_restJson1Cvss */ -const de_AwsRedshiftClusterClusterParameterGroup = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterParameterGroup => { - return { - ClusterParameterStatusList: - output.ClusterParameterStatusList != null - ? de_AwsRedshiftClusterClusterParameterStatusList(output.ClusterParameterStatusList, context) - : undefined, - ParameterApplyStatus: __expectString(output.ParameterApplyStatus), - ParameterGroupName: __expectString(output.ParameterGroupName), - } as any; +const se_Cvss = (input: Cvss, context: __SerdeContext): any => { + return take(input, { + Adjustments: _json, + BaseScore: __serializeFloat, + BaseVector: [], + Source: [], + Version: [], + }); }; /** - * deserializeAws_restJson1AwsRedshiftClusterClusterParameterGroups + * serializeAws_restJson1CvssList */ -const de_AwsRedshiftClusterClusterParameterGroups = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterParameterGroup[] => { - const retVal = (output || []) +const se_CvssList = (input: Cvss[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterClusterParameterGroup(entry, context); + .map((entry) => { + return se_Cvss(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1AwsRedshiftClusterClusterParameterStatus - */ -const de_AwsRedshiftClusterClusterParameterStatus = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterParameterStatus => { - return { - ParameterApplyErrorDescription: __expectString(output.ParameterApplyErrorDescription), - ParameterApplyStatus: __expectString(output.ParameterApplyStatus), - ParameterName: __expectString(output.ParameterName), - } as any; -}; +// se_DataClassificationDetails omitted. -/** - * deserializeAws_restJson1AwsRedshiftClusterClusterParameterStatusList - */ -const de_AwsRedshiftClusterClusterParameterStatusList = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterParameterStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterClusterParameterStatus(entry, context); - }); - return retVal; -}; +// se_DateFilter omitted. -/** - * deserializeAws_restJson1AwsRedshiftClusterClusterSecurityGroup - */ -const de_AwsRedshiftClusterClusterSecurityGroup = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterSecurityGroup => { - return { - ClusterSecurityGroupName: __expectString(output.ClusterSecurityGroupName), - Status: __expectString(output.Status), - } as any; -}; +// se_DateFilterList omitted. + +// se_DateRange omitted. + +// se_DnsRequestAction omitted. + +// se_FieldMap omitted. + +// se_FilePathList omitted. + +// se_FilePaths omitted. + +// se_FindingProviderFields omitted. + +// se_FindingProviderSeverity omitted. + +// se_FirewallPolicyDetails omitted. + +// se_FirewallPolicyStatefulRuleGroupReferencesDetails omitted. + +// se_FirewallPolicyStatefulRuleGroupReferencesList omitted. + +// se_FirewallPolicyStatelessCustomActionsDetails omitted. + +// se_FirewallPolicyStatelessCustomActionsList omitted. + +// se_FirewallPolicyStatelessRuleGroupReferencesDetails omitted. + +// se_FirewallPolicyStatelessRuleGroupReferencesList omitted. /** - * deserializeAws_restJson1AwsRedshiftClusterClusterSecurityGroups + * serializeAws_restJson1GeoLocation */ -const de_AwsRedshiftClusterClusterSecurityGroups = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterSecurityGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterClusterSecurityGroup(entry, context); - }); - return retVal; +const se_GeoLocation = (input: GeoLocation, context: __SerdeContext): any => { + return take(input, { + Lat: __serializeFloat, + Lon: __serializeFloat, + }); }; +// se_IcmpTypeCode omitted. + +// se_IntegerList omitted. + +// se_IpFilter omitted. + +// se_IpFilterList omitted. + +// se_IpOrganizationDetails omitted. + +// se_Ipv6CidrBlockAssociation omitted. + +// se_Ipv6CidrBlockAssociationList omitted. + +// se_KeywordFilter omitted. + +// se_KeywordFilterList omitted. + +// se_LoadBalancerState omitted. + +// se_Malware omitted. + +// se_MalwareList omitted. + +// se_MapFilter omitted. + +// se_MapFilterList omitted. + +// se_Network omitted. + /** - * deserializeAws_restJson1AwsRedshiftClusterClusterSnapshotCopyStatus + * serializeAws_restJson1NetworkConnectionAction */ -const de_AwsRedshiftClusterClusterSnapshotCopyStatus = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterClusterSnapshotCopyStatus => { - return { - DestinationRegion: __expectString(output.DestinationRegion), - ManualSnapshotRetentionPeriod: __expectInt32(output.ManualSnapshotRetentionPeriod), - RetentionPeriod: __expectInt32(output.RetentionPeriod), - SnapshotCopyGrantName: __expectString(output.SnapshotCopyGrantName), - } as any; +const se_NetworkConnectionAction = (input: NetworkConnectionAction, context: __SerdeContext): any => { + return take(input, { + Blocked: [], + ConnectionDirection: [], + LocalPortDetails: _json, + Protocol: [], + RemoteIpDetails: (_) => se_ActionRemoteIpDetails(_, context), + RemotePortDetails: _json, + }); }; +// se_NetworkHeader omitted. + +// se_NetworkPathComponent omitted. + +// se_NetworkPathComponentDetails omitted. + +// se_NetworkPathList omitted. + +// se_NonEmptyStringList omitted. + +// se_Note omitted. + +// se_NoteUpdate omitted. + /** - * deserializeAws_restJson1AwsRedshiftClusterDeferredMaintenanceWindow + * serializeAws_restJson1NumberFilter */ -const de_AwsRedshiftClusterDeferredMaintenanceWindow = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterDeferredMaintenanceWindow => { - return { - DeferMaintenanceEndTime: __expectString(output.DeferMaintenanceEndTime), - DeferMaintenanceIdentifier: __expectString(output.DeferMaintenanceIdentifier), - DeferMaintenanceStartTime: __expectString(output.DeferMaintenanceStartTime), - } as any; +const se_NumberFilter = (input: NumberFilter, context: __SerdeContext): any => { + return take(input, { + Eq: __serializeFloat, + Gte: __serializeFloat, + Lte: __serializeFloat, + }); }; /** - * deserializeAws_restJson1AwsRedshiftClusterDeferredMaintenanceWindows + * serializeAws_restJson1NumberFilterList */ -const de_AwsRedshiftClusterDeferredMaintenanceWindows = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterDeferredMaintenanceWindow[] => { - const retVal = (output || []) +const se_NumberFilterList = (input: NumberFilter[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterDeferredMaintenanceWindow(entry, context); + .map((entry) => { + return se_NumberFilter(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1AwsRedshiftClusterDetails - */ -const de_AwsRedshiftClusterDetails = (output: any, context: __SerdeContext): AwsRedshiftClusterDetails => { - return { - AllowVersionUpgrade: __expectBoolean(output.AllowVersionUpgrade), - AutomatedSnapshotRetentionPeriod: __expectInt32(output.AutomatedSnapshotRetentionPeriod), - AvailabilityZone: __expectString(output.AvailabilityZone), - ClusterAvailabilityStatus: __expectString(output.ClusterAvailabilityStatus), - ClusterCreateTime: __expectString(output.ClusterCreateTime), - ClusterIdentifier: __expectString(output.ClusterIdentifier), - ClusterNodes: - output.ClusterNodes != null ? de_AwsRedshiftClusterClusterNodes(output.ClusterNodes, context) : undefined, - ClusterParameterGroups: - output.ClusterParameterGroups != null - ? de_AwsRedshiftClusterClusterParameterGroups(output.ClusterParameterGroups, context) - : undefined, - ClusterPublicKey: __expectString(output.ClusterPublicKey), - ClusterRevisionNumber: __expectString(output.ClusterRevisionNumber), - ClusterSecurityGroups: - output.ClusterSecurityGroups != null - ? de_AwsRedshiftClusterClusterSecurityGroups(output.ClusterSecurityGroups, context) - : undefined, - ClusterSnapshotCopyStatus: - output.ClusterSnapshotCopyStatus != null - ? de_AwsRedshiftClusterClusterSnapshotCopyStatus(output.ClusterSnapshotCopyStatus, context) - : undefined, - ClusterStatus: __expectString(output.ClusterStatus), - ClusterSubnetGroupName: __expectString(output.ClusterSubnetGroupName), - ClusterVersion: __expectString(output.ClusterVersion), - DBName: __expectString(output.DBName), - DeferredMaintenanceWindows: - output.DeferredMaintenanceWindows != null - ? de_AwsRedshiftClusterDeferredMaintenanceWindows(output.DeferredMaintenanceWindows, context) - : undefined, - ElasticIpStatus: - output.ElasticIpStatus != null - ? de_AwsRedshiftClusterElasticIpStatus(output.ElasticIpStatus, context) - : undefined, - ElasticResizeNumberOfNodeOptions: __expectString(output.ElasticResizeNumberOfNodeOptions), - Encrypted: __expectBoolean(output.Encrypted), - Endpoint: output.Endpoint != null ? de_AwsRedshiftClusterEndpoint(output.Endpoint, context) : undefined, - EnhancedVpcRouting: __expectBoolean(output.EnhancedVpcRouting), - ExpectedNextSnapshotScheduleTime: __expectString(output.ExpectedNextSnapshotScheduleTime), - ExpectedNextSnapshotScheduleTimeStatus: __expectString(output.ExpectedNextSnapshotScheduleTimeStatus), - HsmStatus: output.HsmStatus != null ? de_AwsRedshiftClusterHsmStatus(output.HsmStatus, context) : undefined, - IamRoles: output.IamRoles != null ? de_AwsRedshiftClusterIamRoles(output.IamRoles, context) : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - LoggingStatus: - output.LoggingStatus != null ? de_AwsRedshiftClusterLoggingStatus(output.LoggingStatus, context) : undefined, - MaintenanceTrackName: __expectString(output.MaintenanceTrackName), - ManualSnapshotRetentionPeriod: __expectInt32(output.ManualSnapshotRetentionPeriod), - MasterUsername: __expectString(output.MasterUsername), - NextMaintenanceWindowStartTime: __expectString(output.NextMaintenanceWindowStartTime), - NodeType: __expectString(output.NodeType), - NumberOfNodes: __expectInt32(output.NumberOfNodes), - PendingActions: output.PendingActions != null ? de_StringList(output.PendingActions, context) : undefined, - PendingModifiedValues: - output.PendingModifiedValues != null - ? de_AwsRedshiftClusterPendingModifiedValues(output.PendingModifiedValues, context) - : undefined, - PreferredMaintenanceWindow: __expectString(output.PreferredMaintenanceWindow), - PubliclyAccessible: __expectBoolean(output.PubliclyAccessible), - ResizeInfo: output.ResizeInfo != null ? de_AwsRedshiftClusterResizeInfo(output.ResizeInfo, context) : undefined, - RestoreStatus: - output.RestoreStatus != null ? de_AwsRedshiftClusterRestoreStatus(output.RestoreStatus, context) : undefined, - SnapshotScheduleIdentifier: __expectString(output.SnapshotScheduleIdentifier), - SnapshotScheduleState: __expectString(output.SnapshotScheduleState), - VpcId: __expectString(output.VpcId), - VpcSecurityGroups: - output.VpcSecurityGroups != null - ? de_AwsRedshiftClusterVpcSecurityGroups(output.VpcSecurityGroups, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsRedshiftClusterElasticIpStatus - */ -const de_AwsRedshiftClusterElasticIpStatus = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterElasticIpStatus => { - return { - ElasticIp: __expectString(output.ElasticIp), - Status: __expectString(output.Status), - } as any; -}; +// se_Occurrences omitted. -/** - * deserializeAws_restJson1AwsRedshiftClusterEndpoint - */ -const de_AwsRedshiftClusterEndpoint = (output: any, context: __SerdeContext): AwsRedshiftClusterEndpoint => { - return { - Address: __expectString(output.Address), - Port: __expectInt32(output.Port), - } as any; -}; +// se_Page omitted. + +// se_Pages omitted. + +// se_PatchSummary omitted. /** - * deserializeAws_restJson1AwsRedshiftClusterHsmStatus + * serializeAws_restJson1PortProbeAction */ -const de_AwsRedshiftClusterHsmStatus = (output: any, context: __SerdeContext): AwsRedshiftClusterHsmStatus => { - return { - HsmClientCertificateIdentifier: __expectString(output.HsmClientCertificateIdentifier), - HsmConfigurationIdentifier: __expectString(output.HsmConfigurationIdentifier), - Status: __expectString(output.Status), - } as any; +const se_PortProbeAction = (input: PortProbeAction, context: __SerdeContext): any => { + return take(input, { + Blocked: [], + PortProbeDetails: (_) => se_PortProbeDetailList(_, context), + }); }; /** - * deserializeAws_restJson1AwsRedshiftClusterIamRole + * serializeAws_restJson1PortProbeDetail */ -const de_AwsRedshiftClusterIamRole = (output: any, context: __SerdeContext): AwsRedshiftClusterIamRole => { - return { - ApplyStatus: __expectString(output.ApplyStatus), - IamRoleArn: __expectString(output.IamRoleArn), - } as any; +const se_PortProbeDetail = (input: PortProbeDetail, context: __SerdeContext): any => { + return take(input, { + LocalIpDetails: _json, + LocalPortDetails: _json, + RemoteIpDetails: (_) => se_ActionRemoteIpDetails(_, context), + }); }; /** - * deserializeAws_restJson1AwsRedshiftClusterIamRoles + * serializeAws_restJson1PortProbeDetailList */ -const de_AwsRedshiftClusterIamRoles = (output: any, context: __SerdeContext): AwsRedshiftClusterIamRole[] => { - const retVal = (output || []) +const se_PortProbeDetailList = (input: PortProbeDetail[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterIamRole(entry, context); + .map((entry) => { + return se_PortProbeDetail(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1AwsRedshiftClusterLoggingStatus - */ -const de_AwsRedshiftClusterLoggingStatus = (output: any, context: __SerdeContext): AwsRedshiftClusterLoggingStatus => { - return { - BucketName: __expectString(output.BucketName), - LastFailureMessage: __expectString(output.LastFailureMessage), - LastFailureTime: __expectString(output.LastFailureTime), - LastSuccessfulDeliveryTime: __expectString(output.LastSuccessfulDeliveryTime), - LoggingEnabled: __expectBoolean(output.LoggingEnabled), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - } as any; -}; +// se_PortRange omitted. -/** - * deserializeAws_restJson1AwsRedshiftClusterPendingModifiedValues - */ -const de_AwsRedshiftClusterPendingModifiedValues = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterPendingModifiedValues => { - return { - AutomatedSnapshotRetentionPeriod: __expectInt32(output.AutomatedSnapshotRetentionPeriod), - ClusterIdentifier: __expectString(output.ClusterIdentifier), - ClusterType: __expectString(output.ClusterType), - ClusterVersion: __expectString(output.ClusterVersion), - EncryptionType: __expectString(output.EncryptionType), - EnhancedVpcRouting: __expectBoolean(output.EnhancedVpcRouting), - MaintenanceTrackName: __expectString(output.MaintenanceTrackName), - MasterUserPassword: __expectString(output.MasterUserPassword), - NodeType: __expectString(output.NodeType), - NumberOfNodes: __expectInt32(output.NumberOfNodes), - PubliclyAccessible: __expectBoolean(output.PubliclyAccessible), - } as any; -}; +// se_PortRangeFromTo omitted. -/** - * deserializeAws_restJson1AwsRedshiftClusterResizeInfo - */ -const de_AwsRedshiftClusterResizeInfo = (output: any, context: __SerdeContext): AwsRedshiftClusterResizeInfo => { - return { - AllowCancelResize: __expectBoolean(output.AllowCancelResize), - ResizeType: __expectString(output.ResizeType), - } as any; -}; +// se_PortRangeList omitted. + +// se_ProcessDetails omitted. + +// se_PropagatingVgwSetDetails omitted. + +// se_PropagatingVgwSetList omitted. + +// se_Range omitted. + +// se_Ranges omitted. + +// se_Recommendation omitted. + +// se__Record omitted. + +// se_Records omitted. + +// se_RelatedFinding omitted. + +// se_RelatedFindingList omitted. + +// se_RelatedRequirementsList omitted. + +// se_Remediation omitted. /** - * deserializeAws_restJson1AwsRedshiftClusterRestoreStatus + * serializeAws_restJson1Resource */ -const de_AwsRedshiftClusterRestoreStatus = (output: any, context: __SerdeContext): AwsRedshiftClusterRestoreStatus => { - return { - CurrentRestoreRateInMegaBytesPerSecond: __limitedParseDouble(output.CurrentRestoreRateInMegaBytesPerSecond), - ElapsedTimeInSeconds: __expectLong(output.ElapsedTimeInSeconds), - EstimatedTimeToCompletionInSeconds: __expectLong(output.EstimatedTimeToCompletionInSeconds), - ProgressInMegaBytes: __expectLong(output.ProgressInMegaBytes), - SnapshotSizeInMegaBytes: __expectLong(output.SnapshotSizeInMegaBytes), - Status: __expectString(output.Status), - } as any; +const se_Resource = (input: Resource, context: __SerdeContext): any => { + return take(input, { + DataClassification: _json, + Details: (_) => se_ResourceDetails(_, context), + Id: [], + Partition: [], + Region: [], + ResourceRole: [], + Tags: _json, + Type: [], + }); }; /** - * deserializeAws_restJson1AwsRedshiftClusterVpcSecurityGroup + * serializeAws_restJson1ResourceDetails */ -const de_AwsRedshiftClusterVpcSecurityGroup = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterVpcSecurityGroup => { - return { - Status: __expectString(output.Status), - VpcSecurityGroupId: __expectString(output.VpcSecurityGroupId), - } as any; +const se_ResourceDetails = (input: ResourceDetails, context: __SerdeContext): any => { + return take(input, { + AwsApiGatewayRestApi: _json, + AwsApiGatewayStage: (_) => se_AwsApiGatewayStageDetails(_, context), + AwsApiGatewayV2Api: _json, + AwsApiGatewayV2Stage: (_) => se_AwsApiGatewayV2StageDetails(_, context), + AwsAutoScalingAutoScalingGroup: _json, + AwsAutoScalingLaunchConfiguration: _json, + AwsBackupBackupPlan: _json, + AwsBackupBackupVault: _json, + AwsBackupRecoveryPoint: _json, + AwsCertificateManagerCertificate: _json, + AwsCloudFormationStack: _json, + AwsCloudFrontDistribution: _json, + AwsCloudTrailTrail: _json, + AwsCloudWatchAlarm: (_) => se_AwsCloudWatchAlarmDetails(_, context), + AwsCodeBuildProject: _json, + AwsDynamoDbTable: _json, + AwsEc2Eip: _json, + AwsEc2Instance: _json, + AwsEc2LaunchTemplate: (_) => se_AwsEc2LaunchTemplateDetails(_, context), + AwsEc2NetworkAcl: _json, + AwsEc2NetworkInterface: _json, + AwsEc2RouteTable: _json, + AwsEc2SecurityGroup: _json, + AwsEc2Subnet: _json, + AwsEc2TransitGateway: _json, + AwsEc2Volume: _json, + AwsEc2Vpc: _json, + AwsEc2VpcEndpointService: _json, + AwsEc2VpcPeeringConnection: _json, + AwsEc2VpnConnection: _json, + AwsEcrContainerImage: _json, + AwsEcrRepository: _json, + AwsEcsCluster: _json, + AwsEcsContainer: _json, + AwsEcsService: _json, + AwsEcsTask: _json, + AwsEcsTaskDefinition: _json, + AwsEfsAccessPoint: _json, + AwsEksCluster: _json, + AwsElasticBeanstalkEnvironment: _json, + AwsElasticsearchDomain: _json, + AwsElbLoadBalancer: _json, + AwsElbv2LoadBalancer: _json, + AwsIamAccessKey: _json, + AwsIamGroup: _json, + AwsIamPolicy: _json, + AwsIamRole: _json, + AwsIamUser: _json, + AwsKinesisStream: _json, + AwsKmsKey: (_) => se_AwsKmsKeyDetails(_, context), + AwsLambdaFunction: _json, + AwsLambdaLayerVersion: _json, + AwsNetworkFirewallFirewall: _json, + AwsNetworkFirewallFirewallPolicy: _json, + AwsNetworkFirewallRuleGroup: (_) => se_AwsNetworkFirewallRuleGroupDetails(_, context), + AwsOpenSearchServiceDomain: _json, + AwsRdsDbCluster: _json, + AwsRdsDbClusterSnapshot: _json, + AwsRdsDbInstance: _json, + AwsRdsDbSecurityGroup: _json, + AwsRdsDbSnapshot: _json, + AwsRdsEventSubscription: _json, + AwsRedshiftCluster: (_) => se_AwsRedshiftClusterDetails(_, context), + AwsS3AccountPublicAccessBlock: _json, + AwsS3Bucket: _json, + AwsS3Object: _json, + AwsSageMakerNotebookInstance: _json, + AwsSecretsManagerSecret: _json, + AwsSnsTopic: _json, + AwsSqsQueue: _json, + AwsSsmPatchCompliance: _json, + AwsWafRateBasedRule: _json, + AwsWafRegionalRateBasedRule: _json, + AwsWafRegionalRule: _json, + AwsWafRegionalRuleGroup: _json, + AwsWafRegionalWebAcl: _json, + AwsWafRule: _json, + AwsWafRuleGroup: _json, + AwsWafWebAcl: _json, + AwsWafv2RuleGroup: _json, + AwsWafv2WebAcl: _json, + AwsXrayEncryptionConfig: _json, + Container: _json, + Other: _json, + }); }; /** - * deserializeAws_restJson1AwsRedshiftClusterVpcSecurityGroups + * serializeAws_restJson1ResourceList */ -const de_AwsRedshiftClusterVpcSecurityGroups = ( - output: any, - context: __SerdeContext -): AwsRedshiftClusterVpcSecurityGroup[] => { - const retVal = (output || []) +const se_ResourceList = (input: Resource[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsRedshiftClusterVpcSecurityGroup(entry, context); + .map((entry) => { + return se_Resource(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1AwsS3AccountPublicAccessBlockDetails - */ -const de_AwsS3AccountPublicAccessBlockDetails = ( - output: any, - context: __SerdeContext -): AwsS3AccountPublicAccessBlockDetails => { - return { - BlockPublicAcls: __expectBoolean(output.BlockPublicAcls), - BlockPublicPolicy: __expectBoolean(output.BlockPublicPolicy), - IgnorePublicAcls: __expectBoolean(output.IgnorePublicAcls), - RestrictPublicBuckets: __expectBoolean(output.RestrictPublicBuckets), - } as any; -}; +// se_RouteSetDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationDetails - */ -const de_AwsS3BucketBucketLifecycleConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationDetails => { - return { - Rules: - output.Rules != null ? de_AwsS3BucketBucketLifecycleConfigurationRulesList(output.Rules, context) : undefined, - } as any; -}; +// se_RouteSetList omitted. + +// se_RuleGroupDetails omitted. + +// se_RuleGroupSource omitted. + +// se_RuleGroupSourceCustomActionsDetails omitted. + +// se_RuleGroupSourceCustomActionsList omitted. + +// se_RuleGroupSourceListDetails omitted. + +// se_RuleGroupSourceStatefulRulesDetails omitted. + +// se_RuleGroupSourceStatefulRulesHeaderDetails omitted. + +// se_RuleGroupSourceStatefulRulesList omitted. + +// se_RuleGroupSourceStatefulRulesOptionsDetails omitted. + +// se_RuleGroupSourceStatefulRulesOptionsList omitted. + +// se_RuleGroupSourceStatefulRulesRuleOptionsSettingsList omitted. + +// se_RuleGroupSourceStatelessRuleDefinition omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributes omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesDestinations omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesDestinationsList omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesProtocolsList omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesSourcePorts omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesSources omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesSourcesList omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesTcpFlags omitted. + +// se_RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList omitted. + +// se_RuleGroupSourceStatelessRulesAndCustomActionsDetails omitted. + +// se_RuleGroupSourceStatelessRulesDetails omitted. + +// se_RuleGroupSourceStatelessRulesList omitted. + +// se_RuleGroupVariables omitted. + +// se_RuleGroupVariablesIpSetsDetails omitted. + +// se_RuleGroupVariablesPortSetsDetails omitted. + +// se_SecurityGroups omitted. + +// se_SensitiveDataDetections omitted. + +// se_SensitiveDataDetectionsList omitted. + +// se_SensitiveDataResult omitted. + +// se_SensitiveDataResultList omitted. /** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails + * serializeAws_restJson1Severity */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails => { - return { - DaysAfterInitiation: __expectInt32(output.DaysAfterInitiation), - } as any; +const se_Severity = (input: Severity, context: __SerdeContext): any => { + return take(input, { + Label: [], + Normalized: [], + Original: [], + Product: __serializeFloat, + }); }; /** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesDetails + * serializeAws_restJson1SeverityUpdate */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesDetails => { - return { - AbortIncompleteMultipartUpload: - output.AbortIncompleteMultipartUpload != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails( - output.AbortIncompleteMultipartUpload, - context - ) - : undefined, - ExpirationDate: __expectString(output.ExpirationDate), - ExpirationInDays: __expectInt32(output.ExpirationInDays), - ExpiredObjectDeleteMarker: __expectBoolean(output.ExpiredObjectDeleteMarker), - Filter: - output.Filter != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails(output.Filter, context) - : undefined, - ID: __expectString(output.ID), - NoncurrentVersionExpirationInDays: __expectInt32(output.NoncurrentVersionExpirationInDays), - NoncurrentVersionTransitions: - output.NoncurrentVersionTransitions != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList( - output.NoncurrentVersionTransitions, - context - ) - : undefined, - Prefix: __expectString(output.Prefix), - Status: __expectString(output.Status), - Transitions: - output.Transitions != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList(output.Transitions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails => { - return { - Predicate: - output.Predicate != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails(output.Predicate, context) - : undefined, - } as any; +const se_SeverityUpdate = (input: SeverityUpdate, context: __SerdeContext): any => { + return take(input, { + Label: [], + Normalized: [], + Product: __serializeFloat, + }); }; -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails => { - return { - Operands: - output.Operands != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList(output.Operands, context) - : undefined, - Prefix: __expectString(output.Prefix), - Tag: - output.Tag != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails(output.Tag, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; +// se_SoftwarePackage omitted. + +// se_SoftwarePackageList omitted. + +// se_SortCriteria omitted. + +// se_SortCriterion omitted. + +// se_StandardsControlAssociationId omitted. + +// se_StandardsControlAssociationIds omitted. + +// se_StandardsControlAssociationUpdate omitted. + +// se_StandardsControlAssociationUpdates omitted. + +// se_StandardsInputParameterMap omitted. + +// se_StandardsSubscriptionArns omitted. + +// se_StandardsSubscriptionRequest omitted. + +// se_StandardsSubscriptionRequests omitted. + +// se_StatelessCustomActionDefinition omitted. + +// se_StatelessCustomPublishMetricAction omitted. + +// se_StatelessCustomPublishMetricActionDimension omitted. + +// se_StatelessCustomPublishMetricActionDimensionsList omitted. + +// se_StatusReason omitted. + +// se_StatusReasonsList omitted. + +// se_StringFilter omitted. + +// se_StringFilterList omitted. + +// se_StringList omitted. + +// se_TagMap omitted. + +// se_Threat omitted. + +// se_ThreatIntelIndicator omitted. + +// se_ThreatIntelIndicatorList omitted. + +// se_ThreatList omitted. + +// se_TypeList omitted. + +// se_VolumeMount omitted. + +// se_VolumeMountList omitted. + +// se_VpcInfoCidrBlockSetDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails => { - return { - Prefix: __expectString(output.Prefix), - Tag: - output.Tag != null - ? de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails(output.Tag, context) - : undefined, - Type: __expectString(output.Type), - } as any; -}; +// se_VpcInfoCidrBlockSetList omitted. -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails(entry, context); - }); - return retVal; -}; +// se_VpcInfoIpv6CidrBlockSetDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// se_VpcInfoIpv6CidrBlockSetList omitted. + +// se_VpcInfoPeeringOptionsDetails omitted. /** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails + * serializeAws_restJson1Vulnerability */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const se_Vulnerability = (input: Vulnerability, context: __SerdeContext): any => { + return take(input, { + Cvss: (_) => se_CvssList(_, context), + FixAvailable: [], + Id: [], + ReferenceUrls: _json, + RelatedVulnerabilities: _json, + Vendor: _json, + VulnerablePackages: _json, + }); }; /** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesList + * serializeAws_restJson1VulnerabilityList */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesList = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesDetails[] => { - const retVal = (output || []) +const se_VulnerabilityList = (input: Vulnerability[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketBucketLifecycleConfigurationRulesDetails(entry, context); + .map((entry) => { + return se_Vulnerability(entry, context); }); - return retVal; }; -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails => { - return { - Days: __expectInt32(output.Days), - StorageClass: __expectString(output.StorageClass), - } as any; -}; +// se_VulnerabilityVendor omitted. -/** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList - */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails(entry, context); - }); - return retVal; -}; +// se_WafAction omitted. + +// se_WafExcludedRule omitted. + +// se_WafExcludedRuleList omitted. + +// se_WafOverrideAction omitted. + +// se_Workflow omitted. + +// se_WorkflowUpdate omitted. /** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails + * deserializeAws_restJson1Action */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails => { - return { - Date: __expectString(output.Date), - Days: __expectInt32(output.Days), - StorageClass: __expectString(output.StorageClass), - } as any; +const de_Action = (output: any, context: __SerdeContext): Action => { + return take(output, { + ActionType: __expectString, + AwsApiCallAction: (_: any) => de_AwsApiCallAction(_, context), + DnsRequestAction: _json, + NetworkConnectionAction: (_: any) => de_NetworkConnectionAction(_, context), + PortProbeAction: (_: any) => de_PortProbeAction(_, context), + }) as any; }; +// de_ActionLocalIpDetails omitted. + +// de_ActionLocalPortDetails omitted. + /** - * deserializeAws_restJson1AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList + * deserializeAws_restJson1ActionRemoteIpDetails */ -const de_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails(entry, context); - }); - return retVal; +const de_ActionRemoteIpDetails = (output: any, context: __SerdeContext): ActionRemoteIpDetails => { + return take(output, { + City: _json, + Country: _json, + GeoLocation: (_: any) => de_GeoLocation(_, context), + IpAddressV4: __expectString, + Organization: _json, + }) as any; }; +// de_ActionRemotePortDetails omitted. + +// de_ActionTarget omitted. + +// de_ActionTargetList omitted. + +// de_Adjustment omitted. + +// de_AdjustmentList omitted. + +// de_AdminAccount omitted. + +// de_AdminAccounts omitted. + +// de_AssociatedStandard omitted. + +// de_AssociatedStandardsList omitted. + +// de_AssociationSetDetails omitted. + +// de_AssociationSetList omitted. + +// de_AssociationStateDetails omitted. + +// de_AvailabilityZone omitted. + +// de_AvailabilityZones omitted. + /** - * deserializeAws_restJson1AwsS3BucketBucketVersioningConfiguration + * deserializeAws_restJson1AwsApiCallAction */ -const de_AwsS3BucketBucketVersioningConfiguration = ( - output: any, - context: __SerdeContext -): AwsS3BucketBucketVersioningConfiguration => { - return { - IsMfaDeleteEnabled: __expectBoolean(output.IsMfaDeleteEnabled), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1AwsS3BucketDetails - */ -const de_AwsS3BucketDetails = (output: any, context: __SerdeContext): AwsS3BucketDetails => { - return { - AccessControlList: __expectString(output.AccessControlList), - BucketLifecycleConfiguration: - output.BucketLifecycleConfiguration != null - ? de_AwsS3BucketBucketLifecycleConfigurationDetails(output.BucketLifecycleConfiguration, context) - : undefined, - BucketLoggingConfiguration: - output.BucketLoggingConfiguration != null - ? de_AwsS3BucketLoggingConfiguration(output.BucketLoggingConfiguration, context) - : undefined, - BucketNotificationConfiguration: - output.BucketNotificationConfiguration != null - ? de_AwsS3BucketNotificationConfiguration(output.BucketNotificationConfiguration, context) - : undefined, - BucketVersioningConfiguration: - output.BucketVersioningConfiguration != null - ? de_AwsS3BucketBucketVersioningConfiguration(output.BucketVersioningConfiguration, context) - : undefined, - BucketWebsiteConfiguration: - output.BucketWebsiteConfiguration != null - ? de_AwsS3BucketWebsiteConfiguration(output.BucketWebsiteConfiguration, context) - : undefined, - CreatedAt: __expectString(output.CreatedAt), - ObjectLockConfiguration: - output.ObjectLockConfiguration != null - ? de_AwsS3BucketObjectLockConfiguration(output.ObjectLockConfiguration, context) - : undefined, - OwnerAccountId: __expectString(output.OwnerAccountId), - OwnerId: __expectString(output.OwnerId), - OwnerName: __expectString(output.OwnerName), - PublicAccessBlockConfiguration: - output.PublicAccessBlockConfiguration != null - ? de_AwsS3AccountPublicAccessBlockDetails(output.PublicAccessBlockConfiguration, context) - : undefined, - ServerSideEncryptionConfiguration: - output.ServerSideEncryptionConfiguration != null - ? de_AwsS3BucketServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsS3BucketLoggingConfiguration - */ -const de_AwsS3BucketLoggingConfiguration = (output: any, context: __SerdeContext): AwsS3BucketLoggingConfiguration => { - return { - DestinationBucketName: __expectString(output.DestinationBucketName), - LogFilePrefix: __expectString(output.LogFilePrefix), - } as any; -}; - -/** - * deserializeAws_restJson1AwsS3BucketNotificationConfiguration - */ -const de_AwsS3BucketNotificationConfiguration = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfiguration => { - return { - Configurations: - output.Configurations != null - ? de_AwsS3BucketNotificationConfigurationDetails(output.Configurations, context) - : undefined, - } as any; +const de_AwsApiCallAction = (output: any, context: __SerdeContext): AwsApiCallAction => { + return take(output, { + AffectedResources: _json, + Api: __expectString, + CallerType: __expectString, + DomainDetails: _json, + FirstSeen: __expectString, + LastSeen: __expectString, + RemoteIpDetails: (_: any) => de_ActionRemoteIpDetails(_, context), + ServiceName: __expectString, + }) as any; }; +// de_AwsApiCallActionDomainDetails omitted. + +// de_AwsApiGatewayAccessLogSettings omitted. + /** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationDetail + * deserializeAws_restJson1AwsApiGatewayCanarySettings */ -const de_AwsS3BucketNotificationConfigurationDetail = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfigurationDetail => { - return { - Destination: __expectString(output.Destination), - Events: output.Events != null ? de_AwsS3BucketNotificationConfigurationEvents(output.Events, context) : undefined, - Filter: output.Filter != null ? de_AwsS3BucketNotificationConfigurationFilter(output.Filter, context) : undefined, - Type: __expectString(output.Type), - } as any; +const de_AwsApiGatewayCanarySettings = (output: any, context: __SerdeContext): AwsApiGatewayCanarySettings => { + return take(output, { + DeploymentId: __expectString, + PercentTraffic: __limitedParseDouble, + StageVariableOverrides: _json, + UseStageCache: __expectBoolean, + }) as any; }; +// de_AwsApiGatewayEndpointConfiguration omitted. + /** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationDetails + * deserializeAws_restJson1AwsApiGatewayMethodSettings */ -const de_AwsS3BucketNotificationConfigurationDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfigurationDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketNotificationConfigurationDetail(entry, context); - }); - return retVal; +const de_AwsApiGatewayMethodSettings = (output: any, context: __SerdeContext): AwsApiGatewayMethodSettings => { + return take(output, { + CacheDataEncrypted: __expectBoolean, + CacheTtlInSeconds: __expectInt32, + CachingEnabled: __expectBoolean, + DataTraceEnabled: __expectBoolean, + HttpMethod: __expectString, + LoggingLevel: __expectString, + MetricsEnabled: __expectBoolean, + RequireAuthorizationForCacheControl: __expectBoolean, + ResourcePath: __expectString, + ThrottlingBurstLimit: __expectInt32, + ThrottlingRateLimit: __limitedParseDouble, + UnauthorizedCacheControlHeaderStrategy: __expectString, + }) as any; }; /** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationEvents + * deserializeAws_restJson1AwsApiGatewayMethodSettingsList */ -const de_AwsS3BucketNotificationConfigurationEvents = (output: any, context: __SerdeContext): string[] => { +const de_AwsApiGatewayMethodSettingsList = (output: any, context: __SerdeContext): AwsApiGatewayMethodSettings[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AwsApiGatewayMethodSettings(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationFilter - */ -const de_AwsS3BucketNotificationConfigurationFilter = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfigurationFilter => { - return { - S3KeyFilter: - output.S3KeyFilter != null - ? de_AwsS3BucketNotificationConfigurationS3KeyFilter(output.S3KeyFilter, context) - : undefined, - } as any; -}; +// de_AwsApiGatewayRestApiDetails omitted. /** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationS3KeyFilter + * deserializeAws_restJson1AwsApiGatewayStageDetails */ -const de_AwsS3BucketNotificationConfigurationS3KeyFilter = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfigurationS3KeyFilter => { - return { - FilterRules: - output.FilterRules != null - ? de_AwsS3BucketNotificationConfigurationS3KeyFilterRules(output.FilterRules, context) - : undefined, - } as any; -}; +const de_AwsApiGatewayStageDetails = (output: any, context: __SerdeContext): AwsApiGatewayStageDetails => { + return take(output, { + AccessLogSettings: _json, + CacheClusterEnabled: __expectBoolean, + CacheClusterSize: __expectString, + CacheClusterStatus: __expectString, + CanarySettings: (_: any) => de_AwsApiGatewayCanarySettings(_, context), + ClientCertificateId: __expectString, + CreatedDate: __expectString, + DeploymentId: __expectString, + Description: __expectString, + DocumentationVersion: __expectString, + LastUpdatedDate: __expectString, + MethodSettings: (_: any) => de_AwsApiGatewayMethodSettingsList(_, context), + StageName: __expectString, + TracingEnabled: __expectBoolean, + Variables: _json, + WebAclArn: __expectString, + }) as any; +}; + +// de_AwsApiGatewayV2ApiDetails omitted. /** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationS3KeyFilterRule + * deserializeAws_restJson1AwsApiGatewayV2RouteSettings */ -const de_AwsS3BucketNotificationConfigurationS3KeyFilterRule = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfigurationS3KeyFilterRule => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; +const de_AwsApiGatewayV2RouteSettings = (output: any, context: __SerdeContext): AwsApiGatewayV2RouteSettings => { + return take(output, { + DataTraceEnabled: __expectBoolean, + DetailedMetricsEnabled: __expectBoolean, + LoggingLevel: __expectString, + ThrottlingBurstLimit: __expectInt32, + ThrottlingRateLimit: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1AwsS3BucketNotificationConfigurationS3KeyFilterRules + * deserializeAws_restJson1AwsApiGatewayV2StageDetails */ -const de_AwsS3BucketNotificationConfigurationS3KeyFilterRules = ( - output: any, - context: __SerdeContext -): AwsS3BucketNotificationConfigurationS3KeyFilterRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketNotificationConfigurationS3KeyFilterRule(entry, context); - }); - return retVal; +const de_AwsApiGatewayV2StageDetails = (output: any, context: __SerdeContext): AwsApiGatewayV2StageDetails => { + return take(output, { + AccessLogSettings: _json, + ApiGatewayManaged: __expectBoolean, + AutoDeploy: __expectBoolean, + ClientCertificateId: __expectString, + CreatedDate: __expectString, + DefaultRouteSettings: (_: any) => de_AwsApiGatewayV2RouteSettings(_, context), + DeploymentId: __expectString, + Description: __expectString, + LastDeploymentStatusMessage: __expectString, + LastUpdatedDate: __expectString, + RouteSettings: (_: any) => de_AwsApiGatewayV2RouteSettings(_, context), + StageName: __expectString, + StageVariables: _json, + }) as any; }; -/** - * deserializeAws_restJson1AwsS3BucketObjectLockConfiguration - */ -const de_AwsS3BucketObjectLockConfiguration = ( - output: any, - context: __SerdeContext -): AwsS3BucketObjectLockConfiguration => { - return { - ObjectLockEnabled: __expectString(output.ObjectLockEnabled), - Rule: output.Rule != null ? de_AwsS3BucketObjectLockConfigurationRuleDetails(output.Rule, context) : undefined, - } as any; -}; +// de_AwsAutoScalingAutoScalingGroupAvailabilityZonesList omitted. + +// de_AwsAutoScalingAutoScalingGroupAvailabilityZonesListDetails omitted. + +// de_AwsAutoScalingAutoScalingGroupDetails omitted. + +// de_AwsAutoScalingAutoScalingGroupLaunchTemplateLaunchTemplateSpecification omitted. + +// de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyDetails omitted. + +// de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails omitted. + +// de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateDetails omitted. + +// de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification omitted. + +// de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesList omitted. + +// de_AwsAutoScalingAutoScalingGroupMixedInstancesPolicyLaunchTemplateOverridesListDetails omitted. + +// de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsDetails omitted. + +// de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsEbsDetails omitted. + +// de_AwsAutoScalingLaunchConfigurationBlockDeviceMappingsList omitted. + +// de_AwsAutoScalingLaunchConfigurationDetails omitted. + +// de_AwsAutoScalingLaunchConfigurationInstanceMonitoringDetails omitted. + +// de_AwsAutoScalingLaunchConfigurationMetadataOptions omitted. + +// de_AwsBackupBackupPlanAdvancedBackupSettingsDetails omitted. + +// de_AwsBackupBackupPlanAdvancedBackupSettingsList omitted. + +// de_AwsBackupBackupPlanBackupPlanDetails omitted. + +// de_AwsBackupBackupPlanDetails omitted. + +// de_AwsBackupBackupPlanLifecycleDetails omitted. + +// de_AwsBackupBackupPlanRuleCopyActionsDetails omitted. + +// de_AwsBackupBackupPlanRuleCopyActionsList omitted. + +// de_AwsBackupBackupPlanRuleDetails omitted. + +// de_AwsBackupBackupPlanRuleList omitted. + +// de_AwsBackupBackupVaultDetails omitted. + +// de_AwsBackupBackupVaultNotificationsDetails omitted. + +// de_AwsBackupRecoveryPointCalculatedLifecycleDetails omitted. + +// de_AwsBackupRecoveryPointCreatedByDetails omitted. + +// de_AwsBackupRecoveryPointDetails omitted. + +// de_AwsBackupRecoveryPointLifecycleDetails omitted. + +// de_AwsCertificateManagerCertificateDetails omitted. + +// de_AwsCertificateManagerCertificateDomainValidationOption omitted. + +// de_AwsCertificateManagerCertificateDomainValidationOptions omitted. + +// de_AwsCertificateManagerCertificateExtendedKeyUsage omitted. + +// de_AwsCertificateManagerCertificateExtendedKeyUsages omitted. + +// de_AwsCertificateManagerCertificateKeyUsage omitted. + +// de_AwsCertificateManagerCertificateKeyUsages omitted. + +// de_AwsCertificateManagerCertificateOptions omitted. + +// de_AwsCertificateManagerCertificateRenewalSummary omitted. + +// de_AwsCertificateManagerCertificateResourceRecord omitted. + +// de_AwsCloudFormationStackDetails omitted. + +// de_AwsCloudFormationStackDriftInformationDetails omitted. + +// de_AwsCloudFormationStackOutputsDetails omitted. + +// de_AwsCloudFormationStackOutputsList omitted. + +// de_AwsCloudFrontDistributionCacheBehavior omitted. + +// de_AwsCloudFrontDistributionCacheBehaviors omitted. + +// de_AwsCloudFrontDistributionCacheBehaviorsItemList omitted. + +// de_AwsCloudFrontDistributionDefaultCacheBehavior omitted. + +// de_AwsCloudFrontDistributionDetails omitted. + +// de_AwsCloudFrontDistributionLogging omitted. + +// de_AwsCloudFrontDistributionOriginCustomOriginConfig omitted. + +// de_AwsCloudFrontDistributionOriginGroup omitted. + +// de_AwsCloudFrontDistributionOriginGroupFailover omitted. + +// de_AwsCloudFrontDistributionOriginGroupFailoverStatusCodes omitted. + +// de_AwsCloudFrontDistributionOriginGroupFailoverStatusCodesItemList omitted. + +// de_AwsCloudFrontDistributionOriginGroups omitted. + +// de_AwsCloudFrontDistributionOriginGroupsItemList omitted. + +// de_AwsCloudFrontDistributionOriginItem omitted. + +// de_AwsCloudFrontDistributionOriginItemList omitted. + +// de_AwsCloudFrontDistributionOrigins omitted. + +// de_AwsCloudFrontDistributionOriginS3OriginConfig omitted. + +// de_AwsCloudFrontDistributionOriginSslProtocols omitted. + +// de_AwsCloudFrontDistributionViewerCertificate omitted. + +// de_AwsCloudTrailTrailDetails omitted. /** - * deserializeAws_restJson1AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails + * deserializeAws_restJson1AwsCloudWatchAlarmDetails */ -const de_AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails => { - return { - Days: __expectInt32(output.Days), - Mode: __expectString(output.Mode), - Years: __expectInt32(output.Years), - } as any; +const de_AwsCloudWatchAlarmDetails = (output: any, context: __SerdeContext): AwsCloudWatchAlarmDetails => { + return take(output, { + ActionsEnabled: __expectBoolean, + AlarmActions: _json, + AlarmArn: __expectString, + AlarmConfigurationUpdatedTimestamp: __expectString, + AlarmDescription: __expectString, + AlarmName: __expectString, + ComparisonOperator: __expectString, + DatapointsToAlarm: __expectInt32, + Dimensions: _json, + EvaluateLowSampleCountPercentile: __expectString, + EvaluationPeriods: __expectInt32, + ExtendedStatistic: __expectString, + InsufficientDataActions: _json, + MetricName: __expectString, + Namespace: __expectString, + OkActions: _json, + Period: __expectInt32, + Statistic: __expectString, + Threshold: __limitedParseDouble, + ThresholdMetricId: __expectString, + TreatMissingData: __expectString, + Unit: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AwsS3BucketObjectLockConfigurationRuleDetails - */ -const de_AwsS3BucketObjectLockConfigurationRuleDetails = ( - output: any, - context: __SerdeContext -): AwsS3BucketObjectLockConfigurationRuleDetails => { - return { - DefaultRetention: - output.DefaultRetention != null - ? de_AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails(output.DefaultRetention, context) - : undefined, - } as any; -}; +// de_AwsCloudWatchAlarmDimensionsDetails omitted. + +// de_AwsCloudWatchAlarmDimensionsList omitted. + +// de_AwsCodeBuildProjectArtifactsDetails omitted. + +// de_AwsCodeBuildProjectArtifactsList omitted. + +// de_AwsCodeBuildProjectDetails omitted. + +// de_AwsCodeBuildProjectEnvironment omitted. + +// de_AwsCodeBuildProjectEnvironmentEnvironmentVariablesDetails omitted. + +// de_AwsCodeBuildProjectEnvironmentEnvironmentVariablesList omitted. + +// de_AwsCodeBuildProjectEnvironmentRegistryCredential omitted. + +// de_AwsCodeBuildProjectLogsConfigCloudWatchLogsDetails omitted. + +// de_AwsCodeBuildProjectLogsConfigDetails omitted. + +// de_AwsCodeBuildProjectLogsConfigS3LogsDetails omitted. + +// de_AwsCodeBuildProjectSource omitted. + +// de_AwsCodeBuildProjectVpcConfig omitted. + +// de_AwsCorsConfiguration omitted. + +// de_AwsDynamoDbTableAttributeDefinition omitted. + +// de_AwsDynamoDbTableAttributeDefinitionList omitted. + +// de_AwsDynamoDbTableBillingModeSummary omitted. + +// de_AwsDynamoDbTableDetails omitted. + +// de_AwsDynamoDbTableGlobalSecondaryIndex omitted. + +// de_AwsDynamoDbTableGlobalSecondaryIndexList omitted. + +// de_AwsDynamoDbTableKeySchema omitted. + +// de_AwsDynamoDbTableKeySchemaList omitted. + +// de_AwsDynamoDbTableLocalSecondaryIndex omitted. + +// de_AwsDynamoDbTableLocalSecondaryIndexList omitted. + +// de_AwsDynamoDbTableProjection omitted. + +// de_AwsDynamoDbTableProvisionedThroughput omitted. + +// de_AwsDynamoDbTableProvisionedThroughputOverride omitted. + +// de_AwsDynamoDbTableReplica omitted. + +// de_AwsDynamoDbTableReplicaGlobalSecondaryIndex omitted. + +// de_AwsDynamoDbTableReplicaGlobalSecondaryIndexList omitted. + +// de_AwsDynamoDbTableReplicaList omitted. + +// de_AwsDynamoDbTableRestoreSummary omitted. + +// de_AwsDynamoDbTableSseDescription omitted. + +// de_AwsDynamoDbTableStreamSpecification omitted. + +// de_AwsEc2EipDetails omitted. + +// de_AwsEc2InstanceDetails omitted. + +// de_AwsEc2InstanceMetadataOptions omitted. + +// de_AwsEc2InstanceMonitoringDetails omitted. + +// de_AwsEc2InstanceNetworkInterfacesDetails omitted. + +// de_AwsEc2InstanceNetworkInterfacesList omitted. + +// de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetDetails omitted. + +// de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetEbsDetails omitted. + +// de_AwsEc2LaunchTemplateDataBlockDeviceMappingSetList omitted. + +// de_AwsEc2LaunchTemplateDataCapacityReservationSpecificationCapacityReservationTargetDetails omitted. + +// de_AwsEc2LaunchTemplateDataCapacityReservationSpecificationDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketServerSideEncryptionByDefault - */ -const de_AwsS3BucketServerSideEncryptionByDefault = ( - output: any, - context: __SerdeContext -): AwsS3BucketServerSideEncryptionByDefault => { - return { - KMSMasterKeyID: __expectString(output.KMSMasterKeyID), - SSEAlgorithm: __expectString(output.SSEAlgorithm), - } as any; -}; +// de_AwsEc2LaunchTemplateDataCpuOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketServerSideEncryptionConfiguration - */ -const de_AwsS3BucketServerSideEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): AwsS3BucketServerSideEncryptionConfiguration => { - return { - Rules: output.Rules != null ? de_AwsS3BucketServerSideEncryptionRules(output.Rules, context) : undefined, - } as any; -}; +// de_AwsEc2LaunchTemplateDataCreditSpecificationDetails omitted. /** - * deserializeAws_restJson1AwsS3BucketServerSideEncryptionRule + * deserializeAws_restJson1AwsEc2LaunchTemplateDataDetails */ -const de_AwsS3BucketServerSideEncryptionRule = ( - output: any, - context: __SerdeContext -): AwsS3BucketServerSideEncryptionRule => { - return { - ApplyServerSideEncryptionByDefault: - output.ApplyServerSideEncryptionByDefault != null - ? de_AwsS3BucketServerSideEncryptionByDefault(output.ApplyServerSideEncryptionByDefault, context) - : undefined, - } as any; +const de_AwsEc2LaunchTemplateDataDetails = (output: any, context: __SerdeContext): AwsEc2LaunchTemplateDataDetails => { + return take(output, { + BlockDeviceMappingSet: _json, + CapacityReservationSpecification: _json, + CpuOptions: _json, + CreditSpecification: _json, + DisableApiStop: __expectBoolean, + DisableApiTermination: __expectBoolean, + EbsOptimized: __expectBoolean, + ElasticGpuSpecificationSet: _json, + ElasticInferenceAcceleratorSet: _json, + EnclaveOptions: _json, + HibernationOptions: _json, + IamInstanceProfile: _json, + ImageId: __expectString, + InstanceInitiatedShutdownBehavior: __expectString, + InstanceMarketOptions: _json, + InstanceRequirements: (_: any) => de_AwsEc2LaunchTemplateDataInstanceRequirementsDetails(_, context), + InstanceType: __expectString, + KernelId: __expectString, + KeyName: __expectString, + LicenseSet: _json, + MaintenanceOptions: _json, + MetadataOptions: _json, + Monitoring: _json, + NetworkInterfaceSet: _json, + Placement: _json, + PrivateDnsNameOptions: _json, + RamDiskId: __expectString, + SecurityGroupIdSet: _json, + SecurityGroupSet: _json, + UserData: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AwsS3BucketServerSideEncryptionRules - */ -const de_AwsS3BucketServerSideEncryptionRules = ( - output: any, - context: __SerdeContext -): AwsS3BucketServerSideEncryptionRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketServerSideEncryptionRule(entry, context); - }); - return retVal; -}; +// de_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketWebsiteConfiguration - */ -const de_AwsS3BucketWebsiteConfiguration = (output: any, context: __SerdeContext): AwsS3BucketWebsiteConfiguration => { - return { - ErrorDocument: __expectString(output.ErrorDocument), - IndexDocumentSuffix: __expectString(output.IndexDocumentSuffix), - RedirectAllRequestsTo: - output.RedirectAllRequestsTo != null - ? de_AwsS3BucketWebsiteConfigurationRedirectTo(output.RedirectAllRequestsTo, context) - : undefined, - RoutingRules: - output.RoutingRules != null - ? de_AwsS3BucketWebsiteConfigurationRoutingRules(output.RoutingRules, context) - : undefined, - } as any; -}; +// de_AwsEc2LaunchTemplateDataElasticGpuSpecificationSetList omitted. -/** - * deserializeAws_restJson1AwsS3BucketWebsiteConfigurationRedirectTo - */ -const de_AwsS3BucketWebsiteConfigurationRedirectTo = ( - output: any, - context: __SerdeContext -): AwsS3BucketWebsiteConfigurationRedirectTo => { - return { - Hostname: __expectString(output.Hostname), - Protocol: __expectString(output.Protocol), - } as any; -}; +// de_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetDetails omitted. -/** - * deserializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRule - */ -const de_AwsS3BucketWebsiteConfigurationRoutingRule = ( - output: any, - context: __SerdeContext -): AwsS3BucketWebsiteConfigurationRoutingRule => { - return { - Condition: - output.Condition != null - ? de_AwsS3BucketWebsiteConfigurationRoutingRuleCondition(output.Condition, context) - : undefined, - Redirect: - output.Redirect != null - ? de_AwsS3BucketWebsiteConfigurationRoutingRuleRedirect(output.Redirect, context) - : undefined, - } as any; -}; +// de_AwsEc2LaunchTemplateDataElasticInferenceAcceleratorSetList omitted. -/** - * deserializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRuleCondition - */ -const de_AwsS3BucketWebsiteConfigurationRoutingRuleCondition = ( - output: any, - context: __SerdeContext -): AwsS3BucketWebsiteConfigurationRoutingRuleCondition => { - return { - HttpErrorCodeReturnedEquals: __expectString(output.HttpErrorCodeReturnedEquals), - KeyPrefixEquals: __expectString(output.KeyPrefixEquals), - } as any; -}; +// de_AwsEc2LaunchTemplateDataEnclaveOptionsDetails omitted. + +// de_AwsEc2LaunchTemplateDataHibernationOptionsDetails omitted. + +// de_AwsEc2LaunchTemplateDataIamInstanceProfileDetails omitted. + +// de_AwsEc2LaunchTemplateDataInstanceMarketOptionsDetails omitted. + +// de_AwsEc2LaunchTemplateDataInstanceMarketOptionsSpotOptionsDetails omitted. + +// de_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorCountDetails omitted. + +// de_AwsEc2LaunchTemplateDataInstanceRequirementsAcceleratorTotalMemoryMiBDetails omitted. + +// de_AwsEc2LaunchTemplateDataInstanceRequirementsBaselineEbsBandwidthMbpsDetails omitted. /** - * deserializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRuleRedirect + * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsDetails */ -const de_AwsS3BucketWebsiteConfigurationRoutingRuleRedirect = ( +const de_AwsEc2LaunchTemplateDataInstanceRequirementsDetails = ( output: any, context: __SerdeContext -): AwsS3BucketWebsiteConfigurationRoutingRuleRedirect => { - return { - Hostname: __expectString(output.Hostname), - HttpRedirectCode: __expectString(output.HttpRedirectCode), - Protocol: __expectString(output.Protocol), - ReplaceKeyPrefixWith: __expectString(output.ReplaceKeyPrefixWith), - ReplaceKeyWith: __expectString(output.ReplaceKeyWith), - } as any; +): AwsEc2LaunchTemplateDataInstanceRequirementsDetails => { + return take(output, { + AcceleratorCount: _json, + AcceleratorManufacturers: _json, + AcceleratorNames: _json, + AcceleratorTotalMemoryMiB: _json, + AcceleratorTypes: _json, + BareMetal: __expectString, + BaselineEbsBandwidthMbps: _json, + BurstablePerformance: __expectString, + CpuManufacturers: _json, + ExcludedInstanceTypes: _json, + InstanceGenerations: _json, + LocalStorage: __expectString, + LocalStorageTypes: _json, + MemoryGiBPerVCpu: (_: any) => de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails(_, context), + MemoryMiB: _json, + NetworkInterfaceCount: _json, + OnDemandMaxPricePercentageOverLowestPrice: __expectInt32, + RequireHibernateSupport: __expectBoolean, + SpotMaxPricePercentageOverLowestPrice: __expectInt32, + TotalLocalStorageGB: (_: any) => + de_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails(_, context), + VCpuCount: _json, + }) as any; }; /** - * deserializeAws_restJson1AwsS3BucketWebsiteConfigurationRoutingRules + * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails */ -const de_AwsS3BucketWebsiteConfigurationRoutingRules = ( +const de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails = ( output: any, context: __SerdeContext -): AwsS3BucketWebsiteConfigurationRoutingRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsS3BucketWebsiteConfigurationRoutingRule(entry, context); - }); - return retVal; +): AwsEc2LaunchTemplateDataInstanceRequirementsMemoryGiBPerVCpuDetails => { + return take(output, { + Max: __limitedParseDouble, + Min: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1AwsS3ObjectDetails - */ -const de_AwsS3ObjectDetails = (output: any, context: __SerdeContext): AwsS3ObjectDetails => { - return { - ContentType: __expectString(output.ContentType), - ETag: __expectString(output.ETag), - LastModified: __expectString(output.LastModified), - SSEKMSKeyId: __expectString(output.SSEKMSKeyId), - ServerSideEncryption: __expectString(output.ServerSideEncryption), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_AwsEc2LaunchTemplateDataInstanceRequirementsMemoryMiBDetails omitted. + +// de_AwsEc2LaunchTemplateDataInstanceRequirementsNetworkInterfaceCountDetails omitted. /** - * deserializeAws_restJson1AwsSageMakerNotebookInstanceDetails + * deserializeAws_restJson1AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails */ -const de_AwsSageMakerNotebookInstanceDetails = ( - output: any, - context: __SerdeContext -): AwsSageMakerNotebookInstanceDetails => { - return { - AcceleratorTypes: - output.AcceleratorTypes != null ? de_NonEmptyStringList(output.AcceleratorTypes, context) : undefined, - AdditionalCodeRepositories: - output.AdditionalCodeRepositories != null - ? de_NonEmptyStringList(output.AdditionalCodeRepositories, context) - : undefined, - DefaultCodeRepository: __expectString(output.DefaultCodeRepository), - DirectInternetAccess: __expectString(output.DirectInternetAccess), - FailureReason: __expectString(output.FailureReason), - InstanceMetadataServiceConfiguration: - output.InstanceMetadataServiceConfiguration != null - ? de_AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails( - output.InstanceMetadataServiceConfiguration, - context - ) - : undefined, - InstanceType: __expectString(output.InstanceType), - KmsKeyId: __expectString(output.KmsKeyId), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - NotebookInstanceArn: __expectString(output.NotebookInstanceArn), - NotebookInstanceLifecycleConfigName: __expectString(output.NotebookInstanceLifecycleConfigName), - NotebookInstanceName: __expectString(output.NotebookInstanceName), - NotebookInstanceStatus: __expectString(output.NotebookInstanceStatus), - PlatformIdentifier: __expectString(output.PlatformIdentifier), - RoleArn: __expectString(output.RoleArn), - RootAccess: __expectString(output.RootAccess), - SecurityGroups: output.SecurityGroups != null ? de_NonEmptyStringList(output.SecurityGroups, context) : undefined, - SubnetId: __expectString(output.SubnetId), - Url: __expectString(output.Url), - VolumeSizeInGB: __expectInt32(output.VolumeSizeInGB), - } as any; -}; - -/** - * deserializeAws_restJson1AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails - */ -const de_AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails = ( +const de_AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails = ( output: any, context: __SerdeContext -): AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails => { - return { - MinimumInstanceMetadataServiceVersion: __expectString(output.MinimumInstanceMetadataServiceVersion), - } as any; +): AwsEc2LaunchTemplateDataInstanceRequirementsTotalLocalStorageGBDetails => { + return take(output, { + Max: __limitedParseDouble, + Min: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1AwsSecretsManagerSecretDetails - */ -const de_AwsSecretsManagerSecretDetails = (output: any, context: __SerdeContext): AwsSecretsManagerSecretDetails => { - return { - Deleted: __expectBoolean(output.Deleted), - Description: __expectString(output.Description), - KmsKeyId: __expectString(output.KmsKeyId), - Name: __expectString(output.Name), - RotationEnabled: __expectBoolean(output.RotationEnabled), - RotationLambdaArn: __expectString(output.RotationLambdaArn), - RotationOccurredWithinFrequency: __expectBoolean(output.RotationOccurredWithinFrequency), - RotationRules: - output.RotationRules != null ? de_AwsSecretsManagerSecretRotationRules(output.RotationRules, context) : undefined, - } as any; -}; +// de_AwsEc2LaunchTemplateDataInstanceRequirementsVCpuCountDetails omitted. -/** - * deserializeAws_restJson1AwsSecretsManagerSecretRotationRules - */ -const de_AwsSecretsManagerSecretRotationRules = ( - output: any, - context: __SerdeContext -): AwsSecretsManagerSecretRotationRules => { - return { - AutomaticallyAfterDays: __expectInt32(output.AutomaticallyAfterDays), - } as any; -}; +// de_AwsEc2LaunchTemplateDataLicenseSetDetails omitted. -/** - * deserializeAws_restJson1AwsSecurityFinding - */ -const de_AwsSecurityFinding = (output: any, context: __SerdeContext): AwsSecurityFinding => { - return { - Action: output.Action != null ? de_Action(output.Action, context) : undefined, - AwsAccountId: __expectString(output.AwsAccountId), - CompanyName: __expectString(output.CompanyName), - Compliance: output.Compliance != null ? de_Compliance(output.Compliance, context) : undefined, - Confidence: __expectInt32(output.Confidence), - CreatedAt: __expectString(output.CreatedAt), - Criticality: __expectInt32(output.Criticality), - Description: __expectString(output.Description), - FindingProviderFields: - output.FindingProviderFields != null - ? de_FindingProviderFields(output.FindingProviderFields, context) - : undefined, - FirstObservedAt: __expectString(output.FirstObservedAt), - GeneratorId: __expectString(output.GeneratorId), - Id: __expectString(output.Id), - LastObservedAt: __expectString(output.LastObservedAt), - Malware: output.Malware != null ? de_MalwareList(output.Malware, context) : undefined, - Network: output.Network != null ? de_Network(output.Network, context) : undefined, - NetworkPath: output.NetworkPath != null ? de_NetworkPathList(output.NetworkPath, context) : undefined, - Note: output.Note != null ? de_Note(output.Note, context) : undefined, - PatchSummary: output.PatchSummary != null ? de_PatchSummary(output.PatchSummary, context) : undefined, - Process: output.Process != null ? de_ProcessDetails(output.Process, context) : undefined, - ProductArn: __expectString(output.ProductArn), - ProductFields: output.ProductFields != null ? de_FieldMap(output.ProductFields, context) : undefined, - ProductName: __expectString(output.ProductName), - RecordState: __expectString(output.RecordState), - Region: __expectString(output.Region), - RelatedFindings: - output.RelatedFindings != null ? de_RelatedFindingList(output.RelatedFindings, context) : undefined, - Remediation: output.Remediation != null ? de_Remediation(output.Remediation, context) : undefined, - Resources: output.Resources != null ? de_ResourceList(output.Resources, context) : undefined, - Sample: __expectBoolean(output.Sample), - SchemaVersion: __expectString(output.SchemaVersion), - Severity: output.Severity != null ? de_Severity(output.Severity, context) : undefined, - SourceUrl: __expectString(output.SourceUrl), - ThreatIntelIndicators: - output.ThreatIntelIndicators != null - ? de_ThreatIntelIndicatorList(output.ThreatIntelIndicators, context) - : undefined, - Threats: output.Threats != null ? de_ThreatList(output.Threats, context) : undefined, - Title: __expectString(output.Title), - Types: output.Types != null ? de_TypeList(output.Types, context) : undefined, - UpdatedAt: __expectString(output.UpdatedAt), - UserDefinedFields: output.UserDefinedFields != null ? de_FieldMap(output.UserDefinedFields, context) : undefined, - VerificationState: __expectString(output.VerificationState), - Vulnerabilities: output.Vulnerabilities != null ? de_VulnerabilityList(output.Vulnerabilities, context) : undefined, - Workflow: output.Workflow != null ? de_Workflow(output.Workflow, context) : undefined, - WorkflowState: __expectString(output.WorkflowState), - } as any; -}; +// de_AwsEc2LaunchTemplateDataLicenseSetList omitted. -/** - * deserializeAws_restJson1AwsSecurityFindingFilters - */ -const de_AwsSecurityFindingFilters = (output: any, context: __SerdeContext): AwsSecurityFindingFilters => { - return { - AwsAccountId: output.AwsAccountId != null ? de_StringFilterList(output.AwsAccountId, context) : undefined, - CompanyName: output.CompanyName != null ? de_StringFilterList(output.CompanyName, context) : undefined, - ComplianceAssociatedStandardsId: - output.ComplianceAssociatedStandardsId != null - ? de_StringFilterList(output.ComplianceAssociatedStandardsId, context) - : undefined, - ComplianceSecurityControlId: - output.ComplianceSecurityControlId != null - ? de_StringFilterList(output.ComplianceSecurityControlId, context) - : undefined, - ComplianceStatus: - output.ComplianceStatus != null ? de_StringFilterList(output.ComplianceStatus, context) : undefined, - Confidence: output.Confidence != null ? de_NumberFilterList(output.Confidence, context) : undefined, - CreatedAt: output.CreatedAt != null ? de_DateFilterList(output.CreatedAt, context) : undefined, - Criticality: output.Criticality != null ? de_NumberFilterList(output.Criticality, context) : undefined, - Description: output.Description != null ? de_StringFilterList(output.Description, context) : undefined, - FindingProviderFieldsConfidence: - output.FindingProviderFieldsConfidence != null - ? de_NumberFilterList(output.FindingProviderFieldsConfidence, context) - : undefined, - FindingProviderFieldsCriticality: - output.FindingProviderFieldsCriticality != null - ? de_NumberFilterList(output.FindingProviderFieldsCriticality, context) - : undefined, - FindingProviderFieldsRelatedFindingsId: - output.FindingProviderFieldsRelatedFindingsId != null - ? de_StringFilterList(output.FindingProviderFieldsRelatedFindingsId, context) - : undefined, - FindingProviderFieldsRelatedFindingsProductArn: - output.FindingProviderFieldsRelatedFindingsProductArn != null - ? de_StringFilterList(output.FindingProviderFieldsRelatedFindingsProductArn, context) - : undefined, - FindingProviderFieldsSeverityLabel: - output.FindingProviderFieldsSeverityLabel != null - ? de_StringFilterList(output.FindingProviderFieldsSeverityLabel, context) - : undefined, - FindingProviderFieldsSeverityOriginal: - output.FindingProviderFieldsSeverityOriginal != null - ? de_StringFilterList(output.FindingProviderFieldsSeverityOriginal, context) - : undefined, - FindingProviderFieldsTypes: - output.FindingProviderFieldsTypes != null - ? de_StringFilterList(output.FindingProviderFieldsTypes, context) - : undefined, - FirstObservedAt: output.FirstObservedAt != null ? de_DateFilterList(output.FirstObservedAt, context) : undefined, - GeneratorId: output.GeneratorId != null ? de_StringFilterList(output.GeneratorId, context) : undefined, - Id: output.Id != null ? de_StringFilterList(output.Id, context) : undefined, - Keyword: output.Keyword != null ? de_KeywordFilterList(output.Keyword, context) : undefined, - LastObservedAt: output.LastObservedAt != null ? de_DateFilterList(output.LastObservedAt, context) : undefined, - MalwareName: output.MalwareName != null ? de_StringFilterList(output.MalwareName, context) : undefined, - MalwarePath: output.MalwarePath != null ? de_StringFilterList(output.MalwarePath, context) : undefined, - MalwareState: output.MalwareState != null ? de_StringFilterList(output.MalwareState, context) : undefined, - MalwareType: output.MalwareType != null ? de_StringFilterList(output.MalwareType, context) : undefined, - NetworkDestinationDomain: - output.NetworkDestinationDomain != null - ? de_StringFilterList(output.NetworkDestinationDomain, context) - : undefined, - NetworkDestinationIpV4: - output.NetworkDestinationIpV4 != null ? de_IpFilterList(output.NetworkDestinationIpV4, context) : undefined, - NetworkDestinationIpV6: - output.NetworkDestinationIpV6 != null ? de_IpFilterList(output.NetworkDestinationIpV6, context) : undefined, - NetworkDestinationPort: - output.NetworkDestinationPort != null ? de_NumberFilterList(output.NetworkDestinationPort, context) : undefined, - NetworkDirection: - output.NetworkDirection != null ? de_StringFilterList(output.NetworkDirection, context) : undefined, - NetworkProtocol: output.NetworkProtocol != null ? de_StringFilterList(output.NetworkProtocol, context) : undefined, - NetworkSourceDomain: - output.NetworkSourceDomain != null ? de_StringFilterList(output.NetworkSourceDomain, context) : undefined, - NetworkSourceIpV4: - output.NetworkSourceIpV4 != null ? de_IpFilterList(output.NetworkSourceIpV4, context) : undefined, - NetworkSourceIpV6: - output.NetworkSourceIpV6 != null ? de_IpFilterList(output.NetworkSourceIpV6, context) : undefined, - NetworkSourceMac: - output.NetworkSourceMac != null ? de_StringFilterList(output.NetworkSourceMac, context) : undefined, - NetworkSourcePort: - output.NetworkSourcePort != null ? de_NumberFilterList(output.NetworkSourcePort, context) : undefined, - NoteText: output.NoteText != null ? de_StringFilterList(output.NoteText, context) : undefined, - NoteUpdatedAt: output.NoteUpdatedAt != null ? de_DateFilterList(output.NoteUpdatedAt, context) : undefined, - NoteUpdatedBy: output.NoteUpdatedBy != null ? de_StringFilterList(output.NoteUpdatedBy, context) : undefined, - ProcessLaunchedAt: - output.ProcessLaunchedAt != null ? de_DateFilterList(output.ProcessLaunchedAt, context) : undefined, - ProcessName: output.ProcessName != null ? de_StringFilterList(output.ProcessName, context) : undefined, - ProcessParentPid: - output.ProcessParentPid != null ? de_NumberFilterList(output.ProcessParentPid, context) : undefined, - ProcessPath: output.ProcessPath != null ? de_StringFilterList(output.ProcessPath, context) : undefined, - ProcessPid: output.ProcessPid != null ? de_NumberFilterList(output.ProcessPid, context) : undefined, - ProcessTerminatedAt: - output.ProcessTerminatedAt != null ? de_DateFilterList(output.ProcessTerminatedAt, context) : undefined, - ProductArn: output.ProductArn != null ? de_StringFilterList(output.ProductArn, context) : undefined, - ProductFields: output.ProductFields != null ? de_MapFilterList(output.ProductFields, context) : undefined, - ProductName: output.ProductName != null ? de_StringFilterList(output.ProductName, context) : undefined, - RecommendationText: - output.RecommendationText != null ? de_StringFilterList(output.RecommendationText, context) : undefined, - RecordState: output.RecordState != null ? de_StringFilterList(output.RecordState, context) : undefined, - Region: output.Region != null ? de_StringFilterList(output.Region, context) : undefined, - RelatedFindingsId: - output.RelatedFindingsId != null ? de_StringFilterList(output.RelatedFindingsId, context) : undefined, - RelatedFindingsProductArn: - output.RelatedFindingsProductArn != null - ? de_StringFilterList(output.RelatedFindingsProductArn, context) - : undefined, - ResourceAwsEc2InstanceIamInstanceProfileArn: - output.ResourceAwsEc2InstanceIamInstanceProfileArn != null - ? de_StringFilterList(output.ResourceAwsEc2InstanceIamInstanceProfileArn, context) - : undefined, - ResourceAwsEc2InstanceImageId: - output.ResourceAwsEc2InstanceImageId != null - ? de_StringFilterList(output.ResourceAwsEc2InstanceImageId, context) - : undefined, - ResourceAwsEc2InstanceIpV4Addresses: - output.ResourceAwsEc2InstanceIpV4Addresses != null - ? de_IpFilterList(output.ResourceAwsEc2InstanceIpV4Addresses, context) - : undefined, - ResourceAwsEc2InstanceIpV6Addresses: - output.ResourceAwsEc2InstanceIpV6Addresses != null - ? de_IpFilterList(output.ResourceAwsEc2InstanceIpV6Addresses, context) - : undefined, - ResourceAwsEc2InstanceKeyName: - output.ResourceAwsEc2InstanceKeyName != null - ? de_StringFilterList(output.ResourceAwsEc2InstanceKeyName, context) - : undefined, - ResourceAwsEc2InstanceLaunchedAt: - output.ResourceAwsEc2InstanceLaunchedAt != null - ? de_DateFilterList(output.ResourceAwsEc2InstanceLaunchedAt, context) - : undefined, - ResourceAwsEc2InstanceSubnetId: - output.ResourceAwsEc2InstanceSubnetId != null - ? de_StringFilterList(output.ResourceAwsEc2InstanceSubnetId, context) - : undefined, - ResourceAwsEc2InstanceType: - output.ResourceAwsEc2InstanceType != null - ? de_StringFilterList(output.ResourceAwsEc2InstanceType, context) - : undefined, - ResourceAwsEc2InstanceVpcId: - output.ResourceAwsEc2InstanceVpcId != null - ? de_StringFilterList(output.ResourceAwsEc2InstanceVpcId, context) - : undefined, - ResourceAwsIamAccessKeyCreatedAt: - output.ResourceAwsIamAccessKeyCreatedAt != null - ? de_DateFilterList(output.ResourceAwsIamAccessKeyCreatedAt, context) - : undefined, - ResourceAwsIamAccessKeyPrincipalName: - output.ResourceAwsIamAccessKeyPrincipalName != null - ? de_StringFilterList(output.ResourceAwsIamAccessKeyPrincipalName, context) - : undefined, - ResourceAwsIamAccessKeyStatus: - output.ResourceAwsIamAccessKeyStatus != null - ? de_StringFilterList(output.ResourceAwsIamAccessKeyStatus, context) - : undefined, - ResourceAwsIamAccessKeyUserName: - output.ResourceAwsIamAccessKeyUserName != null - ? de_StringFilterList(output.ResourceAwsIamAccessKeyUserName, context) - : undefined, - ResourceAwsIamUserUserName: - output.ResourceAwsIamUserUserName != null - ? de_StringFilterList(output.ResourceAwsIamUserUserName, context) - : undefined, - ResourceAwsS3BucketOwnerId: - output.ResourceAwsS3BucketOwnerId != null - ? de_StringFilterList(output.ResourceAwsS3BucketOwnerId, context) - : undefined, - ResourceAwsS3BucketOwnerName: - output.ResourceAwsS3BucketOwnerName != null - ? de_StringFilterList(output.ResourceAwsS3BucketOwnerName, context) - : undefined, - ResourceContainerImageId: - output.ResourceContainerImageId != null - ? de_StringFilterList(output.ResourceContainerImageId, context) - : undefined, - ResourceContainerImageName: - output.ResourceContainerImageName != null - ? de_StringFilterList(output.ResourceContainerImageName, context) - : undefined, - ResourceContainerLaunchedAt: - output.ResourceContainerLaunchedAt != null - ? de_DateFilterList(output.ResourceContainerLaunchedAt, context) - : undefined, - ResourceContainerName: - output.ResourceContainerName != null ? de_StringFilterList(output.ResourceContainerName, context) : undefined, - ResourceDetailsOther: - output.ResourceDetailsOther != null ? de_MapFilterList(output.ResourceDetailsOther, context) : undefined, - ResourceId: output.ResourceId != null ? de_StringFilterList(output.ResourceId, context) : undefined, - ResourcePartition: - output.ResourcePartition != null ? de_StringFilterList(output.ResourcePartition, context) : undefined, - ResourceRegion: output.ResourceRegion != null ? de_StringFilterList(output.ResourceRegion, context) : undefined, - ResourceTags: output.ResourceTags != null ? de_MapFilterList(output.ResourceTags, context) : undefined, - ResourceType: output.ResourceType != null ? de_StringFilterList(output.ResourceType, context) : undefined, - Sample: output.Sample != null ? de_BooleanFilterList(output.Sample, context) : undefined, - SeverityLabel: output.SeverityLabel != null ? de_StringFilterList(output.SeverityLabel, context) : undefined, - SeverityNormalized: - output.SeverityNormalized != null ? de_NumberFilterList(output.SeverityNormalized, context) : undefined, - SeverityProduct: output.SeverityProduct != null ? de_NumberFilterList(output.SeverityProduct, context) : undefined, - SourceUrl: output.SourceUrl != null ? de_StringFilterList(output.SourceUrl, context) : undefined, - ThreatIntelIndicatorCategory: - output.ThreatIntelIndicatorCategory != null - ? de_StringFilterList(output.ThreatIntelIndicatorCategory, context) - : undefined, - ThreatIntelIndicatorLastObservedAt: - output.ThreatIntelIndicatorLastObservedAt != null - ? de_DateFilterList(output.ThreatIntelIndicatorLastObservedAt, context) - : undefined, - ThreatIntelIndicatorSource: - output.ThreatIntelIndicatorSource != null - ? de_StringFilterList(output.ThreatIntelIndicatorSource, context) - : undefined, - ThreatIntelIndicatorSourceUrl: - output.ThreatIntelIndicatorSourceUrl != null - ? de_StringFilterList(output.ThreatIntelIndicatorSourceUrl, context) - : undefined, - ThreatIntelIndicatorType: - output.ThreatIntelIndicatorType != null - ? de_StringFilterList(output.ThreatIntelIndicatorType, context) - : undefined, - ThreatIntelIndicatorValue: - output.ThreatIntelIndicatorValue != null - ? de_StringFilterList(output.ThreatIntelIndicatorValue, context) - : undefined, - Title: output.Title != null ? de_StringFilterList(output.Title, context) : undefined, - Type: output.Type != null ? de_StringFilterList(output.Type, context) : undefined, - UpdatedAt: output.UpdatedAt != null ? de_DateFilterList(output.UpdatedAt, context) : undefined, - UserDefinedFields: - output.UserDefinedFields != null ? de_MapFilterList(output.UserDefinedFields, context) : undefined, - VerificationState: - output.VerificationState != null ? de_StringFilterList(output.VerificationState, context) : undefined, - WorkflowState: output.WorkflowState != null ? de_StringFilterList(output.WorkflowState, context) : undefined, - WorkflowStatus: output.WorkflowStatus != null ? de_StringFilterList(output.WorkflowStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AwsSecurityFindingIdentifier - */ -const de_AwsSecurityFindingIdentifier = (output: any, context: __SerdeContext): AwsSecurityFindingIdentifier => { - return { - Id: __expectString(output.Id), - ProductArn: __expectString(output.ProductArn), - } as any; -}; - -/** - * deserializeAws_restJson1AwsSecurityFindingIdentifierList - */ -const de_AwsSecurityFindingIdentifierList = (output: any, context: __SerdeContext): AwsSecurityFindingIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsSecurityFindingIdentifier(entry, context); - }); - return retVal; -}; +// de_AwsEc2LaunchTemplateDataMaintenanceOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsSecurityFindingList - */ -const de_AwsSecurityFindingList = (output: any, context: __SerdeContext): AwsSecurityFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsSecurityFinding(entry, context); - }); - return retVal; -}; +// de_AwsEc2LaunchTemplateDataMetadataOptionsDetails omitted. -/** - * deserializeAws_restJson1AwsSnsTopicDetails - */ -const de_AwsSnsTopicDetails = (output: any, context: __SerdeContext): AwsSnsTopicDetails => { - return { - ApplicationSuccessFeedbackRoleArn: __expectString(output.ApplicationSuccessFeedbackRoleArn), - FirehoseFailureFeedbackRoleArn: __expectString(output.FirehoseFailureFeedbackRoleArn), - FirehoseSuccessFeedbackRoleArn: __expectString(output.FirehoseSuccessFeedbackRoleArn), - HttpFailureFeedbackRoleArn: __expectString(output.HttpFailureFeedbackRoleArn), - HttpSuccessFeedbackRoleArn: __expectString(output.HttpSuccessFeedbackRoleArn), - KmsMasterKeyId: __expectString(output.KmsMasterKeyId), - Owner: __expectString(output.Owner), - SqsFailureFeedbackRoleArn: __expectString(output.SqsFailureFeedbackRoleArn), - SqsSuccessFeedbackRoleArn: __expectString(output.SqsSuccessFeedbackRoleArn), - Subscription: - output.Subscription != null ? de_AwsSnsTopicSubscriptionList(output.Subscription, context) : undefined, - TopicName: __expectString(output.TopicName), - } as any; -}; +// de_AwsEc2LaunchTemplateDataMonitoringDetails omitted. -/** - * deserializeAws_restJson1AwsSnsTopicSubscription - */ -const de_AwsSnsTopicSubscription = (output: any, context: __SerdeContext): AwsSnsTopicSubscription => { - return { - Endpoint: __expectString(output.Endpoint), - Protocol: __expectString(output.Protocol), - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetDetails omitted. -/** - * deserializeAws_restJson1AwsSnsTopicSubscriptionList - */ -const de_AwsSnsTopicSubscriptionList = (output: any, context: __SerdeContext): AwsSnsTopicSubscription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsSnsTopicSubscription(entry, context); - }); - return retVal; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesDetails omitted. -/** - * deserializeAws_restJson1AwsSqsQueueDetails - */ -const de_AwsSqsQueueDetails = (output: any, context: __SerdeContext): AwsSqsQueueDetails => { - return { - DeadLetterTargetArn: __expectString(output.DeadLetterTargetArn), - KmsDataKeyReusePeriodSeconds: __expectInt32(output.KmsDataKeyReusePeriodSeconds), - KmsMasterKeyId: __expectString(output.KmsMasterKeyId), - QueueName: __expectString(output.QueueName), - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv4PrefixesList omitted. -/** - * deserializeAws_restJson1AwsSsmComplianceSummary - */ -const de_AwsSsmComplianceSummary = (output: any, context: __SerdeContext): AwsSsmComplianceSummary => { - return { - ComplianceType: __expectString(output.ComplianceType), - CompliantCriticalCount: __expectInt32(output.CompliantCriticalCount), - CompliantHighCount: __expectInt32(output.CompliantHighCount), - CompliantInformationalCount: __expectInt32(output.CompliantInformationalCount), - CompliantLowCount: __expectInt32(output.CompliantLowCount), - CompliantMediumCount: __expectInt32(output.CompliantMediumCount), - CompliantUnspecifiedCount: __expectInt32(output.CompliantUnspecifiedCount), - ExecutionType: __expectString(output.ExecutionType), - NonCompliantCriticalCount: __expectInt32(output.NonCompliantCriticalCount), - NonCompliantHighCount: __expectInt32(output.NonCompliantHighCount), - NonCompliantInformationalCount: __expectInt32(output.NonCompliantInformationalCount), - NonCompliantLowCount: __expectInt32(output.NonCompliantLowCount), - NonCompliantMediumCount: __expectInt32(output.NonCompliantMediumCount), - NonCompliantUnspecifiedCount: __expectInt32(output.NonCompliantUnspecifiedCount), - OverallSeverity: __expectString(output.OverallSeverity), - PatchBaselineId: __expectString(output.PatchBaselineId), - PatchGroup: __expectString(output.PatchGroup), - Status: __expectString(output.Status), - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesDetails omitted. -/** - * deserializeAws_restJson1AwsSsmPatch - */ -const de_AwsSsmPatch = (output: any, context: __SerdeContext): AwsSsmPatch => { - return { - ComplianceSummary: - output.ComplianceSummary != null ? de_AwsSsmComplianceSummary(output.ComplianceSummary, context) : undefined, - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6AddressesList omitted. -/** - * deserializeAws_restJson1AwsSsmPatchComplianceDetails - */ -const de_AwsSsmPatchComplianceDetails = (output: any, context: __SerdeContext): AwsSsmPatchComplianceDetails => { - return { - Patch: output.Patch != null ? de_AwsSsmPatch(output.Patch, context) : undefined, - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesDetails omitted. -/** - * deserializeAws_restJson1AwsWafRateBasedRuleDetails - */ -const de_AwsWafRateBasedRuleDetails = (output: any, context: __SerdeContext): AwsWafRateBasedRuleDetails => { - return { - MatchPredicates: - output.MatchPredicates != null - ? de_AwsWafRateBasedRuleMatchPredicateList(output.MatchPredicates, context) - : undefined, - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RateKey: __expectString(output.RateKey), - RateLimit: __expectLong(output.RateLimit), - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetIpv6PrefixesList omitted. -/** - * deserializeAws_restJson1AwsWafRateBasedRuleMatchPredicate - */ -const de_AwsWafRateBasedRuleMatchPredicate = ( - output: any, - context: __SerdeContext -): AwsWafRateBasedRuleMatchPredicate => { - return { - DataId: __expectString(output.DataId), - Negated: __expectBoolean(output.Negated), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetList omitted. + +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesDetails omitted. + +// de_AwsEc2LaunchTemplateDataNetworkInterfaceSetPrivateIpAddressesList omitted. + +// de_AwsEc2LaunchTemplateDataPlacementDetails omitted. + +// de_AwsEc2LaunchTemplateDataPrivateDnsNameOptionsDetails omitted. /** - * deserializeAws_restJson1AwsWafRateBasedRuleMatchPredicateList + * deserializeAws_restJson1AwsEc2LaunchTemplateDetails */ -const de_AwsWafRateBasedRuleMatchPredicateList = ( - output: any, - context: __SerdeContext -): AwsWafRateBasedRuleMatchPredicate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRateBasedRuleMatchPredicate(entry, context); - }); - return retVal; +const de_AwsEc2LaunchTemplateDetails = (output: any, context: __SerdeContext): AwsEc2LaunchTemplateDetails => { + return take(output, { + DefaultVersionNumber: __expectLong, + Id: __expectString, + LatestVersionNumber: __expectLong, + LaunchTemplateData: (_: any) => de_AwsEc2LaunchTemplateDataDetails(_, context), + LaunchTemplateName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AwsWafRegionalRateBasedRuleDetails - */ -const de_AwsWafRegionalRateBasedRuleDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRateBasedRuleDetails => { - return { - MatchPredicates: - output.MatchPredicates != null - ? de_AwsWafRegionalRateBasedRuleMatchPredicateList(output.MatchPredicates, context) - : undefined, - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RateKey: __expectString(output.RateKey), - RateLimit: __expectLong(output.RateLimit), - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_AwsEc2NetworkAclAssociation omitted. + +// de_AwsEc2NetworkAclAssociationList omitted. + +// de_AwsEc2NetworkAclDetails omitted. + +// de_AwsEc2NetworkAclEntry omitted. + +// de_AwsEc2NetworkAclEntryList omitted. + +// de_AwsEc2NetworkInterfaceAttachment omitted. + +// de_AwsEc2NetworkInterfaceDetails omitted. + +// de_AwsEc2NetworkInterfaceIpV6AddressDetail omitted. + +// de_AwsEc2NetworkInterfaceIpV6AddressList omitted. + +// de_AwsEc2NetworkInterfacePrivateIpAddressDetail omitted. + +// de_AwsEc2NetworkInterfacePrivateIpAddressList omitted. + +// de_AwsEc2NetworkInterfaceSecurityGroup omitted. + +// de_AwsEc2NetworkInterfaceSecurityGroupList omitted. + +// de_AwsEc2RouteTableDetails omitted. + +// de_AwsEc2SecurityGroupDetails omitted. + +// de_AwsEc2SecurityGroupIpPermission omitted. + +// de_AwsEc2SecurityGroupIpPermissionList omitted. + +// de_AwsEc2SecurityGroupIpRange omitted. + +// de_AwsEc2SecurityGroupIpRangeList omitted. + +// de_AwsEc2SecurityGroupIpv6Range omitted. + +// de_AwsEc2SecurityGroupIpv6RangeList omitted. + +// de_AwsEc2SecurityGroupPrefixListId omitted. + +// de_AwsEc2SecurityGroupPrefixListIdList omitted. + +// de_AwsEc2SecurityGroupUserIdGroupPair omitted. + +// de_AwsEc2SecurityGroupUserIdGroupPairList omitted. + +// de_AwsEc2SubnetDetails omitted. + +// de_AwsEc2TransitGatewayDetails omitted. + +// de_AwsEc2VolumeAttachment omitted. + +// de_AwsEc2VolumeAttachmentList omitted. + +// de_AwsEc2VolumeDetails omitted. + +// de_AwsEc2VpcDetails omitted. + +// de_AwsEc2VpcEndpointServiceDetails omitted. + +// de_AwsEc2VpcEndpointServiceServiceTypeDetails omitted. + +// de_AwsEc2VpcEndpointServiceServiceTypeList omitted. + +// de_AwsEc2VpcPeeringConnectionDetails omitted. + +// de_AwsEc2VpcPeeringConnectionStatusDetails omitted. + +// de_AwsEc2VpcPeeringConnectionVpcInfoDetails omitted. + +// de_AwsEc2VpnConnectionDetails omitted. + +// de_AwsEc2VpnConnectionOptionsDetails omitted. + +// de_AwsEc2VpnConnectionOptionsTunnelOptionsDetails omitted. + +// de_AwsEc2VpnConnectionOptionsTunnelOptionsList omitted. + +// de_AwsEc2VpnConnectionRoutesDetails omitted. + +// de_AwsEc2VpnConnectionRoutesList omitted. + +// de_AwsEc2VpnConnectionVgwTelemetryDetails omitted. + +// de_AwsEc2VpnConnectionVgwTelemetryList omitted. + +// de_AwsEcrContainerImageDetails omitted. + +// de_AwsEcrRepositoryDetails omitted. + +// de_AwsEcrRepositoryImageScanningConfigurationDetails omitted. + +// de_AwsEcrRepositoryLifecyclePolicyDetails omitted. + +// de_AwsEcsClusterClusterSettingsDetails omitted. + +// de_AwsEcsClusterClusterSettingsList omitted. + +// de_AwsEcsClusterConfigurationDetails omitted. + +// de_AwsEcsClusterConfigurationExecuteCommandConfigurationDetails omitted. + +// de_AwsEcsClusterConfigurationExecuteCommandConfigurationLogConfigurationDetails omitted. + +// de_AwsEcsClusterDefaultCapacityProviderStrategyDetails omitted. + +// de_AwsEcsClusterDefaultCapacityProviderStrategyList omitted. + +// de_AwsEcsClusterDetails omitted. + +// de_AwsEcsContainerDetails omitted. + +// de_AwsEcsContainerDetailsList omitted. + +// de_AwsEcsServiceCapacityProviderStrategyDetails omitted. + +// de_AwsEcsServiceCapacityProviderStrategyList omitted. + +// de_AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails omitted. + +// de_AwsEcsServiceDeploymentConfigurationDetails omitted. + +// de_AwsEcsServiceDeploymentControllerDetails omitted. + +// de_AwsEcsServiceDetails omitted. + +// de_AwsEcsServiceLoadBalancersDetails omitted. + +// de_AwsEcsServiceLoadBalancersList omitted. + +// de_AwsEcsServiceNetworkConfigurationAwsVpcConfigurationDetails omitted. + +// de_AwsEcsServiceNetworkConfigurationDetails omitted. + +// de_AwsEcsServicePlacementConstraintsDetails omitted. + +// de_AwsEcsServicePlacementConstraintsList omitted. + +// de_AwsEcsServicePlacementStrategiesDetails omitted. + +// de_AwsEcsServicePlacementStrategiesList omitted. + +// de_AwsEcsServiceServiceRegistriesDetails omitted. + +// de_AwsEcsServiceServiceRegistriesList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsDependsOnDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsDependsOnList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentFilesList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsEnvironmentList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsExtraHostsList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsFirelensConfigurationDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsHealthCheckDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersCapabilitiesDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersDevicesList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLinuxParametersTmpfsList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsLogConfigurationSecretOptionsList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsMountPointsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsMountPointsList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsPortMappingsList omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsRepositoryCredentialsDetails omitted. + +// de_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRateBasedRuleMatchPredicate - */ -const de_AwsWafRegionalRateBasedRuleMatchPredicate = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRateBasedRuleMatchPredicate => { - return { - DataId: __expectString(output.DataId), - Negated: __expectBoolean(output.Negated), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsResourceRequirementsList omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRateBasedRuleMatchPredicateList - */ -const de_AwsWafRegionalRateBasedRuleMatchPredicateList = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRateBasedRuleMatchPredicate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRegionalRateBasedRuleMatchPredicate(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsSecretsDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRuleDetails - */ -const de_AwsWafRegionalRuleDetails = (output: any, context: __SerdeContext): AwsWafRegionalRuleDetails => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - PredicateList: - output.PredicateList != null ? de_AwsWafRegionalRulePredicateList(output.PredicateList, context) : undefined, - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsSecretsList omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRuleGroupDetails - */ -const de_AwsWafRegionalRuleGroupDetails = (output: any, context: __SerdeContext): AwsWafRegionalRuleGroupDetails => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - Rules: output.Rules != null ? de_AwsWafRegionalRuleGroupRulesList(output.Rules, context) : undefined, - } as any; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRuleGroupRulesActionDetails - */ -const de_AwsWafRegionalRuleGroupRulesActionDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRuleGroupRulesActionDetails => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsSystemControlsList omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRuleGroupRulesDetails - */ -const de_AwsWafRegionalRuleGroupRulesDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRuleGroupRulesDetails => { - return { - Action: output.Action != null ? de_AwsWafRegionalRuleGroupRulesActionDetails(output.Action, context) : undefined, - Priority: __expectInt32(output.Priority), - RuleId: __expectString(output.RuleId), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsUlimitsDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRuleGroupRulesList - */ -const de_AwsWafRegionalRuleGroupRulesList = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRuleGroupRulesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRegionalRuleGroupRulesDetails(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsUlimitsList omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRulePredicateList - */ -const de_AwsWafRegionalRulePredicateList = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRulePredicateListDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRegionalRulePredicateListDetails(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalRulePredicateListDetails - */ -const de_AwsWafRegionalRulePredicateListDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalRulePredicateListDetails => { - return { - DataId: __expectString(output.DataId), - Negated: __expectBoolean(output.Negated), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionContainerDefinitionsVolumesFromList omitted. -/** - * deserializeAws_restJson1AwsWafRegionalWebAclDetails - */ -const de_AwsWafRegionalWebAclDetails = (output: any, context: __SerdeContext): AwsWafRegionalWebAclDetails => { - return { - DefaultAction: __expectString(output.DefaultAction), - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RulesList: output.RulesList != null ? de_AwsWafRegionalWebAclRulesList(output.RulesList, context) : undefined, - WebAclId: __expectString(output.WebAclId), - } as any; -}; +// de_AwsEcsTaskDefinitionDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalWebAclRulesList - */ -const de_AwsWafRegionalWebAclRulesList = ( - output: any, - context: __SerdeContext -): AwsWafRegionalWebAclRulesListDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRegionalWebAclRulesListDetails(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskDefinitionInferenceAcceleratorsDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalWebAclRulesListActionDetails - */ -const de_AwsWafRegionalWebAclRulesListActionDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalWebAclRulesListActionDetails => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionInferenceAcceleratorsList omitted. -/** - * deserializeAws_restJson1AwsWafRegionalWebAclRulesListDetails - */ -const de_AwsWafRegionalWebAclRulesListDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalWebAclRulesListDetails => { - return { - Action: output.Action != null ? de_AwsWafRegionalWebAclRulesListActionDetails(output.Action, context) : undefined, - OverrideAction: - output.OverrideAction != null - ? de_AwsWafRegionalWebAclRulesListOverrideActionDetails(output.OverrideAction, context) - : undefined, - Priority: __expectInt32(output.Priority), - RuleId: __expectString(output.RuleId), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionPlacementConstraintsDetails omitted. -/** - * deserializeAws_restJson1AwsWafRegionalWebAclRulesListOverrideActionDetails - */ -const de_AwsWafRegionalWebAclRulesListOverrideActionDetails = ( - output: any, - context: __SerdeContext -): AwsWafRegionalWebAclRulesListOverrideActionDetails => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionPlacementConstraintsList omitted. -/** - * deserializeAws_restJson1AwsWafRuleDetails - */ -const de_AwsWafRuleDetails = (output: any, context: __SerdeContext): AwsWafRuleDetails => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - PredicateList: output.PredicateList != null ? de_AwsWafRulePredicateList(output.PredicateList, context) : undefined, - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_AwsEcsTaskDefinitionProxyConfigurationDetails omitted. -/** - * deserializeAws_restJson1AwsWafRuleGroupDetails - */ -const de_AwsWafRuleGroupDetails = (output: any, context: __SerdeContext): AwsWafRuleGroupDetails => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - Rules: output.Rules != null ? de_AwsWafRuleGroupRulesList(output.Rules, context) : undefined, - } as any; -}; +// de_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesDetails omitted. -/** - * deserializeAws_restJson1AwsWafRuleGroupRulesActionDetails - */ -const de_AwsWafRuleGroupRulesActionDetails = ( - output: any, - context: __SerdeContext -): AwsWafRuleGroupRulesActionDetails => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionProxyConfigurationProxyConfigurationPropertiesList omitted. -/** - * deserializeAws_restJson1AwsWafRuleGroupRulesDetails - */ -const de_AwsWafRuleGroupRulesDetails = (output: any, context: __SerdeContext): AwsWafRuleGroupRulesDetails => { - return { - Action: output.Action != null ? de_AwsWafRuleGroupRulesActionDetails(output.Action, context) : undefined, - Priority: __expectInt32(output.Priority), - RuleId: __expectString(output.RuleId), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionVolumesDetails omitted. -/** - * deserializeAws_restJson1AwsWafRuleGroupRulesList - */ -const de_AwsWafRuleGroupRulesList = (output: any, context: __SerdeContext): AwsWafRuleGroupRulesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRuleGroupRulesDetails(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskDefinitionVolumesDockerVolumeConfigurationDetails omitted. -/** - * deserializeAws_restJson1AwsWafRulePredicateList - */ -const de_AwsWafRulePredicateList = (output: any, context: __SerdeContext): AwsWafRulePredicateListDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafRulePredicateListDetails(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationAuthorizationConfigDetails omitted. -/** - * deserializeAws_restJson1AwsWafRulePredicateListDetails - */ -const de_AwsWafRulePredicateListDetails = (output: any, context: __SerdeContext): AwsWafRulePredicateListDetails => { - return { - DataId: __expectString(output.DataId), - Negated: __expectBoolean(output.Negated), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsEcsTaskDefinitionVolumesEfsVolumeConfigurationDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2ActionAllowDetails - */ -const de_AwsWafv2ActionAllowDetails = (output: any, context: __SerdeContext): AwsWafv2ActionAllowDetails => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_AwsWafv2CustomRequestHandlingDetails(output.CustomRequestHandling, context) - : undefined, - } as any; -}; +// de_AwsEcsTaskDefinitionVolumesHostDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2ActionBlockDetails - */ -const de_AwsWafv2ActionBlockDetails = (output: any, context: __SerdeContext): AwsWafv2ActionBlockDetails => { - return { - CustomResponse: - output.CustomResponse != null ? de_AwsWafv2CustomResponseDetails(output.CustomResponse, context) : undefined, - } as any; -}; +// de_AwsEcsTaskDefinitionVolumesList omitted. -/** - * deserializeAws_restJson1AwsWafv2CustomHttpHeader - */ -const de_AwsWafv2CustomHttpHeader = (output: any, context: __SerdeContext): AwsWafv2CustomHttpHeader => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_AwsEcsTaskDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2CustomRequestHandlingDetails - */ -const de_AwsWafv2CustomRequestHandlingDetails = ( - output: any, - context: __SerdeContext -): AwsWafv2CustomRequestHandlingDetails => { - return { - InsertHeaders: - output.InsertHeaders != null ? de_AwsWafv2InsertHeadersList(output.InsertHeaders, context) : undefined, - } as any; -}; +// de_AwsEcsTaskVolumeDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2CustomResponseDetails - */ -const de_AwsWafv2CustomResponseDetails = (output: any, context: __SerdeContext): AwsWafv2CustomResponseDetails => { - return { - CustomResponseBodyKey: __expectString(output.CustomResponseBodyKey), - ResponseCode: __expectInt32(output.ResponseCode), - ResponseHeaders: - output.ResponseHeaders != null ? de_AwsWafv2InsertHeadersList(output.ResponseHeaders, context) : undefined, - } as any; -}; +// de_AwsEcsTaskVolumeDetailsList omitted. -/** - * deserializeAws_restJson1AwsWafv2InsertHeadersList - */ -const de_AwsWafv2InsertHeadersList = (output: any, context: __SerdeContext): AwsWafv2CustomHttpHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafv2CustomHttpHeader(entry, context); - }); - return retVal; -}; +// de_AwsEcsTaskVolumeHostDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2RuleGroupDetails - */ -const de_AwsWafv2RuleGroupDetails = (output: any, context: __SerdeContext): AwsWafv2RuleGroupDetails => { - return { - Arn: __expectString(output.Arn), - Capacity: __expectLong(output.Capacity), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_AwsWafv2RulesList(output.Rules, context) : undefined, - Scope: __expectString(output.Scope), - VisibilityConfig: - output.VisibilityConfig != null - ? de_AwsWafv2VisibilityConfigDetails(output.VisibilityConfig, context) - : undefined, - } as any; -}; +// de_AwsEfsAccessPointDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2RulesActionCaptchaDetails - */ -const de_AwsWafv2RulesActionCaptchaDetails = ( - output: any, - context: __SerdeContext -): AwsWafv2RulesActionCaptchaDetails => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_AwsWafv2CustomRequestHandlingDetails(output.CustomRequestHandling, context) - : undefined, - } as any; -}; +// de_AwsEfsAccessPointPosixUserDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2RulesActionCountDetails - */ -const de_AwsWafv2RulesActionCountDetails = (output: any, context: __SerdeContext): AwsWafv2RulesActionCountDetails => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_AwsWafv2CustomRequestHandlingDetails(output.CustomRequestHandling, context) - : undefined, - } as any; -}; +// de_AwsEfsAccessPointRootDirectoryCreationInfoDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2RulesActionDetails - */ -const de_AwsWafv2RulesActionDetails = (output: any, context: __SerdeContext): AwsWafv2RulesActionDetails => { - return { - Allow: output.Allow != null ? de_AwsWafv2ActionAllowDetails(output.Allow, context) : undefined, - Block: output.Block != null ? de_AwsWafv2ActionBlockDetails(output.Block, context) : undefined, - Captcha: output.Captcha != null ? de_AwsWafv2RulesActionCaptchaDetails(output.Captcha, context) : undefined, - Count: output.Count != null ? de_AwsWafv2RulesActionCountDetails(output.Count, context) : undefined, - } as any; -}; +// de_AwsEfsAccessPointRootDirectoryDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2RulesDetails - */ -const de_AwsWafv2RulesDetails = (output: any, context: __SerdeContext): AwsWafv2RulesDetails => { - return { - Action: output.Action != null ? de_AwsWafv2RulesActionDetails(output.Action, context) : undefined, - Name: __expectString(output.Name), - OverrideAction: __expectString(output.OverrideAction), - Priority: __expectInt32(output.Priority), - VisibilityConfig: - output.VisibilityConfig != null - ? de_AwsWafv2VisibilityConfigDetails(output.VisibilityConfig, context) - : undefined, - } as any; -}; +// de_AwsEksClusterDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2RulesList - */ -const de_AwsWafv2RulesList = (output: any, context: __SerdeContext): AwsWafv2RulesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafv2RulesDetails(entry, context); - }); - return retVal; -}; +// de_AwsEksClusterLoggingClusterLoggingDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2VisibilityConfigDetails - */ -const de_AwsWafv2VisibilityConfigDetails = (output: any, context: __SerdeContext): AwsWafv2VisibilityConfigDetails => { - return { - CloudWatchMetricsEnabled: __expectBoolean(output.CloudWatchMetricsEnabled), - MetricName: __expectString(output.MetricName), - SampledRequestsEnabled: __expectBoolean(output.SampledRequestsEnabled), - } as any; -}; +// de_AwsEksClusterLoggingClusterLoggingList omitted. -/** - * deserializeAws_restJson1AwsWafv2WebAclActionDetails - */ -const de_AwsWafv2WebAclActionDetails = (output: any, context: __SerdeContext): AwsWafv2WebAclActionDetails => { - return { - Allow: output.Allow != null ? de_AwsWafv2ActionAllowDetails(output.Allow, context) : undefined, - Block: output.Block != null ? de_AwsWafv2ActionBlockDetails(output.Block, context) : undefined, - } as any; -}; +// de_AwsEksClusterLoggingDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2WebAclCaptchaConfigDetails - */ -const de_AwsWafv2WebAclCaptchaConfigDetails = ( - output: any, - context: __SerdeContext -): AwsWafv2WebAclCaptchaConfigDetails => { - return { - ImmunityTimeProperty: - output.ImmunityTimeProperty != null - ? de_AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails(output.ImmunityTimeProperty, context) - : undefined, - } as any; -}; +// de_AwsEksClusterResourcesVpcConfigDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails - */ -const de_AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails = ( - output: any, - context: __SerdeContext -): AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails => { - return { - ImmunityTime: __expectLong(output.ImmunityTime), - } as any; -}; +// de_AwsElasticBeanstalkEnvironmentDetails omitted. -/** - * deserializeAws_restJson1AwsWafv2WebAclDetails - */ -const de_AwsWafv2WebAclDetails = (output: any, context: __SerdeContext): AwsWafv2WebAclDetails => { - return { - Arn: __expectString(output.Arn), - Capacity: __expectLong(output.Capacity), - CaptchaConfig: - output.CaptchaConfig != null ? de_AwsWafv2WebAclCaptchaConfigDetails(output.CaptchaConfig, context) : undefined, - DefaultAction: - output.DefaultAction != null ? de_AwsWafv2WebAclActionDetails(output.DefaultAction, context) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - ManagedbyFirewallManager: __expectBoolean(output.ManagedbyFirewallManager), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_AwsWafv2RulesList(output.Rules, context) : undefined, - VisibilityConfig: - output.VisibilityConfig != null - ? de_AwsWafv2VisibilityConfigDetails(output.VisibilityConfig, context) - : undefined, - } as any; -}; +// de_AwsElasticBeanstalkEnvironmentEnvironmentLink omitted. -/** - * deserializeAws_restJson1AwsWafWebAclDetails - */ -const de_AwsWafWebAclDetails = (output: any, context: __SerdeContext): AwsWafWebAclDetails => { - return { - DefaultAction: __expectString(output.DefaultAction), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_AwsWafWebAclRuleList(output.Rules, context) : undefined, - WebAclId: __expectString(output.WebAclId), - } as any; -}; +// de_AwsElasticBeanstalkEnvironmentEnvironmentLinks omitted. -/** - * deserializeAws_restJson1AwsWafWebAclRule - */ -const de_AwsWafWebAclRule = (output: any, context: __SerdeContext): AwsWafWebAclRule => { - return { - Action: output.Action != null ? de_WafAction(output.Action, context) : undefined, - ExcludedRules: output.ExcludedRules != null ? de_WafExcludedRuleList(output.ExcludedRules, context) : undefined, - OverrideAction: output.OverrideAction != null ? de_WafOverrideAction(output.OverrideAction, context) : undefined, - Priority: __expectInt32(output.Priority), - RuleId: __expectString(output.RuleId), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsElasticBeanstalkEnvironmentOptionSetting omitted. -/** - * deserializeAws_restJson1AwsWafWebAclRuleList - */ -const de_AwsWafWebAclRuleList = (output: any, context: __SerdeContext): AwsWafWebAclRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AwsWafWebAclRule(entry, context); - }); - return retVal; -}; +// de_AwsElasticBeanstalkEnvironmentOptionSettings omitted. -/** - * deserializeAws_restJson1AwsXrayEncryptionConfigDetails - */ -const de_AwsXrayEncryptionConfigDetails = (output: any, context: __SerdeContext): AwsXrayEncryptionConfigDetails => { - return { - KeyId: __expectString(output.KeyId), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsElasticBeanstalkEnvironmentTier omitted. -/** - * deserializeAws_restJson1BatchUpdateFindingsUnprocessedFinding - */ -const de_BatchUpdateFindingsUnprocessedFinding = ( - output: any, - context: __SerdeContext -): BatchUpdateFindingsUnprocessedFinding => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - FindingIdentifier: - output.FindingIdentifier != null ? de_AwsSecurityFindingIdentifier(output.FindingIdentifier, context) : undefined, - } as any; -}; +// de_AwsElasticsearchDomainDetails omitted. -/** - * deserializeAws_restJson1BatchUpdateFindingsUnprocessedFindingsList - */ -const de_BatchUpdateFindingsUnprocessedFindingsList = ( - output: any, - context: __SerdeContext -): BatchUpdateFindingsUnprocessedFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BatchUpdateFindingsUnprocessedFinding(entry, context); - }); - return retVal; -}; +// de_AwsElasticsearchDomainDomainEndpointOptions omitted. -/** - * deserializeAws_restJson1BooleanFilter - */ -const de_BooleanFilter = (output: any, context: __SerdeContext): BooleanFilter => { - return { - Value: __expectBoolean(output.Value), - } as any; -}; +// de_AwsElasticsearchDomainElasticsearchClusterConfigDetails omitted. -/** - * deserializeAws_restJson1BooleanFilterList - */ -const de_BooleanFilterList = (output: any, context: __SerdeContext): BooleanFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BooleanFilter(entry, context); - }); - return retVal; -}; +// de_AwsElasticsearchDomainElasticsearchClusterConfigZoneAwarenessConfigDetails omitted. -/** - * deserializeAws_restJson1CategoryList - */ -const de_CategoryList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsElasticsearchDomainEncryptionAtRestOptions omitted. -/** - * deserializeAws_restJson1Cell - */ -const de_Cell = (output: any, context: __SerdeContext): Cell => { - return { - CellReference: __expectString(output.CellReference), - Column: __expectLong(output.Column), - ColumnName: __expectString(output.ColumnName), - Row: __expectLong(output.Row), - } as any; -}; +// de_AwsElasticsearchDomainLogPublishingOptions omitted. -/** - * deserializeAws_restJson1Cells - */ -const de_Cells = (output: any, context: __SerdeContext): Cell[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Cell(entry, context); - }); - return retVal; -}; +// de_AwsElasticsearchDomainLogPublishingOptionsLogConfig omitted. + +// de_AwsElasticsearchDomainNodeToNodeEncryptionOptions omitted. + +// de_AwsElasticsearchDomainServiceSoftwareOptions omitted. + +// de_AwsElasticsearchDomainVPCOptions omitted. -/** - * deserializeAws_restJson1CidrBlockAssociation - */ -const de_CidrBlockAssociation = (output: any, context: __SerdeContext): CidrBlockAssociation => { - return { - AssociationId: __expectString(output.AssociationId), - CidrBlock: __expectString(output.CidrBlock), - CidrBlockState: __expectString(output.CidrBlockState), - } as any; -}; +// de_AwsElbAppCookieStickinessPolicies omitted. -/** - * deserializeAws_restJson1CidrBlockAssociationList - */ -const de_CidrBlockAssociationList = (output: any, context: __SerdeContext): CidrBlockAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CidrBlockAssociation(entry, context); - }); - return retVal; -}; +// de_AwsElbAppCookieStickinessPolicy omitted. -/** - * deserializeAws_restJson1City - */ -const de_City = (output: any, context: __SerdeContext): City => { - return { - CityName: __expectString(output.CityName), - } as any; -}; +// de_AwsElbLbCookieStickinessPolicies omitted. -/** - * deserializeAws_restJson1ClassificationResult - */ -const de_ClassificationResult = (output: any, context: __SerdeContext): ClassificationResult => { - return { - AdditionalOccurrences: __expectBoolean(output.AdditionalOccurrences), - CustomDataIdentifiers: - output.CustomDataIdentifiers != null - ? de_CustomDataIdentifiersResult(output.CustomDataIdentifiers, context) - : undefined, - MimeType: __expectString(output.MimeType), - SensitiveData: output.SensitiveData != null ? de_SensitiveDataResultList(output.SensitiveData, context) : undefined, - SizeClassified: __expectLong(output.SizeClassified), - Status: output.Status != null ? de_ClassificationStatus(output.Status, context) : undefined, - } as any; -}; +// de_AwsElbLbCookieStickinessPolicy omitted. -/** - * deserializeAws_restJson1ClassificationStatus - */ -const de_ClassificationStatus = (output: any, context: __SerdeContext): ClassificationStatus => { - return { - Code: __expectString(output.Code), - Reason: __expectString(output.Reason), - } as any; -}; +// de_AwsElbLoadBalancerAccessLog omitted. -/** - * deserializeAws_restJson1Compliance - */ -const de_Compliance = (output: any, context: __SerdeContext): Compliance => { - return { - AssociatedStandards: - output.AssociatedStandards != null ? de_AssociatedStandardsList(output.AssociatedStandards, context) : undefined, - RelatedRequirements: - output.RelatedRequirements != null ? de_RelatedRequirementsList(output.RelatedRequirements, context) : undefined, - SecurityControlId: __expectString(output.SecurityControlId), - Status: __expectString(output.Status), - StatusReasons: output.StatusReasons != null ? de_StatusReasonsList(output.StatusReasons, context) : undefined, - } as any; -}; +// de_AwsElbLoadBalancerAdditionalAttribute omitted. -/** - * deserializeAws_restJson1ContainerDetails - */ -const de_ContainerDetails = (output: any, context: __SerdeContext): ContainerDetails => { - return { - ContainerRuntime: __expectString(output.ContainerRuntime), - ImageId: __expectString(output.ImageId), - ImageName: __expectString(output.ImageName), - LaunchedAt: __expectString(output.LaunchedAt), - Name: __expectString(output.Name), - Privileged: __expectBoolean(output.Privileged), - VolumeMounts: output.VolumeMounts != null ? de_VolumeMountList(output.VolumeMounts, context) : undefined, - } as any; -}; +// de_AwsElbLoadBalancerAdditionalAttributeList omitted. -/** - * deserializeAws_restJson1Country - */ -const de_Country = (output: any, context: __SerdeContext): Country => { - return { - CountryCode: __expectString(output.CountryCode), - CountryName: __expectString(output.CountryName), - } as any; -}; +// de_AwsElbLoadBalancerAttributes omitted. -/** - * deserializeAws_restJson1CustomDataIdentifiersDetections - */ -const de_CustomDataIdentifiersDetections = (output: any, context: __SerdeContext): CustomDataIdentifiersDetections => { - return { - Arn: __expectString(output.Arn), - Count: __expectLong(output.Count), - Name: __expectString(output.Name), - Occurrences: output.Occurrences != null ? de_Occurrences(output.Occurrences, context) : undefined, - } as any; -}; +// de_AwsElbLoadBalancerBackendServerDescription omitted. -/** - * deserializeAws_restJson1CustomDataIdentifiersDetectionsList - */ -const de_CustomDataIdentifiersDetectionsList = ( - output: any, - context: __SerdeContext -): CustomDataIdentifiersDetections[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomDataIdentifiersDetections(entry, context); - }); - return retVal; -}; +// de_AwsElbLoadBalancerBackendServerDescriptions omitted. -/** - * deserializeAws_restJson1CustomDataIdentifiersResult - */ -const de_CustomDataIdentifiersResult = (output: any, context: __SerdeContext): CustomDataIdentifiersResult => { - return { - Detections: - output.Detections != null ? de_CustomDataIdentifiersDetectionsList(output.Detections, context) : undefined, - TotalCount: __expectLong(output.TotalCount), - } as any; -}; +// de_AwsElbLoadBalancerConnectionDraining omitted. -/** - * deserializeAws_restJson1Cvss - */ -const de_Cvss = (output: any, context: __SerdeContext): Cvss => { - return { - Adjustments: output.Adjustments != null ? de_AdjustmentList(output.Adjustments, context) : undefined, - BaseScore: __limitedParseDouble(output.BaseScore), - BaseVector: __expectString(output.BaseVector), - Source: __expectString(output.Source), - Version: __expectString(output.Version), - } as any; -}; +// de_AwsElbLoadBalancerConnectionSettings omitted. -/** - * deserializeAws_restJson1CvssList - */ -const de_CvssList = (output: any, context: __SerdeContext): Cvss[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Cvss(entry, context); - }); - return retVal; -}; +// de_AwsElbLoadBalancerCrossZoneLoadBalancing omitted. -/** - * deserializeAws_restJson1DataClassificationDetails - */ -const de_DataClassificationDetails = (output: any, context: __SerdeContext): DataClassificationDetails => { - return { - DetailedResultsLocation: __expectString(output.DetailedResultsLocation), - Result: output.Result != null ? de_ClassificationResult(output.Result, context) : undefined, - } as any; -}; +// de_AwsElbLoadBalancerDetails omitted. -/** - * deserializeAws_restJson1DateFilter - */ -const de_DateFilter = (output: any, context: __SerdeContext): DateFilter => { - return { - DateRange: output.DateRange != null ? de_DateRange(output.DateRange, context) : undefined, - End: __expectString(output.End), - Start: __expectString(output.Start), - } as any; -}; +// de_AwsElbLoadBalancerHealthCheck omitted. -/** - * deserializeAws_restJson1DateFilterList - */ -const de_DateFilterList = (output: any, context: __SerdeContext): DateFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DateFilter(entry, context); - }); - return retVal; -}; +// de_AwsElbLoadBalancerInstance omitted. -/** - * deserializeAws_restJson1DateRange - */ -const de_DateRange = (output: any, context: __SerdeContext): DateRange => { - return { - Unit: __expectString(output.Unit), - Value: __expectInt32(output.Value), - } as any; -}; +// de_AwsElbLoadBalancerInstances omitted. -/** - * deserializeAws_restJson1DnsRequestAction - */ -const de_DnsRequestAction = (output: any, context: __SerdeContext): DnsRequestAction => { - return { - Blocked: __expectBoolean(output.Blocked), - Domain: __expectString(output.Domain), - Protocol: __expectString(output.Protocol), - } as any; -}; +// de_AwsElbLoadBalancerListener omitted. -/** - * deserializeAws_restJson1FieldMap - */ -const de_FieldMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AwsElbLoadBalancerListenerDescription omitted. -/** - * deserializeAws_restJson1FilePathList - */ -const de_FilePathList = (output: any, context: __SerdeContext): FilePaths[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FilePaths(entry, context); - }); - return retVal; -}; +// de_AwsElbLoadBalancerListenerDescriptions omitted. -/** - * deserializeAws_restJson1FilePaths - */ -const de_FilePaths = (output: any, context: __SerdeContext): FilePaths => { - return { - FileName: __expectString(output.FileName), - FilePath: __expectString(output.FilePath), - Hash: __expectString(output.Hash), - ResourceId: __expectString(output.ResourceId), - } as any; -}; +// de_AwsElbLoadBalancerPolicies omitted. -/** - * deserializeAws_restJson1FindingAggregator - */ -const de_FindingAggregator = (output: any, context: __SerdeContext): FindingAggregator => { - return { - FindingAggregatorArn: __expectString(output.FindingAggregatorArn), - } as any; -}; +// de_AwsElbLoadBalancerSourceSecurityGroup omitted. -/** - * deserializeAws_restJson1FindingAggregatorList - */ -const de_FindingAggregatorList = (output: any, context: __SerdeContext): FindingAggregator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FindingAggregator(entry, context); - }); - return retVal; -}; +// de_AwsElbv2LoadBalancerAttribute omitted. -/** - * deserializeAws_restJson1FindingProviderFields - */ -const de_FindingProviderFields = (output: any, context: __SerdeContext): FindingProviderFields => { - return { - Confidence: __expectInt32(output.Confidence), - Criticality: __expectInt32(output.Criticality), - RelatedFindings: - output.RelatedFindings != null ? de_RelatedFindingList(output.RelatedFindings, context) : undefined, - Severity: output.Severity != null ? de_FindingProviderSeverity(output.Severity, context) : undefined, - Types: output.Types != null ? de_TypeList(output.Types, context) : undefined, - } as any; -}; +// de_AwsElbv2LoadBalancerAttributes omitted. -/** - * deserializeAws_restJson1FindingProviderSeverity - */ -const de_FindingProviderSeverity = (output: any, context: __SerdeContext): FindingProviderSeverity => { - return { - Label: __expectString(output.Label), - Original: __expectString(output.Original), - } as any; -}; +// de_AwsElbv2LoadBalancerDetails omitted. -/** - * deserializeAws_restJson1FirewallPolicyDetails - */ -const de_FirewallPolicyDetails = (output: any, context: __SerdeContext): FirewallPolicyDetails => { - return { - StatefulRuleGroupReferences: - output.StatefulRuleGroupReferences != null - ? de_FirewallPolicyStatefulRuleGroupReferencesList(output.StatefulRuleGroupReferences, context) - : undefined, - StatelessCustomActions: - output.StatelessCustomActions != null - ? de_FirewallPolicyStatelessCustomActionsList(output.StatelessCustomActions, context) - : undefined, - StatelessDefaultActions: - output.StatelessDefaultActions != null - ? de_NonEmptyStringList(output.StatelessDefaultActions, context) - : undefined, - StatelessFragmentDefaultActions: - output.StatelessFragmentDefaultActions != null - ? de_NonEmptyStringList(output.StatelessFragmentDefaultActions, context) - : undefined, - StatelessRuleGroupReferences: - output.StatelessRuleGroupReferences != null - ? de_FirewallPolicyStatelessRuleGroupReferencesList(output.StatelessRuleGroupReferences, context) - : undefined, - } as any; -}; +// de_AwsIamAccessKeyDetails omitted. -/** - * deserializeAws_restJson1FirewallPolicyStatefulRuleGroupReferencesDetails - */ -const de_FirewallPolicyStatefulRuleGroupReferencesDetails = ( - output: any, - context: __SerdeContext -): FirewallPolicyStatefulRuleGroupReferencesDetails => { - return { - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_AwsIamAccessKeySessionContext omitted. -/** - * deserializeAws_restJson1FirewallPolicyStatefulRuleGroupReferencesList - */ -const de_FirewallPolicyStatefulRuleGroupReferencesList = ( - output: any, - context: __SerdeContext -): FirewallPolicyStatefulRuleGroupReferencesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallPolicyStatefulRuleGroupReferencesDetails(entry, context); - }); - return retVal; -}; +// de_AwsIamAccessKeySessionContextAttributes omitted. -/** - * deserializeAws_restJson1FirewallPolicyStatelessCustomActionsDetails - */ -const de_FirewallPolicyStatelessCustomActionsDetails = ( - output: any, - context: __SerdeContext -): FirewallPolicyStatelessCustomActionsDetails => { - return { - ActionDefinition: - output.ActionDefinition != null - ? de_StatelessCustomActionDefinition(output.ActionDefinition, context) - : undefined, - ActionName: __expectString(output.ActionName), - } as any; -}; +// de_AwsIamAccessKeySessionContextSessionIssuer omitted. -/** - * deserializeAws_restJson1FirewallPolicyStatelessCustomActionsList - */ -const de_FirewallPolicyStatelessCustomActionsList = ( - output: any, - context: __SerdeContext -): FirewallPolicyStatelessCustomActionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallPolicyStatelessCustomActionsDetails(entry, context); - }); - return retVal; -}; +// de_AwsIamAttachedManagedPolicy omitted. -/** - * deserializeAws_restJson1FirewallPolicyStatelessRuleGroupReferencesDetails - */ -const de_FirewallPolicyStatelessRuleGroupReferencesDetails = ( - output: any, - context: __SerdeContext -): FirewallPolicyStatelessRuleGroupReferencesDetails => { - return { - Priority: __expectInt32(output.Priority), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_AwsIamAttachedManagedPolicyList omitted. -/** - * deserializeAws_restJson1FirewallPolicyStatelessRuleGroupReferencesList - */ -const de_FirewallPolicyStatelessRuleGroupReferencesList = ( - output: any, - context: __SerdeContext -): FirewallPolicyStatelessRuleGroupReferencesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallPolicyStatelessRuleGroupReferencesDetails(entry, context); - }); - return retVal; -}; +// de_AwsIamGroupDetails omitted. -/** - * deserializeAws_restJson1GeoLocation - */ -const de_GeoLocation = (output: any, context: __SerdeContext): GeoLocation => { - return { - Lat: __limitedParseDouble(output.Lat), - Lon: __limitedParseDouble(output.Lon), - } as any; -}; +// de_AwsIamGroupPolicy omitted. -/** - * deserializeAws_restJson1IcmpTypeCode - */ -const de_IcmpTypeCode = (output: any, context: __SerdeContext): IcmpTypeCode => { - return { - Code: __expectInt32(output.Code), - Type: __expectInt32(output.Type), - } as any; -}; +// de_AwsIamGroupPolicyList omitted. -/** - * deserializeAws_restJson1ImportFindingsError - */ -const de_ImportFindingsError = (output: any, context: __SerdeContext): ImportFindingsError => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - } as any; -}; +// de_AwsIamInstanceProfile omitted. -/** - * deserializeAws_restJson1ImportFindingsErrorList - */ -const de_ImportFindingsErrorList = (output: any, context: __SerdeContext): ImportFindingsError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImportFindingsError(entry, context); - }); - return retVal; -}; +// de_AwsIamInstanceProfileList omitted. -/** - * deserializeAws_restJson1Insight - */ -const de_Insight = (output: any, context: __SerdeContext): Insight => { - return { - Filters: output.Filters != null ? de_AwsSecurityFindingFilters(output.Filters, context) : undefined, - GroupByAttribute: __expectString(output.GroupByAttribute), - InsightArn: __expectString(output.InsightArn), - Name: __expectString(output.Name), - } as any; -}; +// de_AwsIamInstanceProfileRole omitted. -/** - * deserializeAws_restJson1InsightList - */ -const de_InsightList = (output: any, context: __SerdeContext): Insight[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Insight(entry, context); - }); - return retVal; -}; +// de_AwsIamInstanceProfileRoles omitted. -/** - * deserializeAws_restJson1InsightResults - */ -const de_InsightResults = (output: any, context: __SerdeContext): InsightResults => { - return { - GroupByAttribute: __expectString(output.GroupByAttribute), - InsightArn: __expectString(output.InsightArn), - ResultValues: output.ResultValues != null ? de_InsightResultValueList(output.ResultValues, context) : undefined, - } as any; -}; +// de_AwsIamPermissionsBoundary omitted. -/** - * deserializeAws_restJson1InsightResultValue - */ -const de_InsightResultValue = (output: any, context: __SerdeContext): InsightResultValue => { - return { - Count: __expectInt32(output.Count), - GroupByAttributeValue: __expectString(output.GroupByAttributeValue), - } as any; -}; +// de_AwsIamPolicyDetails omitted. -/** - * deserializeAws_restJson1InsightResultValueList - */ -const de_InsightResultValueList = (output: any, context: __SerdeContext): InsightResultValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InsightResultValue(entry, context); - }); - return retVal; -}; +// de_AwsIamPolicyVersion omitted. -/** - * deserializeAws_restJson1IntegerList - */ -const de_IntegerList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_AwsIamPolicyVersionList omitted. -/** - * deserializeAws_restJson1IntegrationTypeList - */ -const de_IntegrationTypeList = (output: any, context: __SerdeContext): (IntegrationType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsIamRoleDetails omitted. -/** - * deserializeAws_restJson1Invitation - */ -const de_Invitation = (output: any, context: __SerdeContext): Invitation => { - return { - AccountId: __expectString(output.AccountId), - InvitationId: __expectString(output.InvitationId), - InvitedAt: - output.InvitedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.InvitedAt)) : undefined, - MemberStatus: __expectString(output.MemberStatus), - } as any; -}; +// de_AwsIamRolePolicy omitted. -/** - * deserializeAws_restJson1InvitationList - */ -const de_InvitationList = (output: any, context: __SerdeContext): Invitation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Invitation(entry, context); - }); - return retVal; -}; +// de_AwsIamRolePolicyList omitted. -/** - * deserializeAws_restJson1IpFilter - */ -const de_IpFilter = (output: any, context: __SerdeContext): IpFilter => { - return { - Cidr: __expectString(output.Cidr), - } as any; -}; +// de_AwsIamUserDetails omitted. -/** - * deserializeAws_restJson1IpFilterList - */ -const de_IpFilterList = (output: any, context: __SerdeContext): IpFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IpFilter(entry, context); - }); - return retVal; -}; +// de_AwsIamUserPolicy omitted. + +// de_AwsIamUserPolicyList omitted. + +// de_AwsKinesisStreamDetails omitted. + +// de_AwsKinesisStreamStreamEncryptionDetails omitted. /** - * deserializeAws_restJson1IpOrganizationDetails + * deserializeAws_restJson1AwsKmsKeyDetails */ -const de_IpOrganizationDetails = (output: any, context: __SerdeContext): IpOrganizationDetails => { - return { - Asn: __expectInt32(output.Asn), - AsnOrg: __expectString(output.AsnOrg), - Isp: __expectString(output.Isp), - Org: __expectString(output.Org), - } as any; +const de_AwsKmsKeyDetails = (output: any, context: __SerdeContext): AwsKmsKeyDetails => { + return take(output, { + AWSAccountId: __expectString, + CreationDate: __limitedParseDouble, + Description: __expectString, + KeyId: __expectString, + KeyManager: __expectString, + KeyRotationStatus: __expectBoolean, + KeyState: __expectString, + Origin: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Ipv6CidrBlockAssociation - */ -const de_Ipv6CidrBlockAssociation = (output: any, context: __SerdeContext): Ipv6CidrBlockAssociation => { - return { - AssociationId: __expectString(output.AssociationId), - CidrBlockState: __expectString(output.CidrBlockState), - Ipv6CidrBlock: __expectString(output.Ipv6CidrBlock), - } as any; -}; +// de_AwsLambdaFunctionCode omitted. -/** - * deserializeAws_restJson1Ipv6CidrBlockAssociationList - */ -const de_Ipv6CidrBlockAssociationList = (output: any, context: __SerdeContext): Ipv6CidrBlockAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ipv6CidrBlockAssociation(entry, context); - }); - return retVal; -}; +// de_AwsLambdaFunctionDeadLetterConfig omitted. -/** - * deserializeAws_restJson1KeywordFilter - */ -const de_KeywordFilter = (output: any, context: __SerdeContext): KeywordFilter => { - return { - Value: __expectString(output.Value), - } as any; -}; +// de_AwsLambdaFunctionDetails omitted. -/** - * deserializeAws_restJson1KeywordFilterList - */ -const de_KeywordFilterList = (output: any, context: __SerdeContext): KeywordFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KeywordFilter(entry, context); - }); - return retVal; -}; +// de_AwsLambdaFunctionEnvironment omitted. -/** - * deserializeAws_restJson1LoadBalancerState - */ -const de_LoadBalancerState = (output: any, context: __SerdeContext): LoadBalancerState => { - return { - Code: __expectString(output.Code), - Reason: __expectString(output.Reason), - } as any; -}; +// de_AwsLambdaFunctionEnvironmentError omitted. -/** - * deserializeAws_restJson1Malware - */ -const de_Malware = (output: any, context: __SerdeContext): Malware => { - return { - Name: __expectString(output.Name), - Path: __expectString(output.Path), - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; -}; +// de_AwsLambdaFunctionLayer omitted. -/** - * deserializeAws_restJson1MalwareList - */ -const de_MalwareList = (output: any, context: __SerdeContext): Malware[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Malware(entry, context); - }); - return retVal; -}; +// de_AwsLambdaFunctionLayerList omitted. -/** - * deserializeAws_restJson1MapFilter - */ -const de_MapFilter = (output: any, context: __SerdeContext): MapFilter => { - return { - Comparison: __expectString(output.Comparison), - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_AwsLambdaFunctionTracingConfig omitted. -/** - * deserializeAws_restJson1MapFilterList - */ -const de_MapFilterList = (output: any, context: __SerdeContext): MapFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MapFilter(entry, context); - }); - return retVal; -}; +// de_AwsLambdaFunctionVpcConfig omitted. -/** - * deserializeAws_restJson1Member - */ -const de_Member = (output: any, context: __SerdeContext): Member => { - return { - AccountId: __expectString(output.AccountId), - AdministratorId: __expectString(output.AdministratorId), - Email: __expectString(output.Email), - InvitedAt: - output.InvitedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.InvitedAt)) : undefined, - MasterId: __expectString(output.MasterId), - MemberStatus: __expectString(output.MemberStatus), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - } as any; -}; +// de_AwsLambdaLayerVersionDetails omitted. -/** - * deserializeAws_restJson1MemberList - */ -const de_MemberList = (output: any, context: __SerdeContext): Member[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Member(entry, context); - }); - return retVal; -}; +// de_AwsMountPoint omitted. -/** - * deserializeAws_restJson1Network - */ -const de_Network = (output: any, context: __SerdeContext): Network => { - return { - DestinationDomain: __expectString(output.DestinationDomain), - DestinationIpV4: __expectString(output.DestinationIpV4), - DestinationIpV6: __expectString(output.DestinationIpV6), - DestinationPort: __expectInt32(output.DestinationPort), - Direction: __expectString(output.Direction), - OpenPortRange: output.OpenPortRange != null ? de_PortRange(output.OpenPortRange, context) : undefined, - Protocol: __expectString(output.Protocol), - SourceDomain: __expectString(output.SourceDomain), - SourceIpV4: __expectString(output.SourceIpV4), - SourceIpV6: __expectString(output.SourceIpV6), - SourceMac: __expectString(output.SourceMac), - SourcePort: __expectInt32(output.SourcePort), - } as any; -}; +// de_AwsMountPointList omitted. -/** - * deserializeAws_restJson1NetworkConnectionAction - */ -const de_NetworkConnectionAction = (output: any, context: __SerdeContext): NetworkConnectionAction => { - return { - Blocked: __expectBoolean(output.Blocked), - ConnectionDirection: __expectString(output.ConnectionDirection), - LocalPortDetails: - output.LocalPortDetails != null ? de_ActionLocalPortDetails(output.LocalPortDetails, context) : undefined, - Protocol: __expectString(output.Protocol), - RemoteIpDetails: - output.RemoteIpDetails != null ? de_ActionRemoteIpDetails(output.RemoteIpDetails, context) : undefined, - RemotePortDetails: - output.RemotePortDetails != null ? de_ActionRemotePortDetails(output.RemotePortDetails, context) : undefined, - } as any; -}; +// de_AwsNetworkFirewallFirewallDetails omitted. -/** - * deserializeAws_restJson1NetworkHeader - */ -const de_NetworkHeader = (output: any, context: __SerdeContext): NetworkHeader => { - return { - Destination: output.Destination != null ? de_NetworkPathComponentDetails(output.Destination, context) : undefined, - Protocol: __expectString(output.Protocol), - Source: output.Source != null ? de_NetworkPathComponentDetails(output.Source, context) : undefined, - } as any; -}; +// de_AwsNetworkFirewallFirewallPolicyDetails omitted. -/** - * deserializeAws_restJson1NetworkPathComponent - */ -const de_NetworkPathComponent = (output: any, context: __SerdeContext): NetworkPathComponent => { - return { - ComponentId: __expectString(output.ComponentId), - ComponentType: __expectString(output.ComponentType), - Egress: output.Egress != null ? de_NetworkHeader(output.Egress, context) : undefined, - Ingress: output.Ingress != null ? de_NetworkHeader(output.Ingress, context) : undefined, - } as any; -}; +// de_AwsNetworkFirewallFirewallSubnetMappingsDetails omitted. -/** - * deserializeAws_restJson1NetworkPathComponentDetails - */ -const de_NetworkPathComponentDetails = (output: any, context: __SerdeContext): NetworkPathComponentDetails => { - return { - Address: output.Address != null ? de_StringList(output.Address, context) : undefined, - PortRanges: output.PortRanges != null ? de_PortRangeList(output.PortRanges, context) : undefined, - } as any; -}; +// de_AwsNetworkFirewallFirewallSubnetMappingsList omitted. /** - * deserializeAws_restJson1NetworkPathList + * deserializeAws_restJson1AwsNetworkFirewallRuleGroupDetails */ -const de_NetworkPathList = (output: any, context: __SerdeContext): NetworkPathComponent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkPathComponent(entry, context); - }); - return retVal; +const de_AwsNetworkFirewallRuleGroupDetails = ( + output: any, + context: __SerdeContext +): AwsNetworkFirewallRuleGroupDetails => { + return take(output, { + Capacity: __expectInt32, + Description: __expectString, + RuleGroup: _json, + RuleGroupArn: __expectString, + RuleGroupId: __expectString, + RuleGroupName: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1NonEmptyStringList - */ -const de_NonEmptyStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsOpenSearchServiceDomainAdvancedSecurityOptionsDetails omitted. -/** - * deserializeAws_restJson1Note - */ -const de_Note = (output: any, context: __SerdeContext): Note => { - return { - Text: __expectString(output.Text), - UpdatedAt: __expectString(output.UpdatedAt), - UpdatedBy: __expectString(output.UpdatedBy), - } as any; -}; +// de_AwsOpenSearchServiceDomainClusterConfigDetails omitted. -/** - * deserializeAws_restJson1NumberFilter - */ -const de_NumberFilter = (output: any, context: __SerdeContext): NumberFilter => { - return { - Eq: __limitedParseDouble(output.Eq), - Gte: __limitedParseDouble(output.Gte), - Lte: __limitedParseDouble(output.Lte), - } as any; -}; +// de_AwsOpenSearchServiceDomainClusterConfigZoneAwarenessConfigDetails omitted. -/** - * deserializeAws_restJson1NumberFilterList - */ -const de_NumberFilterList = (output: any, context: __SerdeContext): NumberFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NumberFilter(entry, context); - }); - return retVal; -}; +// de_AwsOpenSearchServiceDomainDetails omitted. -/** - * deserializeAws_restJson1Occurrences - */ -const de_Occurrences = (output: any, context: __SerdeContext): Occurrences => { - return { - Cells: output.Cells != null ? de_Cells(output.Cells, context) : undefined, - LineRanges: output.LineRanges != null ? de_Ranges(output.LineRanges, context) : undefined, - OffsetRanges: output.OffsetRanges != null ? de_Ranges(output.OffsetRanges, context) : undefined, - Pages: output.Pages != null ? de_Pages(output.Pages, context) : undefined, - Records: output.Records != null ? de_Records(output.Records, context) : undefined, - } as any; -}; +// de_AwsOpenSearchServiceDomainDomainEndpointOptionsDetails omitted. -/** - * deserializeAws_restJson1Page - */ -const de_Page = (output: any, context: __SerdeContext): Page => { - return { - LineRange: output.LineRange != null ? de_Range(output.LineRange, context) : undefined, - OffsetRange: output.OffsetRange != null ? de_Range(output.OffsetRange, context) : undefined, - PageNumber: __expectLong(output.PageNumber), - } as any; -}; +// de_AwsOpenSearchServiceDomainEncryptionAtRestOptionsDetails omitted. -/** - * deserializeAws_restJson1Pages - */ -const de_Pages = (output: any, context: __SerdeContext): Page[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Page(entry, context); - }); - return retVal; -}; +// de_AwsOpenSearchServiceDomainLogPublishingOption omitted. -/** - * deserializeAws_restJson1PatchSummary - */ -const de_PatchSummary = (output: any, context: __SerdeContext): PatchSummary => { - return { - FailedCount: __expectInt32(output.FailedCount), - Id: __expectString(output.Id), - InstalledCount: __expectInt32(output.InstalledCount), - InstalledOtherCount: __expectInt32(output.InstalledOtherCount), - InstalledPendingReboot: __expectInt32(output.InstalledPendingReboot), - InstalledRejectedCount: __expectInt32(output.InstalledRejectedCount), - MissingCount: __expectInt32(output.MissingCount), - Operation: __expectString(output.Operation), - OperationEndTime: __expectString(output.OperationEndTime), - OperationStartTime: __expectString(output.OperationStartTime), - RebootOption: __expectString(output.RebootOption), - } as any; -}; +// de_AwsOpenSearchServiceDomainLogPublishingOptionsDetails omitted. -/** - * deserializeAws_restJson1PortProbeAction - */ -const de_PortProbeAction = (output: any, context: __SerdeContext): PortProbeAction => { - return { - Blocked: __expectBoolean(output.Blocked), - PortProbeDetails: - output.PortProbeDetails != null ? de_PortProbeDetailList(output.PortProbeDetails, context) : undefined, - } as any; -}; +// de_AwsOpenSearchServiceDomainMasterUserOptionsDetails omitted. -/** - * deserializeAws_restJson1PortProbeDetail - */ -const de_PortProbeDetail = (output: any, context: __SerdeContext): PortProbeDetail => { - return { - LocalIpDetails: output.LocalIpDetails != null ? de_ActionLocalIpDetails(output.LocalIpDetails, context) : undefined, - LocalPortDetails: - output.LocalPortDetails != null ? de_ActionLocalPortDetails(output.LocalPortDetails, context) : undefined, - RemoteIpDetails: - output.RemoteIpDetails != null ? de_ActionRemoteIpDetails(output.RemoteIpDetails, context) : undefined, - } as any; -}; +// de_AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails omitted. -/** - * deserializeAws_restJson1PortProbeDetailList - */ -const de_PortProbeDetailList = (output: any, context: __SerdeContext): PortProbeDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortProbeDetail(entry, context); - }); - return retVal; -}; +// de_AwsOpenSearchServiceDomainServiceSoftwareOptionsDetails omitted. -/** - * deserializeAws_restJson1PortRange - */ -const de_PortRange = (output: any, context: __SerdeContext): PortRange => { - return { - Begin: __expectInt32(output.Begin), - End: __expectInt32(output.End), - } as any; -}; +// de_AwsOpenSearchServiceDomainVpcOptionsDetails omitted. -/** - * deserializeAws_restJson1PortRangeFromTo - */ -const de_PortRangeFromTo = (output: any, context: __SerdeContext): PortRangeFromTo => { - return { - From: __expectInt32(output.From), - To: __expectInt32(output.To), - } as any; -}; +// de_AwsRdsDbClusterAssociatedRole omitted. -/** - * deserializeAws_restJson1PortRangeList - */ -const de_PortRangeList = (output: any, context: __SerdeContext): PortRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortRange(entry, context); - }); - return retVal; -}; +// de_AwsRdsDbClusterAssociatedRoles omitted. -/** - * deserializeAws_restJson1ProcessDetails - */ -const de_ProcessDetails = (output: any, context: __SerdeContext): ProcessDetails => { - return { - LaunchedAt: __expectString(output.LaunchedAt), - Name: __expectString(output.Name), - ParentPid: __expectInt32(output.ParentPid), - Path: __expectString(output.Path), - Pid: __expectInt32(output.Pid), - TerminatedAt: __expectString(output.TerminatedAt), - } as any; -}; +// de_AwsRdsDbClusterDetails omitted. -/** - * deserializeAws_restJson1Product - */ -const de_Product = (output: any, context: __SerdeContext): Product => { - return { - ActivationUrl: __expectString(output.ActivationUrl), - Categories: output.Categories != null ? de_CategoryList(output.Categories, context) : undefined, - CompanyName: __expectString(output.CompanyName), - Description: __expectString(output.Description), - IntegrationTypes: - output.IntegrationTypes != null ? de_IntegrationTypeList(output.IntegrationTypes, context) : undefined, - MarketplaceUrl: __expectString(output.MarketplaceUrl), - ProductArn: __expectString(output.ProductArn), - ProductName: __expectString(output.ProductName), - ProductSubscriptionResourcePolicy: __expectString(output.ProductSubscriptionResourcePolicy), - } as any; -}; +// de_AwsRdsDbClusterMember omitted. -/** - * deserializeAws_restJson1ProductsList - */ -const de_ProductsList = (output: any, context: __SerdeContext): Product[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Product(entry, context); - }); - return retVal; -}; +// de_AwsRdsDbClusterMembers omitted. -/** - * deserializeAws_restJson1ProductSubscriptionArnList - */ -const de_ProductSubscriptionArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsRdsDbClusterOptionGroupMembership omitted. -/** - * deserializeAws_restJson1PropagatingVgwSetDetails - */ -const de_PropagatingVgwSetDetails = (output: any, context: __SerdeContext): PropagatingVgwSetDetails => { - return { - GatewayId: __expectString(output.GatewayId), - } as any; -}; +// de_AwsRdsDbClusterOptionGroupMemberships omitted. -/** - * deserializeAws_restJson1PropagatingVgwSetList - */ -const de_PropagatingVgwSetList = (output: any, context: __SerdeContext): PropagatingVgwSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PropagatingVgwSetDetails(entry, context); - }); - return retVal; -}; +// de_AwsRdsDbClusterSnapshotDetails omitted. -/** - * deserializeAws_restJson1Range - */ -const de_Range = (output: any, context: __SerdeContext): Range => { - return { - End: __expectLong(output.End), - Start: __expectLong(output.Start), - StartColumn: __expectLong(output.StartColumn), - } as any; -}; +// de_AwsRdsDbDomainMembership omitted. -/** - * deserializeAws_restJson1Ranges - */ -const de_Ranges = (output: any, context: __SerdeContext): Range[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Range(entry, context); - }); - return retVal; -}; +// de_AwsRdsDbDomainMemberships omitted. -/** - * deserializeAws_restJson1Recommendation - */ -const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - Text: __expectString(output.Text), - Url: __expectString(output.Url), - } as any; -}; +// de_AwsRdsDbInstanceAssociatedRole omitted. -/** - * deserializeAws_restJson1_Record - */ -const de__Record = (output: any, context: __SerdeContext): _Record => { - return { - JsonPath: __expectString(output.JsonPath), - RecordIndex: __expectLong(output.RecordIndex), - } as any; -}; +// de_AwsRdsDbInstanceAssociatedRoles omitted. + +// de_AwsRdsDbInstanceDetails omitted. + +// de_AwsRdsDbInstanceEndpoint omitted. + +// de_AwsRdsDbInstanceVpcSecurityGroup omitted. + +// de_AwsRdsDbInstanceVpcSecurityGroups omitted. + +// de_AwsRdsDbOptionGroupMembership omitted. + +// de_AwsRdsDbOptionGroupMemberships omitted. + +// de_AwsRdsDbParameterGroup omitted. + +// de_AwsRdsDbParameterGroups omitted. + +// de_AwsRdsDbPendingModifiedValues omitted. + +// de_AwsRdsDbProcessorFeature omitted. + +// de_AwsRdsDbProcessorFeatures omitted. + +// de_AwsRdsDbSecurityGroupDetails omitted. + +// de_AwsRdsDbSecurityGroupEc2SecurityGroup omitted. + +// de_AwsRdsDbSecurityGroupEc2SecurityGroups omitted. + +// de_AwsRdsDbSecurityGroupIpRange omitted. + +// de_AwsRdsDbSecurityGroupIpRanges omitted. + +// de_AwsRdsDbSnapshotDetails omitted. + +// de_AwsRdsDbStatusInfo omitted. + +// de_AwsRdsDbStatusInfos omitted. + +// de_AwsRdsDbSubnetGroup omitted. + +// de_AwsRdsDbSubnetGroupSubnet omitted. + +// de_AwsRdsDbSubnetGroupSubnetAvailabilityZone omitted. + +// de_AwsRdsDbSubnetGroupSubnets omitted. + +// de_AwsRdsEventSubscriptionDetails omitted. + +// de_AwsRdsPendingCloudWatchLogsExports omitted. + +// de_AwsRedshiftClusterClusterNode omitted. + +// de_AwsRedshiftClusterClusterNodes omitted. + +// de_AwsRedshiftClusterClusterParameterGroup omitted. + +// de_AwsRedshiftClusterClusterParameterGroups omitted. + +// de_AwsRedshiftClusterClusterParameterStatus omitted. + +// de_AwsRedshiftClusterClusterParameterStatusList omitted. + +// de_AwsRedshiftClusterClusterSecurityGroup omitted. + +// de_AwsRedshiftClusterClusterSecurityGroups omitted. + +// de_AwsRedshiftClusterClusterSnapshotCopyStatus omitted. + +// de_AwsRedshiftClusterDeferredMaintenanceWindow omitted. -/** - * deserializeAws_restJson1Records - */ -const de_Records = (output: any, context: __SerdeContext): _Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de__Record(entry, context); - }); - return retVal; -}; +// de_AwsRedshiftClusterDeferredMaintenanceWindows omitted. /** - * deserializeAws_restJson1RelatedFinding + * deserializeAws_restJson1AwsRedshiftClusterDetails */ -const de_RelatedFinding = (output: any, context: __SerdeContext): RelatedFinding => { - return { - Id: __expectString(output.Id), - ProductArn: __expectString(output.ProductArn), - } as any; -}; +const de_AwsRedshiftClusterDetails = (output: any, context: __SerdeContext): AwsRedshiftClusterDetails => { + return take(output, { + AllowVersionUpgrade: __expectBoolean, + AutomatedSnapshotRetentionPeriod: __expectInt32, + AvailabilityZone: __expectString, + ClusterAvailabilityStatus: __expectString, + ClusterCreateTime: __expectString, + ClusterIdentifier: __expectString, + ClusterNodes: _json, + ClusterParameterGroups: _json, + ClusterPublicKey: __expectString, + ClusterRevisionNumber: __expectString, + ClusterSecurityGroups: _json, + ClusterSnapshotCopyStatus: _json, + ClusterStatus: __expectString, + ClusterSubnetGroupName: __expectString, + ClusterVersion: __expectString, + DBName: __expectString, + DeferredMaintenanceWindows: _json, + ElasticIpStatus: _json, + ElasticResizeNumberOfNodeOptions: __expectString, + Encrypted: __expectBoolean, + Endpoint: _json, + EnhancedVpcRouting: __expectBoolean, + ExpectedNextSnapshotScheduleTime: __expectString, + ExpectedNextSnapshotScheduleTimeStatus: __expectString, + HsmStatus: _json, + IamRoles: _json, + KmsKeyId: __expectString, + LoggingStatus: _json, + MaintenanceTrackName: __expectString, + ManualSnapshotRetentionPeriod: __expectInt32, + MasterUsername: __expectString, + NextMaintenanceWindowStartTime: __expectString, + NodeType: __expectString, + NumberOfNodes: __expectInt32, + PendingActions: _json, + PendingModifiedValues: _json, + PreferredMaintenanceWindow: __expectString, + PubliclyAccessible: __expectBoolean, + ResizeInfo: _json, + RestoreStatus: (_: any) => de_AwsRedshiftClusterRestoreStatus(_, context), + SnapshotScheduleIdentifier: __expectString, + SnapshotScheduleState: __expectString, + VpcId: __expectString, + VpcSecurityGroups: _json, + }) as any; +}; + +// de_AwsRedshiftClusterElasticIpStatus omitted. + +// de_AwsRedshiftClusterEndpoint omitted. + +// de_AwsRedshiftClusterHsmStatus omitted. + +// de_AwsRedshiftClusterIamRole omitted. + +// de_AwsRedshiftClusterIamRoles omitted. + +// de_AwsRedshiftClusterLoggingStatus omitted. + +// de_AwsRedshiftClusterPendingModifiedValues omitted. + +// de_AwsRedshiftClusterResizeInfo omitted. /** - * deserializeAws_restJson1RelatedFindingList + * deserializeAws_restJson1AwsRedshiftClusterRestoreStatus */ -const de_RelatedFindingList = (output: any, context: __SerdeContext): RelatedFinding[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelatedFinding(entry, context); - }); - return retVal; +const de_AwsRedshiftClusterRestoreStatus = (output: any, context: __SerdeContext): AwsRedshiftClusterRestoreStatus => { + return take(output, { + CurrentRestoreRateInMegaBytesPerSecond: __limitedParseDouble, + ElapsedTimeInSeconds: __expectLong, + EstimatedTimeToCompletionInSeconds: __expectLong, + ProgressInMegaBytes: __expectLong, + SnapshotSizeInMegaBytes: __expectLong, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1RelatedRequirementsList - */ -const de_RelatedRequirementsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsRedshiftClusterVpcSecurityGroup omitted. -/** - * deserializeAws_restJson1Remediation - */ -const de_Remediation = (output: any, context: __SerdeContext): Remediation => { - return { - Recommendation: output.Recommendation != null ? de_Recommendation(output.Recommendation, context) : undefined, - } as any; -}; +// de_AwsRedshiftClusterVpcSecurityGroups omitted. -/** - * deserializeAws_restJson1Resource - */ -const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - DataClassification: - output.DataClassification != null ? de_DataClassificationDetails(output.DataClassification, context) : undefined, - Details: output.Details != null ? de_ResourceDetails(output.Details, context) : undefined, - Id: __expectString(output.Id), - Partition: __expectString(output.Partition), - Region: __expectString(output.Region), - ResourceRole: __expectString(output.ResourceRole), - Tags: output.Tags != null ? de_FieldMap(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_AwsS3AccountPublicAccessBlockDetails omitted. -/** - * deserializeAws_restJson1ResourceDetails - */ -const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - AwsApiGatewayRestApi: - output.AwsApiGatewayRestApi != null - ? de_AwsApiGatewayRestApiDetails(output.AwsApiGatewayRestApi, context) - : undefined, - AwsApiGatewayStage: - output.AwsApiGatewayStage != null ? de_AwsApiGatewayStageDetails(output.AwsApiGatewayStage, context) : undefined, - AwsApiGatewayV2Api: - output.AwsApiGatewayV2Api != null ? de_AwsApiGatewayV2ApiDetails(output.AwsApiGatewayV2Api, context) : undefined, - AwsApiGatewayV2Stage: - output.AwsApiGatewayV2Stage != null - ? de_AwsApiGatewayV2StageDetails(output.AwsApiGatewayV2Stage, context) - : undefined, - AwsAutoScalingAutoScalingGroup: - output.AwsAutoScalingAutoScalingGroup != null - ? de_AwsAutoScalingAutoScalingGroupDetails(output.AwsAutoScalingAutoScalingGroup, context) - : undefined, - AwsAutoScalingLaunchConfiguration: - output.AwsAutoScalingLaunchConfiguration != null - ? de_AwsAutoScalingLaunchConfigurationDetails(output.AwsAutoScalingLaunchConfiguration, context) - : undefined, - AwsBackupBackupPlan: - output.AwsBackupBackupPlan != null - ? de_AwsBackupBackupPlanDetails(output.AwsBackupBackupPlan, context) - : undefined, - AwsBackupBackupVault: - output.AwsBackupBackupVault != null - ? de_AwsBackupBackupVaultDetails(output.AwsBackupBackupVault, context) - : undefined, - AwsBackupRecoveryPoint: - output.AwsBackupRecoveryPoint != null - ? de_AwsBackupRecoveryPointDetails(output.AwsBackupRecoveryPoint, context) - : undefined, - AwsCertificateManagerCertificate: - output.AwsCertificateManagerCertificate != null - ? de_AwsCertificateManagerCertificateDetails(output.AwsCertificateManagerCertificate, context) - : undefined, - AwsCloudFormationStack: - output.AwsCloudFormationStack != null - ? de_AwsCloudFormationStackDetails(output.AwsCloudFormationStack, context) - : undefined, - AwsCloudFrontDistribution: - output.AwsCloudFrontDistribution != null - ? de_AwsCloudFrontDistributionDetails(output.AwsCloudFrontDistribution, context) - : undefined, - AwsCloudTrailTrail: - output.AwsCloudTrailTrail != null ? de_AwsCloudTrailTrailDetails(output.AwsCloudTrailTrail, context) : undefined, - AwsCloudWatchAlarm: - output.AwsCloudWatchAlarm != null ? de_AwsCloudWatchAlarmDetails(output.AwsCloudWatchAlarm, context) : undefined, - AwsCodeBuildProject: - output.AwsCodeBuildProject != null - ? de_AwsCodeBuildProjectDetails(output.AwsCodeBuildProject, context) - : undefined, - AwsDynamoDbTable: - output.AwsDynamoDbTable != null ? de_AwsDynamoDbTableDetails(output.AwsDynamoDbTable, context) : undefined, - AwsEc2Eip: output.AwsEc2Eip != null ? de_AwsEc2EipDetails(output.AwsEc2Eip, context) : undefined, - AwsEc2Instance: - output.AwsEc2Instance != null ? de_AwsEc2InstanceDetails(output.AwsEc2Instance, context) : undefined, - AwsEc2LaunchTemplate: - output.AwsEc2LaunchTemplate != null - ? de_AwsEc2LaunchTemplateDetails(output.AwsEc2LaunchTemplate, context) - : undefined, - AwsEc2NetworkAcl: - output.AwsEc2NetworkAcl != null ? de_AwsEc2NetworkAclDetails(output.AwsEc2NetworkAcl, context) : undefined, - AwsEc2NetworkInterface: - output.AwsEc2NetworkInterface != null - ? de_AwsEc2NetworkInterfaceDetails(output.AwsEc2NetworkInterface, context) - : undefined, - AwsEc2RouteTable: - output.AwsEc2RouteTable != null ? de_AwsEc2RouteTableDetails(output.AwsEc2RouteTable, context) : undefined, - AwsEc2SecurityGroup: - output.AwsEc2SecurityGroup != null - ? de_AwsEc2SecurityGroupDetails(output.AwsEc2SecurityGroup, context) - : undefined, - AwsEc2Subnet: output.AwsEc2Subnet != null ? de_AwsEc2SubnetDetails(output.AwsEc2Subnet, context) : undefined, - AwsEc2TransitGateway: - output.AwsEc2TransitGateway != null - ? de_AwsEc2TransitGatewayDetails(output.AwsEc2TransitGateway, context) - : undefined, - AwsEc2Volume: output.AwsEc2Volume != null ? de_AwsEc2VolumeDetails(output.AwsEc2Volume, context) : undefined, - AwsEc2Vpc: output.AwsEc2Vpc != null ? de_AwsEc2VpcDetails(output.AwsEc2Vpc, context) : undefined, - AwsEc2VpcEndpointService: - output.AwsEc2VpcEndpointService != null - ? de_AwsEc2VpcEndpointServiceDetails(output.AwsEc2VpcEndpointService, context) - : undefined, - AwsEc2VpcPeeringConnection: - output.AwsEc2VpcPeeringConnection != null - ? de_AwsEc2VpcPeeringConnectionDetails(output.AwsEc2VpcPeeringConnection, context) - : undefined, - AwsEc2VpnConnection: - output.AwsEc2VpnConnection != null - ? de_AwsEc2VpnConnectionDetails(output.AwsEc2VpnConnection, context) - : undefined, - AwsEcrContainerImage: - output.AwsEcrContainerImage != null - ? de_AwsEcrContainerImageDetails(output.AwsEcrContainerImage, context) - : undefined, - AwsEcrRepository: - output.AwsEcrRepository != null ? de_AwsEcrRepositoryDetails(output.AwsEcrRepository, context) : undefined, - AwsEcsCluster: output.AwsEcsCluster != null ? de_AwsEcsClusterDetails(output.AwsEcsCluster, context) : undefined, - AwsEcsContainer: - output.AwsEcsContainer != null ? de_AwsEcsContainerDetails(output.AwsEcsContainer, context) : undefined, - AwsEcsService: output.AwsEcsService != null ? de_AwsEcsServiceDetails(output.AwsEcsService, context) : undefined, - AwsEcsTask: output.AwsEcsTask != null ? de_AwsEcsTaskDetails(output.AwsEcsTask, context) : undefined, - AwsEcsTaskDefinition: - output.AwsEcsTaskDefinition != null - ? de_AwsEcsTaskDefinitionDetails(output.AwsEcsTaskDefinition, context) - : undefined, - AwsEfsAccessPoint: - output.AwsEfsAccessPoint != null ? de_AwsEfsAccessPointDetails(output.AwsEfsAccessPoint, context) : undefined, - AwsEksCluster: output.AwsEksCluster != null ? de_AwsEksClusterDetails(output.AwsEksCluster, context) : undefined, - AwsElasticBeanstalkEnvironment: - output.AwsElasticBeanstalkEnvironment != null - ? de_AwsElasticBeanstalkEnvironmentDetails(output.AwsElasticBeanstalkEnvironment, context) - : undefined, - AwsElasticsearchDomain: - output.AwsElasticsearchDomain != null - ? de_AwsElasticsearchDomainDetails(output.AwsElasticsearchDomain, context) - : undefined, - AwsElbLoadBalancer: - output.AwsElbLoadBalancer != null ? de_AwsElbLoadBalancerDetails(output.AwsElbLoadBalancer, context) : undefined, - AwsElbv2LoadBalancer: - output.AwsElbv2LoadBalancer != null - ? de_AwsElbv2LoadBalancerDetails(output.AwsElbv2LoadBalancer, context) - : undefined, - AwsIamAccessKey: - output.AwsIamAccessKey != null ? de_AwsIamAccessKeyDetails(output.AwsIamAccessKey, context) : undefined, - AwsIamGroup: output.AwsIamGroup != null ? de_AwsIamGroupDetails(output.AwsIamGroup, context) : undefined, - AwsIamPolicy: output.AwsIamPolicy != null ? de_AwsIamPolicyDetails(output.AwsIamPolicy, context) : undefined, - AwsIamRole: output.AwsIamRole != null ? de_AwsIamRoleDetails(output.AwsIamRole, context) : undefined, - AwsIamUser: output.AwsIamUser != null ? de_AwsIamUserDetails(output.AwsIamUser, context) : undefined, - AwsKinesisStream: - output.AwsKinesisStream != null ? de_AwsKinesisStreamDetails(output.AwsKinesisStream, context) : undefined, - AwsKmsKey: output.AwsKmsKey != null ? de_AwsKmsKeyDetails(output.AwsKmsKey, context) : undefined, - AwsLambdaFunction: - output.AwsLambdaFunction != null ? de_AwsLambdaFunctionDetails(output.AwsLambdaFunction, context) : undefined, - AwsLambdaLayerVersion: - output.AwsLambdaLayerVersion != null - ? de_AwsLambdaLayerVersionDetails(output.AwsLambdaLayerVersion, context) - : undefined, - AwsNetworkFirewallFirewall: - output.AwsNetworkFirewallFirewall != null - ? de_AwsNetworkFirewallFirewallDetails(output.AwsNetworkFirewallFirewall, context) - : undefined, - AwsNetworkFirewallFirewallPolicy: - output.AwsNetworkFirewallFirewallPolicy != null - ? de_AwsNetworkFirewallFirewallPolicyDetails(output.AwsNetworkFirewallFirewallPolicy, context) - : undefined, - AwsNetworkFirewallRuleGroup: - output.AwsNetworkFirewallRuleGroup != null - ? de_AwsNetworkFirewallRuleGroupDetails(output.AwsNetworkFirewallRuleGroup, context) - : undefined, - AwsOpenSearchServiceDomain: - output.AwsOpenSearchServiceDomain != null - ? de_AwsOpenSearchServiceDomainDetails(output.AwsOpenSearchServiceDomain, context) - : undefined, - AwsRdsDbCluster: - output.AwsRdsDbCluster != null ? de_AwsRdsDbClusterDetails(output.AwsRdsDbCluster, context) : undefined, - AwsRdsDbClusterSnapshot: - output.AwsRdsDbClusterSnapshot != null - ? de_AwsRdsDbClusterSnapshotDetails(output.AwsRdsDbClusterSnapshot, context) - : undefined, - AwsRdsDbInstance: - output.AwsRdsDbInstance != null ? de_AwsRdsDbInstanceDetails(output.AwsRdsDbInstance, context) : undefined, - AwsRdsDbSecurityGroup: - output.AwsRdsDbSecurityGroup != null - ? de_AwsRdsDbSecurityGroupDetails(output.AwsRdsDbSecurityGroup, context) - : undefined, - AwsRdsDbSnapshot: - output.AwsRdsDbSnapshot != null ? de_AwsRdsDbSnapshotDetails(output.AwsRdsDbSnapshot, context) : undefined, - AwsRdsEventSubscription: - output.AwsRdsEventSubscription != null - ? de_AwsRdsEventSubscriptionDetails(output.AwsRdsEventSubscription, context) - : undefined, - AwsRedshiftCluster: - output.AwsRedshiftCluster != null ? de_AwsRedshiftClusterDetails(output.AwsRedshiftCluster, context) : undefined, - AwsS3AccountPublicAccessBlock: - output.AwsS3AccountPublicAccessBlock != null - ? de_AwsS3AccountPublicAccessBlockDetails(output.AwsS3AccountPublicAccessBlock, context) - : undefined, - AwsS3Bucket: output.AwsS3Bucket != null ? de_AwsS3BucketDetails(output.AwsS3Bucket, context) : undefined, - AwsS3Object: output.AwsS3Object != null ? de_AwsS3ObjectDetails(output.AwsS3Object, context) : undefined, - AwsSageMakerNotebookInstance: - output.AwsSageMakerNotebookInstance != null - ? de_AwsSageMakerNotebookInstanceDetails(output.AwsSageMakerNotebookInstance, context) - : undefined, - AwsSecretsManagerSecret: - output.AwsSecretsManagerSecret != null - ? de_AwsSecretsManagerSecretDetails(output.AwsSecretsManagerSecret, context) - : undefined, - AwsSnsTopic: output.AwsSnsTopic != null ? de_AwsSnsTopicDetails(output.AwsSnsTopic, context) : undefined, - AwsSqsQueue: output.AwsSqsQueue != null ? de_AwsSqsQueueDetails(output.AwsSqsQueue, context) : undefined, - AwsSsmPatchCompliance: - output.AwsSsmPatchCompliance != null - ? de_AwsSsmPatchComplianceDetails(output.AwsSsmPatchCompliance, context) - : undefined, - AwsWafRateBasedRule: - output.AwsWafRateBasedRule != null - ? de_AwsWafRateBasedRuleDetails(output.AwsWafRateBasedRule, context) - : undefined, - AwsWafRegionalRateBasedRule: - output.AwsWafRegionalRateBasedRule != null - ? de_AwsWafRegionalRateBasedRuleDetails(output.AwsWafRegionalRateBasedRule, context) - : undefined, - AwsWafRegionalRule: - output.AwsWafRegionalRule != null ? de_AwsWafRegionalRuleDetails(output.AwsWafRegionalRule, context) : undefined, - AwsWafRegionalRuleGroup: - output.AwsWafRegionalRuleGroup != null - ? de_AwsWafRegionalRuleGroupDetails(output.AwsWafRegionalRuleGroup, context) - : undefined, - AwsWafRegionalWebAcl: - output.AwsWafRegionalWebAcl != null - ? de_AwsWafRegionalWebAclDetails(output.AwsWafRegionalWebAcl, context) - : undefined, - AwsWafRule: output.AwsWafRule != null ? de_AwsWafRuleDetails(output.AwsWafRule, context) : undefined, - AwsWafRuleGroup: - output.AwsWafRuleGroup != null ? de_AwsWafRuleGroupDetails(output.AwsWafRuleGroup, context) : undefined, - AwsWafWebAcl: output.AwsWafWebAcl != null ? de_AwsWafWebAclDetails(output.AwsWafWebAcl, context) : undefined, - AwsWafv2RuleGroup: - output.AwsWafv2RuleGroup != null ? de_AwsWafv2RuleGroupDetails(output.AwsWafv2RuleGroup, context) : undefined, - AwsWafv2WebAcl: - output.AwsWafv2WebAcl != null ? de_AwsWafv2WebAclDetails(output.AwsWafv2WebAcl, context) : undefined, - AwsXrayEncryptionConfig: - output.AwsXrayEncryptionConfig != null - ? de_AwsXrayEncryptionConfigDetails(output.AwsXrayEncryptionConfig, context) - : undefined, - Container: output.Container != null ? de_ContainerDetails(output.Container, context) : undefined, - Other: output.Other != null ? de_FieldMap(output.Other, context) : undefined, - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationDetails omitted. -/** - * deserializeAws_restJson1ResourceList - */ -const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Resource(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails omitted. -/** - * deserializeAws_restJson1Result - */ -const de_Result = (output: any, context: __SerdeContext): Result => { - return { - AccountId: __expectString(output.AccountId), - ProcessingResult: __expectString(output.ProcessingResult), - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesDetails omitted. -/** - * deserializeAws_restJson1ResultList - */ -const de_ResultList = (output: any, context: __SerdeContext): Result[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Result(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails omitted. -/** - * deserializeAws_restJson1RouteSetDetails - */ -const de_RouteSetDetails = (output: any, context: __SerdeContext): RouteSetDetails => { - return { - CarrierGatewayId: __expectString(output.CarrierGatewayId), - CoreNetworkArn: __expectString(output.CoreNetworkArn), - DestinationCidrBlock: __expectString(output.DestinationCidrBlock), - DestinationIpv6CidrBlock: __expectString(output.DestinationIpv6CidrBlock), - DestinationPrefixListId: __expectString(output.DestinationPrefixListId), - EgressOnlyInternetGatewayId: __expectString(output.EgressOnlyInternetGatewayId), - GatewayId: __expectString(output.GatewayId), - InstanceId: __expectString(output.InstanceId), - InstanceOwnerId: __expectString(output.InstanceOwnerId), - LocalGatewayId: __expectString(output.LocalGatewayId), - NatGatewayId: __expectString(output.NatGatewayId), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - Origin: __expectString(output.Origin), - State: __expectString(output.State), - TransitGatewayId: __expectString(output.TransitGatewayId), - VpcPeeringConnectionId: __expectString(output.VpcPeeringConnectionId), - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateDetails omitted. -/** - * deserializeAws_restJson1RouteSetList - */ -const de_RouteSetList = (output: any, context: __SerdeContext): RouteSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RouteSetDetails(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsDetails omitted. -/** - * deserializeAws_restJson1RuleGroupDetails - */ -const de_RuleGroupDetails = (output: any, context: __SerdeContext): RuleGroupDetails => { - return { - RuleVariables: output.RuleVariables != null ? de_RuleGroupVariables(output.RuleVariables, context) : undefined, - RulesSource: output.RulesSource != null ? de_RuleGroupSource(output.RulesSource, context) : undefined, - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsList omitted. -/** - * deserializeAws_restJson1RuleGroupSource - */ -const de_RuleGroupSource = (output: any, context: __SerdeContext): RuleGroupSource => { - return { - RulesSourceList: - output.RulesSourceList != null ? de_RuleGroupSourceListDetails(output.RulesSourceList, context) : undefined, - RulesString: __expectString(output.RulesString), - StatefulRules: - output.StatefulRules != null ? de_RuleGroupSourceStatefulRulesList(output.StatefulRules, context) : undefined, - StatelessRulesAndCustomActions: - output.StatelessRulesAndCustomActions != null - ? de_RuleGroupSourceStatelessRulesAndCustomActionsDetails(output.StatelessRulesAndCustomActions, context) - : undefined, - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateOperandsTagDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceCustomActionsDetails - */ -const de_RuleGroupSourceCustomActionsDetails = ( - output: any, - context: __SerdeContext -): RuleGroupSourceCustomActionsDetails => { - return { - ActionDefinition: - output.ActionDefinition != null - ? de_StatelessCustomActionDefinition(output.ActionDefinition, context) - : undefined, - ActionName: __expectString(output.ActionName), - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesFilterPredicateTagDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceCustomActionsList - */ -const de_RuleGroupSourceCustomActionsList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceCustomActionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceCustomActionsDetails(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesList omitted. -/** - * deserializeAws_restJson1RuleGroupSourceListDetails - */ -const de_RuleGroupSourceListDetails = (output: any, context: __SerdeContext): RuleGroupSourceListDetails => { - return { - GeneratedRulesType: __expectString(output.GeneratedRulesType), - TargetTypes: output.TargetTypes != null ? de_NonEmptyStringList(output.TargetTypes, context) : undefined, - Targets: output.Targets != null ? de_NonEmptyStringList(output.Targets, context) : undefined, - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatefulRulesDetails - */ -const de_RuleGroupSourceStatefulRulesDetails = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatefulRulesDetails => { - return { - Action: __expectString(output.Action), - Header: output.Header != null ? de_RuleGroupSourceStatefulRulesHeaderDetails(output.Header, context) : undefined, - RuleOptions: - output.RuleOptions != null ? de_RuleGroupSourceStatefulRulesOptionsList(output.RuleOptions, context) : undefined, - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsList omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatefulRulesHeaderDetails - */ -const de_RuleGroupSourceStatefulRulesHeaderDetails = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatefulRulesHeaderDetails => { - return { - Destination: __expectString(output.Destination), - DestinationPort: __expectString(output.DestinationPort), - Direction: __expectString(output.Direction), - Protocol: __expectString(output.Protocol), - Source: __expectString(output.Source), - SourcePort: __expectString(output.SourcePort), - } as any; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatefulRulesList - */ -const de_RuleGroupSourceStatefulRulesList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatefulRulesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatefulRulesDetails(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketBucketLifecycleConfigurationRulesTransitionsList omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatefulRulesOptionsDetails - */ -const de_RuleGroupSourceStatefulRulesOptionsDetails = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatefulRulesOptionsDetails => { - return { - Keyword: __expectString(output.Keyword), - Settings: - output.Settings != null - ? de_RuleGroupSourceStatefulRulesRuleOptionsSettingsList(output.Settings, context) - : undefined, - } as any; -}; +// de_AwsS3BucketBucketVersioningConfiguration omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatefulRulesOptionsList - */ -const de_RuleGroupSourceStatefulRulesOptionsList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatefulRulesOptionsDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatefulRulesOptionsDetails(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatefulRulesRuleOptionsSettingsList - */ -const de_RuleGroupSourceStatefulRulesRuleOptionsSettingsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsS3BucketLoggingConfiguration omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleDefinition - */ -const de_RuleGroupSourceStatelessRuleDefinition = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleDefinition => { - return { - Actions: output.Actions != null ? de_NonEmptyStringList(output.Actions, context) : undefined, - MatchAttributes: - output.MatchAttributes != null - ? de_RuleGroupSourceStatelessRuleMatchAttributes(output.MatchAttributes, context) - : undefined, - } as any; -}; +// de_AwsS3BucketNotificationConfiguration omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributes - */ -const de_RuleGroupSourceStatelessRuleMatchAttributes = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributes => { - return { - DestinationPorts: - output.DestinationPorts != null - ? de_RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList(output.DestinationPorts, context) - : undefined, - Destinations: - output.Destinations != null - ? de_RuleGroupSourceStatelessRuleMatchAttributesDestinationsList(output.Destinations, context) - : undefined, - Protocols: - output.Protocols != null - ? de_RuleGroupSourceStatelessRuleMatchAttributesProtocolsList(output.Protocols, context) - : undefined, - SourcePorts: - output.SourcePorts != null - ? de_RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList(output.SourcePorts, context) - : undefined, - Sources: - output.Sources != null - ? de_RuleGroupSourceStatelessRuleMatchAttributesSourcesList(output.Sources, context) - : undefined, - TcpFlags: - output.TcpFlags != null - ? de_RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList(output.TcpFlags, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts => { - return { - FromPort: __expectInt32(output.FromPort), - ToPort: __expectInt32(output.ToPort), - } as any; -}; +// de_AwsS3BucketNotificationConfigurationDetail omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketNotificationConfigurationDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinations - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesDestinations = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesDestinations => { - return { - AddressDefinition: __expectString(output.AddressDefinition), - } as any; -}; +// de_AwsS3BucketNotificationConfigurationEvents omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesDestinationsList - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesDestinationsList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesDestinations[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatelessRuleMatchAttributesDestinations(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketNotificationConfigurationFilter omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesProtocolsList - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesProtocolsList = ( - output: any, - context: __SerdeContext -): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_AwsS3BucketNotificationConfigurationS3KeyFilter omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSourcePorts - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesSourcePorts = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesSourcePorts => { - return { - FromPort: __expectInt32(output.FromPort), - ToPort: __expectInt32(output.ToPort), - } as any; -}; +// de_AwsS3BucketNotificationConfigurationS3KeyFilterRule omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesSourcePorts[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatelessRuleMatchAttributesSourcePorts(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketNotificationConfigurationS3KeyFilterRules omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSources - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesSources = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesSources => { - return { - AddressDefinition: __expectString(output.AddressDefinition), - } as any; -}; +// de_AwsS3BucketObjectLockConfiguration omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesSourcesList - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesSourcesList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesSources[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatelessRuleMatchAttributesSources(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketObjectLockConfigurationRuleDefaultRetentionDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesTcpFlags - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesTcpFlags = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesTcpFlags => { - return { - Flags: output.Flags != null ? de_NonEmptyStringList(output.Flags, context) : undefined, - Masks: output.Masks != null ? de_NonEmptyStringList(output.Masks, context) : undefined, - } as any; -}; +// de_AwsS3BucketObjectLockConfigurationRuleDetails omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList - */ -const de_RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRuleMatchAttributesTcpFlags[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatelessRuleMatchAttributesTcpFlags(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketServerSideEncryptionByDefault omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRulesAndCustomActionsDetails - */ -const de_RuleGroupSourceStatelessRulesAndCustomActionsDetails = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRulesAndCustomActionsDetails => { - return { - CustomActions: - output.CustomActions != null ? de_RuleGroupSourceCustomActionsList(output.CustomActions, context) : undefined, - StatelessRules: - output.StatelessRules != null ? de_RuleGroupSourceStatelessRulesList(output.StatelessRules, context) : undefined, - } as any; -}; +// de_AwsS3BucketServerSideEncryptionConfiguration omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRulesDetails - */ -const de_RuleGroupSourceStatelessRulesDetails = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRulesDetails => { - return { - Priority: __expectInt32(output.Priority), - RuleDefinition: - output.RuleDefinition != null - ? de_RuleGroupSourceStatelessRuleDefinition(output.RuleDefinition, context) - : undefined, - } as any; -}; +// de_AwsS3BucketServerSideEncryptionRule omitted. -/** - * deserializeAws_restJson1RuleGroupSourceStatelessRulesList - */ -const de_RuleGroupSourceStatelessRulesList = ( - output: any, - context: __SerdeContext -): RuleGroupSourceStatelessRulesDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSourceStatelessRulesDetails(entry, context); - }); - return retVal; -}; +// de_AwsS3BucketServerSideEncryptionRules omitted. + +// de_AwsS3BucketWebsiteConfiguration omitted. + +// de_AwsS3BucketWebsiteConfigurationRedirectTo omitted. + +// de_AwsS3BucketWebsiteConfigurationRoutingRule omitted. + +// de_AwsS3BucketWebsiteConfigurationRoutingRuleCondition omitted. + +// de_AwsS3BucketWebsiteConfigurationRoutingRuleRedirect omitted. -/** - * deserializeAws_restJson1RuleGroupVariables - */ -const de_RuleGroupVariables = (output: any, context: __SerdeContext): RuleGroupVariables => { - return { - IpSets: output.IpSets != null ? de_RuleGroupVariablesIpSetsDetails(output.IpSets, context) : undefined, - PortSets: output.PortSets != null ? de_RuleGroupVariablesPortSetsDetails(output.PortSets, context) : undefined, - } as any; -}; +// de_AwsS3BucketWebsiteConfigurationRoutingRules omitted. -/** - * deserializeAws_restJson1RuleGroupVariablesIpSetsDetails - */ -const de_RuleGroupVariablesIpSetsDetails = (output: any, context: __SerdeContext): RuleGroupVariablesIpSetsDetails => { - return { - Definition: output.Definition != null ? de_NonEmptyStringList(output.Definition, context) : undefined, - } as any; -}; +// de_AwsS3ObjectDetails omitted. -/** - * deserializeAws_restJson1RuleGroupVariablesPortSetsDetails - */ -const de_RuleGroupVariablesPortSetsDetails = ( - output: any, - context: __SerdeContext -): RuleGroupVariablesPortSetsDetails => { - return { - Definition: output.Definition != null ? de_NonEmptyStringList(output.Definition, context) : undefined, - } as any; -}; +// de_AwsSageMakerNotebookInstanceDetails omitted. -/** - * deserializeAws_restJson1SecurityControl - */ -const de_SecurityControl = (output: any, context: __SerdeContext): SecurityControl => { - return { - Description: __expectString(output.Description), - RemediationUrl: __expectString(output.RemediationUrl), - SecurityControlArn: __expectString(output.SecurityControlArn), - SecurityControlId: __expectString(output.SecurityControlId), - SecurityControlStatus: __expectString(output.SecurityControlStatus), - SeverityRating: __expectString(output.SeverityRating), - Title: __expectString(output.Title), - } as any; -}; +// de_AwsSageMakerNotebookInstanceMetadataServiceConfigurationDetails omitted. -/** - * deserializeAws_restJson1SecurityControlDefinition - */ -const de_SecurityControlDefinition = (output: any, context: __SerdeContext): SecurityControlDefinition => { - return { - CurrentRegionAvailability: __expectString(output.CurrentRegionAvailability), - Description: __expectString(output.Description), - RemediationUrl: __expectString(output.RemediationUrl), - SecurityControlId: __expectString(output.SecurityControlId), - SeverityRating: __expectString(output.SeverityRating), - Title: __expectString(output.Title), - } as any; -}; +// de_AwsSecretsManagerSecretDetails omitted. + +// de_AwsSecretsManagerSecretRotationRules omitted. /** - * deserializeAws_restJson1SecurityControlDefinitions + * deserializeAws_restJson1AwsSecurityFinding */ -const de_SecurityControlDefinitions = (output: any, context: __SerdeContext): SecurityControlDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityControlDefinition(entry, context); - }); - return retVal; +const de_AwsSecurityFinding = (output: any, context: __SerdeContext): AwsSecurityFinding => { + return take(output, { + Action: (_: any) => de_Action(_, context), + AwsAccountId: __expectString, + CompanyName: __expectString, + Compliance: _json, + Confidence: __expectInt32, + CreatedAt: __expectString, + Criticality: __expectInt32, + Description: __expectString, + FindingProviderFields: _json, + FirstObservedAt: __expectString, + GeneratorId: __expectString, + Id: __expectString, + LastObservedAt: __expectString, + Malware: _json, + Network: _json, + NetworkPath: _json, + Note: _json, + PatchSummary: _json, + Process: _json, + ProductArn: __expectString, + ProductFields: _json, + ProductName: __expectString, + RecordState: __expectString, + Region: __expectString, + RelatedFindings: _json, + Remediation: _json, + Resources: (_: any) => de_ResourceList(_, context), + Sample: __expectBoolean, + SchemaVersion: __expectString, + Severity: (_: any) => de_Severity(_, context), + SourceUrl: __expectString, + ThreatIntelIndicators: _json, + Threats: _json, + Title: __expectString, + Types: _json, + UpdatedAt: __expectString, + UserDefinedFields: _json, + VerificationState: __expectString, + Vulnerabilities: (_: any) => de_VulnerabilityList(_, context), + Workflow: _json, + WorkflowState: __expectString, + }) as any; }; /** - * deserializeAws_restJson1SecurityControls + * deserializeAws_restJson1AwsSecurityFindingFilters */ -const de_SecurityControls = (output: any, context: __SerdeContext): SecurityControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityControl(entry, context); - }); - return retVal; -}; +const de_AwsSecurityFindingFilters = (output: any, context: __SerdeContext): AwsSecurityFindingFilters => { + return take(output, { + AwsAccountId: _json, + CompanyName: _json, + ComplianceAssociatedStandardsId: _json, + ComplianceSecurityControlId: _json, + ComplianceStatus: _json, + Confidence: (_: any) => de_NumberFilterList(_, context), + CreatedAt: _json, + Criticality: (_: any) => de_NumberFilterList(_, context), + Description: _json, + FindingProviderFieldsConfidence: (_: any) => de_NumberFilterList(_, context), + FindingProviderFieldsCriticality: (_: any) => de_NumberFilterList(_, context), + FindingProviderFieldsRelatedFindingsId: _json, + FindingProviderFieldsRelatedFindingsProductArn: _json, + FindingProviderFieldsSeverityLabel: _json, + FindingProviderFieldsSeverityOriginal: _json, + FindingProviderFieldsTypes: _json, + FirstObservedAt: _json, + GeneratorId: _json, + Id: _json, + Keyword: _json, + LastObservedAt: _json, + MalwareName: _json, + MalwarePath: _json, + MalwareState: _json, + MalwareType: _json, + NetworkDestinationDomain: _json, + NetworkDestinationIpV4: _json, + NetworkDestinationIpV6: _json, + NetworkDestinationPort: (_: any) => de_NumberFilterList(_, context), + NetworkDirection: _json, + NetworkProtocol: _json, + NetworkSourceDomain: _json, + NetworkSourceIpV4: _json, + NetworkSourceIpV6: _json, + NetworkSourceMac: _json, + NetworkSourcePort: (_: any) => de_NumberFilterList(_, context), + NoteText: _json, + NoteUpdatedAt: _json, + NoteUpdatedBy: _json, + ProcessLaunchedAt: _json, + ProcessName: _json, + ProcessParentPid: (_: any) => de_NumberFilterList(_, context), + ProcessPath: _json, + ProcessPid: (_: any) => de_NumberFilterList(_, context), + ProcessTerminatedAt: _json, + ProductArn: _json, + ProductFields: _json, + ProductName: _json, + RecommendationText: _json, + RecordState: _json, + Region: _json, + RelatedFindingsId: _json, + RelatedFindingsProductArn: _json, + ResourceAwsEc2InstanceIamInstanceProfileArn: _json, + ResourceAwsEc2InstanceImageId: _json, + ResourceAwsEc2InstanceIpV4Addresses: _json, + ResourceAwsEc2InstanceIpV6Addresses: _json, + ResourceAwsEc2InstanceKeyName: _json, + ResourceAwsEc2InstanceLaunchedAt: _json, + ResourceAwsEc2InstanceSubnetId: _json, + ResourceAwsEc2InstanceType: _json, + ResourceAwsEc2InstanceVpcId: _json, + ResourceAwsIamAccessKeyCreatedAt: _json, + ResourceAwsIamAccessKeyPrincipalName: _json, + ResourceAwsIamAccessKeyStatus: _json, + ResourceAwsIamAccessKeyUserName: _json, + ResourceAwsIamUserUserName: _json, + ResourceAwsS3BucketOwnerId: _json, + ResourceAwsS3BucketOwnerName: _json, + ResourceContainerImageId: _json, + ResourceContainerImageName: _json, + ResourceContainerLaunchedAt: _json, + ResourceContainerName: _json, + ResourceDetailsOther: _json, + ResourceId: _json, + ResourcePartition: _json, + ResourceRegion: _json, + ResourceTags: _json, + ResourceType: _json, + Sample: _json, + SeverityLabel: _json, + SeverityNormalized: (_: any) => de_NumberFilterList(_, context), + SeverityProduct: (_: any) => de_NumberFilterList(_, context), + SourceUrl: _json, + ThreatIntelIndicatorCategory: _json, + ThreatIntelIndicatorLastObservedAt: _json, + ThreatIntelIndicatorSource: _json, + ThreatIntelIndicatorSourceUrl: _json, + ThreatIntelIndicatorType: _json, + ThreatIntelIndicatorValue: _json, + Title: _json, + Type: _json, + UpdatedAt: _json, + UserDefinedFields: _json, + VerificationState: _json, + WorkflowState: _json, + WorkflowStatus: _json, + }) as any; +}; + +// de_AwsSecurityFindingIdentifier omitted. + +// de_AwsSecurityFindingIdentifierList omitted. /** - * deserializeAws_restJson1SecurityGroups + * deserializeAws_restJson1AwsSecurityFindingList */ -const de_SecurityGroups = (output: any, context: __SerdeContext): string[] => { +const de_AwsSecurityFindingList = (output: any, context: __SerdeContext): AwsSecurityFinding[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AwsSecurityFinding(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SensitiveDataDetections - */ -const de_SensitiveDataDetections = (output: any, context: __SerdeContext): SensitiveDataDetections => { - return { - Count: __expectLong(output.Count), - Occurrences: output.Occurrences != null ? de_Occurrences(output.Occurrences, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_AwsSnsTopicDetails omitted. -/** - * deserializeAws_restJson1SensitiveDataDetectionsList - */ -const de_SensitiveDataDetectionsList = (output: any, context: __SerdeContext): SensitiveDataDetections[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SensitiveDataDetections(entry, context); - }); - return retVal; -}; +// de_AwsSnsTopicSubscription omitted. -/** - * deserializeAws_restJson1SensitiveDataResult - */ -const de_SensitiveDataResult = (output: any, context: __SerdeContext): SensitiveDataResult => { - return { - Category: __expectString(output.Category), - Detections: output.Detections != null ? de_SensitiveDataDetectionsList(output.Detections, context) : undefined, - TotalCount: __expectLong(output.TotalCount), - } as any; -}; +// de_AwsSnsTopicSubscriptionList omitted. -/** - * deserializeAws_restJson1SensitiveDataResultList - */ -const de_SensitiveDataResultList = (output: any, context: __SerdeContext): SensitiveDataResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SensitiveDataResult(entry, context); - }); - return retVal; -}; +// de_AwsSqsQueueDetails omitted. -/** - * deserializeAws_restJson1Severity - */ -const de_Severity = (output: any, context: __SerdeContext): Severity => { - return { - Label: __expectString(output.Label), - Normalized: __expectInt32(output.Normalized), - Original: __expectString(output.Original), - Product: __limitedParseDouble(output.Product), - } as any; -}; +// de_AwsSsmComplianceSummary omitted. -/** - * deserializeAws_restJson1SoftwarePackage - */ -const de_SoftwarePackage = (output: any, context: __SerdeContext): SoftwarePackage => { - return { - Architecture: __expectString(output.Architecture), - Epoch: __expectString(output.Epoch), - FilePath: __expectString(output.FilePath), - FixedInVersion: __expectString(output.FixedInVersion), - Name: __expectString(output.Name), - PackageManager: __expectString(output.PackageManager), - Release: __expectString(output.Release), - Remediation: __expectString(output.Remediation), - SourceLayerArn: __expectString(output.SourceLayerArn), - SourceLayerHash: __expectString(output.SourceLayerHash), - Version: __expectString(output.Version), - } as any; -}; +// de_AwsSsmPatch omitted. -/** - * deserializeAws_restJson1SoftwarePackageList - */ -const de_SoftwarePackageList = (output: any, context: __SerdeContext): SoftwarePackage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SoftwarePackage(entry, context); - }); - return retVal; -}; +// de_AwsSsmPatchComplianceDetails omitted. -/** - * deserializeAws_restJson1Standard - */ -const de_Standard = (output: any, context: __SerdeContext): Standard => { - return { - Description: __expectString(output.Description), - EnabledByDefault: __expectBoolean(output.EnabledByDefault), - Name: __expectString(output.Name), - StandardsArn: __expectString(output.StandardsArn), - StandardsManagedBy: - output.StandardsManagedBy != null ? de_StandardsManagedBy(output.StandardsManagedBy, context) : undefined, - } as any; -}; +// de_AwsWafRateBasedRuleDetails omitted. -/** - * deserializeAws_restJson1Standards - */ -const de_Standards = (output: any, context: __SerdeContext): Standard[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Standard(entry, context); - }); - return retVal; -}; +// de_AwsWafRateBasedRuleMatchPredicate omitted. -/** - * deserializeAws_restJson1StandardsControl - */ -const de_StandardsControl = (output: any, context: __SerdeContext): StandardsControl => { - return { - ControlId: __expectString(output.ControlId), - ControlStatus: __expectString(output.ControlStatus), - ControlStatusUpdatedAt: - output.ControlStatusUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.ControlStatusUpdatedAt)) - : undefined, - Description: __expectString(output.Description), - DisabledReason: __expectString(output.DisabledReason), - RelatedRequirements: - output.RelatedRequirements != null ? de_RelatedRequirementsList(output.RelatedRequirements, context) : undefined, - RemediationUrl: __expectString(output.RemediationUrl), - SeverityRating: __expectString(output.SeverityRating), - StandardsControlArn: __expectString(output.StandardsControlArn), - Title: __expectString(output.Title), - } as any; -}; - -/** - * deserializeAws_restJson1StandardsControlArnList - */ -const de_StandardsControlArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsWafRateBasedRuleMatchPredicateList omitted. -/** - * deserializeAws_restJson1StandardsControlAssociationDetail - */ -const de_StandardsControlAssociationDetail = ( - output: any, - context: __SerdeContext -): StandardsControlAssociationDetail => { - return { - AssociationStatus: __expectString(output.AssociationStatus), - RelatedRequirements: - output.RelatedRequirements != null ? de_RelatedRequirementsList(output.RelatedRequirements, context) : undefined, - SecurityControlArn: __expectString(output.SecurityControlArn), - SecurityControlId: __expectString(output.SecurityControlId), - StandardsArn: __expectString(output.StandardsArn), - StandardsControlArns: - output.StandardsControlArns != null - ? de_StandardsControlArnList(output.StandardsControlArns, context) - : undefined, - StandardsControlDescription: __expectString(output.StandardsControlDescription), - StandardsControlTitle: __expectString(output.StandardsControlTitle), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - UpdatedReason: __expectString(output.UpdatedReason), - } as any; -}; +// de_AwsWafRegionalRateBasedRuleDetails omitted. -/** - * deserializeAws_restJson1StandardsControlAssociationDetails - */ -const de_StandardsControlAssociationDetails = ( - output: any, - context: __SerdeContext -): StandardsControlAssociationDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StandardsControlAssociationDetail(entry, context); - }); - return retVal; -}; +// de_AwsWafRegionalRateBasedRuleMatchPredicate omitted. -/** - * deserializeAws_restJson1StandardsControlAssociationId - */ -const de_StandardsControlAssociationId = (output: any, context: __SerdeContext): StandardsControlAssociationId => { - return { - SecurityControlId: __expectString(output.SecurityControlId), - StandardsArn: __expectString(output.StandardsArn), - } as any; -}; +// de_AwsWafRegionalRateBasedRuleMatchPredicateList omitted. -/** - * deserializeAws_restJson1StandardsControlAssociationSummaries - */ -const de_StandardsControlAssociationSummaries = ( - output: any, - context: __SerdeContext -): StandardsControlAssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StandardsControlAssociationSummary(entry, context); - }); - return retVal; -}; +// de_AwsWafRegionalRuleDetails omitted. -/** - * deserializeAws_restJson1StandardsControlAssociationSummary - */ -const de_StandardsControlAssociationSummary = ( - output: any, - context: __SerdeContext -): StandardsControlAssociationSummary => { - return { - AssociationStatus: __expectString(output.AssociationStatus), - RelatedRequirements: - output.RelatedRequirements != null ? de_RelatedRequirementsList(output.RelatedRequirements, context) : undefined, - SecurityControlArn: __expectString(output.SecurityControlArn), - SecurityControlId: __expectString(output.SecurityControlId), - StandardsArn: __expectString(output.StandardsArn), - StandardsControlDescription: __expectString(output.StandardsControlDescription), - StandardsControlTitle: __expectString(output.StandardsControlTitle), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.UpdatedAt)) : undefined, - UpdatedReason: __expectString(output.UpdatedReason), - } as any; -}; +// de_AwsWafRegionalRuleGroupDetails omitted. -/** - * deserializeAws_restJson1StandardsControlAssociationUpdate - */ -const de_StandardsControlAssociationUpdate = ( - output: any, - context: __SerdeContext -): StandardsControlAssociationUpdate => { - return { - AssociationStatus: __expectString(output.AssociationStatus), - SecurityControlId: __expectString(output.SecurityControlId), - StandardsArn: __expectString(output.StandardsArn), - UpdatedReason: __expectString(output.UpdatedReason), - } as any; -}; +// de_AwsWafRegionalRuleGroupRulesActionDetails omitted. -/** - * deserializeAws_restJson1StandardsControls - */ -const de_StandardsControls = (output: any, context: __SerdeContext): StandardsControl[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StandardsControl(entry, context); - }); - return retVal; -}; +// de_AwsWafRegionalRuleGroupRulesDetails omitted. -/** - * deserializeAws_restJson1StandardsInputParameterMap - */ -const de_StandardsInputParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AwsWafRegionalRuleGroupRulesList omitted. -/** - * deserializeAws_restJson1StandardsManagedBy - */ -const de_StandardsManagedBy = (output: any, context: __SerdeContext): StandardsManagedBy => { - return { - Company: __expectString(output.Company), - Product: __expectString(output.Product), - } as any; -}; +// de_AwsWafRegionalRulePredicateList omitted. -/** - * deserializeAws_restJson1StandardsStatusReason - */ -const de_StandardsStatusReason = (output: any, context: __SerdeContext): StandardsStatusReason => { - return { - StatusReasonCode: __expectString(output.StatusReasonCode), - } as any; -}; +// de_AwsWafRegionalRulePredicateListDetails omitted. + +// de_AwsWafRegionalWebAclDetails omitted. + +// de_AwsWafRegionalWebAclRulesList omitted. + +// de_AwsWafRegionalWebAclRulesListActionDetails omitted. + +// de_AwsWafRegionalWebAclRulesListDetails omitted. + +// de_AwsWafRegionalWebAclRulesListOverrideActionDetails omitted. + +// de_AwsWafRuleDetails omitted. + +// de_AwsWafRuleGroupDetails omitted. + +// de_AwsWafRuleGroupRulesActionDetails omitted. + +// de_AwsWafRuleGroupRulesDetails omitted. + +// de_AwsWafRuleGroupRulesList omitted. + +// de_AwsWafRulePredicateList omitted. + +// de_AwsWafRulePredicateListDetails omitted. + +// de_AwsWafv2ActionAllowDetails omitted. + +// de_AwsWafv2ActionBlockDetails omitted. + +// de_AwsWafv2CustomHttpHeader omitted. + +// de_AwsWafv2CustomRequestHandlingDetails omitted. + +// de_AwsWafv2CustomResponseDetails omitted. + +// de_AwsWafv2InsertHeadersList omitted. + +// de_AwsWafv2RuleGroupDetails omitted. + +// de_AwsWafv2RulesActionCaptchaDetails omitted. + +// de_AwsWafv2RulesActionCountDetails omitted. + +// de_AwsWafv2RulesActionDetails omitted. + +// de_AwsWafv2RulesDetails omitted. + +// de_AwsWafv2RulesList omitted. + +// de_AwsWafv2VisibilityConfigDetails omitted. + +// de_AwsWafv2WebAclActionDetails omitted. + +// de_AwsWafv2WebAclCaptchaConfigDetails omitted. + +// de_AwsWafv2WebAclCaptchaConfigImmunityTimePropertyDetails omitted. + +// de_AwsWafv2WebAclDetails omitted. + +// de_AwsWafWebAclDetails omitted. + +// de_AwsWafWebAclRule omitted. + +// de_AwsWafWebAclRuleList omitted. + +// de_AwsXrayEncryptionConfigDetails omitted. + +// de_BatchUpdateFindingsUnprocessedFinding omitted. + +// de_BatchUpdateFindingsUnprocessedFindingsList omitted. + +// de_BooleanFilter omitted. + +// de_BooleanFilterList omitted. + +// de_CategoryList omitted. + +// de_Cell omitted. + +// de_Cells omitted. + +// de_CidrBlockAssociation omitted. + +// de_CidrBlockAssociationList omitted. + +// de_City omitted. + +// de_ClassificationResult omitted. + +// de_ClassificationStatus omitted. + +// de_Compliance omitted. + +// de_ContainerDetails omitted. + +// de_Country omitted. + +// de_CustomDataIdentifiersDetections omitted. + +// de_CustomDataIdentifiersDetectionsList omitted. + +// de_CustomDataIdentifiersResult omitted. /** - * deserializeAws_restJson1StandardsSubscription + * deserializeAws_restJson1Cvss */ -const de_StandardsSubscription = (output: any, context: __SerdeContext): StandardsSubscription => { - return { - StandardsArn: __expectString(output.StandardsArn), - StandardsInput: - output.StandardsInput != null ? de_StandardsInputParameterMap(output.StandardsInput, context) : undefined, - StandardsStatus: __expectString(output.StandardsStatus), - StandardsStatusReason: - output.StandardsStatusReason != null - ? de_StandardsStatusReason(output.StandardsStatusReason, context) - : undefined, - StandardsSubscriptionArn: __expectString(output.StandardsSubscriptionArn), - } as any; +const de_Cvss = (output: any, context: __SerdeContext): Cvss => { + return take(output, { + Adjustments: _json, + BaseScore: __limitedParseDouble, + BaseVector: __expectString, + Source: __expectString, + Version: __expectString, + }) as any; }; /** - * deserializeAws_restJson1StandardsSubscriptions + * deserializeAws_restJson1CvssList */ -const de_StandardsSubscriptions = (output: any, context: __SerdeContext): StandardsSubscription[] => { +const de_CvssList = (output: any, context: __SerdeContext): Cvss[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StandardsSubscription(entry, context); + return de_Cvss(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StatelessCustomActionDefinition - */ -const de_StatelessCustomActionDefinition = (output: any, context: __SerdeContext): StatelessCustomActionDefinition => { - return { - PublishMetricAction: - output.PublishMetricAction != null - ? de_StatelessCustomPublishMetricAction(output.PublishMetricAction, context) - : undefined, - } as any; -}; +// de_DataClassificationDetails omitted. + +// de_DateFilter omitted. + +// de_DateFilterList omitted. + +// de_DateRange omitted. + +// de_DnsRequestAction omitted. + +// de_FieldMap omitted. + +// de_FilePathList omitted. + +// de_FilePaths omitted. + +// de_FindingAggregator omitted. + +// de_FindingAggregatorList omitted. + +// de_FindingProviderFields omitted. + +// de_FindingProviderSeverity omitted. + +// de_FirewallPolicyDetails omitted. + +// de_FirewallPolicyStatefulRuleGroupReferencesDetails omitted. + +// de_FirewallPolicyStatefulRuleGroupReferencesList omitted. + +// de_FirewallPolicyStatelessCustomActionsDetails omitted. + +// de_FirewallPolicyStatelessCustomActionsList omitted. + +// de_FirewallPolicyStatelessRuleGroupReferencesDetails omitted. + +// de_FirewallPolicyStatelessRuleGroupReferencesList omitted. /** - * deserializeAws_restJson1StatelessCustomPublishMetricAction + * deserializeAws_restJson1GeoLocation */ -const de_StatelessCustomPublishMetricAction = ( - output: any, - context: __SerdeContext -): StatelessCustomPublishMetricAction => { - return { - Dimensions: - output.Dimensions != null - ? de_StatelessCustomPublishMetricActionDimensionsList(output.Dimensions, context) - : undefined, - } as any; +const de_GeoLocation = (output: any, context: __SerdeContext): GeoLocation => { + return take(output, { + Lat: __limitedParseDouble, + Lon: __limitedParseDouble, + }) as any; }; +// de_IcmpTypeCode omitted. + +// de_ImportFindingsError omitted. + +// de_ImportFindingsErrorList omitted. + /** - * deserializeAws_restJson1StatelessCustomPublishMetricActionDimension + * deserializeAws_restJson1Insight */ -const de_StatelessCustomPublishMetricActionDimension = ( - output: any, - context: __SerdeContext -): StatelessCustomPublishMetricActionDimension => { - return { - Value: __expectString(output.Value), - } as any; +const de_Insight = (output: any, context: __SerdeContext): Insight => { + return take(output, { + Filters: (_: any) => de_AwsSecurityFindingFilters(_, context), + GroupByAttribute: __expectString, + InsightArn: __expectString, + Name: __expectString, + }) as any; }; /** - * deserializeAws_restJson1StatelessCustomPublishMetricActionDimensionsList + * deserializeAws_restJson1InsightList */ -const de_StatelessCustomPublishMetricActionDimensionsList = ( - output: any, - context: __SerdeContext -): StatelessCustomPublishMetricActionDimension[] => { +const de_InsightList = (output: any, context: __SerdeContext): Insight[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatelessCustomPublishMetricActionDimension(entry, context); + return de_Insight(entry, context); }); return retVal; }; +// de_InsightResults omitted. + +// de_InsightResultValue omitted. + +// de_InsightResultValueList omitted. + +// de_IntegerList omitted. + +// de_IntegrationTypeList omitted. + /** - * deserializeAws_restJson1StatusReason + * deserializeAws_restJson1Invitation */ -const de_StatusReason = (output: any, context: __SerdeContext): StatusReason => { - return { - Description: __expectString(output.Description), - ReasonCode: __expectString(output.ReasonCode), - } as any; +const de_Invitation = (output: any, context: __SerdeContext): Invitation => { + return take(output, { + AccountId: __expectString, + InvitationId: __expectString, + InvitedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MemberStatus: __expectString, + }) as any; }; /** - * deserializeAws_restJson1StatusReasonsList + * deserializeAws_restJson1InvitationList */ -const de_StatusReasonsList = (output: any, context: __SerdeContext): StatusReason[] => { +const de_InvitationList = (output: any, context: __SerdeContext): Invitation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StatusReason(entry, context); + return de_Invitation(entry, context); }); return retVal; }; +// de_IpFilter omitted. + +// de_IpFilterList omitted. + +// de_IpOrganizationDetails omitted. + +// de_Ipv6CidrBlockAssociation omitted. + +// de_Ipv6CidrBlockAssociationList omitted. + +// de_KeywordFilter omitted. + +// de_KeywordFilterList omitted. + +// de_LoadBalancerState omitted. + +// de_Malware omitted. + +// de_MalwareList omitted. + +// de_MapFilter omitted. + +// de_MapFilterList omitted. + /** - * deserializeAws_restJson1StringFilter + * deserializeAws_restJson1Member */ -const de_StringFilter = (output: any, context: __SerdeContext): StringFilter => { - return { - Comparison: __expectString(output.Comparison), - Value: __expectString(output.Value), - } as any; +const de_Member = (output: any, context: __SerdeContext): Member => { + return take(output, { + AccountId: __expectString, + AdministratorId: __expectString, + Email: __expectString, + InvitedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + MasterId: __expectString, + MemberStatus: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** - * deserializeAws_restJson1StringFilterList + * deserializeAws_restJson1MemberList */ -const de_StringFilterList = (output: any, context: __SerdeContext): StringFilter[] => { +const de_MemberList = (output: any, context: __SerdeContext): Member[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StringFilter(entry, context); + return de_Member(entry, context); }); return retVal; }; +// de_Network omitted. + /** - * deserializeAws_restJson1StringList + * deserializeAws_restJson1NetworkConnectionAction */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_NetworkConnectionAction = (output: any, context: __SerdeContext): NetworkConnectionAction => { + return take(output, { + Blocked: __expectBoolean, + ConnectionDirection: __expectString, + LocalPortDetails: _json, + Protocol: __expectString, + RemoteIpDetails: (_: any) => de_ActionRemoteIpDetails(_, context), + RemotePortDetails: _json, + }) as any; }; +// de_NetworkHeader omitted. + +// de_NetworkPathComponent omitted. + +// de_NetworkPathComponentDetails omitted. + +// de_NetworkPathList omitted. + +// de_NonEmptyStringList omitted. + +// de_Note omitted. + /** - * deserializeAws_restJson1TagMap + * deserializeAws_restJson1NumberFilter */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_NumberFilter = (output: any, context: __SerdeContext): NumberFilter => { + return take(output, { + Eq: __limitedParseDouble, + Gte: __limitedParseDouble, + Lte: __limitedParseDouble, + }) as any; }; /** - * deserializeAws_restJson1Threat + * deserializeAws_restJson1NumberFilterList */ -const de_Threat = (output: any, context: __SerdeContext): Threat => { - return { - FilePaths: output.FilePaths != null ? de_FilePathList(output.FilePaths, context) : undefined, - ItemCount: __expectInt32(output.ItemCount), - Name: __expectString(output.Name), - Severity: __expectString(output.Severity), - } as any; +const de_NumberFilterList = (output: any, context: __SerdeContext): NumberFilter[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_NumberFilter(entry, context); + }); + return retVal; }; +// de_Occurrences omitted. + +// de_Page omitted. + +// de_Pages omitted. + +// de_PatchSummary omitted. + /** - * deserializeAws_restJson1ThreatIntelIndicator + * deserializeAws_restJson1PortProbeAction */ -const de_ThreatIntelIndicator = (output: any, context: __SerdeContext): ThreatIntelIndicator => { - return { - Category: __expectString(output.Category), - LastObservedAt: __expectString(output.LastObservedAt), - Source: __expectString(output.Source), - SourceUrl: __expectString(output.SourceUrl), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; +const de_PortProbeAction = (output: any, context: __SerdeContext): PortProbeAction => { + return take(output, { + Blocked: __expectBoolean, + PortProbeDetails: (_: any) => de_PortProbeDetailList(_, context), + }) as any; }; /** - * deserializeAws_restJson1ThreatIntelIndicatorList + * deserializeAws_restJson1PortProbeDetail */ -const de_ThreatIntelIndicatorList = (output: any, context: __SerdeContext): ThreatIntelIndicator[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ThreatIntelIndicator(entry, context); - }); - return retVal; +const de_PortProbeDetail = (output: any, context: __SerdeContext): PortProbeDetail => { + return take(output, { + LocalIpDetails: _json, + LocalPortDetails: _json, + RemoteIpDetails: (_: any) => de_ActionRemoteIpDetails(_, context), + }) as any; }; /** - * deserializeAws_restJson1ThreatList + * deserializeAws_restJson1PortProbeDetailList */ -const de_ThreatList = (output: any, context: __SerdeContext): Threat[] => { +const de_PortProbeDetailList = (output: any, context: __SerdeContext): PortProbeDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Threat(entry, context); + return de_PortProbeDetail(entry, context); }); return retVal; }; +// de_PortRange omitted. + +// de_PortRangeFromTo omitted. + +// de_PortRangeList omitted. + +// de_ProcessDetails omitted. + +// de_Product omitted. + +// de_ProductsList omitted. + +// de_ProductSubscriptionArnList omitted. + +// de_PropagatingVgwSetDetails omitted. + +// de_PropagatingVgwSetList omitted. + +// de_Range omitted. + +// de_Ranges omitted. + +// de_Recommendation omitted. + +// de__Record omitted. + +// de_Records omitted. + +// de_RelatedFinding omitted. + +// de_RelatedFindingList omitted. + +// de_RelatedRequirementsList omitted. + +// de_Remediation omitted. + /** - * deserializeAws_restJson1TypeList + * deserializeAws_restJson1Resource */ -const de_TypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_Resource = (output: any, context: __SerdeContext): Resource => { + return take(output, { + DataClassification: _json, + Details: (_: any) => de_ResourceDetails(_, context), + Id: __expectString, + Partition: __expectString, + Region: __expectString, + ResourceRole: __expectString, + Tags: _json, + Type: __expectString, + }) as any; }; /** - * deserializeAws_restJson1UnprocessedSecurityControl + * deserializeAws_restJson1ResourceDetails */ -const de_UnprocessedSecurityControl = (output: any, context: __SerdeContext): UnprocessedSecurityControl => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorReason: __expectString(output.ErrorReason), - SecurityControlId: __expectString(output.SecurityControlId), - } as any; +const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { + return take(output, { + AwsApiGatewayRestApi: _json, + AwsApiGatewayStage: (_: any) => de_AwsApiGatewayStageDetails(_, context), + AwsApiGatewayV2Api: _json, + AwsApiGatewayV2Stage: (_: any) => de_AwsApiGatewayV2StageDetails(_, context), + AwsAutoScalingAutoScalingGroup: _json, + AwsAutoScalingLaunchConfiguration: _json, + AwsBackupBackupPlan: _json, + AwsBackupBackupVault: _json, + AwsBackupRecoveryPoint: _json, + AwsCertificateManagerCertificate: _json, + AwsCloudFormationStack: _json, + AwsCloudFrontDistribution: _json, + AwsCloudTrailTrail: _json, + AwsCloudWatchAlarm: (_: any) => de_AwsCloudWatchAlarmDetails(_, context), + AwsCodeBuildProject: _json, + AwsDynamoDbTable: _json, + AwsEc2Eip: _json, + AwsEc2Instance: _json, + AwsEc2LaunchTemplate: (_: any) => de_AwsEc2LaunchTemplateDetails(_, context), + AwsEc2NetworkAcl: _json, + AwsEc2NetworkInterface: _json, + AwsEc2RouteTable: _json, + AwsEc2SecurityGroup: _json, + AwsEc2Subnet: _json, + AwsEc2TransitGateway: _json, + AwsEc2Volume: _json, + AwsEc2Vpc: _json, + AwsEc2VpcEndpointService: _json, + AwsEc2VpcPeeringConnection: _json, + AwsEc2VpnConnection: _json, + AwsEcrContainerImage: _json, + AwsEcrRepository: _json, + AwsEcsCluster: _json, + AwsEcsContainer: _json, + AwsEcsService: _json, + AwsEcsTask: _json, + AwsEcsTaskDefinition: _json, + AwsEfsAccessPoint: _json, + AwsEksCluster: _json, + AwsElasticBeanstalkEnvironment: _json, + AwsElasticsearchDomain: _json, + AwsElbLoadBalancer: _json, + AwsElbv2LoadBalancer: _json, + AwsIamAccessKey: _json, + AwsIamGroup: _json, + AwsIamPolicy: _json, + AwsIamRole: _json, + AwsIamUser: _json, + AwsKinesisStream: _json, + AwsKmsKey: (_: any) => de_AwsKmsKeyDetails(_, context), + AwsLambdaFunction: _json, + AwsLambdaLayerVersion: _json, + AwsNetworkFirewallFirewall: _json, + AwsNetworkFirewallFirewallPolicy: _json, + AwsNetworkFirewallRuleGroup: (_: any) => de_AwsNetworkFirewallRuleGroupDetails(_, context), + AwsOpenSearchServiceDomain: _json, + AwsRdsDbCluster: _json, + AwsRdsDbClusterSnapshot: _json, + AwsRdsDbInstance: _json, + AwsRdsDbSecurityGroup: _json, + AwsRdsDbSnapshot: _json, + AwsRdsEventSubscription: _json, + AwsRedshiftCluster: (_: any) => de_AwsRedshiftClusterDetails(_, context), + AwsS3AccountPublicAccessBlock: _json, + AwsS3Bucket: _json, + AwsS3Object: _json, + AwsSageMakerNotebookInstance: _json, + AwsSecretsManagerSecret: _json, + AwsSnsTopic: _json, + AwsSqsQueue: _json, + AwsSsmPatchCompliance: _json, + AwsWafRateBasedRule: _json, + AwsWafRegionalRateBasedRule: _json, + AwsWafRegionalRule: _json, + AwsWafRegionalRuleGroup: _json, + AwsWafRegionalWebAcl: _json, + AwsWafRule: _json, + AwsWafRuleGroup: _json, + AwsWafWebAcl: _json, + AwsWafv2RuleGroup: _json, + AwsWafv2WebAcl: _json, + AwsXrayEncryptionConfig: _json, + Container: _json, + Other: _json, + }) as any; }; /** - * deserializeAws_restJson1UnprocessedSecurityControls + * deserializeAws_restJson1ResourceList */ -const de_UnprocessedSecurityControls = (output: any, context: __SerdeContext): UnprocessedSecurityControl[] => { +const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedSecurityControl(entry, context); + return de_Resource(entry, context); }); return retVal; }; +// de_Result omitted. + +// de_ResultList omitted. + +// de_RouteSetDetails omitted. + +// de_RouteSetList omitted. + +// de_RuleGroupDetails omitted. + +// de_RuleGroupSource omitted. + +// de_RuleGroupSourceCustomActionsDetails omitted. + +// de_RuleGroupSourceCustomActionsList omitted. + +// de_RuleGroupSourceListDetails omitted. + +// de_RuleGroupSourceStatefulRulesDetails omitted. + +// de_RuleGroupSourceStatefulRulesHeaderDetails omitted. + +// de_RuleGroupSourceStatefulRulesList omitted. + +// de_RuleGroupSourceStatefulRulesOptionsDetails omitted. + +// de_RuleGroupSourceStatefulRulesOptionsList omitted. + +// de_RuleGroupSourceStatefulRulesRuleOptionsSettingsList omitted. + +// de_RuleGroupSourceStatelessRuleDefinition omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributes omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesDestinationPorts omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesDestinationPortsList omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesDestinations omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesDestinationsList omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesProtocolsList omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesSourcePorts omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesSourcePortsList omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesSources omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesSourcesList omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesTcpFlags omitted. + +// de_RuleGroupSourceStatelessRuleMatchAttributesTcpFlagsList omitted. + +// de_RuleGroupSourceStatelessRulesAndCustomActionsDetails omitted. + +// de_RuleGroupSourceStatelessRulesDetails omitted. + +// de_RuleGroupSourceStatelessRulesList omitted. + +// de_RuleGroupVariables omitted. + +// de_RuleGroupVariablesIpSetsDetails omitted. + +// de_RuleGroupVariablesPortSetsDetails omitted. + +// de_SecurityControl omitted. + +// de_SecurityControlDefinition omitted. + +// de_SecurityControlDefinitions omitted. + +// de_SecurityControls omitted. + +// de_SecurityGroups omitted. + +// de_SensitiveDataDetections omitted. + +// de_SensitiveDataDetectionsList omitted. + +// de_SensitiveDataResult omitted. + +// de_SensitiveDataResultList omitted. + /** - * deserializeAws_restJson1UnprocessedStandardsControlAssociation + * deserializeAws_restJson1Severity */ -const de_UnprocessedStandardsControlAssociation = ( - output: any, - context: __SerdeContext -): UnprocessedStandardsControlAssociation => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorReason: __expectString(output.ErrorReason), - StandardsControlAssociationId: - output.StandardsControlAssociationId != null - ? de_StandardsControlAssociationId(output.StandardsControlAssociationId, context) - : undefined, - } as any; +const de_Severity = (output: any, context: __SerdeContext): Severity => { + return take(output, { + Label: __expectString, + Normalized: __expectInt32, + Original: __expectString, + Product: __limitedParseDouble, + }) as any; }; +// de_SoftwarePackage omitted. + +// de_SoftwarePackageList omitted. + +// de_Standard omitted. + +// de_Standards omitted. + /** - * deserializeAws_restJson1UnprocessedStandardsControlAssociations + * deserializeAws_restJson1StandardsControl */ -const de_UnprocessedStandardsControlAssociations = ( - output: any, - context: __SerdeContext -): UnprocessedStandardsControlAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedStandardsControlAssociation(entry, context); - }); - return retVal; +const de_StandardsControl = (output: any, context: __SerdeContext): StandardsControl => { + return take(output, { + ControlId: __expectString, + ControlStatus: __expectString, + ControlStatusUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + Description: __expectString, + DisabledReason: __expectString, + RelatedRequirements: _json, + RemediationUrl: __expectString, + SeverityRating: __expectString, + StandardsControlArn: __expectString, + Title: __expectString, + }) as any; }; +// de_StandardsControlArnList omitted. + /** - * deserializeAws_restJson1UnprocessedStandardsControlAssociationUpdate + * deserializeAws_restJson1StandardsControlAssociationDetail */ -const de_UnprocessedStandardsControlAssociationUpdate = ( +const de_StandardsControlAssociationDetail = ( output: any, context: __SerdeContext -): UnprocessedStandardsControlAssociationUpdate => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorReason: __expectString(output.ErrorReason), - StandardsControlAssociationUpdate: - output.StandardsControlAssociationUpdate != null - ? de_StandardsControlAssociationUpdate(output.StandardsControlAssociationUpdate, context) - : undefined, - } as any; +): StandardsControlAssociationDetail => { + return take(output, { + AssociationStatus: __expectString, + RelatedRequirements: _json, + SecurityControlArn: __expectString, + SecurityControlId: __expectString, + StandardsArn: __expectString, + StandardsControlArns: _json, + StandardsControlDescription: __expectString, + StandardsControlTitle: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + UpdatedReason: __expectString, + }) as any; }; /** - * deserializeAws_restJson1UnprocessedStandardsControlAssociationUpdates + * deserializeAws_restJson1StandardsControlAssociationDetails */ -const de_UnprocessedStandardsControlAssociationUpdates = ( +const de_StandardsControlAssociationDetails = ( output: any, context: __SerdeContext -): UnprocessedStandardsControlAssociationUpdate[] => { +): StandardsControlAssociationDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedStandardsControlAssociationUpdate(entry, context); + return de_StandardsControlAssociationDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VolumeMount - */ -const de_VolumeMount = (output: any, context: __SerdeContext): VolumeMount => { - return { - MountPath: __expectString(output.MountPath), - Name: __expectString(output.Name), - } as any; -}; +// de_StandardsControlAssociationId omitted. /** - * deserializeAws_restJson1VolumeMountList + * deserializeAws_restJson1StandardsControlAssociationSummaries */ -const de_VolumeMountList = (output: any, context: __SerdeContext): VolumeMount[] => { +const de_StandardsControlAssociationSummaries = ( + output: any, + context: __SerdeContext +): StandardsControlAssociationSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VolumeMount(entry, context); + return de_StandardsControlAssociationSummary(entry, context); }); return retVal; }; /** - * deserializeAws_restJson1VpcInfoCidrBlockSetDetails + * deserializeAws_restJson1StandardsControlAssociationSummary */ -const de_VpcInfoCidrBlockSetDetails = (output: any, context: __SerdeContext): VpcInfoCidrBlockSetDetails => { - return { - CidrBlock: __expectString(output.CidrBlock), - } as any; +const de_StandardsControlAssociationSummary = ( + output: any, + context: __SerdeContext +): StandardsControlAssociationSummary => { + return take(output, { + AssociationStatus: __expectString, + RelatedRequirements: _json, + SecurityControlArn: __expectString, + SecurityControlId: __expectString, + StandardsArn: __expectString, + StandardsControlDescription: __expectString, + StandardsControlTitle: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + UpdatedReason: __expectString, + }) as any; }; +// de_StandardsControlAssociationUpdate omitted. + /** - * deserializeAws_restJson1VpcInfoCidrBlockSetList + * deserializeAws_restJson1StandardsControls */ -const de_VpcInfoCidrBlockSetList = (output: any, context: __SerdeContext): VpcInfoCidrBlockSetDetails[] => { +const de_StandardsControls = (output: any, context: __SerdeContext): StandardsControl[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcInfoCidrBlockSetDetails(entry, context); + return de_StandardsControl(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VpcInfoIpv6CidrBlockSetDetails - */ -const de_VpcInfoIpv6CidrBlockSetDetails = (output: any, context: __SerdeContext): VpcInfoIpv6CidrBlockSetDetails => { - return { - Ipv6CidrBlock: __expectString(output.Ipv6CidrBlock), - } as any; -}; +// de_StandardsInputParameterMap omitted. -/** - * deserializeAws_restJson1VpcInfoIpv6CidrBlockSetList - */ -const de_VpcInfoIpv6CidrBlockSetList = (output: any, context: __SerdeContext): VpcInfoIpv6CidrBlockSetDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VpcInfoIpv6CidrBlockSetDetails(entry, context); - }); - return retVal; -}; +// de_StandardsManagedBy omitted. -/** - * deserializeAws_restJson1VpcInfoPeeringOptionsDetails - */ -const de_VpcInfoPeeringOptionsDetails = (output: any, context: __SerdeContext): VpcInfoPeeringOptionsDetails => { - return { - AllowDnsResolutionFromRemoteVpc: __expectBoolean(output.AllowDnsResolutionFromRemoteVpc), - AllowEgressFromLocalClassicLinkToRemoteVpc: __expectBoolean(output.AllowEgressFromLocalClassicLinkToRemoteVpc), - AllowEgressFromLocalVpcToRemoteClassicLink: __expectBoolean(output.AllowEgressFromLocalVpcToRemoteClassicLink), - } as any; -}; +// de_StandardsStatusReason omitted. + +// de_StandardsSubscription omitted. + +// de_StandardsSubscriptions omitted. + +// de_StatelessCustomActionDefinition omitted. + +// de_StatelessCustomPublishMetricAction omitted. + +// de_StatelessCustomPublishMetricActionDimension omitted. + +// de_StatelessCustomPublishMetricActionDimensionsList omitted. + +// de_StatusReason omitted. + +// de_StatusReasonsList omitted. + +// de_StringFilter omitted. + +// de_StringFilterList omitted. + +// de_StringList omitted. + +// de_TagMap omitted. + +// de_Threat omitted. + +// de_ThreatIntelIndicator omitted. + +// de_ThreatIntelIndicatorList omitted. + +// de_ThreatList omitted. + +// de_TypeList omitted. + +// de_UnprocessedSecurityControl omitted. + +// de_UnprocessedSecurityControls omitted. + +// de_UnprocessedStandardsControlAssociation omitted. + +// de_UnprocessedStandardsControlAssociations omitted. + +// de_UnprocessedStandardsControlAssociationUpdate omitted. + +// de_UnprocessedStandardsControlAssociationUpdates omitted. + +// de_VolumeMount omitted. + +// de_VolumeMountList omitted. + +// de_VpcInfoCidrBlockSetDetails omitted. + +// de_VpcInfoCidrBlockSetList omitted. + +// de_VpcInfoIpv6CidrBlockSetDetails omitted. + +// de_VpcInfoIpv6CidrBlockSetList omitted. + +// de_VpcInfoPeeringOptionsDetails omitted. /** * deserializeAws_restJson1Vulnerability */ const de_Vulnerability = (output: any, context: __SerdeContext): Vulnerability => { - return { - Cvss: output.Cvss != null ? de_CvssList(output.Cvss, context) : undefined, - FixAvailable: __expectString(output.FixAvailable), - Id: __expectString(output.Id), - ReferenceUrls: output.ReferenceUrls != null ? de_StringList(output.ReferenceUrls, context) : undefined, - RelatedVulnerabilities: - output.RelatedVulnerabilities != null ? de_StringList(output.RelatedVulnerabilities, context) : undefined, - Vendor: output.Vendor != null ? de_VulnerabilityVendor(output.Vendor, context) : undefined, - VulnerablePackages: - output.VulnerablePackages != null ? de_SoftwarePackageList(output.VulnerablePackages, context) : undefined, - } as any; + return take(output, { + Cvss: (_: any) => de_CvssList(_, context), + FixAvailable: __expectString, + Id: __expectString, + ReferenceUrls: _json, + RelatedVulnerabilities: _json, + Vendor: _json, + VulnerablePackages: _json, + }) as any; }; /** @@ -30723,77 +10798,22 @@ const de_VulnerabilityList = (output: any, context: __SerdeContext): Vulnerabili const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Vulnerability(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1VulnerabilityVendor - */ -const de_VulnerabilityVendor = (output: any, context: __SerdeContext): VulnerabilityVendor => { - return { - Name: __expectString(output.Name), - Url: __expectString(output.Url), - VendorCreatedAt: __expectString(output.VendorCreatedAt), - VendorSeverity: __expectString(output.VendorSeverity), - VendorUpdatedAt: __expectString(output.VendorUpdatedAt), - } as any; -}; +// de_VulnerabilityVendor omitted. -/** - * deserializeAws_restJson1WafAction - */ -const de_WafAction = (output: any, context: __SerdeContext): WafAction => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_WafAction omitted. -/** - * deserializeAws_restJson1WafExcludedRule - */ -const de_WafExcludedRule = (output: any, context: __SerdeContext): WafExcludedRule => { - return { - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_WafExcludedRule omitted. -/** - * deserializeAws_restJson1WafExcludedRuleList - */ -const de_WafExcludedRuleList = (output: any, context: __SerdeContext): WafExcludedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WafExcludedRule(entry, context); - }); - return retVal; -}; +// de_WafExcludedRuleList omitted. -/** - * deserializeAws_restJson1WafOverrideAction - */ -const de_WafOverrideAction = (output: any, context: __SerdeContext): WafOverrideAction => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_WafOverrideAction omitted. -/** - * deserializeAws_restJson1Workflow - */ -const de_Workflow = (output: any, context: __SerdeContext): Workflow => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_Workflow omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-securitylake/src/protocols/Aws_restJson1.ts b/clients/client-securitylake/src/protocols/Aws_restJson1.ts index d185f472350b..e2051d2d8fd3 100644 --- a/clients/client-securitylake/src/protocols/Aws_restJson1.ts +++ b/clients/client-securitylake/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -106,7 +106,6 @@ import { AccessDeniedException, AccessType, AccountNotFoundException, - AccountSources, AutoEnableNewRegionConfiguration, AwsLogSourceType, BucketNotFoundException, @@ -121,10 +120,6 @@ import { InternalServerException, InvalidInputException, LakeConfigurationRequest, - LakeConfigurationResponse, - LastUpdateFailure, - LogsStatus, - ProtocolAndNotificationEndpoint, Region, ResourceNotFoundException, RetentionSetting, @@ -133,9 +128,7 @@ import { SourceType, SubscriberResource, ThrottlingException, - UpdateStatus, ValidationException, - ValidationExceptionField, } from "../models/models_0"; import { SecurityLakeServiceException as __BaseException } from "../models/SecurityLakeServiceException"; @@ -152,18 +145,14 @@ export const se_CreateAwsLogSourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/aws"; let body: any; - body = JSON.stringify({ - ...(input.enableAllDimensions != null && { - enableAllDimensions: se_AllDimensionsMap(input.enableAllDimensions, context), - }), - ...(input.enableSingleDimension != null && { - enableSingleDimension: se_InputSet(input.enableSingleDimension, context), - }), - ...(input.enableTwoDimensions != null && { - enableTwoDimensions: se_TwoDimensionsMap(input.enableTwoDimensions, context), - }), - ...(input.inputOrder != null && { inputOrder: se_DimensionSet(input.inputOrder, context) }), - }); + body = JSON.stringify( + take(input, { + enableAllDimensions: (_) => _json(_), + enableSingleDimension: (_) => _json(_), + enableTwoDimensions: (_) => _json(_), + inputOrder: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -188,12 +177,14 @@ export const se_CreateCustomLogSourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/custom"; let body: any; - body = JSON.stringify({ - ...(input.customSourceName != null && { customSourceName: input.customSourceName }), - ...(input.eventClass != null && { eventClass: input.eventClass }), - ...(input.glueInvocationRoleArn != null && { glueInvocationRoleArn: input.glueInvocationRoleArn }), - ...(input.logProviderAccountId != null && { logProviderAccountId: input.logProviderAccountId }), - }); + body = JSON.stringify( + take(input, { + customSourceName: [], + eventClass: [], + glueInvocationRoleArn: [], + logProviderAccountId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -218,14 +209,14 @@ export const se_CreateDatalakeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake"; let body: any; - body = JSON.stringify({ - ...(input.configurations != null && { - configurations: se_LakeConfigurationRequestMap(input.configurations, context), - }), - ...(input.enableAll != null && { enableAll: input.enableAll }), - ...(input.metaStoreManagerRoleArn != null && { metaStoreManagerRoleArn: input.metaStoreManagerRoleArn }), - ...(input.regions != null && { regions: se_RegionSet(input.regions, context) }), - }); + body = JSON.stringify( + take(input, { + configurations: (_) => _json(_), + enableAll: [], + metaStoreManagerRoleArn: [], + regions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -251,11 +242,11 @@ export const se_CreateDatalakeAutoEnableCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/autoenable"; let body: any; - body = JSON.stringify({ - ...(input.configurationForNewAccounts != null && { - configurationForNewAccounts: se_AutoEnableNewRegionConfigurationList(input.configurationForNewAccounts, context), - }), - }); + body = JSON.stringify( + take(input, { + configurationForNewAccounts: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -280,9 +271,11 @@ export const se_CreateDatalakeDelegatedAdminCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/delegate"; let body: any; - body = JSON.stringify({ - ...(input.account != null && { account: input.account }), - }); + body = JSON.stringify( + take(input, { + account: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -308,10 +301,12 @@ export const se_CreateDatalakeExceptionsSubscriptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions/subscription"; let body: any; - body = JSON.stringify({ - ...(input.notificationEndpoint != null && { notificationEndpoint: input.notificationEndpoint }), - ...(input.subscriptionProtocol != null && { subscriptionProtocol: input.subscriptionProtocol }), - }); + body = JSON.stringify( + take(input, { + notificationEndpoint: [], + subscriptionProtocol: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -336,14 +331,16 @@ export const se_CreateSubscriberCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/subscribers"; let body: any; - body = JSON.stringify({ - ...(input.accessTypes != null && { accessTypes: se_AccessTypeList(input.accessTypes, context) }), - ...(input.accountId != null && { accountId: input.accountId }), - ...(input.externalId != null && { externalId: input.externalId }), - ...(input.sourceTypes != null && { sourceTypes: se_SourceTypeList(input.sourceTypes, context) }), - ...(input.subscriberDescription != null && { subscriberDescription: input.subscriberDescription }), - ...(input.subscriberName != null && { subscriberName: input.subscriberName }), - }); + body = JSON.stringify( + take(input, { + accessTypes: (_) => _json(_), + accountId: [], + externalId: [], + sourceTypes: (_) => _json(_), + subscriberDescription: [], + subscriberName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -378,14 +375,16 @@ export const se_CreateSubscriptionNotificationConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.createSqs != null && { createSqs: input.createSqs }), - ...(input.httpsApiKeyName != null && { httpsApiKeyName: input.httpsApiKeyName }), - ...(input.httpsApiKeyValue != null && { httpsApiKeyValue: input.httpsApiKeyValue }), - ...(input.httpsMethod != null && { httpsMethod: input.httpsMethod }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.subscriptionEndpoint != null && { subscriptionEndpoint: input.subscriptionEndpoint }), - }); + body = JSON.stringify( + take(input, { + createSqs: [], + httpsApiKeyName: [], + httpsApiKeyValue: [], + httpsMethod: [], + roleArn: [], + subscriptionEndpoint: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -411,18 +410,14 @@ export const se_DeleteAwsLogSourceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/aws/delete"; let body: any; - body = JSON.stringify({ - ...(input.disableAllDimensions != null && { - disableAllDimensions: se_AllDimensionsMap(input.disableAllDimensions, context), - }), - ...(input.disableSingleDimension != null && { - disableSingleDimension: se_InputSet(input.disableSingleDimension, context), - }), - ...(input.disableTwoDimensions != null && { - disableTwoDimensions: se_TwoDimensionsMap(input.disableTwoDimensions, context), - }), - ...(input.inputOrder != null && { inputOrder: se_DimensionSet(input.inputOrder, context) }), - }); + body = JSON.stringify( + take(input, { + disableAllDimensions: (_) => _json(_), + disableSingleDimension: (_) => _json(_), + disableTwoDimensions: (_) => _json(_), + inputOrder: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -499,14 +494,11 @@ export const se_DeleteDatalakeAutoEnableCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/autoenable/delete"; let body: any; - body = JSON.stringify({ - ...(input.removeFromConfigurationForNewAccounts != null && { - removeFromConfigurationForNewAccounts: se_AutoEnableNewRegionConfigurationList( - input.removeFromConfigurationForNewAccounts, - context - ), - }), - }); + body = JSON.stringify( + take(input, { + removeFromConfigurationForNewAccounts: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -742,11 +734,13 @@ export const se_GetDatalakeStatusCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/status"; let body: any; - body = JSON.stringify({ - ...(input.accountSet != null && { accountSet: se_InputSet(input.accountSet, context) }), - ...(input.maxAccountResults != null && { maxAccountResults: input.maxAccountResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + accountSet: (_) => _json(_), + maxAccountResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -795,11 +789,13 @@ export const se_ListDatalakeExceptionsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions"; let body: any; - body = JSON.stringify({ - ...(input.maxFailures != null && { maxFailures: input.maxFailures }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.regionSet != null && { regionSet: se_RegionSet(input.regionSet, context) }), - }); + body = JSON.stringify( + take(input, { + maxFailures: [], + nextToken: [], + regionSet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -824,18 +820,16 @@ export const se_ListLogSourcesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/logsources/list"; let body: any; - body = JSON.stringify({ - ...(input.inputOrder != null && { inputOrder: se_DimensionSet(input.inputOrder, context) }), - ...(input.listAllDimensions != null && { - listAllDimensions: se_AllDimensionsMap(input.listAllDimensions, context), - }), - ...(input.listSingleDimension != null && { listSingleDimension: se_InputSet(input.listSingleDimension, context) }), - ...(input.listTwoDimensions != null && { - listTwoDimensions: se_TwoDimensionsMap(input.listTwoDimensions, context), - }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + inputOrder: (_) => _json(_), + listAllDimensions: (_) => _json(_), + listSingleDimension: (_) => _json(_), + listTwoDimensions: (_) => _json(_), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -887,11 +881,11 @@ export const se_UpdateDatalakeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake"; let body: any; - body = JSON.stringify({ - ...(input.configurations != null && { - configurations: se_LakeConfigurationRequestMap(input.configurations, context), - }), - }); + body = JSON.stringify( + take(input, { + configurations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -917,9 +911,11 @@ export const se_UpdateDatalakeExceptionsExpiryCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions/expiry"; let body: any; - body = JSON.stringify({ - ...(input.exceptionMessageExpiry != null && { exceptionMessageExpiry: input.exceptionMessageExpiry }), - }); + body = JSON.stringify( + take(input, { + exceptionMessageExpiry: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -945,10 +941,12 @@ export const se_UpdateDatalakeExceptionsSubscriptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/datalake/exceptions/subscription"; let body: any; - body = JSON.stringify({ - ...(input.notificationEndpoint != null && { notificationEndpoint: input.notificationEndpoint }), - ...(input.subscriptionProtocol != null && { subscriptionProtocol: input.subscriptionProtocol }), - }); + body = JSON.stringify( + take(input, { + notificationEndpoint: [], + subscriptionProtocol: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -974,12 +972,14 @@ export const se_UpdateSubscriberCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/subscribers/{id}"; resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id!, "{id}", false); let body: any; - body = JSON.stringify({ - ...(input.externalId != null && { externalId: input.externalId }), - ...(input.sourceTypes != null && { sourceTypes: se_SourceTypeList(input.sourceTypes, context) }), - ...(input.subscriberDescription != null && { subscriberDescription: input.subscriberDescription }), - ...(input.subscriberName != null && { subscriberName: input.subscriberName }), - }); + body = JSON.stringify( + take(input, { + externalId: [], + sourceTypes: (_) => _json(_), + subscriberDescription: [], + subscriberName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1014,14 +1014,16 @@ export const se_UpdateSubscriptionNotificationConfigurationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.createSqs != null && { createSqs: input.createSqs }), - ...(input.httpsApiKeyName != null && { httpsApiKeyName: input.httpsApiKeyName }), - ...(input.httpsApiKeyValue != null && { httpsApiKeyValue: input.httpsApiKeyValue }), - ...(input.httpsMethod != null && { httpsMethod: input.httpsMethod }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.subscriptionEndpoint != null && { subscriptionEndpoint: input.subscriptionEndpoint }), - }); + body = JSON.stringify( + take(input, { + createSqs: [], + httpsApiKeyName: [], + httpsApiKeyValue: [], + httpsMethod: [], + roleArn: [], + subscriptionEndpoint: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1047,12 +1049,11 @@ export const de_CreateAwsLogSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failed != null) { - contents.failed = de_AccountList(data.failed, context); - } - if (data.processing != null) { - contents.processing = de_AccountList(data.processing, context); - } + const doc = take(data, { + failed: _json, + processing: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1089,10 +1090,9 @@ const de_CreateAwsLogSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1112,21 +1112,14 @@ export const de_CreateCustomLogSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customDataLocation != null) { - contents.customDataLocation = __expectString(data.customDataLocation); - } - if (data.glueCrawlerName != null) { - contents.glueCrawlerName = __expectString(data.glueCrawlerName); - } - if (data.glueDatabaseName != null) { - contents.glueDatabaseName = __expectString(data.glueDatabaseName); - } - if (data.glueTableName != null) { - contents.glueTableName = __expectString(data.glueTableName); - } - if (data.logProviderAccessRoleArn != null) { - contents.logProviderAccessRoleArn = __expectString(data.logProviderAccessRoleArn); - } + const doc = take(data, { + customDataLocation: __expectString, + glueCrawlerName: __expectString, + glueDatabaseName: __expectString, + glueTableName: __expectString, + logProviderAccessRoleArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1166,10 +1159,9 @@ const de_CreateCustomLogSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1228,10 +1220,9 @@ const de_CreateDatalakeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1281,10 +1272,9 @@ const de_CreateDatalakeAutoEnableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1334,10 +1324,9 @@ const de_CreateDatalakeDelegatedAdminCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1387,10 +1376,9 @@ const de_CreateDatalakeExceptionsSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1410,24 +1398,15 @@ export const de_CreateSubscriberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resourceShareArn != null) { - contents.resourceShareArn = __expectString(data.resourceShareArn); - } - if (data.resourceShareName != null) { - contents.resourceShareName = __expectString(data.resourceShareName); - } - if (data.roleArn != null) { - contents.roleArn = __expectString(data.roleArn); - } - if (data.s3BucketArn != null) { - contents.s3BucketArn = __expectString(data.s3BucketArn); - } - if (data.snsArn != null) { - contents.snsArn = __expectString(data.snsArn); - } - if (data.subscriptionId != null) { - contents.subscriptionId = __expectString(data.subscriptionId); - } + const doc = take(data, { + resourceShareArn: __expectString, + resourceShareName: __expectString, + roleArn: __expectString, + s3BucketArn: __expectString, + snsArn: __expectString, + subscriptionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1470,10 +1449,9 @@ const de_CreateSubscriberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1493,9 +1471,10 @@ export const de_CreateSubscriptionNotificationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.queueArn != null) { - contents.queueArn = __expectString(data.queueArn); - } + const doc = take(data, { + queueArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1535,10 +1514,9 @@ const de_CreateSubscriptionNotificationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1558,12 +1536,11 @@ export const de_DeleteAwsLogSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.failed != null) { - contents.failed = de_AccountList(data.failed, context); - } - if (data.processing != null) { - contents.processing = de_AccountList(data.processing, context); - } + const doc = take(data, { + failed: _json, + processing: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1594,10 +1571,9 @@ const de_DeleteAwsLogSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1617,9 +1593,10 @@ export const de_DeleteCustomLogSourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.customDataLocation != null) { - contents.customDataLocation = __expectString(data.customDataLocation); - } + const doc = take(data, { + customDataLocation: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1659,10 +1636,9 @@ const de_DeleteCustomLogSourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1721,10 +1697,9 @@ const de_DeleteDatalakeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1774,10 +1749,9 @@ const de_DeleteDatalakeAutoEnableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1827,10 +1801,9 @@ const de_DeleteDatalakeDelegatedAdminCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1850,9 +1823,10 @@ export const de_DeleteDatalakeExceptionsSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1883,10 +1857,9 @@ const de_DeleteDatalakeExceptionsSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1948,10 +1921,9 @@ const de_DeleteSubscriberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,10 +1982,9 @@ const de_DeleteSubscriptionNotificationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2033,9 +2004,10 @@ export const de_GetDatalakeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configurations != null) { - contents.configurations = de_LakeConfigurationResponseMap(data.configurations, context); - } + const doc = take(data, { + configurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2069,10 +2041,9 @@ const de_GetDatalakeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2092,9 +2063,10 @@ export const de_GetDatalakeAutoEnableCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.autoEnableNewAccounts != null) { - contents.autoEnableNewAccounts = de_AutoEnableNewRegionConfigurationList(data.autoEnableNewAccounts, context); - } + const doc = take(data, { + autoEnableNewAccounts: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2125,10 +2097,9 @@ const de_GetDatalakeAutoEnableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2148,9 +2119,10 @@ export const de_GetDatalakeExceptionsExpiryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.exceptionMessageExpiry != null) { - contents.exceptionMessageExpiry = __expectLong(data.exceptionMessageExpiry); - } + const doc = take(data, { + exceptionMessageExpiry: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -2181,10 +2153,9 @@ const de_GetDatalakeExceptionsExpiryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2204,12 +2175,10 @@ export const de_GetDatalakeExceptionsSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.protocolAndNotificationEndpoint != null) { - contents.protocolAndNotificationEndpoint = de_ProtocolAndNotificationEndpoint( - data.protocolAndNotificationEndpoint, - context - ); - } + const doc = take(data, { + protocolAndNotificationEndpoint: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2240,10 +2209,9 @@ const de_GetDatalakeExceptionsSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2263,12 +2231,11 @@ export const de_GetDatalakeStatusCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountSourcesList != null) { - contents.accountSourcesList = de_AccountSourcesList(data.accountSourcesList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + accountSourcesList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2299,10 +2266,9 @@ const de_GetDatalakeStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2322,9 +2288,10 @@ export const de_GetSubscriberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.subscriber != null) { - contents.subscriber = de_SubscriberResource(data.subscriber, context); - } + const doc = take(data, { + subscriber: (_) => de_SubscriberResource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2358,10 +2325,9 @@ const de_GetSubscriberCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2381,12 +2347,11 @@ export const de_ListDatalakeExceptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.nonRetryableFailures != null) { - contents.nonRetryableFailures = de_FailuresResponseList(data.nonRetryableFailures, context); - } + const doc = take(data, { + nextToken: __expectString, + nonRetryableFailures: (_) => de_FailuresResponseList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2417,10 +2382,9 @@ const de_ListDatalakeExceptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2440,15 +2404,11 @@ export const de_ListLogSourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.regionSourceTypesAccountsList != null) { - contents.regionSourceTypesAccountsList = de_RegionSourceTypesAccountsList( - data.regionSourceTypesAccountsList, - context - ); - } + const doc = take(data, { + nextToken: __expectString, + regionSourceTypesAccountsList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2482,10 +2442,9 @@ const de_ListLogSourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,12 +2464,11 @@ export const de_ListSubscribersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.subscribers != null) { - contents.subscribers = de_SubscriberList(data.subscribers, context); - } + const doc = take(data, { + nextToken: __expectString, + subscribers: (_) => de_SubscriberList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2547,10 +2505,9 @@ const de_ListSubscribersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2603,10 +2560,9 @@ const de_UpdateDatalakeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2656,10 +2612,9 @@ const de_UpdateDatalakeExceptionsExpiryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2709,10 +2664,9 @@ const de_UpdateDatalakeExceptionsSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,9 +2686,10 @@ export const de_UpdateSubscriberCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.subscriber != null) { - contents.subscriber = de_SubscriberResource(data.subscriber, context); - } + const doc = take(data, { + subscriber: (_) => de_SubscriberResource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2774,10 +2729,9 @@ const de_UpdateSubscriberCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2797,9 +2751,10 @@ export const de_UpdateSubscriptionNotificationConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.queueArn != null) { - contents.queueArn = __expectString(data.queueArn); - } + const doc = take(data, { + queueArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2839,16 +2794,15 @@ const de_UpdateSubscriptionNotificationConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2858,12 +2812,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.errorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + errorCode: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2880,9 +2833,10 @@ const de_AccountNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccountNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2899,9 +2853,10 @@ const de_BucketNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BucketNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2918,9 +2873,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2934,15 +2890,12 @@ const de_ConcurrentModificationExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2959,9 +2912,10 @@ const de_ConflictSourceNamesExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictSourceNamesException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2978,9 +2932,10 @@ const de_ConflictSubscriptionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictSubscriptionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2997,9 +2952,10 @@ const de_EventBridgeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new EventBridgeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3021,9 +2977,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3040,9 +2997,10 @@ const de_InvalidInputExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidInputException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3059,15 +3017,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3081,9 +3036,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_S3ExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new S3Exception({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3100,21 +3056,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3133,15 +3082,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3155,15 +3101,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3171,337 +3114,65 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AccessTypeList - */ -const se_AccessTypeList = (input: (AccessType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccessTypeList omitted. -/** - * serializeAws_restJson1AllDimensionsMap - */ -const se_AllDimensionsMap = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_TwoDimensionsMap(value, context); - return acc; - }, {}); -}; +// se_AllDimensionsMap omitted. -/** - * serializeAws_restJson1AutoEnableNewRegionConfiguration - */ -const se_AutoEnableNewRegionConfiguration = (input: AutoEnableNewRegionConfiguration, context: __SerdeContext): any => { - return { - ...(input.region != null && { region: input.region }), - ...(input.sources != null && { sources: se_AwsSourceTypeList(input.sources, context) }), - }; -}; +// se_AutoEnableNewRegionConfiguration omitted. -/** - * serializeAws_restJson1AutoEnableNewRegionConfigurationList - */ -const se_AutoEnableNewRegionConfigurationList = ( - input: AutoEnableNewRegionConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AutoEnableNewRegionConfiguration(entry, context); - }); -}; +// se_AutoEnableNewRegionConfigurationList omitted. -/** - * serializeAws_restJson1AwsSourceTypeList - */ -const se_AwsSourceTypeList = (input: (AwsLogSourceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AwsSourceTypeList omitted. -/** - * serializeAws_restJson1DimensionSet - */ -const se_DimensionSet = (input: (Dimension | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DimensionSet omitted. -/** - * serializeAws_restJson1InputSet - */ -const se_InputSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InputSet omitted. -/** - * serializeAws_restJson1LakeConfigurationRequest - */ -const se_LakeConfigurationRequest = (input: LakeConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.encryptionKey != null && { encryptionKey: input.encryptionKey }), - ...(input.replicationDestinationRegions != null && { - replicationDestinationRegions: se_RegionSet(input.replicationDestinationRegions, context), - }), - ...(input.replicationRoleArn != null && { replicationRoleArn: input.replicationRoleArn }), - ...(input.retentionSettings != null && { - retentionSettings: se_RetentionSettingList(input.retentionSettings, context), - }), - ...(input.tagsMap != null && { tagsMap: se_TagsMap(input.tagsMap, context) }), - }; -}; +// se_LakeConfigurationRequest omitted. -/** - * serializeAws_restJson1LakeConfigurationRequestMap - */ -const se_LakeConfigurationRequestMap = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [Region | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_LakeConfigurationRequest(value, context); - return acc; - }, {}); -}; +// se_LakeConfigurationRequestMap omitted. -/** - * serializeAws_restJson1RegionSet - */ -const se_RegionSet = (input: (Region | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RegionSet omitted. -/** - * serializeAws_restJson1RetentionSetting - */ -const se_RetentionSetting = (input: RetentionSetting, context: __SerdeContext): any => { - return { - ...(input.retentionPeriod != null && { retentionPeriod: input.retentionPeriod }), - ...(input.storageClass != null && { storageClass: input.storageClass }), - }; -}; +// se_RetentionSetting omitted. -/** - * serializeAws_restJson1RetentionSettingList - */ -const se_RetentionSettingList = (input: RetentionSetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RetentionSetting(entry, context); - }); -}; +// se_RetentionSettingList omitted. -/** - * serializeAws_restJson1SourceType - */ -const se_SourceType = (input: SourceType, context: __SerdeContext): any => { - return SourceType.visit(input, { - awsSourceType: (value) => ({ awsSourceType: value }), - customSourceType: (value) => ({ customSourceType: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_SourceType omitted. -/** - * serializeAws_restJson1SourceTypeList - */ -const se_SourceTypeList = (input: SourceType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceType(entry, context); - }); -}; +// se_SourceTypeList omitted. -/** - * serializeAws_restJson1TagsMap - */ -const se_TagsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagsMap omitted. -/** - * serializeAws_restJson1TwoDimensionsMap - */ -const se_TwoDimensionsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ValueSet(value, context); - return acc; - }, {}); -}; +// se_TwoDimensionsMap omitted. -/** - * serializeAws_restJson1ValueSet - */ -const se_ValueSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ValueSet omitted. -/** - * deserializeAws_restJson1AccessTypeList - */ -const de_AccessTypeList = (output: any, context: __SerdeContext): (AccessType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccessTypeList omitted. -/** - * deserializeAws_restJson1AccountList - */ -const de_AccountList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccountList omitted. -/** - * deserializeAws_restJson1AccountSources - */ -const de_AccountSources = (output: any, context: __SerdeContext): AccountSources => { - return { - account: __expectString(output.account), - eventClass: __expectString(output.eventClass), - logsStatus: output.logsStatus != null ? de_LogsStatusList(output.logsStatus, context) : undefined, - sourceType: __expectString(output.sourceType), - } as any; -}; +// de_AccountSources omitted. -/** - * deserializeAws_restJson1AccountSourcesList - */ -const de_AccountSourcesList = (output: any, context: __SerdeContext): AccountSources[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountSources(entry, context); - }); - return retVal; -}; +// de_AccountSourcesList omitted. -/** - * deserializeAws_restJson1AllDimensionsMap - */ -const de_AllDimensionsMap = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_TwoDimensionsMap(value, context); - return acc; - }, {}); -}; +// de_AllDimensionsMap omitted. -/** - * deserializeAws_restJson1AutoEnableNewRegionConfiguration - */ -const de_AutoEnableNewRegionConfiguration = ( - output: any, - context: __SerdeContext -): AutoEnableNewRegionConfiguration => { - return { - region: __expectString(output.region), - sources: output.sources != null ? de_AwsSourceTypeList(output.sources, context) : undefined, - } as any; -}; +// de_AutoEnableNewRegionConfiguration omitted. -/** - * deserializeAws_restJson1AutoEnableNewRegionConfigurationList - */ -const de_AutoEnableNewRegionConfigurationList = ( - output: any, - context: __SerdeContext -): AutoEnableNewRegionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutoEnableNewRegionConfiguration(entry, context); - }); - return retVal; -}; +// de_AutoEnableNewRegionConfigurationList omitted. -/** - * deserializeAws_restJson1AwsSourceTypeList - */ -const de_AwsSourceTypeList = (output: any, context: __SerdeContext): (AwsLogSourceType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AwsSourceTypeList omitted. /** * deserializeAws_restJson1Failures */ const de_Failures = (output: any, context: __SerdeContext): Failures => { - return { - exceptionMessage: __expectString(output.exceptionMessage), - remediation: __expectString(output.remediation), - timestamp: - output.timestamp != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.timestamp)) : undefined, - } as any; + return take(output, { + exceptionMessage: __expectString, + remediation: __expectString, + timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3511,9 +3182,6 @@ const de_Failureslist = (output: any, context: __SerdeContext): Failures[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Failures(entry, context); }); return retVal; @@ -3523,10 +3191,10 @@ const de_Failureslist = (output: any, context: __SerdeContext): Failures[] => { * deserializeAws_restJson1FailuresResponse */ const de_FailuresResponse = (output: any, context: __SerdeContext): FailuresResponse => { - return { - failures: output.failures != null ? de_Failureslist(output.failures, context) : undefined, - region: __expectString(output.region), - } as any; + return take(output, { + failures: (_: any) => de_Failureslist(_, context), + region: __expectString, + }) as any; }; /** @@ -3536,183 +3204,34 @@ const de_FailuresResponseList = (output: any, context: __SerdeContext): Failures const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FailuresResponse(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1LakeConfigurationResponse - */ -const de_LakeConfigurationResponse = (output: any, context: __SerdeContext): LakeConfigurationResponse => { - return { - encryptionKey: __expectString(output.encryptionKey), - replicationDestinationRegions: - output.replicationDestinationRegions != null - ? de_RegionSet(output.replicationDestinationRegions, context) - : undefined, - replicationRoleArn: __expectString(output.replicationRoleArn), - retentionSettings: - output.retentionSettings != null ? de_RetentionSettingList(output.retentionSettings, context) : undefined, - s3BucketArn: __expectString(output.s3BucketArn), - status: __expectString(output.status), - tagsMap: output.tagsMap != null ? de_TagsMap(output.tagsMap, context) : undefined, - updateStatus: output.updateStatus != null ? de_UpdateStatus(output.updateStatus, context) : undefined, - } as any; -}; +// de_LakeConfigurationResponse omitted. -/** - * deserializeAws_restJson1LakeConfigurationResponseMap - */ -const de_LakeConfigurationResponseMap = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [Region | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_LakeConfigurationResponse(value, context); - return acc; - }, - {} - ); -}; +// de_LakeConfigurationResponseMap omitted. -/** - * deserializeAws_restJson1LastUpdateFailure - */ -const de_LastUpdateFailure = (output: any, context: __SerdeContext): LastUpdateFailure => { - return { - code: __expectString(output.code), - reason: __expectString(output.reason), - } as any; -}; +// de_LastUpdateFailure omitted. -/** - * deserializeAws_restJson1LogsStatus - */ -const de_LogsStatus = (output: any, context: __SerdeContext): LogsStatus => { - return { - healthStatus: __expectString(output.healthStatus), - pathToLogs: __expectString(output.pathToLogs), - } as any; -}; +// de_LogsStatus omitted. -/** - * deserializeAws_restJson1LogsStatusList - */ -const de_LogsStatusList = (output: any, context: __SerdeContext): LogsStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogsStatus(entry, context); - }); - return retVal; -}; +// de_LogsStatusList omitted. -/** - * deserializeAws_restJson1ProtocolAndNotificationEndpoint - */ -const de_ProtocolAndNotificationEndpoint = (output: any, context: __SerdeContext): ProtocolAndNotificationEndpoint => { - return { - endpoint: __expectString(output.endpoint), - protocol: __expectString(output.protocol), - } as any; -}; +// de_ProtocolAndNotificationEndpoint omitted. -/** - * deserializeAws_restJson1RegionSet - */ -const de_RegionSet = (output: any, context: __SerdeContext): (Region | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RegionSet omitted. -/** - * deserializeAws_restJson1RegionSourceTypesAccountsList - */ -const de_RegionSourceTypesAccountsList = ( - output: any, - context: __SerdeContext -): Record>[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AllDimensionsMap(entry, context); - }); - return retVal; -}; +// de_RegionSourceTypesAccountsList omitted. -/** - * deserializeAws_restJson1RetentionSetting - */ -const de_RetentionSetting = (output: any, context: __SerdeContext): RetentionSetting => { - return { - retentionPeriod: __expectInt32(output.retentionPeriod), - storageClass: __expectString(output.storageClass), - } as any; -}; +// de_RetentionSetting omitted. -/** - * deserializeAws_restJson1RetentionSettingList - */ -const de_RetentionSettingList = (output: any, context: __SerdeContext): RetentionSetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RetentionSetting(entry, context); - }); - return retVal; -}; +// de_RetentionSettingList omitted. -/** - * deserializeAws_restJson1SourceType - */ -const de_SourceType = (output: any, context: __SerdeContext): SourceType => { - if (__expectString(output.awsSourceType) !== undefined) { - return { awsSourceType: __expectString(output.awsSourceType) as any }; - } - if (__expectString(output.customSourceType) !== undefined) { - return { customSourceType: __expectString(output.customSourceType) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_SourceType omitted. -/** - * deserializeAws_restJson1SourceTypeList - */ -const de_SourceTypeList = (output: any, context: __SerdeContext): SourceType[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SourceType(__expectUnion(entry), context); - }); - return retVal; -}; +// de_SourceTypeList omitted. /** * deserializeAws_restJson1SubscriberList @@ -3721,9 +3240,6 @@ const de_SubscriberList = (output: any, context: __SerdeContext): SubscriberReso const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SubscriberResource(entry, context); }); return retVal; @@ -3733,106 +3249,38 @@ const de_SubscriberList = (output: any, context: __SerdeContext): SubscriberReso * deserializeAws_restJson1SubscriberResource */ const de_SubscriberResource = (output: any, context: __SerdeContext): SubscriberResource => { - return { - accessTypes: output.accessTypes != null ? de_AccessTypeList(output.accessTypes, context) : undefined, - accountId: __expectString(output.accountId), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - externalId: __expectString(output.externalId), - resourceShareArn: __expectString(output.resourceShareArn), - resourceShareName: __expectString(output.resourceShareName), - roleArn: __expectString(output.roleArn), - s3BucketArn: __expectString(output.s3BucketArn), - snsArn: __expectString(output.snsArn), - sourceTypes: output.sourceTypes != null ? de_SourceTypeList(output.sourceTypes, context) : undefined, - subscriberDescription: __expectString(output.subscriberDescription), - subscriberName: __expectString(output.subscriberName), - subscriptionEndpoint: __expectString(output.subscriptionEndpoint), - subscriptionId: __expectString(output.subscriptionId), - subscriptionProtocol: __expectString(output.subscriptionProtocol), - subscriptionStatus: __expectString(output.subscriptionStatus), - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.updatedAt)) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1TagsMap - */ -const de_TagsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1TwoDimensionsMap - */ -const de_TwoDimensionsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ValueSet(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1UpdateStatus - */ -const de_UpdateStatus = (output: any, context: __SerdeContext): UpdateStatus => { - return { - lastUpdateFailure: - output.lastUpdateFailure != null ? de_LastUpdateFailure(output.lastUpdateFailure, context) : undefined, - lastUpdateRequestId: __expectString(output.lastUpdateRequestId), - lastUpdateStatus: __expectString(output.lastUpdateStatus), - } as any; -}; - -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ValueSet - */ -const de_ValueSet = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + accessTypes: _json, + accountId: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + externalId: __expectString, + resourceShareArn: __expectString, + resourceShareName: __expectString, + roleArn: __expectString, + s3BucketArn: __expectString, + snsArn: __expectString, + sourceTypes: _json, + subscriberDescription: __expectString, + subscriberName: __expectString, + subscriptionEndpoint: __expectString, + subscriptionId: __expectString, + subscriptionProtocol: __expectString, + subscriptionStatus: __expectString, + updatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; +}; + +// de_TagsMap omitted. + +// de_TwoDimensionsMap omitted. + +// de_UpdateStatus omitted. + +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. + +// de_ValueSet omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-serverlessapplicationrepository/src/protocols/Aws_restJson1.ts b/clients/client-serverlessapplicationrepository/src/protocols/Aws_restJson1.ts index 2636811a2329..157446e18fa7 100644 --- a/clients/client-serverlessapplicationrepository/src/protocols/Aws_restJson1.ts +++ b/clients/client-serverlessapplicationrepository/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,9 +9,10 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -61,7 +63,6 @@ import { ApplicationPolicyStatement, ApplicationSummary, BadRequestException, - Capability, ConflictException, ForbiddenException, InternalServerErrorException, @@ -90,23 +91,25 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; let body: any; - body = JSON.stringify({ - ...(input.Author != null && { author: input.Author }), - ...(input.Description != null && { description: input.Description }), - ...(input.HomePageUrl != null && { homePageUrl: input.HomePageUrl }), - ...(input.Labels != null && { labels: se___listOf__string(input.Labels, context) }), - ...(input.LicenseBody != null && { licenseBody: input.LicenseBody }), - ...(input.LicenseUrl != null && { licenseUrl: input.LicenseUrl }), - ...(input.Name != null && { name: input.Name }), - ...(input.ReadmeBody != null && { readmeBody: input.ReadmeBody }), - ...(input.ReadmeUrl != null && { readmeUrl: input.ReadmeUrl }), - ...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }), - ...(input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }), - ...(input.SourceCodeUrl != null && { sourceCodeUrl: input.SourceCodeUrl }), - ...(input.SpdxLicenseId != null && { spdxLicenseId: input.SpdxLicenseId }), - ...(input.TemplateBody != null && { templateBody: input.TemplateBody }), - ...(input.TemplateUrl != null && { templateUrl: input.TemplateUrl }), - }); + body = JSON.stringify( + take(input, { + author: [, , `Author`], + description: [, , `Description`], + homePageUrl: [, , `HomePageUrl`], + labels: [, (_) => _json(_), `Labels`], + licenseBody: [, , `LicenseBody`], + licenseUrl: [, , `LicenseUrl`], + name: [, , `Name`], + readmeBody: [, , `ReadmeBody`], + readmeUrl: [, , `ReadmeUrl`], + semanticVersion: [, , `SemanticVersion`], + sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`], + sourceCodeUrl: [, , `SourceCodeUrl`], + spdxLicenseId: [, , `SpdxLicenseId`], + templateBody: [, , `TemplateBody`], + templateUrl: [, , `TemplateUrl`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -149,12 +152,14 @@ export const se_CreateApplicationVersionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SourceCodeArchiveUrl != null && { sourceCodeArchiveUrl: input.SourceCodeArchiveUrl }), - ...(input.SourceCodeUrl != null && { sourceCodeUrl: input.SourceCodeUrl }), - ...(input.TemplateBody != null && { templateBody: input.TemplateBody }), - ...(input.TemplateUrl != null && { templateUrl: input.TemplateUrl }), - }); + body = JSON.stringify( + take(input, { + sourceCodeArchiveUrl: [, , `SourceCodeArchiveUrl`], + sourceCodeUrl: [, , `SourceCodeUrl`], + templateBody: [, , `TemplateBody`], + templateUrl: [, , `TemplateUrl`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -188,24 +193,22 @@ export const se_CreateCloudFormationChangeSetCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Capabilities != null && { capabilities: se___listOf__string(input.Capabilities, context) }), - ...(input.ChangeSetName != null && { changeSetName: input.ChangeSetName }), - ...(input.ClientToken != null && { clientToken: input.ClientToken }), - ...(input.Description != null && { description: input.Description }), - ...(input.NotificationArns != null && { notificationArns: se___listOf__string(input.NotificationArns, context) }), - ...(input.ParameterOverrides != null && { - parameterOverrides: se___listOfParameterValue(input.ParameterOverrides, context), - }), - ...(input.ResourceTypes != null && { resourceTypes: se___listOf__string(input.ResourceTypes, context) }), - ...(input.RollbackConfiguration != null && { - rollbackConfiguration: se_RollbackConfiguration(input.RollbackConfiguration, context), - }), - ...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }), - ...(input.StackName != null && { stackName: input.StackName }), - ...(input.Tags != null && { tags: se___listOfTag(input.Tags, context) }), - ...(input.TemplateId != null && { templateId: input.TemplateId }), - }); + body = JSON.stringify( + take(input, { + capabilities: [, (_) => _json(_), `Capabilities`], + changeSetName: [, , `ChangeSetName`], + clientToken: [, , `ClientToken`], + description: [, , `Description`], + notificationArns: [, (_) => _json(_), `NotificationArns`], + parameterOverrides: [, (_) => se___listOfParameterValue(_, context), `ParameterOverrides`], + resourceTypes: [, (_) => _json(_), `ResourceTypes`], + rollbackConfiguration: [, (_) => se_RollbackConfiguration(_, context), `RollbackConfiguration`], + semanticVersion: [, , `SemanticVersion`], + stackName: [, , `StackName`], + tags: [, (_) => se___listOfTag(_, context), `Tags`], + templateId: [, , `TemplateId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -239,9 +242,11 @@ export const se_CreateCloudFormationTemplateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SemanticVersion != null && { semanticVersion: input.SemanticVersion }), - }); + body = JSON.stringify( + take(input, { + semanticVersion: [, , `SemanticVersion`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -506,9 +511,11 @@ export const se_PutApplicationPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Statements != null && { statements: se___listOfApplicationPolicyStatement(input.Statements, context) }), - }); + body = JSON.stringify( + take(input, { + statements: [, (_) => se___listOfApplicationPolicyStatement(_, context), `Statements`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -542,9 +549,11 @@ export const se_UnshareApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.OrganizationId != null && { organizationId: input.OrganizationId }), - }); + body = JSON.stringify( + take(input, { + organizationId: [, , `OrganizationId`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -578,14 +587,16 @@ export const se_UpdateApplicationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Author != null && { author: input.Author }), - ...(input.Description != null && { description: input.Description }), - ...(input.HomePageUrl != null && { homePageUrl: input.HomePageUrl }), - ...(input.Labels != null && { labels: se___listOf__string(input.Labels, context) }), - ...(input.ReadmeBody != null && { readmeBody: input.ReadmeBody }), - ...(input.ReadmeUrl != null && { readmeUrl: input.ReadmeUrl }), - }); + body = JSON.stringify( + take(input, { + author: [, , `Author`], + description: [, , `Description`], + homePageUrl: [, , `HomePageUrl`], + labels: [, (_) => _json(_), `Labels`], + readmeBody: [, , `ReadmeBody`], + readmeUrl: [, , `ReadmeUrl`], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -611,45 +622,22 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.author != null) { - contents.Author = __expectString(data.author); - } - if (data.creationTime != null) { - contents.CreationTime = __expectString(data.creationTime); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.homePageUrl != null) { - contents.HomePageUrl = __expectString(data.homePageUrl); - } - if (data.isVerifiedAuthor != null) { - contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor); - } - if (data.labels != null) { - contents.Labels = de___listOf__string(data.labels, context); - } - if (data.licenseUrl != null) { - contents.LicenseUrl = __expectString(data.licenseUrl); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.readmeUrl != null) { - contents.ReadmeUrl = __expectString(data.readmeUrl); - } - if (data.spdxLicenseId != null) { - contents.SpdxLicenseId = __expectString(data.spdxLicenseId); - } - if (data.verifiedAuthorUrl != null) { - contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl); - } - if (data.version != null) { - contents.Version = de_Version(data.version, context); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + Author: [, __expectString, `author`], + CreationTime: [, __expectString, `creationTime`], + Description: [, __expectString, `description`], + HomePageUrl: [, __expectString, `homePageUrl`], + IsVerifiedAuthor: [, __expectBoolean, `isVerifiedAuthor`], + Labels: [, _json, `labels`], + LicenseUrl: [, __expectString, `licenseUrl`], + Name: [, __expectString, `name`], + ReadmeUrl: [, __expectString, `readmeUrl`], + SpdxLicenseId: [, __expectString, `spdxLicenseId`], + VerifiedAuthorUrl: [, __expectString, `verifiedAuthorUrl`], + Version: [, (_) => de_Version(_, context), `version`], + }); + Object.assign(contents, doc); return contents; }; @@ -683,10 +671,9 @@ const de_CreateApplicationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -706,33 +693,18 @@ export const de_CreateApplicationVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.creationTime != null) { - contents.CreationTime = __expectString(data.creationTime); - } - if (data.parameterDefinitions != null) { - contents.ParameterDefinitions = de___listOfParameterDefinition(data.parameterDefinitions, context); - } - if (data.requiredCapabilities != null) { - contents.RequiredCapabilities = de___listOfCapability(data.requiredCapabilities, context); - } - if (data.resourcesSupported != null) { - contents.ResourcesSupported = __expectBoolean(data.resourcesSupported); - } - if (data.semanticVersion != null) { - contents.SemanticVersion = __expectString(data.semanticVersion); - } - if (data.sourceCodeArchiveUrl != null) { - contents.SourceCodeArchiveUrl = __expectString(data.sourceCodeArchiveUrl); - } - if (data.sourceCodeUrl != null) { - contents.SourceCodeUrl = __expectString(data.sourceCodeUrl); - } - if (data.templateUrl != null) { - contents.TemplateUrl = __expectString(data.templateUrl); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + CreationTime: [, __expectString, `creationTime`], + ParameterDefinitions: [, (_) => de___listOfParameterDefinition(_, context), `parameterDefinitions`], + RequiredCapabilities: [, _json, `requiredCapabilities`], + ResourcesSupported: [, __expectBoolean, `resourcesSupported`], + SemanticVersion: [, __expectString, `semanticVersion`], + SourceCodeArchiveUrl: [, __expectString, `sourceCodeArchiveUrl`], + SourceCodeUrl: [, __expectString, `sourceCodeUrl`], + TemplateUrl: [, __expectString, `templateUrl`], + }); + Object.assign(contents, doc); return contents; }; @@ -766,10 +738,9 @@ const de_CreateApplicationVersionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -789,18 +760,13 @@ export const de_CreateCloudFormationChangeSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.changeSetId != null) { - contents.ChangeSetId = __expectString(data.changeSetId); - } - if (data.semanticVersion != null) { - contents.SemanticVersion = __expectString(data.semanticVersion); - } - if (data.stackId != null) { - contents.StackId = __expectString(data.stackId); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + ChangeSetId: [, __expectString, `changeSetId`], + SemanticVersion: [, __expectString, `semanticVersion`], + StackId: [, __expectString, `stackId`], + }); + Object.assign(contents, doc); return contents; }; @@ -831,10 +797,9 @@ const de_CreateCloudFormationChangeSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -854,27 +819,16 @@ export const de_CreateCloudFormationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.creationTime != null) { - contents.CreationTime = __expectString(data.creationTime); - } - if (data.expirationTime != null) { - contents.ExpirationTime = __expectString(data.expirationTime); - } - if (data.semanticVersion != null) { - contents.SemanticVersion = __expectString(data.semanticVersion); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.templateId != null) { - contents.TemplateId = __expectString(data.templateId); - } - if (data.templateUrl != null) { - contents.TemplateUrl = __expectString(data.templateUrl); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + CreationTime: [, __expectString, `creationTime`], + ExpirationTime: [, __expectString, `expirationTime`], + SemanticVersion: [, __expectString, `semanticVersion`], + Status: [, __expectString, `status`], + TemplateId: [, __expectString, `templateId`], + TemplateUrl: [, __expectString, `templateUrl`], + }); + Object.assign(contents, doc); return contents; }; @@ -908,10 +862,9 @@ const de_CreateCloudFormationTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -967,10 +920,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -990,45 +942,22 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.author != null) { - contents.Author = __expectString(data.author); - } - if (data.creationTime != null) { - contents.CreationTime = __expectString(data.creationTime); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.homePageUrl != null) { - contents.HomePageUrl = __expectString(data.homePageUrl); - } - if (data.isVerifiedAuthor != null) { - contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor); - } - if (data.labels != null) { - contents.Labels = de___listOf__string(data.labels, context); - } - if (data.licenseUrl != null) { - contents.LicenseUrl = __expectString(data.licenseUrl); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.readmeUrl != null) { - contents.ReadmeUrl = __expectString(data.readmeUrl); - } - if (data.spdxLicenseId != null) { - contents.SpdxLicenseId = __expectString(data.spdxLicenseId); - } - if (data.verifiedAuthorUrl != null) { - contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl); - } - if (data.version != null) { - contents.Version = de_Version(data.version, context); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + Author: [, __expectString, `author`], + CreationTime: [, __expectString, `creationTime`], + Description: [, __expectString, `description`], + HomePageUrl: [, __expectString, `homePageUrl`], + IsVerifiedAuthor: [, __expectBoolean, `isVerifiedAuthor`], + Labels: [, _json, `labels`], + LicenseUrl: [, __expectString, `licenseUrl`], + Name: [, __expectString, `name`], + ReadmeUrl: [, __expectString, `readmeUrl`], + SpdxLicenseId: [, __expectString, `spdxLicenseId`], + VerifiedAuthorUrl: [, __expectString, `verifiedAuthorUrl`], + Version: [, (_) => de_Version(_, context), `version`], + }); + Object.assign(contents, doc); return contents; }; @@ -1062,10 +991,9 @@ const de_GetApplicationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1085,9 +1013,10 @@ export const de_GetApplicationPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.statements != null) { - contents.Statements = de___listOfApplicationPolicyStatement(data.statements, context); - } + const doc = take(data, { + Statements: [, (_) => de___listOfApplicationPolicyStatement(_, context), `statements`], + }); + Object.assign(contents, doc); return contents; }; @@ -1121,10 +1050,9 @@ const de_GetApplicationPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1144,27 +1072,16 @@ export const de_GetCloudFormationTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.creationTime != null) { - contents.CreationTime = __expectString(data.creationTime); - } - if (data.expirationTime != null) { - contents.ExpirationTime = __expectString(data.expirationTime); - } - if (data.semanticVersion != null) { - contents.SemanticVersion = __expectString(data.semanticVersion); - } - if (data.status != null) { - contents.Status = __expectString(data.status); - } - if (data.templateId != null) { - contents.TemplateId = __expectString(data.templateId); - } - if (data.templateUrl != null) { - contents.TemplateUrl = __expectString(data.templateUrl); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + CreationTime: [, __expectString, `creationTime`], + ExpirationTime: [, __expectString, `expirationTime`], + SemanticVersion: [, __expectString, `semanticVersion`], + Status: [, __expectString, `status`], + TemplateId: [, __expectString, `templateId`], + TemplateUrl: [, __expectString, `templateUrl`], + }); + Object.assign(contents, doc); return contents; }; @@ -1198,10 +1115,9 @@ const de_GetCloudFormationTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1221,12 +1137,11 @@ export const de_ListApplicationDependenciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dependencies != null) { - contents.Dependencies = de___listOfApplicationDependencySummary(data.dependencies, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Dependencies: [, (_) => de___listOfApplicationDependencySummary(_, context), `dependencies`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1260,10 +1175,9 @@ const de_ListApplicationDependenciesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1283,12 +1197,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applications != null) { - contents.Applications = de___listOfApplicationSummary(data.applications, context); - } - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } + const doc = take(data, { + Applications: [, (_) => de___listOfApplicationSummary(_, context), `applications`], + NextToken: [, __expectString, `nextToken`], + }); + Object.assign(contents, doc); return contents; }; @@ -1319,10 +1232,9 @@ const de_ListApplicationsCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1342,12 +1254,11 @@ export const de_ListApplicationVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.NextToken = __expectString(data.nextToken); - } - if (data.versions != null) { - contents.Versions = de___listOfVersionSummary(data.versions, context); - } + const doc = take(data, { + NextToken: [, __expectString, `nextToken`], + Versions: [, (_) => de___listOfVersionSummary(_, context), `versions`], + }); + Object.assign(contents, doc); return contents; }; @@ -1381,10 +1292,9 @@ const de_ListApplicationVersionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1404,9 +1314,10 @@ export const de_PutApplicationPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.statements != null) { - contents.Statements = de___listOfApplicationPolicyStatement(data.statements, context); - } + const doc = take(data, { + Statements: [, (_) => de___listOfApplicationPolicyStatement(_, context), `statements`], + }); + Object.assign(contents, doc); return contents; }; @@ -1440,10 +1351,9 @@ const de_PutApplicationPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1496,10 +1406,9 @@ const de_UnshareApplicationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1519,45 +1428,22 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationId != null) { - contents.ApplicationId = __expectString(data.applicationId); - } - if (data.author != null) { - contents.Author = __expectString(data.author); - } - if (data.creationTime != null) { - contents.CreationTime = __expectString(data.creationTime); - } - if (data.description != null) { - contents.Description = __expectString(data.description); - } - if (data.homePageUrl != null) { - contents.HomePageUrl = __expectString(data.homePageUrl); - } - if (data.isVerifiedAuthor != null) { - contents.IsVerifiedAuthor = __expectBoolean(data.isVerifiedAuthor); - } - if (data.labels != null) { - contents.Labels = de___listOf__string(data.labels, context); - } - if (data.licenseUrl != null) { - contents.LicenseUrl = __expectString(data.licenseUrl); - } - if (data.name != null) { - contents.Name = __expectString(data.name); - } - if (data.readmeUrl != null) { - contents.ReadmeUrl = __expectString(data.readmeUrl); - } - if (data.spdxLicenseId != null) { - contents.SpdxLicenseId = __expectString(data.spdxLicenseId); - } - if (data.verifiedAuthorUrl != null) { - contents.VerifiedAuthorUrl = __expectString(data.verifiedAuthorUrl); - } - if (data.version != null) { - contents.Version = de_Version(data.version, context); - } + const doc = take(data, { + ApplicationId: [, __expectString, `applicationId`], + Author: [, __expectString, `author`], + CreationTime: [, __expectString, `creationTime`], + Description: [, __expectString, `description`], + HomePageUrl: [, __expectString, `homePageUrl`], + IsVerifiedAuthor: [, __expectBoolean, `isVerifiedAuthor`], + Labels: [, _json, `labels`], + LicenseUrl: [, __expectString, `licenseUrl`], + Name: [, __expectString, `name`], + ReadmeUrl: [, __expectString, `readmeUrl`], + SpdxLicenseId: [, __expectString, `spdxLicenseId`], + VerifiedAuthorUrl: [, __expectString, `verifiedAuthorUrl`], + Version: [, (_) => de_Version(_, context), `version`], + }); + Object.assign(contents, doc); return contents; }; @@ -1594,28 +1480,26 @@ const de_UpdateApplicationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.ErrorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorCode: [, __expectString, `errorCode`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1629,12 +1513,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.ErrorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorCode: [, __expectString, `errorCode`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1648,12 +1531,11 @@ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContex const de_ForbiddenExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.ErrorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorCode: [, __expectString, `errorCode`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new ForbiddenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1670,12 +1552,11 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.ErrorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorCode: [, __expectString, `errorCode`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1689,12 +1570,11 @@ const de_InternalServerErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.ErrorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorCode: [, __expectString, `errorCode`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1711,12 +1591,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.errorCode != null) { - contents.ErrorCode = __expectString(data.errorCode); - } - if (data.message != null) { - contents.Message = __expectString(data.message); - } + const doc = take(data, { + ErrorCode: [, __expectString, `errorCode`], + Message: [, __expectString, `message`], + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1724,16 +1603,7 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1__listOf__string - */ -const se___listOf__string = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se___listOf__string omitted. /** * serializeAws_restJson1__listOfApplicationPolicyStatement @@ -1783,70 +1653,55 @@ const se___listOfTag = (input: Tag[], context: __SerdeContext): any => { * serializeAws_restJson1ApplicationPolicyStatement */ const se_ApplicationPolicyStatement = (input: ApplicationPolicyStatement, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { actions: se___listOf__string(input.Actions, context) }), - ...(input.PrincipalOrgIDs != null && { principalOrgIDs: se___listOf__string(input.PrincipalOrgIDs, context) }), - ...(input.Principals != null && { principals: se___listOf__string(input.Principals, context) }), - ...(input.StatementId != null && { statementId: input.StatementId }), - }; + return take(input, { + actions: [, _json, `Actions`], + principalOrgIDs: [, _json, `PrincipalOrgIDs`], + principals: [, _json, `Principals`], + statementId: [, , `StatementId`], + }); }; /** * serializeAws_restJson1ParameterValue */ const se_ParameterValue = (input: ParameterValue, context: __SerdeContext): any => { - return { - ...(input.Name != null && { name: input.Name }), - ...(input.Value != null && { value: input.Value }), - }; + return take(input, { + name: [, , `Name`], + value: [, , `Value`], + }); }; /** * serializeAws_restJson1RollbackConfiguration */ const se_RollbackConfiguration = (input: RollbackConfiguration, context: __SerdeContext): any => { - return { - ...(input.MonitoringTimeInMinutes != null && { monitoringTimeInMinutes: input.MonitoringTimeInMinutes }), - ...(input.RollbackTriggers != null && { - rollbackTriggers: se___listOfRollbackTrigger(input.RollbackTriggers, context), - }), - }; + return take(input, { + monitoringTimeInMinutes: [, , `MonitoringTimeInMinutes`], + rollbackTriggers: [, (_) => se___listOfRollbackTrigger(_, context), `RollbackTriggers`], + }); }; /** * serializeAws_restJson1RollbackTrigger */ const se_RollbackTrigger = (input: RollbackTrigger, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { arn: input.Arn }), - ...(input.Type != null && { type: input.Type }), - }; + return take(input, { + arn: [, , `Arn`], + type: [, , `Type`], + }); }; /** * serializeAws_restJson1Tag */ const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { key: input.Key }), - ...(input.Value != null && { value: input.Value }), - }; + return take(input, { + key: [, , `Key`], + value: [, , `Value`], + }); }; -/** - * deserializeAws_restJson1__listOf__string - */ -const de___listOf__string = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOf__string omitted. /** * deserializeAws_restJson1__listOfApplicationDependencySummary @@ -1858,9 +1713,6 @@ const de___listOfApplicationDependencySummary = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationDependencySummary(entry, context); }); return retVal; @@ -1873,9 +1725,6 @@ const de___listOfApplicationPolicyStatement = (output: any, context: __SerdeCont const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationPolicyStatement(entry, context); }); return retVal; @@ -1888,28 +1737,12 @@ const de___listOfApplicationSummary = (output: any, context: __SerdeContext): Ap const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1__listOfCapability - */ -const de___listOfCapability = (output: any, context: __SerdeContext): (Capability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de___listOfCapability omitted. /** * deserializeAws_restJson1__listOfParameterDefinition @@ -1918,9 +1751,6 @@ const de___listOfParameterDefinition = (output: any, context: __SerdeContext): P const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ParameterDefinition(entry, context); }); return retVal; @@ -1933,9 +1763,6 @@ const de___listOfVersionSummary = (output: any, context: __SerdeContext): Versio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VersionSummary(entry, context); }); return retVal; @@ -1945,93 +1772,88 @@ const de___listOfVersionSummary = (output: any, context: __SerdeContext): Versio * deserializeAws_restJson1ApplicationDependencySummary */ const de_ApplicationDependencySummary = (output: any, context: __SerdeContext): ApplicationDependencySummary => { - return { - ApplicationId: __expectString(output.applicationId), - SemanticVersion: __expectString(output.semanticVersion), - } as any; + return take(output, { + ApplicationId: [, __expectString, `applicationId`], + SemanticVersion: [, __expectString, `semanticVersion`], + }) as any; }; /** * deserializeAws_restJson1ApplicationPolicyStatement */ const de_ApplicationPolicyStatement = (output: any, context: __SerdeContext): ApplicationPolicyStatement => { - return { - Actions: output.actions != null ? de___listOf__string(output.actions, context) : undefined, - PrincipalOrgIDs: output.principalOrgIDs != null ? de___listOf__string(output.principalOrgIDs, context) : undefined, - Principals: output.principals != null ? de___listOf__string(output.principals, context) : undefined, - StatementId: __expectString(output.statementId), - } as any; + return take(output, { + Actions: [, _json, `actions`], + PrincipalOrgIDs: [, _json, `principalOrgIDs`], + Principals: [, _json, `principals`], + StatementId: [, __expectString, `statementId`], + }) as any; }; /** * deserializeAws_restJson1ApplicationSummary */ const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - ApplicationId: __expectString(output.applicationId), - Author: __expectString(output.author), - CreationTime: __expectString(output.creationTime), - Description: __expectString(output.description), - HomePageUrl: __expectString(output.homePageUrl), - Labels: output.labels != null ? de___listOf__string(output.labels, context) : undefined, - Name: __expectString(output.name), - SpdxLicenseId: __expectString(output.spdxLicenseId), - } as any; + return take(output, { + ApplicationId: [, __expectString, `applicationId`], + Author: [, __expectString, `author`], + CreationTime: [, __expectString, `creationTime`], + Description: [, __expectString, `description`], + HomePageUrl: [, __expectString, `homePageUrl`], + Labels: [, _json, `labels`], + Name: [, __expectString, `name`], + SpdxLicenseId: [, __expectString, `spdxLicenseId`], + }) as any; }; /** * deserializeAws_restJson1ParameterDefinition */ const de_ParameterDefinition = (output: any, context: __SerdeContext): ParameterDefinition => { - return { - AllowedPattern: __expectString(output.allowedPattern), - AllowedValues: output.allowedValues != null ? de___listOf__string(output.allowedValues, context) : undefined, - ConstraintDescription: __expectString(output.constraintDescription), - DefaultValue: __expectString(output.defaultValue), - Description: __expectString(output.description), - MaxLength: __expectInt32(output.maxLength), - MaxValue: __expectInt32(output.maxValue), - MinLength: __expectInt32(output.minLength), - MinValue: __expectInt32(output.minValue), - Name: __expectString(output.name), - NoEcho: __expectBoolean(output.noEcho), - ReferencedByResources: - output.referencedByResources != null ? de___listOf__string(output.referencedByResources, context) : undefined, - Type: __expectString(output.type), - } as any; + return take(output, { + AllowedPattern: [, __expectString, `allowedPattern`], + AllowedValues: [, _json, `allowedValues`], + ConstraintDescription: [, __expectString, `constraintDescription`], + DefaultValue: [, __expectString, `defaultValue`], + Description: [, __expectString, `description`], + MaxLength: [, __expectInt32, `maxLength`], + MaxValue: [, __expectInt32, `maxValue`], + MinLength: [, __expectInt32, `minLength`], + MinValue: [, __expectInt32, `minValue`], + Name: [, __expectString, `name`], + NoEcho: [, __expectBoolean, `noEcho`], + ReferencedByResources: [, _json, `referencedByResources`], + Type: [, __expectString, `type`], + }) as any; }; /** * deserializeAws_restJson1Version */ const de_Version = (output: any, context: __SerdeContext): Version => { - return { - ApplicationId: __expectString(output.applicationId), - CreationTime: __expectString(output.creationTime), - ParameterDefinitions: - output.parameterDefinitions != null - ? de___listOfParameterDefinition(output.parameterDefinitions, context) - : undefined, - RequiredCapabilities: - output.requiredCapabilities != null ? de___listOfCapability(output.requiredCapabilities, context) : undefined, - ResourcesSupported: __expectBoolean(output.resourcesSupported), - SemanticVersion: __expectString(output.semanticVersion), - SourceCodeArchiveUrl: __expectString(output.sourceCodeArchiveUrl), - SourceCodeUrl: __expectString(output.sourceCodeUrl), - TemplateUrl: __expectString(output.templateUrl), - } as any; + return take(output, { + ApplicationId: [, __expectString, `applicationId`], + CreationTime: [, __expectString, `creationTime`], + ParameterDefinitions: (_) => [, de___listOfParameterDefinition(_, context), `parameterDefinitions`], + RequiredCapabilities: [, _json, `requiredCapabilities`], + ResourcesSupported: [, __expectBoolean, `resourcesSupported`], + SemanticVersion: [, __expectString, `semanticVersion`], + SourceCodeArchiveUrl: [, __expectString, `sourceCodeArchiveUrl`], + SourceCodeUrl: [, __expectString, `sourceCodeUrl`], + TemplateUrl: [, __expectString, `templateUrl`], + }) as any; }; /** * deserializeAws_restJson1VersionSummary */ const de_VersionSummary = (output: any, context: __SerdeContext): VersionSummary => { - return { - ApplicationId: __expectString(output.applicationId), - CreationTime: __expectString(output.creationTime), - SemanticVersion: __expectString(output.semanticVersion), - SourceCodeUrl: __expectString(output.sourceCodeUrl), - } as any; + return take(output, { + ApplicationId: [, __expectString, `applicationId`], + CreationTime: [, __expectString, `creationTime`], + SemanticVersion: [, __expectString, `semanticVersion`], + SourceCodeUrl: [, __expectString, `sourceCodeUrl`], + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-service-catalog-appregistry/src/protocols/Aws_restJson1.ts b/clients/client-service-catalog-appregistry/src/protocols/Aws_restJson1.ts index b701bda764fe..9305410d135c 100644 --- a/clients/client-service-catalog-appregistry/src/protocols/Aws_restJson1.ts +++ b/clients/client-service-catalog-appregistry/src/protocols/Aws_restJson1.ts @@ -1,16 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -84,16 +86,10 @@ import { ApplicationSummary, AppRegistryConfiguration, AttributeGroup, - AttributeGroupDetails, AttributeGroupSummary, ConflictException, - Integrations, InternalServerException, Resource, - ResourceDetails, - ResourceGroup, - ResourceInfo, - ResourceIntegrations, ResourceNotFoundException, ServiceQuotaExceededException, TagQueryConfiguration, @@ -182,12 +178,14 @@ export const se_CreateApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -212,13 +210,15 @@ export const se_CreateAttributeGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attribute-groups"; let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: input.attributes }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + attributes: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -645,9 +645,11 @@ export const se_PutConfigurationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/configuration"; let body: any; - body = JSON.stringify({ - ...(input.configuration != null && { configuration: se_AppRegistryConfiguration(input.configuration, context) }), - }); + body = JSON.stringify( + take(input, { + configuration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -705,9 +707,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -764,10 +768,12 @@ export const se_UpdateApplicationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{application}"; resolvedPath = __resolvedPath(resolvedPath, input, "application", () => input.application!, "{application}", false); let body: any; - body = JSON.stringify({ - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -801,11 +807,13 @@ export const se_UpdateAttributeGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.attributes != null && { attributes: input.attributes }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - }); + body = JSON.stringify( + take(input, { + attributes: [], + description: [], + name: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -831,12 +839,11 @@ export const de_AssociateAttributeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.attributeGroupArn != null) { - contents.attributeGroupArn = __expectString(data.attributeGroupArn); - } + const doc = take(data, { + applicationArn: __expectString, + attributeGroupArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -870,10 +877,9 @@ const de_AssociateAttributeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -893,12 +899,11 @@ export const de_AssociateResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } + const doc = take(data, { + applicationArn: __expectString, + resourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -935,10 +940,9 @@ const de_AssociateResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -958,9 +962,10 @@ export const de_CreateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.application != null) { - contents.application = de_Application(data.application, context); - } + const doc = take(data, { + application: (_) => de_Application(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -994,10 +999,9 @@ const de_CreateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1017,9 +1021,10 @@ export const de_CreateAttributeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributeGroup != null) { - contents.attributeGroup = de_AttributeGroup(data.attributeGroup, context); - } + const doc = take(data, { + attributeGroup: (_) => de_AttributeGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1050,10 +1055,9 @@ const de_CreateAttributeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1073,9 +1077,10 @@ export const de_DeleteApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.application != null) { - contents.application = de_ApplicationSummary(data.application, context); - } + const doc = take(data, { + application: (_) => de_ApplicationSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1103,10 +1108,9 @@ const de_DeleteApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1126,9 +1130,10 @@ export const de_DeleteAttributeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributeGroup != null) { - contents.attributeGroup = de_AttributeGroupSummary(data.attributeGroup, context); - } + const doc = take(data, { + attributeGroup: (_) => de_AttributeGroupSummary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1156,10 +1161,9 @@ const de_DeleteAttributeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1179,12 +1183,11 @@ export const de_DisassociateAttributeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.attributeGroupArn != null) { - contents.attributeGroupArn = __expectString(data.attributeGroupArn); - } + const doc = take(data, { + applicationArn: __expectString, + attributeGroupArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1212,10 +1215,9 @@ const de_DisassociateAttributeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1235,12 +1237,11 @@ export const de_DisassociateResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } + const doc = take(data, { + applicationArn: __expectString, + resourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1271,10 +1272,9 @@ const de_DisassociateResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1294,33 +1294,18 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.associatedResourceCount != null) { - contents.associatedResourceCount = __expectInt32(data.associatedResourceCount); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.integrations != null) { - contents.integrations = de_Integrations(data.integrations, context); - } - if (data.lastUpdateTime != null) { - contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdateTime)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + associatedResourceCount: __expectInt32, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + integrations: _json, + lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1351,10 +1336,9 @@ const de_GetApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1374,9 +1358,10 @@ export const de_GetAssociatedResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.resource != null) { - contents.resource = de_Resource(data.resource, context); - } + const doc = take(data, { + resource: (_) => de_Resource(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1404,10 +1389,9 @@ const de_GetAssociatedResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1427,33 +1411,18 @@ export const de_GetAttributeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.attributes != null) { - contents.attributes = __expectString(data.attributes); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.creationTime != null) { - contents.creationTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.creationTime)); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdateTime != null) { - contents.lastUpdateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdateTime)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + attributes: __expectString, + createdBy: __expectString, + creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + lastUpdateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1484,10 +1453,9 @@ const de_GetAttributeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1507,9 +1475,10 @@ export const de_GetConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.configuration != null) { - contents.configuration = de_AppRegistryConfiguration(data.configuration, context); - } + const doc = take(data, { + configuration: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1531,10 +1500,9 @@ const de_GetConfigurationCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1554,12 +1522,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.applications != null) { - contents.applications = de_ApplicationSummaries(data.applications, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + applications: (_) => de_ApplicationSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1584,10 +1551,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1607,12 +1573,11 @@ export const de_ListAssociatedAttributeGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributeGroups != null) { - contents.attributeGroups = de_AttributeGroupIds(data.attributeGroups, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + attributeGroups: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1640,10 +1605,9 @@ const de_ListAssociatedAttributeGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1663,12 +1627,11 @@ export const de_ListAssociatedResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resources != null) { - contents.resources = de_Resources(data.resources, context); - } + const doc = take(data, { + nextToken: __expectString, + resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1696,10 +1659,9 @@ const de_ListAssociatedResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1719,12 +1681,11 @@ export const de_ListAttributeGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributeGroups != null) { - contents.attributeGroups = de_AttributeGroupSummaries(data.attributeGroups, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + attributeGroups: (_) => de_AttributeGroupSummaries(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1749,10 +1710,9 @@ const de_ListAttributeGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1772,12 +1732,11 @@ export const de_ListAttributeGroupsForApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributeGroupsDetails != null) { - contents.attributeGroupsDetails = de_AttributeGroupDetailsList(data.attributeGroupsDetails, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + attributeGroupsDetails: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1805,10 +1764,9 @@ const de_ListAttributeGroupsForApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1828,9 +1786,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1858,10 +1817,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1908,10 +1866,9 @@ const de_PutConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1931,15 +1888,12 @@ export const de_SyncResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actionTaken != null) { - contents.actionTaken = __expectString(data.actionTaken); - } - if (data.applicationArn != null) { - contents.applicationArn = __expectString(data.applicationArn); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } + const doc = take(data, { + actionTaken: __expectString, + applicationArn: __expectString, + resourceArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1973,10 +1927,9 @@ const de_SyncResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,10 +1976,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2073,10 +2025,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2096,9 +2047,10 @@ export const de_UpdateApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.application != null) { - contents.application = de_Application(data.application, context); - } + const doc = take(data, { + application: (_) => de_Application(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2132,10 +2084,9 @@ const de_UpdateApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2155,9 +2106,10 @@ export const de_UpdateAttributeGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.attributeGroup != null) { - contents.attributeGroup = de_AttributeGroup(data.attributeGroup, context); - } + const doc = take(data, { + attributeGroup: (_) => de_AttributeGroup(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2188,25 +2140,25 @@ const de_UpdateAttributeGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2223,9 +2175,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2242,9 +2195,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2261,9 +2215,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2277,12 +2232,11 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2296,9 +2250,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2306,56 +2261,25 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AppRegistryConfiguration - */ -const se_AppRegistryConfiguration = (input: AppRegistryConfiguration, context: __SerdeContext): any => { - return { - ...(input.tagQueryConfiguration != null && { - tagQueryConfiguration: se_TagQueryConfiguration(input.tagQueryConfiguration, context), - }), - }; -}; +// se_AppRegistryConfiguration omitted. -/** - * serializeAws_restJson1TagQueryConfiguration - */ -const se_TagQueryConfiguration = (input: TagQueryConfiguration, context: __SerdeContext): any => { - return { - ...(input.tagKey != null && { tagKey: input.tagKey }), - }; -}; +// se_TagQueryConfiguration omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. /** * deserializeAws_restJson1Application */ const de_Application = (output: any, context: __SerdeContext): Application => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdateTime)) - : undefined, - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + tags: _json, + }) as any; }; /** @@ -2365,9 +2289,6 @@ const de_ApplicationSummaries = (output: any, context: __SerdeContext): Applicat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ApplicationSummary(entry, context); }); return retVal; @@ -2377,92 +2298,38 @@ const de_ApplicationSummaries = (output: any, context: __SerdeContext): Applicat * deserializeAws_restJson1ApplicationSummary */ const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdateTime)) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1AppRegistryConfiguration - */ -const de_AppRegistryConfiguration = (output: any, context: __SerdeContext): AppRegistryConfiguration => { - return { - tagQueryConfiguration: - output.tagQueryConfiguration != null - ? de_TagQueryConfiguration(output.tagQueryConfiguration, context) - : undefined, - } as any; -}; +// de_AppRegistryConfiguration omitted. /** * deserializeAws_restJson1AttributeGroup */ const de_AttributeGroup = (output: any, context: __SerdeContext): AttributeGroup => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdateTime)) - : undefined, - name: __expectString(output.name), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1AttributeGroupDetails - */ -const de_AttributeGroupDetails = (output: any, context: __SerdeContext): AttributeGroupDetails => { - return { - arn: __expectString(output.arn), - createdBy: __expectString(output.createdBy), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_AttributeGroupDetails omitted. -/** - * deserializeAws_restJson1AttributeGroupDetailsList - */ -const de_AttributeGroupDetailsList = (output: any, context: __SerdeContext): AttributeGroupDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttributeGroupDetails(entry, context); - }); - return retVal; -}; +// de_AttributeGroupDetailsList omitted. -/** - * deserializeAws_restJson1AttributeGroupIds - */ -const de_AttributeGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AttributeGroupIds omitted. /** * deserializeAws_restJson1AttributeGroupSummaries @@ -2471,9 +2338,6 @@ const de_AttributeGroupSummaries = (output: any, context: __SerdeContext): Attri const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AttributeGroupSummary(entry, context); }); return retVal; @@ -2483,122 +2347,44 @@ const de_AttributeGroupSummaries = (output: any, context: __SerdeContext): Attri * deserializeAws_restJson1AttributeGroupSummary */ const de_AttributeGroupSummary = (output: any, context: __SerdeContext): AttributeGroupSummary => { - return { - arn: __expectString(output.arn), - createdBy: __expectString(output.createdBy), - creationTime: - output.creationTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.creationTime)) : undefined, - description: __expectString(output.description), - id: __expectString(output.id), - lastUpdateTime: - output.lastUpdateTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdateTime)) - : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + createdBy: __expectString, + creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + description: __expectString, + id: __expectString, + lastUpdateTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Integrations - */ -const de_Integrations = (output: any, context: __SerdeContext): Integrations => { - return { - resourceGroup: output.resourceGroup != null ? de_ResourceGroup(output.resourceGroup, context) : undefined, - } as any; -}; +// de_Integrations omitted. /** * deserializeAws_restJson1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - arn: __expectString(output.arn), - associationTime: - output.associationTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.associationTime)) - : undefined, - integrations: output.integrations != null ? de_ResourceIntegrations(output.integrations, context) : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + arn: __expectString, + associationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + integrations: _json, + name: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ResourceDetails - */ -const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetails => { - return { - tagValue: __expectString(output.tagValue), - } as any; -}; +// de_ResourceDetails omitted. -/** - * deserializeAws_restJson1ResourceGroup - */ -const de_ResourceGroup = (output: any, context: __SerdeContext): ResourceGroup => { - return { - arn: __expectString(output.arn), - errorMessage: __expectString(output.errorMessage), - state: __expectString(output.state), - } as any; -}; +// de_ResourceGroup omitted. -/** - * deserializeAws_restJson1ResourceInfo - */ -const de_ResourceInfo = (output: any, context: __SerdeContext): ResourceInfo => { - return { - arn: __expectString(output.arn), - name: __expectString(output.name), - resourceDetails: output.resourceDetails != null ? de_ResourceDetails(output.resourceDetails, context) : undefined, - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ResourceInfo omitted. -/** - * deserializeAws_restJson1ResourceIntegrations - */ -const de_ResourceIntegrations = (output: any, context: __SerdeContext): ResourceIntegrations => { - return { - resourceGroup: output.resourceGroup != null ? de_ResourceGroup(output.resourceGroup, context) : undefined, - } as any; -}; +// de_ResourceIntegrations omitted. -/** - * deserializeAws_restJson1Resources - */ -const de_Resources = (output: any, context: __SerdeContext): ResourceInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceInfo(entry, context); - }); - return retVal; -}; +// de_Resources omitted. -/** - * deserializeAws_restJson1TagQueryConfiguration - */ -const de_TagQueryConfiguration = (output: any, context: __SerdeContext): TagQueryConfiguration => { - return { - tagKey: __expectString(output.tagKey), - } as any; -}; +// de_TagQueryConfiguration omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-service-catalog/src/protocols/Aws_json1_1.ts b/clients/client-service-catalog/src/protocols/Aws_json1_1.ts index 873a11978e5c..7aee7251c743 100644 --- a/clients/client-service-catalog/src/protocols/Aws_json1_1.ts +++ b/clients/client-service-catalog/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -305,72 +307,42 @@ import { import { UpdateTagOptionCommandInput, UpdateTagOptionCommandOutput } from "../commands/UpdateTagOptionCommand"; import { AcceptPortfolioShareInput, - AcceptPortfolioShareOutput, AccessLevelFilter, AssociateBudgetWithResourceInput, - AssociateBudgetWithResourceOutput, AssociatePrincipalWithPortfolioInput, - AssociatePrincipalWithPortfolioOutput, AssociateProductWithPortfolioInput, - AssociateProductWithPortfolioOutput, AssociateServiceActionWithProvisioningArtifactInput, - AssociateServiceActionWithProvisioningArtifactOutput, AssociateTagOptionWithResourceInput, - AssociateTagOptionWithResourceOutput, BatchAssociateServiceActionWithProvisioningArtifactInput, - BatchAssociateServiceActionWithProvisioningArtifactOutput, BatchDisassociateServiceActionFromProvisioningArtifactInput, - BatchDisassociateServiceActionFromProvisioningArtifactOutput, - BudgetDetail, - CloudWatchDashboard, CodeStarParameters, - ConstraintDetail, - ConstraintSummary, CopyOption, CopyProductInput, - CopyProductOutput, CreateConstraintInput, - CreateConstraintOutput, CreatePortfolioInput, CreatePortfolioOutput, CreatePortfolioShareInput, - CreatePortfolioShareOutput, CreateProductInput, CreateProductOutput, CreateProvisionedProductPlanInput, - CreateProvisionedProductPlanOutput, CreateProvisioningArtifactInput, CreateProvisioningArtifactOutput, CreateServiceActionInput, - CreateServiceActionOutput, CreateTagOptionInput, - CreateTagOptionOutput, DeleteConstraintInput, - DeleteConstraintOutput, DeletePortfolioInput, - DeletePortfolioOutput, DeletePortfolioShareInput, - DeletePortfolioShareOutput, DeleteProductInput, - DeleteProductOutput, DeleteProvisionedProductPlanInput, - DeleteProvisionedProductPlanOutput, DeleteProvisioningArtifactInput, - DeleteProvisioningArtifactOutput, DeleteServiceActionInput, - DeleteServiceActionOutput, DeleteTagOptionInput, - DeleteTagOptionOutput, DescribeConstraintInput, - DescribeConstraintOutput, DescribeCopyProductStatusInput, - DescribeCopyProductStatusOutput, DescribePortfolioInput, DescribePortfolioOutput, DescribePortfolioSharesInput, - DescribePortfolioSharesOutput, DescribePortfolioShareStatusInput, - DescribePortfolioShareStatusOutput, DescribeProductAsAdminInput, DescribeProductAsAdminOutput, DescribeProductInput, @@ -384,69 +356,45 @@ import { DescribeProvisioningArtifactInput, DescribeProvisioningArtifactOutput, DescribeProvisioningParametersInput, - DescribeProvisioningParametersOutput, DescribeRecordInput, DescribeRecordOutput, DescribeServiceActionExecutionParametersInput, - DescribeServiceActionExecutionParametersOutput, DescribeServiceActionInput, - DescribeServiceActionOutput, DescribeTagOptionInput, - DescribeTagOptionOutput, DisableAWSOrganizationsAccessInput, - DisableAWSOrganizationsAccessOutput, DisassociateBudgetFromResourceInput, - DisassociateBudgetFromResourceOutput, DisassociatePrincipalFromPortfolioInput, - DisassociatePrincipalFromPortfolioOutput, DisassociateProductFromPortfolioInput, - DisassociateProductFromPortfolioOutput, DisassociateServiceActionFromProvisioningArtifactInput, - DisassociateServiceActionFromProvisioningArtifactOutput, DisassociateTagOptionFromResourceInput, - DisassociateTagOptionFromResourceOutput, DuplicateResourceException, EnableAWSOrganizationsAccessInput, - EnableAWSOrganizationsAccessOutput, EngineWorkflowResourceIdentifier, ExecuteProvisionedProductPlanInput, ExecuteProvisionedProductPlanOutput, ExecuteProvisionedProductServiceActionInput, ExecuteProvisionedProductServiceActionOutput, - ExecutionParameter, - FailedServiceActionAssociation, GetAWSOrganizationsAccessStatusInput, - GetAWSOrganizationsAccessStatusOutput, GetProvisionedProductOutputsInput, - GetProvisionedProductOutputsOutput, ImportAsProvisionedProductInput, ImportAsProvisionedProductOutput, InvalidParametersException, InvalidStateException, LastSync, - LaunchPath, - LaunchPathSummary, LimitExceededException, ListAcceptedPortfolioSharesInput, ListAcceptedPortfolioSharesOutput, ListBudgetsForResourceInput, - ListBudgetsForResourceOutput, ListConstraintsForPortfolioInput, - ListConstraintsForPortfolioOutput, ListLaunchPathsInput, - ListLaunchPathsOutput, ListOrganizationPortfolioAccessInput, - ListOrganizationPortfolioAccessOutput, ListPortfolioAccessInput, - ListPortfolioAccessOutput, ListPortfoliosForProductInput, ListPortfoliosForProductOutput, ListPortfoliosInput, ListPortfoliosOutput, ListPrincipalsForPortfolioInput, - ListPrincipalsForPortfolioOutput, ListProvisionedProductPlansInput, - ListProvisionedProductPlansOutput, ListProvisioningArtifactsForServiceActionInput, ListProvisioningArtifactsForServiceActionOutput, ListProvisioningArtifactsInput, @@ -457,43 +405,23 @@ import { ListResourcesForTagOptionInput, ListResourcesForTagOptionOutput, ListServiceActionsForProvisioningArtifactInput, - ListServiceActionsForProvisioningArtifactOutput, ListServiceActionsInput, - ListServiceActionsOutput, ListStackInstancesForProvisionedProductInput, - ListStackInstancesForProvisionedProductOutput, ListTagOptionsFilters, ListTagOptionsInput, - ListTagOptionsOutput, NotifyProvisionProductEngineWorkflowResultInput, - NotifyProvisionProductEngineWorkflowResultOutput, NotifyTerminateProvisionedProductEngineWorkflowResultInput, - NotifyTerminateProvisionedProductEngineWorkflowResultOutput, NotifyUpdateProvisionedProductEngineWorkflowResultInput, - NotifyUpdateProvisionedProductEngineWorkflowResultOutput, OperationNotSupportedException, OrganizationNode, - ParameterConstraints, PortfolioDetail, - PortfolioShareDetail, - Principal, - ProductViewAggregationValue, ProductViewDetail, - ProductViewFilterBy, - ProductViewSummary, - PropertyKey, ProvisionedProductAttribute, ProvisionedProductDetail, ProvisionedProductPlanDetails, - ProvisionedProductPlanSummary, - ProvisionedProductViewFilterBy, ProvisioningArtifact, ProvisioningArtifactDetail, - ProvisioningArtifactOutput, - ProvisioningArtifactParameter, - ProvisioningArtifactPreferences, ProvisioningArtifactProperties, - ProvisioningArtifactPropertyName, ProvisioningArtifactSummary, ProvisioningArtifactView, ProvisioningParameter, @@ -501,64 +429,42 @@ import { ProvisionProductInput, ProvisionProductOutput, RecordDetail, - RecordError, RecordOutput, - RecordTag, RejectPortfolioShareInput, - RejectPortfolioShareOutput, - ResourceAttribute, - ResourceChange, - ResourceChangeDetail, ResourceDetail, ResourceInUseException, ResourceNotFoundException, - ResourceTargetDefinition, ScanProvisionedProductsInput, ScanProvisionedProductsOutput, SearchProductsAsAdminInput, SearchProductsAsAdminOutput, SearchProductsInput, - SearchProductsOutput, SearchProvisionedProductsInput, SearchProvisionedProductsOutput, ServiceActionAssociation, - ServiceActionDefinitionKey, - ServiceActionDetail, - ServiceActionSummary, - ShareDetails, - ShareError, SourceConnection, SourceConnectionDetail, SourceConnectionParameters, - StackInstance, Tag, - TagOptionDetail, TagOptionNotMigratedException, - TagOptionSummary, TerminateProvisionedProductInput, TerminateProvisionedProductOutput, UniqueTagResourceIdentifier, UpdateConstraintInput, - UpdateConstraintOutput, UpdatePortfolioInput, UpdatePortfolioOutput, UpdatePortfolioShareInput, - UpdatePortfolioShareOutput, UpdateProductInput, UpdateProductOutput, UpdateProvisionedProductInput, UpdateProvisionedProductOutput, UpdateProvisionedProductPropertiesInput, - UpdateProvisionedProductPropertiesOutput, UpdateProvisioningArtifactInput, UpdateProvisioningArtifactOutput, UpdateProvisioningParameter, UpdateProvisioningPreferences, UpdateServiceActionInput, - UpdateServiceActionOutput, UpdateTagOptionInput, - UpdateTagOptionOutput, - UsageInstruction, } from "../models/models_0"; import { ServiceCatalogServiceException as __BaseException } from "../models/ServiceCatalogServiceException"; @@ -571,7 +477,7 @@ export const se_AcceptPortfolioShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptPortfolioShare"); let body: any; - body = JSON.stringify(se_AcceptPortfolioShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +490,7 @@ export const se_AssociateBudgetWithResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateBudgetWithResource"); let body: any; - body = JSON.stringify(se_AssociateBudgetWithResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +503,7 @@ export const se_AssociatePrincipalWithPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociatePrincipalWithPortfolio"); let body: any; - body = JSON.stringify(se_AssociatePrincipalWithPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +516,7 @@ export const se_AssociateProductWithPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateProductWithPortfolio"); let body: any; - body = JSON.stringify(se_AssociateProductWithPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -623,7 +529,7 @@ export const se_AssociateServiceActionWithProvisioningArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateServiceActionWithProvisioningArtifact"); let body: any; - body = JSON.stringify(se_AssociateServiceActionWithProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -636,7 +542,7 @@ export const se_AssociateTagOptionWithResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateTagOptionWithResource"); let body: any; - body = JSON.stringify(se_AssociateTagOptionWithResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +555,7 @@ export const se_BatchAssociateServiceActionWithProvisioningArtifactCommand = asy ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchAssociateServiceActionWithProvisioningArtifact"); let body: any; - body = JSON.stringify(se_BatchAssociateServiceActionWithProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +568,7 @@ export const se_BatchDisassociateServiceActionFromProvisioningArtifactCommand = ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("BatchDisassociateServiceActionFromProvisioningArtifact"); let body: any; - body = JSON.stringify(se_BatchDisassociateServiceActionFromProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -714,7 +620,7 @@ export const se_CreatePortfolioShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePortfolioShare"); let body: any; - body = JSON.stringify(se_CreatePortfolioShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -779,7 +685,7 @@ export const se_CreateTagOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTagOption"); let body: any; - body = JSON.stringify(se_CreateTagOptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -792,7 +698,7 @@ export const se_DeleteConstraintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConstraint"); let body: any; - body = JSON.stringify(se_DeleteConstraintInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -805,7 +711,7 @@ export const se_DeletePortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePortfolio"); let body: any; - body = JSON.stringify(se_DeletePortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -818,7 +724,7 @@ export const se_DeletePortfolioShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePortfolioShare"); let body: any; - body = JSON.stringify(se_DeletePortfolioShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -831,7 +737,7 @@ export const se_DeleteProductCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProduct"); let body: any; - body = JSON.stringify(se_DeleteProductInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -844,7 +750,7 @@ export const se_DeleteProvisionedProductPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProvisionedProductPlan"); let body: any; - body = JSON.stringify(se_DeleteProvisionedProductPlanInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -857,7 +763,7 @@ export const se_DeleteProvisioningArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProvisioningArtifact"); let body: any; - body = JSON.stringify(se_DeleteProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -870,7 +776,7 @@ export const se_DeleteServiceActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServiceAction"); let body: any; - body = JSON.stringify(se_DeleteServiceActionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -883,7 +789,7 @@ export const se_DeleteTagOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTagOption"); let body: any; - body = JSON.stringify(se_DeleteTagOptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -896,7 +802,7 @@ export const se_DescribeConstraintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConstraint"); let body: any; - body = JSON.stringify(se_DescribeConstraintInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -909,7 +815,7 @@ export const se_DescribeCopyProductStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCopyProductStatus"); let body: any; - body = JSON.stringify(se_DescribeCopyProductStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -922,7 +828,7 @@ export const se_DescribePortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePortfolio"); let body: any; - body = JSON.stringify(se_DescribePortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -935,7 +841,7 @@ export const se_DescribePortfolioSharesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePortfolioShares"); let body: any; - body = JSON.stringify(se_DescribePortfolioSharesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -948,7 +854,7 @@ export const se_DescribePortfolioShareStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePortfolioShareStatus"); let body: any; - body = JSON.stringify(se_DescribePortfolioShareStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -961,7 +867,7 @@ export const se_DescribeProductCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProduct"); let body: any; - body = JSON.stringify(se_DescribeProductInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -974,7 +880,7 @@ export const se_DescribeProductAsAdminCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProductAsAdmin"); let body: any; - body = JSON.stringify(se_DescribeProductAsAdminInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -987,7 +893,7 @@ export const se_DescribeProductViewCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProductView"); let body: any; - body = JSON.stringify(se_DescribeProductViewInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1000,7 +906,7 @@ export const se_DescribeProvisionedProductCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProvisionedProduct"); let body: any; - body = JSON.stringify(se_DescribeProvisionedProductInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1013,7 +919,7 @@ export const se_DescribeProvisionedProductPlanCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProvisionedProductPlan"); let body: any; - body = JSON.stringify(se_DescribeProvisionedProductPlanInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1026,7 +932,7 @@ export const se_DescribeProvisioningArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProvisioningArtifact"); let body: any; - body = JSON.stringify(se_DescribeProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1039,7 +945,7 @@ export const se_DescribeProvisioningParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProvisioningParameters"); let body: any; - body = JSON.stringify(se_DescribeProvisioningParametersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1052,7 +958,7 @@ export const se_DescribeRecordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeRecord"); let body: any; - body = JSON.stringify(se_DescribeRecordInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1065,7 +971,7 @@ export const se_DescribeServiceActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServiceAction"); let body: any; - body = JSON.stringify(se_DescribeServiceActionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1078,7 +984,7 @@ export const se_DescribeServiceActionExecutionParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServiceActionExecutionParameters"); let body: any; - body = JSON.stringify(se_DescribeServiceActionExecutionParametersInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1091,7 +997,7 @@ export const se_DescribeTagOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTagOption"); let body: any; - body = JSON.stringify(se_DescribeTagOptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1104,7 +1010,7 @@ export const se_DisableAWSOrganizationsAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableAWSOrganizationsAccess"); let body: any; - body = JSON.stringify(se_DisableAWSOrganizationsAccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1117,7 +1023,7 @@ export const se_DisassociateBudgetFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateBudgetFromResource"); let body: any; - body = JSON.stringify(se_DisassociateBudgetFromResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1130,7 +1036,7 @@ export const se_DisassociatePrincipalFromPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociatePrincipalFromPortfolio"); let body: any; - body = JSON.stringify(se_DisassociatePrincipalFromPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1143,7 +1049,7 @@ export const se_DisassociateProductFromPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateProductFromPortfolio"); let body: any; - body = JSON.stringify(se_DisassociateProductFromPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1156,7 +1062,7 @@ export const se_DisassociateServiceActionFromProvisioningArtifactCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateServiceActionFromProvisioningArtifact"); let body: any; - body = JSON.stringify(se_DisassociateServiceActionFromProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1169,7 +1075,7 @@ export const se_DisassociateTagOptionFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateTagOptionFromResource"); let body: any; - body = JSON.stringify(se_DisassociateTagOptionFromResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1182,7 +1088,7 @@ export const se_EnableAWSOrganizationsAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableAWSOrganizationsAccess"); let body: any; - body = JSON.stringify(se_EnableAWSOrganizationsAccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1221,7 +1127,7 @@ export const se_GetAWSOrganizationsAccessStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAWSOrganizationsAccessStatus"); let body: any; - body = JSON.stringify(se_GetAWSOrganizationsAccessStatusInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1234,7 +1140,7 @@ export const se_GetProvisionedProductOutputsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetProvisionedProductOutputs"); let body: any; - body = JSON.stringify(se_GetProvisionedProductOutputsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1260,7 +1166,7 @@ export const se_ListAcceptedPortfolioSharesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAcceptedPortfolioShares"); let body: any; - body = JSON.stringify(se_ListAcceptedPortfolioSharesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1273,7 +1179,7 @@ export const se_ListBudgetsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBudgetsForResource"); let body: any; - body = JSON.stringify(se_ListBudgetsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1286,7 +1192,7 @@ export const se_ListConstraintsForPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConstraintsForPortfolio"); let body: any; - body = JSON.stringify(se_ListConstraintsForPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1299,7 +1205,7 @@ export const se_ListLaunchPathsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLaunchPaths"); let body: any; - body = JSON.stringify(se_ListLaunchPathsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1312,7 +1218,7 @@ export const se_ListOrganizationPortfolioAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOrganizationPortfolioAccess"); let body: any; - body = JSON.stringify(se_ListOrganizationPortfolioAccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1325,7 +1231,7 @@ export const se_ListPortfolioAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPortfolioAccess"); let body: any; - body = JSON.stringify(se_ListPortfolioAccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1338,7 +1244,7 @@ export const se_ListPortfoliosCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPortfolios"); let body: any; - body = JSON.stringify(se_ListPortfoliosInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1351,7 +1257,7 @@ export const se_ListPortfoliosForProductCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPortfoliosForProduct"); let body: any; - body = JSON.stringify(se_ListPortfoliosForProductInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1364,7 +1270,7 @@ export const se_ListPrincipalsForPortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPrincipalsForPortfolio"); let body: any; - body = JSON.stringify(se_ListPrincipalsForPortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1377,7 +1283,7 @@ export const se_ListProvisionedProductPlansCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProvisionedProductPlans"); let body: any; - body = JSON.stringify(se_ListProvisionedProductPlansInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1390,7 +1296,7 @@ export const se_ListProvisioningArtifactsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProvisioningArtifacts"); let body: any; - body = JSON.stringify(se_ListProvisioningArtifactsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1403,7 +1309,7 @@ export const se_ListProvisioningArtifactsForServiceActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProvisioningArtifactsForServiceAction"); let body: any; - body = JSON.stringify(se_ListProvisioningArtifactsForServiceActionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1416,7 +1322,7 @@ export const se_ListRecordHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRecordHistory"); let body: any; - body = JSON.stringify(se_ListRecordHistoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1429,7 +1335,7 @@ export const se_ListResourcesForTagOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourcesForTagOption"); let body: any; - body = JSON.stringify(se_ListResourcesForTagOptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1442,7 +1348,7 @@ export const se_ListServiceActionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceActions"); let body: any; - body = JSON.stringify(se_ListServiceActionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1455,7 +1361,7 @@ export const se_ListServiceActionsForProvisioningArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceActionsForProvisioningArtifact"); let body: any; - body = JSON.stringify(se_ListServiceActionsForProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1468,7 +1374,7 @@ export const se_ListStackInstancesForProvisionedProductCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStackInstancesForProvisionedProduct"); let body: any; - body = JSON.stringify(se_ListStackInstancesForProvisionedProductInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1481,7 +1387,7 @@ export const se_ListTagOptionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagOptions"); let body: any; - body = JSON.stringify(se_ListTagOptionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1546,7 +1452,7 @@ export const se_RejectPortfolioShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RejectPortfolioShare"); let body: any; - body = JSON.stringify(se_RejectPortfolioShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1559,7 +1465,7 @@ export const se_ScanProvisionedProductsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ScanProvisionedProducts"); let body: any; - body = JSON.stringify(se_ScanProvisionedProductsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1572,7 +1478,7 @@ export const se_SearchProductsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchProducts"); let body: any; - body = JSON.stringify(se_SearchProductsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1585,7 +1491,7 @@ export const se_SearchProductsAsAdminCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchProductsAsAdmin"); let body: any; - body = JSON.stringify(se_SearchProductsAsAdminInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1598,7 +1504,7 @@ export const se_SearchProvisionedProductsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SearchProvisionedProducts"); let body: any; - body = JSON.stringify(se_SearchProvisionedProductsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1624,7 +1530,7 @@ export const se_UpdateConstraintCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConstraint"); let body: any; - body = JSON.stringify(se_UpdateConstraintInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1637,7 +1543,7 @@ export const se_UpdatePortfolioCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePortfolio"); let body: any; - body = JSON.stringify(se_UpdatePortfolioInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1650,7 +1556,7 @@ export const se_UpdatePortfolioShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePortfolioShare"); let body: any; - body = JSON.stringify(se_UpdatePortfolioShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1663,7 +1569,7 @@ export const se_UpdateProductCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProduct"); let body: any; - body = JSON.stringify(se_UpdateProductInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1702,7 +1608,7 @@ export const se_UpdateProvisioningArtifactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProvisioningArtifact"); let body: any; - body = JSON.stringify(se_UpdateProvisioningArtifactInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1715,7 +1621,7 @@ export const se_UpdateServiceActionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceAction"); let body: any; - body = JSON.stringify(se_UpdateServiceActionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1728,7 +1634,7 @@ export const se_UpdateTagOptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTagOption"); let body: any; - body = JSON.stringify(se_UpdateTagOptionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1744,12 +1650,12 @@ export const de_AcceptPortfolioShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptPortfolioShareOutput(data, context); + contents = _json(data); const response: AcceptPortfolioShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1776,10 +1682,9 @@ const de_AcceptPortfolioShareCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1797,12 +1702,12 @@ export const de_AssociateBudgetWithResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateBudgetWithResourceOutput(data, context); + contents = _json(data); const response: AssociateBudgetWithResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1832,10 +1737,9 @@ const de_AssociateBudgetWithResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1853,12 +1757,12 @@ export const de_AssociatePrincipalWithPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociatePrincipalWithPortfolioOutput(data, context); + contents = _json(data); const response: AssociatePrincipalWithPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1885,10 +1789,9 @@ const de_AssociatePrincipalWithPortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1906,12 +1809,12 @@ export const de_AssociateProductWithPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateProductWithPortfolioOutput(data, context); + contents = _json(data); const response: AssociateProductWithPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1938,10 +1841,9 @@ const de_AssociateProductWithPortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1959,12 +1861,12 @@ export const de_AssociateServiceActionWithProvisioningArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateServiceActionWithProvisioningArtifactOutput(data, context); + contents = _json(data); const response: AssociateServiceActionWithProvisioningArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1994,10 +1896,9 @@ const de_AssociateServiceActionWithProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2015,12 +1916,12 @@ export const de_AssociateTagOptionWithResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateTagOptionWithResourceOutput(data, context); + contents = _json(data); const response: AssociateTagOptionWithResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2056,10 +1957,9 @@ const de_AssociateTagOptionWithResourceCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2077,12 +1977,12 @@ export const de_BatchAssociateServiceActionWithProvisioningArtifactCommand = asy } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchAssociateServiceActionWithProvisioningArtifactOutput(data, context); + contents = _json(data); const response: BatchAssociateServiceActionWithProvisioningArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2103,10 +2003,9 @@ const de_BatchAssociateServiceActionWithProvisioningArtifactCommandError = async throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2124,12 +2023,12 @@ export const de_BatchDisassociateServiceActionFromProvisioningArtifactCommand = } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_BatchDisassociateServiceActionFromProvisioningArtifactOutput(data, context); + contents = _json(data); const response: BatchDisassociateServiceActionFromProvisioningArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2150,10 +2049,9 @@ const de_BatchDisassociateServiceActionFromProvisioningArtifactCommandError = as throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2171,12 +2069,12 @@ export const de_CopyProductCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CopyProductOutput(data, context); + contents = _json(data); const response: CopyProductCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2200,10 +2098,9 @@ const de_CopyProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2221,12 +2118,12 @@ export const de_CreateConstraintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConstraintOutput(data, context); + contents = _json(data); const response: CreateConstraintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2256,10 +2153,9 @@ const de_CreateConstraintCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,7 +2178,7 @@ export const de_CreatePortfolioCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2309,10 +2205,9 @@ const de_CreatePortfolioCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2330,12 +2225,12 @@ export const de_CreatePortfolioShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePortfolioShareOutput(data, context); + contents = _json(data); const response: CreatePortfolioShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2368,10 +2263,9 @@ const de_CreatePortfolioShareCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2394,7 +2288,7 @@ export const de_CreateProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2421,10 +2315,9 @@ const de_CreateProductCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2442,12 +2335,12 @@ export const de_CreateProvisionedProductPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProvisionedProductPlanOutput(data, context); + contents = _json(data); const response: CreateProvisionedProductPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2474,10 +2367,9 @@ const de_CreateProvisionedProductPlanCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2500,7 +2392,7 @@ export const de_CreateProvisioningArtifactCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2527,10 +2419,9 @@ const de_CreateProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2548,12 +2439,12 @@ export const de_CreateServiceActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateServiceActionOutput(data, context); + contents = _json(data); const response: CreateServiceActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2577,10 +2468,9 @@ const de_CreateServiceActionCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2598,12 +2488,12 @@ export const de_CreateTagOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTagOptionOutput(data, context); + contents = _json(data); const response: CreateTagOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2630,10 +2520,9 @@ const de_CreateTagOptionCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2651,12 +2540,12 @@ export const de_DeleteConstraintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConstraintOutput(data, context); + contents = _json(data); const response: DeleteConstraintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2680,10 +2569,9 @@ const de_DeleteConstraintCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2701,12 +2589,12 @@ export const de_DeletePortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePortfolioOutput(data, context); + contents = _json(data); const response: DeletePortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2736,10 +2624,9 @@ const de_DeletePortfolioCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2757,12 +2644,12 @@ export const de_DeletePortfolioShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePortfolioShareOutput(data, context); + contents = _json(data); const response: DeletePortfolioShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2792,10 +2679,9 @@ const de_DeletePortfolioShareCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2813,12 +2699,12 @@ export const de_DeleteProductCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProductOutput(data, context); + contents = _json(data); const response: DeleteProductCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2848,10 +2734,9 @@ const de_DeleteProductCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2869,12 +2754,12 @@ export const de_DeleteProvisionedProductPlanCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProvisionedProductPlanOutput(data, context); + contents = _json(data); const response: DeleteProvisionedProductPlanCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2898,10 +2783,9 @@ const de_DeleteProvisionedProductPlanCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2919,12 +2803,12 @@ export const de_DeleteProvisioningArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProvisioningArtifactOutput(data, context); + contents = _json(data); const response: DeleteProvisioningArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2951,10 +2835,9 @@ const de_DeleteProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2972,12 +2855,12 @@ export const de_DeleteServiceActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteServiceActionOutput(data, context); + contents = _json(data); const response: DeleteServiceActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3001,10 +2884,9 @@ const de_DeleteServiceActionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3022,12 +2904,12 @@ export const de_DeleteTagOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTagOptionOutput(data, context); + contents = _json(data); const response: DeleteTagOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3054,10 +2936,9 @@ const de_DeleteTagOptionCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3075,12 +2956,12 @@ export const de_DescribeConstraintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConstraintOutput(data, context); + contents = _json(data); const response: DescribeConstraintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3101,10 +2982,9 @@ const de_DescribeConstraintCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3122,12 +3002,12 @@ export const de_DescribeCopyProductStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCopyProductStatusOutput(data, context); + contents = _json(data); const response: DescribeCopyProductStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3148,10 +3028,9 @@ const de_DescribeCopyProductStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3174,7 +3053,7 @@ export const de_DescribePortfolioCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3195,10 +3074,9 @@ const de_DescribePortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3216,12 +3094,12 @@ export const de_DescribePortfolioSharesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePortfolioSharesOutput(data, context); + contents = _json(data); const response: DescribePortfolioSharesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3245,10 +3123,9 @@ const de_DescribePortfolioSharesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3266,12 +3143,12 @@ export const de_DescribePortfolioShareStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePortfolioShareStatusOutput(data, context); + contents = _json(data); const response: DescribePortfolioShareStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3298,10 +3175,9 @@ const de_DescribePortfolioShareStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3324,7 +3200,7 @@ export const de_DescribeProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3348,10 +3224,9 @@ const de_DescribeProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3374,7 +3249,7 @@ export const de_DescribeProductAsAdminCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3398,10 +3273,9 @@ const de_DescribeProductAsAdminCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3424,7 +3298,7 @@ export const de_DescribeProductViewCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3448,10 +3322,9 @@ const de_DescribeProductViewCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3474,7 +3347,7 @@ export const de_DescribeProvisionedProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3498,10 +3371,9 @@ const de_DescribeProvisionedProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3524,7 +3396,7 @@ export const de_DescribeProvisionedProductPlanCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3548,10 +3420,9 @@ const de_DescribeProvisionedProductPlanCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3574,7 +3445,7 @@ export const de_DescribeProvisioningArtifactCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3598,10 +3469,9 @@ const de_DescribeProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3619,12 +3489,12 @@ export const de_DescribeProvisioningParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeProvisioningParametersOutput(data, context); + contents = _json(data); const response: DescribeProvisioningParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3648,10 +3518,9 @@ const de_DescribeProvisioningParametersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3674,7 +3543,7 @@ export const de_DescribeRecordCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3695,10 +3564,9 @@ const de_DescribeRecordCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3716,12 +3584,12 @@ export const de_DescribeServiceActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeServiceActionOutput(data, context); + contents = _json(data); const response: DescribeServiceActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3742,10 +3610,9 @@ const de_DescribeServiceActionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3763,12 +3630,12 @@ export const de_DescribeServiceActionExecutionParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeServiceActionExecutionParametersOutput(data, context); + contents = _json(data); const response: DescribeServiceActionExecutionParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3792,10 +3659,9 @@ const de_DescribeServiceActionExecutionParametersCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3813,12 +3679,12 @@ export const de_DescribeTagOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTagOptionOutput(data, context); + contents = _json(data); const response: DescribeTagOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3842,10 +3708,9 @@ const de_DescribeTagOptionCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3863,12 +3728,12 @@ export const de_DisableAWSOrganizationsAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableAWSOrganizationsAccessOutput(data, context); + contents = _json(data); const response: DisableAWSOrganizationsAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3895,10 +3760,9 @@ const de_DisableAWSOrganizationsAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3916,12 +3780,12 @@ export const de_DisassociateBudgetFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateBudgetFromResourceOutput(data, context); + contents = _json(data); const response: DisassociateBudgetFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3942,10 +3806,9 @@ const de_DisassociateBudgetFromResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3963,12 +3826,12 @@ export const de_DisassociatePrincipalFromPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociatePrincipalFromPortfolioOutput(data, context); + contents = _json(data); const response: DisassociatePrincipalFromPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3992,10 +3855,9 @@ const de_DisassociatePrincipalFromPortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4013,12 +3875,12 @@ export const de_DisassociateProductFromPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateProductFromPortfolioOutput(data, context); + contents = _json(data); const response: DisassociateProductFromPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4045,10 +3907,9 @@ const de_DisassociateProductFromPortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4066,12 +3927,12 @@ export const de_DisassociateServiceActionFromProvisioningArtifactCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateServiceActionFromProvisioningArtifactOutput(data, context); + contents = _json(data); const response: DisassociateServiceActionFromProvisioningArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4092,10 +3953,9 @@ const de_DisassociateServiceActionFromProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4113,12 +3973,12 @@ export const de_DisassociateTagOptionFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateTagOptionFromResourceOutput(data, context); + contents = _json(data); const response: DisassociateTagOptionFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4142,10 +4002,9 @@ const de_DisassociateTagOptionFromResourceCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4163,12 +4022,12 @@ export const de_EnableAWSOrganizationsAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableAWSOrganizationsAccessOutput(data, context); + contents = _json(data); const response: EnableAWSOrganizationsAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4195,10 +4054,9 @@ const de_EnableAWSOrganizationsAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4221,7 +4079,7 @@ export const de_ExecuteProvisionedProductPlanCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4248,10 +4106,9 @@ const de_ExecuteProvisionedProductPlanCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4274,7 +4131,7 @@ export const de_ExecuteProvisionedProductServiceActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4301,10 +4158,9 @@ const de_ExecuteProvisionedProductServiceActionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4322,12 +4178,12 @@ export const de_GetAWSOrganizationsAccessStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAWSOrganizationsAccessStatusOutput(data, context); + contents = _json(data); const response: GetAWSOrganizationsAccessStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4351,10 +4207,9 @@ const de_GetAWSOrganizationsAccessStatusCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4372,12 +4227,12 @@ export const de_GetProvisionedProductOutputsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetProvisionedProductOutputsOutput(data, context); + contents = _json(data); const response: GetProvisionedProductOutputsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4401,10 +4256,9 @@ const de_GetProvisionedProductOutputsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4427,7 +4281,7 @@ export const de_ImportAsProvisionedProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4457,10 +4311,9 @@ const de_ImportAsProvisionedProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4483,7 +4336,7 @@ export const de_ListAcceptedPortfolioSharesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4507,10 +4360,9 @@ const de_ListAcceptedPortfolioSharesCommandError = async ( throw await de_OperationNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4528,12 +4380,12 @@ export const de_ListBudgetsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListBudgetsForResourceOutput(data, context); + contents = _json(data); const response: ListBudgetsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4557,10 +4409,9 @@ const de_ListBudgetsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4578,12 +4429,12 @@ export const de_ListConstraintsForPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListConstraintsForPortfolioOutput(data, context); + contents = _json(data); const response: ListConstraintsForPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4607,10 +4458,9 @@ const de_ListConstraintsForPortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4628,12 +4478,12 @@ export const de_ListLaunchPathsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLaunchPathsOutput(data, context); + contents = _json(data); const response: ListLaunchPathsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4657,10 +4507,9 @@ const de_ListLaunchPathsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4678,12 +4527,12 @@ export const de_ListOrganizationPortfolioAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListOrganizationPortfolioAccessOutput(data, context); + contents = _json(data); const response: ListOrganizationPortfolioAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4710,10 +4559,9 @@ const de_ListOrganizationPortfolioAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4731,12 +4579,12 @@ export const de_ListPortfolioAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPortfolioAccessOutput(data, context); + contents = _json(data); const response: ListPortfolioAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4760,10 +4608,9 @@ const de_ListPortfolioAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4786,7 +4633,7 @@ export const de_ListPortfoliosCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4807,10 +4654,9 @@ const de_ListPortfoliosCommandError = async ( throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4833,7 +4679,7 @@ export const de_ListPortfoliosForProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4857,10 +4703,9 @@ const de_ListPortfoliosForProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4878,12 +4723,12 @@ export const de_ListPrincipalsForPortfolioCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPrincipalsForPortfolioOutput(data, context); + contents = _json(data); const response: ListPrincipalsForPortfolioCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4907,10 +4752,9 @@ const de_ListPrincipalsForPortfolioCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4928,12 +4772,12 @@ export const de_ListProvisionedProductPlansCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProvisionedProductPlansOutput(data, context); + contents = _json(data); const response: ListProvisionedProductPlansCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4957,10 +4801,9 @@ const de_ListProvisionedProductPlansCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4983,7 +4826,7 @@ export const de_ListProvisioningArtifactsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5007,10 +4850,9 @@ const de_ListProvisioningArtifactsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5033,7 +4875,7 @@ export const de_ListProvisioningArtifactsForServiceActionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5057,10 +4899,9 @@ const de_ListProvisioningArtifactsForServiceActionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5083,7 +4924,7 @@ export const de_ListRecordHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5104,10 +4945,9 @@ const de_ListRecordHistoryCommandError = async ( throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5130,7 +4970,7 @@ export const de_ListResourcesForTagOptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5157,10 +4997,9 @@ const de_ListResourcesForTagOptionCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5178,12 +5017,12 @@ export const de_ListServiceActionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServiceActionsOutput(data, context); + contents = _json(data); const response: ListServiceActionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5204,10 +5043,9 @@ const de_ListServiceActionsCommandError = async ( throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5225,12 +5063,12 @@ export const de_ListServiceActionsForProvisioningArtifactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServiceActionsForProvisioningArtifactOutput(data, context); + contents = _json(data); const response: ListServiceActionsForProvisioningArtifactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5254,10 +5092,9 @@ const de_ListServiceActionsForProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5275,12 +5112,12 @@ export const de_ListStackInstancesForProvisionedProductCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListStackInstancesForProvisionedProductOutput(data, context); + contents = _json(data); const response: ListStackInstancesForProvisionedProductCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5304,10 +5141,9 @@ const de_ListStackInstancesForProvisionedProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5325,12 +5161,12 @@ export const de_ListTagOptionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagOptionsOutput(data, context); + contents = _json(data); const response: ListTagOptionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5354,10 +5190,9 @@ const de_ListTagOptionsCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5375,12 +5210,12 @@ export const de_NotifyProvisionProductEngineWorkflowResultCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyProvisionProductEngineWorkflowResultOutput(data, context); + contents = _json(data); const response: NotifyProvisionProductEngineWorkflowResultCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5404,10 +5239,9 @@ const de_NotifyProvisionProductEngineWorkflowResultCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5425,12 +5259,12 @@ export const de_NotifyTerminateProvisionedProductEngineWorkflowResultCommand = a } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyTerminateProvisionedProductEngineWorkflowResultOutput(data, context); + contents = _json(data); const response: NotifyTerminateProvisionedProductEngineWorkflowResultCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5454,10 +5288,9 @@ const de_NotifyTerminateProvisionedProductEngineWorkflowResultCommandError = asy throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5475,12 +5308,12 @@ export const de_NotifyUpdateProvisionedProductEngineWorkflowResultCommand = asyn } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyUpdateProvisionedProductEngineWorkflowResultOutput(data, context); + contents = _json(data); const response: NotifyUpdateProvisionedProductEngineWorkflowResultCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5504,10 +5337,9 @@ const de_NotifyUpdateProvisionedProductEngineWorkflowResultCommandError = async throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5530,7 +5362,7 @@ export const de_ProvisionProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5557,10 +5389,9 @@ const de_ProvisionProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5578,12 +5409,12 @@ export const de_RejectPortfolioShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RejectPortfolioShareOutput(data, context); + contents = _json(data); const response: RejectPortfolioShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5604,10 +5435,9 @@ const de_RejectPortfolioShareCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5630,7 +5460,7 @@ export const de_ScanProvisionedProductsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5651,10 +5481,9 @@ const de_ScanProvisionedProductsCommandError = async ( throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5672,12 +5501,12 @@ export const de_SearchProductsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchProductsOutput(data, context); + contents = _json(data); const response: SearchProductsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5698,10 +5527,9 @@ const de_SearchProductsCommandError = async ( throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5724,7 +5552,7 @@ export const de_SearchProductsAsAdminCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5748,10 +5576,9 @@ const de_SearchProductsAsAdminCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5774,7 +5601,7 @@ export const de_SearchProvisionedProductsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5795,10 +5622,9 @@ const de_SearchProvisionedProductsCommandError = async ( throw await de_InvalidParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5821,7 +5647,7 @@ export const de_TerminateProvisionedProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5842,10 +5668,9 @@ const de_TerminateProvisionedProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5863,12 +5688,12 @@ export const de_UpdateConstraintCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConstraintOutput(data, context); + contents = _json(data); const response: UpdateConstraintCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5892,10 +5717,9 @@ const de_UpdateConstraintCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5918,7 +5742,7 @@ export const de_UpdatePortfolioCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5948,10 +5772,9 @@ const de_UpdatePortfolioCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5969,12 +5792,12 @@ export const de_UpdatePortfolioShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePortfolioShareOutput(data, context); + contents = _json(data); const response: UpdatePortfolioShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6004,10 +5827,9 @@ const de_UpdatePortfolioShareCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6030,7 +5852,7 @@ export const de_UpdateProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6057,10 +5879,9 @@ const de_UpdateProductCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6083,7 +5904,7 @@ export const de_UpdateProvisionedProductCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6107,10 +5928,9 @@ const de_UpdateProvisionedProductCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6128,12 +5948,12 @@ export const de_UpdateProvisionedProductPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProvisionedProductPropertiesOutput(data, context); + contents = _json(data); const response: UpdateProvisionedProductPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6160,10 +5980,9 @@ const de_UpdateProvisionedProductPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6186,7 +6005,7 @@ export const de_UpdateProvisioningArtifactCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6210,10 +6029,9 @@ const de_UpdateProvisioningArtifactCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6231,12 +6049,12 @@ export const de_UpdateServiceActionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateServiceActionOutput(data, context); + contents = _json(data); const response: UpdateServiceActionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6260,10 +6078,9 @@ const de_UpdateServiceActionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6281,12 +6098,12 @@ export const de_UpdateTagOptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateTagOptionOutput(data, context); + contents = _json(data); const response: UpdateTagOptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6316,10 +6133,9 @@ const de_UpdateTagOptionCommandError = async ( throw await de_TagOptionNotMigratedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6333,7 +6149,7 @@ const de_DuplicateResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateResourceException(body, context); + const deserialized: any = _json(body); const exception = new DuplicateResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6349,7 +6165,7 @@ const de_InvalidParametersExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParametersException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParametersException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6365,7 +6181,7 @@ const de_InvalidStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6381,7 +6197,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6397,7 +6213,7 @@ const de_OperationNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6413,7 +6229,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6429,7 +6245,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6445,7 +6261,7 @@ const de_TagOptionNotMigratedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagOptionNotMigratedException(body, context); + const deserialized: any = _json(body); const exception = new TagOptionNotMigratedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6453,243 +6269,95 @@ const de_TagOptionNotMigratedExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptPortfolioShareInput - */ -const se_AcceptPortfolioShareInput = (input: AcceptPortfolioShareInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.PortfolioShareType != null && { PortfolioShareType: input.PortfolioShareType }), - }; -}; +// se_AcceptPortfolioShareInput omitted. -/** - * serializeAws_json1_1AccessLevelFilter - */ -const se_AccessLevelFilter = (input: AccessLevelFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AccessLevelFilter omitted. -/** - * serializeAws_json1_1AddTags - */ -const se_AddTags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_AddTags omitted. -/** - * serializeAws_json1_1AssociateBudgetWithResourceInput - */ -const se_AssociateBudgetWithResourceInput = (input: AssociateBudgetWithResourceInput, context: __SerdeContext): any => { - return { - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_AssociateBudgetWithResourceInput omitted. -/** - * serializeAws_json1_1AssociatePrincipalWithPortfolioInput - */ -const se_AssociatePrincipalWithPortfolioInput = ( - input: AssociatePrincipalWithPortfolioInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.PrincipalARN != null && { PrincipalARN: input.PrincipalARN }), - ...(input.PrincipalType != null && { PrincipalType: input.PrincipalType }), - }; -}; +// se_AssociatePrincipalWithPortfolioInput omitted. -/** - * serializeAws_json1_1AssociateProductWithPortfolioInput - */ -const se_AssociateProductWithPortfolioInput = ( - input: AssociateProductWithPortfolioInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.SourcePortfolioId != null && { SourcePortfolioId: input.SourcePortfolioId }), - }; -}; +// se_AssociateProductWithPortfolioInput omitted. -/** - * serializeAws_json1_1AssociateServiceActionWithProvisioningArtifactInput - */ -const se_AssociateServiceActionWithProvisioningArtifactInput = ( - input: AssociateServiceActionWithProvisioningArtifactInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ServiceActionId != null && { ServiceActionId: input.ServiceActionId }), - }; -}; +// se_AssociateServiceActionWithProvisioningArtifactInput omitted. -/** - * serializeAws_json1_1AssociateTagOptionWithResourceInput - */ -const se_AssociateTagOptionWithResourceInput = ( - input: AssociateTagOptionWithResourceInput, - context: __SerdeContext -): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagOptionId != null && { TagOptionId: input.TagOptionId }), - }; -}; +// se_AssociateTagOptionWithResourceInput omitted. -/** - * serializeAws_json1_1BatchAssociateServiceActionWithProvisioningArtifactInput - */ -const se_BatchAssociateServiceActionWithProvisioningArtifactInput = ( - input: BatchAssociateServiceActionWithProvisioningArtifactInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ServiceActionAssociations != null && { - ServiceActionAssociations: se_ServiceActionAssociations(input.ServiceActionAssociations, context), - }), - }; -}; +// se_BatchAssociateServiceActionWithProvisioningArtifactInput omitted. -/** - * serializeAws_json1_1BatchDisassociateServiceActionFromProvisioningArtifactInput - */ -const se_BatchDisassociateServiceActionFromProvisioningArtifactInput = ( - input: BatchDisassociateServiceActionFromProvisioningArtifactInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ServiceActionAssociations != null && { - ServiceActionAssociations: se_ServiceActionAssociations(input.ServiceActionAssociations, context), - }), - }; -}; +// se_BatchDisassociateServiceActionFromProvisioningArtifactInput omitted. -/** - * serializeAws_json1_1CodeStarParameters - */ -const se_CodeStarParameters = (input: CodeStarParameters, context: __SerdeContext): any => { - return { - ...(input.ArtifactPath != null && { ArtifactPath: input.ArtifactPath }), - ...(input.Branch != null && { Branch: input.Branch }), - ...(input.ConnectionArn != null && { ConnectionArn: input.ConnectionArn }), - ...(input.Repository != null && { Repository: input.Repository }), - }; -}; +// se_CodeStarParameters omitted. -/** - * serializeAws_json1_1CopyOptions - */ -const se_CopyOptions = (input: (CopyOption | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CopyOptions omitted. /** * serializeAws_json1_1CopyProductInput */ const se_CopyProductInput = (input: CopyProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.CopyOptions != null && { CopyOptions: se_CopyOptions(input.CopyOptions, context) }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.SourceProductArn != null && { SourceProductArn: input.SourceProductArn }), - ...(input.SourceProvisioningArtifactIdentifiers != null && { - SourceProvisioningArtifactIdentifiers: se_SourceProvisioningArtifactProperties( - input.SourceProvisioningArtifactIdentifiers, - context - ), - }), - ...(input.TargetProductId != null && { TargetProductId: input.TargetProductId }), - ...(input.TargetProductName != null && { TargetProductName: input.TargetProductName }), - }; + return take(input, { + AcceptLanguage: [], + CopyOptions: _json, + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + SourceProductArn: [], + SourceProvisioningArtifactIdentifiers: _json, + TargetProductId: [], + TargetProductName: [], + }); }; /** * serializeAws_json1_1CreateConstraintInput */ const se_CreateConstraintInput = (input: CreateConstraintInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Description != null && { Description: input.Description }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Parameters != null && { Parameters: input.Parameters }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + AcceptLanguage: [], + Description: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Parameters: [], + PortfolioId: [], + ProductId: [], + Type: [], + }); }; /** * serializeAws_json1_1CreatePortfolioInput */ const se_CreatePortfolioInput = (input: CreatePortfolioInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.Tags != null && { Tags: se_AddTags(input.Tags, context) }), - }; + return take(input, { + AcceptLanguage: [], + Description: [], + DisplayName: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + ProviderName: [], + Tags: _json, + }); }; -/** - * serializeAws_json1_1CreatePortfolioShareInput - */ -const se_CreatePortfolioShareInput = (input: CreatePortfolioShareInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.OrganizationNode != null && { OrganizationNode: se_OrganizationNode(input.OrganizationNode, context) }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.SharePrincipals != null && { SharePrincipals: input.SharePrincipals }), - ...(input.ShareTagOptions != null && { ShareTagOptions: input.ShareTagOptions }), - }; -}; +// se_CreatePortfolioShareInput omitted. /** * serializeAws_json1_1CreateProductInput */ const se_CreateProductInput = (input: CreateProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Distributor != null && { Distributor: input.Distributor }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.Owner != null && { Owner: input.Owner }), - ...(input.ProductType != null && { ProductType: input.ProductType }), - ...(input.ProvisioningArtifactParameters != null && { - ProvisioningArtifactParameters: se_ProvisioningArtifactProperties(input.ProvisioningArtifactParameters, context), - }), - ...(input.SourceConnection != null && { SourceConnection: se_SourceConnection(input.SourceConnection, context) }), - ...(input.SupportDescription != null && { SupportDescription: input.SupportDescription }), - ...(input.SupportEmail != null && { SupportEmail: input.SupportEmail }), - ...(input.SupportUrl != null && { SupportUrl: input.SupportUrl }), - ...(input.Tags != null && { Tags: se_AddTags(input.Tags, context) }), - }; + return take(input, { + AcceptLanguage: [], + Description: [], + Distributor: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + Owner: [], + ProductType: [], + ProvisioningArtifactParameters: _json, + SourceConnection: _json, + SupportDescription: [], + SupportEmail: [], + SupportUrl: [], + Tags: _json, + }); }; /** @@ -6699,3926 +6367,1305 @@ const se_CreateProvisionedProductPlanInput = ( input: CreateProvisionedProductPlanInput, context: __SerdeContext ): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.NotificationArns != null && { NotificationArns: se_NotificationArns(input.NotificationArns, context) }), - ...(input.PathId != null && { PathId: input.PathId }), - ...(input.PlanName != null && { PlanName: input.PlanName }), - ...(input.PlanType != null && { PlanType: input.PlanType }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisionedProductName != null && { ProvisionedProductName: input.ProvisionedProductName }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningParameters != null && { - ProvisioningParameters: se_UpdateProvisioningParameters(input.ProvisioningParameters, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; + return take(input, { + AcceptLanguage: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + NotificationArns: _json, + PathId: [], + PlanName: [], + PlanType: [], + ProductId: [], + ProvisionedProductName: [], + ProvisioningArtifactId: [], + ProvisioningParameters: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateProvisioningArtifactInput */ const se_CreateProvisioningArtifactInput = (input: CreateProvisioningArtifactInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Parameters != null && { Parameters: se_ProvisioningArtifactProperties(input.Parameters, context) }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; + return take(input, { + AcceptLanguage: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Parameters: _json, + ProductId: [], + }); }; /** * serializeAws_json1_1CreateServiceActionInput */ const se_CreateServiceActionInput = (input: CreateServiceActionInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Definition != null && { Definition: se_ServiceActionDefinitionMap(input.Definition, context) }), - ...(input.DefinitionType != null && { DefinitionType: input.DefinitionType }), - ...(input.Description != null && { Description: input.Description }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + AcceptLanguage: [], + Definition: _json, + DefinitionType: [], + Description: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + }); }; -/** - * serializeAws_json1_1CreateTagOptionInput - */ -const se_CreateTagOptionInput = (input: CreateTagOptionInput, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_CreateTagOptionInput omitted. -/** - * serializeAws_json1_1DeleteConstraintInput - */ -const se_DeleteConstraintInput = (input: DeleteConstraintInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteConstraintInput omitted. -/** - * serializeAws_json1_1DeletePortfolioInput - */ -const se_DeletePortfolioInput = (input: DeletePortfolioInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeletePortfolioInput omitted. -/** - * serializeAws_json1_1DeletePortfolioShareInput - */ -const se_DeletePortfolioShareInput = (input: DeletePortfolioShareInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.OrganizationNode != null && { OrganizationNode: se_OrganizationNode(input.OrganizationNode, context) }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - }; -}; +// se_DeletePortfolioShareInput omitted. -/** - * serializeAws_json1_1DeleteProductInput - */ -const se_DeleteProductInput = (input: DeleteProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteProductInput omitted. -/** - * serializeAws_json1_1DeleteProvisionedProductPlanInput - */ -const se_DeleteProvisionedProductPlanInput = ( - input: DeleteProvisionedProductPlanInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.IgnoreErrors != null && { IgnoreErrors: input.IgnoreErrors }), - ...(input.PlanId != null && { PlanId: input.PlanId }), - }; -}; +// se_DeleteProvisionedProductPlanInput omitted. -/** - * serializeAws_json1_1DeleteProvisioningArtifactInput - */ -const se_DeleteProvisioningArtifactInput = (input: DeleteProvisioningArtifactInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - }; -}; +// se_DeleteProvisioningArtifactInput omitted. -/** - * serializeAws_json1_1DeleteServiceActionInput - */ -const se_DeleteServiceActionInput = (input: DeleteServiceActionInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteServiceActionInput omitted. -/** - * serializeAws_json1_1DeleteTagOptionInput - */ -const se_DeleteTagOptionInput = (input: DeleteTagOptionInput, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteTagOptionInput omitted. -/** - * serializeAws_json1_1DescribeConstraintInput - */ -const se_DescribeConstraintInput = (input: DescribeConstraintInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DescribeConstraintInput omitted. -/** - * serializeAws_json1_1DescribeCopyProductStatusInput - */ -const se_DescribeCopyProductStatusInput = (input: DescribeCopyProductStatusInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.CopyProductToken != null && { CopyProductToken: input.CopyProductToken }), - }; -}; +// se_DescribeCopyProductStatusInput omitted. -/** - * serializeAws_json1_1DescribePortfolioInput - */ -const se_DescribePortfolioInput = (input: DescribePortfolioInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DescribePortfolioInput omitted. -/** - * serializeAws_json1_1DescribePortfolioSharesInput - */ -const se_DescribePortfolioSharesInput = (input: DescribePortfolioSharesInput, context: __SerdeContext): any => { - return { - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DescribePortfolioSharesInput omitted. + +// se_DescribePortfolioShareStatusInput omitted. + +// se_DescribeProductAsAdminInput omitted. + +// se_DescribeProductInput omitted. + +// se_DescribeProductViewInput omitted. + +// se_DescribeProvisionedProductInput omitted. + +// se_DescribeProvisionedProductPlanInput omitted. + +// se_DescribeProvisioningArtifactInput omitted. + +// se_DescribeProvisioningParametersInput omitted. + +// se_DescribeRecordInput omitted. + +// se_DescribeServiceActionExecutionParametersInput omitted. + +// se_DescribeServiceActionInput omitted. + +// se_DescribeTagOptionInput omitted. + +// se_DisableAWSOrganizationsAccessInput omitted. + +// se_DisassociateBudgetFromResourceInput omitted. + +// se_DisassociatePrincipalFromPortfolioInput omitted. + +// se_DisassociateProductFromPortfolioInput omitted. + +// se_DisassociateServiceActionFromProvisioningArtifactInput omitted. + +// se_DisassociateTagOptionFromResourceInput omitted. + +// se_EnableAWSOrganizationsAccessInput omitted. + +// se_EngineWorkflowResourceIdentifier omitted. /** - * serializeAws_json1_1DescribePortfolioShareStatusInput + * serializeAws_json1_1ExecuteProvisionedProductPlanInput */ -const se_DescribePortfolioShareStatusInput = ( - input: DescribePortfolioShareStatusInput, +const se_ExecuteProvisionedProductPlanInput = ( + input: ExecuteProvisionedProductPlanInput, context: __SerdeContext ): any => { - return { - ...(input.PortfolioShareToken != null && { PortfolioShareToken: input.PortfolioShareToken }), - }; + return take(input, { + AcceptLanguage: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + PlanId: [], + }); }; /** - * serializeAws_json1_1DescribeProductAsAdminInput + * serializeAws_json1_1ExecuteProvisionedProductServiceActionInput */ -const se_DescribeProductAsAdminInput = (input: DescribeProductAsAdminInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SourcePortfolioId != null && { SourcePortfolioId: input.SourcePortfolioId }), - }; +const se_ExecuteProvisionedProductServiceActionInput = ( + input: ExecuteProvisionedProductServiceActionInput, + context: __SerdeContext +): any => { + return take(input, { + AcceptLanguage: [], + ExecuteToken: (_) => _ ?? generateIdempotencyToken(), + Parameters: _json, + ProvisionedProductId: [], + ServiceActionId: [], + }); }; -/** - * serializeAws_json1_1DescribeProductInput - */ -const se_DescribeProductInput = (input: DescribeProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_ExecutionParameterMap omitted. -/** - * serializeAws_json1_1DescribeProductViewInput - */ -const se_DescribeProductViewInput = (input: DescribeProductViewInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_ExecutionParameterValueList omitted. + +// se_GetAWSOrganizationsAccessStatusInput omitted. + +// se_GetProvisionedProductOutputsInput omitted. /** - * serializeAws_json1_1DescribeProvisionedProductInput + * serializeAws_json1_1ImportAsProvisionedProductInput */ -const se_DescribeProvisionedProductInput = (input: DescribeProvisionedProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - }; +const se_ImportAsProvisionedProductInput = (input: ImportAsProvisionedProductInput, context: __SerdeContext): any => { + return take(input, { + AcceptLanguage: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + PhysicalId: [], + ProductId: [], + ProvisionedProductName: [], + ProvisioningArtifactId: [], + }); }; +// se_ListAcceptedPortfolioSharesInput omitted. + +// se_ListBudgetsForResourceInput omitted. + +// se_ListConstraintsForPortfolioInput omitted. + +// se_ListLaunchPathsInput omitted. + +// se_ListOrganizationPortfolioAccessInput omitted. + +// se_ListPortfolioAccessInput omitted. + +// se_ListPortfoliosForProductInput omitted. + +// se_ListPortfoliosInput omitted. + +// se_ListPrincipalsForPortfolioInput omitted. + +// se_ListProvisionedProductPlansInput omitted. + +// se_ListProvisioningArtifactsForServiceActionInput omitted. + +// se_ListProvisioningArtifactsInput omitted. + +// se_ListRecordHistoryInput omitted. + +// se_ListRecordHistorySearchFilter omitted. + +// se_ListResourcesForTagOptionInput omitted. + +// se_ListServiceActionsForProvisioningArtifactInput omitted. + +// se_ListServiceActionsInput omitted. + +// se_ListStackInstancesForProvisionedProductInput omitted. + +// se_ListTagOptionsFilters omitted. + +// se_ListTagOptionsInput omitted. + +// se_NotificationArns omitted. + /** - * serializeAws_json1_1DescribeProvisionedProductPlanInput + * serializeAws_json1_1NotifyProvisionProductEngineWorkflowResultInput */ -const se_DescribeProvisionedProductPlanInput = ( - input: DescribeProvisionedProductPlanInput, +const se_NotifyProvisionProductEngineWorkflowResultInput = ( + input: NotifyProvisionProductEngineWorkflowResultInput, context: __SerdeContext ): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PlanId != null && { PlanId: input.PlanId }), - }; + return take(input, { + FailureReason: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Outputs: _json, + RecordId: [], + ResourceIdentifier: _json, + Status: [], + WorkflowToken: [], + }); }; /** - * serializeAws_json1_1DescribeProvisioningArtifactInput + * serializeAws_json1_1NotifyTerminateProvisionedProductEngineWorkflowResultInput */ -const se_DescribeProvisioningArtifactInput = ( - input: DescribeProvisioningArtifactInput, +const se_NotifyTerminateProvisionedProductEngineWorkflowResultInput = ( + input: NotifyTerminateProvisionedProductEngineWorkflowResultInput, context: __SerdeContext ): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningArtifactName != null && { ProvisioningArtifactName: input.ProvisioningArtifactName }), - ...(input.Verbose != null && { Verbose: input.Verbose }), - }; + return take(input, { + FailureReason: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + RecordId: [], + Status: [], + WorkflowToken: [], + }); }; /** - * serializeAws_json1_1DescribeProvisioningParametersInput + * serializeAws_json1_1NotifyUpdateProvisionedProductEngineWorkflowResultInput */ -const se_DescribeProvisioningParametersInput = ( - input: DescribeProvisioningParametersInput, +const se_NotifyUpdateProvisionedProductEngineWorkflowResultInput = ( + input: NotifyUpdateProvisionedProductEngineWorkflowResultInput, context: __SerdeContext ): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PathId != null && { PathId: input.PathId }), - ...(input.PathName != null && { PathName: input.PathName }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningArtifactName != null && { ProvisioningArtifactName: input.ProvisioningArtifactName }), - }; + return take(input, { + FailureReason: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Outputs: _json, + RecordId: [], + Status: [], + WorkflowToken: [], + }); }; -/** - * serializeAws_json1_1DescribeRecordInput - */ -const se_DescribeRecordInput = (input: DescribeRecordInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - }; -}; +// se_OrganizationNode omitted. + +// se_OutputKeys omitted. + +// se_ProductViewFilters omitted. + +// se_ProductViewFilterValues omitted. + +// se_ProvisionedProductFilters omitted. + +// se_ProvisionedProductProperties omitted. + +// se_ProvisionedProductViewFilterValues omitted. + +// se_ProvisioningArtifactInfo omitted. + +// se_ProvisioningArtifactProperties omitted. + +// se_ProvisioningParameter omitted. + +// se_ProvisioningParameters omitted. + +// se_ProvisioningPreferences omitted. /** - * serializeAws_json1_1DescribeServiceActionExecutionParametersInput + * serializeAws_json1_1ProvisionProductInput */ -const se_DescribeServiceActionExecutionParametersInput = ( - input: DescribeServiceActionExecutionParametersInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - ...(input.ServiceActionId != null && { ServiceActionId: input.ServiceActionId }), - }; +const se_ProvisionProductInput = (input: ProvisionProductInput, context: __SerdeContext): any => { + return take(input, { + AcceptLanguage: [], + NotificationArns: _json, + PathId: [], + PathName: [], + ProductId: [], + ProductName: [], + ProvisionToken: (_) => _ ?? generateIdempotencyToken(), + ProvisionedProductName: [], + ProvisioningArtifactId: [], + ProvisioningArtifactName: [], + ProvisioningParameters: _json, + ProvisioningPreferences: _json, + Tags: _json, + }); }; +// se_RecordOutput omitted. + +// se_RecordOutputs omitted. + +// se_RejectPortfolioShareInput omitted. + +// se_ScanProvisionedProductsInput omitted. + +// se_SearchProductsAsAdminInput omitted. + +// se_SearchProductsInput omitted. + +// se_SearchProvisionedProductsInput omitted. + +// se_ServiceActionAssociation omitted. + +// se_ServiceActionAssociations omitted. + +// se_ServiceActionDefinitionMap omitted. + +// se_SourceConnection omitted. + +// se_SourceConnectionParameters omitted. + +// se_SourceProvisioningArtifactProperties omitted. + +// se_SourceProvisioningArtifactPropertiesMap omitted. + +// se_StackSetAccounts omitted. + +// se_StackSetRegions omitted. + +// se_Tag omitted. + +// se_TagKeys omitted. + +// se_Tags omitted. + /** - * serializeAws_json1_1DescribeServiceActionInput + * serializeAws_json1_1TerminateProvisionedProductInput */ -const se_DescribeServiceActionInput = (input: DescribeServiceActionInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Id != null && { Id: input.Id }), - }; +const se_TerminateProvisionedProductInput = (input: TerminateProvisionedProductInput, context: __SerdeContext): any => { + return take(input, { + AcceptLanguage: [], + IgnoreErrors: [], + ProvisionedProductId: [], + ProvisionedProductName: [], + RetainPhysicalResources: [], + TerminateToken: (_) => _ ?? generateIdempotencyToken(), + }); }; +// se_UniqueTagResourceIdentifier omitted. + +// se_UpdateConstraintInput omitted. + +// se_UpdatePortfolioInput omitted. + +// se_UpdatePortfolioShareInput omitted. + +// se_UpdateProductInput omitted. + /** - * serializeAws_json1_1DescribeTagOptionInput + * serializeAws_json1_1UpdateProvisionedProductInput */ -const se_DescribeTagOptionInput = (input: DescribeTagOptionInput, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; +const se_UpdateProvisionedProductInput = (input: UpdateProvisionedProductInput, context: __SerdeContext): any => { + return take(input, { + AcceptLanguage: [], + PathId: [], + PathName: [], + ProductId: [], + ProductName: [], + ProvisionedProductId: [], + ProvisionedProductName: [], + ProvisioningArtifactId: [], + ProvisioningArtifactName: [], + ProvisioningParameters: _json, + ProvisioningPreferences: _json, + Tags: _json, + UpdateToken: (_) => _ ?? generateIdempotencyToken(), + }); }; /** - * serializeAws_json1_1DisableAWSOrganizationsAccessInput + * serializeAws_json1_1UpdateProvisionedProductPropertiesInput */ -const se_DisableAWSOrganizationsAccessInput = ( - input: DisableAWSOrganizationsAccessInput, +const se_UpdateProvisionedProductPropertiesInput = ( + input: UpdateProvisionedProductPropertiesInput, context: __SerdeContext ): any => { - return {}; + return take(input, { + AcceptLanguage: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + ProvisionedProductId: [], + ProvisionedProductProperties: _json, + }); }; +// se_UpdateProvisioningArtifactInput omitted. + +// se_UpdateProvisioningParameter omitted. + +// se_UpdateProvisioningParameters omitted. + +// se_UpdateProvisioningPreferences omitted. + +// se_UpdateServiceActionInput omitted. + +// se_UpdateTagOptionInput omitted. + +// de_AcceptPortfolioShareOutput omitted. + +// de_AccountIds omitted. + +// de_AllowedValues omitted. + +// de_AssociateBudgetWithResourceOutput omitted. + +// de_AssociatePrincipalWithPortfolioOutput omitted. + +// de_AssociateProductWithPortfolioOutput omitted. + +// de_AssociateServiceActionWithProvisioningArtifactOutput omitted. + +// de_AssociateTagOptionWithResourceOutput omitted. + +// de_BatchAssociateServiceActionWithProvisioningArtifactOutput omitted. + +// de_BatchDisassociateServiceActionFromProvisioningArtifactOutput omitted. + +// de_BudgetDetail omitted. + +// de_Budgets omitted. + +// de_CloudWatchDashboard omitted. + +// de_CloudWatchDashboards omitted. + +// de_CodeStarParameters omitted. + +// de_ConstraintDetail omitted. + +// de_ConstraintDetails omitted. + +// de_ConstraintSummaries omitted. + +// de_ConstraintSummary omitted. + +// de_CopyProductOutput omitted. + +// de_CreateConstraintOutput omitted. + /** - * serializeAws_json1_1DisassociateBudgetFromResourceInput + * deserializeAws_json1_1CreatePortfolioOutput */ -const se_DisassociateBudgetFromResourceInput = ( - input: DisassociateBudgetFromResourceInput, - context: __SerdeContext -): any => { - return { - ...(input.BudgetName != null && { BudgetName: input.BudgetName }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; +const de_CreatePortfolioOutput = (output: any, context: __SerdeContext): CreatePortfolioOutput => { + return take(output, { + PortfolioDetail: (_: any) => de_PortfolioDetail(_, context), + Tags: _json, + }) as any; }; +// de_CreatePortfolioShareOutput omitted. + /** - * serializeAws_json1_1DisassociatePrincipalFromPortfolioInput + * deserializeAws_json1_1CreateProductOutput */ -const se_DisassociatePrincipalFromPortfolioInput = ( - input: DisassociatePrincipalFromPortfolioInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.PrincipalARN != null && { PrincipalARN: input.PrincipalARN }), - ...(input.PrincipalType != null && { PrincipalType: input.PrincipalType }), - }; +const de_CreateProductOutput = (output: any, context: __SerdeContext): CreateProductOutput => { + return take(output, { + ProductViewDetail: (_: any) => de_ProductViewDetail(_, context), + ProvisioningArtifactDetail: (_: any) => de_ProvisioningArtifactDetail(_, context), + Tags: _json, + }) as any; }; +// de_CreateProvisionedProductPlanOutput omitted. + /** - * serializeAws_json1_1DisassociateProductFromPortfolioInput + * deserializeAws_json1_1CreateProvisioningArtifactOutput */ -const se_DisassociateProductFromPortfolioInput = ( - input: DisassociateProductFromPortfolioInput, +const de_CreateProvisioningArtifactOutput = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; +): CreateProvisioningArtifactOutput => { + return take(output, { + Info: _json, + ProvisioningArtifactDetail: (_: any) => de_ProvisioningArtifactDetail(_, context), + Status: __expectString, + }) as any; }; +// de_CreateServiceActionOutput omitted. + +// de_CreateTagOptionOutput omitted. + +// de_DeleteConstraintOutput omitted. + +// de_DeletePortfolioOutput omitted. + +// de_DeletePortfolioShareOutput omitted. + +// de_DeleteProductOutput omitted. + +// de_DeleteProvisionedProductPlanOutput omitted. + +// de_DeleteProvisioningArtifactOutput omitted. + +// de_DeleteServiceActionOutput omitted. + +// de_DeleteTagOptionOutput omitted. + +// de_DescribeConstraintOutput omitted. + +// de_DescribeCopyProductStatusOutput omitted. + /** - * serializeAws_json1_1DisassociateServiceActionFromProvisioningArtifactInput + * deserializeAws_json1_1DescribePortfolioOutput */ -const se_DisassociateServiceActionFromProvisioningArtifactInput = ( - input: DisassociateServiceActionFromProvisioningArtifactInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ServiceActionId != null && { ServiceActionId: input.ServiceActionId }), - }; +const de_DescribePortfolioOutput = (output: any, context: __SerdeContext): DescribePortfolioOutput => { + return take(output, { + Budgets: _json, + PortfolioDetail: (_: any) => de_PortfolioDetail(_, context), + TagOptions: _json, + Tags: _json, + }) as any; }; +// de_DescribePortfolioSharesOutput omitted. + +// de_DescribePortfolioShareStatusOutput omitted. + /** - * serializeAws_json1_1DisassociateTagOptionFromResourceInput + * deserializeAws_json1_1DescribeProductAsAdminOutput */ -const se_DisassociateTagOptionFromResourceInput = ( - input: DisassociateTagOptionFromResourceInput, - context: __SerdeContext -): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagOptionId != null && { TagOptionId: input.TagOptionId }), - }; +const de_DescribeProductAsAdminOutput = (output: any, context: __SerdeContext): DescribeProductAsAdminOutput => { + return take(output, { + Budgets: _json, + ProductViewDetail: (_: any) => de_ProductViewDetail(_, context), + ProvisioningArtifactSummaries: (_: any) => de_ProvisioningArtifactSummaries(_, context), + TagOptions: _json, + Tags: _json, + }) as any; }; /** - * serializeAws_json1_1EnableAWSOrganizationsAccessInput + * deserializeAws_json1_1DescribeProductOutput */ -const se_EnableAWSOrganizationsAccessInput = ( - input: EnableAWSOrganizationsAccessInput, - context: __SerdeContext -): any => { - return {}; +const de_DescribeProductOutput = (output: any, context: __SerdeContext): DescribeProductOutput => { + return take(output, { + Budgets: _json, + LaunchPaths: _json, + ProductViewSummary: _json, + ProvisioningArtifacts: (_: any) => de_ProvisioningArtifacts(_, context), + }) as any; }; /** - * serializeAws_json1_1EngineWorkflowResourceIdentifier + * deserializeAws_json1_1DescribeProductViewOutput */ -const se_EngineWorkflowResourceIdentifier = (input: EngineWorkflowResourceIdentifier, context: __SerdeContext): any => { - return { - ...(input.UniqueTag != null && { UniqueTag: se_UniqueTagResourceIdentifier(input.UniqueTag, context) }), - }; +const de_DescribeProductViewOutput = (output: any, context: __SerdeContext): DescribeProductViewOutput => { + return take(output, { + ProductViewSummary: _json, + ProvisioningArtifacts: (_: any) => de_ProvisioningArtifacts(_, context), + }) as any; }; /** - * serializeAws_json1_1ExecuteProvisionedProductPlanInput + * deserializeAws_json1_1DescribeProvisionedProductOutput */ -const se_ExecuteProvisionedProductPlanInput = ( - input: ExecuteProvisionedProductPlanInput, +const de_DescribeProvisionedProductOutput = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.PlanId != null && { PlanId: input.PlanId }), - }; +): DescribeProvisionedProductOutput => { + return take(output, { + CloudWatchDashboards: _json, + ProvisionedProductDetail: (_: any) => de_ProvisionedProductDetail(_, context), + }) as any; }; /** - * serializeAws_json1_1ExecuteProvisionedProductServiceActionInput + * deserializeAws_json1_1DescribeProvisionedProductPlanOutput */ -const se_ExecuteProvisionedProductServiceActionInput = ( - input: ExecuteProvisionedProductServiceActionInput, +const de_DescribeProvisionedProductPlanOutput = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ExecuteToken: input.ExecuteToken ?? generateIdempotencyToken(), - ...(input.Parameters != null && { Parameters: se_ExecutionParameterMap(input.Parameters, context) }), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - ...(input.ServiceActionId != null && { ServiceActionId: input.ServiceActionId }), - }; +): DescribeProvisionedProductPlanOutput => { + return take(output, { + NextPageToken: __expectString, + ProvisionedProductPlanDetails: (_: any) => de_ProvisionedProductPlanDetails(_, context), + ResourceChanges: _json, + }) as any; }; /** - * serializeAws_json1_1ExecutionParameterMap + * deserializeAws_json1_1DescribeProvisioningArtifactOutput */ -const se_ExecutionParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ExecutionParameterValueList(value, context); - return acc; - }, {}); +const de_DescribeProvisioningArtifactOutput = ( + output: any, + context: __SerdeContext +): DescribeProvisioningArtifactOutput => { + return take(output, { + Info: _json, + ProvisioningArtifactDetail: (_: any) => de_ProvisioningArtifactDetail(_, context), + Status: __expectString, + }) as any; }; +// de_DescribeProvisioningParametersOutput omitted. + /** - * serializeAws_json1_1ExecutionParameterValueList + * deserializeAws_json1_1DescribeRecordOutput */ -const se_ExecutionParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_DescribeRecordOutput = (output: any, context: __SerdeContext): DescribeRecordOutput => { + return take(output, { + NextPageToken: __expectString, + RecordDetail: (_: any) => de_RecordDetail(_, context), + RecordOutputs: _json, + }) as any; }; +// de_DescribeServiceActionExecutionParametersOutput omitted. + +// de_DescribeServiceActionOutput omitted. + +// de_DescribeTagOptionOutput omitted. + +// de_DisableAWSOrganizationsAccessOutput omitted. + +// de_DisassociateBudgetFromResourceOutput omitted. + +// de_DisassociatePrincipalFromPortfolioOutput omitted. + +// de_DisassociateProductFromPortfolioOutput omitted. + +// de_DisassociateServiceActionFromProvisioningArtifactOutput omitted. + +// de_DisassociateTagOptionFromResourceOutput omitted. + +// de_DuplicateResourceException omitted. + +// de_EnableAWSOrganizationsAccessOutput omitted. + /** - * serializeAws_json1_1GetAWSOrganizationsAccessStatusInput + * deserializeAws_json1_1ExecuteProvisionedProductPlanOutput */ -const se_GetAWSOrganizationsAccessStatusInput = ( - input: GetAWSOrganizationsAccessStatusInput, +const de_ExecuteProvisionedProductPlanOutput = ( + output: any, context: __SerdeContext -): any => { - return {}; +): ExecuteProvisionedProductPlanOutput => { + return take(output, { + RecordDetail: (_: any) => de_RecordDetail(_, context), + }) as any; }; /** - * serializeAws_json1_1GetProvisionedProductOutputsInput + * deserializeAws_json1_1ExecuteProvisionedProductServiceActionOutput */ -const se_GetProvisionedProductOutputsInput = ( - input: GetProvisionedProductOutputsInput, +const de_ExecuteProvisionedProductServiceActionOutput = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.OutputKeys != null && { OutputKeys: se_OutputKeys(input.OutputKeys, context) }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - ...(input.ProvisionedProductName != null && { ProvisionedProductName: input.ProvisionedProductName }), - }; +): ExecuteProvisionedProductServiceActionOutput => { + return take(output, { + RecordDetail: (_: any) => de_RecordDetail(_, context), + }) as any; }; -/** - * serializeAws_json1_1ImportAsProvisionedProductInput - */ -const se_ImportAsProvisionedProductInput = (input: ImportAsProvisionedProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.PhysicalId != null && { PhysicalId: input.PhysicalId }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisionedProductName != null && { ProvisionedProductName: input.ProvisionedProductName }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - }; -}; +// de_ExecutionParameter omitted. -/** - * serializeAws_json1_1ListAcceptedPortfolioSharesInput - */ -const se_ListAcceptedPortfolioSharesInput = (input: ListAcceptedPortfolioSharesInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioShareType != null && { PortfolioShareType: input.PortfolioShareType }), - }; -}; +// de_ExecutionParameters omitted. -/** - * serializeAws_json1_1ListBudgetsForResourceInput - */ -const se_ListBudgetsForResourceInput = (input: ListBudgetsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// de_ExecutionParameterValueList omitted. + +// de_FailedServiceActionAssociation omitted. + +// de_FailedServiceActionAssociations omitted. + +// de_GetAWSOrganizationsAccessStatusOutput omitted. + +// de_GetProvisionedProductOutputsOutput omitted. /** - * serializeAws_json1_1ListConstraintsForPortfolioInput + * deserializeAws_json1_1ImportAsProvisionedProductOutput */ -const se_ListConstraintsForPortfolioInput = (input: ListConstraintsForPortfolioInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; +const de_ImportAsProvisionedProductOutput = ( + output: any, + context: __SerdeContext +): ImportAsProvisionedProductOutput => { + return take(output, { + RecordDetail: (_: any) => de_RecordDetail(_, context), + }) as any; }; +// de_InvalidParametersException omitted. + +// de_InvalidStateException omitted. + /** - * serializeAws_json1_1ListLaunchPathsInput + * deserializeAws_json1_1LastSync */ -const se_ListLaunchPathsInput = (input: ListLaunchPathsInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; +const de_LastSync = (output: any, context: __SerdeContext): LastSync => { + return take(output, { + LastSuccessfulSyncProvisioningArtifactId: __expectString, + LastSuccessfulSyncTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSyncStatus: __expectString, + LastSyncStatusMessage: __expectString, + LastSyncTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_LaunchPath omitted. + +// de_LaunchPaths omitted. + +// de_LaunchPathSummaries omitted. + +// de_LaunchPathSummary omitted. + +// de_LimitExceededException omitted. + /** - * serializeAws_json1_1ListOrganizationPortfolioAccessInput + * deserializeAws_json1_1ListAcceptedPortfolioSharesOutput */ -const se_ListOrganizationPortfolioAccessInput = ( - input: ListOrganizationPortfolioAccessInput, +const de_ListAcceptedPortfolioSharesOutput = ( + output: any, context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.OrganizationNodeType != null && { OrganizationNodeType: input.OrganizationNodeType }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - }; +): ListAcceptedPortfolioSharesOutput => { + return take(output, { + NextPageToken: __expectString, + PortfolioDetails: (_: any) => de_PortfolioDetails(_, context), + }) as any; }; +// de_ListBudgetsForResourceOutput omitted. + +// de_ListConstraintsForPortfolioOutput omitted. + +// de_ListLaunchPathsOutput omitted. + +// de_ListOrganizationPortfolioAccessOutput omitted. + +// de_ListPortfolioAccessOutput omitted. + /** - * serializeAws_json1_1ListPortfolioAccessInput + * deserializeAws_json1_1ListPortfoliosForProductOutput */ -const se_ListPortfolioAccessInput = (input: ListPortfolioAccessInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.OrganizationParentId != null && { OrganizationParentId: input.OrganizationParentId }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - }; +const de_ListPortfoliosForProductOutput = (output: any, context: __SerdeContext): ListPortfoliosForProductOutput => { + return take(output, { + NextPageToken: __expectString, + PortfolioDetails: (_: any) => de_PortfolioDetails(_, context), + }) as any; }; /** - * serializeAws_json1_1ListPortfoliosForProductInput + * deserializeAws_json1_1ListPortfoliosOutput */ -const se_ListPortfoliosForProductInput = (input: ListPortfoliosForProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; +const de_ListPortfoliosOutput = (output: any, context: __SerdeContext): ListPortfoliosOutput => { + return take(output, { + NextPageToken: __expectString, + PortfolioDetails: (_: any) => de_PortfolioDetails(_, context), + }) as any; }; -/** - * serializeAws_json1_1ListPortfoliosInput - */ -const se_ListPortfoliosInput = (input: ListPortfoliosInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - }; -}; - -/** - * serializeAws_json1_1ListPrincipalsForPortfolioInput - */ -const se_ListPrincipalsForPortfolioInput = (input: ListPrincipalsForPortfolioInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - }; -}; - -/** - * serializeAws_json1_1ListProvisionedProductPlansInput - */ -const se_ListProvisionedProductPlansInput = (input: ListProvisionedProductPlansInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccessLevelFilter != null && { - AccessLevelFilter: se_AccessLevelFilter(input.AccessLevelFilter, context), - }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ProvisionProductId != null && { ProvisionProductId: input.ProvisionProductId }), - }; -}; - -/** - * serializeAws_json1_1ListProvisioningArtifactsForServiceActionInput - */ -const se_ListProvisioningArtifactsForServiceActionInput = ( - input: ListProvisioningArtifactsForServiceActionInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ServiceActionId != null && { ServiceActionId: input.ServiceActionId }), - }; -}; - -/** - * serializeAws_json1_1ListProvisioningArtifactsInput - */ -const se_ListProvisioningArtifactsInput = (input: ListProvisioningArtifactsInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - }; -}; - -/** - * serializeAws_json1_1ListRecordHistoryInput - */ -const se_ListRecordHistoryInput = (input: ListRecordHistoryInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccessLevelFilter != null && { - AccessLevelFilter: se_AccessLevelFilter(input.AccessLevelFilter, context), - }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.SearchFilter != null && { SearchFilter: se_ListRecordHistorySearchFilter(input.SearchFilter, context) }), - }; -}; - -/** - * serializeAws_json1_1ListRecordHistorySearchFilter - */ -const se_ListRecordHistorySearchFilter = (input: ListRecordHistorySearchFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ListResourcesForTagOptionInput - */ -const se_ListResourcesForTagOptionInput = (input: ListResourcesForTagOptionInput, context: __SerdeContext): any => { - return { - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.TagOptionId != null && { TagOptionId: input.TagOptionId }), - }; -}; - -/** - * serializeAws_json1_1ListServiceActionsForProvisioningArtifactInput - */ -const se_ListServiceActionsForProvisioningArtifactInput = ( - input: ListServiceActionsForProvisioningArtifactInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - }; -}; - -/** - * serializeAws_json1_1ListServiceActionsInput - */ -const se_ListServiceActionsInput = (input: ListServiceActionsInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - }; -}; - -/** - * serializeAws_json1_1ListStackInstancesForProvisionedProductInput - */ -const se_ListStackInstancesForProvisionedProductInput = ( - input: ListStackInstancesForProvisionedProductInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - }; -}; - -/** - * serializeAws_json1_1ListTagOptionsFilters - */ -const se_ListTagOptionsFilters = (input: ListTagOptionsFilters, context: __SerdeContext): any => { - return { - ...(input.Active != null && { Active: input.Active }), - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ListTagOptionsInput - */ -const se_ListTagOptionsInput = (input: ListTagOptionsInput, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ListTagOptionsFilters(input.Filters, context) }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - }; -}; - -/** - * serializeAws_json1_1NotificationArns - */ -const se_NotificationArns = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1NotifyProvisionProductEngineWorkflowResultInput - */ -const se_NotifyProvisionProductEngineWorkflowResultInput = ( - input: NotifyProvisionProductEngineWorkflowResultInput, - context: __SerdeContext -): any => { - return { - ...(input.FailureReason != null && { FailureReason: input.FailureReason }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Outputs != null && { Outputs: se_RecordOutputs(input.Outputs, context) }), - ...(input.RecordId != null && { RecordId: input.RecordId }), - ...(input.ResourceIdentifier != null && { - ResourceIdentifier: se_EngineWorkflowResourceIdentifier(input.ResourceIdentifier, context), - }), - ...(input.Status != null && { Status: input.Status }), - ...(input.WorkflowToken != null && { WorkflowToken: input.WorkflowToken }), - }; -}; - -/** - * serializeAws_json1_1NotifyTerminateProvisionedProductEngineWorkflowResultInput - */ -const se_NotifyTerminateProvisionedProductEngineWorkflowResultInput = ( - input: NotifyTerminateProvisionedProductEngineWorkflowResultInput, - context: __SerdeContext -): any => { - return { - ...(input.FailureReason != null && { FailureReason: input.FailureReason }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.RecordId != null && { RecordId: input.RecordId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.WorkflowToken != null && { WorkflowToken: input.WorkflowToken }), - }; -}; - -/** - * serializeAws_json1_1NotifyUpdateProvisionedProductEngineWorkflowResultInput - */ -const se_NotifyUpdateProvisionedProductEngineWorkflowResultInput = ( - input: NotifyUpdateProvisionedProductEngineWorkflowResultInput, - context: __SerdeContext -): any => { - return { - ...(input.FailureReason != null && { FailureReason: input.FailureReason }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Outputs != null && { Outputs: se_RecordOutputs(input.Outputs, context) }), - ...(input.RecordId != null && { RecordId: input.RecordId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.WorkflowToken != null && { WorkflowToken: input.WorkflowToken }), - }; -}; - -/** - * serializeAws_json1_1OrganizationNode - */ -const se_OrganizationNode = (input: OrganizationNode, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1OutputKeys - */ -const se_OutputKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProductViewFilters - */ -const se_ProductViewFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [ProductViewFilterBy | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ProductViewFilterValues(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ProductViewFilterValues - */ -const se_ProductViewFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProvisionedProductFilters - */ -const se_ProvisionedProductFilters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [ProvisionedProductViewFilterBy | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ProvisionedProductViewFilterValues(value, context); - return acc; - }, - {} - ); -}; - -/** - * serializeAws_json1_1ProvisionedProductProperties - */ -const se_ProvisionedProductProperties = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [PropertyKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ProvisionedProductViewFilterValues - */ -const se_ProvisionedProductViewFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProvisioningArtifactInfo - */ -const se_ProvisioningArtifactInfo = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ProvisioningArtifactProperties - */ -const se_ProvisioningArtifactProperties = (input: ProvisioningArtifactProperties, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DisableTemplateValidation != null && { DisableTemplateValidation: input.DisableTemplateValidation }), - ...(input.Info != null && { Info: se_ProvisioningArtifactInfo(input.Info, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1ProvisioningParameter - */ -const se_ProvisioningParameter = (input: ProvisioningParameter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ProvisioningParameters - */ -const se_ProvisioningParameters = (input: ProvisioningParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ProvisioningParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ProvisioningPreferences - */ -const se_ProvisioningPreferences = (input: ProvisioningPreferences, context: __SerdeContext): any => { - return { - ...(input.StackSetAccounts != null && { StackSetAccounts: se_StackSetAccounts(input.StackSetAccounts, context) }), - ...(input.StackSetFailureToleranceCount != null && { - StackSetFailureToleranceCount: input.StackSetFailureToleranceCount, - }), - ...(input.StackSetFailureTolerancePercentage != null && { - StackSetFailureTolerancePercentage: input.StackSetFailureTolerancePercentage, - }), - ...(input.StackSetMaxConcurrencyCount != null && { - StackSetMaxConcurrencyCount: input.StackSetMaxConcurrencyCount, - }), - ...(input.StackSetMaxConcurrencyPercentage != null && { - StackSetMaxConcurrencyPercentage: input.StackSetMaxConcurrencyPercentage, - }), - ...(input.StackSetRegions != null && { StackSetRegions: se_StackSetRegions(input.StackSetRegions, context) }), - }; -}; - -/** - * serializeAws_json1_1ProvisionProductInput - */ -const se_ProvisionProductInput = (input: ProvisionProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.NotificationArns != null && { NotificationArns: se_NotificationArns(input.NotificationArns, context) }), - ...(input.PathId != null && { PathId: input.PathId }), - ...(input.PathName != null && { PathName: input.PathName }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ProvisionToken: input.ProvisionToken ?? generateIdempotencyToken(), - ...(input.ProvisionedProductName != null && { ProvisionedProductName: input.ProvisionedProductName }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningArtifactName != null && { ProvisioningArtifactName: input.ProvisioningArtifactName }), - ...(input.ProvisioningParameters != null && { - ProvisioningParameters: se_ProvisioningParameters(input.ProvisioningParameters, context), - }), - ...(input.ProvisioningPreferences != null && { - ProvisioningPreferences: se_ProvisioningPreferences(input.ProvisioningPreferences, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1RecordOutput - */ -const se_RecordOutput = (input: RecordOutput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.OutputKey != null && { OutputKey: input.OutputKey }), - ...(input.OutputValue != null && { OutputValue: input.OutputValue }), - }; -}; - -/** - * serializeAws_json1_1RecordOutputs - */ -const se_RecordOutputs = (input: RecordOutput[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RecordOutput(entry, context); - }); -}; - -/** - * serializeAws_json1_1RejectPortfolioShareInput - */ -const se_RejectPortfolioShareInput = (input: RejectPortfolioShareInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.PortfolioShareType != null && { PortfolioShareType: input.PortfolioShareType }), - }; -}; - -/** - * serializeAws_json1_1ScanProvisionedProductsInput - */ -const se_ScanProvisionedProductsInput = (input: ScanProvisionedProductsInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccessLevelFilter != null && { - AccessLevelFilter: se_AccessLevelFilter(input.AccessLevelFilter, context), - }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - }; -}; - -/** - * serializeAws_json1_1SearchProductsAsAdminInput - */ -const se_SearchProductsAsAdminInput = (input: SearchProductsAsAdminInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Filters != null && { Filters: se_ProductViewFilters(input.Filters, context) }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.ProductSource != null && { ProductSource: input.ProductSource }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1SearchProductsInput - */ -const se_SearchProductsInput = (input: SearchProductsInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Filters != null && { Filters: se_ProductViewFilters(input.Filters, context) }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1SearchProvisionedProductsInput - */ -const se_SearchProvisionedProductsInput = (input: SearchProvisionedProductsInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccessLevelFilter != null && { - AccessLevelFilter: se_AccessLevelFilter(input.AccessLevelFilter, context), - }), - ...(input.Filters != null && { Filters: se_ProvisionedProductFilters(input.Filters, context) }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - ...(input.PageToken != null && { PageToken: input.PageToken }), - ...(input.SortBy != null && { SortBy: input.SortBy }), - ...(input.SortOrder != null && { SortOrder: input.SortOrder }), - }; -}; - -/** - * serializeAws_json1_1ServiceActionAssociation - */ -const se_ServiceActionAssociation = (input: ServiceActionAssociation, context: __SerdeContext): any => { - return { - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ServiceActionId != null && { ServiceActionId: input.ServiceActionId }), - }; -}; - -/** - * serializeAws_json1_1ServiceActionAssociations - */ -const se_ServiceActionAssociations = (input: ServiceActionAssociation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServiceActionAssociation(entry, context); - }); -}; - -/** - * serializeAws_json1_1ServiceActionDefinitionMap - */ -const se_ServiceActionDefinitionMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [ServiceActionDefinitionKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; - -/** - * serializeAws_json1_1SourceConnection - */ -const se_SourceConnection = (input: SourceConnection, context: __SerdeContext): any => { - return { - ...(input.ConnectionParameters != null && { - ConnectionParameters: se_SourceConnectionParameters(input.ConnectionParameters, context), - }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1SourceConnectionParameters - */ -const se_SourceConnectionParameters = (input: SourceConnectionParameters, context: __SerdeContext): any => { - return { - ...(input.CodeStar != null && { CodeStar: se_CodeStarParameters(input.CodeStar, context) }), - }; -}; - -/** - * serializeAws_json1_1SourceProvisioningArtifactProperties - */ -const se_SourceProvisioningArtifactProperties = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SourceProvisioningArtifactPropertiesMap(entry, context); - }); -}; - -/** - * serializeAws_json1_1SourceProvisioningArtifactPropertiesMap - */ -const se_SourceProvisioningArtifactPropertiesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [ProvisioningArtifactPropertyName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; - -/** - * serializeAws_json1_1StackSetAccounts - */ -const se_StackSetAccounts = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StackSetRegions - */ -const se_StackSetRegions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TerminateProvisionedProductInput - */ -const se_TerminateProvisionedProductInput = (input: TerminateProvisionedProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.IgnoreErrors != null && { IgnoreErrors: input.IgnoreErrors }), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - ...(input.ProvisionedProductName != null && { ProvisionedProductName: input.ProvisionedProductName }), - ...(input.RetainPhysicalResources != null && { RetainPhysicalResources: input.RetainPhysicalResources }), - TerminateToken: input.TerminateToken ?? generateIdempotencyToken(), - }; -}; - -/** - * serializeAws_json1_1UniqueTagResourceIdentifier - */ -const se_UniqueTagResourceIdentifier = (input: UniqueTagResourceIdentifier, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1UpdateConstraintInput - */ -const se_UpdateConstraintInput = (input: UpdateConstraintInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Parameters != null && { Parameters: input.Parameters }), - }; -}; - -/** - * serializeAws_json1_1UpdatePortfolioInput - */ -const se_UpdatePortfolioInput = (input: UpdatePortfolioInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AddTags != null && { AddTags: se_AddTags(input.AddTags, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Id != null && { Id: input.Id }), - ...(input.ProviderName != null && { ProviderName: input.ProviderName }), - ...(input.RemoveTags != null && { RemoveTags: se_TagKeys(input.RemoveTags, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdatePortfolioShareInput - */ -const se_UpdatePortfolioShareInput = (input: UpdatePortfolioShareInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.OrganizationNode != null && { OrganizationNode: se_OrganizationNode(input.OrganizationNode, context) }), - ...(input.PortfolioId != null && { PortfolioId: input.PortfolioId }), - ...(input.SharePrincipals != null && { SharePrincipals: input.SharePrincipals }), - ...(input.ShareTagOptions != null && { ShareTagOptions: input.ShareTagOptions }), - }; -}; - -/** - * serializeAws_json1_1UpdateProductInput - */ -const se_UpdateProductInput = (input: UpdateProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.AddTags != null && { AddTags: se_AddTags(input.AddTags, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Distributor != null && { Distributor: input.Distributor }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Owner != null && { Owner: input.Owner }), - ...(input.RemoveTags != null && { RemoveTags: se_TagKeys(input.RemoveTags, context) }), - ...(input.SourceConnection != null && { SourceConnection: se_SourceConnection(input.SourceConnection, context) }), - ...(input.SupportDescription != null && { SupportDescription: input.SupportDescription }), - ...(input.SupportEmail != null && { SupportEmail: input.SupportEmail }), - ...(input.SupportUrl != null && { SupportUrl: input.SupportUrl }), - }; -}; - -/** - * serializeAws_json1_1UpdateProvisionedProductInput - */ -const se_UpdateProvisionedProductInput = (input: UpdateProvisionedProductInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.PathId != null && { PathId: input.PathId }), - ...(input.PathName != null && { PathName: input.PathName }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProductName != null && { ProductName: input.ProductName }), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - ...(input.ProvisionedProductName != null && { ProvisionedProductName: input.ProvisionedProductName }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - ...(input.ProvisioningArtifactName != null && { ProvisioningArtifactName: input.ProvisioningArtifactName }), - ...(input.ProvisioningParameters != null && { - ProvisioningParameters: se_UpdateProvisioningParameters(input.ProvisioningParameters, context), - }), - ...(input.ProvisioningPreferences != null && { - ProvisioningPreferences: se_UpdateProvisioningPreferences(input.ProvisioningPreferences, context), - }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - UpdateToken: input.UpdateToken ?? generateIdempotencyToken(), - }; -}; - -/** - * serializeAws_json1_1UpdateProvisionedProductPropertiesInput - */ -const se_UpdateProvisionedProductPropertiesInput = ( - input: UpdateProvisionedProductPropertiesInput, - context: __SerdeContext -): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.ProvisionedProductId != null && { ProvisionedProductId: input.ProvisionedProductId }), - ...(input.ProvisionedProductProperties != null && { - ProvisionedProductProperties: se_ProvisionedProductProperties(input.ProvisionedProductProperties, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateProvisioningArtifactInput - */ -const se_UpdateProvisioningArtifactInput = (input: UpdateProvisioningArtifactInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Active != null && { Active: input.Active }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Guidance != null && { Guidance: input.Guidance }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ProductId != null && { ProductId: input.ProductId }), - ...(input.ProvisioningArtifactId != null && { ProvisioningArtifactId: input.ProvisioningArtifactId }), - }; -}; - -/** - * serializeAws_json1_1UpdateProvisioningParameter - */ -const se_UpdateProvisioningParameter = (input: UpdateProvisioningParameter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.UsePreviousValue != null && { UsePreviousValue: input.UsePreviousValue }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1UpdateProvisioningParameters - */ -const se_UpdateProvisioningParameters = (input: UpdateProvisioningParameter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateProvisioningParameter(entry, context); - }); -}; - -/** - * serializeAws_json1_1UpdateProvisioningPreferences - */ -const se_UpdateProvisioningPreferences = (input: UpdateProvisioningPreferences, context: __SerdeContext): any => { - return { - ...(input.StackSetAccounts != null && { StackSetAccounts: se_StackSetAccounts(input.StackSetAccounts, context) }), - ...(input.StackSetFailureToleranceCount != null && { - StackSetFailureToleranceCount: input.StackSetFailureToleranceCount, - }), - ...(input.StackSetFailureTolerancePercentage != null && { - StackSetFailureTolerancePercentage: input.StackSetFailureTolerancePercentage, - }), - ...(input.StackSetMaxConcurrencyCount != null && { - StackSetMaxConcurrencyCount: input.StackSetMaxConcurrencyCount, - }), - ...(input.StackSetMaxConcurrencyPercentage != null && { - StackSetMaxConcurrencyPercentage: input.StackSetMaxConcurrencyPercentage, - }), - ...(input.StackSetOperationType != null && { StackSetOperationType: input.StackSetOperationType }), - ...(input.StackSetRegions != null && { StackSetRegions: se_StackSetRegions(input.StackSetRegions, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateServiceActionInput - */ -const se_UpdateServiceActionInput = (input: UpdateServiceActionInput, context: __SerdeContext): any => { - return { - ...(input.AcceptLanguage != null && { AcceptLanguage: input.AcceptLanguage }), - ...(input.Definition != null && { Definition: se_ServiceActionDefinitionMap(input.Definition, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateTagOptionInput - */ -const se_UpdateTagOptionInput = (input: UpdateTagOptionInput, context: __SerdeContext): any => { - return { - ...(input.Active != null && { Active: input.Active }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * deserializeAws_json1_1AcceptPortfolioShareOutput - */ -const de_AcceptPortfolioShareOutput = (output: any, context: __SerdeContext): AcceptPortfolioShareOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AccountIds - */ -const de_AccountIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AllowedValues - */ -const de_AllowedValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociateBudgetWithResourceOutput - */ -const de_AssociateBudgetWithResourceOutput = ( - output: any, - context: __SerdeContext -): AssociateBudgetWithResourceOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociatePrincipalWithPortfolioOutput - */ -const de_AssociatePrincipalWithPortfolioOutput = ( - output: any, - context: __SerdeContext -): AssociatePrincipalWithPortfolioOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateProductWithPortfolioOutput - */ -const de_AssociateProductWithPortfolioOutput = ( - output: any, - context: __SerdeContext -): AssociateProductWithPortfolioOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateServiceActionWithProvisioningArtifactOutput - */ -const de_AssociateServiceActionWithProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): AssociateServiceActionWithProvisioningArtifactOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateTagOptionWithResourceOutput - */ -const de_AssociateTagOptionWithResourceOutput = ( - output: any, - context: __SerdeContext -): AssociateTagOptionWithResourceOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1BatchAssociateServiceActionWithProvisioningArtifactOutput - */ -const de_BatchAssociateServiceActionWithProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): BatchAssociateServiceActionWithProvisioningArtifactOutput => { - return { - FailedServiceActionAssociations: - output.FailedServiceActionAssociations != null - ? de_FailedServiceActionAssociations(output.FailedServiceActionAssociations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BatchDisassociateServiceActionFromProvisioningArtifactOutput - */ -const de_BatchDisassociateServiceActionFromProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): BatchDisassociateServiceActionFromProvisioningArtifactOutput => { - return { - FailedServiceActionAssociations: - output.FailedServiceActionAssociations != null - ? de_FailedServiceActionAssociations(output.FailedServiceActionAssociations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1BudgetDetail - */ -const de_BudgetDetail = (output: any, context: __SerdeContext): BudgetDetail => { - return { - BudgetName: __expectString(output.BudgetName), - } as any; -}; - -/** - * deserializeAws_json1_1Budgets - */ -const de_Budgets = (output: any, context: __SerdeContext): BudgetDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BudgetDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CloudWatchDashboard - */ -const de_CloudWatchDashboard = (output: any, context: __SerdeContext): CloudWatchDashboard => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1CloudWatchDashboards - */ -const de_CloudWatchDashboards = (output: any, context: __SerdeContext): CloudWatchDashboard[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchDashboard(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CodeStarParameters - */ -const de_CodeStarParameters = (output: any, context: __SerdeContext): CodeStarParameters => { - return { - ArtifactPath: __expectString(output.ArtifactPath), - Branch: __expectString(output.Branch), - ConnectionArn: __expectString(output.ConnectionArn), - Repository: __expectString(output.Repository), - } as any; -}; - -/** - * deserializeAws_json1_1ConstraintDetail - */ -const de_ConstraintDetail = (output: any, context: __SerdeContext): ConstraintDetail => { - return { - ConstraintId: __expectString(output.ConstraintId), - Description: __expectString(output.Description), - Owner: __expectString(output.Owner), - PortfolioId: __expectString(output.PortfolioId), - ProductId: __expectString(output.ProductId), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ConstraintDetails - */ -const de_ConstraintDetails = (output: any, context: __SerdeContext): ConstraintDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConstraintDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConstraintSummaries - */ -const de_ConstraintSummaries = (output: any, context: __SerdeContext): ConstraintSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConstraintSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConstraintSummary - */ -const de_ConstraintSummary = (output: any, context: __SerdeContext): ConstraintSummary => { - return { - Description: __expectString(output.Description), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1CopyProductOutput - */ -const de_CopyProductOutput = (output: any, context: __SerdeContext): CopyProductOutput => { - return { - CopyProductToken: __expectString(output.CopyProductToken), - } as any; -}; - -/** - * deserializeAws_json1_1CreateConstraintOutput - */ -const de_CreateConstraintOutput = (output: any, context: __SerdeContext): CreateConstraintOutput => { - return { - ConstraintDetail: - output.ConstraintDetail != null ? de_ConstraintDetail(output.ConstraintDetail, context) : undefined, - ConstraintParameters: __expectString(output.ConstraintParameters), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePortfolioOutput - */ -const de_CreatePortfolioOutput = (output: any, context: __SerdeContext): CreatePortfolioOutput => { - return { - PortfolioDetail: output.PortfolioDetail != null ? de_PortfolioDetail(output.PortfolioDetail, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreatePortfolioShareOutput - */ -const de_CreatePortfolioShareOutput = (output: any, context: __SerdeContext): CreatePortfolioShareOutput => { - return { - PortfolioShareToken: __expectString(output.PortfolioShareToken), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProductOutput - */ -const de_CreateProductOutput = (output: any, context: __SerdeContext): CreateProductOutput => { - return { - ProductViewDetail: - output.ProductViewDetail != null ? de_ProductViewDetail(output.ProductViewDetail, context) : undefined, - ProvisioningArtifactDetail: - output.ProvisioningArtifactDetail != null - ? de_ProvisioningArtifactDetail(output.ProvisioningArtifactDetail, context) - : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateProvisionedProductPlanOutput - */ -const de_CreateProvisionedProductPlanOutput = ( - output: any, - context: __SerdeContext -): CreateProvisionedProductPlanOutput => { - return { - PlanId: __expectString(output.PlanId), - PlanName: __expectString(output.PlanName), - ProvisionProductId: __expectString(output.ProvisionProductId), - ProvisionedProductName: __expectString(output.ProvisionedProductName), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateProvisioningArtifactOutput - */ -const de_CreateProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): CreateProvisioningArtifactOutput => { - return { - Info: output.Info != null ? de_ProvisioningArtifactInfo(output.Info, context) : undefined, - ProvisioningArtifactDetail: - output.ProvisioningArtifactDetail != null - ? de_ProvisioningArtifactDetail(output.ProvisioningArtifactDetail, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1CreateServiceActionOutput - */ -const de_CreateServiceActionOutput = (output: any, context: __SerdeContext): CreateServiceActionOutput => { - return { - ServiceActionDetail: - output.ServiceActionDetail != null ? de_ServiceActionDetail(output.ServiceActionDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTagOptionOutput - */ -const de_CreateTagOptionOutput = (output: any, context: __SerdeContext): CreateTagOptionOutput => { - return { - TagOptionDetail: output.TagOptionDetail != null ? de_TagOptionDetail(output.TagOptionDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteConstraintOutput - */ -const de_DeleteConstraintOutput = (output: any, context: __SerdeContext): DeleteConstraintOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeletePortfolioOutput - */ -const de_DeletePortfolioOutput = (output: any, context: __SerdeContext): DeletePortfolioOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeletePortfolioShareOutput - */ -const de_DeletePortfolioShareOutput = (output: any, context: __SerdeContext): DeletePortfolioShareOutput => { - return { - PortfolioShareToken: __expectString(output.PortfolioShareToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteProductOutput - */ -const de_DeleteProductOutput = (output: any, context: __SerdeContext): DeleteProductOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteProvisionedProductPlanOutput - */ -const de_DeleteProvisionedProductPlanOutput = ( - output: any, - context: __SerdeContext -): DeleteProvisionedProductPlanOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteProvisioningArtifactOutput - */ -const de_DeleteProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): DeleteProvisioningArtifactOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteServiceActionOutput - */ -const de_DeleteServiceActionOutput = (output: any, context: __SerdeContext): DeleteServiceActionOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteTagOptionOutput - */ -const de_DeleteTagOptionOutput = (output: any, context: __SerdeContext): DeleteTagOptionOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeConstraintOutput - */ -const de_DescribeConstraintOutput = (output: any, context: __SerdeContext): DescribeConstraintOutput => { - return { - ConstraintDetail: - output.ConstraintDetail != null ? de_ConstraintDetail(output.ConstraintDetail, context) : undefined, - ConstraintParameters: __expectString(output.ConstraintParameters), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCopyProductStatusOutput - */ -const de_DescribeCopyProductStatusOutput = (output: any, context: __SerdeContext): DescribeCopyProductStatusOutput => { - return { - CopyProductStatus: __expectString(output.CopyProductStatus), - StatusDetail: __expectString(output.StatusDetail), - TargetProductId: __expectString(output.TargetProductId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePortfolioOutput - */ -const de_DescribePortfolioOutput = (output: any, context: __SerdeContext): DescribePortfolioOutput => { - return { - Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined, - PortfolioDetail: output.PortfolioDetail != null ? de_PortfolioDetail(output.PortfolioDetail, context) : undefined, - TagOptions: output.TagOptions != null ? de_TagOptionDetails(output.TagOptions, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePortfolioSharesOutput - */ -const de_DescribePortfolioSharesOutput = (output: any, context: __SerdeContext): DescribePortfolioSharesOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - PortfolioShareDetails: - output.PortfolioShareDetails != null - ? de_PortfolioShareDetails(output.PortfolioShareDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePortfolioShareStatusOutput - */ -const de_DescribePortfolioShareStatusOutput = ( - output: any, - context: __SerdeContext -): DescribePortfolioShareStatusOutput => { - return { - OrganizationNodeValue: __expectString(output.OrganizationNodeValue), - PortfolioId: __expectString(output.PortfolioId), - PortfolioShareToken: __expectString(output.PortfolioShareToken), - ShareDetails: output.ShareDetails != null ? de_ShareDetails(output.ShareDetails, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProductAsAdminOutput - */ -const de_DescribeProductAsAdminOutput = (output: any, context: __SerdeContext): DescribeProductAsAdminOutput => { - return { - Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined, - ProductViewDetail: - output.ProductViewDetail != null ? de_ProductViewDetail(output.ProductViewDetail, context) : undefined, - ProvisioningArtifactSummaries: - output.ProvisioningArtifactSummaries != null - ? de_ProvisioningArtifactSummaries(output.ProvisioningArtifactSummaries, context) - : undefined, - TagOptions: output.TagOptions != null ? de_TagOptionDetails(output.TagOptions, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProductOutput - */ -const de_DescribeProductOutput = (output: any, context: __SerdeContext): DescribeProductOutput => { - return { - Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined, - LaunchPaths: output.LaunchPaths != null ? de_LaunchPaths(output.LaunchPaths, context) : undefined, - ProductViewSummary: - output.ProductViewSummary != null ? de_ProductViewSummary(output.ProductViewSummary, context) : undefined, - ProvisioningArtifacts: - output.ProvisioningArtifacts != null - ? de_ProvisioningArtifacts(output.ProvisioningArtifacts, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProductViewOutput - */ -const de_DescribeProductViewOutput = (output: any, context: __SerdeContext): DescribeProductViewOutput => { - return { - ProductViewSummary: - output.ProductViewSummary != null ? de_ProductViewSummary(output.ProductViewSummary, context) : undefined, - ProvisioningArtifacts: - output.ProvisioningArtifacts != null - ? de_ProvisioningArtifacts(output.ProvisioningArtifacts, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProvisionedProductOutput - */ -const de_DescribeProvisionedProductOutput = ( - output: any, - context: __SerdeContext -): DescribeProvisionedProductOutput => { - return { - CloudWatchDashboards: - output.CloudWatchDashboards != null ? de_CloudWatchDashboards(output.CloudWatchDashboards, context) : undefined, - ProvisionedProductDetail: - output.ProvisionedProductDetail != null - ? de_ProvisionedProductDetail(output.ProvisionedProductDetail, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProvisionedProductPlanOutput - */ -const de_DescribeProvisionedProductPlanOutput = ( - output: any, - context: __SerdeContext -): DescribeProvisionedProductPlanOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProvisionedProductPlanDetails: - output.ProvisionedProductPlanDetails != null - ? de_ProvisionedProductPlanDetails(output.ProvisionedProductPlanDetails, context) - : undefined, - ResourceChanges: output.ResourceChanges != null ? de_ResourceChanges(output.ResourceChanges, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProvisioningArtifactOutput - */ -const de_DescribeProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): DescribeProvisioningArtifactOutput => { - return { - Info: output.Info != null ? de_ProvisioningArtifactInfo(output.Info, context) : undefined, - ProvisioningArtifactDetail: - output.ProvisioningArtifactDetail != null - ? de_ProvisioningArtifactDetail(output.ProvisioningArtifactDetail, context) - : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProvisioningParametersOutput - */ -const de_DescribeProvisioningParametersOutput = ( - output: any, - context: __SerdeContext -): DescribeProvisioningParametersOutput => { - return { - ConstraintSummaries: - output.ConstraintSummaries != null ? de_ConstraintSummaries(output.ConstraintSummaries, context) : undefined, - ProvisioningArtifactOutputKeys: - output.ProvisioningArtifactOutputKeys != null - ? de_ProvisioningArtifactOutputs(output.ProvisioningArtifactOutputKeys, context) - : undefined, - ProvisioningArtifactOutputs: - output.ProvisioningArtifactOutputs != null - ? de_ProvisioningArtifactOutputs(output.ProvisioningArtifactOutputs, context) - : undefined, - ProvisioningArtifactParameters: - output.ProvisioningArtifactParameters != null - ? de_ProvisioningArtifactParameters(output.ProvisioningArtifactParameters, context) - : undefined, - ProvisioningArtifactPreferences: - output.ProvisioningArtifactPreferences != null - ? de_ProvisioningArtifactPreferences(output.ProvisioningArtifactPreferences, context) - : undefined, - TagOptions: output.TagOptions != null ? de_TagOptionSummaries(output.TagOptions, context) : undefined, - UsageInstructions: - output.UsageInstructions != null ? de_UsageInstructions(output.UsageInstructions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeRecordOutput - */ -const de_DescribeRecordOutput = (output: any, context: __SerdeContext): DescribeRecordOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - RecordOutputs: output.RecordOutputs != null ? de_RecordOutputs(output.RecordOutputs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeServiceActionExecutionParametersOutput - */ -const de_DescribeServiceActionExecutionParametersOutput = ( - output: any, - context: __SerdeContext -): DescribeServiceActionExecutionParametersOutput => { - return { - ServiceActionParameters: - output.ServiceActionParameters != null - ? de_ExecutionParameters(output.ServiceActionParameters, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeServiceActionOutput - */ -const de_DescribeServiceActionOutput = (output: any, context: __SerdeContext): DescribeServiceActionOutput => { - return { - ServiceActionDetail: - output.ServiceActionDetail != null ? de_ServiceActionDetail(output.ServiceActionDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTagOptionOutput - */ -const de_DescribeTagOptionOutput = (output: any, context: __SerdeContext): DescribeTagOptionOutput => { - return { - TagOptionDetail: output.TagOptionDetail != null ? de_TagOptionDetail(output.TagOptionDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisableAWSOrganizationsAccessOutput - */ -const de_DisableAWSOrganizationsAccessOutput = ( - output: any, - context: __SerdeContext -): DisableAWSOrganizationsAccessOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateBudgetFromResourceOutput - */ -const de_DisassociateBudgetFromResourceOutput = ( - output: any, - context: __SerdeContext -): DisassociateBudgetFromResourceOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociatePrincipalFromPortfolioOutput - */ -const de_DisassociatePrincipalFromPortfolioOutput = ( - output: any, - context: __SerdeContext -): DisassociatePrincipalFromPortfolioOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateProductFromPortfolioOutput - */ -const de_DisassociateProductFromPortfolioOutput = ( - output: any, - context: __SerdeContext -): DisassociateProductFromPortfolioOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateServiceActionFromProvisioningArtifactOutput - */ -const de_DisassociateServiceActionFromProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): DisassociateServiceActionFromProvisioningArtifactOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateTagOptionFromResourceOutput - */ -const de_DisassociateTagOptionFromResourceOutput = ( - output: any, - context: __SerdeContext -): DisassociateTagOptionFromResourceOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DuplicateResourceException - */ -const de_DuplicateResourceException = (output: any, context: __SerdeContext): DuplicateResourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1EnableAWSOrganizationsAccessOutput - */ -const de_EnableAWSOrganizationsAccessOutput = ( - output: any, - context: __SerdeContext -): EnableAWSOrganizationsAccessOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ExecuteProvisionedProductPlanOutput - */ -const de_ExecuteProvisionedProductPlanOutput = ( - output: any, - context: __SerdeContext -): ExecuteProvisionedProductPlanOutput => { - return { - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExecuteProvisionedProductServiceActionOutput - */ -const de_ExecuteProvisionedProductServiceActionOutput = ( - output: any, - context: __SerdeContext -): ExecuteProvisionedProductServiceActionOutput => { - return { - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionParameter - */ -const de_ExecutionParameter = (output: any, context: __SerdeContext): ExecutionParameter => { - return { - DefaultValues: - output.DefaultValues != null ? de_ExecutionParameterValueList(output.DefaultValues, context) : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionParameters - */ -const de_ExecutionParameters = (output: any, context: __SerdeContext): ExecutionParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutionParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ExecutionParameterValueList - */ -const de_ExecutionParameterValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailedServiceActionAssociation - */ -const de_FailedServiceActionAssociation = (output: any, context: __SerdeContext): FailedServiceActionAssociation => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ProductId: __expectString(output.ProductId), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - ServiceActionId: __expectString(output.ServiceActionId), - } as any; -}; - -/** - * deserializeAws_json1_1FailedServiceActionAssociations - */ -const de_FailedServiceActionAssociations = (output: any, context: __SerdeContext): FailedServiceActionAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedServiceActionAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetAWSOrganizationsAccessStatusOutput - */ -const de_GetAWSOrganizationsAccessStatusOutput = ( - output: any, - context: __SerdeContext -): GetAWSOrganizationsAccessStatusOutput => { - return { - AccessStatus: __expectString(output.AccessStatus), - } as any; -}; - -/** - * deserializeAws_json1_1GetProvisionedProductOutputsOutput - */ -const de_GetProvisionedProductOutputsOutput = ( - output: any, - context: __SerdeContext -): GetProvisionedProductOutputsOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - Outputs: output.Outputs != null ? de_RecordOutputs(output.Outputs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ImportAsProvisionedProductOutput - */ -const de_ImportAsProvisionedProductOutput = ( - output: any, - context: __SerdeContext -): ImportAsProvisionedProductOutput => { - return { - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InvalidParametersException - */ -const de_InvalidParametersException = (output: any, context: __SerdeContext): InvalidParametersException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidStateException - */ -const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1LastSync - */ -const de_LastSync = (output: any, context: __SerdeContext): LastSync => { - return { - LastSuccessfulSyncProvisioningArtifactId: __expectString(output.LastSuccessfulSyncProvisioningArtifactId), - LastSuccessfulSyncTime: - output.LastSuccessfulSyncTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulSyncTime))) - : undefined, - LastSyncStatus: __expectString(output.LastSyncStatus), - LastSyncStatusMessage: __expectString(output.LastSyncStatusMessage), - LastSyncTime: - output.LastSyncTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSyncTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LaunchPath - */ -const de_LaunchPath = (output: any, context: __SerdeContext): LaunchPath => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1LaunchPaths - */ -const de_LaunchPaths = (output: any, context: __SerdeContext): LaunchPath[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchPath(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LaunchPathSummaries - */ -const de_LaunchPathSummaries = (output: any, context: __SerdeContext): LaunchPathSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LaunchPathSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LaunchPathSummary - */ -const de_LaunchPathSummary = (output: any, context: __SerdeContext): LaunchPathSummary => { - return { - ConstraintSummaries: - output.ConstraintSummaries != null ? de_ConstraintSummaries(output.ConstraintSummaries, context) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1ListAcceptedPortfolioSharesOutput - */ -const de_ListAcceptedPortfolioSharesOutput = ( - output: any, - context: __SerdeContext -): ListAcceptedPortfolioSharesOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - PortfolioDetails: - output.PortfolioDetails != null ? de_PortfolioDetails(output.PortfolioDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListBudgetsForResourceOutput - */ -const de_ListBudgetsForResourceOutput = (output: any, context: __SerdeContext): ListBudgetsForResourceOutput => { - return { - Budgets: output.Budgets != null ? de_Budgets(output.Budgets, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListConstraintsForPortfolioOutput - */ -const de_ListConstraintsForPortfolioOutput = ( - output: any, - context: __SerdeContext -): ListConstraintsForPortfolioOutput => { - return { - ConstraintDetails: - output.ConstraintDetails != null ? de_ConstraintDetails(output.ConstraintDetails, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListLaunchPathsOutput - */ -const de_ListLaunchPathsOutput = (output: any, context: __SerdeContext): ListLaunchPathsOutput => { - return { - LaunchPathSummaries: - output.LaunchPathSummaries != null ? de_LaunchPathSummaries(output.LaunchPathSummaries, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListOrganizationPortfolioAccessOutput - */ -const de_ListOrganizationPortfolioAccessOutput = ( - output: any, - context: __SerdeContext -): ListOrganizationPortfolioAccessOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - OrganizationNodes: - output.OrganizationNodes != null ? de_OrganizationNodes(output.OrganizationNodes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListPortfolioAccessOutput - */ -const de_ListPortfolioAccessOutput = (output: any, context: __SerdeContext): ListPortfolioAccessOutput => { - return { - AccountIds: output.AccountIds != null ? de_AccountIds(output.AccountIds, context) : undefined, - NextPageToken: __expectString(output.NextPageToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListPortfoliosForProductOutput - */ -const de_ListPortfoliosForProductOutput = (output: any, context: __SerdeContext): ListPortfoliosForProductOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - PortfolioDetails: - output.PortfolioDetails != null ? de_PortfolioDetails(output.PortfolioDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListPortfoliosOutput - */ -const de_ListPortfoliosOutput = (output: any, context: __SerdeContext): ListPortfoliosOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - PortfolioDetails: - output.PortfolioDetails != null ? de_PortfolioDetails(output.PortfolioDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListPrincipalsForPortfolioOutput - */ -const de_ListPrincipalsForPortfolioOutput = ( - output: any, - context: __SerdeContext -): ListPrincipalsForPortfolioOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - Principals: output.Principals != null ? de_Principals(output.Principals, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListProvisionedProductPlansOutput - */ -const de_ListProvisionedProductPlansOutput = ( - output: any, - context: __SerdeContext -): ListProvisionedProductPlansOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProvisionedProductPlans: - output.ProvisionedProductPlans != null - ? de_ProvisionedProductPlans(output.ProvisionedProductPlans, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListProvisioningArtifactsForServiceActionOutput - */ -const de_ListProvisioningArtifactsForServiceActionOutput = ( - output: any, - context: __SerdeContext -): ListProvisioningArtifactsForServiceActionOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProvisioningArtifactViews: - output.ProvisioningArtifactViews != null - ? de_ProvisioningArtifactViews(output.ProvisioningArtifactViews, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListProvisioningArtifactsOutput - */ -const de_ListProvisioningArtifactsOutput = (output: any, context: __SerdeContext): ListProvisioningArtifactsOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProvisioningArtifactDetails: - output.ProvisioningArtifactDetails != null - ? de_ProvisioningArtifactDetails(output.ProvisioningArtifactDetails, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRecordHistoryOutput - */ -const de_ListRecordHistoryOutput = (output: any, context: __SerdeContext): ListRecordHistoryOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - RecordDetails: output.RecordDetails != null ? de_RecordDetails(output.RecordDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListResourcesForTagOptionOutput - */ -const de_ListResourcesForTagOptionOutput = (output: any, context: __SerdeContext): ListResourcesForTagOptionOutput => { - return { - PageToken: __expectString(output.PageToken), - ResourceDetails: output.ResourceDetails != null ? de_ResourceDetails(output.ResourceDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListServiceActionsForProvisioningArtifactOutput - */ -const de_ListServiceActionsForProvisioningArtifactOutput = ( - output: any, - context: __SerdeContext -): ListServiceActionsForProvisioningArtifactOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ServiceActionSummaries: - output.ServiceActionSummaries != null - ? de_ServiceActionSummaries(output.ServiceActionSummaries, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListServiceActionsOutput - */ -const de_ListServiceActionsOutput = (output: any, context: __SerdeContext): ListServiceActionsOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ServiceActionSummaries: - output.ServiceActionSummaries != null - ? de_ServiceActionSummaries(output.ServiceActionSummaries, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListStackInstancesForProvisionedProductOutput - */ -const de_ListStackInstancesForProvisionedProductOutput = ( - output: any, - context: __SerdeContext -): ListStackInstancesForProvisionedProductOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - StackInstances: output.StackInstances != null ? de_StackInstances(output.StackInstances, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagOptionsOutput - */ -const de_ListTagOptionsOutput = (output: any, context: __SerdeContext): ListTagOptionsOutput => { - return { - PageToken: __expectString(output.PageToken), - TagOptionDetails: - output.TagOptionDetails != null ? de_TagOptionDetails(output.TagOptionDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Namespaces - */ -const de_Namespaces = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1NotificationArns - */ -const de_NotificationArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1NotifyProvisionProductEngineWorkflowResultOutput - */ -const de_NotifyProvisionProductEngineWorkflowResultOutput = ( - output: any, - context: __SerdeContext -): NotifyProvisionProductEngineWorkflowResultOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1NotifyTerminateProvisionedProductEngineWorkflowResultOutput - */ -const de_NotifyTerminateProvisionedProductEngineWorkflowResultOutput = ( - output: any, - context: __SerdeContext -): NotifyTerminateProvisionedProductEngineWorkflowResultOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1NotifyUpdateProvisionedProductEngineWorkflowResultOutput - */ -const de_NotifyUpdateProvisionedProductEngineWorkflowResultOutput = ( - output: any, - context: __SerdeContext -): NotifyUpdateProvisionedProductEngineWorkflowResultOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1OperationNotSupportedException - */ -const de_OperationNotSupportedException = (output: any, context: __SerdeContext): OperationNotSupportedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1OrganizationNode - */ -const de_OrganizationNode = (output: any, context: __SerdeContext): OrganizationNode => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1OrganizationNodes - */ -const de_OrganizationNodes = (output: any, context: __SerdeContext): OrganizationNode[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationNode(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ParameterConstraints - */ -const de_ParameterConstraints = (output: any, context: __SerdeContext): ParameterConstraints => { - return { - AllowedPattern: __expectString(output.AllowedPattern), - AllowedValues: output.AllowedValues != null ? de_AllowedValues(output.AllowedValues, context) : undefined, - ConstraintDescription: __expectString(output.ConstraintDescription), - MaxLength: __expectString(output.MaxLength), - MaxValue: __expectString(output.MaxValue), - MinLength: __expectString(output.MinLength), - MinValue: __expectString(output.MinValue), - } as any; -}; - -/** - * deserializeAws_json1_1PortfolioDetail - */ -const de_PortfolioDetail = (output: any, context: __SerdeContext): PortfolioDetail => { - return { - ARN: __expectString(output.ARN), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - Id: __expectString(output.Id), - ProviderName: __expectString(output.ProviderName), - } as any; -}; - -/** - * deserializeAws_json1_1PortfolioDetails - */ -const de_PortfolioDetails = (output: any, context: __SerdeContext): PortfolioDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortfolioDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1PortfolioShareDetail - */ -const de_PortfolioShareDetail = (output: any, context: __SerdeContext): PortfolioShareDetail => { - return { - Accepted: __expectBoolean(output.Accepted), - PrincipalId: __expectString(output.PrincipalId), - SharePrincipals: __expectBoolean(output.SharePrincipals), - ShareTagOptions: __expectBoolean(output.ShareTagOptions), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1PortfolioShareDetails - */ -const de_PortfolioShareDetails = (output: any, context: __SerdeContext): PortfolioShareDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PortfolioShareDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Principal - */ -const de_Principal = (output: any, context: __SerdeContext): Principal => { - return { - PrincipalARN: __expectString(output.PrincipalARN), - PrincipalType: __expectString(output.PrincipalType), - } as any; -}; - -/** - * deserializeAws_json1_1Principals - */ -const de_Principals = (output: any, context: __SerdeContext): Principal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Principal(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProductViewAggregations - */ -const de_ProductViewAggregations = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ProductViewAggregationValues(value, context); - return acc; - }, - {} - ); -}; - -/** - * deserializeAws_json1_1ProductViewAggregationValue - */ -const de_ProductViewAggregationValue = (output: any, context: __SerdeContext): ProductViewAggregationValue => { - return { - ApproximateCount: __expectInt32(output.ApproximateCount), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1ProductViewAggregationValues - */ -const de_ProductViewAggregationValues = (output: any, context: __SerdeContext): ProductViewAggregationValue[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductViewAggregationValue(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProductViewDetail - */ -const de_ProductViewDetail = (output: any, context: __SerdeContext): ProductViewDetail => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - ProductARN: __expectString(output.ProductARN), - ProductViewSummary: - output.ProductViewSummary != null ? de_ProductViewSummary(output.ProductViewSummary, context) : undefined, - SourceConnection: - output.SourceConnection != null ? de_SourceConnectionDetail(output.SourceConnection, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ProductViewDetails - */ -const de_ProductViewDetails = (output: any, context: __SerdeContext): ProductViewDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductViewDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProductViewSummaries - */ -const de_ProductViewSummaries = (output: any, context: __SerdeContext): ProductViewSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProductViewSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProductViewSummary - */ -const de_ProductViewSummary = (output: any, context: __SerdeContext): ProductViewSummary => { - return { - Distributor: __expectString(output.Distributor), - HasDefaultPath: __expectBoolean(output.HasDefaultPath), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - ProductId: __expectString(output.ProductId), - ShortDescription: __expectString(output.ShortDescription), - SupportDescription: __expectString(output.SupportDescription), - SupportEmail: __expectString(output.SupportEmail), - SupportUrl: __expectString(output.SupportUrl), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisionedProductAttribute - */ -const de_ProvisionedProductAttribute = (output: any, context: __SerdeContext): ProvisionedProductAttribute => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Id: __expectString(output.Id), - IdempotencyToken: __expectString(output.IdempotencyToken), - LastProvisioningRecordId: __expectString(output.LastProvisioningRecordId), - LastRecordId: __expectString(output.LastRecordId), - LastSuccessfulProvisioningRecordId: __expectString(output.LastSuccessfulProvisioningRecordId), - Name: __expectString(output.Name), - PhysicalId: __expectString(output.PhysicalId), - ProductId: __expectString(output.ProductId), - ProductName: __expectString(output.ProductName), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - ProvisioningArtifactName: __expectString(output.ProvisioningArtifactName), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Type: __expectString(output.Type), - UserArn: __expectString(output.UserArn), - UserArnSession: __expectString(output.UserArnSession), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisionedProductAttributes - */ -const de_ProvisionedProductAttributes = (output: any, context: __SerdeContext): ProvisionedProductAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisionedProductAttribute(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisionedProductDetail - */ -const de_ProvisionedProductDetail = (output: any, context: __SerdeContext): ProvisionedProductDetail => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Id: __expectString(output.Id), - IdempotencyToken: __expectString(output.IdempotencyToken), - LastProvisioningRecordId: __expectString(output.LastProvisioningRecordId), - LastRecordId: __expectString(output.LastRecordId), - LastSuccessfulProvisioningRecordId: __expectString(output.LastSuccessfulProvisioningRecordId), - LaunchRoleArn: __expectString(output.LaunchRoleArn), - Name: __expectString(output.Name), - ProductId: __expectString(output.ProductId), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisionedProductDetails - */ -const de_ProvisionedProductDetails = (output: any, context: __SerdeContext): ProvisionedProductDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisionedProductDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisionedProductPlanDetails - */ -const de_ProvisionedProductPlanDetails = (output: any, context: __SerdeContext): ProvisionedProductPlanDetails => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - NotificationArns: - output.NotificationArns != null ? de_NotificationArns(output.NotificationArns, context) : undefined, - PathId: __expectString(output.PathId), - PlanId: __expectString(output.PlanId), - PlanName: __expectString(output.PlanName), - PlanType: __expectString(output.PlanType), - ProductId: __expectString(output.ProductId), - ProvisionProductId: __expectString(output.ProvisionProductId), - ProvisionProductName: __expectString(output.ProvisionProductName), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - ProvisioningParameters: - output.ProvisioningParameters != null - ? de_UpdateProvisioningParameters(output.ProvisioningParameters, context) - : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - UpdatedTime: - output.UpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ProvisionedProductPlans - */ -const de_ProvisionedProductPlans = (output: any, context: __SerdeContext): ProvisionedProductPlanSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisionedProductPlanSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisionedProductPlanSummary - */ -const de_ProvisionedProductPlanSummary = (output: any, context: __SerdeContext): ProvisionedProductPlanSummary => { - return { - PlanId: __expectString(output.PlanId), - PlanName: __expectString(output.PlanName), - PlanType: __expectString(output.PlanType), - ProvisionProductId: __expectString(output.ProvisionProductId), - ProvisionProductName: __expectString(output.ProvisionProductName), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisionedProductProperties - */ -const de_ProvisionedProductProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [PropertyKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ProvisioningArtifact - */ -const de_ProvisioningArtifact = (output: any, context: __SerdeContext): ProvisioningArtifact => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Guidance: __expectString(output.Guidance), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactDetail - */ -const de_ProvisioningArtifactDetail = (output: any, context: __SerdeContext): ProvisioningArtifactDetail => { - return { - Active: __expectBoolean(output.Active), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Guidance: __expectString(output.Guidance), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - SourceRevision: __expectString(output.SourceRevision), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactDetails - */ -const de_ProvisioningArtifactDetails = (output: any, context: __SerdeContext): ProvisioningArtifactDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningArtifactDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactInfo - */ -const de_ProvisioningArtifactInfo = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactOutput - */ -const de_ProvisioningArtifactOutput = (output: any, context: __SerdeContext): ProvisioningArtifactOutput => { - return { - Description: __expectString(output.Description), - Key: __expectString(output.Key), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactOutputs - */ -const de_ProvisioningArtifactOutputs = (output: any, context: __SerdeContext): ProvisioningArtifactOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningArtifactOutput(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactParameter - */ -const de_ProvisioningArtifactParameter = (output: any, context: __SerdeContext): ProvisioningArtifactParameter => { - return { - DefaultValue: __expectString(output.DefaultValue), - Description: __expectString(output.Description), - IsNoEcho: __expectBoolean(output.IsNoEcho), - ParameterConstraints: - output.ParameterConstraints != null ? de_ParameterConstraints(output.ParameterConstraints, context) : undefined, - ParameterKey: __expectString(output.ParameterKey), - ParameterType: __expectString(output.ParameterType), - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactParameters - */ -const de_ProvisioningArtifactParameters = (output: any, context: __SerdeContext): ProvisioningArtifactParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningArtifactParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactPreferences - */ -const de_ProvisioningArtifactPreferences = (output: any, context: __SerdeContext): ProvisioningArtifactPreferences => { - return { - StackSetAccounts: - output.StackSetAccounts != null ? de_StackSetAccounts(output.StackSetAccounts, context) : undefined, - StackSetRegions: output.StackSetRegions != null ? de_StackSetRegions(output.StackSetRegions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifacts - */ -const de_ProvisioningArtifacts = (output: any, context: __SerdeContext): ProvisioningArtifact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningArtifact(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactSummaries - */ -const de_ProvisioningArtifactSummaries = (output: any, context: __SerdeContext): ProvisioningArtifactSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningArtifactSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactSummary - */ -const de_ProvisioningArtifactSummary = (output: any, context: __SerdeContext): ProvisioningArtifactSummary => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ProvisioningArtifactMetadata: - output.ProvisioningArtifactMetadata != null - ? de_ProvisioningArtifactInfo(output.ProvisioningArtifactMetadata, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactView - */ -const de_ProvisioningArtifactView = (output: any, context: __SerdeContext): ProvisioningArtifactView => { - return { - ProductViewSummary: - output.ProductViewSummary != null ? de_ProductViewSummary(output.ProductViewSummary, context) : undefined, - ProvisioningArtifact: - output.ProvisioningArtifact != null ? de_ProvisioningArtifact(output.ProvisioningArtifact, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ProvisioningArtifactViews - */ -const de_ProvisioningArtifactViews = (output: any, context: __SerdeContext): ProvisioningArtifactView[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProvisioningArtifactView(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ProvisionProductOutput - */ -const de_ProvisionProductOutput = (output: any, context: __SerdeContext): ProvisionProductOutput => { - return { - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RecordDetail - */ -const de_RecordDetail = (output: any, context: __SerdeContext): RecordDetail => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LaunchRoleArn: __expectString(output.LaunchRoleArn), - PathId: __expectString(output.PathId), - ProductId: __expectString(output.ProductId), - ProvisionedProductId: __expectString(output.ProvisionedProductId), - ProvisionedProductName: __expectString(output.ProvisionedProductName), - ProvisionedProductType: __expectString(output.ProvisionedProductType), - ProvisioningArtifactId: __expectString(output.ProvisioningArtifactId), - RecordErrors: output.RecordErrors != null ? de_RecordErrors(output.RecordErrors, context) : undefined, - RecordId: __expectString(output.RecordId), - RecordTags: output.RecordTags != null ? de_RecordTags(output.RecordTags, context) : undefined, - RecordType: __expectString(output.RecordType), - Status: __expectString(output.Status), - UpdatedTime: - output.UpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RecordDetails - */ -const de_RecordDetails = (output: any, context: __SerdeContext): RecordDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RecordError - */ -const de_RecordError = (output: any, context: __SerdeContext): RecordError => { - return { - Code: __expectString(output.Code), - Description: __expectString(output.Description), - } as any; -}; - -/** - * deserializeAws_json1_1RecordErrors - */ -const de_RecordErrors = (output: any, context: __SerdeContext): RecordError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordError(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RecordOutput - */ -const de_RecordOutput = (output: any, context: __SerdeContext): RecordOutput => { - return { - Description: __expectString(output.Description), - OutputKey: __expectString(output.OutputKey), - OutputValue: __expectString(output.OutputValue), - } as any; -}; - -/** - * deserializeAws_json1_1RecordOutputs - */ -const de_RecordOutputs = (output: any, context: __SerdeContext): RecordOutput[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordOutput(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RecordTag - */ -const de_RecordTag = (output: any, context: __SerdeContext): RecordTag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1RecordTags - */ -const de_RecordTags = (output: any, context: __SerdeContext): RecordTag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecordTag(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RejectPortfolioShareOutput - */ -const de_RejectPortfolioShareOutput = (output: any, context: __SerdeContext): RejectPortfolioShareOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ResourceChange - */ -const de_ResourceChange = (output: any, context: __SerdeContext): ResourceChange => { - return { - Action: __expectString(output.Action), - Details: output.Details != null ? de_ResourceChangeDetails(output.Details, context) : undefined, - LogicalResourceId: __expectString(output.LogicalResourceId), - PhysicalResourceId: __expectString(output.PhysicalResourceId), - Replacement: __expectString(output.Replacement), - ResourceType: __expectString(output.ResourceType), - Scope: output.Scope != null ? de_Scope(output.Scope, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResourceChangeDetail - */ -const de_ResourceChangeDetail = (output: any, context: __SerdeContext): ResourceChangeDetail => { - return { - CausingEntity: __expectString(output.CausingEntity), - Evaluation: __expectString(output.Evaluation), - Target: output.Target != null ? de_ResourceTargetDefinition(output.Target, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ResourceChangeDetails - */ -const de_ResourceChangeDetails = (output: any, context: __SerdeContext): ResourceChangeDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceChangeDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ResourceChanges - */ -const de_ResourceChanges = (output: any, context: __SerdeContext): ResourceChange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceChange(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ResourceDetail - */ -const de_ResourceDetail = (output: any, context: __SerdeContext): ResourceDetail => { - return { - ARN: __expectString(output.ARN), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_ListPrincipalsForPortfolioOutput omitted. -/** - * deserializeAws_json1_1ResourceDetails - */ -const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceDetail(entry, context); - }); - return retVal; +// de_ListProvisionedProductPlansOutput omitted. + +/** + * deserializeAws_json1_1ListProvisioningArtifactsForServiceActionOutput + */ +const de_ListProvisioningArtifactsForServiceActionOutput = ( + output: any, + context: __SerdeContext +): ListProvisioningArtifactsForServiceActionOutput => { + return take(output, { + NextPageToken: __expectString, + ProvisioningArtifactViews: (_: any) => de_ProvisioningArtifactViews(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceInUseException + * deserializeAws_json1_1ListProvisioningArtifactsOutput */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListProvisioningArtifactsOutput = (output: any, context: __SerdeContext): ListProvisioningArtifactsOutput => { + return take(output, { + NextPageToken: __expectString, + ProvisioningArtifactDetails: (_: any) => de_ProvisioningArtifactDetails(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceNotFoundException + * deserializeAws_json1_1ListRecordHistoryOutput */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListRecordHistoryOutput = (output: any, context: __SerdeContext): ListRecordHistoryOutput => { + return take(output, { + NextPageToken: __expectString, + RecordDetails: (_: any) => de_RecordDetails(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceTargetDefinition + * deserializeAws_json1_1ListResourcesForTagOptionOutput */ -const de_ResourceTargetDefinition = (output: any, context: __SerdeContext): ResourceTargetDefinition => { - return { - Attribute: __expectString(output.Attribute), - Name: __expectString(output.Name), - RequiresRecreation: __expectString(output.RequiresRecreation), - } as any; +const de_ListResourcesForTagOptionOutput = (output: any, context: __SerdeContext): ListResourcesForTagOptionOutput => { + return take(output, { + PageToken: __expectString, + ResourceDetails: (_: any) => de_ResourceDetails(_, context), + }) as any; }; +// de_ListServiceActionsForProvisioningArtifactOutput omitted. + +// de_ListServiceActionsOutput omitted. + +// de_ListStackInstancesForProvisionedProductOutput omitted. + +// de_ListTagOptionsOutput omitted. + +// de_Namespaces omitted. + +// de_NotificationArns omitted. + +// de_NotifyProvisionProductEngineWorkflowResultOutput omitted. + +// de_NotifyTerminateProvisionedProductEngineWorkflowResultOutput omitted. + +// de_NotifyUpdateProvisionedProductEngineWorkflowResultOutput omitted. + +// de_OperationNotSupportedException omitted. + +// de_OrganizationNode omitted. + +// de_OrganizationNodes omitted. + +// de_ParameterConstraints omitted. + /** - * deserializeAws_json1_1ScanProvisionedProductsOutput + * deserializeAws_json1_1PortfolioDetail */ -const de_ScanProvisionedProductsOutput = (output: any, context: __SerdeContext): ScanProvisionedProductsOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProvisionedProducts: - output.ProvisionedProducts != null - ? de_ProvisionedProductDetails(output.ProvisionedProducts, context) - : undefined, - } as any; +const de_PortfolioDetail = (output: any, context: __SerdeContext): PortfolioDetail => { + return take(output, { + ARN: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DisplayName: __expectString, + Id: __expectString, + ProviderName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Scope + * deserializeAws_json1_1PortfolioDetails */ -const de_Scope = (output: any, context: __SerdeContext): (ResourceAttribute | string)[] => { +const de_PortfolioDetails = (output: any, context: __SerdeContext): PortfolioDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_PortfolioDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SearchProductsAsAdminOutput - */ -const de_SearchProductsAsAdminOutput = (output: any, context: __SerdeContext): SearchProductsAsAdminOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProductViewDetails: - output.ProductViewDetails != null ? de_ProductViewDetails(output.ProductViewDetails, context) : undefined, - } as any; -}; +// de_PortfolioShareDetail omitted. -/** - * deserializeAws_json1_1SearchProductsOutput - */ -const de_SearchProductsOutput = (output: any, context: __SerdeContext): SearchProductsOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProductViewAggregations: - output.ProductViewAggregations != null - ? de_ProductViewAggregations(output.ProductViewAggregations, context) - : undefined, - ProductViewSummaries: - output.ProductViewSummaries != null ? de_ProductViewSummaries(output.ProductViewSummaries, context) : undefined, - } as any; -}; +// de_PortfolioShareDetails omitted. -/** - * deserializeAws_json1_1SearchProvisionedProductsOutput - */ -const de_SearchProvisionedProductsOutput = (output: any, context: __SerdeContext): SearchProvisionedProductsOutput => { - return { - NextPageToken: __expectString(output.NextPageToken), - ProvisionedProducts: - output.ProvisionedProducts != null - ? de_ProvisionedProductAttributes(output.ProvisionedProducts, context) - : undefined, - TotalResultsCount: __expectInt32(output.TotalResultsCount), - } as any; -}; +// de_Principal omitted. -/** - * deserializeAws_json1_1ServiceActionDefinitionMap - */ -const de_ServiceActionDefinitionMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [ServiceActionDefinitionKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_Principals omitted. + +// de_ProductViewAggregations omitted. + +// de_ProductViewAggregationValue omitted. + +// de_ProductViewAggregationValues omitted. /** - * deserializeAws_json1_1ServiceActionDetail + * deserializeAws_json1_1ProductViewDetail */ -const de_ServiceActionDetail = (output: any, context: __SerdeContext): ServiceActionDetail => { - return { - Definition: output.Definition != null ? de_ServiceActionDefinitionMap(output.Definition, context) : undefined, - ServiceActionSummary: - output.ServiceActionSummary != null ? de_ServiceActionSummary(output.ServiceActionSummary, context) : undefined, - } as any; +const de_ProductViewDetail = (output: any, context: __SerdeContext): ProductViewDetail => { + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProductARN: __expectString, + ProductViewSummary: _json, + SourceConnection: (_: any) => de_SourceConnectionDetail(_, context), + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ServiceActionSummaries + * deserializeAws_json1_1ProductViewDetails */ -const de_ServiceActionSummaries = (output: any, context: __SerdeContext): ServiceActionSummary[] => { +const de_ProductViewDetails = (output: any, context: __SerdeContext): ProductViewDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceActionSummary(entry, context); + return de_ProductViewDetail(entry, context); }); return retVal; }; +// de_ProductViewSummaries omitted. + +// de_ProductViewSummary omitted. + /** - * deserializeAws_json1_1ServiceActionSummary + * deserializeAws_json1_1ProvisionedProductAttribute */ -const de_ServiceActionSummary = (output: any, context: __SerdeContext): ServiceActionSummary => { - return { - DefinitionType: __expectString(output.DefinitionType), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; +const de_ProvisionedProductAttribute = (output: any, context: __SerdeContext): ProvisionedProductAttribute => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + IdempotencyToken: __expectString, + LastProvisioningRecordId: __expectString, + LastRecordId: __expectString, + LastSuccessfulProvisioningRecordId: __expectString, + Name: __expectString, + PhysicalId: __expectString, + ProductId: __expectString, + ProductName: __expectString, + ProvisioningArtifactId: __expectString, + ProvisioningArtifactName: __expectString, + Status: __expectString, + StatusMessage: __expectString, + Tags: _json, + Type: __expectString, + UserArn: __expectString, + UserArnSession: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ShareDetails + * deserializeAws_json1_1ProvisionedProductAttributes */ -const de_ShareDetails = (output: any, context: __SerdeContext): ShareDetails => { - return { - ShareErrors: output.ShareErrors != null ? de_ShareErrors(output.ShareErrors, context) : undefined, - SuccessfulShares: - output.SuccessfulShares != null ? de_SuccessfulShares(output.SuccessfulShares, context) : undefined, - } as any; +const de_ProvisionedProductAttributes = (output: any, context: __SerdeContext): ProvisionedProductAttribute[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ProvisionedProductAttribute(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_1ShareError + * deserializeAws_json1_1ProvisionedProductDetail */ -const de_ShareError = (output: any, context: __SerdeContext): ShareError => { - return { - Accounts: output.Accounts != null ? de_Namespaces(output.Accounts, context) : undefined, - Error: __expectString(output.Error), - Message: __expectString(output.Message), - } as any; +const de_ProvisionedProductDetail = (output: any, context: __SerdeContext): ProvisionedProductDetail => { + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + IdempotencyToken: __expectString, + LastProvisioningRecordId: __expectString, + LastRecordId: __expectString, + LastSuccessfulProvisioningRecordId: __expectString, + LaunchRoleArn: __expectString, + Name: __expectString, + ProductId: __expectString, + ProvisioningArtifactId: __expectString, + Status: __expectString, + StatusMessage: __expectString, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ShareErrors + * deserializeAws_json1_1ProvisionedProductDetails */ -const de_ShareErrors = (output: any, context: __SerdeContext): ShareError[] => { +const de_ProvisionedProductDetails = (output: any, context: __SerdeContext): ProvisionedProductDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ShareError(entry, context); + return de_ProvisionedProductDetail(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SourceConnectionDetail + * deserializeAws_json1_1ProvisionedProductPlanDetails */ -const de_SourceConnectionDetail = (output: any, context: __SerdeContext): SourceConnectionDetail => { - return { - ConnectionParameters: - output.ConnectionParameters != null - ? de_SourceConnectionParameters(output.ConnectionParameters, context) - : undefined, - LastSync: output.LastSync != null ? de_LastSync(output.LastSync, context) : undefined, - Type: __expectString(output.Type), - } as any; +const de_ProvisionedProductPlanDetails = (output: any, context: __SerdeContext): ProvisionedProductPlanDetails => { + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotificationArns: _json, + PathId: __expectString, + PlanId: __expectString, + PlanName: __expectString, + PlanType: __expectString, + ProductId: __expectString, + ProvisionProductId: __expectString, + ProvisionProductName: __expectString, + ProvisioningArtifactId: __expectString, + ProvisioningParameters: _json, + Status: __expectString, + StatusMessage: __expectString, + Tags: _json, + UpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ProvisionedProductPlans omitted. + +// de_ProvisionedProductPlanSummary omitted. + +// de_ProvisionedProductProperties omitted. + /** - * deserializeAws_json1_1SourceConnectionParameters + * deserializeAws_json1_1ProvisioningArtifact */ -const de_SourceConnectionParameters = (output: any, context: __SerdeContext): SourceConnectionParameters => { - return { - CodeStar: output.CodeStar != null ? de_CodeStarParameters(output.CodeStar, context) : undefined, - } as any; +const de_ProvisioningArtifact = (output: any, context: __SerdeContext): ProvisioningArtifact => { + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Guidance: __expectString, + Id: __expectString, + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StackInstance + * deserializeAws_json1_1ProvisioningArtifactDetail */ -const de_StackInstance = (output: any, context: __SerdeContext): StackInstance => { - return { - Account: __expectString(output.Account), - Region: __expectString(output.Region), - StackInstanceStatus: __expectString(output.StackInstanceStatus), - } as any; +const de_ProvisioningArtifactDetail = (output: any, context: __SerdeContext): ProvisioningArtifactDetail => { + return take(output, { + Active: __expectBoolean, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Guidance: __expectString, + Id: __expectString, + Name: __expectString, + SourceRevision: __expectString, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StackInstances + * deserializeAws_json1_1ProvisioningArtifactDetails */ -const de_StackInstances = (output: any, context: __SerdeContext): StackInstance[] => { +const de_ProvisioningArtifactDetails = (output: any, context: __SerdeContext): ProvisioningArtifactDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StackInstance(entry, context); + return de_ProvisioningArtifactDetail(entry, context); }); return retVal; }; +// de_ProvisioningArtifactInfo omitted. + +// de_ProvisioningArtifactOutput omitted. + +// de_ProvisioningArtifactOutputs omitted. + +// de_ProvisioningArtifactParameter omitted. + +// de_ProvisioningArtifactParameters omitted. + +// de_ProvisioningArtifactPreferences omitted. + /** - * deserializeAws_json1_1StackSetAccounts + * deserializeAws_json1_1ProvisioningArtifacts */ -const de_StackSetAccounts = (output: any, context: __SerdeContext): string[] => { +const de_ProvisioningArtifacts = (output: any, context: __SerdeContext): ProvisioningArtifact[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ProvisioningArtifact(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1StackSetRegions + * deserializeAws_json1_1ProvisioningArtifactSummaries */ -const de_StackSetRegions = (output: any, context: __SerdeContext): string[] => { +const de_ProvisioningArtifactSummaries = (output: any, context: __SerdeContext): ProvisioningArtifactSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ProvisioningArtifactSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1SuccessfulShares + * deserializeAws_json1_1ProvisioningArtifactSummary + */ +const de_ProvisioningArtifactSummary = (output: any, context: __SerdeContext): ProvisioningArtifactSummary => { + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Id: __expectString, + Name: __expectString, + ProvisioningArtifactMetadata: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1ProvisioningArtifactView + */ +const de_ProvisioningArtifactView = (output: any, context: __SerdeContext): ProvisioningArtifactView => { + return take(output, { + ProductViewSummary: _json, + ProvisioningArtifact: (_: any) => de_ProvisioningArtifact(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1ProvisioningArtifactViews */ -const de_SuccessfulShares = (output: any, context: __SerdeContext): string[] => { +const de_ProvisioningArtifactViews = (output: any, context: __SerdeContext): ProvisioningArtifactView[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ProvisioningArtifactView(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1ProvisionProductOutput */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_ProvisionProductOutput = (output: any, context: __SerdeContext): ProvisionProductOutput => { + return take(output, { + RecordDetail: (_: any) => de_RecordDetail(_, context), + }) as any; }; /** - * deserializeAws_json1_1TagOptionDetail + * deserializeAws_json1_1RecordDetail */ -const de_TagOptionDetail = (output: any, context: __SerdeContext): TagOptionDetail => { - return { - Active: __expectBoolean(output.Active), - Id: __expectString(output.Id), - Key: __expectString(output.Key), - Owner: __expectString(output.Owner), - Value: __expectString(output.Value), - } as any; +const de_RecordDetail = (output: any, context: __SerdeContext): RecordDetail => { + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LaunchRoleArn: __expectString, + PathId: __expectString, + ProductId: __expectString, + ProvisionedProductId: __expectString, + ProvisionedProductName: __expectString, + ProvisionedProductType: __expectString, + ProvisioningArtifactId: __expectString, + RecordErrors: _json, + RecordId: __expectString, + RecordTags: _json, + RecordType: __expectString, + Status: __expectString, + UpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1TagOptionDetails + * deserializeAws_json1_1RecordDetails */ -const de_TagOptionDetails = (output: any, context: __SerdeContext): TagOptionDetail[] => { +const de_RecordDetails = (output: any, context: __SerdeContext): RecordDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagOptionDetail(entry, context); + return de_RecordDetail(entry, context); }); return retVal; }; +// de_RecordError omitted. + +// de_RecordErrors omitted. + +// de_RecordOutput omitted. + +// de_RecordOutputs omitted. + +// de_RecordTag omitted. + +// de_RecordTags omitted. + +// de_RejectPortfolioShareOutput omitted. + +// de_ResourceChange omitted. + +// de_ResourceChangeDetail omitted. + +// de_ResourceChangeDetails omitted. + +// de_ResourceChanges omitted. + /** - * deserializeAws_json1_1TagOptionNotMigratedException + * deserializeAws_json1_1ResourceDetail */ -const de_TagOptionNotMigratedException = (output: any, context: __SerdeContext): TagOptionNotMigratedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ResourceDetail = (output: any, context: __SerdeContext): ResourceDetail => { + return take(output, { + ARN: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Id: __expectString, + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagOptionSummaries + * deserializeAws_json1_1ResourceDetails */ -const de_TagOptionSummaries = (output: any, context: __SerdeContext): TagOptionSummary[] => { +const de_ResourceDetails = (output: any, context: __SerdeContext): ResourceDetail[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TagOptionSummary(entry, context); + return de_ResourceDetail(entry, context); }); return retVal; }; +// de_ResourceInUseException omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceTargetDefinition omitted. + +/** + * deserializeAws_json1_1ScanProvisionedProductsOutput + */ +const de_ScanProvisionedProductsOutput = (output: any, context: __SerdeContext): ScanProvisionedProductsOutput => { + return take(output, { + NextPageToken: __expectString, + ProvisionedProducts: (_: any) => de_ProvisionedProductDetails(_, context), + }) as any; +}; + +// de_Scope omitted. + /** - * deserializeAws_json1_1TagOptionSummary + * deserializeAws_json1_1SearchProductsAsAdminOutput */ -const de_TagOptionSummary = (output: any, context: __SerdeContext): TagOptionSummary => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_TagOptionValues(output.Values, context) : undefined, - } as any; +const de_SearchProductsAsAdminOutput = (output: any, context: __SerdeContext): SearchProductsAsAdminOutput => { + return take(output, { + NextPageToken: __expectString, + ProductViewDetails: (_: any) => de_ProductViewDetails(_, context), + }) as any; }; +// de_SearchProductsOutput omitted. + /** - * deserializeAws_json1_1TagOptionValues + * deserializeAws_json1_1SearchProvisionedProductsOutput */ -const de_TagOptionValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_SearchProvisionedProductsOutput = (output: any, context: __SerdeContext): SearchProvisionedProductsOutput => { + return take(output, { + NextPageToken: __expectString, + ProvisionedProducts: (_: any) => de_ProvisionedProductAttributes(_, context), + TotalResultsCount: __expectInt32, + }) as any; }; +// de_ServiceActionDefinitionMap omitted. + +// de_ServiceActionDetail omitted. + +// de_ServiceActionSummaries omitted. + +// de_ServiceActionSummary omitted. + +// de_ShareDetails omitted. + +// de_ShareError omitted. + +// de_ShareErrors omitted. + /** - * deserializeAws_json1_1Tags + * deserializeAws_json1_1SourceConnectionDetail */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; +const de_SourceConnectionDetail = (output: any, context: __SerdeContext): SourceConnectionDetail => { + return take(output, { + ConnectionParameters: _json, + LastSync: (_: any) => de_LastSync(_, context), + Type: __expectString, + }) as any; }; +// de_SourceConnectionParameters omitted. + +// de_StackInstance omitted. + +// de_StackInstances omitted. + +// de_StackSetAccounts omitted. + +// de_StackSetRegions omitted. + +// de_SuccessfulShares omitted. + +// de_Tag omitted. + +// de_TagOptionDetail omitted. + +// de_TagOptionDetails omitted. + +// de_TagOptionNotMigratedException omitted. + +// de_TagOptionSummaries omitted. + +// de_TagOptionSummary omitted. + +// de_TagOptionValues omitted. + +// de_Tags omitted. + /** * deserializeAws_json1_1TerminateProvisionedProductOutput */ @@ -10626,80 +7673,45 @@ const de_TerminateProvisionedProductOutput = ( output: any, context: __SerdeContext ): TerminateProvisionedProductOutput => { - return { - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - } as any; + return take(output, { + RecordDetail: (_: any) => de_RecordDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateConstraintOutput - */ -const de_UpdateConstraintOutput = (output: any, context: __SerdeContext): UpdateConstraintOutput => { - return { - ConstraintDetail: - output.ConstraintDetail != null ? de_ConstraintDetail(output.ConstraintDetail, context) : undefined, - ConstraintParameters: __expectString(output.ConstraintParameters), - Status: __expectString(output.Status), - } as any; -}; +// de_UpdateConstraintOutput omitted. /** * deserializeAws_json1_1UpdatePortfolioOutput */ const de_UpdatePortfolioOutput = (output: any, context: __SerdeContext): UpdatePortfolioOutput => { - return { - PortfolioDetail: output.PortfolioDetail != null ? de_PortfolioDetail(output.PortfolioDetail, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; + return take(output, { + PortfolioDetail: (_: any) => de_PortfolioDetail(_, context), + Tags: _json, + }) as any; }; -/** - * deserializeAws_json1_1UpdatePortfolioShareOutput - */ -const de_UpdatePortfolioShareOutput = (output: any, context: __SerdeContext): UpdatePortfolioShareOutput => { - return { - PortfolioShareToken: __expectString(output.PortfolioShareToken), - Status: __expectString(output.Status), - } as any; -}; +// de_UpdatePortfolioShareOutput omitted. /** * deserializeAws_json1_1UpdateProductOutput */ const de_UpdateProductOutput = (output: any, context: __SerdeContext): UpdateProductOutput => { - return { - ProductViewDetail: - output.ProductViewDetail != null ? de_ProductViewDetail(output.ProductViewDetail, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; + return take(output, { + ProductViewDetail: (_: any) => de_ProductViewDetail(_, context), + Tags: _json, + }) as any; }; /** * deserializeAws_json1_1UpdateProvisionedProductOutput */ const de_UpdateProvisionedProductOutput = (output: any, context: __SerdeContext): UpdateProvisionedProductOutput => { - return { - RecordDetail: output.RecordDetail != null ? de_RecordDetail(output.RecordDetail, context) : undefined, - } as any; + return take(output, { + RecordDetail: (_: any) => de_RecordDetail(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateProvisionedProductPropertiesOutput - */ -const de_UpdateProvisionedProductPropertiesOutput = ( - output: any, - context: __SerdeContext -): UpdateProvisionedProductPropertiesOutput => { - return { - ProvisionedProductId: __expectString(output.ProvisionedProductId), - ProvisionedProductProperties: - output.ProvisionedProductProperties != null - ? de_ProvisionedProductProperties(output.ProvisionedProductProperties, context) - : undefined, - RecordId: __expectString(output.RecordId), - Status: __expectString(output.Status), - } as any; -}; +// de_UpdateProvisionedProductPropertiesOutput omitted. /** * deserializeAws_json1_1UpdateProvisioningArtifactOutput @@ -10708,85 +7720,24 @@ const de_UpdateProvisioningArtifactOutput = ( output: any, context: __SerdeContext ): UpdateProvisioningArtifactOutput => { - return { - Info: output.Info != null ? de_ProvisioningArtifactInfo(output.Info, context) : undefined, - ProvisioningArtifactDetail: - output.ProvisioningArtifactDetail != null - ? de_ProvisioningArtifactDetail(output.ProvisioningArtifactDetail, context) - : undefined, - Status: __expectString(output.Status), - } as any; + return take(output, { + Info: _json, + ProvisioningArtifactDetail: (_: any) => de_ProvisioningArtifactDetail(_, context), + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateProvisioningParameter - */ -const de_UpdateProvisioningParameter = (output: any, context: __SerdeContext): UpdateProvisioningParameter => { - return { - Key: __expectString(output.Key), - UsePreviousValue: __expectBoolean(output.UsePreviousValue), - Value: __expectString(output.Value), - } as any; -}; +// de_UpdateProvisioningParameter omitted. -/** - * deserializeAws_json1_1UpdateProvisioningParameters - */ -const de_UpdateProvisioningParameters = (output: any, context: __SerdeContext): UpdateProvisioningParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UpdateProvisioningParameter(entry, context); - }); - return retVal; -}; +// de_UpdateProvisioningParameters omitted. -/** - * deserializeAws_json1_1UpdateServiceActionOutput - */ -const de_UpdateServiceActionOutput = (output: any, context: __SerdeContext): UpdateServiceActionOutput => { - return { - ServiceActionDetail: - output.ServiceActionDetail != null ? de_ServiceActionDetail(output.ServiceActionDetail, context) : undefined, - } as any; -}; +// de_UpdateServiceActionOutput omitted. -/** - * deserializeAws_json1_1UpdateTagOptionOutput - */ -const de_UpdateTagOptionOutput = (output: any, context: __SerdeContext): UpdateTagOptionOutput => { - return { - TagOptionDetail: output.TagOptionDetail != null ? de_TagOptionDetail(output.TagOptionDetail, context) : undefined, - } as any; -}; +// de_UpdateTagOptionOutput omitted. -/** - * deserializeAws_json1_1UsageInstruction - */ -const de_UsageInstruction = (output: any, context: __SerdeContext): UsageInstruction => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_UsageInstruction omitted. -/** - * deserializeAws_json1_1UsageInstructions - */ -const de_UsageInstructions = (output: any, context: __SerdeContext): UsageInstruction[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UsageInstruction(entry, context); - }); - return retVal; -}; +// de_UsageInstructions omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -10808,6 +7759,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-service-quotas/src/protocols/Aws_json1_1.ts b/clients/client-service-quotas/src/protocols/Aws_json1_1.ts index eeaeaf4adafd..fe155e2a6e49 100644 --- a/clients/client-service-quotas/src/protocols/Aws_json1_1.ts +++ b/clients/client-service-quotas/src/protocols/Aws_json1_1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -83,16 +84,11 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { AccessDeniedException, AssociateServiceQuotaTemplateRequest, - AssociateServiceQuotaTemplateResponse, AWSServiceAccessNotEnabledException, DeleteServiceQuotaIncreaseRequestFromTemplateRequest, - DeleteServiceQuotaIncreaseRequestFromTemplateResponse, DependencyAccessDeniedException, DisassociateServiceQuotaTemplateRequest, - DisassociateServiceQuotaTemplateResponse, - ErrorReason, GetAssociationForServiceQuotaTemplateRequest, - GetAssociationForServiceQuotaTemplateResponse, GetAWSDefaultServiceQuotaRequest, GetAWSDefaultServiceQuotaResponse, GetRequestedServiceQuotaChangeRequest, @@ -115,35 +111,28 @@ import { ListServiceQuotasRequest, ListServiceQuotasResponse, ListServicesRequest, - ListServicesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, - MetricInfo, NoAvailableOrganizationException, NoSuchResourceException, OrganizationNotInAllFeaturesModeException, PutServiceQuotaIncreaseRequestIntoTemplateRequest, PutServiceQuotaIncreaseRequestIntoTemplateResponse, QuotaExceededException, - QuotaPeriod, RequestedServiceQuotaChange, RequestServiceQuotaIncreaseRequest, RequestServiceQuotaIncreaseResponse, ResourceAlreadyExistsException, ServiceException, - ServiceInfo, ServiceQuota, ServiceQuotaIncreaseRequestInTemplate, ServiceQuotaTemplateNotInUseException, Tag, TagPolicyViolationException, TagResourceRequest, - TagResourceResponse, TemplatesNotAvailableInRegionException, TooManyRequestsException, TooManyTagsException, UntagResourceRequest, - UntagResourceResponse, } from "../models/models_0"; import { ServiceQuotasServiceException as __BaseException } from "../models/ServiceQuotasServiceException"; @@ -156,7 +145,7 @@ export const se_AssociateServiceQuotaTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateServiceQuotaTemplate"); let body: any; - body = JSON.stringify(se_AssociateServiceQuotaTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -169,7 +158,7 @@ export const se_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServiceQuotaIncreaseRequestFromTemplate"); let body: any; - body = JSON.stringify(se_DeleteServiceQuotaIncreaseRequestFromTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -182,7 +171,7 @@ export const se_DisassociateServiceQuotaTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateServiceQuotaTemplate"); let body: any; - body = JSON.stringify(se_DisassociateServiceQuotaTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -195,7 +184,7 @@ export const se_GetAssociationForServiceQuotaTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAssociationForServiceQuotaTemplate"); let body: any; - body = JSON.stringify(se_GetAssociationForServiceQuotaTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -208,7 +197,7 @@ export const se_GetAWSDefaultServiceQuotaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAWSDefaultServiceQuota"); let body: any; - body = JSON.stringify(se_GetAWSDefaultServiceQuotaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -221,7 +210,7 @@ export const se_GetRequestedServiceQuotaChangeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRequestedServiceQuotaChange"); let body: any; - body = JSON.stringify(se_GetRequestedServiceQuotaChangeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -234,7 +223,7 @@ export const se_GetServiceQuotaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceQuota"); let body: any; - body = JSON.stringify(se_GetServiceQuotaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -247,7 +236,7 @@ export const se_GetServiceQuotaIncreaseRequestFromTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceQuotaIncreaseRequestFromTemplate"); let body: any; - body = JSON.stringify(se_GetServiceQuotaIncreaseRequestFromTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -260,7 +249,7 @@ export const se_ListAWSDefaultServiceQuotasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAWSDefaultServiceQuotas"); let body: any; - body = JSON.stringify(se_ListAWSDefaultServiceQuotasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -273,7 +262,7 @@ export const se_ListRequestedServiceQuotaChangeHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRequestedServiceQuotaChangeHistory"); let body: any; - body = JSON.stringify(se_ListRequestedServiceQuotaChangeHistoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -286,7 +275,7 @@ export const se_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRequestedServiceQuotaChangeHistoryByQuota"); let body: any; - body = JSON.stringify(se_ListRequestedServiceQuotaChangeHistoryByQuotaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -299,7 +288,7 @@ export const se_ListServiceQuotaIncreaseRequestsInTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceQuotaIncreaseRequestsInTemplate"); let body: any; - body = JSON.stringify(se_ListServiceQuotaIncreaseRequestsInTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -312,7 +301,7 @@ export const se_ListServiceQuotasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceQuotas"); let body: any; - body = JSON.stringify(se_ListServiceQuotasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -325,7 +314,7 @@ export const se_ListServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServices"); let body: any; - body = JSON.stringify(se_ListServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -338,7 +327,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +366,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +379,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -406,12 +395,12 @@ export const de_AssociateServiceQuotaTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateServiceQuotaTemplateResponse(data, context); + contents = _json(data); const response: AssociateServiceQuotaTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -453,10 +442,9 @@ const de_AssociateServiceQuotaTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -474,12 +462,12 @@ export const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteServiceQuotaIncreaseRequestFromTemplateResponse(data, context); + contents = _json(data); const response: DeleteServiceQuotaIncreaseRequestFromTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -524,10 +512,9 @@ const de_DeleteServiceQuotaIncreaseRequestFromTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -545,12 +532,12 @@ export const de_DisassociateServiceQuotaTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateServiceQuotaTemplateResponse(data, context); + contents = _json(data); const response: DisassociateServiceQuotaTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -592,10 +579,9 @@ const de_DisassociateServiceQuotaTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -613,12 +599,12 @@ export const de_GetAssociationForServiceQuotaTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAssociationForServiceQuotaTemplateResponse(data, context); + contents = _json(data); const response: GetAssociationForServiceQuotaTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -660,10 +646,9 @@ const de_GetAssociationForServiceQuotaTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -686,7 +671,7 @@ export const de_GetAWSDefaultServiceQuotaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -719,10 +704,9 @@ const de_GetAWSDefaultServiceQuotaCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -745,7 +729,7 @@ export const de_GetRequestedServiceQuotaChangeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -778,10 +762,9 @@ const de_GetRequestedServiceQuotaChangeCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -804,7 +787,7 @@ export const de_GetServiceQuotaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -837,10 +820,9 @@ const de_GetServiceQuotaCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -863,7 +845,7 @@ export const de_GetServiceQuotaIncreaseRequestFromTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -908,10 +890,9 @@ const de_GetServiceQuotaIncreaseRequestFromTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -934,7 +915,7 @@ export const de_ListAWSDefaultServiceQuotasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -970,10 +951,9 @@ const de_ListAWSDefaultServiceQuotasCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -996,7 +976,7 @@ export const de_ListRequestedServiceQuotaChangeHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1032,10 +1012,9 @@ const de_ListRequestedServiceQuotaChangeHistoryCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1058,7 +1037,7 @@ export const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1094,10 +1073,9 @@ const de_ListRequestedServiceQuotaChangeHistoryByQuotaCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1120,7 +1098,7 @@ export const de_ListServiceQuotaIncreaseRequestsInTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1162,10 +1140,9 @@ const de_ListServiceQuotaIncreaseRequestsInTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1188,7 +1165,7 @@ export const de_ListServiceQuotasCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1224,10 +1201,9 @@ const de_ListServiceQuotasCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1245,12 +1221,12 @@ export const de_ListServicesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServicesResponse(data, context); + contents = _json(data); const response: ListServicesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1283,10 +1259,9 @@ const de_ListServicesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1304,12 +1279,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1342,10 +1317,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1368,7 +1342,7 @@ export const de_PutServiceQuotaIncreaseRequestIntoTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1416,10 +1390,9 @@ const de_PutServiceQuotaIncreaseRequestIntoTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1442,7 +1415,7 @@ export const de_RequestServiceQuotaIncreaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1487,10 +1460,9 @@ const de_RequestServiceQuotaIncreaseCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1508,12 +1480,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1552,10 +1524,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,12 +1544,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1611,10 +1582,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1628,7 +1598,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1644,7 +1614,7 @@ const de_AWSServiceAccessNotEnabledExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AWSServiceAccessNotEnabledException(body, context); + const deserialized: any = _json(body); const exception = new AWSServiceAccessNotEnabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1660,7 +1630,7 @@ const de_DependencyAccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DependencyAccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new DependencyAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1676,7 +1646,7 @@ const de_IllegalArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IllegalArgumentException(body, context); + const deserialized: any = _json(body); const exception = new IllegalArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1692,7 +1662,7 @@ const de_InvalidPaginationTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPaginationTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPaginationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1708,7 +1678,7 @@ const de_InvalidResourceStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1724,7 +1694,7 @@ const de_NoAvailableOrganizationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoAvailableOrganizationException(body, context); + const deserialized: any = _json(body); const exception = new NoAvailableOrganizationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1740,7 +1710,7 @@ const de_NoSuchResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoSuchResourceException(body, context); + const deserialized: any = _json(body); const exception = new NoSuchResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1756,7 +1726,7 @@ const de_OrganizationNotInAllFeaturesModeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationNotInAllFeaturesModeException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationNotInAllFeaturesModeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1772,7 +1742,7 @@ const de_QuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_QuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new QuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1788,7 +1758,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1801,7 +1771,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( */ const de_ServiceExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceException(body, context); + const deserialized: any = _json(body); const exception = new ServiceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1817,7 +1787,7 @@ const de_ServiceQuotaTemplateNotInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaTemplateNotInUseException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaTemplateNotInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1833,7 +1803,7 @@ const de_TagPolicyViolationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TagPolicyViolationException(body, context); + const deserialized: any = _json(body); const exception = new TagPolicyViolationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1849,7 +1819,7 @@ const de_TemplatesNotAvailableInRegionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TemplatesNotAvailableInRegionException(body, context); + const deserialized: any = _json(body); const exception = new TemplatesNotAvailableInRegionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1865,7 +1835,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1881,7 +1851,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1889,207 +1859,39 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateServiceQuotaTemplateRequest - */ -const se_AssociateServiceQuotaTemplateRequest = ( - input: AssociateServiceQuotaTemplateRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_AssociateServiceQuotaTemplateRequest omitted. -/** - * serializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateRequest - */ -const se_DeleteServiceQuotaIncreaseRequestFromTemplateRequest = ( - input: DeleteServiceQuotaIncreaseRequestFromTemplateRequest, - context: __SerdeContext -): any => { - return { - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_DeleteServiceQuotaIncreaseRequestFromTemplateRequest omitted. -/** - * serializeAws_json1_1DisassociateServiceQuotaTemplateRequest - */ -const se_DisassociateServiceQuotaTemplateRequest = ( - input: DisassociateServiceQuotaTemplateRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_DisassociateServiceQuotaTemplateRequest omitted. -/** - * serializeAws_json1_1GetAssociationForServiceQuotaTemplateRequest - */ -const se_GetAssociationForServiceQuotaTemplateRequest = ( - input: GetAssociationForServiceQuotaTemplateRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_GetAssociationForServiceQuotaTemplateRequest omitted. -/** - * serializeAws_json1_1GetAWSDefaultServiceQuotaRequest - */ -const se_GetAWSDefaultServiceQuotaRequest = (input: GetAWSDefaultServiceQuotaRequest, context: __SerdeContext): any => { - return { - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_GetAWSDefaultServiceQuotaRequest omitted. -/** - * serializeAws_json1_1GetRequestedServiceQuotaChangeRequest - */ -const se_GetRequestedServiceQuotaChangeRequest = ( - input: GetRequestedServiceQuotaChangeRequest, - context: __SerdeContext -): any => { - return { - ...(input.RequestId != null && { RequestId: input.RequestId }), - }; -}; +// se_GetRequestedServiceQuotaChangeRequest omitted. -/** - * serializeAws_json1_1GetServiceQuotaIncreaseRequestFromTemplateRequest - */ -const se_GetServiceQuotaIncreaseRequestFromTemplateRequest = ( - input: GetServiceQuotaIncreaseRequestFromTemplateRequest, - context: __SerdeContext -): any => { - return { - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_GetServiceQuotaIncreaseRequestFromTemplateRequest omitted. -/** - * serializeAws_json1_1GetServiceQuotaRequest - */ -const se_GetServiceQuotaRequest = (input: GetServiceQuotaRequest, context: __SerdeContext): any => { - return { - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_GetServiceQuotaRequest omitted. -/** - * serializeAws_json1_1InputTagKeys - */ -const se_InputTagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InputTagKeys omitted. -/** - * serializeAws_json1_1InputTags - */ -const se_InputTags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_InputTags omitted. -/** - * serializeAws_json1_1ListAWSDefaultServiceQuotasRequest - */ -const se_ListAWSDefaultServiceQuotasRequest = ( - input: ListAWSDefaultServiceQuotasRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_ListAWSDefaultServiceQuotasRequest omitted. -/** - * serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryByQuotaRequest - */ -const se_ListRequestedServiceQuotaChangeHistoryByQuotaRequest = ( - input: ListRequestedServiceQuotaChangeHistoryByQuotaRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListRequestedServiceQuotaChangeHistoryByQuotaRequest omitted. -/** - * serializeAws_json1_1ListRequestedServiceQuotaChangeHistoryRequest - */ -const se_ListRequestedServiceQuotaChangeHistoryRequest = ( - input: ListRequestedServiceQuotaChangeHistoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListRequestedServiceQuotaChangeHistoryRequest omitted. -/** - * serializeAws_json1_1ListServiceQuotaIncreaseRequestsInTemplateRequest - */ -const se_ListServiceQuotaIncreaseRequestsInTemplateRequest = ( - input: ListServiceQuotaIncreaseRequestsInTemplateRequest, - context: __SerdeContext -): any => { - return { - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_ListServiceQuotaIncreaseRequestsInTemplateRequest omitted. -/** - * serializeAws_json1_1ListServiceQuotasRequest - */ -const se_ListServiceQuotasRequest = (input: ListServiceQuotasRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; -}; +// se_ListServiceQuotasRequest omitted. -/** - * serializeAws_json1_1ListServicesRequest - */ -const se_ListServicesRequest = (input: ListServicesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListServicesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. /** * serializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateRequest @@ -2098,12 +1900,12 @@ const se_PutServiceQuotaIncreaseRequestIntoTemplateRequest = ( input: PutServiceQuotaIncreaseRequestIntoTemplateRequest, context: __SerdeContext ): any => { - return { - ...(input.AwsRegion != null && { AwsRegion: input.AwsRegion }), - ...(input.DesiredValue != null && { DesiredValue: __serializeFloat(input.DesiredValue) }), - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; + return take(input, { + AwsRegion: [], + DesiredValue: __serializeFloat, + QuotaCode: [], + ServiceCode: [], + }); }; /** @@ -2113,124 +1915,34 @@ const se_RequestServiceQuotaIncreaseRequest = ( input: RequestServiceQuotaIncreaseRequest, context: __SerdeContext ): any => { - return { - ...(input.DesiredValue != null && { DesiredValue: __serializeFloat(input.DesiredValue) }), - ...(input.QuotaCode != null && { QuotaCode: input.QuotaCode }), - ...(input.ServiceCode != null && { ServiceCode: input.ServiceCode }), - }; + return take(input, { + DesiredValue: __serializeFloat, + QuotaCode: [], + ServiceCode: [], + }); }; -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_InputTags(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_InputTagKeys(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AssociateServiceQuotaTemplateResponse - */ -const de_AssociateServiceQuotaTemplateResponse = ( - output: any, - context: __SerdeContext -): AssociateServiceQuotaTemplateResponse => { - return {} as any; -}; +// de_AssociateServiceQuotaTemplateResponse omitted. -/** - * deserializeAws_json1_1AWSServiceAccessNotEnabledException - */ -const de_AWSServiceAccessNotEnabledException = ( - output: any, - context: __SerdeContext -): AWSServiceAccessNotEnabledException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AWSServiceAccessNotEnabledException omitted. -/** - * deserializeAws_json1_1DeleteServiceQuotaIncreaseRequestFromTemplateResponse - */ -const de_DeleteServiceQuotaIncreaseRequestFromTemplateResponse = ( - output: any, - context: __SerdeContext -): DeleteServiceQuotaIncreaseRequestFromTemplateResponse => { - return {} as any; -}; +// de_DeleteServiceQuotaIncreaseRequestFromTemplateResponse omitted. -/** - * deserializeAws_json1_1DependencyAccessDeniedException - */ -const de_DependencyAccessDeniedException = (output: any, context: __SerdeContext): DependencyAccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DependencyAccessDeniedException omitted. -/** - * deserializeAws_json1_1DisassociateServiceQuotaTemplateResponse - */ -const de_DisassociateServiceQuotaTemplateResponse = ( - output: any, - context: __SerdeContext -): DisassociateServiceQuotaTemplateResponse => { - return {} as any; -}; +// de_DisassociateServiceQuotaTemplateResponse omitted. -/** - * deserializeAws_json1_1ErrorReason - */ -const de_ErrorReason = (output: any, context: __SerdeContext): ErrorReason => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - } as any; -}; +// de_ErrorReason omitted. -/** - * deserializeAws_json1_1GetAssociationForServiceQuotaTemplateResponse - */ -const de_GetAssociationForServiceQuotaTemplateResponse = ( - output: any, - context: __SerdeContext -): GetAssociationForServiceQuotaTemplateResponse => { - return { - ServiceQuotaTemplateAssociationStatus: __expectString(output.ServiceQuotaTemplateAssociationStatus), - } as any; -}; +// de_GetAssociationForServiceQuotaTemplateResponse omitted. /** * deserializeAws_json1_1GetAWSDefaultServiceQuotaResponse @@ -2239,9 +1951,9 @@ const de_GetAWSDefaultServiceQuotaResponse = ( output: any, context: __SerdeContext ): GetAWSDefaultServiceQuotaResponse => { - return { - Quota: output.Quota != null ? de_ServiceQuota(output.Quota, context) : undefined, - } as any; + return take(output, { + Quota: (_: any) => de_ServiceQuota(_, context), + }) as any; }; /** @@ -2251,10 +1963,9 @@ const de_GetRequestedServiceQuotaChangeResponse = ( output: any, context: __SerdeContext ): GetRequestedServiceQuotaChangeResponse => { - return { - RequestedQuota: - output.RequestedQuota != null ? de_RequestedServiceQuotaChange(output.RequestedQuota, context) : undefined, - } as any; + return take(output, { + RequestedQuota: (_: any) => de_RequestedServiceQuotaChange(_, context), + }) as any; }; /** @@ -2264,49 +1975,25 @@ const de_GetServiceQuotaIncreaseRequestFromTemplateResponse = ( output: any, context: __SerdeContext ): GetServiceQuotaIncreaseRequestFromTemplateResponse => { - return { - ServiceQuotaIncreaseRequestInTemplate: - output.ServiceQuotaIncreaseRequestInTemplate != null - ? de_ServiceQuotaIncreaseRequestInTemplate(output.ServiceQuotaIncreaseRequestInTemplate, context) - : undefined, - } as any; + return take(output, { + ServiceQuotaIncreaseRequestInTemplate: (_: any) => de_ServiceQuotaIncreaseRequestInTemplate(_, context), + }) as any; }; /** * deserializeAws_json1_1GetServiceQuotaResponse */ const de_GetServiceQuotaResponse = (output: any, context: __SerdeContext): GetServiceQuotaResponse => { - return { - Quota: output.Quota != null ? de_ServiceQuota(output.Quota, context) : undefined, - } as any; + return take(output, { + Quota: (_: any) => de_ServiceQuota(_, context), + }) as any; }; -/** - * deserializeAws_json1_1IllegalArgumentException - */ -const de_IllegalArgumentException = (output: any, context: __SerdeContext): IllegalArgumentException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_IllegalArgumentException omitted. -/** - * deserializeAws_json1_1InvalidPaginationTokenException - */ -const de_InvalidPaginationTokenException = (output: any, context: __SerdeContext): InvalidPaginationTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidPaginationTokenException omitted. -/** - * deserializeAws_json1_1InvalidResourceStateException - */ -const de_InvalidResourceStateException = (output: any, context: __SerdeContext): InvalidResourceStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidResourceStateException omitted. /** * deserializeAws_json1_1ListAWSDefaultServiceQuotasResponse @@ -2315,10 +2002,10 @@ const de_ListAWSDefaultServiceQuotasResponse = ( output: any, context: __SerdeContext ): ListAWSDefaultServiceQuotasResponse => { - return { - NextToken: __expectString(output.NextToken), - Quotas: output.Quotas != null ? de_ServiceQuotaListDefinition(output.Quotas, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Quotas: (_: any) => de_ServiceQuotaListDefinition(_, context), + }) as any; }; /** @@ -2328,13 +2015,10 @@ const de_ListRequestedServiceQuotaChangeHistoryByQuotaResponse = ( output: any, context: __SerdeContext ): ListRequestedServiceQuotaChangeHistoryByQuotaResponse => { - return { - NextToken: __expectString(output.NextToken), - RequestedQuotas: - output.RequestedQuotas != null - ? de_RequestedServiceQuotaChangeHistoryListDefinition(output.RequestedQuotas, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RequestedQuotas: (_: any) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context), + }) as any; }; /** @@ -2344,13 +2028,10 @@ const de_ListRequestedServiceQuotaChangeHistoryResponse = ( output: any, context: __SerdeContext ): ListRequestedServiceQuotaChangeHistoryResponse => { - return { - NextToken: __expectString(output.NextToken), - RequestedQuotas: - output.RequestedQuotas != null - ? de_RequestedServiceQuotaChangeHistoryListDefinition(output.RequestedQuotas, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RequestedQuotas: (_: any) => de_RequestedServiceQuotaChangeHistoryListDefinition(_, context), + }) as any; }; /** @@ -2360,117 +2041,37 @@ const de_ListServiceQuotaIncreaseRequestsInTemplateResponse = ( output: any, context: __SerdeContext ): ListServiceQuotaIncreaseRequestsInTemplateResponse => { - return { - NextToken: __expectString(output.NextToken), - ServiceQuotaIncreaseRequestInTemplateList: - output.ServiceQuotaIncreaseRequestInTemplateList != null - ? de_ServiceQuotaIncreaseRequestInTemplateList(output.ServiceQuotaIncreaseRequestInTemplateList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ServiceQuotaIncreaseRequestInTemplateList: (_: any) => de_ServiceQuotaIncreaseRequestInTemplateList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListServiceQuotasResponse */ const de_ListServiceQuotasResponse = (output: any, context: __SerdeContext): ListServiceQuotasResponse => { - return { - NextToken: __expectString(output.NextToken), - Quotas: output.Quotas != null ? de_ServiceQuotaListDefinition(output.Quotas, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Quotas: (_: any) => de_ServiceQuotaListDefinition(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListServicesResponse - */ -const de_ListServicesResponse = (output: any, context: __SerdeContext): ListServicesResponse => { - return { - NextToken: __expectString(output.NextToken), - Services: output.Services != null ? de_ServiceInfoListDefinition(output.Services, context) : undefined, - } as any; -}; +// de_ListServicesResponse omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_OutputTags(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1MetricDimensionsMapDefinition - */ -const de_MetricDimensionsMapDefinition = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MetricDimensionsMapDefinition omitted. -/** - * deserializeAws_json1_1MetricInfo - */ -const de_MetricInfo = (output: any, context: __SerdeContext): MetricInfo => { - return { - MetricDimensions: - output.MetricDimensions != null ? de_MetricDimensionsMapDefinition(output.MetricDimensions, context) : undefined, - MetricName: __expectString(output.MetricName), - MetricNamespace: __expectString(output.MetricNamespace), - MetricStatisticRecommendation: __expectString(output.MetricStatisticRecommendation), - } as any; -}; +// de_MetricInfo omitted. -/** - * deserializeAws_json1_1NoAvailableOrganizationException - */ -const de_NoAvailableOrganizationException = ( - output: any, - context: __SerdeContext -): NoAvailableOrganizationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NoAvailableOrganizationException omitted. -/** - * deserializeAws_json1_1NoSuchResourceException - */ -const de_NoSuchResourceException = (output: any, context: __SerdeContext): NoSuchResourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NoSuchResourceException omitted. -/** - * deserializeAws_json1_1OrganizationNotInAllFeaturesModeException - */ -const de_OrganizationNotInAllFeaturesModeException = ( - output: any, - context: __SerdeContext -): OrganizationNotInAllFeaturesModeException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OrganizationNotInAllFeaturesModeException omitted. -/** - * deserializeAws_json1_1OutputTags - */ -const de_OutputTags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_OutputTags omitted. /** * deserializeAws_json1_1PutServiceQuotaIncreaseRequestIntoTemplateResponse @@ -2479,57 +2080,35 @@ const de_PutServiceQuotaIncreaseRequestIntoTemplateResponse = ( output: any, context: __SerdeContext ): PutServiceQuotaIncreaseRequestIntoTemplateResponse => { - return { - ServiceQuotaIncreaseRequestInTemplate: - output.ServiceQuotaIncreaseRequestInTemplate != null - ? de_ServiceQuotaIncreaseRequestInTemplate(output.ServiceQuotaIncreaseRequestInTemplate, context) - : undefined, - } as any; + return take(output, { + ServiceQuotaIncreaseRequestInTemplate: (_: any) => de_ServiceQuotaIncreaseRequestInTemplate(_, context), + }) as any; }; -/** - * deserializeAws_json1_1QuotaExceededException - */ -const de_QuotaExceededException = (output: any, context: __SerdeContext): QuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_QuotaExceededException omitted. -/** - * deserializeAws_json1_1QuotaPeriod - */ -const de_QuotaPeriod = (output: any, context: __SerdeContext): QuotaPeriod => { - return { - PeriodUnit: __expectString(output.PeriodUnit), - PeriodValue: __expectInt32(output.PeriodValue), - } as any; -}; +// de_QuotaPeriod omitted. /** * deserializeAws_json1_1RequestedServiceQuotaChange */ const de_RequestedServiceQuotaChange = (output: any, context: __SerdeContext): RequestedServiceQuotaChange => { - return { - CaseId: __expectString(output.CaseId), - Created: - output.Created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Created))) : undefined, - DesiredValue: __limitedParseDouble(output.DesiredValue), - GlobalQuota: __expectBoolean(output.GlobalQuota), - Id: __expectString(output.Id), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - QuotaArn: __expectString(output.QuotaArn), - QuotaCode: __expectString(output.QuotaCode), - QuotaName: __expectString(output.QuotaName), - Requester: __expectString(output.Requester), - ServiceCode: __expectString(output.ServiceCode), - ServiceName: __expectString(output.ServiceName), - Status: __expectString(output.Status), - Unit: __expectString(output.Unit), - } as any; + return take(output, { + CaseId: __expectString, + Created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DesiredValue: __limitedParseDouble, + GlobalQuota: __expectBoolean, + Id: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + QuotaArn: __expectString, + QuotaCode: __expectString, + QuotaName: __expectString, + Requester: __expectString, + ServiceCode: __expectString, + ServiceName: __expectString, + Status: __expectString, + Unit: __expectString, + }) as any; }; /** @@ -2542,9 +2121,6 @@ const de_RequestedServiceQuotaChangeHistoryListDefinition = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RequestedServiceQuotaChange(entry, context); }); return retVal; @@ -2557,73 +2133,37 @@ const de_RequestServiceQuotaIncreaseResponse = ( output: any, context: __SerdeContext ): RequestServiceQuotaIncreaseResponse => { - return { - RequestedQuota: - output.RequestedQuota != null ? de_RequestedServiceQuotaChange(output.RequestedQuota, context) : undefined, - } as any; + return take(output, { + RequestedQuota: (_: any) => de_RequestedServiceQuotaChange(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceAlreadyExistsException omitted. -/** - * deserializeAws_json1_1ServiceException - */ -const de_ServiceException = (output: any, context: __SerdeContext): ServiceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceException omitted. -/** - * deserializeAws_json1_1ServiceInfo - */ -const de_ServiceInfo = (output: any, context: __SerdeContext): ServiceInfo => { - return { - ServiceCode: __expectString(output.ServiceCode), - ServiceName: __expectString(output.ServiceName), - } as any; -}; +// de_ServiceInfo omitted. -/** - * deserializeAws_json1_1ServiceInfoListDefinition - */ -const de_ServiceInfoListDefinition = (output: any, context: __SerdeContext): ServiceInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceInfo(entry, context); - }); - return retVal; -}; +// de_ServiceInfoListDefinition omitted. /** * deserializeAws_json1_1ServiceQuota */ const de_ServiceQuota = (output: any, context: __SerdeContext): ServiceQuota => { - return { - Adjustable: __expectBoolean(output.Adjustable), - ErrorReason: output.ErrorReason != null ? de_ErrorReason(output.ErrorReason, context) : undefined, - GlobalQuota: __expectBoolean(output.GlobalQuota), - Period: output.Period != null ? de_QuotaPeriod(output.Period, context) : undefined, - QuotaArn: __expectString(output.QuotaArn), - QuotaCode: __expectString(output.QuotaCode), - QuotaName: __expectString(output.QuotaName), - ServiceCode: __expectString(output.ServiceCode), - ServiceName: __expectString(output.ServiceName), - Unit: __expectString(output.Unit), - UsageMetric: output.UsageMetric != null ? de_MetricInfo(output.UsageMetric, context) : undefined, - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Adjustable: __expectBoolean, + ErrorReason: _json, + GlobalQuota: __expectBoolean, + Period: _json, + QuotaArn: __expectString, + QuotaCode: __expectString, + QuotaName: __expectString, + ServiceCode: __expectString, + ServiceName: __expectString, + Unit: __expectString, + UsageMetric: _json, + Value: __limitedParseDouble, + }) as any; }; /** @@ -2633,16 +2173,16 @@ const de_ServiceQuotaIncreaseRequestInTemplate = ( output: any, context: __SerdeContext ): ServiceQuotaIncreaseRequestInTemplate => { - return { - AwsRegion: __expectString(output.AwsRegion), - DesiredValue: __limitedParseDouble(output.DesiredValue), - GlobalQuota: __expectBoolean(output.GlobalQuota), - QuotaCode: __expectString(output.QuotaCode), - QuotaName: __expectString(output.QuotaName), - ServiceCode: __expectString(output.ServiceCode), - ServiceName: __expectString(output.ServiceName), - Unit: __expectString(output.Unit), - } as any; + return take(output, { + AwsRegion: __expectString, + DesiredValue: __limitedParseDouble, + GlobalQuota: __expectBoolean, + QuotaCode: __expectString, + QuotaName: __expectString, + ServiceCode: __expectString, + ServiceName: __expectString, + Unit: __expectString, + }) as any; }; /** @@ -2655,9 +2195,6 @@ const de_ServiceQuotaIncreaseRequestInTemplateList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceQuotaIncreaseRequestInTemplate(entry, context); }); return retVal; @@ -2670,88 +2207,26 @@ const de_ServiceQuotaListDefinition = (output: any, context: __SerdeContext): Se const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceQuota(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ServiceQuotaTemplateNotInUseException - */ -const de_ServiceQuotaTemplateNotInUseException = ( - output: any, - context: __SerdeContext -): ServiceQuotaTemplateNotInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaTemplateNotInUseException omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagPolicyViolationException - */ -const de_TagPolicyViolationException = (output: any, context: __SerdeContext): TagPolicyViolationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TagPolicyViolationException omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TemplatesNotAvailableInRegionException - */ -const de_TemplatesNotAvailableInRegionException = ( - output: any, - context: __SerdeContext -): TemplatesNotAvailableInRegionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TemplatesNotAvailableInRegionException omitted. -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyRequestsException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2773,6 +2248,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-servicediscovery/src/protocols/Aws_json1_1.ts b/clients/client-servicediscovery/src/protocols/Aws_json1_1.ts index 47d57ce967a0..b9644f1f2510 100644 --- a/clients/client-servicediscovery/src/protocols/Aws_json1_1.ts +++ b/clients/client-servicediscovery/src/protocols/Aws_json1_1.ts @@ -5,14 +5,15 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -77,31 +78,21 @@ import { import { UpdateServiceCommandInput, UpdateServiceCommandOutput } from "../commands/UpdateServiceCommand"; import { CreateHttpNamespaceRequest, - CreateHttpNamespaceResponse, CreatePrivateDnsNamespaceRequest, - CreatePrivateDnsNamespaceResponse, CreatePublicDnsNamespaceRequest, - CreatePublicDnsNamespaceResponse, CreateServiceRequest, CreateServiceResponse, CustomHealthNotFound, DeleteNamespaceRequest, - DeleteNamespaceResponse, DeleteServiceRequest, - DeleteServiceResponse, DeregisterInstanceRequest, - DeregisterInstanceResponse, DiscoverInstancesRequest, - DiscoverInstancesResponse, DnsConfig, DnsConfigChange, - DnsProperties, DnsRecord, DuplicateRequest, GetInstanceRequest, - GetInstanceResponse, GetInstancesHealthStatusRequest, - GetInstancesHealthStatusResponse, GetNamespaceRequest, GetNamespaceResponse, GetOperationRequest, @@ -110,35 +101,24 @@ import { GetServiceResponse, HealthCheckConfig, HealthCheckCustomConfig, - HealthStatus, - HttpInstanceSummary, HttpNamespaceChange, - HttpProperties, - Instance, InstanceNotFound, - InstanceSummary, InvalidInput, ListInstancesRequest, - ListInstancesResponse, ListNamespacesRequest, ListNamespacesResponse, ListOperationsRequest, - ListOperationsResponse, ListServicesRequest, ListServicesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, Namespace, NamespaceAlreadyExists, NamespaceFilter, NamespaceNotFound, - NamespaceProperties, NamespaceSummary, Operation, OperationFilter, OperationNotFound, - OperationSummary, - OperationTargetType, PrivateDnsNamespaceChange, PrivateDnsNamespaceProperties, PrivateDnsNamespacePropertiesChange, @@ -150,7 +130,6 @@ import { PublicDnsPropertiesMutable, PublicDnsPropertiesMutableChange, RegisterInstanceRequest, - RegisterInstanceResponse, RequestLimitExceeded, ResourceInUse, ResourceLimitExceeded, @@ -165,19 +144,13 @@ import { SOAChange, Tag, TagResourceRequest, - TagResourceResponse, TooManyTagsException, UntagResourceRequest, - UntagResourceResponse, UpdateHttpNamespaceRequest, - UpdateHttpNamespaceResponse, UpdateInstanceCustomHealthStatusRequest, UpdatePrivateDnsNamespaceRequest, - UpdatePrivateDnsNamespaceResponse, UpdatePublicDnsNamespaceRequest, - UpdatePublicDnsNamespaceResponse, UpdateServiceRequest, - UpdateServiceResponse, } from "../models/models_0"; import { ServiceDiscoveryServiceException as __BaseException } from "../models/ServiceDiscoveryServiceException"; @@ -242,7 +215,7 @@ export const se_DeleteNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteNamespace"); let body: any; - body = JSON.stringify(se_DeleteNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -255,7 +228,7 @@ export const se_DeleteServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteService"); let body: any; - body = JSON.stringify(se_DeleteServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -268,7 +241,7 @@ export const se_DeregisterInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterInstance"); let body: any; - body = JSON.stringify(se_DeregisterInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +254,7 @@ export const se_DiscoverInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DiscoverInstances"); let body: any; - body = JSON.stringify(se_DiscoverInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "data-" + resolvedHostname; @@ -301,7 +274,7 @@ export const se_GetInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstance"); let body: any; - body = JSON.stringify(se_GetInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -314,7 +287,7 @@ export const se_GetInstancesHealthStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInstancesHealthStatus"); let body: any; - body = JSON.stringify(se_GetInstancesHealthStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -327,7 +300,7 @@ export const se_GetNamespaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetNamespace"); let body: any; - body = JSON.stringify(se_GetNamespaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -340,7 +313,7 @@ export const se_GetOperationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOperation"); let body: any; - body = JSON.stringify(se_GetOperationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -353,7 +326,7 @@ export const se_GetServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetService"); let body: any; - body = JSON.stringify(se_GetServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -366,7 +339,7 @@ export const se_ListInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInstances"); let body: any; - body = JSON.stringify(se_ListInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -379,7 +352,7 @@ export const se_ListNamespacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListNamespaces"); let body: any; - body = JSON.stringify(se_ListNamespacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -392,7 +365,7 @@ export const se_ListOperationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOperations"); let body: any; - body = JSON.stringify(se_ListOperationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -405,7 +378,7 @@ export const se_ListServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServices"); let body: any; - body = JSON.stringify(se_ListServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -418,7 +391,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -444,7 +417,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -457,7 +430,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -483,7 +456,7 @@ export const se_UpdateInstanceCustomHealthStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateInstanceCustomHealthStatus"); let body: any; - body = JSON.stringify(se_UpdateInstanceCustomHealthStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -522,7 +495,7 @@ export const se_UpdateServiceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateService"); let body: any; - body = JSON.stringify(se_UpdateServiceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -538,12 +511,12 @@ export const de_CreateHttpNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateHttpNamespaceResponse(data, context); + contents = _json(data); const response: CreateHttpNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -576,10 +549,9 @@ const de_CreateHttpNamespaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -597,12 +569,12 @@ export const de_CreatePrivateDnsNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePrivateDnsNamespaceResponse(data, context); + contents = _json(data); const response: CreatePrivateDnsNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -635,10 +607,9 @@ const de_CreatePrivateDnsNamespaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -656,12 +627,12 @@ export const de_CreatePublicDnsNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePublicDnsNamespaceResponse(data, context); + contents = _json(data); const response: CreatePublicDnsNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -694,10 +665,9 @@ const de_CreatePublicDnsNamespaceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -720,7 +690,7 @@ export const de_CreateServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -753,10 +723,9 @@ const de_CreateServiceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -774,12 +743,12 @@ export const de_DeleteNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteNamespaceResponse(data, context); + contents = _json(data); const response: DeleteNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -809,10 +778,9 @@ const de_DeleteNamespaceCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -830,12 +798,12 @@ export const de_DeleteServiceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteServiceResponse(data, context); + contents = _json(data); const response: DeleteServiceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -862,10 +830,9 @@ const de_DeleteServiceCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -883,12 +850,12 @@ export const de_DeregisterInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterInstanceResponse(data, context); + contents = _json(data); const response: DeregisterInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -921,10 +888,9 @@ const de_DeregisterInstanceCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -942,12 +908,12 @@ export const de_DiscoverInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DiscoverInstancesResponse(data, context); + contents = _json(data); const response: DiscoverInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -977,10 +943,9 @@ const de_DiscoverInstancesCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -998,12 +963,12 @@ export const de_GetInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInstanceResponse(data, context); + contents = _json(data); const response: GetInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1030,10 +995,9 @@ const de_GetInstanceCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1051,12 +1015,12 @@ export const de_GetInstancesHealthStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInstancesHealthStatusResponse(data, context); + contents = _json(data); const response: GetInstancesHealthStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1083,10 +1047,9 @@ const de_GetInstancesHealthStatusCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1109,7 +1072,7 @@ export const de_GetNamespaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1133,10 +1096,9 @@ const de_GetNamespaceCommandError = async ( throw await de_NamespaceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1159,7 +1121,7 @@ export const de_GetOperationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1183,10 +1145,9 @@ const de_GetOperationCommandError = async ( throw await de_OperationNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1209,7 +1170,7 @@ export const de_GetServiceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1233,10 +1194,9 @@ const de_GetServiceCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1254,12 +1214,12 @@ export const de_ListInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListInstancesResponse(data, context); + contents = _json(data); const response: ListInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1283,10 +1243,9 @@ const de_ListInstancesCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1309,7 +1268,7 @@ export const de_ListNamespacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1330,10 +1289,9 @@ const de_ListNamespacesCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1351,12 +1309,12 @@ export const de_ListOperationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListOperationsResponse(data, context); + contents = _json(data); const response: ListOperationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1377,10 +1335,9 @@ const de_ListOperationsCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1403,7 +1360,7 @@ export const de_ListServicesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1424,10 +1381,9 @@ const de_ListServicesCommandError = async ( throw await de_InvalidInputRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1445,12 +1401,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1474,10 +1430,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1495,12 +1450,12 @@ export const de_RegisterInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterInstanceResponse(data, context); + contents = _json(data); const response: RegisterInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1533,10 +1488,9 @@ const de_RegisterInstanceCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1554,12 +1508,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1586,10 +1540,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1607,12 +1560,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1636,10 +1589,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1657,12 +1609,12 @@ export const de_UpdateHttpNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHttpNamespaceResponse(data, context); + contents = _json(data); const response: UpdateHttpNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1692,10 +1644,9 @@ const de_UpdateHttpNamespaceCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1715,7 +1666,7 @@ export const de_UpdateInstanceCustomHealthStatusCommand = async ( const response: UpdateInstanceCustomHealthStatusCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1745,10 +1696,9 @@ const de_UpdateInstanceCustomHealthStatusCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1766,12 +1716,12 @@ export const de_UpdatePrivateDnsNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePrivateDnsNamespaceResponse(data, context); + contents = _json(data); const response: UpdatePrivateDnsNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1801,10 +1751,9 @@ const de_UpdatePrivateDnsNamespaceCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1822,12 +1771,12 @@ export const de_UpdatePublicDnsNamespaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePublicDnsNamespaceResponse(data, context); + contents = _json(data); const response: UpdatePublicDnsNamespaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1857,10 +1806,9 @@ const de_UpdatePublicDnsNamespaceCommandError = async ( throw await de_ResourceInUseRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1878,12 +1826,12 @@ export const de_UpdateServiceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateServiceResponse(data, context); + contents = _json(data); const response: UpdateServiceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1910,10 +1858,9 @@ const de_UpdateServiceCommandError = async ( throw await de_ServiceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1927,7 +1874,7 @@ const de_CustomHealthNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomHealthNotFound(body, context); + const deserialized: any = _json(body); const exception = new CustomHealthNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1940,7 +1887,7 @@ const de_CustomHealthNotFoundRes = async ( */ const de_DuplicateRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateRequest(body, context); + const deserialized: any = _json(body); const exception = new DuplicateRequest({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1953,7 +1900,7 @@ const de_DuplicateRequestRes = async (parsedOutput: any, context: __SerdeContext */ const de_InstanceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InstanceNotFound(body, context); + const deserialized: any = _json(body); const exception = new InstanceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1966,7 +1913,7 @@ const de_InstanceNotFoundRes = async (parsedOutput: any, context: __SerdeContext */ const de_InvalidInputRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInput(body, context); + const deserialized: any = _json(body); const exception = new InvalidInput({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1982,7 +1929,7 @@ const de_NamespaceAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NamespaceAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new NamespaceAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1995,7 +1942,7 @@ const de_NamespaceAlreadyExistsRes = async ( */ const de_NamespaceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NamespaceNotFound(body, context); + const deserialized: any = _json(body); const exception = new NamespaceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2008,7 +1955,7 @@ const de_NamespaceNotFoundRes = async (parsedOutput: any, context: __SerdeContex */ const de_OperationNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotFound(body, context); + const deserialized: any = _json(body); const exception = new OperationNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2024,7 +1971,7 @@ const de_RequestLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RequestLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new RequestLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2037,7 +1984,7 @@ const de_RequestLimitExceededRes = async ( */ const de_ResourceInUseRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUse(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUse({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2053,7 +2000,7 @@ const de_ResourceLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ResourceLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2069,7 +2016,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2085,7 +2032,7 @@ const de_ServiceAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new ServiceAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2098,7 +2045,7 @@ const de_ServiceAlreadyExistsRes = async ( */ const de_ServiceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceNotFound(body, context); + const deserialized: any = _json(body); const exception = new ServiceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2114,7 +2061,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2122,1061 +2069,345 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1Attributes - */ -const se_Attributes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Attributes omitted. /** * serializeAws_json1_1CreateHttpNamespaceRequest */ const se_CreateHttpNamespaceRequest = (input: CreateHttpNamespaceRequest, context: __SerdeContext): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Tags: _json, + }); }; /** * serializeAws_json1_1CreatePrivateDnsNamespaceRequest */ const se_CreatePrivateDnsNamespaceRequest = (input: CreatePrivateDnsNamespaceRequest, context: __SerdeContext): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Properties != null && { Properties: se_PrivateDnsNamespaceProperties(input.Properties, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Vpc != null && { Vpc: input.Vpc }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Properties: _json, + Tags: _json, + Vpc: [], + }); }; /** * serializeAws_json1_1CreatePublicDnsNamespaceRequest */ const se_CreatePublicDnsNamespaceRequest = (input: CreatePublicDnsNamespaceRequest, context: __SerdeContext): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Properties != null && { Properties: se_PublicDnsNamespaceProperties(input.Properties, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + Properties: _json, + Tags: _json, + }); }; /** * serializeAws_json1_1CreateServiceRequest */ const se_CreateServiceRequest = (input: CreateServiceRequest, context: __SerdeContext): any => { - return { - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.DnsConfig != null && { DnsConfig: se_DnsConfig(input.DnsConfig, context) }), - ...(input.HealthCheckConfig != null && { - HealthCheckConfig: se_HealthCheckConfig(input.HealthCheckConfig, context), - }), - ...(input.HealthCheckCustomConfig != null && { - HealthCheckCustomConfig: se_HealthCheckCustomConfig(input.HealthCheckCustomConfig, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NamespaceId != null && { NamespaceId: input.NamespaceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + Description: [], + DnsConfig: _json, + HealthCheckConfig: _json, + HealthCheckCustomConfig: _json, + Name: [], + NamespaceId: [], + Tags: _json, + Type: [], + }); }; -/** - * serializeAws_json1_1DeleteNamespaceRequest - */ -const se_DeleteNamespaceRequest = (input: DeleteNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteNamespaceRequest omitted. -/** - * serializeAws_json1_1DeleteServiceRequest - */ -const se_DeleteServiceRequest = (input: DeleteServiceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_DeleteServiceRequest omitted. -/** - * serializeAws_json1_1DeregisterInstanceRequest - */ -const se_DeregisterInstanceRequest = (input: DeregisterInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - }; -}; +// se_DeregisterInstanceRequest omitted. -/** - * serializeAws_json1_1DiscoverInstancesRequest - */ -const se_DiscoverInstancesRequest = (input: DiscoverInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.HealthStatus != null && { HealthStatus: input.HealthStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NamespaceName != null && { NamespaceName: input.NamespaceName }), - ...(input.OptionalParameters != null && { OptionalParameters: se_Attributes(input.OptionalParameters, context) }), - ...(input.QueryParameters != null && { QueryParameters: se_Attributes(input.QueryParameters, context) }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - }; -}; +// se_DiscoverInstancesRequest omitted. -/** - * serializeAws_json1_1DnsConfig - */ -const se_DnsConfig = (input: DnsConfig, context: __SerdeContext): any => { - return { - ...(input.DnsRecords != null && { DnsRecords: se_DnsRecordList(input.DnsRecords, context) }), - ...(input.NamespaceId != null && { NamespaceId: input.NamespaceId }), - ...(input.RoutingPolicy != null && { RoutingPolicy: input.RoutingPolicy }), - }; -}; +// se_DnsConfig omitted. -/** - * serializeAws_json1_1DnsConfigChange - */ -const se_DnsConfigChange = (input: DnsConfigChange, context: __SerdeContext): any => { - return { - ...(input.DnsRecords != null && { DnsRecords: se_DnsRecordList(input.DnsRecords, context) }), - }; -}; +// se_DnsConfigChange omitted. -/** - * serializeAws_json1_1DnsRecord - */ -const se_DnsRecord = (input: DnsRecord, context: __SerdeContext): any => { - return { - ...(input.TTL != null && { TTL: input.TTL }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DnsRecord omitted. -/** - * serializeAws_json1_1DnsRecordList - */ -const se_DnsRecordList = (input: DnsRecord[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DnsRecord(entry, context); - }); -}; +// se_DnsRecordList omitted. -/** - * serializeAws_json1_1FilterValues - */ -const se_FilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilterValues omitted. -/** - * serializeAws_json1_1GetInstanceRequest - */ -const se_GetInstanceRequest = (input: GetInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - }; -}; +// se_GetInstanceRequest omitted. -/** - * serializeAws_json1_1GetInstancesHealthStatusRequest - */ -const se_GetInstancesHealthStatusRequest = (input: GetInstancesHealthStatusRequest, context: __SerdeContext): any => { - return { - ...(input.Instances != null && { Instances: se_InstanceIdList(input.Instances, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - }; -}; +// se_GetInstancesHealthStatusRequest omitted. -/** - * serializeAws_json1_1GetNamespaceRequest - */ -const se_GetNamespaceRequest = (input: GetNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_GetNamespaceRequest omitted. -/** - * serializeAws_json1_1GetOperationRequest - */ -const se_GetOperationRequest = (input: GetOperationRequest, context: __SerdeContext): any => { - return { - ...(input.OperationId != null && { OperationId: input.OperationId }), - }; -}; +// se_GetOperationRequest omitted. -/** - * serializeAws_json1_1GetServiceRequest - */ -const se_GetServiceRequest = (input: GetServiceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - }; -}; +// se_GetServiceRequest omitted. -/** - * serializeAws_json1_1HealthCheckConfig - */ -const se_HealthCheckConfig = (input: HealthCheckConfig, context: __SerdeContext): any => { - return { - ...(input.FailureThreshold != null && { FailureThreshold: input.FailureThreshold }), - ...(input.ResourcePath != null && { ResourcePath: input.ResourcePath }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_HealthCheckConfig omitted. -/** - * serializeAws_json1_1HealthCheckCustomConfig - */ -const se_HealthCheckCustomConfig = (input: HealthCheckCustomConfig, context: __SerdeContext): any => { - return { - ...(input.FailureThreshold != null && { FailureThreshold: input.FailureThreshold }), - }; -}; +// se_HealthCheckCustomConfig omitted. -/** - * serializeAws_json1_1HttpNamespaceChange - */ -const se_HttpNamespaceChange = (input: HttpNamespaceChange, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - }; -}; +// se_HttpNamespaceChange omitted. -/** - * serializeAws_json1_1InstanceIdList - */ -const se_InstanceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceIdList omitted. -/** - * serializeAws_json1_1ListInstancesRequest - */ -const se_ListInstancesRequest = (input: ListInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - }; -}; +// se_ListInstancesRequest omitted. -/** - * serializeAws_json1_1ListNamespacesRequest - */ -const se_ListNamespacesRequest = (input: ListNamespacesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_NamespaceFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListNamespacesRequest omitted. -/** - * serializeAws_json1_1ListOperationsRequest - */ -const se_ListOperationsRequest = (input: ListOperationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_OperationFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListOperationsRequest omitted. -/** - * serializeAws_json1_1ListServicesRequest - */ -const se_ListServicesRequest = (input: ListServicesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ServiceFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListServicesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1NamespaceFilter - */ -const se_NamespaceFilter = (input: NamespaceFilter, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_NamespaceFilter omitted. -/** - * serializeAws_json1_1NamespaceFilters - */ -const se_NamespaceFilters = (input: NamespaceFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NamespaceFilter(entry, context); - }); -}; +// se_NamespaceFilters omitted. -/** - * serializeAws_json1_1OperationFilter - */ -const se_OperationFilter = (input: OperationFilter, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_OperationFilter omitted. -/** - * serializeAws_json1_1OperationFilters - */ -const se_OperationFilters = (input: OperationFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OperationFilter(entry, context); - }); -}; +// se_OperationFilters omitted. -/** - * serializeAws_json1_1PrivateDnsNamespaceChange - */ -const se_PrivateDnsNamespaceChange = (input: PrivateDnsNamespaceChange, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Properties != null && { Properties: se_PrivateDnsNamespacePropertiesChange(input.Properties, context) }), - }; -}; +// se_PrivateDnsNamespaceChange omitted. -/** - * serializeAws_json1_1PrivateDnsNamespaceProperties - */ -const se_PrivateDnsNamespaceProperties = (input: PrivateDnsNamespaceProperties, context: __SerdeContext): any => { - return { - ...(input.DnsProperties != null && { DnsProperties: se_PrivateDnsPropertiesMutable(input.DnsProperties, context) }), - }; -}; +// se_PrivateDnsNamespaceProperties omitted. -/** - * serializeAws_json1_1PrivateDnsNamespacePropertiesChange - */ -const se_PrivateDnsNamespacePropertiesChange = ( - input: PrivateDnsNamespacePropertiesChange, - context: __SerdeContext -): any => { - return { - ...(input.DnsProperties != null && { - DnsProperties: se_PrivateDnsPropertiesMutableChange(input.DnsProperties, context), - }), - }; -}; +// se_PrivateDnsNamespacePropertiesChange omitted. -/** - * serializeAws_json1_1PrivateDnsPropertiesMutable - */ -const se_PrivateDnsPropertiesMutable = (input: PrivateDnsPropertiesMutable, context: __SerdeContext): any => { - return { - ...(input.SOA != null && { SOA: se_SOA(input.SOA, context) }), - }; -}; +// se_PrivateDnsPropertiesMutable omitted. -/** - * serializeAws_json1_1PrivateDnsPropertiesMutableChange - */ -const se_PrivateDnsPropertiesMutableChange = ( - input: PrivateDnsPropertiesMutableChange, - context: __SerdeContext -): any => { - return { - ...(input.SOA != null && { SOA: se_SOAChange(input.SOA, context) }), - }; -}; +// se_PrivateDnsPropertiesMutableChange omitted. -/** - * serializeAws_json1_1PublicDnsNamespaceChange - */ -const se_PublicDnsNamespaceChange = (input: PublicDnsNamespaceChange, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Properties != null && { Properties: se_PublicDnsNamespacePropertiesChange(input.Properties, context) }), - }; -}; +// se_PublicDnsNamespaceChange omitted. -/** - * serializeAws_json1_1PublicDnsNamespaceProperties - */ -const se_PublicDnsNamespaceProperties = (input: PublicDnsNamespaceProperties, context: __SerdeContext): any => { - return { - ...(input.DnsProperties != null && { DnsProperties: se_PublicDnsPropertiesMutable(input.DnsProperties, context) }), - }; -}; +// se_PublicDnsNamespaceProperties omitted. -/** - * serializeAws_json1_1PublicDnsNamespacePropertiesChange - */ -const se_PublicDnsNamespacePropertiesChange = ( - input: PublicDnsNamespacePropertiesChange, - context: __SerdeContext -): any => { - return { - ...(input.DnsProperties != null && { - DnsProperties: se_PublicDnsPropertiesMutableChange(input.DnsProperties, context), - }), - }; -}; +// se_PublicDnsNamespacePropertiesChange omitted. -/** - * serializeAws_json1_1PublicDnsPropertiesMutable - */ -const se_PublicDnsPropertiesMutable = (input: PublicDnsPropertiesMutable, context: __SerdeContext): any => { - return { - ...(input.SOA != null && { SOA: se_SOA(input.SOA, context) }), - }; -}; +// se_PublicDnsPropertiesMutable omitted. -/** - * serializeAws_json1_1PublicDnsPropertiesMutableChange - */ -const se_PublicDnsPropertiesMutableChange = (input: PublicDnsPropertiesMutableChange, context: __SerdeContext): any => { - return { - ...(input.SOA != null && { SOA: se_SOAChange(input.SOA, context) }), - }; -}; +// se_PublicDnsPropertiesMutableChange omitted. /** * serializeAws_json1_1RegisterInstanceRequest */ const se_RegisterInstanceRequest = (input: RegisterInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_Attributes(input.Attributes, context) }), - CreatorRequestId: input.CreatorRequestId ?? generateIdempotencyToken(), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - }; + return take(input, { + Attributes: _json, + CreatorRequestId: (_) => _ ?? generateIdempotencyToken(), + InstanceId: [], + ServiceId: [], + }); }; -/** - * serializeAws_json1_1ServiceChange - */ -const se_ServiceChange = (input: ServiceChange, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DnsConfig != null && { DnsConfig: se_DnsConfigChange(input.DnsConfig, context) }), - ...(input.HealthCheckConfig != null && { - HealthCheckConfig: se_HealthCheckConfig(input.HealthCheckConfig, context), - }), - }; -}; +// se_ServiceChange omitted. -/** - * serializeAws_json1_1ServiceFilter - */ -const se_ServiceFilter = (input: ServiceFilter, context: __SerdeContext): any => { - return { - ...(input.Condition != null && { Condition: input.Condition }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_FilterValues(input.Values, context) }), - }; -}; +// se_ServiceFilter omitted. -/** - * serializeAws_json1_1ServiceFilters - */ -const se_ServiceFilters = (input: ServiceFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServiceFilter(entry, context); - }); -}; +// se_ServiceFilters omitted. -/** - * serializeAws_json1_1SOA - */ -const se_SOA = (input: SOA, context: __SerdeContext): any => { - return { - ...(input.TTL != null && { TTL: input.TTL }), - }; -}; +// se_SOA omitted. -/** - * serializeAws_json1_1SOAChange - */ -const se_SOAChange = (input: SOAChange, context: __SerdeContext): any => { - return { - ...(input.TTL != null && { TTL: input.TTL }), - }; -}; +// se_SOAChange omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. /** * serializeAws_json1_1UpdateHttpNamespaceRequest */ const se_UpdateHttpNamespaceRequest = (input: UpdateHttpNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Namespace != null && { Namespace: se_HttpNamespaceChange(input.Namespace, context) }), - UpdaterRequestId: input.UpdaterRequestId ?? generateIdempotencyToken(), - }; -}; - -/** - * serializeAws_json1_1UpdateInstanceCustomHealthStatusRequest - */ -const se_UpdateInstanceCustomHealthStatusRequest = ( - input: UpdateInstanceCustomHealthStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.ServiceId != null && { ServiceId: input.ServiceId }), - ...(input.Status != null && { Status: input.Status }), - }; + return take(input, { + Id: [], + Namespace: _json, + UpdaterRequestId: (_) => _ ?? generateIdempotencyToken(), + }); }; +// se_UpdateInstanceCustomHealthStatusRequest omitted. + /** * serializeAws_json1_1UpdatePrivateDnsNamespaceRequest */ const se_UpdatePrivateDnsNamespaceRequest = (input: UpdatePrivateDnsNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Namespace != null && { Namespace: se_PrivateDnsNamespaceChange(input.Namespace, context) }), - UpdaterRequestId: input.UpdaterRequestId ?? generateIdempotencyToken(), - }; + return take(input, { + Id: [], + Namespace: _json, + UpdaterRequestId: (_) => _ ?? generateIdempotencyToken(), + }); }; /** * serializeAws_json1_1UpdatePublicDnsNamespaceRequest */ const se_UpdatePublicDnsNamespaceRequest = (input: UpdatePublicDnsNamespaceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Namespace != null && { Namespace: se_PublicDnsNamespaceChange(input.Namespace, context) }), - UpdaterRequestId: input.UpdaterRequestId ?? generateIdempotencyToken(), - }; + return take(input, { + Id: [], + Namespace: _json, + UpdaterRequestId: (_) => _ ?? generateIdempotencyToken(), + }); }; -/** - * serializeAws_json1_1UpdateServiceRequest - */ -const se_UpdateServiceRequest = (input: UpdateServiceRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Service != null && { Service: se_ServiceChange(input.Service, context) }), - }; -}; +// se_UpdateServiceRequest omitted. -/** - * deserializeAws_json1_1Attributes - */ -const de_Attributes = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Attributes omitted. -/** - * deserializeAws_json1_1CreateHttpNamespaceResponse - */ -const de_CreateHttpNamespaceResponse = (output: any, context: __SerdeContext): CreateHttpNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_CreateHttpNamespaceResponse omitted. -/** - * deserializeAws_json1_1CreatePrivateDnsNamespaceResponse - */ -const de_CreatePrivateDnsNamespaceResponse = ( - output: any, - context: __SerdeContext -): CreatePrivateDnsNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_CreatePrivateDnsNamespaceResponse omitted. -/** - * deserializeAws_json1_1CreatePublicDnsNamespaceResponse - */ -const de_CreatePublicDnsNamespaceResponse = ( - output: any, - context: __SerdeContext -): CreatePublicDnsNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_CreatePublicDnsNamespaceResponse omitted. /** * deserializeAws_json1_1CreateServiceResponse */ const de_CreateServiceResponse = (output: any, context: __SerdeContext): CreateServiceResponse => { - return { - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + Service: (_: any) => de_Service(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CustomHealthNotFound - */ -const de_CustomHealthNotFound = (output: any, context: __SerdeContext): CustomHealthNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CustomHealthNotFound omitted. -/** - * deserializeAws_json1_1DeleteNamespaceResponse - */ -const de_DeleteNamespaceResponse = (output: any, context: __SerdeContext): DeleteNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_DeleteNamespaceResponse omitted. -/** - * deserializeAws_json1_1DeleteServiceResponse - */ -const de_DeleteServiceResponse = (output: any, context: __SerdeContext): DeleteServiceResponse => { - return {} as any; -}; +// de_DeleteServiceResponse omitted. -/** - * deserializeAws_json1_1DeregisterInstanceResponse - */ -const de_DeregisterInstanceResponse = (output: any, context: __SerdeContext): DeregisterInstanceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_DeregisterInstanceResponse omitted. -/** - * deserializeAws_json1_1DiscoverInstancesResponse - */ -const de_DiscoverInstancesResponse = (output: any, context: __SerdeContext): DiscoverInstancesResponse => { - return { - Instances: output.Instances != null ? de_HttpInstanceSummaryList(output.Instances, context) : undefined, - } as any; -}; +// de_DiscoverInstancesResponse omitted. -/** - * deserializeAws_json1_1DnsConfig - */ -const de_DnsConfig = (output: any, context: __SerdeContext): DnsConfig => { - return { - DnsRecords: output.DnsRecords != null ? de_DnsRecordList(output.DnsRecords, context) : undefined, - NamespaceId: __expectString(output.NamespaceId), - RoutingPolicy: __expectString(output.RoutingPolicy), - } as any; -}; +// de_DnsConfig omitted. -/** - * deserializeAws_json1_1DnsProperties - */ -const de_DnsProperties = (output: any, context: __SerdeContext): DnsProperties => { - return { - HostedZoneId: __expectString(output.HostedZoneId), - SOA: output.SOA != null ? de_SOA(output.SOA, context) : undefined, - } as any; -}; +// de_DnsProperties omitted. -/** - * deserializeAws_json1_1DnsRecord - */ -const de_DnsRecord = (output: any, context: __SerdeContext): DnsRecord => { - return { - TTL: __expectLong(output.TTL), - Type: __expectString(output.Type), - } as any; -}; +// de_DnsRecord omitted. -/** - * deserializeAws_json1_1DnsRecordList - */ -const de_DnsRecordList = (output: any, context: __SerdeContext): DnsRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DnsRecord(entry, context); - }); - return retVal; -}; +// de_DnsRecordList omitted. -/** - * deserializeAws_json1_1DuplicateRequest - */ -const de_DuplicateRequest = (output: any, context: __SerdeContext): DuplicateRequest => { - return { - DuplicateOperationId: __expectString(output.DuplicateOperationId), - Message: __expectString(output.Message), - } as any; -}; +// de_DuplicateRequest omitted. -/** - * deserializeAws_json1_1GetInstanceResponse - */ -const de_GetInstanceResponse = (output: any, context: __SerdeContext): GetInstanceResponse => { - return { - Instance: output.Instance != null ? de_Instance(output.Instance, context) : undefined, - } as any; -}; +// de_GetInstanceResponse omitted. -/** - * deserializeAws_json1_1GetInstancesHealthStatusResponse - */ -const de_GetInstancesHealthStatusResponse = ( - output: any, - context: __SerdeContext -): GetInstancesHealthStatusResponse => { - return { - NextToken: __expectString(output.NextToken), - Status: output.Status != null ? de_InstanceHealthStatusMap(output.Status, context) : undefined, - } as any; -}; +// de_GetInstancesHealthStatusResponse omitted. /** * deserializeAws_json1_1GetNamespaceResponse */ const de_GetNamespaceResponse = (output: any, context: __SerdeContext): GetNamespaceResponse => { - return { - Namespace: output.Namespace != null ? de_Namespace(output.Namespace, context) : undefined, - } as any; + return take(output, { + Namespace: (_: any) => de_Namespace(_, context), + }) as any; }; /** * deserializeAws_json1_1GetOperationResponse */ const de_GetOperationResponse = (output: any, context: __SerdeContext): GetOperationResponse => { - return { - Operation: output.Operation != null ? de_Operation(output.Operation, context) : undefined, - } as any; + return take(output, { + Operation: (_: any) => de_Operation(_, context), + }) as any; }; /** * deserializeAws_json1_1GetServiceResponse */ const de_GetServiceResponse = (output: any, context: __SerdeContext): GetServiceResponse => { - return { - Service: output.Service != null ? de_Service(output.Service, context) : undefined, - } as any; + return take(output, { + Service: (_: any) => de_Service(_, context), + }) as any; }; -/** - * deserializeAws_json1_1HealthCheckConfig - */ -const de_HealthCheckConfig = (output: any, context: __SerdeContext): HealthCheckConfig => { - return { - FailureThreshold: __expectInt32(output.FailureThreshold), - ResourcePath: __expectString(output.ResourcePath), - Type: __expectString(output.Type), - } as any; -}; +// de_HealthCheckConfig omitted. -/** - * deserializeAws_json1_1HealthCheckCustomConfig - */ -const de_HealthCheckCustomConfig = (output: any, context: __SerdeContext): HealthCheckCustomConfig => { - return { - FailureThreshold: __expectInt32(output.FailureThreshold), - } as any; -}; +// de_HealthCheckCustomConfig omitted. -/** - * deserializeAws_json1_1HttpInstanceSummary - */ -const de_HttpInstanceSummary = (output: any, context: __SerdeContext): HttpInstanceSummary => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - HealthStatus: __expectString(output.HealthStatus), - InstanceId: __expectString(output.InstanceId), - NamespaceName: __expectString(output.NamespaceName), - ServiceName: __expectString(output.ServiceName), - } as any; -}; +// de_HttpInstanceSummary omitted. -/** - * deserializeAws_json1_1HttpInstanceSummaryList - */ -const de_HttpInstanceSummaryList = (output: any, context: __SerdeContext): HttpInstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HttpInstanceSummary(entry, context); - }); - return retVal; -}; +// de_HttpInstanceSummaryList omitted. -/** - * deserializeAws_json1_1HttpProperties - */ -const de_HttpProperties = (output: any, context: __SerdeContext): HttpProperties => { - return { - HttpName: __expectString(output.HttpName), - } as any; -}; +// de_HttpProperties omitted. -/** - * deserializeAws_json1_1Instance - */ -const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - CreatorRequestId: __expectString(output.CreatorRequestId), - Id: __expectString(output.Id), - } as any; -}; +// de_Instance omitted. -/** - * deserializeAws_json1_1InstanceHealthStatusMap - */ -const de_InstanceHealthStatusMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_InstanceHealthStatusMap omitted. -/** - * deserializeAws_json1_1InstanceNotFound - */ -const de_InstanceNotFound = (output: any, context: __SerdeContext): InstanceNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InstanceNotFound omitted. -/** - * deserializeAws_json1_1InstanceSummary - */ -const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { - return { - Attributes: output.Attributes != null ? de_Attributes(output.Attributes, context) : undefined, - Id: __expectString(output.Id), - } as any; -}; +// de_InstanceSummary omitted. -/** - * deserializeAws_json1_1InstanceSummaryList - */ -const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceSummary(entry, context); - }); - return retVal; -}; +// de_InstanceSummaryList omitted. -/** - * deserializeAws_json1_1InvalidInput - */ -const de_InvalidInput = (output: any, context: __SerdeContext): InvalidInput => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInput omitted. -/** - * deserializeAws_json1_1ListInstancesResponse - */ -const de_ListInstancesResponse = (output: any, context: __SerdeContext): ListInstancesResponse => { - return { - Instances: output.Instances != null ? de_InstanceSummaryList(output.Instances, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListInstancesResponse omitted. /** * deserializeAws_json1_1ListNamespacesResponse */ const de_ListNamespacesResponse = (output: any, context: __SerdeContext): ListNamespacesResponse => { - return { - Namespaces: output.Namespaces != null ? de_NamespaceSummariesList(output.Namespaces, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Namespaces: (_: any) => de_NamespaceSummariesList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListOperationsResponse - */ -const de_ListOperationsResponse = (output: any, context: __SerdeContext): ListOperationsResponse => { - return { - NextToken: __expectString(output.NextToken), - Operations: output.Operations != null ? de_OperationSummaryList(output.Operations, context) : undefined, - } as any; -}; +// de_ListOperationsResponse omitted. /** * deserializeAws_json1_1ListServicesResponse */ const de_ListServicesResponse = (output: any, context: __SerdeContext): ListServicesResponse => { - return { - NextToken: __expectString(output.NextToken), - Services: output.Services != null ? de_ServiceSummariesList(output.Services, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Services: (_: any) => de_ServiceSummariesList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1Namespace */ const de_Namespace = (output: any, context: __SerdeContext): Namespace => { - return { - Arn: __expectString(output.Arn), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatorRequestId: __expectString(output.CreatorRequestId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Properties: output.Properties != null ? de_NamespaceProperties(output.Properties, context) : undefined, - ServiceCount: __expectInt32(output.ServiceCount), - Type: __expectString(output.Type), - } as any; + return take(output, { + Arn: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + Description: __expectString, + Id: __expectString, + Name: __expectString, + Properties: _json, + ServiceCount: __expectInt32, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1NamespaceAlreadyExists - */ -const de_NamespaceAlreadyExists = (output: any, context: __SerdeContext): NamespaceAlreadyExists => { - return { - CreatorRequestId: __expectString(output.CreatorRequestId), - Message: __expectString(output.Message), - NamespaceId: __expectString(output.NamespaceId), - } as any; -}; +// de_NamespaceAlreadyExists omitted. -/** - * deserializeAws_json1_1NamespaceNotFound - */ -const de_NamespaceNotFound = (output: any, context: __SerdeContext): NamespaceNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NamespaceNotFound omitted. -/** - * deserializeAws_json1_1NamespaceProperties - */ -const de_NamespaceProperties = (output: any, context: __SerdeContext): NamespaceProperties => { - return { - DnsProperties: output.DnsProperties != null ? de_DnsProperties(output.DnsProperties, context) : undefined, - HttpProperties: output.HttpProperties != null ? de_HttpProperties(output.HttpProperties, context) : undefined, - } as any; -}; +// de_NamespaceProperties omitted. /** * deserializeAws_json1_1NamespaceSummariesList @@ -3185,9 +2416,6 @@ const de_NamespaceSummariesList = (output: any, context: __SerdeContext): Namesp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_NamespaceSummary(entry, context); }); return retVal; @@ -3197,176 +2425,75 @@ const de_NamespaceSummariesList = (output: any, context: __SerdeContext): Namesp * deserializeAws_json1_1NamespaceSummary */ const de_NamespaceSummary = (output: any, context: __SerdeContext): NamespaceSummary => { - return { - Arn: __expectString(output.Arn), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Properties: output.Properties != null ? de_NamespaceProperties(output.Properties, context) : undefined, - ServiceCount: __expectInt32(output.ServiceCount), - Type: __expectString(output.Type), - } as any; + return take(output, { + Arn: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Id: __expectString, + Name: __expectString, + Properties: _json, + ServiceCount: __expectInt32, + Type: __expectString, + }) as any; }; /** * deserializeAws_json1_1Operation */ const de_Operation = (output: any, context: __SerdeContext): Operation => { - return { - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - Id: __expectString(output.Id), - Status: __expectString(output.Status), - Targets: output.Targets != null ? de_OperationTargetsMap(output.Targets, context) : undefined, - Type: __expectString(output.Type), - UpdateDate: - output.UpdateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdateDate))) : undefined, - } as any; + return take(output, { + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorCode: __expectString, + ErrorMessage: __expectString, + Id: __expectString, + Status: __expectString, + Targets: _json, + Type: __expectString, + UpdateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1OperationNotFound - */ -const de_OperationNotFound = (output: any, context: __SerdeContext): OperationNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OperationNotFound omitted. -/** - * deserializeAws_json1_1OperationSummary - */ -const de_OperationSummary = (output: any, context: __SerdeContext): OperationSummary => { - return { - Id: __expectString(output.Id), - Status: __expectString(output.Status), - } as any; -}; +// de_OperationSummary omitted. -/** - * deserializeAws_json1_1OperationSummaryList - */ -const de_OperationSummaryList = (output: any, context: __SerdeContext): OperationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OperationSummary(entry, context); - }); - return retVal; -}; +// de_OperationSummaryList omitted. -/** - * deserializeAws_json1_1OperationTargetsMap - */ -const de_OperationTargetsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [OperationTargetType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_OperationTargetsMap omitted. -/** - * deserializeAws_json1_1RegisterInstanceResponse - */ -const de_RegisterInstanceResponse = (output: any, context: __SerdeContext): RegisterInstanceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_RegisterInstanceResponse omitted. -/** - * deserializeAws_json1_1RequestLimitExceeded - */ -const de_RequestLimitExceeded = (output: any, context: __SerdeContext): RequestLimitExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_RequestLimitExceeded omitted. -/** - * deserializeAws_json1_1ResourceInUse - */ -const de_ResourceInUse = (output: any, context: __SerdeContext): ResourceInUse => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceInUse omitted. -/** - * deserializeAws_json1_1ResourceLimitExceeded - */ -const de_ResourceLimitExceeded = (output: any, context: __SerdeContext): ResourceLimitExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceLimitExceeded omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1Service */ const de_Service = (output: any, context: __SerdeContext): Service => { - return { - Arn: __expectString(output.Arn), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - CreatorRequestId: __expectString(output.CreatorRequestId), - Description: __expectString(output.Description), - DnsConfig: output.DnsConfig != null ? de_DnsConfig(output.DnsConfig, context) : undefined, - HealthCheckConfig: - output.HealthCheckConfig != null ? de_HealthCheckConfig(output.HealthCheckConfig, context) : undefined, - HealthCheckCustomConfig: - output.HealthCheckCustomConfig != null - ? de_HealthCheckCustomConfig(output.HealthCheckCustomConfig, context) - : undefined, - Id: __expectString(output.Id), - InstanceCount: __expectInt32(output.InstanceCount), - Name: __expectString(output.Name), - NamespaceId: __expectString(output.NamespaceId), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ServiceAlreadyExists - */ -const de_ServiceAlreadyExists = (output: any, context: __SerdeContext): ServiceAlreadyExists => { - return { - CreatorRequestId: __expectString(output.CreatorRequestId), - Message: __expectString(output.Message), - ServiceId: __expectString(output.ServiceId), - } as any; + return take(output, { + Arn: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorRequestId: __expectString, + Description: __expectString, + DnsConfig: _json, + HealthCheckConfig: _json, + HealthCheckCustomConfig: _json, + Id: __expectString, + InstanceCount: __expectInt32, + Name: __expectString, + NamespaceId: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ServiceNotFound - */ -const de_ServiceNotFound = (output: any, context: __SerdeContext): ServiceNotFound => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceAlreadyExists omitted. + +// de_ServiceNotFound omitted. /** * deserializeAws_json1_1ServiceSummariesList @@ -3375,9 +2502,6 @@ const de_ServiceSummariesList = (output: any, context: __SerdeContext): ServiceS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceSummary(entry, context); }); return retVal; @@ -3387,124 +2511,39 @@ const de_ServiceSummariesList = (output: any, context: __SerdeContext): ServiceS * deserializeAws_json1_1ServiceSummary */ const de_ServiceSummary = (output: any, context: __SerdeContext): ServiceSummary => { - return { - Arn: __expectString(output.Arn), - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - Description: __expectString(output.Description), - DnsConfig: output.DnsConfig != null ? de_DnsConfig(output.DnsConfig, context) : undefined, - HealthCheckConfig: - output.HealthCheckConfig != null ? de_HealthCheckConfig(output.HealthCheckConfig, context) : undefined, - HealthCheckCustomConfig: - output.HealthCheckCustomConfig != null - ? de_HealthCheckCustomConfig(output.HealthCheckCustomConfig, context) - : undefined, - Id: __expectString(output.Id), - InstanceCount: __expectInt32(output.InstanceCount), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1SOA - */ -const de_SOA = (output: any, context: __SerdeContext): SOA => { - return { - TTL: __expectLong(output.TTL), - } as any; + return take(output, { + Arn: __expectString, + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DnsConfig: _json, + HealthCheckConfig: _json, + HealthCheckCustomConfig: _json, + Id: __expectString, + InstanceCount: __expectInt32, + Name: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SOA omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - ResourceName: __expectString(output.ResourceName), - } as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UpdateHttpNamespaceResponse - */ -const de_UpdateHttpNamespaceResponse = (output: any, context: __SerdeContext): UpdateHttpNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdatePrivateDnsNamespaceResponse - */ -const de_UpdatePrivateDnsNamespaceResponse = ( - output: any, - context: __SerdeContext -): UpdatePrivateDnsNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UpdateHttpNamespaceResponse omitted. -/** - * deserializeAws_json1_1UpdatePublicDnsNamespaceResponse - */ -const de_UpdatePublicDnsNamespaceResponse = ( - output: any, - context: __SerdeContext -): UpdatePublicDnsNamespaceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UpdatePrivateDnsNamespaceResponse omitted. -/** - * deserializeAws_json1_1UpdateServiceResponse - */ -const de_UpdateServiceResponse = (output: any, context: __SerdeContext): UpdateServiceResponse => { - return { - OperationId: __expectString(output.OperationId), - } as any; -}; +// de_UpdatePublicDnsNamespaceResponse omitted. + +// de_UpdateServiceResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3526,6 +2565,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ses/src/protocols/Aws_query.ts b/clients/client-ses/src/protocols/Aws_query.ts index 4a4fa550cca6..e1f78cb227fb 100644 --- a/clients/client-ses/src/protocols/Aws_query.ts +++ b/clients/client-ses/src/protocols/Aws_query.ts @@ -11,7 +11,7 @@ import { parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseFloat as __strictParseFloat, strictParseLong as __strictParseLong, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -1669,7 +1669,7 @@ export const de_CloneReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1696,10 +1696,9 @@ const de_CloneReceiptRuleSetCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1722,7 +1721,7 @@ export const de_CreateConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1749,10 +1748,9 @@ const de_CreateConfigurationSetCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1778,7 +1776,7 @@ export const de_CreateConfigurationSetEventDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1814,10 +1812,9 @@ const de_CreateConfigurationSetEventDestinationCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1843,7 +1840,7 @@ export const de_CreateConfigurationSetTrackingOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1870,10 +1867,9 @@ const de_CreateConfigurationSetTrackingOptionsCommandError = async ( throw await de_TrackingOptionsAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1893,7 +1889,7 @@ export const de_CreateCustomVerificationEmailTemplateCommand = async ( const response: CreateCustomVerificationEmailTemplateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1923,10 +1919,9 @@ const de_CreateCustomVerificationEmailTemplateCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1949,7 +1944,7 @@ export const de_CreateReceiptFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1973,10 +1968,9 @@ const de_CreateReceiptFilterCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1999,7 +1993,7 @@ export const de_CreateReceiptRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2038,10 +2032,9 @@ const de_CreateReceiptRuleCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2064,7 +2057,7 @@ export const de_CreateReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2088,10 +2081,9 @@ const de_CreateReceiptRuleSetCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2114,7 +2106,7 @@ export const de_CreateTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2141,10 +2133,9 @@ const de_CreateTemplateCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2167,7 +2158,7 @@ export const de_DeleteConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2188,10 +2179,9 @@ const de_DeleteConfigurationSetCommandError = async ( throw await de_ConfigurationSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2217,7 +2207,7 @@ export const de_DeleteConfigurationSetEventDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2241,10 +2231,9 @@ const de_DeleteConfigurationSetEventDestinationCommandError = async ( throw await de_EventDestinationDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2270,7 +2259,7 @@ export const de_DeleteConfigurationSetTrackingOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2294,10 +2283,9 @@ const de_DeleteConfigurationSetTrackingOptionsCommandError = async ( throw await de_TrackingOptionsDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2317,7 +2305,7 @@ export const de_DeleteCustomVerificationEmailTemplateCommand = async ( const response: DeleteCustomVerificationEmailTemplateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2333,10 +2321,9 @@ const de_DeleteCustomVerificationEmailTemplateCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2358,7 +2345,7 @@ export const de_DeleteIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2374,10 +2361,9 @@ const de_DeleteIdentityCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2399,7 +2385,7 @@ export const de_DeleteIdentityPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2415,10 +2401,9 @@ const de_DeleteIdentityPolicyCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2440,7 +2425,7 @@ export const de_DeleteReceiptFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2456,10 +2441,9 @@ const de_DeleteReceiptFilterCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2481,7 +2465,7 @@ export const de_DeleteReceiptRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2502,10 +2486,9 @@ const de_DeleteReceiptRuleCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2528,7 +2511,7 @@ export const de_DeleteReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2549,10 +2532,9 @@ const de_DeleteReceiptRuleSetCommandError = async ( throw await de_CannotDeleteExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2575,7 +2557,7 @@ export const de_DeleteTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2591,10 +2573,9 @@ const de_DeleteTemplateCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2613,7 +2594,7 @@ export const de_DeleteVerifiedEmailAddressCommand = async ( const response: DeleteVerifiedEmailAddressCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2629,10 +2610,9 @@ const de_DeleteVerifiedEmailAddressCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2654,7 +2634,7 @@ export const de_DescribeActiveReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2670,10 +2650,9 @@ const de_DescribeActiveReceiptRuleSetCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2695,7 +2674,7 @@ export const de_DescribeConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2716,10 +2695,9 @@ const de_DescribeConfigurationSetCommandError = async ( throw await de_ConfigurationSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2742,7 +2720,7 @@ export const de_DescribeReceiptRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2766,10 +2744,9 @@ const de_DescribeReceiptRuleCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2792,7 +2769,7 @@ export const de_DescribeReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2813,10 +2790,9 @@ const de_DescribeReceiptRuleSetCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2839,7 +2815,7 @@ export const de_GetAccountSendingEnabledCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2855,10 +2831,9 @@ const de_GetAccountSendingEnabledCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2880,7 +2855,7 @@ export const de_GetCustomVerificationEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2901,10 +2876,9 @@ const de_GetCustomVerificationEmailTemplateCommandError = async ( throw await de_CustomVerificationEmailTemplateDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2927,7 +2901,7 @@ export const de_GetIdentityDkimAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2943,10 +2917,9 @@ const de_GetIdentityDkimAttributesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2968,7 +2941,7 @@ export const de_GetIdentityMailFromDomainAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2984,10 +2957,9 @@ const de_GetIdentityMailFromDomainAttributesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3009,7 +2981,7 @@ export const de_GetIdentityNotificationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3025,10 +2997,9 @@ const de_GetIdentityNotificationAttributesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3050,7 +3021,7 @@ export const de_GetIdentityPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3066,10 +3037,9 @@ const de_GetIdentityPoliciesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3091,7 +3061,7 @@ export const de_GetIdentityVerificationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3107,10 +3077,9 @@ const de_GetIdentityVerificationAttributesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3132,7 +3101,7 @@ export const de_GetSendQuotaCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3148,10 +3117,9 @@ const de_GetSendQuotaCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3173,7 +3141,7 @@ export const de_GetSendStatisticsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3189,10 +3157,9 @@ const de_GetSendStatisticsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3214,7 +3181,7 @@ export const de_GetTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3235,10 +3202,9 @@ const de_GetTemplateCommandError = async ( throw await de_TemplateDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3261,7 +3227,7 @@ export const de_ListConfigurationSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3277,10 +3243,9 @@ const de_ListConfigurationSetsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3302,7 +3267,7 @@ export const de_ListCustomVerificationEmailTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3318,10 +3283,9 @@ const de_ListCustomVerificationEmailTemplatesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3343,7 +3307,7 @@ export const de_ListIdentitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3359,10 +3323,9 @@ const de_ListIdentitiesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3384,7 +3347,7 @@ export const de_ListIdentityPoliciesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3400,10 +3363,9 @@ const de_ListIdentityPoliciesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3425,7 +3387,7 @@ export const de_ListReceiptFiltersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3441,10 +3403,9 @@ const de_ListReceiptFiltersCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3466,7 +3427,7 @@ export const de_ListReceiptRuleSetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3482,10 +3443,9 @@ const de_ListReceiptRuleSetsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3507,7 +3467,7 @@ export const de_ListTemplatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3523,10 +3483,9 @@ const de_ListTemplatesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3548,7 +3507,7 @@ export const de_ListVerifiedEmailAddressesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3564,10 +3523,9 @@ const de_ListVerifiedEmailAddressesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3589,7 +3547,7 @@ export const de_PutConfigurationSetDeliveryOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3613,10 +3571,9 @@ const de_PutConfigurationSetDeliveryOptionsCommandError = async ( throw await de_InvalidDeliveryOptionsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3639,7 +3596,7 @@ export const de_PutIdentityPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3660,10 +3617,9 @@ const de_PutIdentityPolicyCommandError = async ( throw await de_InvalidPolicyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3686,7 +3642,7 @@ export const de_ReorderReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3710,10 +3666,9 @@ const de_ReorderReceiptRuleSetCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3736,7 +3691,7 @@ export const de_SendBounceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3757,10 +3712,9 @@ const de_SendBounceCommandError = async ( throw await de_MessageRejectedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3783,7 +3737,7 @@ export const de_SendBulkTemplatedEmailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3819,10 +3773,9 @@ const de_SendBulkTemplatedEmailCommandError = async ( throw await de_TemplateDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3845,7 +3798,7 @@ export const de_SendCustomVerificationEmailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3878,10 +3831,9 @@ const de_SendCustomVerificationEmailCommandError = async ( throw await de_ProductionAccessNotGrantedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3904,7 +3856,7 @@ export const de_SendEmailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3937,10 +3889,9 @@ const de_SendEmailCommandError = async ( throw await de_MessageRejectedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3963,7 +3914,7 @@ export const de_SendRawEmailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3996,10 +3947,9 @@ const de_SendRawEmailCommandError = async ( throw await de_MessageRejectedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4022,7 +3972,7 @@ export const de_SendTemplatedEmailCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4058,10 +4008,9 @@ const de_SendTemplatedEmailCommandError = async ( throw await de_TemplateDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4084,7 +4033,7 @@ export const de_SetActiveReceiptRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4105,10 +4054,9 @@ const de_SetActiveReceiptRuleSetCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4131,7 +4079,7 @@ export const de_SetIdentityDkimEnabledCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4147,10 +4095,9 @@ const de_SetIdentityDkimEnabledCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4172,7 +4119,7 @@ export const de_SetIdentityFeedbackForwardingEnabledCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4188,10 +4135,9 @@ const de_SetIdentityFeedbackForwardingEnabledCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4216,7 +4162,7 @@ export const de_SetIdentityHeadersInNotificationsEnabledCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4232,10 +4178,9 @@ const de_SetIdentityHeadersInNotificationsEnabledCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4257,7 +4202,7 @@ export const de_SetIdentityMailFromDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4273,10 +4218,9 @@ const de_SetIdentityMailFromDomainCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4298,7 +4242,7 @@ export const de_SetIdentityNotificationTopicCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4314,10 +4258,9 @@ const de_SetIdentityNotificationTopicCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4339,7 +4282,7 @@ export const de_SetReceiptRulePositionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4363,10 +4306,9 @@ const de_SetReceiptRulePositionCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4389,7 +4331,7 @@ export const de_TestRenderTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4416,10 +4358,9 @@ const de_TestRenderTemplateCommandError = async ( throw await de_TemplateDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4439,7 +4380,7 @@ export const de_UpdateAccountSendingEnabledCommand = async ( const response: UpdateAccountSendingEnabledCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4455,10 +4396,9 @@ const de_UpdateAccountSendingEnabledCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4483,7 +4423,7 @@ export const de_UpdateConfigurationSetEventDestinationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4516,10 +4456,9 @@ const de_UpdateConfigurationSetEventDestinationCommandError = async ( throw await de_InvalidSNSDestinationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4539,7 +4478,7 @@ export const de_UpdateConfigurationSetReputationMetricsEnabledCommand = async ( const response: UpdateConfigurationSetReputationMetricsEnabledCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4560,10 +4499,9 @@ const de_UpdateConfigurationSetReputationMetricsEnabledCommandError = async ( throw await de_ConfigurationSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4583,7 +4521,7 @@ export const de_UpdateConfigurationSetSendingEnabledCommand = async ( const response: UpdateConfigurationSetSendingEnabledCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4604,10 +4542,9 @@ const de_UpdateConfigurationSetSendingEnabledCommandError = async ( throw await de_ConfigurationSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4633,7 +4570,7 @@ export const de_UpdateConfigurationSetTrackingOptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4660,10 +4597,9 @@ const de_UpdateConfigurationSetTrackingOptionsCommandError = async ( throw await de_TrackingOptionsDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4683,7 +4619,7 @@ export const de_UpdateCustomVerificationEmailTemplateCommand = async ( const response: UpdateCustomVerificationEmailTemplateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4710,10 +4646,9 @@ const de_UpdateCustomVerificationEmailTemplateCommandError = async ( throw await de_FromEmailAddressNotVerifiedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4736,7 +4671,7 @@ export const de_UpdateReceiptRuleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4772,10 +4707,9 @@ const de_UpdateReceiptRuleCommandError = async ( throw await de_RuleSetDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4798,7 +4732,7 @@ export const de_UpdateTemplateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4822,10 +4756,9 @@ const de_UpdateTemplateCommandError = async ( throw await de_TemplateDoesNotExistExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -4848,7 +4781,7 @@ export const de_VerifyDomainDkimCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4864,10 +4797,9 @@ const de_VerifyDomainDkimCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4889,7 +4821,7 @@ export const de_VerifyDomainIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4905,10 +4837,9 @@ const de_VerifyDomainIdentityCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4927,7 +4858,7 @@ export const de_VerifyEmailAddressCommand = async ( const response: VerifyEmailAddressCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -4943,10 +4874,9 @@ const de_VerifyEmailAddressCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4968,7 +4898,7 @@ export const de_VerifyEmailIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4984,10 +4914,9 @@ const de_VerifyEmailIdentityCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -9802,6 +9731,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-sesv2/src/protocols/Aws_restJson1.ts b/clients/client-sesv2/src/protocols/Aws_restJson1.ts index 6c14fe72102e..6770909394a3 100644 --- a/clients/client-sesv2/src/protocols/Aws_restJson1.ts +++ b/clients/client-sesv2/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,10 +12,11 @@ import { expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -289,7 +291,6 @@ import { UpdateEmailTemplateCommandOutput, } from "../commands/UpdateEmailTemplateCommand"; import { - AccountDetails, AccountSuspendedException, AlreadyExistsException, BadRequestException, @@ -298,7 +299,6 @@ import { Body, BulkEmailContent, BulkEmailEntry, - BulkEmailEntryResult, CloudWatchDestination, CloudWatchDimensionConfiguration, ConcurrentModificationException, @@ -307,12 +307,9 @@ import { ContactList, ContactListDestination, Content, - CustomVerificationEmailTemplateMetadata, DailyVolume, DashboardAttributes, DashboardOptions, - DedicatedIp, - DedicatedIpPool, DeliverabilityTestReport, DeliveryOptions, Destination, @@ -324,13 +321,10 @@ import { EmailContent, EmailTemplateContent, EmailTemplateMetadata, - EventDestination, EventDestinationDefinition, EventType, - FailureInfo, GuardianAttributes, GuardianOptions, - IdentityInfo, ImportDataSource, ImportDestination, ImportJobSummary, @@ -342,15 +336,11 @@ import { LimitExceededException, ListContactsFilter, ListManagementOptions, - ListRecommendationsFilterKey, - MailFromAttributes, MailFromDomainNotVerifiedException, Message, MessageRejected, MessageTag, - MetricDataError, MetricDataResult, - MetricDimensionName, NotFoundException, OverallVolume, PinpointDestination, @@ -360,15 +350,12 @@ import { ReplacementEmailContent, ReplacementTemplate, ReputationOptions, - ReviewDetails, SendingOptions, SendingPausedException, SendQuota, SnsDestination, SuppressedDestination, - SuppressedDestinationAttributes, SuppressedDestinationSummary, - SuppressionAttributes, SuppressionListDestination, SuppressionListReason, SuppressionOptions, @@ -381,7 +368,6 @@ import { TrackingOptions, VdmAttributes, VdmOptions, - VolumeStatistics, } from "../models/models_0"; import { SESv2ServiceException as __BaseException } from "../models/SESv2ServiceException"; @@ -399,9 +385,11 @@ export const se_BatchGetMetricDataCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/metrics/batch"; let body: any; - body = JSON.stringify({ - ...(input.Queries != null && { Queries: se_BatchGetMetricDataQueries(input.Queries, context) }), - }); + body = JSON.stringify( + take(input, { + Queries: (_) => se_BatchGetMetricDataQueries(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -427,20 +415,18 @@ export const se_CreateConfigurationSetCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/configuration-sets"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.DeliveryOptions != null && { DeliveryOptions: se_DeliveryOptions(input.DeliveryOptions, context) }), - ...(input.ReputationOptions != null && { - ReputationOptions: se_ReputationOptions(input.ReputationOptions, context), - }), - ...(input.SendingOptions != null && { SendingOptions: se_SendingOptions(input.SendingOptions, context) }), - ...(input.SuppressionOptions != null && { - SuppressionOptions: se_SuppressionOptions(input.SuppressionOptions, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TrackingOptions != null && { TrackingOptions: se_TrackingOptions(input.TrackingOptions, context) }), - ...(input.VdmOptions != null && { VdmOptions: se_VdmOptions(input.VdmOptions, context) }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + DeliveryOptions: (_) => _json(_), + ReputationOptions: (_) => se_ReputationOptions(_, context), + SendingOptions: (_) => _json(_), + SuppressionOptions: (_) => _json(_), + Tags: (_) => _json(_), + TrackingOptions: (_) => _json(_), + VdmOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -475,12 +461,12 @@ export const se_CreateConfigurationSetEventDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EventDestination != null && { - EventDestination: se_EventDestinationDefinition(input.EventDestination, context), - }), - ...(input.EventDestinationName != null && { EventDestinationName: input.EventDestinationName }), - }); + body = JSON.stringify( + take(input, { + EventDestination: (_) => _json(_), + EventDestinationName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -515,14 +501,14 @@ export const se_CreateContactCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AttributesData != null && { AttributesData: input.AttributesData }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.TopicPreferences != null && { - TopicPreferences: se_TopicPreferenceList(input.TopicPreferences, context), - }), - ...(input.UnsubscribeAll != null && { UnsubscribeAll: input.UnsubscribeAll }), - }); + body = JSON.stringify( + take(input, { + AttributesData: [], + EmailAddress: [], + TopicPreferences: (_) => _json(_), + UnsubscribeAll: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -548,12 +534,14 @@ export const se_CreateContactListCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/contact-lists"; let body: any; - body = JSON.stringify({ - ...(input.ContactListName != null && { ContactListName: input.ContactListName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Topics != null && { Topics: se_Topics(input.Topics, context) }), - }); + body = JSON.stringify( + take(input, { + ContactListName: [], + Description: [], + Tags: (_) => _json(_), + Topics: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -580,14 +568,16 @@ export const se_CreateCustomVerificationEmailTemplateCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/custom-verification-email-templates"; let body: any; - body = JSON.stringify({ - ...(input.FailureRedirectionURL != null && { FailureRedirectionURL: input.FailureRedirectionURL }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.SuccessRedirectionURL != null && { SuccessRedirectionURL: input.SuccessRedirectionURL }), - ...(input.TemplateContent != null && { TemplateContent: input.TemplateContent }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - ...(input.TemplateSubject != null && { TemplateSubject: input.TemplateSubject }), - }); + body = JSON.stringify( + take(input, { + FailureRedirectionURL: [], + FromEmailAddress: [], + SuccessRedirectionURL: [], + TemplateContent: [], + TemplateName: [], + TemplateSubject: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -613,11 +603,13 @@ export const se_CreateDedicatedIpPoolCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/dedicated-ip-pools"; let body: any; - body = JSON.stringify({ - ...(input.PoolName != null && { PoolName: input.PoolName }), - ...(input.ScalingMode != null && { ScalingMode: input.ScalingMode }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + PoolName: [], + ScalingMode: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -643,12 +635,14 @@ export const se_CreateDeliverabilityTestReportCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/deliverability-dashboard/test"; let body: any; - body = JSON.stringify({ - ...(input.Content != null && { Content: se_EmailContent(input.Content, context) }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.ReportName != null && { ReportName: input.ReportName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Content: (_) => se_EmailContent(_, context), + FromEmailAddress: [], + ReportName: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -673,14 +667,14 @@ export const se_CreateEmailIdentityCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/identities"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.DkimSigningAttributes != null && { - DkimSigningAttributes: se_DkimSigningAttributes(input.DkimSigningAttributes, context), - }), - ...(input.EmailIdentity != null && { EmailIdentity: input.EmailIdentity }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + DkimSigningAttributes: (_) => _json(_), + EmailIdentity: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -716,9 +710,11 @@ export const se_CreateEmailIdentityPolicyCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "PolicyName", () => input.PolicyName!, "{PolicyName}", false); let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -743,10 +739,12 @@ export const se_CreateEmailTemplateCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/templates"; let body: any; - body = JSON.stringify({ - ...(input.TemplateContent != null && { TemplateContent: se_EmailTemplateContent(input.TemplateContent, context) }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - }); + body = JSON.stringify( + take(input, { + TemplateContent: (_) => _json(_), + TemplateName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -771,12 +769,12 @@ export const se_CreateImportJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/import-jobs"; let body: any; - body = JSON.stringify({ - ...(input.ImportDataSource != null && { ImportDataSource: se_ImportDataSource(input.ImportDataSource, context) }), - ...(input.ImportDestination != null && { - ImportDestination: se_ImportDestination(input.ImportDestination, context), - }), - }); + body = JSON.stringify( + take(input, { + ImportDataSource: (_) => _json(_), + ImportDestination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1759,9 +1757,11 @@ export const se_ListContactsCommand = async ( NextToken: [, input.NextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.Filter != null && { Filter: se_ListContactsFilter(input.Filter, context) }), - }); + body = JSON.stringify( + take(input, { + Filter: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1976,9 +1976,11 @@ export const se_ListImportJobsCommand = async ( PageSize: [() => input.PageSize !== void 0, () => input.PageSize!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.ImportDestinationType != null && { ImportDestinationType: input.ImportDestinationType }), - }); + body = JSON.stringify( + take(input, { + ImportDestinationType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2005,11 +2007,13 @@ export const se_ListRecommendationsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/vdm/recommendations"; let body: any; - body = JSON.stringify({ - ...(input.Filter != null && { Filter: se_ListRecommendationsFilter(input.Filter, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PageSize != null && { PageSize: input.PageSize }), - }); + body = JSON.stringify( + take(input, { + Filter: (_) => _json(_), + NextToken: [], + PageSize: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2095,9 +2099,11 @@ export const se_PutAccountDedicatedIpWarmupAttributesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/dedicated-ips/warmup"; let body: any; - body = JSON.stringify({ - ...(input.AutoWarmupEnabled != null && { AutoWarmupEnabled: input.AutoWarmupEnabled }), - }); + body = JSON.stringify( + take(input, { + AutoWarmupEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2123,19 +2129,16 @@ export const se_PutAccountDetailsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/details"; let body: any; - body = JSON.stringify({ - ...(input.AdditionalContactEmailAddresses != null && { - AdditionalContactEmailAddresses: se_AdditionalContactEmailAddresses( - input.AdditionalContactEmailAddresses, - context - ), - }), - ...(input.ContactLanguage != null && { ContactLanguage: input.ContactLanguage }), - ...(input.MailType != null && { MailType: input.MailType }), - ...(input.ProductionAccessEnabled != null && { ProductionAccessEnabled: input.ProductionAccessEnabled }), - ...(input.UseCaseDescription != null && { UseCaseDescription: input.UseCaseDescription }), - ...(input.WebsiteURL != null && { WebsiteURL: input.WebsiteURL }), - }); + body = JSON.stringify( + take(input, { + AdditionalContactEmailAddresses: (_) => _json(_), + ContactLanguage: [], + MailType: [], + ProductionAccessEnabled: [], + UseCaseDescription: [], + WebsiteURL: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2161,9 +2164,11 @@ export const se_PutAccountSendingAttributesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/sending"; let body: any; - body = JSON.stringify({ - ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }), - }); + body = JSON.stringify( + take(input, { + SendingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2189,11 +2194,11 @@ export const se_PutAccountSuppressionAttributesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/suppression"; let body: any; - body = JSON.stringify({ - ...(input.SuppressedReasons != null && { - SuppressedReasons: se_SuppressionListReasons(input.SuppressedReasons, context), - }), - }); + body = JSON.stringify( + take(input, { + SuppressedReasons: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2218,9 +2223,11 @@ export const se_PutAccountVdmAttributesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/account/vdm"; let body: any; - body = JSON.stringify({ - ...(input.VdmAttributes != null && { VdmAttributes: se_VdmAttributes(input.VdmAttributes, context) }), - }); + body = JSON.stringify( + take(input, { + VdmAttributes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2255,10 +2262,12 @@ export const se_PutConfigurationSetDeliveryOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }), - ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }), - }); + body = JSON.stringify( + take(input, { + SendingPoolName: [], + TlsPolicy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2293,9 +2302,11 @@ export const se_PutConfigurationSetReputationOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }), - }); + body = JSON.stringify( + take(input, { + ReputationMetricsEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2330,9 +2341,11 @@ export const se_PutConfigurationSetSendingOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }), - }); + body = JSON.stringify( + take(input, { + SendingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2367,11 +2380,11 @@ export const se_PutConfigurationSetSuppressionOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SuppressedReasons != null && { - SuppressedReasons: se_SuppressionListReasons(input.SuppressedReasons, context), - }), - }); + body = JSON.stringify( + take(input, { + SuppressedReasons: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2406,9 +2419,11 @@ export const se_PutConfigurationSetTrackingOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }), - }); + body = JSON.stringify( + take(input, { + CustomRedirectDomain: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2443,9 +2458,11 @@ export const se_PutConfigurationSetVdmOptionsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.VdmOptions != null && { VdmOptions: se_VdmOptions(input.VdmOptions, context) }), - }); + body = JSON.stringify( + take(input, { + VdmOptions: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2472,9 +2489,11 @@ export const se_PutDedicatedIpInPoolCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/dedicated-ips/{Ip}/pool"; resolvedPath = __resolvedPath(resolvedPath, input, "Ip", () => input.Ip!, "{Ip}", false); let body: any; - body = JSON.stringify({ - ...(input.DestinationPoolName != null && { DestinationPoolName: input.DestinationPoolName }), - }); + body = JSON.stringify( + take(input, { + DestinationPoolName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2501,9 +2520,11 @@ export const se_PutDedicatedIpWarmupAttributesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/dedicated-ips/{Ip}/warmup"; resolvedPath = __resolvedPath(resolvedPath, input, "Ip", () => input.Ip!, "{Ip}", false); let body: any; - body = JSON.stringify({ - ...(input.WarmupPercentage != null && { WarmupPercentage: input.WarmupPercentage }), - }); + body = JSON.stringify( + take(input, { + WarmupPercentage: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2529,12 +2550,12 @@ export const se_PutDeliverabilityDashboardOptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/deliverability-dashboard"; let body: any; - body = JSON.stringify({ - ...(input.DashboardEnabled != null && { DashboardEnabled: input.DashboardEnabled }), - ...(input.SubscribedDomains != null && { - SubscribedDomains: se_DomainDeliverabilityTrackingOptions(input.SubscribedDomains, context), - }), - }); + body = JSON.stringify( + take(input, { + DashboardEnabled: [], + SubscribedDomains: (_) => se_DomainDeliverabilityTrackingOptions(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2569,9 +2590,11 @@ export const se_PutEmailIdentityConfigurationSetAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2605,9 +2628,11 @@ export const se_PutEmailIdentityDkimAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SigningEnabled != null && { SigningEnabled: input.SigningEnabled }), - }); + body = JSON.stringify( + take(input, { + SigningEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2642,12 +2667,12 @@ export const se_PutEmailIdentityDkimSigningAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.SigningAttributes != null && { - SigningAttributes: se_DkimSigningAttributes(input.SigningAttributes, context), - }), - ...(input.SigningAttributesOrigin != null && { SigningAttributesOrigin: input.SigningAttributesOrigin }), - }); + body = JSON.stringify( + take(input, { + SigningAttributes: (_) => _json(_), + SigningAttributesOrigin: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2682,9 +2707,11 @@ export const se_PutEmailIdentityFeedbackAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EmailForwardingEnabled != null && { EmailForwardingEnabled: input.EmailForwardingEnabled }), - }); + body = JSON.stringify( + take(input, { + EmailForwardingEnabled: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2719,10 +2746,12 @@ export const se_PutEmailIdentityMailFromAttributesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.BehaviorOnMxFailure != null && { BehaviorOnMxFailure: input.BehaviorOnMxFailure }), - ...(input.MailFromDomain != null && { MailFromDomain: input.MailFromDomain }), - }); + body = JSON.stringify( + take(input, { + BehaviorOnMxFailure: [], + MailFromDomain: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2748,10 +2777,12 @@ export const se_PutSuppressedDestinationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/suppression/addresses"; let body: any; - body = JSON.stringify({ - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.Reason != null && { Reason: input.Reason }), - }); + body = JSON.stringify( + take(input, { + EmailAddress: [], + Reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2777,23 +2808,19 @@ export const se_SendBulkEmailCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/outbound-bulk-emails"; let body: any; - body = JSON.stringify({ - ...(input.BulkEmailEntries != null && { BulkEmailEntries: se_BulkEmailEntryList(input.BulkEmailEntries, context) }), - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.DefaultContent != null && { DefaultContent: se_BulkEmailContent(input.DefaultContent, context) }), - ...(input.DefaultEmailTags != null && { DefaultEmailTags: se_MessageTagList(input.DefaultEmailTags, context) }), - ...(input.FeedbackForwardingEmailAddress != null && { - FeedbackForwardingEmailAddress: input.FeedbackForwardingEmailAddress, - }), - ...(input.FeedbackForwardingEmailAddressIdentityArn != null && { - FeedbackForwardingEmailAddressIdentityArn: input.FeedbackForwardingEmailAddressIdentityArn, - }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.FromEmailAddressIdentityArn != null && { - FromEmailAddressIdentityArn: input.FromEmailAddressIdentityArn, - }), - ...(input.ReplyToAddresses != null && { ReplyToAddresses: se_EmailAddressList(input.ReplyToAddresses, context) }), - }); + body = JSON.stringify( + take(input, { + BulkEmailEntries: (_) => _json(_), + ConfigurationSetName: [], + DefaultContent: (_) => _json(_), + DefaultEmailTags: (_) => _json(_), + FeedbackForwardingEmailAddress: [], + FeedbackForwardingEmailAddressIdentityArn: [], + FromEmailAddress: [], + FromEmailAddressIdentityArn: [], + ReplyToAddresses: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2820,11 +2847,13 @@ export const se_SendCustomVerificationEmailCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/outbound-custom-verification-emails"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + EmailAddress: [], + TemplateName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2850,26 +2879,20 @@ export const se_SendEmailCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/outbound-emails"; let body: any; - body = JSON.stringify({ - ...(input.ConfigurationSetName != null && { ConfigurationSetName: input.ConfigurationSetName }), - ...(input.Content != null && { Content: se_EmailContent(input.Content, context) }), - ...(input.Destination != null && { Destination: se_Destination(input.Destination, context) }), - ...(input.EmailTags != null && { EmailTags: se_MessageTagList(input.EmailTags, context) }), - ...(input.FeedbackForwardingEmailAddress != null && { - FeedbackForwardingEmailAddress: input.FeedbackForwardingEmailAddress, - }), - ...(input.FeedbackForwardingEmailAddressIdentityArn != null && { - FeedbackForwardingEmailAddressIdentityArn: input.FeedbackForwardingEmailAddressIdentityArn, - }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.FromEmailAddressIdentityArn != null && { - FromEmailAddressIdentityArn: input.FromEmailAddressIdentityArn, - }), - ...(input.ListManagementOptions != null && { - ListManagementOptions: se_ListManagementOptions(input.ListManagementOptions, context), - }), - ...(input.ReplyToAddresses != null && { ReplyToAddresses: se_EmailAddressList(input.ReplyToAddresses, context) }), - }); + body = JSON.stringify( + take(input, { + ConfigurationSetName: [], + Content: (_) => se_EmailContent(_, context), + Destination: (_) => _json(_), + EmailTags: (_) => _json(_), + FeedbackForwardingEmailAddress: [], + FeedbackForwardingEmailAddressIdentityArn: [], + FromEmailAddress: [], + FromEmailAddressIdentityArn: [], + ListManagementOptions: (_) => _json(_), + ReplyToAddresses: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2894,10 +2917,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v2/email/tags"; let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2931,9 +2956,11 @@ export const se_TestRenderEmailTemplateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.TemplateData != null && { TemplateData: input.TemplateData }), - }); + body = JSON.stringify( + take(input, { + TemplateData: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3006,11 +3033,11 @@ export const se_UpdateConfigurationSetEventDestinationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.EventDestination != null && { - EventDestination: se_EventDestinationDefinition(input.EventDestination, context), - }), - }); + body = JSON.stringify( + take(input, { + EventDestination: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3053,13 +3080,13 @@ export const se_UpdateContactCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.AttributesData != null && { AttributesData: input.AttributesData }), - ...(input.TopicPreferences != null && { - TopicPreferences: se_TopicPreferenceList(input.TopicPreferences, context), - }), - ...(input.UnsubscribeAll != null && { UnsubscribeAll: input.UnsubscribeAll }), - }); + body = JSON.stringify( + take(input, { + AttributesData: [], + TopicPreferences: (_) => _json(_), + UnsubscribeAll: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3093,10 +3120,12 @@ export const se_UpdateContactListCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Description != null && { Description: input.Description }), - ...(input.Topics != null && { Topics: se_Topics(input.Topics, context) }), - }); + body = JSON.stringify( + take(input, { + Description: [], + Topics: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3131,13 +3160,15 @@ export const se_UpdateCustomVerificationEmailTemplateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.FailureRedirectionURL != null && { FailureRedirectionURL: input.FailureRedirectionURL }), - ...(input.FromEmailAddress != null && { FromEmailAddress: input.FromEmailAddress }), - ...(input.SuccessRedirectionURL != null && { SuccessRedirectionURL: input.SuccessRedirectionURL }), - ...(input.TemplateContent != null && { TemplateContent: input.TemplateContent }), - ...(input.TemplateSubject != null && { TemplateSubject: input.TemplateSubject }), - }); + body = JSON.stringify( + take(input, { + FailureRedirectionURL: [], + FromEmailAddress: [], + SuccessRedirectionURL: [], + TemplateContent: [], + TemplateSubject: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3173,9 +3204,11 @@ export const se_UpdateEmailIdentityPolicyCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "PolicyName", () => input.PolicyName!, "{PolicyName}", false); let body: any; - body = JSON.stringify({ - ...(input.Policy != null && { Policy: input.Policy }), - }); + body = JSON.stringify( + take(input, { + Policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3209,9 +3242,11 @@ export const se_UpdateEmailTemplateCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.TemplateContent != null && { TemplateContent: se_EmailTemplateContent(input.TemplateContent, context) }), - }); + body = JSON.stringify( + take(input, { + TemplateContent: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3237,12 +3272,11 @@ export const de_BatchGetMetricDataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Errors != null) { - contents.Errors = de_MetricDataErrorList(data.Errors, context); - } - if (data.Results != null) { - contents.Results = de_MetricDataResultList(data.Results, context); - } + const doc = take(data, { + Errors: _json, + Results: (_) => de_MetricDataResultList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3273,10 +3307,9 @@ const de_BatchGetMetricDataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3332,10 +3365,9 @@ const de_CreateConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3388,10 +3420,9 @@ const de_CreateConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3441,10 +3472,9 @@ const de_CreateContactCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3494,10 +3524,9 @@ const de_CreateContactListCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3550,10 +3579,9 @@ const de_CreateCustomVerificationEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3606,10 +3634,9 @@ const de_CreateDedicatedIpPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3629,12 +3656,11 @@ export const de_CreateDeliverabilityTestReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeliverabilityTestStatus != null) { - contents.DeliverabilityTestStatus = __expectString(data.DeliverabilityTestStatus); - } - if (data.ReportId != null) { - contents.ReportId = __expectString(data.ReportId); - } + const doc = take(data, { + DeliverabilityTestStatus: __expectString, + ReportId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3680,10 +3706,9 @@ const de_CreateDeliverabilityTestReportCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3703,15 +3728,12 @@ export const de_CreateEmailIdentityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DkimAttributes != null) { - contents.DkimAttributes = de_DkimAttributes(data.DkimAttributes, context); - } - if (data.IdentityType != null) { - contents.IdentityType = __expectString(data.IdentityType); - } - if (data.VerifiedForSendingStatus != null) { - contents.VerifiedForSendingStatus = __expectBoolean(data.VerifiedForSendingStatus); - } + const doc = take(data, { + DkimAttributes: (_) => de_DkimAttributes(_, context), + IdentityType: __expectString, + VerifiedForSendingStatus: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -3748,10 +3770,9 @@ const de_CreateEmailIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3804,10 +3825,9 @@ const de_CreateEmailIdentityPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3857,10 +3877,9 @@ const de_CreateEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3880,9 +3899,10 @@ export const de_CreateImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } + const doc = take(data, { + JobId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3910,10 +3930,9 @@ const de_CreateImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3963,10 +3982,9 @@ const de_DeleteConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4013,10 +4031,9 @@ const de_DeleteConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4063,10 +4080,9 @@ const de_DeleteContactCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4116,10 +4132,9 @@ const de_DeleteContactListCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4166,10 +4181,9 @@ const de_DeleteCustomVerificationEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4219,10 +4233,9 @@ const de_DeleteDedicatedIpPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4272,10 +4285,9 @@ const de_DeleteEmailIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4322,10 +4334,9 @@ const de_DeleteEmailIdentityPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4372,10 +4383,9 @@ const de_DeleteEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4422,10 +4432,9 @@ const de_DeleteSuppressedDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4445,30 +4454,17 @@ export const de_GetAccountCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIpAutoWarmupEnabled != null) { - contents.DedicatedIpAutoWarmupEnabled = __expectBoolean(data.DedicatedIpAutoWarmupEnabled); - } - if (data.Details != null) { - contents.Details = de_AccountDetails(data.Details, context); - } - if (data.EnforcementStatus != null) { - contents.EnforcementStatus = __expectString(data.EnforcementStatus); - } - if (data.ProductionAccessEnabled != null) { - contents.ProductionAccessEnabled = __expectBoolean(data.ProductionAccessEnabled); - } - if (data.SendQuota != null) { - contents.SendQuota = de_SendQuota(data.SendQuota, context); - } - if (data.SendingEnabled != null) { - contents.SendingEnabled = __expectBoolean(data.SendingEnabled); - } - if (data.SuppressionAttributes != null) { - contents.SuppressionAttributes = de_SuppressionAttributes(data.SuppressionAttributes, context); - } - if (data.VdmAttributes != null) { - contents.VdmAttributes = de_VdmAttributes(data.VdmAttributes, context); - } + const doc = take(data, { + DedicatedIpAutoWarmupEnabled: __expectBoolean, + Details: _json, + EnforcementStatus: __expectString, + ProductionAccessEnabled: __expectBoolean, + SendQuota: (_) => de_SendQuota(_, context), + SendingEnabled: __expectBoolean, + SuppressionAttributes: _json, + VdmAttributes: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4493,10 +4489,9 @@ const de_GetAccountCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4516,9 +4511,10 @@ export const de_GetBlacklistReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BlacklistReport != null) { - contents.BlacklistReport = de_BlacklistReport(data.BlacklistReport, context); - } + const doc = take(data, { + BlacklistReport: (_) => de_BlacklistReport(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4546,10 +4542,9 @@ const de_GetBlacklistReportsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4569,30 +4564,17 @@ export const de_GetConfigurationSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConfigurationSetName != null) { - contents.ConfigurationSetName = __expectString(data.ConfigurationSetName); - } - if (data.DeliveryOptions != null) { - contents.DeliveryOptions = de_DeliveryOptions(data.DeliveryOptions, context); - } - if (data.ReputationOptions != null) { - contents.ReputationOptions = de_ReputationOptions(data.ReputationOptions, context); - } - if (data.SendingOptions != null) { - contents.SendingOptions = de_SendingOptions(data.SendingOptions, context); - } - if (data.SuppressionOptions != null) { - contents.SuppressionOptions = de_SuppressionOptions(data.SuppressionOptions, context); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } - if (data.TrackingOptions != null) { - contents.TrackingOptions = de_TrackingOptions(data.TrackingOptions, context); - } - if (data.VdmOptions != null) { - contents.VdmOptions = de_VdmOptions(data.VdmOptions, context); - } + const doc = take(data, { + ConfigurationSetName: __expectString, + DeliveryOptions: _json, + ReputationOptions: (_) => de_ReputationOptions(_, context), + SendingOptions: _json, + SuppressionOptions: _json, + Tags: _json, + TrackingOptions: _json, + VdmOptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4620,10 +4602,9 @@ const de_GetConfigurationSetCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4643,9 +4624,10 @@ export const de_GetConfigurationSetEventDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EventDestinations != null) { - contents.EventDestinations = de_EventDestinations(data.EventDestinations, context); - } + const doc = take(data, { + EventDestinations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4673,10 +4655,9 @@ const de_GetConfigurationSetEventDestinationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4696,30 +4677,17 @@ export const de_GetContactCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AttributesData != null) { - contents.AttributesData = __expectString(data.AttributesData); - } - if (data.ContactListName != null) { - contents.ContactListName = __expectString(data.ContactListName); - } - if (data.CreatedTimestamp != null) { - contents.CreatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTimestamp))); - } - if (data.EmailAddress != null) { - contents.EmailAddress = __expectString(data.EmailAddress); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTimestamp))); - } - if (data.TopicDefaultPreferences != null) { - contents.TopicDefaultPreferences = de_TopicPreferenceList(data.TopicDefaultPreferences, context); - } - if (data.TopicPreferences != null) { - contents.TopicPreferences = de_TopicPreferenceList(data.TopicPreferences, context); - } - if (data.UnsubscribeAll != null) { - contents.UnsubscribeAll = __expectBoolean(data.UnsubscribeAll); - } + const doc = take(data, { + AttributesData: __expectString, + ContactListName: __expectString, + CreatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EmailAddress: __expectString, + LastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TopicDefaultPreferences: _json, + TopicPreferences: _json, + UnsubscribeAll: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -4747,10 +4715,9 @@ const de_GetContactCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4770,24 +4737,15 @@ export const de_GetContactListCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactListName != null) { - contents.ContactListName = __expectString(data.ContactListName); - } - if (data.CreatedTimestamp != null) { - contents.CreatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTimestamp))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.LastUpdatedTimestamp != null) { - contents.LastUpdatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTimestamp))); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } - if (data.Topics != null) { - contents.Topics = de_Topics(data.Topics, context); - } + const doc = take(data, { + ContactListName: __expectString, + CreatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + Topics: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4815,10 +4773,9 @@ const de_GetContactListCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4838,24 +4795,15 @@ export const de_GetCustomVerificationEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FailureRedirectionURL != null) { - contents.FailureRedirectionURL = __expectString(data.FailureRedirectionURL); - } - if (data.FromEmailAddress != null) { - contents.FromEmailAddress = __expectString(data.FromEmailAddress); - } - if (data.SuccessRedirectionURL != null) { - contents.SuccessRedirectionURL = __expectString(data.SuccessRedirectionURL); - } - if (data.TemplateContent != null) { - contents.TemplateContent = __expectString(data.TemplateContent); - } - if (data.TemplateName != null) { - contents.TemplateName = __expectString(data.TemplateName); - } - if (data.TemplateSubject != null) { - contents.TemplateSubject = __expectString(data.TemplateSubject); - } + const doc = take(data, { + FailureRedirectionURL: __expectString, + FromEmailAddress: __expectString, + SuccessRedirectionURL: __expectString, + TemplateContent: __expectString, + TemplateName: __expectString, + TemplateSubject: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4883,10 +4831,9 @@ const de_GetCustomVerificationEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4906,9 +4853,10 @@ export const de_GetDedicatedIpCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIp != null) { - contents.DedicatedIp = de_DedicatedIp(data.DedicatedIp, context); - } + const doc = take(data, { + DedicatedIp: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4936,10 +4884,9 @@ const de_GetDedicatedIpCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4959,9 +4906,10 @@ export const de_GetDedicatedIpPoolCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIpPool != null) { - contents.DedicatedIpPool = de_DedicatedIpPool(data.DedicatedIpPool, context); - } + const doc = take(data, { + DedicatedIpPool: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4989,10 +4937,9 @@ const de_GetDedicatedIpPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5012,12 +4959,11 @@ export const de_GetDedicatedIpsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIps != null) { - contents.DedicatedIps = de_DedicatedIpList(data.DedicatedIps, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DedicatedIps: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5045,10 +4991,9 @@ const de_GetDedicatedIpsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5068,26 +5013,14 @@ export const de_GetDeliverabilityDashboardOptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AccountStatus != null) { - contents.AccountStatus = __expectString(data.AccountStatus); - } - if (data.ActiveSubscribedDomains != null) { - contents.ActiveSubscribedDomains = de_DomainDeliverabilityTrackingOptions(data.ActiveSubscribedDomains, context); - } - if (data.DashboardEnabled != null) { - contents.DashboardEnabled = __expectBoolean(data.DashboardEnabled); - } - if (data.PendingExpirationSubscribedDomains != null) { - contents.PendingExpirationSubscribedDomains = de_DomainDeliverabilityTrackingOptions( - data.PendingExpirationSubscribedDomains, - context - ); - } - if (data.SubscriptionExpiryDate != null) { - contents.SubscriptionExpiryDate = __expectNonNull( - __parseEpochTimestamp(__expectNumber(data.SubscriptionExpiryDate)) - ); - } + const doc = take(data, { + AccountStatus: __expectString, + ActiveSubscribedDomains: (_) => de_DomainDeliverabilityTrackingOptions(_, context), + DashboardEnabled: __expectBoolean, + PendingExpirationSubscribedDomains: (_) => de_DomainDeliverabilityTrackingOptions(_, context), + SubscriptionExpiryDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -5115,10 +5048,9 @@ const de_GetDeliverabilityDashboardOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5138,21 +5070,14 @@ export const de_GetDeliverabilityTestReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeliverabilityTestReport != null) { - contents.DeliverabilityTestReport = de_DeliverabilityTestReport(data.DeliverabilityTestReport, context); - } - if (data.IspPlacements != null) { - contents.IspPlacements = de_IspPlacements(data.IspPlacements, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.OverallPlacement != null) { - contents.OverallPlacement = de_PlacementStatistics(data.OverallPlacement, context); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + DeliverabilityTestReport: (_) => de_DeliverabilityTestReport(_, context), + IspPlacements: (_) => de_IspPlacements(_, context), + Message: __expectString, + OverallPlacement: (_) => de_PlacementStatistics(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5180,10 +5105,9 @@ const de_GetDeliverabilityTestReportCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5203,9 +5127,10 @@ export const de_GetDomainDeliverabilityCampaignCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainDeliverabilityCampaign != null) { - contents.DomainDeliverabilityCampaign = de_DomainDeliverabilityCampaign(data.DomainDeliverabilityCampaign, context); - } + const doc = take(data, { + DomainDeliverabilityCampaign: (_) => de_DomainDeliverabilityCampaign(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5233,10 +5158,9 @@ const de_GetDomainDeliverabilityCampaignCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5256,12 +5180,11 @@ export const de_GetDomainStatisticsReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DailyVolumes != null) { - contents.DailyVolumes = de_DailyVolumes(data.DailyVolumes, context); - } - if (data.OverallVolume != null) { - contents.OverallVolume = de_OverallVolume(data.OverallVolume, context); - } + const doc = take(data, { + DailyVolumes: (_) => de_DailyVolumes(_, context), + OverallVolume: (_) => de_OverallVolume(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5289,10 +5212,9 @@ const de_GetDomainStatisticsReportCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5312,33 +5234,18 @@ export const de_GetEmailIdentityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConfigurationSetName != null) { - contents.ConfigurationSetName = __expectString(data.ConfigurationSetName); - } - if (data.DkimAttributes != null) { - contents.DkimAttributes = de_DkimAttributes(data.DkimAttributes, context); - } - if (data.FeedbackForwardingStatus != null) { - contents.FeedbackForwardingStatus = __expectBoolean(data.FeedbackForwardingStatus); - } - if (data.IdentityType != null) { - contents.IdentityType = __expectString(data.IdentityType); - } - if (data.MailFromAttributes != null) { - contents.MailFromAttributes = de_MailFromAttributes(data.MailFromAttributes, context); - } - if (data.Policies != null) { - contents.Policies = de_PolicyMap(data.Policies, context); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } - if (data.VerificationStatus != null) { - contents.VerificationStatus = __expectString(data.VerificationStatus); - } - if (data.VerifiedForSendingStatus != null) { - contents.VerifiedForSendingStatus = __expectBoolean(data.VerifiedForSendingStatus); - } + const doc = take(data, { + ConfigurationSetName: __expectString, + DkimAttributes: (_) => de_DkimAttributes(_, context), + FeedbackForwardingStatus: __expectBoolean, + IdentityType: __expectString, + MailFromAttributes: _json, + Policies: _json, + Tags: _json, + VerificationStatus: __expectString, + VerifiedForSendingStatus: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -5366,10 +5273,9 @@ const de_GetEmailIdentityCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5389,9 +5295,10 @@ export const de_GetEmailIdentityPoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policies != null) { - contents.Policies = de_PolicyMap(data.Policies, context); - } + const doc = take(data, { + Policies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -5419,10 +5326,9 @@ const de_GetEmailIdentityPoliciesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5442,12 +5348,11 @@ export const de_GetEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.TemplateContent != null) { - contents.TemplateContent = de_EmailTemplateContent(data.TemplateContent, context); - } - if (data.TemplateName != null) { - contents.TemplateName = __expectString(data.TemplateName); - } + const doc = take(data, { + TemplateContent: _json, + TemplateName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5475,10 +5380,9 @@ const de_GetEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5498,33 +5402,18 @@ export const de_GetImportJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompletedTimestamp != null) { - contents.CompletedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CompletedTimestamp))); - } - if (data.CreatedTimestamp != null) { - contents.CreatedTimestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTimestamp))); - } - if (data.FailedRecordsCount != null) { - contents.FailedRecordsCount = __expectInt32(data.FailedRecordsCount); - } - if (data.FailureInfo != null) { - contents.FailureInfo = de_FailureInfo(data.FailureInfo, context); - } - if (data.ImportDataSource != null) { - contents.ImportDataSource = de_ImportDataSource(data.ImportDataSource, context); - } - if (data.ImportDestination != null) { - contents.ImportDestination = de_ImportDestination(data.ImportDestination, context); - } - if (data.JobId != null) { - contents.JobId = __expectString(data.JobId); - } - if (data.JobStatus != null) { - contents.JobStatus = __expectString(data.JobStatus); - } - if (data.ProcessedRecordsCount != null) { - contents.ProcessedRecordsCount = __expectInt32(data.ProcessedRecordsCount); - } + const doc = take(data, { + CompletedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailedRecordsCount: __expectInt32, + FailureInfo: _json, + ImportDataSource: _json, + ImportDestination: _json, + JobId: __expectString, + JobStatus: __expectString, + ProcessedRecordsCount: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -5552,10 +5441,9 @@ const de_GetImportJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5575,9 +5463,10 @@ export const de_GetSuppressedDestinationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SuppressedDestination != null) { - contents.SuppressedDestination = de_SuppressedDestination(data.SuppressedDestination, context); - } + const doc = take(data, { + SuppressedDestination: (_) => de_SuppressedDestination(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -5605,10 +5494,9 @@ const de_GetSuppressedDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5628,12 +5516,11 @@ export const de_ListConfigurationSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ConfigurationSets != null) { - contents.ConfigurationSets = de_ConfigurationSetNameList(data.ConfigurationSets, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ConfigurationSets: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5658,10 +5545,9 @@ const de_ListConfigurationSetsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5681,12 +5567,11 @@ export const de_ListContactListsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContactLists != null) { - contents.ContactLists = de_ListOfContactLists(data.ContactLists, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ContactLists: (_) => de_ListOfContactLists(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5711,10 +5596,9 @@ const de_ListContactListsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5734,12 +5618,11 @@ export const de_ListContactsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Contacts != null) { - contents.Contacts = de_ListOfContacts(data.Contacts, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Contacts: (_) => de_ListOfContacts(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5767,10 +5650,9 @@ const de_ListContactsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5790,15 +5672,11 @@ export const de_ListCustomVerificationEmailTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomVerificationEmailTemplates != null) { - contents.CustomVerificationEmailTemplates = de_CustomVerificationEmailTemplatesList( - data.CustomVerificationEmailTemplates, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CustomVerificationEmailTemplates: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5823,10 +5701,9 @@ const de_ListCustomVerificationEmailTemplatesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5846,12 +5723,11 @@ export const de_ListDedicatedIpPoolsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DedicatedIpPools != null) { - contents.DedicatedIpPools = de_ListOfDedicatedIpPools(data.DedicatedIpPools, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DedicatedIpPools: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5876,10 +5752,9 @@ const de_ListDedicatedIpPoolsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5899,12 +5774,11 @@ export const de_ListDeliverabilityTestReportsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeliverabilityTestReports != null) { - contents.DeliverabilityTestReports = de_DeliverabilityTestReports(data.DeliverabilityTestReports, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DeliverabilityTestReports: (_) => de_DeliverabilityTestReports(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5932,10 +5806,9 @@ const de_ListDeliverabilityTestReportsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5955,15 +5828,11 @@ export const de_ListDomainDeliverabilityCampaignsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DomainDeliverabilityCampaigns != null) { - contents.DomainDeliverabilityCampaigns = de_DomainDeliverabilityCampaignList( - data.DomainDeliverabilityCampaigns, - context - ); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + DomainDeliverabilityCampaigns: (_) => de_DomainDeliverabilityCampaignList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5991,10 +5860,9 @@ const de_ListDomainDeliverabilityCampaignsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6014,12 +5882,11 @@ export const de_ListEmailIdentitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EmailIdentities != null) { - contents.EmailIdentities = de_IdentityInfoList(data.EmailIdentities, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + EmailIdentities: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6044,10 +5911,9 @@ const de_ListEmailIdentitiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6067,12 +5933,11 @@ export const de_ListEmailTemplatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TemplatesMetadata != null) { - contents.TemplatesMetadata = de_EmailTemplateMetadataList(data.TemplatesMetadata, context); - } + const doc = take(data, { + NextToken: __expectString, + TemplatesMetadata: (_) => de_EmailTemplateMetadataList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6097,10 +5962,9 @@ const de_ListEmailTemplatesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6120,12 +5984,11 @@ export const de_ListImportJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ImportJobs != null) { - contents.ImportJobs = de_ImportJobSummaryList(data.ImportJobs, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + ImportJobs: (_) => de_ImportJobSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -6150,10 +6013,9 @@ const de_ListImportJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6173,12 +6035,11 @@ export const de_ListRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Recommendations != null) { - contents.Recommendations = de_RecommendationsList(data.Recommendations, context); - } + const doc = take(data, { + NextToken: __expectString, + Recommendations: (_) => de_RecommendationsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6206,10 +6067,9 @@ const de_ListRecommendationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6229,15 +6089,11 @@ export const de_ListSuppressedDestinationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SuppressedDestinationSummaries != null) { - contents.SuppressedDestinationSummaries = de_SuppressedDestinationSummaries( - data.SuppressedDestinationSummaries, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + SuppressedDestinationSummaries: (_) => de_SuppressedDestinationSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6265,10 +6121,9 @@ const de_ListSuppressedDestinationsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6288,9 +6143,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6318,10 +6174,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6365,10 +6220,9 @@ const de_PutAccountDedicatedIpWarmupAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6415,10 +6269,9 @@ const de_PutAccountDetailsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6462,10 +6315,9 @@ const de_PutAccountSendingAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6509,10 +6361,9 @@ const de_PutAccountSuppressionAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6556,10 +6407,9 @@ const de_PutAccountVdmAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6606,10 +6456,9 @@ const de_PutConfigurationSetDeliveryOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6656,10 +6505,9 @@ const de_PutConfigurationSetReputationOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6706,10 +6554,9 @@ const de_PutConfigurationSetSendingOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6756,10 +6603,9 @@ const de_PutConfigurationSetSuppressionOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6806,10 +6652,9 @@ const de_PutConfigurationSetTrackingOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6856,10 +6701,9 @@ const de_PutConfigurationSetVdmOptionsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6906,10 +6750,9 @@ const de_PutDedicatedIpInPoolCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6956,10 +6799,9 @@ const de_PutDedicatedIpWarmupAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7012,10 +6854,9 @@ const de_PutDeliverabilityDashboardOptionCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7062,10 +6903,9 @@ const de_PutEmailIdentityConfigurationSetAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7112,10 +6952,9 @@ const de_PutEmailIdentityDkimAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7135,12 +6974,11 @@ export const de_PutEmailIdentityDkimSigningAttributesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DkimStatus != null) { - contents.DkimStatus = __expectString(data.DkimStatus); - } - if (data.DkimTokens != null) { - contents.DkimTokens = de_DnsTokenList(data.DkimTokens, context); - } + const doc = take(data, { + DkimStatus: __expectString, + DkimTokens: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7168,10 +7006,9 @@ const de_PutEmailIdentityDkimSigningAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7218,10 +7055,9 @@ const de_PutEmailIdentityFeedbackAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7268,10 +7104,9 @@ const de_PutEmailIdentityMailFromAttributesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7315,10 +7150,9 @@ const de_PutSuppressedDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7338,9 +7172,10 @@ export const de_SendBulkEmailCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BulkEmailEntryResults != null) { - contents.BulkEmailEntryResults = de_BulkEmailEntryResultList(data.BulkEmailEntryResults, context); - } + const doc = take(data, { + BulkEmailEntryResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -7383,10 +7218,9 @@ const de_SendBulkEmailCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7406,9 +7240,10 @@ export const de_SendCustomVerificationEmailCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7448,10 +7283,9 @@ const de_SendCustomVerificationEmailCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7471,9 +7305,10 @@ export const de_SendEmailCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MessageId != null) { - contents.MessageId = __expectString(data.MessageId); - } + const doc = take(data, { + MessageId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7516,10 +7351,9 @@ const de_SendEmailCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7569,10 +7403,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7592,9 +7425,10 @@ export const de_TestRenderEmailTemplateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.RenderedTemplate != null) { - contents.RenderedTemplate = __expectString(data.RenderedTemplate); - } + const doc = take(data, { + RenderedTemplate: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -7622,10 +7456,9 @@ const de_TestRenderEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7675,10 +7508,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7725,10 +7557,9 @@ const de_UpdateConfigurationSetEventDestinationCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7778,10 +7609,9 @@ const de_UpdateContactCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7831,10 +7661,9 @@ const de_UpdateContactListCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7881,10 +7710,9 @@ const de_UpdateCustomVerificationEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7931,10 +7759,9 @@ const de_UpdateEmailIdentityPolicyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7981,16 +7808,15 @@ const de_UpdateEmailTemplateCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccountSuspendedExceptionRes */ @@ -8000,9 +7826,10 @@ const de_AccountSuspendedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccountSuspendedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8019,9 +7846,10 @@ const de_AlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8035,9 +7863,10 @@ const de_AlreadyExistsExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8054,9 +7883,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8070,9 +7900,10 @@ const de_ConcurrentModificationExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8089,9 +7920,10 @@ const de_InternalServiceErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8108,9 +7940,10 @@ const de_InvalidNextTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8127,9 +7960,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8146,9 +7980,10 @@ const de_MailFromDomainNotVerifiedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MailFromDomainNotVerifiedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8162,9 +7997,10 @@ const de_MailFromDomainNotVerifiedExceptionRes = async ( const de_MessageRejectedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MessageRejected({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8178,9 +8014,10 @@ const de_MessageRejectedRes = async (parsedOutput: any, context: __SerdeContext) const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8197,9 +8034,10 @@ const de_SendingPausedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new SendingPausedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8216,9 +8054,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -8226,16 +8065,7 @@ const de_TooManyRequestsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdditionalContactEmailAddresses - */ -const se_AdditionalContactEmailAddresses = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalContactEmailAddresses omitted. /** * serializeAws_restJson1BatchGetMetricDataQueries @@ -8252,177 +8082,45 @@ const se_BatchGetMetricDataQueries = (input: BatchGetMetricDataQuery[], context: * serializeAws_restJson1BatchGetMetricDataQuery */ const se_BatchGetMetricDataQuery = (input: BatchGetMetricDataQuery, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_Dimensions(input.Dimensions, context) }), - ...(input.EndDate != null && { EndDate: Math.round(input.EndDate.getTime() / 1000) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Metric != null && { Metric: input.Metric }), - ...(input.Namespace != null && { Namespace: input.Namespace }), - ...(input.StartDate != null && { StartDate: Math.round(input.StartDate.getTime() / 1000) }), - }; + return take(input, { + Dimensions: _json, + EndDate: (_) => Math.round(_.getTime() / 1000), + Id: [], + Metric: [], + Namespace: [], + StartDate: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_restJson1Body - */ -const se_Body = (input: Body, context: __SerdeContext): any => { - return { - ...(input.Html != null && { Html: se_Content(input.Html, context) }), - ...(input.Text != null && { Text: se_Content(input.Text, context) }), - }; -}; +// se_Body omitted. -/** - * serializeAws_restJson1BulkEmailContent - */ -const se_BulkEmailContent = (input: BulkEmailContent, context: __SerdeContext): any => { - return { - ...(input.Template != null && { Template: se_Template(input.Template, context) }), - }; -}; +// se_BulkEmailContent omitted. -/** - * serializeAws_restJson1BulkEmailEntry - */ -const se_BulkEmailEntry = (input: BulkEmailEntry, context: __SerdeContext): any => { - return { - ...(input.Destination != null && { Destination: se_Destination(input.Destination, context) }), - ...(input.ReplacementEmailContent != null && { - ReplacementEmailContent: se_ReplacementEmailContent(input.ReplacementEmailContent, context), - }), - ...(input.ReplacementTags != null && { ReplacementTags: se_MessageTagList(input.ReplacementTags, context) }), - }; -}; +// se_BulkEmailEntry omitted. -/** - * serializeAws_restJson1BulkEmailEntryList - */ -const se_BulkEmailEntryList = (input: BulkEmailEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BulkEmailEntry(entry, context); - }); -}; +// se_BulkEmailEntryList omitted. -/** - * serializeAws_restJson1CloudWatchDestination - */ -const se_CloudWatchDestination = (input: CloudWatchDestination, context: __SerdeContext): any => { - return { - ...(input.DimensionConfigurations != null && { - DimensionConfigurations: se_CloudWatchDimensionConfigurations(input.DimensionConfigurations, context), - }), - }; -}; +// se_CloudWatchDestination omitted. -/** - * serializeAws_restJson1CloudWatchDimensionConfiguration - */ -const se_CloudWatchDimensionConfiguration = (input: CloudWatchDimensionConfiguration, context: __SerdeContext): any => { - return { - ...(input.DefaultDimensionValue != null && { DefaultDimensionValue: input.DefaultDimensionValue }), - ...(input.DimensionName != null && { DimensionName: input.DimensionName }), - ...(input.DimensionValueSource != null && { DimensionValueSource: input.DimensionValueSource }), - }; -}; +// se_CloudWatchDimensionConfiguration omitted. -/** - * serializeAws_restJson1CloudWatchDimensionConfigurations - */ -const se_CloudWatchDimensionConfigurations = ( - input: CloudWatchDimensionConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CloudWatchDimensionConfiguration(entry, context); - }); -}; +// se_CloudWatchDimensionConfigurations omitted. -/** - * serializeAws_restJson1ContactListDestination - */ -const se_ContactListDestination = (input: ContactListDestination, context: __SerdeContext): any => { - return { - ...(input.ContactListImportAction != null && { ContactListImportAction: input.ContactListImportAction }), - ...(input.ContactListName != null && { ContactListName: input.ContactListName }), - }; -}; +// se_ContactListDestination omitted. -/** - * serializeAws_restJson1Content - */ -const se_Content = (input: Content, context: __SerdeContext): any => { - return { - ...(input.Charset != null && { Charset: input.Charset }), - ...(input.Data != null && { Data: input.Data }), - }; -}; +// se_Content omitted. -/** - * serializeAws_restJson1DashboardAttributes - */ -const se_DashboardAttributes = (input: DashboardAttributes, context: __SerdeContext): any => { - return { - ...(input.EngagementMetrics != null && { EngagementMetrics: input.EngagementMetrics }), - }; -}; +// se_DashboardAttributes omitted. -/** - * serializeAws_restJson1DashboardOptions - */ -const se_DashboardOptions = (input: DashboardOptions, context: __SerdeContext): any => { - return { - ...(input.EngagementMetrics != null && { EngagementMetrics: input.EngagementMetrics }), - }; -}; +// se_DashboardOptions omitted. -/** - * serializeAws_restJson1DeliveryOptions - */ -const se_DeliveryOptions = (input: DeliveryOptions, context: __SerdeContext): any => { - return { - ...(input.SendingPoolName != null && { SendingPoolName: input.SendingPoolName }), - ...(input.TlsPolicy != null && { TlsPolicy: input.TlsPolicy }), - }; -}; +// se_DeliveryOptions omitted. -/** - * serializeAws_restJson1Destination - */ -const se_Destination = (input: Destination, context: __SerdeContext): any => { - return { - ...(input.BccAddresses != null && { BccAddresses: se_EmailAddressList(input.BccAddresses, context) }), - ...(input.CcAddresses != null && { CcAddresses: se_EmailAddressList(input.CcAddresses, context) }), - ...(input.ToAddresses != null && { ToAddresses: se_EmailAddressList(input.ToAddresses, context) }), - }; -}; +// se_Destination omitted. -/** - * serializeAws_restJson1Dimensions - */ -const se_Dimensions = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [MetricDimensionName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Dimensions omitted. -/** - * serializeAws_restJson1DkimSigningAttributes - */ -const se_DkimSigningAttributes = (input: DkimSigningAttributes, context: __SerdeContext): any => { - return { - ...(input.DomainSigningPrivateKey != null && { DomainSigningPrivateKey: input.DomainSigningPrivateKey }), - ...(input.DomainSigningSelector != null && { DomainSigningSelector: input.DomainSigningSelector }), - ...(input.NextSigningKeyLength != null && { NextSigningKeyLength: input.NextSigningKeyLength }), - }; -}; +// se_DkimSigningAttributes omitted. /** * serializeAws_restJson1DomainDeliverabilityTrackingOption @@ -8431,15 +8129,11 @@ const se_DomainDeliverabilityTrackingOption = ( input: DomainDeliverabilityTrackingOption, context: __SerdeContext ): any => { - return { - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.InboxPlacementTrackingOption != null && { - InboxPlacementTrackingOption: se_InboxPlacementTrackingOption(input.InboxPlacementTrackingOption, context), - }), - ...(input.SubscriptionStartDate != null && { - SubscriptionStartDate: Math.round(input.SubscriptionStartDate.getTime() / 1000), - }), - }; + return take(input, { + Domain: [], + InboxPlacementTrackingOption: _json, + SubscriptionStartDate: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -8456,462 +8150,111 @@ const se_DomainDeliverabilityTrackingOptions = ( }); }; -/** - * serializeAws_restJson1EmailAddressList - */ -const se_EmailAddressList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EmailAddressList omitted. /** * serializeAws_restJson1EmailContent */ const se_EmailContent = (input: EmailContent, context: __SerdeContext): any => { - return { - ...(input.Raw != null && { Raw: se_RawMessage(input.Raw, context) }), - ...(input.Simple != null && { Simple: se_Message(input.Simple, context) }), - ...(input.Template != null && { Template: se_Template(input.Template, context) }), - }; + return take(input, { + Raw: (_) => se_RawMessage(_, context), + Simple: _json, + Template: _json, + }); }; -/** - * serializeAws_restJson1EmailTemplateContent - */ -const se_EmailTemplateContent = (input: EmailTemplateContent, context: __SerdeContext): any => { - return { - ...(input.Html != null && { Html: input.Html }), - ...(input.Subject != null && { Subject: input.Subject }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_EmailTemplateContent omitted. -/** - * serializeAws_restJson1EventDestinationDefinition - */ -const se_EventDestinationDefinition = (input: EventDestinationDefinition, context: __SerdeContext): any => { - return { - ...(input.CloudWatchDestination != null && { - CloudWatchDestination: se_CloudWatchDestination(input.CloudWatchDestination, context), - }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.KinesisFirehoseDestination != null && { - KinesisFirehoseDestination: se_KinesisFirehoseDestination(input.KinesisFirehoseDestination, context), - }), - ...(input.MatchingEventTypes != null && { MatchingEventTypes: se_EventTypes(input.MatchingEventTypes, context) }), - ...(input.PinpointDestination != null && { - PinpointDestination: se_PinpointDestination(input.PinpointDestination, context), - }), - ...(input.SnsDestination != null && { SnsDestination: se_SnsDestination(input.SnsDestination, context) }), - }; -}; +// se_EventDestinationDefinition omitted. -/** - * serializeAws_restJson1EventTypes - */ -const se_EventTypes = (input: (EventType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EventTypes omitted. -/** - * serializeAws_restJson1GuardianAttributes - */ -const se_GuardianAttributes = (input: GuardianAttributes, context: __SerdeContext): any => { - return { - ...(input.OptimizedSharedDelivery != null && { OptimizedSharedDelivery: input.OptimizedSharedDelivery }), - }; -}; +// se_GuardianAttributes omitted. -/** - * serializeAws_restJson1GuardianOptions - */ -const se_GuardianOptions = (input: GuardianOptions, context: __SerdeContext): any => { - return { - ...(input.OptimizedSharedDelivery != null && { OptimizedSharedDelivery: input.OptimizedSharedDelivery }), - }; -}; +// se_GuardianOptions omitted. -/** - * serializeAws_restJson1ImportDataSource - */ -const se_ImportDataSource = (input: ImportDataSource, context: __SerdeContext): any => { - return { - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.S3Url != null && { S3Url: input.S3Url }), - }; -}; +// se_ImportDataSource omitted. -/** - * serializeAws_restJson1ImportDestination - */ -const se_ImportDestination = (input: ImportDestination, context: __SerdeContext): any => { - return { - ...(input.ContactListDestination != null && { - ContactListDestination: se_ContactListDestination(input.ContactListDestination, context), - }), - ...(input.SuppressionListDestination != null && { - SuppressionListDestination: se_SuppressionListDestination(input.SuppressionListDestination, context), - }), - }; -}; +// se_ImportDestination omitted. -/** - * serializeAws_restJson1InboxPlacementTrackingOption - */ -const se_InboxPlacementTrackingOption = (input: InboxPlacementTrackingOption, context: __SerdeContext): any => { - return { - ...(input.Global != null && { Global: input.Global }), - ...(input.TrackedIsps != null && { TrackedIsps: se_IspNameList(input.TrackedIsps, context) }), - }; -}; +// se_InboxPlacementTrackingOption omitted. -/** - * serializeAws_restJson1IspNameList - */ -const se_IspNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IspNameList omitted. -/** - * serializeAws_restJson1KinesisFirehoseDestination - */ -const se_KinesisFirehoseDestination = (input: KinesisFirehoseDestination, context: __SerdeContext): any => { - return { - ...(input.DeliveryStreamArn != null && { DeliveryStreamArn: input.DeliveryStreamArn }), - ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }), - }; -}; +// se_KinesisFirehoseDestination omitted. -/** - * serializeAws_restJson1ListContactsFilter - */ -const se_ListContactsFilter = (input: ListContactsFilter, context: __SerdeContext): any => { - return { - ...(input.FilteredStatus != null && { FilteredStatus: input.FilteredStatus }), - ...(input.TopicFilter != null && { TopicFilter: se_TopicFilter(input.TopicFilter, context) }), - }; -}; +// se_ListContactsFilter omitted. -/** - * serializeAws_restJson1ListManagementOptions - */ -const se_ListManagementOptions = (input: ListManagementOptions, context: __SerdeContext): any => { - return { - ...(input.ContactListName != null && { ContactListName: input.ContactListName }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; +// se_ListManagementOptions omitted. -/** - * serializeAws_restJson1ListRecommendationsFilter - */ -const se_ListRecommendationsFilter = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [ListRecommendationsFilterKey | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, - {} - ); -}; +// se_ListRecommendationsFilter omitted. -/** - * serializeAws_restJson1Message - */ -const se_Message = (input: Message, context: __SerdeContext): any => { - return { - ...(input.Body != null && { Body: se_Body(input.Body, context) }), - ...(input.Subject != null && { Subject: se_Content(input.Subject, context) }), - }; -}; +// se_Message omitted. -/** - * serializeAws_restJson1MessageTag - */ -const se_MessageTag = (input: MessageTag, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MessageTag omitted. -/** - * serializeAws_restJson1MessageTagList - */ -const se_MessageTagList = (input: MessageTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MessageTag(entry, context); - }); -}; +// se_MessageTagList omitted. -/** - * serializeAws_restJson1PinpointDestination - */ -const se_PinpointDestination = (input: PinpointDestination, context: __SerdeContext): any => { - return { - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - }; -}; +// se_PinpointDestination omitted. /** * serializeAws_restJson1RawMessage */ const se_RawMessage = (input: RawMessage, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: context.base64Encoder(input.Data) }), - }; + return take(input, { + Data: context.base64Encoder, + }); }; -/** - * serializeAws_restJson1ReplacementEmailContent - */ -const se_ReplacementEmailContent = (input: ReplacementEmailContent, context: __SerdeContext): any => { - return { - ...(input.ReplacementTemplate != null && { - ReplacementTemplate: se_ReplacementTemplate(input.ReplacementTemplate, context), - }), - }; -}; +// se_ReplacementEmailContent omitted. -/** - * serializeAws_restJson1ReplacementTemplate - */ -const se_ReplacementTemplate = (input: ReplacementTemplate, context: __SerdeContext): any => { - return { - ...(input.ReplacementTemplateData != null && { ReplacementTemplateData: input.ReplacementTemplateData }), - }; -}; +// se_ReplacementTemplate omitted. /** * serializeAws_restJson1ReputationOptions */ const se_ReputationOptions = (input: ReputationOptions, context: __SerdeContext): any => { - return { - ...(input.LastFreshStart != null && { LastFreshStart: Math.round(input.LastFreshStart.getTime() / 1000) }), - ...(input.ReputationMetricsEnabled != null && { ReputationMetricsEnabled: input.ReputationMetricsEnabled }), - }; + return take(input, { + LastFreshStart: (_) => Math.round(_.getTime() / 1000), + ReputationMetricsEnabled: [], + }); }; -/** - * serializeAws_restJson1SendingOptions - */ -const se_SendingOptions = (input: SendingOptions, context: __SerdeContext): any => { - return { - ...(input.SendingEnabled != null && { SendingEnabled: input.SendingEnabled }), - }; -}; +// se_SendingOptions omitted. -/** - * serializeAws_restJson1SnsDestination - */ -const se_SnsDestination = (input: SnsDestination, context: __SerdeContext): any => { - return { - ...(input.TopicArn != null && { TopicArn: input.TopicArn }), - }; -}; +// se_SnsDestination omitted. -/** - * serializeAws_restJson1SuppressionListDestination - */ -const se_SuppressionListDestination = (input: SuppressionListDestination, context: __SerdeContext): any => { - return { - ...(input.SuppressionListImportAction != null && { - SuppressionListImportAction: input.SuppressionListImportAction, - }), - }; -}; +// se_SuppressionListDestination omitted. -/** - * serializeAws_restJson1SuppressionListReasons - */ -const se_SuppressionListReasons = (input: (SuppressionListReason | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SuppressionListReasons omitted. -/** - * serializeAws_restJson1SuppressionOptions - */ -const se_SuppressionOptions = (input: SuppressionOptions, context: __SerdeContext): any => { - return { - ...(input.SuppressedReasons != null && { - SuppressedReasons: se_SuppressionListReasons(input.SuppressedReasons, context), - }), - }; -}; +// se_SuppressionOptions omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_restJson1Template - */ -const se_Template = (input: Template, context: __SerdeContext): any => { - return { - ...(input.TemplateArn != null && { TemplateArn: input.TemplateArn }), - ...(input.TemplateData != null && { TemplateData: input.TemplateData }), - ...(input.TemplateName != null && { TemplateName: input.TemplateName }), - }; -}; +// se_Template omitted. -/** - * serializeAws_restJson1Topic - */ -const se_Topic = (input: Topic, context: __SerdeContext): any => { - return { - ...(input.DefaultSubscriptionStatus != null && { DefaultSubscriptionStatus: input.DefaultSubscriptionStatus }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; +// se_Topic omitted. -/** - * serializeAws_restJson1TopicFilter - */ -const se_TopicFilter = (input: TopicFilter, context: __SerdeContext): any => { - return { - ...(input.TopicName != null && { TopicName: input.TopicName }), - ...(input.UseDefaultIfPreferenceUnavailable != null && { - UseDefaultIfPreferenceUnavailable: input.UseDefaultIfPreferenceUnavailable, - }), - }; -}; +// se_TopicFilter omitted. -/** - * serializeAws_restJson1TopicPreference - */ -const se_TopicPreference = (input: TopicPreference, context: __SerdeContext): any => { - return { - ...(input.SubscriptionStatus != null && { SubscriptionStatus: input.SubscriptionStatus }), - ...(input.TopicName != null && { TopicName: input.TopicName }), - }; -}; +// se_TopicPreference omitted. -/** - * serializeAws_restJson1TopicPreferenceList - */ -const se_TopicPreferenceList = (input: TopicPreference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TopicPreference(entry, context); - }); -}; +// se_TopicPreferenceList omitted. -/** - * serializeAws_restJson1Topics - */ -const se_Topics = (input: Topic[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Topic(entry, context); - }); -}; +// se_Topics omitted. -/** - * serializeAws_restJson1TrackingOptions - */ -const se_TrackingOptions = (input: TrackingOptions, context: __SerdeContext): any => { - return { - ...(input.CustomRedirectDomain != null && { CustomRedirectDomain: input.CustomRedirectDomain }), - }; -}; +// se_TrackingOptions omitted. -/** - * serializeAws_restJson1VdmAttributes - */ -const se_VdmAttributes = (input: VdmAttributes, context: __SerdeContext): any => { - return { - ...(input.DashboardAttributes != null && { - DashboardAttributes: se_DashboardAttributes(input.DashboardAttributes, context), - }), - ...(input.GuardianAttributes != null && { - GuardianAttributes: se_GuardianAttributes(input.GuardianAttributes, context), - }), - ...(input.VdmEnabled != null && { VdmEnabled: input.VdmEnabled }), - }; -}; +// se_VdmAttributes omitted. -/** - * serializeAws_restJson1VdmOptions - */ -const se_VdmOptions = (input: VdmOptions, context: __SerdeContext): any => { - return { - ...(input.DashboardOptions != null && { DashboardOptions: se_DashboardOptions(input.DashboardOptions, context) }), - ...(input.GuardianOptions != null && { GuardianOptions: se_GuardianOptions(input.GuardianOptions, context) }), - }; -}; +// se_VdmOptions omitted. -/** - * deserializeAws_restJson1AccountDetails - */ -const de_AccountDetails = (output: any, context: __SerdeContext): AccountDetails => { - return { - AdditionalContactEmailAddresses: - output.AdditionalContactEmailAddresses != null - ? de_AdditionalContactEmailAddresses(output.AdditionalContactEmailAddresses, context) - : undefined, - ContactLanguage: __expectString(output.ContactLanguage), - MailType: __expectString(output.MailType), - ReviewDetails: output.ReviewDetails != null ? de_ReviewDetails(output.ReviewDetails, context) : undefined, - UseCaseDescription: __expectString(output.UseCaseDescription), - WebsiteURL: __expectString(output.WebsiteURL), - } as any; -}; +// de_AccountDetails omitted. -/** - * deserializeAws_restJson1AdditionalContactEmailAddresses - */ -const de_AdditionalContactEmailAddresses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AdditionalContactEmailAddresses omitted. /** * deserializeAws_restJson1BlacklistEntries @@ -8920,9 +8263,6 @@ const de_BlacklistEntries = (output: any, context: __SerdeContext): BlacklistEnt const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BlacklistEntry(entry, context); }); return retVal; @@ -8932,14 +8272,11 @@ const de_BlacklistEntries = (output: any, context: __SerdeContext): BlacklistEnt * deserializeAws_restJson1BlacklistEntry */ const de_BlacklistEntry = (output: any, context: __SerdeContext): BlacklistEntry => { - return { - Description: __expectString(output.Description), - ListingTime: - output.ListingTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ListingTime))) - : undefined, - RblName: __expectString(output.RblName), - } as any; + return take(output, { + Description: __expectString, + ListingTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RblName: __expectString, + }) as any; }; /** @@ -8952,183 +8289,59 @@ const de_BlacklistReport = (output: any, context: __SerdeContext): Record { - return { - Error: __expectString(output.Error), - MessageId: __expectString(output.MessageId), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1BulkEmailEntryResultList - */ -const de_BulkEmailEntryResultList = (output: any, context: __SerdeContext): BulkEmailEntryResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BulkEmailEntryResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CloudWatchDestination - */ -const de_CloudWatchDestination = (output: any, context: __SerdeContext): CloudWatchDestination => { - return { - DimensionConfigurations: - output.DimensionConfigurations != null - ? de_CloudWatchDimensionConfigurations(output.DimensionConfigurations, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CloudWatchDimensionConfiguration - */ -const de_CloudWatchDimensionConfiguration = ( - output: any, - context: __SerdeContext -): CloudWatchDimensionConfiguration => { - return { - DefaultDimensionValue: __expectString(output.DefaultDimensionValue), - DimensionName: __expectString(output.DimensionName), - DimensionValueSource: __expectString(output.DimensionValueSource), - } as any; -}; - -/** - * deserializeAws_restJson1CloudWatchDimensionConfigurations - */ -const de_CloudWatchDimensionConfigurations = ( - output: any, - context: __SerdeContext -): CloudWatchDimensionConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CloudWatchDimensionConfiguration(entry, context); - }); - return retVal; + }, {}); }; -/** - * deserializeAws_restJson1ConfigurationSetNameList - */ -const de_ConfigurationSetNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_BulkEmailEntryResult omitted. + +// de_BulkEmailEntryResultList omitted. + +// de_CloudWatchDestination omitted. + +// de_CloudWatchDimensionConfiguration omitted. + +// de_CloudWatchDimensionConfigurations omitted. + +// de_ConfigurationSetNameList omitted. /** * deserializeAws_restJson1Contact */ const de_Contact = (output: any, context: __SerdeContext): Contact => { - return { - EmailAddress: __expectString(output.EmailAddress), - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - TopicDefaultPreferences: - output.TopicDefaultPreferences != null - ? de_TopicPreferenceList(output.TopicDefaultPreferences, context) - : undefined, - TopicPreferences: - output.TopicPreferences != null ? de_TopicPreferenceList(output.TopicPreferences, context) : undefined, - UnsubscribeAll: __expectBoolean(output.UnsubscribeAll), - } as any; + return take(output, { + EmailAddress: __expectString, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TopicDefaultPreferences: _json, + TopicPreferences: _json, + UnsubscribeAll: __expectBoolean, + }) as any; }; /** * deserializeAws_restJson1ContactList */ const de_ContactList = (output: any, context: __SerdeContext): ContactList => { - return { - ContactListName: __expectString(output.ContactListName), - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - } as any; + return take(output, { + ContactListName: __expectString, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1ContactListDestination - */ -const de_ContactListDestination = (output: any, context: __SerdeContext): ContactListDestination => { - return { - ContactListImportAction: __expectString(output.ContactListImportAction), - ContactListName: __expectString(output.ContactListName), - } as any; -}; +// de_ContactListDestination omitted. -/** - * deserializeAws_restJson1CustomVerificationEmailTemplateMetadata - */ -const de_CustomVerificationEmailTemplateMetadata = ( - output: any, - context: __SerdeContext -): CustomVerificationEmailTemplateMetadata => { - return { - FailureRedirectionURL: __expectString(output.FailureRedirectionURL), - FromEmailAddress: __expectString(output.FromEmailAddress), - SuccessRedirectionURL: __expectString(output.SuccessRedirectionURL), - TemplateName: __expectString(output.TemplateName), - TemplateSubject: __expectString(output.TemplateSubject), - } as any; -}; +// de_CustomVerificationEmailTemplateMetadata omitted. -/** - * deserializeAws_restJson1CustomVerificationEmailTemplatesList - */ -const de_CustomVerificationEmailTemplatesList = ( - output: any, - context: __SerdeContext -): CustomVerificationEmailTemplateMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomVerificationEmailTemplateMetadata(entry, context); - }); - return retVal; -}; +// de_CustomVerificationEmailTemplatesList omitted. /** * deserializeAws_restJson1DailyVolume */ const de_DailyVolume = (output: any, context: __SerdeContext): DailyVolume => { - return { - DomainIspPlacements: - output.DomainIspPlacements != null ? de_DomainIspPlacements(output.DomainIspPlacements, context) : undefined, - StartDate: - output.StartDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDate))) : undefined, - VolumeStatistics: - output.VolumeStatistics != null ? de_VolumeStatistics(output.VolumeStatistics, context) : undefined, - } as any; + return take(output, { + DomainIspPlacements: (_: any) => de_DomainIspPlacements(_, context), + StartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VolumeStatistics: _json, + }) as any; }; /** @@ -9138,82 +8351,33 @@ const de_DailyVolumes = (output: any, context: __SerdeContext): DailyVolume[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DailyVolume(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DashboardAttributes - */ -const de_DashboardAttributes = (output: any, context: __SerdeContext): DashboardAttributes => { - return { - EngagementMetrics: __expectString(output.EngagementMetrics), - } as any; -}; +// de_DashboardAttributes omitted. -/** - * deserializeAws_restJson1DashboardOptions - */ -const de_DashboardOptions = (output: any, context: __SerdeContext): DashboardOptions => { - return { - EngagementMetrics: __expectString(output.EngagementMetrics), - } as any; -}; +// de_DashboardOptions omitted. -/** - * deserializeAws_restJson1DedicatedIp - */ -const de_DedicatedIp = (output: any, context: __SerdeContext): DedicatedIp => { - return { - Ip: __expectString(output.Ip), - PoolName: __expectString(output.PoolName), - WarmupPercentage: __expectInt32(output.WarmupPercentage), - WarmupStatus: __expectString(output.WarmupStatus), - } as any; -}; +// de_DedicatedIp omitted. -/** - * deserializeAws_restJson1DedicatedIpList - */ -const de_DedicatedIpList = (output: any, context: __SerdeContext): DedicatedIp[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DedicatedIp(entry, context); - }); - return retVal; -}; +// de_DedicatedIpList omitted. -/** - * deserializeAws_restJson1DedicatedIpPool - */ -const de_DedicatedIpPool = (output: any, context: __SerdeContext): DedicatedIpPool => { - return { - PoolName: __expectString(output.PoolName), - ScalingMode: __expectString(output.ScalingMode), - } as any; -}; +// de_DedicatedIpPool omitted. /** * deserializeAws_restJson1DeliverabilityTestReport */ const de_DeliverabilityTestReport = (output: any, context: __SerdeContext): DeliverabilityTestReport => { - return { - CreateDate: - output.CreateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateDate))) : undefined, - DeliverabilityTestStatus: __expectString(output.DeliverabilityTestStatus), - FromEmailAddress: __expectString(output.FromEmailAddress), - ReportId: __expectString(output.ReportId), - ReportName: __expectString(output.ReportName), - Subject: __expectString(output.Subject), - } as any; + return take(output, { + CreateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeliverabilityTestStatus: __expectString, + FromEmailAddress: __expectString, + ReportId: __expectString, + ReportName: __expectString, + Subject: __expectString, + }) as any; }; /** @@ -9223,83 +8387,50 @@ const de_DeliverabilityTestReports = (output: any, context: __SerdeContext): Del const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DeliverabilityTestReport(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DeliveryOptions - */ -const de_DeliveryOptions = (output: any, context: __SerdeContext): DeliveryOptions => { - return { - SendingPoolName: __expectString(output.SendingPoolName), - TlsPolicy: __expectString(output.TlsPolicy), - } as any; -}; +// de_DeliveryOptions omitted. /** * deserializeAws_restJson1DkimAttributes */ const de_DkimAttributes = (output: any, context: __SerdeContext): DkimAttributes => { - return { - CurrentSigningKeyLength: __expectString(output.CurrentSigningKeyLength), - LastKeyGenerationTimestamp: - output.LastKeyGenerationTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastKeyGenerationTimestamp))) - : undefined, - NextSigningKeyLength: __expectString(output.NextSigningKeyLength), - SigningAttributesOrigin: __expectString(output.SigningAttributesOrigin), - SigningEnabled: __expectBoolean(output.SigningEnabled), - Status: __expectString(output.Status), - Tokens: output.Tokens != null ? de_DnsTokenList(output.Tokens, context) : undefined, - } as any; + return take(output, { + CurrentSigningKeyLength: __expectString, + LastKeyGenerationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextSigningKeyLength: __expectString, + SigningAttributesOrigin: __expectString, + SigningEnabled: __expectBoolean, + Status: __expectString, + Tokens: _json, + }) as any; }; -/** - * deserializeAws_restJson1DnsTokenList - */ -const de_DnsTokenList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DnsTokenList omitted. /** * deserializeAws_restJson1DomainDeliverabilityCampaign */ const de_DomainDeliverabilityCampaign = (output: any, context: __SerdeContext): DomainDeliverabilityCampaign => { - return { - CampaignId: __expectString(output.CampaignId), - DeleteRate: __limitedParseDouble(output.DeleteRate), - Esps: output.Esps != null ? de_Esps(output.Esps, context) : undefined, - FirstSeenDateTime: - output.FirstSeenDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FirstSeenDateTime))) - : undefined, - FromAddress: __expectString(output.FromAddress), - ImageUrl: __expectString(output.ImageUrl), - InboxCount: __expectLong(output.InboxCount), - LastSeenDateTime: - output.LastSeenDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSeenDateTime))) - : undefined, - ProjectedVolume: __expectLong(output.ProjectedVolume), - ReadDeleteRate: __limitedParseDouble(output.ReadDeleteRate), - ReadRate: __limitedParseDouble(output.ReadRate), - SendingIps: output.SendingIps != null ? de_IpList(output.SendingIps, context) : undefined, - SpamCount: __expectLong(output.SpamCount), - Subject: __expectString(output.Subject), - } as any; + return take(output, { + CampaignId: __expectString, + DeleteRate: __limitedParseDouble, + Esps: _json, + FirstSeenDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FromAddress: __expectString, + ImageUrl: __expectString, + InboxCount: __expectLong, + LastSeenDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProjectedVolume: __expectLong, + ReadDeleteRate: __limitedParseDouble, + ReadRate: __limitedParseDouble, + SendingIps: _json, + SpamCount: __expectLong, + Subject: __expectString, + }) as any; }; /** @@ -9309,9 +8440,6 @@ const de_DomainDeliverabilityCampaignList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainDeliverabilityCampaign(entry, context); }); return retVal; @@ -9324,17 +8452,11 @@ const de_DomainDeliverabilityTrackingOption = ( output: any, context: __SerdeContext ): DomainDeliverabilityTrackingOption => { - return { - Domain: __expectString(output.Domain), - InboxPlacementTrackingOption: - output.InboxPlacementTrackingOption != null - ? de_InboxPlacementTrackingOption(output.InboxPlacementTrackingOption, context) - : undefined, - SubscriptionStartDate: - output.SubscriptionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubscriptionStartDate))) - : undefined, - } as any; + return take(output, { + Domain: __expectString, + InboxPlacementTrackingOption: _json, + SubscriptionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -9347,9 +8469,6 @@ const de_DomainDeliverabilityTrackingOptions = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainDeliverabilityTrackingOption(entry, context); }); return retVal; @@ -9359,13 +8478,13 @@ const de_DomainDeliverabilityTrackingOptions = ( * deserializeAws_restJson1DomainIspPlacement */ const de_DomainIspPlacement = (output: any, context: __SerdeContext): DomainIspPlacement => { - return { - InboxPercentage: __limitedParseDouble(output.InboxPercentage), - InboxRawCount: __expectLong(output.InboxRawCount), - IspName: __expectString(output.IspName), - SpamPercentage: __limitedParseDouble(output.SpamPercentage), - SpamRawCount: __expectLong(output.SpamRawCount), - } as any; + return take(output, { + InboxPercentage: __limitedParseDouble, + InboxRawCount: __expectLong, + IspName: __expectString, + SpamPercentage: __limitedParseDouble, + SpamRawCount: __expectLong, + }) as any; }; /** @@ -9375,36 +8494,21 @@ const de_DomainIspPlacements = (output: any, context: __SerdeContext): DomainIsp const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainIspPlacement(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EmailTemplateContent - */ -const de_EmailTemplateContent = (output: any, context: __SerdeContext): EmailTemplateContent => { - return { - Html: __expectString(output.Html), - Subject: __expectString(output.Subject), - Text: __expectString(output.Text), - } as any; -}; +// de_EmailTemplateContent omitted. /** * deserializeAws_restJson1EmailTemplateMetadata */ const de_EmailTemplateMetadata = (output: any, context: __SerdeContext): EmailTemplateMetadata => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - TemplateName: __expectString(output.TemplateName), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TemplateName: __expectString, + }) as any; }; /** @@ -9414,179 +8518,45 @@ const de_EmailTemplateMetadataList = (output: any, context: __SerdeContext): Ema const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EmailTemplateMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Esps - */ -const de_Esps = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Esps omitted. -/** - * deserializeAws_restJson1EventDestination - */ -const de_EventDestination = (output: any, context: __SerdeContext): EventDestination => { - return { - CloudWatchDestination: - output.CloudWatchDestination != null - ? de_CloudWatchDestination(output.CloudWatchDestination, context) - : undefined, - Enabled: __expectBoolean(output.Enabled), - KinesisFirehoseDestination: - output.KinesisFirehoseDestination != null - ? de_KinesisFirehoseDestination(output.KinesisFirehoseDestination, context) - : undefined, - MatchingEventTypes: - output.MatchingEventTypes != null ? de_EventTypes(output.MatchingEventTypes, context) : undefined, - Name: __expectString(output.Name), - PinpointDestination: - output.PinpointDestination != null ? de_PinpointDestination(output.PinpointDestination, context) : undefined, - SnsDestination: output.SnsDestination != null ? de_SnsDestination(output.SnsDestination, context) : undefined, - } as any; -}; +// de_EventDestination omitted. -/** - * deserializeAws_restJson1EventDestinations - */ -const de_EventDestinations = (output: any, context: __SerdeContext): EventDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventDestination(entry, context); - }); - return retVal; -}; +// de_EventDestinations omitted. -/** - * deserializeAws_restJson1EventTypes - */ -const de_EventTypes = (output: any, context: __SerdeContext): (EventType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EventTypes omitted. -/** - * deserializeAws_restJson1FailureInfo - */ -const de_FailureInfo = (output: any, context: __SerdeContext): FailureInfo => { - return { - ErrorMessage: __expectString(output.ErrorMessage), - FailedRecordsS3Url: __expectString(output.FailedRecordsS3Url), - } as any; -}; +// de_FailureInfo omitted. -/** - * deserializeAws_restJson1GuardianAttributes - */ -const de_GuardianAttributes = (output: any, context: __SerdeContext): GuardianAttributes => { - return { - OptimizedSharedDelivery: __expectString(output.OptimizedSharedDelivery), - } as any; -}; +// de_GuardianAttributes omitted. -/** - * deserializeAws_restJson1GuardianOptions - */ -const de_GuardianOptions = (output: any, context: __SerdeContext): GuardianOptions => { - return { - OptimizedSharedDelivery: __expectString(output.OptimizedSharedDelivery), - } as any; -}; +// de_GuardianOptions omitted. -/** - * deserializeAws_restJson1IdentityInfo - */ -const de_IdentityInfo = (output: any, context: __SerdeContext): IdentityInfo => { - return { - IdentityName: __expectString(output.IdentityName), - IdentityType: __expectString(output.IdentityType), - SendingEnabled: __expectBoolean(output.SendingEnabled), - VerificationStatus: __expectString(output.VerificationStatus), - } as any; -}; +// de_IdentityInfo omitted. -/** - * deserializeAws_restJson1IdentityInfoList - */ -const de_IdentityInfoList = (output: any, context: __SerdeContext): IdentityInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdentityInfo(entry, context); - }); - return retVal; -}; +// de_IdentityInfoList omitted. -/** - * deserializeAws_restJson1ImportDataSource - */ -const de_ImportDataSource = (output: any, context: __SerdeContext): ImportDataSource => { - return { - DataFormat: __expectString(output.DataFormat), - S3Url: __expectString(output.S3Url), - } as any; -}; +// de_ImportDataSource omitted. -/** - * deserializeAws_restJson1ImportDestination - */ -const de_ImportDestination = (output: any, context: __SerdeContext): ImportDestination => { - return { - ContactListDestination: - output.ContactListDestination != null - ? de_ContactListDestination(output.ContactListDestination, context) - : undefined, - SuppressionListDestination: - output.SuppressionListDestination != null - ? de_SuppressionListDestination(output.SuppressionListDestination, context) - : undefined, - } as any; -}; +// de_ImportDestination omitted. /** * deserializeAws_restJson1ImportJobSummary */ const de_ImportJobSummary = (output: any, context: __SerdeContext): ImportJobSummary => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - FailedRecordsCount: __expectInt32(output.FailedRecordsCount), - ImportDestination: - output.ImportDestination != null ? de_ImportDestination(output.ImportDestination, context) : undefined, - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - ProcessedRecordsCount: __expectInt32(output.ProcessedRecordsCount), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailedRecordsCount: __expectInt32, + ImportDestination: _json, + JobId: __expectString, + JobStatus: __expectString, + ProcessedRecordsCount: __expectInt32, + }) as any; }; /** @@ -9596,63 +8566,25 @@ const de_ImportJobSummaryList = (output: any, context: __SerdeContext): ImportJo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImportJobSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InboxPlacementTrackingOption - */ -const de_InboxPlacementTrackingOption = (output: any, context: __SerdeContext): InboxPlacementTrackingOption => { - return { - Global: __expectBoolean(output.Global), - TrackedIsps: output.TrackedIsps != null ? de_IspNameList(output.TrackedIsps, context) : undefined, - } as any; -}; +// de_InboxPlacementTrackingOption omitted. -/** - * deserializeAws_restJson1IpList - */ -const de_IpList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpList omitted. -/** - * deserializeAws_restJson1IspNameList - */ -const de_IspNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IspNameList omitted. /** * deserializeAws_restJson1IspPlacement */ const de_IspPlacement = (output: any, context: __SerdeContext): IspPlacement => { - return { - IspName: __expectString(output.IspName), - PlacementStatistics: - output.PlacementStatistics != null ? de_PlacementStatistics(output.PlacementStatistics, context) : undefined, - } as any; + return take(output, { + IspName: __expectString, + PlacementStatistics: (_: any) => de_PlacementStatistics(_, context), + }) as any; }; /** @@ -9662,23 +8594,12 @@ const de_IspPlacements = (output: any, context: __SerdeContext): IspPlacement[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IspPlacement(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1KinesisFirehoseDestination - */ -const de_KinesisFirehoseDestination = (output: any, context: __SerdeContext): KinesisFirehoseDestination => { - return { - DeliveryStreamArn: __expectString(output.DeliveryStreamArn), - IamRoleArn: __expectString(output.IamRoleArn), - } as any; -}; +// de_KinesisFirehoseDestination omitted. /** * deserializeAws_restJson1ListOfContactLists @@ -9687,9 +8608,6 @@ const de_ListOfContactLists = (output: any, context: __SerdeContext): ContactLis const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ContactList(entry, context); }); return retVal; @@ -9702,75 +8620,28 @@ const de_ListOfContacts = (output: any, context: __SerdeContext): Contact[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Contact(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ListOfDedicatedIpPools - */ -const de_ListOfDedicatedIpPools = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfDedicatedIpPools omitted. -/** - * deserializeAws_restJson1MailFromAttributes - */ -const de_MailFromAttributes = (output: any, context: __SerdeContext): MailFromAttributes => { - return { - BehaviorOnMxFailure: __expectString(output.BehaviorOnMxFailure), - MailFromDomain: __expectString(output.MailFromDomain), - MailFromDomainStatus: __expectString(output.MailFromDomainStatus), - } as any; -}; +// de_MailFromAttributes omitted. -/** - * deserializeAws_restJson1MetricDataError - */ -const de_MetricDataError = (output: any, context: __SerdeContext): MetricDataError => { - return { - Code: __expectString(output.Code), - Id: __expectString(output.Id), - Message: __expectString(output.Message), - } as any; -}; +// de_MetricDataError omitted. -/** - * deserializeAws_restJson1MetricDataErrorList - */ -const de_MetricDataErrorList = (output: any, context: __SerdeContext): MetricDataError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MetricDataError(entry, context); - }); - return retVal; -}; +// de_MetricDataErrorList omitted. /** * deserializeAws_restJson1MetricDataResult */ const de_MetricDataResult = (output: any, context: __SerdeContext): MetricDataResult => { - return { - Id: __expectString(output.Id), - Timestamps: output.Timestamps != null ? de_TimestampList(output.Timestamps, context) : undefined, - Values: output.Values != null ? de_MetricValueList(output.Values, context) : undefined, - } as any; + return take(output, { + Id: __expectString, + Timestamps: (_: any) => de_TimestampList(_, context), + Values: _json, + }) as any; }; /** @@ -9780,96 +8651,54 @@ const de_MetricDataResultList = (output: any, context: __SerdeContext): MetricDa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MetricDataResult(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1MetricValueList - */ -const de_MetricValueList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; - }); - return retVal; -}; +// de_MetricValueList omitted. /** * deserializeAws_restJson1OverallVolume */ const de_OverallVolume = (output: any, context: __SerdeContext): OverallVolume => { - return { - DomainIspPlacements: - output.DomainIspPlacements != null ? de_DomainIspPlacements(output.DomainIspPlacements, context) : undefined, - ReadRatePercent: __limitedParseDouble(output.ReadRatePercent), - VolumeStatistics: - output.VolumeStatistics != null ? de_VolumeStatistics(output.VolumeStatistics, context) : undefined, - } as any; + return take(output, { + DomainIspPlacements: (_: any) => de_DomainIspPlacements(_, context), + ReadRatePercent: __limitedParseDouble, + VolumeStatistics: _json, + }) as any; }; -/** - * deserializeAws_restJson1PinpointDestination - */ -const de_PinpointDestination = (output: any, context: __SerdeContext): PinpointDestination => { - return { - ApplicationArn: __expectString(output.ApplicationArn), - } as any; -}; +// de_PinpointDestination omitted. /** * deserializeAws_restJson1PlacementStatistics */ const de_PlacementStatistics = (output: any, context: __SerdeContext): PlacementStatistics => { - return { - DkimPercentage: __limitedParseDouble(output.DkimPercentage), - InboxPercentage: __limitedParseDouble(output.InboxPercentage), - MissingPercentage: __limitedParseDouble(output.MissingPercentage), - SpamPercentage: __limitedParseDouble(output.SpamPercentage), - SpfPercentage: __limitedParseDouble(output.SpfPercentage), - } as any; + return take(output, { + DkimPercentage: __limitedParseDouble, + InboxPercentage: __limitedParseDouble, + MissingPercentage: __limitedParseDouble, + SpamPercentage: __limitedParseDouble, + SpfPercentage: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1PolicyMap - */ -const de_PolicyMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_PolicyMap omitted. /** * deserializeAws_restJson1Recommendation */ const de_Recommendation = (output: any, context: __SerdeContext): Recommendation => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - Description: __expectString(output.Description), - Impact: __expectString(output.Impact), - LastUpdatedTimestamp: - output.LastUpdatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTimestamp))) - : undefined, - ResourceArn: __expectString(output.ResourceArn), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Impact: __expectString, + LastUpdatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + Status: __expectString, + Type: __expectString, + }) as any; }; /** @@ -9879,9 +8708,6 @@ const de_RecommendationsList = (output: any, context: __SerdeContext): Recommend const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Recommendation(entry, context); }); return retVal; @@ -9891,78 +8717,42 @@ const de_RecommendationsList = (output: any, context: __SerdeContext): Recommend * deserializeAws_restJson1ReputationOptions */ const de_ReputationOptions = (output: any, context: __SerdeContext): ReputationOptions => { - return { - LastFreshStart: - output.LastFreshStart != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastFreshStart))) - : undefined, - ReputationMetricsEnabled: __expectBoolean(output.ReputationMetricsEnabled), - } as any; + return take(output, { + LastFreshStart: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReputationMetricsEnabled: __expectBoolean, + }) as any; }; -/** - * deserializeAws_restJson1ReviewDetails - */ -const de_ReviewDetails = (output: any, context: __SerdeContext): ReviewDetails => { - return { - CaseId: __expectString(output.CaseId), - Status: __expectString(output.Status), - } as any; -}; +// de_ReviewDetails omitted. -/** - * deserializeAws_restJson1SendingOptions - */ -const de_SendingOptions = (output: any, context: __SerdeContext): SendingOptions => { - return { - SendingEnabled: __expectBoolean(output.SendingEnabled), - } as any; -}; +// de_SendingOptions omitted. /** * deserializeAws_restJson1SendQuota */ const de_SendQuota = (output: any, context: __SerdeContext): SendQuota => { - return { - Max24HourSend: __limitedParseDouble(output.Max24HourSend), - MaxSendRate: __limitedParseDouble(output.MaxSendRate), - SentLast24Hours: __limitedParseDouble(output.SentLast24Hours), - } as any; + return take(output, { + Max24HourSend: __limitedParseDouble, + MaxSendRate: __limitedParseDouble, + SentLast24Hours: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1SnsDestination - */ -const de_SnsDestination = (output: any, context: __SerdeContext): SnsDestination => { - return { - TopicArn: __expectString(output.TopicArn), - } as any; -}; +// de_SnsDestination omitted. /** * deserializeAws_restJson1SuppressedDestination */ const de_SuppressedDestination = (output: any, context: __SerdeContext): SuppressedDestination => { - return { - Attributes: output.Attributes != null ? de_SuppressedDestinationAttributes(output.Attributes, context) : undefined, - EmailAddress: __expectString(output.EmailAddress), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - Reason: __expectString(output.Reason), - } as any; + return take(output, { + Attributes: _json, + EmailAddress: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Reason: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SuppressedDestinationAttributes - */ -const de_SuppressedDestinationAttributes = (output: any, context: __SerdeContext): SuppressedDestinationAttributes => { - return { - FeedbackId: __expectString(output.FeedbackId), - MessageId: __expectString(output.MessageId), - } as any; -}; +// de_SuppressedDestinationAttributes omitted. /** * deserializeAws_restJson1SuppressedDestinationSummaries @@ -9971,9 +8761,6 @@ const de_SuppressedDestinationSummaries = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SuppressedDestinationSummary(entry, context); }); return retVal; @@ -9983,84 +8770,24 @@ const de_SuppressedDestinationSummaries = (output: any, context: __SerdeContext) * deserializeAws_restJson1SuppressedDestinationSummary */ const de_SuppressedDestinationSummary = (output: any, context: __SerdeContext): SuppressedDestinationSummary => { - return { - EmailAddress: __expectString(output.EmailAddress), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - Reason: __expectString(output.Reason), - } as any; + return take(output, { + EmailAddress: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Reason: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SuppressionAttributes - */ -const de_SuppressionAttributes = (output: any, context: __SerdeContext): SuppressionAttributes => { - return { - SuppressedReasons: - output.SuppressedReasons != null ? de_SuppressionListReasons(output.SuppressedReasons, context) : undefined, - } as any; -}; +// de_SuppressionAttributes omitted. -/** - * deserializeAws_restJson1SuppressionListDestination - */ -const de_SuppressionListDestination = (output: any, context: __SerdeContext): SuppressionListDestination => { - return { - SuppressionListImportAction: __expectString(output.SuppressionListImportAction), - } as any; -}; +// de_SuppressionListDestination omitted. -/** - * deserializeAws_restJson1SuppressionListReasons - */ -const de_SuppressionListReasons = (output: any, context: __SerdeContext): (SuppressionListReason | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SuppressionListReasons omitted. -/** - * deserializeAws_restJson1SuppressionOptions - */ -const de_SuppressionOptions = (output: any, context: __SerdeContext): SuppressionOptions => { - return { - SuppressedReasons: - output.SuppressedReasons != null ? de_SuppressionListReasons(output.SuppressedReasons, context) : undefined, - } as any; -}; +// de_SuppressionOptions omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1TimestampList @@ -10069,110 +8796,26 @@ const de_TimestampList = (output: any, context: __SerdeContext): Date[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry))); }); return retVal; }; -/** - * deserializeAws_restJson1Topic - */ -const de_Topic = (output: any, context: __SerdeContext): Topic => { - return { - DefaultSubscriptionStatus: __expectString(output.DefaultSubscriptionStatus), - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - TopicName: __expectString(output.TopicName), - } as any; -}; +// de_Topic omitted. -/** - * deserializeAws_restJson1TopicPreference - */ -const de_TopicPreference = (output: any, context: __SerdeContext): TopicPreference => { - return { - SubscriptionStatus: __expectString(output.SubscriptionStatus), - TopicName: __expectString(output.TopicName), - } as any; -}; +// de_TopicPreference omitted. -/** - * deserializeAws_restJson1TopicPreferenceList - */ -const de_TopicPreferenceList = (output: any, context: __SerdeContext): TopicPreference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TopicPreference(entry, context); - }); - return retVal; -}; +// de_TopicPreferenceList omitted. -/** - * deserializeAws_restJson1Topics - */ -const de_Topics = (output: any, context: __SerdeContext): Topic[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Topic(entry, context); - }); - return retVal; -}; +// de_Topics omitted. -/** - * deserializeAws_restJson1TrackingOptions - */ -const de_TrackingOptions = (output: any, context: __SerdeContext): TrackingOptions => { - return { - CustomRedirectDomain: __expectString(output.CustomRedirectDomain), - } as any; -}; +// de_TrackingOptions omitted. -/** - * deserializeAws_restJson1VdmAttributes - */ -const de_VdmAttributes = (output: any, context: __SerdeContext): VdmAttributes => { - return { - DashboardAttributes: - output.DashboardAttributes != null ? de_DashboardAttributes(output.DashboardAttributes, context) : undefined, - GuardianAttributes: - output.GuardianAttributes != null ? de_GuardianAttributes(output.GuardianAttributes, context) : undefined, - VdmEnabled: __expectString(output.VdmEnabled), - } as any; -}; +// de_VdmAttributes omitted. -/** - * deserializeAws_restJson1VdmOptions - */ -const de_VdmOptions = (output: any, context: __SerdeContext): VdmOptions => { - return { - DashboardOptions: - output.DashboardOptions != null ? de_DashboardOptions(output.DashboardOptions, context) : undefined, - GuardianOptions: output.GuardianOptions != null ? de_GuardianOptions(output.GuardianOptions, context) : undefined, - } as any; -}; +// de_VdmOptions omitted. -/** - * deserializeAws_restJson1VolumeStatistics - */ -const de_VolumeStatistics = (output: any, context: __SerdeContext): VolumeStatistics => { - return { - InboxRawCount: __expectLong(output.InboxRawCount), - ProjectedInbox: __expectLong(output.ProjectedInbox), - ProjectedSpam: __expectLong(output.ProjectedSpam), - SpamRawCount: __expectLong(output.SpamRawCount), - } as any; -}; +// de_VolumeStatistics omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sfn/src/protocols/Aws_json1_0.ts b/clients/client-sfn/src/protocols/Aws_json1_0.ts index 43d1e073346c..c72dd3ed480e 100644 --- a/clients/client-sfn/src/protocols/Aws_json1_0.ts +++ b/clients/client-sfn/src/protocols/Aws_json1_0.ts @@ -5,8 +5,8 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, @@ -15,7 +15,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -64,26 +65,16 @@ import { UpdateMapRunCommandInput, UpdateMapRunCommandOutput } from "../commands import { UpdateStateMachineCommandInput, UpdateStateMachineCommandOutput } from "../commands/UpdateStateMachineCommand"; import { ActivityDoesNotExist, - ActivityFailedEventDetails, ActivityLimitExceeded, ActivityListItem, - ActivityScheduledEventDetails, - ActivityScheduleFailedEventDetails, - ActivityStartedEventDetails, - ActivitySucceededEventDetails, - ActivityTimedOutEventDetails, ActivityWorkerLimitExceeded, - BillingDetails, - CloudWatchEventsExecutionDataDetails, CloudWatchLogsLogGroup, CreateActivityInput, CreateActivityOutput, CreateStateMachineInput, CreateStateMachineOutput, DeleteActivityInput, - DeleteActivityOutput, DeleteStateMachineInput, - DeleteStateMachineOutput, DescribeActivityInput, DescribeActivityOutput, DescribeExecutionInput, @@ -94,21 +85,14 @@ import { DescribeStateMachineForExecutionOutput, DescribeStateMachineInput, DescribeStateMachineOutput, - ExecutionAbortedEventDetails, ExecutionAlreadyExists, ExecutionDoesNotExist, - ExecutionFailedEventDetails, ExecutionLimitExceeded, ExecutionListItem, - ExecutionStartedEventDetails, - ExecutionSucceededEventDetails, - ExecutionTimedOutEventDetails, GetActivityTaskInput, - GetActivityTaskOutput, GetExecutionHistoryInput, GetExecutionHistoryOutput, HistoryEvent, - HistoryEventExecutionDataDetails, InvalidArn, InvalidDefinition, InvalidExecutionInput, @@ -117,12 +101,6 @@ import { InvalidOutput, InvalidToken, InvalidTracingConfiguration, - LambdaFunctionFailedEventDetails, - LambdaFunctionScheduledEventDetails, - LambdaFunctionScheduleFailedEventDetails, - LambdaFunctionStartFailedEventDetails, - LambdaFunctionSucceededEventDetails, - LambdaFunctionTimedOutEventDetails, ListActivitiesInput, ListActivitiesOutput, ListExecutionsInput, @@ -132,30 +110,18 @@ import { ListStateMachinesInput, ListStateMachinesOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, LogDestination, LoggingConfiguration, - MapIterationEventDetails, - MapRunExecutionCounts, - MapRunFailedEventDetails, - MapRunItemCounts, MapRunListItem, - MapRunStartedEventDetails, - MapStateStartedEventDetails, MissingRequiredParameter, ResourceNotFound, SendTaskFailureInput, - SendTaskFailureOutput, SendTaskHeartbeatInput, - SendTaskHeartbeatOutput, SendTaskSuccessInput, - SendTaskSuccessOutput, StartExecutionInput, StartExecutionOutput, StartSyncExecutionInput, StartSyncExecutionOutput, - StateEnteredEventDetails, - StateExitedEventDetails, StateMachineAlreadyExists, StateMachineDeleting, StateMachineDoesNotExist, @@ -166,24 +132,12 @@ import { StopExecutionOutput, Tag, TagResourceInput, - TagResourceOutput, - TaskCredentials, TaskDoesNotExist, - TaskFailedEventDetails, - TaskScheduledEventDetails, - TaskStartedEventDetails, - TaskStartFailedEventDetails, - TaskSubmitFailedEventDetails, - TaskSubmittedEventDetails, - TaskSucceededEventDetails, TaskTimedOut, - TaskTimedOutEventDetails, TooManyTags, TracingConfiguration, UntagResourceInput, - UntagResourceOutput, UpdateMapRunInput, - UpdateMapRunOutput, UpdateStateMachineInput, UpdateStateMachineOutput, ValidationException, @@ -199,7 +153,7 @@ export const se_CreateActivityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateActivity"); let body: any; - body = JSON.stringify(se_CreateActivityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -212,7 +166,7 @@ export const se_CreateStateMachineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStateMachine"); let body: any; - body = JSON.stringify(se_CreateStateMachineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -225,7 +179,7 @@ export const se_DeleteActivityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteActivity"); let body: any; - body = JSON.stringify(se_DeleteActivityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -238,7 +192,7 @@ export const se_DeleteStateMachineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteStateMachine"); let body: any; - body = JSON.stringify(se_DeleteStateMachineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -251,7 +205,7 @@ export const se_DescribeActivityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeActivity"); let body: any; - body = JSON.stringify(se_DescribeActivityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -264,7 +218,7 @@ export const se_DescribeExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExecution"); let body: any; - body = JSON.stringify(se_DescribeExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -277,7 +231,7 @@ export const se_DescribeMapRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMapRun"); let body: any; - body = JSON.stringify(se_DescribeMapRunInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -290,7 +244,7 @@ export const se_DescribeStateMachineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStateMachine"); let body: any; - body = JSON.stringify(se_DescribeStateMachineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -303,7 +257,7 @@ export const se_DescribeStateMachineForExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStateMachineForExecution"); let body: any; - body = JSON.stringify(se_DescribeStateMachineForExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -316,7 +270,7 @@ export const se_GetActivityTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetActivityTask"); let body: any; - body = JSON.stringify(se_GetActivityTaskInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -329,7 +283,7 @@ export const se_GetExecutionHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetExecutionHistory"); let body: any; - body = JSON.stringify(se_GetExecutionHistoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -342,7 +296,7 @@ export const se_ListActivitiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListActivities"); let body: any; - body = JSON.stringify(se_ListActivitiesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -355,7 +309,7 @@ export const se_ListExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExecutions"); let body: any; - body = JSON.stringify(se_ListExecutionsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -368,7 +322,7 @@ export const se_ListMapRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMapRuns"); let body: any; - body = JSON.stringify(se_ListMapRunsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -381,7 +335,7 @@ export const se_ListStateMachinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListStateMachines"); let body: any; - body = JSON.stringify(se_ListStateMachinesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -394,7 +348,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -407,7 +361,7 @@ export const se_SendTaskFailureCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendTaskFailure"); let body: any; - body = JSON.stringify(se_SendTaskFailureInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -420,7 +374,7 @@ export const se_SendTaskHeartbeatCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendTaskHeartbeat"); let body: any; - body = JSON.stringify(se_SendTaskHeartbeatInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -433,7 +387,7 @@ export const se_SendTaskSuccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendTaskSuccess"); let body: any; - body = JSON.stringify(se_SendTaskSuccessInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -446,7 +400,7 @@ export const se_StartExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartExecution"); let body: any; - body = JSON.stringify(se_StartExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -459,7 +413,7 @@ export const se_StartSyncExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartSyncExecution"); let body: any; - body = JSON.stringify(se_StartSyncExecutionInput(input, context)); + body = JSON.stringify(_json(input)); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "sync-" + resolvedHostname; @@ -479,7 +433,7 @@ export const se_StopExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopExecution"); let body: any; - body = JSON.stringify(se_StopExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -492,7 +446,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -505,7 +459,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -531,7 +485,7 @@ export const se_UpdateStateMachineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateStateMachine"); let body: any; - body = JSON.stringify(se_UpdateStateMachineInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -552,7 +506,7 @@ export const de_CreateActivityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -579,10 +533,9 @@ const de_CreateActivityCommandError = async ( throw await de_TooManyTagsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -605,7 +558,7 @@ export const de_CreateStateMachineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -653,10 +606,9 @@ const de_CreateStateMachineCommandError = async ( throw await de_TooManyTagsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -674,12 +626,12 @@ export const de_DeleteActivityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteActivityOutput(data, context); + contents = _json(data); const response: DeleteActivityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -700,10 +652,9 @@ const de_DeleteActivityCommandError = async ( throw await de_InvalidArnRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -721,12 +672,12 @@ export const de_DeleteStateMachineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteStateMachineOutput(data, context); + contents = _json(data); const response: DeleteStateMachineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -750,10 +701,9 @@ const de_DeleteStateMachineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -776,7 +726,7 @@ export const de_DescribeActivityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -800,10 +750,9 @@ const de_DescribeActivityCommandError = async ( throw await de_InvalidArnRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -826,7 +775,7 @@ export const de_DescribeExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -850,10 +799,9 @@ const de_DescribeExecutionCommandError = async ( throw await de_InvalidArnRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -876,7 +824,7 @@ export const de_DescribeMapRunCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -900,10 +848,9 @@ const de_DescribeMapRunCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -926,7 +873,7 @@ export const de_DescribeStateMachineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -950,10 +897,9 @@ const de_DescribeStateMachineCommandError = async ( throw await de_StateMachineDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -976,7 +922,7 @@ export const de_DescribeStateMachineForExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1000,10 +946,9 @@ const de_DescribeStateMachineForExecutionCommandError = async ( throw await de_InvalidArnRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1021,12 +966,12 @@ export const de_GetActivityTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetActivityTaskOutput(data, context); + contents = _json(data); const response: GetActivityTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1053,10 +998,9 @@ const de_GetActivityTaskCommandError = async ( throw await de_InvalidArnRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1079,7 +1023,7 @@ export const de_GetExecutionHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1106,10 +1050,9 @@ const de_GetExecutionHistoryCommandError = async ( throw await de_InvalidTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1132,7 +1075,7 @@ export const de_ListActivitiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1153,10 +1096,9 @@ const de_ListActivitiesCommandError = async ( throw await de_InvalidTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1179,7 +1121,7 @@ export const de_ListExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1215,10 +1157,9 @@ const de_ListExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1241,7 +1182,7 @@ export const de_ListMapRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1268,10 +1209,9 @@ const de_ListMapRunsCommandError = async ( throw await de_InvalidTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1294,7 +1234,7 @@ export const de_ListStateMachinesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1315,10 +1255,9 @@ const de_ListStateMachinesCommandError = async ( throw await de_InvalidTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1336,12 +1275,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1365,10 +1304,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1386,12 +1324,12 @@ export const de_SendTaskFailureCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendTaskFailureOutput(data, context); + contents = _json(data); const response: SendTaskFailureCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1418,10 +1356,9 @@ const de_SendTaskFailureCommandError = async ( throw await de_TaskTimedOutRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1439,12 +1376,12 @@ export const de_SendTaskHeartbeatCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendTaskHeartbeatOutput(data, context); + contents = _json(data); const response: SendTaskHeartbeatCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1471,10 +1408,9 @@ const de_SendTaskHeartbeatCommandError = async ( throw await de_TaskTimedOutRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1492,12 +1428,12 @@ export const de_SendTaskSuccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendTaskSuccessOutput(data, context); + contents = _json(data); const response: SendTaskSuccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1527,10 +1463,9 @@ const de_SendTaskSuccessCommandError = async ( throw await de_TaskTimedOutRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1553,7 +1488,7 @@ export const de_StartExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1595,10 +1530,9 @@ const de_StartExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1621,7 +1555,7 @@ export const de_StartSyncExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1657,10 +1591,9 @@ const de_StartSyncExecutionCommandError = async ( throw await de_StateMachineTypeNotSupportedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1683,7 +1616,7 @@ export const de_StopExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1710,10 +1643,9 @@ const de_StopExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1731,12 +1663,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceOutput(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1763,10 +1695,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,12 +1715,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceOutput(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1813,10 +1744,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1834,12 +1764,12 @@ export const de_UpdateMapRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMapRunOutput(data, context); + contents = _json(data); const response: UpdateMapRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1866,10 +1796,9 @@ const de_UpdateMapRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1892,7 +1821,7 @@ export const de_UpdateStateMachineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1934,10 +1863,9 @@ const de_UpdateStateMachineCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1951,7 +1879,7 @@ const de_ActivityDoesNotExistRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActivityDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new ActivityDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1967,7 +1895,7 @@ const de_ActivityLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActivityLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ActivityLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1983,7 +1911,7 @@ const de_ActivityWorkerLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ActivityWorkerLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ActivityWorkerLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1999,7 +1927,7 @@ const de_ExecutionAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExecutionAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new ExecutionAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2015,7 +1943,7 @@ const de_ExecutionDoesNotExistRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExecutionDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new ExecutionDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2031,7 +1959,7 @@ const de_ExecutionLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ExecutionLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ExecutionLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2044,7 +1972,7 @@ const de_ExecutionLimitExceededRes = async ( */ const de_InvalidArnRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidArn(body, context); + const deserialized: any = _json(body); const exception = new InvalidArn({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2057,7 +1985,7 @@ const de_InvalidArnRes = async (parsedOutput: any, context: __SerdeContext): Pro */ const de_InvalidDefinitionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDefinition(body, context); + const deserialized: any = _json(body); const exception = new InvalidDefinition({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2073,7 +2001,7 @@ const de_InvalidExecutionInputRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidExecutionInput(body, context); + const deserialized: any = _json(body); const exception = new InvalidExecutionInput({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2089,7 +2017,7 @@ const de_InvalidLoggingConfigurationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidLoggingConfiguration(body, context); + const deserialized: any = _json(body); const exception = new InvalidLoggingConfiguration({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2102,7 +2030,7 @@ const de_InvalidLoggingConfigurationRes = async ( */ const de_InvalidNameRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidName(body, context); + const deserialized: any = _json(body); const exception = new InvalidName({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2115,7 +2043,7 @@ const de_InvalidNameRes = async (parsedOutput: any, context: __SerdeContext): Pr */ const de_InvalidOutputRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOutput(body, context); + const deserialized: any = _json(body); const exception = new InvalidOutput({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2128,7 +2056,7 @@ const de_InvalidOutputRes = async (parsedOutput: any, context: __SerdeContext): */ const de_InvalidTokenRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidToken(body, context); + const deserialized: any = _json(body); const exception = new InvalidToken({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2144,7 +2072,7 @@ const de_InvalidTracingConfigurationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTracingConfiguration(body, context); + const deserialized: any = _json(body); const exception = new InvalidTracingConfiguration({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2160,7 +2088,7 @@ const de_MissingRequiredParameterRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingRequiredParameter(body, context); + const deserialized: any = _json(body); const exception = new MissingRequiredParameter({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2173,7 +2101,7 @@ const de_MissingRequiredParameterRes = async ( */ const de_ResourceNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFound(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2189,7 +2117,7 @@ const de_StateMachineAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StateMachineAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new StateMachineAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2205,7 +2133,7 @@ const de_StateMachineDeletingRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StateMachineDeleting(body, context); + const deserialized: any = _json(body); const exception = new StateMachineDeleting({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2221,7 +2149,7 @@ const de_StateMachineDoesNotExistRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StateMachineDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new StateMachineDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2237,7 +2165,7 @@ const de_StateMachineLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StateMachineLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new StateMachineLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2253,7 +2181,7 @@ const de_StateMachineTypeNotSupportedRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StateMachineTypeNotSupported(body, context); + const deserialized: any = _json(body); const exception = new StateMachineTypeNotSupported({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2266,7 +2194,7 @@ const de_StateMachineTypeNotSupportedRes = async ( */ const de_TaskDoesNotExistRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TaskDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new TaskDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2279,7 +2207,7 @@ const de_TaskDoesNotExistRes = async (parsedOutput: any, context: __SerdeContext */ const de_TaskTimedOutRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TaskTimedOut(body, context); + const deserialized: any = _json(body); const exception = new TaskTimedOut({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2292,7 +2220,7 @@ const de_TaskTimedOutRes = async (parsedOutput: any, context: __SerdeContext): P */ const de_TooManyTagsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTags(body, context); + const deserialized: any = _json(body); const exception = new TooManyTags({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2305,7 +2233,7 @@ const de_TooManyTagsRes = async (parsedOutput: any, context: __SerdeContext): Pr */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2313,403 +2241,89 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0CloudWatchLogsLogGroup - */ -const se_CloudWatchLogsLogGroup = (input: CloudWatchLogsLogGroup, context: __SerdeContext): any => { - return { - ...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }), - }; -}; +// se_CloudWatchLogsLogGroup omitted. -/** - * serializeAws_json1_0CreateActivityInput - */ -const se_CreateActivityInput = (input: CreateActivityInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_CreateActivityInput omitted. -/** - * serializeAws_json1_0CreateStateMachineInput - */ -const se_CreateStateMachineInput = (input: CreateStateMachineInput, context: __SerdeContext): any => { - return { - ...(input.definition != null && { definition: input.definition }), - ...(input.loggingConfiguration != null && { - loggingConfiguration: se_LoggingConfiguration(input.loggingConfiguration, context), - }), - ...(input.name != null && { name: input.name }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.tracingConfiguration != null && { - tracingConfiguration: se_TracingConfiguration(input.tracingConfiguration, context), - }), - ...(input.type != null && { type: input.type }), - }; -}; +// se_CreateStateMachineInput omitted. -/** - * serializeAws_json1_0DeleteActivityInput - */ -const se_DeleteActivityInput = (input: DeleteActivityInput, context: __SerdeContext): any => { - return { - ...(input.activityArn != null && { activityArn: input.activityArn }), - }; -}; +// se_DeleteActivityInput omitted. -/** - * serializeAws_json1_0DeleteStateMachineInput - */ -const se_DeleteStateMachineInput = (input: DeleteStateMachineInput, context: __SerdeContext): any => { - return { - ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }), - }; -}; +// se_DeleteStateMachineInput omitted. -/** - * serializeAws_json1_0DescribeActivityInput - */ -const se_DescribeActivityInput = (input: DescribeActivityInput, context: __SerdeContext): any => { - return { - ...(input.activityArn != null && { activityArn: input.activityArn }), - }; -}; +// se_DescribeActivityInput omitted. -/** - * serializeAws_json1_0DescribeExecutionInput - */ -const se_DescribeExecutionInput = (input: DescribeExecutionInput, context: __SerdeContext): any => { - return { - ...(input.executionArn != null && { executionArn: input.executionArn }), - }; -}; +// se_DescribeExecutionInput omitted. -/** - * serializeAws_json1_0DescribeMapRunInput - */ -const se_DescribeMapRunInput = (input: DescribeMapRunInput, context: __SerdeContext): any => { - return { - ...(input.mapRunArn != null && { mapRunArn: input.mapRunArn }), - }; -}; +// se_DescribeMapRunInput omitted. -/** - * serializeAws_json1_0DescribeStateMachineForExecutionInput - */ -const se_DescribeStateMachineForExecutionInput = ( - input: DescribeStateMachineForExecutionInput, - context: __SerdeContext -): any => { - return { - ...(input.executionArn != null && { executionArn: input.executionArn }), - }; -}; +// se_DescribeStateMachineForExecutionInput omitted. -/** - * serializeAws_json1_0DescribeStateMachineInput - */ -const se_DescribeStateMachineInput = (input: DescribeStateMachineInput, context: __SerdeContext): any => { - return { - ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }), - }; -}; +// se_DescribeStateMachineInput omitted. -/** - * serializeAws_json1_0GetActivityTaskInput - */ -const se_GetActivityTaskInput = (input: GetActivityTaskInput, context: __SerdeContext): any => { - return { - ...(input.activityArn != null && { activityArn: input.activityArn }), - ...(input.workerName != null && { workerName: input.workerName }), - }; -}; +// se_GetActivityTaskInput omitted. -/** - * serializeAws_json1_0GetExecutionHistoryInput - */ -const se_GetExecutionHistoryInput = (input: GetExecutionHistoryInput, context: __SerdeContext): any => { - return { - ...(input.executionArn != null && { executionArn: input.executionArn }), - ...(input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - }; -}; +// se_GetExecutionHistoryInput omitted. -/** - * serializeAws_json1_0ListActivitiesInput - */ -const se_ListActivitiesInput = (input: ListActivitiesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListActivitiesInput omitted. -/** - * serializeAws_json1_0ListExecutionsInput - */ -const se_ListExecutionsInput = (input: ListExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.mapRunArn != null && { mapRunArn: input.mapRunArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }), - ...(input.statusFilter != null && { statusFilter: input.statusFilter }), - }; -}; +// se_ListExecutionsInput omitted. -/** - * serializeAws_json1_0ListMapRunsInput - */ -const se_ListMapRunsInput = (input: ListMapRunsInput, context: __SerdeContext): any => { - return { - ...(input.executionArn != null && { executionArn: input.executionArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListMapRunsInput omitted. -/** - * serializeAws_json1_0ListStateMachinesInput - */ -const se_ListStateMachinesInput = (input: ListStateMachinesInput, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListStateMachinesInput omitted. -/** - * serializeAws_json1_0ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_0LogDestination - */ -const se_LogDestination = (input: LogDestination, context: __SerdeContext): any => { - return { - ...(input.cloudWatchLogsLogGroup != null && { - cloudWatchLogsLogGroup: se_CloudWatchLogsLogGroup(input.cloudWatchLogsLogGroup, context), - }), - }; -}; +// se_LogDestination omitted. -/** - * serializeAws_json1_0LogDestinationList - */ -const se_LogDestinationList = (input: LogDestination[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LogDestination(entry, context); - }); -}; +// se_LogDestinationList omitted. -/** - * serializeAws_json1_0LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.destinations != null && { destinations: se_LogDestinationList(input.destinations, context) }), - ...(input.includeExecutionData != null && { includeExecutionData: input.includeExecutionData }), - ...(input.level != null && { level: input.level }), - }; -}; +// se_LoggingConfiguration omitted. -/** - * serializeAws_json1_0SendTaskFailureInput - */ -const se_SendTaskFailureInput = (input: SendTaskFailureInput, context: __SerdeContext): any => { - return { - ...(input.cause != null && { cause: input.cause }), - ...(input.error != null && { error: input.error }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_SendTaskFailureInput omitted. -/** - * serializeAws_json1_0SendTaskHeartbeatInput - */ -const se_SendTaskHeartbeatInput = (input: SendTaskHeartbeatInput, context: __SerdeContext): any => { - return { - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_SendTaskHeartbeatInput omitted. -/** - * serializeAws_json1_0SendTaskSuccessInput - */ -const se_SendTaskSuccessInput = (input: SendTaskSuccessInput, context: __SerdeContext): any => { - return { - ...(input.output != null && { output: input.output }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_SendTaskSuccessInput omitted. -/** - * serializeAws_json1_0StartExecutionInput - */ -const se_StartExecutionInput = (input: StartExecutionInput, context: __SerdeContext): any => { - return { - ...(input.input != null && { input: input.input }), - ...(input.name != null && { name: input.name }), - ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }), - ...(input.traceHeader != null && { traceHeader: input.traceHeader }), - }; -}; +// se_StartExecutionInput omitted. -/** - * serializeAws_json1_0StartSyncExecutionInput - */ -const se_StartSyncExecutionInput = (input: StartSyncExecutionInput, context: __SerdeContext): any => { - return { - ...(input.input != null && { input: input.input }), - ...(input.name != null && { name: input.name }), - ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }), - ...(input.traceHeader != null && { traceHeader: input.traceHeader }), - }; -}; +// se_StartSyncExecutionInput omitted. -/** - * serializeAws_json1_0StopExecutionInput - */ -const se_StopExecutionInput = (input: StopExecutionInput, context: __SerdeContext): any => { - return { - ...(input.cause != null && { cause: input.cause }), - ...(input.error != null && { error: input.error }), - ...(input.executionArn != null && { executionArn: input.executionArn }), - }; -}; +// se_StopExecutionInput omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }; -}; +// se_TagResourceInput omitted. -/** - * serializeAws_json1_0TracingConfiguration - */ -const se_TracingConfiguration = (input: TracingConfiguration, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - }; -}; +// se_TracingConfiguration omitted. -/** - * serializeAws_json1_0UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_TagKeyList(input.tagKeys, context) }), - }; -}; +// se_UntagResourceInput omitted. /** * serializeAws_json1_0UpdateMapRunInput */ const se_UpdateMapRunInput = (input: UpdateMapRunInput, context: __SerdeContext): any => { - return { - ...(input.mapRunArn != null && { mapRunArn: input.mapRunArn }), - ...(input.maxConcurrency != null && { maxConcurrency: input.maxConcurrency }), - ...(input.toleratedFailureCount != null && { toleratedFailureCount: input.toleratedFailureCount }), - ...(input.toleratedFailurePercentage != null && { - toleratedFailurePercentage: __serializeFloat(input.toleratedFailurePercentage), - }), - }; + return take(input, { + mapRunArn: [], + maxConcurrency: [], + toleratedFailureCount: [], + toleratedFailurePercentage: __serializeFloat, + }); }; -/** - * serializeAws_json1_0UpdateStateMachineInput - */ -const se_UpdateStateMachineInput = (input: UpdateStateMachineInput, context: __SerdeContext): any => { - return { - ...(input.definition != null && { definition: input.definition }), - ...(input.loggingConfiguration != null && { - loggingConfiguration: se_LoggingConfiguration(input.loggingConfiguration, context), - }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.stateMachineArn != null && { stateMachineArn: input.stateMachineArn }), - ...(input.tracingConfiguration != null && { - tracingConfiguration: se_TracingConfiguration(input.tracingConfiguration, context), - }), - }; -}; +// se_UpdateStateMachineInput omitted. -/** - * deserializeAws_json1_0ActivityDoesNotExist - */ -const de_ActivityDoesNotExist = (output: any, context: __SerdeContext): ActivityDoesNotExist => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActivityDoesNotExist omitted. -/** - * deserializeAws_json1_0ActivityFailedEventDetails - */ -const de_ActivityFailedEventDetails = (output: any, context: __SerdeContext): ActivityFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; +// de_ActivityFailedEventDetails omitted. -/** - * deserializeAws_json1_0ActivityLimitExceeded - */ -const de_ActivityLimitExceeded = (output: any, context: __SerdeContext): ActivityLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActivityLimitExceeded omitted. /** * deserializeAws_json1_0ActivityList @@ -2718,9 +2332,6 @@ const de_ActivityList = (output: any, context: __SerdeContext): ActivityListItem const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ActivityListItem(entry, context); }); return retVal; @@ -2730,863 +2341,344 @@ const de_ActivityList = (output: any, context: __SerdeContext): ActivityListItem * deserializeAws_json1_0ActivityListItem */ const de_ActivityListItem = (output: any, context: __SerdeContext): ActivityListItem => { - return { - activityArn: __expectString(output.activityArn), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_0ActivityScheduledEventDetails - */ -const de_ActivityScheduledEventDetails = (output: any, context: __SerdeContext): ActivityScheduledEventDetails => { - return { - heartbeatInSeconds: __expectLong(output.heartbeatInSeconds), - input: __expectString(output.input), - inputDetails: - output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined, - resource: __expectString(output.resource), - timeoutInSeconds: __expectLong(output.timeoutInSeconds), - } as any; -}; - -/** - * deserializeAws_json1_0ActivityScheduleFailedEventDetails - */ -const de_ActivityScheduleFailedEventDetails = ( - output: any, - context: __SerdeContext -): ActivityScheduleFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; - -/** - * deserializeAws_json1_0ActivityStartedEventDetails - */ -const de_ActivityStartedEventDetails = (output: any, context: __SerdeContext): ActivityStartedEventDetails => { - return { - workerName: __expectString(output.workerName), - } as any; -}; - -/** - * deserializeAws_json1_0ActivitySucceededEventDetails - */ -const de_ActivitySucceededEventDetails = (output: any, context: __SerdeContext): ActivitySucceededEventDetails => { - return { - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ActivityTimedOutEventDetails - */ -const de_ActivityTimedOutEventDetails = (output: any, context: __SerdeContext): ActivityTimedOutEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; - -/** - * deserializeAws_json1_0ActivityWorkerLimitExceeded - */ -const de_ActivityWorkerLimitExceeded = (output: any, context: __SerdeContext): ActivityWorkerLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0BillingDetails - */ -const de_BillingDetails = (output: any, context: __SerdeContext): BillingDetails => { - return { - billedDurationInMilliseconds: __expectLong(output.billedDurationInMilliseconds), - billedMemoryUsedInMB: __expectLong(output.billedMemoryUsedInMB), - } as any; -}; - -/** - * deserializeAws_json1_0CloudWatchEventsExecutionDataDetails - */ -const de_CloudWatchEventsExecutionDataDetails = ( - output: any, - context: __SerdeContext -): CloudWatchEventsExecutionDataDetails => { - return { - included: __expectBoolean(output.included), - } as any; -}; - -/** - * deserializeAws_json1_0CloudWatchLogsLogGroup - */ -const de_CloudWatchLogsLogGroup = (output: any, context: __SerdeContext): CloudWatchLogsLogGroup => { - return { - logGroupArn: __expectString(output.logGroupArn), - } as any; -}; - -/** - * deserializeAws_json1_0CreateActivityOutput - */ -const de_CreateActivityOutput = (output: any, context: __SerdeContext): CreateActivityOutput => { - return { - activityArn: __expectString(output.activityArn), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0CreateStateMachineOutput - */ -const de_CreateStateMachineOutput = (output: any, context: __SerdeContext): CreateStateMachineOutput => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - stateMachineArn: __expectString(output.stateMachineArn), - } as any; -}; - -/** - * deserializeAws_json1_0DeleteActivityOutput - */ -const de_DeleteActivityOutput = (output: any, context: __SerdeContext): DeleteActivityOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_0DeleteStateMachineOutput - */ -const de_DeleteStateMachineOutput = (output: any, context: __SerdeContext): DeleteStateMachineOutput => { - return {} as any; -}; - -/** - * deserializeAws_json1_0DescribeActivityOutput - */ -const de_DescribeActivityOutput = (output: any, context: __SerdeContext): DescribeActivityOutput => { - return { - activityArn: __expectString(output.activityArn), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - name: __expectString(output.name), - } as any; -}; - -/** - * deserializeAws_json1_0DescribeExecutionOutput - */ -const de_DescribeExecutionOutput = (output: any, context: __SerdeContext): DescribeExecutionOutput => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - executionArn: __expectString(output.executionArn), - input: __expectString(output.input), - inputDetails: - output.inputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.inputDetails, context) : undefined, - mapRunArn: __expectString(output.mapRunArn), - name: __expectString(output.name), - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.outputDetails, context) : undefined, - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - stateMachineArn: __expectString(output.stateMachineArn), - status: __expectString(output.status), - stopDate: - output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined, - traceHeader: __expectString(output.traceHeader), - } as any; -}; - -/** - * deserializeAws_json1_0DescribeMapRunOutput - */ -const de_DescribeMapRunOutput = (output: any, context: __SerdeContext): DescribeMapRunOutput => { - return { - executionArn: __expectString(output.executionArn), - executionCounts: - output.executionCounts != null ? de_MapRunExecutionCounts(output.executionCounts, context) : undefined, - itemCounts: output.itemCounts != null ? de_MapRunItemCounts(output.itemCounts, context) : undefined, - mapRunArn: __expectString(output.mapRunArn), - maxConcurrency: __expectInt32(output.maxConcurrency), - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - status: __expectString(output.status), - stopDate: - output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined, - toleratedFailureCount: __expectLong(output.toleratedFailureCount), - toleratedFailurePercentage: __limitedParseFloat32(output.toleratedFailurePercentage), - } as any; -}; - -/** - * deserializeAws_json1_0DescribeStateMachineForExecutionOutput - */ -const de_DescribeStateMachineForExecutionOutput = ( - output: any, - context: __SerdeContext -): DescribeStateMachineForExecutionOutput => { - return { - definition: __expectString(output.definition), - label: __expectString(output.label), - loggingConfiguration: - output.loggingConfiguration != null ? de_LoggingConfiguration(output.loggingConfiguration, context) : undefined, - mapRunArn: __expectString(output.mapRunArn), - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - stateMachineArn: __expectString(output.stateMachineArn), - tracingConfiguration: - output.tracingConfiguration != null ? de_TracingConfiguration(output.tracingConfiguration, context) : undefined, - updateDate: - output.updateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DescribeStateMachineOutput - */ -const de_DescribeStateMachineOutput = (output: any, context: __SerdeContext): DescribeStateMachineOutput => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - definition: __expectString(output.definition), - label: __expectString(output.label), - loggingConfiguration: - output.loggingConfiguration != null ? de_LoggingConfiguration(output.loggingConfiguration, context) : undefined, - name: __expectString(output.name), - roleArn: __expectString(output.roleArn), - stateMachineArn: __expectString(output.stateMachineArn), - status: __expectString(output.status), - tracingConfiguration: - output.tracingConfiguration != null ? de_TracingConfiguration(output.tracingConfiguration, context) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_0ExecutionAbortedEventDetails - */ -const de_ExecutionAbortedEventDetails = (output: any, context: __SerdeContext): ExecutionAbortedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; - -/** - * deserializeAws_json1_0ExecutionAlreadyExists - */ -const de_ExecutionAlreadyExists = (output: any, context: __SerdeContext): ExecutionAlreadyExists => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + activityArn: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ExecutionDoesNotExist - */ -const de_ExecutionDoesNotExist = (output: any, context: __SerdeContext): ExecutionDoesNotExist => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActivityScheduledEventDetails omitted. -/** - * deserializeAws_json1_0ExecutionFailedEventDetails - */ -const de_ExecutionFailedEventDetails = (output: any, context: __SerdeContext): ExecutionFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; +// de_ActivityScheduleFailedEventDetails omitted. -/** - * deserializeAws_json1_0ExecutionLimitExceeded - */ -const de_ExecutionLimitExceeded = (output: any, context: __SerdeContext): ExecutionLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActivityStartedEventDetails omitted. -/** - * deserializeAws_json1_0ExecutionList - */ -const de_ExecutionList = (output: any, context: __SerdeContext): ExecutionListItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutionListItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0ExecutionListItem - */ -const de_ExecutionListItem = (output: any, context: __SerdeContext): ExecutionListItem => { - return { - executionArn: __expectString(output.executionArn), - itemCount: __expectInt32(output.itemCount), - mapRunArn: __expectString(output.mapRunArn), - name: __expectString(output.name), - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - stateMachineArn: __expectString(output.stateMachineArn), - status: __expectString(output.status), - stopDate: - output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined, - } as any; -}; +// de_ActivitySucceededEventDetails omitted. -/** - * deserializeAws_json1_0ExecutionStartedEventDetails - */ -const de_ExecutionStartedEventDetails = (output: any, context: __SerdeContext): ExecutionStartedEventDetails => { - return { - input: __expectString(output.input), - inputDetails: - output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined, - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_ActivityTimedOutEventDetails omitted. -/** - * deserializeAws_json1_0ExecutionSucceededEventDetails - */ -const de_ExecutionSucceededEventDetails = (output: any, context: __SerdeContext): ExecutionSucceededEventDetails => { - return { - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined, - } as any; -}; +// de_ActivityWorkerLimitExceeded omitted. -/** - * deserializeAws_json1_0ExecutionTimedOutEventDetails - */ -const de_ExecutionTimedOutEventDetails = (output: any, context: __SerdeContext): ExecutionTimedOutEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; +// de_BillingDetails omitted. -/** - * deserializeAws_json1_0GetActivityTaskOutput - */ -const de_GetActivityTaskOutput = (output: any, context: __SerdeContext): GetActivityTaskOutput => { - return { - input: __expectString(output.input), - taskToken: __expectString(output.taskToken), - } as any; -}; +// de_CloudWatchEventsExecutionDataDetails omitted. -/** - * deserializeAws_json1_0GetExecutionHistoryOutput - */ -const de_GetExecutionHistoryOutput = (output: any, context: __SerdeContext): GetExecutionHistoryOutput => { - return { - events: output.events != null ? de_HistoryEventList(output.events, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; - -/** - * deserializeAws_json1_0HistoryEvent - */ -const de_HistoryEvent = (output: any, context: __SerdeContext): HistoryEvent => { - return { - activityFailedEventDetails: - output.activityFailedEventDetails != null - ? de_ActivityFailedEventDetails(output.activityFailedEventDetails, context) - : undefined, - activityScheduleFailedEventDetails: - output.activityScheduleFailedEventDetails != null - ? de_ActivityScheduleFailedEventDetails(output.activityScheduleFailedEventDetails, context) - : undefined, - activityScheduledEventDetails: - output.activityScheduledEventDetails != null - ? de_ActivityScheduledEventDetails(output.activityScheduledEventDetails, context) - : undefined, - activityStartedEventDetails: - output.activityStartedEventDetails != null - ? de_ActivityStartedEventDetails(output.activityStartedEventDetails, context) - : undefined, - activitySucceededEventDetails: - output.activitySucceededEventDetails != null - ? de_ActivitySucceededEventDetails(output.activitySucceededEventDetails, context) - : undefined, - activityTimedOutEventDetails: - output.activityTimedOutEventDetails != null - ? de_ActivityTimedOutEventDetails(output.activityTimedOutEventDetails, context) - : undefined, - executionAbortedEventDetails: - output.executionAbortedEventDetails != null - ? de_ExecutionAbortedEventDetails(output.executionAbortedEventDetails, context) - : undefined, - executionFailedEventDetails: - output.executionFailedEventDetails != null - ? de_ExecutionFailedEventDetails(output.executionFailedEventDetails, context) - : undefined, - executionStartedEventDetails: - output.executionStartedEventDetails != null - ? de_ExecutionStartedEventDetails(output.executionStartedEventDetails, context) - : undefined, - executionSucceededEventDetails: - output.executionSucceededEventDetails != null - ? de_ExecutionSucceededEventDetails(output.executionSucceededEventDetails, context) - : undefined, - executionTimedOutEventDetails: - output.executionTimedOutEventDetails != null - ? de_ExecutionTimedOutEventDetails(output.executionTimedOutEventDetails, context) - : undefined, - id: __expectLong(output.id), - lambdaFunctionFailedEventDetails: - output.lambdaFunctionFailedEventDetails != null - ? de_LambdaFunctionFailedEventDetails(output.lambdaFunctionFailedEventDetails, context) - : undefined, - lambdaFunctionScheduleFailedEventDetails: - output.lambdaFunctionScheduleFailedEventDetails != null - ? de_LambdaFunctionScheduleFailedEventDetails(output.lambdaFunctionScheduleFailedEventDetails, context) - : undefined, - lambdaFunctionScheduledEventDetails: - output.lambdaFunctionScheduledEventDetails != null - ? de_LambdaFunctionScheduledEventDetails(output.lambdaFunctionScheduledEventDetails, context) - : undefined, - lambdaFunctionStartFailedEventDetails: - output.lambdaFunctionStartFailedEventDetails != null - ? de_LambdaFunctionStartFailedEventDetails(output.lambdaFunctionStartFailedEventDetails, context) - : undefined, - lambdaFunctionSucceededEventDetails: - output.lambdaFunctionSucceededEventDetails != null - ? de_LambdaFunctionSucceededEventDetails(output.lambdaFunctionSucceededEventDetails, context) - : undefined, - lambdaFunctionTimedOutEventDetails: - output.lambdaFunctionTimedOutEventDetails != null - ? de_LambdaFunctionTimedOutEventDetails(output.lambdaFunctionTimedOutEventDetails, context) - : undefined, - mapIterationAbortedEventDetails: - output.mapIterationAbortedEventDetails != null - ? de_MapIterationEventDetails(output.mapIterationAbortedEventDetails, context) - : undefined, - mapIterationFailedEventDetails: - output.mapIterationFailedEventDetails != null - ? de_MapIterationEventDetails(output.mapIterationFailedEventDetails, context) - : undefined, - mapIterationStartedEventDetails: - output.mapIterationStartedEventDetails != null - ? de_MapIterationEventDetails(output.mapIterationStartedEventDetails, context) - : undefined, - mapIterationSucceededEventDetails: - output.mapIterationSucceededEventDetails != null - ? de_MapIterationEventDetails(output.mapIterationSucceededEventDetails, context) - : undefined, - mapRunFailedEventDetails: - output.mapRunFailedEventDetails != null - ? de_MapRunFailedEventDetails(output.mapRunFailedEventDetails, context) - : undefined, - mapRunStartedEventDetails: - output.mapRunStartedEventDetails != null - ? de_MapRunStartedEventDetails(output.mapRunStartedEventDetails, context) - : undefined, - mapStateStartedEventDetails: - output.mapStateStartedEventDetails != null - ? de_MapStateStartedEventDetails(output.mapStateStartedEventDetails, context) - : undefined, - previousEventId: __expectLong(output.previousEventId), - stateEnteredEventDetails: - output.stateEnteredEventDetails != null - ? de_StateEnteredEventDetails(output.stateEnteredEventDetails, context) - : undefined, - stateExitedEventDetails: - output.stateExitedEventDetails != null - ? de_StateExitedEventDetails(output.stateExitedEventDetails, context) - : undefined, - taskFailedEventDetails: - output.taskFailedEventDetails != null - ? de_TaskFailedEventDetails(output.taskFailedEventDetails, context) - : undefined, - taskScheduledEventDetails: - output.taskScheduledEventDetails != null - ? de_TaskScheduledEventDetails(output.taskScheduledEventDetails, context) - : undefined, - taskStartFailedEventDetails: - output.taskStartFailedEventDetails != null - ? de_TaskStartFailedEventDetails(output.taskStartFailedEventDetails, context) - : undefined, - taskStartedEventDetails: - output.taskStartedEventDetails != null - ? de_TaskStartedEventDetails(output.taskStartedEventDetails, context) - : undefined, - taskSubmitFailedEventDetails: - output.taskSubmitFailedEventDetails != null - ? de_TaskSubmitFailedEventDetails(output.taskSubmitFailedEventDetails, context) - : undefined, - taskSubmittedEventDetails: - output.taskSubmittedEventDetails != null - ? de_TaskSubmittedEventDetails(output.taskSubmittedEventDetails, context) - : undefined, - taskSucceededEventDetails: - output.taskSucceededEventDetails != null - ? de_TaskSucceededEventDetails(output.taskSucceededEventDetails, context) - : undefined, - taskTimedOutEventDetails: - output.taskTimedOutEventDetails != null - ? de_TaskTimedOutEventDetails(output.taskTimedOutEventDetails, context) - : undefined, - timestamp: - output.timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.timestamp))) : undefined, - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_0HistoryEventExecutionDataDetails - */ -const de_HistoryEventExecutionDataDetails = ( - output: any, - context: __SerdeContext -): HistoryEventExecutionDataDetails => { - return { - truncated: __expectBoolean(output.truncated), - } as any; -}; - -/** - * deserializeAws_json1_0HistoryEventList - */ -const de_HistoryEventList = (output: any, context: __SerdeContext): HistoryEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HistoryEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0InvalidArn - */ -const de_InvalidArn = (output: any, context: __SerdeContext): InvalidArn => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0InvalidDefinition - */ -const de_InvalidDefinition = (output: any, context: __SerdeContext): InvalidDefinition => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0InvalidExecutionInput - */ -const de_InvalidExecutionInput = (output: any, context: __SerdeContext): InvalidExecutionInput => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0InvalidLoggingConfiguration - */ -const de_InvalidLoggingConfiguration = (output: any, context: __SerdeContext): InvalidLoggingConfiguration => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0InvalidName - */ -const de_InvalidName = (output: any, context: __SerdeContext): InvalidName => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CloudWatchLogsLogGroup omitted. /** - * deserializeAws_json1_0InvalidOutput + * deserializeAws_json1_0CreateActivityOutput */ -const de_InvalidOutput = (output: any, context: __SerdeContext): InvalidOutput => { - return { - message: __expectString(output.message), - } as any; +const de_CreateActivityOutput = (output: any, context: __SerdeContext): CreateActivityOutput => { + return take(output, { + activityArn: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_0InvalidToken + * deserializeAws_json1_0CreateStateMachineOutput */ -const de_InvalidToken = (output: any, context: __SerdeContext): InvalidToken => { - return { - message: __expectString(output.message), - } as any; +const de_CreateStateMachineOutput = (output: any, context: __SerdeContext): CreateStateMachineOutput => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateMachineArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0InvalidTracingConfiguration - */ -const de_InvalidTracingConfiguration = (output: any, context: __SerdeContext): InvalidTracingConfiguration => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DeleteActivityOutput omitted. -/** - * deserializeAws_json1_0LambdaFunctionFailedEventDetails - */ -const de_LambdaFunctionFailedEventDetails = ( - output: any, - context: __SerdeContext -): LambdaFunctionFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; -}; +// de_DeleteStateMachineOutput omitted. /** - * deserializeAws_json1_0LambdaFunctionScheduledEventDetails + * deserializeAws_json1_0DescribeActivityOutput */ -const de_LambdaFunctionScheduledEventDetails = ( - output: any, - context: __SerdeContext -): LambdaFunctionScheduledEventDetails => { - return { - input: __expectString(output.input), - inputDetails: - output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined, - resource: __expectString(output.resource), - taskCredentials: output.taskCredentials != null ? de_TaskCredentials(output.taskCredentials, context) : undefined, - timeoutInSeconds: __expectLong(output.timeoutInSeconds), - } as any; +const de_DescribeActivityOutput = (output: any, context: __SerdeContext): DescribeActivityOutput => { + return take(output, { + activityArn: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + }) as any; }; /** - * deserializeAws_json1_0LambdaFunctionScheduleFailedEventDetails + * deserializeAws_json1_0DescribeExecutionOutput */ -const de_LambdaFunctionScheduleFailedEventDetails = ( - output: any, - context: __SerdeContext -): LambdaFunctionScheduleFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; +const de_DescribeExecutionOutput = (output: any, context: __SerdeContext): DescribeExecutionOutput => { + return take(output, { + cause: __expectString, + error: __expectString, + executionArn: __expectString, + input: __expectString, + inputDetails: _json, + mapRunArn: __expectString, + name: __expectString, + output: __expectString, + outputDetails: _json, + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateMachineArn: __expectString, + status: __expectString, + stopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + traceHeader: __expectString, + }) as any; }; /** - * deserializeAws_json1_0LambdaFunctionStartFailedEventDetails + * deserializeAws_json1_0DescribeMapRunOutput */ -const de_LambdaFunctionStartFailedEventDetails = ( - output: any, - context: __SerdeContext -): LambdaFunctionStartFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; +const de_DescribeMapRunOutput = (output: any, context: __SerdeContext): DescribeMapRunOutput => { + return take(output, { + executionArn: __expectString, + executionCounts: _json, + itemCounts: _json, + mapRunArn: __expectString, + maxConcurrency: __expectInt32, + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + stopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + toleratedFailureCount: __expectLong, + toleratedFailurePercentage: __limitedParseFloat32, + }) as any; }; /** - * deserializeAws_json1_0LambdaFunctionSucceededEventDetails + * deserializeAws_json1_0DescribeStateMachineForExecutionOutput */ -const de_LambdaFunctionSucceededEventDetails = ( +const de_DescribeStateMachineForExecutionOutput = ( output: any, context: __SerdeContext -): LambdaFunctionSucceededEventDetails => { - return { - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined, - } as any; +): DescribeStateMachineForExecutionOutput => { + return take(output, { + definition: __expectString, + label: __expectString, + loggingConfiguration: _json, + mapRunArn: __expectString, + name: __expectString, + roleArn: __expectString, + stateMachineArn: __expectString, + tracingConfiguration: _json, + updateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_0LambdaFunctionTimedOutEventDetails + * deserializeAws_json1_0DescribeStateMachineOutput */ -const de_LambdaFunctionTimedOutEventDetails = ( - output: any, - context: __SerdeContext -): LambdaFunctionTimedOutEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; +const de_DescribeStateMachineOutput = (output: any, context: __SerdeContext): DescribeStateMachineOutput => { + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + definition: __expectString, + label: __expectString, + loggingConfiguration: _json, + name: __expectString, + roleArn: __expectString, + stateMachineArn: __expectString, + status: __expectString, + tracingConfiguration: _json, + type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0ListActivitiesOutput - */ -const de_ListActivitiesOutput = (output: any, context: __SerdeContext): ListActivitiesOutput => { - return { - activities: output.activities != null ? de_ActivityList(output.activities, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ExecutionAbortedEventDetails omitted. -/** - * deserializeAws_json1_0ListExecutionsOutput - */ -const de_ListExecutionsOutput = (output: any, context: __SerdeContext): ListExecutionsOutput => { - return { - executions: output.executions != null ? de_ExecutionList(output.executions, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_ExecutionAlreadyExists omitted. + +// de_ExecutionDoesNotExist omitted. + +// de_ExecutionFailedEventDetails omitted. + +// de_ExecutionLimitExceeded omitted. /** - * deserializeAws_json1_0ListMapRunsOutput + * deserializeAws_json1_0ExecutionList */ -const de_ListMapRunsOutput = (output: any, context: __SerdeContext): ListMapRunsOutput => { - return { - mapRuns: output.mapRuns != null ? de_MapRunList(output.mapRuns, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; +const de_ExecutionList = (output: any, context: __SerdeContext): ExecutionListItem[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ExecutionListItem(entry, context); + }); + return retVal; }; /** - * deserializeAws_json1_0ListStateMachinesOutput + * deserializeAws_json1_0ExecutionListItem */ -const de_ListStateMachinesOutput = (output: any, context: __SerdeContext): ListStateMachinesOutput => { - return { - nextToken: __expectString(output.nextToken), - stateMachines: output.stateMachines != null ? de_StateMachineList(output.stateMachines, context) : undefined, - } as any; +const de_ExecutionListItem = (output: any, context: __SerdeContext): ExecutionListItem => { + return take(output, { + executionArn: __expectString, + itemCount: __expectInt32, + mapRunArn: __expectString, + name: __expectString, + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateMachineArn: __expectString, + status: __expectString, + stopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_ExecutionStartedEventDetails omitted. + +// de_ExecutionSucceededEventDetails omitted. + +// de_ExecutionTimedOutEventDetails omitted. + +// de_GetActivityTaskOutput omitted. + /** - * deserializeAws_json1_0ListTagsForResourceOutput + * deserializeAws_json1_0GetExecutionHistoryOutput */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - tags: output.tags != null ? de_TagList(output.tags, context) : undefined, - } as any; +const de_GetExecutionHistoryOutput = (output: any, context: __SerdeContext): GetExecutionHistoryOutput => { + return take(output, { + events: (_: any) => de_HistoryEventList(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0LogDestination + * deserializeAws_json1_0HistoryEvent */ -const de_LogDestination = (output: any, context: __SerdeContext): LogDestination => { - return { - cloudWatchLogsLogGroup: - output.cloudWatchLogsLogGroup != null - ? de_CloudWatchLogsLogGroup(output.cloudWatchLogsLogGroup, context) - : undefined, - } as any; -}; +const de_HistoryEvent = (output: any, context: __SerdeContext): HistoryEvent => { + return take(output, { + activityFailedEventDetails: _json, + activityScheduleFailedEventDetails: _json, + activityScheduledEventDetails: _json, + activityStartedEventDetails: _json, + activitySucceededEventDetails: _json, + activityTimedOutEventDetails: _json, + executionAbortedEventDetails: _json, + executionFailedEventDetails: _json, + executionStartedEventDetails: _json, + executionSucceededEventDetails: _json, + executionTimedOutEventDetails: _json, + id: __expectLong, + lambdaFunctionFailedEventDetails: _json, + lambdaFunctionScheduleFailedEventDetails: _json, + lambdaFunctionScheduledEventDetails: _json, + lambdaFunctionStartFailedEventDetails: _json, + lambdaFunctionSucceededEventDetails: _json, + lambdaFunctionTimedOutEventDetails: _json, + mapIterationAbortedEventDetails: _json, + mapIterationFailedEventDetails: _json, + mapIterationStartedEventDetails: _json, + mapIterationSucceededEventDetails: _json, + mapRunFailedEventDetails: _json, + mapRunStartedEventDetails: _json, + mapStateStartedEventDetails: _json, + previousEventId: __expectLong, + stateEnteredEventDetails: _json, + stateExitedEventDetails: _json, + taskFailedEventDetails: _json, + taskScheduledEventDetails: _json, + taskStartFailedEventDetails: _json, + taskStartedEventDetails: _json, + taskSubmitFailedEventDetails: _json, + taskSubmittedEventDetails: _json, + taskSucceededEventDetails: _json, + taskTimedOutEventDetails: _json, + timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + type: __expectString, + }) as any; +}; + +// de_HistoryEventExecutionDataDetails omitted. /** - * deserializeAws_json1_0LogDestinationList + * deserializeAws_json1_0HistoryEventList */ -const de_LogDestinationList = (output: any, context: __SerdeContext): LogDestination[] => { +const de_HistoryEventList = (output: any, context: __SerdeContext): HistoryEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogDestination(entry, context); + return de_HistoryEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - destinations: output.destinations != null ? de_LogDestinationList(output.destinations, context) : undefined, - includeExecutionData: __expectBoolean(output.includeExecutionData), - level: __expectString(output.level), - } as any; -}; +// de_InvalidArn omitted. + +// de_InvalidDefinition omitted. + +// de_InvalidExecutionInput omitted. + +// de_InvalidLoggingConfiguration omitted. + +// de_InvalidName omitted. + +// de_InvalidOutput omitted. + +// de_InvalidToken omitted. + +// de_InvalidTracingConfiguration omitted. + +// de_LambdaFunctionFailedEventDetails omitted. + +// de_LambdaFunctionScheduledEventDetails omitted. + +// de_LambdaFunctionScheduleFailedEventDetails omitted. + +// de_LambdaFunctionStartFailedEventDetails omitted. + +// de_LambdaFunctionSucceededEventDetails omitted. + +// de_LambdaFunctionTimedOutEventDetails omitted. /** - * deserializeAws_json1_0MapIterationEventDetails + * deserializeAws_json1_0ListActivitiesOutput */ -const de_MapIterationEventDetails = (output: any, context: __SerdeContext): MapIterationEventDetails => { - return { - index: __expectInt32(output.index), - name: __expectString(output.name), - } as any; +const de_ListActivitiesOutput = (output: any, context: __SerdeContext): ListActivitiesOutput => { + return take(output, { + activities: (_: any) => de_ActivityList(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0MapRunExecutionCounts + * deserializeAws_json1_0ListExecutionsOutput */ -const de_MapRunExecutionCounts = (output: any, context: __SerdeContext): MapRunExecutionCounts => { - return { - aborted: __expectLong(output.aborted), - failed: __expectLong(output.failed), - pending: __expectLong(output.pending), - resultsWritten: __expectLong(output.resultsWritten), - running: __expectLong(output.running), - succeeded: __expectLong(output.succeeded), - timedOut: __expectLong(output.timedOut), - total: __expectLong(output.total), - } as any; +const de_ListExecutionsOutput = (output: any, context: __SerdeContext): ListExecutionsOutput => { + return take(output, { + executions: (_: any) => de_ExecutionList(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0MapRunFailedEventDetails + * deserializeAws_json1_0ListMapRunsOutput */ -const de_MapRunFailedEventDetails = (output: any, context: __SerdeContext): MapRunFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - } as any; +const de_ListMapRunsOutput = (output: any, context: __SerdeContext): ListMapRunsOutput => { + return take(output, { + mapRuns: (_: any) => de_MapRunList(_, context), + nextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0MapRunItemCounts + * deserializeAws_json1_0ListStateMachinesOutput */ -const de_MapRunItemCounts = (output: any, context: __SerdeContext): MapRunItemCounts => { - return { - aborted: __expectLong(output.aborted), - failed: __expectLong(output.failed), - pending: __expectLong(output.pending), - resultsWritten: __expectLong(output.resultsWritten), - running: __expectLong(output.running), - succeeded: __expectLong(output.succeeded), - timedOut: __expectLong(output.timedOut), - total: __expectLong(output.total), - } as any; +const de_ListStateMachinesOutput = (output: any, context: __SerdeContext): ListStateMachinesOutput => { + return take(output, { + nextToken: __expectString, + stateMachines: (_: any) => de_StateMachineList(_, context), + }) as any; }; +// de_ListTagsForResourceOutput omitted. + +// de_LogDestination omitted. + +// de_LogDestinationList omitted. + +// de_LoggingConfiguration omitted. + +// de_MapIterationEventDetails omitted. + +// de_MapRunExecutionCounts omitted. + +// de_MapRunFailedEventDetails omitted. + +// de_MapRunItemCounts omitted. + /** * deserializeAws_json1_0MapRunList */ @@ -3594,9 +2686,6 @@ const de_MapRunList = (output: any, context: __SerdeContext): MapRunListItem[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MapRunListItem(entry, context); }); return retVal; @@ -3606,171 +2695,72 @@ const de_MapRunList = (output: any, context: __SerdeContext): MapRunListItem[] = * deserializeAws_json1_0MapRunListItem */ const de_MapRunListItem = (output: any, context: __SerdeContext): MapRunListItem => { - return { - executionArn: __expectString(output.executionArn), - mapRunArn: __expectString(output.mapRunArn), - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - stateMachineArn: __expectString(output.stateMachineArn), - stopDate: - output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined, - } as any; + return take(output, { + executionArn: __expectString, + mapRunArn: __expectString, + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateMachineArn: __expectString, + stopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_0MapRunStartedEventDetails - */ -const de_MapRunStartedEventDetails = (output: any, context: __SerdeContext): MapRunStartedEventDetails => { - return { - mapRunArn: __expectString(output.mapRunArn), - } as any; -}; +// de_MapRunStartedEventDetails omitted. -/** - * deserializeAws_json1_0MapStateStartedEventDetails - */ -const de_MapStateStartedEventDetails = (output: any, context: __SerdeContext): MapStateStartedEventDetails => { - return { - length: __expectInt32(output.length), - } as any; -}; +// de_MapStateStartedEventDetails omitted. -/** - * deserializeAws_json1_0MissingRequiredParameter - */ -const de_MissingRequiredParameter = (output: any, context: __SerdeContext): MissingRequiredParameter => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MissingRequiredParameter omitted. -/** - * deserializeAws_json1_0ResourceNotFound - */ -const de_ResourceNotFound = (output: any, context: __SerdeContext): ResourceNotFound => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_ResourceNotFound omitted. -/** - * deserializeAws_json1_0SendTaskFailureOutput - */ -const de_SendTaskFailureOutput = (output: any, context: __SerdeContext): SendTaskFailureOutput => { - return {} as any; -}; +// de_SendTaskFailureOutput omitted. -/** - * deserializeAws_json1_0SendTaskHeartbeatOutput - */ -const de_SendTaskHeartbeatOutput = (output: any, context: __SerdeContext): SendTaskHeartbeatOutput => { - return {} as any; -}; +// de_SendTaskHeartbeatOutput omitted. -/** - * deserializeAws_json1_0SendTaskSuccessOutput - */ -const de_SendTaskSuccessOutput = (output: any, context: __SerdeContext): SendTaskSuccessOutput => { - return {} as any; -}; +// de_SendTaskSuccessOutput omitted. /** * deserializeAws_json1_0StartExecutionOutput */ const de_StartExecutionOutput = (output: any, context: __SerdeContext): StartExecutionOutput => { - return { - executionArn: __expectString(output.executionArn), - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - } as any; + return take(output, { + executionArn: __expectString, + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0StartSyncExecutionOutput */ const de_StartSyncExecutionOutput = (output: any, context: __SerdeContext): StartSyncExecutionOutput => { - return { - billingDetails: output.billingDetails != null ? de_BillingDetails(output.billingDetails, context) : undefined, - cause: __expectString(output.cause), - error: __expectString(output.error), - executionArn: __expectString(output.executionArn), - input: __expectString(output.input), - inputDetails: - output.inputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.inputDetails, context) : undefined, - name: __expectString(output.name), - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_CloudWatchEventsExecutionDataDetails(output.outputDetails, context) : undefined, - startDate: - output.startDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startDate))) : undefined, - stateMachineArn: __expectString(output.stateMachineArn), - status: __expectString(output.status), - stopDate: - output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined, - traceHeader: __expectString(output.traceHeader), - } as any; -}; - -/** - * deserializeAws_json1_0StateEnteredEventDetails - */ -const de_StateEnteredEventDetails = (output: any, context: __SerdeContext): StateEnteredEventDetails => { - return { - input: __expectString(output.input), - inputDetails: - output.inputDetails != null ? de_HistoryEventExecutionDataDetails(output.inputDetails, context) : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + billingDetails: _json, + cause: __expectString, + error: __expectString, + executionArn: __expectString, + input: __expectString, + inputDetails: _json, + name: __expectString, + output: __expectString, + outputDetails: _json, + startDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stateMachineArn: __expectString, + status: __expectString, + stopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + traceHeader: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0StateExitedEventDetails - */ -const de_StateExitedEventDetails = (output: any, context: __SerdeContext): StateExitedEventDetails => { - return { - name: __expectString(output.name), - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined, - } as any; -}; +// de_StateEnteredEventDetails omitted. -/** - * deserializeAws_json1_0StateMachineAlreadyExists - */ -const de_StateMachineAlreadyExists = (output: any, context: __SerdeContext): StateMachineAlreadyExists => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StateExitedEventDetails omitted. -/** - * deserializeAws_json1_0StateMachineDeleting - */ -const de_StateMachineDeleting = (output: any, context: __SerdeContext): StateMachineDeleting => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StateMachineAlreadyExists omitted. -/** - * deserializeAws_json1_0StateMachineDoesNotExist - */ -const de_StateMachineDoesNotExist = (output: any, context: __SerdeContext): StateMachineDoesNotExist => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StateMachineDeleting omitted. -/** - * deserializeAws_json1_0StateMachineLimitExceeded - */ -const de_StateMachineLimitExceeded = (output: any, context: __SerdeContext): StateMachineLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StateMachineDoesNotExist omitted. + +// de_StateMachineLimitExceeded omitted. /** * deserializeAws_json1_0StateMachineList @@ -3779,9 +2769,6 @@ const de_StateMachineList = (output: any, context: __SerdeContext): StateMachine const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StateMachineListItem(entry, context); }); return retVal; @@ -3791,246 +2778,71 @@ const de_StateMachineList = (output: any, context: __SerdeContext): StateMachine * deserializeAws_json1_0StateMachineListItem */ const de_StateMachineListItem = (output: any, context: __SerdeContext): StateMachineListItem => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - name: __expectString(output.name), - stateMachineArn: __expectString(output.stateMachineArn), - type: __expectString(output.type), - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + stateMachineArn: __expectString, + type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0StateMachineTypeNotSupported - */ -const de_StateMachineTypeNotSupported = (output: any, context: __SerdeContext): StateMachineTypeNotSupported => { - return { - message: __expectString(output.message), - } as any; -}; +// de_StateMachineTypeNotSupported omitted. /** * deserializeAws_json1_0StopExecutionOutput */ const de_StopExecutionOutput = (output: any, context: __SerdeContext): StopExecutionOutput => { - return { - stopDate: - output.stopDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.stopDate))) : undefined, - } as any; + return take(output, { + stopDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceOutput - */ -const de_TagResourceOutput = (output: any, context: __SerdeContext): TagResourceOutput => { - return {} as any; -}; +// de_TagResourceOutput omitted. -/** - * deserializeAws_json1_0TaskCredentials - */ -const de_TaskCredentials = (output: any, context: __SerdeContext): TaskCredentials => { - return { - roleArn: __expectString(output.roleArn), - } as any; -}; +// de_TaskCredentials omitted. -/** - * deserializeAws_json1_0TaskDoesNotExist - */ -const de_TaskDoesNotExist = (output: any, context: __SerdeContext): TaskDoesNotExist => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TaskDoesNotExist omitted. -/** - * deserializeAws_json1_0TaskFailedEventDetails - */ -const de_TaskFailedEventDetails = (output: any, context: __SerdeContext): TaskFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskFailedEventDetails omitted. -/** - * deserializeAws_json1_0TaskScheduledEventDetails - */ -const de_TaskScheduledEventDetails = (output: any, context: __SerdeContext): TaskScheduledEventDetails => { - return { - heartbeatInSeconds: __expectLong(output.heartbeatInSeconds), - parameters: __expectString(output.parameters), - region: __expectString(output.region), - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - taskCredentials: output.taskCredentials != null ? de_TaskCredentials(output.taskCredentials, context) : undefined, - timeoutInSeconds: __expectLong(output.timeoutInSeconds), - } as any; -}; +// de_TaskScheduledEventDetails omitted. -/** - * deserializeAws_json1_0TaskStartedEventDetails - */ -const de_TaskStartedEventDetails = (output: any, context: __SerdeContext): TaskStartedEventDetails => { - return { - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskStartedEventDetails omitted. -/** - * deserializeAws_json1_0TaskStartFailedEventDetails - */ -const de_TaskStartFailedEventDetails = (output: any, context: __SerdeContext): TaskStartFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskStartFailedEventDetails omitted. -/** - * deserializeAws_json1_0TaskSubmitFailedEventDetails - */ -const de_TaskSubmitFailedEventDetails = (output: any, context: __SerdeContext): TaskSubmitFailedEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskSubmitFailedEventDetails omitted. -/** - * deserializeAws_json1_0TaskSubmittedEventDetails - */ -const de_TaskSubmittedEventDetails = (output: any, context: __SerdeContext): TaskSubmittedEventDetails => { - return { - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined, - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskSubmittedEventDetails omitted. -/** - * deserializeAws_json1_0TaskSucceededEventDetails - */ -const de_TaskSucceededEventDetails = (output: any, context: __SerdeContext): TaskSucceededEventDetails => { - return { - output: __expectString(output.output), - outputDetails: - output.outputDetails != null ? de_HistoryEventExecutionDataDetails(output.outputDetails, context) : undefined, - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskSucceededEventDetails omitted. -/** - * deserializeAws_json1_0TaskTimedOut - */ -const de_TaskTimedOut = (output: any, context: __SerdeContext): TaskTimedOut => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TaskTimedOut omitted. -/** - * deserializeAws_json1_0TaskTimedOutEventDetails - */ -const de_TaskTimedOutEventDetails = (output: any, context: __SerdeContext): TaskTimedOutEventDetails => { - return { - cause: __expectString(output.cause), - error: __expectString(output.error), - resource: __expectString(output.resource), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_TaskTimedOutEventDetails omitted. -/** - * deserializeAws_json1_0TooManyTags - */ -const de_TooManyTags = (output: any, context: __SerdeContext): TooManyTags => { - return { - message: __expectString(output.message), - resourceName: __expectString(output.resourceName), - } as any; -}; +// de_TooManyTags omitted. -/** - * deserializeAws_json1_0TracingConfiguration - */ -const de_TracingConfiguration = (output: any, context: __SerdeContext): TracingConfiguration => { - return { - enabled: __expectBoolean(output.enabled), - } as any; -}; +// de_TracingConfiguration omitted. -/** - * deserializeAws_json1_0UntagResourceOutput - */ -const de_UntagResourceOutput = (output: any, context: __SerdeContext): UntagResourceOutput => { - return {} as any; -}; +// de_UntagResourceOutput omitted. -/** - * deserializeAws_json1_0UpdateMapRunOutput - */ -const de_UpdateMapRunOutput = (output: any, context: __SerdeContext): UpdateMapRunOutput => { - return {} as any; -}; +// de_UpdateMapRunOutput omitted. /** * deserializeAws_json1_0UpdateStateMachineOutput */ const de_UpdateStateMachineOutput = (output: any, context: __SerdeContext): UpdateStateMachineOutput => { - return { - updateDate: - output.updateDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updateDate))) : undefined, - } as any; + return take(output, { + updateDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - message: __expectString(output.message), - reason: __expectString(output.reason), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4052,6 +2864,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-shield/src/protocols/Aws_json1_1.ts b/clients/client-shield/src/protocols/Aws_json1_1.ts index d435905466a4..2f487c33631c 100644 --- a/clients/client-shield/src/protocols/Aws_json1_1.ts +++ b/clients/client-shield/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -9,7 +10,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -126,68 +128,42 @@ import { UpdateSubscriptionCommandInput, UpdateSubscriptionCommandOutput } from import { AccessDeniedException, AccessDeniedForDependencyException, - ApplicationLayerAutomaticResponseConfiguration, AssociateDRTLogBucketRequest, - AssociateDRTLogBucketResponse, AssociateDRTRoleRequest, - AssociateDRTRoleResponse, AssociateHealthCheckRequest, - AssociateHealthCheckResponse, AssociateProactiveEngagementDetailsRequest, - AssociateProactiveEngagementDetailsResponse, AttackDetail, - AttackProperty, AttackStatisticsDataItem, AttackSummary, - AttackVectorDescription, AttackVolume, AttackVolumeStatistics, BlockAction, - Contributor, CountAction, CreateProtectionGroupRequest, - CreateProtectionGroupResponse, CreateProtectionRequest, - CreateProtectionResponse, CreateSubscriptionRequest, - CreateSubscriptionResponse, DeleteProtectionGroupRequest, - DeleteProtectionGroupResponse, DeleteProtectionRequest, - DeleteProtectionResponse, DeleteSubscriptionRequest, - DeleteSubscriptionResponse, DescribeAttackRequest, DescribeAttackResponse, DescribeAttackStatisticsRequest, DescribeAttackStatisticsResponse, DescribeDRTAccessRequest, - DescribeDRTAccessResponse, DescribeEmergencyContactSettingsRequest, - DescribeEmergencyContactSettingsResponse, DescribeProtectionGroupRequest, - DescribeProtectionGroupResponse, DescribeProtectionRequest, - DescribeProtectionResponse, DescribeSubscriptionRequest, DescribeSubscriptionResponse, DisableApplicationLayerAutomaticResponseRequest, - DisableApplicationLayerAutomaticResponseResponse, DisableProactiveEngagementRequest, - DisableProactiveEngagementResponse, DisassociateDRTLogBucketRequest, - DisassociateDRTLogBucketResponse, DisassociateDRTRoleRequest, - DisassociateDRTRoleResponse, DisassociateHealthCheckRequest, - DisassociateHealthCheckResponse, EmergencyContact, EnableApplicationLayerAutomaticResponseRequest, - EnableApplicationLayerAutomaticResponseResponse, EnableProactiveEngagementRequest, - EnableProactiveEngagementResponse, GetSubscriptionStateRequest, - GetSubscriptionStateResponse, InclusionProtectionFilters, InclusionProtectionGroupFilters, InternalErrorException, @@ -195,54 +171,34 @@ import { InvalidPaginationTokenException, InvalidParameterException, InvalidResourceException, - Limit, LimitsExceededException, ListAttacksRequest, ListAttacksResponse, ListProtectionGroupsRequest, - ListProtectionGroupsResponse, ListProtectionsRequest, - ListProtectionsResponse, ListResourcesInProtectionGroupRequest, - ListResourcesInProtectionGroupResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, LockedSubscriptionException, - Mitigation, NoAssociatedRoleException, OptimisticLockException, ProtectedResourceType, - Protection, - ProtectionGroup, ProtectionGroupAggregation, - ProtectionGroupArbitraryPatternLimits, - ProtectionGroupLimits, ProtectionGroupPattern, - ProtectionGroupPatternTypeLimits, - ProtectionLimits, ResourceAlreadyExistsException, ResourceNotFoundException, ResponseAction, SubResourceSummary, Subscription, - SubscriptionLimits, SummarizedAttackVector, SummarizedCounter, Tag, TagResourceRequest, - TagResourceResponse, TimeRange, UntagResourceRequest, - UntagResourceResponse, UpdateApplicationLayerAutomaticResponseRequest, - UpdateApplicationLayerAutomaticResponseResponse, UpdateEmergencyContactSettingsRequest, - UpdateEmergencyContactSettingsResponse, UpdateProtectionGroupRequest, - UpdateProtectionGroupResponse, UpdateSubscriptionRequest, - UpdateSubscriptionResponse, - ValidationExceptionField, } from "../models/models_0"; import { ShieldServiceException as __BaseException } from "../models/ShieldServiceException"; @@ -255,7 +211,7 @@ export const se_AssociateDRTLogBucketCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDRTLogBucket"); let body: any; - body = JSON.stringify(se_AssociateDRTLogBucketRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -268,7 +224,7 @@ export const se_AssociateDRTRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDRTRole"); let body: any; - body = JSON.stringify(se_AssociateDRTRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -281,7 +237,7 @@ export const se_AssociateHealthCheckCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateHealthCheck"); let body: any; - body = JSON.stringify(se_AssociateHealthCheckRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -294,7 +250,7 @@ export const se_AssociateProactiveEngagementDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateProactiveEngagementDetails"); let body: any; - body = JSON.stringify(se_AssociateProactiveEngagementDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -307,7 +263,7 @@ export const se_CreateProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProtection"); let body: any; - body = JSON.stringify(se_CreateProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -320,7 +276,7 @@ export const se_CreateProtectionGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProtectionGroup"); let body: any; - body = JSON.stringify(se_CreateProtectionGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -333,7 +289,7 @@ export const se_CreateSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSubscription"); let body: any; - body = JSON.stringify(se_CreateSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -346,7 +302,7 @@ export const se_DeleteProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProtection"); let body: any; - body = JSON.stringify(se_DeleteProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -359,7 +315,7 @@ export const se_DeleteProtectionGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProtectionGroup"); let body: any; - body = JSON.stringify(se_DeleteProtectionGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -372,7 +328,7 @@ export const se_DeleteSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSubscription"); let body: any; - body = JSON.stringify(se_DeleteSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -385,7 +341,7 @@ export const se_DescribeAttackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAttack"); let body: any; - body = JSON.stringify(se_DescribeAttackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -398,7 +354,7 @@ export const se_DescribeAttackStatisticsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAttackStatistics"); let body: any; - body = JSON.stringify(se_DescribeAttackStatisticsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -411,7 +367,7 @@ export const se_DescribeDRTAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDRTAccess"); let body: any; - body = JSON.stringify(se_DescribeDRTAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -424,7 +380,7 @@ export const se_DescribeEmergencyContactSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEmergencyContactSettings"); let body: any; - body = JSON.stringify(se_DescribeEmergencyContactSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -437,7 +393,7 @@ export const se_DescribeProtectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProtection"); let body: any; - body = JSON.stringify(se_DescribeProtectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -450,7 +406,7 @@ export const se_DescribeProtectionGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProtectionGroup"); let body: any; - body = JSON.stringify(se_DescribeProtectionGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -463,7 +419,7 @@ export const se_DescribeSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSubscription"); let body: any; - body = JSON.stringify(se_DescribeSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -476,7 +432,7 @@ export const se_DisableApplicationLayerAutomaticResponseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableApplicationLayerAutomaticResponse"); let body: any; - body = JSON.stringify(se_DisableApplicationLayerAutomaticResponseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -489,7 +445,7 @@ export const se_DisableProactiveEngagementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableProactiveEngagement"); let body: any; - body = JSON.stringify(se_DisableProactiveEngagementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -502,7 +458,7 @@ export const se_DisassociateDRTLogBucketCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateDRTLogBucket"); let body: any; - body = JSON.stringify(se_DisassociateDRTLogBucketRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -515,7 +471,7 @@ export const se_DisassociateDRTRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateDRTRole"); let body: any; - body = JSON.stringify(se_DisassociateDRTRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -528,7 +484,7 @@ export const se_DisassociateHealthCheckCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateHealthCheck"); let body: any; - body = JSON.stringify(se_DisassociateHealthCheckRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -541,7 +497,7 @@ export const se_EnableApplicationLayerAutomaticResponseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableApplicationLayerAutomaticResponse"); let body: any; - body = JSON.stringify(se_EnableApplicationLayerAutomaticResponseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -554,7 +510,7 @@ export const se_EnableProactiveEngagementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EnableProactiveEngagement"); let body: any; - body = JSON.stringify(se_EnableProactiveEngagementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -567,7 +523,7 @@ export const se_GetSubscriptionStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSubscriptionState"); let body: any; - body = JSON.stringify(se_GetSubscriptionStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -593,7 +549,7 @@ export const se_ListProtectionGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProtectionGroups"); let body: any; - body = JSON.stringify(se_ListProtectionGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -606,7 +562,7 @@ export const se_ListProtectionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProtections"); let body: any; - body = JSON.stringify(se_ListProtectionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -619,7 +575,7 @@ export const se_ListResourcesInProtectionGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourcesInProtectionGroup"); let body: any; - body = JSON.stringify(se_ListResourcesInProtectionGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -632,7 +588,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -645,7 +601,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -658,7 +614,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -671,7 +627,7 @@ export const se_UpdateApplicationLayerAutomaticResponseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApplicationLayerAutomaticResponse"); let body: any; - body = JSON.stringify(se_UpdateApplicationLayerAutomaticResponseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -684,7 +640,7 @@ export const se_UpdateEmergencyContactSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateEmergencyContactSettings"); let body: any; - body = JSON.stringify(se_UpdateEmergencyContactSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -697,7 +653,7 @@ export const se_UpdateProtectionGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProtectionGroup"); let body: any; - body = JSON.stringify(se_UpdateProtectionGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -710,7 +666,7 @@ export const se_UpdateSubscriptionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSubscription"); let body: any; - body = JSON.stringify(se_UpdateSubscriptionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -726,12 +682,12 @@ export const de_AssociateDRTLogBucketCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDRTLogBucketResponse(data, context); + contents = _json(data); const response: AssociateDRTLogBucketCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -773,10 +729,9 @@ const de_AssociateDRTLogBucketCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -794,12 +749,12 @@ export const de_AssociateDRTRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDRTRoleResponse(data, context); + contents = _json(data); const response: AssociateDRTRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -835,10 +790,9 @@ const de_AssociateDRTRoleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -856,12 +810,12 @@ export const de_AssociateHealthCheckCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateHealthCheckResponse(data, context); + contents = _json(data); const response: AssociateHealthCheckCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -897,10 +851,9 @@ const de_AssociateHealthCheckCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -918,12 +871,12 @@ export const de_AssociateProactiveEngagementDetailsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateProactiveEngagementDetailsResponse(data, context); + contents = _json(data); const response: AssociateProactiveEngagementDetailsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -956,10 +909,9 @@ const de_AssociateProactiveEngagementDetailsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -977,12 +929,12 @@ export const de_CreateProtectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProtectionResponse(data, context); + contents = _json(data); const response: CreateProtectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1024,10 +976,9 @@ const de_CreateProtectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1045,12 +996,12 @@ export const de_CreateProtectionGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProtectionGroupResponse(data, context); + contents = _json(data); const response: CreateProtectionGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1086,10 +1037,9 @@ const de_CreateProtectionGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1107,12 +1057,12 @@ export const de_CreateSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSubscriptionResponse(data, context); + contents = _json(data); const response: CreateSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1136,10 +1086,9 @@ const de_CreateSubscriptionCommandError = async ( throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1157,12 +1106,12 @@ export const de_DeleteProtectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProtectionResponse(data, context); + contents = _json(data); const response: DeleteProtectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1189,10 +1138,9 @@ const de_DeleteProtectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1210,12 +1158,12 @@ export const de_DeleteProtectionGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteProtectionGroupResponse(data, context); + contents = _json(data); const response: DeleteProtectionGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1242,10 +1190,9 @@ const de_DeleteProtectionGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1263,12 +1210,12 @@ export const de_DeleteSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSubscriptionResponse(data, context); + contents = _json(data); const response: DeleteSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1295,10 +1242,9 @@ const de_DeleteSubscriptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1321,7 +1267,7 @@ export const de_DescribeAttackCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1345,10 +1291,9 @@ const de_DescribeAttackCommandError = async ( throw await de_InternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1371,7 +1316,7 @@ export const de_DescribeAttackStatisticsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1392,10 +1337,9 @@ const de_DescribeAttackStatisticsCommandError = async ( throw await de_InternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1413,12 +1357,12 @@ export const de_DescribeDRTAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDRTAccessResponse(data, context); + contents = _json(data); const response: DescribeDRTAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1442,10 +1386,9 @@ const de_DescribeDRTAccessCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1463,12 +1406,12 @@ export const de_DescribeEmergencyContactSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEmergencyContactSettingsResponse(data, context); + contents = _json(data); const response: DescribeEmergencyContactSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1492,10 +1435,9 @@ const de_DescribeEmergencyContactSettingsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1513,12 +1455,12 @@ export const de_DescribeProtectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeProtectionResponse(data, context); + contents = _json(data); const response: DescribeProtectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1545,10 +1487,9 @@ const de_DescribeProtectionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1566,12 +1507,12 @@ export const de_DescribeProtectionGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeProtectionGroupResponse(data, context); + contents = _json(data); const response: DescribeProtectionGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1595,10 +1536,9 @@ const de_DescribeProtectionGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1621,7 +1561,7 @@ export const de_DescribeSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1645,10 +1585,9 @@ const de_DescribeSubscriptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1666,12 +1605,12 @@ export const de_DisableApplicationLayerAutomaticResponseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableApplicationLayerAutomaticResponseResponse(data, context); + contents = _json(data); const response: DisableApplicationLayerAutomaticResponseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1704,10 +1643,9 @@ const de_DisableApplicationLayerAutomaticResponseCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1725,12 +1663,12 @@ export const de_DisableProactiveEngagementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableProactiveEngagementResponse(data, context); + contents = _json(data); const response: DisableProactiveEngagementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1763,10 +1701,9 @@ const de_DisableProactiveEngagementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1784,12 +1721,12 @@ export const de_DisassociateDRTLogBucketCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateDRTLogBucketResponse(data, context); + contents = _json(data); const response: DisassociateDRTLogBucketCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1825,10 +1762,9 @@ const de_DisassociateDRTLogBucketCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1846,12 +1782,12 @@ export const de_DisassociateDRTRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateDRTRoleResponse(data, context); + contents = _json(data); const response: DisassociateDRTRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1881,10 +1817,9 @@ const de_DisassociateDRTRoleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1902,12 +1837,12 @@ export const de_DisassociateHealthCheckCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateHealthCheckResponse(data, context); + contents = _json(data); const response: DisassociateHealthCheckCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1940,10 +1875,9 @@ const de_DisassociateHealthCheckCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1961,12 +1895,12 @@ export const de_EnableApplicationLayerAutomaticResponseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableApplicationLayerAutomaticResponseResponse(data, context); + contents = _json(data); const response: EnableApplicationLayerAutomaticResponseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2002,10 +1936,9 @@ const de_EnableApplicationLayerAutomaticResponseCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,12 +1956,12 @@ export const de_EnableProactiveEngagementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EnableProactiveEngagementResponse(data, context); + contents = _json(data); const response: EnableProactiveEngagementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2061,10 +1994,9 @@ const de_EnableProactiveEngagementCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2082,12 +2014,12 @@ export const de_GetSubscriptionStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSubscriptionStateResponse(data, context); + contents = _json(data); const response: GetSubscriptionStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2108,10 +2040,9 @@ const de_GetSubscriptionStateCommandError = async ( throw await de_InternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2134,7 +2065,7 @@ export const de_ListAttacksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2161,10 +2092,9 @@ const de_ListAttacksCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2182,12 +2112,12 @@ export const de_ListProtectionGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProtectionGroupsResponse(data, context); + contents = _json(data); const response: ListProtectionGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2214,10 +2144,9 @@ const de_ListProtectionGroupsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2235,12 +2164,12 @@ export const de_ListProtectionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProtectionsResponse(data, context); + contents = _json(data); const response: ListProtectionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2267,10 +2196,9 @@ const de_ListProtectionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2288,12 +2216,12 @@ export const de_ListResourcesInProtectionGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourcesInProtectionGroupResponse(data, context); + contents = _json(data); const response: ListResourcesInProtectionGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2320,10 +2248,9 @@ const de_ListResourcesInProtectionGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2341,12 +2268,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2373,10 +2300,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2394,12 +2320,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2429,10 +2355,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2450,12 +2375,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2485,10 +2410,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2506,12 +2430,12 @@ export const de_UpdateApplicationLayerAutomaticResponseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateApplicationLayerAutomaticResponseResponse(data, context); + contents = _json(data); const response: UpdateApplicationLayerAutomaticResponseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2544,10 +2468,9 @@ const de_UpdateApplicationLayerAutomaticResponseCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2565,12 +2488,12 @@ export const de_UpdateEmergencyContactSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateEmergencyContactSettingsResponse(data, context); + contents = _json(data); const response: UpdateEmergencyContactSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2600,10 +2523,9 @@ const de_UpdateEmergencyContactSettingsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2621,12 +2543,12 @@ export const de_UpdateProtectionGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProtectionGroupResponse(data, context); + contents = _json(data); const response: UpdateProtectionGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2656,10 +2578,9 @@ const de_UpdateProtectionGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2677,12 +2598,12 @@ export const de_UpdateSubscriptionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSubscriptionResponse(data, context); + contents = _json(data); const response: UpdateSubscriptionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2715,10 +2636,9 @@ const de_UpdateSubscriptionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2732,7 +2652,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2748,7 +2668,7 @@ const de_AccessDeniedForDependencyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedForDependencyException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedForDependencyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2764,7 +2684,7 @@ const de_InternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new InternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2780,7 +2700,7 @@ const de_InvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2796,7 +2716,7 @@ const de_InvalidPaginationTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPaginationTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPaginationTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2812,7 +2732,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2828,7 +2748,7 @@ const de_InvalidResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2844,7 +2764,7 @@ const de_LimitsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitsExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2860,7 +2780,7 @@ const de_LockedSubscriptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LockedSubscriptionException(body, context); + const deserialized: any = _json(body); const exception = new LockedSubscriptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2876,7 +2796,7 @@ const de_NoAssociatedRoleExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoAssociatedRoleException(body, context); + const deserialized: any = _json(body); const exception = new NoAssociatedRoleException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2892,7 +2812,7 @@ const de_OptimisticLockExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OptimisticLockException(body, context); + const deserialized: any = _json(body); const exception = new OptimisticLockException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2908,7 +2828,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2924,7 +2844,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2932,1436 +2852,401 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AssociateDRTLogBucketRequest - */ -const se_AssociateDRTLogBucketRequest = (input: AssociateDRTLogBucketRequest, context: __SerdeContext): any => { - return { - ...(input.LogBucket != null && { LogBucket: input.LogBucket }), - }; -}; +// se_AssociateDRTLogBucketRequest omitted. -/** - * serializeAws_json1_1AssociateDRTRoleRequest - */ -const se_AssociateDRTRoleRequest = (input: AssociateDRTRoleRequest, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_AssociateDRTRoleRequest omitted. -/** - * serializeAws_json1_1AssociateHealthCheckRequest - */ -const se_AssociateHealthCheckRequest = (input: AssociateHealthCheckRequest, context: __SerdeContext): any => { - return { - ...(input.HealthCheckArn != null && { HealthCheckArn: input.HealthCheckArn }), - ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }), - }; -}; +// se_AssociateHealthCheckRequest omitted. -/** - * serializeAws_json1_1AssociateProactiveEngagementDetailsRequest - */ -const se_AssociateProactiveEngagementDetailsRequest = ( - input: AssociateProactiveEngagementDetailsRequest, - context: __SerdeContext -): any => { - return { - ...(input.EmergencyContactList != null && { - EmergencyContactList: se_EmergencyContactList(input.EmergencyContactList, context), - }), - }; -}; +// se_AssociateProactiveEngagementDetailsRequest omitted. -/** - * serializeAws_json1_1BlockAction - */ -const se_BlockAction = (input: BlockAction, context: __SerdeContext): any => { - return {}; -}; +// se_BlockAction omitted. -/** - * serializeAws_json1_1CountAction - */ -const se_CountAction = (input: CountAction, context: __SerdeContext): any => { - return {}; -}; +// se_CountAction omitted. -/** - * serializeAws_json1_1CreateProtectionGroupRequest - */ -const se_CreateProtectionGroupRequest = (input: CreateProtectionGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Aggregation != null && { Aggregation: input.Aggregation }), - ...(input.Members != null && { Members: se_ProtectionGroupMembers(input.Members, context) }), - ...(input.Pattern != null && { Pattern: input.Pattern }), - ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateProtectionGroupRequest omitted. -/** - * serializeAws_json1_1CreateProtectionRequest - */ -const se_CreateProtectionRequest = (input: CreateProtectionRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateProtectionRequest omitted. -/** - * serializeAws_json1_1CreateSubscriptionRequest - */ -const se_CreateSubscriptionRequest = (input: CreateSubscriptionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_CreateSubscriptionRequest omitted. -/** - * serializeAws_json1_1DeleteProtectionGroupRequest - */ -const se_DeleteProtectionGroupRequest = (input: DeleteProtectionGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }), - }; -}; +// se_DeleteProtectionGroupRequest omitted. -/** - * serializeAws_json1_1DeleteProtectionRequest - */ -const se_DeleteProtectionRequest = (input: DeleteProtectionRequest, context: __SerdeContext): any => { - return { - ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }), - }; -}; +// se_DeleteProtectionRequest omitted. -/** - * serializeAws_json1_1DeleteSubscriptionRequest - */ -const se_DeleteSubscriptionRequest = (input: DeleteSubscriptionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DeleteSubscriptionRequest omitted. -/** - * serializeAws_json1_1DescribeAttackRequest - */ -const se_DescribeAttackRequest = (input: DescribeAttackRequest, context: __SerdeContext): any => { - return { - ...(input.AttackId != null && { AttackId: input.AttackId }), - }; -}; +// se_DescribeAttackRequest omitted. -/** - * serializeAws_json1_1DescribeAttackStatisticsRequest - */ -const se_DescribeAttackStatisticsRequest = (input: DescribeAttackStatisticsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeAttackStatisticsRequest omitted. -/** - * serializeAws_json1_1DescribeDRTAccessRequest - */ -const se_DescribeDRTAccessRequest = (input: DescribeDRTAccessRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeDRTAccessRequest omitted. -/** - * serializeAws_json1_1DescribeEmergencyContactSettingsRequest - */ -const se_DescribeEmergencyContactSettingsRequest = ( - input: DescribeEmergencyContactSettingsRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_DescribeEmergencyContactSettingsRequest omitted. -/** - * serializeAws_json1_1DescribeProtectionGroupRequest - */ -const se_DescribeProtectionGroupRequest = (input: DescribeProtectionGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }), - }; -}; +// se_DescribeProtectionGroupRequest omitted. -/** - * serializeAws_json1_1DescribeProtectionRequest - */ -const se_DescribeProtectionRequest = (input: DescribeProtectionRequest, context: __SerdeContext): any => { - return { - ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DescribeProtectionRequest omitted. -/** - * serializeAws_json1_1DescribeSubscriptionRequest - */ -const se_DescribeSubscriptionRequest = (input: DescribeSubscriptionRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeSubscriptionRequest omitted. -/** - * serializeAws_json1_1DisableApplicationLayerAutomaticResponseRequest - */ -const se_DisableApplicationLayerAutomaticResponseRequest = ( - input: DisableApplicationLayerAutomaticResponseRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DisableApplicationLayerAutomaticResponseRequest omitted. -/** - * serializeAws_json1_1DisableProactiveEngagementRequest - */ -const se_DisableProactiveEngagementRequest = ( - input: DisableProactiveEngagementRequest, - context: __SerdeContext -): any => { - return {}; -}; +// se_DisableProactiveEngagementRequest omitted. -/** - * serializeAws_json1_1DisassociateDRTLogBucketRequest - */ -const se_DisassociateDRTLogBucketRequest = (input: DisassociateDRTLogBucketRequest, context: __SerdeContext): any => { - return { - ...(input.LogBucket != null && { LogBucket: input.LogBucket }), - }; -}; +// se_DisassociateDRTLogBucketRequest omitted. -/** - * serializeAws_json1_1DisassociateDRTRoleRequest - */ -const se_DisassociateDRTRoleRequest = (input: DisassociateDRTRoleRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DisassociateDRTRoleRequest omitted. -/** - * serializeAws_json1_1DisassociateHealthCheckRequest - */ -const se_DisassociateHealthCheckRequest = (input: DisassociateHealthCheckRequest, context: __SerdeContext): any => { - return { - ...(input.HealthCheckArn != null && { HealthCheckArn: input.HealthCheckArn }), - ...(input.ProtectionId != null && { ProtectionId: input.ProtectionId }), - }; -}; +// se_DisassociateHealthCheckRequest omitted. -/** - * serializeAws_json1_1EmergencyContact - */ -const se_EmergencyContact = (input: EmergencyContact, context: __SerdeContext): any => { - return { - ...(input.ContactNotes != null && { ContactNotes: input.ContactNotes }), - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - }; -}; +// se_EmergencyContact omitted. -/** - * serializeAws_json1_1EmergencyContactList - */ -const se_EmergencyContactList = (input: EmergencyContact[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EmergencyContact(entry, context); - }); -}; +// se_EmergencyContactList omitted. -/** - * serializeAws_json1_1EnableApplicationLayerAutomaticResponseRequest - */ -const se_EnableApplicationLayerAutomaticResponseRequest = ( - input: EnableApplicationLayerAutomaticResponseRequest, - context: __SerdeContext -): any => { - return { - ...(input.Action != null && { Action: se_ResponseAction(input.Action, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_EnableApplicationLayerAutomaticResponseRequest omitted. -/** - * serializeAws_json1_1EnableProactiveEngagementRequest - */ -const se_EnableProactiveEngagementRequest = (input: EnableProactiveEngagementRequest, context: __SerdeContext): any => { - return {}; -}; +// se_EnableProactiveEngagementRequest omitted. -/** - * serializeAws_json1_1GetSubscriptionStateRequest - */ -const se_GetSubscriptionStateRequest = (input: GetSubscriptionStateRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetSubscriptionStateRequest omitted. -/** - * serializeAws_json1_1InclusionProtectionFilters - */ -const se_InclusionProtectionFilters = (input: InclusionProtectionFilters, context: __SerdeContext): any => { - return { - ...(input.ProtectionNames != null && { ProtectionNames: se_ProtectionNameFilters(input.ProtectionNames, context) }), - ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnFilters(input.ResourceArns, context) }), - ...(input.ResourceTypes != null && { - ResourceTypes: se_ProtectedResourceTypeFilters(input.ResourceTypes, context), - }), - }; -}; +// se_InclusionProtectionFilters omitted. -/** - * serializeAws_json1_1InclusionProtectionGroupFilters - */ -const se_InclusionProtectionGroupFilters = (input: InclusionProtectionGroupFilters, context: __SerdeContext): any => { - return { - ...(input.Aggregations != null && { - Aggregations: se_ProtectionGroupAggregationFilters(input.Aggregations, context), - }), - ...(input.Patterns != null && { Patterns: se_ProtectionGroupPatternFilters(input.Patterns, context) }), - ...(input.ProtectionGroupIds != null && { - ProtectionGroupIds: se_ProtectionGroupIdFilters(input.ProtectionGroupIds, context), - }), - ...(input.ResourceTypes != null && { - ResourceTypes: se_ProtectedResourceTypeFilters(input.ResourceTypes, context), - }), - }; -}; +// se_InclusionProtectionGroupFilters omitted. /** * serializeAws_json1_1ListAttacksRequest */ const se_ListAttacksRequest = (input: ListAttacksRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: se_TimeRange(input.EndTime, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArns != null && { ResourceArns: se_ResourceArnFilterList(input.ResourceArns, context) }), - ...(input.StartTime != null && { StartTime: se_TimeRange(input.StartTime, context) }), - }; -}; - -/** - * serializeAws_json1_1ListProtectionGroupsRequest - */ -const se_ListProtectionGroupsRequest = (input: ListProtectionGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.InclusionFilters != null && { - InclusionFilters: se_InclusionProtectionGroupFilters(input.InclusionFilters, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListProtectionsRequest - */ -const se_ListProtectionsRequest = (input: ListProtectionsRequest, context: __SerdeContext): any => { - return { - ...(input.InclusionFilters != null && { - InclusionFilters: se_InclusionProtectionFilters(input.InclusionFilters, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListResourcesInProtectionGroupRequest - */ -const se_ListResourcesInProtectionGroupRequest = ( - input: ListResourcesInProtectionGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; - -/** - * serializeAws_json1_1ProtectedResourceTypeFilters - */ -const se_ProtectedResourceTypeFilters = (input: (ProtectedResourceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ProtectionGroupAggregationFilters - */ -const se_ProtectionGroupAggregationFilters = ( - input: (ProtectionGroupAggregation | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return take(input, { + EndTime: (_) => se_TimeRange(_, context), + MaxResults: [], + NextToken: [], + ResourceArns: _json, + StartTime: (_) => se_TimeRange(_, context), + }); }; -/** - * serializeAws_json1_1ProtectionGroupIdFilters - */ -const se_ProtectionGroupIdFilters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListProtectionGroupsRequest omitted. -/** - * serializeAws_json1_1ProtectionGroupMembers - */ -const se_ProtectionGroupMembers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListProtectionsRequest omitted. -/** - * serializeAws_json1_1ProtectionGroupPatternFilters - */ -const se_ProtectionGroupPatternFilters = (input: (ProtectionGroupPattern | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListResourcesInProtectionGroupRequest omitted. -/** - * serializeAws_json1_1ProtectionNameFilters - */ -const se_ProtectionNameFilters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ResourceArnFilterList - */ -const se_ResourceArnFilterList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ProtectedResourceTypeFilters omitted. -/** - * serializeAws_json1_1ResourceArnFilters - */ -const se_ResourceArnFilters = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ProtectionGroupAggregationFilters omitted. -/** - * serializeAws_json1_1ResponseAction - */ -const se_ResponseAction = (input: ResponseAction, context: __SerdeContext): any => { - return { - ...(input.Block != null && { Block: se_BlockAction(input.Block, context) }), - ...(input.Count != null && { Count: se_CountAction(input.Count, context) }), - }; -}; +// se_ProtectionGroupIdFilters omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ProtectionGroupMembers omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ProtectionGroupPatternFilters omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_ProtectionNameFilters omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_ResourceArnFilterList omitted. -/** - * serializeAws_json1_1TimeRange - */ -const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { - return { - ...(input.FromInclusive != null && { FromInclusive: Math.round(input.FromInclusive.getTime() / 1000) }), - ...(input.ToExclusive != null && { ToExclusive: Math.round(input.ToExclusive.getTime() / 1000) }), - }; -}; +// se_ResourceArnFilters omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_ResponseAction omitted. -/** - * serializeAws_json1_1UpdateApplicationLayerAutomaticResponseRequest - */ -const se_UpdateApplicationLayerAutomaticResponseRequest = ( - input: UpdateApplicationLayerAutomaticResponseRequest, - context: __SerdeContext -): any => { - return { - ...(input.Action != null && { Action: se_ResponseAction(input.Action, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1UpdateEmergencyContactSettingsRequest - */ -const se_UpdateEmergencyContactSettingsRequest = ( - input: UpdateEmergencyContactSettingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.EmergencyContactList != null && { - EmergencyContactList: se_EmergencyContactList(input.EmergencyContactList, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateProtectionGroupRequest - */ -const se_UpdateProtectionGroupRequest = (input: UpdateProtectionGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Aggregation != null && { Aggregation: input.Aggregation }), - ...(input.Members != null && { Members: se_ProtectionGroupMembers(input.Members, context) }), - ...(input.Pattern != null && { Pattern: input.Pattern }), - ...(input.ProtectionGroupId != null && { ProtectionGroupId: input.ProtectionGroupId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1UpdateSubscriptionRequest - */ -const se_UpdateSubscriptionRequest = (input: UpdateSubscriptionRequest, context: __SerdeContext): any => { - return { - ...(input.AutoRenew != null && { AutoRenew: input.AutoRenew }), - }; -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AccessDeniedForDependencyException - */ -const de_AccessDeniedForDependencyException = ( - output: any, - context: __SerdeContext -): AccessDeniedForDependencyException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1ApplicationLayerAutomaticResponseConfiguration - */ -const de_ApplicationLayerAutomaticResponseConfiguration = ( - output: any, - context: __SerdeContext -): ApplicationLayerAutomaticResponseConfiguration => { - return { - Action: output.Action != null ? de_ResponseAction(output.Action, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AssociateDRTLogBucketResponse - */ -const de_AssociateDRTLogBucketResponse = (output: any, context: __SerdeContext): AssociateDRTLogBucketResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateDRTRoleResponse - */ -const de_AssociateDRTRoleResponse = (output: any, context: __SerdeContext): AssociateDRTRoleResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateHealthCheckResponse - */ -const de_AssociateHealthCheckResponse = (output: any, context: __SerdeContext): AssociateHealthCheckResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateProactiveEngagementDetailsResponse - */ -const de_AssociateProactiveEngagementDetailsResponse = ( - output: any, - context: __SerdeContext -): AssociateProactiveEngagementDetailsResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AttackDetail - */ -const de_AttackDetail = (output: any, context: __SerdeContext): AttackDetail => { - return { - AttackCounters: - output.AttackCounters != null ? de_SummarizedCounterList(output.AttackCounters, context) : undefined, - AttackId: __expectString(output.AttackId), - AttackProperties: - output.AttackProperties != null ? de_AttackProperties(output.AttackProperties, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Mitigations: output.Mitigations != null ? de_MitigationList(output.Mitigations, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - SubResources: output.SubResources != null ? de_SubResourceSummaryList(output.SubResources, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AttackProperties - */ -const de_AttackProperties = (output: any, context: __SerdeContext): AttackProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttackProperty(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttackProperty - */ -const de_AttackProperty = (output: any, context: __SerdeContext): AttackProperty => { - return { - AttackLayer: __expectString(output.AttackLayer), - AttackPropertyIdentifier: __expectString(output.AttackPropertyIdentifier), - TopContributors: output.TopContributors != null ? de_TopContributors(output.TopContributors, context) : undefined, - Total: __expectLong(output.Total), - Unit: __expectString(output.Unit), - } as any; -}; - -/** - * deserializeAws_json1_1AttackStatisticsDataItem - */ -const de_AttackStatisticsDataItem = (output: any, context: __SerdeContext): AttackStatisticsDataItem => { - return { - AttackCount: __expectLong(output.AttackCount), - AttackVolume: output.AttackVolume != null ? de_AttackVolume(output.AttackVolume, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AttackStatisticsDataList - */ -const de_AttackStatisticsDataList = (output: any, context: __SerdeContext): AttackStatisticsDataItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttackStatisticsDataItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttackSummaries - */ -const de_AttackSummaries = (output: any, context: __SerdeContext): AttackSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttackSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttackSummary - */ -const de_AttackSummary = (output: any, context: __SerdeContext): AttackSummary => { - return { - AttackId: __expectString(output.AttackId), - AttackVectors: - output.AttackVectors != null ? de_AttackVectorDescriptionList(output.AttackVectors, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ResourceArn: __expectString(output.ResourceArn), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AttackVectorDescription - */ -const de_AttackVectorDescription = (output: any, context: __SerdeContext): AttackVectorDescription => { - return { - VectorType: __expectString(output.VectorType), - } as any; -}; - -/** - * deserializeAws_json1_1AttackVectorDescriptionList - */ -const de_AttackVectorDescriptionList = (output: any, context: __SerdeContext): AttackVectorDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttackVectorDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttackVolume - */ -const de_AttackVolume = (output: any, context: __SerdeContext): AttackVolume => { - return { - BitsPerSecond: output.BitsPerSecond != null ? de_AttackVolumeStatistics(output.BitsPerSecond, context) : undefined, - PacketsPerSecond: - output.PacketsPerSecond != null ? de_AttackVolumeStatistics(output.PacketsPerSecond, context) : undefined, - RequestsPerSecond: - output.RequestsPerSecond != null ? de_AttackVolumeStatistics(output.RequestsPerSecond, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AttackVolumeStatistics - */ -const de_AttackVolumeStatistics = (output: any, context: __SerdeContext): AttackVolumeStatistics => { - return { - Max: __limitedParseDouble(output.Max), - } as any; -}; - -/** - * deserializeAws_json1_1BlockAction - */ -const de_BlockAction = (output: any, context: __SerdeContext): BlockAction => { - return {} as any; -}; - -/** - * deserializeAws_json1_1Contributor - */ -const de_Contributor = (output: any, context: __SerdeContext): Contributor => { - return { - Name: __expectString(output.Name), - Value: __expectLong(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1CountAction - */ -const de_CountAction = (output: any, context: __SerdeContext): CountAction => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateProtectionGroupResponse - */ -const de_CreateProtectionGroupResponse = (output: any, context: __SerdeContext): CreateProtectionGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateProtectionResponse - */ -const de_CreateProtectionResponse = (output: any, context: __SerdeContext): CreateProtectionResponse => { - return { - ProtectionId: __expectString(output.ProtectionId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSubscriptionResponse - */ -const de_CreateSubscriptionResponse = (output: any, context: __SerdeContext): CreateSubscriptionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteProtectionGroupResponse - */ -const de_DeleteProtectionGroupResponse = (output: any, context: __SerdeContext): DeleteProtectionGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteProtectionResponse - */ -const de_DeleteProtectionResponse = (output: any, context: __SerdeContext): DeleteProtectionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteSubscriptionResponse - */ -const de_DeleteSubscriptionResponse = (output: any, context: __SerdeContext): DeleteSubscriptionResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeAttackResponse - */ -const de_DescribeAttackResponse = (output: any, context: __SerdeContext): DescribeAttackResponse => { - return { - Attack: output.Attack != null ? de_AttackDetail(output.Attack, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAttackStatisticsResponse - */ -const de_DescribeAttackStatisticsResponse = ( - output: any, - context: __SerdeContext -): DescribeAttackStatisticsResponse => { - return { - DataItems: output.DataItems != null ? de_AttackStatisticsDataList(output.DataItems, context) : undefined, - TimeRange: output.TimeRange != null ? de_TimeRange(output.TimeRange, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDRTAccessResponse - */ -const de_DescribeDRTAccessResponse = (output: any, context: __SerdeContext): DescribeDRTAccessResponse => { - return { - LogBucketList: output.LogBucketList != null ? de_LogBucketList(output.LogBucketList, context) : undefined, - RoleArn: __expectString(output.RoleArn), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEmergencyContactSettingsResponse - */ -const de_DescribeEmergencyContactSettingsResponse = ( - output: any, - context: __SerdeContext -): DescribeEmergencyContactSettingsResponse => { - return { - EmergencyContactList: - output.EmergencyContactList != null ? de_EmergencyContactList(output.EmergencyContactList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProtectionGroupResponse - */ -const de_DescribeProtectionGroupResponse = (output: any, context: __SerdeContext): DescribeProtectionGroupResponse => { - return { - ProtectionGroup: output.ProtectionGroup != null ? de_ProtectionGroup(output.ProtectionGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProtectionResponse - */ -const de_DescribeProtectionResponse = (output: any, context: __SerdeContext): DescribeProtectionResponse => { - return { - Protection: output.Protection != null ? de_Protection(output.Protection, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSubscriptionResponse - */ -const de_DescribeSubscriptionResponse = (output: any, context: __SerdeContext): DescribeSubscriptionResponse => { - return { - Subscription: output.Subscription != null ? de_Subscription(output.Subscription, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisableApplicationLayerAutomaticResponseResponse - */ -const de_DisableApplicationLayerAutomaticResponseResponse = ( - output: any, - context: __SerdeContext -): DisableApplicationLayerAutomaticResponseResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisableProactiveEngagementResponse - */ -const de_DisableProactiveEngagementResponse = ( - output: any, - context: __SerdeContext -): DisableProactiveEngagementResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateDRTLogBucketResponse - */ -const de_DisassociateDRTLogBucketResponse = ( - output: any, - context: __SerdeContext -): DisassociateDRTLogBucketResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateDRTRoleResponse - */ -const de_DisassociateDRTRoleResponse = (output: any, context: __SerdeContext): DisassociateDRTRoleResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateHealthCheckResponse - */ -const de_DisassociateHealthCheckResponse = (output: any, context: __SerdeContext): DisassociateHealthCheckResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1EmergencyContact - */ -const de_EmergencyContact = (output: any, context: __SerdeContext): EmergencyContact => { - return { - ContactNotes: __expectString(output.ContactNotes), - EmailAddress: __expectString(output.EmailAddress), - PhoneNumber: __expectString(output.PhoneNumber), - } as any; -}; - -/** - * deserializeAws_json1_1EmergencyContactList - */ -const de_EmergencyContactList = (output: any, context: __SerdeContext): EmergencyContact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EmergencyContact(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1EnableApplicationLayerAutomaticResponseResponse - */ -const de_EnableApplicationLayerAutomaticResponseResponse = ( - output: any, - context: __SerdeContext -): EnableApplicationLayerAutomaticResponseResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1EnableProactiveEngagementResponse - */ -const de_EnableProactiveEngagementResponse = ( - output: any, - context: __SerdeContext -): EnableProactiveEngagementResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1GetSubscriptionStateResponse - */ -const de_GetSubscriptionStateResponse = (output: any, context: __SerdeContext): GetSubscriptionStateResponse => { - return { - SubscriptionState: __expectString(output.SubscriptionState), - } as any; -}; - -/** - * deserializeAws_json1_1HealthCheckIds - */ -const de_HealthCheckIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1InternalErrorException - */ -const de_InternalErrorException = (output: any, context: __SerdeContext): InternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1InvalidOperationException - */ -const de_InvalidOperationException = (output: any, context: __SerdeContext): InvalidOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1InvalidPaginationTokenException - */ -const de_InvalidPaginationTokenException = (output: any, context: __SerdeContext): InvalidPaginationTokenException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - fields: output.fields != null ? de_ValidationExceptionFieldList(output.fields, context) : undefined, - message: __expectString(output.message), - reason: __expectString(output.reason), - } as any; -}; +// se_TagResourceRequest omitted. /** - * deserializeAws_json1_1InvalidResourceException + * serializeAws_json1_1TimeRange */ -const de_InvalidResourceException = (output: any, context: __SerdeContext): InvalidResourceException => { - return { - message: __expectString(output.message), - } as any; +const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { + return take(input, { + FromInclusive: (_) => Math.round(_.getTime() / 1000), + ToExclusive: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * deserializeAws_json1_1Limit - */ -const de_Limit = (output: any, context: __SerdeContext): Limit => { - return { - Max: __expectLong(output.Max), - Type: __expectString(output.Type), - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1Limits - */ -const de_Limits = (output: any, context: __SerdeContext): Limit[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Limit(entry, context); - }); - return retVal; -}; +// se_UpdateApplicationLayerAutomaticResponseRequest omitted. -/** - * deserializeAws_json1_1LimitsExceededException - */ -const de_LimitsExceededException = (output: any, context: __SerdeContext): LimitsExceededException => { - return { - Limit: __expectLong(output.Limit), - Type: __expectString(output.Type), - message: __expectString(output.message), - } as any; -}; +// se_UpdateEmergencyContactSettingsRequest omitted. -/** - * deserializeAws_json1_1ListAttacksResponse - */ -const de_ListAttacksResponse = (output: any, context: __SerdeContext): ListAttacksResponse => { - return { - AttackSummaries: output.AttackSummaries != null ? de_AttackSummaries(output.AttackSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_UpdateProtectionGroupRequest omitted. -/** - * deserializeAws_json1_1ListProtectionGroupsResponse - */ -const de_ListProtectionGroupsResponse = (output: any, context: __SerdeContext): ListProtectionGroupsResponse => { - return { - NextToken: __expectString(output.NextToken), - ProtectionGroups: - output.ProtectionGroups != null ? de_ProtectionGroups(output.ProtectionGroups, context) : undefined, - } as any; -}; +// se_UpdateSubscriptionRequest omitted. -/** - * deserializeAws_json1_1ListProtectionsResponse - */ -const de_ListProtectionsResponse = (output: any, context: __SerdeContext): ListProtectionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Protections: output.Protections != null ? de_Protections(output.Protections, context) : undefined, - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1ListResourcesInProtectionGroupResponse - */ -const de_ListResourcesInProtectionGroupResponse = ( - output: any, - context: __SerdeContext -): ListResourcesInProtectionGroupResponse => { - return { - NextToken: __expectString(output.NextToken), - ResourceArns: output.ResourceArns != null ? de_ResourceArnList(output.ResourceArns, context) : undefined, - } as any; -}; +// de_AccessDeniedForDependencyException omitted. + +// de_ApplicationLayerAutomaticResponseConfiguration omitted. + +// de_AssociateDRTLogBucketResponse omitted. + +// de_AssociateDRTRoleResponse omitted. + +// de_AssociateHealthCheckResponse omitted. + +// de_AssociateProactiveEngagementDetailsResponse omitted. /** - * deserializeAws_json1_1ListTagsForResourceResponse + * deserializeAws_json1_1AttackDetail */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; +const de_AttackDetail = (output: any, context: __SerdeContext): AttackDetail => { + return take(output, { + AttackCounters: (_: any) => de_SummarizedCounterList(_, context), + AttackId: __expectString, + AttackProperties: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Mitigations: _json, + ResourceArn: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SubResources: (_: any) => de_SubResourceSummaryList(_, context), + }) as any; }; +// de_AttackProperties omitted. + +// de_AttackProperty omitted. + /** - * deserializeAws_json1_1LockedSubscriptionException + * deserializeAws_json1_1AttackStatisticsDataItem */ -const de_LockedSubscriptionException = (output: any, context: __SerdeContext): LockedSubscriptionException => { - return { - message: __expectString(output.message), - } as any; +const de_AttackStatisticsDataItem = (output: any, context: __SerdeContext): AttackStatisticsDataItem => { + return take(output, { + AttackCount: __expectLong, + AttackVolume: (_: any) => de_AttackVolume(_, context), + }) as any; }; /** - * deserializeAws_json1_1LogBucketList + * deserializeAws_json1_1AttackStatisticsDataList */ -const de_LogBucketList = (output: any, context: __SerdeContext): string[] => { +const de_AttackStatisticsDataList = (output: any, context: __SerdeContext): AttackStatisticsDataItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AttackStatisticsDataItem(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Mitigation - */ -const de_Mitigation = (output: any, context: __SerdeContext): Mitigation => { - return { - MitigationName: __expectString(output.MitigationName), - } as any; -}; - -/** - * deserializeAws_json1_1MitigationList + * deserializeAws_json1_1AttackSummaries */ -const de_MitigationList = (output: any, context: __SerdeContext): Mitigation[] => { +const de_AttackSummaries = (output: any, context: __SerdeContext): AttackSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Mitigation(entry, context); + return de_AttackSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1NoAssociatedRoleException + * deserializeAws_json1_1AttackSummary */ -const de_NoAssociatedRoleException = (output: any, context: __SerdeContext): NoAssociatedRoleException => { - return { - message: __expectString(output.message), - } as any; +const de_AttackSummary = (output: any, context: __SerdeContext): AttackSummary => { + return take(output, { + AttackId: __expectString, + AttackVectors: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceArn: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1OptimisticLockException - */ -const de_OptimisticLockException = (output: any, context: __SerdeContext): OptimisticLockException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AttackVectorDescription omitted. -/** - * deserializeAws_json1_1Protection - */ -const de_Protection = (output: any, context: __SerdeContext): Protection => { - return { - ApplicationLayerAutomaticResponseConfiguration: - output.ApplicationLayerAutomaticResponseConfiguration != null - ? de_ApplicationLayerAutomaticResponseConfiguration( - output.ApplicationLayerAutomaticResponseConfiguration, - context - ) - : undefined, - HealthCheckIds: output.HealthCheckIds != null ? de_HealthCheckIds(output.HealthCheckIds, context) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - ProtectionArn: __expectString(output.ProtectionArn), - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_AttackVectorDescriptionList omitted. /** - * deserializeAws_json1_1ProtectionGroup + * deserializeAws_json1_1AttackVolume */ -const de_ProtectionGroup = (output: any, context: __SerdeContext): ProtectionGroup => { - return { - Aggregation: __expectString(output.Aggregation), - Members: output.Members != null ? de_ProtectionGroupMembers(output.Members, context) : undefined, - Pattern: __expectString(output.Pattern), - ProtectionGroupArn: __expectString(output.ProtectionGroupArn), - ProtectionGroupId: __expectString(output.ProtectionGroupId), - ResourceType: __expectString(output.ResourceType), - } as any; +const de_AttackVolume = (output: any, context: __SerdeContext): AttackVolume => { + return take(output, { + BitsPerSecond: (_: any) => de_AttackVolumeStatistics(_, context), + PacketsPerSecond: (_: any) => de_AttackVolumeStatistics(_, context), + RequestsPerSecond: (_: any) => de_AttackVolumeStatistics(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProtectionGroupArbitraryPatternLimits + * deserializeAws_json1_1AttackVolumeStatistics */ -const de_ProtectionGroupArbitraryPatternLimits = ( - output: any, - context: __SerdeContext -): ProtectionGroupArbitraryPatternLimits => { - return { - MaxMembers: __expectLong(output.MaxMembers), - } as any; +const de_AttackVolumeStatistics = (output: any, context: __SerdeContext): AttackVolumeStatistics => { + return take(output, { + Max: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1ProtectionGroupLimits - */ -const de_ProtectionGroupLimits = (output: any, context: __SerdeContext): ProtectionGroupLimits => { - return { - MaxProtectionGroups: __expectLong(output.MaxProtectionGroups), - PatternTypeLimits: - output.PatternTypeLimits != null - ? de_ProtectionGroupPatternTypeLimits(output.PatternTypeLimits, context) - : undefined, - } as any; -}; +// de_BlockAction omitted. + +// de_Contributor omitted. + +// de_CountAction omitted. + +// de_CreateProtectionGroupResponse omitted. + +// de_CreateProtectionResponse omitted. + +// de_CreateSubscriptionResponse omitted. + +// de_DeleteProtectionGroupResponse omitted. + +// de_DeleteProtectionResponse omitted. + +// de_DeleteSubscriptionResponse omitted. /** - * deserializeAws_json1_1ProtectionGroupMembers + * deserializeAws_json1_1DescribeAttackResponse */ -const de_ProtectionGroupMembers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeAttackResponse = (output: any, context: __SerdeContext): DescribeAttackResponse => { + return take(output, { + Attack: (_: any) => de_AttackDetail(_, context), + }) as any; }; /** - * deserializeAws_json1_1ProtectionGroupPatternTypeLimits + * deserializeAws_json1_1DescribeAttackStatisticsResponse */ -const de_ProtectionGroupPatternTypeLimits = ( +const de_DescribeAttackStatisticsResponse = ( output: any, context: __SerdeContext -): ProtectionGroupPatternTypeLimits => { - return { - ArbitraryPatternLimits: - output.ArbitraryPatternLimits != null - ? de_ProtectionGroupArbitraryPatternLimits(output.ArbitraryPatternLimits, context) - : undefined, - } as any; +): DescribeAttackStatisticsResponse => { + return take(output, { + DataItems: (_: any) => de_AttackStatisticsDataList(_, context), + TimeRange: (_: any) => de_TimeRange(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ProtectionGroups - */ -const de_ProtectionGroups = (output: any, context: __SerdeContext): ProtectionGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ProtectionGroup(entry, context); - }); - return retVal; -}; +// de_DescribeDRTAccessResponse omitted. -/** - * deserializeAws_json1_1ProtectionLimits - */ -const de_ProtectionLimits = (output: any, context: __SerdeContext): ProtectionLimits => { - return { - ProtectedResourceTypeLimits: - output.ProtectedResourceTypeLimits != null ? de_Limits(output.ProtectedResourceTypeLimits, context) : undefined, - } as any; -}; +// de_DescribeEmergencyContactSettingsResponse omitted. -/** - * deserializeAws_json1_1Protections - */ -const de_Protections = (output: any, context: __SerdeContext): Protection[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Protection(entry, context); - }); - return retVal; -}; +// de_DescribeProtectionGroupResponse omitted. -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_DescribeProtectionResponse omitted. /** - * deserializeAws_json1_1ResourceArnList + * deserializeAws_json1_1DescribeSubscriptionResponse */ -const de_ResourceArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeSubscriptionResponse = (output: any, context: __SerdeContext): DescribeSubscriptionResponse => { + return take(output, { + Subscription: (_: any) => de_Subscription(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - message: __expectString(output.message), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_DisableApplicationLayerAutomaticResponseResponse omitted. + +// de_DisableProactiveEngagementResponse omitted. + +// de_DisassociateDRTLogBucketResponse omitted. + +// de_DisassociateDRTRoleResponse omitted. + +// de_DisassociateHealthCheckResponse omitted. + +// de_EmergencyContact omitted. + +// de_EmergencyContactList omitted. + +// de_EnableApplicationLayerAutomaticResponseResponse omitted. + +// de_EnableProactiveEngagementResponse omitted. + +// de_GetSubscriptionStateResponse omitted. + +// de_HealthCheckIds omitted. + +// de_InternalErrorException omitted. + +// de_InvalidOperationException omitted. + +// de_InvalidPaginationTokenException omitted. + +// de_InvalidParameterException omitted. + +// de_InvalidResourceException omitted. + +// de_Limit omitted. + +// de_Limits omitted. + +// de_LimitsExceededException omitted. /** - * deserializeAws_json1_1ResponseAction + * deserializeAws_json1_1ListAttacksResponse */ -const de_ResponseAction = (output: any, context: __SerdeContext): ResponseAction => { - return { - Block: output.Block != null ? de_BlockAction(output.Block, context) : undefined, - Count: output.Count != null ? de_CountAction(output.Count, context) : undefined, - } as any; +const de_ListAttacksResponse = (output: any, context: __SerdeContext): ListAttacksResponse => { + return take(output, { + AttackSummaries: (_: any) => de_AttackSummaries(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListProtectionGroupsResponse omitted. + +// de_ListProtectionsResponse omitted. + +// de_ListResourcesInProtectionGroupResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_LockedSubscriptionException omitted. + +// de_LogBucketList omitted. + +// de_Mitigation omitted. + +// de_MitigationList omitted. + +// de_NoAssociatedRoleException omitted. + +// de_OptimisticLockException omitted. + +// de_Protection omitted. + +// de_ProtectionGroup omitted. + +// de_ProtectionGroupArbitraryPatternLimits omitted. + +// de_ProtectionGroupLimits omitted. + +// de_ProtectionGroupMembers omitted. + +// de_ProtectionGroupPatternTypeLimits omitted. + +// de_ProtectionGroups omitted. + +// de_ProtectionLimits omitted. + +// de_Protections omitted. + +// de_ResourceAlreadyExistsException omitted. + +// de_ResourceArnList omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResponseAction omitted. + /** * deserializeAws_json1_1SubResourceSummary */ const de_SubResourceSummary = (output: any, context: __SerdeContext): SubResourceSummary => { - return { - AttackVectors: - output.AttackVectors != null ? de_SummarizedAttackVectorList(output.AttackVectors, context) : undefined, - Counters: output.Counters != null ? de_SummarizedCounterList(output.Counters, context) : undefined, - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; + return take(output, { + AttackVectors: (_: any) => de_SummarizedAttackVectorList(_, context), + Counters: (_: any) => de_SummarizedCounterList(_, context), + Id: __expectString, + Type: __expectString, + }) as any; }; /** @@ -4371,9 +3256,6 @@ const de_SubResourceSummaryList = (output: any, context: __SerdeContext): SubRes const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SubResourceSummary(entry, context); }); return retVal; @@ -4383,44 +3265,28 @@ const de_SubResourceSummaryList = (output: any, context: __SerdeContext): SubRes * deserializeAws_json1_1Subscription */ const de_Subscription = (output: any, context: __SerdeContext): Subscription => { - return { - AutoRenew: __expectString(output.AutoRenew), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Limits: output.Limits != null ? de_Limits(output.Limits, context) : undefined, - ProactiveEngagementStatus: __expectString(output.ProactiveEngagementStatus), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - SubscriptionArn: __expectString(output.SubscriptionArn), - SubscriptionLimits: - output.SubscriptionLimits != null ? de_SubscriptionLimits(output.SubscriptionLimits, context) : undefined, - TimeCommitmentInSeconds: __expectLong(output.TimeCommitmentInSeconds), - } as any; + return take(output, { + AutoRenew: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Limits: _json, + ProactiveEngagementStatus: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SubscriptionArn: __expectString, + SubscriptionLimits: _json, + TimeCommitmentInSeconds: __expectLong, + }) as any; }; -/** - * deserializeAws_json1_1SubscriptionLimits - */ -const de_SubscriptionLimits = (output: any, context: __SerdeContext): SubscriptionLimits => { - return { - ProtectionGroupLimits: - output.ProtectionGroupLimits != null - ? de_ProtectionGroupLimits(output.ProtectionGroupLimits, context) - : undefined, - ProtectionLimits: - output.ProtectionLimits != null ? de_ProtectionLimits(output.ProtectionLimits, context) : undefined, - } as any; -}; +// de_SubscriptionLimits omitted. /** * deserializeAws_json1_1SummarizedAttackVector */ const de_SummarizedAttackVector = (output: any, context: __SerdeContext): SummarizedAttackVector => { - return { - VectorCounters: - output.VectorCounters != null ? de_SummarizedCounterList(output.VectorCounters, context) : undefined, - VectorType: __expectString(output.VectorType), - } as any; + return take(output, { + VectorCounters: (_: any) => de_SummarizedCounterList(_, context), + VectorType: __expectString, + }) as any; }; /** @@ -4430,9 +3296,6 @@ const de_SummarizedAttackVectorList = (output: any, context: __SerdeContext): Su const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SummarizedAttackVector(entry, context); }); return retVal; @@ -4442,14 +3305,14 @@ const de_SummarizedAttackVectorList = (output: any, context: __SerdeContext): Su * deserializeAws_json1_1SummarizedCounter */ const de_SummarizedCounter = (output: any, context: __SerdeContext): SummarizedCounter => { - return { - Average: __limitedParseDouble(output.Average), - Max: __limitedParseDouble(output.Max), - N: __expectInt32(output.N), - Name: __expectString(output.Name), - Sum: __limitedParseDouble(output.Sum), - Unit: __expectString(output.Unit), - } as any; + return take(output, { + Average: __limitedParseDouble, + Max: __limitedParseDouble, + N: __expectInt32, + Name: __expectString, + Sum: __limitedParseDouble, + Unit: __expectString, + }) as any; }; /** @@ -4459,142 +3322,42 @@ const de_SummarizedCounterList = (output: any, context: __SerdeContext): Summari const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SummarizedCounter(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1TimeRange */ const de_TimeRange = (output: any, context: __SerdeContext): TimeRange => { - return { - FromInclusive: - output.FromInclusive != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.FromInclusive))) - : undefined, - ToExclusive: - output.ToExclusive != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ToExclusive))) - : undefined, - } as any; + return take(output, { + FromInclusive: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ToExclusive: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1TopContributors - */ -const de_TopContributors = (output: any, context: __SerdeContext): Contributor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Contributor(entry, context); - }); - return retVal; -}; +// de_TopContributors omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseResponse - */ -const de_UpdateApplicationLayerAutomaticResponseResponse = ( - output: any, - context: __SerdeContext -): UpdateApplicationLayerAutomaticResponseResponse => { - return {} as any; -}; +// de_UpdateApplicationLayerAutomaticResponseResponse omitted. -/** - * deserializeAws_json1_1UpdateEmergencyContactSettingsResponse - */ -const de_UpdateEmergencyContactSettingsResponse = ( - output: any, - context: __SerdeContext -): UpdateEmergencyContactSettingsResponse => { - return {} as any; -}; +// de_UpdateEmergencyContactSettingsResponse omitted. -/** - * deserializeAws_json1_1UpdateProtectionGroupResponse - */ -const de_UpdateProtectionGroupResponse = (output: any, context: __SerdeContext): UpdateProtectionGroupResponse => { - return {} as any; -}; +// de_UpdateProtectionGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateSubscriptionResponse - */ -const de_UpdateSubscriptionResponse = (output: any, context: __SerdeContext): UpdateSubscriptionResponse => { - return {} as any; -}; +// de_UpdateSubscriptionResponse omitted. -/** - * deserializeAws_json1_1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_json1_1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4616,6 +3379,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-signer/src/protocols/Aws_restJson1.ts b/clients/client-signer/src/protocols/Aws_restJson1.ts index b0cb29ad77a6..0942706c6b04 100644 --- a/clients/client-signer/src/protocols/Aws_restJson1.ts +++ b/clients/client-signer/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -67,30 +69,18 @@ import { BadRequestException, ConflictException, Destination, - EncryptionAlgorithm, - EncryptionAlgorithmOptions, - HashAlgorithm, - HashAlgorithmOptions, - ImageFormat, InternalServiceErrorException, NotFoundException, - Permission, ResourceNotFoundException, S3Destination, - S3SignedObject, S3Source, ServiceLimitExceededException, SignatureValidityPeriod, - SignedObject, - SigningConfiguration, SigningConfigurationOverrides, - SigningImageFormat, SigningJob, SigningJobRevocationRecord, SigningMaterial, - SigningPlatform, SigningPlatformOverrides, - SigningProfile, SigningProfileRevocationRecord, Source, ThrottlingException, @@ -115,13 +105,15 @@ export const se_AddProfilePermissionCommand = async ( "/signing-profiles/{profileName}/permissions"; resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName!, "{profileName}", false); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: input.action }), - ...(input.principal != null && { principal: input.principal }), - ...(input.profileVersion != null && { profileVersion: input.profileVersion }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - ...(input.statementId != null && { statementId: input.statementId }), - }); + body = JSON.stringify( + take(input, { + action: [], + principal: [], + profileVersion: [], + revisionId: [], + statementId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -399,18 +391,16 @@ export const se_PutSigningProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}"; resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName!, "{profileName}", false); let body: any; - body = JSON.stringify({ - ...(input.overrides != null && { overrides: se_SigningPlatformOverrides(input.overrides, context) }), - ...(input.platformId != null && { platformId: input.platformId }), - ...(input.signatureValidityPeriod != null && { - signatureValidityPeriod: se_SignatureValidityPeriod(input.signatureValidityPeriod, context), - }), - ...(input.signingMaterial != null && { signingMaterial: se_SigningMaterial(input.signingMaterial, context) }), - ...(input.signingParameters != null && { - signingParameters: se_SigningParameters(input.signingParameters, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + overrides: (_) => _json(_), + platformId: [], + signatureValidityPeriod: (_) => _json(_), + signingMaterial: (_) => _json(_), + signingParameters: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -467,10 +457,12 @@ export const se_RevokeSignatureCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs/{jobId}/revoke"; resolvedPath = __resolvedPath(resolvedPath, input, "jobId", () => input.jobId!, "{jobId}", false); let body: any; - body = JSON.stringify({ - ...(input.jobOwner != null && { jobOwner: input.jobOwner }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + jobOwner: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -497,11 +489,13 @@ export const se_RevokeSigningProfileCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-profiles/{profileName}/revoke"; resolvedPath = __resolvedPath(resolvedPath, input, "profileName", () => input.profileName!, "{profileName}", false); let body: any; - body = JSON.stringify({ - ...(input.effectiveTime != null && { effectiveTime: Math.round(input.effectiveTime.getTime() / 1000) }), - ...(input.profileVersion != null && { profileVersion: input.profileVersion }), - ...(input.reason != null && { reason: input.reason }), - }); + body = JSON.stringify( + take(input, { + effectiveTime: (_) => Math.round(_.getTime() / 1000), + profileVersion: [], + reason: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -526,13 +520,15 @@ export const se_StartSigningJobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signing-jobs"; let body: any; - body = JSON.stringify({ - clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(), - ...(input.destination != null && { destination: se_Destination(input.destination, context) }), - ...(input.profileName != null && { profileName: input.profileName }), - ...(input.profileOwner != null && { profileOwner: input.profileOwner }), - ...(input.source != null && { source: se_Source(input.source, context) }), - }); + body = JSON.stringify( + take(input, { + clientRequestToken: (_) => _ ?? generateIdempotencyToken(), + destination: (_) => _json(_), + profileName: [], + profileOwner: [], + source: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -558,9 +554,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -616,9 +614,10 @@ export const de_AddProfilePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -658,10 +657,9 @@ const de_AddProfilePermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -711,10 +709,9 @@ const de_CancelSigningProfileCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -734,63 +731,28 @@ export const de_DescribeSigningJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completedAt != null) { - contents.completedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completedAt))); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobInvoker != null) { - contents.jobInvoker = __expectString(data.jobInvoker); - } - if (data.jobOwner != null) { - contents.jobOwner = __expectString(data.jobOwner); - } - if (data.overrides != null) { - contents.overrides = de_SigningPlatformOverrides(data.overrides, context); - } - if (data.platformDisplayName != null) { - contents.platformDisplayName = __expectString(data.platformDisplayName); - } - if (data.platformId != null) { - contents.platformId = __expectString(data.platformId); - } - if (data.profileName != null) { - contents.profileName = __expectString(data.profileName); - } - if (data.profileVersion != null) { - contents.profileVersion = __expectString(data.profileVersion); - } - if (data.requestedBy != null) { - contents.requestedBy = __expectString(data.requestedBy); - } - if (data.revocationRecord != null) { - contents.revocationRecord = de_SigningJobRevocationRecord(data.revocationRecord, context); - } - if (data.signatureExpiresAt != null) { - contents.signatureExpiresAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.signatureExpiresAt))); - } - if (data.signedObject != null) { - contents.signedObject = de_SignedObject(data.signedObject, context); - } - if (data.signingMaterial != null) { - contents.signingMaterial = de_SigningMaterial(data.signingMaterial, context); - } - if (data.signingParameters != null) { - contents.signingParameters = de_SigningParameters(data.signingParameters, context); - } - if (data.source != null) { - contents.source = de_Source(data.source, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } + const doc = take(data, { + completedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + jobId: __expectString, + jobInvoker: __expectString, + jobOwner: __expectString, + overrides: _json, + platformDisplayName: __expectString, + platformId: __expectString, + profileName: __expectString, + profileVersion: __expectString, + requestedBy: __expectString, + revocationRecord: (_) => de_SigningJobRevocationRecord(_, context), + signatureExpiresAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + signedObject: _json, + signingMaterial: _json, + signingParameters: _json, + source: _json, + status: __expectString, + statusReason: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -821,10 +783,9 @@ const de_DescribeSigningJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -844,33 +805,18 @@ export const de_GetSigningPlatformCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.category != null) { - contents.category = __expectString(data.category); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.maxSizeInMB != null) { - contents.maxSizeInMB = __expectInt32(data.maxSizeInMB); - } - if (data.partner != null) { - contents.partner = __expectString(data.partner); - } - if (data.platformId != null) { - contents.platformId = __expectString(data.platformId); - } - if (data.revocationSupported != null) { - contents.revocationSupported = __expectBoolean(data.revocationSupported); - } - if (data.signingConfiguration != null) { - contents.signingConfiguration = de_SigningConfiguration(data.signingConfiguration, context); - } - if (data.signingImageFormat != null) { - contents.signingImageFormat = de_SigningImageFormat(data.signingImageFormat, context); - } - if (data.target != null) { - contents.target = __expectString(data.target); - } + const doc = take(data, { + category: __expectString, + displayName: __expectString, + maxSizeInMB: __expectInt32, + partner: __expectString, + platformId: __expectString, + revocationSupported: __expectBoolean, + signingConfiguration: _json, + signingImageFormat: _json, + target: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -901,10 +847,9 @@ const de_GetSigningPlatformCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -924,48 +869,23 @@ export const de_GetSigningProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.overrides != null) { - contents.overrides = de_SigningPlatformOverrides(data.overrides, context); - } - if (data.platformDisplayName != null) { - contents.platformDisplayName = __expectString(data.platformDisplayName); - } - if (data.platformId != null) { - contents.platformId = __expectString(data.platformId); - } - if (data.profileName != null) { - contents.profileName = __expectString(data.profileName); - } - if (data.profileVersion != null) { - contents.profileVersion = __expectString(data.profileVersion); - } - if (data.profileVersionArn != null) { - contents.profileVersionArn = __expectString(data.profileVersionArn); - } - if (data.revocationRecord != null) { - contents.revocationRecord = de_SigningProfileRevocationRecord(data.revocationRecord, context); - } - if (data.signatureValidityPeriod != null) { - contents.signatureValidityPeriod = de_SignatureValidityPeriod(data.signatureValidityPeriod, context); - } - if (data.signingMaterial != null) { - contents.signingMaterial = de_SigningMaterial(data.signingMaterial, context); - } - if (data.signingParameters != null) { - contents.signingParameters = de_SigningParameters(data.signingParameters, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.statusReason != null) { - contents.statusReason = __expectString(data.statusReason); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + overrides: _json, + platformDisplayName: __expectString, + platformId: __expectString, + profileName: __expectString, + profileVersion: __expectString, + profileVersionArn: __expectString, + revocationRecord: (_) => de_SigningProfileRevocationRecord(_, context), + signatureValidityPeriod: _json, + signingMaterial: _json, + signingParameters: _json, + status: __expectString, + statusReason: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -996,10 +916,9 @@ const de_GetSigningProfileCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1019,18 +938,13 @@ export const de_ListProfilePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.permissions != null) { - contents.permissions = de_Permissions(data.permissions, context); - } - if (data.policySizeBytes != null) { - contents.policySizeBytes = __expectInt32(data.policySizeBytes); - } - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + nextToken: __expectString, + permissions: _json, + policySizeBytes: __expectInt32, + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1064,10 +978,9 @@ const de_ListProfilePermissionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1087,12 +1000,11 @@ export const de_ListSigningJobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobs != null) { - contents.jobs = de_SigningJobs(data.jobs, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + jobs: (_) => de_SigningJobs(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1123,10 +1035,9 @@ const de_ListSigningJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1146,12 +1057,11 @@ export const de_ListSigningPlatformsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.platforms != null) { - contents.platforms = de_SigningPlatforms(data.platforms, context); - } + const doc = take(data, { + nextToken: __expectString, + platforms: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1182,10 +1092,9 @@ const de_ListSigningPlatformsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1205,12 +1114,11 @@ export const de_ListSigningProfilesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.profiles != null) { - contents.profiles = de_SigningProfiles(data.profiles, context); - } + const doc = take(data, { + nextToken: __expectString, + profiles: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1238,10 +1146,9 @@ const de_ListSigningProfilesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1261,9 +1168,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1294,10 +1202,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1317,15 +1224,12 @@ export const de_PutSigningProfileCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.profileVersion != null) { - contents.profileVersion = __expectString(data.profileVersion); - } - if (data.profileVersionArn != null) { - contents.profileVersionArn = __expectString(data.profileVersionArn); - } + const doc = take(data, { + arn: __expectString, + profileVersion: __expectString, + profileVersionArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1359,10 +1263,9 @@ const de_PutSigningProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1382,9 +1285,10 @@ export const de_RemoveProfilePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.revisionId != null) { - contents.revisionId = __expectString(data.revisionId); - } + const doc = take(data, { + revisionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1421,10 +1325,9 @@ const de_RemoveProfilePermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1477,10 +1380,9 @@ const de_RevokeSignatureCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1533,10 +1435,9 @@ const de_RevokeSigningProfileCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1556,12 +1457,11 @@ export const de_StartSigningJobCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.jobId != null) { - contents.jobId = __expectString(data.jobId); - } - if (data.jobOwner != null) { - contents.jobOwner = __expectString(data.jobOwner); - } + const doc = take(data, { + jobId: __expectString, + jobOwner: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1598,10 +1498,9 @@ const de_StartSigningJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1651,10 +1550,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1704,16 +1602,15 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1723,12 +1620,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1742,12 +1638,11 @@ const de_AccessDeniedExceptionRes = async ( const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1761,12 +1656,11 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1783,12 +1677,11 @@ const de_InternalServiceErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServiceErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1802,12 +1695,11 @@ const de_InternalServiceErrorExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1824,12 +1716,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1846,12 +1737,11 @@ const de_ServiceLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1865,12 +1755,11 @@ const de_ServiceLimitExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1887,12 +1776,11 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1906,12 +1794,11 @@ const de_TooManyRequestsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.code != null) { - contents.code = __expectString(data.code); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + code: __expectString, + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1919,314 +1806,85 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Destination - */ -const se_Destination = (input: Destination, context: __SerdeContext): any => { - return { - ...(input.s3 != null && { s3: se_S3Destination(input.s3, context) }), - }; -}; +// se_Destination omitted. -/** - * serializeAws_restJson1S3Destination - */ -const se_S3Destination = (input: S3Destination, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.prefix != null && { prefix: input.prefix }), - }; -}; +// se_S3Destination omitted. -/** - * serializeAws_restJson1S3Source - */ -const se_S3Source = (input: S3Source, context: __SerdeContext): any => { - return { - ...(input.bucketName != null && { bucketName: input.bucketName }), - ...(input.key != null && { key: input.key }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_S3Source omitted. -/** - * serializeAws_restJson1SignatureValidityPeriod - */ -const se_SignatureValidityPeriod = (input: SignatureValidityPeriod, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_SignatureValidityPeriod omitted. -/** - * serializeAws_restJson1SigningConfigurationOverrides - */ -const se_SigningConfigurationOverrides = (input: SigningConfigurationOverrides, context: __SerdeContext): any => { - return { - ...(input.encryptionAlgorithm != null && { encryptionAlgorithm: input.encryptionAlgorithm }), - ...(input.hashAlgorithm != null && { hashAlgorithm: input.hashAlgorithm }), - }; -}; +// se_SigningConfigurationOverrides omitted. -/** - * serializeAws_restJson1SigningMaterial - */ -const se_SigningMaterial = (input: SigningMaterial, context: __SerdeContext): any => { - return { - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - }; -}; +// se_SigningMaterial omitted. -/** - * serializeAws_restJson1SigningParameters - */ -const se_SigningParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SigningParameters omitted. -/** - * serializeAws_restJson1SigningPlatformOverrides - */ -const se_SigningPlatformOverrides = (input: SigningPlatformOverrides, context: __SerdeContext): any => { - return { - ...(input.signingConfiguration != null && { - signingConfiguration: se_SigningConfigurationOverrides(input.signingConfiguration, context), - }), - ...(input.signingImageFormat != null && { signingImageFormat: input.signingImageFormat }), - }; -}; +// se_SigningPlatformOverrides omitted. -/** - * serializeAws_restJson1Source - */ -const se_Source = (input: Source, context: __SerdeContext): any => { - return { - ...(input.s3 != null && { s3: se_S3Source(input.s3, context) }), - }; -}; +// se_Source omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1EncryptionAlgorithmOptions - */ -const de_EncryptionAlgorithmOptions = (output: any, context: __SerdeContext): EncryptionAlgorithmOptions => { - return { - allowedValues: output.allowedValues != null ? de_EncryptionAlgorithms(output.allowedValues, context) : undefined, - defaultValue: __expectString(output.defaultValue), - } as any; -}; +// de_EncryptionAlgorithmOptions omitted. -/** - * deserializeAws_restJson1EncryptionAlgorithms - */ -const de_EncryptionAlgorithms = (output: any, context: __SerdeContext): (EncryptionAlgorithm | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EncryptionAlgorithms omitted. -/** - * deserializeAws_restJson1HashAlgorithmOptions - */ -const de_HashAlgorithmOptions = (output: any, context: __SerdeContext): HashAlgorithmOptions => { - return { - allowedValues: output.allowedValues != null ? de_HashAlgorithms(output.allowedValues, context) : undefined, - defaultValue: __expectString(output.defaultValue), - } as any; -}; +// de_HashAlgorithmOptions omitted. -/** - * deserializeAws_restJson1HashAlgorithms - */ -const de_HashAlgorithms = (output: any, context: __SerdeContext): (HashAlgorithm | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HashAlgorithms omitted. -/** - * deserializeAws_restJson1ImageFormats - */ -const de_ImageFormats = (output: any, context: __SerdeContext): (ImageFormat | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ImageFormats omitted. -/** - * deserializeAws_restJson1Permission - */ -const de_Permission = (output: any, context: __SerdeContext): Permission => { - return { - action: __expectString(output.action), - principal: __expectString(output.principal), - profileVersion: __expectString(output.profileVersion), - statementId: __expectString(output.statementId), - } as any; -}; +// de_Permission omitted. -/** - * deserializeAws_restJson1Permissions - */ -const de_Permissions = (output: any, context: __SerdeContext): Permission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Permission(entry, context); - }); - return retVal; -}; +// de_Permissions omitted. -/** - * deserializeAws_restJson1S3SignedObject - */ -const de_S3SignedObject = (output: any, context: __SerdeContext): S3SignedObject => { - return { - bucketName: __expectString(output.bucketName), - key: __expectString(output.key), - } as any; -}; +// de_S3SignedObject omitted. -/** - * deserializeAws_restJson1S3Source - */ -const de_S3Source = (output: any, context: __SerdeContext): S3Source => { - return { - bucketName: __expectString(output.bucketName), - key: __expectString(output.key), - version: __expectString(output.version), - } as any; -}; +// de_S3Source omitted. -/** - * deserializeAws_restJson1SignatureValidityPeriod - */ -const de_SignatureValidityPeriod = (output: any, context: __SerdeContext): SignatureValidityPeriod => { - return { - type: __expectString(output.type), - value: __expectInt32(output.value), - } as any; -}; +// de_SignatureValidityPeriod omitted. -/** - * deserializeAws_restJson1SignedObject - */ -const de_SignedObject = (output: any, context: __SerdeContext): SignedObject => { - return { - s3: output.s3 != null ? de_S3SignedObject(output.s3, context) : undefined, - } as any; -}; +// de_SignedObject omitted. -/** - * deserializeAws_restJson1SigningConfiguration - */ -const de_SigningConfiguration = (output: any, context: __SerdeContext): SigningConfiguration => { - return { - encryptionAlgorithmOptions: - output.encryptionAlgorithmOptions != null - ? de_EncryptionAlgorithmOptions(output.encryptionAlgorithmOptions, context) - : undefined, - hashAlgorithmOptions: - output.hashAlgorithmOptions != null ? de_HashAlgorithmOptions(output.hashAlgorithmOptions, context) : undefined, - } as any; -}; +// de_SigningConfiguration omitted. -/** - * deserializeAws_restJson1SigningConfigurationOverrides - */ -const de_SigningConfigurationOverrides = (output: any, context: __SerdeContext): SigningConfigurationOverrides => { - return { - encryptionAlgorithm: __expectString(output.encryptionAlgorithm), - hashAlgorithm: __expectString(output.hashAlgorithm), - } as any; -}; +// de_SigningConfigurationOverrides omitted. -/** - * deserializeAws_restJson1SigningImageFormat - */ -const de_SigningImageFormat = (output: any, context: __SerdeContext): SigningImageFormat => { - return { - defaultFormat: __expectString(output.defaultFormat), - supportedFormats: output.supportedFormats != null ? de_ImageFormats(output.supportedFormats, context) : undefined, - } as any; -}; +// de_SigningImageFormat omitted. /** * deserializeAws_restJson1SigningJob */ const de_SigningJob = (output: any, context: __SerdeContext): SigningJob => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - isRevoked: __expectBoolean(output.isRevoked), - jobId: __expectString(output.jobId), - jobInvoker: __expectString(output.jobInvoker), - jobOwner: __expectString(output.jobOwner), - platformDisplayName: __expectString(output.platformDisplayName), - platformId: __expectString(output.platformId), - profileName: __expectString(output.profileName), - profileVersion: __expectString(output.profileVersion), - signatureExpiresAt: - output.signatureExpiresAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.signatureExpiresAt))) - : undefined, - signedObject: output.signedObject != null ? de_SignedObject(output.signedObject, context) : undefined, - signingMaterial: output.signingMaterial != null ? de_SigningMaterial(output.signingMaterial, context) : undefined, - source: output.source != null ? de_Source(output.source, context) : undefined, - status: __expectString(output.status), - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + isRevoked: __expectBoolean, + jobId: __expectString, + jobInvoker: __expectString, + jobOwner: __expectString, + platformDisplayName: __expectString, + platformId: __expectString, + profileName: __expectString, + profileVersion: __expectString, + signatureExpiresAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + signedObject: _json, + signingMaterial: _json, + source: _json, + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1SigningJobRevocationRecord */ const de_SigningJobRevocationRecord = (output: any, context: __SerdeContext): SigningJobRevocationRecord => { - return { - reason: __expectString(output.reason), - revokedAt: - output.revokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revokedAt))) : undefined, - revokedBy: __expectString(output.revokedBy), - } as any; + return take(output, { + reason: __expectString, + revokedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + revokedBy: __expectString, + }) as any; }; /** @@ -2236,157 +1894,39 @@ const de_SigningJobs = (output: any, context: __SerdeContext): SigningJob[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SigningJob(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SigningMaterial - */ -const de_SigningMaterial = (output: any, context: __SerdeContext): SigningMaterial => { - return { - certificateArn: __expectString(output.certificateArn), - } as any; -}; +// de_SigningMaterial omitted. -/** - * deserializeAws_restJson1SigningParameters - */ -const de_SigningParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SigningParameters omitted. -/** - * deserializeAws_restJson1SigningPlatform - */ -const de_SigningPlatform = (output: any, context: __SerdeContext): SigningPlatform => { - return { - category: __expectString(output.category), - displayName: __expectString(output.displayName), - maxSizeInMB: __expectInt32(output.maxSizeInMB), - partner: __expectString(output.partner), - platformId: __expectString(output.platformId), - revocationSupported: __expectBoolean(output.revocationSupported), - signingConfiguration: - output.signingConfiguration != null ? de_SigningConfiguration(output.signingConfiguration, context) : undefined, - signingImageFormat: - output.signingImageFormat != null ? de_SigningImageFormat(output.signingImageFormat, context) : undefined, - target: __expectString(output.target), - } as any; -}; +// de_SigningPlatform omitted. -/** - * deserializeAws_restJson1SigningPlatformOverrides - */ -const de_SigningPlatformOverrides = (output: any, context: __SerdeContext): SigningPlatformOverrides => { - return { - signingConfiguration: - output.signingConfiguration != null - ? de_SigningConfigurationOverrides(output.signingConfiguration, context) - : undefined, - signingImageFormat: __expectString(output.signingImageFormat), - } as any; -}; +// de_SigningPlatformOverrides omitted. -/** - * deserializeAws_restJson1SigningPlatforms - */ -const de_SigningPlatforms = (output: any, context: __SerdeContext): SigningPlatform[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SigningPlatform(entry, context); - }); - return retVal; -}; +// de_SigningPlatforms omitted. -/** - * deserializeAws_restJson1SigningProfile - */ -const de_SigningProfile = (output: any, context: __SerdeContext): SigningProfile => { - return { - arn: __expectString(output.arn), - platformDisplayName: __expectString(output.platformDisplayName), - platformId: __expectString(output.platformId), - profileName: __expectString(output.profileName), - profileVersion: __expectString(output.profileVersion), - profileVersionArn: __expectString(output.profileVersionArn), - signatureValidityPeriod: - output.signatureValidityPeriod != null - ? de_SignatureValidityPeriod(output.signatureValidityPeriod, context) - : undefined, - signingMaterial: output.signingMaterial != null ? de_SigningMaterial(output.signingMaterial, context) : undefined, - signingParameters: - output.signingParameters != null ? de_SigningParameters(output.signingParameters, context) : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_SigningProfile omitted. /** * deserializeAws_restJson1SigningProfileRevocationRecord */ const de_SigningProfileRevocationRecord = (output: any, context: __SerdeContext): SigningProfileRevocationRecord => { - return { - revocationEffectiveFrom: - output.revocationEffectiveFrom != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revocationEffectiveFrom))) - : undefined, - revokedAt: - output.revokedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.revokedAt))) : undefined, - revokedBy: __expectString(output.revokedBy), - } as any; + return take(output, { + revocationEffectiveFrom: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + revokedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + revokedBy: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SigningProfiles - */ -const de_SigningProfiles = (output: any, context: __SerdeContext): SigningProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SigningProfile(entry, context); - }); - return retVal; -}; +// de_SigningProfiles omitted. -/** - * deserializeAws_restJson1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - s3: output.s3 != null ? de_S3Source(output.s3, context) : undefined, - } as any; -}; +// de_Source omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-simspaceweaver/src/protocols/Aws_restJson1.ts b/clients/client-simspaceweaver/src/protocols/Aws_restJson1.ts index 7352abd7b762..0c1a7606b375 100644 --- a/clients/client-simspaceweaver/src/protocols/Aws_restJson1.ts +++ b/clients/client-simspaceweaver/src/protocols/Aws_restJson1.ts @@ -1,17 +1,18 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -40,21 +41,12 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { AccessDeniedException, - CloudWatchLogsLogGroup, ConflictException, - Domain, InternalServerException, LaunchOverrides, - LiveSimulationState, - LogDestination, - LoggingConfiguration, ResourceNotFoundException, S3Location, ServiceQuotaExceededException, - SimulationAppEndpointInfo, - SimulationAppMetadata, - SimulationAppPortMapping, - SimulationClock, SimulationMetadata, TooManyTagsException, ValidationException, @@ -261,14 +253,16 @@ export const se_StartAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startapp"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.LaunchOverrides != null && { LaunchOverrides: se_LaunchOverrides(input.LaunchOverrides, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Simulation != null && { Simulation: input.Simulation }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Domain: [], + LaunchOverrides: (_) => _json(_), + Name: [], + Simulation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -293,9 +287,11 @@ export const se_StartClockCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startclock"; let body: any; - body = JSON.stringify({ - ...(input.Simulation != null && { Simulation: input.Simulation }), - }); + body = JSON.stringify( + take(input, { + Simulation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -320,15 +316,17 @@ export const se_StartSimulationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startsimulation"; let body: any; - body = JSON.stringify({ - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.MaximumDuration != null && { MaximumDuration: input.MaximumDuration }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SchemaS3Location != null && { SchemaS3Location: se_S3Location(input.SchemaS3Location, context) }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + MaximumDuration: [], + Name: [], + RoleArn: [], + SchemaS3Location: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -353,11 +351,13 @@ export const se_StopAppCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopapp"; let body: any; - body = JSON.stringify({ - ...(input.App != null && { App: input.App }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.Simulation != null && { Simulation: input.Simulation }), - }); + body = JSON.stringify( + take(input, { + App: [], + Domain: [], + Simulation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -382,9 +382,11 @@ export const se_StopClockCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopclock"; let body: any; - body = JSON.stringify({ - ...(input.Simulation != null && { Simulation: input.Simulation }), - }); + body = JSON.stringify( + take(input, { + Simulation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -409,9 +411,11 @@ export const se_StopSimulationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/stopsimulation"; let body: any; - body = JSON.stringify({ - ...(input.Simulation != null && { Simulation: input.Simulation }), - }); + body = JSON.stringify( + take(input, { + Simulation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -437,9 +441,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -528,10 +534,9 @@ const de_DeleteAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -584,10 +589,9 @@ const de_DeleteSimulationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -607,30 +611,17 @@ export const de_DescribeAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.Domain != null) { - contents.Domain = __expectString(data.Domain); - } - if (data.EndpointInfo != null) { - contents.EndpointInfo = de_SimulationAppEndpointInfo(data.EndpointInfo, context); - } - if (data.LaunchOverrides != null) { - contents.LaunchOverrides = de_LaunchOverrides(data.LaunchOverrides, context); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Simulation != null) { - contents.Simulation = __expectString(data.Simulation); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.TargetStatus != null) { - contents.TargetStatus = __expectString(data.TargetStatus); - } + const doc = take(data, { + Description: __expectString, + Domain: __expectString, + EndpointInfo: _json, + LaunchOverrides: _json, + Name: __expectString, + Simulation: __expectString, + Status: __expectString, + TargetStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -661,10 +652,9 @@ const de_DescribeAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -684,45 +674,22 @@ export const de_DescribeSimulationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.Description != null) { - contents.Description = __expectString(data.Description); - } - if (data.ExecutionId != null) { - contents.ExecutionId = __expectString(data.ExecutionId); - } - if (data.LiveSimulationState != null) { - contents.LiveSimulationState = de_LiveSimulationState(data.LiveSimulationState, context); - } - if (data.LoggingConfiguration != null) { - contents.LoggingConfiguration = de_LoggingConfiguration(data.LoggingConfiguration, context); - } - if (data.MaximumDuration != null) { - contents.MaximumDuration = __expectString(data.MaximumDuration); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.RoleArn != null) { - contents.RoleArn = __expectString(data.RoleArn); - } - if (data.SchemaError != null) { - contents.SchemaError = __expectString(data.SchemaError); - } - if (data.SchemaS3Location != null) { - contents.SchemaS3Location = de_S3Location(data.SchemaS3Location, context); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.TargetStatus != null) { - contents.TargetStatus = __expectString(data.TargetStatus); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ExecutionId: __expectString, + LiveSimulationState: _json, + LoggingConfiguration: _json, + MaximumDuration: __expectString, + Name: __expectString, + RoleArn: __expectString, + SchemaError: __expectString, + SchemaS3Location: _json, + Status: __expectString, + TargetStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -753,10 +720,9 @@ const de_DescribeSimulationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -776,12 +742,11 @@ export const de_ListAppsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Apps != null) { - contents.Apps = de_SimulationAppList(data.Apps, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Apps: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -812,10 +777,9 @@ const de_ListAppsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -835,12 +799,11 @@ export const de_ListSimulationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Simulations != null) { - contents.Simulations = de_SimulationList(data.Simulations, context); - } + const doc = take(data, { + NextToken: __expectString, + Simulations: (_) => de_SimulationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -868,10 +831,9 @@ const de_ListSimulationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -891,9 +853,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -918,10 +881,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -941,15 +903,12 @@ export const de_StartAppCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Domain != null) { - contents.Domain = __expectString(data.Domain); - } - if (data.Name != null) { - contents.Name = __expectString(data.Name); - } - if (data.Simulation != null) { - contents.Simulation = __expectString(data.Simulation); - } + const doc = take(data, { + Domain: __expectString, + Name: __expectString, + Simulation: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -983,10 +942,9 @@ const de_StartAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1039,10 +997,9 @@ const de_StartClockCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1062,15 +1019,12 @@ export const de_StartSimulationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Arn != null) { - contents.Arn = __expectString(data.Arn); - } - if (data.CreationTime != null) { - contents.CreationTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreationTime))); - } - if (data.ExecutionId != null) { - contents.ExecutionId = __expectString(data.ExecutionId); - } + const doc = take(data, { + Arn: __expectString, + CreationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1104,10 +1058,9 @@ const de_StartSimulationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1160,10 +1113,9 @@ const de_StopAppCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1216,10 +1168,9 @@ const de_StopClockCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1272,10 +1223,9 @@ const de_StopSimulationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1322,10 +1272,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1369,16 +1318,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1388,9 +1336,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1404,9 +1353,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1423,9 +1373,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1442,9 +1393,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1461,9 +1413,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1480,9 +1433,10 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1496,9 +1450,10 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1506,251 +1461,47 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1LaunchCommandList - */ -const se_LaunchCommandList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LaunchCommandList omitted. -/** - * serializeAws_restJson1LaunchOverrides - */ -const se_LaunchOverrides = (input: LaunchOverrides, context: __SerdeContext): any => { - return { - ...(input.LaunchCommands != null && { LaunchCommands: se_LaunchCommandList(input.LaunchCommands, context) }), - }; -}; +// se_LaunchOverrides omitted. -/** - * serializeAws_restJson1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.ObjectKey != null && { ObjectKey: input.ObjectKey }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1AppPortMappings - */ -const de_AppPortMappings = (output: any, context: __SerdeContext): SimulationAppPortMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimulationAppPortMapping(entry, context); - }); - return retVal; -}; +// de_AppPortMappings omitted. -/** - * deserializeAws_restJson1CloudWatchLogsLogGroup - */ -const de_CloudWatchLogsLogGroup = (output: any, context: __SerdeContext): CloudWatchLogsLogGroup => { - return { - LogGroupArn: __expectString(output.LogGroupArn), - } as any; -}; +// de_CloudWatchLogsLogGroup omitted. -/** - * deserializeAws_restJson1Domain - */ -const de_Domain = (output: any, context: __SerdeContext): Domain => { - return { - Lifecycle: __expectString(output.Lifecycle), - Name: __expectString(output.Name), - } as any; -}; +// de_Domain omitted. -/** - * deserializeAws_restJson1DomainList - */ -const de_DomainList = (output: any, context: __SerdeContext): Domain[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Domain(entry, context); - }); - return retVal; -}; +// de_DomainList omitted. -/** - * deserializeAws_restJson1LaunchCommandList - */ -const de_LaunchCommandList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LaunchCommandList omitted. -/** - * deserializeAws_restJson1LaunchOverrides - */ -const de_LaunchOverrides = (output: any, context: __SerdeContext): LaunchOverrides => { - return { - LaunchCommands: output.LaunchCommands != null ? de_LaunchCommandList(output.LaunchCommands, context) : undefined, - } as any; -}; +// de_LaunchOverrides omitted. -/** - * deserializeAws_restJson1LiveSimulationState - */ -const de_LiveSimulationState = (output: any, context: __SerdeContext): LiveSimulationState => { - return { - Clocks: output.Clocks != null ? de_SimulationClockList(output.Clocks, context) : undefined, - Domains: output.Domains != null ? de_DomainList(output.Domains, context) : undefined, - } as any; -}; +// de_LiveSimulationState omitted. -/** - * deserializeAws_restJson1LogDestination - */ -const de_LogDestination = (output: any, context: __SerdeContext): LogDestination => { - return { - CloudWatchLogsLogGroup: - output.CloudWatchLogsLogGroup != null - ? de_CloudWatchLogsLogGroup(output.CloudWatchLogsLogGroup, context) - : undefined, - } as any; -}; +// de_LogDestination omitted. -/** - * deserializeAws_restJson1LogDestinations - */ -const de_LogDestinations = (output: any, context: __SerdeContext): LogDestination[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LogDestination(entry, context); - }); - return retVal; -}; +// de_LogDestinations omitted. -/** - * deserializeAws_restJson1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - Destinations: output.Destinations != null ? de_LogDestinations(output.Destinations, context) : undefined, - } as any; -}; +// de_LoggingConfiguration omitted. -/** - * deserializeAws_restJson1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - BucketName: __expectString(output.BucketName), - ObjectKey: __expectString(output.ObjectKey), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_restJson1SimulationAppEndpointInfo - */ -const de_SimulationAppEndpointInfo = (output: any, context: __SerdeContext): SimulationAppEndpointInfo => { - return { - Address: __expectString(output.Address), - IngressPortMappings: - output.IngressPortMappings != null ? de_AppPortMappings(output.IngressPortMappings, context) : undefined, - } as any; -}; +// de_SimulationAppEndpointInfo omitted. -/** - * deserializeAws_restJson1SimulationAppList - */ -const de_SimulationAppList = (output: any, context: __SerdeContext): SimulationAppMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimulationAppMetadata(entry, context); - }); - return retVal; -}; +// de_SimulationAppList omitted. -/** - * deserializeAws_restJson1SimulationAppMetadata - */ -const de_SimulationAppMetadata = (output: any, context: __SerdeContext): SimulationAppMetadata => { - return { - Domain: __expectString(output.Domain), - Name: __expectString(output.Name), - Simulation: __expectString(output.Simulation), - Status: __expectString(output.Status), - TargetStatus: __expectString(output.TargetStatus), - } as any; -}; +// de_SimulationAppMetadata omitted. -/** - * deserializeAws_restJson1SimulationAppPortMapping - */ -const de_SimulationAppPortMapping = (output: any, context: __SerdeContext): SimulationAppPortMapping => { - return { - Actual: __expectInt32(output.Actual), - Declared: __expectInt32(output.Declared), - } as any; -}; +// de_SimulationAppPortMapping omitted. -/** - * deserializeAws_restJson1SimulationClock - */ -const de_SimulationClock = (output: any, context: __SerdeContext): SimulationClock => { - return { - Status: __expectString(output.Status), - TargetStatus: __expectString(output.TargetStatus), - } as any; -}; +// de_SimulationClock omitted. -/** - * deserializeAws_restJson1SimulationClockList - */ -const de_SimulationClockList = (output: any, context: __SerdeContext): SimulationClock[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimulationClock(entry, context); - }); - return retVal; -}; +// de_SimulationClockList omitted. /** * deserializeAws_restJson1SimulationList @@ -1759,9 +1510,6 @@ const de_SimulationList = (output: any, context: __SerdeContext): SimulationMeta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SimulationMetadata(entry, context); }); return retVal; @@ -1771,30 +1519,16 @@ const de_SimulationList = (output: any, context: __SerdeContext): SimulationMeta * deserializeAws_restJson1SimulationMetadata */ const de_SimulationMetadata = (output: any, context: __SerdeContext): SimulationMetadata => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Name: __expectString(output.Name), - Status: __expectString(output.Status), - TargetStatus: __expectString(output.TargetStatus), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Status: __expectString, + TargetStatus: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sms/src/protocols/Aws_json1_1.ts b/clients/client-sms/src/protocols/Aws_json1_1.ts index 46c019dac983..79deb4d7af71 100644 --- a/clients/client-sms/src/protocols/Aws_json1_1.ts +++ b/clients/client-sms/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -115,40 +117,26 @@ import { import { AppSummary, AppValidationConfiguration, - AppValidationOutput, Connector, - ConnectorCapability, CreateAppRequest, CreateAppResponse, CreateReplicationJobRequest, - CreateReplicationJobResponse, DeleteAppLaunchConfigurationRequest, - DeleteAppLaunchConfigurationResponse, DeleteAppReplicationConfigurationRequest, - DeleteAppReplicationConfigurationResponse, DeleteAppRequest, - DeleteAppResponse, DeleteAppValidationConfigurationRequest, - DeleteAppValidationConfigurationResponse, DeleteReplicationJobRequest, - DeleteReplicationJobResponse, DeleteServerCatalogRequest, - DeleteServerCatalogResponse, DisassociateConnectorRequest, - DisassociateConnectorResponse, DryRunOperationException, GenerateChangeSetRequest, - GenerateChangeSetResponse, GenerateTemplateRequest, - GenerateTemplateResponse, GetAppLaunchConfigurationRequest, - GetAppLaunchConfigurationResponse, GetAppReplicationConfigurationRequest, GetAppReplicationConfigurationResponse, GetAppRequest, GetAppResponse, GetAppValidationConfigurationRequest, - GetAppValidationConfigurationResponse, GetAppValidationOutputRequest, GetAppValidationOutputResponse, GetConnectorsRequest, @@ -160,13 +148,10 @@ import { GetServersRequest, GetServersResponse, ImportAppCatalogRequest, - ImportAppCatalogResponse, ImportServerCatalogRequest, - ImportServerCatalogResponse, InternalError, InvalidParameterException, LaunchAppRequest, - LaunchAppResponse, LaunchDetails, ListAppsRequest, ListAppsResponse, @@ -174,20 +159,15 @@ import { NoConnectorsAvailableException, NotificationContext, NotifyAppValidationOutputRequest, - NotifyAppValidationOutputResponse, OperationNotPermittedException, PutAppLaunchConfigurationRequest, - PutAppLaunchConfigurationResponse, PutAppReplicationConfigurationRequest, - PutAppReplicationConfigurationResponse, PutAppValidationConfigurationRequest, - PutAppValidationConfigurationResponse, ReplicationJob, ReplicationJobAlreadyExistsException, ReplicationJobNotFoundException, ReplicationRun, ReplicationRunLimitExceededException, - ReplicationRunStageDetails, S3Location, Server, ServerCannotBeReplicatedException, @@ -199,27 +179,19 @@ import { ServerReplicationConfiguration, ServerReplicationParameters, ServerValidationConfiguration, - ServerValidationOutput, Source, - SSMOutput, SSMValidationParameters, StartAppReplicationRequest, - StartAppReplicationResponse, StartOnDemandAppReplicationRequest, - StartOnDemandAppReplicationResponse, StartOnDemandReplicationRunRequest, - StartOnDemandReplicationRunResponse, StopAppReplicationRequest, - StopAppReplicationResponse, Tag, TemporarilyUnavailableException, TerminateAppRequest, - TerminateAppResponse, UnauthorizedOperationException, UpdateAppRequest, UpdateAppResponse, UpdateReplicationJobRequest, - UpdateReplicationJobResponse, UserData, UserDataValidationParameters, ValidationOutput, @@ -237,7 +209,7 @@ export const se_CreateAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateApp"); let body: any; - body = JSON.stringify(se_CreateAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -263,7 +235,7 @@ export const se_DeleteAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteApp"); let body: any; - body = JSON.stringify(se_DeleteAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -276,7 +248,7 @@ export const se_DeleteAppLaunchConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAppLaunchConfiguration"); let body: any; - body = JSON.stringify(se_DeleteAppLaunchConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -289,7 +261,7 @@ export const se_DeleteAppReplicationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAppReplicationConfiguration"); let body: any; - body = JSON.stringify(se_DeleteAppReplicationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -302,7 +274,7 @@ export const se_DeleteAppValidationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAppValidationConfiguration"); let body: any; - body = JSON.stringify(se_DeleteAppValidationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -315,7 +287,7 @@ export const se_DeleteReplicationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteReplicationJob"); let body: any; - body = JSON.stringify(se_DeleteReplicationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -328,7 +300,7 @@ export const se_DeleteServerCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServerCatalog"); let body: any; - body = JSON.stringify(se_DeleteServerCatalogRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -341,7 +313,7 @@ export const se_DisassociateConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateConnector"); let body: any; - body = JSON.stringify(se_DisassociateConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -354,7 +326,7 @@ export const se_GenerateChangeSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateChangeSet"); let body: any; - body = JSON.stringify(se_GenerateChangeSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -367,7 +339,7 @@ export const se_GenerateTemplateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateTemplate"); let body: any; - body = JSON.stringify(se_GenerateTemplateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +349,7 @@ export const se_GenerateTemplateCommand = async ( export const se_GetAppCommand = async (input: GetAppCommandInput, context: __SerdeContext): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetApp"); let body: any; - body = JSON.stringify(se_GetAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +362,7 @@ export const se_GetAppLaunchConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAppLaunchConfiguration"); let body: any; - body = JSON.stringify(se_GetAppLaunchConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -403,7 +375,7 @@ export const se_GetAppReplicationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAppReplicationConfiguration"); let body: any; - body = JSON.stringify(se_GetAppReplicationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -416,7 +388,7 @@ export const se_GetAppValidationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAppValidationConfiguration"); let body: any; - body = JSON.stringify(se_GetAppValidationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -429,7 +401,7 @@ export const se_GetAppValidationOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAppValidationOutput"); let body: any; - body = JSON.stringify(se_GetAppValidationOutputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -442,7 +414,7 @@ export const se_GetConnectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConnectors"); let body: any; - body = JSON.stringify(se_GetConnectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -455,7 +427,7 @@ export const se_GetReplicationJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetReplicationJobs"); let body: any; - body = JSON.stringify(se_GetReplicationJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -468,7 +440,7 @@ export const se_GetReplicationRunsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetReplicationRuns"); let body: any; - body = JSON.stringify(se_GetReplicationRunsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -481,7 +453,7 @@ export const se_GetServersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServers"); let body: any; - body = JSON.stringify(se_GetServersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -494,7 +466,7 @@ export const se_ImportAppCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportAppCatalog"); let body: any; - body = JSON.stringify(se_ImportAppCatalogRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -507,7 +479,7 @@ export const se_ImportServerCatalogCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportServerCatalog"); let body: any; - body = JSON.stringify(se_ImportServerCatalogRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -520,7 +492,7 @@ export const se_LaunchAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("LaunchApp"); let body: any; - body = JSON.stringify(se_LaunchAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -533,7 +505,7 @@ export const se_ListAppsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListApps"); let body: any; - body = JSON.stringify(se_ListAppsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -546,7 +518,7 @@ export const se_NotifyAppValidationOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("NotifyAppValidationOutput"); let body: any; - body = JSON.stringify(se_NotifyAppValidationOutputRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -559,7 +531,7 @@ export const se_PutAppLaunchConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAppLaunchConfiguration"); let body: any; - body = JSON.stringify(se_PutAppLaunchConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -585,7 +557,7 @@ export const se_PutAppValidationConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAppValidationConfiguration"); let body: any; - body = JSON.stringify(se_PutAppValidationConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -598,7 +570,7 @@ export const se_StartAppReplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartAppReplication"); let body: any; - body = JSON.stringify(se_StartAppReplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -611,7 +583,7 @@ export const se_StartOnDemandAppReplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartOnDemandAppReplication"); let body: any; - body = JSON.stringify(se_StartOnDemandAppReplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -624,7 +596,7 @@ export const se_StartOnDemandReplicationRunCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartOnDemandReplicationRun"); let body: any; - body = JSON.stringify(se_StartOnDemandReplicationRunRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -637,7 +609,7 @@ export const se_StopAppReplicationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopAppReplication"); let body: any; - body = JSON.stringify(se_StopAppReplicationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -650,7 +622,7 @@ export const se_TerminateAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TerminateApp"); let body: any; - body = JSON.stringify(se_TerminateAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -663,7 +635,7 @@ export const se_UpdateAppCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateApp"); let body: any; - body = JSON.stringify(se_UpdateAppRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -697,7 +669,7 @@ export const de_CreateAppCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -730,10 +702,9 @@ const de_CreateAppCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -751,12 +722,12 @@ export const de_CreateReplicationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateReplicationJobResponse(data, context); + contents = _json(data); const response: CreateReplicationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -801,10 +772,9 @@ const de_CreateReplicationJobCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -822,12 +792,12 @@ export const de_DeleteAppCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAppResponse(data, context); + contents = _json(data); const response: DeleteAppCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -860,10 +830,9 @@ const de_DeleteAppCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -881,12 +850,12 @@ export const de_DeleteAppLaunchConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAppLaunchConfigurationResponse(data, context); + contents = _json(data); const response: DeleteAppLaunchConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -919,10 +888,9 @@ const de_DeleteAppLaunchConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -940,12 +908,12 @@ export const de_DeleteAppReplicationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAppReplicationConfigurationResponse(data, context); + contents = _json(data); const response: DeleteAppReplicationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -978,10 +946,9 @@ const de_DeleteAppReplicationConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -999,12 +966,12 @@ export const de_DeleteAppValidationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAppValidationConfigurationResponse(data, context); + contents = _json(data); const response: DeleteAppValidationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1037,10 +1004,9 @@ const de_DeleteAppValidationConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1058,12 +1024,12 @@ export const de_DeleteReplicationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteReplicationJobResponse(data, context); + contents = _json(data); const response: DeleteReplicationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1096,10 +1062,9 @@ const de_DeleteReplicationJobCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,12 +1082,12 @@ export const de_DeleteServerCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteServerCatalogResponse(data, context); + contents = _json(data); const response: DeleteServerCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1152,10 +1117,9 @@ const de_DeleteServerCatalogCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1173,12 +1137,12 @@ export const de_DisassociateConnectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateConnectorResponse(data, context); + contents = _json(data); const response: DisassociateConnectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1208,10 +1172,9 @@ const de_DisassociateConnectorCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1229,12 +1192,12 @@ export const de_GenerateChangeSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GenerateChangeSetResponse(data, context); + contents = _json(data); const response: GenerateChangeSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1267,10 +1230,9 @@ const de_GenerateChangeSetCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1288,12 +1250,12 @@ export const de_GenerateTemplateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GenerateTemplateResponse(data, context); + contents = _json(data); const response: GenerateTemplateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1326,10 +1288,9 @@ const de_GenerateTemplateCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1352,7 +1313,7 @@ export const de_GetAppCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1382,10 +1343,9 @@ const de_GetAppCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1403,12 +1363,12 @@ export const de_GetAppLaunchConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAppLaunchConfigurationResponse(data, context); + contents = _json(data); const response: GetAppLaunchConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1441,10 +1401,9 @@ const de_GetAppLaunchConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1467,7 +1426,7 @@ export const de_GetAppReplicationConfigurationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1500,10 +1459,9 @@ const de_GetAppReplicationConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1521,12 +1479,12 @@ export const de_GetAppValidationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAppValidationConfigurationResponse(data, context); + contents = _json(data); const response: GetAppValidationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1559,10 +1517,9 @@ const de_GetAppValidationConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1585,7 +1542,7 @@ export const de_GetAppValidationOutputCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1618,10 +1575,9 @@ const de_GetAppValidationOutputCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1644,7 +1600,7 @@ export const de_GetConnectorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1665,10 +1621,9 @@ const de_GetConnectorsCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1691,7 +1646,7 @@ export const de_GetReplicationJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1718,10 +1673,9 @@ const de_GetReplicationJobsCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1744,7 +1698,7 @@ export const de_GetReplicationRunsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1771,10 +1725,9 @@ const de_GetReplicationRunsCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1797,7 +1750,7 @@ export const de_GetServersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1827,10 +1780,9 @@ const de_GetServersCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1848,12 +1800,12 @@ export const de_ImportAppCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportAppCatalogResponse(data, context); + contents = _json(data); const response: ImportAppCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1886,10 +1838,9 @@ const de_ImportAppCatalogCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1907,12 +1858,12 @@ export const de_ImportServerCatalogCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportServerCatalogResponse(data, context); + contents = _json(data); const response: ImportServerCatalogCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1945,10 +1896,9 @@ const de_ImportServerCatalogCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1966,12 +1916,12 @@ export const de_LaunchAppCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_LaunchAppResponse(data, context); + contents = _json(data); const response: LaunchAppCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2004,10 +1954,9 @@ const de_LaunchAppCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2030,7 +1979,7 @@ export const de_ListAppsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2063,10 +2012,9 @@ const de_ListAppsCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,12 +2032,12 @@ export const de_NotifyAppValidationOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyAppValidationOutputResponse(data, context); + contents = _json(data); const response: NotifyAppValidationOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2122,10 +2070,9 @@ const de_NotifyAppValidationOutputCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2143,12 +2090,12 @@ export const de_PutAppLaunchConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAppLaunchConfigurationResponse(data, context); + contents = _json(data); const response: PutAppLaunchConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2181,10 +2128,9 @@ const de_PutAppLaunchConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2202,12 +2148,12 @@ export const de_PutAppReplicationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAppReplicationConfigurationResponse(data, context); + contents = _json(data); const response: PutAppReplicationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2240,10 +2186,9 @@ const de_PutAppReplicationConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,12 +2206,12 @@ export const de_PutAppValidationConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAppValidationConfigurationResponse(data, context); + contents = _json(data); const response: PutAppValidationConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2299,10 +2244,9 @@ const de_PutAppValidationConfigurationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2320,12 +2264,12 @@ export const de_StartAppReplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartAppReplicationResponse(data, context); + contents = _json(data); const response: StartAppReplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2358,10 +2302,9 @@ const de_StartAppReplicationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2379,12 +2322,12 @@ export const de_StartOnDemandAppReplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartOnDemandAppReplicationResponse(data, context); + contents = _json(data); const response: StartOnDemandAppReplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2417,10 +2360,9 @@ const de_StartOnDemandAppReplicationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2438,12 +2380,12 @@ export const de_StartOnDemandReplicationRunCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartOnDemandReplicationRunResponse(data, context); + contents = _json(data); const response: StartOnDemandReplicationRunCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2479,10 +2421,9 @@ const de_StartOnDemandReplicationRunCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2500,12 +2441,12 @@ export const de_StopAppReplicationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopAppReplicationResponse(data, context); + contents = _json(data); const response: StopAppReplicationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2538,10 +2479,9 @@ const de_StopAppReplicationCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2559,12 +2499,12 @@ export const de_TerminateAppCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TerminateAppResponse(data, context); + contents = _json(data); const response: TerminateAppCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2597,10 +2537,9 @@ const de_TerminateAppCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2623,7 +2562,7 @@ export const de_UpdateAppCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2656,10 +2595,9 @@ const de_UpdateAppCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2677,12 +2615,12 @@ export const de_UpdateReplicationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateReplicationJobResponse(data, context); + contents = _json(data); const response: UpdateReplicationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2724,10 +2662,9 @@ const de_UpdateReplicationJobCommandError = async ( throw await de_UnauthorizedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2741,7 +2678,7 @@ const de_DryRunOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DryRunOperationException(body, context); + const deserialized: any = _json(body); const exception = new DryRunOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2754,7 +2691,7 @@ const de_DryRunOperationExceptionRes = async ( */ const de_InternalErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalError(body, context); + const deserialized: any = _json(body); const exception = new InternalError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2770,7 +2707,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2786,7 +2723,7 @@ const de_MissingRequiredParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MissingRequiredParameterException(body, context); + const deserialized: any = _json(body); const exception = new MissingRequiredParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2802,7 +2739,7 @@ const de_NoConnectorsAvailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NoConnectorsAvailableException(body, context); + const deserialized: any = _json(body); const exception = new NoConnectorsAvailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2818,7 +2755,7 @@ const de_OperationNotPermittedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotPermittedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotPermittedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2834,7 +2771,7 @@ const de_ReplicationJobAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplicationJobAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ReplicationJobAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2850,7 +2787,7 @@ const de_ReplicationJobNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplicationJobNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ReplicationJobNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2866,7 +2803,7 @@ const de_ReplicationRunLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReplicationRunLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ReplicationRunLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2882,7 +2819,7 @@ const de_ServerCannotBeReplicatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServerCannotBeReplicatedException(body, context); + const deserialized: any = _json(body); const exception = new ServerCannotBeReplicatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2898,7 +2835,7 @@ const de_TemporarilyUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TemporarilyUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new TemporarilyUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2914,7 +2851,7 @@ const de_UnauthorizedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnauthorizedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnauthorizedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2922,339 +2859,81 @@ const de_UnauthorizedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AppIds - */ -const se_AppIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AppIds omitted. -/** - * serializeAws_json1_1AppValidationConfiguration - */ -const se_AppValidationConfiguration = (input: AppValidationConfiguration, context: __SerdeContext): any => { - return { - ...(input.appValidationStrategy != null && { appValidationStrategy: input.appValidationStrategy }), - ...(input.name != null && { name: input.name }), - ...(input.ssmValidationParameters != null && { - ssmValidationParameters: se_SSMValidationParameters(input.ssmValidationParameters, context), - }), - ...(input.validationId != null && { validationId: input.validationId }), - }; -}; +// se_AppValidationConfiguration omitted. -/** - * serializeAws_json1_1AppValidationConfigurations - */ -const se_AppValidationConfigurations = (input: AppValidationConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AppValidationConfiguration(entry, context); - }); -}; +// se_AppValidationConfigurations omitted. -/** - * serializeAws_json1_1CreateAppRequest - */ -const se_CreateAppRequest = (input: CreateAppRequest, context: __SerdeContext): any => { - return { - ...(input.clientToken != null && { clientToken: input.clientToken }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.roleName != null && { roleName: input.roleName }), - ...(input.serverGroups != null && { serverGroups: se_ServerGroups(input.serverGroups, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_CreateAppRequest omitted. /** * serializeAws_json1_1CreateReplicationJobRequest */ const se_CreateReplicationJobRequest = (input: CreateReplicationJobRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.encrypted != null && { encrypted: input.encrypted }), - ...(input.frequency != null && { frequency: input.frequency }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.licenseType != null && { licenseType: input.licenseType }), - ...(input.numberOfRecentAmisToKeep != null && { numberOfRecentAmisToKeep: input.numberOfRecentAmisToKeep }), - ...(input.roleName != null && { roleName: input.roleName }), - ...(input.runOnce != null && { runOnce: input.runOnce }), - ...(input.seedReplicationTime != null && { - seedReplicationTime: Math.round(input.seedReplicationTime.getTime() / 1000), - }), - ...(input.serverId != null && { serverId: input.serverId }), - }; + return take(input, { + description: [], + encrypted: [], + frequency: [], + kmsKeyId: [], + licenseType: [], + numberOfRecentAmisToKeep: [], + roleName: [], + runOnce: [], + seedReplicationTime: (_) => Math.round(_.getTime() / 1000), + serverId: [], + }); }; -/** - * serializeAws_json1_1DeleteAppLaunchConfigurationRequest - */ -const se_DeleteAppLaunchConfigurationRequest = ( - input: DeleteAppLaunchConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_DeleteAppLaunchConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteAppReplicationConfigurationRequest - */ -const se_DeleteAppReplicationConfigurationRequest = ( - input: DeleteAppReplicationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_DeleteAppReplicationConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteAppRequest - */ -const se_DeleteAppRequest = (input: DeleteAppRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.forceStopAppReplication != null && { forceStopAppReplication: input.forceStopAppReplication }), - ...(input.forceTerminateApp != null && { forceTerminateApp: input.forceTerminateApp }), - }; -}; +// se_DeleteAppRequest omitted. -/** - * serializeAws_json1_1DeleteAppValidationConfigurationRequest - */ -const se_DeleteAppValidationConfigurationRequest = ( - input: DeleteAppValidationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_DeleteAppValidationConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteReplicationJobRequest - */ -const se_DeleteReplicationJobRequest = (input: DeleteReplicationJobRequest, context: __SerdeContext): any => { - return { - ...(input.replicationJobId != null && { replicationJobId: input.replicationJobId }), - }; -}; +// se_DeleteReplicationJobRequest omitted. -/** - * serializeAws_json1_1DeleteServerCatalogRequest - */ -const se_DeleteServerCatalogRequest = (input: DeleteServerCatalogRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DeleteServerCatalogRequest omitted. -/** - * serializeAws_json1_1DisassociateConnectorRequest - */ -const se_DisassociateConnectorRequest = (input: DisassociateConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.connectorId != null && { connectorId: input.connectorId }), - }; -}; +// se_DisassociateConnectorRequest omitted. -/** - * serializeAws_json1_1GenerateChangeSetRequest - */ -const se_GenerateChangeSetRequest = (input: GenerateChangeSetRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.changesetFormat != null && { changesetFormat: input.changesetFormat }), - }; -}; +// se_GenerateChangeSetRequest omitted. -/** - * serializeAws_json1_1GenerateTemplateRequest - */ -const se_GenerateTemplateRequest = (input: GenerateTemplateRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.templateFormat != null && { templateFormat: input.templateFormat }), - }; -}; +// se_GenerateTemplateRequest omitted. -/** - * serializeAws_json1_1GetAppLaunchConfigurationRequest - */ -const se_GetAppLaunchConfigurationRequest = (input: GetAppLaunchConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_GetAppLaunchConfigurationRequest omitted. -/** - * serializeAws_json1_1GetAppReplicationConfigurationRequest - */ -const se_GetAppReplicationConfigurationRequest = ( - input: GetAppReplicationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_GetAppReplicationConfigurationRequest omitted. -/** - * serializeAws_json1_1GetAppRequest - */ -const se_GetAppRequest = (input: GetAppRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_GetAppRequest omitted. -/** - * serializeAws_json1_1GetAppValidationConfigurationRequest - */ -const se_GetAppValidationConfigurationRequest = ( - input: GetAppValidationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_GetAppValidationConfigurationRequest omitted. -/** - * serializeAws_json1_1GetAppValidationOutputRequest - */ -const se_GetAppValidationOutputRequest = (input: GetAppValidationOutputRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_GetAppValidationOutputRequest omitted. -/** - * serializeAws_json1_1GetConnectorsRequest - */ -const se_GetConnectorsRequest = (input: GetConnectorsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_GetConnectorsRequest omitted. -/** - * serializeAws_json1_1GetReplicationJobsRequest - */ -const se_GetReplicationJobsRequest = (input: GetReplicationJobsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.replicationJobId != null && { replicationJobId: input.replicationJobId }), - }; -}; +// se_GetReplicationJobsRequest omitted. -/** - * serializeAws_json1_1GetReplicationRunsRequest - */ -const se_GetReplicationRunsRequest = (input: GetReplicationRunsRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.replicationJobId != null && { replicationJobId: input.replicationJobId }), - }; -}; +// se_GetReplicationRunsRequest omitted. -/** - * serializeAws_json1_1GetServersRequest - */ -const se_GetServersRequest = (input: GetServersRequest, context: __SerdeContext): any => { - return { - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.vmServerAddressList != null && { - vmServerAddressList: se_VmServerAddressList(input.vmServerAddressList, context), - }), - }; -}; +// se_GetServersRequest omitted. -/** - * serializeAws_json1_1ImportAppCatalogRequest - */ -const se_ImportAppCatalogRequest = (input: ImportAppCatalogRequest, context: __SerdeContext): any => { - return { - ...(input.roleName != null && { roleName: input.roleName }), - }; -}; +// se_ImportAppCatalogRequest omitted. -/** - * serializeAws_json1_1ImportServerCatalogRequest - */ -const se_ImportServerCatalogRequest = (input: ImportServerCatalogRequest, context: __SerdeContext): any => { - return {}; -}; +// se_ImportServerCatalogRequest omitted. -/** - * serializeAws_json1_1LaunchAppRequest - */ -const se_LaunchAppRequest = (input: LaunchAppRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_LaunchAppRequest omitted. -/** - * serializeAws_json1_1ListAppsRequest - */ -const se_ListAppsRequest = (input: ListAppsRequest, context: __SerdeContext): any => { - return { - ...(input.appIds != null && { appIds: se_AppIds(input.appIds, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_ListAppsRequest omitted. -/** - * serializeAws_json1_1NotificationContext - */ -const se_NotificationContext = (input: NotificationContext, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - ...(input.statusMessage != null && { statusMessage: input.statusMessage }), - ...(input.validationId != null && { validationId: input.validationId }), - }; -}; +// se_NotificationContext omitted. -/** - * serializeAws_json1_1NotifyAppValidationOutputRequest - */ -const se_NotifyAppValidationOutputRequest = (input: NotifyAppValidationOutputRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.notificationContext != null && { - notificationContext: se_NotificationContext(input.notificationContext, context), - }), - }; -}; +// se_NotifyAppValidationOutputRequest omitted. -/** - * serializeAws_json1_1PutAppLaunchConfigurationRequest - */ -const se_PutAppLaunchConfigurationRequest = (input: PutAppLaunchConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.autoLaunch != null && { autoLaunch: input.autoLaunch }), - ...(input.roleName != null && { roleName: input.roleName }), - ...(input.serverGroupLaunchConfigurations != null && { - serverGroupLaunchConfigurations: se_ServerGroupLaunchConfigurations( - input.serverGroupLaunchConfigurations, - context - ), - }), - }; -}; +// se_PutAppLaunchConfigurationRequest omitted. /** * serializeAws_json1_1PutAppReplicationConfigurationRequest @@ -3263,95 +2942,23 @@ const se_PutAppReplicationConfigurationRequest = ( input: PutAppReplicationConfigurationRequest, context: __SerdeContext ): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.serverGroupReplicationConfigurations != null && { - serverGroupReplicationConfigurations: se_ServerGroupReplicationConfigurations( - input.serverGroupReplicationConfigurations, - context - ), - }), - }; + return take(input, { + appId: [], + serverGroupReplicationConfigurations: (_) => se_ServerGroupReplicationConfigurations(_, context), + }); }; -/** - * serializeAws_json1_1PutAppValidationConfigurationRequest - */ -const se_PutAppValidationConfigurationRequest = ( - input: PutAppValidationConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.appValidationConfigurations != null && { - appValidationConfigurations: se_AppValidationConfigurations(input.appValidationConfigurations, context), - }), - ...(input.serverGroupValidationConfigurations != null && { - serverGroupValidationConfigurations: se_ServerGroupValidationConfigurations( - input.serverGroupValidationConfigurations, - context - ), - }), - }; -}; +// se_PutAppValidationConfigurationRequest omitted. -/** - * serializeAws_json1_1S3Location - */ -const se_S3Location = (input: S3Location, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - }; -}; +// se_S3Location omitted. -/** - * serializeAws_json1_1Server - */ -const se_Server = (input: Server, context: __SerdeContext): any => { - return { - ...(input.replicationJobId != null && { replicationJobId: input.replicationJobId }), - ...(input.replicationJobTerminated != null && { replicationJobTerminated: input.replicationJobTerminated }), - ...(input.serverId != null && { serverId: input.serverId }), - ...(input.serverType != null && { serverType: input.serverType }), - ...(input.vmServer != null && { vmServer: se_VmServer(input.vmServer, context) }), - }; -}; +// se_Server omitted. -/** - * serializeAws_json1_1ServerGroup - */ -const se_ServerGroup = (input: ServerGroup, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.serverGroupId != null && { serverGroupId: input.serverGroupId }), - ...(input.serverList != null && { serverList: se_ServerList(input.serverList, context) }), - }; -}; +// se_ServerGroup omitted. -/** - * serializeAws_json1_1ServerGroupLaunchConfiguration - */ -const se_ServerGroupLaunchConfiguration = (input: ServerGroupLaunchConfiguration, context: __SerdeContext): any => { - return { - ...(input.launchOrder != null && { launchOrder: input.launchOrder }), - ...(input.serverGroupId != null && { serverGroupId: input.serverGroupId }), - ...(input.serverLaunchConfigurations != null && { - serverLaunchConfigurations: se_ServerLaunchConfigurations(input.serverLaunchConfigurations, context), - }), - }; -}; +// se_ServerGroupLaunchConfiguration omitted. -/** - * serializeAws_json1_1ServerGroupLaunchConfigurations - */ -const se_ServerGroupLaunchConfigurations = (input: ServerGroupLaunchConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerGroupLaunchConfiguration(entry, context); - }); -}; +// se_ServerGroupLaunchConfigurations omitted. /** * serializeAws_json1_1ServerGroupReplicationConfiguration @@ -3360,15 +2967,10 @@ const se_ServerGroupReplicationConfiguration = ( input: ServerGroupReplicationConfiguration, context: __SerdeContext ): any => { - return { - ...(input.serverGroupId != null && { serverGroupId: input.serverGroupId }), - ...(input.serverReplicationConfigurations != null && { - serverReplicationConfigurations: se_ServerReplicationConfigurations( - input.serverReplicationConfigurations, - context - ), - }), - }; + return take(input, { + serverGroupId: [], + serverReplicationConfigurations: (_) => se_ServerReplicationConfigurations(_, context), + }); }; /** @@ -3385,98 +2987,26 @@ const se_ServerGroupReplicationConfigurations = ( }); }; -/** - * serializeAws_json1_1ServerGroups - */ -const se_ServerGroups = (input: ServerGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerGroup(entry, context); - }); -}; +// se_ServerGroups omitted. -/** - * serializeAws_json1_1ServerGroupValidationConfiguration - */ -const se_ServerGroupValidationConfiguration = ( - input: ServerGroupValidationConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.serverGroupId != null && { serverGroupId: input.serverGroupId }), - ...(input.serverValidationConfigurations != null && { - serverValidationConfigurations: se_ServerValidationConfigurations(input.serverValidationConfigurations, context), - }), - }; -}; +// se_ServerGroupValidationConfiguration omitted. -/** - * serializeAws_json1_1ServerGroupValidationConfigurations - */ -const se_ServerGroupValidationConfigurations = ( - input: ServerGroupValidationConfiguration[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerGroupValidationConfiguration(entry, context); - }); -}; +// se_ServerGroupValidationConfigurations omitted. -/** - * serializeAws_json1_1ServerLaunchConfiguration - */ -const se_ServerLaunchConfiguration = (input: ServerLaunchConfiguration, context: __SerdeContext): any => { - return { - ...(input.associatePublicIpAddress != null && { associatePublicIpAddress: input.associatePublicIpAddress }), - ...(input.configureScript != null && { configureScript: se_S3Location(input.configureScript, context) }), - ...(input.configureScriptType != null && { configureScriptType: input.configureScriptType }), - ...(input.ec2KeyName != null && { ec2KeyName: input.ec2KeyName }), - ...(input.iamInstanceProfileName != null && { iamInstanceProfileName: input.iamInstanceProfileName }), - ...(input.instanceType != null && { instanceType: input.instanceType }), - ...(input.logicalId != null && { logicalId: input.logicalId }), - ...(input.securityGroup != null && { securityGroup: input.securityGroup }), - ...(input.server != null && { server: se_Server(input.server, context) }), - ...(input.subnet != null && { subnet: input.subnet }), - ...(input.userData != null && { userData: se_UserData(input.userData, context) }), - ...(input.vpc != null && { vpc: input.vpc }), - }; -}; +// se_ServerLaunchConfiguration omitted. -/** - * serializeAws_json1_1ServerLaunchConfigurations - */ -const se_ServerLaunchConfigurations = (input: ServerLaunchConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerLaunchConfiguration(entry, context); - }); -}; +// se_ServerLaunchConfigurations omitted. -/** - * serializeAws_json1_1ServerList - */ -const se_ServerList = (input: Server[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Server(entry, context); - }); -}; +// se_ServerList omitted. /** * serializeAws_json1_1ServerReplicationConfiguration */ const se_ServerReplicationConfiguration = (input: ServerReplicationConfiguration, context: __SerdeContext): any => { - return { - ...(input.server != null && { server: se_Server(input.server, context) }), - ...(input.serverReplicationParameters != null && { - serverReplicationParameters: se_ServerReplicationParameters(input.serverReplicationParameters, context), - }), - }; + return take(input, { + server: _json, + serverReplicationParameters: (_) => se_ServerReplicationParameters(_, context), + }); }; /** @@ -3494,225 +3024,67 @@ const se_ServerReplicationConfigurations = (input: ServerReplicationConfiguratio * serializeAws_json1_1ServerReplicationParameters */ const se_ServerReplicationParameters = (input: ServerReplicationParameters, context: __SerdeContext): any => { - return { - ...(input.encrypted != null && { encrypted: input.encrypted }), - ...(input.frequency != null && { frequency: input.frequency }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.licenseType != null && { licenseType: input.licenseType }), - ...(input.numberOfRecentAmisToKeep != null && { numberOfRecentAmisToKeep: input.numberOfRecentAmisToKeep }), - ...(input.runOnce != null && { runOnce: input.runOnce }), - ...(input.seedTime != null && { seedTime: Math.round(input.seedTime.getTime() / 1000) }), - }; + return take(input, { + encrypted: [], + frequency: [], + kmsKeyId: [], + licenseType: [], + numberOfRecentAmisToKeep: [], + runOnce: [], + seedTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ServerValidationConfiguration - */ -const se_ServerValidationConfiguration = (input: ServerValidationConfiguration, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.server != null && { server: se_Server(input.server, context) }), - ...(input.serverValidationStrategy != null && { serverValidationStrategy: input.serverValidationStrategy }), - ...(input.userDataValidationParameters != null && { - userDataValidationParameters: se_UserDataValidationParameters(input.userDataValidationParameters, context), - }), - ...(input.validationId != null && { validationId: input.validationId }), - }; -}; +// se_ServerValidationConfiguration omitted. -/** - * serializeAws_json1_1ServerValidationConfigurations - */ -const se_ServerValidationConfigurations = (input: ServerValidationConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ServerValidationConfiguration(entry, context); - }); -}; +// se_ServerValidationConfigurations omitted. -/** - * serializeAws_json1_1Source - */ -const se_Source = (input: Source, context: __SerdeContext): any => { - return { - ...(input.s3Location != null && { s3Location: se_S3Location(input.s3Location, context) }), - }; -}; +// se_Source omitted. -/** - * serializeAws_json1_1SSMValidationParameters - */ -const se_SSMValidationParameters = (input: SSMValidationParameters, context: __SerdeContext): any => { - return { - ...(input.command != null && { command: input.command }), - ...(input.executionTimeoutSeconds != null && { executionTimeoutSeconds: input.executionTimeoutSeconds }), - ...(input.instanceId != null && { instanceId: input.instanceId }), - ...(input.outputS3BucketName != null && { outputS3BucketName: input.outputS3BucketName }), - ...(input.scriptType != null && { scriptType: input.scriptType }), - ...(input.source != null && { source: se_Source(input.source, context) }), - }; -}; +// se_SSMValidationParameters omitted. -/** - * serializeAws_json1_1StartAppReplicationRequest - */ -const se_StartAppReplicationRequest = (input: StartAppReplicationRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_StartAppReplicationRequest omitted. -/** - * serializeAws_json1_1StartOnDemandAppReplicationRequest - */ -const se_StartOnDemandAppReplicationRequest = ( - input: StartOnDemandAppReplicationRequest, - context: __SerdeContext -): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.description != null && { description: input.description }), - }; -}; +// se_StartOnDemandAppReplicationRequest omitted. -/** - * serializeAws_json1_1StartOnDemandReplicationRunRequest - */ -const se_StartOnDemandReplicationRunRequest = ( - input: StartOnDemandReplicationRunRequest, - context: __SerdeContext -): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.replicationJobId != null && { replicationJobId: input.replicationJobId }), - }; -}; +// se_StartOnDemandReplicationRunRequest omitted. -/** - * serializeAws_json1_1StopAppReplicationRequest - */ -const se_StopAppReplicationRequest = (input: StopAppReplicationRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_StopAppReplicationRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1TerminateAppRequest - */ -const se_TerminateAppRequest = (input: TerminateAppRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - }; -}; +// se_TerminateAppRequest omitted. -/** - * serializeAws_json1_1UpdateAppRequest - */ -const se_UpdateAppRequest = (input: UpdateAppRequest, context: __SerdeContext): any => { - return { - ...(input.appId != null && { appId: input.appId }), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.roleName != null && { roleName: input.roleName }), - ...(input.serverGroups != null && { serverGroups: se_ServerGroups(input.serverGroups, context) }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }; -}; +// se_UpdateAppRequest omitted. /** * serializeAws_json1_1UpdateReplicationJobRequest */ const se_UpdateReplicationJobRequest = (input: UpdateReplicationJobRequest, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.encrypted != null && { encrypted: input.encrypted }), - ...(input.frequency != null && { frequency: input.frequency }), - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - ...(input.licenseType != null && { licenseType: input.licenseType }), - ...(input.nextReplicationRunStartTime != null && { - nextReplicationRunStartTime: Math.round(input.nextReplicationRunStartTime.getTime() / 1000), - }), - ...(input.numberOfRecentAmisToKeep != null && { numberOfRecentAmisToKeep: input.numberOfRecentAmisToKeep }), - ...(input.replicationJobId != null && { replicationJobId: input.replicationJobId }), - ...(input.roleName != null && { roleName: input.roleName }), - }; + return take(input, { + description: [], + encrypted: [], + frequency: [], + kmsKeyId: [], + licenseType: [], + nextReplicationRunStartTime: (_) => Math.round(_.getTime() / 1000), + numberOfRecentAmisToKeep: [], + replicationJobId: [], + roleName: [], + }); }; -/** - * serializeAws_json1_1UserData - */ -const se_UserData = (input: UserData, context: __SerdeContext): any => { - return { - ...(input.s3Location != null && { s3Location: se_S3Location(input.s3Location, context) }), - }; -}; +// se_UserData omitted. -/** - * serializeAws_json1_1UserDataValidationParameters - */ -const se_UserDataValidationParameters = (input: UserDataValidationParameters, context: __SerdeContext): any => { - return { - ...(input.scriptType != null && { scriptType: input.scriptType }), - ...(input.source != null && { source: se_Source(input.source, context) }), - }; -}; +// se_UserDataValidationParameters omitted. -/** - * serializeAws_json1_1VmServer - */ -const se_VmServer = (input: VmServer, context: __SerdeContext): any => { - return { - ...(input.vmManagerName != null && { vmManagerName: input.vmManagerName }), - ...(input.vmManagerType != null && { vmManagerType: input.vmManagerType }), - ...(input.vmName != null && { vmName: input.vmName }), - ...(input.vmPath != null && { vmPath: input.vmPath }), - ...(input.vmServerAddress != null && { vmServerAddress: se_VmServerAddress(input.vmServerAddress, context) }), - }; -}; +// se_VmServer omitted. -/** - * serializeAws_json1_1VmServerAddress - */ -const se_VmServerAddress = (input: VmServerAddress, context: __SerdeContext): any => { - return { - ...(input.vmId != null && { vmId: input.vmId }), - ...(input.vmManagerId != null && { vmManagerId: input.vmManagerId }), - }; -}; +// se_VmServerAddress omitted. -/** - * serializeAws_json1_1VmServerAddressList - */ -const se_VmServerAddressList = (input: VmServerAddress[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_VmServerAddress(entry, context); - }); -}; +// se_VmServerAddressList omitted. /** * deserializeAws_json1_1Apps @@ -3721,9 +3093,6 @@ const de_Apps = (output: any, context: __SerdeContext): AppSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AppSummary(entry, context); }); return retVal; @@ -3733,114 +3102,55 @@ const de_Apps = (output: any, context: __SerdeContext): AppSummary[] => { * deserializeAws_json1_1AppSummary */ const de_AppSummary = (output: any, context: __SerdeContext): AppSummary => { - return { - appId: __expectString(output.appId), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - description: __expectString(output.description), - importedAppId: __expectString(output.importedAppId), - lastModified: - output.lastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModified))) - : undefined, - latestReplicationTime: - output.latestReplicationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.latestReplicationTime))) - : undefined, - launchConfigurationStatus: __expectString(output.launchConfigurationStatus), - launchDetails: output.launchDetails != null ? de_LaunchDetails(output.launchDetails, context) : undefined, - launchStatus: __expectString(output.launchStatus), - launchStatusMessage: __expectString(output.launchStatusMessage), - name: __expectString(output.name), - replicationConfigurationStatus: __expectString(output.replicationConfigurationStatus), - replicationStatus: __expectString(output.replicationStatus), - replicationStatusMessage: __expectString(output.replicationStatusMessage), - roleName: __expectString(output.roleName), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - totalServerGroups: __expectInt32(output.totalServerGroups), - totalServers: __expectInt32(output.totalServers), - } as any; -}; - -/** - * deserializeAws_json1_1AppValidationConfiguration - */ -const de_AppValidationConfiguration = (output: any, context: __SerdeContext): AppValidationConfiguration => { - return { - appValidationStrategy: __expectString(output.appValidationStrategy), - name: __expectString(output.name), - ssmValidationParameters: - output.ssmValidationParameters != null - ? de_SSMValidationParameters(output.ssmValidationParameters, context) - : undefined, - validationId: __expectString(output.validationId), - } as any; -}; - -/** - * deserializeAws_json1_1AppValidationConfigurations - */ -const de_AppValidationConfigurations = (output: any, context: __SerdeContext): AppValidationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppValidationConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AppValidationOutput - */ -const de_AppValidationOutput = (output: any, context: __SerdeContext): AppValidationOutput => { - return { - ssmOutput: output.ssmOutput != null ? de_SSMOutput(output.ssmOutput, context) : undefined, - } as any; -}; + return take(output, { + appId: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + importedAppId: __expectString, + lastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestReplicationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + launchConfigurationStatus: __expectString, + launchDetails: (_: any) => de_LaunchDetails(_, context), + launchStatus: __expectString, + launchStatusMessage: __expectString, + name: __expectString, + replicationConfigurationStatus: __expectString, + replicationStatus: __expectString, + replicationStatusMessage: __expectString, + roleName: __expectString, + status: __expectString, + statusMessage: __expectString, + totalServerGroups: __expectInt32, + totalServers: __expectInt32, + }) as any; +}; + +// de_AppValidationConfiguration omitted. + +// de_AppValidationConfigurations omitted. + +// de_AppValidationOutput omitted. /** * deserializeAws_json1_1Connector */ const de_Connector = (output: any, context: __SerdeContext): Connector => { - return { - associatedOn: - output.associatedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.associatedOn))) - : undefined, - capabilityList: - output.capabilityList != null ? de_ConnectorCapabilityList(output.capabilityList, context) : undefined, - connectorId: __expectString(output.connectorId), - ipAddress: __expectString(output.ipAddress), - macAddress: __expectString(output.macAddress), - status: __expectString(output.status), - version: __expectString(output.version), - vmManagerId: __expectString(output.vmManagerId), - vmManagerName: __expectString(output.vmManagerName), - vmManagerType: __expectString(output.vmManagerType), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectorCapabilityList - */ -const de_ConnectorCapabilityList = (output: any, context: __SerdeContext): (ConnectorCapability | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + associatedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + capabilityList: _json, + connectorId: __expectString, + ipAddress: __expectString, + macAddress: __expectString, + status: __expectString, + version: __expectString, + vmManagerId: __expectString, + vmManagerName: __expectString, + vmManagerType: __expectString, + }) as any; }; +// de_ConnectorCapabilityList omitted. + /** * deserializeAws_json1_1ConnectorList */ @@ -3848,9 +3158,6 @@ const de_ConnectorList = (output: any, context: __SerdeContext): Connector[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Connector(entry, context); }); return retVal; @@ -3860,124 +3167,36 @@ const de_ConnectorList = (output: any, context: __SerdeContext): Connector[] => * deserializeAws_json1_1CreateAppResponse */ const de_CreateAppResponse = (output: any, context: __SerdeContext): CreateAppResponse => { - return { - appSummary: output.appSummary != null ? de_AppSummary(output.appSummary, context) : undefined, - serverGroups: output.serverGroups != null ? de_ServerGroups(output.serverGroups, context) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + appSummary: (_: any) => de_AppSummary(_, context), + serverGroups: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_json1_1CreateReplicationJobResponse - */ -const de_CreateReplicationJobResponse = (output: any, context: __SerdeContext): CreateReplicationJobResponse => { - return { - replicationJobId: __expectString(output.replicationJobId), - } as any; -}; +// de_CreateReplicationJobResponse omitted. -/** - * deserializeAws_json1_1DeleteAppLaunchConfigurationResponse - */ -const de_DeleteAppLaunchConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteAppLaunchConfigurationResponse => { - return {} as any; -}; +// de_DeleteAppLaunchConfigurationResponse omitted. -/** - * deserializeAws_json1_1DeleteAppReplicationConfigurationResponse - */ -const de_DeleteAppReplicationConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteAppReplicationConfigurationResponse => { - return {} as any; -}; +// de_DeleteAppReplicationConfigurationResponse omitted. -/** - * deserializeAws_json1_1DeleteAppResponse - */ -const de_DeleteAppResponse = (output: any, context: __SerdeContext): DeleteAppResponse => { - return {} as any; -}; +// de_DeleteAppResponse omitted. -/** - * deserializeAws_json1_1DeleteAppValidationConfigurationResponse - */ -const de_DeleteAppValidationConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteAppValidationConfigurationResponse => { - return {} as any; -}; +// de_DeleteAppValidationConfigurationResponse omitted. -/** - * deserializeAws_json1_1DeleteReplicationJobResponse - */ -const de_DeleteReplicationJobResponse = (output: any, context: __SerdeContext): DeleteReplicationJobResponse => { - return {} as any; -}; +// de_DeleteReplicationJobResponse omitted. -/** - * deserializeAws_json1_1DeleteServerCatalogResponse - */ -const de_DeleteServerCatalogResponse = (output: any, context: __SerdeContext): DeleteServerCatalogResponse => { - return {} as any; -}; +// de_DeleteServerCatalogResponse omitted. -/** - * deserializeAws_json1_1DisassociateConnectorResponse - */ -const de_DisassociateConnectorResponse = (output: any, context: __SerdeContext): DisassociateConnectorResponse => { - return {} as any; -}; +// de_DisassociateConnectorResponse omitted. -/** - * deserializeAws_json1_1DryRunOperationException - */ -const de_DryRunOperationException = (output: any, context: __SerdeContext): DryRunOperationException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1GenerateChangeSetResponse - */ -const de_GenerateChangeSetResponse = (output: any, context: __SerdeContext): GenerateChangeSetResponse => { - return { - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - } as any; -}; +// de_DryRunOperationException omitted. -/** - * deserializeAws_json1_1GenerateTemplateResponse - */ -const de_GenerateTemplateResponse = (output: any, context: __SerdeContext): GenerateTemplateResponse => { - return { - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - } as any; -}; +// de_GenerateChangeSetResponse omitted. -/** - * deserializeAws_json1_1GetAppLaunchConfigurationResponse - */ -const de_GetAppLaunchConfigurationResponse = ( - output: any, - context: __SerdeContext -): GetAppLaunchConfigurationResponse => { - return { - appId: __expectString(output.appId), - autoLaunch: __expectBoolean(output.autoLaunch), - roleName: __expectString(output.roleName), - serverGroupLaunchConfigurations: - output.serverGroupLaunchConfigurations != null - ? de_ServerGroupLaunchConfigurations(output.serverGroupLaunchConfigurations, context) - : undefined, - } as any; -}; +// de_GenerateTemplateResponse omitted. + +// de_GetAppLaunchConfigurationResponse omitted. /** * deserializeAws_json1_1GetAppReplicationConfigurationResponse @@ -3986,279 +3205,148 @@ const de_GetAppReplicationConfigurationResponse = ( output: any, context: __SerdeContext ): GetAppReplicationConfigurationResponse => { - return { - serverGroupReplicationConfigurations: - output.serverGroupReplicationConfigurations != null - ? de_ServerGroupReplicationConfigurations(output.serverGroupReplicationConfigurations, context) - : undefined, - } as any; + return take(output, { + serverGroupReplicationConfigurations: (_: any) => de_ServerGroupReplicationConfigurations(_, context), + }) as any; }; /** * deserializeAws_json1_1GetAppResponse */ const de_GetAppResponse = (output: any, context: __SerdeContext): GetAppResponse => { - return { - appSummary: output.appSummary != null ? de_AppSummary(output.appSummary, context) : undefined, - serverGroups: output.serverGroups != null ? de_ServerGroups(output.serverGroups, context) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + appSummary: (_: any) => de_AppSummary(_, context), + serverGroups: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_json1_1GetAppValidationConfigurationResponse - */ -const de_GetAppValidationConfigurationResponse = ( - output: any, - context: __SerdeContext -): GetAppValidationConfigurationResponse => { - return { - appValidationConfigurations: - output.appValidationConfigurations != null - ? de_AppValidationConfigurations(output.appValidationConfigurations, context) - : undefined, - serverGroupValidationConfigurations: - output.serverGroupValidationConfigurations != null - ? de_ServerGroupValidationConfigurations(output.serverGroupValidationConfigurations, context) - : undefined, - } as any; -}; +// de_GetAppValidationConfigurationResponse omitted. /** * deserializeAws_json1_1GetAppValidationOutputResponse */ const de_GetAppValidationOutputResponse = (output: any, context: __SerdeContext): GetAppValidationOutputResponse => { - return { - validationOutputList: - output.validationOutputList != null ? de_ValidationOutputList(output.validationOutputList, context) : undefined, - } as any; + return take(output, { + validationOutputList: (_: any) => de_ValidationOutputList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetConnectorsResponse */ const de_GetConnectorsResponse = (output: any, context: __SerdeContext): GetConnectorsResponse => { - return { - connectorList: output.connectorList != null ? de_ConnectorList(output.connectorList, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + connectorList: (_: any) => de_ConnectorList(_, context), + nextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetReplicationJobsResponse */ const de_GetReplicationJobsResponse = (output: any, context: __SerdeContext): GetReplicationJobsResponse => { - return { - nextToken: __expectString(output.nextToken), - replicationJobList: - output.replicationJobList != null ? de_ReplicationJobList(output.replicationJobList, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + replicationJobList: (_: any) => de_ReplicationJobList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetReplicationRunsResponse */ const de_GetReplicationRunsResponse = (output: any, context: __SerdeContext): GetReplicationRunsResponse => { - return { - nextToken: __expectString(output.nextToken), - replicationJob: output.replicationJob != null ? de_ReplicationJob(output.replicationJob, context) : undefined, - replicationRunList: - output.replicationRunList != null ? de_ReplicationRunList(output.replicationRunList, context) : undefined, - } as any; + return take(output, { + nextToken: __expectString, + replicationJob: (_: any) => de_ReplicationJob(_, context), + replicationRunList: (_: any) => de_ReplicationRunList(_, context), + }) as any; }; /** * deserializeAws_json1_1GetServersResponse */ const de_GetServersResponse = (output: any, context: __SerdeContext): GetServersResponse => { - return { - lastModifiedOn: - output.lastModifiedOn != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedOn))) - : undefined, - nextToken: __expectString(output.nextToken), - serverCatalogStatus: __expectString(output.serverCatalogStatus), - serverList: output.serverList != null ? de_ServerList(output.serverList, context) : undefined, - } as any; + return take(output, { + lastModifiedOn: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + nextToken: __expectString, + serverCatalogStatus: __expectString, + serverList: _json, + }) as any; }; -/** - * deserializeAws_json1_1ImportAppCatalogResponse - */ -const de_ImportAppCatalogResponse = (output: any, context: __SerdeContext): ImportAppCatalogResponse => { - return {} as any; -}; +// de_ImportAppCatalogResponse omitted. -/** - * deserializeAws_json1_1ImportServerCatalogResponse - */ -const de_ImportServerCatalogResponse = (output: any, context: __SerdeContext): ImportServerCatalogResponse => { - return {} as any; -}; +// de_ImportServerCatalogResponse omitted. -/** - * deserializeAws_json1_1InternalError - */ -const de_InternalError = (output: any, context: __SerdeContext): InternalError => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalError omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1LaunchAppResponse - */ -const de_LaunchAppResponse = (output: any, context: __SerdeContext): LaunchAppResponse => { - return {} as any; -}; +// de_LaunchAppResponse omitted. /** * deserializeAws_json1_1LaunchDetails */ const de_LaunchDetails = (output: any, context: __SerdeContext): LaunchDetails => { - return { - latestLaunchTime: - output.latestLaunchTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.latestLaunchTime))) - : undefined, - stackId: __expectString(output.stackId), - stackName: __expectString(output.stackName), - } as any; + return take(output, { + latestLaunchTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stackId: __expectString, + stackName: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListAppsResponse */ const de_ListAppsResponse = (output: any, context: __SerdeContext): ListAppsResponse => { - return { - apps: output.apps != null ? de_Apps(output.apps, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; + return take(output, { + apps: (_: any) => de_Apps(_, context), + nextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1MissingRequiredParameterException - */ -const de_MissingRequiredParameterException = ( - output: any, - context: __SerdeContext -): MissingRequiredParameterException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MissingRequiredParameterException omitted. -/** - * deserializeAws_json1_1NoConnectorsAvailableException - */ -const de_NoConnectorsAvailableException = (output: any, context: __SerdeContext): NoConnectorsAvailableException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_NoConnectorsAvailableException omitted. -/** - * deserializeAws_json1_1NotifyAppValidationOutputResponse - */ -const de_NotifyAppValidationOutputResponse = ( - output: any, - context: __SerdeContext -): NotifyAppValidationOutputResponse => { - return {} as any; -}; +// de_NotifyAppValidationOutputResponse omitted. -/** - * deserializeAws_json1_1OperationNotPermittedException - */ -const de_OperationNotPermittedException = (output: any, context: __SerdeContext): OperationNotPermittedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_OperationNotPermittedException omitted. -/** - * deserializeAws_json1_1PutAppLaunchConfigurationResponse - */ -const de_PutAppLaunchConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutAppLaunchConfigurationResponse => { - return {} as any; -}; +// de_PutAppLaunchConfigurationResponse omitted. -/** - * deserializeAws_json1_1PutAppReplicationConfigurationResponse - */ -const de_PutAppReplicationConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutAppReplicationConfigurationResponse => { - return {} as any; -}; +// de_PutAppReplicationConfigurationResponse omitted. -/** - * deserializeAws_json1_1PutAppValidationConfigurationResponse - */ -const de_PutAppValidationConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutAppValidationConfigurationResponse => { - return {} as any; -}; +// de_PutAppValidationConfigurationResponse omitted. /** * deserializeAws_json1_1ReplicationJob */ const de_ReplicationJob = (output: any, context: __SerdeContext): ReplicationJob => { - return { - description: __expectString(output.description), - encrypted: __expectBoolean(output.encrypted), - frequency: __expectInt32(output.frequency), - kmsKeyId: __expectString(output.kmsKeyId), - latestAmiId: __expectString(output.latestAmiId), - licenseType: __expectString(output.licenseType), - nextReplicationRunStartTime: - output.nextReplicationRunStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.nextReplicationRunStartTime))) - : undefined, - numberOfRecentAmisToKeep: __expectInt32(output.numberOfRecentAmisToKeep), - replicationJobId: __expectString(output.replicationJobId), - replicationRunList: - output.replicationRunList != null ? de_ReplicationRunList(output.replicationRunList, context) : undefined, - roleName: __expectString(output.roleName), - runOnce: __expectBoolean(output.runOnce), - seedReplicationTime: - output.seedReplicationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.seedReplicationTime))) - : undefined, - serverId: __expectString(output.serverId), - serverType: __expectString(output.serverType), - state: __expectString(output.state), - statusMessage: __expectString(output.statusMessage), - vmServer: output.vmServer != null ? de_VmServer(output.vmServer, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ReplicationJobAlreadyExistsException - */ -const de_ReplicationJobAlreadyExistsException = ( - output: any, - context: __SerdeContext -): ReplicationJobAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; + return take(output, { + description: __expectString, + encrypted: __expectBoolean, + frequency: __expectInt32, + kmsKeyId: __expectString, + latestAmiId: __expectString, + licenseType: __expectString, + nextReplicationRunStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + numberOfRecentAmisToKeep: __expectInt32, + replicationJobId: __expectString, + replicationRunList: (_: any) => de_ReplicationRunList(_, context), + roleName: __expectString, + runOnce: __expectBoolean, + seedReplicationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + serverId: __expectString, + serverType: __expectString, + state: __expectString, + statusMessage: __expectString, + vmServer: _json, + }) as any; +}; + +// de_ReplicationJobAlreadyExistsException omitted. /** * deserializeAws_json1_1ReplicationJobList @@ -4267,60 +3355,34 @@ const de_ReplicationJobList = (output: any, context: __SerdeContext): Replicatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationJob(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReplicationJobNotFoundException - */ -const de_ReplicationJobNotFoundException = (output: any, context: __SerdeContext): ReplicationJobNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ReplicationJobNotFoundException omitted. /** * deserializeAws_json1_1ReplicationRun */ const de_ReplicationRun = (output: any, context: __SerdeContext): ReplicationRun => { - return { - amiId: __expectString(output.amiId), - completedTime: - output.completedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.completedTime))) - : undefined, - description: __expectString(output.description), - encrypted: __expectBoolean(output.encrypted), - kmsKeyId: __expectString(output.kmsKeyId), - replicationRunId: __expectString(output.replicationRunId), - scheduledStartTime: - output.scheduledStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.scheduledStartTime))) - : undefined, - stageDetails: output.stageDetails != null ? de_ReplicationRunStageDetails(output.stageDetails, context) : undefined, - state: __expectString(output.state), - statusMessage: __expectString(output.statusMessage), - type: __expectString(output.type), - } as any; -}; - -/** - * deserializeAws_json1_1ReplicationRunLimitExceededException - */ -const de_ReplicationRunLimitExceededException = ( - output: any, - context: __SerdeContext -): ReplicationRunLimitExceededException => { - return { - message: __expectString(output.message), - } as any; + return take(output, { + amiId: __expectString, + completedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + encrypted: __expectBoolean, + kmsKeyId: __expectString, + replicationRunId: __expectString, + scheduledStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + stageDetails: _json, + state: __expectString, + statusMessage: __expectString, + type: __expectString, + }) as any; }; +// de_ReplicationRunLimitExceededException omitted. + /** * deserializeAws_json1_1ReplicationRunList */ @@ -4328,98 +3390,24 @@ const de_ReplicationRunList = (output: any, context: __SerdeContext): Replicatio const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ReplicationRun(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ReplicationRunStageDetails - */ -const de_ReplicationRunStageDetails = (output: any, context: __SerdeContext): ReplicationRunStageDetails => { - return { - stage: __expectString(output.stage), - stageProgress: __expectString(output.stageProgress), - } as any; -}; +// de_ReplicationRunStageDetails omitted. -/** - * deserializeAws_json1_1S3Location - */ -const de_S3Location = (output: any, context: __SerdeContext): S3Location => { - return { - bucket: __expectString(output.bucket), - key: __expectString(output.key), - } as any; -}; +// de_S3Location omitted. -/** - * deserializeAws_json1_1Server - */ -const de_Server = (output: any, context: __SerdeContext): Server => { - return { - replicationJobId: __expectString(output.replicationJobId), - replicationJobTerminated: __expectBoolean(output.replicationJobTerminated), - serverId: __expectString(output.serverId), - serverType: __expectString(output.serverType), - vmServer: output.vmServer != null ? de_VmServer(output.vmServer, context) : undefined, - } as any; -}; +// de_Server omitted. -/** - * deserializeAws_json1_1ServerCannotBeReplicatedException - */ -const de_ServerCannotBeReplicatedException = ( - output: any, - context: __SerdeContext -): ServerCannotBeReplicatedException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ServerCannotBeReplicatedException omitted. -/** - * deserializeAws_json1_1ServerGroup - */ -const de_ServerGroup = (output: any, context: __SerdeContext): ServerGroup => { - return { - name: __expectString(output.name), - serverGroupId: __expectString(output.serverGroupId), - serverList: output.serverList != null ? de_ServerList(output.serverList, context) : undefined, - } as any; -}; +// de_ServerGroup omitted. -/** - * deserializeAws_json1_1ServerGroupLaunchConfiguration - */ -const de_ServerGroupLaunchConfiguration = (output: any, context: __SerdeContext): ServerGroupLaunchConfiguration => { - return { - launchOrder: __expectInt32(output.launchOrder), - serverGroupId: __expectString(output.serverGroupId), - serverLaunchConfigurations: - output.serverLaunchConfigurations != null - ? de_ServerLaunchConfigurations(output.serverLaunchConfigurations, context) - : undefined, - } as any; -}; +// de_ServerGroupLaunchConfiguration omitted. -/** - * deserializeAws_json1_1ServerGroupLaunchConfigurations - */ -const de_ServerGroupLaunchConfigurations = (output: any, context: __SerdeContext): ServerGroupLaunchConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerGroupLaunchConfiguration(entry, context); - }); - return retVal; -}; +// de_ServerGroupLaunchConfigurations omitted. /** * deserializeAws_json1_1ServerGroupReplicationConfiguration @@ -4428,13 +3416,10 @@ const de_ServerGroupReplicationConfiguration = ( output: any, context: __SerdeContext ): ServerGroupReplicationConfiguration => { - return { - serverGroupId: __expectString(output.serverGroupId), - serverReplicationConfigurations: - output.serverReplicationConfigurations != null - ? de_ServerReplicationConfigurations(output.serverReplicationConfigurations, context) - : undefined, - } as any; + return take(output, { + serverGroupId: __expectString, + serverReplicationConfigurations: (_: any) => de_ServerReplicationConfigurations(_, context), + }) as any; }; /** @@ -4447,124 +3432,31 @@ const de_ServerGroupReplicationConfigurations = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServerGroupReplicationConfiguration(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ServerGroups - */ -const de_ServerGroups = (output: any, context: __SerdeContext): ServerGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerGroup(entry, context); - }); - return retVal; -}; +// de_ServerGroups omitted. -/** - * deserializeAws_json1_1ServerGroupValidationConfiguration - */ -const de_ServerGroupValidationConfiguration = ( - output: any, - context: __SerdeContext -): ServerGroupValidationConfiguration => { - return { - serverGroupId: __expectString(output.serverGroupId), - serverValidationConfigurations: - output.serverValidationConfigurations != null - ? de_ServerValidationConfigurations(output.serverValidationConfigurations, context) - : undefined, - } as any; -}; +// de_ServerGroupValidationConfiguration omitted. -/** - * deserializeAws_json1_1ServerGroupValidationConfigurations - */ -const de_ServerGroupValidationConfigurations = ( - output: any, - context: __SerdeContext -): ServerGroupValidationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerGroupValidationConfiguration(entry, context); - }); - return retVal; -}; +// de_ServerGroupValidationConfigurations omitted. -/** - * deserializeAws_json1_1ServerLaunchConfiguration - */ -const de_ServerLaunchConfiguration = (output: any, context: __SerdeContext): ServerLaunchConfiguration => { - return { - associatePublicIpAddress: __expectBoolean(output.associatePublicIpAddress), - configureScript: output.configureScript != null ? de_S3Location(output.configureScript, context) : undefined, - configureScriptType: __expectString(output.configureScriptType), - ec2KeyName: __expectString(output.ec2KeyName), - iamInstanceProfileName: __expectString(output.iamInstanceProfileName), - instanceType: __expectString(output.instanceType), - logicalId: __expectString(output.logicalId), - securityGroup: __expectString(output.securityGroup), - server: output.server != null ? de_Server(output.server, context) : undefined, - subnet: __expectString(output.subnet), - userData: output.userData != null ? de_UserData(output.userData, context) : undefined, - vpc: __expectString(output.vpc), - } as any; -}; +// de_ServerLaunchConfiguration omitted. -/** - * deserializeAws_json1_1ServerLaunchConfigurations - */ -const de_ServerLaunchConfigurations = (output: any, context: __SerdeContext): ServerLaunchConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerLaunchConfiguration(entry, context); - }); - return retVal; -}; +// de_ServerLaunchConfigurations omitted. -/** - * deserializeAws_json1_1ServerList - */ -const de_ServerList = (output: any, context: __SerdeContext): Server[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Server(entry, context); - }); - return retVal; -}; +// de_ServerList omitted. /** * deserializeAws_json1_1ServerReplicationConfiguration */ const de_ServerReplicationConfiguration = (output: any, context: __SerdeContext): ServerReplicationConfiguration => { - return { - server: output.server != null ? de_Server(output.server, context) : undefined, - serverReplicationParameters: - output.serverReplicationParameters != null - ? de_ServerReplicationParameters(output.serverReplicationParameters, context) - : undefined, - } as any; + return take(output, { + server: _json, + serverReplicationParameters: (_: any) => de_ServerReplicationParameters(_, context), + }) as any; }; /** @@ -4574,9 +3466,6 @@ const de_ServerReplicationConfigurations = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServerReplicationConfiguration(entry, context); }); return retVal; @@ -4586,231 +3475,77 @@ const de_ServerReplicationConfigurations = (output: any, context: __SerdeContext * deserializeAws_json1_1ServerReplicationParameters */ const de_ServerReplicationParameters = (output: any, context: __SerdeContext): ServerReplicationParameters => { - return { - encrypted: __expectBoolean(output.encrypted), - frequency: __expectInt32(output.frequency), - kmsKeyId: __expectString(output.kmsKeyId), - licenseType: __expectString(output.licenseType), - numberOfRecentAmisToKeep: __expectInt32(output.numberOfRecentAmisToKeep), - runOnce: __expectBoolean(output.runOnce), - seedTime: - output.seedTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.seedTime))) : undefined, - } as any; + return take(output, { + encrypted: __expectBoolean, + frequency: __expectInt32, + kmsKeyId: __expectString, + licenseType: __expectString, + numberOfRecentAmisToKeep: __expectInt32, + runOnce: __expectBoolean, + seedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1ServerValidationConfiguration - */ -const de_ServerValidationConfiguration = (output: any, context: __SerdeContext): ServerValidationConfiguration => { - return { - name: __expectString(output.name), - server: output.server != null ? de_Server(output.server, context) : undefined, - serverValidationStrategy: __expectString(output.serverValidationStrategy), - userDataValidationParameters: - output.userDataValidationParameters != null - ? de_UserDataValidationParameters(output.userDataValidationParameters, context) - : undefined, - validationId: __expectString(output.validationId), - } as any; -}; +// de_ServerValidationConfiguration omitted. -/** - * deserializeAws_json1_1ServerValidationConfigurations - */ -const de_ServerValidationConfigurations = (output: any, context: __SerdeContext): ServerValidationConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServerValidationConfiguration(entry, context); - }); - return retVal; -}; +// de_ServerValidationConfigurations omitted. -/** - * deserializeAws_json1_1ServerValidationOutput - */ -const de_ServerValidationOutput = (output: any, context: __SerdeContext): ServerValidationOutput => { - return { - server: output.server != null ? de_Server(output.server, context) : undefined, - } as any; -}; +// de_ServerValidationOutput omitted. -/** - * deserializeAws_json1_1Source - */ -const de_Source = (output: any, context: __SerdeContext): Source => { - return { - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - } as any; -}; +// de_Source omitted. -/** - * deserializeAws_json1_1SSMOutput - */ -const de_SSMOutput = (output: any, context: __SerdeContext): SSMOutput => { - return { - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - } as any; -}; +// de_SSMOutput omitted. -/** - * deserializeAws_json1_1SSMValidationParameters - */ -const de_SSMValidationParameters = (output: any, context: __SerdeContext): SSMValidationParameters => { - return { - command: __expectString(output.command), - executionTimeoutSeconds: __expectInt32(output.executionTimeoutSeconds), - instanceId: __expectString(output.instanceId), - outputS3BucketName: __expectString(output.outputS3BucketName), - scriptType: __expectString(output.scriptType), - source: output.source != null ? de_Source(output.source, context) : undefined, - } as any; -}; +// de_SSMValidationParameters omitted. -/** - * deserializeAws_json1_1StartAppReplicationResponse - */ -const de_StartAppReplicationResponse = (output: any, context: __SerdeContext): StartAppReplicationResponse => { - return {} as any; -}; +// de_StartAppReplicationResponse omitted. -/** - * deserializeAws_json1_1StartOnDemandAppReplicationResponse - */ -const de_StartOnDemandAppReplicationResponse = ( - output: any, - context: __SerdeContext -): StartOnDemandAppReplicationResponse => { - return {} as any; -}; +// de_StartOnDemandAppReplicationResponse omitted. -/** - * deserializeAws_json1_1StartOnDemandReplicationRunResponse - */ -const de_StartOnDemandReplicationRunResponse = ( - output: any, - context: __SerdeContext -): StartOnDemandReplicationRunResponse => { - return { - replicationRunId: __expectString(output.replicationRunId), - } as any; -}; +// de_StartOnDemandReplicationRunResponse omitted. -/** - * deserializeAws_json1_1StopAppReplicationResponse - */ -const de_StopAppReplicationResponse = (output: any, context: __SerdeContext): StopAppReplicationResponse => { - return {} as any; -}; +// de_StopAppReplicationResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TemporarilyUnavailableException - */ -const de_TemporarilyUnavailableException = (output: any, context: __SerdeContext): TemporarilyUnavailableException => { - return {} as any; -}; +// de_TemporarilyUnavailableException omitted. -/** - * deserializeAws_json1_1TerminateAppResponse - */ -const de_TerminateAppResponse = (output: any, context: __SerdeContext): TerminateAppResponse => { - return {} as any; -}; +// de_TerminateAppResponse omitted. -/** - * deserializeAws_json1_1UnauthorizedOperationException - */ -const de_UnauthorizedOperationException = (output: any, context: __SerdeContext): UnauthorizedOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_UnauthorizedOperationException omitted. /** * deserializeAws_json1_1UpdateAppResponse */ const de_UpdateAppResponse = (output: any, context: __SerdeContext): UpdateAppResponse => { - return { - appSummary: output.appSummary != null ? de_AppSummary(output.appSummary, context) : undefined, - serverGroups: output.serverGroups != null ? de_ServerGroups(output.serverGroups, context) : undefined, - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; + return take(output, { + appSummary: (_: any) => de_AppSummary(_, context), + serverGroups: _json, + tags: _json, + }) as any; }; -/** - * deserializeAws_json1_1UpdateReplicationJobResponse - */ -const de_UpdateReplicationJobResponse = (output: any, context: __SerdeContext): UpdateReplicationJobResponse => { - return {} as any; -}; +// de_UpdateReplicationJobResponse omitted. -/** - * deserializeAws_json1_1UserData - */ -const de_UserData = (output: any, context: __SerdeContext): UserData => { - return { - s3Location: output.s3Location != null ? de_S3Location(output.s3Location, context) : undefined, - } as any; -}; +// de_UserData omitted. -/** - * deserializeAws_json1_1UserDataValidationParameters - */ -const de_UserDataValidationParameters = (output: any, context: __SerdeContext): UserDataValidationParameters => { - return { - scriptType: __expectString(output.scriptType), - source: output.source != null ? de_Source(output.source, context) : undefined, - } as any; -}; +// de_UserDataValidationParameters omitted. /** * deserializeAws_json1_1ValidationOutput */ const de_ValidationOutput = (output: any, context: __SerdeContext): ValidationOutput => { - return { - appValidationOutput: - output.appValidationOutput != null ? de_AppValidationOutput(output.appValidationOutput, context) : undefined, - latestValidationTime: - output.latestValidationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.latestValidationTime))) - : undefined, - name: __expectString(output.name), - serverValidationOutput: - output.serverValidationOutput != null - ? de_ServerValidationOutput(output.serverValidationOutput, context) - : undefined, - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - validationId: __expectString(output.validationId), - } as any; + return take(output, { + appValidationOutput: _json, + latestValidationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + serverValidationOutput: _json, + status: __expectString, + statusMessage: __expectString, + validationId: __expectString, + }) as any; }; /** @@ -4820,36 +3555,14 @@ const de_ValidationOutputList = (output: any, context: __SerdeContext): Validati const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ValidationOutput(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1VmServer - */ -const de_VmServer = (output: any, context: __SerdeContext): VmServer => { - return { - vmManagerName: __expectString(output.vmManagerName), - vmManagerType: __expectString(output.vmManagerType), - vmName: __expectString(output.vmName), - vmPath: __expectString(output.vmPath), - vmServerAddress: output.vmServerAddress != null ? de_VmServerAddress(output.vmServerAddress, context) : undefined, - } as any; -}; +// de_VmServer omitted. -/** - * deserializeAws_json1_1VmServerAddress - */ -const de_VmServerAddress = (output: any, context: __SerdeContext): VmServerAddress => { - return { - vmId: __expectString(output.vmId), - vmManagerId: __expectString(output.vmManagerId), - } as any; -}; +// de_VmServerAddress omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4871,6 +3584,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-snow-device-management/src/protocols/Aws_restJson1.ts b/clients/client-snow-device-management/src/protocols/Aws_restJson1.ts index c79b6bcbf394..9c8cccc90983 100644 --- a/clients/client-snow-device-management/src/protocols/Aws_restJson1.ts +++ b/clients/client-snow-device-management/src/protocols/Aws_restJson1.ts @@ -1,19 +1,20 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -46,25 +47,15 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/T import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { AccessDeniedException, - Capacity, Command, - CpuOptions, - DeviceSummary, EbsInstanceBlockDevice, - ExecutionSummary, Instance, InstanceBlockDeviceMapping, - InstanceState, InstanceSummary, InternalServerException, - PhysicalNetworkInterface, Reboot, ResourceNotFoundException, - ResourceSummary, - SecurityGroupIdentifier, ServiceQuotaExceededException, - SoftwareInformation, - TaskSummary, ThrottlingException, Unlock, ValidationException, @@ -107,13 +98,15 @@ export const se_CreateTaskCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.command != null && { command: se_Command(input.command, context) }), - ...(input.description != null && { description: input.description }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.targets != null && { targets: se_TargetList(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + command: (_) => _json(_), + description: [], + tags: (_) => _json(_), + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -180,9 +173,11 @@ export const se_DescribeDeviceEc2InstancesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.instanceIds != null && { instanceIds: se_InstanceIdsList(input.instanceIds, context) }), - }); + body = JSON.stringify( + take(input, { + instanceIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -410,9 +405,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -468,9 +465,10 @@ export const de_CancelTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -504,10 +502,9 @@ const de_CancelTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -527,12 +524,11 @@ export const de_CreateTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.taskArn != null) { - contents.taskArn = __expectString(data.taskArn); - } - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + taskArn: __expectString, + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -569,10 +565,9 @@ const de_CreateTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -592,39 +587,20 @@ export const de_DescribeDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.associatedWithJob != null) { - contents.associatedWithJob = __expectString(data.associatedWithJob); - } - if (data.deviceCapacities != null) { - contents.deviceCapacities = de_CapacityList(data.deviceCapacities, context); - } - if (data.deviceState != null) { - contents.deviceState = __expectString(data.deviceState); - } - if (data.deviceType != null) { - contents.deviceType = __expectString(data.deviceType); - } - if (data.lastReachedOutAt != null) { - contents.lastReachedOutAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastReachedOutAt))); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.managedDeviceArn != null) { - contents.managedDeviceArn = __expectString(data.managedDeviceArn); - } - if (data.managedDeviceId != null) { - contents.managedDeviceId = __expectString(data.managedDeviceId); - } - if (data.physicalNetworkInterfaces != null) { - contents.physicalNetworkInterfaces = de_PhysicalNetworkInterfaceList(data.physicalNetworkInterfaces, context); - } - if (data.software != null) { - contents.software = de_SoftwareInformation(data.software, context); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + associatedWithJob: __expectString, + deviceCapacities: _json, + deviceState: __expectString, + deviceType: __expectString, + lastReachedOutAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + managedDeviceArn: __expectString, + managedDeviceId: __expectString, + physicalNetworkInterfaces: _json, + software: _json, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -658,10 +634,9 @@ const de_DescribeDeviceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -681,9 +656,10 @@ export const de_DescribeDeviceEc2InstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.instances != null) { - contents.instances = de_InstanceSummaryList(data.instances, context); - } + const doc = take(data, { + instances: (_) => de_InstanceSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -717,10 +693,9 @@ const de_DescribeDeviceEc2InstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -740,24 +715,15 @@ export const de_DescribeExecutionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executionId != null) { - contents.executionId = __expectString(data.executionId); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.managedDeviceId != null) { - contents.managedDeviceId = __expectString(data.managedDeviceId); - } - if (data.startedAt != null) { - contents.startedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.startedAt))); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + executionId: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + managedDeviceId: __expectString, + startedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: __expectString, + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -791,10 +757,9 @@ const de_DescribeExecutionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -814,33 +779,18 @@ export const de_DescribeTaskCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.completedAt != null) { - contents.completedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.completedAt))); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.createdAt))); - } - if (data.description != null) { - contents.description = __expectString(data.description); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.lastUpdatedAt))); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.targets != null) { - contents.targets = de_TargetList(data.targets, context); - } - if (data.taskArn != null) { - contents.taskArn = __expectString(data.taskArn); - } - if (data.taskId != null) { - contents.taskId = __expectString(data.taskId); - } + const doc = take(data, { + completedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + state: __expectString, + tags: _json, + targets: _json, + taskArn: __expectString, + taskId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -874,10 +824,9 @@ const de_DescribeTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -897,12 +846,11 @@ export const de_ListDeviceResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resources != null) { - contents.resources = de_ResourceSummaryList(data.resources, context); - } + const doc = take(data, { + nextToken: __expectString, + resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -936,10 +884,9 @@ const de_ListDeviceResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -959,12 +906,11 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.devices != null) { - contents.devices = de_DeviceSummaryList(data.devices, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + devices: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -995,10 +941,9 @@ const de_ListDevicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1018,12 +963,11 @@ export const de_ListExecutionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.executions != null) { - contents.executions = de_ExecutionSummaryList(data.executions, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + executions: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1057,10 +1001,9 @@ const de_ListExecutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1080,9 +1023,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1110,10 +1054,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1133,12 +1076,11 @@ export const de_ListTasksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.tasks != null) { - contents.tasks = de_TaskSummaryList(data.tasks, context); - } + const doc = take(data, { + nextToken: __expectString, + tasks: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1169,10 +1111,9 @@ const de_ListTasksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1219,10 +1160,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1269,16 +1209,15 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -1288,9 +1227,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1307,9 +1247,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1326,9 +1267,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1345,9 +1287,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1361,9 +1304,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1377,9 +1321,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1387,206 +1332,73 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Command - */ -const se_Command = (input: Command, context: __SerdeContext): any => { - return Command.visit(input, { - reboot: (value) => ({ reboot: se_Reboot(value, context) }), - unlock: (value) => ({ unlock: se_Unlock(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Command omitted. -/** - * serializeAws_restJson1InstanceIdsList - */ -const se_InstanceIdsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceIdsList omitted. -/** - * serializeAws_restJson1Reboot - */ -const se_Reboot = (input: Reboot, context: __SerdeContext): any => { - return {}; -}; +// se_Reboot omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TargetList - */ -const se_TargetList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetList omitted. -/** - * serializeAws_restJson1Unlock - */ -const se_Unlock = (input: Unlock, context: __SerdeContext): any => { - return {}; -}; +// se_Unlock omitted. -/** - * deserializeAws_restJson1Capacity - */ -const de_Capacity = (output: any, context: __SerdeContext): Capacity => { - return { - available: __expectLong(output.available), - name: __expectString(output.name), - total: __expectLong(output.total), - unit: __expectString(output.unit), - used: __expectLong(output.used), - } as any; -}; +// de_Capacity omitted. -/** - * deserializeAws_restJson1CapacityList - */ -const de_CapacityList = (output: any, context: __SerdeContext): Capacity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Capacity(entry, context); - }); - return retVal; -}; +// de_CapacityList omitted. -/** - * deserializeAws_restJson1CpuOptions - */ -const de_CpuOptions = (output: any, context: __SerdeContext): CpuOptions => { - return { - coreCount: __expectInt32(output.coreCount), - threadsPerCore: __expectInt32(output.threadsPerCore), - } as any; -}; +// de_CpuOptions omitted. -/** - * deserializeAws_restJson1DeviceSummary - */ -const de_DeviceSummary = (output: any, context: __SerdeContext): DeviceSummary => { - return { - associatedWithJob: __expectString(output.associatedWithJob), - managedDeviceArn: __expectString(output.managedDeviceArn), - managedDeviceId: __expectString(output.managedDeviceId), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - } as any; -}; +// de_DeviceSummary omitted. -/** - * deserializeAws_restJson1DeviceSummaryList - */ -const de_DeviceSummaryList = (output: any, context: __SerdeContext): DeviceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceSummary(entry, context); - }); - return retVal; -}; +// de_DeviceSummaryList omitted. /** * deserializeAws_restJson1EbsInstanceBlockDevice */ const de_EbsInstanceBlockDevice = (output: any, context: __SerdeContext): EbsInstanceBlockDevice => { - return { - attachTime: - output.attachTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.attachTime))) : undefined, - deleteOnTermination: __expectBoolean(output.deleteOnTermination), - status: __expectString(output.status), - volumeId: __expectString(output.volumeId), - } as any; + return take(output, { + attachTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deleteOnTermination: __expectBoolean, + status: __expectString, + volumeId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ExecutionSummary - */ -const de_ExecutionSummary = (output: any, context: __SerdeContext): ExecutionSummary => { - return { - executionId: __expectString(output.executionId), - managedDeviceId: __expectString(output.managedDeviceId), - state: __expectString(output.state), - taskId: __expectString(output.taskId), - } as any; -}; +// de_ExecutionSummary omitted. -/** - * deserializeAws_restJson1ExecutionSummaryList - */ -const de_ExecutionSummaryList = (output: any, context: __SerdeContext): ExecutionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutionSummary(entry, context); - }); - return retVal; -}; +// de_ExecutionSummaryList omitted. /** * deserializeAws_restJson1Instance */ const de_Instance = (output: any, context: __SerdeContext): Instance => { - return { - amiLaunchIndex: __expectInt32(output.amiLaunchIndex), - blockDeviceMappings: - output.blockDeviceMappings != null - ? de_InstanceBlockDeviceMappingList(output.blockDeviceMappings, context) - : undefined, - cpuOptions: output.cpuOptions != null ? de_CpuOptions(output.cpuOptions, context) : undefined, - createdAt: - output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined, - imageId: __expectString(output.imageId), - instanceId: __expectString(output.instanceId), - instanceType: __expectString(output.instanceType), - privateIpAddress: __expectString(output.privateIpAddress), - publicIpAddress: __expectString(output.publicIpAddress), - rootDeviceName: __expectString(output.rootDeviceName), - securityGroups: - output.securityGroups != null ? de_SecurityGroupIdentifierList(output.securityGroups, context) : undefined, - state: output.state != null ? de_InstanceState(output.state, context) : undefined, - updatedAt: - output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined, - } as any; + return take(output, { + amiLaunchIndex: __expectInt32, + blockDeviceMappings: (_: any) => de_InstanceBlockDeviceMappingList(_, context), + cpuOptions: _json, + createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + imageId: __expectString, + instanceId: __expectString, + instanceType: __expectString, + privateIpAddress: __expectString, + publicIpAddress: __expectString, + rootDeviceName: __expectString, + securityGroups: _json, + state: _json, + updatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1InstanceBlockDeviceMapping */ const de_InstanceBlockDeviceMapping = (output: any, context: __SerdeContext): InstanceBlockDeviceMapping => { - return { - deviceName: __expectString(output.deviceName), - ebs: output.ebs != null ? de_EbsInstanceBlockDevice(output.ebs, context) : undefined, - } as any; + return take(output, { + deviceName: __expectString, + ebs: (_: any) => de_EbsInstanceBlockDevice(_, context), + }) as any; }; /** @@ -1596,35 +1408,21 @@ const de_InstanceBlockDeviceMappingList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstanceBlockDeviceMapping(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InstanceState - */ -const de_InstanceState = (output: any, context: __SerdeContext): InstanceState => { - return { - code: __expectInt32(output.code), - name: __expectString(output.name), - } as any; -}; +// de_InstanceState omitted. /** * deserializeAws_restJson1InstanceSummary */ const de_InstanceSummary = (output: any, context: __SerdeContext): InstanceSummary => { - return { - instance: output.instance != null ? de_Instance(output.instance, context) : undefined, - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastUpdatedAt))) - : undefined, - } as any; + return take(output, { + instance: (_: any) => de_Instance(_, context), + lastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1634,160 +1432,32 @@ const de_InstanceSummaryList = (output: any, context: __SerdeContext): InstanceS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InstanceSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1PhysicalNetworkInterface - */ -const de_PhysicalNetworkInterface = (output: any, context: __SerdeContext): PhysicalNetworkInterface => { - return { - defaultGateway: __expectString(output.defaultGateway), - ipAddress: __expectString(output.ipAddress), - ipAddressAssignment: __expectString(output.ipAddressAssignment), - macAddress: __expectString(output.macAddress), - netmask: __expectString(output.netmask), - physicalConnectorType: __expectString(output.physicalConnectorType), - physicalNetworkInterfaceId: __expectString(output.physicalNetworkInterfaceId), - } as any; -}; +// de_PhysicalNetworkInterface omitted. -/** - * deserializeAws_restJson1PhysicalNetworkInterfaceList - */ -const de_PhysicalNetworkInterfaceList = (output: any, context: __SerdeContext): PhysicalNetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PhysicalNetworkInterface(entry, context); - }); - return retVal; -}; +// de_PhysicalNetworkInterfaceList omitted. -/** - * deserializeAws_restJson1ResourceSummary - */ -const de_ResourceSummary = (output: any, context: __SerdeContext): ResourceSummary => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - resourceType: __expectString(output.resourceType), - } as any; -}; +// de_ResourceSummary omitted. -/** - * deserializeAws_restJson1ResourceSummaryList - */ -const de_ResourceSummaryList = (output: any, context: __SerdeContext): ResourceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceSummary(entry, context); - }); - return retVal; -}; +// de_ResourceSummaryList omitted. -/** - * deserializeAws_restJson1SecurityGroupIdentifier - */ -const de_SecurityGroupIdentifier = (output: any, context: __SerdeContext): SecurityGroupIdentifier => { - return { - groupId: __expectString(output.groupId), - groupName: __expectString(output.groupName), - } as any; -}; +// de_SecurityGroupIdentifier omitted. -/** - * deserializeAws_restJson1SecurityGroupIdentifierList - */ -const de_SecurityGroupIdentifierList = (output: any, context: __SerdeContext): SecurityGroupIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SecurityGroupIdentifier(entry, context); - }); - return retVal; -}; +// de_SecurityGroupIdentifierList omitted. -/** - * deserializeAws_restJson1SoftwareInformation - */ -const de_SoftwareInformation = (output: any, context: __SerdeContext): SoftwareInformation => { - return { - installState: __expectString(output.installState), - installedVersion: __expectString(output.installedVersion), - installingVersion: __expectString(output.installingVersion), - } as any; -}; +// de_SoftwareInformation omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TargetList - */ -const de_TargetList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetList omitted. -/** - * deserializeAws_restJson1TaskSummary - */ -const de_TaskSummary = (output: any, context: __SerdeContext): TaskSummary => { - return { - state: __expectString(output.state), - tags: output.tags != null ? de_TagMap(output.tags, context) : undefined, - taskArn: __expectString(output.taskArn), - taskId: __expectString(output.taskId), - } as any; -}; +// de_TaskSummary omitted. -/** - * deserializeAws_restJson1TaskSummaryList - */ -const de_TaskSummaryList = (output: any, context: __SerdeContext): TaskSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TaskSummary(entry, context); - }); - return retVal; -}; +// de_TaskSummaryList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-snowball/src/protocols/Aws_json1_1.ts b/clients/client-snowball/src/protocols/Aws_json1_1.ts index 7e800ad55297..17e68942b30d 100644 --- a/clients/client-snowball/src/protocols/Aws_json1_1.ts +++ b/clients/client-snowball/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -71,30 +71,19 @@ import { import { Address, CancelClusterRequest, - CancelClusterResult, CancelJobRequest, - CancelJobResult, ClusterLimitExceededException, ClusterListEntry, ClusterMetadata, - CompatibleImage, ConflictException, CreateAddressRequest, - CreateAddressResult, CreateClusterRequest, - CreateClusterResult, CreateJobRequest, - CreateJobResult, CreateLongTermPricingRequest, - CreateLongTermPricingResult, CreateReturnShippingLabelRequest, - CreateReturnShippingLabelResult, - DataTransfer, DependentService, DescribeAddressesRequest, - DescribeAddressesResult, DescribeAddressRequest, - DescribeAddressResult, DescribeClusterRequest, DescribeClusterResult, DescribeJobRequest, @@ -107,13 +96,9 @@ import { EKSOnDeviceServiceConfiguration, EventTriggerDefinition, GetJobManifestRequest, - GetJobManifestResult, GetJobUnlockCodeRequest, - GetJobUnlockCodeResult, GetSnowballUsageRequest, - GetSnowballUsageResult, GetSoftwareUpdatesRequest, - GetSoftwareUpdatesResult, INDTaxDocuments, InvalidAddressException, InvalidInputCombinationException, @@ -121,7 +106,6 @@ import { InvalidNextTokenException, InvalidResourceException, JobListEntry, - JobLogs, JobMetadata, JobResource, JobState, @@ -133,13 +117,11 @@ import { ListClustersRequest, ListClustersResult, ListCompatibleImagesRequest, - ListCompatibleImagesResult, ListJobsRequest, ListJobsResult, ListLongTermPricingRequest, ListLongTermPricingResult, ListServiceVersionsRequest, - ListServiceVersionsResult, LongTermPricingListEntry, NFSOnDeviceServiceConfiguration, Notification, @@ -147,21 +129,15 @@ import { ReturnShippingLabelAlreadyExistsException, S3Resource, ServiceVersion, - Shipment, - ShippingDetails, SnowconeDeviceConfiguration, TargetOnDeviceService, TaxDocuments, TGWOnDeviceServiceConfiguration, UnsupportedAddressException, UpdateClusterRequest, - UpdateClusterResult, UpdateJobRequest, - UpdateJobResult, UpdateJobShipmentStateRequest, - UpdateJobShipmentStateResult, UpdateLongTermPricingRequest, - UpdateLongTermPricingResult, WirelessConnection, } from "../models/models_0"; import { SnowballServiceException as __BaseException } from "../models/SnowballServiceException"; @@ -175,7 +151,7 @@ export const se_CancelClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelCluster"); let body: any; - body = JSON.stringify(se_CancelClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -188,7 +164,7 @@ export const se_CancelJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelJob"); let body: any; - body = JSON.stringify(se_CancelJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -201,7 +177,7 @@ export const se_CreateAddressCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAddress"); let body: any; - body = JSON.stringify(se_CreateAddressRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -214,7 +190,7 @@ export const se_CreateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCluster"); let body: any; - body = JSON.stringify(se_CreateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -227,7 +203,7 @@ export const se_CreateJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateJob"); let body: any; - body = JSON.stringify(se_CreateJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -240,7 +216,7 @@ export const se_CreateLongTermPricingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLongTermPricing"); let body: any; - body = JSON.stringify(se_CreateLongTermPricingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -253,7 +229,7 @@ export const se_CreateReturnShippingLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateReturnShippingLabel"); let body: any; - body = JSON.stringify(se_CreateReturnShippingLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -266,7 +242,7 @@ export const se_DescribeAddressCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAddress"); let body: any; - body = JSON.stringify(se_DescribeAddressRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -279,7 +255,7 @@ export const se_DescribeAddressesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAddresses"); let body: any; - body = JSON.stringify(se_DescribeAddressesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -292,7 +268,7 @@ export const se_DescribeClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCluster"); let body: any; - body = JSON.stringify(se_DescribeClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -305,7 +281,7 @@ export const se_DescribeJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeJob"); let body: any; - body = JSON.stringify(se_DescribeJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -318,7 +294,7 @@ export const se_DescribeReturnShippingLabelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeReturnShippingLabel"); let body: any; - body = JSON.stringify(se_DescribeReturnShippingLabelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -331,7 +307,7 @@ export const se_GetJobManifestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobManifest"); let body: any; - body = JSON.stringify(se_GetJobManifestRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -344,7 +320,7 @@ export const se_GetJobUnlockCodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetJobUnlockCode"); let body: any; - body = JSON.stringify(se_GetJobUnlockCodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -357,7 +333,7 @@ export const se_GetSnowballUsageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSnowballUsage"); let body: any; - body = JSON.stringify(se_GetSnowballUsageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,7 +346,7 @@ export const se_GetSoftwareUpdatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSoftwareUpdates"); let body: any; - body = JSON.stringify(se_GetSoftwareUpdatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -383,7 +359,7 @@ export const se_ListClusterJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListClusterJobs"); let body: any; - body = JSON.stringify(se_ListClusterJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -396,7 +372,7 @@ export const se_ListClustersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListClusters"); let body: any; - body = JSON.stringify(se_ListClustersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -409,7 +385,7 @@ export const se_ListCompatibleImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCompatibleImages"); let body: any; - body = JSON.stringify(se_ListCompatibleImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -422,7 +398,7 @@ export const se_ListJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListJobs"); let body: any; - body = JSON.stringify(se_ListJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -435,7 +411,7 @@ export const se_ListLongTermPricingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLongTermPricing"); let body: any; - body = JSON.stringify(se_ListLongTermPricingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -448,7 +424,7 @@ export const se_ListServiceVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServiceVersions"); let body: any; - body = JSON.stringify(se_ListServiceVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,7 +437,7 @@ export const se_UpdateClusterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCluster"); let body: any; - body = JSON.stringify(se_UpdateClusterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -474,7 +450,7 @@ export const se_UpdateJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateJob"); let body: any; - body = JSON.stringify(se_UpdateJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -487,7 +463,7 @@ export const se_UpdateJobShipmentStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateJobShipmentState"); let body: any; - body = JSON.stringify(se_UpdateJobShipmentStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -500,7 +476,7 @@ export const se_UpdateLongTermPricingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateLongTermPricing"); let body: any; - body = JSON.stringify(se_UpdateLongTermPricingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,12 +492,12 @@ export const de_CancelClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelClusterResult(data, context); + contents = _json(data); const response: CancelClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -548,10 +524,9 @@ const de_CancelClusterCommandError = async ( throw await de_KMSRequestFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -569,12 +544,12 @@ export const de_CancelJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelJobResult(data, context); + contents = _json(data); const response: CancelJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -601,10 +576,9 @@ const de_CancelJobCommandError = async ( throw await de_KMSRequestFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -622,12 +596,12 @@ export const de_CreateAddressCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAddressResult(data, context); + contents = _json(data); const response: CreateAddressCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -651,10 +625,9 @@ const de_CreateAddressCommandError = async ( throw await de_UnsupportedAddressExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -672,12 +645,12 @@ export const de_CreateClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateClusterResult(data, context); + contents = _json(data); const response: CreateClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -707,10 +680,9 @@ const de_CreateClusterCommandError = async ( throw await de_KMSRequestFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -728,12 +700,12 @@ export const de_CreateJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateJobResult(data, context); + contents = _json(data); const response: CreateJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -766,10 +738,9 @@ const de_CreateJobCommandError = async ( throw await de_KMSRequestFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -787,12 +758,12 @@ export const de_CreateLongTermPricingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLongTermPricingResult(data, context); + contents = _json(data); const response: CreateLongTermPricingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -813,10 +784,9 @@ const de_CreateLongTermPricingCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -834,12 +804,12 @@ export const de_CreateReturnShippingLabelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateReturnShippingLabelResult(data, context); + contents = _json(data); const response: CreateReturnShippingLabelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -872,10 +842,9 @@ const de_CreateReturnShippingLabelCommandError = async ( throw await de_ReturnShippingLabelAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -893,12 +862,12 @@ export const de_DescribeAddressCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAddressResult(data, context); + contents = _json(data); const response: DescribeAddressCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -919,10 +888,9 @@ const de_DescribeAddressCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -940,12 +908,12 @@ export const de_DescribeAddressesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAddressesResult(data, context); + contents = _json(data); const response: DescribeAddressesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -969,10 +937,9 @@ const de_DescribeAddressesCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -995,7 +962,7 @@ export const de_DescribeClusterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1016,10 +983,9 @@ const de_DescribeClusterCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1042,7 +1008,7 @@ export const de_DescribeJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1063,10 +1029,9 @@ const de_DescribeJobCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1089,7 +1054,7 @@ export const de_DescribeReturnShippingLabelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1116,10 +1081,9 @@ const de_DescribeReturnShippingLabelCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1137,12 +1101,12 @@ export const de_GetJobManifestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetJobManifestResult(data, context); + contents = _json(data); const response: GetJobManifestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1166,10 +1130,9 @@ const de_GetJobManifestCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1187,12 +1150,12 @@ export const de_GetJobUnlockCodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetJobUnlockCodeResult(data, context); + contents = _json(data); const response: GetJobUnlockCodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1216,10 +1179,9 @@ const de_GetJobUnlockCodeCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1237,12 +1199,12 @@ export const de_GetSnowballUsageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSnowballUsageResult(data, context); + contents = _json(data); const response: GetSnowballUsageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1258,10 +1220,9 @@ const de_GetSnowballUsageCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1278,12 +1239,12 @@ export const de_GetSoftwareUpdatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSoftwareUpdatesResult(data, context); + contents = _json(data); const response: GetSoftwareUpdatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1307,10 +1268,9 @@ const de_GetSoftwareUpdatesCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,7 +1293,7 @@ export const de_ListClusterJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1357,10 +1317,9 @@ const de_ListClusterJobsCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1383,7 +1342,7 @@ export const de_ListClustersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1404,10 +1363,9 @@ const de_ListClustersCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1425,12 +1383,12 @@ export const de_ListCompatibleImagesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCompatibleImagesResult(data, context); + contents = _json(data); const response: ListCompatibleImagesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1454,10 +1412,9 @@ const de_ListCompatibleImagesCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1480,7 +1437,7 @@ export const de_ListJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1501,10 +1458,9 @@ const de_ListJobsCommandError = async ( throw await de_InvalidNextTokenExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1527,7 +1483,7 @@ export const de_ListLongTermPricingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1551,10 +1507,9 @@ const de_ListLongTermPricingCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1572,12 +1527,12 @@ export const de_ListServiceVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServiceVersionsResult(data, context); + contents = _json(data); const response: ListServiceVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1601,10 +1556,9 @@ const de_ListServiceVersionsCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1622,12 +1576,12 @@ export const de_UpdateClusterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateClusterResult(data, context); + contents = _json(data); const response: UpdateClusterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1660,10 +1614,9 @@ const de_UpdateClusterCommandError = async ( throw await de_KMSRequestFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1681,12 +1634,12 @@ export const de_UpdateJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateJobResult(data, context); + contents = _json(data); const response: UpdateJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1722,10 +1675,9 @@ const de_UpdateJobCommandError = async ( throw await de_KMSRequestFailedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1743,12 +1695,12 @@ export const de_UpdateJobShipmentStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateJobShipmentStateResult(data, context); + contents = _json(data); const response: UpdateJobShipmentStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1772,10 +1724,9 @@ const de_UpdateJobShipmentStateCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,12 +1744,12 @@ export const de_UpdateLongTermPricingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateLongTermPricingResult(data, context); + contents = _json(data); const response: UpdateLongTermPricingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1819,10 +1770,9 @@ const de_UpdateLongTermPricingCommandError = async ( throw await de_InvalidResourceExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1836,7 +1786,7 @@ const de_ClusterLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ClusterLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ClusterLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1849,7 +1799,7 @@ const de_ClusterLimitExceededExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1865,7 +1815,7 @@ const de_Ec2RequestFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_Ec2RequestFailedException(body, context); + const deserialized: any = _json(body); const exception = new Ec2RequestFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1881,7 +1831,7 @@ const de_InvalidAddressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAddressException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAddressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1897,7 +1847,7 @@ const de_InvalidInputCombinationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInputCombinationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInputCombinationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1913,7 +1863,7 @@ const de_InvalidJobStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidJobStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidJobStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1929,7 +1879,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1945,7 +1895,7 @@ const de_InvalidResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1961,7 +1911,7 @@ const de_KMSRequestFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_KMSRequestFailedException(body, context); + const deserialized: any = _json(body); const exception = new KMSRequestFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1977,7 +1927,7 @@ const de_ReturnShippingLabelAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReturnShippingLabelAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ReturnShippingLabelAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1993,7 +1943,7 @@ const de_UnsupportedAddressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedAddressException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedAddressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2001,884 +1951,212 @@ const de_UnsupportedAddressExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1Address - */ -const se_Address = (input: Address, context: __SerdeContext): any => { - return { - ...(input.AddressId != null && { AddressId: input.AddressId }), - ...(input.City != null && { City: input.City }), - ...(input.Company != null && { Company: input.Company }), - ...(input.Country != null && { Country: input.Country }), - ...(input.IsRestricted != null && { IsRestricted: input.IsRestricted }), - ...(input.Landmark != null && { Landmark: input.Landmark }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PhoneNumber != null && { PhoneNumber: input.PhoneNumber }), - ...(input.PostalCode != null && { PostalCode: input.PostalCode }), - ...(input.PrefectureOrDistrict != null && { PrefectureOrDistrict: input.PrefectureOrDistrict }), - ...(input.StateOrProvince != null && { StateOrProvince: input.StateOrProvince }), - ...(input.Street1 != null && { Street1: input.Street1 }), - ...(input.Street2 != null && { Street2: input.Street2 }), - ...(input.Street3 != null && { Street3: input.Street3 }), - }; -}; +// se_Address omitted. -/** - * serializeAws_json1_1CancelClusterRequest - */ -const se_CancelClusterRequest = (input: CancelClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_CancelClusterRequest omitted. -/** - * serializeAws_json1_1CancelJobRequest - */ -const se_CancelJobRequest = (input: CancelJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_CancelJobRequest omitted. -/** - * serializeAws_json1_1CreateAddressRequest - */ -const se_CreateAddressRequest = (input: CreateAddressRequest, context: __SerdeContext): any => { - return { - ...(input.Address != null && { Address: se_Address(input.Address, context) }), - }; -}; +// se_CreateAddressRequest omitted. -/** - * serializeAws_json1_1CreateClusterRequest - */ -const se_CreateClusterRequest = (input: CreateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.AddressId != null && { AddressId: input.AddressId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }), - ...(input.JobType != null && { JobType: input.JobType }), - ...(input.KmsKeyARN != null && { KmsKeyARN: input.KmsKeyARN }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.OnDeviceServiceConfiguration != null && { - OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context), - }), - ...(input.RemoteManagement != null && { RemoteManagement: input.RemoteManagement }), - ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }), - ...(input.SnowballType != null && { SnowballType: input.SnowballType }), - ...(input.TaxDocuments != null && { TaxDocuments: se_TaxDocuments(input.TaxDocuments, context) }), - }; -}; +// se_CreateClusterRequest omitted. -/** - * serializeAws_json1_1CreateJobRequest - */ -const se_CreateJobRequest = (input: CreateJobRequest, context: __SerdeContext): any => { - return { - ...(input.AddressId != null && { AddressId: input.AddressId }), - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceConfiguration != null && { - DeviceConfiguration: se_DeviceConfiguration(input.DeviceConfiguration, context), - }), - ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }), - ...(input.JobType != null && { JobType: input.JobType }), - ...(input.KmsKeyARN != null && { KmsKeyARN: input.KmsKeyARN }), - ...(input.LongTermPricingId != null && { LongTermPricingId: input.LongTermPricingId }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.OnDeviceServiceConfiguration != null && { - OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context), - }), - ...(input.RemoteManagement != null && { RemoteManagement: input.RemoteManagement }), - ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }), - ...(input.SnowballCapacityPreference != null && { SnowballCapacityPreference: input.SnowballCapacityPreference }), - ...(input.SnowballType != null && { SnowballType: input.SnowballType }), - ...(input.TaxDocuments != null && { TaxDocuments: se_TaxDocuments(input.TaxDocuments, context) }), - }; -}; +// se_CreateJobRequest omitted. -/** - * serializeAws_json1_1CreateLongTermPricingRequest - */ -const se_CreateLongTermPricingRequest = (input: CreateLongTermPricingRequest, context: __SerdeContext): any => { - return { - ...(input.IsLongTermPricingAutoRenew != null && { IsLongTermPricingAutoRenew: input.IsLongTermPricingAutoRenew }), - ...(input.LongTermPricingType != null && { LongTermPricingType: input.LongTermPricingType }), - ...(input.SnowballType != null && { SnowballType: input.SnowballType }), - }; -}; +// se_CreateLongTermPricingRequest omitted. -/** - * serializeAws_json1_1CreateReturnShippingLabelRequest - */ -const se_CreateReturnShippingLabelRequest = (input: CreateReturnShippingLabelRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }), - }; -}; +// se_CreateReturnShippingLabelRequest omitted. -/** - * serializeAws_json1_1DependentService - */ -const se_DependentService = (input: DependentService, context: __SerdeContext): any => { - return { - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.ServiceVersion != null && { ServiceVersion: se_ServiceVersion(input.ServiceVersion, context) }), - }; -}; +// se_DependentService omitted. -/** - * serializeAws_json1_1DependentServiceList - */ -const se_DependentServiceList = (input: DependentService[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DependentService(entry, context); - }); -}; +// se_DependentServiceList omitted. -/** - * serializeAws_json1_1DescribeAddressesRequest - */ -const se_DescribeAddressesRequest = (input: DescribeAddressesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeAddressesRequest omitted. -/** - * serializeAws_json1_1DescribeAddressRequest - */ -const se_DescribeAddressRequest = (input: DescribeAddressRequest, context: __SerdeContext): any => { - return { - ...(input.AddressId != null && { AddressId: input.AddressId }), - }; -}; +// se_DescribeAddressRequest omitted. -/** - * serializeAws_json1_1DescribeClusterRequest - */ -const se_DescribeClusterRequest = (input: DescribeClusterRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - }; -}; +// se_DescribeClusterRequest omitted. -/** - * serializeAws_json1_1DescribeJobRequest - */ -const se_DescribeJobRequest = (input: DescribeJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeJobRequest omitted. -/** - * serializeAws_json1_1DescribeReturnShippingLabelRequest - */ -const se_DescribeReturnShippingLabelRequest = ( - input: DescribeReturnShippingLabelRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeReturnShippingLabelRequest omitted. -/** - * serializeAws_json1_1DeviceConfiguration - */ -const se_DeviceConfiguration = (input: DeviceConfiguration, context: __SerdeContext): any => { - return { - ...(input.SnowconeDeviceConfiguration != null && { - SnowconeDeviceConfiguration: se_SnowconeDeviceConfiguration(input.SnowconeDeviceConfiguration, context), - }), - }; -}; +// se_DeviceConfiguration omitted. -/** - * serializeAws_json1_1Ec2AmiResource - */ -const se_Ec2AmiResource = (input: Ec2AmiResource, context: __SerdeContext): any => { - return { - ...(input.AmiId != null && { AmiId: input.AmiId }), - ...(input.SnowballAmiId != null && { SnowballAmiId: input.SnowballAmiId }), - }; -}; +// se_Ec2AmiResource omitted. -/** - * serializeAws_json1_1Ec2AmiResourceList - */ -const se_Ec2AmiResourceList = (input: Ec2AmiResource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Ec2AmiResource(entry, context); - }); -}; - -/** - * serializeAws_json1_1EKSOnDeviceServiceConfiguration - */ -const se_EKSOnDeviceServiceConfiguration = (input: EKSOnDeviceServiceConfiguration, context: __SerdeContext): any => { - return { - ...(input.EKSAnywhereVersion != null && { EKSAnywhereVersion: input.EKSAnywhereVersion }), - ...(input.KubernetesVersion != null && { KubernetesVersion: input.KubernetesVersion }), - }; -}; - -/** - * serializeAws_json1_1EventTriggerDefinition - */ -const se_EventTriggerDefinition = (input: EventTriggerDefinition, context: __SerdeContext): any => { - return { - ...(input.EventResourceARN != null && { EventResourceARN: input.EventResourceARN }), - }; -}; - -/** - * serializeAws_json1_1EventTriggerDefinitionList - */ -const se_EventTriggerDefinitionList = (input: EventTriggerDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EventTriggerDefinition(entry, context); - }); -}; - -/** - * serializeAws_json1_1GetJobManifestRequest - */ -const se_GetJobManifestRequest = (input: GetJobManifestRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; - -/** - * serializeAws_json1_1GetJobUnlockCodeRequest - */ -const se_GetJobUnlockCodeRequest = (input: GetJobUnlockCodeRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; - -/** - * serializeAws_json1_1GetSnowballUsageRequest - */ -const se_GetSnowballUsageRequest = (input: GetSnowballUsageRequest, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1GetSoftwareUpdatesRequest - */ -const se_GetSoftwareUpdatesRequest = (input: GetSoftwareUpdatesRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; - -/** - * serializeAws_json1_1INDTaxDocuments - */ -const se_INDTaxDocuments = (input: INDTaxDocuments, context: __SerdeContext): any => { - return { - ...(input.GSTIN != null && { GSTIN: input.GSTIN }), - }; -}; - -/** - * serializeAws_json1_1JobResource - */ -const se_JobResource = (input: JobResource, context: __SerdeContext): any => { - return { - ...(input.Ec2AmiResources != null && { Ec2AmiResources: se_Ec2AmiResourceList(input.Ec2AmiResources, context) }), - ...(input.LambdaResources != null && { LambdaResources: se_LambdaResourceList(input.LambdaResources, context) }), - ...(input.S3Resources != null && { S3Resources: se_S3ResourceList(input.S3Resources, context) }), - }; -}; - -/** - * serializeAws_json1_1JobStateList - */ -const se_JobStateList = (input: (JobState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Ec2AmiResourceList omitted. -/** - * serializeAws_json1_1KeyRange - */ -const se_KeyRange = (input: KeyRange, context: __SerdeContext): any => { - return { - ...(input.BeginMarker != null && { BeginMarker: input.BeginMarker }), - ...(input.EndMarker != null && { EndMarker: input.EndMarker }), - }; -}; +// se_EKSOnDeviceServiceConfiguration omitted. -/** - * serializeAws_json1_1LambdaResource - */ -const se_LambdaResource = (input: LambdaResource, context: __SerdeContext): any => { - return { - ...(input.EventTriggers != null && { EventTriggers: se_EventTriggerDefinitionList(input.EventTriggers, context) }), - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - }; -}; +// se_EventTriggerDefinition omitted. -/** - * serializeAws_json1_1LambdaResourceList - */ -const se_LambdaResourceList = (input: LambdaResource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_LambdaResource(entry, context); - }); -}; +// se_EventTriggerDefinitionList omitted. -/** - * serializeAws_json1_1ListClusterJobsRequest - */ -const se_ListClusterJobsRequest = (input: ListClusterJobsRequest, context: __SerdeContext): any => { - return { - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetJobManifestRequest omitted. -/** - * serializeAws_json1_1ListClustersRequest - */ -const se_ListClustersRequest = (input: ListClustersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetJobUnlockCodeRequest omitted. -/** - * serializeAws_json1_1ListCompatibleImagesRequest - */ -const se_ListCompatibleImagesRequest = (input: ListCompatibleImagesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetSnowballUsageRequest omitted. -/** - * serializeAws_json1_1ListJobsRequest - */ -const se_ListJobsRequest = (input: ListJobsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetSoftwareUpdatesRequest omitted. -/** - * serializeAws_json1_1ListLongTermPricingRequest - */ -const se_ListLongTermPricingRequest = (input: ListLongTermPricingRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_INDTaxDocuments omitted. -/** - * serializeAws_json1_1ListServiceVersionsRequest - */ -const se_ListServiceVersionsRequest = (input: ListServiceVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.DependentServices != null && { - DependentServices: se_DependentServiceList(input.DependentServices, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - }; -}; +// se_JobResource omitted. -/** - * serializeAws_json1_1NFSOnDeviceServiceConfiguration - */ -const se_NFSOnDeviceServiceConfiguration = (input: NFSOnDeviceServiceConfiguration, context: __SerdeContext): any => { - return { - ...(input.StorageLimit != null && { StorageLimit: input.StorageLimit }), - ...(input.StorageUnit != null && { StorageUnit: input.StorageUnit }), - }; -}; +// se_JobStateList omitted. -/** - * serializeAws_json1_1Notification - */ -const se_Notification = (input: Notification, context: __SerdeContext): any => { - return { - ...(input.JobStatesToNotify != null && { JobStatesToNotify: se_JobStateList(input.JobStatesToNotify, context) }), - ...(input.NotifyAll != null && { NotifyAll: input.NotifyAll }), - ...(input.SnsTopicARN != null && { SnsTopicARN: input.SnsTopicARN }), - }; -}; +// se_KeyRange omitted. -/** - * serializeAws_json1_1OnDeviceServiceConfiguration - */ -const se_OnDeviceServiceConfiguration = (input: OnDeviceServiceConfiguration, context: __SerdeContext): any => { - return { - ...(input.EKSOnDeviceService != null && { - EKSOnDeviceService: se_EKSOnDeviceServiceConfiguration(input.EKSOnDeviceService, context), - }), - ...(input.NFSOnDeviceService != null && { - NFSOnDeviceService: se_NFSOnDeviceServiceConfiguration(input.NFSOnDeviceService, context), - }), - ...(input.TGWOnDeviceService != null && { - TGWOnDeviceService: se_TGWOnDeviceServiceConfiguration(input.TGWOnDeviceService, context), - }), - }; -}; +// se_LambdaResource omitted. -/** - * serializeAws_json1_1S3Resource - */ -const se_S3Resource = (input: S3Resource, context: __SerdeContext): any => { - return { - ...(input.BucketArn != null && { BucketArn: input.BucketArn }), - ...(input.KeyRange != null && { KeyRange: se_KeyRange(input.KeyRange, context) }), - ...(input.TargetOnDeviceServices != null && { - TargetOnDeviceServices: se_TargetOnDeviceServiceList(input.TargetOnDeviceServices, context), - }), - }; -}; +// se_LambdaResourceList omitted. -/** - * serializeAws_json1_1S3ResourceList - */ -const se_S3ResourceList = (input: S3Resource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3Resource(entry, context); - }); -}; +// se_ListClusterJobsRequest omitted. -/** - * serializeAws_json1_1ServiceVersion - */ -const se_ServiceVersion = (input: ServiceVersion, context: __SerdeContext): any => { - return { - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_ListClustersRequest omitted. -/** - * serializeAws_json1_1SnowconeDeviceConfiguration - */ -const se_SnowconeDeviceConfiguration = (input: SnowconeDeviceConfiguration, context: __SerdeContext): any => { - return { - ...(input.WirelessConnection != null && { - WirelessConnection: se_WirelessConnection(input.WirelessConnection, context), - }), - }; -}; +// se_ListCompatibleImagesRequest omitted. -/** - * serializeAws_json1_1TargetOnDeviceService - */ -const se_TargetOnDeviceService = (input: TargetOnDeviceService, context: __SerdeContext): any => { - return { - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.TransferOption != null && { TransferOption: input.TransferOption }), - }; -}; +// se_ListJobsRequest omitted. -/** - * serializeAws_json1_1TargetOnDeviceServiceList - */ -const se_TargetOnDeviceServiceList = (input: TargetOnDeviceService[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetOnDeviceService(entry, context); - }); -}; +// se_ListLongTermPricingRequest omitted. -/** - * serializeAws_json1_1TaxDocuments - */ -const se_TaxDocuments = (input: TaxDocuments, context: __SerdeContext): any => { - return { - ...(input.IND != null && { IND: se_INDTaxDocuments(input.IND, context) }), - }; -}; +// se_ListServiceVersionsRequest omitted. -/** - * serializeAws_json1_1TGWOnDeviceServiceConfiguration - */ -const se_TGWOnDeviceServiceConfiguration = (input: TGWOnDeviceServiceConfiguration, context: __SerdeContext): any => { - return { - ...(input.StorageLimit != null && { StorageLimit: input.StorageLimit }), - ...(input.StorageUnit != null && { StorageUnit: input.StorageUnit }), - }; -}; +// se_NFSOnDeviceServiceConfiguration omitted. -/** - * serializeAws_json1_1UpdateClusterRequest - */ -const se_UpdateClusterRequest = (input: UpdateClusterRequest, context: __SerdeContext): any => { - return { - ...(input.AddressId != null && { AddressId: input.AddressId }), - ...(input.ClusterId != null && { ClusterId: input.ClusterId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.OnDeviceServiceConfiguration != null && { - OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context), - }), - ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }), - }; -}; +// se_Notification omitted. -/** - * serializeAws_json1_1UpdateJobRequest - */ -const se_UpdateJobRequest = (input: UpdateJobRequest, context: __SerdeContext): any => { - return { - ...(input.AddressId != null && { AddressId: input.AddressId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ForwardingAddressId != null && { ForwardingAddressId: input.ForwardingAddressId }), - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.Notification != null && { Notification: se_Notification(input.Notification, context) }), - ...(input.OnDeviceServiceConfiguration != null && { - OnDeviceServiceConfiguration: se_OnDeviceServiceConfiguration(input.OnDeviceServiceConfiguration, context), - }), - ...(input.Resources != null && { Resources: se_JobResource(input.Resources, context) }), - ...(input.RoleARN != null && { RoleARN: input.RoleARN }), - ...(input.ShippingOption != null && { ShippingOption: input.ShippingOption }), - ...(input.SnowballCapacityPreference != null && { SnowballCapacityPreference: input.SnowballCapacityPreference }), - }; -}; +// se_OnDeviceServiceConfiguration omitted. -/** - * serializeAws_json1_1UpdateJobShipmentStateRequest - */ -const se_UpdateJobShipmentStateRequest = (input: UpdateJobShipmentStateRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.ShipmentState != null && { ShipmentState: input.ShipmentState }), - }; -}; +// se_S3Resource omitted. -/** - * serializeAws_json1_1UpdateLongTermPricingRequest - */ -const se_UpdateLongTermPricingRequest = (input: UpdateLongTermPricingRequest, context: __SerdeContext): any => { - return { - ...(input.IsLongTermPricingAutoRenew != null && { IsLongTermPricingAutoRenew: input.IsLongTermPricingAutoRenew }), - ...(input.LongTermPricingId != null && { LongTermPricingId: input.LongTermPricingId }), - ...(input.ReplacementJob != null && { ReplacementJob: input.ReplacementJob }), - }; -}; +// se_S3ResourceList omitted. -/** - * serializeAws_json1_1WirelessConnection - */ -const se_WirelessConnection = (input: WirelessConnection, context: __SerdeContext): any => { - return { - ...(input.IsWifiEnabled != null && { IsWifiEnabled: input.IsWifiEnabled }), - }; -}; +// se_ServiceVersion omitted. -/** - * deserializeAws_json1_1Address - */ -const de_Address = (output: any, context: __SerdeContext): Address => { - return { - AddressId: __expectString(output.AddressId), - City: __expectString(output.City), - Company: __expectString(output.Company), - Country: __expectString(output.Country), - IsRestricted: __expectBoolean(output.IsRestricted), - Landmark: __expectString(output.Landmark), - Name: __expectString(output.Name), - PhoneNumber: __expectString(output.PhoneNumber), - PostalCode: __expectString(output.PostalCode), - PrefectureOrDistrict: __expectString(output.PrefectureOrDistrict), - StateOrProvince: __expectString(output.StateOrProvince), - Street1: __expectString(output.Street1), - Street2: __expectString(output.Street2), - Street3: __expectString(output.Street3), - } as any; -}; - -/** - * deserializeAws_json1_1AddressList - */ -const de_AddressList = (output: any, context: __SerdeContext): Address[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Address(entry, context); - }); - return retVal; -}; +// se_SnowconeDeviceConfiguration omitted. -/** - * deserializeAws_json1_1CancelClusterResult - */ -const de_CancelClusterResult = (output: any, context: __SerdeContext): CancelClusterResult => { - return {} as any; -}; +// se_TargetOnDeviceService omitted. -/** - * deserializeAws_json1_1CancelJobResult - */ -const de_CancelJobResult = (output: any, context: __SerdeContext): CancelJobResult => { - return {} as any; -}; +// se_TargetOnDeviceServiceList omitted. -/** - * deserializeAws_json1_1ClusterLimitExceededException - */ -const de_ClusterLimitExceededException = (output: any, context: __SerdeContext): ClusterLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_TaxDocuments omitted. -/** - * deserializeAws_json1_1ClusterListEntry - */ -const de_ClusterListEntry = (output: any, context: __SerdeContext): ClusterListEntry => { - return { - ClusterId: __expectString(output.ClusterId), - ClusterState: __expectString(output.ClusterState), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - Description: __expectString(output.Description), - } as any; -}; +// se_TGWOnDeviceServiceConfiguration omitted. -/** - * deserializeAws_json1_1ClusterListEntryList - */ -const de_ClusterListEntryList = (output: any, context: __SerdeContext): ClusterListEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClusterListEntry(entry, context); - }); - return retVal; -}; +// se_UpdateClusterRequest omitted. -/** - * deserializeAws_json1_1ClusterMetadata - */ -const de_ClusterMetadata = (output: any, context: __SerdeContext): ClusterMetadata => { - return { - AddressId: __expectString(output.AddressId), - ClusterId: __expectString(output.ClusterId), - ClusterState: __expectString(output.ClusterState), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - Description: __expectString(output.Description), - ForwardingAddressId: __expectString(output.ForwardingAddressId), - JobType: __expectString(output.JobType), - KmsKeyARN: __expectString(output.KmsKeyARN), - Notification: output.Notification != null ? de_Notification(output.Notification, context) : undefined, - OnDeviceServiceConfiguration: - output.OnDeviceServiceConfiguration != null - ? de_OnDeviceServiceConfiguration(output.OnDeviceServiceConfiguration, context) - : undefined, - Resources: output.Resources != null ? de_JobResource(output.Resources, context) : undefined, - RoleARN: __expectString(output.RoleARN), - ShippingOption: __expectString(output.ShippingOption), - SnowballType: __expectString(output.SnowballType), - TaxDocuments: output.TaxDocuments != null ? de_TaxDocuments(output.TaxDocuments, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CompatibleImage - */ -const de_CompatibleImage = (output: any, context: __SerdeContext): CompatibleImage => { - return { - AmiId: __expectString(output.AmiId), - Name: __expectString(output.Name), - } as any; -}; +// se_UpdateJobRequest omitted. -/** - * deserializeAws_json1_1CompatibleImageList - */ -const de_CompatibleImageList = (output: any, context: __SerdeContext): CompatibleImage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CompatibleImage(entry, context); - }); - return retVal; -}; +// se_UpdateJobShipmentStateRequest omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - ConflictResource: __expectString(output.ConflictResource), - Message: __expectString(output.Message), - } as any; -}; +// se_UpdateLongTermPricingRequest omitted. -/** - * deserializeAws_json1_1CreateAddressResult - */ -const de_CreateAddressResult = (output: any, context: __SerdeContext): CreateAddressResult => { - return { - AddressId: __expectString(output.AddressId), - } as any; -}; +// se_WirelessConnection omitted. -/** - * deserializeAws_json1_1CreateClusterResult - */ -const de_CreateClusterResult = (output: any, context: __SerdeContext): CreateClusterResult => { - return { - ClusterId: __expectString(output.ClusterId), - } as any; -}; +// de_Address omitted. -/** - * deserializeAws_json1_1CreateJobResult - */ -const de_CreateJobResult = (output: any, context: __SerdeContext): CreateJobResult => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_AddressList omitted. -/** - * deserializeAws_json1_1CreateLongTermPricingResult - */ -const de_CreateLongTermPricingResult = (output: any, context: __SerdeContext): CreateLongTermPricingResult => { - return { - LongTermPricingId: __expectString(output.LongTermPricingId), - } as any; -}; +// de_CancelClusterResult omitted. -/** - * deserializeAws_json1_1CreateReturnShippingLabelResult - */ -const de_CreateReturnShippingLabelResult = (output: any, context: __SerdeContext): CreateReturnShippingLabelResult => { - return { - Status: __expectString(output.Status), - } as any; -}; +// de_CancelJobResult omitted. -/** - * deserializeAws_json1_1DataTransfer - */ -const de_DataTransfer = (output: any, context: __SerdeContext): DataTransfer => { - return { - BytesTransferred: __expectLong(output.BytesTransferred), - ObjectsTransferred: __expectLong(output.ObjectsTransferred), - TotalBytes: __expectLong(output.TotalBytes), - TotalObjects: __expectLong(output.TotalObjects), - } as any; -}; +// de_ClusterLimitExceededException omitted. /** - * deserializeAws_json1_1DependentService + * deserializeAws_json1_1ClusterListEntry */ -const de_DependentService = (output: any, context: __SerdeContext): DependentService => { - return { - ServiceName: __expectString(output.ServiceName), - ServiceVersion: output.ServiceVersion != null ? de_ServiceVersion(output.ServiceVersion, context) : undefined, - } as any; +const de_ClusterListEntry = (output: any, context: __SerdeContext): ClusterListEntry => { + return take(output, { + ClusterId: __expectString, + ClusterState: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + }) as any; }; /** - * deserializeAws_json1_1DependentServiceList + * deserializeAws_json1_1ClusterListEntryList */ -const de_DependentServiceList = (output: any, context: __SerdeContext): DependentService[] => { +const de_ClusterListEntryList = (output: any, context: __SerdeContext): ClusterListEntry[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DependentService(entry, context); + return de_ClusterListEntry(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1DescribeAddressesResult + * deserializeAws_json1_1ClusterMetadata */ -const de_DescribeAddressesResult = (output: any, context: __SerdeContext): DescribeAddressesResult => { - return { - Addresses: output.Addresses != null ? de_AddressList(output.Addresses, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; +const de_ClusterMetadata = (output: any, context: __SerdeContext): ClusterMetadata => { + return take(output, { + AddressId: __expectString, + ClusterId: __expectString, + ClusterState: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ForwardingAddressId: __expectString, + JobType: __expectString, + KmsKeyARN: __expectString, + Notification: _json, + OnDeviceServiceConfiguration: _json, + Resources: _json, + RoleARN: __expectString, + ShippingOption: __expectString, + SnowballType: __expectString, + TaxDocuments: _json, + }) as any; }; -/** - * deserializeAws_json1_1DescribeAddressResult - */ -const de_DescribeAddressResult = (output: any, context: __SerdeContext): DescribeAddressResult => { - return { - Address: output.Address != null ? de_Address(output.Address, context) : undefined, - } as any; -}; +// de_CompatibleImage omitted. + +// de_CompatibleImageList omitted. + +// de_ConflictException omitted. + +// de_CreateAddressResult omitted. + +// de_CreateClusterResult omitted. + +// de_CreateJobResult omitted. + +// de_CreateLongTermPricingResult omitted. + +// de_CreateReturnShippingLabelResult omitted. + +// de_DataTransfer omitted. + +// de_DependentService omitted. + +// de_DependentServiceList omitted. + +// de_DescribeAddressesResult omitted. + +// de_DescribeAddressResult omitted. /** * deserializeAws_json1_1DescribeClusterResult */ const de_DescribeClusterResult = (output: any, context: __SerdeContext): DescribeClusterResult => { - return { - ClusterMetadata: output.ClusterMetadata != null ? de_ClusterMetadata(output.ClusterMetadata, context) : undefined, - } as any; + return take(output, { + ClusterMetadata: (_: any) => de_ClusterMetadata(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribeJobResult */ const de_DescribeJobResult = (output: any, context: __SerdeContext): DescribeJobResult => { - return { - JobMetadata: output.JobMetadata != null ? de_JobMetadata(output.JobMetadata, context) : undefined, - SubJobMetadata: output.SubJobMetadata != null ? de_JobMetadataList(output.SubJobMetadata, context) : undefined, - } as any; + return take(output, { + JobMetadata: (_: any) => de_JobMetadata(_, context), + SubJobMetadata: (_: any) => de_JobMetadataList(_, context), + }) as any; }; /** @@ -2888,207 +2166,60 @@ const de_DescribeReturnShippingLabelResult = ( output: any, context: __SerdeContext ): DescribeReturnShippingLabelResult => { - return { - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationDate))) - : undefined, - ReturnShippingLabelURI: __expectString(output.ReturnShippingLabelURI), - Status: __expectString(output.Status), - } as any; + return take(output, { + ExpirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReturnShippingLabelURI: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeviceConfiguration - */ -const de_DeviceConfiguration = (output: any, context: __SerdeContext): DeviceConfiguration => { - return { - SnowconeDeviceConfiguration: - output.SnowconeDeviceConfiguration != null - ? de_SnowconeDeviceConfiguration(output.SnowconeDeviceConfiguration, context) - : undefined, - } as any; -}; +// de_DeviceConfiguration omitted. -/** - * deserializeAws_json1_1Ec2AmiResource - */ -const de_Ec2AmiResource = (output: any, context: __SerdeContext): Ec2AmiResource => { - return { - AmiId: __expectString(output.AmiId), - SnowballAmiId: __expectString(output.SnowballAmiId), - } as any; -}; +// de_Ec2AmiResource omitted. -/** - * deserializeAws_json1_1Ec2AmiResourceList - */ -const de_Ec2AmiResourceList = (output: any, context: __SerdeContext): Ec2AmiResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Ec2AmiResource(entry, context); - }); - return retVal; -}; +// de_Ec2AmiResourceList omitted. -/** - * deserializeAws_json1_1Ec2RequestFailedException - */ -const de_Ec2RequestFailedException = (output: any, context: __SerdeContext): Ec2RequestFailedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_Ec2RequestFailedException omitted. -/** - * deserializeAws_json1_1EKSOnDeviceServiceConfiguration - */ -const de_EKSOnDeviceServiceConfiguration = (output: any, context: __SerdeContext): EKSOnDeviceServiceConfiguration => { - return { - EKSAnywhereVersion: __expectString(output.EKSAnywhereVersion), - KubernetesVersion: __expectString(output.KubernetesVersion), - } as any; -}; +// de_EKSOnDeviceServiceConfiguration omitted. -/** - * deserializeAws_json1_1EventTriggerDefinition - */ -const de_EventTriggerDefinition = (output: any, context: __SerdeContext): EventTriggerDefinition => { - return { - EventResourceARN: __expectString(output.EventResourceARN), - } as any; -}; +// de_EventTriggerDefinition omitted. -/** - * deserializeAws_json1_1EventTriggerDefinitionList - */ -const de_EventTriggerDefinitionList = (output: any, context: __SerdeContext): EventTriggerDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventTriggerDefinition(entry, context); - }); - return retVal; -}; +// de_EventTriggerDefinitionList omitted. -/** - * deserializeAws_json1_1GetJobManifestResult - */ -const de_GetJobManifestResult = (output: any, context: __SerdeContext): GetJobManifestResult => { - return { - ManifestURI: __expectString(output.ManifestURI), - } as any; -}; +// de_GetJobManifestResult omitted. -/** - * deserializeAws_json1_1GetJobUnlockCodeResult - */ -const de_GetJobUnlockCodeResult = (output: any, context: __SerdeContext): GetJobUnlockCodeResult => { - return { - UnlockCode: __expectString(output.UnlockCode), - } as any; -}; +// de_GetJobUnlockCodeResult omitted. -/** - * deserializeAws_json1_1GetSnowballUsageResult - */ -const de_GetSnowballUsageResult = (output: any, context: __SerdeContext): GetSnowballUsageResult => { - return { - SnowballLimit: __expectInt32(output.SnowballLimit), - SnowballsInUse: __expectInt32(output.SnowballsInUse), - } as any; -}; +// de_GetSnowballUsageResult omitted. -/** - * deserializeAws_json1_1GetSoftwareUpdatesResult - */ -const de_GetSoftwareUpdatesResult = (output: any, context: __SerdeContext): GetSoftwareUpdatesResult => { - return { - UpdatesURI: __expectString(output.UpdatesURI), - } as any; -}; +// de_GetSoftwareUpdatesResult omitted. -/** - * deserializeAws_json1_1INDTaxDocuments - */ -const de_INDTaxDocuments = (output: any, context: __SerdeContext): INDTaxDocuments => { - return { - GSTIN: __expectString(output.GSTIN), - } as any; -}; +// de_INDTaxDocuments omitted. -/** - * deserializeAws_json1_1InvalidAddressException - */ -const de_InvalidAddressException = (output: any, context: __SerdeContext): InvalidAddressException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidAddressException omitted. -/** - * deserializeAws_json1_1InvalidInputCombinationException - */ -const de_InvalidInputCombinationException = ( - output: any, - context: __SerdeContext -): InvalidInputCombinationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidInputCombinationException omitted. -/** - * deserializeAws_json1_1InvalidJobStateException - */ -const de_InvalidJobStateException = (output: any, context: __SerdeContext): InvalidJobStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidJobStateException omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidNextTokenException omitted. -/** - * deserializeAws_json1_1InvalidResourceException - */ -const de_InvalidResourceException = (output: any, context: __SerdeContext): InvalidResourceException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_InvalidResourceException omitted. /** * deserializeAws_json1_1JobListEntry */ const de_JobListEntry = (output: any, context: __SerdeContext): JobListEntry => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - Description: __expectString(output.Description), - IsMaster: __expectBoolean(output.IsMaster), - JobId: __expectString(output.JobId), - JobState: __expectString(output.JobState), - JobType: __expectString(output.JobType), - SnowballType: __expectString(output.SnowballType), - } as any; + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + IsMaster: __expectBoolean, + JobId: __expectString, + JobState: __expectString, + JobType: __expectString, + SnowballType: __expectString, + }) as any; }; /** @@ -3098,61 +2229,41 @@ const de_JobListEntryList = (output: any, context: __SerdeContext): JobListEntry const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobListEntry(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1JobLogs - */ -const de_JobLogs = (output: any, context: __SerdeContext): JobLogs => { - return { - JobCompletionReportURI: __expectString(output.JobCompletionReportURI), - JobFailureLogURI: __expectString(output.JobFailureLogURI), - JobSuccessLogURI: __expectString(output.JobSuccessLogURI), - } as any; -}; +// de_JobLogs omitted. /** * deserializeAws_json1_1JobMetadata */ const de_JobMetadata = (output: any, context: __SerdeContext): JobMetadata => { - return { - AddressId: __expectString(output.AddressId), - ClusterId: __expectString(output.ClusterId), - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - DataTransferProgress: - output.DataTransferProgress != null ? de_DataTransfer(output.DataTransferProgress, context) : undefined, - Description: __expectString(output.Description), - DeviceConfiguration: - output.DeviceConfiguration != null ? de_DeviceConfiguration(output.DeviceConfiguration, context) : undefined, - ForwardingAddressId: __expectString(output.ForwardingAddressId), - JobId: __expectString(output.JobId), - JobLogInfo: output.JobLogInfo != null ? de_JobLogs(output.JobLogInfo, context) : undefined, - JobState: __expectString(output.JobState), - JobType: __expectString(output.JobType), - KmsKeyARN: __expectString(output.KmsKeyARN), - LongTermPricingId: __expectString(output.LongTermPricingId), - Notification: output.Notification != null ? de_Notification(output.Notification, context) : undefined, - OnDeviceServiceConfiguration: - output.OnDeviceServiceConfiguration != null - ? de_OnDeviceServiceConfiguration(output.OnDeviceServiceConfiguration, context) - : undefined, - RemoteManagement: __expectString(output.RemoteManagement), - Resources: output.Resources != null ? de_JobResource(output.Resources, context) : undefined, - RoleARN: __expectString(output.RoleARN), - ShippingDetails: output.ShippingDetails != null ? de_ShippingDetails(output.ShippingDetails, context) : undefined, - SnowballCapacityPreference: __expectString(output.SnowballCapacityPreference), - SnowballType: __expectString(output.SnowballType), - TaxDocuments: output.TaxDocuments != null ? de_TaxDocuments(output.TaxDocuments, context) : undefined, - } as any; + return take(output, { + AddressId: __expectString, + ClusterId: __expectString, + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataTransferProgress: _json, + Description: __expectString, + DeviceConfiguration: _json, + ForwardingAddressId: __expectString, + JobId: __expectString, + JobLogInfo: _json, + JobState: __expectString, + JobType: __expectString, + KmsKeyARN: __expectString, + LongTermPricingId: __expectString, + Notification: _json, + OnDeviceServiceConfiguration: _json, + RemoteManagement: __expectString, + Resources: _json, + RoleARN: __expectString, + ShippingDetails: _json, + SnowballCapacityPreference: __expectString, + SnowballType: __expectString, + TaxDocuments: _json, + }) as any; }; /** @@ -3162,170 +2273,68 @@ const de_JobMetadataList = (output: any, context: __SerdeContext): JobMetadata[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_JobMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1JobResource - */ -const de_JobResource = (output: any, context: __SerdeContext): JobResource => { - return { - Ec2AmiResources: - output.Ec2AmiResources != null ? de_Ec2AmiResourceList(output.Ec2AmiResources, context) : undefined, - LambdaResources: - output.LambdaResources != null ? de_LambdaResourceList(output.LambdaResources, context) : undefined, - S3Resources: output.S3Resources != null ? de_S3ResourceList(output.S3Resources, context) : undefined, - } as any; -}; +// de_JobResource omitted. -/** - * deserializeAws_json1_1JobStateList - */ -const de_JobStateList = (output: any, context: __SerdeContext): (JobState | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_JobStateList omitted. -/** - * deserializeAws_json1_1KeyRange - */ -const de_KeyRange = (output: any, context: __SerdeContext): KeyRange => { - return { - BeginMarker: __expectString(output.BeginMarker), - EndMarker: __expectString(output.EndMarker), - } as any; -}; +// de_KeyRange omitted. -/** - * deserializeAws_json1_1KMSRequestFailedException - */ -const de_KMSRequestFailedException = (output: any, context: __SerdeContext): KMSRequestFailedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_KMSRequestFailedException omitted. -/** - * deserializeAws_json1_1LambdaResource - */ -const de_LambdaResource = (output: any, context: __SerdeContext): LambdaResource => { - return { - EventTriggers: - output.EventTriggers != null ? de_EventTriggerDefinitionList(output.EventTriggers, context) : undefined, - LambdaArn: __expectString(output.LambdaArn), - } as any; -}; +// de_LambdaResource omitted. -/** - * deserializeAws_json1_1LambdaResourceList - */ -const de_LambdaResourceList = (output: any, context: __SerdeContext): LambdaResource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LambdaResource(entry, context); - }); - return retVal; -}; +// de_LambdaResourceList omitted. /** * deserializeAws_json1_1ListClusterJobsResult */ const de_ListClusterJobsResult = (output: any, context: __SerdeContext): ListClusterJobsResult => { - return { - JobListEntries: output.JobListEntries != null ? de_JobListEntryList(output.JobListEntries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + JobListEntries: (_: any) => de_JobListEntryList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListClustersResult */ const de_ListClustersResult = (output: any, context: __SerdeContext): ListClustersResult => { - return { - ClusterListEntries: - output.ClusterListEntries != null ? de_ClusterListEntryList(output.ClusterListEntries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + ClusterListEntries: (_: any) => de_ClusterListEntryList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListCompatibleImagesResult - */ -const de_ListCompatibleImagesResult = (output: any, context: __SerdeContext): ListCompatibleImagesResult => { - return { - CompatibleImages: - output.CompatibleImages != null ? de_CompatibleImageList(output.CompatibleImages, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListCompatibleImagesResult omitted. /** * deserializeAws_json1_1ListJobsResult */ const de_ListJobsResult = (output: any, context: __SerdeContext): ListJobsResult => { - return { - JobListEntries: output.JobListEntries != null ? de_JobListEntryList(output.JobListEntries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + JobListEntries: (_: any) => de_JobListEntryList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListLongTermPricingResult */ const de_ListLongTermPricingResult = (output: any, context: __SerdeContext): ListLongTermPricingResult => { - return { - LongTermPricingEntries: - output.LongTermPricingEntries != null - ? de_LongTermPricingEntryList(output.LongTermPricingEntries, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + LongTermPricingEntries: (_: any) => de_LongTermPricingEntryList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListServiceVersionsResult - */ -const de_ListServiceVersionsResult = (output: any, context: __SerdeContext): ListServiceVersionsResult => { - return { - DependentServices: - output.DependentServices != null ? de_DependentServiceList(output.DependentServices, context) : undefined, - NextToken: __expectString(output.NextToken), - ServiceName: __expectString(output.ServiceName), - ServiceVersions: - output.ServiceVersions != null ? de_ServiceVersionList(output.ServiceVersions, context) : undefined, - } as any; -}; +// de_ListServiceVersionsResult omitted. -/** - * deserializeAws_json1_1LongTermPricingAssociatedJobIdList - */ -const de_LongTermPricingAssociatedJobIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LongTermPricingAssociatedJobIdList omitted. /** * deserializeAws_json1_1LongTermPricingEntryList @@ -3334,9 +2343,6 @@ const de_LongTermPricingEntryList = (output: any, context: __SerdeContext): Long const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LongTermPricingListEntry(entry, context); }); return retVal; @@ -3346,253 +2352,61 @@ const de_LongTermPricingEntryList = (output: any, context: __SerdeContext): Long * deserializeAws_json1_1LongTermPricingListEntry */ const de_LongTermPricingListEntry = (output: any, context: __SerdeContext): LongTermPricingListEntry => { - return { - CurrentActiveJob: __expectString(output.CurrentActiveJob), - IsLongTermPricingAutoRenew: __expectBoolean(output.IsLongTermPricingAutoRenew), - JobIds: output.JobIds != null ? de_LongTermPricingAssociatedJobIdList(output.JobIds, context) : undefined, - LongTermPricingEndDate: - output.LongTermPricingEndDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LongTermPricingEndDate))) - : undefined, - LongTermPricingId: __expectString(output.LongTermPricingId), - LongTermPricingStartDate: - output.LongTermPricingStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LongTermPricingStartDate))) - : undefined, - LongTermPricingStatus: __expectString(output.LongTermPricingStatus), - LongTermPricingType: __expectString(output.LongTermPricingType), - ReplacementJob: __expectString(output.ReplacementJob), - SnowballType: __expectString(output.SnowballType), - } as any; -}; - -/** - * deserializeAws_json1_1NFSOnDeviceServiceConfiguration - */ -const de_NFSOnDeviceServiceConfiguration = (output: any, context: __SerdeContext): NFSOnDeviceServiceConfiguration => { - return { - StorageLimit: __expectInt32(output.StorageLimit), - StorageUnit: __expectString(output.StorageUnit), - } as any; + return take(output, { + CurrentActiveJob: __expectString, + IsLongTermPricingAutoRenew: __expectBoolean, + JobIds: _json, + LongTermPricingEndDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LongTermPricingId: __expectString, + LongTermPricingStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LongTermPricingStatus: __expectString, + LongTermPricingType: __expectString, + ReplacementJob: __expectString, + SnowballType: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1Notification - */ -const de_Notification = (output: any, context: __SerdeContext): Notification => { - return { - JobStatesToNotify: - output.JobStatesToNotify != null ? de_JobStateList(output.JobStatesToNotify, context) : undefined, - NotifyAll: __expectBoolean(output.NotifyAll), - SnsTopicARN: __expectString(output.SnsTopicARN), - } as any; -}; +// de_NFSOnDeviceServiceConfiguration omitted. -/** - * deserializeAws_json1_1OnDeviceServiceConfiguration - */ -const de_OnDeviceServiceConfiguration = (output: any, context: __SerdeContext): OnDeviceServiceConfiguration => { - return { - EKSOnDeviceService: - output.EKSOnDeviceService != null - ? de_EKSOnDeviceServiceConfiguration(output.EKSOnDeviceService, context) - : undefined, - NFSOnDeviceService: - output.NFSOnDeviceService != null - ? de_NFSOnDeviceServiceConfiguration(output.NFSOnDeviceService, context) - : undefined, - TGWOnDeviceService: - output.TGWOnDeviceService != null - ? de_TGWOnDeviceServiceConfiguration(output.TGWOnDeviceService, context) - : undefined, - } as any; -}; +// de_Notification omitted. -/** - * deserializeAws_json1_1ReturnShippingLabelAlreadyExistsException - */ -const de_ReturnShippingLabelAlreadyExistsException = ( - output: any, - context: __SerdeContext -): ReturnShippingLabelAlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OnDeviceServiceConfiguration omitted. -/** - * deserializeAws_json1_1S3Resource - */ -const de_S3Resource = (output: any, context: __SerdeContext): S3Resource => { - return { - BucketArn: __expectString(output.BucketArn), - KeyRange: output.KeyRange != null ? de_KeyRange(output.KeyRange, context) : undefined, - TargetOnDeviceServices: - output.TargetOnDeviceServices != null - ? de_TargetOnDeviceServiceList(output.TargetOnDeviceServices, context) - : undefined, - } as any; -}; +// de_ReturnShippingLabelAlreadyExistsException omitted. -/** - * deserializeAws_json1_1S3ResourceList - */ -const de_S3ResourceList = (output: any, context: __SerdeContext): S3Resource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3Resource(entry, context); - }); - return retVal; -}; +// de_S3Resource omitted. -/** - * deserializeAws_json1_1ServiceVersion - */ -const de_ServiceVersion = (output: any, context: __SerdeContext): ServiceVersion => { - return { - Version: __expectString(output.Version), - } as any; -}; +// de_S3ResourceList omitted. -/** - * deserializeAws_json1_1ServiceVersionList - */ -const de_ServiceVersionList = (output: any, context: __SerdeContext): ServiceVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceVersion(entry, context); - }); - return retVal; -}; +// de_ServiceVersion omitted. -/** - * deserializeAws_json1_1Shipment - */ -const de_Shipment = (output: any, context: __SerdeContext): Shipment => { - return { - Status: __expectString(output.Status), - TrackingNumber: __expectString(output.TrackingNumber), - } as any; -}; +// de_ServiceVersionList omitted. -/** - * deserializeAws_json1_1ShippingDetails - */ -const de_ShippingDetails = (output: any, context: __SerdeContext): ShippingDetails => { - return { - InboundShipment: output.InboundShipment != null ? de_Shipment(output.InboundShipment, context) : undefined, - OutboundShipment: output.OutboundShipment != null ? de_Shipment(output.OutboundShipment, context) : undefined, - ShippingOption: __expectString(output.ShippingOption), - } as any; -}; +// de_Shipment omitted. -/** - * deserializeAws_json1_1SnowconeDeviceConfiguration - */ -const de_SnowconeDeviceConfiguration = (output: any, context: __SerdeContext): SnowconeDeviceConfiguration => { - return { - WirelessConnection: - output.WirelessConnection != null ? de_WirelessConnection(output.WirelessConnection, context) : undefined, - } as any; -}; +// de_ShippingDetails omitted. -/** - * deserializeAws_json1_1TargetOnDeviceService - */ -const de_TargetOnDeviceService = (output: any, context: __SerdeContext): TargetOnDeviceService => { - return { - ServiceName: __expectString(output.ServiceName), - TransferOption: __expectString(output.TransferOption), - } as any; -}; +// de_SnowconeDeviceConfiguration omitted. -/** - * deserializeAws_json1_1TargetOnDeviceServiceList - */ -const de_TargetOnDeviceServiceList = (output: any, context: __SerdeContext): TargetOnDeviceService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetOnDeviceService(entry, context); - }); - return retVal; -}; +// de_TargetOnDeviceService omitted. -/** - * deserializeAws_json1_1TaxDocuments - */ -const de_TaxDocuments = (output: any, context: __SerdeContext): TaxDocuments => { - return { - IND: output.IND != null ? de_INDTaxDocuments(output.IND, context) : undefined, - } as any; -}; +// de_TargetOnDeviceServiceList omitted. -/** - * deserializeAws_json1_1TGWOnDeviceServiceConfiguration - */ -const de_TGWOnDeviceServiceConfiguration = (output: any, context: __SerdeContext): TGWOnDeviceServiceConfiguration => { - return { - StorageLimit: __expectInt32(output.StorageLimit), - StorageUnit: __expectString(output.StorageUnit), - } as any; -}; +// de_TaxDocuments omitted. -/** - * deserializeAws_json1_1UnsupportedAddressException - */ -const de_UnsupportedAddressException = (output: any, context: __SerdeContext): UnsupportedAddressException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TGWOnDeviceServiceConfiguration omitted. -/** - * deserializeAws_json1_1UpdateClusterResult - */ -const de_UpdateClusterResult = (output: any, context: __SerdeContext): UpdateClusterResult => { - return {} as any; -}; +// de_UnsupportedAddressException omitted. -/** - * deserializeAws_json1_1UpdateJobResult - */ -const de_UpdateJobResult = (output: any, context: __SerdeContext): UpdateJobResult => { - return {} as any; -}; +// de_UpdateClusterResult omitted. -/** - * deserializeAws_json1_1UpdateJobShipmentStateResult - */ -const de_UpdateJobShipmentStateResult = (output: any, context: __SerdeContext): UpdateJobShipmentStateResult => { - return {} as any; -}; +// de_UpdateJobResult omitted. -/** - * deserializeAws_json1_1UpdateLongTermPricingResult - */ -const de_UpdateLongTermPricingResult = (output: any, context: __SerdeContext): UpdateLongTermPricingResult => { - return {} as any; -}; +// de_UpdateJobShipmentStateResult omitted. -/** - * deserializeAws_json1_1WirelessConnection - */ -const de_WirelessConnection = (output: any, context: __SerdeContext): WirelessConnection => { - return { - IsWifiEnabled: __expectBoolean(output.IsWifiEnabled), - } as any; -}; +// de_UpdateLongTermPricingResult omitted. + +// de_WirelessConnection omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -3614,6 +2428,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-sns/src/protocols/Aws_query.ts b/clients/client-sns/src/protocols/Aws_query.ts index b6da69610d6e..67ebd30f294d 100644 --- a/clients/client-sns/src/protocols/Aws_query.ts +++ b/clients/client-sns/src/protocols/Aws_query.ts @@ -9,7 +9,7 @@ import { getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -982,7 +982,7 @@ export const de_AddPermissionCommand = async ( const response: AddPermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1012,10 +1012,9 @@ const de_AddPermissionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1038,7 +1037,7 @@ export const de_CheckIfPhoneNumberIsOptedOutCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1068,10 +1067,9 @@ const de_CheckIfPhoneNumberIsOptedOutCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1094,7 +1092,7 @@ export const de_ConfirmSubscriptionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1130,10 +1128,9 @@ const de_ConfirmSubscriptionCommandError = async ( throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1156,7 +1153,7 @@ export const de_CreatePlatformApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1183,10 +1180,9 @@ const de_CreatePlatformApplicationCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1209,7 +1205,7 @@ export const de_CreatePlatformEndpointCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1239,10 +1235,9 @@ const de_CreatePlatformEndpointCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1265,7 +1260,7 @@ export const de_CreateSMSSandboxPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1301,10 +1296,9 @@ const de_CreateSMSSandboxPhoneNumberCommandError = async ( throw await de_UserErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1327,7 +1321,7 @@ export const de_CreateTopicCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1372,10 +1366,9 @@ const de_CreateTopicCommandError = async ( throw await de_TopicLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1395,7 +1388,7 @@ export const de_DeleteEndpointCommand = async ( const response: DeleteEndpointCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1422,10 +1415,9 @@ const de_DeleteEndpointCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1445,7 +1437,7 @@ export const de_DeletePlatformApplicationCommand = async ( const response: DeletePlatformApplicationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1472,10 +1464,9 @@ const de_DeletePlatformApplicationCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1498,7 +1489,7 @@ export const de_DeleteSMSSandboxPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1534,10 +1525,9 @@ const de_DeleteSMSSandboxPhoneNumberCommandError = async ( throw await de_UserErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1557,7 +1547,7 @@ export const de_DeleteTopicCommand = async ( const response: DeleteTopicCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1596,10 +1586,9 @@ const de_DeleteTopicCommandError = async ( throw await de_TagPolicyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1622,7 +1611,7 @@ export const de_GetDataProtectionPolicyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1655,10 +1644,9 @@ const de_GetDataProtectionPolicyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1681,7 +1669,7 @@ export const de_GetEndpointAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1711,10 +1699,9 @@ const de_GetEndpointAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1737,7 +1724,7 @@ export const de_GetPlatformApplicationAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1767,10 +1754,9 @@ const de_GetPlatformApplicationAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,7 +1779,7 @@ export const de_GetSMSAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1823,10 +1809,9 @@ const de_GetSMSAttributesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1849,7 +1834,7 @@ export const de_GetSMSSandboxAccountStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1876,10 +1861,9 @@ const de_GetSMSSandboxAccountStatusCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1902,7 +1886,7 @@ export const de_GetSubscriptionAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1932,10 +1916,9 @@ const de_GetSubscriptionAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,7 +1941,7 @@ export const de_GetTopicAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1991,10 +1974,9 @@ const de_GetTopicAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2017,7 +1999,7 @@ export const de_ListEndpointsByPlatformApplicationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2047,10 +2029,9 @@ const de_ListEndpointsByPlatformApplicationCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2073,7 +2054,7 @@ export const de_ListOriginationNumbersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2106,10 +2087,9 @@ const de_ListOriginationNumbersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2132,7 +2112,7 @@ export const de_ListPhoneNumbersOptedOutCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2162,10 +2142,9 @@ const de_ListPhoneNumbersOptedOutCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2188,7 +2167,7 @@ export const de_ListPlatformApplicationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2215,10 +2194,9 @@ const de_ListPlatformApplicationsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2241,7 +2219,7 @@ export const de_ListSMSSandboxPhoneNumbersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2274,10 +2252,9 @@ const de_ListSMSSandboxPhoneNumbersCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2300,7 +2277,7 @@ export const de_ListSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2327,10 +2304,9 @@ const de_ListSubscriptionsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2353,7 +2329,7 @@ export const de_ListSubscriptionsByTopicCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2383,10 +2359,9 @@ const de_ListSubscriptionsByTopicCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2409,7 +2384,7 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2442,10 +2417,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TagPolicyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2468,7 +2442,7 @@ export const de_ListTopicsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2495,10 +2469,9 @@ const de_ListTopicsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2521,7 +2494,7 @@ export const de_OptInPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2551,10 +2524,9 @@ const de_OptInPhoneNumberCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2577,7 +2549,7 @@ export const de_PublishCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2640,10 +2612,9 @@ const de_PublishCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2666,7 +2637,7 @@ export const de_PublishBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2744,10 +2715,9 @@ const de_PublishBatchCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2767,7 +2737,7 @@ export const de_PutDataProtectionPolicyCommand = async ( const response: PutDataProtectionPolicyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2800,10 +2770,9 @@ const de_PutDataProtectionPolicyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2823,7 +2792,7 @@ export const de_RemovePermissionCommand = async ( const response: RemovePermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2853,10 +2822,9 @@ const de_RemovePermissionCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2876,7 +2844,7 @@ export const de_SetEndpointAttributesCommand = async ( const response: SetEndpointAttributesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2906,10 +2874,9 @@ const de_SetEndpointAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2929,7 +2896,7 @@ export const de_SetPlatformApplicationAttributesCommand = async ( const response: SetPlatformApplicationAttributesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2959,10 +2926,9 @@ const de_SetPlatformApplicationAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -2985,7 +2951,7 @@ export const de_SetSMSAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3015,10 +2981,9 @@ const de_SetSMSAttributesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3038,7 +3003,7 @@ export const de_SetSubscriptionAttributesCommand = async ( const response: SetSubscriptionAttributesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3071,10 +3036,9 @@ const de_SetSubscriptionAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3094,7 +3058,7 @@ export const de_SetTopicAttributesCommand = async ( const response: SetTopicAttributesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3127,10 +3091,9 @@ const de_SetTopicAttributesCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3153,7 +3116,7 @@ export const de_SubscribeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3192,10 +3155,9 @@ const de_SubscribeCommandError = async ( throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3218,7 +3180,7 @@ export const de_TagResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3257,10 +3219,9 @@ const de_TagResourceCommandError = async ( throw await de_TagPolicyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3280,7 +3241,7 @@ export const de_UnsubscribeCommand = async ( const response: UnsubscribeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3313,10 +3274,9 @@ const de_UnsubscribeCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3339,7 +3299,7 @@ export const de_UntagResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3378,10 +3338,9 @@ const de_UntagResourceCommandError = async ( throw await de_TagPolicyExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3404,7 +3363,7 @@ export const de_VerifySMSSandboxPhoneNumberCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3440,10 +3399,9 @@ const de_VerifySMSSandboxPhoneNumberCommandError = async ( throw await de_VerificationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -5993,6 +5951,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-sqs/src/protocols/Aws_query.ts b/clients/client-sqs/src/protocols/Aws_query.ts index 47d871756a36..e6dec58a2314 100644 --- a/clients/client-sqs/src/protocols/Aws_query.ts +++ b/clients/client-sqs/src/protocols/Aws_query.ts @@ -7,7 +7,7 @@ import { getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -462,7 +462,7 @@ export const de_AddPermissionCommand = async ( const response: AddPermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -483,10 +483,9 @@ const de_AddPermissionCommandError = async ( throw await de_OverLimitRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -506,7 +505,7 @@ export const de_ChangeMessageVisibilityCommand = async ( const response: ChangeMessageVisibilityCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -530,10 +529,9 @@ const de_ChangeMessageVisibilityCommandError = async ( throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -556,7 +554,7 @@ export const de_ChangeMessageVisibilityBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -586,10 +584,9 @@ const de_ChangeMessageVisibilityBatchCommandError = async ( throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -612,7 +609,7 @@ export const de_CreateQueueCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -636,10 +633,9 @@ const de_CreateQueueCommandError = async ( throw await de_QueueNameExistsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -659,7 +655,7 @@ export const de_DeleteMessageCommand = async ( const response: DeleteMessageCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -683,10 +679,9 @@ const de_DeleteMessageCommandError = async ( throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -709,7 +704,7 @@ export const de_DeleteMessageBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -739,10 +734,9 @@ const de_DeleteMessageBatchCommandError = async ( throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -762,7 +756,7 @@ export const de_DeleteQueueCommand = async ( const response: DeleteQueueCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -778,10 +772,9 @@ const de_DeleteQueueCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -803,7 +796,7 @@ export const de_GetQueueAttributesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -824,10 +817,9 @@ const de_GetQueueAttributesCommandError = async ( throw await de_InvalidAttributeNameRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -850,7 +842,7 @@ export const de_GetQueueUrlCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -871,10 +863,9 @@ const de_GetQueueUrlCommandError = async ( throw await de_QueueDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -897,7 +888,7 @@ export const de_ListDeadLetterSourceQueuesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -918,10 +909,9 @@ const de_ListDeadLetterSourceQueuesCommandError = async ( throw await de_QueueDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -944,7 +934,7 @@ export const de_ListQueuesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -960,10 +950,9 @@ const de_ListQueuesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -985,7 +974,7 @@ export const de_ListQueueTagsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1001,10 +990,9 @@ const de_ListQueueTagsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1023,7 +1011,7 @@ export const de_PurgeQueueCommand = async ( const response: PurgeQueueCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1047,10 +1035,9 @@ const de_PurgeQueueCommandError = async ( throw await de_PurgeQueueInProgressRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1073,7 +1060,7 @@ export const de_ReceiveMessageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1094,10 +1081,9 @@ const de_ReceiveMessageCommandError = async ( throw await de_OverLimitRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,7 +1103,7 @@ export const de_RemovePermissionCommand = async ( const response: RemovePermissionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1133,10 +1119,9 @@ const de_RemovePermissionCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1158,7 +1143,7 @@ export const de_SendMessageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1182,10 +1167,9 @@ const de_SendMessageCommandError = async ( throw await de_InvalidMessageContentsRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1208,7 +1192,7 @@ export const de_SendMessageBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1244,10 +1228,9 @@ const de_SendMessageBatchCommandError = async ( throw await de_UnsupportedOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1267,7 +1250,7 @@ export const de_SetQueueAttributesCommand = async ( const response: SetQueueAttributesCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1288,10 +1271,9 @@ const de_SetQueueAttributesCommandError = async ( throw await de_InvalidAttributeNameRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1311,7 +1293,7 @@ export const de_TagQueueCommand = async ( const response: TagQueueCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1327,10 +1309,9 @@ const de_TagQueueCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1349,7 +1330,7 @@ export const de_UntagQueueCommand = async ( const response: UntagQueueCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1365,10 +1346,9 @@ const de_UntagQueueCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3023,6 +3003,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ssm-contacts/src/protocols/Aws_json1_1.ts b/clients/client-ssm-contacts/src/protocols/Aws_json1_1.ts index c0ce7545c248..49f76ecbce63 100644 --- a/clients/client-ssm-contacts/src/protocols/Aws_json1_1.ts +++ b/clients/client-ssm-contacts/src/protocols/Aws_json1_1.ts @@ -1,14 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -101,49 +101,31 @@ import { UpdateContactCommandInput, UpdateContactCommandOutput } from "../comman import { UpdateRotationCommandInput, UpdateRotationCommandOutput } from "../commands/UpdateRotationCommand"; import { AcceptPageRequest, - AcceptPageResult, AccessDeniedException, ActivateContactChannelRequest, - ActivateContactChannelResult, ChannelTargetInfo, ConflictException, - Contact, - ContactChannel, ContactChannelAddress, ContactTargetInfo, CoverageTime, CreateContactChannelRequest, - CreateContactChannelResult, CreateContactRequest, - CreateContactResult, CreateRotationOverrideRequest, - CreateRotationOverrideResult, CreateRotationRequest, - CreateRotationResult, DataEncryptionException, - DayOfWeek, DeactivateContactChannelRequest, - DeactivateContactChannelResult, DeleteContactChannelRequest, - DeleteContactChannelResult, DeleteContactRequest, - DeleteContactResult, DeleteRotationOverrideRequest, - DeleteRotationOverrideResult, DeleteRotationRequest, - DeleteRotationResult, - DependentEntity, DescribeEngagementRequest, DescribeEngagementResult, DescribePageRequest, DescribePageResult, Engagement, GetContactChannelRequest, - GetContactChannelResult, GetContactPolicyRequest, - GetContactPolicyResult, GetContactRequest, - GetContactResult, GetRotationOverrideRequest, GetRotationOverrideResult, GetRotationRequest, @@ -151,15 +133,12 @@ import { HandOffTime, InternalServerException, ListContactChannelsRequest, - ListContactChannelsResult, ListContactsRequest, - ListContactsResult, ListEngagementsRequest, ListEngagementsResult, ListPageReceiptsRequest, ListPageReceiptsResult, ListPageResolutionsRequest, - ListPageResolutionsResult, ListPagesByContactRequest, ListPagesByContactResult, ListPagesByEngagementRequest, @@ -173,45 +152,32 @@ import { ListRotationsRequest, ListRotationsResult, ListTagsForResourceRequest, - ListTagsForResourceResult, MonthlySetting, Page, Plan, PreviewOverride, PutContactPolicyRequest, - PutContactPolicyResult, Receipt, RecurrenceSettings, - ResolutionContact, ResourceNotFoundException, Rotation, RotationOverride, RotationShift, SendActivationCodeRequest, - SendActivationCodeResult, ServiceQuotaExceededException, - ShiftDetails, Stage, StartEngagementRequest, - StartEngagementResult, StopEngagementRequest, - StopEngagementResult, Tag, TagResourceRequest, - TagResourceResult, Target, ThrottlingException, TimeRange, UntagResourceRequest, - UntagResourceResult, UpdateContactChannelRequest, - UpdateContactChannelResult, UpdateContactRequest, - UpdateContactResult, UpdateRotationRequest, - UpdateRotationResult, ValidationException, - ValidationExceptionField, WeeklySetting, } from "../models/models_0"; import { SSMContactsServiceException as __BaseException } from "../models/SSMContactsServiceException"; @@ -225,7 +191,7 @@ export const se_AcceptPageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AcceptPage"); let body: any; - body = JSON.stringify(se_AcceptPageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -238,7 +204,7 @@ export const se_ActivateContactChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ActivateContactChannel"); let body: any; - body = JSON.stringify(se_ActivateContactChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -303,7 +269,7 @@ export const se_DeactivateContactChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeactivateContactChannel"); let body: any; - body = JSON.stringify(se_DeactivateContactChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -316,7 +282,7 @@ export const se_DeleteContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContact"); let body: any; - body = JSON.stringify(se_DeleteContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -329,7 +295,7 @@ export const se_DeleteContactChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteContactChannel"); let body: any; - body = JSON.stringify(se_DeleteContactChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -342,7 +308,7 @@ export const se_DeleteRotationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRotation"); let body: any; - body = JSON.stringify(se_DeleteRotationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -355,7 +321,7 @@ export const se_DeleteRotationOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRotationOverride"); let body: any; - body = JSON.stringify(se_DeleteRotationOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -368,7 +334,7 @@ export const se_DescribeEngagementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEngagement"); let body: any; - body = JSON.stringify(se_DescribeEngagementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -381,7 +347,7 @@ export const se_DescribePageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePage"); let body: any; - body = JSON.stringify(se_DescribePageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -394,7 +360,7 @@ export const se_GetContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContact"); let body: any; - body = JSON.stringify(se_GetContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -407,7 +373,7 @@ export const se_GetContactChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContactChannel"); let body: any; - body = JSON.stringify(se_GetContactChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -420,7 +386,7 @@ export const se_GetContactPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetContactPolicy"); let body: any; - body = JSON.stringify(se_GetContactPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -433,7 +399,7 @@ export const se_GetRotationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRotation"); let body: any; - body = JSON.stringify(se_GetRotationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -446,7 +412,7 @@ export const se_GetRotationOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRotationOverride"); let body: any; - body = JSON.stringify(se_GetRotationOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -459,7 +425,7 @@ export const se_ListContactChannelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListContactChannels"); let body: any; - body = JSON.stringify(se_ListContactChannelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -472,7 +438,7 @@ export const se_ListContactsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListContacts"); let body: any; - body = JSON.stringify(se_ListContactsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -498,7 +464,7 @@ export const se_ListPageReceiptsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPageReceipts"); let body: any; - body = JSON.stringify(se_ListPageReceiptsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -511,7 +477,7 @@ export const se_ListPageResolutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPageResolutions"); let body: any; - body = JSON.stringify(se_ListPageResolutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -524,7 +490,7 @@ export const se_ListPagesByContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPagesByContact"); let body: any; - body = JSON.stringify(se_ListPagesByContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -537,7 +503,7 @@ export const se_ListPagesByEngagementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPagesByEngagement"); let body: any; - body = JSON.stringify(se_ListPagesByEngagementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -576,7 +542,7 @@ export const se_ListRotationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRotations"); let body: any; - body = JSON.stringify(se_ListRotationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -602,7 +568,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -615,7 +581,7 @@ export const se_PutContactPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutContactPolicy"); let body: any; - body = JSON.stringify(se_PutContactPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -628,7 +594,7 @@ export const se_SendActivationCodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendActivationCode"); let body: any; - body = JSON.stringify(se_SendActivationCodeRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -654,7 +620,7 @@ export const se_StopEngagementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopEngagement"); let body: any; - body = JSON.stringify(se_StopEngagementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -667,7 +633,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -680,7 +646,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -693,7 +659,7 @@ export const se_UpdateContactCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContact"); let body: any; - body = JSON.stringify(se_UpdateContactRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -706,7 +672,7 @@ export const se_UpdateContactChannelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateContactChannel"); let body: any; - body = JSON.stringify(se_UpdateContactChannelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -735,12 +701,12 @@ export const de_AcceptPageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AcceptPageResult(data, context); + contents = _json(data); const response: AcceptPageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -773,10 +739,9 @@ const de_AcceptPageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -794,12 +759,12 @@ export const de_ActivateContactChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ActivateContactChannelResult(data, context); + contents = _json(data); const response: ActivateContactChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -832,10 +797,9 @@ const de_ActivateContactChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -853,12 +817,12 @@ export const de_CreateContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateContactResult(data, context); + contents = _json(data); const response: CreateContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -897,10 +861,9 @@ const de_CreateContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -918,12 +881,12 @@ export const de_CreateContactChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateContactChannelResult(data, context); + contents = _json(data); const response: CreateContactChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -959,10 +922,9 @@ const de_CreateContactChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -980,12 +942,12 @@ export const de_CreateRotationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRotationResult(data, context); + contents = _json(data); const response: CreateRotationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1021,10 +983,9 @@ const de_CreateRotationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1042,12 +1003,12 @@ export const de_CreateRotationOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRotationOverrideResult(data, context); + contents = _json(data); const response: CreateRotationOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1083,10 +1044,9 @@ const de_CreateRotationOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1104,12 +1064,12 @@ export const de_DeactivateContactChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeactivateContactChannelResult(data, context); + contents = _json(data); const response: DeactivateContactChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1142,10 +1102,9 @@ const de_DeactivateContactChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1163,12 +1122,12 @@ export const de_DeleteContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContactResult(data, context); + contents = _json(data); const response: DeleteContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1204,10 +1163,9 @@ const de_DeleteContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1225,12 +1183,12 @@ export const de_DeleteContactChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteContactChannelResult(data, context); + contents = _json(data); const response: DeleteContactChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1263,10 +1221,9 @@ const de_DeleteContactChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1284,12 +1241,12 @@ export const de_DeleteRotationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRotationResult(data, context); + contents = _json(data); const response: DeleteRotationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1325,10 +1282,9 @@ const de_DeleteRotationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1346,12 +1302,12 @@ export const de_DeleteRotationOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRotationOverrideResult(data, context); + contents = _json(data); const response: DeleteRotationOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1384,10 +1340,9 @@ const de_DeleteRotationOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1410,7 +1365,7 @@ export const de_DescribeEngagementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1446,10 +1401,9 @@ const de_DescribeEngagementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1472,7 +1426,7 @@ export const de_DescribePageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1508,10 +1462,9 @@ const de_DescribePageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1529,12 +1482,12 @@ export const de_GetContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContactResult(data, context); + contents = _json(data); const response: GetContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1570,10 +1523,9 @@ const de_GetContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1591,12 +1543,12 @@ export const de_GetContactChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContactChannelResult(data, context); + contents = _json(data); const response: GetContactChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1632,10 +1584,9 @@ const de_GetContactChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1653,12 +1604,12 @@ export const de_GetContactPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetContactPolicyResult(data, context); + contents = _json(data); const response: GetContactPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1691,10 +1642,9 @@ const de_GetContactPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1717,7 +1667,7 @@ export const de_GetRotationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1750,10 +1700,9 @@ const de_GetRotationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1776,7 +1725,7 @@ export const de_GetRotationOverrideCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1809,10 +1758,9 @@ const de_GetRotationOverrideCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1830,12 +1778,12 @@ export const de_ListContactChannelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListContactChannelsResult(data, context); + contents = _json(data); const response: ListContactChannelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1871,10 +1819,9 @@ const de_ListContactChannelsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1892,12 +1839,12 @@ export const de_ListContactsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListContactsResult(data, context); + contents = _json(data); const response: ListContactsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1927,10 +1874,9 @@ const de_ListContactsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1953,7 +1899,7 @@ export const de_ListEngagementsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1983,10 +1929,9 @@ const de_ListEngagementsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2009,7 +1954,7 @@ export const de_ListPageReceiptsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2042,10 +1987,9 @@ const de_ListPageReceiptsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2063,12 +2007,12 @@ export const de_ListPageResolutionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPageResolutionsResult(data, context); + contents = _json(data); const response: ListPageResolutionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2101,10 +2045,9 @@ const de_ListPageResolutionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2127,7 +2070,7 @@ export const de_ListPagesByContactCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2160,10 +2103,9 @@ const de_ListPagesByContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2186,7 +2128,7 @@ export const de_ListPagesByEngagementCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2219,10 +2161,9 @@ const de_ListPagesByEngagementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2245,7 +2186,7 @@ export const de_ListPreviewRotationShiftsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2275,10 +2216,9 @@ const de_ListPreviewRotationShiftsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2301,7 +2241,7 @@ export const de_ListRotationOverridesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2334,10 +2274,9 @@ const de_ListRotationOverridesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2360,7 +2299,7 @@ export const de_ListRotationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2393,10 +2332,9 @@ const de_ListRotationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2419,7 +2357,7 @@ export const de_ListRotationShiftsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2455,10 +2393,9 @@ const de_ListRotationShiftsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2476,12 +2413,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResult(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2514,10 +2451,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2535,12 +2471,12 @@ export const de_PutContactPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutContactPolicyResult(data, context); + contents = _json(data); const response: PutContactPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2576,10 +2512,9 @@ const de_PutContactPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2597,12 +2532,12 @@ export const de_SendActivationCodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendActivationCodeResult(data, context); + contents = _json(data); const response: SendActivationCodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2641,10 +2576,9 @@ const de_SendActivationCodeCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2662,12 +2596,12 @@ export const de_StartEngagementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartEngagementResult(data, context); + contents = _json(data); const response: StartEngagementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2703,10 +2637,9 @@ const de_StartEngagementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2724,12 +2657,12 @@ export const de_StopEngagementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopEngagementResult(data, context); + contents = _json(data); const response: StopEngagementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2762,10 +2695,9 @@ const de_StopEngagementCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2783,12 +2715,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResult(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2824,10 +2756,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2845,12 +2776,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResult(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2883,10 +2814,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2904,12 +2834,12 @@ export const de_UpdateContactCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateContactResult(data, context); + contents = _json(data); const response: UpdateContactCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2948,10 +2878,9 @@ const de_UpdateContactCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2969,12 +2898,12 @@ export const de_UpdateContactChannelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateContactChannelResult(data, context); + contents = _json(data); const response: UpdateContactChannelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3013,10 +2942,9 @@ const de_UpdateContactChannelCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3034,12 +2962,12 @@ export const de_UpdateRotationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRotationResult(data, context); + contents = _json(data); const response: UpdateRotationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3075,10 +3003,9 @@ const de_UpdateRotationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3092,7 +3019,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3105,7 +3032,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3121,7 +3048,7 @@ const de_DataEncryptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DataEncryptionException(body, context); + const deserialized: any = _json(body); const exception = new DataEncryptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3137,7 +3064,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3153,7 +3080,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3169,7 +3096,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3182,7 +3109,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3195,7 +3122,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3203,430 +3130,178 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AcceptPageRequest - */ -const se_AcceptPageRequest = (input: AcceptPageRequest, context: __SerdeContext): any => { - return { - ...(input.AcceptCode != null && { AcceptCode: input.AcceptCode }), - ...(input.AcceptCodeValidation != null && { AcceptCodeValidation: input.AcceptCodeValidation }), - ...(input.AcceptType != null && { AcceptType: input.AcceptType }), - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - ...(input.Note != null && { Note: input.Note }), - ...(input.PageId != null && { PageId: input.PageId }), - }; -}; +// se_AcceptPageRequest omitted. -/** - * serializeAws_json1_1ActivateContactChannelRequest - */ -const se_ActivateContactChannelRequest = (input: ActivateContactChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ActivationCode != null && { ActivationCode: input.ActivationCode }), - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - }; -}; +// se_ActivateContactChannelRequest omitted. -/** - * serializeAws_json1_1ChannelTargetInfo - */ -const se_ChannelTargetInfo = (input: ChannelTargetInfo, context: __SerdeContext): any => { - return { - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - ...(input.RetryIntervalInMinutes != null && { RetryIntervalInMinutes: input.RetryIntervalInMinutes }), - }; -}; +// se_ChannelTargetInfo omitted. -/** - * serializeAws_json1_1ContactChannelAddress - */ -const se_ContactChannelAddress = (input: ContactChannelAddress, context: __SerdeContext): any => { - return { - ...(input.SimpleAddress != null && { SimpleAddress: input.SimpleAddress }), - }; -}; +// se_ContactChannelAddress omitted. -/** - * serializeAws_json1_1ContactTargetInfo - */ -const se_ContactTargetInfo = (input: ContactTargetInfo, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.IsEssential != null && { IsEssential: input.IsEssential }), - }; -}; +// se_ContactTargetInfo omitted. -/** - * serializeAws_json1_1CoverageTime - */ -const se_CoverageTime = (input: CoverageTime, context: __SerdeContext): any => { - return { - ...(input.End != null && { End: se_HandOffTime(input.End, context) }), - ...(input.Start != null && { Start: se_HandOffTime(input.Start, context) }), - }; -}; +// se_CoverageTime omitted. -/** - * serializeAws_json1_1CoverageTimes - */ -const se_CoverageTimes = (input: CoverageTime[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CoverageTime(entry, context); - }); -}; +// se_CoverageTimes omitted. /** * serializeAws_json1_1CreateContactChannelRequest */ const se_CreateContactChannelRequest = (input: CreateContactChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.DeferActivation != null && { DeferActivation: input.DeferActivation }), - ...(input.DeliveryAddress != null && { DeliveryAddress: se_ContactChannelAddress(input.DeliveryAddress, context) }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + ContactId: [], + DeferActivation: [], + DeliveryAddress: _json, + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Name: [], + Type: [], + }); }; /** * serializeAws_json1_1CreateContactRequest */ const se_CreateContactRequest = (input: CreateContactRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.Plan != null && { Plan: se_Plan(input.Plan, context) }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + Alias: [], + DisplayName: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + Plan: _json, + Tags: _json, + Type: [], + }); }; /** * serializeAws_json1_1CreateRotationOverrideRequest */ const se_CreateRotationOverrideRequest = (input: CreateRotationOverrideRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.NewContactIds != null && { - NewContactIds: se_RotationOverrideContactsArnList(input.NewContactIds, context), - }), - ...(input.RotationId != null && { RotationId: input.RotationId }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + IdempotencyToken: [], + NewContactIds: _json, + RotationId: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1CreateRotationRequest */ const se_CreateRotationRequest = (input: CreateRotationRequest, context: __SerdeContext): any => { - return { - ...(input.ContactIds != null && { ContactIds: se_RotationContactsArnList(input.ContactIds, context) }), - ...(input.IdempotencyToken != null && { IdempotencyToken: input.IdempotencyToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Recurrence != null && { Recurrence: se_RecurrenceSettings(input.Recurrence, context) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - ...(input.TimeZoneId != null && { TimeZoneId: input.TimeZoneId }), - }; + return take(input, { + ContactIds: _json, + IdempotencyToken: [], + Name: [], + Recurrence: _json, + StartTime: (_) => Math.round(_.getTime() / 1000), + Tags: _json, + TimeZoneId: [], + }); }; -/** - * serializeAws_json1_1DailySettings - */ -const se_DailySettings = (input: HandOffTime[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HandOffTime(entry, context); - }); -}; +// se_DailySettings omitted. -/** - * serializeAws_json1_1DeactivateContactChannelRequest - */ -const se_DeactivateContactChannelRequest = (input: DeactivateContactChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - }; -}; +// se_DeactivateContactChannelRequest omitted. -/** - * serializeAws_json1_1DeleteContactChannelRequest - */ -const se_DeleteContactChannelRequest = (input: DeleteContactChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - }; -}; +// se_DeleteContactChannelRequest omitted. -/** - * serializeAws_json1_1DeleteContactRequest - */ -const se_DeleteContactRequest = (input: DeleteContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - }; -}; +// se_DeleteContactRequest omitted. -/** - * serializeAws_json1_1DeleteRotationOverrideRequest - */ -const se_DeleteRotationOverrideRequest = (input: DeleteRotationOverrideRequest, context: __SerdeContext): any => { - return { - ...(input.RotationId != null && { RotationId: input.RotationId }), - ...(input.RotationOverrideId != null && { RotationOverrideId: input.RotationOverrideId }), - }; -}; +// se_DeleteRotationOverrideRequest omitted. -/** - * serializeAws_json1_1DeleteRotationRequest - */ -const se_DeleteRotationRequest = (input: DeleteRotationRequest, context: __SerdeContext): any => { - return { - ...(input.RotationId != null && { RotationId: input.RotationId }), - }; -}; +// se_DeleteRotationRequest omitted. -/** - * serializeAws_json1_1DescribeEngagementRequest - */ -const se_DescribeEngagementRequest = (input: DescribeEngagementRequest, context: __SerdeContext): any => { - return { - ...(input.EngagementId != null && { EngagementId: input.EngagementId }), - }; -}; +// se_DescribeEngagementRequest omitted. -/** - * serializeAws_json1_1DescribePageRequest - */ -const se_DescribePageRequest = (input: DescribePageRequest, context: __SerdeContext): any => { - return { - ...(input.PageId != null && { PageId: input.PageId }), - }; -}; +// se_DescribePageRequest omitted. -/** - * serializeAws_json1_1GetContactChannelRequest - */ -const se_GetContactChannelRequest = (input: GetContactChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - }; -}; +// se_GetContactChannelRequest omitted. -/** - * serializeAws_json1_1GetContactPolicyRequest - */ -const se_GetContactPolicyRequest = (input: GetContactPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - }; -}; +// se_GetContactPolicyRequest omitted. -/** - * serializeAws_json1_1GetContactRequest - */ -const se_GetContactRequest = (input: GetContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - }; -}; +// se_GetContactRequest omitted. -/** - * serializeAws_json1_1GetRotationOverrideRequest - */ -const se_GetRotationOverrideRequest = (input: GetRotationOverrideRequest, context: __SerdeContext): any => { - return { - ...(input.RotationId != null && { RotationId: input.RotationId }), - ...(input.RotationOverrideId != null && { RotationOverrideId: input.RotationOverrideId }), - }; -}; +// se_GetRotationOverrideRequest omitted. -/** - * serializeAws_json1_1GetRotationRequest - */ -const se_GetRotationRequest = (input: GetRotationRequest, context: __SerdeContext): any => { - return { - ...(input.RotationId != null && { RotationId: input.RotationId }), - }; -}; +// se_GetRotationRequest omitted. -/** - * serializeAws_json1_1HandOffTime - */ -const se_HandOffTime = (input: HandOffTime, context: __SerdeContext): any => { - return { - ...(input.HourOfDay != null && { HourOfDay: input.HourOfDay }), - ...(input.MinuteOfHour != null && { MinuteOfHour: input.MinuteOfHour }), - }; -}; +// se_HandOffTime omitted. -/** - * serializeAws_json1_1ListContactChannelsRequest - */ -const se_ListContactChannelsRequest = (input: ListContactChannelsRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListContactChannelsRequest omitted. -/** - * serializeAws_json1_1ListContactsRequest - */ -const se_ListContactsRequest = (input: ListContactsRequest, context: __SerdeContext): any => { - return { - ...(input.AliasPrefix != null && { AliasPrefix: input.AliasPrefix }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ListContactsRequest omitted. /** * serializeAws_json1_1ListEngagementsRequest */ const se_ListEngagementsRequest = (input: ListEngagementsRequest, context: __SerdeContext): any => { - return { - ...(input.IncidentId != null && { IncidentId: input.IncidentId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TimeRangeValue != null && { TimeRangeValue: se_TimeRange(input.TimeRangeValue, context) }), - }; + return take(input, { + IncidentId: [], + MaxResults: [], + NextToken: [], + TimeRangeValue: (_) => se_TimeRange(_, context), + }); }; -/** - * serializeAws_json1_1ListPageReceiptsRequest - */ -const se_ListPageReceiptsRequest = (input: ListPageReceiptsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PageId != null && { PageId: input.PageId }), - }; -}; +// se_ListPageReceiptsRequest omitted. -/** - * serializeAws_json1_1ListPageResolutionsRequest - */ -const se_ListPageResolutionsRequest = (input: ListPageResolutionsRequest, context: __SerdeContext): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PageId != null && { PageId: input.PageId }), - }; -}; +// se_ListPageResolutionsRequest omitted. -/** - * serializeAws_json1_1ListPagesByContactRequest - */ -const se_ListPagesByContactRequest = (input: ListPagesByContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPagesByContactRequest omitted. -/** - * serializeAws_json1_1ListPagesByEngagementRequest - */ -const se_ListPagesByEngagementRequest = (input: ListPagesByEngagementRequest, context: __SerdeContext): any => { - return { - ...(input.EngagementId != null && { EngagementId: input.EngagementId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListPagesByEngagementRequest omitted. /** * serializeAws_json1_1ListPreviewRotationShiftsRequest */ const se_ListPreviewRotationShiftsRequest = (input: ListPreviewRotationShiftsRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Members != null && { Members: se_RotationPreviewMemberList(input.Members, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Overrides != null && { Overrides: se_OverrideList(input.Overrides, context) }), - ...(input.Recurrence != null && { Recurrence: se_RecurrenceSettings(input.Recurrence, context) }), - ...(input.RotationStartTime != null && { RotationStartTime: Math.round(input.RotationStartTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.TimeZoneId != null && { TimeZoneId: input.TimeZoneId }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + Members: _json, + NextToken: [], + Overrides: (_) => se_OverrideList(_, context), + Recurrence: _json, + RotationStartTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + TimeZoneId: [], + }); }; /** * serializeAws_json1_1ListRotationOverridesRequest */ const se_ListRotationOverridesRequest = (input: ListRotationOverridesRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RotationId != null && { RotationId: input.RotationId }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + RotationId: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_json1_1ListRotationShiftsRequest */ const se_ListRotationShiftsRequest = (input: ListRotationShiftsRequest, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RotationId != null && { RotationId: input.RotationId }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + MaxResults: [], + NextToken: [], + RotationId: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1ListRotationsRequest - */ -const se_ListRotationsRequest = (input: ListRotationsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.RotationNamePrefix != null && { RotationNamePrefix: input.RotationNamePrefix }), - }; -}; +// se_ListRotationsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1MonthlySetting - */ -const se_MonthlySetting = (input: MonthlySetting, context: __SerdeContext): any => { - return { - ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }), - ...(input.HandOffTime != null && { HandOffTime: se_HandOffTime(input.HandOffTime, context) }), - }; -}; +// se_MonthlySetting omitted. -/** - * serializeAws_json1_1MonthlySettings - */ -const se_MonthlySettings = (input: MonthlySetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MonthlySetting(entry, context); - }); -}; +// se_MonthlySettings omitted. /** * serializeAws_json1_1OverrideList @@ -3639,645 +3314,206 @@ const se_OverrideList = (input: PreviewOverride[], context: __SerdeContext): any }); }; -/** - * serializeAws_json1_1Plan - */ -const se_Plan = (input: Plan, context: __SerdeContext): any => { - return { - ...(input.RotationIds != null && { RotationIds: se_SsmContactsArnList(input.RotationIds, context) }), - ...(input.Stages != null && { Stages: se_StagesList(input.Stages, context) }), - }; -}; +// se_Plan omitted. /** * serializeAws_json1_1PreviewOverride */ const se_PreviewOverride = (input: PreviewOverride, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.NewMembers != null && { NewMembers: se_RotationOverridePreviewMemberList(input.NewMembers, context) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + NewMembers: _json, + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1PutContactPolicyRequest - */ -const se_PutContactPolicyRequest = (input: PutContactPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ContactArn != null && { ContactArn: input.ContactArn }), - ...(input.Policy != null && { Policy: input.Policy }), - }; -}; +// se_PutContactPolicyRequest omitted. -/** - * serializeAws_json1_1RecurrenceSettings - */ -const se_RecurrenceSettings = (input: RecurrenceSettings, context: __SerdeContext): any => { - return { - ...(input.DailySettings != null && { DailySettings: se_DailySettings(input.DailySettings, context) }), - ...(input.MonthlySettings != null && { MonthlySettings: se_MonthlySettings(input.MonthlySettings, context) }), - ...(input.NumberOfOnCalls != null && { NumberOfOnCalls: input.NumberOfOnCalls }), - ...(input.RecurrenceMultiplier != null && { RecurrenceMultiplier: input.RecurrenceMultiplier }), - ...(input.ShiftCoverages != null && { ShiftCoverages: se_ShiftCoveragesMap(input.ShiftCoverages, context) }), - ...(input.WeeklySettings != null && { WeeklySettings: se_WeeklySettings(input.WeeklySettings, context) }), - }; -}; +// se_RecurrenceSettings omitted. -/** - * serializeAws_json1_1RotationContactsArnList - */ -const se_RotationContactsArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RotationContactsArnList omitted. -/** - * serializeAws_json1_1RotationOverrideContactsArnList - */ -const se_RotationOverrideContactsArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RotationOverrideContactsArnList omitted. -/** - * serializeAws_json1_1RotationOverridePreviewMemberList - */ -const se_RotationOverridePreviewMemberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RotationOverridePreviewMemberList omitted. -/** - * serializeAws_json1_1RotationPreviewMemberList - */ -const se_RotationPreviewMemberList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RotationPreviewMemberList omitted. -/** - * serializeAws_json1_1SendActivationCodeRequest - */ -const se_SendActivationCodeRequest = (input: SendActivationCodeRequest, context: __SerdeContext): any => { - return { - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - }; -}; +// se_SendActivationCodeRequest omitted. -/** - * serializeAws_json1_1ShiftCoveragesMap - */ -const se_ShiftCoveragesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [DayOfWeek | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CoverageTimes(value, context); - return acc; - }, {}); -}; +// se_ShiftCoveragesMap omitted. -/** - * serializeAws_json1_1SsmContactsArnList - */ -const se_SsmContactsArnList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SsmContactsArnList omitted. -/** - * serializeAws_json1_1Stage - */ -const se_Stage = (input: Stage, context: __SerdeContext): any => { - return { - ...(input.DurationInMinutes != null && { DurationInMinutes: input.DurationInMinutes }), - ...(input.Targets != null && { Targets: se_TargetsList(input.Targets, context) }), - }; -}; +// se_Stage omitted. -/** - * serializeAws_json1_1StagesList - */ -const se_StagesList = (input: Stage[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Stage(entry, context); - }); -}; +// se_StagesList omitted. /** * serializeAws_json1_1StartEngagementRequest */ const se_StartEngagementRequest = (input: StartEngagementRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.Content != null && { Content: input.Content }), - IdempotencyToken: input.IdempotencyToken ?? generateIdempotencyToken(), - ...(input.IncidentId != null && { IncidentId: input.IncidentId }), - ...(input.PublicContent != null && { PublicContent: input.PublicContent }), - ...(input.PublicSubject != null && { PublicSubject: input.PublicSubject }), - ...(input.Sender != null && { Sender: input.Sender }), - ...(input.Subject != null && { Subject: input.Subject }), - }; + return take(input, { + ContactId: [], + Content: [], + IdempotencyToken: (_) => _ ?? generateIdempotencyToken(), + IncidentId: [], + PublicContent: [], + PublicSubject: [], + Sender: [], + Subject: [], + }); }; -/** - * serializeAws_json1_1StopEngagementRequest - */ -const se_StopEngagementRequest = (input: StopEngagementRequest, context: __SerdeContext): any => { - return { - ...(input.EngagementId != null && { EngagementId: input.EngagementId }), - ...(input.Reason != null && { Reason: input.Reason }), - }; -}; +// se_StopEngagementRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagsList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1TagsList - */ -const se_TagsList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagsList omitted. -/** - * serializeAws_json1_1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.ChannelTargetInfo != null && { - ChannelTargetInfo: se_ChannelTargetInfo(input.ChannelTargetInfo, context), - }), - ...(input.ContactTargetInfo != null && { - ContactTargetInfo: se_ContactTargetInfo(input.ContactTargetInfo, context), - }), - }; -}; +// se_Target omitted. -/** - * serializeAws_json1_1TargetsList - */ -const se_TargetsList = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; +// se_TargetsList omitted. /** * serializeAws_json1_1TimeRange */ const se_TimeRange = (input: TimeRange, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateContactChannelRequest - */ -const se_UpdateContactChannelRequest = (input: UpdateContactChannelRequest, context: __SerdeContext): any => { - return { - ...(input.ContactChannelId != null && { ContactChannelId: input.ContactChannelId }), - ...(input.DeliveryAddress != null && { DeliveryAddress: se_ContactChannelAddress(input.DeliveryAddress, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_UpdateContactChannelRequest omitted. -/** - * serializeAws_json1_1UpdateContactRequest - */ -const se_UpdateContactRequest = (input: UpdateContactRequest, context: __SerdeContext): any => { - return { - ...(input.ContactId != null && { ContactId: input.ContactId }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Plan != null && { Plan: se_Plan(input.Plan, context) }), - }; -}; +// se_UpdateContactRequest omitted. /** * serializeAws_json1_1UpdateRotationRequest */ const se_UpdateRotationRequest = (input: UpdateRotationRequest, context: __SerdeContext): any => { - return { - ...(input.ContactIds != null && { ContactIds: se_RotationContactsArnList(input.ContactIds, context) }), - ...(input.Recurrence != null && { Recurrence: se_RecurrenceSettings(input.Recurrence, context) }), - ...(input.RotationId != null && { RotationId: input.RotationId }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.TimeZoneId != null && { TimeZoneId: input.TimeZoneId }), - }; + return take(input, { + ContactIds: _json, + Recurrence: _json, + RotationId: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + TimeZoneId: [], + }); }; -/** - * serializeAws_json1_1WeeklySetting - */ -const se_WeeklySetting = (input: WeeklySetting, context: __SerdeContext): any => { - return { - ...(input.DayOfWeek != null && { DayOfWeek: input.DayOfWeek }), - ...(input.HandOffTime != null && { HandOffTime: se_HandOffTime(input.HandOffTime, context) }), - }; -}; +// se_WeeklySetting omitted. -/** - * serializeAws_json1_1WeeklySettings - */ -const se_WeeklySettings = (input: WeeklySetting[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WeeklySetting(entry, context); - }); -}; +// se_WeeklySettings omitted. -/** - * deserializeAws_json1_1AcceptPageResult - */ -const de_AcceptPageResult = (output: any, context: __SerdeContext): AcceptPageResult => { - return {} as any; -}; +// de_AcceptPageResult omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1ActivateContactChannelResult - */ -const de_ActivateContactChannelResult = (output: any, context: __SerdeContext): ActivateContactChannelResult => { - return {} as any; -}; +// de_ActivateContactChannelResult omitted. -/** - * deserializeAws_json1_1ChannelTargetInfo - */ -const de_ChannelTargetInfo = (output: any, context: __SerdeContext): ChannelTargetInfo => { - return { - ContactChannelId: __expectString(output.ContactChannelId), - RetryIntervalInMinutes: __expectInt32(output.RetryIntervalInMinutes), - } as any; -}; +// de_ChannelTargetInfo omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - DependentEntities: - output.DependentEntities != null ? de_DependentEntityList(output.DependentEntities, context) : undefined, - Message: __expectString(output.Message), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1Contact - */ -const de_Contact = (output: any, context: __SerdeContext): Contact => { - return { - Alias: __expectString(output.Alias), - ContactArn: __expectString(output.ContactArn), - DisplayName: __expectString(output.DisplayName), - Type: __expectString(output.Type), - } as any; -}; +// de_Contact omitted. -/** - * deserializeAws_json1_1ContactChannel - */ -const de_ContactChannel = (output: any, context: __SerdeContext): ContactChannel => { - return { - ActivationStatus: __expectString(output.ActivationStatus), - ContactArn: __expectString(output.ContactArn), - ContactChannelArn: __expectString(output.ContactChannelArn), - DeliveryAddress: - output.DeliveryAddress != null ? de_ContactChannelAddress(output.DeliveryAddress, context) : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_ContactChannel omitted. -/** - * deserializeAws_json1_1ContactChannelAddress - */ -const de_ContactChannelAddress = (output: any, context: __SerdeContext): ContactChannelAddress => { - return { - SimpleAddress: __expectString(output.SimpleAddress), - } as any; -}; +// de_ContactChannelAddress omitted. -/** - * deserializeAws_json1_1ContactChannelList - */ -const de_ContactChannelList = (output: any, context: __SerdeContext): ContactChannel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContactChannel(entry, context); - }); - return retVal; -}; +// de_ContactChannelList omitted. -/** - * deserializeAws_json1_1ContactsList - */ -const de_ContactsList = (output: any, context: __SerdeContext): Contact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Contact(entry, context); - }); - return retVal; -}; +// de_ContactsList omitted. -/** - * deserializeAws_json1_1ContactTargetInfo - */ -const de_ContactTargetInfo = (output: any, context: __SerdeContext): ContactTargetInfo => { - return { - ContactId: __expectString(output.ContactId), - IsEssential: __expectBoolean(output.IsEssential), - } as any; -}; +// de_ContactTargetInfo omitted. -/** - * deserializeAws_json1_1CoverageTime - */ -const de_CoverageTime = (output: any, context: __SerdeContext): CoverageTime => { - return { - End: output.End != null ? de_HandOffTime(output.End, context) : undefined, - Start: output.Start != null ? de_HandOffTime(output.Start, context) : undefined, - } as any; -}; +// de_CoverageTime omitted. -/** - * deserializeAws_json1_1CoverageTimes - */ -const de_CoverageTimes = (output: any, context: __SerdeContext): CoverageTime[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CoverageTime(entry, context); - }); - return retVal; -}; +// de_CoverageTimes omitted. -/** - * deserializeAws_json1_1CreateContactChannelResult - */ -const de_CreateContactChannelResult = (output: any, context: __SerdeContext): CreateContactChannelResult => { - return { - ContactChannelArn: __expectString(output.ContactChannelArn), - } as any; -}; +// de_CreateContactChannelResult omitted. -/** - * deserializeAws_json1_1CreateContactResult - */ -const de_CreateContactResult = (output: any, context: __SerdeContext): CreateContactResult => { - return { - ContactArn: __expectString(output.ContactArn), - } as any; -}; +// de_CreateContactResult omitted. -/** - * deserializeAws_json1_1CreateRotationOverrideResult - */ -const de_CreateRotationOverrideResult = (output: any, context: __SerdeContext): CreateRotationOverrideResult => { - return { - RotationOverrideId: __expectString(output.RotationOverrideId), - } as any; -}; +// de_CreateRotationOverrideResult omitted. -/** - * deserializeAws_json1_1CreateRotationResult - */ -const de_CreateRotationResult = (output: any, context: __SerdeContext): CreateRotationResult => { - return { - RotationArn: __expectString(output.RotationArn), - } as any; -}; +// de_CreateRotationResult omitted. -/** - * deserializeAws_json1_1DailySettings - */ -const de_DailySettings = (output: any, context: __SerdeContext): HandOffTime[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HandOffTime(entry, context); - }); - return retVal; -}; +// de_DailySettings omitted. -/** - * deserializeAws_json1_1DataEncryptionException - */ -const de_DataEncryptionException = (output: any, context: __SerdeContext): DataEncryptionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DataEncryptionException omitted. -/** - * deserializeAws_json1_1DeactivateContactChannelResult - */ -const de_DeactivateContactChannelResult = (output: any, context: __SerdeContext): DeactivateContactChannelResult => { - return {} as any; -}; +// de_DeactivateContactChannelResult omitted. -/** - * deserializeAws_json1_1DeleteContactChannelResult - */ -const de_DeleteContactChannelResult = (output: any, context: __SerdeContext): DeleteContactChannelResult => { - return {} as any; -}; +// de_DeleteContactChannelResult omitted. -/** - * deserializeAws_json1_1DeleteContactResult - */ -const de_DeleteContactResult = (output: any, context: __SerdeContext): DeleteContactResult => { - return {} as any; -}; +// de_DeleteContactResult omitted. -/** - * deserializeAws_json1_1DeleteRotationOverrideResult - */ -const de_DeleteRotationOverrideResult = (output: any, context: __SerdeContext): DeleteRotationOverrideResult => { - return {} as any; -}; +// de_DeleteRotationOverrideResult omitted. -/** - * deserializeAws_json1_1DeleteRotationResult - */ -const de_DeleteRotationResult = (output: any, context: __SerdeContext): DeleteRotationResult => { - return {} as any; -}; +// de_DeleteRotationResult omitted. -/** - * deserializeAws_json1_1DependentEntity - */ -const de_DependentEntity = (output: any, context: __SerdeContext): DependentEntity => { - return { - DependentResourceIds: - output.DependentResourceIds != null ? de_SsmContactsArnList(output.DependentResourceIds, context) : undefined, - RelationType: __expectString(output.RelationType), - } as any; -}; +// de_DependentEntity omitted. -/** - * deserializeAws_json1_1DependentEntityList - */ -const de_DependentEntityList = (output: any, context: __SerdeContext): DependentEntity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DependentEntity(entry, context); - }); - return retVal; -}; +// de_DependentEntityList omitted. /** * deserializeAws_json1_1DescribeEngagementResult */ const de_DescribeEngagementResult = (output: any, context: __SerdeContext): DescribeEngagementResult => { - return { - ContactArn: __expectString(output.ContactArn), - Content: __expectString(output.Content), - EngagementArn: __expectString(output.EngagementArn), - IncidentId: __expectString(output.IncidentId), - PublicContent: __expectString(output.PublicContent), - PublicSubject: __expectString(output.PublicSubject), - Sender: __expectString(output.Sender), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - StopTime: - output.StopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StopTime))) : undefined, - Subject: __expectString(output.Subject), - } as any; + return take(output, { + ContactArn: __expectString, + Content: __expectString, + EngagementArn: __expectString, + IncidentId: __expectString, + PublicContent: __expectString, + PublicSubject: __expectString, + Sender: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StopTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Subject: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribePageResult */ const de_DescribePageResult = (output: any, context: __SerdeContext): DescribePageResult => { - return { - ContactArn: __expectString(output.ContactArn), - Content: __expectString(output.Content), - DeliveryTime: - output.DeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeliveryTime))) - : undefined, - EngagementArn: __expectString(output.EngagementArn), - IncidentId: __expectString(output.IncidentId), - PageArn: __expectString(output.PageArn), - PublicContent: __expectString(output.PublicContent), - PublicSubject: __expectString(output.PublicSubject), - ReadTime: - output.ReadTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadTime))) : undefined, - Sender: __expectString(output.Sender), - SentTime: - output.SentTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SentTime))) : undefined, - Subject: __expectString(output.Subject), - } as any; + return take(output, { + ContactArn: __expectString, + Content: __expectString, + DeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EngagementArn: __expectString, + IncidentId: __expectString, + PageArn: __expectString, + PublicContent: __expectString, + PublicSubject: __expectString, + ReadTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Sender: __expectString, + SentTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Subject: __expectString, + }) as any; }; /** * deserializeAws_json1_1Engagement */ const de_Engagement = (output: any, context: __SerdeContext): Engagement => { - return { - ContactArn: __expectString(output.ContactArn), - EngagementArn: __expectString(output.EngagementArn), - IncidentId: __expectString(output.IncidentId), - Sender: __expectString(output.Sender), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - StopTime: - output.StopTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StopTime))) : undefined, - } as any; + return take(output, { + ContactArn: __expectString, + EngagementArn: __expectString, + IncidentId: __expectString, + Sender: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StopTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4287,269 +3523,155 @@ const de_EngagementsList = (output: any, context: __SerdeContext): Engagement[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Engagement(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1GetContactChannelResult - */ -const de_GetContactChannelResult = (output: any, context: __SerdeContext): GetContactChannelResult => { - return { - ActivationStatus: __expectString(output.ActivationStatus), - ContactArn: __expectString(output.ContactArn), - ContactChannelArn: __expectString(output.ContactChannelArn), - DeliveryAddress: - output.DeliveryAddress != null ? de_ContactChannelAddress(output.DeliveryAddress, context) : undefined, - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; +// de_GetContactChannelResult omitted. -/** - * deserializeAws_json1_1GetContactPolicyResult - */ -const de_GetContactPolicyResult = (output: any, context: __SerdeContext): GetContactPolicyResult => { - return { - ContactArn: __expectString(output.ContactArn), - Policy: __expectString(output.Policy), - } as any; -}; +// de_GetContactPolicyResult omitted. -/** - * deserializeAws_json1_1GetContactResult - */ -const de_GetContactResult = (output: any, context: __SerdeContext): GetContactResult => { - return { - Alias: __expectString(output.Alias), - ContactArn: __expectString(output.ContactArn), - DisplayName: __expectString(output.DisplayName), - Plan: output.Plan != null ? de_Plan(output.Plan, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_GetContactResult omitted. /** * deserializeAws_json1_1GetRotationOverrideResult */ const de_GetRotationOverrideResult = (output: any, context: __SerdeContext): GetRotationOverrideResult => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - NewContactIds: output.NewContactIds != null ? de_SsmContactsArnList(output.NewContactIds, context) : undefined, - RotationArn: __expectString(output.RotationArn), - RotationOverrideId: __expectString(output.RotationOverrideId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NewContactIds: _json, + RotationArn: __expectString, + RotationOverrideId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1GetRotationResult */ const de_GetRotationResult = (output: any, context: __SerdeContext): GetRotationResult => { - return { - ContactIds: output.ContactIds != null ? de_RotationContactsArnList(output.ContactIds, context) : undefined, - Name: __expectString(output.Name), - Recurrence: output.Recurrence != null ? de_RecurrenceSettings(output.Recurrence, context) : undefined, - RotationArn: __expectString(output.RotationArn), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TimeZoneId: __expectString(output.TimeZoneId), - } as any; + return take(output, { + ContactIds: _json, + Name: __expectString, + Recurrence: _json, + RotationArn: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TimeZoneId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1HandOffTime - */ -const de_HandOffTime = (output: any, context: __SerdeContext): HandOffTime => { - return { - HourOfDay: __expectInt32(output.HourOfDay), - MinuteOfHour: __expectInt32(output.MinuteOfHour), - } as any; -}; +// de_HandOffTime omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1ListContactChannelsResult - */ -const de_ListContactChannelsResult = (output: any, context: __SerdeContext): ListContactChannelsResult => { - return { - ContactChannels: - output.ContactChannels != null ? de_ContactChannelList(output.ContactChannels, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListContactChannelsResult omitted. -/** - * deserializeAws_json1_1ListContactsResult - */ -const de_ListContactsResult = (output: any, context: __SerdeContext): ListContactsResult => { - return { - Contacts: output.Contacts != null ? de_ContactsList(output.Contacts, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListContactsResult omitted. /** * deserializeAws_json1_1ListEngagementsResult */ const de_ListEngagementsResult = (output: any, context: __SerdeContext): ListEngagementsResult => { - return { - Engagements: output.Engagements != null ? de_EngagementsList(output.Engagements, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Engagements: (_: any) => de_EngagementsList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListPageReceiptsResult */ const de_ListPageReceiptsResult = (output: any, context: __SerdeContext): ListPageReceiptsResult => { - return { - NextToken: __expectString(output.NextToken), - Receipts: output.Receipts != null ? de_ReceiptsList(output.Receipts, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Receipts: (_: any) => de_ReceiptsList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListPageResolutionsResult - */ -const de_ListPageResolutionsResult = (output: any, context: __SerdeContext): ListPageResolutionsResult => { - return { - NextToken: __expectString(output.NextToken), - PageResolutions: output.PageResolutions != null ? de_ResolutionList(output.PageResolutions, context) : undefined, - } as any; -}; +// de_ListPageResolutionsResult omitted. /** * deserializeAws_json1_1ListPagesByContactResult */ const de_ListPagesByContactResult = (output: any, context: __SerdeContext): ListPagesByContactResult => { - return { - NextToken: __expectString(output.NextToken), - Pages: output.Pages != null ? de_PagesList(output.Pages, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Pages: (_: any) => de_PagesList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListPagesByEngagementResult */ const de_ListPagesByEngagementResult = (output: any, context: __SerdeContext): ListPagesByEngagementResult => { - return { - NextToken: __expectString(output.NextToken), - Pages: output.Pages != null ? de_PagesList(output.Pages, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Pages: (_: any) => de_PagesList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListPreviewRotationShiftsResult */ const de_ListPreviewRotationShiftsResult = (output: any, context: __SerdeContext): ListPreviewRotationShiftsResult => { - return { - NextToken: __expectString(output.NextToken), - RotationShifts: output.RotationShifts != null ? de_RotationShifts(output.RotationShifts, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RotationShifts: (_: any) => de_RotationShifts(_, context), + }) as any; }; /** * deserializeAws_json1_1ListRotationOverridesResult */ const de_ListRotationOverridesResult = (output: any, context: __SerdeContext): ListRotationOverridesResult => { - return { - NextToken: __expectString(output.NextToken), - RotationOverrides: - output.RotationOverrides != null ? de_RotationOverrides(output.RotationOverrides, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RotationOverrides: (_: any) => de_RotationOverrides(_, context), + }) as any; }; /** * deserializeAws_json1_1ListRotationShiftsResult */ const de_ListRotationShiftsResult = (output: any, context: __SerdeContext): ListRotationShiftsResult => { - return { - NextToken: __expectString(output.NextToken), - RotationShifts: output.RotationShifts != null ? de_RotationShifts(output.RotationShifts, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + RotationShifts: (_: any) => de_RotationShifts(_, context), + }) as any; }; /** * deserializeAws_json1_1ListRotationsResult */ const de_ListRotationsResult = (output: any, context: __SerdeContext): ListRotationsResult => { - return { - NextToken: __expectString(output.NextToken), - Rotations: output.Rotations != null ? de_Rotations(output.Rotations, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Rotations: (_: any) => de_Rotations(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResult - */ -const de_ListTagsForResourceResult = (output: any, context: __SerdeContext): ListTagsForResourceResult => { - return { - Tags: output.Tags != null ? de_TagsList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResult omitted. -/** - * deserializeAws_json1_1MonthlySetting - */ -const de_MonthlySetting = (output: any, context: __SerdeContext): MonthlySetting => { - return { - DayOfMonth: __expectInt32(output.DayOfMonth), - HandOffTime: output.HandOffTime != null ? de_HandOffTime(output.HandOffTime, context) : undefined, - } as any; -}; +// de_MonthlySetting omitted. -/** - * deserializeAws_json1_1MonthlySettings - */ -const de_MonthlySettings = (output: any, context: __SerdeContext): MonthlySetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MonthlySetting(entry, context); - }); - return retVal; -}; +// de_MonthlySettings omitted. /** * deserializeAws_json1_1Page */ const de_Page = (output: any, context: __SerdeContext): Page => { - return { - ContactArn: __expectString(output.ContactArn), - DeliveryTime: - output.DeliveryTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeliveryTime))) - : undefined, - EngagementArn: __expectString(output.EngagementArn), - IncidentId: __expectString(output.IncidentId), - PageArn: __expectString(output.PageArn), - ReadTime: - output.ReadTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReadTime))) : undefined, - Sender: __expectString(output.Sender), - SentTime: - output.SentTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SentTime))) : undefined, - } as any; + return take(output, { + ContactArn: __expectString, + DeliveryTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EngagementArn: __expectString, + IncidentId: __expectString, + PageArn: __expectString, + ReadTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Sender: __expectString, + SentTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4559,44 +3681,25 @@ const de_PagesList = (output: any, context: __SerdeContext): Page[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Page(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Plan - */ -const de_Plan = (output: any, context: __SerdeContext): Plan => { - return { - RotationIds: output.RotationIds != null ? de_SsmContactsArnList(output.RotationIds, context) : undefined, - Stages: output.Stages != null ? de_StagesList(output.Stages, context) : undefined, - } as any; -}; +// de_Plan omitted. -/** - * deserializeAws_json1_1PutContactPolicyResult - */ -const de_PutContactPolicyResult = (output: any, context: __SerdeContext): PutContactPolicyResult => { - return {} as any; -}; +// de_PutContactPolicyResult omitted. /** * deserializeAws_json1_1Receipt */ const de_Receipt = (output: any, context: __SerdeContext): Receipt => { - return { - ContactChannelArn: __expectString(output.ContactChannelArn), - ReceiptInfo: __expectString(output.ReceiptInfo), - ReceiptTime: - output.ReceiptTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReceiptTime))) - : undefined, - ReceiptType: __expectString(output.ReceiptType), - } as any; + return take(output, { + ContactChannelArn: __expectString, + ReceiptInfo: __expectString, + ReceiptTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReceiptType: __expectString, + }) as any; }; /** @@ -4606,109 +3709,46 @@ const de_ReceiptsList = (output: any, context: __SerdeContext): Receipt[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Receipt(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RecurrenceSettings - */ -const de_RecurrenceSettings = (output: any, context: __SerdeContext): RecurrenceSettings => { - return { - DailySettings: output.DailySettings != null ? de_DailySettings(output.DailySettings, context) : undefined, - MonthlySettings: output.MonthlySettings != null ? de_MonthlySettings(output.MonthlySettings, context) : undefined, - NumberOfOnCalls: __expectInt32(output.NumberOfOnCalls), - RecurrenceMultiplier: __expectInt32(output.RecurrenceMultiplier), - ShiftCoverages: output.ShiftCoverages != null ? de_ShiftCoveragesMap(output.ShiftCoverages, context) : undefined, - WeeklySettings: output.WeeklySettings != null ? de_WeeklySettings(output.WeeklySettings, context) : undefined, - } as any; -}; +// de_RecurrenceSettings omitted. -/** - * deserializeAws_json1_1ResolutionContact - */ -const de_ResolutionContact = (output: any, context: __SerdeContext): ResolutionContact => { - return { - ContactArn: __expectString(output.ContactArn), - StageIndex: __expectInt32(output.StageIndex), - Type: __expectString(output.Type), - } as any; -}; +// de_ResolutionContact omitted. -/** - * deserializeAws_json1_1ResolutionList - */ -const de_ResolutionList = (output: any, context: __SerdeContext): ResolutionContact[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResolutionContact(entry, context); - }); - return retVal; -}; +// de_ResolutionList omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1Rotation */ const de_Rotation = (output: any, context: __SerdeContext): Rotation => { - return { - ContactIds: output.ContactIds != null ? de_SsmContactsArnList(output.ContactIds, context) : undefined, - Name: __expectString(output.Name), - Recurrence: output.Recurrence != null ? de_RecurrenceSettings(output.Recurrence, context) : undefined, - RotationArn: __expectString(output.RotationArn), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TimeZoneId: __expectString(output.TimeZoneId), - } as any; + return take(output, { + ContactIds: _json, + Name: __expectString, + Recurrence: _json, + RotationArn: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TimeZoneId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RotationContactsArnList - */ -const de_RotationContactsArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RotationContactsArnList omitted. /** * deserializeAws_json1_1RotationOverride */ const de_RotationOverride = (output: any, context: __SerdeContext): RotationOverride => { - return { - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - NewContactIds: output.NewContactIds != null ? de_SsmContactsArnList(output.NewContactIds, context) : undefined, - RotationOverrideId: __expectString(output.RotationOverrideId), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NewContactIds: _json, + RotationOverrideId: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4718,9 +3758,6 @@ const de_RotationOverrides = (output: any, context: __SerdeContext): RotationOve const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RotationOverride(entry, context); }); return retVal; @@ -4733,9 +3770,6 @@ const de_Rotations = (output: any, context: __SerdeContext): Rotation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Rotation(entry, context); }); return retVal; @@ -4745,15 +3779,13 @@ const de_Rotations = (output: any, context: __SerdeContext): Rotation[] => { * deserializeAws_json1_1RotationShift */ const de_RotationShift = (output: any, context: __SerdeContext): RotationShift => { - return { - ContactIds: output.ContactIds != null ? de_SsmContactsArnList(output.ContactIds, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ShiftDetails: output.ShiftDetails != null ? de_ShiftDetails(output.ShiftDetails, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + ContactIds: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ShiftDetails: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + }) as any; }; /** @@ -4763,275 +3795,58 @@ const de_RotationShifts = (output: any, context: __SerdeContext): RotationShift[ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RotationShift(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SendActivationCodeResult - */ -const de_SendActivationCodeResult = (output: any, context: __SerdeContext): SendActivationCodeResult => { - return {} as any; -}; +// de_SendActivationCodeResult omitted. -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - QuotaCode: __expectString(output.QuotaCode), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - ServiceCode: __expectString(output.ServiceCode), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_1ShiftCoveragesMap - */ -const de_ShiftCoveragesMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DayOfWeek | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_CoverageTimes(value, context); - return acc; - }, - {} - ); -}; +// de_ShiftCoveragesMap omitted. -/** - * deserializeAws_json1_1ShiftDetails - */ -const de_ShiftDetails = (output: any, context: __SerdeContext): ShiftDetails => { - return { - OverriddenContactIds: - output.OverriddenContactIds != null ? de_SsmContactsArnList(output.OverriddenContactIds, context) : undefined, - } as any; -}; +// de_ShiftDetails omitted. -/** - * deserializeAws_json1_1SsmContactsArnList - */ -const de_SsmContactsArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SsmContactsArnList omitted. -/** - * deserializeAws_json1_1Stage - */ -const de_Stage = (output: any, context: __SerdeContext): Stage => { - return { - DurationInMinutes: __expectInt32(output.DurationInMinutes), - Targets: output.Targets != null ? de_TargetsList(output.Targets, context) : undefined, - } as any; -}; +// de_Stage omitted. -/** - * deserializeAws_json1_1StagesList - */ -const de_StagesList = (output: any, context: __SerdeContext): Stage[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Stage(entry, context); - }); - return retVal; -}; +// de_StagesList omitted. -/** - * deserializeAws_json1_1StartEngagementResult - */ -const de_StartEngagementResult = (output: any, context: __SerdeContext): StartEngagementResult => { - return { - EngagementArn: __expectString(output.EngagementArn), - } as any; -}; +// de_StartEngagementResult omitted. -/** - * deserializeAws_json1_1StopEngagementResult - */ -const de_StopEngagementResult = (output: any, context: __SerdeContext): StopEngagementResult => { - return {} as any; -}; +// de_StopEngagementResult omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagResourceResult - */ -const de_TagResourceResult = (output: any, context: __SerdeContext): TagResourceResult => { - return {} as any; -}; +// de_TagResourceResult omitted. -/** - * deserializeAws_json1_1TagsList - */ -const de_TagsList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagsList omitted. -/** - * deserializeAws_json1_1Target - */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - ChannelTargetInfo: - output.ChannelTargetInfo != null ? de_ChannelTargetInfo(output.ChannelTargetInfo, context) : undefined, - ContactTargetInfo: - output.ContactTargetInfo != null ? de_ContactTargetInfo(output.ContactTargetInfo, context) : undefined, - } as any; -}; +// de_Target omitted. -/** - * deserializeAws_json1_1TargetsList - */ -const de_TargetsList = (output: any, context: __SerdeContext): Target[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Target(entry, context); - }); - return retVal; -}; +// de_TargetsList omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - QuotaCode: __expectString(output.QuotaCode), - RetryAfterSeconds: __expectInt32(output.RetryAfterSeconds), - ServiceCode: __expectString(output.ServiceCode), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UntagResourceResult - */ -const de_UntagResourceResult = (output: any, context: __SerdeContext): UntagResourceResult => { - return {} as any; -}; +// de_UntagResourceResult omitted. -/** - * deserializeAws_json1_1UpdateContactChannelResult - */ -const de_UpdateContactChannelResult = (output: any, context: __SerdeContext): UpdateContactChannelResult => { - return {} as any; -}; +// de_UpdateContactChannelResult omitted. -/** - * deserializeAws_json1_1UpdateContactResult - */ -const de_UpdateContactResult = (output: any, context: __SerdeContext): UpdateContactResult => { - return {} as any; -}; +// de_UpdateContactResult omitted. -/** - * deserializeAws_json1_1UpdateRotationResult - */ -const de_UpdateRotationResult = (output: any, context: __SerdeContext): UpdateRotationResult => { - return {} as any; -}; +// de_UpdateRotationResult omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Fields: output.Fields != null ? de_ValidationExceptionFieldList(output.Fields, context) : undefined, - Message: __expectString(output.Message), - Reason: __expectString(output.Reason), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_json1_1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_json1_1WeeklySetting - */ -const de_WeeklySetting = (output: any, context: __SerdeContext): WeeklySetting => { - return { - DayOfWeek: __expectString(output.DayOfWeek), - HandOffTime: output.HandOffTime != null ? de_HandOffTime(output.HandOffTime, context) : undefined, - } as any; -}; +// de_WeeklySetting omitted. -/** - * deserializeAws_json1_1WeeklySettings - */ -const de_WeeklySettings = (output: any, context: __SerdeContext): WeeklySetting[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WeeklySetting(entry, context); - }); - return retVal; -}; +// de_WeeklySettings omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -5053,6 +3868,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-ssm-incidents/src/protocols/Aws_restJson1.ts b/clients/client-ssm-incidents/src/protocols/Aws_restJson1.ts index 505153783bf7..8c5205e247b8 100644 --- a/clients/client-ssm-incidents/src/protocols/Aws_restJson1.ts +++ b/clients/client-ssm-incidents/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,10 +11,11 @@ import { expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -98,7 +100,6 @@ import { Action, AddRegionAction, AttributeValueList, - AutomationExecution, ChatChannel, Condition, ConflictException, @@ -109,7 +110,6 @@ import { EventSummary, Filter, IncidentRecord, - IncidentRecordSource, IncidentRecordSummary, IncidentTemplate, Integration, @@ -126,8 +126,6 @@ import { RelatedItemsUpdate, ReplicationSet, ResourceNotFoundException, - ResourcePolicy, - ResponsePlanSummary, ServiceQuotaExceededException, SsmAutomation, ThrottlingException, @@ -151,11 +149,13 @@ export const se_CreateReplicationSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createReplicationSet"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.regions != null && { regions: se_RegionMapInput(input.regions, context) }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + regions: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -180,17 +180,19 @@ export const se_CreateResponsePlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createResponsePlan"; let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_ActionsList(input.actions, context) }), - ...(input.chatChannel != null && { chatChannel: se_ChatChannel(input.chatChannel, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.engagements != null && { engagements: se_EngagementSet(input.engagements, context) }), - ...(input.incidentTemplate != null && { incidentTemplate: se_IncidentTemplate(input.incidentTemplate, context) }), - ...(input.integrations != null && { integrations: se_Integrations(input.integrations, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => _json(_), + chatChannel: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + displayName: [], + engagements: (_) => _json(_), + incidentTemplate: (_) => _json(_), + integrations: (_) => _json(_), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -215,14 +217,16 @@ export const se_CreateTimelineEventCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createTimelineEvent"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.eventData != null && { eventData: input.eventData }), - ...(input.eventReferences != null && { eventReferences: se_EventReferenceList(input.eventReferences, context) }), - ...(input.eventTime != null && { eventTime: Math.round(input.eventTime.getTime() / 1000) }), - ...(input.eventType != null && { eventType: input.eventType }), - ...(input.incidentRecordArn != null && { incidentRecordArn: input.incidentRecordArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + eventData: [], + eventReferences: (_) => _json(_), + eventTime: (_) => Math.round(_.getTime() / 1000), + eventType: [], + incidentRecordArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -247,9 +251,11 @@ export const se_DeleteIncidentRecordCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteIncidentRecord"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -300,10 +306,12 @@ export const se_DeleteResourcePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteResourcePolicy"; let body: any; - body = JSON.stringify({ - ...(input.policyId != null && { policyId: input.policyId }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }); + body = JSON.stringify( + take(input, { + policyId: [], + resourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,9 +336,11 @@ export const se_DeleteResponsePlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteResponsePlan"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - }); + body = JSON.stringify( + take(input, { + arn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -355,10 +365,12 @@ export const se_DeleteTimelineEventCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteTimelineEvent"; let body: any; - body = JSON.stringify({ - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.incidentRecordArn != null && { incidentRecordArn: input.incidentRecordArn }), - }); + body = JSON.stringify( + take(input, { + eventId: [], + incidentRecordArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -438,10 +450,12 @@ export const se_GetResourcePoliciesCommand = async ( resourceArn: [, __expectNonNull(input.resourceArn!, `resourceArn`)], }); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -520,11 +534,13 @@ export const se_ListIncidentRecordsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listIncidentRecords"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => se_FilterList(_, context), + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -549,11 +565,13 @@ export const se_ListRelatedItemsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listRelatedItems"; let body: any; - body = JSON.stringify({ - ...(input.incidentRecordArn != null && { incidentRecordArn: input.incidentRecordArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + incidentRecordArn: [], + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -578,10 +596,12 @@ export const se_ListReplicationSetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listReplicationSets"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -606,10 +626,12 @@ export const se_ListResponsePlansCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listResponsePlans"; let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -657,14 +679,16 @@ export const se_ListTimelineEventsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listTimelineEvents"; let body: any; - body = JSON.stringify({ - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - ...(input.incidentRecordArn != null && { incidentRecordArn: input.incidentRecordArn }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.sortBy != null && { sortBy: input.sortBy }), - ...(input.sortOrder != null && { sortOrder: input.sortOrder }), - }); + body = JSON.stringify( + take(input, { + filters: (_) => se_FilterList(_, context), + incidentRecordArn: [], + maxResults: [], + nextToken: [], + sortBy: [], + sortOrder: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -689,10 +713,12 @@ export const se_PutResourcePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/putResourcePolicy"; let body: any; - body = JSON.stringify({ - ...(input.policy != null && { policy: input.policy }), - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }); + body = JSON.stringify( + take(input, { + policy: [], + resourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -717,14 +743,16 @@ export const se_StartIncidentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/startIncident"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.impact != null && { impact: input.impact }), - ...(input.relatedItems != null && { relatedItems: se_RelatedItemList(input.relatedItems, context) }), - ...(input.responsePlanArn != null && { responsePlanArn: input.responsePlanArn }), - ...(input.title != null && { title: input.title }), - ...(input.triggerDetails != null && { triggerDetails: se_TriggerDetails(input.triggerDetails, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + impact: [], + relatedItems: (_) => _json(_), + responsePlanArn: [], + title: [], + triggerDetails: (_) => se_TriggerDetails(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -750,9 +778,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -808,11 +838,13 @@ export const se_UpdateDeletionProtectionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDeletionProtection"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.deletionProtected != null && { deletionProtected: input.deletionProtected }), - }); + body = JSON.stringify( + take(input, { + arn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + deletionProtected: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -837,18 +869,18 @@ export const se_UpdateIncidentRecordCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateIncidentRecord"; let body: any; - body = JSON.stringify({ - ...(input.arn != null && { arn: input.arn }), - ...(input.chatChannel != null && { chatChannel: se_ChatChannel(input.chatChannel, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.impact != null && { impact: input.impact }), - ...(input.notificationTargets != null && { - notificationTargets: se_NotificationTargetSet(input.notificationTargets, context), - }), - ...(input.status != null && { status: input.status }), - ...(input.summary != null && { summary: input.summary }), - ...(input.title != null && { title: input.title }), - }); + body = JSON.stringify( + take(input, { + arn: [], + chatChannel: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + impact: [], + notificationTargets: (_) => _json(_), + status: [], + summary: [], + title: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -873,13 +905,13 @@ export const se_UpdateRelatedItemsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateRelatedItems"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.incidentRecordArn != null && { incidentRecordArn: input.incidentRecordArn }), - ...(input.relatedItemsUpdate != null && { - relatedItemsUpdate: se_RelatedItemsUpdate(input.relatedItemsUpdate, context), - }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + incidentRecordArn: [], + relatedItemsUpdate: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -904,11 +936,13 @@ export const se_UpdateReplicationSetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateReplicationSet"; let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_UpdateActionList(input.actions, context) }), - ...(input.arn != null && { arn: input.arn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + actions: (_) => _json(_), + arn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -933,27 +967,23 @@ export const se_UpdateResponsePlanCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateResponsePlan"; let body: any; - body = JSON.stringify({ - ...(input.actions != null && { actions: se_ActionsList(input.actions, context) }), - ...(input.arn != null && { arn: input.arn }), - ...(input.chatChannel != null && { chatChannel: se_ChatChannel(input.chatChannel, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.engagements != null && { engagements: se_EngagementSet(input.engagements, context) }), - ...(input.incidentTemplateDedupeString != null && { - incidentTemplateDedupeString: input.incidentTemplateDedupeString, - }), - ...(input.incidentTemplateImpact != null && { incidentTemplateImpact: input.incidentTemplateImpact }), - ...(input.incidentTemplateNotificationTargets != null && { - incidentTemplateNotificationTargets: se_NotificationTargetSet(input.incidentTemplateNotificationTargets, context), - }), - ...(input.incidentTemplateSummary != null && { incidentTemplateSummary: input.incidentTemplateSummary }), - ...(input.incidentTemplateTags != null && { - incidentTemplateTags: se_TagMapUpdate(input.incidentTemplateTags, context), - }), - ...(input.incidentTemplateTitle != null && { incidentTemplateTitle: input.incidentTemplateTitle }), - ...(input.integrations != null && { integrations: se_Integrations(input.integrations, context) }), - }); + body = JSON.stringify( + take(input, { + actions: (_) => _json(_), + arn: [], + chatChannel: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + displayName: [], + engagements: (_) => _json(_), + incidentTemplateDedupeString: [], + incidentTemplateImpact: [], + incidentTemplateNotificationTargets: (_) => _json(_), + incidentTemplateSummary: [], + incidentTemplateTags: (_) => _json(_), + incidentTemplateTitle: [], + integrations: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -978,15 +1008,17 @@ export const se_UpdateTimelineEventCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateTimelineEvent"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.eventData != null && { eventData: input.eventData }), - ...(input.eventId != null && { eventId: input.eventId }), - ...(input.eventReferences != null && { eventReferences: se_EventReferenceList(input.eventReferences, context) }), - ...(input.eventTime != null && { eventTime: Math.round(input.eventTime.getTime() / 1000) }), - ...(input.eventType != null && { eventType: input.eventType }), - ...(input.incidentRecordArn != null && { incidentRecordArn: input.incidentRecordArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + eventData: [], + eventId: [], + eventReferences: (_) => _json(_), + eventTime: (_) => Math.round(_.getTime() / 1000), + eventType: [], + incidentRecordArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1012,9 +1044,10 @@ export const de_CreateReplicationSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1051,10 +1084,9 @@ const de_CreateReplicationSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1074,9 +1106,10 @@ export const de_CreateResponsePlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } + const doc = take(data, { + arn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1113,10 +1146,9 @@ const de_CreateResponsePlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1136,12 +1168,11 @@ export const de_CreateTimelineEventCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eventId != null) { - contents.eventId = __expectString(data.eventId); - } - if (data.incidentRecordArn != null) { - contents.incidentRecordArn = __expectString(data.incidentRecordArn); - } + const doc = take(data, { + eventId: __expectString, + incidentRecordArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1178,10 +1209,9 @@ const de_CreateTimelineEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1231,10 +1261,9 @@ const de_DeleteIncidentRecordCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1287,10 +1316,9 @@ const de_DeleteReplicationSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1343,10 +1371,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1396,10 +1423,9 @@ const de_DeleteResponsePlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1449,10 +1475,9 @@ const de_DeleteTimelineEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1472,9 +1497,10 @@ export const de_GetIncidentRecordCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.incidentRecord != null) { - contents.incidentRecord = de_IncidentRecord(data.incidentRecord, context); - } + const doc = take(data, { + incidentRecord: (_) => de_IncidentRecord(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1508,10 +1534,9 @@ const de_GetIncidentRecordCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1531,9 +1556,10 @@ export const de_GetReplicationSetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.replicationSet != null) { - contents.replicationSet = de_ReplicationSet(data.replicationSet, context); - } + const doc = take(data, { + replicationSet: (_) => de_ReplicationSet(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1567,10 +1593,9 @@ const de_GetReplicationSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1590,12 +1615,11 @@ export const de_GetResourcePoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.resourcePolicies != null) { - contents.resourcePolicies = de_ResourcePolicyList(data.resourcePolicies, context); - } + const doc = take(data, { + nextToken: __expectString, + resourcePolicies: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1629,10 +1653,9 @@ const de_GetResourcePoliciesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1652,30 +1675,17 @@ export const de_GetResponsePlanCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.actions != null) { - contents.actions = de_ActionsList(data.actions, context); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.chatChannel != null) { - contents.chatChannel = de_ChatChannel(__expectUnion(data.chatChannel), context); - } - if (data.displayName != null) { - contents.displayName = __expectString(data.displayName); - } - if (data.engagements != null) { - contents.engagements = de_EngagementSet(data.engagements, context); - } - if (data.incidentTemplate != null) { - contents.incidentTemplate = de_IncidentTemplate(data.incidentTemplate, context); - } - if (data.integrations != null) { - contents.integrations = de_Integrations(data.integrations, context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + actions: _json, + arn: __expectString, + chatChannel: (_) => _json(__expectUnion(_)), + displayName: __expectString, + engagements: _json, + incidentTemplate: _json, + integrations: _json, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1709,10 +1719,9 @@ const de_GetResponsePlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1732,9 +1741,10 @@ export const de_GetTimelineEventCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.event != null) { - contents.event = de_TimelineEvent(data.event, context); - } + const doc = take(data, { + event: (_) => de_TimelineEvent(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1768,10 +1778,9 @@ const de_GetTimelineEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1791,12 +1800,11 @@ export const de_ListIncidentRecordsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.incidentRecordSummaries != null) { - contents.incidentRecordSummaries = de_IncidentRecordSummaryList(data.incidentRecordSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + incidentRecordSummaries: (_) => de_IncidentRecordSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1827,10 +1835,9 @@ const de_ListIncidentRecordsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1850,12 +1857,11 @@ export const de_ListRelatedItemsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.relatedItems != null) { - contents.relatedItems = de_RelatedItemList(data.relatedItems, context); - } + const doc = take(data, { + nextToken: __expectString, + relatedItems: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1886,10 +1892,9 @@ const de_ListRelatedItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1909,12 +1914,11 @@ export const de_ListReplicationSetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.replicationSetArns != null) { - contents.replicationSetArns = de_ReplicationSetArnList(data.replicationSetArns, context); - } + const doc = take(data, { + nextToken: __expectString, + replicationSetArns: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1945,10 +1949,9 @@ const de_ListReplicationSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1968,12 +1971,11 @@ export const de_ListResponsePlansCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.responsePlanSummaries != null) { - contents.responsePlanSummaries = de_ResponsePlanSummaryList(data.responsePlanSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + responsePlanSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2004,10 +2006,9 @@ const de_ListResponsePlansCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2027,9 +2028,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2063,10 +2065,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2086,12 +2087,11 @@ export const de_ListTimelineEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.eventSummaries != null) { - contents.eventSummaries = de_EventSummaryList(data.eventSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + eventSummaries: (_) => de_EventSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2122,10 +2122,9 @@ const de_ListTimelineEventsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2145,9 +2144,10 @@ export const de_PutResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policyId != null) { - contents.policyId = __expectString(data.policyId); - } + const doc = take(data, { + policyId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2181,10 +2181,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2204,9 +2203,10 @@ export const de_StartIncidentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.incidentRecordArn != null) { - contents.incidentRecordArn = __expectString(data.incidentRecordArn); - } + const doc = take(data, { + incidentRecordArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2243,10 +2243,9 @@ const de_StartIncidentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2305,10 +2304,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2364,10 +2362,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2420,10 +2417,9 @@ const de_UpdateDeletionProtectionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2479,10 +2475,9 @@ const de_UpdateIncidentRecordCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2538,10 +2533,9 @@ const de_UpdateRelatedItemsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2597,10 +2591,9 @@ const de_UpdateReplicationSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2656,10 +2649,9 @@ const de_UpdateResponsePlanCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2715,16 +2707,15 @@ const de_UpdateTimelineEventCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2734,9 +2725,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2750,18 +2742,13 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = __expectString(data.resourceIdentifier); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.retryAfter != null) { - contents.retryAfter = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.retryAfter))); - } + const doc = take(data, { + message: __expectString, + resourceIdentifier: __expectString, + resourceType: __expectString, + retryAfter: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2778,9 +2765,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2797,15 +2785,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = __expectString(data.resourceIdentifier); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceIdentifier: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2822,21 +2807,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceIdentifier != null) { - contents.resourceIdentifier = __expectString(data.resourceIdentifier); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceIdentifier: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2850,15 +2828,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2872,9 +2847,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2882,69 +2858,17 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Action - */ -const se_Action = (input: Action, context: __SerdeContext): any => { - return Action.visit(input, { - ssmAutomation: (value) => ({ ssmAutomation: se_SsmAutomation(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Action omitted. -/** - * serializeAws_restJson1ActionsList - */ -const se_ActionsList = (input: Action[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Action(entry, context); - }); -}; +// se_ActionsList omitted. -/** - * serializeAws_restJson1AddRegionAction - */ -const se_AddRegionAction = (input: AddRegionAction, context: __SerdeContext): any => { - return { - ...(input.regionName != null && { regionName: input.regionName }), - ...(input.sseKmsKeyId != null && { sseKmsKeyId: input.sseKmsKeyId }), - }; -}; +// se_AddRegionAction omitted. -/** - * serializeAws_restJson1AttributeValueList - */ -const se_AttributeValueList = (input: AttributeValueList, context: __SerdeContext): any => { - return AttributeValueList.visit(input, { - integerValues: (value) => ({ integerValues: se_IntegerList(value, context) }), - stringValues: (value) => ({ stringValues: se_StringList(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_AttributeValueList omitted. -/** - * serializeAws_restJson1ChatbotSnsConfigurationSet - */ -const se_ChatbotSnsConfigurationSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ChatbotSnsConfigurationSet omitted. -/** - * serializeAws_restJson1ChatChannel - */ -const se_ChatChannel = (input: ChatChannel, context: __SerdeContext): any => { - return ChatChannel.visit(input, { - chatbotSns: (value) => ({ chatbotSns: se_ChatbotSnsConfigurationSet(value, context) }), - empty: (value) => ({ empty: se_EmptyChatChannel(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ChatChannel omitted. /** * serializeAws_restJson1Condition @@ -2953,91 +2877,33 @@ const se_Condition = (input: Condition, context: __SerdeContext): any => { return Condition.visit(input, { after: (value) => ({ after: Math.round(value.getTime() / 1000) }), before: (value) => ({ before: Math.round(value.getTime() / 1000) }), - equals: (value) => ({ equals: se_AttributeValueList(value, context) }), + equals: (value) => ({ equals: _json(value) }), _: (name, value) => ({ name: value } as any), }); }; -/** - * serializeAws_restJson1DeleteRegionAction - */ -const se_DeleteRegionAction = (input: DeleteRegionAction, context: __SerdeContext): any => { - return { - ...(input.regionName != null && { regionName: input.regionName }), - }; -}; +// se_DeleteRegionAction omitted. -/** - * serializeAws_restJson1DynamicSsmParameters - */ -const se_DynamicSsmParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_DynamicSsmParameterValue(value, context); - return acc; - }, {}); -}; +// se_DynamicSsmParameters omitted. -/** - * serializeAws_restJson1DynamicSsmParameterValue - */ -const se_DynamicSsmParameterValue = (input: DynamicSsmParameterValue, context: __SerdeContext): any => { - return DynamicSsmParameterValue.visit(input, { - variable: (value) => ({ variable: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_DynamicSsmParameterValue omitted. -/** - * serializeAws_restJson1EmptyChatChannel - */ -const se_EmptyChatChannel = (input: EmptyChatChannel, context: __SerdeContext): any => { - return {}; -}; +// se_EmptyChatChannel omitted. -/** - * serializeAws_restJson1EngagementSet - */ -const se_EngagementSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EngagementSet omitted. -/** - * serializeAws_restJson1EventReference - */ -const se_EventReference = (input: EventReference, context: __SerdeContext): any => { - return EventReference.visit(input, { - relatedItemId: (value) => ({ relatedItemId: value }), - resource: (value) => ({ resource: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_EventReference omitted. -/** - * serializeAws_restJson1EventReferenceList - */ -const se_EventReferenceList = (input: EventReference[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_EventReference(entry, context); - }); -}; +// se_EventReferenceList omitted. /** * serializeAws_restJson1Filter */ const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.condition != null && { condition: se_Condition(input.condition, context) }), - ...(input.key != null && { key: input.key }), - }; + return take(input, { + condition: (_) => se_Condition(_, context), + key: [], + }); }; /** @@ -3051,471 +2917,102 @@ const se_FilterList = (input: Filter[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1IncidentTemplate - */ -const se_IncidentTemplate = (input: IncidentTemplate, context: __SerdeContext): any => { - return { - ...(input.dedupeString != null && { dedupeString: input.dedupeString }), - ...(input.impact != null && { impact: input.impact }), - ...(input.incidentTags != null && { incidentTags: se_TagMap(input.incidentTags, context) }), - ...(input.notificationTargets != null && { - notificationTargets: se_NotificationTargetSet(input.notificationTargets, context), - }), - ...(input.summary != null && { summary: input.summary }), - ...(input.title != null && { title: input.title }), - }; -}; +// se_IncidentTemplate omitted. -/** - * serializeAws_restJson1IntegerList - */ -const se_IntegerList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IntegerList omitted. -/** - * serializeAws_restJson1Integration - */ -const se_Integration = (input: Integration, context: __SerdeContext): any => { - return Integration.visit(input, { - pagerDutyConfiguration: (value) => ({ pagerDutyConfiguration: se_PagerDutyConfiguration(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Integration omitted. -/** - * serializeAws_restJson1Integrations - */ -const se_Integrations = (input: Integration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Integration(entry, context); - }); -}; +// se_Integrations omitted. -/** - * serializeAws_restJson1ItemIdentifier - */ -const se_ItemIdentifier = (input: ItemIdentifier, context: __SerdeContext): any => { - return { - ...(input.type != null && { type: input.type }), - ...(input.value != null && { value: se_ItemValue(input.value, context) }), - }; -}; +// se_ItemIdentifier omitted. -/** - * serializeAws_restJson1ItemValue - */ -const se_ItemValue = (input: ItemValue, context: __SerdeContext): any => { - return ItemValue.visit(input, { - arn: (value) => ({ arn: value }), - metricDefinition: (value) => ({ metricDefinition: value }), - pagerDutyIncidentDetail: (value) => ({ pagerDutyIncidentDetail: se_PagerDutyIncidentDetail(value, context) }), - url: (value) => ({ url: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_ItemValue omitted. -/** - * serializeAws_restJson1NotificationTargetItem - */ -const se_NotificationTargetItem = (input: NotificationTargetItem, context: __SerdeContext): any => { - return NotificationTargetItem.visit(input, { - snsTopicArn: (value) => ({ snsTopicArn: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_NotificationTargetItem omitted. -/** - * serializeAws_restJson1NotificationTargetSet - */ -const se_NotificationTargetSet = (input: NotificationTargetItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_NotificationTargetItem(entry, context); - }); -}; +// se_NotificationTargetSet omitted. -/** - * serializeAws_restJson1PagerDutyConfiguration - */ -const se_PagerDutyConfiguration = (input: PagerDutyConfiguration, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.pagerDutyIncidentConfiguration != null && { - pagerDutyIncidentConfiguration: se_PagerDutyIncidentConfiguration(input.pagerDutyIncidentConfiguration, context), - }), - ...(input.secretId != null && { secretId: input.secretId }), - }; -}; +// se_PagerDutyConfiguration omitted. -/** - * serializeAws_restJson1PagerDutyIncidentConfiguration - */ -const se_PagerDutyIncidentConfiguration = (input: PagerDutyIncidentConfiguration, context: __SerdeContext): any => { - return { - ...(input.serviceId != null && { serviceId: input.serviceId }), - }; -}; +// se_PagerDutyIncidentConfiguration omitted. -/** - * serializeAws_restJson1PagerDutyIncidentDetail - */ -const se_PagerDutyIncidentDetail = (input: PagerDutyIncidentDetail, context: __SerdeContext): any => { - return { - ...(input.autoResolve != null && { autoResolve: input.autoResolve }), - ...(input.id != null && { id: input.id }), - ...(input.secretId != null && { secretId: input.secretId }), - }; -}; +// se_PagerDutyIncidentDetail omitted. -/** - * serializeAws_restJson1RegionMapInput - */ -const se_RegionMapInput = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_RegionMapInputValue(value, context); - return acc; - }, {}); -}; +// se_RegionMapInput omitted. -/** - * serializeAws_restJson1RegionMapInputValue - */ -const se_RegionMapInputValue = (input: RegionMapInputValue, context: __SerdeContext): any => { - return { - ...(input.sseKmsKeyId != null && { sseKmsKeyId: input.sseKmsKeyId }), - }; -}; +// se_RegionMapInputValue omitted. -/** - * serializeAws_restJson1RelatedItem - */ -const se_RelatedItem = (input: RelatedItem, context: __SerdeContext): any => { - return { - ...(input.generatedId != null && { generatedId: input.generatedId }), - ...(input.identifier != null && { identifier: se_ItemIdentifier(input.identifier, context) }), - ...(input.title != null && { title: input.title }), - }; -}; +// se_RelatedItem omitted. -/** - * serializeAws_restJson1RelatedItemList - */ -const se_RelatedItemList = (input: RelatedItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RelatedItem(entry, context); - }); -}; +// se_RelatedItemList omitted. -/** - * serializeAws_restJson1RelatedItemsUpdate - */ -const se_RelatedItemsUpdate = (input: RelatedItemsUpdate, context: __SerdeContext): any => { - return RelatedItemsUpdate.visit(input, { - itemToAdd: (value) => ({ itemToAdd: se_RelatedItem(value, context) }), - itemToRemove: (value) => ({ itemToRemove: se_ItemIdentifier(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_RelatedItemsUpdate omitted. -/** - * serializeAws_restJson1SsmAutomation - */ -const se_SsmAutomation = (input: SsmAutomation, context: __SerdeContext): any => { - return { - ...(input.documentName != null && { documentName: input.documentName }), - ...(input.documentVersion != null && { documentVersion: input.documentVersion }), - ...(input.dynamicParameters != null && { - dynamicParameters: se_DynamicSsmParameters(input.dynamicParameters, context), - }), - ...(input.parameters != null && { parameters: se_SsmParameters(input.parameters, context) }), - ...(input.roleArn != null && { roleArn: input.roleArn }), - ...(input.targetAccount != null && { targetAccount: input.targetAccount }), - }; -}; +// se_SsmAutomation omitted. -/** - * serializeAws_restJson1SsmParameters - */ -const se_SsmParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SsmParameterValues(value, context); - return acc; - }, {}); -}; +// se_SsmParameters omitted. -/** - * serializeAws_restJson1SsmParameterValues - */ -const se_SsmParameterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SsmParameterValues omitted. -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1TagMapUpdate - */ -const se_TagMapUpdate = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMapUpdate omitted. /** * serializeAws_restJson1TriggerDetails */ const se_TriggerDetails = (input: TriggerDetails, context: __SerdeContext): any => { - return { - ...(input.rawData != null && { rawData: input.rawData }), - ...(input.source != null && { source: input.source }), - ...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }), - ...(input.triggerArn != null && { triggerArn: input.triggerArn }), - }; + return take(input, { + rawData: [], + source: [], + timestamp: (_) => Math.round(_.getTime() / 1000), + triggerArn: [], + }); }; -/** - * serializeAws_restJson1UpdateActionList - */ -const se_UpdateActionList = (input: UpdateReplicationSetAction[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_UpdateReplicationSetAction(entry, context); - }); -}; +// se_UpdateActionList omitted. -/** - * serializeAws_restJson1UpdateReplicationSetAction - */ -const se_UpdateReplicationSetAction = (input: UpdateReplicationSetAction, context: __SerdeContext): any => { - return UpdateReplicationSetAction.visit(input, { - addRegionAction: (value) => ({ addRegionAction: se_AddRegionAction(value, context) }), - deleteRegionAction: (value) => ({ deleteRegionAction: se_DeleteRegionAction(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_UpdateReplicationSetAction omitted. -/** - * deserializeAws_restJson1Action - */ -const de_Action = (output: any, context: __SerdeContext): Action => { - if (output.ssmAutomation != null) { - return { - ssmAutomation: de_SsmAutomation(output.ssmAutomation, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_Action omitted. -/** - * deserializeAws_restJson1ActionsList - */ -const de_ActionsList = (output: any, context: __SerdeContext): Action[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Action(__expectUnion(entry), context); - }); - return retVal; -}; +// de_ActionsList omitted. -/** - * deserializeAws_restJson1AutomationExecution - */ -const de_AutomationExecution = (output: any, context: __SerdeContext): AutomationExecution => { - if (__expectString(output.ssmExecutionArn) !== undefined) { - return { ssmExecutionArn: __expectString(output.ssmExecutionArn) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AutomationExecution omitted. -/** - * deserializeAws_restJson1AutomationExecutionSet - */ -const de_AutomationExecutionSet = (output: any, context: __SerdeContext): AutomationExecution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutomationExecution(__expectUnion(entry), context); - }); - return retVal; -}; +// de_AutomationExecutionSet omitted. -/** - * deserializeAws_restJson1ChatbotSnsConfigurationSet - */ -const de_ChatbotSnsConfigurationSet = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ChatbotSnsConfigurationSet omitted. -/** - * deserializeAws_restJson1ChatChannel - */ -const de_ChatChannel = (output: any, context: __SerdeContext): ChatChannel => { - if (output.chatbotSns != null) { - return { - chatbotSns: de_ChatbotSnsConfigurationSet(output.chatbotSns, context), - }; - } - if (output.empty != null) { - return { - empty: de_EmptyChatChannel(output.empty, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ChatChannel omitted. -/** - * deserializeAws_restJson1DynamicSsmParameters - */ -const de_DynamicSsmParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_DynamicSsmParameterValue(__expectUnion(value), context); - return acc; - }, {}); -}; +// de_DynamicSsmParameters omitted. -/** - * deserializeAws_restJson1DynamicSsmParameterValue - */ -const de_DynamicSsmParameterValue = (output: any, context: __SerdeContext): DynamicSsmParameterValue => { - if (__expectString(output.variable) !== undefined) { - return { variable: __expectString(output.variable) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_DynamicSsmParameterValue omitted. -/** - * deserializeAws_restJson1EmptyChatChannel - */ -const de_EmptyChatChannel = (output: any, context: __SerdeContext): EmptyChatChannel => { - return {} as any; -}; +// de_EmptyChatChannel omitted. -/** - * deserializeAws_restJson1EngagementSet - */ -const de_EngagementSet = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EngagementSet omitted. -/** - * deserializeAws_restJson1EventReference - */ -const de_EventReference = (output: any, context: __SerdeContext): EventReference => { - if (__expectString(output.relatedItemId) !== undefined) { - return { relatedItemId: __expectString(output.relatedItemId) as any }; - } - if (__expectString(output.resource) !== undefined) { - return { resource: __expectString(output.resource) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_EventReference omitted. -/** - * deserializeAws_restJson1EventReferenceList - */ -const de_EventReferenceList = (output: any, context: __SerdeContext): EventReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EventReference(__expectUnion(entry), context); - }); - return retVal; -}; +// de_EventReferenceList omitted. /** * deserializeAws_restJson1EventSummary */ const de_EventSummary = (output: any, context: __SerdeContext): EventSummary => { - return { - eventId: __expectString(output.eventId), - eventReferences: - output.eventReferences != null ? de_EventReferenceList(output.eventReferences, context) : undefined, - eventTime: - output.eventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventTime))) : undefined, - eventType: __expectString(output.eventType), - eventUpdatedTime: - output.eventUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventUpdatedTime))) - : undefined, - incidentRecordArn: __expectString(output.incidentRecordArn), - } as any; + return take(output, { + eventId: __expectString, + eventReferences: _json, + eventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventType: __expectString, + eventUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + incidentRecordArn: __expectString, + }) as any; }; /** @@ -3525,9 +3022,6 @@ const de_EventSummaryList = (output: any, context: __SerdeContext): EventSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_EventSummary(entry, context); }); return retVal; @@ -3537,68 +3031,39 @@ const de_EventSummaryList = (output: any, context: __SerdeContext): EventSummary * deserializeAws_restJson1IncidentRecord */ const de_IncidentRecord = (output: any, context: __SerdeContext): IncidentRecord => { - return { - arn: __expectString(output.arn), - automationExecutions: - output.automationExecutions != null ? de_AutomationExecutionSet(output.automationExecutions, context) : undefined, - chatChannel: output.chatChannel != null ? de_ChatChannel(__expectUnion(output.chatChannel), context) : undefined, - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - dedupeString: __expectString(output.dedupeString), - impact: __expectInt32(output.impact), - incidentRecordSource: - output.incidentRecordSource != null ? de_IncidentRecordSource(output.incidentRecordSource, context) : undefined, - lastModifiedBy: __expectString(output.lastModifiedBy), - lastModifiedTime: - output.lastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTime))) - : undefined, - notificationTargets: - output.notificationTargets != null ? de_NotificationTargetSet(output.notificationTargets, context) : undefined, - resolvedTime: - output.resolvedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resolvedTime))) - : undefined, - status: __expectString(output.status), - summary: __expectString(output.summary), - title: __expectString(output.title), - } as any; -}; - -/** - * deserializeAws_restJson1IncidentRecordSource - */ -const de_IncidentRecordSource = (output: any, context: __SerdeContext): IncidentRecordSource => { - return { - createdBy: __expectString(output.createdBy), - invokedBy: __expectString(output.invokedBy), - resourceArn: __expectString(output.resourceArn), - source: __expectString(output.source), - } as any; -}; + return take(output, { + arn: __expectString, + automationExecutions: _json, + chatChannel: (_: any) => _json(__expectUnion(_)), + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dedupeString: __expectString, + impact: __expectInt32, + incidentRecordSource: _json, + lastModifiedBy: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notificationTargets: _json, + resolvedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + summary: __expectString, + title: __expectString, + }) as any; +}; + +// de_IncidentRecordSource omitted. /** * deserializeAws_restJson1IncidentRecordSummary */ const de_IncidentRecordSummary = (output: any, context: __SerdeContext): IncidentRecordSummary => { - return { - arn: __expectString(output.arn), - creationTime: - output.creationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime))) - : undefined, - impact: __expectInt32(output.impact), - incidentRecordSource: - output.incidentRecordSource != null ? de_IncidentRecordSource(output.incidentRecordSource, context) : undefined, - resolvedTime: - output.resolvedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.resolvedTime))) - : undefined, - status: __expectString(output.status), - title: __expectString(output.title), - } as any; + return take(output, { + arn: __expectString, + creationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + impact: __expectInt32, + incidentRecordSource: _json, + resolvedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + status: __expectString, + title: __expectString, + }) as any; }; /** @@ -3608,159 +3073,41 @@ const de_IncidentRecordSummaryList = (output: any, context: __SerdeContext): Inc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IncidentRecordSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IncidentTemplate - */ -const de_IncidentTemplate = (output: any, context: __SerdeContext): IncidentTemplate => { - return { - dedupeString: __expectString(output.dedupeString), - impact: __expectInt32(output.impact), - incidentTags: output.incidentTags != null ? de_TagMap(output.incidentTags, context) : undefined, - notificationTargets: - output.notificationTargets != null ? de_NotificationTargetSet(output.notificationTargets, context) : undefined, - summary: __expectString(output.summary), - title: __expectString(output.title), - } as any; -}; +// de_IncidentTemplate omitted. -/** - * deserializeAws_restJson1Integration - */ -const de_Integration = (output: any, context: __SerdeContext): Integration => { - if (output.pagerDutyConfiguration != null) { - return { - pagerDutyConfiguration: de_PagerDutyConfiguration(output.pagerDutyConfiguration, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_Integration omitted. -/** - * deserializeAws_restJson1Integrations - */ -const de_Integrations = (output: any, context: __SerdeContext): Integration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Integration(__expectUnion(entry), context); - }); - return retVal; -}; +// de_Integrations omitted. -/** - * deserializeAws_restJson1ItemIdentifier - */ -const de_ItemIdentifier = (output: any, context: __SerdeContext): ItemIdentifier => { - return { - type: __expectString(output.type), - value: output.value != null ? de_ItemValue(__expectUnion(output.value), context) : undefined, - } as any; -}; +// de_ItemIdentifier omitted. -/** - * deserializeAws_restJson1ItemValue - */ -const de_ItemValue = (output: any, context: __SerdeContext): ItemValue => { - if (__expectString(output.arn) !== undefined) { - return { arn: __expectString(output.arn) as any }; - } - if (__expectString(output.metricDefinition) !== undefined) { - return { metricDefinition: __expectString(output.metricDefinition) as any }; - } - if (output.pagerDutyIncidentDetail != null) { - return { - pagerDutyIncidentDetail: de_PagerDutyIncidentDetail(output.pagerDutyIncidentDetail, context), - }; - } - if (__expectString(output.url) !== undefined) { - return { url: __expectString(output.url) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_ItemValue omitted. -/** - * deserializeAws_restJson1NotificationTargetItem - */ -const de_NotificationTargetItem = (output: any, context: __SerdeContext): NotificationTargetItem => { - if (__expectString(output.snsTopicArn) !== undefined) { - return { snsTopicArn: __expectString(output.snsTopicArn) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_NotificationTargetItem omitted. -/** - * deserializeAws_restJson1NotificationTargetSet - */ -const de_NotificationTargetSet = (output: any, context: __SerdeContext): NotificationTargetItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotificationTargetItem(__expectUnion(entry), context); - }); - return retVal; -}; +// de_NotificationTargetSet omitted. -/** - * deserializeAws_restJson1PagerDutyConfiguration - */ -const de_PagerDutyConfiguration = (output: any, context: __SerdeContext): PagerDutyConfiguration => { - return { - name: __expectString(output.name), - pagerDutyIncidentConfiguration: - output.pagerDutyIncidentConfiguration != null - ? de_PagerDutyIncidentConfiguration(output.pagerDutyIncidentConfiguration, context) - : undefined, - secretId: __expectString(output.secretId), - } as any; -}; +// de_PagerDutyConfiguration omitted. -/** - * deserializeAws_restJson1PagerDutyIncidentConfiguration - */ -const de_PagerDutyIncidentConfiguration = (output: any, context: __SerdeContext): PagerDutyIncidentConfiguration => { - return { - serviceId: __expectString(output.serviceId), - } as any; -}; +// de_PagerDutyIncidentConfiguration omitted. -/** - * deserializeAws_restJson1PagerDutyIncidentDetail - */ -const de_PagerDutyIncidentDetail = (output: any, context: __SerdeContext): PagerDutyIncidentDetail => { - return { - autoResolve: __expectBoolean(output.autoResolve), - id: __expectString(output.id), - secretId: __expectString(output.secretId), - } as any; -}; +// de_PagerDutyIncidentDetail omitted. /** * deserializeAws_restJson1RegionInfo */ const de_RegionInfo = (output: any, context: __SerdeContext): RegionInfo => { - return { - sseKmsKeyId: __expectString(output.sseKmsKeyId), - status: __expectString(output.status), - statusMessage: __expectString(output.statusMessage), - statusUpdateDateTime: - output.statusUpdateDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.statusUpdateDateTime))) - : undefined, - } as any; + return take(output, { + sseKmsKeyId: __expectString, + status: __expectString, + statusMessage: __expectString, + statusUpdateDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3776,195 +3123,57 @@ const de_RegionInfoMap = (output: any, context: __SerdeContext): Record { - return { - generatedId: __expectString(output.generatedId), - identifier: output.identifier != null ? de_ItemIdentifier(output.identifier, context) : undefined, - title: __expectString(output.title), - } as any; -}; +// de_RelatedItem omitted. -/** - * deserializeAws_restJson1RelatedItemList - */ -const de_RelatedItemList = (output: any, context: __SerdeContext): RelatedItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelatedItem(entry, context); - }); - return retVal; -}; +// de_RelatedItemList omitted. /** * deserializeAws_restJson1ReplicationSet */ const de_ReplicationSet = (output: any, context: __SerdeContext): ReplicationSet => { - return { - arn: __expectString(output.arn), - createdBy: __expectString(output.createdBy), - createdTime: - output.createdTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdTime))) - : undefined, - deletionProtected: __expectBoolean(output.deletionProtected), - lastModifiedBy: __expectString(output.lastModifiedBy), - lastModifiedTime: - output.lastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastModifiedTime))) - : undefined, - regionMap: output.regionMap != null ? de_RegionInfoMap(output.regionMap, context) : undefined, - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1ReplicationSetArnList - */ -const de_ReplicationSetArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + arn: __expectString, + createdBy: __expectString, + createdTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deletionProtected: __expectBoolean, + lastModifiedBy: __expectString, + lastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + regionMap: (_: any) => de_RegionInfoMap(_, context), + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ResourcePolicy - */ -const de_ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => { - return { - policyDocument: __expectString(output.policyDocument), - policyId: __expectString(output.policyId), - ramResourceShareRegion: __expectString(output.ramResourceShareRegion), - } as any; -}; +// de_ReplicationSetArnList omitted. -/** - * deserializeAws_restJson1ResourcePolicyList - */ -const de_ResourcePolicyList = (output: any, context: __SerdeContext): ResourcePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourcePolicy(entry, context); - }); - return retVal; -}; +// de_ResourcePolicy omitted. -/** - * deserializeAws_restJson1ResponsePlanSummary - */ -const de_ResponsePlanSummary = (output: any, context: __SerdeContext): ResponsePlanSummary => { - return { - arn: __expectString(output.arn), - displayName: __expectString(output.displayName), - name: __expectString(output.name), - } as any; -}; +// de_ResourcePolicyList omitted. -/** - * deserializeAws_restJson1ResponsePlanSummaryList - */ -const de_ResponsePlanSummaryList = (output: any, context: __SerdeContext): ResponsePlanSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResponsePlanSummary(entry, context); - }); - return retVal; -}; +// de_ResponsePlanSummary omitted. -/** - * deserializeAws_restJson1SsmAutomation - */ -const de_SsmAutomation = (output: any, context: __SerdeContext): SsmAutomation => { - return { - documentName: __expectString(output.documentName), - documentVersion: __expectString(output.documentVersion), - dynamicParameters: - output.dynamicParameters != null ? de_DynamicSsmParameters(output.dynamicParameters, context) : undefined, - parameters: output.parameters != null ? de_SsmParameters(output.parameters, context) : undefined, - roleArn: __expectString(output.roleArn), - targetAccount: __expectString(output.targetAccount), - } as any; -}; +// de_ResponsePlanSummaryList omitted. -/** - * deserializeAws_restJson1SsmParameters - */ -const de_SsmParameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SsmParameterValues(value, context); - return acc; - }, {}); -}; +// de_SsmAutomation omitted. -/** - * deserializeAws_restJson1SsmParameterValues - */ -const de_SsmParameterValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SsmParameters omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SsmParameterValues omitted. + +// de_TagMap omitted. /** * deserializeAws_restJson1TimelineEvent */ const de_TimelineEvent = (output: any, context: __SerdeContext): TimelineEvent => { - return { - eventData: __expectString(output.eventData), - eventId: __expectString(output.eventId), - eventReferences: - output.eventReferences != null ? de_EventReferenceList(output.eventReferences, context) : undefined, - eventTime: - output.eventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventTime))) : undefined, - eventType: __expectString(output.eventType), - eventUpdatedTime: - output.eventUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventUpdatedTime))) - : undefined, - incidentRecordArn: __expectString(output.incidentRecordArn), - } as any; + return take(output, { + eventData: __expectString, + eventId: __expectString, + eventReferences: _json, + eventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventType: __expectString, + eventUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + incidentRecordArn: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-ssm-sap/src/protocols/Aws_restJson1.ts b/clients/client-ssm-sap/src/protocols/Aws_restJson1.ts index e5601918ac0c..726d0c6312a8 100644 --- a/clients/client-ssm-sap/src/protocols/Aws_restJson1.ts +++ b/clients/client-ssm-sap/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -60,14 +62,10 @@ import { import { Application, ApplicationCredential, - ApplicationSummary, Component, - ComponentSummary, ConflictException, Database, - DatabaseSummary, Filter, - Host, InternalServerException, Operation, ResourceNotFoundException, @@ -89,11 +87,13 @@ export const se_DeleteResourcePermissionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-resource-permission"; let body: any; - body = JSON.stringify({ - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.SourceResourceArn != null && { SourceResourceArn: input.SourceResourceArn }), - }); + body = JSON.stringify( + take(input, { + ActionType: [], + ResourceArn: [], + SourceResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -119,9 +119,11 @@ export const se_DeregisterApplicationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deregister-application"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -146,11 +148,13 @@ export const se_GetApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-application"; let body: any; - body = JSON.stringify({ - ...(input.AppRegistryArn != null && { AppRegistryArn: input.AppRegistryArn }), - ...(input.ApplicationArn != null && { ApplicationArn: input.ApplicationArn }), - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - }); + body = JSON.stringify( + take(input, { + AppRegistryArn: [], + ApplicationArn: [], + ApplicationId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -175,10 +179,12 @@ export const se_GetComponentCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-component"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.ComponentId != null && { ComponentId: input.ComponentId }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + ComponentId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -203,12 +209,14 @@ export const se_GetDatabaseCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-database"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.ComponentId != null && { ComponentId: input.ComponentId }), - ...(input.DatabaseArn != null && { DatabaseArn: input.DatabaseArn }), - ...(input.DatabaseId != null && { DatabaseId: input.DatabaseId }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + ComponentId: [], + DatabaseArn: [], + DatabaseId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -233,9 +241,11 @@ export const se_GetOperationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-operation"; let body: any; - body = JSON.stringify({ - ...(input.OperationId != null && { OperationId: input.OperationId }), - }); + body = JSON.stringify( + take(input, { + OperationId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -261,10 +271,12 @@ export const se_GetResourcePermissionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-resource-permission"; let body: any; - body = JSON.stringify({ - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + ActionType: [], + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -289,10 +301,12 @@ export const se_ListApplicationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-applications"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -317,11 +331,13 @@ export const se_ListComponentsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-components"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -346,12 +362,14 @@ export const se_ListDatabasesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-databases"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.ComponentId != null && { ComponentId: input.ComponentId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + ComponentId: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -376,12 +394,14 @@ export const se_ListOperationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-operations"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.Filters != null && { Filters: se_FilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + Filters: (_) => _json(_), + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -430,11 +450,13 @@ export const se_PutResourcePermissionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/put-resource-permission"; let body: any; - body = JSON.stringify({ - ...(input.ActionType != null && { ActionType: input.ActionType }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.SourceResourceArn != null && { SourceResourceArn: input.SourceResourceArn }), - }); + body = JSON.stringify( + take(input, { + ActionType: [], + ResourceArn: [], + SourceResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -459,15 +481,17 @@ export const se_RegisterApplicationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/register-application"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.ApplicationType != null && { ApplicationType: input.ApplicationType }), - ...(input.Credentials != null && { Credentials: se_ApplicationCredentialList(input.Credentials, context) }), - ...(input.Instances != null && { Instances: se_InstanceList(input.Instances, context) }), - ...(input.SapInstanceNumber != null && { SapInstanceNumber: input.SapInstanceNumber }), - ...(input.Sid != null && { Sid: input.Sid }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + ApplicationType: [], + Credentials: (_) => _json(_), + Instances: (_) => _json(_), + SapInstanceNumber: [], + Sid: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -493,9 +517,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -551,15 +577,13 @@ export const se_UpdateApplicationSettingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-application-settings"; let body: any; - body = JSON.stringify({ - ...(input.ApplicationId != null && { ApplicationId: input.ApplicationId }), - ...(input.CredentialsToAddOrUpdate != null && { - CredentialsToAddOrUpdate: se_ApplicationCredentialList(input.CredentialsToAddOrUpdate, context), - }), - ...(input.CredentialsToRemove != null && { - CredentialsToRemove: se_ApplicationCredentialList(input.CredentialsToRemove, context), - }), - }); + body = JSON.stringify( + take(input, { + ApplicationId: [], + CredentialsToAddOrUpdate: (_) => _json(_), + CredentialsToRemove: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -585,9 +609,10 @@ export const de_DeleteResourcePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -615,10 +640,9 @@ const de_DeleteResourcePermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -662,10 +686,9 @@ const de_DeregisterApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -685,12 +708,11 @@ export const de_GetApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Application != null) { - contents.Application = de_Application(data.Application, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Application: (_) => de_Application(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -715,10 +737,9 @@ const de_GetApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -738,9 +759,10 @@ export const de_GetComponentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Component != null) { - contents.Component = de_Component(data.Component, context); - } + const doc = take(data, { + Component: (_) => de_Component(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -765,10 +787,9 @@ const de_GetComponentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -788,12 +809,11 @@ export const de_GetDatabaseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Database != null) { - contents.Database = de_Database(data.Database, context); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Database: (_) => de_Database(_, context), + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -818,10 +838,9 @@ const de_GetDatabaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -841,9 +860,10 @@ export const de_GetOperationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Operation != null) { - contents.Operation = de_Operation(data.Operation, context); - } + const doc = take(data, { + Operation: (_) => de_Operation(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -868,10 +888,9 @@ const de_GetOperationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -891,9 +910,10 @@ export const de_GetResourcePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -921,10 +941,9 @@ const de_GetResourcePermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -944,12 +963,11 @@ export const de_ListApplicationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Applications != null) { - contents.Applications = de_ApplicationSummaryList(data.Applications, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Applications: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -977,10 +995,9 @@ const de_ListApplicationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1000,12 +1017,11 @@ export const de_ListComponentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Components != null) { - contents.Components = de_ComponentSummaryList(data.Components, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Components: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1033,10 +1049,9 @@ const de_ListComponentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1056,12 +1071,11 @@ export const de_ListDatabasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Databases != null) { - contents.Databases = de_DatabaseSummaryList(data.Databases, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Databases: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1089,10 +1103,9 @@ const de_ListDatabasesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1112,12 +1125,11 @@ export const de_ListOperationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Operations != null) { - contents.Operations = de_OperationList(data.Operations, context); - } + const doc = take(data, { + NextToken: __expectString, + Operations: (_) => de_OperationList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1142,10 +1154,9 @@ const de_ListOperationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1165,9 +1176,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1195,10 +1207,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1218,9 +1229,10 @@ export const de_PutResourcePermissionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Policy != null) { - contents.Policy = __expectString(data.Policy); - } + const doc = take(data, { + Policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1248,10 +1260,9 @@ const de_PutResourcePermissionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1271,12 +1282,11 @@ export const de_RegisterApplicationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Application != null) { - contents.Application = de_Application(data.Application, context); - } - if (data.OperationId != null) { - contents.OperationId = __expectString(data.OperationId); - } + const doc = take(data, { + Application: (_) => de_Application(_, context), + OperationId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1304,10 +1314,9 @@ const de_RegisterApplicationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1354,10 +1363,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1404,10 +1412,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1427,12 +1434,11 @@ export const de_UpdateApplicationSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.OperationIds != null) { - contents.OperationIds = de_OperationIdList(data.OperationIds, context); - } + const doc = take(data, { + Message: __expectString, + OperationIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1460,25 +1466,25 @@ const de_UpdateApplicationSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConflictExceptionRes */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1495,9 +1501,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1514,9 +1521,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1530,9 +1538,10 @@ const de_ResourceNotFoundExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1540,338 +1549,113 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ApplicationCredential - */ -const se_ApplicationCredential = (input: ApplicationCredential, context: __SerdeContext): any => { - return { - ...(input.CredentialType != null && { CredentialType: input.CredentialType }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.SecretId != null && { SecretId: input.SecretId }), - }; -}; +// se_ApplicationCredential omitted. -/** - * serializeAws_restJson1ApplicationCredentialList - */ -const se_ApplicationCredentialList = (input: ApplicationCredential[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ApplicationCredential(entry, context); - }); -}; +// se_ApplicationCredentialList omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1InstanceList - */ -const se_InstanceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InstanceList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * deserializeAws_restJson1Application */ const de_Application = (output: any, context: __SerdeContext): Application => { - return { - AppRegistryArn: __expectString(output.AppRegistryArn), - Arn: __expectString(output.Arn), - Components: output.Components != null ? de_ComponentIdList(output.Components, context) : undefined, - Id: __expectString(output.Id), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Type: __expectString(output.Type), - } as any; + return take(output, { + AppRegistryArn: __expectString, + Arn: __expectString, + Components: _json, + Id: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ApplicationCredential - */ -const de_ApplicationCredential = (output: any, context: __SerdeContext): ApplicationCredential => { - return { - CredentialType: __expectString(output.CredentialType), - DatabaseName: __expectString(output.DatabaseName), - SecretId: __expectString(output.SecretId), - } as any; -}; +// de_ApplicationCredential omitted. -/** - * deserializeAws_restJson1ApplicationCredentialList - */ -const de_ApplicationCredentialList = (output: any, context: __SerdeContext): ApplicationCredential[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationCredential(entry, context); - }); - return retVal; -}; +// de_ApplicationCredentialList omitted. -/** - * deserializeAws_restJson1ApplicationSummary - */ -const de_ApplicationSummary = (output: any, context: __SerdeContext): ApplicationSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_ApplicationSummary omitted. -/** - * deserializeAws_restJson1ApplicationSummaryList - */ -const de_ApplicationSummaryList = (output: any, context: __SerdeContext): ApplicationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ApplicationSummary(entry, context); - }); - return retVal; -}; +// de_ApplicationSummaryList omitted. /** * deserializeAws_restJson1Component */ const de_Component = (output: any, context: __SerdeContext): Component => { - return { - ApplicationId: __expectString(output.ApplicationId), - ComponentId: __expectString(output.ComponentId), - ComponentType: __expectString(output.ComponentType), - Databases: output.Databases != null ? de_DatabaseIdList(output.Databases, context) : undefined, - Hosts: output.Hosts != null ? de_HostList(output.Hosts, context) : undefined, - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - PrimaryHost: __expectString(output.PrimaryHost), - Status: __expectString(output.Status), - } as any; + return take(output, { + ApplicationId: __expectString, + ComponentId: __expectString, + ComponentType: __expectString, + Databases: _json, + Hosts: _json, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PrimaryHost: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ComponentIdList - */ -const de_ComponentIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ComponentIdList omitted. -/** - * deserializeAws_restJson1ComponentSummary - */ -const de_ComponentSummary = (output: any, context: __SerdeContext): ComponentSummary => { - return { - ApplicationId: __expectString(output.ApplicationId), - ComponentId: __expectString(output.ComponentId), - ComponentType: __expectString(output.ComponentType), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_ComponentSummary omitted. -/** - * deserializeAws_restJson1ComponentSummaryList - */ -const de_ComponentSummaryList = (output: any, context: __SerdeContext): ComponentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComponentSummary(entry, context); - }); - return retVal; -}; +// de_ComponentSummaryList omitted. /** * deserializeAws_restJson1Database */ const de_Database = (output: any, context: __SerdeContext): Database => { - return { - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - ComponentId: __expectString(output.ComponentId), - Credentials: output.Credentials != null ? de_ApplicationCredentialList(output.Credentials, context) : undefined, - DatabaseId: __expectString(output.DatabaseId), - DatabaseName: __expectString(output.DatabaseName), - DatabaseType: __expectString(output.DatabaseType), - LastUpdated: - output.LastUpdated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdated))) - : undefined, - PrimaryHost: __expectString(output.PrimaryHost), - SQLPort: __expectInt32(output.SQLPort), - Status: __expectString(output.Status), - } as any; + return take(output, { + ApplicationId: __expectString, + Arn: __expectString, + ComponentId: __expectString, + Credentials: _json, + DatabaseId: __expectString, + DatabaseName: __expectString, + DatabaseType: __expectString, + LastUpdated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PrimaryHost: __expectString, + SQLPort: __expectInt32, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DatabaseIdList - */ -const de_DatabaseIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DatabaseIdList omitted. -/** - * deserializeAws_restJson1DatabaseSummary - */ -const de_DatabaseSummary = (output: any, context: __SerdeContext): DatabaseSummary => { - return { - ApplicationId: __expectString(output.ApplicationId), - Arn: __expectString(output.Arn), - ComponentId: __expectString(output.ComponentId), - DatabaseId: __expectString(output.DatabaseId), - DatabaseType: __expectString(output.DatabaseType), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; +// de_DatabaseSummary omitted. -/** - * deserializeAws_restJson1DatabaseSummaryList - */ -const de_DatabaseSummaryList = (output: any, context: __SerdeContext): DatabaseSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DatabaseSummary(entry, context); - }); - return retVal; -}; +// de_DatabaseSummaryList omitted. -/** - * deserializeAws_restJson1Host - */ -const de_Host = (output: any, context: __SerdeContext): Host => { - return { - HostIp: __expectString(output.HostIp), - HostName: __expectString(output.HostName), - HostRole: __expectString(output.HostRole), - InstanceId: __expectString(output.InstanceId), - } as any; -}; +// de_Host omitted. -/** - * deserializeAws_restJson1HostList - */ -const de_HostList = (output: any, context: __SerdeContext): Host[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Host(entry, context); - }); - return retVal; -}; +// de_HostList omitted. /** * deserializeAws_restJson1Operation */ const de_Operation = (output: any, context: __SerdeContext): Operation => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Id: __expectString(output.Id), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Properties: output.Properties != null ? de_OperationProperties(output.Properties, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - Type: __expectString(output.Type), - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Properties: (_: any) => de_OperationProperties(_, context), + ResourceArn: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusMessage: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1OperationIdList - */ -const de_OperationIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_OperationIdList omitted. /** * deserializeAws_restJson1OperationList @@ -1880,9 +1664,6 @@ const de_OperationList = (output: any, context: __SerdeContext): Operation[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Operation(entry, context); }); return retVal; @@ -1902,18 +1683,7 @@ const de_OperationProperties = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-ssm/src/protocols/Aws_json1_1.ts b/clients/client-ssm/src/protocols/Aws_json1_1.ts index 38bc8a46127d..d5d42c8f3525 100644 --- a/clients/client-ssm/src/protocols/Aws_json1_1.ts +++ b/clients/client-ssm/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -434,17 +436,13 @@ import { UpdateServiceSettingCommandOutput, } from "../commands/UpdateServiceSettingCommand"; import { - AccountSharingInfo, Activation, AddTagsToResourceRequest, - AddTagsToResourceResult, Alarm, AlarmConfiguration, - AlarmStateInformation, AlreadyExistsException, AssociatedInstances, AssociateOpsItemRelatedItemRequest, - AssociateOpsItemRelatedItemResponse, AssociationAlreadyExists, AssociationDescription, AssociationDoesNotExist, @@ -454,19 +452,14 @@ import { AssociationExecutionTarget, AssociationExecutionTargetsFilter, AssociationLimitExceeded, - AssociationOverview, AssociationStatus, - AttachmentInformation, AttachmentsSource, AutomationExecutionFilter, AutomationExecutionMetadata, AutomationExecutionNotFoundException, CancelCommandRequest, - CancelCommandResult, CancelMaintenanceWindowExecutionRequest, - CancelMaintenanceWindowExecutionResult, CreateActivationRequest, - CreateActivationResult, CreateAssociationBatchRequest, CreateAssociationBatchRequestEntry, CreateAssociationBatchResult, @@ -475,45 +468,25 @@ import { CreateDocumentRequest, CreateDocumentResult, CreateMaintenanceWindowRequest, - CreateMaintenanceWindowResult, CreateOpsItemRequest, - CreateOpsItemResponse, CreateOpsMetadataRequest, - CreateOpsMetadataResult, CreatePatchBaselineRequest, - CreatePatchBaselineResult, CreateResourceDataSyncRequest, - CreateResourceDataSyncResult, DeleteActivationRequest, - DeleteActivationResult, DeleteAssociationRequest, - DeleteAssociationResult, DeleteDocumentRequest, - DeleteDocumentResult, DeleteInventoryRequest, - DeleteInventoryResult, DeleteMaintenanceWindowRequest, - DeleteMaintenanceWindowResult, DeleteOpsMetadataRequest, - DeleteOpsMetadataResult, DeleteParameterRequest, - DeleteParameterResult, DeleteParametersRequest, - DeleteParametersResult, DeletePatchBaselineRequest, - DeletePatchBaselineResult, DeleteResourceDataSyncRequest, - DeleteResourceDataSyncResult, DeleteResourcePolicyRequest, - DeleteResourcePolicyResponse, DeregisterManagedInstanceRequest, - DeregisterManagedInstanceResult, DeregisterPatchBaselineForPatchGroupRequest, - DeregisterPatchBaselineForPatchGroupResult, DeregisterTargetFromMaintenanceWindowRequest, - DeregisterTargetFromMaintenanceWindowResult, DeregisterTaskFromMaintenanceWindowRequest, - DeregisterTaskFromMaintenanceWindowResult, DescribeActivationsFilter, DescribeActivationsRequest, DescribeActivationsResult, @@ -530,11 +503,9 @@ import { DescribeAvailablePatchesRequest, DescribeAvailablePatchesResult, DescribeDocumentPermissionRequest, - DescribeDocumentPermissionResponse, DescribeDocumentRequest, DescribeDocumentResult, DescribeEffectiveInstanceAssociationsRequest, - DescribeEffectiveInstanceAssociationsResult, DescribeEffectivePatchesForPatchBaselineRequest, DescribeEffectivePatchesForPatchBaselineResult, DescribeInstanceAssociationsStatusRequest, @@ -556,30 +527,19 @@ import { DescribeMaintenanceWindowExecutionTasksRequest, DescribeMaintenanceWindowExecutionTasksResult, DescribeMaintenanceWindowScheduleRequest, - DescribeMaintenanceWindowScheduleResult, DescribeMaintenanceWindowsForTargetRequest, - DescribeMaintenanceWindowsForTargetResult, DescribeMaintenanceWindowsRequest, - DescribeMaintenanceWindowsResult, DescribeMaintenanceWindowTargetsRequest, - DescribeMaintenanceWindowTargetsResult, DescribeMaintenanceWindowTasksRequest, - DescribeMaintenanceWindowTasksResult, DocumentAlreadyExists, DocumentDescription, DocumentLimitExceeded, - DocumentParameter, DocumentRequires, DoesNotExistException, DuplicateInstanceId, EffectivePatch, - FailedCreateAssociation, - FailureDetails, IdempotentParameterMismatch, - InstanceAggregatedAssociationOverview, - InstanceAssociation, InstanceAssociationOutputLocation, - InstanceAssociationOutputUrl, InstanceAssociationStatusInfo, InstanceInformation, InstanceInformationFilter, @@ -617,17 +577,11 @@ import { InvalidTargetMaps, InvalidTypeNameException, InventoryDeletionStatusItem, - InventoryDeletionSummary, - InventoryDeletionSummaryItem, LoggingInfo, MaintenanceWindowExecution, MaintenanceWindowExecutionTaskIdentity, MaintenanceWindowExecutionTaskInvocationIdentity, MaintenanceWindowFilter, - MaintenanceWindowIdentity, - MaintenanceWindowIdentityForTarget, - MaintenanceWindowTarget, - MaintenanceWindowTask, MaintenanceWindowTaskParameterValueExpression, MaxDocumentSizeExceeded, MetadataValue, @@ -644,7 +598,6 @@ import { OpsMetadataLimitExceededException, OpsMetadataNotFoundException, OpsMetadataTooManyUpdatesException, - OutputSource, ParameterNotFound, Patch, PatchComplianceData, @@ -655,10 +608,8 @@ import { PatchRuleGroup, PatchSource, PatchStatus, - PlatformType, RegistrationMetadataItem, RelatedOpsItem, - ResolvedTargets, ResourceDataSyncAlreadyExistsException, ResourceDataSyncAwsOrganizationsSource, ResourceDataSyncCountExceededException, @@ -675,8 +626,6 @@ import { ReviewInformation, Runbook, S3OutputLocation, - S3OutputUrl, - ScheduledWindowExecution, StepExecution, StepExecutionFilter, Tag, @@ -693,7 +642,6 @@ import { AssociationFilter, AssociationVersionInfo, AssociationVersionLimitExceeded, - AttachmentContent, AutomationDefinitionNotApprovedException, AutomationDefinitionNotFoundException, AutomationDefinitionVersionNotFoundException, @@ -710,26 +658,19 @@ import { ComplianceItem, ComplianceItemEntry, ComplianceStringFilter, - ComplianceSummaryItem, ComplianceTypeCountLimitExceededException, - CompliantSummary, CustomSchemaCountLimitExceededException, DescribeOpsItemsRequest, DescribeOpsItemsResponse, DescribeParametersRequest, DescribeParametersResult, DescribePatchBaselinesRequest, - DescribePatchBaselinesResult, DescribePatchGroupsRequest, - DescribePatchGroupsResult, DescribePatchGroupStateRequest, - DescribePatchGroupStateResult, DescribePatchPropertiesRequest, - DescribePatchPropertiesResult, DescribeSessionsRequest, DescribeSessionsResponse, DisassociateOpsItemRelatedItemRequest, - DisassociateOpsItemRelatedItemResponse, DocumentFilter, DocumentIdentifier, DocumentKeyValuesFilter, @@ -742,20 +683,13 @@ import { GetAutomationExecutionRequest, GetAutomationExecutionResult, GetCalendarStateRequest, - GetCalendarStateResponse, GetCommandInvocationRequest, - GetCommandInvocationResult, GetConnectionStatusRequest, - GetConnectionStatusResponse, GetDefaultPatchBaselineRequest, - GetDefaultPatchBaselineResult, GetDeployablePatchSnapshotForInstanceRequest, - GetDeployablePatchSnapshotForInstanceResult, GetDocumentRequest, GetDocumentResult, - GetInventoryResult, GetInventorySchemaRequest, - GetInventorySchemaResult, GetMaintenanceWindowExecutionRequest, GetMaintenanceWindowExecutionResult, GetMaintenanceWindowExecutionTaskInvocationRequest, @@ -769,8 +703,6 @@ import { GetOpsItemRequest, GetOpsItemResponse, GetOpsMetadataRequest, - GetOpsMetadataResult, - GetOpsSummaryResult, GetParameterHistoryRequest, GetParameterHistoryResult, GetParameterRequest, @@ -780,12 +712,9 @@ import { GetParametersRequest, GetParametersResult, GetPatchBaselineForPatchGroupRequest, - GetPatchBaselineForPatchGroupResult, GetPatchBaselineRequest, GetPatchBaselineResult, GetResourcePoliciesRequest, - GetResourcePoliciesResponse, - GetResourcePoliciesResponseEntry, GetServiceSettingRequest, GetServiceSettingResult, HierarchyLevelLimitExceededException, @@ -813,15 +742,10 @@ import { InventoryFilter, InventoryGroup, InventoryItem, - InventoryItemAttribute, - InventoryItemSchema, - InventoryResultEntity, - InventoryResultItem, InvocationDoesNotExist, ItemContentMismatchException, ItemSizeLimitExceededException, LabelParameterVersionRequest, - LabelParameterVersionResult, ListAssociationsRequest, ListAssociationsResult, ListAssociationVersionsRequest, @@ -833,7 +757,6 @@ import { ListComplianceItemsRequest, ListComplianceItemsResult, ListComplianceSummariesRequest, - ListComplianceSummariesResult, ListDocumentMetadataHistoryRequest, ListDocumentMetadataHistoryResponse, ListDocumentsRequest, @@ -841,7 +764,6 @@ import { ListDocumentVersionsRequest, ListDocumentVersionsResult, ListInventoryEntriesRequest, - ListInventoryEntriesResult, ListOpsItemEventsRequest, ListOpsItemEventsResponse, ListOpsItemRelatedItemsRequest, @@ -853,25 +775,19 @@ import { ListResourceDataSyncRequest, ListResourceDataSyncResult, ListTagsForResourceRequest, - ListTagsForResourceResult, MaintenanceWindowAutomationParameters, MaintenanceWindowLambdaParameters, MaintenanceWindowRunCommandParameters, MaintenanceWindowStepFunctionsParameters, MaintenanceWindowTaskInvocationParameters, ModifyDocumentPermissionRequest, - ModifyDocumentPermissionResponse, - NonCompliantSummary, NotificationConfig, NotificationEvent, - OpsEntity, - OpsEntityItem, OpsFilter, OpsItem, OpsItemEventFilter, OpsItemEventSummary, OpsItemFilter, - OpsItemIdentity, OpsItemRelatedItemAssociationNotFoundException, OpsItemRelatedItemsFilter, OpsItemRelatedItemSummary, @@ -882,7 +798,6 @@ import { Parameter, ParameterAlreadyExists, ParameterHistory, - ParameterInlinePolicy, ParameterLimitExceeded, ParameterMaxVersionLimitExceeded, ParameterMetadata, @@ -891,64 +806,40 @@ import { ParameterStringFilter, ParameterVersionLabelLimitExceeded, ParameterVersionNotFound, - PatchBaselineIdentity, - PatchGroupPatchBaselineMapping, PoliciesLimitExceededException, - ProgressCounters, PutComplianceItemsRequest, - PutComplianceItemsResult, PutInventoryRequest, - PutInventoryResult, PutParameterRequest, - PutParameterResult, PutResourcePolicyRequest, - PutResourcePolicyResponse, RegisterDefaultPatchBaselineRequest, - RegisterDefaultPatchBaselineResult, RegisterPatchBaselineForPatchGroupRequest, - RegisterPatchBaselineForPatchGroupResult, RegisterTargetWithMaintenanceWindowRequest, - RegisterTargetWithMaintenanceWindowResult, RegisterTaskWithMaintenanceWindowRequest, - RegisterTaskWithMaintenanceWindowResult, RemoveTagsFromResourceRequest, - RemoveTagsFromResourceResult, ResetServiceSettingRequest, ResetServiceSettingResult, ResourceComplianceSummaryItem, ResourceDataSyncItem, - ResourceDataSyncSourceWithState, ResourcePolicyLimitExceededException, ResultAttribute, ResumeSessionRequest, - ResumeSessionResponse, SendAutomationSignalRequest, - SendAutomationSignalResult, SendCommandRequest, SendCommandResult, ServiceSetting, ServiceSettingNotFound, Session, SessionFilter, - SessionManagerOutputUrl, - SeveritySummary, StartAssociationsOnceRequest, - StartAssociationsOnceResult, StartAutomationExecutionRequest, - StartAutomationExecutionResult, StartChangeRequestExecutionRequest, - StartChangeRequestExecutionResult, StartSessionRequest, - StartSessionResponse, StopAutomationExecutionRequest, - StopAutomationExecutionResult, SubTypeCountLimitExceededException, TargetNotConnected, TerminateSessionRequest, - TerminateSessionResponse, TotalSizeLimitExceededException, UnlabelParameterVersionRequest, - UnlabelParameterVersionResult, UnsupportedCalendarException, UnsupportedFeatureRequiredException, UnsupportedInventoryItemContextException, @@ -956,7 +847,6 @@ import { UnsupportedParameterType, } from "../models/models_1"; import { - DocumentDefaultVersionDescription, DocumentReviews, DocumentVersionLimitExceeded, DuplicateDocumentContent, @@ -974,29 +864,20 @@ import { UpdateAssociationStatusRequest, UpdateAssociationStatusResult, UpdateDocumentDefaultVersionRequest, - UpdateDocumentDefaultVersionResult, UpdateDocumentMetadataRequest, - UpdateDocumentMetadataResponse, UpdateDocumentRequest, UpdateDocumentResult, UpdateMaintenanceWindowRequest, - UpdateMaintenanceWindowResult, UpdateMaintenanceWindowTargetRequest, - UpdateMaintenanceWindowTargetResult, UpdateMaintenanceWindowTaskRequest, UpdateMaintenanceWindowTaskResult, UpdateManagedInstanceRoleRequest, - UpdateManagedInstanceRoleResult, UpdateOpsItemRequest, - UpdateOpsItemResponse, UpdateOpsMetadataRequest, - UpdateOpsMetadataResult, UpdatePatchBaselineRequest, UpdatePatchBaselineResult, UpdateResourceDataSyncRequest, - UpdateResourceDataSyncResult, UpdateServiceSettingRequest, - UpdateServiceSettingResult, } from "../models/models_2"; import { SSMServiceException as __BaseException } from "../models/SSMServiceException"; @@ -1009,7 +890,7 @@ export const se_AddTagsToResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToResource"); let body: any; - body = JSON.stringify(se_AddTagsToResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1022,7 +903,7 @@ export const se_AssociateOpsItemRelatedItemCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateOpsItemRelatedItem"); let body: any; - body = JSON.stringify(se_AssociateOpsItemRelatedItemRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1035,7 +916,7 @@ export const se_CancelCommandCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelCommand"); let body: any; - body = JSON.stringify(se_CancelCommandRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1048,7 +929,7 @@ export const se_CancelMaintenanceWindowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelMaintenanceWindowExecution"); let body: any; - body = JSON.stringify(se_CancelMaintenanceWindowExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1074,7 +955,7 @@ export const se_CreateAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAssociation"); let body: any; - body = JSON.stringify(se_CreateAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1087,7 +968,7 @@ export const se_CreateAssociationBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAssociationBatch"); let body: any; - body = JSON.stringify(se_CreateAssociationBatchRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1100,7 +981,7 @@ export const se_CreateDocumentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDocument"); let body: any; - body = JSON.stringify(se_CreateDocumentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1139,7 +1020,7 @@ export const se_CreateOpsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateOpsMetadata"); let body: any; - body = JSON.stringify(se_CreateOpsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1165,7 +1046,7 @@ export const se_CreateResourceDataSyncCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateResourceDataSync"); let body: any; - body = JSON.stringify(se_CreateResourceDataSyncRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1178,7 +1059,7 @@ export const se_DeleteActivationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteActivation"); let body: any; - body = JSON.stringify(se_DeleteActivationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1191,7 +1072,7 @@ export const se_DeleteAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAssociation"); let body: any; - body = JSON.stringify(se_DeleteAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1204,7 +1085,7 @@ export const se_DeleteDocumentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDocument"); let body: any; - body = JSON.stringify(se_DeleteDocumentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1230,7 +1111,7 @@ export const se_DeleteMaintenanceWindowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMaintenanceWindow"); let body: any; - body = JSON.stringify(se_DeleteMaintenanceWindowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1243,7 +1124,7 @@ export const se_DeleteOpsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteOpsMetadata"); let body: any; - body = JSON.stringify(se_DeleteOpsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1256,7 +1137,7 @@ export const se_DeleteParameterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteParameter"); let body: any; - body = JSON.stringify(se_DeleteParameterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1269,7 +1150,7 @@ export const se_DeleteParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteParameters"); let body: any; - body = JSON.stringify(se_DeleteParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1282,7 +1163,7 @@ export const se_DeletePatchBaselineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePatchBaseline"); let body: any; - body = JSON.stringify(se_DeletePatchBaselineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1295,7 +1176,7 @@ export const se_DeleteResourceDataSyncCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourceDataSync"); let body: any; - body = JSON.stringify(se_DeleteResourceDataSyncRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1308,7 +1189,7 @@ export const se_DeleteResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); let body: any; - body = JSON.stringify(se_DeleteResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1321,7 +1202,7 @@ export const se_DeregisterManagedInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterManagedInstance"); let body: any; - body = JSON.stringify(se_DeregisterManagedInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1334,7 +1215,7 @@ export const se_DeregisterPatchBaselineForPatchGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterPatchBaselineForPatchGroup"); let body: any; - body = JSON.stringify(se_DeregisterPatchBaselineForPatchGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1347,7 +1228,7 @@ export const se_DeregisterTargetFromMaintenanceWindowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterTargetFromMaintenanceWindow"); let body: any; - body = JSON.stringify(se_DeregisterTargetFromMaintenanceWindowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1360,7 +1241,7 @@ export const se_DeregisterTaskFromMaintenanceWindowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterTaskFromMaintenanceWindow"); let body: any; - body = JSON.stringify(se_DeregisterTaskFromMaintenanceWindowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1373,7 +1254,7 @@ export const se_DescribeActivationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeActivations"); let body: any; - body = JSON.stringify(se_DescribeActivationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1386,7 +1267,7 @@ export const se_DescribeAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAssociation"); let body: any; - body = JSON.stringify(se_DescribeAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1399,7 +1280,7 @@ export const se_DescribeAssociationExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAssociationExecutions"); let body: any; - body = JSON.stringify(se_DescribeAssociationExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1412,7 +1293,7 @@ export const se_DescribeAssociationExecutionTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAssociationExecutionTargets"); let body: any; - body = JSON.stringify(se_DescribeAssociationExecutionTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1425,7 +1306,7 @@ export const se_DescribeAutomationExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAutomationExecutions"); let body: any; - body = JSON.stringify(se_DescribeAutomationExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1438,7 +1319,7 @@ export const se_DescribeAutomationStepExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAutomationStepExecutions"); let body: any; - body = JSON.stringify(se_DescribeAutomationStepExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1451,7 +1332,7 @@ export const se_DescribeAvailablePatchesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAvailablePatches"); let body: any; - body = JSON.stringify(se_DescribeAvailablePatchesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1464,7 +1345,7 @@ export const se_DescribeDocumentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDocument"); let body: any; - body = JSON.stringify(se_DescribeDocumentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1477,7 +1358,7 @@ export const se_DescribeDocumentPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDocumentPermission"); let body: any; - body = JSON.stringify(se_DescribeDocumentPermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1490,7 +1371,7 @@ export const se_DescribeEffectiveInstanceAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEffectiveInstanceAssociations"); let body: any; - body = JSON.stringify(se_DescribeEffectiveInstanceAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1503,7 +1384,7 @@ export const se_DescribeEffectivePatchesForPatchBaselineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEffectivePatchesForPatchBaseline"); let body: any; - body = JSON.stringify(se_DescribeEffectivePatchesForPatchBaselineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1516,7 +1397,7 @@ export const se_DescribeInstanceAssociationsStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstanceAssociationsStatus"); let body: any; - body = JSON.stringify(se_DescribeInstanceAssociationsStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1529,7 +1410,7 @@ export const se_DescribeInstanceInformationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstanceInformation"); let body: any; - body = JSON.stringify(se_DescribeInstanceInformationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1542,7 +1423,7 @@ export const se_DescribeInstancePatchesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstancePatches"); let body: any; - body = JSON.stringify(se_DescribeInstancePatchesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1555,7 +1436,7 @@ export const se_DescribeInstancePatchStatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstancePatchStates"); let body: any; - body = JSON.stringify(se_DescribeInstancePatchStatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1568,7 +1449,7 @@ export const se_DescribeInstancePatchStatesForPatchGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstancePatchStatesForPatchGroup"); let body: any; - body = JSON.stringify(se_DescribeInstancePatchStatesForPatchGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1581,7 +1462,7 @@ export const se_DescribeInventoryDeletionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInventoryDeletions"); let body: any; - body = JSON.stringify(se_DescribeInventoryDeletionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1594,7 +1475,7 @@ export const se_DescribeMaintenanceWindowExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowExecutions"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1607,7 +1488,7 @@ export const se_DescribeMaintenanceWindowExecutionTaskInvocationsCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowExecutionTaskInvocations"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowExecutionTaskInvocationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1620,7 +1501,7 @@ export const se_DescribeMaintenanceWindowExecutionTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowExecutionTasks"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowExecutionTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1633,7 +1514,7 @@ export const se_DescribeMaintenanceWindowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindows"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1646,7 +1527,7 @@ export const se_DescribeMaintenanceWindowScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowSchedule"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowScheduleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1659,7 +1540,7 @@ export const se_DescribeMaintenanceWindowsForTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowsForTarget"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowsForTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1672,7 +1553,7 @@ export const se_DescribeMaintenanceWindowTargetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowTargets"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowTargetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1685,7 +1566,7 @@ export const se_DescribeMaintenanceWindowTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceWindowTasks"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceWindowTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1698,7 +1579,7 @@ export const se_DescribeOpsItemsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOpsItems"); let body: any; - body = JSON.stringify(se_DescribeOpsItemsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1711,7 +1592,7 @@ export const se_DescribeParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeParameters"); let body: any; - body = JSON.stringify(se_DescribeParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1724,7 +1605,7 @@ export const se_DescribePatchBaselinesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePatchBaselines"); let body: any; - body = JSON.stringify(se_DescribePatchBaselinesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1737,7 +1618,7 @@ export const se_DescribePatchGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePatchGroups"); let body: any; - body = JSON.stringify(se_DescribePatchGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1750,7 +1631,7 @@ export const se_DescribePatchGroupStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePatchGroupState"); let body: any; - body = JSON.stringify(se_DescribePatchGroupStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1763,7 +1644,7 @@ export const se_DescribePatchPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePatchProperties"); let body: any; - body = JSON.stringify(se_DescribePatchPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1776,7 +1657,7 @@ export const se_DescribeSessionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSessions"); let body: any; - body = JSON.stringify(se_DescribeSessionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1789,7 +1670,7 @@ export const se_DisassociateOpsItemRelatedItemCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateOpsItemRelatedItem"); let body: any; - body = JSON.stringify(se_DisassociateOpsItemRelatedItemRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1802,7 +1683,7 @@ export const se_GetAutomationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAutomationExecution"); let body: any; - body = JSON.stringify(se_GetAutomationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1815,7 +1696,7 @@ export const se_GetCalendarStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCalendarState"); let body: any; - body = JSON.stringify(se_GetCalendarStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1828,7 +1709,7 @@ export const se_GetCommandInvocationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCommandInvocation"); let body: any; - body = JSON.stringify(se_GetCommandInvocationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1841,7 +1722,7 @@ export const se_GetConnectionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetConnectionStatus"); let body: any; - body = JSON.stringify(se_GetConnectionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1854,7 +1735,7 @@ export const se_GetDefaultPatchBaselineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDefaultPatchBaseline"); let body: any; - body = JSON.stringify(se_GetDefaultPatchBaselineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1867,7 +1748,7 @@ export const se_GetDeployablePatchSnapshotForInstanceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDeployablePatchSnapshotForInstance"); let body: any; - body = JSON.stringify(se_GetDeployablePatchSnapshotForInstanceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1880,7 +1761,7 @@ export const se_GetDocumentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDocument"); let body: any; - body = JSON.stringify(se_GetDocumentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1906,7 +1787,7 @@ export const se_GetInventorySchemaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInventorySchema"); let body: any; - body = JSON.stringify(se_GetInventorySchemaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1919,7 +1800,7 @@ export const se_GetMaintenanceWindowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMaintenanceWindow"); let body: any; - body = JSON.stringify(se_GetMaintenanceWindowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1932,7 +1813,7 @@ export const se_GetMaintenanceWindowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMaintenanceWindowExecution"); let body: any; - body = JSON.stringify(se_GetMaintenanceWindowExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1945,7 +1826,7 @@ export const se_GetMaintenanceWindowExecutionTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMaintenanceWindowExecutionTask"); let body: any; - body = JSON.stringify(se_GetMaintenanceWindowExecutionTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1958,7 +1839,7 @@ export const se_GetMaintenanceWindowExecutionTaskInvocationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMaintenanceWindowExecutionTaskInvocation"); let body: any; - body = JSON.stringify(se_GetMaintenanceWindowExecutionTaskInvocationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1971,7 +1852,7 @@ export const se_GetMaintenanceWindowTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMaintenanceWindowTask"); let body: any; - body = JSON.stringify(se_GetMaintenanceWindowTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1984,7 +1865,7 @@ export const se_GetOpsItemCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOpsItem"); let body: any; - body = JSON.stringify(se_GetOpsItemRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1997,7 +1878,7 @@ export const se_GetOpsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetOpsMetadata"); let body: any; - body = JSON.stringify(se_GetOpsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2023,7 +1904,7 @@ export const se_GetParameterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetParameter"); let body: any; - body = JSON.stringify(se_GetParameterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2036,7 +1917,7 @@ export const se_GetParameterHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetParameterHistory"); let body: any; - body = JSON.stringify(se_GetParameterHistoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2049,7 +1930,7 @@ export const se_GetParametersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetParameters"); let body: any; - body = JSON.stringify(se_GetParametersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2062,7 +1943,7 @@ export const se_GetParametersByPathCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetParametersByPath"); let body: any; - body = JSON.stringify(se_GetParametersByPathRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2075,7 +1956,7 @@ export const se_GetPatchBaselineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPatchBaseline"); let body: any; - body = JSON.stringify(se_GetPatchBaselineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2088,7 +1969,7 @@ export const se_GetPatchBaselineForPatchGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPatchBaselineForPatchGroup"); let body: any; - body = JSON.stringify(se_GetPatchBaselineForPatchGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2101,7 +1982,7 @@ export const se_GetResourcePoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetResourcePolicies"); let body: any; - body = JSON.stringify(se_GetResourcePoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2114,7 +1995,7 @@ export const se_GetServiceSettingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetServiceSetting"); let body: any; - body = JSON.stringify(se_GetServiceSettingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2127,7 +2008,7 @@ export const se_LabelParameterVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("LabelParameterVersion"); let body: any; - body = JSON.stringify(se_LabelParameterVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2140,7 +2021,7 @@ export const se_ListAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssociations"); let body: any; - body = JSON.stringify(se_ListAssociationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2153,7 +2034,7 @@ export const se_ListAssociationVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAssociationVersions"); let body: any; - body = JSON.stringify(se_ListAssociationVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2166,7 +2047,7 @@ export const se_ListCommandInvocationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCommandInvocations"); let body: any; - body = JSON.stringify(se_ListCommandInvocationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2179,7 +2060,7 @@ export const se_ListCommandsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCommands"); let body: any; - body = JSON.stringify(se_ListCommandsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2192,7 +2073,7 @@ export const se_ListComplianceItemsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComplianceItems"); let body: any; - body = JSON.stringify(se_ListComplianceItemsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2205,7 +2086,7 @@ export const se_ListComplianceSummariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListComplianceSummaries"); let body: any; - body = JSON.stringify(se_ListComplianceSummariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2218,7 +2099,7 @@ export const se_ListDocumentMetadataHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDocumentMetadataHistory"); let body: any; - body = JSON.stringify(se_ListDocumentMetadataHistoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2231,7 +2112,7 @@ export const se_ListDocumentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDocuments"); let body: any; - body = JSON.stringify(se_ListDocumentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2244,7 +2125,7 @@ export const se_ListDocumentVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDocumentVersions"); let body: any; - body = JSON.stringify(se_ListDocumentVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2257,7 +2138,7 @@ export const se_ListInventoryEntriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInventoryEntries"); let body: any; - body = JSON.stringify(se_ListInventoryEntriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2270,7 +2151,7 @@ export const se_ListOpsItemEventsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOpsItemEvents"); let body: any; - body = JSON.stringify(se_ListOpsItemEventsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2283,7 +2164,7 @@ export const se_ListOpsItemRelatedItemsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOpsItemRelatedItems"); let body: any; - body = JSON.stringify(se_ListOpsItemRelatedItemsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2296,7 +2177,7 @@ export const se_ListOpsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOpsMetadata"); let body: any; - body = JSON.stringify(se_ListOpsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2309,7 +2190,7 @@ export const se_ListResourceComplianceSummariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceComplianceSummaries"); let body: any; - body = JSON.stringify(se_ListResourceComplianceSummariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2322,7 +2203,7 @@ export const se_ListResourceDataSyncCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceDataSync"); let body: any; - body = JSON.stringify(se_ListResourceDataSyncRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2335,7 +2216,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2348,7 +2229,7 @@ export const se_ModifyDocumentPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyDocumentPermission"); let body: any; - body = JSON.stringify(se_ModifyDocumentPermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2374,7 +2255,7 @@ export const se_PutInventoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutInventory"); let body: any; - body = JSON.stringify(se_PutInventoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2387,7 +2268,7 @@ export const se_PutParameterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutParameter"); let body: any; - body = JSON.stringify(se_PutParameterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2400,7 +2281,7 @@ export const se_PutResourcePolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); let body: any; - body = JSON.stringify(se_PutResourcePolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2413,7 +2294,7 @@ export const se_RegisterDefaultPatchBaselineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterDefaultPatchBaseline"); let body: any; - body = JSON.stringify(se_RegisterDefaultPatchBaselineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2426,7 +2307,7 @@ export const se_RegisterPatchBaselineForPatchGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterPatchBaselineForPatchGroup"); let body: any; - body = JSON.stringify(se_RegisterPatchBaselineForPatchGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2465,7 +2346,7 @@ export const se_RemoveTagsFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromResource"); let body: any; - body = JSON.stringify(se_RemoveTagsFromResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2478,7 +2359,7 @@ export const se_ResetServiceSettingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetServiceSetting"); let body: any; - body = JSON.stringify(se_ResetServiceSettingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2491,7 +2372,7 @@ export const se_ResumeSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResumeSession"); let body: any; - body = JSON.stringify(se_ResumeSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2504,7 +2385,7 @@ export const se_SendAutomationSignalCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendAutomationSignal"); let body: any; - body = JSON.stringify(se_SendAutomationSignalRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2517,7 +2398,7 @@ export const se_SendCommandCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendCommand"); let body: any; - body = JSON.stringify(se_SendCommandRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2530,7 +2411,7 @@ export const se_StartAssociationsOnceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartAssociationsOnce"); let body: any; - body = JSON.stringify(se_StartAssociationsOnceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2543,7 +2424,7 @@ export const se_StartAutomationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartAutomationExecution"); let body: any; - body = JSON.stringify(se_StartAutomationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2569,7 +2450,7 @@ export const se_StartSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartSession"); let body: any; - body = JSON.stringify(se_StartSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2582,7 +2463,7 @@ export const se_StopAutomationExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopAutomationExecution"); let body: any; - body = JSON.stringify(se_StopAutomationExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2595,7 +2476,7 @@ export const se_TerminateSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TerminateSession"); let body: any; - body = JSON.stringify(se_TerminateSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2608,7 +2489,7 @@ export const se_UnlabelParameterVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UnlabelParameterVersion"); let body: any; - body = JSON.stringify(se_UnlabelParameterVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2621,7 +2502,7 @@ export const se_UpdateAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAssociation"); let body: any; - body = JSON.stringify(se_UpdateAssociationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2647,7 +2528,7 @@ export const se_UpdateDocumentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDocument"); let body: any; - body = JSON.stringify(se_UpdateDocumentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2660,7 +2541,7 @@ export const se_UpdateDocumentDefaultVersionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDocumentDefaultVersion"); let body: any; - body = JSON.stringify(se_UpdateDocumentDefaultVersionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2673,7 +2554,7 @@ export const se_UpdateDocumentMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDocumentMetadata"); let body: any; - body = JSON.stringify(se_UpdateDocumentMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2686,7 +2567,7 @@ export const se_UpdateMaintenanceWindowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMaintenanceWindow"); let body: any; - body = JSON.stringify(se_UpdateMaintenanceWindowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2699,7 +2580,7 @@ export const se_UpdateMaintenanceWindowTargetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMaintenanceWindowTarget"); let body: any; - body = JSON.stringify(se_UpdateMaintenanceWindowTargetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2725,7 +2606,7 @@ export const se_UpdateManagedInstanceRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateManagedInstanceRole"); let body: any; - body = JSON.stringify(se_UpdateManagedInstanceRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2751,7 +2632,7 @@ export const se_UpdateOpsMetadataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateOpsMetadata"); let body: any; - body = JSON.stringify(se_UpdateOpsMetadataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2764,7 +2645,7 @@ export const se_UpdatePatchBaselineCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePatchBaseline"); let body: any; - body = JSON.stringify(se_UpdatePatchBaselineRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2777,7 +2658,7 @@ export const se_UpdateResourceDataSyncCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResourceDataSync"); let body: any; - body = JSON.stringify(se_UpdateResourceDataSyncRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2790,7 +2671,7 @@ export const se_UpdateServiceSettingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServiceSetting"); let body: any; - body = JSON.stringify(se_UpdateServiceSettingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2806,12 +2687,12 @@ export const de_AddTagsToResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsToResourceResult(data, context); + contents = _json(data); const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2844,10 +2725,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2865,12 +2745,12 @@ export const de_AssociateOpsItemRelatedItemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateOpsItemRelatedItemResponse(data, context); + contents = _json(data); const response: AssociateOpsItemRelatedItemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2903,10 +2783,9 @@ const de_AssociateOpsItemRelatedItemCommandError = async ( throw await de_OpsItemRelatedItemAlreadyExistsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2924,12 +2803,12 @@ export const de_CancelCommandCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelCommandResult(data, context); + contents = _json(data); const response: CancelCommandCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2959,10 +2838,9 @@ const de_CancelCommandCommandError = async ( throw await de_InvalidInstanceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2980,12 +2858,12 @@ export const de_CancelMaintenanceWindowExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelMaintenanceWindowExecutionResult(data, context); + contents = _json(data); const response: CancelMaintenanceWindowExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3009,10 +2887,9 @@ const de_CancelMaintenanceWindowExecutionCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3030,12 +2907,12 @@ export const de_CreateActivationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateActivationResult(data, context); + contents = _json(data); const response: CreateActivationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3059,10 +2936,9 @@ const de_CreateActivationCommandError = async ( throw await de_InvalidParametersRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3085,7 +2961,7 @@ export const de_CreateAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3142,10 +3018,9 @@ const de_CreateAssociationCommandError = async ( throw await de_UnsupportedPlatformTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3168,7 +3043,7 @@ export const de_CreateAssociationBatchCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3222,10 +3097,9 @@ const de_CreateAssociationBatchCommandError = async ( throw await de_UnsupportedPlatformTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3248,7 +3122,7 @@ export const de_CreateDocumentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3284,10 +3158,9 @@ const de_CreateDocumentCommandError = async ( throw await de_MaxDocumentSizeExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3305,12 +3178,12 @@ export const de_CreateMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMaintenanceWindowResult(data, context); + contents = _json(data); const response: CreateMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3337,10 +3210,9 @@ const de_CreateMaintenanceWindowCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3358,12 +3230,12 @@ export const de_CreateOpsItemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateOpsItemResponse(data, context); + contents = _json(data); const response: CreateOpsItemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3396,10 +3268,9 @@ const de_CreateOpsItemCommandError = async ( throw await de_OpsItemLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3417,12 +3288,12 @@ export const de_CreateOpsMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateOpsMetadataResult(data, context); + contents = _json(data); const response: CreateOpsMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3455,10 +3326,9 @@ const de_CreateOpsMetadataCommandError = async ( throw await de_OpsMetadataTooManyUpdatesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3476,12 +3346,12 @@ export const de_CreatePatchBaselineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreatePatchBaselineResult(data, context); + contents = _json(data); const response: CreatePatchBaselineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3508,10 +3378,9 @@ const de_CreatePatchBaselineCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3529,12 +3398,12 @@ export const de_CreateResourceDataSyncCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResourceDataSyncResult(data, context); + contents = _json(data); const response: CreateResourceDataSyncCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3564,10 +3433,9 @@ const de_CreateResourceDataSyncCommandError = async ( throw await de_ResourceDataSyncInvalidConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3585,12 +3453,12 @@ export const de_DeleteActivationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteActivationResult(data, context); + contents = _json(data); const response: DeleteActivationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3620,10 +3488,9 @@ const de_DeleteActivationCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3641,12 +3508,12 @@ export const de_DeleteAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAssociationResult(data, context); + contents = _json(data); const response: DeleteAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3679,10 +3546,9 @@ const de_DeleteAssociationCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3700,12 +3566,12 @@ export const de_DeleteDocumentCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteDocumentResult(data, context); + contents = _json(data); const response: DeleteDocumentCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3735,10 +3601,9 @@ const de_DeleteDocumentCommandError = async ( throw await de_InvalidDocumentOperationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3756,12 +3621,12 @@ export const de_DeleteInventoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteInventoryResult(data, context); + contents = _json(data); const response: DeleteInventoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3794,10 +3659,9 @@ const de_DeleteInventoryCommandError = async ( throw await de_InvalidTypeNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3815,12 +3679,12 @@ export const de_DeleteMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMaintenanceWindowResult(data, context); + contents = _json(data); const response: DeleteMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3841,10 +3705,9 @@ const de_DeleteMaintenanceWindowCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3862,12 +3725,12 @@ export const de_DeleteOpsMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteOpsMetadataResult(data, context); + contents = _json(data); const response: DeleteOpsMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3894,10 +3757,9 @@ const de_DeleteOpsMetadataCommandError = async ( throw await de_OpsMetadataNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3915,12 +3777,12 @@ export const de_DeleteParameterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteParameterResult(data, context); + contents = _json(data); const response: DeleteParameterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3944,10 +3806,9 @@ const de_DeleteParameterCommandError = async ( throw await de_ParameterNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3965,12 +3826,12 @@ export const de_DeleteParametersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteParametersResult(data, context); + contents = _json(data); const response: DeleteParametersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3991,10 +3852,9 @@ const de_DeleteParametersCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4012,12 +3872,12 @@ export const de_DeletePatchBaselineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePatchBaselineResult(data, context); + contents = _json(data); const response: DeletePatchBaselineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4041,10 +3901,9 @@ const de_DeletePatchBaselineCommandError = async ( throw await de_ResourceInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4062,12 +3921,12 @@ export const de_DeleteResourceDataSyncCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourceDataSyncResult(data, context); + contents = _json(data); const response: DeleteResourceDataSyncCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4094,10 +3953,9 @@ const de_DeleteResourceDataSyncCommandError = async ( throw await de_ResourceDataSyncNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4115,12 +3973,12 @@ export const de_DeleteResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourcePolicyResponse(data, context); + contents = _json(data); const response: DeleteResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4147,10 +4005,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ResourcePolicyInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4168,12 +4025,12 @@ export const de_DeregisterManagedInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterManagedInstanceResult(data, context); + contents = _json(data); const response: DeregisterManagedInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4197,10 +4054,9 @@ const de_DeregisterManagedInstanceCommandError = async ( throw await de_InvalidInstanceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4218,12 +4074,12 @@ export const de_DeregisterPatchBaselineForPatchGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterPatchBaselineForPatchGroupResult(data, context); + contents = _json(data); const response: DeregisterPatchBaselineForPatchGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4247,10 +4103,9 @@ const de_DeregisterPatchBaselineForPatchGroupCommandError = async ( throw await de_InvalidResourceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4268,12 +4123,12 @@ export const de_DeregisterTargetFromMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterTargetFromMaintenanceWindowResult(data, context); + contents = _json(data); const response: DeregisterTargetFromMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4300,10 +4155,9 @@ const de_DeregisterTargetFromMaintenanceWindowCommandError = async ( throw await de_TargetInUseExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4321,12 +4175,12 @@ export const de_DeregisterTaskFromMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterTaskFromMaintenanceWindowResult(data, context); + contents = _json(data); const response: DeregisterTaskFromMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4350,10 +4204,9 @@ const de_DeregisterTaskFromMaintenanceWindowCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4376,7 +4229,7 @@ export const de_DescribeActivationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4403,10 +4256,9 @@ const de_DescribeActivationsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4429,7 +4281,7 @@ export const de_DescribeAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4462,10 +4314,9 @@ const de_DescribeAssociationCommandError = async ( throw await de_InvalidInstanceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4488,7 +4339,7 @@ export const de_DescribeAssociationExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4515,10 +4366,9 @@ const de_DescribeAssociationExecutionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4541,7 +4391,7 @@ export const de_DescribeAssociationExecutionTargetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4571,10 +4421,9 @@ const de_DescribeAssociationExecutionTargetsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4597,7 +4446,7 @@ export const de_DescribeAutomationExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4627,10 +4476,9 @@ const de_DescribeAutomationExecutionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4653,7 +4501,7 @@ export const de_DescribeAutomationStepExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4686,10 +4534,9 @@ const de_DescribeAutomationStepExecutionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4712,7 +4559,7 @@ export const de_DescribeAvailablePatchesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4733,10 +4580,9 @@ const de_DescribeAvailablePatchesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4759,7 +4605,7 @@ export const de_DescribeDocumentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4786,10 +4632,9 @@ const de_DescribeDocumentCommandError = async ( throw await de_InvalidDocumentVersionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4807,12 +4652,12 @@ export const de_DescribeDocumentPermissionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDocumentPermissionResponse(data, context); + contents = _json(data); const response: DescribeDocumentPermissionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4845,10 +4690,9 @@ const de_DescribeDocumentPermissionCommandError = async ( throw await de_InvalidPermissionTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4866,12 +4710,12 @@ export const de_DescribeEffectiveInstanceAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEffectiveInstanceAssociationsResult(data, context); + contents = _json(data); const response: DescribeEffectiveInstanceAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4898,10 +4742,9 @@ const de_DescribeEffectiveInstanceAssociationsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4924,7 +4767,7 @@ export const de_DescribeEffectivePatchesForPatchBaselineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4954,10 +4797,9 @@ const de_DescribeEffectivePatchesForPatchBaselineCommandError = async ( throw await de_UnsupportedOperatingSystemRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4980,7 +4822,7 @@ export const de_DescribeInstanceAssociationsStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5007,10 +4849,9 @@ const de_DescribeInstanceAssociationsStatusCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5033,7 +4874,7 @@ export const de_DescribeInstanceInformationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5066,10 +4907,9 @@ const de_DescribeInstanceInformationCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5092,7 +4932,7 @@ export const de_DescribeInstancePatchesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5122,10 +4962,9 @@ const de_DescribeInstancePatchesCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5148,7 +4987,7 @@ export const de_DescribeInstancePatchStatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5172,10 +5011,9 @@ const de_DescribeInstancePatchStatesCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5198,7 +5036,7 @@ export const de_DescribeInstancePatchStatesForPatchGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5225,10 +5063,9 @@ const de_DescribeInstancePatchStatesForPatchGroupCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5251,7 +5088,7 @@ export const de_DescribeInventoryDeletionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5278,10 +5115,9 @@ const de_DescribeInventoryDeletionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5304,7 +5140,7 @@ export const de_DescribeMaintenanceWindowExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5325,10 +5161,9 @@ const de_DescribeMaintenanceWindowExecutionsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5351,7 +5186,7 @@ export const de_DescribeMaintenanceWindowExecutionTaskInvocationsCommand = async $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5375,10 +5210,9 @@ const de_DescribeMaintenanceWindowExecutionTaskInvocationsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5401,7 +5235,7 @@ export const de_DescribeMaintenanceWindowExecutionTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5425,10 +5259,9 @@ const de_DescribeMaintenanceWindowExecutionTasksCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5446,12 +5279,12 @@ export const de_DescribeMaintenanceWindowsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMaintenanceWindowsResult(data, context); + contents = _json(data); const response: DescribeMaintenanceWindowsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5472,10 +5305,9 @@ const de_DescribeMaintenanceWindowsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5493,12 +5325,12 @@ export const de_DescribeMaintenanceWindowScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMaintenanceWindowScheduleResult(data, context); + contents = _json(data); const response: DescribeMaintenanceWindowScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5522,10 +5354,9 @@ const de_DescribeMaintenanceWindowScheduleCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5543,12 +5374,12 @@ export const de_DescribeMaintenanceWindowsForTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMaintenanceWindowsForTargetResult(data, context); + contents = _json(data); const response: DescribeMaintenanceWindowsForTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5569,10 +5400,9 @@ const de_DescribeMaintenanceWindowsForTargetCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5590,12 +5420,12 @@ export const de_DescribeMaintenanceWindowTargetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMaintenanceWindowTargetsResult(data, context); + contents = _json(data); const response: DescribeMaintenanceWindowTargetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5619,10 +5449,9 @@ const de_DescribeMaintenanceWindowTargetsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5640,12 +5469,12 @@ export const de_DescribeMaintenanceWindowTasksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMaintenanceWindowTasksResult(data, context); + contents = _json(data); const response: DescribeMaintenanceWindowTasksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5669,10 +5498,9 @@ const de_DescribeMaintenanceWindowTasksCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5695,7 +5523,7 @@ export const de_DescribeOpsItemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5716,10 +5544,9 @@ const de_DescribeOpsItemsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5742,7 +5569,7 @@ export const de_DescribeParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5775,10 +5602,9 @@ const de_DescribeParametersCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5796,12 +5622,12 @@ export const de_DescribePatchBaselinesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePatchBaselinesResult(data, context); + contents = _json(data); const response: DescribePatchBaselinesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5822,10 +5648,9 @@ const de_DescribePatchBaselinesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5843,12 +5668,12 @@ export const de_DescribePatchGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePatchGroupsResult(data, context); + contents = _json(data); const response: DescribePatchGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5869,10 +5694,9 @@ const de_DescribePatchGroupsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5890,12 +5714,12 @@ export const de_DescribePatchGroupStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePatchGroupStateResult(data, context); + contents = _json(data); const response: DescribePatchGroupStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5919,10 +5743,9 @@ const de_DescribePatchGroupStateCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5940,12 +5763,12 @@ export const de_DescribePatchPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribePatchPropertiesResult(data, context); + contents = _json(data); const response: DescribePatchPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5966,10 +5789,9 @@ const de_DescribePatchPropertiesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5992,7 +5814,7 @@ export const de_DescribeSessionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6019,10 +5841,9 @@ const de_DescribeSessionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6040,12 +5861,12 @@ export const de_DisassociateOpsItemRelatedItemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateOpsItemRelatedItemResponse(data, context); + contents = _json(data); const response: DisassociateOpsItemRelatedItemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6075,10 +5896,9 @@ const de_DisassociateOpsItemRelatedItemCommandError = async ( throw await de_OpsItemRelatedItemAssociationNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6101,7 +5921,7 @@ export const de_GetAutomationExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6125,10 +5945,9 @@ const de_GetAutomationExecutionCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6146,12 +5965,12 @@ export const de_GetCalendarStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCalendarStateResponse(data, context); + contents = _json(data); const response: GetCalendarStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6181,10 +6000,9 @@ const de_GetCalendarStateCommandError = async ( throw await de_UnsupportedCalendarExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6202,12 +6020,12 @@ export const de_GetCommandInvocationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetCommandInvocationResult(data, context); + contents = _json(data); const response: GetCommandInvocationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6240,10 +6058,9 @@ const de_GetCommandInvocationCommandError = async ( throw await de_InvocationDoesNotExistRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6261,12 +6078,12 @@ export const de_GetConnectionStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetConnectionStatusResponse(data, context); + contents = _json(data); const response: GetConnectionStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6287,10 +6104,9 @@ const de_GetConnectionStatusCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6308,12 +6124,12 @@ export const de_GetDefaultPatchBaselineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDefaultPatchBaselineResult(data, context); + contents = _json(data); const response: GetDefaultPatchBaselineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6334,10 +6150,9 @@ const de_GetDefaultPatchBaselineCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6355,12 +6170,12 @@ export const de_GetDeployablePatchSnapshotForInstanceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDeployablePatchSnapshotForInstanceResult(data, context); + contents = _json(data); const response: GetDeployablePatchSnapshotForInstanceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6387,10 +6202,9 @@ const de_GetDeployablePatchSnapshotForInstanceCommandError = async ( throw await de_UnsupportedOperatingSystemRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6413,7 +6227,7 @@ export const de_GetDocumentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6440,10 +6254,9 @@ const de_GetDocumentCommandError = async ( throw await de_InvalidDocumentVersionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6461,12 +6274,12 @@ export const de_GetInventoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInventoryResult(data, context); + contents = _json(data); const response: GetInventoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6505,10 +6318,9 @@ const de_GetInventoryCommandError = async ( throw await de_InvalidTypeNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6526,12 +6338,12 @@ export const de_GetInventorySchemaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInventorySchemaResult(data, context); + contents = _json(data); const response: GetInventorySchemaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6558,10 +6370,9 @@ const de_GetInventorySchemaCommandError = async ( throw await de_InvalidTypeNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6584,7 +6395,7 @@ export const de_GetMaintenanceWindowCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6608,10 +6419,9 @@ const de_GetMaintenanceWindowCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6634,7 +6444,7 @@ export const de_GetMaintenanceWindowExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6658,10 +6468,9 @@ const de_GetMaintenanceWindowExecutionCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6684,7 +6493,7 @@ export const de_GetMaintenanceWindowExecutionTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6708,10 +6517,9 @@ const de_GetMaintenanceWindowExecutionTaskCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6734,7 +6542,7 @@ export const de_GetMaintenanceWindowExecutionTaskInvocationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6758,10 +6566,9 @@ const de_GetMaintenanceWindowExecutionTaskInvocationCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6784,7 +6591,7 @@ export const de_GetMaintenanceWindowTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6808,10 +6615,9 @@ const de_GetMaintenanceWindowTaskCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6834,7 +6640,7 @@ export const de_GetOpsItemCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6861,10 +6667,9 @@ const de_GetOpsItemCommandError = async ( throw await de_OpsItemNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6882,12 +6687,12 @@ export const de_GetOpsMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetOpsMetadataResult(data, context); + contents = _json(data); const response: GetOpsMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6914,10 +6719,9 @@ const de_GetOpsMetadataCommandError = async ( throw await de_OpsMetadataNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6935,12 +6739,12 @@ export const de_GetOpsSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetOpsSummaryResult(data, context); + contents = _json(data); const response: GetOpsSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6976,10 +6780,9 @@ const de_GetOpsSummaryCommandError = async ( throw await de_ResourceDataSyncNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7002,7 +6805,7 @@ export const de_GetParameterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7032,10 +6835,9 @@ const de_GetParameterCommandError = async ( throw await de_ParameterVersionNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7058,7 +6860,7 @@ export const de_GetParameterHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7088,10 +6890,9 @@ const de_GetParameterHistoryCommandError = async ( throw await de_ParameterNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7114,7 +6915,7 @@ export const de_GetParametersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7138,10 +6939,9 @@ const de_GetParametersCommandError = async ( throw await de_InvalidKeyIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7164,7 +6964,7 @@ export const de_GetParametersByPathCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7200,10 +7000,9 @@ const de_GetParametersByPathCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7226,7 +7025,7 @@ export const de_GetPatchBaselineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7253,10 +7052,9 @@ const de_GetPatchBaselineCommandError = async ( throw await de_InvalidResourceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7274,12 +7072,12 @@ export const de_GetPatchBaselineForPatchGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPatchBaselineForPatchGroupResult(data, context); + contents = _json(data); const response: GetPatchBaselineForPatchGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7300,10 +7098,9 @@ const de_GetPatchBaselineForPatchGroupCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7321,12 +7118,12 @@ export const de_GetResourcePoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetResourcePoliciesResponse(data, context); + contents = _json(data); const response: GetResourcePoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7350,10 +7147,9 @@ const de_GetResourcePoliciesCommandError = async ( throw await de_ResourcePolicyInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7376,7 +7172,7 @@ export const de_GetServiceSettingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7400,10 +7196,9 @@ const de_GetServiceSettingCommandError = async ( throw await de_ServiceSettingNotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7421,12 +7216,12 @@ export const de_LabelParameterVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_LabelParameterVersionResult(data, context); + contents = _json(data); const response: LabelParameterVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7459,10 +7254,9 @@ const de_LabelParameterVersionCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7485,7 +7279,7 @@ export const de_ListAssociationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7509,10 +7303,9 @@ const de_ListAssociationsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7535,7 +7328,7 @@ export const de_ListAssociationVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7562,10 +7355,9 @@ const de_ListAssociationVersionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7588,7 +7380,7 @@ export const de_ListCommandInvocationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7621,10 +7413,9 @@ const de_ListCommandInvocationsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7647,7 +7438,7 @@ export const de_ListCommandsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7680,10 +7471,9 @@ const de_ListCommandsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7706,7 +7496,7 @@ export const de_ListComplianceItemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7739,10 +7529,9 @@ const de_ListComplianceItemsCommandError = async ( throw await de_InvalidResourceTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7760,12 +7549,12 @@ export const de_ListComplianceSummariesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListComplianceSummariesResult(data, context); + contents = _json(data); const response: ListComplianceSummariesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7792,10 +7581,9 @@ const de_ListComplianceSummariesCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7818,7 +7606,7 @@ export const de_ListDocumentMetadataHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7848,10 +7636,9 @@ const de_ListDocumentMetadataHistoryCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7874,7 +7661,7 @@ export const de_ListDocumentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7901,10 +7688,9 @@ const de_ListDocumentsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7927,7 +7713,7 @@ export const de_ListDocumentVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -7954,10 +7740,9 @@ const de_ListDocumentVersionsCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -7975,12 +7760,12 @@ export const de_ListInventoryEntriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListInventoryEntriesResult(data, context); + contents = _json(data); const response: ListInventoryEntriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8013,10 +7798,9 @@ const de_ListInventoryEntriesCommandError = async ( throw await de_InvalidTypeNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8039,7 +7823,7 @@ export const de_ListOpsItemEventsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8069,10 +7853,9 @@ const de_ListOpsItemEventsCommandError = async ( throw await de_OpsItemNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8095,7 +7878,7 @@ export const de_ListOpsItemRelatedItemsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8119,10 +7902,9 @@ const de_ListOpsItemRelatedItemsCommandError = async ( throw await de_OpsItemInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8145,7 +7927,7 @@ export const de_ListOpsMetadataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8169,10 +7951,9 @@ const de_ListOpsMetadataCommandError = async ( throw await de_OpsMetadataInvalidArgumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8195,7 +7976,7 @@ export const de_ListResourceComplianceSummariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8222,10 +8003,9 @@ const de_ListResourceComplianceSummariesCommandError = async ( throw await de_InvalidNextTokenRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8248,7 +8028,7 @@ export const de_ListResourceDataSyncCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8275,10 +8055,9 @@ const de_ListResourceDataSyncCommandError = async ( throw await de_ResourceDataSyncInvalidConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8296,12 +8075,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResult(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8328,10 +8107,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InvalidResourceTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8349,12 +8127,12 @@ export const de_ModifyDocumentPermissionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyDocumentPermissionResponse(data, context); + contents = _json(data); const response: ModifyDocumentPermissionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8387,10 +8165,9 @@ const de_ModifyDocumentPermissionCommandError = async ( throw await de_InvalidPermissionTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8408,12 +8185,12 @@ export const de_PutComplianceItemsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutComplianceItemsResult(data, context); + contents = _json(data); const response: PutComplianceItemsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8452,10 +8229,9 @@ const de_PutComplianceItemsCommandError = async ( throw await de_TotalSizeLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8473,12 +8249,12 @@ export const de_PutInventoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutInventoryResult(data, context); + contents = _json(data); const response: PutInventoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8532,10 +8308,9 @@ const de_PutInventoryCommandError = async ( throw await de_UnsupportedInventorySchemaVersionExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8553,12 +8328,12 @@ export const de_PutParameterCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutParameterResult(data, context); + contents = _json(data); const response: PutParameterCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8621,10 +8396,9 @@ const de_PutParameterCommandError = async ( throw await de_UnsupportedParameterTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8642,12 +8416,12 @@ export const de_PutResourcePolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutResourcePolicyResponse(data, context); + contents = _json(data); const response: PutResourcePolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8677,10 +8451,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ResourcePolicyLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8698,12 +8471,12 @@ export const de_RegisterDefaultPatchBaselineCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterDefaultPatchBaselineResult(data, context); + contents = _json(data); const response: RegisterDefaultPatchBaselineCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8730,10 +8503,9 @@ const de_RegisterDefaultPatchBaselineCommandError = async ( throw await de_InvalidResourceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8751,12 +8523,12 @@ export const de_RegisterPatchBaselineForPatchGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterPatchBaselineForPatchGroupResult(data, context); + contents = _json(data); const response: RegisterPatchBaselineForPatchGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8789,10 +8561,9 @@ const de_RegisterPatchBaselineForPatchGroupCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8810,12 +8581,12 @@ export const de_RegisterTargetWithMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterTargetWithMaintenanceWindowResult(data, context); + contents = _json(data); const response: RegisterTargetWithMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8845,10 +8616,9 @@ const de_RegisterTargetWithMaintenanceWindowCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8866,12 +8636,12 @@ export const de_RegisterTaskWithMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterTaskWithMaintenanceWindowResult(data, context); + contents = _json(data); const response: RegisterTaskWithMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8904,10 +8674,9 @@ const de_RegisterTaskWithMaintenanceWindowCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8925,12 +8694,12 @@ export const de_RemoveTagsFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsFromResourceResult(data, context); + contents = _json(data); const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -8960,10 +8729,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -8986,7 +8754,7 @@ export const de_ResetServiceSettingCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9013,10 +8781,9 @@ const de_ResetServiceSettingCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9034,12 +8801,12 @@ export const de_ResumeSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResumeSessionResponse(data, context); + contents = _json(data); const response: ResumeSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9063,10 +8830,9 @@ const de_ResumeSessionCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9084,12 +8850,12 @@ export const de_SendAutomationSignalCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendAutomationSignalResult(data, context); + contents = _json(data); const response: SendAutomationSignalCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9119,10 +8885,9 @@ const de_SendAutomationSignalCommandError = async ( throw await de_InvalidAutomationSignalExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9145,7 +8910,7 @@ export const de_SendCommandCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9196,10 +8961,9 @@ const de_SendCommandCommandError = async ( throw await de_UnsupportedPlatformTypeRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9217,12 +8981,12 @@ export const de_StartAssociationsOnceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartAssociationsOnceResult(data, context); + contents = _json(data); const response: StartAssociationsOnceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9246,10 +9010,9 @@ const de_StartAssociationsOnceCommandError = async ( throw await de_InvalidAssociationRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9267,12 +9030,12 @@ export const de_StartAutomationExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartAutomationExecutionResult(data, context); + contents = _json(data); const response: StartAutomationExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9311,10 +9074,9 @@ const de_StartAutomationExecutionCommandError = async ( throw await de_InvalidTargetRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9332,12 +9094,12 @@ export const de_StartChangeRequestExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartChangeRequestExecutionResult(data, context); + contents = _json(data); const response: StartChangeRequestExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9376,10 +9138,9 @@ const de_StartChangeRequestExecutionCommandError = async ( throw await de_InvalidAutomationExecutionParametersExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9397,12 +9158,12 @@ export const de_StartSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartSessionResponse(data, context); + contents = _json(data); const response: StartSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9429,10 +9190,9 @@ const de_StartSessionCommandError = async ( throw await de_TargetNotConnectedRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9450,12 +9210,12 @@ export const de_StopAutomationExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopAutomationExecutionResult(data, context); + contents = _json(data); const response: StopAutomationExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9482,10 +9242,9 @@ const de_StopAutomationExecutionCommandError = async ( throw await de_InvalidAutomationStatusUpdateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9503,12 +9262,12 @@ export const de_TerminateSessionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TerminateSessionResponse(data, context); + contents = _json(data); const response: TerminateSessionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9529,10 +9288,9 @@ const de_TerminateSessionCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9550,12 +9308,12 @@ export const de_UnlabelParameterVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UnlabelParameterVersionResult(data, context); + contents = _json(data); const response: UnlabelParameterVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9585,10 +9343,9 @@ const de_UnlabelParameterVersionCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9611,7 +9368,7 @@ export const de_UpdateAssociationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9668,10 +9425,9 @@ const de_UpdateAssociationCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9694,7 +9450,7 @@ export const de_UpdateAssociationStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9730,10 +9486,9 @@ const de_UpdateAssociationStatusCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9756,7 +9511,7 @@ export const de_UpdateDocumentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9804,10 +9559,9 @@ const de_UpdateDocumentCommandError = async ( throw await de_MaxDocumentSizeExceededRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9825,12 +9579,12 @@ export const de_UpdateDocumentDefaultVersionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDocumentDefaultVersionResult(data, context); + contents = _json(data); const response: UpdateDocumentDefaultVersionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9860,10 +9614,9 @@ const de_UpdateDocumentDefaultVersionCommandError = async ( throw await de_InvalidDocumentVersionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9881,12 +9634,12 @@ export const de_UpdateDocumentMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDocumentMetadataResponse(data, context); + contents = _json(data); const response: UpdateDocumentMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9916,10 +9669,9 @@ const de_UpdateDocumentMetadataCommandError = async ( throw await de_InvalidDocumentVersionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9937,12 +9689,12 @@ export const de_UpdateMaintenanceWindowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMaintenanceWindowResult(data, context); + contents = _json(data); const response: UpdateMaintenanceWindowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -9966,10 +9718,9 @@ const de_UpdateMaintenanceWindowCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -9987,12 +9738,12 @@ export const de_UpdateMaintenanceWindowTargetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMaintenanceWindowTargetResult(data, context); + contents = _json(data); const response: UpdateMaintenanceWindowTargetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10016,10 +9767,9 @@ const de_UpdateMaintenanceWindowTargetCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10042,7 +9792,7 @@ export const de_UpdateMaintenanceWindowTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10066,10 +9816,9 @@ const de_UpdateMaintenanceWindowTaskCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10087,12 +9836,12 @@ export const de_UpdateManagedInstanceRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateManagedInstanceRoleResult(data, context); + contents = _json(data); const response: UpdateManagedInstanceRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10116,10 +9865,9 @@ const de_UpdateManagedInstanceRoleCommandError = async ( throw await de_InvalidInstanceIdRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10137,12 +9885,12 @@ export const de_UpdateOpsItemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateOpsItemResponse(data, context); + contents = _json(data); const response: UpdateOpsItemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10178,10 +9926,9 @@ const de_UpdateOpsItemCommandError = async ( throw await de_OpsItemNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10199,12 +9946,12 @@ export const de_UpdateOpsMetadataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateOpsMetadataResult(data, context); + contents = _json(data); const response: UpdateOpsMetadataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10237,10 +9984,9 @@ const de_UpdateOpsMetadataCommandError = async ( throw await de_OpsMetadataTooManyUpdatesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10263,7 +10009,7 @@ export const de_UpdatePatchBaselineCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10287,10 +10033,9 @@ const de_UpdatePatchBaselineCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10308,12 +10053,12 @@ export const de_UpdateResourceDataSyncCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResourceDataSyncResult(data, context); + contents = _json(data); const response: UpdateResourceDataSyncCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10343,10 +10088,9 @@ const de_UpdateResourceDataSyncCommandError = async ( throw await de_ResourceDataSyncNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10364,12 +10108,12 @@ export const de_UpdateServiceSettingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateServiceSettingResult(data, context); + contents = _json(data); const response: UpdateServiceSettingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -10396,10 +10140,9 @@ const de_UpdateServiceSettingCommandError = async ( throw await de_TooManyUpdatesRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -10413,7 +10156,7 @@ const de_AlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new AlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10426,7 +10169,7 @@ const de_AlreadyExistsExceptionRes = async ( */ const de_AssociatedInstancesRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociatedInstances(body, context); + const deserialized: any = _json(body); const exception = new AssociatedInstances({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10442,7 +10185,7 @@ const de_AssociationAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociationAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new AssociationAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10458,7 +10201,7 @@ const de_AssociationDoesNotExistRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociationDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new AssociationDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10474,7 +10217,7 @@ const de_AssociationExecutionDoesNotExistRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociationExecutionDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new AssociationExecutionDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10490,7 +10233,7 @@ const de_AssociationLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociationLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new AssociationLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10506,7 +10249,7 @@ const de_AssociationVersionLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AssociationVersionLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new AssociationVersionLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10522,7 +10265,7 @@ const de_AutomationDefinitionNotApprovedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AutomationDefinitionNotApprovedException(body, context); + const deserialized: any = _json(body); const exception = new AutomationDefinitionNotApprovedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10538,7 +10281,7 @@ const de_AutomationDefinitionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AutomationDefinitionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AutomationDefinitionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10554,7 +10297,7 @@ const de_AutomationDefinitionVersionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AutomationDefinitionVersionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AutomationDefinitionVersionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10570,7 +10313,7 @@ const de_AutomationExecutionLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AutomationExecutionLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new AutomationExecutionLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10586,7 +10329,7 @@ const de_AutomationExecutionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AutomationExecutionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AutomationExecutionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10602,7 +10345,7 @@ const de_AutomationStepNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AutomationStepNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new AutomationStepNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10618,7 +10361,7 @@ const de_ComplianceTypeCountLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ComplianceTypeCountLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ComplianceTypeCountLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10634,7 +10377,7 @@ const de_CustomSchemaCountLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CustomSchemaCountLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new CustomSchemaCountLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10650,7 +10393,7 @@ const de_DocumentAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DocumentAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new DocumentAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10666,7 +10409,7 @@ const de_DocumentLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DocumentLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new DocumentLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10682,7 +10425,7 @@ const de_DocumentPermissionLimitRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DocumentPermissionLimit(body, context); + const deserialized: any = _json(body); const exception = new DocumentPermissionLimit({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10698,7 +10441,7 @@ const de_DocumentVersionLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DocumentVersionLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new DocumentVersionLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10714,7 +10457,7 @@ const de_DoesNotExistExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DoesNotExistException(body, context); + const deserialized: any = _json(body); const exception = new DoesNotExistException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10730,7 +10473,7 @@ const de_DuplicateDocumentContentRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateDocumentContent(body, context); + const deserialized: any = _json(body); const exception = new DuplicateDocumentContent({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10746,7 +10489,7 @@ const de_DuplicateDocumentVersionNameRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateDocumentVersionName(body, context); + const deserialized: any = _json(body); const exception = new DuplicateDocumentVersionName({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10759,7 +10502,7 @@ const de_DuplicateDocumentVersionNameRes = async ( */ const de_DuplicateInstanceIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DuplicateInstanceId(body, context); + const deserialized: any = _json(body); const exception = new DuplicateInstanceId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10775,7 +10518,7 @@ const de_FeatureNotAvailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FeatureNotAvailableException(body, context); + const deserialized: any = _json(body); const exception = new FeatureNotAvailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10791,7 +10534,7 @@ const de_HierarchyLevelLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HierarchyLevelLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new HierarchyLevelLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10807,7 +10550,7 @@ const de_HierarchyTypeMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HierarchyTypeMismatchException(body, context); + const deserialized: any = _json(body); const exception = new HierarchyTypeMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10823,7 +10566,7 @@ const de_IdempotentParameterMismatchRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatch(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatch({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10839,7 +10582,7 @@ const de_IncompatiblePolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IncompatiblePolicyException(body, context); + const deserialized: any = _json(body); const exception = new IncompatiblePolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10852,7 +10595,7 @@ const de_IncompatiblePolicyExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10865,7 +10608,7 @@ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeCont */ const de_InvalidActivationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidActivation(body, context); + const deserialized: any = _json(body); const exception = new InvalidActivation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10878,7 +10621,7 @@ const de_InvalidActivationRes = async (parsedOutput: any, context: __SerdeContex */ const de_InvalidActivationIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidActivationId(body, context); + const deserialized: any = _json(body); const exception = new InvalidActivationId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10894,7 +10637,7 @@ const de_InvalidAggregatorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAggregatorException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAggregatorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10910,7 +10653,7 @@ const de_InvalidAllowedPatternExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAllowedPatternException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAllowedPatternException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10923,7 +10666,7 @@ const de_InvalidAllowedPatternExceptionRes = async ( */ const de_InvalidAssociationRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAssociation(body, context); + const deserialized: any = _json(body); const exception = new InvalidAssociation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10939,7 +10682,7 @@ const de_InvalidAssociationVersionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAssociationVersion(body, context); + const deserialized: any = _json(body); const exception = new InvalidAssociationVersion({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10955,7 +10698,7 @@ const de_InvalidAutomationExecutionParametersExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAutomationExecutionParametersException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAutomationExecutionParametersException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10971,7 +10714,7 @@ const de_InvalidAutomationSignalExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAutomationSignalException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAutomationSignalException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -10987,7 +10730,7 @@ const de_InvalidAutomationStatusUpdateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidAutomationStatusUpdateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidAutomationStatusUpdateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11000,7 +10743,7 @@ const de_InvalidAutomationStatusUpdateExceptionRes = async ( */ const de_InvalidCommandIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCommandId(body, context); + const deserialized: any = _json(body); const exception = new InvalidCommandId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11016,7 +10759,7 @@ const de_InvalidDeleteInventoryParametersExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeleteInventoryParametersException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeleteInventoryParametersException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11032,7 +10775,7 @@ const de_InvalidDeletionIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDeletionIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidDeletionIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11045,7 +10788,7 @@ const de_InvalidDeletionIdExceptionRes = async ( */ const de_InvalidDocumentRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDocument(body, context); + const deserialized: any = _json(body); const exception = new InvalidDocument({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11061,7 +10804,7 @@ const de_InvalidDocumentContentRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDocumentContent(body, context); + const deserialized: any = _json(body); const exception = new InvalidDocumentContent({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11077,7 +10820,7 @@ const de_InvalidDocumentOperationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDocumentOperation(body, context); + const deserialized: any = _json(body); const exception = new InvalidDocumentOperation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11093,7 +10836,7 @@ const de_InvalidDocumentSchemaVersionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDocumentSchemaVersion(body, context); + const deserialized: any = _json(body); const exception = new InvalidDocumentSchemaVersion({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11106,7 +10849,7 @@ const de_InvalidDocumentSchemaVersionRes = async ( */ const de_InvalidDocumentTypeRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDocumentType(body, context); + const deserialized: any = _json(body); const exception = new InvalidDocumentType({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11122,7 +10865,7 @@ const de_InvalidDocumentVersionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidDocumentVersion(body, context); + const deserialized: any = _json(body); const exception = new InvalidDocumentVersion({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11135,7 +10878,7 @@ const de_InvalidDocumentVersionRes = async ( */ const de_InvalidFilterRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilter(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilter({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11148,7 +10891,7 @@ const de_InvalidFilterRes = async (parsedOutput: any, context: __SerdeContext): */ const de_InvalidFilterKeyRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilterKey(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilterKey({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11161,7 +10904,7 @@ const de_InvalidFilterKeyRes = async (parsedOutput: any, context: __SerdeContext */ const de_InvalidFilterOptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilterOption(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilterOption({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11174,7 +10917,7 @@ const de_InvalidFilterOptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_InvalidFilterValueRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilterValue(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilterValue({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11187,7 +10930,7 @@ const de_InvalidFilterValueRes = async (parsedOutput: any, context: __SerdeConte */ const de_InvalidInstanceIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInstanceId(body, context); + const deserialized: any = _json(body); const exception = new InvalidInstanceId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11203,7 +10946,7 @@ const de_InvalidInstanceInformationFilterValueRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInstanceInformationFilterValue(body, context); + const deserialized: any = _json(body); const exception = new InvalidInstanceInformationFilterValue({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11219,7 +10962,7 @@ const de_InvalidInventoryGroupExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInventoryGroupException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInventoryGroupException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11235,7 +10978,7 @@ const de_InvalidInventoryItemContextExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInventoryItemContextException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInventoryItemContextException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11251,7 +10994,7 @@ const de_InvalidInventoryRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidInventoryRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidInventoryRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11267,7 +11010,7 @@ const de_InvalidItemContentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidItemContentException(body, context); + const deserialized: any = _json(body); const exception = new InvalidItemContentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11280,7 +11023,7 @@ const de_InvalidItemContentExceptionRes = async ( */ const de_InvalidKeyIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKeyId(body, context); + const deserialized: any = _json(body); const exception = new InvalidKeyId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11293,7 +11036,7 @@ const de_InvalidKeyIdRes = async (parsedOutput: any, context: __SerdeContext): P */ const de_InvalidNextTokenRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextToken(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextToken({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11309,7 +11052,7 @@ const de_InvalidNotificationConfigRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNotificationConfig(body, context); + const deserialized: any = _json(body); const exception = new InvalidNotificationConfig({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11325,7 +11068,7 @@ const de_InvalidOptionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOptionException(body, context); + const deserialized: any = _json(body); const exception = new InvalidOptionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11338,7 +11081,7 @@ const de_InvalidOptionExceptionRes = async ( */ const de_InvalidOutputFolderRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOutputFolder(body, context); + const deserialized: any = _json(body); const exception = new InvalidOutputFolder({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11354,7 +11097,7 @@ const de_InvalidOutputLocationRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidOutputLocation(body, context); + const deserialized: any = _json(body); const exception = new InvalidOutputLocation({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11367,7 +11110,7 @@ const de_InvalidOutputLocationRes = async ( */ const de_InvalidParametersRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameters(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameters({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11383,7 +11126,7 @@ const de_InvalidPermissionTypeRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPermissionType(body, context); + const deserialized: any = _json(body); const exception = new InvalidPermissionType({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11396,7 +11139,7 @@ const de_InvalidPermissionTypeRes = async ( */ const de_InvalidPluginNameRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPluginName(body, context); + const deserialized: any = _json(body); const exception = new InvalidPluginName({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11412,7 +11155,7 @@ const de_InvalidPolicyAttributeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPolicyAttributeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPolicyAttributeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11428,7 +11171,7 @@ const de_InvalidPolicyTypeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPolicyTypeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPolicyTypeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11441,7 +11184,7 @@ const de_InvalidPolicyTypeExceptionRes = async ( */ const de_InvalidResourceIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceId(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceId({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11454,7 +11197,7 @@ const de_InvalidResourceIdRes = async (parsedOutput: any, context: __SerdeContex */ const de_InvalidResourceTypeRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceType(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceType({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11470,7 +11213,7 @@ const de_InvalidResultAttributeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResultAttributeException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResultAttributeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11483,7 +11226,7 @@ const de_InvalidResultAttributeExceptionRes = async ( */ const de_InvalidRoleRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRole(body, context); + const deserialized: any = _json(body); const exception = new InvalidRole({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11496,7 +11239,7 @@ const de_InvalidRoleRes = async (parsedOutput: any, context: __SerdeContext): Pr */ const de_InvalidScheduleRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidSchedule(body, context); + const deserialized: any = _json(body); const exception = new InvalidSchedule({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11509,7 +11252,7 @@ const de_InvalidScheduleRes = async (parsedOutput: any, context: __SerdeContext) */ const de_InvalidTagRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTag(body, context); + const deserialized: any = _json(body); const exception = new InvalidTag({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11522,7 +11265,7 @@ const de_InvalidTagRes = async (parsedOutput: any, context: __SerdeContext): Pro */ const de_InvalidTargetRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTarget(body, context); + const deserialized: any = _json(body); const exception = new InvalidTarget({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11535,7 +11278,7 @@ const de_InvalidTargetRes = async (parsedOutput: any, context: __SerdeContext): */ const de_InvalidTargetMapsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTargetMaps(body, context); + const deserialized: any = _json(body); const exception = new InvalidTargetMaps({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11551,7 +11294,7 @@ const de_InvalidTypeNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidTypeNameException(body, context); + const deserialized: any = _json(body); const exception = new InvalidTypeNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11564,7 +11307,7 @@ const de_InvalidTypeNameExceptionRes = async ( */ const de_InvalidUpdateRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidUpdate(body, context); + const deserialized: any = _json(body); const exception = new InvalidUpdate({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11580,7 +11323,7 @@ const de_InvocationDoesNotExistRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvocationDoesNotExist(body, context); + const deserialized: any = _json(body); const exception = new InvocationDoesNotExist({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11596,7 +11339,7 @@ const de_ItemContentMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ItemContentMismatchException(body, context); + const deserialized: any = _json(body); const exception = new ItemContentMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11612,7 +11355,7 @@ const de_ItemSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ItemSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ItemSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11628,7 +11371,7 @@ const de_MaxDocumentSizeExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MaxDocumentSizeExceeded(body, context); + const deserialized: any = _json(body); const exception = new MaxDocumentSizeExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11644,7 +11387,7 @@ const de_OpsItemAccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemAccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemAccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11660,7 +11403,7 @@ const de_OpsItemAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11676,7 +11419,7 @@ const de_OpsItemInvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemInvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemInvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11692,7 +11435,7 @@ const de_OpsItemLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11708,7 +11451,7 @@ const de_OpsItemNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11724,7 +11467,7 @@ const de_OpsItemRelatedItemAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemRelatedItemAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemRelatedItemAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11740,7 +11483,7 @@ const de_OpsItemRelatedItemAssociationNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsItemRelatedItemAssociationNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new OpsItemRelatedItemAssociationNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11756,7 +11499,7 @@ const de_OpsMetadataAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsMetadataAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new OpsMetadataAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11772,7 +11515,7 @@ const de_OpsMetadataInvalidArgumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsMetadataInvalidArgumentException(body, context); + const deserialized: any = _json(body); const exception = new OpsMetadataInvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11788,7 +11531,7 @@ const de_OpsMetadataKeyLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsMetadataKeyLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new OpsMetadataKeyLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11804,7 +11547,7 @@ const de_OpsMetadataLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsMetadataLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new OpsMetadataLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11820,7 +11563,7 @@ const de_OpsMetadataNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsMetadataNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new OpsMetadataNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11836,7 +11579,7 @@ const de_OpsMetadataTooManyUpdatesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OpsMetadataTooManyUpdatesException(body, context); + const deserialized: any = _json(body); const exception = new OpsMetadataTooManyUpdatesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11852,7 +11595,7 @@ const de_ParameterAlreadyExistsRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterAlreadyExists(body, context); + const deserialized: any = _json(body); const exception = new ParameterAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11868,7 +11611,7 @@ const de_ParameterLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ParameterLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11884,7 +11627,7 @@ const de_ParameterMaxVersionLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterMaxVersionLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ParameterMaxVersionLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11897,7 +11640,7 @@ const de_ParameterMaxVersionLimitExceededRes = async ( */ const de_ParameterNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterNotFound(body, context); + const deserialized: any = _json(body); const exception = new ParameterNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11913,7 +11656,7 @@ const de_ParameterPatternMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterPatternMismatchException(body, context); + const deserialized: any = _json(body); const exception = new ParameterPatternMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11929,7 +11672,7 @@ const de_ParameterVersionLabelLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterVersionLabelLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new ParameterVersionLabelLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11945,7 +11688,7 @@ const de_ParameterVersionNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ParameterVersionNotFound(body, context); + const deserialized: any = _json(body); const exception = new ParameterVersionNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11961,7 +11704,7 @@ const de_PoliciesLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_PoliciesLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new PoliciesLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11977,7 +11720,7 @@ const de_ResourceDataSyncAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceDataSyncAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceDataSyncAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -11993,7 +11736,7 @@ const de_ResourceDataSyncConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceDataSyncConflictException(body, context); + const deserialized: any = _json(body); const exception = new ResourceDataSyncConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12009,7 +11752,7 @@ const de_ResourceDataSyncCountExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceDataSyncCountExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceDataSyncCountExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12025,7 +11768,7 @@ const de_ResourceDataSyncInvalidConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceDataSyncInvalidConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new ResourceDataSyncInvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12041,7 +11784,7 @@ const de_ResourceDataSyncNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceDataSyncNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceDataSyncNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12057,7 +11800,7 @@ const de_ResourceInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceInUseException(body, context); + const deserialized: any = _json(body); const exception = new ResourceInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12073,7 +11816,7 @@ const de_ResourceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12089,7 +11832,7 @@ const de_ResourcePolicyConflictExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourcePolicyConflictException(body, context); + const deserialized: any = _json(body); const exception = new ResourcePolicyConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12105,7 +11848,7 @@ const de_ResourcePolicyInvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourcePolicyInvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new ResourcePolicyInvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12121,7 +11864,7 @@ const de_ResourcePolicyLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourcePolicyLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourcePolicyLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12137,7 +11880,7 @@ const de_ServiceSettingNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceSettingNotFound(body, context); + const deserialized: any = _json(body); const exception = new ServiceSettingNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12150,7 +11893,7 @@ const de_ServiceSettingNotFoundRes = async ( */ const de_StatusUnchangedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_StatusUnchanged(body, context); + const deserialized: any = _json(body); const exception = new StatusUnchanged({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12166,7 +11909,7 @@ const de_SubTypeCountLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_SubTypeCountLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new SubTypeCountLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12182,7 +11925,7 @@ const de_TargetInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetInUseException(body, context); + const deserialized: any = _json(body); const exception = new TargetInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12195,7 +11938,7 @@ const de_TargetInUseExceptionRes = async ( */ const de_TargetNotConnectedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TargetNotConnected(body, context); + const deserialized: any = _json(body); const exception = new TargetNotConnected({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12208,7 +11951,7 @@ const de_TargetNotConnectedRes = async (parsedOutput: any, context: __SerdeConte */ const de_TooManyTagsErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsError(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12221,7 +11964,7 @@ const de_TooManyTagsErrorRes = async (parsedOutput: any, context: __SerdeContext */ const de_TooManyUpdatesRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyUpdates(body, context); + const deserialized: any = _json(body); const exception = new TooManyUpdates({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12237,7 +11980,7 @@ const de_TotalSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TotalSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TotalSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12253,7 +11996,7 @@ const de_UnsupportedCalendarExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedCalendarException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedCalendarException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12269,7 +12012,7 @@ const de_UnsupportedFeatureRequiredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedFeatureRequiredException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedFeatureRequiredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12285,7 +12028,7 @@ const de_UnsupportedInventoryItemContextExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedInventoryItemContextException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedInventoryItemContextException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12301,7 +12044,7 @@ const de_UnsupportedInventorySchemaVersionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedInventorySchemaVersionException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedInventorySchemaVersionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12317,7 +12060,7 @@ const de_UnsupportedOperatingSystemRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperatingSystem(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperatingSystem({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12333,7 +12076,7 @@ const de_UnsupportedParameterTypeRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedParameterType(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedParameterType({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12349,7 +12092,7 @@ const de_UnsupportedPlatformTypeRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedPlatformType(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedPlatformType({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -12357,10652 +12100,3743 @@ const de_UnsupportedPlatformTypeRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccountIdList - */ -const se_AccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AccountIdList omitted. -/** - * serializeAws_json1_1Accounts - */ -const se_Accounts = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Accounts omitted. -/** - * serializeAws_json1_1AddTagsToResourceRequest - */ -const se_AddTagsToResourceRequest = (input: AddTagsToResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AddTagsToResourceRequest omitted. -/** - * serializeAws_json1_1Alarm - */ -const se_Alarm = (input: Alarm, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_Alarm omitted. -/** - * serializeAws_json1_1AlarmConfiguration - */ -const se_AlarmConfiguration = (input: AlarmConfiguration, context: __SerdeContext): any => { - return { - ...(input.Alarms != null && { Alarms: se_AlarmList(input.Alarms, context) }), - ...(input.IgnorePollAlarmFailure != null && { IgnorePollAlarmFailure: input.IgnorePollAlarmFailure }), - }; -}; +// se_AlarmConfiguration omitted. -/** - * serializeAws_json1_1AlarmList - */ -const se_AlarmList = (input: Alarm[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Alarm(entry, context); - }); -}; +// se_AlarmList omitted. -/** - * serializeAws_json1_1AssociateOpsItemRelatedItemRequest - */ -const se_AssociateOpsItemRelatedItemRequest = ( - input: AssociateOpsItemRelatedItemRequest, - context: __SerdeContext -): any => { - return { - ...(input.AssociationType != null && { AssociationType: input.AssociationType }), - ...(input.OpsItemId != null && { OpsItemId: input.OpsItemId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.ResourceUri != null && { ResourceUri: input.ResourceUri }), - }; -}; +// se_AssociateOpsItemRelatedItemRequest omitted. -/** - * serializeAws_json1_1AssociationExecutionFilter - */ -const se_AssociationExecutionFilter = (input: AssociationExecutionFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AssociationExecutionFilter omitted. -/** - * serializeAws_json1_1AssociationExecutionFilterList - */ -const se_AssociationExecutionFilterList = (input: AssociationExecutionFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociationExecutionFilter(entry, context); - }); -}; +// se_AssociationExecutionFilterList omitted. -/** - * serializeAws_json1_1AssociationExecutionTargetsFilter - */ -const se_AssociationExecutionTargetsFilter = ( - input: AssociationExecutionTargetsFilter, - context: __SerdeContext -): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_AssociationExecutionTargetsFilter omitted. -/** - * serializeAws_json1_1AssociationExecutionTargetsFilterList - */ -const se_AssociationExecutionTargetsFilterList = ( - input: AssociationExecutionTargetsFilter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociationExecutionTargetsFilter(entry, context); - }); -}; +// se_AssociationExecutionTargetsFilterList omitted. -/** - * serializeAws_json1_1AssociationFilter - */ -const se_AssociationFilter = (input: AssociationFilter, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_AssociationFilter omitted. -/** - * serializeAws_json1_1AssociationFilterList - */ -const se_AssociationFilterList = (input: AssociationFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AssociationFilter(entry, context); - }); -}; +// se_AssociationFilterList omitted. -/** - * serializeAws_json1_1AssociationIdList - */ -const se_AssociationIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AssociationIdList omitted. /** * serializeAws_json1_1AssociationStatus */ const se_AssociationStatus = (input: AssociationStatus, context: __SerdeContext): any => { - return { - ...(input.AdditionalInfo != null && { AdditionalInfo: input.AdditionalInfo }), - ...(input.Date != null && { Date: Math.round(input.Date.getTime() / 1000) }), - ...(input.Message != null && { Message: input.Message }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + AdditionalInfo: [], + Date: (_) => Math.round(_.getTime() / 1000), + Message: [], + Name: [], + }); }; -/** - * serializeAws_json1_1AttachmentsSource - */ -const se_AttachmentsSource = (input: AttachmentsSource, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Values != null && { Values: se_AttachmentsSourceValues(input.Values, context) }), - }; -}; +// se_AttachmentsSource omitted. -/** - * serializeAws_json1_1AttachmentsSourceList - */ -const se_AttachmentsSourceList = (input: AttachmentsSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AttachmentsSource(entry, context); - }); -}; +// se_AttachmentsSourceList omitted. -/** - * serializeAws_json1_1AttachmentsSourceValues - */ -const se_AttachmentsSourceValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AttachmentsSourceValues omitted. -/** - * serializeAws_json1_1AutomationExecutionFilter - */ -const se_AutomationExecutionFilter = (input: AutomationExecutionFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_AutomationExecutionFilterValueList(input.Values, context) }), - }; -}; +// se_AutomationExecutionFilter omitted. -/** - * serializeAws_json1_1AutomationExecutionFilterList - */ -const se_AutomationExecutionFilterList = (input: AutomationExecutionFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AutomationExecutionFilter(entry, context); - }); -}; +// se_AutomationExecutionFilterList omitted. -/** - * serializeAws_json1_1AutomationExecutionFilterValueList - */ -const se_AutomationExecutionFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutomationExecutionFilterValueList omitted. -/** - * serializeAws_json1_1AutomationParameterMap - */ -const se_AutomationParameterMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_AutomationParameterValueList(value, context); - return acc; - }, {}); -}; +// se_AutomationParameterMap omitted. -/** - * serializeAws_json1_1AutomationParameterValueList - */ -const se_AutomationParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AutomationParameterValueList omitted. -/** - * serializeAws_json1_1BaselineOverride - */ -const se_BaselineOverride = (input: BaselineOverride, context: __SerdeContext): any => { - return { - ...(input.ApprovalRules != null && { ApprovalRules: se_PatchRuleGroup(input.ApprovalRules, context) }), - ...(input.ApprovedPatches != null && { ApprovedPatches: se_PatchIdList(input.ApprovedPatches, context) }), - ...(input.ApprovedPatchesComplianceLevel != null && { - ApprovedPatchesComplianceLevel: input.ApprovedPatchesComplianceLevel, - }), - ...(input.ApprovedPatchesEnableNonSecurity != null && { - ApprovedPatchesEnableNonSecurity: input.ApprovedPatchesEnableNonSecurity, - }), - ...(input.GlobalFilters != null && { GlobalFilters: se_PatchFilterGroup(input.GlobalFilters, context) }), - ...(input.OperatingSystem != null && { OperatingSystem: input.OperatingSystem }), - ...(input.RejectedPatches != null && { RejectedPatches: se_PatchIdList(input.RejectedPatches, context) }), - ...(input.RejectedPatchesAction != null && { RejectedPatchesAction: input.RejectedPatchesAction }), - ...(input.Sources != null && { Sources: se_PatchSourceList(input.Sources, context) }), - }; -}; +// se_BaselineOverride omitted. -/** - * serializeAws_json1_1CalendarNameOrARNList - */ -const se_CalendarNameOrARNList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CalendarNameOrARNList omitted. -/** - * serializeAws_json1_1CancelCommandRequest - */ -const se_CancelCommandRequest = (input: CancelCommandRequest, context: __SerdeContext): any => { - return { - ...(input.CommandId != null && { CommandId: input.CommandId }), - ...(input.InstanceIds != null && { InstanceIds: se_InstanceIdList(input.InstanceIds, context) }), - }; -}; +// se_CancelCommandRequest omitted. -/** - * serializeAws_json1_1CancelMaintenanceWindowExecutionRequest - */ -const se_CancelMaintenanceWindowExecutionRequest = ( - input: CancelMaintenanceWindowExecutionRequest, - context: __SerdeContext -): any => { - return { - ...(input.WindowExecutionId != null && { WindowExecutionId: input.WindowExecutionId }), - }; -}; +// se_CancelMaintenanceWindowExecutionRequest omitted. -/** - * serializeAws_json1_1CloudWatchOutputConfig - */ -const se_CloudWatchOutputConfig = (input: CloudWatchOutputConfig, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogGroupName != null && { CloudWatchLogGroupName: input.CloudWatchLogGroupName }), - ...(input.CloudWatchOutputEnabled != null && { CloudWatchOutputEnabled: input.CloudWatchOutputEnabled }), - }; -}; +// se_CloudWatchOutputConfig omitted. -/** - * serializeAws_json1_1CommandFilter - */ -const se_CommandFilter = (input: CommandFilter, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_CommandFilter omitted. -/** - * serializeAws_json1_1CommandFilterList - */ -const se_CommandFilterList = (input: CommandFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CommandFilter(entry, context); - }); -}; +// se_CommandFilterList omitted. /** * serializeAws_json1_1ComplianceExecutionSummary */ const se_ComplianceExecutionSummary = (input: ComplianceExecutionSummary, context: __SerdeContext): any => { - return { - ...(input.ExecutionId != null && { ExecutionId: input.ExecutionId }), - ...(input.ExecutionTime != null && { ExecutionTime: Math.round(input.ExecutionTime.getTime() / 1000) }), - ...(input.ExecutionType != null && { ExecutionType: input.ExecutionType }), - }; + return take(input, { + ExecutionId: [], + ExecutionTime: (_) => Math.round(_.getTime() / 1000), + ExecutionType: [], + }); }; -/** - * serializeAws_json1_1ComplianceItemDetails - */ -const se_ComplianceItemDetails = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ComplianceItemDetails omitted. -/** - * serializeAws_json1_1ComplianceItemEntry - */ -const se_ComplianceItemEntry = (input: ComplianceItemEntry, context: __SerdeContext): any => { - return { - ...(input.Details != null && { Details: se_ComplianceItemDetails(input.Details, context) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Severity != null && { Severity: input.Severity }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Title != null && { Title: input.Title }), - }; -}; +// se_ComplianceItemEntry omitted. -/** - * serializeAws_json1_1ComplianceItemEntryList - */ -const se_ComplianceItemEntryList = (input: ComplianceItemEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComplianceItemEntry(entry, context); - }); -}; +// se_ComplianceItemEntryList omitted. -/** - * serializeAws_json1_1ComplianceResourceIdList - */ -const se_ComplianceResourceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ComplianceResourceIdList omitted. + +// se_ComplianceResourceTypeList omitted. + +// se_ComplianceStringFilter omitted. + +// se_ComplianceStringFilterList omitted. + +// se_ComplianceStringFilterValueList omitted. /** - * serializeAws_json1_1ComplianceResourceTypeList + * serializeAws_json1_1CreateActivationRequest */ -const se_ComplianceResourceTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_CreateActivationRequest = (input: CreateActivationRequest, context: __SerdeContext): any => { + return take(input, { + DefaultInstanceName: [], + Description: [], + ExpirationDate: (_) => Math.round(_.getTime() / 1000), + IamRole: [], + RegistrationLimit: [], + RegistrationMetadata: _json, + Tags: _json, + }); }; +// se_CreateAssociationBatchRequest omitted. + +// se_CreateAssociationBatchRequestEntries omitted. + +// se_CreateAssociationBatchRequestEntry omitted. + +// se_CreateAssociationRequest omitted. + +// se_CreateDocumentRequest omitted. + /** - * serializeAws_json1_1ComplianceStringFilter + * serializeAws_json1_1CreateMaintenanceWindowRequest */ -const se_ComplianceStringFilter = (input: ComplianceStringFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Values != null && { Values: se_ComplianceStringFilterValueList(input.Values, context) }), - }; +const se_CreateMaintenanceWindowRequest = (input: CreateMaintenanceWindowRequest, context: __SerdeContext): any => { + return take(input, { + AllowUnassociatedTargets: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Cutoff: [], + Description: [], + Duration: [], + EndDate: [], + Name: [], + Schedule: [], + ScheduleOffset: [], + ScheduleTimezone: [], + StartDate: [], + Tags: _json, + }); }; /** - * serializeAws_json1_1ComplianceStringFilterList + * serializeAws_json1_1CreateOpsItemRequest */ -const se_ComplianceStringFilterList = (input: ComplianceStringFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ComplianceStringFilter(entry, context); - }); +const se_CreateOpsItemRequest = (input: CreateOpsItemRequest, context: __SerdeContext): any => { + return take(input, { + AccountId: [], + ActualEndTime: (_) => Math.round(_.getTime() / 1000), + ActualStartTime: (_) => Math.round(_.getTime() / 1000), + Category: [], + Description: [], + Notifications: _json, + OperationalData: _json, + OpsItemType: [], + PlannedEndTime: (_) => Math.round(_.getTime() / 1000), + PlannedStartTime: (_) => Math.round(_.getTime() / 1000), + Priority: [], + RelatedOpsItems: _json, + Severity: [], + Source: [], + Tags: _json, + Title: [], + }); }; +// se_CreateOpsMetadataRequest omitted. + /** - * serializeAws_json1_1ComplianceStringFilterValueList + * serializeAws_json1_1CreatePatchBaselineRequest */ -const se_ComplianceStringFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_CreatePatchBaselineRequest = (input: CreatePatchBaselineRequest, context: __SerdeContext): any => { + return take(input, { + ApprovalRules: _json, + ApprovedPatches: _json, + ApprovedPatchesComplianceLevel: [], + ApprovedPatchesEnableNonSecurity: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + GlobalFilters: _json, + Name: [], + OperatingSystem: [], + RejectedPatches: _json, + RejectedPatchesAction: [], + Sources: _json, + Tags: _json, + }); }; +// se_CreateResourceDataSyncRequest omitted. + +// se_DeleteActivationRequest omitted. + +// se_DeleteAssociationRequest omitted. + +// se_DeleteDocumentRequest omitted. + /** - * serializeAws_json1_1CreateActivationRequest + * serializeAws_json1_1DeleteInventoryRequest */ -const se_CreateActivationRequest = (input: CreateActivationRequest, context: __SerdeContext): any => { - return { - ...(input.DefaultInstanceName != null && { DefaultInstanceName: input.DefaultInstanceName }), - ...(input.Description != null && { Description: input.Description }), - ...(input.ExpirationDate != null && { ExpirationDate: Math.round(input.ExpirationDate.getTime() / 1000) }), - ...(input.IamRole != null && { IamRole: input.IamRole }), - ...(input.RegistrationLimit != null && { RegistrationLimit: input.RegistrationLimit }), - ...(input.RegistrationMetadata != null && { - RegistrationMetadata: se_RegistrationMetadataList(input.RegistrationMetadata, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; +const se_DeleteInventoryRequest = (input: DeleteInventoryRequest, context: __SerdeContext): any => { + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DryRun: [], + SchemaDeleteOption: [], + TypeName: [], + }); }; -/** - * serializeAws_json1_1CreateAssociationBatchRequest - */ -const se_CreateAssociationBatchRequest = (input: CreateAssociationBatchRequest, context: __SerdeContext): any => { - return { - ...(input.Entries != null && { Entries: se_CreateAssociationBatchRequestEntries(input.Entries, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateAssociationBatchRequestEntries - */ -const se_CreateAssociationBatchRequestEntries = ( - input: CreateAssociationBatchRequestEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CreateAssociationBatchRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1CreateAssociationBatchRequestEntry - */ -const se_CreateAssociationBatchRequestEntry = ( - input: CreateAssociationBatchRequestEntry, - context: __SerdeContext -): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ...(input.ApplyOnlyAtCronInterval != null && { ApplyOnlyAtCronInterval: input.ApplyOnlyAtCronInterval }), - ...(input.AssociationName != null && { AssociationName: input.AssociationName }), - ...(input.AutomationTargetParameterName != null && { - AutomationTargetParameterName: input.AutomationTargetParameterName, - }), - ...(input.CalendarNames != null && { CalendarNames: se_CalendarNameOrARNList(input.CalendarNames, context) }), - ...(input.ComplianceSeverity != null && { ComplianceSeverity: input.ComplianceSeverity }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputLocation != null && { - OutputLocation: se_InstanceAssociationOutputLocation(input.OutputLocation, context), - }), - ...(input.Parameters != null && { Parameters: se_Parameters(input.Parameters, context) }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }), - ...(input.SyncCompliance != null && { SyncCompliance: input.SyncCompliance }), - ...(input.TargetLocations != null && { TargetLocations: se_TargetLocations(input.TargetLocations, context) }), - ...(input.TargetMaps != null && { TargetMaps: se_TargetMaps(input.TargetMaps, context) }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateAssociationRequest - */ -const se_CreateAssociationRequest = (input: CreateAssociationRequest, context: __SerdeContext): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ...(input.ApplyOnlyAtCronInterval != null && { ApplyOnlyAtCronInterval: input.ApplyOnlyAtCronInterval }), - ...(input.AssociationName != null && { AssociationName: input.AssociationName }), - ...(input.AutomationTargetParameterName != null && { - AutomationTargetParameterName: input.AutomationTargetParameterName, - }), - ...(input.CalendarNames != null && { CalendarNames: se_CalendarNameOrARNList(input.CalendarNames, context) }), - ...(input.ComplianceSeverity != null && { ComplianceSeverity: input.ComplianceSeverity }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputLocation != null && { - OutputLocation: se_InstanceAssociationOutputLocation(input.OutputLocation, context), - }), - ...(input.Parameters != null && { Parameters: se_Parameters(input.Parameters, context) }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }), - ...(input.SyncCompliance != null && { SyncCompliance: input.SyncCompliance }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetLocations != null && { TargetLocations: se_TargetLocations(input.TargetLocations, context) }), - ...(input.TargetMaps != null && { TargetMaps: se_TargetMaps(input.TargetMaps, context) }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateDocumentRequest - */ -const se_CreateDocumentRequest = (input: CreateDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.Attachments != null && { Attachments: se_AttachmentsSourceList(input.Attachments, context) }), - ...(input.Content != null && { Content: input.Content }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DocumentFormat != null && { DocumentFormat: input.DocumentFormat }), - ...(input.DocumentType != null && { DocumentType: input.DocumentType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Requires != null && { Requires: se_DocumentRequiresList(input.Requires, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1CreateMaintenanceWindowRequest - */ -const se_CreateMaintenanceWindowRequest = (input: CreateMaintenanceWindowRequest, context: __SerdeContext): any => { - return { - ...(input.AllowUnassociatedTargets != null && { AllowUnassociatedTargets: input.AllowUnassociatedTargets }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Cutoff != null && { Cutoff: input.Cutoff }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.EndDate != null && { EndDate: input.EndDate }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }), - ...(input.ScheduleTimezone != null && { ScheduleTimezone: input.ScheduleTimezone }), - ...(input.StartDate != null && { StartDate: input.StartDate }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateOpsItemRequest - */ -const se_CreateOpsItemRequest = (input: CreateOpsItemRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.ActualEndTime != null && { ActualEndTime: Math.round(input.ActualEndTime.getTime() / 1000) }), - ...(input.ActualStartTime != null && { ActualStartTime: Math.round(input.ActualStartTime.getTime() / 1000) }), - ...(input.Category != null && { Category: input.Category }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Notifications != null && { Notifications: se_OpsItemNotifications(input.Notifications, context) }), - ...(input.OperationalData != null && { - OperationalData: se_OpsItemOperationalData(input.OperationalData, context), - }), - ...(input.OpsItemType != null && { OpsItemType: input.OpsItemType }), - ...(input.PlannedEndTime != null && { PlannedEndTime: Math.round(input.PlannedEndTime.getTime() / 1000) }), - ...(input.PlannedStartTime != null && { PlannedStartTime: Math.round(input.PlannedStartTime.getTime() / 1000) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RelatedOpsItems != null && { RelatedOpsItems: se_RelatedOpsItems(input.RelatedOpsItems, context) }), - ...(input.Severity != null && { Severity: input.Severity }), - ...(input.Source != null && { Source: input.Source }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Title != null && { Title: input.Title }), - }; -}; - -/** - * serializeAws_json1_1CreateOpsMetadataRequest - */ -const se_CreateOpsMetadataRequest = (input: CreateOpsMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.Metadata != null && { Metadata: se_MetadataMap(input.Metadata, context) }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreatePatchBaselineRequest - */ -const se_CreatePatchBaselineRequest = (input: CreatePatchBaselineRequest, context: __SerdeContext): any => { - return { - ...(input.ApprovalRules != null && { ApprovalRules: se_PatchRuleGroup(input.ApprovalRules, context) }), - ...(input.ApprovedPatches != null && { ApprovedPatches: se_PatchIdList(input.ApprovedPatches, context) }), - ...(input.ApprovedPatchesComplianceLevel != null && { - ApprovedPatchesComplianceLevel: input.ApprovedPatchesComplianceLevel, - }), - ...(input.ApprovedPatchesEnableNonSecurity != null && { - ApprovedPatchesEnableNonSecurity: input.ApprovedPatchesEnableNonSecurity, - }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.GlobalFilters != null && { GlobalFilters: se_PatchFilterGroup(input.GlobalFilters, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OperatingSystem != null && { OperatingSystem: input.OperatingSystem }), - ...(input.RejectedPatches != null && { RejectedPatches: se_PatchIdList(input.RejectedPatches, context) }), - ...(input.RejectedPatchesAction != null && { RejectedPatchesAction: input.RejectedPatchesAction }), - ...(input.Sources != null && { Sources: se_PatchSourceList(input.Sources, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateResourceDataSyncRequest - */ -const se_CreateResourceDataSyncRequest = (input: CreateResourceDataSyncRequest, context: __SerdeContext): any => { - return { - ...(input.S3Destination != null && { - S3Destination: se_ResourceDataSyncS3Destination(input.S3Destination, context), - }), - ...(input.SyncName != null && { SyncName: input.SyncName }), - ...(input.SyncSource != null && { SyncSource: se_ResourceDataSyncSource(input.SyncSource, context) }), - ...(input.SyncType != null && { SyncType: input.SyncType }), - }; -}; - -/** - * serializeAws_json1_1DeleteActivationRequest - */ -const se_DeleteActivationRequest = (input: DeleteActivationRequest, context: __SerdeContext): any => { - return { - ...(input.ActivationId != null && { ActivationId: input.ActivationId }), - }; -}; - -/** - * serializeAws_json1_1DeleteAssociationRequest - */ -const se_DeleteAssociationRequest = (input: DeleteAssociationRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DeleteDocumentRequest - */ -const se_DeleteDocumentRequest = (input: DeleteDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Force != null && { Force: input.Force }), - ...(input.Name != null && { Name: input.Name }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1DeleteInventoryRequest - */ -const se_DeleteInventoryRequest = (input: DeleteInventoryRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DryRun != null && { DryRun: input.DryRun }), - ...(input.SchemaDeleteOption != null && { SchemaDeleteOption: input.SchemaDeleteOption }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; - -/** - * serializeAws_json1_1DeleteMaintenanceWindowRequest - */ -const se_DeleteMaintenanceWindowRequest = (input: DeleteMaintenanceWindowRequest, context: __SerdeContext): any => { - return { - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1DeleteOpsMetadataRequest - */ -const se_DeleteOpsMetadataRequest = (input: DeleteOpsMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.OpsMetadataArn != null && { OpsMetadataArn: input.OpsMetadataArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteParameterRequest - */ -const se_DeleteParameterRequest = (input: DeleteParameterRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DeleteParametersRequest - */ -const se_DeleteParametersRequest = (input: DeleteParametersRequest, context: __SerdeContext): any => { - return { - ...(input.Names != null && { Names: se_ParameterNameList(input.Names, context) }), - }; -}; - -/** - * serializeAws_json1_1DeletePatchBaselineRequest - */ -const se_DeletePatchBaselineRequest = (input: DeletePatchBaselineRequest, context: __SerdeContext): any => { - return { - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - }; -}; - -/** - * serializeAws_json1_1DeleteResourceDataSyncRequest - */ -const se_DeleteResourceDataSyncRequest = (input: DeleteResourceDataSyncRequest, context: __SerdeContext): any => { - return { - ...(input.SyncName != null && { SyncName: input.SyncName }), - ...(input.SyncType != null && { SyncType: input.SyncType }), - }; -}; - -/** - * serializeAws_json1_1DeleteResourcePolicyRequest - */ -const se_DeleteResourcePolicyRequest = (input: DeleteResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.PolicyHash != null && { PolicyHash: input.PolicyHash }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1DeregisterManagedInstanceRequest - */ -const se_DeregisterManagedInstanceRequest = (input: DeregisterManagedInstanceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; - -/** - * serializeAws_json1_1DeregisterPatchBaselineForPatchGroupRequest - */ -const se_DeregisterPatchBaselineForPatchGroupRequest = ( - input: DeregisterPatchBaselineForPatchGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - ...(input.PatchGroup != null && { PatchGroup: input.PatchGroup }), - }; -}; - -/** - * serializeAws_json1_1DeregisterTargetFromMaintenanceWindowRequest - */ -const se_DeregisterTargetFromMaintenanceWindowRequest = ( - input: DeregisterTargetFromMaintenanceWindowRequest, - context: __SerdeContext -): any => { - return { - ...(input.Safe != null && { Safe: input.Safe }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - ...(input.WindowTargetId != null && { WindowTargetId: input.WindowTargetId }), - }; -}; - -/** - * serializeAws_json1_1DeregisterTaskFromMaintenanceWindowRequest - */ -const se_DeregisterTaskFromMaintenanceWindowRequest = ( - input: DeregisterTaskFromMaintenanceWindowRequest, - context: __SerdeContext -): any => { - return { - ...(input.WindowId != null && { WindowId: input.WindowId }), - ...(input.WindowTaskId != null && { WindowTaskId: input.WindowTaskId }), - }; -}; - -/** - * serializeAws_json1_1DescribeActivationsFilter - */ -const se_DescribeActivationsFilter = (input: DescribeActivationsFilter, context: __SerdeContext): any => { - return { - ...(input.FilterKey != null && { FilterKey: input.FilterKey }), - ...(input.FilterValues != null && { FilterValues: se_StringList(input.FilterValues, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeActivationsFilterList - */ -const se_DescribeActivationsFilterList = (input: DescribeActivationsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DescribeActivationsFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1DescribeActivationsRequest - */ -const se_DescribeActivationsRequest = (input: DescribeActivationsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_DescribeActivationsFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeAssociationExecutionsRequest - */ -const se_DescribeAssociationExecutionsRequest = ( - input: DescribeAssociationExecutionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.Filters != null && { Filters: se_AssociationExecutionFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeAssociationExecutionTargetsRequest - */ -const se_DescribeAssociationExecutionTargetsRequest = ( - input: DescribeAssociationExecutionTargetsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.ExecutionId != null && { ExecutionId: input.ExecutionId }), - ...(input.Filters != null && { Filters: se_AssociationExecutionTargetsFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeAssociationRequest - */ -const se_DescribeAssociationRequest = (input: DescribeAssociationRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.AssociationVersion != null && { AssociationVersion: input.AssociationVersion }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1DescribeAutomationExecutionsRequest - */ -const se_DescribeAutomationExecutionsRequest = ( - input: DescribeAutomationExecutionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_AutomationExecutionFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeAutomationStepExecutionsRequest - */ -const se_DescribeAutomationStepExecutionsRequest = ( - input: DescribeAutomationStepExecutionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutomationExecutionId != null && { AutomationExecutionId: input.AutomationExecutionId }), - ...(input.Filters != null && { Filters: se_StepExecutionFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ReverseOrder != null && { ReverseOrder: input.ReverseOrder }), - }; -}; - -/** - * serializeAws_json1_1DescribeAvailablePatchesRequest - */ -const se_DescribeAvailablePatchesRequest = (input: DescribeAvailablePatchesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_PatchOrchestratorFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeDocumentPermissionRequest - */ -const se_DescribeDocumentPermissionRequest = ( - input: DescribeDocumentPermissionRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PermissionType != null && { PermissionType: input.PermissionType }), - }; -}; - -/** - * serializeAws_json1_1DescribeDocumentRequest - */ -const se_DescribeDocumentRequest = (input: DescribeDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1DescribeEffectiveInstanceAssociationsRequest - */ -const se_DescribeEffectiveInstanceAssociationsRequest = ( - input: DescribeEffectiveInstanceAssociationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeEffectivePatchesForPatchBaselineRequest - */ -const se_DescribeEffectivePatchesForPatchBaselineRequest = ( - input: DescribeEffectivePatchesForPatchBaselineRequest, - context: __SerdeContext -): any => { - return { - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeInstanceAssociationsStatusRequest - */ -const se_DescribeInstanceAssociationsStatusRequest = ( - input: DescribeInstanceAssociationsStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeInstanceInformationRequest - */ -const se_DescribeInstanceInformationRequest = ( - input: DescribeInstanceInformationRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_InstanceInformationStringFilterList(input.Filters, context) }), - ...(input.InstanceInformationFilterList != null && { - InstanceInformationFilterList: se_InstanceInformationFilterList(input.InstanceInformationFilterList, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeInstancePatchesRequest - */ -const se_DescribeInstancePatchesRequest = (input: DescribeInstancePatchesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_PatchOrchestratorFilterList(input.Filters, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeInstancePatchStatesForPatchGroupRequest - */ -const se_DescribeInstancePatchStatesForPatchGroupRequest = ( - input: DescribeInstancePatchStatesForPatchGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_InstancePatchStateFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PatchGroup != null && { PatchGroup: input.PatchGroup }), - }; -}; - -/** - * serializeAws_json1_1DescribeInstancePatchStatesRequest - */ -const se_DescribeInstancePatchStatesRequest = ( - input: DescribeInstancePatchStatesRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceIds != null && { InstanceIds: se_InstanceIdList(input.InstanceIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeInventoryDeletionsRequest - */ -const se_DescribeInventoryDeletionsRequest = ( - input: DescribeInventoryDeletionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeletionId != null && { DeletionId: input.DeletionId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowExecutionsRequest - */ -const se_DescribeMaintenanceWindowExecutionsRequest = ( - input: DescribeMaintenanceWindowExecutionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_MaintenanceWindowFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowExecutionTaskInvocationsRequest - */ -const se_DescribeMaintenanceWindowExecutionTaskInvocationsRequest = ( - input: DescribeMaintenanceWindowExecutionTaskInvocationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_MaintenanceWindowFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TaskId != null && { TaskId: input.TaskId }), - ...(input.WindowExecutionId != null && { WindowExecutionId: input.WindowExecutionId }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowExecutionTasksRequest - */ -const se_DescribeMaintenanceWindowExecutionTasksRequest = ( - input: DescribeMaintenanceWindowExecutionTasksRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_MaintenanceWindowFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WindowExecutionId != null && { WindowExecutionId: input.WindowExecutionId }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowScheduleRequest - */ -const se_DescribeMaintenanceWindowScheduleRequest = ( - input: DescribeMaintenanceWindowScheduleRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_PatchOrchestratorFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowsForTargetRequest - */ -const se_DescribeMaintenanceWindowsForTargetRequest = ( - input: DescribeMaintenanceWindowsForTargetRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowsRequest - */ -const se_DescribeMaintenanceWindowsRequest = ( - input: DescribeMaintenanceWindowsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_MaintenanceWindowFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowTargetsRequest - */ -const se_DescribeMaintenanceWindowTargetsRequest = ( - input: DescribeMaintenanceWindowTargetsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_MaintenanceWindowFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1DescribeMaintenanceWindowTasksRequest - */ -const se_DescribeMaintenanceWindowTasksRequest = ( - input: DescribeMaintenanceWindowTasksRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_MaintenanceWindowFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1DescribeOpsItemsRequest - */ -const se_DescribeOpsItemsRequest = (input: DescribeOpsItemsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OpsItemFilters != null && { OpsItemFilters: se_OpsItemFilters(input.OpsItemFilters, context) }), - }; -}; - -/** - * serializeAws_json1_1DescribeParametersRequest - */ -const se_DescribeParametersRequest = (input: DescribeParametersRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ParametersFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterFilters != null && { - ParameterFilters: se_ParameterStringFilterList(input.ParameterFilters, context), - }), - }; -}; - -/** - * serializeAws_json1_1DescribePatchBaselinesRequest - */ -const se_DescribePatchBaselinesRequest = (input: DescribePatchBaselinesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_PatchOrchestratorFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribePatchGroupsRequest - */ -const se_DescribePatchGroupsRequest = (input: DescribePatchGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_PatchOrchestratorFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1DescribePatchGroupStateRequest - */ -const se_DescribePatchGroupStateRequest = (input: DescribePatchGroupStateRequest, context: __SerdeContext): any => { - return { - ...(input.PatchGroup != null && { PatchGroup: input.PatchGroup }), - }; -}; - -/** - * serializeAws_json1_1DescribePatchPropertiesRequest - */ -const se_DescribePatchPropertiesRequest = (input: DescribePatchPropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OperatingSystem != null && { OperatingSystem: input.OperatingSystem }), - ...(input.PatchSet != null && { PatchSet: input.PatchSet }), - ...(input.Property != null && { Property: input.Property }), - }; -}; - -/** - * serializeAws_json1_1DescribeSessionsRequest - */ -const se_DescribeSessionsRequest = (input: DescribeSessionsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_SessionFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.State != null && { State: input.State }), - }; -}; - -/** - * serializeAws_json1_1DisassociateOpsItemRelatedItemRequest - */ -const se_DisassociateOpsItemRelatedItemRequest = ( - input: DisassociateOpsItemRelatedItemRequest, - context: __SerdeContext -): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.OpsItemId != null && { OpsItemId: input.OpsItemId }), - }; -}; - -/** - * serializeAws_json1_1DocumentFilter - */ -const se_DocumentFilter = (input: DocumentFilter, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1DocumentFilterList - */ -const se_DocumentFilterList = (input: DocumentFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DocumentFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1DocumentKeyValuesFilter - */ -const se_DocumentKeyValuesFilter = (input: DocumentKeyValuesFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_DocumentKeyValuesFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1DocumentKeyValuesFilterList - */ -const se_DocumentKeyValuesFilterList = (input: DocumentKeyValuesFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DocumentKeyValuesFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1DocumentKeyValuesFilterValues - */ -const se_DocumentKeyValuesFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1DocumentRequires - */ -const se_DocumentRequires = (input: DocumentRequires, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.RequireType != null && { RequireType: input.RequireType }), - ...(input.Version != null && { Version: input.Version }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1DocumentRequiresList - */ -const se_DocumentRequiresList = (input: DocumentRequires[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DocumentRequires(entry, context); - }); -}; - -/** - * serializeAws_json1_1DocumentReviewCommentList - */ -const se_DocumentReviewCommentList = (input: DocumentReviewCommentSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DocumentReviewCommentSource(entry, context); - }); -}; - -/** - * serializeAws_json1_1DocumentReviewCommentSource - */ -const se_DocumentReviewCommentSource = (input: DocumentReviewCommentSource, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1DocumentReviews - */ -const se_DocumentReviews = (input: DocumentReviews, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Comment != null && { Comment: se_DocumentReviewCommentList(input.Comment, context) }), - }; -}; - -/** - * serializeAws_json1_1GetAutomationExecutionRequest - */ -const se_GetAutomationExecutionRequest = (input: GetAutomationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.AutomationExecutionId != null && { AutomationExecutionId: input.AutomationExecutionId }), - }; -}; - -/** - * serializeAws_json1_1GetCalendarStateRequest - */ -const se_GetCalendarStateRequest = (input: GetCalendarStateRequest, context: __SerdeContext): any => { - return { - ...(input.AtTime != null && { AtTime: input.AtTime }), - ...(input.CalendarNames != null && { CalendarNames: se_CalendarNameOrARNList(input.CalendarNames, context) }), - }; -}; - -/** - * serializeAws_json1_1GetCommandInvocationRequest - */ -const se_GetCommandInvocationRequest = (input: GetCommandInvocationRequest, context: __SerdeContext): any => { - return { - ...(input.CommandId != null && { CommandId: input.CommandId }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.PluginName != null && { PluginName: input.PluginName }), - }; -}; - -/** - * serializeAws_json1_1GetConnectionStatusRequest - */ -const se_GetConnectionStatusRequest = (input: GetConnectionStatusRequest, context: __SerdeContext): any => { - return { - ...(input.Target != null && { Target: input.Target }), - }; -}; - -/** - * serializeAws_json1_1GetDefaultPatchBaselineRequest - */ -const se_GetDefaultPatchBaselineRequest = (input: GetDefaultPatchBaselineRequest, context: __SerdeContext): any => { - return { - ...(input.OperatingSystem != null && { OperatingSystem: input.OperatingSystem }), - }; -}; - -/** - * serializeAws_json1_1GetDeployablePatchSnapshotForInstanceRequest - */ -const se_GetDeployablePatchSnapshotForInstanceRequest = ( - input: GetDeployablePatchSnapshotForInstanceRequest, - context: __SerdeContext -): any => { - return { - ...(input.BaselineOverride != null && { BaselineOverride: se_BaselineOverride(input.BaselineOverride, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - }; -}; - -/** - * serializeAws_json1_1GetDocumentRequest - */ -const se_GetDocumentRequest = (input: GetDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentFormat != null && { DocumentFormat: input.DocumentFormat }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1GetInventoryRequest - */ -const se_GetInventoryRequest = (input: GetInventoryRequest, context: __SerdeContext): any => { - return { - ...(input.Aggregators != null && { Aggregators: se_InventoryAggregatorList(input.Aggregators, context) }), - ...(input.Filters != null && { Filters: se_InventoryFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResultAttributes != null && { - ResultAttributes: se_ResultAttributeList(input.ResultAttributes, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetInventorySchemaRequest - */ -const se_GetInventorySchemaRequest = (input: GetInventorySchemaRequest, context: __SerdeContext): any => { - return { - ...(input.Aggregator != null && { Aggregator: input.Aggregator }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SubType != null && { SubType: input.SubType }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; - -/** - * serializeAws_json1_1GetMaintenanceWindowExecutionRequest - */ -const se_GetMaintenanceWindowExecutionRequest = ( - input: GetMaintenanceWindowExecutionRequest, - context: __SerdeContext -): any => { - return { - ...(input.WindowExecutionId != null && { WindowExecutionId: input.WindowExecutionId }), - }; -}; - -/** - * serializeAws_json1_1GetMaintenanceWindowExecutionTaskInvocationRequest - */ -const se_GetMaintenanceWindowExecutionTaskInvocationRequest = ( - input: GetMaintenanceWindowExecutionTaskInvocationRequest, - context: __SerdeContext -): any => { - return { - ...(input.InvocationId != null && { InvocationId: input.InvocationId }), - ...(input.TaskId != null && { TaskId: input.TaskId }), - ...(input.WindowExecutionId != null && { WindowExecutionId: input.WindowExecutionId }), - }; -}; - -/** - * serializeAws_json1_1GetMaintenanceWindowExecutionTaskRequest - */ -const se_GetMaintenanceWindowExecutionTaskRequest = ( - input: GetMaintenanceWindowExecutionTaskRequest, - context: __SerdeContext -): any => { - return { - ...(input.TaskId != null && { TaskId: input.TaskId }), - ...(input.WindowExecutionId != null && { WindowExecutionId: input.WindowExecutionId }), - }; -}; - -/** - * serializeAws_json1_1GetMaintenanceWindowRequest - */ -const se_GetMaintenanceWindowRequest = (input: GetMaintenanceWindowRequest, context: __SerdeContext): any => { - return { - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1GetMaintenanceWindowTaskRequest - */ -const se_GetMaintenanceWindowTaskRequest = (input: GetMaintenanceWindowTaskRequest, context: __SerdeContext): any => { - return { - ...(input.WindowId != null && { WindowId: input.WindowId }), - ...(input.WindowTaskId != null && { WindowTaskId: input.WindowTaskId }), - }; -}; - -/** - * serializeAws_json1_1GetOpsItemRequest - */ -const se_GetOpsItemRequest = (input: GetOpsItemRequest, context: __SerdeContext): any => { - return { - ...(input.OpsItemArn != null && { OpsItemArn: input.OpsItemArn }), - ...(input.OpsItemId != null && { OpsItemId: input.OpsItemId }), - }; -}; - -/** - * serializeAws_json1_1GetOpsMetadataRequest - */ -const se_GetOpsMetadataRequest = (input: GetOpsMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OpsMetadataArn != null && { OpsMetadataArn: input.OpsMetadataArn }), - }; -}; - -/** - * serializeAws_json1_1GetOpsSummaryRequest - */ -const se_GetOpsSummaryRequest = (input: GetOpsSummaryRequest, context: __SerdeContext): any => { - return { - ...(input.Aggregators != null && { Aggregators: se_OpsAggregatorList(input.Aggregators, context) }), - ...(input.Filters != null && { Filters: se_OpsFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResultAttributes != null && { - ResultAttributes: se_OpsResultAttributeList(input.ResultAttributes, context), - }), - ...(input.SyncName != null && { SyncName: input.SyncName }), - }; -}; - -/** - * serializeAws_json1_1GetParameterHistoryRequest - */ -const se_GetParameterHistoryRequest = (input: GetParameterHistoryRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WithDecryption != null && { WithDecryption: input.WithDecryption }), - }; -}; - -/** - * serializeAws_json1_1GetParameterRequest - */ -const se_GetParameterRequest = (input: GetParameterRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.WithDecryption != null && { WithDecryption: input.WithDecryption }), - }; -}; - -/** - * serializeAws_json1_1GetParametersByPathRequest - */ -const se_GetParametersByPathRequest = (input: GetParametersByPathRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ParameterFilters != null && { - ParameterFilters: se_ParameterStringFilterList(input.ParameterFilters, context), - }), - ...(input.Path != null && { Path: input.Path }), - ...(input.Recursive != null && { Recursive: input.Recursive }), - ...(input.WithDecryption != null && { WithDecryption: input.WithDecryption }), - }; -}; - -/** - * serializeAws_json1_1GetParametersRequest - */ -const se_GetParametersRequest = (input: GetParametersRequest, context: __SerdeContext): any => { - return { - ...(input.Names != null && { Names: se_ParameterNameList(input.Names, context) }), - ...(input.WithDecryption != null && { WithDecryption: input.WithDecryption }), - }; -}; - -/** - * serializeAws_json1_1GetPatchBaselineForPatchGroupRequest - */ -const se_GetPatchBaselineForPatchGroupRequest = ( - input: GetPatchBaselineForPatchGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.OperatingSystem != null && { OperatingSystem: input.OperatingSystem }), - ...(input.PatchGroup != null && { PatchGroup: input.PatchGroup }), - }; -}; - -/** - * serializeAws_json1_1GetPatchBaselineRequest - */ -const se_GetPatchBaselineRequest = (input: GetPatchBaselineRequest, context: __SerdeContext): any => { - return { - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - }; -}; - -/** - * serializeAws_json1_1GetResourcePoliciesRequest - */ -const se_GetResourcePoliciesRequest = (input: GetResourcePoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1GetServiceSettingRequest - */ -const se_GetServiceSettingRequest = (input: GetServiceSettingRequest, context: __SerdeContext): any => { - return { - ...(input.SettingId != null && { SettingId: input.SettingId }), - }; -}; - -/** - * serializeAws_json1_1InstanceAssociationOutputLocation - */ -const se_InstanceAssociationOutputLocation = ( - input: InstanceAssociationOutputLocation, - context: __SerdeContext -): any => { - return { - ...(input.S3Location != null && { S3Location: se_S3OutputLocation(input.S3Location, context) }), - }; -}; - -/** - * serializeAws_json1_1InstanceIdList - */ -const se_InstanceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstanceInformationFilter - */ -const se_InstanceInformationFilter = (input: InstanceInformationFilter, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.valueSet != null && { valueSet: se_InstanceInformationFilterValueSet(input.valueSet, context) }), - }; -}; - -/** - * serializeAws_json1_1InstanceInformationFilterList - */ -const se_InstanceInformationFilterList = (input: InstanceInformationFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceInformationFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1InstanceInformationFilterValueSet - */ -const se_InstanceInformationFilterValueSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InstanceInformationStringFilter - */ -const se_InstanceInformationStringFilter = (input: InstanceInformationStringFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_InstanceInformationFilterValueSet(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1InstanceInformationStringFilterList - */ -const se_InstanceInformationStringFilterList = ( - input: InstanceInformationStringFilter[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstanceInformationStringFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1InstancePatchStateFilter - */ -const se_InstancePatchStateFilter = (input: InstancePatchStateFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Values != null && { Values: se_InstancePatchStateFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1InstancePatchStateFilterList - */ -const se_InstancePatchStateFilterList = (input: InstancePatchStateFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InstancePatchStateFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1InstancePatchStateFilterValues - */ -const se_InstancePatchStateFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InventoryAggregator - */ -const se_InventoryAggregator = (input: InventoryAggregator, context: __SerdeContext): any => { - return { - ...(input.Aggregators != null && { Aggregators: se_InventoryAggregatorList(input.Aggregators, context) }), - ...(input.Expression != null && { Expression: input.Expression }), - ...(input.Groups != null && { Groups: se_InventoryGroupList(input.Groups, context) }), - }; -}; - -/** - * serializeAws_json1_1InventoryAggregatorList - */ -const se_InventoryAggregatorList = (input: InventoryAggregator[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InventoryAggregator(entry, context); - }); -}; - -/** - * serializeAws_json1_1InventoryFilter - */ -const se_InventoryFilter = (input: InventoryFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Values != null && { Values: se_InventoryFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1InventoryFilterList - */ -const se_InventoryFilterList = (input: InventoryFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InventoryFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1InventoryFilterValueList - */ -const se_InventoryFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1InventoryGroup - */ -const se_InventoryGroup = (input: InventoryGroup, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_InventoryFilterList(input.Filters, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1InventoryGroupList - */ -const se_InventoryGroupList = (input: InventoryGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InventoryGroup(entry, context); - }); -}; - -/** - * serializeAws_json1_1InventoryItem - */ -const se_InventoryItem = (input: InventoryItem, context: __SerdeContext): any => { - return { - ...(input.CaptureTime != null && { CaptureTime: input.CaptureTime }), - ...(input.Content != null && { Content: se_InventoryItemEntryList(input.Content, context) }), - ...(input.ContentHash != null && { ContentHash: input.ContentHash }), - ...(input.Context != null && { Context: se_InventoryItemContentContext(input.Context, context) }), - ...(input.SchemaVersion != null && { SchemaVersion: input.SchemaVersion }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; - -/** - * serializeAws_json1_1InventoryItemContentContext - */ -const se_InventoryItemContentContext = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1InventoryItemEntry - */ -const se_InventoryItemEntry = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1InventoryItemEntryList - */ -const se_InventoryItemEntryList = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InventoryItemEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_1InventoryItemList - */ -const se_InventoryItemList = (input: InventoryItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_InventoryItem(entry, context); - }); -}; - -/** - * serializeAws_json1_1KeyList - */ -const se_KeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LabelParameterVersionRequest - */ -const se_LabelParameterVersionRequest = (input: LabelParameterVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Labels != null && { Labels: se_ParameterLabelList(input.Labels, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParameterVersion != null && { ParameterVersion: input.ParameterVersion }), - }; -}; - -/** - * serializeAws_json1_1ListAssociationsRequest - */ -const se_ListAssociationsRequest = (input: ListAssociationsRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationFilterList != null && { - AssociationFilterList: se_AssociationFilterList(input.AssociationFilterList, context), - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListAssociationVersionsRequest - */ -const se_ListAssociationVersionsRequest = (input: ListAssociationVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListCommandInvocationsRequest - */ -const se_ListCommandInvocationsRequest = (input: ListCommandInvocationsRequest, context: __SerdeContext): any => { - return { - ...(input.CommandId != null && { CommandId: input.CommandId }), - ...(input.Details != null && { Details: input.Details }), - ...(input.Filters != null && { Filters: se_CommandFilterList(input.Filters, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListCommandsRequest - */ -const se_ListCommandsRequest = (input: ListCommandsRequest, context: __SerdeContext): any => { - return { - ...(input.CommandId != null && { CommandId: input.CommandId }), - ...(input.Filters != null && { Filters: se_CommandFilterList(input.Filters, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListComplianceItemsRequest - */ -const se_ListComplianceItemsRequest = (input: ListComplianceItemsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ComplianceStringFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceIds != null && { ResourceIds: se_ComplianceResourceIdList(input.ResourceIds, context) }), - ...(input.ResourceTypes != null && { ResourceTypes: se_ComplianceResourceTypeList(input.ResourceTypes, context) }), - }; -}; - -/** - * serializeAws_json1_1ListComplianceSummariesRequest - */ -const se_ListComplianceSummariesRequest = (input: ListComplianceSummariesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_ComplianceStringFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDocumentMetadataHistoryRequest - */ -const se_ListDocumentMetadataHistoryRequest = ( - input: ListDocumentMetadataHistoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Metadata != null && { Metadata: input.Metadata }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDocumentsRequest - */ -const se_ListDocumentsRequest = (input: ListDocumentsRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentFilterList != null && { - DocumentFilterList: se_DocumentFilterList(input.DocumentFilterList, context), - }), - ...(input.Filters != null && { Filters: se_DocumentKeyValuesFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListDocumentVersionsRequest - */ -const se_ListDocumentVersionsRequest = (input: ListDocumentVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListInventoryEntriesRequest - */ -const se_ListInventoryEntriesRequest = (input: ListInventoryEntriesRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_InventoryFilterList(input.Filters, context) }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; - -/** - * serializeAws_json1_1ListOpsItemEventsRequest - */ -const se_ListOpsItemEventsRequest = (input: ListOpsItemEventsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_OpsItemEventFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListOpsItemRelatedItemsRequest - */ -const se_ListOpsItemRelatedItemsRequest = (input: ListOpsItemRelatedItemsRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_OpsItemRelatedItemsFilters(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OpsItemId != null && { OpsItemId: input.OpsItemId }), - }; -}; - -/** - * serializeAws_json1_1ListOpsMetadataRequest - */ -const se_ListOpsMetadataRequest = (input: ListOpsMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.Filters != null && { Filters: se_OpsMetadataFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListResourceComplianceSummariesRequest - */ -const se_ListResourceComplianceSummariesRequest = ( - input: ListResourceComplianceSummariesRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filters != null && { Filters: se_ComplianceStringFilterList(input.Filters, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1ListResourceDataSyncRequest - */ -const se_ListResourceDataSyncRequest = (input: ListResourceDataSyncRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.SyncType != null && { SyncType: input.SyncType }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - }; -}; - -/** - * serializeAws_json1_1LoggingInfo - */ -const se_LoggingInfo = (input: LoggingInfo, context: __SerdeContext): any => { - return { - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }), - ...(input.S3Region != null && { S3Region: input.S3Region }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowAutomationParameters - */ -const se_MaintenanceWindowAutomationParameters = ( - input: MaintenanceWindowAutomationParameters, - context: __SerdeContext -): any => { - return { - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Parameters != null && { Parameters: se_AutomationParameterMap(input.Parameters, context) }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowFilter - */ -const se_MaintenanceWindowFilter = (input: MaintenanceWindowFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_MaintenanceWindowFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowFilterList - */ -const se_MaintenanceWindowFilterList = (input: MaintenanceWindowFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MaintenanceWindowFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1MaintenanceWindowFilterValues - */ -const se_MaintenanceWindowFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1MaintenanceWindowLambdaParameters - */ -const se_MaintenanceWindowLambdaParameters = ( - input: MaintenanceWindowLambdaParameters, - context: __SerdeContext -): any => { - return { - ...(input.ClientContext != null && { ClientContext: input.ClientContext }), - ...(input.Payload != null && { Payload: context.base64Encoder(input.Payload) }), - ...(input.Qualifier != null && { Qualifier: input.Qualifier }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowRunCommandParameters - */ -const se_MaintenanceWindowRunCommandParameters = ( - input: MaintenanceWindowRunCommandParameters, - context: __SerdeContext -): any => { - return { - ...(input.CloudWatchOutputConfig != null && { - CloudWatchOutputConfig: se_CloudWatchOutputConfig(input.CloudWatchOutputConfig, context), - }), - ...(input.Comment != null && { Comment: input.Comment }), - ...(input.DocumentHash != null && { DocumentHash: input.DocumentHash }), - ...(input.DocumentHashType != null && { DocumentHashType: input.DocumentHashType }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.NotificationConfig != null && { - NotificationConfig: se_NotificationConfig(input.NotificationConfig, context), - }), - ...(input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName }), - ...(input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix }), - ...(input.Parameters != null && { Parameters: se_Parameters(input.Parameters, context) }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.TimeoutSeconds != null && { TimeoutSeconds: input.TimeoutSeconds }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowStepFunctionsParameters - */ -const se_MaintenanceWindowStepFunctionsParameters = ( - input: MaintenanceWindowStepFunctionsParameters, - context: __SerdeContext -): any => { - return { - ...(input.Input != null && { Input: input.Input }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowTaskInvocationParameters - */ -const se_MaintenanceWindowTaskInvocationParameters = ( - input: MaintenanceWindowTaskInvocationParameters, - context: __SerdeContext -): any => { - return { - ...(input.Automation != null && { - Automation: se_MaintenanceWindowAutomationParameters(input.Automation, context), - }), - ...(input.Lambda != null && { Lambda: se_MaintenanceWindowLambdaParameters(input.Lambda, context) }), - ...(input.RunCommand != null && { - RunCommand: se_MaintenanceWindowRunCommandParameters(input.RunCommand, context), - }), - ...(input.StepFunctions != null && { - StepFunctions: se_MaintenanceWindowStepFunctionsParameters(input.StepFunctions, context), - }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowTaskParameters - */ -const se_MaintenanceWindowTaskParameters = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MaintenanceWindowTaskParameterValueExpression(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1MaintenanceWindowTaskParameterValueExpression - */ -const se_MaintenanceWindowTaskParameterValueExpression = ( - input: MaintenanceWindowTaskParameterValueExpression, - context: __SerdeContext -): any => { - return { - ...(input.Values != null && { Values: se_MaintenanceWindowTaskParameterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1MaintenanceWindowTaskParameterValueList - */ -const se_MaintenanceWindowTaskParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1MetadataKeysToDeleteList - */ -const se_MetadataKeysToDeleteList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1MetadataMap - */ -const se_MetadataMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MetadataValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1MetadataValue - */ -const se_MetadataValue = (input: MetadataValue, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1ModifyDocumentPermissionRequest - */ -const se_ModifyDocumentPermissionRequest = (input: ModifyDocumentPermissionRequest, context: __SerdeContext): any => { - return { - ...(input.AccountIdsToAdd != null && { AccountIdsToAdd: se_AccountIdList(input.AccountIdsToAdd, context) }), - ...(input.AccountIdsToRemove != null && { - AccountIdsToRemove: se_AccountIdList(input.AccountIdsToRemove, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.PermissionType != null && { PermissionType: input.PermissionType }), - ...(input.SharedDocumentVersion != null && { SharedDocumentVersion: input.SharedDocumentVersion }), - }; -}; - -/** - * serializeAws_json1_1NotificationConfig - */ -const se_NotificationConfig = (input: NotificationConfig, context: __SerdeContext): any => { - return { - ...(input.NotificationArn != null && { NotificationArn: input.NotificationArn }), - ...(input.NotificationEvents != null && { - NotificationEvents: se_NotificationEventList(input.NotificationEvents, context), - }), - ...(input.NotificationType != null && { NotificationType: input.NotificationType }), - }; -}; - -/** - * serializeAws_json1_1NotificationEventList - */ -const se_NotificationEventList = (input: (NotificationEvent | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsAggregator - */ -const se_OpsAggregator = (input: OpsAggregator, context: __SerdeContext): any => { - return { - ...(input.AggregatorType != null && { AggregatorType: input.AggregatorType }), - ...(input.Aggregators != null && { Aggregators: se_OpsAggregatorList(input.Aggregators, context) }), - ...(input.AttributeName != null && { AttributeName: input.AttributeName }), - ...(input.Filters != null && { Filters: se_OpsFilterList(input.Filters, context) }), - ...(input.TypeName != null && { TypeName: input.TypeName }), - ...(input.Values != null && { Values: se_OpsAggregatorValueMap(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1OpsAggregatorList - */ -const se_OpsAggregatorList = (input: OpsAggregator[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsAggregator(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsAggregatorValueMap - */ -const se_OpsAggregatorValueMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1OpsFilter - */ -const se_OpsFilter = (input: OpsFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Values != null && { Values: se_OpsFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1OpsFilterList - */ -const se_OpsFilterList = (input: OpsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsFilterValueList - */ -const se_OpsFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsItemDataValue - */ -const se_OpsItemDataValue = (input: OpsItemDataValue, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1OpsItemEventFilter - */ -const se_OpsItemEventFilter = (input: OpsItemEventFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_OpsItemEventFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1OpsItemEventFilters - */ -const se_OpsItemEventFilters = (input: OpsItemEventFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsItemEventFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsItemEventFilterValues - */ -const se_OpsItemEventFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsItemFilter - */ -const se_OpsItemFilter = (input: OpsItemFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_OpsItemFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1OpsItemFilters - */ -const se_OpsItemFilters = (input: OpsItemFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsItemFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsItemFilterValues - */ -const se_OpsItemFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsItemNotification - */ -const se_OpsItemNotification = (input: OpsItemNotification, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - }; -}; - -/** - * serializeAws_json1_1OpsItemNotifications - */ -const se_OpsItemNotifications = (input: OpsItemNotification[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsItemNotification(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsItemOperationalData - */ -const se_OpsItemOperationalData = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_OpsItemDataValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1OpsItemOpsDataKeysList - */ -const se_OpsItemOpsDataKeysList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsItemRelatedItemsFilter - */ -const se_OpsItemRelatedItemsFilter = (input: OpsItemRelatedItemsFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Operator != null && { Operator: input.Operator }), - ...(input.Values != null && { Values: se_OpsItemRelatedItemsFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1OpsItemRelatedItemsFilters - */ -const se_OpsItemRelatedItemsFilters = (input: OpsItemRelatedItemsFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsItemRelatedItemsFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsItemRelatedItemsFilterValues - */ -const se_OpsItemRelatedItemsFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsMetadataFilter - */ -const se_OpsMetadataFilter = (input: OpsMetadataFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_OpsMetadataFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1OpsMetadataFilterList - */ -const se_OpsMetadataFilterList = (input: OpsMetadataFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsMetadataFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1OpsMetadataFilterValueList - */ -const se_OpsMetadataFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1OpsResultAttribute - */ -const se_OpsResultAttribute = (input: OpsResultAttribute, context: __SerdeContext): any => { - return { - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; - -/** - * serializeAws_json1_1OpsResultAttributeList - */ -const se_OpsResultAttributeList = (input: OpsResultAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_OpsResultAttribute(entry, context); - }); -}; - -/** - * serializeAws_json1_1ParameterLabelList - */ -const se_ParameterLabelList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ParameterNameList - */ -const se_ParameterNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Parameters - */ -const se_Parameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ParameterValueList(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1ParametersFilter - */ -const se_ParametersFilter = (input: ParametersFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_ParametersFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1ParametersFilterList - */ -const se_ParametersFilterList = (input: ParametersFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParametersFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ParametersFilterValueList - */ -const se_ParametersFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ParameterStringFilter - */ -const se_ParameterStringFilter = (input: ParameterStringFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Option != null && { Option: input.Option }), - ...(input.Values != null && { Values: se_ParameterStringFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1ParameterStringFilterList - */ -const se_ParameterStringFilterList = (input: ParameterStringFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ParameterStringFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ParameterStringFilterValueList - */ -const se_ParameterStringFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ParameterValueList - */ -const se_ParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PatchFilter - */ -const se_PatchFilter = (input: PatchFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_PatchFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1PatchFilterGroup - */ -const se_PatchFilterGroup = (input: PatchFilterGroup, context: __SerdeContext): any => { - return { - ...(input.PatchFilters != null && { PatchFilters: se_PatchFilterList(input.PatchFilters, context) }), - }; -}; - -/** - * serializeAws_json1_1PatchFilterList - */ -const se_PatchFilterList = (input: PatchFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PatchFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1PatchFilterValueList - */ -const se_PatchFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PatchIdList - */ -const se_PatchIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PatchOrchestratorFilter - */ -const se_PatchOrchestratorFilter = (input: PatchOrchestratorFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_PatchOrchestratorFilterValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1PatchOrchestratorFilterList - */ -const se_PatchOrchestratorFilterList = (input: PatchOrchestratorFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PatchOrchestratorFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1PatchOrchestratorFilterValues - */ -const se_PatchOrchestratorFilterValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PatchRule - */ -const se_PatchRule = (input: PatchRule, context: __SerdeContext): any => { - return { - ...(input.ApproveAfterDays != null && { ApproveAfterDays: input.ApproveAfterDays }), - ...(input.ApproveUntilDate != null && { ApproveUntilDate: input.ApproveUntilDate }), - ...(input.ComplianceLevel != null && { ComplianceLevel: input.ComplianceLevel }), - ...(input.EnableNonSecurity != null && { EnableNonSecurity: input.EnableNonSecurity }), - ...(input.PatchFilterGroup != null && { PatchFilterGroup: se_PatchFilterGroup(input.PatchFilterGroup, context) }), - }; -}; - -/** - * serializeAws_json1_1PatchRuleGroup - */ -const se_PatchRuleGroup = (input: PatchRuleGroup, context: __SerdeContext): any => { - return { - ...(input.PatchRules != null && { PatchRules: se_PatchRuleList(input.PatchRules, context) }), - }; -}; - -/** - * serializeAws_json1_1PatchRuleList - */ -const se_PatchRuleList = (input: PatchRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PatchRule(entry, context); - }); -}; - -/** - * serializeAws_json1_1PatchSource - */ -const se_PatchSource = (input: PatchSource, context: __SerdeContext): any => { - return { - ...(input.Configuration != null && { Configuration: input.Configuration }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Products != null && { Products: se_PatchSourceProductList(input.Products, context) }), - }; -}; - -/** - * serializeAws_json1_1PatchSourceList - */ -const se_PatchSourceList = (input: PatchSource[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_PatchSource(entry, context); - }); -}; - -/** - * serializeAws_json1_1PatchSourceProductList - */ -const se_PatchSourceProductList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1PutComplianceItemsRequest - */ -const se_PutComplianceItemsRequest = (input: PutComplianceItemsRequest, context: __SerdeContext): any => { - return { - ...(input.ComplianceType != null && { ComplianceType: input.ComplianceType }), - ...(input.ExecutionSummary != null && { - ExecutionSummary: se_ComplianceExecutionSummary(input.ExecutionSummary, context), - }), - ...(input.ItemContentHash != null && { ItemContentHash: input.ItemContentHash }), - ...(input.Items != null && { Items: se_ComplianceItemEntryList(input.Items, context) }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.UploadType != null && { UploadType: input.UploadType }), - }; -}; - -/** - * serializeAws_json1_1PutInventoryRequest - */ -const se_PutInventoryRequest = (input: PutInventoryRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Items != null && { Items: se_InventoryItemList(input.Items, context) }), - }; -}; - -/** - * serializeAws_json1_1PutParameterRequest - */ -const se_PutParameterRequest = (input: PutParameterRequest, context: __SerdeContext): any => { - return { - ...(input.AllowedPattern != null && { AllowedPattern: input.AllowedPattern }), - ...(input.DataType != null && { DataType: input.DataType }), - ...(input.Description != null && { Description: input.Description }), - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Overwrite != null && { Overwrite: input.Overwrite }), - ...(input.Policies != null && { Policies: input.Policies }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Tier != null && { Tier: input.Tier }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1PutResourcePolicyRequest - */ -const se_PutResourcePolicyRequest = (input: PutResourcePolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.PolicyHash != null && { PolicyHash: input.PolicyHash }), - ...(input.PolicyId != null && { PolicyId: input.PolicyId }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1Regions - */ -const se_Regions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RegisterDefaultPatchBaselineRequest - */ -const se_RegisterDefaultPatchBaselineRequest = ( - input: RegisterDefaultPatchBaselineRequest, - context: __SerdeContext -): any => { - return { - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - }; -}; - -/** - * serializeAws_json1_1RegisterPatchBaselineForPatchGroupRequest - */ -const se_RegisterPatchBaselineForPatchGroupRequest = ( - input: RegisterPatchBaselineForPatchGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - ...(input.PatchGroup != null && { PatchGroup: input.PatchGroup }), - }; -}; - -/** - * serializeAws_json1_1RegisterTargetWithMaintenanceWindowRequest - */ -const se_RegisterTargetWithMaintenanceWindowRequest = ( - input: RegisterTargetWithMaintenanceWindowRequest, - context: __SerdeContext -): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OwnerInformation != null && { OwnerInformation: input.OwnerInformation }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1RegisterTaskWithMaintenanceWindowRequest - */ -const se_RegisterTaskWithMaintenanceWindowRequest = ( - input: RegisterTaskWithMaintenanceWindowRequest, - context: __SerdeContext -): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.CutoffBehavior != null && { CutoffBehavior: input.CutoffBehavior }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LoggingInfo != null && { LoggingInfo: se_LoggingInfo(input.LoggingInfo, context) }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - ...(input.TaskInvocationParameters != null && { - TaskInvocationParameters: se_MaintenanceWindowTaskInvocationParameters(input.TaskInvocationParameters, context), - }), - ...(input.TaskParameters != null && { - TaskParameters: se_MaintenanceWindowTaskParameters(input.TaskParameters, context), - }), - ...(input.TaskType != null && { TaskType: input.TaskType }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1RegistrationMetadataItem - */ -const se_RegistrationMetadataItem = (input: RegistrationMetadataItem, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1RegistrationMetadataList - */ -const se_RegistrationMetadataList = (input: RegistrationMetadataItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegistrationMetadataItem(entry, context); - }); -}; - -/** - * serializeAws_json1_1RelatedOpsItem - */ -const se_RelatedOpsItem = (input: RelatedOpsItem, context: __SerdeContext): any => { - return { - ...(input.OpsItemId != null && { OpsItemId: input.OpsItemId }), - }; -}; - -/** - * serializeAws_json1_1RelatedOpsItems - */ -const se_RelatedOpsItems = (input: RelatedOpsItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RelatedOpsItem(entry, context); - }); -}; - -/** - * serializeAws_json1_1RemoveTagsFromResourceRequest - */ -const se_RemoveTagsFromResourceRequest = (input: RemoveTagsFromResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.TagKeys != null && { TagKeys: se_KeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1ResetServiceSettingRequest - */ -const se_ResetServiceSettingRequest = (input: ResetServiceSettingRequest, context: __SerdeContext): any => { - return { - ...(input.SettingId != null && { SettingId: input.SettingId }), - }; -}; - -/** - * serializeAws_json1_1ResourceDataSyncAwsOrganizationsSource - */ -const se_ResourceDataSyncAwsOrganizationsSource = ( - input: ResourceDataSyncAwsOrganizationsSource, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationSourceType != null && { OrganizationSourceType: input.OrganizationSourceType }), - ...(input.OrganizationalUnits != null && { - OrganizationalUnits: se_ResourceDataSyncOrganizationalUnitList(input.OrganizationalUnits, context), - }), - }; -}; - -/** - * serializeAws_json1_1ResourceDataSyncDestinationDataSharing - */ -const se_ResourceDataSyncDestinationDataSharing = ( - input: ResourceDataSyncDestinationDataSharing, - context: __SerdeContext -): any => { - return { - ...(input.DestinationDataSharingType != null && { DestinationDataSharingType: input.DestinationDataSharingType }), - }; -}; - -/** - * serializeAws_json1_1ResourceDataSyncOrganizationalUnit - */ -const se_ResourceDataSyncOrganizationalUnit = ( - input: ResourceDataSyncOrganizationalUnit, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationalUnitId != null && { OrganizationalUnitId: input.OrganizationalUnitId }), - }; -}; - -/** - * serializeAws_json1_1ResourceDataSyncOrganizationalUnitList - */ -const se_ResourceDataSyncOrganizationalUnitList = ( - input: ResourceDataSyncOrganizationalUnit[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceDataSyncOrganizationalUnit(entry, context); - }); -}; - -/** - * serializeAws_json1_1ResourceDataSyncS3Destination - */ -const se_ResourceDataSyncS3Destination = (input: ResourceDataSyncS3Destination, context: __SerdeContext): any => { - return { - ...(input.AWSKMSKeyARN != null && { AWSKMSKeyARN: input.AWSKMSKeyARN }), - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.DestinationDataSharing != null && { - DestinationDataSharing: se_ResourceDataSyncDestinationDataSharing(input.DestinationDataSharing, context), - }), - ...(input.Prefix != null && { Prefix: input.Prefix }), - ...(input.Region != null && { Region: input.Region }), - ...(input.SyncFormat != null && { SyncFormat: input.SyncFormat }), - }; -}; - -/** - * serializeAws_json1_1ResourceDataSyncSource - */ -const se_ResourceDataSyncSource = (input: ResourceDataSyncSource, context: __SerdeContext): any => { - return { - ...(input.AwsOrganizationsSource != null && { - AwsOrganizationsSource: se_ResourceDataSyncAwsOrganizationsSource(input.AwsOrganizationsSource, context), - }), - ...(input.EnableAllOpsDataSources != null && { EnableAllOpsDataSources: input.EnableAllOpsDataSources }), - ...(input.IncludeFutureRegions != null && { IncludeFutureRegions: input.IncludeFutureRegions }), - ...(input.SourceRegions != null && { - SourceRegions: se_ResourceDataSyncSourceRegionList(input.SourceRegions, context), - }), - ...(input.SourceType != null && { SourceType: input.SourceType }), - }; -}; - -/** - * serializeAws_json1_1ResourceDataSyncSourceRegionList - */ -const se_ResourceDataSyncSourceRegionList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResultAttribute - */ -const se_ResultAttribute = (input: ResultAttribute, context: __SerdeContext): any => { - return { - ...(input.TypeName != null && { TypeName: input.TypeName }), - }; -}; - -/** - * serializeAws_json1_1ResultAttributeList - */ -const se_ResultAttributeList = (input: ResultAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResultAttribute(entry, context); - }); -}; - -/** - * serializeAws_json1_1ResumeSessionRequest - */ -const se_ResumeSessionRequest = (input: ResumeSessionRequest, context: __SerdeContext): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1Runbook - */ -const se_Runbook = (input: Runbook, context: __SerdeContext): any => { - return { - ...(input.DocumentName != null && { DocumentName: input.DocumentName }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Parameters != null && { Parameters: se_AutomationParameterMap(input.Parameters, context) }), - ...(input.TargetLocations != null && { TargetLocations: se_TargetLocations(input.TargetLocations, context) }), - ...(input.TargetMaps != null && { TargetMaps: se_TargetMaps(input.TargetMaps, context) }), - ...(input.TargetParameterName != null && { TargetParameterName: input.TargetParameterName }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1Runbooks - */ -const se_Runbooks = (input: Runbook[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Runbook(entry, context); - }); -}; - -/** - * serializeAws_json1_1S3OutputLocation - */ -const se_S3OutputLocation = (input: S3OutputLocation, context: __SerdeContext): any => { - return { - ...(input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName }), - ...(input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix }), - ...(input.OutputS3Region != null && { OutputS3Region: input.OutputS3Region }), - }; -}; - -/** - * serializeAws_json1_1SendAutomationSignalRequest - */ -const se_SendAutomationSignalRequest = (input: SendAutomationSignalRequest, context: __SerdeContext): any => { - return { - ...(input.AutomationExecutionId != null && { AutomationExecutionId: input.AutomationExecutionId }), - ...(input.Payload != null && { Payload: se_AutomationParameterMap(input.Payload, context) }), - ...(input.SignalType != null && { SignalType: input.SignalType }), - }; -}; - -/** - * serializeAws_json1_1SendCommandRequest - */ -const se_SendCommandRequest = (input: SendCommandRequest, context: __SerdeContext): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ...(input.CloudWatchOutputConfig != null && { - CloudWatchOutputConfig: se_CloudWatchOutputConfig(input.CloudWatchOutputConfig, context), - }), - ...(input.Comment != null && { Comment: input.Comment }), - ...(input.DocumentHash != null && { DocumentHash: input.DocumentHash }), - ...(input.DocumentHashType != null && { DocumentHashType: input.DocumentHashType }), - ...(input.DocumentName != null && { DocumentName: input.DocumentName }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.InstanceIds != null && { InstanceIds: se_InstanceIdList(input.InstanceIds, context) }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.NotificationConfig != null && { - NotificationConfig: se_NotificationConfig(input.NotificationConfig, context), - }), - ...(input.OutputS3BucketName != null && { OutputS3BucketName: input.OutputS3BucketName }), - ...(input.OutputS3KeyPrefix != null && { OutputS3KeyPrefix: input.OutputS3KeyPrefix }), - ...(input.OutputS3Region != null && { OutputS3Region: input.OutputS3Region }), - ...(input.Parameters != null && { Parameters: se_Parameters(input.Parameters, context) }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - ...(input.TimeoutSeconds != null && { TimeoutSeconds: input.TimeoutSeconds }), - }; -}; - -/** - * serializeAws_json1_1SessionFilter - */ -const se_SessionFilter = (input: SessionFilter, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; - -/** - * serializeAws_json1_1SessionFilterList - */ -const se_SessionFilterList = (input: SessionFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SessionFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1SessionManagerParameters - */ -const se_SessionManagerParameters = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SessionManagerParameterValueList(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1SessionManagerParameterValueList - */ -const se_SessionManagerParameterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StartAssociationsOnceRequest - */ -const se_StartAssociationsOnceRequest = (input: StartAssociationsOnceRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationIds != null && { AssociationIds: se_AssociationIdList(input.AssociationIds, context) }), - }; -}; - -/** - * serializeAws_json1_1StartAutomationExecutionRequest - */ -const se_StartAutomationExecutionRequest = (input: StartAutomationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DocumentName != null && { DocumentName: input.DocumentName }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Mode != null && { Mode: input.Mode }), - ...(input.Parameters != null && { Parameters: se_AutomationParameterMap(input.Parameters, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetLocations != null && { TargetLocations: se_TargetLocations(input.TargetLocations, context) }), - ...(input.TargetMaps != null && { TargetMaps: se_TargetMaps(input.TargetMaps, context) }), - ...(input.TargetParameterName != null && { TargetParameterName: input.TargetParameterName }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1StartChangeRequestExecutionRequest - */ -const se_StartChangeRequestExecutionRequest = ( - input: StartChangeRequestExecutionRequest, - context: __SerdeContext -): any => { - return { - ...(input.AutoApprove != null && { AutoApprove: input.AutoApprove }), - ...(input.ChangeDetails != null && { ChangeDetails: input.ChangeDetails }), - ...(input.ChangeRequestName != null && { ChangeRequestName: input.ChangeRequestName }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DocumentName != null && { DocumentName: input.DocumentName }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Parameters != null && { Parameters: se_AutomationParameterMap(input.Parameters, context) }), - ...(input.Runbooks != null && { Runbooks: se_Runbooks(input.Runbooks, context) }), - ...(input.ScheduledEndTime != null && { ScheduledEndTime: Math.round(input.ScheduledEndTime.getTime() / 1000) }), - ...(input.ScheduledTime != null && { ScheduledTime: Math.round(input.ScheduledTime.getTime() / 1000) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1StartSessionRequest - */ -const se_StartSessionRequest = (input: StartSessionRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentName != null && { DocumentName: input.DocumentName }), - ...(input.Parameters != null && { Parameters: se_SessionManagerParameters(input.Parameters, context) }), - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.Target != null && { Target: input.Target }), - }; -}; - -/** - * serializeAws_json1_1StepExecutionFilter - */ -const se_StepExecutionFilter = (input: StepExecutionFilter, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_StepExecutionFilterValueList(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1StepExecutionFilterList - */ -const se_StepExecutionFilterList = (input: StepExecutionFilter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StepExecutionFilter(entry, context); - }); -}; - -/** - * serializeAws_json1_1StepExecutionFilterValueList - */ -const se_StepExecutionFilterValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1StopAutomationExecutionRequest - */ -const se_StopAutomationExecutionRequest = (input: StopAutomationExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.AutomationExecutionId != null && { AutomationExecutionId: input.AutomationExecutionId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Values != null && { Values: se_TargetValues(input.Values, context) }), - }; -}; - -/** - * serializeAws_json1_1TargetLocation - */ -const se_TargetLocation = (input: TargetLocation, context: __SerdeContext): any => { - return { - ...(input.Accounts != null && { Accounts: se_Accounts(input.Accounts, context) }), - ...(input.ExecutionRoleName != null && { ExecutionRoleName: input.ExecutionRoleName }), - ...(input.Regions != null && { Regions: se_Regions(input.Regions, context) }), - ...(input.TargetLocationAlarmConfiguration != null && { - TargetLocationAlarmConfiguration: se_AlarmConfiguration(input.TargetLocationAlarmConfiguration, context), - }), - ...(input.TargetLocationMaxConcurrency != null && { - TargetLocationMaxConcurrency: input.TargetLocationMaxConcurrency, - }), - ...(input.TargetLocationMaxErrors != null && { TargetLocationMaxErrors: input.TargetLocationMaxErrors }), - }; -}; - -/** - * serializeAws_json1_1TargetLocations - */ -const se_TargetLocations = (input: TargetLocation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetLocation(entry, context); - }); -}; - -/** - * serializeAws_json1_1TargetMap - */ -const se_TargetMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_TargetMapValueList(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1TargetMaps - */ -const se_TargetMaps = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TargetMap(entry, context); - }); -}; - -/** - * serializeAws_json1_1TargetMapValueList - */ -const se_TargetMapValueList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Targets - */ -const se_Targets = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; - -/** - * serializeAws_json1_1TargetValues - */ -const se_TargetValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TerminateSessionRequest - */ -const se_TerminateSessionRequest = (input: TerminateSessionRequest, context: __SerdeContext): any => { - return { - ...(input.SessionId != null && { SessionId: input.SessionId }), - }; -}; - -/** - * serializeAws_json1_1UnlabelParameterVersionRequest - */ -const se_UnlabelParameterVersionRequest = (input: UnlabelParameterVersionRequest, context: __SerdeContext): any => { - return { - ...(input.Labels != null && { Labels: se_ParameterLabelList(input.Labels, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParameterVersion != null && { ParameterVersion: input.ParameterVersion }), - }; -}; - -/** - * serializeAws_json1_1UpdateAssociationRequest - */ -const se_UpdateAssociationRequest = (input: UpdateAssociationRequest, context: __SerdeContext): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ...(input.ApplyOnlyAtCronInterval != null && { ApplyOnlyAtCronInterval: input.ApplyOnlyAtCronInterval }), - ...(input.AssociationId != null && { AssociationId: input.AssociationId }), - ...(input.AssociationName != null && { AssociationName: input.AssociationName }), - ...(input.AssociationVersion != null && { AssociationVersion: input.AssociationVersion }), - ...(input.AutomationTargetParameterName != null && { - AutomationTargetParameterName: input.AutomationTargetParameterName, - }), - ...(input.CalendarNames != null && { CalendarNames: se_CalendarNameOrARNList(input.CalendarNames, context) }), - ...(input.ComplianceSeverity != null && { ComplianceSeverity: input.ComplianceSeverity }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OutputLocation != null && { - OutputLocation: se_InstanceAssociationOutputLocation(input.OutputLocation, context), - }), - ...(input.Parameters != null && { Parameters: se_Parameters(input.Parameters, context) }), - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }), - ...(input.SyncCompliance != null && { SyncCompliance: input.SyncCompliance }), - ...(input.TargetLocations != null && { TargetLocations: se_TargetLocations(input.TargetLocations, context) }), - ...(input.TargetMaps != null && { TargetMaps: se_TargetMaps(input.TargetMaps, context) }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAssociationStatusRequest - */ -const se_UpdateAssociationStatusRequest = (input: UpdateAssociationStatusRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationStatus != null && { - AssociationStatus: se_AssociationStatus(input.AssociationStatus, context), - }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateDocumentDefaultVersionRequest - */ -const se_UpdateDocumentDefaultVersionRequest = ( - input: UpdateDocumentDefaultVersionRequest, - context: __SerdeContext -): any => { - return { - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateDocumentMetadataRequest - */ -const se_UpdateDocumentMetadataRequest = (input: UpdateDocumentMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentReviews != null && { DocumentReviews: se_DocumentReviews(input.DocumentReviews, context) }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1UpdateDocumentRequest - */ -const se_UpdateDocumentRequest = (input: UpdateDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.Attachments != null && { Attachments: se_AttachmentsSourceList(input.Attachments, context) }), - ...(input.Content != null && { Content: input.Content }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DocumentFormat != null && { DocumentFormat: input.DocumentFormat }), - ...(input.DocumentVersion != null && { DocumentVersion: input.DocumentVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1UpdateMaintenanceWindowRequest - */ -const se_UpdateMaintenanceWindowRequest = (input: UpdateMaintenanceWindowRequest, context: __SerdeContext): any => { - return { - ...(input.AllowUnassociatedTargets != null && { AllowUnassociatedTargets: input.AllowUnassociatedTargets }), - ...(input.Cutoff != null && { Cutoff: input.Cutoff }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Duration != null && { Duration: input.Duration }), - ...(input.Enabled != null && { Enabled: input.Enabled }), - ...(input.EndDate != null && { EndDate: input.EndDate }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Replace != null && { Replace: input.Replace }), - ...(input.Schedule != null && { Schedule: input.Schedule }), - ...(input.ScheduleOffset != null && { ScheduleOffset: input.ScheduleOffset }), - ...(input.ScheduleTimezone != null && { ScheduleTimezone: input.ScheduleTimezone }), - ...(input.StartDate != null && { StartDate: input.StartDate }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - }; -}; - -/** - * serializeAws_json1_1UpdateMaintenanceWindowTargetRequest - */ -const se_UpdateMaintenanceWindowTargetRequest = ( - input: UpdateMaintenanceWindowTargetRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OwnerInformation != null && { OwnerInformation: input.OwnerInformation }), - ...(input.Replace != null && { Replace: input.Replace }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - ...(input.WindowTargetId != null && { WindowTargetId: input.WindowTargetId }), - }; -}; - -/** - * serializeAws_json1_1UpdateMaintenanceWindowTaskRequest - */ -const se_UpdateMaintenanceWindowTaskRequest = ( - input: UpdateMaintenanceWindowTaskRequest, - context: __SerdeContext -): any => { - return { - ...(input.AlarmConfiguration != null && { - AlarmConfiguration: se_AlarmConfiguration(input.AlarmConfiguration, context), - }), - ...(input.CutoffBehavior != null && { CutoffBehavior: input.CutoffBehavior }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LoggingInfo != null && { LoggingInfo: se_LoggingInfo(input.LoggingInfo, context) }), - ...(input.MaxConcurrency != null && { MaxConcurrency: input.MaxConcurrency }), - ...(input.MaxErrors != null && { MaxErrors: input.MaxErrors }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Replace != null && { Replace: input.Replace }), - ...(input.ServiceRoleArn != null && { ServiceRoleArn: input.ServiceRoleArn }), - ...(input.Targets != null && { Targets: se_Targets(input.Targets, context) }), - ...(input.TaskArn != null && { TaskArn: input.TaskArn }), - ...(input.TaskInvocationParameters != null && { - TaskInvocationParameters: se_MaintenanceWindowTaskInvocationParameters(input.TaskInvocationParameters, context), - }), - ...(input.TaskParameters != null && { - TaskParameters: se_MaintenanceWindowTaskParameters(input.TaskParameters, context), - }), - ...(input.WindowId != null && { WindowId: input.WindowId }), - ...(input.WindowTaskId != null && { WindowTaskId: input.WindowTaskId }), - }; -}; - -/** - * serializeAws_json1_1UpdateManagedInstanceRoleRequest - */ -const se_UpdateManagedInstanceRoleRequest = (input: UpdateManagedInstanceRoleRequest, context: __SerdeContext): any => { - return { - ...(input.IamRole != null && { IamRole: input.IamRole }), - ...(input.InstanceId != null && { InstanceId: input.InstanceId }), - }; -}; - -/** - * serializeAws_json1_1UpdateOpsItemRequest - */ -const se_UpdateOpsItemRequest = (input: UpdateOpsItemRequest, context: __SerdeContext): any => { - return { - ...(input.ActualEndTime != null && { ActualEndTime: Math.round(input.ActualEndTime.getTime() / 1000) }), - ...(input.ActualStartTime != null && { ActualStartTime: Math.round(input.ActualStartTime.getTime() / 1000) }), - ...(input.Category != null && { Category: input.Category }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Notifications != null && { Notifications: se_OpsItemNotifications(input.Notifications, context) }), - ...(input.OperationalData != null && { - OperationalData: se_OpsItemOperationalData(input.OperationalData, context), - }), - ...(input.OperationalDataToDelete != null && { - OperationalDataToDelete: se_OpsItemOpsDataKeysList(input.OperationalDataToDelete, context), - }), - ...(input.OpsItemArn != null && { OpsItemArn: input.OpsItemArn }), - ...(input.OpsItemId != null && { OpsItemId: input.OpsItemId }), - ...(input.PlannedEndTime != null && { PlannedEndTime: Math.round(input.PlannedEndTime.getTime() / 1000) }), - ...(input.PlannedStartTime != null && { PlannedStartTime: Math.round(input.PlannedStartTime.getTime() / 1000) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RelatedOpsItems != null && { RelatedOpsItems: se_RelatedOpsItems(input.RelatedOpsItems, context) }), - ...(input.Severity != null && { Severity: input.Severity }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Title != null && { Title: input.Title }), - }; -}; - -/** - * serializeAws_json1_1UpdateOpsMetadataRequest - */ -const se_UpdateOpsMetadataRequest = (input: UpdateOpsMetadataRequest, context: __SerdeContext): any => { - return { - ...(input.KeysToDelete != null && { KeysToDelete: se_MetadataKeysToDeleteList(input.KeysToDelete, context) }), - ...(input.MetadataToUpdate != null && { MetadataToUpdate: se_MetadataMap(input.MetadataToUpdate, context) }), - ...(input.OpsMetadataArn != null && { OpsMetadataArn: input.OpsMetadataArn }), - }; -}; - -/** - * serializeAws_json1_1UpdatePatchBaselineRequest - */ -const se_UpdatePatchBaselineRequest = (input: UpdatePatchBaselineRequest, context: __SerdeContext): any => { - return { - ...(input.ApprovalRules != null && { ApprovalRules: se_PatchRuleGroup(input.ApprovalRules, context) }), - ...(input.ApprovedPatches != null && { ApprovedPatches: se_PatchIdList(input.ApprovedPatches, context) }), - ...(input.ApprovedPatchesComplianceLevel != null && { - ApprovedPatchesComplianceLevel: input.ApprovedPatchesComplianceLevel, - }), - ...(input.ApprovedPatchesEnableNonSecurity != null && { - ApprovedPatchesEnableNonSecurity: input.ApprovedPatchesEnableNonSecurity, - }), - ...(input.BaselineId != null && { BaselineId: input.BaselineId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.GlobalFilters != null && { GlobalFilters: se_PatchFilterGroup(input.GlobalFilters, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RejectedPatches != null && { RejectedPatches: se_PatchIdList(input.RejectedPatches, context) }), - ...(input.RejectedPatchesAction != null && { RejectedPatchesAction: input.RejectedPatchesAction }), - ...(input.Replace != null && { Replace: input.Replace }), - ...(input.Sources != null && { Sources: se_PatchSourceList(input.Sources, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateResourceDataSyncRequest - */ -const se_UpdateResourceDataSyncRequest = (input: UpdateResourceDataSyncRequest, context: __SerdeContext): any => { - return { - ...(input.SyncName != null && { SyncName: input.SyncName }), - ...(input.SyncSource != null && { SyncSource: se_ResourceDataSyncSource(input.SyncSource, context) }), - ...(input.SyncType != null && { SyncType: input.SyncType }), - }; -}; - -/** - * serializeAws_json1_1UpdateServiceSettingRequest - */ -const se_UpdateServiceSettingRequest = (input: UpdateServiceSettingRequest, context: __SerdeContext): any => { - return { - ...(input.SettingId != null && { SettingId: input.SettingId }), - ...(input.SettingValue != null && { SettingValue: input.SettingValue }), - }; -}; - -/** - * deserializeAws_json1_1AccountIdList - */ -const de_AccountIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Accounts - */ -const de_Accounts = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AccountSharingInfo - */ -const de_AccountSharingInfo = (output: any, context: __SerdeContext): AccountSharingInfo => { - return { - AccountId: __expectString(output.AccountId), - SharedDocumentVersion: __expectString(output.SharedDocumentVersion), - } as any; -}; - -/** - * deserializeAws_json1_1AccountSharingInfoList - */ -const de_AccountSharingInfoList = (output: any, context: __SerdeContext): AccountSharingInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountSharingInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Activation - */ -const de_Activation = (output: any, context: __SerdeContext): Activation => { - return { - ActivationId: __expectString(output.ActivationId), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DefaultInstanceName: __expectString(output.DefaultInstanceName), - Description: __expectString(output.Description), - ExpirationDate: - output.ExpirationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationDate))) - : undefined, - Expired: __expectBoolean(output.Expired), - IamRole: __expectString(output.IamRole), - RegistrationLimit: __expectInt32(output.RegistrationLimit), - RegistrationsCount: __expectInt32(output.RegistrationsCount), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ActivationList - */ -const de_ActivationList = (output: any, context: __SerdeContext): Activation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Activation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AddTagsToResourceResult - */ -const de_AddTagsToResourceResult = (output: any, context: __SerdeContext): AddTagsToResourceResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1Alarm - */ -const de_Alarm = (output: any, context: __SerdeContext): Alarm => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AlarmConfiguration - */ -const de_AlarmConfiguration = (output: any, context: __SerdeContext): AlarmConfiguration => { - return { - Alarms: output.Alarms != null ? de_AlarmList(output.Alarms, context) : undefined, - IgnorePollAlarmFailure: __expectBoolean(output.IgnorePollAlarmFailure), - } as any; -}; - -/** - * deserializeAws_json1_1AlarmList - */ -const de_AlarmList = (output: any, context: __SerdeContext): Alarm[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Alarm(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlarmStateInformation - */ -const de_AlarmStateInformation = (output: any, context: __SerdeContext): AlarmStateInformation => { - return { - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1AlarmStateInformationList - */ -const de_AlarmStateInformationList = (output: any, context: __SerdeContext): AlarmStateInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AlarmStateInformation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AlreadyExistsException - */ -const de_AlreadyExistsException = (output: any, context: __SerdeContext): AlreadyExistsException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AssociatedInstances - */ -const de_AssociatedInstances = (output: any, context: __SerdeContext): AssociatedInstances => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateOpsItemRelatedItemResponse - */ -const de_AssociateOpsItemRelatedItemResponse = ( - output: any, - context: __SerdeContext -): AssociateOpsItemRelatedItemResponse => { - return { - AssociationId: __expectString(output.AssociationId), - } as any; -}; - -/** - * deserializeAws_json1_1Association - */ -const de_Association = (output: any, context: __SerdeContext): Association => { - return { - AssociationId: __expectString(output.AssociationId), - AssociationName: __expectString(output.AssociationName), - AssociationVersion: __expectString(output.AssociationVersion), - DocumentVersion: __expectString(output.DocumentVersion), - InstanceId: __expectString(output.InstanceId), - LastExecutionDate: - output.LastExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastExecutionDate))) - : undefined, - Name: __expectString(output.Name), - Overview: output.Overview != null ? de_AssociationOverview(output.Overview, context) : undefined, - ScheduleExpression: __expectString(output.ScheduleExpression), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociationAlreadyExists - */ -const de_AssociationAlreadyExists = (output: any, context: __SerdeContext): AssociationAlreadyExists => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociationDescription - */ -const de_AssociationDescription = (output: any, context: __SerdeContext): AssociationDescription => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - ApplyOnlyAtCronInterval: __expectBoolean(output.ApplyOnlyAtCronInterval), - AssociationId: __expectString(output.AssociationId), - AssociationName: __expectString(output.AssociationName), - AssociationVersion: __expectString(output.AssociationVersion), - AutomationTargetParameterName: __expectString(output.AutomationTargetParameterName), - CalendarNames: output.CalendarNames != null ? de_CalendarNameOrARNList(output.CalendarNames, context) : undefined, - ComplianceSeverity: __expectString(output.ComplianceSeverity), - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - DocumentVersion: __expectString(output.DocumentVersion), - InstanceId: __expectString(output.InstanceId), - LastExecutionDate: - output.LastExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastExecutionDate))) - : undefined, - LastSuccessfulExecutionDate: - output.LastSuccessfulExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulExecutionDate))) - : undefined, - LastUpdateAssociationDate: - output.LastUpdateAssociationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateAssociationDate))) - : undefined, - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Name: __expectString(output.Name), - OutputLocation: - output.OutputLocation != null ? de_InstanceAssociationOutputLocation(output.OutputLocation, context) : undefined, - Overview: output.Overview != null ? de_AssociationOverview(output.Overview, context) : undefined, - Parameters: output.Parameters != null ? de_Parameters(output.Parameters, context) : undefined, - ScheduleExpression: __expectString(output.ScheduleExpression), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - Status: output.Status != null ? de_AssociationStatus(output.Status, context) : undefined, - SyncCompliance: __expectString(output.SyncCompliance), - TargetLocations: output.TargetLocations != null ? de_TargetLocations(output.TargetLocations, context) : undefined, - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociationDescriptionList - */ -const de_AssociationDescriptionList = (output: any, context: __SerdeContext): AssociationDescription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociationDescription(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociationDoesNotExist - */ -const de_AssociationDoesNotExist = (output: any, context: __SerdeContext): AssociationDoesNotExist => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationExecution - */ -const de_AssociationExecution = (output: any, context: __SerdeContext): AssociationExecution => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - AssociationId: __expectString(output.AssociationId), - AssociationVersion: __expectString(output.AssociationVersion), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DetailedStatus: __expectString(output.DetailedStatus), - ExecutionId: __expectString(output.ExecutionId), - LastExecutionDate: - output.LastExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastExecutionDate))) - : undefined, - ResourceCountByStatus: __expectString(output.ResourceCountByStatus), - Status: __expectString(output.Status), - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociationExecutionDoesNotExist - */ -const de_AssociationExecutionDoesNotExist = ( - output: any, - context: __SerdeContext -): AssociationExecutionDoesNotExist => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationExecutionsList - */ -const de_AssociationExecutionsList = (output: any, context: __SerdeContext): AssociationExecution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociationExecution(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociationExecutionTarget - */ -const de_AssociationExecutionTarget = (output: any, context: __SerdeContext): AssociationExecutionTarget => { - return { - AssociationId: __expectString(output.AssociationId), - AssociationVersion: __expectString(output.AssociationVersion), - DetailedStatus: __expectString(output.DetailedStatus), - ExecutionId: __expectString(output.ExecutionId), - LastExecutionDate: - output.LastExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastExecutionDate))) - : undefined, - OutputSource: output.OutputSource != null ? de_OutputSource(output.OutputSource, context) : undefined, - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationExecutionTargetsList - */ -const de_AssociationExecutionTargetsList = (output: any, context: __SerdeContext): AssociationExecutionTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociationExecutionTarget(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociationLimitExceeded - */ -const de_AssociationLimitExceeded = (output: any, context: __SerdeContext): AssociationLimitExceeded => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociationList - */ -const de_AssociationList = (output: any, context: __SerdeContext): Association[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Association(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociationOverview - */ -const de_AssociationOverview = (output: any, context: __SerdeContext): AssociationOverview => { - return { - AssociationStatusAggregatedCount: - output.AssociationStatusAggregatedCount != null - ? de_AssociationStatusAggregatedCount(output.AssociationStatusAggregatedCount, context) - : undefined, - DetailedStatus: __expectString(output.DetailedStatus), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationStatus - */ -const de_AssociationStatus = (output: any, context: __SerdeContext): AssociationStatus => { - return { - AdditionalInfo: __expectString(output.AdditionalInfo), - Date: output.Date != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Date))) : undefined, - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationStatusAggregatedCount - */ -const de_AssociationStatusAggregatedCount = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1AssociationVersionInfo - */ -const de_AssociationVersionInfo = (output: any, context: __SerdeContext): AssociationVersionInfo => { - return { - ApplyOnlyAtCronInterval: __expectBoolean(output.ApplyOnlyAtCronInterval), - AssociationId: __expectString(output.AssociationId), - AssociationName: __expectString(output.AssociationName), - AssociationVersion: __expectString(output.AssociationVersion), - CalendarNames: output.CalendarNames != null ? de_CalendarNameOrARNList(output.CalendarNames, context) : undefined, - ComplianceSeverity: __expectString(output.ComplianceSeverity), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DocumentVersion: __expectString(output.DocumentVersion), - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Name: __expectString(output.Name), - OutputLocation: - output.OutputLocation != null ? de_InstanceAssociationOutputLocation(output.OutputLocation, context) : undefined, - Parameters: output.Parameters != null ? de_Parameters(output.Parameters, context) : undefined, - ScheduleExpression: __expectString(output.ScheduleExpression), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - SyncCompliance: __expectString(output.SyncCompliance), - TargetLocations: output.TargetLocations != null ? de_TargetLocations(output.TargetLocations, context) : undefined, - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociationVersionLimitExceeded - */ -const de_AssociationVersionLimitExceeded = (output: any, context: __SerdeContext): AssociationVersionLimitExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AssociationVersionList - */ -const de_AssociationVersionList = (output: any, context: __SerdeContext): AssociationVersionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssociationVersionInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttachmentContent - */ -const de_AttachmentContent = (output: any, context: __SerdeContext): AttachmentContent => { - return { - Hash: __expectString(output.Hash), - HashType: __expectString(output.HashType), - Name: __expectString(output.Name), - Size: __expectLong(output.Size), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1AttachmentContentList - */ -const de_AttachmentContentList = (output: any, context: __SerdeContext): AttachmentContent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttachmentContent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AttachmentInformation - */ -const de_AttachmentInformation = (output: any, context: __SerdeContext): AttachmentInformation => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1AttachmentInformationList - */ -const de_AttachmentInformationList = (output: any, context: __SerdeContext): AttachmentInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttachmentInformation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutomationDefinitionNotApprovedException - */ -const de_AutomationDefinitionNotApprovedException = ( - output: any, - context: __SerdeContext -): AutomationDefinitionNotApprovedException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AutomationDefinitionNotFoundException - */ -const de_AutomationDefinitionNotFoundException = ( - output: any, - context: __SerdeContext -): AutomationDefinitionNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AutomationDefinitionVersionNotFoundException - */ -const de_AutomationDefinitionVersionNotFoundException = ( - output: any, - context: __SerdeContext -): AutomationDefinitionVersionNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AutomationExecution - */ -const de_AutomationExecution = (output: any, context: __SerdeContext): AutomationExecution => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - AssociationId: __expectString(output.AssociationId), - AutomationExecutionId: __expectString(output.AutomationExecutionId), - AutomationExecutionStatus: __expectString(output.AutomationExecutionStatus), - AutomationSubtype: __expectString(output.AutomationSubtype), - ChangeRequestName: __expectString(output.ChangeRequestName), - CurrentAction: __expectString(output.CurrentAction), - CurrentStepName: __expectString(output.CurrentStepName), - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - ExecutedBy: __expectString(output.ExecutedBy), - ExecutionEndTime: - output.ExecutionEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionEndTime))) - : undefined, - ExecutionStartTime: - output.ExecutionStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionStartTime))) - : undefined, - FailureMessage: __expectString(output.FailureMessage), - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Mode: __expectString(output.Mode), - OpsItemId: __expectString(output.OpsItemId), - Outputs: output.Outputs != null ? de_AutomationParameterMap(output.Outputs, context) : undefined, - Parameters: output.Parameters != null ? de_AutomationParameterMap(output.Parameters, context) : undefined, - ParentAutomationExecutionId: __expectString(output.ParentAutomationExecutionId), - ProgressCounters: - output.ProgressCounters != null ? de_ProgressCounters(output.ProgressCounters, context) : undefined, - ResolvedTargets: output.ResolvedTargets != null ? de_ResolvedTargets(output.ResolvedTargets, context) : undefined, - Runbooks: output.Runbooks != null ? de_Runbooks(output.Runbooks, context) : undefined, - ScheduledTime: - output.ScheduledTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTime))) - : undefined, - StepExecutions: output.StepExecutions != null ? de_StepExecutionList(output.StepExecutions, context) : undefined, - StepExecutionsTruncated: __expectBoolean(output.StepExecutionsTruncated), - Target: __expectString(output.Target), - TargetLocations: output.TargetLocations != null ? de_TargetLocations(output.TargetLocations, context) : undefined, - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - TargetParameterName: __expectString(output.TargetParameterName), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutomationExecutionLimitExceededException - */ -const de_AutomationExecutionLimitExceededException = ( - output: any, - context: __SerdeContext -): AutomationExecutionLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AutomationExecutionMetadata - */ -const de_AutomationExecutionMetadata = (output: any, context: __SerdeContext): AutomationExecutionMetadata => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - AssociationId: __expectString(output.AssociationId), - AutomationExecutionId: __expectString(output.AutomationExecutionId), - AutomationExecutionStatus: __expectString(output.AutomationExecutionStatus), - AutomationSubtype: __expectString(output.AutomationSubtype), - AutomationType: __expectString(output.AutomationType), - ChangeRequestName: __expectString(output.ChangeRequestName), - CurrentAction: __expectString(output.CurrentAction), - CurrentStepName: __expectString(output.CurrentStepName), - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - ExecutedBy: __expectString(output.ExecutedBy), - ExecutionEndTime: - output.ExecutionEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionEndTime))) - : undefined, - ExecutionStartTime: - output.ExecutionStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionStartTime))) - : undefined, - FailureMessage: __expectString(output.FailureMessage), - LogFile: __expectString(output.LogFile), - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Mode: __expectString(output.Mode), - OpsItemId: __expectString(output.OpsItemId), - Outputs: output.Outputs != null ? de_AutomationParameterMap(output.Outputs, context) : undefined, - ParentAutomationExecutionId: __expectString(output.ParentAutomationExecutionId), - ResolvedTargets: output.ResolvedTargets != null ? de_ResolvedTargets(output.ResolvedTargets, context) : undefined, - Runbooks: output.Runbooks != null ? de_Runbooks(output.Runbooks, context) : undefined, - ScheduledTime: - output.ScheduledTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ScheduledTime))) - : undefined, - Target: __expectString(output.Target), - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - TargetParameterName: __expectString(output.TargetParameterName), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AutomationExecutionMetadataList - */ -const de_AutomationExecutionMetadataList = (output: any, context: __SerdeContext): AutomationExecutionMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutomationExecutionMetadata(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutomationExecutionNotFoundException - */ -const de_AutomationExecutionNotFoundException = ( - output: any, - context: __SerdeContext -): AutomationExecutionNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1AutomationParameterMap - */ -const de_AutomationParameterMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_AutomationParameterValueList(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1AutomationParameterValueList - */ -const de_AutomationParameterValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AutomationStepNotFoundException - */ -const de_AutomationStepNotFoundException = (output: any, context: __SerdeContext): AutomationStepNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CalendarNameOrARNList - */ -const de_CalendarNameOrARNList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelCommandResult - */ -const de_CancelCommandResult = (output: any, context: __SerdeContext): CancelCommandResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CancelMaintenanceWindowExecutionResult - */ -const de_CancelMaintenanceWindowExecutionResult = ( - output: any, - context: __SerdeContext -): CancelMaintenanceWindowExecutionResult => { - return { - WindowExecutionId: __expectString(output.WindowExecutionId), - } as any; -}; - -/** - * deserializeAws_json1_1CategoryEnumList - */ -const de_CategoryEnumList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CategoryList - */ -const de_CategoryList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CloudWatchOutputConfig - */ -const de_CloudWatchOutputConfig = (output: any, context: __SerdeContext): CloudWatchOutputConfig => { - return { - CloudWatchLogGroupName: __expectString(output.CloudWatchLogGroupName), - CloudWatchOutputEnabled: __expectBoolean(output.CloudWatchOutputEnabled), - } as any; -}; - -/** - * deserializeAws_json1_1Command - */ -const de_Command = (output: any, context: __SerdeContext): Command => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - CloudWatchOutputConfig: - output.CloudWatchOutputConfig != null - ? de_CloudWatchOutputConfig(output.CloudWatchOutputConfig, context) - : undefined, - CommandId: __expectString(output.CommandId), - Comment: __expectString(output.Comment), - CompletedCount: __expectInt32(output.CompletedCount), - DeliveryTimedOutCount: __expectInt32(output.DeliveryTimedOutCount), - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - ErrorCount: __expectInt32(output.ErrorCount), - ExpiresAfter: - output.ExpiresAfter != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiresAfter))) - : undefined, - InstanceIds: output.InstanceIds != null ? de_InstanceIdList(output.InstanceIds, context) : undefined, - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - NotificationConfig: - output.NotificationConfig != null ? de_NotificationConfig(output.NotificationConfig, context) : undefined, - OutputS3BucketName: __expectString(output.OutputS3BucketName), - OutputS3KeyPrefix: __expectString(output.OutputS3KeyPrefix), - OutputS3Region: __expectString(output.OutputS3Region), - Parameters: output.Parameters != null ? de_Parameters(output.Parameters, context) : undefined, - RequestedDateTime: - output.RequestedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedDateTime))) - : undefined, - ServiceRole: __expectString(output.ServiceRole), - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TargetCount: __expectInt32(output.TargetCount), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TimeoutSeconds: __expectInt32(output.TimeoutSeconds), - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CommandInvocation - */ -const de_CommandInvocation = (output: any, context: __SerdeContext): CommandInvocation => { - return { - CloudWatchOutputConfig: - output.CloudWatchOutputConfig != null - ? de_CloudWatchOutputConfig(output.CloudWatchOutputConfig, context) - : undefined, - CommandId: __expectString(output.CommandId), - CommandPlugins: output.CommandPlugins != null ? de_CommandPluginList(output.CommandPlugins, context) : undefined, - Comment: __expectString(output.Comment), - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - InstanceId: __expectString(output.InstanceId), - InstanceName: __expectString(output.InstanceName), - NotificationConfig: - output.NotificationConfig != null ? de_NotificationConfig(output.NotificationConfig, context) : undefined, - RequestedDateTime: - output.RequestedDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RequestedDateTime))) - : undefined, - ServiceRole: __expectString(output.ServiceRole), - StandardErrorUrl: __expectString(output.StandardErrorUrl), - StandardOutputUrl: __expectString(output.StandardOutputUrl), - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TraceOutput: __expectString(output.TraceOutput), - } as any; -}; - -/** - * deserializeAws_json1_1CommandInvocationList - */ -const de_CommandInvocationList = (output: any, context: __SerdeContext): CommandInvocation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CommandInvocation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CommandList - */ -const de_CommandList = (output: any, context: __SerdeContext): Command[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Command(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CommandPlugin - */ -const de_CommandPlugin = (output: any, context: __SerdeContext): CommandPlugin => { - return { - Name: __expectString(output.Name), - Output: __expectString(output.Output), - OutputS3BucketName: __expectString(output.OutputS3BucketName), - OutputS3KeyPrefix: __expectString(output.OutputS3KeyPrefix), - OutputS3Region: __expectString(output.OutputS3Region), - ResponseCode: __expectInt32(output.ResponseCode), - ResponseFinishDateTime: - output.ResponseFinishDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResponseFinishDateTime))) - : undefined, - ResponseStartDateTime: - output.ResponseStartDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResponseStartDateTime))) - : undefined, - StandardErrorUrl: __expectString(output.StandardErrorUrl), - StandardOutputUrl: __expectString(output.StandardOutputUrl), - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - } as any; -}; - -/** - * deserializeAws_json1_1CommandPluginList - */ -const de_CommandPluginList = (output: any, context: __SerdeContext): CommandPlugin[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CommandPlugin(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceExecutionSummary - */ -const de_ComplianceExecutionSummary = (output: any, context: __SerdeContext): ComplianceExecutionSummary => { - return { - ExecutionId: __expectString(output.ExecutionId), - ExecutionTime: - output.ExecutionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionTime))) - : undefined, - ExecutionType: __expectString(output.ExecutionType), - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceItem - */ -const de_ComplianceItem = (output: any, context: __SerdeContext): ComplianceItem => { - return { - ComplianceType: __expectString(output.ComplianceType), - Details: output.Details != null ? de_ComplianceItemDetails(output.Details, context) : undefined, - ExecutionSummary: - output.ExecutionSummary != null ? de_ComplianceExecutionSummary(output.ExecutionSummary, context) : undefined, - Id: __expectString(output.Id), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - Severity: __expectString(output.Severity), - Status: __expectString(output.Status), - Title: __expectString(output.Title), - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceItemDetails - */ -const de_ComplianceItemDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1ComplianceItemList - */ -const de_ComplianceItemList = (output: any, context: __SerdeContext): ComplianceItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComplianceItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceSummaryItem - */ -const de_ComplianceSummaryItem = (output: any, context: __SerdeContext): ComplianceSummaryItem => { - return { - ComplianceType: __expectString(output.ComplianceType), - CompliantSummary: - output.CompliantSummary != null ? de_CompliantSummary(output.CompliantSummary, context) : undefined, - NonCompliantSummary: - output.NonCompliantSummary != null ? de_NonCompliantSummary(output.NonCompliantSummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ComplianceSummaryItemList - */ -const de_ComplianceSummaryItemList = (output: any, context: __SerdeContext): ComplianceSummaryItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ComplianceSummaryItem(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ComplianceTypeCountLimitExceededException - */ -const de_ComplianceTypeCountLimitExceededException = ( - output: any, - context: __SerdeContext -): ComplianceTypeCountLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1CompliantSummary - */ -const de_CompliantSummary = (output: any, context: __SerdeContext): CompliantSummary => { - return { - CompliantCount: __expectInt32(output.CompliantCount), - SeveritySummary: output.SeveritySummary != null ? de_SeveritySummary(output.SeveritySummary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateActivationResult - */ -const de_CreateActivationResult = (output: any, context: __SerdeContext): CreateActivationResult => { - return { - ActivationCode: __expectString(output.ActivationCode), - ActivationId: __expectString(output.ActivationId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateAssociationBatchRequestEntry - */ -const de_CreateAssociationBatchRequestEntry = ( - output: any, - context: __SerdeContext -): CreateAssociationBatchRequestEntry => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - ApplyOnlyAtCronInterval: __expectBoolean(output.ApplyOnlyAtCronInterval), - AssociationName: __expectString(output.AssociationName), - AutomationTargetParameterName: __expectString(output.AutomationTargetParameterName), - CalendarNames: output.CalendarNames != null ? de_CalendarNameOrARNList(output.CalendarNames, context) : undefined, - ComplianceSeverity: __expectString(output.ComplianceSeverity), - DocumentVersion: __expectString(output.DocumentVersion), - InstanceId: __expectString(output.InstanceId), - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Name: __expectString(output.Name), - OutputLocation: - output.OutputLocation != null ? de_InstanceAssociationOutputLocation(output.OutputLocation, context) : undefined, - Parameters: output.Parameters != null ? de_Parameters(output.Parameters, context) : undefined, - ScheduleExpression: __expectString(output.ScheduleExpression), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - SyncCompliance: __expectString(output.SyncCompliance), - TargetLocations: output.TargetLocations != null ? de_TargetLocations(output.TargetLocations, context) : undefined, - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateAssociationBatchResult - */ -const de_CreateAssociationBatchResult = (output: any, context: __SerdeContext): CreateAssociationBatchResult => { - return { - Failed: output.Failed != null ? de_FailedCreateAssociationList(output.Failed, context) : undefined, - Successful: output.Successful != null ? de_AssociationDescriptionList(output.Successful, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateAssociationResult - */ -const de_CreateAssociationResult = (output: any, context: __SerdeContext): CreateAssociationResult => { - return { - AssociationDescription: - output.AssociationDescription != null - ? de_AssociationDescription(output.AssociationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateDocumentResult - */ -const de_CreateDocumentResult = (output: any, context: __SerdeContext): CreateDocumentResult => { - return { - DocumentDescription: - output.DocumentDescription != null ? de_DocumentDescription(output.DocumentDescription, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateMaintenanceWindowResult - */ -const de_CreateMaintenanceWindowResult = (output: any, context: __SerdeContext): CreateMaintenanceWindowResult => { - return { - WindowId: __expectString(output.WindowId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateOpsItemResponse - */ -const de_CreateOpsItemResponse = (output: any, context: __SerdeContext): CreateOpsItemResponse => { - return { - OpsItemArn: __expectString(output.OpsItemArn), - OpsItemId: __expectString(output.OpsItemId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateOpsMetadataResult - */ -const de_CreateOpsMetadataResult = (output: any, context: __SerdeContext): CreateOpsMetadataResult => { - return { - OpsMetadataArn: __expectString(output.OpsMetadataArn), - } as any; -}; - -/** - * deserializeAws_json1_1CreatePatchBaselineResult - */ -const de_CreatePatchBaselineResult = (output: any, context: __SerdeContext): CreatePatchBaselineResult => { - return { - BaselineId: __expectString(output.BaselineId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateResourceDataSyncResult - */ -const de_CreateResourceDataSyncResult = (output: any, context: __SerdeContext): CreateResourceDataSyncResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CustomSchemaCountLimitExceededException - */ -const de_CustomSchemaCountLimitExceededException = ( - output: any, - context: __SerdeContext -): CustomSchemaCountLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteActivationResult - */ -const de_DeleteActivationResult = (output: any, context: __SerdeContext): DeleteActivationResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteAssociationResult - */ -const de_DeleteAssociationResult = (output: any, context: __SerdeContext): DeleteAssociationResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteDocumentResult - */ -const de_DeleteDocumentResult = (output: any, context: __SerdeContext): DeleteDocumentResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteInventoryResult - */ -const de_DeleteInventoryResult = (output: any, context: __SerdeContext): DeleteInventoryResult => { - return { - DeletionId: __expectString(output.DeletionId), - DeletionSummary: - output.DeletionSummary != null ? de_InventoryDeletionSummary(output.DeletionSummary, context) : undefined, - TypeName: __expectString(output.TypeName), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteMaintenanceWindowResult - */ -const de_DeleteMaintenanceWindowResult = (output: any, context: __SerdeContext): DeleteMaintenanceWindowResult => { - return { - WindowId: __expectString(output.WindowId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteOpsMetadataResult - */ -const de_DeleteOpsMetadataResult = (output: any, context: __SerdeContext): DeleteOpsMetadataResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteParameterResult - */ -const de_DeleteParameterResult = (output: any, context: __SerdeContext): DeleteParameterResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteParametersResult - */ -const de_DeleteParametersResult = (output: any, context: __SerdeContext): DeleteParametersResult => { - return { - DeletedParameters: - output.DeletedParameters != null ? de_ParameterNameList(output.DeletedParameters, context) : undefined, - InvalidParameters: - output.InvalidParameters != null ? de_ParameterNameList(output.InvalidParameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeletePatchBaselineResult - */ -const de_DeletePatchBaselineResult = (output: any, context: __SerdeContext): DeletePatchBaselineResult => { - return { - BaselineId: __expectString(output.BaselineId), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteResourceDataSyncResult - */ -const de_DeleteResourceDataSyncResult = (output: any, context: __SerdeContext): DeleteResourceDataSyncResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteResourcePolicyResponse - */ -const de_DeleteResourcePolicyResponse = (output: any, context: __SerdeContext): DeleteResourcePolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeregisterManagedInstanceResult - */ -const de_DeregisterManagedInstanceResult = (output: any, context: __SerdeContext): DeregisterManagedInstanceResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeregisterPatchBaselineForPatchGroupResult - */ -const de_DeregisterPatchBaselineForPatchGroupResult = ( - output: any, - context: __SerdeContext -): DeregisterPatchBaselineForPatchGroupResult => { - return { - BaselineId: __expectString(output.BaselineId), - PatchGroup: __expectString(output.PatchGroup), - } as any; -}; - -/** - * deserializeAws_json1_1DeregisterTargetFromMaintenanceWindowResult - */ -const de_DeregisterTargetFromMaintenanceWindowResult = ( - output: any, - context: __SerdeContext -): DeregisterTargetFromMaintenanceWindowResult => { - return { - WindowId: __expectString(output.WindowId), - WindowTargetId: __expectString(output.WindowTargetId), - } as any; -}; - -/** - * deserializeAws_json1_1DeregisterTaskFromMaintenanceWindowResult - */ -const de_DeregisterTaskFromMaintenanceWindowResult = ( - output: any, - context: __SerdeContext -): DeregisterTaskFromMaintenanceWindowResult => { - return { - WindowId: __expectString(output.WindowId), - WindowTaskId: __expectString(output.WindowTaskId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeActivationsResult - */ -const de_DescribeActivationsResult = (output: any, context: __SerdeContext): DescribeActivationsResult => { - return { - ActivationList: output.ActivationList != null ? de_ActivationList(output.ActivationList, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAssociationExecutionsResult - */ -const de_DescribeAssociationExecutionsResult = ( - output: any, - context: __SerdeContext -): DescribeAssociationExecutionsResult => { - return { - AssociationExecutions: - output.AssociationExecutions != null - ? de_AssociationExecutionsList(output.AssociationExecutions, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAssociationExecutionTargetsResult - */ -const de_DescribeAssociationExecutionTargetsResult = ( - output: any, - context: __SerdeContext -): DescribeAssociationExecutionTargetsResult => { - return { - AssociationExecutionTargets: - output.AssociationExecutionTargets != null - ? de_AssociationExecutionTargetsList(output.AssociationExecutionTargets, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAssociationResult - */ -const de_DescribeAssociationResult = (output: any, context: __SerdeContext): DescribeAssociationResult => { - return { - AssociationDescription: - output.AssociationDescription != null - ? de_AssociationDescription(output.AssociationDescription, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAutomationExecutionsResult - */ -const de_DescribeAutomationExecutionsResult = ( - output: any, - context: __SerdeContext -): DescribeAutomationExecutionsResult => { - return { - AutomationExecutionMetadataList: - output.AutomationExecutionMetadataList != null - ? de_AutomationExecutionMetadataList(output.AutomationExecutionMetadataList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAutomationStepExecutionsResult - */ -const de_DescribeAutomationStepExecutionsResult = ( - output: any, - context: __SerdeContext -): DescribeAutomationStepExecutionsResult => { - return { - NextToken: __expectString(output.NextToken), - StepExecutions: output.StepExecutions != null ? de_StepExecutionList(output.StepExecutions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAvailablePatchesResult - */ -const de_DescribeAvailablePatchesResult = (output: any, context: __SerdeContext): DescribeAvailablePatchesResult => { - return { - NextToken: __expectString(output.NextToken), - Patches: output.Patches != null ? de_PatchList(output.Patches, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDocumentPermissionResponse - */ -const de_DescribeDocumentPermissionResponse = ( - output: any, - context: __SerdeContext -): DescribeDocumentPermissionResponse => { - return { - AccountIds: output.AccountIds != null ? de_AccountIdList(output.AccountIds, context) : undefined, - AccountSharingInfoList: - output.AccountSharingInfoList != null - ? de_AccountSharingInfoList(output.AccountSharingInfoList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeDocumentResult - */ -const de_DescribeDocumentResult = (output: any, context: __SerdeContext): DescribeDocumentResult => { - return { - Document: output.Document != null ? de_DocumentDescription(output.Document, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEffectiveInstanceAssociationsResult - */ -const de_DescribeEffectiveInstanceAssociationsResult = ( - output: any, - context: __SerdeContext -): DescribeEffectiveInstanceAssociationsResult => { - return { - Associations: output.Associations != null ? de_InstanceAssociationList(output.Associations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeEffectivePatchesForPatchBaselineResult - */ -const de_DescribeEffectivePatchesForPatchBaselineResult = ( - output: any, - context: __SerdeContext -): DescribeEffectivePatchesForPatchBaselineResult => { - return { - EffectivePatches: - output.EffectivePatches != null ? de_EffectivePatchList(output.EffectivePatches, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInstanceAssociationsStatusResult - */ -const de_DescribeInstanceAssociationsStatusResult = ( - output: any, - context: __SerdeContext -): DescribeInstanceAssociationsStatusResult => { - return { - InstanceAssociationStatusInfos: - output.InstanceAssociationStatusInfos != null - ? de_InstanceAssociationStatusInfos(output.InstanceAssociationStatusInfos, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInstanceInformationResult - */ -const de_DescribeInstanceInformationResult = ( - output: any, - context: __SerdeContext -): DescribeInstanceInformationResult => { - return { - InstanceInformationList: - output.InstanceInformationList != null - ? de_InstanceInformationList(output.InstanceInformationList, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInstancePatchesResult - */ -const de_DescribeInstancePatchesResult = (output: any, context: __SerdeContext): DescribeInstancePatchesResult => { - return { - NextToken: __expectString(output.NextToken), - Patches: output.Patches != null ? de_PatchComplianceDataList(output.Patches, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInstancePatchStatesForPatchGroupResult - */ -const de_DescribeInstancePatchStatesForPatchGroupResult = ( - output: any, - context: __SerdeContext -): DescribeInstancePatchStatesForPatchGroupResult => { - return { - InstancePatchStates: - output.InstancePatchStates != null ? de_InstancePatchStatesList(output.InstancePatchStates, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInstancePatchStatesResult - */ -const de_DescribeInstancePatchStatesResult = ( - output: any, - context: __SerdeContext -): DescribeInstancePatchStatesResult => { - return { - InstancePatchStates: - output.InstancePatchStates != null ? de_InstancePatchStateList(output.InstancePatchStates, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeInventoryDeletionsResult - */ -const de_DescribeInventoryDeletionsResult = ( - output: any, - context: __SerdeContext -): DescribeInventoryDeletionsResult => { - return { - InventoryDeletions: - output.InventoryDeletions != null ? de_InventoryDeletionsList(output.InventoryDeletions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowExecutionsResult - */ -const de_DescribeMaintenanceWindowExecutionsResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowExecutionsResult => { - return { - NextToken: __expectString(output.NextToken), - WindowExecutions: - output.WindowExecutions != null ? de_MaintenanceWindowExecutionList(output.WindowExecutions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowExecutionTaskInvocationsResult - */ -const de_DescribeMaintenanceWindowExecutionTaskInvocationsResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowExecutionTaskInvocationsResult => { - return { - NextToken: __expectString(output.NextToken), - WindowExecutionTaskInvocationIdentities: - output.WindowExecutionTaskInvocationIdentities != null - ? de_MaintenanceWindowExecutionTaskInvocationIdentityList( - output.WindowExecutionTaskInvocationIdentities, - context - ) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowExecutionTasksResult - */ -const de_DescribeMaintenanceWindowExecutionTasksResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowExecutionTasksResult => { - return { - NextToken: __expectString(output.NextToken), - WindowExecutionTaskIdentities: - output.WindowExecutionTaskIdentities != null - ? de_MaintenanceWindowExecutionTaskIdentityList(output.WindowExecutionTaskIdentities, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowScheduleResult - */ -const de_DescribeMaintenanceWindowScheduleResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowScheduleResult => { - return { - NextToken: __expectString(output.NextToken), - ScheduledWindowExecutions: - output.ScheduledWindowExecutions != null - ? de_ScheduledWindowExecutionList(output.ScheduledWindowExecutions, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowsForTargetResult - */ -const de_DescribeMaintenanceWindowsForTargetResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowsForTargetResult => { - return { - NextToken: __expectString(output.NextToken), - WindowIdentities: - output.WindowIdentities != null - ? de_MaintenanceWindowsForTargetList(output.WindowIdentities, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowsResult - */ -const de_DescribeMaintenanceWindowsResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowsResult => { - return { - NextToken: __expectString(output.NextToken), - WindowIdentities: - output.WindowIdentities != null ? de_MaintenanceWindowIdentityList(output.WindowIdentities, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowTargetsResult - */ -const de_DescribeMaintenanceWindowTargetsResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowTargetsResult => { - return { - NextToken: __expectString(output.NextToken), - Targets: output.Targets != null ? de_MaintenanceWindowTargetList(output.Targets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceWindowTasksResult - */ -const de_DescribeMaintenanceWindowTasksResult = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceWindowTasksResult => { - return { - NextToken: __expectString(output.NextToken), - Tasks: output.Tasks != null ? de_MaintenanceWindowTaskList(output.Tasks, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeOpsItemsResponse - */ -const de_DescribeOpsItemsResponse = (output: any, context: __SerdeContext): DescribeOpsItemsResponse => { - return { - NextToken: __expectString(output.NextToken), - OpsItemSummaries: - output.OpsItemSummaries != null ? de_OpsItemSummaries(output.OpsItemSummaries, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeParametersResult - */ -const de_DescribeParametersResult = (output: any, context: __SerdeContext): DescribeParametersResult => { - return { - NextToken: __expectString(output.NextToken), - Parameters: output.Parameters != null ? de_ParameterMetadataList(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribePatchBaselinesResult - */ -const de_DescribePatchBaselinesResult = (output: any, context: __SerdeContext): DescribePatchBaselinesResult => { - return { - BaselineIdentities: - output.BaselineIdentities != null ? de_PatchBaselineIdentityList(output.BaselineIdentities, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePatchGroupsResult - */ -const de_DescribePatchGroupsResult = (output: any, context: __SerdeContext): DescribePatchGroupsResult => { - return { - Mappings: output.Mappings != null ? de_PatchGroupPatchBaselineMappingList(output.Mappings, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePatchGroupStateResult - */ -const de_DescribePatchGroupStateResult = (output: any, context: __SerdeContext): DescribePatchGroupStateResult => { - return { - Instances: __expectInt32(output.Instances), - InstancesWithCriticalNonCompliantPatches: __expectInt32(output.InstancesWithCriticalNonCompliantPatches), - InstancesWithFailedPatches: __expectInt32(output.InstancesWithFailedPatches), - InstancesWithInstalledOtherPatches: __expectInt32(output.InstancesWithInstalledOtherPatches), - InstancesWithInstalledPatches: __expectInt32(output.InstancesWithInstalledPatches), - InstancesWithInstalledPendingRebootPatches: __expectInt32(output.InstancesWithInstalledPendingRebootPatches), - InstancesWithInstalledRejectedPatches: __expectInt32(output.InstancesWithInstalledRejectedPatches), - InstancesWithMissingPatches: __expectInt32(output.InstancesWithMissingPatches), - InstancesWithNotApplicablePatches: __expectInt32(output.InstancesWithNotApplicablePatches), - InstancesWithOtherNonCompliantPatches: __expectInt32(output.InstancesWithOtherNonCompliantPatches), - InstancesWithSecurityNonCompliantPatches: __expectInt32(output.InstancesWithSecurityNonCompliantPatches), - InstancesWithUnreportedNotApplicablePatches: __expectInt32(output.InstancesWithUnreportedNotApplicablePatches), - } as any; -}; - -/** - * deserializeAws_json1_1DescribePatchPropertiesResult - */ -const de_DescribePatchPropertiesResult = (output: any, context: __SerdeContext): DescribePatchPropertiesResult => { - return { - NextToken: __expectString(output.NextToken), - Properties: output.Properties != null ? de_PatchPropertiesList(output.Properties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSessionsResponse - */ -const de_DescribeSessionsResponse = (output: any, context: __SerdeContext): DescribeSessionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Sessions: output.Sessions != null ? de_SessionList(output.Sessions, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DisassociateOpsItemRelatedItemResponse - */ -const de_DisassociateOpsItemRelatedItemResponse = ( - output: any, - context: __SerdeContext -): DisassociateOpsItemRelatedItemResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DocumentAlreadyExists - */ -const de_DocumentAlreadyExists = (output: any, context: __SerdeContext): DocumentAlreadyExists => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentDefaultVersionDescription - */ -const de_DocumentDefaultVersionDescription = ( - output: any, - context: __SerdeContext -): DocumentDefaultVersionDescription => { - return { - DefaultVersion: __expectString(output.DefaultVersion), - DefaultVersionName: __expectString(output.DefaultVersionName), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentDescription - */ -const de_DocumentDescription = (output: any, context: __SerdeContext): DocumentDescription => { - return { - ApprovedVersion: __expectString(output.ApprovedVersion), - AttachmentsInformation: - output.AttachmentsInformation != null - ? de_AttachmentInformationList(output.AttachmentsInformation, context) - : undefined, - Author: __expectString(output.Author), - Category: output.Category != null ? de_CategoryList(output.Category, context) : undefined, - CategoryEnum: output.CategoryEnum != null ? de_CategoryEnumList(output.CategoryEnum, context) : undefined, - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DefaultVersion: __expectString(output.DefaultVersion), - Description: __expectString(output.Description), - DisplayName: __expectString(output.DisplayName), - DocumentFormat: __expectString(output.DocumentFormat), - DocumentType: __expectString(output.DocumentType), - DocumentVersion: __expectString(output.DocumentVersion), - Hash: __expectString(output.Hash), - HashType: __expectString(output.HashType), - LatestVersion: __expectString(output.LatestVersion), - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - Parameters: output.Parameters != null ? de_DocumentParameterList(output.Parameters, context) : undefined, - PendingReviewVersion: __expectString(output.PendingReviewVersion), - PlatformTypes: output.PlatformTypes != null ? de_PlatformTypeList(output.PlatformTypes, context) : undefined, - Requires: output.Requires != null ? de_DocumentRequiresList(output.Requires, context) : undefined, - ReviewInformation: - output.ReviewInformation != null ? de_ReviewInformationList(output.ReviewInformation, context) : undefined, - ReviewStatus: __expectString(output.ReviewStatus), - SchemaVersion: __expectString(output.SchemaVersion), - Sha1: __expectString(output.Sha1), - Status: __expectString(output.Status), - StatusInformation: __expectString(output.StatusInformation), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TargetType: __expectString(output.TargetType), - VersionName: __expectString(output.VersionName), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentIdentifier - */ -const de_DocumentIdentifier = (output: any, context: __SerdeContext): DocumentIdentifier => { - return { - Author: __expectString(output.Author), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DisplayName: __expectString(output.DisplayName), - DocumentFormat: __expectString(output.DocumentFormat), - DocumentType: __expectString(output.DocumentType), - DocumentVersion: __expectString(output.DocumentVersion), - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - PlatformTypes: output.PlatformTypes != null ? de_PlatformTypeList(output.PlatformTypes, context) : undefined, - Requires: output.Requires != null ? de_DocumentRequiresList(output.Requires, context) : undefined, - ReviewStatus: __expectString(output.ReviewStatus), - SchemaVersion: __expectString(output.SchemaVersion), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - TargetType: __expectString(output.TargetType), - VersionName: __expectString(output.VersionName), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentIdentifierList - */ -const de_DocumentIdentifierList = (output: any, context: __SerdeContext): DocumentIdentifier[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentIdentifier(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentLimitExceeded - */ -const de_DocumentLimitExceeded = (output: any, context: __SerdeContext): DocumentLimitExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentMetadataResponseInfo - */ -const de_DocumentMetadataResponseInfo = (output: any, context: __SerdeContext): DocumentMetadataResponseInfo => { - return { - ReviewerResponse: - output.ReviewerResponse != null ? de_DocumentReviewerResponseList(output.ReviewerResponse, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DocumentParameter - */ -const de_DocumentParameter = (output: any, context: __SerdeContext): DocumentParameter => { - return { - DefaultValue: __expectString(output.DefaultValue), - Description: __expectString(output.Description), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentParameterList - */ -const de_DocumentParameterList = (output: any, context: __SerdeContext): DocumentParameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentParameter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentPermissionLimit - */ -const de_DocumentPermissionLimit = (output: any, context: __SerdeContext): DocumentPermissionLimit => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentRequires - */ -const de_DocumentRequires = (output: any, context: __SerdeContext): DocumentRequires => { - return { - Name: __expectString(output.Name), - RequireType: __expectString(output.RequireType), - Version: __expectString(output.Version), - VersionName: __expectString(output.VersionName), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentRequiresList - */ -const de_DocumentRequiresList = (output: any, context: __SerdeContext): DocumentRequires[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentRequires(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentReviewCommentList - */ -const de_DocumentReviewCommentList = (output: any, context: __SerdeContext): DocumentReviewCommentSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentReviewCommentSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentReviewCommentSource - */ -const de_DocumentReviewCommentSource = (output: any, context: __SerdeContext): DocumentReviewCommentSource => { - return { - Content: __expectString(output.Content), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentReviewerResponseList - */ -const de_DocumentReviewerResponseList = (output: any, context: __SerdeContext): DocumentReviewerResponseSource[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentReviewerResponseSource(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DocumentReviewerResponseSource - */ -const de_DocumentReviewerResponseSource = (output: any, context: __SerdeContext): DocumentReviewerResponseSource => { - return { - Comment: output.Comment != null ? de_DocumentReviewCommentList(output.Comment, context) : undefined, - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - ReviewStatus: __expectString(output.ReviewStatus), - Reviewer: __expectString(output.Reviewer), - UpdatedTime: - output.UpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedTime))) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DocumentVersionInfo - */ -const de_DocumentVersionInfo = (output: any, context: __SerdeContext): DocumentVersionInfo => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DisplayName: __expectString(output.DisplayName), - DocumentFormat: __expectString(output.DocumentFormat), - DocumentVersion: __expectString(output.DocumentVersion), - IsDefaultVersion: __expectBoolean(output.IsDefaultVersion), - Name: __expectString(output.Name), - ReviewStatus: __expectString(output.ReviewStatus), - Status: __expectString(output.Status), - StatusInformation: __expectString(output.StatusInformation), - VersionName: __expectString(output.VersionName), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentVersionLimitExceeded - */ -const de_DocumentVersionLimitExceeded = (output: any, context: __SerdeContext): DocumentVersionLimitExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DocumentVersionList - */ -const de_DocumentVersionList = (output: any, context: __SerdeContext): DocumentVersionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentVersionInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DoesNotExistException - */ -const de_DoesNotExistException = (output: any, context: __SerdeContext): DoesNotExistException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateDocumentContent - */ -const de_DuplicateDocumentContent = (output: any, context: __SerdeContext): DuplicateDocumentContent => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateDocumentVersionName - */ -const de_DuplicateDocumentVersionName = (output: any, context: __SerdeContext): DuplicateDocumentVersionName => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1DuplicateInstanceId - */ -const de_DuplicateInstanceId = (output: any, context: __SerdeContext): DuplicateInstanceId => { - return {} as any; -}; - -/** - * deserializeAws_json1_1EffectivePatch - */ -const de_EffectivePatch = (output: any, context: __SerdeContext): EffectivePatch => { - return { - Patch: output.Patch != null ? de_Patch(output.Patch, context) : undefined, - PatchStatus: output.PatchStatus != null ? de_PatchStatus(output.PatchStatus, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EffectivePatchList - */ -const de_EffectivePatchList = (output: any, context: __SerdeContext): EffectivePatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_EffectivePatch(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailedCreateAssociation - */ -const de_FailedCreateAssociation = (output: any, context: __SerdeContext): FailedCreateAssociation => { - return { - Entry: output.Entry != null ? de_CreateAssociationBatchRequestEntry(output.Entry, context) : undefined, - Fault: __expectString(output.Fault), - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1FailedCreateAssociationList - */ -const de_FailedCreateAssociationList = (output: any, context: __SerdeContext): FailedCreateAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedCreateAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailureDetails - */ -const de_FailureDetails = (output: any, context: __SerdeContext): FailureDetails => { - return { - Details: output.Details != null ? de_AutomationParameterMap(output.Details, context) : undefined, - FailureStage: __expectString(output.FailureStage), - FailureType: __expectString(output.FailureType), - } as any; -}; - -/** - * deserializeAws_json1_1FeatureNotAvailableException - */ -const de_FeatureNotAvailableException = (output: any, context: __SerdeContext): FeatureNotAvailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; - -/** - * deserializeAws_json1_1GetAutomationExecutionResult - */ -const de_GetAutomationExecutionResult = (output: any, context: __SerdeContext): GetAutomationExecutionResult => { - return { - AutomationExecution: - output.AutomationExecution != null ? de_AutomationExecution(output.AutomationExecution, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetCalendarStateResponse - */ -const de_GetCalendarStateResponse = (output: any, context: __SerdeContext): GetCalendarStateResponse => { - return { - AtTime: __expectString(output.AtTime), - NextTransitionTime: __expectString(output.NextTransitionTime), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1GetCommandInvocationResult - */ -const de_GetCommandInvocationResult = (output: any, context: __SerdeContext): GetCommandInvocationResult => { - return { - CloudWatchOutputConfig: - output.CloudWatchOutputConfig != null - ? de_CloudWatchOutputConfig(output.CloudWatchOutputConfig, context) - : undefined, - CommandId: __expectString(output.CommandId), - Comment: __expectString(output.Comment), - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - ExecutionElapsedTime: __expectString(output.ExecutionElapsedTime), - ExecutionEndDateTime: __expectString(output.ExecutionEndDateTime), - ExecutionStartDateTime: __expectString(output.ExecutionStartDateTime), - InstanceId: __expectString(output.InstanceId), - PluginName: __expectString(output.PluginName), - ResponseCode: __expectInt32(output.ResponseCode), - StandardErrorContent: __expectString(output.StandardErrorContent), - StandardErrorUrl: __expectString(output.StandardErrorUrl), - StandardOutputContent: __expectString(output.StandardOutputContent), - StandardOutputUrl: __expectString(output.StandardOutputUrl), - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - } as any; -}; - -/** - * deserializeAws_json1_1GetConnectionStatusResponse - */ -const de_GetConnectionStatusResponse = (output: any, context: __SerdeContext): GetConnectionStatusResponse => { - return { - Status: __expectString(output.Status), - Target: __expectString(output.Target), - } as any; -}; - -/** - * deserializeAws_json1_1GetDefaultPatchBaselineResult - */ -const de_GetDefaultPatchBaselineResult = (output: any, context: __SerdeContext): GetDefaultPatchBaselineResult => { - return { - BaselineId: __expectString(output.BaselineId), - OperatingSystem: __expectString(output.OperatingSystem), - } as any; -}; - -/** - * deserializeAws_json1_1GetDeployablePatchSnapshotForInstanceResult - */ -const de_GetDeployablePatchSnapshotForInstanceResult = ( - output: any, - context: __SerdeContext -): GetDeployablePatchSnapshotForInstanceResult => { - return { - InstanceId: __expectString(output.InstanceId), - Product: __expectString(output.Product), - SnapshotDownloadUrl: __expectString(output.SnapshotDownloadUrl), - SnapshotId: __expectString(output.SnapshotId), - } as any; -}; - -/** - * deserializeAws_json1_1GetDocumentResult - */ -const de_GetDocumentResult = (output: any, context: __SerdeContext): GetDocumentResult => { - return { - AttachmentsContent: - output.AttachmentsContent != null ? de_AttachmentContentList(output.AttachmentsContent, context) : undefined, - Content: __expectString(output.Content), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - DisplayName: __expectString(output.DisplayName), - DocumentFormat: __expectString(output.DocumentFormat), - DocumentType: __expectString(output.DocumentType), - DocumentVersion: __expectString(output.DocumentVersion), - Name: __expectString(output.Name), - Requires: output.Requires != null ? de_DocumentRequiresList(output.Requires, context) : undefined, - ReviewStatus: __expectString(output.ReviewStatus), - Status: __expectString(output.Status), - StatusInformation: __expectString(output.StatusInformation), - VersionName: __expectString(output.VersionName), - } as any; -}; - -/** - * deserializeAws_json1_1GetInventoryResult - */ -const de_GetInventoryResult = (output: any, context: __SerdeContext): GetInventoryResult => { - return { - Entities: output.Entities != null ? de_InventoryResultEntityList(output.Entities, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetInventorySchemaResult - */ -const de_GetInventorySchemaResult = (output: any, context: __SerdeContext): GetInventorySchemaResult => { - return { - NextToken: __expectString(output.NextToken), - Schemas: output.Schemas != null ? de_InventoryItemSchemaResultList(output.Schemas, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetMaintenanceWindowExecutionResult - */ -const de_GetMaintenanceWindowExecutionResult = ( - output: any, - context: __SerdeContext -): GetMaintenanceWindowExecutionResult => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TaskIds: output.TaskIds != null ? de_MaintenanceWindowExecutionTaskIdList(output.TaskIds, context) : undefined, - WindowExecutionId: __expectString(output.WindowExecutionId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMaintenanceWindowExecutionTaskInvocationResult - */ -const de_GetMaintenanceWindowExecutionTaskInvocationResult = ( - output: any, - context: __SerdeContext -): GetMaintenanceWindowExecutionTaskInvocationResult => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ExecutionId: __expectString(output.ExecutionId), - InvocationId: __expectString(output.InvocationId), - OwnerInformation: __expectString(output.OwnerInformation), - Parameters: __expectString(output.Parameters), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TaskExecutionId: __expectString(output.TaskExecutionId), - TaskType: __expectString(output.TaskType), - WindowExecutionId: __expectString(output.WindowExecutionId), - WindowTargetId: __expectString(output.WindowTargetId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMaintenanceWindowExecutionTaskResult - */ -const de_GetMaintenanceWindowExecutionTaskResult = ( - output: any, - context: __SerdeContext -): GetMaintenanceWindowExecutionTaskResult => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Priority: __expectInt32(output.Priority), - ServiceRole: __expectString(output.ServiceRole), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TaskArn: __expectString(output.TaskArn), - TaskExecutionId: __expectString(output.TaskExecutionId), - TaskParameters: - output.TaskParameters != null - ? de_MaintenanceWindowTaskParametersList(output.TaskParameters, context) - : undefined, - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - Type: __expectString(output.Type), - WindowExecutionId: __expectString(output.WindowExecutionId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMaintenanceWindowResult - */ -const de_GetMaintenanceWindowResult = (output: any, context: __SerdeContext): GetMaintenanceWindowResult => { - return { - AllowUnassociatedTargets: __expectBoolean(output.AllowUnassociatedTargets), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - Cutoff: __expectInt32(output.Cutoff), - Description: __expectString(output.Description), - Duration: __expectInt32(output.Duration), - Enabled: __expectBoolean(output.Enabled), - EndDate: __expectString(output.EndDate), - ModifiedDate: - output.ModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedDate))) - : undefined, - Name: __expectString(output.Name), - NextExecutionTime: __expectString(output.NextExecutionTime), - Schedule: __expectString(output.Schedule), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - ScheduleTimezone: __expectString(output.ScheduleTimezone), - StartDate: __expectString(output.StartDate), - WindowId: __expectString(output.WindowId), - } as any; -}; - -/** - * deserializeAws_json1_1GetMaintenanceWindowTaskResult - */ -const de_GetMaintenanceWindowTaskResult = (output: any, context: __SerdeContext): GetMaintenanceWindowTaskResult => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - CutoffBehavior: __expectString(output.CutoffBehavior), - Description: __expectString(output.Description), - LoggingInfo: output.LoggingInfo != null ? de_LoggingInfo(output.LoggingInfo, context) : undefined, - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TaskArn: __expectString(output.TaskArn), - TaskInvocationParameters: - output.TaskInvocationParameters != null - ? de_MaintenanceWindowTaskInvocationParameters(output.TaskInvocationParameters, context) - : undefined, - TaskParameters: - output.TaskParameters != null ? de_MaintenanceWindowTaskParameters(output.TaskParameters, context) : undefined, - TaskType: __expectString(output.TaskType), - WindowId: __expectString(output.WindowId), - WindowTaskId: __expectString(output.WindowTaskId), - } as any; -}; - -/** - * deserializeAws_json1_1GetOpsItemResponse - */ -const de_GetOpsItemResponse = (output: any, context: __SerdeContext): GetOpsItemResponse => { - return { - OpsItem: output.OpsItem != null ? de_OpsItem(output.OpsItem, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetOpsMetadataResult - */ -const de_GetOpsMetadataResult = (output: any, context: __SerdeContext): GetOpsMetadataResult => { - return { - Metadata: output.Metadata != null ? de_MetadataMap(output.Metadata, context) : undefined, - NextToken: __expectString(output.NextToken), - ResourceId: __expectString(output.ResourceId), - } as any; -}; - -/** - * deserializeAws_json1_1GetOpsSummaryResult - */ -const de_GetOpsSummaryResult = (output: any, context: __SerdeContext): GetOpsSummaryResult => { - return { - Entities: output.Entities != null ? de_OpsEntityList(output.Entities, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetParameterHistoryResult - */ -const de_GetParameterHistoryResult = (output: any, context: __SerdeContext): GetParameterHistoryResult => { - return { - NextToken: __expectString(output.NextToken), - Parameters: output.Parameters != null ? de_ParameterHistoryList(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetParameterResult - */ -const de_GetParameterResult = (output: any, context: __SerdeContext): GetParameterResult => { - return { - Parameter: output.Parameter != null ? de_Parameter(output.Parameter, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetParametersByPathResult - */ -const de_GetParametersByPathResult = (output: any, context: __SerdeContext): GetParametersByPathResult => { - return { - NextToken: __expectString(output.NextToken), - Parameters: output.Parameters != null ? de_ParameterList(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetParametersResult - */ -const de_GetParametersResult = (output: any, context: __SerdeContext): GetParametersResult => { - return { - InvalidParameters: - output.InvalidParameters != null ? de_ParameterNameList(output.InvalidParameters, context) : undefined, - Parameters: output.Parameters != null ? de_ParameterList(output.Parameters, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPatchBaselineForPatchGroupResult - */ -const de_GetPatchBaselineForPatchGroupResult = ( - output: any, - context: __SerdeContext -): GetPatchBaselineForPatchGroupResult => { - return { - BaselineId: __expectString(output.BaselineId), - OperatingSystem: __expectString(output.OperatingSystem), - PatchGroup: __expectString(output.PatchGroup), - } as any; -}; - -/** - * deserializeAws_json1_1GetPatchBaselineResult - */ -const de_GetPatchBaselineResult = (output: any, context: __SerdeContext): GetPatchBaselineResult => { - return { - ApprovalRules: output.ApprovalRules != null ? de_PatchRuleGroup(output.ApprovalRules, context) : undefined, - ApprovedPatches: output.ApprovedPatches != null ? de_PatchIdList(output.ApprovedPatches, context) : undefined, - ApprovedPatchesComplianceLevel: __expectString(output.ApprovedPatchesComplianceLevel), - ApprovedPatchesEnableNonSecurity: __expectBoolean(output.ApprovedPatchesEnableNonSecurity), - BaselineId: __expectString(output.BaselineId), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - Description: __expectString(output.Description), - GlobalFilters: output.GlobalFilters != null ? de_PatchFilterGroup(output.GlobalFilters, context) : undefined, - ModifiedDate: - output.ModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedDate))) - : undefined, - Name: __expectString(output.Name), - OperatingSystem: __expectString(output.OperatingSystem), - PatchGroups: output.PatchGroups != null ? de_PatchGroupList(output.PatchGroups, context) : undefined, - RejectedPatches: output.RejectedPatches != null ? de_PatchIdList(output.RejectedPatches, context) : undefined, - RejectedPatchesAction: __expectString(output.RejectedPatchesAction), - Sources: output.Sources != null ? de_PatchSourceList(output.Sources, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetResourcePoliciesResponse - */ -const de_GetResourcePoliciesResponse = (output: any, context: __SerdeContext): GetResourcePoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - Policies: output.Policies != null ? de_GetResourcePoliciesResponseEntries(output.Policies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetResourcePoliciesResponseEntries - */ -const de_GetResourcePoliciesResponseEntries = ( - output: any, - context: __SerdeContext -): GetResourcePoliciesResponseEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GetResourcePoliciesResponseEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GetResourcePoliciesResponseEntry - */ -const de_GetResourcePoliciesResponseEntry = ( - output: any, - context: __SerdeContext -): GetResourcePoliciesResponseEntry => { - return { - Policy: __expectString(output.Policy), - PolicyHash: __expectString(output.PolicyHash), - PolicyId: __expectString(output.PolicyId), - } as any; -}; - -/** - * deserializeAws_json1_1GetServiceSettingResult - */ -const de_GetServiceSettingResult = (output: any, context: __SerdeContext): GetServiceSettingResult => { - return { - ServiceSetting: output.ServiceSetting != null ? de_ServiceSetting(output.ServiceSetting, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HierarchyLevelLimitExceededException - */ -const de_HierarchyLevelLimitExceededException = ( - output: any, - context: __SerdeContext -): HierarchyLevelLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1HierarchyTypeMismatchException - */ -const de_HierarchyTypeMismatchException = (output: any, context: __SerdeContext): HierarchyTypeMismatchException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1IdempotentParameterMismatch - */ -const de_IdempotentParameterMismatch = (output: any, context: __SerdeContext): IdempotentParameterMismatch => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DeleteMaintenanceWindowRequest omitted. -/** - * deserializeAws_json1_1IncompatiblePolicyException - */ -const de_IncompatiblePolicyException = (output: any, context: __SerdeContext): IncompatiblePolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DeleteOpsMetadataRequest omitted. -/** - * deserializeAws_json1_1InstanceAggregatedAssociationOverview - */ -const de_InstanceAggregatedAssociationOverview = ( - output: any, - context: __SerdeContext -): InstanceAggregatedAssociationOverview => { - return { - DetailedStatus: __expectString(output.DetailedStatus), - InstanceAssociationStatusAggregatedCount: - output.InstanceAssociationStatusAggregatedCount != null - ? de_InstanceAssociationStatusAggregatedCount(output.InstanceAssociationStatusAggregatedCount, context) - : undefined, - } as any; -}; +// se_DeleteParameterRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociation - */ -const de_InstanceAssociation = (output: any, context: __SerdeContext): InstanceAssociation => { - return { - AssociationId: __expectString(output.AssociationId), - AssociationVersion: __expectString(output.AssociationVersion), - Content: __expectString(output.Content), - InstanceId: __expectString(output.InstanceId), - } as any; -}; +// se_DeleteParametersRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociationList - */ -const de_InstanceAssociationList = (output: any, context: __SerdeContext): InstanceAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceAssociation(entry, context); - }); - return retVal; -}; +// se_DeletePatchBaselineRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociationOutputLocation - */ -const de_InstanceAssociationOutputLocation = ( - output: any, - context: __SerdeContext -): InstanceAssociationOutputLocation => { - return { - S3Location: output.S3Location != null ? de_S3OutputLocation(output.S3Location, context) : undefined, - } as any; -}; +// se_DeleteResourceDataSyncRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociationOutputUrl - */ -const de_InstanceAssociationOutputUrl = (output: any, context: __SerdeContext): InstanceAssociationOutputUrl => { - return { - S3OutputUrl: output.S3OutputUrl != null ? de_S3OutputUrl(output.S3OutputUrl, context) : undefined, - } as any; -}; +// se_DeleteResourcePolicyRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociationStatusAggregatedCount - */ -const de_InstanceAssociationStatusAggregatedCount = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// se_DeregisterManagedInstanceRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociationStatusInfo - */ -const de_InstanceAssociationStatusInfo = (output: any, context: __SerdeContext): InstanceAssociationStatusInfo => { - return { - AssociationId: __expectString(output.AssociationId), - AssociationName: __expectString(output.AssociationName), - AssociationVersion: __expectString(output.AssociationVersion), - DetailedStatus: __expectString(output.DetailedStatus), - DocumentVersion: __expectString(output.DocumentVersion), - ErrorCode: __expectString(output.ErrorCode), - ExecutionDate: - output.ExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionDate))) - : undefined, - ExecutionSummary: __expectString(output.ExecutionSummary), - InstanceId: __expectString(output.InstanceId), - Name: __expectString(output.Name), - OutputUrl: output.OutputUrl != null ? de_InstanceAssociationOutputUrl(output.OutputUrl, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; +// se_DeregisterPatchBaselineForPatchGroupRequest omitted. -/** - * deserializeAws_json1_1InstanceAssociationStatusInfos - */ -const de_InstanceAssociationStatusInfos = (output: any, context: __SerdeContext): InstanceAssociationStatusInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceAssociationStatusInfo(entry, context); - }); - return retVal; -}; +// se_DeregisterTargetFromMaintenanceWindowRequest omitted. -/** - * deserializeAws_json1_1InstanceIdList - */ -const de_InstanceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_DeregisterTaskFromMaintenanceWindowRequest omitted. -/** - * deserializeAws_json1_1InstanceInformation - */ -const de_InstanceInformation = (output: any, context: __SerdeContext): InstanceInformation => { - return { - ActivationId: __expectString(output.ActivationId), - AgentVersion: __expectString(output.AgentVersion), - AssociationOverview: - output.AssociationOverview != null - ? de_InstanceAggregatedAssociationOverview(output.AssociationOverview, context) - : undefined, - AssociationStatus: __expectString(output.AssociationStatus), - ComputerName: __expectString(output.ComputerName), - IPAddress: __expectString(output.IPAddress), - IamRole: __expectString(output.IamRole), - InstanceId: __expectString(output.InstanceId), - IsLatestVersion: __expectBoolean(output.IsLatestVersion), - LastAssociationExecutionDate: - output.LastAssociationExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAssociationExecutionDate))) - : undefined, - LastPingDateTime: - output.LastPingDateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastPingDateTime))) - : undefined, - LastSuccessfulAssociationExecutionDate: - output.LastSuccessfulAssociationExecutionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulAssociationExecutionDate))) - : undefined, - Name: __expectString(output.Name), - PingStatus: __expectString(output.PingStatus), - PlatformName: __expectString(output.PlatformName), - PlatformType: __expectString(output.PlatformType), - PlatformVersion: __expectString(output.PlatformVersion), - RegistrationDate: - output.RegistrationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RegistrationDate))) - : undefined, - ResourceType: __expectString(output.ResourceType), - SourceId: __expectString(output.SourceId), - SourceType: __expectString(output.SourceType), - } as any; -}; +// se_DescribeActivationsFilter omitted. -/** - * deserializeAws_json1_1InstanceInformationList - */ -const de_InstanceInformationList = (output: any, context: __SerdeContext): InstanceInformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceInformation(entry, context); - }); - return retVal; -}; +// se_DescribeActivationsFilterList omitted. -/** - * deserializeAws_json1_1InstancePatchState - */ -const de_InstancePatchState = (output: any, context: __SerdeContext): InstancePatchState => { - return { - BaselineId: __expectString(output.BaselineId), - CriticalNonCompliantCount: __expectInt32(output.CriticalNonCompliantCount), - FailedCount: __expectInt32(output.FailedCount), - InstallOverrideList: __expectString(output.InstallOverrideList), - InstalledCount: __expectInt32(output.InstalledCount), - InstalledOtherCount: __expectInt32(output.InstalledOtherCount), - InstalledPendingRebootCount: __expectInt32(output.InstalledPendingRebootCount), - InstalledRejectedCount: __expectInt32(output.InstalledRejectedCount), - InstanceId: __expectString(output.InstanceId), - LastNoRebootInstallOperationTime: - output.LastNoRebootInstallOperationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastNoRebootInstallOperationTime))) - : undefined, - MissingCount: __expectInt32(output.MissingCount), - NotApplicableCount: __expectInt32(output.NotApplicableCount), - Operation: __expectString(output.Operation), - OperationEndTime: - output.OperationEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OperationEndTime))) - : undefined, - OperationStartTime: - output.OperationStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.OperationStartTime))) - : undefined, - OtherNonCompliantCount: __expectInt32(output.OtherNonCompliantCount), - OwnerInformation: __expectString(output.OwnerInformation), - PatchGroup: __expectString(output.PatchGroup), - RebootOption: __expectString(output.RebootOption), - SecurityNonCompliantCount: __expectInt32(output.SecurityNonCompliantCount), - SnapshotId: __expectString(output.SnapshotId), - UnreportedNotApplicableCount: __expectInt32(output.UnreportedNotApplicableCount), - } as any; -}; +// se_DescribeActivationsRequest omitted. -/** - * deserializeAws_json1_1InstancePatchStateList - */ -const de_InstancePatchStateList = (output: any, context: __SerdeContext): InstancePatchState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstancePatchState(entry, context); - }); - return retVal; -}; +// se_DescribeAssociationExecutionsRequest omitted. -/** - * deserializeAws_json1_1InstancePatchStatesList - */ -const de_InstancePatchStatesList = (output: any, context: __SerdeContext): InstancePatchState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstancePatchState(entry, context); - }); - return retVal; -}; +// se_DescribeAssociationExecutionTargetsRequest omitted. -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeAssociationRequest omitted. -/** - * deserializeAws_json1_1InvalidActivation - */ -const de_InvalidActivation = (output: any, context: __SerdeContext): InvalidActivation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeAutomationExecutionsRequest omitted. -/** - * deserializeAws_json1_1InvalidActivationId - */ -const de_InvalidActivationId = (output: any, context: __SerdeContext): InvalidActivationId => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeAutomationStepExecutionsRequest omitted. -/** - * deserializeAws_json1_1InvalidAggregatorException - */ -const de_InvalidAggregatorException = (output: any, context: __SerdeContext): InvalidAggregatorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeAvailablePatchesRequest omitted. -/** - * deserializeAws_json1_1InvalidAllowedPatternException - */ -const de_InvalidAllowedPatternException = (output: any, context: __SerdeContext): InvalidAllowedPatternException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DescribeDocumentPermissionRequest omitted. -/** - * deserializeAws_json1_1InvalidAssociation - */ -const de_InvalidAssociation = (output: any, context: __SerdeContext): InvalidAssociation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeDocumentRequest omitted. -/** - * deserializeAws_json1_1InvalidAssociationVersion - */ -const de_InvalidAssociationVersion = (output: any, context: __SerdeContext): InvalidAssociationVersion => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeEffectiveInstanceAssociationsRequest omitted. -/** - * deserializeAws_json1_1InvalidAutomationExecutionParametersException - */ -const de_InvalidAutomationExecutionParametersException = ( - output: any, - context: __SerdeContext -): InvalidAutomationExecutionParametersException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeEffectivePatchesForPatchBaselineRequest omitted. -/** - * deserializeAws_json1_1InvalidAutomationSignalException - */ -const de_InvalidAutomationSignalException = ( - output: any, - context: __SerdeContext -): InvalidAutomationSignalException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeInstanceAssociationsStatusRequest omitted. -/** - * deserializeAws_json1_1InvalidAutomationStatusUpdateException - */ -const de_InvalidAutomationStatusUpdateException = ( - output: any, - context: __SerdeContext -): InvalidAutomationStatusUpdateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeInstanceInformationRequest omitted. -/** - * deserializeAws_json1_1InvalidCommandId - */ -const de_InvalidCommandId = (output: any, context: __SerdeContext): InvalidCommandId => { - return {} as any; -}; +// se_DescribeInstancePatchesRequest omitted. -/** - * deserializeAws_json1_1InvalidDeleteInventoryParametersException - */ -const de_InvalidDeleteInventoryParametersException = ( - output: any, - context: __SerdeContext -): InvalidDeleteInventoryParametersException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeInstancePatchStatesForPatchGroupRequest omitted. -/** - * deserializeAws_json1_1InvalidDeletionIdException - */ -const de_InvalidDeletionIdException = (output: any, context: __SerdeContext): InvalidDeletionIdException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeInstancePatchStatesRequest omitted. -/** - * deserializeAws_json1_1InvalidDocument - */ -const de_InvalidDocument = (output: any, context: __SerdeContext): InvalidDocument => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeInventoryDeletionsRequest omitted. -/** - * deserializeAws_json1_1InvalidDocumentContent - */ -const de_InvalidDocumentContent = (output: any, context: __SerdeContext): InvalidDocumentContent => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeMaintenanceWindowExecutionsRequest omitted. -/** - * deserializeAws_json1_1InvalidDocumentOperation - */ -const de_InvalidDocumentOperation = (output: any, context: __SerdeContext): InvalidDocumentOperation => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeMaintenanceWindowExecutionTaskInvocationsRequest omitted. -/** - * deserializeAws_json1_1InvalidDocumentSchemaVersion - */ -const de_InvalidDocumentSchemaVersion = (output: any, context: __SerdeContext): InvalidDocumentSchemaVersion => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeMaintenanceWindowExecutionTasksRequest omitted. -/** - * deserializeAws_json1_1InvalidDocumentType - */ -const de_InvalidDocumentType = (output: any, context: __SerdeContext): InvalidDocumentType => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeMaintenanceWindowScheduleRequest omitted. -/** - * deserializeAws_json1_1InvalidDocumentVersion - */ -const de_InvalidDocumentVersion = (output: any, context: __SerdeContext): InvalidDocumentVersion => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeMaintenanceWindowsForTargetRequest omitted. -/** - * deserializeAws_json1_1InvalidFilter - */ -const de_InvalidFilter = (output: any, context: __SerdeContext): InvalidFilter => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeMaintenanceWindowsRequest omitted. -/** - * deserializeAws_json1_1InvalidFilterKey - */ -const de_InvalidFilterKey = (output: any, context: __SerdeContext): InvalidFilterKey => { - return {} as any; -}; +// se_DescribeMaintenanceWindowTargetsRequest omitted. -/** - * deserializeAws_json1_1InvalidFilterOption - */ -const de_InvalidFilterOption = (output: any, context: __SerdeContext): InvalidFilterOption => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DescribeMaintenanceWindowTasksRequest omitted. -/** - * deserializeAws_json1_1InvalidFilterValue - */ -const de_InvalidFilterValue = (output: any, context: __SerdeContext): InvalidFilterValue => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeOpsItemsRequest omitted. -/** - * deserializeAws_json1_1InvalidInstanceId - */ -const de_InvalidInstanceId = (output: any, context: __SerdeContext): InvalidInstanceId => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribeParametersRequest omitted. -/** - * deserializeAws_json1_1InvalidInstanceInformationFilterValue - */ -const de_InvalidInstanceInformationFilterValue = ( - output: any, - context: __SerdeContext -): InvalidInstanceInformationFilterValue => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DescribePatchBaselinesRequest omitted. -/** - * deserializeAws_json1_1InvalidInventoryGroupException - */ -const de_InvalidInventoryGroupException = (output: any, context: __SerdeContext): InvalidInventoryGroupException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribePatchGroupsRequest omitted. -/** - * deserializeAws_json1_1InvalidInventoryItemContextException - */ -const de_InvalidInventoryItemContextException = ( - output: any, - context: __SerdeContext -): InvalidInventoryItemContextException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribePatchGroupStateRequest omitted. -/** - * deserializeAws_json1_1InvalidInventoryRequestException - */ -const de_InvalidInventoryRequestException = ( - output: any, - context: __SerdeContext -): InvalidInventoryRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DescribePatchPropertiesRequest omitted. -/** - * deserializeAws_json1_1InvalidItemContentException - */ -const de_InvalidItemContentException = (output: any, context: __SerdeContext): InvalidItemContentException => { - return { - Message: __expectString(output.Message), - TypeName: __expectString(output.TypeName), - } as any; -}; +// se_DescribeSessionsRequest omitted. -/** - * deserializeAws_json1_1InvalidKeyId - */ -const de_InvalidKeyId = (output: any, context: __SerdeContext): InvalidKeyId => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DisassociateOpsItemRelatedItemRequest omitted. -/** - * deserializeAws_json1_1InvalidNextToken - */ -const de_InvalidNextToken = (output: any, context: __SerdeContext): InvalidNextToken => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DocumentFilter omitted. -/** - * deserializeAws_json1_1InvalidNotificationConfig - */ -const de_InvalidNotificationConfig = (output: any, context: __SerdeContext): InvalidNotificationConfig => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DocumentFilterList omitted. -/** - * deserializeAws_json1_1InvalidOptionException - */ -const de_InvalidOptionException = (output: any, context: __SerdeContext): InvalidOptionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DocumentKeyValuesFilter omitted. -/** - * deserializeAws_json1_1InvalidOutputFolder - */ -const de_InvalidOutputFolder = (output: any, context: __SerdeContext): InvalidOutputFolder => { - return {} as any; -}; +// se_DocumentKeyValuesFilterList omitted. -/** - * deserializeAws_json1_1InvalidOutputLocation - */ -const de_InvalidOutputLocation = (output: any, context: __SerdeContext): InvalidOutputLocation => { - return {} as any; -}; +// se_DocumentKeyValuesFilterValues omitted. -/** - * deserializeAws_json1_1InvalidParameters - */ -const de_InvalidParameters = (output: any, context: __SerdeContext): InvalidParameters => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DocumentRequires omitted. -/** - * deserializeAws_json1_1InvalidPermissionType - */ -const de_InvalidPermissionType = (output: any, context: __SerdeContext): InvalidPermissionType => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_DocumentRequiresList omitted. -/** - * deserializeAws_json1_1InvalidPluginName - */ -const de_InvalidPluginName = (output: any, context: __SerdeContext): InvalidPluginName => { - return {} as any; -}; +// se_DocumentReviewCommentList omitted. -/** - * deserializeAws_json1_1InvalidPolicyAttributeException - */ -const de_InvalidPolicyAttributeException = (output: any, context: __SerdeContext): InvalidPolicyAttributeException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DocumentReviewCommentSource omitted. -/** - * deserializeAws_json1_1InvalidPolicyTypeException - */ -const de_InvalidPolicyTypeException = (output: any, context: __SerdeContext): InvalidPolicyTypeException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_DocumentReviews omitted. -/** - * deserializeAws_json1_1InvalidResourceId - */ -const de_InvalidResourceId = (output: any, context: __SerdeContext): InvalidResourceId => { - return {} as any; -}; +// se_GetAutomationExecutionRequest omitted. -/** - * deserializeAws_json1_1InvalidResourceType - */ -const de_InvalidResourceType = (output: any, context: __SerdeContext): InvalidResourceType => { - return {} as any; -}; +// se_GetCalendarStateRequest omitted. -/** - * deserializeAws_json1_1InvalidResultAttributeException - */ -const de_InvalidResultAttributeException = (output: any, context: __SerdeContext): InvalidResultAttributeException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetCommandInvocationRequest omitted. -/** - * deserializeAws_json1_1InvalidRole - */ -const de_InvalidRole = (output: any, context: __SerdeContext): InvalidRole => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetConnectionStatusRequest omitted. -/** - * deserializeAws_json1_1InvalidSchedule - */ -const de_InvalidSchedule = (output: any, context: __SerdeContext): InvalidSchedule => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetDefaultPatchBaselineRequest omitted. -/** - * deserializeAws_json1_1InvalidTag - */ -const de_InvalidTag = (output: any, context: __SerdeContext): InvalidTag => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetDeployablePatchSnapshotForInstanceRequest omitted. + +// se_GetDocumentRequest omitted. /** - * deserializeAws_json1_1InvalidTarget + * serializeAws_json1_1GetInventoryRequest */ -const de_InvalidTarget = (output: any, context: __SerdeContext): InvalidTarget => { - return { - Message: __expectString(output.Message), - } as any; +const se_GetInventoryRequest = (input: GetInventoryRequest, context: __SerdeContext): any => { + return take(input, { + Aggregators: (_) => se_InventoryAggregatorList(_, context), + Filters: _json, + MaxResults: [], + NextToken: [], + ResultAttributes: _json, + }); }; -/** - * deserializeAws_json1_1InvalidTargetMaps - */ -const de_InvalidTargetMaps = (output: any, context: __SerdeContext): InvalidTargetMaps => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetInventorySchemaRequest omitted. -/** - * deserializeAws_json1_1InvalidTypeNameException - */ -const de_InvalidTypeNameException = (output: any, context: __SerdeContext): InvalidTypeNameException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetMaintenanceWindowExecutionRequest omitted. -/** - * deserializeAws_json1_1InvalidUpdate - */ -const de_InvalidUpdate = (output: any, context: __SerdeContext): InvalidUpdate => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_GetMaintenanceWindowExecutionTaskInvocationRequest omitted. -/** - * deserializeAws_json1_1InventoryDeletionsList - */ -const de_InventoryDeletionsList = (output: any, context: __SerdeContext): InventoryDeletionStatusItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InventoryDeletionStatusItem(entry, context); - }); - return retVal; -}; +// se_GetMaintenanceWindowExecutionTaskRequest omitted. -/** - * deserializeAws_json1_1InventoryDeletionStatusItem - */ -const de_InventoryDeletionStatusItem = (output: any, context: __SerdeContext): InventoryDeletionStatusItem => { - return { - DeletionId: __expectString(output.DeletionId), - DeletionStartTime: - output.DeletionStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeletionStartTime))) - : undefined, - DeletionSummary: - output.DeletionSummary != null ? de_InventoryDeletionSummary(output.DeletionSummary, context) : undefined, - LastStatus: __expectString(output.LastStatus), - LastStatusMessage: __expectString(output.LastStatusMessage), - LastStatusUpdateTime: - output.LastStatusUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStatusUpdateTime))) - : undefined, - TypeName: __expectString(output.TypeName), - } as any; -}; - -/** - * deserializeAws_json1_1InventoryDeletionSummary - */ -const de_InventoryDeletionSummary = (output: any, context: __SerdeContext): InventoryDeletionSummary => { - return { - RemainingCount: __expectInt32(output.RemainingCount), - SummaryItems: - output.SummaryItems != null ? de_InventoryDeletionSummaryItems(output.SummaryItems, context) : undefined, - TotalCount: __expectInt32(output.TotalCount), - } as any; -}; +// se_GetMaintenanceWindowRequest omitted. -/** - * deserializeAws_json1_1InventoryDeletionSummaryItem - */ -const de_InventoryDeletionSummaryItem = (output: any, context: __SerdeContext): InventoryDeletionSummaryItem => { - return { - Count: __expectInt32(output.Count), - RemainingCount: __expectInt32(output.RemainingCount), - Version: __expectString(output.Version), - } as any; -}; +// se_GetMaintenanceWindowTaskRequest omitted. -/** - * deserializeAws_json1_1InventoryDeletionSummaryItems - */ -const de_InventoryDeletionSummaryItems = (output: any, context: __SerdeContext): InventoryDeletionSummaryItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InventoryDeletionSummaryItem(entry, context); - }); - return retVal; -}; +// se_GetOpsItemRequest omitted. -/** - * deserializeAws_json1_1InventoryItemAttribute - */ -const de_InventoryItemAttribute = (output: any, context: __SerdeContext): InventoryItemAttribute => { - return { - DataType: __expectString(output.DataType), - Name: __expectString(output.Name), - } as any; -}; +// se_GetOpsMetadataRequest omitted. /** - * deserializeAws_json1_1InventoryItemAttributeList + * serializeAws_json1_1GetOpsSummaryRequest */ -const de_InventoryItemAttributeList = (output: any, context: __SerdeContext): InventoryItemAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InventoryItemAttribute(entry, context); - }); - return retVal; +const se_GetOpsSummaryRequest = (input: GetOpsSummaryRequest, context: __SerdeContext): any => { + return take(input, { + Aggregators: (_) => se_OpsAggregatorList(_, context), + Filters: _json, + MaxResults: [], + NextToken: [], + ResultAttributes: _json, + SyncName: [], + }); }; -/** - * deserializeAws_json1_1InventoryItemEntry - */ -const de_InventoryItemEntry = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_GetParameterHistoryRequest omitted. -/** - * deserializeAws_json1_1InventoryItemEntryList - */ -const de_InventoryItemEntryList = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InventoryItemEntry(entry, context); - }); - return retVal; -}; +// se_GetParameterRequest omitted. -/** - * deserializeAws_json1_1InventoryItemSchema - */ -const de_InventoryItemSchema = (output: any, context: __SerdeContext): InventoryItemSchema => { - return { - Attributes: output.Attributes != null ? de_InventoryItemAttributeList(output.Attributes, context) : undefined, - DisplayName: __expectString(output.DisplayName), - TypeName: __expectString(output.TypeName), - Version: __expectString(output.Version), - } as any; -}; +// se_GetParametersByPathRequest omitted. -/** - * deserializeAws_json1_1InventoryItemSchemaResultList - */ -const de_InventoryItemSchemaResultList = (output: any, context: __SerdeContext): InventoryItemSchema[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InventoryItemSchema(entry, context); - }); - return retVal; -}; +// se_GetParametersRequest omitted. + +// se_GetPatchBaselineForPatchGroupRequest omitted. + +// se_GetPatchBaselineRequest omitted. + +// se_GetResourcePoliciesRequest omitted. + +// se_GetServiceSettingRequest omitted. + +// se_InstanceAssociationOutputLocation omitted. + +// se_InstanceIdList omitted. + +// se_InstanceInformationFilter omitted. + +// se_InstanceInformationFilterList omitted. + +// se_InstanceInformationFilterValueSet omitted. + +// se_InstanceInformationStringFilter omitted. + +// se_InstanceInformationStringFilterList omitted. + +// se_InstancePatchStateFilter omitted. + +// se_InstancePatchStateFilterList omitted. + +// se_InstancePatchStateFilterValues omitted. /** - * deserializeAws_json1_1InventoryResultEntity + * serializeAws_json1_1InventoryAggregator */ -const de_InventoryResultEntity = (output: any, context: __SerdeContext): InventoryResultEntity => { - return { - Data: output.Data != null ? de_InventoryResultItemMap(output.Data, context) : undefined, - Id: __expectString(output.Id), - } as any; +const se_InventoryAggregator = (input: InventoryAggregator, context: __SerdeContext): any => { + return take(input, { + Aggregators: (_) => se_InventoryAggregatorList(_, context), + Expression: [], + Groups: _json, + }); }; /** - * deserializeAws_json1_1InventoryResultEntityList + * serializeAws_json1_1InventoryAggregatorList */ -const de_InventoryResultEntityList = (output: any, context: __SerdeContext): InventoryResultEntity[] => { - const retVal = (output || []) +const se_InventoryAggregatorList = (input: InventoryAggregator[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InventoryResultEntity(entry, context); + .map((entry) => { + return se_InventoryAggregator(entry, context); }); - return retVal; }; -/** - * deserializeAws_json1_1InventoryResultItem - */ -const de_InventoryResultItem = (output: any, context: __SerdeContext): InventoryResultItem => { - return { - CaptureTime: __expectString(output.CaptureTime), - Content: output.Content != null ? de_InventoryItemEntryList(output.Content, context) : undefined, - ContentHash: __expectString(output.ContentHash), - SchemaVersion: __expectString(output.SchemaVersion), - TypeName: __expectString(output.TypeName), - } as any; -}; +// se_InventoryFilter omitted. -/** - * deserializeAws_json1_1InventoryResultItemMap - */ -const de_InventoryResultItemMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_InventoryResultItem(value, context); - return acc; - }, {}); -}; +// se_InventoryFilterList omitted. -/** - * deserializeAws_json1_1InvocationDoesNotExist - */ -const de_InvocationDoesNotExist = (output: any, context: __SerdeContext): InvocationDoesNotExist => { - return {} as any; -}; +// se_InventoryFilterValueList omitted. -/** - * deserializeAws_json1_1ItemContentMismatchException - */ -const de_ItemContentMismatchException = (output: any, context: __SerdeContext): ItemContentMismatchException => { - return { - Message: __expectString(output.Message), - TypeName: __expectString(output.TypeName), - } as any; -}; +// se_InventoryGroup omitted. -/** - * deserializeAws_json1_1ItemSizeLimitExceededException - */ -const de_ItemSizeLimitExceededException = (output: any, context: __SerdeContext): ItemSizeLimitExceededException => { - return { - Message: __expectString(output.Message), - TypeName: __expectString(output.TypeName), - } as any; -}; +// se_InventoryGroupList omitted. -/** - * deserializeAws_json1_1LabelParameterVersionResult - */ -const de_LabelParameterVersionResult = (output: any, context: __SerdeContext): LabelParameterVersionResult => { - return { - InvalidLabels: output.InvalidLabels != null ? de_ParameterLabelList(output.InvalidLabels, context) : undefined, - ParameterVersion: __expectLong(output.ParameterVersion), - } as any; -}; +// se_InventoryItem omitted. -/** - * deserializeAws_json1_1ListAssociationsResult - */ -const de_ListAssociationsResult = (output: any, context: __SerdeContext): ListAssociationsResult => { - return { - Associations: output.Associations != null ? de_AssociationList(output.Associations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_InventoryItemContentContext omitted. -/** - * deserializeAws_json1_1ListAssociationVersionsResult - */ -const de_ListAssociationVersionsResult = (output: any, context: __SerdeContext): ListAssociationVersionsResult => { - return { - AssociationVersions: - output.AssociationVersions != null ? de_AssociationVersionList(output.AssociationVersions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_InventoryItemEntry omitted. -/** - * deserializeAws_json1_1ListCommandInvocationsResult - */ -const de_ListCommandInvocationsResult = (output: any, context: __SerdeContext): ListCommandInvocationsResult => { - return { - CommandInvocations: - output.CommandInvocations != null ? de_CommandInvocationList(output.CommandInvocations, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_InventoryItemEntryList omitted. -/** - * deserializeAws_json1_1ListCommandsResult - */ -const de_ListCommandsResult = (output: any, context: __SerdeContext): ListCommandsResult => { - return { - Commands: output.Commands != null ? de_CommandList(output.Commands, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_InventoryItemList omitted. -/** - * deserializeAws_json1_1ListComplianceItemsResult - */ -const de_ListComplianceItemsResult = (output: any, context: __SerdeContext): ListComplianceItemsResult => { - return { - ComplianceItems: - output.ComplianceItems != null ? de_ComplianceItemList(output.ComplianceItems, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_KeyList omitted. -/** - * deserializeAws_json1_1ListComplianceSummariesResult - */ -const de_ListComplianceSummariesResult = (output: any, context: __SerdeContext): ListComplianceSummariesResult => { - return { - ComplianceSummaryItems: - output.ComplianceSummaryItems != null - ? de_ComplianceSummaryItemList(output.ComplianceSummaryItems, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_LabelParameterVersionRequest omitted. -/** - * deserializeAws_json1_1ListDocumentMetadataHistoryResponse - */ -const de_ListDocumentMetadataHistoryResponse = ( - output: any, - context: __SerdeContext -): ListDocumentMetadataHistoryResponse => { - return { - Author: __expectString(output.Author), - DocumentVersion: __expectString(output.DocumentVersion), - Metadata: output.Metadata != null ? de_DocumentMetadataResponseInfo(output.Metadata, context) : undefined, - Name: __expectString(output.Name), - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListAssociationsRequest omitted. -/** - * deserializeAws_json1_1ListDocumentsResult - */ -const de_ListDocumentsResult = (output: any, context: __SerdeContext): ListDocumentsResult => { - return { - DocumentIdentifiers: - output.DocumentIdentifiers != null ? de_DocumentIdentifierList(output.DocumentIdentifiers, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListAssociationVersionsRequest omitted. -/** - * deserializeAws_json1_1ListDocumentVersionsResult - */ -const de_ListDocumentVersionsResult = (output: any, context: __SerdeContext): ListDocumentVersionsResult => { - return { - DocumentVersions: - output.DocumentVersions != null ? de_DocumentVersionList(output.DocumentVersions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_ListCommandInvocationsRequest omitted. -/** - * deserializeAws_json1_1ListInventoryEntriesResult - */ -const de_ListInventoryEntriesResult = (output: any, context: __SerdeContext): ListInventoryEntriesResult => { - return { - CaptureTime: __expectString(output.CaptureTime), - Entries: output.Entries != null ? de_InventoryItemEntryList(output.Entries, context) : undefined, - InstanceId: __expectString(output.InstanceId), - NextToken: __expectString(output.NextToken), - SchemaVersion: __expectString(output.SchemaVersion), - TypeName: __expectString(output.TypeName), - } as any; -}; +// se_ListCommandsRequest omitted. -/** - * deserializeAws_json1_1ListOpsItemEventsResponse - */ -const de_ListOpsItemEventsResponse = (output: any, context: __SerdeContext): ListOpsItemEventsResponse => { - return { - NextToken: __expectString(output.NextToken), - Summaries: output.Summaries != null ? de_OpsItemEventSummaries(output.Summaries, context) : undefined, - } as any; -}; +// se_ListComplianceItemsRequest omitted. -/** - * deserializeAws_json1_1ListOpsItemRelatedItemsResponse - */ -const de_ListOpsItemRelatedItemsResponse = (output: any, context: __SerdeContext): ListOpsItemRelatedItemsResponse => { - return { - NextToken: __expectString(output.NextToken), - Summaries: output.Summaries != null ? de_OpsItemRelatedItemSummaries(output.Summaries, context) : undefined, - } as any; -}; +// se_ListComplianceSummariesRequest omitted. -/** - * deserializeAws_json1_1ListOpsMetadataResult - */ -const de_ListOpsMetadataResult = (output: any, context: __SerdeContext): ListOpsMetadataResult => { - return { - NextToken: __expectString(output.NextToken), - OpsMetadataList: output.OpsMetadataList != null ? de_OpsMetadataList(output.OpsMetadataList, context) : undefined, - } as any; -}; +// se_ListDocumentMetadataHistoryRequest omitted. -/** - * deserializeAws_json1_1ListResourceComplianceSummariesResult - */ -const de_ListResourceComplianceSummariesResult = ( - output: any, - context: __SerdeContext -): ListResourceComplianceSummariesResult => { - return { - NextToken: __expectString(output.NextToken), - ResourceComplianceSummaryItems: - output.ResourceComplianceSummaryItems != null - ? de_ResourceComplianceSummaryItemList(output.ResourceComplianceSummaryItems, context) - : undefined, - } as any; -}; +// se_ListDocumentsRequest omitted. -/** - * deserializeAws_json1_1ListResourceDataSyncResult - */ -const de_ListResourceDataSyncResult = (output: any, context: __SerdeContext): ListResourceDataSyncResult => { - return { - NextToken: __expectString(output.NextToken), - ResourceDataSyncItems: - output.ResourceDataSyncItems != null - ? de_ResourceDataSyncItemList(output.ResourceDataSyncItems, context) - : undefined, - } as any; -}; +// se_ListDocumentVersionsRequest omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResult - */ -const de_ListTagsForResourceResult = (output: any, context: __SerdeContext): ListTagsForResourceResult => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// se_ListInventoryEntriesRequest omitted. -/** - * deserializeAws_json1_1LoggingInfo - */ -const de_LoggingInfo = (output: any, context: __SerdeContext): LoggingInfo => { - return { - S3BucketName: __expectString(output.S3BucketName), - S3KeyPrefix: __expectString(output.S3KeyPrefix), - S3Region: __expectString(output.S3Region), - } as any; -}; +// se_ListOpsItemEventsRequest omitted. -/** - * deserializeAws_json1_1MaintenanceWindowAutomationParameters - */ -const de_MaintenanceWindowAutomationParameters = ( - output: any, - context: __SerdeContext -): MaintenanceWindowAutomationParameters => { - return { - DocumentVersion: __expectString(output.DocumentVersion), - Parameters: output.Parameters != null ? de_AutomationParameterMap(output.Parameters, context) : undefined, - } as any; -}; +// se_ListOpsItemRelatedItemsRequest omitted. -/** - * deserializeAws_json1_1MaintenanceWindowExecution - */ -const de_MaintenanceWindowExecution = (output: any, context: __SerdeContext): MaintenanceWindowExecution => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - WindowExecutionId: __expectString(output.WindowExecutionId), - WindowId: __expectString(output.WindowId), - } as any; -}; +// se_ListOpsMetadataRequest omitted. -/** - * deserializeAws_json1_1MaintenanceWindowExecutionList - */ -const de_MaintenanceWindowExecutionList = (output: any, context: __SerdeContext): MaintenanceWindowExecution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowExecution(entry, context); - }); - return retVal; -}; +// se_ListResourceComplianceSummariesRequest omitted. + +// se_ListResourceDataSyncRequest omitted. + +// se_ListTagsForResourceRequest omitted. -/** - * deserializeAws_json1_1MaintenanceWindowExecutionTaskIdentity - */ -const de_MaintenanceWindowExecutionTaskIdentity = ( - output: any, - context: __SerdeContext -): MaintenanceWindowExecutionTaskIdentity => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TaskArn: __expectString(output.TaskArn), - TaskExecutionId: __expectString(output.TaskExecutionId), - TaskType: __expectString(output.TaskType), - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - WindowExecutionId: __expectString(output.WindowExecutionId), - } as any; -}; +// se_LoggingInfo omitted. -/** - * deserializeAws_json1_1MaintenanceWindowExecutionTaskIdentityList - */ -const de_MaintenanceWindowExecutionTaskIdentityList = ( - output: any, - context: __SerdeContext -): MaintenanceWindowExecutionTaskIdentity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowExecutionTaskIdentity(entry, context); - }); - return retVal; -}; +// se_MaintenanceWindowAutomationParameters omitted. -/** - * deserializeAws_json1_1MaintenanceWindowExecutionTaskIdList - */ -const de_MaintenanceWindowExecutionTaskIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_MaintenanceWindowFilter omitted. + +// se_MaintenanceWindowFilterList omitted. + +// se_MaintenanceWindowFilterValues omitted. /** - * deserializeAws_json1_1MaintenanceWindowExecutionTaskInvocationIdentity + * serializeAws_json1_1MaintenanceWindowLambdaParameters */ -const de_MaintenanceWindowExecutionTaskInvocationIdentity = ( - output: any, +const se_MaintenanceWindowLambdaParameters = ( + input: MaintenanceWindowLambdaParameters, context: __SerdeContext -): MaintenanceWindowExecutionTaskInvocationIdentity => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ExecutionId: __expectString(output.ExecutionId), - InvocationId: __expectString(output.InvocationId), - OwnerInformation: __expectString(output.OwnerInformation), - Parameters: __expectString(output.Parameters), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - StatusDetails: __expectString(output.StatusDetails), - TaskExecutionId: __expectString(output.TaskExecutionId), - TaskType: __expectString(output.TaskType), - WindowExecutionId: __expectString(output.WindowExecutionId), - WindowTargetId: __expectString(output.WindowTargetId), - } as any; +): any => { + return take(input, { + ClientContext: [], + Payload: context.base64Encoder, + Qualifier: [], + }); }; +// se_MaintenanceWindowRunCommandParameters omitted. + +// se_MaintenanceWindowStepFunctionsParameters omitted. + /** - * deserializeAws_json1_1MaintenanceWindowExecutionTaskInvocationIdentityList + * serializeAws_json1_1MaintenanceWindowTaskInvocationParameters */ -const de_MaintenanceWindowExecutionTaskInvocationIdentityList = ( - output: any, +const se_MaintenanceWindowTaskInvocationParameters = ( + input: MaintenanceWindowTaskInvocationParameters, context: __SerdeContext -): MaintenanceWindowExecutionTaskInvocationIdentity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowExecutionTaskInvocationIdentity(entry, context); - }); - return retVal; +): any => { + return take(input, { + Automation: _json, + Lambda: (_) => se_MaintenanceWindowLambdaParameters(_, context), + RunCommand: _json, + StepFunctions: _json, + }); }; -/** - * deserializeAws_json1_1MaintenanceWindowIdentity - */ -const de_MaintenanceWindowIdentity = (output: any, context: __SerdeContext): MaintenanceWindowIdentity => { - return { - Cutoff: __expectInt32(output.Cutoff), - Description: __expectString(output.Description), - Duration: __expectInt32(output.Duration), - Enabled: __expectBoolean(output.Enabled), - EndDate: __expectString(output.EndDate), - Name: __expectString(output.Name), - NextExecutionTime: __expectString(output.NextExecutionTime), - Schedule: __expectString(output.Schedule), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - ScheduleTimezone: __expectString(output.ScheduleTimezone), - StartDate: __expectString(output.StartDate), - WindowId: __expectString(output.WindowId), - } as any; -}; +// se_MaintenanceWindowTaskParameters omitted. + +// se_MaintenanceWindowTaskParameterValueExpression omitted. + +// se_MaintenanceWindowTaskParameterValueList omitted. + +// se_MetadataKeysToDeleteList omitted. + +// se_MetadataMap omitted. + +// se_MetadataValue omitted. + +// se_ModifyDocumentPermissionRequest omitted. + +// se_NotificationConfig omitted. + +// se_NotificationEventList omitted. /** - * deserializeAws_json1_1MaintenanceWindowIdentityForTarget + * serializeAws_json1_1OpsAggregator */ -const de_MaintenanceWindowIdentityForTarget = ( - output: any, - context: __SerdeContext -): MaintenanceWindowIdentityForTarget => { - return { - Name: __expectString(output.Name), - WindowId: __expectString(output.WindowId), - } as any; +const se_OpsAggregator = (input: OpsAggregator, context: __SerdeContext): any => { + return take(input, { + AggregatorType: [], + Aggregators: (_) => se_OpsAggregatorList(_, context), + AttributeName: [], + Filters: _json, + TypeName: [], + Values: _json, + }); }; /** - * deserializeAws_json1_1MaintenanceWindowIdentityList + * serializeAws_json1_1OpsAggregatorList */ -const de_MaintenanceWindowIdentityList = (output: any, context: __SerdeContext): MaintenanceWindowIdentity[] => { - const retVal = (output || []) +const se_OpsAggregatorList = (input: OpsAggregator[], context: __SerdeContext): any => { + return input .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowIdentity(entry, context); + .map((entry) => { + return se_OpsAggregator(entry, context); }); - return retVal; }; +// se_OpsAggregatorValueMap omitted. + +// se_OpsFilter omitted. + +// se_OpsFilterList omitted. + +// se_OpsFilterValueList omitted. + +// se_OpsItemDataValue omitted. + +// se_OpsItemEventFilter omitted. + +// se_OpsItemEventFilters omitted. + +// se_OpsItemEventFilterValues omitted. + +// se_OpsItemFilter omitted. + +// se_OpsItemFilters omitted. + +// se_OpsItemFilterValues omitted. + +// se_OpsItemNotification omitted. + +// se_OpsItemNotifications omitted. + +// se_OpsItemOperationalData omitted. + +// se_OpsItemOpsDataKeysList omitted. + +// se_OpsItemRelatedItemsFilter omitted. + +// se_OpsItemRelatedItemsFilters omitted. + +// se_OpsItemRelatedItemsFilterValues omitted. + +// se_OpsMetadataFilter omitted. + +// se_OpsMetadataFilterList omitted. + +// se_OpsMetadataFilterValueList omitted. + +// se_OpsResultAttribute omitted. + +// se_OpsResultAttributeList omitted. + +// se_ParameterLabelList omitted. + +// se_ParameterNameList omitted. + +// se_Parameters omitted. + +// se_ParametersFilter omitted. + +// se_ParametersFilterList omitted. + +// se_ParametersFilterValueList omitted. + +// se_ParameterStringFilter omitted. + +// se_ParameterStringFilterList omitted. + +// se_ParameterStringFilterValueList omitted. + +// se_ParameterValueList omitted. + +// se_PatchFilter omitted. + +// se_PatchFilterGroup omitted. + +// se_PatchFilterList omitted. + +// se_PatchFilterValueList omitted. + +// se_PatchIdList omitted. + +// se_PatchOrchestratorFilter omitted. + +// se_PatchOrchestratorFilterList omitted. + +// se_PatchOrchestratorFilterValues omitted. + +// se_PatchRule omitted. + +// se_PatchRuleGroup omitted. + +// se_PatchRuleList omitted. + +// se_PatchSource omitted. + +// se_PatchSourceList omitted. + +// se_PatchSourceProductList omitted. + /** - * deserializeAws_json1_1MaintenanceWindowLambdaParameters + * serializeAws_json1_1PutComplianceItemsRequest */ -const de_MaintenanceWindowLambdaParameters = ( - output: any, - context: __SerdeContext -): MaintenanceWindowLambdaParameters => { - return { - ClientContext: __expectString(output.ClientContext), - Payload: output.Payload != null ? context.base64Decoder(output.Payload) : undefined, - Qualifier: __expectString(output.Qualifier), - } as any; +const se_PutComplianceItemsRequest = (input: PutComplianceItemsRequest, context: __SerdeContext): any => { + return take(input, { + ComplianceType: [], + ExecutionSummary: (_) => se_ComplianceExecutionSummary(_, context), + ItemContentHash: [], + Items: _json, + ResourceId: [], + ResourceType: [], + UploadType: [], + }); }; +// se_PutInventoryRequest omitted. + +// se_PutParameterRequest omitted. + +// se_PutResourcePolicyRequest omitted. + +// se_Regions omitted. + +// se_RegisterDefaultPatchBaselineRequest omitted. + +// se_RegisterPatchBaselineForPatchGroupRequest omitted. + /** - * deserializeAws_json1_1MaintenanceWindowRunCommandParameters + * serializeAws_json1_1RegisterTargetWithMaintenanceWindowRequest */ -const de_MaintenanceWindowRunCommandParameters = ( - output: any, - context: __SerdeContext -): MaintenanceWindowRunCommandParameters => { - return { - CloudWatchOutputConfig: - output.CloudWatchOutputConfig != null - ? de_CloudWatchOutputConfig(output.CloudWatchOutputConfig, context) - : undefined, - Comment: __expectString(output.Comment), - DocumentHash: __expectString(output.DocumentHash), - DocumentHashType: __expectString(output.DocumentHashType), - DocumentVersion: __expectString(output.DocumentVersion), - NotificationConfig: - output.NotificationConfig != null ? de_NotificationConfig(output.NotificationConfig, context) : undefined, - OutputS3BucketName: __expectString(output.OutputS3BucketName), - OutputS3KeyPrefix: __expectString(output.OutputS3KeyPrefix), - Parameters: output.Parameters != null ? de_Parameters(output.Parameters, context) : undefined, - ServiceRoleArn: __expectString(output.ServiceRoleArn), - TimeoutSeconds: __expectInt32(output.TimeoutSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1MaintenanceWindowsForTargetList - */ -const de_MaintenanceWindowsForTargetList = ( - output: any, +const se_RegisterTargetWithMaintenanceWindowRequest = ( + input: RegisterTargetWithMaintenanceWindowRequest, context: __SerdeContext -): MaintenanceWindowIdentityForTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowIdentityForTarget(entry, context); - }); - return retVal; +): any => { + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + OwnerInformation: [], + ResourceType: [], + Targets: _json, + WindowId: [], + }); }; /** - * deserializeAws_json1_1MaintenanceWindowStepFunctionsParameters + * serializeAws_json1_1RegisterTaskWithMaintenanceWindowRequest */ -const de_MaintenanceWindowStepFunctionsParameters = ( - output: any, +const se_RegisterTaskWithMaintenanceWindowRequest = ( + input: RegisterTaskWithMaintenanceWindowRequest, context: __SerdeContext -): MaintenanceWindowStepFunctionsParameters => { - return { - Input: __expectString(output.Input), - Name: __expectString(output.Name), - } as any; +): any => { + return take(input, { + AlarmConfiguration: _json, + ClientToken: (_) => _ ?? generateIdempotencyToken(), + CutoffBehavior: [], + Description: [], + LoggingInfo: _json, + MaxConcurrency: [], + MaxErrors: [], + Name: [], + Priority: [], + ServiceRoleArn: [], + Targets: _json, + TaskArn: [], + TaskInvocationParameters: (_) => se_MaintenanceWindowTaskInvocationParameters(_, context), + TaskParameters: _json, + TaskType: [], + WindowId: [], + }); }; -/** - * deserializeAws_json1_1MaintenanceWindowTarget - */ -const de_MaintenanceWindowTarget = (output: any, context: __SerdeContext): MaintenanceWindowTarget => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - OwnerInformation: __expectString(output.OwnerInformation), - ResourceType: __expectString(output.ResourceType), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - WindowId: __expectString(output.WindowId), - WindowTargetId: __expectString(output.WindowTargetId), - } as any; -}; +// se_RegistrationMetadataItem omitted. -/** - * deserializeAws_json1_1MaintenanceWindowTargetList - */ -const de_MaintenanceWindowTargetList = (output: any, context: __SerdeContext): MaintenanceWindowTarget[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowTarget(entry, context); - }); - return retVal; -}; +// se_RegistrationMetadataList omitted. -/** - * deserializeAws_json1_1MaintenanceWindowTask - */ -const de_MaintenanceWindowTask = (output: any, context: __SerdeContext): MaintenanceWindowTask => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - CutoffBehavior: __expectString(output.CutoffBehavior), - Description: __expectString(output.Description), - LoggingInfo: output.LoggingInfo != null ? de_LoggingInfo(output.LoggingInfo, context) : undefined, - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TaskArn: __expectString(output.TaskArn), - TaskParameters: - output.TaskParameters != null ? de_MaintenanceWindowTaskParameters(output.TaskParameters, context) : undefined, - Type: __expectString(output.Type), - WindowId: __expectString(output.WindowId), - WindowTaskId: __expectString(output.WindowTaskId), - } as any; -}; +// se_RelatedOpsItem omitted. + +// se_RelatedOpsItems omitted. + +// se_RemoveTagsFromResourceRequest omitted. + +// se_ResetServiceSettingRequest omitted. + +// se_ResourceDataSyncAwsOrganizationsSource omitted. + +// se_ResourceDataSyncDestinationDataSharing omitted. + +// se_ResourceDataSyncOrganizationalUnit omitted. + +// se_ResourceDataSyncOrganizationalUnitList omitted. + +// se_ResourceDataSyncS3Destination omitted. + +// se_ResourceDataSyncSource omitted. + +// se_ResourceDataSyncSourceRegionList omitted. + +// se_ResultAttribute omitted. + +// se_ResultAttributeList omitted. + +// se_ResumeSessionRequest omitted. + +// se_Runbook omitted. + +// se_Runbooks omitted. + +// se_S3OutputLocation omitted. + +// se_SendAutomationSignalRequest omitted. + +// se_SendCommandRequest omitted. + +// se_SessionFilter omitted. + +// se_SessionFilterList omitted. + +// se_SessionManagerParameters omitted. + +// se_SessionManagerParameterValueList omitted. + +// se_StartAssociationsOnceRequest omitted. + +// se_StartAutomationExecutionRequest omitted. /** - * deserializeAws_json1_1MaintenanceWindowTaskInvocationParameters + * serializeAws_json1_1StartChangeRequestExecutionRequest */ -const de_MaintenanceWindowTaskInvocationParameters = ( - output: any, +const se_StartChangeRequestExecutionRequest = ( + input: StartChangeRequestExecutionRequest, context: __SerdeContext -): MaintenanceWindowTaskInvocationParameters => { - return { - Automation: - output.Automation != null ? de_MaintenanceWindowAutomationParameters(output.Automation, context) : undefined, - Lambda: output.Lambda != null ? de_MaintenanceWindowLambdaParameters(output.Lambda, context) : undefined, - RunCommand: - output.RunCommand != null ? de_MaintenanceWindowRunCommandParameters(output.RunCommand, context) : undefined, - StepFunctions: - output.StepFunctions != null - ? de_MaintenanceWindowStepFunctionsParameters(output.StepFunctions, context) - : undefined, - } as any; +): any => { + return take(input, { + AutoApprove: [], + ChangeDetails: [], + ChangeRequestName: [], + ClientToken: [], + DocumentName: [], + DocumentVersion: [], + Parameters: _json, + Runbooks: _json, + ScheduledEndTime: (_) => Math.round(_.getTime() / 1000), + ScheduledTime: (_) => Math.round(_.getTime() / 1000), + Tags: _json, + }); }; +// se_StartSessionRequest omitted. + +// se_StepExecutionFilter omitted. + +// se_StepExecutionFilterList omitted. + +// se_StepExecutionFilterValueList omitted. + +// se_StopAutomationExecutionRequest omitted. + +// se_StringList omitted. + +// se_Tag omitted. + +// se_TagList omitted. + +// se_Target omitted. + +// se_TargetLocation omitted. + +// se_TargetLocations omitted. + +// se_TargetMap omitted. + +// se_TargetMaps omitted. + +// se_TargetMapValueList omitted. + +// se_Targets omitted. + +// se_TargetValues omitted. + +// se_TerminateSessionRequest omitted. + +// se_UnlabelParameterVersionRequest omitted. + +// se_UpdateAssociationRequest omitted. + /** - * deserializeAws_json1_1MaintenanceWindowTaskList + * serializeAws_json1_1UpdateAssociationStatusRequest */ -const de_MaintenanceWindowTaskList = (output: any, context: __SerdeContext): MaintenanceWindowTask[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowTask(entry, context); - }); - return retVal; +const se_UpdateAssociationStatusRequest = (input: UpdateAssociationStatusRequest, context: __SerdeContext): any => { + return take(input, { + AssociationStatus: (_) => se_AssociationStatus(_, context), + InstanceId: [], + Name: [], + }); }; +// se_UpdateDocumentDefaultVersionRequest omitted. + +// se_UpdateDocumentMetadataRequest omitted. + +// se_UpdateDocumentRequest omitted. + +// se_UpdateMaintenanceWindowRequest omitted. + +// se_UpdateMaintenanceWindowTargetRequest omitted. + /** - * deserializeAws_json1_1MaintenanceWindowTaskParameters + * serializeAws_json1_1UpdateMaintenanceWindowTaskRequest */ -const de_MaintenanceWindowTaskParameters = ( - output: any, +const se_UpdateMaintenanceWindowTaskRequest = ( + input: UpdateMaintenanceWindowTaskRequest, context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MaintenanceWindowTaskParameterValueExpression(value, context); - return acc; - }, - {} - ); +): any => { + return take(input, { + AlarmConfiguration: _json, + CutoffBehavior: [], + Description: [], + LoggingInfo: _json, + MaxConcurrency: [], + MaxErrors: [], + Name: [], + Priority: [], + Replace: [], + ServiceRoleArn: [], + Targets: _json, + TaskArn: [], + TaskInvocationParameters: (_) => se_MaintenanceWindowTaskInvocationParameters(_, context), + TaskParameters: _json, + WindowId: [], + WindowTaskId: [], + }); }; +// se_UpdateManagedInstanceRoleRequest omitted. + /** - * deserializeAws_json1_1MaintenanceWindowTaskParametersList + * serializeAws_json1_1UpdateOpsItemRequest */ -const de_MaintenanceWindowTaskParametersList = ( - output: any, - context: __SerdeContext -): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MaintenanceWindowTaskParameters(entry, context); - }); - return retVal; +const se_UpdateOpsItemRequest = (input: UpdateOpsItemRequest, context: __SerdeContext): any => { + return take(input, { + ActualEndTime: (_) => Math.round(_.getTime() / 1000), + ActualStartTime: (_) => Math.round(_.getTime() / 1000), + Category: [], + Description: [], + Notifications: _json, + OperationalData: _json, + OperationalDataToDelete: _json, + OpsItemArn: [], + OpsItemId: [], + PlannedEndTime: (_) => Math.round(_.getTime() / 1000), + PlannedStartTime: (_) => Math.round(_.getTime() / 1000), + Priority: [], + RelatedOpsItems: _json, + Severity: [], + Status: [], + Title: [], + }); }; +// se_UpdateOpsMetadataRequest omitted. + +// se_UpdatePatchBaselineRequest omitted. + +// se_UpdateResourceDataSyncRequest omitted. + +// se_UpdateServiceSettingRequest omitted. + +// de_AccountIdList omitted. + +// de_Accounts omitted. + +// de_AccountSharingInfo omitted. + +// de_AccountSharingInfoList omitted. + /** - * deserializeAws_json1_1MaintenanceWindowTaskParameterValueExpression + * deserializeAws_json1_1Activation */ -const de_MaintenanceWindowTaskParameterValueExpression = ( - output: any, - context: __SerdeContext -): MaintenanceWindowTaskParameterValueExpression => { - return { - Values: output.Values != null ? de_MaintenanceWindowTaskParameterValueList(output.Values, context) : undefined, - } as any; +const de_Activation = (output: any, context: __SerdeContext): Activation => { + return take(output, { + ActivationId: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultInstanceName: __expectString, + Description: __expectString, + ExpirationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Expired: __expectBoolean, + IamRole: __expectString, + RegistrationLimit: __expectInt32, + RegistrationsCount: __expectInt32, + Tags: _json, + }) as any; }; /** - * deserializeAws_json1_1MaintenanceWindowTaskParameterValueList + * deserializeAws_json1_1ActivationList */ -const de_MaintenanceWindowTaskParameterValueList = (output: any, context: __SerdeContext): string[] => { +const de_ActivationList = (output: any, context: __SerdeContext): Activation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Activation(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1MaxDocumentSizeExceeded - */ -const de_MaxDocumentSizeExceeded = (output: any, context: __SerdeContext): MaxDocumentSizeExceeded => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AddTagsToResourceResult omitted. -/** - * deserializeAws_json1_1MetadataMap - */ -const de_MetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MetadataValue(value, context); - return acc; - }, {}); -}; +// de_Alarm omitted. -/** - * deserializeAws_json1_1MetadataValue - */ -const de_MetadataValue = (output: any, context: __SerdeContext): MetadataValue => { - return { - Value: __expectString(output.Value), - } as any; -}; +// de_AlarmConfiguration omitted. -/** - * deserializeAws_json1_1ModifyDocumentPermissionResponse - */ -const de_ModifyDocumentPermissionResponse = ( - output: any, - context: __SerdeContext -): ModifyDocumentPermissionResponse => { - return {} as any; -}; +// de_AlarmList omitted. -/** - * deserializeAws_json1_1NonCompliantSummary - */ -const de_NonCompliantSummary = (output: any, context: __SerdeContext): NonCompliantSummary => { - return { - NonCompliantCount: __expectInt32(output.NonCompliantCount), - SeveritySummary: output.SeveritySummary != null ? de_SeveritySummary(output.SeveritySummary, context) : undefined, - } as any; -}; +// de_AlarmStateInformation omitted. + +// de_AlarmStateInformationList omitted. + +// de_AlreadyExistsException omitted. + +// de_AssociatedInstances omitted. + +// de_AssociateOpsItemRelatedItemResponse omitted. /** - * deserializeAws_json1_1NormalStringMap + * deserializeAws_json1_1Association */ -const de_NormalStringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_Association = (output: any, context: __SerdeContext): Association => { + return take(output, { + AssociationId: __expectString, + AssociationName: __expectString, + AssociationVersion: __expectString, + DocumentVersion: __expectString, + InstanceId: __expectString, + LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Overview: _json, + ScheduleExpression: __expectString, + ScheduleOffset: __expectInt32, + TargetMaps: _json, + Targets: _json, + }) as any; }; +// de_AssociationAlreadyExists omitted. + /** - * deserializeAws_json1_1NotificationConfig + * deserializeAws_json1_1AssociationDescription */ -const de_NotificationConfig = (output: any, context: __SerdeContext): NotificationConfig => { - return { - NotificationArn: __expectString(output.NotificationArn), - NotificationEvents: - output.NotificationEvents != null ? de_NotificationEventList(output.NotificationEvents, context) : undefined, - NotificationType: __expectString(output.NotificationType), - } as any; +const de_AssociationDescription = (output: any, context: __SerdeContext): AssociationDescription => { + return take(output, { + AlarmConfiguration: _json, + ApplyOnlyAtCronInterval: __expectBoolean, + AssociationId: __expectString, + AssociationName: __expectString, + AssociationVersion: __expectString, + AutomationTargetParameterName: __expectString, + CalendarNames: _json, + ComplianceSeverity: __expectString, + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DocumentVersion: __expectString, + InstanceId: __expectString, + LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuccessfulExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastUpdateAssociationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Name: __expectString, + OutputLocation: _json, + Overview: _json, + Parameters: _json, + ScheduleExpression: __expectString, + ScheduleOffset: __expectInt32, + Status: (_: any) => de_AssociationStatus(_, context), + SyncCompliance: __expectString, + TargetLocations: _json, + TargetMaps: _json, + Targets: _json, + TriggeredAlarms: _json, + }) as any; }; /** - * deserializeAws_json1_1NotificationEventList + * deserializeAws_json1_1AssociationDescriptionList */ -const de_NotificationEventList = (output: any, context: __SerdeContext): (NotificationEvent | string)[] => { +const de_AssociationDescriptionList = (output: any, context: __SerdeContext): AssociationDescription[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_AssociationDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OpsEntity - */ -const de_OpsEntity = (output: any, context: __SerdeContext): OpsEntity => { - return { - Data: output.Data != null ? de_OpsEntityItemMap(output.Data, context) : undefined, - Id: __expectString(output.Id), - } as any; -}; +// de_AssociationDoesNotExist omitted. /** - * deserializeAws_json1_1OpsEntityItem + * deserializeAws_json1_1AssociationExecution */ -const de_OpsEntityItem = (output: any, context: __SerdeContext): OpsEntityItem => { - return { - CaptureTime: __expectString(output.CaptureTime), - Content: output.Content != null ? de_OpsEntityItemEntryList(output.Content, context) : undefined, - } as any; +const de_AssociationExecution = (output: any, context: __SerdeContext): AssociationExecution => { + return take(output, { + AlarmConfiguration: _json, + AssociationId: __expectString, + AssociationVersion: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DetailedStatus: __expectString, + ExecutionId: __expectString, + LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceCountByStatus: __expectString, + Status: __expectString, + TriggeredAlarms: _json, + }) as any; }; -/** - * deserializeAws_json1_1OpsEntityItemEntry - */ -const de_OpsEntityItemEntry = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AssociationExecutionDoesNotExist omitted. /** - * deserializeAws_json1_1OpsEntityItemEntryList + * deserializeAws_json1_1AssociationExecutionsList */ -const de_OpsEntityItemEntryList = (output: any, context: __SerdeContext): Record[] => { +const de_AssociationExecutionsList = (output: any, context: __SerdeContext): AssociationExecution[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsEntityItemEntry(entry, context); + return de_AssociationExecution(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1OpsEntityItemMap + * deserializeAws_json1_1AssociationExecutionTarget */ -const de_OpsEntityItemMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_OpsEntityItem(value, context); - return acc; - }, {}); +const de_AssociationExecutionTarget = (output: any, context: __SerdeContext): AssociationExecutionTarget => { + return take(output, { + AssociationId: __expectString, + AssociationVersion: __expectString, + DetailedStatus: __expectString, + ExecutionId: __expectString, + LastExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OutputSource: _json, + ResourceId: __expectString, + ResourceType: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsEntityList + * deserializeAws_json1_1AssociationExecutionTargetsList */ -const de_OpsEntityList = (output: any, context: __SerdeContext): OpsEntity[] => { +const de_AssociationExecutionTargetsList = (output: any, context: __SerdeContext): AssociationExecutionTarget[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsEntity(entry, context); + return de_AssociationExecutionTarget(entry, context); }); return retVal; }; +// de_AssociationLimitExceeded omitted. + /** - * deserializeAws_json1_1OpsItem + * deserializeAws_json1_1AssociationList */ -const de_OpsItem = (output: any, context: __SerdeContext): OpsItem => { - return { - ActualEndTime: - output.ActualEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ActualEndTime))) - : undefined, - ActualStartTime: - output.ActualStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ActualStartTime))) - : undefined, - Category: __expectString(output.Category), - CreatedBy: __expectString(output.CreatedBy), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Description: __expectString(output.Description), - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Notifications: output.Notifications != null ? de_OpsItemNotifications(output.Notifications, context) : undefined, - OperationalData: - output.OperationalData != null ? de_OpsItemOperationalData(output.OperationalData, context) : undefined, - OpsItemArn: __expectString(output.OpsItemArn), - OpsItemId: __expectString(output.OpsItemId), - OpsItemType: __expectString(output.OpsItemType), - PlannedEndTime: - output.PlannedEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PlannedEndTime))) - : undefined, - PlannedStartTime: - output.PlannedStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PlannedStartTime))) - : undefined, - Priority: __expectInt32(output.Priority), - RelatedOpsItems: output.RelatedOpsItems != null ? de_RelatedOpsItems(output.RelatedOpsItems, context) : undefined, - Severity: __expectString(output.Severity), - Source: __expectString(output.Source), - Status: __expectString(output.Status), - Title: __expectString(output.Title), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1OpsItemAccessDeniedException - */ -const de_OpsItemAccessDeniedException = (output: any, context: __SerdeContext): OpsItemAccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; +const de_AssociationList = (output: any, context: __SerdeContext): Association[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Association(entry, context); + }); + return retVal; }; +// de_AssociationOverview omitted. + /** - * deserializeAws_json1_1OpsItemAlreadyExistsException + * deserializeAws_json1_1AssociationStatus */ -const de_OpsItemAlreadyExistsException = (output: any, context: __SerdeContext): OpsItemAlreadyExistsException => { - return { - Message: __expectString(output.Message), - OpsItemId: __expectString(output.OpsItemId), - } as any; +const de_AssociationStatus = (output: any, context: __SerdeContext): AssociationStatus => { + return take(output, { + AdditionalInfo: __expectString, + Date: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Name: __expectString, + }) as any; }; +// de_AssociationStatusAggregatedCount omitted. + /** - * deserializeAws_json1_1OpsItemDataValue + * deserializeAws_json1_1AssociationVersionInfo */ -const de_OpsItemDataValue = (output: any, context: __SerdeContext): OpsItemDataValue => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +const de_AssociationVersionInfo = (output: any, context: __SerdeContext): AssociationVersionInfo => { + return take(output, { + ApplyOnlyAtCronInterval: __expectBoolean, + AssociationId: __expectString, + AssociationName: __expectString, + AssociationVersion: __expectString, + CalendarNames: _json, + ComplianceSeverity: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DocumentVersion: __expectString, + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Name: __expectString, + OutputLocation: _json, + Parameters: _json, + ScheduleExpression: __expectString, + ScheduleOffset: __expectInt32, + SyncCompliance: __expectString, + TargetLocations: _json, + TargetMaps: _json, + Targets: _json, + }) as any; +}; + +// de_AssociationVersionLimitExceeded omitted. /** - * deserializeAws_json1_1OpsItemEventSummaries + * deserializeAws_json1_1AssociationVersionList */ -const de_OpsItemEventSummaries = (output: any, context: __SerdeContext): OpsItemEventSummary[] => { +const de_AssociationVersionList = (output: any, context: __SerdeContext): AssociationVersionInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsItemEventSummary(entry, context); + return de_AssociationVersionInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1OpsItemEventSummary - */ -const de_OpsItemEventSummary = (output: any, context: __SerdeContext): OpsItemEventSummary => { - return { - CreatedBy: output.CreatedBy != null ? de_OpsItemIdentity(output.CreatedBy, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Detail: __expectString(output.Detail), - DetailType: __expectString(output.DetailType), - EventId: __expectString(output.EventId), - OpsItemId: __expectString(output.OpsItemId), - Source: __expectString(output.Source), - } as any; -}; +// de_AttachmentContent omitted. + +// de_AttachmentContentList omitted. + +// de_AttachmentInformation omitted. + +// de_AttachmentInformationList omitted. + +// de_AutomationDefinitionNotApprovedException omitted. + +// de_AutomationDefinitionNotFoundException omitted. + +// de_AutomationDefinitionVersionNotFoundException omitted. /** - * deserializeAws_json1_1OpsItemIdentity + * deserializeAws_json1_1AutomationExecution */ -const de_OpsItemIdentity = (output: any, context: __SerdeContext): OpsItemIdentity => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +const de_AutomationExecution = (output: any, context: __SerdeContext): AutomationExecution => { + return take(output, { + AlarmConfiguration: _json, + AssociationId: __expectString, + AutomationExecutionId: __expectString, + AutomationExecutionStatus: __expectString, + AutomationSubtype: __expectString, + ChangeRequestName: __expectString, + CurrentAction: __expectString, + CurrentStepName: __expectString, + DocumentName: __expectString, + DocumentVersion: __expectString, + ExecutedBy: __expectString, + ExecutionEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureMessage: __expectString, + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Mode: __expectString, + OpsItemId: __expectString, + Outputs: _json, + Parameters: _json, + ParentAutomationExecutionId: __expectString, + ProgressCounters: _json, + ResolvedTargets: _json, + Runbooks: _json, + ScheduledTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StepExecutions: (_: any) => de_StepExecutionList(_, context), + StepExecutionsTruncated: __expectBoolean, + Target: __expectString, + TargetLocations: _json, + TargetMaps: _json, + TargetParameterName: __expectString, + Targets: _json, + TriggeredAlarms: _json, + }) as any; +}; + +// de_AutomationExecutionLimitExceededException omitted. /** - * deserializeAws_json1_1OpsItemInvalidParameterException + * deserializeAws_json1_1AutomationExecutionMetadata */ -const de_OpsItemInvalidParameterException = ( - output: any, - context: __SerdeContext -): OpsItemInvalidParameterException => { - return { - Message: __expectString(output.Message), - ParameterNames: - output.ParameterNames != null ? de_OpsItemParameterNamesList(output.ParameterNames, context) : undefined, - } as any; +const de_AutomationExecutionMetadata = (output: any, context: __SerdeContext): AutomationExecutionMetadata => { + return take(output, { + AlarmConfiguration: _json, + AssociationId: __expectString, + AutomationExecutionId: __expectString, + AutomationExecutionStatus: __expectString, + AutomationSubtype: __expectString, + AutomationType: __expectString, + ChangeRequestName: __expectString, + CurrentAction: __expectString, + CurrentStepName: __expectString, + DocumentName: __expectString, + DocumentVersion: __expectString, + ExecutedBy: __expectString, + ExecutionEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureMessage: __expectString, + LogFile: __expectString, + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Mode: __expectString, + OpsItemId: __expectString, + Outputs: _json, + ParentAutomationExecutionId: __expectString, + ResolvedTargets: _json, + Runbooks: _json, + ScheduledTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Target: __expectString, + TargetMaps: _json, + TargetParameterName: __expectString, + Targets: _json, + TriggeredAlarms: _json, + }) as any; }; /** - * deserializeAws_json1_1OpsItemLimitExceededException + * deserializeAws_json1_1AutomationExecutionMetadataList */ -const de_OpsItemLimitExceededException = (output: any, context: __SerdeContext): OpsItemLimitExceededException => { - return { - Limit: __expectInt32(output.Limit), - LimitType: __expectString(output.LimitType), - Message: __expectString(output.Message), - ResourceTypes: - output.ResourceTypes != null ? de_OpsItemParameterNamesList(output.ResourceTypes, context) : undefined, - } as any; +const de_AutomationExecutionMetadataList = (output: any, context: __SerdeContext): AutomationExecutionMetadata[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AutomationExecutionMetadata(entry, context); + }); + return retVal; }; +// de_AutomationExecutionNotFoundException omitted. + +// de_AutomationParameterMap omitted. + +// de_AutomationParameterValueList omitted. + +// de_AutomationStepNotFoundException omitted. + +// de_CalendarNameOrARNList omitted. + +// de_CancelCommandResult omitted. + +// de_CancelMaintenanceWindowExecutionResult omitted. + +// de_CategoryEnumList omitted. + +// de_CategoryList omitted. + +// de_CloudWatchOutputConfig omitted. + /** - * deserializeAws_json1_1OpsItemNotFoundException + * deserializeAws_json1_1Command */ -const de_OpsItemNotFoundException = (output: any, context: __SerdeContext): OpsItemNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_Command = (output: any, context: __SerdeContext): Command => { + return take(output, { + AlarmConfiguration: _json, + CloudWatchOutputConfig: _json, + CommandId: __expectString, + Comment: __expectString, + CompletedCount: __expectInt32, + DeliveryTimedOutCount: __expectInt32, + DocumentName: __expectString, + DocumentVersion: __expectString, + ErrorCount: __expectInt32, + ExpiresAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InstanceIds: _json, + MaxConcurrency: __expectString, + MaxErrors: __expectString, + NotificationConfig: _json, + OutputS3BucketName: __expectString, + OutputS3KeyPrefix: __expectString, + OutputS3Region: __expectString, + Parameters: _json, + RequestedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServiceRole: __expectString, + Status: __expectString, + StatusDetails: __expectString, + TargetCount: __expectInt32, + Targets: _json, + TimeoutSeconds: __expectInt32, + TriggeredAlarms: _json, + }) as any; }; /** - * deserializeAws_json1_1OpsItemNotification + * deserializeAws_json1_1CommandInvocation */ -const de_OpsItemNotification = (output: any, context: __SerdeContext): OpsItemNotification => { - return { - Arn: __expectString(output.Arn), - } as any; +const de_CommandInvocation = (output: any, context: __SerdeContext): CommandInvocation => { + return take(output, { + CloudWatchOutputConfig: _json, + CommandId: __expectString, + CommandPlugins: (_: any) => de_CommandPluginList(_, context), + Comment: __expectString, + DocumentName: __expectString, + DocumentVersion: __expectString, + InstanceId: __expectString, + InstanceName: __expectString, + NotificationConfig: _json, + RequestedDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServiceRole: __expectString, + StandardErrorUrl: __expectString, + StandardOutputUrl: __expectString, + Status: __expectString, + StatusDetails: __expectString, + TraceOutput: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsItemNotifications + * deserializeAws_json1_1CommandInvocationList */ -const de_OpsItemNotifications = (output: any, context: __SerdeContext): OpsItemNotification[] => { +const de_CommandInvocationList = (output: any, context: __SerdeContext): CommandInvocation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsItemNotification(entry, context); + return de_CommandInvocation(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1OpsItemOperationalData - */ -const de_OpsItemOperationalData = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_OpsItemDataValue(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1OpsItemParameterNamesList + * deserializeAws_json1_1CommandList */ -const de_OpsItemParameterNamesList = (output: any, context: __SerdeContext): string[] => { +const de_CommandList = (output: any, context: __SerdeContext): Command[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_Command(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1OpsItemRelatedItemAlreadyExistsException - */ -const de_OpsItemRelatedItemAlreadyExistsException = ( - output: any, - context: __SerdeContext -): OpsItemRelatedItemAlreadyExistsException => { - return { - Message: __expectString(output.Message), - OpsItemId: __expectString(output.OpsItemId), - ResourceUri: __expectString(output.ResourceUri), - } as any; -}; - -/** - * deserializeAws_json1_1OpsItemRelatedItemAssociationNotFoundException + * deserializeAws_json1_1CommandPlugin */ -const de_OpsItemRelatedItemAssociationNotFoundException = ( - output: any, - context: __SerdeContext -): OpsItemRelatedItemAssociationNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; +const de_CommandPlugin = (output: any, context: __SerdeContext): CommandPlugin => { + return take(output, { + Name: __expectString, + Output: __expectString, + OutputS3BucketName: __expectString, + OutputS3KeyPrefix: __expectString, + OutputS3Region: __expectString, + ResponseCode: __expectInt32, + ResponseFinishDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResponseStartDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StandardErrorUrl: __expectString, + StandardOutputUrl: __expectString, + Status: __expectString, + StatusDetails: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsItemRelatedItemSummaries + * deserializeAws_json1_1CommandPluginList */ -const de_OpsItemRelatedItemSummaries = (output: any, context: __SerdeContext): OpsItemRelatedItemSummary[] => { +const de_CommandPluginList = (output: any, context: __SerdeContext): CommandPlugin[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsItemRelatedItemSummary(entry, context); + return de_CommandPlugin(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1OpsItemRelatedItemSummary + * deserializeAws_json1_1ComplianceExecutionSummary */ -const de_OpsItemRelatedItemSummary = (output: any, context: __SerdeContext): OpsItemRelatedItemSummary => { - return { - AssociationId: __expectString(output.AssociationId), - AssociationType: __expectString(output.AssociationType), - CreatedBy: output.CreatedBy != null ? de_OpsItemIdentity(output.CreatedBy, context) : undefined, - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastModifiedBy: output.LastModifiedBy != null ? de_OpsItemIdentity(output.LastModifiedBy, context) : undefined, - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - OpsItemId: __expectString(output.OpsItemId), - ResourceType: __expectString(output.ResourceType), - ResourceUri: __expectString(output.ResourceUri), - } as any; +const de_ComplianceExecutionSummary = (output: any, context: __SerdeContext): ComplianceExecutionSummary => { + return take(output, { + ExecutionId: __expectString, + ExecutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsItemSummaries + * deserializeAws_json1_1ComplianceItem */ -const de_OpsItemSummaries = (output: any, context: __SerdeContext): OpsItemSummary[] => { +const de_ComplianceItem = (output: any, context: __SerdeContext): ComplianceItem => { + return take(output, { + ComplianceType: __expectString, + Details: _json, + ExecutionSummary: (_: any) => de_ComplianceExecutionSummary(_, context), + Id: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + Severity: __expectString, + Status: __expectString, + Title: __expectString, + }) as any; +}; + +// de_ComplianceItemDetails omitted. + +/** + * deserializeAws_json1_1ComplianceItemList + */ +const de_ComplianceItemList = (output: any, context: __SerdeContext): ComplianceItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsItemSummary(entry, context); + return de_ComplianceItem(entry, context); }); return retVal; }; +// de_ComplianceSummaryItem omitted. + +// de_ComplianceSummaryItemList omitted. + +// de_ComplianceTypeCountLimitExceededException omitted. + +// de_CompliantSummary omitted. + +// de_CreateActivationResult omitted. + +// de_CreateAssociationBatchRequestEntry omitted. + /** - * deserializeAws_json1_1OpsItemSummary + * deserializeAws_json1_1CreateAssociationBatchResult */ -const de_OpsItemSummary = (output: any, context: __SerdeContext): OpsItemSummary => { - return { - ActualEndTime: - output.ActualEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ActualEndTime))) - : undefined, - ActualStartTime: - output.ActualStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ActualStartTime))) - : undefined, - Category: __expectString(output.Category), - CreatedBy: __expectString(output.CreatedBy), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - LastModifiedBy: __expectString(output.LastModifiedBy), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - OperationalData: - output.OperationalData != null ? de_OpsItemOperationalData(output.OperationalData, context) : undefined, - OpsItemId: __expectString(output.OpsItemId), - OpsItemType: __expectString(output.OpsItemType), - PlannedEndTime: - output.PlannedEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PlannedEndTime))) - : undefined, - PlannedStartTime: - output.PlannedStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PlannedStartTime))) - : undefined, - Priority: __expectInt32(output.Priority), - Severity: __expectString(output.Severity), - Source: __expectString(output.Source), - Status: __expectString(output.Status), - Title: __expectString(output.Title), - } as any; +const de_CreateAssociationBatchResult = (output: any, context: __SerdeContext): CreateAssociationBatchResult => { + return take(output, { + Failed: _json, + Successful: (_: any) => de_AssociationDescriptionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1OpsMetadata + * deserializeAws_json1_1CreateAssociationResult */ -const de_OpsMetadata = (output: any, context: __SerdeContext): OpsMetadata => { - return { - CreationDate: - output.CreationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationDate))) - : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - LastModifiedUser: __expectString(output.LastModifiedUser), - OpsMetadataArn: __expectString(output.OpsMetadataArn), - ResourceId: __expectString(output.ResourceId), - } as any; +const de_CreateAssociationResult = (output: any, context: __SerdeContext): CreateAssociationResult => { + return take(output, { + AssociationDescription: (_: any) => de_AssociationDescription(_, context), + }) as any; }; /** - * deserializeAws_json1_1OpsMetadataAlreadyExistsException + * deserializeAws_json1_1CreateDocumentResult */ -const de_OpsMetadataAlreadyExistsException = ( - output: any, - context: __SerdeContext -): OpsMetadataAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateDocumentResult = (output: any, context: __SerdeContext): CreateDocumentResult => { + return take(output, { + DocumentDescription: (_: any) => de_DocumentDescription(_, context), + }) as any; }; +// de_CreateMaintenanceWindowResult omitted. + +// de_CreateOpsItemResponse omitted. + +// de_CreateOpsMetadataResult omitted. + +// de_CreatePatchBaselineResult omitted. + +// de_CreateResourceDataSyncResult omitted. + +// de_CustomSchemaCountLimitExceededException omitted. + +// de_DeleteActivationResult omitted. + +// de_DeleteAssociationResult omitted. + +// de_DeleteDocumentResult omitted. + +// de_DeleteInventoryResult omitted. + +// de_DeleteMaintenanceWindowResult omitted. + +// de_DeleteOpsMetadataResult omitted. + +// de_DeleteParameterResult omitted. + +// de_DeleteParametersResult omitted. + +// de_DeletePatchBaselineResult omitted. + +// de_DeleteResourceDataSyncResult omitted. + +// de_DeleteResourcePolicyResponse omitted. + +// de_DeregisterManagedInstanceResult omitted. + +// de_DeregisterPatchBaselineForPatchGroupResult omitted. + +// de_DeregisterTargetFromMaintenanceWindowResult omitted. + +// de_DeregisterTaskFromMaintenanceWindowResult omitted. + /** - * deserializeAws_json1_1OpsMetadataInvalidArgumentException + * deserializeAws_json1_1DescribeActivationsResult */ -const de_OpsMetadataInvalidArgumentException = ( - output: any, - context: __SerdeContext -): OpsMetadataInvalidArgumentException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeActivationsResult = (output: any, context: __SerdeContext): DescribeActivationsResult => { + return take(output, { + ActivationList: (_: any) => de_ActivationList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsMetadataKeyLimitExceededException + * deserializeAws_json1_1DescribeAssociationExecutionsResult */ -const de_OpsMetadataKeyLimitExceededException = ( +const de_DescribeAssociationExecutionsResult = ( output: any, context: __SerdeContext -): OpsMetadataKeyLimitExceededException => { - return { - message: __expectString(output.message), - } as any; +): DescribeAssociationExecutionsResult => { + return take(output, { + AssociationExecutions: (_: any) => de_AssociationExecutionsList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsMetadataLimitExceededException + * deserializeAws_json1_1DescribeAssociationExecutionTargetsResult */ -const de_OpsMetadataLimitExceededException = ( +const de_DescribeAssociationExecutionTargetsResult = ( output: any, context: __SerdeContext -): OpsMetadataLimitExceededException => { - return { - message: __expectString(output.message), - } as any; +): DescribeAssociationExecutionTargetsResult => { + return take(output, { + AssociationExecutionTargets: (_: any) => de_AssociationExecutionTargetsList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsMetadataList + * deserializeAws_json1_1DescribeAssociationResult */ -const de_OpsMetadataList = (output: any, context: __SerdeContext): OpsMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OpsMetadata(entry, context); - }); - return retVal; +const de_DescribeAssociationResult = (output: any, context: __SerdeContext): DescribeAssociationResult => { + return take(output, { + AssociationDescription: (_: any) => de_AssociationDescription(_, context), + }) as any; }; /** - * deserializeAws_json1_1OpsMetadataNotFoundException + * deserializeAws_json1_1DescribeAutomationExecutionsResult */ -const de_OpsMetadataNotFoundException = (output: any, context: __SerdeContext): OpsMetadataNotFoundException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeAutomationExecutionsResult = ( + output: any, + context: __SerdeContext +): DescribeAutomationExecutionsResult => { + return take(output, { + AutomationExecutionMetadataList: (_: any) => de_AutomationExecutionMetadataList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1OpsMetadataTooManyUpdatesException + * deserializeAws_json1_1DescribeAutomationStepExecutionsResult */ -const de_OpsMetadataTooManyUpdatesException = ( +const de_DescribeAutomationStepExecutionsResult = ( output: any, context: __SerdeContext -): OpsMetadataTooManyUpdatesException => { - return { - message: __expectString(output.message), - } as any; +): DescribeAutomationStepExecutionsResult => { + return take(output, { + NextToken: __expectString, + StepExecutions: (_: any) => de_StepExecutionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1OutputSource + * deserializeAws_json1_1DescribeAvailablePatchesResult */ -const de_OutputSource = (output: any, context: __SerdeContext): OutputSource => { - return { - OutputSourceId: __expectString(output.OutputSourceId), - OutputSourceType: __expectString(output.OutputSourceType), - } as any; +const de_DescribeAvailablePatchesResult = (output: any, context: __SerdeContext): DescribeAvailablePatchesResult => { + return take(output, { + NextToken: __expectString, + Patches: (_: any) => de_PatchList(_, context), + }) as any; }; +// de_DescribeDocumentPermissionResponse omitted. + /** - * deserializeAws_json1_1Parameter + * deserializeAws_json1_1DescribeDocumentResult */ -const de_Parameter = (output: any, context: __SerdeContext): Parameter => { - return { - ARN: __expectString(output.ARN), - DataType: __expectString(output.DataType), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - Name: __expectString(output.Name), - Selector: __expectString(output.Selector), - SourceResult: __expectString(output.SourceResult), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - Version: __expectLong(output.Version), - } as any; +const de_DescribeDocumentResult = (output: any, context: __SerdeContext): DescribeDocumentResult => { + return take(output, { + Document: (_: any) => de_DocumentDescription(_, context), + }) as any; }; +// de_DescribeEffectiveInstanceAssociationsResult omitted. + /** - * deserializeAws_json1_1ParameterAlreadyExists + * deserializeAws_json1_1DescribeEffectivePatchesForPatchBaselineResult */ -const de_ParameterAlreadyExists = (output: any, context: __SerdeContext): ParameterAlreadyExists => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeEffectivePatchesForPatchBaselineResult = ( + output: any, + context: __SerdeContext +): DescribeEffectivePatchesForPatchBaselineResult => { + return take(output, { + EffectivePatches: (_: any) => de_EffectivePatchList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterHistory + * deserializeAws_json1_1DescribeInstanceAssociationsStatusResult */ -const de_ParameterHistory = (output: any, context: __SerdeContext): ParameterHistory => { - return { - AllowedPattern: __expectString(output.AllowedPattern), - DataType: __expectString(output.DataType), - Description: __expectString(output.Description), - KeyId: __expectString(output.KeyId), - Labels: output.Labels != null ? de_ParameterLabelList(output.Labels, context) : undefined, - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - LastModifiedUser: __expectString(output.LastModifiedUser), - Name: __expectString(output.Name), - Policies: output.Policies != null ? de_ParameterPolicyList(output.Policies, context) : undefined, - Tier: __expectString(output.Tier), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - Version: __expectLong(output.Version), - } as any; +const de_DescribeInstanceAssociationsStatusResult = ( + output: any, + context: __SerdeContext +): DescribeInstanceAssociationsStatusResult => { + return take(output, { + InstanceAssociationStatusInfos: (_: any) => de_InstanceAssociationStatusInfos(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterHistoryList + * deserializeAws_json1_1DescribeInstanceInformationResult */ -const de_ParameterHistoryList = (output: any, context: __SerdeContext): ParameterHistory[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterHistory(entry, context); - }); - return retVal; +const de_DescribeInstanceInformationResult = ( + output: any, + context: __SerdeContext +): DescribeInstanceInformationResult => { + return take(output, { + InstanceInformationList: (_: any) => de_InstanceInformationList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterInlinePolicy + * deserializeAws_json1_1DescribeInstancePatchesResult */ -const de_ParameterInlinePolicy = (output: any, context: __SerdeContext): ParameterInlinePolicy => { - return { - PolicyStatus: __expectString(output.PolicyStatus), - PolicyText: __expectString(output.PolicyText), - PolicyType: __expectString(output.PolicyType), - } as any; +const de_DescribeInstancePatchesResult = (output: any, context: __SerdeContext): DescribeInstancePatchesResult => { + return take(output, { + NextToken: __expectString, + Patches: (_: any) => de_PatchComplianceDataList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ParameterLabelList + * deserializeAws_json1_1DescribeInstancePatchStatesForPatchGroupResult */ -const de_ParameterLabelList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeInstancePatchStatesForPatchGroupResult = ( + output: any, + context: __SerdeContext +): DescribeInstancePatchStatesForPatchGroupResult => { + return take(output, { + InstancePatchStates: (_: any) => de_InstancePatchStatesList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterLimitExceeded + * deserializeAws_json1_1DescribeInstancePatchStatesResult */ -const de_ParameterLimitExceeded = (output: any, context: __SerdeContext): ParameterLimitExceeded => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeInstancePatchStatesResult = ( + output: any, + context: __SerdeContext +): DescribeInstancePatchStatesResult => { + return take(output, { + InstancePatchStates: (_: any) => de_InstancePatchStateList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterList + * deserializeAws_json1_1DescribeInventoryDeletionsResult */ -const de_ParameterList = (output: any, context: __SerdeContext): Parameter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Parameter(entry, context); - }); - return retVal; +const de_DescribeInventoryDeletionsResult = ( + output: any, + context: __SerdeContext +): DescribeInventoryDeletionsResult => { + return take(output, { + InventoryDeletions: (_: any) => de_InventoryDeletionsList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterMaxVersionLimitExceeded + * deserializeAws_json1_1DescribeMaintenanceWindowExecutionsResult */ -const de_ParameterMaxVersionLimitExceeded = ( +const de_DescribeMaintenanceWindowExecutionsResult = ( output: any, context: __SerdeContext -): ParameterMaxVersionLimitExceeded => { - return { - message: __expectString(output.message), - } as any; +): DescribeMaintenanceWindowExecutionsResult => { + return take(output, { + NextToken: __expectString, + WindowExecutions: (_: any) => de_MaintenanceWindowExecutionList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ParameterMetadata + * deserializeAws_json1_1DescribeMaintenanceWindowExecutionTaskInvocationsResult */ -const de_ParameterMetadata = (output: any, context: __SerdeContext): ParameterMetadata => { - return { - AllowedPattern: __expectString(output.AllowedPattern), - DataType: __expectString(output.DataType), - Description: __expectString(output.Description), - KeyId: __expectString(output.KeyId), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - LastModifiedUser: __expectString(output.LastModifiedUser), - Name: __expectString(output.Name), - Policies: output.Policies != null ? de_ParameterPolicyList(output.Policies, context) : undefined, - Tier: __expectString(output.Tier), - Type: __expectString(output.Type), - Version: __expectLong(output.Version), - } as any; +const de_DescribeMaintenanceWindowExecutionTaskInvocationsResult = ( + output: any, + context: __SerdeContext +): DescribeMaintenanceWindowExecutionTaskInvocationsResult => { + return take(output, { + NextToken: __expectString, + WindowExecutionTaskInvocationIdentities: (_: any) => + de_MaintenanceWindowExecutionTaskInvocationIdentityList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ParameterMetadataList + * deserializeAws_json1_1DescribeMaintenanceWindowExecutionTasksResult */ -const de_ParameterMetadataList = (output: any, context: __SerdeContext): ParameterMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterMetadata(entry, context); - }); - return retVal; +const de_DescribeMaintenanceWindowExecutionTasksResult = ( + output: any, + context: __SerdeContext +): DescribeMaintenanceWindowExecutionTasksResult => { + return take(output, { + NextToken: __expectString, + WindowExecutionTaskIdentities: (_: any) => de_MaintenanceWindowExecutionTaskIdentityList(_, context), + }) as any; }; +// de_DescribeMaintenanceWindowScheduleResult omitted. + +// de_DescribeMaintenanceWindowsForTargetResult omitted. + +// de_DescribeMaintenanceWindowsResult omitted. + +// de_DescribeMaintenanceWindowTargetsResult omitted. + +// de_DescribeMaintenanceWindowTasksResult omitted. + /** - * deserializeAws_json1_1ParameterNameList + * deserializeAws_json1_1DescribeOpsItemsResponse */ -const de_ParameterNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_DescribeOpsItemsResponse = (output: any, context: __SerdeContext): DescribeOpsItemsResponse => { + return take(output, { + NextToken: __expectString, + OpsItemSummaries: (_: any) => de_OpsItemSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ParameterNotFound + * deserializeAws_json1_1DescribeParametersResult */ -const de_ParameterNotFound = (output: any, context: __SerdeContext): ParameterNotFound => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeParametersResult = (output: any, context: __SerdeContext): DescribeParametersResult => { + return take(output, { + NextToken: __expectString, + Parameters: (_: any) => de_ParameterMetadataList(_, context), + }) as any; }; +// de_DescribePatchBaselinesResult omitted. + +// de_DescribePatchGroupsResult omitted. + +// de_DescribePatchGroupStateResult omitted. + +// de_DescribePatchPropertiesResult omitted. + /** - * deserializeAws_json1_1ParameterPatternMismatchException + * deserializeAws_json1_1DescribeSessionsResponse */ -const de_ParameterPatternMismatchException = ( - output: any, - context: __SerdeContext -): ParameterPatternMismatchException => { - return { - message: __expectString(output.message), - } as any; +const de_DescribeSessionsResponse = (output: any, context: __SerdeContext): DescribeSessionsResponse => { + return take(output, { + NextToken: __expectString, + Sessions: (_: any) => de_SessionList(_, context), + }) as any; }; +// de_DisassociateOpsItemRelatedItemResponse omitted. + +// de_DocumentAlreadyExists omitted. + +// de_DocumentDefaultVersionDescription omitted. + /** - * deserializeAws_json1_1ParameterPolicyList + * deserializeAws_json1_1DocumentDescription */ -const de_ParameterPolicyList = (output: any, context: __SerdeContext): ParameterInlinePolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ParameterInlinePolicy(entry, context); - }); - return retVal; +const de_DocumentDescription = (output: any, context: __SerdeContext): DocumentDescription => { + return take(output, { + ApprovedVersion: __expectString, + AttachmentsInformation: _json, + Author: __expectString, + Category: _json, + CategoryEnum: _json, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultVersion: __expectString, + Description: __expectString, + DisplayName: __expectString, + DocumentFormat: __expectString, + DocumentType: __expectString, + DocumentVersion: __expectString, + Hash: __expectString, + HashType: __expectString, + LatestVersion: __expectString, + Name: __expectString, + Owner: __expectString, + Parameters: _json, + PendingReviewVersion: __expectString, + PlatformTypes: _json, + Requires: _json, + ReviewInformation: (_: any) => de_ReviewInformationList(_, context), + ReviewStatus: __expectString, + SchemaVersion: __expectString, + Sha1: __expectString, + Status: __expectString, + StatusInformation: __expectString, + Tags: _json, + TargetType: __expectString, + VersionName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Parameters + * deserializeAws_json1_1DocumentIdentifier */ -const de_Parameters = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ParameterValueList(value, context); - return acc; - }, {}); +const de_DocumentIdentifier = (output: any, context: __SerdeContext): DocumentIdentifier => { + return take(output, { + Author: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + DocumentFormat: __expectString, + DocumentType: __expectString, + DocumentVersion: __expectString, + Name: __expectString, + Owner: __expectString, + PlatformTypes: _json, + Requires: _json, + ReviewStatus: __expectString, + SchemaVersion: __expectString, + Tags: _json, + TargetType: __expectString, + VersionName: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ParameterValueList + * deserializeAws_json1_1DocumentIdentifierList */ -const de_ParameterValueList = (output: any, context: __SerdeContext): string[] => { +const de_DocumentIdentifierList = (output: any, context: __SerdeContext): DocumentIdentifier[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DocumentIdentifier(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ParameterVersionLabelLimitExceeded - */ -const de_ParameterVersionLabelLimitExceeded = ( - output: any, - context: __SerdeContext -): ParameterVersionLabelLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_DocumentLimitExceeded omitted. /** - * deserializeAws_json1_1ParameterVersionNotFound + * deserializeAws_json1_1DocumentMetadataResponseInfo */ -const de_ParameterVersionNotFound = (output: any, context: __SerdeContext): ParameterVersionNotFound => { - return { - message: __expectString(output.message), - } as any; +const de_DocumentMetadataResponseInfo = (output: any, context: __SerdeContext): DocumentMetadataResponseInfo => { + return take(output, { + ReviewerResponse: (_: any) => de_DocumentReviewerResponseList(_, context), + }) as any; }; +// de_DocumentParameter omitted. + +// de_DocumentParameterList omitted. + +// de_DocumentPermissionLimit omitted. + +// de_DocumentRequires omitted. + +// de_DocumentRequiresList omitted. + +// de_DocumentReviewCommentList omitted. + +// de_DocumentReviewCommentSource omitted. + /** - * deserializeAws_json1_1Patch + * deserializeAws_json1_1DocumentReviewerResponseList */ -const de_Patch = (output: any, context: __SerdeContext): Patch => { - return { - AdvisoryIds: output.AdvisoryIds != null ? de_PatchAdvisoryIdList(output.AdvisoryIds, context) : undefined, - Arch: __expectString(output.Arch), - BugzillaIds: output.BugzillaIds != null ? de_PatchBugzillaIdList(output.BugzillaIds, context) : undefined, - CVEIds: output.CVEIds != null ? de_PatchCVEIdList(output.CVEIds, context) : undefined, - Classification: __expectString(output.Classification), - ContentUrl: __expectString(output.ContentUrl), - Description: __expectString(output.Description), - Epoch: __expectInt32(output.Epoch), - Id: __expectString(output.Id), - KbNumber: __expectString(output.KbNumber), - Language: __expectString(output.Language), - MsrcNumber: __expectString(output.MsrcNumber), - MsrcSeverity: __expectString(output.MsrcSeverity), - Name: __expectString(output.Name), - Product: __expectString(output.Product), - ProductFamily: __expectString(output.ProductFamily), - Release: __expectString(output.Release), - ReleaseDate: - output.ReleaseDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReleaseDate))) - : undefined, - Repository: __expectString(output.Repository), - Severity: __expectString(output.Severity), - Title: __expectString(output.Title), - Vendor: __expectString(output.Vendor), - Version: __expectString(output.Version), - } as any; -}; - -/** - * deserializeAws_json1_1PatchAdvisoryIdList - */ -const de_PatchAdvisoryIdList = (output: any, context: __SerdeContext): string[] => { +const de_DocumentReviewerResponseList = (output: any, context: __SerdeContext): DocumentReviewerResponseSource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DocumentReviewerResponseSource(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PatchBaselineIdentity + * deserializeAws_json1_1DocumentReviewerResponseSource */ -const de_PatchBaselineIdentity = (output: any, context: __SerdeContext): PatchBaselineIdentity => { - return { - BaselineDescription: __expectString(output.BaselineDescription), - BaselineId: __expectString(output.BaselineId), - BaselineName: __expectString(output.BaselineName), - DefaultBaseline: __expectBoolean(output.DefaultBaseline), - OperatingSystem: __expectString(output.OperatingSystem), - } as any; +const de_DocumentReviewerResponseSource = (output: any, context: __SerdeContext): DocumentReviewerResponseSource => { + return take(output, { + Comment: _json, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReviewStatus: __expectString, + Reviewer: __expectString, + UpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1PatchBaselineIdentityList + * deserializeAws_json1_1DocumentVersionInfo */ -const de_PatchBaselineIdentityList = (output: any, context: __SerdeContext): PatchBaselineIdentity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchBaselineIdentity(entry, context); - }); - return retVal; +const de_DocumentVersionInfo = (output: any, context: __SerdeContext): DocumentVersionInfo => { + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + DocumentFormat: __expectString, + DocumentVersion: __expectString, + IsDefaultVersion: __expectBoolean, + Name: __expectString, + ReviewStatus: __expectString, + Status: __expectString, + StatusInformation: __expectString, + VersionName: __expectString, + }) as any; }; +// de_DocumentVersionLimitExceeded omitted. + /** - * deserializeAws_json1_1PatchBugzillaIdList + * deserializeAws_json1_1DocumentVersionList */ -const de_PatchBugzillaIdList = (output: any, context: __SerdeContext): string[] => { +const de_DocumentVersionList = (output: any, context: __SerdeContext): DocumentVersionInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_DocumentVersionInfo(entry, context); }); return retVal; }; +// de_DoesNotExistException omitted. + +// de_DuplicateDocumentContent omitted. + +// de_DuplicateDocumentVersionName omitted. + +// de_DuplicateInstanceId omitted. + /** - * deserializeAws_json1_1PatchComplianceData + * deserializeAws_json1_1EffectivePatch */ -const de_PatchComplianceData = (output: any, context: __SerdeContext): PatchComplianceData => { - return { - CVEIds: __expectString(output.CVEIds), - Classification: __expectString(output.Classification), - InstalledTime: - output.InstalledTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InstalledTime))) - : undefined, - KBId: __expectString(output.KBId), - Severity: __expectString(output.Severity), - State: __expectString(output.State), - Title: __expectString(output.Title), - } as any; +const de_EffectivePatch = (output: any, context: __SerdeContext): EffectivePatch => { + return take(output, { + Patch: (_: any) => de_Patch(_, context), + PatchStatus: (_: any) => de_PatchStatus(_, context), + }) as any; }; /** - * deserializeAws_json1_1PatchComplianceDataList + * deserializeAws_json1_1EffectivePatchList */ -const de_PatchComplianceDataList = (output: any, context: __SerdeContext): PatchComplianceData[] => { +const de_EffectivePatchList = (output: any, context: __SerdeContext): EffectivePatch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchComplianceData(entry, context); + return de_EffectivePatch(entry, context); }); return retVal; }; +// de_FailedCreateAssociation omitted. + +// de_FailedCreateAssociationList omitted. + +// de_FailureDetails omitted. + +// de_FeatureNotAvailableException omitted. + /** - * deserializeAws_json1_1PatchCVEIdList + * deserializeAws_json1_1GetAutomationExecutionResult */ -const de_PatchCVEIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetAutomationExecutionResult = (output: any, context: __SerdeContext): GetAutomationExecutionResult => { + return take(output, { + AutomationExecution: (_: any) => de_AutomationExecution(_, context), + }) as any; }; +// de_GetCalendarStateResponse omitted. + +// de_GetCommandInvocationResult omitted. + +// de_GetConnectionStatusResponse omitted. + +// de_GetDefaultPatchBaselineResult omitted. + +// de_GetDeployablePatchSnapshotForInstanceResult omitted. + /** - * deserializeAws_json1_1PatchFilter + * deserializeAws_json1_1GetDocumentResult */ -const de_PatchFilter = (output: any, context: __SerdeContext): PatchFilter => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_PatchFilterValueList(output.Values, context) : undefined, - } as any; +const de_GetDocumentResult = (output: any, context: __SerdeContext): GetDocumentResult => { + return take(output, { + AttachmentsContent: _json, + Content: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + DocumentFormat: __expectString, + DocumentType: __expectString, + DocumentVersion: __expectString, + Name: __expectString, + Requires: _json, + ReviewStatus: __expectString, + Status: __expectString, + StatusInformation: __expectString, + VersionName: __expectString, + }) as any; }; +// de_GetInventoryResult omitted. + +// de_GetInventorySchemaResult omitted. + /** - * deserializeAws_json1_1PatchFilterGroup + * deserializeAws_json1_1GetMaintenanceWindowExecutionResult */ -const de_PatchFilterGroup = (output: any, context: __SerdeContext): PatchFilterGroup => { - return { - PatchFilters: output.PatchFilters != null ? de_PatchFilterList(output.PatchFilters, context) : undefined, - } as any; +const de_GetMaintenanceWindowExecutionResult = ( + output: any, + context: __SerdeContext +): GetMaintenanceWindowExecutionResult => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDetails: __expectString, + TaskIds: _json, + WindowExecutionId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PatchFilterList + * deserializeAws_json1_1GetMaintenanceWindowExecutionTaskInvocationResult */ -const de_PatchFilterList = (output: any, context: __SerdeContext): PatchFilter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchFilter(entry, context); - }); - return retVal; +const de_GetMaintenanceWindowExecutionTaskInvocationResult = ( + output: any, + context: __SerdeContext +): GetMaintenanceWindowExecutionTaskInvocationResult => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionId: __expectString, + InvocationId: __expectString, + OwnerInformation: __expectString, + Parameters: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDetails: __expectString, + TaskExecutionId: __expectString, + TaskType: __expectString, + WindowExecutionId: __expectString, + WindowTargetId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PatchFilterValueList + * deserializeAws_json1_1GetMaintenanceWindowExecutionTaskResult */ -const de_PatchFilterValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetMaintenanceWindowExecutionTaskResult = ( + output: any, + context: __SerdeContext +): GetMaintenanceWindowExecutionTaskResult => { + return take(output, { + AlarmConfiguration: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Priority: __expectInt32, + ServiceRole: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDetails: __expectString, + TaskArn: __expectString, + TaskExecutionId: __expectString, + TaskParameters: _json, + TriggeredAlarms: _json, + Type: __expectString, + WindowExecutionId: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1GetMaintenanceWindowResult + */ +const de_GetMaintenanceWindowResult = (output: any, context: __SerdeContext): GetMaintenanceWindowResult => { + return take(output, { + AllowUnassociatedTargets: __expectBoolean, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Cutoff: __expectInt32, + Description: __expectString, + Duration: __expectInt32, + Enabled: __expectBoolean, + EndDate: __expectString, + ModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + NextExecutionTime: __expectString, + Schedule: __expectString, + ScheduleOffset: __expectInt32, + ScheduleTimezone: __expectString, + StartDate: __expectString, + WindowId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PatchGroupList + * deserializeAws_json1_1GetMaintenanceWindowTaskResult */ -const de_PatchGroupList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetMaintenanceWindowTaskResult = (output: any, context: __SerdeContext): GetMaintenanceWindowTaskResult => { + return take(output, { + AlarmConfiguration: _json, + CutoffBehavior: __expectString, + Description: __expectString, + LoggingInfo: _json, + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Name: __expectString, + Priority: __expectInt32, + ServiceRoleArn: __expectString, + Targets: _json, + TaskArn: __expectString, + TaskInvocationParameters: (_: any) => de_MaintenanceWindowTaskInvocationParameters(_, context), + TaskParameters: _json, + TaskType: __expectString, + WindowId: __expectString, + WindowTaskId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PatchGroupPatchBaselineMapping + * deserializeAws_json1_1GetOpsItemResponse */ -const de_PatchGroupPatchBaselineMapping = (output: any, context: __SerdeContext): PatchGroupPatchBaselineMapping => { - return { - BaselineIdentity: - output.BaselineIdentity != null ? de_PatchBaselineIdentity(output.BaselineIdentity, context) : undefined, - PatchGroup: __expectString(output.PatchGroup), - } as any; +const de_GetOpsItemResponse = (output: any, context: __SerdeContext): GetOpsItemResponse => { + return take(output, { + OpsItem: (_: any) => de_OpsItem(_, context), + }) as any; }; +// de_GetOpsMetadataResult omitted. + +// de_GetOpsSummaryResult omitted. + /** - * deserializeAws_json1_1PatchGroupPatchBaselineMappingList + * deserializeAws_json1_1GetParameterHistoryResult */ -const de_PatchGroupPatchBaselineMappingList = ( - output: any, - context: __SerdeContext -): PatchGroupPatchBaselineMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchGroupPatchBaselineMapping(entry, context); - }); - return retVal; +const de_GetParameterHistoryResult = (output: any, context: __SerdeContext): GetParameterHistoryResult => { + return take(output, { + NextToken: __expectString, + Parameters: (_: any) => de_ParameterHistoryList(_, context), + }) as any; }; /** - * deserializeAws_json1_1PatchIdList + * deserializeAws_json1_1GetParameterResult */ -const de_PatchIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_GetParameterResult = (output: any, context: __SerdeContext): GetParameterResult => { + return take(output, { + Parameter: (_: any) => de_Parameter(_, context), + }) as any; }; /** - * deserializeAws_json1_1PatchList + * deserializeAws_json1_1GetParametersByPathResult */ -const de_PatchList = (output: any, context: __SerdeContext): Patch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Patch(entry, context); - }); - return retVal; +const de_GetParametersByPathResult = (output: any, context: __SerdeContext): GetParametersByPathResult => { + return take(output, { + NextToken: __expectString, + Parameters: (_: any) => de_ParameterList(_, context), + }) as any; }; /** - * deserializeAws_json1_1PatchPropertiesList + * deserializeAws_json1_1GetParametersResult */ -const de_PatchPropertiesList = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchPropertyEntry(entry, context); - }); - return retVal; +const de_GetParametersResult = (output: any, context: __SerdeContext): GetParametersResult => { + return take(output, { + InvalidParameters: _json, + Parameters: (_: any) => de_ParameterList(_, context), + }) as any; }; +// de_GetPatchBaselineForPatchGroupResult omitted. + /** - * deserializeAws_json1_1PatchPropertyEntry + * deserializeAws_json1_1GetPatchBaselineResult */ -const de_PatchPropertyEntry = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); +const de_GetPatchBaselineResult = (output: any, context: __SerdeContext): GetPatchBaselineResult => { + return take(output, { + ApprovalRules: _json, + ApprovedPatches: _json, + ApprovedPatchesComplianceLevel: __expectString, + ApprovedPatchesEnableNonSecurity: __expectBoolean, + BaselineId: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + GlobalFilters: _json, + ModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OperatingSystem: __expectString, + PatchGroups: _json, + RejectedPatches: _json, + RejectedPatchesAction: __expectString, + Sources: _json, + }) as any; }; +// de_GetResourcePoliciesResponse omitted. + +// de_GetResourcePoliciesResponseEntries omitted. + +// de_GetResourcePoliciesResponseEntry omitted. + /** - * deserializeAws_json1_1PatchRule + * deserializeAws_json1_1GetServiceSettingResult */ -const de_PatchRule = (output: any, context: __SerdeContext): PatchRule => { - return { - ApproveAfterDays: __expectInt32(output.ApproveAfterDays), - ApproveUntilDate: __expectString(output.ApproveUntilDate), - ComplianceLevel: __expectString(output.ComplianceLevel), - EnableNonSecurity: __expectBoolean(output.EnableNonSecurity), - PatchFilterGroup: - output.PatchFilterGroup != null ? de_PatchFilterGroup(output.PatchFilterGroup, context) : undefined, - } as any; +const de_GetServiceSettingResult = (output: any, context: __SerdeContext): GetServiceSettingResult => { + return take(output, { + ServiceSetting: (_: any) => de_ServiceSetting(_, context), + }) as any; }; +// de_HierarchyLevelLimitExceededException omitted. + +// de_HierarchyTypeMismatchException omitted. + +// de_IdempotentParameterMismatch omitted. + +// de_IncompatiblePolicyException omitted. + +// de_InstanceAggregatedAssociationOverview omitted. + +// de_InstanceAssociation omitted. + +// de_InstanceAssociationList omitted. + +// de_InstanceAssociationOutputLocation omitted. + +// de_InstanceAssociationOutputUrl omitted. + +// de_InstanceAssociationStatusAggregatedCount omitted. + /** - * deserializeAws_json1_1PatchRuleGroup + * deserializeAws_json1_1InstanceAssociationStatusInfo */ -const de_PatchRuleGroup = (output: any, context: __SerdeContext): PatchRuleGroup => { - return { - PatchRules: output.PatchRules != null ? de_PatchRuleList(output.PatchRules, context) : undefined, - } as any; +const de_InstanceAssociationStatusInfo = (output: any, context: __SerdeContext): InstanceAssociationStatusInfo => { + return take(output, { + AssociationId: __expectString, + AssociationName: __expectString, + AssociationVersion: __expectString, + DetailedStatus: __expectString, + DocumentVersion: __expectString, + ErrorCode: __expectString, + ExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionSummary: __expectString, + InstanceId: __expectString, + Name: __expectString, + OutputUrl: _json, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PatchRuleList + * deserializeAws_json1_1InstanceAssociationStatusInfos */ -const de_PatchRuleList = (output: any, context: __SerdeContext): PatchRule[] => { +const de_InstanceAssociationStatusInfos = (output: any, context: __SerdeContext): InstanceAssociationStatusInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchRule(entry, context); + return de_InstanceAssociationStatusInfo(entry, context); }); return retVal; }; +// de_InstanceIdList omitted. + /** - * deserializeAws_json1_1PatchSource + * deserializeAws_json1_1InstanceInformation */ -const de_PatchSource = (output: any, context: __SerdeContext): PatchSource => { - return { - Configuration: __expectString(output.Configuration), - Name: __expectString(output.Name), - Products: output.Products != null ? de_PatchSourceProductList(output.Products, context) : undefined, - } as any; +const de_InstanceInformation = (output: any, context: __SerdeContext): InstanceInformation => { + return take(output, { + ActivationId: __expectString, + AgentVersion: __expectString, + AssociationOverview: _json, + AssociationStatus: __expectString, + ComputerName: __expectString, + IPAddress: __expectString, + IamRole: __expectString, + InstanceId: __expectString, + IsLatestVersion: __expectBoolean, + LastAssociationExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastPingDateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSuccessfulAssociationExecutionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + PingStatus: __expectString, + PlatformName: __expectString, + PlatformType: __expectString, + PlatformVersion: __expectString, + RegistrationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceType: __expectString, + SourceId: __expectString, + SourceType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1PatchSourceList + * deserializeAws_json1_1InstanceInformationList */ -const de_PatchSourceList = (output: any, context: __SerdeContext): PatchSource[] => { +const de_InstanceInformationList = (output: any, context: __SerdeContext): InstanceInformation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PatchSource(entry, context); + return de_InstanceInformation(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PatchSourceProductList + * deserializeAws_json1_1InstancePatchState + */ +const de_InstancePatchState = (output: any, context: __SerdeContext): InstancePatchState => { + return take(output, { + BaselineId: __expectString, + CriticalNonCompliantCount: __expectInt32, + FailedCount: __expectInt32, + InstallOverrideList: __expectString, + InstalledCount: __expectInt32, + InstalledOtherCount: __expectInt32, + InstalledPendingRebootCount: __expectInt32, + InstalledRejectedCount: __expectInt32, + InstanceId: __expectString, + LastNoRebootInstallOperationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MissingCount: __expectInt32, + NotApplicableCount: __expectInt32, + Operation: __expectString, + OperationEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OperationStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OtherNonCompliantCount: __expectInt32, + OwnerInformation: __expectString, + PatchGroup: __expectString, + RebootOption: __expectString, + SecurityNonCompliantCount: __expectInt32, + SnapshotId: __expectString, + UnreportedNotApplicableCount: __expectInt32, + }) as any; +}; + +/** + * deserializeAws_json1_1InstancePatchStateList */ -const de_PatchSourceProductList = (output: any, context: __SerdeContext): string[] => { +const de_InstancePatchStateList = (output: any, context: __SerdeContext): InstancePatchState[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_InstancePatchState(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1PatchStatus - */ -const de_PatchStatus = (output: any, context: __SerdeContext): PatchStatus => { - return { - ApprovalDate: - output.ApprovalDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ApprovalDate))) - : undefined, - ComplianceLevel: __expectString(output.ComplianceLevel), - DeploymentStatus: __expectString(output.DeploymentStatus), - } as any; -}; - -/** - * deserializeAws_json1_1PlatformTypeList + * deserializeAws_json1_1InstancePatchStatesList */ -const de_PlatformTypeList = (output: any, context: __SerdeContext): (PlatformType | string)[] => { +const de_InstancePatchStatesList = (output: any, context: __SerdeContext): InstancePatchState[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_InstancePatchState(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1PoliciesLimitExceededException - */ -const de_PoliciesLimitExceededException = (output: any, context: __SerdeContext): PoliciesLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1ProgressCounters - */ -const de_ProgressCounters = (output: any, context: __SerdeContext): ProgressCounters => { - return { - CancelledSteps: __expectInt32(output.CancelledSteps), - FailedSteps: __expectInt32(output.FailedSteps), - SuccessSteps: __expectInt32(output.SuccessSteps), - TimedOutSteps: __expectInt32(output.TimedOutSteps), - TotalSteps: __expectInt32(output.TotalSteps), - } as any; -}; +// de_InvalidActivation omitted. -/** - * deserializeAws_json1_1PutComplianceItemsResult - */ -const de_PutComplianceItemsResult = (output: any, context: __SerdeContext): PutComplianceItemsResult => { - return {} as any; -}; +// de_InvalidActivationId omitted. -/** - * deserializeAws_json1_1PutInventoryResult - */ -const de_PutInventoryResult = (output: any, context: __SerdeContext): PutInventoryResult => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidAggregatorException omitted. -/** - * deserializeAws_json1_1PutParameterResult - */ -const de_PutParameterResult = (output: any, context: __SerdeContext): PutParameterResult => { - return { - Tier: __expectString(output.Tier), - Version: __expectLong(output.Version), - } as any; -}; +// de_InvalidAllowedPatternException omitted. -/** - * deserializeAws_json1_1PutResourcePolicyResponse - */ -const de_PutResourcePolicyResponse = (output: any, context: __SerdeContext): PutResourcePolicyResponse => { - return { - PolicyHash: __expectString(output.PolicyHash), - PolicyId: __expectString(output.PolicyId), - } as any; -}; +// de_InvalidAssociation omitted. + +// de_InvalidAssociationVersion omitted. + +// de_InvalidAutomationExecutionParametersException omitted. + +// de_InvalidAutomationSignalException omitted. + +// de_InvalidAutomationStatusUpdateException omitted. + +// de_InvalidCommandId omitted. + +// de_InvalidDeleteInventoryParametersException omitted. + +// de_InvalidDeletionIdException omitted. + +// de_InvalidDocument omitted. + +// de_InvalidDocumentContent omitted. + +// de_InvalidDocumentOperation omitted. + +// de_InvalidDocumentSchemaVersion omitted. + +// de_InvalidDocumentType omitted. + +// de_InvalidDocumentVersion omitted. + +// de_InvalidFilter omitted. + +// de_InvalidFilterKey omitted. + +// de_InvalidFilterOption omitted. + +// de_InvalidFilterValue omitted. + +// de_InvalidInstanceId omitted. + +// de_InvalidInstanceInformationFilterValue omitted. + +// de_InvalidInventoryGroupException omitted. + +// de_InvalidInventoryItemContextException omitted. + +// de_InvalidInventoryRequestException omitted. + +// de_InvalidItemContentException omitted. + +// de_InvalidKeyId omitted. + +// de_InvalidNextToken omitted. + +// de_InvalidNotificationConfig omitted. + +// de_InvalidOptionException omitted. + +// de_InvalidOutputFolder omitted. + +// de_InvalidOutputLocation omitted. + +// de_InvalidParameters omitted. + +// de_InvalidPermissionType omitted. + +// de_InvalidPluginName omitted. + +// de_InvalidPolicyAttributeException omitted. + +// de_InvalidPolicyTypeException omitted. + +// de_InvalidResourceId omitted. + +// de_InvalidResourceType omitted. + +// de_InvalidResultAttributeException omitted. + +// de_InvalidRole omitted. + +// de_InvalidSchedule omitted. + +// de_InvalidTag omitted. + +// de_InvalidTarget omitted. + +// de_InvalidTargetMaps omitted. + +// de_InvalidTypeNameException omitted. + +// de_InvalidUpdate omitted. /** - * deserializeAws_json1_1Regions + * deserializeAws_json1_1InventoryDeletionsList */ -const de_Regions = (output: any, context: __SerdeContext): string[] => { +const de_InventoryDeletionsList = (output: any, context: __SerdeContext): InventoryDeletionStatusItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_InventoryDeletionStatusItem(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1RegisterDefaultPatchBaselineResult + * deserializeAws_json1_1InventoryDeletionStatusItem */ -const de_RegisterDefaultPatchBaselineResult = ( - output: any, - context: __SerdeContext -): RegisterDefaultPatchBaselineResult => { - return { - BaselineId: __expectString(output.BaselineId), - } as any; +const de_InventoryDeletionStatusItem = (output: any, context: __SerdeContext): InventoryDeletionStatusItem => { + return take(output, { + DeletionId: __expectString, + DeletionStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DeletionSummary: _json, + LastStatus: __expectString, + LastStatusMessage: __expectString, + LastStatusUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TypeName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1RegisterPatchBaselineForPatchGroupResult - */ -const de_RegisterPatchBaselineForPatchGroupResult = ( - output: any, - context: __SerdeContext -): RegisterPatchBaselineForPatchGroupResult => { - return { - BaselineId: __expectString(output.BaselineId), - PatchGroup: __expectString(output.PatchGroup), - } as any; -}; +// de_InventoryDeletionSummary omitted. -/** - * deserializeAws_json1_1RegisterTargetWithMaintenanceWindowResult - */ -const de_RegisterTargetWithMaintenanceWindowResult = ( - output: any, - context: __SerdeContext -): RegisterTargetWithMaintenanceWindowResult => { - return { - WindowTargetId: __expectString(output.WindowTargetId), - } as any; -}; +// de_InventoryDeletionSummaryItem omitted. -/** - * deserializeAws_json1_1RegisterTaskWithMaintenanceWindowResult - */ -const de_RegisterTaskWithMaintenanceWindowResult = ( - output: any, - context: __SerdeContext -): RegisterTaskWithMaintenanceWindowResult => { - return { - WindowTaskId: __expectString(output.WindowTaskId), - } as any; -}; +// de_InventoryDeletionSummaryItems omitted. + +// de_InventoryItemAttribute omitted. + +// de_InventoryItemAttributeList omitted. + +// de_InventoryItemEntry omitted. + +// de_InventoryItemEntryList omitted. + +// de_InventoryItemSchema omitted. + +// de_InventoryItemSchemaResultList omitted. + +// de_InventoryResultEntity omitted. + +// de_InventoryResultEntityList omitted. + +// de_InventoryResultItem omitted. + +// de_InventoryResultItemMap omitted. + +// de_InvocationDoesNotExist omitted. + +// de_ItemContentMismatchException omitted. + +// de_ItemSizeLimitExceededException omitted. + +// de_LabelParameterVersionResult omitted. /** - * deserializeAws_json1_1RelatedOpsItem + * deserializeAws_json1_1ListAssociationsResult */ -const de_RelatedOpsItem = (output: any, context: __SerdeContext): RelatedOpsItem => { - return { - OpsItemId: __expectString(output.OpsItemId), - } as any; +const de_ListAssociationsResult = (output: any, context: __SerdeContext): ListAssociationsResult => { + return take(output, { + Associations: (_: any) => de_AssociationList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RelatedOpsItems + * deserializeAws_json1_1ListAssociationVersionsResult */ -const de_RelatedOpsItems = (output: any, context: __SerdeContext): RelatedOpsItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelatedOpsItem(entry, context); - }); - return retVal; +const de_ListAssociationVersionsResult = (output: any, context: __SerdeContext): ListAssociationVersionsResult => { + return take(output, { + AssociationVersions: (_: any) => de_AssociationVersionList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1RemoveTagsFromResourceResult + * deserializeAws_json1_1ListCommandInvocationsResult */ -const de_RemoveTagsFromResourceResult = (output: any, context: __SerdeContext): RemoveTagsFromResourceResult => { - return {} as any; +const de_ListCommandInvocationsResult = (output: any, context: __SerdeContext): ListCommandInvocationsResult => { + return take(output, { + CommandInvocations: (_: any) => de_CommandInvocationList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResetServiceSettingResult + * deserializeAws_json1_1ListCommandsResult */ -const de_ResetServiceSettingResult = (output: any, context: __SerdeContext): ResetServiceSettingResult => { - return { - ServiceSetting: output.ServiceSetting != null ? de_ServiceSetting(output.ServiceSetting, context) : undefined, - } as any; +const de_ListCommandsResult = (output: any, context: __SerdeContext): ListCommandsResult => { + return take(output, { + Commands: (_: any) => de_CommandList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResolvedTargets + * deserializeAws_json1_1ListComplianceItemsResult */ -const de_ResolvedTargets = (output: any, context: __SerdeContext): ResolvedTargets => { - return { - ParameterValues: - output.ParameterValues != null ? de_TargetParameterList(output.ParameterValues, context) : undefined, - Truncated: __expectBoolean(output.Truncated), - } as any; +const de_ListComplianceItemsResult = (output: any, context: __SerdeContext): ListComplianceItemsResult => { + return take(output, { + ComplianceItems: (_: any) => de_ComplianceItemList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListComplianceSummariesResult omitted. + /** - * deserializeAws_json1_1ResourceComplianceSummaryItem + * deserializeAws_json1_1ListDocumentMetadataHistoryResponse */ -const de_ResourceComplianceSummaryItem = (output: any, context: __SerdeContext): ResourceComplianceSummaryItem => { - return { - ComplianceType: __expectString(output.ComplianceType), - CompliantSummary: - output.CompliantSummary != null ? de_CompliantSummary(output.CompliantSummary, context) : undefined, - ExecutionSummary: - output.ExecutionSummary != null ? de_ComplianceExecutionSummary(output.ExecutionSummary, context) : undefined, - NonCompliantSummary: - output.NonCompliantSummary != null ? de_NonCompliantSummary(output.NonCompliantSummary, context) : undefined, - OverallSeverity: __expectString(output.OverallSeverity), - ResourceId: __expectString(output.ResourceId), - ResourceType: __expectString(output.ResourceType), - Status: __expectString(output.Status), - } as any; +const de_ListDocumentMetadataHistoryResponse = ( + output: any, + context: __SerdeContext +): ListDocumentMetadataHistoryResponse => { + return take(output, { + Author: __expectString, + DocumentVersion: __expectString, + Metadata: (_: any) => de_DocumentMetadataResponseInfo(_, context), + Name: __expectString, + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceComplianceSummaryItemList + * deserializeAws_json1_1ListDocumentsResult */ -const de_ResourceComplianceSummaryItemList = ( - output: any, - context: __SerdeContext -): ResourceComplianceSummaryItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceComplianceSummaryItem(entry, context); - }); - return retVal; +const de_ListDocumentsResult = (output: any, context: __SerdeContext): ListDocumentsResult => { + return take(output, { + DocumentIdentifiers: (_: any) => de_DocumentIdentifierList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncAlreadyExistsException + * deserializeAws_json1_1ListDocumentVersionsResult */ -const de_ResourceDataSyncAlreadyExistsException = ( - output: any, - context: __SerdeContext -): ResourceDataSyncAlreadyExistsException => { - return { - SyncName: __expectString(output.SyncName), - } as any; +const de_ListDocumentVersionsResult = (output: any, context: __SerdeContext): ListDocumentVersionsResult => { + return take(output, { + DocumentVersions: (_: any) => de_DocumentVersionList(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListInventoryEntriesResult omitted. + /** - * deserializeAws_json1_1ResourceDataSyncAwsOrganizationsSource + * deserializeAws_json1_1ListOpsItemEventsResponse */ -const de_ResourceDataSyncAwsOrganizationsSource = ( - output: any, - context: __SerdeContext -): ResourceDataSyncAwsOrganizationsSource => { - return { - OrganizationSourceType: __expectString(output.OrganizationSourceType), - OrganizationalUnits: - output.OrganizationalUnits != null - ? de_ResourceDataSyncOrganizationalUnitList(output.OrganizationalUnits, context) - : undefined, - } as any; +const de_ListOpsItemEventsResponse = (output: any, context: __SerdeContext): ListOpsItemEventsResponse => { + return take(output, { + NextToken: __expectString, + Summaries: (_: any) => de_OpsItemEventSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncConflictException + * deserializeAws_json1_1ListOpsItemRelatedItemsResponse */ -const de_ResourceDataSyncConflictException = ( - output: any, - context: __SerdeContext -): ResourceDataSyncConflictException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListOpsItemRelatedItemsResponse = (output: any, context: __SerdeContext): ListOpsItemRelatedItemsResponse => { + return take(output, { + NextToken: __expectString, + Summaries: (_: any) => de_OpsItemRelatedItemSummaries(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncCountExceededException + * deserializeAws_json1_1ListOpsMetadataResult */ -const de_ResourceDataSyncCountExceededException = ( - output: any, - context: __SerdeContext -): ResourceDataSyncCountExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListOpsMetadataResult = (output: any, context: __SerdeContext): ListOpsMetadataResult => { + return take(output, { + NextToken: __expectString, + OpsMetadataList: (_: any) => de_OpsMetadataList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncDestinationDataSharing + * deserializeAws_json1_1ListResourceComplianceSummariesResult */ -const de_ResourceDataSyncDestinationDataSharing = ( +const de_ListResourceComplianceSummariesResult = ( output: any, context: __SerdeContext -): ResourceDataSyncDestinationDataSharing => { - return { - DestinationDataSharingType: __expectString(output.DestinationDataSharingType), - } as any; +): ListResourceComplianceSummariesResult => { + return take(output, { + NextToken: __expectString, + ResourceComplianceSummaryItems: (_: any) => de_ResourceComplianceSummaryItemList(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncInvalidConfigurationException + * deserializeAws_json1_1ListResourceDataSyncResult */ -const de_ResourceDataSyncInvalidConfigurationException = ( - output: any, - context: __SerdeContext -): ResourceDataSyncInvalidConfigurationException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListResourceDataSyncResult = (output: any, context: __SerdeContext): ListResourceDataSyncResult => { + return take(output, { + NextToken: __expectString, + ResourceDataSyncItems: (_: any) => de_ResourceDataSyncItemList(_, context), + }) as any; }; +// de_ListTagsForResourceResult omitted. + +// de_LoggingInfo omitted. + +// de_MaintenanceWindowAutomationParameters omitted. + /** - * deserializeAws_json1_1ResourceDataSyncItem + * deserializeAws_json1_1MaintenanceWindowExecution */ -const de_ResourceDataSyncItem = (output: any, context: __SerdeContext): ResourceDataSyncItem => { - return { - LastStatus: __expectString(output.LastStatus), - LastSuccessfulSyncTime: - output.LastSuccessfulSyncTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulSyncTime))) - : undefined, - LastSyncStatusMessage: __expectString(output.LastSyncStatusMessage), - LastSyncTime: - output.LastSyncTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSyncTime))) - : undefined, - S3Destination: - output.S3Destination != null ? de_ResourceDataSyncS3Destination(output.S3Destination, context) : undefined, - SyncCreatedTime: - output.SyncCreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SyncCreatedTime))) - : undefined, - SyncLastModifiedTime: - output.SyncLastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SyncLastModifiedTime))) - : undefined, - SyncName: __expectString(output.SyncName), - SyncSource: output.SyncSource != null ? de_ResourceDataSyncSourceWithState(output.SyncSource, context) : undefined, - SyncType: __expectString(output.SyncType), - } as any; +const de_MaintenanceWindowExecution = (output: any, context: __SerdeContext): MaintenanceWindowExecution => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDetails: __expectString, + WindowExecutionId: __expectString, + WindowId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncItemList + * deserializeAws_json1_1MaintenanceWindowExecutionList */ -const de_ResourceDataSyncItemList = (output: any, context: __SerdeContext): ResourceDataSyncItem[] => { +const de_MaintenanceWindowExecutionList = (output: any, context: __SerdeContext): MaintenanceWindowExecution[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceDataSyncItem(entry, context); + return de_MaintenanceWindowExecution(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResourceDataSyncNotFoundException - */ -const de_ResourceDataSyncNotFoundException = ( - output: any, - context: __SerdeContext -): ResourceDataSyncNotFoundException => { - return { - Message: __expectString(output.Message), - SyncName: __expectString(output.SyncName), - SyncType: __expectString(output.SyncType), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceDataSyncOrganizationalUnit + * deserializeAws_json1_1MaintenanceWindowExecutionTaskIdentity */ -const de_ResourceDataSyncOrganizationalUnit = ( +const de_MaintenanceWindowExecutionTaskIdentity = ( output: any, context: __SerdeContext -): ResourceDataSyncOrganizationalUnit => { - return { - OrganizationalUnitId: __expectString(output.OrganizationalUnitId), - } as any; +): MaintenanceWindowExecutionTaskIdentity => { + return take(output, { + AlarmConfiguration: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDetails: __expectString, + TaskArn: __expectString, + TaskExecutionId: __expectString, + TaskType: __expectString, + TriggeredAlarms: _json, + WindowExecutionId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncOrganizationalUnitList + * deserializeAws_json1_1MaintenanceWindowExecutionTaskIdentityList */ -const de_ResourceDataSyncOrganizationalUnitList = ( +const de_MaintenanceWindowExecutionTaskIdentityList = ( output: any, context: __SerdeContext -): ResourceDataSyncOrganizationalUnit[] => { +): MaintenanceWindowExecutionTaskIdentity[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceDataSyncOrganizationalUnit(entry, context); + return de_MaintenanceWindowExecutionTaskIdentity(entry, context); }); return retVal; }; +// de_MaintenanceWindowExecutionTaskIdList omitted. + /** - * deserializeAws_json1_1ResourceDataSyncS3Destination + * deserializeAws_json1_1MaintenanceWindowExecutionTaskInvocationIdentity */ -const de_ResourceDataSyncS3Destination = (output: any, context: __SerdeContext): ResourceDataSyncS3Destination => { - return { - AWSKMSKeyARN: __expectString(output.AWSKMSKeyARN), - BucketName: __expectString(output.BucketName), - DestinationDataSharing: - output.DestinationDataSharing != null - ? de_ResourceDataSyncDestinationDataSharing(output.DestinationDataSharing, context) - : undefined, - Prefix: __expectString(output.Prefix), - Region: __expectString(output.Region), - SyncFormat: __expectString(output.SyncFormat), - } as any; +const de_MaintenanceWindowExecutionTaskInvocationIdentity = ( + output: any, + context: __SerdeContext +): MaintenanceWindowExecutionTaskInvocationIdentity => { + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionId: __expectString, + InvocationId: __expectString, + OwnerInformation: __expectString, + Parameters: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + StatusDetails: __expectString, + TaskExecutionId: __expectString, + TaskType: __expectString, + WindowExecutionId: __expectString, + WindowTargetId: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResourceDataSyncSourceRegionList + * deserializeAws_json1_1MaintenanceWindowExecutionTaskInvocationIdentityList */ -const de_ResourceDataSyncSourceRegionList = (output: any, context: __SerdeContext): string[] => { +const de_MaintenanceWindowExecutionTaskInvocationIdentityList = ( + output: any, + context: __SerdeContext +): MaintenanceWindowExecutionTaskInvocationIdentity[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_MaintenanceWindowExecutionTaskInvocationIdentity(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceDataSyncSourceWithState - */ -const de_ResourceDataSyncSourceWithState = (output: any, context: __SerdeContext): ResourceDataSyncSourceWithState => { - return { - AwsOrganizationsSource: - output.AwsOrganizationsSource != null - ? de_ResourceDataSyncAwsOrganizationsSource(output.AwsOrganizationsSource, context) - : undefined, - EnableAllOpsDataSources: __expectBoolean(output.EnableAllOpsDataSources), - IncludeFutureRegions: __expectBoolean(output.IncludeFutureRegions), - SourceRegions: - output.SourceRegions != null ? de_ResourceDataSyncSourceRegionList(output.SourceRegions, context) : undefined, - SourceType: __expectString(output.SourceType), - State: __expectString(output.State), - } as any; -}; +// de_MaintenanceWindowIdentity omitted. -/** - * deserializeAws_json1_1ResourceInUseException - */ -const de_ResourceInUseException = (output: any, context: __SerdeContext): ResourceInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MaintenanceWindowIdentityForTarget omitted. -/** - * deserializeAws_json1_1ResourceLimitExceededException - */ -const de_ResourceLimitExceededException = (output: any, context: __SerdeContext): ResourceLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MaintenanceWindowIdentityList omitted. /** - * deserializeAws_json1_1ResourcePolicyConflictException + * deserializeAws_json1_1MaintenanceWindowLambdaParameters */ -const de_ResourcePolicyConflictException = (output: any, context: __SerdeContext): ResourcePolicyConflictException => { - return { - Message: __expectString(output.Message), - } as any; +const de_MaintenanceWindowLambdaParameters = ( + output: any, + context: __SerdeContext +): MaintenanceWindowLambdaParameters => { + return take(output, { + ClientContext: __expectString, + Payload: context.base64Decoder, + Qualifier: __expectString, + }) as any; }; +// de_MaintenanceWindowRunCommandParameters omitted. + +// de_MaintenanceWindowsForTargetList omitted. + +// de_MaintenanceWindowStepFunctionsParameters omitted. + +// de_MaintenanceWindowTarget omitted. + +// de_MaintenanceWindowTargetList omitted. + +// de_MaintenanceWindowTask omitted. + /** - * deserializeAws_json1_1ResourcePolicyInvalidParameterException + * deserializeAws_json1_1MaintenanceWindowTaskInvocationParameters */ -const de_ResourcePolicyInvalidParameterException = ( +const de_MaintenanceWindowTaskInvocationParameters = ( output: any, context: __SerdeContext -): ResourcePolicyInvalidParameterException => { - return { - Message: __expectString(output.Message), - ParameterNames: - output.ParameterNames != null ? de_ResourcePolicyParameterNamesList(output.ParameterNames, context) : undefined, - } as any; +): MaintenanceWindowTaskInvocationParameters => { + return take(output, { + Automation: _json, + Lambda: (_: any) => de_MaintenanceWindowLambdaParameters(_, context), + RunCommand: _json, + StepFunctions: _json, + }) as any; }; +// de_MaintenanceWindowTaskList omitted. + +// de_MaintenanceWindowTaskParameters omitted. + +// de_MaintenanceWindowTaskParametersList omitted. + +// de_MaintenanceWindowTaskParameterValueExpression omitted. + +// de_MaintenanceWindowTaskParameterValueList omitted. + +// de_MaxDocumentSizeExceeded omitted. + +// de_MetadataMap omitted. + +// de_MetadataValue omitted. + +// de_ModifyDocumentPermissionResponse omitted. + +// de_NonCompliantSummary omitted. + +// de_NormalStringMap omitted. + +// de_NotificationConfig omitted. + +// de_NotificationEventList omitted. + +// de_OpsEntity omitted. + +// de_OpsEntityItem omitted. + +// de_OpsEntityItemEntry omitted. + +// de_OpsEntityItemEntryList omitted. + +// de_OpsEntityItemMap omitted. + +// de_OpsEntityList omitted. + /** - * deserializeAws_json1_1ResourcePolicyLimitExceededException + * deserializeAws_json1_1OpsItem */ -const de_ResourcePolicyLimitExceededException = ( - output: any, - context: __SerdeContext -): ResourcePolicyLimitExceededException => { - return { - Limit: __expectInt32(output.Limit), - LimitType: __expectString(output.LimitType), - Message: __expectString(output.Message), - } as any; -}; +const de_OpsItem = (output: any, context: __SerdeContext): OpsItem => { + return take(output, { + ActualEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ActualStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Category: __expectString, + CreatedBy: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LastModifiedBy: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Notifications: _json, + OperationalData: _json, + OpsItemArn: __expectString, + OpsItemId: __expectString, + OpsItemType: __expectString, + PlannedEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PlannedStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Priority: __expectInt32, + RelatedOpsItems: _json, + Severity: __expectString, + Source: __expectString, + Status: __expectString, + Title: __expectString, + Version: __expectString, + }) as any; +}; + +// de_OpsItemAccessDeniedException omitted. + +// de_OpsItemAlreadyExistsException omitted. + +// de_OpsItemDataValue omitted. /** - * deserializeAws_json1_1ResourcePolicyParameterNamesList + * deserializeAws_json1_1OpsItemEventSummaries */ -const de_ResourcePolicyParameterNamesList = (output: any, context: __SerdeContext): string[] => { +const de_OpsItemEventSummaries = (output: any, context: __SerdeContext): OpsItemEventSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_OpsItemEventSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResumeSessionResponse + * deserializeAws_json1_1OpsItemEventSummary */ -const de_ResumeSessionResponse = (output: any, context: __SerdeContext): ResumeSessionResponse => { - return { - SessionId: __expectString(output.SessionId), - StreamUrl: __expectString(output.StreamUrl), - TokenValue: __expectString(output.TokenValue), - } as any; +const de_OpsItemEventSummary = (output: any, context: __SerdeContext): OpsItemEventSummary => { + return take(output, { + CreatedBy: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Detail: __expectString, + DetailType: __expectString, + EventId: __expectString, + OpsItemId: __expectString, + Source: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ReviewInformation - */ -const de_ReviewInformation = (output: any, context: __SerdeContext): ReviewInformation => { - return { - ReviewedTime: - output.ReviewedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReviewedTime))) - : undefined, - Reviewer: __expectString(output.Reviewer), - Status: __expectString(output.Status), - } as any; -}; +// de_OpsItemIdentity omitted. + +// de_OpsItemInvalidParameterException omitted. + +// de_OpsItemLimitExceededException omitted. + +// de_OpsItemNotFoundException omitted. + +// de_OpsItemNotification omitted. + +// de_OpsItemNotifications omitted. + +// de_OpsItemOperationalData omitted. + +// de_OpsItemParameterNamesList omitted. + +// de_OpsItemRelatedItemAlreadyExistsException omitted. + +// de_OpsItemRelatedItemAssociationNotFoundException omitted. /** - * deserializeAws_json1_1ReviewInformationList + * deserializeAws_json1_1OpsItemRelatedItemSummaries */ -const de_ReviewInformationList = (output: any, context: __SerdeContext): ReviewInformation[] => { +const de_OpsItemRelatedItemSummaries = (output: any, context: __SerdeContext): OpsItemRelatedItemSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReviewInformation(entry, context); + return de_OpsItemRelatedItemSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Runbook + * deserializeAws_json1_1OpsItemRelatedItemSummary */ -const de_Runbook = (output: any, context: __SerdeContext): Runbook => { - return { - DocumentName: __expectString(output.DocumentName), - DocumentVersion: __expectString(output.DocumentVersion), - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Parameters: output.Parameters != null ? de_AutomationParameterMap(output.Parameters, context) : undefined, - TargetLocations: output.TargetLocations != null ? de_TargetLocations(output.TargetLocations, context) : undefined, - TargetMaps: output.TargetMaps != null ? de_TargetMaps(output.TargetMaps, context) : undefined, - TargetParameterName: __expectString(output.TargetParameterName), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - } as any; +const de_OpsItemRelatedItemSummary = (output: any, context: __SerdeContext): OpsItemRelatedItemSummary => { + return take(output, { + AssociationId: __expectString, + AssociationType: __expectString, + CreatedBy: _json, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: _json, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OpsItemId: __expectString, + ResourceType: __expectString, + ResourceUri: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Runbooks + * deserializeAws_json1_1OpsItemSummaries */ -const de_Runbooks = (output: any, context: __SerdeContext): Runbook[] => { +const de_OpsItemSummaries = (output: any, context: __SerdeContext): OpsItemSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Runbook(entry, context); + return de_OpsItemSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1S3OutputLocation + * deserializeAws_json1_1OpsItemSummary */ -const de_S3OutputLocation = (output: any, context: __SerdeContext): S3OutputLocation => { - return { - OutputS3BucketName: __expectString(output.OutputS3BucketName), - OutputS3KeyPrefix: __expectString(output.OutputS3KeyPrefix), - OutputS3Region: __expectString(output.OutputS3Region), - } as any; +const de_OpsItemSummary = (output: any, context: __SerdeContext): OpsItemSummary => { + return take(output, { + ActualEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ActualStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Category: __expectString, + CreatedBy: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedBy: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OperationalData: _json, + OpsItemId: __expectString, + OpsItemType: __expectString, + PlannedEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PlannedStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Priority: __expectInt32, + Severity: __expectString, + Source: __expectString, + Status: __expectString, + Title: __expectString, + }) as any; }; /** - * deserializeAws_json1_1S3OutputUrl + * deserializeAws_json1_1OpsMetadata */ -const de_S3OutputUrl = (output: any, context: __SerdeContext): S3OutputUrl => { - return { - OutputUrl: __expectString(output.OutputUrl), - } as any; +const de_OpsMetadata = (output: any, context: __SerdeContext): OpsMetadata => { + return take(output, { + CreationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedUser: __expectString, + OpsMetadataArn: __expectString, + ResourceId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ScheduledWindowExecution - */ -const de_ScheduledWindowExecution = (output: any, context: __SerdeContext): ScheduledWindowExecution => { - return { - ExecutionTime: __expectString(output.ExecutionTime), - Name: __expectString(output.Name), - WindowId: __expectString(output.WindowId), - } as any; -}; +// de_OpsMetadataAlreadyExistsException omitted. + +// de_OpsMetadataInvalidArgumentException omitted. + +// de_OpsMetadataKeyLimitExceededException omitted. + +// de_OpsMetadataLimitExceededException omitted. /** - * deserializeAws_json1_1ScheduledWindowExecutionList + * deserializeAws_json1_1OpsMetadataList */ -const de_ScheduledWindowExecutionList = (output: any, context: __SerdeContext): ScheduledWindowExecution[] => { +const de_OpsMetadataList = (output: any, context: __SerdeContext): OpsMetadata[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ScheduledWindowExecution(entry, context); + return de_OpsMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SendAutomationSignalResult - */ -const de_SendAutomationSignalResult = (output: any, context: __SerdeContext): SendAutomationSignalResult => { - return {} as any; -}; +// de_OpsMetadataNotFoundException omitted. -/** - * deserializeAws_json1_1SendCommandResult - */ -const de_SendCommandResult = (output: any, context: __SerdeContext): SendCommandResult => { - return { - Command: output.Command != null ? de_Command(output.Command, context) : undefined, - } as any; -}; +// de_OpsMetadataTooManyUpdatesException omitted. -/** - * deserializeAws_json1_1ServiceSetting - */ -const de_ServiceSetting = (output: any, context: __SerdeContext): ServiceSetting => { - return { - ARN: __expectString(output.ARN), - LastModifiedDate: - output.LastModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedDate))) - : undefined, - LastModifiedUser: __expectString(output.LastModifiedUser), - SettingId: __expectString(output.SettingId), - SettingValue: __expectString(output.SettingValue), - Status: __expectString(output.Status), - } as any; -}; +// de_OutputSource omitted. /** - * deserializeAws_json1_1ServiceSettingNotFound + * deserializeAws_json1_1Parameter */ -const de_ServiceSettingNotFound = (output: any, context: __SerdeContext): ServiceSettingNotFound => { - return { - Message: __expectString(output.Message), - } as any; +const de_Parameter = (output: any, context: __SerdeContext): Parameter => { + return take(output, { + ARN: __expectString, + DataType: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Selector: __expectString, + SourceResult: __expectString, + Type: __expectString, + Value: __expectString, + Version: __expectLong, + }) as any; }; +// de_ParameterAlreadyExists omitted. + /** - * deserializeAws_json1_1Session + * deserializeAws_json1_1ParameterHistory */ -const de_Session = (output: any, context: __SerdeContext): Session => { - return { - Details: __expectString(output.Details), - DocumentName: __expectString(output.DocumentName), - EndDate: - output.EndDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndDate))) : undefined, - MaxSessionDuration: __expectString(output.MaxSessionDuration), - OutputUrl: output.OutputUrl != null ? de_SessionManagerOutputUrl(output.OutputUrl, context) : undefined, - Owner: __expectString(output.Owner), - Reason: __expectString(output.Reason), - SessionId: __expectString(output.SessionId), - StartDate: - output.StartDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartDate))) : undefined, - Status: __expectString(output.Status), - Target: __expectString(output.Target), - } as any; +const de_ParameterHistory = (output: any, context: __SerdeContext): ParameterHistory => { + return take(output, { + AllowedPattern: __expectString, + DataType: __expectString, + Description: __expectString, + KeyId: __expectString, + Labels: _json, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedUser: __expectString, + Name: __expectString, + Policies: _json, + Tier: __expectString, + Type: __expectString, + Value: __expectString, + Version: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1SessionList + * deserializeAws_json1_1ParameterHistoryList */ -const de_SessionList = (output: any, context: __SerdeContext): Session[] => { +const de_ParameterHistoryList = (output: any, context: __SerdeContext): ParameterHistory[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Session(entry, context); + return de_ParameterHistory(entry, context); }); return retVal; }; +// de_ParameterInlinePolicy omitted. + +// de_ParameterLabelList omitted. + +// de_ParameterLimitExceeded omitted. + /** - * deserializeAws_json1_1SessionManagerOutputUrl + * deserializeAws_json1_1ParameterList */ -const de_SessionManagerOutputUrl = (output: any, context: __SerdeContext): SessionManagerOutputUrl => { - return { - CloudWatchOutputUrl: __expectString(output.CloudWatchOutputUrl), - S3OutputUrl: __expectString(output.S3OutputUrl), - } as any; +const de_ParameterList = (output: any, context: __SerdeContext): Parameter[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Parameter(entry, context); + }); + return retVal; }; +// de_ParameterMaxVersionLimitExceeded omitted. + /** - * deserializeAws_json1_1SeveritySummary + * deserializeAws_json1_1ParameterMetadata */ -const de_SeveritySummary = (output: any, context: __SerdeContext): SeveritySummary => { - return { - CriticalCount: __expectInt32(output.CriticalCount), - HighCount: __expectInt32(output.HighCount), - InformationalCount: __expectInt32(output.InformationalCount), - LowCount: __expectInt32(output.LowCount), - MediumCount: __expectInt32(output.MediumCount), - UnspecifiedCount: __expectInt32(output.UnspecifiedCount), - } as any; +const de_ParameterMetadata = (output: any, context: __SerdeContext): ParameterMetadata => { + return take(output, { + AllowedPattern: __expectString, + DataType: __expectString, + Description: __expectString, + KeyId: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedUser: __expectString, + Name: __expectString, + Policies: _json, + Tier: __expectString, + Type: __expectString, + Version: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1StartAssociationsOnceResult + * deserializeAws_json1_1ParameterMetadataList */ -const de_StartAssociationsOnceResult = (output: any, context: __SerdeContext): StartAssociationsOnceResult => { - return {} as any; +const de_ParameterMetadataList = (output: any, context: __SerdeContext): ParameterMetadata[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ParameterMetadata(entry, context); + }); + return retVal; }; +// de_ParameterNameList omitted. + +// de_ParameterNotFound omitted. + +// de_ParameterPatternMismatchException omitted. + +// de_ParameterPolicyList omitted. + +// de_Parameters omitted. + +// de_ParameterValueList omitted. + +// de_ParameterVersionLabelLimitExceeded omitted. + +// de_ParameterVersionNotFound omitted. + /** - * deserializeAws_json1_1StartAutomationExecutionResult + * deserializeAws_json1_1Patch */ -const de_StartAutomationExecutionResult = (output: any, context: __SerdeContext): StartAutomationExecutionResult => { - return { - AutomationExecutionId: __expectString(output.AutomationExecutionId), - } as any; -}; +const de_Patch = (output: any, context: __SerdeContext): Patch => { + return take(output, { + AdvisoryIds: _json, + Arch: __expectString, + BugzillaIds: _json, + CVEIds: _json, + Classification: __expectString, + ContentUrl: __expectString, + Description: __expectString, + Epoch: __expectInt32, + Id: __expectString, + KbNumber: __expectString, + Language: __expectString, + MsrcNumber: __expectString, + MsrcSeverity: __expectString, + Name: __expectString, + Product: __expectString, + ProductFamily: __expectString, + Release: __expectString, + ReleaseDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Repository: __expectString, + Severity: __expectString, + Title: __expectString, + Vendor: __expectString, + Version: __expectString, + }) as any; +}; + +// de_PatchAdvisoryIdList omitted. + +// de_PatchBaselineIdentity omitted. + +// de_PatchBaselineIdentityList omitted. + +// de_PatchBugzillaIdList omitted. /** - * deserializeAws_json1_1StartChangeRequestExecutionResult + * deserializeAws_json1_1PatchComplianceData */ -const de_StartChangeRequestExecutionResult = ( - output: any, - context: __SerdeContext -): StartChangeRequestExecutionResult => { - return { - AutomationExecutionId: __expectString(output.AutomationExecutionId), - } as any; +const de_PatchComplianceData = (output: any, context: __SerdeContext): PatchComplianceData => { + return take(output, { + CVEIds: __expectString, + Classification: __expectString, + InstalledTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KBId: __expectString, + Severity: __expectString, + State: __expectString, + Title: __expectString, + }) as any; }; /** - * deserializeAws_json1_1StartSessionResponse + * deserializeAws_json1_1PatchComplianceDataList */ -const de_StartSessionResponse = (output: any, context: __SerdeContext): StartSessionResponse => { - return { - SessionId: __expectString(output.SessionId), - StreamUrl: __expectString(output.StreamUrl), - TokenValue: __expectString(output.TokenValue), - } as any; +const de_PatchComplianceDataList = (output: any, context: __SerdeContext): PatchComplianceData[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_PatchComplianceData(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1StatusUnchanged - */ -const de_StatusUnchanged = (output: any, context: __SerdeContext): StatusUnchanged => { - return {} as any; -}; +// de_PatchCVEIdList omitted. + +// de_PatchFilter omitted. + +// de_PatchFilterGroup omitted. + +// de_PatchFilterList omitted. + +// de_PatchFilterValueList omitted. + +// de_PatchGroupList omitted. + +// de_PatchGroupPatchBaselineMapping omitted. + +// de_PatchGroupPatchBaselineMappingList omitted. -/** - * deserializeAws_json1_1StepExecution - */ -const de_StepExecution = (output: any, context: __SerdeContext): StepExecution => { - return { - Action: __expectString(output.Action), - ExecutionEndTime: - output.ExecutionEndTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionEndTime))) - : undefined, - ExecutionStartTime: - output.ExecutionStartTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExecutionStartTime))) - : undefined, - FailureDetails: output.FailureDetails != null ? de_FailureDetails(output.FailureDetails, context) : undefined, - FailureMessage: __expectString(output.FailureMessage), - Inputs: output.Inputs != null ? de_NormalStringMap(output.Inputs, context) : undefined, - IsCritical: __expectBoolean(output.IsCritical), - IsEnd: __expectBoolean(output.IsEnd), - MaxAttempts: __expectInt32(output.MaxAttempts), - NextStep: __expectString(output.NextStep), - OnFailure: __expectString(output.OnFailure), - Outputs: output.Outputs != null ? de_AutomationParameterMap(output.Outputs, context) : undefined, - OverriddenParameters: - output.OverriddenParameters != null ? de_AutomationParameterMap(output.OverriddenParameters, context) : undefined, - Response: __expectString(output.Response), - ResponseCode: __expectString(output.ResponseCode), - StepExecutionId: __expectString(output.StepExecutionId), - StepName: __expectString(output.StepName), - StepStatus: __expectString(output.StepStatus), - TargetLocation: output.TargetLocation != null ? de_TargetLocation(output.TargetLocation, context) : undefined, - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TimeoutSeconds: __expectLong(output.TimeoutSeconds), - TriggeredAlarms: - output.TriggeredAlarms != null ? de_AlarmStateInformationList(output.TriggeredAlarms, context) : undefined, - ValidNextSteps: output.ValidNextSteps != null ? de_ValidNextStepList(output.ValidNextSteps, context) : undefined, - } as any; -}; +// de_PatchIdList omitted. /** - * deserializeAws_json1_1StepExecutionList + * deserializeAws_json1_1PatchList */ -const de_StepExecutionList = (output: any, context: __SerdeContext): StepExecution[] => { +const de_PatchList = (output: any, context: __SerdeContext): Patch[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StepExecution(entry, context); + return de_Patch(entry, context); }); return retVal; }; +// de_PatchPropertiesList omitted. + +// de_PatchPropertyEntry omitted. + +// de_PatchRule omitted. + +// de_PatchRuleGroup omitted. + +// de_PatchRuleList omitted. + +// de_PatchSource omitted. + +// de_PatchSourceList omitted. + +// de_PatchSourceProductList omitted. + /** - * deserializeAws_json1_1StopAutomationExecutionResult + * deserializeAws_json1_1PatchStatus */ -const de_StopAutomationExecutionResult = (output: any, context: __SerdeContext): StopAutomationExecutionResult => { - return {} as any; +const de_PatchStatus = (output: any, context: __SerdeContext): PatchStatus => { + return take(output, { + ApprovalDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ComplianceLevel: __expectString, + DeploymentStatus: __expectString, + }) as any; }; +// de_PlatformTypeList omitted. + +// de_PoliciesLimitExceededException omitted. + +// de_ProgressCounters omitted. + +// de_PutComplianceItemsResult omitted. + +// de_PutInventoryResult omitted. + +// de_PutParameterResult omitted. + +// de_PutResourcePolicyResponse omitted. + +// de_Regions omitted. + +// de_RegisterDefaultPatchBaselineResult omitted. + +// de_RegisterPatchBaselineForPatchGroupResult omitted. + +// de_RegisterTargetWithMaintenanceWindowResult omitted. + +// de_RegisterTaskWithMaintenanceWindowResult omitted. + +// de_RelatedOpsItem omitted. + +// de_RelatedOpsItems omitted. + +// de_RemoveTagsFromResourceResult omitted. + /** - * deserializeAws_json1_1SubTypeCountLimitExceededException + * deserializeAws_json1_1ResetServiceSettingResult */ -const de_SubTypeCountLimitExceededException = ( - output: any, - context: __SerdeContext -): SubTypeCountLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ResetServiceSettingResult = (output: any, context: __SerdeContext): ResetServiceSettingResult => { + return take(output, { + ServiceSetting: (_: any) => de_ServiceSetting(_, context), + }) as any; }; +// de_ResolvedTargets omitted. + /** - * deserializeAws_json1_1Tag + * deserializeAws_json1_1ResourceComplianceSummaryItem */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_ResourceComplianceSummaryItem = (output: any, context: __SerdeContext): ResourceComplianceSummaryItem => { + return take(output, { + ComplianceType: __expectString, + CompliantSummary: _json, + ExecutionSummary: (_: any) => de_ComplianceExecutionSummary(_, context), + NonCompliantSummary: _json, + OverallSeverity: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TagList + * deserializeAws_json1_1ResourceComplianceSummaryItemList */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { +const de_ResourceComplianceSummaryItemList = ( + output: any, + context: __SerdeContext +): ResourceComplianceSummaryItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); + return de_ResourceComplianceSummaryItem(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Target - */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - Key: __expectString(output.Key), - Values: output.Values != null ? de_TargetValues(output.Values, context) : undefined, - } as any; -}; +// de_ResourceDataSyncAlreadyExistsException omitted. -/** - * deserializeAws_json1_1TargetInUseException - */ -const de_TargetInUseException = (output: any, context: __SerdeContext): TargetInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceDataSyncAwsOrganizationsSource omitted. + +// de_ResourceDataSyncConflictException omitted. + +// de_ResourceDataSyncCountExceededException omitted. + +// de_ResourceDataSyncDestinationDataSharing omitted. + +// de_ResourceDataSyncInvalidConfigurationException omitted. /** - * deserializeAws_json1_1TargetLocation + * deserializeAws_json1_1ResourceDataSyncItem */ -const de_TargetLocation = (output: any, context: __SerdeContext): TargetLocation => { - return { - Accounts: output.Accounts != null ? de_Accounts(output.Accounts, context) : undefined, - ExecutionRoleName: __expectString(output.ExecutionRoleName), - Regions: output.Regions != null ? de_Regions(output.Regions, context) : undefined, - TargetLocationAlarmConfiguration: - output.TargetLocationAlarmConfiguration != null - ? de_AlarmConfiguration(output.TargetLocationAlarmConfiguration, context) - : undefined, - TargetLocationMaxConcurrency: __expectString(output.TargetLocationMaxConcurrency), - TargetLocationMaxErrors: __expectString(output.TargetLocationMaxErrors), - } as any; +const de_ResourceDataSyncItem = (output: any, context: __SerdeContext): ResourceDataSyncItem => { + return take(output, { + LastStatus: __expectString, + LastSuccessfulSyncTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastSyncStatusMessage: __expectString, + LastSyncTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + S3Destination: _json, + SyncCreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SyncLastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SyncName: __expectString, + SyncSource: _json, + SyncType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TargetLocations + * deserializeAws_json1_1ResourceDataSyncItemList */ -const de_TargetLocations = (output: any, context: __SerdeContext): TargetLocation[] => { +const de_ResourceDataSyncItemList = (output: any, context: __SerdeContext): ResourceDataSyncItem[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetLocation(entry, context); + return de_ResourceDataSyncItem(entry, context); }); return retVal; }; +// de_ResourceDataSyncNotFoundException omitted. + +// de_ResourceDataSyncOrganizationalUnit omitted. + +// de_ResourceDataSyncOrganizationalUnitList omitted. + +// de_ResourceDataSyncS3Destination omitted. + +// de_ResourceDataSyncSourceRegionList omitted. + +// de_ResourceDataSyncSourceWithState omitted. + +// de_ResourceInUseException omitted. + +// de_ResourceLimitExceededException omitted. + +// de_ResourcePolicyConflictException omitted. + +// de_ResourcePolicyInvalidParameterException omitted. + +// de_ResourcePolicyLimitExceededException omitted. + +// de_ResourcePolicyParameterNamesList omitted. + +// de_ResumeSessionResponse omitted. + /** - * deserializeAws_json1_1TargetMap + * deserializeAws_json1_1ReviewInformation */ -const de_TargetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_TargetMapValueList(value, context); - return acc; - }, {}); +const de_ReviewInformation = (output: any, context: __SerdeContext): ReviewInformation => { + return take(output, { + ReviewedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Reviewer: __expectString, + Status: __expectString, + }) as any; }; /** - * deserializeAws_json1_1TargetMaps + * deserializeAws_json1_1ReviewInformationList */ -const de_TargetMaps = (output: any, context: __SerdeContext): Record[] => { +const de_ReviewInformationList = (output: any, context: __SerdeContext): ReviewInformation[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetMap(entry, context); + return de_ReviewInformation(entry, context); }); return retVal; }; +// de_Runbook omitted. + +// de_Runbooks omitted. + +// de_S3OutputLocation omitted. + +// de_S3OutputUrl omitted. + +// de_ScheduledWindowExecution omitted. + +// de_ScheduledWindowExecutionList omitted. + +// de_SendAutomationSignalResult omitted. + /** - * deserializeAws_json1_1TargetMapValueList + * deserializeAws_json1_1SendCommandResult */ -const de_TargetMapValueList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_SendCommandResult = (output: any, context: __SerdeContext): SendCommandResult => { + return take(output, { + Command: (_: any) => de_Command(_, context), + }) as any; }; /** - * deserializeAws_json1_1TargetNotConnected + * deserializeAws_json1_1ServiceSetting */ -const de_TargetNotConnected = (output: any, context: __SerdeContext): TargetNotConnected => { - return { - Message: __expectString(output.Message), - } as any; +const de_ServiceSetting = (output: any, context: __SerdeContext): ServiceSetting => { + return take(output, { + ARN: __expectString, + LastModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModifiedUser: __expectString, + SettingId: __expectString, + SettingValue: __expectString, + Status: __expectString, + }) as any; }; +// de_ServiceSettingNotFound omitted. + /** - * deserializeAws_json1_1TargetParameterList + * deserializeAws_json1_1Session */ -const de_TargetParameterList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_Session = (output: any, context: __SerdeContext): Session => { + return take(output, { + Details: __expectString, + DocumentName: __expectString, + EndDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MaxSessionDuration: __expectString, + OutputUrl: _json, + Owner: __expectString, + Reason: __expectString, + SessionId: __expectString, + StartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Target: __expectString, + }) as any; }; /** - * deserializeAws_json1_1Targets + * deserializeAws_json1_1SessionList */ -const de_Targets = (output: any, context: __SerdeContext): Target[] => { +const de_SessionList = (output: any, context: __SerdeContext): Session[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Target(entry, context); + return de_Session(entry, context); }); return retVal; }; +// de_SessionManagerOutputUrl omitted. + +// de_SeveritySummary omitted. + +// de_StartAssociationsOnceResult omitted. + +// de_StartAutomationExecutionResult omitted. + +// de_StartChangeRequestExecutionResult omitted. + +// de_StartSessionResponse omitted. + +// de_StatusUnchanged omitted. + +/** + * deserializeAws_json1_1StepExecution + */ +const de_StepExecution = (output: any, context: __SerdeContext): StepExecution => { + return take(output, { + Action: __expectString, + ExecutionEndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ExecutionStartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureDetails: _json, + FailureMessage: __expectString, + Inputs: _json, + IsCritical: __expectBoolean, + IsEnd: __expectBoolean, + MaxAttempts: __expectInt32, + NextStep: __expectString, + OnFailure: __expectString, + Outputs: _json, + OverriddenParameters: _json, + Response: __expectString, + ResponseCode: __expectString, + StepExecutionId: __expectString, + StepName: __expectString, + StepStatus: __expectString, + TargetLocation: _json, + Targets: _json, + TimeoutSeconds: __expectLong, + TriggeredAlarms: _json, + ValidNextSteps: _json, + }) as any; +}; + /** - * deserializeAws_json1_1TargetValues + * deserializeAws_json1_1StepExecutionList */ -const de_TargetValues = (output: any, context: __SerdeContext): string[] => { +const de_StepExecutionList = (output: any, context: __SerdeContext): StepExecution[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_StepExecution(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TerminateSessionResponse - */ -const de_TerminateSessionResponse = (output: any, context: __SerdeContext): TerminateSessionResponse => { - return { - SessionId: __expectString(output.SessionId), - } as any; -}; +// de_StopAutomationExecutionResult omitted. -/** - * deserializeAws_json1_1TooManyTagsError - */ -const de_TooManyTagsError = (output: any, context: __SerdeContext): TooManyTagsError => { - return {} as any; -}; +// de_SubTypeCountLimitExceededException omitted. -/** - * deserializeAws_json1_1TooManyUpdates - */ -const de_TooManyUpdates = (output: any, context: __SerdeContext): TooManyUpdates => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TotalSizeLimitExceededException - */ -const de_TotalSizeLimitExceededException = (output: any, context: __SerdeContext): TotalSizeLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1UnlabelParameterVersionResult - */ -const de_UnlabelParameterVersionResult = (output: any, context: __SerdeContext): UnlabelParameterVersionResult => { - return { - InvalidLabels: output.InvalidLabels != null ? de_ParameterLabelList(output.InvalidLabels, context) : undefined, - RemovedLabels: output.RemovedLabels != null ? de_ParameterLabelList(output.RemovedLabels, context) : undefined, - } as any; -}; +// de_Target omitted. -/** - * deserializeAws_json1_1UnsupportedCalendarException - */ -const de_UnsupportedCalendarException = (output: any, context: __SerdeContext): UnsupportedCalendarException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetInUseException omitted. -/** - * deserializeAws_json1_1UnsupportedFeatureRequiredException - */ -const de_UnsupportedFeatureRequiredException = ( - output: any, - context: __SerdeContext -): UnsupportedFeatureRequiredException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetLocation omitted. -/** - * deserializeAws_json1_1UnsupportedInventoryItemContextException - */ -const de_UnsupportedInventoryItemContextException = ( - output: any, - context: __SerdeContext -): UnsupportedInventoryItemContextException => { - return { - Message: __expectString(output.Message), - TypeName: __expectString(output.TypeName), - } as any; -}; +// de_TargetLocations omitted. -/** - * deserializeAws_json1_1UnsupportedInventorySchemaVersionException - */ -const de_UnsupportedInventorySchemaVersionException = ( - output: any, - context: __SerdeContext -): UnsupportedInventorySchemaVersionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetMap omitted. -/** - * deserializeAws_json1_1UnsupportedOperatingSystem - */ -const de_UnsupportedOperatingSystem = (output: any, context: __SerdeContext): UnsupportedOperatingSystem => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetMaps omitted. -/** - * deserializeAws_json1_1UnsupportedParameterType - */ -const de_UnsupportedParameterType = (output: any, context: __SerdeContext): UnsupportedParameterType => { - return { - message: __expectString(output.message), - } as any; -}; +// de_TargetMapValueList omitted. -/** - * deserializeAws_json1_1UnsupportedPlatformType - */ -const de_UnsupportedPlatformType = (output: any, context: __SerdeContext): UnsupportedPlatformType => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TargetNotConnected omitted. + +// de_TargetParameterList omitted. + +// de_Targets omitted. + +// de_TargetValues omitted. + +// de_TerminateSessionResponse omitted. + +// de_TooManyTagsError omitted. + +// de_TooManyUpdates omitted. + +// de_TotalSizeLimitExceededException omitted. + +// de_UnlabelParameterVersionResult omitted. + +// de_UnsupportedCalendarException omitted. + +// de_UnsupportedFeatureRequiredException omitted. + +// de_UnsupportedInventoryItemContextException omitted. + +// de_UnsupportedInventorySchemaVersionException omitted. + +// de_UnsupportedOperatingSystem omitted. + +// de_UnsupportedParameterType omitted. + +// de_UnsupportedPlatformType omitted. /** * deserializeAws_json1_1UpdateAssociationResult */ const de_UpdateAssociationResult = (output: any, context: __SerdeContext): UpdateAssociationResult => { - return { - AssociationDescription: - output.AssociationDescription != null - ? de_AssociationDescription(output.AssociationDescription, context) - : undefined, - } as any; + return take(output, { + AssociationDescription: (_: any) => de_AssociationDescription(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateAssociationStatusResult */ const de_UpdateAssociationStatusResult = (output: any, context: __SerdeContext): UpdateAssociationStatusResult => { - return { - AssociationDescription: - output.AssociationDescription != null - ? de_AssociationDescription(output.AssociationDescription, context) - : undefined, - } as any; + return take(output, { + AssociationDescription: (_: any) => de_AssociationDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateDocumentDefaultVersionResult - */ -const de_UpdateDocumentDefaultVersionResult = ( - output: any, - context: __SerdeContext -): UpdateDocumentDefaultVersionResult => { - return { - Description: - output.Description != null ? de_DocumentDefaultVersionDescription(output.Description, context) : undefined, - } as any; -}; +// de_UpdateDocumentDefaultVersionResult omitted. -/** - * deserializeAws_json1_1UpdateDocumentMetadataResponse - */ -const de_UpdateDocumentMetadataResponse = (output: any, context: __SerdeContext): UpdateDocumentMetadataResponse => { - return {} as any; -}; +// de_UpdateDocumentMetadataResponse omitted. /** * deserializeAws_json1_1UpdateDocumentResult */ const de_UpdateDocumentResult = (output: any, context: __SerdeContext): UpdateDocumentResult => { - return { - DocumentDescription: - output.DocumentDescription != null ? de_DocumentDescription(output.DocumentDescription, context) : undefined, - } as any; + return take(output, { + DocumentDescription: (_: any) => de_DocumentDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_1UpdateMaintenanceWindowResult - */ -const de_UpdateMaintenanceWindowResult = (output: any, context: __SerdeContext): UpdateMaintenanceWindowResult => { - return { - AllowUnassociatedTargets: __expectBoolean(output.AllowUnassociatedTargets), - Cutoff: __expectInt32(output.Cutoff), - Description: __expectString(output.Description), - Duration: __expectInt32(output.Duration), - Enabled: __expectBoolean(output.Enabled), - EndDate: __expectString(output.EndDate), - Name: __expectString(output.Name), - Schedule: __expectString(output.Schedule), - ScheduleOffset: __expectInt32(output.ScheduleOffset), - ScheduleTimezone: __expectString(output.ScheduleTimezone), - StartDate: __expectString(output.StartDate), - WindowId: __expectString(output.WindowId), - } as any; -}; +// de_UpdateMaintenanceWindowResult omitted. -/** - * deserializeAws_json1_1UpdateMaintenanceWindowTargetResult - */ -const de_UpdateMaintenanceWindowTargetResult = ( - output: any, - context: __SerdeContext -): UpdateMaintenanceWindowTargetResult => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - OwnerInformation: __expectString(output.OwnerInformation), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - WindowId: __expectString(output.WindowId), - WindowTargetId: __expectString(output.WindowTargetId), - } as any; -}; +// de_UpdateMaintenanceWindowTargetResult omitted. /** * deserializeAws_json1_1UpdateMaintenanceWindowTaskResult @@ -23011,109 +15845,58 @@ const de_UpdateMaintenanceWindowTaskResult = ( output: any, context: __SerdeContext ): UpdateMaintenanceWindowTaskResult => { - return { - AlarmConfiguration: - output.AlarmConfiguration != null ? de_AlarmConfiguration(output.AlarmConfiguration, context) : undefined, - CutoffBehavior: __expectString(output.CutoffBehavior), - Description: __expectString(output.Description), - LoggingInfo: output.LoggingInfo != null ? de_LoggingInfo(output.LoggingInfo, context) : undefined, - MaxConcurrency: __expectString(output.MaxConcurrency), - MaxErrors: __expectString(output.MaxErrors), - Name: __expectString(output.Name), - Priority: __expectInt32(output.Priority), - ServiceRoleArn: __expectString(output.ServiceRoleArn), - Targets: output.Targets != null ? de_Targets(output.Targets, context) : undefined, - TaskArn: __expectString(output.TaskArn), - TaskInvocationParameters: - output.TaskInvocationParameters != null - ? de_MaintenanceWindowTaskInvocationParameters(output.TaskInvocationParameters, context) - : undefined, - TaskParameters: - output.TaskParameters != null ? de_MaintenanceWindowTaskParameters(output.TaskParameters, context) : undefined, - WindowId: __expectString(output.WindowId), - WindowTaskId: __expectString(output.WindowTaskId), - } as any; + return take(output, { + AlarmConfiguration: _json, + CutoffBehavior: __expectString, + Description: __expectString, + LoggingInfo: _json, + MaxConcurrency: __expectString, + MaxErrors: __expectString, + Name: __expectString, + Priority: __expectInt32, + ServiceRoleArn: __expectString, + Targets: _json, + TaskArn: __expectString, + TaskInvocationParameters: (_: any) => de_MaintenanceWindowTaskInvocationParameters(_, context), + TaskParameters: _json, + WindowId: __expectString, + WindowTaskId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateManagedInstanceRoleResult - */ -const de_UpdateManagedInstanceRoleResult = (output: any, context: __SerdeContext): UpdateManagedInstanceRoleResult => { - return {} as any; -}; +// de_UpdateManagedInstanceRoleResult omitted. -/** - * deserializeAws_json1_1UpdateOpsItemResponse - */ -const de_UpdateOpsItemResponse = (output: any, context: __SerdeContext): UpdateOpsItemResponse => { - return {} as any; -}; +// de_UpdateOpsItemResponse omitted. -/** - * deserializeAws_json1_1UpdateOpsMetadataResult - */ -const de_UpdateOpsMetadataResult = (output: any, context: __SerdeContext): UpdateOpsMetadataResult => { - return { - OpsMetadataArn: __expectString(output.OpsMetadataArn), - } as any; -}; +// de_UpdateOpsMetadataResult omitted. /** * deserializeAws_json1_1UpdatePatchBaselineResult */ const de_UpdatePatchBaselineResult = (output: any, context: __SerdeContext): UpdatePatchBaselineResult => { - return { - ApprovalRules: output.ApprovalRules != null ? de_PatchRuleGroup(output.ApprovalRules, context) : undefined, - ApprovedPatches: output.ApprovedPatches != null ? de_PatchIdList(output.ApprovedPatches, context) : undefined, - ApprovedPatchesComplianceLevel: __expectString(output.ApprovedPatchesComplianceLevel), - ApprovedPatchesEnableNonSecurity: __expectBoolean(output.ApprovedPatchesEnableNonSecurity), - BaselineId: __expectString(output.BaselineId), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - Description: __expectString(output.Description), - GlobalFilters: output.GlobalFilters != null ? de_PatchFilterGroup(output.GlobalFilters, context) : undefined, - ModifiedDate: - output.ModifiedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedDate))) - : undefined, - Name: __expectString(output.Name), - OperatingSystem: __expectString(output.OperatingSystem), - RejectedPatches: output.RejectedPatches != null ? de_PatchIdList(output.RejectedPatches, context) : undefined, - RejectedPatchesAction: __expectString(output.RejectedPatchesAction), - Sources: output.Sources != null ? de_PatchSourceList(output.Sources, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1UpdateResourceDataSyncResult - */ -const de_UpdateResourceDataSyncResult = (output: any, context: __SerdeContext): UpdateResourceDataSyncResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1UpdateServiceSettingResult - */ -const de_UpdateServiceSettingResult = (output: any, context: __SerdeContext): UpdateServiceSettingResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ValidNextStepList - */ -const de_ValidNextStepList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; + return take(output, { + ApprovalRules: _json, + ApprovedPatches: _json, + ApprovedPatchesComplianceLevel: __expectString, + ApprovedPatchesEnableNonSecurity: __expectBoolean, + BaselineId: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + GlobalFilters: _json, + ModifiedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + OperatingSystem: __expectString, + RejectedPatches: _json, + RejectedPatchesAction: __expectString, + Sources: _json, + }) as any; +}; + +// de_UpdateResourceDataSyncResult omitted. + +// de_UpdateServiceSettingResult omitted. + +// de_ValidNextStepList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -23135,6 +15918,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-sso-admin/src/protocols/Aws_json1_1.ts b/clients/client-sso-admin/src/protocols/Aws_json1_1.ts index ff382c5b389e..47a05261da92 100644 --- a/clients/client-sso-admin/src/protocols/Aws_json1_1.ts +++ b/clients/client-sso-admin/src/protocols/Aws_json1_1.ts @@ -1,12 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -155,75 +157,52 @@ import { AccessControlAttribute, AccessControlAttributeValue, AccessDeniedException, - AccountAssignment, AccountAssignmentOperationStatus, AccountAssignmentOperationStatusMetadata, AttachCustomerManagedPolicyReferenceToPermissionSetRequest, - AttachCustomerManagedPolicyReferenceToPermissionSetResponse, - AttachedManagedPolicy, AttachManagedPolicyToPermissionSetRequest, - AttachManagedPolicyToPermissionSetResponse, ConflictException, CreateAccountAssignmentRequest, CreateAccountAssignmentResponse, CreateInstanceAccessControlAttributeConfigurationRequest, - CreateInstanceAccessControlAttributeConfigurationResponse, CreatePermissionSetRequest, CreatePermissionSetResponse, CustomerManagedPolicyReference, DeleteAccountAssignmentRequest, DeleteAccountAssignmentResponse, DeleteInlinePolicyFromPermissionSetRequest, - DeleteInlinePolicyFromPermissionSetResponse, DeleteInstanceAccessControlAttributeConfigurationRequest, - DeleteInstanceAccessControlAttributeConfigurationResponse, DeletePermissionsBoundaryFromPermissionSetRequest, - DeletePermissionsBoundaryFromPermissionSetResponse, DeletePermissionSetRequest, - DeletePermissionSetResponse, DescribeAccountAssignmentCreationStatusRequest, DescribeAccountAssignmentCreationStatusResponse, DescribeAccountAssignmentDeletionStatusRequest, DescribeAccountAssignmentDeletionStatusResponse, DescribeInstanceAccessControlAttributeConfigurationRequest, - DescribeInstanceAccessControlAttributeConfigurationResponse, DescribePermissionSetProvisioningStatusRequest, DescribePermissionSetProvisioningStatusResponse, DescribePermissionSetRequest, DescribePermissionSetResponse, DetachCustomerManagedPolicyReferenceFromPermissionSetRequest, - DetachCustomerManagedPolicyReferenceFromPermissionSetResponse, DetachManagedPolicyFromPermissionSetRequest, - DetachManagedPolicyFromPermissionSetResponse, GetInlinePolicyForPermissionSetRequest, - GetInlinePolicyForPermissionSetResponse, GetPermissionsBoundaryForPermissionSetRequest, - GetPermissionsBoundaryForPermissionSetResponse, InstanceAccessControlAttributeConfiguration, - InstanceMetadata, InternalServerException, ListAccountAssignmentCreationStatusRequest, ListAccountAssignmentCreationStatusResponse, ListAccountAssignmentDeletionStatusRequest, ListAccountAssignmentDeletionStatusResponse, ListAccountAssignmentsRequest, - ListAccountAssignmentsResponse, ListAccountsForProvisionedPermissionSetRequest, - ListAccountsForProvisionedPermissionSetResponse, ListCustomerManagedPolicyReferencesInPermissionSetRequest, - ListCustomerManagedPolicyReferencesInPermissionSetResponse, ListInstancesRequest, - ListInstancesResponse, ListManagedPoliciesInPermissionSetRequest, - ListManagedPoliciesInPermissionSetResponse, ListPermissionSetProvisioningStatusRequest, ListPermissionSetProvisioningStatusResponse, ListPermissionSetsProvisionedToAccountRequest, - ListPermissionSetsProvisionedToAccountResponse, ListPermissionSetsRequest, - ListPermissionSetsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, OperationStatusFilter, PermissionsBoundary, PermissionSet, @@ -232,21 +211,15 @@ import { ProvisionPermissionSetRequest, ProvisionPermissionSetResponse, PutInlinePolicyToPermissionSetRequest, - PutInlinePolicyToPermissionSetResponse, PutPermissionsBoundaryToPermissionSetRequest, - PutPermissionsBoundaryToPermissionSetResponse, ResourceNotFoundException, ServiceQuotaExceededException, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, UntagResourceRequest, - UntagResourceResponse, UpdateInstanceAccessControlAttributeConfigurationRequest, - UpdateInstanceAccessControlAttributeConfigurationResponse, UpdatePermissionSetRequest, - UpdatePermissionSetResponse, ValidationException, } from "../models/models_0"; import { SSOAdminServiceException as __BaseException } from "../models/SSOAdminServiceException"; @@ -260,7 +233,7 @@ export const se_AttachCustomerManagedPolicyReferenceToPermissionSetCommand = asy ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachCustomerManagedPolicyReferenceToPermissionSet"); let body: any; - body = JSON.stringify(se_AttachCustomerManagedPolicyReferenceToPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -273,7 +246,7 @@ export const se_AttachManagedPolicyToPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachManagedPolicyToPermissionSet"); let body: any; - body = JSON.stringify(se_AttachManagedPolicyToPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -286,7 +259,7 @@ export const se_CreateAccountAssignmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAccountAssignment"); let body: any; - body = JSON.stringify(se_CreateAccountAssignmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -299,7 +272,7 @@ export const se_CreateInstanceAccessControlAttributeConfigurationCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateInstanceAccessControlAttributeConfiguration"); let body: any; - body = JSON.stringify(se_CreateInstanceAccessControlAttributeConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -312,7 +285,7 @@ export const se_CreatePermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreatePermissionSet"); let body: any; - body = JSON.stringify(se_CreatePermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -325,7 +298,7 @@ export const se_DeleteAccountAssignmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAccountAssignment"); let body: any; - body = JSON.stringify(se_DeleteAccountAssignmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -338,7 +311,7 @@ export const se_DeleteInlinePolicyFromPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInlinePolicyFromPermissionSet"); let body: any; - body = JSON.stringify(se_DeleteInlinePolicyFromPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -351,7 +324,7 @@ export const se_DeleteInstanceAccessControlAttributeConfigurationCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteInstanceAccessControlAttributeConfiguration"); let body: any; - body = JSON.stringify(se_DeleteInstanceAccessControlAttributeConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -364,7 +337,7 @@ export const se_DeletePermissionsBoundaryFromPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePermissionsBoundaryFromPermissionSet"); let body: any; - body = JSON.stringify(se_DeletePermissionsBoundaryFromPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -377,7 +350,7 @@ export const se_DeletePermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePermissionSet"); let body: any; - body = JSON.stringify(se_DeletePermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -390,7 +363,7 @@ export const se_DescribeAccountAssignmentCreationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountAssignmentCreationStatus"); let body: any; - body = JSON.stringify(se_DescribeAccountAssignmentCreationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -403,7 +376,7 @@ export const se_DescribeAccountAssignmentDeletionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountAssignmentDeletionStatus"); let body: any; - body = JSON.stringify(se_DescribeAccountAssignmentDeletionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -416,7 +389,7 @@ export const se_DescribeInstanceAccessControlAttributeConfigurationCommand = asy ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInstanceAccessControlAttributeConfiguration"); let body: any; - body = JSON.stringify(se_DescribeInstanceAccessControlAttributeConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -429,7 +402,7 @@ export const se_DescribePermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePermissionSet"); let body: any; - body = JSON.stringify(se_DescribePermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -442,7 +415,7 @@ export const se_DescribePermissionSetProvisioningStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribePermissionSetProvisioningStatus"); let body: any; - body = JSON.stringify(se_DescribePermissionSetProvisioningStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -455,7 +428,7 @@ export const se_DetachCustomerManagedPolicyReferenceFromPermissionSetCommand = a ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachCustomerManagedPolicyReferenceFromPermissionSet"); let body: any; - body = JSON.stringify(se_DetachCustomerManagedPolicyReferenceFromPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -468,7 +441,7 @@ export const se_DetachManagedPolicyFromPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachManagedPolicyFromPermissionSet"); let body: any; - body = JSON.stringify(se_DetachManagedPolicyFromPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -481,7 +454,7 @@ export const se_GetInlinePolicyForPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetInlinePolicyForPermissionSet"); let body: any; - body = JSON.stringify(se_GetInlinePolicyForPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -494,7 +467,7 @@ export const se_GetPermissionsBoundaryForPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPermissionsBoundaryForPermissionSet"); let body: any; - body = JSON.stringify(se_GetPermissionsBoundaryForPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -507,7 +480,7 @@ export const se_ListAccountAssignmentCreationStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccountAssignmentCreationStatus"); let body: any; - body = JSON.stringify(se_ListAccountAssignmentCreationStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -520,7 +493,7 @@ export const se_ListAccountAssignmentDeletionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccountAssignmentDeletionStatus"); let body: any; - body = JSON.stringify(se_ListAccountAssignmentDeletionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -533,7 +506,7 @@ export const se_ListAccountAssignmentsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccountAssignments"); let body: any; - body = JSON.stringify(se_ListAccountAssignmentsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -546,7 +519,7 @@ export const se_ListAccountsForProvisionedPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccountsForProvisionedPermissionSet"); let body: any; - body = JSON.stringify(se_ListAccountsForProvisionedPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -559,7 +532,7 @@ export const se_ListCustomerManagedPolicyReferencesInPermissionSetCommand = asyn ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCustomerManagedPolicyReferencesInPermissionSet"); let body: any; - body = JSON.stringify(se_ListCustomerManagedPolicyReferencesInPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -572,7 +545,7 @@ export const se_ListInstancesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListInstances"); let body: any; - body = JSON.stringify(se_ListInstancesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -585,7 +558,7 @@ export const se_ListManagedPoliciesInPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListManagedPoliciesInPermissionSet"); let body: any; - body = JSON.stringify(se_ListManagedPoliciesInPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -598,7 +571,7 @@ export const se_ListPermissionSetProvisioningStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPermissionSetProvisioningStatus"); let body: any; - body = JSON.stringify(se_ListPermissionSetProvisioningStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -611,7 +584,7 @@ export const se_ListPermissionSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPermissionSets"); let body: any; - body = JSON.stringify(se_ListPermissionSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -624,7 +597,7 @@ export const se_ListPermissionSetsProvisionedToAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListPermissionSetsProvisionedToAccount"); let body: any; - body = JSON.stringify(se_ListPermissionSetsProvisionedToAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -637,7 +610,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -650,7 +623,7 @@ export const se_ProvisionPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ProvisionPermissionSet"); let body: any; - body = JSON.stringify(se_ProvisionPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -663,7 +636,7 @@ export const se_PutInlinePolicyToPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutInlinePolicyToPermissionSet"); let body: any; - body = JSON.stringify(se_PutInlinePolicyToPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -676,7 +649,7 @@ export const se_PutPermissionsBoundaryToPermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPermissionsBoundaryToPermissionSet"); let body: any; - body = JSON.stringify(se_PutPermissionsBoundaryToPermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -689,7 +662,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -702,7 +675,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -715,7 +688,7 @@ export const se_UpdateInstanceAccessControlAttributeConfigurationCommand = async ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateInstanceAccessControlAttributeConfiguration"); let body: any; - body = JSON.stringify(se_UpdateInstanceAccessControlAttributeConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -728,7 +701,7 @@ export const se_UpdatePermissionSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePermissionSet"); let body: any; - body = JSON.stringify(se_UpdatePermissionSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -744,12 +717,12 @@ export const de_AttachCustomerManagedPolicyReferenceToPermissionSetCommand = asy } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AttachCustomerManagedPolicyReferenceToPermissionSetResponse(data, context); + contents = _json(data); const response: AttachCustomerManagedPolicyReferenceToPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -788,10 +761,9 @@ const de_AttachCustomerManagedPolicyReferenceToPermissionSetCommandError = async throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -809,12 +781,12 @@ export const de_AttachManagedPolicyToPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AttachManagedPolicyToPermissionSetResponse(data, context); + contents = _json(data); const response: AttachManagedPolicyToPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -853,10 +825,9 @@ const de_AttachManagedPolicyToPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -879,7 +850,7 @@ export const de_CreateAccountAssignmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -918,10 +889,9 @@ const de_CreateAccountAssignmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -939,12 +909,12 @@ export const de_CreateInstanceAccessControlAttributeConfigurationCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateInstanceAccessControlAttributeConfigurationResponse(data, context); + contents = _json(data); const response: CreateInstanceAccessControlAttributeConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -980,10 +950,9 @@ const de_CreateInstanceAccessControlAttributeConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1006,7 +975,7 @@ export const de_CreatePermissionSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1045,10 +1014,9 @@ const de_CreatePermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1071,7 +1039,7 @@ export const de_DeleteAccountAssignmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1107,10 +1075,9 @@ const de_DeleteAccountAssignmentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1128,12 +1095,12 @@ export const de_DeleteInlinePolicyFromPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteInlinePolicyFromPermissionSetResponse(data, context); + contents = _json(data); const response: DeleteInlinePolicyFromPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1169,10 +1136,9 @@ const de_DeleteInlinePolicyFromPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1190,12 +1156,12 @@ export const de_DeleteInstanceAccessControlAttributeConfigurationCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteInstanceAccessControlAttributeConfigurationResponse(data, context); + contents = _json(data); const response: DeleteInstanceAccessControlAttributeConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1231,10 +1197,9 @@ const de_DeleteInstanceAccessControlAttributeConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1252,12 +1217,12 @@ export const de_DeletePermissionsBoundaryFromPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePermissionsBoundaryFromPermissionSetResponse(data, context); + contents = _json(data); const response: DeletePermissionsBoundaryFromPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1290,10 +1255,9 @@ const de_DeletePermissionsBoundaryFromPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1311,12 +1275,12 @@ export const de_DeletePermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePermissionSetResponse(data, context); + contents = _json(data); const response: DeletePermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1352,10 +1316,9 @@ const de_DeletePermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1378,7 +1341,7 @@ export const de_DescribeAccountAssignmentCreationStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1411,10 +1374,9 @@ const de_DescribeAccountAssignmentCreationStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1437,7 +1399,7 @@ export const de_DescribeAccountAssignmentDeletionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1470,10 +1432,9 @@ const de_DescribeAccountAssignmentDeletionStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1491,12 +1452,12 @@ export const de_DescribeInstanceAccessControlAttributeConfigurationCommand = asy } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeInstanceAccessControlAttributeConfigurationResponse(data, context); + contents = _json(data); const response: DescribeInstanceAccessControlAttributeConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1529,10 +1490,9 @@ const de_DescribeInstanceAccessControlAttributeConfigurationCommandError = async throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1555,7 +1515,7 @@ export const de_DescribePermissionSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1588,10 +1548,9 @@ const de_DescribePermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1614,7 +1573,7 @@ export const de_DescribePermissionSetProvisioningStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1647,10 +1606,9 @@ const de_DescribePermissionSetProvisioningStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1668,12 +1626,12 @@ export const de_DetachCustomerManagedPolicyReferenceFromPermissionSetCommand = a } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DetachCustomerManagedPolicyReferenceFromPermissionSetResponse(data, context); + contents = _json(data); const response: DetachCustomerManagedPolicyReferenceFromPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1709,10 +1667,9 @@ const de_DetachCustomerManagedPolicyReferenceFromPermissionSetCommandError = asy throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1730,12 +1687,12 @@ export const de_DetachManagedPolicyFromPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DetachManagedPolicyFromPermissionSetResponse(data, context); + contents = _json(data); const response: DetachManagedPolicyFromPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1771,10 +1728,9 @@ const de_DetachManagedPolicyFromPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1792,12 +1748,12 @@ export const de_GetInlinePolicyForPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetInlinePolicyForPermissionSetResponse(data, context); + contents = _json(data); const response: GetInlinePolicyForPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1830,10 +1786,9 @@ const de_GetInlinePolicyForPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1851,12 +1806,12 @@ export const de_GetPermissionsBoundaryForPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPermissionsBoundaryForPermissionSetResponse(data, context); + contents = _json(data); const response: GetPermissionsBoundaryForPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1889,10 +1844,9 @@ const de_GetPermissionsBoundaryForPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1915,7 +1869,7 @@ export const de_ListAccountAssignmentCreationStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1948,10 +1902,9 @@ const de_ListAccountAssignmentCreationStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1974,7 +1927,7 @@ export const de_ListAccountAssignmentDeletionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2007,10 +1960,9 @@ const de_ListAccountAssignmentDeletionStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,12 +1980,12 @@ export const de_ListAccountAssignmentsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAccountAssignmentsResponse(data, context); + contents = _json(data); const response: ListAccountAssignmentsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2066,10 +2018,9 @@ const de_ListAccountAssignmentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2087,12 +2038,12 @@ export const de_ListAccountsForProvisionedPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAccountsForProvisionedPermissionSetResponse(data, context); + contents = _json(data); const response: ListAccountsForProvisionedPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2125,10 +2076,9 @@ const de_ListAccountsForProvisionedPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2146,12 +2096,12 @@ export const de_ListCustomerManagedPolicyReferencesInPermissionSetCommand = asyn } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListCustomerManagedPolicyReferencesInPermissionSetResponse(data, context); + contents = _json(data); const response: ListCustomerManagedPolicyReferencesInPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2184,10 +2134,9 @@ const de_ListCustomerManagedPolicyReferencesInPermissionSetCommandError = async throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2205,12 +2154,12 @@ export const de_ListInstancesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListInstancesResponse(data, context); + contents = _json(data); const response: ListInstancesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2240,10 +2189,9 @@ const de_ListInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,12 +2209,12 @@ export const de_ListManagedPoliciesInPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListManagedPoliciesInPermissionSetResponse(data, context); + contents = _json(data); const response: ListManagedPoliciesInPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2299,10 +2247,9 @@ const de_ListManagedPoliciesInPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2325,7 +2272,7 @@ export const de_ListPermissionSetProvisioningStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2358,10 +2305,9 @@ const de_ListPermissionSetProvisioningStatusCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2379,12 +2325,12 @@ export const de_ListPermissionSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPermissionSetsResponse(data, context); + contents = _json(data); const response: ListPermissionSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2417,10 +2363,9 @@ const de_ListPermissionSetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2438,12 +2383,12 @@ export const de_ListPermissionSetsProvisionedToAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListPermissionSetsProvisionedToAccountResponse(data, context); + contents = _json(data); const response: ListPermissionSetsProvisionedToAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2476,10 +2421,9 @@ const de_ListPermissionSetsProvisionedToAccountCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,12 +2441,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2535,10 +2479,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2561,7 +2504,7 @@ export const de_ProvisionPermissionSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2597,10 +2540,9 @@ const de_ProvisionPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2618,12 +2560,12 @@ export const de_PutInlinePolicyToPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutInlinePolicyToPermissionSetResponse(data, context); + contents = _json(data); const response: PutInlinePolicyToPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2662,10 +2604,9 @@ const de_PutInlinePolicyToPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2683,12 +2624,12 @@ export const de_PutPermissionsBoundaryToPermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPermissionsBoundaryToPermissionSetResponse(data, context); + contents = _json(data); const response: PutPermissionsBoundaryToPermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2724,10 +2665,9 @@ const de_PutPermissionsBoundaryToPermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2745,12 +2685,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2789,10 +2729,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2810,12 +2749,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2851,10 +2790,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2872,12 +2810,12 @@ export const de_UpdateInstanceAccessControlAttributeConfigurationCommand = async } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateInstanceAccessControlAttributeConfigurationResponse(data, context); + contents = _json(data); const response: UpdateInstanceAccessControlAttributeConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2913,10 +2851,9 @@ const de_UpdateInstanceAccessControlAttributeConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2934,12 +2871,12 @@ export const de_UpdatePermissionSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePermissionSetResponse(data, context); + contents = _json(data); const response: UpdatePermissionSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2975,10 +2912,9 @@ const de_UpdatePermissionSetCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2992,7 +2928,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3005,7 +2941,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3021,7 +2957,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3037,7 +2973,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3053,7 +2989,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3066,7 +3002,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3079,7 +3015,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3087,716 +3023,115 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AccessControlAttribute - */ -const se_AccessControlAttribute = (input: AccessControlAttribute, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: se_AccessControlAttributeValue(input.Value, context) }), - }; -}; +// se_AccessControlAttribute omitted. -/** - * serializeAws_json1_1AccessControlAttributeList - */ -const se_AccessControlAttributeList = (input: AccessControlAttribute[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AccessControlAttribute(entry, context); - }); -}; +// se_AccessControlAttributeList omitted. -/** - * serializeAws_json1_1AccessControlAttributeValue - */ -const se_AccessControlAttributeValue = (input: AccessControlAttributeValue, context: __SerdeContext): any => { - return { - ...(input.Source != null && { Source: se_AccessControlAttributeValueSourceList(input.Source, context) }), - }; -}; +// se_AccessControlAttributeValue omitted. -/** - * serializeAws_json1_1AccessControlAttributeValueSourceList - */ -const se_AccessControlAttributeValueSourceList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1AttachCustomerManagedPolicyReferenceToPermissionSetRequest - */ -const se_AttachCustomerManagedPolicyReferenceToPermissionSetRequest = ( - input: AttachCustomerManagedPolicyReferenceToPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.CustomerManagedPolicyReference != null && { - CustomerManagedPolicyReference: se_CustomerManagedPolicyReference(input.CustomerManagedPolicyReference, context), - }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; - -/** - * serializeAws_json1_1AttachManagedPolicyToPermissionSetRequest - */ -const se_AttachManagedPolicyToPermissionSetRequest = ( - input: AttachManagedPolicyToPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.ManagedPolicyArn != null && { ManagedPolicyArn: input.ManagedPolicyArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; - -/** - * serializeAws_json1_1CreateAccountAssignmentRequest - */ -const se_CreateAccountAssignmentRequest = (input: CreateAccountAssignmentRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - ...(input.PrincipalId != null && { PrincipalId: input.PrincipalId }), - ...(input.PrincipalType != null && { PrincipalType: input.PrincipalType }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - }; -}; +// se_AccessControlAttributeValueSourceList omitted. -/** - * serializeAws_json1_1CreateInstanceAccessControlAttributeConfigurationRequest - */ -const se_CreateInstanceAccessControlAttributeConfigurationRequest = ( - input: CreateInstanceAccessControlAttributeConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceAccessControlAttributeConfiguration != null && { - InstanceAccessControlAttributeConfiguration: se_InstanceAccessControlAttributeConfiguration( - input.InstanceAccessControlAttributeConfiguration, - context - ), - }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - }; -}; +// se_AttachCustomerManagedPolicyReferenceToPermissionSetRequest omitted. -/** - * serializeAws_json1_1CreatePermissionSetRequest - */ -const se_CreatePermissionSetRequest = (input: CreatePermissionSetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RelayState != null && { RelayState: input.RelayState }), - ...(input.SessionDuration != null && { SessionDuration: input.SessionDuration }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_AttachManagedPolicyToPermissionSetRequest omitted. -/** - * serializeAws_json1_1CustomerManagedPolicyReference - */ -const se_CustomerManagedPolicyReference = (input: CustomerManagedPolicyReference, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Path != null && { Path: input.Path }), - }; -}; +// se_CreateAccountAssignmentRequest omitted. -/** - * serializeAws_json1_1DeleteAccountAssignmentRequest - */ -const se_DeleteAccountAssignmentRequest = (input: DeleteAccountAssignmentRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - ...(input.PrincipalId != null && { PrincipalId: input.PrincipalId }), - ...(input.PrincipalType != null && { PrincipalType: input.PrincipalType }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - }; -}; +// se_CreateInstanceAccessControlAttributeConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteInlinePolicyFromPermissionSetRequest - */ -const se_DeleteInlinePolicyFromPermissionSetRequest = ( - input: DeleteInlinePolicyFromPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_CreatePermissionSetRequest omitted. -/** - * serializeAws_json1_1DeleteInstanceAccessControlAttributeConfigurationRequest - */ -const se_DeleteInstanceAccessControlAttributeConfigurationRequest = ( - input: DeleteInstanceAccessControlAttributeConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - }; -}; +// se_CustomerManagedPolicyReference omitted. -/** - * serializeAws_json1_1DeletePermissionsBoundaryFromPermissionSetRequest - */ -const se_DeletePermissionsBoundaryFromPermissionSetRequest = ( - input: DeletePermissionsBoundaryFromPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DeleteAccountAssignmentRequest omitted. -/** - * serializeAws_json1_1DeletePermissionSetRequest - */ -const se_DeletePermissionSetRequest = (input: DeletePermissionSetRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DeleteInlinePolicyFromPermissionSetRequest omitted. -/** - * serializeAws_json1_1DescribeAccountAssignmentCreationStatusRequest - */ -const se_DescribeAccountAssignmentCreationStatusRequest = ( - input: DescribeAccountAssignmentCreationStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountAssignmentCreationRequestId != null && { - AccountAssignmentCreationRequestId: input.AccountAssignmentCreationRequestId, - }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - }; -}; +// se_DeleteInstanceAccessControlAttributeConfigurationRequest omitted. -/** - * serializeAws_json1_1DescribeAccountAssignmentDeletionStatusRequest - */ -const se_DescribeAccountAssignmentDeletionStatusRequest = ( - input: DescribeAccountAssignmentDeletionStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountAssignmentDeletionRequestId != null && { - AccountAssignmentDeletionRequestId: input.AccountAssignmentDeletionRequestId, - }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - }; -}; +// se_DeletePermissionsBoundaryFromPermissionSetRequest omitted. -/** - * serializeAws_json1_1DescribeInstanceAccessControlAttributeConfigurationRequest - */ -const se_DescribeInstanceAccessControlAttributeConfigurationRequest = ( - input: DescribeInstanceAccessControlAttributeConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - }; -}; +// se_DeletePermissionSetRequest omitted. -/** - * serializeAws_json1_1DescribePermissionSetProvisioningStatusRequest - */ -const se_DescribePermissionSetProvisioningStatusRequest = ( - input: DescribePermissionSetProvisioningStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.ProvisionPermissionSetRequestId != null && { - ProvisionPermissionSetRequestId: input.ProvisionPermissionSetRequestId, - }), - }; -}; +// se_DescribeAccountAssignmentCreationStatusRequest omitted. -/** - * serializeAws_json1_1DescribePermissionSetRequest - */ -const se_DescribePermissionSetRequest = (input: DescribePermissionSetRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DescribeAccountAssignmentDeletionStatusRequest omitted. -/** - * serializeAws_json1_1DetachCustomerManagedPolicyReferenceFromPermissionSetRequest - */ -const se_DetachCustomerManagedPolicyReferenceFromPermissionSetRequest = ( - input: DetachCustomerManagedPolicyReferenceFromPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.CustomerManagedPolicyReference != null && { - CustomerManagedPolicyReference: se_CustomerManagedPolicyReference(input.CustomerManagedPolicyReference, context), - }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DescribeInstanceAccessControlAttributeConfigurationRequest omitted. -/** - * serializeAws_json1_1DetachManagedPolicyFromPermissionSetRequest - */ -const se_DetachManagedPolicyFromPermissionSetRequest = ( - input: DetachManagedPolicyFromPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.ManagedPolicyArn != null && { ManagedPolicyArn: input.ManagedPolicyArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DescribePermissionSetProvisioningStatusRequest omitted. -/** - * serializeAws_json1_1GetInlinePolicyForPermissionSetRequest - */ -const se_GetInlinePolicyForPermissionSetRequest = ( - input: GetInlinePolicyForPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DescribePermissionSetRequest omitted. -/** - * serializeAws_json1_1GetPermissionsBoundaryForPermissionSetRequest - */ -const se_GetPermissionsBoundaryForPermissionSetRequest = ( - input: GetPermissionsBoundaryForPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_DetachCustomerManagedPolicyReferenceFromPermissionSetRequest omitted. -/** - * serializeAws_json1_1InstanceAccessControlAttributeConfiguration - */ -const se_InstanceAccessControlAttributeConfiguration = ( - input: InstanceAccessControlAttributeConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.AccessControlAttributes != null && { - AccessControlAttributes: se_AccessControlAttributeList(input.AccessControlAttributes, context), - }), - }; -}; +// se_DetachManagedPolicyFromPermissionSetRequest omitted. -/** - * serializeAws_json1_1ListAccountAssignmentCreationStatusRequest - */ -const se_ListAccountAssignmentCreationStatusRequest = ( - input: ListAccountAssignmentCreationStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filter != null && { Filter: se_OperationStatusFilter(input.Filter, context) }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetInlinePolicyForPermissionSetRequest omitted. -/** - * serializeAws_json1_1ListAccountAssignmentDeletionStatusRequest - */ -const se_ListAccountAssignmentDeletionStatusRequest = ( - input: ListAccountAssignmentDeletionStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filter != null && { Filter: se_OperationStatusFilter(input.Filter, context) }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetPermissionsBoundaryForPermissionSetRequest omitted. -/** - * serializeAws_json1_1ListAccountAssignmentsRequest - */ -const se_ListAccountAssignmentsRequest = (input: ListAccountAssignmentsRequest, context: __SerdeContext): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_InstanceAccessControlAttributeConfiguration omitted. -/** - * serializeAws_json1_1ListAccountsForProvisionedPermissionSetRequest - */ -const se_ListAccountsForProvisionedPermissionSetRequest = ( - input: ListAccountsForProvisionedPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - ...(input.ProvisioningStatus != null && { ProvisioningStatus: input.ProvisioningStatus }), - }; -}; +// se_ListAccountAssignmentCreationStatusRequest omitted. -/** - * serializeAws_json1_1ListCustomerManagedPolicyReferencesInPermissionSetRequest - */ -const se_ListCustomerManagedPolicyReferencesInPermissionSetRequest = ( - input: ListCustomerManagedPolicyReferencesInPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_ListAccountAssignmentDeletionStatusRequest omitted. -/** - * serializeAws_json1_1ListInstancesRequest - */ -const se_ListInstancesRequest = (input: ListInstancesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListAccountAssignmentsRequest omitted. -/** - * serializeAws_json1_1ListManagedPoliciesInPermissionSetRequest - */ -const se_ListManagedPoliciesInPermissionSetRequest = ( - input: ListManagedPoliciesInPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_ListAccountsForProvisionedPermissionSetRequest omitted. -/** - * serializeAws_json1_1ListPermissionSetProvisioningStatusRequest - */ -const se_ListPermissionSetProvisioningStatusRequest = ( - input: ListPermissionSetProvisioningStatusRequest, - context: __SerdeContext -): any => { - return { - ...(input.Filter != null && { Filter: se_OperationStatusFilter(input.Filter, context) }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCustomerManagedPolicyReferencesInPermissionSetRequest omitted. -/** - * serializeAws_json1_1ListPermissionSetsProvisionedToAccountRequest - */ -const se_ListPermissionSetsProvisionedToAccountRequest = ( - input: ListPermissionSetsProvisionedToAccountRequest, - context: __SerdeContext -): any => { - return { - ...(input.AccountId != null && { AccountId: input.AccountId }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProvisioningStatus != null && { ProvisioningStatus: input.ProvisioningStatus }), - }; -}; +// se_ListInstancesRequest omitted. -/** - * serializeAws_json1_1ListPermissionSetsRequest - */ -const se_ListPermissionSetsRequest = (input: ListPermissionSetsRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListManagedPoliciesInPermissionSetRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListPermissionSetProvisioningStatusRequest omitted. -/** - * serializeAws_json1_1OperationStatusFilter - */ -const se_OperationStatusFilter = (input: OperationStatusFilter, context: __SerdeContext): any => { - return { - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListPermissionSetsProvisionedToAccountRequest omitted. -/** - * serializeAws_json1_1PermissionsBoundary - */ -const se_PermissionsBoundary = (input: PermissionsBoundary, context: __SerdeContext): any => { - return { - ...(input.CustomerManagedPolicyReference != null && { - CustomerManagedPolicyReference: se_CustomerManagedPolicyReference(input.CustomerManagedPolicyReference, context), - }), - ...(input.ManagedPolicyArn != null && { ManagedPolicyArn: input.ManagedPolicyArn }), - }; -}; +// se_ListPermissionSetsRequest omitted. -/** - * serializeAws_json1_1ProvisionPermissionSetRequest - */ -const se_ProvisionPermissionSetRequest = (input: ProvisionPermissionSetRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - ...(input.TargetId != null && { TargetId: input.TargetId }), - ...(input.TargetType != null && { TargetType: input.TargetType }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1PutInlinePolicyToPermissionSetRequest - */ -const se_PutInlinePolicyToPermissionSetRequest = ( - input: PutInlinePolicyToPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InlinePolicy != null && { InlinePolicy: input.InlinePolicy }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - }; -}; +// se_OperationStatusFilter omitted. -/** - * serializeAws_json1_1PutPermissionsBoundaryToPermissionSetRequest - */ -const se_PutPermissionsBoundaryToPermissionSetRequest = ( - input: PutPermissionsBoundaryToPermissionSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - ...(input.PermissionsBoundary != null && { - PermissionsBoundary: se_PermissionsBoundary(input.PermissionsBoundary, context), - }), - }; -}; +// se_PermissionsBoundary omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_ProvisionPermissionSetRequest omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PutInlinePolicyToPermissionSetRequest omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_PutPermissionsBoundaryToPermissionSetRequest omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1UpdateInstanceAccessControlAttributeConfigurationRequest - */ -const se_UpdateInstanceAccessControlAttributeConfigurationRequest = ( - input: UpdateInstanceAccessControlAttributeConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.InstanceAccessControlAttributeConfiguration != null && { - InstanceAccessControlAttributeConfiguration: se_InstanceAccessControlAttributeConfiguration( - input.InstanceAccessControlAttributeConfiguration, - context - ), - }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - }; -}; +// se_TagList omitted. -/** - * serializeAws_json1_1UpdatePermissionSetRequest - */ -const se_UpdatePermissionSetRequest = (input: UpdatePermissionSetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.InstanceArn != null && { InstanceArn: input.InstanceArn }), - ...(input.PermissionSetArn != null && { PermissionSetArn: input.PermissionSetArn }), - ...(input.RelayState != null && { RelayState: input.RelayState }), - ...(input.SessionDuration != null && { SessionDuration: input.SessionDuration }), - }; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1AccessControlAttribute - */ -const de_AccessControlAttribute = (output: any, context: __SerdeContext): AccessControlAttribute => { - return { - Key: __expectString(output.Key), - Value: output.Value != null ? de_AccessControlAttributeValue(output.Value, context) : undefined, - } as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1AccessControlAttributeList - */ -const de_AccessControlAttributeList = (output: any, context: __SerdeContext): AccessControlAttribute[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessControlAttribute(entry, context); - }); - return retVal; -}; +// se_UpdateInstanceAccessControlAttributeConfigurationRequest omitted. -/** - * deserializeAws_json1_1AccessControlAttributeValue - */ -const de_AccessControlAttributeValue = (output: any, context: __SerdeContext): AccessControlAttributeValue => { - return { - Source: output.Source != null ? de_AccessControlAttributeValueSourceList(output.Source, context) : undefined, - } as any; -}; +// se_UpdatePermissionSetRequest omitted. -/** - * deserializeAws_json1_1AccessControlAttributeValueSourceList - */ -const de_AccessControlAttributeValueSourceList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccessControlAttribute omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessControlAttributeList omitted. -/** - * deserializeAws_json1_1AccountAssignment - */ -const de_AccountAssignment = (output: any, context: __SerdeContext): AccountAssignment => { - return { - AccountId: __expectString(output.AccountId), - PermissionSetArn: __expectString(output.PermissionSetArn), - PrincipalId: __expectString(output.PrincipalId), - PrincipalType: __expectString(output.PrincipalType), - } as any; -}; +// de_AccessControlAttributeValue omitted. -/** - * deserializeAws_json1_1AccountAssignmentList - */ -const de_AccountAssignmentList = (output: any, context: __SerdeContext): AccountAssignment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountAssignment(entry, context); - }); - return retVal; -}; +// de_AccessControlAttributeValueSourceList omitted. + +// de_AccessDeniedException omitted. + +// de_AccountAssignment omitted. + +// de_AccountAssignmentList omitted. /** * deserializeAws_json1_1AccountAssignmentOperationStatus @@ -3805,20 +3140,17 @@ const de_AccountAssignmentOperationStatus = ( output: any, context: __SerdeContext ): AccountAssignmentOperationStatus => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - FailureReason: __expectString(output.FailureReason), - PermissionSetArn: __expectString(output.PermissionSetArn), - PrincipalId: __expectString(output.PrincipalId), - PrincipalType: __expectString(output.PrincipalType), - RequestId: __expectString(output.RequestId), - Status: __expectString(output.Status), - TargetId: __expectString(output.TargetId), - TargetType: __expectString(output.TargetType), - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + PermissionSetArn: __expectString, + PrincipalId: __expectString, + PrincipalType: __expectString, + RequestId: __expectString, + Status: __expectString, + TargetId: __expectString, + TargetType: __expectString, + }) as any; }; /** @@ -3831,9 +3163,6 @@ const de_AccountAssignmentOperationStatusList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccountAssignmentOperationStatusMetadata(entry, context); }); return retVal; @@ -3846,192 +3175,65 @@ const de_AccountAssignmentOperationStatusMetadata = ( output: any, context: __SerdeContext ): AccountAssignmentOperationStatusMetadata => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - RequestId: __expectString(output.RequestId), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RequestId: __expectString, + Status: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1AccountList - */ -const de_AccountList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AccountList omitted. -/** - * deserializeAws_json1_1AttachCustomerManagedPolicyReferenceToPermissionSetResponse - */ -const de_AttachCustomerManagedPolicyReferenceToPermissionSetResponse = ( - output: any, - context: __SerdeContext -): AttachCustomerManagedPolicyReferenceToPermissionSetResponse => { - return {} as any; -}; +// de_AttachCustomerManagedPolicyReferenceToPermissionSetResponse omitted. -/** - * deserializeAws_json1_1AttachedManagedPolicy - */ -const de_AttachedManagedPolicy = (output: any, context: __SerdeContext): AttachedManagedPolicy => { - return { - Arn: __expectString(output.Arn), - Name: __expectString(output.Name), - } as any; -}; +// de_AttachedManagedPolicy omitted. -/** - * deserializeAws_json1_1AttachedManagedPolicyList - */ -const de_AttachedManagedPolicyList = (output: any, context: __SerdeContext): AttachedManagedPolicy[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttachedManagedPolicy(entry, context); - }); - return retVal; -}; +// de_AttachedManagedPolicyList omitted. -/** - * deserializeAws_json1_1AttachManagedPolicyToPermissionSetResponse - */ -const de_AttachManagedPolicyToPermissionSetResponse = ( - output: any, - context: __SerdeContext -): AttachManagedPolicyToPermissionSetResponse => { - return {} as any; -}; +// de_AttachManagedPolicyToPermissionSetResponse omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. /** * deserializeAws_json1_1CreateAccountAssignmentResponse */ const de_CreateAccountAssignmentResponse = (output: any, context: __SerdeContext): CreateAccountAssignmentResponse => { - return { - AccountAssignmentCreationStatus: - output.AccountAssignmentCreationStatus != null - ? de_AccountAssignmentOperationStatus(output.AccountAssignmentCreationStatus, context) - : undefined, - } as any; + return take(output, { + AccountAssignmentCreationStatus: (_: any) => de_AccountAssignmentOperationStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateInstanceAccessControlAttributeConfigurationResponse - */ -const de_CreateInstanceAccessControlAttributeConfigurationResponse = ( - output: any, - context: __SerdeContext -): CreateInstanceAccessControlAttributeConfigurationResponse => { - return {} as any; -}; +// de_CreateInstanceAccessControlAttributeConfigurationResponse omitted. /** * deserializeAws_json1_1CreatePermissionSetResponse */ const de_CreatePermissionSetResponse = (output: any, context: __SerdeContext): CreatePermissionSetResponse => { - return { - PermissionSet: output.PermissionSet != null ? de_PermissionSet(output.PermissionSet, context) : undefined, - } as any; + return take(output, { + PermissionSet: (_: any) => de_PermissionSet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CustomerManagedPolicyReference - */ -const de_CustomerManagedPolicyReference = (output: any, context: __SerdeContext): CustomerManagedPolicyReference => { - return { - Name: __expectString(output.Name), - Path: __expectString(output.Path), - } as any; -}; +// de_CustomerManagedPolicyReference omitted. -/** - * deserializeAws_json1_1CustomerManagedPolicyReferenceList - */ -const de_CustomerManagedPolicyReferenceList = ( - output: any, - context: __SerdeContext -): CustomerManagedPolicyReference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomerManagedPolicyReference(entry, context); - }); - return retVal; -}; +// de_CustomerManagedPolicyReferenceList omitted. /** * deserializeAws_json1_1DeleteAccountAssignmentResponse */ const de_DeleteAccountAssignmentResponse = (output: any, context: __SerdeContext): DeleteAccountAssignmentResponse => { - return { - AccountAssignmentDeletionStatus: - output.AccountAssignmentDeletionStatus != null - ? de_AccountAssignmentOperationStatus(output.AccountAssignmentDeletionStatus, context) - : undefined, - } as any; + return take(output, { + AccountAssignmentDeletionStatus: (_: any) => de_AccountAssignmentOperationStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteInlinePolicyFromPermissionSetResponse - */ -const de_DeleteInlinePolicyFromPermissionSetResponse = ( - output: any, - context: __SerdeContext -): DeleteInlinePolicyFromPermissionSetResponse => { - return {} as any; -}; +// de_DeleteInlinePolicyFromPermissionSetResponse omitted. -/** - * deserializeAws_json1_1DeleteInstanceAccessControlAttributeConfigurationResponse - */ -const de_DeleteInstanceAccessControlAttributeConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteInstanceAccessControlAttributeConfigurationResponse => { - return {} as any; -}; +// de_DeleteInstanceAccessControlAttributeConfigurationResponse omitted. -/** - * deserializeAws_json1_1DeletePermissionsBoundaryFromPermissionSetResponse - */ -const de_DeletePermissionsBoundaryFromPermissionSetResponse = ( - output: any, - context: __SerdeContext -): DeletePermissionsBoundaryFromPermissionSetResponse => { - return {} as any; -}; +// de_DeletePermissionsBoundaryFromPermissionSetResponse omitted. -/** - * deserializeAws_json1_1DeletePermissionSetResponse - */ -const de_DeletePermissionSetResponse = (output: any, context: __SerdeContext): DeletePermissionSetResponse => { - return {} as any; -}; +// de_DeletePermissionSetResponse omitted. /** * deserializeAws_json1_1DescribeAccountAssignmentCreationStatusResponse @@ -4040,12 +3242,9 @@ const de_DescribeAccountAssignmentCreationStatusResponse = ( output: any, context: __SerdeContext ): DescribeAccountAssignmentCreationStatusResponse => { - return { - AccountAssignmentCreationStatus: - output.AccountAssignmentCreationStatus != null - ? de_AccountAssignmentOperationStatus(output.AccountAssignmentCreationStatus, context) - : undefined, - } as any; + return take(output, { + AccountAssignmentCreationStatus: (_: any) => de_AccountAssignmentOperationStatus(_, context), + }) as any; }; /** @@ -4055,30 +3254,12 @@ const de_DescribeAccountAssignmentDeletionStatusResponse = ( output: any, context: __SerdeContext ): DescribeAccountAssignmentDeletionStatusResponse => { - return { - AccountAssignmentDeletionStatus: - output.AccountAssignmentDeletionStatus != null - ? de_AccountAssignmentOperationStatus(output.AccountAssignmentDeletionStatus, context) - : undefined, - } as any; + return take(output, { + AccountAssignmentDeletionStatus: (_: any) => de_AccountAssignmentOperationStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeInstanceAccessControlAttributeConfigurationResponse - */ -const de_DescribeInstanceAccessControlAttributeConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeInstanceAccessControlAttributeConfigurationResponse => { - return { - InstanceAccessControlAttributeConfiguration: - output.InstanceAccessControlAttributeConfiguration != null - ? de_InstanceAccessControlAttributeConfiguration(output.InstanceAccessControlAttributeConfiguration, context) - : undefined, - Status: __expectString(output.Status), - StatusReason: __expectString(output.StatusReason), - } as any; -}; +// de_DescribeInstanceAccessControlAttributeConfigurationResponse omitted. /** * deserializeAws_json1_1DescribePermissionSetProvisioningStatusResponse @@ -4087,116 +3268,35 @@ const de_DescribePermissionSetProvisioningStatusResponse = ( output: any, context: __SerdeContext ): DescribePermissionSetProvisioningStatusResponse => { - return { - PermissionSetProvisioningStatus: - output.PermissionSetProvisioningStatus != null - ? de_PermissionSetProvisioningStatus(output.PermissionSetProvisioningStatus, context) - : undefined, - } as any; + return take(output, { + PermissionSetProvisioningStatus: (_: any) => de_PermissionSetProvisioningStatus(_, context), + }) as any; }; /** * deserializeAws_json1_1DescribePermissionSetResponse */ const de_DescribePermissionSetResponse = (output: any, context: __SerdeContext): DescribePermissionSetResponse => { - return { - PermissionSet: output.PermissionSet != null ? de_PermissionSet(output.PermissionSet, context) : undefined, - } as any; + return take(output, { + PermissionSet: (_: any) => de_PermissionSet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DetachCustomerManagedPolicyReferenceFromPermissionSetResponse - */ -const de_DetachCustomerManagedPolicyReferenceFromPermissionSetResponse = ( - output: any, - context: __SerdeContext -): DetachCustomerManagedPolicyReferenceFromPermissionSetResponse => { - return {} as any; -}; +// de_DetachCustomerManagedPolicyReferenceFromPermissionSetResponse omitted. -/** - * deserializeAws_json1_1DetachManagedPolicyFromPermissionSetResponse - */ -const de_DetachManagedPolicyFromPermissionSetResponse = ( - output: any, - context: __SerdeContext -): DetachManagedPolicyFromPermissionSetResponse => { - return {} as any; -}; +// de_DetachManagedPolicyFromPermissionSetResponse omitted. -/** - * deserializeAws_json1_1GetInlinePolicyForPermissionSetResponse - */ -const de_GetInlinePolicyForPermissionSetResponse = ( - output: any, - context: __SerdeContext -): GetInlinePolicyForPermissionSetResponse => { - return { - InlinePolicy: __expectString(output.InlinePolicy), - } as any; -}; +// de_GetInlinePolicyForPermissionSetResponse omitted. -/** - * deserializeAws_json1_1GetPermissionsBoundaryForPermissionSetResponse - */ -const de_GetPermissionsBoundaryForPermissionSetResponse = ( - output: any, - context: __SerdeContext -): GetPermissionsBoundaryForPermissionSetResponse => { - return { - PermissionsBoundary: - output.PermissionsBoundary != null ? de_PermissionsBoundary(output.PermissionsBoundary, context) : undefined, - } as any; -}; +// de_GetPermissionsBoundaryForPermissionSetResponse omitted. -/** - * deserializeAws_json1_1InstanceAccessControlAttributeConfiguration - */ -const de_InstanceAccessControlAttributeConfiguration = ( - output: any, - context: __SerdeContext -): InstanceAccessControlAttributeConfiguration => { - return { - AccessControlAttributes: - output.AccessControlAttributes != null - ? de_AccessControlAttributeList(output.AccessControlAttributes, context) - : undefined, - } as any; -}; +// de_InstanceAccessControlAttributeConfiguration omitted. -/** - * deserializeAws_json1_1InstanceList - */ -const de_InstanceList = (output: any, context: __SerdeContext): InstanceMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceMetadata(entry, context); - }); - return retVal; -}; +// de_InstanceList omitted. -/** - * deserializeAws_json1_1InstanceMetadata - */ -const de_InstanceMetadata = (output: any, context: __SerdeContext): InstanceMetadata => { - return { - IdentityStoreId: __expectString(output.IdentityStoreId), - InstanceArn: __expectString(output.InstanceArn), - } as any; -}; +// de_InstanceMetadata omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. /** * deserializeAws_json1_1ListAccountAssignmentCreationStatusResponse @@ -4205,13 +3305,10 @@ const de_ListAccountAssignmentCreationStatusResponse = ( output: any, context: __SerdeContext ): ListAccountAssignmentCreationStatusResponse => { - return { - AccountAssignmentsCreationStatus: - output.AccountAssignmentsCreationStatus != null - ? de_AccountAssignmentOperationStatusList(output.AccountAssignmentsCreationStatus, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + AccountAssignmentsCreationStatus: (_: any) => de_AccountAssignmentOperationStatusList(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -4221,80 +3318,21 @@ const de_ListAccountAssignmentDeletionStatusResponse = ( output: any, context: __SerdeContext ): ListAccountAssignmentDeletionStatusResponse => { - return { - AccountAssignmentsDeletionStatus: - output.AccountAssignmentsDeletionStatus != null - ? de_AccountAssignmentOperationStatusList(output.AccountAssignmentsDeletionStatus, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + AccountAssignmentsDeletionStatus: (_: any) => de_AccountAssignmentOperationStatusList(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListAccountAssignmentsResponse - */ -const de_ListAccountAssignmentsResponse = (output: any, context: __SerdeContext): ListAccountAssignmentsResponse => { - return { - AccountAssignments: - output.AccountAssignments != null ? de_AccountAssignmentList(output.AccountAssignments, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAccountAssignmentsResponse omitted. -/** - * deserializeAws_json1_1ListAccountsForProvisionedPermissionSetResponse - */ -const de_ListAccountsForProvisionedPermissionSetResponse = ( - output: any, - context: __SerdeContext -): ListAccountsForProvisionedPermissionSetResponse => { - return { - AccountIds: output.AccountIds != null ? de_AccountList(output.AccountIds, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAccountsForProvisionedPermissionSetResponse omitted. -/** - * deserializeAws_json1_1ListCustomerManagedPolicyReferencesInPermissionSetResponse - */ -const de_ListCustomerManagedPolicyReferencesInPermissionSetResponse = ( - output: any, - context: __SerdeContext -): ListCustomerManagedPolicyReferencesInPermissionSetResponse => { - return { - CustomerManagedPolicyReferences: - output.CustomerManagedPolicyReferences != null - ? de_CustomerManagedPolicyReferenceList(output.CustomerManagedPolicyReferences, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListCustomerManagedPolicyReferencesInPermissionSetResponse omitted. -/** - * deserializeAws_json1_1ListInstancesResponse - */ -const de_ListInstancesResponse = (output: any, context: __SerdeContext): ListInstancesResponse => { - return { - Instances: output.Instances != null ? de_InstanceList(output.Instances, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListInstancesResponse omitted. -/** - * deserializeAws_json1_1ListManagedPoliciesInPermissionSetResponse - */ -const de_ListManagedPoliciesInPermissionSetResponse = ( - output: any, - context: __SerdeContext -): ListManagedPoliciesInPermissionSetResponse => { - return { - AttachedManagedPolicies: - output.AttachedManagedPolicies != null - ? de_AttachedManagedPolicyList(output.AttachedManagedPolicies, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListManagedPoliciesInPermissionSetResponse omitted. /** * deserializeAws_json1_1ListPermissionSetProvisioningStatusResponse @@ -4303,108 +3341,48 @@ const de_ListPermissionSetProvisioningStatusResponse = ( output: any, context: __SerdeContext ): ListPermissionSetProvisioningStatusResponse => { - return { - NextToken: __expectString(output.NextToken), - PermissionSetsProvisioningStatus: - output.PermissionSetsProvisioningStatus != null - ? de_PermissionSetProvisioningStatusList(output.PermissionSetsProvisioningStatus, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + PermissionSetsProvisioningStatus: (_: any) => de_PermissionSetProvisioningStatusList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListPermissionSetsProvisionedToAccountResponse - */ -const de_ListPermissionSetsProvisionedToAccountResponse = ( - output: any, - context: __SerdeContext -): ListPermissionSetsProvisionedToAccountResponse => { - return { - NextToken: __expectString(output.NextToken), - PermissionSets: output.PermissionSets != null ? de_PermissionSetList(output.PermissionSets, context) : undefined, - } as any; -}; +// de_ListPermissionSetsProvisionedToAccountResponse omitted. -/** - * deserializeAws_json1_1ListPermissionSetsResponse - */ -const de_ListPermissionSetsResponse = (output: any, context: __SerdeContext): ListPermissionSetsResponse => { - return { - NextToken: __expectString(output.NextToken), - PermissionSets: output.PermissionSets != null ? de_PermissionSetList(output.PermissionSets, context) : undefined, - } as any; -}; +// de_ListPermissionSetsResponse omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1PermissionsBoundary - */ -const de_PermissionsBoundary = (output: any, context: __SerdeContext): PermissionsBoundary => { - return { - CustomerManagedPolicyReference: - output.CustomerManagedPolicyReference != null - ? de_CustomerManagedPolicyReference(output.CustomerManagedPolicyReference, context) - : undefined, - ManagedPolicyArn: __expectString(output.ManagedPolicyArn), - } as any; -}; +// de_PermissionsBoundary omitted. /** * deserializeAws_json1_1PermissionSet */ const de_PermissionSet = (output: any, context: __SerdeContext): PermissionSet => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - Description: __expectString(output.Description), - Name: __expectString(output.Name), - PermissionSetArn: __expectString(output.PermissionSetArn), - RelayState: __expectString(output.RelayState), - SessionDuration: __expectString(output.SessionDuration), - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Name: __expectString, + PermissionSetArn: __expectString, + RelayState: __expectString, + SessionDuration: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1PermissionSetList - */ -const de_PermissionSetList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PermissionSetList omitted. /** * deserializeAws_json1_1PermissionSetProvisioningStatus */ const de_PermissionSetProvisioningStatus = (output: any, context: __SerdeContext): PermissionSetProvisioningStatus => { - return { - AccountId: __expectString(output.AccountId), - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - FailureReason: __expectString(output.FailureReason), - PermissionSetArn: __expectString(output.PermissionSetArn), - RequestId: __expectString(output.RequestId), - Status: __expectString(output.Status), - } as any; + return take(output, { + AccountId: __expectString, + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + PermissionSetArn: __expectString, + RequestId: __expectString, + Status: __expectString, + }) as any; }; /** @@ -4417,9 +3395,6 @@ const de_PermissionSetProvisioningStatusList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PermissionSetProvisioningStatusMetadata(entry, context); }); return retVal; @@ -4432,139 +3407,45 @@ const de_PermissionSetProvisioningStatusMetadata = ( output: any, context: __SerdeContext ): PermissionSetProvisioningStatusMetadata => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - RequestId: __expectString(output.RequestId), - Status: __expectString(output.Status), - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RequestId: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1ProvisionPermissionSetResponse */ const de_ProvisionPermissionSetResponse = (output: any, context: __SerdeContext): ProvisionPermissionSetResponse => { - return { - PermissionSetProvisioningStatus: - output.PermissionSetProvisioningStatus != null - ? de_PermissionSetProvisioningStatus(output.PermissionSetProvisioningStatus, context) - : undefined, - } as any; + return take(output, { + PermissionSetProvisioningStatus: (_: any) => de_PermissionSetProvisioningStatus(_, context), + }) as any; }; -/** - * deserializeAws_json1_1PutInlinePolicyToPermissionSetResponse - */ -const de_PutInlinePolicyToPermissionSetResponse = ( - output: any, - context: __SerdeContext -): PutInlinePolicyToPermissionSetResponse => { - return {} as any; -}; +// de_PutInlinePolicyToPermissionSetResponse omitted. -/** - * deserializeAws_json1_1PutPermissionsBoundaryToPermissionSetResponse - */ -const de_PutPermissionsBoundaryToPermissionSetResponse = ( - output: any, - context: __SerdeContext -): PutPermissionsBoundaryToPermissionSetResponse => { - return {} as any; -}; +// de_PutPermissionsBoundaryToPermissionSetResponse omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateInstanceAccessControlAttributeConfigurationResponse - */ -const de_UpdateInstanceAccessControlAttributeConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateInstanceAccessControlAttributeConfigurationResponse => { - return {} as any; -}; +// de_UpdateInstanceAccessControlAttributeConfigurationResponse omitted. -/** - * deserializeAws_json1_1UpdatePermissionSetResponse - */ -const de_UpdatePermissionSetResponse = (output: any, context: __SerdeContext): UpdatePermissionSetResponse => { - return {} as any; -}; +// de_UpdatePermissionSetResponse omitted. -/** - * deserializeAws_json1_1ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -4586,6 +3467,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-sso-oidc/src/protocols/Aws_restJson1.ts b/clients/client-sso-oidc/src/protocols/Aws_restJson1.ts index 33261edddf4f..f0297287deff 100644 --- a/clients/client-sso-oidc/src/protocols/Aws_restJson1.ts +++ b/clients/client-sso-oidc/src/protocols/Aws_restJson1.ts @@ -1,14 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -51,16 +53,18 @@ export const se_CreateTokenCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/token"; let body: any; - body = JSON.stringify({ - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.code != null && { code: input.code }), - ...(input.deviceCode != null && { deviceCode: input.deviceCode }), - ...(input.grantType != null && { grantType: input.grantType }), - ...(input.redirectUri != null && { redirectUri: input.redirectUri }), - ...(input.refreshToken != null && { refreshToken: input.refreshToken }), - ...(input.scope != null && { scope: se_Scopes(input.scope, context) }), - }); + body = JSON.stringify( + take(input, { + clientId: [], + clientSecret: [], + code: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -85,11 +89,13 @@ export const se_RegisterClientCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/client/register"; let body: any; - body = JSON.stringify({ - ...(input.clientName != null && { clientName: input.clientName }), - ...(input.clientType != null && { clientType: input.clientType }), - ...(input.scopes != null && { scopes: se_Scopes(input.scopes, context) }), - }); + body = JSON.stringify( + take(input, { + clientName: [], + clientType: [], + scopes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -114,11 +120,13 @@ export const se_StartDeviceAuthorizationCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/device_authorization"; let body: any; - body = JSON.stringify({ - ...(input.clientId != null && { clientId: input.clientId }), - ...(input.clientSecret != null && { clientSecret: input.clientSecret }), - ...(input.startUrl != null && { startUrl: input.startUrl }), - }); + body = JSON.stringify( + take(input, { + clientId: [], + clientSecret: [], + startUrl: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -144,21 +152,14 @@ export const de_CreateTokenCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accessToken != null) { - contents.accessToken = __expectString(data.accessToken); - } - if (data.expiresIn != null) { - contents.expiresIn = __expectInt32(data.expiresIn); - } - if (data.idToken != null) { - contents.idToken = __expectString(data.idToken); - } - if (data.refreshToken != null) { - contents.refreshToken = __expectString(data.refreshToken); - } - if (data.tokenType != null) { - contents.tokenType = __expectString(data.tokenType); - } + const doc = take(data, { + accessToken: __expectString, + expiresIn: __expectInt32, + idToken: __expectString, + refreshToken: __expectString, + tokenType: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -210,10 +211,9 @@ const de_CreateTokenCommandError = async ( throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -233,24 +233,15 @@ export const de_RegisterClientCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.authorizationEndpoint != null) { - contents.authorizationEndpoint = __expectString(data.authorizationEndpoint); - } - if (data.clientId != null) { - contents.clientId = __expectString(data.clientId); - } - if (data.clientIdIssuedAt != null) { - contents.clientIdIssuedAt = __expectLong(data.clientIdIssuedAt); - } - if (data.clientSecret != null) { - contents.clientSecret = __expectString(data.clientSecret); - } - if (data.clientSecretExpiresAt != null) { - contents.clientSecretExpiresAt = __expectLong(data.clientSecretExpiresAt); - } - if (data.tokenEndpoint != null) { - contents.tokenEndpoint = __expectString(data.tokenEndpoint); - } + const doc = take(data, { + authorizationEndpoint: __expectString, + clientId: __expectString, + clientIdIssuedAt: __expectLong, + clientSecret: __expectString, + clientSecretExpiresAt: __expectLong, + tokenEndpoint: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -281,10 +272,9 @@ const de_RegisterClientCommandError = async ( throw await de_InvalidScopeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -304,24 +294,15 @@ export const de_StartDeviceAuthorizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.deviceCode != null) { - contents.deviceCode = __expectString(data.deviceCode); - } - if (data.expiresIn != null) { - contents.expiresIn = __expectInt32(data.expiresIn); - } - if (data.interval != null) { - contents.interval = __expectInt32(data.interval); - } - if (data.userCode != null) { - contents.userCode = __expectString(data.userCode); - } - if (data.verificationUri != null) { - contents.verificationUri = __expectString(data.verificationUri); - } - if (data.verificationUriComplete != null) { - contents.verificationUriComplete = __expectString(data.verificationUriComplete); - } + const doc = take(data, { + deviceCode: __expectString, + expiresIn: __expectInt32, + interval: __expectInt32, + userCode: __expectString, + verificationUri: __expectString, + verificationUriComplete: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -355,16 +336,15 @@ const de_StartDeviceAuthorizationCommandError = async ( throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -374,12 +354,11 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -396,12 +375,11 @@ const de_AuthorizationPendingExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new AuthorizationPendingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -418,12 +396,11 @@ const de_ExpiredTokenExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new ExpiredTokenException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -440,12 +417,11 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -462,12 +438,11 @@ const de_InvalidClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -484,12 +459,11 @@ const de_InvalidClientMetadataExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidClientMetadataException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -506,12 +480,11 @@ const de_InvalidGrantExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidGrantException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -528,12 +501,11 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -550,12 +522,11 @@ const de_InvalidScopeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidScopeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -569,12 +540,11 @@ const de_InvalidScopeExceptionRes = async ( const de_SlowDownExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new SlowDownException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -591,12 +561,11 @@ const de_UnauthorizedClientExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedClientException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -613,12 +582,11 @@ const de_UnsupportedGrantTypeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.error != null) { - contents.error = __expectString(data.error); - } - if (data.error_description != null) { - contents.error_description = __expectString(data.error_description); - } + const doc = take(data, { + error: __expectString, + error_description: __expectString, + }); + Object.assign(contents, doc); const exception = new UnsupportedGrantTypeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -626,16 +594,7 @@ const de_UnsupportedGrantTypeExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1Scopes - */ -const se_Scopes = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Scopes omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-sso/src/protocols/Aws_restJson1.ts b/clients/client-sso/src/protocols/Aws_restJson1.ts index 29d9038ddbef..04672fa03991 100644 --- a/clients/client-sso/src/protocols/Aws_restJson1.ts +++ b/clients/client-sso/src/protocols/Aws_restJson1.ts @@ -1,14 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -21,11 +22,8 @@ import { ListAccountRolesCommandInput, ListAccountRolesCommandOutput } from "../ import { ListAccountsCommandInput, ListAccountsCommandOutput } from "../commands/ListAccountsCommand"; import { LogoutCommandInput, LogoutCommandOutput } from "../commands/LogoutCommand"; import { - AccountInfo, InvalidRequestException, ResourceNotFoundException, - RoleCredentials, - RoleInfo, TooManyRequestsException, UnauthorizedException, } from "../models/models_0"; @@ -155,9 +153,10 @@ export const de_GetRoleCredentialsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.roleCredentials != null) { - contents.roleCredentials = de_RoleCredentials(data.roleCredentials, context); - } + const doc = take(data, { + roleCredentials: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -188,10 +187,9 @@ const de_GetRoleCredentialsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -211,12 +209,11 @@ export const de_ListAccountRolesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.roleList != null) { - contents.roleList = de_RoleListType(data.roleList, context); - } + const doc = take(data, { + nextToken: __expectString, + roleList: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -247,10 +244,9 @@ const de_ListAccountRolesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -270,12 +266,11 @@ export const de_ListAccountsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountList != null) { - contents.accountList = de_AccountListType(data.accountList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + accountList: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -306,10 +301,9 @@ const de_ListAccountsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -353,16 +347,15 @@ const de_LogoutCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InvalidRequestExceptionRes */ @@ -372,9 +365,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -391,9 +385,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -410,9 +405,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -429,9 +425,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -439,68 +436,15 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1AccountInfo - */ -const de_AccountInfo = (output: any, context: __SerdeContext): AccountInfo => { - return { - accountId: __expectString(output.accountId), - accountName: __expectString(output.accountName), - emailAddress: __expectString(output.emailAddress), - } as any; -}; +// de_AccountInfo omitted. -/** - * deserializeAws_restJson1AccountListType - */ -const de_AccountListType = (output: any, context: __SerdeContext): AccountInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountInfo(entry, context); - }); - return retVal; -}; +// de_AccountListType omitted. -/** - * deserializeAws_restJson1RoleCredentials - */ -const de_RoleCredentials = (output: any, context: __SerdeContext): RoleCredentials => { - return { - accessKeyId: __expectString(output.accessKeyId), - expiration: __expectLong(output.expiration), - secretAccessKey: __expectString(output.secretAccessKey), - sessionToken: __expectString(output.sessionToken), - } as any; -}; +// de_RoleCredentials omitted. -/** - * deserializeAws_restJson1RoleInfo - */ -const de_RoleInfo = (output: any, context: __SerdeContext): RoleInfo => { - return { - accountId: __expectString(output.accountId), - roleName: __expectString(output.roleName), - } as any; -}; +// de_RoleInfo omitted. -/** - * deserializeAws_restJson1RoleListType - */ -const de_RoleListType = (output: any, context: __SerdeContext): RoleInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RoleInfo(entry, context); - }); - return retVal; -}; +// de_RoleListType omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-storage-gateway/src/protocols/Aws_json1_1.ts b/clients/client-storage-gateway/src/protocols/Aws_json1_1.ts index 3d52ec6d2e18..c8c84e5e67db 100644 --- a/clients/client-storage-gateway/src/protocols/Aws_json1_1.ts +++ b/clients/client-storage-gateway/src/protocols/Aws_json1_1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -264,95 +265,54 @@ import { } from "../commands/UpdateVTLDeviceTypeCommand"; import { ActivateGatewayInput, - ActivateGatewayOutput, AddCacheInput, - AddCacheOutput, AddTagsToResourceInput, - AddTagsToResourceOutput, AddUploadBufferInput, - AddUploadBufferOutput, AddWorkingStorageInput, - AddWorkingStorageOutput, AssignTapePoolInput, - AssignTapePoolOutput, AssociateFileSystemInput, - AssociateFileSystemOutput, AttachVolumeInput, - AttachVolumeOutput, - AutomaticTapeCreationPolicyInfo, AutomaticTapeCreationRule, BandwidthRateLimitInterval, CacheAttributes, CachediSCSIVolume, CancelArchivalInput, - CancelArchivalOutput, CancelRetrievalInput, - CancelRetrievalOutput, - ChapInfo, CreateCachediSCSIVolumeInput, - CreateCachediSCSIVolumeOutput, CreateNFSFileShareInput, - CreateNFSFileShareOutput, CreateSMBFileShareInput, - CreateSMBFileShareOutput, CreateSnapshotFromVolumeRecoveryPointInput, - CreateSnapshotFromVolumeRecoveryPointOutput, CreateSnapshotInput, - CreateSnapshotOutput, CreateStorediSCSIVolumeInput, - CreateStorediSCSIVolumeOutput, CreateTapePoolInput, - CreateTapePoolOutput, CreateTapesInput, - CreateTapesOutput, CreateTapeWithBarcodeInput, - CreateTapeWithBarcodeOutput, DeleteAutomaticTapeCreationPolicyInput, - DeleteAutomaticTapeCreationPolicyOutput, DeleteBandwidthRateLimitInput, - DeleteBandwidthRateLimitOutput, DeleteChapCredentialsInput, - DeleteChapCredentialsOutput, DeleteFileShareInput, - DeleteFileShareOutput, DeleteGatewayInput, - DeleteGatewayOutput, DeleteSnapshotScheduleInput, - DeleteSnapshotScheduleOutput, DeleteTapeArchiveInput, - DeleteTapeArchiveOutput, DeleteTapeInput, - DeleteTapeOutput, DeleteTapePoolInput, - DeleteTapePoolOutput, DeleteVolumeInput, - DeleteVolumeOutput, DescribeAvailabilityMonitorTestInput, DescribeAvailabilityMonitorTestOutput, DescribeBandwidthRateLimitInput, - DescribeBandwidthRateLimitOutput, DescribeBandwidthRateLimitScheduleInput, - DescribeBandwidthRateLimitScheduleOutput, DescribeCachediSCSIVolumesInput, DescribeCachediSCSIVolumesOutput, DescribeCacheInput, DescribeCacheOutput, DescribeChapCredentialsInput, - DescribeChapCredentialsOutput, DescribeFileSystemAssociationsInput, - DescribeFileSystemAssociationsOutput, DescribeGatewayInformationInput, - DescribeGatewayInformationOutput, DescribeMaintenanceStartTimeInput, - DescribeMaintenanceStartTimeOutput, DescribeNFSFileSharesInput, - DescribeNFSFileSharesOutput, DescribeSMBFileSharesInput, - DescribeSMBFileSharesOutput, DescribeSMBSettingsInput, - DescribeSMBSettingsOutput, DescribeSnapshotScheduleInput, - DescribeSnapshotScheduleOutput, DescribeStorediSCSIVolumesInput, DescribeStorediSCSIVolumesOutput, DescribeTapeArchivesInput, @@ -362,82 +322,41 @@ import { DescribeTapesInput, DescribeTapesOutput, DescribeUploadBufferInput, - DescribeUploadBufferOutput, DescribeVTLDevicesInput, - DescribeVTLDevicesOutput, DescribeWorkingStorageInput, - DescribeWorkingStorageOutput, DetachVolumeInput, - DetachVolumeOutput, - DeviceiSCSIAttributes, DisableGatewayInput, - DisableGatewayOutput, DisassociateFileSystemInput, - DisassociateFileSystemOutput, - Disk, EndpointNetworkConfiguration, - FileShareInfo, - FileSystemAssociationInfo, - FileSystemAssociationStatusDetail, - FileSystemAssociationSummary, - GatewayCapacity, - GatewayInfo, InternalServerError, InvalidGatewayRequestException, JoinDomainInput, - JoinDomainOutput, ListAutomaticTapeCreationPoliciesInput, - ListAutomaticTapeCreationPoliciesOutput, ListFileSharesInput, - ListFileSharesOutput, ListFileSystemAssociationsInput, - ListFileSystemAssociationsOutput, ListGatewaysInput, - ListGatewaysOutput, ListLocalDisksInput, - ListLocalDisksOutput, ListTagsForResourceInput, - ListTagsForResourceOutput, ListTapePoolsInput, - ListTapePoolsOutput, ListTapesInput, ListTapesOutput, ListVolumeInitiatorsInput, - ListVolumeInitiatorsOutput, ListVolumeRecoveryPointsInput, - ListVolumeRecoveryPointsOutput, ListVolumesInput, - ListVolumesOutput, - NetworkInterface, NFSFileShareDefaults, - NFSFileShareInfo, NotifyWhenUploadedInput, - NotifyWhenUploadedOutput, - PoolInfo, RefreshCacheInput, - RefreshCacheOutput, RemoveTagsFromResourceInput, - RemoveTagsFromResourceOutput, ResetCacheInput, - ResetCacheOutput, RetrieveTapeArchiveInput, - RetrieveTapeArchiveOutput, RetrieveTapeRecoveryPointInput, - RetrieveTapeRecoveryPointOutput, ServiceUnavailableError, SetLocalConsolePasswordInput, - SetLocalConsolePasswordOutput, SetSMBGuestPasswordInput, - SetSMBGuestPasswordOutput, ShutdownGatewayInput, - ShutdownGatewayOutput, - SMBFileShareInfo, SMBLocalGroups, StartAvailabilityMonitorTestInput, - StartAvailabilityMonitorTestOutput, StartGatewayInput, - StartGatewayOutput, - StorageGatewayError, StorediSCSIVolume, Tag, Tape, @@ -445,39 +364,20 @@ import { TapeInfo, TapeRecoveryPointInfo, UpdateAutomaticTapeCreationPolicyInput, - UpdateAutomaticTapeCreationPolicyOutput, UpdateBandwidthRateLimitInput, - UpdateBandwidthRateLimitOutput, UpdateBandwidthRateLimitScheduleInput, - UpdateBandwidthRateLimitScheduleOutput, UpdateChapCredentialsInput, - UpdateChapCredentialsOutput, UpdateFileSystemAssociationInput, - UpdateFileSystemAssociationOutput, UpdateGatewayInformationInput, - UpdateGatewayInformationOutput, UpdateGatewaySoftwareNowInput, - UpdateGatewaySoftwareNowOutput, UpdateMaintenanceStartTimeInput, - UpdateMaintenanceStartTimeOutput, UpdateNFSFileShareInput, - UpdateNFSFileShareOutput, UpdateSMBFileShareInput, - UpdateSMBFileShareOutput, UpdateSMBFileShareVisibilityInput, - UpdateSMBFileShareVisibilityOutput, UpdateSMBLocalGroupsInput, - UpdateSMBLocalGroupsOutput, UpdateSMBSecurityStrategyInput, - UpdateSMBSecurityStrategyOutput, UpdateSnapshotScheduleInput, - UpdateSnapshotScheduleOutput, UpdateVTLDeviceTypeInput, - UpdateVTLDeviceTypeOutput, - VolumeInfo, - VolumeiSCSIAttributes, - VolumeRecoveryPointInfo, - VTLDevice, } from "../models/models_0"; import { StorageGatewayServiceException as __BaseException } from "../models/StorageGatewayServiceException"; @@ -490,7 +390,7 @@ export const se_ActivateGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ActivateGateway"); let body: any; - body = JSON.stringify(se_ActivateGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -503,7 +403,7 @@ export const se_AddCacheCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddCache"); let body: any; - body = JSON.stringify(se_AddCacheInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,7 +416,7 @@ export const se_AddTagsToResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddTagsToResource"); let body: any; - body = JSON.stringify(se_AddTagsToResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -529,7 +429,7 @@ export const se_AddUploadBufferCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddUploadBuffer"); let body: any; - body = JSON.stringify(se_AddUploadBufferInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -542,7 +442,7 @@ export const se_AddWorkingStorageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddWorkingStorage"); let body: any; - body = JSON.stringify(se_AddWorkingStorageInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -555,7 +455,7 @@ export const se_AssignTapePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssignTapePool"); let body: any; - body = JSON.stringify(se_AssignTapePoolInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -568,7 +468,7 @@ export const se_AssociateFileSystemCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateFileSystem"); let body: any; - body = JSON.stringify(se_AssociateFileSystemInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +481,7 @@ export const se_AttachVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AttachVolume"); let body: any; - body = JSON.stringify(se_AttachVolumeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +494,7 @@ export const se_CancelArchivalCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelArchival"); let body: any; - body = JSON.stringify(se_CancelArchivalInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +507,7 @@ export const se_CancelRetrievalCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelRetrieval"); let body: any; - body = JSON.stringify(se_CancelRetrievalInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +520,7 @@ export const se_CreateCachediSCSIVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCachediSCSIVolume"); let body: any; - body = JSON.stringify(se_CreateCachediSCSIVolumeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -633,7 +533,7 @@ export const se_CreateNFSFileShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateNFSFileShare"); let body: any; - body = JSON.stringify(se_CreateNFSFileShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +546,7 @@ export const se_CreateSMBFileShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSMBFileShare"); let body: any; - body = JSON.stringify(se_CreateSMBFileShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +559,7 @@ export const se_CreateSnapshotCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSnapshot"); let body: any; - body = JSON.stringify(se_CreateSnapshotInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -672,7 +572,7 @@ export const se_CreateSnapshotFromVolumeRecoveryPointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSnapshotFromVolumeRecoveryPoint"); let body: any; - body = JSON.stringify(se_CreateSnapshotFromVolumeRecoveryPointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +585,7 @@ export const se_CreateStorediSCSIVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStorediSCSIVolume"); let body: any; - body = JSON.stringify(se_CreateStorediSCSIVolumeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +598,7 @@ export const se_CreateTapePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTapePool"); let body: any; - body = JSON.stringify(se_CreateTapePoolInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +611,7 @@ export const se_CreateTapesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTapes"); let body: any; - body = JSON.stringify(se_CreateTapesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +624,7 @@ export const se_CreateTapeWithBarcodeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTapeWithBarcode"); let body: any; - body = JSON.stringify(se_CreateTapeWithBarcodeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -737,7 +637,7 @@ export const se_DeleteAutomaticTapeCreationPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAutomaticTapeCreationPolicy"); let body: any; - body = JSON.stringify(se_DeleteAutomaticTapeCreationPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +650,7 @@ export const se_DeleteBandwidthRateLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteBandwidthRateLimit"); let body: any; - body = JSON.stringify(se_DeleteBandwidthRateLimitInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -763,7 +663,7 @@ export const se_DeleteChapCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteChapCredentials"); let body: any; - body = JSON.stringify(se_DeleteChapCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -776,7 +676,7 @@ export const se_DeleteFileShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFileShare"); let body: any; - body = JSON.stringify(se_DeleteFileShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +689,7 @@ export const se_DeleteGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGateway"); let body: any; - body = JSON.stringify(se_DeleteGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +702,7 @@ export const se_DeleteSnapshotScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSnapshotSchedule"); let body: any; - body = JSON.stringify(se_DeleteSnapshotScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -815,7 +715,7 @@ export const se_DeleteTapeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTape"); let body: any; - body = JSON.stringify(se_DeleteTapeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -828,7 +728,7 @@ export const se_DeleteTapeArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTapeArchive"); let body: any; - body = JSON.stringify(se_DeleteTapeArchiveInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -841,7 +741,7 @@ export const se_DeleteTapePoolCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTapePool"); let body: any; - body = JSON.stringify(se_DeleteTapePoolInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -854,7 +754,7 @@ export const se_DeleteVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVolume"); let body: any; - body = JSON.stringify(se_DeleteVolumeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -867,7 +767,7 @@ export const se_DescribeAvailabilityMonitorTestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAvailabilityMonitorTest"); let body: any; - body = JSON.stringify(se_DescribeAvailabilityMonitorTestInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -880,7 +780,7 @@ export const se_DescribeBandwidthRateLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBandwidthRateLimit"); let body: any; - body = JSON.stringify(se_DescribeBandwidthRateLimitInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -893,7 +793,7 @@ export const se_DescribeBandwidthRateLimitScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBandwidthRateLimitSchedule"); let body: any; - body = JSON.stringify(se_DescribeBandwidthRateLimitScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -906,7 +806,7 @@ export const se_DescribeCacheCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCache"); let body: any; - body = JSON.stringify(se_DescribeCacheInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -919,7 +819,7 @@ export const se_DescribeCachediSCSIVolumesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCachediSCSIVolumes"); let body: any; - body = JSON.stringify(se_DescribeCachediSCSIVolumesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -932,7 +832,7 @@ export const se_DescribeChapCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeChapCredentials"); let body: any; - body = JSON.stringify(se_DescribeChapCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -945,7 +845,7 @@ export const se_DescribeFileSystemAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFileSystemAssociations"); let body: any; - body = JSON.stringify(se_DescribeFileSystemAssociationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -958,7 +858,7 @@ export const se_DescribeGatewayInformationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGatewayInformation"); let body: any; - body = JSON.stringify(se_DescribeGatewayInformationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +871,7 @@ export const se_DescribeMaintenanceStartTimeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMaintenanceStartTime"); let body: any; - body = JSON.stringify(se_DescribeMaintenanceStartTimeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +884,7 @@ export const se_DescribeNFSFileSharesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeNFSFileShares"); let body: any; - body = JSON.stringify(se_DescribeNFSFileSharesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -997,7 +897,7 @@ export const se_DescribeSMBFileSharesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSMBFileShares"); let body: any; - body = JSON.stringify(se_DescribeSMBFileSharesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1010,7 +910,7 @@ export const se_DescribeSMBSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSMBSettings"); let body: any; - body = JSON.stringify(se_DescribeSMBSettingsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1023,7 +923,7 @@ export const se_DescribeSnapshotScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSnapshotSchedule"); let body: any; - body = JSON.stringify(se_DescribeSnapshotScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1036,7 +936,7 @@ export const se_DescribeStorediSCSIVolumesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeStorediSCSIVolumes"); let body: any; - body = JSON.stringify(se_DescribeStorediSCSIVolumesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1049,7 +949,7 @@ export const se_DescribeTapeArchivesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTapeArchives"); let body: any; - body = JSON.stringify(se_DescribeTapeArchivesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1062,7 +962,7 @@ export const se_DescribeTapeRecoveryPointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTapeRecoveryPoints"); let body: any; - body = JSON.stringify(se_DescribeTapeRecoveryPointsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1075,7 +975,7 @@ export const se_DescribeTapesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTapes"); let body: any; - body = JSON.stringify(se_DescribeTapesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1088,7 +988,7 @@ export const se_DescribeUploadBufferCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUploadBuffer"); let body: any; - body = JSON.stringify(se_DescribeUploadBufferInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1101,7 +1001,7 @@ export const se_DescribeVTLDevicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeVTLDevices"); let body: any; - body = JSON.stringify(se_DescribeVTLDevicesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1114,7 +1014,7 @@ export const se_DescribeWorkingStorageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkingStorage"); let body: any; - body = JSON.stringify(se_DescribeWorkingStorageInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1127,7 +1027,7 @@ export const se_DetachVolumeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DetachVolume"); let body: any; - body = JSON.stringify(se_DetachVolumeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1140,7 +1040,7 @@ export const se_DisableGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisableGateway"); let body: any; - body = JSON.stringify(se_DisableGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1153,7 +1053,7 @@ export const se_DisassociateFileSystemCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateFileSystem"); let body: any; - body = JSON.stringify(se_DisassociateFileSystemInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1166,7 +1066,7 @@ export const se_JoinDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("JoinDomain"); let body: any; - body = JSON.stringify(se_JoinDomainInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1179,7 +1079,7 @@ export const se_ListAutomaticTapeCreationPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAutomaticTapeCreationPolicies"); let body: any; - body = JSON.stringify(se_ListAutomaticTapeCreationPoliciesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1192,7 +1092,7 @@ export const se_ListFileSharesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFileShares"); let body: any; - body = JSON.stringify(se_ListFileSharesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1205,7 +1105,7 @@ export const se_ListFileSystemAssociationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFileSystemAssociations"); let body: any; - body = JSON.stringify(se_ListFileSystemAssociationsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1218,7 +1118,7 @@ export const se_ListGatewaysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGateways"); let body: any; - body = JSON.stringify(se_ListGatewaysInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1231,7 +1131,7 @@ export const se_ListLocalDisksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLocalDisks"); let body: any; - body = JSON.stringify(se_ListLocalDisksInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1244,7 +1144,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1257,7 +1157,7 @@ export const se_ListTapePoolsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTapePools"); let body: any; - body = JSON.stringify(se_ListTapePoolsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1270,7 +1170,7 @@ export const se_ListTapesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTapes"); let body: any; - body = JSON.stringify(se_ListTapesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1283,7 +1183,7 @@ export const se_ListVolumeInitiatorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVolumeInitiators"); let body: any; - body = JSON.stringify(se_ListVolumeInitiatorsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1296,7 +1196,7 @@ export const se_ListVolumeRecoveryPointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVolumeRecoveryPoints"); let body: any; - body = JSON.stringify(se_ListVolumeRecoveryPointsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1309,7 +1209,7 @@ export const se_ListVolumesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVolumes"); let body: any; - body = JSON.stringify(se_ListVolumesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1322,7 +1222,7 @@ export const se_NotifyWhenUploadedCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("NotifyWhenUploaded"); let body: any; - body = JSON.stringify(se_NotifyWhenUploadedInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1335,7 +1235,7 @@ export const se_RefreshCacheCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RefreshCache"); let body: any; - body = JSON.stringify(se_RefreshCacheInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1348,7 +1248,7 @@ export const se_RemoveTagsFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemoveTagsFromResource"); let body: any; - body = JSON.stringify(se_RemoveTagsFromResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1361,7 +1261,7 @@ export const se_ResetCacheCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetCache"); let body: any; - body = JSON.stringify(se_ResetCacheInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1374,7 +1274,7 @@ export const se_RetrieveTapeArchiveCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetrieveTapeArchive"); let body: any; - body = JSON.stringify(se_RetrieveTapeArchiveInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1387,7 +1287,7 @@ export const se_RetrieveTapeRecoveryPointCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RetrieveTapeRecoveryPoint"); let body: any; - body = JSON.stringify(se_RetrieveTapeRecoveryPointInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1400,7 +1300,7 @@ export const se_SetLocalConsolePasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetLocalConsolePassword"); let body: any; - body = JSON.stringify(se_SetLocalConsolePasswordInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1413,7 +1313,7 @@ export const se_SetSMBGuestPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetSMBGuestPassword"); let body: any; - body = JSON.stringify(se_SetSMBGuestPasswordInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1426,7 +1326,7 @@ export const se_ShutdownGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ShutdownGateway"); let body: any; - body = JSON.stringify(se_ShutdownGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1439,7 +1339,7 @@ export const se_StartAvailabilityMonitorTestCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartAvailabilityMonitorTest"); let body: any; - body = JSON.stringify(se_StartAvailabilityMonitorTestInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1452,7 +1352,7 @@ export const se_StartGatewayCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartGateway"); let body: any; - body = JSON.stringify(se_StartGatewayInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1465,7 +1365,7 @@ export const se_UpdateAutomaticTapeCreationPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAutomaticTapeCreationPolicy"); let body: any; - body = JSON.stringify(se_UpdateAutomaticTapeCreationPolicyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1478,7 +1378,7 @@ export const se_UpdateBandwidthRateLimitCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBandwidthRateLimit"); let body: any; - body = JSON.stringify(se_UpdateBandwidthRateLimitInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1491,7 +1391,7 @@ export const se_UpdateBandwidthRateLimitScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateBandwidthRateLimitSchedule"); let body: any; - body = JSON.stringify(se_UpdateBandwidthRateLimitScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1504,7 +1404,7 @@ export const se_UpdateChapCredentialsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateChapCredentials"); let body: any; - body = JSON.stringify(se_UpdateChapCredentialsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1517,7 +1417,7 @@ export const se_UpdateFileSystemAssociationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateFileSystemAssociation"); let body: any; - body = JSON.stringify(se_UpdateFileSystemAssociationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1530,7 +1430,7 @@ export const se_UpdateGatewayInformationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGatewayInformation"); let body: any; - body = JSON.stringify(se_UpdateGatewayInformationInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1543,7 +1443,7 @@ export const se_UpdateGatewaySoftwareNowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGatewaySoftwareNow"); let body: any; - body = JSON.stringify(se_UpdateGatewaySoftwareNowInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1556,7 +1456,7 @@ export const se_UpdateMaintenanceStartTimeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMaintenanceStartTime"); let body: any; - body = JSON.stringify(se_UpdateMaintenanceStartTimeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1569,7 +1469,7 @@ export const se_UpdateNFSFileShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateNFSFileShare"); let body: any; - body = JSON.stringify(se_UpdateNFSFileShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1582,7 +1482,7 @@ export const se_UpdateSMBFileShareCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSMBFileShare"); let body: any; - body = JSON.stringify(se_UpdateSMBFileShareInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1595,7 +1495,7 @@ export const se_UpdateSMBFileShareVisibilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSMBFileShareVisibility"); let body: any; - body = JSON.stringify(se_UpdateSMBFileShareVisibilityInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1608,7 +1508,7 @@ export const se_UpdateSMBLocalGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSMBLocalGroups"); let body: any; - body = JSON.stringify(se_UpdateSMBLocalGroupsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1621,7 +1521,7 @@ export const se_UpdateSMBSecurityStrategyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSMBSecurityStrategy"); let body: any; - body = JSON.stringify(se_UpdateSMBSecurityStrategyInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1634,7 +1534,7 @@ export const se_UpdateSnapshotScheduleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSnapshotSchedule"); let body: any; - body = JSON.stringify(se_UpdateSnapshotScheduleInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1647,7 +1547,7 @@ export const se_UpdateVTLDeviceTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVTLDeviceType"); let body: any; - body = JSON.stringify(se_UpdateVTLDeviceTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1663,12 +1563,12 @@ export const de_ActivateGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ActivateGatewayOutput(data, context); + contents = _json(data); const response: ActivateGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1692,10 +1592,9 @@ const de_ActivateGatewayCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1713,12 +1612,12 @@ export const de_AddCacheCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddCacheOutput(data, context); + contents = _json(data); const response: AddCacheCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1742,10 +1641,9 @@ const de_AddCacheCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1763,12 +1661,12 @@ export const de_AddTagsToResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddTagsToResourceOutput(data, context); + contents = _json(data); const response: AddTagsToResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1792,10 +1690,9 @@ const de_AddTagsToResourceCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1813,12 +1710,12 @@ export const de_AddUploadBufferCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddUploadBufferOutput(data, context); + contents = _json(data); const response: AddUploadBufferCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1842,10 +1739,9 @@ const de_AddUploadBufferCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1863,12 +1759,12 @@ export const de_AddWorkingStorageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddWorkingStorageOutput(data, context); + contents = _json(data); const response: AddWorkingStorageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1892,10 +1788,9 @@ const de_AddWorkingStorageCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1913,12 +1808,12 @@ export const de_AssignTapePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssignTapePoolOutput(data, context); + contents = _json(data); const response: AssignTapePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1942,10 +1837,9 @@ const de_AssignTapePoolCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1963,12 +1857,12 @@ export const de_AssociateFileSystemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateFileSystemOutput(data, context); + contents = _json(data); const response: AssociateFileSystemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1992,10 +1886,9 @@ const de_AssociateFileSystemCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2013,12 +1906,12 @@ export const de_AttachVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AttachVolumeOutput(data, context); + contents = _json(data); const response: AttachVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2042,10 +1935,9 @@ const de_AttachVolumeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2063,12 +1955,12 @@ export const de_CancelArchivalCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelArchivalOutput(data, context); + contents = _json(data); const response: CancelArchivalCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2092,10 +1984,9 @@ const de_CancelArchivalCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2113,12 +2004,12 @@ export const de_CancelRetrievalCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelRetrievalOutput(data, context); + contents = _json(data); const response: CancelRetrievalCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2142,10 +2033,9 @@ const de_CancelRetrievalCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2163,12 +2053,12 @@ export const de_CreateCachediSCSIVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCachediSCSIVolumeOutput(data, context); + contents = _json(data); const response: CreateCachediSCSIVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2192,10 +2082,9 @@ const de_CreateCachediSCSIVolumeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2213,12 +2102,12 @@ export const de_CreateNFSFileShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateNFSFileShareOutput(data, context); + contents = _json(data); const response: CreateNFSFileShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2242,10 +2131,9 @@ const de_CreateNFSFileShareCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2263,12 +2151,12 @@ export const de_CreateSMBFileShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSMBFileShareOutput(data, context); + contents = _json(data); const response: CreateSMBFileShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2292,10 +2180,9 @@ const de_CreateSMBFileShareCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2313,12 +2200,12 @@ export const de_CreateSnapshotCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSnapshotOutput(data, context); + contents = _json(data); const response: CreateSnapshotCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2345,10 +2232,9 @@ const de_CreateSnapshotCommandError = async ( throw await de_ServiceUnavailableErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2366,12 +2252,12 @@ export const de_CreateSnapshotFromVolumeRecoveryPointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSnapshotFromVolumeRecoveryPointOutput(data, context); + contents = _json(data); const response: CreateSnapshotFromVolumeRecoveryPointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2398,10 +2284,9 @@ const de_CreateSnapshotFromVolumeRecoveryPointCommandError = async ( throw await de_ServiceUnavailableErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2419,12 +2304,12 @@ export const de_CreateStorediSCSIVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateStorediSCSIVolumeOutput(data, context); + contents = _json(data); const response: CreateStorediSCSIVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2448,10 +2333,9 @@ const de_CreateStorediSCSIVolumeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2469,12 +2353,12 @@ export const de_CreateTapePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTapePoolOutput(data, context); + contents = _json(data); const response: CreateTapePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2498,10 +2382,9 @@ const de_CreateTapePoolCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,12 +2402,12 @@ export const de_CreateTapesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTapesOutput(data, context); + contents = _json(data); const response: CreateTapesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2548,10 +2431,9 @@ const de_CreateTapesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2569,12 +2451,12 @@ export const de_CreateTapeWithBarcodeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTapeWithBarcodeOutput(data, context); + contents = _json(data); const response: CreateTapeWithBarcodeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2598,10 +2480,9 @@ const de_CreateTapeWithBarcodeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2619,12 +2500,12 @@ export const de_DeleteAutomaticTapeCreationPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAutomaticTapeCreationPolicyOutput(data, context); + contents = _json(data); const response: DeleteAutomaticTapeCreationPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2648,10 +2529,9 @@ const de_DeleteAutomaticTapeCreationPolicyCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2669,12 +2549,12 @@ export const de_DeleteBandwidthRateLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteBandwidthRateLimitOutput(data, context); + contents = _json(data); const response: DeleteBandwidthRateLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2698,10 +2578,9 @@ const de_DeleteBandwidthRateLimitCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2719,12 +2598,12 @@ export const de_DeleteChapCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteChapCredentialsOutput(data, context); + contents = _json(data); const response: DeleteChapCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2748,10 +2627,9 @@ const de_DeleteChapCredentialsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2769,12 +2647,12 @@ export const de_DeleteFileShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFileShareOutput(data, context); + contents = _json(data); const response: DeleteFileShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2798,10 +2676,9 @@ const de_DeleteFileShareCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2819,12 +2696,12 @@ export const de_DeleteGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGatewayOutput(data, context); + contents = _json(data); const response: DeleteGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2848,10 +2725,9 @@ const de_DeleteGatewayCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2869,12 +2745,12 @@ export const de_DeleteSnapshotScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSnapshotScheduleOutput(data, context); + contents = _json(data); const response: DeleteSnapshotScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2898,10 +2774,9 @@ const de_DeleteSnapshotScheduleCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2919,12 +2794,12 @@ export const de_DeleteTapeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTapeOutput(data, context); + contents = _json(data); const response: DeleteTapeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2948,10 +2823,9 @@ const de_DeleteTapeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2969,12 +2843,12 @@ export const de_DeleteTapeArchiveCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTapeArchiveOutput(data, context); + contents = _json(data); const response: DeleteTapeArchiveCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2998,10 +2872,9 @@ const de_DeleteTapeArchiveCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3019,12 +2892,12 @@ export const de_DeleteTapePoolCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTapePoolOutput(data, context); + contents = _json(data); const response: DeleteTapePoolCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3048,10 +2921,9 @@ const de_DeleteTapePoolCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3069,12 +2941,12 @@ export const de_DeleteVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteVolumeOutput(data, context); + contents = _json(data); const response: DeleteVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3098,10 +2970,9 @@ const de_DeleteVolumeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3124,7 +2995,7 @@ export const de_DescribeAvailabilityMonitorTestCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3148,10 +3019,9 @@ const de_DescribeAvailabilityMonitorTestCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3169,12 +3039,12 @@ export const de_DescribeBandwidthRateLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeBandwidthRateLimitOutput(data, context); + contents = _json(data); const response: DescribeBandwidthRateLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3198,10 +3068,9 @@ const de_DescribeBandwidthRateLimitCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3219,12 +3088,12 @@ export const de_DescribeBandwidthRateLimitScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeBandwidthRateLimitScheduleOutput(data, context); + contents = _json(data); const response: DescribeBandwidthRateLimitScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3248,10 +3117,9 @@ const de_DescribeBandwidthRateLimitScheduleCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3274,7 +3142,7 @@ export const de_DescribeCacheCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3298,10 +3166,9 @@ const de_DescribeCacheCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3324,7 +3191,7 @@ export const de_DescribeCachediSCSIVolumesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3348,10 +3215,9 @@ const de_DescribeCachediSCSIVolumesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3369,12 +3235,12 @@ export const de_DescribeChapCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeChapCredentialsOutput(data, context); + contents = _json(data); const response: DescribeChapCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3398,10 +3264,9 @@ const de_DescribeChapCredentialsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3419,12 +3284,12 @@ export const de_DescribeFileSystemAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeFileSystemAssociationsOutput(data, context); + contents = _json(data); const response: DescribeFileSystemAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3448,10 +3313,9 @@ const de_DescribeFileSystemAssociationsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3469,12 +3333,12 @@ export const de_DescribeGatewayInformationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeGatewayInformationOutput(data, context); + contents = _json(data); const response: DescribeGatewayInformationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3498,10 +3362,9 @@ const de_DescribeGatewayInformationCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3519,12 +3382,12 @@ export const de_DescribeMaintenanceStartTimeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeMaintenanceStartTimeOutput(data, context); + contents = _json(data); const response: DescribeMaintenanceStartTimeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3548,10 +3411,9 @@ const de_DescribeMaintenanceStartTimeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3569,12 +3431,12 @@ export const de_DescribeNFSFileSharesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeNFSFileSharesOutput(data, context); + contents = _json(data); const response: DescribeNFSFileSharesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3598,10 +3460,9 @@ const de_DescribeNFSFileSharesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3619,12 +3480,12 @@ export const de_DescribeSMBFileSharesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSMBFileSharesOutput(data, context); + contents = _json(data); const response: DescribeSMBFileSharesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3648,10 +3509,9 @@ const de_DescribeSMBFileSharesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3669,12 +3529,12 @@ export const de_DescribeSMBSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSMBSettingsOutput(data, context); + contents = _json(data); const response: DescribeSMBSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3698,10 +3558,9 @@ const de_DescribeSMBSettingsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3719,12 +3578,12 @@ export const de_DescribeSnapshotScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSnapshotScheduleOutput(data, context); + contents = _json(data); const response: DescribeSnapshotScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3748,10 +3607,9 @@ const de_DescribeSnapshotScheduleCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3774,7 +3632,7 @@ export const de_DescribeStorediSCSIVolumesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3798,10 +3656,9 @@ const de_DescribeStorediSCSIVolumesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3824,7 +3681,7 @@ export const de_DescribeTapeArchivesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3848,10 +3705,9 @@ const de_DescribeTapeArchivesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3874,7 +3730,7 @@ export const de_DescribeTapeRecoveryPointsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3898,10 +3754,9 @@ const de_DescribeTapeRecoveryPointsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3924,7 +3779,7 @@ export const de_DescribeTapesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3948,10 +3803,9 @@ const de_DescribeTapesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3969,12 +3823,12 @@ export const de_DescribeUploadBufferCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeUploadBufferOutput(data, context); + contents = _json(data); const response: DescribeUploadBufferCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3998,10 +3852,9 @@ const de_DescribeUploadBufferCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4019,12 +3872,12 @@ export const de_DescribeVTLDevicesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeVTLDevicesOutput(data, context); + contents = _json(data); const response: DescribeVTLDevicesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4048,10 +3901,9 @@ const de_DescribeVTLDevicesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4069,12 +3921,12 @@ export const de_DescribeWorkingStorageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeWorkingStorageOutput(data, context); + contents = _json(data); const response: DescribeWorkingStorageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4098,10 +3950,9 @@ const de_DescribeWorkingStorageCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4119,12 +3970,12 @@ export const de_DetachVolumeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DetachVolumeOutput(data, context); + contents = _json(data); const response: DetachVolumeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4148,10 +3999,9 @@ const de_DetachVolumeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4169,12 +4019,12 @@ export const de_DisableGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisableGatewayOutput(data, context); + contents = _json(data); const response: DisableGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4198,10 +4048,9 @@ const de_DisableGatewayCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4219,12 +4068,12 @@ export const de_DisassociateFileSystemCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateFileSystemOutput(data, context); + contents = _json(data); const response: DisassociateFileSystemCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4248,10 +4097,9 @@ const de_DisassociateFileSystemCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4269,12 +4117,12 @@ export const de_JoinDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_JoinDomainOutput(data, context); + contents = _json(data); const response: JoinDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4298,10 +4146,9 @@ const de_JoinDomainCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4319,12 +4166,12 @@ export const de_ListAutomaticTapeCreationPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAutomaticTapeCreationPoliciesOutput(data, context); + contents = _json(data); const response: ListAutomaticTapeCreationPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4348,10 +4195,9 @@ const de_ListAutomaticTapeCreationPoliciesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4369,12 +4215,12 @@ export const de_ListFileSharesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFileSharesOutput(data, context); + contents = _json(data); const response: ListFileSharesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4398,10 +4244,9 @@ const de_ListFileSharesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4419,12 +4264,12 @@ export const de_ListFileSystemAssociationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListFileSystemAssociationsOutput(data, context); + contents = _json(data); const response: ListFileSystemAssociationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4448,10 +4293,9 @@ const de_ListFileSystemAssociationsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4469,12 +4313,12 @@ export const de_ListGatewaysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGatewaysOutput(data, context); + contents = _json(data); const response: ListGatewaysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4498,10 +4342,9 @@ const de_ListGatewaysCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4519,12 +4362,12 @@ export const de_ListLocalDisksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLocalDisksOutput(data, context); + contents = _json(data); const response: ListLocalDisksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4548,10 +4391,9 @@ const de_ListLocalDisksCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4569,12 +4411,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4598,10 +4440,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4619,12 +4460,12 @@ export const de_ListTapePoolsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTapePoolsOutput(data, context); + contents = _json(data); const response: ListTapePoolsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4648,10 +4489,9 @@ const de_ListTapePoolsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4674,7 +4514,7 @@ export const de_ListTapesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4698,10 +4538,9 @@ const de_ListTapesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4719,12 +4558,12 @@ export const de_ListVolumeInitiatorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVolumeInitiatorsOutput(data, context); + contents = _json(data); const response: ListVolumeInitiatorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4748,10 +4587,9 @@ const de_ListVolumeInitiatorsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4769,12 +4607,12 @@ export const de_ListVolumeRecoveryPointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVolumeRecoveryPointsOutput(data, context); + contents = _json(data); const response: ListVolumeRecoveryPointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4798,10 +4636,9 @@ const de_ListVolumeRecoveryPointsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4819,12 +4656,12 @@ export const de_ListVolumesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListVolumesOutput(data, context); + contents = _json(data); const response: ListVolumesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4848,10 +4685,9 @@ const de_ListVolumesCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4869,12 +4705,12 @@ export const de_NotifyWhenUploadedCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NotifyWhenUploadedOutput(data, context); + contents = _json(data); const response: NotifyWhenUploadedCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4898,10 +4734,9 @@ const de_NotifyWhenUploadedCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4919,12 +4754,12 @@ export const de_RefreshCacheCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RefreshCacheOutput(data, context); + contents = _json(data); const response: RefreshCacheCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4948,10 +4783,9 @@ const de_RefreshCacheCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4969,12 +4803,12 @@ export const de_RemoveTagsFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RemoveTagsFromResourceOutput(data, context); + contents = _json(data); const response: RemoveTagsFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4998,10 +4832,9 @@ const de_RemoveTagsFromResourceCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5019,12 +4852,12 @@ export const de_ResetCacheCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResetCacheOutput(data, context); + contents = _json(data); const response: ResetCacheCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5048,10 +4881,9 @@ const de_ResetCacheCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5069,12 +4901,12 @@ export const de_RetrieveTapeArchiveCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RetrieveTapeArchiveOutput(data, context); + contents = _json(data); const response: RetrieveTapeArchiveCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5098,10 +4930,9 @@ const de_RetrieveTapeArchiveCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5119,12 +4950,12 @@ export const de_RetrieveTapeRecoveryPointCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RetrieveTapeRecoveryPointOutput(data, context); + contents = _json(data); const response: RetrieveTapeRecoveryPointCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5148,10 +4979,9 @@ const de_RetrieveTapeRecoveryPointCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5169,12 +4999,12 @@ export const de_SetLocalConsolePasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetLocalConsolePasswordOutput(data, context); + contents = _json(data); const response: SetLocalConsolePasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5198,10 +5028,9 @@ const de_SetLocalConsolePasswordCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5219,12 +5048,12 @@ export const de_SetSMBGuestPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SetSMBGuestPasswordOutput(data, context); + contents = _json(data); const response: SetSMBGuestPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5248,10 +5077,9 @@ const de_SetSMBGuestPasswordCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5269,12 +5097,12 @@ export const de_ShutdownGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ShutdownGatewayOutput(data, context); + contents = _json(data); const response: ShutdownGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5298,10 +5126,9 @@ const de_ShutdownGatewayCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5319,12 +5146,12 @@ export const de_StartAvailabilityMonitorTestCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartAvailabilityMonitorTestOutput(data, context); + contents = _json(data); const response: StartAvailabilityMonitorTestCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5348,10 +5175,9 @@ const de_StartAvailabilityMonitorTestCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5369,12 +5195,12 @@ export const de_StartGatewayCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartGatewayOutput(data, context); + contents = _json(data); const response: StartGatewayCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5398,10 +5224,9 @@ const de_StartGatewayCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5419,12 +5244,12 @@ export const de_UpdateAutomaticTapeCreationPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAutomaticTapeCreationPolicyOutput(data, context); + contents = _json(data); const response: UpdateAutomaticTapeCreationPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5448,10 +5273,9 @@ const de_UpdateAutomaticTapeCreationPolicyCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5469,12 +5293,12 @@ export const de_UpdateBandwidthRateLimitCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateBandwidthRateLimitOutput(data, context); + contents = _json(data); const response: UpdateBandwidthRateLimitCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5498,10 +5322,9 @@ const de_UpdateBandwidthRateLimitCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5519,12 +5342,12 @@ export const de_UpdateBandwidthRateLimitScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateBandwidthRateLimitScheduleOutput(data, context); + contents = _json(data); const response: UpdateBandwidthRateLimitScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5548,10 +5371,9 @@ const de_UpdateBandwidthRateLimitScheduleCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5569,12 +5391,12 @@ export const de_UpdateChapCredentialsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateChapCredentialsOutput(data, context); + contents = _json(data); const response: UpdateChapCredentialsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5598,10 +5420,9 @@ const de_UpdateChapCredentialsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5619,12 +5440,12 @@ export const de_UpdateFileSystemAssociationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateFileSystemAssociationOutput(data, context); + contents = _json(data); const response: UpdateFileSystemAssociationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5648,10 +5469,9 @@ const de_UpdateFileSystemAssociationCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5669,12 +5489,12 @@ export const de_UpdateGatewayInformationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGatewayInformationOutput(data, context); + contents = _json(data); const response: UpdateGatewayInformationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5698,10 +5518,9 @@ const de_UpdateGatewayInformationCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5719,12 +5538,12 @@ export const de_UpdateGatewaySoftwareNowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGatewaySoftwareNowOutput(data, context); + contents = _json(data); const response: UpdateGatewaySoftwareNowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5748,10 +5567,9 @@ const de_UpdateGatewaySoftwareNowCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5769,12 +5587,12 @@ export const de_UpdateMaintenanceStartTimeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMaintenanceStartTimeOutput(data, context); + contents = _json(data); const response: UpdateMaintenanceStartTimeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5798,10 +5616,9 @@ const de_UpdateMaintenanceStartTimeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5819,12 +5636,12 @@ export const de_UpdateNFSFileShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateNFSFileShareOutput(data, context); + contents = _json(data); const response: UpdateNFSFileShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5848,10 +5665,9 @@ const de_UpdateNFSFileShareCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5869,12 +5685,12 @@ export const de_UpdateSMBFileShareCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSMBFileShareOutput(data, context); + contents = _json(data); const response: UpdateSMBFileShareCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5898,10 +5714,9 @@ const de_UpdateSMBFileShareCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5919,12 +5734,12 @@ export const de_UpdateSMBFileShareVisibilityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSMBFileShareVisibilityOutput(data, context); + contents = _json(data); const response: UpdateSMBFileShareVisibilityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5948,10 +5763,9 @@ const de_UpdateSMBFileShareVisibilityCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5969,12 +5783,12 @@ export const de_UpdateSMBLocalGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSMBLocalGroupsOutput(data, context); + contents = _json(data); const response: UpdateSMBLocalGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5998,10 +5812,9 @@ const de_UpdateSMBLocalGroupsCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6019,12 +5832,12 @@ export const de_UpdateSMBSecurityStrategyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSMBSecurityStrategyOutput(data, context); + contents = _json(data); const response: UpdateSMBSecurityStrategyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6048,10 +5861,9 @@ const de_UpdateSMBSecurityStrategyCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6069,12 +5881,12 @@ export const de_UpdateSnapshotScheduleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSnapshotScheduleOutput(data, context); + contents = _json(data); const response: UpdateSnapshotScheduleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6098,10 +5910,9 @@ const de_UpdateSnapshotScheduleCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6119,12 +5930,12 @@ export const de_UpdateVTLDeviceTypeCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateVTLDeviceTypeOutput(data, context); + contents = _json(data); const response: UpdateVTLDeviceTypeCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6148,10 +5959,9 @@ const de_UpdateVTLDeviceTypeCommandError = async ( throw await de_InvalidGatewayRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6162,7 +5972,7 @@ const de_UpdateVTLDeviceTypeCommandError = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6178,7 +5988,7 @@ const de_InvalidGatewayRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGatewayRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidGatewayRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6194,7 +6004,7 @@ const de_ServiceUnavailableErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableError(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6202,2902 +6012,607 @@ const de_ServiceUnavailableErrorRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActivateGatewayInput - */ -const se_ActivateGatewayInput = (input: ActivateGatewayInput, context: __SerdeContext): any => { - return { - ...(input.ActivationKey != null && { ActivationKey: input.ActivationKey }), - ...(input.GatewayName != null && { GatewayName: input.GatewayName }), - ...(input.GatewayRegion != null && { GatewayRegion: input.GatewayRegion }), - ...(input.GatewayTimezone != null && { GatewayTimezone: input.GatewayTimezone }), - ...(input.GatewayType != null && { GatewayType: input.GatewayType }), - ...(input.MediumChangerType != null && { MediumChangerType: input.MediumChangerType }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TapeDriveType != null && { TapeDriveType: input.TapeDriveType }), - }; -}; +// se_ActivateGatewayInput omitted. -/** - * serializeAws_json1_1AddCacheInput - */ -const se_AddCacheInput = (input: AddCacheInput, context: __SerdeContext): any => { - return { - ...(input.DiskIds != null && { DiskIds: se_DiskIds(input.DiskIds, context) }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_AddCacheInput omitted. -/** - * serializeAws_json1_1AddTagsToResourceInput - */ -const se_AddTagsToResourceInput = (input: AddTagsToResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_AddTagsToResourceInput omitted. -/** - * serializeAws_json1_1AddUploadBufferInput - */ -const se_AddUploadBufferInput = (input: AddUploadBufferInput, context: __SerdeContext): any => { - return { - ...(input.DiskIds != null && { DiskIds: se_DiskIds(input.DiskIds, context) }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_AddUploadBufferInput omitted. -/** - * serializeAws_json1_1AddWorkingStorageInput - */ -const se_AddWorkingStorageInput = (input: AddWorkingStorageInput, context: __SerdeContext): any => { - return { - ...(input.DiskIds != null && { DiskIds: se_DiskIds(input.DiskIds, context) }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_AddWorkingStorageInput omitted. -/** - * serializeAws_json1_1AssignTapePoolInput - */ -const se_AssignTapePoolInput = (input: AssignTapePoolInput, context: __SerdeContext): any => { - return { - ...(input.BypassGovernanceRetention != null && { BypassGovernanceRetention: input.BypassGovernanceRetention }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_AssignTapePoolInput omitted. -/** - * serializeAws_json1_1AssociateFileSystemInput - */ -const se_AssociateFileSystemInput = (input: AssociateFileSystemInput, context: __SerdeContext): any => { - return { - ...(input.AuditDestinationARN != null && { AuditDestinationARN: input.AuditDestinationARN }), - ...(input.CacheAttributes != null && { CacheAttributes: se_CacheAttributes(input.CacheAttributes, context) }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.EndpointNetworkConfiguration != null && { - EndpointNetworkConfiguration: se_EndpointNetworkConfiguration(input.EndpointNetworkConfiguration, context), - }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.LocationARN != null && { LocationARN: input.LocationARN }), - ...(input.Password != null && { Password: input.Password }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_AssociateFileSystemInput omitted. -/** - * serializeAws_json1_1AttachVolumeInput - */ -const se_AttachVolumeInput = (input: AttachVolumeInput, context: __SerdeContext): any => { - return { - ...(input.DiskId != null && { DiskId: input.DiskId }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.TargetName != null && { TargetName: input.TargetName }), - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_AttachVolumeInput omitted. -/** - * serializeAws_json1_1AutomaticTapeCreationRule - */ -const se_AutomaticTapeCreationRule = (input: AutomaticTapeCreationRule, context: __SerdeContext): any => { - return { - ...(input.MinimumNumTapes != null && { MinimumNumTapes: input.MinimumNumTapes }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - ...(input.TapeBarcodePrefix != null && { TapeBarcodePrefix: input.TapeBarcodePrefix }), - ...(input.TapeSizeInBytes != null && { TapeSizeInBytes: input.TapeSizeInBytes }), - ...(input.Worm != null && { Worm: input.Worm }), - }; -}; +// se_AutomaticTapeCreationRule omitted. -/** - * serializeAws_json1_1AutomaticTapeCreationRules - */ -const se_AutomaticTapeCreationRules = (input: AutomaticTapeCreationRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_AutomaticTapeCreationRule(entry, context); - }); -}; +// se_AutomaticTapeCreationRules omitted. -/** - * serializeAws_json1_1BandwidthRateLimitInterval - */ -const se_BandwidthRateLimitInterval = (input: BandwidthRateLimitInterval, context: __SerdeContext): any => { - return { - ...(input.AverageDownloadRateLimitInBitsPerSec != null && { - AverageDownloadRateLimitInBitsPerSec: input.AverageDownloadRateLimitInBitsPerSec, - }), - ...(input.AverageUploadRateLimitInBitsPerSec != null && { - AverageUploadRateLimitInBitsPerSec: input.AverageUploadRateLimitInBitsPerSec, - }), - ...(input.DaysOfWeek != null && { DaysOfWeek: se_DaysOfWeek(input.DaysOfWeek, context) }), - ...(input.EndHourOfDay != null && { EndHourOfDay: input.EndHourOfDay }), - ...(input.EndMinuteOfHour != null && { EndMinuteOfHour: input.EndMinuteOfHour }), - ...(input.StartHourOfDay != null && { StartHourOfDay: input.StartHourOfDay }), - ...(input.StartMinuteOfHour != null && { StartMinuteOfHour: input.StartMinuteOfHour }), - }; -}; +// se_BandwidthRateLimitInterval omitted. -/** - * serializeAws_json1_1BandwidthRateLimitIntervals - */ -const se_BandwidthRateLimitIntervals = (input: BandwidthRateLimitInterval[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BandwidthRateLimitInterval(entry, context); - }); -}; +// se_BandwidthRateLimitIntervals omitted. -/** - * serializeAws_json1_1CacheAttributes - */ -const se_CacheAttributes = (input: CacheAttributes, context: __SerdeContext): any => { - return { - ...(input.CacheStaleTimeoutInSeconds != null && { CacheStaleTimeoutInSeconds: input.CacheStaleTimeoutInSeconds }), - }; -}; +// se_CacheAttributes omitted. -/** - * serializeAws_json1_1CancelArchivalInput - */ -const se_CancelArchivalInput = (input: CancelArchivalInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_CancelArchivalInput omitted. -/** - * serializeAws_json1_1CancelRetrievalInput - */ -const se_CancelRetrievalInput = (input: CancelRetrievalInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_CancelRetrievalInput omitted. -/** - * serializeAws_json1_1CreateCachediSCSIVolumeInput - */ -const se_CreateCachediSCSIVolumeInput = (input: CreateCachediSCSIVolumeInput, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.SourceVolumeARN != null && { SourceVolumeARN: input.SourceVolumeARN }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TargetName != null && { TargetName: input.TargetName }), - ...(input.VolumeSizeInBytes != null && { VolumeSizeInBytes: input.VolumeSizeInBytes }), - }; -}; +// se_CreateCachediSCSIVolumeInput omitted. -/** - * serializeAws_json1_1CreateNFSFileShareInput - */ -const se_CreateNFSFileShareInput = (input: CreateNFSFileShareInput, context: __SerdeContext): any => { - return { - ...(input.AuditDestinationARN != null && { AuditDestinationARN: input.AuditDestinationARN }), - ...(input.BucketRegion != null && { BucketRegion: input.BucketRegion }), - ...(input.CacheAttributes != null && { CacheAttributes: se_CacheAttributes(input.CacheAttributes, context) }), - ...(input.ClientList != null && { ClientList: se_FileShareClientList(input.ClientList, context) }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DefaultStorageClass != null && { DefaultStorageClass: input.DefaultStorageClass }), - ...(input.FileShareName != null && { FileShareName: input.FileShareName }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.GuessMIMETypeEnabled != null && { GuessMIMETypeEnabled: input.GuessMIMETypeEnabled }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LocationARN != null && { LocationARN: input.LocationARN }), - ...(input.NFSFileShareDefaults != null && { - NFSFileShareDefaults: se_NFSFileShareDefaults(input.NFSFileShareDefaults, context), - }), - ...(input.NotificationPolicy != null && { NotificationPolicy: input.NotificationPolicy }), - ...(input.ObjectACL != null && { ObjectACL: input.ObjectACL }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RequesterPays != null && { RequesterPays: input.RequesterPays }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Squash != null && { Squash: input.Squash }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VPCEndpointDNSName != null && { VPCEndpointDNSName: input.VPCEndpointDNSName }), - }; -}; - -/** - * serializeAws_json1_1CreateSMBFileShareInput - */ -const se_CreateSMBFileShareInput = (input: CreateSMBFileShareInput, context: __SerdeContext): any => { - return { - ...(input.AccessBasedEnumeration != null && { AccessBasedEnumeration: input.AccessBasedEnumeration }), - ...(input.AdminUserList != null && { AdminUserList: se_UserList(input.AdminUserList, context) }), - ...(input.AuditDestinationARN != null && { AuditDestinationARN: input.AuditDestinationARN }), - ...(input.Authentication != null && { Authentication: input.Authentication }), - ...(input.BucketRegion != null && { BucketRegion: input.BucketRegion }), - ...(input.CacheAttributes != null && { CacheAttributes: se_CacheAttributes(input.CacheAttributes, context) }), - ...(input.CaseSensitivity != null && { CaseSensitivity: input.CaseSensitivity }), - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.DefaultStorageClass != null && { DefaultStorageClass: input.DefaultStorageClass }), - ...(input.FileShareName != null && { FileShareName: input.FileShareName }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.GuessMIMETypeEnabled != null && { GuessMIMETypeEnabled: input.GuessMIMETypeEnabled }), - ...(input.InvalidUserList != null && { InvalidUserList: se_UserList(input.InvalidUserList, context) }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.LocationARN != null && { LocationARN: input.LocationARN }), - ...(input.NotificationPolicy != null && { NotificationPolicy: input.NotificationPolicy }), - ...(input.ObjectACL != null && { ObjectACL: input.ObjectACL }), - ...(input.OplocksEnabled != null && { OplocksEnabled: input.OplocksEnabled }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RequesterPays != null && { RequesterPays: input.RequesterPays }), - ...(input.Role != null && { Role: input.Role }), - ...(input.SMBACLEnabled != null && { SMBACLEnabled: input.SMBACLEnabled }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VPCEndpointDNSName != null && { VPCEndpointDNSName: input.VPCEndpointDNSName }), - ...(input.ValidUserList != null && { ValidUserList: se_UserList(input.ValidUserList, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateSnapshotFromVolumeRecoveryPointInput - */ -const se_CreateSnapshotFromVolumeRecoveryPointInput = ( - input: CreateSnapshotFromVolumeRecoveryPointInput, - context: __SerdeContext -): any => { - return { - ...(input.SnapshotDescription != null && { SnapshotDescription: input.SnapshotDescription }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_CreateNFSFileShareInput omitted. -/** - * serializeAws_json1_1CreateSnapshotInput - */ -const se_CreateSnapshotInput = (input: CreateSnapshotInput, context: __SerdeContext): any => { - return { - ...(input.SnapshotDescription != null && { SnapshotDescription: input.SnapshotDescription }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_CreateSMBFileShareInput omitted. -/** - * serializeAws_json1_1CreateStorediSCSIVolumeInput - */ -const se_CreateStorediSCSIVolumeInput = (input: CreateStorediSCSIVolumeInput, context: __SerdeContext): any => { - return { - ...(input.DiskId != null && { DiskId: input.DiskId }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.NetworkInterfaceId != null && { NetworkInterfaceId: input.NetworkInterfaceId }), - ...(input.PreserveExistingData != null && { PreserveExistingData: input.PreserveExistingData }), - ...(input.SnapshotId != null && { SnapshotId: input.SnapshotId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TargetName != null && { TargetName: input.TargetName }), - }; -}; +// se_CreateSnapshotFromVolumeRecoveryPointInput omitted. -/** - * serializeAws_json1_1CreateTapePoolInput - */ -const se_CreateTapePoolInput = (input: CreateTapePoolInput, context: __SerdeContext): any => { - return { - ...(input.PoolName != null && { PoolName: input.PoolName }), - ...(input.RetentionLockTimeInDays != null && { RetentionLockTimeInDays: input.RetentionLockTimeInDays }), - ...(input.RetentionLockType != null && { RetentionLockType: input.RetentionLockType }), - ...(input.StorageClass != null && { StorageClass: input.StorageClass }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateSnapshotInput omitted. -/** - * serializeAws_json1_1CreateTapesInput - */ -const se_CreateTapesInput = (input: CreateTapesInput, context: __SerdeContext): any => { - return { - ...(input.ClientToken != null && { ClientToken: input.ClientToken }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.NumTapesToCreate != null && { NumTapesToCreate: input.NumTapesToCreate }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TapeBarcodePrefix != null && { TapeBarcodePrefix: input.TapeBarcodePrefix }), - ...(input.TapeSizeInBytes != null && { TapeSizeInBytes: input.TapeSizeInBytes }), - ...(input.Worm != null && { Worm: input.Worm }), - }; -}; +// se_CreateStorediSCSIVolumeInput omitted. -/** - * serializeAws_json1_1CreateTapeWithBarcodeInput - */ -const se_CreateTapeWithBarcodeInput = (input: CreateTapeWithBarcodeInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.PoolId != null && { PoolId: input.PoolId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.TapeBarcode != null && { TapeBarcode: input.TapeBarcode }), - ...(input.TapeSizeInBytes != null && { TapeSizeInBytes: input.TapeSizeInBytes }), - ...(input.Worm != null && { Worm: input.Worm }), - }; -}; +// se_CreateTapePoolInput omitted. -/** - * serializeAws_json1_1DaysOfWeek - */ -const se_DaysOfWeek = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CreateTapesInput omitted. -/** - * serializeAws_json1_1DeleteAutomaticTapeCreationPolicyInput - */ -const se_DeleteAutomaticTapeCreationPolicyInput = ( - input: DeleteAutomaticTapeCreationPolicyInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_CreateTapeWithBarcodeInput omitted. -/** - * serializeAws_json1_1DeleteBandwidthRateLimitInput - */ -const se_DeleteBandwidthRateLimitInput = (input: DeleteBandwidthRateLimitInput, context: __SerdeContext): any => { - return { - ...(input.BandwidthType != null && { BandwidthType: input.BandwidthType }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DaysOfWeek omitted. -/** - * serializeAws_json1_1DeleteChapCredentialsInput - */ -const se_DeleteChapCredentialsInput = (input: DeleteChapCredentialsInput, context: __SerdeContext): any => { - return { - ...(input.InitiatorName != null && { InitiatorName: input.InitiatorName }), - ...(input.TargetARN != null && { TargetARN: input.TargetARN }), - }; -}; +// se_DeleteAutomaticTapeCreationPolicyInput omitted. -/** - * serializeAws_json1_1DeleteFileShareInput - */ -const se_DeleteFileShareInput = (input: DeleteFileShareInput, context: __SerdeContext): any => { - return { - ...(input.FileShareARN != null && { FileShareARN: input.FileShareARN }), - ...(input.ForceDelete != null && { ForceDelete: input.ForceDelete }), - }; -}; +// se_DeleteBandwidthRateLimitInput omitted. -/** - * serializeAws_json1_1DeleteGatewayInput - */ -const se_DeleteGatewayInput = (input: DeleteGatewayInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DeleteChapCredentialsInput omitted. -/** - * serializeAws_json1_1DeleteSnapshotScheduleInput - */ -const se_DeleteSnapshotScheduleInput = (input: DeleteSnapshotScheduleInput, context: __SerdeContext): any => { - return { - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_DeleteFileShareInput omitted. -/** - * serializeAws_json1_1DeleteTapeArchiveInput - */ -const se_DeleteTapeArchiveInput = (input: DeleteTapeArchiveInput, context: __SerdeContext): any => { - return { - ...(input.BypassGovernanceRetention != null && { BypassGovernanceRetention: input.BypassGovernanceRetention }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_DeleteGatewayInput omitted. -/** - * serializeAws_json1_1DeleteTapeInput - */ -const se_DeleteTapeInput = (input: DeleteTapeInput, context: __SerdeContext): any => { - return { - ...(input.BypassGovernanceRetention != null && { BypassGovernanceRetention: input.BypassGovernanceRetention }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_DeleteSnapshotScheduleInput omitted. -/** - * serializeAws_json1_1DeleteTapePoolInput - */ -const se_DeleteTapePoolInput = (input: DeleteTapePoolInput, context: __SerdeContext): any => { - return { - ...(input.PoolARN != null && { PoolARN: input.PoolARN }), - }; -}; +// se_DeleteTapeArchiveInput omitted. -/** - * serializeAws_json1_1DeleteVolumeInput - */ -const se_DeleteVolumeInput = (input: DeleteVolumeInput, context: __SerdeContext): any => { - return { - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_DeleteTapeInput omitted. -/** - * serializeAws_json1_1DescribeAvailabilityMonitorTestInput - */ -const se_DescribeAvailabilityMonitorTestInput = ( - input: DescribeAvailabilityMonitorTestInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DeleteTapePoolInput omitted. -/** - * serializeAws_json1_1DescribeBandwidthRateLimitInput - */ -const se_DescribeBandwidthRateLimitInput = (input: DescribeBandwidthRateLimitInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DeleteVolumeInput omitted. -/** - * serializeAws_json1_1DescribeBandwidthRateLimitScheduleInput - */ -const se_DescribeBandwidthRateLimitScheduleInput = ( - input: DescribeBandwidthRateLimitScheduleInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeAvailabilityMonitorTestInput omitted. -/** - * serializeAws_json1_1DescribeCachediSCSIVolumesInput - */ -const se_DescribeCachediSCSIVolumesInput = (input: DescribeCachediSCSIVolumesInput, context: __SerdeContext): any => { - return { - ...(input.VolumeARNs != null && { VolumeARNs: se_VolumeARNs(input.VolumeARNs, context) }), - }; -}; +// se_DescribeBandwidthRateLimitInput omitted. -/** - * serializeAws_json1_1DescribeCacheInput - */ -const se_DescribeCacheInput = (input: DescribeCacheInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeBandwidthRateLimitScheduleInput omitted. -/** - * serializeAws_json1_1DescribeChapCredentialsInput - */ -const se_DescribeChapCredentialsInput = (input: DescribeChapCredentialsInput, context: __SerdeContext): any => { - return { - ...(input.TargetARN != null && { TargetARN: input.TargetARN }), - }; -}; +// se_DescribeCachediSCSIVolumesInput omitted. -/** - * serializeAws_json1_1DescribeFileSystemAssociationsInput - */ -const se_DescribeFileSystemAssociationsInput = ( - input: DescribeFileSystemAssociationsInput, - context: __SerdeContext -): any => { - return { - ...(input.FileSystemAssociationARNList != null && { - FileSystemAssociationARNList: se_FileSystemAssociationARNList(input.FileSystemAssociationARNList, context), - }), - }; -}; +// se_DescribeCacheInput omitted. -/** - * serializeAws_json1_1DescribeGatewayInformationInput - */ -const se_DescribeGatewayInformationInput = (input: DescribeGatewayInformationInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeChapCredentialsInput omitted. -/** - * serializeAws_json1_1DescribeMaintenanceStartTimeInput - */ -const se_DescribeMaintenanceStartTimeInput = ( - input: DescribeMaintenanceStartTimeInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeFileSystemAssociationsInput omitted. -/** - * serializeAws_json1_1DescribeNFSFileSharesInput - */ -const se_DescribeNFSFileSharesInput = (input: DescribeNFSFileSharesInput, context: __SerdeContext): any => { - return { - ...(input.FileShareARNList != null && { FileShareARNList: se_FileShareARNList(input.FileShareARNList, context) }), - }; -}; +// se_DescribeGatewayInformationInput omitted. -/** - * serializeAws_json1_1DescribeSMBFileSharesInput - */ -const se_DescribeSMBFileSharesInput = (input: DescribeSMBFileSharesInput, context: __SerdeContext): any => { - return { - ...(input.FileShareARNList != null && { FileShareARNList: se_FileShareARNList(input.FileShareARNList, context) }), - }; -}; +// se_DescribeMaintenanceStartTimeInput omitted. -/** - * serializeAws_json1_1DescribeSMBSettingsInput - */ -const se_DescribeSMBSettingsInput = (input: DescribeSMBSettingsInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeNFSFileSharesInput omitted. -/** - * serializeAws_json1_1DescribeSnapshotScheduleInput - */ -const se_DescribeSnapshotScheduleInput = (input: DescribeSnapshotScheduleInput, context: __SerdeContext): any => { - return { - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_DescribeSMBFileSharesInput omitted. -/** - * serializeAws_json1_1DescribeStorediSCSIVolumesInput - */ -const se_DescribeStorediSCSIVolumesInput = (input: DescribeStorediSCSIVolumesInput, context: __SerdeContext): any => { - return { - ...(input.VolumeARNs != null && { VolumeARNs: se_VolumeARNs(input.VolumeARNs, context) }), - }; -}; +// se_DescribeSMBSettingsInput omitted. -/** - * serializeAws_json1_1DescribeTapeArchivesInput - */ -const se_DescribeTapeArchivesInput = (input: DescribeTapeArchivesInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.TapeARNs != null && { TapeARNs: se_TapeARNs(input.TapeARNs, context) }), - }; -}; +// se_DescribeSnapshotScheduleInput omitted. -/** - * serializeAws_json1_1DescribeTapeRecoveryPointsInput - */ -const se_DescribeTapeRecoveryPointsInput = (input: DescribeTapeRecoveryPointsInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_DescribeStorediSCSIVolumesInput omitted. -/** - * serializeAws_json1_1DescribeTapesInput - */ -const se_DescribeTapesInput = (input: DescribeTapesInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.TapeARNs != null && { TapeARNs: se_TapeARNs(input.TapeARNs, context) }), - }; -}; +// se_DescribeTapeArchivesInput omitted. -/** - * serializeAws_json1_1DescribeUploadBufferInput - */ -const se_DescribeUploadBufferInput = (input: DescribeUploadBufferInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeTapeRecoveryPointsInput omitted. -/** - * serializeAws_json1_1DescribeVTLDevicesInput - */ -const se_DescribeVTLDevicesInput = (input: DescribeVTLDevicesInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.VTLDeviceARNs != null && { VTLDeviceARNs: se_VTLDeviceARNs(input.VTLDeviceARNs, context) }), - }; -}; +// se_DescribeTapesInput omitted. -/** - * serializeAws_json1_1DescribeWorkingStorageInput - */ -const se_DescribeWorkingStorageInput = (input: DescribeWorkingStorageInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeUploadBufferInput omitted. -/** - * serializeAws_json1_1DetachVolumeInput - */ -const se_DetachVolumeInput = (input: DetachVolumeInput, context: __SerdeContext): any => { - return { - ...(input.ForceDetach != null && { ForceDetach: input.ForceDetach }), - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_DescribeVTLDevicesInput omitted. -/** - * serializeAws_json1_1DisableGatewayInput - */ -const se_DisableGatewayInput = (input: DisableGatewayInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_DescribeWorkingStorageInput omitted. -/** - * serializeAws_json1_1DisassociateFileSystemInput - */ -const se_DisassociateFileSystemInput = (input: DisassociateFileSystemInput, context: __SerdeContext): any => { - return { - ...(input.FileSystemAssociationARN != null && { FileSystemAssociationARN: input.FileSystemAssociationARN }), - ...(input.ForceDelete != null && { ForceDelete: input.ForceDelete }), - }; -}; +// se_DetachVolumeInput omitted. -/** - * serializeAws_json1_1DiskIds - */ -const se_DiskIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DisableGatewayInput omitted. -/** - * serializeAws_json1_1EndpointNetworkConfiguration - */ -const se_EndpointNetworkConfiguration = (input: EndpointNetworkConfiguration, context: __SerdeContext): any => { - return { - ...(input.IpAddresses != null && { IpAddresses: se_IpAddressList(input.IpAddresses, context) }), - }; -}; +// se_DisassociateFileSystemInput omitted. -/** - * serializeAws_json1_1FileShareARNList - */ -const se_FileShareARNList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DiskIds omitted. -/** - * serializeAws_json1_1FileShareClientList - */ -const se_FileShareClientList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EndpointNetworkConfiguration omitted. -/** - * serializeAws_json1_1FileSystemAssociationARNList - */ -const se_FileSystemAssociationARNList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FileShareARNList omitted. -/** - * serializeAws_json1_1FolderList - */ -const se_FolderList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FileShareClientList omitted. -/** - * serializeAws_json1_1Hosts - */ -const se_Hosts = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FileSystemAssociationARNList omitted. -/** - * serializeAws_json1_1IpAddressList - */ -const se_IpAddressList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FolderList omitted. -/** - * serializeAws_json1_1JoinDomainInput - */ -const se_JoinDomainInput = (input: JoinDomainInput, context: __SerdeContext): any => { - return { - ...(input.DomainControllers != null && { DomainControllers: se_Hosts(input.DomainControllers, context) }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.OrganizationalUnit != null && { OrganizationalUnit: input.OrganizationalUnit }), - ...(input.Password != null && { Password: input.Password }), - ...(input.TimeoutInSeconds != null && { TimeoutInSeconds: input.TimeoutInSeconds }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_Hosts omitted. -/** - * serializeAws_json1_1ListAutomaticTapeCreationPoliciesInput - */ -const se_ListAutomaticTapeCreationPoliciesInput = ( - input: ListAutomaticTapeCreationPoliciesInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_IpAddressList omitted. -/** - * serializeAws_json1_1ListFileSharesInput - */ -const se_ListFileSharesInput = (input: ListFileSharesInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_JoinDomainInput omitted. -/** - * serializeAws_json1_1ListFileSystemAssociationsInput - */ -const se_ListFileSystemAssociationsInput = (input: ListFileSystemAssociationsInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListAutomaticTapeCreationPoliciesInput omitted. -/** - * serializeAws_json1_1ListGatewaysInput - */ -const se_ListGatewaysInput = (input: ListGatewaysInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListFileSharesInput omitted. -/** - * serializeAws_json1_1ListLocalDisksInput - */ -const se_ListLocalDisksInput = (input: ListLocalDisksInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_ListFileSystemAssociationsInput omitted. -/** - * serializeAws_json1_1ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListGatewaysInput omitted. -/** - * serializeAws_json1_1ListTapePoolsInput - */ -const se_ListTapePoolsInput = (input: ListTapePoolsInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.PoolARNs != null && { PoolARNs: se_PoolARNs(input.PoolARNs, context) }), - }; -}; +// se_ListLocalDisksInput omitted. -/** - * serializeAws_json1_1ListTapesInput - */ -const se_ListTapesInput = (input: ListTapesInput, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.TapeARNs != null && { TapeARNs: se_TapeARNs(input.TapeARNs, context) }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_1ListVolumeInitiatorsInput - */ -const se_ListVolumeInitiatorsInput = (input: ListVolumeInitiatorsInput, context: __SerdeContext): any => { - return { - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; +// se_ListTapePoolsInput omitted. -/** - * serializeAws_json1_1ListVolumeRecoveryPointsInput - */ -const se_ListVolumeRecoveryPointsInput = (input: ListVolumeRecoveryPointsInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_ListTapesInput omitted. -/** - * serializeAws_json1_1ListVolumesInput - */ -const se_ListVolumesInput = (input: ListVolumesInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - }; -}; +// se_ListVolumeInitiatorsInput omitted. -/** - * serializeAws_json1_1NFSFileShareDefaults - */ -const se_NFSFileShareDefaults = (input: NFSFileShareDefaults, context: __SerdeContext): any => { - return { - ...(input.DirectoryMode != null && { DirectoryMode: input.DirectoryMode }), - ...(input.FileMode != null && { FileMode: input.FileMode }), - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.OwnerId != null && { OwnerId: input.OwnerId }), - }; -}; +// se_ListVolumeRecoveryPointsInput omitted. -/** - * serializeAws_json1_1NotifyWhenUploadedInput - */ -const se_NotifyWhenUploadedInput = (input: NotifyWhenUploadedInput, context: __SerdeContext): any => { - return { - ...(input.FileShareARN != null && { FileShareARN: input.FileShareARN }), - }; -}; +// se_ListVolumesInput omitted. -/** - * serializeAws_json1_1PoolARNs - */ -const se_PoolARNs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NFSFileShareDefaults omitted. -/** - * serializeAws_json1_1RefreshCacheInput - */ -const se_RefreshCacheInput = (input: RefreshCacheInput, context: __SerdeContext): any => { - return { - ...(input.FileShareARN != null && { FileShareARN: input.FileShareARN }), - ...(input.FolderList != null && { FolderList: se_FolderList(input.FolderList, context) }), - ...(input.Recursive != null && { Recursive: input.Recursive }), - }; -}; +// se_NotifyWhenUploadedInput omitted. -/** - * serializeAws_json1_1RemoveTagsFromResourceInput - */ -const se_RemoveTagsFromResourceInput = (input: RemoveTagsFromResourceInput, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_PoolARNs omitted. -/** - * serializeAws_json1_1ResetCacheInput - */ -const se_ResetCacheInput = (input: ResetCacheInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_RefreshCacheInput omitted. -/** - * serializeAws_json1_1RetrieveTapeArchiveInput - */ -const se_RetrieveTapeArchiveInput = (input: RetrieveTapeArchiveInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_RemoveTagsFromResourceInput omitted. -/** - * serializeAws_json1_1RetrieveTapeRecoveryPointInput - */ -const se_RetrieveTapeRecoveryPointInput = (input: RetrieveTapeRecoveryPointInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.TapeARN != null && { TapeARN: input.TapeARN }), - }; -}; +// se_ResetCacheInput omitted. -/** - * serializeAws_json1_1SetLocalConsolePasswordInput - */ -const se_SetLocalConsolePasswordInput = (input: SetLocalConsolePasswordInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.LocalConsolePassword != null && { LocalConsolePassword: input.LocalConsolePassword }), - }; -}; +// se_RetrieveTapeArchiveInput omitted. -/** - * serializeAws_json1_1SetSMBGuestPasswordInput - */ -const se_SetSMBGuestPasswordInput = (input: SetSMBGuestPasswordInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.Password != null && { Password: input.Password }), - }; -}; +// se_RetrieveTapeRecoveryPointInput omitted. -/** - * serializeAws_json1_1ShutdownGatewayInput - */ -const se_ShutdownGatewayInput = (input: ShutdownGatewayInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_SetLocalConsolePasswordInput omitted. -/** - * serializeAws_json1_1SMBLocalGroups - */ -const se_SMBLocalGroups = (input: SMBLocalGroups, context: __SerdeContext): any => { - return { - ...(input.GatewayAdmins != null && { GatewayAdmins: se_UserList(input.GatewayAdmins, context) }), - }; -}; +// se_SetSMBGuestPasswordInput omitted. -/** - * serializeAws_json1_1StartAvailabilityMonitorTestInput - */ -const se_StartAvailabilityMonitorTestInput = ( - input: StartAvailabilityMonitorTestInput, - context: __SerdeContext -): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_ShutdownGatewayInput omitted. -/** - * serializeAws_json1_1StartGatewayInput - */ -const se_StartGatewayInput = (input: StartGatewayInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_SMBLocalGroups omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_StartAvailabilityMonitorTestInput omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StartGatewayInput omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TapeARNs - */ -const se_TapeARNs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1UpdateAutomaticTapeCreationPolicyInput - */ -const se_UpdateAutomaticTapeCreationPolicyInput = ( - input: UpdateAutomaticTapeCreationPolicyInput, - context: __SerdeContext -): any => { - return { - ...(input.AutomaticTapeCreationRules != null && { - AutomaticTapeCreationRules: se_AutomaticTapeCreationRules(input.AutomaticTapeCreationRules, context), - }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_Tags omitted. -/** - * serializeAws_json1_1UpdateBandwidthRateLimitInput - */ -const se_UpdateBandwidthRateLimitInput = (input: UpdateBandwidthRateLimitInput, context: __SerdeContext): any => { - return { - ...(input.AverageDownloadRateLimitInBitsPerSec != null && { - AverageDownloadRateLimitInBitsPerSec: input.AverageDownloadRateLimitInBitsPerSec, - }), - ...(input.AverageUploadRateLimitInBitsPerSec != null && { - AverageUploadRateLimitInBitsPerSec: input.AverageUploadRateLimitInBitsPerSec, - }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_TapeARNs omitted. -/** - * serializeAws_json1_1UpdateBandwidthRateLimitScheduleInput - */ -const se_UpdateBandwidthRateLimitScheduleInput = ( - input: UpdateBandwidthRateLimitScheduleInput, - context: __SerdeContext -): any => { - return { - ...(input.BandwidthRateLimitIntervals != null && { - BandwidthRateLimitIntervals: se_BandwidthRateLimitIntervals(input.BandwidthRateLimitIntervals, context), - }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; +// se_UpdateAutomaticTapeCreationPolicyInput omitted. -/** - * serializeAws_json1_1UpdateChapCredentialsInput - */ -const se_UpdateChapCredentialsInput = (input: UpdateChapCredentialsInput, context: __SerdeContext): any => { - return { - ...(input.InitiatorName != null && { InitiatorName: input.InitiatorName }), - ...(input.SecretToAuthenticateInitiator != null && { - SecretToAuthenticateInitiator: input.SecretToAuthenticateInitiator, - }), - ...(input.SecretToAuthenticateTarget != null && { SecretToAuthenticateTarget: input.SecretToAuthenticateTarget }), - ...(input.TargetARN != null && { TargetARN: input.TargetARN }), - }; -}; +// se_UpdateBandwidthRateLimitInput omitted. -/** - * serializeAws_json1_1UpdateFileSystemAssociationInput - */ -const se_UpdateFileSystemAssociationInput = (input: UpdateFileSystemAssociationInput, context: __SerdeContext): any => { - return { - ...(input.AuditDestinationARN != null && { AuditDestinationARN: input.AuditDestinationARN }), - ...(input.CacheAttributes != null && { CacheAttributes: se_CacheAttributes(input.CacheAttributes, context) }), - ...(input.FileSystemAssociationARN != null && { FileSystemAssociationARN: input.FileSystemAssociationARN }), - ...(input.Password != null && { Password: input.Password }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_UpdateBandwidthRateLimitScheduleInput omitted. -/** - * serializeAws_json1_1UpdateGatewayInformationInput - */ -const se_UpdateGatewayInformationInput = (input: UpdateGatewayInformationInput, context: __SerdeContext): any => { - return { - ...(input.CloudWatchLogGroupARN != null && { CloudWatchLogGroupARN: input.CloudWatchLogGroupARN }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.GatewayCapacity != null && { GatewayCapacity: input.GatewayCapacity }), - ...(input.GatewayName != null && { GatewayName: input.GatewayName }), - ...(input.GatewayTimezone != null && { GatewayTimezone: input.GatewayTimezone }), - }; -}; +// se_UpdateChapCredentialsInput omitted. -/** - * serializeAws_json1_1UpdateGatewaySoftwareNowInput - */ -const se_UpdateGatewaySoftwareNowInput = (input: UpdateGatewaySoftwareNowInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; - -/** - * serializeAws_json1_1UpdateMaintenanceStartTimeInput - */ -const se_UpdateMaintenanceStartTimeInput = (input: UpdateMaintenanceStartTimeInput, context: __SerdeContext): any => { - return { - ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }), - ...(input.DayOfWeek != null && { DayOfWeek: input.DayOfWeek }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.HourOfDay != null && { HourOfDay: input.HourOfDay }), - ...(input.MinuteOfHour != null && { MinuteOfHour: input.MinuteOfHour }), - }; -}; - -/** - * serializeAws_json1_1UpdateNFSFileShareInput - */ -const se_UpdateNFSFileShareInput = (input: UpdateNFSFileShareInput, context: __SerdeContext): any => { - return { - ...(input.AuditDestinationARN != null && { AuditDestinationARN: input.AuditDestinationARN }), - ...(input.CacheAttributes != null && { CacheAttributes: se_CacheAttributes(input.CacheAttributes, context) }), - ...(input.ClientList != null && { ClientList: se_FileShareClientList(input.ClientList, context) }), - ...(input.DefaultStorageClass != null && { DefaultStorageClass: input.DefaultStorageClass }), - ...(input.FileShareARN != null && { FileShareARN: input.FileShareARN }), - ...(input.FileShareName != null && { FileShareName: input.FileShareName }), - ...(input.GuessMIMETypeEnabled != null && { GuessMIMETypeEnabled: input.GuessMIMETypeEnabled }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.NFSFileShareDefaults != null && { - NFSFileShareDefaults: se_NFSFileShareDefaults(input.NFSFileShareDefaults, context), - }), - ...(input.NotificationPolicy != null && { NotificationPolicy: input.NotificationPolicy }), - ...(input.ObjectACL != null && { ObjectACL: input.ObjectACL }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RequesterPays != null && { RequesterPays: input.RequesterPays }), - ...(input.Squash != null && { Squash: input.Squash }), - }; -}; - -/** - * serializeAws_json1_1UpdateSMBFileShareInput - */ -const se_UpdateSMBFileShareInput = (input: UpdateSMBFileShareInput, context: __SerdeContext): any => { - return { - ...(input.AccessBasedEnumeration != null && { AccessBasedEnumeration: input.AccessBasedEnumeration }), - ...(input.AdminUserList != null && { AdminUserList: se_UserList(input.AdminUserList, context) }), - ...(input.AuditDestinationARN != null && { AuditDestinationARN: input.AuditDestinationARN }), - ...(input.CacheAttributes != null && { CacheAttributes: se_CacheAttributes(input.CacheAttributes, context) }), - ...(input.CaseSensitivity != null && { CaseSensitivity: input.CaseSensitivity }), - ...(input.DefaultStorageClass != null && { DefaultStorageClass: input.DefaultStorageClass }), - ...(input.FileShareARN != null && { FileShareARN: input.FileShareARN }), - ...(input.FileShareName != null && { FileShareName: input.FileShareName }), - ...(input.GuessMIMETypeEnabled != null && { GuessMIMETypeEnabled: input.GuessMIMETypeEnabled }), - ...(input.InvalidUserList != null && { InvalidUserList: se_UserList(input.InvalidUserList, context) }), - ...(input.KMSEncrypted != null && { KMSEncrypted: input.KMSEncrypted }), - ...(input.KMSKey != null && { KMSKey: input.KMSKey }), - ...(input.NotificationPolicy != null && { NotificationPolicy: input.NotificationPolicy }), - ...(input.ObjectACL != null && { ObjectACL: input.ObjectACL }), - ...(input.OplocksEnabled != null && { OplocksEnabled: input.OplocksEnabled }), - ...(input.ReadOnly != null && { ReadOnly: input.ReadOnly }), - ...(input.RequesterPays != null && { RequesterPays: input.RequesterPays }), - ...(input.SMBACLEnabled != null && { SMBACLEnabled: input.SMBACLEnabled }), - ...(input.ValidUserList != null && { ValidUserList: se_UserList(input.ValidUserList, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateSMBFileShareVisibilityInput - */ -const se_UpdateSMBFileShareVisibilityInput = ( - input: UpdateSMBFileShareVisibilityInput, - context: __SerdeContext -): any => { - return { - ...(input.FileSharesVisible != null && { FileSharesVisible: input.FileSharesVisible }), - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - }; -}; - -/** - * serializeAws_json1_1UpdateSMBLocalGroupsInput - */ -const se_UpdateSMBLocalGroupsInput = (input: UpdateSMBLocalGroupsInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.SMBLocalGroups != null && { SMBLocalGroups: se_SMBLocalGroups(input.SMBLocalGroups, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateSMBSecurityStrategyInput - */ -const se_UpdateSMBSecurityStrategyInput = (input: UpdateSMBSecurityStrategyInput, context: __SerdeContext): any => { - return { - ...(input.GatewayARN != null && { GatewayARN: input.GatewayARN }), - ...(input.SMBSecurityStrategy != null && { SMBSecurityStrategy: input.SMBSecurityStrategy }), - }; -}; - -/** - * serializeAws_json1_1UpdateSnapshotScheduleInput - */ -const se_UpdateSnapshotScheduleInput = (input: UpdateSnapshotScheduleInput, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.RecurrenceInHours != null && { RecurrenceInHours: input.RecurrenceInHours }), - ...(input.StartAt != null && { StartAt: input.StartAt }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.VolumeARN != null && { VolumeARN: input.VolumeARN }), - }; -}; - -/** - * serializeAws_json1_1UpdateVTLDeviceTypeInput - */ -const se_UpdateVTLDeviceTypeInput = (input: UpdateVTLDeviceTypeInput, context: __SerdeContext): any => { - return { - ...(input.DeviceType != null && { DeviceType: input.DeviceType }), - ...(input.VTLDeviceARN != null && { VTLDeviceARN: input.VTLDeviceARN }), - }; -}; - -/** - * serializeAws_json1_1UserList - */ -const se_UserList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1VolumeARNs - */ -const se_VolumeARNs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1VTLDeviceARNs - */ -const se_VTLDeviceARNs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * deserializeAws_json1_1ActivateGatewayOutput - */ -const de_ActivateGatewayOutput = (output: any, context: __SerdeContext): ActivateGatewayOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1AddCacheOutput - */ -const de_AddCacheOutput = (output: any, context: __SerdeContext): AddCacheOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1AddTagsToResourceOutput - */ -const de_AddTagsToResourceOutput = (output: any, context: __SerdeContext): AddTagsToResourceOutput => { - return { - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; - -/** - * deserializeAws_json1_1AddUploadBufferOutput - */ -const de_AddUploadBufferOutput = (output: any, context: __SerdeContext): AddUploadBufferOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1AddWorkingStorageOutput - */ -const de_AddWorkingStorageOutput = (output: any, context: __SerdeContext): AddWorkingStorageOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1AssignTapePoolOutput - */ -const de_AssignTapePoolOutput = (output: any, context: __SerdeContext): AssignTapePoolOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; - -/** - * deserializeAws_json1_1AssociateFileSystemOutput - */ -const de_AssociateFileSystemOutput = (output: any, context: __SerdeContext): AssociateFileSystemOutput => { - return { - FileSystemAssociationARN: __expectString(output.FileSystemAssociationARN), - } as any; -}; - -/** - * deserializeAws_json1_1AttachVolumeOutput - */ -const de_AttachVolumeOutput = (output: any, context: __SerdeContext): AttachVolumeOutput => { - return { - TargetARN: __expectString(output.TargetARN), - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1AutomaticTapeCreationPolicyInfo - */ -const de_AutomaticTapeCreationPolicyInfo = (output: any, context: __SerdeContext): AutomaticTapeCreationPolicyInfo => { - return { - AutomaticTapeCreationRules: - output.AutomaticTapeCreationRules != null - ? de_AutomaticTapeCreationRules(output.AutomaticTapeCreationRules, context) - : undefined, - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1AutomaticTapeCreationPolicyInfos - */ -const de_AutomaticTapeCreationPolicyInfos = ( - output: any, - context: __SerdeContext -): AutomaticTapeCreationPolicyInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutomaticTapeCreationPolicyInfo(entry, context); - }); - return retVal; -}; +// se_UpdateFileSystemAssociationInput omitted. -/** - * deserializeAws_json1_1AutomaticTapeCreationRule - */ -const de_AutomaticTapeCreationRule = (output: any, context: __SerdeContext): AutomaticTapeCreationRule => { - return { - MinimumNumTapes: __expectInt32(output.MinimumNumTapes), - PoolId: __expectString(output.PoolId), - TapeBarcodePrefix: __expectString(output.TapeBarcodePrefix), - TapeSizeInBytes: __expectLong(output.TapeSizeInBytes), - Worm: __expectBoolean(output.Worm), - } as any; -}; +// se_UpdateGatewayInformationInput omitted. -/** - * deserializeAws_json1_1AutomaticTapeCreationRules - */ -const de_AutomaticTapeCreationRules = (output: any, context: __SerdeContext): AutomaticTapeCreationRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AutomaticTapeCreationRule(entry, context); - }); - return retVal; -}; +// se_UpdateGatewaySoftwareNowInput omitted. -/** - * deserializeAws_json1_1BandwidthRateLimitInterval - */ -const de_BandwidthRateLimitInterval = (output: any, context: __SerdeContext): BandwidthRateLimitInterval => { - return { - AverageDownloadRateLimitInBitsPerSec: __expectLong(output.AverageDownloadRateLimitInBitsPerSec), - AverageUploadRateLimitInBitsPerSec: __expectLong(output.AverageUploadRateLimitInBitsPerSec), - DaysOfWeek: output.DaysOfWeek != null ? de_DaysOfWeek(output.DaysOfWeek, context) : undefined, - EndHourOfDay: __expectInt32(output.EndHourOfDay), - EndMinuteOfHour: __expectInt32(output.EndMinuteOfHour), - StartHourOfDay: __expectInt32(output.StartHourOfDay), - StartMinuteOfHour: __expectInt32(output.StartMinuteOfHour), - } as any; -}; +// se_UpdateMaintenanceStartTimeInput omitted. -/** - * deserializeAws_json1_1BandwidthRateLimitIntervals - */ -const de_BandwidthRateLimitIntervals = (output: any, context: __SerdeContext): BandwidthRateLimitInterval[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BandwidthRateLimitInterval(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CacheAttributes - */ -const de_CacheAttributes = (output: any, context: __SerdeContext): CacheAttributes => { - return { - CacheStaleTimeoutInSeconds: __expectInt32(output.CacheStaleTimeoutInSeconds), - } as any; -}; +// se_UpdateNFSFileShareInput omitted. -/** - * deserializeAws_json1_1CachediSCSIVolume - */ -const de_CachediSCSIVolume = (output: any, context: __SerdeContext): CachediSCSIVolume => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - KMSKey: __expectString(output.KMSKey), - SourceSnapshotId: __expectString(output.SourceSnapshotId), - TargetName: __expectString(output.TargetName), - VolumeARN: __expectString(output.VolumeARN), - VolumeAttachmentStatus: __expectString(output.VolumeAttachmentStatus), - VolumeId: __expectString(output.VolumeId), - VolumeProgress: __limitedParseDouble(output.VolumeProgress), - VolumeSizeInBytes: __expectLong(output.VolumeSizeInBytes), - VolumeStatus: __expectString(output.VolumeStatus), - VolumeType: __expectString(output.VolumeType), - VolumeUsedInBytes: __expectLong(output.VolumeUsedInBytes), - VolumeiSCSIAttributes: - output.VolumeiSCSIAttributes != null - ? de_VolumeiSCSIAttributes(output.VolumeiSCSIAttributes, context) - : undefined, - } as any; -}; +// se_UpdateSMBFileShareInput omitted. -/** - * deserializeAws_json1_1CachediSCSIVolumes - */ -const de_CachediSCSIVolumes = (output: any, context: __SerdeContext): CachediSCSIVolume[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CachediSCSIVolume(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CancelArchivalOutput - */ -const de_CancelArchivalOutput = (output: any, context: __SerdeContext): CancelArchivalOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; - -/** - * deserializeAws_json1_1CancelRetrievalOutput - */ -const de_CancelRetrievalOutput = (output: any, context: __SerdeContext): CancelRetrievalOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; - -/** - * deserializeAws_json1_1ChapCredentials - */ -const de_ChapCredentials = (output: any, context: __SerdeContext): ChapInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChapInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ChapInfo - */ -const de_ChapInfo = (output: any, context: __SerdeContext): ChapInfo => { - return { - InitiatorName: __expectString(output.InitiatorName), - SecretToAuthenticateInitiator: __expectString(output.SecretToAuthenticateInitiator), - SecretToAuthenticateTarget: __expectString(output.SecretToAuthenticateTarget), - TargetARN: __expectString(output.TargetARN), - } as any; -}; - -/** - * deserializeAws_json1_1CreateCachediSCSIVolumeOutput - */ -const de_CreateCachediSCSIVolumeOutput = (output: any, context: __SerdeContext): CreateCachediSCSIVolumeOutput => { - return { - TargetARN: __expectString(output.TargetARN), - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1CreateNFSFileShareOutput - */ -const de_CreateNFSFileShareOutput = (output: any, context: __SerdeContext): CreateNFSFileShareOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSMBFileShareOutput - */ -const de_CreateSMBFileShareOutput = (output: any, context: __SerdeContext): CreateSMBFileShareOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSnapshotFromVolumeRecoveryPointOutput - */ -const de_CreateSnapshotFromVolumeRecoveryPointOutput = ( - output: any, - context: __SerdeContext -): CreateSnapshotFromVolumeRecoveryPointOutput => { - return { - SnapshotId: __expectString(output.SnapshotId), - VolumeARN: __expectString(output.VolumeARN), - VolumeRecoveryPointTime: __expectString(output.VolumeRecoveryPointTime), - } as any; -}; - -/** - * deserializeAws_json1_1CreateSnapshotOutput - */ -const de_CreateSnapshotOutput = (output: any, context: __SerdeContext): CreateSnapshotOutput => { - return { - SnapshotId: __expectString(output.SnapshotId), - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1CreateStorediSCSIVolumeOutput - */ -const de_CreateStorediSCSIVolumeOutput = (output: any, context: __SerdeContext): CreateStorediSCSIVolumeOutput => { - return { - TargetARN: __expectString(output.TargetARN), - VolumeARN: __expectString(output.VolumeARN), - VolumeSizeInBytes: __expectLong(output.VolumeSizeInBytes), - } as any; -}; +// se_UpdateSMBFileShareVisibilityInput omitted. -/** - * deserializeAws_json1_1CreateTapePoolOutput - */ -const de_CreateTapePoolOutput = (output: any, context: __SerdeContext): CreateTapePoolOutput => { - return { - PoolARN: __expectString(output.PoolARN), - } as any; -}; - -/** - * deserializeAws_json1_1CreateTapesOutput - */ -const de_CreateTapesOutput = (output: any, context: __SerdeContext): CreateTapesOutput => { - return { - TapeARNs: output.TapeARNs != null ? de_TapeARNs(output.TapeARNs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTapeWithBarcodeOutput - */ -const de_CreateTapeWithBarcodeOutput = (output: any, context: __SerdeContext): CreateTapeWithBarcodeOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DaysOfWeek - */ -const de_DaysOfWeek = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DeleteAutomaticTapeCreationPolicyOutput - */ -const de_DeleteAutomaticTapeCreationPolicyOutput = ( - output: any, - context: __SerdeContext -): DeleteAutomaticTapeCreationPolicyOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteBandwidthRateLimitOutput - */ -const de_DeleteBandwidthRateLimitOutput = (output: any, context: __SerdeContext): DeleteBandwidthRateLimitOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteChapCredentialsOutput - */ -const de_DeleteChapCredentialsOutput = (output: any, context: __SerdeContext): DeleteChapCredentialsOutput => { - return { - InitiatorName: __expectString(output.InitiatorName), - TargetARN: __expectString(output.TargetARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFileShareOutput - */ -const de_DeleteFileShareOutput = (output: any, context: __SerdeContext): DeleteFileShareOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteGatewayOutput - */ -const de_DeleteGatewayOutput = (output: any, context: __SerdeContext): DeleteGatewayOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteSnapshotScheduleOutput - */ -const de_DeleteSnapshotScheduleOutput = (output: any, context: __SerdeContext): DeleteSnapshotScheduleOutput => { - return { - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTapeArchiveOutput - */ -const de_DeleteTapeArchiveOutput = (output: any, context: __SerdeContext): DeleteTapeArchiveOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTapeOutput - */ -const de_DeleteTapeOutput = (output: any, context: __SerdeContext): DeleteTapeOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteTapePoolOutput - */ -const de_DeleteTapePoolOutput = (output: any, context: __SerdeContext): DeleteTapePoolOutput => { - return { - PoolARN: __expectString(output.PoolARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteVolumeOutput - */ -const de_DeleteVolumeOutput = (output: any, context: __SerdeContext): DeleteVolumeOutput => { - return { - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAvailabilityMonitorTestOutput - */ -const de_DescribeAvailabilityMonitorTestOutput = ( - output: any, - context: __SerdeContext -): DescribeAvailabilityMonitorTestOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeBandwidthRateLimitOutput - */ -const de_DescribeBandwidthRateLimitOutput = ( - output: any, - context: __SerdeContext -): DescribeBandwidthRateLimitOutput => { - return { - AverageDownloadRateLimitInBitsPerSec: __expectLong(output.AverageDownloadRateLimitInBitsPerSec), - AverageUploadRateLimitInBitsPerSec: __expectLong(output.AverageUploadRateLimitInBitsPerSec), - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeBandwidthRateLimitScheduleOutput - */ -const de_DescribeBandwidthRateLimitScheduleOutput = ( - output: any, - context: __SerdeContext -): DescribeBandwidthRateLimitScheduleOutput => { - return { - BandwidthRateLimitIntervals: - output.BandwidthRateLimitIntervals != null - ? de_BandwidthRateLimitIntervals(output.BandwidthRateLimitIntervals, context) - : undefined, - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCachediSCSIVolumesOutput - */ -const de_DescribeCachediSCSIVolumesOutput = ( - output: any, - context: __SerdeContext -): DescribeCachediSCSIVolumesOutput => { - return { - CachediSCSIVolumes: - output.CachediSCSIVolumes != null ? de_CachediSCSIVolumes(output.CachediSCSIVolumes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCacheOutput - */ -const de_DescribeCacheOutput = (output: any, context: __SerdeContext): DescribeCacheOutput => { - return { - CacheAllocatedInBytes: __expectLong(output.CacheAllocatedInBytes), - CacheDirtyPercentage: __limitedParseDouble(output.CacheDirtyPercentage), - CacheHitPercentage: __limitedParseDouble(output.CacheHitPercentage), - CacheMissPercentage: __limitedParseDouble(output.CacheMissPercentage), - CacheUsedPercentage: __limitedParseDouble(output.CacheUsedPercentage), - DiskIds: output.DiskIds != null ? de_DiskIds(output.DiskIds, context) : undefined, - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeChapCredentialsOutput - */ -const de_DescribeChapCredentialsOutput = (output: any, context: __SerdeContext): DescribeChapCredentialsOutput => { - return { - ChapCredentials: output.ChapCredentials != null ? de_ChapCredentials(output.ChapCredentials, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeFileSystemAssociationsOutput - */ -const de_DescribeFileSystemAssociationsOutput = ( - output: any, - context: __SerdeContext -): DescribeFileSystemAssociationsOutput => { - return { - FileSystemAssociationInfoList: - output.FileSystemAssociationInfoList != null - ? de_FileSystemAssociationInfoList(output.FileSystemAssociationInfoList, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeGatewayInformationOutput - */ -const de_DescribeGatewayInformationOutput = ( - output: any, - context: __SerdeContext -): DescribeGatewayInformationOutput => { - return { - CloudWatchLogGroupARN: __expectString(output.CloudWatchLogGroupARN), - DeprecationDate: __expectString(output.DeprecationDate), - Ec2InstanceId: __expectString(output.Ec2InstanceId), - Ec2InstanceRegion: __expectString(output.Ec2InstanceRegion), - EndpointType: __expectString(output.EndpointType), - GatewayARN: __expectString(output.GatewayARN), - GatewayCapacity: __expectString(output.GatewayCapacity), - GatewayId: __expectString(output.GatewayId), - GatewayName: __expectString(output.GatewayName), - GatewayNetworkInterfaces: - output.GatewayNetworkInterfaces != null - ? de_GatewayNetworkInterfaces(output.GatewayNetworkInterfaces, context) - : undefined, - GatewayState: __expectString(output.GatewayState), - GatewayTimezone: __expectString(output.GatewayTimezone), - GatewayType: __expectString(output.GatewayType), - HostEnvironment: __expectString(output.HostEnvironment), - HostEnvironmentId: __expectString(output.HostEnvironmentId), - LastSoftwareUpdate: __expectString(output.LastSoftwareUpdate), - NextUpdateAvailabilityDate: __expectString(output.NextUpdateAvailabilityDate), - SoftwareUpdatesEndDate: __expectString(output.SoftwareUpdatesEndDate), - SupportedGatewayCapacities: - output.SupportedGatewayCapacities != null - ? de_SupportedGatewayCapacities(output.SupportedGatewayCapacities, context) - : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VPCEndpoint: __expectString(output.VPCEndpoint), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeMaintenanceStartTimeOutput - */ -const de_DescribeMaintenanceStartTimeOutput = ( - output: any, - context: __SerdeContext -): DescribeMaintenanceStartTimeOutput => { - return { - DayOfMonth: __expectInt32(output.DayOfMonth), - DayOfWeek: __expectInt32(output.DayOfWeek), - GatewayARN: __expectString(output.GatewayARN), - HourOfDay: __expectInt32(output.HourOfDay), - MinuteOfHour: __expectInt32(output.MinuteOfHour), - Timezone: __expectString(output.Timezone), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeNFSFileSharesOutput - */ -const de_DescribeNFSFileSharesOutput = (output: any, context: __SerdeContext): DescribeNFSFileSharesOutput => { - return { - NFSFileShareInfoList: - output.NFSFileShareInfoList != null ? de_NFSFileShareInfoList(output.NFSFileShareInfoList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSMBFileSharesOutput - */ -const de_DescribeSMBFileSharesOutput = (output: any, context: __SerdeContext): DescribeSMBFileSharesOutput => { - return { - SMBFileShareInfoList: - output.SMBFileShareInfoList != null ? de_SMBFileShareInfoList(output.SMBFileShareInfoList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSMBSettingsOutput - */ -const de_DescribeSMBSettingsOutput = (output: any, context: __SerdeContext): DescribeSMBSettingsOutput => { - return { - ActiveDirectoryStatus: __expectString(output.ActiveDirectoryStatus), - DomainName: __expectString(output.DomainName), - FileSharesVisible: __expectBoolean(output.FileSharesVisible), - GatewayARN: __expectString(output.GatewayARN), - SMBGuestPasswordSet: __expectBoolean(output.SMBGuestPasswordSet), - SMBLocalGroups: output.SMBLocalGroups != null ? de_SMBLocalGroups(output.SMBLocalGroups, context) : undefined, - SMBSecurityStrategy: __expectString(output.SMBSecurityStrategy), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSnapshotScheduleOutput - */ -const de_DescribeSnapshotScheduleOutput = (output: any, context: __SerdeContext): DescribeSnapshotScheduleOutput => { - return { - Description: __expectString(output.Description), - RecurrenceInHours: __expectInt32(output.RecurrenceInHours), - StartAt: __expectInt32(output.StartAt), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Timezone: __expectString(output.Timezone), - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeStorediSCSIVolumesOutput - */ -const de_DescribeStorediSCSIVolumesOutput = ( - output: any, - context: __SerdeContext -): DescribeStorediSCSIVolumesOutput => { - return { - StorediSCSIVolumes: - output.StorediSCSIVolumes != null ? de_StorediSCSIVolumes(output.StorediSCSIVolumes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTapeArchivesOutput - */ -const de_DescribeTapeArchivesOutput = (output: any, context: __SerdeContext): DescribeTapeArchivesOutput => { - return { - Marker: __expectString(output.Marker), - TapeArchives: output.TapeArchives != null ? de_TapeArchives(output.TapeArchives, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTapeRecoveryPointsOutput - */ -const de_DescribeTapeRecoveryPointsOutput = ( - output: any, - context: __SerdeContext -): DescribeTapeRecoveryPointsOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - Marker: __expectString(output.Marker), - TapeRecoveryPointInfos: - output.TapeRecoveryPointInfos != null - ? de_TapeRecoveryPointInfos(output.TapeRecoveryPointInfos, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTapesOutput - */ -const de_DescribeTapesOutput = (output: any, context: __SerdeContext): DescribeTapesOutput => { - return { - Marker: __expectString(output.Marker), - Tapes: output.Tapes != null ? de_Tapes(output.Tapes, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeUploadBufferOutput - */ -const de_DescribeUploadBufferOutput = (output: any, context: __SerdeContext): DescribeUploadBufferOutput => { - return { - DiskIds: output.DiskIds != null ? de_DiskIds(output.DiskIds, context) : undefined, - GatewayARN: __expectString(output.GatewayARN), - UploadBufferAllocatedInBytes: __expectLong(output.UploadBufferAllocatedInBytes), - UploadBufferUsedInBytes: __expectLong(output.UploadBufferUsedInBytes), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeVTLDevicesOutput - */ -const de_DescribeVTLDevicesOutput = (output: any, context: __SerdeContext): DescribeVTLDevicesOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - Marker: __expectString(output.Marker), - VTLDevices: output.VTLDevices != null ? de_VTLDevices(output.VTLDevices, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkingStorageOutput - */ -const de_DescribeWorkingStorageOutput = (output: any, context: __SerdeContext): DescribeWorkingStorageOutput => { - return { - DiskIds: output.DiskIds != null ? de_DiskIds(output.DiskIds, context) : undefined, - GatewayARN: __expectString(output.GatewayARN), - WorkingStorageAllocatedInBytes: __expectLong(output.WorkingStorageAllocatedInBytes), - WorkingStorageUsedInBytes: __expectLong(output.WorkingStorageUsedInBytes), - } as any; -}; - -/** - * deserializeAws_json1_1DetachVolumeOutput - */ -const de_DetachVolumeOutput = (output: any, context: __SerdeContext): DetachVolumeOutput => { - return { - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceiSCSIAttributes - */ -const de_DeviceiSCSIAttributes = (output: any, context: __SerdeContext): DeviceiSCSIAttributes => { - return { - ChapEnabled: __expectBoolean(output.ChapEnabled), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - NetworkInterfacePort: __expectInt32(output.NetworkInterfacePort), - TargetARN: __expectString(output.TargetARN), - } as any; -}; +// se_UpdateSMBLocalGroupsInput omitted. -/** - * deserializeAws_json1_1DisableGatewayOutput - */ -const de_DisableGatewayOutput = (output: any, context: __SerdeContext): DisableGatewayOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// se_UpdateSMBSecurityStrategyInput omitted. -/** - * deserializeAws_json1_1DisassociateFileSystemOutput - */ -const de_DisassociateFileSystemOutput = (output: any, context: __SerdeContext): DisassociateFileSystemOutput => { - return { - FileSystemAssociationARN: __expectString(output.FileSystemAssociationARN), - } as any; -}; +// se_UpdateSnapshotScheduleInput omitted. -/** - * deserializeAws_json1_1Disk - */ -const de_Disk = (output: any, context: __SerdeContext): Disk => { - return { - DiskAllocationResource: __expectString(output.DiskAllocationResource), - DiskAllocationType: __expectString(output.DiskAllocationType), - DiskAttributeList: - output.DiskAttributeList != null ? de_DiskAttributeList(output.DiskAttributeList, context) : undefined, - DiskId: __expectString(output.DiskId), - DiskNode: __expectString(output.DiskNode), - DiskPath: __expectString(output.DiskPath), - DiskSizeInBytes: __expectLong(output.DiskSizeInBytes), - DiskStatus: __expectString(output.DiskStatus), - } as any; -}; +// se_UpdateVTLDeviceTypeInput omitted. -/** - * deserializeAws_json1_1DiskAttributeList - */ -const de_DiskAttributeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_UserList omitted. -/** - * deserializeAws_json1_1DiskIds - */ -const de_DiskIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_VolumeARNs omitted. -/** - * deserializeAws_json1_1Disks - */ -const de_Disks = (output: any, context: __SerdeContext): Disk[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Disk(entry, context); - }); - return retVal; -}; +// se_VTLDeviceARNs omitted. -/** - * deserializeAws_json1_1EndpointNetworkConfiguration - */ -const de_EndpointNetworkConfiguration = (output: any, context: __SerdeContext): EndpointNetworkConfiguration => { - return { - IpAddresses: output.IpAddresses != null ? de_IpAddressList(output.IpAddresses, context) : undefined, - } as any; -}; +// de_ActivateGatewayOutput omitted. -/** - * deserializeAws_json1_1errorDetails - */ -const de_errorDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AddCacheOutput omitted. -/** - * deserializeAws_json1_1FileShareClientList - */ -const de_FileShareClientList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AddTagsToResourceOutput omitted. -/** - * deserializeAws_json1_1FileShareInfo - */ -const de_FileShareInfo = (output: any, context: __SerdeContext): FileShareInfo => { - return { - FileShareARN: __expectString(output.FileShareARN), - FileShareId: __expectString(output.FileShareId), - FileShareStatus: __expectString(output.FileShareStatus), - FileShareType: __expectString(output.FileShareType), - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_AddUploadBufferOutput omitted. -/** - * deserializeAws_json1_1FileShareInfoList - */ -const de_FileShareInfoList = (output: any, context: __SerdeContext): FileShareInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileShareInfo(entry, context); - }); - return retVal; -}; +// de_AddWorkingStorageOutput omitted. -/** - * deserializeAws_json1_1FileSystemAssociationInfo - */ -const de_FileSystemAssociationInfo = (output: any, context: __SerdeContext): FileSystemAssociationInfo => { - return { - AuditDestinationARN: __expectString(output.AuditDestinationARN), - CacheAttributes: output.CacheAttributes != null ? de_CacheAttributes(output.CacheAttributes, context) : undefined, - EndpointNetworkConfiguration: - output.EndpointNetworkConfiguration != null - ? de_EndpointNetworkConfiguration(output.EndpointNetworkConfiguration, context) - : undefined, - FileSystemAssociationARN: __expectString(output.FileSystemAssociationARN), - FileSystemAssociationStatus: __expectString(output.FileSystemAssociationStatus), - FileSystemAssociationStatusDetails: - output.FileSystemAssociationStatusDetails != null - ? de_FileSystemAssociationStatusDetails(output.FileSystemAssociationStatusDetails, context) - : undefined, - GatewayARN: __expectString(output.GatewayARN), - LocationARN: __expectString(output.LocationARN), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FileSystemAssociationInfoList - */ -const de_FileSystemAssociationInfoList = (output: any, context: __SerdeContext): FileSystemAssociationInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileSystemAssociationInfo(entry, context); - }); - return retVal; -}; +// de_AssignTapePoolOutput omitted. -/** - * deserializeAws_json1_1FileSystemAssociationStatusDetail - */ -const de_FileSystemAssociationStatusDetail = ( - output: any, - context: __SerdeContext -): FileSystemAssociationStatusDetail => { - return { - ErrorCode: __expectString(output.ErrorCode), - } as any; -}; +// de_AssociateFileSystemOutput omitted. -/** - * deserializeAws_json1_1FileSystemAssociationStatusDetails - */ -const de_FileSystemAssociationStatusDetails = ( - output: any, - context: __SerdeContext -): FileSystemAssociationStatusDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileSystemAssociationStatusDetail(entry, context); - }); - return retVal; -}; +// de_AttachVolumeOutput omitted. -/** - * deserializeAws_json1_1FileSystemAssociationSummary - */ -const de_FileSystemAssociationSummary = (output: any, context: __SerdeContext): FileSystemAssociationSummary => { - return { - FileSystemAssociationARN: __expectString(output.FileSystemAssociationARN), - FileSystemAssociationId: __expectString(output.FileSystemAssociationId), - FileSystemAssociationStatus: __expectString(output.FileSystemAssociationStatus), - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_AutomaticTapeCreationPolicyInfo omitted. -/** - * deserializeAws_json1_1FileSystemAssociationSummaryList - */ -const de_FileSystemAssociationSummaryList = (output: any, context: __SerdeContext): FileSystemAssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FileSystemAssociationSummary(entry, context); - }); - return retVal; -}; +// de_AutomaticTapeCreationPolicyInfos omitted. -/** - * deserializeAws_json1_1GatewayInfo - */ -const de_GatewayInfo = (output: any, context: __SerdeContext): GatewayInfo => { - return { - Ec2InstanceId: __expectString(output.Ec2InstanceId), - Ec2InstanceRegion: __expectString(output.Ec2InstanceRegion), - GatewayARN: __expectString(output.GatewayARN), - GatewayId: __expectString(output.GatewayId), - GatewayName: __expectString(output.GatewayName), - GatewayOperationalState: __expectString(output.GatewayOperationalState), - GatewayType: __expectString(output.GatewayType), - HostEnvironment: __expectString(output.HostEnvironment), - HostEnvironmentId: __expectString(output.HostEnvironmentId), - } as any; -}; +// de_AutomaticTapeCreationRule omitted. -/** - * deserializeAws_json1_1GatewayNetworkInterfaces - */ -const de_GatewayNetworkInterfaces = (output: any, context: __SerdeContext): NetworkInterface[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkInterface(entry, context); - }); - return retVal; -}; +// de_AutomaticTapeCreationRules omitted. -/** - * deserializeAws_json1_1Gateways - */ -const de_Gateways = (output: any, context: __SerdeContext): GatewayInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GatewayInfo(entry, context); - }); - return retVal; -}; +// de_BandwidthRateLimitInterval omitted. -/** - * deserializeAws_json1_1Initiators - */ -const de_Initiators = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_BandwidthRateLimitIntervals omitted. -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - error: output.error != null ? de_StorageGatewayError(output.error, context) : undefined, - message: __expectString(output.message), - } as any; -}; +// de_CacheAttributes omitted. /** - * deserializeAws_json1_1InvalidGatewayRequestException + * deserializeAws_json1_1CachediSCSIVolume */ -const de_InvalidGatewayRequestException = (output: any, context: __SerdeContext): InvalidGatewayRequestException => { - return { - error: output.error != null ? de_StorageGatewayError(output.error, context) : undefined, - message: __expectString(output.message), - } as any; +const de_CachediSCSIVolume = (output: any, context: __SerdeContext): CachediSCSIVolume => { + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KMSKey: __expectString, + SourceSnapshotId: __expectString, + TargetName: __expectString, + VolumeARN: __expectString, + VolumeAttachmentStatus: __expectString, + VolumeId: __expectString, + VolumeProgress: __limitedParseDouble, + VolumeSizeInBytes: __expectLong, + VolumeStatus: __expectString, + VolumeType: __expectString, + VolumeUsedInBytes: __expectLong, + VolumeiSCSIAttributes: _json, + }) as any; }; /** - * deserializeAws_json1_1IpAddressList + * deserializeAws_json1_1CachediSCSIVolumes */ -const de_IpAddressList = (output: any, context: __SerdeContext): string[] => { +const de_CachediSCSIVolumes = (output: any, context: __SerdeContext): CachediSCSIVolume[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_CachediSCSIVolume(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1JoinDomainOutput - */ -const de_JoinDomainOutput = (output: any, context: __SerdeContext): JoinDomainOutput => { - return { - ActiveDirectoryStatus: __expectString(output.ActiveDirectoryStatus), - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_CancelArchivalOutput omitted. -/** - * deserializeAws_json1_1ListAutomaticTapeCreationPoliciesOutput - */ -const de_ListAutomaticTapeCreationPoliciesOutput = ( - output: any, - context: __SerdeContext -): ListAutomaticTapeCreationPoliciesOutput => { - return { - AutomaticTapeCreationPolicyInfos: - output.AutomaticTapeCreationPolicyInfos != null - ? de_AutomaticTapeCreationPolicyInfos(output.AutomaticTapeCreationPolicyInfos, context) - : undefined, - } as any; -}; +// de_CancelRetrievalOutput omitted. -/** - * deserializeAws_json1_1ListFileSharesOutput - */ -const de_ListFileSharesOutput = (output: any, context: __SerdeContext): ListFileSharesOutput => { - return { - FileShareInfoList: - output.FileShareInfoList != null ? de_FileShareInfoList(output.FileShareInfoList, context) : undefined, - Marker: __expectString(output.Marker), - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_ChapCredentials omitted. -/** - * deserializeAws_json1_1ListFileSystemAssociationsOutput - */ -const de_ListFileSystemAssociationsOutput = ( - output: any, - context: __SerdeContext -): ListFileSystemAssociationsOutput => { - return { - FileSystemAssociationSummaryList: - output.FileSystemAssociationSummaryList != null - ? de_FileSystemAssociationSummaryList(output.FileSystemAssociationSummaryList, context) - : undefined, - Marker: __expectString(output.Marker), - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_ChapInfo omitted. -/** - * deserializeAws_json1_1ListGatewaysOutput - */ -const de_ListGatewaysOutput = (output: any, context: __SerdeContext): ListGatewaysOutput => { - return { - Gateways: output.Gateways != null ? de_Gateways(output.Gateways, context) : undefined, - Marker: __expectString(output.Marker), - } as any; -}; +// de_CreateCachediSCSIVolumeOutput omitted. -/** - * deserializeAws_json1_1ListLocalDisksOutput - */ -const de_ListLocalDisksOutput = (output: any, context: __SerdeContext): ListLocalDisksOutput => { - return { - Disks: output.Disks != null ? de_Disks(output.Disks, context) : undefined, - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_CreateNFSFileShareOutput omitted. -/** - * deserializeAws_json1_1ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - Marker: __expectString(output.Marker), - ResourceARN: __expectString(output.ResourceARN), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_CreateSMBFileShareOutput omitted. -/** - * deserializeAws_json1_1ListTapePoolsOutput - */ -const de_ListTapePoolsOutput = (output: any, context: __SerdeContext): ListTapePoolsOutput => { - return { - Marker: __expectString(output.Marker), - PoolInfos: output.PoolInfos != null ? de_PoolInfos(output.PoolInfos, context) : undefined, - } as any; -}; +// de_CreateSnapshotFromVolumeRecoveryPointOutput omitted. -/** - * deserializeAws_json1_1ListTapesOutput - */ -const de_ListTapesOutput = (output: any, context: __SerdeContext): ListTapesOutput => { - return { - Marker: __expectString(output.Marker), - TapeInfos: output.TapeInfos != null ? de_TapeInfos(output.TapeInfos, context) : undefined, - } as any; -}; +// de_CreateSnapshotOutput omitted. -/** - * deserializeAws_json1_1ListVolumeInitiatorsOutput - */ -const de_ListVolumeInitiatorsOutput = (output: any, context: __SerdeContext): ListVolumeInitiatorsOutput => { - return { - Initiators: output.Initiators != null ? de_Initiators(output.Initiators, context) : undefined, - } as any; -}; +// de_CreateStorediSCSIVolumeOutput omitted. -/** - * deserializeAws_json1_1ListVolumeRecoveryPointsOutput - */ -const de_ListVolumeRecoveryPointsOutput = (output: any, context: __SerdeContext): ListVolumeRecoveryPointsOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - VolumeRecoveryPointInfos: - output.VolumeRecoveryPointInfos != null - ? de_VolumeRecoveryPointInfos(output.VolumeRecoveryPointInfos, context) - : undefined, - } as any; -}; +// de_CreateTapePoolOutput omitted. -/** - * deserializeAws_json1_1ListVolumesOutput - */ -const de_ListVolumesOutput = (output: any, context: __SerdeContext): ListVolumesOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - Marker: __expectString(output.Marker), - VolumeInfos: output.VolumeInfos != null ? de_VolumeInfos(output.VolumeInfos, context) : undefined, - } as any; -}; +// de_CreateTapesOutput omitted. -/** - * deserializeAws_json1_1NetworkInterface - */ -const de_NetworkInterface = (output: any, context: __SerdeContext): NetworkInterface => { - return { - Ipv4Address: __expectString(output.Ipv4Address), - Ipv6Address: __expectString(output.Ipv6Address), - MacAddress: __expectString(output.MacAddress), - } as any; -}; +// de_CreateTapeWithBarcodeOutput omitted. -/** - * deserializeAws_json1_1NFSFileShareDefaults - */ -const de_NFSFileShareDefaults = (output: any, context: __SerdeContext): NFSFileShareDefaults => { - return { - DirectoryMode: __expectString(output.DirectoryMode), - FileMode: __expectString(output.FileMode), - GroupId: __expectLong(output.GroupId), - OwnerId: __expectLong(output.OwnerId), - } as any; -}; +// de_DaysOfWeek omitted. -/** - * deserializeAws_json1_1NFSFileShareInfo - */ -const de_NFSFileShareInfo = (output: any, context: __SerdeContext): NFSFileShareInfo => { - return { - AuditDestinationARN: __expectString(output.AuditDestinationARN), - BucketRegion: __expectString(output.BucketRegion), - CacheAttributes: output.CacheAttributes != null ? de_CacheAttributes(output.CacheAttributes, context) : undefined, - ClientList: output.ClientList != null ? de_FileShareClientList(output.ClientList, context) : undefined, - DefaultStorageClass: __expectString(output.DefaultStorageClass), - FileShareARN: __expectString(output.FileShareARN), - FileShareId: __expectString(output.FileShareId), - FileShareName: __expectString(output.FileShareName), - FileShareStatus: __expectString(output.FileShareStatus), - GatewayARN: __expectString(output.GatewayARN), - GuessMIMETypeEnabled: __expectBoolean(output.GuessMIMETypeEnabled), - KMSEncrypted: __expectBoolean(output.KMSEncrypted), - KMSKey: __expectString(output.KMSKey), - LocationARN: __expectString(output.LocationARN), - NFSFileShareDefaults: - output.NFSFileShareDefaults != null ? de_NFSFileShareDefaults(output.NFSFileShareDefaults, context) : undefined, - NotificationPolicy: __expectString(output.NotificationPolicy), - ObjectACL: __expectString(output.ObjectACL), - Path: __expectString(output.Path), - ReadOnly: __expectBoolean(output.ReadOnly), - RequesterPays: __expectBoolean(output.RequesterPays), - Role: __expectString(output.Role), - Squash: __expectString(output.Squash), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VPCEndpointDNSName: __expectString(output.VPCEndpointDNSName), - } as any; -}; - -/** - * deserializeAws_json1_1NFSFileShareInfoList - */ -const de_NFSFileShareInfoList = (output: any, context: __SerdeContext): NFSFileShareInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NFSFileShareInfo(entry, context); - }); - return retVal; -}; +// de_DeleteAutomaticTapeCreationPolicyOutput omitted. -/** - * deserializeAws_json1_1NotifyWhenUploadedOutput - */ -const de_NotifyWhenUploadedOutput = (output: any, context: __SerdeContext): NotifyWhenUploadedOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - NotificationId: __expectString(output.NotificationId), - } as any; -}; +// de_DeleteBandwidthRateLimitOutput omitted. -/** - * deserializeAws_json1_1PoolInfo - */ -const de_PoolInfo = (output: any, context: __SerdeContext): PoolInfo => { - return { - PoolARN: __expectString(output.PoolARN), - PoolName: __expectString(output.PoolName), - PoolStatus: __expectString(output.PoolStatus), - RetentionLockTimeInDays: __expectInt32(output.RetentionLockTimeInDays), - RetentionLockType: __expectString(output.RetentionLockType), - StorageClass: __expectString(output.StorageClass), - } as any; -}; +// de_DeleteChapCredentialsOutput omitted. -/** - * deserializeAws_json1_1PoolInfos - */ -const de_PoolInfos = (output: any, context: __SerdeContext): PoolInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PoolInfo(entry, context); - }); - return retVal; -}; +// de_DeleteFileShareOutput omitted. -/** - * deserializeAws_json1_1RefreshCacheOutput - */ -const de_RefreshCacheOutput = (output: any, context: __SerdeContext): RefreshCacheOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - NotificationId: __expectString(output.NotificationId), - } as any; -}; +// de_DeleteGatewayOutput omitted. -/** - * deserializeAws_json1_1RemoveTagsFromResourceOutput - */ -const de_RemoveTagsFromResourceOutput = (output: any, context: __SerdeContext): RemoveTagsFromResourceOutput => { - return { - ResourceARN: __expectString(output.ResourceARN), - } as any; -}; +// de_DeleteSnapshotScheduleOutput omitted. -/** - * deserializeAws_json1_1ResetCacheOutput - */ -const de_ResetCacheOutput = (output: any, context: __SerdeContext): ResetCacheOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_DeleteTapeArchiveOutput omitted. -/** - * deserializeAws_json1_1RetrieveTapeArchiveOutput - */ -const de_RetrieveTapeArchiveOutput = (output: any, context: __SerdeContext): RetrieveTapeArchiveOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; +// de_DeleteTapeOutput omitted. -/** - * deserializeAws_json1_1RetrieveTapeRecoveryPointOutput - */ -const de_RetrieveTapeRecoveryPointOutput = (output: any, context: __SerdeContext): RetrieveTapeRecoveryPointOutput => { - return { - TapeARN: __expectString(output.TapeARN), - } as any; -}; +// de_DeleteTapePoolOutput omitted. -/** - * deserializeAws_json1_1ServiceUnavailableError - */ -const de_ServiceUnavailableError = (output: any, context: __SerdeContext): ServiceUnavailableError => { - return { - error: output.error != null ? de_StorageGatewayError(output.error, context) : undefined, - message: __expectString(output.message), - } as any; -}; +// de_DeleteVolumeOutput omitted. /** - * deserializeAws_json1_1SetLocalConsolePasswordOutput + * deserializeAws_json1_1DescribeAvailabilityMonitorTestOutput */ -const de_SetLocalConsolePasswordOutput = (output: any, context: __SerdeContext): SetLocalConsolePasswordOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; +const de_DescribeAvailabilityMonitorTestOutput = ( + output: any, + context: __SerdeContext +): DescribeAvailabilityMonitorTestOutput => { + return take(output, { + GatewayARN: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; }; +// de_DescribeBandwidthRateLimitOutput omitted. + +// de_DescribeBandwidthRateLimitScheduleOutput omitted. + /** - * deserializeAws_json1_1SetSMBGuestPasswordOutput + * deserializeAws_json1_1DescribeCachediSCSIVolumesOutput */ -const de_SetSMBGuestPasswordOutput = (output: any, context: __SerdeContext): SetSMBGuestPasswordOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; +const de_DescribeCachediSCSIVolumesOutput = ( + output: any, + context: __SerdeContext +): DescribeCachediSCSIVolumesOutput => { + return take(output, { + CachediSCSIVolumes: (_: any) => de_CachediSCSIVolumes(_, context), + }) as any; }; /** - * deserializeAws_json1_1ShutdownGatewayOutput + * deserializeAws_json1_1DescribeCacheOutput */ -const de_ShutdownGatewayOutput = (output: any, context: __SerdeContext): ShutdownGatewayOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; +const de_DescribeCacheOutput = (output: any, context: __SerdeContext): DescribeCacheOutput => { + return take(output, { + CacheAllocatedInBytes: __expectLong, + CacheDirtyPercentage: __limitedParseDouble, + CacheHitPercentage: __limitedParseDouble, + CacheMissPercentage: __limitedParseDouble, + CacheUsedPercentage: __limitedParseDouble, + DiskIds: _json, + GatewayARN: __expectString, + }) as any; }; +// de_DescribeChapCredentialsOutput omitted. + +// de_DescribeFileSystemAssociationsOutput omitted. + +// de_DescribeGatewayInformationOutput omitted. + +// de_DescribeMaintenanceStartTimeOutput omitted. + +// de_DescribeNFSFileSharesOutput omitted. + +// de_DescribeSMBFileSharesOutput omitted. + +// de_DescribeSMBSettingsOutput omitted. + +// de_DescribeSnapshotScheduleOutput omitted. + /** - * deserializeAws_json1_1SMBFileShareInfo + * deserializeAws_json1_1DescribeStorediSCSIVolumesOutput */ -const de_SMBFileShareInfo = (output: any, context: __SerdeContext): SMBFileShareInfo => { - return { - AccessBasedEnumeration: __expectBoolean(output.AccessBasedEnumeration), - AdminUserList: output.AdminUserList != null ? de_UserList(output.AdminUserList, context) : undefined, - AuditDestinationARN: __expectString(output.AuditDestinationARN), - Authentication: __expectString(output.Authentication), - BucketRegion: __expectString(output.BucketRegion), - CacheAttributes: output.CacheAttributes != null ? de_CacheAttributes(output.CacheAttributes, context) : undefined, - CaseSensitivity: __expectString(output.CaseSensitivity), - DefaultStorageClass: __expectString(output.DefaultStorageClass), - FileShareARN: __expectString(output.FileShareARN), - FileShareId: __expectString(output.FileShareId), - FileShareName: __expectString(output.FileShareName), - FileShareStatus: __expectString(output.FileShareStatus), - GatewayARN: __expectString(output.GatewayARN), - GuessMIMETypeEnabled: __expectBoolean(output.GuessMIMETypeEnabled), - InvalidUserList: output.InvalidUserList != null ? de_UserList(output.InvalidUserList, context) : undefined, - KMSEncrypted: __expectBoolean(output.KMSEncrypted), - KMSKey: __expectString(output.KMSKey), - LocationARN: __expectString(output.LocationARN), - NotificationPolicy: __expectString(output.NotificationPolicy), - ObjectACL: __expectString(output.ObjectACL), - OplocksEnabled: __expectBoolean(output.OplocksEnabled), - Path: __expectString(output.Path), - ReadOnly: __expectBoolean(output.ReadOnly), - RequesterPays: __expectBoolean(output.RequesterPays), - Role: __expectString(output.Role), - SMBACLEnabled: __expectBoolean(output.SMBACLEnabled), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - VPCEndpointDNSName: __expectString(output.VPCEndpointDNSName), - ValidUserList: output.ValidUserList != null ? de_UserList(output.ValidUserList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SMBFileShareInfoList - */ -const de_SMBFileShareInfoList = (output: any, context: __SerdeContext): SMBFileShareInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SMBFileShareInfo(entry, context); - }); - return retVal; +const de_DescribeStorediSCSIVolumesOutput = ( + output: any, + context: __SerdeContext +): DescribeStorediSCSIVolumesOutput => { + return take(output, { + StorediSCSIVolumes: (_: any) => de_StorediSCSIVolumes(_, context), + }) as any; }; /** - * deserializeAws_json1_1SMBLocalGroups + * deserializeAws_json1_1DescribeTapeArchivesOutput */ -const de_SMBLocalGroups = (output: any, context: __SerdeContext): SMBLocalGroups => { - return { - GatewayAdmins: output.GatewayAdmins != null ? de_UserList(output.GatewayAdmins, context) : undefined, - } as any; +const de_DescribeTapeArchivesOutput = (output: any, context: __SerdeContext): DescribeTapeArchivesOutput => { + return take(output, { + Marker: __expectString, + TapeArchives: (_: any) => de_TapeArchives(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartAvailabilityMonitorTestOutput + * deserializeAws_json1_1DescribeTapeRecoveryPointsOutput */ -const de_StartAvailabilityMonitorTestOutput = ( +const de_DescribeTapeRecoveryPointsOutput = ( output: any, context: __SerdeContext -): StartAvailabilityMonitorTestOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; +): DescribeTapeRecoveryPointsOutput => { + return take(output, { + GatewayARN: __expectString, + Marker: __expectString, + TapeRecoveryPointInfos: (_: any) => de_TapeRecoveryPointInfos(_, context), + }) as any; }; /** - * deserializeAws_json1_1StartGatewayOutput + * deserializeAws_json1_1DescribeTapesOutput */ -const de_StartGatewayOutput = (output: any, context: __SerdeContext): StartGatewayOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; +const de_DescribeTapesOutput = (output: any, context: __SerdeContext): DescribeTapesOutput => { + return take(output, { + Marker: __expectString, + Tapes: (_: any) => de_Tapes(_, context), + }) as any; }; +// de_DescribeUploadBufferOutput omitted. + +// de_DescribeVTLDevicesOutput omitted. + +// de_DescribeWorkingStorageOutput omitted. + +// de_DetachVolumeOutput omitted. + +// de_DeviceiSCSIAttributes omitted. + +// de_DisableGatewayOutput omitted. + +// de_DisassociateFileSystemOutput omitted. + +// de_Disk omitted. + +// de_DiskAttributeList omitted. + +// de_DiskIds omitted. + +// de_Disks omitted. + +// de_EndpointNetworkConfiguration omitted. + +// de_errorDetails omitted. + +// de_FileShareClientList omitted. + +// de_FileShareInfo omitted. + +// de_FileShareInfoList omitted. + +// de_FileSystemAssociationInfo omitted. + +// de_FileSystemAssociationInfoList omitted. + +// de_FileSystemAssociationStatusDetail omitted. + +// de_FileSystemAssociationStatusDetails omitted. + +// de_FileSystemAssociationSummary omitted. + +// de_FileSystemAssociationSummaryList omitted. + +// de_GatewayInfo omitted. + +// de_GatewayNetworkInterfaces omitted. + +// de_Gateways omitted. + +// de_Initiators omitted. + +// de_InternalServerError omitted. + +// de_InvalidGatewayRequestException omitted. + +// de_IpAddressList omitted. + +// de_JoinDomainOutput omitted. + +// de_ListAutomaticTapeCreationPoliciesOutput omitted. + +// de_ListFileSharesOutput omitted. + +// de_ListFileSystemAssociationsOutput omitted. + +// de_ListGatewaysOutput omitted. + +// de_ListLocalDisksOutput omitted. + +// de_ListTagsForResourceOutput omitted. + +// de_ListTapePoolsOutput omitted. + /** - * deserializeAws_json1_1StorageGatewayError + * deserializeAws_json1_1ListTapesOutput */ -const de_StorageGatewayError = (output: any, context: __SerdeContext): StorageGatewayError => { - return { - errorCode: __expectString(output.errorCode), - errorDetails: output.errorDetails != null ? de_errorDetails(output.errorDetails, context) : undefined, - } as any; +const de_ListTapesOutput = (output: any, context: __SerdeContext): ListTapesOutput => { + return take(output, { + Marker: __expectString, + TapeInfos: (_: any) => de_TapeInfos(_, context), + }) as any; }; +// de_ListVolumeInitiatorsOutput omitted. + +// de_ListVolumeRecoveryPointsOutput omitted. + +// de_ListVolumesOutput omitted. + +// de_NetworkInterface omitted. + +// de_NFSFileShareDefaults omitted. + +// de_NFSFileShareInfo omitted. + +// de_NFSFileShareInfoList omitted. + +// de_NotifyWhenUploadedOutput omitted. + +// de_PoolInfo omitted. + +// de_PoolInfos omitted. + +// de_RefreshCacheOutput omitted. + +// de_RemoveTagsFromResourceOutput omitted. + +// de_ResetCacheOutput omitted. + +// de_RetrieveTapeArchiveOutput omitted. + +// de_RetrieveTapeRecoveryPointOutput omitted. + +// de_ServiceUnavailableError omitted. + +// de_SetLocalConsolePasswordOutput omitted. + +// de_SetSMBGuestPasswordOutput omitted. + +// de_ShutdownGatewayOutput omitted. + +// de_SMBFileShareInfo omitted. + +// de_SMBFileShareInfoList omitted. + +// de_SMBLocalGroups omitted. + +// de_StartAvailabilityMonitorTestOutput omitted. + +// de_StartGatewayOutput omitted. + +// de_StorageGatewayError omitted. + /** * deserializeAws_json1_1StorediSCSIVolume */ const de_StorediSCSIVolume = (output: any, context: __SerdeContext): StorediSCSIVolume => { - return { - CreatedDate: - output.CreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedDate))) - : undefined, - KMSKey: __expectString(output.KMSKey), - PreservedExistingData: __expectBoolean(output.PreservedExistingData), - SourceSnapshotId: __expectString(output.SourceSnapshotId), - TargetName: __expectString(output.TargetName), - VolumeARN: __expectString(output.VolumeARN), - VolumeAttachmentStatus: __expectString(output.VolumeAttachmentStatus), - VolumeDiskId: __expectString(output.VolumeDiskId), - VolumeId: __expectString(output.VolumeId), - VolumeProgress: __limitedParseDouble(output.VolumeProgress), - VolumeSizeInBytes: __expectLong(output.VolumeSizeInBytes), - VolumeStatus: __expectString(output.VolumeStatus), - VolumeType: __expectString(output.VolumeType), - VolumeUsedInBytes: __expectLong(output.VolumeUsedInBytes), - VolumeiSCSIAttributes: - output.VolumeiSCSIAttributes != null - ? de_VolumeiSCSIAttributes(output.VolumeiSCSIAttributes, context) - : undefined, - } as any; + return take(output, { + CreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KMSKey: __expectString, + PreservedExistingData: __expectBoolean, + SourceSnapshotId: __expectString, + TargetName: __expectString, + VolumeARN: __expectString, + VolumeAttachmentStatus: __expectString, + VolumeDiskId: __expectString, + VolumeId: __expectString, + VolumeProgress: __limitedParseDouble, + VolumeSizeInBytes: __expectLong, + VolumeStatus: __expectString, + VolumeType: __expectString, + VolumeUsedInBytes: __expectLong, + VolumeiSCSIAttributes: _json, + }) as any; }; /** @@ -9107,115 +6622,57 @@ const de_StorediSCSIVolumes = (output: any, context: __SerdeContext): StorediSCS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StorediSCSIVolume(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SupportedGatewayCapacities - */ -const de_SupportedGatewayCapacities = (output: any, context: __SerdeContext): (GatewayCapacity | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SupportedGatewayCapacities omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. /** * deserializeAws_json1_1Tape */ const de_Tape = (output: any, context: __SerdeContext): Tape => { - return { - KMSKey: __expectString(output.KMSKey), - PoolEntryDate: - output.PoolEntryDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PoolEntryDate))) - : undefined, - PoolId: __expectString(output.PoolId), - Progress: __limitedParseDouble(output.Progress), - RetentionStartDate: - output.RetentionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RetentionStartDate))) - : undefined, - TapeARN: __expectString(output.TapeARN), - TapeBarcode: __expectString(output.TapeBarcode), - TapeCreatedDate: - output.TapeCreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TapeCreatedDate))) - : undefined, - TapeSizeInBytes: __expectLong(output.TapeSizeInBytes), - TapeStatus: __expectString(output.TapeStatus), - TapeUsedInBytes: __expectLong(output.TapeUsedInBytes), - VTLDevice: __expectString(output.VTLDevice), - Worm: __expectBoolean(output.Worm), - } as any; + return take(output, { + KMSKey: __expectString, + PoolEntryDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PoolId: __expectString, + Progress: __limitedParseDouble, + RetentionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TapeARN: __expectString, + TapeBarcode: __expectString, + TapeCreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TapeSizeInBytes: __expectLong, + TapeStatus: __expectString, + TapeUsedInBytes: __expectLong, + VTLDevice: __expectString, + Worm: __expectBoolean, + }) as any; }; /** * deserializeAws_json1_1TapeArchive */ const de_TapeArchive = (output: any, context: __SerdeContext): TapeArchive => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - KMSKey: __expectString(output.KMSKey), - PoolEntryDate: - output.PoolEntryDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PoolEntryDate))) - : undefined, - PoolId: __expectString(output.PoolId), - RetentionStartDate: - output.RetentionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RetentionStartDate))) - : undefined, - RetrievedTo: __expectString(output.RetrievedTo), - TapeARN: __expectString(output.TapeARN), - TapeBarcode: __expectString(output.TapeBarcode), - TapeCreatedDate: - output.TapeCreatedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TapeCreatedDate))) - : undefined, - TapeSizeInBytes: __expectLong(output.TapeSizeInBytes), - TapeStatus: __expectString(output.TapeStatus), - TapeUsedInBytes: __expectLong(output.TapeUsedInBytes), - Worm: __expectBoolean(output.Worm), - } as any; + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + KMSKey: __expectString, + PoolEntryDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PoolId: __expectString, + RetentionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RetrievedTo: __expectString, + TapeARN: __expectString, + TapeBarcode: __expectString, + TapeCreatedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TapeSizeInBytes: __expectLong, + TapeStatus: __expectString, + TapeUsedInBytes: __expectLong, + Worm: __expectBoolean, + }) as any; }; /** @@ -9225,49 +6682,27 @@ const de_TapeArchives = (output: any, context: __SerdeContext): TapeArchive[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TapeArchive(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TapeARNs - */ -const de_TapeARNs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TapeARNs omitted. /** * deserializeAws_json1_1TapeInfo */ const de_TapeInfo = (output: any, context: __SerdeContext): TapeInfo => { - return { - GatewayARN: __expectString(output.GatewayARN), - PoolEntryDate: - output.PoolEntryDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PoolEntryDate))) - : undefined, - PoolId: __expectString(output.PoolId), - RetentionStartDate: - output.RetentionStartDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RetentionStartDate))) - : undefined, - TapeARN: __expectString(output.TapeARN), - TapeBarcode: __expectString(output.TapeBarcode), - TapeSizeInBytes: __expectLong(output.TapeSizeInBytes), - TapeStatus: __expectString(output.TapeStatus), - } as any; + return take(output, { + GatewayARN: __expectString, + PoolEntryDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PoolId: __expectString, + RetentionStartDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TapeARN: __expectString, + TapeBarcode: __expectString, + TapeSizeInBytes: __expectLong, + TapeStatus: __expectString, + }) as any; }; /** @@ -9277,9 +6712,6 @@ const de_TapeInfos = (output: any, context: __SerdeContext): TapeInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TapeInfo(entry, context); }); return retVal; @@ -9289,15 +6721,12 @@ const de_TapeInfos = (output: any, context: __SerdeContext): TapeInfo[] => { * deserializeAws_json1_1TapeRecoveryPointInfo */ const de_TapeRecoveryPointInfo = (output: any, context: __SerdeContext): TapeRecoveryPointInfo => { - return { - TapeARN: __expectString(output.TapeARN), - TapeRecoveryPointTime: - output.TapeRecoveryPointTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TapeRecoveryPointTime))) - : undefined, - TapeSizeInBytes: __expectLong(output.TapeSizeInBytes), - TapeStatus: __expectString(output.TapeStatus), - } as any; + return take(output, { + TapeARN: __expectString, + TapeRecoveryPointTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TapeSizeInBytes: __expectLong, + TapeStatus: __expectString, + }) as any; }; /** @@ -9307,9 +6736,6 @@ const de_TapeRecoveryPointInfos = (output: any, context: __SerdeContext): TapeRe const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TapeRecoveryPointInfo(entry, context); }); return retVal; @@ -9322,281 +6748,56 @@ const de_Tapes = (output: any, context: __SerdeContext): Tape[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Tape(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1UpdateAutomaticTapeCreationPolicyOutput - */ -const de_UpdateAutomaticTapeCreationPolicyOutput = ( - output: any, - context: __SerdeContext -): UpdateAutomaticTapeCreationPolicyOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateAutomaticTapeCreationPolicyOutput omitted. -/** - * deserializeAws_json1_1UpdateBandwidthRateLimitOutput - */ -const de_UpdateBandwidthRateLimitOutput = (output: any, context: __SerdeContext): UpdateBandwidthRateLimitOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateBandwidthRateLimitOutput omitted. -/** - * deserializeAws_json1_1UpdateBandwidthRateLimitScheduleOutput - */ -const de_UpdateBandwidthRateLimitScheduleOutput = ( - output: any, - context: __SerdeContext -): UpdateBandwidthRateLimitScheduleOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateBandwidthRateLimitScheduleOutput omitted. -/** - * deserializeAws_json1_1UpdateChapCredentialsOutput - */ -const de_UpdateChapCredentialsOutput = (output: any, context: __SerdeContext): UpdateChapCredentialsOutput => { - return { - InitiatorName: __expectString(output.InitiatorName), - TargetARN: __expectString(output.TargetARN), - } as any; -}; +// de_UpdateChapCredentialsOutput omitted. -/** - * deserializeAws_json1_1UpdateFileSystemAssociationOutput - */ -const de_UpdateFileSystemAssociationOutput = ( - output: any, - context: __SerdeContext -): UpdateFileSystemAssociationOutput => { - return { - FileSystemAssociationARN: __expectString(output.FileSystemAssociationARN), - } as any; -}; +// de_UpdateFileSystemAssociationOutput omitted. -/** - * deserializeAws_json1_1UpdateGatewayInformationOutput - */ -const de_UpdateGatewayInformationOutput = (output: any, context: __SerdeContext): UpdateGatewayInformationOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - GatewayName: __expectString(output.GatewayName), - } as any; -}; +// de_UpdateGatewayInformationOutput omitted. -/** - * deserializeAws_json1_1UpdateGatewaySoftwareNowOutput - */ -const de_UpdateGatewaySoftwareNowOutput = (output: any, context: __SerdeContext): UpdateGatewaySoftwareNowOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateGatewaySoftwareNowOutput omitted. -/** - * deserializeAws_json1_1UpdateMaintenanceStartTimeOutput - */ -const de_UpdateMaintenanceStartTimeOutput = ( - output: any, - context: __SerdeContext -): UpdateMaintenanceStartTimeOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateMaintenanceStartTimeOutput omitted. -/** - * deserializeAws_json1_1UpdateNFSFileShareOutput - */ -const de_UpdateNFSFileShareOutput = (output: any, context: __SerdeContext): UpdateNFSFileShareOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - } as any; -}; +// de_UpdateNFSFileShareOutput omitted. -/** - * deserializeAws_json1_1UpdateSMBFileShareOutput - */ -const de_UpdateSMBFileShareOutput = (output: any, context: __SerdeContext): UpdateSMBFileShareOutput => { - return { - FileShareARN: __expectString(output.FileShareARN), - } as any; -}; +// de_UpdateSMBFileShareOutput omitted. -/** - * deserializeAws_json1_1UpdateSMBFileShareVisibilityOutput - */ -const de_UpdateSMBFileShareVisibilityOutput = ( - output: any, - context: __SerdeContext -): UpdateSMBFileShareVisibilityOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateSMBFileShareVisibilityOutput omitted. -/** - * deserializeAws_json1_1UpdateSMBLocalGroupsOutput - */ -const de_UpdateSMBLocalGroupsOutput = (output: any, context: __SerdeContext): UpdateSMBLocalGroupsOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateSMBLocalGroupsOutput omitted. -/** - * deserializeAws_json1_1UpdateSMBSecurityStrategyOutput - */ -const de_UpdateSMBSecurityStrategyOutput = (output: any, context: __SerdeContext): UpdateSMBSecurityStrategyOutput => { - return { - GatewayARN: __expectString(output.GatewayARN), - } as any; -}; +// de_UpdateSMBSecurityStrategyOutput omitted. -/** - * deserializeAws_json1_1UpdateSnapshotScheduleOutput - */ -const de_UpdateSnapshotScheduleOutput = (output: any, context: __SerdeContext): UpdateSnapshotScheduleOutput => { - return { - VolumeARN: __expectString(output.VolumeARN), - } as any; -}; +// de_UpdateSnapshotScheduleOutput omitted. -/** - * deserializeAws_json1_1UpdateVTLDeviceTypeOutput - */ -const de_UpdateVTLDeviceTypeOutput = (output: any, context: __SerdeContext): UpdateVTLDeviceTypeOutput => { - return { - VTLDeviceARN: __expectString(output.VTLDeviceARN), - } as any; -}; +// de_UpdateVTLDeviceTypeOutput omitted. -/** - * deserializeAws_json1_1UserList - */ -const de_UserList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UserList omitted. -/** - * deserializeAws_json1_1VolumeInfo - */ -const de_VolumeInfo = (output: any, context: __SerdeContext): VolumeInfo => { - return { - GatewayARN: __expectString(output.GatewayARN), - GatewayId: __expectString(output.GatewayId), - VolumeARN: __expectString(output.VolumeARN), - VolumeAttachmentStatus: __expectString(output.VolumeAttachmentStatus), - VolumeId: __expectString(output.VolumeId), - VolumeSizeInBytes: __expectLong(output.VolumeSizeInBytes), - VolumeType: __expectString(output.VolumeType), - } as any; -}; +// de_VolumeInfo omitted. -/** - * deserializeAws_json1_1VolumeInfos - */ -const de_VolumeInfos = (output: any, context: __SerdeContext): VolumeInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VolumeInfo(entry, context); - }); - return retVal; -}; +// de_VolumeInfos omitted. -/** - * deserializeAws_json1_1VolumeiSCSIAttributes - */ -const de_VolumeiSCSIAttributes = (output: any, context: __SerdeContext): VolumeiSCSIAttributes => { - return { - ChapEnabled: __expectBoolean(output.ChapEnabled), - LunNumber: __expectInt32(output.LunNumber), - NetworkInterfaceId: __expectString(output.NetworkInterfaceId), - NetworkInterfacePort: __expectInt32(output.NetworkInterfacePort), - TargetARN: __expectString(output.TargetARN), - } as any; -}; +// de_VolumeiSCSIAttributes omitted. -/** - * deserializeAws_json1_1VolumeRecoveryPointInfo - */ -const de_VolumeRecoveryPointInfo = (output: any, context: __SerdeContext): VolumeRecoveryPointInfo => { - return { - VolumeARN: __expectString(output.VolumeARN), - VolumeRecoveryPointTime: __expectString(output.VolumeRecoveryPointTime), - VolumeSizeInBytes: __expectLong(output.VolumeSizeInBytes), - VolumeUsageInBytes: __expectLong(output.VolumeUsageInBytes), - } as any; -}; +// de_VolumeRecoveryPointInfo omitted. -/** - * deserializeAws_json1_1VolumeRecoveryPointInfos - */ -const de_VolumeRecoveryPointInfos = (output: any, context: __SerdeContext): VolumeRecoveryPointInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VolumeRecoveryPointInfo(entry, context); - }); - return retVal; -}; +// de_VolumeRecoveryPointInfos omitted. -/** - * deserializeAws_json1_1VTLDevice - */ -const de_VTLDevice = (output: any, context: __SerdeContext): VTLDevice => { - return { - DeviceiSCSIAttributes: - output.DeviceiSCSIAttributes != null - ? de_DeviceiSCSIAttributes(output.DeviceiSCSIAttributes, context) - : undefined, - VTLDeviceARN: __expectString(output.VTLDeviceARN), - VTLDeviceProductIdentifier: __expectString(output.VTLDeviceProductIdentifier), - VTLDeviceType: __expectString(output.VTLDeviceType), - VTLDeviceVendor: __expectString(output.VTLDeviceVendor), - } as any; -}; +// de_VTLDevice omitted. -/** - * deserializeAws_json1_1VTLDevices - */ -const de_VTLDevices = (output: any, context: __SerdeContext): VTLDevice[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_VTLDevice(entry, context); - }); - return retVal; -}; +// de_VTLDevices omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9618,6 +6819,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-sts/src/protocols/Aws_query.ts b/clients/client-sts/src/protocols/Aws_query.ts index 3a55dd66424e..9794af5ac2cf 100644 --- a/clients/client-sts/src/protocols/Aws_query.ts +++ b/clients/client-sts/src/protocols/Aws_query.ts @@ -8,7 +8,7 @@ import { getValueFromTextNode as __getValueFromTextNode, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -218,7 +218,7 @@ export const de_AssumeRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -248,10 +248,9 @@ const de_AssumeRoleCommandError = async ( throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -274,7 +273,7 @@ export const de_AssumeRoleWithSAMLCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -310,10 +309,9 @@ const de_AssumeRoleWithSAMLCommandError = async ( throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -336,7 +334,7 @@ export const de_AssumeRoleWithWebIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -375,10 +373,9 @@ const de_AssumeRoleWithWebIdentityCommandError = async ( throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -401,7 +398,7 @@ export const de_DecodeAuthorizationMessageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -422,10 +419,9 @@ const de_DecodeAuthorizationMessageCommandError = async ( throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -448,7 +444,7 @@ export const de_GetAccessKeyInfoCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -464,10 +460,9 @@ const de_GetAccessKeyInfoCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -489,7 +484,7 @@ export const de_GetCallerIdentityCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -505,10 +500,9 @@ const de_GetCallerIdentityCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -530,7 +524,7 @@ export const de_GetFederationTokenCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -557,10 +551,9 @@ const de_GetFederationTokenCommandError = async ( throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -583,7 +576,7 @@ export const de_GetSessionTokenCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -604,10 +597,9 @@ const de_GetSessionTokenCommandError = async ( throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1357,6 +1349,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-support-app/src/protocols/Aws_restJson1.ts b/clients/client-support-app/src/protocols/Aws_restJson1.ts index ce547bd3688b..7b5a12e8ea11 100644 --- a/clients/client-support-app/src/protocols/Aws_restJson1.ts +++ b/clients/client-support-app/src/protocols/Aws_restJson1.ts @@ -1,13 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, - throwDefaultError, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -52,8 +54,6 @@ import { InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, - SlackChannelConfiguration, - SlackWorkspaceConfiguration, ValidationException, } from "../models/models_0"; import { SupportAppServiceException as __BaseException } from "../models/SupportAppServiceException"; @@ -73,18 +73,18 @@ export const se_CreateSlackChannelConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/create-slack-channel-configuration"; let body: any; - body = JSON.stringify({ - ...(input.channelId != null && { channelId: input.channelId }), - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.channelRoleArn != null && { channelRoleArn: input.channelRoleArn }), - ...(input.notifyOnAddCorrespondenceToCase != null && { - notifyOnAddCorrespondenceToCase: input.notifyOnAddCorrespondenceToCase, - }), - ...(input.notifyOnCaseSeverity != null && { notifyOnCaseSeverity: input.notifyOnCaseSeverity }), - ...(input.notifyOnCreateOrReopenCase != null && { notifyOnCreateOrReopenCase: input.notifyOnCreateOrReopenCase }), - ...(input.notifyOnResolveCase != null && { notifyOnResolveCase: input.notifyOnResolveCase }), - ...(input.teamId != null && { teamId: input.teamId }), - }); + body = JSON.stringify( + take(input, { + channelId: [], + channelName: [], + channelRoleArn: [], + notifyOnAddCorrespondenceToCase: [], + notifyOnCaseSeverity: [], + notifyOnCreateOrReopenCase: [], + notifyOnResolveCase: [], + teamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -137,10 +137,12 @@ export const se_DeleteSlackChannelConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/delete-slack-channel-configuration"; let body: any; - body = JSON.stringify({ - ...(input.channelId != null && { channelId: input.channelId }), - ...(input.teamId != null && { teamId: input.teamId }), - }); + body = JSON.stringify( + take(input, { + channelId: [], + teamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -167,9 +169,11 @@ export const se_DeleteSlackWorkspaceConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/delete-slack-workspace-configuration"; let body: any; - body = JSON.stringify({ - ...(input.teamId != null && { teamId: input.teamId }), - }); + body = JSON.stringify( + take(input, { + teamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -222,9 +226,11 @@ export const se_ListSlackChannelConfigurationsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/list-slack-channel-configurations"; let body: any; - body = JSON.stringify({ - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -251,9 +257,11 @@ export const se_ListSlackWorkspaceConfigurationsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/list-slack-workspace-configurations"; let body: any; - body = JSON.stringify({ - ...(input.nextToken != null && { nextToken: input.nextToken }), - }); + body = JSON.stringify( + take(input, { + nextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -279,9 +287,11 @@ export const se_PutAccountAliasCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/put-account-alias"; let body: any; - body = JSON.stringify({ - ...(input.accountAlias != null && { accountAlias: input.accountAlias }), - }); + body = JSON.stringify( + take(input, { + accountAlias: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -308,9 +318,11 @@ export const se_RegisterSlackWorkspaceForOrganizationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/register-slack-workspace-for-organization"; let body: any; - body = JSON.stringify({ - ...(input.teamId != null && { teamId: input.teamId }), - }); + body = JSON.stringify( + take(input, { + teamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -337,18 +349,18 @@ export const se_UpdateSlackChannelConfigurationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/update-slack-channel-configuration"; let body: any; - body = JSON.stringify({ - ...(input.channelId != null && { channelId: input.channelId }), - ...(input.channelName != null && { channelName: input.channelName }), - ...(input.channelRoleArn != null && { channelRoleArn: input.channelRoleArn }), - ...(input.notifyOnAddCorrespondenceToCase != null && { - notifyOnAddCorrespondenceToCase: input.notifyOnAddCorrespondenceToCase, - }), - ...(input.notifyOnCaseSeverity != null && { notifyOnCaseSeverity: input.notifyOnCaseSeverity }), - ...(input.notifyOnCreateOrReopenCase != null && { notifyOnCreateOrReopenCase: input.notifyOnCreateOrReopenCase }), - ...(input.notifyOnResolveCase != null && { notifyOnResolveCase: input.notifyOnResolveCase }), - ...(input.teamId != null && { teamId: input.teamId }), - }); + body = JSON.stringify( + take(input, { + channelId: [], + channelName: [], + channelRoleArn: [], + notifyOnAddCorrespondenceToCase: [], + notifyOnCaseSeverity: [], + notifyOnCreateOrReopenCase: [], + notifyOnResolveCase: [], + teamId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -407,10 +419,9 @@ const de_CreateSlackChannelConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -457,10 +468,9 @@ const de_DeleteAccountAliasCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -513,10 +523,9 @@ const de_DeleteSlackChannelConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -569,10 +578,9 @@ const de_DeleteSlackWorkspaceConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -592,9 +600,10 @@ export const de_GetAccountAliasCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountAlias != null) { - contents.accountAlias = __expectString(data.accountAlias); - } + const doc = take(data, { + accountAlias: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -616,10 +625,9 @@ const de_GetAccountAliasCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -639,12 +647,11 @@ export const de_ListSlackChannelConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slackChannelConfigurations != null) { - contents.slackChannelConfigurations = de_slackChannelConfigurationList(data.slackChannelConfigurations, context); - } + const doc = take(data, { + nextToken: __expectString, + slackChannelConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -669,10 +676,9 @@ const de_ListSlackChannelConfigurationsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -692,15 +698,11 @@ export const de_ListSlackWorkspaceConfigurationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.slackWorkspaceConfigurations != null) { - contents.slackWorkspaceConfigurations = de_SlackWorkspaceConfigurationList( - data.slackWorkspaceConfigurations, - context - ); - } + const doc = take(data, { + nextToken: __expectString, + slackWorkspaceConfigurations: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -725,10 +727,9 @@ const de_ListSlackWorkspaceConfigurationsCommandError = async ( throw await de_InternalServerExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -775,10 +776,9 @@ const de_PutAccountAliasCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -798,15 +798,12 @@ export const de_RegisterSlackWorkspaceForOrganizationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.accountType != null) { - contents.accountType = __expectString(data.accountType); - } - if (data.teamId != null) { - contents.teamId = __expectString(data.teamId); - } - if (data.teamName != null) { - contents.teamName = __expectString(data.teamName); - } + const doc = take(data, { + accountType: __expectString, + teamId: __expectString, + teamName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -840,10 +837,9 @@ const de_RegisterSlackWorkspaceForOrganizationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -863,30 +859,17 @@ export const de_UpdateSlackChannelConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.channelId != null) { - contents.channelId = __expectString(data.channelId); - } - if (data.channelName != null) { - contents.channelName = __expectString(data.channelName); - } - if (data.channelRoleArn != null) { - contents.channelRoleArn = __expectString(data.channelRoleArn); - } - if (data.notifyOnAddCorrespondenceToCase != null) { - contents.notifyOnAddCorrespondenceToCase = __expectBoolean(data.notifyOnAddCorrespondenceToCase); - } - if (data.notifyOnCaseSeverity != null) { - contents.notifyOnCaseSeverity = __expectString(data.notifyOnCaseSeverity); - } - if (data.notifyOnCreateOrReopenCase != null) { - contents.notifyOnCreateOrReopenCase = __expectBoolean(data.notifyOnCreateOrReopenCase); - } - if (data.notifyOnResolveCase != null) { - contents.notifyOnResolveCase = __expectBoolean(data.notifyOnResolveCase); - } - if (data.teamId != null) { - contents.teamId = __expectString(data.teamId); - } + const doc = take(data, { + channelId: __expectString, + channelName: __expectString, + channelRoleArn: __expectString, + notifyOnAddCorrespondenceToCase: __expectBoolean, + notifyOnCaseSeverity: __expectString, + notifyOnCreateOrReopenCase: __expectBoolean, + notifyOnResolveCase: __expectBoolean, + teamId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -920,16 +903,15 @@ const de_UpdateSlackChannelConfigurationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -939,9 +921,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -955,9 +938,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -974,9 +958,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -993,9 +978,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1012,9 +998,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1028,9 +1015,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1038,62 +1026,13 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * deserializeAws_restJson1SlackChannelConfiguration - */ -const de_SlackChannelConfiguration = (output: any, context: __SerdeContext): SlackChannelConfiguration => { - return { - channelId: __expectString(output.channelId), - channelName: __expectString(output.channelName), - channelRoleArn: __expectString(output.channelRoleArn), - notifyOnAddCorrespondenceToCase: __expectBoolean(output.notifyOnAddCorrespondenceToCase), - notifyOnCaseSeverity: __expectString(output.notifyOnCaseSeverity), - notifyOnCreateOrReopenCase: __expectBoolean(output.notifyOnCreateOrReopenCase), - notifyOnResolveCase: __expectBoolean(output.notifyOnResolveCase), - teamId: __expectString(output.teamId), - } as any; -}; +// de_SlackChannelConfiguration omitted. -/** - * deserializeAws_restJson1slackChannelConfigurationList - */ -const de_slackChannelConfigurationList = (output: any, context: __SerdeContext): SlackChannelConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlackChannelConfiguration(entry, context); - }); - return retVal; -}; +// de_slackChannelConfigurationList omitted. -/** - * deserializeAws_restJson1SlackWorkspaceConfiguration - */ -const de_SlackWorkspaceConfiguration = (output: any, context: __SerdeContext): SlackWorkspaceConfiguration => { - return { - allowOrganizationMemberAccount: __expectBoolean(output.allowOrganizationMemberAccount), - teamId: __expectString(output.teamId), - teamName: __expectString(output.teamName), - } as any; -}; +// de_SlackWorkspaceConfiguration omitted. -/** - * deserializeAws_restJson1SlackWorkspaceConfigurationList - */ -const de_SlackWorkspaceConfigurationList = (output: any, context: __SerdeContext): SlackWorkspaceConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SlackWorkspaceConfiguration(entry, context); - }); - return retVal; -}; +// de_SlackWorkspaceConfigurationList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-support/src/protocols/Aws_json1_1.ts b/clients/client-support/src/protocols/Aws_json1_1.ts index 1f63a55446ae..c7679ed55032 100644 --- a/clients/client-support/src/protocols/Aws_json1_1.ts +++ b/clients/client-support/src/protocols/Aws_json1_1.ts @@ -1,12 +1,13 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -58,36 +59,24 @@ import { import { ResolveCaseCommandInput, ResolveCaseCommandOutput } from "../commands/ResolveCaseCommand"; import { AddAttachmentsToSetRequest, - AddAttachmentsToSetResponse, AddCommunicationToCaseRequest, - AddCommunicationToCaseResponse, Attachment, - AttachmentDetails, AttachmentIdNotFound, AttachmentLimitExceeded, AttachmentSetExpired, AttachmentSetIdNotFound, AttachmentSetSizeLimitExceeded, CaseCreationLimitExceeded, - CaseDetails, CaseIdNotFound, - Category, - Communication, CreateCaseRequest, - CreateCaseResponse, DescribeAttachmentLimitExceeded, DescribeAttachmentRequest, DescribeAttachmentResponse, DescribeCasesRequest, - DescribeCasesResponse, DescribeCommunicationsRequest, - DescribeCommunicationsResponse, DescribeServicesRequest, - DescribeServicesResponse, DescribeSeverityLevelsRequest, - DescribeSeverityLevelsResponse, DescribeTrustedAdvisorCheckRefreshStatusesRequest, - DescribeTrustedAdvisorCheckRefreshStatusesResponse, DescribeTrustedAdvisorCheckResultRequest, DescribeTrustedAdvisorCheckResultResponse, DescribeTrustedAdvisorChecksRequest, @@ -95,21 +84,14 @@ import { DescribeTrustedAdvisorCheckSummariesRequest, DescribeTrustedAdvisorCheckSummariesResponse, InternalServerError, - RecentCaseCommunications, RefreshTrustedAdvisorCheckRequest, - RefreshTrustedAdvisorCheckResponse, ResolveCaseRequest, - ResolveCaseResponse, - Service, - SeverityLevel, TrustedAdvisorCategorySpecificSummary, TrustedAdvisorCheckDescription, - TrustedAdvisorCheckRefreshStatus, TrustedAdvisorCheckResult, TrustedAdvisorCheckSummary, TrustedAdvisorCostOptimizingSummary, TrustedAdvisorResourceDetail, - TrustedAdvisorResourcesSummary, } from "../models/models_0"; import { SupportServiceException as __BaseException } from "../models/SupportServiceException"; @@ -135,7 +117,7 @@ export const se_AddCommunicationToCaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddCommunicationToCase"); let body: any; - body = JSON.stringify(se_AddCommunicationToCaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -148,7 +130,7 @@ export const se_CreateCaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCase"); let body: any; - body = JSON.stringify(se_CreateCaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -161,7 +143,7 @@ export const se_DescribeAttachmentCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAttachment"); let body: any; - body = JSON.stringify(se_DescribeAttachmentRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -174,7 +156,7 @@ export const se_DescribeCasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCases"); let body: any; - body = JSON.stringify(se_DescribeCasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -187,7 +169,7 @@ export const se_DescribeCommunicationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCommunications"); let body: any; - body = JSON.stringify(se_DescribeCommunicationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -200,7 +182,7 @@ export const se_DescribeServicesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServices"); let body: any; - body = JSON.stringify(se_DescribeServicesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -213,7 +195,7 @@ export const se_DescribeSeverityLevelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSeverityLevels"); let body: any; - body = JSON.stringify(se_DescribeSeverityLevelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -239,7 +221,7 @@ export const se_DescribeTrustedAdvisorCheckResultCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrustedAdvisorCheckResult"); let body: any; - body = JSON.stringify(se_DescribeTrustedAdvisorCheckResultRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -252,7 +234,7 @@ export const se_DescribeTrustedAdvisorChecksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTrustedAdvisorChecks"); let body: any; - body = JSON.stringify(se_DescribeTrustedAdvisorChecksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -278,7 +260,7 @@ export const se_RefreshTrustedAdvisorCheckCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RefreshTrustedAdvisorCheck"); let body: any; - body = JSON.stringify(se_RefreshTrustedAdvisorCheckRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -291,7 +273,7 @@ export const se_ResolveCaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResolveCase"); let body: any; - body = JSON.stringify(se_ResolveCaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -307,12 +289,12 @@ export const de_AddAttachmentsToSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddAttachmentsToSetResponse(data, context); + contents = _json(data); const response: AddAttachmentsToSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -345,10 +327,9 @@ const de_AddAttachmentsToSetCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -366,12 +347,12 @@ export const de_AddCommunicationToCaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AddCommunicationToCaseResponse(data, context); + contents = _json(data); const response: AddCommunicationToCaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -401,10 +382,9 @@ const de_AddCommunicationToCaseCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -422,12 +402,12 @@ export const de_CreateCaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateCaseResponse(data, context); + contents = _json(data); const response: CreateCaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -457,10 +437,9 @@ const de_CreateCaseCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -483,7 +462,7 @@ export const de_DescribeAttachmentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -510,10 +489,9 @@ const de_DescribeAttachmentCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -531,12 +509,12 @@ export const de_DescribeCasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCasesResponse(data, context); + contents = _json(data); const response: DescribeCasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -560,10 +538,9 @@ const de_DescribeCasesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -581,12 +558,12 @@ export const de_DescribeCommunicationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCommunicationsResponse(data, context); + contents = _json(data); const response: DescribeCommunicationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -610,10 +587,9 @@ const de_DescribeCommunicationsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -631,12 +607,12 @@ export const de_DescribeServicesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeServicesResponse(data, context); + contents = _json(data); const response: DescribeServicesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -657,10 +633,9 @@ const de_DescribeServicesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -678,12 +653,12 @@ export const de_DescribeSeverityLevelsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSeverityLevelsResponse(data, context); + contents = _json(data); const response: DescribeSeverityLevelsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -704,10 +679,9 @@ const de_DescribeSeverityLevelsCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -725,12 +699,12 @@ export const de_DescribeTrustedAdvisorCheckRefreshStatusesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTrustedAdvisorCheckRefreshStatusesResponse(data, context); + contents = _json(data); const response: DescribeTrustedAdvisorCheckRefreshStatusesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -751,10 +725,9 @@ const de_DescribeTrustedAdvisorCheckRefreshStatusesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -777,7 +750,7 @@ export const de_DescribeTrustedAdvisorCheckResultCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -798,10 +771,9 @@ const de_DescribeTrustedAdvisorCheckResultCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -824,7 +796,7 @@ export const de_DescribeTrustedAdvisorChecksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -845,10 +817,9 @@ const de_DescribeTrustedAdvisorChecksCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -871,7 +842,7 @@ export const de_DescribeTrustedAdvisorCheckSummariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -892,10 +863,9 @@ const de_DescribeTrustedAdvisorCheckSummariesCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -913,12 +883,12 @@ export const de_RefreshTrustedAdvisorCheckCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RefreshTrustedAdvisorCheckResponse(data, context); + contents = _json(data); const response: RefreshTrustedAdvisorCheckCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -939,10 +909,9 @@ const de_RefreshTrustedAdvisorCheckCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -960,12 +929,12 @@ export const de_ResolveCaseCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResolveCaseResponse(data, context); + contents = _json(data); const response: ResolveCaseCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -989,10 +958,9 @@ const de_ResolveCaseCommandError = async ( throw await de_InternalServerErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1006,7 +974,7 @@ const de_AttachmentIdNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AttachmentIdNotFound(body, context); + const deserialized: any = _json(body); const exception = new AttachmentIdNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1022,7 +990,7 @@ const de_AttachmentLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AttachmentLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new AttachmentLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1038,7 +1006,7 @@ const de_AttachmentSetExpiredRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AttachmentSetExpired(body, context); + const deserialized: any = _json(body); const exception = new AttachmentSetExpired({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1054,7 +1022,7 @@ const de_AttachmentSetIdNotFoundRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AttachmentSetIdNotFound(body, context); + const deserialized: any = _json(body); const exception = new AttachmentSetIdNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1070,7 +1038,7 @@ const de_AttachmentSetSizeLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AttachmentSetSizeLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new AttachmentSetSizeLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1086,7 +1054,7 @@ const de_CaseCreationLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CaseCreationLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new CaseCreationLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1099,7 +1067,7 @@ const de_CaseCreationLimitExceededRes = async ( */ const de_CaseIdNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_CaseIdNotFound(body, context); + const deserialized: any = _json(body); const exception = new CaseIdNotFound({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1115,7 +1083,7 @@ const de_DescribeAttachmentLimitExceededRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DescribeAttachmentLimitExceeded(body, context); + const deserialized: any = _json(body); const exception = new DescribeAttachmentLimitExceeded({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1128,7 +1096,7 @@ const de_DescribeAttachmentLimitExceededRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1140,32 +1108,22 @@ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_1AddAttachmentsToSetRequest */ const se_AddAttachmentsToSetRequest = (input: AddAttachmentsToSetRequest, context: __SerdeContext): any => { - return { - ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }), - ...(input.attachments != null && { attachments: se_Attachments(input.attachments, context) }), - }; + return take(input, { + attachmentSetId: [], + attachments: (_) => se_Attachments(_, context), + }); }; -/** - * serializeAws_json1_1AddCommunicationToCaseRequest - */ -const se_AddCommunicationToCaseRequest = (input: AddCommunicationToCaseRequest, context: __SerdeContext): any => { - return { - ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }), - ...(input.caseId != null && { caseId: input.caseId }), - ...(input.ccEmailAddresses != null && { ccEmailAddresses: se_CcEmailAddressList(input.ccEmailAddresses, context) }), - ...(input.communicationBody != null && { communicationBody: input.communicationBody }), - }; -}; +// se_AddCommunicationToCaseRequest omitted. /** * serializeAws_json1_1Attachment */ const se_Attachment = (input: Attachment, context: __SerdeContext): any => { - return { - ...(input.data != null && { data: context.base64Encoder(input.data) }), - ...(input.fileName != null && { fileName: input.fileName }), - }; + return take(input, { + data: context.base64Encoder, + fileName: [], + }); }; /** @@ -1179,102 +1137,21 @@ const se_Attachments = (input: Attachment[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_json1_1CaseIdList - */ -const se_CaseIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CaseIdList omitted. -/** - * serializeAws_json1_1CcEmailAddressList - */ -const se_CcEmailAddressList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CcEmailAddressList omitted. -/** - * serializeAws_json1_1CreateCaseRequest - */ -const se_CreateCaseRequest = (input: CreateCaseRequest, context: __SerdeContext): any => { - return { - ...(input.attachmentSetId != null && { attachmentSetId: input.attachmentSetId }), - ...(input.categoryCode != null && { categoryCode: input.categoryCode }), - ...(input.ccEmailAddresses != null && { ccEmailAddresses: se_CcEmailAddressList(input.ccEmailAddresses, context) }), - ...(input.communicationBody != null && { communicationBody: input.communicationBody }), - ...(input.issueType != null && { issueType: input.issueType }), - ...(input.language != null && { language: input.language }), - ...(input.serviceCode != null && { serviceCode: input.serviceCode }), - ...(input.severityCode != null && { severityCode: input.severityCode }), - ...(input.subject != null && { subject: input.subject }), - }; -}; +// se_CreateCaseRequest omitted. -/** - * serializeAws_json1_1DescribeAttachmentRequest - */ -const se_DescribeAttachmentRequest = (input: DescribeAttachmentRequest, context: __SerdeContext): any => { - return { - ...(input.attachmentId != null && { attachmentId: input.attachmentId }), - }; -}; +// se_DescribeAttachmentRequest omitted. -/** - * serializeAws_json1_1DescribeCasesRequest - */ -const se_DescribeCasesRequest = (input: DescribeCasesRequest, context: __SerdeContext): any => { - return { - ...(input.afterTime != null && { afterTime: input.afterTime }), - ...(input.beforeTime != null && { beforeTime: input.beforeTime }), - ...(input.caseIdList != null && { caseIdList: se_CaseIdList(input.caseIdList, context) }), - ...(input.displayId != null && { displayId: input.displayId }), - ...(input.includeCommunications != null && { includeCommunications: input.includeCommunications }), - ...(input.includeResolvedCases != null && { includeResolvedCases: input.includeResolvedCases }), - ...(input.language != null && { language: input.language }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeCasesRequest omitted. -/** - * serializeAws_json1_1DescribeCommunicationsRequest - */ -const se_DescribeCommunicationsRequest = (input: DescribeCommunicationsRequest, context: __SerdeContext): any => { - return { - ...(input.afterTime != null && { afterTime: input.afterTime }), - ...(input.beforeTime != null && { beforeTime: input.beforeTime }), - ...(input.caseId != null && { caseId: input.caseId }), - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - }; -}; +// se_DescribeCommunicationsRequest omitted. -/** - * serializeAws_json1_1DescribeServicesRequest - */ -const se_DescribeServicesRequest = (input: DescribeServicesRequest, context: __SerdeContext): any => { - return { - ...(input.language != null && { language: input.language }), - ...(input.serviceCodeList != null && { serviceCodeList: se_ServiceCodeList(input.serviceCodeList, context) }), - }; -}; +// se_DescribeServicesRequest omitted. -/** - * serializeAws_json1_1DescribeSeverityLevelsRequest - */ -const se_DescribeSeverityLevelsRequest = (input: DescribeSeverityLevelsRequest, context: __SerdeContext): any => { - return { - ...(input.language != null && { language: input.language }), - }; -}; +// se_DescribeSeverityLevelsRequest omitted. /** * serializeAws_json1_1DescribeTrustedAdvisorCheckRefreshStatusesRequest @@ -1283,35 +1160,14 @@ const se_DescribeTrustedAdvisorCheckRefreshStatusesRequest = ( input: DescribeTrustedAdvisorCheckRefreshStatusesRequest, context: __SerdeContext ): any => { - return { - ...(input.checkIds != null && { checkIds: se_StringList(input.checkIds, context) }), - }; + return take(input, { + checkIds: (_) => se_StringList(_, context), + }); }; -/** - * serializeAws_json1_1DescribeTrustedAdvisorCheckResultRequest - */ -const se_DescribeTrustedAdvisorCheckResultRequest = ( - input: DescribeTrustedAdvisorCheckResultRequest, - context: __SerdeContext -): any => { - return { - ...(input.checkId != null && { checkId: input.checkId }), - ...(input.language != null && { language: input.language }), - }; -}; +// se_DescribeTrustedAdvisorCheckResultRequest omitted. -/** - * serializeAws_json1_1DescribeTrustedAdvisorChecksRequest - */ -const se_DescribeTrustedAdvisorChecksRequest = ( - input: DescribeTrustedAdvisorChecksRequest, - context: __SerdeContext -): any => { - return { - ...(input.language != null && { language: input.language }), - }; -}; +// se_DescribeTrustedAdvisorChecksRequest omitted. /** * serializeAws_json1_1DescribeTrustedAdvisorCheckSummariesRequest @@ -1320,355 +1176,92 @@ const se_DescribeTrustedAdvisorCheckSummariesRequest = ( input: DescribeTrustedAdvisorCheckSummariesRequest, context: __SerdeContext ): any => { - return { - ...(input.checkIds != null && { checkIds: se_StringList(input.checkIds, context) }), - }; + return take(input, { + checkIds: (_) => se_StringList(_, context), + }); }; -/** - * serializeAws_json1_1RefreshTrustedAdvisorCheckRequest - */ -const se_RefreshTrustedAdvisorCheckRequest = ( - input: RefreshTrustedAdvisorCheckRequest, - context: __SerdeContext -): any => { - return { - ...(input.checkId != null && { checkId: input.checkId }), - }; -}; +// se_RefreshTrustedAdvisorCheckRequest omitted. -/** - * serializeAws_json1_1ResolveCaseRequest - */ -const se_ResolveCaseRequest = (input: ResolveCaseRequest, context: __SerdeContext): any => { - return { - ...(input.caseId != null && { caseId: input.caseId }), - }; -}; +// se_ResolveCaseRequest omitted. -/** - * serializeAws_json1_1ServiceCodeList - */ -const se_ServiceCodeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ServiceCodeList omitted. /** * serializeAws_json1_1StringList */ const se_StringList = (input: string[], context: __SerdeContext): any => { - return input.map((entry) => { - if (entry === null) { - return null as any; - } - return entry; - }); + return input; }; -/** - * deserializeAws_json1_1AddAttachmentsToSetResponse - */ -const de_AddAttachmentsToSetResponse = (output: any, context: __SerdeContext): AddAttachmentsToSetResponse => { - return { - attachmentSetId: __expectString(output.attachmentSetId), - expiryTime: __expectString(output.expiryTime), - } as any; -}; +// de_AddAttachmentsToSetResponse omitted. -/** - * deserializeAws_json1_1AddCommunicationToCaseResponse - */ -const de_AddCommunicationToCaseResponse = (output: any, context: __SerdeContext): AddCommunicationToCaseResponse => { - return { - result: __expectBoolean(output.result), - } as any; -}; +// de_AddCommunicationToCaseResponse omitted. /** * deserializeAws_json1_1Attachment */ const de_Attachment = (output: any, context: __SerdeContext): Attachment => { - return { - data: output.data != null ? context.base64Decoder(output.data) : undefined, - fileName: __expectString(output.fileName), - } as any; + return take(output, { + data: context.base64Decoder, + fileName: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1AttachmentDetails - */ -const de_AttachmentDetails = (output: any, context: __SerdeContext): AttachmentDetails => { - return { - attachmentId: __expectString(output.attachmentId), - fileName: __expectString(output.fileName), - } as any; -}; +// de_AttachmentDetails omitted. -/** - * deserializeAws_json1_1AttachmentIdNotFound - */ -const de_AttachmentIdNotFound = (output: any, context: __SerdeContext): AttachmentIdNotFound => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AttachmentIdNotFound omitted. -/** - * deserializeAws_json1_1AttachmentLimitExceeded - */ -const de_AttachmentLimitExceeded = (output: any, context: __SerdeContext): AttachmentLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AttachmentLimitExceeded omitted. -/** - * deserializeAws_json1_1AttachmentSet - */ -const de_AttachmentSet = (output: any, context: __SerdeContext): AttachmentDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AttachmentDetails(entry, context); - }); - return retVal; -}; +// de_AttachmentSet omitted. -/** - * deserializeAws_json1_1AttachmentSetExpired - */ -const de_AttachmentSetExpired = (output: any, context: __SerdeContext): AttachmentSetExpired => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AttachmentSetExpired omitted. -/** - * deserializeAws_json1_1AttachmentSetIdNotFound - */ -const de_AttachmentSetIdNotFound = (output: any, context: __SerdeContext): AttachmentSetIdNotFound => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AttachmentSetIdNotFound omitted. -/** - * deserializeAws_json1_1AttachmentSetSizeLimitExceeded - */ -const de_AttachmentSetSizeLimitExceeded = (output: any, context: __SerdeContext): AttachmentSetSizeLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_AttachmentSetSizeLimitExceeded omitted. -/** - * deserializeAws_json1_1CaseCreationLimitExceeded - */ -const de_CaseCreationLimitExceeded = (output: any, context: __SerdeContext): CaseCreationLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CaseCreationLimitExceeded omitted. -/** - * deserializeAws_json1_1CaseDetails - */ -const de_CaseDetails = (output: any, context: __SerdeContext): CaseDetails => { - return { - caseId: __expectString(output.caseId), - categoryCode: __expectString(output.categoryCode), - ccEmailAddresses: - output.ccEmailAddresses != null ? de_CcEmailAddressList(output.ccEmailAddresses, context) : undefined, - displayId: __expectString(output.displayId), - language: __expectString(output.language), - recentCommunications: - output.recentCommunications != null - ? de_RecentCaseCommunications(output.recentCommunications, context) - : undefined, - serviceCode: __expectString(output.serviceCode), - severityCode: __expectString(output.severityCode), - status: __expectString(output.status), - subject: __expectString(output.subject), - submittedBy: __expectString(output.submittedBy), - timeCreated: __expectString(output.timeCreated), - } as any; -}; - -/** - * deserializeAws_json1_1CaseIdNotFound - */ -const de_CaseIdNotFound = (output: any, context: __SerdeContext): CaseIdNotFound => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CaseDetails omitted. -/** - * deserializeAws_json1_1CaseList - */ -const de_CaseList = (output: any, context: __SerdeContext): CaseDetails[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CaseDetails(entry, context); - }); - return retVal; -}; +// de_CaseIdNotFound omitted. -/** - * deserializeAws_json1_1Category - */ -const de_Category = (output: any, context: __SerdeContext): Category => { - return { - code: __expectString(output.code), - name: __expectString(output.name), - } as any; -}; +// de_CaseList omitted. -/** - * deserializeAws_json1_1CategoryList - */ -const de_CategoryList = (output: any, context: __SerdeContext): Category[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Category(entry, context); - }); - return retVal; -}; +// de_Category omitted. -/** - * deserializeAws_json1_1CcEmailAddressList - */ -const de_CcEmailAddressList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CategoryList omitted. -/** - * deserializeAws_json1_1Communication - */ -const de_Communication = (output: any, context: __SerdeContext): Communication => { - return { - attachmentSet: output.attachmentSet != null ? de_AttachmentSet(output.attachmentSet, context) : undefined, - body: __expectString(output.body), - caseId: __expectString(output.caseId), - submittedBy: __expectString(output.submittedBy), - timeCreated: __expectString(output.timeCreated), - } as any; -}; +// de_CcEmailAddressList omitted. -/** - * deserializeAws_json1_1CommunicationList - */ -const de_CommunicationList = (output: any, context: __SerdeContext): Communication[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Communication(entry, context); - }); - return retVal; -}; +// de_Communication omitted. -/** - * deserializeAws_json1_1CreateCaseResponse - */ -const de_CreateCaseResponse = (output: any, context: __SerdeContext): CreateCaseResponse => { - return { - caseId: __expectString(output.caseId), - } as any; -}; +// de_CommunicationList omitted. -/** - * deserializeAws_json1_1DescribeAttachmentLimitExceeded - */ -const de_DescribeAttachmentLimitExceeded = (output: any, context: __SerdeContext): DescribeAttachmentLimitExceeded => { - return { - message: __expectString(output.message), - } as any; -}; +// de_CreateCaseResponse omitted. + +// de_DescribeAttachmentLimitExceeded omitted. /** * deserializeAws_json1_1DescribeAttachmentResponse */ const de_DescribeAttachmentResponse = (output: any, context: __SerdeContext): DescribeAttachmentResponse => { - return { - attachment: output.attachment != null ? de_Attachment(output.attachment, context) : undefined, - } as any; + return take(output, { + attachment: (_: any) => de_Attachment(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DescribeCasesResponse - */ -const de_DescribeCasesResponse = (output: any, context: __SerdeContext): DescribeCasesResponse => { - return { - cases: output.cases != null ? de_CaseList(output.cases, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeCasesResponse omitted. -/** - * deserializeAws_json1_1DescribeCommunicationsResponse - */ -const de_DescribeCommunicationsResponse = (output: any, context: __SerdeContext): DescribeCommunicationsResponse => { - return { - communications: output.communications != null ? de_CommunicationList(output.communications, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_DescribeCommunicationsResponse omitted. -/** - * deserializeAws_json1_1DescribeServicesResponse - */ -const de_DescribeServicesResponse = (output: any, context: __SerdeContext): DescribeServicesResponse => { - return { - services: output.services != null ? de_ServiceList(output.services, context) : undefined, - } as any; -}; +// de_DescribeServicesResponse omitted. -/** - * deserializeAws_json1_1DescribeSeverityLevelsResponse - */ -const de_DescribeSeverityLevelsResponse = (output: any, context: __SerdeContext): DescribeSeverityLevelsResponse => { - return { - severityLevels: output.severityLevels != null ? de_SeverityLevelsList(output.severityLevels, context) : undefined, - } as any; -}; +// de_DescribeSeverityLevelsResponse omitted. -/** - * deserializeAws_json1_1DescribeTrustedAdvisorCheckRefreshStatusesResponse - */ -const de_DescribeTrustedAdvisorCheckRefreshStatusesResponse = ( - output: any, - context: __SerdeContext -): DescribeTrustedAdvisorCheckRefreshStatusesResponse => { - return { - statuses: output.statuses != null ? de_TrustedAdvisorCheckRefreshStatusList(output.statuses, context) : undefined, - } as any; -}; +// de_DescribeTrustedAdvisorCheckRefreshStatusesResponse omitted. /** * deserializeAws_json1_1DescribeTrustedAdvisorCheckResultResponse @@ -1677,9 +1270,9 @@ const de_DescribeTrustedAdvisorCheckResultResponse = ( output: any, context: __SerdeContext ): DescribeTrustedAdvisorCheckResultResponse => { - return { - result: output.result != null ? de_TrustedAdvisorCheckResult(output.result, context) : undefined, - } as any; + return take(output, { + result: (_: any) => de_TrustedAdvisorCheckResult(_, context), + }) as any; }; /** @@ -1689,9 +1282,9 @@ const de_DescribeTrustedAdvisorChecksResponse = ( output: any, context: __SerdeContext ): DescribeTrustedAdvisorChecksResponse => { - return { - checks: output.checks != null ? de_TrustedAdvisorCheckList(output.checks, context) : undefined, - } as any; + return take(output, { + checks: (_: any) => de_TrustedAdvisorCheckList(_, context), + }) as any; }; /** @@ -1701,102 +1294,26 @@ const de_DescribeTrustedAdvisorCheckSummariesResponse = ( output: any, context: __SerdeContext ): DescribeTrustedAdvisorCheckSummariesResponse => { - return { - summaries: output.summaries != null ? de_TrustedAdvisorCheckSummaryList(output.summaries, context) : undefined, - } as any; + return take(output, { + summaries: (_: any) => de_TrustedAdvisorCheckSummaryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - message: __expectString(output.message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1RecentCaseCommunications - */ -const de_RecentCaseCommunications = (output: any, context: __SerdeContext): RecentCaseCommunications => { - return { - communications: output.communications != null ? de_CommunicationList(output.communications, context) : undefined, - nextToken: __expectString(output.nextToken), - } as any; -}; +// de_RecentCaseCommunications omitted. -/** - * deserializeAws_json1_1RefreshTrustedAdvisorCheckResponse - */ -const de_RefreshTrustedAdvisorCheckResponse = ( - output: any, - context: __SerdeContext -): RefreshTrustedAdvisorCheckResponse => { - return { - status: output.status != null ? de_TrustedAdvisorCheckRefreshStatus(output.status, context) : undefined, - } as any; -}; +// de_RefreshTrustedAdvisorCheckResponse omitted. -/** - * deserializeAws_json1_1ResolveCaseResponse - */ -const de_ResolveCaseResponse = (output: any, context: __SerdeContext): ResolveCaseResponse => { - return { - finalCaseStatus: __expectString(output.finalCaseStatus), - initialCaseStatus: __expectString(output.initialCaseStatus), - } as any; -}; +// de_ResolveCaseResponse omitted. -/** - * deserializeAws_json1_1Service - */ -const de_Service = (output: any, context: __SerdeContext): Service => { - return { - categories: output.categories != null ? de_CategoryList(output.categories, context) : undefined, - code: __expectString(output.code), - name: __expectString(output.name), - } as any; -}; +// de_Service omitted. -/** - * deserializeAws_json1_1ServiceList - */ -const de_ServiceList = (output: any, context: __SerdeContext): Service[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Service(entry, context); - }); - return retVal; -}; +// de_ServiceList omitted. -/** - * deserializeAws_json1_1SeverityLevel - */ -const de_SeverityLevel = (output: any, context: __SerdeContext): SeverityLevel => { - return { - code: __expectString(output.code), - name: __expectString(output.name), - } as any; -}; +// de_SeverityLevel omitted. -/** - * deserializeAws_json1_1SeverityLevelsList - */ -const de_SeverityLevelsList = (output: any, context: __SerdeContext): SeverityLevel[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SeverityLevel(entry, context); - }); - return retVal; -}; +// de_SeverityLevelsList omitted. /** * deserializeAws_json1_1StringList @@ -1818,25 +1335,22 @@ const de_TrustedAdvisorCategorySpecificSummary = ( output: any, context: __SerdeContext ): TrustedAdvisorCategorySpecificSummary => { - return { - costOptimizing: - output.costOptimizing != null - ? de_TrustedAdvisorCostOptimizingSummary(output.costOptimizing, context) - : undefined, - } as any; + return take(output, { + costOptimizing: (_: any) => de_TrustedAdvisorCostOptimizingSummary(_, context), + }) as any; }; /** * deserializeAws_json1_1TrustedAdvisorCheckDescription */ const de_TrustedAdvisorCheckDescription = (output: any, context: __SerdeContext): TrustedAdvisorCheckDescription => { - return { - category: __expectString(output.category), - description: __expectString(output.description), - id: __expectString(output.id), - metadata: output.metadata != null ? de_StringList(output.metadata, context) : undefined, - name: __expectString(output.name), - } as any; + return take(output, { + category: __expectString, + description: __expectString, + id: __expectString, + metadata: (_: any) => de_StringList(_, context), + name: __expectString, + }) as any; }; /** @@ -1846,83 +1360,41 @@ const de_TrustedAdvisorCheckList = (output: any, context: __SerdeContext): Trust const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrustedAdvisorCheckDescription(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TrustedAdvisorCheckRefreshStatus - */ -const de_TrustedAdvisorCheckRefreshStatus = ( - output: any, - context: __SerdeContext -): TrustedAdvisorCheckRefreshStatus => { - return { - checkId: __expectString(output.checkId), - millisUntilNextRefreshable: __expectLong(output.millisUntilNextRefreshable), - status: __expectString(output.status), - } as any; -}; +// de_TrustedAdvisorCheckRefreshStatus omitted. -/** - * deserializeAws_json1_1TrustedAdvisorCheckRefreshStatusList - */ -const de_TrustedAdvisorCheckRefreshStatusList = ( - output: any, - context: __SerdeContext -): TrustedAdvisorCheckRefreshStatus[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrustedAdvisorCheckRefreshStatus(entry, context); - }); - return retVal; -}; +// de_TrustedAdvisorCheckRefreshStatusList omitted. /** * deserializeAws_json1_1TrustedAdvisorCheckResult */ const de_TrustedAdvisorCheckResult = (output: any, context: __SerdeContext): TrustedAdvisorCheckResult => { - return { - categorySpecificSummary: - output.categorySpecificSummary != null - ? de_TrustedAdvisorCategorySpecificSummary(output.categorySpecificSummary, context) - : undefined, - checkId: __expectString(output.checkId), - flaggedResources: - output.flaggedResources != null - ? de_TrustedAdvisorResourceDetailList(output.flaggedResources, context) - : undefined, - resourcesSummary: - output.resourcesSummary != null ? de_TrustedAdvisorResourcesSummary(output.resourcesSummary, context) : undefined, - status: __expectString(output.status), - timestamp: __expectString(output.timestamp), - } as any; + return take(output, { + categorySpecificSummary: (_: any) => de_TrustedAdvisorCategorySpecificSummary(_, context), + checkId: __expectString, + flaggedResources: (_: any) => de_TrustedAdvisorResourceDetailList(_, context), + resourcesSummary: _json, + status: __expectString, + timestamp: __expectString, + }) as any; }; /** * deserializeAws_json1_1TrustedAdvisorCheckSummary */ const de_TrustedAdvisorCheckSummary = (output: any, context: __SerdeContext): TrustedAdvisorCheckSummary => { - return { - categorySpecificSummary: - output.categorySpecificSummary != null - ? de_TrustedAdvisorCategorySpecificSummary(output.categorySpecificSummary, context) - : undefined, - checkId: __expectString(output.checkId), - hasFlaggedResources: __expectBoolean(output.hasFlaggedResources), - resourcesSummary: - output.resourcesSummary != null ? de_TrustedAdvisorResourcesSummary(output.resourcesSummary, context) : undefined, - status: __expectString(output.status), - timestamp: __expectString(output.timestamp), - } as any; + return take(output, { + categorySpecificSummary: (_: any) => de_TrustedAdvisorCategorySpecificSummary(_, context), + checkId: __expectString, + hasFlaggedResources: __expectBoolean, + resourcesSummary: _json, + status: __expectString, + timestamp: __expectString, + }) as any; }; /** @@ -1932,9 +1404,6 @@ const de_TrustedAdvisorCheckSummaryList = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrustedAdvisorCheckSummary(entry, context); }); return retVal; @@ -1947,23 +1416,23 @@ const de_TrustedAdvisorCostOptimizingSummary = ( output: any, context: __SerdeContext ): TrustedAdvisorCostOptimizingSummary => { - return { - estimatedMonthlySavings: __limitedParseDouble(output.estimatedMonthlySavings), - estimatedPercentMonthlySavings: __limitedParseDouble(output.estimatedPercentMonthlySavings), - } as any; + return take(output, { + estimatedMonthlySavings: __limitedParseDouble, + estimatedPercentMonthlySavings: __limitedParseDouble, + }) as any; }; /** * deserializeAws_json1_1TrustedAdvisorResourceDetail */ const de_TrustedAdvisorResourceDetail = (output: any, context: __SerdeContext): TrustedAdvisorResourceDetail => { - return { - isSuppressed: __expectBoolean(output.isSuppressed), - metadata: output.metadata != null ? de_StringList(output.metadata, context) : undefined, - region: __expectString(output.region), - resourceId: __expectString(output.resourceId), - status: __expectString(output.status), - } as any; + return take(output, { + isSuppressed: __expectBoolean, + metadata: (_: any) => de_StringList(_, context), + region: __expectString, + resourceId: __expectString, + status: __expectString, + }) as any; }; /** @@ -1973,25 +1442,12 @@ const de_TrustedAdvisorResourceDetailList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TrustedAdvisorResourceDetail(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TrustedAdvisorResourcesSummary - */ -const de_TrustedAdvisorResourcesSummary = (output: any, context: __SerdeContext): TrustedAdvisorResourcesSummary => { - return { - resourcesFlagged: __expectLong(output.resourcesFlagged), - resourcesIgnored: __expectLong(output.resourcesIgnored), - resourcesProcessed: __expectLong(output.resourcesProcessed), - resourcesSuppressed: __expectLong(output.resourcesSuppressed), - } as any; -}; +// de_TrustedAdvisorResourcesSummary omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2013,6 +1469,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-swf/src/protocols/Aws_json1_0.ts b/clients/client-swf/src/protocols/Aws_json1_0.ts index e51c7ef0bdc1..6886ab98de68 100644 --- a/clients/client-swf/src/protocols/Aws_json1_0.ts +++ b/clients/client-swf/src/protocols/Aws_json1_0.ts @@ -1,15 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -140,45 +141,21 @@ import { } from "../commands/UndeprecateWorkflowTypeCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { - ActivityTask, - ActivityTaskCanceledEventAttributes, - ActivityTaskCancelRequestedEventAttributes, - ActivityTaskCompletedEventAttributes, - ActivityTaskFailedEventAttributes, - ActivityTaskScheduledEventAttributes, - ActivityTaskStartedEventAttributes, - ActivityTaskStatus, - ActivityTaskTimedOutEventAttributes, ActivityType, - ActivityTypeConfiguration, ActivityTypeDetail, ActivityTypeInfo, ActivityTypeInfos, CancelTimerDecisionAttributes, - CancelTimerFailedEventAttributes, CancelWorkflowExecutionDecisionAttributes, - CancelWorkflowExecutionFailedEventAttributes, - ChildWorkflowExecutionCanceledEventAttributes, - ChildWorkflowExecutionCompletedEventAttributes, - ChildWorkflowExecutionFailedEventAttributes, - ChildWorkflowExecutionStartedEventAttributes, - ChildWorkflowExecutionTerminatedEventAttributes, - ChildWorkflowExecutionTimedOutEventAttributes, CloseStatusFilter, CompleteWorkflowExecutionDecisionAttributes, - CompleteWorkflowExecutionFailedEventAttributes, ContinueAsNewWorkflowExecutionDecisionAttributes, - ContinueAsNewWorkflowExecutionFailedEventAttributes, CountClosedWorkflowExecutionsInput, CountOpenWorkflowExecutionsInput, CountPendingActivityTasksInput, CountPendingDecisionTasksInput, Decision, DecisionTask, - DecisionTaskCompletedEventAttributes, - DecisionTaskScheduledEventAttributes, - DecisionTaskStartedEventAttributes, - DecisionTaskTimedOutEventAttributes, DefaultUndefinedFault, DeprecateActivityTypeInput, DeprecateDomainInput, @@ -188,77 +165,46 @@ import { DescribeWorkflowExecutionInput, DescribeWorkflowTypeInput, DomainAlreadyExistsFault, - DomainConfiguration, DomainDeprecatedFault, - DomainDetail, - DomainInfo, - DomainInfos, ExecutionTimeFilter, - ExternalWorkflowExecutionCancelRequestedEventAttributes, - ExternalWorkflowExecutionSignaledEventAttributes, FailWorkflowExecutionDecisionAttributes, - FailWorkflowExecutionFailedEventAttributes, GetWorkflowExecutionHistoryInput, History, HistoryEvent, - LambdaFunctionCompletedEventAttributes, - LambdaFunctionFailedEventAttributes, - LambdaFunctionScheduledEventAttributes, - LambdaFunctionStartedEventAttributes, - LambdaFunctionTimedOutEventAttributes, LimitExceededFault, ListActivityTypesInput, ListClosedWorkflowExecutionsInput, ListDomainsInput, ListOpenWorkflowExecutionsInput, ListTagsForResourceInput, - ListTagsForResourceOutput, ListWorkflowTypesInput, - MarkerRecordedEventAttributes, OperationNotPermittedFault, - PendingTaskCount, PollForActivityTaskInput, PollForDecisionTaskInput, RecordActivityTaskHeartbeatInput, RecordMarkerDecisionAttributes, - RecordMarkerFailedEventAttributes, RegisterActivityTypeInput, RegisterDomainInput, RegisterWorkflowTypeInput, RequestCancelActivityTaskDecisionAttributes, - RequestCancelActivityTaskFailedEventAttributes, RequestCancelExternalWorkflowExecutionDecisionAttributes, - RequestCancelExternalWorkflowExecutionFailedEventAttributes, - RequestCancelExternalWorkflowExecutionInitiatedEventAttributes, RequestCancelWorkflowExecutionInput, ResourceTag, RespondActivityTaskCanceledInput, RespondActivityTaskCompletedInput, RespondActivityTaskFailedInput, RespondDecisionTaskCompletedInput, - Run, ScheduleActivityTaskDecisionAttributes, - ScheduleActivityTaskFailedEventAttributes, ScheduleLambdaFunctionDecisionAttributes, - ScheduleLambdaFunctionFailedEventAttributes, SignalExternalWorkflowExecutionDecisionAttributes, - SignalExternalWorkflowExecutionFailedEventAttributes, - SignalExternalWorkflowExecutionInitiatedEventAttributes, SignalWorkflowExecutionInput, StartChildWorkflowExecutionDecisionAttributes, - StartChildWorkflowExecutionFailedEventAttributes, - StartChildWorkflowExecutionInitiatedEventAttributes, - StartLambdaFunctionFailedEventAttributes, StartTimerDecisionAttributes, - StartTimerFailedEventAttributes, StartWorkflowExecutionInput, TagFilter, TagResourceInput, TaskList, TerminateWorkflowExecutionInput, - TimerCanceledEventAttributes, - TimerFiredEventAttributes, - TimerStartedEventAttributes, TooManyTagsFault, TypeAlreadyExistsFault, TypeDeprecatedFault, @@ -269,24 +215,11 @@ import { UntagResourceInput, WorkflowExecution, WorkflowExecutionAlreadyStartedFault, - WorkflowExecutionCanceledEventAttributes, - WorkflowExecutionCancelRequestedEventAttributes, - WorkflowExecutionCompletedEventAttributes, - WorkflowExecutionConfiguration, - WorkflowExecutionContinuedAsNewEventAttributes, - WorkflowExecutionCount, WorkflowExecutionDetail, - WorkflowExecutionFailedEventAttributes, WorkflowExecutionFilter, WorkflowExecutionInfo, WorkflowExecutionInfos, - WorkflowExecutionOpenCounts, - WorkflowExecutionSignaledEventAttributes, - WorkflowExecutionStartedEventAttributes, - WorkflowExecutionTerminatedEventAttributes, - WorkflowExecutionTimedOutEventAttributes, WorkflowType, - WorkflowTypeConfiguration, WorkflowTypeDetail, WorkflowTypeFilter, WorkflowTypeInfo, @@ -329,7 +262,7 @@ export const se_CountPendingActivityTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CountPendingActivityTasks"); let body: any; - body = JSON.stringify(se_CountPendingActivityTasksInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -342,7 +275,7 @@ export const se_CountPendingDecisionTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CountPendingDecisionTasks"); let body: any; - body = JSON.stringify(se_CountPendingDecisionTasksInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -355,7 +288,7 @@ export const se_DeprecateActivityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeprecateActivityType"); let body: any; - body = JSON.stringify(se_DeprecateActivityTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -368,7 +301,7 @@ export const se_DeprecateDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeprecateDomain"); let body: any; - body = JSON.stringify(se_DeprecateDomainInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -381,7 +314,7 @@ export const se_DeprecateWorkflowTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeprecateWorkflowType"); let body: any; - body = JSON.stringify(se_DeprecateWorkflowTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -394,7 +327,7 @@ export const se_DescribeActivityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeActivityType"); let body: any; - body = JSON.stringify(se_DescribeActivityTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -407,7 +340,7 @@ export const se_DescribeDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDomain"); let body: any; - body = JSON.stringify(se_DescribeDomainInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -420,7 +353,7 @@ export const se_DescribeWorkflowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkflowExecution"); let body: any; - body = JSON.stringify(se_DescribeWorkflowExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -433,7 +366,7 @@ export const se_DescribeWorkflowTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkflowType"); let body: any; - body = JSON.stringify(se_DescribeWorkflowTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -446,7 +379,7 @@ export const se_GetWorkflowExecutionHistoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWorkflowExecutionHistory"); let body: any; - body = JSON.stringify(se_GetWorkflowExecutionHistoryInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -459,7 +392,7 @@ export const se_ListActivityTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListActivityTypes"); let body: any; - body = JSON.stringify(se_ListActivityTypesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -485,7 +418,7 @@ export const se_ListDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDomains"); let body: any; - body = JSON.stringify(se_ListDomainsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -511,7 +444,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -524,7 +457,7 @@ export const se_ListWorkflowTypesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkflowTypes"); let body: any; - body = JSON.stringify(se_ListWorkflowTypesInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -537,7 +470,7 @@ export const se_PollForActivityTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PollForActivityTask"); let body: any; - body = JSON.stringify(se_PollForActivityTaskInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -550,7 +483,7 @@ export const se_PollForDecisionTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PollForDecisionTask"); let body: any; - body = JSON.stringify(se_PollForDecisionTaskInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -563,7 +496,7 @@ export const se_RecordActivityTaskHeartbeatCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RecordActivityTaskHeartbeat"); let body: any; - body = JSON.stringify(se_RecordActivityTaskHeartbeatInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -576,7 +509,7 @@ export const se_RegisterActivityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterActivityType"); let body: any; - body = JSON.stringify(se_RegisterActivityTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -589,7 +522,7 @@ export const se_RegisterDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterDomain"); let body: any; - body = JSON.stringify(se_RegisterDomainInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -602,7 +535,7 @@ export const se_RegisterWorkflowTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterWorkflowType"); let body: any; - body = JSON.stringify(se_RegisterWorkflowTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -615,7 +548,7 @@ export const se_RequestCancelWorkflowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RequestCancelWorkflowExecution"); let body: any; - body = JSON.stringify(se_RequestCancelWorkflowExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -628,7 +561,7 @@ export const se_RespondActivityTaskCanceledCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RespondActivityTaskCanceled"); let body: any; - body = JSON.stringify(se_RespondActivityTaskCanceledInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -641,7 +574,7 @@ export const se_RespondActivityTaskCompletedCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RespondActivityTaskCompleted"); let body: any; - body = JSON.stringify(se_RespondActivityTaskCompletedInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -654,7 +587,7 @@ export const se_RespondActivityTaskFailedCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RespondActivityTaskFailed"); let body: any; - body = JSON.stringify(se_RespondActivityTaskFailedInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -667,7 +600,7 @@ export const se_RespondDecisionTaskCompletedCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RespondDecisionTaskCompleted"); let body: any; - body = JSON.stringify(se_RespondDecisionTaskCompletedInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -680,7 +613,7 @@ export const se_SignalWorkflowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SignalWorkflowExecution"); let body: any; - body = JSON.stringify(se_SignalWorkflowExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -693,7 +626,7 @@ export const se_StartWorkflowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartWorkflowExecution"); let body: any; - body = JSON.stringify(se_StartWorkflowExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -706,7 +639,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -719,7 +652,7 @@ export const se_TerminateWorkflowExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TerminateWorkflowExecution"); let body: any; - body = JSON.stringify(se_TerminateWorkflowExecutionInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -732,7 +665,7 @@ export const se_UndeprecateActivityTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UndeprecateActivityType"); let body: any; - body = JSON.stringify(se_UndeprecateActivityTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -745,7 +678,7 @@ export const se_UndeprecateDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UndeprecateDomain"); let body: any; - body = JSON.stringify(se_UndeprecateDomainInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -758,7 +691,7 @@ export const se_UndeprecateWorkflowTypeCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UndeprecateWorkflowType"); let body: any; - body = JSON.stringify(se_UndeprecateWorkflowTypeInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -771,7 +704,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -787,12 +720,12 @@ export const de_CountClosedWorkflowExecutionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_WorkflowExecutionCount(data, context); + contents = _json(data); const response: CountClosedWorkflowExecutionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -816,10 +749,9 @@ const de_CountClosedWorkflowExecutionsCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -837,12 +769,12 @@ export const de_CountOpenWorkflowExecutionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_WorkflowExecutionCount(data, context); + contents = _json(data); const response: CountOpenWorkflowExecutionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -866,10 +798,9 @@ const de_CountOpenWorkflowExecutionsCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -887,12 +818,12 @@ export const de_CountPendingActivityTasksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PendingTaskCount(data, context); + contents = _json(data); const response: CountPendingActivityTasksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -916,10 +847,9 @@ const de_CountPendingActivityTasksCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -937,12 +867,12 @@ export const de_CountPendingDecisionTasksCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PendingTaskCount(data, context); + contents = _json(data); const response: CountPendingDecisionTasksCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -966,10 +896,9 @@ const de_CountPendingDecisionTasksCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -989,7 +918,7 @@ export const de_DeprecateActivityTypeCommand = async ( const response: DeprecateActivityTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1016,10 +945,9 @@ const de_DeprecateActivityTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1039,7 +967,7 @@ export const de_DeprecateDomainCommand = async ( const response: DeprecateDomainCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1066,10 +994,9 @@ const de_DeprecateDomainCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1089,7 +1016,7 @@ export const de_DeprecateWorkflowTypeCommand = async ( const response: DeprecateWorkflowTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1116,10 +1043,9 @@ const de_DeprecateWorkflowTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1142,7 +1068,7 @@ export const de_DescribeActivityTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1166,10 +1092,9 @@ const de_DescribeActivityTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1187,12 +1112,12 @@ export const de_DescribeDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DomainDetail(data, context); + contents = _json(data); const response: DescribeDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1216,10 +1141,9 @@ const de_DescribeDomainCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1242,7 +1166,7 @@ export const de_DescribeWorkflowExecutionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1266,10 +1190,9 @@ const de_DescribeWorkflowExecutionCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1292,7 +1215,7 @@ export const de_DescribeWorkflowTypeCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1316,10 +1239,9 @@ const de_DescribeWorkflowTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1342,7 +1264,7 @@ export const de_GetWorkflowExecutionHistoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1366,10 +1288,9 @@ const de_GetWorkflowExecutionHistoryCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1392,7 +1313,7 @@ export const de_ListActivityTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1416,10 +1337,9 @@ const de_ListActivityTypesCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1442,7 +1362,7 @@ export const de_ListClosedWorkflowExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1466,10 +1386,9 @@ const de_ListClosedWorkflowExecutionsCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1487,12 +1406,12 @@ export const de_ListDomainsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DomainInfos(data, context); + contents = _json(data); const response: ListDomainsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1513,10 +1432,9 @@ const de_ListDomainsCommandError = async ( throw await de_OperationNotPermittedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1539,7 +1457,7 @@ export const de_ListOpenWorkflowExecutionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1563,10 +1481,9 @@ const de_ListOpenWorkflowExecutionsCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1584,12 +1501,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceOutput(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1616,10 +1533,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1642,7 +1558,7 @@ export const de_ListWorkflowTypesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1666,10 +1582,9 @@ const de_ListWorkflowTypesCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1687,12 +1602,12 @@ export const de_PollForActivityTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ActivityTask(data, context); + contents = _json(data); const response: PollForActivityTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1719,10 +1634,9 @@ const de_PollForActivityTaskCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1745,7 +1659,7 @@ export const de_PollForDecisionTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1772,10 +1686,9 @@ const de_PollForDecisionTaskCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1793,12 +1706,12 @@ export const de_RecordActivityTaskHeartbeatCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ActivityTaskStatus(data, context); + contents = _json(data); const response: RecordActivityTaskHeartbeatCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1822,10 +1735,9 @@ const de_RecordActivityTaskHeartbeatCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1845,7 +1757,7 @@ export const de_RegisterActivityTypeCommand = async ( const response: RegisterActivityTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1875,10 +1787,9 @@ const de_RegisterActivityTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1898,7 +1809,7 @@ export const de_RegisterDomainCommand = async ( const response: RegisterDomainCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1928,10 +1839,9 @@ const de_RegisterDomainCommandError = async ( throw await de_TooManyTagsFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1951,7 +1861,7 @@ export const de_RegisterWorkflowTypeCommand = async ( const response: RegisterWorkflowTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1981,10 +1891,9 @@ const de_RegisterWorkflowTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2004,7 +1913,7 @@ export const de_RequestCancelWorkflowExecutionCommand = async ( const response: RequestCancelWorkflowExecutionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2028,10 +1937,9 @@ const de_RequestCancelWorkflowExecutionCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2051,7 +1959,7 @@ export const de_RespondActivityTaskCanceledCommand = async ( const response: RespondActivityTaskCanceledCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2075,10 +1983,9 @@ const de_RespondActivityTaskCanceledCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2098,7 +2005,7 @@ export const de_RespondActivityTaskCompletedCommand = async ( const response: RespondActivityTaskCompletedCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2122,10 +2029,9 @@ const de_RespondActivityTaskCompletedCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2145,7 +2051,7 @@ export const de_RespondActivityTaskFailedCommand = async ( const response: RespondActivityTaskFailedCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2169,10 +2075,9 @@ const de_RespondActivityTaskFailedCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2192,7 +2097,7 @@ export const de_RespondDecisionTaskCompletedCommand = async ( const response: RespondDecisionTaskCompletedCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2216,10 +2121,9 @@ const de_RespondDecisionTaskCompletedCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2239,7 +2143,7 @@ export const de_SignalWorkflowExecutionCommand = async ( const response: SignalWorkflowExecutionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2263,10 +2167,9 @@ const de_SignalWorkflowExecutionCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2284,12 +2187,12 @@ export const de_StartWorkflowExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_Run(data, context); + contents = _json(data); const response: StartWorkflowExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2325,10 +2228,9 @@ const de_StartWorkflowExecutionCommandError = async ( throw await de_WorkflowExecutionAlreadyStartedFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2348,7 +2250,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2378,10 +2280,9 @@ const de_TagResourceCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2401,7 +2302,7 @@ export const de_TerminateWorkflowExecutionCommand = async ( const response: TerminateWorkflowExecutionCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2425,10 +2326,9 @@ const de_TerminateWorkflowExecutionCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2448,7 +2348,7 @@ export const de_UndeprecateActivityTypeCommand = async ( const response: UndeprecateActivityTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2475,10 +2375,9 @@ const de_UndeprecateActivityTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2498,7 +2397,7 @@ export const de_UndeprecateDomainCommand = async ( const response: UndeprecateDomainCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2525,10 +2424,9 @@ const de_UndeprecateDomainCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2548,7 +2446,7 @@ export const de_UndeprecateWorkflowTypeCommand = async ( const response: UndeprecateWorkflowTypeCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2575,10 +2473,9 @@ const de_UndeprecateWorkflowTypeCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2598,7 +2495,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -2625,10 +2522,9 @@ const de_UntagResourceCommandError = async ( throw await de_UnknownResourceFaultRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2642,7 +2538,7 @@ const de_DefaultUndefinedFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DefaultUndefinedFault(body, context); + const deserialized: any = _json(body); const exception = new DefaultUndefinedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2658,7 +2554,7 @@ const de_DomainAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DomainAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new DomainAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2674,7 +2570,7 @@ const de_DomainDeprecatedFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DomainDeprecatedFault(body, context); + const deserialized: any = _json(body); const exception = new DomainDeprecatedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2687,7 +2583,7 @@ const de_DomainDeprecatedFaultRes = async ( */ const de_LimitExceededFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededFault(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2703,7 +2599,7 @@ const de_OperationNotPermittedFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotPermittedFault(body, context); + const deserialized: any = _json(body); const exception = new OperationNotPermittedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2716,7 +2612,7 @@ const de_OperationNotPermittedFaultRes = async ( */ const de_TooManyTagsFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsFault(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2732,7 +2628,7 @@ const de_TypeAlreadyExistsFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TypeAlreadyExistsFault(body, context); + const deserialized: any = _json(body); const exception = new TypeAlreadyExistsFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2745,7 +2641,7 @@ const de_TypeAlreadyExistsFaultRes = async ( */ const de_TypeDeprecatedFaultRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TypeDeprecatedFault(body, context); + const deserialized: any = _json(body); const exception = new TypeDeprecatedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2761,7 +2657,7 @@ const de_UnknownResourceFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnknownResourceFault(body, context); + const deserialized: any = _json(body); const exception = new UnknownResourceFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2777,7 +2673,7 @@ const de_WorkflowExecutionAlreadyStartedFaultRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WorkflowExecutionAlreadyStartedFault(body, context); + const deserialized: any = _json(body); const exception = new WorkflowExecutionAlreadyStartedFault({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2785,79 +2681,17 @@ const de_WorkflowExecutionAlreadyStartedFaultRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0ActivityType - */ -const se_ActivityType = (input: ActivityType, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_ActivityType omitted. -/** - * serializeAws_json1_0CancelTimerDecisionAttributes - */ -const se_CancelTimerDecisionAttributes = (input: CancelTimerDecisionAttributes, context: __SerdeContext): any => { - return { - ...(input.timerId != null && { timerId: input.timerId }), - }; -}; +// se_CancelTimerDecisionAttributes omitted. -/** - * serializeAws_json1_0CancelWorkflowExecutionDecisionAttributes - */ -const se_CancelWorkflowExecutionDecisionAttributes = ( - input: CancelWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.details != null && { details: input.details }), - }; -}; +// se_CancelWorkflowExecutionDecisionAttributes omitted. -/** - * serializeAws_json1_0CloseStatusFilter - */ -const se_CloseStatusFilter = (input: CloseStatusFilter, context: __SerdeContext): any => { - return { - ...(input.status != null && { status: input.status }), - }; -}; +// se_CloseStatusFilter omitted. -/** - * serializeAws_json1_0CompleteWorkflowExecutionDecisionAttributes - */ -const se_CompleteWorkflowExecutionDecisionAttributes = ( - input: CompleteWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.result != null && { result: input.result }), - }; -}; +// se_CompleteWorkflowExecutionDecisionAttributes omitted. -/** - * serializeAws_json1_0ContinueAsNewWorkflowExecutionDecisionAttributes - */ -const se_ContinueAsNewWorkflowExecutionDecisionAttributes = ( - input: ContinueAsNewWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.childPolicy != null && { childPolicy: input.childPolicy }), - ...(input.executionStartToCloseTimeout != null && { - executionStartToCloseTimeout: input.executionStartToCloseTimeout, - }), - ...(input.input != null && { input: input.input }), - ...(input.lambdaRole != null && { lambdaRole: input.lambdaRole }), - ...(input.tagList != null && { tagList: se_TagList(input.tagList, context) }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - ...(input.taskPriority != null && { taskPriority: input.taskPriority }), - ...(input.taskStartToCloseTimeout != null && { taskStartToCloseTimeout: input.taskStartToCloseTimeout }), - ...(input.workflowTypeVersion != null && { workflowTypeVersion: input.workflowTypeVersion }), - }; -}; +// se_ContinueAsNewWorkflowExecutionDecisionAttributes omitted. /** * serializeAws_json1_0CountClosedWorkflowExecutionsInput @@ -2866,263 +2700,67 @@ const se_CountClosedWorkflowExecutionsInput = ( input: CountClosedWorkflowExecutionsInput, context: __SerdeContext ): any => { - return { - ...(input.closeStatusFilter != null && { - closeStatusFilter: se_CloseStatusFilter(input.closeStatusFilter, context), - }), - ...(input.closeTimeFilter != null && { closeTimeFilter: se_ExecutionTimeFilter(input.closeTimeFilter, context) }), - ...(input.domain != null && { domain: input.domain }), - ...(input.executionFilter != null && { - executionFilter: se_WorkflowExecutionFilter(input.executionFilter, context), - }), - ...(input.startTimeFilter != null && { startTimeFilter: se_ExecutionTimeFilter(input.startTimeFilter, context) }), - ...(input.tagFilter != null && { tagFilter: se_TagFilter(input.tagFilter, context) }), - ...(input.typeFilter != null && { typeFilter: se_WorkflowTypeFilter(input.typeFilter, context) }), - }; + return take(input, { + closeStatusFilter: _json, + closeTimeFilter: (_) => se_ExecutionTimeFilter(_, context), + domain: [], + executionFilter: _json, + startTimeFilter: (_) => se_ExecutionTimeFilter(_, context), + tagFilter: _json, + typeFilter: _json, + }); }; /** * serializeAws_json1_0CountOpenWorkflowExecutionsInput */ const se_CountOpenWorkflowExecutionsInput = (input: CountOpenWorkflowExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.executionFilter != null && { - executionFilter: se_WorkflowExecutionFilter(input.executionFilter, context), - }), - ...(input.startTimeFilter != null && { startTimeFilter: se_ExecutionTimeFilter(input.startTimeFilter, context) }), - ...(input.tagFilter != null && { tagFilter: se_TagFilter(input.tagFilter, context) }), - ...(input.typeFilter != null && { typeFilter: se_WorkflowTypeFilter(input.typeFilter, context) }), - }; + return take(input, { + domain: [], + executionFilter: _json, + startTimeFilter: (_) => se_ExecutionTimeFilter(_, context), + tagFilter: _json, + typeFilter: _json, + }); }; -/** - * serializeAws_json1_0CountPendingActivityTasksInput - */ -const se_CountPendingActivityTasksInput = (input: CountPendingActivityTasksInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - }; -}; +// se_CountPendingActivityTasksInput omitted. -/** - * serializeAws_json1_0CountPendingDecisionTasksInput - */ -const se_CountPendingDecisionTasksInput = (input: CountPendingDecisionTasksInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - }; -}; +// se_CountPendingDecisionTasksInput omitted. -/** - * serializeAws_json1_0Decision - */ -const se_Decision = (input: Decision, context: __SerdeContext): any => { - return { - ...(input.cancelTimerDecisionAttributes != null && { - cancelTimerDecisionAttributes: se_CancelTimerDecisionAttributes(input.cancelTimerDecisionAttributes, context), - }), - ...(input.cancelWorkflowExecutionDecisionAttributes != null && { - cancelWorkflowExecutionDecisionAttributes: se_CancelWorkflowExecutionDecisionAttributes( - input.cancelWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.completeWorkflowExecutionDecisionAttributes != null && { - completeWorkflowExecutionDecisionAttributes: se_CompleteWorkflowExecutionDecisionAttributes( - input.completeWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.continueAsNewWorkflowExecutionDecisionAttributes != null && { - continueAsNewWorkflowExecutionDecisionAttributes: se_ContinueAsNewWorkflowExecutionDecisionAttributes( - input.continueAsNewWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.decisionType != null && { decisionType: input.decisionType }), - ...(input.failWorkflowExecutionDecisionAttributes != null && { - failWorkflowExecutionDecisionAttributes: se_FailWorkflowExecutionDecisionAttributes( - input.failWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.recordMarkerDecisionAttributes != null && { - recordMarkerDecisionAttributes: se_RecordMarkerDecisionAttributes(input.recordMarkerDecisionAttributes, context), - }), - ...(input.requestCancelActivityTaskDecisionAttributes != null && { - requestCancelActivityTaskDecisionAttributes: se_RequestCancelActivityTaskDecisionAttributes( - input.requestCancelActivityTaskDecisionAttributes, - context - ), - }), - ...(input.requestCancelExternalWorkflowExecutionDecisionAttributes != null && { - requestCancelExternalWorkflowExecutionDecisionAttributes: - se_RequestCancelExternalWorkflowExecutionDecisionAttributes( - input.requestCancelExternalWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.scheduleActivityTaskDecisionAttributes != null && { - scheduleActivityTaskDecisionAttributes: se_ScheduleActivityTaskDecisionAttributes( - input.scheduleActivityTaskDecisionAttributes, - context - ), - }), - ...(input.scheduleLambdaFunctionDecisionAttributes != null && { - scheduleLambdaFunctionDecisionAttributes: se_ScheduleLambdaFunctionDecisionAttributes( - input.scheduleLambdaFunctionDecisionAttributes, - context - ), - }), - ...(input.signalExternalWorkflowExecutionDecisionAttributes != null && { - signalExternalWorkflowExecutionDecisionAttributes: se_SignalExternalWorkflowExecutionDecisionAttributes( - input.signalExternalWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.startChildWorkflowExecutionDecisionAttributes != null && { - startChildWorkflowExecutionDecisionAttributes: se_StartChildWorkflowExecutionDecisionAttributes( - input.startChildWorkflowExecutionDecisionAttributes, - context - ), - }), - ...(input.startTimerDecisionAttributes != null && { - startTimerDecisionAttributes: se_StartTimerDecisionAttributes(input.startTimerDecisionAttributes, context), - }), - }; -}; +// se_Decision omitted. -/** - * serializeAws_json1_0DecisionList - */ -const se_DecisionList = (input: Decision[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Decision(entry, context); - }); -}; +// se_DecisionList omitted. -/** - * serializeAws_json1_0DeprecateActivityTypeInput - */ -const se_DeprecateActivityTypeInput = (input: DeprecateActivityTypeInput, context: __SerdeContext): any => { - return { - ...(input.activityType != null && { activityType: se_ActivityType(input.activityType, context) }), - ...(input.domain != null && { domain: input.domain }), - }; -}; +// se_DeprecateActivityTypeInput omitted. -/** - * serializeAws_json1_0DeprecateDomainInput - */ -const se_DeprecateDomainInput = (input: DeprecateDomainInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DeprecateDomainInput omitted. -/** - * serializeAws_json1_0DeprecateWorkflowTypeInput - */ -const se_DeprecateWorkflowTypeInput = (input: DeprecateWorkflowTypeInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.workflowType != null && { workflowType: se_WorkflowType(input.workflowType, context) }), - }; -}; +// se_DeprecateWorkflowTypeInput omitted. -/** - * serializeAws_json1_0DescribeActivityTypeInput - */ -const se_DescribeActivityTypeInput = (input: DescribeActivityTypeInput, context: __SerdeContext): any => { - return { - ...(input.activityType != null && { activityType: se_ActivityType(input.activityType, context) }), - ...(input.domain != null && { domain: input.domain }), - }; -}; +// se_DescribeActivityTypeInput omitted. -/** - * serializeAws_json1_0DescribeDomainInput - */ -const se_DescribeDomainInput = (input: DescribeDomainInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; +// se_DescribeDomainInput omitted. -/** - * serializeAws_json1_0DescribeWorkflowExecutionInput - */ -const se_DescribeWorkflowExecutionInput = (input: DescribeWorkflowExecutionInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.execution != null && { execution: se_WorkflowExecution(input.execution, context) }), - }; -}; +// se_DescribeWorkflowExecutionInput omitted. -/** - * serializeAws_json1_0DescribeWorkflowTypeInput - */ -const se_DescribeWorkflowTypeInput = (input: DescribeWorkflowTypeInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.workflowType != null && { workflowType: se_WorkflowType(input.workflowType, context) }), - }; -}; +// se_DescribeWorkflowTypeInput omitted. /** * serializeAws_json1_0ExecutionTimeFilter */ const se_ExecutionTimeFilter = (input: ExecutionTimeFilter, context: __SerdeContext): any => { - return { - ...(input.latestDate != null && { latestDate: Math.round(input.latestDate.getTime() / 1000) }), - ...(input.oldestDate != null && { oldestDate: Math.round(input.oldestDate.getTime() / 1000) }), - }; + return take(input, { + latestDate: (_) => Math.round(_.getTime() / 1000), + oldestDate: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_0FailWorkflowExecutionDecisionAttributes - */ -const se_FailWorkflowExecutionDecisionAttributes = ( - input: FailWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.details != null && { details: input.details }), - ...(input.reason != null && { reason: input.reason }), - }; -}; +// se_FailWorkflowExecutionDecisionAttributes omitted. -/** - * serializeAws_json1_0GetWorkflowExecutionHistoryInput - */ -const se_GetWorkflowExecutionHistoryInput = (input: GetWorkflowExecutionHistoryInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.execution != null && { execution: se_WorkflowExecution(input.execution, context) }), - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - }; -}; +// se_GetWorkflowExecutionHistoryInput omitted. -/** - * serializeAws_json1_0ListActivityTypesInput - */ -const se_ListActivityTypesInput = (input: ListActivityTypesInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.name != null && { name: input.name }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.registrationStatus != null && { registrationStatus: input.registrationStatus }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - }; -}; +// se_ListActivityTypesInput omitted. /** * serializeAws_json1_0ListClosedWorkflowExecutionsInput @@ -3131,2022 +2769,449 @@ const se_ListClosedWorkflowExecutionsInput = ( input: ListClosedWorkflowExecutionsInput, context: __SerdeContext ): any => { - return { - ...(input.closeStatusFilter != null && { - closeStatusFilter: se_CloseStatusFilter(input.closeStatusFilter, context), - }), - ...(input.closeTimeFilter != null && { closeTimeFilter: se_ExecutionTimeFilter(input.closeTimeFilter, context) }), - ...(input.domain != null && { domain: input.domain }), - ...(input.executionFilter != null && { - executionFilter: se_WorkflowExecutionFilter(input.executionFilter, context), - }), - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - ...(input.startTimeFilter != null && { startTimeFilter: se_ExecutionTimeFilter(input.startTimeFilter, context) }), - ...(input.tagFilter != null && { tagFilter: se_TagFilter(input.tagFilter, context) }), - ...(input.typeFilter != null && { typeFilter: se_WorkflowTypeFilter(input.typeFilter, context) }), - }; + return take(input, { + closeStatusFilter: _json, + closeTimeFilter: (_) => se_ExecutionTimeFilter(_, context), + domain: [], + executionFilter: _json, + maximumPageSize: [], + nextPageToken: [], + reverseOrder: [], + startTimeFilter: (_) => se_ExecutionTimeFilter(_, context), + tagFilter: _json, + typeFilter: _json, + }); }; -/** - * serializeAws_json1_0ListDomainsInput - */ -const se_ListDomainsInput = (input: ListDomainsInput, context: __SerdeContext): any => { - return { - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.registrationStatus != null && { registrationStatus: input.registrationStatus }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - }; -}; +// se_ListDomainsInput omitted. /** * serializeAws_json1_0ListOpenWorkflowExecutionsInput */ const se_ListOpenWorkflowExecutionsInput = (input: ListOpenWorkflowExecutionsInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.executionFilter != null && { - executionFilter: se_WorkflowExecutionFilter(input.executionFilter, context), - }), - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - ...(input.startTimeFilter != null && { startTimeFilter: se_ExecutionTimeFilter(input.startTimeFilter, context) }), - ...(input.tagFilter != null && { tagFilter: se_TagFilter(input.tagFilter, context) }), - ...(input.typeFilter != null && { typeFilter: se_WorkflowTypeFilter(input.typeFilter, context) }), - }; + return take(input, { + domain: [], + executionFilter: _json, + maximumPageSize: [], + nextPageToken: [], + reverseOrder: [], + startTimeFilter: (_) => se_ExecutionTimeFilter(_, context), + tagFilter: _json, + typeFilter: _json, + }); }; -/** - * serializeAws_json1_0ListTagsForResourceInput - */ -const se_ListTagsForResourceInput = (input: ListTagsForResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - }; -}; +// se_ListTagsForResourceInput omitted. -/** - * serializeAws_json1_0ListWorkflowTypesInput - */ -const se_ListWorkflowTypesInput = (input: ListWorkflowTypesInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.name != null && { name: input.name }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.registrationStatus != null && { registrationStatus: input.registrationStatus }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - }; -}; +// se_ListWorkflowTypesInput omitted. -/** - * serializeAws_json1_0PollForActivityTaskInput - */ -const se_PollForActivityTaskInput = (input: PollForActivityTaskInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.identity != null && { identity: input.identity }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - }; -}; +// se_PollForActivityTaskInput omitted. -/** - * serializeAws_json1_0PollForDecisionTaskInput - */ -const se_PollForDecisionTaskInput = (input: PollForDecisionTaskInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.identity != null && { identity: input.identity }), - ...(input.maximumPageSize != null && { maximumPageSize: input.maximumPageSize }), - ...(input.nextPageToken != null && { nextPageToken: input.nextPageToken }), - ...(input.reverseOrder != null && { reverseOrder: input.reverseOrder }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - }; -}; +// se_PollForDecisionTaskInput omitted. -/** - * serializeAws_json1_0RecordActivityTaskHeartbeatInput - */ -const se_RecordActivityTaskHeartbeatInput = (input: RecordActivityTaskHeartbeatInput, context: __SerdeContext): any => { - return { - ...(input.details != null && { details: input.details }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_RecordActivityTaskHeartbeatInput omitted. -/** - * serializeAws_json1_0RecordMarkerDecisionAttributes - */ -const se_RecordMarkerDecisionAttributes = (input: RecordMarkerDecisionAttributes, context: __SerdeContext): any => { - return { - ...(input.details != null && { details: input.details }), - ...(input.markerName != null && { markerName: input.markerName }), - }; -}; +// se_RecordMarkerDecisionAttributes omitted. -/** - * serializeAws_json1_0RegisterActivityTypeInput - */ -const se_RegisterActivityTypeInput = (input: RegisterActivityTypeInput, context: __SerdeContext): any => { - return { - ...(input.defaultTaskHeartbeatTimeout != null && { - defaultTaskHeartbeatTimeout: input.defaultTaskHeartbeatTimeout, - }), - ...(input.defaultTaskList != null && { defaultTaskList: se_TaskList(input.defaultTaskList, context) }), - ...(input.defaultTaskPriority != null && { defaultTaskPriority: input.defaultTaskPriority }), - ...(input.defaultTaskScheduleToCloseTimeout != null && { - defaultTaskScheduleToCloseTimeout: input.defaultTaskScheduleToCloseTimeout, - }), - ...(input.defaultTaskScheduleToStartTimeout != null && { - defaultTaskScheduleToStartTimeout: input.defaultTaskScheduleToStartTimeout, - }), - ...(input.defaultTaskStartToCloseTimeout != null && { - defaultTaskStartToCloseTimeout: input.defaultTaskStartToCloseTimeout, - }), - ...(input.description != null && { description: input.description }), - ...(input.domain != null && { domain: input.domain }), - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_RegisterActivityTypeInput omitted. -/** - * serializeAws_json1_0RegisterDomainInput - */ -const se_RegisterDomainInput = (input: RegisterDomainInput, context: __SerdeContext): any => { - return { - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_ResourceTagList(input.tags, context) }), - ...(input.workflowExecutionRetentionPeriodInDays != null && { - workflowExecutionRetentionPeriodInDays: input.workflowExecutionRetentionPeriodInDays, - }), - }; -}; +// se_RegisterDomainInput omitted. -/** - * serializeAws_json1_0RegisterWorkflowTypeInput - */ -const se_RegisterWorkflowTypeInput = (input: RegisterWorkflowTypeInput, context: __SerdeContext): any => { - return { - ...(input.defaultChildPolicy != null && { defaultChildPolicy: input.defaultChildPolicy }), - ...(input.defaultExecutionStartToCloseTimeout != null && { - defaultExecutionStartToCloseTimeout: input.defaultExecutionStartToCloseTimeout, - }), - ...(input.defaultLambdaRole != null && { defaultLambdaRole: input.defaultLambdaRole }), - ...(input.defaultTaskList != null && { defaultTaskList: se_TaskList(input.defaultTaskList, context) }), - ...(input.defaultTaskPriority != null && { defaultTaskPriority: input.defaultTaskPriority }), - ...(input.defaultTaskStartToCloseTimeout != null && { - defaultTaskStartToCloseTimeout: input.defaultTaskStartToCloseTimeout, - }), - ...(input.description != null && { description: input.description }), - ...(input.domain != null && { domain: input.domain }), - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_RegisterWorkflowTypeInput omitted. -/** - * serializeAws_json1_0RequestCancelActivityTaskDecisionAttributes - */ -const se_RequestCancelActivityTaskDecisionAttributes = ( - input: RequestCancelActivityTaskDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.activityId != null && { activityId: input.activityId }), - }; -}; +// se_RequestCancelActivityTaskDecisionAttributes omitted. -/** - * serializeAws_json1_0RequestCancelExternalWorkflowExecutionDecisionAttributes - */ -const se_RequestCancelExternalWorkflowExecutionDecisionAttributes = ( - input: RequestCancelExternalWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.control != null && { control: input.control }), - ...(input.runId != null && { runId: input.runId }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; +// se_RequestCancelExternalWorkflowExecutionDecisionAttributes omitted. -/** - * serializeAws_json1_0RequestCancelWorkflowExecutionInput - */ -const se_RequestCancelWorkflowExecutionInput = ( - input: RequestCancelWorkflowExecutionInput, - context: __SerdeContext -): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.runId != null && { runId: input.runId }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; +// se_RequestCancelWorkflowExecutionInput omitted. -/** - * serializeAws_json1_0ResourceTag - */ -const se_ResourceTag = (input: ResourceTag, context: __SerdeContext): any => { - return { - ...(input.key != null && { key: input.key }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_ResourceTag omitted. -/** - * serializeAws_json1_0ResourceTagKeyList - */ -const se_ResourceTagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceTagKeyList omitted. -/** - * serializeAws_json1_0ResourceTagList - */ -const se_ResourceTagList = (input: ResourceTag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ResourceTag(entry, context); - }); -}; +// se_ResourceTagList omitted. -/** - * serializeAws_json1_0RespondActivityTaskCanceledInput - */ -const se_RespondActivityTaskCanceledInput = (input: RespondActivityTaskCanceledInput, context: __SerdeContext): any => { - return { - ...(input.details != null && { details: input.details }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_RespondActivityTaskCanceledInput omitted. -/** - * serializeAws_json1_0RespondActivityTaskCompletedInput - */ -const se_RespondActivityTaskCompletedInput = ( - input: RespondActivityTaskCompletedInput, - context: __SerdeContext -): any => { - return { - ...(input.result != null && { result: input.result }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_RespondActivityTaskCompletedInput omitted. -/** - * serializeAws_json1_0RespondActivityTaskFailedInput - */ -const se_RespondActivityTaskFailedInput = (input: RespondActivityTaskFailedInput, context: __SerdeContext): any => { - return { - ...(input.details != null && { details: input.details }), - ...(input.reason != null && { reason: input.reason }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_RespondActivityTaskFailedInput omitted. -/** - * serializeAws_json1_0RespondDecisionTaskCompletedInput - */ -const se_RespondDecisionTaskCompletedInput = ( - input: RespondDecisionTaskCompletedInput, - context: __SerdeContext -): any => { - return { - ...(input.decisions != null && { decisions: se_DecisionList(input.decisions, context) }), - ...(input.executionContext != null && { executionContext: input.executionContext }), - ...(input.taskToken != null && { taskToken: input.taskToken }), - }; -}; +// se_RespondDecisionTaskCompletedInput omitted. -/** - * serializeAws_json1_0ScheduleActivityTaskDecisionAttributes - */ -const se_ScheduleActivityTaskDecisionAttributes = ( - input: ScheduleActivityTaskDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.activityId != null && { activityId: input.activityId }), - ...(input.activityType != null && { activityType: se_ActivityType(input.activityType, context) }), - ...(input.control != null && { control: input.control }), - ...(input.heartbeatTimeout != null && { heartbeatTimeout: input.heartbeatTimeout }), - ...(input.input != null && { input: input.input }), - ...(input.scheduleToCloseTimeout != null && { scheduleToCloseTimeout: input.scheduleToCloseTimeout }), - ...(input.scheduleToStartTimeout != null && { scheduleToStartTimeout: input.scheduleToStartTimeout }), - ...(input.startToCloseTimeout != null && { startToCloseTimeout: input.startToCloseTimeout }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - ...(input.taskPriority != null && { taskPriority: input.taskPriority }), - }; -}; +// se_ScheduleActivityTaskDecisionAttributes omitted. -/** - * serializeAws_json1_0ScheduleLambdaFunctionDecisionAttributes - */ -const se_ScheduleLambdaFunctionDecisionAttributes = ( - input: ScheduleLambdaFunctionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.control != null && { control: input.control }), - ...(input.id != null && { id: input.id }), - ...(input.input != null && { input: input.input }), - ...(input.name != null && { name: input.name }), - ...(input.startToCloseTimeout != null && { startToCloseTimeout: input.startToCloseTimeout }), - }; -}; +// se_ScheduleLambdaFunctionDecisionAttributes omitted. -/** - * serializeAws_json1_0SignalExternalWorkflowExecutionDecisionAttributes - */ -const se_SignalExternalWorkflowExecutionDecisionAttributes = ( - input: SignalExternalWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.control != null && { control: input.control }), - ...(input.input != null && { input: input.input }), - ...(input.runId != null && { runId: input.runId }), - ...(input.signalName != null && { signalName: input.signalName }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; +// se_SignalExternalWorkflowExecutionDecisionAttributes omitted. -/** - * serializeAws_json1_0SignalWorkflowExecutionInput - */ -const se_SignalWorkflowExecutionInput = (input: SignalWorkflowExecutionInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.input != null && { input: input.input }), - ...(input.runId != null && { runId: input.runId }), - ...(input.signalName != null && { signalName: input.signalName }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; - -/** - * serializeAws_json1_0StartChildWorkflowExecutionDecisionAttributes - */ -const se_StartChildWorkflowExecutionDecisionAttributes = ( - input: StartChildWorkflowExecutionDecisionAttributes, - context: __SerdeContext -): any => { - return { - ...(input.childPolicy != null && { childPolicy: input.childPolicy }), - ...(input.control != null && { control: input.control }), - ...(input.executionStartToCloseTimeout != null && { - executionStartToCloseTimeout: input.executionStartToCloseTimeout, - }), - ...(input.input != null && { input: input.input }), - ...(input.lambdaRole != null && { lambdaRole: input.lambdaRole }), - ...(input.tagList != null && { tagList: se_TagList(input.tagList, context) }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - ...(input.taskPriority != null && { taskPriority: input.taskPriority }), - ...(input.taskStartToCloseTimeout != null && { taskStartToCloseTimeout: input.taskStartToCloseTimeout }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - ...(input.workflowType != null && { workflowType: se_WorkflowType(input.workflowType, context) }), - }; -}; - -/** - * serializeAws_json1_0StartTimerDecisionAttributes - */ -const se_StartTimerDecisionAttributes = (input: StartTimerDecisionAttributes, context: __SerdeContext): any => { - return { - ...(input.control != null && { control: input.control }), - ...(input.startToFireTimeout != null && { startToFireTimeout: input.startToFireTimeout }), - ...(input.timerId != null && { timerId: input.timerId }), - }; -}; - -/** - * serializeAws_json1_0StartWorkflowExecutionInput - */ -const se_StartWorkflowExecutionInput = (input: StartWorkflowExecutionInput, context: __SerdeContext): any => { - return { - ...(input.childPolicy != null && { childPolicy: input.childPolicy }), - ...(input.domain != null && { domain: input.domain }), - ...(input.executionStartToCloseTimeout != null && { - executionStartToCloseTimeout: input.executionStartToCloseTimeout, - }), - ...(input.input != null && { input: input.input }), - ...(input.lambdaRole != null && { lambdaRole: input.lambdaRole }), - ...(input.tagList != null && { tagList: se_TagList(input.tagList, context) }), - ...(input.taskList != null && { taskList: se_TaskList(input.taskList, context) }), - ...(input.taskPriority != null && { taskPriority: input.taskPriority }), - ...(input.taskStartToCloseTimeout != null && { taskStartToCloseTimeout: input.taskStartToCloseTimeout }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - ...(input.workflowType != null && { workflowType: se_WorkflowType(input.workflowType, context) }), - }; -}; - -/** - * serializeAws_json1_0TagFilter - */ -const se_TagFilter = (input: TagFilter, context: __SerdeContext): any => { - return { - ...(input.tag != null && { tag: input.tag }), - }; -}; - -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_0TagResourceInput - */ -const se_TagResourceInput = (input: TagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tags != null && { tags: se_ResourceTagList(input.tags, context) }), - }; -}; - -/** - * serializeAws_json1_0TaskList - */ -const se_TaskList = (input: TaskList, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_0TerminateWorkflowExecutionInput - */ -const se_TerminateWorkflowExecutionInput = (input: TerminateWorkflowExecutionInput, context: __SerdeContext): any => { - return { - ...(input.childPolicy != null && { childPolicy: input.childPolicy }), - ...(input.details != null && { details: input.details }), - ...(input.domain != null && { domain: input.domain }), - ...(input.reason != null && { reason: input.reason }), - ...(input.runId != null && { runId: input.runId }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; - -/** - * serializeAws_json1_0UndeprecateActivityTypeInput - */ -const se_UndeprecateActivityTypeInput = (input: UndeprecateActivityTypeInput, context: __SerdeContext): any => { - return { - ...(input.activityType != null && { activityType: se_ActivityType(input.activityType, context) }), - ...(input.domain != null && { domain: input.domain }), - }; -}; - -/** - * serializeAws_json1_0UndeprecateDomainInput - */ -const se_UndeprecateDomainInput = (input: UndeprecateDomainInput, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - }; -}; - -/** - * serializeAws_json1_0UndeprecateWorkflowTypeInput - */ -const se_UndeprecateWorkflowTypeInput = (input: UndeprecateWorkflowTypeInput, context: __SerdeContext): any => { - return { - ...(input.domain != null && { domain: input.domain }), - ...(input.workflowType != null && { workflowType: se_WorkflowType(input.workflowType, context) }), - }; -}; - -/** - * serializeAws_json1_0UntagResourceInput - */ -const se_UntagResourceInput = (input: UntagResourceInput, context: __SerdeContext): any => { - return { - ...(input.resourceArn != null && { resourceArn: input.resourceArn }), - ...(input.tagKeys != null && { tagKeys: se_ResourceTagKeyList(input.tagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_0WorkflowExecution - */ -const se_WorkflowExecution = (input: WorkflowExecution, context: __SerdeContext): any => { - return { - ...(input.runId != null && { runId: input.runId }), - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; - -/** - * serializeAws_json1_0WorkflowExecutionFilter - */ -const se_WorkflowExecutionFilter = (input: WorkflowExecutionFilter, context: __SerdeContext): any => { - return { - ...(input.workflowId != null && { workflowId: input.workflowId }), - }; -}; - -/** - * serializeAws_json1_0WorkflowType - */ -const se_WorkflowType = (input: WorkflowType, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_SignalWorkflowExecutionInput omitted. -/** - * serializeAws_json1_0WorkflowTypeFilter - */ -const se_WorkflowTypeFilter = (input: WorkflowTypeFilter, context: __SerdeContext): any => { - return { - ...(input.name != null && { name: input.name }), - ...(input.version != null && { version: input.version }), - }; -}; +// se_StartChildWorkflowExecutionDecisionAttributes omitted. -/** - * deserializeAws_json1_0ActivityTask - */ -const de_ActivityTask = (output: any, context: __SerdeContext): ActivityTask => { - return { - activityId: __expectString(output.activityId), - activityType: output.activityType != null ? de_ActivityType(output.activityType, context) : undefined, - input: __expectString(output.input), - startedEventId: __expectLong(output.startedEventId), - taskToken: __expectString(output.taskToken), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - } as any; -}; +// se_StartTimerDecisionAttributes omitted. -/** - * deserializeAws_json1_0ActivityTaskCanceledEventAttributes - */ -const de_ActivityTaskCanceledEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskCanceledEventAttributes => { - return { - details: __expectString(output.details), - latestCancelRequestedEventId: __expectLong(output.latestCancelRequestedEventId), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - } as any; -}; +// se_StartWorkflowExecutionInput omitted. -/** - * deserializeAws_json1_0ActivityTaskCancelRequestedEventAttributes - */ -const de_ActivityTaskCancelRequestedEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskCancelRequestedEventAttributes => { - return { - activityId: __expectString(output.activityId), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; +// se_TagFilter omitted. -/** - * deserializeAws_json1_0ActivityTaskCompletedEventAttributes - */ -const de_ActivityTaskCompletedEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskCompletedEventAttributes => { - return { - result: __expectString(output.result), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_0ActivityTaskFailedEventAttributes - */ -const de_ActivityTaskFailedEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskFailedEventAttributes => { - return { - details: __expectString(output.details), - reason: __expectString(output.reason), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - } as any; -}; +// se_TagResourceInput omitted. -/** - * deserializeAws_json1_0ActivityTaskScheduledEventAttributes - */ -const de_ActivityTaskScheduledEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskScheduledEventAttributes => { - return { - activityId: __expectString(output.activityId), - activityType: output.activityType != null ? de_ActivityType(output.activityType, context) : undefined, - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - heartbeatTimeout: __expectString(output.heartbeatTimeout), - input: __expectString(output.input), - scheduleToCloseTimeout: __expectString(output.scheduleToCloseTimeout), - scheduleToStartTimeout: __expectString(output.scheduleToStartTimeout), - startToCloseTimeout: __expectString(output.startToCloseTimeout), - taskList: output.taskList != null ? de_TaskList(output.taskList, context) : undefined, - taskPriority: __expectString(output.taskPriority), - } as any; -}; +// se_TaskList omitted. -/** - * deserializeAws_json1_0ActivityTaskStartedEventAttributes - */ -const de_ActivityTaskStartedEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskStartedEventAttributes => { - return { - identity: __expectString(output.identity), - scheduledEventId: __expectLong(output.scheduledEventId), - } as any; -}; +// se_TerminateWorkflowExecutionInput omitted. -/** - * deserializeAws_json1_0ActivityTaskStatus - */ -const de_ActivityTaskStatus = (output: any, context: __SerdeContext): ActivityTaskStatus => { - return { - cancelRequested: __expectBoolean(output.cancelRequested), - } as any; -}; +// se_UndeprecateActivityTypeInput omitted. -/** - * deserializeAws_json1_0ActivityTaskTimedOutEventAttributes - */ -const de_ActivityTaskTimedOutEventAttributes = ( - output: any, - context: __SerdeContext -): ActivityTaskTimedOutEventAttributes => { - return { - details: __expectString(output.details), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - timeoutType: __expectString(output.timeoutType), - } as any; -}; +// se_UndeprecateDomainInput omitted. -/** - * deserializeAws_json1_0ActivityType - */ -const de_ActivityType = (output: any, context: __SerdeContext): ActivityType => { - return { - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; +// se_UndeprecateWorkflowTypeInput omitted. -/** - * deserializeAws_json1_0ActivityTypeConfiguration - */ -const de_ActivityTypeConfiguration = (output: any, context: __SerdeContext): ActivityTypeConfiguration => { - return { - defaultTaskHeartbeatTimeout: __expectString(output.defaultTaskHeartbeatTimeout), - defaultTaskList: output.defaultTaskList != null ? de_TaskList(output.defaultTaskList, context) : undefined, - defaultTaskPriority: __expectString(output.defaultTaskPriority), - defaultTaskScheduleToCloseTimeout: __expectString(output.defaultTaskScheduleToCloseTimeout), - defaultTaskScheduleToStartTimeout: __expectString(output.defaultTaskScheduleToStartTimeout), - defaultTaskStartToCloseTimeout: __expectString(output.defaultTaskStartToCloseTimeout), - } as any; -}; +// se_UntagResourceInput omitted. -/** - * deserializeAws_json1_0ActivityTypeDetail - */ -const de_ActivityTypeDetail = (output: any, context: __SerdeContext): ActivityTypeDetail => { - return { - configuration: - output.configuration != null ? de_ActivityTypeConfiguration(output.configuration, context) : undefined, - typeInfo: output.typeInfo != null ? de_ActivityTypeInfo(output.typeInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ActivityTypeInfo - */ -const de_ActivityTypeInfo = (output: any, context: __SerdeContext): ActivityTypeInfo => { - return { - activityType: output.activityType != null ? de_ActivityType(output.activityType, context) : undefined, - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - deprecationDate: - output.deprecationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deprecationDate))) - : undefined, - description: __expectString(output.description), - status: __expectString(output.status), - } as any; -}; +// se_WorkflowExecution omitted. -/** - * deserializeAws_json1_0ActivityTypeInfoList - */ -const de_ActivityTypeInfoList = (output: any, context: __SerdeContext): ActivityTypeInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActivityTypeInfo(entry, context); - }); - return retVal; -}; +// se_WorkflowExecutionFilter omitted. -/** - * deserializeAws_json1_0ActivityTypeInfos - */ -const de_ActivityTypeInfos = (output: any, context: __SerdeContext): ActivityTypeInfos => { - return { - nextPageToken: __expectString(output.nextPageToken), - typeInfos: output.typeInfos != null ? de_ActivityTypeInfoList(output.typeInfos, context) : undefined, - } as any; -}; +// se_WorkflowType omitted. -/** - * deserializeAws_json1_0CancelTimerFailedEventAttributes - */ -const de_CancelTimerFailedEventAttributes = ( - output: any, - context: __SerdeContext -): CancelTimerFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - timerId: __expectString(output.timerId), - } as any; -}; - -/** - * deserializeAws_json1_0CancelWorkflowExecutionFailedEventAttributes - */ -const de_CancelWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): CancelWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; - -/** - * deserializeAws_json1_0ChildWorkflowExecutionCanceledEventAttributes - */ -const de_ChildWorkflowExecutionCanceledEventAttributes = ( - output: any, - context: __SerdeContext -): ChildWorkflowExecutionCanceledEventAttributes => { - return { - details: __expectString(output.details), - initiatedEventId: __expectLong(output.initiatedEventId), - startedEventId: __expectLong(output.startedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ChildWorkflowExecutionCompletedEventAttributes - */ -const de_ChildWorkflowExecutionCompletedEventAttributes = ( - output: any, - context: __SerdeContext -): ChildWorkflowExecutionCompletedEventAttributes => { - return { - initiatedEventId: __expectLong(output.initiatedEventId), - result: __expectString(output.result), - startedEventId: __expectLong(output.startedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ChildWorkflowExecutionFailedEventAttributes - */ -const de_ChildWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): ChildWorkflowExecutionFailedEventAttributes => { - return { - details: __expectString(output.details), - initiatedEventId: __expectLong(output.initiatedEventId), - reason: __expectString(output.reason), - startedEventId: __expectLong(output.startedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ChildWorkflowExecutionStartedEventAttributes - */ -const de_ChildWorkflowExecutionStartedEventAttributes = ( - output: any, - context: __SerdeContext -): ChildWorkflowExecutionStartedEventAttributes => { - return { - initiatedEventId: __expectLong(output.initiatedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ChildWorkflowExecutionTerminatedEventAttributes - */ -const de_ChildWorkflowExecutionTerminatedEventAttributes = ( - output: any, - context: __SerdeContext -): ChildWorkflowExecutionTerminatedEventAttributes => { - return { - initiatedEventId: __expectLong(output.initiatedEventId), - startedEventId: __expectLong(output.startedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ChildWorkflowExecutionTimedOutEventAttributes - */ -const de_ChildWorkflowExecutionTimedOutEventAttributes = ( - output: any, - context: __SerdeContext -): ChildWorkflowExecutionTimedOutEventAttributes => { - return { - initiatedEventId: __expectLong(output.initiatedEventId), - startedEventId: __expectLong(output.startedEventId), - timeoutType: __expectString(output.timeoutType), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0CompleteWorkflowExecutionFailedEventAttributes - */ -const de_CompleteWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): CompleteWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; - -/** - * deserializeAws_json1_0ContinueAsNewWorkflowExecutionFailedEventAttributes - */ -const de_ContinueAsNewWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): ContinueAsNewWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; - -/** - * deserializeAws_json1_0DecisionTask - */ -const de_DecisionTask = (output: any, context: __SerdeContext): DecisionTask => { - return { - events: output.events != null ? de_HistoryEventList(output.events, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - previousStartedEventId: __expectLong(output.previousStartedEventId), - startedEventId: __expectLong(output.startedEventId), - taskToken: __expectString(output.taskToken), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DecisionTaskCompletedEventAttributes - */ -const de_DecisionTaskCompletedEventAttributes = ( - output: any, - context: __SerdeContext -): DecisionTaskCompletedEventAttributes => { - return { - executionContext: __expectString(output.executionContext), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - } as any; -}; - -/** - * deserializeAws_json1_0DecisionTaskScheduledEventAttributes - */ -const de_DecisionTaskScheduledEventAttributes = ( - output: any, - context: __SerdeContext -): DecisionTaskScheduledEventAttributes => { - return { - startToCloseTimeout: __expectString(output.startToCloseTimeout), - taskList: output.taskList != null ? de_TaskList(output.taskList, context) : undefined, - taskPriority: __expectString(output.taskPriority), - } as any; -}; - -/** - * deserializeAws_json1_0DecisionTaskStartedEventAttributes - */ -const de_DecisionTaskStartedEventAttributes = ( - output: any, - context: __SerdeContext -): DecisionTaskStartedEventAttributes => { - return { - identity: __expectString(output.identity), - scheduledEventId: __expectLong(output.scheduledEventId), - } as any; -}; - -/** - * deserializeAws_json1_0DecisionTaskTimedOutEventAttributes - */ -const de_DecisionTaskTimedOutEventAttributes = ( - output: any, - context: __SerdeContext -): DecisionTaskTimedOutEventAttributes => { - return { - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - timeoutType: __expectString(output.timeoutType), - } as any; -}; - -/** - * deserializeAws_json1_0DefaultUndefinedFault - */ -const de_DefaultUndefinedFault = (output: any, context: __SerdeContext): DefaultUndefinedFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0DomainAlreadyExistsFault - */ -const de_DomainAlreadyExistsFault = (output: any, context: __SerdeContext): DomainAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0DomainConfiguration - */ -const de_DomainConfiguration = (output: any, context: __SerdeContext): DomainConfiguration => { - return { - workflowExecutionRetentionPeriodInDays: __expectString(output.workflowExecutionRetentionPeriodInDays), - } as any; -}; - -/** - * deserializeAws_json1_0DomainDeprecatedFault - */ -const de_DomainDeprecatedFault = (output: any, context: __SerdeContext): DomainDeprecatedFault => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_0DomainDetail - */ -const de_DomainDetail = (output: any, context: __SerdeContext): DomainDetail => { - return { - configuration: output.configuration != null ? de_DomainConfiguration(output.configuration, context) : undefined, - domainInfo: output.domainInfo != null ? de_DomainInfo(output.domainInfo, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0DomainInfo - */ -const de_DomainInfo = (output: any, context: __SerdeContext): DomainInfo => { - return { - arn: __expectString(output.arn), - description: __expectString(output.description), - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_json1_0DomainInfoList - */ -const de_DomainInfoList = (output: any, context: __SerdeContext): DomainInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DomainInfo(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0DomainInfos - */ -const de_DomainInfos = (output: any, context: __SerdeContext): DomainInfos => { - return { - domainInfos: output.domainInfos != null ? de_DomainInfoList(output.domainInfos, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; -}; - -/** - * deserializeAws_json1_0ExternalWorkflowExecutionCancelRequestedEventAttributes - */ -const de_ExternalWorkflowExecutionCancelRequestedEventAttributes = ( - output: any, - context: __SerdeContext -): ExternalWorkflowExecutionCancelRequestedEventAttributes => { - return { - initiatedEventId: __expectLong(output.initiatedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0ExternalWorkflowExecutionSignaledEventAttributes - */ -const de_ExternalWorkflowExecutionSignaledEventAttributes = ( - output: any, - context: __SerdeContext -): ExternalWorkflowExecutionSignaledEventAttributes => { - return { - initiatedEventId: __expectLong(output.initiatedEventId), - workflowExecution: - output.workflowExecution != null ? de_WorkflowExecution(output.workflowExecution, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0FailWorkflowExecutionFailedEventAttributes - */ -const de_FailWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): FailWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; - -/** - * deserializeAws_json1_0History - */ -const de_History = (output: any, context: __SerdeContext): History => { - return { - events: output.events != null ? de_HistoryEventList(output.events, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; -}; - -/** - * deserializeAws_json1_0HistoryEvent - */ -const de_HistoryEvent = (output: any, context: __SerdeContext): HistoryEvent => { - return { - activityTaskCancelRequestedEventAttributes: - output.activityTaskCancelRequestedEventAttributes != null - ? de_ActivityTaskCancelRequestedEventAttributes(output.activityTaskCancelRequestedEventAttributes, context) - : undefined, - activityTaskCanceledEventAttributes: - output.activityTaskCanceledEventAttributes != null - ? de_ActivityTaskCanceledEventAttributes(output.activityTaskCanceledEventAttributes, context) - : undefined, - activityTaskCompletedEventAttributes: - output.activityTaskCompletedEventAttributes != null - ? de_ActivityTaskCompletedEventAttributes(output.activityTaskCompletedEventAttributes, context) - : undefined, - activityTaskFailedEventAttributes: - output.activityTaskFailedEventAttributes != null - ? de_ActivityTaskFailedEventAttributes(output.activityTaskFailedEventAttributes, context) - : undefined, - activityTaskScheduledEventAttributes: - output.activityTaskScheduledEventAttributes != null - ? de_ActivityTaskScheduledEventAttributes(output.activityTaskScheduledEventAttributes, context) - : undefined, - activityTaskStartedEventAttributes: - output.activityTaskStartedEventAttributes != null - ? de_ActivityTaskStartedEventAttributes(output.activityTaskStartedEventAttributes, context) - : undefined, - activityTaskTimedOutEventAttributes: - output.activityTaskTimedOutEventAttributes != null - ? de_ActivityTaskTimedOutEventAttributes(output.activityTaskTimedOutEventAttributes, context) - : undefined, - cancelTimerFailedEventAttributes: - output.cancelTimerFailedEventAttributes != null - ? de_CancelTimerFailedEventAttributes(output.cancelTimerFailedEventAttributes, context) - : undefined, - cancelWorkflowExecutionFailedEventAttributes: - output.cancelWorkflowExecutionFailedEventAttributes != null - ? de_CancelWorkflowExecutionFailedEventAttributes(output.cancelWorkflowExecutionFailedEventAttributes, context) - : undefined, - childWorkflowExecutionCanceledEventAttributes: - output.childWorkflowExecutionCanceledEventAttributes != null - ? de_ChildWorkflowExecutionCanceledEventAttributes( - output.childWorkflowExecutionCanceledEventAttributes, - context - ) - : undefined, - childWorkflowExecutionCompletedEventAttributes: - output.childWorkflowExecutionCompletedEventAttributes != null - ? de_ChildWorkflowExecutionCompletedEventAttributes( - output.childWorkflowExecutionCompletedEventAttributes, - context - ) - : undefined, - childWorkflowExecutionFailedEventAttributes: - output.childWorkflowExecutionFailedEventAttributes != null - ? de_ChildWorkflowExecutionFailedEventAttributes(output.childWorkflowExecutionFailedEventAttributes, context) - : undefined, - childWorkflowExecutionStartedEventAttributes: - output.childWorkflowExecutionStartedEventAttributes != null - ? de_ChildWorkflowExecutionStartedEventAttributes(output.childWorkflowExecutionStartedEventAttributes, context) - : undefined, - childWorkflowExecutionTerminatedEventAttributes: - output.childWorkflowExecutionTerminatedEventAttributes != null - ? de_ChildWorkflowExecutionTerminatedEventAttributes( - output.childWorkflowExecutionTerminatedEventAttributes, - context - ) - : undefined, - childWorkflowExecutionTimedOutEventAttributes: - output.childWorkflowExecutionTimedOutEventAttributes != null - ? de_ChildWorkflowExecutionTimedOutEventAttributes( - output.childWorkflowExecutionTimedOutEventAttributes, - context - ) - : undefined, - completeWorkflowExecutionFailedEventAttributes: - output.completeWorkflowExecutionFailedEventAttributes != null - ? de_CompleteWorkflowExecutionFailedEventAttributes( - output.completeWorkflowExecutionFailedEventAttributes, - context - ) - : undefined, - continueAsNewWorkflowExecutionFailedEventAttributes: - output.continueAsNewWorkflowExecutionFailedEventAttributes != null - ? de_ContinueAsNewWorkflowExecutionFailedEventAttributes( - output.continueAsNewWorkflowExecutionFailedEventAttributes, - context - ) - : undefined, - decisionTaskCompletedEventAttributes: - output.decisionTaskCompletedEventAttributes != null - ? de_DecisionTaskCompletedEventAttributes(output.decisionTaskCompletedEventAttributes, context) - : undefined, - decisionTaskScheduledEventAttributes: - output.decisionTaskScheduledEventAttributes != null - ? de_DecisionTaskScheduledEventAttributes(output.decisionTaskScheduledEventAttributes, context) - : undefined, - decisionTaskStartedEventAttributes: - output.decisionTaskStartedEventAttributes != null - ? de_DecisionTaskStartedEventAttributes(output.decisionTaskStartedEventAttributes, context) - : undefined, - decisionTaskTimedOutEventAttributes: - output.decisionTaskTimedOutEventAttributes != null - ? de_DecisionTaskTimedOutEventAttributes(output.decisionTaskTimedOutEventAttributes, context) - : undefined, - eventId: __expectLong(output.eventId), - eventTimestamp: - output.eventTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.eventTimestamp))) - : undefined, - eventType: __expectString(output.eventType), - externalWorkflowExecutionCancelRequestedEventAttributes: - output.externalWorkflowExecutionCancelRequestedEventAttributes != null - ? de_ExternalWorkflowExecutionCancelRequestedEventAttributes( - output.externalWorkflowExecutionCancelRequestedEventAttributes, - context - ) - : undefined, - externalWorkflowExecutionSignaledEventAttributes: - output.externalWorkflowExecutionSignaledEventAttributes != null - ? de_ExternalWorkflowExecutionSignaledEventAttributes( - output.externalWorkflowExecutionSignaledEventAttributes, - context - ) - : undefined, - failWorkflowExecutionFailedEventAttributes: - output.failWorkflowExecutionFailedEventAttributes != null - ? de_FailWorkflowExecutionFailedEventAttributes(output.failWorkflowExecutionFailedEventAttributes, context) - : undefined, - lambdaFunctionCompletedEventAttributes: - output.lambdaFunctionCompletedEventAttributes != null - ? de_LambdaFunctionCompletedEventAttributes(output.lambdaFunctionCompletedEventAttributes, context) - : undefined, - lambdaFunctionFailedEventAttributes: - output.lambdaFunctionFailedEventAttributes != null - ? de_LambdaFunctionFailedEventAttributes(output.lambdaFunctionFailedEventAttributes, context) - : undefined, - lambdaFunctionScheduledEventAttributes: - output.lambdaFunctionScheduledEventAttributes != null - ? de_LambdaFunctionScheduledEventAttributes(output.lambdaFunctionScheduledEventAttributes, context) - : undefined, - lambdaFunctionStartedEventAttributes: - output.lambdaFunctionStartedEventAttributes != null - ? de_LambdaFunctionStartedEventAttributes(output.lambdaFunctionStartedEventAttributes, context) - : undefined, - lambdaFunctionTimedOutEventAttributes: - output.lambdaFunctionTimedOutEventAttributes != null - ? de_LambdaFunctionTimedOutEventAttributes(output.lambdaFunctionTimedOutEventAttributes, context) - : undefined, - markerRecordedEventAttributes: - output.markerRecordedEventAttributes != null - ? de_MarkerRecordedEventAttributes(output.markerRecordedEventAttributes, context) - : undefined, - recordMarkerFailedEventAttributes: - output.recordMarkerFailedEventAttributes != null - ? de_RecordMarkerFailedEventAttributes(output.recordMarkerFailedEventAttributes, context) - : undefined, - requestCancelActivityTaskFailedEventAttributes: - output.requestCancelActivityTaskFailedEventAttributes != null - ? de_RequestCancelActivityTaskFailedEventAttributes( - output.requestCancelActivityTaskFailedEventAttributes, - context - ) - : undefined, - requestCancelExternalWorkflowExecutionFailedEventAttributes: - output.requestCancelExternalWorkflowExecutionFailedEventAttributes != null - ? de_RequestCancelExternalWorkflowExecutionFailedEventAttributes( - output.requestCancelExternalWorkflowExecutionFailedEventAttributes, - context - ) - : undefined, - requestCancelExternalWorkflowExecutionInitiatedEventAttributes: - output.requestCancelExternalWorkflowExecutionInitiatedEventAttributes != null - ? de_RequestCancelExternalWorkflowExecutionInitiatedEventAttributes( - output.requestCancelExternalWorkflowExecutionInitiatedEventAttributes, - context - ) - : undefined, - scheduleActivityTaskFailedEventAttributes: - output.scheduleActivityTaskFailedEventAttributes != null - ? de_ScheduleActivityTaskFailedEventAttributes(output.scheduleActivityTaskFailedEventAttributes, context) - : undefined, - scheduleLambdaFunctionFailedEventAttributes: - output.scheduleLambdaFunctionFailedEventAttributes != null - ? de_ScheduleLambdaFunctionFailedEventAttributes(output.scheduleLambdaFunctionFailedEventAttributes, context) - : undefined, - signalExternalWorkflowExecutionFailedEventAttributes: - output.signalExternalWorkflowExecutionFailedEventAttributes != null - ? de_SignalExternalWorkflowExecutionFailedEventAttributes( - output.signalExternalWorkflowExecutionFailedEventAttributes, - context - ) - : undefined, - signalExternalWorkflowExecutionInitiatedEventAttributes: - output.signalExternalWorkflowExecutionInitiatedEventAttributes != null - ? de_SignalExternalWorkflowExecutionInitiatedEventAttributes( - output.signalExternalWorkflowExecutionInitiatedEventAttributes, - context - ) - : undefined, - startChildWorkflowExecutionFailedEventAttributes: - output.startChildWorkflowExecutionFailedEventAttributes != null - ? de_StartChildWorkflowExecutionFailedEventAttributes( - output.startChildWorkflowExecutionFailedEventAttributes, - context - ) - : undefined, - startChildWorkflowExecutionInitiatedEventAttributes: - output.startChildWorkflowExecutionInitiatedEventAttributes != null - ? de_StartChildWorkflowExecutionInitiatedEventAttributes( - output.startChildWorkflowExecutionInitiatedEventAttributes, - context - ) - : undefined, - startLambdaFunctionFailedEventAttributes: - output.startLambdaFunctionFailedEventAttributes != null - ? de_StartLambdaFunctionFailedEventAttributes(output.startLambdaFunctionFailedEventAttributes, context) - : undefined, - startTimerFailedEventAttributes: - output.startTimerFailedEventAttributes != null - ? de_StartTimerFailedEventAttributes(output.startTimerFailedEventAttributes, context) - : undefined, - timerCanceledEventAttributes: - output.timerCanceledEventAttributes != null - ? de_TimerCanceledEventAttributes(output.timerCanceledEventAttributes, context) - : undefined, - timerFiredEventAttributes: - output.timerFiredEventAttributes != null - ? de_TimerFiredEventAttributes(output.timerFiredEventAttributes, context) - : undefined, - timerStartedEventAttributes: - output.timerStartedEventAttributes != null - ? de_TimerStartedEventAttributes(output.timerStartedEventAttributes, context) - : undefined, - workflowExecutionCancelRequestedEventAttributes: - output.workflowExecutionCancelRequestedEventAttributes != null - ? de_WorkflowExecutionCancelRequestedEventAttributes( - output.workflowExecutionCancelRequestedEventAttributes, - context - ) - : undefined, - workflowExecutionCanceledEventAttributes: - output.workflowExecutionCanceledEventAttributes != null - ? de_WorkflowExecutionCanceledEventAttributes(output.workflowExecutionCanceledEventAttributes, context) - : undefined, - workflowExecutionCompletedEventAttributes: - output.workflowExecutionCompletedEventAttributes != null - ? de_WorkflowExecutionCompletedEventAttributes(output.workflowExecutionCompletedEventAttributes, context) - : undefined, - workflowExecutionContinuedAsNewEventAttributes: - output.workflowExecutionContinuedAsNewEventAttributes != null - ? de_WorkflowExecutionContinuedAsNewEventAttributes( - output.workflowExecutionContinuedAsNewEventAttributes, - context - ) - : undefined, - workflowExecutionFailedEventAttributes: - output.workflowExecutionFailedEventAttributes != null - ? de_WorkflowExecutionFailedEventAttributes(output.workflowExecutionFailedEventAttributes, context) - : undefined, - workflowExecutionSignaledEventAttributes: - output.workflowExecutionSignaledEventAttributes != null - ? de_WorkflowExecutionSignaledEventAttributes(output.workflowExecutionSignaledEventAttributes, context) - : undefined, - workflowExecutionStartedEventAttributes: - output.workflowExecutionStartedEventAttributes != null - ? de_WorkflowExecutionStartedEventAttributes(output.workflowExecutionStartedEventAttributes, context) - : undefined, - workflowExecutionTerminatedEventAttributes: - output.workflowExecutionTerminatedEventAttributes != null - ? de_WorkflowExecutionTerminatedEventAttributes(output.workflowExecutionTerminatedEventAttributes, context) - : undefined, - workflowExecutionTimedOutEventAttributes: - output.workflowExecutionTimedOutEventAttributes != null - ? de_WorkflowExecutionTimedOutEventAttributes(output.workflowExecutionTimedOutEventAttributes, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0HistoryEventList - */ -const de_HistoryEventList = (output: any, context: __SerdeContext): HistoryEvent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HistoryEvent(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_0LambdaFunctionCompletedEventAttributes - */ -const de_LambdaFunctionCompletedEventAttributes = ( - output: any, - context: __SerdeContext -): LambdaFunctionCompletedEventAttributes => { - return { - result: __expectString(output.result), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - } as any; -}; - -/** - * deserializeAws_json1_0LambdaFunctionFailedEventAttributes - */ -const de_LambdaFunctionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): LambdaFunctionFailedEventAttributes => { - return { - details: __expectString(output.details), - reason: __expectString(output.reason), - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - } as any; -}; +// se_WorkflowTypeFilter omitted. -/** - * deserializeAws_json1_0LambdaFunctionScheduledEventAttributes - */ -const de_LambdaFunctionScheduledEventAttributes = ( - output: any, - context: __SerdeContext -): LambdaFunctionScheduledEventAttributes => { - return { - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - id: __expectString(output.id), - input: __expectString(output.input), - name: __expectString(output.name), - startToCloseTimeout: __expectString(output.startToCloseTimeout), - } as any; -}; +// de_ActivityTask omitted. -/** - * deserializeAws_json1_0LambdaFunctionStartedEventAttributes - */ -const de_LambdaFunctionStartedEventAttributes = ( - output: any, - context: __SerdeContext -): LambdaFunctionStartedEventAttributes => { - return { - scheduledEventId: __expectLong(output.scheduledEventId), - } as any; -}; +// de_ActivityTaskCanceledEventAttributes omitted. -/** - * deserializeAws_json1_0LambdaFunctionTimedOutEventAttributes - */ -const de_LambdaFunctionTimedOutEventAttributes = ( - output: any, - context: __SerdeContext -): LambdaFunctionTimedOutEventAttributes => { - return { - scheduledEventId: __expectLong(output.scheduledEventId), - startedEventId: __expectLong(output.startedEventId), - timeoutType: __expectString(output.timeoutType), - } as any; -}; +// de_ActivityTaskCancelRequestedEventAttributes omitted. -/** - * deserializeAws_json1_0LimitExceededFault - */ -const de_LimitExceededFault = (output: any, context: __SerdeContext): LimitExceededFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActivityTaskCompletedEventAttributes omitted. -/** - * deserializeAws_json1_0ListTagsForResourceOutput - */ -const de_ListTagsForResourceOutput = (output: any, context: __SerdeContext): ListTagsForResourceOutput => { - return { - tags: output.tags != null ? de_ResourceTagList(output.tags, context) : undefined, - } as any; -}; +// de_ActivityTaskFailedEventAttributes omitted. -/** - * deserializeAws_json1_0MarkerRecordedEventAttributes - */ -const de_MarkerRecordedEventAttributes = (output: any, context: __SerdeContext): MarkerRecordedEventAttributes => { - return { - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - details: __expectString(output.details), - markerName: __expectString(output.markerName), - } as any; -}; +// de_ActivityTaskScheduledEventAttributes omitted. -/** - * deserializeAws_json1_0OperationNotPermittedFault - */ -const de_OperationNotPermittedFault = (output: any, context: __SerdeContext): OperationNotPermittedFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ActivityTaskStartedEventAttributes omitted. -/** - * deserializeAws_json1_0PendingTaskCount - */ -const de_PendingTaskCount = (output: any, context: __SerdeContext): PendingTaskCount => { - return { - count: __expectInt32(output.count), - truncated: __expectBoolean(output.truncated), - } as any; -}; +// de_ActivityTaskStatus omitted. -/** - * deserializeAws_json1_0RecordMarkerFailedEventAttributes - */ -const de_RecordMarkerFailedEventAttributes = ( - output: any, - context: __SerdeContext -): RecordMarkerFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - markerName: __expectString(output.markerName), - } as any; -}; +// de_ActivityTaskTimedOutEventAttributes omitted. -/** - * deserializeAws_json1_0RequestCancelActivityTaskFailedEventAttributes - */ -const de_RequestCancelActivityTaskFailedEventAttributes = ( - output: any, - context: __SerdeContext -): RequestCancelActivityTaskFailedEventAttributes => { - return { - activityId: __expectString(output.activityId), - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; +// de_ActivityType omitted. -/** - * deserializeAws_json1_0RequestCancelExternalWorkflowExecutionFailedEventAttributes - */ -const de_RequestCancelExternalWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): RequestCancelExternalWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - initiatedEventId: __expectLong(output.initiatedEventId), - runId: __expectString(output.runId), - workflowId: __expectString(output.workflowId), - } as any; -}; +// de_ActivityTypeConfiguration omitted. /** - * deserializeAws_json1_0RequestCancelExternalWorkflowExecutionInitiatedEventAttributes + * deserializeAws_json1_0ActivityTypeDetail */ -const de_RequestCancelExternalWorkflowExecutionInitiatedEventAttributes = ( - output: any, - context: __SerdeContext -): RequestCancelExternalWorkflowExecutionInitiatedEventAttributes => { - return { - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - runId: __expectString(output.runId), - workflowId: __expectString(output.workflowId), - } as any; +const de_ActivityTypeDetail = (output: any, context: __SerdeContext): ActivityTypeDetail => { + return take(output, { + configuration: _json, + typeInfo: (_: any) => de_ActivityTypeInfo(_, context), + }) as any; }; /** - * deserializeAws_json1_0ResourceTag + * deserializeAws_json1_0ActivityTypeInfo */ -const de_ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { - return { - key: __expectString(output.key), - value: __expectString(output.value), - } as any; +const de_ActivityTypeInfo = (output: any, context: __SerdeContext): ActivityTypeInfo => { + return take(output, { + activityType: _json, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deprecationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + status: __expectString, + }) as any; }; /** - * deserializeAws_json1_0ResourceTagList + * deserializeAws_json1_0ActivityTypeInfoList */ -const de_ResourceTagList = (output: any, context: __SerdeContext): ResourceTag[] => { +const de_ActivityTypeInfoList = (output: any, context: __SerdeContext): ActivityTypeInfo[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceTag(entry, context); + return de_ActivityTypeInfo(entry, context); }); return retVal; }; /** - * deserializeAws_json1_0Run + * deserializeAws_json1_0ActivityTypeInfos */ -const de_Run = (output: any, context: __SerdeContext): Run => { - return { - runId: __expectString(output.runId), - } as any; +const de_ActivityTypeInfos = (output: any, context: __SerdeContext): ActivityTypeInfos => { + return take(output, { + nextPageToken: __expectString, + typeInfos: (_: any) => de_ActivityTypeInfoList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ScheduleActivityTaskFailedEventAttributes - */ -const de_ScheduleActivityTaskFailedEventAttributes = ( - output: any, - context: __SerdeContext -): ScheduleActivityTaskFailedEventAttributes => { - return { - activityId: __expectString(output.activityId), - activityType: output.activityType != null ? de_ActivityType(output.activityType, context) : undefined, - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - } as any; -}; +// de_CancelTimerFailedEventAttributes omitted. -/** - * deserializeAws_json1_0ScheduleLambdaFunctionFailedEventAttributes - */ -const de_ScheduleLambdaFunctionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): ScheduleLambdaFunctionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - id: __expectString(output.id), - name: __expectString(output.name), - } as any; -}; +// de_CancelWorkflowExecutionFailedEventAttributes omitted. -/** - * deserializeAws_json1_0SignalExternalWorkflowExecutionFailedEventAttributes - */ -const de_SignalExternalWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): SignalExternalWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - initiatedEventId: __expectLong(output.initiatedEventId), - runId: __expectString(output.runId), - workflowId: __expectString(output.workflowId), - } as any; -}; +// de_ChildWorkflowExecutionCanceledEventAttributes omitted. -/** - * deserializeAws_json1_0SignalExternalWorkflowExecutionInitiatedEventAttributes - */ -const de_SignalExternalWorkflowExecutionInitiatedEventAttributes = ( - output: any, - context: __SerdeContext -): SignalExternalWorkflowExecutionInitiatedEventAttributes => { - return { - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - input: __expectString(output.input), - runId: __expectString(output.runId), - signalName: __expectString(output.signalName), - workflowId: __expectString(output.workflowId), - } as any; -}; +// de_ChildWorkflowExecutionCompletedEventAttributes omitted. + +// de_ChildWorkflowExecutionFailedEventAttributes omitted. + +// de_ChildWorkflowExecutionStartedEventAttributes omitted. + +// de_ChildWorkflowExecutionTerminatedEventAttributes omitted. + +// de_ChildWorkflowExecutionTimedOutEventAttributes omitted. + +// de_CompleteWorkflowExecutionFailedEventAttributes omitted. + +// de_ContinueAsNewWorkflowExecutionFailedEventAttributes omitted. /** - * deserializeAws_json1_0StartChildWorkflowExecutionFailedEventAttributes + * deserializeAws_json1_0DecisionTask */ -const de_StartChildWorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): StartChildWorkflowExecutionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - initiatedEventId: __expectLong(output.initiatedEventId), - workflowId: __expectString(output.workflowId), - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; +const de_DecisionTask = (output: any, context: __SerdeContext): DecisionTask => { + return take(output, { + events: (_: any) => de_HistoryEventList(_, context), + nextPageToken: __expectString, + previousStartedEventId: __expectLong, + startedEventId: __expectLong, + taskToken: __expectString, + workflowExecution: _json, + workflowType: _json, + }) as any; }; +// de_DecisionTaskCompletedEventAttributes omitted. + +// de_DecisionTaskScheduledEventAttributes omitted. + +// de_DecisionTaskStartedEventAttributes omitted. + +// de_DecisionTaskTimedOutEventAttributes omitted. + +// de_DefaultUndefinedFault omitted. + +// de_DomainAlreadyExistsFault omitted. + +// de_DomainConfiguration omitted. + +// de_DomainDeprecatedFault omitted. + +// de_DomainDetail omitted. + +// de_DomainInfo omitted. + +// de_DomainInfoList omitted. + +// de_DomainInfos omitted. + +// de_ExternalWorkflowExecutionCancelRequestedEventAttributes omitted. + +// de_ExternalWorkflowExecutionSignaledEventAttributes omitted. + +// de_FailWorkflowExecutionFailedEventAttributes omitted. + /** - * deserializeAws_json1_0StartChildWorkflowExecutionInitiatedEventAttributes + * deserializeAws_json1_0History */ -const de_StartChildWorkflowExecutionInitiatedEventAttributes = ( - output: any, - context: __SerdeContext -): StartChildWorkflowExecutionInitiatedEventAttributes => { - return { - childPolicy: __expectString(output.childPolicy), - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - executionStartToCloseTimeout: __expectString(output.executionStartToCloseTimeout), - input: __expectString(output.input), - lambdaRole: __expectString(output.lambdaRole), - tagList: output.tagList != null ? de_TagList(output.tagList, context) : undefined, - taskList: output.taskList != null ? de_TaskList(output.taskList, context) : undefined, - taskPriority: __expectString(output.taskPriority), - taskStartToCloseTimeout: __expectString(output.taskStartToCloseTimeout), - workflowId: __expectString(output.workflowId), - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0StartLambdaFunctionFailedEventAttributes - */ -const de_StartLambdaFunctionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): StartLambdaFunctionFailedEventAttributes => { - return { - cause: __expectString(output.cause), - message: __expectString(output.message), - scheduledEventId: __expectLong(output.scheduledEventId), - } as any; +const de_History = (output: any, context: __SerdeContext): History => { + return take(output, { + events: (_: any) => de_HistoryEventList(_, context), + nextPageToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_0StartTimerFailedEventAttributes + * deserializeAws_json1_0HistoryEvent */ -const de_StartTimerFailedEventAttributes = (output: any, context: __SerdeContext): StartTimerFailedEventAttributes => { - return { - cause: __expectString(output.cause), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - timerId: __expectString(output.timerId), - } as any; +const de_HistoryEvent = (output: any, context: __SerdeContext): HistoryEvent => { + return take(output, { + activityTaskCancelRequestedEventAttributes: _json, + activityTaskCanceledEventAttributes: _json, + activityTaskCompletedEventAttributes: _json, + activityTaskFailedEventAttributes: _json, + activityTaskScheduledEventAttributes: _json, + activityTaskStartedEventAttributes: _json, + activityTaskTimedOutEventAttributes: _json, + cancelTimerFailedEventAttributes: _json, + cancelWorkflowExecutionFailedEventAttributes: _json, + childWorkflowExecutionCanceledEventAttributes: _json, + childWorkflowExecutionCompletedEventAttributes: _json, + childWorkflowExecutionFailedEventAttributes: _json, + childWorkflowExecutionStartedEventAttributes: _json, + childWorkflowExecutionTerminatedEventAttributes: _json, + childWorkflowExecutionTimedOutEventAttributes: _json, + completeWorkflowExecutionFailedEventAttributes: _json, + continueAsNewWorkflowExecutionFailedEventAttributes: _json, + decisionTaskCompletedEventAttributes: _json, + decisionTaskScheduledEventAttributes: _json, + decisionTaskStartedEventAttributes: _json, + decisionTaskTimedOutEventAttributes: _json, + eventId: __expectLong, + eventTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + eventType: __expectString, + externalWorkflowExecutionCancelRequestedEventAttributes: _json, + externalWorkflowExecutionSignaledEventAttributes: _json, + failWorkflowExecutionFailedEventAttributes: _json, + lambdaFunctionCompletedEventAttributes: _json, + lambdaFunctionFailedEventAttributes: _json, + lambdaFunctionScheduledEventAttributes: _json, + lambdaFunctionStartedEventAttributes: _json, + lambdaFunctionTimedOutEventAttributes: _json, + markerRecordedEventAttributes: _json, + recordMarkerFailedEventAttributes: _json, + requestCancelActivityTaskFailedEventAttributes: _json, + requestCancelExternalWorkflowExecutionFailedEventAttributes: _json, + requestCancelExternalWorkflowExecutionInitiatedEventAttributes: _json, + scheduleActivityTaskFailedEventAttributes: _json, + scheduleLambdaFunctionFailedEventAttributes: _json, + signalExternalWorkflowExecutionFailedEventAttributes: _json, + signalExternalWorkflowExecutionInitiatedEventAttributes: _json, + startChildWorkflowExecutionFailedEventAttributes: _json, + startChildWorkflowExecutionInitiatedEventAttributes: _json, + startLambdaFunctionFailedEventAttributes: _json, + startTimerFailedEventAttributes: _json, + timerCanceledEventAttributes: _json, + timerFiredEventAttributes: _json, + timerStartedEventAttributes: _json, + workflowExecutionCancelRequestedEventAttributes: _json, + workflowExecutionCanceledEventAttributes: _json, + workflowExecutionCompletedEventAttributes: _json, + workflowExecutionContinuedAsNewEventAttributes: _json, + workflowExecutionFailedEventAttributes: _json, + workflowExecutionSignaledEventAttributes: _json, + workflowExecutionStartedEventAttributes: _json, + workflowExecutionTerminatedEventAttributes: _json, + workflowExecutionTimedOutEventAttributes: _json, + }) as any; }; /** - * deserializeAws_json1_0TagList + * deserializeAws_json1_0HistoryEventList */ -const de_TagList = (output: any, context: __SerdeContext): string[] => { +const de_HistoryEventList = (output: any, context: __SerdeContext): HistoryEvent[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_HistoryEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0TaskList - */ -const de_TaskList = (output: any, context: __SerdeContext): TaskList => { - return { - name: __expectString(output.name), - } as any; -}; +// de_LambdaFunctionCompletedEventAttributes omitted. -/** - * deserializeAws_json1_0TimerCanceledEventAttributes - */ -const de_TimerCanceledEventAttributes = (output: any, context: __SerdeContext): TimerCanceledEventAttributes => { - return { - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - startedEventId: __expectLong(output.startedEventId), - timerId: __expectString(output.timerId), - } as any; -}; +// de_LambdaFunctionFailedEventAttributes omitted. -/** - * deserializeAws_json1_0TimerFiredEventAttributes - */ -const de_TimerFiredEventAttributes = (output: any, context: __SerdeContext): TimerFiredEventAttributes => { - return { - startedEventId: __expectLong(output.startedEventId), - timerId: __expectString(output.timerId), - } as any; -}; +// de_LambdaFunctionScheduledEventAttributes omitted. -/** - * deserializeAws_json1_0TimerStartedEventAttributes - */ -const de_TimerStartedEventAttributes = (output: any, context: __SerdeContext): TimerStartedEventAttributes => { - return { - control: __expectString(output.control), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - startToFireTimeout: __expectString(output.startToFireTimeout), - timerId: __expectString(output.timerId), - } as any; -}; +// de_LambdaFunctionStartedEventAttributes omitted. -/** - * deserializeAws_json1_0TooManyTagsFault - */ -const de_TooManyTagsFault = (output: any, context: __SerdeContext): TooManyTagsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LambdaFunctionTimedOutEventAttributes omitted. -/** - * deserializeAws_json1_0TypeAlreadyExistsFault - */ -const de_TypeAlreadyExistsFault = (output: any, context: __SerdeContext): TypeAlreadyExistsFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_LimitExceededFault omitted. -/** - * deserializeAws_json1_0TypeDeprecatedFault - */ -const de_TypeDeprecatedFault = (output: any, context: __SerdeContext): TypeDeprecatedFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ListTagsForResourceOutput omitted. -/** - * deserializeAws_json1_0UnknownResourceFault - */ -const de_UnknownResourceFault = (output: any, context: __SerdeContext): UnknownResourceFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_MarkerRecordedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecution - */ -const de_WorkflowExecution = (output: any, context: __SerdeContext): WorkflowExecution => { - return { - runId: __expectString(output.runId), - workflowId: __expectString(output.workflowId), - } as any; -}; +// de_OperationNotPermittedFault omitted. -/** - * deserializeAws_json1_0WorkflowExecutionAlreadyStartedFault - */ -const de_WorkflowExecutionAlreadyStartedFault = ( - output: any, - context: __SerdeContext -): WorkflowExecutionAlreadyStartedFault => { - return { - message: __expectString(output.message), - } as any; -}; +// de_PendingTaskCount omitted. -/** - * deserializeAws_json1_0WorkflowExecutionCanceledEventAttributes - */ -const de_WorkflowExecutionCanceledEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionCanceledEventAttributes => { - return { - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - details: __expectString(output.details), - } as any; -}; +// de_RecordMarkerFailedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecutionCancelRequestedEventAttributes - */ -const de_WorkflowExecutionCancelRequestedEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionCancelRequestedEventAttributes => { - return { - cause: __expectString(output.cause), - externalInitiatedEventId: __expectLong(output.externalInitiatedEventId), - externalWorkflowExecution: - output.externalWorkflowExecution != null - ? de_WorkflowExecution(output.externalWorkflowExecution, context) - : undefined, - } as any; -}; +// de_RequestCancelActivityTaskFailedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecutionCompletedEventAttributes - */ -const de_WorkflowExecutionCompletedEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionCompletedEventAttributes => { - return { - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - result: __expectString(output.result), - } as any; -}; +// de_RequestCancelExternalWorkflowExecutionFailedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecutionConfiguration - */ -const de_WorkflowExecutionConfiguration = (output: any, context: __SerdeContext): WorkflowExecutionConfiguration => { - return { - childPolicy: __expectString(output.childPolicy), - executionStartToCloseTimeout: __expectString(output.executionStartToCloseTimeout), - lambdaRole: __expectString(output.lambdaRole), - taskList: output.taskList != null ? de_TaskList(output.taskList, context) : undefined, - taskPriority: __expectString(output.taskPriority), - taskStartToCloseTimeout: __expectString(output.taskStartToCloseTimeout), - } as any; -}; +// de_RequestCancelExternalWorkflowExecutionInitiatedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecutionContinuedAsNewEventAttributes - */ -const de_WorkflowExecutionContinuedAsNewEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionContinuedAsNewEventAttributes => { - return { - childPolicy: __expectString(output.childPolicy), - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - executionStartToCloseTimeout: __expectString(output.executionStartToCloseTimeout), - input: __expectString(output.input), - lambdaRole: __expectString(output.lambdaRole), - newExecutionRunId: __expectString(output.newExecutionRunId), - tagList: output.tagList != null ? de_TagList(output.tagList, context) : undefined, - taskList: output.taskList != null ? de_TaskList(output.taskList, context) : undefined, - taskPriority: __expectString(output.taskPriority), - taskStartToCloseTimeout: __expectString(output.taskStartToCloseTimeout), - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; +// de_ResourceTag omitted. -/** - * deserializeAws_json1_0WorkflowExecutionCount - */ -const de_WorkflowExecutionCount = (output: any, context: __SerdeContext): WorkflowExecutionCount => { - return { - count: __expectInt32(output.count), - truncated: __expectBoolean(output.truncated), - } as any; -}; +// de_ResourceTagList omitted. + +// de_Run omitted. + +// de_ScheduleActivityTaskFailedEventAttributes omitted. + +// de_ScheduleLambdaFunctionFailedEventAttributes omitted. + +// de_SignalExternalWorkflowExecutionFailedEventAttributes omitted. + +// de_SignalExternalWorkflowExecutionInitiatedEventAttributes omitted. + +// de_StartChildWorkflowExecutionFailedEventAttributes omitted. + +// de_StartChildWorkflowExecutionInitiatedEventAttributes omitted. + +// de_StartLambdaFunctionFailedEventAttributes omitted. + +// de_StartTimerFailedEventAttributes omitted. + +// de_TagList omitted. + +// de_TaskList omitted. + +// de_TimerCanceledEventAttributes omitted. + +// de_TimerFiredEventAttributes omitted. + +// de_TimerStartedEventAttributes omitted. + +// de_TooManyTagsFault omitted. + +// de_TypeAlreadyExistsFault omitted. + +// de_TypeDeprecatedFault omitted. + +// de_UnknownResourceFault omitted. + +// de_WorkflowExecution omitted. + +// de_WorkflowExecutionAlreadyStartedFault omitted. + +// de_WorkflowExecutionCanceledEventAttributes omitted. + +// de_WorkflowExecutionCancelRequestedEventAttributes omitted. + +// de_WorkflowExecutionCompletedEventAttributes omitted. + +// de_WorkflowExecutionConfiguration omitted. + +// de_WorkflowExecutionContinuedAsNewEventAttributes omitted. + +// de_WorkflowExecutionCount omitted. /** * deserializeAws_json1_0WorkflowExecutionDetail */ const de_WorkflowExecutionDetail = (output: any, context: __SerdeContext): WorkflowExecutionDetail => { - return { - executionConfiguration: - output.executionConfiguration != null - ? de_WorkflowExecutionConfiguration(output.executionConfiguration, context) - : undefined, - executionInfo: output.executionInfo != null ? de_WorkflowExecutionInfo(output.executionInfo, context) : undefined, - latestActivityTaskTimestamp: - output.latestActivityTaskTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.latestActivityTaskTimestamp))) - : undefined, - latestExecutionContext: __expectString(output.latestExecutionContext), - openCounts: output.openCounts != null ? de_WorkflowExecutionOpenCounts(output.openCounts, context) : undefined, - } as any; + return take(output, { + executionConfiguration: _json, + executionInfo: (_: any) => de_WorkflowExecutionInfo(_, context), + latestActivityTaskTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + latestExecutionContext: __expectString, + openCounts: _json, + }) as any; }; -/** - * deserializeAws_json1_0WorkflowExecutionFailedEventAttributes - */ -const de_WorkflowExecutionFailedEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionFailedEventAttributes => { - return { - decisionTaskCompletedEventId: __expectLong(output.decisionTaskCompletedEventId), - details: __expectString(output.details), - reason: __expectString(output.reason), - } as any; -}; +// de_WorkflowExecutionFailedEventAttributes omitted. /** * deserializeAws_json1_0WorkflowExecutionInfo */ const de_WorkflowExecutionInfo = (output: any, context: __SerdeContext): WorkflowExecutionInfo => { - return { - cancelRequested: __expectBoolean(output.cancelRequested), - closeStatus: __expectString(output.closeStatus), - closeTimestamp: - output.closeTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.closeTimestamp))) - : undefined, - execution: output.execution != null ? de_WorkflowExecution(output.execution, context) : undefined, - executionStatus: __expectString(output.executionStatus), - parent: output.parent != null ? de_WorkflowExecution(output.parent, context) : undefined, - startTimestamp: - output.startTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.startTimestamp))) - : undefined, - tagList: output.tagList != null ? de_TagList(output.tagList, context) : undefined, - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; + return take(output, { + cancelRequested: __expectBoolean, + closeStatus: __expectString, + closeTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + execution: _json, + executionStatus: __expectString, + parent: _json, + startTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + tagList: _json, + workflowType: _json, + }) as any; }; /** @@ -5156,9 +3221,6 @@ const de_WorkflowExecutionInfoList = (output: any, context: __SerdeContext): Wor const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkflowExecutionInfo(entry, context); }); return retVal; @@ -5168,150 +3230,47 @@ const de_WorkflowExecutionInfoList = (output: any, context: __SerdeContext): Wor * deserializeAws_json1_0WorkflowExecutionInfos */ const de_WorkflowExecutionInfos = (output: any, context: __SerdeContext): WorkflowExecutionInfos => { - return { - executionInfos: - output.executionInfos != null ? de_WorkflowExecutionInfoList(output.executionInfos, context) : undefined, - nextPageToken: __expectString(output.nextPageToken), - } as any; + return take(output, { + executionInfos: (_: any) => de_WorkflowExecutionInfoList(_, context), + nextPageToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0WorkflowExecutionOpenCounts - */ -const de_WorkflowExecutionOpenCounts = (output: any, context: __SerdeContext): WorkflowExecutionOpenCounts => { - return { - openActivityTasks: __expectInt32(output.openActivityTasks), - openChildWorkflowExecutions: __expectInt32(output.openChildWorkflowExecutions), - openDecisionTasks: __expectInt32(output.openDecisionTasks), - openLambdaFunctions: __expectInt32(output.openLambdaFunctions), - openTimers: __expectInt32(output.openTimers), - } as any; -}; +// de_WorkflowExecutionOpenCounts omitted. -/** - * deserializeAws_json1_0WorkflowExecutionSignaledEventAttributes - */ -const de_WorkflowExecutionSignaledEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionSignaledEventAttributes => { - return { - externalInitiatedEventId: __expectLong(output.externalInitiatedEventId), - externalWorkflowExecution: - output.externalWorkflowExecution != null - ? de_WorkflowExecution(output.externalWorkflowExecution, context) - : undefined, - input: __expectString(output.input), - signalName: __expectString(output.signalName), - } as any; -}; +// de_WorkflowExecutionSignaledEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecutionStartedEventAttributes - */ -const de_WorkflowExecutionStartedEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionStartedEventAttributes => { - return { - childPolicy: __expectString(output.childPolicy), - continuedExecutionRunId: __expectString(output.continuedExecutionRunId), - executionStartToCloseTimeout: __expectString(output.executionStartToCloseTimeout), - input: __expectString(output.input), - lambdaRole: __expectString(output.lambdaRole), - parentInitiatedEventId: __expectLong(output.parentInitiatedEventId), - parentWorkflowExecution: - output.parentWorkflowExecution != null - ? de_WorkflowExecution(output.parentWorkflowExecution, context) - : undefined, - tagList: output.tagList != null ? de_TagList(output.tagList, context) : undefined, - taskList: output.taskList != null ? de_TaskList(output.taskList, context) : undefined, - taskPriority: __expectString(output.taskPriority), - taskStartToCloseTimeout: __expectString(output.taskStartToCloseTimeout), - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0WorkflowExecutionTerminatedEventAttributes - */ -const de_WorkflowExecutionTerminatedEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionTerminatedEventAttributes => { - return { - cause: __expectString(output.cause), - childPolicy: __expectString(output.childPolicy), - details: __expectString(output.details), - reason: __expectString(output.reason), - } as any; -}; +// de_WorkflowExecutionStartedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowExecutionTimedOutEventAttributes - */ -const de_WorkflowExecutionTimedOutEventAttributes = ( - output: any, - context: __SerdeContext -): WorkflowExecutionTimedOutEventAttributes => { - return { - childPolicy: __expectString(output.childPolicy), - timeoutType: __expectString(output.timeoutType), - } as any; -}; +// de_WorkflowExecutionTerminatedEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowType - */ -const de_WorkflowType = (output: any, context: __SerdeContext): WorkflowType => { - return { - name: __expectString(output.name), - version: __expectString(output.version), - } as any; -}; +// de_WorkflowExecutionTimedOutEventAttributes omitted. -/** - * deserializeAws_json1_0WorkflowTypeConfiguration - */ -const de_WorkflowTypeConfiguration = (output: any, context: __SerdeContext): WorkflowTypeConfiguration => { - return { - defaultChildPolicy: __expectString(output.defaultChildPolicy), - defaultExecutionStartToCloseTimeout: __expectString(output.defaultExecutionStartToCloseTimeout), - defaultLambdaRole: __expectString(output.defaultLambdaRole), - defaultTaskList: output.defaultTaskList != null ? de_TaskList(output.defaultTaskList, context) : undefined, - defaultTaskPriority: __expectString(output.defaultTaskPriority), - defaultTaskStartToCloseTimeout: __expectString(output.defaultTaskStartToCloseTimeout), - } as any; -}; +// de_WorkflowType omitted. + +// de_WorkflowTypeConfiguration omitted. /** * deserializeAws_json1_0WorkflowTypeDetail */ const de_WorkflowTypeDetail = (output: any, context: __SerdeContext): WorkflowTypeDetail => { - return { - configuration: - output.configuration != null ? de_WorkflowTypeConfiguration(output.configuration, context) : undefined, - typeInfo: output.typeInfo != null ? de_WorkflowTypeInfo(output.typeInfo, context) : undefined, - } as any; + return take(output, { + configuration: _json, + typeInfo: (_: any) => de_WorkflowTypeInfo(_, context), + }) as any; }; /** * deserializeAws_json1_0WorkflowTypeInfo */ const de_WorkflowTypeInfo = (output: any, context: __SerdeContext): WorkflowTypeInfo => { - return { - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - deprecationDate: - output.deprecationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.deprecationDate))) - : undefined, - description: __expectString(output.description), - status: __expectString(output.status), - workflowType: output.workflowType != null ? de_WorkflowType(output.workflowType, context) : undefined, - } as any; + return take(output, { + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + deprecationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + description: __expectString, + status: __expectString, + workflowType: _json, + }) as any; }; /** @@ -5321,9 +3280,6 @@ const de_WorkflowTypeInfoList = (output: any, context: __SerdeContext): Workflow const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkflowTypeInfo(entry, context); }); return retVal; @@ -5333,10 +3289,10 @@ const de_WorkflowTypeInfoList = (output: any, context: __SerdeContext): Workflow * deserializeAws_json1_0WorkflowTypeInfos */ const de_WorkflowTypeInfos = (output: any, context: __SerdeContext): WorkflowTypeInfos => { - return { - nextPageToken: __expectString(output.nextPageToken), - typeInfos: output.typeInfos != null ? de_WorkflowTypeInfoList(output.typeInfos, context) : undefined, - } as any; + return take(output, { + nextPageToken: __expectString, + typeInfos: (_: any) => de_WorkflowTypeInfoList(_, context), + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -5359,6 +3315,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-synthetics/src/protocols/Aws_restJson1.ts b/clients/client-synthetics/src/protocols/Aws_restJson1.ts index e6d7fb8f888a..509219494ca3 100644 --- a/clients/client-synthetics/src/protocols/Aws_restJson1.ts +++ b/clients/client-synthetics/src/protocols/Aws_restJson1.ts @@ -1,19 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -59,25 +59,18 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { UpdateCanaryCommandInput, UpdateCanaryCommandOutput } from "../commands/UpdateCanaryCommand"; import { ArtifactConfigInput, - ArtifactConfigOutput, BadRequestException, BaseScreenshot, Canary, CanaryCodeInput, - CanaryCodeOutput, CanaryLastRun, CanaryRun, CanaryRunConfigInput, - CanaryRunConfigOutput, - CanaryRunStatus, CanaryRunTimeline, CanaryScheduleInput, - CanaryScheduleOutput, - CanaryStatus, CanaryTimeline, ConflictException, Group, - GroupSummary, InternalFailureException, InternalServerException, NotFoundException, @@ -89,9 +82,7 @@ import { TooManyRequestsException, ValidationException, VisualReferenceInput, - VisualReferenceOutput, VpcConfigInput, - VpcConfigOutput, } from "../models/models_0"; import { SyntheticsServiceException as __BaseException } from "../models/SyntheticsServiceException"; @@ -117,9 +108,11 @@ export const se_AssociateResourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -144,24 +137,22 @@ export const se_CreateCanaryCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary"; let body: any; - body = JSON.stringify({ - ...(input.ArtifactConfig != null && { ArtifactConfig: se_ArtifactConfigInput(input.ArtifactConfig, context) }), - ...(input.ArtifactS3Location != null && { ArtifactS3Location: input.ArtifactS3Location }), - ...(input.Code != null && { Code: se_CanaryCodeInput(input.Code, context) }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.FailureRetentionPeriodInDays != null && { - FailureRetentionPeriodInDays: input.FailureRetentionPeriodInDays, - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RunConfig != null && { RunConfig: se_CanaryRunConfigInput(input.RunConfig, context) }), - ...(input.RuntimeVersion != null && { RuntimeVersion: input.RuntimeVersion }), - ...(input.Schedule != null && { Schedule: se_CanaryScheduleInput(input.Schedule, context) }), - ...(input.SuccessRetentionPeriodInDays != null && { - SuccessRetentionPeriodInDays: input.SuccessRetentionPeriodInDays, - }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfigInput(input.VpcConfig, context) }), - }); + body = JSON.stringify( + take(input, { + ArtifactConfig: (_) => _json(_), + ArtifactS3Location: [], + Code: (_) => se_CanaryCodeInput(_, context), + ExecutionRoleArn: [], + FailureRetentionPeriodInDays: [], + Name: [], + RunConfig: (_) => _json(_), + RuntimeVersion: [], + Schedule: (_) => _json(_), + SuccessRetentionPeriodInDays: [], + Tags: (_) => _json(_), + VpcConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -186,10 +177,12 @@ export const se_CreateGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/group"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Name: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -271,11 +264,13 @@ export const se_DescribeCanariesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canaries"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Names != null && { Names: se_DescribeCanariesNameFilter(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + Names: (_) => _json(_), + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -300,11 +295,13 @@ export const se_DescribeCanariesLastRunCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canaries/last-run"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.Names != null && { Names: se_DescribeCanariesLastRunNameFilter(input.Names, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + Names: (_) => _json(_), + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -329,10 +326,12 @@ export const se_DescribeRuntimeVersionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/runtime-versions"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -366,9 +365,11 @@ export const se_DisassociateResourceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }); + body = JSON.stringify( + take(input, { + ResourceArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -417,10 +418,12 @@ export const se_GetCanaryRunsCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}/runs"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -477,10 +480,12 @@ export const se_ListAssociatedGroupsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource/{ResourceArn}/groups"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -514,10 +519,12 @@ export const se_ListGroupResourcesCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -542,10 +549,12 @@ export const se_ListGroupsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/groups"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -640,9 +649,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -698,23 +709,21 @@ export const se_UpdateCanaryCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/canary/{Name}"; resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name!, "{Name}", false); let body: any; - body = JSON.stringify({ - ...(input.ArtifactConfig != null && { ArtifactConfig: se_ArtifactConfigInput(input.ArtifactConfig, context) }), - ...(input.ArtifactS3Location != null && { ArtifactS3Location: input.ArtifactS3Location }), - ...(input.Code != null && { Code: se_CanaryCodeInput(input.Code, context) }), - ...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }), - ...(input.FailureRetentionPeriodInDays != null && { - FailureRetentionPeriodInDays: input.FailureRetentionPeriodInDays, - }), - ...(input.RunConfig != null && { RunConfig: se_CanaryRunConfigInput(input.RunConfig, context) }), - ...(input.RuntimeVersion != null && { RuntimeVersion: input.RuntimeVersion }), - ...(input.Schedule != null && { Schedule: se_CanaryScheduleInput(input.Schedule, context) }), - ...(input.SuccessRetentionPeriodInDays != null && { - SuccessRetentionPeriodInDays: input.SuccessRetentionPeriodInDays, - }), - ...(input.VisualReference != null && { VisualReference: se_VisualReferenceInput(input.VisualReference, context) }), - ...(input.VpcConfig != null && { VpcConfig: se_VpcConfigInput(input.VpcConfig, context) }), - }); + body = JSON.stringify( + take(input, { + ArtifactConfig: (_) => _json(_), + ArtifactS3Location: [], + Code: (_) => se_CanaryCodeInput(_, context), + ExecutionRoleArn: [], + FailureRetentionPeriodInDays: [], + RunConfig: (_) => _json(_), + RuntimeVersion: [], + Schedule: (_) => _json(_), + SuccessRetentionPeriodInDays: [], + VisualReference: (_) => _json(_), + VpcConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -773,10 +782,9 @@ const de_AssociateResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -796,9 +804,10 @@ export const de_CreateCanaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Canary != null) { - contents.Canary = de_Canary(data.Canary, context); - } + const doc = take(data, { + Canary: (_) => de_Canary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -826,10 +835,9 @@ const de_CreateCanaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -849,9 +857,10 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: (_) => de_Group(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -882,10 +891,9 @@ const de_CreateGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -935,10 +943,9 @@ const de_DeleteCanaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -988,10 +995,9 @@ const de_DeleteGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1011,12 +1017,11 @@ export const de_DescribeCanariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Canaries != null) { - contents.Canaries = de_Canaries(data.Canaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Canaries: (_) => de_Canaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1041,10 +1046,9 @@ const de_DescribeCanariesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1064,12 +1068,11 @@ export const de_DescribeCanariesLastRunCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CanariesLastRun != null) { - contents.CanariesLastRun = de_CanariesLastRun(data.CanariesLastRun, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CanariesLastRun: (_) => de_CanariesLastRun(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1094,10 +1097,9 @@ const de_DescribeCanariesLastRunCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1117,12 +1119,11 @@ export const de_DescribeRuntimeVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.RuntimeVersions != null) { - contents.RuntimeVersions = de_RuntimeVersionList(data.RuntimeVersions, context); - } + const doc = take(data, { + NextToken: __expectString, + RuntimeVersions: (_) => de_RuntimeVersionList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1147,10 +1148,9 @@ const de_DescribeRuntimeVersionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,10 +1200,9 @@ const de_DisassociateResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1223,9 +1222,10 @@ export const de_GetCanaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Canary != null) { - contents.Canary = de_Canary(data.Canary, context); - } + const doc = take(data, { + Canary: (_) => de_Canary(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1250,10 +1250,9 @@ const de_GetCanaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,12 +1272,11 @@ export const de_GetCanaryRunsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CanaryRuns != null) { - contents.CanaryRuns = de_CanaryRuns(data.CanaryRuns, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CanaryRuns: (_) => de_CanaryRuns(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1306,10 +1304,9 @@ const de_GetCanaryRunsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1329,9 +1326,10 @@ export const de_GetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: (_) => de_Group(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1362,10 +1360,9 @@ const de_GetGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1385,12 +1382,11 @@ export const de_ListAssociatedGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Groups != null) { - contents.Groups = de_GroupSummaryList(data.Groups, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Groups: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1418,10 +1414,9 @@ const de_ListAssociatedGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1441,12 +1436,11 @@ export const de_ListGroupResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Resources != null) { - contents.Resources = de_StringList(data.Resources, context); - } + const doc = take(data, { + NextToken: __expectString, + Resources: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1477,10 +1471,9 @@ const de_ListGroupResourcesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1500,12 +1493,11 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Groups != null) { - contents.Groups = de_GroupSummaryList(data.Groups, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Groups: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1530,10 +1522,9 @@ const de_ListGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1553,9 +1544,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1589,10 +1581,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1642,10 +1633,9 @@ const de_StartCanaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1695,10 +1685,9 @@ const de_StopCanaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1751,10 +1740,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1807,10 +1795,9 @@ const de_UntagResourceCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1863,25 +1850,25 @@ const de_UpdateCanaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1895,9 +1882,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1914,9 +1902,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1933,9 +1922,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1949,9 +1939,10 @@ const de_InternalServerExceptionRes = async ( const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1968,9 +1959,10 @@ const de_RequestEntityTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestEntityTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -1987,9 +1979,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2006,9 +1999,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2025,9 +2019,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2041,9 +2036,10 @@ const de_TooManyRequestsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2051,237 +2047,56 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ArtifactConfigInput - */ -const se_ArtifactConfigInput = (input: ArtifactConfigInput, context: __SerdeContext): any => { - return { - ...(input.S3Encryption != null && { S3Encryption: se_S3EncryptionConfig(input.S3Encryption, context) }), - }; -}; +// se_ArtifactConfigInput omitted. -/** - * serializeAws_restJson1BaseScreenshot - */ -const se_BaseScreenshot = (input: BaseScreenshot, context: __SerdeContext): any => { - return { - ...(input.IgnoreCoordinates != null && { - IgnoreCoordinates: se_BaseScreenshotIgnoreCoordinates(input.IgnoreCoordinates, context), - }), - ...(input.ScreenshotName != null && { ScreenshotName: input.ScreenshotName }), - }; -}; +// se_BaseScreenshot omitted. -/** - * serializeAws_restJson1BaseScreenshotIgnoreCoordinates - */ -const se_BaseScreenshotIgnoreCoordinates = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BaseScreenshotIgnoreCoordinates omitted. -/** - * serializeAws_restJson1BaseScreenshots - */ -const se_BaseScreenshots = (input: BaseScreenshot[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_BaseScreenshot(entry, context); - }); -}; +// se_BaseScreenshots omitted. /** * serializeAws_restJson1CanaryCodeInput */ const se_CanaryCodeInput = (input: CanaryCodeInput, context: __SerdeContext): any => { - return { - ...(input.Handler != null && { Handler: input.Handler }), - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Key != null && { S3Key: input.S3Key }), - ...(input.S3Version != null && { S3Version: input.S3Version }), - ...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }), - }; + return take(input, { + Handler: [], + S3Bucket: [], + S3Key: [], + S3Version: [], + ZipFile: context.base64Encoder, + }); }; -/** - * serializeAws_restJson1CanaryRunConfigInput - */ -const se_CanaryRunConfigInput = (input: CanaryRunConfigInput, context: __SerdeContext): any => { - return { - ...(input.ActiveTracing != null && { ActiveTracing: input.ActiveTracing }), - ...(input.EnvironmentVariables != null && { - EnvironmentVariables: se_EnvironmentVariablesMap(input.EnvironmentVariables, context), - }), - ...(input.MemoryInMB != null && { MemoryInMB: input.MemoryInMB }), - ...(input.TimeoutInSeconds != null && { TimeoutInSeconds: input.TimeoutInSeconds }), - }; -}; +// se_CanaryRunConfigInput omitted. -/** - * serializeAws_restJson1CanaryScheduleInput - */ -const se_CanaryScheduleInput = (input: CanaryScheduleInput, context: __SerdeContext): any => { - return { - ...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }), - ...(input.Expression != null && { Expression: input.Expression }), - }; -}; +// se_CanaryScheduleInput omitted. -/** - * serializeAws_restJson1DescribeCanariesLastRunNameFilter - */ -const se_DescribeCanariesLastRunNameFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeCanariesLastRunNameFilter omitted. -/** - * serializeAws_restJson1DescribeCanariesNameFilter - */ -const se_DescribeCanariesNameFilter = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DescribeCanariesNameFilter omitted. -/** - * serializeAws_restJson1EnvironmentVariablesMap - */ -const se_EnvironmentVariablesMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EnvironmentVariablesMap omitted. -/** - * serializeAws_restJson1S3EncryptionConfig - */ -const se_S3EncryptionConfig = (input: S3EncryptionConfig, context: __SerdeContext): any => { - return { - ...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }; -}; +// se_S3EncryptionConfig omitted. -/** - * serializeAws_restJson1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_restJson1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1VisualReferenceInput - */ -const se_VisualReferenceInput = (input: VisualReferenceInput, context: __SerdeContext): any => { - return { - ...(input.BaseCanaryRunId != null && { BaseCanaryRunId: input.BaseCanaryRunId }), - ...(input.BaseScreenshots != null && { BaseScreenshots: se_BaseScreenshots(input.BaseScreenshots, context) }), - }; -}; +// se_VisualReferenceInput omitted. -/** - * serializeAws_restJson1VpcConfigInput - */ -const se_VpcConfigInput = (input: VpcConfigInput, context: __SerdeContext): any => { - return { - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - }; -}; +// se_VpcConfigInput omitted. -/** - * deserializeAws_restJson1ArtifactConfigOutput - */ -const de_ArtifactConfigOutput = (output: any, context: __SerdeContext): ArtifactConfigOutput => { - return { - S3Encryption: output.S3Encryption != null ? de_S3EncryptionConfig(output.S3Encryption, context) : undefined, - } as any; -}; +// de_ArtifactConfigOutput omitted. -/** - * deserializeAws_restJson1BaseScreenshot - */ -const de_BaseScreenshot = (output: any, context: __SerdeContext): BaseScreenshot => { - return { - IgnoreCoordinates: - output.IgnoreCoordinates != null - ? de_BaseScreenshotIgnoreCoordinates(output.IgnoreCoordinates, context) - : undefined, - ScreenshotName: __expectString(output.ScreenshotName), - } as any; -}; +// de_BaseScreenshot omitted. -/** - * deserializeAws_restJson1BaseScreenshotIgnoreCoordinates - */ -const de_BaseScreenshotIgnoreCoordinates = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_BaseScreenshotIgnoreCoordinates omitted. -/** - * deserializeAws_restJson1BaseScreenshots - */ -const de_BaseScreenshots = (output: any, context: __SerdeContext): BaseScreenshot[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BaseScreenshot(entry, context); - }); - return retVal; -}; +// de_BaseScreenshots omitted. /** * deserializeAws_restJson1Canaries @@ -2290,9 +2105,6 @@ const de_Canaries = (output: any, context: __SerdeContext): Canary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Canary(entry, context); }); return retVal; @@ -2305,9 +2117,6 @@ const de_CanariesLastRun = (output: any, context: __SerdeContext): CanaryLastRun const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CanaryLastRun(entry, context); }); return retVal; @@ -2317,71 +2126,53 @@ const de_CanariesLastRun = (output: any, context: __SerdeContext): CanaryLastRun * deserializeAws_restJson1Canary */ const de_Canary = (output: any, context: __SerdeContext): Canary => { - return { - ArtifactConfig: output.ArtifactConfig != null ? de_ArtifactConfigOutput(output.ArtifactConfig, context) : undefined, - ArtifactS3Location: __expectString(output.ArtifactS3Location), - Code: output.Code != null ? de_CanaryCodeOutput(output.Code, context) : undefined, - EngineArn: __expectString(output.EngineArn), - ExecutionRoleArn: __expectString(output.ExecutionRoleArn), - FailureRetentionPeriodInDays: __expectInt32(output.FailureRetentionPeriodInDays), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - RunConfig: output.RunConfig != null ? de_CanaryRunConfigOutput(output.RunConfig, context) : undefined, - RuntimeVersion: __expectString(output.RuntimeVersion), - Schedule: output.Schedule != null ? de_CanaryScheduleOutput(output.Schedule, context) : undefined, - Status: output.Status != null ? de_CanaryStatus(output.Status, context) : undefined, - SuccessRetentionPeriodInDays: __expectInt32(output.SuccessRetentionPeriodInDays), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - Timeline: output.Timeline != null ? de_CanaryTimeline(output.Timeline, context) : undefined, - VisualReference: - output.VisualReference != null ? de_VisualReferenceOutput(output.VisualReference, context) : undefined, - VpcConfig: output.VpcConfig != null ? de_VpcConfigOutput(output.VpcConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CanaryCodeOutput - */ -const de_CanaryCodeOutput = (output: any, context: __SerdeContext): CanaryCodeOutput => { - return { - Handler: __expectString(output.Handler), - SourceLocationArn: __expectString(output.SourceLocationArn), - } as any; -}; + return take(output, { + ArtifactConfig: _json, + ArtifactS3Location: __expectString, + Code: _json, + EngineArn: __expectString, + ExecutionRoleArn: __expectString, + FailureRetentionPeriodInDays: __expectInt32, + Id: __expectString, + Name: __expectString, + RunConfig: _json, + RuntimeVersion: __expectString, + Schedule: _json, + Status: _json, + SuccessRetentionPeriodInDays: __expectInt32, + Tags: _json, + Timeline: (_: any) => de_CanaryTimeline(_, context), + VisualReference: _json, + VpcConfig: _json, + }) as any; +}; + +// de_CanaryCodeOutput omitted. /** * deserializeAws_restJson1CanaryLastRun */ const de_CanaryLastRun = (output: any, context: __SerdeContext): CanaryLastRun => { - return { - CanaryName: __expectString(output.CanaryName), - LastRun: output.LastRun != null ? de_CanaryRun(output.LastRun, context) : undefined, - } as any; + return take(output, { + CanaryName: __expectString, + LastRun: (_: any) => de_CanaryRun(_, context), + }) as any; }; /** * deserializeAws_restJson1CanaryRun */ const de_CanaryRun = (output: any, context: __SerdeContext): CanaryRun => { - return { - ArtifactS3Location: __expectString(output.ArtifactS3Location), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - Status: output.Status != null ? de_CanaryRunStatus(output.Status, context) : undefined, - Timeline: output.Timeline != null ? de_CanaryRunTimeline(output.Timeline, context) : undefined, - } as any; + return take(output, { + ArtifactS3Location: __expectString, + Id: __expectString, + Name: __expectString, + Status: _json, + Timeline: (_: any) => de_CanaryRunTimeline(_, context), + }) as any; }; -/** - * deserializeAws_restJson1CanaryRunConfigOutput - */ -const de_CanaryRunConfigOutput = (output: any, context: __SerdeContext): CanaryRunConfigOutput => { - return { - ActiveTracing: __expectBoolean(output.ActiveTracing), - MemoryInMB: __expectInt32(output.MemoryInMB), - TimeoutInSeconds: __expectInt32(output.TimeoutInSeconds), - } as any; -}; +// de_CanaryRunConfigOutput omitted. /** * deserializeAws_restJson1CanaryRuns @@ -2390,142 +2181,67 @@ const de_CanaryRuns = (output: any, context: __SerdeContext): CanaryRun[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CanaryRun(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CanaryRunStatus - */ -const de_CanaryRunStatus = (output: any, context: __SerdeContext): CanaryRunStatus => { - return { - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - StateReasonCode: __expectString(output.StateReasonCode), - } as any; -}; +// de_CanaryRunStatus omitted. /** * deserializeAws_restJson1CanaryRunTimeline */ const de_CanaryRunTimeline = (output: any, context: __SerdeContext): CanaryRunTimeline => { - return { - Completed: - output.Completed != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Completed))) : undefined, - Started: - output.Started != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Started))) : undefined, - } as any; + return take(output, { + Completed: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Started: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1CanaryScheduleOutput - */ -const de_CanaryScheduleOutput = (output: any, context: __SerdeContext): CanaryScheduleOutput => { - return { - DurationInSeconds: __expectLong(output.DurationInSeconds), - Expression: __expectString(output.Expression), - } as any; -}; +// de_CanaryScheduleOutput omitted. -/** - * deserializeAws_restJson1CanaryStatus - */ -const de_CanaryStatus = (output: any, context: __SerdeContext): CanaryStatus => { - return { - State: __expectString(output.State), - StateReason: __expectString(output.StateReason), - StateReasonCode: __expectString(output.StateReasonCode), - } as any; -}; +// de_CanaryStatus omitted. /** * deserializeAws_restJson1CanaryTimeline */ const de_CanaryTimeline = (output: any, context: __SerdeContext): CanaryTimeline => { - return { - Created: - output.Created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Created))) : undefined, - LastModified: - output.LastModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModified))) - : undefined, - LastStarted: - output.LastStarted != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStarted))) - : undefined, - LastStopped: - output.LastStopped != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStopped))) - : undefined, - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastStarted: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastStopped: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_restJson1Group */ const de_Group = (output: any, context: __SerdeContext): Group => { - return { - Arn: __expectString(output.Arn), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - Id: __expectString(output.Id), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - Name: __expectString(output.Name), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1GroupSummary - */ -const de_GroupSummary = (output: any, context: __SerdeContext): GroupSummary => { - return { - Arn: __expectString(output.Arn), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_GroupSummary omitted. -/** - * deserializeAws_restJson1GroupSummaryList - */ -const de_GroupSummaryList = (output: any, context: __SerdeContext): GroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupSummary(entry, context); - }); - return retVal; -}; +// de_GroupSummaryList omitted. /** * deserializeAws_restJson1RuntimeVersion */ const de_RuntimeVersion = (output: any, context: __SerdeContext): RuntimeVersion => { - return { - DeprecationDate: - output.DeprecationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DeprecationDate))) - : undefined, - Description: __expectString(output.Description), - ReleaseDate: - output.ReleaseDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReleaseDate))) - : undefined, - VersionName: __expectString(output.VersionName), - } as any; + return take(output, { + DeprecationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ReleaseDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VersionName: __expectString, + }) as any; }; /** @@ -2535,103 +2251,24 @@ const de_RuntimeVersionList = (output: any, context: __SerdeContext): RuntimeVer const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RuntimeVersion(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1S3EncryptionConfig - */ -const de_S3EncryptionConfig = (output: any, context: __SerdeContext): S3EncryptionConfig => { - return { - EncryptionMode: __expectString(output.EncryptionMode), - KmsKeyArn: __expectString(output.KmsKeyArn), - } as any; -}; +// de_S3EncryptionConfig omitted. -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1VisualReferenceOutput - */ -const de_VisualReferenceOutput = (output: any, context: __SerdeContext): VisualReferenceOutput => { - return { - BaseCanaryRunId: __expectString(output.BaseCanaryRunId), - BaseScreenshots: output.BaseScreenshots != null ? de_BaseScreenshots(output.BaseScreenshots, context) : undefined, - } as any; -}; +// de_VisualReferenceOutput omitted. -/** - * deserializeAws_restJson1VpcConfigOutput - */ -const de_VpcConfigOutput = (output: any, context: __SerdeContext): VpcConfigOutput => { - return { - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcId: __expectString(output.VpcId), - } as any; -}; +// de_VpcConfigOutput omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-textract/src/protocols/Aws_json1_1.ts b/clients/client-textract/src/protocols/Aws_json1_1.ts index 80f3de5a52e5..8735aa327c4e 100644 --- a/clients/client-textract/src/protocols/Aws_json1_1.ts +++ b/clients/client-textract/src/protocols/Aws_json1_1.ts @@ -1,12 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -64,18 +66,13 @@ import { ContentClassifier, DetectDocumentTextRequest, DetectDocumentTextResponse, - DetectedSignature, Document, - DocumentGroup, DocumentLocation, - DocumentMetadata, DocumentTooLargeException, - EntityType, ExpenseCurrency, ExpenseDetection, ExpenseDocument, ExpenseField, - ExpenseGroupProperty, ExpenseType, Extraction, FeatureType, @@ -89,7 +86,6 @@ import { GetLendingAnalysisRequest, GetLendingAnalysisResponse, GetLendingAnalysisSummaryRequest, - GetLendingAnalysisSummaryResponse, HumanLoopActivationOutput, HumanLoopConfig, HumanLoopDataAttributes, @@ -106,11 +102,9 @@ import { LendingDocument, LendingField, LendingResult, - LendingSummary, LimitExceededException, LineItemFields, LineItemGroup, - NormalizedValue, NotificationChannel, OutputConfig, PageClassification, @@ -119,22 +113,14 @@ import { ProvisionedThroughputExceededException, QueriesConfig, Query, - Relationship, S3Object, SignatureDetection, - SplitDocument, StartDocumentAnalysisRequest, - StartDocumentAnalysisResponse, StartDocumentTextDetectionRequest, - StartDocumentTextDetectionResponse, StartExpenseAnalysisRequest, - StartExpenseAnalysisResponse, StartLendingAnalysisRequest, - StartLendingAnalysisResponse, ThrottlingException, - UndetectedSignature, UnsupportedDocumentException, - Warning, } from "../models/models_0"; import { TextractServiceException as __BaseException } from "../models/TextractServiceException"; @@ -199,7 +185,7 @@ export const se_GetDocumentAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDocumentAnalysis"); let body: any; - body = JSON.stringify(se_GetDocumentAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -212,7 +198,7 @@ export const se_GetDocumentTextDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDocumentTextDetection"); let body: any; - body = JSON.stringify(se_GetDocumentTextDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -225,7 +211,7 @@ export const se_GetExpenseAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetExpenseAnalysis"); let body: any; - body = JSON.stringify(se_GetExpenseAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -238,7 +224,7 @@ export const se_GetLendingAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLendingAnalysis"); let body: any; - body = JSON.stringify(se_GetLendingAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -251,7 +237,7 @@ export const se_GetLendingAnalysisSummaryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLendingAnalysisSummary"); let body: any; - body = JSON.stringify(se_GetLendingAnalysisSummaryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -264,7 +250,7 @@ export const se_StartDocumentAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDocumentAnalysis"); let body: any; - body = JSON.stringify(se_StartDocumentAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -277,7 +263,7 @@ export const se_StartDocumentTextDetectionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartDocumentTextDetection"); let body: any; - body = JSON.stringify(se_StartDocumentTextDetectionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -290,7 +276,7 @@ export const se_StartExpenseAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartExpenseAnalysis"); let body: any; - body = JSON.stringify(se_StartExpenseAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -303,7 +289,7 @@ export const se_StartLendingAnalysisCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartLendingAnalysis"); let body: any; - body = JSON.stringify(se_StartLendingAnalysisRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +310,7 @@ export const de_AnalyzeDocumentCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -372,10 +358,9 @@ const de_AnalyzeDocumentCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -398,7 +383,7 @@ export const de_AnalyzeExpenseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -443,10 +428,9 @@ const de_AnalyzeExpenseCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -469,7 +453,7 @@ export const de_AnalyzeIDCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -514,10 +498,9 @@ const de_AnalyzeIDCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -540,7 +523,7 @@ export const de_DetectDocumentTextCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -585,10 +568,9 @@ const de_DetectDocumentTextCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -611,7 +593,7 @@ export const de_GetDocumentAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -653,10 +635,9 @@ const de_GetDocumentAnalysisCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -679,7 +660,7 @@ export const de_GetDocumentTextDetectionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -721,10 +702,9 @@ const de_GetDocumentTextDetectionCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -747,7 +727,7 @@ export const de_GetExpenseAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -789,10 +769,9 @@ const de_GetExpenseAnalysisCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -815,7 +794,7 @@ export const de_GetLendingAnalysisCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -857,10 +836,9 @@ const de_GetLendingAnalysisCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -878,12 +856,12 @@ export const de_GetLendingAnalysisSummaryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLendingAnalysisSummaryResponse(data, context); + contents = _json(data); const response: GetLendingAnalysisSummaryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -925,10 +903,9 @@ const de_GetLendingAnalysisSummaryCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -946,12 +923,12 @@ export const de_StartDocumentAnalysisCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDocumentAnalysisResponse(data, context); + contents = _json(data); const response: StartDocumentAnalysisCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1005,10 +982,9 @@ const de_StartDocumentAnalysisCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1026,12 +1002,12 @@ export const de_StartDocumentTextDetectionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartDocumentTextDetectionResponse(data, context); + contents = _json(data); const response: StartDocumentTextDetectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1085,10 +1061,9 @@ const de_StartDocumentTextDetectionCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1106,12 +1081,12 @@ export const de_StartExpenseAnalysisCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartExpenseAnalysisResponse(data, context); + contents = _json(data); const response: StartExpenseAnalysisCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1165,10 +1140,9 @@ const de_StartExpenseAnalysisCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1186,12 +1160,12 @@ export const de_StartLendingAnalysisCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartLendingAnalysisResponse(data, context); + contents = _json(data); const response: StartLendingAnalysisCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1245,10 +1219,9 @@ const de_StartLendingAnalysisCommandError = async ( throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1262,7 +1235,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1278,7 +1251,7 @@ const de_BadDocumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BadDocumentException(body, context); + const deserialized: any = _json(body); const exception = new BadDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1294,7 +1267,7 @@ const de_DocumentTooLargeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DocumentTooLargeException(body, context); + const deserialized: any = _json(body); const exception = new DocumentTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1310,7 +1283,7 @@ const de_HumanLoopQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_HumanLoopQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new HumanLoopQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1326,7 +1299,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_IdempotentParameterMismatchException(body, context); + const deserialized: any = _json(body); const exception = new IdempotentParameterMismatchException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1339,7 +1312,7 @@ const de_IdempotentParameterMismatchExceptionRes = async ( */ const de_InternalServerErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerError(body, context); + const deserialized: any = _json(body); const exception = new InternalServerError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1355,7 +1328,7 @@ const de_InvalidJobIdExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidJobIdException(body, context); + const deserialized: any = _json(body); const exception = new InvalidJobIdException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1371,7 +1344,7 @@ const de_InvalidKMSKeyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidKMSKeyException(body, context); + const deserialized: any = _json(body); const exception = new InvalidKMSKeyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1387,7 +1360,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1403,7 +1376,7 @@ const de_InvalidS3ObjectExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidS3ObjectException(body, context); + const deserialized: any = _json(body); const exception = new InvalidS3ObjectException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1419,7 +1392,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1435,7 +1408,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ProvisionedThroughputExceededException(body, context); + const deserialized: any = _json(body); const exception = new ProvisionedThroughputExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1448,7 +1421,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1464,7 +1437,7 @@ const de_UnsupportedDocumentExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedDocumentException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1476,70 +1449,54 @@ const de_UnsupportedDocumentExceptionRes = async ( * serializeAws_json1_1AnalyzeDocumentRequest */ const se_AnalyzeDocumentRequest = (input: AnalyzeDocumentRequest, context: __SerdeContext): any => { - return { - ...(input.Document != null && { Document: se_Document(input.Document, context) }), - ...(input.FeatureTypes != null && { FeatureTypes: se_FeatureTypes(input.FeatureTypes, context) }), - ...(input.HumanLoopConfig != null && { HumanLoopConfig: se_HumanLoopConfig(input.HumanLoopConfig, context) }), - ...(input.QueriesConfig != null && { QueriesConfig: se_QueriesConfig(input.QueriesConfig, context) }), - }; + return take(input, { + Document: (_) => se_Document(_, context), + FeatureTypes: _json, + HumanLoopConfig: _json, + QueriesConfig: _json, + }); }; /** * serializeAws_json1_1AnalyzeExpenseRequest */ const se_AnalyzeExpenseRequest = (input: AnalyzeExpenseRequest, context: __SerdeContext): any => { - return { - ...(input.Document != null && { Document: se_Document(input.Document, context) }), - }; + return take(input, { + Document: (_) => se_Document(_, context), + }); }; /** * serializeAws_json1_1AnalyzeIDRequest */ const se_AnalyzeIDRequest = (input: AnalyzeIDRequest, context: __SerdeContext): any => { - return { - ...(input.DocumentPages != null && { DocumentPages: se_DocumentPages(input.DocumentPages, context) }), - }; + return take(input, { + DocumentPages: (_) => se_DocumentPages(_, context), + }); }; -/** - * serializeAws_json1_1ContentClassifiers - */ -const se_ContentClassifiers = (input: (ContentClassifier | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ContentClassifiers omitted. /** * serializeAws_json1_1DetectDocumentTextRequest */ const se_DetectDocumentTextRequest = (input: DetectDocumentTextRequest, context: __SerdeContext): any => { - return { - ...(input.Document != null && { Document: se_Document(input.Document, context) }), - }; + return take(input, { + Document: (_) => se_Document(_, context), + }); }; /** * serializeAws_json1_1Document */ const se_Document = (input: Document, context: __SerdeContext): any => { - return { - ...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }), - ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }), - }; + return take(input, { + Bytes: context.base64Encoder, + S3Object: _json, + }); }; -/** - * serializeAws_json1_1DocumentLocation - */ -const se_DocumentLocation = (input: DocumentLocation, context: __SerdeContext): any => { - return { - ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }), - }; -}; +// se_DocumentLocation omitted. /** * serializeAws_json1_1DocumentPages @@ -1552,327 +1509,113 @@ const se_DocumentPages = (input: Document[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_json1_1FeatureTypes - */ -const se_FeatureTypes = (input: (FeatureType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FeatureTypes omitted. -/** - * serializeAws_json1_1GetDocumentAnalysisRequest - */ -const se_GetDocumentAnalysisRequest = (input: GetDocumentAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetDocumentAnalysisRequest omitted. -/** - * serializeAws_json1_1GetDocumentTextDetectionRequest - */ -const se_GetDocumentTextDetectionRequest = (input: GetDocumentTextDetectionRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetDocumentTextDetectionRequest omitted. -/** - * serializeAws_json1_1GetExpenseAnalysisRequest - */ -const se_GetExpenseAnalysisRequest = (input: GetExpenseAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetExpenseAnalysisRequest omitted. -/** - * serializeAws_json1_1GetLendingAnalysisRequest - */ -const se_GetLendingAnalysisRequest = (input: GetLendingAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_GetLendingAnalysisRequest omitted. -/** - * serializeAws_json1_1GetLendingAnalysisSummaryRequest - */ -const se_GetLendingAnalysisSummaryRequest = (input: GetLendingAnalysisSummaryRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_GetLendingAnalysisSummaryRequest omitted. -/** - * serializeAws_json1_1HumanLoopConfig - */ -const se_HumanLoopConfig = (input: HumanLoopConfig, context: __SerdeContext): any => { - return { - ...(input.DataAttributes != null && { DataAttributes: se_HumanLoopDataAttributes(input.DataAttributes, context) }), - ...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }), - ...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }), - }; -}; +// se_HumanLoopConfig omitted. -/** - * serializeAws_json1_1HumanLoopDataAttributes - */ -const se_HumanLoopDataAttributes = (input: HumanLoopDataAttributes, context: __SerdeContext): any => { - return { - ...(input.ContentClassifiers != null && { - ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context), - }), - }; -}; +// se_HumanLoopDataAttributes omitted. -/** - * serializeAws_json1_1NotificationChannel - */ -const se_NotificationChannel = (input: NotificationChannel, context: __SerdeContext): any => { - return { - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }), - }; -}; +// se_NotificationChannel omitted. -/** - * serializeAws_json1_1OutputConfig - */ -const se_OutputConfig = (input: OutputConfig, context: __SerdeContext): any => { - return { - ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }), - ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }), - }; -}; +// se_OutputConfig omitted. -/** - * serializeAws_json1_1Queries - */ -const se_Queries = (input: Query[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Query(entry, context); - }); -}; +// se_Queries omitted. -/** - * serializeAws_json1_1QueriesConfig - */ -const se_QueriesConfig = (input: QueriesConfig, context: __SerdeContext): any => { - return { - ...(input.Queries != null && { Queries: se_Queries(input.Queries, context) }), - }; -}; +// se_QueriesConfig omitted. -/** - * serializeAws_json1_1Query - */ -const se_Query = (input: Query, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.Pages != null && { Pages: se_QueryPages(input.Pages, context) }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_Query omitted. -/** - * serializeAws_json1_1QueryPages - */ -const se_QueryPages = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_QueryPages omitted. -/** - * serializeAws_json1_1S3Object - */ -const se_S3Object = (input: S3Object, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se_S3Object omitted. -/** - * serializeAws_json1_1StartDocumentAnalysisRequest - */ -const se_StartDocumentAnalysisRequest = (input: StartDocumentAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }), - ...(input.FeatureTypes != null && { FeatureTypes: se_FeatureTypes(input.FeatureTypes, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - ...(input.QueriesConfig != null && { QueriesConfig: se_QueriesConfig(input.QueriesConfig, context) }), - }; -}; +// se_StartDocumentAnalysisRequest omitted. -/** - * serializeAws_json1_1StartDocumentTextDetectionRequest - */ -const se_StartDocumentTextDetectionRequest = ( - input: StartDocumentTextDetectionRequest, - context: __SerdeContext -): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - }; -}; +// se_StartDocumentTextDetectionRequest omitted. -/** - * serializeAws_json1_1StartExpenseAnalysisRequest - */ -const se_StartExpenseAnalysisRequest = (input: StartExpenseAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - }; -}; +// se_StartExpenseAnalysisRequest omitted. -/** - * serializeAws_json1_1StartLendingAnalysisRequest - */ -const se_StartLendingAnalysisRequest = (input: StartLendingAnalysisRequest, context: __SerdeContext): any => { - return { - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }), - ...(input.JobTag != null && { JobTag: input.JobTag }), - ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }), - ...(input.NotificationChannel != null && { - NotificationChannel: se_NotificationChannel(input.NotificationChannel, context), - }), - ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }), - }; -}; +// se_StartLendingAnalysisRequest omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_1AnalyzeDocumentResponse */ const de_AnalyzeDocumentResponse = (output: any, context: __SerdeContext): AnalyzeDocumentResponse => { - return { - AnalyzeDocumentModelVersion: __expectString(output.AnalyzeDocumentModelVersion), - Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined, - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - HumanLoopActivationOutput: - output.HumanLoopActivationOutput != null - ? de_HumanLoopActivationOutput(output.HumanLoopActivationOutput, context) - : undefined, - } as any; + return take(output, { + AnalyzeDocumentModelVersion: __expectString, + Blocks: (_: any) => de_BlockList(_, context), + DocumentMetadata: _json, + HumanLoopActivationOutput: (_: any) => de_HumanLoopActivationOutput(_, context), + }) as any; }; /** * deserializeAws_json1_1AnalyzeExpenseResponse */ const de_AnalyzeExpenseResponse = (output: any, context: __SerdeContext): AnalyzeExpenseResponse => { - return { - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - ExpenseDocuments: - output.ExpenseDocuments != null ? de_ExpenseDocumentList(output.ExpenseDocuments, context) : undefined, - } as any; + return take(output, { + DocumentMetadata: _json, + ExpenseDocuments: (_: any) => de_ExpenseDocumentList(_, context), + }) as any; }; /** * deserializeAws_json1_1AnalyzeIDDetections */ const de_AnalyzeIDDetections = (output: any, context: __SerdeContext): AnalyzeIDDetections => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - NormalizedValue: output.NormalizedValue != null ? de_NormalizedValue(output.NormalizedValue, context) : undefined, - Text: __expectString(output.Text), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + NormalizedValue: _json, + Text: __expectString, + }) as any; }; /** * deserializeAws_json1_1AnalyzeIDResponse */ const de_AnalyzeIDResponse = (output: any, context: __SerdeContext): AnalyzeIDResponse => { - return { - AnalyzeIDModelVersion: __expectString(output.AnalyzeIDModelVersion), - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - IdentityDocuments: - output.IdentityDocuments != null ? de_IdentityDocumentList(output.IdentityDocuments, context) : undefined, - } as any; + return take(output, { + AnalyzeIDModelVersion: __expectString, + DocumentMetadata: _json, + IdentityDocuments: (_: any) => de_IdentityDocumentList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1BadDocumentException - */ -const de_BadDocumentException = (output: any, context: __SerdeContext): BadDocumentException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_BadDocumentException omitted. /** * deserializeAws_json1_1Block */ const de_Block = (output: any, context: __SerdeContext): Block => { - return { - BlockType: __expectString(output.BlockType), - ColumnIndex: __expectInt32(output.ColumnIndex), - ColumnSpan: __expectInt32(output.ColumnSpan), - Confidence: __limitedParseFloat32(output.Confidence), - EntityTypes: output.EntityTypes != null ? de_EntityTypes(output.EntityTypes, context) : undefined, - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - Id: __expectString(output.Id), - Page: __expectInt32(output.Page), - Query: output.Query != null ? de_Query(output.Query, context) : undefined, - Relationships: output.Relationships != null ? de_RelationshipList(output.Relationships, context) : undefined, - RowIndex: __expectInt32(output.RowIndex), - RowSpan: __expectInt32(output.RowSpan), - SelectionStatus: __expectString(output.SelectionStatus), - Text: __expectString(output.Text), - TextType: __expectString(output.TextType), - } as any; + return take(output, { + BlockType: __expectString, + ColumnIndex: __expectInt32, + ColumnSpan: __expectInt32, + Confidence: __limitedParseFloat32, + EntityTypes: _json, + Geometry: (_: any) => de_Geometry(_, context), + Id: __expectString, + Page: __expectInt32, + Query: _json, + Relationships: _json, + RowIndex: __expectInt32, + RowSpan: __expectInt32, + SelectionStatus: __expectString, + Text: __expectString, + TextType: __expectString, + }) as any; }; /** @@ -1882,9 +1625,6 @@ const de_BlockList = (output: any, context: __SerdeContext): Block[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Block(entry, context); }); return retVal; @@ -1894,146 +1634,70 @@ const de_BlockList = (output: any, context: __SerdeContext): Block[] => { * deserializeAws_json1_1BoundingBox */ const de_BoundingBox = (output: any, context: __SerdeContext): BoundingBox => { - return { - Height: __limitedParseFloat32(output.Height), - Left: __limitedParseFloat32(output.Left), - Top: __limitedParseFloat32(output.Top), - Width: __limitedParseFloat32(output.Width), - } as any; + return take(output, { + Height: __limitedParseFloat32, + Left: __limitedParseFloat32, + Top: __limitedParseFloat32, + Width: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1DetectDocumentTextResponse */ const de_DetectDocumentTextResponse = (output: any, context: __SerdeContext): DetectDocumentTextResponse => { - return { - Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined, - DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion), - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - } as any; + return take(output, { + Blocks: (_: any) => de_BlockList(_, context), + DetectDocumentTextModelVersion: __expectString, + DocumentMetadata: _json, + }) as any; }; -/** - * deserializeAws_json1_1DetectedSignature - */ -const de_DetectedSignature = (output: any, context: __SerdeContext): DetectedSignature => { - return { - Page: __expectInt32(output.Page), - } as any; -}; +// de_DetectedSignature omitted. -/** - * deserializeAws_json1_1DetectedSignatureList - */ -const de_DetectedSignatureList = (output: any, context: __SerdeContext): DetectedSignature[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DetectedSignature(entry, context); - }); - return retVal; -}; +// de_DetectedSignatureList omitted. -/** - * deserializeAws_json1_1DocumentGroup - */ -const de_DocumentGroup = (output: any, context: __SerdeContext): DocumentGroup => { - return { - DetectedSignatures: - output.DetectedSignatures != null ? de_DetectedSignatureList(output.DetectedSignatures, context) : undefined, - SplitDocuments: output.SplitDocuments != null ? de_SplitDocumentList(output.SplitDocuments, context) : undefined, - Type: __expectString(output.Type), - UndetectedSignatures: - output.UndetectedSignatures != null - ? de_UndetectedSignatureList(output.UndetectedSignatures, context) - : undefined, - } as any; -}; +// de_DocumentGroup omitted. -/** - * deserializeAws_json1_1DocumentGroupList - */ -const de_DocumentGroupList = (output: any, context: __SerdeContext): DocumentGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DocumentGroup(entry, context); - }); - return retVal; -}; +// de_DocumentGroupList omitted. -/** - * deserializeAws_json1_1DocumentMetadata - */ -const de_DocumentMetadata = (output: any, context: __SerdeContext): DocumentMetadata => { - return { - Pages: __expectInt32(output.Pages), - } as any; -}; +// de_DocumentMetadata omitted. -/** - * deserializeAws_json1_1DocumentTooLargeException - */ -const de_DocumentTooLargeException = (output: any, context: __SerdeContext): DocumentTooLargeException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_DocumentTooLargeException omitted. -/** - * deserializeAws_json1_1EntityTypes - */ -const de_EntityTypes = (output: any, context: __SerdeContext): (EntityType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EntityTypes omitted. /** * deserializeAws_json1_1ExpenseCurrency */ const de_ExpenseCurrency = (output: any, context: __SerdeContext): ExpenseCurrency => { - return { - Code: __expectString(output.Code), - Confidence: __limitedParseFloat32(output.Confidence), - } as any; + return take(output, { + Code: __expectString, + Confidence: __limitedParseFloat32, + }) as any; }; /** * deserializeAws_json1_1ExpenseDetection */ const de_ExpenseDetection = (output: any, context: __SerdeContext): ExpenseDetection => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - Text: __expectString(output.Text), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Geometry: (_: any) => de_Geometry(_, context), + Text: __expectString, + }) as any; }; /** * deserializeAws_json1_1ExpenseDocument */ const de_ExpenseDocument = (output: any, context: __SerdeContext): ExpenseDocument => { - return { - Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined, - ExpenseIndex: __expectInt32(output.ExpenseIndex), - LineItemGroups: output.LineItemGroups != null ? de_LineItemGroupList(output.LineItemGroups, context) : undefined, - SummaryFields: output.SummaryFields != null ? de_ExpenseFieldList(output.SummaryFields, context) : undefined, - } as any; + return take(output, { + Blocks: (_: any) => de_BlockList(_, context), + ExpenseIndex: __expectInt32, + LineItemGroups: (_: any) => de_LineItemGroupList(_, context), + SummaryFields: (_: any) => de_ExpenseFieldList(_, context), + }) as any; }; /** @@ -2043,9 +1707,6 @@ const de_ExpenseDocumentList = (output: any, context: __SerdeContext): ExpenseDo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExpenseDocument(entry, context); }); return retVal; @@ -2055,15 +1716,14 @@ const de_ExpenseDocumentList = (output: any, context: __SerdeContext): ExpenseDo * deserializeAws_json1_1ExpenseField */ const de_ExpenseField = (output: any, context: __SerdeContext): ExpenseField => { - return { - Currency: output.Currency != null ? de_ExpenseCurrency(output.Currency, context) : undefined, - GroupProperties: - output.GroupProperties != null ? de_ExpenseGroupPropertyList(output.GroupProperties, context) : undefined, - LabelDetection: output.LabelDetection != null ? de_ExpenseDetection(output.LabelDetection, context) : undefined, - PageNumber: __expectInt32(output.PageNumber), - Type: output.Type != null ? de_ExpenseType(output.Type, context) : undefined, - ValueDetection: output.ValueDetection != null ? de_ExpenseDetection(output.ValueDetection, context) : undefined, - } as any; + return take(output, { + Currency: (_: any) => de_ExpenseCurrency(_, context), + GroupProperties: _json, + LabelDetection: (_: any) => de_ExpenseDetection(_, context), + PageNumber: __expectInt32, + Type: (_: any) => de_ExpenseType(_, context), + ValueDetection: (_: any) => de_ExpenseDetection(_, context), + }) as any; }; /** @@ -2073,59 +1733,34 @@ const de_ExpenseFieldList = (output: any, context: __SerdeContext): ExpenseField const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ExpenseField(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ExpenseGroupProperty - */ -const de_ExpenseGroupProperty = (output: any, context: __SerdeContext): ExpenseGroupProperty => { - return { - Id: __expectString(output.Id), - Types: output.Types != null ? de_StringList(output.Types, context) : undefined, - } as any; -}; +// de_ExpenseGroupProperty omitted. -/** - * deserializeAws_json1_1ExpenseGroupPropertyList - */ -const de_ExpenseGroupPropertyList = (output: any, context: __SerdeContext): ExpenseGroupProperty[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExpenseGroupProperty(entry, context); - }); - return retVal; -}; +// de_ExpenseGroupPropertyList omitted. /** * deserializeAws_json1_1ExpenseType */ const de_ExpenseType = (output: any, context: __SerdeContext): ExpenseType => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Text: __expectString(output.Text), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Text: __expectString, + }) as any; }; /** * deserializeAws_json1_1Extraction */ const de_Extraction = (output: any, context: __SerdeContext): Extraction => { - return { - ExpenseDocument: output.ExpenseDocument != null ? de_ExpenseDocument(output.ExpenseDocument, context) : undefined, - IdentityDocument: - output.IdentityDocument != null ? de_IdentityDocument(output.IdentityDocument, context) : undefined, - LendingDocument: output.LendingDocument != null ? de_LendingDocument(output.LendingDocument, context) : undefined, - } as any; + return take(output, { + ExpenseDocument: (_: any) => de_ExpenseDocument(_, context), + IdentityDocument: (_: any) => de_IdentityDocument(_, context), + LendingDocument: (_: any) => de_LendingDocument(_, context), + }) as any; }; /** @@ -2135,9 +1770,6 @@ const de_ExtractionList = (output: any, context: __SerdeContext): Extraction[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Extraction(entry, context); }); return retVal; @@ -2147,26 +1779,25 @@ const de_ExtractionList = (output: any, context: __SerdeContext): Extraction[] = * deserializeAws_json1_1Geometry */ const de_Geometry = (output: any, context: __SerdeContext): Geometry => { - return { - BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined, - Polygon: output.Polygon != null ? de_Polygon(output.Polygon, context) : undefined, - } as any; + return take(output, { + BoundingBox: (_: any) => de_BoundingBox(_, context), + Polygon: (_: any) => de_Polygon(_, context), + }) as any; }; /** * deserializeAws_json1_1GetDocumentAnalysisResponse */ const de_GetDocumentAnalysisResponse = (output: any, context: __SerdeContext): GetDocumentAnalysisResponse => { - return { - AnalyzeDocumentModelVersion: __expectString(output.AnalyzeDocumentModelVersion), - Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined, - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined, - } as any; + return take(output, { + AnalyzeDocumentModelVersion: __expectString, + Blocks: (_: any) => de_BlockList(_, context), + DocumentMetadata: _json, + JobStatus: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + Warnings: _json, + }) as any; }; /** @@ -2176,149 +1807,85 @@ const de_GetDocumentTextDetectionResponse = ( output: any, context: __SerdeContext ): GetDocumentTextDetectionResponse => { - return { - Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined, - DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion), - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined, - } as any; + return take(output, { + Blocks: (_: any) => de_BlockList(_, context), + DetectDocumentTextModelVersion: __expectString, + DocumentMetadata: _json, + JobStatus: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + Warnings: _json, + }) as any; }; /** * deserializeAws_json1_1GetExpenseAnalysisResponse */ const de_GetExpenseAnalysisResponse = (output: any, context: __SerdeContext): GetExpenseAnalysisResponse => { - return { - AnalyzeExpenseModelVersion: __expectString(output.AnalyzeExpenseModelVersion), - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - ExpenseDocuments: - output.ExpenseDocuments != null ? de_ExpenseDocumentList(output.ExpenseDocuments, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - StatusMessage: __expectString(output.StatusMessage), - Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined, - } as any; + return take(output, { + AnalyzeExpenseModelVersion: __expectString, + DocumentMetadata: _json, + ExpenseDocuments: (_: any) => de_ExpenseDocumentList(_, context), + JobStatus: __expectString, + NextToken: __expectString, + StatusMessage: __expectString, + Warnings: _json, + }) as any; }; /** * deserializeAws_json1_1GetLendingAnalysisResponse */ const de_GetLendingAnalysisResponse = (output: any, context: __SerdeContext): GetLendingAnalysisResponse => { - return { - AnalyzeLendingModelVersion: __expectString(output.AnalyzeLendingModelVersion), - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - JobStatus: __expectString(output.JobStatus), - NextToken: __expectString(output.NextToken), - Results: output.Results != null ? de_LendingResultList(output.Results, context) : undefined, - StatusMessage: __expectString(output.StatusMessage), - Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined, - } as any; + return take(output, { + AnalyzeLendingModelVersion: __expectString, + DocumentMetadata: _json, + JobStatus: __expectString, + NextToken: __expectString, + Results: (_: any) => de_LendingResultList(_, context), + StatusMessage: __expectString, + Warnings: _json, + }) as any; }; -/** - * deserializeAws_json1_1GetLendingAnalysisSummaryResponse - */ -const de_GetLendingAnalysisSummaryResponse = ( - output: any, - context: __SerdeContext -): GetLendingAnalysisSummaryResponse => { - return { - AnalyzeLendingModelVersion: __expectString(output.AnalyzeLendingModelVersion), - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - JobStatus: __expectString(output.JobStatus), - StatusMessage: __expectString(output.StatusMessage), - Summary: output.Summary != null ? de_LendingSummary(output.Summary, context) : undefined, - Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined, - } as any; -}; +// de_GetLendingAnalysisSummaryResponse omitted. /** * deserializeAws_json1_1HumanLoopActivationOutput */ const de_HumanLoopActivationOutput = (output: any, context: __SerdeContext): HumanLoopActivationOutput => { - return { - HumanLoopActivationConditionsEvaluationResults: - output.HumanLoopActivationConditionsEvaluationResults != null - ? new __LazyJsonString(output.HumanLoopActivationConditionsEvaluationResults) - : undefined, - HumanLoopActivationReasons: - output.HumanLoopActivationReasons != null - ? de_HumanLoopActivationReasons(output.HumanLoopActivationReasons, context) - : undefined, - HumanLoopArn: __expectString(output.HumanLoopArn), - } as any; + return take(output, { + HumanLoopActivationConditionsEvaluationResults: (_: any) => new __LazyJsonString(_), + HumanLoopActivationReasons: _json, + HumanLoopArn: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1HumanLoopActivationReasons - */ -const de_HumanLoopActivationReasons = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_HumanLoopActivationReasons omitted. -/** - * deserializeAws_json1_1HumanLoopQuotaExceededException - */ -const de_HumanLoopQuotaExceededException = (output: any, context: __SerdeContext): HumanLoopQuotaExceededException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - QuotaCode: __expectString(output.QuotaCode), - ResourceType: __expectString(output.ResourceType), - ServiceCode: __expectString(output.ServiceCode), - } as any; -}; +// de_HumanLoopQuotaExceededException omitted. -/** - * deserializeAws_json1_1IdempotentParameterMismatchException - */ -const de_IdempotentParameterMismatchException = ( - output: any, - context: __SerdeContext -): IdempotentParameterMismatchException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_IdempotentParameterMismatchException omitted. /** * deserializeAws_json1_1IdentityDocument */ const de_IdentityDocument = (output: any, context: __SerdeContext): IdentityDocument => { - return { - Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined, - DocumentIndex: __expectInt32(output.DocumentIndex), - IdentityDocumentFields: - output.IdentityDocumentFields != null - ? de_IdentityDocumentFieldList(output.IdentityDocumentFields, context) - : undefined, - } as any; + return take(output, { + Blocks: (_: any) => de_BlockList(_, context), + DocumentIndex: __expectInt32, + IdentityDocumentFields: (_: any) => de_IdentityDocumentFieldList(_, context), + }) as any; }; /** * deserializeAws_json1_1IdentityDocumentField */ const de_IdentityDocumentField = (output: any, context: __SerdeContext): IdentityDocumentField => { - return { - Type: output.Type != null ? de_AnalyzeIDDetections(output.Type, context) : undefined, - ValueDetection: output.ValueDetection != null ? de_AnalyzeIDDetections(output.ValueDetection, context) : undefined, - } as any; + return take(output, { + Type: (_: any) => de_AnalyzeIDDetections(_, context), + ValueDetection: (_: any) => de_AnalyzeIDDetections(_, context), + }) as any; }; /** @@ -2328,9 +1895,6 @@ const de_IdentityDocumentFieldList = (output: any, context: __SerdeContext): Ide const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IdentityDocumentField(entry, context); }); return retVal; @@ -2343,89 +1907,33 @@ const de_IdentityDocumentList = (output: any, context: __SerdeContext): Identity const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_IdentityDocument(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1IdList - */ -const de_IdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IdList omitted. -/** - * deserializeAws_json1_1InternalServerError - */ -const de_InternalServerError = (output: any, context: __SerdeContext): InternalServerError => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerError omitted. -/** - * deserializeAws_json1_1InvalidJobIdException - */ -const de_InvalidJobIdException = (output: any, context: __SerdeContext): InvalidJobIdException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidJobIdException omitted. -/** - * deserializeAws_json1_1InvalidKMSKeyException - */ -const de_InvalidKMSKeyException = (output: any, context: __SerdeContext): InvalidKMSKeyException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidKMSKeyException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidS3ObjectException - */ -const de_InvalidS3ObjectException = (output: any, context: __SerdeContext): InvalidS3ObjectException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidS3ObjectException omitted. /** * deserializeAws_json1_1LendingDetection */ const de_LendingDetection = (output: any, context: __SerdeContext): LendingDetection => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - SelectionStatus: __expectString(output.SelectionStatus), - Text: __expectString(output.Text), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Geometry: (_: any) => de_Geometry(_, context), + SelectionStatus: __expectString, + Text: __expectString, + }) as any; }; /** @@ -2435,9 +1943,6 @@ const de_LendingDetectionList = (output: any, context: __SerdeContext): LendingD const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LendingDetection(entry, context); }); return retVal; @@ -2447,23 +1952,21 @@ const de_LendingDetectionList = (output: any, context: __SerdeContext): LendingD * deserializeAws_json1_1LendingDocument */ const de_LendingDocument = (output: any, context: __SerdeContext): LendingDocument => { - return { - LendingFields: output.LendingFields != null ? de_LendingFieldList(output.LendingFields, context) : undefined, - SignatureDetections: - output.SignatureDetections != null ? de_SignatureDetectionList(output.SignatureDetections, context) : undefined, - } as any; + return take(output, { + LendingFields: (_: any) => de_LendingFieldList(_, context), + SignatureDetections: (_: any) => de_SignatureDetectionList(_, context), + }) as any; }; /** * deserializeAws_json1_1LendingField */ const de_LendingField = (output: any, context: __SerdeContext): LendingField => { - return { - KeyDetection: output.KeyDetection != null ? de_LendingDetection(output.KeyDetection, context) : undefined, - Type: __expectString(output.Type), - ValueDetections: - output.ValueDetections != null ? de_LendingDetectionList(output.ValueDetections, context) : undefined, - } as any; + return take(output, { + KeyDetection: (_: any) => de_LendingDetection(_, context), + Type: __expectString, + ValueDetections: (_: any) => de_LendingDetectionList(_, context), + }) as any; }; /** @@ -2473,9 +1976,6 @@ const de_LendingFieldList = (output: any, context: __SerdeContext): LendingField const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LendingField(entry, context); }); return retVal; @@ -2485,12 +1985,11 @@ const de_LendingFieldList = (output: any, context: __SerdeContext): LendingField * deserializeAws_json1_1LendingResult */ const de_LendingResult = (output: any, context: __SerdeContext): LendingResult => { - return { - Extractions: output.Extractions != null ? de_ExtractionList(output.Extractions, context) : undefined, - Page: __expectInt32(output.Page), - PageClassification: - output.PageClassification != null ? de_PageClassification(output.PageClassification, context) : undefined, - } as any; + return take(output, { + Extractions: (_: any) => de_ExtractionList(_, context), + Page: __expectInt32, + PageClassification: (_: any) => de_PageClassification(_, context), + }) as any; }; /** @@ -2500,55 +1999,32 @@ const de_LendingResultList = (output: any, context: __SerdeContext): LendingResu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LendingResult(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LendingSummary - */ -const de_LendingSummary = (output: any, context: __SerdeContext): LendingSummary => { - return { - DocumentGroups: output.DocumentGroups != null ? de_DocumentGroupList(output.DocumentGroups, context) : undefined, - UndetectedDocumentTypes: - output.UndetectedDocumentTypes != null - ? de_UndetectedDocumentTypeList(output.UndetectedDocumentTypes, context) - : undefined, - } as any; -}; +// de_LendingSummary omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1LineItemFields */ const de_LineItemFields = (output: any, context: __SerdeContext): LineItemFields => { - return { - LineItemExpenseFields: - output.LineItemExpenseFields != null ? de_ExpenseFieldList(output.LineItemExpenseFields, context) : undefined, - } as any; + return take(output, { + LineItemExpenseFields: (_: any) => de_ExpenseFieldList(_, context), + }) as any; }; /** * deserializeAws_json1_1LineItemGroup */ const de_LineItemGroup = (output: any, context: __SerdeContext): LineItemGroup => { - return { - LineItemGroupIndex: __expectInt32(output.LineItemGroupIndex), - LineItems: output.LineItems != null ? de_LineItemList(output.LineItems, context) : undefined, - } as any; + return take(output, { + LineItemGroupIndex: __expectInt32, + LineItems: (_: any) => de_LineItemList(_, context), + }) as any; }; /** @@ -2558,9 +2034,6 @@ const de_LineItemGroupList = (output: any, context: __SerdeContext): LineItemGro const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LineItemGroup(entry, context); }); return retVal; @@ -2573,72 +2046,35 @@ const de_LineItemList = (output: any, context: __SerdeContext): LineItemFields[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LineItemFields(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NormalizedValue - */ -const de_NormalizedValue = (output: any, context: __SerdeContext): NormalizedValue => { - return { - Value: __expectString(output.Value), - ValueType: __expectString(output.ValueType), - } as any; -}; +// de_NormalizedValue omitted. /** * deserializeAws_json1_1PageClassification */ const de_PageClassification = (output: any, context: __SerdeContext): PageClassification => { - return { - PageNumber: output.PageNumber != null ? de_PredictionList(output.PageNumber, context) : undefined, - PageType: output.PageType != null ? de_PredictionList(output.PageType, context) : undefined, - } as any; + return take(output, { + PageNumber: (_: any) => de_PredictionList(_, context), + PageType: (_: any) => de_PredictionList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1PageList - */ -const de_PageList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_PageList omitted. -/** - * deserializeAws_json1_1Pages - */ -const de_Pages = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_Pages omitted. /** * deserializeAws_json1_1Point */ const de_Point = (output: any, context: __SerdeContext): Point => { - return { - X: __limitedParseFloat32(output.X), - Y: __limitedParseFloat32(output.Y), - } as any; + return take(output, { + X: __limitedParseFloat32, + Y: __limitedParseFloat32, + }) as any; }; /** @@ -2648,9 +2084,6 @@ const de_Polygon = (output: any, context: __SerdeContext): Point[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Point(entry, context); }); return retVal; @@ -2660,10 +2093,10 @@ const de_Polygon = (output: any, context: __SerdeContext): Point[] => { * deserializeAws_json1_1Prediction */ const de_Prediction = (output: any, context: __SerdeContext): Prediction => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Value: __expectString(output.Value), - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Value: __expectString, + }) as any; }; /** @@ -2673,86 +2106,29 @@ const de_PredictionList = (output: any, context: __SerdeContext): Prediction[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Prediction(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ProvisionedThroughputExceededException - */ -const de_ProvisionedThroughputExceededException = ( - output: any, - context: __SerdeContext -): ProvisionedThroughputExceededException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_ProvisionedThroughputExceededException omitted. -/** - * deserializeAws_json1_1Query - */ -const de_Query = (output: any, context: __SerdeContext): Query => { - return { - Alias: __expectString(output.Alias), - Pages: output.Pages != null ? de_QueryPages(output.Pages, context) : undefined, - Text: __expectString(output.Text), - } as any; -}; +// de_Query omitted. -/** - * deserializeAws_json1_1QueryPages - */ -const de_QueryPages = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_QueryPages omitted. -/** - * deserializeAws_json1_1Relationship - */ -const de_Relationship = (output: any, context: __SerdeContext): Relationship => { - return { - Ids: output.Ids != null ? de_IdList(output.Ids, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_Relationship omitted. -/** - * deserializeAws_json1_1RelationshipList - */ -const de_RelationshipList = (output: any, context: __SerdeContext): Relationship[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Relationship(entry, context); - }); - return retVal; -}; +// de_RelationshipList omitted. /** * deserializeAws_json1_1SignatureDetection */ const de_SignatureDetection = (output: any, context: __SerdeContext): SignatureDetection => { - return { - Confidence: __limitedParseFloat32(output.Confidence), - Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined, - } as any; + return take(output, { + Confidence: __limitedParseFloat32, + Geometry: (_: any) => de_Geometry(_, context), + }) as any; }; /** @@ -2762,176 +2138,38 @@ const de_SignatureDetectionList = (output: any, context: __SerdeContext): Signat const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SignatureDetection(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SplitDocument - */ -const de_SplitDocument = (output: any, context: __SerdeContext): SplitDocument => { - return { - Index: __expectInt32(output.Index), - Pages: output.Pages != null ? de_PageList(output.Pages, context) : undefined, - } as any; -}; +// de_SplitDocument omitted. -/** - * deserializeAws_json1_1SplitDocumentList - */ -const de_SplitDocumentList = (output: any, context: __SerdeContext): SplitDocument[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SplitDocument(entry, context); - }); - return retVal; -}; +// de_SplitDocumentList omitted. -/** - * deserializeAws_json1_1StartDocumentAnalysisResponse - */ -const de_StartDocumentAnalysisResponse = (output: any, context: __SerdeContext): StartDocumentAnalysisResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartDocumentAnalysisResponse omitted. -/** - * deserializeAws_json1_1StartDocumentTextDetectionResponse - */ -const de_StartDocumentTextDetectionResponse = ( - output: any, - context: __SerdeContext -): StartDocumentTextDetectionResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartDocumentTextDetectionResponse omitted. -/** - * deserializeAws_json1_1StartExpenseAnalysisResponse - */ -const de_StartExpenseAnalysisResponse = (output: any, context: __SerdeContext): StartExpenseAnalysisResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartExpenseAnalysisResponse omitted. -/** - * deserializeAws_json1_1StartLendingAnalysisResponse - */ -const de_StartLendingAnalysisResponse = (output: any, context: __SerdeContext): StartLendingAnalysisResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartLendingAnalysisResponse omitted. -/** - * deserializeAws_json1_1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UndetectedDocumentTypeList - */ -const de_UndetectedDocumentTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UndetectedDocumentTypeList omitted. -/** - * deserializeAws_json1_1UndetectedSignature - */ -const de_UndetectedSignature = (output: any, context: __SerdeContext): UndetectedSignature => { - return { - Page: __expectInt32(output.Page), - } as any; -}; +// de_UndetectedSignature omitted. -/** - * deserializeAws_json1_1UndetectedSignatureList - */ -const de_UndetectedSignatureList = (output: any, context: __SerdeContext): UndetectedSignature[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UndetectedSignature(entry, context); - }); - return retVal; -}; +// de_UndetectedSignatureList omitted. -/** - * deserializeAws_json1_1UnsupportedDocumentException - */ -const de_UnsupportedDocumentException = (output: any, context: __SerdeContext): UnsupportedDocumentException => { - return { - Code: __expectString(output.Code), - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedDocumentException omitted. -/** - * deserializeAws_json1_1Warning - */ -const de_Warning = (output: any, context: __SerdeContext): Warning => { - return { - ErrorCode: __expectString(output.ErrorCode), - Pages: output.Pages != null ? de_Pages(output.Pages, context) : undefined, - } as any; -}; +// de_Warning omitted. -/** - * deserializeAws_json1_1Warnings - */ -const de_Warnings = (output: any, context: __SerdeContext): Warning[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Warning(entry, context); - }); - return retVal; -}; +// de_Warnings omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2953,6 +2191,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-timestream-query/src/protocols/Aws_json1_0.ts b/clients/client-timestream-query/src/protocols/Aws_json1_0.ts index a1f4e1d03645..9327782b1b35 100644 --- a/clients/client-timestream-query/src/protocols/Aws_json1_0.ts +++ b/clients/client-timestream-query/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -9,7 +10,8 @@ import { expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -56,29 +58,22 @@ import { import { AccessDeniedException, CancelQueryRequest, - CancelQueryResponse, ColumnInfo, ConflictException, CreateScheduledQueryRequest, - CreateScheduledQueryResponse, Datum, DeleteScheduledQueryRequest, DescribeEndpointsRequest, - DescribeEndpointsResponse, DescribeScheduledQueryRequest, DescribeScheduledQueryResponse, DimensionMapping, - Endpoint, ErrorReportConfiguration, - ErrorReportLocation, ExecuteScheduledQueryRequest, - ExecutionStats, InternalServerException, InvalidEndpointException, ListScheduledQueriesRequest, ListScheduledQueriesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MixedMeasureMapping, MultiMeasureAttributeMapping, MultiMeasureMappings, @@ -93,7 +88,6 @@ import { ResourceNotFoundException, Row, S3Configuration, - S3ReportLocation, ScheduleConfiguration, ScheduledQuery, ScheduledQueryDescription, @@ -103,16 +97,12 @@ import { SnsConfiguration, Tag, TagResourceRequest, - TagResourceResponse, TargetConfiguration, - TargetDestination, ThrottlingException, TimeSeriesDataPoint, TimestreamConfiguration, - TimestreamDestination, Type, UntagResourceRequest, - UntagResourceResponse, UpdateScheduledQueryRequest, ValidationException, } from "../models/models_0"; @@ -127,7 +117,7 @@ export const se_CancelQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelQuery"); let body: any; - body = JSON.stringify(se_CancelQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -153,7 +143,7 @@ export const se_DeleteScheduledQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteScheduledQuery"); let body: any; - body = JSON.stringify(se_DeleteScheduledQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -166,7 +156,7 @@ export const se_DescribeEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoints"); let body: any; - body = JSON.stringify(se_DescribeEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -179,7 +169,7 @@ export const se_DescribeScheduledQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeScheduledQuery"); let body: any; - body = JSON.stringify(se_DescribeScheduledQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -205,7 +195,7 @@ export const se_ListScheduledQueriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListScheduledQueries"); let body: any; - body = JSON.stringify(se_ListScheduledQueriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -218,7 +208,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -231,7 +221,7 @@ export const se_PrepareQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PrepareQuery"); let body: any; - body = JSON.stringify(se_PrepareQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -254,7 +244,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -267,7 +257,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -280,7 +270,7 @@ export const se_UpdateScheduledQueryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateScheduledQuery"); let body: any; - body = JSON.stringify(se_UpdateScheduledQueryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -296,12 +286,12 @@ export const de_CancelQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelQueryResponse(data, context); + contents = _json(data); const response: CancelQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -334,10 +324,9 @@ const de_CancelQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -355,12 +344,12 @@ export const de_CreateScheduledQueryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateScheduledQueryResponse(data, context); + contents = _json(data); const response: CreateScheduledQueryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -399,10 +388,9 @@ const de_CreateScheduledQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -422,7 +410,7 @@ export const de_DeleteScheduledQueryCommand = async ( const response: DeleteScheduledQueryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -458,10 +446,9 @@ const de_DeleteScheduledQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -479,12 +466,12 @@ export const de_DescribeEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEndpointsResponse(data, context); + contents = _json(data); const response: DescribeEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -511,10 +498,9 @@ const de_DescribeEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -537,7 +523,7 @@ export const de_DescribeScheduledQueryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -573,10 +559,9 @@ const de_DescribeScheduledQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -596,7 +581,7 @@ export const de_ExecuteScheduledQueryCommand = async ( const response: ExecuteScheduledQueryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -632,10 +617,9 @@ const de_ExecuteScheduledQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -658,7 +642,7 @@ export const de_ListScheduledQueriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -691,10 +675,9 @@ const de_ListScheduledQueriesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -712,12 +695,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -747,10 +730,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -773,7 +755,7 @@ export const de_PrepareQueryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -806,10 +788,9 @@ const de_PrepareQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -829,7 +810,7 @@ export const de_QueryCommand = async (output: __HttpResponse, context: __SerdeCo $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -865,10 +846,9 @@ const de_QueryCommandError = async (output: __HttpResponse, context: __SerdeCont throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -886,12 +866,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -924,10 +904,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -945,12 +924,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -980,10 +959,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1003,7 +981,7 @@ export const de_UpdateScheduledQueryCommand = async ( const response: UpdateScheduledQueryCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1039,10 +1017,9 @@ const de_UpdateScheduledQueryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1056,7 +1033,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1069,7 +1046,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1085,7 +1062,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1101,7 +1078,7 @@ const de_InvalidEndpointExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEndpointException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEndpointException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1117,7 +1094,7 @@ const de_QueryExecutionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_QueryExecutionException(body, context); + const deserialized: any = _json(body); const exception = new QueryExecutionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1133,7 +1110,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1149,7 +1126,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1162,7 +1139,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1175,7 +1152,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1183,372 +1160,113 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0CancelQueryRequest - */ -const se_CancelQueryRequest = (input: CancelQueryRequest, context: __SerdeContext): any => { - return { - ...(input.QueryId != null && { QueryId: input.QueryId }), - }; -}; +// se_CancelQueryRequest omitted. /** * serializeAws_json1_0CreateScheduledQueryRequest */ const se_CreateScheduledQueryRequest = (input: CreateScheduledQueryRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.ErrorReportConfiguration != null && { - ErrorReportConfiguration: se_ErrorReportConfiguration(input.ErrorReportConfiguration, context), - }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotificationConfiguration != null && { - NotificationConfiguration: se_NotificationConfiguration(input.NotificationConfiguration, context), - }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.ScheduleConfiguration != null && { - ScheduleConfiguration: se_ScheduleConfiguration(input.ScheduleConfiguration, context), - }), - ...(input.ScheduledQueryExecutionRoleArn != null && { - ScheduledQueryExecutionRoleArn: input.ScheduledQueryExecutionRoleArn, - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TargetConfiguration != null && { - TargetConfiguration: se_TargetConfiguration(input.TargetConfiguration, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + ErrorReportConfiguration: _json, + KmsKeyId: [], + Name: [], + NotificationConfiguration: _json, + QueryString: [], + ScheduleConfiguration: _json, + ScheduledQueryExecutionRoleArn: [], + Tags: _json, + TargetConfiguration: _json, + }); }; -/** - * serializeAws_json1_0DeleteScheduledQueryRequest - */ -const se_DeleteScheduledQueryRequest = (input: DeleteScheduledQueryRequest, context: __SerdeContext): any => { - return { - ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }), - }; -}; +// se_DeleteScheduledQueryRequest omitted. -/** - * serializeAws_json1_0DescribeEndpointsRequest - */ -const se_DescribeEndpointsRequest = (input: DescribeEndpointsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeEndpointsRequest omitted. -/** - * serializeAws_json1_0DescribeScheduledQueryRequest - */ -const se_DescribeScheduledQueryRequest = (input: DescribeScheduledQueryRequest, context: __SerdeContext): any => { - return { - ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }), - }; -}; +// se_DescribeScheduledQueryRequest omitted. -/** - * serializeAws_json1_0DimensionMapping - */ -const se_DimensionMapping = (input: DimensionMapping, context: __SerdeContext): any => { - return { - ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DimensionMapping omitted. -/** - * serializeAws_json1_0DimensionMappingList - */ -const se_DimensionMappingList = (input: DimensionMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionMapping(entry, context); - }); -}; +// se_DimensionMappingList omitted. -/** - * serializeAws_json1_0ErrorReportConfiguration - */ -const se_ErrorReportConfiguration = (input: ErrorReportConfiguration, context: __SerdeContext): any => { - return { - ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }), - }; -}; +// se_ErrorReportConfiguration omitted. /** * serializeAws_json1_0ExecuteScheduledQueryRequest */ const se_ExecuteScheduledQueryRequest = (input: ExecuteScheduledQueryRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.InvocationTime != null && { InvocationTime: Math.round(input.InvocationTime.getTime() / 1000) }), - ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + InvocationTime: (_) => Math.round(_.getTime() / 1000), + ScheduledQueryArn: [], + }); }; -/** - * serializeAws_json1_0ListScheduledQueriesRequest - */ -const se_ListScheduledQueriesRequest = (input: ListScheduledQueriesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListScheduledQueriesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0MixedMeasureMapping - */ -const se_MixedMeasureMapping = (input: MixedMeasureMapping, context: __SerdeContext): any => { - return { - ...(input.MeasureName != null && { MeasureName: input.MeasureName }), - ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }), - ...(input.MultiMeasureAttributeMappings != null && { - MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context), - }), - ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }), - ...(input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }), - }; -}; +// se_MixedMeasureMapping omitted. -/** - * serializeAws_json1_0MixedMeasureMappingList - */ -const se_MixedMeasureMappingList = (input: MixedMeasureMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MixedMeasureMapping(entry, context); - }); -}; +// se_MixedMeasureMappingList omitted. -/** - * serializeAws_json1_0MultiMeasureAttributeMapping - */ -const se_MultiMeasureAttributeMapping = (input: MultiMeasureAttributeMapping, context: __SerdeContext): any => { - return { - ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }), - ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }), - ...(input.TargetMultiMeasureAttributeName != null && { - TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName, - }), - }; -}; +// se_MultiMeasureAttributeMapping omitted. -/** - * serializeAws_json1_0MultiMeasureAttributeMappingList - */ -const se_MultiMeasureAttributeMappingList = (input: MultiMeasureAttributeMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MultiMeasureAttributeMapping(entry, context); - }); -}; +// se_MultiMeasureAttributeMappingList omitted. -/** - * serializeAws_json1_0MultiMeasureMappings - */ -const se_MultiMeasureMappings = (input: MultiMeasureMappings, context: __SerdeContext): any => { - return { - ...(input.MultiMeasureAttributeMappings != null && { - MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context), - }), - ...(input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }), - }; -}; +// se_MultiMeasureMappings omitted. -/** - * serializeAws_json1_0NotificationConfiguration - */ -const se_NotificationConfiguration = (input: NotificationConfiguration, context: __SerdeContext): any => { - return { - ...(input.SnsConfiguration != null && { SnsConfiguration: se_SnsConfiguration(input.SnsConfiguration, context) }), - }; -}; +// se_NotificationConfiguration omitted. -/** - * serializeAws_json1_0PrepareQueryRequest - */ -const se_PrepareQueryRequest = (input: PrepareQueryRequest, context: __SerdeContext): any => { - return { - ...(input.QueryString != null && { QueryString: input.QueryString }), - ...(input.ValidateOnly != null && { ValidateOnly: input.ValidateOnly }), - }; -}; +// se_PrepareQueryRequest omitted. /** * serializeAws_json1_0QueryRequest */ const se_QueryRequest = (input: QueryRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.MaxRows != null && { MaxRows: input.MaxRows }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.QueryString != null && { QueryString: input.QueryString }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + MaxRows: [], + NextToken: [], + QueryString: [], + }); }; -/** - * serializeAws_json1_0S3Configuration - */ -const se_S3Configuration = (input: S3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }), - ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }), - }; -}; +// se_S3Configuration omitted. -/** - * serializeAws_json1_0ScheduleConfiguration - */ -const se_ScheduleConfiguration = (input: ScheduleConfiguration, context: __SerdeContext): any => { - return { - ...(input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }), - }; -}; +// se_ScheduleConfiguration omitted. -/** - * serializeAws_json1_0SnsConfiguration - */ -const se_SnsConfiguration = (input: SnsConfiguration, context: __SerdeContext): any => { - return { - ...(input.TopicArn != null && { TopicArn: input.TopicArn }), - }; -}; +// se_SnsConfiguration omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0TargetConfiguration - */ -const se_TargetConfiguration = (input: TargetConfiguration, context: __SerdeContext): any => { - return { - ...(input.TimestreamConfiguration != null && { - TimestreamConfiguration: se_TimestreamConfiguration(input.TimestreamConfiguration, context), - }), - }; -}; +// se_TargetConfiguration omitted. -/** - * serializeAws_json1_0TimestreamConfiguration - */ -const se_TimestreamConfiguration = (input: TimestreamConfiguration, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.DimensionMappings != null && { - DimensionMappings: se_DimensionMappingList(input.DimensionMappings, context), - }), - ...(input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn }), - ...(input.MixedMeasureMappings != null && { - MixedMeasureMappings: se_MixedMeasureMappingList(input.MixedMeasureMappings, context), - }), - ...(input.MultiMeasureMappings != null && { - MultiMeasureMappings: se_MultiMeasureMappings(input.MultiMeasureMappings, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.TimeColumn != null && { TimeColumn: input.TimeColumn }), - }; -}; +// se_TimestreamConfiguration omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateScheduledQueryRequest - */ -const se_UpdateScheduledQueryRequest = (input: UpdateScheduledQueryRequest, context: __SerdeContext): any => { - return { - ...(input.ScheduledQueryArn != null && { ScheduledQueryArn: input.ScheduledQueryArn }), - ...(input.State != null && { State: input.State }), - }; -}; +// se_UpdateScheduledQueryRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0CancelQueryResponse - */ -const de_CancelQueryResponse = (output: any, context: __SerdeContext): CancelQueryResponse => { - return { - CancellationMessage: __expectString(output.CancellationMessage), - } as any; -}; +// de_CancelQueryResponse omitted. /** * deserializeAws_json1_0ColumnInfo */ const de_ColumnInfo = (output: any, context: __SerdeContext): ColumnInfo => { - return { - Name: __expectString(output.Name), - Type: output.Type != null ? de_Type(output.Type, context) : undefined, - } as any; + return take(output, { + Name: __expectString, + Type: (_: any) => de_Type(_, context), + }) as any; }; /** @@ -1558,44 +1276,26 @@ const de_ColumnInfoList = (output: any, context: __SerdeContext): ColumnInfo[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ColumnInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateScheduledQueryResponse - */ -const de_CreateScheduledQueryResponse = (output: any, context: __SerdeContext): CreateScheduledQueryResponse => { - return { - Arn: __expectString(output.Arn), - } as any; -}; +// de_CreateScheduledQueryResponse omitted. /** * deserializeAws_json1_0Datum */ const de_Datum = (output: any, context: __SerdeContext): Datum => { - return { - ArrayValue: output.ArrayValue != null ? de_DatumList(output.ArrayValue, context) : undefined, - NullValue: __expectBoolean(output.NullValue), - RowValue: output.RowValue != null ? de_Row(output.RowValue, context) : undefined, - ScalarValue: __expectString(output.ScalarValue), - TimeSeriesValue: - output.TimeSeriesValue != null ? de_TimeSeriesDataPointList(output.TimeSeriesValue, context) : undefined, - } as any; + return take(output, { + ArrayValue: (_: any) => de_DatumList(_, context), + NullValue: __expectBoolean, + RowValue: (_: any) => de_Row(_, context), + ScalarValue: __expectString, + TimeSeriesValue: (_: any) => de_TimeSeriesDataPointList(_, context), + }) as any; }; /** @@ -1605,242 +1305,72 @@ const de_DatumList = (output: any, context: __SerdeContext): Datum[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Datum(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0DescribeEndpointsResponse - */ -const de_DescribeEndpointsResponse = (output: any, context: __SerdeContext): DescribeEndpointsResponse => { - return { - Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined, - } as any; -}; +// de_DescribeEndpointsResponse omitted. /** * deserializeAws_json1_0DescribeScheduledQueryResponse */ const de_DescribeScheduledQueryResponse = (output: any, context: __SerdeContext): DescribeScheduledQueryResponse => { - return { - ScheduledQuery: - output.ScheduledQuery != null ? de_ScheduledQueryDescription(output.ScheduledQuery, context) : undefined, - } as any; + return take(output, { + ScheduledQuery: (_: any) => de_ScheduledQueryDescription(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DimensionMapping - */ -const de_DimensionMapping = (output: any, context: __SerdeContext): DimensionMapping => { - return { - DimensionValueType: __expectString(output.DimensionValueType), - Name: __expectString(output.Name), - } as any; -}; +// de_DimensionMapping omitted. -/** - * deserializeAws_json1_0DimensionMappingList - */ -const de_DimensionMappingList = (output: any, context: __SerdeContext): DimensionMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionMapping(entry, context); - }); - return retVal; -}; +// de_DimensionMappingList omitted. -/** - * deserializeAws_json1_0Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Address: __expectString(output.Address), - CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes), - } as any; -}; +// de_Endpoint omitted. -/** - * deserializeAws_json1_0Endpoints - */ -const de_Endpoints = (output: any, context: __SerdeContext): Endpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Endpoint(entry, context); - }); - return retVal; -}; +// de_Endpoints omitted. -/** - * deserializeAws_json1_0ErrorReportConfiguration - */ -const de_ErrorReportConfiguration = (output: any, context: __SerdeContext): ErrorReportConfiguration => { - return { - S3Configuration: output.S3Configuration != null ? de_S3Configuration(output.S3Configuration, context) : undefined, - } as any; -}; +// de_ErrorReportConfiguration omitted. -/** - * deserializeAws_json1_0ErrorReportLocation - */ -const de_ErrorReportLocation = (output: any, context: __SerdeContext): ErrorReportLocation => { - return { - S3ReportLocation: - output.S3ReportLocation != null ? de_S3ReportLocation(output.S3ReportLocation, context) : undefined, - } as any; -}; +// de_ErrorReportLocation omitted. -/** - * deserializeAws_json1_0ExecutionStats - */ -const de_ExecutionStats = (output: any, context: __SerdeContext): ExecutionStats => { - return { - BytesMetered: __expectLong(output.BytesMetered), - DataWrites: __expectLong(output.DataWrites), - ExecutionTimeInMillis: __expectLong(output.ExecutionTimeInMillis), - QueryResultRows: __expectLong(output.QueryResultRows), - RecordsIngested: __expectLong(output.RecordsIngested), - } as any; -}; +// de_ExecutionStats omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0InvalidEndpointException - */ -const de_InvalidEndpointException = (output: any, context: __SerdeContext): InvalidEndpointException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidEndpointException omitted. /** * deserializeAws_json1_0ListScheduledQueriesResponse */ const de_ListScheduledQueriesResponse = (output: any, context: __SerdeContext): ListScheduledQueriesResponse => { - return { - NextToken: __expectString(output.NextToken), - ScheduledQueries: - output.ScheduledQueries != null ? de_ScheduledQueryList(output.ScheduledQueries, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ScheduledQueries: (_: any) => de_ScheduledQueryList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0MixedMeasureMapping - */ -const de_MixedMeasureMapping = (output: any, context: __SerdeContext): MixedMeasureMapping => { - return { - MeasureName: __expectString(output.MeasureName), - MeasureValueType: __expectString(output.MeasureValueType), - MultiMeasureAttributeMappings: - output.MultiMeasureAttributeMappings != null - ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context) - : undefined, - SourceColumn: __expectString(output.SourceColumn), - TargetMeasureName: __expectString(output.TargetMeasureName), - } as any; -}; +// de_MixedMeasureMapping omitted. -/** - * deserializeAws_json1_0MixedMeasureMappingList - */ -const de_MixedMeasureMappingList = (output: any, context: __SerdeContext): MixedMeasureMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MixedMeasureMapping(entry, context); - }); - return retVal; -}; +// de_MixedMeasureMappingList omitted. -/** - * deserializeAws_json1_0MultiMeasureAttributeMapping - */ -const de_MultiMeasureAttributeMapping = (output: any, context: __SerdeContext): MultiMeasureAttributeMapping => { - return { - MeasureValueType: __expectString(output.MeasureValueType), - SourceColumn: __expectString(output.SourceColumn), - TargetMultiMeasureAttributeName: __expectString(output.TargetMultiMeasureAttributeName), - } as any; -}; +// de_MultiMeasureAttributeMapping omitted. -/** - * deserializeAws_json1_0MultiMeasureAttributeMappingList - */ -const de_MultiMeasureAttributeMappingList = (output: any, context: __SerdeContext): MultiMeasureAttributeMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MultiMeasureAttributeMapping(entry, context); - }); - return retVal; -}; +// de_MultiMeasureAttributeMappingList omitted. -/** - * deserializeAws_json1_0MultiMeasureMappings - */ -const de_MultiMeasureMappings = (output: any, context: __SerdeContext): MultiMeasureMappings => { - return { - MultiMeasureAttributeMappings: - output.MultiMeasureAttributeMappings != null - ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context) - : undefined, - TargetMultiMeasureName: __expectString(output.TargetMultiMeasureName), - } as any; -}; +// de_MultiMeasureMappings omitted. -/** - * deserializeAws_json1_0NotificationConfiguration - */ -const de_NotificationConfiguration = (output: any, context: __SerdeContext): NotificationConfiguration => { - return { - SnsConfiguration: - output.SnsConfiguration != null ? de_SnsConfiguration(output.SnsConfiguration, context) : undefined, - } as any; -}; +// de_NotificationConfiguration omitted. /** * deserializeAws_json1_0ParameterMapping */ const de_ParameterMapping = (output: any, context: __SerdeContext): ParameterMapping => { - return { - Name: __expectString(output.Name), - Type: output.Type != null ? de_Type(output.Type, context) : undefined, - } as any; + return take(output, { + Name: __expectString, + Type: (_: any) => de_Type(_, context), + }) as any; }; /** @@ -1850,9 +1380,6 @@ const de_ParameterMappingList = (output: any, context: __SerdeContext): Paramete const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ParameterMapping(entry, context); }); return retVal; @@ -1862,63 +1389,48 @@ const de_ParameterMappingList = (output: any, context: __SerdeContext): Paramete * deserializeAws_json1_0PrepareQueryResponse */ const de_PrepareQueryResponse = (output: any, context: __SerdeContext): PrepareQueryResponse => { - return { - Columns: output.Columns != null ? de_SelectColumnList(output.Columns, context) : undefined, - Parameters: output.Parameters != null ? de_ParameterMappingList(output.Parameters, context) : undefined, - QueryString: __expectString(output.QueryString), - } as any; + return take(output, { + Columns: (_: any) => de_SelectColumnList(_, context), + Parameters: (_: any) => de_ParameterMappingList(_, context), + QueryString: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0QueryExecutionException - */ -const de_QueryExecutionException = (output: any, context: __SerdeContext): QueryExecutionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_QueryExecutionException omitted. /** * deserializeAws_json1_0QueryResponse */ const de_QueryResponse = (output: any, context: __SerdeContext): QueryResponse => { - return { - ColumnInfo: output.ColumnInfo != null ? de_ColumnInfoList(output.ColumnInfo, context) : undefined, - NextToken: __expectString(output.NextToken), - QueryId: __expectString(output.QueryId), - QueryStatus: output.QueryStatus != null ? de_QueryStatus(output.QueryStatus, context) : undefined, - Rows: output.Rows != null ? de_RowList(output.Rows, context) : undefined, - } as any; + return take(output, { + ColumnInfo: (_: any) => de_ColumnInfoList(_, context), + NextToken: __expectString, + QueryId: __expectString, + QueryStatus: (_: any) => de_QueryStatus(_, context), + Rows: (_: any) => de_RowList(_, context), + }) as any; }; /** * deserializeAws_json1_0QueryStatus */ const de_QueryStatus = (output: any, context: __SerdeContext): QueryStatus => { - return { - CumulativeBytesMetered: __expectLong(output.CumulativeBytesMetered), - CumulativeBytesScanned: __expectLong(output.CumulativeBytesScanned), - ProgressPercentage: __limitedParseDouble(output.ProgressPercentage), - } as any; + return take(output, { + CumulativeBytesMetered: __expectLong, + CumulativeBytesScanned: __expectLong, + ProgressPercentage: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ScheduledQueryArn: __expectString(output.ScheduledQueryArn), - } as any; -}; +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_0Row */ const de_Row = (output: any, context: __SerdeContext): Row => { - return { - Data: output.Data != null ? de_DatumList(output.Data, context) : undefined, - } as any; + return take(output, { + Data: (_: any) => de_DatumList(_, context), + }) as any; }; /** @@ -1928,118 +1440,55 @@ const de_RowList = (output: any, context: __SerdeContext): Row[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Row(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0S3Configuration - */ -const de_S3Configuration = (output: any, context: __SerdeContext): S3Configuration => { - return { - BucketName: __expectString(output.BucketName), - EncryptionOption: __expectString(output.EncryptionOption), - ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix), - } as any; -}; +// de_S3Configuration omitted. -/** - * deserializeAws_json1_0S3ReportLocation - */ -const de_S3ReportLocation = (output: any, context: __SerdeContext): S3ReportLocation => { - return { - BucketName: __expectString(output.BucketName), - ObjectKey: __expectString(output.ObjectKey), - } as any; -}; +// de_S3ReportLocation omitted. -/** - * deserializeAws_json1_0ScheduleConfiguration - */ -const de_ScheduleConfiguration = (output: any, context: __SerdeContext): ScheduleConfiguration => { - return { - ScheduleExpression: __expectString(output.ScheduleExpression), - } as any; -}; +// de_ScheduleConfiguration omitted. /** * deserializeAws_json1_0ScheduledQuery */ const de_ScheduledQuery = (output: any, context: __SerdeContext): ScheduledQuery => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ErrorReportConfiguration: - output.ErrorReportConfiguration != null - ? de_ErrorReportConfiguration(output.ErrorReportConfiguration, context) - : undefined, - LastRunStatus: __expectString(output.LastRunStatus), - Name: __expectString(output.Name), - NextInvocationTime: - output.NextInvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextInvocationTime))) - : undefined, - PreviousInvocationTime: - output.PreviousInvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PreviousInvocationTime))) - : undefined, - State: __expectString(output.State), - TargetDestination: - output.TargetDestination != null ? de_TargetDestination(output.TargetDestination, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorReportConfiguration: _json, + LastRunStatus: __expectString, + Name: __expectString, + NextInvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PreviousInvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + TargetDestination: _json, + }) as any; }; /** * deserializeAws_json1_0ScheduledQueryDescription */ const de_ScheduledQueryDescription = (output: any, context: __SerdeContext): ScheduledQueryDescription => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - ErrorReportConfiguration: - output.ErrorReportConfiguration != null - ? de_ErrorReportConfiguration(output.ErrorReportConfiguration, context) - : undefined, - KmsKeyId: __expectString(output.KmsKeyId), - LastRunSummary: - output.LastRunSummary != null ? de_ScheduledQueryRunSummary(output.LastRunSummary, context) : undefined, - Name: __expectString(output.Name), - NextInvocationTime: - output.NextInvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextInvocationTime))) - : undefined, - NotificationConfiguration: - output.NotificationConfiguration != null - ? de_NotificationConfiguration(output.NotificationConfiguration, context) - : undefined, - PreviousInvocationTime: - output.PreviousInvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PreviousInvocationTime))) - : undefined, - QueryString: __expectString(output.QueryString), - RecentlyFailedRuns: - output.RecentlyFailedRuns != null - ? de_ScheduledQueryRunSummaryList(output.RecentlyFailedRuns, context) - : undefined, - ScheduleConfiguration: - output.ScheduleConfiguration != null - ? de_ScheduleConfiguration(output.ScheduleConfiguration, context) - : undefined, - ScheduledQueryExecutionRoleArn: __expectString(output.ScheduledQueryExecutionRoleArn), - State: __expectString(output.State), - TargetConfiguration: - output.TargetConfiguration != null ? de_TargetConfiguration(output.TargetConfiguration, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ErrorReportConfiguration: _json, + KmsKeyId: __expectString, + LastRunSummary: (_: any) => de_ScheduledQueryRunSummary(_, context), + Name: __expectString, + NextInvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotificationConfiguration: _json, + PreviousInvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + QueryString: __expectString, + RecentlyFailedRuns: (_: any) => de_ScheduledQueryRunSummaryList(_, context), + ScheduleConfiguration: _json, + ScheduledQueryExecutionRoleArn: __expectString, + State: __expectString, + TargetConfiguration: _json, + }) as any; }; /** @@ -2049,9 +1498,6 @@ const de_ScheduledQueryList = (output: any, context: __SerdeContext): ScheduledQ const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduledQuery(entry, context); }); return retVal; @@ -2061,21 +1507,14 @@ const de_ScheduledQueryList = (output: any, context: __SerdeContext): ScheduledQ * deserializeAws_json1_0ScheduledQueryRunSummary */ const de_ScheduledQueryRunSummary = (output: any, context: __SerdeContext): ScheduledQueryRunSummary => { - return { - ErrorReportLocation: - output.ErrorReportLocation != null ? de_ErrorReportLocation(output.ErrorReportLocation, context) : undefined, - ExecutionStats: output.ExecutionStats != null ? de_ExecutionStats(output.ExecutionStats, context) : undefined, - FailureReason: __expectString(output.FailureReason), - InvocationTime: - output.InvocationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InvocationTime))) - : undefined, - RunStatus: __expectString(output.RunStatus), - TriggerTime: - output.TriggerTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TriggerTime))) - : undefined, - } as any; + return take(output, { + ErrorReportLocation: _json, + ExecutionStats: _json, + FailureReason: __expectString, + InvocationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RunStatus: __expectString, + TriggerTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -2085,9 +1524,6 @@ const de_ScheduledQueryRunSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ScheduledQueryRunSummary(entry, context); }); return retVal; @@ -2097,13 +1533,13 @@ const de_ScheduledQueryRunSummaryList = (output: any, context: __SerdeContext): * deserializeAws_json1_0SelectColumn */ const de_SelectColumn = (output: any, context: __SerdeContext): SelectColumn => { - return { - Aliased: __expectBoolean(output.Aliased), - DatabaseName: __expectString(output.DatabaseName), - Name: __expectString(output.Name), - TableName: __expectString(output.TableName), - Type: output.Type != null ? de_Type(output.Type, context) : undefined, - } as any; + return take(output, { + Aliased: __expectBoolean, + DatabaseName: __expectString, + Name: __expectString, + TableName: __expectString, + Type: (_: any) => de_Type(_, context), + }) as any; }; /** @@ -2113,105 +1549,35 @@ const de_SelectColumnList = (output: any, context: __SerdeContext): SelectColumn const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SelectColumn(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. -/** - * deserializeAws_json1_0SnsConfiguration - */ -const de_SnsConfiguration = (output: any, context: __SerdeContext): SnsConfiguration => { - return { - TopicArn: __expectString(output.TopicArn), - } as any; -}; +// de_SnsConfiguration omitted. -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0TargetConfiguration - */ -const de_TargetConfiguration = (output: any, context: __SerdeContext): TargetConfiguration => { - return { - TimestreamConfiguration: - output.TimestreamConfiguration != null - ? de_TimestreamConfiguration(output.TimestreamConfiguration, context) - : undefined, - } as any; -}; +// de_TargetConfiguration omitted. -/** - * deserializeAws_json1_0TargetDestination - */ -const de_TargetDestination = (output: any, context: __SerdeContext): TargetDestination => { - return { - TimestreamDestination: - output.TimestreamDestination != null - ? de_TimestreamDestination(output.TimestreamDestination, context) - : undefined, - } as any; -}; +// de_TargetDestination omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. /** * deserializeAws_json1_0TimeSeriesDataPoint */ const de_TimeSeriesDataPoint = (output: any, context: __SerdeContext): TimeSeriesDataPoint => { - return { - Time: __expectString(output.Time), - Value: output.Value != null ? de_Datum(output.Value, context) : undefined, - } as any; + return take(output, { + Time: __expectString, + Value: (_: any) => de_Datum(_, context), + }) as any; }; /** @@ -2221,74 +1587,30 @@ const de_TimeSeriesDataPointList = (output: any, context: __SerdeContext): TimeS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimeSeriesDataPoint(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0TimestreamConfiguration - */ -const de_TimestreamConfiguration = (output: any, context: __SerdeContext): TimestreamConfiguration => { - return { - DatabaseName: __expectString(output.DatabaseName), - DimensionMappings: - output.DimensionMappings != null ? de_DimensionMappingList(output.DimensionMappings, context) : undefined, - MeasureNameColumn: __expectString(output.MeasureNameColumn), - MixedMeasureMappings: - output.MixedMeasureMappings != null - ? de_MixedMeasureMappingList(output.MixedMeasureMappings, context) - : undefined, - MultiMeasureMappings: - output.MultiMeasureMappings != null ? de_MultiMeasureMappings(output.MultiMeasureMappings, context) : undefined, - TableName: __expectString(output.TableName), - TimeColumn: __expectString(output.TimeColumn), - } as any; -}; +// de_TimestreamConfiguration omitted. -/** - * deserializeAws_json1_0TimestreamDestination - */ -const de_TimestreamDestination = (output: any, context: __SerdeContext): TimestreamDestination => { - return { - DatabaseName: __expectString(output.DatabaseName), - TableName: __expectString(output.TableName), - } as any; -}; +// de_TimestreamDestination omitted. /** * deserializeAws_json1_0Type */ const de_Type = (output: any, context: __SerdeContext): Type => { - return { - ArrayColumnInfo: output.ArrayColumnInfo != null ? de_ColumnInfo(output.ArrayColumnInfo, context) : undefined, - RowColumnInfo: output.RowColumnInfo != null ? de_ColumnInfoList(output.RowColumnInfo, context) : undefined, - ScalarType: __expectString(output.ScalarType), - TimeSeriesMeasureValueColumnInfo: - output.TimeSeriesMeasureValueColumnInfo != null - ? de_ColumnInfo(output.TimeSeriesMeasureValueColumnInfo, context) - : undefined, - } as any; + return take(output, { + ArrayColumnInfo: (_: any) => de_ColumnInfo(_, context), + RowColumnInfo: (_: any) => de_ColumnInfoList(_, context), + ScalarType: __expectString, + TimeSeriesMeasureValueColumnInfo: (_: any) => de_ColumnInfo(_, context), + }) as any; }; -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2310,6 +1632,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-timestream-write/src/protocols/Aws_json1_0.ts b/clients/client-timestream-write/src/protocols/Aws_json1_0.ts index 6c3156dbb991..36b7e7331074 100644 --- a/clients/client-timestream-write/src/protocols/Aws_json1_0.ts +++ b/clients/client-timestream-write/src/protocols/Aws_json1_0.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -53,12 +53,10 @@ import { WriteRecordsCommandInput, WriteRecordsCommandOutput } from "../commands import { _Record, AccessDeniedException, - BatchLoadProgressReport, BatchLoadTask, BatchLoadTaskDescription, ConflictException, CreateBatchLoadTaskRequest, - CreateBatchLoadTaskResponse, CreateDatabaseRequest, CreateDatabaseResponse, CreateTableRequest, @@ -77,12 +75,10 @@ import { DescribeDatabaseRequest, DescribeDatabaseResponse, DescribeEndpointsRequest, - DescribeEndpointsResponse, DescribeTableRequest, DescribeTableResponse, Dimension, DimensionMapping, - Endpoint, InternalServerException, InvalidEndpointException, ListBatchLoadTasksRequest, @@ -92,38 +88,31 @@ import { ListTablesRequest, ListTablesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, MagneticStoreRejectedDataLocation, MagneticStoreWriteProperties, MeasureValue, MixedMeasureMapping, MultiMeasureAttributeMapping, MultiMeasureMappings, - RecordsIngested, - RejectedRecord, RejectedRecordsException, ReportConfiguration, ReportS3Configuration, ResourceNotFoundException, ResumeBatchLoadTaskRequest, - ResumeBatchLoadTaskResponse, RetentionProperties, S3Configuration, ServiceQuotaExceededException, Table, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, UntagResourceRequest, - UntagResourceResponse, UpdateDatabaseRequest, UpdateDatabaseResponse, UpdateTableRequest, UpdateTableResponse, ValidationException, WriteRecordsRequest, - WriteRecordsResponse, } from "../models/models_0"; import { TimestreamWriteServiceException as __BaseException } from "../models/TimestreamWriteServiceException"; @@ -149,7 +138,7 @@ export const se_CreateDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateDatabase"); let body: any; - body = JSON.stringify(se_CreateDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -162,7 +151,7 @@ export const se_CreateTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTable"); let body: any; - body = JSON.stringify(se_CreateTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -175,7 +164,7 @@ export const se_DeleteDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDatabase"); let body: any; - body = JSON.stringify(se_DeleteDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -188,7 +177,7 @@ export const se_DeleteTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTable"); let body: any; - body = JSON.stringify(se_DeleteTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -201,7 +190,7 @@ export const se_DescribeBatchLoadTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeBatchLoadTask"); let body: any; - body = JSON.stringify(se_DescribeBatchLoadTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -214,7 +203,7 @@ export const se_DescribeDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDatabase"); let body: any; - body = JSON.stringify(se_DescribeDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -227,7 +216,7 @@ export const se_DescribeEndpointsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEndpoints"); let body: any; - body = JSON.stringify(se_DescribeEndpointsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -240,7 +229,7 @@ export const se_DescribeTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTable"); let body: any; - body = JSON.stringify(se_DescribeTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -253,7 +242,7 @@ export const se_ListBatchLoadTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListBatchLoadTasks"); let body: any; - body = JSON.stringify(se_ListBatchLoadTasksRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -266,7 +255,7 @@ export const se_ListDatabasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDatabases"); let body: any; - body = JSON.stringify(se_ListDatabasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -279,7 +268,7 @@ export const se_ListTablesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTables"); let body: any; - body = JSON.stringify(se_ListTablesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -292,7 +281,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -305,7 +294,7 @@ export const se_ResumeBatchLoadTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResumeBatchLoadTask"); let body: any; - body = JSON.stringify(se_ResumeBatchLoadTaskRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -318,7 +307,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -331,7 +320,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -344,7 +333,7 @@ export const se_UpdateDatabaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDatabase"); let body: any; - body = JSON.stringify(se_UpdateDatabaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -357,7 +346,7 @@ export const se_UpdateTableCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateTable"); let body: any; - body = JSON.stringify(se_UpdateTableRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,7 +359,7 @@ export const se_WriteRecordsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("WriteRecords"); let body: any; - body = JSON.stringify(se_WriteRecordsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,12 +375,12 @@ export const de_CreateBatchLoadTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateBatchLoadTaskResponse(data, context); + contents = _json(data); const response: CreateBatchLoadTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -433,10 +422,9 @@ const de_CreateBatchLoadTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -459,7 +447,7 @@ export const de_CreateDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -498,10 +486,9 @@ const de_CreateDatabaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -524,7 +511,7 @@ export const de_CreateTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -566,10 +553,9 @@ const de_CreateTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -589,7 +575,7 @@ export const de_DeleteDatabaseCommand = async ( const response: DeleteDatabaseCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -625,10 +611,9 @@ const de_DeleteDatabaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -648,7 +633,7 @@ export const de_DeleteTableCommand = async ( const response: DeleteTableCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -684,10 +669,9 @@ const de_DeleteTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -710,7 +694,7 @@ export const de_DescribeBatchLoadTaskCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -743,10 +727,9 @@ const de_DescribeBatchLoadTaskCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -769,7 +752,7 @@ export const de_DescribeDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -805,10 +788,9 @@ const de_DescribeDatabaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -826,12 +808,12 @@ export const de_DescribeEndpointsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEndpointsResponse(data, context); + contents = _json(data); const response: DescribeEndpointsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -858,10 +840,9 @@ const de_DescribeEndpointsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -884,7 +865,7 @@ export const de_DescribeTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -920,10 +901,9 @@ const de_DescribeTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -946,7 +926,7 @@ export const de_ListBatchLoadTasksCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -979,10 +959,9 @@ const de_ListBatchLoadTasksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1005,7 +984,7 @@ export const de_ListDatabasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1038,10 +1017,9 @@ const de_ListDatabasesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1064,7 +1042,7 @@ export const de_ListTablesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1100,10 +1078,9 @@ const de_ListTablesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1121,12 +1098,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1156,10 +1133,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1177,12 +1153,12 @@ export const de_ResumeBatchLoadTaskCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResumeBatchLoadTaskResponse(data, context); + contents = _json(data); const response: ResumeBatchLoadTaskCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1218,10 +1194,9 @@ const de_ResumeBatchLoadTaskCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1239,12 +1214,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1277,10 +1252,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1298,12 +1272,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1336,10 +1310,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1362,7 +1335,7 @@ export const de_UpdateDatabaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1401,10 +1374,9 @@ const de_UpdateDatabaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1427,7 +1399,7 @@ export const de_UpdateTableCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1463,10 +1435,9 @@ const de_UpdateTableCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1484,12 +1455,12 @@ export const de_WriteRecordsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_WriteRecordsResponse(data, context); + contents = _json(data); const response: WriteRecordsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1528,10 +1499,9 @@ const de_WriteRecordsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1545,7 +1515,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1558,7 +1528,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1574,7 +1544,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1590,7 +1560,7 @@ const de_InvalidEndpointExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidEndpointException(body, context); + const deserialized: any = _json(body); const exception = new InvalidEndpointException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1606,7 +1576,7 @@ const de_RejectedRecordsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_RejectedRecordsException(body, context); + const deserialized: any = _json(body); const exception = new RejectedRecordsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1622,7 +1592,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1638,7 +1608,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1651,7 +1621,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1664,7 +1634,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1676,636 +1646,147 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont * serializeAws_json1_0CreateBatchLoadTaskRequest */ const se_CreateBatchLoadTaskRequest = (input: CreateBatchLoadTaskRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataModelConfiguration != null && { - DataModelConfiguration: se_DataModelConfiguration(input.DataModelConfiguration, context), - }), - ...(input.DataSourceConfiguration != null && { - DataSourceConfiguration: se_DataSourceConfiguration(input.DataSourceConfiguration, context), - }), - ...(input.RecordVersion != null && { RecordVersion: input.RecordVersion }), - ...(input.ReportConfiguration != null && { - ReportConfiguration: se_ReportConfiguration(input.ReportConfiguration, context), - }), - ...(input.TargetDatabaseName != null && { TargetDatabaseName: input.TargetDatabaseName }), - ...(input.TargetTableName != null && { TargetTableName: input.TargetTableName }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataModelConfiguration: _json, + DataSourceConfiguration: _json, + RecordVersion: [], + ReportConfiguration: _json, + TargetDatabaseName: [], + TargetTableName: [], + }); }; -/** - * serializeAws_json1_0CreateDatabaseRequest - */ -const se_CreateDatabaseRequest = (input: CreateDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateDatabaseRequest omitted. -/** - * serializeAws_json1_0CreateTableRequest - */ -const se_CreateTableRequest = (input: CreateTableRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MagneticStoreWriteProperties != null && { - MagneticStoreWriteProperties: se_MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context), - }), - ...(input.RetentionProperties != null && { - RetentionProperties: se_RetentionProperties(input.RetentionProperties, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateTableRequest omitted. -/** - * serializeAws_json1_0CsvConfiguration - */ -const se_CsvConfiguration = (input: CsvConfiguration, context: __SerdeContext): any => { - return { - ...(input.ColumnSeparator != null && { ColumnSeparator: input.ColumnSeparator }), - ...(input.EscapeChar != null && { EscapeChar: input.EscapeChar }), - ...(input.NullValue != null && { NullValue: input.NullValue }), - ...(input.QuoteChar != null && { QuoteChar: input.QuoteChar }), - ...(input.TrimWhiteSpace != null && { TrimWhiteSpace: input.TrimWhiteSpace }), - }; -}; +// se_CsvConfiguration omitted. -/** - * serializeAws_json1_0DataModel - */ -const se_DataModel = (input: DataModel, context: __SerdeContext): any => { - return { - ...(input.DimensionMappings != null && { - DimensionMappings: se_DimensionMappings(input.DimensionMappings, context), - }), - ...(input.MeasureNameColumn != null && { MeasureNameColumn: input.MeasureNameColumn }), - ...(input.MixedMeasureMappings != null && { - MixedMeasureMappings: se_MixedMeasureMappingList(input.MixedMeasureMappings, context), - }), - ...(input.MultiMeasureMappings != null && { - MultiMeasureMappings: se_MultiMeasureMappings(input.MultiMeasureMappings, context), - }), - ...(input.TimeColumn != null && { TimeColumn: input.TimeColumn }), - ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }), - }; -}; +// se_DataModel omitted. -/** - * serializeAws_json1_0DataModelConfiguration - */ -const se_DataModelConfiguration = (input: DataModelConfiguration, context: __SerdeContext): any => { - return { - ...(input.DataModel != null && { DataModel: se_DataModel(input.DataModel, context) }), - ...(input.DataModelS3Configuration != null && { - DataModelS3Configuration: se_DataModelS3Configuration(input.DataModelS3Configuration, context), - }), - }; -}; +// se_DataModelConfiguration omitted. -/** - * serializeAws_json1_0DataModelS3Configuration - */ -const se_DataModelS3Configuration = (input: DataModelS3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.ObjectKey != null && { ObjectKey: input.ObjectKey }), - }; -}; +// se_DataModelS3Configuration omitted. -/** - * serializeAws_json1_0DataSourceConfiguration - */ -const se_DataSourceConfiguration = (input: DataSourceConfiguration, context: __SerdeContext): any => { - return { - ...(input.CsvConfiguration != null && { CsvConfiguration: se_CsvConfiguration(input.CsvConfiguration, context) }), - ...(input.DataFormat != null && { DataFormat: input.DataFormat }), - ...(input.DataSourceS3Configuration != null && { - DataSourceS3Configuration: se_DataSourceS3Configuration(input.DataSourceS3Configuration, context), - }), - }; -}; +// se_DataSourceConfiguration omitted. -/** - * serializeAws_json1_0DataSourceS3Configuration - */ -const se_DataSourceS3Configuration = (input: DataSourceS3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }), - }; -}; +// se_DataSourceS3Configuration omitted. -/** - * serializeAws_json1_0DeleteDatabaseRequest - */ -const se_DeleteDatabaseRequest = (input: DeleteDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - }; -}; +// se_DeleteDatabaseRequest omitted. -/** - * serializeAws_json1_0DeleteTableRequest - */ -const se_DeleteTableRequest = (input: DeleteTableRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DeleteTableRequest omitted. -/** - * serializeAws_json1_0DescribeBatchLoadTaskRequest - */ -const se_DescribeBatchLoadTaskRequest = (input: DescribeBatchLoadTaskRequest, context: __SerdeContext): any => { - return { - ...(input.TaskId != null && { TaskId: input.TaskId }), - }; -}; +// se_DescribeBatchLoadTaskRequest omitted. -/** - * serializeAws_json1_0DescribeDatabaseRequest - */ -const se_DescribeDatabaseRequest = (input: DescribeDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - }; -}; +// se_DescribeDatabaseRequest omitted. -/** - * serializeAws_json1_0DescribeEndpointsRequest - */ -const se_DescribeEndpointsRequest = (input: DescribeEndpointsRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeEndpointsRequest omitted. -/** - * serializeAws_json1_0DescribeTableRequest - */ -const se_DescribeTableRequest = (input: DescribeTableRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_DescribeTableRequest omitted. -/** - * serializeAws_json1_0Dimension - */ -const se_Dimension = (input: Dimension, context: __SerdeContext): any => { - return { - ...(input.DimensionValueType != null && { DimensionValueType: input.DimensionValueType }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Dimension omitted. -/** - * serializeAws_json1_0DimensionMapping - */ -const se_DimensionMapping = (input: DimensionMapping, context: __SerdeContext): any => { - return { - ...(input.DestinationColumn != null && { DestinationColumn: input.DestinationColumn }), - ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }), - }; -}; +// se_DimensionMapping omitted. -/** - * serializeAws_json1_0DimensionMappings - */ -const se_DimensionMappings = (input: DimensionMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DimensionMapping(entry, context); - }); -}; +// se_DimensionMappings omitted. -/** - * serializeAws_json1_0Dimensions - */ -const se_Dimensions = (input: Dimension[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Dimension(entry, context); - }); -}; +// se_Dimensions omitted. -/** - * serializeAws_json1_0ListBatchLoadTasksRequest - */ -const se_ListBatchLoadTasksRequest = (input: ListBatchLoadTasksRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TaskStatus != null && { TaskStatus: input.TaskStatus }), - }; -}; +// se_ListBatchLoadTasksRequest omitted. -/** - * serializeAws_json1_0ListDatabasesRequest - */ -const se_ListDatabasesRequest = (input: ListDatabasesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDatabasesRequest omitted. -/** - * serializeAws_json1_0ListTablesRequest - */ -const se_ListTablesRequest = (input: ListTablesRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTablesRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0MagneticStoreRejectedDataLocation - */ -const se_MagneticStoreRejectedDataLocation = ( - input: MagneticStoreRejectedDataLocation, - context: __SerdeContext -): any => { - return { - ...(input.S3Configuration != null && { S3Configuration: se_S3Configuration(input.S3Configuration, context) }), - }; -}; +// se_MagneticStoreRejectedDataLocation omitted. -/** - * serializeAws_json1_0MagneticStoreWriteProperties - */ -const se_MagneticStoreWriteProperties = (input: MagneticStoreWriteProperties, context: __SerdeContext): any => { - return { - ...(input.EnableMagneticStoreWrites != null && { EnableMagneticStoreWrites: input.EnableMagneticStoreWrites }), - ...(input.MagneticStoreRejectedDataLocation != null && { - MagneticStoreRejectedDataLocation: se_MagneticStoreRejectedDataLocation( - input.MagneticStoreRejectedDataLocation, - context - ), - }), - }; -}; +// se_MagneticStoreWriteProperties omitted. -/** - * serializeAws_json1_0MeasureValue - */ -const se_MeasureValue = (input: MeasureValue, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_MeasureValue omitted. -/** - * serializeAws_json1_0MeasureValues - */ -const se_MeasureValues = (input: MeasureValue[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MeasureValue(entry, context); - }); -}; +// se_MeasureValues omitted. -/** - * serializeAws_json1_0MixedMeasureMapping - */ -const se_MixedMeasureMapping = (input: MixedMeasureMapping, context: __SerdeContext): any => { - return { - ...(input.MeasureName != null && { MeasureName: input.MeasureName }), - ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }), - ...(input.MultiMeasureAttributeMappings != null && { - MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context), - }), - ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }), - ...(input.TargetMeasureName != null && { TargetMeasureName: input.TargetMeasureName }), - }; -}; +// se_MixedMeasureMapping omitted. -/** - * serializeAws_json1_0MixedMeasureMappingList - */ -const se_MixedMeasureMappingList = (input: MixedMeasureMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MixedMeasureMapping(entry, context); - }); -}; +// se_MixedMeasureMappingList omitted. -/** - * serializeAws_json1_0MultiMeasureAttributeMapping - */ -const se_MultiMeasureAttributeMapping = (input: MultiMeasureAttributeMapping, context: __SerdeContext): any => { - return { - ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }), - ...(input.SourceColumn != null && { SourceColumn: input.SourceColumn }), - ...(input.TargetMultiMeasureAttributeName != null && { - TargetMultiMeasureAttributeName: input.TargetMultiMeasureAttributeName, - }), - }; -}; +// se_MultiMeasureAttributeMapping omitted. -/** - * serializeAws_json1_0MultiMeasureAttributeMappingList - */ -const se_MultiMeasureAttributeMappingList = (input: MultiMeasureAttributeMapping[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MultiMeasureAttributeMapping(entry, context); - }); -}; +// se_MultiMeasureAttributeMappingList omitted. -/** - * serializeAws_json1_0MultiMeasureMappings - */ -const se_MultiMeasureMappings = (input: MultiMeasureMappings, context: __SerdeContext): any => { - return { - ...(input.MultiMeasureAttributeMappings != null && { - MultiMeasureAttributeMappings: se_MultiMeasureAttributeMappingList(input.MultiMeasureAttributeMappings, context), - }), - ...(input.TargetMultiMeasureName != null && { TargetMultiMeasureName: input.TargetMultiMeasureName }), - }; -}; +// se_MultiMeasureMappings omitted. -/** - * serializeAws_json1_0_Record - */ -const se__Record = (input: _Record, context: __SerdeContext): any => { - return { - ...(input.Dimensions != null && { Dimensions: se_Dimensions(input.Dimensions, context) }), - ...(input.MeasureName != null && { MeasureName: input.MeasureName }), - ...(input.MeasureValue != null && { MeasureValue: input.MeasureValue }), - ...(input.MeasureValueType != null && { MeasureValueType: input.MeasureValueType }), - ...(input.MeasureValues != null && { MeasureValues: se_MeasureValues(input.MeasureValues, context) }), - ...(input.Time != null && { Time: input.Time }), - ...(input.TimeUnit != null && { TimeUnit: input.TimeUnit }), - ...(input.Version != null && { Version: input.Version }), - }; -}; +// se__Record omitted. -/** - * serializeAws_json1_0Records - */ -const se_Records = (input: _Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se__Record(entry, context); - }); -}; +// se_Records omitted. -/** - * serializeAws_json1_0ReportConfiguration - */ -const se_ReportConfiguration = (input: ReportConfiguration, context: __SerdeContext): any => { - return { - ...(input.ReportS3Configuration != null && { - ReportS3Configuration: se_ReportS3Configuration(input.ReportS3Configuration, context), - }), - }; -}; +// se_ReportConfiguration omitted. -/** - * serializeAws_json1_0ReportS3Configuration - */ -const se_ReportS3Configuration = (input: ReportS3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }), - }; -}; +// se_ReportS3Configuration omitted. -/** - * serializeAws_json1_0ResumeBatchLoadTaskRequest - */ -const se_ResumeBatchLoadTaskRequest = (input: ResumeBatchLoadTaskRequest, context: __SerdeContext): any => { - return { - ...(input.TaskId != null && { TaskId: input.TaskId }), - }; -}; +// se_ResumeBatchLoadTaskRequest omitted. -/** - * serializeAws_json1_0RetentionProperties - */ -const se_RetentionProperties = (input: RetentionProperties, context: __SerdeContext): any => { - return { - ...(input.MagneticStoreRetentionPeriodInDays != null && { - MagneticStoreRetentionPeriodInDays: input.MagneticStoreRetentionPeriodInDays, - }), - ...(input.MemoryStoreRetentionPeriodInHours != null && { - MemoryStoreRetentionPeriodInHours: input.MemoryStoreRetentionPeriodInHours, - }), - }; -}; +// se_RetentionProperties omitted. -/** - * serializeAws_json1_0S3Configuration - */ -const se_S3Configuration = (input: S3Configuration, context: __SerdeContext): any => { - return { - ...(input.BucketName != null && { BucketName: input.BucketName }), - ...(input.EncryptionOption != null && { EncryptionOption: input.EncryptionOption }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.ObjectKeyPrefix != null && { ObjectKeyPrefix: input.ObjectKeyPrefix }), - }; -}; +// se_S3Configuration omitted. -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateDatabaseRequest - */ -const se_UpdateDatabaseRequest = (input: UpdateDatabaseRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; +// se_UpdateDatabaseRequest omitted. -/** - * serializeAws_json1_0UpdateTableRequest - */ -const se_UpdateTableRequest = (input: UpdateTableRequest, context: __SerdeContext): any => { - return { - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.MagneticStoreWriteProperties != null && { - MagneticStoreWriteProperties: se_MagneticStoreWriteProperties(input.MagneticStoreWriteProperties, context), - }), - ...(input.RetentionProperties != null && { - RetentionProperties: se_RetentionProperties(input.RetentionProperties, context), - }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_UpdateTableRequest omitted. -/** - * serializeAws_json1_0WriteRecordsRequest - */ -const se_WriteRecordsRequest = (input: WriteRecordsRequest, context: __SerdeContext): any => { - return { - ...(input.CommonAttributes != null && { CommonAttributes: se__Record(input.CommonAttributes, context) }), - ...(input.DatabaseName != null && { DatabaseName: input.DatabaseName }), - ...(input.Records != null && { Records: se_Records(input.Records, context) }), - ...(input.TableName != null && { TableName: input.TableName }), - }; -}; +// se_WriteRecordsRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_0BatchLoadProgressReport - */ -const de_BatchLoadProgressReport = (output: any, context: __SerdeContext): BatchLoadProgressReport => { - return { - BytesMetered: __expectLong(output.BytesMetered), - FileFailures: __expectLong(output.FileFailures), - ParseFailures: __expectLong(output.ParseFailures), - RecordIngestionFailures: __expectLong(output.RecordIngestionFailures), - RecordsIngested: __expectLong(output.RecordsIngested), - RecordsProcessed: __expectLong(output.RecordsProcessed), - } as any; -}; +// de_BatchLoadProgressReport omitted. /** * deserializeAws_json1_0BatchLoadTask */ const de_BatchLoadTask = (output: any, context: __SerdeContext): BatchLoadTask => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatabaseName: __expectString(output.DatabaseName), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - ResumableUntil: - output.ResumableUntil != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResumableUntil))) - : undefined, - TableName: __expectString(output.TableName), - TaskId: __expectString(output.TaskId), - TaskStatus: __expectString(output.TaskStatus), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatabaseName: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResumableUntil: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableName: __expectString, + TaskId: __expectString, + TaskStatus: __expectString, + }) as any; }; /** * deserializeAws_json1_0BatchLoadTaskDescription */ const de_BatchLoadTaskDescription = (output: any, context: __SerdeContext): BatchLoadTaskDescription => { - return { - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataModelConfiguration: - output.DataModelConfiguration != null - ? de_DataModelConfiguration(output.DataModelConfiguration, context) - : undefined, - DataSourceConfiguration: - output.DataSourceConfiguration != null - ? de_DataSourceConfiguration(output.DataSourceConfiguration, context) - : undefined, - ErrorMessage: __expectString(output.ErrorMessage), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - ProgressReport: - output.ProgressReport != null ? de_BatchLoadProgressReport(output.ProgressReport, context) : undefined, - RecordVersion: __expectLong(output.RecordVersion), - ReportConfiguration: - output.ReportConfiguration != null ? de_ReportConfiguration(output.ReportConfiguration, context) : undefined, - ResumableUntil: - output.ResumableUntil != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ResumableUntil))) - : undefined, - TargetDatabaseName: __expectString(output.TargetDatabaseName), - TargetTableName: __expectString(output.TargetTableName), - TaskId: __expectString(output.TaskId), - TaskStatus: __expectString(output.TaskStatus), - } as any; + return take(output, { + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataModelConfiguration: _json, + DataSourceConfiguration: _json, + ErrorMessage: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ProgressReport: _json, + RecordVersion: __expectLong, + ReportConfiguration: _json, + ResumableUntil: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TargetDatabaseName: __expectString, + TargetTableName: __expectString, + TaskId: __expectString, + TaskStatus: __expectString, + }) as any; }; /** @@ -2315,81 +1796,47 @@ const de_BatchLoadTaskList = (output: any, context: __SerdeContext): BatchLoadTa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_BatchLoadTask(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_0CreateBatchLoadTaskResponse - */ -const de_CreateBatchLoadTaskResponse = (output: any, context: __SerdeContext): CreateBatchLoadTaskResponse => { - return { - TaskId: __expectString(output.TaskId), - } as any; -}; +// de_CreateBatchLoadTaskResponse omitted. /** * deserializeAws_json1_0CreateDatabaseResponse */ const de_CreateDatabaseResponse = (output: any, context: __SerdeContext): CreateDatabaseResponse => { - return { - Database: output.Database != null ? de_Database(output.Database, context) : undefined, - } as any; + return take(output, { + Database: (_: any) => de_Database(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateTableResponse */ const de_CreateTableResponse = (output: any, context: __SerdeContext): CreateTableResponse => { - return { - Table: output.Table != null ? de_Table(output.Table, context) : undefined, - } as any; + return take(output, { + Table: (_: any) => de_Table(_, context), + }) as any; }; -/** - * deserializeAws_json1_0CsvConfiguration - */ -const de_CsvConfiguration = (output: any, context: __SerdeContext): CsvConfiguration => { - return { - ColumnSeparator: __expectString(output.ColumnSeparator), - EscapeChar: __expectString(output.EscapeChar), - NullValue: __expectString(output.NullValue), - QuoteChar: __expectString(output.QuoteChar), - TrimWhiteSpace: __expectBoolean(output.TrimWhiteSpace), - } as any; -}; +// de_CsvConfiguration omitted. /** * deserializeAws_json1_0Database */ const de_Database = (output: any, context: __SerdeContext): Database => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatabaseName: __expectString(output.DatabaseName), - KmsKeyId: __expectString(output.KmsKeyId), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - TableCount: __expectLong(output.TableCount), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatabaseName: __expectString, + KmsKeyId: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TableCount: __expectLong, + }) as any; }; /** @@ -2399,464 +1846,144 @@ const de_DatabaseList = (output: any, context: __SerdeContext): Database[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Database(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0DataModel - */ -const de_DataModel = (output: any, context: __SerdeContext): DataModel => { - return { - DimensionMappings: - output.DimensionMappings != null ? de_DimensionMappings(output.DimensionMappings, context) : undefined, - MeasureNameColumn: __expectString(output.MeasureNameColumn), - MixedMeasureMappings: - output.MixedMeasureMappings != null - ? de_MixedMeasureMappingList(output.MixedMeasureMappings, context) - : undefined, - MultiMeasureMappings: - output.MultiMeasureMappings != null ? de_MultiMeasureMappings(output.MultiMeasureMappings, context) : undefined, - TimeColumn: __expectString(output.TimeColumn), - TimeUnit: __expectString(output.TimeUnit), - } as any; -}; +// de_DataModel omitted. -/** - * deserializeAws_json1_0DataModelConfiguration - */ -const de_DataModelConfiguration = (output: any, context: __SerdeContext): DataModelConfiguration => { - return { - DataModel: output.DataModel != null ? de_DataModel(output.DataModel, context) : undefined, - DataModelS3Configuration: - output.DataModelS3Configuration != null - ? de_DataModelS3Configuration(output.DataModelS3Configuration, context) - : undefined, - } as any; -}; +// de_DataModelConfiguration omitted. -/** - * deserializeAws_json1_0DataModelS3Configuration - */ -const de_DataModelS3Configuration = (output: any, context: __SerdeContext): DataModelS3Configuration => { - return { - BucketName: __expectString(output.BucketName), - ObjectKey: __expectString(output.ObjectKey), - } as any; -}; +// de_DataModelS3Configuration omitted. -/** - * deserializeAws_json1_0DataSourceConfiguration - */ -const de_DataSourceConfiguration = (output: any, context: __SerdeContext): DataSourceConfiguration => { - return { - CsvConfiguration: - output.CsvConfiguration != null ? de_CsvConfiguration(output.CsvConfiguration, context) : undefined, - DataFormat: __expectString(output.DataFormat), - DataSourceS3Configuration: - output.DataSourceS3Configuration != null - ? de_DataSourceS3Configuration(output.DataSourceS3Configuration, context) - : undefined, - } as any; -}; +// de_DataSourceConfiguration omitted. -/** - * deserializeAws_json1_0DataSourceS3Configuration - */ -const de_DataSourceS3Configuration = (output: any, context: __SerdeContext): DataSourceS3Configuration => { - return { - BucketName: __expectString(output.BucketName), - ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix), - } as any; -}; +// de_DataSourceS3Configuration omitted. /** * deserializeAws_json1_0DescribeBatchLoadTaskResponse */ const de_DescribeBatchLoadTaskResponse = (output: any, context: __SerdeContext): DescribeBatchLoadTaskResponse => { - return { - BatchLoadTaskDescription: - output.BatchLoadTaskDescription != null - ? de_BatchLoadTaskDescription(output.BatchLoadTaskDescription, context) - : undefined, - } as any; + return take(output, { + BatchLoadTaskDescription: (_: any) => de_BatchLoadTaskDescription(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeDatabaseResponse */ const de_DescribeDatabaseResponse = (output: any, context: __SerdeContext): DescribeDatabaseResponse => { - return { - Database: output.Database != null ? de_Database(output.Database, context) : undefined, - } as any; + return take(output, { + Database: (_: any) => de_Database(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DescribeEndpointsResponse - */ -const de_DescribeEndpointsResponse = (output: any, context: __SerdeContext): DescribeEndpointsResponse => { - return { - Endpoints: output.Endpoints != null ? de_Endpoints(output.Endpoints, context) : undefined, - } as any; -}; +// de_DescribeEndpointsResponse omitted. /** * deserializeAws_json1_0DescribeTableResponse */ const de_DescribeTableResponse = (output: any, context: __SerdeContext): DescribeTableResponse => { - return { - Table: output.Table != null ? de_Table(output.Table, context) : undefined, - } as any; + return take(output, { + Table: (_: any) => de_Table(_, context), + }) as any; }; -/** - * deserializeAws_json1_0DimensionMapping - */ -const de_DimensionMapping = (output: any, context: __SerdeContext): DimensionMapping => { - return { - DestinationColumn: __expectString(output.DestinationColumn), - SourceColumn: __expectString(output.SourceColumn), - } as any; -}; +// de_DimensionMapping omitted. -/** - * deserializeAws_json1_0DimensionMappings - */ -const de_DimensionMappings = (output: any, context: __SerdeContext): DimensionMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DimensionMapping(entry, context); - }); - return retVal; -}; +// de_DimensionMappings omitted. -/** - * deserializeAws_json1_0Endpoint - */ -const de_Endpoint = (output: any, context: __SerdeContext): Endpoint => { - return { - Address: __expectString(output.Address), - CachePeriodInMinutes: __expectLong(output.CachePeriodInMinutes), - } as any; -}; +// de_Endpoint omitted. -/** - * deserializeAws_json1_0Endpoints - */ -const de_Endpoints = (output: any, context: __SerdeContext): Endpoint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Endpoint(entry, context); - }); - return retVal; -}; +// de_Endpoints omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0InvalidEndpointException - */ -const de_InvalidEndpointException = (output: any, context: __SerdeContext): InvalidEndpointException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidEndpointException omitted. /** * deserializeAws_json1_0ListBatchLoadTasksResponse */ const de_ListBatchLoadTasksResponse = (output: any, context: __SerdeContext): ListBatchLoadTasksResponse => { - return { - BatchLoadTasks: output.BatchLoadTasks != null ? de_BatchLoadTaskList(output.BatchLoadTasks, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + BatchLoadTasks: (_: any) => de_BatchLoadTaskList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListDatabasesResponse */ const de_ListDatabasesResponse = (output: any, context: __SerdeContext): ListDatabasesResponse => { - return { - Databases: output.Databases != null ? de_DatabaseList(output.Databases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Databases: (_: any) => de_DatabaseList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListTablesResponse */ const de_ListTablesResponse = (output: any, context: __SerdeContext): ListTablesResponse => { - return { - NextToken: __expectString(output.NextToken), - Tables: output.Tables != null ? de_TableList(output.Tables, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Tables: (_: any) => de_TableList(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_0MagneticStoreRejectedDataLocation - */ -const de_MagneticStoreRejectedDataLocation = ( - output: any, - context: __SerdeContext -): MagneticStoreRejectedDataLocation => { - return { - S3Configuration: output.S3Configuration != null ? de_S3Configuration(output.S3Configuration, context) : undefined, - } as any; -}; +// de_MagneticStoreRejectedDataLocation omitted. -/** - * deserializeAws_json1_0MagneticStoreWriteProperties - */ -const de_MagneticStoreWriteProperties = (output: any, context: __SerdeContext): MagneticStoreWriteProperties => { - return { - EnableMagneticStoreWrites: __expectBoolean(output.EnableMagneticStoreWrites), - MagneticStoreRejectedDataLocation: - output.MagneticStoreRejectedDataLocation != null - ? de_MagneticStoreRejectedDataLocation(output.MagneticStoreRejectedDataLocation, context) - : undefined, - } as any; -}; +// de_MagneticStoreWriteProperties omitted. -/** - * deserializeAws_json1_0MixedMeasureMapping - */ -const de_MixedMeasureMapping = (output: any, context: __SerdeContext): MixedMeasureMapping => { - return { - MeasureName: __expectString(output.MeasureName), - MeasureValueType: __expectString(output.MeasureValueType), - MultiMeasureAttributeMappings: - output.MultiMeasureAttributeMappings != null - ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context) - : undefined, - SourceColumn: __expectString(output.SourceColumn), - TargetMeasureName: __expectString(output.TargetMeasureName), - } as any; -}; +// de_MixedMeasureMapping omitted. -/** - * deserializeAws_json1_0MixedMeasureMappingList - */ -const de_MixedMeasureMappingList = (output: any, context: __SerdeContext): MixedMeasureMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MixedMeasureMapping(entry, context); - }); - return retVal; -}; +// de_MixedMeasureMappingList omitted. -/** - * deserializeAws_json1_0MultiMeasureAttributeMapping - */ -const de_MultiMeasureAttributeMapping = (output: any, context: __SerdeContext): MultiMeasureAttributeMapping => { - return { - MeasureValueType: __expectString(output.MeasureValueType), - SourceColumn: __expectString(output.SourceColumn), - TargetMultiMeasureAttributeName: __expectString(output.TargetMultiMeasureAttributeName), - } as any; -}; +// de_MultiMeasureAttributeMapping omitted. -/** - * deserializeAws_json1_0MultiMeasureAttributeMappingList - */ -const de_MultiMeasureAttributeMappingList = (output: any, context: __SerdeContext): MultiMeasureAttributeMapping[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MultiMeasureAttributeMapping(entry, context); - }); - return retVal; -}; +// de_MultiMeasureAttributeMappingList omitted. -/** - * deserializeAws_json1_0MultiMeasureMappings - */ -const de_MultiMeasureMappings = (output: any, context: __SerdeContext): MultiMeasureMappings => { - return { - MultiMeasureAttributeMappings: - output.MultiMeasureAttributeMappings != null - ? de_MultiMeasureAttributeMappingList(output.MultiMeasureAttributeMappings, context) - : undefined, - TargetMultiMeasureName: __expectString(output.TargetMultiMeasureName), - } as any; -}; +// de_MultiMeasureMappings omitted. -/** - * deserializeAws_json1_0RecordsIngested - */ -const de_RecordsIngested = (output: any, context: __SerdeContext): RecordsIngested => { - return { - MagneticStore: __expectInt32(output.MagneticStore), - MemoryStore: __expectInt32(output.MemoryStore), - Total: __expectInt32(output.Total), - } as any; -}; +// de_RecordsIngested omitted. -/** - * deserializeAws_json1_0RejectedRecord - */ -const de_RejectedRecord = (output: any, context: __SerdeContext): RejectedRecord => { - return { - ExistingVersion: __expectLong(output.ExistingVersion), - Reason: __expectString(output.Reason), - RecordIndex: __expectInt32(output.RecordIndex), - } as any; -}; +// de_RejectedRecord omitted. -/** - * deserializeAws_json1_0RejectedRecords - */ -const de_RejectedRecords = (output: any, context: __SerdeContext): RejectedRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RejectedRecord(entry, context); - }); - return retVal; -}; +// de_RejectedRecords omitted. -/** - * deserializeAws_json1_0RejectedRecordsException - */ -const de_RejectedRecordsException = (output: any, context: __SerdeContext): RejectedRecordsException => { - return { - Message: __expectString(output.Message), - RejectedRecords: output.RejectedRecords != null ? de_RejectedRecords(output.RejectedRecords, context) : undefined, - } as any; -}; +// de_RejectedRecordsException omitted. -/** - * deserializeAws_json1_0ReportConfiguration - */ -const de_ReportConfiguration = (output: any, context: __SerdeContext): ReportConfiguration => { - return { - ReportS3Configuration: - output.ReportS3Configuration != null - ? de_ReportS3Configuration(output.ReportS3Configuration, context) - : undefined, - } as any; -}; +// de_ReportConfiguration omitted. -/** - * deserializeAws_json1_0ReportS3Configuration - */ -const de_ReportS3Configuration = (output: any, context: __SerdeContext): ReportS3Configuration => { - return { - BucketName: __expectString(output.BucketName), - EncryptionOption: __expectString(output.EncryptionOption), - KmsKeyId: __expectString(output.KmsKeyId), - ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix), - } as any; -}; +// de_ReportS3Configuration omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0ResumeBatchLoadTaskResponse - */ -const de_ResumeBatchLoadTaskResponse = (output: any, context: __SerdeContext): ResumeBatchLoadTaskResponse => { - return {} as any; -}; +// de_ResumeBatchLoadTaskResponse omitted. -/** - * deserializeAws_json1_0RetentionProperties - */ -const de_RetentionProperties = (output: any, context: __SerdeContext): RetentionProperties => { - return { - MagneticStoreRetentionPeriodInDays: __expectLong(output.MagneticStoreRetentionPeriodInDays), - MemoryStoreRetentionPeriodInHours: __expectLong(output.MemoryStoreRetentionPeriodInHours), - } as any; -}; +// de_RetentionProperties omitted. -/** - * deserializeAws_json1_0S3Configuration - */ -const de_S3Configuration = (output: any, context: __SerdeContext): S3Configuration => { - return { - BucketName: __expectString(output.BucketName), - EncryptionOption: __expectString(output.EncryptionOption), - KmsKeyId: __expectString(output.KmsKeyId), - ObjectKeyPrefix: __expectString(output.ObjectKeyPrefix), - } as any; -}; +// de_S3Configuration omitted. -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. /** * deserializeAws_json1_0Table */ const de_Table = (output: any, context: __SerdeContext): Table => { - return { - Arn: __expectString(output.Arn), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DatabaseName: __expectString(output.DatabaseName), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - MagneticStoreWriteProperties: - output.MagneticStoreWriteProperties != null - ? de_MagneticStoreWriteProperties(output.MagneticStoreWriteProperties, context) - : undefined, - RetentionProperties: - output.RetentionProperties != null ? de_RetentionProperties(output.RetentionProperties, context) : undefined, - TableName: __expectString(output.TableName), - TableStatus: __expectString(output.TableStatus), - } as any; + return take(output, { + Arn: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DatabaseName: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + MagneticStoreWriteProperties: _json, + RetentionProperties: _json, + TableName: __expectString, + TableStatus: __expectString, + }) as any; }; /** @@ -2866,97 +1993,42 @@ const de_TableList = (output: any, context: __SerdeContext): Table[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Table(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_0UpdateDatabaseResponse */ const de_UpdateDatabaseResponse = (output: any, context: __SerdeContext): UpdateDatabaseResponse => { - return { - Database: output.Database != null ? de_Database(output.Database, context) : undefined, - } as any; + return take(output, { + Database: (_: any) => de_Database(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateTableResponse */ const de_UpdateTableResponse = (output: any, context: __SerdeContext): UpdateTableResponse => { - return { - Table: output.Table != null ? de_Table(output.Table, context) : undefined, - } as any; + return take(output, { + Table: (_: any) => de_Table(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_0WriteRecordsResponse - */ -const de_WriteRecordsResponse = (output: any, context: __SerdeContext): WriteRecordsResponse => { - return { - RecordsIngested: output.RecordsIngested != null ? de_RecordsIngested(output.RecordsIngested, context) : undefined, - } as any; -}; +// de_WriteRecordsResponse omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -2978,6 +2050,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-tnb/src/protocols/Aws_restJson1.ts b/clients/client-tnb/src/protocols/Aws_restJson1.ts index 8cf14ae32218..f91118981dff 100644 --- a/clients/client-tnb/src/protocols/Aws_restJson1.ts +++ b/clients/client-tnb/src/protocols/Aws_restJson1.ts @@ -1,15 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -146,20 +148,13 @@ import { } from "../commands/ValidateSolNetworkPackageContentCommand"; import { AccessDeniedException, - ErrorInfo, - FunctionArtifactMeta, GetSolFunctionInstanceMetadata, GetSolFunctionPackageMetadata, - GetSolInstantiatedVnfInfo, GetSolNetworkInstanceMetadata, GetSolNetworkOperationMetadata, GetSolNetworkOperationTaskDetails, GetSolNetworkPackageMetadata, - GetSolVnfcResourceInfo, - GetSolVnfcResourceInfoMetadata, - GetSolVnfInfo, InternalServerException, - LcmOperationInfo, ListSolFunctionInstanceInfo, ListSolFunctionInstanceMetadata, ListSolFunctionPackageInfo, @@ -170,17 +165,10 @@ import { ListSolNetworkOperationsMetadata, ListSolNetworkPackageInfo, ListSolNetworkPackageMetadata, - NetworkArtifactMeta, - ProblemDetails, - PutSolFunctionPackageContentMetadata, - PutSolNetworkPackageContentMetadata, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, - ToscaOverride, UpdateSolNetworkModify, - ValidateSolFunctionPackageContentMetadata, - ValidateSolNetworkPackageContentMetadata, ValidationException, } from "../models/models_0"; import { TnbServiceException as __BaseException } from "../models/TnbServiceException"; @@ -231,9 +219,11 @@ export const se_CreateSolFunctionPackageCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages"; let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -259,12 +249,14 @@ export const se_CreateSolNetworkInstanceCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nslcm/v1/ns_instances"; let body: any; - body = JSON.stringify({ - ...(input.nsDescription != null && { nsDescription: input.nsDescription }), - ...(input.nsName != null && { nsName: input.nsName }), - ...(input.nsdInfoId != null && { nsdInfoId: input.nsdInfoId }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + nsDescription: [], + nsName: [], + nsdInfoId: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -290,9 +282,11 @@ export const se_CreateSolNetworkPackageCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors"; let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -658,12 +652,12 @@ export const se_InstantiateSolNetworkInstanceCommand = async ( dry_run: [() => input.dryRun !== void 0, () => input.dryRun!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.additionalParamsForNs != null && { - additionalParamsForNs: se_Document(input.additionalParamsForNs, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + additionalParamsForNs: (_) => se_Document(_, context), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -913,9 +907,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -950,9 +946,11 @@ export const se_TerminateSolNetworkInstanceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1009,9 +1007,11 @@ export const se_UpdateSolFunctionPackageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/vnfpkgm/v1/vnf_packages/{vnfPkgId}"; resolvedPath = __resolvedPath(resolvedPath, input, "vnfPkgId", () => input.vnfPkgId!, "{vnfPkgId}", false); let body: any; - body = JSON.stringify({ - ...(input.operationalState != null && { operationalState: input.operationalState }), - }); + body = JSON.stringify( + take(input, { + operationalState: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1046,13 +1046,13 @@ export const se_UpdateSolNetworkInstanceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.modifyVnfInfoData != null && { - modifyVnfInfoData: se_UpdateSolNetworkModify(input.modifyVnfInfoData, context), - }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.updateType != null && { updateType: input.updateType }), - }); + body = JSON.stringify( + take(input, { + modifyVnfInfoData: (_) => se_UpdateSolNetworkModify(_, context), + tags: (_) => _json(_), + updateType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1079,9 +1079,11 @@ export const se_UpdateSolNetworkPackageCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sol/nsd/v1/ns_descriptors/{nsdInfoId}"; resolvedPath = __resolvedPath(resolvedPath, input, "nsdInfoId", () => input.nsdInfoId!, "{nsdInfoId}", false); let body: any; - body = JSON.stringify({ - ...(input.nsdOperationalState != null && { nsdOperationalState: input.nsdOperationalState }), - }); + body = JSON.stringify( + take(input, { + nsdOperationalState: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1200,10 +1202,9 @@ const de_CancelSolNetworkOperationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1223,24 +1224,15 @@ export const de_CreateSolFunctionPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.onboardingState != null) { - contents.onboardingState = __expectString(data.onboardingState); - } - if (data.operationalState != null) { - contents.operationalState = __expectString(data.operationalState); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.usageState != null) { - contents.usageState = __expectString(data.usageState); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + onboardingState: __expectString, + operationalState: __expectString, + tags: _json, + usageState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1274,10 +1266,9 @@ const de_CreateSolFunctionPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1297,21 +1288,14 @@ export const de_CreateSolNetworkInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.nsInstanceName != null) { - contents.nsInstanceName = __expectString(data.nsInstanceName); - } - if (data.nsdInfoId != null) { - contents.nsdInfoId = __expectString(data.nsdInfoId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + nsInstanceName: __expectString, + nsdInfoId: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1348,10 +1332,9 @@ const de_CreateSolNetworkInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1371,24 +1354,15 @@ export const de_CreateSolNetworkPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.nsdOnboardingState != null) { - contents.nsdOnboardingState = __expectString(data.nsdOnboardingState); - } - if (data.nsdOperationalState != null) { - contents.nsdOperationalState = __expectString(data.nsdOperationalState); - } - if (data.nsdUsageState != null) { - contents.nsdUsageState = __expectString(data.nsdUsageState); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + nsdOnboardingState: __expectString, + nsdOperationalState: __expectString, + nsdUsageState: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1422,10 +1396,9 @@ const de_CreateSolNetworkPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1478,10 +1451,9 @@ const de_DeleteSolFunctionPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1534,10 +1506,9 @@ const de_DeleteSolNetworkInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1590,10 +1561,9 @@ const de_DeleteSolNetworkPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1613,42 +1583,21 @@ export const de_GetSolFunctionInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.instantiatedVnfInfo != null) { - contents.instantiatedVnfInfo = de_GetSolVnfInfo(data.instantiatedVnfInfo, context); - } - if (data.instantiationState != null) { - contents.instantiationState = __expectString(data.instantiationState); - } - if (data.metadata != null) { - contents.metadata = de_GetSolFunctionInstanceMetadata(data.metadata, context); - } - if (data.nsInstanceId != null) { - contents.nsInstanceId = __expectString(data.nsInstanceId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.vnfPkgId != null) { - contents.vnfPkgId = __expectString(data.vnfPkgId); - } - if (data.vnfProductName != null) { - contents.vnfProductName = __expectString(data.vnfProductName); - } - if (data.vnfProvider != null) { - contents.vnfProvider = __expectString(data.vnfProvider); - } - if (data.vnfdId != null) { - contents.vnfdId = __expectString(data.vnfdId); - } - if (data.vnfdVersion != null) { - contents.vnfdVersion = __expectString(data.vnfdVersion); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + instantiatedVnfInfo: _json, + instantiationState: __expectString, + metadata: (_) => de_GetSolFunctionInstanceMetadata(_, context), + nsInstanceId: __expectString, + tags: _json, + vnfPkgId: __expectString, + vnfProductName: __expectString, + vnfProvider: __expectString, + vnfdId: __expectString, + vnfdVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1682,10 +1631,9 @@ const de_GetSolFunctionInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1705,39 +1653,20 @@ export const de_GetSolFunctionPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.metadata != null) { - contents.metadata = de_GetSolFunctionPackageMetadata(data.metadata, context); - } - if (data.onboardingState != null) { - contents.onboardingState = __expectString(data.onboardingState); - } - if (data.operationalState != null) { - contents.operationalState = __expectString(data.operationalState); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.usageState != null) { - contents.usageState = __expectString(data.usageState); - } - if (data.vnfProductName != null) { - contents.vnfProductName = __expectString(data.vnfProductName); - } - if (data.vnfProvider != null) { - contents.vnfProvider = __expectString(data.vnfProvider); - } - if (data.vnfdId != null) { - contents.vnfdId = __expectString(data.vnfdId); - } - if (data.vnfdVersion != null) { - contents.vnfdVersion = __expectString(data.vnfdVersion); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + metadata: (_) => de_GetSolFunctionPackageMetadata(_, context), + onboardingState: __expectString, + operationalState: __expectString, + tags: _json, + usageState: __expectString, + vnfProductName: __expectString, + vnfProvider: __expectString, + vnfdId: __expectString, + vnfdVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1771,10 +1700,9 @@ const de_GetSolFunctionPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1829,10 +1757,9 @@ const de_GetSolFunctionPackageContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1887,10 +1814,9 @@ const de_GetSolFunctionPackageDescriptorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1910,36 +1836,19 @@ export const de_GetSolNetworkInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lcmOpInfo != null) { - contents.lcmOpInfo = de_LcmOperationInfo(data.lcmOpInfo, context); - } - if (data.metadata != null) { - contents.metadata = de_GetSolNetworkInstanceMetadata(data.metadata, context); - } - if (data.nsInstanceDescription != null) { - contents.nsInstanceDescription = __expectString(data.nsInstanceDescription); - } - if (data.nsInstanceName != null) { - contents.nsInstanceName = __expectString(data.nsInstanceName); - } - if (data.nsState != null) { - contents.nsState = __expectString(data.nsState); - } - if (data.nsdId != null) { - contents.nsdId = __expectString(data.nsdId); - } - if (data.nsdInfoId != null) { - contents.nsdInfoId = __expectString(data.nsdInfoId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + lcmOpInfo: _json, + metadata: (_) => de_GetSolNetworkInstanceMetadata(_, context), + nsInstanceDescription: __expectString, + nsInstanceName: __expectString, + nsState: __expectString, + nsdId: __expectString, + nsdInfoId: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1973,10 +1882,9 @@ const de_GetSolNetworkInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1996,33 +1904,18 @@ export const de_GetSolNetworkOperationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.error != null) { - contents.error = de_ProblemDetails(data.error, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lcmOperationType != null) { - contents.lcmOperationType = __expectString(data.lcmOperationType); - } - if (data.metadata != null) { - contents.metadata = de_GetSolNetworkOperationMetadata(data.metadata, context); - } - if (data.nsInstanceId != null) { - contents.nsInstanceId = __expectString(data.nsInstanceId); - } - if (data.operationState != null) { - contents.operationState = __expectString(data.operationState); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.tasks != null) { - contents.tasks = de_GetSolNetworkOperationTasksList(data.tasks, context); - } + const doc = take(data, { + arn: __expectString, + error: _json, + id: __expectString, + lcmOperationType: __expectString, + metadata: (_) => de_GetSolNetworkOperationMetadata(_, context), + nsInstanceId: __expectString, + operationState: __expectString, + tags: _json, + tasks: (_) => de_GetSolNetworkOperationTasksList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2056,10 +1949,9 @@ const de_GetSolNetworkOperationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2079,39 +1971,20 @@ export const de_GetSolNetworkPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.metadata != null) { - contents.metadata = de_GetSolNetworkPackageMetadata(data.metadata, context); - } - if (data.nsdId != null) { - contents.nsdId = __expectString(data.nsdId); - } - if (data.nsdName != null) { - contents.nsdName = __expectString(data.nsdName); - } - if (data.nsdOnboardingState != null) { - contents.nsdOnboardingState = __expectString(data.nsdOnboardingState); - } - if (data.nsdOperationalState != null) { - contents.nsdOperationalState = __expectString(data.nsdOperationalState); - } - if (data.nsdUsageState != null) { - contents.nsdUsageState = __expectString(data.nsdUsageState); - } - if (data.nsdVersion != null) { - contents.nsdVersion = __expectString(data.nsdVersion); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } - if (data.vnfPkgIds != null) { - contents.vnfPkgIds = de_VnfPkgIdList(data.vnfPkgIds, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + metadata: (_) => de_GetSolNetworkPackageMetadata(_, context), + nsdId: __expectString, + nsdName: __expectString, + nsdOnboardingState: __expectString, + nsdOperationalState: __expectString, + nsdUsageState: __expectString, + nsdVersion: __expectString, + tags: _json, + vnfPkgIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2145,10 +2018,9 @@ const de_GetSolNetworkPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2203,10 +2075,9 @@ const de_GetSolNetworkPackageContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,10 +2132,9 @@ const de_GetSolNetworkPackageDescriptorCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2284,12 +2154,11 @@ export const de_InstantiateSolNetworkInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nsLcmOpOccId != null) { - contents.nsLcmOpOccId = __expectString(data.nsLcmOpOccId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + nsLcmOpOccId: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2326,10 +2195,9 @@ const de_InstantiateSolNetworkInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2349,12 +2217,11 @@ export const de_ListSolFunctionInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.functionInstances != null) { - contents.functionInstances = de_ListSolFunctionInstanceResources(data.functionInstances, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + functionInstances: (_) => de_ListSolFunctionInstanceResources(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2385,10 +2252,9 @@ const de_ListSolFunctionInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2408,12 +2274,11 @@ export const de_ListSolFunctionPackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.functionPackages != null) { - contents.functionPackages = de_ListSolFunctionPackageResources(data.functionPackages, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + functionPackages: (_) => de_ListSolFunctionPackageResources(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2444,10 +2309,9 @@ const de_ListSolFunctionPackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2467,12 +2331,11 @@ export const de_ListSolNetworkInstancesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkInstances != null) { - contents.networkInstances = de_ListSolNetworkInstanceResources(data.networkInstances, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networkInstances: (_) => de_ListSolNetworkInstanceResources(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2503,10 +2366,9 @@ const de_ListSolNetworkInstancesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2526,12 +2388,11 @@ export const de_ListSolNetworkOperationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkOperations != null) { - contents.networkOperations = de_ListSolNetworkOperationsResources(data.networkOperations, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networkOperations: (_) => de_ListSolNetworkOperationsResources(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2562,10 +2423,9 @@ const de_ListSolNetworkOperationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2585,12 +2445,11 @@ export const de_ListSolNetworkPackagesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkPackages != null) { - contents.networkPackages = de_ListSolNetworkPackageResources(data.networkPackages, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networkPackages: (_) => de_ListSolNetworkPackageResources(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2621,10 +2480,9 @@ const de_ListSolNetworkPackagesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2644,9 +2502,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2680,10 +2539,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2703,24 +2561,15 @@ export const de_PutSolFunctionPackageContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.metadata != null) { - contents.metadata = de_PutSolFunctionPackageContentMetadata(data.metadata, context); - } - if (data.vnfProductName != null) { - contents.vnfProductName = __expectString(data.vnfProductName); - } - if (data.vnfProvider != null) { - contents.vnfProvider = __expectString(data.vnfProvider); - } - if (data.vnfdId != null) { - contents.vnfdId = __expectString(data.vnfdId); - } - if (data.vnfdVersion != null) { - contents.vnfdVersion = __expectString(data.vnfdVersion); - } + const doc = take(data, { + id: __expectString, + metadata: _json, + vnfProductName: __expectString, + vnfProvider: __expectString, + vnfdId: __expectString, + vnfdVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2754,10 +2603,9 @@ const de_PutSolFunctionPackageContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2777,27 +2625,16 @@ export const de_PutSolNetworkPackageContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.metadata != null) { - contents.metadata = de_PutSolNetworkPackageContentMetadata(data.metadata, context); - } - if (data.nsdId != null) { - contents.nsdId = __expectString(data.nsdId); - } - if (data.nsdName != null) { - contents.nsdName = __expectString(data.nsdName); - } - if (data.nsdVersion != null) { - contents.nsdVersion = __expectString(data.nsdVersion); - } - if (data.vnfPkgIds != null) { - contents.vnfPkgIds = de_VnfPkgIdList(data.vnfPkgIds, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + metadata: _json, + nsdId: __expectString, + nsdName: __expectString, + nsdVersion: __expectString, + vnfPkgIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2831,10 +2668,9 @@ const de_PutSolNetworkPackageContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2887,10 +2723,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2910,12 +2745,11 @@ export const de_TerminateSolNetworkInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nsLcmOpOccId != null) { - contents.nsLcmOpOccId = __expectString(data.nsLcmOpOccId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + nsLcmOpOccId: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2952,10 +2786,9 @@ const de_TerminateSolNetworkInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3008,10 +2841,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3031,9 +2863,10 @@ export const de_UpdateSolFunctionPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.operationalState != null) { - contents.operationalState = __expectString(data.operationalState); - } + const doc = take(data, { + operationalState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3067,10 +2900,9 @@ const de_UpdateSolFunctionPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3090,12 +2922,11 @@ export const de_UpdateSolNetworkInstanceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nsLcmOpOccId != null) { - contents.nsLcmOpOccId = __expectString(data.nsLcmOpOccId); - } - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + nsLcmOpOccId: __expectString, + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3132,10 +2963,9 @@ const de_UpdateSolNetworkInstanceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3155,9 +2985,10 @@ export const de_UpdateSolNetworkPackageCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nsdOperationalState != null) { - contents.nsdOperationalState = __expectString(data.nsdOperationalState); - } + const doc = take(data, { + nsdOperationalState: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3191,10 +3022,9 @@ const de_UpdateSolNetworkPackageCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3214,24 +3044,15 @@ export const de_ValidateSolFunctionPackageContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.metadata != null) { - contents.metadata = de_ValidateSolFunctionPackageContentMetadata(data.metadata, context); - } - if (data.vnfProductName != null) { - contents.vnfProductName = __expectString(data.vnfProductName); - } - if (data.vnfProvider != null) { - contents.vnfProvider = __expectString(data.vnfProvider); - } - if (data.vnfdId != null) { - contents.vnfdId = __expectString(data.vnfdId); - } - if (data.vnfdVersion != null) { - contents.vnfdVersion = __expectString(data.vnfdVersion); - } + const doc = take(data, { + id: __expectString, + metadata: _json, + vnfProductName: __expectString, + vnfProvider: __expectString, + vnfdId: __expectString, + vnfdVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3265,10 +3086,9 @@ const de_ValidateSolFunctionPackageContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3288,27 +3108,16 @@ export const de_ValidateSolNetworkPackageContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.metadata != null) { - contents.metadata = de_ValidateSolNetworkPackageContentMetadata(data.metadata, context); - } - if (data.nsdId != null) { - contents.nsdId = __expectString(data.nsdId); - } - if (data.nsdName != null) { - contents.nsdName = __expectString(data.nsdName); - } - if (data.nsdVersion != null) { - contents.nsdVersion = __expectString(data.nsdVersion); - } - if (data.vnfPkgIds != null) { - contents.vnfPkgIds = de_VnfPkgIdList(data.vnfPkgIds, context); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + metadata: _json, + nsdId: __expectString, + nsdName: __expectString, + nsdVersion: __expectString, + vnfPkgIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3342,16 +3151,15 @@ const de_ValidateSolNetworkPackageContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -3361,9 +3169,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3380,9 +3189,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3399,9 +3209,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3418,9 +3229,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3434,9 +3246,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3450,9 +3263,10 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3460,29 +3274,16 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. /** * serializeAws_restJson1UpdateSolNetworkModify */ const se_UpdateSolNetworkModify = (input: UpdateSolNetworkModify, context: __SerdeContext): any => { - return { - ...(input.vnfConfigurableProperties != null && { - vnfConfigurableProperties: se_Document(input.vnfConfigurableProperties, context), - }), - ...(input.vnfInstanceId != null && { vnfInstanceId: input.vnfInstanceId }), - }; + return take(input, { + vnfConfigurableProperties: (_) => se_Document(_, context), + vnfInstanceId: [], + }); }; /** @@ -3492,81 +3293,51 @@ const se_Document = (input: __DocumentType, context: __SerdeContext): any => { return input; }; -/** - * deserializeAws_restJson1ErrorInfo - */ -const de_ErrorInfo = (output: any, context: __SerdeContext): ErrorInfo => { - return { - cause: __expectString(output.cause), - details: __expectString(output.details), - } as any; -}; +// de_ErrorInfo omitted. -/** - * deserializeAws_restJson1FunctionArtifactMeta - */ -const de_FunctionArtifactMeta = (output: any, context: __SerdeContext): FunctionArtifactMeta => { - return { - overrides: output.overrides != null ? de_OverrideList(output.overrides, context) : undefined, - } as any; -}; +// de_FunctionArtifactMeta omitted. /** * deserializeAws_restJson1GetSolFunctionInstanceMetadata */ const de_GetSolFunctionInstanceMetadata = (output: any, context: __SerdeContext): GetSolFunctionInstanceMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1GetSolFunctionPackageMetadata */ const de_GetSolFunctionPackageMetadata = (output: any, context: __SerdeContext): GetSolFunctionPackageMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - vnfd: output.vnfd != null ? de_FunctionArtifactMeta(output.vnfd, context) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + vnfd: _json, + }) as any; }; -/** - * deserializeAws_restJson1GetSolInstantiatedVnfInfo - */ -const de_GetSolInstantiatedVnfInfo = (output: any, context: __SerdeContext): GetSolInstantiatedVnfInfo => { - return { - vnfState: __expectString(output.vnfState), - } as any; -}; +// de_GetSolInstantiatedVnfInfo omitted. /** * deserializeAws_restJson1GetSolNetworkInstanceMetadata */ const de_GetSolNetworkInstanceMetadata = (output: any, context: __SerdeContext): GetSolNetworkInstanceMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** * deserializeAws_restJson1GetSolNetworkOperationMetadata */ const de_GetSolNetworkOperationMetadata = (output: any, context: __SerdeContext): GetSolNetworkOperationMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3576,18 +3347,14 @@ const de_GetSolNetworkOperationTaskDetails = ( output: any, context: __SerdeContext ): GetSolNetworkOperationTaskDetails => { - return { - taskContext: output.taskContext != null ? de_StringMap(output.taskContext, context) : undefined, - taskEndTime: - output.taskEndTime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.taskEndTime)) : undefined, - taskErrorDetails: output.taskErrorDetails != null ? de_ErrorInfo(output.taskErrorDetails, context) : undefined, - taskName: __expectString(output.taskName), - taskStartTime: - output.taskStartTime != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.taskStartTime)) - : undefined, - taskStatus: __expectString(output.taskStatus), - } as any; + return take(output, { + taskContext: _json, + taskEndTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + taskErrorDetails: _json, + taskName: __expectString, + taskStartTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + taskStatus: __expectString, + }) as any; }; /** @@ -3600,9 +3367,6 @@ const de_GetSolNetworkOperationTasksList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_GetSolNetworkOperationTaskDetails(entry, context); }); return retVal; @@ -3612,99 +3376,47 @@ const de_GetSolNetworkOperationTasksList = ( * deserializeAws_restJson1GetSolNetworkPackageMetadata */ const de_GetSolNetworkPackageMetadata = (output: any, context: __SerdeContext): GetSolNetworkPackageMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - nsd: output.nsd != null ? de_NetworkArtifactMeta(output.nsd, context) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + nsd: _json, + }) as any; }; -/** - * deserializeAws_restJson1GetSolVnfcResourceInfo - */ -const de_GetSolVnfcResourceInfo = (output: any, context: __SerdeContext): GetSolVnfcResourceInfo => { - return { - metadata: output.metadata != null ? de_GetSolVnfcResourceInfoMetadata(output.metadata, context) : undefined, - } as any; -}; +// de_GetSolVnfcResourceInfo omitted. -/** - * deserializeAws_restJson1GetSolVnfcResourceInfoList - */ -const de_GetSolVnfcResourceInfoList = (output: any, context: __SerdeContext): GetSolVnfcResourceInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GetSolVnfcResourceInfo(entry, context); - }); - return retVal; -}; +// de_GetSolVnfcResourceInfoList omitted. -/** - * deserializeAws_restJson1GetSolVnfcResourceInfoMetadata - */ -const de_GetSolVnfcResourceInfoMetadata = (output: any, context: __SerdeContext): GetSolVnfcResourceInfoMetadata => { - return { - cluster: __expectString(output.cluster), - helmChart: __expectString(output.helmChart), - nodeGroup: __expectString(output.nodeGroup), - } as any; -}; +// de_GetSolVnfcResourceInfoMetadata omitted. -/** - * deserializeAws_restJson1GetSolVnfInfo - */ -const de_GetSolVnfInfo = (output: any, context: __SerdeContext): GetSolVnfInfo => { - return { - vnfState: __expectString(output.vnfState), - vnfcResourceInfo: - output.vnfcResourceInfo != null ? de_GetSolVnfcResourceInfoList(output.vnfcResourceInfo, context) : undefined, - } as any; -}; +// de_GetSolVnfInfo omitted. -/** - * deserializeAws_restJson1LcmOperationInfo - */ -const de_LcmOperationInfo = (output: any, context: __SerdeContext): LcmOperationInfo => { - return { - nsLcmOpOccId: __expectString(output.nsLcmOpOccId), - } as any; -}; +// de_LcmOperationInfo omitted. /** * deserializeAws_restJson1ListSolFunctionInstanceInfo */ const de_ListSolFunctionInstanceInfo = (output: any, context: __SerdeContext): ListSolFunctionInstanceInfo => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - instantiatedVnfInfo: - output.instantiatedVnfInfo != null - ? de_GetSolInstantiatedVnfInfo(output.instantiatedVnfInfo, context) - : undefined, - instantiationState: __expectString(output.instantiationState), - metadata: output.metadata != null ? de_ListSolFunctionInstanceMetadata(output.metadata, context) : undefined, - nsInstanceId: __expectString(output.nsInstanceId), - vnfPkgId: __expectString(output.vnfPkgId), - vnfPkgName: __expectString(output.vnfPkgName), - } as any; + return take(output, { + arn: __expectString, + id: __expectString, + instantiatedVnfInfo: _json, + instantiationState: __expectString, + metadata: (_: any) => de_ListSolFunctionInstanceMetadata(_, context), + nsInstanceId: __expectString, + vnfPkgId: __expectString, + vnfPkgName: __expectString, + }) as any; }; /** * deserializeAws_restJson1ListSolFunctionInstanceMetadata */ const de_ListSolFunctionInstanceMetadata = (output: any, context: __SerdeContext): ListSolFunctionInstanceMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3714,9 +3426,6 @@ const de_ListSolFunctionInstanceResources = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSolFunctionInstanceInfo(entry, context); }); return retVal; @@ -3726,30 +3435,28 @@ const de_ListSolFunctionInstanceResources = (output: any, context: __SerdeContex * deserializeAws_restJson1ListSolFunctionPackageInfo */ const de_ListSolFunctionPackageInfo = (output: any, context: __SerdeContext): ListSolFunctionPackageInfo => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - metadata: output.metadata != null ? de_ListSolFunctionPackageMetadata(output.metadata, context) : undefined, - onboardingState: __expectString(output.onboardingState), - operationalState: __expectString(output.operationalState), - usageState: __expectString(output.usageState), - vnfProductName: __expectString(output.vnfProductName), - vnfProvider: __expectString(output.vnfProvider), - vnfdId: __expectString(output.vnfdId), - vnfdVersion: __expectString(output.vnfdVersion), - } as any; + return take(output, { + arn: __expectString, + id: __expectString, + metadata: (_: any) => de_ListSolFunctionPackageMetadata(_, context), + onboardingState: __expectString, + operationalState: __expectString, + usageState: __expectString, + vnfProductName: __expectString, + vnfProvider: __expectString, + vnfdId: __expectString, + vnfdVersion: __expectString, + }) as any; }; /** * deserializeAws_restJson1ListSolFunctionPackageMetadata */ const de_ListSolFunctionPackageMetadata = (output: any, context: __SerdeContext): ListSolFunctionPackageMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3759,9 +3466,6 @@ const de_ListSolFunctionPackageResources = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSolFunctionPackageInfo(entry, context); }); return retVal; @@ -3771,28 +3475,26 @@ const de_ListSolFunctionPackageResources = (output: any, context: __SerdeContext * deserializeAws_restJson1ListSolNetworkInstanceInfo */ const de_ListSolNetworkInstanceInfo = (output: any, context: __SerdeContext): ListSolNetworkInstanceInfo => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - metadata: output.metadata != null ? de_ListSolNetworkInstanceMetadata(output.metadata, context) : undefined, - nsInstanceDescription: __expectString(output.nsInstanceDescription), - nsInstanceName: __expectString(output.nsInstanceName), - nsState: __expectString(output.nsState), - nsdId: __expectString(output.nsdId), - nsdInfoId: __expectString(output.nsdInfoId), - } as any; + return take(output, { + arn: __expectString, + id: __expectString, + metadata: (_: any) => de_ListSolNetworkInstanceMetadata(_, context), + nsInstanceDescription: __expectString, + nsInstanceName: __expectString, + nsState: __expectString, + nsdId: __expectString, + nsdInfoId: __expectString, + }) as any; }; /** * deserializeAws_restJson1ListSolNetworkInstanceMetadata */ const de_ListSolNetworkInstanceMetadata = (output: any, context: __SerdeContext): ListSolNetworkInstanceMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3802,9 +3504,6 @@ const de_ListSolNetworkInstanceResources = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSolNetworkInstanceInfo(entry, context); }); return retVal; @@ -3814,15 +3513,15 @@ const de_ListSolNetworkInstanceResources = (output: any, context: __SerdeContext * deserializeAws_restJson1ListSolNetworkOperationsInfo */ const de_ListSolNetworkOperationsInfo = (output: any, context: __SerdeContext): ListSolNetworkOperationsInfo => { - return { - arn: __expectString(output.arn), - error: output.error != null ? de_ProblemDetails(output.error, context) : undefined, - id: __expectString(output.id), - lcmOperationType: __expectString(output.lcmOperationType), - metadata: output.metadata != null ? de_ListSolNetworkOperationsMetadata(output.metadata, context) : undefined, - nsInstanceId: __expectString(output.nsInstanceId), - operationState: __expectString(output.operationState), - } as any; + return take(output, { + arn: __expectString, + error: _json, + id: __expectString, + lcmOperationType: __expectString, + metadata: (_: any) => de_ListSolNetworkOperationsMetadata(_, context), + nsInstanceId: __expectString, + operationState: __expectString, + }) as any; }; /** @@ -3832,12 +3531,10 @@ const de_ListSolNetworkOperationsMetadata = ( output: any, context: __SerdeContext ): ListSolNetworkOperationsMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3847,9 +3544,6 @@ const de_ListSolNetworkOperationsResources = (output: any, context: __SerdeConte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSolNetworkOperationsInfo(entry, context); }); return retVal; @@ -3859,32 +3553,30 @@ const de_ListSolNetworkOperationsResources = (output: any, context: __SerdeConte * deserializeAws_restJson1ListSolNetworkPackageInfo */ const de_ListSolNetworkPackageInfo = (output: any, context: __SerdeContext): ListSolNetworkPackageInfo => { - return { - arn: __expectString(output.arn), - id: __expectString(output.id), - metadata: output.metadata != null ? de_ListSolNetworkPackageMetadata(output.metadata, context) : undefined, - nsdDesigner: __expectString(output.nsdDesigner), - nsdId: __expectString(output.nsdId), - nsdInvariantId: __expectString(output.nsdInvariantId), - nsdName: __expectString(output.nsdName), - nsdOnboardingState: __expectString(output.nsdOnboardingState), - nsdOperationalState: __expectString(output.nsdOperationalState), - nsdUsageState: __expectString(output.nsdUsageState), - nsdVersion: __expectString(output.nsdVersion), - vnfPkgIds: output.vnfPkgIds != null ? de_VnfPkgIdList(output.vnfPkgIds, context) : undefined, - } as any; + return take(output, { + arn: __expectString, + id: __expectString, + metadata: (_: any) => de_ListSolNetworkPackageMetadata(_, context), + nsdDesigner: __expectString, + nsdId: __expectString, + nsdInvariantId: __expectString, + nsdName: __expectString, + nsdOnboardingState: __expectString, + nsdOperationalState: __expectString, + nsdUsageState: __expectString, + nsdVersion: __expectString, + vnfPkgIds: _json, + }) as any; }; /** * deserializeAws_restJson1ListSolNetworkPackageMetadata */ const de_ListSolNetworkPackageMetadata = (output: any, context: __SerdeContext): ListSolNetworkPackageMetadata => { - return { - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - lastModified: - output.lastModified != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastModified)) : undefined, - } as any; + return take(output, { + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -3894,146 +3586,32 @@ const de_ListSolNetworkPackageResources = (output: any, context: __SerdeContext) const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListSolNetworkPackageInfo(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1NetworkArtifactMeta - */ -const de_NetworkArtifactMeta = (output: any, context: __SerdeContext): NetworkArtifactMeta => { - return { - overrides: output.overrides != null ? de_OverrideList(output.overrides, context) : undefined, - } as any; -}; +// de_NetworkArtifactMeta omitted. -/** - * deserializeAws_restJson1OverrideList - */ -const de_OverrideList = (output: any, context: __SerdeContext): ToscaOverride[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ToscaOverride(entry, context); - }); - return retVal; -}; +// de_OverrideList omitted. -/** - * deserializeAws_restJson1ProblemDetails - */ -const de_ProblemDetails = (output: any, context: __SerdeContext): ProblemDetails => { - return { - detail: __expectString(output.detail), - title: __expectString(output.title), - } as any; -}; +// de_ProblemDetails omitted. -/** - * deserializeAws_restJson1PutSolFunctionPackageContentMetadata - */ -const de_PutSolFunctionPackageContentMetadata = ( - output: any, - context: __SerdeContext -): PutSolFunctionPackageContentMetadata => { - return { - vnfd: output.vnfd != null ? de_FunctionArtifactMeta(output.vnfd, context) : undefined, - } as any; -}; +// de_PutSolFunctionPackageContentMetadata omitted. -/** - * deserializeAws_restJson1PutSolNetworkPackageContentMetadata - */ -const de_PutSolNetworkPackageContentMetadata = ( - output: any, - context: __SerdeContext -): PutSolNetworkPackageContentMetadata => { - return { - nsd: output.nsd != null ? de_NetworkArtifactMeta(output.nsd, context) : undefined, - } as any; -}; +// de_PutSolNetworkPackageContentMetadata omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1ToscaOverride - */ -const de_ToscaOverride = (output: any, context: __SerdeContext): ToscaOverride => { - return { - defaultValue: __expectString(output.defaultValue), - name: __expectString(output.name), - } as any; -}; +// de_ToscaOverride omitted. -/** - * deserializeAws_restJson1ValidateSolFunctionPackageContentMetadata - */ -const de_ValidateSolFunctionPackageContentMetadata = ( - output: any, - context: __SerdeContext -): ValidateSolFunctionPackageContentMetadata => { - return { - vnfd: output.vnfd != null ? de_FunctionArtifactMeta(output.vnfd, context) : undefined, - } as any; -}; +// de_ValidateSolFunctionPackageContentMetadata omitted. -/** - * deserializeAws_restJson1ValidateSolNetworkPackageContentMetadata - */ -const de_ValidateSolNetworkPackageContentMetadata = ( - output: any, - context: __SerdeContext -): ValidateSolNetworkPackageContentMetadata => { - return { - nsd: output.nsd != null ? de_NetworkArtifactMeta(output.nsd, context) : undefined, - } as any; -}; +// de_ValidateSolNetworkPackageContentMetadata omitted. -/** - * deserializeAws_restJson1VnfPkgIdList - */ -const de_VnfPkgIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_VnfPkgIdList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-transcribe-streaming/src/protocols/Aws_restJson1.ts b/clients/client-transcribe-streaming/src/protocols/Aws_restJson1.ts index 488f65d9df9e..0a5739cf044c 100644 --- a/clients/client-transcribe-streaming/src/protocols/Aws_restJson1.ts +++ b/clients/client-transcribe-streaming/src/protocols/Aws_restJson1.ts @@ -1,16 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseBoolean as __parseBoolean, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -43,12 +44,10 @@ import { CallAnalyticsTranscriptResultStream, CategoryEvent, ChannelDefinition, - CharacterOffsets, ConfigurationEvent, ConflictException, Entity, InternalFailureException, - IssueDetected, Item, LanguageWithScore, LimitExceededException, @@ -59,11 +58,9 @@ import { MedicalTranscript, MedicalTranscriptEvent, MedicalTranscriptResultStream, - PointsOfInterest, PostCallAnalyticsSettings, Result, ServiceUnavailableException, - TimestampRange, Transcript, TranscriptEvent, TranscriptResultStream, @@ -300,10 +297,9 @@ const de_StartCallAnalyticsStreamTranscriptionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -381,10 +377,9 @@ const de_StartMedicalStreamTranscriptionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -478,25 +473,25 @@ const de_StartStreamTranscriptionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1BadRequestExceptionRes */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -510,9 +505,10 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -529,9 +525,10 @@ const de_InternalFailureExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -548,9 +545,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -567,9 +565,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -608,7 +607,7 @@ const se_ConfigurationEvent_event = (input: ConfigurationEvent, context: __Serde ":content-type": { type: "string", value: "application/json" }, }; let body = new Uint8Array(); - body = se_ConfigurationEvent(input, context); + body = _json(input); body = context.utf8Decoder(JSON.stringify(body)); return { headers, body }; }; @@ -759,7 +758,7 @@ const de_BadRequestException_event = async (output: any, context: __SerdeContext const de_CategoryEvent_event = async (output: any, context: __SerdeContext): Promise => { const contents: CategoryEvent = {} as any; const data: any = await parseBody(output.body, context); - Object.assign(contents, de_CategoryEvent(data, context)); + Object.assign(contents, _json(data)); return contents; }; const de_ConflictException_event = async (output: any, context: __SerdeContext): Promise => { @@ -820,62 +819,23 @@ const de_UtteranceEvent_event = async (output: any, context: __SerdeContext): Pr Object.assign(contents, de_UtteranceEvent(data, context)); return contents; }; -/** - * serializeAws_restJson1ChannelDefinition - */ -const se_ChannelDefinition = (input: ChannelDefinition, context: __SerdeContext): any => { - return { - ...(input.ChannelId != null && { ChannelId: input.ChannelId }), - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - }; -}; +// se_ChannelDefinition omitted. -/** - * serializeAws_restJson1ChannelDefinitions - */ -const se_ChannelDefinitions = (input: ChannelDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ChannelDefinition(entry, context); - }); -}; +// se_ChannelDefinitions omitted. -/** - * serializeAws_restJson1ConfigurationEvent - */ -const se_ConfigurationEvent = (input: ConfigurationEvent, context: __SerdeContext): any => { - return { - ...(input.ChannelDefinitions != null && { - ChannelDefinitions: se_ChannelDefinitions(input.ChannelDefinitions, context), - }), - ...(input.PostCallAnalyticsSettings != null && { - PostCallAnalyticsSettings: se_PostCallAnalyticsSettings(input.PostCallAnalyticsSettings, context), - }), - }; -}; +// se_ConfigurationEvent omitted. -/** - * serializeAws_restJson1PostCallAnalyticsSettings - */ -const se_PostCallAnalyticsSettings = (input: PostCallAnalyticsSettings, context: __SerdeContext): any => { - return { - ...(input.ContentRedactionOutput != null && { ContentRedactionOutput: input.ContentRedactionOutput }), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }), - ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }), - }; -}; +// se_PostCallAnalyticsSettings omitted. /** * deserializeAws_restJson1Alternative */ const de_Alternative = (output: any, context: __SerdeContext): Alternative => { - return { - Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined, - Items: output.Items != null ? de_ItemList(output.Items, context) : undefined, - Transcript: __expectString(output.Transcript), - } as any; + return take(output, { + Entities: (_: any) => de_EntityList(_, context), + Items: (_: any) => de_ItemList(_, context), + Transcript: __expectString, + }) as any; }; /** @@ -885,9 +845,6 @@ const de_AlternativeList = (output: any, context: __SerdeContext): Alternative[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Alternative(entry, context); }); return retVal; @@ -897,14 +854,14 @@ const de_AlternativeList = (output: any, context: __SerdeContext): Alternative[] * deserializeAws_restJson1CallAnalyticsEntity */ const de_CallAnalyticsEntity = (output: any, context: __SerdeContext): CallAnalyticsEntity => { - return { - BeginOffsetMillis: __expectLong(output.BeginOffsetMillis), - Category: __expectString(output.Category), - Confidence: __limitedParseDouble(output.Confidence), - Content: __expectString(output.Content), - EndOffsetMillis: __expectLong(output.EndOffsetMillis), - Type: __expectString(output.Type), - } as any; + return take(output, { + BeginOffsetMillis: __expectLong, + Category: __expectString, + Confidence: __limitedParseDouble, + Content: __expectString, + EndOffsetMillis: __expectLong, + Type: __expectString, + }) as any; }; /** @@ -914,9 +871,6 @@ const de_CallAnalyticsEntityList = (output: any, context: __SerdeContext): CallA const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CallAnalyticsEntity(entry, context); }); return retVal; @@ -926,15 +880,15 @@ const de_CallAnalyticsEntityList = (output: any, context: __SerdeContext): CallA * deserializeAws_restJson1CallAnalyticsItem */ const de_CallAnalyticsItem = (output: any, context: __SerdeContext): CallAnalyticsItem => { - return { - BeginOffsetMillis: __expectLong(output.BeginOffsetMillis), - Confidence: __limitedParseDouble(output.Confidence), - Content: __expectString(output.Content), - EndOffsetMillis: __expectLong(output.EndOffsetMillis), - Stable: __expectBoolean(output.Stable), - Type: __expectString(output.Type), - VocabularyFilterMatch: __expectBoolean(output.VocabularyFilterMatch), - } as any; + return take(output, { + BeginOffsetMillis: __expectLong, + Confidence: __limitedParseDouble, + Content: __expectString, + EndOffsetMillis: __expectLong, + Stable: __expectBoolean, + Type: __expectString, + VocabularyFilterMatch: __expectBoolean, + }) as any; }; /** @@ -944,47 +898,27 @@ const de_CallAnalyticsItemList = (output: any, context: __SerdeContext): CallAna const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CallAnalyticsItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1CategoryEvent - */ -const de_CategoryEvent = (output: any, context: __SerdeContext): CategoryEvent => { - return { - MatchedCategories: output.MatchedCategories != null ? de_StringList(output.MatchedCategories, context) : undefined, - MatchedDetails: - output.MatchedDetails != null ? de_MatchedCategoryDetails(output.MatchedDetails, context) : undefined, - } as any; -}; +// de_CategoryEvent omitted. -/** - * deserializeAws_restJson1CharacterOffsets - */ -const de_CharacterOffsets = (output: any, context: __SerdeContext): CharacterOffsets => { - return { - Begin: __expectInt32(output.Begin), - End: __expectInt32(output.End), - } as any; -}; +// de_CharacterOffsets omitted. /** * deserializeAws_restJson1Entity */ const de_Entity = (output: any, context: __SerdeContext): Entity => { - return { - Category: __expectString(output.Category), - Confidence: __limitedParseDouble(output.Confidence), - Content: __expectString(output.Content), - EndTime: __limitedParseDouble(output.EndTime), - StartTime: __limitedParseDouble(output.StartTime), - Type: __expectString(output.Type), - } as any; + return take(output, { + Category: __expectString, + Confidence: __limitedParseDouble, + Content: __expectString, + EndTime: __limitedParseDouble, + StartTime: __limitedParseDouble, + Type: __expectString, + }) as any; }; /** @@ -994,53 +928,29 @@ const de_EntityList = (output: any, context: __SerdeContext): Entity[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Entity(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IssueDetected - */ -const de_IssueDetected = (output: any, context: __SerdeContext): IssueDetected => { - return { - CharacterOffsets: - output.CharacterOffsets != null ? de_CharacterOffsets(output.CharacterOffsets, context) : undefined, - } as any; -}; +// de_IssueDetected omitted. -/** - * deserializeAws_restJson1IssuesDetected - */ -const de_IssuesDetected = (output: any, context: __SerdeContext): IssueDetected[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IssueDetected(entry, context); - }); - return retVal; -}; +// de_IssuesDetected omitted. /** * deserializeAws_restJson1Item */ const de_Item = (output: any, context: __SerdeContext): Item => { - return { - Confidence: __limitedParseDouble(output.Confidence), - Content: __expectString(output.Content), - EndTime: __limitedParseDouble(output.EndTime), - Speaker: __expectString(output.Speaker), - Stable: __expectBoolean(output.Stable), - StartTime: __limitedParseDouble(output.StartTime), - Type: __expectString(output.Type), - VocabularyFilterMatch: __expectBoolean(output.VocabularyFilterMatch), - } as any; + return take(output, { + Confidence: __limitedParseDouble, + Content: __expectString, + EndTime: __limitedParseDouble, + Speaker: __expectString, + Stable: __expectBoolean, + StartTime: __limitedParseDouble, + Type: __expectString, + VocabularyFilterMatch: __expectBoolean, + }) as any; }; /** @@ -1050,9 +960,6 @@ const de_ItemList = (output: any, context: __SerdeContext): Item[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Item(entry, context); }); return retVal; @@ -1065,9 +972,6 @@ const de_LanguageIdentification = (output: any, context: __SerdeContext): Langua const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LanguageWithScore(entry, context); }); return retVal; @@ -1077,34 +981,23 @@ const de_LanguageIdentification = (output: any, context: __SerdeContext): Langua * deserializeAws_restJson1LanguageWithScore */ const de_LanguageWithScore = (output: any, context: __SerdeContext): LanguageWithScore => { - return { - LanguageCode: __expectString(output.LanguageCode), - Score: __limitedParseDouble(output.Score), - } as any; + return take(output, { + LanguageCode: __expectString, + Score: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1MatchedCategoryDetails - */ -const de_MatchedCategoryDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_PointsOfInterest(value, context); - return acc; - }, {}); -}; +// de_MatchedCategoryDetails omitted. /** * deserializeAws_restJson1MedicalAlternative */ const de_MedicalAlternative = (output: any, context: __SerdeContext): MedicalAlternative => { - return { - Entities: output.Entities != null ? de_MedicalEntityList(output.Entities, context) : undefined, - Items: output.Items != null ? de_MedicalItemList(output.Items, context) : undefined, - Transcript: __expectString(output.Transcript), - } as any; + return take(output, { + Entities: (_: any) => de_MedicalEntityList(_, context), + Items: (_: any) => de_MedicalItemList(_, context), + Transcript: __expectString, + }) as any; }; /** @@ -1114,9 +1007,6 @@ const de_MedicalAlternativeList = (output: any, context: __SerdeContext): Medica const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MedicalAlternative(entry, context); }); return retVal; @@ -1126,13 +1016,13 @@ const de_MedicalAlternativeList = (output: any, context: __SerdeContext): Medica * deserializeAws_restJson1MedicalEntity */ const de_MedicalEntity = (output: any, context: __SerdeContext): MedicalEntity => { - return { - Category: __expectString(output.Category), - Confidence: __limitedParseDouble(output.Confidence), - Content: __expectString(output.Content), - EndTime: __limitedParseDouble(output.EndTime), - StartTime: __limitedParseDouble(output.StartTime), - } as any; + return take(output, { + Category: __expectString, + Confidence: __limitedParseDouble, + Content: __expectString, + EndTime: __limitedParseDouble, + StartTime: __limitedParseDouble, + }) as any; }; /** @@ -1142,9 +1032,6 @@ const de_MedicalEntityList = (output: any, context: __SerdeContext): MedicalEnti const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MedicalEntity(entry, context); }); return retVal; @@ -1154,14 +1041,14 @@ const de_MedicalEntityList = (output: any, context: __SerdeContext): MedicalEnti * deserializeAws_restJson1MedicalItem */ const de_MedicalItem = (output: any, context: __SerdeContext): MedicalItem => { - return { - Confidence: __limitedParseDouble(output.Confidence), - Content: __expectString(output.Content), - EndTime: __limitedParseDouble(output.EndTime), - Speaker: __expectString(output.Speaker), - StartTime: __limitedParseDouble(output.StartTime), - Type: __expectString(output.Type), - } as any; + return take(output, { + Confidence: __limitedParseDouble, + Content: __expectString, + EndTime: __limitedParseDouble, + Speaker: __expectString, + StartTime: __limitedParseDouble, + Type: __expectString, + }) as any; }; /** @@ -1171,9 +1058,6 @@ const de_MedicalItemList = (output: any, context: __SerdeContext): MedicalItem[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MedicalItem(entry, context); }); return retVal; @@ -1183,14 +1067,14 @@ const de_MedicalItemList = (output: any, context: __SerdeContext): MedicalItem[] * deserializeAws_restJson1MedicalResult */ const de_MedicalResult = (output: any, context: __SerdeContext): MedicalResult => { - return { - Alternatives: output.Alternatives != null ? de_MedicalAlternativeList(output.Alternatives, context) : undefined, - ChannelId: __expectString(output.ChannelId), - EndTime: __limitedParseDouble(output.EndTime), - IsPartial: __expectBoolean(output.IsPartial), - ResultId: __expectString(output.ResultId), - StartTime: __limitedParseDouble(output.StartTime), - } as any; + return take(output, { + Alternatives: (_: any) => de_MedicalAlternativeList(_, context), + ChannelId: __expectString, + EndTime: __limitedParseDouble, + IsPartial: __expectBoolean, + ResultId: __expectString, + StartTime: __limitedParseDouble, + }) as any; }; /** @@ -1200,9 +1084,6 @@ const de_MedicalResultList = (output: any, context: __SerdeContext): MedicalResu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MedicalResult(entry, context); }); return retVal; @@ -1212,46 +1093,36 @@ const de_MedicalResultList = (output: any, context: __SerdeContext): MedicalResu * deserializeAws_restJson1MedicalTranscript */ const de_MedicalTranscript = (output: any, context: __SerdeContext): MedicalTranscript => { - return { - Results: output.Results != null ? de_MedicalResultList(output.Results, context) : undefined, - } as any; + return take(output, { + Results: (_: any) => de_MedicalResultList(_, context), + }) as any; }; /** * deserializeAws_restJson1MedicalTranscriptEvent */ const de_MedicalTranscriptEvent = (output: any, context: __SerdeContext): MedicalTranscriptEvent => { - return { - Transcript: output.Transcript != null ? de_MedicalTranscript(output.Transcript, context) : undefined, - } as any; + return take(output, { + Transcript: (_: any) => de_MedicalTranscript(_, context), + }) as any; }; -/** - * deserializeAws_restJson1PointsOfInterest - */ -const de_PointsOfInterest = (output: any, context: __SerdeContext): PointsOfInterest => { - return { - TimestampRanges: output.TimestampRanges != null ? de_TimestampRanges(output.TimestampRanges, context) : undefined, - } as any; -}; +// de_PointsOfInterest omitted. /** * deserializeAws_restJson1Result */ const de_Result = (output: any, context: __SerdeContext): Result => { - return { - Alternatives: output.Alternatives != null ? de_AlternativeList(output.Alternatives, context) : undefined, - ChannelId: __expectString(output.ChannelId), - EndTime: __limitedParseDouble(output.EndTime), - IsPartial: __expectBoolean(output.IsPartial), - LanguageCode: __expectString(output.LanguageCode), - LanguageIdentification: - output.LanguageIdentification != null - ? de_LanguageIdentification(output.LanguageIdentification, context) - : undefined, - ResultId: __expectString(output.ResultId), - StartTime: __limitedParseDouble(output.StartTime), - } as any; + return take(output, { + Alternatives: (_: any) => de_AlternativeList(_, context), + ChannelId: __expectString, + EndTime: __limitedParseDouble, + IsPartial: __expectBoolean, + LanguageCode: __expectString, + LanguageIdentification: (_: any) => de_LanguageIdentification(_, context), + ResultId: __expectString, + StartTime: __limitedParseDouble, + }) as any; }; /** @@ -1261,88 +1132,51 @@ const de_ResultList = (output: any, context: __SerdeContext): Result[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Result(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1TimestampRange - */ -const de_TimestampRange = (output: any, context: __SerdeContext): TimestampRange => { - return { - BeginOffsetMillis: __expectLong(output.BeginOffsetMillis), - EndOffsetMillis: __expectLong(output.EndOffsetMillis), - } as any; -}; +// de_TimestampRange omitted. -/** - * deserializeAws_restJson1TimestampRanges - */ -const de_TimestampRanges = (output: any, context: __SerdeContext): TimestampRange[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TimestampRange(entry, context); - }); - return retVal; -}; +// de_TimestampRanges omitted. /** * deserializeAws_restJson1Transcript */ const de_Transcript = (output: any, context: __SerdeContext): Transcript => { - return { - Results: output.Results != null ? de_ResultList(output.Results, context) : undefined, - } as any; + return take(output, { + Results: (_: any) => de_ResultList(_, context), + }) as any; }; /** * deserializeAws_restJson1TranscriptEvent */ const de_TranscriptEvent = (output: any, context: __SerdeContext): TranscriptEvent => { - return { - Transcript: output.Transcript != null ? de_Transcript(output.Transcript, context) : undefined, - } as any; + return take(output, { + Transcript: (_: any) => de_Transcript(_, context), + }) as any; }; /** * deserializeAws_restJson1UtteranceEvent */ const de_UtteranceEvent = (output: any, context: __SerdeContext): UtteranceEvent => { - return { - BeginOffsetMillis: __expectLong(output.BeginOffsetMillis), - EndOffsetMillis: __expectLong(output.EndOffsetMillis), - Entities: output.Entities != null ? de_CallAnalyticsEntityList(output.Entities, context) : undefined, - IsPartial: __expectBoolean(output.IsPartial), - IssuesDetected: output.IssuesDetected != null ? de_IssuesDetected(output.IssuesDetected, context) : undefined, - Items: output.Items != null ? de_CallAnalyticsItemList(output.Items, context) : undefined, - ParticipantRole: __expectString(output.ParticipantRole), - Sentiment: __expectString(output.Sentiment), - Transcript: __expectString(output.Transcript), - UtteranceId: __expectString(output.UtteranceId), - } as any; + return take(output, { + BeginOffsetMillis: __expectLong, + EndOffsetMillis: __expectLong, + Entities: (_: any) => de_CallAnalyticsEntityList(_, context), + IsPartial: __expectBoolean, + IssuesDetected: _json, + Items: (_: any) => de_CallAnalyticsItemList(_, context), + ParticipantRole: __expectString, + Sentiment: __expectString, + Transcript: __expectString, + UtteranceId: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-transcribe/src/protocols/Aws_json1_1.ts b/clients/client-transcribe/src/protocols/Aws_json1_1.ts index 5ad318ed0255..1d5ebb9615a7 100644 --- a/clients/client-transcribe/src/protocols/Aws_json1_1.ts +++ b/clients/client-transcribe/src/protocols/Aws_json1_1.ts @@ -1,17 +1,17 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, - expectUnion as __expectUnion, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -165,7 +165,6 @@ import { CreateCallAnalyticsCategoryRequest, CreateCallAnalyticsCategoryResponse, CreateLanguageModelRequest, - CreateLanguageModelResponse, CreateMedicalVocabularyRequest, CreateMedicalVocabularyResponse, CreateVocabularyFilterRequest, @@ -173,9 +172,7 @@ import { CreateVocabularyRequest, CreateVocabularyResponse, DeleteCallAnalyticsCategoryRequest, - DeleteCallAnalyticsCategoryResponse, DeleteCallAnalyticsJobRequest, - DeleteCallAnalyticsJobResponse, DeleteLanguageModelRequest, DeleteMedicalTranscriptionJobRequest, DeleteMedicalVocabularyRequest, @@ -218,7 +215,6 @@ import { ListMedicalVocabulariesRequest, ListMedicalVocabulariesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTranscriptionJobsRequest, ListTranscriptionJobsResponse, ListVocabulariesRequest, @@ -226,7 +222,6 @@ import { ListVocabularyFiltersRequest, ListVocabularyFiltersResponse, Media, - MedicalTranscript, MedicalTranscriptionJob, MedicalTranscriptionJobSummary, MedicalTranscriptionSetting, @@ -247,16 +242,12 @@ import { StartTranscriptionJobResponse, SubtitleFormat, Subtitles, - SubtitlesOutput, Tag, TagResourceRequest, - TagResourceResponse, - Transcript, TranscriptFilter, TranscriptionJob, TranscriptionJobSummary, UntagResourceRequest, - UntagResourceResponse, UpdateCallAnalyticsCategoryRequest, UpdateCallAnalyticsCategoryResponse, UpdateMedicalVocabularyRequest, @@ -279,7 +270,7 @@ export const se_CreateCallAnalyticsCategoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateCallAnalyticsCategory"); let body: any; - body = JSON.stringify(se_CreateCallAnalyticsCategoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -292,7 +283,7 @@ export const se_CreateLanguageModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateLanguageModel"); let body: any; - body = JSON.stringify(se_CreateLanguageModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -305,7 +296,7 @@ export const se_CreateMedicalVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateMedicalVocabulary"); let body: any; - body = JSON.stringify(se_CreateMedicalVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -318,7 +309,7 @@ export const se_CreateVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVocabulary"); let body: any; - body = JSON.stringify(se_CreateVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -331,7 +322,7 @@ export const se_CreateVocabularyFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateVocabularyFilter"); let body: any; - body = JSON.stringify(se_CreateVocabularyFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -344,7 +335,7 @@ export const se_DeleteCallAnalyticsCategoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCallAnalyticsCategory"); let body: any; - body = JSON.stringify(se_DeleteCallAnalyticsCategoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -357,7 +348,7 @@ export const se_DeleteCallAnalyticsJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCallAnalyticsJob"); let body: any; - body = JSON.stringify(se_DeleteCallAnalyticsJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -370,7 +361,7 @@ export const se_DeleteLanguageModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLanguageModel"); let body: any; - body = JSON.stringify(se_DeleteLanguageModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -383,7 +374,7 @@ export const se_DeleteMedicalTranscriptionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMedicalTranscriptionJob"); let body: any; - body = JSON.stringify(se_DeleteMedicalTranscriptionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -396,7 +387,7 @@ export const se_DeleteMedicalVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMedicalVocabulary"); let body: any; - body = JSON.stringify(se_DeleteMedicalVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -409,7 +400,7 @@ export const se_DeleteTranscriptionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTranscriptionJob"); let body: any; - body = JSON.stringify(se_DeleteTranscriptionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -422,7 +413,7 @@ export const se_DeleteVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVocabulary"); let body: any; - body = JSON.stringify(se_DeleteVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -435,7 +426,7 @@ export const se_DeleteVocabularyFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteVocabularyFilter"); let body: any; - body = JSON.stringify(se_DeleteVocabularyFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -448,7 +439,7 @@ export const se_DescribeLanguageModelCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeLanguageModel"); let body: any; - body = JSON.stringify(se_DescribeLanguageModelRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,7 +452,7 @@ export const se_GetCallAnalyticsCategoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCallAnalyticsCategory"); let body: any; - body = JSON.stringify(se_GetCallAnalyticsCategoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -474,7 +465,7 @@ export const se_GetCallAnalyticsJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetCallAnalyticsJob"); let body: any; - body = JSON.stringify(se_GetCallAnalyticsJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -487,7 +478,7 @@ export const se_GetMedicalTranscriptionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMedicalTranscriptionJob"); let body: any; - body = JSON.stringify(se_GetMedicalTranscriptionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -500,7 +491,7 @@ export const se_GetMedicalVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMedicalVocabulary"); let body: any; - body = JSON.stringify(se_GetMedicalVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -513,7 +504,7 @@ export const se_GetTranscriptionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTranscriptionJob"); let body: any; - body = JSON.stringify(se_GetTranscriptionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -526,7 +517,7 @@ export const se_GetVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVocabulary"); let body: any; - body = JSON.stringify(se_GetVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -539,7 +530,7 @@ export const se_GetVocabularyFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetVocabularyFilter"); let body: any; - body = JSON.stringify(se_GetVocabularyFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -552,7 +543,7 @@ export const se_ListCallAnalyticsCategoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCallAnalyticsCategories"); let body: any; - body = JSON.stringify(se_ListCallAnalyticsCategoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -565,7 +556,7 @@ export const se_ListCallAnalyticsJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCallAnalyticsJobs"); let body: any; - body = JSON.stringify(se_ListCallAnalyticsJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -578,7 +569,7 @@ export const se_ListLanguageModelsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLanguageModels"); let body: any; - body = JSON.stringify(se_ListLanguageModelsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -591,7 +582,7 @@ export const se_ListMedicalTranscriptionJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMedicalTranscriptionJobs"); let body: any; - body = JSON.stringify(se_ListMedicalTranscriptionJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -604,7 +595,7 @@ export const se_ListMedicalVocabulariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMedicalVocabularies"); let body: any; - body = JSON.stringify(se_ListMedicalVocabulariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -617,7 +608,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -630,7 +621,7 @@ export const se_ListTranscriptionJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTranscriptionJobs"); let body: any; - body = JSON.stringify(se_ListTranscriptionJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -643,7 +634,7 @@ export const se_ListVocabulariesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVocabularies"); let body: any; - body = JSON.stringify(se_ListVocabulariesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -656,7 +647,7 @@ export const se_ListVocabularyFiltersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListVocabularyFilters"); let body: any; - body = JSON.stringify(se_ListVocabularyFiltersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -669,7 +660,7 @@ export const se_StartCallAnalyticsJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartCallAnalyticsJob"); let body: any; - body = JSON.stringify(se_StartCallAnalyticsJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -682,7 +673,7 @@ export const se_StartMedicalTranscriptionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartMedicalTranscriptionJob"); let body: any; - body = JSON.stringify(se_StartMedicalTranscriptionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -695,7 +686,7 @@ export const se_StartTranscriptionJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartTranscriptionJob"); let body: any; - body = JSON.stringify(se_StartTranscriptionJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -708,7 +699,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -721,7 +712,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -734,7 +725,7 @@ export const se_UpdateCallAnalyticsCategoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateCallAnalyticsCategory"); let body: any; - body = JSON.stringify(se_UpdateCallAnalyticsCategoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -747,7 +738,7 @@ export const se_UpdateMedicalVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMedicalVocabulary"); let body: any; - body = JSON.stringify(se_UpdateMedicalVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -760,7 +751,7 @@ export const se_UpdateVocabularyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVocabulary"); let body: any; - body = JSON.stringify(se_UpdateVocabularyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -773,7 +764,7 @@ export const se_UpdateVocabularyFilterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateVocabularyFilter"); let body: any; - body = JSON.stringify(se_UpdateVocabularyFilterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -794,7 +785,7 @@ export const de_CreateCallAnalyticsCategoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -824,10 +815,9 @@ const de_CreateCallAnalyticsCategoryCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -845,12 +835,12 @@ export const de_CreateLanguageModelCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateLanguageModelResponse(data, context); + contents = _json(data); const response: CreateLanguageModelCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -880,10 +870,9 @@ const de_CreateLanguageModelCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -906,7 +895,7 @@ export const de_CreateMedicalVocabularyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -936,10 +925,9 @@ const de_CreateMedicalVocabularyCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -962,7 +950,7 @@ export const de_CreateVocabularyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -992,10 +980,9 @@ const de_CreateVocabularyCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1018,7 +1005,7 @@ export const de_CreateVocabularyFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1048,10 +1035,9 @@ const de_CreateVocabularyFilterCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1069,12 +1055,12 @@ export const de_DeleteCallAnalyticsCategoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCallAnalyticsCategoryResponse(data, context); + contents = _json(data); const response: DeleteCallAnalyticsCategoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1104,10 +1090,9 @@ const de_DeleteCallAnalyticsCategoryCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1125,12 +1110,12 @@ export const de_DeleteCallAnalyticsJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteCallAnalyticsJobResponse(data, context); + contents = _json(data); const response: DeleteCallAnalyticsJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1157,10 +1142,9 @@ const de_DeleteCallAnalyticsJobCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1180,7 +1164,7 @@ export const de_DeleteLanguageModelCommand = async ( const response: DeleteLanguageModelCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1207,10 +1191,9 @@ const de_DeleteLanguageModelCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1230,7 +1213,7 @@ export const de_DeleteMedicalTranscriptionJobCommand = async ( const response: DeleteMedicalTranscriptionJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1257,10 +1240,9 @@ const de_DeleteMedicalTranscriptionJobCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1280,7 +1262,7 @@ export const de_DeleteMedicalVocabularyCommand = async ( const response: DeleteMedicalVocabularyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1310,10 +1292,9 @@ const de_DeleteMedicalVocabularyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,7 +1314,7 @@ export const de_DeleteTranscriptionJobCommand = async ( const response: DeleteTranscriptionJobCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1360,10 +1341,9 @@ const de_DeleteTranscriptionJobCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1383,7 +1363,7 @@ export const de_DeleteVocabularyCommand = async ( const response: DeleteVocabularyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1413,10 +1393,9 @@ const de_DeleteVocabularyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1436,7 +1415,7 @@ export const de_DeleteVocabularyFilterCommand = async ( const response: DeleteVocabularyFilterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1466,10 +1445,9 @@ const de_DeleteVocabularyFilterCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1492,7 +1470,7 @@ export const de_DescribeLanguageModelCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1522,10 +1500,9 @@ const de_DescribeLanguageModelCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1548,7 +1525,7 @@ export const de_GetCallAnalyticsCategoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1578,10 +1555,9 @@ const de_GetCallAnalyticsCategoryCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1604,7 +1580,7 @@ export const de_GetCallAnalyticsJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1634,10 +1610,9 @@ const de_GetCallAnalyticsJobCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1660,7 +1635,7 @@ export const de_GetMedicalTranscriptionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1690,10 +1665,9 @@ const de_GetMedicalTranscriptionJobCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1716,7 +1690,7 @@ export const de_GetMedicalVocabularyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1746,10 +1720,9 @@ const de_GetMedicalVocabularyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1772,7 +1745,7 @@ export const de_GetTranscriptionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1802,10 +1775,9 @@ const de_GetTranscriptionJobCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1828,7 +1800,7 @@ export const de_GetVocabularyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1858,10 +1830,9 @@ const de_GetVocabularyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1884,7 +1855,7 @@ export const de_GetVocabularyFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1914,10 +1885,9 @@ const de_GetVocabularyFilterCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1940,7 +1910,7 @@ export const de_ListCallAnalyticsCategoriesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1967,10 +1937,9 @@ const de_ListCallAnalyticsCategoriesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1993,7 +1962,7 @@ export const de_ListCallAnalyticsJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2020,10 +1989,9 @@ const de_ListCallAnalyticsJobsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2046,7 +2014,7 @@ export const de_ListLanguageModelsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2073,10 +2041,9 @@ const de_ListLanguageModelsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2099,7 +2066,7 @@ export const de_ListMedicalTranscriptionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2126,10 +2093,9 @@ const de_ListMedicalTranscriptionJobsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2152,7 +2118,7 @@ export const de_ListMedicalVocabulariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2179,10 +2145,9 @@ const de_ListMedicalVocabulariesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2200,12 +2165,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2235,10 +2200,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,7 +2225,7 @@ export const de_ListTranscriptionJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2288,10 +2252,9 @@ const de_ListTranscriptionJobsCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2314,7 +2277,7 @@ export const de_ListVocabulariesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2341,10 +2304,9 @@ const de_ListVocabulariesCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2367,7 +2329,7 @@ export const de_ListVocabularyFiltersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2394,10 +2356,9 @@ const de_ListVocabularyFiltersCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2420,7 +2381,7 @@ export const de_StartCallAnalyticsJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2450,10 +2411,9 @@ const de_StartCallAnalyticsJobCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2476,7 +2436,7 @@ export const de_StartMedicalTranscriptionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2506,10 +2466,9 @@ const de_StartMedicalTranscriptionJobCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2532,7 +2491,7 @@ export const de_StartTranscriptionJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2562,10 +2521,9 @@ const de_StartTranscriptionJobCommandError = async ( throw await de_LimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2583,12 +2541,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2621,10 +2579,9 @@ const de_TagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2642,12 +2599,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2680,10 +2637,9 @@ const de_UntagResourceCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2706,7 +2662,7 @@ export const de_UpdateCallAnalyticsCategoryCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2739,10 +2695,9 @@ const de_UpdateCallAnalyticsCategoryCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,7 +2720,7 @@ export const de_UpdateMedicalVocabularyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2798,10 +2753,9 @@ const de_UpdateMedicalVocabularyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2824,7 +2778,7 @@ export const de_UpdateVocabularyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2857,10 +2811,9 @@ const de_UpdateVocabularyCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2883,7 +2836,7 @@ export const de_UpdateVocabularyFilterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2913,10 +2866,9 @@ const de_UpdateVocabularyFilterCommandError = async ( throw await de_NotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2927,7 +2879,7 @@ const de_UpdateVocabularyFilterCommandError = async ( */ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_BadRequestException(body, context); + const deserialized: any = _json(body); const exception = new BadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2940,7 +2892,7 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2956,7 +2908,7 @@ const de_InternalFailureExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalFailureException(body, context); + const deserialized: any = _json(body); const exception = new InternalFailureException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2972,7 +2924,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2985,7 +2937,7 @@ const de_LimitExceededExceptionRes = async ( */ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NotFoundException(body, context); + const deserialized: any = _json(body); const exception = new NotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2993,946 +2945,176 @@ const de_NotFoundExceptionRes = async (parsedOutput: any, context: __SerdeContex return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AbsoluteTimeRange - */ -const se_AbsoluteTimeRange = (input: AbsoluteTimeRange, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: input.EndTime }), - ...(input.First != null && { First: input.First }), - ...(input.Last != null && { Last: input.Last }), - ...(input.StartTime != null && { StartTime: input.StartTime }), - }; -}; +// se_AbsoluteTimeRange omitted. -/** - * serializeAws_json1_1CallAnalyticsJobSettings - */ -const se_CallAnalyticsJobSettings = (input: CallAnalyticsJobSettings, context: __SerdeContext): any => { - return { - ...(input.ContentRedaction != null && { ContentRedaction: se_ContentRedaction(input.ContentRedaction, context) }), - ...(input.LanguageIdSettings != null && { - LanguageIdSettings: se_LanguageIdSettingsMap(input.LanguageIdSettings, context), - }), - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - ...(input.LanguageOptions != null && { LanguageOptions: se_LanguageOptions(input.LanguageOptions, context) }), - ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_CallAnalyticsJobSettings omitted. -/** - * serializeAws_json1_1ChannelDefinition - */ -const se_ChannelDefinition = (input: ChannelDefinition, context: __SerdeContext): any => { - return { - ...(input.ChannelId != null && { ChannelId: input.ChannelId }), - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - }; -}; +// se_ChannelDefinition omitted. -/** - * serializeAws_json1_1ChannelDefinitions - */ -const se_ChannelDefinitions = (input: ChannelDefinition[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ChannelDefinition(entry, context); - }); -}; +// se_ChannelDefinitions omitted. -/** - * serializeAws_json1_1ContentRedaction - */ -const se_ContentRedaction = (input: ContentRedaction, context: __SerdeContext): any => { - return { - ...(input.PiiEntityTypes != null && { PiiEntityTypes: se_PiiEntityTypes(input.PiiEntityTypes, context) }), - ...(input.RedactionOutput != null && { RedactionOutput: input.RedactionOutput }), - ...(input.RedactionType != null && { RedactionType: input.RedactionType }), - }; -}; +// se_ContentRedaction omitted. -/** - * serializeAws_json1_1CreateCallAnalyticsCategoryRequest - */ -const se_CreateCallAnalyticsCategoryRequest = ( - input: CreateCallAnalyticsCategoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.CategoryName != null && { CategoryName: input.CategoryName }), - ...(input.InputType != null && { InputType: input.InputType }), - ...(input.Rules != null && { Rules: se_RuleList(input.Rules, context) }), - }; -}; +// se_CreateCallAnalyticsCategoryRequest omitted. -/** - * serializeAws_json1_1CreateLanguageModelRequest - */ -const se_CreateLanguageModelRequest = (input: CreateLanguageModelRequest, context: __SerdeContext): any => { - return { - ...(input.BaseModelName != null && { BaseModelName: input.BaseModelName }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.ModelName != null && { ModelName: input.ModelName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateLanguageModelRequest omitted. -/** - * serializeAws_json1_1CreateMedicalVocabularyRequest - */ -const se_CreateMedicalVocabularyRequest = (input: CreateMedicalVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VocabularyFileUri != null && { VocabularyFileUri: input.VocabularyFileUri }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_CreateMedicalVocabularyRequest omitted. -/** - * serializeAws_json1_1CreateVocabularyFilterRequest - */ -const se_CreateVocabularyFilterRequest = (input: CreateVocabularyFilterRequest, context: __SerdeContext): any => { - return { - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VocabularyFilterFileUri != null && { VocabularyFilterFileUri: input.VocabularyFilterFileUri }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.Words != null && { Words: se_Words(input.Words, context) }), - }; -}; +// se_CreateVocabularyFilterRequest omitted. -/** - * serializeAws_json1_1CreateVocabularyRequest - */ -const se_CreateVocabularyRequest = (input: CreateVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Phrases != null && { Phrases: se_Phrases(input.Phrases, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VocabularyFileUri != null && { VocabularyFileUri: input.VocabularyFileUri }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_CreateVocabularyRequest omitted. -/** - * serializeAws_json1_1DeleteCallAnalyticsCategoryRequest - */ -const se_DeleteCallAnalyticsCategoryRequest = ( - input: DeleteCallAnalyticsCategoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.CategoryName != null && { CategoryName: input.CategoryName }), - }; -}; +// se_DeleteCallAnalyticsCategoryRequest omitted. -/** - * serializeAws_json1_1DeleteCallAnalyticsJobRequest - */ -const se_DeleteCallAnalyticsJobRequest = (input: DeleteCallAnalyticsJobRequest, context: __SerdeContext): any => { - return { - ...(input.CallAnalyticsJobName != null && { CallAnalyticsJobName: input.CallAnalyticsJobName }), - }; -}; +// se_DeleteCallAnalyticsJobRequest omitted. -/** - * serializeAws_json1_1DeleteLanguageModelRequest - */ -const se_DeleteLanguageModelRequest = (input: DeleteLanguageModelRequest, context: __SerdeContext): any => { - return { - ...(input.ModelName != null && { ModelName: input.ModelName }), - }; -}; +// se_DeleteLanguageModelRequest omitted. -/** - * serializeAws_json1_1DeleteMedicalTranscriptionJobRequest - */ -const se_DeleteMedicalTranscriptionJobRequest = ( - input: DeleteMedicalTranscriptionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.MedicalTranscriptionJobName != null && { - MedicalTranscriptionJobName: input.MedicalTranscriptionJobName, - }), - }; -}; +// se_DeleteMedicalTranscriptionJobRequest omitted. -/** - * serializeAws_json1_1DeleteMedicalVocabularyRequest - */ -const se_DeleteMedicalVocabularyRequest = (input: DeleteMedicalVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_DeleteMedicalVocabularyRequest omitted. -/** - * serializeAws_json1_1DeleteTranscriptionJobRequest - */ -const se_DeleteTranscriptionJobRequest = (input: DeleteTranscriptionJobRequest, context: __SerdeContext): any => { - return { - ...(input.TranscriptionJobName != null && { TranscriptionJobName: input.TranscriptionJobName }), - }; -}; +// se_DeleteTranscriptionJobRequest omitted. -/** - * serializeAws_json1_1DeleteVocabularyFilterRequest - */ -const se_DeleteVocabularyFilterRequest = (input: DeleteVocabularyFilterRequest, context: __SerdeContext): any => { - return { - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - }; -}; +// se_DeleteVocabularyFilterRequest omitted. -/** - * serializeAws_json1_1DeleteVocabularyRequest - */ -const se_DeleteVocabularyRequest = (input: DeleteVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_DeleteVocabularyRequest omitted. -/** - * serializeAws_json1_1DescribeLanguageModelRequest - */ -const se_DescribeLanguageModelRequest = (input: DescribeLanguageModelRequest, context: __SerdeContext): any => { - return { - ...(input.ModelName != null && { ModelName: input.ModelName }), - }; -}; +// se_DescribeLanguageModelRequest omitted. -/** - * serializeAws_json1_1GetCallAnalyticsCategoryRequest - */ -const se_GetCallAnalyticsCategoryRequest = (input: GetCallAnalyticsCategoryRequest, context: __SerdeContext): any => { - return { - ...(input.CategoryName != null && { CategoryName: input.CategoryName }), - }; -}; +// se_GetCallAnalyticsCategoryRequest omitted. -/** - * serializeAws_json1_1GetCallAnalyticsJobRequest - */ -const se_GetCallAnalyticsJobRequest = (input: GetCallAnalyticsJobRequest, context: __SerdeContext): any => { - return { - ...(input.CallAnalyticsJobName != null && { CallAnalyticsJobName: input.CallAnalyticsJobName }), - }; -}; +// se_GetCallAnalyticsJobRequest omitted. -/** - * serializeAws_json1_1GetMedicalTranscriptionJobRequest - */ -const se_GetMedicalTranscriptionJobRequest = ( - input: GetMedicalTranscriptionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.MedicalTranscriptionJobName != null && { - MedicalTranscriptionJobName: input.MedicalTranscriptionJobName, - }), - }; -}; +// se_GetMedicalTranscriptionJobRequest omitted. -/** - * serializeAws_json1_1GetMedicalVocabularyRequest - */ -const se_GetMedicalVocabularyRequest = (input: GetMedicalVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_GetMedicalVocabularyRequest omitted. -/** - * serializeAws_json1_1GetTranscriptionJobRequest - */ -const se_GetTranscriptionJobRequest = (input: GetTranscriptionJobRequest, context: __SerdeContext): any => { - return { - ...(input.TranscriptionJobName != null && { TranscriptionJobName: input.TranscriptionJobName }), - }; -}; +// se_GetTranscriptionJobRequest omitted. -/** - * serializeAws_json1_1GetVocabularyFilterRequest - */ -const se_GetVocabularyFilterRequest = (input: GetVocabularyFilterRequest, context: __SerdeContext): any => { - return { - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - }; -}; +// se_GetVocabularyFilterRequest omitted. -/** - * serializeAws_json1_1GetVocabularyRequest - */ -const se_GetVocabularyRequest = (input: GetVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; - -/** - * serializeAws_json1_1InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return { - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - ...(input.TuningDataS3Uri != null && { TuningDataS3Uri: input.TuningDataS3Uri }), - }; -}; +// se_GetVocabularyRequest omitted. -/** - * serializeAws_json1_1InterruptionFilter - */ -const se_InterruptionFilter = (input: InterruptionFilter, context: __SerdeContext): any => { - return { - ...(input.AbsoluteTimeRange != null && { - AbsoluteTimeRange: se_AbsoluteTimeRange(input.AbsoluteTimeRange, context), - }), - ...(input.Negate != null && { Negate: input.Negate }), - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - ...(input.RelativeTimeRange != null && { - RelativeTimeRange: se_RelativeTimeRange(input.RelativeTimeRange, context), - }), - ...(input.Threshold != null && { Threshold: input.Threshold }), - }; -}; - -/** - * serializeAws_json1_1JobExecutionSettings - */ -const se_JobExecutionSettings = (input: JobExecutionSettings, context: __SerdeContext): any => { - return { - ...(input.AllowDeferredExecution != null && { AllowDeferredExecution: input.AllowDeferredExecution }), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - }; -}; +// se_InputDataConfig omitted. -/** - * serializeAws_json1_1KMSEncryptionContextMap - */ -const se_KMSEncryptionContextMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_InterruptionFilter omitted. -/** - * serializeAws_json1_1LanguageIdSettings - */ -const se_LanguageIdSettings = (input: LanguageIdSettings, context: __SerdeContext): any => { - return { - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_JobExecutionSettings omitted. -/** - * serializeAws_json1_1LanguageIdSettingsMap - */ -const se_LanguageIdSettingsMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [LanguageCode | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_LanguageIdSettings(value, context); - return acc; - }, {}); -}; +// se_KMSEncryptionContextMap omitted. -/** - * serializeAws_json1_1LanguageOptions - */ -const se_LanguageOptions = (input: (LanguageCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LanguageIdSettings omitted. -/** - * serializeAws_json1_1ListCallAnalyticsCategoriesRequest - */ -const se_ListCallAnalyticsCategoriesRequest = ( - input: ListCallAnalyticsCategoriesRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_LanguageIdSettingsMap omitted. -/** - * serializeAws_json1_1ListCallAnalyticsJobsRequest - */ -const se_ListCallAnalyticsJobsRequest = (input: ListCallAnalyticsJobsRequest, context: __SerdeContext): any => { - return { - ...(input.JobNameContains != null && { JobNameContains: input.JobNameContains }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_LanguageOptions omitted. -/** - * serializeAws_json1_1ListLanguageModelsRequest - */ -const se_ListLanguageModelsRequest = (input: ListLanguageModelsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StatusEquals != null && { StatusEquals: input.StatusEquals }), - }; -}; +// se_ListCallAnalyticsCategoriesRequest omitted. -/** - * serializeAws_json1_1ListMedicalTranscriptionJobsRequest - */ -const se_ListMedicalTranscriptionJobsRequest = ( - input: ListMedicalTranscriptionJobsRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobNameContains != null && { JobNameContains: input.JobNameContains }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListCallAnalyticsJobsRequest omitted. -/** - * serializeAws_json1_1ListMedicalVocabulariesRequest - */ -const se_ListMedicalVocabulariesRequest = (input: ListMedicalVocabulariesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StateEquals != null && { StateEquals: input.StateEquals }), - }; -}; +// se_ListLanguageModelsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListMedicalTranscriptionJobsRequest omitted. -/** - * serializeAws_json1_1ListTranscriptionJobsRequest - */ -const se_ListTranscriptionJobsRequest = (input: ListTranscriptionJobsRequest, context: __SerdeContext): any => { - return { - ...(input.JobNameContains != null && { JobNameContains: input.JobNameContains }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ListMedicalVocabulariesRequest omitted. -/** - * serializeAws_json1_1ListVocabulariesRequest - */ -const se_ListVocabulariesRequest = (input: ListVocabulariesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StateEquals != null && { StateEquals: input.StateEquals }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListVocabularyFiltersRequest - */ -const se_ListVocabularyFiltersRequest = (input: ListVocabularyFiltersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NameContains != null && { NameContains: input.NameContains }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTranscriptionJobsRequest omitted. -/** - * serializeAws_json1_1Media - */ -const se_Media = (input: Media, context: __SerdeContext): any => { - return { - ...(input.MediaFileUri != null && { MediaFileUri: input.MediaFileUri }), - ...(input.RedactedMediaFileUri != null && { RedactedMediaFileUri: input.RedactedMediaFileUri }), - }; -}; +// se_ListVocabulariesRequest omitted. -/** - * serializeAws_json1_1MedicalTranscriptionSetting - */ -const se_MedicalTranscriptionSetting = (input: MedicalTranscriptionSetting, context: __SerdeContext): any => { - return { - ...(input.ChannelIdentification != null && { ChannelIdentification: input.ChannelIdentification }), - ...(input.MaxAlternatives != null && { MaxAlternatives: input.MaxAlternatives }), - ...(input.MaxSpeakerLabels != null && { MaxSpeakerLabels: input.MaxSpeakerLabels }), - ...(input.ShowAlternatives != null && { ShowAlternatives: input.ShowAlternatives }), - ...(input.ShowSpeakerLabels != null && { ShowSpeakerLabels: input.ShowSpeakerLabels }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_ListVocabularyFiltersRequest omitted. -/** - * serializeAws_json1_1ModelSettings - */ -const se_ModelSettings = (input: ModelSettings, context: __SerdeContext): any => { - return { - ...(input.LanguageModelName != null && { LanguageModelName: input.LanguageModelName }), - }; -}; +// se_Media omitted. -/** - * serializeAws_json1_1NonTalkTimeFilter - */ -const se_NonTalkTimeFilter = (input: NonTalkTimeFilter, context: __SerdeContext): any => { - return { - ...(input.AbsoluteTimeRange != null && { - AbsoluteTimeRange: se_AbsoluteTimeRange(input.AbsoluteTimeRange, context), - }), - ...(input.Negate != null && { Negate: input.Negate }), - ...(input.RelativeTimeRange != null && { - RelativeTimeRange: se_RelativeTimeRange(input.RelativeTimeRange, context), - }), - ...(input.Threshold != null && { Threshold: input.Threshold }), - }; -}; +// se_MedicalTranscriptionSetting omitted. -/** - * serializeAws_json1_1Phrases - */ -const se_Phrases = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ModelSettings omitted. -/** - * serializeAws_json1_1PiiEntityTypes - */ -const se_PiiEntityTypes = (input: (PiiEntityType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_NonTalkTimeFilter omitted. -/** - * serializeAws_json1_1RelativeTimeRange - */ -const se_RelativeTimeRange = (input: RelativeTimeRange, context: __SerdeContext): any => { - return { - ...(input.EndPercentage != null && { EndPercentage: input.EndPercentage }), - ...(input.First != null && { First: input.First }), - ...(input.Last != null && { Last: input.Last }), - ...(input.StartPercentage != null && { StartPercentage: input.StartPercentage }), - }; -}; +// se_Phrases omitted. -/** - * serializeAws_json1_1Rule - */ -const se_Rule = (input: Rule, context: __SerdeContext): any => { - return Rule.visit(input, { - InterruptionFilter: (value) => ({ InterruptionFilter: se_InterruptionFilter(value, context) }), - NonTalkTimeFilter: (value) => ({ NonTalkTimeFilter: se_NonTalkTimeFilter(value, context) }), - SentimentFilter: (value) => ({ SentimentFilter: se_SentimentFilter(value, context) }), - TranscriptFilter: (value) => ({ TranscriptFilter: se_TranscriptFilter(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_PiiEntityTypes omitted. -/** - * serializeAws_json1_1RuleList - */ -const se_RuleList = (input: Rule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Rule(entry, context); - }); -}; +// se_RelativeTimeRange omitted. -/** - * serializeAws_json1_1SentimentFilter - */ -const se_SentimentFilter = (input: SentimentFilter, context: __SerdeContext): any => { - return { - ...(input.AbsoluteTimeRange != null && { - AbsoluteTimeRange: se_AbsoluteTimeRange(input.AbsoluteTimeRange, context), - }), - ...(input.Negate != null && { Negate: input.Negate }), - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - ...(input.RelativeTimeRange != null && { - RelativeTimeRange: se_RelativeTimeRange(input.RelativeTimeRange, context), - }), - ...(input.Sentiments != null && { Sentiments: se_SentimentValueList(input.Sentiments, context) }), - }; -}; +// se_Rule omitted. -/** - * serializeAws_json1_1SentimentValueList - */ -const se_SentimentValueList = (input: (SentimentValue | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RuleList omitted. -/** - * serializeAws_json1_1Settings - */ -const se_Settings = (input: Settings, context: __SerdeContext): any => { - return { - ...(input.ChannelIdentification != null && { ChannelIdentification: input.ChannelIdentification }), - ...(input.MaxAlternatives != null && { MaxAlternatives: input.MaxAlternatives }), - ...(input.MaxSpeakerLabels != null && { MaxSpeakerLabels: input.MaxSpeakerLabels }), - ...(input.ShowAlternatives != null && { ShowAlternatives: input.ShowAlternatives }), - ...(input.ShowSpeakerLabels != null && { ShowSpeakerLabels: input.ShowSpeakerLabels }), - ...(input.VocabularyFilterMethod != null && { VocabularyFilterMethod: input.VocabularyFilterMethod }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_SentimentFilter omitted. -/** - * serializeAws_json1_1StartCallAnalyticsJobRequest - */ -const se_StartCallAnalyticsJobRequest = (input: StartCallAnalyticsJobRequest, context: __SerdeContext): any => { - return { - ...(input.CallAnalyticsJobName != null && { CallAnalyticsJobName: input.CallAnalyticsJobName }), - ...(input.ChannelDefinitions != null && { - ChannelDefinitions: se_ChannelDefinitions(input.ChannelDefinitions, context), - }), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.Media != null && { Media: se_Media(input.Media, context) }), - ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }), - ...(input.OutputLocation != null && { OutputLocation: input.OutputLocation }), - ...(input.Settings != null && { Settings: se_CallAnalyticsJobSettings(input.Settings, context) }), - }; -}; +// se_SentimentValueList omitted. -/** - * serializeAws_json1_1StartMedicalTranscriptionJobRequest - */ -const se_StartMedicalTranscriptionJobRequest = ( - input: StartMedicalTranscriptionJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.ContentIdentificationType != null && { ContentIdentificationType: input.ContentIdentificationType }), - ...(input.KMSEncryptionContext != null && { - KMSEncryptionContext: se_KMSEncryptionContextMap(input.KMSEncryptionContext, context), - }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Media != null && { Media: se_Media(input.Media, context) }), - ...(input.MediaFormat != null && { MediaFormat: input.MediaFormat }), - ...(input.MediaSampleRateHertz != null && { MediaSampleRateHertz: input.MediaSampleRateHertz }), - ...(input.MedicalTranscriptionJobName != null && { - MedicalTranscriptionJobName: input.MedicalTranscriptionJobName, - }), - ...(input.OutputBucketName != null && { OutputBucketName: input.OutputBucketName }), - ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }), - ...(input.OutputKey != null && { OutputKey: input.OutputKey }), - ...(input.Settings != null && { Settings: se_MedicalTranscriptionSetting(input.Settings, context) }), - ...(input.Specialty != null && { Specialty: input.Specialty }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Settings omitted. -/** - * serializeAws_json1_1StartTranscriptionJobRequest - */ -const se_StartTranscriptionJobRequest = (input: StartTranscriptionJobRequest, context: __SerdeContext): any => { - return { - ...(input.ContentRedaction != null && { ContentRedaction: se_ContentRedaction(input.ContentRedaction, context) }), - ...(input.IdentifyLanguage != null && { IdentifyLanguage: input.IdentifyLanguage }), - ...(input.IdentifyMultipleLanguages != null && { IdentifyMultipleLanguages: input.IdentifyMultipleLanguages }), - ...(input.JobExecutionSettings != null && { - JobExecutionSettings: se_JobExecutionSettings(input.JobExecutionSettings, context), - }), - ...(input.KMSEncryptionContext != null && { - KMSEncryptionContext: se_KMSEncryptionContextMap(input.KMSEncryptionContext, context), - }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.LanguageIdSettings != null && { - LanguageIdSettings: se_LanguageIdSettingsMap(input.LanguageIdSettings, context), - }), - ...(input.LanguageOptions != null && { LanguageOptions: se_LanguageOptions(input.LanguageOptions, context) }), - ...(input.Media != null && { Media: se_Media(input.Media, context) }), - ...(input.MediaFormat != null && { MediaFormat: input.MediaFormat }), - ...(input.MediaSampleRateHertz != null && { MediaSampleRateHertz: input.MediaSampleRateHertz }), - ...(input.ModelSettings != null && { ModelSettings: se_ModelSettings(input.ModelSettings, context) }), - ...(input.OutputBucketName != null && { OutputBucketName: input.OutputBucketName }), - ...(input.OutputEncryptionKMSKeyId != null && { OutputEncryptionKMSKeyId: input.OutputEncryptionKMSKeyId }), - ...(input.OutputKey != null && { OutputKey: input.OutputKey }), - ...(input.Settings != null && { Settings: se_Settings(input.Settings, context) }), - ...(input.Subtitles != null && { Subtitles: se_Subtitles(input.Subtitles, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TranscriptionJobName != null && { TranscriptionJobName: input.TranscriptionJobName }), - }; -}; +// se_StartCallAnalyticsJobRequest omitted. -/** - * serializeAws_json1_1StringTargetList - */ -const se_StringTargetList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StartMedicalTranscriptionJobRequest omitted. -/** - * serializeAws_json1_1SubtitleFormats - */ -const se_SubtitleFormats = (input: (SubtitleFormat | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StartTranscriptionJobRequest omitted. -/** - * serializeAws_json1_1Subtitles - */ -const se_Subtitles = (input: Subtitles, context: __SerdeContext): any => { - return { - ...(input.Formats != null && { Formats: se_SubtitleFormats(input.Formats, context) }), - ...(input.OutputStartIndex != null && { OutputStartIndex: input.OutputStartIndex }), - }; -}; +// se_StringTargetList omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_SubtitleFormats omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Subtitles omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TranscriptFilter - */ -const se_TranscriptFilter = (input: TranscriptFilter, context: __SerdeContext): any => { - return { - ...(input.AbsoluteTimeRange != null && { - AbsoluteTimeRange: se_AbsoluteTimeRange(input.AbsoluteTimeRange, context), - }), - ...(input.Negate != null && { Negate: input.Negate }), - ...(input.ParticipantRole != null && { ParticipantRole: input.ParticipantRole }), - ...(input.RelativeTimeRange != null && { - RelativeTimeRange: se_RelativeTimeRange(input.RelativeTimeRange, context), - }), - ...(input.Targets != null && { Targets: se_StringTargetList(input.Targets, context) }), - ...(input.TranscriptFilterType != null && { TranscriptFilterType: input.TranscriptFilterType }), - }; -}; +// se_TagList omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateCallAnalyticsCategoryRequest - */ -const se_UpdateCallAnalyticsCategoryRequest = ( - input: UpdateCallAnalyticsCategoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.CategoryName != null && { CategoryName: input.CategoryName }), - ...(input.InputType != null && { InputType: input.InputType }), - ...(input.Rules != null && { Rules: se_RuleList(input.Rules, context) }), - }; -}; +// se_TranscriptFilter omitted. -/** - * serializeAws_json1_1UpdateMedicalVocabularyRequest - */ -const se_UpdateMedicalVocabularyRequest = (input: UpdateMedicalVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.VocabularyFileUri != null && { VocabularyFileUri: input.VocabularyFileUri }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateVocabularyFilterRequest - */ -const se_UpdateVocabularyFilterRequest = (input: UpdateVocabularyFilterRequest, context: __SerdeContext): any => { - return { - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.VocabularyFilterFileUri != null && { VocabularyFilterFileUri: input.VocabularyFilterFileUri }), - ...(input.VocabularyFilterName != null && { VocabularyFilterName: input.VocabularyFilterName }), - ...(input.Words != null && { Words: se_Words(input.Words, context) }), - }; -}; +// se_UpdateCallAnalyticsCategoryRequest omitted. -/** - * serializeAws_json1_1UpdateVocabularyRequest - */ -const se_UpdateVocabularyRequest = (input: UpdateVocabularyRequest, context: __SerdeContext): any => { - return { - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }), - ...(input.Phrases != null && { Phrases: se_Phrases(input.Phrases, context) }), - ...(input.VocabularyFileUri != null && { VocabularyFileUri: input.VocabularyFileUri }), - ...(input.VocabularyName != null && { VocabularyName: input.VocabularyName }), - }; -}; +// se_UpdateMedicalVocabularyRequest omitted. -/** - * serializeAws_json1_1Words - */ -const se_Words = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_UpdateVocabularyFilterRequest omitted. -/** - * deserializeAws_json1_1AbsoluteTimeRange - */ -const de_AbsoluteTimeRange = (output: any, context: __SerdeContext): AbsoluteTimeRange => { - return { - EndTime: __expectLong(output.EndTime), - First: __expectLong(output.First), - Last: __expectLong(output.Last), - StartTime: __expectLong(output.StartTime), - } as any; -}; +// se_UpdateVocabularyRequest omitted. -/** - * deserializeAws_json1_1BadRequestException - */ -const de_BadRequestException = (output: any, context: __SerdeContext): BadRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// se_Words omitted. + +// de_AbsoluteTimeRange omitted. + +// de_BadRequestException omitted. /** * deserializeAws_json1_1CallAnalyticsJob */ const de_CallAnalyticsJob = (output: any, context: __SerdeContext): CallAnalyticsJob => { - return { - CallAnalyticsJobName: __expectString(output.CallAnalyticsJobName), - CallAnalyticsJobStatus: __expectString(output.CallAnalyticsJobStatus), - ChannelDefinitions: - output.ChannelDefinitions != null ? de_ChannelDefinitions(output.ChannelDefinitions, context) : undefined, - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - FailureReason: __expectString(output.FailureReason), - IdentifiedLanguageScore: __limitedParseFloat32(output.IdentifiedLanguageScore), - LanguageCode: __expectString(output.LanguageCode), - Media: output.Media != null ? de_Media(output.Media, context) : undefined, - MediaFormat: __expectString(output.MediaFormat), - MediaSampleRateHertz: __expectInt32(output.MediaSampleRateHertz), - Settings: output.Settings != null ? de_CallAnalyticsJobSettings(output.Settings, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Transcript: output.Transcript != null ? de_Transcript(output.Transcript, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CallAnalyticsJobSettings - */ -const de_CallAnalyticsJobSettings = (output: any, context: __SerdeContext): CallAnalyticsJobSettings => { - return { - ContentRedaction: - output.ContentRedaction != null ? de_ContentRedaction(output.ContentRedaction, context) : undefined, - LanguageIdSettings: - output.LanguageIdSettings != null ? de_LanguageIdSettingsMap(output.LanguageIdSettings, context) : undefined, - LanguageModelName: __expectString(output.LanguageModelName), - LanguageOptions: output.LanguageOptions != null ? de_LanguageOptions(output.LanguageOptions, context) : undefined, - VocabularyFilterMethod: __expectString(output.VocabularyFilterMethod), - VocabularyFilterName: __expectString(output.VocabularyFilterName), - VocabularyName: __expectString(output.VocabularyName), - } as any; -}; + return take(output, { + CallAnalyticsJobName: __expectString, + CallAnalyticsJobStatus: __expectString, + ChannelDefinitions: _json, + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataAccessRoleArn: __expectString, + FailureReason: __expectString, + IdentifiedLanguageScore: __limitedParseFloat32, + LanguageCode: __expectString, + Media: _json, + MediaFormat: __expectString, + MediaSampleRateHertz: __expectInt32, + Settings: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Transcript: _json, + }) as any; +}; + +// de_CallAnalyticsJobSettings omitted. /** * deserializeAws_json1_1CallAnalyticsJobSummaries @@ -3941,9 +3123,6 @@ const de_CallAnalyticsJobSummaries = (output: any, context: __SerdeContext): Cal const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CallAnalyticsJobSummary(entry, context); }); return retVal; @@ -3953,39 +3132,28 @@ const de_CallAnalyticsJobSummaries = (output: any, context: __SerdeContext): Cal * deserializeAws_json1_1CallAnalyticsJobSummary */ const de_CallAnalyticsJobSummary = (output: any, context: __SerdeContext): CallAnalyticsJobSummary => { - return { - CallAnalyticsJobName: __expectString(output.CallAnalyticsJobName), - CallAnalyticsJobStatus: __expectString(output.CallAnalyticsJobStatus), - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + CallAnalyticsJobName: __expectString, + CallAnalyticsJobStatus: __expectString, + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LanguageCode: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_1CategoryProperties */ const de_CategoryProperties = (output: any, context: __SerdeContext): CategoryProperties => { - return { - CategoryName: __expectString(output.CategoryName), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - InputType: __expectString(output.InputType), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - Rules: output.Rules != null ? de_RuleList(output.Rules, context) : undefined, - } as any; + return take(output, { + CategoryName: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputType: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Rules: _json, + }) as any; }; /** @@ -3995,58 +3163,18 @@ const de_CategoryPropertiesList = (output: any, context: __SerdeContext): Catego const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CategoryProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ChannelDefinition - */ -const de_ChannelDefinition = (output: any, context: __SerdeContext): ChannelDefinition => { - return { - ChannelId: __expectInt32(output.ChannelId), - ParticipantRole: __expectString(output.ParticipantRole), - } as any; -}; +// de_ChannelDefinition omitted. -/** - * deserializeAws_json1_1ChannelDefinitions - */ -const de_ChannelDefinitions = (output: any, context: __SerdeContext): ChannelDefinition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChannelDefinition(entry, context); - }); - return retVal; -}; +// de_ChannelDefinitions omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1ContentRedaction - */ -const de_ContentRedaction = (output: any, context: __SerdeContext): ContentRedaction => { - return { - PiiEntityTypes: output.PiiEntityTypes != null ? de_PiiEntityTypes(output.PiiEntityTypes, context) : undefined, - RedactionOutput: __expectString(output.RedactionOutput), - RedactionType: __expectString(output.RedactionType), - } as any; -}; +// de_ContentRedaction omitted. /** * deserializeAws_json1_1CreateCallAnalyticsCategoryResponse @@ -4055,95 +3183,61 @@ const de_CreateCallAnalyticsCategoryResponse = ( output: any, context: __SerdeContext ): CreateCallAnalyticsCategoryResponse => { - return { - CategoryProperties: - output.CategoryProperties != null ? de_CategoryProperties(output.CategoryProperties, context) : undefined, - } as any; + return take(output, { + CategoryProperties: (_: any) => de_CategoryProperties(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateLanguageModelResponse - */ -const de_CreateLanguageModelResponse = (output: any, context: __SerdeContext): CreateLanguageModelResponse => { - return { - BaseModelName: __expectString(output.BaseModelName), - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - LanguageCode: __expectString(output.LanguageCode), - ModelName: __expectString(output.ModelName), - ModelStatus: __expectString(output.ModelStatus), - } as any; -}; +// de_CreateLanguageModelResponse omitted. /** * deserializeAws_json1_1CreateMedicalVocabularyResponse */ const de_CreateMedicalVocabularyResponse = (output: any, context: __SerdeContext): CreateMedicalVocabularyResponse => { - return { - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + FailureReason: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; /** * deserializeAws_json1_1CreateVocabularyFilterResponse */ const de_CreateVocabularyFilterResponse = (output: any, context: __SerdeContext): CreateVocabularyFilterResponse => { - return { - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyFilterName: __expectString(output.VocabularyFilterName), - } as any; + return take(output, { + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyFilterName: __expectString, + }) as any; }; /** * deserializeAws_json1_1CreateVocabularyResponse */ const de_CreateVocabularyResponse = (output: any, context: __SerdeContext): CreateVocabularyResponse => { - return { - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + FailureReason: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeleteCallAnalyticsCategoryResponse - */ -const de_DeleteCallAnalyticsCategoryResponse = ( - output: any, - context: __SerdeContext -): DeleteCallAnalyticsCategoryResponse => { - return {} as any; -}; +// de_DeleteCallAnalyticsCategoryResponse omitted. -/** - * deserializeAws_json1_1DeleteCallAnalyticsJobResponse - */ -const de_DeleteCallAnalyticsJobResponse = (output: any, context: __SerdeContext): DeleteCallAnalyticsJobResponse => { - return {} as any; -}; +// de_DeleteCallAnalyticsJobResponse omitted. /** * deserializeAws_json1_1DescribeLanguageModelResponse */ const de_DescribeLanguageModelResponse = (output: any, context: __SerdeContext): DescribeLanguageModelResponse => { - return { - LanguageModel: output.LanguageModel != null ? de_LanguageModel(output.LanguageModel, context) : undefined, - } as any; + return take(output, { + LanguageModel: (_: any) => de_LanguageModel(_, context), + }) as any; }; /** @@ -4153,20 +3247,18 @@ const de_GetCallAnalyticsCategoryResponse = ( output: any, context: __SerdeContext ): GetCallAnalyticsCategoryResponse => { - return { - CategoryProperties: - output.CategoryProperties != null ? de_CategoryProperties(output.CategoryProperties, context) : undefined, - } as any; + return take(output, { + CategoryProperties: (_: any) => de_CategoryProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1GetCallAnalyticsJobResponse */ const de_GetCallAnalyticsJobResponse = (output: any, context: __SerdeContext): GetCallAnalyticsJobResponse => { - return { - CallAnalyticsJob: - output.CallAnalyticsJob != null ? de_CallAnalyticsJob(output.CallAnalyticsJob, context) : undefined, - } as any; + return take(output, { + CallAnalyticsJob: (_: any) => de_CallAnalyticsJob(_, context), + }) as any; }; /** @@ -4176,126 +3268,76 @@ const de_GetMedicalTranscriptionJobResponse = ( output: any, context: __SerdeContext ): GetMedicalTranscriptionJobResponse => { - return { - MedicalTranscriptionJob: - output.MedicalTranscriptionJob != null - ? de_MedicalTranscriptionJob(output.MedicalTranscriptionJob, context) - : undefined, - } as any; + return take(output, { + MedicalTranscriptionJob: (_: any) => de_MedicalTranscriptionJob(_, context), + }) as any; }; /** * deserializeAws_json1_1GetMedicalVocabularyResponse */ const de_GetMedicalVocabularyResponse = (output: any, context: __SerdeContext): GetMedicalVocabularyResponse => { - return { - DownloadUri: __expectString(output.DownloadUri), - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + DownloadUri: __expectString, + FailureReason: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetTranscriptionJobResponse */ const de_GetTranscriptionJobResponse = (output: any, context: __SerdeContext): GetTranscriptionJobResponse => { - return { - TranscriptionJob: - output.TranscriptionJob != null ? de_TranscriptionJob(output.TranscriptionJob, context) : undefined, - } as any; + return take(output, { + TranscriptionJob: (_: any) => de_TranscriptionJob(_, context), + }) as any; }; /** * deserializeAws_json1_1GetVocabularyFilterResponse */ const de_GetVocabularyFilterResponse = (output: any, context: __SerdeContext): GetVocabularyFilterResponse => { - return { - DownloadUri: __expectString(output.DownloadUri), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyFilterName: __expectString(output.VocabularyFilterName), - } as any; + return take(output, { + DownloadUri: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyFilterName: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetVocabularyResponse */ const de_GetVocabularyResponse = (output: any, context: __SerdeContext): GetVocabularyResponse => { - return { - DownloadUri: __expectString(output.DownloadUri), - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + DownloadUri: __expectString, + FailureReason: __expectString, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - S3Uri: __expectString(output.S3Uri), - TuningDataS3Uri: __expectString(output.TuningDataS3Uri), - } as any; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_1InternalFailureException - */ -const de_InternalFailureException = (output: any, context: __SerdeContext): InternalFailureException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalFailureException omitted. -/** - * deserializeAws_json1_1InterruptionFilter - */ -const de_InterruptionFilter = (output: any, context: __SerdeContext): InterruptionFilter => { - return { - AbsoluteTimeRange: - output.AbsoluteTimeRange != null ? de_AbsoluteTimeRange(output.AbsoluteTimeRange, context) : undefined, - Negate: __expectBoolean(output.Negate), - ParticipantRole: __expectString(output.ParticipantRole), - RelativeTimeRange: - output.RelativeTimeRange != null ? de_RelativeTimeRange(output.RelativeTimeRange, context) : undefined, - Threshold: __expectLong(output.Threshold), - } as any; -}; +// de_InterruptionFilter omitted. -/** - * deserializeAws_json1_1JobExecutionSettings - */ -const de_JobExecutionSettings = (output: any, context: __SerdeContext): JobExecutionSettings => { - return { - AllowDeferredExecution: __expectBoolean(output.AllowDeferredExecution), - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - } as any; -}; +// de_JobExecutionSettings omitted. /** * deserializeAws_json1_1LanguageCodeItem */ const de_LanguageCodeItem = (output: any, context: __SerdeContext): LanguageCodeItem => { - return { - DurationInSeconds: __limitedParseFloat32(output.DurationInSeconds), - LanguageCode: __expectString(output.LanguageCode), - } as any; + return take(output, { + DurationInSeconds: __limitedParseFloat32, + LanguageCode: __expectString, + }) as any; }; /** @@ -4305,85 +3347,35 @@ const de_LanguageCodeList = (output: any, context: __SerdeContext): LanguageCode const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LanguageCodeItem(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LanguageIdSettings - */ -const de_LanguageIdSettings = (output: any, context: __SerdeContext): LanguageIdSettings => { - return { - LanguageModelName: __expectString(output.LanguageModelName), - VocabularyFilterName: __expectString(output.VocabularyFilterName), - VocabularyName: __expectString(output.VocabularyName), - } as any; -}; +// de_LanguageIdSettings omitted. -/** - * deserializeAws_json1_1LanguageIdSettingsMap - */ -const de_LanguageIdSettingsMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [LanguageCode | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_LanguageIdSettings(value, context); - return acc; - }, - {} - ); -}; +// de_LanguageIdSettingsMap omitted. /** * deserializeAws_json1_1LanguageModel */ const de_LanguageModel = (output: any, context: __SerdeContext): LanguageModel => { - return { - BaseModelName: __expectString(output.BaseModelName), - CreateTime: - output.CreateTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTime))) : undefined, - FailureReason: __expectString(output.FailureReason), - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - ModelName: __expectString(output.ModelName), - ModelStatus: __expectString(output.ModelStatus), - UpgradeAvailability: __expectBoolean(output.UpgradeAvailability), - } as any; -}; - -/** - * deserializeAws_json1_1LanguageOptions - */ -const de_LanguageOptions = (output: any, context: __SerdeContext): (LanguageCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + BaseModelName: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + InputDataConfig: _json, + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModelName: __expectString, + ModelStatus: __expectString, + UpgradeAvailability: __expectBoolean, + }) as any; }; -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LanguageOptions omitted. + +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListCallAnalyticsCategoriesResponse @@ -4392,34 +3384,31 @@ const de_ListCallAnalyticsCategoriesResponse = ( output: any, context: __SerdeContext ): ListCallAnalyticsCategoriesResponse => { - return { - Categories: output.Categories != null ? de_CategoryPropertiesList(output.Categories, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Categories: (_: any) => de_CategoryPropertiesList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListCallAnalyticsJobsResponse */ const de_ListCallAnalyticsJobsResponse = (output: any, context: __SerdeContext): ListCallAnalyticsJobsResponse => { - return { - CallAnalyticsJobSummaries: - output.CallAnalyticsJobSummaries != null - ? de_CallAnalyticsJobSummaries(output.CallAnalyticsJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - Status: __expectString(output.Status), - } as any; + return take(output, { + CallAnalyticsJobSummaries: (_: any) => de_CallAnalyticsJobSummaries(_, context), + NextToken: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListLanguageModelsResponse */ const de_ListLanguageModelsResponse = (output: any, context: __SerdeContext): ListLanguageModelsResponse => { - return { - Models: output.Models != null ? de_Models(output.Models, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Models: (_: any) => de_Models(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -4429,121 +3418,84 @@ const de_ListMedicalTranscriptionJobsResponse = ( output: any, context: __SerdeContext ): ListMedicalTranscriptionJobsResponse => { - return { - MedicalTranscriptionJobSummaries: - output.MedicalTranscriptionJobSummaries != null - ? de_MedicalTranscriptionJobSummaries(output.MedicalTranscriptionJobSummaries, context) - : undefined, - NextToken: __expectString(output.NextToken), - Status: __expectString(output.Status), - } as any; + return take(output, { + MedicalTranscriptionJobSummaries: (_: any) => de_MedicalTranscriptionJobSummaries(_, context), + NextToken: __expectString, + Status: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListMedicalVocabulariesResponse */ const de_ListMedicalVocabulariesResponse = (output: any, context: __SerdeContext): ListMedicalVocabulariesResponse => { - return { - NextToken: __expectString(output.NextToken), - Status: __expectString(output.Status), - Vocabularies: output.Vocabularies != null ? de_Vocabularies(output.Vocabularies, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Status: __expectString, + Vocabularies: (_: any) => de_Vocabularies(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - ResourceArn: __expectString(output.ResourceArn), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListTranscriptionJobsResponse */ const de_ListTranscriptionJobsResponse = (output: any, context: __SerdeContext): ListTranscriptionJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - Status: __expectString(output.Status), - TranscriptionJobSummaries: - output.TranscriptionJobSummaries != null - ? de_TranscriptionJobSummaries(output.TranscriptionJobSummaries, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Status: __expectString, + TranscriptionJobSummaries: (_: any) => de_TranscriptionJobSummaries(_, context), + }) as any; }; /** * deserializeAws_json1_1ListVocabulariesResponse */ const de_ListVocabulariesResponse = (output: any, context: __SerdeContext): ListVocabulariesResponse => { - return { - NextToken: __expectString(output.NextToken), - Status: __expectString(output.Status), - Vocabularies: output.Vocabularies != null ? de_Vocabularies(output.Vocabularies, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Status: __expectString, + Vocabularies: (_: any) => de_Vocabularies(_, context), + }) as any; }; /** * deserializeAws_json1_1ListVocabularyFiltersResponse */ const de_ListVocabularyFiltersResponse = (output: any, context: __SerdeContext): ListVocabularyFiltersResponse => { - return { - NextToken: __expectString(output.NextToken), - VocabularyFilters: - output.VocabularyFilters != null ? de_VocabularyFilters(output.VocabularyFilters, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + VocabularyFilters: (_: any) => de_VocabularyFilters(_, context), + }) as any; }; -/** - * deserializeAws_json1_1Media - */ -const de_Media = (output: any, context: __SerdeContext): Media => { - return { - MediaFileUri: __expectString(output.MediaFileUri), - RedactedMediaFileUri: __expectString(output.RedactedMediaFileUri), - } as any; -}; +// de_Media omitted. -/** - * deserializeAws_json1_1MedicalTranscript - */ -const de_MedicalTranscript = (output: any, context: __SerdeContext): MedicalTranscript => { - return { - TranscriptFileUri: __expectString(output.TranscriptFileUri), - } as any; -}; +// de_MedicalTranscript omitted. /** * deserializeAws_json1_1MedicalTranscriptionJob */ const de_MedicalTranscriptionJob = (output: any, context: __SerdeContext): MedicalTranscriptionJob => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - ContentIdentificationType: __expectString(output.ContentIdentificationType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - Media: output.Media != null ? de_Media(output.Media, context) : undefined, - MediaFormat: __expectString(output.MediaFormat), - MediaSampleRateHertz: __expectInt32(output.MediaSampleRateHertz), - MedicalTranscriptionJobName: __expectString(output.MedicalTranscriptionJobName), - Settings: output.Settings != null ? de_MedicalTranscriptionSetting(output.Settings, context) : undefined, - Specialty: __expectString(output.Specialty), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Transcript: output.Transcript != null ? de_MedicalTranscript(output.Transcript, context) : undefined, - TranscriptionJobStatus: __expectString(output.TranscriptionJobStatus), - Type: __expectString(output.Type), - } as any; + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContentIdentificationType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LanguageCode: __expectString, + Media: _json, + MediaFormat: __expectString, + MediaSampleRateHertz: __expectInt32, + MedicalTranscriptionJobName: __expectString, + Settings: _json, + Specialty: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + Transcript: _json, + TranscriptionJobStatus: __expectString, + Type: __expectString, + }) as any; }; /** @@ -4556,9 +3508,6 @@ const de_MedicalTranscriptionJobSummaries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MedicalTranscriptionJobSummary(entry, context); }); return retVal; @@ -4568,42 +3517,23 @@ const de_MedicalTranscriptionJobSummaries = ( * deserializeAws_json1_1MedicalTranscriptionJobSummary */ const de_MedicalTranscriptionJobSummary = (output: any, context: __SerdeContext): MedicalTranscriptionJobSummary => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - ContentIdentificationType: __expectString(output.ContentIdentificationType), - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - LanguageCode: __expectString(output.LanguageCode), - MedicalTranscriptionJobName: __expectString(output.MedicalTranscriptionJobName), - OutputLocationType: __expectString(output.OutputLocationType), - Specialty: __expectString(output.Specialty), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TranscriptionJobStatus: __expectString(output.TranscriptionJobStatus), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1MedicalTranscriptionSetting - */ -const de_MedicalTranscriptionSetting = (output: any, context: __SerdeContext): MedicalTranscriptionSetting => { - return { - ChannelIdentification: __expectBoolean(output.ChannelIdentification), - MaxAlternatives: __expectInt32(output.MaxAlternatives), - MaxSpeakerLabels: __expectInt32(output.MaxSpeakerLabels), - ShowAlternatives: __expectBoolean(output.ShowAlternatives), - ShowSpeakerLabels: __expectBoolean(output.ShowSpeakerLabels), - VocabularyName: __expectString(output.VocabularyName), - } as any; + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContentIdentificationType: __expectString, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + LanguageCode: __expectString, + MedicalTranscriptionJobName: __expectString, + OutputLocationType: __expectString, + Specialty: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TranscriptionJobStatus: __expectString, + Type: __expectString, + }) as any; }; +// de_MedicalTranscriptionSetting omitted. + /** * deserializeAws_json1_1Models */ @@ -4611,169 +3541,38 @@ const de_Models = (output: any, context: __SerdeContext): LanguageModel[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LanguageModel(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ModelSettings - */ -const de_ModelSettings = (output: any, context: __SerdeContext): ModelSettings => { - return { - LanguageModelName: __expectString(output.LanguageModelName), - } as any; -}; +// de_ModelSettings omitted. -/** - * deserializeAws_json1_1NonTalkTimeFilter - */ -const de_NonTalkTimeFilter = (output: any, context: __SerdeContext): NonTalkTimeFilter => { - return { - AbsoluteTimeRange: - output.AbsoluteTimeRange != null ? de_AbsoluteTimeRange(output.AbsoluteTimeRange, context) : undefined, - Negate: __expectBoolean(output.Negate), - RelativeTimeRange: - output.RelativeTimeRange != null ? de_RelativeTimeRange(output.RelativeTimeRange, context) : undefined, - Threshold: __expectLong(output.Threshold), - } as any; -}; +// de_NonTalkTimeFilter omitted. -/** - * deserializeAws_json1_1NotFoundException - */ -const de_NotFoundException = (output: any, context: __SerdeContext): NotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NotFoundException omitted. -/** - * deserializeAws_json1_1PiiEntityTypes - */ -const de_PiiEntityTypes = (output: any, context: __SerdeContext): (PiiEntityType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PiiEntityTypes omitted. -/** - * deserializeAws_json1_1RelativeTimeRange - */ -const de_RelativeTimeRange = (output: any, context: __SerdeContext): RelativeTimeRange => { - return { - EndPercentage: __expectInt32(output.EndPercentage), - First: __expectInt32(output.First), - Last: __expectInt32(output.Last), - StartPercentage: __expectInt32(output.StartPercentage), - } as any; -}; +// de_RelativeTimeRange omitted. -/** - * deserializeAws_json1_1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - if (output.InterruptionFilter != null) { - return { - InterruptionFilter: de_InterruptionFilter(output.InterruptionFilter, context), - }; - } - if (output.NonTalkTimeFilter != null) { - return { - NonTalkTimeFilter: de_NonTalkTimeFilter(output.NonTalkTimeFilter, context), - }; - } - if (output.SentimentFilter != null) { - return { - SentimentFilter: de_SentimentFilter(output.SentimentFilter, context), - }; - } - if (output.TranscriptFilter != null) { - return { - TranscriptFilter: de_TranscriptFilter(output.TranscriptFilter, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_Rule omitted. -/** - * deserializeAws_json1_1RuleList - */ -const de_RuleList = (output: any, context: __SerdeContext): Rule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Rule(__expectUnion(entry), context); - }); - return retVal; -}; +// de_RuleList omitted. -/** - * deserializeAws_json1_1SentimentFilter - */ -const de_SentimentFilter = (output: any, context: __SerdeContext): SentimentFilter => { - return { - AbsoluteTimeRange: - output.AbsoluteTimeRange != null ? de_AbsoluteTimeRange(output.AbsoluteTimeRange, context) : undefined, - Negate: __expectBoolean(output.Negate), - ParticipantRole: __expectString(output.ParticipantRole), - RelativeTimeRange: - output.RelativeTimeRange != null ? de_RelativeTimeRange(output.RelativeTimeRange, context) : undefined, - Sentiments: output.Sentiments != null ? de_SentimentValueList(output.Sentiments, context) : undefined, - } as any; -}; +// de_SentimentFilter omitted. -/** - * deserializeAws_json1_1SentimentValueList - */ -const de_SentimentValueList = (output: any, context: __SerdeContext): (SentimentValue | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SentimentValueList omitted. -/** - * deserializeAws_json1_1Settings - */ -const de_Settings = (output: any, context: __SerdeContext): Settings => { - return { - ChannelIdentification: __expectBoolean(output.ChannelIdentification), - MaxAlternatives: __expectInt32(output.MaxAlternatives), - MaxSpeakerLabels: __expectInt32(output.MaxSpeakerLabels), - ShowAlternatives: __expectBoolean(output.ShowAlternatives), - ShowSpeakerLabels: __expectBoolean(output.ShowSpeakerLabels), - VocabularyFilterMethod: __expectString(output.VocabularyFilterMethod), - VocabularyFilterName: __expectString(output.VocabularyFilterName), - VocabularyName: __expectString(output.VocabularyName), - } as any; -}; +// de_Settings omitted. /** * deserializeAws_json1_1StartCallAnalyticsJobResponse */ const de_StartCallAnalyticsJobResponse = (output: any, context: __SerdeContext): StartCallAnalyticsJobResponse => { - return { - CallAnalyticsJob: - output.CallAnalyticsJob != null ? de_CallAnalyticsJob(output.CallAnalyticsJob, context) : undefined, - } as any; + return take(output, { + CallAnalyticsJob: (_: any) => de_CallAnalyticsJob(_, context), + }) as any; }; /** @@ -4783,178 +3582,67 @@ const de_StartMedicalTranscriptionJobResponse = ( output: any, context: __SerdeContext ): StartMedicalTranscriptionJobResponse => { - return { - MedicalTranscriptionJob: - output.MedicalTranscriptionJob != null - ? de_MedicalTranscriptionJob(output.MedicalTranscriptionJob, context) - : undefined, - } as any; + return take(output, { + MedicalTranscriptionJob: (_: any) => de_MedicalTranscriptionJob(_, context), + }) as any; }; /** * deserializeAws_json1_1StartTranscriptionJobResponse */ const de_StartTranscriptionJobResponse = (output: any, context: __SerdeContext): StartTranscriptionJobResponse => { - return { - TranscriptionJob: - output.TranscriptionJob != null ? de_TranscriptionJob(output.TranscriptionJob, context) : undefined, - } as any; + return take(output, { + TranscriptionJob: (_: any) => de_TranscriptionJob(_, context), + }) as any; }; -/** - * deserializeAws_json1_1StringTargetList - */ -const de_StringTargetList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringTargetList omitted. -/** - * deserializeAws_json1_1SubtitleFileUris - */ -const de_SubtitleFileUris = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubtitleFileUris omitted. -/** - * deserializeAws_json1_1SubtitleFormats - */ -const de_SubtitleFormats = (output: any, context: __SerdeContext): (SubtitleFormat | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubtitleFormats omitted. -/** - * deserializeAws_json1_1SubtitlesOutput - */ -const de_SubtitlesOutput = (output: any, context: __SerdeContext): SubtitlesOutput => { - return { - Formats: output.Formats != null ? de_SubtitleFormats(output.Formats, context) : undefined, - OutputStartIndex: __expectInt32(output.OutputStartIndex), - SubtitleFileUris: - output.SubtitleFileUris != null ? de_SubtitleFileUris(output.SubtitleFileUris, context) : undefined, - } as any; -}; +// de_SubtitlesOutput omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1Transcript - */ -const de_Transcript = (output: any, context: __SerdeContext): Transcript => { - return { - RedactedTranscriptFileUri: __expectString(output.RedactedTranscriptFileUri), - TranscriptFileUri: __expectString(output.TranscriptFileUri), - } as any; -}; +// de_Transcript omitted. -/** - * deserializeAws_json1_1TranscriptFilter - */ -const de_TranscriptFilter = (output: any, context: __SerdeContext): TranscriptFilter => { - return { - AbsoluteTimeRange: - output.AbsoluteTimeRange != null ? de_AbsoluteTimeRange(output.AbsoluteTimeRange, context) : undefined, - Negate: __expectBoolean(output.Negate), - ParticipantRole: __expectString(output.ParticipantRole), - RelativeTimeRange: - output.RelativeTimeRange != null ? de_RelativeTimeRange(output.RelativeTimeRange, context) : undefined, - Targets: output.Targets != null ? de_StringTargetList(output.Targets, context) : undefined, - TranscriptFilterType: __expectString(output.TranscriptFilterType), - } as any; -}; +// de_TranscriptFilter omitted. /** * deserializeAws_json1_1TranscriptionJob */ const de_TranscriptionJob = (output: any, context: __SerdeContext): TranscriptionJob => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - ContentRedaction: - output.ContentRedaction != null ? de_ContentRedaction(output.ContentRedaction, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - IdentifiedLanguageScore: __limitedParseFloat32(output.IdentifiedLanguageScore), - IdentifyLanguage: __expectBoolean(output.IdentifyLanguage), - IdentifyMultipleLanguages: __expectBoolean(output.IdentifyMultipleLanguages), - JobExecutionSettings: - output.JobExecutionSettings != null ? de_JobExecutionSettings(output.JobExecutionSettings, context) : undefined, - LanguageCode: __expectString(output.LanguageCode), - LanguageCodes: output.LanguageCodes != null ? de_LanguageCodeList(output.LanguageCodes, context) : undefined, - LanguageIdSettings: - output.LanguageIdSettings != null ? de_LanguageIdSettingsMap(output.LanguageIdSettings, context) : undefined, - LanguageOptions: output.LanguageOptions != null ? de_LanguageOptions(output.LanguageOptions, context) : undefined, - Media: output.Media != null ? de_Media(output.Media, context) : undefined, - MediaFormat: __expectString(output.MediaFormat), - MediaSampleRateHertz: __expectInt32(output.MediaSampleRateHertz), - ModelSettings: output.ModelSettings != null ? de_ModelSettings(output.ModelSettings, context) : undefined, - Settings: output.Settings != null ? de_Settings(output.Settings, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - Subtitles: output.Subtitles != null ? de_SubtitlesOutput(output.Subtitles, context) : undefined, - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Transcript: output.Transcript != null ? de_Transcript(output.Transcript, context) : undefined, - TranscriptionJobName: __expectString(output.TranscriptionJobName), - TranscriptionJobStatus: __expectString(output.TranscriptionJobStatus), - } as any; + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContentRedaction: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + IdentifiedLanguageScore: __limitedParseFloat32, + IdentifyLanguage: __expectBoolean, + IdentifyMultipleLanguages: __expectBoolean, + JobExecutionSettings: _json, + LanguageCode: __expectString, + LanguageCodes: (_: any) => de_LanguageCodeList(_, context), + LanguageIdSettings: _json, + LanguageOptions: _json, + Media: _json, + MediaFormat: __expectString, + MediaSampleRateHertz: __expectInt32, + ModelSettings: _json, + Settings: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Subtitles: _json, + Tags: _json, + Transcript: _json, + TranscriptionJobName: __expectString, + TranscriptionJobStatus: __expectString, + }) as any; }; /** @@ -4964,9 +3652,6 @@ const de_TranscriptionJobSummaries = (output: any, context: __SerdeContext): Tra const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TranscriptionJobSummary(entry, context); }); return retVal; @@ -4976,38 +3661,25 @@ const de_TranscriptionJobSummaries = (output: any, context: __SerdeContext): Tra * deserializeAws_json1_1TranscriptionJobSummary */ const de_TranscriptionJobSummary = (output: any, context: __SerdeContext): TranscriptionJobSummary => { - return { - CompletionTime: - output.CompletionTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletionTime))) - : undefined, - ContentRedaction: - output.ContentRedaction != null ? de_ContentRedaction(output.ContentRedaction, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - FailureReason: __expectString(output.FailureReason), - IdentifiedLanguageScore: __limitedParseFloat32(output.IdentifiedLanguageScore), - IdentifyLanguage: __expectBoolean(output.IdentifyLanguage), - IdentifyMultipleLanguages: __expectBoolean(output.IdentifyMultipleLanguages), - LanguageCode: __expectString(output.LanguageCode), - LanguageCodes: output.LanguageCodes != null ? de_LanguageCodeList(output.LanguageCodes, context) : undefined, - ModelSettings: output.ModelSettings != null ? de_ModelSettings(output.ModelSettings, context) : undefined, - OutputLocationType: __expectString(output.OutputLocationType), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - TranscriptionJobName: __expectString(output.TranscriptionJobName), - TranscriptionJobStatus: __expectString(output.TranscriptionJobStatus), - } as any; -}; - -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; + return take(output, { + CompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContentRedaction: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureReason: __expectString, + IdentifiedLanguageScore: __limitedParseFloat32, + IdentifyLanguage: __expectBoolean, + IdentifyMultipleLanguages: __expectBoolean, + LanguageCode: __expectString, + LanguageCodes: (_: any) => de_LanguageCodeList(_, context), + ModelSettings: _json, + OutputLocationType: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TranscriptionJobName: __expectString, + TranscriptionJobStatus: __expectString, + }) as any; +}; + +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateCallAnalyticsCategoryResponse @@ -5016,54 +3688,44 @@ const de_UpdateCallAnalyticsCategoryResponse = ( output: any, context: __SerdeContext ): UpdateCallAnalyticsCategoryResponse => { - return { - CategoryProperties: - output.CategoryProperties != null ? de_CategoryProperties(output.CategoryProperties, context) : undefined, - } as any; + return take(output, { + CategoryProperties: (_: any) => de_CategoryProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1UpdateMedicalVocabularyResponse */ const de_UpdateMedicalVocabularyResponse = (output: any, context: __SerdeContext): UpdateMedicalVocabularyResponse => { - return { - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; /** * deserializeAws_json1_1UpdateVocabularyFilterResponse */ const de_UpdateVocabularyFilterResponse = (output: any, context: __SerdeContext): UpdateVocabularyFilterResponse => { - return { - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyFilterName: __expectString(output.VocabularyFilterName), - } as any; + return take(output, { + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyFilterName: __expectString, + }) as any; }; /** * deserializeAws_json1_1UpdateVocabularyResponse */ const de_UpdateVocabularyResponse = (output: any, context: __SerdeContext): UpdateVocabularyResponse => { - return { - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; /** @@ -5073,9 +3735,6 @@ const de_Vocabularies = (output: any, context: __SerdeContext): VocabularyInfo[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VocabularyInfo(entry, context); }); return retVal; @@ -5085,14 +3744,11 @@ const de_Vocabularies = (output: any, context: __SerdeContext): VocabularyInfo[] * deserializeAws_json1_1VocabularyFilterInfo */ const de_VocabularyFilterInfo = (output: any, context: __SerdeContext): VocabularyFilterInfo => { - return { - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyFilterName: __expectString(output.VocabularyFilterName), - } as any; + return take(output, { + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyFilterName: __expectString, + }) as any; }; /** @@ -5102,9 +3758,6 @@ const de_VocabularyFilters = (output: any, context: __SerdeContext): VocabularyF const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_VocabularyFilterInfo(entry, context); }); return retVal; @@ -5114,15 +3767,12 @@ const de_VocabularyFilters = (output: any, context: __SerdeContext): VocabularyF * deserializeAws_json1_1VocabularyInfo */ const de_VocabularyInfo = (output: any, context: __SerdeContext): VocabularyInfo => { - return { - LanguageCode: __expectString(output.LanguageCode), - LastModifiedTime: - output.LastModifiedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastModifiedTime))) - : undefined, - VocabularyName: __expectString(output.VocabularyName), - VocabularyState: __expectString(output.VocabularyState), - } as any; + return take(output, { + LanguageCode: __expectString, + LastModifiedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + VocabularyName: __expectString, + VocabularyState: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -5145,6 +3795,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-transfer/src/protocols/Aws_json1_1.ts b/clients/client-transfer/src/protocols/Aws_json1_1.ts index 2f8c0dac8898..4d6d9cdb794f 100644 --- a/clients/client-transfer/src/protocols/Aws_json1_1.ts +++ b/clients/client-transfer/src/protocols/Aws_json1_1.ts @@ -1,15 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -101,19 +100,12 @@ import { ConflictException, CopyStepDetails, CreateAccessRequest, - CreateAccessResponse, CreateAgreementRequest, - CreateAgreementResponse, CreateConnectorRequest, - CreateConnectorResponse, CreateProfileRequest, - CreateProfileResponse, CreateServerRequest, - CreateServerResponse, CreateUserRequest, - CreateUserResponse, CreateWorkflowRequest, - CreateWorkflowResponse, CustomStepDetails, DecryptStepDetails, DeleteAccessRequest, @@ -128,132 +120,76 @@ import { DeleteUserRequest, DeleteWorkflowRequest, DescribeAccessRequest, - DescribeAccessResponse, DescribeAgreementRequest, - DescribeAgreementResponse, DescribeCertificateRequest, DescribeCertificateResponse, DescribeConnectorRequest, - DescribeConnectorResponse, - DescribedAccess, - DescribedAgreement, DescribedCertificate, - DescribedConnector, - DescribedExecution, DescribedHostKey, - DescribedProfile, - DescribedSecurityPolicy, - DescribedServer, DescribedUser, - DescribedWorkflow, DescribeExecutionRequest, - DescribeExecutionResponse, DescribeHostKeyRequest, DescribeHostKeyResponse, DescribeProfileRequest, - DescribeProfileResponse, DescribeSecurityPolicyRequest, - DescribeSecurityPolicyResponse, DescribeServerRequest, - DescribeServerResponse, DescribeUserRequest, DescribeUserResponse, DescribeWorkflowRequest, - DescribeWorkflowResponse, EfsFileLocation, EndpointDetails, - ExecutionError, - ExecutionResults, - ExecutionStepResult, - FileLocation, HomeDirectoryMapEntry, IdentityProviderDetails, ImportCertificateRequest, - ImportCertificateResponse, ImportHostKeyRequest, - ImportHostKeyResponse, ImportSshPublicKeyRequest, - ImportSshPublicKeyResponse, InputFileLocation, InternalServiceError, InvalidNextTokenException, InvalidRequestException, ListAccessesRequest, - ListAccessesResponse, ListAgreementsRequest, - ListAgreementsResponse, ListCertificatesRequest, ListCertificatesResponse, ListConnectorsRequest, - ListConnectorsResponse, - ListedAccess, - ListedAgreement, ListedCertificate, - ListedConnector, - ListedExecution, ListedHostKey, - ListedProfile, - ListedServer, - ListedUser, - ListedWorkflow, ListExecutionsRequest, - ListExecutionsResponse, ListHostKeysRequest, ListHostKeysResponse, ListProfilesRequest, - ListProfilesResponse, ListSecurityPoliciesRequest, - ListSecurityPoliciesResponse, ListServersRequest, - ListServersResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListUsersRequest, - ListUsersResponse, ListWorkflowsRequest, - ListWorkflowsResponse, - LoggingConfiguration, PosixProfile, Protocol, ProtocolDetails, ResourceExistsException, ResourceNotFoundException, - S3FileLocation, S3InputFileLocation, S3Tag, SendWorkflowStepStateRequest, - SendWorkflowStepStateResponse, - ServiceMetadata, ServiceUnavailableException, SshPublicKey, StartFileTransferRequest, - StartFileTransferResponse, StartServerRequest, StopServerRequest, Tag, TagResourceRequest, TagStepDetails, TestIdentityProviderRequest, - TestIdentityProviderResponse, ThrottlingException, UntagResourceRequest, UpdateAccessRequest, - UpdateAccessResponse, UpdateAgreementRequest, - UpdateAgreementResponse, UpdateCertificateRequest, - UpdateCertificateResponse, UpdateConnectorRequest, - UpdateConnectorResponse, UpdateHostKeyRequest, - UpdateHostKeyResponse, UpdateProfileRequest, - UpdateProfileResponse, UpdateServerRequest, - UpdateServerResponse, UpdateUserRequest, - UpdateUserResponse, - UserDetails, WorkflowDetail, WorkflowDetails, WorkflowStep, @@ -269,7 +205,7 @@ export const se_CreateAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAccess"); let body: any; - body = JSON.stringify(se_CreateAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -282,7 +218,7 @@ export const se_CreateAgreementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAgreement"); let body: any; - body = JSON.stringify(se_CreateAgreementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -295,7 +231,7 @@ export const se_CreateConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnector"); let body: any; - body = JSON.stringify(se_CreateConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -308,7 +244,7 @@ export const se_CreateProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateProfile"); let body: any; - body = JSON.stringify(se_CreateProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -321,7 +257,7 @@ export const se_CreateServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateServer"); let body: any; - body = JSON.stringify(se_CreateServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -334,7 +270,7 @@ export const se_CreateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUser"); let body: any; - body = JSON.stringify(se_CreateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -347,7 +283,7 @@ export const se_CreateWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkflow"); let body: any; - body = JSON.stringify(se_CreateWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -360,7 +296,7 @@ export const se_DeleteAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAccess"); let body: any; - body = JSON.stringify(se_DeleteAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -373,7 +309,7 @@ export const se_DeleteAgreementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAgreement"); let body: any; - body = JSON.stringify(se_DeleteAgreementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -386,7 +322,7 @@ export const se_DeleteCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteCertificate"); let body: any; - body = JSON.stringify(se_DeleteCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -399,7 +335,7 @@ export const se_DeleteConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnector"); let body: any; - body = JSON.stringify(se_DeleteConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -412,7 +348,7 @@ export const se_DeleteHostKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteHostKey"); let body: any; - body = JSON.stringify(se_DeleteHostKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -425,7 +361,7 @@ export const se_DeleteProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteProfile"); let body: any; - body = JSON.stringify(se_DeleteProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -438,7 +374,7 @@ export const se_DeleteServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteServer"); let body: any; - body = JSON.stringify(se_DeleteServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -451,7 +387,7 @@ export const se_DeleteSshPublicKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSshPublicKey"); let body: any; - body = JSON.stringify(se_DeleteSshPublicKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -464,7 +400,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -477,7 +413,7 @@ export const se_DeleteWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkflow"); let body: any; - body = JSON.stringify(se_DeleteWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -490,7 +426,7 @@ export const se_DescribeAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccess"); let body: any; - body = JSON.stringify(se_DescribeAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -503,7 +439,7 @@ export const se_DescribeAgreementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAgreement"); let body: any; - body = JSON.stringify(se_DescribeAgreementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,7 +452,7 @@ export const se_DescribeCertificateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeCertificate"); let body: any; - body = JSON.stringify(se_DescribeCertificateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -529,7 +465,7 @@ export const se_DescribeConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnector"); let body: any; - body = JSON.stringify(se_DescribeConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -542,7 +478,7 @@ export const se_DescribeExecutionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeExecution"); let body: any; - body = JSON.stringify(se_DescribeExecutionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -555,7 +491,7 @@ export const se_DescribeHostKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeHostKey"); let body: any; - body = JSON.stringify(se_DescribeHostKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -568,7 +504,7 @@ export const se_DescribeProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeProfile"); let body: any; - body = JSON.stringify(se_DescribeProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +517,7 @@ export const se_DescribeSecurityPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSecurityPolicy"); let body: any; - body = JSON.stringify(se_DescribeSecurityPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +530,7 @@ export const se_DescribeServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeServer"); let body: any; - body = JSON.stringify(se_DescribeServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +543,7 @@ export const se_DescribeUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUser"); let body: any; - body = JSON.stringify(se_DescribeUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +556,7 @@ export const se_DescribeWorkflowCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkflow"); let body: any; - body = JSON.stringify(se_DescribeWorkflowRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +582,7 @@ export const se_ImportHostKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportHostKey"); let body: any; - body = JSON.stringify(se_ImportHostKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +595,7 @@ export const se_ImportSshPublicKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportSshPublicKey"); let body: any; - body = JSON.stringify(se_ImportSshPublicKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -672,7 +608,7 @@ export const se_ListAccessesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccesses"); let body: any; - body = JSON.stringify(se_ListAccessesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +621,7 @@ export const se_ListAgreementsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAgreements"); let body: any; - body = JSON.stringify(se_ListAgreementsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +634,7 @@ export const se_ListCertificatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListCertificates"); let body: any; - body = JSON.stringify(se_ListCertificatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +647,7 @@ export const se_ListConnectorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListConnectors"); let body: any; - body = JSON.stringify(se_ListConnectorsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +660,7 @@ export const se_ListExecutionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListExecutions"); let body: any; - body = JSON.stringify(se_ListExecutionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -737,7 +673,7 @@ export const se_ListHostKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListHostKeys"); let body: any; - body = JSON.stringify(se_ListHostKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +686,7 @@ export const se_ListProfilesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListProfiles"); let body: any; - body = JSON.stringify(se_ListProfilesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -763,7 +699,7 @@ export const se_ListSecurityPoliciesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSecurityPolicies"); let body: any; - body = JSON.stringify(se_ListSecurityPoliciesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -776,7 +712,7 @@ export const se_ListServersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListServers"); let body: any; - body = JSON.stringify(se_ListServersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +725,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +738,7 @@ export const se_ListUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsers"); let body: any; - body = JSON.stringify(se_ListUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -815,7 +751,7 @@ export const se_ListWorkflowsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWorkflows"); let body: any; - body = JSON.stringify(se_ListWorkflowsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -828,7 +764,7 @@ export const se_SendWorkflowStepStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SendWorkflowStepState"); let body: any; - body = JSON.stringify(se_SendWorkflowStepStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -841,7 +777,7 @@ export const se_StartFileTransferCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartFileTransfer"); let body: any; - body = JSON.stringify(se_StartFileTransferRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -854,7 +790,7 @@ export const se_StartServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartServer"); let body: any; - body = JSON.stringify(se_StartServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -867,7 +803,7 @@ export const se_StopServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopServer"); let body: any; - body = JSON.stringify(se_StopServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -880,7 +816,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -893,7 +829,7 @@ export const se_TestIdentityProviderCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestIdentityProvider"); let body: any; - body = JSON.stringify(se_TestIdentityProviderRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -906,7 +842,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -919,7 +855,7 @@ export const se_UpdateAccessCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAccess"); let body: any; - body = JSON.stringify(se_UpdateAccessRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -932,7 +868,7 @@ export const se_UpdateAgreementCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAgreement"); let body: any; - body = JSON.stringify(se_UpdateAgreementRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -958,7 +894,7 @@ export const se_UpdateConnectorCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnector"); let body: any; - body = JSON.stringify(se_UpdateConnectorRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +907,7 @@ export const se_UpdateHostKeyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateHostKey"); let body: any; - body = JSON.stringify(se_UpdateHostKeyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +920,7 @@ export const se_UpdateProfileCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateProfile"); let body: any; - body = JSON.stringify(se_UpdateProfileRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -997,7 +933,7 @@ export const se_UpdateServerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateServer"); let body: any; - body = JSON.stringify(se_UpdateServerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1010,7 +946,7 @@ export const se_UpdateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateUser"); let body: any; - body = JSON.stringify(se_UpdateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1026,12 +962,12 @@ export const de_CreateAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAccessResponse(data, context); + contents = _json(data); const response: CreateAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1064,10 +1000,9 @@ const de_CreateAccessCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1085,12 +1020,12 @@ export const de_CreateAgreementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAgreementResponse(data, context); + contents = _json(data); const response: CreateAgreementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1126,10 +1061,9 @@ const de_CreateAgreementCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,12 +1081,12 @@ export const de_CreateConnectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConnectorResponse(data, context); + contents = _json(data); const response: CreateConnectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1188,10 +1122,9 @@ const de_CreateConnectorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1209,12 +1142,12 @@ export const de_CreateProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateProfileResponse(data, context); + contents = _json(data); const response: CreateProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1247,10 +1180,9 @@ const de_CreateProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1268,12 +1200,12 @@ export const de_CreateServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateServerResponse(data, context); + contents = _json(data); const response: CreateServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1312,10 +1244,9 @@ const de_CreateServerCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1333,12 +1264,12 @@ export const de_CreateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserResponse(data, context); + contents = _json(data); const response: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1371,10 +1302,9 @@ const de_CreateUserCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1392,12 +1322,12 @@ export const de_CreateWorkflowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkflowResponse(data, context); + contents = _json(data); const response: CreateWorkflowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1433,10 +1363,9 @@ const de_CreateWorkflowCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1456,7 +1385,7 @@ export const de_DeleteAccessCommand = async ( const response: DeleteAccessCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1486,10 +1415,9 @@ const de_DeleteAccessCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1509,7 +1437,7 @@ export const de_DeleteAgreementCommand = async ( const response: DeleteAgreementCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1539,10 +1467,9 @@ const de_DeleteAgreementCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1562,7 +1489,7 @@ export const de_DeleteCertificateCommand = async ( const response: DeleteCertificateCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1592,10 +1519,9 @@ const de_DeleteCertificateCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1615,7 +1541,7 @@ export const de_DeleteConnectorCommand = async ( const response: DeleteConnectorCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1645,10 +1571,9 @@ const de_DeleteConnectorCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1668,7 +1593,7 @@ export const de_DeleteHostKeyCommand = async ( const response: DeleteHostKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1701,10 +1626,9 @@ const de_DeleteHostKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1724,7 +1648,7 @@ export const de_DeleteProfileCommand = async ( const response: DeleteProfileCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1754,10 +1678,9 @@ const de_DeleteProfileCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1777,7 +1700,7 @@ export const de_DeleteServerCommand = async ( const response: DeleteServerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1810,10 +1733,9 @@ const de_DeleteServerCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1833,7 +1755,7 @@ export const de_DeleteSshPublicKeyCommand = async ( const response: DeleteSshPublicKeyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1866,10 +1788,9 @@ const de_DeleteSshPublicKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1889,7 +1810,7 @@ export const de_DeleteUserCommand = async ( const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1919,10 +1840,9 @@ const de_DeleteUserCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1942,7 +1862,7 @@ export const de_DeleteWorkflowCommand = async ( const response: DeleteWorkflowCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1975,10 +1895,9 @@ const de_DeleteWorkflowCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1996,12 +1915,12 @@ export const de_DescribeAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccessResponse(data, context); + contents = _json(data); const response: DescribeAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2031,10 +1950,9 @@ const de_DescribeAccessCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2052,12 +1970,12 @@ export const de_DescribeAgreementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAgreementResponse(data, context); + contents = _json(data); const response: DescribeAgreementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2087,10 +2005,9 @@ const de_DescribeAgreementCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2113,7 +2030,7 @@ export const de_DescribeCertificateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2143,10 +2060,9 @@ const de_DescribeCertificateCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2164,12 +2080,12 @@ export const de_DescribeConnectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConnectorResponse(data, context); + contents = _json(data); const response: DescribeConnectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2199,10 +2115,9 @@ const de_DescribeConnectorCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2220,12 +2135,12 @@ export const de_DescribeExecutionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeExecutionResponse(data, context); + contents = _json(data); const response: DescribeExecutionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2255,10 +2170,9 @@ const de_DescribeExecutionCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2281,7 +2195,7 @@ export const de_DescribeHostKeyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2311,10 +2225,9 @@ const de_DescribeHostKeyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2332,12 +2245,12 @@ export const de_DescribeProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeProfileResponse(data, context); + contents = _json(data); const response: DescribeProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2367,10 +2280,9 @@ const de_DescribeProfileCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2388,12 +2300,12 @@ export const de_DescribeSecurityPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeSecurityPolicyResponse(data, context); + contents = _json(data); const response: DescribeSecurityPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2423,10 +2335,9 @@ const de_DescribeSecurityPolicyCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2444,12 +2355,12 @@ export const de_DescribeServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeServerResponse(data, context); + contents = _json(data); const response: DescribeServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2479,10 +2390,9 @@ const de_DescribeServerCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,7 +2415,7 @@ export const de_DescribeUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2535,10 +2445,9 @@ const de_DescribeUserCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2556,12 +2465,12 @@ export const de_DescribeWorkflowCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeWorkflowResponse(data, context); + contents = _json(data); const response: DescribeWorkflowCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2591,10 +2500,9 @@ const de_DescribeWorkflowCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2612,12 +2520,12 @@ export const de_ImportCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportCertificateResponse(data, context); + contents = _json(data); const response: ImportCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2647,10 +2555,9 @@ const de_ImportCertificateCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2668,12 +2575,12 @@ export const de_ImportHostKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportHostKeyResponse(data, context); + contents = _json(data); const response: ImportHostKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2709,10 +2616,9 @@ const de_ImportHostKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2730,12 +2636,12 @@ export const de_ImportSshPublicKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportSshPublicKeyResponse(data, context); + contents = _json(data); const response: ImportSshPublicKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2771,10 +2677,9 @@ const de_ImportSshPublicKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2792,12 +2697,12 @@ export const de_ListAccessesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAccessesResponse(data, context); + contents = _json(data); const response: ListAccessesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2830,10 +2735,9 @@ const de_ListAccessesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2851,12 +2755,12 @@ export const de_ListAgreementsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAgreementsResponse(data, context); + contents = _json(data); const response: ListAgreementsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2889,10 +2793,9 @@ const de_ListAgreementsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2915,7 +2818,7 @@ export const de_ListCertificatesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2948,10 +2851,9 @@ const de_ListCertificatesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2969,12 +2871,12 @@ export const de_ListConnectorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListConnectorsResponse(data, context); + contents = _json(data); const response: ListConnectorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3007,10 +2909,9 @@ const de_ListConnectorsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3028,12 +2929,12 @@ export const de_ListExecutionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListExecutionsResponse(data, context); + contents = _json(data); const response: ListExecutionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3066,10 +2967,9 @@ const de_ListExecutionsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3092,7 +2992,7 @@ export const de_ListHostKeysCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3125,10 +3025,9 @@ const de_ListHostKeysCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3146,12 +3045,12 @@ export const de_ListProfilesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListProfilesResponse(data, context); + contents = _json(data); const response: ListProfilesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3184,10 +3083,9 @@ const de_ListProfilesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3205,12 +3103,12 @@ export const de_ListSecurityPoliciesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSecurityPoliciesResponse(data, context); + contents = _json(data); const response: ListSecurityPoliciesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3240,10 +3138,9 @@ const de_ListSecurityPoliciesCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3261,12 +3158,12 @@ export const de_ListServersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListServersResponse(data, context); + contents = _json(data); const response: ListServersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3296,10 +3193,9 @@ const de_ListServersCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3317,12 +3213,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3352,10 +3248,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3373,12 +3268,12 @@ export const de_ListUsersCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListUsersResponse(data, context); + contents = _json(data); const response: ListUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3411,10 +3306,9 @@ const de_ListUsersCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3432,12 +3326,12 @@ export const de_ListWorkflowsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListWorkflowsResponse(data, context); + contents = _json(data); const response: ListWorkflowsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3467,10 +3361,9 @@ const de_ListWorkflowsCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3488,12 +3381,12 @@ export const de_SendWorkflowStepStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SendWorkflowStepStateResponse(data, context); + contents = _json(data); const response: SendWorkflowStepStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3529,10 +3422,9 @@ const de_SendWorkflowStepStateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3550,12 +3442,12 @@ export const de_StartFileTransferCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartFileTransferResponse(data, context); + contents = _json(data); const response: StartFileTransferCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3588,10 +3480,9 @@ const de_StartFileTransferCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3611,7 +3502,7 @@ export const de_StartServerCommand = async ( const response: StartServerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3644,10 +3535,9 @@ const de_StartServerCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3667,7 +3557,7 @@ export const de_StopServerCommand = async ( const response: StopServerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3700,10 +3590,9 @@ const de_StopServerCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3723,7 +3612,7 @@ export const de_TagResourceCommand = async ( const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3753,10 +3642,9 @@ const de_TagResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3774,12 +3662,12 @@ export const de_TestIdentityProviderCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestIdentityProviderResponse(data, context); + contents = _json(data); const response: TestIdentityProviderCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3809,10 +3697,9 @@ const de_TestIdentityProviderCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3832,7 +3719,7 @@ export const de_UntagResourceCommand = async ( const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -3862,10 +3749,9 @@ const de_UntagResourceCommandError = async ( throw await de_ServiceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3883,12 +3769,12 @@ export const de_UpdateAccessCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAccessResponse(data, context); + contents = _json(data); const response: UpdateAccessCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3924,10 +3810,9 @@ const de_UpdateAccessCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3945,12 +3830,12 @@ export const de_UpdateAgreementCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAgreementResponse(data, context); + contents = _json(data); const response: UpdateAgreementCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3986,10 +3871,9 @@ const de_UpdateAgreementCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4007,12 +3891,12 @@ export const de_UpdateCertificateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateCertificateResponse(data, context); + contents = _json(data); const response: UpdateCertificateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4045,10 +3929,9 @@ const de_UpdateCertificateCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4066,12 +3949,12 @@ export const de_UpdateConnectorCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConnectorResponse(data, context); + contents = _json(data); const response: UpdateConnectorCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4107,10 +3990,9 @@ const de_UpdateConnectorCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4128,12 +4010,12 @@ export const de_UpdateHostKeyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateHostKeyResponse(data, context); + contents = _json(data); const response: UpdateHostKeyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4166,10 +4048,9 @@ const de_UpdateHostKeyCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4187,12 +4068,12 @@ export const de_UpdateProfileCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateProfileResponse(data, context); + contents = _json(data); const response: UpdateProfileCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4225,10 +4106,9 @@ const de_UpdateProfileCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4246,12 +4126,12 @@ export const de_UpdateServerCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateServerResponse(data, context); + contents = _json(data); const response: UpdateServerCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4293,10 +4173,9 @@ const de_UpdateServerCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4314,12 +4193,12 @@ export const de_UpdateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateUserResponse(data, context); + contents = _json(data); const response: UpdateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4352,10 +4231,9 @@ const de_UpdateUserCommandError = async ( throw await de_ThrottlingExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4369,7 +4247,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4382,7 +4260,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4398,7 +4276,7 @@ const de_InternalServiceErrorRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServiceError(body, context); + const deserialized: any = _json(body); const exception = new InternalServiceError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4414,7 +4292,7 @@ const de_InvalidNextTokenExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidNextTokenException(body, context); + const deserialized: any = _json(body); const exception = new InvalidNextTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4430,7 +4308,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4446,7 +4324,7 @@ const de_ResourceExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4462,7 +4340,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4478,7 +4356,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4491,7 +4369,7 @@ const de_ServiceUnavailableExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4499,2444 +4377,571 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1AddressAllocationIds - */ -const se_AddressAllocationIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AddressAllocationIds omitted. -/** - * serializeAws_json1_1As2ConnectorConfig - */ -const se_As2ConnectorConfig = (input: As2ConnectorConfig, context: __SerdeContext): any => { - return { - ...(input.Compression != null && { Compression: input.Compression }), - ...(input.EncryptionAlgorithm != null && { EncryptionAlgorithm: input.EncryptionAlgorithm }), - ...(input.LocalProfileId != null && { LocalProfileId: input.LocalProfileId }), - ...(input.MdnResponse != null && { MdnResponse: input.MdnResponse }), - ...(input.MdnSigningAlgorithm != null && { MdnSigningAlgorithm: input.MdnSigningAlgorithm }), - ...(input.MessageSubject != null && { MessageSubject: input.MessageSubject }), - ...(input.PartnerProfileId != null && { PartnerProfileId: input.PartnerProfileId }), - ...(input.SigningAlgorithm != null && { SigningAlgorithm: input.SigningAlgorithm }), - }; -}; +// se_As2ConnectorConfig omitted. -/** - * serializeAws_json1_1As2Transports - */ -const se_As2Transports = (input: (As2Transport | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_As2Transports omitted. -/** - * serializeAws_json1_1CertificateIds - */ -const se_CertificateIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CertificateIds omitted. -/** - * serializeAws_json1_1CopyStepDetails - */ -const se_CopyStepDetails = (input: CopyStepDetails, context: __SerdeContext): any => { - return { - ...(input.DestinationFileLocation != null && { - DestinationFileLocation: se_InputFileLocation(input.DestinationFileLocation, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OverwriteExisting != null && { OverwriteExisting: input.OverwriteExisting }), - ...(input.SourceFileLocation != null && { SourceFileLocation: input.SourceFileLocation }), - }; -}; +// se_CopyStepDetails omitted. -/** - * serializeAws_json1_1CreateAccessRequest - */ -const se_CreateAccessRequest = (input: CreateAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.HomeDirectory != null && { HomeDirectory: input.HomeDirectory }), - ...(input.HomeDirectoryMappings != null && { - HomeDirectoryMappings: se_HomeDirectoryMappings(input.HomeDirectoryMappings, context), - }), - ...(input.HomeDirectoryType != null && { HomeDirectoryType: input.HomeDirectoryType }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.PosixProfile != null && { PosixProfile: se_PosixProfile(input.PosixProfile, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_CreateAccessRequest omitted. -/** - * serializeAws_json1_1CreateAgreementRequest - */ -const se_CreateAgreementRequest = (input: CreateAgreementRequest, context: __SerdeContext): any => { - return { - ...(input.AccessRole != null && { AccessRole: input.AccessRole }), - ...(input.BaseDirectory != null && { BaseDirectory: input.BaseDirectory }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LocalProfileId != null && { LocalProfileId: input.LocalProfileId }), - ...(input.PartnerProfileId != null && { PartnerProfileId: input.PartnerProfileId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateAgreementRequest omitted. -/** - * serializeAws_json1_1CreateConnectorRequest - */ -const se_CreateConnectorRequest = (input: CreateConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.AccessRole != null && { AccessRole: input.AccessRole }), - ...(input.As2Config != null && { As2Config: se_As2ConnectorConfig(input.As2Config, context) }), - ...(input.LoggingRole != null && { LoggingRole: input.LoggingRole }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_CreateConnectorRequest omitted. -/** - * serializeAws_json1_1CreateProfileRequest - */ -const se_CreateProfileRequest = (input: CreateProfileRequest, context: __SerdeContext): any => { - return { - ...(input.As2Id != null && { As2Id: input.As2Id }), - ...(input.CertificateIds != null && { CertificateIds: se_CertificateIds(input.CertificateIds, context) }), - ...(input.ProfileType != null && { ProfileType: input.ProfileType }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateProfileRequest omitted. -/** - * serializeAws_json1_1CreateServerRequest - */ -const se_CreateServerRequest = (input: CreateServerRequest, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.Domain != null && { Domain: input.Domain }), - ...(input.EndpointDetails != null && { EndpointDetails: se_EndpointDetails(input.EndpointDetails, context) }), - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.HostKey != null && { HostKey: input.HostKey }), - ...(input.IdentityProviderDetails != null && { - IdentityProviderDetails: se_IdentityProviderDetails(input.IdentityProviderDetails, context), - }), - ...(input.IdentityProviderType != null && { IdentityProviderType: input.IdentityProviderType }), - ...(input.LoggingRole != null && { LoggingRole: input.LoggingRole }), - ...(input.PostAuthenticationLoginBanner != null && { - PostAuthenticationLoginBanner: input.PostAuthenticationLoginBanner, - }), - ...(input.PreAuthenticationLoginBanner != null && { - PreAuthenticationLoginBanner: input.PreAuthenticationLoginBanner, - }), - ...(input.ProtocolDetails != null && { ProtocolDetails: se_ProtocolDetails(input.ProtocolDetails, context) }), - ...(input.Protocols != null && { Protocols: se_Protocols(input.Protocols, context) }), - ...(input.SecurityPolicyName != null && { SecurityPolicyName: input.SecurityPolicyName }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.WorkflowDetails != null && { WorkflowDetails: se_WorkflowDetails(input.WorkflowDetails, context) }), - }; -}; +// se_CreateServerRequest omitted. -/** - * serializeAws_json1_1CreateUserRequest - */ -const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { - return { - ...(input.HomeDirectory != null && { HomeDirectory: input.HomeDirectory }), - ...(input.HomeDirectoryMappings != null && { - HomeDirectoryMappings: se_HomeDirectoryMappings(input.HomeDirectoryMappings, context), - }), - ...(input.HomeDirectoryType != null && { HomeDirectoryType: input.HomeDirectoryType }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.PosixProfile != null && { PosixProfile: se_PosixProfile(input.PosixProfile, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.SshPublicKeyBody != null && { SshPublicKeyBody: input.SshPublicKeyBody }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_CreateUserRequest omitted. -/** - * serializeAws_json1_1CreateWorkflowRequest - */ -const se_CreateWorkflowRequest = (input: CreateWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.OnExceptionSteps != null && { OnExceptionSteps: se_WorkflowSteps(input.OnExceptionSteps, context) }), - ...(input.Steps != null && { Steps: se_WorkflowSteps(input.Steps, context) }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_CreateWorkflowRequest omitted. -/** - * serializeAws_json1_1CustomStepDetails - */ -const se_CustomStepDetails = (input: CustomStepDetails, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SourceFileLocation != null && { SourceFileLocation: input.SourceFileLocation }), - ...(input.Target != null && { Target: input.Target }), - ...(input.TimeoutSeconds != null && { TimeoutSeconds: input.TimeoutSeconds }), - }; -}; +// se_CustomStepDetails omitted. -/** - * serializeAws_json1_1DecryptStepDetails - */ -const se_DecryptStepDetails = (input: DecryptStepDetails, context: __SerdeContext): any => { - return { - ...(input.DestinationFileLocation != null && { - DestinationFileLocation: se_InputFileLocation(input.DestinationFileLocation, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OverwriteExisting != null && { OverwriteExisting: input.OverwriteExisting }), - ...(input.SourceFileLocation != null && { SourceFileLocation: input.SourceFileLocation }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_DecryptStepDetails omitted. -/** - * serializeAws_json1_1DeleteAccessRequest - */ -const se_DeleteAccessRequest = (input: DeleteAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DeleteAccessRequest omitted. -/** - * serializeAws_json1_1DeleteAgreementRequest - */ -const se_DeleteAgreementRequest = (input: DeleteAgreementRequest, context: __SerdeContext): any => { - return { - ...(input.AgreementId != null && { AgreementId: input.AgreementId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DeleteAgreementRequest omitted. -/** - * serializeAws_json1_1DeleteCertificateRequest - */ -const se_DeleteCertificateRequest = (input: DeleteCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateId != null && { CertificateId: input.CertificateId }), - }; -}; +// se_DeleteCertificateRequest omitted. -/** - * serializeAws_json1_1DeleteConnectorRequest - */ -const se_DeleteConnectorRequest = (input: DeleteConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectorId != null && { ConnectorId: input.ConnectorId }), - }; -}; +// se_DeleteConnectorRequest omitted. -/** - * serializeAws_json1_1DeleteHostKeyRequest - */ -const se_DeleteHostKeyRequest = (input: DeleteHostKeyRequest, context: __SerdeContext): any => { - return { - ...(input.HostKeyId != null && { HostKeyId: input.HostKeyId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DeleteHostKeyRequest omitted. -/** - * serializeAws_json1_1DeleteProfileRequest - */ -const se_DeleteProfileRequest = (input: DeleteProfileRequest, context: __SerdeContext): any => { - return { - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - }; -}; +// se_DeleteProfileRequest omitted. -/** - * serializeAws_json1_1DeleteServerRequest - */ -const se_DeleteServerRequest = (input: DeleteServerRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DeleteServerRequest omitted. -/** - * serializeAws_json1_1DeleteSshPublicKeyRequest - */ -const se_DeleteSshPublicKeyRequest = (input: DeleteSshPublicKeyRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.SshPublicKeyId != null && { SshPublicKeyId: input.SshPublicKeyId }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DeleteSshPublicKeyRequest omitted. -/** - * serializeAws_json1_1DeleteStepDetails - */ -const se_DeleteStepDetails = (input: DeleteStepDetails, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SourceFileLocation != null && { SourceFileLocation: input.SourceFileLocation }), - }; -}; +// se_DeleteStepDetails omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DeleteWorkflowRequest - */ -const se_DeleteWorkflowRequest = (input: DeleteWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.WorkflowId != null && { WorkflowId: input.WorkflowId }), - }; -}; +// se_DeleteWorkflowRequest omitted. -/** - * serializeAws_json1_1DescribeAccessRequest - */ -const se_DescribeAccessRequest = (input: DescribeAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DescribeAccessRequest omitted. -/** - * serializeAws_json1_1DescribeAgreementRequest - */ -const se_DescribeAgreementRequest = (input: DescribeAgreementRequest, context: __SerdeContext): any => { - return { - ...(input.AgreementId != null && { AgreementId: input.AgreementId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DescribeAgreementRequest omitted. -/** - * serializeAws_json1_1DescribeCertificateRequest - */ -const se_DescribeCertificateRequest = (input: DescribeCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateId != null && { CertificateId: input.CertificateId }), - }; -}; +// se_DescribeCertificateRequest omitted. -/** - * serializeAws_json1_1DescribeConnectorRequest - */ -const se_DescribeConnectorRequest = (input: DescribeConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectorId != null && { ConnectorId: input.ConnectorId }), - }; -}; +// se_DescribeConnectorRequest omitted. -/** - * serializeAws_json1_1DescribeExecutionRequest - */ -const se_DescribeExecutionRequest = (input: DescribeExecutionRequest, context: __SerdeContext): any => { - return { - ...(input.ExecutionId != null && { ExecutionId: input.ExecutionId }), - ...(input.WorkflowId != null && { WorkflowId: input.WorkflowId }), - }; -}; +// se_DescribeExecutionRequest omitted. -/** - * serializeAws_json1_1DescribeHostKeyRequest - */ -const se_DescribeHostKeyRequest = (input: DescribeHostKeyRequest, context: __SerdeContext): any => { - return { - ...(input.HostKeyId != null && { HostKeyId: input.HostKeyId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DescribeHostKeyRequest omitted. -/** - * serializeAws_json1_1DescribeProfileRequest - */ -const se_DescribeProfileRequest = (input: DescribeProfileRequest, context: __SerdeContext): any => { - return { - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - }; -}; +// se_DescribeProfileRequest omitted. -/** - * serializeAws_json1_1DescribeSecurityPolicyRequest - */ -const se_DescribeSecurityPolicyRequest = (input: DescribeSecurityPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.SecurityPolicyName != null && { SecurityPolicyName: input.SecurityPolicyName }), - }; -}; +// se_DescribeSecurityPolicyRequest omitted. -/** - * serializeAws_json1_1DescribeServerRequest - */ -const se_DescribeServerRequest = (input: DescribeServerRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_DescribeServerRequest omitted. -/** - * serializeAws_json1_1DescribeUserRequest - */ -const se_DescribeUserRequest = (input: DescribeUserRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_DescribeUserRequest omitted. -/** - * serializeAws_json1_1DescribeWorkflowRequest - */ -const se_DescribeWorkflowRequest = (input: DescribeWorkflowRequest, context: __SerdeContext): any => { - return { - ...(input.WorkflowId != null && { WorkflowId: input.WorkflowId }), - }; -}; +// se_DescribeWorkflowRequest omitted. -/** - * serializeAws_json1_1EfsFileLocation - */ -const se_EfsFileLocation = (input: EfsFileLocation, context: __SerdeContext): any => { - return { - ...(input.FileSystemId != null && { FileSystemId: input.FileSystemId }), - ...(input.Path != null && { Path: input.Path }), - }; -}; +// se_EfsFileLocation omitted. -/** - * serializeAws_json1_1EndpointDetails - */ -const se_EndpointDetails = (input: EndpointDetails, context: __SerdeContext): any => { - return { - ...(input.AddressAllocationIds != null && { - AddressAllocationIds: se_AddressAllocationIds(input.AddressAllocationIds, context), - }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.VpcEndpointId != null && { VpcEndpointId: input.VpcEndpointId }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }; -}; +// se_EndpointDetails omitted. -/** - * serializeAws_json1_1FilePaths - */ -const se_FilePaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FilePaths omitted. -/** - * serializeAws_json1_1HomeDirectoryMapEntry - */ -const se_HomeDirectoryMapEntry = (input: HomeDirectoryMapEntry, context: __SerdeContext): any => { - return { - ...(input.Entry != null && { Entry: input.Entry }), - ...(input.Target != null && { Target: input.Target }), - }; -}; +// se_HomeDirectoryMapEntry omitted. -/** - * serializeAws_json1_1HomeDirectoryMappings - */ -const se_HomeDirectoryMappings = (input: HomeDirectoryMapEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HomeDirectoryMapEntry(entry, context); - }); -}; +// se_HomeDirectoryMappings omitted. -/** - * serializeAws_json1_1IdentityProviderDetails - */ -const se_IdentityProviderDetails = (input: IdentityProviderDetails, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Function != null && { Function: input.Function }), - ...(input.InvocationRole != null && { InvocationRole: input.InvocationRole }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_IdentityProviderDetails omitted. /** * serializeAws_json1_1ImportCertificateRequest */ const se_ImportCertificateRequest = (input: ImportCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.ActiveDate != null && { ActiveDate: Math.round(input.ActiveDate.getTime() / 1000) }), - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.CertificateChain != null && { CertificateChain: input.CertificateChain }), - ...(input.Description != null && { Description: input.Description }), - ...(input.InactiveDate != null && { InactiveDate: Math.round(input.InactiveDate.getTime() / 1000) }), - ...(input.PrivateKey != null && { PrivateKey: input.PrivateKey }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - ...(input.Usage != null && { Usage: input.Usage }), - }; + return take(input, { + ActiveDate: (_) => Math.round(_.getTime() / 1000), + Certificate: [], + CertificateChain: [], + Description: [], + InactiveDate: (_) => Math.round(_.getTime() / 1000), + PrivateKey: [], + Tags: _json, + Usage: [], + }); }; -/** - * serializeAws_json1_1ImportHostKeyRequest - */ -const se_ImportHostKeyRequest = (input: ImportHostKeyRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.HostKeyBody != null && { HostKeyBody: input.HostKeyBody }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_ImportHostKeyRequest omitted. -/** - * serializeAws_json1_1ImportSshPublicKeyRequest - */ -const se_ImportSshPublicKeyRequest = (input: ImportSshPublicKeyRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.SshPublicKeyBody != null && { SshPublicKeyBody: input.SshPublicKeyBody }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_ImportSshPublicKeyRequest omitted. -/** - * serializeAws_json1_1InputFileLocation - */ -const se_InputFileLocation = (input: InputFileLocation, context: __SerdeContext): any => { - return { - ...(input.EfsFileLocation != null && { EfsFileLocation: se_EfsFileLocation(input.EfsFileLocation, context) }), - ...(input.S3FileLocation != null && { S3FileLocation: se_S3InputFileLocation(input.S3FileLocation, context) }), - }; -}; +// se_InputFileLocation omitted. -/** - * serializeAws_json1_1ListAccessesRequest - */ -const se_ListAccessesRequest = (input: ListAccessesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_ListAccessesRequest omitted. -/** - * serializeAws_json1_1ListAgreementsRequest - */ -const se_ListAgreementsRequest = (input: ListAgreementsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_ListAgreementsRequest omitted. -/** - * serializeAws_json1_1ListCertificatesRequest - */ -const se_ListCertificatesRequest = (input: ListCertificatesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListCertificatesRequest omitted. -/** - * serializeAws_json1_1ListConnectorsRequest - */ -const se_ListConnectorsRequest = (input: ListConnectorsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListConnectorsRequest omitted. -/** - * serializeAws_json1_1ListExecutionsRequest - */ -const se_ListExecutionsRequest = (input: ListExecutionsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkflowId != null && { WorkflowId: input.WorkflowId }), - }; -}; +// se_ListExecutionsRequest omitted. -/** - * serializeAws_json1_1ListHostKeysRequest - */ -const se_ListHostKeysRequest = (input: ListHostKeysRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_ListHostKeysRequest omitted. -/** - * serializeAws_json1_1ListProfilesRequest - */ -const se_ListProfilesRequest = (input: ListProfilesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ProfileType != null && { ProfileType: input.ProfileType }), - }; -}; +// se_ListProfilesRequest omitted. -/** - * serializeAws_json1_1ListSecurityPoliciesRequest - */ -const se_ListSecurityPoliciesRequest = (input: ListSecurityPoliciesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListSecurityPoliciesRequest omitted. -/** - * serializeAws_json1_1ListServersRequest - */ -const se_ListServersRequest = (input: ListServersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListServersRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListUsersRequest - */ -const se_ListUsersRequest = (input: ListUsersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_ListUsersRequest omitted. -/** - * serializeAws_json1_1ListWorkflowsRequest - */ -const se_ListWorkflowsRequest = (input: ListWorkflowsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWorkflowsRequest omitted. -/** - * serializeAws_json1_1OnPartialUploadWorkflowDetails - */ -const se_OnPartialUploadWorkflowDetails = (input: WorkflowDetail[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WorkflowDetail(entry, context); - }); -}; +// se_OnPartialUploadWorkflowDetails omitted. -/** - * serializeAws_json1_1OnUploadWorkflowDetails - */ -const se_OnUploadWorkflowDetails = (input: WorkflowDetail[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WorkflowDetail(entry, context); - }); -}; +// se_OnUploadWorkflowDetails omitted. -/** - * serializeAws_json1_1PosixProfile - */ -const se_PosixProfile = (input: PosixProfile, context: __SerdeContext): any => { - return { - ...(input.Gid != null && { Gid: input.Gid }), - ...(input.SecondaryGids != null && { SecondaryGids: se_SecondaryGids(input.SecondaryGids, context) }), - ...(input.Uid != null && { Uid: input.Uid }), - }; -}; +// se_PosixProfile omitted. -/** - * serializeAws_json1_1ProtocolDetails - */ -const se_ProtocolDetails = (input: ProtocolDetails, context: __SerdeContext): any => { - return { - ...(input.As2Transports != null && { As2Transports: se_As2Transports(input.As2Transports, context) }), - ...(input.PassiveIp != null && { PassiveIp: input.PassiveIp }), - ...(input.SetStatOption != null && { SetStatOption: input.SetStatOption }), - ...(input.TlsSessionResumptionMode != null && { TlsSessionResumptionMode: input.TlsSessionResumptionMode }), - }; -}; +// se_ProtocolDetails omitted. -/** - * serializeAws_json1_1Protocols - */ -const se_Protocols = (input: (Protocol | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Protocols omitted. -/** - * serializeAws_json1_1S3InputFileLocation - */ -const se_S3InputFileLocation = (input: S3InputFileLocation, context: __SerdeContext): any => { - return { - ...(input.Bucket != null && { Bucket: input.Bucket }), - ...(input.Key != null && { Key: input.Key }), - }; -}; +// se_S3InputFileLocation omitted. -/** - * serializeAws_json1_1S3Tag - */ -const se_S3Tag = (input: S3Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_S3Tag omitted. -/** - * serializeAws_json1_1S3Tags - */ -const se_S3Tags = (input: S3Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_S3Tag(entry, context); - }); -}; +// se_S3Tags omitted. -/** - * serializeAws_json1_1SecondaryGids - */ -const se_SecondaryGids = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecondaryGids omitted. -/** - * serializeAws_json1_1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_json1_1SendWorkflowStepStateRequest - */ -const se_SendWorkflowStepStateRequest = (input: SendWorkflowStepStateRequest, context: __SerdeContext): any => { - return { - ...(input.ExecutionId != null && { ExecutionId: input.ExecutionId }), - ...(input.Status != null && { Status: input.Status }), - ...(input.Token != null && { Token: input.Token }), - ...(input.WorkflowId != null && { WorkflowId: input.WorkflowId }), - }; -}; +// se_SendWorkflowStepStateRequest omitted. -/** - * serializeAws_json1_1StartFileTransferRequest - */ -const se_StartFileTransferRequest = (input: StartFileTransferRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectorId != null && { ConnectorId: input.ConnectorId }), - ...(input.SendFilePaths != null && { SendFilePaths: se_FilePaths(input.SendFilePaths, context) }), - }; -}; +// se_StartFileTransferRequest omitted. -/** - * serializeAws_json1_1StartServerRequest - */ -const se_StartServerRequest = (input: StartServerRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_StartServerRequest omitted. -/** - * serializeAws_json1_1StopServerRequest - */ -const se_StopServerRequest = (input: StopServerRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_StopServerRequest omitted. -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeys - */ -const se_TagKeys = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeys omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1Tags - */ -const se_Tags = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_Tags omitted. -/** - * serializeAws_json1_1TagStepDetails - */ -const se_TagStepDetails = (input: TagStepDetails, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.SourceFileLocation != null && { SourceFileLocation: input.SourceFileLocation }), - ...(input.Tags != null && { Tags: se_S3Tags(input.Tags, context) }), - }; -}; +// se_TagStepDetails omitted. -/** - * serializeAws_json1_1TestIdentityProviderRequest - */ -const se_TestIdentityProviderRequest = (input: TestIdentityProviderRequest, context: __SerdeContext): any => { - return { - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.ServerProtocol != null && { ServerProtocol: input.ServerProtocol }), - ...(input.SourceIp != null && { SourceIp: input.SourceIp }), - ...(input.UserName != null && { UserName: input.UserName }), - ...(input.UserPassword != null && { UserPassword: input.UserPassword }), - }; -}; +// se_TestIdentityProviderRequest omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Arn != null && { Arn: input.Arn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_1UpdateAccessRequest - */ -const se_UpdateAccessRequest = (input: UpdateAccessRequest, context: __SerdeContext): any => { - return { - ...(input.ExternalId != null && { ExternalId: input.ExternalId }), - ...(input.HomeDirectory != null && { HomeDirectory: input.HomeDirectory }), - ...(input.HomeDirectoryMappings != null && { - HomeDirectoryMappings: se_HomeDirectoryMappings(input.HomeDirectoryMappings, context), - }), - ...(input.HomeDirectoryType != null && { HomeDirectoryType: input.HomeDirectoryType }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.PosixProfile != null && { PosixProfile: se_PosixProfile(input.PosixProfile, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_UpdateAccessRequest omitted. -/** - * serializeAws_json1_1UpdateAgreementRequest - */ -const se_UpdateAgreementRequest = (input: UpdateAgreementRequest, context: __SerdeContext): any => { - return { - ...(input.AccessRole != null && { AccessRole: input.AccessRole }), - ...(input.AgreementId != null && { AgreementId: input.AgreementId }), - ...(input.BaseDirectory != null && { BaseDirectory: input.BaseDirectory }), - ...(input.Description != null && { Description: input.Description }), - ...(input.LocalProfileId != null && { LocalProfileId: input.LocalProfileId }), - ...(input.PartnerProfileId != null && { PartnerProfileId: input.PartnerProfileId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_UpdateAgreementRequest omitted. /** * serializeAws_json1_1UpdateCertificateRequest */ const se_UpdateCertificateRequest = (input: UpdateCertificateRequest, context: __SerdeContext): any => { - return { - ...(input.ActiveDate != null && { ActiveDate: Math.round(input.ActiveDate.getTime() / 1000) }), - ...(input.CertificateId != null && { CertificateId: input.CertificateId }), - ...(input.Description != null && { Description: input.Description }), - ...(input.InactiveDate != null && { InactiveDate: Math.round(input.InactiveDate.getTime() / 1000) }), - }; + return take(input, { + ActiveDate: (_) => Math.round(_.getTime() / 1000), + CertificateId: [], + Description: [], + InactiveDate: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1UpdateConnectorRequest - */ -const se_UpdateConnectorRequest = (input: UpdateConnectorRequest, context: __SerdeContext): any => { - return { - ...(input.AccessRole != null && { AccessRole: input.AccessRole }), - ...(input.As2Config != null && { As2Config: se_As2ConnectorConfig(input.As2Config, context) }), - ...(input.ConnectorId != null && { ConnectorId: input.ConnectorId }), - ...(input.LoggingRole != null && { LoggingRole: input.LoggingRole }), - ...(input.Url != null && { Url: input.Url }), - }; -}; +// se_UpdateConnectorRequest omitted. -/** - * serializeAws_json1_1UpdateHostKeyRequest - */ -const se_UpdateHostKeyRequest = (input: UpdateHostKeyRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.HostKeyId != null && { HostKeyId: input.HostKeyId }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - }; -}; +// se_UpdateHostKeyRequest omitted. -/** - * serializeAws_json1_1UpdateProfileRequest - */ -const se_UpdateProfileRequest = (input: UpdateProfileRequest, context: __SerdeContext): any => { - return { - ...(input.CertificateIds != null && { CertificateIds: se_CertificateIds(input.CertificateIds, context) }), - ...(input.ProfileId != null && { ProfileId: input.ProfileId }), - }; -}; +// se_UpdateProfileRequest omitted. -/** - * serializeAws_json1_1UpdateServerRequest - */ -const se_UpdateServerRequest = (input: UpdateServerRequest, context: __SerdeContext): any => { - return { - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.EndpointDetails != null && { EndpointDetails: se_EndpointDetails(input.EndpointDetails, context) }), - ...(input.EndpointType != null && { EndpointType: input.EndpointType }), - ...(input.HostKey != null && { HostKey: input.HostKey }), - ...(input.IdentityProviderDetails != null && { - IdentityProviderDetails: se_IdentityProviderDetails(input.IdentityProviderDetails, context), - }), - ...(input.LoggingRole != null && { LoggingRole: input.LoggingRole }), - ...(input.PostAuthenticationLoginBanner != null && { - PostAuthenticationLoginBanner: input.PostAuthenticationLoginBanner, - }), - ...(input.PreAuthenticationLoginBanner != null && { - PreAuthenticationLoginBanner: input.PreAuthenticationLoginBanner, - }), - ...(input.ProtocolDetails != null && { ProtocolDetails: se_ProtocolDetails(input.ProtocolDetails, context) }), - ...(input.Protocols != null && { Protocols: se_Protocols(input.Protocols, context) }), - ...(input.SecurityPolicyName != null && { SecurityPolicyName: input.SecurityPolicyName }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.WorkflowDetails != null && { WorkflowDetails: se_WorkflowDetails(input.WorkflowDetails, context) }), - }; -}; +// se_UpdateServerRequest omitted. -/** - * serializeAws_json1_1UpdateUserRequest - */ -const se_UpdateUserRequest = (input: UpdateUserRequest, context: __SerdeContext): any => { - return { - ...(input.HomeDirectory != null && { HomeDirectory: input.HomeDirectory }), - ...(input.HomeDirectoryMappings != null && { - HomeDirectoryMappings: se_HomeDirectoryMappings(input.HomeDirectoryMappings, context), - }), - ...(input.HomeDirectoryType != null && { HomeDirectoryType: input.HomeDirectoryType }), - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.PosixProfile != null && { PosixProfile: se_PosixProfile(input.PosixProfile, context) }), - ...(input.Role != null && { Role: input.Role }), - ...(input.ServerId != null && { ServerId: input.ServerId }), - ...(input.UserName != null && { UserName: input.UserName }), - }; -}; +// se_UpdateUserRequest omitted. -/** - * serializeAws_json1_1WorkflowDetail - */ -const se_WorkflowDetail = (input: WorkflowDetail, context: __SerdeContext): any => { - return { - ...(input.ExecutionRole != null && { ExecutionRole: input.ExecutionRole }), - ...(input.WorkflowId != null && { WorkflowId: input.WorkflowId }), - }; -}; +// se_WorkflowDetail omitted. -/** - * serializeAws_json1_1WorkflowDetails - */ -const se_WorkflowDetails = (input: WorkflowDetails, context: __SerdeContext): any => { - return { - ...(input.OnPartialUpload != null && { - OnPartialUpload: se_OnPartialUploadWorkflowDetails(input.OnPartialUpload, context), - }), - ...(input.OnUpload != null && { OnUpload: se_OnUploadWorkflowDetails(input.OnUpload, context) }), - }; -}; +// se_WorkflowDetails omitted. -/** - * serializeAws_json1_1WorkflowStep - */ -const se_WorkflowStep = (input: WorkflowStep, context: __SerdeContext): any => { - return { - ...(input.CopyStepDetails != null && { CopyStepDetails: se_CopyStepDetails(input.CopyStepDetails, context) }), - ...(input.CustomStepDetails != null && { - CustomStepDetails: se_CustomStepDetails(input.CustomStepDetails, context), - }), - ...(input.DecryptStepDetails != null && { - DecryptStepDetails: se_DecryptStepDetails(input.DecryptStepDetails, context), - }), - ...(input.DeleteStepDetails != null && { - DeleteStepDetails: se_DeleteStepDetails(input.DeleteStepDetails, context), - }), - ...(input.TagStepDetails != null && { TagStepDetails: se_TagStepDetails(input.TagStepDetails, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_WorkflowStep omitted. -/** - * serializeAws_json1_1WorkflowSteps - */ -const se_WorkflowSteps = (input: WorkflowStep[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WorkflowStep(entry, context); - }); -}; +// se_WorkflowSteps omitted. -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. -/** - * deserializeAws_json1_1AddressAllocationIds - */ -const de_AddressAllocationIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AddressAllocationIds omitted. -/** - * deserializeAws_json1_1As2ConnectorConfig - */ -const de_As2ConnectorConfig = (output: any, context: __SerdeContext): As2ConnectorConfig => { - return { - Compression: __expectString(output.Compression), - EncryptionAlgorithm: __expectString(output.EncryptionAlgorithm), - LocalProfileId: __expectString(output.LocalProfileId), - MdnResponse: __expectString(output.MdnResponse), - MdnSigningAlgorithm: __expectString(output.MdnSigningAlgorithm), - MessageSubject: __expectString(output.MessageSubject), - PartnerProfileId: __expectString(output.PartnerProfileId), - SigningAlgorithm: __expectString(output.SigningAlgorithm), - } as any; -}; +// de_As2ConnectorConfig omitted. -/** - * deserializeAws_json1_1As2Transports - */ -const de_As2Transports = (output: any, context: __SerdeContext): (As2Transport | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_As2Transports omitted. -/** - * deserializeAws_json1_1CertificateIds - */ -const de_CertificateIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_CertificateIds omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1CopyStepDetails - */ -const de_CopyStepDetails = (output: any, context: __SerdeContext): CopyStepDetails => { - return { - DestinationFileLocation: - output.DestinationFileLocation != null - ? de_InputFileLocation(output.DestinationFileLocation, context) - : undefined, - Name: __expectString(output.Name), - OverwriteExisting: __expectString(output.OverwriteExisting), - SourceFileLocation: __expectString(output.SourceFileLocation), - } as any; -}; +// de_CopyStepDetails omitted. -/** - * deserializeAws_json1_1CreateAccessResponse - */ -const de_CreateAccessResponse = (output: any, context: __SerdeContext): CreateAccessResponse => { - return { - ExternalId: __expectString(output.ExternalId), - ServerId: __expectString(output.ServerId), - } as any; -}; +// de_CreateAccessResponse omitted. -/** - * deserializeAws_json1_1CreateAgreementResponse - */ -const de_CreateAgreementResponse = (output: any, context: __SerdeContext): CreateAgreementResponse => { - return { - AgreementId: __expectString(output.AgreementId), - } as any; -}; +// de_CreateAgreementResponse omitted. -/** - * deserializeAws_json1_1CreateConnectorResponse - */ -const de_CreateConnectorResponse = (output: any, context: __SerdeContext): CreateConnectorResponse => { - return { - ConnectorId: __expectString(output.ConnectorId), - } as any; -}; +// de_CreateConnectorResponse omitted. -/** - * deserializeAws_json1_1CreateProfileResponse - */ -const de_CreateProfileResponse = (output: any, context: __SerdeContext): CreateProfileResponse => { - return { - ProfileId: __expectString(output.ProfileId), - } as any; -}; +// de_CreateProfileResponse omitted. -/** - * deserializeAws_json1_1CreateServerResponse - */ -const de_CreateServerResponse = (output: any, context: __SerdeContext): CreateServerResponse => { - return { - ServerId: __expectString(output.ServerId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateUserResponse - */ -const de_CreateUserResponse = (output: any, context: __SerdeContext): CreateUserResponse => { - return { - ServerId: __expectString(output.ServerId), - UserName: __expectString(output.UserName), - } as any; -}; - -/** - * deserializeAws_json1_1CreateWorkflowResponse - */ -const de_CreateWorkflowResponse = (output: any, context: __SerdeContext): CreateWorkflowResponse => { - return { - WorkflowId: __expectString(output.WorkflowId), - } as any; -}; - -/** - * deserializeAws_json1_1CustomStepDetails - */ -const de_CustomStepDetails = (output: any, context: __SerdeContext): CustomStepDetails => { - return { - Name: __expectString(output.Name), - SourceFileLocation: __expectString(output.SourceFileLocation), - Target: __expectString(output.Target), - TimeoutSeconds: __expectInt32(output.TimeoutSeconds), - } as any; -}; - -/** - * deserializeAws_json1_1DecryptStepDetails - */ -const de_DecryptStepDetails = (output: any, context: __SerdeContext): DecryptStepDetails => { - return { - DestinationFileLocation: - output.DestinationFileLocation != null - ? de_InputFileLocation(output.DestinationFileLocation, context) - : undefined, - Name: __expectString(output.Name), - OverwriteExisting: __expectString(output.OverwriteExisting), - SourceFileLocation: __expectString(output.SourceFileLocation), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteStepDetails - */ -const de_DeleteStepDetails = (output: any, context: __SerdeContext): DeleteStepDetails => { - return { - Name: __expectString(output.Name), - SourceFileLocation: __expectString(output.SourceFileLocation), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAccessResponse - */ -const de_DescribeAccessResponse = (output: any, context: __SerdeContext): DescribeAccessResponse => { - return { - Access: output.Access != null ? de_DescribedAccess(output.Access, context) : undefined, - ServerId: __expectString(output.ServerId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAgreementResponse - */ -const de_DescribeAgreementResponse = (output: any, context: __SerdeContext): DescribeAgreementResponse => { - return { - Agreement: output.Agreement != null ? de_DescribedAgreement(output.Agreement, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeCertificateResponse - */ -const de_DescribeCertificateResponse = (output: any, context: __SerdeContext): DescribeCertificateResponse => { - return { - Certificate: output.Certificate != null ? de_DescribedCertificate(output.Certificate, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectorResponse - */ -const de_DescribeConnectorResponse = (output: any, context: __SerdeContext): DescribeConnectorResponse => { - return { - Connector: output.Connector != null ? de_DescribedConnector(output.Connector, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribedAccess - */ -const de_DescribedAccess = (output: any, context: __SerdeContext): DescribedAccess => { - return { - ExternalId: __expectString(output.ExternalId), - HomeDirectory: __expectString(output.HomeDirectory), - HomeDirectoryMappings: - output.HomeDirectoryMappings != null - ? de_HomeDirectoryMappings(output.HomeDirectoryMappings, context) - : undefined, - HomeDirectoryType: __expectString(output.HomeDirectoryType), - Policy: __expectString(output.Policy), - PosixProfile: output.PosixProfile != null ? de_PosixProfile(output.PosixProfile, context) : undefined, - Role: __expectString(output.Role), - } as any; -}; - -/** - * deserializeAws_json1_1DescribedAgreement - */ -const de_DescribedAgreement = (output: any, context: __SerdeContext): DescribedAgreement => { - return { - AccessRole: __expectString(output.AccessRole), - AgreementId: __expectString(output.AgreementId), - Arn: __expectString(output.Arn), - BaseDirectory: __expectString(output.BaseDirectory), - Description: __expectString(output.Description), - LocalProfileId: __expectString(output.LocalProfileId), - PartnerProfileId: __expectString(output.PartnerProfileId), - ServerId: __expectString(output.ServerId), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribedCertificate - */ -const de_DescribedCertificate = (output: any, context: __SerdeContext): DescribedCertificate => { - return { - ActiveDate: - output.ActiveDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ActiveDate))) : undefined, - Arn: __expectString(output.Arn), - Certificate: __expectString(output.Certificate), - CertificateChain: __expectString(output.CertificateChain), - CertificateId: __expectString(output.CertificateId), - Description: __expectString(output.Description), - InactiveDate: - output.InactiveDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InactiveDate))) - : undefined, - NotAfterDate: - output.NotAfterDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfterDate))) - : undefined, - NotBeforeDate: - output.NotBeforeDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBeforeDate))) - : undefined, - Serial: __expectString(output.Serial), - Status: __expectString(output.Status), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Type: __expectString(output.Type), - Usage: __expectString(output.Usage), - } as any; -}; - -/** - * deserializeAws_json1_1DescribedConnector - */ -const de_DescribedConnector = (output: any, context: __SerdeContext): DescribedConnector => { - return { - AccessRole: __expectString(output.AccessRole), - Arn: __expectString(output.Arn), - As2Config: output.As2Config != null ? de_As2ConnectorConfig(output.As2Config, context) : undefined, - ConnectorId: __expectString(output.ConnectorId), - LoggingRole: __expectString(output.LoggingRole), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1DescribedExecution - */ -const de_DescribedExecution = (output: any, context: __SerdeContext): DescribedExecution => { - return { - ExecutionId: __expectString(output.ExecutionId), - ExecutionRole: __expectString(output.ExecutionRole), - InitialFileLocation: - output.InitialFileLocation != null ? de_FileLocation(output.InitialFileLocation, context) : undefined, - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - PosixProfile: output.PosixProfile != null ? de_PosixProfile(output.PosixProfile, context) : undefined, - Results: output.Results != null ? de_ExecutionResults(output.Results, context) : undefined, - ServiceMetadata: output.ServiceMetadata != null ? de_ServiceMetadata(output.ServiceMetadata, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1DescribedHostKey - */ -const de_DescribedHostKey = (output: any, context: __SerdeContext): DescribedHostKey => { - return { - Arn: __expectString(output.Arn), - DateImported: - output.DateImported != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateImported))) - : undefined, - Description: __expectString(output.Description), - HostKeyFingerprint: __expectString(output.HostKeyFingerprint), - HostKeyId: __expectString(output.HostKeyId), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1DescribedProfile - */ -const de_DescribedProfile = (output: any, context: __SerdeContext): DescribedProfile => { - return { - Arn: __expectString(output.Arn), - As2Id: __expectString(output.As2Id), - CertificateIds: output.CertificateIds != null ? de_CertificateIds(output.CertificateIds, context) : undefined, - ProfileId: __expectString(output.ProfileId), - ProfileType: __expectString(output.ProfileType), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribedSecurityPolicy - */ -const de_DescribedSecurityPolicy = (output: any, context: __SerdeContext): DescribedSecurityPolicy => { - return { - Fips: __expectBoolean(output.Fips), - SecurityPolicyName: __expectString(output.SecurityPolicyName), - SshCiphers: output.SshCiphers != null ? de_SecurityPolicyOptions(output.SshCiphers, context) : undefined, - SshKexs: output.SshKexs != null ? de_SecurityPolicyOptions(output.SshKexs, context) : undefined, - SshMacs: output.SshMacs != null ? de_SecurityPolicyOptions(output.SshMacs, context) : undefined, - TlsCiphers: output.TlsCiphers != null ? de_SecurityPolicyOptions(output.TlsCiphers, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribedServer - */ -const de_DescribedServer = (output: any, context: __SerdeContext): DescribedServer => { - return { - Arn: __expectString(output.Arn), - Certificate: __expectString(output.Certificate), - Domain: __expectString(output.Domain), - EndpointDetails: output.EndpointDetails != null ? de_EndpointDetails(output.EndpointDetails, context) : undefined, - EndpointType: __expectString(output.EndpointType), - HostKeyFingerprint: __expectString(output.HostKeyFingerprint), - IdentityProviderDetails: - output.IdentityProviderDetails != null - ? de_IdentityProviderDetails(output.IdentityProviderDetails, context) - : undefined, - IdentityProviderType: __expectString(output.IdentityProviderType), - LoggingRole: __expectString(output.LoggingRole), - PostAuthenticationLoginBanner: __expectString(output.PostAuthenticationLoginBanner), - PreAuthenticationLoginBanner: __expectString(output.PreAuthenticationLoginBanner), - ProtocolDetails: output.ProtocolDetails != null ? de_ProtocolDetails(output.ProtocolDetails, context) : undefined, - Protocols: output.Protocols != null ? de_Protocols(output.Protocols, context) : undefined, - SecurityPolicyName: __expectString(output.SecurityPolicyName), - ServerId: __expectString(output.ServerId), - State: __expectString(output.State), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - UserCount: __expectInt32(output.UserCount), - WorkflowDetails: output.WorkflowDetails != null ? de_WorkflowDetails(output.WorkflowDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribedUser - */ -const de_DescribedUser = (output: any, context: __SerdeContext): DescribedUser => { - return { - Arn: __expectString(output.Arn), - HomeDirectory: __expectString(output.HomeDirectory), - HomeDirectoryMappings: - output.HomeDirectoryMappings != null - ? de_HomeDirectoryMappings(output.HomeDirectoryMappings, context) - : undefined, - HomeDirectoryType: __expectString(output.HomeDirectoryType), - Policy: __expectString(output.Policy), - PosixProfile: output.PosixProfile != null ? de_PosixProfile(output.PosixProfile, context) : undefined, - Role: __expectString(output.Role), - SshPublicKeys: output.SshPublicKeys != null ? de_SshPublicKeys(output.SshPublicKeys, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - UserName: __expectString(output.UserName), - } as any; -}; - -/** - * deserializeAws_json1_1DescribedWorkflow - */ -const de_DescribedWorkflow = (output: any, context: __SerdeContext): DescribedWorkflow => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - OnExceptionSteps: output.OnExceptionSteps != null ? de_WorkflowSteps(output.OnExceptionSteps, context) : undefined, - Steps: output.Steps != null ? de_WorkflowSteps(output.Steps, context) : undefined, - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - WorkflowId: __expectString(output.WorkflowId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeExecutionResponse - */ -const de_DescribeExecutionResponse = (output: any, context: __SerdeContext): DescribeExecutionResponse => { - return { - Execution: output.Execution != null ? de_DescribedExecution(output.Execution, context) : undefined, - WorkflowId: __expectString(output.WorkflowId), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeHostKeyResponse - */ -const de_DescribeHostKeyResponse = (output: any, context: __SerdeContext): DescribeHostKeyResponse => { - return { - HostKey: output.HostKey != null ? de_DescribedHostKey(output.HostKey, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeProfileResponse - */ -const de_DescribeProfileResponse = (output: any, context: __SerdeContext): DescribeProfileResponse => { - return { - Profile: output.Profile != null ? de_DescribedProfile(output.Profile, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeSecurityPolicyResponse - */ -const de_DescribeSecurityPolicyResponse = (output: any, context: __SerdeContext): DescribeSecurityPolicyResponse => { - return { - SecurityPolicy: - output.SecurityPolicy != null ? de_DescribedSecurityPolicy(output.SecurityPolicy, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeServerResponse - */ -const de_DescribeServerResponse = (output: any, context: __SerdeContext): DescribeServerResponse => { - return { - Server: output.Server != null ? de_DescribedServer(output.Server, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeUserResponse - */ -const de_DescribeUserResponse = (output: any, context: __SerdeContext): DescribeUserResponse => { - return { - ServerId: __expectString(output.ServerId), - User: output.User != null ? de_DescribedUser(output.User, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkflowResponse - */ -const de_DescribeWorkflowResponse = (output: any, context: __SerdeContext): DescribeWorkflowResponse => { - return { - Workflow: output.Workflow != null ? de_DescribedWorkflow(output.Workflow, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1EfsFileLocation - */ -const de_EfsFileLocation = (output: any, context: __SerdeContext): EfsFileLocation => { - return { - FileSystemId: __expectString(output.FileSystemId), - Path: __expectString(output.Path), - } as any; -}; - -/** - * deserializeAws_json1_1EndpointDetails - */ -const de_EndpointDetails = (output: any, context: __SerdeContext): EndpointDetails => { - return { - AddressAllocationIds: - output.AddressAllocationIds != null ? de_AddressAllocationIds(output.AddressAllocationIds, context) : undefined, - SecurityGroupIds: - output.SecurityGroupIds != null ? de_SecurityGroupIds(output.SecurityGroupIds, context) : undefined, - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - VpcEndpointId: __expectString(output.VpcEndpointId), - VpcId: __expectString(output.VpcId), - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionError - */ -const de_ExecutionError = (output: any, context: __SerdeContext): ExecutionError => { - return { - Message: __expectString(output.Message), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionResults - */ -const de_ExecutionResults = (output: any, context: __SerdeContext): ExecutionResults => { - return { - OnExceptionSteps: - output.OnExceptionSteps != null ? de_ExecutionStepResults(output.OnExceptionSteps, context) : undefined, - Steps: output.Steps != null ? de_ExecutionStepResults(output.Steps, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionStepResult - */ -const de_ExecutionStepResult = (output: any, context: __SerdeContext): ExecutionStepResult => { - return { - Error: output.Error != null ? de_ExecutionError(output.Error, context) : undefined, - Outputs: __expectString(output.Outputs), - StepType: __expectString(output.StepType), - } as any; -}; - -/** - * deserializeAws_json1_1ExecutionStepResults - */ -const de_ExecutionStepResults = (output: any, context: __SerdeContext): ExecutionStepResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExecutionStepResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FileLocation - */ -const de_FileLocation = (output: any, context: __SerdeContext): FileLocation => { - return { - EfsFileLocation: output.EfsFileLocation != null ? de_EfsFileLocation(output.EfsFileLocation, context) : undefined, - S3FileLocation: output.S3FileLocation != null ? de_S3FileLocation(output.S3FileLocation, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HomeDirectoryMapEntry - */ -const de_HomeDirectoryMapEntry = (output: any, context: __SerdeContext): HomeDirectoryMapEntry => { - return { - Entry: __expectString(output.Entry), - Target: __expectString(output.Target), - } as any; -}; - -/** - * deserializeAws_json1_1HomeDirectoryMappings - */ -const de_HomeDirectoryMappings = (output: any, context: __SerdeContext): HomeDirectoryMapEntry[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HomeDirectoryMapEntry(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IdentityProviderDetails - */ -const de_IdentityProviderDetails = (output: any, context: __SerdeContext): IdentityProviderDetails => { - return { - DirectoryId: __expectString(output.DirectoryId), - Function: __expectString(output.Function), - InvocationRole: __expectString(output.InvocationRole), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1ImportCertificateResponse - */ -const de_ImportCertificateResponse = (output: any, context: __SerdeContext): ImportCertificateResponse => { - return { - CertificateId: __expectString(output.CertificateId), - } as any; -}; - -/** - * deserializeAws_json1_1ImportHostKeyResponse - */ -const de_ImportHostKeyResponse = (output: any, context: __SerdeContext): ImportHostKeyResponse => { - return { - HostKeyId: __expectString(output.HostKeyId), - ServerId: __expectString(output.ServerId), - } as any; -}; - -/** - * deserializeAws_json1_1ImportSshPublicKeyResponse - */ -const de_ImportSshPublicKeyResponse = (output: any, context: __SerdeContext): ImportSshPublicKeyResponse => { - return { - ServerId: __expectString(output.ServerId), - SshPublicKeyId: __expectString(output.SshPublicKeyId), - UserName: __expectString(output.UserName), - } as any; -}; - -/** - * deserializeAws_json1_1InputFileLocation - */ -const de_InputFileLocation = (output: any, context: __SerdeContext): InputFileLocation => { - return { - EfsFileLocation: output.EfsFileLocation != null ? de_EfsFileLocation(output.EfsFileLocation, context) : undefined, - S3FileLocation: output.S3FileLocation != null ? de_S3InputFileLocation(output.S3FileLocation, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1InternalServiceError - */ -const de_InternalServiceError = (output: any, context: __SerdeContext): InternalServiceError => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CreateServerResponse omitted. -/** - * deserializeAws_json1_1InvalidNextTokenException - */ -const de_InvalidNextTokenException = (output: any, context: __SerdeContext): InvalidNextTokenException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CreateUserResponse omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_CreateWorkflowResponse omitted. -/** - * deserializeAws_json1_1ListAccessesResponse - */ -const de_ListAccessesResponse = (output: any, context: __SerdeContext): ListAccessesResponse => { - return { - Accesses: output.Accesses != null ? de_ListedAccesses(output.Accesses, context) : undefined, - NextToken: __expectString(output.NextToken), - ServerId: __expectString(output.ServerId), - } as any; -}; +// de_CustomStepDetails omitted. -/** - * deserializeAws_json1_1ListAgreementsResponse - */ -const de_ListAgreementsResponse = (output: any, context: __SerdeContext): ListAgreementsResponse => { - return { - Agreements: output.Agreements != null ? de_ListedAgreements(output.Agreements, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_DecryptStepDetails omitted. -/** - * deserializeAws_json1_1ListCertificatesResponse - */ -const de_ListCertificatesResponse = (output: any, context: __SerdeContext): ListCertificatesResponse => { - return { - Certificates: output.Certificates != null ? de_ListedCertificates(output.Certificates, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListConnectorsResponse - */ -const de_ListConnectorsResponse = (output: any, context: __SerdeContext): ListConnectorsResponse => { - return { - Connectors: output.Connectors != null ? de_ListedConnectors(output.Connectors, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1ListedAccess - */ -const de_ListedAccess = (output: any, context: __SerdeContext): ListedAccess => { - return { - ExternalId: __expectString(output.ExternalId), - HomeDirectory: __expectString(output.HomeDirectory), - HomeDirectoryType: __expectString(output.HomeDirectoryType), - Role: __expectString(output.Role), - } as any; -}; - -/** - * deserializeAws_json1_1ListedAccesses - */ -const de_ListedAccesses = (output: any, context: __SerdeContext): ListedAccess[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedAccess(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedAgreement - */ -const de_ListedAgreement = (output: any, context: __SerdeContext): ListedAgreement => { - return { - AgreementId: __expectString(output.AgreementId), - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - LocalProfileId: __expectString(output.LocalProfileId), - PartnerProfileId: __expectString(output.PartnerProfileId), - ServerId: __expectString(output.ServerId), - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteStepDetails omitted. -/** - * deserializeAws_json1_1ListedAgreements - */ -const de_ListedAgreements = (output: any, context: __SerdeContext): ListedAgreement[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedAgreement(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedCertificate - */ -const de_ListedCertificate = (output: any, context: __SerdeContext): ListedCertificate => { - return { - ActiveDate: - output.ActiveDate != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ActiveDate))) : undefined, - Arn: __expectString(output.Arn), - CertificateId: __expectString(output.CertificateId), - Description: __expectString(output.Description), - InactiveDate: - output.InactiveDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.InactiveDate))) - : undefined, - Status: __expectString(output.Status), - Type: __expectString(output.Type), - Usage: __expectString(output.Usage), - } as any; -}; - -/** - * deserializeAws_json1_1ListedCertificates - */ -const de_ListedCertificates = (output: any, context: __SerdeContext): ListedCertificate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedCertificate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedConnector - */ -const de_ListedConnector = (output: any, context: __SerdeContext): ListedConnector => { - return { - Arn: __expectString(output.Arn), - ConnectorId: __expectString(output.ConnectorId), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1ListedConnectors - */ -const de_ListedConnectors = (output: any, context: __SerdeContext): ListedConnector[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedConnector(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedExecution - */ -const de_ListedExecution = (output: any, context: __SerdeContext): ListedExecution => { - return { - ExecutionId: __expectString(output.ExecutionId), - InitialFileLocation: - output.InitialFileLocation != null ? de_FileLocation(output.InitialFileLocation, context) : undefined, - ServiceMetadata: output.ServiceMetadata != null ? de_ServiceMetadata(output.ServiceMetadata, context) : undefined, - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ListedExecutions - */ -const de_ListedExecutions = (output: any, context: __SerdeContext): ListedExecution[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedExecution(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedHostKey - */ -const de_ListedHostKey = (output: any, context: __SerdeContext): ListedHostKey => { - return { - Arn: __expectString(output.Arn), - DateImported: - output.DateImported != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateImported))) - : undefined, - Description: __expectString(output.Description), - Fingerprint: __expectString(output.Fingerprint), - HostKeyId: __expectString(output.HostKeyId), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ListedHostKeys - */ -const de_ListedHostKeys = (output: any, context: __SerdeContext): ListedHostKey[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedHostKey(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedProfile - */ -const de_ListedProfile = (output: any, context: __SerdeContext): ListedProfile => { - return { - Arn: __expectString(output.Arn), - As2Id: __expectString(output.As2Id), - ProfileId: __expectString(output.ProfileId), - ProfileType: __expectString(output.ProfileType), - } as any; -}; - -/** - * deserializeAws_json1_1ListedProfiles - */ -const de_ListedProfiles = (output: any, context: __SerdeContext): ListedProfile[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedProfile(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedServer - */ -const de_ListedServer = (output: any, context: __SerdeContext): ListedServer => { - return { - Arn: __expectString(output.Arn), - Domain: __expectString(output.Domain), - EndpointType: __expectString(output.EndpointType), - IdentityProviderType: __expectString(output.IdentityProviderType), - LoggingRole: __expectString(output.LoggingRole), - ServerId: __expectString(output.ServerId), - State: __expectString(output.State), - UserCount: __expectInt32(output.UserCount), - } as any; -}; - -/** - * deserializeAws_json1_1ListedServers - */ -const de_ListedServers = (output: any, context: __SerdeContext): ListedServer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedServer(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedUser - */ -const de_ListedUser = (output: any, context: __SerdeContext): ListedUser => { - return { - Arn: __expectString(output.Arn), - HomeDirectory: __expectString(output.HomeDirectory), - HomeDirectoryType: __expectString(output.HomeDirectoryType), - Role: __expectString(output.Role), - SshPublicKeyCount: __expectInt32(output.SshPublicKeyCount), - UserName: __expectString(output.UserName), - } as any; -}; - -/** - * deserializeAws_json1_1ListedUsers - */ -const de_ListedUsers = (output: any, context: __SerdeContext): ListedUser[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedUser(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListedWorkflow - */ -const de_ListedWorkflow = (output: any, context: __SerdeContext): ListedWorkflow => { - return { - Arn: __expectString(output.Arn), - Description: __expectString(output.Description), - WorkflowId: __expectString(output.WorkflowId), - } as any; -}; - -/** - * deserializeAws_json1_1ListedWorkflows - */ -const de_ListedWorkflows = (output: any, context: __SerdeContext): ListedWorkflow[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListedWorkflow(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ListExecutionsResponse - */ -const de_ListExecutionsResponse = (output: any, context: __SerdeContext): ListExecutionsResponse => { - return { - Executions: output.Executions != null ? de_ListedExecutions(output.Executions, context) : undefined, - NextToken: __expectString(output.NextToken), - WorkflowId: __expectString(output.WorkflowId), - } as any; -}; - -/** - * deserializeAws_json1_1ListHostKeysResponse - */ -const de_ListHostKeysResponse = (output: any, context: __SerdeContext): ListHostKeysResponse => { - return { - HostKeys: output.HostKeys != null ? de_ListedHostKeys(output.HostKeys, context) : undefined, - NextToken: __expectString(output.NextToken), - ServerId: __expectString(output.ServerId), - } as any; -}; - -/** - * deserializeAws_json1_1ListProfilesResponse - */ -const de_ListProfilesResponse = (output: any, context: __SerdeContext): ListProfilesResponse => { - return { - NextToken: __expectString(output.NextToken), - Profiles: output.Profiles != null ? de_ListedProfiles(output.Profiles, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListSecurityPoliciesResponse - */ -const de_ListSecurityPoliciesResponse = (output: any, context: __SerdeContext): ListSecurityPoliciesResponse => { - return { - NextToken: __expectString(output.NextToken), - SecurityPolicyNames: - output.SecurityPolicyNames != null ? de_SecurityPolicyNames(output.SecurityPolicyNames, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListServersResponse - */ -const de_ListServersResponse = (output: any, context: __SerdeContext): ListServersResponse => { - return { - NextToken: __expectString(output.NextToken), - Servers: output.Servers != null ? de_ListedServers(output.Servers, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Arn: __expectString(output.Arn), - NextToken: __expectString(output.NextToken), - Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined, - } as any; -}; +// de_DescribeAccessResponse omitted. -/** - * deserializeAws_json1_1ListUsersResponse - */ -const de_ListUsersResponse = (output: any, context: __SerdeContext): ListUsersResponse => { - return { - NextToken: __expectString(output.NextToken), - ServerId: __expectString(output.ServerId), - Users: output.Users != null ? de_ListedUsers(output.Users, context) : undefined, - } as any; -}; +// de_DescribeAgreementResponse omitted. /** - * deserializeAws_json1_1ListWorkflowsResponse + * deserializeAws_json1_1DescribeCertificateResponse */ -const de_ListWorkflowsResponse = (output: any, context: __SerdeContext): ListWorkflowsResponse => { - return { - NextToken: __expectString(output.NextToken), - Workflows: output.Workflows != null ? de_ListedWorkflows(output.Workflows, context) : undefined, - } as any; +const de_DescribeCertificateResponse = (output: any, context: __SerdeContext): DescribeCertificateResponse => { + return take(output, { + Certificate: (_: any) => de_DescribedCertificate(_, context), + }) as any; }; -/** - * deserializeAws_json1_1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - LogGroupName: __expectString(output.LogGroupName), - LoggingRole: __expectString(output.LoggingRole), - } as any; -}; +// de_DescribeConnectorResponse omitted. -/** - * deserializeAws_json1_1OnPartialUploadWorkflowDetails - */ -const de_OnPartialUploadWorkflowDetails = (output: any, context: __SerdeContext): WorkflowDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowDetail(entry, context); - }); - return retVal; -}; +// de_DescribedAccess omitted. -/** - * deserializeAws_json1_1OnUploadWorkflowDetails - */ -const de_OnUploadWorkflowDetails = (output: any, context: __SerdeContext): WorkflowDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowDetail(entry, context); - }); - return retVal; -}; +// de_DescribedAgreement omitted. /** - * deserializeAws_json1_1PosixProfile + * deserializeAws_json1_1DescribedCertificate */ -const de_PosixProfile = (output: any, context: __SerdeContext): PosixProfile => { - return { - Gid: __expectLong(output.Gid), - SecondaryGids: output.SecondaryGids != null ? de_SecondaryGids(output.SecondaryGids, context) : undefined, - Uid: __expectLong(output.Uid), - } as any; +const de_DescribedCertificate = (output: any, context: __SerdeContext): DescribedCertificate => { + return take(output, { + ActiveDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Arn: __expectString, + Certificate: __expectString, + CertificateChain: __expectString, + CertificateId: __expectString, + Description: __expectString, + InactiveDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotAfterDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NotBeforeDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Serial: __expectString, + Status: __expectString, + Tags: _json, + Type: __expectString, + Usage: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ProtocolDetails - */ -const de_ProtocolDetails = (output: any, context: __SerdeContext): ProtocolDetails => { - return { - As2Transports: output.As2Transports != null ? de_As2Transports(output.As2Transports, context) : undefined, - PassiveIp: __expectString(output.PassiveIp), - SetStatOption: __expectString(output.SetStatOption), - TlsSessionResumptionMode: __expectString(output.TlsSessionResumptionMode), - } as any; -}; +// de_DescribedConnector omitted. -/** - * deserializeAws_json1_1Protocols - */ -const de_Protocols = (output: any, context: __SerdeContext): (Protocol | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DescribedExecution omitted. /** - * deserializeAws_json1_1ResourceExistsException + * deserializeAws_json1_1DescribedHostKey */ -const de_ResourceExistsException = (output: any, context: __SerdeContext): ResourceExistsException => { - return { - Message: __expectString(output.Message), - Resource: __expectString(output.Resource), - ResourceType: __expectString(output.ResourceType), - } as any; +const de_DescribedHostKey = (output: any, context: __SerdeContext): DescribedHostKey => { + return take(output, { + Arn: __expectString, + DateImported: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + HostKeyFingerprint: __expectString, + HostKeyId: __expectString, + Tags: _json, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - Resource: __expectString(output.Resource), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_DescribedProfile omitted. + +// de_DescribedSecurityPolicy omitted. + +// de_DescribedServer omitted. /** - * deserializeAws_json1_1S3FileLocation + * deserializeAws_json1_1DescribedUser */ -const de_S3FileLocation = (output: any, context: __SerdeContext): S3FileLocation => { - return { - Bucket: __expectString(output.Bucket), - Etag: __expectString(output.Etag), - Key: __expectString(output.Key), - VersionId: __expectString(output.VersionId), - } as any; +const de_DescribedUser = (output: any, context: __SerdeContext): DescribedUser => { + return take(output, { + Arn: __expectString, + HomeDirectory: __expectString, + HomeDirectoryMappings: _json, + HomeDirectoryType: __expectString, + Policy: __expectString, + PosixProfile: _json, + Role: __expectString, + SshPublicKeys: (_: any) => de_SshPublicKeys(_, context), + Tags: _json, + UserName: __expectString, + }) as any; }; +// de_DescribedWorkflow omitted. + +// de_DescribeExecutionResponse omitted. + /** - * deserializeAws_json1_1S3InputFileLocation + * deserializeAws_json1_1DescribeHostKeyResponse */ -const de_S3InputFileLocation = (output: any, context: __SerdeContext): S3InputFileLocation => { - return { - Bucket: __expectString(output.Bucket), - Key: __expectString(output.Key), - } as any; +const de_DescribeHostKeyResponse = (output: any, context: __SerdeContext): DescribeHostKeyResponse => { + return take(output, { + HostKey: (_: any) => de_DescribedHostKey(_, context), + }) as any; }; +// de_DescribeProfileResponse omitted. + +// de_DescribeSecurityPolicyResponse omitted. + +// de_DescribeServerResponse omitted. + /** - * deserializeAws_json1_1S3Tag + * deserializeAws_json1_1DescribeUserResponse */ -const de_S3Tag = (output: any, context: __SerdeContext): S3Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; +const de_DescribeUserResponse = (output: any, context: __SerdeContext): DescribeUserResponse => { + return take(output, { + ServerId: __expectString, + User: (_: any) => de_DescribedUser(_, context), + }) as any; }; +// de_DescribeWorkflowResponse omitted. + +// de_EfsFileLocation omitted. + +// de_EndpointDetails omitted. + +// de_ExecutionError omitted. + +// de_ExecutionResults omitted. + +// de_ExecutionStepResult omitted. + +// de_ExecutionStepResults omitted. + +// de_FileLocation omitted. + +// de_HomeDirectoryMapEntry omitted. + +// de_HomeDirectoryMappings omitted. + +// de_IdentityProviderDetails omitted. + +// de_ImportCertificateResponse omitted. + +// de_ImportHostKeyResponse omitted. + +// de_ImportSshPublicKeyResponse omitted. + +// de_InputFileLocation omitted. + +// de_InternalServiceError omitted. + +// de_InvalidNextTokenException omitted. + +// de_InvalidRequestException omitted. + +// de_ListAccessesResponse omitted. + +// de_ListAgreementsResponse omitted. + /** - * deserializeAws_json1_1S3Tags + * deserializeAws_json1_1ListCertificatesResponse */ -const de_S3Tags = (output: any, context: __SerdeContext): S3Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_S3Tag(entry, context); - }); - return retVal; +const de_ListCertificatesResponse = (output: any, context: __SerdeContext): ListCertificatesResponse => { + return take(output, { + Certificates: (_: any) => de_ListedCertificates(_, context), + NextToken: __expectString, + }) as any; }; +// de_ListConnectorsResponse omitted. + +// de_ListedAccess omitted. + +// de_ListedAccesses omitted. + +// de_ListedAgreement omitted. + +// de_ListedAgreements omitted. + /** - * deserializeAws_json1_1SecondaryGids + * deserializeAws_json1_1ListedCertificate */ -const de_SecondaryGids = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectLong(entry) as any; - }); - return retVal; +const de_ListedCertificate = (output: any, context: __SerdeContext): ListedCertificate => { + return take(output, { + ActiveDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Arn: __expectString, + CertificateId: __expectString, + Description: __expectString, + InactiveDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Type: __expectString, + Usage: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SecurityGroupIds + * deserializeAws_json1_1ListedCertificates */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { +const de_ListedCertificates = (output: any, context: __SerdeContext): ListedCertificate[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ListedCertificate(entry, context); }); return retVal; }; +// de_ListedConnector omitted. + +// de_ListedConnectors omitted. + +// de_ListedExecution omitted. + +// de_ListedExecutions omitted. + /** - * deserializeAws_json1_1SecurityPolicyNames + * deserializeAws_json1_1ListedHostKey */ -const de_SecurityPolicyNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ListedHostKey = (output: any, context: __SerdeContext): ListedHostKey => { + return take(output, { + Arn: __expectString, + DateImported: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Fingerprint: __expectString, + HostKeyId: __expectString, + Type: __expectString, + }) as any; }; /** - * deserializeAws_json1_1SecurityPolicyOptions + * deserializeAws_json1_1ListedHostKeys */ -const de_SecurityPolicyOptions = (output: any, context: __SerdeContext): string[] => { +const de_ListedHostKeys = (output: any, context: __SerdeContext): ListedHostKey[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ListedHostKey(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SendWorkflowStepStateResponse - */ -const de_SendWorkflowStepStateResponse = (output: any, context: __SerdeContext): SendWorkflowStepStateResponse => { - return {} as any; -}; +// de_ListedProfile omitted. -/** - * deserializeAws_json1_1ServiceMetadata - */ -const de_ServiceMetadata = (output: any, context: __SerdeContext): ServiceMetadata => { - return { - UserDetails: output.UserDetails != null ? de_UserDetails(output.UserDetails, context) : undefined, - } as any; -}; +// de_ListedProfiles omitted. + +// de_ListedServer omitted. + +// de_ListedServers omitted. + +// de_ListedUser omitted. + +// de_ListedUsers omitted. + +// de_ListedWorkflow omitted. + +// de_ListedWorkflows omitted. + +// de_ListExecutionsResponse omitted. /** - * deserializeAws_json1_1ServiceUnavailableException + * deserializeAws_json1_1ListHostKeysResponse */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; +const de_ListHostKeysResponse = (output: any, context: __SerdeContext): ListHostKeysResponse => { + return take(output, { + HostKeys: (_: any) => de_ListedHostKeys(_, context), + NextToken: __expectString, + ServerId: __expectString, + }) as any; }; +// de_ListProfilesResponse omitted. + +// de_ListSecurityPoliciesResponse omitted. + +// de_ListServersResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListUsersResponse omitted. + +// de_ListWorkflowsResponse omitted. + +// de_LoggingConfiguration omitted. + +// de_OnPartialUploadWorkflowDetails omitted. + +// de_OnUploadWorkflowDetails omitted. + +// de_PosixProfile omitted. + +// de_ProtocolDetails omitted. + +// de_Protocols omitted. + +// de_ResourceExistsException omitted. + +// de_ResourceNotFoundException omitted. + +// de_S3FileLocation omitted. + +// de_S3InputFileLocation omitted. + +// de_S3Tag omitted. + +// de_S3Tags omitted. + +// de_SecondaryGids omitted. + +// de_SecurityGroupIds omitted. + +// de_SecurityPolicyNames omitted. + +// de_SecurityPolicyOptions omitted. + +// de_SendWorkflowStepStateResponse omitted. + +// de_ServiceMetadata omitted. + +// de_ServiceUnavailableException omitted. + /** * deserializeAws_json1_1SshPublicKey */ const de_SshPublicKey = (output: any, context: __SerdeContext): SshPublicKey => { - return { - DateImported: - output.DateImported != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateImported))) - : undefined, - SshPublicKeyBody: __expectString(output.SshPublicKeyBody), - SshPublicKeyId: __expectString(output.SshPublicKeyId), - } as any; + return take(output, { + DateImported: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SshPublicKeyBody: __expectString, + SshPublicKeyId: __expectString, + }) as any; }; /** @@ -6946,233 +4951,50 @@ const de_SshPublicKeys = (output: any, context: __SerdeContext): SshPublicKey[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SshPublicKey(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartFileTransferResponse - */ -const de_StartFileTransferResponse = (output: any, context: __SerdeContext): StartFileTransferResponse => { - return { - TransferId: __expectString(output.TransferId), - } as any; -}; +// de_StartFileTransferResponse omitted. -/** - * deserializeAws_json1_1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tags omitted. -/** - * deserializeAws_json1_1TagStepDetails - */ -const de_TagStepDetails = (output: any, context: __SerdeContext): TagStepDetails => { - return { - Name: __expectString(output.Name), - SourceFileLocation: __expectString(output.SourceFileLocation), - Tags: output.Tags != null ? de_S3Tags(output.Tags, context) : undefined, - } as any; -}; +// de_TagStepDetails omitted. -/** - * deserializeAws_json1_1TestIdentityProviderResponse - */ -const de_TestIdentityProviderResponse = (output: any, context: __SerdeContext): TestIdentityProviderResponse => { - return { - Message: __expectString(output.Message), - Response: __expectString(output.Response), - StatusCode: __expectInt32(output.StatusCode), - Url: __expectString(output.Url), - } as any; -}; +// de_TestIdentityProviderResponse omitted. -/** - * deserializeAws_json1_1ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - RetryAfterSeconds: __expectString(output.RetryAfterSeconds), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_1UpdateAccessResponse - */ -const de_UpdateAccessResponse = (output: any, context: __SerdeContext): UpdateAccessResponse => { - return { - ExternalId: __expectString(output.ExternalId), - ServerId: __expectString(output.ServerId), - } as any; -}; +// de_UpdateAccessResponse omitted. -/** - * deserializeAws_json1_1UpdateAgreementResponse - */ -const de_UpdateAgreementResponse = (output: any, context: __SerdeContext): UpdateAgreementResponse => { - return { - AgreementId: __expectString(output.AgreementId), - } as any; -}; +// de_UpdateAgreementResponse omitted. -/** - * deserializeAws_json1_1UpdateCertificateResponse - */ -const de_UpdateCertificateResponse = (output: any, context: __SerdeContext): UpdateCertificateResponse => { - return { - CertificateId: __expectString(output.CertificateId), - } as any; -}; +// de_UpdateCertificateResponse omitted. -/** - * deserializeAws_json1_1UpdateConnectorResponse - */ -const de_UpdateConnectorResponse = (output: any, context: __SerdeContext): UpdateConnectorResponse => { - return { - ConnectorId: __expectString(output.ConnectorId), - } as any; -}; +// de_UpdateConnectorResponse omitted. -/** - * deserializeAws_json1_1UpdateHostKeyResponse - */ -const de_UpdateHostKeyResponse = (output: any, context: __SerdeContext): UpdateHostKeyResponse => { - return { - HostKeyId: __expectString(output.HostKeyId), - ServerId: __expectString(output.ServerId), - } as any; -}; +// de_UpdateHostKeyResponse omitted. -/** - * deserializeAws_json1_1UpdateProfileResponse - */ -const de_UpdateProfileResponse = (output: any, context: __SerdeContext): UpdateProfileResponse => { - return { - ProfileId: __expectString(output.ProfileId), - } as any; -}; +// de_UpdateProfileResponse omitted. -/** - * deserializeAws_json1_1UpdateServerResponse - */ -const de_UpdateServerResponse = (output: any, context: __SerdeContext): UpdateServerResponse => { - return { - ServerId: __expectString(output.ServerId), - } as any; -}; +// de_UpdateServerResponse omitted. -/** - * deserializeAws_json1_1UpdateUserResponse - */ -const de_UpdateUserResponse = (output: any, context: __SerdeContext): UpdateUserResponse => { - return { - ServerId: __expectString(output.ServerId), - UserName: __expectString(output.UserName), - } as any; -}; +// de_UpdateUserResponse omitted. -/** - * deserializeAws_json1_1UserDetails - */ -const de_UserDetails = (output: any, context: __SerdeContext): UserDetails => { - return { - ServerId: __expectString(output.ServerId), - SessionId: __expectString(output.SessionId), - UserName: __expectString(output.UserName), - } as any; -}; +// de_UserDetails omitted. -/** - * deserializeAws_json1_1WorkflowDetail - */ -const de_WorkflowDetail = (output: any, context: __SerdeContext): WorkflowDetail => { - return { - ExecutionRole: __expectString(output.ExecutionRole), - WorkflowId: __expectString(output.WorkflowId), - } as any; -}; +// de_WorkflowDetail omitted. -/** - * deserializeAws_json1_1WorkflowDetails - */ -const de_WorkflowDetails = (output: any, context: __SerdeContext): WorkflowDetails => { - return { - OnPartialUpload: - output.OnPartialUpload != null ? de_OnPartialUploadWorkflowDetails(output.OnPartialUpload, context) : undefined, - OnUpload: output.OnUpload != null ? de_OnUploadWorkflowDetails(output.OnUpload, context) : undefined, - } as any; -}; +// de_WorkflowDetails omitted. -/** - * deserializeAws_json1_1WorkflowStep - */ -const de_WorkflowStep = (output: any, context: __SerdeContext): WorkflowStep => { - return { - CopyStepDetails: output.CopyStepDetails != null ? de_CopyStepDetails(output.CopyStepDetails, context) : undefined, - CustomStepDetails: - output.CustomStepDetails != null ? de_CustomStepDetails(output.CustomStepDetails, context) : undefined, - DecryptStepDetails: - output.DecryptStepDetails != null ? de_DecryptStepDetails(output.DecryptStepDetails, context) : undefined, - DeleteStepDetails: - output.DeleteStepDetails != null ? de_DeleteStepDetails(output.DeleteStepDetails, context) : undefined, - TagStepDetails: output.TagStepDetails != null ? de_TagStepDetails(output.TagStepDetails, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_WorkflowStep omitted. -/** - * deserializeAws_json1_1WorkflowSteps - */ -const de_WorkflowSteps = (output: any, context: __SerdeContext): WorkflowStep[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkflowStep(entry, context); - }); - return retVal; -}; +// de_WorkflowSteps omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -7194,6 +5016,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-translate/src/protocols/Aws_json1_1.ts b/clients/client-translate/src/protocols/Aws_json1_1.ts index 411b02d15ff9..ba0eb964b6a9 100644 --- a/clients/client-translate/src/protocols/Aws_json1_1.ts +++ b/clients/client-translate/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -52,13 +54,10 @@ import { TranslateTextCommandInput, TranslateTextCommandOutput } from "../comman import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput } from "../commands/UpdateParallelDataCommand"; import { - AppliedTerminology, ConcurrentModificationException, ConflictException, CreateParallelDataRequest, - CreateParallelDataResponse, DeleteParallelDataRequest, - DeleteParallelDataResponse, DeleteTerminologyRequest, DescribeTextTranslationJobRequest, DescribeTextTranslationJobResponse, @@ -75,35 +74,25 @@ import { InvalidFilterException, InvalidParameterValueException, InvalidRequestException, - JobDetails, - Language, LimitExceededException, ListLanguagesRequest, - ListLanguagesResponse, ListParallelDataRequest, ListParallelDataResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListTerminologiesRequest, ListTerminologiesResponse, ListTextTranslationJobsRequest, ListTextTranslationJobsResponse, OutputDataConfig, ParallelDataConfig, - ParallelDataDataLocation, ParallelDataProperties, ResourceNotFoundException, ServiceUnavailableException, StartTextTranslationJobRequest, - StartTextTranslationJobResponse, StopTextTranslationJobRequest, - StopTextTranslationJobResponse, Tag, TagResourceRequest, - TagResourceResponse, - Term, TerminologyData, - TerminologyDataLocation, TerminologyProperties, TextSizeLimitExceededException, TextTranslationJobFilter, @@ -111,12 +100,10 @@ import { TooManyRequestsException, TooManyTagsException, TranslateTextRequest, - TranslateTextResponse, TranslationSettings, UnsupportedDisplayLanguageCodeException, UnsupportedLanguagePairException, UntagResourceRequest, - UntagResourceResponse, UpdateParallelDataRequest, UpdateParallelDataResponse, } from "../models/models_0"; @@ -144,7 +131,7 @@ export const se_DeleteParallelDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteParallelData"); let body: any; - body = JSON.stringify(se_DeleteParallelDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -157,7 +144,7 @@ export const se_DeleteTerminologyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTerminology"); let body: any; - body = JSON.stringify(se_DeleteTerminologyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -170,7 +157,7 @@ export const se_DescribeTextTranslationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTextTranslationJob"); let body: any; - body = JSON.stringify(se_DescribeTextTranslationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -183,7 +170,7 @@ export const se_GetParallelDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetParallelData"); let body: any; - body = JSON.stringify(se_GetParallelDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -196,7 +183,7 @@ export const se_GetTerminologyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetTerminology"); let body: any; - body = JSON.stringify(se_GetTerminologyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -222,7 +209,7 @@ export const se_ListLanguagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLanguages"); let body: any; - body = JSON.stringify(se_ListLanguagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -235,7 +222,7 @@ export const se_ListParallelDataCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListParallelData"); let body: any; - body = JSON.stringify(se_ListParallelDataRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -248,7 +235,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -261,7 +248,7 @@ export const se_ListTerminologiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTerminologies"); let body: any; - body = JSON.stringify(se_ListTerminologiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -300,7 +287,7 @@ export const se_StopTextTranslationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopTextTranslationJob"); let body: any; - body = JSON.stringify(se_StopTextTranslationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -313,7 +300,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -326,7 +313,7 @@ export const se_TranslateTextCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TranslateText"); let body: any; - body = JSON.stringify(se_TranslateTextRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -339,7 +326,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -368,12 +355,12 @@ export const de_CreateParallelDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateParallelDataResponse(data, context); + contents = _json(data); const response: CreateParallelDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -415,10 +402,9 @@ const de_CreateParallelDataCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -436,12 +422,12 @@ export const de_DeleteParallelDataCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteParallelDataResponse(data, context); + contents = _json(data); const response: DeleteParallelDataCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -471,10 +457,9 @@ const de_DeleteParallelDataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -494,7 +479,7 @@ export const de_DeleteTerminologyCommand = async ( const response: DeleteTerminologyCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -524,10 +509,9 @@ const de_DeleteTerminologyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -550,7 +534,7 @@ export const de_DescribeTextTranslationJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -577,10 +561,9 @@ const de_DescribeTextTranslationJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -603,7 +586,7 @@ export const de_GetParallelDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -633,10 +616,9 @@ const de_GetParallelDataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -659,7 +641,7 @@ export const de_GetTerminologyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -689,10 +671,9 @@ const de_GetTerminologyCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -715,7 +696,7 @@ export const de_ImportTerminologyCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -751,10 +732,9 @@ const de_ImportTerminologyCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -772,12 +752,12 @@ export const de_ListLanguagesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLanguagesResponse(data, context); + contents = _json(data); const response: ListLanguagesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -807,10 +787,9 @@ const de_ListLanguagesCommandError = async ( throw await de_UnsupportedDisplayLanguageCodeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -833,7 +812,7 @@ export const de_ListParallelDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -860,10 +839,9 @@ const de_ListParallelDataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -881,12 +859,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -913,10 +891,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -939,7 +916,7 @@ export const de_ListTerminologiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -966,10 +943,9 @@ const de_ListTerminologiesCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -992,7 +968,7 @@ export const de_ListTextTranslationJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1022,10 +998,9 @@ const de_ListTextTranslationJobsCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1043,12 +1018,12 @@ export const de_StartTextTranslationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartTextTranslationJobResponse(data, context); + contents = _json(data); const response: StartTextTranslationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1084,10 +1059,9 @@ const de_StartTextTranslationJobCommandError = async ( throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1105,12 +1079,12 @@ export const de_StopTextTranslationJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopTextTranslationJobResponse(data, context); + contents = _json(data); const response: StopTextTranslationJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1137,10 +1111,9 @@ const de_StopTextTranslationJobCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1158,12 +1131,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1196,10 +1169,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1217,12 +1189,12 @@ export const de_TranslateTextCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TranslateTextResponse(data, context); + contents = _json(data); const response: TranslateTextCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1264,10 +1236,9 @@ const de_TranslateTextCommandError = async ( throw await de_UnsupportedLanguagePairExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1285,12 +1256,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1320,10 +1291,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1346,7 +1316,7 @@ export const de_UpdateParallelDataCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1388,10 +1358,9 @@ const de_UpdateParallelDataCommandError = async ( throw await de_TooManyRequestsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1405,7 +1374,7 @@ const de_ConcurrentModificationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConcurrentModificationException(body, context); + const deserialized: any = _json(body); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1418,7 +1387,7 @@ const de_ConcurrentModificationExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1434,7 +1403,7 @@ const de_DetectedLanguageLowConfidenceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DetectedLanguageLowConfidenceException(body, context); + const deserialized: any = _json(body); const exception = new DetectedLanguageLowConfidenceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1450,7 +1419,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1466,7 +1435,7 @@ const de_InvalidFilterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidFilterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidFilterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1482,7 +1451,7 @@ const de_InvalidParameterValueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValueException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1498,7 +1467,7 @@ const de_InvalidRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidRequestException(body, context); + const deserialized: any = _json(body); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1514,7 +1483,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1530,7 +1499,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1546,7 +1515,7 @@ const de_ServiceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1562,7 +1531,7 @@ const de_TextSizeLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TextSizeLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new TextSizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1578,7 +1547,7 @@ const de_TooManyRequestsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyRequestsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1594,7 +1563,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1610,7 +1579,7 @@ const de_UnsupportedDisplayLanguageCodeExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedDisplayLanguageCodeException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedDisplayLanguageCodeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1626,7 +1595,7 @@ const de_UnsupportedLanguagePairExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedLanguagePairException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedLanguagePairException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -1638,403 +1607,151 @@ const de_UnsupportedLanguagePairExceptionRes = async ( * serializeAws_json1_1CreateParallelDataRequest */ const se_CreateParallelDataRequest = (input: CreateParallelDataRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParallelDataConfig != null && { - ParallelDataConfig: se_ParallelDataConfig(input.ParallelDataConfig, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + EncryptionKey: _json, + Name: [], + ParallelDataConfig: _json, + Tags: _json, + }); }; -/** - * serializeAws_json1_1DeleteParallelDataRequest - */ -const se_DeleteParallelDataRequest = (input: DeleteParallelDataRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteParallelDataRequest omitted. -/** - * serializeAws_json1_1DeleteTerminologyRequest - */ -const se_DeleteTerminologyRequest = (input: DeleteTerminologyRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_DeleteTerminologyRequest omitted. -/** - * serializeAws_json1_1DescribeTextTranslationJobRequest - */ -const se_DescribeTextTranslationJobRequest = ( - input: DescribeTextTranslationJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeTextTranslationJobRequest omitted. -/** - * serializeAws_json1_1EncryptionKey - */ -const se_EncryptionKey = (input: EncryptionKey, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_EncryptionKey omitted. -/** - * serializeAws_json1_1GetParallelDataRequest - */ -const se_GetParallelDataRequest = (input: GetParallelDataRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_GetParallelDataRequest omitted. -/** - * serializeAws_json1_1GetTerminologyRequest - */ -const se_GetTerminologyRequest = (input: GetTerminologyRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.TerminologyDataFormat != null && { TerminologyDataFormat: input.TerminologyDataFormat }), - }; -}; +// se_GetTerminologyRequest omitted. /** * serializeAws_json1_1ImportTerminologyRequest */ const se_ImportTerminologyRequest = (input: ImportTerminologyRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }), - ...(input.MergeStrategy != null && { MergeStrategy: input.MergeStrategy }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TerminologyData != null && { TerminologyData: se_TerminologyData(input.TerminologyData, context) }), - }; + return take(input, { + Description: [], + EncryptionKey: _json, + MergeStrategy: [], + Name: [], + Tags: _json, + TerminologyData: (_) => se_TerminologyData(_, context), + }); }; -/** - * serializeAws_json1_1InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return { - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_InputDataConfig omitted. -/** - * serializeAws_json1_1ListLanguagesRequest - */ -const se_ListLanguagesRequest = (input: ListLanguagesRequest, context: __SerdeContext): any => { - return { - ...(input.DisplayLanguageCode != null && { DisplayLanguageCode: input.DisplayLanguageCode }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListLanguagesRequest omitted. -/** - * serializeAws_json1_1ListParallelDataRequest - */ -const se_ListParallelDataRequest = (input: ListParallelDataRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListParallelDataRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListTerminologiesRequest - */ -const se_ListTerminologiesRequest = (input: ListTerminologiesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListTerminologiesRequest omitted. /** * serializeAws_json1_1ListTextTranslationJobsRequest */ const se_ListTextTranslationJobsRequest = (input: ListTextTranslationJobsRequest, context: __SerdeContext): any => { - return { - ...(input.Filter != null && { Filter: se_TextTranslationJobFilter(input.Filter, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; + return take(input, { + Filter: (_) => se_TextTranslationJobFilter(_, context), + MaxResults: [], + NextToken: [], + }); }; -/** - * serializeAws_json1_1OutputDataConfig - */ -const se_OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.EncryptionKey != null && { EncryptionKey: se_EncryptionKey(input.EncryptionKey, context) }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_OutputDataConfig omitted. -/** - * serializeAws_json1_1ParallelDataConfig - */ -const se_ParallelDataConfig = (input: ParallelDataConfig, context: __SerdeContext): any => { - return { - ...(input.Format != null && { Format: input.Format }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_ParallelDataConfig omitted. -/** - * serializeAws_json1_1ResourceNameList - */ -const se_ResourceNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ResourceNameList omitted. /** * serializeAws_json1_1StartTextTranslationJobRequest */ const se_StartTextTranslationJobRequest = (input: StartTextTranslationJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.ParallelDataNames != null && { - ParallelDataNames: se_ResourceNameList(input.ParallelDataNames, context), - }), - ...(input.Settings != null && { Settings: se_TranslationSettings(input.Settings, context) }), - ...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }), - ...(input.TargetLanguageCodes != null && { - TargetLanguageCodes: se_TargetLanguageCodeStringList(input.TargetLanguageCodes, context), - }), - ...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + InputDataConfig: _json, + JobName: [], + OutputDataConfig: _json, + ParallelDataNames: _json, + Settings: _json, + SourceLanguageCode: [], + TargetLanguageCodes: _json, + TerminologyNames: _json, + }); }; -/** - * serializeAws_json1_1StopTextTranslationJobRequest - */ -const se_StopTextTranslationJobRequest = (input: StopTextTranslationJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_StopTextTranslationJobRequest omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_1TargetLanguageCodeStringList - */ -const se_TargetLanguageCodeStringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TargetLanguageCodeStringList omitted. /** * serializeAws_json1_1TerminologyData */ const se_TerminologyData = (input: TerminologyData, context: __SerdeContext): any => { - return { - ...(input.Directionality != null && { Directionality: input.Directionality }), - ...(input.File != null && { File: context.base64Encoder(input.File) }), - ...(input.Format != null && { Format: input.Format }), - }; + return take(input, { + Directionality: [], + File: context.base64Encoder, + Format: [], + }); }; /** * serializeAws_json1_1TextTranslationJobFilter */ const se_TextTranslationJobFilter = (input: TextTranslationJobFilter, context: __SerdeContext): any => { - return { - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.SubmittedAfterTime != null && { - SubmittedAfterTime: Math.round(input.SubmittedAfterTime.getTime() / 1000), - }), - ...(input.SubmittedBeforeTime != null && { - SubmittedBeforeTime: Math.round(input.SubmittedBeforeTime.getTime() / 1000), - }), - }; + return take(input, { + JobName: [], + JobStatus: [], + SubmittedAfterTime: (_) => Math.round(_.getTime() / 1000), + SubmittedBeforeTime: (_) => Math.round(_.getTime() / 1000), + }); }; -/** - * serializeAws_json1_1TranslateTextRequest - */ -const se_TranslateTextRequest = (input: TranslateTextRequest, context: __SerdeContext): any => { - return { - ...(input.Settings != null && { Settings: se_TranslationSettings(input.Settings, context) }), - ...(input.SourceLanguageCode != null && { SourceLanguageCode: input.SourceLanguageCode }), - ...(input.TargetLanguageCode != null && { TargetLanguageCode: input.TargetLanguageCode }), - ...(input.TerminologyNames != null && { TerminologyNames: se_ResourceNameList(input.TerminologyNames, context) }), - ...(input.Text != null && { Text: input.Text }), - }; -}; +// se_TranslateTextRequest omitted. -/** - * serializeAws_json1_1TranslationSettings - */ -const se_TranslationSettings = (input: TranslationSettings, context: __SerdeContext): any => { - return { - ...(input.Formality != null && { Formality: input.Formality }), - ...(input.Profanity != null && { Profanity: input.Profanity }), - }; -}; +// se_TranslationSettings omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. /** * serializeAws_json1_1UpdateParallelDataRequest */ const se_UpdateParallelDataRequest = (input: UpdateParallelDataRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParallelDataConfig != null && { - ParallelDataConfig: se_ParallelDataConfig(input.ParallelDataConfig, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + ParallelDataConfig: _json, + }); }; -/** - * deserializeAws_json1_1AppliedTerminology - */ -const de_AppliedTerminology = (output: any, context: __SerdeContext): AppliedTerminology => { - return { - Name: __expectString(output.Name), - Terms: output.Terms != null ? de_TermList(output.Terms, context) : undefined, - } as any; -}; +// de_AppliedTerminology omitted. -/** - * deserializeAws_json1_1AppliedTerminologyList - */ -const de_AppliedTerminologyList = (output: any, context: __SerdeContext): AppliedTerminology[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AppliedTerminology(entry, context); - }); - return retVal; -}; +// de_AppliedTerminologyList omitted. -/** - * deserializeAws_json1_1ConcurrentModificationException - */ -const de_ConcurrentModificationException = (output: any, context: __SerdeContext): ConcurrentModificationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConcurrentModificationException omitted. -/** - * deserializeAws_json1_1ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ConflictException omitted. -/** - * deserializeAws_json1_1CreateParallelDataResponse - */ -const de_CreateParallelDataResponse = (output: any, context: __SerdeContext): CreateParallelDataResponse => { - return { - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_CreateParallelDataResponse omitted. -/** - * deserializeAws_json1_1DeleteParallelDataResponse - */ -const de_DeleteParallelDataResponse = (output: any, context: __SerdeContext): DeleteParallelDataResponse => { - return { - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; -}; +// de_DeleteParallelDataResponse omitted. /** * deserializeAws_json1_1DescribeTextTranslationJobResponse @@ -2043,321 +1760,131 @@ const de_DescribeTextTranslationJobResponse = ( output: any, context: __SerdeContext ): DescribeTextTranslationJobResponse => { - return { - TextTranslationJobProperties: - output.TextTranslationJobProperties != null - ? de_TextTranslationJobProperties(output.TextTranslationJobProperties, context) - : undefined, - } as any; + return take(output, { + TextTranslationJobProperties: (_: any) => de_TextTranslationJobProperties(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DetectedLanguageLowConfidenceException - */ -const de_DetectedLanguageLowConfidenceException = ( - output: any, - context: __SerdeContext -): DetectedLanguageLowConfidenceException => { - return { - DetectedLanguageCode: __expectString(output.DetectedLanguageCode), - Message: __expectString(output.Message), - } as any; -}; +// de_DetectedLanguageLowConfidenceException omitted. -/** - * deserializeAws_json1_1EncryptionKey - */ -const de_EncryptionKey = (output: any, context: __SerdeContext): EncryptionKey => { - return { - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; -}; +// de_EncryptionKey omitted. /** * deserializeAws_json1_1GetParallelDataResponse */ const de_GetParallelDataResponse = (output: any, context: __SerdeContext): GetParallelDataResponse => { - return { - AuxiliaryDataLocation: - output.AuxiliaryDataLocation != null - ? de_ParallelDataDataLocation(output.AuxiliaryDataLocation, context) - : undefined, - DataLocation: output.DataLocation != null ? de_ParallelDataDataLocation(output.DataLocation, context) : undefined, - LatestUpdateAttemptAuxiliaryDataLocation: - output.LatestUpdateAttemptAuxiliaryDataLocation != null - ? de_ParallelDataDataLocation(output.LatestUpdateAttemptAuxiliaryDataLocation, context) - : undefined, - ParallelDataProperties: - output.ParallelDataProperties != null - ? de_ParallelDataProperties(output.ParallelDataProperties, context) - : undefined, - } as any; + return take(output, { + AuxiliaryDataLocation: _json, + DataLocation: _json, + LatestUpdateAttemptAuxiliaryDataLocation: _json, + ParallelDataProperties: (_: any) => de_ParallelDataProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1GetTerminologyResponse */ const de_GetTerminologyResponse = (output: any, context: __SerdeContext): GetTerminologyResponse => { - return { - AuxiliaryDataLocation: - output.AuxiliaryDataLocation != null - ? de_TerminologyDataLocation(output.AuxiliaryDataLocation, context) - : undefined, - TerminologyDataLocation: - output.TerminologyDataLocation != null - ? de_TerminologyDataLocation(output.TerminologyDataLocation, context) - : undefined, - TerminologyProperties: - output.TerminologyProperties != null - ? de_TerminologyProperties(output.TerminologyProperties, context) - : undefined, - } as any; + return take(output, { + AuxiliaryDataLocation: _json, + TerminologyDataLocation: _json, + TerminologyProperties: (_: any) => de_TerminologyProperties(_, context), + }) as any; }; /** * deserializeAws_json1_1ImportTerminologyResponse */ const de_ImportTerminologyResponse = (output: any, context: __SerdeContext): ImportTerminologyResponse => { - return { - AuxiliaryDataLocation: - output.AuxiliaryDataLocation != null - ? de_TerminologyDataLocation(output.AuxiliaryDataLocation, context) - : undefined, - TerminologyProperties: - output.TerminologyProperties != null - ? de_TerminologyProperties(output.TerminologyProperties, context) - : undefined, - } as any; + return take(output, { + AuxiliaryDataLocation: _json, + TerminologyProperties: (_: any) => de_TerminologyProperties(_, context), + }) as any; }; -/** - * deserializeAws_json1_1InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - return { - ContentType: __expectString(output.ContentType), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_1InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_1InvalidFilterException - */ -const de_InvalidFilterException = (output: any, context: __SerdeContext): InvalidFilterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidFilterException omitted. -/** - * deserializeAws_json1_1InvalidParameterValueException - */ -const de_InvalidParameterValueException = (output: any, context: __SerdeContext): InvalidParameterValueException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterValueException omitted. -/** - * deserializeAws_json1_1InvalidRequestException - */ -const de_InvalidRequestException = (output: any, context: __SerdeContext): InvalidRequestException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidRequestException omitted. -/** - * deserializeAws_json1_1JobDetails - */ -const de_JobDetails = (output: any, context: __SerdeContext): JobDetails => { - return { - DocumentsWithErrorsCount: __expectInt32(output.DocumentsWithErrorsCount), - InputDocumentsCount: __expectInt32(output.InputDocumentsCount), - TranslatedDocumentsCount: __expectInt32(output.TranslatedDocumentsCount), - } as any; -}; +// de_JobDetails omitted. -/** - * deserializeAws_json1_1Language - */ -const de_Language = (output: any, context: __SerdeContext): Language => { - return { - LanguageCode: __expectString(output.LanguageCode), - LanguageName: __expectString(output.LanguageName), - } as any; -}; +// de_Language omitted. -/** - * deserializeAws_json1_1LanguageCodeStringList - */ -const de_LanguageCodeStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_LanguageCodeStringList omitted. -/** - * deserializeAws_json1_1LanguagesList - */ -const de_LanguagesList = (output: any, context: __SerdeContext): Language[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Language(entry, context); - }); - return retVal; -}; +// de_LanguagesList omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. -/** - * deserializeAws_json1_1ListLanguagesResponse - */ -const de_ListLanguagesResponse = (output: any, context: __SerdeContext): ListLanguagesResponse => { - return { - DisplayLanguageCode: __expectString(output.DisplayLanguageCode), - Languages: output.Languages != null ? de_LanguagesList(output.Languages, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListLanguagesResponse omitted. /** * deserializeAws_json1_1ListParallelDataResponse */ const de_ListParallelDataResponse = (output: any, context: __SerdeContext): ListParallelDataResponse => { - return { - NextToken: __expectString(output.NextToken), - ParallelDataPropertiesList: - output.ParallelDataPropertiesList != null - ? de_ParallelDataPropertiesList(output.ParallelDataPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + ParallelDataPropertiesList: (_: any) => de_ParallelDataPropertiesList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListTerminologiesResponse */ const de_ListTerminologiesResponse = (output: any, context: __SerdeContext): ListTerminologiesResponse => { - return { - NextToken: __expectString(output.NextToken), - TerminologyPropertiesList: - output.TerminologyPropertiesList != null - ? de_TerminologyPropertiesList(output.TerminologyPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + TerminologyPropertiesList: (_: any) => de_TerminologyPropertiesList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListTextTranslationJobsResponse */ const de_ListTextTranslationJobsResponse = (output: any, context: __SerdeContext): ListTextTranslationJobsResponse => { - return { - NextToken: __expectString(output.NextToken), - TextTranslationJobPropertiesList: - output.TextTranslationJobPropertiesList != null - ? de_TextTranslationJobPropertiesList(output.TextTranslationJobPropertiesList, context) - : undefined, - } as any; + return take(output, { + NextToken: __expectString, + TextTranslationJobPropertiesList: (_: any) => de_TextTranslationJobPropertiesList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1OutputDataConfig - */ -const de_OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { - return { - EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined, - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_OutputDataConfig omitted. -/** - * deserializeAws_json1_1ParallelDataConfig - */ -const de_ParallelDataConfig = (output: any, context: __SerdeContext): ParallelDataConfig => { - return { - Format: __expectString(output.Format), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_ParallelDataConfig omitted. -/** - * deserializeAws_json1_1ParallelDataDataLocation - */ -const de_ParallelDataDataLocation = (output: any, context: __SerdeContext): ParallelDataDataLocation => { - return { - Location: __expectString(output.Location), - RepositoryType: __expectString(output.RepositoryType), - } as any; -}; +// de_ParallelDataDataLocation omitted. /** * deserializeAws_json1_1ParallelDataProperties */ const de_ParallelDataProperties = (output: any, context: __SerdeContext): ParallelDataProperties => { - return { - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined, - FailedRecordCount: __expectLong(output.FailedRecordCount), - ImportedDataSize: __expectLong(output.ImportedDataSize), - ImportedRecordCount: __expectLong(output.ImportedRecordCount), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - LatestUpdateAttemptAt: - output.LatestUpdateAttemptAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt))) - : undefined, - LatestUpdateAttemptStatus: __expectString(output.LatestUpdateAttemptStatus), - Message: __expectString(output.Message), - Name: __expectString(output.Name), - ParallelDataConfig: - output.ParallelDataConfig != null ? de_ParallelDataConfig(output.ParallelDataConfig, context) : undefined, - SkippedRecordCount: __expectLong(output.SkippedRecordCount), - SourceLanguageCode: __expectString(output.SourceLanguageCode), - Status: __expectString(output.Status), - TargetLanguageCodes: - output.TargetLanguageCodes != null ? de_LanguageCodeStringList(output.TargetLanguageCodes, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + EncryptionKey: _json, + FailedRecordCount: __expectLong, + ImportedDataSize: __expectLong, + ImportedRecordCount: __expectLong, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestUpdateAttemptAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestUpdateAttemptStatus: __expectString, + Message: __expectString, + Name: __expectString, + ParallelDataConfig: _json, + SkippedRecordCount: __expectLong, + SourceLanguageCode: __expectString, + Status: __expectString, + TargetLanguageCodes: _json, + }) as any; }; /** @@ -2367,159 +1894,53 @@ const de_ParallelDataPropertiesList = (output: any, context: __SerdeContext): Pa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ParallelDataProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ResourceNameList - */ -const de_ResourceNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResourceNameList omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_1ServiceUnavailableException - */ -const de_ServiceUnavailableException = (output: any, context: __SerdeContext): ServiceUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceUnavailableException omitted. -/** - * deserializeAws_json1_1StartTextTranslationJobResponse - */ -const de_StartTextTranslationJobResponse = (output: any, context: __SerdeContext): StartTextTranslationJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StartTextTranslationJobResponse omitted. -/** - * deserializeAws_json1_1StopTextTranslationJobResponse - */ -const de_StopTextTranslationJobResponse = (output: any, context: __SerdeContext): StopTextTranslationJobResponse => { - return { - JobId: __expectString(output.JobId), - JobStatus: __expectString(output.JobStatus), - } as any; -}; +// de_StopTextTranslationJobResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TargetLanguageCodeStringList - */ -const de_TargetLanguageCodeStringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetLanguageCodeStringList omitted. -/** - * deserializeAws_json1_1Term - */ -const de_Term = (output: any, context: __SerdeContext): Term => { - return { - SourceText: __expectString(output.SourceText), - TargetText: __expectString(output.TargetText), - } as any; -}; +// de_Term omitted. -/** - * deserializeAws_json1_1TerminologyDataLocation - */ -const de_TerminologyDataLocation = (output: any, context: __SerdeContext): TerminologyDataLocation => { - return { - Location: __expectString(output.Location), - RepositoryType: __expectString(output.RepositoryType), - } as any; -}; +// de_TerminologyDataLocation omitted. /** * deserializeAws_json1_1TerminologyProperties */ const de_TerminologyProperties = (output: any, context: __SerdeContext): TerminologyProperties => { - return { - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - Directionality: __expectString(output.Directionality), - EncryptionKey: output.EncryptionKey != null ? de_EncryptionKey(output.EncryptionKey, context) : undefined, - Format: __expectString(output.Format), - LastUpdatedAt: - output.LastUpdatedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedAt))) - : undefined, - Message: __expectString(output.Message), - Name: __expectString(output.Name), - SizeBytes: __expectInt32(output.SizeBytes), - SkippedTermCount: __expectInt32(output.SkippedTermCount), - SourceLanguageCode: __expectString(output.SourceLanguageCode), - TargetLanguageCodes: - output.TargetLanguageCodes != null ? de_LanguageCodeStringList(output.TargetLanguageCodes, context) : undefined, - TermCount: __expectInt32(output.TermCount), - } as any; + return take(output, { + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Directionality: __expectString, + EncryptionKey: _json, + Format: __expectString, + LastUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Message: __expectString, + Name: __expectString, + SizeBytes: __expectInt32, + SkippedTermCount: __expectInt32, + SourceLanguageCode: __expectString, + TargetLanguageCodes: _json, + TermCount: __expectInt32, + }) as any; }; /** @@ -2529,69 +1950,36 @@ const de_TerminologyPropertiesList = (output: any, context: __SerdeContext): Ter const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TerminologyProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TermList - */ -const de_TermList = (output: any, context: __SerdeContext): Term[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Term(entry, context); - }); - return retVal; -}; +// de_TermList omitted. -/** - * deserializeAws_json1_1TextSizeLimitExceededException - */ -const de_TextSizeLimitExceededException = (output: any, context: __SerdeContext): TextSizeLimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TextSizeLimitExceededException omitted. /** * deserializeAws_json1_1TextTranslationJobProperties */ const de_TextTranslationJobProperties = (output: any, context: __SerdeContext): TextTranslationJobProperties => { - return { - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobDetails: output.JobDetails != null ? de_JobDetails(output.JobDetails, context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobStatus: __expectString(output.JobStatus), - Message: __expectString(output.Message), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - ParallelDataNames: - output.ParallelDataNames != null ? de_ResourceNameList(output.ParallelDataNames, context) : undefined, - Settings: output.Settings != null ? de_TranslationSettings(output.Settings, context) : undefined, - SourceLanguageCode: __expectString(output.SourceLanguageCode), - SubmittedTime: - output.SubmittedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmittedTime))) - : undefined, - TargetLanguageCodes: - output.TargetLanguageCodes != null - ? de_TargetLanguageCodeStringList(output.TargetLanguageCodes, context) - : undefined, - TerminologyNames: - output.TerminologyNames != null ? de_ResourceNameList(output.TerminologyNames, context) : undefined, - } as any; + return take(output, { + DataAccessRoleArn: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InputDataConfig: _json, + JobDetails: _json, + JobId: __expectString, + JobName: __expectString, + JobStatus: __expectString, + Message: __expectString, + OutputDataConfig: _json, + ParallelDataNames: _json, + Settings: _json, + SourceLanguageCode: __expectString, + SubmittedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + TargetLanguageCodes: _json, + TerminologyNames: _json, + }) as any; }; /** @@ -2601,105 +1989,35 @@ const de_TextTranslationJobPropertiesList = (output: any, context: __SerdeContex const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TextTranslationJobProperties(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1TooManyRequestsException - */ -const de_TooManyRequestsException = (output: any, context: __SerdeContext): TooManyRequestsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyRequestsException omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - ResourceArn: __expectString(output.ResourceArn), - message: __expectString(output.message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1TranslateTextResponse - */ -const de_TranslateTextResponse = (output: any, context: __SerdeContext): TranslateTextResponse => { - return { - AppliedSettings: - output.AppliedSettings != null ? de_TranslationSettings(output.AppliedSettings, context) : undefined, - AppliedTerminologies: - output.AppliedTerminologies != null ? de_AppliedTerminologyList(output.AppliedTerminologies, context) : undefined, - SourceLanguageCode: __expectString(output.SourceLanguageCode), - TargetLanguageCode: __expectString(output.TargetLanguageCode), - TranslatedText: __expectString(output.TranslatedText), - } as any; -}; +// de_TranslateTextResponse omitted. -/** - * deserializeAws_json1_1TranslationSettings - */ -const de_TranslationSettings = (output: any, context: __SerdeContext): TranslationSettings => { - return { - Formality: __expectString(output.Formality), - Profanity: __expectString(output.Profanity), - } as any; -}; +// de_TranslationSettings omitted. -/** - * deserializeAws_json1_1UnsupportedDisplayLanguageCodeException - */ -const de_UnsupportedDisplayLanguageCodeException = ( - output: any, - context: __SerdeContext -): UnsupportedDisplayLanguageCodeException => { - return { - DisplayLanguageCode: __expectString(output.DisplayLanguageCode), - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedDisplayLanguageCodeException omitted. -/** - * deserializeAws_json1_1UnsupportedLanguagePairException - */ -const de_UnsupportedLanguagePairException = ( - output: any, - context: __SerdeContext -): UnsupportedLanguagePairException => { - return { - Message: __expectString(output.Message), - SourceLanguageCode: __expectString(output.SourceLanguageCode), - TargetLanguageCode: __expectString(output.TargetLanguageCode), - } as any; -}; +// de_UnsupportedLanguagePairException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_1UpdateParallelDataResponse */ const de_UpdateParallelDataResponse = (output: any, context: __SerdeContext): UpdateParallelDataResponse => { - return { - LatestUpdateAttemptAt: - output.LatestUpdateAttemptAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LatestUpdateAttemptAt))) - : undefined, - LatestUpdateAttemptStatus: __expectString(output.LatestUpdateAttemptStatus), - Name: __expectString(output.Name), - Status: __expectString(output.Status), - } as any; + return take(output, { + LatestUpdateAttemptAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LatestUpdateAttemptStatus: __expectString, + Name: __expectString, + Status: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -2722,6 +2040,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-voice-id/src/protocols/Aws_json1_0.ts b/clients/client-voice-id/src/protocols/Aws_json1_0.ts index 4fb6842b83a3..ffce368fb361 100644 --- a/clients/client-voice-id/src/protocols/Aws_json1_0.ts +++ b/clients/client-voice-id/src/protocols/Aws_json1_0.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -8,7 +9,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -75,7 +77,6 @@ import { AccessDeniedException, AssociateFraudsterRequest, AssociateFraudsterResponse, - AuthenticationConfiguration, AuthenticationResult, ConflictException, CreateDomainRequest, @@ -106,19 +107,13 @@ import { EnrollmentJobFraudDetectionConfig, EvaluateSessionRequest, EvaluateSessionResponse, - FailureDetails, - FraudDetectionConfiguration, - FraudDetectionReason, FraudDetectionResult, - FraudRiskDetails, Fraudster, FraudsterRegistrationJob, FraudsterRegistrationJobSummary, FraudsterSummary, InputDataConfig, InternalServerException, - JobProgress, - KnownFraudsterRisk, ListDomainsRequest, ListDomainsResponse, ListFraudsterRegistrationJobsRequest, @@ -130,7 +125,6 @@ import { ListSpeakersRequest, ListSpeakersResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListWatchlistsRequest, ListWatchlistsResponse, OptOutSpeakerRequest, @@ -139,7 +133,6 @@ import { RegistrationConfig, ResourceNotFoundException, ServerSideEncryptionConfiguration, - ServerSideEncryptionUpdateDetails, ServiceQuotaExceededException, Speaker, SpeakerEnrollmentJob, @@ -151,18 +144,14 @@ import { StartSpeakerEnrollmentJobResponse, Tag, TagResourceRequest, - TagResourceResponse, ThrottlingException, UntagResourceRequest, - UntagResourceResponse, UpdateDomainRequest, UpdateDomainResponse, UpdateWatchlistRequest, UpdateWatchlistResponse, ValidationException, - VoiceSpoofingRisk, Watchlist, - WatchlistDetails, WatchlistSummary, } from "../models/models_0"; import { VoiceIDServiceException as __BaseException } from "../models/VoiceIDServiceException"; @@ -176,7 +165,7 @@ export const se_AssociateFraudsterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateFraudster"); let body: any; - body = JSON.stringify(se_AssociateFraudsterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -215,7 +204,7 @@ export const se_DeleteDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteDomain"); let body: any; - body = JSON.stringify(se_DeleteDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -228,7 +217,7 @@ export const se_DeleteFraudsterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFraudster"); let body: any; - body = JSON.stringify(se_DeleteFraudsterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -241,7 +230,7 @@ export const se_DeleteSpeakerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSpeaker"); let body: any; - body = JSON.stringify(se_DeleteSpeakerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -254,7 +243,7 @@ export const se_DeleteWatchlistCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWatchlist"); let body: any; - body = JSON.stringify(se_DeleteWatchlistRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -267,7 +256,7 @@ export const se_DescribeDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeDomain"); let body: any; - body = JSON.stringify(se_DescribeDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -280,7 +269,7 @@ export const se_DescribeFraudsterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFraudster"); let body: any; - body = JSON.stringify(se_DescribeFraudsterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -293,7 +282,7 @@ export const se_DescribeFraudsterRegistrationJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeFraudsterRegistrationJob"); let body: any; - body = JSON.stringify(se_DescribeFraudsterRegistrationJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -306,7 +295,7 @@ export const se_DescribeSpeakerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSpeaker"); let body: any; - body = JSON.stringify(se_DescribeSpeakerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -319,7 +308,7 @@ export const se_DescribeSpeakerEnrollmentJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeSpeakerEnrollmentJob"); let body: any; - body = JSON.stringify(se_DescribeSpeakerEnrollmentJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -332,7 +321,7 @@ export const se_DescribeWatchlistCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWatchlist"); let body: any; - body = JSON.stringify(se_DescribeWatchlistRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -345,7 +334,7 @@ export const se_DisassociateFraudsterCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateFraudster"); let body: any; - body = JSON.stringify(se_DisassociateFraudsterRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -358,7 +347,7 @@ export const se_EvaluateSessionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EvaluateSession"); let body: any; - body = JSON.stringify(se_EvaluateSessionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -371,7 +360,7 @@ export const se_ListDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDomains"); let body: any; - body = JSON.stringify(se_ListDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -384,7 +373,7 @@ export const se_ListFraudsterRegistrationJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFraudsterRegistrationJobs"); let body: any; - body = JSON.stringify(se_ListFraudsterRegistrationJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -397,7 +386,7 @@ export const se_ListFraudstersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListFraudsters"); let body: any; - body = JSON.stringify(se_ListFraudstersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -410,7 +399,7 @@ export const se_ListSpeakerEnrollmentJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSpeakerEnrollmentJobs"); let body: any; - body = JSON.stringify(se_ListSpeakerEnrollmentJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -423,7 +412,7 @@ export const se_ListSpeakersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSpeakers"); let body: any; - body = JSON.stringify(se_ListSpeakersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -436,7 +425,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -449,7 +438,7 @@ export const se_ListWatchlistsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWatchlists"); let body: any; - body = JSON.stringify(se_ListWatchlistsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -462,7 +451,7 @@ export const se_OptOutSpeakerCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("OptOutSpeaker"); let body: any; - body = JSON.stringify(se_OptOutSpeakerRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -501,7 +490,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -514,7 +503,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -527,7 +516,7 @@ export const se_UpdateDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDomain"); let body: any; - body = JSON.stringify(se_UpdateDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -540,7 +529,7 @@ export const se_UpdateWatchlistCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWatchlist"); let body: any; - body = JSON.stringify(se_UpdateWatchlistRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -561,7 +550,7 @@ export const de_AssociateFraudsterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -600,10 +589,9 @@ const de_AssociateFraudsterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -626,7 +614,7 @@ export const de_CreateDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -665,10 +653,9 @@ const de_CreateDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -691,7 +678,7 @@ export const de_CreateWatchlistCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -730,10 +717,9 @@ const de_CreateWatchlistCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -753,7 +739,7 @@ export const de_DeleteDomainCommand = async ( const response: DeleteDomainCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -789,10 +775,9 @@ const de_DeleteDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -812,7 +797,7 @@ export const de_DeleteFraudsterCommand = async ( const response: DeleteFraudsterCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -848,10 +833,9 @@ const de_DeleteFraudsterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -871,7 +855,7 @@ export const de_DeleteSpeakerCommand = async ( const response: DeleteSpeakerCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -907,10 +891,9 @@ const de_DeleteSpeakerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -930,7 +913,7 @@ export const de_DeleteWatchlistCommand = async ( const response: DeleteWatchlistCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -966,10 +949,9 @@ const de_DeleteWatchlistCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -992,7 +974,7 @@ export const de_DescribeDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1025,10 +1007,9 @@ const de_DescribeDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1051,7 +1032,7 @@ export const de_DescribeFraudsterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1084,10 +1065,9 @@ const de_DescribeFraudsterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1110,7 +1090,7 @@ export const de_DescribeFraudsterRegistrationJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1143,10 +1123,9 @@ const de_DescribeFraudsterRegistrationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1169,7 +1148,7 @@ export const de_DescribeSpeakerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1202,10 +1181,9 @@ const de_DescribeSpeakerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1228,7 +1206,7 @@ export const de_DescribeSpeakerEnrollmentJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1261,10 +1239,9 @@ const de_DescribeSpeakerEnrollmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1287,7 +1264,7 @@ export const de_DescribeWatchlistCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1320,10 +1297,9 @@ const de_DescribeWatchlistCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1346,7 +1322,7 @@ export const de_DisassociateFraudsterCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1382,10 +1358,9 @@ const de_DisassociateFraudsterCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1408,7 +1383,7 @@ export const de_EvaluateSessionCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1444,10 +1419,9 @@ const de_EvaluateSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1470,7 +1444,7 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1500,10 +1474,9 @@ const de_ListDomainsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1526,7 +1499,7 @@ export const de_ListFraudsterRegistrationJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1559,10 +1532,9 @@ const de_ListFraudsterRegistrationJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1585,7 +1557,7 @@ export const de_ListFraudstersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1618,10 +1590,9 @@ const de_ListFraudstersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1644,7 +1615,7 @@ export const de_ListSpeakerEnrollmentJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1677,10 +1648,9 @@ const de_ListSpeakerEnrollmentJobsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1703,7 +1673,7 @@ export const de_ListSpeakersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1736,10 +1706,9 @@ const de_ListSpeakersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1757,12 +1726,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1795,10 +1764,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1821,7 +1789,7 @@ export const de_ListWatchlistsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1854,10 +1822,9 @@ const de_ListWatchlistsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1880,7 +1847,7 @@ export const de_OptOutSpeakerCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1919,10 +1886,9 @@ const de_OptOutSpeakerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1945,7 +1911,7 @@ export const de_StartFraudsterRegistrationJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1984,10 +1950,9 @@ const de_StartFraudsterRegistrationJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2010,7 +1975,7 @@ export const de_StartSpeakerEnrollmentJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2049,10 +2014,9 @@ const de_StartSpeakerEnrollmentJobCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2070,12 +2034,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2111,10 +2075,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2132,12 +2095,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2173,10 +2136,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2199,7 +2161,7 @@ export const de_UpdateDomainCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2235,10 +2197,9 @@ const de_UpdateDomainCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2261,7 +2222,7 @@ export const de_UpdateWatchlistCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2297,10 +2258,9 @@ const de_UpdateWatchlistCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2314,7 +2274,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2327,7 +2287,7 @@ const de_AccessDeniedExceptionRes = async ( */ const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ConflictException(body, context); + const deserialized: any = _json(body); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2343,7 +2303,7 @@ const de_InternalServerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InternalServerException(body, context); + const deserialized: any = _json(body); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2359,7 +2319,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2375,7 +2335,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ServiceQuotaExceededException(body, context); + const deserialized: any = _json(body); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2388,7 +2348,7 @@ const de_ServiceQuotaExceededExceptionRes = async ( */ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ThrottlingException(body, context); + const deserialized: any = _json(body); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2401,7 +2361,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont */ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ValidationException(body, context); + const deserialized: any = _json(body); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -2409,357 +2369,88 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0AssociateFraudsterRequest - */ -const se_AssociateFraudsterRequest = (input: AssociateFraudsterRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.FraudsterId != null && { FraudsterId: input.FraudsterId }), - ...(input.WatchlistId != null && { WatchlistId: input.WatchlistId }), - }; -}; +// se_AssociateFraudsterRequest omitted. /** * serializeAws_json1_0CreateDomainRequest */ const se_CreateDomainRequest = (input: CreateDomainRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ServerSideEncryptionConfiguration != null && { - ServerSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration( - input.ServerSideEncryptionConfiguration, - context - ), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + ServerSideEncryptionConfiguration: _json, + Tags: _json, + }); }; /** * serializeAws_json1_0CreateWatchlistRequest */ const se_CreateWatchlistRequest = (input: CreateWatchlistRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.Name != null && { Name: input.Name }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + DomainId: [], + Name: [], + }); }; -/** - * serializeAws_json1_0DeleteDomainRequest - */ -const se_DeleteDomainRequest = (input: DeleteDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - }; -}; +// se_DeleteDomainRequest omitted. -/** - * serializeAws_json1_0DeleteFraudsterRequest - */ -const se_DeleteFraudsterRequest = (input: DeleteFraudsterRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.FraudsterId != null && { FraudsterId: input.FraudsterId }), - }; -}; +// se_DeleteFraudsterRequest omitted. -/** - * serializeAws_json1_0DeleteSpeakerRequest - */ -const se_DeleteSpeakerRequest = (input: DeleteSpeakerRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpeakerId != null && { SpeakerId: input.SpeakerId }), - }; -}; +// se_DeleteSpeakerRequest omitted. -/** - * serializeAws_json1_0DeleteWatchlistRequest - */ -const se_DeleteWatchlistRequest = (input: DeleteWatchlistRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.WatchlistId != null && { WatchlistId: input.WatchlistId }), - }; -}; +// se_DeleteWatchlistRequest omitted. -/** - * serializeAws_json1_0DescribeDomainRequest - */ -const se_DescribeDomainRequest = (input: DescribeDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - }; -}; +// se_DescribeDomainRequest omitted. -/** - * serializeAws_json1_0DescribeFraudsterRegistrationJobRequest - */ -const se_DescribeFraudsterRegistrationJobRequest = ( - input: DescribeFraudsterRegistrationJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeFraudsterRegistrationJobRequest omitted. -/** - * serializeAws_json1_0DescribeFraudsterRequest - */ -const se_DescribeFraudsterRequest = (input: DescribeFraudsterRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.FraudsterId != null && { FraudsterId: input.FraudsterId }), - }; -}; +// se_DescribeFraudsterRequest omitted. -/** - * serializeAws_json1_0DescribeSpeakerEnrollmentJobRequest - */ -const se_DescribeSpeakerEnrollmentJobRequest = ( - input: DescribeSpeakerEnrollmentJobRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.JobId != null && { JobId: input.JobId }), - }; -}; +// se_DescribeSpeakerEnrollmentJobRequest omitted. -/** - * serializeAws_json1_0DescribeSpeakerRequest - */ -const se_DescribeSpeakerRequest = (input: DescribeSpeakerRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpeakerId != null && { SpeakerId: input.SpeakerId }), - }; -}; +// se_DescribeSpeakerRequest omitted. -/** - * serializeAws_json1_0DescribeWatchlistRequest - */ -const se_DescribeWatchlistRequest = (input: DescribeWatchlistRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.WatchlistId != null && { WatchlistId: input.WatchlistId }), - }; -}; +// se_DescribeWatchlistRequest omitted. -/** - * serializeAws_json1_0DisassociateFraudsterRequest - */ -const se_DisassociateFraudsterRequest = (input: DisassociateFraudsterRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.FraudsterId != null && { FraudsterId: input.FraudsterId }), - ...(input.WatchlistId != null && { WatchlistId: input.WatchlistId }), - }; -}; +// se_DisassociateFraudsterRequest omitted. -/** - * serializeAws_json1_0EnrollmentConfig - */ -const se_EnrollmentConfig = (input: EnrollmentConfig, context: __SerdeContext): any => { - return { - ...(input.ExistingEnrollmentAction != null && { ExistingEnrollmentAction: input.ExistingEnrollmentAction }), - ...(input.FraudDetectionConfig != null && { - FraudDetectionConfig: se_EnrollmentJobFraudDetectionConfig(input.FraudDetectionConfig, context), - }), - }; -}; +// se_EnrollmentConfig omitted. -/** - * serializeAws_json1_0EnrollmentJobFraudDetectionConfig - */ -const se_EnrollmentJobFraudDetectionConfig = ( - input: EnrollmentJobFraudDetectionConfig, - context: __SerdeContext -): any => { - return { - ...(input.FraudDetectionAction != null && { FraudDetectionAction: input.FraudDetectionAction }), - ...(input.RiskThreshold != null && { RiskThreshold: input.RiskThreshold }), - ...(input.WatchlistIds != null && { - WatchlistIds: se_EnrollmentJobFraudDetectionConfigWatchlistIds(input.WatchlistIds, context), - }), - }; -}; +// se_EnrollmentJobFraudDetectionConfig omitted. -/** - * serializeAws_json1_0EnrollmentJobFraudDetectionConfigWatchlistIds - */ -const se_EnrollmentJobFraudDetectionConfigWatchlistIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_EnrollmentJobFraudDetectionConfigWatchlistIds omitted. -/** - * serializeAws_json1_0EvaluateSessionRequest - */ -const se_EvaluateSessionRequest = (input: EvaluateSessionRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SessionNameOrId != null && { SessionNameOrId: input.SessionNameOrId }), - }; -}; +// se_EvaluateSessionRequest omitted. -/** - * serializeAws_json1_0InputDataConfig - */ -const se_InputDataConfig = (input: InputDataConfig, context: __SerdeContext): any => { - return { - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_InputDataConfig omitted. -/** - * serializeAws_json1_0ListDomainsRequest - */ -const se_ListDomainsRequest = (input: ListDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListDomainsRequest omitted. -/** - * serializeAws_json1_0ListFraudsterRegistrationJobsRequest - */ -const se_ListFraudsterRegistrationJobsRequest = ( - input: ListFraudsterRegistrationJobsRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListFraudsterRegistrationJobsRequest omitted. -/** - * serializeAws_json1_0ListFraudstersRequest - */ -const se_ListFraudstersRequest = (input: ListFraudstersRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WatchlistId != null && { WatchlistId: input.WatchlistId }), - }; -}; +// se_ListFraudstersRequest omitted. -/** - * serializeAws_json1_0ListSpeakerEnrollmentJobsRequest - */ -const se_ListSpeakerEnrollmentJobsRequest = (input: ListSpeakerEnrollmentJobsRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.JobStatus != null && { JobStatus: input.JobStatus }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListSpeakerEnrollmentJobsRequest omitted. -/** - * serializeAws_json1_0ListSpeakersRequest - */ -const se_ListSpeakersRequest = (input: ListSpeakersRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListSpeakersRequest omitted. -/** - * serializeAws_json1_0ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_0ListWatchlistsRequest - */ -const se_ListWatchlistsRequest = (input: ListWatchlistsRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListWatchlistsRequest omitted. -/** - * serializeAws_json1_0OptOutSpeakerRequest - */ -const se_OptOutSpeakerRequest = (input: OptOutSpeakerRequest, context: __SerdeContext): any => { - return { - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.SpeakerId != null && { SpeakerId: input.SpeakerId }), - }; -}; +// se_OptOutSpeakerRequest omitted. -/** - * serializeAws_json1_0OutputDataConfig - */ -const se_OutputDataConfig = (input: OutputDataConfig, context: __SerdeContext): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - ...(input.S3Uri != null && { S3Uri: input.S3Uri }), - }; -}; +// se_OutputDataConfig omitted. -/** - * serializeAws_json1_0RegistrationConfig - */ -const se_RegistrationConfig = (input: RegistrationConfig, context: __SerdeContext): any => { - return { - ...(input.DuplicateRegistrationAction != null && { - DuplicateRegistrationAction: input.DuplicateRegistrationAction, - }), - ...(input.FraudsterSimilarityThreshold != null && { - FraudsterSimilarityThreshold: input.FraudsterSimilarityThreshold, - }), - ...(input.WatchlistIds != null && { WatchlistIds: se_RegistrationConfigWatchlistIds(input.WatchlistIds, context) }), - }; -}; +// se_RegistrationConfig omitted. -/** - * serializeAws_json1_0RegistrationConfigWatchlistIds - */ -const se_RegistrationConfigWatchlistIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RegistrationConfigWatchlistIds omitted. -/** - * serializeAws_json1_0ServerSideEncryptionConfiguration - */ -const se_ServerSideEncryptionConfiguration = ( - input: ServerSideEncryptionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }), - }; -}; +// se_ServerSideEncryptionConfiguration omitted. /** * serializeAws_json1_0StartFraudsterRegistrationJobRequest @@ -2768,200 +2459,102 @@ const se_StartFraudsterRegistrationJobRequest = ( input: StartFraudsterRegistrationJobRequest, context: __SerdeContext ): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - ...(input.RegistrationConfig != null && { - RegistrationConfig: se_RegistrationConfig(input.RegistrationConfig, context), - }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DomainId: [], + InputDataConfig: _json, + JobName: [], + OutputDataConfig: _json, + RegistrationConfig: _json, + }); }; /** * serializeAws_json1_0StartSpeakerEnrollmentJobRequest */ const se_StartSpeakerEnrollmentJobRequest = (input: StartSpeakerEnrollmentJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.EnrollmentConfig != null && { EnrollmentConfig: se_EnrollmentConfig(input.EnrollmentConfig, context) }), - ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }), - ...(input.JobName != null && { JobName: input.JobName }), - ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DataAccessRoleArn: [], + DomainId: [], + EnrollmentConfig: _json, + InputDataConfig: _json, + JobName: [], + OutputDataConfig: _json, + }); }; -/** - * serializeAws_json1_0Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_json1_0TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * serializeAws_json1_0TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_TagResourceRequest omitted. -/** - * serializeAws_json1_0UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_UntagResourceRequest omitted. -/** - * serializeAws_json1_0UpdateDomainRequest - */ -const se_UpdateDomainRequest = (input: UpdateDomainRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ServerSideEncryptionConfiguration != null && { - ServerSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration( - input.ServerSideEncryptionConfiguration, - context - ), - }), - }; -}; +// se_UpdateDomainRequest omitted. -/** - * serializeAws_json1_0UpdateWatchlistRequest - */ -const se_UpdateWatchlistRequest = (input: UpdateWatchlistRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DomainId != null && { DomainId: input.DomainId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.WatchlistId != null && { WatchlistId: input.WatchlistId }), - }; -}; +// se_UpdateWatchlistRequest omitted. -/** - * deserializeAws_json1_0AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_AccessDeniedException omitted. /** * deserializeAws_json1_0AssociateFraudsterResponse */ const de_AssociateFraudsterResponse = (output: any, context: __SerdeContext): AssociateFraudsterResponse => { - return { - Fraudster: output.Fraudster != null ? de_Fraudster(output.Fraudster, context) : undefined, - } as any; + return take(output, { + Fraudster: (_: any) => de_Fraudster(_, context), + }) as any; }; -/** - * deserializeAws_json1_0AuthenticationConfiguration - */ -const de_AuthenticationConfiguration = (output: any, context: __SerdeContext): AuthenticationConfiguration => { - return { - AcceptanceThreshold: __expectInt32(output.AcceptanceThreshold), - } as any; -}; +// de_AuthenticationConfiguration omitted. /** * deserializeAws_json1_0AuthenticationResult */ const de_AuthenticationResult = (output: any, context: __SerdeContext): AuthenticationResult => { - return { - AudioAggregationEndedAt: - output.AudioAggregationEndedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationEndedAt))) - : undefined, - AudioAggregationStartedAt: - output.AudioAggregationStartedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationStartedAt))) - : undefined, - AuthenticationResultId: __expectString(output.AuthenticationResultId), - Configuration: - output.Configuration != null ? de_AuthenticationConfiguration(output.Configuration, context) : undefined, - CustomerSpeakerId: __expectString(output.CustomerSpeakerId), - Decision: __expectString(output.Decision), - GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId), - Score: __expectInt32(output.Score), - } as any; -}; - -/** - * deserializeAws_json1_0ConflictException - */ -const de_ConflictException = (output: any, context: __SerdeContext): ConflictException => { - return { - ConflictType: __expectString(output.ConflictType), - Message: __expectString(output.Message), - } as any; + return take(output, { + AudioAggregationEndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AudioAggregationStartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AuthenticationResultId: __expectString, + Configuration: _json, + CustomerSpeakerId: __expectString, + Decision: __expectString, + GeneratedSpeakerId: __expectString, + Score: __expectInt32, + }) as any; }; +// de_ConflictException omitted. + /** * deserializeAws_json1_0CreateDomainResponse */ const de_CreateDomainResponse = (output: any, context: __SerdeContext): CreateDomainResponse => { - return { - Domain: output.Domain != null ? de_Domain(output.Domain, context) : undefined, - } as any; + return take(output, { + Domain: (_: any) => de_Domain(_, context), + }) as any; }; /** * deserializeAws_json1_0CreateWatchlistResponse */ const de_CreateWatchlistResponse = (output: any, context: __SerdeContext): CreateWatchlistResponse => { - return { - Watchlist: output.Watchlist != null ? de_Watchlist(output.Watchlist, context) : undefined, - } as any; + return take(output, { + Watchlist: (_: any) => de_Watchlist(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeDomainResponse */ const de_DescribeDomainResponse = (output: any, context: __SerdeContext): DescribeDomainResponse => { - return { - Domain: output.Domain != null ? de_Domain(output.Domain, context) : undefined, - } as any; + return take(output, { + Domain: (_: any) => de_Domain(_, context), + }) as any; }; /** @@ -2971,18 +2564,18 @@ const de_DescribeFraudsterRegistrationJobResponse = ( output: any, context: __SerdeContext ): DescribeFraudsterRegistrationJobResponse => { - return { - Job: output.Job != null ? de_FraudsterRegistrationJob(output.Job, context) : undefined, - } as any; + return take(output, { + Job: (_: any) => de_FraudsterRegistrationJob(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeFraudsterResponse */ const de_DescribeFraudsterResponse = (output: any, context: __SerdeContext): DescribeFraudsterResponse => { - return { - Fraudster: output.Fraudster != null ? de_Fraudster(output.Fraudster, context) : undefined, - } as any; + return take(output, { + Fraudster: (_: any) => de_Fraudster(_, context), + }) as any; }; /** @@ -2992,63 +2585,54 @@ const de_DescribeSpeakerEnrollmentJobResponse = ( output: any, context: __SerdeContext ): DescribeSpeakerEnrollmentJobResponse => { - return { - Job: output.Job != null ? de_SpeakerEnrollmentJob(output.Job, context) : undefined, - } as any; + return take(output, { + Job: (_: any) => de_SpeakerEnrollmentJob(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeSpeakerResponse */ const de_DescribeSpeakerResponse = (output: any, context: __SerdeContext): DescribeSpeakerResponse => { - return { - Speaker: output.Speaker != null ? de_Speaker(output.Speaker, context) : undefined, - } as any; + return take(output, { + Speaker: (_: any) => de_Speaker(_, context), + }) as any; }; /** * deserializeAws_json1_0DescribeWatchlistResponse */ const de_DescribeWatchlistResponse = (output: any, context: __SerdeContext): DescribeWatchlistResponse => { - return { - Watchlist: output.Watchlist != null ? de_Watchlist(output.Watchlist, context) : undefined, - } as any; + return take(output, { + Watchlist: (_: any) => de_Watchlist(_, context), + }) as any; }; /** * deserializeAws_json1_0DisassociateFraudsterResponse */ const de_DisassociateFraudsterResponse = (output: any, context: __SerdeContext): DisassociateFraudsterResponse => { - return { - Fraudster: output.Fraudster != null ? de_Fraudster(output.Fraudster, context) : undefined, - } as any; + return take(output, { + Fraudster: (_: any) => de_Fraudster(_, context), + }) as any; }; /** * deserializeAws_json1_0Domain */ const de_Domain = (output: any, context: __SerdeContext): Domain => { - return { - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - DomainId: __expectString(output.DomainId), - DomainStatus: __expectString(output.DomainStatus), - Name: __expectString(output.Name), - ServerSideEncryptionConfiguration: - output.ServerSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) - : undefined, - ServerSideEncryptionUpdateDetails: - output.ServerSideEncryptionUpdateDetails != null - ? de_ServerSideEncryptionUpdateDetails(output.ServerSideEncryptionUpdateDetails, context) - : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WatchlistDetails: - output.WatchlistDetails != null ? de_WatchlistDetails(output.WatchlistDetails, context) : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DomainId: __expectString, + DomainStatus: __expectString, + Name: __expectString, + ServerSideEncryptionConfiguration: _json, + ServerSideEncryptionUpdateDetails: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WatchlistDetails: _json, + }) as any; }; /** @@ -3058,9 +2642,6 @@ const de_DomainSummaries = (output: any, context: __SerdeContext): DomainSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainSummary(entry, context); }); return retVal; @@ -3070,194 +2651,93 @@ const de_DomainSummaries = (output: any, context: __SerdeContext): DomainSummary * deserializeAws_json1_0DomainSummary */ const de_DomainSummary = (output: any, context: __SerdeContext): DomainSummary => { - return { - Arn: __expectString(output.Arn), - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - DomainId: __expectString(output.DomainId), - DomainStatus: __expectString(output.DomainStatus), - Name: __expectString(output.Name), - ServerSideEncryptionConfiguration: - output.ServerSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.ServerSideEncryptionConfiguration, context) - : undefined, - ServerSideEncryptionUpdateDetails: - output.ServerSideEncryptionUpdateDetails != null - ? de_ServerSideEncryptionUpdateDetails(output.ServerSideEncryptionUpdateDetails, context) - : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WatchlistDetails: - output.WatchlistDetails != null ? de_WatchlistDetails(output.WatchlistDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0EnrollmentConfig - */ -const de_EnrollmentConfig = (output: any, context: __SerdeContext): EnrollmentConfig => { - return { - ExistingEnrollmentAction: __expectString(output.ExistingEnrollmentAction), - FraudDetectionConfig: - output.FraudDetectionConfig != null - ? de_EnrollmentJobFraudDetectionConfig(output.FraudDetectionConfig, context) - : undefined, - } as any; + return take(output, { + Arn: __expectString, + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DomainId: __expectString, + DomainStatus: __expectString, + Name: __expectString, + ServerSideEncryptionConfiguration: _json, + ServerSideEncryptionUpdateDetails: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WatchlistDetails: _json, + }) as any; }; -/** - * deserializeAws_json1_0EnrollmentJobFraudDetectionConfig - */ -const de_EnrollmentJobFraudDetectionConfig = ( - output: any, - context: __SerdeContext -): EnrollmentJobFraudDetectionConfig => { - return { - FraudDetectionAction: __expectString(output.FraudDetectionAction), - RiskThreshold: __expectInt32(output.RiskThreshold), - WatchlistIds: - output.WatchlistIds != null - ? de_EnrollmentJobFraudDetectionConfigWatchlistIds(output.WatchlistIds, context) - : undefined, - } as any; -}; +// de_EnrollmentConfig omitted. -/** - * deserializeAws_json1_0EnrollmentJobFraudDetectionConfigWatchlistIds - */ -const de_EnrollmentJobFraudDetectionConfigWatchlistIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EnrollmentJobFraudDetectionConfig omitted. + +// de_EnrollmentJobFraudDetectionConfigWatchlistIds omitted. /** * deserializeAws_json1_0EvaluateSessionResponse */ const de_EvaluateSessionResponse = (output: any, context: __SerdeContext): EvaluateSessionResponse => { - return { - AuthenticationResult: - output.AuthenticationResult != null ? de_AuthenticationResult(output.AuthenticationResult, context) : undefined, - DomainId: __expectString(output.DomainId), - FraudDetectionResult: - output.FraudDetectionResult != null ? de_FraudDetectionResult(output.FraudDetectionResult, context) : undefined, - SessionId: __expectString(output.SessionId), - SessionName: __expectString(output.SessionName), - StreamingStatus: __expectString(output.StreamingStatus), - } as any; + return take(output, { + AuthenticationResult: (_: any) => de_AuthenticationResult(_, context), + DomainId: __expectString, + FraudDetectionResult: (_: any) => de_FraudDetectionResult(_, context), + SessionId: __expectString, + SessionName: __expectString, + StreamingStatus: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0FailureDetails - */ -const de_FailureDetails = (output: any, context: __SerdeContext): FailureDetails => { - return { - Message: __expectString(output.Message), - StatusCode: __expectInt32(output.StatusCode), - } as any; -}; +// de_FailureDetails omitted. -/** - * deserializeAws_json1_0FraudDetectionConfiguration - */ -const de_FraudDetectionConfiguration = (output: any, context: __SerdeContext): FraudDetectionConfiguration => { - return { - RiskThreshold: __expectInt32(output.RiskThreshold), - WatchlistId: __expectString(output.WatchlistId), - } as any; -}; +// de_FraudDetectionConfiguration omitted. -/** - * deserializeAws_json1_0FraudDetectionReasons - */ -const de_FraudDetectionReasons = (output: any, context: __SerdeContext): (FraudDetectionReason | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FraudDetectionReasons omitted. /** * deserializeAws_json1_0FraudDetectionResult */ const de_FraudDetectionResult = (output: any, context: __SerdeContext): FraudDetectionResult => { - return { - AudioAggregationEndedAt: - output.AudioAggregationEndedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationEndedAt))) - : undefined, - AudioAggregationStartedAt: - output.AudioAggregationStartedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.AudioAggregationStartedAt))) - : undefined, - Configuration: - output.Configuration != null ? de_FraudDetectionConfiguration(output.Configuration, context) : undefined, - Decision: __expectString(output.Decision), - FraudDetectionResultId: __expectString(output.FraudDetectionResultId), - Reasons: output.Reasons != null ? de_FraudDetectionReasons(output.Reasons, context) : undefined, - RiskDetails: output.RiskDetails != null ? de_FraudRiskDetails(output.RiskDetails, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_0FraudRiskDetails - */ -const de_FraudRiskDetails = (output: any, context: __SerdeContext): FraudRiskDetails => { - return { - KnownFraudsterRisk: - output.KnownFraudsterRisk != null ? de_KnownFraudsterRisk(output.KnownFraudsterRisk, context) : undefined, - VoiceSpoofingRisk: - output.VoiceSpoofingRisk != null ? de_VoiceSpoofingRisk(output.VoiceSpoofingRisk, context) : undefined, - } as any; + return take(output, { + AudioAggregationEndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + AudioAggregationStartedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Configuration: _json, + Decision: __expectString, + FraudDetectionResultId: __expectString, + Reasons: _json, + RiskDetails: _json, + }) as any; }; +// de_FraudRiskDetails omitted. + /** * deserializeAws_json1_0Fraudster */ const de_Fraudster = (output: any, context: __SerdeContext): Fraudster => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainId: __expectString(output.DomainId), - GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId), - WatchlistIds: output.WatchlistIds != null ? de_ResponseWatchlistIds(output.WatchlistIds, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + GeneratedFraudsterId: __expectString, + WatchlistIds: _json, + }) as any; }; /** * deserializeAws_json1_0FraudsterRegistrationJob */ const de_FraudsterRegistrationJob = (output: any, context: __SerdeContext): FraudsterRegistrationJob => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DomainId: __expectString(output.DomainId), - EndedAt: - output.EndedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) : undefined, - FailureDetails: output.FailureDetails != null ? de_FailureDetails(output.FailureDetails, context) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobProgress: output.JobProgress != null ? de_JobProgress(output.JobProgress, context) : undefined, - JobStatus: __expectString(output.JobStatus), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - RegistrationConfig: - output.RegistrationConfig != null ? de_RegistrationConfig(output.RegistrationConfig, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataAccessRoleArn: __expectString, + DomainId: __expectString, + EndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureDetails: _json, + InputDataConfig: _json, + JobId: __expectString, + JobName: __expectString, + JobProgress: _json, + JobStatus: __expectString, + OutputDataConfig: _json, + RegistrationConfig: _json, + }) as any; }; /** @@ -3270,9 +2750,6 @@ const de_FraudsterRegistrationJobSummaries = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FraudsterRegistrationJobSummary(entry, context); }); return retVal; @@ -3282,18 +2759,16 @@ const de_FraudsterRegistrationJobSummaries = ( * deserializeAws_json1_0FraudsterRegistrationJobSummary */ const de_FraudsterRegistrationJobSummary = (output: any, context: __SerdeContext): FraudsterRegistrationJobSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainId: __expectString(output.DomainId), - EndedAt: - output.EndedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) : undefined, - FailureDetails: output.FailureDetails != null ? de_FailureDetails(output.FailureDetails, context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobProgress: output.JobProgress != null ? de_JobProgress(output.JobProgress, context) : undefined, - JobStatus: __expectString(output.JobStatus), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + EndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureDetails: _json, + JobId: __expectString, + JobName: __expectString, + JobProgress: _json, + JobStatus: __expectString, + }) as any; }; /** @@ -3303,9 +2778,6 @@ const de_FraudsterSummaries = (output: any, context: __SerdeContext): FraudsterS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FraudsterSummary(entry, context); }); return retVal; @@ -3315,60 +2787,30 @@ const de_FraudsterSummaries = (output: any, context: __SerdeContext): FraudsterS * deserializeAws_json1_0FraudsterSummary */ const de_FraudsterSummary = (output: any, context: __SerdeContext): FraudsterSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainId: __expectString(output.DomainId), - GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId), - WatchlistIds: output.WatchlistIds != null ? de_ResponseWatchlistIds(output.WatchlistIds, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + GeneratedFraudsterId: __expectString, + WatchlistIds: _json, + }) as any; }; -/** - * deserializeAws_json1_0InputDataConfig - */ -const de_InputDataConfig = (output: any, context: __SerdeContext): InputDataConfig => { - return { - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_InputDataConfig omitted. -/** - * deserializeAws_json1_0InternalServerException - */ -const de_InternalServerException = (output: any, context: __SerdeContext): InternalServerException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InternalServerException omitted. -/** - * deserializeAws_json1_0JobProgress - */ -const de_JobProgress = (output: any, context: __SerdeContext): JobProgress => { - return { - PercentComplete: __expectInt32(output.PercentComplete), - } as any; -}; +// de_JobProgress omitted. -/** - * deserializeAws_json1_0KnownFraudsterRisk - */ -const de_KnownFraudsterRisk = (output: any, context: __SerdeContext): KnownFraudsterRisk => { - return { - GeneratedFraudsterId: __expectString(output.GeneratedFraudsterId), - RiskScore: __expectInt32(output.RiskScore), - } as any; -}; +// de_KnownFraudsterRisk omitted. /** * deserializeAws_json1_0ListDomainsResponse */ const de_ListDomainsResponse = (output: any, context: __SerdeContext): ListDomainsResponse => { - return { - DomainSummaries: output.DomainSummaries != null ? de_DomainSummaries(output.DomainSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + DomainSummaries: (_: any) => de_DomainSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -3378,22 +2820,20 @@ const de_ListFraudsterRegistrationJobsResponse = ( output: any, context: __SerdeContext ): ListFraudsterRegistrationJobsResponse => { - return { - JobSummaries: - output.JobSummaries != null ? de_FraudsterRegistrationJobSummaries(output.JobSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + JobSummaries: (_: any) => de_FraudsterRegistrationJobSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListFraudstersResponse */ const de_ListFraudstersResponse = (output: any, context: __SerdeContext): ListFraudstersResponse => { - return { - FraudsterSummaries: - output.FraudsterSummaries != null ? de_FraudsterSummaries(output.FraudsterSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + FraudsterSummaries: (_: any) => de_FraudsterSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** @@ -3403,192 +2843,92 @@ const de_ListSpeakerEnrollmentJobsResponse = ( output: any, context: __SerdeContext ): ListSpeakerEnrollmentJobsResponse => { - return { - JobSummaries: - output.JobSummaries != null ? de_SpeakerEnrollmentJobSummaries(output.JobSummaries, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + JobSummaries: (_: any) => de_SpeakerEnrollmentJobSummaries(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_0ListSpeakersResponse */ const de_ListSpeakersResponse = (output: any, context: __SerdeContext): ListSpeakersResponse => { - return { - NextToken: __expectString(output.NextToken), - SpeakerSummaries: - output.SpeakerSummaries != null ? de_SpeakerSummaries(output.SpeakerSummaries, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + SpeakerSummaries: (_: any) => de_SpeakerSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_0ListWatchlistsResponse */ const de_ListWatchlistsResponse = (output: any, context: __SerdeContext): ListWatchlistsResponse => { - return { - NextToken: __expectString(output.NextToken), - WatchlistSummaries: - output.WatchlistSummaries != null ? de_WatchlistSummaries(output.WatchlistSummaries, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + WatchlistSummaries: (_: any) => de_WatchlistSummaries(_, context), + }) as any; }; /** * deserializeAws_json1_0OptOutSpeakerResponse */ const de_OptOutSpeakerResponse = (output: any, context: __SerdeContext): OptOutSpeakerResponse => { - return { - Speaker: output.Speaker != null ? de_Speaker(output.Speaker, context) : undefined, - } as any; + return take(output, { + Speaker: (_: any) => de_Speaker(_, context), + }) as any; }; -/** - * deserializeAws_json1_0OutputDataConfig - */ -const de_OutputDataConfig = (output: any, context: __SerdeContext): OutputDataConfig => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - S3Uri: __expectString(output.S3Uri), - } as any; -}; +// de_OutputDataConfig omitted. -/** - * deserializeAws_json1_0RegistrationConfig - */ -const de_RegistrationConfig = (output: any, context: __SerdeContext): RegistrationConfig => { - return { - DuplicateRegistrationAction: __expectString(output.DuplicateRegistrationAction), - FraudsterSimilarityThreshold: __expectInt32(output.FraudsterSimilarityThreshold), - WatchlistIds: - output.WatchlistIds != null ? de_RegistrationConfigWatchlistIds(output.WatchlistIds, context) : undefined, - } as any; -}; +// de_RegistrationConfig omitted. -/** - * deserializeAws_json1_0RegistrationConfigWatchlistIds - */ -const de_RegistrationConfigWatchlistIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RegistrationConfigWatchlistIds omitted. -/** - * deserializeAws_json1_0ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - ResourceType: __expectString(output.ResourceType), - } as any; -}; +// de_ResourceNotFoundException omitted. -/** - * deserializeAws_json1_0ResponseWatchlistIds - */ -const de_ResponseWatchlistIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ResponseWatchlistIds omitted. -/** - * deserializeAws_json1_0ServerSideEncryptionConfiguration - */ -const de_ServerSideEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): ServerSideEncryptionConfiguration => { - return { - KmsKeyId: __expectString(output.KmsKeyId), - } as any; -}; +// de_ServerSideEncryptionConfiguration omitted. -/** - * deserializeAws_json1_0ServerSideEncryptionUpdateDetails - */ -const de_ServerSideEncryptionUpdateDetails = ( - output: any, - context: __SerdeContext -): ServerSideEncryptionUpdateDetails => { - return { - Message: __expectString(output.Message), - OldKmsKeyId: __expectString(output.OldKmsKeyId), - UpdateStatus: __expectString(output.UpdateStatus), - } as any; -}; +// de_ServerSideEncryptionUpdateDetails omitted. -/** - * deserializeAws_json1_0ServiceQuotaExceededException - */ -const de_ServiceQuotaExceededException = (output: any, context: __SerdeContext): ServiceQuotaExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ServiceQuotaExceededException omitted. /** * deserializeAws_json1_0Speaker */ const de_Speaker = (output: any, context: __SerdeContext): Speaker => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CustomerSpeakerId: __expectString(output.CustomerSpeakerId), - DomainId: __expectString(output.DomainId), - GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId), - LastAccessedAt: - output.LastAccessedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedAt))) - : undefined, - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomerSpeakerId: __expectString, + DomainId: __expectString, + GeneratedSpeakerId: __expectString, + LastAccessedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** * deserializeAws_json1_0SpeakerEnrollmentJob */ const de_SpeakerEnrollmentJob = (output: any, context: __SerdeContext): SpeakerEnrollmentJob => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DataAccessRoleArn: __expectString(output.DataAccessRoleArn), - DomainId: __expectString(output.DomainId), - EndedAt: - output.EndedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) : undefined, - EnrollmentConfig: - output.EnrollmentConfig != null ? de_EnrollmentConfig(output.EnrollmentConfig, context) : undefined, - FailureDetails: output.FailureDetails != null ? de_FailureDetails(output.FailureDetails, context) : undefined, - InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobProgress: output.JobProgress != null ? de_JobProgress(output.JobProgress, context) : undefined, - JobStatus: __expectString(output.JobStatus), - OutputDataConfig: - output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DataAccessRoleArn: __expectString, + DomainId: __expectString, + EndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnrollmentConfig: _json, + FailureDetails: _json, + InputDataConfig: _json, + JobId: __expectString, + JobName: __expectString, + JobProgress: _json, + JobStatus: __expectString, + OutputDataConfig: _json, + }) as any; }; /** @@ -3598,9 +2938,6 @@ const de_SpeakerEnrollmentJobSummaries = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SpeakerEnrollmentJobSummary(entry, context); }); return retVal; @@ -3610,18 +2947,16 @@ const de_SpeakerEnrollmentJobSummaries = (output: any, context: __SerdeContext): * deserializeAws_json1_0SpeakerEnrollmentJobSummary */ const de_SpeakerEnrollmentJobSummary = (output: any, context: __SerdeContext): SpeakerEnrollmentJobSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DomainId: __expectString(output.DomainId), - EndedAt: - output.EndedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndedAt))) : undefined, - FailureDetails: output.FailureDetails != null ? de_FailureDetails(output.FailureDetails, context) : undefined, - JobId: __expectString(output.JobId), - JobName: __expectString(output.JobName), - JobProgress: output.JobProgress != null ? de_JobProgress(output.JobProgress, context) : undefined, - JobStatus: __expectString(output.JobStatus), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainId: __expectString, + EndedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + FailureDetails: _json, + JobId: __expectString, + JobName: __expectString, + JobProgress: _json, + JobStatus: __expectString, + }) as any; }; /** @@ -3631,9 +2966,6 @@ const de_SpeakerSummaries = (output: any, context: __SerdeContext): SpeakerSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SpeakerSummary(entry, context); }); return retVal; @@ -3643,20 +2975,15 @@ const de_SpeakerSummaries = (output: any, context: __SerdeContext): SpeakerSumma * deserializeAws_json1_0SpeakerSummary */ const de_SpeakerSummary = (output: any, context: __SerdeContext): SpeakerSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - CustomerSpeakerId: __expectString(output.CustomerSpeakerId), - DomainId: __expectString(output.DomainId), - GeneratedSpeakerId: __expectString(output.GeneratedSpeakerId), - LastAccessedAt: - output.LastAccessedAt != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastAccessedAt))) - : undefined, - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CustomerSpeakerId: __expectString, + DomainId: __expectString, + GeneratedSpeakerId: __expectString, + LastAccessedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3666,9 +2993,9 @@ const de_StartFraudsterRegistrationJobResponse = ( output: any, context: __SerdeContext ): StartFraudsterRegistrationJobResponse => { - return { - Job: output.Job != null ? de_FraudsterRegistrationJob(output.Job, context) : undefined, - } as any; + return take(output, { + Job: (_: any) => de_FraudsterRegistrationJob(_, context), + }) as any; }; /** @@ -3678,120 +3005,59 @@ const de_StartSpeakerEnrollmentJobResponse = ( output: any, context: __SerdeContext ): StartSpeakerEnrollmentJobResponse => { - return { - Job: output.Job != null ? de_SpeakerEnrollmentJob(output.Job, context) : undefined, - } as any; + return take(output, { + Job: (_: any) => de_SpeakerEnrollmentJob(_, context), + }) as any; }; -/** - * deserializeAws_json1_0Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_0TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_0TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_0ThrottlingException - */ -const de_ThrottlingException = (output: any, context: __SerdeContext): ThrottlingException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ThrottlingException omitted. -/** - * deserializeAws_json1_0UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. /** * deserializeAws_json1_0UpdateDomainResponse */ const de_UpdateDomainResponse = (output: any, context: __SerdeContext): UpdateDomainResponse => { - return { - Domain: output.Domain != null ? de_Domain(output.Domain, context) : undefined, - } as any; + return take(output, { + Domain: (_: any) => de_Domain(_, context), + }) as any; }; /** * deserializeAws_json1_0UpdateWatchlistResponse */ const de_UpdateWatchlistResponse = (output: any, context: __SerdeContext): UpdateWatchlistResponse => { - return { - Watchlist: output.Watchlist != null ? de_Watchlist(output.Watchlist, context) : undefined, - } as any; + return take(output, { + Watchlist: (_: any) => de_Watchlist(_, context), + }) as any; }; -/** - * deserializeAws_json1_0ValidationException - */ -const de_ValidationException = (output: any, context: __SerdeContext): ValidationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ValidationException omitted. -/** - * deserializeAws_json1_0VoiceSpoofingRisk - */ -const de_VoiceSpoofingRisk = (output: any, context: __SerdeContext): VoiceSpoofingRisk => { - return { - RiskScore: __expectInt32(output.RiskScore), - } as any; -}; +// de_VoiceSpoofingRisk omitted. /** * deserializeAws_json1_0Watchlist */ const de_Watchlist = (output: any, context: __SerdeContext): Watchlist => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DefaultWatchlist: __expectBoolean(output.DefaultWatchlist), - Description: __expectString(output.Description), - DomainId: __expectString(output.DomainId), - Name: __expectString(output.Name), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WatchlistId: __expectString(output.WatchlistId), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultWatchlist: __expectBoolean, + Description: __expectString, + DomainId: __expectString, + Name: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WatchlistId: __expectString, + }) as any; }; -/** - * deserializeAws_json1_0WatchlistDetails - */ -const de_WatchlistDetails = (output: any, context: __SerdeContext): WatchlistDetails => { - return { - DefaultWatchlistId: __expectString(output.DefaultWatchlistId), - } as any; -}; +// de_WatchlistDetails omitted. /** * deserializeAws_json1_0WatchlistSummaries @@ -3800,9 +3066,6 @@ const de_WatchlistSummaries = (output: any, context: __SerdeContext): WatchlistS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WatchlistSummary(entry, context); }); return retVal; @@ -3812,17 +3075,15 @@ const de_WatchlistSummaries = (output: any, context: __SerdeContext): WatchlistS * deserializeAws_json1_0WatchlistSummary */ const de_WatchlistSummary = (output: any, context: __SerdeContext): WatchlistSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - DefaultWatchlist: __expectBoolean(output.DefaultWatchlist), - Description: __expectString(output.Description), - DomainId: __expectString(output.DomainId), - Name: __expectString(output.Name), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WatchlistId: __expectString(output.WatchlistId), - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultWatchlist: __expectBoolean, + Description: __expectString, + DomainId: __expectString, + Name: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WatchlistId: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ @@ -3845,6 +3106,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-vpc-lattice/src/protocols/Aws_restJson1.ts b/clients/client-vpc-lattice/src/protocols/Aws_restJson1.ts index 6cd4653d7c9c..082875bf569d 100644 --- a/clients/client-vpc-lattice/src/protocols/Aws_restJson1.ts +++ b/clients/client-vpc-lattice/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -10,11 +11,12 @@ import { expectString as __expectString, expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -139,7 +141,6 @@ import { AccessDeniedException, AccessLogSubscriptionSummary, ConflictException, - DnsEntry, FixedResponseAction, ForwardAction, HeaderMatch, @@ -156,21 +157,16 @@ import { RuleMatch, RuleSummary, RuleUpdate, - RuleUpdateFailure, - RuleUpdateSuccess, ServiceNetworkServiceAssociationSummary, ServiceNetworkSummary, ServiceNetworkVpcAssociationSummary, ServiceQuotaExceededException, ServiceSummary, Target, - TargetFailure, TargetGroupConfig, TargetGroupSummary, - TargetSummary, ThrottlingException, ValidationException, - ValidationExceptionField, WeightedTargetGroup, } from "../models/models_0"; import { VPCLatticeServiceException as __BaseException } from "../models/VPCLatticeServiceException"; @@ -206,9 +202,11 @@ export const se_BatchUpdateRuleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.rules != null && { rules: se_RuleUpdateList(input.rules, context) }), - }); + body = JSON.stringify( + take(input, { + rules: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -234,12 +232,14 @@ export const se_CreateAccessLogSubscriptionCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/accesslogsubscriptions"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.destinationArn != null && { destinationArn: input.destinationArn }), - ...(input.resourceIdentifier != null && { resourceIdentifier: input.resourceIdentifier }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + destinationArn: [], + resourceIdentifier: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -273,14 +273,16 @@ export const se_CreateListenerCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.defaultAction != null && { defaultAction: se_RuleAction(input.defaultAction, context) }), - ...(input.name != null && { name: input.name }), - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + defaultAction: (_) => _json(_), + name: [], + port: [], + protocol: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -323,14 +325,16 @@ export const se_CreateRuleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: se_RuleAction(input.action, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.match != null && { match: se_RuleMatch(input.match, context) }), - ...(input.name != null && { name: input.name }), - ...(input.priority != null && { priority: input.priority }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + action: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + match: (_) => _json(_), + name: [], + priority: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -355,14 +359,16 @@ export const se_CreateServiceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/services"; let body: any; - body = JSON.stringify({ - ...(input.authType != null && { authType: input.authType }), - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.customDomainName != null && { customDomainName: input.customDomainName }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + authType: [], + certificateArn: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + customDomainName: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -387,12 +393,14 @@ export const se_CreateServiceNetworkCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworks"; let body: any; - body = JSON.stringify({ - ...(input.authType != null && { authType: input.authType }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + authType: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -418,12 +426,14 @@ export const se_CreateServiceNetworkServiceAssociationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworkserviceassociations"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.serviceIdentifier != null && { serviceIdentifier: input.serviceIdentifier }), - ...(input.serviceNetworkIdentifier != null && { serviceNetworkIdentifier: input.serviceNetworkIdentifier }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + serviceIdentifier: [], + serviceNetworkIdentifier: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -449,13 +459,15 @@ export const se_CreateServiceNetworkVpcAssociationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/servicenetworkvpcassociations"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupList(input.securityGroupIds, context) }), - ...(input.serviceNetworkIdentifier != null && { serviceNetworkIdentifier: input.serviceNetworkIdentifier }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.vpcIdentifier != null && { vpcIdentifier: input.vpcIdentifier }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + securityGroupIds: (_) => _json(_), + serviceNetworkIdentifier: [], + tags: (_) => _json(_), + vpcIdentifier: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -480,13 +492,15 @@ export const se_CreateTargetGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetgroups"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.config != null && { config: se_TargetGroupConfig(input.config, context) }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + config: (_) => _json(_), + name: [], + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -854,9 +868,11 @@ export const se_DeregisterTargetsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.targets != null && { targets: se_TargetList(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1504,9 +1520,11 @@ export const se_ListTargetsCommand = async ( nextToken: [, input.nextToken!], }); let body: any; - body = JSON.stringify({ - ...(input.targets != null && { targets: se_TargetList(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1541,9 +1559,11 @@ export const se_PutAuthPolicyCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1570,9 +1590,11 @@ export const se_PutResourcePolicyCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resourcepolicy/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.policy != null && { policy: input.policy }), - }); + body = JSON.stringify( + take(input, { + policy: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1607,9 +1629,11 @@ export const se_RegisterTargetsCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.targets != null && { targets: se_TargetList(input.targets, context) }), - }); + body = JSON.stringify( + take(input, { + targets: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1635,9 +1659,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_TagMap(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1702,9 +1728,11 @@ export const se_UpdateAccessLogSubscriptionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.destinationArn != null && { destinationArn: input.destinationArn }), - }); + body = JSON.stringify( + take(input, { + destinationArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1747,9 +1775,11 @@ export const se_UpdateListenerCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.defaultAction != null && { defaultAction: se_RuleAction(input.defaultAction, context) }), - }); + body = JSON.stringify( + take(input, { + defaultAction: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1800,11 +1830,13 @@ export const se_UpdateRuleCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: se_RuleAction(input.action, context) }), - ...(input.match != null && { match: se_RuleMatch(input.match, context) }), - ...(input.priority != null && { priority: input.priority }), - }); + body = JSON.stringify( + take(input, { + action: (_) => _json(_), + match: (_) => _json(_), + priority: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1838,10 +1870,12 @@ export const se_UpdateServiceCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.authType != null && { authType: input.authType }), - ...(input.certificateArn != null && { certificateArn: input.certificateArn }), - }); + body = JSON.stringify( + take(input, { + authType: [], + certificateArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1876,9 +1910,11 @@ export const se_UpdateServiceNetworkCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.authType != null && { authType: input.authType }), - }); + body = JSON.stringify( + take(input, { + authType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1913,9 +1949,11 @@ export const se_UpdateServiceNetworkVpcAssociationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.securityGroupIds != null && { securityGroupIds: se_SecurityGroupList(input.securityGroupIds, context) }), - }); + body = JSON.stringify( + take(input, { + securityGroupIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1949,9 +1987,11 @@ export const se_UpdateTargetGroupCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.healthCheck != null && { healthCheck: se_HealthCheckConfig(input.healthCheck, context) }), - }); + body = JSON.stringify( + take(input, { + healthCheck: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1977,12 +2017,11 @@ export const de_BatchUpdateRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.successful != null) { - contents.successful = de_RuleUpdateSuccessList(data.successful, context); - } - if (data.unsuccessful != null) { - contents.unsuccessful = de_RuleUpdateFailureList(data.unsuccessful, context); - } + const doc = take(data, { + successful: _json, + unsuccessful: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2019,10 +2058,9 @@ const de_BatchUpdateRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2042,21 +2080,14 @@ export const de_CreateAccessLogSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.destinationArn != null) { - contents.destinationArn = __expectString(data.destinationArn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + arn: __expectString, + destinationArn: __expectString, + id: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2093,10 +2124,9 @@ const de_CreateAccessLogSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2116,30 +2146,17 @@ export const de_CreateListenerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.defaultAction != null) { - contents.defaultAction = de_RuleAction(__expectUnion(data.defaultAction), context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.port != null) { - contents.port = __expectInt32(data.port); - } - if (data.protocol != null) { - contents.protocol = __expectString(data.protocol); - } - if (data.serviceArn != null) { - contents.serviceArn = __expectString(data.serviceArn); - } - if (data.serviceId != null) { - contents.serviceId = __expectString(data.serviceId); - } + const doc = take(data, { + arn: __expectString, + defaultAction: (_) => _json(__expectUnion(_)), + id: __expectString, + name: __expectString, + port: __expectInt32, + protocol: __expectString, + serviceArn: __expectString, + serviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2179,10 +2196,9 @@ const de_CreateListenerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2202,24 +2218,15 @@ export const de_CreateRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = de_RuleAction(__expectUnion(data.action), context); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.match != null) { - contents.match = de_RuleMatch(__expectUnion(data.match), context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.priority != null) { - contents.priority = __expectInt32(data.priority); - } + const doc = take(data, { + action: (_) => _json(__expectUnion(_)), + arn: __expectString, + id: __expectString, + match: (_) => _json(__expectUnion(_)), + name: __expectString, + priority: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2259,10 +2266,9 @@ const de_CreateRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2282,30 +2288,17 @@ export const de_CreateServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.customDomainName != null) { - contents.customDomainName = __expectString(data.customDomainName); - } - if (data.dnsEntry != null) { - contents.dnsEntry = de_DnsEntry(data.dnsEntry, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + authType: __expectString, + certificateArn: __expectString, + customDomainName: __expectString, + dnsEntry: _json, + id: __expectString, + name: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2345,10 +2338,9 @@ const de_CreateServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2368,18 +2360,13 @@ export const de_CreateServiceNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + authType: __expectString, + id: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2419,10 +2406,9 @@ const de_CreateServiceNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2442,24 +2428,15 @@ export const de_CreateServiceNetworkServiceAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.customDomainName != null) { - contents.customDomainName = __expectString(data.customDomainName); - } - if (data.dnsEntry != null) { - contents.dnsEntry = de_DnsEntry(data.dnsEntry, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + createdBy: __expectString, + customDomainName: __expectString, + dnsEntry: _json, + id: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2496,10 +2473,9 @@ const de_CreateServiceNetworkServiceAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2519,21 +2495,14 @@ export const de_CreateServiceNetworkVpcAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.securityGroupIds != null) { - contents.securityGroupIds = de_SecurityGroupList(data.securityGroupIds, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + createdBy: __expectString, + id: __expectString, + securityGroupIds: _json, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2573,10 +2542,9 @@ const de_CreateServiceNetworkVpcAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2596,24 +2564,15 @@ export const de_CreateTargetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.config != null) { - contents.config = de_TargetGroupConfig(data.config, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + arn: __expectString, + config: _json, + id: __expectString, + name: __expectString, + status: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2653,10 +2612,9 @@ const de_CreateTargetGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2709,10 +2667,9 @@ const de_DeleteAccessLogSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,10 +2722,9 @@ const de_DeleteAuthPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2824,10 +2780,9 @@ const de_DeleteListenerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2880,10 +2835,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2939,10 +2893,9 @@ const de_DeleteRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2962,18 +2915,13 @@ export const de_DeleteServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + name: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3010,10 +2958,9 @@ const de_DeleteServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3069,10 +3016,9 @@ const de_DeleteServiceNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3092,15 +3038,12 @@ export const de_DeleteServiceNetworkServiceAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3137,10 +3080,9 @@ const de_DeleteServiceNetworkServiceAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3160,15 +3102,12 @@ export const de_DeleteServiceNetworkVpcAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3205,10 +3144,9 @@ const de_DeleteServiceNetworkVpcAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3228,15 +3166,12 @@ export const de_DeleteTargetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + id: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3270,10 +3205,9 @@ const de_DeleteTargetGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3293,12 +3227,11 @@ export const de_DeregisterTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.successful != null) { - contents.successful = de_TargetList(data.successful, context); - } - if (data.unsuccessful != null) { - contents.unsuccessful = de_TargetFailureList(data.unsuccessful, context); - } + const doc = take(data, { + successful: _json, + unsuccessful: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3335,10 +3268,9 @@ const de_DeregisterTargetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3358,27 +3290,16 @@ export const de_GetAccessLogSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.destinationArn != null) { - contents.destinationArn = __expectString(data.destinationArn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationArn: __expectString, + id: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3412,10 +3333,9 @@ const de_GetAccessLogSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3435,18 +3355,13 @@ export const de_GetAuthPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + policy: __expectString, + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3480,10 +3395,9 @@ const de_GetAuthPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3503,36 +3417,19 @@ export const de_GetListenerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.defaultAction != null) { - contents.defaultAction = de_RuleAction(__expectUnion(data.defaultAction), context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.port != null) { - contents.port = __expectInt32(data.port); - } - if (data.protocol != null) { - contents.protocol = __expectString(data.protocol); - } - if (data.serviceArn != null) { - contents.serviceArn = __expectString(data.serviceArn); - } - if (data.serviceId != null) { - contents.serviceId = __expectString(data.serviceId); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + defaultAction: (_) => _json(__expectUnion(_)), + id: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + port: __expectInt32, + protocol: __expectString, + serviceArn: __expectString, + serviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3566,10 +3463,9 @@ const de_GetListenerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3589,9 +3485,10 @@ export const de_GetResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } + const doc = take(data, { + policy: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3625,10 +3522,9 @@ const de_GetResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3648,33 +3544,18 @@ export const de_GetRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = de_RuleAction(__expectUnion(data.action), context); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.isDefault != null) { - contents.isDefault = __expectBoolean(data.isDefault); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.match != null) { - contents.match = de_RuleMatch(__expectUnion(data.match), context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.priority != null) { - contents.priority = __expectInt32(data.priority); - } + const doc = take(data, { + action: (_) => _json(__expectUnion(_)), + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + isDefault: __expectBoolean, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + match: (_) => _json(__expectUnion(_)), + name: __expectString, + priority: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -3708,10 +3589,9 @@ const de_GetRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3731,42 +3611,21 @@ export const de_GetServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.customDomainName != null) { - contents.customDomainName = __expectString(data.customDomainName); - } - if (data.dnsEntry != null) { - contents.dnsEntry = de_DnsEntry(data.dnsEntry, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureMessage != null) { - contents.failureMessage = __expectString(data.failureMessage); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + authType: __expectString, + certificateArn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + customDomainName: __expectString, + dnsEntry: _json, + failureCode: __expectString, + failureMessage: __expectString, + id: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3800,10 +3659,9 @@ const de_GetServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3823,30 +3681,17 @@ export const de_GetServiceNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.numberOfAssociatedServices != null) { - contents.numberOfAssociatedServices = __expectLong(data.numberOfAssociatedServices); - } - if (data.numberOfAssociatedVPCs != null) { - contents.numberOfAssociatedVPCs = __expectLong(data.numberOfAssociatedVPCs); - } + const doc = take(data, { + arn: __expectString, + authType: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + numberOfAssociatedServices: __expectLong, + numberOfAssociatedVPCs: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -3880,10 +3725,9 @@ const de_GetServiceNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3903,51 +3747,24 @@ export const de_GetServiceNetworkServiceAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.customDomainName != null) { - contents.customDomainName = __expectString(data.customDomainName); - } - if (data.dnsEntry != null) { - contents.dnsEntry = de_DnsEntry(data.dnsEntry, context); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureMessage != null) { - contents.failureMessage = __expectString(data.failureMessage); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.serviceArn != null) { - contents.serviceArn = __expectString(data.serviceArn); - } - if (data.serviceId != null) { - contents.serviceId = __expectString(data.serviceId); - } - if (data.serviceName != null) { - contents.serviceName = __expectString(data.serviceName); - } - if (data.serviceNetworkArn != null) { - contents.serviceNetworkArn = __expectString(data.serviceNetworkArn); - } - if (data.serviceNetworkId != null) { - contents.serviceNetworkId = __expectString(data.serviceNetworkId); - } - if (data.serviceNetworkName != null) { - contents.serviceNetworkName = __expectString(data.serviceNetworkName); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + customDomainName: __expectString, + dnsEntry: _json, + failureCode: __expectString, + failureMessage: __expectString, + id: __expectString, + serviceArn: __expectString, + serviceId: __expectString, + serviceName: __expectString, + serviceNetworkArn: __expectString, + serviceNetworkId: __expectString, + serviceNetworkName: __expectString, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3981,10 +3798,9 @@ const de_GetServiceNetworkServiceAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4004,45 +3820,22 @@ export const de_GetServiceNetworkVpcAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureMessage != null) { - contents.failureMessage = __expectString(data.failureMessage); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.securityGroupIds != null) { - contents.securityGroupIds = de_SecurityGroupList(data.securityGroupIds, context); - } - if (data.serviceNetworkArn != null) { - contents.serviceNetworkArn = __expectString(data.serviceNetworkArn); - } - if (data.serviceNetworkId != null) { - contents.serviceNetworkId = __expectString(data.serviceNetworkId); - } - if (data.serviceNetworkName != null) { - contents.serviceNetworkName = __expectString(data.serviceNetworkName); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.vpcId != null) { - contents.vpcId = __expectString(data.vpcId); - } + const doc = take(data, { + arn: __expectString, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + failureCode: __expectString, + failureMessage: __expectString, + id: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + securityGroupIds: _json, + serviceNetworkArn: __expectString, + serviceNetworkId: __expectString, + serviceNetworkName: __expectString, + status: __expectString, + vpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4076,10 +3869,9 @@ const de_GetServiceNetworkVpcAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4099,39 +3891,20 @@ export const de_GetTargetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.config != null) { - contents.config = de_TargetGroupConfig(data.config, context); - } - if (data.createdAt != null) { - contents.createdAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.createdAt)); - } - if (data.failureCode != null) { - contents.failureCode = __expectString(data.failureCode); - } - if (data.failureMessage != null) { - contents.failureMessage = __expectString(data.failureMessage); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.lastUpdatedAt != null) { - contents.lastUpdatedAt = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.lastUpdatedAt)); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.serviceArns != null) { - contents.serviceArns = de_ServiceArnList(data.serviceArns, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + arn: __expectString, + config: _json, + createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + failureCode: __expectString, + failureMessage: __expectString, + id: __expectString, + lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + serviceArns: _json, + status: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4162,10 +3935,9 @@ const de_GetTargetGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4185,12 +3957,11 @@ export const de_ListAccessLogSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_AccessLogSubscriptionList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_AccessLogSubscriptionList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4218,10 +3989,9 @@ const de_ListAccessLogSubscriptionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4241,12 +4011,11 @@ export const de_ListListenersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ListenerSummaryList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ListenerSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4280,10 +4049,9 @@ const de_ListListenersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4303,12 +4071,11 @@ export const de_ListRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_RuleSummaryList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_RuleSummaryList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4342,10 +4109,9 @@ const de_ListRulesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4365,12 +4131,11 @@ export const de_ListServiceNetworksCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ServiceNetworkList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ServiceNetworkList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4401,10 +4166,9 @@ const de_ListServiceNetworksCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4424,12 +4188,11 @@ export const de_ListServiceNetworkServiceAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ServiceNetworkServiceAssociationList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ServiceNetworkServiceAssociationList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4460,10 +4223,9 @@ const de_ListServiceNetworkServiceAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4483,12 +4245,11 @@ export const de_ListServiceNetworkVpcAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ServiceNetworkVpcAssociationList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ServiceNetworkVpcAssociationList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4519,10 +4280,9 @@ const de_ListServiceNetworkVpcAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4542,12 +4302,11 @@ export const de_ListServicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_ServiceList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_ServiceList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4578,10 +4337,9 @@ const de_ListServicesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4601,9 +4359,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagMap(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4631,10 +4390,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4654,12 +4412,11 @@ export const de_ListTargetGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_TargetGroupList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: (_) => de_TargetGroupList(_, context), + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4690,10 +4447,9 @@ const de_ListTargetGroupsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4713,12 +4469,11 @@ export const de_ListTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.items != null) { - contents.items = de_TargetSummaryList(data.items, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + items: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4752,10 +4507,9 @@ const de_ListTargetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4775,12 +4529,11 @@ export const de_PutAuthPolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.policy != null) { - contents.policy = __expectString(data.policy); - } - if (data.state != null) { - contents.state = __expectString(data.state); - } + const doc = take(data, { + policy: __expectString, + state: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4814,10 +4567,9 @@ const de_PutAuthPolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4870,10 +4622,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4893,12 +4644,11 @@ export const de_RegisterTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.successful != null) { - contents.successful = de_TargetList(data.successful, context); - } - if (data.unsuccessful != null) { - contents.unsuccessful = de_TargetFailureList(data.unsuccessful, context); - } + const doc = take(data, { + successful: _json, + unsuccessful: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4938,10 +4688,9 @@ const de_RegisterTargetsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4994,10 +4743,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5044,10 +4792,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5067,21 +4814,14 @@ export const de_UpdateAccessLogSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.destinationArn != null) { - contents.destinationArn = __expectString(data.destinationArn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.resourceArn != null) { - contents.resourceArn = __expectString(data.resourceArn); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } + const doc = take(data, { + arn: __expectString, + destinationArn: __expectString, + id: __expectString, + resourceArn: __expectString, + resourceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5118,10 +4858,9 @@ const de_UpdateAccessLogSubscriptionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5141,30 +4880,17 @@ export const de_UpdateListenerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.defaultAction != null) { - contents.defaultAction = de_RuleAction(__expectUnion(data.defaultAction), context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.port != null) { - contents.port = __expectInt32(data.port); - } - if (data.protocol != null) { - contents.protocol = __expectString(data.protocol); - } - if (data.serviceArn != null) { - contents.serviceArn = __expectString(data.serviceArn); - } - if (data.serviceId != null) { - contents.serviceId = __expectString(data.serviceId); - } + const doc = take(data, { + arn: __expectString, + defaultAction: (_) => _json(__expectUnion(_)), + id: __expectString, + name: __expectString, + port: __expectInt32, + protocol: __expectString, + serviceArn: __expectString, + serviceId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5201,10 +4927,9 @@ const de_UpdateListenerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5224,27 +4949,16 @@ export const de_UpdateRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = de_RuleAction(__expectUnion(data.action), context); - } - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.isDefault != null) { - contents.isDefault = __expectBoolean(data.isDefault); - } - if (data.match != null) { - contents.match = de_RuleMatch(__expectUnion(data.match), context); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.priority != null) { - contents.priority = __expectInt32(data.priority); - } + const doc = take(data, { + action: (_) => _json(__expectUnion(_)), + arn: __expectString, + id: __expectString, + isDefault: __expectBoolean, + match: (_) => _json(__expectUnion(_)), + name: __expectString, + priority: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -5281,10 +4995,9 @@ const de_UpdateRuleCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5304,24 +5017,15 @@ export const de_UpdateServiceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.certificateArn != null) { - contents.certificateArn = __expectString(data.certificateArn); - } - if (data.customDomainName != null) { - contents.customDomainName = __expectString(data.customDomainName); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + authType: __expectString, + certificateArn: __expectString, + customDomainName: __expectString, + id: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5358,10 +5062,9 @@ const de_UpdateServiceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5381,18 +5084,13 @@ export const de_UpdateServiceNetworkCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.authType != null) { - contents.authType = __expectString(data.authType); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } + const doc = take(data, { + arn: __expectString, + authType: __expectString, + id: __expectString, + name: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5429,10 +5127,9 @@ const de_UpdateServiceNetworkCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5452,21 +5149,14 @@ export const de_UpdateServiceNetworkVpcAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.createdBy != null) { - contents.createdBy = __expectString(data.createdBy); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.securityGroupIds != null) { - contents.securityGroupIds = de_SecurityGroupList(data.securityGroupIds, context); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } + const doc = take(data, { + arn: __expectString, + createdBy: __expectString, + id: __expectString, + securityGroupIds: _json, + status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5503,10 +5193,9 @@ const de_UpdateServiceNetworkVpcAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5526,24 +5215,15 @@ export const de_UpdateTargetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.arn != null) { - contents.arn = __expectString(data.arn); - } - if (data.config != null) { - contents.config = de_TargetGroupConfig(data.config, context); - } - if (data.id != null) { - contents.id = __expectString(data.id); - } - if (data.name != null) { - contents.name = __expectString(data.name); - } - if (data.status != null) { - contents.status = __expectString(data.status); - } - if (data.type != null) { - contents.type = __expectString(data.type); - } + const doc = take(data, { + arn: __expectString, + config: _json, + id: __expectString, + name: __expectString, + status: __expectString, + type: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -5577,16 +5257,15 @@ const de_UpdateTargetGroupCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -5596,9 +5275,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5612,15 +5292,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5642,9 +5319,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5661,15 +5339,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5686,21 +5361,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5719,15 +5387,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5741,15 +5406,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5757,241 +5419,47 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1FixedResponseAction - */ -const se_FixedResponseAction = (input: FixedResponseAction, context: __SerdeContext): any => { - return { - ...(input.statusCode != null && { statusCode: input.statusCode }), - }; -}; +// se_FixedResponseAction omitted. -/** - * serializeAws_restJson1ForwardAction - */ -const se_ForwardAction = (input: ForwardAction, context: __SerdeContext): any => { - return { - ...(input.targetGroups != null && { targetGroups: se_WeightedTargetGroupList(input.targetGroups, context) }), - }; -}; +// se_ForwardAction omitted. -/** - * serializeAws_restJson1HeaderMatch - */ -const se_HeaderMatch = (input: HeaderMatch, context: __SerdeContext): any => { - return { - ...(input.caseSensitive != null && { caseSensitive: input.caseSensitive }), - ...(input.match != null && { match: se_HeaderMatchType(input.match, context) }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_HeaderMatch omitted. -/** - * serializeAws_restJson1HeaderMatchList - */ -const se_HeaderMatchList = (input: HeaderMatch[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_HeaderMatch(entry, context); - }); -}; +// se_HeaderMatchList omitted. -/** - * serializeAws_restJson1HeaderMatchType - */ -const se_HeaderMatchType = (input: HeaderMatchType, context: __SerdeContext): any => { - return HeaderMatchType.visit(input, { - contains: (value) => ({ contains: value }), - exact: (value) => ({ exact: value }), - prefix: (value) => ({ prefix: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_HeaderMatchType omitted. -/** - * serializeAws_restJson1HealthCheckConfig - */ -const se_HealthCheckConfig = (input: HealthCheckConfig, context: __SerdeContext): any => { - return { - ...(input.enabled != null && { enabled: input.enabled }), - ...(input.healthCheckIntervalSeconds != null && { healthCheckIntervalSeconds: input.healthCheckIntervalSeconds }), - ...(input.healthCheckTimeoutSeconds != null && { healthCheckTimeoutSeconds: input.healthCheckTimeoutSeconds }), - ...(input.healthyThresholdCount != null && { healthyThresholdCount: input.healthyThresholdCount }), - ...(input.matcher != null && { matcher: se_Matcher(input.matcher, context) }), - ...(input.path != null && { path: input.path }), - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.protocolVersion != null && { protocolVersion: input.protocolVersion }), - ...(input.unhealthyThresholdCount != null && { unhealthyThresholdCount: input.unhealthyThresholdCount }), - }; -}; +// se_HealthCheckConfig omitted. -/** - * serializeAws_restJson1HttpMatch - */ -const se_HttpMatch = (input: HttpMatch, context: __SerdeContext): any => { - return { - ...(input.headerMatches != null && { headerMatches: se_HeaderMatchList(input.headerMatches, context) }), - ...(input.method != null && { method: input.method }), - ...(input.pathMatch != null && { pathMatch: se_PathMatch(input.pathMatch, context) }), - }; -}; +// se_HttpMatch omitted. -/** - * serializeAws_restJson1Matcher - */ -const se_Matcher = (input: Matcher, context: __SerdeContext): any => { - return Matcher.visit(input, { - httpCode: (value) => ({ httpCode: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_Matcher omitted. -/** - * serializeAws_restJson1PathMatch - */ -const se_PathMatch = (input: PathMatch, context: __SerdeContext): any => { - return { - ...(input.caseSensitive != null && { caseSensitive: input.caseSensitive }), - ...(input.match != null && { match: se_PathMatchType(input.match, context) }), - }; -}; +// se_PathMatch omitted. -/** - * serializeAws_restJson1PathMatchType - */ -const se_PathMatchType = (input: PathMatchType, context: __SerdeContext): any => { - return PathMatchType.visit(input, { - exact: (value) => ({ exact: value }), - prefix: (value) => ({ prefix: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_PathMatchType omitted. -/** - * serializeAws_restJson1RuleAction - */ -const se_RuleAction = (input: RuleAction, context: __SerdeContext): any => { - return RuleAction.visit(input, { - fixedResponse: (value) => ({ fixedResponse: se_FixedResponseAction(value, context) }), - forward: (value) => ({ forward: se_ForwardAction(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_RuleAction omitted. -/** - * serializeAws_restJson1RuleMatch - */ -const se_RuleMatch = (input: RuleMatch, context: __SerdeContext): any => { - return RuleMatch.visit(input, { - httpMatch: (value) => ({ httpMatch: se_HttpMatch(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_RuleMatch omitted. -/** - * serializeAws_restJson1RuleUpdate - */ -const se_RuleUpdate = (input: RuleUpdate, context: __SerdeContext): any => { - return { - ...(input.action != null && { action: se_RuleAction(input.action, context) }), - ...(input.match != null && { match: se_RuleMatch(input.match, context) }), - ...(input.priority != null && { priority: input.priority }), - ...(input.ruleIdentifier != null && { ruleIdentifier: input.ruleIdentifier }), - }; -}; +// se_RuleUpdate omitted. -/** - * serializeAws_restJson1RuleUpdateList - */ -const se_RuleUpdateList = (input: RuleUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleUpdate(entry, context); - }); -}; +// se_RuleUpdateList omitted. -/** - * serializeAws_restJson1SecurityGroupList - */ -const se_SecurityGroupList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupList omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * serializeAws_restJson1Target - */ -const se_Target = (input: Target, context: __SerdeContext): any => { - return { - ...(input.id != null && { id: input.id }), - ...(input.port != null && { port: input.port }), - }; -}; +// se_Target omitted. -/** - * serializeAws_restJson1TargetGroupConfig - */ -const se_TargetGroupConfig = (input: TargetGroupConfig, context: __SerdeContext): any => { - return { - ...(input.healthCheck != null && { healthCheck: se_HealthCheckConfig(input.healthCheck, context) }), - ...(input.ipAddressType != null && { ipAddressType: input.ipAddressType }), - ...(input.port != null && { port: input.port }), - ...(input.protocol != null && { protocol: input.protocol }), - ...(input.protocolVersion != null && { protocolVersion: input.protocolVersion }), - ...(input.vpcIdentifier != null && { vpcIdentifier: input.vpcIdentifier }), - }; -}; +// se_TargetGroupConfig omitted. -/** - * serializeAws_restJson1TargetList - */ -const se_TargetList = (input: Target[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Target(entry, context); - }); -}; +// se_TargetList omitted. -/** - * serializeAws_restJson1WeightedTargetGroup - */ -const se_WeightedTargetGroup = (input: WeightedTargetGroup, context: __SerdeContext): any => { - return { - ...(input.targetGroupIdentifier != null && { targetGroupIdentifier: input.targetGroupIdentifier }), - ...(input.weight != null && { weight: input.weight }), - }; -}; +// se_WeightedTargetGroup omitted. -/** - * serializeAws_restJson1WeightedTargetGroupList - */ -const se_WeightedTargetGroupList = (input: WeightedTargetGroup[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WeightedTargetGroup(entry, context); - }); -}; +// se_WeightedTargetGroupList omitted. /** * deserializeAws_restJson1AccessLogSubscriptionList @@ -6000,9 +5468,6 @@ const de_AccessLogSubscriptionList = (output: any, context: __SerdeContext): Acc const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_AccessLogSubscriptionSummary(entry, context); }); return retVal; @@ -6012,137 +5477,46 @@ const de_AccessLogSubscriptionList = (output: any, context: __SerdeContext): Acc * deserializeAws_restJson1AccessLogSubscriptionSummary */ const de_AccessLogSubscriptionSummary = (output: any, context: __SerdeContext): AccessLogSubscriptionSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - destinationArn: __expectString(output.destinationArn), - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - resourceArn: __expectString(output.resourceArn), - resourceId: __expectString(output.resourceId), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + destinationArn: __expectString, + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + resourceArn: __expectString, + resourceId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1DnsEntry - */ -const de_DnsEntry = (output: any, context: __SerdeContext): DnsEntry => { - return { - domainName: __expectString(output.domainName), - hostedZoneId: __expectString(output.hostedZoneId), - } as any; -}; +// de_DnsEntry omitted. -/** - * deserializeAws_restJson1FixedResponseAction - */ -const de_FixedResponseAction = (output: any, context: __SerdeContext): FixedResponseAction => { - return { - statusCode: __expectInt32(output.statusCode), - } as any; -}; +// de_FixedResponseAction omitted. -/** - * deserializeAws_restJson1ForwardAction - */ -const de_ForwardAction = (output: any, context: __SerdeContext): ForwardAction => { - return { - targetGroups: output.targetGroups != null ? de_WeightedTargetGroupList(output.targetGroups, context) : undefined, - } as any; -}; +// de_ForwardAction omitted. -/** - * deserializeAws_restJson1HeaderMatch - */ -const de_HeaderMatch = (output: any, context: __SerdeContext): HeaderMatch => { - return { - caseSensitive: __expectBoolean(output.caseSensitive), - match: output.match != null ? de_HeaderMatchType(__expectUnion(output.match), context) : undefined, - name: __expectString(output.name), - } as any; -}; +// de_HeaderMatch omitted. -/** - * deserializeAws_restJson1HeaderMatchList - */ -const de_HeaderMatchList = (output: any, context: __SerdeContext): HeaderMatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HeaderMatch(entry, context); - }); - return retVal; -}; +// de_HeaderMatchList omitted. -/** - * deserializeAws_restJson1HeaderMatchType - */ -const de_HeaderMatchType = (output: any, context: __SerdeContext): HeaderMatchType => { - if (__expectString(output.contains) !== undefined) { - return { contains: __expectString(output.contains) as any }; - } - if (__expectString(output.exact) !== undefined) { - return { exact: __expectString(output.exact) as any }; - } - if (__expectString(output.prefix) !== undefined) { - return { prefix: __expectString(output.prefix) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_HeaderMatchType omitted. -/** - * deserializeAws_restJson1HealthCheckConfig - */ -const de_HealthCheckConfig = (output: any, context: __SerdeContext): HealthCheckConfig => { - return { - enabled: __expectBoolean(output.enabled), - healthCheckIntervalSeconds: __expectInt32(output.healthCheckIntervalSeconds), - healthCheckTimeoutSeconds: __expectInt32(output.healthCheckTimeoutSeconds), - healthyThresholdCount: __expectInt32(output.healthyThresholdCount), - matcher: output.matcher != null ? de_Matcher(__expectUnion(output.matcher), context) : undefined, - path: __expectString(output.path), - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - protocolVersion: __expectString(output.protocolVersion), - unhealthyThresholdCount: __expectInt32(output.unhealthyThresholdCount), - } as any; -}; +// de_HealthCheckConfig omitted. -/** - * deserializeAws_restJson1HttpMatch - */ -const de_HttpMatch = (output: any, context: __SerdeContext): HttpMatch => { - return { - headerMatches: output.headerMatches != null ? de_HeaderMatchList(output.headerMatches, context) : undefined, - method: __expectString(output.method), - pathMatch: output.pathMatch != null ? de_PathMatch(output.pathMatch, context) : undefined, - } as any; -}; +// de_HttpMatch omitted. /** * deserializeAws_restJson1ListenerSummary */ const de_ListenerSummary = (output: any, context: __SerdeContext): ListenerSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - name: __expectString(output.name), - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + port: __expectInt32, + protocol: __expectString, + }) as any; }; /** @@ -6152,93 +5526,34 @@ const de_ListenerSummaryList = (output: any, context: __SerdeContext): ListenerS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ListenerSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Matcher - */ -const de_Matcher = (output: any, context: __SerdeContext): Matcher => { - if (__expectString(output.httpCode) !== undefined) { - return { httpCode: __expectString(output.httpCode) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_Matcher omitted. -/** - * deserializeAws_restJson1PathMatch - */ -const de_PathMatch = (output: any, context: __SerdeContext): PathMatch => { - return { - caseSensitive: __expectBoolean(output.caseSensitive), - match: output.match != null ? de_PathMatchType(__expectUnion(output.match), context) : undefined, - } as any; -}; +// de_PathMatch omitted. -/** - * deserializeAws_restJson1PathMatchType - */ -const de_PathMatchType = (output: any, context: __SerdeContext): PathMatchType => { - if (__expectString(output.exact) !== undefined) { - return { exact: __expectString(output.exact) as any }; - } - if (__expectString(output.prefix) !== undefined) { - return { prefix: __expectString(output.prefix) as any }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_PathMatchType omitted. -/** - * deserializeAws_restJson1RuleAction - */ -const de_RuleAction = (output: any, context: __SerdeContext): RuleAction => { - if (output.fixedResponse != null) { - return { - fixedResponse: de_FixedResponseAction(output.fixedResponse, context), - }; - } - if (output.forward != null) { - return { - forward: de_ForwardAction(output.forward, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_RuleAction omitted. -/** - * deserializeAws_restJson1RuleMatch - */ -const de_RuleMatch = (output: any, context: __SerdeContext): RuleMatch => { - if (output.httpMatch != null) { - return { - httpMatch: de_HttpMatch(output.httpMatch, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_RuleMatch omitted. /** * deserializeAws_restJson1RuleSummary */ const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - isDefault: __expectBoolean(output.isDefault), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - name: __expectString(output.name), - priority: __expectInt32(output.priority), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + isDefault: __expectBoolean, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + priority: __expectInt32, + }) as any; }; /** @@ -6248,99 +5563,22 @@ const de_RuleSummaryList = (output: any, context: __SerdeContext): RuleSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RuleSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RuleUpdateFailure - */ -const de_RuleUpdateFailure = (output: any, context: __SerdeContext): RuleUpdateFailure => { - return { - failureCode: __expectString(output.failureCode), - failureMessage: __expectString(output.failureMessage), - ruleIdentifier: __expectString(output.ruleIdentifier), - } as any; -}; +// de_RuleUpdateFailure omitted. -/** - * deserializeAws_restJson1RuleUpdateFailureList - */ -const de_RuleUpdateFailureList = (output: any, context: __SerdeContext): RuleUpdateFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleUpdateFailure(entry, context); - }); - return retVal; -}; +// de_RuleUpdateFailureList omitted. -/** - * deserializeAws_restJson1RuleUpdateSuccess - */ -const de_RuleUpdateSuccess = (output: any, context: __SerdeContext): RuleUpdateSuccess => { - return { - action: output.action != null ? de_RuleAction(__expectUnion(output.action), context) : undefined, - arn: __expectString(output.arn), - id: __expectString(output.id), - isDefault: __expectBoolean(output.isDefault), - match: output.match != null ? de_RuleMatch(__expectUnion(output.match), context) : undefined, - name: __expectString(output.name), - priority: __expectInt32(output.priority), - } as any; -}; +// de_RuleUpdateSuccess omitted. -/** - * deserializeAws_restJson1RuleUpdateSuccessList - */ -const de_RuleUpdateSuccessList = (output: any, context: __SerdeContext): RuleUpdateSuccess[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleUpdateSuccess(entry, context); - }); - return retVal; -}; +// de_RuleUpdateSuccessList omitted. -/** - * deserializeAws_restJson1SecurityGroupList - */ -const de_SecurityGroupList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupList omitted. -/** - * deserializeAws_restJson1ServiceArnList - */ -const de_ServiceArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ServiceArnList omitted. /** * deserializeAws_restJson1ServiceList @@ -6349,9 +5587,6 @@ const de_ServiceList = (output: any, context: __SerdeContext): ServiceSummary[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceSummary(entry, context); }); return retVal; @@ -6364,9 +5599,6 @@ const de_ServiceNetworkList = (output: any, context: __SerdeContext): ServiceNet const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceNetworkSummary(entry, context); }); return retVal; @@ -6382,9 +5614,6 @@ const de_ServiceNetworkServiceAssociationList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceNetworkServiceAssociationSummary(entry, context); }); return retVal; @@ -6397,41 +5626,36 @@ const de_ServiceNetworkServiceAssociationSummary = ( output: any, context: __SerdeContext ): ServiceNetworkServiceAssociationSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - customDomainName: __expectString(output.customDomainName), - dnsEntry: output.dnsEntry != null ? de_DnsEntry(output.dnsEntry, context) : undefined, - id: __expectString(output.id), - serviceArn: __expectString(output.serviceArn), - serviceId: __expectString(output.serviceId), - serviceName: __expectString(output.serviceName), - serviceNetworkArn: __expectString(output.serviceNetworkArn), - serviceNetworkId: __expectString(output.serviceNetworkId), - serviceNetworkName: __expectString(output.serviceNetworkName), - status: __expectString(output.status), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + customDomainName: __expectString, + dnsEntry: _json, + id: __expectString, + serviceArn: __expectString, + serviceId: __expectString, + serviceName: __expectString, + serviceNetworkArn: __expectString, + serviceNetworkId: __expectString, + serviceNetworkName: __expectString, + status: __expectString, + }) as any; }; /** * deserializeAws_restJson1ServiceNetworkSummary */ const de_ServiceNetworkSummary = (output: any, context: __SerdeContext): ServiceNetworkSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - name: __expectString(output.name), - numberOfAssociatedServices: __expectLong(output.numberOfAssociatedServices), - numberOfAssociatedVPCs: __expectLong(output.numberOfAssociatedVPCs), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + numberOfAssociatedServices: __expectLong, + numberOfAssociatedVPCs: __expectLong, + }) as any; }; /** @@ -6444,9 +5668,6 @@ const de_ServiceNetworkVpcAssociationList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ServiceNetworkVpcAssociationSummary(entry, context); }); return retVal; @@ -6459,107 +5680,45 @@ const de_ServiceNetworkVpcAssociationSummary = ( output: any, context: __SerdeContext ): ServiceNetworkVpcAssociationSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - createdBy: __expectString(output.createdBy), - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - serviceNetworkArn: __expectString(output.serviceNetworkArn), - serviceNetworkId: __expectString(output.serviceNetworkId), - serviceNetworkName: __expectString(output.serviceNetworkName), - status: __expectString(output.status), - vpcId: __expectString(output.vpcId), - } as any; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + createdBy: __expectString, + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + serviceNetworkArn: __expectString, + serviceNetworkId: __expectString, + serviceNetworkName: __expectString, + status: __expectString, + vpcId: __expectString, + }) as any; }; /** * deserializeAws_restJson1ServiceSummary */ const de_ServiceSummary = (output: any, context: __SerdeContext): ServiceSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - customDomainName: __expectString(output.customDomainName), - dnsEntry: output.dnsEntry != null ? de_DnsEntry(output.dnsEntry, context) : undefined, - id: __expectString(output.id), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - name: __expectString(output.name), - status: __expectString(output.status), - } as any; -}; - -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + customDomainName: __expectString, + dnsEntry: _json, + id: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + status: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1Target - */ -const de_Target = (output: any, context: __SerdeContext): Target => { - return { - id: __expectString(output.id), - port: __expectInt32(output.port), - } as any; -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1TargetFailure - */ -const de_TargetFailure = (output: any, context: __SerdeContext): TargetFailure => { - return { - failureCode: __expectString(output.failureCode), - failureMessage: __expectString(output.failureMessage), - id: __expectString(output.id), - port: __expectInt32(output.port), - } as any; -}; +// de_Target omitted. -/** - * deserializeAws_restJson1TargetFailureList - */ -const de_TargetFailureList = (output: any, context: __SerdeContext): TargetFailure[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetFailure(entry, context); - }); - return retVal; -}; +// de_TargetFailure omitted. -/** - * deserializeAws_restJson1TargetGroupConfig - */ -const de_TargetGroupConfig = (output: any, context: __SerdeContext): TargetGroupConfig => { - return { - healthCheck: output.healthCheck != null ? de_HealthCheckConfig(output.healthCheck, context) : undefined, - ipAddressType: __expectString(output.ipAddressType), - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - protocolVersion: __expectString(output.protocolVersion), - vpcIdentifier: __expectString(output.vpcIdentifier), - } as any; -}; +// de_TargetFailureList omitted. + +// de_TargetGroupConfig omitted. /** * deserializeAws_restJson1TargetGroupList @@ -6568,9 +5727,6 @@ const de_TargetGroupList = (output: any, context: __SerdeContext): TargetGroupSu const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TargetGroupSummary(entry, context); }); return retVal; @@ -6580,117 +5736,35 @@ const de_TargetGroupList = (output: any, context: __SerdeContext): TargetGroupSu * deserializeAws_restJson1TargetGroupSummary */ const de_TargetGroupSummary = (output: any, context: __SerdeContext): TargetGroupSummary => { - return { - arn: __expectString(output.arn), - createdAt: - output.createdAt != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.createdAt)) : undefined, - id: __expectString(output.id), - ipAddressType: __expectString(output.ipAddressType), - lastUpdatedAt: - output.lastUpdatedAt != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.lastUpdatedAt)) - : undefined, - name: __expectString(output.name), - port: __expectInt32(output.port), - protocol: __expectString(output.protocol), - serviceArns: output.serviceArns != null ? de_ServiceArnList(output.serviceArns, context) : undefined, - status: __expectString(output.status), - type: __expectString(output.type), - vpcIdentifier: __expectString(output.vpcIdentifier), - } as any; -}; - -/** - * deserializeAws_restJson1TargetList - */ -const de_TargetList = (output: any, context: __SerdeContext): Target[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Target(entry, context); - }); - return retVal; + return take(output, { + arn: __expectString, + createdAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + id: __expectString, + ipAddressType: __expectString, + lastUpdatedAt: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + name: __expectString, + port: __expectInt32, + protocol: __expectString, + serviceArns: _json, + status: __expectString, + type: __expectString, + vpcIdentifier: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1TargetSummary - */ -const de_TargetSummary = (output: any, context: __SerdeContext): TargetSummary => { - return { - id: __expectString(output.id), - port: __expectInt32(output.port), - reasonCode: __expectString(output.reasonCode), - status: __expectString(output.status), - } as any; -}; +// de_TargetList omitted. -/** - * deserializeAws_restJson1TargetSummaryList - */ -const de_TargetSummaryList = (output: any, context: __SerdeContext): TargetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TargetSummary(entry, context); - }); - return retVal; -}; +// de_TargetSummary omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_TargetSummaryList omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1WeightedTargetGroup - */ -const de_WeightedTargetGroup = (output: any, context: __SerdeContext): WeightedTargetGroup => { - return { - targetGroupIdentifier: __expectString(output.targetGroupIdentifier), - weight: __expectInt32(output.weight), - } as any; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1WeightedTargetGroupList - */ -const de_WeightedTargetGroupList = (output: any, context: __SerdeContext): WeightedTargetGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WeightedTargetGroup(entry, context); - }); - return retVal; -}; +// de_WeightedTargetGroup omitted. + +// de_WeightedTargetGroupList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-waf-regional/src/protocols/Aws_json1_1.ts b/clients/client-waf-regional/src/protocols/Aws_json1_1.ts index 6c7f3ae89d2e..981b61cf99a4 100644 --- a/clients/client-waf-regional/src/protocols/Aws_json1_1.ts +++ b/clients/client-waf-regional/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -207,212 +207,112 @@ import { UpdateXssMatchSetCommandInput, UpdateXssMatchSetCommandOutput } from ". import { ActivatedRule, AssociateWebACLRequest, - AssociateWebACLResponse, ByteMatchSet, - ByteMatchSetSummary, ByteMatchSetUpdate, ByteMatchTuple, CreateByteMatchSetRequest, CreateByteMatchSetResponse, CreateGeoMatchSetRequest, - CreateGeoMatchSetResponse, CreateIPSetRequest, - CreateIPSetResponse, CreateRateBasedRuleRequest, - CreateRateBasedRuleResponse, CreateRegexMatchSetRequest, - CreateRegexMatchSetResponse, CreateRegexPatternSetRequest, - CreateRegexPatternSetResponse, CreateRuleGroupRequest, - CreateRuleGroupResponse, CreateRuleRequest, - CreateRuleResponse, CreateSizeConstraintSetRequest, - CreateSizeConstraintSetResponse, CreateSqlInjectionMatchSetRequest, - CreateSqlInjectionMatchSetResponse, CreateWebACLMigrationStackRequest, - CreateWebACLMigrationStackResponse, CreateWebACLRequest, - CreateWebACLResponse, CreateXssMatchSetRequest, - CreateXssMatchSetResponse, DeleteByteMatchSetRequest, - DeleteByteMatchSetResponse, DeleteGeoMatchSetRequest, - DeleteGeoMatchSetResponse, DeleteIPSetRequest, - DeleteIPSetResponse, DeleteLoggingConfigurationRequest, - DeleteLoggingConfigurationResponse, DeletePermissionPolicyRequest, - DeletePermissionPolicyResponse, DeleteRateBasedRuleRequest, - DeleteRateBasedRuleResponse, DeleteRegexMatchSetRequest, - DeleteRegexMatchSetResponse, DeleteRegexPatternSetRequest, - DeleteRegexPatternSetResponse, DeleteRuleGroupRequest, - DeleteRuleGroupResponse, DeleteRuleRequest, - DeleteRuleResponse, DeleteSizeConstraintSetRequest, - DeleteSizeConstraintSetResponse, DeleteSqlInjectionMatchSetRequest, - DeleteSqlInjectionMatchSetResponse, DeleteWebACLRequest, - DeleteWebACLResponse, DeleteXssMatchSetRequest, - DeleteXssMatchSetResponse, DisassociateWebACLRequest, - DisassociateWebACLResponse, ExcludedRule, FieldToMatch, GeoMatchConstraint, - GeoMatchSet, - GeoMatchSetSummary, GeoMatchSetUpdate, GetByteMatchSetRequest, GetByteMatchSetResponse, GetChangeTokenRequest, - GetChangeTokenResponse, GetChangeTokenStatusRequest, - GetChangeTokenStatusResponse, GetGeoMatchSetRequest, - GetGeoMatchSetResponse, GetIPSetRequest, - GetIPSetResponse, GetLoggingConfigurationRequest, - GetLoggingConfigurationResponse, GetPermissionPolicyRequest, - GetPermissionPolicyResponse, GetRateBasedRuleManagedKeysRequest, - GetRateBasedRuleManagedKeysResponse, GetRateBasedRuleRequest, - GetRateBasedRuleResponse, GetRegexMatchSetRequest, - GetRegexMatchSetResponse, GetRegexPatternSetRequest, - GetRegexPatternSetResponse, GetRuleGroupRequest, - GetRuleGroupResponse, GetRuleRequest, - GetRuleResponse, GetSampledRequestsRequest, GetSampledRequestsResponse, GetSizeConstraintSetRequest, - GetSizeConstraintSetResponse, GetSqlInjectionMatchSetRequest, - GetSqlInjectionMatchSetResponse, GetWebACLForResourceRequest, - GetWebACLForResourceResponse, GetWebACLRequest, - GetWebACLResponse, GetXssMatchSetRequest, - GetXssMatchSetResponse, - HTTPHeader, - HTTPRequest, - IPSet, IPSetDescriptor, - IPSetSummary, IPSetUpdate, ListActivatedRulesInRuleGroupRequest, - ListActivatedRulesInRuleGroupResponse, ListByteMatchSetsRequest, - ListByteMatchSetsResponse, ListGeoMatchSetsRequest, - ListGeoMatchSetsResponse, ListIPSetsRequest, - ListIPSetsResponse, ListLoggingConfigurationsRequest, - ListLoggingConfigurationsResponse, ListRateBasedRulesRequest, - ListRateBasedRulesResponse, ListRegexMatchSetsRequest, - ListRegexMatchSetsResponse, ListRegexPatternSetsRequest, - ListRegexPatternSetsResponse, ListResourcesForWebACLRequest, - ListResourcesForWebACLResponse, ListRuleGroupsRequest, - ListRuleGroupsResponse, ListRulesRequest, - ListRulesResponse, ListSizeConstraintSetsRequest, - ListSizeConstraintSetsResponse, ListSqlInjectionMatchSetsRequest, - ListSqlInjectionMatchSetsResponse, ListSubscribedRuleGroupsRequest, - ListSubscribedRuleGroupsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListWebACLsRequest, - ListWebACLsResponse, ListXssMatchSetsRequest, - ListXssMatchSetsResponse, LoggingConfiguration, Predicate, PutLoggingConfigurationRequest, - PutLoggingConfigurationResponse, PutPermissionPolicyRequest, - PutPermissionPolicyResponse, - RateBasedRule, - RegexMatchSet, - RegexMatchSetSummary, RegexMatchSetUpdate, RegexMatchTuple, - RegexPatternSet, - RegexPatternSetSummary, RegexPatternSetUpdate, - Rule, - RuleGroup, - RuleGroupSummary, RuleGroupUpdate, - RuleSummary, RuleUpdate, SampledHTTPRequest, SizeConstraint, - SizeConstraintSet, - SizeConstraintSetSummary, SizeConstraintSetUpdate, - SqlInjectionMatchSet, - SqlInjectionMatchSetSummary, SqlInjectionMatchSetUpdate, SqlInjectionMatchTuple, - SubscribedRuleGroupSummary, Tag, - TagInfoForResource, TagResourceRequest, - TagResourceResponse, TimeWindow, UntagResourceRequest, - UntagResourceResponse, UpdateByteMatchSetRequest, - UpdateByteMatchSetResponse, UpdateGeoMatchSetRequest, - UpdateGeoMatchSetResponse, UpdateIPSetRequest, - UpdateIPSetResponse, UpdateRateBasedRuleRequest, - UpdateRateBasedRuleResponse, UpdateRegexMatchSetRequest, - UpdateRegexMatchSetResponse, UpdateRegexPatternSetRequest, - UpdateRegexPatternSetResponse, UpdateRuleGroupRequest, - UpdateRuleGroupResponse, UpdateRuleRequest, - UpdateRuleResponse, UpdateSizeConstraintSetRequest, - UpdateSizeConstraintSetResponse, UpdateSqlInjectionMatchSetRequest, - UpdateSqlInjectionMatchSetResponse, UpdateWebACLRequest, - UpdateWebACLResponse, UpdateXssMatchSetRequest, - UpdateXssMatchSetResponse, WafAction, WAFBadRequestException, WAFDisallowedNameException, @@ -435,11 +335,7 @@ import { WAFTagOperationException, WAFTagOperationInternalErrorException, WAFUnavailableEntityException, - WebACL, - WebACLSummary, WebACLUpdate, - XssMatchSet, - XssMatchSetSummary, XssMatchSetUpdate, XssMatchTuple, } from "../models/models_0"; @@ -454,7 +350,7 @@ export const se_AssociateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateWebACL"); let body: any; - body = JSON.stringify(se_AssociateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -467,7 +363,7 @@ export const se_CreateByteMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateByteMatchSet"); let body: any; - body = JSON.stringify(se_CreateByteMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -480,7 +376,7 @@ export const se_CreateGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGeoMatchSet"); let body: any; - body = JSON.stringify(se_CreateGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -493,7 +389,7 @@ export const se_CreateIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateIPSet"); let body: any; - body = JSON.stringify(se_CreateIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -506,7 +402,7 @@ export const se_CreateRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRateBasedRule"); let body: any; - body = JSON.stringify(se_CreateRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -519,7 +415,7 @@ export const se_CreateRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRegexMatchSet"); let body: any; - body = JSON.stringify(se_CreateRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -532,7 +428,7 @@ export const se_CreateRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRegexPatternSet"); let body: any; - body = JSON.stringify(se_CreateRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -545,7 +441,7 @@ export const se_CreateRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRule"); let body: any; - body = JSON.stringify(se_CreateRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -558,7 +454,7 @@ export const se_CreateRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRuleGroup"); let body: any; - body = JSON.stringify(se_CreateRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -571,7 +467,7 @@ export const se_CreateSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSizeConstraintSet"); let body: any; - body = JSON.stringify(se_CreateSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -584,7 +480,7 @@ export const se_CreateSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_CreateSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -597,7 +493,7 @@ export const se_CreateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWebACL"); let body: any; - body = JSON.stringify(se_CreateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -610,7 +506,7 @@ export const se_CreateWebACLMigrationStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWebACLMigrationStack"); let body: any; - body = JSON.stringify(se_CreateWebACLMigrationStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -623,7 +519,7 @@ export const se_CreateXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateXssMatchSet"); let body: any; - body = JSON.stringify(se_CreateXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -636,7 +532,7 @@ export const se_DeleteByteMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteByteMatchSet"); let body: any; - body = JSON.stringify(se_DeleteByteMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -649,7 +545,7 @@ export const se_DeleteGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGeoMatchSet"); let body: any; - body = JSON.stringify(se_DeleteGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -662,7 +558,7 @@ export const se_DeleteIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIPSet"); let body: any; - body = JSON.stringify(se_DeleteIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -675,7 +571,7 @@ export const se_DeleteLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLoggingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -688,7 +584,7 @@ export const se_DeletePermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePermissionPolicy"); let body: any; - body = JSON.stringify(se_DeletePermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -701,7 +597,7 @@ export const se_DeleteRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRateBasedRule"); let body: any; - body = JSON.stringify(se_DeleteRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -714,7 +610,7 @@ export const se_DeleteRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegexMatchSet"); let body: any; - body = JSON.stringify(se_DeleteRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -727,7 +623,7 @@ export const se_DeleteRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegexPatternSet"); let body: any; - body = JSON.stringify(se_DeleteRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -740,7 +636,7 @@ export const se_DeleteRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRule"); let body: any; - body = JSON.stringify(se_DeleteRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -753,7 +649,7 @@ export const se_DeleteRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRuleGroup"); let body: any; - body = JSON.stringify(se_DeleteRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -766,7 +662,7 @@ export const se_DeleteSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSizeConstraintSet"); let body: any; - body = JSON.stringify(se_DeleteSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -779,7 +675,7 @@ export const se_DeleteSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_DeleteSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -792,7 +688,7 @@ export const se_DeleteWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWebACL"); let body: any; - body = JSON.stringify(se_DeleteWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -805,7 +701,7 @@ export const se_DeleteXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteXssMatchSet"); let body: any; - body = JSON.stringify(se_DeleteXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -818,7 +714,7 @@ export const se_DisassociateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateWebACL"); let body: any; - body = JSON.stringify(se_DisassociateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -831,7 +727,7 @@ export const se_GetByteMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetByteMatchSet"); let body: any; - body = JSON.stringify(se_GetByteMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -844,7 +740,7 @@ export const se_GetChangeTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetChangeToken"); let body: any; - body = JSON.stringify(se_GetChangeTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -857,7 +753,7 @@ export const se_GetChangeTokenStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetChangeTokenStatus"); let body: any; - body = JSON.stringify(se_GetChangeTokenStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -870,7 +766,7 @@ export const se_GetGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGeoMatchSet"); let body: any; - body = JSON.stringify(se_GetGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -883,7 +779,7 @@ export const se_GetIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetIPSet"); let body: any; - body = JSON.stringify(se_GetIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -896,7 +792,7 @@ export const se_GetLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoggingConfiguration"); let body: any; - body = JSON.stringify(se_GetLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -909,7 +805,7 @@ export const se_GetPermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPermissionPolicy"); let body: any; - body = JSON.stringify(se_GetPermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -922,7 +818,7 @@ export const se_GetRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRateBasedRule"); let body: any; - body = JSON.stringify(se_GetRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -935,7 +831,7 @@ export const se_GetRateBasedRuleManagedKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRateBasedRuleManagedKeys"); let body: any; - body = JSON.stringify(se_GetRateBasedRuleManagedKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -948,7 +844,7 @@ export const se_GetRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegexMatchSet"); let body: any; - body = JSON.stringify(se_GetRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -961,7 +857,7 @@ export const se_GetRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegexPatternSet"); let body: any; - body = JSON.stringify(se_GetRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -974,7 +870,7 @@ export const se_GetRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRule"); let body: any; - body = JSON.stringify(se_GetRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -987,7 +883,7 @@ export const se_GetRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRuleGroup"); let body: any; - body = JSON.stringify(se_GetRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1013,7 +909,7 @@ export const se_GetSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSizeConstraintSet"); let body: any; - body = JSON.stringify(se_GetSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1026,7 +922,7 @@ export const se_GetSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_GetSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1039,7 +935,7 @@ export const se_GetWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWebACL"); let body: any; - body = JSON.stringify(se_GetWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1052,7 +948,7 @@ export const se_GetWebACLForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWebACLForResource"); let body: any; - body = JSON.stringify(se_GetWebACLForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1065,7 +961,7 @@ export const se_GetXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetXssMatchSet"); let body: any; - body = JSON.stringify(se_GetXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1078,7 +974,7 @@ export const se_ListActivatedRulesInRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListActivatedRulesInRuleGroup"); let body: any; - body = JSON.stringify(se_ListActivatedRulesInRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1091,7 +987,7 @@ export const se_ListByteMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListByteMatchSets"); let body: any; - body = JSON.stringify(se_ListByteMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1104,7 +1000,7 @@ export const se_ListGeoMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGeoMatchSets"); let body: any; - body = JSON.stringify(se_ListGeoMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1117,7 +1013,7 @@ export const se_ListIPSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIPSets"); let body: any; - body = JSON.stringify(se_ListIPSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1130,7 +1026,7 @@ export const se_ListLoggingConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLoggingConfigurations"); let body: any; - body = JSON.stringify(se_ListLoggingConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1143,7 +1039,7 @@ export const se_ListRateBasedRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRateBasedRules"); let body: any; - body = JSON.stringify(se_ListRateBasedRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1156,7 +1052,7 @@ export const se_ListRegexMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRegexMatchSets"); let body: any; - body = JSON.stringify(se_ListRegexMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1169,7 +1065,7 @@ export const se_ListRegexPatternSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRegexPatternSets"); let body: any; - body = JSON.stringify(se_ListRegexPatternSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1182,7 +1078,7 @@ export const se_ListResourcesForWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourcesForWebACL"); let body: any; - body = JSON.stringify(se_ListResourcesForWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1195,7 +1091,7 @@ export const se_ListRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuleGroups"); let body: any; - body = JSON.stringify(se_ListRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1208,7 +1104,7 @@ export const se_ListRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRules"); let body: any; - body = JSON.stringify(se_ListRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1221,7 +1117,7 @@ export const se_ListSizeConstraintSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSizeConstraintSets"); let body: any; - body = JSON.stringify(se_ListSizeConstraintSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1234,7 +1130,7 @@ export const se_ListSqlInjectionMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSqlInjectionMatchSets"); let body: any; - body = JSON.stringify(se_ListSqlInjectionMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1247,7 +1143,7 @@ export const se_ListSubscribedRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSubscribedRuleGroups"); let body: any; - body = JSON.stringify(se_ListSubscribedRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1260,7 +1156,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1273,7 +1169,7 @@ export const se_ListWebACLsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWebACLs"); let body: any; - body = JSON.stringify(se_ListWebACLsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1286,7 +1182,7 @@ export const se_ListXssMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListXssMatchSets"); let body: any; - body = JSON.stringify(se_ListXssMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1299,7 +1195,7 @@ export const se_PutLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLoggingConfiguration"); let body: any; - body = JSON.stringify(se_PutLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1312,7 +1208,7 @@ export const se_PutPermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPermissionPolicy"); let body: any; - body = JSON.stringify(se_PutPermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1325,7 +1221,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1338,7 +1234,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1364,7 +1260,7 @@ export const se_UpdateGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGeoMatchSet"); let body: any; - body = JSON.stringify(se_UpdateGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1377,7 +1273,7 @@ export const se_UpdateIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateIPSet"); let body: any; - body = JSON.stringify(se_UpdateIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1390,7 +1286,7 @@ export const se_UpdateRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRateBasedRule"); let body: any; - body = JSON.stringify(se_UpdateRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1403,7 +1299,7 @@ export const se_UpdateRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRegexMatchSet"); let body: any; - body = JSON.stringify(se_UpdateRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1416,7 +1312,7 @@ export const se_UpdateRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRegexPatternSet"); let body: any; - body = JSON.stringify(se_UpdateRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1429,7 +1325,7 @@ export const se_UpdateRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRule"); let body: any; - body = JSON.stringify(se_UpdateRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1442,7 +1338,7 @@ export const se_UpdateRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRuleGroup"); let body: any; - body = JSON.stringify(se_UpdateRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1455,7 +1351,7 @@ export const se_UpdateSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSizeConstraintSet"); let body: any; - body = JSON.stringify(se_UpdateSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1468,7 +1364,7 @@ export const se_UpdateSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_UpdateSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1481,7 +1377,7 @@ export const se_UpdateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWebACL"); let body: any; - body = JSON.stringify(se_UpdateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1494,7 +1390,7 @@ export const se_UpdateXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateXssMatchSet"); let body: any; - body = JSON.stringify(se_UpdateXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1510,12 +1406,12 @@ export const de_AssociateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateWebACLResponse(data, context); + contents = _json(data); const response: AssociateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1548,10 +1444,9 @@ const de_AssociateWebACLCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1574,7 +1469,7 @@ export const de_CreateByteMatchSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1610,10 +1505,9 @@ const de_CreateByteMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1631,12 +1525,12 @@ export const de_CreateGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGeoMatchSetResponse(data, context); + contents = _json(data); const response: CreateGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1672,10 +1566,9 @@ const de_CreateGeoMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1693,12 +1586,12 @@ export const de_CreateIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateIPSetResponse(data, context); + contents = _json(data); const response: CreateIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1734,10 +1627,9 @@ const de_CreateIPSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1755,12 +1647,12 @@ export const de_CreateRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRateBasedRuleResponse(data, context); + contents = _json(data); const response: CreateRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1802,10 +1694,9 @@ const de_CreateRateBasedRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1823,12 +1714,12 @@ export const de_CreateRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRegexMatchSetResponse(data, context); + contents = _json(data); const response: CreateRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1858,10 +1749,9 @@ const de_CreateRegexMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1879,12 +1769,12 @@ export const de_CreateRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRegexPatternSetResponse(data, context); + contents = _json(data); const response: CreateRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1914,10 +1804,9 @@ const de_CreateRegexPatternSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1935,12 +1824,12 @@ export const de_CreateRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRuleResponse(data, context); + contents = _json(data); const response: CreateRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1982,10 +1871,9 @@ const de_CreateRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2003,12 +1891,12 @@ export const de_CreateRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRuleGroupResponse(data, context); + contents = _json(data); const response: CreateRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2047,10 +1935,9 @@ const de_CreateRuleGroupCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2068,12 +1955,12 @@ export const de_CreateSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSizeConstraintSetResponse(data, context); + contents = _json(data); const response: CreateSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2109,10 +1996,9 @@ const de_CreateSizeConstraintSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2130,12 +2016,12 @@ export const de_CreateSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: CreateSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2171,10 +2057,9 @@ const de_CreateSqlInjectionMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2192,12 +2077,12 @@ export const de_CreateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWebACLResponse(data, context); + contents = _json(data); const response: CreateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2242,10 +2127,9 @@ const de_CreateWebACLCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2263,12 +2147,12 @@ export const de_CreateWebACLMigrationStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWebACLMigrationStackResponse(data, context); + contents = _json(data); const response: CreateWebACLMigrationStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2301,10 +2185,9 @@ const de_CreateWebACLMigrationStackCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2322,12 +2205,12 @@ export const de_CreateXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateXssMatchSetResponse(data, context); + contents = _json(data); const response: CreateXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2363,10 +2246,9 @@ const de_CreateXssMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2384,12 +2266,12 @@ export const de_DeleteByteMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteByteMatchSetResponse(data, context); + contents = _json(data); const response: DeleteByteMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2425,10 +2307,9 @@ const de_DeleteByteMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2446,12 +2327,12 @@ export const de_DeleteGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGeoMatchSetResponse(data, context); + contents = _json(data); const response: DeleteGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2487,10 +2368,9 @@ const de_DeleteGeoMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2508,12 +2388,12 @@ export const de_DeleteIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteIPSetResponse(data, context); + contents = _json(data); const response: DeleteIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2549,10 +2429,9 @@ const de_DeleteIPSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2570,12 +2449,12 @@ export const de_DeleteLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLoggingConfigurationResponse(data, context); + contents = _json(data); const response: DeleteLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2602,10 +2481,9 @@ const de_DeleteLoggingConfigurationCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2623,12 +2501,12 @@ export const de_DeletePermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePermissionPolicyResponse(data, context); + contents = _json(data); const response: DeletePermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2655,10 +2533,9 @@ const de_DeletePermissionPolicyCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,12 +2553,12 @@ export const de_DeleteRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRateBasedRuleResponse(data, context); + contents = _json(data); const response: DeleteRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2723,10 +2600,9 @@ const de_DeleteRateBasedRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2744,12 +2620,12 @@ export const de_DeleteRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegexMatchSetResponse(data, context); + contents = _json(data); const response: DeleteRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2785,10 +2661,9 @@ const de_DeleteRegexMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2806,12 +2681,12 @@ export const de_DeleteRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegexPatternSetResponse(data, context); + contents = _json(data); const response: DeleteRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2847,10 +2722,9 @@ const de_DeleteRegexPatternSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2868,12 +2742,12 @@ export const de_DeleteRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRuleResponse(data, context); + contents = _json(data); const response: DeleteRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2915,10 +2789,9 @@ const de_DeleteRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2936,12 +2809,12 @@ export const de_DeleteRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRuleGroupResponse(data, context); + contents = _json(data); const response: DeleteRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2983,10 +2856,9 @@ const de_DeleteRuleGroupCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3004,12 +2876,12 @@ export const de_DeleteSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSizeConstraintSetResponse(data, context); + contents = _json(data); const response: DeleteSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3045,10 +2917,9 @@ const de_DeleteSizeConstraintSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3066,12 +2937,12 @@ export const de_DeleteSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: DeleteSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3107,10 +2978,9 @@ const de_DeleteSqlInjectionMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3128,12 +2998,12 @@ export const de_DeleteWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWebACLResponse(data, context); + contents = _json(data); const response: DeleteWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3175,10 +3045,9 @@ const de_DeleteWebACLCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3196,12 +3065,12 @@ export const de_DeleteXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteXssMatchSetResponse(data, context); + contents = _json(data); const response: DeleteXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3237,10 +3106,9 @@ const de_DeleteXssMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3258,12 +3126,12 @@ export const de_DisassociateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateWebACLResponse(data, context); + contents = _json(data); const response: DisassociateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3293,10 +3161,9 @@ const de_DisassociateWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3319,7 +3186,7 @@ export const de_GetByteMatchSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3346,10 +3213,9 @@ const de_GetByteMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3367,12 +3233,12 @@ export const de_GetChangeTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetChangeTokenResponse(data, context); + contents = _json(data); const response: GetChangeTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3393,10 +3259,9 @@ const de_GetChangeTokenCommandError = async ( throw await de_WAFInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3414,12 +3279,12 @@ export const de_GetChangeTokenStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetChangeTokenStatusResponse(data, context); + contents = _json(data); const response: GetChangeTokenStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3443,10 +3308,9 @@ const de_GetChangeTokenStatusCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3464,12 +3328,12 @@ export const de_GetGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGeoMatchSetResponse(data, context); + contents = _json(data); const response: GetGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3496,10 +3360,9 @@ const de_GetGeoMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3517,12 +3380,12 @@ export const de_GetIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetIPSetResponse(data, context); + contents = _json(data); const response: GetIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3549,10 +3412,9 @@ const de_GetIPSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3570,12 +3432,12 @@ export const de_GetLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLoggingConfigurationResponse(data, context); + contents = _json(data); const response: GetLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3599,10 +3461,9 @@ const de_GetLoggingConfigurationCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3620,12 +3481,12 @@ export const de_GetPermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPermissionPolicyResponse(data, context); + contents = _json(data); const response: GetPermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3649,10 +3510,9 @@ const de_GetPermissionPolicyCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3670,12 +3530,12 @@ export const de_GetRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRateBasedRuleResponse(data, context); + contents = _json(data); const response: GetRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3702,10 +3562,9 @@ const de_GetRateBasedRuleCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3723,12 +3582,12 @@ export const de_GetRateBasedRuleManagedKeysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRateBasedRuleManagedKeysResponse(data, context); + contents = _json(data); const response: GetRateBasedRuleManagedKeysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3758,10 +3617,9 @@ const de_GetRateBasedRuleManagedKeysCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3779,12 +3637,12 @@ export const de_GetRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegexMatchSetResponse(data, context); + contents = _json(data); const response: GetRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3811,10 +3669,9 @@ const de_GetRegexMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3832,12 +3689,12 @@ export const de_GetRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegexPatternSetResponse(data, context); + contents = _json(data); const response: GetRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3864,10 +3721,9 @@ const de_GetRegexPatternSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3885,12 +3741,12 @@ export const de_GetRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRuleResponse(data, context); + contents = _json(data); const response: GetRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3917,10 +3773,9 @@ const de_GetRuleCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3938,12 +3793,12 @@ export const de_GetRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRuleGroupResponse(data, context); + contents = _json(data); const response: GetRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3967,10 +3822,9 @@ const de_GetRuleGroupCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3993,7 +3847,7 @@ export const de_GetSampledRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4017,10 +3871,9 @@ const de_GetSampledRequestsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4038,12 +3891,12 @@ export const de_GetSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSizeConstraintSetResponse(data, context); + contents = _json(data); const response: GetSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4070,10 +3923,9 @@ const de_GetSizeConstraintSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4091,12 +3943,12 @@ export const de_GetSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: GetSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4123,10 +3975,9 @@ const de_GetSqlInjectionMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4144,12 +3995,12 @@ export const de_GetWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetWebACLResponse(data, context); + contents = _json(data); const response: GetWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4176,10 +4027,9 @@ const de_GetWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4197,12 +4047,12 @@ export const de_GetWebACLForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetWebACLForResourceResponse(data, context); + contents = _json(data); const response: GetWebACLForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4235,10 +4085,9 @@ const de_GetWebACLForResourceCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4256,12 +4105,12 @@ export const de_GetXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetXssMatchSetResponse(data, context); + contents = _json(data); const response: GetXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4288,10 +4137,9 @@ const de_GetXssMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4309,12 +4157,12 @@ export const de_ListActivatedRulesInRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListActivatedRulesInRuleGroupResponse(data, context); + contents = _json(data); const response: ListActivatedRulesInRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4341,10 +4189,9 @@ const de_ListActivatedRulesInRuleGroupCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4362,12 +4209,12 @@ export const de_ListByteMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListByteMatchSetsResponse(data, context); + contents = _json(data); const response: ListByteMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4391,10 +4238,9 @@ const de_ListByteMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4412,12 +4258,12 @@ export const de_ListGeoMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGeoMatchSetsResponse(data, context); + contents = _json(data); const response: ListGeoMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4441,10 +4287,9 @@ const de_ListGeoMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4462,12 +4307,12 @@ export const de_ListIPSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListIPSetsResponse(data, context); + contents = _json(data); const response: ListIPSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4491,10 +4336,9 @@ const de_ListIPSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4512,12 +4356,12 @@ export const de_ListLoggingConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLoggingConfigurationsResponse(data, context); + contents = _json(data); const response: ListLoggingConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4544,10 +4388,9 @@ const de_ListLoggingConfigurationsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4565,12 +4408,12 @@ export const de_ListRateBasedRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRateBasedRulesResponse(data, context); + contents = _json(data); const response: ListRateBasedRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4594,10 +4437,9 @@ const de_ListRateBasedRulesCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4615,12 +4457,12 @@ export const de_ListRegexMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRegexMatchSetsResponse(data, context); + contents = _json(data); const response: ListRegexMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4644,10 +4486,9 @@ const de_ListRegexMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4665,12 +4506,12 @@ export const de_ListRegexPatternSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRegexPatternSetsResponse(data, context); + contents = _json(data); const response: ListRegexPatternSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4694,10 +4535,9 @@ const de_ListRegexPatternSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4715,12 +4555,12 @@ export const de_ListResourcesForWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourcesForWebACLResponse(data, context); + contents = _json(data); const response: ListResourcesForWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4750,10 +4590,9 @@ const de_ListResourcesForWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4771,12 +4610,12 @@ export const de_ListRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRuleGroupsResponse(data, context); + contents = _json(data); const response: ListRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4797,10 +4636,9 @@ const de_ListRuleGroupsCommandError = async ( throw await de_WAFInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4818,12 +4656,12 @@ export const de_ListRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRulesResponse(data, context); + contents = _json(data); const response: ListRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4847,10 +4685,9 @@ const de_ListRulesCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4868,12 +4705,12 @@ export const de_ListSizeConstraintSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSizeConstraintSetsResponse(data, context); + contents = _json(data); const response: ListSizeConstraintSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4897,10 +4734,9 @@ const de_ListSizeConstraintSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4918,12 +4754,12 @@ export const de_ListSqlInjectionMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSqlInjectionMatchSetsResponse(data, context); + contents = _json(data); const response: ListSqlInjectionMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4947,10 +4783,9 @@ const de_ListSqlInjectionMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4968,12 +4803,12 @@ export const de_ListSubscribedRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSubscribedRuleGroupsResponse(data, context); + contents = _json(data); const response: ListSubscribedRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4997,10 +4832,9 @@ const de_ListSubscribedRuleGroupsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5018,12 +4852,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5059,10 +4893,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5080,12 +4913,12 @@ export const de_ListWebACLsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListWebACLsResponse(data, context); + contents = _json(data); const response: ListWebACLsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5109,10 +4942,9 @@ const de_ListWebACLsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5130,12 +4962,12 @@ export const de_ListXssMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListXssMatchSetsResponse(data, context); + contents = _json(data); const response: ListXssMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5159,10 +4991,9 @@ const de_ListXssMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5180,12 +5011,12 @@ export const de_PutLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLoggingConfigurationResponse(data, context); + contents = _json(data); const response: PutLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5215,10 +5046,9 @@ const de_PutLoggingConfigurationCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5236,12 +5066,12 @@ export const de_PutPermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPermissionPolicyResponse(data, context); + contents = _json(data); const response: PutPermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5271,10 +5101,9 @@ const de_PutPermissionPolicyCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5292,12 +5121,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5336,10 +5165,9 @@ const de_TagResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5357,12 +5185,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5398,10 +5226,9 @@ const de_UntagResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5419,12 +5246,12 @@ export const de_UpdateByteMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateByteMatchSetResponse(data, context); + contents = _json(data); const response: UpdateByteMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5466,10 +5293,9 @@ const de_UpdateByteMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5487,12 +5313,12 @@ export const de_UpdateGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGeoMatchSetResponse(data, context); + contents = _json(data); const response: UpdateGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5537,10 +5363,9 @@ const de_UpdateGeoMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5558,12 +5383,12 @@ export const de_UpdateIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateIPSetResponse(data, context); + contents = _json(data); const response: UpdateIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5608,10 +5433,9 @@ const de_UpdateIPSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5629,12 +5453,12 @@ export const de_UpdateRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRateBasedRuleResponse(data, context); + contents = _json(data); const response: UpdateRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5679,10 +5503,9 @@ const de_UpdateRateBasedRuleCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5700,12 +5523,12 @@ export const de_UpdateRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRegexMatchSetResponse(data, context); + contents = _json(data); const response: UpdateRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5747,10 +5570,9 @@ const de_UpdateRegexMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5768,12 +5590,12 @@ export const de_UpdateRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRegexPatternSetResponse(data, context); + contents = _json(data); const response: UpdateRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5815,10 +5637,9 @@ const de_UpdateRegexPatternSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5836,12 +5657,12 @@ export const de_UpdateRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleResponse(data, context); + contents = _json(data); const response: UpdateRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5886,10 +5707,9 @@ const de_UpdateRuleCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5907,12 +5727,12 @@ export const de_UpdateRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleGroupResponse(data, context); + contents = _json(data); const response: UpdateRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5951,10 +5771,9 @@ const de_UpdateRuleGroupCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5972,12 +5791,12 @@ export const de_UpdateSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSizeConstraintSetResponse(data, context); + contents = _json(data); const response: UpdateSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6022,10 +5841,9 @@ const de_UpdateSizeConstraintSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6043,12 +5861,12 @@ export const de_UpdateSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: UpdateSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6090,10 +5908,9 @@ const de_UpdateSqlInjectionMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6111,12 +5928,12 @@ export const de_UpdateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWebACLResponse(data, context); + contents = _json(data); const response: UpdateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6164,10 +5981,9 @@ const de_UpdateWebACLCommandError = async ( throw await de_WAFSubscriptionNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6185,12 +6001,12 @@ export const de_UpdateXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateXssMatchSetResponse(data, context); + contents = _json(data); const response: UpdateXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6232,10 +6048,9 @@ const de_UpdateXssMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6249,7 +6064,7 @@ const de_WAFBadRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFBadRequestException(body, context); + const deserialized: any = _json(body); const exception = new WAFBadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6265,7 +6080,7 @@ const de_WAFDisallowedNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFDisallowedNameException(body, context); + const deserialized: any = _json(body); const exception = new WAFDisallowedNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6281,7 +6096,7 @@ const de_WAFEntityMigrationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFEntityMigrationException(body, context); + const deserialized: any = _json(body); const exception = new WAFEntityMigrationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6297,7 +6112,7 @@ const de_WAFInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6313,7 +6128,7 @@ const de_WAFInvalidAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidAccountException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6329,7 +6144,7 @@ const de_WAFInvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6345,7 +6160,7 @@ const de_WAFInvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6361,7 +6176,7 @@ const de_WAFInvalidPermissionPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidPermissionPolicyException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidPermissionPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6377,7 +6192,7 @@ const de_WAFInvalidRegexPatternExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidRegexPatternException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidRegexPatternException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6393,7 +6208,7 @@ const de_WAFLimitsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFLimitsExceededException(body, context); + const deserialized: any = _json(body); const exception = new WAFLimitsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6409,7 +6224,7 @@ const de_WAFNonEmptyEntityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonEmptyEntityException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonEmptyEntityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6425,7 +6240,7 @@ const de_WAFNonexistentContainerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonexistentContainerException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonexistentContainerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6441,7 +6256,7 @@ const de_WAFNonexistentItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonexistentItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonexistentItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6457,7 +6272,7 @@ const de_WAFReferencedItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFReferencedItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFReferencedItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6473,7 +6288,7 @@ const de_WAFServiceLinkedRoleErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFServiceLinkedRoleErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFServiceLinkedRoleErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6489,7 +6304,7 @@ const de_WAFStaleDataExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFStaleDataException(body, context); + const deserialized: any = _json(body); const exception = new WAFStaleDataException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6505,7 +6320,7 @@ const de_WAFSubscriptionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFSubscriptionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new WAFSubscriptionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6521,7 +6336,7 @@ const de_WAFTagOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFTagOperationException(body, context); + const deserialized: any = _json(body); const exception = new WAFTagOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6537,7 +6352,7 @@ const de_WAFTagOperationInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFTagOperationInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFTagOperationInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6553,7 +6368,7 @@ const de_WAFUnavailableEntityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFUnavailableEntityException(body, context); + const deserialized: any = _json(body); const exception = new WAFUnavailableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6561,38 +6376,18 @@ const de_WAFUnavailableEntityExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActivatedRule - */ -const se_ActivatedRule = (input: ActivatedRule, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_WafAction(input.Action, context) }), - ...(input.ExcludedRules != null && { ExcludedRules: se_ExcludedRules(input.ExcludedRules, context) }), - ...(input.OverrideAction != null && { OverrideAction: se_WafOverrideAction(input.OverrideAction, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ActivatedRule omitted. -/** - * serializeAws_json1_1AssociateWebACLRequest - */ -const se_AssociateWebACLRequest = (input: AssociateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_AssociateWebACLRequest omitted. /** * serializeAws_json1_1ByteMatchSetUpdate */ const se_ByteMatchSetUpdate = (input: ByteMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ByteMatchTuple != null && { ByteMatchTuple: se_ByteMatchTuple(input.ByteMatchTuple, context) }), - }; + return take(input, { + Action: [], + ByteMatchTuple: (_) => se_ByteMatchTuple(_, context), + }); }; /** @@ -6610,3199 +6405,712 @@ const se_ByteMatchSetUpdates = (input: ByteMatchSetUpdate[], context: __SerdeCon * serializeAws_json1_1ByteMatchTuple */ const se_ByteMatchTuple = (input: ByteMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.PositionalConstraint != null && { PositionalConstraint: input.PositionalConstraint }), - ...(input.TargetString != null && { TargetString: context.base64Encoder(input.TargetString) }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; + return take(input, { + FieldToMatch: _json, + PositionalConstraint: [], + TargetString: context.base64Encoder, + TextTransformation: [], + }); }; -/** - * serializeAws_json1_1CreateByteMatchSetRequest - */ -const se_CreateByteMatchSetRequest = (input: CreateByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateByteMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateGeoMatchSetRequest - */ -const se_CreateGeoMatchSetRequest = (input: CreateGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateGeoMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateIPSetRequest - */ -const se_CreateIPSetRequest = (input: CreateIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateIPSetRequest omitted. -/** - * serializeAws_json1_1CreateRateBasedRuleRequest - */ -const se_CreateRateBasedRuleRequest = (input: CreateRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RateKey != null && { RateKey: input.RateKey }), - ...(input.RateLimit != null && { RateLimit: input.RateLimit }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateRateBasedRuleRequest omitted. -/** - * serializeAws_json1_1CreateRegexMatchSetRequest - */ -const se_CreateRegexMatchSetRequest = (input: CreateRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateRegexMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateRegexPatternSetRequest - */ -const se_CreateRegexPatternSetRequest = (input: CreateRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateRegexPatternSetRequest omitted. -/** - * serializeAws_json1_1CreateRuleGroupRequest - */ -const se_CreateRuleGroupRequest = (input: CreateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateRuleGroupRequest omitted. -/** - * serializeAws_json1_1CreateRuleRequest - */ -const se_CreateRuleRequest = (input: CreateRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateRuleRequest omitted. -/** - * serializeAws_json1_1CreateSizeConstraintSetRequest - */ -const se_CreateSizeConstraintSetRequest = (input: CreateSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateSizeConstraintSetRequest omitted. -/** - * serializeAws_json1_1CreateSqlInjectionMatchSetRequest - */ -const se_CreateSqlInjectionMatchSetRequest = ( - input: CreateSqlInjectionMatchSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateSqlInjectionMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateWebACLMigrationStackRequest - */ -const se_CreateWebACLMigrationStackRequest = ( - input: CreateWebACLMigrationStackRequest, - context: __SerdeContext -): any => { - return { - ...(input.IgnoreUnsupportedType != null && { IgnoreUnsupportedType: input.IgnoreUnsupportedType }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_CreateWebACLMigrationStackRequest omitted. -/** - * serializeAws_json1_1CreateWebACLRequest - */ -const se_CreateWebACLRequest = (input: CreateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.DefaultAction != null && { DefaultAction: se_WafAction(input.DefaultAction, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateWebACLRequest omitted. -/** - * serializeAws_json1_1CreateXssMatchSetRequest - */ -const se_CreateXssMatchSetRequest = (input: CreateXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateXssMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteByteMatchSetRequest - */ -const se_DeleteByteMatchSetRequest = (input: DeleteByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ByteMatchSetId != null && { ByteMatchSetId: input.ByteMatchSetId }), - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - }; -}; +// se_DeleteByteMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteGeoMatchSetRequest - */ -const se_DeleteGeoMatchSetRequest = (input: DeleteGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.GeoMatchSetId != null && { GeoMatchSetId: input.GeoMatchSetId }), - }; -}; +// se_DeleteGeoMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteIPSetRequest - */ -const se_DeleteIPSetRequest = (input: DeleteIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.IPSetId != null && { IPSetId: input.IPSetId }), - }; -}; +// se_DeleteIPSetRequest omitted. -/** - * serializeAws_json1_1DeleteLoggingConfigurationRequest - */ -const se_DeleteLoggingConfigurationRequest = ( - input: DeleteLoggingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeleteLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_1DeletePermissionPolicyRequest - */ -const se_DeletePermissionPolicyRequest = (input: DeletePermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeletePermissionPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteRateBasedRuleRequest - */ -const se_DeleteRateBasedRuleRequest = (input: DeleteRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_DeleteRateBasedRuleRequest omitted. -/** - * serializeAws_json1_1DeleteRegexMatchSetRequest - */ -const se_DeleteRegexMatchSetRequest = (input: DeleteRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexMatchSetId != null && { RegexMatchSetId: input.RegexMatchSetId }), - }; -}; +// se_DeleteRegexMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteRegexPatternSetRequest - */ -const se_DeleteRegexPatternSetRequest = (input: DeleteRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - }; -}; +// se_DeleteRegexPatternSetRequest omitted. -/** - * serializeAws_json1_1DeleteRuleGroupRequest - */ -const se_DeleteRuleGroupRequest = (input: DeleteRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - }; -}; +// se_DeleteRuleGroupRequest omitted. -/** - * serializeAws_json1_1DeleteRuleRequest - */ -const se_DeleteRuleRequest = (input: DeleteRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_DeleteRuleRequest omitted. -/** - * serializeAws_json1_1DeleteSizeConstraintSetRequest - */ -const se_DeleteSizeConstraintSetRequest = (input: DeleteSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SizeConstraintSetId != null && { SizeConstraintSetId: input.SizeConstraintSetId }), - }; -}; +// se_DeleteSizeConstraintSetRequest omitted. -/** - * serializeAws_json1_1DeleteSqlInjectionMatchSetRequest - */ -const se_DeleteSqlInjectionMatchSetRequest = ( - input: DeleteSqlInjectionMatchSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SqlInjectionMatchSetId != null && { SqlInjectionMatchSetId: input.SqlInjectionMatchSetId }), - }; -}; +// se_DeleteSqlInjectionMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteWebACLRequest - */ -const se_DeleteWebACLRequest = (input: DeleteWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_DeleteWebACLRequest omitted. -/** - * serializeAws_json1_1DeleteXssMatchSetRequest - */ -const se_DeleteXssMatchSetRequest = (input: DeleteXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.XssMatchSetId != null && { XssMatchSetId: input.XssMatchSetId }), - }; -}; +// se_DeleteXssMatchSetRequest omitted. -/** - * serializeAws_json1_1DisassociateWebACLRequest - */ -const se_DisassociateWebACLRequest = (input: DisassociateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DisassociateWebACLRequest omitted. -/** - * serializeAws_json1_1ExcludedRule - */ -const se_ExcludedRule = (input: ExcludedRule, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_ExcludedRule omitted. -/** - * serializeAws_json1_1ExcludedRules - */ -const se_ExcludedRules = (input: ExcludedRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExcludedRule(entry, context); - }); -}; +// se_ExcludedRules omitted. -/** - * serializeAws_json1_1FieldToMatch - */ -const se_FieldToMatch = (input: FieldToMatch, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: input.Data }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_FieldToMatch omitted. -/** - * serializeAws_json1_1GeoMatchConstraint - */ -const se_GeoMatchConstraint = (input: GeoMatchConstraint, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_GeoMatchConstraint omitted. -/** - * serializeAws_json1_1GeoMatchSetUpdate - */ -const se_GeoMatchSetUpdate = (input: GeoMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.GeoMatchConstraint != null && { - GeoMatchConstraint: se_GeoMatchConstraint(input.GeoMatchConstraint, context), - }), - }; -}; +// se_GeoMatchSetUpdate omitted. -/** - * serializeAws_json1_1GeoMatchSetUpdates - */ -const se_GeoMatchSetUpdates = (input: GeoMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GeoMatchSetUpdate(entry, context); - }); -}; +// se_GeoMatchSetUpdates omitted. -/** - * serializeAws_json1_1GetByteMatchSetRequest - */ -const se_GetByteMatchSetRequest = (input: GetByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ByteMatchSetId != null && { ByteMatchSetId: input.ByteMatchSetId }), - }; -}; +// se_GetByteMatchSetRequest omitted. -/** - * serializeAws_json1_1GetChangeTokenRequest - */ -const se_GetChangeTokenRequest = (input: GetChangeTokenRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetChangeTokenRequest omitted. -/** - * serializeAws_json1_1GetChangeTokenStatusRequest - */ -const se_GetChangeTokenStatusRequest = (input: GetChangeTokenStatusRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - }; -}; +// se_GetChangeTokenStatusRequest omitted. -/** - * serializeAws_json1_1GetGeoMatchSetRequest - */ -const se_GetGeoMatchSetRequest = (input: GetGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.GeoMatchSetId != null && { GeoMatchSetId: input.GeoMatchSetId }), - }; -}; +// se_GetGeoMatchSetRequest omitted. -/** - * serializeAws_json1_1GetIPSetRequest - */ -const se_GetIPSetRequest = (input: GetIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.IPSetId != null && { IPSetId: input.IPSetId }), - }; -}; +// se_GetIPSetRequest omitted. -/** - * serializeAws_json1_1GetLoggingConfigurationRequest - */ -const se_GetLoggingConfigurationRequest = (input: GetLoggingConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_1GetPermissionPolicyRequest - */ -const se_GetPermissionPolicyRequest = (input: GetPermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetPermissionPolicyRequest omitted. -/** - * serializeAws_json1_1GetRateBasedRuleManagedKeysRequest - */ -const se_GetRateBasedRuleManagedKeysRequest = ( - input: GetRateBasedRuleManagedKeysRequest, - context: __SerdeContext -): any => { - return { - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_GetRateBasedRuleManagedKeysRequest omitted. -/** - * serializeAws_json1_1GetRateBasedRuleRequest - */ -const se_GetRateBasedRuleRequest = (input: GetRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_GetRateBasedRuleRequest omitted. -/** - * serializeAws_json1_1GetRegexMatchSetRequest - */ -const se_GetRegexMatchSetRequest = (input: GetRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.RegexMatchSetId != null && { RegexMatchSetId: input.RegexMatchSetId }), - }; -}; +// se_GetRegexMatchSetRequest omitted. -/** - * serializeAws_json1_1GetRegexPatternSetRequest - */ -const se_GetRegexPatternSetRequest = (input: GetRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - }; -}; +// se_GetRegexPatternSetRequest omitted. + +// se_GetRuleGroupRequest omitted. + +// se_GetRuleRequest omitted. /** - * serializeAws_json1_1GetRuleGroupRequest + * serializeAws_json1_1GetSampledRequestsRequest */ -const se_GetRuleGroupRequest = (input: GetRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - }; +const se_GetSampledRequestsRequest = (input: GetSampledRequestsRequest, context: __SerdeContext): any => { + return take(input, { + MaxItems: [], + RuleId: [], + TimeWindow: (_) => se_TimeWindow(_, context), + WebAclId: [], + }); }; -/** - * serializeAws_json1_1GetRuleRequest - */ -const se_GetRuleRequest = (input: GetRuleRequest, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_GetSizeConstraintSetRequest omitted. -/** - * serializeAws_json1_1GetSampledRequestsRequest - */ -const se_GetSampledRequestsRequest = (input: GetSampledRequestsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.TimeWindow != null && { TimeWindow: se_TimeWindow(input.TimeWindow, context) }), - ...(input.WebAclId != null && { WebAclId: input.WebAclId }), - }; -}; +// se_GetSqlInjectionMatchSetRequest omitted. -/** - * serializeAws_json1_1GetSizeConstraintSetRequest - */ -const se_GetSizeConstraintSetRequest = (input: GetSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.SizeConstraintSetId != null && { SizeConstraintSetId: input.SizeConstraintSetId }), - }; -}; +// se_GetWebACLForResourceRequest omitted. -/** - * serializeAws_json1_1GetSqlInjectionMatchSetRequest - */ -const se_GetSqlInjectionMatchSetRequest = (input: GetSqlInjectionMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.SqlInjectionMatchSetId != null && { SqlInjectionMatchSetId: input.SqlInjectionMatchSetId }), - }; -}; +// se_GetWebACLRequest omitted. -/** - * serializeAws_json1_1GetWebACLForResourceRequest - */ -const se_GetWebACLForResourceRequest = (input: GetWebACLForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetXssMatchSetRequest omitted. -/** - * serializeAws_json1_1GetWebACLRequest - */ -const se_GetWebACLRequest = (input: GetWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_IPSetDescriptor omitted. -/** - * serializeAws_json1_1GetXssMatchSetRequest - */ -const se_GetXssMatchSetRequest = (input: GetXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.XssMatchSetId != null && { XssMatchSetId: input.XssMatchSetId }), - }; -}; +// se_IPSetUpdate omitted. -/** - * serializeAws_json1_1IPSetDescriptor - */ -const se_IPSetDescriptor = (input: IPSetDescriptor, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_IPSetUpdates omitted. -/** - * serializeAws_json1_1IPSetUpdate - */ -const se_IPSetUpdate = (input: IPSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.IPSetDescriptor != null && { IPSetDescriptor: se_IPSetDescriptor(input.IPSetDescriptor, context) }), - }; -}; +// se_ListActivatedRulesInRuleGroupRequest omitted. -/** - * serializeAws_json1_1IPSetUpdates - */ -const se_IPSetUpdates = (input: IPSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IPSetUpdate(entry, context); - }); -}; +// se_ListByteMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListActivatedRulesInRuleGroupRequest - */ -const se_ListActivatedRulesInRuleGroupRequest = ( - input: ListActivatedRulesInRuleGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - }; -}; +// se_ListGeoMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListByteMatchSetsRequest - */ -const se_ListByteMatchSetsRequest = (input: ListByteMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListIPSetsRequest omitted. -/** - * serializeAws_json1_1ListGeoMatchSetsRequest - */ -const se_ListGeoMatchSetsRequest = (input: ListGeoMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListLoggingConfigurationsRequest omitted. -/** - * serializeAws_json1_1ListIPSetsRequest - */ -const se_ListIPSetsRequest = (input: ListIPSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRateBasedRulesRequest omitted. -/** - * serializeAws_json1_1ListLoggingConfigurationsRequest - */ -const se_ListLoggingConfigurationsRequest = (input: ListLoggingConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRegexMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListRateBasedRulesRequest - */ -const se_ListRateBasedRulesRequest = (input: ListRateBasedRulesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRegexPatternSetsRequest omitted. -/** - * serializeAws_json1_1ListRegexMatchSetsRequest - */ -const se_ListRegexMatchSetsRequest = (input: ListRegexMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListResourcesForWebACLRequest omitted. -/** - * serializeAws_json1_1ListRegexPatternSetsRequest - */ -const se_ListRegexPatternSetsRequest = (input: ListRegexPatternSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRuleGroupsRequest omitted. -/** - * serializeAws_json1_1ListResourcesForWebACLRequest - */ -const se_ListResourcesForWebACLRequest = (input: ListResourcesForWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_ListRulesRequest omitted. -/** - * serializeAws_json1_1ListRuleGroupsRequest - */ -const se_ListRuleGroupsRequest = (input: ListRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListSizeConstraintSetsRequest omitted. -/** - * serializeAws_json1_1ListRulesRequest - */ -const se_ListRulesRequest = (input: ListRulesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListSqlInjectionMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListSizeConstraintSetsRequest - */ -const se_ListSizeConstraintSetsRequest = (input: ListSizeConstraintSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListSubscribedRuleGroupsRequest omitted. -/** - * serializeAws_json1_1ListSqlInjectionMatchSetsRequest - */ -const se_ListSqlInjectionMatchSetsRequest = (input: ListSqlInjectionMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListSubscribedRuleGroupsRequest - */ -const se_ListSubscribedRuleGroupsRequest = (input: ListSubscribedRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListWebACLsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListXssMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListWebACLsRequest - */ -const se_ListWebACLsRequest = (input: ListWebACLsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_LogDestinationConfigs omitted. -/** - * serializeAws_json1_1ListXssMatchSetsRequest - */ -const se_ListXssMatchSetsRequest = (input: ListXssMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_LoggingConfiguration omitted. -/** - * serializeAws_json1_1LogDestinationConfigs - */ -const se_LogDestinationConfigs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_Predicate omitted. -/** - * serializeAws_json1_1LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.LogDestinationConfigs != null && { - LogDestinationConfigs: se_LogDestinationConfigs(input.LogDestinationConfigs, context), - }), - ...(input.RedactedFields != null && { RedactedFields: se_RedactedFields(input.RedactedFields, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_PutLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_1Predicate - */ -const se_Predicate = (input: Predicate, context: __SerdeContext): any => { - return { - ...(input.DataId != null && { DataId: input.DataId }), - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_PutPermissionPolicyRequest omitted. -/** - * serializeAws_json1_1PutLoggingConfigurationRequest - */ -const se_PutLoggingConfigurationRequest = (input: PutLoggingConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context), - }), - }; -}; +// se_RedactedFields omitted. -/** - * serializeAws_json1_1PutPermissionPolicyRequest - */ -const se_PutPermissionPolicyRequest = (input: PutPermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_RegexMatchSetUpdate omitted. -/** - * serializeAws_json1_1RedactedFields - */ -const se_RedactedFields = (input: FieldToMatch[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldToMatch(entry, context); - }); -}; +// se_RegexMatchSetUpdates omitted. -/** - * serializeAws_json1_1RegexMatchSetUpdate - */ -const se_RegexMatchSetUpdate = (input: RegexMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.RegexMatchTuple != null && { RegexMatchTuple: se_RegexMatchTuple(input.RegexMatchTuple, context) }), - }; -}; +// se_RegexMatchTuple omitted. -/** - * serializeAws_json1_1RegexMatchSetUpdates - */ -const se_RegexMatchSetUpdates = (input: RegexMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegexMatchSetUpdate(entry, context); - }); -}; +// se_RegexPatternSetUpdate omitted. + +// se_RegexPatternSetUpdates omitted. + +// se_RuleGroupUpdate omitted. + +// se_RuleGroupUpdates omitted. + +// se_RuleUpdate omitted. + +// se_RuleUpdates omitted. + +// se_SizeConstraint omitted. + +// se_SizeConstraintSetUpdate omitted. + +// se_SizeConstraintSetUpdates omitted. + +// se_SqlInjectionMatchSetUpdate omitted. + +// se_SqlInjectionMatchSetUpdates omitted. + +// se_SqlInjectionMatchTuple omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. /** - * serializeAws_json1_1RegexMatchTuple + * serializeAws_json1_1TimeWindow */ -const se_RegexMatchTuple = (input: RegexMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; +const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_UntagResourceRequest omitted. + /** - * serializeAws_json1_1RegexPatternSetUpdate + * serializeAws_json1_1UpdateByteMatchSetRequest */ -const se_RegexPatternSetUpdate = (input: RegexPatternSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.RegexPatternString != null && { RegexPatternString: input.RegexPatternString }), - }; +const se_UpdateByteMatchSetRequest = (input: UpdateByteMatchSetRequest, context: __SerdeContext): any => { + return take(input, { + ByteMatchSetId: [], + ChangeToken: [], + Updates: (_) => se_ByteMatchSetUpdates(_, context), + }); }; +// se_UpdateGeoMatchSetRequest omitted. + +// se_UpdateIPSetRequest omitted. + +// se_UpdateRateBasedRuleRequest omitted. + +// se_UpdateRegexMatchSetRequest omitted. + +// se_UpdateRegexPatternSetRequest omitted. + +// se_UpdateRuleGroupRequest omitted. + +// se_UpdateRuleRequest omitted. + +// se_UpdateSizeConstraintSetRequest omitted. + +// se_UpdateSqlInjectionMatchSetRequest omitted. + +// se_UpdateWebACLRequest omitted. + +// se_UpdateXssMatchSetRequest omitted. + +// se_WafAction omitted. + +// se_WafOverrideAction omitted. + +// se_WebACLUpdate omitted. + +// se_WebACLUpdates omitted. + +// se_XssMatchSetUpdate omitted. + +// se_XssMatchSetUpdates omitted. + +// se_XssMatchTuple omitted. + +// de_ActivatedRule omitted. + +// de_ActivatedRules omitted. + +// de_AssociateWebACLResponse omitted. + /** - * serializeAws_json1_1RegexPatternSetUpdates + * deserializeAws_json1_1ByteMatchSet */ -const se_RegexPatternSetUpdates = (input: RegexPatternSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegexPatternSetUpdate(entry, context); - }); +const de_ByteMatchSet = (output: any, context: __SerdeContext): ByteMatchSet => { + return take(output, { + ByteMatchSetId: __expectString, + ByteMatchTuples: (_: any) => de_ByteMatchTuples(_, context), + Name: __expectString, + }) as any; }; +// de_ByteMatchSetSummaries omitted. + +// de_ByteMatchSetSummary omitted. + /** - * serializeAws_json1_1RuleGroupUpdate + * deserializeAws_json1_1ByteMatchTuple */ -const se_RuleGroupUpdate = (input: RuleGroupUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ActivatedRule != null && { ActivatedRule: se_ActivatedRule(input.ActivatedRule, context) }), - }; +const de_ByteMatchTuple = (output: any, context: __SerdeContext): ByteMatchTuple => { + return take(output, { + FieldToMatch: _json, + PositionalConstraint: __expectString, + TargetString: context.base64Decoder, + TextTransformation: __expectString, + }) as any; }; /** - * serializeAws_json1_1RuleGroupUpdates + * deserializeAws_json1_1ByteMatchTuples */ -const se_RuleGroupUpdates = (input: RuleGroupUpdate[], context: __SerdeContext): any => { - return input +const de_ByteMatchTuples = (output: any, context: __SerdeContext): ByteMatchTuple[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupUpdate(entry, context); + .map((entry: any) => { + return de_ByteMatchTuple(entry, context); }); + return retVal; }; /** - * serializeAws_json1_1RuleUpdate + * deserializeAws_json1_1CreateByteMatchSetResponse */ -const se_RuleUpdate = (input: RuleUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Predicate != null && { Predicate: se_Predicate(input.Predicate, context) }), - }; +const de_CreateByteMatchSetResponse = (output: any, context: __SerdeContext): CreateByteMatchSetResponse => { + return take(output, { + ByteMatchSet: (_: any) => de_ByteMatchSet(_, context), + ChangeToken: __expectString, + }) as any; }; -/** - * serializeAws_json1_1RuleUpdates - */ -const se_RuleUpdates = (input: RuleUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleUpdate(entry, context); - }); -}; +// de_CreateGeoMatchSetResponse omitted. -/** - * serializeAws_json1_1SizeConstraint - */ -const se_SizeConstraint = (input: SizeConstraint, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.Size != null && { Size: input.Size }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; -}; +// de_CreateIPSetResponse omitted. -/** - * serializeAws_json1_1SizeConstraintSetUpdate - */ -const se_SizeConstraintSetUpdate = (input: SizeConstraintSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.SizeConstraint != null && { SizeConstraint: se_SizeConstraint(input.SizeConstraint, context) }), - }; -}; +// de_CreateRateBasedRuleResponse omitted. -/** - * serializeAws_json1_1SizeConstraintSetUpdates - */ -const se_SizeConstraintSetUpdates = (input: SizeConstraintSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SizeConstraintSetUpdate(entry, context); - }); -}; +// de_CreateRegexMatchSetResponse omitted. -/** - * serializeAws_json1_1SqlInjectionMatchSetUpdate - */ -const se_SqlInjectionMatchSetUpdate = (input: SqlInjectionMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.SqlInjectionMatchTuple != null && { - SqlInjectionMatchTuple: se_SqlInjectionMatchTuple(input.SqlInjectionMatchTuple, context), - }), - }; -}; +// de_CreateRegexPatternSetResponse omitted. -/** - * serializeAws_json1_1SqlInjectionMatchSetUpdates - */ -const se_SqlInjectionMatchSetUpdates = (input: SqlInjectionMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SqlInjectionMatchSetUpdate(entry, context); - }); -}; +// de_CreateRuleGroupResponse omitted. -/** - * serializeAws_json1_1SqlInjectionMatchTuple - */ -const se_SqlInjectionMatchTuple = (input: SqlInjectionMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; -}; +// de_CreateRuleResponse omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// de_CreateSizeConstraintSetResponse omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_CreateSqlInjectionMatchSetResponse omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// de_CreateWebACLMigrationStackResponse omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// de_CreateWebACLResponse omitted. -/** - * serializeAws_json1_1TimeWindow - */ -const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; -}; +// de_CreateXssMatchSetResponse omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// de_DeleteByteMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateByteMatchSetRequest - */ -const se_UpdateByteMatchSetRequest = (input: UpdateByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ByteMatchSetId != null && { ByteMatchSetId: input.ByteMatchSetId }), - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Updates != null && { Updates: se_ByteMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteGeoMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateGeoMatchSetRequest - */ -const se_UpdateGeoMatchSetRequest = (input: UpdateGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.GeoMatchSetId != null && { GeoMatchSetId: input.GeoMatchSetId }), - ...(input.Updates != null && { Updates: se_GeoMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteIPSetResponse omitted. -/** - * serializeAws_json1_1UpdateIPSetRequest - */ -const se_UpdateIPSetRequest = (input: UpdateIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.IPSetId != null && { IPSetId: input.IPSetId }), - ...(input.Updates != null && { Updates: se_IPSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteLoggingConfigurationResponse omitted. -/** - * serializeAws_json1_1UpdateRateBasedRuleRequest - */ -const se_UpdateRateBasedRuleRequest = (input: UpdateRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RateLimit != null && { RateLimit: input.RateLimit }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Updates != null && { Updates: se_RuleUpdates(input.Updates, context) }), - }; -}; +// de_DeletePermissionPolicyResponse omitted. -/** - * serializeAws_json1_1UpdateRegexMatchSetRequest - */ -const se_UpdateRegexMatchSetRequest = (input: UpdateRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexMatchSetId != null && { RegexMatchSetId: input.RegexMatchSetId }), - ...(input.Updates != null && { Updates: se_RegexMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteRateBasedRuleResponse omitted. -/** - * serializeAws_json1_1UpdateRegexPatternSetRequest - */ -const se_UpdateRegexPatternSetRequest = (input: UpdateRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - ...(input.Updates != null && { Updates: se_RegexPatternSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteRegexMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateRuleGroupRequest - */ -const se_UpdateRuleGroupRequest = (input: UpdateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - ...(input.Updates != null && { Updates: se_RuleGroupUpdates(input.Updates, context) }), - }; -}; +// de_DeleteRegexPatternSetResponse omitted. -/** - * serializeAws_json1_1UpdateRuleRequest - */ -const se_UpdateRuleRequest = (input: UpdateRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Updates != null && { Updates: se_RuleUpdates(input.Updates, context) }), - }; -}; +// de_DeleteRuleGroupResponse omitted. -/** - * serializeAws_json1_1UpdateSizeConstraintSetRequest - */ -const se_UpdateSizeConstraintSetRequest = (input: UpdateSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SizeConstraintSetId != null && { SizeConstraintSetId: input.SizeConstraintSetId }), - ...(input.Updates != null && { Updates: se_SizeConstraintSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteRuleResponse omitted. -/** - * serializeAws_json1_1UpdateSqlInjectionMatchSetRequest - */ -const se_UpdateSqlInjectionMatchSetRequest = ( - input: UpdateSqlInjectionMatchSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SqlInjectionMatchSetId != null && { SqlInjectionMatchSetId: input.SqlInjectionMatchSetId }), - ...(input.Updates != null && { Updates: se_SqlInjectionMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteSizeConstraintSetResponse omitted. -/** - * serializeAws_json1_1UpdateWebACLRequest - */ -const se_UpdateWebACLRequest = (input: UpdateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.DefaultAction != null && { DefaultAction: se_WafAction(input.DefaultAction, context) }), - ...(input.Updates != null && { Updates: se_WebACLUpdates(input.Updates, context) }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// de_DeleteSqlInjectionMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateXssMatchSetRequest - */ -const se_UpdateXssMatchSetRequest = (input: UpdateXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Updates != null && { Updates: se_XssMatchSetUpdates(input.Updates, context) }), - ...(input.XssMatchSetId != null && { XssMatchSetId: input.XssMatchSetId }), - }; -}; +// de_DeleteWebACLResponse omitted. -/** - * serializeAws_json1_1WafAction - */ -const se_WafAction = (input: WafAction, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; +// de_DeleteXssMatchSetResponse omitted. -/** - * serializeAws_json1_1WafOverrideAction - */ -const se_WafOverrideAction = (input: WafOverrideAction, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; +// de_DisassociateWebACLResponse omitted. -/** - * serializeAws_json1_1WebACLUpdate - */ -const se_WebACLUpdate = (input: WebACLUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ActivatedRule != null && { ActivatedRule: se_ActivatedRule(input.ActivatedRule, context) }), - }; -}; +// de_ExcludedRule omitted. -/** - * serializeAws_json1_1WebACLUpdates - */ -const se_WebACLUpdates = (input: WebACLUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WebACLUpdate(entry, context); - }); -}; +// de_ExcludedRules omitted. -/** - * serializeAws_json1_1XssMatchSetUpdate - */ -const se_XssMatchSetUpdate = (input: XssMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.XssMatchTuple != null && { XssMatchTuple: se_XssMatchTuple(input.XssMatchTuple, context) }), - }; -}; +// de_FieldToMatch omitted. -/** - * serializeAws_json1_1XssMatchSetUpdates - */ -const se_XssMatchSetUpdates = (input: XssMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_XssMatchSetUpdate(entry, context); - }); -}; +// de_GeoMatchConstraint omitted. -/** - * serializeAws_json1_1XssMatchTuple - */ -const se_XssMatchTuple = (input: XssMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; -}; +// de_GeoMatchConstraints omitted. -/** - * deserializeAws_json1_1ActivatedRule - */ -const de_ActivatedRule = (output: any, context: __SerdeContext): ActivatedRule => { - return { - Action: output.Action != null ? de_WafAction(output.Action, context) : undefined, - ExcludedRules: output.ExcludedRules != null ? de_ExcludedRules(output.ExcludedRules, context) : undefined, - OverrideAction: output.OverrideAction != null ? de_WafOverrideAction(output.OverrideAction, context) : undefined, - Priority: __expectInt32(output.Priority), - RuleId: __expectString(output.RuleId), - Type: __expectString(output.Type), - } as any; -}; +// de_GeoMatchSet omitted. -/** - * deserializeAws_json1_1ActivatedRules - */ -const de_ActivatedRules = (output: any, context: __SerdeContext): ActivatedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActivatedRule(entry, context); - }); - return retVal; -}; +// de_GeoMatchSetSummaries omitted. -/** - * deserializeAws_json1_1AssociateWebACLResponse - */ -const de_AssociateWebACLResponse = (output: any, context: __SerdeContext): AssociateWebACLResponse => { - return {} as any; -}; +// de_GeoMatchSetSummary omitted. /** - * deserializeAws_json1_1ByteMatchSet + * deserializeAws_json1_1GetByteMatchSetResponse */ -const de_ByteMatchSet = (output: any, context: __SerdeContext): ByteMatchSet => { - return { - ByteMatchSetId: __expectString(output.ByteMatchSetId), - ByteMatchTuples: output.ByteMatchTuples != null ? de_ByteMatchTuples(output.ByteMatchTuples, context) : undefined, - Name: __expectString(output.Name), - } as any; +const de_GetByteMatchSetResponse = (output: any, context: __SerdeContext): GetByteMatchSetResponse => { + return take(output, { + ByteMatchSet: (_: any) => de_ByteMatchSet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ByteMatchSetSummaries - */ -const de_ByteMatchSetSummaries = (output: any, context: __SerdeContext): ByteMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ByteMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_GetChangeTokenResponse omitted. -/** - * deserializeAws_json1_1ByteMatchSetSummary - */ -const de_ByteMatchSetSummary = (output: any, context: __SerdeContext): ByteMatchSetSummary => { - return { - ByteMatchSetId: __expectString(output.ByteMatchSetId), - Name: __expectString(output.Name), - } as any; -}; +// de_GetChangeTokenStatusResponse omitted. -/** - * deserializeAws_json1_1ByteMatchTuple - */ -const de_ByteMatchTuple = (output: any, context: __SerdeContext): ByteMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - PositionalConstraint: __expectString(output.PositionalConstraint), - TargetString: output.TargetString != null ? context.base64Decoder(output.TargetString) : undefined, - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_GetGeoMatchSetResponse omitted. -/** - * deserializeAws_json1_1ByteMatchTuples - */ -const de_ByteMatchTuples = (output: any, context: __SerdeContext): ByteMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ByteMatchTuple(entry, context); - }); - return retVal; -}; +// de_GetIPSetResponse omitted. -/** - * deserializeAws_json1_1CreateByteMatchSetResponse - */ -const de_CreateByteMatchSetResponse = (output: any, context: __SerdeContext): CreateByteMatchSetResponse => { - return { - ByteMatchSet: output.ByteMatchSet != null ? de_ByteMatchSet(output.ByteMatchSet, context) : undefined, - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_GetLoggingConfigurationResponse omitted. -/** - * deserializeAws_json1_1CreateGeoMatchSetResponse - */ -const de_CreateGeoMatchSetResponse = (output: any, context: __SerdeContext): CreateGeoMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - GeoMatchSet: output.GeoMatchSet != null ? de_GeoMatchSet(output.GeoMatchSet, context) : undefined, - } as any; -}; +// de_GetPermissionPolicyResponse omitted. -/** - * deserializeAws_json1_1CreateIPSetResponse - */ -const de_CreateIPSetResponse = (output: any, context: __SerdeContext): CreateIPSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - IPSet: output.IPSet != null ? de_IPSet(output.IPSet, context) : undefined, - } as any; -}; +// de_GetRateBasedRuleManagedKeysResponse omitted. -/** - * deserializeAws_json1_1CreateRateBasedRuleResponse - */ -const de_CreateRateBasedRuleResponse = (output: any, context: __SerdeContext): CreateRateBasedRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - Rule: output.Rule != null ? de_RateBasedRule(output.Rule, context) : undefined, - } as any; -}; +// de_GetRateBasedRuleResponse omitted. -/** - * deserializeAws_json1_1CreateRegexMatchSetResponse - */ -const de_CreateRegexMatchSetResponse = (output: any, context: __SerdeContext): CreateRegexMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - RegexMatchSet: output.RegexMatchSet != null ? de_RegexMatchSet(output.RegexMatchSet, context) : undefined, - } as any; -}; +// de_GetRegexMatchSetResponse omitted. + +// de_GetRegexPatternSetResponse omitted. + +// de_GetRuleGroupResponse omitted. + +// de_GetRuleResponse omitted. /** - * deserializeAws_json1_1CreateRegexPatternSetResponse + * deserializeAws_json1_1GetSampledRequestsResponse */ -const de_CreateRegexPatternSetResponse = (output: any, context: __SerdeContext): CreateRegexPatternSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - RegexPatternSet: output.RegexPatternSet != null ? de_RegexPatternSet(output.RegexPatternSet, context) : undefined, - } as any; +const de_GetSampledRequestsResponse = (output: any, context: __SerdeContext): GetSampledRequestsResponse => { + return take(output, { + PopulationSize: __expectLong, + SampledRequests: (_: any) => de_SampledHTTPRequests(_, context), + TimeWindow: (_: any) => de_TimeWindow(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateRuleGroupResponse - */ -const de_CreateRuleGroupResponse = (output: any, context: __SerdeContext): CreateRuleGroupResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - RuleGroup: output.RuleGroup != null ? de_RuleGroup(output.RuleGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateRuleResponse - */ -const de_CreateRuleResponse = (output: any, context: __SerdeContext): CreateRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - Rule: output.Rule != null ? de_Rule(output.Rule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateSizeConstraintSetResponse - */ -const de_CreateSizeConstraintSetResponse = (output: any, context: __SerdeContext): CreateSizeConstraintSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - SizeConstraintSet: - output.SizeConstraintSet != null ? de_SizeConstraintSet(output.SizeConstraintSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateSqlInjectionMatchSetResponse - */ -const de_CreateSqlInjectionMatchSetResponse = ( - output: any, - context: __SerdeContext -): CreateSqlInjectionMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - SqlInjectionMatchSet: - output.SqlInjectionMatchSet != null ? de_SqlInjectionMatchSet(output.SqlInjectionMatchSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateWebACLMigrationStackResponse - */ -const de_CreateWebACLMigrationStackResponse = ( - output: any, - context: __SerdeContext -): CreateWebACLMigrationStackResponse => { - return { - S3ObjectUrl: __expectString(output.S3ObjectUrl), - } as any; -}; +// de_GetSizeConstraintSetResponse omitted. -/** - * deserializeAws_json1_1CreateWebACLResponse - */ -const de_CreateWebACLResponse = (output: any, context: __SerdeContext): CreateWebACLResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - WebACL: output.WebACL != null ? de_WebACL(output.WebACL, context) : undefined, - } as any; -}; +// de_GetSqlInjectionMatchSetResponse omitted. -/** - * deserializeAws_json1_1CreateXssMatchSetResponse - */ -const de_CreateXssMatchSetResponse = (output: any, context: __SerdeContext): CreateXssMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - XssMatchSet: output.XssMatchSet != null ? de_XssMatchSet(output.XssMatchSet, context) : undefined, - } as any; -}; +// de_GetWebACLForResourceResponse omitted. -/** - * deserializeAws_json1_1DeleteByteMatchSetResponse - */ -const de_DeleteByteMatchSetResponse = (output: any, context: __SerdeContext): DeleteByteMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_GetWebACLResponse omitted. -/** - * deserializeAws_json1_1DeleteGeoMatchSetResponse - */ -const de_DeleteGeoMatchSetResponse = (output: any, context: __SerdeContext): DeleteGeoMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_GetXssMatchSetResponse omitted. -/** - * deserializeAws_json1_1DeleteIPSetResponse - */ -const de_DeleteIPSetResponse = (output: any, context: __SerdeContext): DeleteIPSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_HTTPHeader omitted. -/** - * deserializeAws_json1_1DeleteLoggingConfigurationResponse - */ -const de_DeleteLoggingConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteLoggingConfigurationResponse => { - return {} as any; -}; +// de_HTTPHeaders omitted. -/** - * deserializeAws_json1_1DeletePermissionPolicyResponse - */ -const de_DeletePermissionPolicyResponse = (output: any, context: __SerdeContext): DeletePermissionPolicyResponse => { - return {} as any; -}; +// de_HTTPRequest omitted. -/** - * deserializeAws_json1_1DeleteRateBasedRuleResponse - */ -const de_DeleteRateBasedRuleResponse = (output: any, context: __SerdeContext): DeleteRateBasedRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_IPSet omitted. -/** - * deserializeAws_json1_1DeleteRegexMatchSetResponse - */ -const de_DeleteRegexMatchSetResponse = (output: any, context: __SerdeContext): DeleteRegexMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_IPSetDescriptor omitted. -/** - * deserializeAws_json1_1DeleteRegexPatternSetResponse - */ -const de_DeleteRegexPatternSetResponse = (output: any, context: __SerdeContext): DeleteRegexPatternSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_IPSetDescriptors omitted. -/** - * deserializeAws_json1_1DeleteRuleGroupResponse - */ -const de_DeleteRuleGroupResponse = (output: any, context: __SerdeContext): DeleteRuleGroupResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_IPSetSummaries omitted. -/** - * deserializeAws_json1_1DeleteRuleResponse - */ -const de_DeleteRuleResponse = (output: any, context: __SerdeContext): DeleteRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_IPSetSummary omitted. -/** - * deserializeAws_json1_1DeleteSizeConstraintSetResponse - */ -const de_DeleteSizeConstraintSetResponse = (output: any, context: __SerdeContext): DeleteSizeConstraintSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_ListActivatedRulesInRuleGroupResponse omitted. -/** - * deserializeAws_json1_1DeleteSqlInjectionMatchSetResponse - */ -const de_DeleteSqlInjectionMatchSetResponse = ( - output: any, - context: __SerdeContext -): DeleteSqlInjectionMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_ListByteMatchSetsResponse omitted. -/** - * deserializeAws_json1_1DeleteWebACLResponse - */ -const de_DeleteWebACLResponse = (output: any, context: __SerdeContext): DeleteWebACLResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_ListGeoMatchSetsResponse omitted. -/** - * deserializeAws_json1_1DeleteXssMatchSetResponse - */ -const de_DeleteXssMatchSetResponse = (output: any, context: __SerdeContext): DeleteXssMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_ListIPSetsResponse omitted. -/** - * deserializeAws_json1_1DisassociateWebACLResponse - */ -const de_DisassociateWebACLResponse = (output: any, context: __SerdeContext): DisassociateWebACLResponse => { - return {} as any; -}; +// de_ListLoggingConfigurationsResponse omitted. -/** - * deserializeAws_json1_1ExcludedRule - */ -const de_ExcludedRule = (output: any, context: __SerdeContext): ExcludedRule => { - return { - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_ListRateBasedRulesResponse omitted. -/** - * deserializeAws_json1_1ExcludedRules - */ -const de_ExcludedRules = (output: any, context: __SerdeContext): ExcludedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExcludedRule(entry, context); - }); - return retVal; -}; +// de_ListRegexMatchSetsResponse omitted. -/** - * deserializeAws_json1_1FieldToMatch - */ -const de_FieldToMatch = (output: any, context: __SerdeContext): FieldToMatch => { - return { - Data: __expectString(output.Data), - Type: __expectString(output.Type), - } as any; -}; +// de_ListRegexPatternSetsResponse omitted. -/** - * deserializeAws_json1_1GeoMatchConstraint - */ -const de_GeoMatchConstraint = (output: any, context: __SerdeContext): GeoMatchConstraint => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_ListResourcesForWebACLResponse omitted. -/** - * deserializeAws_json1_1GeoMatchConstraints - */ -const de_GeoMatchConstraints = (output: any, context: __SerdeContext): GeoMatchConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GeoMatchConstraint(entry, context); - }); - return retVal; -}; +// de_ListRuleGroupsResponse omitted. -/** - * deserializeAws_json1_1GeoMatchSet - */ -const de_GeoMatchSet = (output: any, context: __SerdeContext): GeoMatchSet => { - return { - GeoMatchConstraints: - output.GeoMatchConstraints != null ? de_GeoMatchConstraints(output.GeoMatchConstraints, context) : undefined, - GeoMatchSetId: __expectString(output.GeoMatchSetId), - Name: __expectString(output.Name), - } as any; -}; +// de_ListRulesResponse omitted. -/** - * deserializeAws_json1_1GeoMatchSetSummaries - */ -const de_GeoMatchSetSummaries = (output: any, context: __SerdeContext): GeoMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GeoMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_ListSizeConstraintSetsResponse omitted. -/** - * deserializeAws_json1_1GeoMatchSetSummary - */ -const de_GeoMatchSetSummary = (output: any, context: __SerdeContext): GeoMatchSetSummary => { - return { - GeoMatchSetId: __expectString(output.GeoMatchSetId), - Name: __expectString(output.Name), - } as any; -}; +// de_ListSqlInjectionMatchSetsResponse omitted. -/** - * deserializeAws_json1_1GetByteMatchSetResponse - */ -const de_GetByteMatchSetResponse = (output: any, context: __SerdeContext): GetByteMatchSetResponse => { - return { - ByteMatchSet: output.ByteMatchSet != null ? de_ByteMatchSet(output.ByteMatchSet, context) : undefined, - } as any; -}; +// de_ListSubscribedRuleGroupsResponse omitted. -/** - * deserializeAws_json1_1GetChangeTokenResponse - */ -const de_GetChangeTokenResponse = (output: any, context: __SerdeContext): GetChangeTokenResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1GetChangeTokenStatusResponse - */ -const de_GetChangeTokenStatusResponse = (output: any, context: __SerdeContext): GetChangeTokenStatusResponse => { - return { - ChangeTokenStatus: __expectString(output.ChangeTokenStatus), - } as any; -}; +// de_ListWebACLsResponse omitted. -/** - * deserializeAws_json1_1GetGeoMatchSetResponse - */ -const de_GetGeoMatchSetResponse = (output: any, context: __SerdeContext): GetGeoMatchSetResponse => { - return { - GeoMatchSet: output.GeoMatchSet != null ? de_GeoMatchSet(output.GeoMatchSet, context) : undefined, - } as any; -}; +// de_ListXssMatchSetsResponse omitted. -/** - * deserializeAws_json1_1GetIPSetResponse - */ -const de_GetIPSetResponse = (output: any, context: __SerdeContext): GetIPSetResponse => { - return { - IPSet: output.IPSet != null ? de_IPSet(output.IPSet, context) : undefined, - } as any; -}; +// de_LogDestinationConfigs omitted. -/** - * deserializeAws_json1_1GetLoggingConfigurationResponse - */ -const de_GetLoggingConfigurationResponse = (output: any, context: __SerdeContext): GetLoggingConfigurationResponse => { - return { - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; +// de_LoggingConfiguration omitted. -/** - * deserializeAws_json1_1GetPermissionPolicyResponse - */ -const de_GetPermissionPolicyResponse = (output: any, context: __SerdeContext): GetPermissionPolicyResponse => { - return { - Policy: __expectString(output.Policy), - } as any; -}; +// de_LoggingConfigurations omitted. -/** - * deserializeAws_json1_1GetRateBasedRuleManagedKeysResponse - */ -const de_GetRateBasedRuleManagedKeysResponse = ( - output: any, - context: __SerdeContext -): GetRateBasedRuleManagedKeysResponse => { - return { - ManagedKeys: output.ManagedKeys != null ? de_ManagedKeys(output.ManagedKeys, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_ManagedKeys omitted. -/** - * deserializeAws_json1_1GetRateBasedRuleResponse - */ -const de_GetRateBasedRuleResponse = (output: any, context: __SerdeContext): GetRateBasedRuleResponse => { - return { - Rule: output.Rule != null ? de_RateBasedRule(output.Rule, context) : undefined, - } as any; -}; +// de_Predicate omitted. -/** - * deserializeAws_json1_1GetRegexMatchSetResponse - */ -const de_GetRegexMatchSetResponse = (output: any, context: __SerdeContext): GetRegexMatchSetResponse => { - return { - RegexMatchSet: output.RegexMatchSet != null ? de_RegexMatchSet(output.RegexMatchSet, context) : undefined, - } as any; -}; +// de_Predicates omitted. -/** - * deserializeAws_json1_1GetRegexPatternSetResponse - */ -const de_GetRegexPatternSetResponse = (output: any, context: __SerdeContext): GetRegexPatternSetResponse => { - return { - RegexPatternSet: output.RegexPatternSet != null ? de_RegexPatternSet(output.RegexPatternSet, context) : undefined, - } as any; -}; +// de_PutLoggingConfigurationResponse omitted. -/** - * deserializeAws_json1_1GetRuleGroupResponse - */ -const de_GetRuleGroupResponse = (output: any, context: __SerdeContext): GetRuleGroupResponse => { - return { - RuleGroup: output.RuleGroup != null ? de_RuleGroup(output.RuleGroup, context) : undefined, - } as any; -}; +// de_PutPermissionPolicyResponse omitted. -/** - * deserializeAws_json1_1GetRuleResponse - */ -const de_GetRuleResponse = (output: any, context: __SerdeContext): GetRuleResponse => { - return { - Rule: output.Rule != null ? de_Rule(output.Rule, context) : undefined, - } as any; -}; +// de_RateBasedRule omitted. -/** - * deserializeAws_json1_1GetSampledRequestsResponse - */ -const de_GetSampledRequestsResponse = (output: any, context: __SerdeContext): GetSampledRequestsResponse => { - return { - PopulationSize: __expectLong(output.PopulationSize), - SampledRequests: - output.SampledRequests != null ? de_SampledHTTPRequests(output.SampledRequests, context) : undefined, - TimeWindow: output.TimeWindow != null ? de_TimeWindow(output.TimeWindow, context) : undefined, - } as any; -}; +// de_RedactedFields omitted. -/** - * deserializeAws_json1_1GetSizeConstraintSetResponse - */ -const de_GetSizeConstraintSetResponse = (output: any, context: __SerdeContext): GetSizeConstraintSetResponse => { - return { - SizeConstraintSet: - output.SizeConstraintSet != null ? de_SizeConstraintSet(output.SizeConstraintSet, context) : undefined, - } as any; -}; +// de_RegexMatchSet omitted. -/** - * deserializeAws_json1_1GetSqlInjectionMatchSetResponse - */ -const de_GetSqlInjectionMatchSetResponse = (output: any, context: __SerdeContext): GetSqlInjectionMatchSetResponse => { - return { - SqlInjectionMatchSet: - output.SqlInjectionMatchSet != null ? de_SqlInjectionMatchSet(output.SqlInjectionMatchSet, context) : undefined, - } as any; -}; +// de_RegexMatchSetSummaries omitted. -/** - * deserializeAws_json1_1GetWebACLForResourceResponse - */ -const de_GetWebACLForResourceResponse = (output: any, context: __SerdeContext): GetWebACLForResourceResponse => { - return { - WebACLSummary: output.WebACLSummary != null ? de_WebACLSummary(output.WebACLSummary, context) : undefined, - } as any; -}; +// de_RegexMatchSetSummary omitted. -/** - * deserializeAws_json1_1GetWebACLResponse - */ -const de_GetWebACLResponse = (output: any, context: __SerdeContext): GetWebACLResponse => { - return { - WebACL: output.WebACL != null ? de_WebACL(output.WebACL, context) : undefined, - } as any; -}; +// de_RegexMatchTuple omitted. -/** - * deserializeAws_json1_1GetXssMatchSetResponse - */ -const de_GetXssMatchSetResponse = (output: any, context: __SerdeContext): GetXssMatchSetResponse => { - return { - XssMatchSet: output.XssMatchSet != null ? de_XssMatchSet(output.XssMatchSet, context) : undefined, - } as any; -}; +// de_RegexMatchTuples omitted. -/** - * deserializeAws_json1_1HTTPHeader - */ -const de_HTTPHeader = (output: any, context: __SerdeContext): HTTPHeader => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; +// de_RegexPatternSet omitted. -/** - * deserializeAws_json1_1HTTPHeaders - */ -const de_HTTPHeaders = (output: any, context: __SerdeContext): HTTPHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HTTPHeader(entry, context); - }); - return retVal; -}; +// de_RegexPatternSetSummaries omitted. -/** - * deserializeAws_json1_1HTTPRequest - */ -const de_HTTPRequest = (output: any, context: __SerdeContext): HTTPRequest => { - return { - ClientIP: __expectString(output.ClientIP), - Country: __expectString(output.Country), - HTTPVersion: __expectString(output.HTTPVersion), - Headers: output.Headers != null ? de_HTTPHeaders(output.Headers, context) : undefined, - Method: __expectString(output.Method), - URI: __expectString(output.URI), - } as any; -}; +// de_RegexPatternSetSummary omitted. -/** - * deserializeAws_json1_1IPSet - */ -const de_IPSet = (output: any, context: __SerdeContext): IPSet => { - return { - IPSetDescriptors: - output.IPSetDescriptors != null ? de_IPSetDescriptors(output.IPSetDescriptors, context) : undefined, - IPSetId: __expectString(output.IPSetId), - Name: __expectString(output.Name), - } as any; -}; +// de_RegexPatternStrings omitted. -/** - * deserializeAws_json1_1IPSetDescriptor - */ -const de_IPSetDescriptor = (output: any, context: __SerdeContext): IPSetDescriptor => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_ResourceArns omitted. -/** - * deserializeAws_json1_1IPSetDescriptors - */ -const de_IPSetDescriptors = (output: any, context: __SerdeContext): IPSetDescriptor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IPSetDescriptor(entry, context); - }); - return retVal; -}; +// de_Rule omitted. -/** - * deserializeAws_json1_1IPSetSummaries - */ -const de_IPSetSummaries = (output: any, context: __SerdeContext): IPSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IPSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IPSetSummary - */ -const de_IPSetSummary = (output: any, context: __SerdeContext): IPSetSummary => { - return { - IPSetId: __expectString(output.IPSetId), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ListActivatedRulesInRuleGroupResponse - */ -const de_ListActivatedRulesInRuleGroupResponse = ( - output: any, - context: __SerdeContext -): ListActivatedRulesInRuleGroupResponse => { - return { - ActivatedRules: output.ActivatedRules != null ? de_ActivatedRules(output.ActivatedRules, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListByteMatchSetsResponse - */ -const de_ListByteMatchSetsResponse = (output: any, context: __SerdeContext): ListByteMatchSetsResponse => { - return { - ByteMatchSets: output.ByteMatchSets != null ? de_ByteMatchSetSummaries(output.ByteMatchSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListGeoMatchSetsResponse - */ -const de_ListGeoMatchSetsResponse = (output: any, context: __SerdeContext): ListGeoMatchSetsResponse => { - return { - GeoMatchSets: output.GeoMatchSets != null ? de_GeoMatchSetSummaries(output.GeoMatchSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListIPSetsResponse - */ -const de_ListIPSetsResponse = (output: any, context: __SerdeContext): ListIPSetsResponse => { - return { - IPSets: output.IPSets != null ? de_IPSetSummaries(output.IPSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListLoggingConfigurationsResponse - */ -const de_ListLoggingConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListLoggingConfigurationsResponse => { - return { - LoggingConfigurations: - output.LoggingConfigurations != null - ? de_LoggingConfigurations(output.LoggingConfigurations, context) - : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListRateBasedRulesResponse - */ -const de_ListRateBasedRulesResponse = (output: any, context: __SerdeContext): ListRateBasedRulesResponse => { - return { - NextMarker: __expectString(output.NextMarker), - Rules: output.Rules != null ? de_RuleSummaries(output.Rules, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRegexMatchSetsResponse - */ -const de_ListRegexMatchSetsResponse = (output: any, context: __SerdeContext): ListRegexMatchSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RegexMatchSets: - output.RegexMatchSets != null ? de_RegexMatchSetSummaries(output.RegexMatchSets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRegexPatternSetsResponse - */ -const de_ListRegexPatternSetsResponse = (output: any, context: __SerdeContext): ListRegexPatternSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RegexPatternSets: - output.RegexPatternSets != null ? de_RegexPatternSetSummaries(output.RegexPatternSets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListResourcesForWebACLResponse - */ -const de_ListResourcesForWebACLResponse = (output: any, context: __SerdeContext): ListResourcesForWebACLResponse => { - return { - ResourceArns: output.ResourceArns != null ? de_ResourceArns(output.ResourceArns, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRuleGroupsResponse - */ -const de_ListRuleGroupsResponse = (output: any, context: __SerdeContext): ListRuleGroupsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RuleGroups: output.RuleGroups != null ? de_RuleGroupSummaries(output.RuleGroups, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListRulesResponse - */ -const de_ListRulesResponse = (output: any, context: __SerdeContext): ListRulesResponse => { - return { - NextMarker: __expectString(output.NextMarker), - Rules: output.Rules != null ? de_RuleSummaries(output.Rules, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListSizeConstraintSetsResponse - */ -const de_ListSizeConstraintSetsResponse = (output: any, context: __SerdeContext): ListSizeConstraintSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - SizeConstraintSets: - output.SizeConstraintSets != null ? de_SizeConstraintSetSummaries(output.SizeConstraintSets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListSqlInjectionMatchSetsResponse - */ -const de_ListSqlInjectionMatchSetsResponse = ( - output: any, - context: __SerdeContext -): ListSqlInjectionMatchSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - SqlInjectionMatchSets: - output.SqlInjectionMatchSets != null - ? de_SqlInjectionMatchSetSummaries(output.SqlInjectionMatchSets, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListSubscribedRuleGroupsResponse - */ -const de_ListSubscribedRuleGroupsResponse = ( - output: any, - context: __SerdeContext -): ListSubscribedRuleGroupsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RuleGroups: output.RuleGroups != null ? de_SubscribedRuleGroupSummaries(output.RuleGroups, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextMarker: __expectString(output.NextMarker), - TagInfoForResource: - output.TagInfoForResource != null ? de_TagInfoForResource(output.TagInfoForResource, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListWebACLsResponse - */ -const de_ListWebACLsResponse = (output: any, context: __SerdeContext): ListWebACLsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - WebACLs: output.WebACLs != null ? de_WebACLSummaries(output.WebACLs, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ListXssMatchSetsResponse - */ -const de_ListXssMatchSetsResponse = (output: any, context: __SerdeContext): ListXssMatchSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - XssMatchSets: output.XssMatchSets != null ? de_XssMatchSetSummaries(output.XssMatchSets, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1LogDestinationConfigs - */ -const de_LogDestinationConfigs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - LogDestinationConfigs: - output.LogDestinationConfigs != null - ? de_LogDestinationConfigs(output.LogDestinationConfigs, context) - : undefined, - RedactedFields: output.RedactedFields != null ? de_RedactedFields(output.RedactedFields, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; - -/** - * deserializeAws_json1_1LoggingConfigurations - */ -const de_LoggingConfigurations = (output: any, context: __SerdeContext): LoggingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoggingConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ManagedKeys - */ -const de_ManagedKeys = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Predicate - */ -const de_Predicate = (output: any, context: __SerdeContext): Predicate => { - return { - DataId: __expectString(output.DataId), - Negated: __expectBoolean(output.Negated), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1Predicates - */ -const de_Predicates = (output: any, context: __SerdeContext): Predicate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Predicate(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1PutLoggingConfigurationResponse - */ -const de_PutLoggingConfigurationResponse = (output: any, context: __SerdeContext): PutLoggingConfigurationResponse => { - return { - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1PutPermissionPolicyResponse - */ -const de_PutPermissionPolicyResponse = (output: any, context: __SerdeContext): PutPermissionPolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1RateBasedRule - */ -const de_RateBasedRule = (output: any, context: __SerdeContext): RateBasedRule => { - return { - MatchPredicates: output.MatchPredicates != null ? de_Predicates(output.MatchPredicates, context) : undefined, - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RateKey: __expectString(output.RateKey), - RateLimit: __expectLong(output.RateLimit), - RuleId: __expectString(output.RuleId), - } as any; -}; - -/** - * deserializeAws_json1_1RedactedFields - */ -const de_RedactedFields = (output: any, context: __SerdeContext): FieldToMatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldToMatch(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RegexMatchSet - */ -const de_RegexMatchSet = (output: any, context: __SerdeContext): RegexMatchSet => { - return { - Name: __expectString(output.Name), - RegexMatchSetId: __expectString(output.RegexMatchSetId), - RegexMatchTuples: - output.RegexMatchTuples != null ? de_RegexMatchTuples(output.RegexMatchTuples, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RegexMatchSetSummaries - */ -const de_RegexMatchSetSummaries = (output: any, context: __SerdeContext): RegexMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexMatchSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RegexMatchSetSummary - */ -const de_RegexMatchSetSummary = (output: any, context: __SerdeContext): RegexMatchSetSummary => { - return { - Name: __expectString(output.Name), - RegexMatchSetId: __expectString(output.RegexMatchSetId), - } as any; -}; - -/** - * deserializeAws_json1_1RegexMatchTuple - */ -const de_RegexMatchTuple = (output: any, context: __SerdeContext): RegexMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - RegexPatternSetId: __expectString(output.RegexPatternSetId), - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; - -/** - * deserializeAws_json1_1RegexMatchTuples - */ -const de_RegexMatchTuples = (output: any, context: __SerdeContext): RegexMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexMatchTuple(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RegexPatternSet - */ -const de_RegexPatternSet = (output: any, context: __SerdeContext): RegexPatternSet => { - return { - Name: __expectString(output.Name), - RegexPatternSetId: __expectString(output.RegexPatternSetId), - RegexPatternStrings: - output.RegexPatternStrings != null ? de_RegexPatternStrings(output.RegexPatternStrings, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RegexPatternSetSummaries - */ -const de_RegexPatternSetSummaries = (output: any, context: __SerdeContext): RegexPatternSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexPatternSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RegexPatternSetSummary - */ -const de_RegexPatternSetSummary = (output: any, context: __SerdeContext): RegexPatternSetSummary => { - return { - Name: __expectString(output.Name), - RegexPatternSetId: __expectString(output.RegexPatternSetId), - } as any; -}; - -/** - * deserializeAws_json1_1RegexPatternStrings - */ -const de_RegexPatternStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ResourceArns - */ -const de_ResourceArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - Predicates: output.Predicates != null ? de_Predicates(output.Predicates, context) : undefined, - RuleId: __expectString(output.RuleId), - } as any; -}; - -/** - * deserializeAws_json1_1RuleGroup - */ -const de_RuleGroup = (output: any, context: __SerdeContext): RuleGroup => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - } as any; -}; - -/** - * deserializeAws_json1_1RuleGroupSummaries - */ -const de_RuleGroupSummaries = (output: any, context: __SerdeContext): RuleGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RuleGroupSummary - */ -const de_RuleGroupSummary = (output: any, context: __SerdeContext): RuleGroupSummary => { - return { - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - } as any; -}; - -/** - * deserializeAws_json1_1RuleSummaries - */ -const de_RuleSummaries = (output: any, context: __SerdeContext): RuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1RuleSummary - */ -const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { - return { - Name: __expectString(output.Name), - RuleId: __expectString(output.RuleId), - } as any; -}; - -/** - * deserializeAws_json1_1SampledHTTPRequest - */ -const de_SampledHTTPRequest = (output: any, context: __SerdeContext): SampledHTTPRequest => { - return { - Action: __expectString(output.Action), - Request: output.Request != null ? de_HTTPRequest(output.Request, context) : undefined, - RuleWithinRuleGroup: __expectString(output.RuleWithinRuleGroup), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Weight: __expectLong(output.Weight), - } as any; -}; - -/** - * deserializeAws_json1_1SampledHTTPRequests - */ -const de_SampledHTTPRequests = (output: any, context: __SerdeContext): SampledHTTPRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SampledHTTPRequest(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1SizeConstraint - */ -const de_SizeConstraint = (output: any, context: __SerdeContext): SizeConstraint => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - Size: __expectLong(output.Size), - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; - -/** - * deserializeAws_json1_1SizeConstraints - */ -const de_SizeConstraints = (output: any, context: __SerdeContext): SizeConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SizeConstraint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1SizeConstraintSet - */ -const de_SizeConstraintSet = (output: any, context: __SerdeContext): SizeConstraintSet => { - return { - Name: __expectString(output.Name), - SizeConstraintSetId: __expectString(output.SizeConstraintSetId), - SizeConstraints: output.SizeConstraints != null ? de_SizeConstraints(output.SizeConstraints, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1SizeConstraintSetSummaries - */ -const de_SizeConstraintSetSummaries = (output: any, context: __SerdeContext): SizeConstraintSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SizeConstraintSetSummary(entry, context); - }); - return retVal; -}; +// de_RuleGroup omitted. -/** - * deserializeAws_json1_1SizeConstraintSetSummary - */ -const de_SizeConstraintSetSummary = (output: any, context: __SerdeContext): SizeConstraintSetSummary => { - return { - Name: __expectString(output.Name), - SizeConstraintSetId: __expectString(output.SizeConstraintSetId), - } as any; -}; +// de_RuleGroupSummaries omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchSet - */ -const de_SqlInjectionMatchSet = (output: any, context: __SerdeContext): SqlInjectionMatchSet => { - return { - Name: __expectString(output.Name), - SqlInjectionMatchSetId: __expectString(output.SqlInjectionMatchSetId), - SqlInjectionMatchTuples: - output.SqlInjectionMatchTuples != null - ? de_SqlInjectionMatchTuples(output.SqlInjectionMatchTuples, context) - : undefined, - } as any; -}; +// de_RuleGroupSummary omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchSetSummaries - */ -const de_SqlInjectionMatchSetSummaries = (output: any, context: __SerdeContext): SqlInjectionMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SqlInjectionMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_RuleSummaries omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchSetSummary - */ -const de_SqlInjectionMatchSetSummary = (output: any, context: __SerdeContext): SqlInjectionMatchSetSummary => { - return { - Name: __expectString(output.Name), - SqlInjectionMatchSetId: __expectString(output.SqlInjectionMatchSetId), - } as any; -}; +// de_RuleSummary omitted. /** - * deserializeAws_json1_1SqlInjectionMatchTuple + * deserializeAws_json1_1SampledHTTPRequest */ -const de_SqlInjectionMatchTuple = (output: any, context: __SerdeContext): SqlInjectionMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - TextTransformation: __expectString(output.TextTransformation), - } as any; +const de_SampledHTTPRequest = (output: any, context: __SerdeContext): SampledHTTPRequest => { + return take(output, { + Action: __expectString, + Request: _json, + RuleWithinRuleGroup: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Weight: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1SqlInjectionMatchTuples + * deserializeAws_json1_1SampledHTTPRequests */ -const de_SqlInjectionMatchTuples = (output: any, context: __SerdeContext): SqlInjectionMatchTuple[] => { +const de_SampledHTTPRequests = (output: any, context: __SerdeContext): SampledHTTPRequest[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SqlInjectionMatchTuple(entry, context); + return de_SampledHTTPRequest(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SubscribedRuleGroupSummaries - */ -const de_SubscribedRuleGroupSummaries = (output: any, context: __SerdeContext): SubscribedRuleGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubscribedRuleGroupSummary(entry, context); - }); - return retVal; -}; +// de_SizeConstraint omitted. -/** - * deserializeAws_json1_1SubscribedRuleGroupSummary - */ -const de_SubscribedRuleGroupSummary = (output: any, context: __SerdeContext): SubscribedRuleGroupSummary => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - } as any; -}; +// de_SizeConstraints omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SizeConstraintSet omitted. -/** - * deserializeAws_json1_1TagInfoForResource - */ -const de_TagInfoForResource = (output: any, context: __SerdeContext): TagInfoForResource => { - return { - ResourceARN: __expectString(output.ResourceARN), - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_SizeConstraintSetSummaries omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_SizeConstraintSetSummary omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_SqlInjectionMatchSet omitted. + +// de_SqlInjectionMatchSetSummaries omitted. + +// de_SqlInjectionMatchSetSummary omitted. + +// de_SqlInjectionMatchTuple omitted. + +// de_SqlInjectionMatchTuples omitted. + +// de_SubscribedRuleGroupSummaries omitted. + +// de_SubscribedRuleGroupSummary omitted. + +// de_Tag omitted. + +// de_TagInfoForResource omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1TimeWindow */ const de_TimeWindow = (output: any, context: __SerdeContext): TimeWindow => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateByteMatchSetResponse - */ -const de_UpdateByteMatchSetResponse = (output: any, context: __SerdeContext): UpdateByteMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateByteMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateGeoMatchSetResponse - */ -const de_UpdateGeoMatchSetResponse = (output: any, context: __SerdeContext): UpdateGeoMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateGeoMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateIPSetResponse - */ -const de_UpdateIPSetResponse = (output: any, context: __SerdeContext): UpdateIPSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateIPSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRateBasedRuleResponse - */ -const de_UpdateRateBasedRuleResponse = (output: any, context: __SerdeContext): UpdateRateBasedRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRateBasedRuleResponse omitted. -/** - * deserializeAws_json1_1UpdateRegexMatchSetResponse - */ -const de_UpdateRegexMatchSetResponse = (output: any, context: __SerdeContext): UpdateRegexMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRegexMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRegexPatternSetResponse - */ -const de_UpdateRegexPatternSetResponse = (output: any, context: __SerdeContext): UpdateRegexPatternSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRegexPatternSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRuleGroupResponse - */ -const de_UpdateRuleGroupResponse = (output: any, context: __SerdeContext): UpdateRuleGroupResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRuleGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateRuleResponse - */ -const de_UpdateRuleResponse = (output: any, context: __SerdeContext): UpdateRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRuleResponse omitted. -/** - * deserializeAws_json1_1UpdateSizeConstraintSetResponse - */ -const de_UpdateSizeConstraintSetResponse = (output: any, context: __SerdeContext): UpdateSizeConstraintSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateSizeConstraintSetResponse omitted. -/** - * deserializeAws_json1_1UpdateSqlInjectionMatchSetResponse - */ -const de_UpdateSqlInjectionMatchSetResponse = ( - output: any, - context: __SerdeContext -): UpdateSqlInjectionMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateSqlInjectionMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateWebACLResponse - */ -const de_UpdateWebACLResponse = (output: any, context: __SerdeContext): UpdateWebACLResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateWebACLResponse omitted. -/** - * deserializeAws_json1_1UpdateXssMatchSetResponse - */ -const de_UpdateXssMatchSetResponse = (output: any, context: __SerdeContext): UpdateXssMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateXssMatchSetResponse omitted. -/** - * deserializeAws_json1_1WafAction - */ -const de_WafAction = (output: any, context: __SerdeContext): WafAction => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_WafAction omitted. -/** - * deserializeAws_json1_1WAFBadRequestException - */ -const de_WAFBadRequestException = (output: any, context: __SerdeContext): WAFBadRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFBadRequestException omitted. -/** - * deserializeAws_json1_1WAFDisallowedNameException - */ -const de_WAFDisallowedNameException = (output: any, context: __SerdeContext): WAFDisallowedNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFDisallowedNameException omitted. -/** - * deserializeAws_json1_1WAFEntityMigrationException - */ -const de_WAFEntityMigrationException = (output: any, context: __SerdeContext): WAFEntityMigrationException => { - return { - MigrationErrorReason: __expectString(output.MigrationErrorReason), - MigrationErrorType: __expectString(output.MigrationErrorType), - message: __expectString(output.message), - } as any; -}; +// de_WAFEntityMigrationException omitted. -/** - * deserializeAws_json1_1WAFInternalErrorException - */ -const de_WAFInternalErrorException = (output: any, context: __SerdeContext): WAFInternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInternalErrorException omitted. -/** - * deserializeAws_json1_1WAFInvalidAccountException - */ -const de_WAFInvalidAccountException = (output: any, context: __SerdeContext): WAFInvalidAccountException => { - return {} as any; -}; +// de_WAFInvalidAccountException omitted. -/** - * deserializeAws_json1_1WAFInvalidOperationException - */ -const de_WAFInvalidOperationException = (output: any, context: __SerdeContext): WAFInvalidOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidOperationException omitted. -/** - * deserializeAws_json1_1WAFInvalidParameterException - */ -const de_WAFInvalidParameterException = (output: any, context: __SerdeContext): WAFInvalidParameterException => { - return { - field: __expectString(output.field), - parameter: __expectString(output.parameter), - reason: __expectString(output.reason), - } as any; -}; +// de_WAFInvalidParameterException omitted. -/** - * deserializeAws_json1_1WAFInvalidPermissionPolicyException - */ -const de_WAFInvalidPermissionPolicyException = ( - output: any, - context: __SerdeContext -): WAFInvalidPermissionPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidPermissionPolicyException omitted. -/** - * deserializeAws_json1_1WAFInvalidRegexPatternException - */ -const de_WAFInvalidRegexPatternException = (output: any, context: __SerdeContext): WAFInvalidRegexPatternException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidRegexPatternException omitted. -/** - * deserializeAws_json1_1WAFLimitsExceededException - */ -const de_WAFLimitsExceededException = (output: any, context: __SerdeContext): WAFLimitsExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFLimitsExceededException omitted. -/** - * deserializeAws_json1_1WAFNonEmptyEntityException - */ -const de_WAFNonEmptyEntityException = (output: any, context: __SerdeContext): WAFNonEmptyEntityException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFNonEmptyEntityException omitted. -/** - * deserializeAws_json1_1WAFNonexistentContainerException - */ -const de_WAFNonexistentContainerException = ( - output: any, - context: __SerdeContext -): WAFNonexistentContainerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFNonexistentContainerException omitted. -/** - * deserializeAws_json1_1WAFNonexistentItemException - */ -const de_WAFNonexistentItemException = (output: any, context: __SerdeContext): WAFNonexistentItemException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFNonexistentItemException omitted. -/** - * deserializeAws_json1_1WafOverrideAction - */ -const de_WafOverrideAction = (output: any, context: __SerdeContext): WafOverrideAction => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_WafOverrideAction omitted. -/** - * deserializeAws_json1_1WAFReferencedItemException - */ -const de_WAFReferencedItemException = (output: any, context: __SerdeContext): WAFReferencedItemException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFReferencedItemException omitted. -/** - * deserializeAws_json1_1WAFServiceLinkedRoleErrorException - */ -const de_WAFServiceLinkedRoleErrorException = ( - output: any, - context: __SerdeContext -): WAFServiceLinkedRoleErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFServiceLinkedRoleErrorException omitted. -/** - * deserializeAws_json1_1WAFStaleDataException - */ -const de_WAFStaleDataException = (output: any, context: __SerdeContext): WAFStaleDataException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFStaleDataException omitted. -/** - * deserializeAws_json1_1WAFSubscriptionNotFoundException - */ -const de_WAFSubscriptionNotFoundException = ( - output: any, - context: __SerdeContext -): WAFSubscriptionNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFSubscriptionNotFoundException omitted. -/** - * deserializeAws_json1_1WAFTagOperationException - */ -const de_WAFTagOperationException = (output: any, context: __SerdeContext): WAFTagOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFTagOperationException omitted. -/** - * deserializeAws_json1_1WAFTagOperationInternalErrorException - */ -const de_WAFTagOperationInternalErrorException = ( - output: any, - context: __SerdeContext -): WAFTagOperationInternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFTagOperationInternalErrorException omitted. -/** - * deserializeAws_json1_1WAFUnavailableEntityException - */ -const de_WAFUnavailableEntityException = (output: any, context: __SerdeContext): WAFUnavailableEntityException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFUnavailableEntityException omitted. -/** - * deserializeAws_json1_1WebACL - */ -const de_WebACL = (output: any, context: __SerdeContext): WebACL => { - return { - DefaultAction: output.DefaultAction != null ? de_WafAction(output.DefaultAction, context) : undefined, - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_ActivatedRules(output.Rules, context) : undefined, - WebACLArn: __expectString(output.WebACLArn), - WebACLId: __expectString(output.WebACLId), - } as any; -}; +// de_WebACL omitted. -/** - * deserializeAws_json1_1WebACLSummaries - */ -const de_WebACLSummaries = (output: any, context: __SerdeContext): WebACLSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WebACLSummary(entry, context); - }); - return retVal; -}; +// de_WebACLSummaries omitted. -/** - * deserializeAws_json1_1WebACLSummary - */ -const de_WebACLSummary = (output: any, context: __SerdeContext): WebACLSummary => { - return { - Name: __expectString(output.Name), - WebACLId: __expectString(output.WebACLId), - } as any; -}; +// de_WebACLSummary omitted. -/** - * deserializeAws_json1_1XssMatchSet - */ -const de_XssMatchSet = (output: any, context: __SerdeContext): XssMatchSet => { - return { - Name: __expectString(output.Name), - XssMatchSetId: __expectString(output.XssMatchSetId), - XssMatchTuples: output.XssMatchTuples != null ? de_XssMatchTuples(output.XssMatchTuples, context) : undefined, - } as any; -}; +// de_XssMatchSet omitted. -/** - * deserializeAws_json1_1XssMatchSetSummaries - */ -const de_XssMatchSetSummaries = (output: any, context: __SerdeContext): XssMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_XssMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_XssMatchSetSummaries omitted. -/** - * deserializeAws_json1_1XssMatchSetSummary - */ -const de_XssMatchSetSummary = (output: any, context: __SerdeContext): XssMatchSetSummary => { - return { - Name: __expectString(output.Name), - XssMatchSetId: __expectString(output.XssMatchSetId), - } as any; -}; +// de_XssMatchSetSummary omitted. -/** - * deserializeAws_json1_1XssMatchTuple - */ -const de_XssMatchTuple = (output: any, context: __SerdeContext): XssMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_XssMatchTuple omitted. -/** - * deserializeAws_json1_1XssMatchTuples - */ -const de_XssMatchTuples = (output: any, context: __SerdeContext): XssMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_XssMatchTuple(entry, context); - }); - return retVal; -}; +// de_XssMatchTuples omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9824,6 +7132,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-waf/src/protocols/Aws_json1_1.ts b/clients/client-waf/src/protocols/Aws_json1_1.ts index 7172c82c3f12..1d5ead5273d3 100644 --- a/clients/client-waf/src/protocols/Aws_json1_1.ts +++ b/clients/client-waf/src/protocols/Aws_json1_1.ts @@ -1,15 +1,15 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -197,204 +197,108 @@ import { UpdateXssMatchSetCommandInput, UpdateXssMatchSetCommandOutput } from ". import { ActivatedRule, ByteMatchSet, - ByteMatchSetSummary, ByteMatchSetUpdate, ByteMatchTuple, CreateByteMatchSetRequest, CreateByteMatchSetResponse, CreateGeoMatchSetRequest, - CreateGeoMatchSetResponse, CreateIPSetRequest, - CreateIPSetResponse, CreateRateBasedRuleRequest, - CreateRateBasedRuleResponse, CreateRegexMatchSetRequest, - CreateRegexMatchSetResponse, CreateRegexPatternSetRequest, - CreateRegexPatternSetResponse, CreateRuleGroupRequest, - CreateRuleGroupResponse, CreateRuleRequest, - CreateRuleResponse, CreateSizeConstraintSetRequest, - CreateSizeConstraintSetResponse, CreateSqlInjectionMatchSetRequest, - CreateSqlInjectionMatchSetResponse, CreateWebACLMigrationStackRequest, - CreateWebACLMigrationStackResponse, CreateWebACLRequest, - CreateWebACLResponse, CreateXssMatchSetRequest, - CreateXssMatchSetResponse, DeleteByteMatchSetRequest, - DeleteByteMatchSetResponse, DeleteGeoMatchSetRequest, - DeleteGeoMatchSetResponse, DeleteIPSetRequest, - DeleteIPSetResponse, DeleteLoggingConfigurationRequest, - DeleteLoggingConfigurationResponse, DeletePermissionPolicyRequest, - DeletePermissionPolicyResponse, DeleteRateBasedRuleRequest, - DeleteRateBasedRuleResponse, DeleteRegexMatchSetRequest, - DeleteRegexMatchSetResponse, DeleteRegexPatternSetRequest, - DeleteRegexPatternSetResponse, DeleteRuleGroupRequest, - DeleteRuleGroupResponse, DeleteRuleRequest, - DeleteRuleResponse, DeleteSizeConstraintSetRequest, - DeleteSizeConstraintSetResponse, DeleteSqlInjectionMatchSetRequest, - DeleteSqlInjectionMatchSetResponse, DeleteWebACLRequest, - DeleteWebACLResponse, DeleteXssMatchSetRequest, - DeleteXssMatchSetResponse, ExcludedRule, FieldToMatch, GeoMatchConstraint, - GeoMatchSet, - GeoMatchSetSummary, GeoMatchSetUpdate, GetByteMatchSetRequest, GetByteMatchSetResponse, GetChangeTokenRequest, - GetChangeTokenResponse, GetChangeTokenStatusRequest, - GetChangeTokenStatusResponse, GetGeoMatchSetRequest, - GetGeoMatchSetResponse, GetIPSetRequest, - GetIPSetResponse, GetLoggingConfigurationRequest, - GetLoggingConfigurationResponse, GetPermissionPolicyRequest, - GetPermissionPolicyResponse, GetRateBasedRuleManagedKeysRequest, - GetRateBasedRuleManagedKeysResponse, GetRateBasedRuleRequest, - GetRateBasedRuleResponse, GetRegexMatchSetRequest, - GetRegexMatchSetResponse, GetRegexPatternSetRequest, - GetRegexPatternSetResponse, GetRuleGroupRequest, - GetRuleGroupResponse, GetRuleRequest, - GetRuleResponse, GetSampledRequestsRequest, GetSampledRequestsResponse, GetSizeConstraintSetRequest, - GetSizeConstraintSetResponse, GetSqlInjectionMatchSetRequest, - GetSqlInjectionMatchSetResponse, GetWebACLRequest, - GetWebACLResponse, GetXssMatchSetRequest, - GetXssMatchSetResponse, - HTTPHeader, - HTTPRequest, - IPSet, IPSetDescriptor, - IPSetSummary, IPSetUpdate, ListActivatedRulesInRuleGroupRequest, - ListActivatedRulesInRuleGroupResponse, ListByteMatchSetsRequest, - ListByteMatchSetsResponse, ListGeoMatchSetsRequest, - ListGeoMatchSetsResponse, ListIPSetsRequest, - ListIPSetsResponse, ListLoggingConfigurationsRequest, - ListLoggingConfigurationsResponse, ListRateBasedRulesRequest, - ListRateBasedRulesResponse, ListRegexMatchSetsRequest, - ListRegexMatchSetsResponse, ListRegexPatternSetsRequest, - ListRegexPatternSetsResponse, ListRuleGroupsRequest, - ListRuleGroupsResponse, ListRulesRequest, - ListRulesResponse, ListSizeConstraintSetsRequest, - ListSizeConstraintSetsResponse, ListSqlInjectionMatchSetsRequest, - ListSqlInjectionMatchSetsResponse, ListSubscribedRuleGroupsRequest, - ListSubscribedRuleGroupsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListWebACLsRequest, - ListWebACLsResponse, ListXssMatchSetsRequest, - ListXssMatchSetsResponse, LoggingConfiguration, Predicate, PutLoggingConfigurationRequest, - PutLoggingConfigurationResponse, PutPermissionPolicyRequest, - PutPermissionPolicyResponse, - RateBasedRule, - RegexMatchSet, - RegexMatchSetSummary, RegexMatchSetUpdate, RegexMatchTuple, - RegexPatternSet, - RegexPatternSetSummary, RegexPatternSetUpdate, - Rule, - RuleGroup, - RuleGroupSummary, RuleGroupUpdate, - RuleSummary, RuleUpdate, SampledHTTPRequest, SizeConstraint, - SizeConstraintSet, - SizeConstraintSetSummary, SizeConstraintSetUpdate, - SqlInjectionMatchSet, - SqlInjectionMatchSetSummary, SqlInjectionMatchSetUpdate, SqlInjectionMatchTuple, - SubscribedRuleGroupSummary, Tag, - TagInfoForResource, TagResourceRequest, - TagResourceResponse, TimeWindow, UntagResourceRequest, - UntagResourceResponse, UpdateByteMatchSetRequest, - UpdateByteMatchSetResponse, UpdateGeoMatchSetRequest, - UpdateGeoMatchSetResponse, UpdateIPSetRequest, - UpdateIPSetResponse, UpdateRateBasedRuleRequest, - UpdateRateBasedRuleResponse, UpdateRegexMatchSetRequest, - UpdateRegexMatchSetResponse, UpdateRegexPatternSetRequest, - UpdateRegexPatternSetResponse, UpdateRuleGroupRequest, - UpdateRuleGroupResponse, UpdateRuleRequest, - UpdateRuleResponse, UpdateSizeConstraintSetRequest, - UpdateSizeConstraintSetResponse, UpdateSqlInjectionMatchSetRequest, - UpdateSqlInjectionMatchSetResponse, UpdateWebACLRequest, - UpdateWebACLResponse, UpdateXssMatchSetRequest, - UpdateXssMatchSetResponse, WafAction, WAFBadRequestException, WAFDisallowedNameException, @@ -416,11 +320,7 @@ import { WAFSubscriptionNotFoundException, WAFTagOperationException, WAFTagOperationInternalErrorException, - WebACL, - WebACLSummary, WebACLUpdate, - XssMatchSet, - XssMatchSetSummary, XssMatchSetUpdate, XssMatchTuple, } from "../models/models_0"; @@ -435,7 +335,7 @@ export const se_CreateByteMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateByteMatchSet"); let body: any; - body = JSON.stringify(se_CreateByteMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -448,7 +348,7 @@ export const se_CreateGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGeoMatchSet"); let body: any; - body = JSON.stringify(se_CreateGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -461,7 +361,7 @@ export const se_CreateIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateIPSet"); let body: any; - body = JSON.stringify(se_CreateIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -474,7 +374,7 @@ export const se_CreateRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRateBasedRule"); let body: any; - body = JSON.stringify(se_CreateRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -487,7 +387,7 @@ export const se_CreateRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRegexMatchSet"); let body: any; - body = JSON.stringify(se_CreateRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -500,7 +400,7 @@ export const se_CreateRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRegexPatternSet"); let body: any; - body = JSON.stringify(se_CreateRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -513,7 +413,7 @@ export const se_CreateRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRule"); let body: any; - body = JSON.stringify(se_CreateRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -526,7 +426,7 @@ export const se_CreateRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRuleGroup"); let body: any; - body = JSON.stringify(se_CreateRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -539,7 +439,7 @@ export const se_CreateSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSizeConstraintSet"); let body: any; - body = JSON.stringify(se_CreateSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -552,7 +452,7 @@ export const se_CreateSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_CreateSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -565,7 +465,7 @@ export const se_CreateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWebACL"); let body: any; - body = JSON.stringify(se_CreateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -578,7 +478,7 @@ export const se_CreateWebACLMigrationStackCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWebACLMigrationStack"); let body: any; - body = JSON.stringify(se_CreateWebACLMigrationStackRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -591,7 +491,7 @@ export const se_CreateXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateXssMatchSet"); let body: any; - body = JSON.stringify(se_CreateXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -604,7 +504,7 @@ export const se_DeleteByteMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteByteMatchSet"); let body: any; - body = JSON.stringify(se_DeleteByteMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -617,7 +517,7 @@ export const se_DeleteGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGeoMatchSet"); let body: any; - body = JSON.stringify(se_DeleteGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -630,7 +530,7 @@ export const se_DeleteIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIPSet"); let body: any; - body = JSON.stringify(se_DeleteIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -643,7 +543,7 @@ export const se_DeleteLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLoggingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -656,7 +556,7 @@ export const se_DeletePermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePermissionPolicy"); let body: any; - body = JSON.stringify(se_DeletePermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -669,7 +569,7 @@ export const se_DeleteRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRateBasedRule"); let body: any; - body = JSON.stringify(se_DeleteRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -682,7 +582,7 @@ export const se_DeleteRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegexMatchSet"); let body: any; - body = JSON.stringify(se_DeleteRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -695,7 +595,7 @@ export const se_DeleteRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegexPatternSet"); let body: any; - body = JSON.stringify(se_DeleteRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -708,7 +608,7 @@ export const se_DeleteRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRule"); let body: any; - body = JSON.stringify(se_DeleteRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -721,7 +621,7 @@ export const se_DeleteRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRuleGroup"); let body: any; - body = JSON.stringify(se_DeleteRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -734,7 +634,7 @@ export const se_DeleteSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSizeConstraintSet"); let body: any; - body = JSON.stringify(se_DeleteSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -747,7 +647,7 @@ export const se_DeleteSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_DeleteSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -760,7 +660,7 @@ export const se_DeleteWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWebACL"); let body: any; - body = JSON.stringify(se_DeleteWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -773,7 +673,7 @@ export const se_DeleteXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteXssMatchSet"); let body: any; - body = JSON.stringify(se_DeleteXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -786,7 +686,7 @@ export const se_GetByteMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetByteMatchSet"); let body: any; - body = JSON.stringify(se_GetByteMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -799,7 +699,7 @@ export const se_GetChangeTokenCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetChangeToken"); let body: any; - body = JSON.stringify(se_GetChangeTokenRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -812,7 +712,7 @@ export const se_GetChangeTokenStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetChangeTokenStatus"); let body: any; - body = JSON.stringify(se_GetChangeTokenStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -825,7 +725,7 @@ export const se_GetGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetGeoMatchSet"); let body: any; - body = JSON.stringify(se_GetGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -838,7 +738,7 @@ export const se_GetIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetIPSet"); let body: any; - body = JSON.stringify(se_GetIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -851,7 +751,7 @@ export const se_GetLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoggingConfiguration"); let body: any; - body = JSON.stringify(se_GetLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -864,7 +764,7 @@ export const se_GetPermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPermissionPolicy"); let body: any; - body = JSON.stringify(se_GetPermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -877,7 +777,7 @@ export const se_GetRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRateBasedRule"); let body: any; - body = JSON.stringify(se_GetRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -890,7 +790,7 @@ export const se_GetRateBasedRuleManagedKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRateBasedRuleManagedKeys"); let body: any; - body = JSON.stringify(se_GetRateBasedRuleManagedKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -903,7 +803,7 @@ export const se_GetRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegexMatchSet"); let body: any; - body = JSON.stringify(se_GetRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -916,7 +816,7 @@ export const se_GetRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegexPatternSet"); let body: any; - body = JSON.stringify(se_GetRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -929,7 +829,7 @@ export const se_GetRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRule"); let body: any; - body = JSON.stringify(se_GetRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -942,7 +842,7 @@ export const se_GetRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRuleGroup"); let body: any; - body = JSON.stringify(se_GetRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -968,7 +868,7 @@ export const se_GetSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSizeConstraintSet"); let body: any; - body = JSON.stringify(se_GetSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -981,7 +881,7 @@ export const se_GetSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_GetSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -994,7 +894,7 @@ export const se_GetWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWebACL"); let body: any; - body = JSON.stringify(se_GetWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1007,7 +907,7 @@ export const se_GetXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetXssMatchSet"); let body: any; - body = JSON.stringify(se_GetXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1020,7 +920,7 @@ export const se_ListActivatedRulesInRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListActivatedRulesInRuleGroup"); let body: any; - body = JSON.stringify(se_ListActivatedRulesInRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1033,7 +933,7 @@ export const se_ListByteMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListByteMatchSets"); let body: any; - body = JSON.stringify(se_ListByteMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1046,7 +946,7 @@ export const se_ListGeoMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGeoMatchSets"); let body: any; - body = JSON.stringify(se_ListGeoMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1059,7 +959,7 @@ export const se_ListIPSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIPSets"); let body: any; - body = JSON.stringify(se_ListIPSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1072,7 +972,7 @@ export const se_ListLoggingConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLoggingConfigurations"); let body: any; - body = JSON.stringify(se_ListLoggingConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1085,7 +985,7 @@ export const se_ListRateBasedRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRateBasedRules"); let body: any; - body = JSON.stringify(se_ListRateBasedRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1098,7 +998,7 @@ export const se_ListRegexMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRegexMatchSets"); let body: any; - body = JSON.stringify(se_ListRegexMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1111,7 +1011,7 @@ export const se_ListRegexPatternSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRegexPatternSets"); let body: any; - body = JSON.stringify(se_ListRegexPatternSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1124,7 +1024,7 @@ export const se_ListRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuleGroups"); let body: any; - body = JSON.stringify(se_ListRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1137,7 +1037,7 @@ export const se_ListRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRules"); let body: any; - body = JSON.stringify(se_ListRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1150,7 +1050,7 @@ export const se_ListSizeConstraintSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSizeConstraintSets"); let body: any; - body = JSON.stringify(se_ListSizeConstraintSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1163,7 +1063,7 @@ export const se_ListSqlInjectionMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSqlInjectionMatchSets"); let body: any; - body = JSON.stringify(se_ListSqlInjectionMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1176,7 +1076,7 @@ export const se_ListSubscribedRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListSubscribedRuleGroups"); let body: any; - body = JSON.stringify(se_ListSubscribedRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1189,7 +1089,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1202,7 +1102,7 @@ export const se_ListWebACLsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWebACLs"); let body: any; - body = JSON.stringify(se_ListWebACLsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1215,7 +1115,7 @@ export const se_ListXssMatchSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListXssMatchSets"); let body: any; - body = JSON.stringify(se_ListXssMatchSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1228,7 +1128,7 @@ export const se_PutLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLoggingConfiguration"); let body: any; - body = JSON.stringify(se_PutLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1241,7 +1141,7 @@ export const se_PutPermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPermissionPolicy"); let body: any; - body = JSON.stringify(se_PutPermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1254,7 +1154,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1267,7 +1167,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1293,7 +1193,7 @@ export const se_UpdateGeoMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateGeoMatchSet"); let body: any; - body = JSON.stringify(se_UpdateGeoMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1306,7 +1206,7 @@ export const se_UpdateIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateIPSet"); let body: any; - body = JSON.stringify(se_UpdateIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1319,7 +1219,7 @@ export const se_UpdateRateBasedRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRateBasedRule"); let body: any; - body = JSON.stringify(se_UpdateRateBasedRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1332,7 +1232,7 @@ export const se_UpdateRegexMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRegexMatchSet"); let body: any; - body = JSON.stringify(se_UpdateRegexMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1345,7 +1245,7 @@ export const se_UpdateRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRegexPatternSet"); let body: any; - body = JSON.stringify(se_UpdateRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1358,7 +1258,7 @@ export const se_UpdateRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRule"); let body: any; - body = JSON.stringify(se_UpdateRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1371,7 +1271,7 @@ export const se_UpdateRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRuleGroup"); let body: any; - body = JSON.stringify(se_UpdateRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1384,7 +1284,7 @@ export const se_UpdateSizeConstraintSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSizeConstraintSet"); let body: any; - body = JSON.stringify(se_UpdateSizeConstraintSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1397,7 +1297,7 @@ export const se_UpdateSqlInjectionMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateSqlInjectionMatchSet"); let body: any; - body = JSON.stringify(se_UpdateSqlInjectionMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1410,7 +1310,7 @@ export const se_UpdateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWebACL"); let body: any; - body = JSON.stringify(se_UpdateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1423,7 +1323,7 @@ export const se_UpdateXssMatchSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateXssMatchSet"); let body: any; - body = JSON.stringify(se_UpdateXssMatchSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1444,7 +1344,7 @@ export const de_CreateByteMatchSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1480,10 +1380,9 @@ const de_CreateByteMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1501,12 +1400,12 @@ export const de_CreateGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGeoMatchSetResponse(data, context); + contents = _json(data); const response: CreateGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1542,10 +1441,9 @@ const de_CreateGeoMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1563,12 +1461,12 @@ export const de_CreateIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateIPSetResponse(data, context); + contents = _json(data); const response: CreateIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1604,10 +1502,9 @@ const de_CreateIPSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1625,12 +1522,12 @@ export const de_CreateRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRateBasedRuleResponse(data, context); + contents = _json(data); const response: CreateRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1672,10 +1569,9 @@ const de_CreateRateBasedRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1693,12 +1589,12 @@ export const de_CreateRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRegexMatchSetResponse(data, context); + contents = _json(data); const response: CreateRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1728,10 +1624,9 @@ const de_CreateRegexMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1749,12 +1644,12 @@ export const de_CreateRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRegexPatternSetResponse(data, context); + contents = _json(data); const response: CreateRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1784,10 +1679,9 @@ const de_CreateRegexPatternSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1805,12 +1699,12 @@ export const de_CreateRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRuleResponse(data, context); + contents = _json(data); const response: CreateRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1852,10 +1746,9 @@ const de_CreateRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1873,12 +1766,12 @@ export const de_CreateRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRuleGroupResponse(data, context); + contents = _json(data); const response: CreateRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1917,10 +1810,9 @@ const de_CreateRuleGroupCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1938,12 +1830,12 @@ export const de_CreateSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSizeConstraintSetResponse(data, context); + contents = _json(data); const response: CreateSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1979,10 +1871,9 @@ const de_CreateSizeConstraintSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2000,12 +1891,12 @@ export const de_CreateSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: CreateSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2041,10 +1932,9 @@ const de_CreateSqlInjectionMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2062,12 +1952,12 @@ export const de_CreateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWebACLResponse(data, context); + contents = _json(data); const response: CreateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2112,10 +2002,9 @@ const de_CreateWebACLCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2133,12 +2022,12 @@ export const de_CreateWebACLMigrationStackCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWebACLMigrationStackResponse(data, context); + contents = _json(data); const response: CreateWebACLMigrationStackCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2171,10 +2060,9 @@ const de_CreateWebACLMigrationStackCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2192,12 +2080,12 @@ export const de_CreateXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateXssMatchSetResponse(data, context); + contents = _json(data); const response: CreateXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2233,10 +2121,9 @@ const de_CreateXssMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2254,12 +2141,12 @@ export const de_DeleteByteMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteByteMatchSetResponse(data, context); + contents = _json(data); const response: DeleteByteMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2295,10 +2182,9 @@ const de_DeleteByteMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2316,12 +2202,12 @@ export const de_DeleteGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGeoMatchSetResponse(data, context); + contents = _json(data); const response: DeleteGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2357,10 +2243,9 @@ const de_DeleteGeoMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2378,12 +2263,12 @@ export const de_DeleteIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteIPSetResponse(data, context); + contents = _json(data); const response: DeleteIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2419,10 +2304,9 @@ const de_DeleteIPSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2440,12 +2324,12 @@ export const de_DeleteLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLoggingConfigurationResponse(data, context); + contents = _json(data); const response: DeleteLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2472,10 +2356,9 @@ const de_DeleteLoggingConfigurationCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2493,12 +2376,12 @@ export const de_DeletePermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePermissionPolicyResponse(data, context); + contents = _json(data); const response: DeletePermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2525,10 +2408,9 @@ const de_DeletePermissionPolicyCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2546,12 +2428,12 @@ export const de_DeleteRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRateBasedRuleResponse(data, context); + contents = _json(data); const response: DeleteRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2593,10 +2475,9 @@ const de_DeleteRateBasedRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2614,12 +2495,12 @@ export const de_DeleteRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegexMatchSetResponse(data, context); + contents = _json(data); const response: DeleteRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2655,10 +2536,9 @@ const de_DeleteRegexMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,12 +2556,12 @@ export const de_DeleteRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegexPatternSetResponse(data, context); + contents = _json(data); const response: DeleteRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2717,10 +2597,9 @@ const de_DeleteRegexPatternSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2738,12 +2617,12 @@ export const de_DeleteRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRuleResponse(data, context); + contents = _json(data); const response: DeleteRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2785,10 +2664,9 @@ const de_DeleteRuleCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2806,12 +2684,12 @@ export const de_DeleteRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRuleGroupResponse(data, context); + contents = _json(data); const response: DeleteRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2853,10 +2731,9 @@ const de_DeleteRuleGroupCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2874,12 +2751,12 @@ export const de_DeleteSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSizeConstraintSetResponse(data, context); + contents = _json(data); const response: DeleteSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2915,10 +2792,9 @@ const de_DeleteSizeConstraintSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2936,12 +2812,12 @@ export const de_DeleteSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: DeleteSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2977,10 +2853,9 @@ const de_DeleteSqlInjectionMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2998,12 +2873,12 @@ export const de_DeleteWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWebACLResponse(data, context); + contents = _json(data); const response: DeleteWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3045,10 +2920,9 @@ const de_DeleteWebACLCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3066,12 +2940,12 @@ export const de_DeleteXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteXssMatchSetResponse(data, context); + contents = _json(data); const response: DeleteXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3107,10 +2981,9 @@ const de_DeleteXssMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3133,7 +3006,7 @@ export const de_GetByteMatchSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3160,10 +3033,9 @@ const de_GetByteMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3181,12 +3053,12 @@ export const de_GetChangeTokenCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetChangeTokenResponse(data, context); + contents = _json(data); const response: GetChangeTokenCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3207,10 +3079,9 @@ const de_GetChangeTokenCommandError = async ( throw await de_WAFInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3228,12 +3099,12 @@ export const de_GetChangeTokenStatusCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetChangeTokenStatusResponse(data, context); + contents = _json(data); const response: GetChangeTokenStatusCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3257,10 +3128,9 @@ const de_GetChangeTokenStatusCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3278,12 +3148,12 @@ export const de_GetGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetGeoMatchSetResponse(data, context); + contents = _json(data); const response: GetGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3310,10 +3180,9 @@ const de_GetGeoMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3331,12 +3200,12 @@ export const de_GetIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetIPSetResponse(data, context); + contents = _json(data); const response: GetIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3363,10 +3232,9 @@ const de_GetIPSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3384,12 +3252,12 @@ export const de_GetLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLoggingConfigurationResponse(data, context); + contents = _json(data); const response: GetLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3413,10 +3281,9 @@ const de_GetLoggingConfigurationCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3434,12 +3301,12 @@ export const de_GetPermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPermissionPolicyResponse(data, context); + contents = _json(data); const response: GetPermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3463,10 +3330,9 @@ const de_GetPermissionPolicyCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3484,12 +3350,12 @@ export const de_GetRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRateBasedRuleResponse(data, context); + contents = _json(data); const response: GetRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3516,10 +3382,9 @@ const de_GetRateBasedRuleCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3537,12 +3402,12 @@ export const de_GetRateBasedRuleManagedKeysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRateBasedRuleManagedKeysResponse(data, context); + contents = _json(data); const response: GetRateBasedRuleManagedKeysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3572,10 +3437,9 @@ const de_GetRateBasedRuleManagedKeysCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3593,12 +3457,12 @@ export const de_GetRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegexMatchSetResponse(data, context); + contents = _json(data); const response: GetRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3625,10 +3489,9 @@ const de_GetRegexMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3646,12 +3509,12 @@ export const de_GetRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegexPatternSetResponse(data, context); + contents = _json(data); const response: GetRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3678,10 +3541,9 @@ const de_GetRegexPatternSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3699,12 +3561,12 @@ export const de_GetRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRuleResponse(data, context); + contents = _json(data); const response: GetRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3731,10 +3593,9 @@ const de_GetRuleCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3752,12 +3613,12 @@ export const de_GetRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRuleGroupResponse(data, context); + contents = _json(data); const response: GetRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3781,10 +3642,9 @@ const de_GetRuleGroupCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3807,7 +3667,7 @@ export const de_GetSampledRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3831,10 +3691,9 @@ const de_GetSampledRequestsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3852,12 +3711,12 @@ export const de_GetSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSizeConstraintSetResponse(data, context); + contents = _json(data); const response: GetSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3884,10 +3743,9 @@ const de_GetSizeConstraintSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3905,12 +3763,12 @@ export const de_GetSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: GetSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3937,10 +3795,9 @@ const de_GetSqlInjectionMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3958,12 +3815,12 @@ export const de_GetWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetWebACLResponse(data, context); + contents = _json(data); const response: GetWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3990,10 +3847,9 @@ const de_GetWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4011,12 +3867,12 @@ export const de_GetXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetXssMatchSetResponse(data, context); + contents = _json(data); const response: GetXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4043,10 +3899,9 @@ const de_GetXssMatchSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4064,12 +3919,12 @@ export const de_ListActivatedRulesInRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListActivatedRulesInRuleGroupResponse(data, context); + contents = _json(data); const response: ListActivatedRulesInRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4096,10 +3951,9 @@ const de_ListActivatedRulesInRuleGroupCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4117,12 +3971,12 @@ export const de_ListByteMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListByteMatchSetsResponse(data, context); + contents = _json(data); const response: ListByteMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4146,10 +4000,9 @@ const de_ListByteMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4167,12 +4020,12 @@ export const de_ListGeoMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListGeoMatchSetsResponse(data, context); + contents = _json(data); const response: ListGeoMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4196,10 +4049,9 @@ const de_ListGeoMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4217,12 +4069,12 @@ export const de_ListIPSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListIPSetsResponse(data, context); + contents = _json(data); const response: ListIPSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4246,10 +4098,9 @@ const de_ListIPSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4267,12 +4118,12 @@ export const de_ListLoggingConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLoggingConfigurationsResponse(data, context); + contents = _json(data); const response: ListLoggingConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4299,10 +4150,9 @@ const de_ListLoggingConfigurationsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4320,12 +4170,12 @@ export const de_ListRateBasedRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRateBasedRulesResponse(data, context); + contents = _json(data); const response: ListRateBasedRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4349,10 +4199,9 @@ const de_ListRateBasedRulesCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4370,12 +4219,12 @@ export const de_ListRegexMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRegexMatchSetsResponse(data, context); + contents = _json(data); const response: ListRegexMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4399,10 +4248,9 @@ const de_ListRegexMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4420,12 +4268,12 @@ export const de_ListRegexPatternSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRegexPatternSetsResponse(data, context); + contents = _json(data); const response: ListRegexPatternSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4449,10 +4297,9 @@ const de_ListRegexPatternSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4470,12 +4317,12 @@ export const de_ListRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRuleGroupsResponse(data, context); + contents = _json(data); const response: ListRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4496,10 +4343,9 @@ const de_ListRuleGroupsCommandError = async ( throw await de_WAFInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4517,12 +4363,12 @@ export const de_ListRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRulesResponse(data, context); + contents = _json(data); const response: ListRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4546,10 +4392,9 @@ const de_ListRulesCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4567,12 +4412,12 @@ export const de_ListSizeConstraintSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSizeConstraintSetsResponse(data, context); + contents = _json(data); const response: ListSizeConstraintSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4596,10 +4441,9 @@ const de_ListSizeConstraintSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4617,12 +4461,12 @@ export const de_ListSqlInjectionMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSqlInjectionMatchSetsResponse(data, context); + contents = _json(data); const response: ListSqlInjectionMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4646,10 +4490,9 @@ const de_ListSqlInjectionMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4667,12 +4510,12 @@ export const de_ListSubscribedRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListSubscribedRuleGroupsResponse(data, context); + contents = _json(data); const response: ListSubscribedRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4696,10 +4539,9 @@ const de_ListSubscribedRuleGroupsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4717,12 +4559,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4758,10 +4600,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4779,12 +4620,12 @@ export const de_ListWebACLsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListWebACLsResponse(data, context); + contents = _json(data); const response: ListWebACLsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4808,10 +4649,9 @@ const de_ListWebACLsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4829,12 +4669,12 @@ export const de_ListXssMatchSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListXssMatchSetsResponse(data, context); + contents = _json(data); const response: ListXssMatchSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4858,10 +4698,9 @@ const de_ListXssMatchSetsCommandError = async ( throw await de_WAFInvalidAccountExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4879,12 +4718,12 @@ export const de_PutLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLoggingConfigurationResponse(data, context); + contents = _json(data); const response: PutLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4914,10 +4753,9 @@ const de_PutLoggingConfigurationCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4935,12 +4773,12 @@ export const de_PutPermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPermissionPolicyResponse(data, context); + contents = _json(data); const response: PutPermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4970,10 +4808,9 @@ const de_PutPermissionPolicyCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4991,12 +4828,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5035,10 +4872,9 @@ const de_TagResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5056,12 +4892,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5097,10 +4933,9 @@ const de_UntagResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5118,12 +4953,12 @@ export const de_UpdateByteMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateByteMatchSetResponse(data, context); + contents = _json(data); const response: UpdateByteMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5165,10 +5000,9 @@ const de_UpdateByteMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5186,12 +5020,12 @@ export const de_UpdateGeoMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateGeoMatchSetResponse(data, context); + contents = _json(data); const response: UpdateGeoMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5236,10 +5070,9 @@ const de_UpdateGeoMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5257,12 +5090,12 @@ export const de_UpdateIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateIPSetResponse(data, context); + contents = _json(data); const response: UpdateIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5307,10 +5140,9 @@ const de_UpdateIPSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5328,12 +5160,12 @@ export const de_UpdateRateBasedRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRateBasedRuleResponse(data, context); + contents = _json(data); const response: UpdateRateBasedRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5378,10 +5210,9 @@ const de_UpdateRateBasedRuleCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5399,12 +5230,12 @@ export const de_UpdateRegexMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRegexMatchSetResponse(data, context); + contents = _json(data); const response: UpdateRegexMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5446,10 +5277,9 @@ const de_UpdateRegexMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5467,12 +5297,12 @@ export const de_UpdateRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRegexPatternSetResponse(data, context); + contents = _json(data); const response: UpdateRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5514,10 +5344,9 @@ const de_UpdateRegexPatternSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5535,12 +5364,12 @@ export const de_UpdateRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleResponse(data, context); + contents = _json(data); const response: UpdateRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5585,10 +5414,9 @@ const de_UpdateRuleCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5606,12 +5434,12 @@ export const de_UpdateRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleGroupResponse(data, context); + contents = _json(data); const response: UpdateRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5650,10 +5478,9 @@ const de_UpdateRuleGroupCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5671,12 +5498,12 @@ export const de_UpdateSizeConstraintSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSizeConstraintSetResponse(data, context); + contents = _json(data); const response: UpdateSizeConstraintSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5721,10 +5548,9 @@ const de_UpdateSizeConstraintSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5742,12 +5568,12 @@ export const de_UpdateSqlInjectionMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateSqlInjectionMatchSetResponse(data, context); + contents = _json(data); const response: UpdateSqlInjectionMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5789,10 +5615,9 @@ const de_UpdateSqlInjectionMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5810,12 +5635,12 @@ export const de_UpdateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWebACLResponse(data, context); + contents = _json(data); const response: UpdateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5863,10 +5688,9 @@ const de_UpdateWebACLCommandError = async ( throw await de_WAFSubscriptionNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5884,12 +5708,12 @@ export const de_UpdateXssMatchSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateXssMatchSetResponse(data, context); + contents = _json(data); const response: UpdateXssMatchSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5931,10 +5755,9 @@ const de_UpdateXssMatchSetCommandError = async ( throw await de_WAFStaleDataExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5948,7 +5771,7 @@ const de_WAFBadRequestExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFBadRequestException(body, context); + const deserialized: any = _json(body); const exception = new WAFBadRequestException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5964,7 +5787,7 @@ const de_WAFDisallowedNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFDisallowedNameException(body, context); + const deserialized: any = _json(body); const exception = new WAFDisallowedNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5980,7 +5803,7 @@ const de_WAFEntityMigrationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFEntityMigrationException(body, context); + const deserialized: any = _json(body); const exception = new WAFEntityMigrationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5996,7 +5819,7 @@ const de_WAFInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6012,7 +5835,7 @@ const de_WAFInvalidAccountExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidAccountException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidAccountException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6028,7 +5851,7 @@ const de_WAFInvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6044,7 +5867,7 @@ const de_WAFInvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6060,7 +5883,7 @@ const de_WAFInvalidPermissionPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidPermissionPolicyException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidPermissionPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6076,7 +5899,7 @@ const de_WAFInvalidRegexPatternExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidRegexPatternException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidRegexPatternException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6092,7 +5915,7 @@ const de_WAFLimitsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFLimitsExceededException(body, context); + const deserialized: any = _json(body); const exception = new WAFLimitsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6108,7 +5931,7 @@ const de_WAFNonEmptyEntityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonEmptyEntityException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonEmptyEntityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6124,7 +5947,7 @@ const de_WAFNonexistentContainerExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonexistentContainerException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonexistentContainerException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6140,7 +5963,7 @@ const de_WAFNonexistentItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonexistentItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonexistentItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6156,7 +5979,7 @@ const de_WAFReferencedItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFReferencedItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFReferencedItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6172,7 +5995,7 @@ const de_WAFServiceLinkedRoleErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFServiceLinkedRoleErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFServiceLinkedRoleErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6188,7 +6011,7 @@ const de_WAFStaleDataExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFStaleDataException(body, context); + const deserialized: any = _json(body); const exception = new WAFStaleDataException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6204,7 +6027,7 @@ const de_WAFSubscriptionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFSubscriptionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new WAFSubscriptionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6220,7 +6043,7 @@ const de_WAFTagOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFTagOperationException(body, context); + const deserialized: any = _json(body); const exception = new WAFTagOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6236,7 +6059,7 @@ const de_WAFTagOperationInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFTagOperationInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFTagOperationInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6244,28 +6067,16 @@ const de_WAFTagOperationInternalErrorExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActivatedRule - */ -const se_ActivatedRule = (input: ActivatedRule, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_WafAction(input.Action, context) }), - ...(input.ExcludedRules != null && { ExcludedRules: se_ExcludedRules(input.ExcludedRules, context) }), - ...(input.OverrideAction != null && { OverrideAction: se_WafOverrideAction(input.OverrideAction, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_ActivatedRule omitted. /** * serializeAws_json1_1ByteMatchSetUpdate */ const se_ByteMatchSetUpdate = (input: ByteMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ByteMatchTuple != null && { ByteMatchTuple: se_ByteMatchTuple(input.ByteMatchTuple, context) }), - }; + return take(input, { + Action: [], + ByteMatchTuple: (_) => se_ByteMatchTuple(_, context), + }); }; /** @@ -6283,3115 +6094,694 @@ const se_ByteMatchSetUpdates = (input: ByteMatchSetUpdate[], context: __SerdeCon * serializeAws_json1_1ByteMatchTuple */ const se_ByteMatchTuple = (input: ByteMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.PositionalConstraint != null && { PositionalConstraint: input.PositionalConstraint }), - ...(input.TargetString != null && { TargetString: context.base64Encoder(input.TargetString) }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; + return take(input, { + FieldToMatch: _json, + PositionalConstraint: [], + TargetString: context.base64Encoder, + TextTransformation: [], + }); }; -/** - * serializeAws_json1_1CreateByteMatchSetRequest - */ -const se_CreateByteMatchSetRequest = (input: CreateByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateByteMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateGeoMatchSetRequest - */ -const se_CreateGeoMatchSetRequest = (input: CreateGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateGeoMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateIPSetRequest - */ -const se_CreateIPSetRequest = (input: CreateIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateIPSetRequest omitted. -/** - * serializeAws_json1_1CreateRateBasedRuleRequest - */ -const se_CreateRateBasedRuleRequest = (input: CreateRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RateKey != null && { RateKey: input.RateKey }), - ...(input.RateLimit != null && { RateLimit: input.RateLimit }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateRateBasedRuleRequest omitted. -/** - * serializeAws_json1_1CreateRegexMatchSetRequest - */ -const se_CreateRegexMatchSetRequest = (input: CreateRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateRegexMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateRegexPatternSetRequest - */ -const se_CreateRegexPatternSetRequest = (input: CreateRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateRegexPatternSetRequest omitted. -/** - * serializeAws_json1_1CreateRuleGroupRequest - */ -const se_CreateRuleGroupRequest = (input: CreateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateRuleGroupRequest omitted. -/** - * serializeAws_json1_1CreateRuleRequest - */ -const se_CreateRuleRequest = (input: CreateRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateRuleRequest omitted. -/** - * serializeAws_json1_1CreateSizeConstraintSetRequest - */ -const se_CreateSizeConstraintSetRequest = (input: CreateSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateSizeConstraintSetRequest omitted. -/** - * serializeAws_json1_1CreateSqlInjectionMatchSetRequest - */ -const se_CreateSqlInjectionMatchSetRequest = ( - input: CreateSqlInjectionMatchSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateSqlInjectionMatchSetRequest omitted. -/** - * serializeAws_json1_1CreateWebACLMigrationStackRequest - */ -const se_CreateWebACLMigrationStackRequest = ( - input: CreateWebACLMigrationStackRequest, - context: __SerdeContext -): any => { - return { - ...(input.IgnoreUnsupportedType != null && { IgnoreUnsupportedType: input.IgnoreUnsupportedType }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_CreateWebACLMigrationStackRequest omitted. -/** - * serializeAws_json1_1CreateWebACLRequest - */ -const se_CreateWebACLRequest = (input: CreateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.DefaultAction != null && { DefaultAction: se_WafAction(input.DefaultAction, context) }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateWebACLRequest omitted. -/** - * serializeAws_json1_1CreateXssMatchSetRequest - */ -const se_CreateXssMatchSetRequest = (input: CreateXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_CreateXssMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteByteMatchSetRequest - */ -const se_DeleteByteMatchSetRequest = (input: DeleteByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ByteMatchSetId != null && { ByteMatchSetId: input.ByteMatchSetId }), - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - }; -}; +// se_DeleteByteMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteGeoMatchSetRequest - */ -const se_DeleteGeoMatchSetRequest = (input: DeleteGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.GeoMatchSetId != null && { GeoMatchSetId: input.GeoMatchSetId }), - }; -}; +// se_DeleteGeoMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteIPSetRequest - */ -const se_DeleteIPSetRequest = (input: DeleteIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.IPSetId != null && { IPSetId: input.IPSetId }), - }; -}; +// se_DeleteIPSetRequest omitted. -/** - * serializeAws_json1_1DeleteLoggingConfigurationRequest - */ -const se_DeleteLoggingConfigurationRequest = ( - input: DeleteLoggingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeleteLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_1DeletePermissionPolicyRequest - */ -const se_DeletePermissionPolicyRequest = (input: DeletePermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_DeletePermissionPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteRateBasedRuleRequest - */ -const se_DeleteRateBasedRuleRequest = (input: DeleteRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_DeleteRateBasedRuleRequest omitted. -/** - * serializeAws_json1_1DeleteRegexMatchSetRequest - */ -const se_DeleteRegexMatchSetRequest = (input: DeleteRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexMatchSetId != null && { RegexMatchSetId: input.RegexMatchSetId }), - }; -}; +// se_DeleteRegexMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteRegexPatternSetRequest - */ -const se_DeleteRegexPatternSetRequest = (input: DeleteRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - }; -}; +// se_DeleteRegexPatternSetRequest omitted. -/** - * serializeAws_json1_1DeleteRuleGroupRequest - */ -const se_DeleteRuleGroupRequest = (input: DeleteRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - }; -}; +// se_DeleteRuleGroupRequest omitted. -/** - * serializeAws_json1_1DeleteRuleRequest - */ -const se_DeleteRuleRequest = (input: DeleteRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_DeleteRuleRequest omitted. -/** - * serializeAws_json1_1DeleteSizeConstraintSetRequest - */ -const se_DeleteSizeConstraintSetRequest = (input: DeleteSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SizeConstraintSetId != null && { SizeConstraintSetId: input.SizeConstraintSetId }), - }; -}; +// se_DeleteSizeConstraintSetRequest omitted. -/** - * serializeAws_json1_1DeleteSqlInjectionMatchSetRequest - */ -const se_DeleteSqlInjectionMatchSetRequest = ( - input: DeleteSqlInjectionMatchSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SqlInjectionMatchSetId != null && { SqlInjectionMatchSetId: input.SqlInjectionMatchSetId }), - }; -}; +// se_DeleteSqlInjectionMatchSetRequest omitted. -/** - * serializeAws_json1_1DeleteWebACLRequest - */ -const se_DeleteWebACLRequest = (input: DeleteWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_DeleteWebACLRequest omitted. -/** - * serializeAws_json1_1DeleteXssMatchSetRequest - */ -const se_DeleteXssMatchSetRequest = (input: DeleteXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.XssMatchSetId != null && { XssMatchSetId: input.XssMatchSetId }), - }; -}; +// se_DeleteXssMatchSetRequest omitted. -/** - * serializeAws_json1_1ExcludedRule - */ -const se_ExcludedRule = (input: ExcludedRule, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_ExcludedRule omitted. -/** - * serializeAws_json1_1ExcludedRules - */ -const se_ExcludedRules = (input: ExcludedRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExcludedRule(entry, context); - }); -}; +// se_ExcludedRules omitted. -/** - * serializeAws_json1_1FieldToMatch - */ -const se_FieldToMatch = (input: FieldToMatch, context: __SerdeContext): any => { - return { - ...(input.Data != null && { Data: input.Data }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_FieldToMatch omitted. -/** - * serializeAws_json1_1GeoMatchConstraint - */ -const se_GeoMatchConstraint = (input: GeoMatchConstraint, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_GeoMatchConstraint omitted. -/** - * serializeAws_json1_1GeoMatchSetUpdate - */ -const se_GeoMatchSetUpdate = (input: GeoMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.GeoMatchConstraint != null && { - GeoMatchConstraint: se_GeoMatchConstraint(input.GeoMatchConstraint, context), - }), - }; -}; +// se_GeoMatchSetUpdate omitted. -/** - * serializeAws_json1_1GeoMatchSetUpdates - */ -const se_GeoMatchSetUpdates = (input: GeoMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_GeoMatchSetUpdate(entry, context); - }); -}; +// se_GeoMatchSetUpdates omitted. -/** - * serializeAws_json1_1GetByteMatchSetRequest - */ -const se_GetByteMatchSetRequest = (input: GetByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ByteMatchSetId != null && { ByteMatchSetId: input.ByteMatchSetId }), - }; -}; +// se_GetByteMatchSetRequest omitted. -/** - * serializeAws_json1_1GetChangeTokenRequest - */ -const se_GetChangeTokenRequest = (input: GetChangeTokenRequest, context: __SerdeContext): any => { - return {}; -}; +// se_GetChangeTokenRequest omitted. -/** - * serializeAws_json1_1GetChangeTokenStatusRequest - */ -const se_GetChangeTokenStatusRequest = (input: GetChangeTokenStatusRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - }; -}; +// se_GetChangeTokenStatusRequest omitted. -/** - * serializeAws_json1_1GetGeoMatchSetRequest - */ -const se_GetGeoMatchSetRequest = (input: GetGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.GeoMatchSetId != null && { GeoMatchSetId: input.GeoMatchSetId }), - }; -}; +// se_GetGeoMatchSetRequest omitted. -/** - * serializeAws_json1_1GetIPSetRequest - */ -const se_GetIPSetRequest = (input: GetIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.IPSetId != null && { IPSetId: input.IPSetId }), - }; -}; +// se_GetIPSetRequest omitted. -/** - * serializeAws_json1_1GetLoggingConfigurationRequest - */ -const se_GetLoggingConfigurationRequest = (input: GetLoggingConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_1GetPermissionPolicyRequest - */ -const se_GetPermissionPolicyRequest = (input: GetPermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_GetPermissionPolicyRequest omitted. -/** - * serializeAws_json1_1GetRateBasedRuleManagedKeysRequest - */ -const se_GetRateBasedRuleManagedKeysRequest = ( - input: GetRateBasedRuleManagedKeysRequest, - context: __SerdeContext -): any => { - return { - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_GetRateBasedRuleManagedKeysRequest omitted. -/** - * serializeAws_json1_1GetRateBasedRuleRequest - */ -const se_GetRateBasedRuleRequest = (input: GetRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_GetRateBasedRuleRequest omitted. -/** - * serializeAws_json1_1GetRegexMatchSetRequest - */ -const se_GetRegexMatchSetRequest = (input: GetRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.RegexMatchSetId != null && { RegexMatchSetId: input.RegexMatchSetId }), - }; -}; +// se_GetRegexMatchSetRequest omitted. -/** - * serializeAws_json1_1GetRegexPatternSetRequest - */ -const se_GetRegexPatternSetRequest = (input: GetRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - }; -}; +// se_GetRegexPatternSetRequest omitted. -/** - * serializeAws_json1_1GetRuleGroupRequest - */ -const se_GetRuleGroupRequest = (input: GetRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - }; -}; +// se_GetRuleGroupRequest omitted. -/** - * serializeAws_json1_1GetRuleRequest - */ -const se_GetRuleRequest = (input: GetRuleRequest, context: __SerdeContext): any => { - return { - ...(input.RuleId != null && { RuleId: input.RuleId }), - }; -}; +// se_GetRuleRequest omitted. /** * serializeAws_json1_1GetSampledRequestsRequest */ const se_GetSampledRequestsRequest = (input: GetSampledRequestsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.TimeWindow != null && { TimeWindow: se_TimeWindow(input.TimeWindow, context) }), - ...(input.WebAclId != null && { WebAclId: input.WebAclId }), - }; + return take(input, { + MaxItems: [], + RuleId: [], + TimeWindow: (_) => se_TimeWindow(_, context), + WebAclId: [], + }); }; -/** - * serializeAws_json1_1GetSizeConstraintSetRequest - */ -const se_GetSizeConstraintSetRequest = (input: GetSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.SizeConstraintSetId != null && { SizeConstraintSetId: input.SizeConstraintSetId }), - }; -}; +// se_GetSizeConstraintSetRequest omitted. -/** - * serializeAws_json1_1GetSqlInjectionMatchSetRequest - */ -const se_GetSqlInjectionMatchSetRequest = (input: GetSqlInjectionMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.SqlInjectionMatchSetId != null && { SqlInjectionMatchSetId: input.SqlInjectionMatchSetId }), - }; -}; +// se_GetSqlInjectionMatchSetRequest omitted. -/** - * serializeAws_json1_1GetWebACLRequest - */ -const se_GetWebACLRequest = (input: GetWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// se_GetWebACLRequest omitted. -/** - * serializeAws_json1_1GetXssMatchSetRequest - */ -const se_GetXssMatchSetRequest = (input: GetXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.XssMatchSetId != null && { XssMatchSetId: input.XssMatchSetId }), - }; -}; +// se_GetXssMatchSetRequest omitted. -/** - * serializeAws_json1_1IPSetDescriptor - */ -const se_IPSetDescriptor = (input: IPSetDescriptor, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_IPSetDescriptor omitted. -/** - * serializeAws_json1_1IPSetUpdate - */ -const se_IPSetUpdate = (input: IPSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.IPSetDescriptor != null && { IPSetDescriptor: se_IPSetDescriptor(input.IPSetDescriptor, context) }), - }; -}; +// se_IPSetUpdate omitted. -/** - * serializeAws_json1_1IPSetUpdates - */ -const se_IPSetUpdates = (input: IPSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IPSetUpdate(entry, context); - }); -}; +// se_IPSetUpdates omitted. -/** - * serializeAws_json1_1ListActivatedRulesInRuleGroupRequest - */ -const se_ListActivatedRulesInRuleGroupRequest = ( - input: ListActivatedRulesInRuleGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - }; -}; +// se_ListActivatedRulesInRuleGroupRequest omitted. -/** - * serializeAws_json1_1ListByteMatchSetsRequest - */ -const se_ListByteMatchSetsRequest = (input: ListByteMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListByteMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListGeoMatchSetsRequest - */ -const se_ListGeoMatchSetsRequest = (input: ListGeoMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListGeoMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListIPSetsRequest - */ -const se_ListIPSetsRequest = (input: ListIPSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListIPSetsRequest omitted. -/** - * serializeAws_json1_1ListLoggingConfigurationsRequest - */ -const se_ListLoggingConfigurationsRequest = (input: ListLoggingConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListLoggingConfigurationsRequest omitted. -/** - * serializeAws_json1_1ListRateBasedRulesRequest - */ -const se_ListRateBasedRulesRequest = (input: ListRateBasedRulesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRateBasedRulesRequest omitted. -/** - * serializeAws_json1_1ListRegexMatchSetsRequest - */ -const se_ListRegexMatchSetsRequest = (input: ListRegexMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRegexMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListRegexPatternSetsRequest - */ -const se_ListRegexPatternSetsRequest = (input: ListRegexPatternSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRegexPatternSetsRequest omitted. -/** - * serializeAws_json1_1ListRuleGroupsRequest - */ -const se_ListRuleGroupsRequest = (input: ListRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRuleGroupsRequest omitted. -/** - * serializeAws_json1_1ListRulesRequest - */ -const se_ListRulesRequest = (input: ListRulesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListRulesRequest omitted. -/** - * serializeAws_json1_1ListSizeConstraintSetsRequest - */ -const se_ListSizeConstraintSetsRequest = (input: ListSizeConstraintSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListSizeConstraintSetsRequest omitted. -/** - * serializeAws_json1_1ListSqlInjectionMatchSetsRequest - */ -const se_ListSqlInjectionMatchSetsRequest = (input: ListSqlInjectionMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListSqlInjectionMatchSetsRequest omitted. -/** - * serializeAws_json1_1ListSubscribedRuleGroupsRequest - */ -const se_ListSubscribedRuleGroupsRequest = (input: ListSubscribedRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListSubscribedRuleGroupsRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListWebACLsRequest - */ -const se_ListWebACLsRequest = (input: ListWebACLsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListWebACLsRequest omitted. -/** - * serializeAws_json1_1ListXssMatchSetsRequest - */ -const se_ListXssMatchSetsRequest = (input: ListXssMatchSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - }; -}; +// se_ListXssMatchSetsRequest omitted. -/** - * serializeAws_json1_1LogDestinationConfigs - */ -const se_LogDestinationConfigs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_LogDestinationConfigs omitted. -/** - * serializeAws_json1_1LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.LogDestinationConfigs != null && { - LogDestinationConfigs: se_LogDestinationConfigs(input.LogDestinationConfigs, context), - }), - ...(input.RedactedFields != null && { RedactedFields: se_RedactedFields(input.RedactedFields, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_LoggingConfiguration omitted. -/** - * serializeAws_json1_1Predicate - */ -const se_Predicate = (input: Predicate, context: __SerdeContext): any => { - return { - ...(input.DataId != null && { DataId: input.DataId }), - ...(input.Negated != null && { Negated: input.Negated }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_Predicate omitted. -/** - * serializeAws_json1_1PutLoggingConfigurationRequest - */ -const se_PutLoggingConfigurationRequest = (input: PutLoggingConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context), - }), - }; -}; +// se_PutLoggingConfigurationRequest omitted. -/** - * serializeAws_json1_1PutPermissionPolicyRequest - */ -const se_PutPermissionPolicyRequest = (input: PutPermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; +// se_PutPermissionPolicyRequest omitted. -/** - * serializeAws_json1_1RedactedFields - */ -const se_RedactedFields = (input: FieldToMatch[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldToMatch(entry, context); - }); -}; +// se_RedactedFields omitted. -/** - * serializeAws_json1_1RegexMatchSetUpdate - */ -const se_RegexMatchSetUpdate = (input: RegexMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.RegexMatchTuple != null && { RegexMatchTuple: se_RegexMatchTuple(input.RegexMatchTuple, context) }), - }; -}; +// se_RegexMatchSetUpdate omitted. -/** - * serializeAws_json1_1RegexMatchSetUpdates - */ -const se_RegexMatchSetUpdates = (input: RegexMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegexMatchSetUpdate(entry, context); - }); -}; +// se_RegexMatchSetUpdates omitted. -/** - * serializeAws_json1_1RegexMatchTuple - */ -const se_RegexMatchTuple = (input: RegexMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; -}; +// se_RegexMatchTuple omitted. -/** - * serializeAws_json1_1RegexPatternSetUpdate - */ -const se_RegexPatternSetUpdate = (input: RegexPatternSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.RegexPatternString != null && { RegexPatternString: input.RegexPatternString }), - }; -}; +// se_RegexPatternSetUpdate omitted. -/** - * serializeAws_json1_1RegexPatternSetUpdates - */ -const se_RegexPatternSetUpdates = (input: RegexPatternSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RegexPatternSetUpdate(entry, context); - }); -}; +// se_RegexPatternSetUpdates omitted. -/** - * serializeAws_json1_1RuleGroupUpdate - */ -const se_RuleGroupUpdate = (input: RuleGroupUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ActivatedRule != null && { ActivatedRule: se_ActivatedRule(input.ActivatedRule, context) }), - }; -}; +// se_RuleGroupUpdate omitted. -/** - * serializeAws_json1_1RuleGroupUpdates - */ -const se_RuleGroupUpdates = (input: RuleGroupUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleGroupUpdate(entry, context); - }); -}; +// se_RuleGroupUpdates omitted. + +// se_RuleUpdate omitted. + +// se_RuleUpdates omitted. + +// se_SizeConstraint omitted. + +// se_SizeConstraintSetUpdate omitted. + +// se_SizeConstraintSetUpdates omitted. + +// se_SqlInjectionMatchSetUpdate omitted. + +// se_SqlInjectionMatchSetUpdates omitted. + +// se_SqlInjectionMatchTuple omitted. + +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. /** - * serializeAws_json1_1RuleUpdate + * serializeAws_json1_1TimeWindow */ -const se_RuleUpdate = (input: RuleUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Predicate != null && { Predicate: se_Predicate(input.Predicate, context) }), - }; +const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_UntagResourceRequest omitted. + /** - * serializeAws_json1_1RuleUpdates + * serializeAws_json1_1UpdateByteMatchSetRequest */ -const se_RuleUpdates = (input: RuleUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleUpdate(entry, context); - }); +const se_UpdateByteMatchSetRequest = (input: UpdateByteMatchSetRequest, context: __SerdeContext): any => { + return take(input, { + ByteMatchSetId: [], + ChangeToken: [], + Updates: (_) => se_ByteMatchSetUpdates(_, context), + }); }; +// se_UpdateGeoMatchSetRequest omitted. + +// se_UpdateIPSetRequest omitted. + +// se_UpdateRateBasedRuleRequest omitted. + +// se_UpdateRegexMatchSetRequest omitted. + +// se_UpdateRegexPatternSetRequest omitted. + +// se_UpdateRuleGroupRequest omitted. + +// se_UpdateRuleRequest omitted. + +// se_UpdateSizeConstraintSetRequest omitted. + +// se_UpdateSqlInjectionMatchSetRequest omitted. + +// se_UpdateWebACLRequest omitted. + +// se_UpdateXssMatchSetRequest omitted. + +// se_WafAction omitted. + +// se_WafOverrideAction omitted. + +// se_WebACLUpdate omitted. + +// se_WebACLUpdates omitted. + +// se_XssMatchSetUpdate omitted. + +// se_XssMatchSetUpdates omitted. + +// se_XssMatchTuple omitted. + +// de_ActivatedRule omitted. + +// de_ActivatedRules omitted. + /** - * serializeAws_json1_1SizeConstraint + * deserializeAws_json1_1ByteMatchSet */ -const se_SizeConstraint = (input: SizeConstraint, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.Size != null && { Size: input.Size }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; +const de_ByteMatchSet = (output: any, context: __SerdeContext): ByteMatchSet => { + return take(output, { + ByteMatchSetId: __expectString, + ByteMatchTuples: (_: any) => de_ByteMatchTuples(_, context), + Name: __expectString, + }) as any; }; +// de_ByteMatchSetSummaries omitted. + +// de_ByteMatchSetSummary omitted. + /** - * serializeAws_json1_1SizeConstraintSetUpdate + * deserializeAws_json1_1ByteMatchTuple */ -const se_SizeConstraintSetUpdate = (input: SizeConstraintSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.SizeConstraint != null && { SizeConstraint: se_SizeConstraint(input.SizeConstraint, context) }), - }; +const de_ByteMatchTuple = (output: any, context: __SerdeContext): ByteMatchTuple => { + return take(output, { + FieldToMatch: _json, + PositionalConstraint: __expectString, + TargetString: context.base64Decoder, + TextTransformation: __expectString, + }) as any; }; /** - * serializeAws_json1_1SizeConstraintSetUpdates + * deserializeAws_json1_1ByteMatchTuples */ -const se_SizeConstraintSetUpdates = (input: SizeConstraintSetUpdate[], context: __SerdeContext): any => { - return input +const de_ByteMatchTuples = (output: any, context: __SerdeContext): ByteMatchTuple[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return se_SizeConstraintSetUpdate(entry, context); + .map((entry: any) => { + return de_ByteMatchTuple(entry, context); }); + return retVal; }; /** - * serializeAws_json1_1SqlInjectionMatchSetUpdate + * deserializeAws_json1_1CreateByteMatchSetResponse */ -const se_SqlInjectionMatchSetUpdate = (input: SqlInjectionMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.SqlInjectionMatchTuple != null && { - SqlInjectionMatchTuple: se_SqlInjectionMatchTuple(input.SqlInjectionMatchTuple, context), - }), - }; +const de_CreateByteMatchSetResponse = (output: any, context: __SerdeContext): CreateByteMatchSetResponse => { + return take(output, { + ByteMatchSet: (_: any) => de_ByteMatchSet(_, context), + ChangeToken: __expectString, + }) as any; }; -/** - * serializeAws_json1_1SqlInjectionMatchSetUpdates - */ -const se_SqlInjectionMatchSetUpdates = (input: SqlInjectionMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SqlInjectionMatchSetUpdate(entry, context); - }); -}; +// de_CreateGeoMatchSetResponse omitted. -/** - * serializeAws_json1_1SqlInjectionMatchTuple - */ -const se_SqlInjectionMatchTuple = (input: SqlInjectionMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; -}; +// de_CreateIPSetResponse omitted. -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// de_CreateRateBasedRuleResponse omitted. -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// de_CreateRegexMatchSetResponse omitted. -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// de_CreateRegexPatternSetResponse omitted. -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// de_CreateRuleGroupResponse omitted. -/** - * serializeAws_json1_1TimeWindow - */ -const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; -}; +// de_CreateRuleResponse omitted. -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// de_CreateSizeConstraintSetResponse omitted. -/** - * serializeAws_json1_1UpdateByteMatchSetRequest - */ -const se_UpdateByteMatchSetRequest = (input: UpdateByteMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ByteMatchSetId != null && { ByteMatchSetId: input.ByteMatchSetId }), - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Updates != null && { Updates: se_ByteMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_CreateSqlInjectionMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateGeoMatchSetRequest - */ -const se_UpdateGeoMatchSetRequest = (input: UpdateGeoMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.GeoMatchSetId != null && { GeoMatchSetId: input.GeoMatchSetId }), - ...(input.Updates != null && { Updates: se_GeoMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_CreateWebACLMigrationStackResponse omitted. -/** - * serializeAws_json1_1UpdateIPSetRequest - */ -const se_UpdateIPSetRequest = (input: UpdateIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.IPSetId != null && { IPSetId: input.IPSetId }), - ...(input.Updates != null && { Updates: se_IPSetUpdates(input.Updates, context) }), - }; -}; +// de_CreateWebACLResponse omitted. -/** - * serializeAws_json1_1UpdateRateBasedRuleRequest - */ -const se_UpdateRateBasedRuleRequest = (input: UpdateRateBasedRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RateLimit != null && { RateLimit: input.RateLimit }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Updates != null && { Updates: se_RuleUpdates(input.Updates, context) }), - }; -}; +// de_CreateXssMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateRegexMatchSetRequest - */ -const se_UpdateRegexMatchSetRequest = (input: UpdateRegexMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexMatchSetId != null && { RegexMatchSetId: input.RegexMatchSetId }), - ...(input.Updates != null && { Updates: se_RegexMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteByteMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateRegexPatternSetRequest - */ -const se_UpdateRegexPatternSetRequest = (input: UpdateRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RegexPatternSetId != null && { RegexPatternSetId: input.RegexPatternSetId }), - ...(input.Updates != null && { Updates: se_RegexPatternSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteGeoMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateRuleGroupRequest - */ -const se_UpdateRuleGroupRequest = (input: UpdateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleGroupId != null && { RuleGroupId: input.RuleGroupId }), - ...(input.Updates != null && { Updates: se_RuleGroupUpdates(input.Updates, context) }), - }; -}; +// de_DeleteIPSetResponse omitted. -/** - * serializeAws_json1_1UpdateRuleRequest - */ -const se_UpdateRuleRequest = (input: UpdateRuleRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.RuleId != null && { RuleId: input.RuleId }), - ...(input.Updates != null && { Updates: se_RuleUpdates(input.Updates, context) }), - }; -}; +// de_DeleteLoggingConfigurationResponse omitted. -/** - * serializeAws_json1_1UpdateSizeConstraintSetRequest - */ -const se_UpdateSizeConstraintSetRequest = (input: UpdateSizeConstraintSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SizeConstraintSetId != null && { SizeConstraintSetId: input.SizeConstraintSetId }), - ...(input.Updates != null && { Updates: se_SizeConstraintSetUpdates(input.Updates, context) }), - }; -}; +// de_DeletePermissionPolicyResponse omitted. -/** - * serializeAws_json1_1UpdateSqlInjectionMatchSetRequest - */ -const se_UpdateSqlInjectionMatchSetRequest = ( - input: UpdateSqlInjectionMatchSetRequest, - context: __SerdeContext -): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.SqlInjectionMatchSetId != null && { SqlInjectionMatchSetId: input.SqlInjectionMatchSetId }), - ...(input.Updates != null && { Updates: se_SqlInjectionMatchSetUpdates(input.Updates, context) }), - }; -}; +// de_DeleteRateBasedRuleResponse omitted. -/** - * serializeAws_json1_1UpdateWebACLRequest - */ -const se_UpdateWebACLRequest = (input: UpdateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.DefaultAction != null && { DefaultAction: se_WafAction(input.DefaultAction, context) }), - ...(input.Updates != null && { Updates: se_WebACLUpdates(input.Updates, context) }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - }; -}; +// de_DeleteRegexMatchSetResponse omitted. -/** - * serializeAws_json1_1UpdateXssMatchSetRequest - */ -const se_UpdateXssMatchSetRequest = (input: UpdateXssMatchSetRequest, context: __SerdeContext): any => { - return { - ...(input.ChangeToken != null && { ChangeToken: input.ChangeToken }), - ...(input.Updates != null && { Updates: se_XssMatchSetUpdates(input.Updates, context) }), - ...(input.XssMatchSetId != null && { XssMatchSetId: input.XssMatchSetId }), - }; -}; +// de_DeleteRegexPatternSetResponse omitted. -/** - * serializeAws_json1_1WafAction - */ -const se_WafAction = (input: WafAction, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; +// de_DeleteRuleGroupResponse omitted. -/** - * serializeAws_json1_1WafOverrideAction - */ -const se_WafOverrideAction = (input: WafOverrideAction, context: __SerdeContext): any => { - return { - ...(input.Type != null && { Type: input.Type }), - }; -}; +// de_DeleteRuleResponse omitted. -/** - * serializeAws_json1_1WebACLUpdate - */ -const se_WebACLUpdate = (input: WebACLUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ActivatedRule != null && { ActivatedRule: se_ActivatedRule(input.ActivatedRule, context) }), - }; -}; +// de_DeleteSizeConstraintSetResponse omitted. -/** - * serializeAws_json1_1WebACLUpdates - */ -const se_WebACLUpdates = (input: WebACLUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WebACLUpdate(entry, context); - }); -}; +// de_DeleteSqlInjectionMatchSetResponse omitted. -/** - * serializeAws_json1_1XssMatchSetUpdate - */ -const se_XssMatchSetUpdate = (input: XssMatchSetUpdate, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.XssMatchTuple != null && { XssMatchTuple: se_XssMatchTuple(input.XssMatchTuple, context) }), - }; -}; +// de_DeleteWebACLResponse omitted. -/** - * serializeAws_json1_1XssMatchSetUpdates - */ -const se_XssMatchSetUpdates = (input: XssMatchSetUpdate[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_XssMatchSetUpdate(entry, context); - }); -}; +// de_DeleteXssMatchSetResponse omitted. -/** - * serializeAws_json1_1XssMatchTuple - */ -const se_XssMatchTuple = (input: XssMatchTuple, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.TextTransformation != null && { TextTransformation: input.TextTransformation }), - }; -}; +// de_ExcludedRule omitted. -/** - * deserializeAws_json1_1ActivatedRule - */ -const de_ActivatedRule = (output: any, context: __SerdeContext): ActivatedRule => { - return { - Action: output.Action != null ? de_WafAction(output.Action, context) : undefined, - ExcludedRules: output.ExcludedRules != null ? de_ExcludedRules(output.ExcludedRules, context) : undefined, - OverrideAction: output.OverrideAction != null ? de_WafOverrideAction(output.OverrideAction, context) : undefined, - Priority: __expectInt32(output.Priority), - RuleId: __expectString(output.RuleId), - Type: __expectString(output.Type), - } as any; -}; +// de_ExcludedRules omitted. -/** - * deserializeAws_json1_1ActivatedRules - */ -const de_ActivatedRules = (output: any, context: __SerdeContext): ActivatedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ActivatedRule(entry, context); - }); - return retVal; -}; +// de_FieldToMatch omitted. -/** - * deserializeAws_json1_1ByteMatchSet - */ -const de_ByteMatchSet = (output: any, context: __SerdeContext): ByteMatchSet => { - return { - ByteMatchSetId: __expectString(output.ByteMatchSetId), - ByteMatchTuples: output.ByteMatchTuples != null ? de_ByteMatchTuples(output.ByteMatchTuples, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_GeoMatchConstraint omitted. -/** - * deserializeAws_json1_1ByteMatchSetSummaries - */ -const de_ByteMatchSetSummaries = (output: any, context: __SerdeContext): ByteMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ByteMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_GeoMatchConstraints omitted. -/** - * deserializeAws_json1_1ByteMatchSetSummary - */ -const de_ByteMatchSetSummary = (output: any, context: __SerdeContext): ByteMatchSetSummary => { - return { - ByteMatchSetId: __expectString(output.ByteMatchSetId), - Name: __expectString(output.Name), - } as any; -}; +// de_GeoMatchSet omitted. -/** - * deserializeAws_json1_1ByteMatchTuple - */ -const de_ByteMatchTuple = (output: any, context: __SerdeContext): ByteMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - PositionalConstraint: __expectString(output.PositionalConstraint), - TargetString: output.TargetString != null ? context.base64Decoder(output.TargetString) : undefined, - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_GeoMatchSetSummaries omitted. -/** - * deserializeAws_json1_1ByteMatchTuples - */ -const de_ByteMatchTuples = (output: any, context: __SerdeContext): ByteMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ByteMatchTuple(entry, context); - }); - return retVal; -}; +// de_GeoMatchSetSummary omitted. /** - * deserializeAws_json1_1CreateByteMatchSetResponse + * deserializeAws_json1_1GetByteMatchSetResponse */ -const de_CreateByteMatchSetResponse = (output: any, context: __SerdeContext): CreateByteMatchSetResponse => { - return { - ByteMatchSet: output.ByteMatchSet != null ? de_ByteMatchSet(output.ByteMatchSet, context) : undefined, - ChangeToken: __expectString(output.ChangeToken), - } as any; +const de_GetByteMatchSetResponse = (output: any, context: __SerdeContext): GetByteMatchSetResponse => { + return take(output, { + ByteMatchSet: (_: any) => de_ByteMatchSet(_, context), + }) as any; }; -/** - * deserializeAws_json1_1CreateGeoMatchSetResponse - */ -const de_CreateGeoMatchSetResponse = (output: any, context: __SerdeContext): CreateGeoMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - GeoMatchSet: output.GeoMatchSet != null ? de_GeoMatchSet(output.GeoMatchSet, context) : undefined, - } as any; -}; +// de_GetChangeTokenResponse omitted. -/** - * deserializeAws_json1_1CreateIPSetResponse - */ -const de_CreateIPSetResponse = (output: any, context: __SerdeContext): CreateIPSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - IPSet: output.IPSet != null ? de_IPSet(output.IPSet, context) : undefined, - } as any; -}; +// de_GetChangeTokenStatusResponse omitted. -/** - * deserializeAws_json1_1CreateRateBasedRuleResponse - */ -const de_CreateRateBasedRuleResponse = (output: any, context: __SerdeContext): CreateRateBasedRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - Rule: output.Rule != null ? de_RateBasedRule(output.Rule, context) : undefined, - } as any; -}; +// de_GetGeoMatchSetResponse omitted. -/** - * deserializeAws_json1_1CreateRegexMatchSetResponse - */ -const de_CreateRegexMatchSetResponse = (output: any, context: __SerdeContext): CreateRegexMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - RegexMatchSet: output.RegexMatchSet != null ? de_RegexMatchSet(output.RegexMatchSet, context) : undefined, - } as any; -}; +// de_GetIPSetResponse omitted. -/** - * deserializeAws_json1_1CreateRegexPatternSetResponse - */ -const de_CreateRegexPatternSetResponse = (output: any, context: __SerdeContext): CreateRegexPatternSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - RegexPatternSet: output.RegexPatternSet != null ? de_RegexPatternSet(output.RegexPatternSet, context) : undefined, - } as any; -}; +// de_GetLoggingConfigurationResponse omitted. -/** - * deserializeAws_json1_1CreateRuleGroupResponse - */ -const de_CreateRuleGroupResponse = (output: any, context: __SerdeContext): CreateRuleGroupResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - RuleGroup: output.RuleGroup != null ? de_RuleGroup(output.RuleGroup, context) : undefined, - } as any; -}; +// de_GetPermissionPolicyResponse omitted. -/** - * deserializeAws_json1_1CreateRuleResponse - */ -const de_CreateRuleResponse = (output: any, context: __SerdeContext): CreateRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - Rule: output.Rule != null ? de_Rule(output.Rule, context) : undefined, - } as any; -}; +// de_GetRateBasedRuleManagedKeysResponse omitted. -/** - * deserializeAws_json1_1CreateSizeConstraintSetResponse - */ -const de_CreateSizeConstraintSetResponse = (output: any, context: __SerdeContext): CreateSizeConstraintSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - SizeConstraintSet: - output.SizeConstraintSet != null ? de_SizeConstraintSet(output.SizeConstraintSet, context) : undefined, - } as any; -}; +// de_GetRateBasedRuleResponse omitted. -/** - * deserializeAws_json1_1CreateSqlInjectionMatchSetResponse - */ -const de_CreateSqlInjectionMatchSetResponse = ( - output: any, - context: __SerdeContext -): CreateSqlInjectionMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - SqlInjectionMatchSet: - output.SqlInjectionMatchSet != null ? de_SqlInjectionMatchSet(output.SqlInjectionMatchSet, context) : undefined, - } as any; -}; +// de_GetRegexMatchSetResponse omitted. -/** - * deserializeAws_json1_1CreateWebACLMigrationStackResponse - */ -const de_CreateWebACLMigrationStackResponse = ( - output: any, - context: __SerdeContext -): CreateWebACLMigrationStackResponse => { - return { - S3ObjectUrl: __expectString(output.S3ObjectUrl), - } as any; -}; +// de_GetRegexPatternSetResponse omitted. -/** - * deserializeAws_json1_1CreateWebACLResponse - */ -const de_CreateWebACLResponse = (output: any, context: __SerdeContext): CreateWebACLResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - WebACL: output.WebACL != null ? de_WebACL(output.WebACL, context) : undefined, - } as any; -}; +// de_GetRuleGroupResponse omitted. -/** - * deserializeAws_json1_1CreateXssMatchSetResponse - */ -const de_CreateXssMatchSetResponse = (output: any, context: __SerdeContext): CreateXssMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - XssMatchSet: output.XssMatchSet != null ? de_XssMatchSet(output.XssMatchSet, context) : undefined, - } as any; -}; +// de_GetRuleResponse omitted. /** - * deserializeAws_json1_1DeleteByteMatchSetResponse + * deserializeAws_json1_1GetSampledRequestsResponse */ -const de_DeleteByteMatchSetResponse = (output: any, context: __SerdeContext): DeleteByteMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; +const de_GetSampledRequestsResponse = (output: any, context: __SerdeContext): GetSampledRequestsResponse => { + return take(output, { + PopulationSize: __expectLong, + SampledRequests: (_: any) => de_SampledHTTPRequests(_, context), + TimeWindow: (_: any) => de_TimeWindow(_, context), + }) as any; }; -/** - * deserializeAws_json1_1DeleteGeoMatchSetResponse - */ -const de_DeleteGeoMatchSetResponse = (output: any, context: __SerdeContext): DeleteGeoMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteIPSetResponse - */ -const de_DeleteIPSetResponse = (output: any, context: __SerdeContext): DeleteIPSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteLoggingConfigurationResponse - */ -const de_DeleteLoggingConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteLoggingConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeletePermissionPolicyResponse - */ -const de_DeletePermissionPolicyResponse = (output: any, context: __SerdeContext): DeletePermissionPolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRateBasedRuleResponse - */ -const de_DeleteRateBasedRuleResponse = (output: any, context: __SerdeContext): DeleteRateBasedRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRegexMatchSetResponse - */ -const de_DeleteRegexMatchSetResponse = (output: any, context: __SerdeContext): DeleteRegexMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRegexPatternSetResponse - */ -const de_DeleteRegexPatternSetResponse = (output: any, context: __SerdeContext): DeleteRegexPatternSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRuleGroupResponse - */ -const de_DeleteRuleGroupResponse = (output: any, context: __SerdeContext): DeleteRuleGroupResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteRuleResponse - */ -const de_DeleteRuleResponse = (output: any, context: __SerdeContext): DeleteRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteSizeConstraintSetResponse - */ -const de_DeleteSizeConstraintSetResponse = (output: any, context: __SerdeContext): DeleteSizeConstraintSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteSqlInjectionMatchSetResponse - */ -const de_DeleteSqlInjectionMatchSetResponse = ( - output: any, - context: __SerdeContext -): DeleteSqlInjectionMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteWebACLResponse - */ -const de_DeleteWebACLResponse = (output: any, context: __SerdeContext): DeleteWebACLResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteXssMatchSetResponse - */ -const de_DeleteXssMatchSetResponse = (output: any, context: __SerdeContext): DeleteXssMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1ExcludedRule - */ -const de_ExcludedRule = (output: any, context: __SerdeContext): ExcludedRule => { - return { - RuleId: __expectString(output.RuleId), - } as any; -}; - -/** - * deserializeAws_json1_1ExcludedRules - */ -const de_ExcludedRules = (output: any, context: __SerdeContext): ExcludedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExcludedRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FieldToMatch - */ -const de_FieldToMatch = (output: any, context: __SerdeContext): FieldToMatch => { - return { - Data: __expectString(output.Data), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1GeoMatchConstraint - */ -const de_GeoMatchConstraint = (output: any, context: __SerdeContext): GeoMatchConstraint => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1GeoMatchConstraints - */ -const de_GeoMatchConstraints = (output: any, context: __SerdeContext): GeoMatchConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GeoMatchConstraint(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GeoMatchSet - */ -const de_GeoMatchSet = (output: any, context: __SerdeContext): GeoMatchSet => { - return { - GeoMatchConstraints: - output.GeoMatchConstraints != null ? de_GeoMatchConstraints(output.GeoMatchConstraints, context) : undefined, - GeoMatchSetId: __expectString(output.GeoMatchSetId), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1GeoMatchSetSummaries - */ -const de_GeoMatchSetSummaries = (output: any, context: __SerdeContext): GeoMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GeoMatchSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1GeoMatchSetSummary - */ -const de_GeoMatchSetSummary = (output: any, context: __SerdeContext): GeoMatchSetSummary => { - return { - GeoMatchSetId: __expectString(output.GeoMatchSetId), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1GetByteMatchSetResponse - */ -const de_GetByteMatchSetResponse = (output: any, context: __SerdeContext): GetByteMatchSetResponse => { - return { - ByteMatchSet: output.ByteMatchSet != null ? de_ByteMatchSet(output.ByteMatchSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetChangeTokenResponse - */ -const de_GetChangeTokenResponse = (output: any, context: __SerdeContext): GetChangeTokenResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetChangeTokenStatusResponse - */ -const de_GetChangeTokenStatusResponse = (output: any, context: __SerdeContext): GetChangeTokenStatusResponse => { - return { - ChangeTokenStatus: __expectString(output.ChangeTokenStatus), - } as any; -}; - -/** - * deserializeAws_json1_1GetGeoMatchSetResponse - */ -const de_GetGeoMatchSetResponse = (output: any, context: __SerdeContext): GetGeoMatchSetResponse => { - return { - GeoMatchSet: output.GeoMatchSet != null ? de_GeoMatchSet(output.GeoMatchSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetIPSetResponse - */ -const de_GetIPSetResponse = (output: any, context: __SerdeContext): GetIPSetResponse => { - return { - IPSet: output.IPSet != null ? de_IPSet(output.IPSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetLoggingConfigurationResponse - */ -const de_GetLoggingConfigurationResponse = (output: any, context: __SerdeContext): GetLoggingConfigurationResponse => { - return { - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPermissionPolicyResponse - */ -const de_GetPermissionPolicyResponse = (output: any, context: __SerdeContext): GetPermissionPolicyResponse => { - return { - Policy: __expectString(output.Policy), - } as any; -}; - -/** - * deserializeAws_json1_1GetRateBasedRuleManagedKeysResponse - */ -const de_GetRateBasedRuleManagedKeysResponse = ( - output: any, - context: __SerdeContext -): GetRateBasedRuleManagedKeysResponse => { - return { - ManagedKeys: output.ManagedKeys != null ? de_ManagedKeys(output.ManagedKeys, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1GetRateBasedRuleResponse - */ -const de_GetRateBasedRuleResponse = (output: any, context: __SerdeContext): GetRateBasedRuleResponse => { - return { - Rule: output.Rule != null ? de_RateBasedRule(output.Rule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRegexMatchSetResponse - */ -const de_GetRegexMatchSetResponse = (output: any, context: __SerdeContext): GetRegexMatchSetResponse => { - return { - RegexMatchSet: output.RegexMatchSet != null ? de_RegexMatchSet(output.RegexMatchSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRegexPatternSetResponse - */ -const de_GetRegexPatternSetResponse = (output: any, context: __SerdeContext): GetRegexPatternSetResponse => { - return { - RegexPatternSet: output.RegexPatternSet != null ? de_RegexPatternSet(output.RegexPatternSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRuleGroupResponse - */ -const de_GetRuleGroupResponse = (output: any, context: __SerdeContext): GetRuleGroupResponse => { - return { - RuleGroup: output.RuleGroup != null ? de_RuleGroup(output.RuleGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRuleResponse - */ -const de_GetRuleResponse = (output: any, context: __SerdeContext): GetRuleResponse => { - return { - Rule: output.Rule != null ? de_Rule(output.Rule, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSampledRequestsResponse - */ -const de_GetSampledRequestsResponse = (output: any, context: __SerdeContext): GetSampledRequestsResponse => { - return { - PopulationSize: __expectLong(output.PopulationSize), - SampledRequests: - output.SampledRequests != null ? de_SampledHTTPRequests(output.SampledRequests, context) : undefined, - TimeWindow: output.TimeWindow != null ? de_TimeWindow(output.TimeWindow, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSizeConstraintSetResponse - */ -const de_GetSizeConstraintSetResponse = (output: any, context: __SerdeContext): GetSizeConstraintSetResponse => { - return { - SizeConstraintSet: - output.SizeConstraintSet != null ? de_SizeConstraintSet(output.SizeConstraintSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSqlInjectionMatchSetResponse - */ -const de_GetSqlInjectionMatchSetResponse = (output: any, context: __SerdeContext): GetSqlInjectionMatchSetResponse => { - return { - SqlInjectionMatchSet: - output.SqlInjectionMatchSet != null ? de_SqlInjectionMatchSet(output.SqlInjectionMatchSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetWebACLResponse - */ -const de_GetWebACLResponse = (output: any, context: __SerdeContext): GetWebACLResponse => { - return { - WebACL: output.WebACL != null ? de_WebACL(output.WebACL, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetXssMatchSetResponse - */ -const de_GetXssMatchSetResponse = (output: any, context: __SerdeContext): GetXssMatchSetResponse => { - return { - XssMatchSet: output.XssMatchSet != null ? de_XssMatchSet(output.XssMatchSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HTTPHeader - */ -const de_HTTPHeader = (output: any, context: __SerdeContext): HTTPHeader => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1HTTPHeaders - */ -const de_HTTPHeaders = (output: any, context: __SerdeContext): HTTPHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HTTPHeader(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1HTTPRequest - */ -const de_HTTPRequest = (output: any, context: __SerdeContext): HTTPRequest => { - return { - ClientIP: __expectString(output.ClientIP), - Country: __expectString(output.Country), - HTTPVersion: __expectString(output.HTTPVersion), - Headers: output.Headers != null ? de_HTTPHeaders(output.Headers, context) : undefined, - Method: __expectString(output.Method), - URI: __expectString(output.URI), - } as any; -}; - -/** - * deserializeAws_json1_1IPSet - */ -const de_IPSet = (output: any, context: __SerdeContext): IPSet => { - return { - IPSetDescriptors: - output.IPSetDescriptors != null ? de_IPSetDescriptors(output.IPSetDescriptors, context) : undefined, - IPSetId: __expectString(output.IPSetId), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1IPSetDescriptor - */ -const de_IPSetDescriptor = (output: any, context: __SerdeContext): IPSetDescriptor => { - return { - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1IPSetDescriptors - */ -const de_IPSetDescriptors = (output: any, context: __SerdeContext): IPSetDescriptor[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IPSetDescriptor(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IPSetSummaries - */ -const de_IPSetSummaries = (output: any, context: __SerdeContext): IPSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IPSetSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1IPSetSummary - */ -const de_IPSetSummary = (output: any, context: __SerdeContext): IPSetSummary => { - return { - IPSetId: __expectString(output.IPSetId), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ListActivatedRulesInRuleGroupResponse - */ -const de_ListActivatedRulesInRuleGroupResponse = ( - output: any, - context: __SerdeContext -): ListActivatedRulesInRuleGroupResponse => { - return { - ActivatedRules: output.ActivatedRules != null ? de_ActivatedRules(output.ActivatedRules, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListByteMatchSetsResponse - */ -const de_ListByteMatchSetsResponse = (output: any, context: __SerdeContext): ListByteMatchSetsResponse => { - return { - ByteMatchSets: output.ByteMatchSets != null ? de_ByteMatchSetSummaries(output.ByteMatchSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; - -/** - * deserializeAws_json1_1ListGeoMatchSetsResponse - */ -const de_ListGeoMatchSetsResponse = (output: any, context: __SerdeContext): ListGeoMatchSetsResponse => { - return { - GeoMatchSets: output.GeoMatchSets != null ? de_GeoMatchSetSummaries(output.GeoMatchSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_GetSizeConstraintSetResponse omitted. -/** - * deserializeAws_json1_1ListIPSetsResponse - */ -const de_ListIPSetsResponse = (output: any, context: __SerdeContext): ListIPSetsResponse => { - return { - IPSets: output.IPSets != null ? de_IPSetSummaries(output.IPSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_GetSqlInjectionMatchSetResponse omitted. -/** - * deserializeAws_json1_1ListLoggingConfigurationsResponse - */ -const de_ListLoggingConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListLoggingConfigurationsResponse => { - return { - LoggingConfigurations: - output.LoggingConfigurations != null - ? de_LoggingConfigurations(output.LoggingConfigurations, context) - : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_GetWebACLResponse omitted. -/** - * deserializeAws_json1_1ListRateBasedRulesResponse - */ -const de_ListRateBasedRulesResponse = (output: any, context: __SerdeContext): ListRateBasedRulesResponse => { - return { - NextMarker: __expectString(output.NextMarker), - Rules: output.Rules != null ? de_RuleSummaries(output.Rules, context) : undefined, - } as any; -}; +// de_GetXssMatchSetResponse omitted. -/** - * deserializeAws_json1_1ListRegexMatchSetsResponse - */ -const de_ListRegexMatchSetsResponse = (output: any, context: __SerdeContext): ListRegexMatchSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RegexMatchSets: - output.RegexMatchSets != null ? de_RegexMatchSetSummaries(output.RegexMatchSets, context) : undefined, - } as any; -}; +// de_HTTPHeader omitted. -/** - * deserializeAws_json1_1ListRegexPatternSetsResponse - */ -const de_ListRegexPatternSetsResponse = (output: any, context: __SerdeContext): ListRegexPatternSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RegexPatternSets: - output.RegexPatternSets != null ? de_RegexPatternSetSummaries(output.RegexPatternSets, context) : undefined, - } as any; -}; +// de_HTTPHeaders omitted. -/** - * deserializeAws_json1_1ListRuleGroupsResponse - */ -const de_ListRuleGroupsResponse = (output: any, context: __SerdeContext): ListRuleGroupsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RuleGroups: output.RuleGroups != null ? de_RuleGroupSummaries(output.RuleGroups, context) : undefined, - } as any; -}; +// de_HTTPRequest omitted. -/** - * deserializeAws_json1_1ListRulesResponse - */ -const de_ListRulesResponse = (output: any, context: __SerdeContext): ListRulesResponse => { - return { - NextMarker: __expectString(output.NextMarker), - Rules: output.Rules != null ? de_RuleSummaries(output.Rules, context) : undefined, - } as any; -}; +// de_IPSet omitted. -/** - * deserializeAws_json1_1ListSizeConstraintSetsResponse - */ -const de_ListSizeConstraintSetsResponse = (output: any, context: __SerdeContext): ListSizeConstraintSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - SizeConstraintSets: - output.SizeConstraintSets != null ? de_SizeConstraintSetSummaries(output.SizeConstraintSets, context) : undefined, - } as any; -}; +// de_IPSetDescriptor omitted. -/** - * deserializeAws_json1_1ListSqlInjectionMatchSetsResponse - */ -const de_ListSqlInjectionMatchSetsResponse = ( - output: any, - context: __SerdeContext -): ListSqlInjectionMatchSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - SqlInjectionMatchSets: - output.SqlInjectionMatchSets != null - ? de_SqlInjectionMatchSetSummaries(output.SqlInjectionMatchSets, context) - : undefined, - } as any; -}; +// de_IPSetDescriptors omitted. -/** - * deserializeAws_json1_1ListSubscribedRuleGroupsResponse - */ -const de_ListSubscribedRuleGroupsResponse = ( - output: any, - context: __SerdeContext -): ListSubscribedRuleGroupsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RuleGroups: output.RuleGroups != null ? de_SubscribedRuleGroupSummaries(output.RuleGroups, context) : undefined, - } as any; -}; +// de_IPSetSummaries omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextMarker: __expectString(output.NextMarker), - TagInfoForResource: - output.TagInfoForResource != null ? de_TagInfoForResource(output.TagInfoForResource, context) : undefined, - } as any; -}; +// de_IPSetSummary omitted. -/** - * deserializeAws_json1_1ListWebACLsResponse - */ -const de_ListWebACLsResponse = (output: any, context: __SerdeContext): ListWebACLsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - WebACLs: output.WebACLs != null ? de_WebACLSummaries(output.WebACLs, context) : undefined, - } as any; -}; +// de_ListActivatedRulesInRuleGroupResponse omitted. -/** - * deserializeAws_json1_1ListXssMatchSetsResponse - */ -const de_ListXssMatchSetsResponse = (output: any, context: __SerdeContext): ListXssMatchSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - XssMatchSets: output.XssMatchSets != null ? de_XssMatchSetSummaries(output.XssMatchSets, context) : undefined, - } as any; -}; +// de_ListByteMatchSetsResponse omitted. -/** - * deserializeAws_json1_1LogDestinationConfigs - */ -const de_LogDestinationConfigs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListGeoMatchSetsResponse omitted. -/** - * deserializeAws_json1_1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - LogDestinationConfigs: - output.LogDestinationConfigs != null - ? de_LogDestinationConfigs(output.LogDestinationConfigs, context) - : undefined, - RedactedFields: output.RedactedFields != null ? de_RedactedFields(output.RedactedFields, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_ListIPSetsResponse omitted. -/** - * deserializeAws_json1_1LoggingConfigurations - */ -const de_LoggingConfigurations = (output: any, context: __SerdeContext): LoggingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoggingConfiguration(entry, context); - }); - return retVal; -}; +// de_ListLoggingConfigurationsResponse omitted. -/** - * deserializeAws_json1_1ManagedKeys - */ -const de_ManagedKeys = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListRateBasedRulesResponse omitted. -/** - * deserializeAws_json1_1Predicate - */ -const de_Predicate = (output: any, context: __SerdeContext): Predicate => { - return { - DataId: __expectString(output.DataId), - Negated: __expectBoolean(output.Negated), - Type: __expectString(output.Type), - } as any; -}; +// de_ListRegexMatchSetsResponse omitted. -/** - * deserializeAws_json1_1Predicates - */ -const de_Predicates = (output: any, context: __SerdeContext): Predicate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Predicate(entry, context); - }); - return retVal; -}; +// de_ListRegexPatternSetsResponse omitted. -/** - * deserializeAws_json1_1PutLoggingConfigurationResponse - */ -const de_PutLoggingConfigurationResponse = (output: any, context: __SerdeContext): PutLoggingConfigurationResponse => { - return { - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; +// de_ListRuleGroupsResponse omitted. -/** - * deserializeAws_json1_1PutPermissionPolicyResponse - */ -const de_PutPermissionPolicyResponse = (output: any, context: __SerdeContext): PutPermissionPolicyResponse => { - return {} as any; -}; +// de_ListRulesResponse omitted. -/** - * deserializeAws_json1_1RateBasedRule - */ -const de_RateBasedRule = (output: any, context: __SerdeContext): RateBasedRule => { - return { - MatchPredicates: output.MatchPredicates != null ? de_Predicates(output.MatchPredicates, context) : undefined, - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RateKey: __expectString(output.RateKey), - RateLimit: __expectLong(output.RateLimit), - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_ListSizeConstraintSetsResponse omitted. -/** - * deserializeAws_json1_1RedactedFields - */ -const de_RedactedFields = (output: any, context: __SerdeContext): FieldToMatch[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldToMatch(entry, context); - }); - return retVal; -}; +// de_ListSqlInjectionMatchSetsResponse omitted. -/** - * deserializeAws_json1_1RegexMatchSet - */ -const de_RegexMatchSet = (output: any, context: __SerdeContext): RegexMatchSet => { - return { - Name: __expectString(output.Name), - RegexMatchSetId: __expectString(output.RegexMatchSetId), - RegexMatchTuples: - output.RegexMatchTuples != null ? de_RegexMatchTuples(output.RegexMatchTuples, context) : undefined, - } as any; -}; +// de_ListSubscribedRuleGroupsResponse omitted. -/** - * deserializeAws_json1_1RegexMatchSetSummaries - */ -const de_RegexMatchSetSummaries = (output: any, context: __SerdeContext): RegexMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_ListTagsForResourceResponse omitted. -/** - * deserializeAws_json1_1RegexMatchSetSummary - */ -const de_RegexMatchSetSummary = (output: any, context: __SerdeContext): RegexMatchSetSummary => { - return { - Name: __expectString(output.Name), - RegexMatchSetId: __expectString(output.RegexMatchSetId), - } as any; -}; +// de_ListWebACLsResponse omitted. -/** - * deserializeAws_json1_1RegexMatchTuple - */ -const de_RegexMatchTuple = (output: any, context: __SerdeContext): RegexMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - RegexPatternSetId: __expectString(output.RegexPatternSetId), - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_ListXssMatchSetsResponse omitted. -/** - * deserializeAws_json1_1RegexMatchTuples - */ -const de_RegexMatchTuples = (output: any, context: __SerdeContext): RegexMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexMatchTuple(entry, context); - }); - return retVal; -}; +// de_LogDestinationConfigs omitted. -/** - * deserializeAws_json1_1RegexPatternSet - */ -const de_RegexPatternSet = (output: any, context: __SerdeContext): RegexPatternSet => { - return { - Name: __expectString(output.Name), - RegexPatternSetId: __expectString(output.RegexPatternSetId), - RegexPatternStrings: - output.RegexPatternStrings != null ? de_RegexPatternStrings(output.RegexPatternStrings, context) : undefined, - } as any; -}; +// de_LoggingConfiguration omitted. -/** - * deserializeAws_json1_1RegexPatternSetSummaries - */ -const de_RegexPatternSetSummaries = (output: any, context: __SerdeContext): RegexPatternSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexPatternSetSummary(entry, context); - }); - return retVal; -}; +// de_LoggingConfigurations omitted. -/** - * deserializeAws_json1_1RegexPatternSetSummary - */ -const de_RegexPatternSetSummary = (output: any, context: __SerdeContext): RegexPatternSetSummary => { - return { - Name: __expectString(output.Name), - RegexPatternSetId: __expectString(output.RegexPatternSetId), - } as any; -}; +// de_ManagedKeys omitted. -/** - * deserializeAws_json1_1RegexPatternStrings - */ -const de_RegexPatternStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Predicate omitted. -/** - * deserializeAws_json1_1Rule - */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - Predicates: output.Predicates != null ? de_Predicates(output.Predicates, context) : undefined, - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_Predicates omitted. -/** - * deserializeAws_json1_1RuleGroup - */ -const de_RuleGroup = (output: any, context: __SerdeContext): RuleGroup => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - } as any; -}; +// de_PutLoggingConfigurationResponse omitted. -/** - * deserializeAws_json1_1RuleGroupSummaries - */ -const de_RuleGroupSummaries = (output: any, context: __SerdeContext): RuleGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSummary(entry, context); - }); - return retVal; -}; +// de_PutPermissionPolicyResponse omitted. -/** - * deserializeAws_json1_1RuleGroupSummary - */ -const de_RuleGroupSummary = (output: any, context: __SerdeContext): RuleGroupSummary => { - return { - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - } as any; -}; +// de_RateBasedRule omitted. -/** - * deserializeAws_json1_1RuleSummaries - */ -const de_RuleSummaries = (output: any, context: __SerdeContext): RuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleSummary(entry, context); - }); - return retVal; -}; +// de_RedactedFields omitted. -/** - * deserializeAws_json1_1RuleSummary - */ -const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { - return { - Name: __expectString(output.Name), - RuleId: __expectString(output.RuleId), - } as any; -}; +// de_RegexMatchSet omitted. -/** - * deserializeAws_json1_1SampledHTTPRequest - */ -const de_SampledHTTPRequest = (output: any, context: __SerdeContext): SampledHTTPRequest => { - return { - Action: __expectString(output.Action), - Request: output.Request != null ? de_HTTPRequest(output.Request, context) : undefined, - RuleWithinRuleGroup: __expectString(output.RuleWithinRuleGroup), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Weight: __expectLong(output.Weight), - } as any; -}; +// de_RegexMatchSetSummaries omitted. -/** - * deserializeAws_json1_1SampledHTTPRequests - */ -const de_SampledHTTPRequests = (output: any, context: __SerdeContext): SampledHTTPRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SampledHTTPRequest(entry, context); - }); - return retVal; -}; +// de_RegexMatchSetSummary omitted. -/** - * deserializeAws_json1_1SizeConstraint - */ -const de_SizeConstraint = (output: any, context: __SerdeContext): SizeConstraint => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - Size: __expectLong(output.Size), - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_RegexMatchTuple omitted. -/** - * deserializeAws_json1_1SizeConstraints - */ -const de_SizeConstraints = (output: any, context: __SerdeContext): SizeConstraint[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SizeConstraint(entry, context); - }); - return retVal; -}; +// de_RegexMatchTuples omitted. -/** - * deserializeAws_json1_1SizeConstraintSet - */ -const de_SizeConstraintSet = (output: any, context: __SerdeContext): SizeConstraintSet => { - return { - Name: __expectString(output.Name), - SizeConstraintSetId: __expectString(output.SizeConstraintSetId), - SizeConstraints: output.SizeConstraints != null ? de_SizeConstraints(output.SizeConstraints, context) : undefined, - } as any; -}; +// de_RegexPatternSet omitted. -/** - * deserializeAws_json1_1SizeConstraintSetSummaries - */ -const de_SizeConstraintSetSummaries = (output: any, context: __SerdeContext): SizeConstraintSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SizeConstraintSetSummary(entry, context); - }); - return retVal; -}; +// de_RegexPatternSetSummaries omitted. -/** - * deserializeAws_json1_1SizeConstraintSetSummary - */ -const de_SizeConstraintSetSummary = (output: any, context: __SerdeContext): SizeConstraintSetSummary => { - return { - Name: __expectString(output.Name), - SizeConstraintSetId: __expectString(output.SizeConstraintSetId), - } as any; -}; +// de_RegexPatternSetSummary omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchSet - */ -const de_SqlInjectionMatchSet = (output: any, context: __SerdeContext): SqlInjectionMatchSet => { - return { - Name: __expectString(output.Name), - SqlInjectionMatchSetId: __expectString(output.SqlInjectionMatchSetId), - SqlInjectionMatchTuples: - output.SqlInjectionMatchTuples != null - ? de_SqlInjectionMatchTuples(output.SqlInjectionMatchTuples, context) - : undefined, - } as any; -}; +// de_RegexPatternStrings omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchSetSummaries - */ -const de_SqlInjectionMatchSetSummaries = (output: any, context: __SerdeContext): SqlInjectionMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SqlInjectionMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_Rule omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchSetSummary - */ -const de_SqlInjectionMatchSetSummary = (output: any, context: __SerdeContext): SqlInjectionMatchSetSummary => { - return { - Name: __expectString(output.Name), - SqlInjectionMatchSetId: __expectString(output.SqlInjectionMatchSetId), - } as any; -}; +// de_RuleGroup omitted. -/** - * deserializeAws_json1_1SqlInjectionMatchTuple - */ -const de_SqlInjectionMatchTuple = (output: any, context: __SerdeContext): SqlInjectionMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_RuleGroupSummaries omitted. + +// de_RuleGroupSummary omitted. + +// de_RuleSummaries omitted. + +// de_RuleSummary omitted. /** - * deserializeAws_json1_1SqlInjectionMatchTuples + * deserializeAws_json1_1SampledHTTPRequest */ -const de_SqlInjectionMatchTuples = (output: any, context: __SerdeContext): SqlInjectionMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SqlInjectionMatchTuple(entry, context); - }); - return retVal; +const de_SampledHTTPRequest = (output: any, context: __SerdeContext): SampledHTTPRequest => { + return take(output, { + Action: __expectString, + Request: _json, + RuleWithinRuleGroup: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Weight: __expectLong, + }) as any; }; /** - * deserializeAws_json1_1SubscribedRuleGroupSummaries + * deserializeAws_json1_1SampledHTTPRequests */ -const de_SubscribedRuleGroupSummaries = (output: any, context: __SerdeContext): SubscribedRuleGroupSummary[] => { +const de_SampledHTTPRequests = (output: any, context: __SerdeContext): SampledHTTPRequest[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SubscribedRuleGroupSummary(entry, context); + return de_SampledHTTPRequest(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SubscribedRuleGroupSummary - */ -const de_SubscribedRuleGroupSummary = (output: any, context: __SerdeContext): SubscribedRuleGroupSummary => { - return { - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - RuleGroupId: __expectString(output.RuleGroupId), - } as any; -}; +// de_SizeConstraint omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SizeConstraints omitted. -/** - * deserializeAws_json1_1TagInfoForResource - */ -const de_TagInfoForResource = (output: any, context: __SerdeContext): TagInfoForResource => { - return { - ResourceARN: __expectString(output.ResourceARN), - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_SizeConstraintSet omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_SizeConstraintSetSummaries omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_SizeConstraintSetSummary omitted. + +// de_SqlInjectionMatchSet omitted. + +// de_SqlInjectionMatchSetSummaries omitted. + +// de_SqlInjectionMatchSetSummary omitted. + +// de_SqlInjectionMatchTuple omitted. + +// de_SqlInjectionMatchTuples omitted. + +// de_SubscribedRuleGroupSummaries omitted. + +// de_SubscribedRuleGroupSummary omitted. + +// de_Tag omitted. + +// de_TagInfoForResource omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. /** * deserializeAws_json1_1TimeWindow */ const de_TimeWindow = (output: any, context: __SerdeContext): TimeWindow => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateByteMatchSetResponse - */ -const de_UpdateByteMatchSetResponse = (output: any, context: __SerdeContext): UpdateByteMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateByteMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateGeoMatchSetResponse - */ -const de_UpdateGeoMatchSetResponse = (output: any, context: __SerdeContext): UpdateGeoMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateGeoMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateIPSetResponse - */ -const de_UpdateIPSetResponse = (output: any, context: __SerdeContext): UpdateIPSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateIPSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRateBasedRuleResponse - */ -const de_UpdateRateBasedRuleResponse = (output: any, context: __SerdeContext): UpdateRateBasedRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRateBasedRuleResponse omitted. -/** - * deserializeAws_json1_1UpdateRegexMatchSetResponse - */ -const de_UpdateRegexMatchSetResponse = (output: any, context: __SerdeContext): UpdateRegexMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRegexMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRegexPatternSetResponse - */ -const de_UpdateRegexPatternSetResponse = (output: any, context: __SerdeContext): UpdateRegexPatternSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRegexPatternSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRuleGroupResponse - */ -const de_UpdateRuleGroupResponse = (output: any, context: __SerdeContext): UpdateRuleGroupResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRuleGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateRuleResponse - */ -const de_UpdateRuleResponse = (output: any, context: __SerdeContext): UpdateRuleResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateRuleResponse omitted. -/** - * deserializeAws_json1_1UpdateSizeConstraintSetResponse - */ -const de_UpdateSizeConstraintSetResponse = (output: any, context: __SerdeContext): UpdateSizeConstraintSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateSizeConstraintSetResponse omitted. -/** - * deserializeAws_json1_1UpdateSqlInjectionMatchSetResponse - */ -const de_UpdateSqlInjectionMatchSetResponse = ( - output: any, - context: __SerdeContext -): UpdateSqlInjectionMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateSqlInjectionMatchSetResponse omitted. -/** - * deserializeAws_json1_1UpdateWebACLResponse - */ -const de_UpdateWebACLResponse = (output: any, context: __SerdeContext): UpdateWebACLResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateWebACLResponse omitted. -/** - * deserializeAws_json1_1UpdateXssMatchSetResponse - */ -const de_UpdateXssMatchSetResponse = (output: any, context: __SerdeContext): UpdateXssMatchSetResponse => { - return { - ChangeToken: __expectString(output.ChangeToken), - } as any; -}; +// de_UpdateXssMatchSetResponse omitted. -/** - * deserializeAws_json1_1WafAction - */ -const de_WafAction = (output: any, context: __SerdeContext): WafAction => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_WafAction omitted. -/** - * deserializeAws_json1_1WAFBadRequestException - */ -const de_WAFBadRequestException = (output: any, context: __SerdeContext): WAFBadRequestException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFBadRequestException omitted. -/** - * deserializeAws_json1_1WAFDisallowedNameException - */ -const de_WAFDisallowedNameException = (output: any, context: __SerdeContext): WAFDisallowedNameException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFDisallowedNameException omitted. -/** - * deserializeAws_json1_1WAFEntityMigrationException - */ -const de_WAFEntityMigrationException = (output: any, context: __SerdeContext): WAFEntityMigrationException => { - return { - MigrationErrorReason: __expectString(output.MigrationErrorReason), - MigrationErrorType: __expectString(output.MigrationErrorType), - message: __expectString(output.message), - } as any; -}; +// de_WAFEntityMigrationException omitted. -/** - * deserializeAws_json1_1WAFInternalErrorException - */ -const de_WAFInternalErrorException = (output: any, context: __SerdeContext): WAFInternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInternalErrorException omitted. -/** - * deserializeAws_json1_1WAFInvalidAccountException - */ -const de_WAFInvalidAccountException = (output: any, context: __SerdeContext): WAFInvalidAccountException => { - return {} as any; -}; +// de_WAFInvalidAccountException omitted. -/** - * deserializeAws_json1_1WAFInvalidOperationException - */ -const de_WAFInvalidOperationException = (output: any, context: __SerdeContext): WAFInvalidOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidOperationException omitted. -/** - * deserializeAws_json1_1WAFInvalidParameterException - */ -const de_WAFInvalidParameterException = (output: any, context: __SerdeContext): WAFInvalidParameterException => { - return { - field: __expectString(output.field), - parameter: __expectString(output.parameter), - reason: __expectString(output.reason), - } as any; -}; +// de_WAFInvalidParameterException omitted. -/** - * deserializeAws_json1_1WAFInvalidPermissionPolicyException - */ -const de_WAFInvalidPermissionPolicyException = ( - output: any, - context: __SerdeContext -): WAFInvalidPermissionPolicyException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidPermissionPolicyException omitted. -/** - * deserializeAws_json1_1WAFInvalidRegexPatternException - */ -const de_WAFInvalidRegexPatternException = (output: any, context: __SerdeContext): WAFInvalidRegexPatternException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidRegexPatternException omitted. -/** - * deserializeAws_json1_1WAFLimitsExceededException - */ -const de_WAFLimitsExceededException = (output: any, context: __SerdeContext): WAFLimitsExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFLimitsExceededException omitted. -/** - * deserializeAws_json1_1WAFNonEmptyEntityException - */ -const de_WAFNonEmptyEntityException = (output: any, context: __SerdeContext): WAFNonEmptyEntityException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFNonEmptyEntityException omitted. -/** - * deserializeAws_json1_1WAFNonexistentContainerException - */ -const de_WAFNonexistentContainerException = ( - output: any, - context: __SerdeContext -): WAFNonexistentContainerException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFNonexistentContainerException omitted. -/** - * deserializeAws_json1_1WAFNonexistentItemException - */ -const de_WAFNonexistentItemException = (output: any, context: __SerdeContext): WAFNonexistentItemException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFNonexistentItemException omitted. -/** - * deserializeAws_json1_1WafOverrideAction - */ -const de_WafOverrideAction = (output: any, context: __SerdeContext): WafOverrideAction => { - return { - Type: __expectString(output.Type), - } as any; -}; +// de_WafOverrideAction omitted. -/** - * deserializeAws_json1_1WAFReferencedItemException - */ -const de_WAFReferencedItemException = (output: any, context: __SerdeContext): WAFReferencedItemException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFReferencedItemException omitted. -/** - * deserializeAws_json1_1WAFServiceLinkedRoleErrorException - */ -const de_WAFServiceLinkedRoleErrorException = ( - output: any, - context: __SerdeContext -): WAFServiceLinkedRoleErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFServiceLinkedRoleErrorException omitted. -/** - * deserializeAws_json1_1WAFStaleDataException - */ -const de_WAFStaleDataException = (output: any, context: __SerdeContext): WAFStaleDataException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFStaleDataException omitted. -/** - * deserializeAws_json1_1WAFSubscriptionNotFoundException - */ -const de_WAFSubscriptionNotFoundException = ( - output: any, - context: __SerdeContext -): WAFSubscriptionNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFSubscriptionNotFoundException omitted. -/** - * deserializeAws_json1_1WAFTagOperationException - */ -const de_WAFTagOperationException = (output: any, context: __SerdeContext): WAFTagOperationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFTagOperationException omitted. -/** - * deserializeAws_json1_1WAFTagOperationInternalErrorException - */ -const de_WAFTagOperationInternalErrorException = ( - output: any, - context: __SerdeContext -): WAFTagOperationInternalErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFTagOperationInternalErrorException omitted. -/** - * deserializeAws_json1_1WebACL - */ -const de_WebACL = (output: any, context: __SerdeContext): WebACL => { - return { - DefaultAction: output.DefaultAction != null ? de_WafAction(output.DefaultAction, context) : undefined, - MetricName: __expectString(output.MetricName), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_ActivatedRules(output.Rules, context) : undefined, - WebACLArn: __expectString(output.WebACLArn), - WebACLId: __expectString(output.WebACLId), - } as any; -}; +// de_WebACL omitted. -/** - * deserializeAws_json1_1WebACLSummaries - */ -const de_WebACLSummaries = (output: any, context: __SerdeContext): WebACLSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WebACLSummary(entry, context); - }); - return retVal; -}; +// de_WebACLSummaries omitted. -/** - * deserializeAws_json1_1WebACLSummary - */ -const de_WebACLSummary = (output: any, context: __SerdeContext): WebACLSummary => { - return { - Name: __expectString(output.Name), - WebACLId: __expectString(output.WebACLId), - } as any; -}; +// de_WebACLSummary omitted. -/** - * deserializeAws_json1_1XssMatchSet - */ -const de_XssMatchSet = (output: any, context: __SerdeContext): XssMatchSet => { - return { - Name: __expectString(output.Name), - XssMatchSetId: __expectString(output.XssMatchSetId), - XssMatchTuples: output.XssMatchTuples != null ? de_XssMatchTuples(output.XssMatchTuples, context) : undefined, - } as any; -}; +// de_XssMatchSet omitted. -/** - * deserializeAws_json1_1XssMatchSetSummaries - */ -const de_XssMatchSetSummaries = (output: any, context: __SerdeContext): XssMatchSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_XssMatchSetSummary(entry, context); - }); - return retVal; -}; +// de_XssMatchSetSummaries omitted. -/** - * deserializeAws_json1_1XssMatchSetSummary - */ -const de_XssMatchSetSummary = (output: any, context: __SerdeContext): XssMatchSetSummary => { - return { - Name: __expectString(output.Name), - XssMatchSetId: __expectString(output.XssMatchSetId), - } as any; -}; +// de_XssMatchSetSummary omitted. -/** - * deserializeAws_json1_1XssMatchTuple - */ -const de_XssMatchTuple = (output: any, context: __SerdeContext): XssMatchTuple => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - TextTransformation: __expectString(output.TextTransformation), - } as any; -}; +// de_XssMatchTuple omitted. -/** - * deserializeAws_json1_1XssMatchTuples - */ -const de_XssMatchTuples = (output: any, context: __SerdeContext): XssMatchTuple[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_XssMatchTuple(entry, context); - }); - return retVal; -}; +// de_XssMatchTuples omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -9413,6 +6803,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-wafv2/src/protocols/Aws_json1_1.ts b/clients/client-wafv2/src/protocols/Aws_json1_1.ts index 23d7e09bcfea..147103c6ea7e 100644 --- a/clients/client-wafv2/src/protocols/Aws_json1_1.ts +++ b/clients/client-wafv2/src/protocols/Aws_json1_1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,7 +10,8 @@ import { expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -147,9 +149,7 @@ import { AllowAction, AllQueryArguments, AndStatement, - AssociatedResourceType, AssociateWebACLRequest, - AssociateWebACLResponse, AssociationConfig, AWSManagedRulesATPRuleSet, AWSManagedRulesBotControlRuleSet, @@ -158,48 +158,32 @@ import { ByteMatchStatement, CaptchaAction, CaptchaConfig, - CaptchaResponse, ChallengeAction, ChallengeConfig, - ChallengeResponse, CheckCapacityRequest, - CheckCapacityResponse, Condition, CookieMatchPattern, Cookies, CountAction, CountryCode, CreateIPSetRequest, - CreateIPSetResponse, CreateRegexPatternSetRequest, - CreateRegexPatternSetResponse, CreateRuleGroupRequest, - CreateRuleGroupResponse, CreateWebACLRequest, - CreateWebACLResponse, CustomHTTPHeader, CustomRequestHandling, CustomResponse, CustomResponseBody, DefaultAction, DeleteFirewallManagerRuleGroupsRequest, - DeleteFirewallManagerRuleGroupsResponse, DeleteIPSetRequest, - DeleteIPSetResponse, DeleteLoggingConfigurationRequest, - DeleteLoggingConfigurationResponse, DeletePermissionPolicyRequest, - DeletePermissionPolicyResponse, DeleteRegexPatternSetRequest, - DeleteRegexPatternSetResponse, DeleteRuleGroupRequest, - DeleteRuleGroupResponse, DeleteWebACLRequest, - DeleteWebACLResponse, DescribeManagedRuleGroupRequest, - DescribeManagedRuleGroupResponse, DisassociateWebACLRequest, - DisassociateWebACLResponse, ExcludedRule, FieldToMatch, Filter, @@ -207,22 +191,16 @@ import { FirewallManagerStatement, ForwardedIPConfig, GenerateMobileSdkReleaseUrlRequest, - GenerateMobileSdkReleaseUrlResponse, GeoMatchStatement, GetIPSetRequest, - GetIPSetResponse, GetLoggingConfigurationRequest, - GetLoggingConfigurationResponse, GetManagedRuleSetRequest, GetManagedRuleSetResponse, GetMobileSdkReleaseRequest, GetMobileSdkReleaseResponse, GetPermissionPolicyRequest, - GetPermissionPolicyResponse, GetRateBasedStatementManagedKeysRequest, - GetRateBasedStatementManagedKeysResponse, GetRegexPatternSetRequest, - GetRegexPatternSetResponse, GetRuleGroupRequest, GetRuleGroupResponse, GetSampledRequestsRequest, @@ -233,49 +211,33 @@ import { GetWebACLResponse, HeaderMatchPattern, Headers, - HTTPHeader, - HTTPRequest, ImmunityTimeProperty, - IPSet, IPSetForwardedIPConfig, IPSetReferenceStatement, - IPSetSummary, JsonBody, JsonMatchPattern, Label, LabelMatchStatement, LabelNameCondition, - LabelSummary, ListAvailableManagedRuleGroupsRequest, - ListAvailableManagedRuleGroupsResponse, ListAvailableManagedRuleGroupVersionsRequest, ListAvailableManagedRuleGroupVersionsResponse, ListIPSetsRequest, - ListIPSetsResponse, ListLoggingConfigurationsRequest, - ListLoggingConfigurationsResponse, ListManagedRuleSetsRequest, - ListManagedRuleSetsResponse, ListMobileSdkReleasesRequest, ListMobileSdkReleasesResponse, ListRegexPatternSetsRequest, - ListRegexPatternSetsResponse, ListResourcesForWebACLRequest, - ListResourcesForWebACLResponse, ListRuleGroupsRequest, - ListRuleGroupsResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListWebACLsRequest, - ListWebACLsResponse, LoggingConfiguration, LoggingFilter, ManagedRuleGroupConfig, ManagedRuleGroupStatement, - ManagedRuleGroupSummary, ManagedRuleGroupVersion, ManagedRuleSet, - ManagedRuleSetSummary, ManagedRuleSetVersion, Method, MobileSdkRelease, @@ -285,19 +247,13 @@ import { OverrideAction, PasswordField, PutLoggingConfigurationRequest, - PutLoggingConfigurationResponse, PutManagedRuleSetVersionsRequest, - PutManagedRuleSetVersionsResponse, PutPermissionPolicyRequest, - PutPermissionPolicyResponse, QueryString, RateBasedStatement, - RateBasedStatementManagedKeysIPSet, Regex, RegexMatchStatement, - RegexPatternSet, RegexPatternSetReferenceStatement, - RegexPatternSetSummary, ReleaseSummary, RequestBodyAssociatedResourceTypeConfig, RequestInspection, @@ -311,8 +267,6 @@ import { RuleActionOverride, RuleGroup, RuleGroupReferenceStatement, - RuleGroupSummary, - RuleSummary, SampledHTTPRequest, SingleHeader, SingleQueryArgument, @@ -320,23 +274,16 @@ import { SqliMatchStatement, Statement, Tag, - TagInfoForResource, TagResourceRequest, - TagResourceResponse, TextTransformation, TimeWindow, UntagResourceRequest, - UntagResourceResponse, UpdateIPSetRequest, - UpdateIPSetResponse, UpdateManagedRuleSetVersionExpiryDateRequest, UpdateManagedRuleSetVersionExpiryDateResponse, UpdateRegexPatternSetRequest, - UpdateRegexPatternSetResponse, UpdateRuleGroupRequest, - UpdateRuleGroupResponse, UpdateWebACLRequest, - UpdateWebACLResponse, UriPath, UsernameField, VersionToPublish, @@ -360,7 +307,6 @@ import { WAFTagOperationInternalErrorException, WAFUnavailableEntityException, WebACL, - WebACLSummary, XssMatchStatement, } from "../models/models_0"; import { WAFV2ServiceException as __BaseException } from "../models/WAFV2ServiceException"; @@ -374,7 +320,7 @@ export const se_AssociateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateWebACL"); let body: any; - body = JSON.stringify(se_AssociateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -400,7 +346,7 @@ export const se_CreateIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateIPSet"); let body: any; - body = JSON.stringify(se_CreateIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -413,7 +359,7 @@ export const se_CreateRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateRegexPatternSet"); let body: any; - body = JSON.stringify(se_CreateRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -452,7 +398,7 @@ export const se_DeleteFirewallManagerRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteFirewallManagerRuleGroups"); let body: any; - body = JSON.stringify(se_DeleteFirewallManagerRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -465,7 +411,7 @@ export const se_DeleteIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIPSet"); let body: any; - body = JSON.stringify(se_DeleteIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -478,7 +424,7 @@ export const se_DeleteLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteLoggingConfiguration"); let body: any; - body = JSON.stringify(se_DeleteLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -491,7 +437,7 @@ export const se_DeletePermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeletePermissionPolicy"); let body: any; - body = JSON.stringify(se_DeletePermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -504,7 +450,7 @@ export const se_DeleteRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRegexPatternSet"); let body: any; - body = JSON.stringify(se_DeleteRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -517,7 +463,7 @@ export const se_DeleteRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRuleGroup"); let body: any; - body = JSON.stringify(se_DeleteRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -530,7 +476,7 @@ export const se_DeleteWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWebACL"); let body: any; - body = JSON.stringify(se_DeleteWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -543,7 +489,7 @@ export const se_DescribeManagedRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeManagedRuleGroup"); let body: any; - body = JSON.stringify(se_DescribeManagedRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -556,7 +502,7 @@ export const se_DisassociateWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateWebACL"); let body: any; - body = JSON.stringify(se_DisassociateWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -569,7 +515,7 @@ export const se_GenerateMobileSdkReleaseUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GenerateMobileSdkReleaseUrl"); let body: any; - body = JSON.stringify(se_GenerateMobileSdkReleaseUrlRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -582,7 +528,7 @@ export const se_GetIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetIPSet"); let body: any; - body = JSON.stringify(se_GetIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -595,7 +541,7 @@ export const se_GetLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetLoggingConfiguration"); let body: any; - body = JSON.stringify(se_GetLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -608,7 +554,7 @@ export const se_GetManagedRuleSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetManagedRuleSet"); let body: any; - body = JSON.stringify(se_GetManagedRuleSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -621,7 +567,7 @@ export const se_GetMobileSdkReleaseCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMobileSdkRelease"); let body: any; - body = JSON.stringify(se_GetMobileSdkReleaseRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -634,7 +580,7 @@ export const se_GetPermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetPermissionPolicy"); let body: any; - body = JSON.stringify(se_GetPermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -647,7 +593,7 @@ export const se_GetRateBasedStatementManagedKeysCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRateBasedStatementManagedKeys"); let body: any; - body = JSON.stringify(se_GetRateBasedStatementManagedKeysRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -660,7 +606,7 @@ export const se_GetRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRegexPatternSet"); let body: any; - body = JSON.stringify(se_GetRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -673,7 +619,7 @@ export const se_GetRuleGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetRuleGroup"); let body: any; - body = JSON.stringify(se_GetRuleGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -699,7 +645,7 @@ export const se_GetWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWebACL"); let body: any; - body = JSON.stringify(se_GetWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -712,7 +658,7 @@ export const se_GetWebACLForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetWebACLForResource"); let body: any; - body = JSON.stringify(se_GetWebACLForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -725,7 +671,7 @@ export const se_ListAvailableManagedRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailableManagedRuleGroups"); let body: any; - body = JSON.stringify(se_ListAvailableManagedRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -738,7 +684,7 @@ export const se_ListAvailableManagedRuleGroupVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailableManagedRuleGroupVersions"); let body: any; - body = JSON.stringify(se_ListAvailableManagedRuleGroupVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -751,7 +697,7 @@ export const se_ListIPSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListIPSets"); let body: any; - body = JSON.stringify(se_ListIPSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -764,7 +710,7 @@ export const se_ListLoggingConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListLoggingConfigurations"); let body: any; - body = JSON.stringify(se_ListLoggingConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -777,7 +723,7 @@ export const se_ListManagedRuleSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListManagedRuleSets"); let body: any; - body = JSON.stringify(se_ListManagedRuleSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -790,7 +736,7 @@ export const se_ListMobileSdkReleasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMobileSdkReleases"); let body: any; - body = JSON.stringify(se_ListMobileSdkReleasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -803,7 +749,7 @@ export const se_ListRegexPatternSetsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRegexPatternSets"); let body: any; - body = JSON.stringify(se_ListRegexPatternSetsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -816,7 +762,7 @@ export const se_ListResourcesForWebACLCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourcesForWebACL"); let body: any; - body = JSON.stringify(se_ListResourcesForWebACLRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -829,7 +775,7 @@ export const se_ListRuleGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListRuleGroups"); let body: any; - body = JSON.stringify(se_ListRuleGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -842,7 +788,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -855,7 +801,7 @@ export const se_ListWebACLsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListWebACLs"); let body: any; - body = JSON.stringify(se_ListWebACLsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -868,7 +814,7 @@ export const se_PutLoggingConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutLoggingConfiguration"); let body: any; - body = JSON.stringify(se_PutLoggingConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -881,7 +827,7 @@ export const se_PutManagedRuleSetVersionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutManagedRuleSetVersions"); let body: any; - body = JSON.stringify(se_PutManagedRuleSetVersionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -894,7 +840,7 @@ export const se_PutPermissionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutPermissionPolicy"); let body: any; - body = JSON.stringify(se_PutPermissionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -907,7 +853,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -920,7 +866,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -933,7 +879,7 @@ export const se_UpdateIPSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateIPSet"); let body: any; - body = JSON.stringify(se_UpdateIPSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -959,7 +905,7 @@ export const se_UpdateRegexPatternSetCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRegexPatternSet"); let body: any; - body = JSON.stringify(se_UpdateRegexPatternSetRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1001,12 +947,12 @@ export const de_AssociateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateWebACLResponse(data, context); + contents = _json(data); const response: AssociateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1039,10 +985,9 @@ const de_AssociateWebACLCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1060,12 +1005,12 @@ export const de_CheckCapacityCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CheckCapacityResponse(data, context); + contents = _json(data); const response: CheckCapacityCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1110,10 +1055,9 @@ const de_CheckCapacityCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1131,12 +1075,12 @@ export const de_CreateIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateIPSetResponse(data, context); + contents = _json(data); const response: CreateIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1178,10 +1122,9 @@ const de_CreateIPSetCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1199,12 +1142,12 @@ export const de_CreateRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRegexPatternSetResponse(data, context); + contents = _json(data); const response: CreateRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1246,10 +1189,9 @@ const de_CreateRegexPatternSetCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1267,12 +1209,12 @@ export const de_CreateRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateRuleGroupResponse(data, context); + contents = _json(data); const response: CreateRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1323,10 +1265,9 @@ const de_CreateRuleGroupCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1344,12 +1285,12 @@ export const de_CreateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWebACLResponse(data, context); + contents = _json(data); const response: CreateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1409,10 +1350,9 @@ const de_CreateWebACLCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1430,12 +1370,12 @@ export const de_DeleteFirewallManagerRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteFirewallManagerRuleGroupsResponse(data, context); + contents = _json(data); const response: DeleteFirewallManagerRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1468,10 +1408,9 @@ const de_DeleteFirewallManagerRuleGroupsCommandError = async ( throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1489,12 +1428,12 @@ export const de_DeleteIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteIPSetResponse(data, context); + contents = _json(data); const response: DeleteIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1536,10 +1475,9 @@ const de_DeleteIPSetCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1557,12 +1495,12 @@ export const de_DeleteLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteLoggingConfigurationResponse(data, context); + contents = _json(data); const response: DeleteLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1595,10 +1533,9 @@ const de_DeleteLoggingConfigurationCommandError = async ( throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1616,12 +1553,12 @@ export const de_DeletePermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeletePermissionPolicyResponse(data, context); + contents = _json(data); const response: DeletePermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1648,10 +1585,9 @@ const de_DeletePermissionPolicyCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1669,12 +1605,12 @@ export const de_DeleteRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRegexPatternSetResponse(data, context); + contents = _json(data); const response: DeleteRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1716,10 +1652,9 @@ const de_DeleteRegexPatternSetCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1737,12 +1672,12 @@ export const de_DeleteRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRuleGroupResponse(data, context); + contents = _json(data); const response: DeleteRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1784,10 +1719,9 @@ const de_DeleteRuleGroupCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1805,12 +1739,12 @@ export const de_DeleteWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWebACLResponse(data, context); + contents = _json(data); const response: DeleteWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1852,10 +1786,9 @@ const de_DeleteWebACLCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1873,12 +1806,12 @@ export const de_DescribeManagedRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeManagedRuleGroupResponse(data, context); + contents = _json(data); const response: DescribeManagedRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1914,10 +1847,9 @@ const de_DescribeManagedRuleGroupCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1935,12 +1867,12 @@ export const de_DisassociateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateWebACLResponse(data, context); + contents = _json(data); const response: DisassociateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1970,10 +1902,9 @@ const de_DisassociateWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1991,12 +1922,12 @@ export const de_GenerateMobileSdkReleaseUrlCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GenerateMobileSdkReleaseUrlResponse(data, context); + contents = _json(data); const response: GenerateMobileSdkReleaseUrlCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2026,10 +1957,9 @@ const de_GenerateMobileSdkReleaseUrlCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2047,12 +1977,12 @@ export const de_GetIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetIPSetResponse(data, context); + contents = _json(data); const response: GetIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2082,10 +2012,9 @@ const de_GetIPSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2103,12 +2032,12 @@ export const de_GetLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetLoggingConfigurationResponse(data, context); + contents = _json(data); const response: GetLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2138,10 +2067,9 @@ const de_GetLoggingConfigurationCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2164,7 +2092,7 @@ export const de_GetManagedRuleSetCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2194,10 +2122,9 @@ const de_GetManagedRuleSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2220,7 +2147,7 @@ export const de_GetMobileSdkReleaseCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2250,10 +2177,9 @@ const de_GetMobileSdkReleaseCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2271,12 +2197,12 @@ export const de_GetPermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetPermissionPolicyResponse(data, context); + contents = _json(data); const response: GetPermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2303,10 +2229,9 @@ const de_GetPermissionPolicyCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2324,12 +2249,12 @@ export const de_GetRateBasedStatementManagedKeysCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRateBasedStatementManagedKeysResponse(data, context); + contents = _json(data); const response: GetRateBasedStatementManagedKeysCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2359,10 +2284,9 @@ const de_GetRateBasedStatementManagedKeysCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2380,12 +2304,12 @@ export const de_GetRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetRegexPatternSetResponse(data, context); + contents = _json(data); const response: GetRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2415,10 +2339,9 @@ const de_GetRegexPatternSetCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2441,7 +2364,7 @@ export const de_GetRuleGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2471,10 +2394,9 @@ const de_GetRuleGroupCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,7 +2419,7 @@ export const de_GetSampledRequestsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2524,10 +2446,9 @@ const de_GetSampledRequestsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2550,7 +2471,7 @@ export const de_GetWebACLCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2580,10 +2501,9 @@ const de_GetWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2606,7 +2526,7 @@ export const de_GetWebACLForResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2639,10 +2559,9 @@ const de_GetWebACLForResourceCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2660,12 +2579,12 @@ export const de_ListAvailableManagedRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAvailableManagedRuleGroupsResponse(data, context); + contents = _json(data); const response: ListAvailableManagedRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2692,10 +2611,9 @@ const de_ListAvailableManagedRuleGroupsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2718,7 +2636,7 @@ export const de_ListAvailableManagedRuleGroupVersionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2748,10 +2666,9 @@ const de_ListAvailableManagedRuleGroupVersionsCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2769,12 +2686,12 @@ export const de_ListIPSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListIPSetsResponse(data, context); + contents = _json(data); const response: ListIPSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2801,10 +2718,9 @@ const de_ListIPSetsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2822,12 +2738,12 @@ export const de_ListLoggingConfigurationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListLoggingConfigurationsResponse(data, context); + contents = _json(data); const response: ListLoggingConfigurationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2854,10 +2770,9 @@ const de_ListLoggingConfigurationsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2875,12 +2790,12 @@ export const de_ListManagedRuleSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListManagedRuleSetsResponse(data, context); + contents = _json(data); const response: ListManagedRuleSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2907,10 +2822,9 @@ const de_ListManagedRuleSetsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2933,7 +2847,7 @@ export const de_ListMobileSdkReleasesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2960,10 +2874,9 @@ const de_ListMobileSdkReleasesCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2981,12 +2894,12 @@ export const de_ListRegexPatternSetsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRegexPatternSetsResponse(data, context); + contents = _json(data); const response: ListRegexPatternSetsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3013,10 +2926,9 @@ const de_ListRegexPatternSetsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3034,12 +2946,12 @@ export const de_ListResourcesForWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourcesForWebACLResponse(data, context); + contents = _json(data); const response: ListResourcesForWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3069,10 +2981,9 @@ const de_ListResourcesForWebACLCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3090,12 +3001,12 @@ export const de_ListRuleGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListRuleGroupsResponse(data, context); + contents = _json(data); const response: ListRuleGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3122,10 +3033,9 @@ const de_ListRuleGroupsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3143,12 +3053,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3184,10 +3094,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3205,12 +3114,12 @@ export const de_ListWebACLsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListWebACLsResponse(data, context); + contents = _json(data); const response: ListWebACLsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3237,10 +3146,9 @@ const de_ListWebACLsCommandError = async ( throw await de_WAFInvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3258,12 +3166,12 @@ export const de_PutLoggingConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutLoggingConfigurationResponse(data, context); + contents = _json(data); const response: PutLoggingConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3305,10 +3213,9 @@ const de_PutLoggingConfigurationCommandError = async ( throw await de_WAFServiceLinkedRoleErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3326,12 +3233,12 @@ export const de_PutManagedRuleSetVersionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutManagedRuleSetVersionsResponse(data, context); + contents = _json(data); const response: PutManagedRuleSetVersionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3364,10 +3271,9 @@ const de_PutManagedRuleSetVersionsCommandError = async ( throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3385,12 +3291,12 @@ export const de_PutPermissionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutPermissionPolicyResponse(data, context); + contents = _json(data); const response: PutPermissionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3420,10 +3326,9 @@ const de_PutPermissionPolicyCommandError = async ( throw await de_WAFNonexistentItemExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3441,12 +3346,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3485,10 +3390,9 @@ const de_TagResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3506,12 +3410,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3547,10 +3451,9 @@ const de_UntagResourceCommandError = async ( throw await de_WAFTagOperationInternalErrorExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3568,12 +3471,12 @@ export const de_UpdateIPSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateIPSetResponse(data, context); + contents = _json(data); const response: UpdateIPSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3612,10 +3515,9 @@ const de_UpdateIPSetCommandError = async ( throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3638,7 +3540,7 @@ export const de_UpdateManagedRuleSetVersionExpiryDateCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3671,10 +3573,9 @@ const de_UpdateManagedRuleSetVersionExpiryDateCommandError = async ( throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3692,12 +3593,12 @@ export const de_UpdateRegexPatternSetCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRegexPatternSetResponse(data, context); + contents = _json(data); const response: UpdateRegexPatternSetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3736,10 +3637,9 @@ const de_UpdateRegexPatternSetCommandError = async ( throw await de_WAFOptimisticLockExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3757,12 +3657,12 @@ export const de_UpdateRuleGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRuleGroupResponse(data, context); + contents = _json(data); const response: UpdateRuleGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3810,10 +3710,9 @@ const de_UpdateRuleGroupCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3831,12 +3730,12 @@ export const de_UpdateWebACLCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWebACLResponse(data, context); + contents = _json(data); const response: UpdateWebACLCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3890,10 +3789,9 @@ const de_UpdateWebACLCommandError = async ( throw await de_WAFUnavailableEntityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3907,7 +3805,7 @@ const de_WAFAssociatedItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFAssociatedItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFAssociatedItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3923,7 +3821,7 @@ const de_WAFConfigurationWarningExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFConfigurationWarningException(body, context); + const deserialized: any = _json(body); const exception = new WAFConfigurationWarningException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3939,7 +3837,7 @@ const de_WAFDuplicateItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFDuplicateItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFDuplicateItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3955,7 +3853,7 @@ const de_WAFExpiredManagedRuleGroupVersionExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFExpiredManagedRuleGroupVersionException(body, context); + const deserialized: any = _json(body); const exception = new WAFExpiredManagedRuleGroupVersionException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3971,7 +3869,7 @@ const de_WAFInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -3987,7 +3885,7 @@ const de_WAFInvalidOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidOperationException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4003,7 +3901,7 @@ const de_WAFInvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4019,7 +3917,7 @@ const de_WAFInvalidPermissionPolicyExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidPermissionPolicyException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidPermissionPolicyException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4035,7 +3933,7 @@ const de_WAFInvalidResourceExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFInvalidResourceException(body, context); + const deserialized: any = _json(body); const exception = new WAFInvalidResourceException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4051,7 +3949,7 @@ const de_WAFLimitsExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFLimitsExceededException(body, context); + const deserialized: any = _json(body); const exception = new WAFLimitsExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4067,7 +3965,7 @@ const de_WAFLogDestinationPermissionIssueExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFLogDestinationPermissionIssueException(body, context); + const deserialized: any = _json(body); const exception = new WAFLogDestinationPermissionIssueException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4083,7 +3981,7 @@ const de_WAFNonexistentItemExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFNonexistentItemException(body, context); + const deserialized: any = _json(body); const exception = new WAFNonexistentItemException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4099,7 +3997,7 @@ const de_WAFOptimisticLockExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFOptimisticLockException(body, context); + const deserialized: any = _json(body); const exception = new WAFOptimisticLockException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4115,7 +4013,7 @@ const de_WAFServiceLinkedRoleErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFServiceLinkedRoleErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFServiceLinkedRoleErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4131,7 +4029,7 @@ const de_WAFSubscriptionNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFSubscriptionNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new WAFSubscriptionNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4147,7 +4045,7 @@ const de_WAFTagOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFTagOperationException(body, context); + const deserialized: any = _json(body); const exception = new WAFTagOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4163,7 +4061,7 @@ const de_WAFTagOperationInternalErrorExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFTagOperationInternalErrorException(body, context); + const deserialized: any = _json(body); const exception = new WAFTagOperationInternalErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4179,7 +4077,7 @@ const de_WAFUnavailableEntityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WAFUnavailableEntityException(body, context); + const deserialized: any = _json(body); const exception = new WAFUnavailableEntityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4187,3911 +4085,1132 @@ const de_WAFUnavailableEntityExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActionCondition - */ -const se_ActionCondition = (input: ActionCondition, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - }; -}; +// se_ActionCondition omitted. -/** - * serializeAws_json1_1All - */ -const se_All = (input: All, context: __SerdeContext): any => { - return {}; -}; +// se_All omitted. -/** - * serializeAws_json1_1AllowAction - */ -const se_AllowAction = (input: AllowAction, context: __SerdeContext): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_CustomRequestHandling(input.CustomRequestHandling, context), - }), - }; -}; +// se_AllowAction omitted. -/** - * serializeAws_json1_1AllQueryArguments - */ -const se_AllQueryArguments = (input: AllQueryArguments, context: __SerdeContext): any => { - return {}; -}; +// se_AllQueryArguments omitted. /** * serializeAws_json1_1AndStatement */ const se_AndStatement = (input: AndStatement, context: __SerdeContext): any => { - return { - ...(input.Statements != null && { Statements: se_Statements(input.Statements, context) }), - }; + return take(input, { + Statements: (_) => se_Statements(_, context), + }); }; -/** - * serializeAws_json1_1AssociateWebACLRequest - */ -const se_AssociateWebACLRequest = (input: AssociateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - ...(input.WebACLArn != null && { WebACLArn: input.WebACLArn }), - }; -}; +// se_AssociateWebACLRequest omitted. -/** - * serializeAws_json1_1AssociationConfig - */ -const se_AssociationConfig = (input: AssociationConfig, context: __SerdeContext): any => { - return { - ...(input.RequestBody != null && { RequestBody: se_RequestBody(input.RequestBody, context) }), - }; -}; +// se_AssociationConfig omitted. -/** - * serializeAws_json1_1AWSManagedRulesATPRuleSet - */ -const se_AWSManagedRulesATPRuleSet = (input: AWSManagedRulesATPRuleSet, context: __SerdeContext): any => { - return { - ...(input.LoginPath != null && { LoginPath: input.LoginPath }), - ...(input.RequestInspection != null && { - RequestInspection: se_RequestInspection(input.RequestInspection, context), - }), - ...(input.ResponseInspection != null && { - ResponseInspection: se_ResponseInspection(input.ResponseInspection, context), - }), - }; -}; +// se_AWSManagedRulesATPRuleSet omitted. + +// se_AWSManagedRulesBotControlRuleSet omitted. + +// se_BlockAction omitted. + +// se_Body omitted. /** - * serializeAws_json1_1AWSManagedRulesBotControlRuleSet + * serializeAws_json1_1ByteMatchStatement */ -const se_AWSManagedRulesBotControlRuleSet = (input: AWSManagedRulesBotControlRuleSet, context: __SerdeContext): any => { - return { - ...(input.InspectionLevel != null && { InspectionLevel: input.InspectionLevel }), - }; +const se_ByteMatchStatement = (input: ByteMatchStatement, context: __SerdeContext): any => { + return take(input, { + FieldToMatch: _json, + PositionalConstraint: [], + SearchString: context.base64Encoder, + TextTransformations: _json, + }); }; +// se_CaptchaAction omitted. + +// se_CaptchaConfig omitted. + +// se_ChallengeAction omitted. + +// se_ChallengeConfig omitted. + /** - * serializeAws_json1_1BlockAction + * serializeAws_json1_1CheckCapacityRequest */ -const se_BlockAction = (input: BlockAction, context: __SerdeContext): any => { - return { - ...(input.CustomResponse != null && { CustomResponse: se_CustomResponse(input.CustomResponse, context) }), - }; +const se_CheckCapacityRequest = (input: CheckCapacityRequest, context: __SerdeContext): any => { + return take(input, { + Rules: (_) => se_Rules(_, context), + Scope: [], + }); }; +// se_Condition omitted. + +// se_Conditions omitted. + +// se_CookieMatchPattern omitted. + +// se_CookieNames omitted. + +// se_Cookies omitted. + +// se_CountAction omitted. + +// se_CountryCodes omitted. + +// se_CreateIPSetRequest omitted. + +// se_CreateRegexPatternSetRequest omitted. + /** - * serializeAws_json1_1Body + * serializeAws_json1_1CreateRuleGroupRequest */ -const se_Body = (input: Body, context: __SerdeContext): any => { - return { - ...(input.OversizeHandling != null && { OversizeHandling: input.OversizeHandling }), - }; +const se_CreateRuleGroupRequest = (input: CreateRuleGroupRequest, context: __SerdeContext): any => { + return take(input, { + Capacity: [], + CustomResponseBodies: _json, + Description: [], + Name: [], + Rules: (_) => se_Rules(_, context), + Scope: [], + Tags: _json, + VisibilityConfig: _json, + }); }; /** - * serializeAws_json1_1ByteMatchStatement + * serializeAws_json1_1CreateWebACLRequest */ -const se_ByteMatchStatement = (input: ByteMatchStatement, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.PositionalConstraint != null && { PositionalConstraint: input.PositionalConstraint }), - ...(input.SearchString != null && { SearchString: context.base64Encoder(input.SearchString) }), - ...(input.TextTransformations != null && { - TextTransformations: se_TextTransformations(input.TextTransformations, context), - }), - }; +const se_CreateWebACLRequest = (input: CreateWebACLRequest, context: __SerdeContext): any => { + return take(input, { + AssociationConfig: _json, + CaptchaConfig: _json, + ChallengeConfig: _json, + CustomResponseBodies: _json, + DefaultAction: _json, + Description: [], + Name: [], + Rules: (_) => se_Rules(_, context), + Scope: [], + Tags: _json, + TokenDomains: _json, + VisibilityConfig: _json, + }); }; +// se_CustomHTTPHeader omitted. + +// se_CustomHTTPHeaders omitted. + +// se_CustomRequestHandling omitted. + +// se_CustomResponse omitted. + +// se_CustomResponseBodies omitted. + +// se_CustomResponseBody omitted. + +// se_DefaultAction omitted. + +// se_DeleteFirewallManagerRuleGroupsRequest omitted. + +// se_DeleteIPSetRequest omitted. + +// se_DeleteLoggingConfigurationRequest omitted. + +// se_DeletePermissionPolicyRequest omitted. + +// se_DeleteRegexPatternSetRequest omitted. + +// se_DeleteRuleGroupRequest omitted. + +// se_DeleteWebACLRequest omitted. + +// se_DescribeManagedRuleGroupRequest omitted. + +// se_DisassociateWebACLRequest omitted. + +// se_ExcludedRule omitted. + +// se_ExcludedRules omitted. + +// se_FieldToMatch omitted. + +// se_Filter omitted. + +// se_Filters omitted. + +// se_ForwardedIPConfig omitted. + +// se_GenerateMobileSdkReleaseUrlRequest omitted. + +// se_GeoMatchStatement omitted. + +// se_GetIPSetRequest omitted. + +// se_GetLoggingConfigurationRequest omitted. + +// se_GetManagedRuleSetRequest omitted. + +// se_GetMobileSdkReleaseRequest omitted. + +// se_GetPermissionPolicyRequest omitted. + +// se_GetRateBasedStatementManagedKeysRequest omitted. + +// se_GetRegexPatternSetRequest omitted. + +// se_GetRuleGroupRequest omitted. + /** - * serializeAws_json1_1CaptchaAction + * serializeAws_json1_1GetSampledRequestsRequest */ -const se_CaptchaAction = (input: CaptchaAction, context: __SerdeContext): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_CustomRequestHandling(input.CustomRequestHandling, context), - }), - }; +const se_GetSampledRequestsRequest = (input: GetSampledRequestsRequest, context: __SerdeContext): any => { + return take(input, { + MaxItems: [], + RuleMetricName: [], + Scope: [], + TimeWindow: (_) => se_TimeWindow(_, context), + WebAclArn: [], + }); }; +// se_GetWebACLForResourceRequest omitted. + +// se_GetWebACLRequest omitted. + +// se_HeaderMatchPattern omitted. + +// se_HeaderNames omitted. + +// se_Headers omitted. + +// se_ImmunityTimeProperty omitted. + +// se_IPAddresses omitted. + +// se_IPSetForwardedIPConfig omitted. + +// se_IPSetReferenceStatement omitted. + +// se_JsonBody omitted. + +// se_JsonMatchPattern omitted. + +// se_JsonPointerPaths omitted. + +// se_Label omitted. + +// se_LabelMatchStatement omitted. + +// se_LabelNameCondition omitted. + +// se_Labels omitted. + +// se_ListAvailableManagedRuleGroupsRequest omitted. + +// se_ListAvailableManagedRuleGroupVersionsRequest omitted. + +// se_ListIPSetsRequest omitted. + +// se_ListLoggingConfigurationsRequest omitted. + +// se_ListManagedRuleSetsRequest omitted. + +// se_ListMobileSdkReleasesRequest omitted. + +// se_ListRegexPatternSetsRequest omitted. + +// se_ListResourcesForWebACLRequest omitted. + +// se_ListRuleGroupsRequest omitted. + +// se_ListTagsForResourceRequest omitted. + +// se_ListWebACLsRequest omitted. + +// se_LogDestinationConfigs omitted. + +// se_LoggingConfiguration omitted. + +// se_LoggingFilter omitted. + +// se_ManagedRuleGroupConfig omitted. + +// se_ManagedRuleGroupConfigs omitted. + /** - * serializeAws_json1_1CaptchaConfig + * serializeAws_json1_1ManagedRuleGroupStatement */ -const se_CaptchaConfig = (input: CaptchaConfig, context: __SerdeContext): any => { - return { - ...(input.ImmunityTimeProperty != null && { - ImmunityTimeProperty: se_ImmunityTimeProperty(input.ImmunityTimeProperty, context), - }), - }; +const se_ManagedRuleGroupStatement = (input: ManagedRuleGroupStatement, context: __SerdeContext): any => { + return take(input, { + ExcludedRules: _json, + ManagedRuleGroupConfigs: _json, + Name: [], + RuleActionOverrides: _json, + ScopeDownStatement: (_) => se_Statement(_, context), + VendorName: [], + Version: [], + }); }; +// se_Method omitted. + +// se_NoneAction omitted. + /** - * serializeAws_json1_1ChallengeAction + * serializeAws_json1_1NotStatement */ -const se_ChallengeAction = (input: ChallengeAction, context: __SerdeContext): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_CustomRequestHandling(input.CustomRequestHandling, context), - }), - }; +const se_NotStatement = (input: NotStatement, context: __SerdeContext): any => { + return take(input, { + Statement: (_) => se_Statement(_, context), + }); }; /** - * serializeAws_json1_1ChallengeConfig + * serializeAws_json1_1OrStatement */ -const se_ChallengeConfig = (input: ChallengeConfig, context: __SerdeContext): any => { - return { - ...(input.ImmunityTimeProperty != null && { - ImmunityTimeProperty: se_ImmunityTimeProperty(input.ImmunityTimeProperty, context), - }), - }; +const se_OrStatement = (input: OrStatement, context: __SerdeContext): any => { + return take(input, { + Statements: (_) => se_Statements(_, context), + }); }; +// se_OverrideAction omitted. + +// se_PasswordField omitted. + +// se_PutLoggingConfigurationRequest omitted. + +// se_PutManagedRuleSetVersionsRequest omitted. + +// se_PutPermissionPolicyRequest omitted. + +// se_QueryString omitted. + /** - * serializeAws_json1_1CheckCapacityRequest + * serializeAws_json1_1RateBasedStatement */ -const se_CheckCapacityRequest = (input: CheckCapacityRequest, context: __SerdeContext): any => { - return { - ...(input.Rules != null && { Rules: se_Rules(input.Rules, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - }; +const se_RateBasedStatement = (input: RateBasedStatement, context: __SerdeContext): any => { + return take(input, { + AggregateKeyType: [], + ForwardedIPConfig: _json, + Limit: [], + ScopeDownStatement: (_) => se_Statement(_, context), + }); }; +// se_RedactedFields omitted. + +// se_Regex omitted. + +// se_RegexMatchStatement omitted. + +// se_RegexPatternSetReferenceStatement omitted. + +// se_RegularExpressionList omitted. + +// se_RequestBody omitted. + +// se_RequestBodyAssociatedResourceTypeConfig omitted. + +// se_RequestInspection omitted. + +// se_ResponseInspection omitted. + +// se_ResponseInspectionBodyContains omitted. + +// se_ResponseInspectionBodyContainsFailureStrings omitted. + +// se_ResponseInspectionBodyContainsSuccessStrings omitted. + +// se_ResponseInspectionHeader omitted. + +// se_ResponseInspectionHeaderFailureValues omitted. + +// se_ResponseInspectionHeaderSuccessValues omitted. + +// se_ResponseInspectionJson omitted. + +// se_ResponseInspectionJsonFailureValues omitted. + +// se_ResponseInspectionJsonSuccessValues omitted. + +// se_ResponseInspectionStatusCode omitted. + +// se_ResponseInspectionStatusCodeFailureCodes omitted. + +// se_ResponseInspectionStatusCodeSuccessCodes omitted. + /** - * serializeAws_json1_1Condition + * serializeAws_json1_1Rule */ -const se_Condition = (input: Condition, context: __SerdeContext): any => { - return { - ...(input.ActionCondition != null && { ActionCondition: se_ActionCondition(input.ActionCondition, context) }), - ...(input.LabelNameCondition != null && { - LabelNameCondition: se_LabelNameCondition(input.LabelNameCondition, context), - }), - }; +const se_Rule = (input: Rule, context: __SerdeContext): any => { + return take(input, { + Action: _json, + CaptchaConfig: _json, + ChallengeConfig: _json, + Name: [], + OverrideAction: _json, + Priority: [], + RuleLabels: _json, + Statement: (_) => se_Statement(_, context), + VisibilityConfig: _json, + }); }; +// se_RuleAction omitted. + +// se_RuleActionOverride omitted. + +// se_RuleActionOverrides omitted. + +// se_RuleGroupReferenceStatement omitted. + /** - * serializeAws_json1_1Conditions + * serializeAws_json1_1Rules */ -const se_Conditions = (input: Condition[], context: __SerdeContext): any => { +const se_Rules = (input: Rule[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return se_Condition(entry, context); + return se_Rule(entry, context); }); }; +// se_SingleHeader omitted. + +// se_SingleQueryArgument omitted. + +// se_SizeConstraintStatement omitted. + +// se_SqliMatchStatement omitted. + /** - * serializeAws_json1_1CookieMatchPattern + * serializeAws_json1_1Statement */ -const se_CookieMatchPattern = (input: CookieMatchPattern, context: __SerdeContext): any => { - return { - ...(input.All != null && { All: se_All(input.All, context) }), - ...(input.ExcludedCookies != null && { ExcludedCookies: se_CookieNames(input.ExcludedCookies, context) }), - ...(input.IncludedCookies != null && { IncludedCookies: se_CookieNames(input.IncludedCookies, context) }), - }; +const se_Statement = (input: Statement, context: __SerdeContext): any => { + return take(input, { + AndStatement: (_) => se_AndStatement(_, context), + ByteMatchStatement: (_) => se_ByteMatchStatement(_, context), + GeoMatchStatement: _json, + IPSetReferenceStatement: _json, + LabelMatchStatement: _json, + ManagedRuleGroupStatement: (_) => se_ManagedRuleGroupStatement(_, context), + NotStatement: (_) => se_NotStatement(_, context), + OrStatement: (_) => se_OrStatement(_, context), + RateBasedStatement: (_) => se_RateBasedStatement(_, context), + RegexMatchStatement: _json, + RegexPatternSetReferenceStatement: _json, + RuleGroupReferenceStatement: _json, + SizeConstraintStatement: _json, + SqliMatchStatement: _json, + XssMatchStatement: _json, + }); }; /** - * serializeAws_json1_1CookieNames + * serializeAws_json1_1Statements */ -const se_CookieNames = (input: string[], context: __SerdeContext): any => { +const se_Statements = (input: Statement[], context: __SerdeContext): any => { return input .filter((e: any) => e != null) .map((entry) => { - return entry; + return se_Statement(entry, context); }); }; -/** - * serializeAws_json1_1Cookies - */ -const se_Cookies = (input: Cookies, context: __SerdeContext): any => { - return { - ...(input.MatchPattern != null && { MatchPattern: se_CookieMatchPattern(input.MatchPattern, context) }), - ...(input.MatchScope != null && { MatchScope: input.MatchScope }), - ...(input.OversizeHandling != null && { OversizeHandling: input.OversizeHandling }), - }; -}; +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_TextTransformation omitted. + +// se_TextTransformations omitted. /** - * serializeAws_json1_1CountAction + * serializeAws_json1_1TimeWindow */ -const se_CountAction = (input: CountAction, context: __SerdeContext): any => { - return { - ...(input.CustomRequestHandling != null && { - CustomRequestHandling: se_CustomRequestHandling(input.CustomRequestHandling, context), - }), - }; +const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + StartTime: (_) => Math.round(_.getTime() / 1000), + }); }; +// se_TokenDomains omitted. + +// se_UntagResourceRequest omitted. + +// se_UpdateIPSetRequest omitted. + /** - * serializeAws_json1_1CountryCodes + * serializeAws_json1_1UpdateManagedRuleSetVersionExpiryDateRequest */ -const se_CountryCodes = (input: (CountryCode | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_UpdateManagedRuleSetVersionExpiryDateRequest = ( + input: UpdateManagedRuleSetVersionExpiryDateRequest, + context: __SerdeContext +): any => { + return take(input, { + ExpiryTimestamp: (_) => Math.round(_.getTime() / 1000), + Id: [], + LockToken: [], + Name: [], + Scope: [], + VersionToExpire: [], + }); }; +// se_UpdateRegexPatternSetRequest omitted. + /** - * serializeAws_json1_1CreateIPSetRequest + * serializeAws_json1_1UpdateRuleGroupRequest */ -const se_CreateIPSetRequest = (input: CreateIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.Addresses != null && { Addresses: se_IPAddresses(input.Addresses, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.IPAddressVersion != null && { IPAddressVersion: input.IPAddressVersion }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; +const se_UpdateRuleGroupRequest = (input: UpdateRuleGroupRequest, context: __SerdeContext): any => { + return take(input, { + CustomResponseBodies: _json, + Description: [], + Id: [], + LockToken: [], + Name: [], + Rules: (_) => se_Rules(_, context), + Scope: [], + VisibilityConfig: _json, + }); }; /** - * serializeAws_json1_1CreateRegexPatternSetRequest + * serializeAws_json1_1UpdateWebACLRequest */ -const se_CreateRegexPatternSetRequest = (input: CreateRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RegularExpressionList != null && { - RegularExpressionList: se_RegularExpressionList(input.RegularExpressionList, context), - }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; +const se_UpdateWebACLRequest = (input: UpdateWebACLRequest, context: __SerdeContext): any => { + return take(input, { + AssociationConfig: _json, + CaptchaConfig: _json, + ChallengeConfig: _json, + CustomResponseBodies: _json, + DefaultAction: _json, + Description: [], + Id: [], + LockToken: [], + Name: [], + Rules: (_) => se_Rules(_, context), + Scope: [], + TokenDomains: _json, + VisibilityConfig: _json, + }); }; -/** - * serializeAws_json1_1CreateRuleGroupRequest - */ -const se_CreateRuleGroupRequest = (input: CreateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Capacity != null && { Capacity: input.Capacity }), - ...(input.CustomResponseBodies != null && { - CustomResponseBodies: se_CustomResponseBodies(input.CustomResponseBodies, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_Rules(input.Rules, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VisibilityConfig != null && { VisibilityConfig: se_VisibilityConfig(input.VisibilityConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1CreateWebACLRequest - */ -const se_CreateWebACLRequest = (input: CreateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationConfig != null && { - AssociationConfig: se_AssociationConfig(input.AssociationConfig, context), - }), - ...(input.CaptchaConfig != null && { CaptchaConfig: se_CaptchaConfig(input.CaptchaConfig, context) }), - ...(input.ChallengeConfig != null && { ChallengeConfig: se_ChallengeConfig(input.ChallengeConfig, context) }), - ...(input.CustomResponseBodies != null && { - CustomResponseBodies: se_CustomResponseBodies(input.CustomResponseBodies, context), - }), - ...(input.DefaultAction != null && { DefaultAction: se_DefaultAction(input.DefaultAction, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_Rules(input.Rules, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.TokenDomains != null && { TokenDomains: se_TokenDomains(input.TokenDomains, context) }), - ...(input.VisibilityConfig != null && { VisibilityConfig: se_VisibilityConfig(input.VisibilityConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1CustomHTTPHeader - */ -const se_CustomHTTPHeader = (input: CustomHTTPHeader, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1CustomHTTPHeaders - */ -const se_CustomHTTPHeaders = (input: CustomHTTPHeader[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_CustomHTTPHeader(entry, context); - }); -}; - -/** - * serializeAws_json1_1CustomRequestHandling - */ -const se_CustomRequestHandling = (input: CustomRequestHandling, context: __SerdeContext): any => { - return { - ...(input.InsertHeaders != null && { InsertHeaders: se_CustomHTTPHeaders(input.InsertHeaders, context) }), - }; -}; - -/** - * serializeAws_json1_1CustomResponse - */ -const se_CustomResponse = (input: CustomResponse, context: __SerdeContext): any => { - return { - ...(input.CustomResponseBodyKey != null && { CustomResponseBodyKey: input.CustomResponseBodyKey }), - ...(input.ResponseCode != null && { ResponseCode: input.ResponseCode }), - ...(input.ResponseHeaders != null && { ResponseHeaders: se_CustomHTTPHeaders(input.ResponseHeaders, context) }), - }; -}; - -/** - * serializeAws_json1_1CustomResponseBodies - */ -const se_CustomResponseBodies = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_CustomResponseBody(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1CustomResponseBody - */ -const se_CustomResponseBody = (input: CustomResponseBody, context: __SerdeContext): any => { - return { - ...(input.Content != null && { Content: input.Content }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - }; -}; - -/** - * serializeAws_json1_1DefaultAction - */ -const se_DefaultAction = (input: DefaultAction, context: __SerdeContext): any => { - return { - ...(input.Allow != null && { Allow: se_AllowAction(input.Allow, context) }), - ...(input.Block != null && { Block: se_BlockAction(input.Block, context) }), - }; -}; - -/** - * serializeAws_json1_1DeleteFirewallManagerRuleGroupsRequest - */ -const se_DeleteFirewallManagerRuleGroupsRequest = ( - input: DeleteFirewallManagerRuleGroupsRequest, - context: __SerdeContext -): any => { - return { - ...(input.WebACLArn != null && { WebACLArn: input.WebACLArn }), - ...(input.WebACLLockToken != null && { WebACLLockToken: input.WebACLLockToken }), - }; -}; - -/** - * serializeAws_json1_1DeleteIPSetRequest - */ -const se_DeleteIPSetRequest = (input: DeleteIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1DeleteLoggingConfigurationRequest - */ -const se_DeleteLoggingConfigurationRequest = ( - input: DeleteLoggingConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1DeletePermissionPolicyRequest - */ -const se_DeletePermissionPolicyRequest = (input: DeletePermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1DeleteRegexPatternSetRequest - */ -const se_DeleteRegexPatternSetRequest = (input: DeleteRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1DeleteRuleGroupRequest - */ -const se_DeleteRuleGroupRequest = (input: DeleteRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1DeleteWebACLRequest - */ -const se_DeleteWebACLRequest = (input: DeleteWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1DescribeManagedRuleGroupRequest - */ -const se_DescribeManagedRuleGroupRequest = (input: DescribeManagedRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.VendorName != null && { VendorName: input.VendorName }), - ...(input.VersionName != null && { VersionName: input.VersionName }), - }; -}; - -/** - * serializeAws_json1_1DisassociateWebACLRequest - */ -const se_DisassociateWebACLRequest = (input: DisassociateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1ExcludedRule - */ -const se_ExcludedRule = (input: ExcludedRule, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1ExcludedRules - */ -const se_ExcludedRules = (input: ExcludedRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ExcludedRule(entry, context); - }); -}; - -/** - * serializeAws_json1_1FieldToMatch - */ -const se_FieldToMatch = (input: FieldToMatch, context: __SerdeContext): any => { - return { - ...(input.AllQueryArguments != null && { - AllQueryArguments: se_AllQueryArguments(input.AllQueryArguments, context), - }), - ...(input.Body != null && { Body: se_Body(input.Body, context) }), - ...(input.Cookies != null && { Cookies: se_Cookies(input.Cookies, context) }), - ...(input.Headers != null && { Headers: se_Headers(input.Headers, context) }), - ...(input.JsonBody != null && { JsonBody: se_JsonBody(input.JsonBody, context) }), - ...(input.Method != null && { Method: se_Method(input.Method, context) }), - ...(input.QueryString != null && { QueryString: se_QueryString(input.QueryString, context) }), - ...(input.SingleHeader != null && { SingleHeader: se_SingleHeader(input.SingleHeader, context) }), - ...(input.SingleQueryArgument != null && { - SingleQueryArgument: se_SingleQueryArgument(input.SingleQueryArgument, context), - }), - ...(input.UriPath != null && { UriPath: se_UriPath(input.UriPath, context) }), - }; -}; - -/** - * serializeAws_json1_1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.Behavior != null && { Behavior: input.Behavior }), - ...(input.Conditions != null && { Conditions: se_Conditions(input.Conditions, context) }), - ...(input.Requirement != null && { Requirement: input.Requirement }), - }; -}; - -/** - * serializeAws_json1_1Filters - */ -const se_Filters = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; - -/** - * serializeAws_json1_1ForwardedIPConfig - */ -const se_ForwardedIPConfig = (input: ForwardedIPConfig, context: __SerdeContext): any => { - return { - ...(input.FallbackBehavior != null && { FallbackBehavior: input.FallbackBehavior }), - ...(input.HeaderName != null && { HeaderName: input.HeaderName }), - }; -}; - -/** - * serializeAws_json1_1GenerateMobileSdkReleaseUrlRequest - */ -const se_GenerateMobileSdkReleaseUrlRequest = ( - input: GenerateMobileSdkReleaseUrlRequest, - context: __SerdeContext -): any => { - return { - ...(input.Platform != null && { Platform: input.Platform }), - ...(input.ReleaseVersion != null && { ReleaseVersion: input.ReleaseVersion }), - }; -}; - -/** - * serializeAws_json1_1GeoMatchStatement - */ -const se_GeoMatchStatement = (input: GeoMatchStatement, context: __SerdeContext): any => { - return { - ...(input.CountryCodes != null && { CountryCodes: se_CountryCodes(input.CountryCodes, context) }), - ...(input.ForwardedIPConfig != null && { - ForwardedIPConfig: se_ForwardedIPConfig(input.ForwardedIPConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1GetIPSetRequest - */ -const se_GetIPSetRequest = (input: GetIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1GetLoggingConfigurationRequest - */ -const se_GetLoggingConfigurationRequest = (input: GetLoggingConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1GetManagedRuleSetRequest - */ -const se_GetManagedRuleSetRequest = (input: GetManagedRuleSetRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1GetMobileSdkReleaseRequest - */ -const se_GetMobileSdkReleaseRequest = (input: GetMobileSdkReleaseRequest, context: __SerdeContext): any => { - return { - ...(input.Platform != null && { Platform: input.Platform }), - ...(input.ReleaseVersion != null && { ReleaseVersion: input.ReleaseVersion }), - }; -}; - -/** - * serializeAws_json1_1GetPermissionPolicyRequest - */ -const se_GetPermissionPolicyRequest = (input: GetPermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1GetRateBasedStatementManagedKeysRequest - */ -const se_GetRateBasedStatementManagedKeysRequest = ( - input: GetRateBasedStatementManagedKeysRequest, - context: __SerdeContext -): any => { - return { - ...(input.RuleGroupRuleName != null && { RuleGroupRuleName: input.RuleGroupRuleName }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.WebACLId != null && { WebACLId: input.WebACLId }), - ...(input.WebACLName != null && { WebACLName: input.WebACLName }), - }; -}; - -/** - * serializeAws_json1_1GetRegexPatternSetRequest - */ -const se_GetRegexPatternSetRequest = (input: GetRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1GetRuleGroupRequest - */ -const se_GetRuleGroupRequest = (input: GetRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1GetSampledRequestsRequest - */ -const se_GetSampledRequestsRequest = (input: GetSampledRequestsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxItems != null && { MaxItems: input.MaxItems }), - ...(input.RuleMetricName != null && { RuleMetricName: input.RuleMetricName }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.TimeWindow != null && { TimeWindow: se_TimeWindow(input.TimeWindow, context) }), - ...(input.WebAclArn != null && { WebAclArn: input.WebAclArn }), - }; -}; - -/** - * serializeAws_json1_1GetWebACLForResourceRequest - */ -const se_GetWebACLForResourceRequest = (input: GetWebACLForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1GetWebACLRequest - */ -const se_GetWebACLRequest = (input: GetWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1HeaderMatchPattern - */ -const se_HeaderMatchPattern = (input: HeaderMatchPattern, context: __SerdeContext): any => { - return { - ...(input.All != null && { All: se_All(input.All, context) }), - ...(input.ExcludedHeaders != null && { ExcludedHeaders: se_HeaderNames(input.ExcludedHeaders, context) }), - ...(input.IncludedHeaders != null && { IncludedHeaders: se_HeaderNames(input.IncludedHeaders, context) }), - }; -}; - -/** - * serializeAws_json1_1HeaderNames - */ -const se_HeaderNames = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Headers - */ -const se_Headers = (input: Headers, context: __SerdeContext): any => { - return { - ...(input.MatchPattern != null && { MatchPattern: se_HeaderMatchPattern(input.MatchPattern, context) }), - ...(input.MatchScope != null && { MatchScope: input.MatchScope }), - ...(input.OversizeHandling != null && { OversizeHandling: input.OversizeHandling }), - }; -}; - -/** - * serializeAws_json1_1ImmunityTimeProperty - */ -const se_ImmunityTimeProperty = (input: ImmunityTimeProperty, context: __SerdeContext): any => { - return { - ...(input.ImmunityTime != null && { ImmunityTime: input.ImmunityTime }), - }; -}; - -/** - * serializeAws_json1_1IPAddresses - */ -const se_IPAddresses = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1IPSetForwardedIPConfig - */ -const se_IPSetForwardedIPConfig = (input: IPSetForwardedIPConfig, context: __SerdeContext): any => { - return { - ...(input.FallbackBehavior != null && { FallbackBehavior: input.FallbackBehavior }), - ...(input.HeaderName != null && { HeaderName: input.HeaderName }), - ...(input.Position != null && { Position: input.Position }), - }; -}; - -/** - * serializeAws_json1_1IPSetReferenceStatement - */ -const se_IPSetReferenceStatement = (input: IPSetReferenceStatement, context: __SerdeContext): any => { - return { - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.IPSetForwardedIPConfig != null && { - IPSetForwardedIPConfig: se_IPSetForwardedIPConfig(input.IPSetForwardedIPConfig, context), - }), - }; -}; - -/** - * serializeAws_json1_1JsonBody - */ -const se_JsonBody = (input: JsonBody, context: __SerdeContext): any => { - return { - ...(input.InvalidFallbackBehavior != null && { InvalidFallbackBehavior: input.InvalidFallbackBehavior }), - ...(input.MatchPattern != null && { MatchPattern: se_JsonMatchPattern(input.MatchPattern, context) }), - ...(input.MatchScope != null && { MatchScope: input.MatchScope }), - ...(input.OversizeHandling != null && { OversizeHandling: input.OversizeHandling }), - }; -}; - -/** - * serializeAws_json1_1JsonMatchPattern - */ -const se_JsonMatchPattern = (input: JsonMatchPattern, context: __SerdeContext): any => { - return { - ...(input.All != null && { All: se_All(input.All, context) }), - ...(input.IncludedPaths != null && { IncludedPaths: se_JsonPointerPaths(input.IncludedPaths, context) }), - }; -}; - -/** - * serializeAws_json1_1JsonPointerPaths - */ -const se_JsonPointerPaths = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Label - */ -const se_Label = (input: Label, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1LabelMatchStatement - */ -const se_LabelMatchStatement = (input: LabelMatchStatement, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1LabelNameCondition - */ -const se_LabelNameCondition = (input: LabelNameCondition, context: __SerdeContext): any => { - return { - ...(input.LabelName != null && { LabelName: input.LabelName }), - }; -}; - -/** - * serializeAws_json1_1Labels - */ -const se_Labels = (input: Label[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Label(entry, context); - }); -}; - -/** - * serializeAws_json1_1ListAvailableManagedRuleGroupsRequest - */ -const se_ListAvailableManagedRuleGroupsRequest = ( - input: ListAvailableManagedRuleGroupsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1ListAvailableManagedRuleGroupVersionsRequest - */ -const se_ListAvailableManagedRuleGroupVersionsRequest = ( - input: ListAvailableManagedRuleGroupVersionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.VendorName != null && { VendorName: input.VendorName }), - }; -}; - -/** - * serializeAws_json1_1ListIPSetsRequest - */ -const se_ListIPSetsRequest = (input: ListIPSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1ListLoggingConfigurationsRequest - */ -const se_ListLoggingConfigurationsRequest = (input: ListLoggingConfigurationsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1ListManagedRuleSetsRequest - */ -const se_ListManagedRuleSetsRequest = (input: ListManagedRuleSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1ListMobileSdkReleasesRequest - */ -const se_ListMobileSdkReleasesRequest = (input: ListMobileSdkReleasesRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Platform != null && { Platform: input.Platform }), - }; -}; - -/** - * serializeAws_json1_1ListRegexPatternSetsRequest - */ -const se_ListRegexPatternSetsRequest = (input: ListRegexPatternSetsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1ListResourcesForWebACLRequest - */ -const se_ListResourcesForWebACLRequest = (input: ListResourcesForWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceType != null && { ResourceType: input.ResourceType }), - ...(input.WebACLArn != null && { WebACLArn: input.WebACLArn }), - }; -}; - -/** - * serializeAws_json1_1ListRuleGroupsRequest - */ -const se_ListRuleGroupsRequest = (input: ListRuleGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; - -/** - * serializeAws_json1_1ListWebACLsRequest - */ -const se_ListWebACLsRequest = (input: ListWebACLsRequest, context: __SerdeContext): any => { - return { - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextMarker != null && { NextMarker: input.NextMarker }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1LogDestinationConfigs - */ -const se_LogDestinationConfigs = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1LoggingConfiguration - */ -const se_LoggingConfiguration = (input: LoggingConfiguration, context: __SerdeContext): any => { - return { - ...(input.LogDestinationConfigs != null && { - LogDestinationConfigs: se_LogDestinationConfigs(input.LogDestinationConfigs, context), - }), - ...(input.LoggingFilter != null && { LoggingFilter: se_LoggingFilter(input.LoggingFilter, context) }), - ...(input.ManagedByFirewallManager != null && { ManagedByFirewallManager: input.ManagedByFirewallManager }), - ...(input.RedactedFields != null && { RedactedFields: se_RedactedFields(input.RedactedFields, context) }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1LoggingFilter - */ -const se_LoggingFilter = (input: LoggingFilter, context: __SerdeContext): any => { - return { - ...(input.DefaultBehavior != null && { DefaultBehavior: input.DefaultBehavior }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - }; -}; - -/** - * serializeAws_json1_1ManagedRuleGroupConfig - */ -const se_ManagedRuleGroupConfig = (input: ManagedRuleGroupConfig, context: __SerdeContext): any => { - return { - ...(input.AWSManagedRulesATPRuleSet != null && { - AWSManagedRulesATPRuleSet: se_AWSManagedRulesATPRuleSet(input.AWSManagedRulesATPRuleSet, context), - }), - ...(input.AWSManagedRulesBotControlRuleSet != null && { - AWSManagedRulesBotControlRuleSet: se_AWSManagedRulesBotControlRuleSet( - input.AWSManagedRulesBotControlRuleSet, - context - ), - }), - ...(input.LoginPath != null && { LoginPath: input.LoginPath }), - ...(input.PasswordField != null && { PasswordField: se_PasswordField(input.PasswordField, context) }), - ...(input.PayloadType != null && { PayloadType: input.PayloadType }), - ...(input.UsernameField != null && { UsernameField: se_UsernameField(input.UsernameField, context) }), - }; -}; - -/** - * serializeAws_json1_1ManagedRuleGroupConfigs - */ -const se_ManagedRuleGroupConfigs = (input: ManagedRuleGroupConfig[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ManagedRuleGroupConfig(entry, context); - }); -}; - -/** - * serializeAws_json1_1ManagedRuleGroupStatement - */ -const se_ManagedRuleGroupStatement = (input: ManagedRuleGroupStatement, context: __SerdeContext): any => { - return { - ...(input.ExcludedRules != null && { ExcludedRules: se_ExcludedRules(input.ExcludedRules, context) }), - ...(input.ManagedRuleGroupConfigs != null && { - ManagedRuleGroupConfigs: se_ManagedRuleGroupConfigs(input.ManagedRuleGroupConfigs, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RuleActionOverrides != null && { - RuleActionOverrides: se_RuleActionOverrides(input.RuleActionOverrides, context), - }), - ...(input.ScopeDownStatement != null && { ScopeDownStatement: se_Statement(input.ScopeDownStatement, context) }), - ...(input.VendorName != null && { VendorName: input.VendorName }), - ...(input.Version != null && { Version: input.Version }), - }; -}; - -/** - * serializeAws_json1_1Method - */ -const se_Method = (input: Method, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1NoneAction - */ -const se_NoneAction = (input: NoneAction, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1NotStatement - */ -const se_NotStatement = (input: NotStatement, context: __SerdeContext): any => { - return { - ...(input.Statement != null && { Statement: se_Statement(input.Statement, context) }), - }; -}; - -/** - * serializeAws_json1_1OrStatement - */ -const se_OrStatement = (input: OrStatement, context: __SerdeContext): any => { - return { - ...(input.Statements != null && { Statements: se_Statements(input.Statements, context) }), - }; -}; - -/** - * serializeAws_json1_1OverrideAction - */ -const se_OverrideAction = (input: OverrideAction, context: __SerdeContext): any => { - return { - ...(input.Count != null && { Count: se_CountAction(input.Count, context) }), - ...(input.None != null && { None: se_NoneAction(input.None, context) }), - }; -}; - -/** - * serializeAws_json1_1PasswordField - */ -const se_PasswordField = (input: PasswordField, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - }; -}; - -/** - * serializeAws_json1_1PutLoggingConfigurationRequest - */ -const se_PutLoggingConfigurationRequest = (input: PutLoggingConfigurationRequest, context: __SerdeContext): any => { - return { - ...(input.LoggingConfiguration != null && { - LoggingConfiguration: se_LoggingConfiguration(input.LoggingConfiguration, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutManagedRuleSetVersionsRequest - */ -const se_PutManagedRuleSetVersionsRequest = (input: PutManagedRuleSetVersionsRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RecommendedVersion != null && { RecommendedVersion: input.RecommendedVersion }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.VersionsToPublish != null && { - VersionsToPublish: se_VersionsToPublish(input.VersionsToPublish, context), - }), - }; -}; - -/** - * serializeAws_json1_1PutPermissionPolicyRequest - */ -const se_PutPermissionPolicyRequest = (input: PutPermissionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Policy != null && { Policy: input.Policy }), - ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }), - }; -}; - -/** - * serializeAws_json1_1QueryString - */ -const se_QueryString = (input: QueryString, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1RateBasedStatement - */ -const se_RateBasedStatement = (input: RateBasedStatement, context: __SerdeContext): any => { - return { - ...(input.AggregateKeyType != null && { AggregateKeyType: input.AggregateKeyType }), - ...(input.ForwardedIPConfig != null && { - ForwardedIPConfig: se_ForwardedIPConfig(input.ForwardedIPConfig, context), - }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.ScopeDownStatement != null && { ScopeDownStatement: se_Statement(input.ScopeDownStatement, context) }), - }; -}; - -/** - * serializeAws_json1_1RedactedFields - */ -const se_RedactedFields = (input: FieldToMatch[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FieldToMatch(entry, context); - }); -}; - -/** - * serializeAws_json1_1Regex - */ -const se_Regex = (input: Regex, context: __SerdeContext): any => { - return { - ...(input.RegexString != null && { RegexString: input.RegexString }), - }; -}; - -/** - * serializeAws_json1_1RegexMatchStatement - */ -const se_RegexMatchStatement = (input: RegexMatchStatement, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.RegexString != null && { RegexString: input.RegexString }), - ...(input.TextTransformations != null && { - TextTransformations: se_TextTransformations(input.TextTransformations, context), - }), - }; -}; - -/** - * serializeAws_json1_1RegexPatternSetReferenceStatement - */ -const se_RegexPatternSetReferenceStatement = ( - input: RegexPatternSetReferenceStatement, - context: __SerdeContext -): any => { - return { - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.TextTransformations != null && { - TextTransformations: se_TextTransformations(input.TextTransformations, context), - }), - }; -}; - -/** - * serializeAws_json1_1RegularExpressionList - */ -const se_RegularExpressionList = (input: Regex[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Regex(entry, context); - }); -}; - -/** - * serializeAws_json1_1RequestBody - */ -const se_RequestBody = ( - input: Record, - context: __SerdeContext -): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [AssociatedResourceType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_RequestBodyAssociatedResourceTypeConfig(value, context); - return acc; - }, - {} - ); -}; - -/** - * serializeAws_json1_1RequestBodyAssociatedResourceTypeConfig - */ -const se_RequestBodyAssociatedResourceTypeConfig = ( - input: RequestBodyAssociatedResourceTypeConfig, - context: __SerdeContext -): any => { - return { - ...(input.DefaultSizeInspectionLimit != null && { DefaultSizeInspectionLimit: input.DefaultSizeInspectionLimit }), - }; -}; - -/** - * serializeAws_json1_1RequestInspection - */ -const se_RequestInspection = (input: RequestInspection, context: __SerdeContext): any => { - return { - ...(input.PasswordField != null && { PasswordField: se_PasswordField(input.PasswordField, context) }), - ...(input.PayloadType != null && { PayloadType: input.PayloadType }), - ...(input.UsernameField != null && { UsernameField: se_UsernameField(input.UsernameField, context) }), - }; -}; - -/** - * serializeAws_json1_1ResponseInspection - */ -const se_ResponseInspection = (input: ResponseInspection, context: __SerdeContext): any => { - return { - ...(input.BodyContains != null && { BodyContains: se_ResponseInspectionBodyContains(input.BodyContains, context) }), - ...(input.Header != null && { Header: se_ResponseInspectionHeader(input.Header, context) }), - ...(input.Json != null && { Json: se_ResponseInspectionJson(input.Json, context) }), - ...(input.StatusCode != null && { StatusCode: se_ResponseInspectionStatusCode(input.StatusCode, context) }), - }; -}; - -/** - * serializeAws_json1_1ResponseInspectionBodyContains - */ -const se_ResponseInspectionBodyContains = (input: ResponseInspectionBodyContains, context: __SerdeContext): any => { - return { - ...(input.FailureStrings != null && { - FailureStrings: se_ResponseInspectionBodyContainsFailureStrings(input.FailureStrings, context), - }), - ...(input.SuccessStrings != null && { - SuccessStrings: se_ResponseInspectionBodyContainsSuccessStrings(input.SuccessStrings, context), - }), - }; -}; - -/** - * serializeAws_json1_1ResponseInspectionBodyContainsFailureStrings - */ -const se_ResponseInspectionBodyContainsFailureStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionBodyContainsSuccessStrings - */ -const se_ResponseInspectionBodyContainsSuccessStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionHeader - */ -const se_ResponseInspectionHeader = (input: ResponseInspectionHeader, context: __SerdeContext): any => { - return { - ...(input.FailureValues != null && { - FailureValues: se_ResponseInspectionHeaderFailureValues(input.FailureValues, context), - }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SuccessValues != null && { - SuccessValues: se_ResponseInspectionHeaderSuccessValues(input.SuccessValues, context), - }), - }; -}; - -/** - * serializeAws_json1_1ResponseInspectionHeaderFailureValues - */ -const se_ResponseInspectionHeaderFailureValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionHeaderSuccessValues - */ -const se_ResponseInspectionHeaderSuccessValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionJson - */ -const se_ResponseInspectionJson = (input: ResponseInspectionJson, context: __SerdeContext): any => { - return { - ...(input.FailureValues != null && { - FailureValues: se_ResponseInspectionJsonFailureValues(input.FailureValues, context), - }), - ...(input.Identifier != null && { Identifier: input.Identifier }), - ...(input.SuccessValues != null && { - SuccessValues: se_ResponseInspectionJsonSuccessValues(input.SuccessValues, context), - }), - }; -}; - -/** - * serializeAws_json1_1ResponseInspectionJsonFailureValues - */ -const se_ResponseInspectionJsonFailureValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionJsonSuccessValues - */ -const se_ResponseInspectionJsonSuccessValues = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionStatusCode - */ -const se_ResponseInspectionStatusCode = (input: ResponseInspectionStatusCode, context: __SerdeContext): any => { - return { - ...(input.FailureCodes != null && { - FailureCodes: se_ResponseInspectionStatusCodeFailureCodes(input.FailureCodes, context), - }), - ...(input.SuccessCodes != null && { - SuccessCodes: se_ResponseInspectionStatusCodeSuccessCodes(input.SuccessCodes, context), - }), - }; -}; - -/** - * serializeAws_json1_1ResponseInspectionStatusCodeFailureCodes - */ -const se_ResponseInspectionStatusCodeFailureCodes = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1ResponseInspectionStatusCodeSuccessCodes - */ -const se_ResponseInspectionStatusCodeSuccessCodes = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Rule - */ -const se_Rule = (input: Rule, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: se_RuleAction(input.Action, context) }), - ...(input.CaptchaConfig != null && { CaptchaConfig: se_CaptchaConfig(input.CaptchaConfig, context) }), - ...(input.ChallengeConfig != null && { ChallengeConfig: se_ChallengeConfig(input.ChallengeConfig, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OverrideAction != null && { OverrideAction: se_OverrideAction(input.OverrideAction, context) }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.RuleLabels != null && { RuleLabels: se_Labels(input.RuleLabels, context) }), - ...(input.Statement != null && { Statement: se_Statement(input.Statement, context) }), - ...(input.VisibilityConfig != null && { VisibilityConfig: se_VisibilityConfig(input.VisibilityConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1RuleAction - */ -const se_RuleAction = (input: RuleAction, context: __SerdeContext): any => { - return { - ...(input.Allow != null && { Allow: se_AllowAction(input.Allow, context) }), - ...(input.Block != null && { Block: se_BlockAction(input.Block, context) }), - ...(input.Captcha != null && { Captcha: se_CaptchaAction(input.Captcha, context) }), - ...(input.Challenge != null && { Challenge: se_ChallengeAction(input.Challenge, context) }), - ...(input.Count != null && { Count: se_CountAction(input.Count, context) }), - }; -}; - -/** - * serializeAws_json1_1RuleActionOverride - */ -const se_RuleActionOverride = (input: RuleActionOverride, context: __SerdeContext): any => { - return { - ...(input.ActionToUse != null && { ActionToUse: se_RuleAction(input.ActionToUse, context) }), - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1RuleActionOverrides - */ -const se_RuleActionOverrides = (input: RuleActionOverride[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RuleActionOverride(entry, context); - }); -}; - -/** - * serializeAws_json1_1RuleGroupReferenceStatement - */ -const se_RuleGroupReferenceStatement = (input: RuleGroupReferenceStatement, context: __SerdeContext): any => { - return { - ...(input.ARN != null && { ARN: input.ARN }), - ...(input.ExcludedRules != null && { ExcludedRules: se_ExcludedRules(input.ExcludedRules, context) }), - ...(input.RuleActionOverrides != null && { - RuleActionOverrides: se_RuleActionOverrides(input.RuleActionOverrides, context), - }), - }; -}; - -/** - * serializeAws_json1_1Rules - */ -const se_Rules = (input: Rule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Rule(entry, context); - }); -}; - -/** - * serializeAws_json1_1SingleHeader - */ -const se_SingleHeader = (input: SingleHeader, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SingleQueryArgument - */ -const se_SingleQueryArgument = (input: SingleQueryArgument, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; - -/** - * serializeAws_json1_1SizeConstraintStatement - */ -const se_SizeConstraintStatement = (input: SizeConstraintStatement, context: __SerdeContext): any => { - return { - ...(input.ComparisonOperator != null && { ComparisonOperator: input.ComparisonOperator }), - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.Size != null && { Size: input.Size }), - ...(input.TextTransformations != null && { - TextTransformations: se_TextTransformations(input.TextTransformations, context), - }), - }; -}; - -/** - * serializeAws_json1_1SqliMatchStatement - */ -const se_SqliMatchStatement = (input: SqliMatchStatement, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.SensitivityLevel != null && { SensitivityLevel: input.SensitivityLevel }), - ...(input.TextTransformations != null && { - TextTransformations: se_TextTransformations(input.TextTransformations, context), - }), - }; -}; - -/** - * serializeAws_json1_1Statement - */ -const se_Statement = (input: Statement, context: __SerdeContext): any => { - return { - ...(input.AndStatement != null && { AndStatement: se_AndStatement(input.AndStatement, context) }), - ...(input.ByteMatchStatement != null && { - ByteMatchStatement: se_ByteMatchStatement(input.ByteMatchStatement, context), - }), - ...(input.GeoMatchStatement != null && { - GeoMatchStatement: se_GeoMatchStatement(input.GeoMatchStatement, context), - }), - ...(input.IPSetReferenceStatement != null && { - IPSetReferenceStatement: se_IPSetReferenceStatement(input.IPSetReferenceStatement, context), - }), - ...(input.LabelMatchStatement != null && { - LabelMatchStatement: se_LabelMatchStatement(input.LabelMatchStatement, context), - }), - ...(input.ManagedRuleGroupStatement != null && { - ManagedRuleGroupStatement: se_ManagedRuleGroupStatement(input.ManagedRuleGroupStatement, context), - }), - ...(input.NotStatement != null && { NotStatement: se_NotStatement(input.NotStatement, context) }), - ...(input.OrStatement != null && { OrStatement: se_OrStatement(input.OrStatement, context) }), - ...(input.RateBasedStatement != null && { - RateBasedStatement: se_RateBasedStatement(input.RateBasedStatement, context), - }), - ...(input.RegexMatchStatement != null && { - RegexMatchStatement: se_RegexMatchStatement(input.RegexMatchStatement, context), - }), - ...(input.RegexPatternSetReferenceStatement != null && { - RegexPatternSetReferenceStatement: se_RegexPatternSetReferenceStatement( - input.RegexPatternSetReferenceStatement, - context - ), - }), - ...(input.RuleGroupReferenceStatement != null && { - RuleGroupReferenceStatement: se_RuleGroupReferenceStatement(input.RuleGroupReferenceStatement, context), - }), - ...(input.SizeConstraintStatement != null && { - SizeConstraintStatement: se_SizeConstraintStatement(input.SizeConstraintStatement, context), - }), - ...(input.SqliMatchStatement != null && { - SqliMatchStatement: se_SqliMatchStatement(input.SqliMatchStatement, context), - }), - ...(input.XssMatchStatement != null && { - XssMatchStatement: se_XssMatchStatement(input.XssMatchStatement, context), - }), - }; -}; - -/** - * serializeAws_json1_1Statements - */ -const se_Statements = (input: Statement[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Statement(entry, context); - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1TextTransformation - */ -const se_TextTransformation = (input: TextTransformation, context: __SerdeContext): any => { - return { - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1TextTransformations - */ -const se_TextTransformations = (input: TextTransformation[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TextTransformation(entry, context); - }); -}; - -/** - * serializeAws_json1_1TimeWindow - */ -const se_TimeWindow = (input: TimeWindow, context: __SerdeContext): any => { - return { - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }; -}; - -/** - * serializeAws_json1_1TokenDomains - */ -const se_TokenDomains = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateIPSetRequest - */ -const se_UpdateIPSetRequest = (input: UpdateIPSetRequest, context: __SerdeContext): any => { - return { - ...(input.Addresses != null && { Addresses: se_IPAddresses(input.Addresses, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1UpdateManagedRuleSetVersionExpiryDateRequest - */ -const se_UpdateManagedRuleSetVersionExpiryDateRequest = ( - input: UpdateManagedRuleSetVersionExpiryDateRequest, - context: __SerdeContext -): any => { - return { - ...(input.ExpiryTimestamp != null && { ExpiryTimestamp: Math.round(input.ExpiryTimestamp.getTime() / 1000) }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.VersionToExpire != null && { VersionToExpire: input.VersionToExpire }), - }; -}; - -/** - * serializeAws_json1_1UpdateRegexPatternSetRequest - */ -const se_UpdateRegexPatternSetRequest = (input: UpdateRegexPatternSetRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.RegularExpressionList != null && { - RegularExpressionList: se_RegularExpressionList(input.RegularExpressionList, context), - }), - ...(input.Scope != null && { Scope: input.Scope }), - }; -}; - -/** - * serializeAws_json1_1UpdateRuleGroupRequest - */ -const se_UpdateRuleGroupRequest = (input: UpdateRuleGroupRequest, context: __SerdeContext): any => { - return { - ...(input.CustomResponseBodies != null && { - CustomResponseBodies: se_CustomResponseBodies(input.CustomResponseBodies, context), - }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_Rules(input.Rules, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.VisibilityConfig != null && { VisibilityConfig: se_VisibilityConfig(input.VisibilityConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateWebACLRequest - */ -const se_UpdateWebACLRequest = (input: UpdateWebACLRequest, context: __SerdeContext): any => { - return { - ...(input.AssociationConfig != null && { - AssociationConfig: se_AssociationConfig(input.AssociationConfig, context), - }), - ...(input.CaptchaConfig != null && { CaptchaConfig: se_CaptchaConfig(input.CaptchaConfig, context) }), - ...(input.ChallengeConfig != null && { ChallengeConfig: se_ChallengeConfig(input.ChallengeConfig, context) }), - ...(input.CustomResponseBodies != null && { - CustomResponseBodies: se_CustomResponseBodies(input.CustomResponseBodies, context), - }), - ...(input.DefaultAction != null && { DefaultAction: se_DefaultAction(input.DefaultAction, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Id != null && { Id: input.Id }), - ...(input.LockToken != null && { LockToken: input.LockToken }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Rules != null && { Rules: se_Rules(input.Rules, context) }), - ...(input.Scope != null && { Scope: input.Scope }), - ...(input.TokenDomains != null && { TokenDomains: se_TokenDomains(input.TokenDomains, context) }), - ...(input.VisibilityConfig != null && { VisibilityConfig: se_VisibilityConfig(input.VisibilityConfig, context) }), - }; -}; - -/** - * serializeAws_json1_1UriPath - */ -const se_UriPath = (input: UriPath, context: __SerdeContext): any => { - return {}; -}; - -/** - * serializeAws_json1_1UsernameField - */ -const se_UsernameField = (input: UsernameField, context: __SerdeContext): any => { - return { - ...(input.Identifier != null && { Identifier: input.Identifier }), - }; -}; - -/** - * serializeAws_json1_1VersionsToPublish - */ -const se_VersionsToPublish = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_VersionToPublish(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1VersionToPublish - */ -const se_VersionToPublish = (input: VersionToPublish, context: __SerdeContext): any => { - return { - ...(input.AssociatedRuleGroupArn != null && { AssociatedRuleGroupArn: input.AssociatedRuleGroupArn }), - ...(input.ForecastedLifetime != null && { ForecastedLifetime: input.ForecastedLifetime }), - }; -}; - -/** - * serializeAws_json1_1VisibilityConfig - */ -const se_VisibilityConfig = (input: VisibilityConfig, context: __SerdeContext): any => { - return { - ...(input.CloudWatchMetricsEnabled != null && { CloudWatchMetricsEnabled: input.CloudWatchMetricsEnabled }), - ...(input.MetricName != null && { MetricName: input.MetricName }), - ...(input.SampledRequestsEnabled != null && { SampledRequestsEnabled: input.SampledRequestsEnabled }), - }; -}; - -/** - * serializeAws_json1_1XssMatchStatement - */ -const se_XssMatchStatement = (input: XssMatchStatement, context: __SerdeContext): any => { - return { - ...(input.FieldToMatch != null && { FieldToMatch: se_FieldToMatch(input.FieldToMatch, context) }), - ...(input.TextTransformations != null && { - TextTransformations: se_TextTransformations(input.TextTransformations, context), - }), - }; -}; - -/** - * deserializeAws_json1_1ActionCondition - */ -const de_ActionCondition = (output: any, context: __SerdeContext): ActionCondition => { - return { - Action: __expectString(output.Action), - } as any; -}; - -/** - * deserializeAws_json1_1All - */ -const de_All = (output: any, context: __SerdeContext): All => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AllowAction - */ -const de_AllowAction = (output: any, context: __SerdeContext): AllowAction => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_CustomRequestHandling(output.CustomRequestHandling, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AllQueryArguments - */ -const de_AllQueryArguments = (output: any, context: __SerdeContext): AllQueryArguments => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AndStatement - */ -const de_AndStatement = (output: any, context: __SerdeContext): AndStatement => { - return { - Statements: output.Statements != null ? de_Statements(output.Statements, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AssociateWebACLResponse - */ -const de_AssociateWebACLResponse = (output: any, context: __SerdeContext): AssociateWebACLResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociationConfig - */ -const de_AssociationConfig = (output: any, context: __SerdeContext): AssociationConfig => { - return { - RequestBody: output.RequestBody != null ? de_RequestBody(output.RequestBody, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AWSManagedRulesATPRuleSet - */ -const de_AWSManagedRulesATPRuleSet = (output: any, context: __SerdeContext): AWSManagedRulesATPRuleSet => { - return { - LoginPath: __expectString(output.LoginPath), - RequestInspection: - output.RequestInspection != null ? de_RequestInspection(output.RequestInspection, context) : undefined, - ResponseInspection: - output.ResponseInspection != null ? de_ResponseInspection(output.ResponseInspection, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AWSManagedRulesBotControlRuleSet - */ -const de_AWSManagedRulesBotControlRuleSet = ( - output: any, - context: __SerdeContext -): AWSManagedRulesBotControlRuleSet => { - return { - InspectionLevel: __expectString(output.InspectionLevel), - } as any; -}; - -/** - * deserializeAws_json1_1BlockAction - */ -const de_BlockAction = (output: any, context: __SerdeContext): BlockAction => { - return { - CustomResponse: output.CustomResponse != null ? de_CustomResponse(output.CustomResponse, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Body - */ -const de_Body = (output: any, context: __SerdeContext): Body => { - return { - OversizeHandling: __expectString(output.OversizeHandling), - } as any; -}; - -/** - * deserializeAws_json1_1ByteMatchStatement - */ -const de_ByteMatchStatement = (output: any, context: __SerdeContext): ByteMatchStatement => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - PositionalConstraint: __expectString(output.PositionalConstraint), - SearchString: output.SearchString != null ? context.base64Decoder(output.SearchString) : undefined, - TextTransformations: - output.TextTransformations != null ? de_TextTransformations(output.TextTransformations, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CaptchaAction - */ -const de_CaptchaAction = (output: any, context: __SerdeContext): CaptchaAction => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_CustomRequestHandling(output.CustomRequestHandling, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CaptchaConfig - */ -const de_CaptchaConfig = (output: any, context: __SerdeContext): CaptchaConfig => { - return { - ImmunityTimeProperty: - output.ImmunityTimeProperty != null ? de_ImmunityTimeProperty(output.ImmunityTimeProperty, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CaptchaResponse - */ -const de_CaptchaResponse = (output: any, context: __SerdeContext): CaptchaResponse => { - return { - FailureReason: __expectString(output.FailureReason), - ResponseCode: __expectInt32(output.ResponseCode), - SolveTimestamp: __expectLong(output.SolveTimestamp), - } as any; -}; - -/** - * deserializeAws_json1_1ChallengeAction - */ -const de_ChallengeAction = (output: any, context: __SerdeContext): ChallengeAction => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_CustomRequestHandling(output.CustomRequestHandling, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ChallengeConfig - */ -const de_ChallengeConfig = (output: any, context: __SerdeContext): ChallengeConfig => { - return { - ImmunityTimeProperty: - output.ImmunityTimeProperty != null ? de_ImmunityTimeProperty(output.ImmunityTimeProperty, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ChallengeResponse - */ -const de_ChallengeResponse = (output: any, context: __SerdeContext): ChallengeResponse => { - return { - FailureReason: __expectString(output.FailureReason), - ResponseCode: __expectInt32(output.ResponseCode), - SolveTimestamp: __expectLong(output.SolveTimestamp), - } as any; -}; - -/** - * deserializeAws_json1_1CheckCapacityResponse - */ -const de_CheckCapacityResponse = (output: any, context: __SerdeContext): CheckCapacityResponse => { - return { - Capacity: __expectLong(output.Capacity), - } as any; -}; - -/** - * deserializeAws_json1_1Condition - */ -const de_Condition = (output: any, context: __SerdeContext): Condition => { - return { - ActionCondition: output.ActionCondition != null ? de_ActionCondition(output.ActionCondition, context) : undefined, - LabelNameCondition: - output.LabelNameCondition != null ? de_LabelNameCondition(output.LabelNameCondition, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Conditions - */ -const de_Conditions = (output: any, context: __SerdeContext): Condition[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Condition(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CookieMatchPattern - */ -const de_CookieMatchPattern = (output: any, context: __SerdeContext): CookieMatchPattern => { - return { - All: output.All != null ? de_All(output.All, context) : undefined, - ExcludedCookies: output.ExcludedCookies != null ? de_CookieNames(output.ExcludedCookies, context) : undefined, - IncludedCookies: output.IncludedCookies != null ? de_CookieNames(output.IncludedCookies, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CookieNames - */ -const de_CookieNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Cookies - */ -const de_Cookies = (output: any, context: __SerdeContext): Cookies => { - return { - MatchPattern: output.MatchPattern != null ? de_CookieMatchPattern(output.MatchPattern, context) : undefined, - MatchScope: __expectString(output.MatchScope), - OversizeHandling: __expectString(output.OversizeHandling), - } as any; -}; - -/** - * deserializeAws_json1_1CountAction - */ -const de_CountAction = (output: any, context: __SerdeContext): CountAction => { - return { - CustomRequestHandling: - output.CustomRequestHandling != null - ? de_CustomRequestHandling(output.CustomRequestHandling, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CountryCodes - */ -const de_CountryCodes = (output: any, context: __SerdeContext): (CountryCode | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CreateIPSetResponse - */ -const de_CreateIPSetResponse = (output: any, context: __SerdeContext): CreateIPSetResponse => { - return { - Summary: output.Summary != null ? de_IPSetSummary(output.Summary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateRegexPatternSetResponse - */ -const de_CreateRegexPatternSetResponse = (output: any, context: __SerdeContext): CreateRegexPatternSetResponse => { - return { - Summary: output.Summary != null ? de_RegexPatternSetSummary(output.Summary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateRuleGroupResponse - */ -const de_CreateRuleGroupResponse = (output: any, context: __SerdeContext): CreateRuleGroupResponse => { - return { - Summary: output.Summary != null ? de_RuleGroupSummary(output.Summary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateWebACLResponse - */ -const de_CreateWebACLResponse = (output: any, context: __SerdeContext): CreateWebACLResponse => { - return { - Summary: output.Summary != null ? de_WebACLSummary(output.Summary, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomHTTPHeader - */ -const de_CustomHTTPHeader = (output: any, context: __SerdeContext): CustomHTTPHeader => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1CustomHTTPHeaders - */ -const de_CustomHTTPHeaders = (output: any, context: __SerdeContext): CustomHTTPHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CustomHTTPHeader(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CustomRequestHandling - */ -const de_CustomRequestHandling = (output: any, context: __SerdeContext): CustomRequestHandling => { - return { - InsertHeaders: output.InsertHeaders != null ? de_CustomHTTPHeaders(output.InsertHeaders, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomResponse - */ -const de_CustomResponse = (output: any, context: __SerdeContext): CustomResponse => { - return { - CustomResponseBodyKey: __expectString(output.CustomResponseBodyKey), - ResponseCode: __expectInt32(output.ResponseCode), - ResponseHeaders: output.ResponseHeaders != null ? de_CustomHTTPHeaders(output.ResponseHeaders, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CustomResponseBodies - */ -const de_CustomResponseBodies = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_CustomResponseBody(value, context); - return acc; - }, {}); -}; - -/** - * deserializeAws_json1_1CustomResponseBody - */ -const de_CustomResponseBody = (output: any, context: __SerdeContext): CustomResponseBody => { - return { - Content: __expectString(output.Content), - ContentType: __expectString(output.ContentType), - } as any; -}; - -/** - * deserializeAws_json1_1DefaultAction - */ -const de_DefaultAction = (output: any, context: __SerdeContext): DefaultAction => { - return { - Allow: output.Allow != null ? de_AllowAction(output.Allow, context) : undefined, - Block: output.Block != null ? de_BlockAction(output.Block, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DeleteFirewallManagerRuleGroupsResponse - */ -const de_DeleteFirewallManagerRuleGroupsResponse = ( - output: any, - context: __SerdeContext -): DeleteFirewallManagerRuleGroupsResponse => { - return { - NextWebACLLockToken: __expectString(output.NextWebACLLockToken), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteIPSetResponse - */ -const de_DeleteIPSetResponse = (output: any, context: __SerdeContext): DeleteIPSetResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteLoggingConfigurationResponse - */ -const de_DeleteLoggingConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteLoggingConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeletePermissionPolicyResponse - */ -const de_DeletePermissionPolicyResponse = (output: any, context: __SerdeContext): DeletePermissionPolicyResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRegexPatternSetResponse - */ -const de_DeleteRegexPatternSetResponse = (output: any, context: __SerdeContext): DeleteRegexPatternSetResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteRuleGroupResponse - */ -const de_DeleteRuleGroupResponse = (output: any, context: __SerdeContext): DeleteRuleGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteWebACLResponse - */ -const de_DeleteWebACLResponse = (output: any, context: __SerdeContext): DeleteWebACLResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeManagedRuleGroupResponse - */ -const de_DescribeManagedRuleGroupResponse = ( - output: any, - context: __SerdeContext -): DescribeManagedRuleGroupResponse => { - return { - AvailableLabels: output.AvailableLabels != null ? de_LabelSummaries(output.AvailableLabels, context) : undefined, - Capacity: __expectLong(output.Capacity), - ConsumedLabels: output.ConsumedLabels != null ? de_LabelSummaries(output.ConsumedLabels, context) : undefined, - LabelNamespace: __expectString(output.LabelNamespace), - Rules: output.Rules != null ? de_RuleSummaries(output.Rules, context) : undefined, - SnsTopicArn: __expectString(output.SnsTopicArn), - VersionName: __expectString(output.VersionName), - } as any; -}; - -/** - * deserializeAws_json1_1DisassociateWebACLResponse - */ -const de_DisassociateWebACLResponse = (output: any, context: __SerdeContext): DisassociateWebACLResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1ExcludedRule - */ -const de_ExcludedRule = (output: any, context: __SerdeContext): ExcludedRule => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ExcludedRules - */ -const de_ExcludedRules = (output: any, context: __SerdeContext): ExcludedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ExcludedRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FieldToMatch - */ -const de_FieldToMatch = (output: any, context: __SerdeContext): FieldToMatch => { - return { - AllQueryArguments: - output.AllQueryArguments != null ? de_AllQueryArguments(output.AllQueryArguments, context) : undefined, - Body: output.Body != null ? de_Body(output.Body, context) : undefined, - Cookies: output.Cookies != null ? de_Cookies(output.Cookies, context) : undefined, - Headers: output.Headers != null ? de_Headers(output.Headers, context) : undefined, - JsonBody: output.JsonBody != null ? de_JsonBody(output.JsonBody, context) : undefined, - Method: output.Method != null ? de_Method(output.Method, context) : undefined, - QueryString: output.QueryString != null ? de_QueryString(output.QueryString, context) : undefined, - SingleHeader: output.SingleHeader != null ? de_SingleHeader(output.SingleHeader, context) : undefined, - SingleQueryArgument: - output.SingleQueryArgument != null ? de_SingleQueryArgument(output.SingleQueryArgument, context) : undefined, - UriPath: output.UriPath != null ? de_UriPath(output.UriPath, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1Filter - */ -const de_Filter = (output: any, context: __SerdeContext): Filter => { - return { - Behavior: __expectString(output.Behavior), - Conditions: output.Conditions != null ? de_Conditions(output.Conditions, context) : undefined, - Requirement: __expectString(output.Requirement), - } as any; -}; - -/** - * deserializeAws_json1_1Filters - */ -const de_Filters = (output: any, context: __SerdeContext): Filter[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Filter(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FirewallManagerRuleGroup - */ -const de_FirewallManagerRuleGroup = (output: any, context: __SerdeContext): FirewallManagerRuleGroup => { - return { - FirewallManagerStatement: - output.FirewallManagerStatement != null - ? de_FirewallManagerStatement(output.FirewallManagerStatement, context) - : undefined, - Name: __expectString(output.Name), - OverrideAction: output.OverrideAction != null ? de_OverrideAction(output.OverrideAction, context) : undefined, - Priority: __expectInt32(output.Priority), - VisibilityConfig: - output.VisibilityConfig != null ? de_VisibilityConfig(output.VisibilityConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FirewallManagerRuleGroups - */ -const de_FirewallManagerRuleGroups = (output: any, context: __SerdeContext): FirewallManagerRuleGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FirewallManagerRuleGroup(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FirewallManagerStatement - */ -const de_FirewallManagerStatement = (output: any, context: __SerdeContext): FirewallManagerStatement => { - return { - ManagedRuleGroupStatement: - output.ManagedRuleGroupStatement != null - ? de_ManagedRuleGroupStatement(output.ManagedRuleGroupStatement, context) - : undefined, - RuleGroupReferenceStatement: - output.RuleGroupReferenceStatement != null - ? de_RuleGroupReferenceStatement(output.RuleGroupReferenceStatement, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ForwardedIPConfig - */ -const de_ForwardedIPConfig = (output: any, context: __SerdeContext): ForwardedIPConfig => { - return { - FallbackBehavior: __expectString(output.FallbackBehavior), - HeaderName: __expectString(output.HeaderName), - } as any; -}; - -/** - * deserializeAws_json1_1GenerateMobileSdkReleaseUrlResponse - */ -const de_GenerateMobileSdkReleaseUrlResponse = ( - output: any, - context: __SerdeContext -): GenerateMobileSdkReleaseUrlResponse => { - return { - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_json1_1GeoMatchStatement - */ -const de_GeoMatchStatement = (output: any, context: __SerdeContext): GeoMatchStatement => { - return { - CountryCodes: output.CountryCodes != null ? de_CountryCodes(output.CountryCodes, context) : undefined, - ForwardedIPConfig: - output.ForwardedIPConfig != null ? de_ForwardedIPConfig(output.ForwardedIPConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetIPSetResponse - */ -const de_GetIPSetResponse = (output: any, context: __SerdeContext): GetIPSetResponse => { - return { - IPSet: output.IPSet != null ? de_IPSet(output.IPSet, context) : undefined, - LockToken: __expectString(output.LockToken), - } as any; -}; - -/** - * deserializeAws_json1_1GetLoggingConfigurationResponse - */ -const de_GetLoggingConfigurationResponse = (output: any, context: __SerdeContext): GetLoggingConfigurationResponse => { - return { - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetManagedRuleSetResponse - */ -const de_GetManagedRuleSetResponse = (output: any, context: __SerdeContext): GetManagedRuleSetResponse => { - return { - LockToken: __expectString(output.LockToken), - ManagedRuleSet: output.ManagedRuleSet != null ? de_ManagedRuleSet(output.ManagedRuleSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetMobileSdkReleaseResponse - */ -const de_GetMobileSdkReleaseResponse = (output: any, context: __SerdeContext): GetMobileSdkReleaseResponse => { - return { - MobileSdkRelease: - output.MobileSdkRelease != null ? de_MobileSdkRelease(output.MobileSdkRelease, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetPermissionPolicyResponse - */ -const de_GetPermissionPolicyResponse = (output: any, context: __SerdeContext): GetPermissionPolicyResponse => { - return { - Policy: __expectString(output.Policy), - } as any; -}; - -/** - * deserializeAws_json1_1GetRateBasedStatementManagedKeysResponse - */ -const de_GetRateBasedStatementManagedKeysResponse = ( - output: any, - context: __SerdeContext -): GetRateBasedStatementManagedKeysResponse => { - return { - ManagedKeysIPV4: - output.ManagedKeysIPV4 != null - ? de_RateBasedStatementManagedKeysIPSet(output.ManagedKeysIPV4, context) - : undefined, - ManagedKeysIPV6: - output.ManagedKeysIPV6 != null - ? de_RateBasedStatementManagedKeysIPSet(output.ManagedKeysIPV6, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRegexPatternSetResponse - */ -const de_GetRegexPatternSetResponse = (output: any, context: __SerdeContext): GetRegexPatternSetResponse => { - return { - LockToken: __expectString(output.LockToken), - RegexPatternSet: output.RegexPatternSet != null ? de_RegexPatternSet(output.RegexPatternSet, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetRuleGroupResponse - */ -const de_GetRuleGroupResponse = (output: any, context: __SerdeContext): GetRuleGroupResponse => { - return { - LockToken: __expectString(output.LockToken), - RuleGroup: output.RuleGroup != null ? de_RuleGroup(output.RuleGroup, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetSampledRequestsResponse - */ -const de_GetSampledRequestsResponse = (output: any, context: __SerdeContext): GetSampledRequestsResponse => { - return { - PopulationSize: __expectLong(output.PopulationSize), - SampledRequests: - output.SampledRequests != null ? de_SampledHTTPRequests(output.SampledRequests, context) : undefined, - TimeWindow: output.TimeWindow != null ? de_TimeWindow(output.TimeWindow, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetWebACLForResourceResponse - */ -const de_GetWebACLForResourceResponse = (output: any, context: __SerdeContext): GetWebACLForResourceResponse => { - return { - WebACL: output.WebACL != null ? de_WebACL(output.WebACL, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1GetWebACLResponse - */ -const de_GetWebACLResponse = (output: any, context: __SerdeContext): GetWebACLResponse => { - return { - ApplicationIntegrationURL: __expectString(output.ApplicationIntegrationURL), - LockToken: __expectString(output.LockToken), - WebACL: output.WebACL != null ? de_WebACL(output.WebACL, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1HeaderMatchPattern - */ -const de_HeaderMatchPattern = (output: any, context: __SerdeContext): HeaderMatchPattern => { - return { - All: output.All != null ? de_All(output.All, context) : undefined, - ExcludedHeaders: output.ExcludedHeaders != null ? de_HeaderNames(output.ExcludedHeaders, context) : undefined, - IncludedHeaders: output.IncludedHeaders != null ? de_HeaderNames(output.IncludedHeaders, context) : undefined, - } as any; -}; +// se_UriPath omitted. -/** - * deserializeAws_json1_1HeaderNames - */ -const de_HeaderNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Headers - */ -const de_Headers = (output: any, context: __SerdeContext): Headers => { - return { - MatchPattern: output.MatchPattern != null ? de_HeaderMatchPattern(output.MatchPattern, context) : undefined, - MatchScope: __expectString(output.MatchScope), - OversizeHandling: __expectString(output.OversizeHandling), - } as any; -}; - -/** - * deserializeAws_json1_1HTTPHeader - */ -const de_HTTPHeader = (output: any, context: __SerdeContext): HTTPHeader => { - return { - Name: __expectString(output.Name), - Value: __expectString(output.Value), - } as any; -}; - -/** - * deserializeAws_json1_1HTTPHeaders - */ -const de_HTTPHeaders = (output: any, context: __SerdeContext): HTTPHeader[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_HTTPHeader(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1HTTPRequest - */ -const de_HTTPRequest = (output: any, context: __SerdeContext): HTTPRequest => { - return { - ClientIP: __expectString(output.ClientIP), - Country: __expectString(output.Country), - HTTPVersion: __expectString(output.HTTPVersion), - Headers: output.Headers != null ? de_HTTPHeaders(output.Headers, context) : undefined, - Method: __expectString(output.Method), - URI: __expectString(output.URI), - } as any; -}; +// se_UsernameField omitted. -/** - * deserializeAws_json1_1ImmunityTimeProperty - */ -const de_ImmunityTimeProperty = (output: any, context: __SerdeContext): ImmunityTimeProperty => { - return { - ImmunityTime: __expectLong(output.ImmunityTime), - } as any; -}; +// se_VersionsToPublish omitted. -/** - * deserializeAws_json1_1IPAddresses - */ -const de_IPAddresses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_VersionToPublish omitted. -/** - * deserializeAws_json1_1IPSet - */ -const de_IPSet = (output: any, context: __SerdeContext): IPSet => { - return { - ARN: __expectString(output.ARN), - Addresses: output.Addresses != null ? de_IPAddresses(output.Addresses, context) : undefined, - Description: __expectString(output.Description), - IPAddressVersion: __expectString(output.IPAddressVersion), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// se_VisibilityConfig omitted. -/** - * deserializeAws_json1_1IPSetForwardedIPConfig - */ -const de_IPSetForwardedIPConfig = (output: any, context: __SerdeContext): IPSetForwardedIPConfig => { - return { - FallbackBehavior: __expectString(output.FallbackBehavior), - HeaderName: __expectString(output.HeaderName), - Position: __expectString(output.Position), - } as any; -}; +// se_XssMatchStatement omitted. -/** - * deserializeAws_json1_1IPSetReferenceStatement - */ -const de_IPSetReferenceStatement = (output: any, context: __SerdeContext): IPSetReferenceStatement => { - return { - ARN: __expectString(output.ARN), - IPSetForwardedIPConfig: - output.IPSetForwardedIPConfig != null - ? de_IPSetForwardedIPConfig(output.IPSetForwardedIPConfig, context) - : undefined, - } as any; -}; +// de_ActionCondition omitted. -/** - * deserializeAws_json1_1IPSetSummaries - */ -const de_IPSetSummaries = (output: any, context: __SerdeContext): IPSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IPSetSummary(entry, context); - }); - return retVal; -}; +// de_All omitted. -/** - * deserializeAws_json1_1IPSetSummary - */ -const de_IPSetSummary = (output: any, context: __SerdeContext): IPSetSummary => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LockToken: __expectString(output.LockToken), - Name: __expectString(output.Name), - } as any; -}; +// de_AllowAction omitted. -/** - * deserializeAws_json1_1JsonBody - */ -const de_JsonBody = (output: any, context: __SerdeContext): JsonBody => { - return { - InvalidFallbackBehavior: __expectString(output.InvalidFallbackBehavior), - MatchPattern: output.MatchPattern != null ? de_JsonMatchPattern(output.MatchPattern, context) : undefined, - MatchScope: __expectString(output.MatchScope), - OversizeHandling: __expectString(output.OversizeHandling), - } as any; -}; +// de_AllQueryArguments omitted. /** - * deserializeAws_json1_1JsonMatchPattern + * deserializeAws_json1_1AndStatement */ -const de_JsonMatchPattern = (output: any, context: __SerdeContext): JsonMatchPattern => { - return { - All: output.All != null ? de_All(output.All, context) : undefined, - IncludedPaths: output.IncludedPaths != null ? de_JsonPointerPaths(output.IncludedPaths, context) : undefined, - } as any; +const de_AndStatement = (output: any, context: __SerdeContext): AndStatement => { + return take(output, { + Statements: (_: any) => de_Statements(_, context), + }) as any; }; -/** - * deserializeAws_json1_1JsonPointerPaths - */ -const de_JsonPointerPaths = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AssociateWebACLResponse omitted. -/** - * deserializeAws_json1_1Label - */ -const de_Label = (output: any, context: __SerdeContext): Label => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_AssociationConfig omitted. -/** - * deserializeAws_json1_1LabelMatchStatement - */ -const de_LabelMatchStatement = (output: any, context: __SerdeContext): LabelMatchStatement => { - return { - Key: __expectString(output.Key), - Scope: __expectString(output.Scope), - } as any; -}; +// de_AWSManagedRulesATPRuleSet omitted. -/** - * deserializeAws_json1_1LabelNameCondition - */ -const de_LabelNameCondition = (output: any, context: __SerdeContext): LabelNameCondition => { - return { - LabelName: __expectString(output.LabelName), - } as any; -}; +// de_AWSManagedRulesBotControlRuleSet omitted. -/** - * deserializeAws_json1_1Labels - */ -const de_Labels = (output: any, context: __SerdeContext): Label[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Label(entry, context); - }); - return retVal; -}; +// de_BlockAction omitted. -/** - * deserializeAws_json1_1LabelSummaries - */ -const de_LabelSummaries = (output: any, context: __SerdeContext): LabelSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LabelSummary(entry, context); - }); - return retVal; -}; +// de_Body omitted. /** - * deserializeAws_json1_1LabelSummary + * deserializeAws_json1_1ByteMatchStatement */ -const de_LabelSummary = (output: any, context: __SerdeContext): LabelSummary => { - return { - Name: __expectString(output.Name), - } as any; +const de_ByteMatchStatement = (output: any, context: __SerdeContext): ByteMatchStatement => { + return take(output, { + FieldToMatch: _json, + PositionalConstraint: __expectString, + SearchString: context.base64Decoder, + TextTransformations: _json, + }) as any; }; -/** - * deserializeAws_json1_1ListAvailableManagedRuleGroupsResponse - */ -const de_ListAvailableManagedRuleGroupsResponse = ( - output: any, - context: __SerdeContext -): ListAvailableManagedRuleGroupsResponse => { - return { - ManagedRuleGroups: - output.ManagedRuleGroups != null ? de_ManagedRuleGroupSummaries(output.ManagedRuleGroups, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_CaptchaAction omitted. -/** - * deserializeAws_json1_1ListAvailableManagedRuleGroupVersionsResponse - */ -const de_ListAvailableManagedRuleGroupVersionsResponse = ( - output: any, - context: __SerdeContext -): ListAvailableManagedRuleGroupVersionsResponse => { - return { - CurrentDefaultVersion: __expectString(output.CurrentDefaultVersion), - NextMarker: __expectString(output.NextMarker), - Versions: output.Versions != null ? de_ManagedRuleGroupVersions(output.Versions, context) : undefined, - } as any; -}; +// de_CaptchaConfig omitted. -/** - * deserializeAws_json1_1ListIPSetsResponse - */ -const de_ListIPSetsResponse = (output: any, context: __SerdeContext): ListIPSetsResponse => { - return { - IPSets: output.IPSets != null ? de_IPSetSummaries(output.IPSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_CaptchaResponse omitted. -/** - * deserializeAws_json1_1ListLoggingConfigurationsResponse - */ -const de_ListLoggingConfigurationsResponse = ( - output: any, - context: __SerdeContext -): ListLoggingConfigurationsResponse => { - return { - LoggingConfigurations: - output.LoggingConfigurations != null - ? de_LoggingConfigurations(output.LoggingConfigurations, context) - : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_ChallengeAction omitted. -/** - * deserializeAws_json1_1ListManagedRuleSetsResponse - */ -const de_ListManagedRuleSetsResponse = (output: any, context: __SerdeContext): ListManagedRuleSetsResponse => { - return { - ManagedRuleSets: - output.ManagedRuleSets != null ? de_ManagedRuleSetSummaries(output.ManagedRuleSets, context) : undefined, - NextMarker: __expectString(output.NextMarker), - } as any; -}; +// de_ChallengeConfig omitted. -/** - * deserializeAws_json1_1ListMobileSdkReleasesResponse - */ -const de_ListMobileSdkReleasesResponse = (output: any, context: __SerdeContext): ListMobileSdkReleasesResponse => { - return { - NextMarker: __expectString(output.NextMarker), - ReleaseSummaries: - output.ReleaseSummaries != null ? de_ReleaseSummaries(output.ReleaseSummaries, context) : undefined, - } as any; -}; +// de_ChallengeResponse omitted. -/** - * deserializeAws_json1_1ListRegexPatternSetsResponse - */ -const de_ListRegexPatternSetsResponse = (output: any, context: __SerdeContext): ListRegexPatternSetsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RegexPatternSets: - output.RegexPatternSets != null ? de_RegexPatternSetSummaries(output.RegexPatternSets, context) : undefined, - } as any; -}; +// de_CheckCapacityResponse omitted. -/** - * deserializeAws_json1_1ListResourcesForWebACLResponse - */ -const de_ListResourcesForWebACLResponse = (output: any, context: __SerdeContext): ListResourcesForWebACLResponse => { - return { - ResourceArns: output.ResourceArns != null ? de_ResourceArns(output.ResourceArns, context) : undefined, - } as any; -}; +// de_Condition omitted. -/** - * deserializeAws_json1_1ListRuleGroupsResponse - */ -const de_ListRuleGroupsResponse = (output: any, context: __SerdeContext): ListRuleGroupsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - RuleGroups: output.RuleGroups != null ? de_RuleGroupSummaries(output.RuleGroups, context) : undefined, - } as any; -}; +// de_Conditions omitted. -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - NextMarker: __expectString(output.NextMarker), - TagInfoForResource: - output.TagInfoForResource != null ? de_TagInfoForResource(output.TagInfoForResource, context) : undefined, - } as any; -}; +// de_CookieMatchPattern omitted. -/** - * deserializeAws_json1_1ListWebACLsResponse - */ -const de_ListWebACLsResponse = (output: any, context: __SerdeContext): ListWebACLsResponse => { - return { - NextMarker: __expectString(output.NextMarker), - WebACLs: output.WebACLs != null ? de_WebACLSummaries(output.WebACLs, context) : undefined, - } as any; -}; +// de_CookieNames omitted. -/** - * deserializeAws_json1_1LogDestinationConfigs - */ -const de_LogDestinationConfigs = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_Cookies omitted. -/** - * deserializeAws_json1_1LoggingConfiguration - */ -const de_LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => { - return { - LogDestinationConfigs: - output.LogDestinationConfigs != null - ? de_LogDestinationConfigs(output.LogDestinationConfigs, context) - : undefined, - LoggingFilter: output.LoggingFilter != null ? de_LoggingFilter(output.LoggingFilter, context) : undefined, - ManagedByFirewallManager: __expectBoolean(output.ManagedByFirewallManager), - RedactedFields: output.RedactedFields != null ? de_RedactedFields(output.RedactedFields, context) : undefined, - ResourceArn: __expectString(output.ResourceArn), - } as any; -}; +// de_CountAction omitted. -/** - * deserializeAws_json1_1LoggingConfigurations - */ -const de_LoggingConfigurations = (output: any, context: __SerdeContext): LoggingConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LoggingConfiguration(entry, context); - }); - return retVal; -}; +// de_CountryCodes omitted. -/** - * deserializeAws_json1_1LoggingFilter - */ -const de_LoggingFilter = (output: any, context: __SerdeContext): LoggingFilter => { - return { - DefaultBehavior: __expectString(output.DefaultBehavior), - Filters: output.Filters != null ? de_Filters(output.Filters, context) : undefined, - } as any; -}; +// de_CreateIPSetResponse omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupConfig - */ -const de_ManagedRuleGroupConfig = (output: any, context: __SerdeContext): ManagedRuleGroupConfig => { - return { - AWSManagedRulesATPRuleSet: - output.AWSManagedRulesATPRuleSet != null - ? de_AWSManagedRulesATPRuleSet(output.AWSManagedRulesATPRuleSet, context) - : undefined, - AWSManagedRulesBotControlRuleSet: - output.AWSManagedRulesBotControlRuleSet != null - ? de_AWSManagedRulesBotControlRuleSet(output.AWSManagedRulesBotControlRuleSet, context) - : undefined, - LoginPath: __expectString(output.LoginPath), - PasswordField: output.PasswordField != null ? de_PasswordField(output.PasswordField, context) : undefined, - PayloadType: __expectString(output.PayloadType), - UsernameField: output.UsernameField != null ? de_UsernameField(output.UsernameField, context) : undefined, - } as any; -}; +// de_CreateRegexPatternSetResponse omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupConfigs - */ -const de_ManagedRuleGroupConfigs = (output: any, context: __SerdeContext): ManagedRuleGroupConfig[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedRuleGroupConfig(entry, context); - }); - return retVal; -}; +// de_CreateRuleGroupResponse omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupStatement - */ -const de_ManagedRuleGroupStatement = (output: any, context: __SerdeContext): ManagedRuleGroupStatement => { - return { - ExcludedRules: output.ExcludedRules != null ? de_ExcludedRules(output.ExcludedRules, context) : undefined, - ManagedRuleGroupConfigs: - output.ManagedRuleGroupConfigs != null - ? de_ManagedRuleGroupConfigs(output.ManagedRuleGroupConfigs, context) - : undefined, - Name: __expectString(output.Name), - RuleActionOverrides: - output.RuleActionOverrides != null ? de_RuleActionOverrides(output.RuleActionOverrides, context) : undefined, - ScopeDownStatement: - output.ScopeDownStatement != null ? de_Statement(output.ScopeDownStatement, context) : undefined, - VendorName: __expectString(output.VendorName), - Version: __expectString(output.Version), - } as any; -}; +// de_CreateWebACLResponse omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupSummaries - */ -const de_ManagedRuleGroupSummaries = (output: any, context: __SerdeContext): ManagedRuleGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedRuleGroupSummary(entry, context); - }); - return retVal; -}; +// de_CustomHTTPHeader omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupSummary - */ -const de_ManagedRuleGroupSummary = (output: any, context: __SerdeContext): ManagedRuleGroupSummary => { - return { - Description: __expectString(output.Description), - Name: __expectString(output.Name), - VendorName: __expectString(output.VendorName), - VersioningSupported: __expectBoolean(output.VersioningSupported), - } as any; -}; +// de_CustomHTTPHeaders omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupVersion - */ -const de_ManagedRuleGroupVersion = (output: any, context: __SerdeContext): ManagedRuleGroupVersion => { - return { - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_CustomRequestHandling omitted. -/** - * deserializeAws_json1_1ManagedRuleGroupVersions - */ -const de_ManagedRuleGroupVersions = (output: any, context: __SerdeContext): ManagedRuleGroupVersion[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedRuleGroupVersion(entry, context); - }); - return retVal; -}; +// de_CustomResponse omitted. -/** - * deserializeAws_json1_1ManagedRuleSet - */ -const de_ManagedRuleSet = (output: any, context: __SerdeContext): ManagedRuleSet => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LabelNamespace: __expectString(output.LabelNamespace), - Name: __expectString(output.Name), - PublishedVersions: - output.PublishedVersions != null ? de_PublishedVersions(output.PublishedVersions, context) : undefined, - RecommendedVersion: __expectString(output.RecommendedVersion), - } as any; -}; +// de_CustomResponseBodies omitted. -/** - * deserializeAws_json1_1ManagedRuleSetSummaries - */ -const de_ManagedRuleSetSummaries = (output: any, context: __SerdeContext): ManagedRuleSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ManagedRuleSetSummary(entry, context); - }); - return retVal; -}; +// de_CustomResponseBody omitted. -/** - * deserializeAws_json1_1ManagedRuleSetSummary - */ -const de_ManagedRuleSetSummary = (output: any, context: __SerdeContext): ManagedRuleSetSummary => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LabelNamespace: __expectString(output.LabelNamespace), - LockToken: __expectString(output.LockToken), - Name: __expectString(output.Name), - } as any; -}; +// de_DefaultAction omitted. -/** - * deserializeAws_json1_1ManagedRuleSetVersion - */ -const de_ManagedRuleSetVersion = (output: any, context: __SerdeContext): ManagedRuleSetVersion => { - return { - AssociatedRuleGroupArn: __expectString(output.AssociatedRuleGroupArn), - Capacity: __expectLong(output.Capacity), - ExpiryTimestamp: - output.ExpiryTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiryTimestamp))) - : undefined, - ForecastedLifetime: __expectInt32(output.ForecastedLifetime), - LastUpdateTimestamp: - output.LastUpdateTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTimestamp))) - : undefined, - PublishTimestamp: - output.PublishTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.PublishTimestamp))) - : undefined, - } as any; -}; +// de_DeleteFirewallManagerRuleGroupsResponse omitted. -/** - * deserializeAws_json1_1Method - */ -const de_Method = (output: any, context: __SerdeContext): Method => { - return {} as any; -}; +// de_DeleteIPSetResponse omitted. -/** - * deserializeAws_json1_1MobileSdkRelease - */ -const de_MobileSdkRelease = (output: any, context: __SerdeContext): MobileSdkRelease => { - return { - ReleaseNotes: __expectString(output.ReleaseNotes), - ReleaseVersion: __expectString(output.ReleaseVersion), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; -}; +// de_DeleteLoggingConfigurationResponse omitted. -/** - * deserializeAws_json1_1NoneAction - */ -const de_NoneAction = (output: any, context: __SerdeContext): NoneAction => { - return {} as any; -}; +// de_DeletePermissionPolicyResponse omitted. -/** - * deserializeAws_json1_1NotStatement - */ -const de_NotStatement = (output: any, context: __SerdeContext): NotStatement => { - return { - Statement: output.Statement != null ? de_Statement(output.Statement, context) : undefined, - } as any; -}; +// de_DeleteRegexPatternSetResponse omitted. -/** - * deserializeAws_json1_1OrStatement - */ -const de_OrStatement = (output: any, context: __SerdeContext): OrStatement => { - return { - Statements: output.Statements != null ? de_Statements(output.Statements, context) : undefined, - } as any; -}; +// de_DeleteRuleGroupResponse omitted. -/** - * deserializeAws_json1_1OverrideAction - */ -const de_OverrideAction = (output: any, context: __SerdeContext): OverrideAction => { - return { - Count: output.Count != null ? de_CountAction(output.Count, context) : undefined, - None: output.None != null ? de_NoneAction(output.None, context) : undefined, - } as any; -}; +// de_DeleteWebACLResponse omitted. -/** - * deserializeAws_json1_1PasswordField - */ -const de_PasswordField = (output: any, context: __SerdeContext): PasswordField => { - return { - Identifier: __expectString(output.Identifier), - } as any; -}; +// de_DescribeManagedRuleGroupResponse omitted. -/** - * deserializeAws_json1_1PublishedVersions - */ -const de_PublishedVersions = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ManagedRuleSetVersion(value, context); - return acc; - }, {}); -}; +// de_DisassociateWebACLResponse omitted. -/** - * deserializeAws_json1_1PutLoggingConfigurationResponse - */ -const de_PutLoggingConfigurationResponse = (output: any, context: __SerdeContext): PutLoggingConfigurationResponse => { - return { - LoggingConfiguration: - output.LoggingConfiguration != null ? de_LoggingConfiguration(output.LoggingConfiguration, context) : undefined, - } as any; -}; +// de_ExcludedRule omitted. -/** - * deserializeAws_json1_1PutManagedRuleSetVersionsResponse - */ -const de_PutManagedRuleSetVersionsResponse = ( - output: any, - context: __SerdeContext -): PutManagedRuleSetVersionsResponse => { - return { - NextLockToken: __expectString(output.NextLockToken), - } as any; -}; +// de_ExcludedRules omitted. -/** - * deserializeAws_json1_1PutPermissionPolicyResponse - */ -const de_PutPermissionPolicyResponse = (output: any, context: __SerdeContext): PutPermissionPolicyResponse => { - return {} as any; -}; +// de_FieldToMatch omitted. -/** - * deserializeAws_json1_1QueryString - */ -const de_QueryString = (output: any, context: __SerdeContext): QueryString => { - return {} as any; -}; +// de_Filter omitted. -/** - * deserializeAws_json1_1RateBasedStatement - */ -const de_RateBasedStatement = (output: any, context: __SerdeContext): RateBasedStatement => { - return { - AggregateKeyType: __expectString(output.AggregateKeyType), - ForwardedIPConfig: - output.ForwardedIPConfig != null ? de_ForwardedIPConfig(output.ForwardedIPConfig, context) : undefined, - Limit: __expectLong(output.Limit), - ScopeDownStatement: - output.ScopeDownStatement != null ? de_Statement(output.ScopeDownStatement, context) : undefined, - } as any; -}; +// de_Filters omitted. /** - * deserializeAws_json1_1RateBasedStatementManagedKeysIPSet + * deserializeAws_json1_1FirewallManagerRuleGroup */ -const de_RateBasedStatementManagedKeysIPSet = ( - output: any, - context: __SerdeContext -): RateBasedStatementManagedKeysIPSet => { - return { - Addresses: output.Addresses != null ? de_IPAddresses(output.Addresses, context) : undefined, - IPAddressVersion: __expectString(output.IPAddressVersion), - } as any; +const de_FirewallManagerRuleGroup = (output: any, context: __SerdeContext): FirewallManagerRuleGroup => { + return take(output, { + FirewallManagerStatement: (_: any) => de_FirewallManagerStatement(_, context), + Name: __expectString, + OverrideAction: _json, + Priority: __expectInt32, + VisibilityConfig: _json, + }) as any; }; /** - * deserializeAws_json1_1RedactedFields + * deserializeAws_json1_1FirewallManagerRuleGroups */ -const de_RedactedFields = (output: any, context: __SerdeContext): FieldToMatch[] => { +const de_FirewallManagerRuleGroups = (output: any, context: __SerdeContext): FirewallManagerRuleGroup[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FieldToMatch(entry, context); + return de_FirewallManagerRuleGroup(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1Regex + * deserializeAws_json1_1FirewallManagerStatement */ -const de_Regex = (output: any, context: __SerdeContext): Regex => { - return { - RegexString: __expectString(output.RegexString), - } as any; +const de_FirewallManagerStatement = (output: any, context: __SerdeContext): FirewallManagerStatement => { + return take(output, { + ManagedRuleGroupStatement: (_: any) => de_ManagedRuleGroupStatement(_, context), + RuleGroupReferenceStatement: _json, + }) as any; }; -/** - * deserializeAws_json1_1RegexMatchStatement - */ -const de_RegexMatchStatement = (output: any, context: __SerdeContext): RegexMatchStatement => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - RegexString: __expectString(output.RegexString), - TextTransformations: - output.TextTransformations != null ? de_TextTransformations(output.TextTransformations, context) : undefined, - } as any; -}; +// de_ForwardedIPConfig omitted. -/** - * deserializeAws_json1_1RegexPatternSet - */ -const de_RegexPatternSet = (output: any, context: __SerdeContext): RegexPatternSet => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - Name: __expectString(output.Name), - RegularExpressionList: - output.RegularExpressionList != null - ? de_RegularExpressionList(output.RegularExpressionList, context) - : undefined, - } as any; -}; +// de_GenerateMobileSdkReleaseUrlResponse omitted. -/** - * deserializeAws_json1_1RegexPatternSetReferenceStatement - */ -const de_RegexPatternSetReferenceStatement = ( - output: any, - context: __SerdeContext -): RegexPatternSetReferenceStatement => { - return { - ARN: __expectString(output.ARN), - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - TextTransformations: - output.TextTransformations != null ? de_TextTransformations(output.TextTransformations, context) : undefined, - } as any; -}; +// de_GeoMatchStatement omitted. + +// de_GetIPSetResponse omitted. + +// de_GetLoggingConfigurationResponse omitted. /** - * deserializeAws_json1_1RegexPatternSetSummaries + * deserializeAws_json1_1GetManagedRuleSetResponse */ -const de_RegexPatternSetSummaries = (output: any, context: __SerdeContext): RegexPatternSetSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RegexPatternSetSummary(entry, context); - }); - return retVal; +const de_GetManagedRuleSetResponse = (output: any, context: __SerdeContext): GetManagedRuleSetResponse => { + return take(output, { + LockToken: __expectString, + ManagedRuleSet: (_: any) => de_ManagedRuleSet(_, context), + }) as any; }; /** - * deserializeAws_json1_1RegexPatternSetSummary + * deserializeAws_json1_1GetMobileSdkReleaseResponse */ -const de_RegexPatternSetSummary = (output: any, context: __SerdeContext): RegexPatternSetSummary => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LockToken: __expectString(output.LockToken), - Name: __expectString(output.Name), - } as any; +const de_GetMobileSdkReleaseResponse = (output: any, context: __SerdeContext): GetMobileSdkReleaseResponse => { + return take(output, { + MobileSdkRelease: (_: any) => de_MobileSdkRelease(_, context), + }) as any; }; +// de_GetPermissionPolicyResponse omitted. + +// de_GetRateBasedStatementManagedKeysResponse omitted. + +// de_GetRegexPatternSetResponse omitted. + /** - * deserializeAws_json1_1RegularExpressionList + * deserializeAws_json1_1GetRuleGroupResponse */ -const de_RegularExpressionList = (output: any, context: __SerdeContext): Regex[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Regex(entry, context); - }); - return retVal; +const de_GetRuleGroupResponse = (output: any, context: __SerdeContext): GetRuleGroupResponse => { + return take(output, { + LockToken: __expectString, + RuleGroup: (_: any) => de_RuleGroup(_, context), + }) as any; }; /** - * deserializeAws_json1_1ReleaseSummaries + * deserializeAws_json1_1GetSampledRequestsResponse */ -const de_ReleaseSummaries = (output: any, context: __SerdeContext): ReleaseSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ReleaseSummary(entry, context); - }); - return retVal; +const de_GetSampledRequestsResponse = (output: any, context: __SerdeContext): GetSampledRequestsResponse => { + return take(output, { + PopulationSize: __expectLong, + SampledRequests: (_: any) => de_SampledHTTPRequests(_, context), + TimeWindow: (_: any) => de_TimeWindow(_, context), + }) as any; }; /** - * deserializeAws_json1_1ReleaseSummary + * deserializeAws_json1_1GetWebACLForResourceResponse */ -const de_ReleaseSummary = (output: any, context: __SerdeContext): ReleaseSummary => { - return { - ReleaseVersion: __expectString(output.ReleaseVersion), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; +const de_GetWebACLForResourceResponse = (output: any, context: __SerdeContext): GetWebACLForResourceResponse => { + return take(output, { + WebACL: (_: any) => de_WebACL(_, context), + }) as any; }; /** - * deserializeAws_json1_1RequestBody + * deserializeAws_json1_1GetWebACLResponse */ -const de_RequestBody = ( - output: any, - context: __SerdeContext -): Record => { - return Object.entries(output).reduce( - ( - acc: Record, - [key, value]: [AssociatedResourceType | string, any] - ) => { - if (value === null) { - return acc; - } - acc[key] = de_RequestBodyAssociatedResourceTypeConfig(value, context); - return acc; - }, - {} - ); +const de_GetWebACLResponse = (output: any, context: __SerdeContext): GetWebACLResponse => { + return take(output, { + ApplicationIntegrationURL: __expectString, + LockToken: __expectString, + WebACL: (_: any) => de_WebACL(_, context), + }) as any; }; +// de_HeaderMatchPattern omitted. + +// de_HeaderNames omitted. + +// de_Headers omitted. + +// de_HTTPHeader omitted. + +// de_HTTPHeaders omitted. + +// de_HTTPRequest omitted. + +// de_ImmunityTimeProperty omitted. + +// de_IPAddresses omitted. + +// de_IPSet omitted. + +// de_IPSetForwardedIPConfig omitted. + +// de_IPSetReferenceStatement omitted. + +// de_IPSetSummaries omitted. + +// de_IPSetSummary omitted. + +// de_JsonBody omitted. + +// de_JsonMatchPattern omitted. + +// de_JsonPointerPaths omitted. + +// de_Label omitted. + +// de_LabelMatchStatement omitted. + +// de_LabelNameCondition omitted. + +// de_Labels omitted. + +// de_LabelSummaries omitted. + +// de_LabelSummary omitted. + +// de_ListAvailableManagedRuleGroupsResponse omitted. + /** - * deserializeAws_json1_1RequestBodyAssociatedResourceTypeConfig + * deserializeAws_json1_1ListAvailableManagedRuleGroupVersionsResponse */ -const de_RequestBodyAssociatedResourceTypeConfig = ( +const de_ListAvailableManagedRuleGroupVersionsResponse = ( output: any, context: __SerdeContext -): RequestBodyAssociatedResourceTypeConfig => { - return { - DefaultSizeInspectionLimit: __expectString(output.DefaultSizeInspectionLimit), - } as any; +): ListAvailableManagedRuleGroupVersionsResponse => { + return take(output, { + CurrentDefaultVersion: __expectString, + NextMarker: __expectString, + Versions: (_: any) => de_ManagedRuleGroupVersions(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RequestInspection - */ -const de_RequestInspection = (output: any, context: __SerdeContext): RequestInspection => { - return { - PasswordField: output.PasswordField != null ? de_PasswordField(output.PasswordField, context) : undefined, - PayloadType: __expectString(output.PayloadType), - UsernameField: output.UsernameField != null ? de_UsernameField(output.UsernameField, context) : undefined, - } as any; -}; +// de_ListIPSetsResponse omitted. -/** - * deserializeAws_json1_1ResourceArns - */ -const de_ResourceArns = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListLoggingConfigurationsResponse omitted. -/** - * deserializeAws_json1_1ResponseInspection - */ -const de_ResponseInspection = (output: any, context: __SerdeContext): ResponseInspection => { - return { - BodyContains: - output.BodyContains != null ? de_ResponseInspectionBodyContains(output.BodyContains, context) : undefined, - Header: output.Header != null ? de_ResponseInspectionHeader(output.Header, context) : undefined, - Json: output.Json != null ? de_ResponseInspectionJson(output.Json, context) : undefined, - StatusCode: output.StatusCode != null ? de_ResponseInspectionStatusCode(output.StatusCode, context) : undefined, - } as any; -}; +// de_ListManagedRuleSetsResponse omitted. /** - * deserializeAws_json1_1ResponseInspectionBodyContains + * deserializeAws_json1_1ListMobileSdkReleasesResponse */ -const de_ResponseInspectionBodyContains = (output: any, context: __SerdeContext): ResponseInspectionBodyContains => { - return { - FailureStrings: - output.FailureStrings != null - ? de_ResponseInspectionBodyContainsFailureStrings(output.FailureStrings, context) - : undefined, - SuccessStrings: - output.SuccessStrings != null - ? de_ResponseInspectionBodyContainsSuccessStrings(output.SuccessStrings, context) - : undefined, - } as any; +const de_ListMobileSdkReleasesResponse = (output: any, context: __SerdeContext): ListMobileSdkReleasesResponse => { + return take(output, { + NextMarker: __expectString, + ReleaseSummaries: (_: any) => de_ReleaseSummaries(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ResponseInspectionBodyContainsFailureStrings - */ -const de_ResponseInspectionBodyContainsFailureStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListRegexPatternSetsResponse omitted. -/** - * deserializeAws_json1_1ResponseInspectionBodyContainsSuccessStrings - */ -const de_ResponseInspectionBodyContainsSuccessStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListResourcesForWebACLResponse omitted. + +// de_ListRuleGroupsResponse omitted. + +// de_ListTagsForResourceResponse omitted. + +// de_ListWebACLsResponse omitted. + +// de_LogDestinationConfigs omitted. + +// de_LoggingConfiguration omitted. + +// de_LoggingConfigurations omitted. + +// de_LoggingFilter omitted. + +// de_ManagedRuleGroupConfig omitted. + +// de_ManagedRuleGroupConfigs omitted. /** - * deserializeAws_json1_1ResponseInspectionHeader + * deserializeAws_json1_1ManagedRuleGroupStatement */ -const de_ResponseInspectionHeader = (output: any, context: __SerdeContext): ResponseInspectionHeader => { - return { - FailureValues: - output.FailureValues != null - ? de_ResponseInspectionHeaderFailureValues(output.FailureValues, context) - : undefined, - Name: __expectString(output.Name), - SuccessValues: - output.SuccessValues != null - ? de_ResponseInspectionHeaderSuccessValues(output.SuccessValues, context) - : undefined, - } as any; +const de_ManagedRuleGroupStatement = (output: any, context: __SerdeContext): ManagedRuleGroupStatement => { + return take(output, { + ExcludedRules: _json, + ManagedRuleGroupConfigs: _json, + Name: __expectString, + RuleActionOverrides: _json, + ScopeDownStatement: (_: any) => de_Statement(_, context), + VendorName: __expectString, + Version: __expectString, + }) as any; }; +// de_ManagedRuleGroupSummaries omitted. + +// de_ManagedRuleGroupSummary omitted. + /** - * deserializeAws_json1_1ResponseInspectionHeaderFailureValues + * deserializeAws_json1_1ManagedRuleGroupVersion */ -const de_ResponseInspectionHeaderFailureValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ManagedRuleGroupVersion = (output: any, context: __SerdeContext): ManagedRuleGroupVersion => { + return take(output, { + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + }) as any; }; /** - * deserializeAws_json1_1ResponseInspectionHeaderSuccessValues + * deserializeAws_json1_1ManagedRuleGroupVersions */ -const de_ResponseInspectionHeaderSuccessValues = (output: any, context: __SerdeContext): string[] => { +const de_ManagedRuleGroupVersions = (output: any, context: __SerdeContext): ManagedRuleGroupVersion[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_ManagedRuleGroupVersion(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1ResponseInspectionJson + * deserializeAws_json1_1ManagedRuleSet */ -const de_ResponseInspectionJson = (output: any, context: __SerdeContext): ResponseInspectionJson => { - return { - FailureValues: - output.FailureValues != null ? de_ResponseInspectionJsonFailureValues(output.FailureValues, context) : undefined, - Identifier: __expectString(output.Identifier), - SuccessValues: - output.SuccessValues != null ? de_ResponseInspectionJsonSuccessValues(output.SuccessValues, context) : undefined, - } as any; +const de_ManagedRuleSet = (output: any, context: __SerdeContext): ManagedRuleSet => { + return take(output, { + ARN: __expectString, + Description: __expectString, + Id: __expectString, + LabelNamespace: __expectString, + Name: __expectString, + PublishedVersions: (_: any) => de_PublishedVersions(_, context), + RecommendedVersion: __expectString, + }) as any; }; +// de_ManagedRuleSetSummaries omitted. + +// de_ManagedRuleSetSummary omitted. + /** - * deserializeAws_json1_1ResponseInspectionJsonFailureValues + * deserializeAws_json1_1ManagedRuleSetVersion */ -const de_ResponseInspectionJsonFailureValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_ManagedRuleSetVersion = (output: any, context: __SerdeContext): ManagedRuleSetVersion => { + return take(output, { + AssociatedRuleGroupArn: __expectString, + Capacity: __expectLong, + ExpiryTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ForecastedLifetime: __expectInt32, + LastUpdateTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PublishTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_Method omitted. + /** - * deserializeAws_json1_1ResponseInspectionJsonSuccessValues + * deserializeAws_json1_1MobileSdkRelease */ -const de_ResponseInspectionJsonSuccessValues = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; +const de_MobileSdkRelease = (output: any, context: __SerdeContext): MobileSdkRelease => { + return take(output, { + ReleaseNotes: __expectString, + ReleaseVersion: __expectString, + Tags: _json, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_NoneAction omitted. + /** - * deserializeAws_json1_1ResponseInspectionStatusCode + * deserializeAws_json1_1NotStatement */ -const de_ResponseInspectionStatusCode = (output: any, context: __SerdeContext): ResponseInspectionStatusCode => { - return { - FailureCodes: - output.FailureCodes != null - ? de_ResponseInspectionStatusCodeFailureCodes(output.FailureCodes, context) - : undefined, - SuccessCodes: - output.SuccessCodes != null - ? de_ResponseInspectionStatusCodeSuccessCodes(output.SuccessCodes, context) - : undefined, - } as any; +const de_NotStatement = (output: any, context: __SerdeContext): NotStatement => { + return take(output, { + Statement: (_: any) => de_Statement(_, context), + }) as any; }; /** - * deserializeAws_json1_1ResponseInspectionStatusCodeFailureCodes + * deserializeAws_json1_1OrStatement */ -const de_ResponseInspectionStatusCodeFailureCodes = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; +const de_OrStatement = (output: any, context: __SerdeContext): OrStatement => { + return take(output, { + Statements: (_: any) => de_Statements(_, context), + }) as any; }; +// de_OverrideAction omitted. + +// de_PasswordField omitted. + /** - * deserializeAws_json1_1ResponseInspectionStatusCodeSuccessCodes + * deserializeAws_json1_1PublishedVersions */ -const de_ResponseInspectionStatusCodeSuccessCodes = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; +const de_PublishedVersions = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = de_ManagedRuleSetVersion(value, context); + return acc; + }, {}); }; +// de_PutLoggingConfigurationResponse omitted. + +// de_PutManagedRuleSetVersionsResponse omitted. + +// de_PutPermissionPolicyResponse omitted. + +// de_QueryString omitted. + /** - * deserializeAws_json1_1Rule + * deserializeAws_json1_1RateBasedStatement */ -const de_Rule = (output: any, context: __SerdeContext): Rule => { - return { - Action: output.Action != null ? de_RuleAction(output.Action, context) : undefined, - CaptchaConfig: output.CaptchaConfig != null ? de_CaptchaConfig(output.CaptchaConfig, context) : undefined, - ChallengeConfig: output.ChallengeConfig != null ? de_ChallengeConfig(output.ChallengeConfig, context) : undefined, - Name: __expectString(output.Name), - OverrideAction: output.OverrideAction != null ? de_OverrideAction(output.OverrideAction, context) : undefined, - Priority: __expectInt32(output.Priority), - RuleLabels: output.RuleLabels != null ? de_Labels(output.RuleLabels, context) : undefined, - Statement: output.Statement != null ? de_Statement(output.Statement, context) : undefined, - VisibilityConfig: - output.VisibilityConfig != null ? de_VisibilityConfig(output.VisibilityConfig, context) : undefined, - } as any; +const de_RateBasedStatement = (output: any, context: __SerdeContext): RateBasedStatement => { + return take(output, { + AggregateKeyType: __expectString, + ForwardedIPConfig: _json, + Limit: __expectLong, + ScopeDownStatement: (_: any) => de_Statement(_, context), + }) as any; }; -/** - * deserializeAws_json1_1RuleAction - */ -const de_RuleAction = (output: any, context: __SerdeContext): RuleAction => { - return { - Allow: output.Allow != null ? de_AllowAction(output.Allow, context) : undefined, - Block: output.Block != null ? de_BlockAction(output.Block, context) : undefined, - Captcha: output.Captcha != null ? de_CaptchaAction(output.Captcha, context) : undefined, - Challenge: output.Challenge != null ? de_ChallengeAction(output.Challenge, context) : undefined, - Count: output.Count != null ? de_CountAction(output.Count, context) : undefined, - } as any; -}; +// de_RateBasedStatementManagedKeysIPSet omitted. + +// de_RedactedFields omitted. + +// de_Regex omitted. + +// de_RegexMatchStatement omitted. + +// de_RegexPatternSet omitted. + +// de_RegexPatternSetReferenceStatement omitted. -/** - * deserializeAws_json1_1RuleActionOverride - */ -const de_RuleActionOverride = (output: any, context: __SerdeContext): RuleActionOverride => { - return { - ActionToUse: output.ActionToUse != null ? de_RuleAction(output.ActionToUse, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_RegexPatternSetSummaries omitted. + +// de_RegexPatternSetSummary omitted. + +// de_RegularExpressionList omitted. /** - * deserializeAws_json1_1RuleActionOverrides + * deserializeAws_json1_1ReleaseSummaries */ -const de_RuleActionOverrides = (output: any, context: __SerdeContext): RuleActionOverride[] => { +const de_ReleaseSummaries = (output: any, context: __SerdeContext): ReleaseSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleActionOverride(entry, context); + return de_ReleaseSummary(entry, context); }); return retVal; }; /** - * deserializeAws_json1_1RuleGroup + * deserializeAws_json1_1ReleaseSummary */ -const de_RuleGroup = (output: any, context: __SerdeContext): RuleGroup => { - return { - ARN: __expectString(output.ARN), - AvailableLabels: output.AvailableLabels != null ? de_LabelSummaries(output.AvailableLabels, context) : undefined, - Capacity: __expectLong(output.Capacity), - ConsumedLabels: output.ConsumedLabels != null ? de_LabelSummaries(output.ConsumedLabels, context) : undefined, - CustomResponseBodies: - output.CustomResponseBodies != null ? de_CustomResponseBodies(output.CustomResponseBodies, context) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LabelNamespace: __expectString(output.LabelNamespace), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_Rules(output.Rules, context) : undefined, - VisibilityConfig: - output.VisibilityConfig != null ? de_VisibilityConfig(output.VisibilityConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1RuleGroupReferenceStatement - */ -const de_RuleGroupReferenceStatement = (output: any, context: __SerdeContext): RuleGroupReferenceStatement => { - return { - ARN: __expectString(output.ARN), - ExcludedRules: output.ExcludedRules != null ? de_ExcludedRules(output.ExcludedRules, context) : undefined, - RuleActionOverrides: - output.RuleActionOverrides != null ? de_RuleActionOverrides(output.RuleActionOverrides, context) : undefined, - } as any; +const de_ReleaseSummary = (output: any, context: __SerdeContext): ReleaseSummary => { + return take(output, { + ReleaseVersion: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_RequestBody omitted. + +// de_RequestBodyAssociatedResourceTypeConfig omitted. + +// de_RequestInspection omitted. + +// de_ResourceArns omitted. + +// de_ResponseInspection omitted. + +// de_ResponseInspectionBodyContains omitted. + +// de_ResponseInspectionBodyContainsFailureStrings omitted. + +// de_ResponseInspectionBodyContainsSuccessStrings omitted. + +// de_ResponseInspectionHeader omitted. + +// de_ResponseInspectionHeaderFailureValues omitted. + +// de_ResponseInspectionHeaderSuccessValues omitted. + +// de_ResponseInspectionJson omitted. + +// de_ResponseInspectionJsonFailureValues omitted. + +// de_ResponseInspectionJsonSuccessValues omitted. + +// de_ResponseInspectionStatusCode omitted. + +// de_ResponseInspectionStatusCodeFailureCodes omitted. + +// de_ResponseInspectionStatusCodeSuccessCodes omitted. + /** - * deserializeAws_json1_1RuleGroupSummaries + * deserializeAws_json1_1Rule */ -const de_RuleGroupSummaries = (output: any, context: __SerdeContext): RuleGroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleGroupSummary(entry, context); - }); - return retVal; +const de_Rule = (output: any, context: __SerdeContext): Rule => { + return take(output, { + Action: _json, + CaptchaConfig: _json, + ChallengeConfig: _json, + Name: __expectString, + OverrideAction: _json, + Priority: __expectInt32, + RuleLabels: _json, + Statement: (_: any) => de_Statement(_, context), + VisibilityConfig: _json, + }) as any; }; +// de_RuleAction omitted. + +// de_RuleActionOverride omitted. + +// de_RuleActionOverrides omitted. + /** - * deserializeAws_json1_1RuleGroupSummary + * deserializeAws_json1_1RuleGroup */ -const de_RuleGroupSummary = (output: any, context: __SerdeContext): RuleGroupSummary => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LockToken: __expectString(output.LockToken), - Name: __expectString(output.Name), - } as any; +const de_RuleGroup = (output: any, context: __SerdeContext): RuleGroup => { + return take(output, { + ARN: __expectString, + AvailableLabels: _json, + Capacity: __expectLong, + ConsumedLabels: _json, + CustomResponseBodies: _json, + Description: __expectString, + Id: __expectString, + LabelNamespace: __expectString, + Name: __expectString, + Rules: (_: any) => de_Rules(_, context), + VisibilityConfig: _json, + }) as any; }; +// de_RuleGroupReferenceStatement omitted. + +// de_RuleGroupSummaries omitted. + +// de_RuleGroupSummary omitted. + /** * deserializeAws_json1_1Rules */ @@ -8099,59 +5218,32 @@ const de_Rules = (output: any, context: __SerdeContext): Rule[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Rule(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1RuleSummaries - */ -const de_RuleSummaries = (output: any, context: __SerdeContext): RuleSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RuleSummary(entry, context); - }); - return retVal; -}; +// de_RuleSummaries omitted. -/** - * deserializeAws_json1_1RuleSummary - */ -const de_RuleSummary = (output: any, context: __SerdeContext): RuleSummary => { - return { - Action: output.Action != null ? de_RuleAction(output.Action, context) : undefined, - Name: __expectString(output.Name), - } as any; -}; +// de_RuleSummary omitted. /** * deserializeAws_json1_1SampledHTTPRequest */ const de_SampledHTTPRequest = (output: any, context: __SerdeContext): SampledHTTPRequest => { - return { - Action: __expectString(output.Action), - CaptchaResponse: output.CaptchaResponse != null ? de_CaptchaResponse(output.CaptchaResponse, context) : undefined, - ChallengeResponse: - output.ChallengeResponse != null ? de_ChallengeResponse(output.ChallengeResponse, context) : undefined, - Labels: output.Labels != null ? de_Labels(output.Labels, context) : undefined, - OverriddenAction: __expectString(output.OverriddenAction), - Request: output.Request != null ? de_HTTPRequest(output.Request, context) : undefined, - RequestHeadersInserted: - output.RequestHeadersInserted != null ? de_HTTPHeaders(output.RequestHeadersInserted, context) : undefined, - ResponseCodeSent: __expectInt32(output.ResponseCodeSent), - RuleNameWithinRuleGroup: __expectString(output.RuleNameWithinRuleGroup), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - Weight: __expectLong(output.Weight), - } as any; + return take(output, { + Action: __expectString, + CaptchaResponse: _json, + ChallengeResponse: _json, + Labels: _json, + OverriddenAction: __expectString, + Request: _json, + RequestHeadersInserted: _json, + ResponseCodeSent: __expectInt32, + RuleNameWithinRuleGroup: __expectString, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Weight: __expectLong, + }) as any; }; /** @@ -8161,100 +5253,40 @@ const de_SampledHTTPRequests = (output: any, context: __SerdeContext): SampledHT const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SampledHTTPRequest(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1SingleHeader - */ -const de_SingleHeader = (output: any, context: __SerdeContext): SingleHeader => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_SingleHeader omitted. -/** - * deserializeAws_json1_1SingleQueryArgument - */ -const de_SingleQueryArgument = (output: any, context: __SerdeContext): SingleQueryArgument => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_SingleQueryArgument omitted. -/** - * deserializeAws_json1_1SizeConstraintStatement - */ -const de_SizeConstraintStatement = (output: any, context: __SerdeContext): SizeConstraintStatement => { - return { - ComparisonOperator: __expectString(output.ComparisonOperator), - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - Size: __expectLong(output.Size), - TextTransformations: - output.TextTransformations != null ? de_TextTransformations(output.TextTransformations, context) : undefined, - } as any; -}; +// de_SizeConstraintStatement omitted. -/** - * deserializeAws_json1_1SqliMatchStatement - */ -const de_SqliMatchStatement = (output: any, context: __SerdeContext): SqliMatchStatement => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - SensitivityLevel: __expectString(output.SensitivityLevel), - TextTransformations: - output.TextTransformations != null ? de_TextTransformations(output.TextTransformations, context) : undefined, - } as any; -}; +// de_SqliMatchStatement omitted. /** * deserializeAws_json1_1Statement */ const de_Statement = (output: any, context: __SerdeContext): Statement => { - return { - AndStatement: output.AndStatement != null ? de_AndStatement(output.AndStatement, context) : undefined, - ByteMatchStatement: - output.ByteMatchStatement != null ? de_ByteMatchStatement(output.ByteMatchStatement, context) : undefined, - GeoMatchStatement: - output.GeoMatchStatement != null ? de_GeoMatchStatement(output.GeoMatchStatement, context) : undefined, - IPSetReferenceStatement: - output.IPSetReferenceStatement != null - ? de_IPSetReferenceStatement(output.IPSetReferenceStatement, context) - : undefined, - LabelMatchStatement: - output.LabelMatchStatement != null ? de_LabelMatchStatement(output.LabelMatchStatement, context) : undefined, - ManagedRuleGroupStatement: - output.ManagedRuleGroupStatement != null - ? de_ManagedRuleGroupStatement(output.ManagedRuleGroupStatement, context) - : undefined, - NotStatement: output.NotStatement != null ? de_NotStatement(output.NotStatement, context) : undefined, - OrStatement: output.OrStatement != null ? de_OrStatement(output.OrStatement, context) : undefined, - RateBasedStatement: - output.RateBasedStatement != null ? de_RateBasedStatement(output.RateBasedStatement, context) : undefined, - RegexMatchStatement: - output.RegexMatchStatement != null ? de_RegexMatchStatement(output.RegexMatchStatement, context) : undefined, - RegexPatternSetReferenceStatement: - output.RegexPatternSetReferenceStatement != null - ? de_RegexPatternSetReferenceStatement(output.RegexPatternSetReferenceStatement, context) - : undefined, - RuleGroupReferenceStatement: - output.RuleGroupReferenceStatement != null - ? de_RuleGroupReferenceStatement(output.RuleGroupReferenceStatement, context) - : undefined, - SizeConstraintStatement: - output.SizeConstraintStatement != null - ? de_SizeConstraintStatement(output.SizeConstraintStatement, context) - : undefined, - SqliMatchStatement: - output.SqliMatchStatement != null ? de_SqliMatchStatement(output.SqliMatchStatement, context) : undefined, - XssMatchStatement: - output.XssMatchStatement != null ? de_XssMatchStatement(output.XssMatchStatement, context) : undefined, - } as any; + return take(output, { + AndStatement: (_: any) => de_AndStatement(_, context), + ByteMatchStatement: (_: any) => de_ByteMatchStatement(_, context), + GeoMatchStatement: _json, + IPSetReferenceStatement: _json, + LabelMatchStatement: _json, + ManagedRuleGroupStatement: (_: any) => de_ManagedRuleGroupStatement(_, context), + NotStatement: (_: any) => de_NotStatement(_, context), + OrStatement: (_: any) => de_OrStatement(_, context), + RateBasedStatement: (_: any) => de_RateBasedStatement(_, context), + RegexMatchStatement: _json, + RegexPatternSetReferenceStatement: _json, + RuleGroupReferenceStatement: _json, + SizeConstraintStatement: _json, + SqliMatchStatement: _json, + XssMatchStatement: _json, + }) as any; }; /** @@ -8264,123 +5296,38 @@ const de_Statements = (output: any, context: __SerdeContext): Statement[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Statement(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagInfoForResource - */ -const de_TagInfoForResource = (output: any, context: __SerdeContext): TagInfoForResource => { - return { - ResourceARN: __expectString(output.ResourceARN), - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; +// de_TagInfoForResource omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TextTransformation - */ -const de_TextTransformation = (output: any, context: __SerdeContext): TextTransformation => { - return { - Priority: __expectInt32(output.Priority), - Type: __expectString(output.Type), - } as any; -}; +// de_TextTransformation omitted. -/** - * deserializeAws_json1_1TextTransformations - */ -const de_TextTransformations = (output: any, context: __SerdeContext): TextTransformation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TextTransformation(entry, context); - }); - return retVal; -}; +// de_TextTransformations omitted. /** * deserializeAws_json1_1TimeWindow */ const de_TimeWindow = (output: any, context: __SerdeContext): TimeWindow => { - return { - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; + return take(output, { + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_json1_1TokenDomains - */ -const de_TokenDomains = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TokenDomains omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateIPSetResponse - */ -const de_UpdateIPSetResponse = (output: any, context: __SerdeContext): UpdateIPSetResponse => { - return { - NextLockToken: __expectString(output.NextLockToken), - } as any; -}; +// de_UpdateIPSetResponse omitted. /** * deserializeAws_json1_1UpdateManagedRuleSetVersionExpiryDateResponse @@ -8389,328 +5336,91 @@ const de_UpdateManagedRuleSetVersionExpiryDateResponse = ( output: any, context: __SerdeContext ): UpdateManagedRuleSetVersionExpiryDateResponse => { - return { - ExpiringVersion: __expectString(output.ExpiringVersion), - ExpiryTimestamp: - output.ExpiryTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpiryTimestamp))) - : undefined, - NextLockToken: __expectString(output.NextLockToken), - } as any; + return take(output, { + ExpiringVersion: __expectString, + ExpiryTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextLockToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1UpdateRegexPatternSetResponse - */ -const de_UpdateRegexPatternSetResponse = (output: any, context: __SerdeContext): UpdateRegexPatternSetResponse => { - return { - NextLockToken: __expectString(output.NextLockToken), - } as any; -}; +// de_UpdateRegexPatternSetResponse omitted. -/** - * deserializeAws_json1_1UpdateRuleGroupResponse - */ -const de_UpdateRuleGroupResponse = (output: any, context: __SerdeContext): UpdateRuleGroupResponse => { - return { - NextLockToken: __expectString(output.NextLockToken), - } as any; -}; +// de_UpdateRuleGroupResponse omitted. -/** - * deserializeAws_json1_1UpdateWebACLResponse - */ -const de_UpdateWebACLResponse = (output: any, context: __SerdeContext): UpdateWebACLResponse => { - return { - NextLockToken: __expectString(output.NextLockToken), - } as any; -}; +// de_UpdateWebACLResponse omitted. -/** - * deserializeAws_json1_1UriPath - */ -const de_UriPath = (output: any, context: __SerdeContext): UriPath => { - return {} as any; -}; +// de_UriPath omitted. -/** - * deserializeAws_json1_1UsernameField - */ -const de_UsernameField = (output: any, context: __SerdeContext): UsernameField => { - return { - Identifier: __expectString(output.Identifier), - } as any; -}; +// de_UsernameField omitted. -/** - * deserializeAws_json1_1VisibilityConfig - */ -const de_VisibilityConfig = (output: any, context: __SerdeContext): VisibilityConfig => { - return { - CloudWatchMetricsEnabled: __expectBoolean(output.CloudWatchMetricsEnabled), - MetricName: __expectString(output.MetricName), - SampledRequestsEnabled: __expectBoolean(output.SampledRequestsEnabled), - } as any; -}; +// de_VisibilityConfig omitted. -/** - * deserializeAws_json1_1WAFAssociatedItemException - */ -const de_WAFAssociatedItemException = (output: any, context: __SerdeContext): WAFAssociatedItemException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFAssociatedItemException omitted. -/** - * deserializeAws_json1_1WAFConfigurationWarningException - */ -const de_WAFConfigurationWarningException = ( - output: any, - context: __SerdeContext -): WAFConfigurationWarningException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFConfigurationWarningException omitted. -/** - * deserializeAws_json1_1WAFDuplicateItemException - */ -const de_WAFDuplicateItemException = (output: any, context: __SerdeContext): WAFDuplicateItemException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFDuplicateItemException omitted. -/** - * deserializeAws_json1_1WAFExpiredManagedRuleGroupVersionException - */ -const de_WAFExpiredManagedRuleGroupVersionException = ( - output: any, - context: __SerdeContext -): WAFExpiredManagedRuleGroupVersionException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFExpiredManagedRuleGroupVersionException omitted. -/** - * deserializeAws_json1_1WAFInternalErrorException - */ -const de_WAFInternalErrorException = (output: any, context: __SerdeContext): WAFInternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFInternalErrorException omitted. -/** - * deserializeAws_json1_1WAFInvalidOperationException - */ -const de_WAFInvalidOperationException = (output: any, context: __SerdeContext): WAFInvalidOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFInvalidOperationException omitted. -/** - * deserializeAws_json1_1WAFInvalidParameterException - */ -const de_WAFInvalidParameterException = (output: any, context: __SerdeContext): WAFInvalidParameterException => { - return { - Field: __expectString(output.Field), - Parameter: __expectString(output.Parameter), - Reason: __expectString(output.Reason), - message: __expectString(output.message), - } as any; -}; +// de_WAFInvalidParameterException omitted. -/** - * deserializeAws_json1_1WAFInvalidPermissionPolicyException - */ -const de_WAFInvalidPermissionPolicyException = ( - output: any, - context: __SerdeContext -): WAFInvalidPermissionPolicyException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFInvalidPermissionPolicyException omitted. -/** - * deserializeAws_json1_1WAFInvalidResourceException - */ -const de_WAFInvalidResourceException = (output: any, context: __SerdeContext): WAFInvalidResourceException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFInvalidResourceException omitted. -/** - * deserializeAws_json1_1WAFLimitsExceededException - */ -const de_WAFLimitsExceededException = (output: any, context: __SerdeContext): WAFLimitsExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFLimitsExceededException omitted. -/** - * deserializeAws_json1_1WAFLogDestinationPermissionIssueException - */ -const de_WAFLogDestinationPermissionIssueException = ( - output: any, - context: __SerdeContext -): WAFLogDestinationPermissionIssueException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFLogDestinationPermissionIssueException omitted. -/** - * deserializeAws_json1_1WAFNonexistentItemException - */ -const de_WAFNonexistentItemException = (output: any, context: __SerdeContext): WAFNonexistentItemException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFNonexistentItemException omitted. -/** - * deserializeAws_json1_1WAFOptimisticLockException - */ -const de_WAFOptimisticLockException = (output: any, context: __SerdeContext): WAFOptimisticLockException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFOptimisticLockException omitted. -/** - * deserializeAws_json1_1WAFServiceLinkedRoleErrorException - */ -const de_WAFServiceLinkedRoleErrorException = ( - output: any, - context: __SerdeContext -): WAFServiceLinkedRoleErrorException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WAFServiceLinkedRoleErrorException omitted. -/** - * deserializeAws_json1_1WAFSubscriptionNotFoundException - */ -const de_WAFSubscriptionNotFoundException = ( - output: any, - context: __SerdeContext -): WAFSubscriptionNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFSubscriptionNotFoundException omitted. -/** - * deserializeAws_json1_1WAFTagOperationException - */ -const de_WAFTagOperationException = (output: any, context: __SerdeContext): WAFTagOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFTagOperationException omitted. -/** - * deserializeAws_json1_1WAFTagOperationInternalErrorException - */ -const de_WAFTagOperationInternalErrorException = ( - output: any, - context: __SerdeContext -): WAFTagOperationInternalErrorException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFTagOperationInternalErrorException omitted. -/** - * deserializeAws_json1_1WAFUnavailableEntityException - */ -const de_WAFUnavailableEntityException = (output: any, context: __SerdeContext): WAFUnavailableEntityException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_WAFUnavailableEntityException omitted. /** * deserializeAws_json1_1WebACL */ const de_WebACL = (output: any, context: __SerdeContext): WebACL => { - return { - ARN: __expectString(output.ARN), - AssociationConfig: - output.AssociationConfig != null ? de_AssociationConfig(output.AssociationConfig, context) : undefined, - Capacity: __expectLong(output.Capacity), - CaptchaConfig: output.CaptchaConfig != null ? de_CaptchaConfig(output.CaptchaConfig, context) : undefined, - ChallengeConfig: output.ChallengeConfig != null ? de_ChallengeConfig(output.ChallengeConfig, context) : undefined, - CustomResponseBodies: - output.CustomResponseBodies != null ? de_CustomResponseBodies(output.CustomResponseBodies, context) : undefined, - DefaultAction: output.DefaultAction != null ? de_DefaultAction(output.DefaultAction, context) : undefined, - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LabelNamespace: __expectString(output.LabelNamespace), - ManagedByFirewallManager: __expectBoolean(output.ManagedByFirewallManager), - Name: __expectString(output.Name), - PostProcessFirewallManagerRuleGroups: - output.PostProcessFirewallManagerRuleGroups != null - ? de_FirewallManagerRuleGroups(output.PostProcessFirewallManagerRuleGroups, context) - : undefined, - PreProcessFirewallManagerRuleGroups: - output.PreProcessFirewallManagerRuleGroups != null - ? de_FirewallManagerRuleGroups(output.PreProcessFirewallManagerRuleGroups, context) - : undefined, - Rules: output.Rules != null ? de_Rules(output.Rules, context) : undefined, - TokenDomains: output.TokenDomains != null ? de_TokenDomains(output.TokenDomains, context) : undefined, - VisibilityConfig: - output.VisibilityConfig != null ? de_VisibilityConfig(output.VisibilityConfig, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1WebACLSummaries - */ -const de_WebACLSummaries = (output: any, context: __SerdeContext): WebACLSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WebACLSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1WebACLSummary - */ -const de_WebACLSummary = (output: any, context: __SerdeContext): WebACLSummary => { - return { - ARN: __expectString(output.ARN), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LockToken: __expectString(output.LockToken), - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1XssMatchStatement - */ -const de_XssMatchStatement = (output: any, context: __SerdeContext): XssMatchStatement => { - return { - FieldToMatch: output.FieldToMatch != null ? de_FieldToMatch(output.FieldToMatch, context) : undefined, - TextTransformations: - output.TextTransformations != null ? de_TextTransformations(output.TextTransformations, context) : undefined, - } as any; -}; + return take(output, { + ARN: __expectString, + AssociationConfig: _json, + Capacity: __expectLong, + CaptchaConfig: _json, + ChallengeConfig: _json, + CustomResponseBodies: _json, + DefaultAction: _json, + Description: __expectString, + Id: __expectString, + LabelNamespace: __expectString, + ManagedByFirewallManager: __expectBoolean, + Name: __expectString, + PostProcessFirewallManagerRuleGroups: (_: any) => de_FirewallManagerRuleGroups(_, context), + PreProcessFirewallManagerRuleGroups: (_: any) => de_FirewallManagerRuleGroups(_, context), + Rules: (_: any) => de_Rules(_, context), + TokenDomains: _json, + VisibilityConfig: _json, + }) as any; +}; + +// de_WebACLSummaries omitted. + +// de_WebACLSummary omitted. + +// de_XssMatchStatement omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -8732,6 +5442,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts b/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts index 217afa6c96f0..0bb319b8a5cc 100644 --- a/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts +++ b/clients/client-wellarchitected/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -9,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -99,52 +101,23 @@ import { import { UpgradeLensReviewCommandInput, UpgradeLensReviewCommandOutput } from "../commands/UpgradeLensReviewCommand"; import { AccessDeniedException, - AdditionalResources, - Answer, - AnswerSummary, - BestPractice, CheckDetail, - CheckStatus, CheckSummary, - Choice, - ChoiceAnswer, - ChoiceAnswerSummary, - ChoiceContent, - ChoiceImprovementPlan, ChoiceUpdate, ConflictException, ConsolidatedReportMetric, - ImprovementSummary, InternalServerException, - Lens, - LensMetric, LensReview, - LensReviewReport, LensReviewSummary, - LensShareSummary, LensSummary, - LensUpgradeSummary, Milestone, MilestoneSummary, - NotificationSummary, - PillarDifference, - PillarMetric, - PillarReviewSummary, - QuestionDifference, - QuestionMetric, ResourceNotFoundException, - Risk, ServiceQuotaExceededException, - ShareInvitation, - ShareInvitationSummary, ThrottlingException, ValidationException, - ValidationExceptionField, - VersionDifferences, Workload, WorkloadDiscoveryConfig, - WorkloadShare, - WorkloadShareSummary, WorkloadSummary, } from "../models/models_0"; import { WellArchitectedServiceException as __BaseException } from "../models/WellArchitectedServiceException"; @@ -164,9 +137,11 @@ export const se_AssociateLensesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/associateLenses"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.LensAliases != null && { LensAliases: se_LensAliases(input.LensAliases, context) }), - }); + body = JSON.stringify( + take(input, { + LensAliases: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -193,10 +168,12 @@ export const se_CreateLensShareCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares"; resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias!, "{LensAlias}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.SharedWith != null && { SharedWith: input.SharedWith }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + SharedWith: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -223,11 +200,13 @@ export const se_CreateLensVersionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versions"; resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias!, "{LensAlias}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.IsMajorVersion != null && { IsMajorVersion: input.IsMajorVersion }), - ...(input.LensVersion != null && { LensVersion: input.LensVersion }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + IsMajorVersion: [], + LensVersion: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -254,10 +233,12 @@ export const se_CreateMilestoneCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/milestones"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + MilestoneName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -282,29 +263,27 @@ export const se_CreateWorkloadCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads"; let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_WorkloadAccountIds(input.AccountIds, context) }), - ...(input.Applications != null && { Applications: se_WorkloadApplications(input.Applications, context) }), - ...(input.ArchitecturalDesign != null && { ArchitecturalDesign: input.ArchitecturalDesign }), - ...(input.AwsRegions != null && { AwsRegions: se_WorkloadAwsRegions(input.AwsRegions, context) }), - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.DiscoveryConfig != null && { - DiscoveryConfig: se_WorkloadDiscoveryConfig(input.DiscoveryConfig, context), - }), - ...(input.Environment != null && { Environment: input.Environment }), - ...(input.Industry != null && { Industry: input.Industry }), - ...(input.IndustryType != null && { IndustryType: input.IndustryType }), - ...(input.Lenses != null && { Lenses: se_WorkloadLenses(input.Lenses, context) }), - ...(input.NonAwsRegions != null && { NonAwsRegions: se_WorkloadNonAwsRegions(input.NonAwsRegions, context) }), - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.PillarPriorities != null && { - PillarPriorities: se_WorkloadPillarPriorities(input.PillarPriorities, context), - }), - ...(input.ReviewOwner != null && { ReviewOwner: input.ReviewOwner }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - ...(input.WorkloadName != null && { WorkloadName: input.WorkloadName }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + Applications: (_) => _json(_), + ArchitecturalDesign: [], + AwsRegions: (_) => _json(_), + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + DiscoveryConfig: (_) => _json(_), + Environment: [], + Industry: [], + IndustryType: [], + Lenses: (_) => _json(_), + NonAwsRegions: (_) => _json(_), + Notes: [], + PillarPriorities: (_) => _json(_), + ReviewOwner: [], + Tags: (_) => _json(_), + WorkloadName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -331,11 +310,13 @@ export const se_CreateWorkloadShareCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.PermissionType != null && { PermissionType: input.PermissionType }), - ...(input.SharedWith != null && { SharedWith: input.SharedWith }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + PermissionType: [], + SharedWith: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -476,9 +457,11 @@ export const se_DisassociateLensesCommand = async ( "/workloads/{WorkloadId}/disassociateLenses"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.LensAliases != null && { LensAliases: se_LensAliases(input.LensAliases, context) }), - }); + body = JSON.stringify( + take(input, { + LensAliases: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -766,12 +749,14 @@ export const se_ImportLensCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importLens"; let body: any; - body = JSON.stringify({ - ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(), - ...(input.JSONString != null && { JSONString: input.JSONString }), - ...(input.LensAlias != null && { LensAlias: input.LensAlias }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: (_) => _ ?? generateIdempotencyToken(), + JSONString: [], + LensAlias: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -831,14 +816,16 @@ export const se_ListCheckDetailsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/checks"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.ChoiceId != null && { ChoiceId: input.ChoiceId }), - ...(input.LensArn != null && { LensArn: input.LensArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PillarId != null && { PillarId: input.PillarId }), - ...(input.QuestionId != null && { QuestionId: input.QuestionId }), - }); + body = JSON.stringify( + take(input, { + ChoiceId: [], + LensArn: [], + MaxResults: [], + NextToken: [], + PillarId: [], + QuestionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -865,14 +852,16 @@ export const se_ListCheckSummariesCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/checkSummaries"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.ChoiceId != null && { ChoiceId: input.ChoiceId }), - ...(input.LensArn != null && { LensArn: input.LensArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.PillarId != null && { PillarId: input.PillarId }), - ...(input.QuestionId != null && { QuestionId: input.QuestionId }), - }); + body = JSON.stringify( + take(input, { + ChoiceId: [], + LensArn: [], + MaxResults: [], + NextToken: [], + PillarId: [], + QuestionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1024,10 +1013,12 @@ export const se_ListMilestonesCommand = async ( "/workloads/{WorkloadId}/milestonesSummaries"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1052,11 +1043,13 @@ export const se_ListNotificationsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/notifications"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkloadId != null && { WorkloadId: input.WorkloadId }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + WorkloadId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1134,11 +1127,13 @@ export const se_ListWorkloadsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkloadNamePrefix != null && { WorkloadNamePrefix: input.WorkloadNamePrefix }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + WorkloadNamePrefix: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1195,9 +1190,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn!, "{WorkloadArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1257,13 +1254,15 @@ export const se_UpdateAnswerCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias!, "{LensAlias}", false); resolvedPath = __resolvedPath(resolvedPath, input, "QuestionId", () => input.QuestionId!, "{QuestionId}", false); let body: any; - body = JSON.stringify({ - ...(input.ChoiceUpdates != null && { ChoiceUpdates: se_ChoiceUpdates(input.ChoiceUpdates, context) }), - ...(input.IsApplicable != null && { IsApplicable: input.IsApplicable }), - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.SelectedChoices != null && { SelectedChoices: se_SelectedChoices(input.SelectedChoices, context) }), - }); + body = JSON.stringify( + take(input, { + ChoiceUpdates: (_) => _json(_), + IsApplicable: [], + Notes: [], + Reason: [], + SelectedChoices: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1288,9 +1287,11 @@ export const se_UpdateGlobalSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-settings"; let body: any; - body = JSON.stringify({ - ...(input.OrganizationSharingStatus != null && { OrganizationSharingStatus: input.OrganizationSharingStatus }), - }); + body = JSON.stringify( + take(input, { + OrganizationSharingStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1319,10 +1320,12 @@ export const se_UpdateLensReviewCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias!, "{LensAlias}", false); let body: any; - body = JSON.stringify({ - ...(input.LensNotes != null && { LensNotes: input.LensNotes }), - ...(input.PillarNotes != null && { PillarNotes: se_PillarNotes(input.PillarNotes, context) }), - }); + body = JSON.stringify( + take(input, { + LensNotes: [], + PillarNotes: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1356,9 +1359,11 @@ export const se_UpdateShareInvitationCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.ShareInvitationAction != null && { ShareInvitationAction: input.ShareInvitationAction }), - }); + body = JSON.stringify( + take(input, { + ShareInvitationAction: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1384,30 +1389,26 @@ export const se_UpdateWorkloadCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}"; resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.AccountIds != null && { AccountIds: se_WorkloadAccountIds(input.AccountIds, context) }), - ...(input.Applications != null && { Applications: se_WorkloadApplications(input.Applications, context) }), - ...(input.ArchitecturalDesign != null && { ArchitecturalDesign: input.ArchitecturalDesign }), - ...(input.AwsRegions != null && { AwsRegions: se_WorkloadAwsRegions(input.AwsRegions, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.DiscoveryConfig != null && { - DiscoveryConfig: se_WorkloadDiscoveryConfig(input.DiscoveryConfig, context), - }), - ...(input.Environment != null && { Environment: input.Environment }), - ...(input.ImprovementStatus != null && { ImprovementStatus: input.ImprovementStatus }), - ...(input.Industry != null && { Industry: input.Industry }), - ...(input.IndustryType != null && { IndustryType: input.IndustryType }), - ...(input.IsReviewOwnerUpdateAcknowledged != null && { - IsReviewOwnerUpdateAcknowledged: input.IsReviewOwnerUpdateAcknowledged, - }), - ...(input.NonAwsRegions != null && { NonAwsRegions: se_WorkloadNonAwsRegions(input.NonAwsRegions, context) }), - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.PillarPriorities != null && { - PillarPriorities: se_WorkloadPillarPriorities(input.PillarPriorities, context), - }), - ...(input.ReviewOwner != null && { ReviewOwner: input.ReviewOwner }), - ...(input.WorkloadName != null && { WorkloadName: input.WorkloadName }), - }); + body = JSON.stringify( + take(input, { + AccountIds: (_) => _json(_), + Applications: (_) => _json(_), + ArchitecturalDesign: [], + AwsRegions: (_) => _json(_), + Description: [], + DiscoveryConfig: (_) => _json(_), + Environment: [], + ImprovementStatus: [], + Industry: [], + IndustryType: [], + IsReviewOwnerUpdateAcknowledged: [], + NonAwsRegions: (_) => _json(_), + Notes: [], + PillarPriorities: (_) => _json(_), + ReviewOwner: [], + WorkloadName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1435,9 +1436,11 @@ export const se_UpdateWorkloadShareCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "ShareId", () => input.ShareId!, "{ShareId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); let body: any; - body = JSON.stringify({ - ...(input.PermissionType != null && { PermissionType: input.PermissionType }), - }); + body = JSON.stringify( + take(input, { + PermissionType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1466,10 +1469,12 @@ export const se_UpgradeLensReviewCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "WorkloadId", () => input.WorkloadId!, "{WorkloadId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "LensAlias", () => input.LensAlias!, "{LensAlias}", false); let body: any; - body = JSON.stringify({ - ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }), - ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }), - }); + body = JSON.stringify( + take(input, { + ClientRequestToken: [], + MilestoneName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1531,10 +1536,9 @@ const de_AssociateLensesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1554,9 +1558,10 @@ export const de_CreateLensShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ShareId != null) { - contents.ShareId = __expectString(data.ShareId); - } + const doc = take(data, { + ShareId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1596,10 +1601,9 @@ const de_CreateLensShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1619,12 +1623,11 @@ export const de_CreateLensVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.LensVersion != null) { - contents.LensVersion = __expectString(data.LensVersion); - } + const doc = take(data, { + LensArn: __expectString, + LensVersion: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1664,10 +1667,9 @@ const de_CreateLensVersionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1687,12 +1689,11 @@ export const de_CreateMilestoneCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1732,10 +1733,9 @@ const de_CreateMilestoneCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1755,12 +1755,11 @@ export const de_CreateWorkloadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.WorkloadArn != null) { - contents.WorkloadArn = __expectString(data.WorkloadArn); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + WorkloadArn: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1800,10 +1799,9 @@ const de_CreateWorkloadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1823,12 +1821,11 @@ export const de_CreateWorkloadShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ShareId != null) { - contents.ShareId = __expectString(data.ShareId); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + ShareId: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1868,10 +1865,9 @@ const de_CreateWorkloadShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1927,10 +1923,9 @@ const de_DeleteLensCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1986,10 +1981,9 @@ const de_DeleteLensShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2045,10 +2039,9 @@ const de_DeleteWorkloadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2104,10 +2097,9 @@ const de_DeleteWorkloadShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2163,10 +2155,9 @@ const de_DisassociateLensesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2186,9 +2177,10 @@ export const de_ExportLensCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensJSON != null) { - contents.LensJSON = __expectString(data.LensJSON); - } + const doc = take(data, { + LensJSON: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2222,10 +2214,9 @@ const de_ExportLensCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2245,21 +2236,14 @@ export const de_GetAnswerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Answer != null) { - contents.Answer = de_Answer(data.Answer, context); - } - if (data.LensAlias != null) { - contents.LensAlias = __expectString(data.LensAlias); - } - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + Answer: _json, + LensAlias: __expectString, + LensArn: __expectString, + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2293,10 +2277,9 @@ const de_GetAnswerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2316,15 +2299,12 @@ export const de_GetConsolidatedReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Base64String != null) { - contents.Base64String = __expectString(data.Base64String); - } - if (data.Metrics != null) { - contents.Metrics = de_ConsolidatedReportMetrics(data.Metrics, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Base64String: __expectString, + Metrics: (_) => de_ConsolidatedReportMetrics(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2358,10 +2338,9 @@ const de_GetConsolidatedReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2381,9 +2360,10 @@ export const de_GetLensCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Lens != null) { - contents.Lens = de_Lens(data.Lens, context); - } + const doc = take(data, { + Lens: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2417,10 +2397,9 @@ const de_GetLensCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2440,15 +2419,12 @@ export const de_GetLensReviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensReview != null) { - contents.LensReview = de_LensReview(data.LensReview, context); - } - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + LensReview: (_) => de_LensReview(_, context), + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2482,10 +2458,9 @@ const de_GetLensReviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2505,15 +2480,12 @@ export const de_GetLensReviewReportCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensReviewReport != null) { - contents.LensReviewReport = de_LensReviewReport(data.LensReviewReport, context); - } - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + LensReviewReport: _json, + MilestoneNumber: __expectInt32, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2547,10 +2519,9 @@ const de_GetLensReviewReportCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2570,24 +2541,15 @@ export const de_GetLensVersionDifferenceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.BaseLensVersion != null) { - contents.BaseLensVersion = __expectString(data.BaseLensVersion); - } - if (data.LatestLensVersion != null) { - contents.LatestLensVersion = __expectString(data.LatestLensVersion); - } - if (data.LensAlias != null) { - contents.LensAlias = __expectString(data.LensAlias); - } - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.TargetLensVersion != null) { - contents.TargetLensVersion = __expectString(data.TargetLensVersion); - } - if (data.VersionDifferences != null) { - contents.VersionDifferences = de_VersionDifferences(data.VersionDifferences, context); - } + const doc = take(data, { + BaseLensVersion: __expectString, + LatestLensVersion: __expectString, + LensAlias: __expectString, + LensArn: __expectString, + TargetLensVersion: __expectString, + VersionDifferences: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2621,10 +2583,9 @@ const de_GetLensVersionDifferenceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2644,12 +2605,11 @@ export const de_GetMilestoneCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Milestone != null) { - contents.Milestone = de_Milestone(data.Milestone, context); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + Milestone: (_) => de_Milestone(_, context), + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2683,10 +2643,9 @@ const de_GetMilestoneCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2706,9 +2665,10 @@ export const de_GetWorkloadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Workload != null) { - contents.Workload = de_Workload(data.Workload, context); - } + const doc = take(data, { + Workload: (_) => de_Workload(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2742,10 +2702,9 @@ const de_GetWorkloadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2765,12 +2724,11 @@ export const de_ImportLensCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } + const doc = take(data, { + LensArn: __expectString, + Status: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2810,10 +2768,9 @@ const de_ImportLensCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2833,24 +2790,15 @@ export const de_ListAnswersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AnswerSummaries != null) { - contents.AnswerSummaries = de_AnswerSummaries(data.AnswerSummaries, context); - } - if (data.LensAlias != null) { - contents.LensAlias = __expectString(data.LensAlias); - } - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + AnswerSummaries: _json, + LensAlias: __expectString, + LensArn: __expectString, + MilestoneNumber: __expectInt32, + NextToken: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2884,10 +2832,9 @@ const de_ListAnswersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2907,12 +2854,11 @@ export const de_ListCheckDetailsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CheckDetails != null) { - contents.CheckDetails = de_CheckDetails(data.CheckDetails, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CheckDetails: (_) => de_CheckDetails(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2946,10 +2892,9 @@ const de_ListCheckDetailsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2969,12 +2914,11 @@ export const de_ListCheckSummariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CheckSummaries != null) { - contents.CheckSummaries = de_CheckSummaries(data.CheckSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + CheckSummaries: (_) => de_CheckSummaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3008,10 +2952,9 @@ const de_ListCheckSummariesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3031,12 +2974,11 @@ export const de_ListLensesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensSummaries != null) { - contents.LensSummaries = de_LensSummaries(data.LensSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LensSummaries: (_) => de_LensSummaries(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3067,10 +3009,9 @@ const de_ListLensesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3090,24 +3031,15 @@ export const de_ListLensReviewImprovementsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ImprovementSummaries != null) { - contents.ImprovementSummaries = de_ImprovementSummaries(data.ImprovementSummaries, context); - } - if (data.LensAlias != null) { - contents.LensAlias = __expectString(data.LensAlias); - } - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + ImprovementSummaries: _json, + LensAlias: __expectString, + LensArn: __expectString, + MilestoneNumber: __expectInt32, + NextToken: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3141,10 +3073,9 @@ const de_ListLensReviewImprovementsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3164,18 +3095,13 @@ export const de_ListLensReviewsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensReviewSummaries != null) { - contents.LensReviewSummaries = de_LensReviewSummaries(data.LensReviewSummaries, context); - } - if (data.MilestoneNumber != null) { - contents.MilestoneNumber = __expectInt32(data.MilestoneNumber); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + LensReviewSummaries: (_) => de_LensReviewSummaries(_, context), + MilestoneNumber: __expectInt32, + NextToken: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3209,10 +3135,9 @@ const de_ListLensReviewsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3232,12 +3157,11 @@ export const de_ListLensSharesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensShareSummaries != null) { - contents.LensShareSummaries = de_LensShareSummaries(data.LensShareSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + LensShareSummaries: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3271,10 +3195,9 @@ const de_ListLensSharesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3294,15 +3217,12 @@ export const de_ListMilestonesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.MilestoneSummaries != null) { - contents.MilestoneSummaries = de_MilestoneSummaries(data.MilestoneSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + MilestoneSummaries: (_) => de_MilestoneSummaries(_, context), + NextToken: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3336,10 +3256,9 @@ const de_ListMilestonesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3359,12 +3278,11 @@ export const de_ListNotificationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.NotificationSummaries != null) { - contents.NotificationSummaries = de_NotificationSummaries(data.NotificationSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + NotificationSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3395,10 +3313,9 @@ const de_ListNotificationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3418,12 +3335,11 @@ export const de_ListShareInvitationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ShareInvitationSummaries != null) { - contents.ShareInvitationSummaries = de_ShareInvitationSummaries(data.ShareInvitationSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + ShareInvitationSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3454,10 +3370,9 @@ const de_ListShareInvitationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3477,9 +3392,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3504,10 +3420,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3527,12 +3442,11 @@ export const de_ListWorkloadsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkloadSummaries != null) { - contents.WorkloadSummaries = de_WorkloadSummaries(data.WorkloadSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + WorkloadSummaries: (_) => de_WorkloadSummaries(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3563,10 +3477,9 @@ const de_ListWorkloadsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3586,15 +3499,12 @@ export const de_ListWorkloadSharesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } - if (data.WorkloadShareSummaries != null) { - contents.WorkloadShareSummaries = de_WorkloadShareSummaries(data.WorkloadShareSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + WorkloadId: __expectString, + WorkloadShareSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3628,10 +3538,9 @@ const de_ListWorkloadSharesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3675,10 +3584,9 @@ const de_TagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3722,10 +3630,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3745,18 +3652,13 @@ export const de_UpdateAnswerCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Answer != null) { - contents.Answer = de_Answer(data.Answer, context); - } - if (data.LensAlias != null) { - contents.LensAlias = __expectString(data.LensAlias); - } - if (data.LensArn != null) { - contents.LensArn = __expectString(data.LensArn); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + Answer: _json, + LensAlias: __expectString, + LensArn: __expectString, + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3793,10 +3695,9 @@ const de_UpdateAnswerCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3849,10 +3750,9 @@ const de_UpdateGlobalSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3872,12 +3772,11 @@ export const de_UpdateLensReviewCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LensReview != null) { - contents.LensReview = de_LensReview(data.LensReview, context); - } - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } + const doc = take(data, { + LensReview: (_) => de_LensReview(_, context), + WorkloadId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3914,10 +3813,9 @@ const de_UpdateLensReviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3937,9 +3835,10 @@ export const de_UpdateShareInvitationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ShareInvitation != null) { - contents.ShareInvitation = de_ShareInvitation(data.ShareInvitation, context); - } + const doc = take(data, { + ShareInvitation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3976,10 +3875,9 @@ const de_UpdateShareInvitationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3999,9 +3897,10 @@ export const de_UpdateWorkloadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Workload != null) { - contents.Workload = de_Workload(data.Workload, context); - } + const doc = take(data, { + Workload: (_) => de_Workload(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4038,10 +3937,9 @@ const de_UpdateWorkloadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4061,12 +3959,11 @@ export const de_UpdateWorkloadShareCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.WorkloadId != null) { - contents.WorkloadId = __expectString(data.WorkloadId); - } - if (data.WorkloadShare != null) { - contents.WorkloadShare = de_WorkloadShare(data.WorkloadShare, context); - } + const doc = take(data, { + WorkloadId: __expectString, + WorkloadShare: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4103,10 +4000,9 @@ const de_UpdateWorkloadShareCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4162,16 +4058,15 @@ const de_UpgradeLensReviewCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4181,9 +4076,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4197,15 +4093,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4222,9 +4115,10 @@ const de_InternalServerExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4241,15 +4135,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } + const doc = take(data, { + Message: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4266,21 +4157,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ResourceId != null) { - contents.ResourceId = __expectString(data.ResourceId); - } - if (data.ResourceType != null) { - contents.ResourceType = __expectString(data.ResourceType); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ResourceId: __expectString, + ResourceType: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4294,15 +4178,12 @@ const de_ServiceQuotaExceededExceptionRes = async ( const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.QuotaCode != null) { - contents.QuotaCode = __expectString(data.QuotaCode); - } - if (data.ServiceCode != null) { - contents.ServiceCode = __expectString(data.ServiceCode); - } + const doc = take(data, { + Message: __expectString, + QuotaCode: __expectString, + ServiceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4316,15 +4197,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Fields != null) { - contents.Fields = de_ValidationExceptionFieldList(data.Fields, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.Reason != null) { - contents.Reason = __expectString(data.Reason); - } + const doc = take(data, { + Fields: _json, + Message: __expectString, + Reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4332,612 +4210,195 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1ChoiceUpdate - */ -const se_ChoiceUpdate = (input: ChoiceUpdate, context: __SerdeContext): any => { - return { - ...(input.Notes != null && { Notes: input.Notes }), - ...(input.Reason != null && { Reason: input.Reason }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_ChoiceUpdate omitted. + +// se_ChoiceUpdates omitted. + +// se_LensAliases omitted. + +// se_PillarNotes omitted. + +// se_SelectedChoices omitted. + +// se_TagMap omitted. + +// se_WorkloadAccountIds omitted. + +// se_WorkloadApplications omitted. + +// se_WorkloadAwsRegions omitted. + +// se_WorkloadDiscoveryConfig omitted. + +// se_WorkloadLenses omitted. + +// se_WorkloadNonAwsRegions omitted. + +// se_WorkloadPillarPriorities omitted. + +// de_AccountSummary omitted. + +// de_AdditionalResources omitted. + +// de_AdditionalResourcesList omitted. + +// de_Answer omitted. + +// de_AnswerSummaries omitted. + +// de_AnswerSummary omitted. + +// de_BestPractice omitted. + +// de_BestPractices omitted. /** - * serializeAws_restJson1ChoiceUpdates + * deserializeAws_restJson1CheckDetail */ -const se_ChoiceUpdates = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ChoiceUpdate(value, context); - return acc; - }, {}); +const de_CheckDetail = (output: any, context: __SerdeContext): CheckDetail => { + return take(output, { + AccountId: __expectString, + ChoiceId: __expectString, + Description: __expectString, + FlaggedResources: __expectInt32, + Id: __expectString, + LensArn: __expectString, + Name: __expectString, + PillarId: __expectString, + Provider: __expectString, + QuestionId: __expectString, + Reason: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * serializeAws_restJson1LensAliases + * deserializeAws_restJson1CheckDetails */ -const se_LensAliases = (input: string[], context: __SerdeContext): any => { - return input +const de_CheckDetails = (output: any, context: __SerdeContext): CheckDetail[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_CheckDetail(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1PillarNotes - */ -const se_PillarNotes = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1SelectedChoices + * deserializeAws_restJson1CheckSummaries */ -const se_SelectedChoices = (input: string[], context: __SerdeContext): any => { - return input +const de_CheckSummaries = (output: any, context: __SerdeContext): CheckSummary[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_CheckSummary(entry, context); }); + return retVal; }; /** - * serializeAws_restJson1TagMap + * deserializeAws_restJson1CheckSummary */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); +const de_CheckSummary = (output: any, context: __SerdeContext): CheckSummary => { + return take(output, { + AccountSummary: _json, + ChoiceId: __expectString, + Description: __expectString, + Id: __expectString, + LensArn: __expectString, + Name: __expectString, + PillarId: __expectString, + Provider: __expectString, + QuestionId: __expectString, + Status: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_Choice omitted. + +// de_ChoiceAnswer omitted. + +// de_ChoiceAnswers omitted. + +// de_ChoiceAnswerSummaries omitted. + +// de_ChoiceAnswerSummary omitted. + +// de_ChoiceContent omitted. + +// de_ChoiceImprovementPlan omitted. + +// de_ChoiceImprovementPlans omitted. + +// de_Choices omitted. + /** - * serializeAws_restJson1WorkloadAccountIds + * deserializeAws_restJson1ConsolidatedReportMetric */ -const se_WorkloadAccountIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_ConsolidatedReportMetric = (output: any, context: __SerdeContext): ConsolidatedReportMetric => { + return take(output, { + Lenses: _json, + LensesAppliedCount: __expectInt32, + MetricType: __expectString, + RiskCounts: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkloadArn: __expectString, + WorkloadId: __expectString, + WorkloadName: __expectString, + }) as any; }; /** - * serializeAws_restJson1WorkloadApplications + * deserializeAws_restJson1ConsolidatedReportMetrics */ -const se_WorkloadApplications = (input: string[], context: __SerdeContext): any => { - return input +const de_ConsolidatedReportMetrics = (output: any, context: __SerdeContext): ConsolidatedReportMetric[] => { + const retVal = (output || []) .filter((e: any) => e != null) - .map((entry) => { - return entry; + .map((entry: any) => { + return de_ConsolidatedReportMetric(entry, context); }); + return retVal; }; +// de_ImprovementSummaries omitted. + +// de_ImprovementSummary omitted. + +// de_Lens omitted. + +// de_LensMetric omitted. + +// de_LensMetrics omitted. + /** - * serializeAws_restJson1WorkloadAwsRegions + * deserializeAws_restJson1LensReview */ -const se_WorkloadAwsRegions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const de_LensReview = (output: any, context: __SerdeContext): LensReview => { + return take(output, { + LensAlias: __expectString, + LensArn: __expectString, + LensName: __expectString, + LensStatus: __expectString, + LensVersion: __expectString, + NextToken: __expectString, + Notes: __expectString, + PillarReviewSummaries: _json, + RiskCounts: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; +// de_LensReviewReport omitted. + /** - * serializeAws_restJson1WorkloadDiscoveryConfig - */ -const se_WorkloadDiscoveryConfig = (input: WorkloadDiscoveryConfig, context: __SerdeContext): any => { - return { - ...(input.TrustedAdvisorIntegrationStatus != null && { - TrustedAdvisorIntegrationStatus: input.TrustedAdvisorIntegrationStatus, - }), - }; -}; - -/** - * serializeAws_restJson1WorkloadLenses - */ -const se_WorkloadLenses = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1WorkloadNonAwsRegions - */ -const se_WorkloadNonAwsRegions = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1WorkloadPillarPriorities - */ -const se_WorkloadPillarPriorities = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * deserializeAws_restJson1AccountSummary - */ -const de_AccountSummary = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [CheckStatus | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_restJson1AdditionalResources - */ -const de_AdditionalResources = (output: any, context: __SerdeContext): AdditionalResources => { - return { - Content: output.Content != null ? de_Urls(output.Content, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1AdditionalResourcesList - */ -const de_AdditionalResourcesList = (output: any, context: __SerdeContext): AdditionalResources[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AdditionalResources(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Answer - */ -const de_Answer = (output: any, context: __SerdeContext): Answer => { - return { - ChoiceAnswers: output.ChoiceAnswers != null ? de_ChoiceAnswers(output.ChoiceAnswers, context) : undefined, - Choices: output.Choices != null ? de_Choices(output.Choices, context) : undefined, - HelpfulResourceDisplayText: __expectString(output.HelpfulResourceDisplayText), - HelpfulResourceUrl: __expectString(output.HelpfulResourceUrl), - ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl), - IsApplicable: __expectBoolean(output.IsApplicable), - Notes: __expectString(output.Notes), - PillarId: __expectString(output.PillarId), - QuestionDescription: __expectString(output.QuestionDescription), - QuestionId: __expectString(output.QuestionId), - QuestionTitle: __expectString(output.QuestionTitle), - Reason: __expectString(output.Reason), - Risk: __expectString(output.Risk), - SelectedChoices: output.SelectedChoices != null ? de_SelectedChoices(output.SelectedChoices, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1AnswerSummaries - */ -const de_AnswerSummaries = (output: any, context: __SerdeContext): AnswerSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnswerSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1AnswerSummary - */ -const de_AnswerSummary = (output: any, context: __SerdeContext): AnswerSummary => { - return { - ChoiceAnswerSummaries: - output.ChoiceAnswerSummaries != null - ? de_ChoiceAnswerSummaries(output.ChoiceAnswerSummaries, context) - : undefined, - Choices: output.Choices != null ? de_Choices(output.Choices, context) : undefined, - IsApplicable: __expectBoolean(output.IsApplicable), - PillarId: __expectString(output.PillarId), - QuestionId: __expectString(output.QuestionId), - QuestionTitle: __expectString(output.QuestionTitle), - Reason: __expectString(output.Reason), - Risk: __expectString(output.Risk), - SelectedChoices: output.SelectedChoices != null ? de_SelectedChoices(output.SelectedChoices, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1BestPractice - */ -const de_BestPractice = (output: any, context: __SerdeContext): BestPractice => { - return { - ChoiceId: __expectString(output.ChoiceId), - ChoiceTitle: __expectString(output.ChoiceTitle), - } as any; -}; - -/** - * deserializeAws_restJson1BestPractices - */ -const de_BestPractices = (output: any, context: __SerdeContext): BestPractice[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BestPractice(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CheckDetail - */ -const de_CheckDetail = (output: any, context: __SerdeContext): CheckDetail => { - return { - AccountId: __expectString(output.AccountId), - ChoiceId: __expectString(output.ChoiceId), - Description: __expectString(output.Description), - FlaggedResources: __expectInt32(output.FlaggedResources), - Id: __expectString(output.Id), - LensArn: __expectString(output.LensArn), - Name: __expectString(output.Name), - PillarId: __expectString(output.PillarId), - Provider: __expectString(output.Provider), - QuestionId: __expectString(output.QuestionId), - Reason: __expectString(output.Reason), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1CheckDetails - */ -const de_CheckDetails = (output: any, context: __SerdeContext): CheckDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CheckDetail(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CheckSummaries - */ -const de_CheckSummaries = (output: any, context: __SerdeContext): CheckSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_CheckSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1CheckSummary - */ -const de_CheckSummary = (output: any, context: __SerdeContext): CheckSummary => { - return { - AccountSummary: output.AccountSummary != null ? de_AccountSummary(output.AccountSummary, context) : undefined, - ChoiceId: __expectString(output.ChoiceId), - Description: __expectString(output.Description), - Id: __expectString(output.Id), - LensArn: __expectString(output.LensArn), - Name: __expectString(output.Name), - PillarId: __expectString(output.PillarId), - Provider: __expectString(output.Provider), - QuestionId: __expectString(output.QuestionId), - Status: __expectString(output.Status), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1Choice - */ -const de_Choice = (output: any, context: __SerdeContext): Choice => { - return { - AdditionalResources: - output.AdditionalResources != null ? de_AdditionalResourcesList(output.AdditionalResources, context) : undefined, - ChoiceId: __expectString(output.ChoiceId), - Description: __expectString(output.Description), - HelpfulResource: output.HelpfulResource != null ? de_ChoiceContent(output.HelpfulResource, context) : undefined, - ImprovementPlan: output.ImprovementPlan != null ? de_ChoiceContent(output.ImprovementPlan, context) : undefined, - Title: __expectString(output.Title), - } as any; -}; - -/** - * deserializeAws_restJson1ChoiceAnswer - */ -const de_ChoiceAnswer = (output: any, context: __SerdeContext): ChoiceAnswer => { - return { - ChoiceId: __expectString(output.ChoiceId), - Notes: __expectString(output.Notes), - Reason: __expectString(output.Reason), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1ChoiceAnswers - */ -const de_ChoiceAnswers = (output: any, context: __SerdeContext): ChoiceAnswer[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChoiceAnswer(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChoiceAnswerSummaries - */ -const de_ChoiceAnswerSummaries = (output: any, context: __SerdeContext): ChoiceAnswerSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChoiceAnswerSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ChoiceAnswerSummary - */ -const de_ChoiceAnswerSummary = (output: any, context: __SerdeContext): ChoiceAnswerSummary => { - return { - ChoiceId: __expectString(output.ChoiceId), - Reason: __expectString(output.Reason), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_restJson1ChoiceContent - */ -const de_ChoiceContent = (output: any, context: __SerdeContext): ChoiceContent => { - return { - DisplayText: __expectString(output.DisplayText), - Url: __expectString(output.Url), - } as any; -}; - -/** - * deserializeAws_restJson1ChoiceImprovementPlan - */ -const de_ChoiceImprovementPlan = (output: any, context: __SerdeContext): ChoiceImprovementPlan => { - return { - ChoiceId: __expectString(output.ChoiceId), - DisplayText: __expectString(output.DisplayText), - ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl), - } as any; -}; - -/** - * deserializeAws_restJson1ChoiceImprovementPlans - */ -const de_ChoiceImprovementPlans = (output: any, context: __SerdeContext): ChoiceImprovementPlan[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChoiceImprovementPlan(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1Choices - */ -const de_Choices = (output: any, context: __SerdeContext): Choice[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Choice(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ConsolidatedReportMetric - */ -const de_ConsolidatedReportMetric = (output: any, context: __SerdeContext): ConsolidatedReportMetric => { - return { - Lenses: output.Lenses != null ? de_LensMetrics(output.Lenses, context) : undefined, - LensesAppliedCount: __expectInt32(output.LensesAppliedCount), - MetricType: __expectString(output.MetricType), - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WorkloadArn: __expectString(output.WorkloadArn), - WorkloadId: __expectString(output.WorkloadId), - WorkloadName: __expectString(output.WorkloadName), - } as any; -}; - -/** - * deserializeAws_restJson1ConsolidatedReportMetrics - */ -const de_ConsolidatedReportMetrics = (output: any, context: __SerdeContext): ConsolidatedReportMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConsolidatedReportMetric(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ImprovementSummaries - */ -const de_ImprovementSummaries = (output: any, context: __SerdeContext): ImprovementSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImprovementSummary(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1ImprovementSummary - */ -const de_ImprovementSummary = (output: any, context: __SerdeContext): ImprovementSummary => { - return { - ImprovementPlanUrl: __expectString(output.ImprovementPlanUrl), - ImprovementPlans: - output.ImprovementPlans != null ? de_ChoiceImprovementPlans(output.ImprovementPlans, context) : undefined, - PillarId: __expectString(output.PillarId), - QuestionId: __expectString(output.QuestionId), - QuestionTitle: __expectString(output.QuestionTitle), - Risk: __expectString(output.Risk), - } as any; -}; - -/** - * deserializeAws_restJson1Lens - */ -const de_Lens = (output: any, context: __SerdeContext): Lens => { - return { - Description: __expectString(output.Description), - LensArn: __expectString(output.LensArn), - LensVersion: __expectString(output.LensVersion), - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - ShareInvitationId: __expectString(output.ShareInvitationId), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LensMetric - */ -const de_LensMetric = (output: any, context: __SerdeContext): LensMetric => { - return { - LensArn: __expectString(output.LensArn), - Pillars: output.Pillars != null ? de_PillarMetrics(output.Pillars, context) : undefined, - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LensMetrics - */ -const de_LensMetrics = (output: any, context: __SerdeContext): LensMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LensMetric(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_restJson1LensReview - */ -const de_LensReview = (output: any, context: __SerdeContext): LensReview => { - return { - LensAlias: __expectString(output.LensAlias), - LensArn: __expectString(output.LensArn), - LensName: __expectString(output.LensName), - LensStatus: __expectString(output.LensStatus), - LensVersion: __expectString(output.LensVersion), - NextToken: __expectString(output.NextToken), - Notes: __expectString(output.Notes), - PillarReviewSummaries: - output.PillarReviewSummaries != null - ? de_PillarReviewSummaries(output.PillarReviewSummaries, context) - : undefined, - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1LensReviewReport - */ -const de_LensReviewReport = (output: any, context: __SerdeContext): LensReviewReport => { - return { - Base64String: __expectString(output.Base64String), - LensAlias: __expectString(output.LensAlias), - LensArn: __expectString(output.LensArn), - } as any; -}; - -/** - * deserializeAws_restJson1LensReviewSummaries + * deserializeAws_restJson1LensReviewSummaries */ const de_LensReviewSummaries = (output: any, context: __SerdeContext): LensReviewSummary[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LensReviewSummary(entry, context); }); return retVal; @@ -4947,44 +4408,20 @@ const de_LensReviewSummaries = (output: any, context: __SerdeContext): LensRevie * deserializeAws_restJson1LensReviewSummary */ const de_LensReviewSummary = (output: any, context: __SerdeContext): LensReviewSummary => { - return { - LensAlias: __expectString(output.LensAlias), - LensArn: __expectString(output.LensArn), - LensName: __expectString(output.LensName), - LensStatus: __expectString(output.LensStatus), - LensVersion: __expectString(output.LensVersion), - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + LensAlias: __expectString, + LensArn: __expectString, + LensName: __expectString, + LensStatus: __expectString, + LensVersion: __expectString, + RiskCounts: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1LensShareSummaries - */ -const de_LensShareSummaries = (output: any, context: __SerdeContext): LensShareSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_LensShareSummary(entry, context); - }); - return retVal; -}; +// de_LensShareSummaries omitted. -/** - * deserializeAws_restJson1LensShareSummary - */ -const de_LensShareSummary = (output: any, context: __SerdeContext): LensShareSummary => { - return { - ShareId: __expectString(output.ShareId), - SharedWith: __expectString(output.SharedWith), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_LensShareSummary omitted. /** * deserializeAws_restJson1LensSummaries @@ -4993,9 +4430,6 @@ const de_LensSummaries = (output: any, context: __SerdeContext): LensSummary[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_LensSummary(entry, context); }); return retVal; @@ -5005,47 +4439,32 @@ const de_LensSummaries = (output: any, context: __SerdeContext): LensSummary[] = * deserializeAws_restJson1LensSummary */ const de_LensSummary = (output: any, context: __SerdeContext): LensSummary => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - Description: __expectString(output.Description), - LensAlias: __expectString(output.LensAlias), - LensArn: __expectString(output.LensArn), - LensName: __expectString(output.LensName), - LensStatus: __expectString(output.LensStatus), - LensType: __expectString(output.LensType), - LensVersion: __expectString(output.LensVersion), - Owner: __expectString(output.Owner), - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + LensAlias: __expectString, + LensArn: __expectString, + LensName: __expectString, + LensStatus: __expectString, + LensType: __expectString, + LensVersion: __expectString, + Owner: __expectString, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1LensUpgradeSummary - */ -const de_LensUpgradeSummary = (output: any, context: __SerdeContext): LensUpgradeSummary => { - return { - CurrentLensVersion: __expectString(output.CurrentLensVersion), - LatestLensVersion: __expectString(output.LatestLensVersion), - LensAlias: __expectString(output.LensAlias), - LensArn: __expectString(output.LensArn), - WorkloadId: __expectString(output.WorkloadId), - WorkloadName: __expectString(output.WorkloadName), - } as any; -}; +// de_LensUpgradeSummary omitted. /** * deserializeAws_restJson1Milestone */ const de_Milestone = (output: any, context: __SerdeContext): Milestone => { - return { - MilestoneName: __expectString(output.MilestoneName), - MilestoneNumber: __expectInt32(output.MilestoneNumber), - RecordedAt: - output.RecordedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RecordedAt))) : undefined, - Workload: output.Workload != null ? de_Workload(output.Workload, context) : undefined, - } as any; + return take(output, { + MilestoneName: __expectString, + MilestoneNumber: __expectInt32, + RecordedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Workload: (_: any) => de_Workload(_, context), + }) as any; }; /** @@ -5055,9 +4474,6 @@ const de_MilestoneSummaries = (output: any, context: __SerdeContext): MilestoneS const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MilestoneSummary(entry, context); }); return retVal; @@ -5067,490 +4483,110 @@ const de_MilestoneSummaries = (output: any, context: __SerdeContext): MilestoneS * deserializeAws_restJson1MilestoneSummary */ const de_MilestoneSummary = (output: any, context: __SerdeContext): MilestoneSummary => { - return { - MilestoneName: __expectString(output.MilestoneName), - MilestoneNumber: __expectInt32(output.MilestoneNumber), - RecordedAt: - output.RecordedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RecordedAt))) : undefined, - WorkloadSummary: output.WorkloadSummary != null ? de_WorkloadSummary(output.WorkloadSummary, context) : undefined, - } as any; + return take(output, { + MilestoneName: __expectString, + MilestoneNumber: __expectInt32, + RecordedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkloadSummary: (_: any) => de_WorkloadSummary(_, context), + }) as any; }; -/** - * deserializeAws_restJson1NotificationSummaries - */ -const de_NotificationSummaries = (output: any, context: __SerdeContext): NotificationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotificationSummary(entry, context); - }); - return retVal; -}; +// de_NotificationSummaries omitted. -/** - * deserializeAws_restJson1NotificationSummary - */ -const de_NotificationSummary = (output: any, context: __SerdeContext): NotificationSummary => { - return { - LensUpgradeSummary: - output.LensUpgradeSummary != null ? de_LensUpgradeSummary(output.LensUpgradeSummary, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_NotificationSummary omitted. -/** - * deserializeAws_restJson1PillarDifference - */ -const de_PillarDifference = (output: any, context: __SerdeContext): PillarDifference => { - return { - DifferenceStatus: __expectString(output.DifferenceStatus), - PillarId: __expectString(output.PillarId), - PillarName: __expectString(output.PillarName), - QuestionDifferences: - output.QuestionDifferences != null ? de_QuestionDifferences(output.QuestionDifferences, context) : undefined, - } as any; -}; +// de_PillarDifference omitted. -/** - * deserializeAws_restJson1PillarDifferences - */ -const de_PillarDifferences = (output: any, context: __SerdeContext): PillarDifference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PillarDifference(entry, context); - }); - return retVal; -}; +// de_PillarDifferences omitted. -/** - * deserializeAws_restJson1PillarMetric - */ -const de_PillarMetric = (output: any, context: __SerdeContext): PillarMetric => { - return { - PillarId: __expectString(output.PillarId), - Questions: output.Questions != null ? de_QuestionMetrics(output.Questions, context) : undefined, - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - } as any; -}; +// de_PillarMetric omitted. -/** - * deserializeAws_restJson1PillarMetrics - */ -const de_PillarMetrics = (output: any, context: __SerdeContext): PillarMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PillarMetric(entry, context); - }); - return retVal; -}; +// de_PillarMetrics omitted. -/** - * deserializeAws_restJson1PillarReviewSummaries - */ -const de_PillarReviewSummaries = (output: any, context: __SerdeContext): PillarReviewSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PillarReviewSummary(entry, context); - }); - return retVal; -}; +// de_PillarReviewSummaries omitted. -/** - * deserializeAws_restJson1PillarReviewSummary - */ -const de_PillarReviewSummary = (output: any, context: __SerdeContext): PillarReviewSummary => { - return { - Notes: __expectString(output.Notes), - PillarId: __expectString(output.PillarId), - PillarName: __expectString(output.PillarName), - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - } as any; -}; +// de_PillarReviewSummary omitted. -/** - * deserializeAws_restJson1QuestionDifference - */ -const de_QuestionDifference = (output: any, context: __SerdeContext): QuestionDifference => { - return { - DifferenceStatus: __expectString(output.DifferenceStatus), - QuestionId: __expectString(output.QuestionId), - QuestionTitle: __expectString(output.QuestionTitle), - } as any; -}; +// de_QuestionDifference omitted. -/** - * deserializeAws_restJson1QuestionDifferences - */ -const de_QuestionDifferences = (output: any, context: __SerdeContext): QuestionDifference[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QuestionDifference(entry, context); - }); - return retVal; -}; +// de_QuestionDifferences omitted. -/** - * deserializeAws_restJson1QuestionMetric - */ -const de_QuestionMetric = (output: any, context: __SerdeContext): QuestionMetric => { - return { - BestPractices: output.BestPractices != null ? de_BestPractices(output.BestPractices, context) : undefined, - QuestionId: __expectString(output.QuestionId), - Risk: __expectString(output.Risk), - } as any; -}; +// de_QuestionMetric omitted. -/** - * deserializeAws_restJson1QuestionMetrics - */ -const de_QuestionMetrics = (output: any, context: __SerdeContext): QuestionMetric[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_QuestionMetric(entry, context); - }); - return retVal; -}; +// de_QuestionMetrics omitted. -/** - * deserializeAws_restJson1RiskCounts - */ -const de_RiskCounts = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [Risk | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_RiskCounts omitted. -/** - * deserializeAws_restJson1SelectedChoices - */ -const de_SelectedChoices = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SelectedChoices omitted. -/** - * deserializeAws_restJson1ShareInvitation - */ -const de_ShareInvitation = (output: any, context: __SerdeContext): ShareInvitation => { - return { - LensAlias: __expectString(output.LensAlias), - LensArn: __expectString(output.LensArn), - ShareInvitationId: __expectString(output.ShareInvitationId), - ShareResourceType: __expectString(output.ShareResourceType), - WorkloadId: __expectString(output.WorkloadId), - } as any; -}; +// de_ShareInvitation omitted. -/** - * deserializeAws_restJson1ShareInvitationSummaries - */ -const de_ShareInvitationSummaries = (output: any, context: __SerdeContext): ShareInvitationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ShareInvitationSummary(entry, context); - }); - return retVal; -}; +// de_ShareInvitationSummaries omitted. -/** - * deserializeAws_restJson1ShareInvitationSummary - */ -const de_ShareInvitationSummary = (output: any, context: __SerdeContext): ShareInvitationSummary => { - return { - LensArn: __expectString(output.LensArn), - LensName: __expectString(output.LensName), - PermissionType: __expectString(output.PermissionType), - ShareInvitationId: __expectString(output.ShareInvitationId), - ShareResourceType: __expectString(output.ShareResourceType), - SharedBy: __expectString(output.SharedBy), - SharedWith: __expectString(output.SharedWith), - WorkloadId: __expectString(output.WorkloadId), - WorkloadName: __expectString(output.WorkloadName), - } as any; -}; +// de_ShareInvitationSummary omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. -/** - * deserializeAws_restJson1Urls - */ -const de_Urls = (output: any, context: __SerdeContext): ChoiceContent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ChoiceContent(entry, context); - }); - return retVal; -}; +// de_Urls omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_ValidationExceptionField omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionFieldList omitted. -/** - * deserializeAws_restJson1VersionDifferences - */ -const de_VersionDifferences = (output: any, context: __SerdeContext): VersionDifferences => { - return { - PillarDifferences: - output.PillarDifferences != null ? de_PillarDifferences(output.PillarDifferences, context) : undefined, - } as any; -}; +// de_VersionDifferences omitted. /** * deserializeAws_restJson1Workload */ const de_Workload = (output: any, context: __SerdeContext): Workload => { - return { - AccountIds: output.AccountIds != null ? de_WorkloadAccountIds(output.AccountIds, context) : undefined, - Applications: output.Applications != null ? de_WorkloadApplications(output.Applications, context) : undefined, - ArchitecturalDesign: __expectString(output.ArchitecturalDesign), - AwsRegions: output.AwsRegions != null ? de_WorkloadAwsRegions(output.AwsRegions, context) : undefined, - Description: __expectString(output.Description), - DiscoveryConfig: - output.DiscoveryConfig != null ? de_WorkloadDiscoveryConfig(output.DiscoveryConfig, context) : undefined, - Environment: __expectString(output.Environment), - ImprovementStatus: __expectString(output.ImprovementStatus), - Industry: __expectString(output.Industry), - IndustryType: __expectString(output.IndustryType), - IsReviewOwnerUpdateAcknowledged: __expectBoolean(output.IsReviewOwnerUpdateAcknowledged), - Lenses: output.Lenses != null ? de_WorkloadLenses(output.Lenses, context) : undefined, - NonAwsRegions: output.NonAwsRegions != null ? de_WorkloadNonAwsRegions(output.NonAwsRegions, context) : undefined, - Notes: __expectString(output.Notes), - Owner: __expectString(output.Owner), - PillarPriorities: - output.PillarPriorities != null ? de_WorkloadPillarPriorities(output.PillarPriorities, context) : undefined, - ReviewOwner: __expectString(output.ReviewOwner), - ReviewRestrictionDate: - output.ReviewRestrictionDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReviewRestrictionDate))) - : undefined, - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - ShareInvitationId: __expectString(output.ShareInvitationId), - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WorkloadArn: __expectString(output.WorkloadArn), - WorkloadId: __expectString(output.WorkloadId), - WorkloadName: __expectString(output.WorkloadName), - } as any; -}; - -/** - * deserializeAws_restJson1WorkloadAccountIds - */ -const de_WorkloadAccountIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + AccountIds: _json, + Applications: _json, + ArchitecturalDesign: __expectString, + AwsRegions: _json, + Description: __expectString, + DiscoveryConfig: _json, + Environment: __expectString, + ImprovementStatus: __expectString, + Industry: __expectString, + IndustryType: __expectString, + IsReviewOwnerUpdateAcknowledged: __expectBoolean, + Lenses: _json, + NonAwsRegions: _json, + Notes: __expectString, + Owner: __expectString, + PillarPriorities: _json, + ReviewOwner: __expectString, + ReviewRestrictionDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RiskCounts: _json, + ShareInvitationId: __expectString, + Tags: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkloadArn: __expectString, + WorkloadId: __expectString, + WorkloadName: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1WorkloadApplications - */ -const de_WorkloadApplications = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkloadAccountIds omitted. -/** - * deserializeAws_restJson1WorkloadAwsRegions - */ -const de_WorkloadAwsRegions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkloadApplications omitted. -/** - * deserializeAws_restJson1WorkloadDiscoveryConfig - */ -const de_WorkloadDiscoveryConfig = (output: any, context: __SerdeContext): WorkloadDiscoveryConfig => { - return { - TrustedAdvisorIntegrationStatus: __expectString(output.TrustedAdvisorIntegrationStatus), - } as any; -}; +// de_WorkloadAwsRegions omitted. -/** - * deserializeAws_restJson1WorkloadLenses - */ -const de_WorkloadLenses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkloadDiscoveryConfig omitted. -/** - * deserializeAws_restJson1WorkloadNonAwsRegions - */ -const de_WorkloadNonAwsRegions = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkloadLenses omitted. -/** - * deserializeAws_restJson1WorkloadPillarPriorities - */ -const de_WorkloadPillarPriorities = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_WorkloadNonAwsRegions omitted. -/** - * deserializeAws_restJson1WorkloadShare - */ -const de_WorkloadShare = (output: any, context: __SerdeContext): WorkloadShare => { - return { - PermissionType: __expectString(output.PermissionType), - ShareId: __expectString(output.ShareId), - SharedBy: __expectString(output.SharedBy), - SharedWith: __expectString(output.SharedWith), - Status: __expectString(output.Status), - WorkloadId: __expectString(output.WorkloadId), - WorkloadName: __expectString(output.WorkloadName), - } as any; -}; +// de_WorkloadPillarPriorities omitted. -/** - * deserializeAws_restJson1WorkloadShareSummaries - */ -const de_WorkloadShareSummaries = (output: any, context: __SerdeContext): WorkloadShareSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkloadShareSummary(entry, context); - }); - return retVal; -}; +// de_WorkloadShare omitted. -/** - * deserializeAws_restJson1WorkloadShareSummary - */ -const de_WorkloadShareSummary = (output: any, context: __SerdeContext): WorkloadShareSummary => { - return { - PermissionType: __expectString(output.PermissionType), - ShareId: __expectString(output.ShareId), - SharedWith: __expectString(output.SharedWith), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_WorkloadShareSummaries omitted. + +// de_WorkloadShareSummary omitted. /** * deserializeAws_restJson1WorkloadSummaries @@ -5559,9 +4595,6 @@ const de_WorkloadSummaries = (output: any, context: __SerdeContext): WorkloadSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkloadSummary(entry, context); }); return retVal; @@ -5571,17 +4604,16 @@ const de_WorkloadSummaries = (output: any, context: __SerdeContext): WorkloadSum * deserializeAws_restJson1WorkloadSummary */ const de_WorkloadSummary = (output: any, context: __SerdeContext): WorkloadSummary => { - return { - ImprovementStatus: __expectString(output.ImprovementStatus), - Lenses: output.Lenses != null ? de_WorkloadLenses(output.Lenses, context) : undefined, - Owner: __expectString(output.Owner), - RiskCounts: output.RiskCounts != null ? de_RiskCounts(output.RiskCounts, context) : undefined, - UpdatedAt: - output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined, - WorkloadArn: __expectString(output.WorkloadArn), - WorkloadId: __expectString(output.WorkloadId), - WorkloadName: __expectString(output.WorkloadName), - } as any; + return take(output, { + ImprovementStatus: __expectString, + Lenses: _json, + Owner: __expectString, + RiskCounts: _json, + UpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkloadArn: __expectString, + WorkloadId: __expectString, + WorkloadName: __expectString, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/clients/client-wisdom/src/protocols/Aws_restJson1.ts b/clients/client-wisdom/src/protocols/Aws_restJson1.ts index 8be0526c1ceb..b554b413e076 100644 --- a/clients/client-wisdom/src/protocols/Aws_restJson1.ts +++ b/clients/client-wisdom/src/protocols/Aws_restJson1.ts @@ -1,8 +1,8 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, @@ -10,10 +10,11 @@ import { expectUnion as __expectUnion, extendedEncodeURIComponent as __extendedEncodeURIComponent, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -86,37 +87,19 @@ import { import { AccessDeniedException, AppIntegrationsConfiguration, - AssistantAssociationData, AssistantAssociationInputData, - AssistantAssociationOutputData, - AssistantAssociationSummary, - AssistantData, - AssistantSummary, ConflictException, ContentData, - ContentReference, - ContentSummary, - Document, - DocumentText, Filter, - Highlight, - KnowledgeBaseAssociationData, KnowledgeBaseData, - KnowledgeBaseSummary, - NotifyRecommendationsReceivedError, PreconditionFailedException, - QueryRecommendationTriggerData, RecommendationData, - RecommendationTrigger, - RecommendationTriggerData, RenderingConfiguration, ResourceNotFoundException, ResultData, SearchExpression, ServerSideEncryptionConfiguration, ServiceQuotaExceededException, - SessionData, - SessionSummary, SourceConfiguration, TooManyTagsException, ValidationException, @@ -136,19 +119,16 @@ export const se_CreateAssistantCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.serverSideEncryptionConfiguration != null && { - serverSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration( - input.serverSideEncryptionConfiguration, - context - ), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.type != null && { type: input.type }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + serverSideEncryptionConfiguration: (_) => _json(_), + tags: (_) => _json(_), + type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -175,12 +155,14 @@ export const se_CreateAssistantAssociationCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/associations"; resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); let body: any; - body = JSON.stringify({ - ...(input.association != null && { association: se_AssistantAssociationInputData(input.association, context) }), - ...(input.associationType != null && { associationType: input.associationType }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + association: (_) => _json(_), + associationType: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -215,15 +197,17 @@ export const se_CreateContentCommand = async ( false ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.metadata != null && { metadata: se_ContentMetadata(input.metadata, context) }), - ...(input.name != null && { name: input.name }), - ...(input.overrideLinkOutUri != null && { overrideLinkOutUri: input.overrideLinkOutUri }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - ...(input.title != null && { title: input.title }), - ...(input.uploadId != null && { uploadId: input.uploadId }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + metadata: (_) => _json(_), + name: [], + overrideLinkOutUri: [], + tags: (_) => _json(_), + title: [], + uploadId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -248,25 +232,18 @@ export const se_CreateKnowledgeBaseCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/knowledgeBases"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.knowledgeBaseType != null && { knowledgeBaseType: input.knowledgeBaseType }), - ...(input.name != null && { name: input.name }), - ...(input.renderingConfiguration != null && { - renderingConfiguration: se_RenderingConfiguration(input.renderingConfiguration, context), - }), - ...(input.serverSideEncryptionConfiguration != null && { - serverSideEncryptionConfiguration: se_ServerSideEncryptionConfiguration( - input.serverSideEncryptionConfiguration, - context - ), - }), - ...(input.sourceConfiguration != null && { - sourceConfiguration: se_SourceConfiguration(input.sourceConfiguration, context), - }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + knowledgeBaseType: [], + name: [], + renderingConfiguration: (_) => _json(_), + serverSideEncryptionConfiguration: (_) => _json(_), + sourceConfiguration: (_) => _json(_), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -293,12 +270,14 @@ export const se_CreateSessionCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/sessions"; resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.description != null && { description: input.description }), - ...(input.name != null && { name: input.name }), - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + description: [], + name: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -802,11 +781,11 @@ export const se_NotifyRecommendationsReceivedCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "sessionId", () => input.sessionId!, "{sessionId}", false); let body: any; - body = JSON.stringify({ - ...(input.recommendationIds != null && { - recommendationIds: se_RecommendationIdList(input.recommendationIds, context), - }), - }); + body = JSON.stringify( + take(input, { + recommendationIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -833,11 +812,13 @@ export const se_QueryAssistantCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/assistants/{assistantId}/query"; resolvedPath = __resolvedPath(resolvedPath, input, "assistantId", () => input.assistantId!, "{assistantId}", false); let body: any; - body = JSON.stringify({ - ...(input.maxResults != null && { maxResults: input.maxResults }), - ...(input.nextToken != null && { nextToken: input.nextToken }), - ...(input.queryText != null && { queryText: input.queryText }), - }); + body = JSON.stringify( + take(input, { + maxResults: [], + nextToken: [], + queryText: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -907,9 +888,11 @@ export const se_SearchContentCommand = async ( maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.searchExpression != null && { searchExpression: se_SearchExpression(input.searchExpression, context) }), - }); + body = JSON.stringify( + take(input, { + searchExpression: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -941,9 +924,11 @@ export const se_SearchSessionsCommand = async ( maxResults: [() => input.maxResults !== void 0, () => input.maxResults!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.searchExpression != null && { searchExpression: se_SearchExpression(input.searchExpression, context) }), - }); + body = JSON.stringify( + take(input, { + searchExpression: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -978,9 +963,11 @@ export const se_StartContentUploadCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.contentType != null && { contentType: input.contentType }), - }); + body = JSON.stringify( + take(input, { + contentType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1006,9 +993,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.tags != null && { tags: se_Tags(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1074,14 +1063,16 @@ export const se_UpdateContentCommand = async ( ); resolvedPath = __resolvedPath(resolvedPath, input, "contentId", () => input.contentId!, "{contentId}", false); let body: any; - body = JSON.stringify({ - ...(input.metadata != null && { metadata: se_ContentMetadata(input.metadata, context) }), - ...(input.overrideLinkOutUri != null && { overrideLinkOutUri: input.overrideLinkOutUri }), - ...(input.removeOverrideLinkOutUri != null && { removeOverrideLinkOutUri: input.removeOverrideLinkOutUri }), - ...(input.revisionId != null && { revisionId: input.revisionId }), - ...(input.title != null && { title: input.title }), - ...(input.uploadId != null && { uploadId: input.uploadId }), - }); + body = JSON.stringify( + take(input, { + metadata: (_) => _json(_), + overrideLinkOutUri: [], + removeOverrideLinkOutUri: [], + revisionId: [], + title: [], + uploadId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1116,9 +1107,11 @@ export const se_UpdateKnowledgeBaseTemplateUriCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.templateUri != null && { templateUri: input.templateUri }), - }); + body = JSON.stringify( + take(input, { + templateUri: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1144,9 +1137,10 @@ export const de_CreateAssistantCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assistant != null) { - contents.assistant = de_AssistantData(data.assistant, context); - } + const doc = take(data, { + assistant: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1177,10 +1171,9 @@ const de_CreateAssistantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1200,9 +1193,10 @@ export const de_CreateAssistantAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assistantAssociation != null) { - contents.assistantAssociation = de_AssistantAssociationData(data.assistantAssociation, context); - } + const doc = take(data, { + assistantAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1236,10 +1230,9 @@ const de_CreateAssistantAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1259,9 +1252,10 @@ export const de_CreateContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.content != null) { - contents.content = de_ContentData(data.content, context); - } + const doc = take(data, { + content: (_) => de_ContentData(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1295,10 +1289,9 @@ const de_CreateContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1318,9 +1311,10 @@ export const de_CreateKnowledgeBaseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.knowledgeBase != null) { - contents.knowledgeBase = de_KnowledgeBaseData(data.knowledgeBase, context); - } + const doc = take(data, { + knowledgeBase: (_) => de_KnowledgeBaseData(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1351,10 +1345,9 @@ const de_CreateKnowledgeBaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1374,9 +1367,10 @@ export const de_CreateSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_SessionData(data.session, context); - } + const doc = take(data, { + session: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1404,10 +1398,9 @@ const de_CreateSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1454,10 +1447,9 @@ const de_DeleteAssistantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1504,10 +1496,9 @@ const de_DeleteAssistantAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1554,10 +1545,9 @@ const de_DeleteContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1607,10 +1597,9 @@ const de_DeleteKnowledgeBaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1630,9 +1619,10 @@ export const de_GetAssistantCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assistant != null) { - contents.assistant = de_AssistantData(data.assistant, context); - } + const doc = take(data, { + assistant: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1660,10 +1650,9 @@ const de_GetAssistantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1683,9 +1672,10 @@ export const de_GetAssistantAssociationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assistantAssociation != null) { - contents.assistantAssociation = de_AssistantAssociationData(data.assistantAssociation, context); - } + const doc = take(data, { + assistantAssociation: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1713,10 +1703,9 @@ const de_GetAssistantAssociationCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1736,9 +1725,10 @@ export const de_GetContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.content != null) { - contents.content = de_ContentData(data.content, context); - } + const doc = take(data, { + content: (_) => de_ContentData(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1766,10 +1756,9 @@ const de_GetContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1789,9 +1778,10 @@ export const de_GetContentSummaryCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentSummary != null) { - contents.contentSummary = de_ContentSummary(data.contentSummary, context); - } + const doc = take(data, { + contentSummary: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1819,10 +1809,9 @@ const de_GetContentSummaryCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1842,9 +1831,10 @@ export const de_GetKnowledgeBaseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.knowledgeBase != null) { - contents.knowledgeBase = de_KnowledgeBaseData(data.knowledgeBase, context); - } + const doc = take(data, { + knowledgeBase: (_) => de_KnowledgeBaseData(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1872,10 +1862,9 @@ const de_GetKnowledgeBaseCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1895,12 +1884,11 @@ export const de_GetRecommendationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.recommendations != null) { - contents.recommendations = de_RecommendationList(data.recommendations, context); - } - if (data.triggers != null) { - contents.triggers = de_RecommendationTriggerList(data.triggers, context); - } + const doc = take(data, { + recommendations: (_) => de_RecommendationList(_, context), + triggers: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1928,10 +1916,9 @@ const de_GetRecommendationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1951,9 +1938,10 @@ export const de_GetSessionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.session != null) { - contents.session = de_SessionData(data.session, context); - } + const doc = take(data, { + session: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1981,10 +1969,9 @@ const de_GetSessionCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2004,15 +1991,11 @@ export const de_ListAssistantAssociationsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assistantAssociationSummaries != null) { - contents.assistantAssociationSummaries = de_AssistantAssociationSummaryList( - data.assistantAssociationSummaries, - context - ); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assistantAssociationSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2040,10 +2023,9 @@ const de_ListAssistantAssociationsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2063,12 +2045,11 @@ export const de_ListAssistantsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.assistantSummaries != null) { - contents.assistantSummaries = de_AssistantList(data.assistantSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + assistantSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2093,10 +2074,9 @@ const de_ListAssistantsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2116,12 +2096,11 @@ export const de_ListContentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentSummaries != null) { - contents.contentSummaries = de_ContentSummaryList(data.contentSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + contentSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2149,10 +2128,9 @@ const de_ListContentsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2172,12 +2150,11 @@ export const de_ListKnowledgeBasesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.knowledgeBaseSummaries != null) { - contents.knowledgeBaseSummaries = de_KnowledgeBaseList(data.knowledgeBaseSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + knowledgeBaseSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2202,10 +2179,9 @@ const de_ListKnowledgeBasesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2225,9 +2201,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_Tags(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2249,10 +2226,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2272,12 +2248,11 @@ export const de_NotifyRecommendationsReceivedCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.errors != null) { - contents.errors = de_NotifyRecommendationsReceivedErrorList(data.errors, context); - } - if (data.recommendationIds != null) { - contents.recommendationIds = de_RecommendationIdList(data.recommendationIds, context); - } + const doc = take(data, { + errors: _json, + recommendationIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2305,10 +2280,9 @@ const de_NotifyRecommendationsReceivedCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2328,12 +2302,11 @@ export const de_QueryAssistantCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.results != null) { - contents.results = de_QueryResultsList(data.results, context); - } + const doc = take(data, { + nextToken: __expectString, + results: (_) => de_QueryResultsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2361,10 +2334,9 @@ const de_QueryAssistantCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2411,10 +2383,9 @@ const de_RemoveKnowledgeBaseTemplateUriCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2434,12 +2405,11 @@ export const de_SearchContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contentSummaries != null) { - contents.contentSummaries = de_ContentSummaryList(data.contentSummaries, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + contentSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2467,10 +2437,9 @@ const de_SearchContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2490,12 +2459,11 @@ export const de_SearchSessionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.sessionSummaries != null) { - contents.sessionSummaries = de_SessionSummaries(data.sessionSummaries, context); - } + const doc = take(data, { + nextToken: __expectString, + sessionSummaries: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2523,10 +2491,9 @@ const de_SearchSessionsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2546,18 +2513,13 @@ export const de_StartContentUploadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.headersToInclude != null) { - contents.headersToInclude = de_Headers(data.headersToInclude, context); - } - if (data.uploadId != null) { - contents.uploadId = __expectString(data.uploadId); - } - if (data.url != null) { - contents.url = __expectString(data.url); - } - if (data.urlExpiry != null) { - contents.urlExpiry = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.urlExpiry))); - } + const doc = take(data, { + headersToInclude: _json, + uploadId: __expectString, + url: __expectString, + urlExpiry: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2585,10 +2547,9 @@ const de_StartContentUploadCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2632,10 +2593,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2676,10 +2636,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2699,9 +2658,10 @@ export const de_UpdateContentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.content != null) { - contents.content = de_ContentData(data.content, context); - } + const doc = take(data, { + content: (_) => de_ContentData(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2732,10 +2692,9 @@ const de_UpdateContentCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2755,9 +2714,10 @@ export const de_UpdateKnowledgeBaseTemplateUriCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.knowledgeBase != null) { - contents.knowledgeBase = de_KnowledgeBaseData(data.knowledgeBase, context); - } + const doc = take(data, { + knowledgeBase: (_) => de_KnowledgeBaseData(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2785,16 +2745,15 @@ const de_UpdateKnowledgeBaseTemplateUriCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -2804,9 +2763,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2820,9 +2780,10 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2839,9 +2800,10 @@ const de_PreconditionFailedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PreconditionFailedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2858,12 +2820,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceName != null) { - contents.resourceName = __expectString(data.resourceName); - } + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2880,9 +2841,10 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2899,12 +2861,11 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceName != null) { - contents.resourceName = __expectString(data.resourceName); - } + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2918,9 +2879,10 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2928,541 +2890,118 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AppIntegrationsConfiguration - */ -const se_AppIntegrationsConfiguration = (input: AppIntegrationsConfiguration, context: __SerdeContext): any => { - return { - ...(input.appIntegrationArn != null && { appIntegrationArn: input.appIntegrationArn }), - ...(input.objectFields != null && { objectFields: se_ObjectFieldsList(input.objectFields, context) }), - }; -}; +// se_AppIntegrationsConfiguration omitted. -/** - * serializeAws_restJson1AssistantAssociationInputData - */ -const se_AssistantAssociationInputData = (input: AssistantAssociationInputData, context: __SerdeContext): any => { - return AssistantAssociationInputData.visit(input, { - knowledgeBaseId: (value) => ({ knowledgeBaseId: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_AssistantAssociationInputData omitted. -/** - * serializeAws_restJson1ContentMetadata - */ -const se_ContentMetadata = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_ContentMetadata omitted. -/** - * serializeAws_restJson1Filter - */ -const se_Filter = (input: Filter, context: __SerdeContext): any => { - return { - ...(input.field != null && { field: input.field }), - ...(input.operator != null && { operator: input.operator }), - ...(input.value != null && { value: input.value }), - }; -}; +// se_Filter omitted. -/** - * serializeAws_restJson1FilterList - */ -const se_FilterList = (input: Filter[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Filter(entry, context); - }); -}; +// se_FilterList omitted. -/** - * serializeAws_restJson1ObjectFieldsList - */ -const se_ObjectFieldsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ObjectFieldsList omitted. -/** - * serializeAws_restJson1RecommendationIdList - */ -const se_RecommendationIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_RecommendationIdList omitted. -/** - * serializeAws_restJson1RenderingConfiguration - */ -const se_RenderingConfiguration = (input: RenderingConfiguration, context: __SerdeContext): any => { - return { - ...(input.templateUri != null && { templateUri: input.templateUri }), - }; -}; +// se_RenderingConfiguration omitted. -/** - * serializeAws_restJson1SearchExpression - */ -const se_SearchExpression = (input: SearchExpression, context: __SerdeContext): any => { - return { - ...(input.filters != null && { filters: se_FilterList(input.filters, context) }), - }; -}; +// se_SearchExpression omitted. -/** - * serializeAws_restJson1ServerSideEncryptionConfiguration - */ -const se_ServerSideEncryptionConfiguration = ( - input: ServerSideEncryptionConfiguration, - context: __SerdeContext -): any => { - return { - ...(input.kmsKeyId != null && { kmsKeyId: input.kmsKeyId }), - }; -}; +// se_ServerSideEncryptionConfiguration omitted. -/** - * serializeAws_restJson1SourceConfiguration - */ -const se_SourceConfiguration = (input: SourceConfiguration, context: __SerdeContext): any => { - return SourceConfiguration.visit(input, { - appIntegrations: (value) => ({ appIntegrations: se_AppIntegrationsConfiguration(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_SourceConfiguration omitted. -/** - * serializeAws_restJson1Tags - */ -const se_Tags = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_Tags omitted. -/** - * deserializeAws_restJson1AppIntegrationsConfiguration - */ -const de_AppIntegrationsConfiguration = (output: any, context: __SerdeContext): AppIntegrationsConfiguration => { - return { - appIntegrationArn: __expectString(output.appIntegrationArn), - objectFields: output.objectFields != null ? de_ObjectFieldsList(output.objectFields, context) : undefined, - } as any; -}; +// de_AppIntegrationsConfiguration omitted. -/** - * deserializeAws_restJson1AssistantAssociationData - */ -const de_AssistantAssociationData = (output: any, context: __SerdeContext): AssistantAssociationData => { - return { - assistantArn: __expectString(output.assistantArn), - assistantAssociationArn: __expectString(output.assistantAssociationArn), - assistantAssociationId: __expectString(output.assistantAssociationId), - assistantId: __expectString(output.assistantId), - associationData: - output.associationData != null - ? de_AssistantAssociationOutputData(__expectUnion(output.associationData), context) - : undefined, - associationType: __expectString(output.associationType), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_AssistantAssociationData omitted. -/** - * deserializeAws_restJson1AssistantAssociationOutputData - */ -const de_AssistantAssociationOutputData = (output: any, context: __SerdeContext): AssistantAssociationOutputData => { - if (output.knowledgeBaseAssociation != null) { - return { - knowledgeBaseAssociation: de_KnowledgeBaseAssociationData(output.knowledgeBaseAssociation, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_AssistantAssociationOutputData omitted. -/** - * deserializeAws_restJson1AssistantAssociationSummary - */ -const de_AssistantAssociationSummary = (output: any, context: __SerdeContext): AssistantAssociationSummary => { - return { - assistantArn: __expectString(output.assistantArn), - assistantAssociationArn: __expectString(output.assistantAssociationArn), - assistantAssociationId: __expectString(output.assistantAssociationId), - assistantId: __expectString(output.assistantId), - associationData: - output.associationData != null - ? de_AssistantAssociationOutputData(__expectUnion(output.associationData), context) - : undefined, - associationType: __expectString(output.associationType), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_AssistantAssociationSummary omitted. -/** - * deserializeAws_restJson1AssistantAssociationSummaryList - */ -const de_AssistantAssociationSummaryList = (output: any, context: __SerdeContext): AssistantAssociationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssistantAssociationSummary(entry, context); - }); - return retVal; -}; +// de_AssistantAssociationSummaryList omitted. -/** - * deserializeAws_restJson1AssistantData - */ -const de_AssistantData = (output: any, context: __SerdeContext): AssistantData => { - return { - assistantArn: __expectString(output.assistantArn), - assistantId: __expectString(output.assistantId), - description: __expectString(output.description), - name: __expectString(output.name), - serverSideEncryptionConfiguration: - output.serverSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) - : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_AssistantData omitted. -/** - * deserializeAws_restJson1AssistantList - */ -const de_AssistantList = (output: any, context: __SerdeContext): AssistantSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AssistantSummary(entry, context); - }); - return retVal; -}; +// de_AssistantList omitted. -/** - * deserializeAws_restJson1AssistantSummary - */ -const de_AssistantSummary = (output: any, context: __SerdeContext): AssistantSummary => { - return { - assistantArn: __expectString(output.assistantArn), - assistantId: __expectString(output.assistantId), - description: __expectString(output.description), - name: __expectString(output.name), - serverSideEncryptionConfiguration: - output.serverSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) - : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - type: __expectString(output.type), - } as any; -}; +// de_AssistantSummary omitted. /** * deserializeAws_restJson1ContentData */ const de_ContentData = (output: any, context: __SerdeContext): ContentData => { - return { - contentArn: __expectString(output.contentArn), - contentId: __expectString(output.contentId), - contentType: __expectString(output.contentType), - knowledgeBaseArn: __expectString(output.knowledgeBaseArn), - knowledgeBaseId: __expectString(output.knowledgeBaseId), - linkOutUri: __expectString(output.linkOutUri), - metadata: output.metadata != null ? de_ContentMetadata(output.metadata, context) : undefined, - name: __expectString(output.name), - revisionId: __expectString(output.revisionId), - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - title: __expectString(output.title), - url: __expectString(output.url), - urlExpiry: - output.urlExpiry != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.urlExpiry))) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1ContentMetadata - */ -const de_ContentMetadata = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + contentArn: __expectString, + contentId: __expectString, + contentType: __expectString, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + linkOutUri: __expectString, + metadata: _json, + name: __expectString, + revisionId: __expectString, + status: __expectString, + tags: _json, + title: __expectString, + url: __expectString, + urlExpiry: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; -/** - * deserializeAws_restJson1ContentReference - */ -const de_ContentReference = (output: any, context: __SerdeContext): ContentReference => { - return { - contentArn: __expectString(output.contentArn), - contentId: __expectString(output.contentId), - knowledgeBaseArn: __expectString(output.knowledgeBaseArn), - knowledgeBaseId: __expectString(output.knowledgeBaseId), - } as any; -}; +// de_ContentMetadata omitted. -/** - * deserializeAws_restJson1ContentSummary - */ -const de_ContentSummary = (output: any, context: __SerdeContext): ContentSummary => { - return { - contentArn: __expectString(output.contentArn), - contentId: __expectString(output.contentId), - contentType: __expectString(output.contentType), - knowledgeBaseArn: __expectString(output.knowledgeBaseArn), - knowledgeBaseId: __expectString(output.knowledgeBaseId), - metadata: output.metadata != null ? de_ContentMetadata(output.metadata, context) : undefined, - name: __expectString(output.name), - revisionId: __expectString(output.revisionId), - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - title: __expectString(output.title), - } as any; -}; +// de_ContentReference omitted. -/** - * deserializeAws_restJson1ContentSummaryList - */ -const de_ContentSummaryList = (output: any, context: __SerdeContext): ContentSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ContentSummary(entry, context); - }); - return retVal; -}; +// de_ContentSummary omitted. -/** - * deserializeAws_restJson1Document - */ -const de_Document = (output: any, context: __SerdeContext): Document => { - return { - contentReference: - output.contentReference != null ? de_ContentReference(output.contentReference, context) : undefined, - excerpt: output.excerpt != null ? de_DocumentText(output.excerpt, context) : undefined, - title: output.title != null ? de_DocumentText(output.title, context) : undefined, - } as any; -}; +// de_ContentSummaryList omitted. -/** - * deserializeAws_restJson1DocumentText - */ -const de_DocumentText = (output: any, context: __SerdeContext): DocumentText => { - return { - highlights: output.highlights != null ? de_Highlights(output.highlights, context) : undefined, - text: __expectString(output.text), - } as any; -}; +// de_Document omitted. -/** - * deserializeAws_restJson1Headers - */ -const de_Headers = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DocumentText omitted. -/** - * deserializeAws_restJson1Highlight - */ -const de_Highlight = (output: any, context: __SerdeContext): Highlight => { - return { - beginOffsetInclusive: __expectInt32(output.beginOffsetInclusive), - endOffsetExclusive: __expectInt32(output.endOffsetExclusive), - } as any; -}; +// de_Headers omitted. -/** - * deserializeAws_restJson1Highlights - */ -const de_Highlights = (output: any, context: __SerdeContext): Highlight[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Highlight(entry, context); - }); - return retVal; -}; +// de_Highlight omitted. -/** - * deserializeAws_restJson1KnowledgeBaseAssociationData - */ -const de_KnowledgeBaseAssociationData = (output: any, context: __SerdeContext): KnowledgeBaseAssociationData => { - return { - knowledgeBaseArn: __expectString(output.knowledgeBaseArn), - knowledgeBaseId: __expectString(output.knowledgeBaseId), - } as any; -}; +// de_Highlights omitted. + +// de_KnowledgeBaseAssociationData omitted. /** * deserializeAws_restJson1KnowledgeBaseData */ const de_KnowledgeBaseData = (output: any, context: __SerdeContext): KnowledgeBaseData => { - return { - description: __expectString(output.description), - knowledgeBaseArn: __expectString(output.knowledgeBaseArn), - knowledgeBaseId: __expectString(output.knowledgeBaseId), - knowledgeBaseType: __expectString(output.knowledgeBaseType), - lastContentModificationTime: - output.lastContentModificationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.lastContentModificationTime))) - : undefined, - name: __expectString(output.name), - renderingConfiguration: - output.renderingConfiguration != null - ? de_RenderingConfiguration(output.renderingConfiguration, context) - : undefined, - serverSideEncryptionConfiguration: - output.serverSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) - : undefined, - sourceConfiguration: - output.sourceConfiguration != null - ? de_SourceConfiguration(__expectUnion(output.sourceConfiguration), context) - : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1KnowledgeBaseList - */ -const de_KnowledgeBaseList = (output: any, context: __SerdeContext): KnowledgeBaseSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_KnowledgeBaseSummary(entry, context); - }); - return retVal; + return take(output, { + description: __expectString, + knowledgeBaseArn: __expectString, + knowledgeBaseId: __expectString, + knowledgeBaseType: __expectString, + lastContentModificationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + name: __expectString, + renderingConfiguration: _json, + serverSideEncryptionConfiguration: _json, + sourceConfiguration: (_: any) => _json(__expectUnion(_)), + status: __expectString, + tags: _json, + }) as any; }; -/** - * deserializeAws_restJson1KnowledgeBaseSummary - */ -const de_KnowledgeBaseSummary = (output: any, context: __SerdeContext): KnowledgeBaseSummary => { - return { - description: __expectString(output.description), - knowledgeBaseArn: __expectString(output.knowledgeBaseArn), - knowledgeBaseId: __expectString(output.knowledgeBaseId), - knowledgeBaseType: __expectString(output.knowledgeBaseType), - name: __expectString(output.name), - renderingConfiguration: - output.renderingConfiguration != null - ? de_RenderingConfiguration(output.renderingConfiguration, context) - : undefined, - serverSideEncryptionConfiguration: - output.serverSideEncryptionConfiguration != null - ? de_ServerSideEncryptionConfiguration(output.serverSideEncryptionConfiguration, context) - : undefined, - sourceConfiguration: - output.sourceConfiguration != null - ? de_SourceConfiguration(__expectUnion(output.sourceConfiguration), context) - : undefined, - status: __expectString(output.status), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_KnowledgeBaseList omitted. -/** - * deserializeAws_restJson1NotifyRecommendationsReceivedError - */ -const de_NotifyRecommendationsReceivedError = ( - output: any, - context: __SerdeContext -): NotifyRecommendationsReceivedError => { - return { - message: __expectString(output.message), - recommendationId: __expectString(output.recommendationId), - } as any; -}; +// de_KnowledgeBaseSummary omitted. -/** - * deserializeAws_restJson1NotifyRecommendationsReceivedErrorList - */ -const de_NotifyRecommendationsReceivedErrorList = ( - output: any, - context: __SerdeContext -): NotifyRecommendationsReceivedError[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NotifyRecommendationsReceivedError(entry, context); - }); - return retVal; -}; +// de_NotifyRecommendationsReceivedError omitted. -/** - * deserializeAws_restJson1ObjectFieldsList - */ -const de_ObjectFieldsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_NotifyRecommendationsReceivedErrorList omitted. -/** - * deserializeAws_restJson1QueryRecommendationTriggerData - */ -const de_QueryRecommendationTriggerData = (output: any, context: __SerdeContext): QueryRecommendationTriggerData => { - return { - text: __expectString(output.text), - } as any; -}; +// de_ObjectFieldsList omitted. + +// de_QueryRecommendationTriggerData omitted. /** * deserializeAws_restJson1QueryResultsList @@ -3471,9 +3010,6 @@ const de_QueryResultsList = (output: any, context: __SerdeContext): ResultData[] const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResultData(entry, context); }); return retVal; @@ -3483,29 +3019,16 @@ const de_QueryResultsList = (output: any, context: __SerdeContext): ResultData[] * deserializeAws_restJson1RecommendationData */ const de_RecommendationData = (output: any, context: __SerdeContext): RecommendationData => { - return { - document: output.document != null ? de_Document(output.document, context) : undefined, - recommendationId: __expectString(output.recommendationId), - relevanceLevel: __expectString(output.relevanceLevel), - relevanceScore: __limitedParseDouble(output.relevanceScore), - type: __expectString(output.type), - } as any; + return take(output, { + document: _json, + recommendationId: __expectString, + relevanceLevel: __expectString, + relevanceScore: __limitedParseDouble, + type: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1RecommendationIdList - */ -const de_RecommendationIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_RecommendationIdList omitted. /** * deserializeAws_restJson1RecommendationList @@ -3514,151 +3037,41 @@ const de_RecommendationList = (output: any, context: __SerdeContext): Recommenda const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_RecommendationData(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RecommendationTrigger - */ -const de_RecommendationTrigger = (output: any, context: __SerdeContext): RecommendationTrigger => { - return { - data: output.data != null ? de_RecommendationTriggerData(__expectUnion(output.data), context) : undefined, - id: __expectString(output.id), - recommendationIds: - output.recommendationIds != null ? de_RecommendationIdList(output.recommendationIds, context) : undefined, - source: __expectString(output.source), - type: __expectString(output.type), - } as any; -}; +// de_RecommendationTrigger omitted. -/** - * deserializeAws_restJson1RecommendationTriggerData - */ -const de_RecommendationTriggerData = (output: any, context: __SerdeContext): RecommendationTriggerData => { - if (output.query != null) { - return { - query: de_QueryRecommendationTriggerData(output.query, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_RecommendationTriggerData omitted. -/** - * deserializeAws_restJson1RecommendationTriggerList - */ -const de_RecommendationTriggerList = (output: any, context: __SerdeContext): RecommendationTrigger[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RecommendationTrigger(entry, context); - }); - return retVal; -}; +// de_RecommendationTriggerList omitted. -/** - * deserializeAws_restJson1RenderingConfiguration - */ -const de_RenderingConfiguration = (output: any, context: __SerdeContext): RenderingConfiguration => { - return { - templateUri: __expectString(output.templateUri), - } as any; -}; +// de_RenderingConfiguration omitted. /** * deserializeAws_restJson1ResultData */ const de_ResultData = (output: any, context: __SerdeContext): ResultData => { - return { - document: output.document != null ? de_Document(output.document, context) : undefined, - relevanceScore: __limitedParseDouble(output.relevanceScore), - resultId: __expectString(output.resultId), - } as any; + return take(output, { + document: _json, + relevanceScore: __limitedParseDouble, + resultId: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1ServerSideEncryptionConfiguration - */ -const de_ServerSideEncryptionConfiguration = ( - output: any, - context: __SerdeContext -): ServerSideEncryptionConfiguration => { - return { - kmsKeyId: __expectString(output.kmsKeyId), - } as any; -}; +// de_ServerSideEncryptionConfiguration omitted. -/** - * deserializeAws_restJson1SessionData - */ -const de_SessionData = (output: any, context: __SerdeContext): SessionData => { - return { - description: __expectString(output.description), - name: __expectString(output.name), - sessionArn: __expectString(output.sessionArn), - sessionId: __expectString(output.sessionId), - tags: output.tags != null ? de_Tags(output.tags, context) : undefined, - } as any; -}; +// de_SessionData omitted. -/** - * deserializeAws_restJson1SessionSummaries - */ -const de_SessionSummaries = (output: any, context: __SerdeContext): SessionSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SessionSummary(entry, context); - }); - return retVal; -}; +// de_SessionSummaries omitted. -/** - * deserializeAws_restJson1SessionSummary - */ -const de_SessionSummary = (output: any, context: __SerdeContext): SessionSummary => { - return { - assistantArn: __expectString(output.assistantArn), - assistantId: __expectString(output.assistantId), - sessionArn: __expectString(output.sessionArn), - sessionId: __expectString(output.sessionId), - } as any; -}; +// de_SessionSummary omitted. -/** - * deserializeAws_restJson1SourceConfiguration - */ -const de_SourceConfiguration = (output: any, context: __SerdeContext): SourceConfiguration => { - if (output.appIntegrations != null) { - return { - appIntegrations: de_AppIntegrationsConfiguration(output.appIntegrations, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_SourceConfiguration omitted. -/** - * deserializeAws_restJson1Tags - */ -const de_Tags = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_Tags omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-workdocs/src/protocols/Aws_restJson1.ts b/clients/client-workdocs/src/protocols/Aws_restJson1.ts index 33d83f1d62e3..979f4b2e2436 100644 --- a/clients/client-workdocs/src/protocols/Aws_restJson1.ts +++ b/clients/client-workdocs/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, @@ -9,10 +10,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -131,8 +133,6 @@ import { DeactivatingLastSystemUserException, DocumentLockedForCommentsException, DocumentMetadata, - DocumentSourceType, - DocumentThumbnailType, DocumentVersionMetadata, DraftUploadOutOfSyncException, EntityAlreadyExistsException, @@ -140,7 +140,6 @@ import { FailedDependencyException, Filters, FolderMetadata, - GroupMetadata, IllegalUserStateException, InvalidArgumentException, InvalidCommentOperationException, @@ -150,16 +149,10 @@ import { LimitExceededException, LongRangeType, NotificationOptions, - Participants, - PermissionInfo, - Principal, PrincipalRoleType, ProhibitedStateException, RequestedEntityTooLargeException, ResourceAlreadyCheckedOutException, - ResourceMetadata, - ResourcePath, - ResourcePathComponent, ResponseItem, SearchCollectionType, SearchPrincipalType, @@ -168,19 +161,14 @@ import { SearchSortResult, ServiceUnavailableException, SharePrincipal, - ShareResult, StorageLimitExceededException, StorageLimitWillExceedException, StorageRuleType, - Subscription, TooManyLabelsException, TooManySubscriptionsException, UnauthorizedOperationException, UnauthorizedResourceAccessException, - UploadMetadata, User, - UserMetadata, - UserStorageMetadata, } from "../models/models_0"; import { WorkDocsServiceException as __BaseException } from "../models/WorkDocsServiceException"; @@ -255,12 +243,12 @@ export const se_AddResourcePermissionsCommand = async ( "/api/v1/resources/{ResourceId}/permissions"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId!, "{ResourceId}", false); let body: any; - body = JSON.stringify({ - ...(input.NotificationOptions != null && { - NotificationOptions: se_NotificationOptions(input.NotificationOptions, context), - }), - ...(input.Principals != null && { Principals: se_SharePrincipalList(input.Principals, context) }), - }); + body = JSON.stringify( + take(input, { + NotificationOptions: (_) => _json(_), + Principals: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -290,13 +278,15 @@ export const se_CreateCommentCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId!, "{DocumentId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId!, "{VersionId}", false); let body: any; - body = JSON.stringify({ - ...(input.NotifyCollaborators != null && { NotifyCollaborators: input.NotifyCollaborators }), - ...(input.ParentId != null && { ParentId: input.ParentId }), - ...(input.Text != null && { Text: input.Text }), - ...(input.ThreadId != null && { ThreadId: input.ThreadId }), - ...(input.Visibility != null && { Visibility: input.Visibility }), - }); + body = JSON.stringify( + take(input, { + NotifyCollaborators: [], + ParentId: [], + Text: [], + ThreadId: [], + Visibility: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -328,9 +318,11 @@ export const se_CreateCustomMetadataCommand = async ( versionid: [, input.VersionId!], }); let body: any; - body = JSON.stringify({ - ...(input.CustomMetadata != null && { CustomMetadata: se_CustomMetadataMap(input.CustomMetadata, context) }), - }); + body = JSON.stringify( + take(input, { + CustomMetadata: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -357,10 +349,12 @@ export const se_CreateFolderCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders"; let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentFolderId != null && { ParentFolderId: input.ParentFolderId }), - }); + body = JSON.stringify( + take(input, { + Name: [], + ParentFolderId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -388,9 +382,11 @@ export const se_CreateLabelsCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/resources/{ResourceId}/labels"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceId", () => input.ResourceId!, "{ResourceId}", false); let body: any; - body = JSON.stringify({ - ...(input.Labels != null && { Labels: se_SharedLabels(input.Labels, context) }), - }); + body = JSON.stringify( + take(input, { + Labels: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -425,11 +421,13 @@ export const se_CreateNotificationSubscriptionCommand = async ( false ); let body: any; - body = JSON.stringify({ - ...(input.Endpoint != null && { Endpoint: input.Endpoint }), - ...(input.Protocol != null && { Protocol: input.Protocol }), - ...(input.SubscriptionType != null && { SubscriptionType: input.SubscriptionType }), - }); + body = JSON.stringify( + take(input, { + Endpoint: [], + Protocol: [], + SubscriptionType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -455,16 +453,18 @@ export const se_CreateUserCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users"; let body: any; - body = JSON.stringify({ - ...(input.EmailAddress != null && { EmailAddress: input.EmailAddress }), - ...(input.GivenName != null && { GivenName: input.GivenName }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Password != null && { Password: input.Password }), - ...(input.StorageRule != null && { StorageRule: se_StorageRuleType(input.StorageRule, context) }), - ...(input.Surname != null && { Surname: input.Surname }), - ...(input.TimeZoneId != null && { TimeZoneId: input.TimeZoneId }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + EmailAddress: [], + GivenName: [], + OrganizationId: [], + Password: [], + StorageRule: (_) => _json(_), + Surname: [], + TimeZoneId: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1317,19 +1317,17 @@ export const se_InitiateDocumentVersionUploadCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents"; let body: any; - body = JSON.stringify({ - ...(input.ContentCreatedTimestamp != null && { - ContentCreatedTimestamp: Math.round(input.ContentCreatedTimestamp.getTime() / 1000), - }), - ...(input.ContentModifiedTimestamp != null && { - ContentModifiedTimestamp: Math.round(input.ContentModifiedTimestamp.getTime() / 1000), - }), - ...(input.ContentType != null && { ContentType: input.ContentType }), - ...(input.DocumentSizeInBytes != null && { DocumentSizeInBytes: input.DocumentSizeInBytes }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentFolderId != null && { ParentFolderId: input.ParentFolderId }), - }); + body = JSON.stringify( + take(input, { + ContentCreatedTimestamp: (_) => Math.round(_.getTime() / 1000), + ContentModifiedTimestamp: (_) => Math.round(_.getTime() / 1000), + ContentType: [], + DocumentSizeInBytes: [], + Id: [], + Name: [], + ParentFolderId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1441,18 +1439,18 @@ export const se_SearchResourcesCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/search"; let body: any; - body = JSON.stringify({ - ...(input.AdditionalResponseFields != null && { - AdditionalResponseFields: se_AdditionalResponseFieldsList(input.AdditionalResponseFields, context), - }), - ...(input.Filters != null && { Filters: se_Filters(input.Filters, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.Marker != null && { Marker: input.Marker }), - ...(input.OrderBy != null && { OrderBy: se_SearchResultSortList(input.OrderBy, context) }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.QueryScopes != null && { QueryScopes: se_SearchQueryScopeTypeList(input.QueryScopes, context) }), - ...(input.QueryText != null && { QueryText: input.QueryText }), - }); + body = JSON.stringify( + take(input, { + AdditionalResponseFields: (_) => _json(_), + Filters: (_) => se_Filters(_, context), + Limit: [], + Marker: [], + OrderBy: (_) => _json(_), + OrganizationId: [], + QueryScopes: (_) => _json(_), + QueryText: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1480,11 +1478,13 @@ export const se_UpdateDocumentCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/documents/{DocumentId}"; resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId!, "{DocumentId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentFolderId != null && { ParentFolderId: input.ParentFolderId }), - ...(input.ResourceState != null && { ResourceState: input.ResourceState }), - }); + body = JSON.stringify( + take(input, { + Name: [], + ParentFolderId: [], + ResourceState: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1514,9 +1514,11 @@ export const se_UpdateDocumentVersionCommand = async ( resolvedPath = __resolvedPath(resolvedPath, input, "DocumentId", () => input.DocumentId!, "{DocumentId}", false); resolvedPath = __resolvedPath(resolvedPath, input, "VersionId", () => input.VersionId!, "{VersionId}", false); let body: any; - body = JSON.stringify({ - ...(input.VersionStatus != null && { VersionStatus: input.VersionStatus }), - }); + body = JSON.stringify( + take(input, { + VersionStatus: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1544,11 +1546,13 @@ export const se_UpdateFolderCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/folders/{FolderId}"; resolvedPath = __resolvedPath(resolvedPath, input, "FolderId", () => input.FolderId!, "{FolderId}", false); let body: any; - body = JSON.stringify({ - ...(input.Name != null && { Name: input.Name }), - ...(input.ParentFolderId != null && { ParentFolderId: input.ParentFolderId }), - ...(input.ResourceState != null && { ResourceState: input.ResourceState }), - }); + body = JSON.stringify( + take(input, { + Name: [], + ParentFolderId: [], + ResourceState: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1575,15 +1579,17 @@ export const se_UpdateUserCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/api/v1/users/{UserId}"; resolvedPath = __resolvedPath(resolvedPath, input, "UserId", () => input.UserId!, "{UserId}", false); let body: any; - body = JSON.stringify({ - ...(input.GivenName != null && { GivenName: input.GivenName }), - ...(input.GrantPoweruserPrivileges != null && { GrantPoweruserPrivileges: input.GrantPoweruserPrivileges }), - ...(input.Locale != null && { Locale: input.Locale }), - ...(input.StorageRule != null && { StorageRule: se_StorageRuleType(input.StorageRule, context) }), - ...(input.Surname != null && { Surname: input.Surname }), - ...(input.TimeZoneId != null && { TimeZoneId: input.TimeZoneId }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + GivenName: [], + GrantPoweruserPrivileges: [], + Locale: [], + StorageRule: (_) => _json(_), + Surname: [], + TimeZoneId: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1648,10 +1654,9 @@ const de_AbortDocumentVersionUploadCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1671,9 +1676,10 @@ export const de_ActivateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1707,10 +1713,9 @@ const de_ActivateUserCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1730,9 +1735,10 @@ export const de_AddResourcePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ShareResults != null) { - contents.ShareResults = de_ShareResultsList(data.ShareResults, context); - } + const doc = take(data, { + ShareResults: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1766,10 +1772,9 @@ const de_AddResourcePermissionsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1789,9 +1794,10 @@ export const de_CreateCommentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Comment != null) { - contents.Comment = de_Comment(data.Comment, context); - } + const doc = take(data, { + Comment: (_) => de_Comment(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1834,10 +1840,9 @@ const de_CreateCommentCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1896,10 +1901,9 @@ const de_CreateCustomMetadataCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1919,9 +1923,10 @@ export const de_CreateFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Metadata != null) { - contents.Metadata = de_FolderMetadata(data.Metadata, context); - } + const doc = take(data, { + Metadata: (_) => de_FolderMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1970,10 +1975,9 @@ const de_CreateFolderCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2029,10 +2033,9 @@ const de_CreateLabelsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2052,9 +2055,10 @@ export const de_CreateNotificationSubscriptionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Subscription != null) { - contents.Subscription = de_Subscription(data.Subscription, context); - } + const doc = take(data, { + Subscription: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2085,10 +2089,9 @@ const de_CreateNotificationSubscriptionCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2108,9 +2111,10 @@ export const de_CreateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2144,10 +2148,9 @@ const de_CreateUserCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2200,10 +2203,9 @@ const de_DeactivateUserCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2262,10 +2264,9 @@ const de_DeleteCommentCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2321,10 +2322,9 @@ const de_DeleteCustomMetadataCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2389,10 +2389,9 @@ const de_DeleteDocumentCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2454,10 +2453,9 @@ const de_DeleteDocumentVersionCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2522,10 +2520,9 @@ const de_DeleteFolderCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2584,10 +2581,9 @@ const de_DeleteFolderContentsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2643,10 +2639,9 @@ const de_DeleteLabelsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2696,10 +2691,9 @@ const de_DeleteNotificationSubscriptionCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2752,10 +2746,9 @@ const de_DeleteUserCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2775,12 +2768,11 @@ export const de_DescribeActivitiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.UserActivities != null) { - contents.UserActivities = de_UserActivities(data.UserActivities, context); - } + const doc = take(data, { + Marker: __expectString, + UserActivities: (_) => de_UserActivities(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2814,10 +2806,9 @@ const de_DescribeActivitiesCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2837,12 +2828,11 @@ export const de_DescribeCommentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Comments != null) { - contents.Comments = de_CommentList(data.Comments, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + Comments: (_) => de_CommentList(_, context), + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2879,10 +2869,9 @@ const de_DescribeCommentsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2902,12 +2891,11 @@ export const de_DescribeDocumentVersionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DocumentVersions != null) { - contents.DocumentVersions = de_DocumentVersionMetadataList(data.DocumentVersions, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + DocumentVersions: (_) => de_DocumentVersionMetadataList(_, context), + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2950,10 +2938,9 @@ const de_DescribeDocumentVersionsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2973,15 +2960,12 @@ export const de_DescribeFolderContentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Documents != null) { - contents.Documents = de_DocumentMetadataList(data.Documents, context); - } - if (data.Folders != null) { - contents.Folders = de_FolderMetadataList(data.Folders, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + Documents: (_) => de_DocumentMetadataList(_, context), + Folders: (_) => de_FolderMetadataList(_, context), + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3018,10 +3002,9 @@ const de_DescribeFolderContentsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3041,12 +3024,11 @@ export const de_DescribeGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Groups != null) { - contents.Groups = de_GroupMetadataList(data.Groups, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + Groups: _json, + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3077,10 +3059,9 @@ const de_DescribeGroupsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3100,12 +3081,11 @@ export const de_DescribeNotificationSubscriptionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.Subscriptions != null) { - contents.Subscriptions = de_SubscriptionList(data.Subscriptions, context); - } + const doc = take(data, { + Marker: __expectString, + Subscriptions: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3133,10 +3113,9 @@ const de_DescribeNotificationSubscriptionsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3156,12 +3135,11 @@ export const de_DescribeResourcePermissionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.Principals != null) { - contents.Principals = de_PrincipalList(data.Principals, context); - } + const doc = take(data, { + Marker: __expectString, + Principals: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3195,10 +3173,9 @@ const de_DescribeResourcePermissionsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3218,12 +3195,11 @@ export const de_DescribeRootFoldersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Folders != null) { - contents.Folders = de_FolderMetadataList(data.Folders, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + Folders: (_) => de_FolderMetadataList(_, context), + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3257,10 +3233,9 @@ const de_DescribeRootFoldersCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3280,15 +3255,12 @@ export const de_DescribeUsersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } - if (data.TotalNumberOfUsers != null) { - contents.TotalNumberOfUsers = __expectLong(data.TotalNumberOfUsers); - } - if (data.Users != null) { - contents.Users = de_OrganizationUserList(data.Users, context); - } + const doc = take(data, { + Marker: __expectString, + TotalNumberOfUsers: __expectLong, + Users: (_) => de_OrganizationUserList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3328,10 +3300,9 @@ const de_DescribeUsersCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3351,9 +3322,10 @@ export const de_GetCurrentUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3387,10 +3359,9 @@ const de_GetCurrentUserCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3410,12 +3381,11 @@ export const de_GetDocumentCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomMetadata != null) { - contents.CustomMetadata = de_CustomMetadataMap(data.CustomMetadata, context); - } - if (data.Metadata != null) { - contents.Metadata = de_DocumentMetadata(data.Metadata, context); - } + const doc = take(data, { + CustomMetadata: _json, + Metadata: (_) => de_DocumentMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3455,10 +3425,9 @@ const de_GetDocumentCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3478,9 +3447,10 @@ export const de_GetDocumentPathCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Path != null) { - contents.Path = de_ResourcePath(data.Path, context); - } + const doc = take(data, { + Path: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3514,10 +3484,9 @@ const de_GetDocumentPathCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3537,12 +3506,11 @@ export const de_GetDocumentVersionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomMetadata != null) { - contents.CustomMetadata = de_CustomMetadataMap(data.CustomMetadata, context); - } - if (data.Metadata != null) { - contents.Metadata = de_DocumentVersionMetadata(data.Metadata, context); - } + const doc = take(data, { + CustomMetadata: _json, + Metadata: (_) => de_DocumentVersionMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3582,10 +3550,9 @@ const de_GetDocumentVersionCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3605,12 +3572,11 @@ export const de_GetFolderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CustomMetadata != null) { - contents.CustomMetadata = de_CustomMetadataMap(data.CustomMetadata, context); - } - if (data.Metadata != null) { - contents.Metadata = de_FolderMetadata(data.Metadata, context); - } + const doc = take(data, { + CustomMetadata: _json, + Metadata: (_) => de_FolderMetadata(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3650,10 +3616,9 @@ const de_GetFolderCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3673,9 +3638,10 @@ export const de_GetFolderPathCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Path != null) { - contents.Path = de_ResourcePath(data.Path, context); - } + const doc = take(data, { + Path: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3709,10 +3675,9 @@ const de_GetFolderPathCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3732,15 +3697,12 @@ export const de_GetResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Documents != null) { - contents.Documents = de_DocumentMetadataList(data.Documents, context); - } - if (data.Folders != null) { - contents.Folders = de_FolderMetadataList(data.Folders, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + Documents: (_) => de_DocumentMetadataList(_, context), + Folders: (_) => de_FolderMetadataList(_, context), + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3774,10 +3736,9 @@ const de_GetResourcesCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3797,12 +3758,11 @@ export const de_InitiateDocumentVersionUploadCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Metadata != null) { - contents.Metadata = de_DocumentMetadata(data.Metadata, context); - } - if (data.UploadMetadata != null) { - contents.UploadMetadata = de_UploadMetadata(data.UploadMetadata, context); - } + const doc = take(data, { + Metadata: (_) => de_DocumentMetadata(_, context), + UploadMetadata: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3863,10 +3823,9 @@ const de_InitiateDocumentVersionUploadCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3916,10 +3875,9 @@ const de_RemoveAllResourcePermissionsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3969,10 +3927,9 @@ const de_RemoveResourcePermissionCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4034,10 +3991,9 @@ const de_RestoreDocumentVersionsCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4057,12 +4013,11 @@ export const de_SearchResourcesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Items != null) { - contents.Items = de_ResponseItemsList(data.Items, context); - } - if (data.Marker != null) { - contents.Marker = __expectString(data.Marker); - } + const doc = take(data, { + Items: (_) => de_ResponseItemsList(_, context), + Marker: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4093,10 +4048,9 @@ const de_SearchResourcesCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4164,10 +4118,9 @@ const de_UpdateDocumentCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4229,10 +4182,9 @@ const de_UpdateDocumentVersionCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4300,10 +4252,9 @@ const de_UpdateFolderCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4323,9 +4274,10 @@ export const de_UpdateUserCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.User != null) { - contents.User = de_User(data.User, context); - } + const doc = take(data, { + User: (_) => de_User(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4371,16 +4323,15 @@ const de_UpdateUserCommandError = async ( throw await de_UnauthorizedResourceAccessExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ConcurrentModificationExceptionRes */ @@ -4390,9 +4341,10 @@ const de_ConcurrentModificationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConcurrentModificationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4409,9 +4361,10 @@ const de_ConflictingOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictingOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4428,9 +4381,10 @@ const de_CustomMetadataLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new CustomMetadataLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4447,12 +4401,11 @@ const de_DeactivatingLastSystemUserExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DeactivatingLastSystemUserException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4469,9 +4422,10 @@ const de_DocumentLockedForCommentsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DocumentLockedForCommentsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4488,9 +4442,10 @@ const de_DraftUploadOutOfSyncExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new DraftUploadOutOfSyncException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4507,9 +4462,10 @@ const de_EntityAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new EntityAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4526,12 +4482,11 @@ const de_EntityNotExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.EntityIds != null) { - contents.EntityIds = de_EntityIdList(data.EntityIds, context); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + EntityIds: _json, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new EntityNotExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4548,9 +4503,10 @@ const de_FailedDependencyExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new FailedDependencyException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4567,9 +4523,10 @@ const de_IllegalUserStateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new IllegalUserStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4586,9 +4543,10 @@ const de_InvalidArgumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidArgumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4605,9 +4563,10 @@ const de_InvalidCommentOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidCommentOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4624,9 +4583,10 @@ const de_InvalidOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4643,9 +4603,10 @@ const de_InvalidPasswordExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidPasswordException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4662,9 +4623,10 @@ const de_LimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4681,9 +4643,10 @@ const de_ProhibitedStateExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ProhibitedStateException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4700,9 +4663,10 @@ const de_RequestedEntityTooLargeExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new RequestedEntityTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4719,9 +4683,10 @@ const de_ResourceAlreadyCheckedOutExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyCheckedOutException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4738,9 +4703,10 @@ const de_ServiceUnavailableExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4757,9 +4723,10 @@ const de_StorageLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new StorageLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4776,9 +4743,10 @@ const de_StorageLimitWillExceedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new StorageLimitWillExceedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4795,9 +4763,10 @@ const de_TooManyLabelsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyLabelsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4814,9 +4783,10 @@ const de_TooManySubscriptionsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManySubscriptionsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4833,12 +4803,11 @@ const de_UnauthorizedOperationExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Code != null) { - contents.Code = __expectString(data.Code); - } - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Code: __expectString, + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4855,9 +4824,10 @@ const de_UnauthorizedResourceAccessExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedResourceAccessException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4865,295 +4835,106 @@ const de_UnauthorizedResourceAccessExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AdditionalResponseFieldsList - */ -const se_AdditionalResponseFieldsList = ( - input: (AdditionalResponseFieldType | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_AdditionalResponseFieldsList omitted. -/** - * serializeAws_restJson1CustomMetadataMap - */ -const se_CustomMetadataMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_CustomMetadataMap omitted. /** * serializeAws_restJson1DateRangeType */ const se_DateRangeType = (input: DateRangeType, context: __SerdeContext): any => { - return { - ...(input.EndValue != null && { EndValue: Math.round(input.EndValue.getTime() / 1000) }), - ...(input.StartValue != null && { StartValue: Math.round(input.StartValue.getTime() / 1000) }), - }; + return take(input, { + EndValue: (_) => Math.round(_.getTime() / 1000), + StartValue: (_) => Math.round(_.getTime() / 1000), + }); }; /** * serializeAws_restJson1Filters */ const se_Filters = (input: Filters, context: __SerdeContext): any => { - return { - ...(input.AncestorIds != null && { AncestorIds: se_SearchAncestorIdList(input.AncestorIds, context) }), - ...(input.ContentCategories != null && { - ContentCategories: se_SearchContentCategoryTypeList(input.ContentCategories, context), - }), - ...(input.CreatedRange != null && { CreatedRange: se_DateRangeType(input.CreatedRange, context) }), - ...(input.Labels != null && { Labels: se_SearchLabelList(input.Labels, context) }), - ...(input.ModifiedRange != null && { ModifiedRange: se_DateRangeType(input.ModifiedRange, context) }), - ...(input.Principals != null && { Principals: se_SearchPrincipalTypeList(input.Principals, context) }), - ...(input.ResourceTypes != null && { ResourceTypes: se_SearchResourceTypeList(input.ResourceTypes, context) }), - ...(input.SearchCollectionTypes != null && { - SearchCollectionTypes: se_SearchCollectionTypeList(input.SearchCollectionTypes, context), - }), - ...(input.SizeRange != null && { SizeRange: se_LongRangeType(input.SizeRange, context) }), - ...(input.TextLocales != null && { TextLocales: se_TextLocaleTypeList(input.TextLocales, context) }), - }; + return take(input, { + AncestorIds: _json, + ContentCategories: _json, + CreatedRange: (_) => se_DateRangeType(_, context), + Labels: _json, + ModifiedRange: (_) => se_DateRangeType(_, context), + Principals: _json, + ResourceTypes: _json, + SearchCollectionTypes: _json, + SizeRange: _json, + TextLocales: _json, + }); }; -/** - * serializeAws_restJson1LongRangeType - */ -const se_LongRangeType = (input: LongRangeType, context: __SerdeContext): any => { - return { - ...(input.EndValue != null && { EndValue: input.EndValue }), - ...(input.StartValue != null && { StartValue: input.StartValue }), - }; -}; +// se_LongRangeType omitted. -/** - * serializeAws_restJson1NotificationOptions - */ -const se_NotificationOptions = (input: NotificationOptions, context: __SerdeContext): any => { - return { - ...(input.EmailMessage != null && { EmailMessage: input.EmailMessage }), - ...(input.SendEmail != null && { SendEmail: input.SendEmail }), - }; -}; +// se_NotificationOptions omitted. -/** - * serializeAws_restJson1SearchAncestorIdList - */ -const se_SearchAncestorIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchAncestorIdList omitted. -/** - * serializeAws_restJson1SearchCollectionTypeList - */ -const se_SearchCollectionTypeList = (input: (SearchCollectionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchCollectionTypeList omitted. -/** - * serializeAws_restJson1SearchContentCategoryTypeList - */ -const se_SearchContentCategoryTypeList = (input: (ContentCategoryType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchContentCategoryTypeList omitted. -/** - * serializeAws_restJson1SearchLabelList - */ -const se_SearchLabelList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchLabelList omitted. -/** - * serializeAws_restJson1SearchPrincipalRoleList - */ -const se_SearchPrincipalRoleList = (input: (PrincipalRoleType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchPrincipalRoleList omitted. -/** - * serializeAws_restJson1SearchPrincipalType - */ -const se_SearchPrincipalType = (input: SearchPrincipalType, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Roles != null && { Roles: se_SearchPrincipalRoleList(input.Roles, context) }), - }; -}; +// se_SearchPrincipalType omitted. -/** - * serializeAws_restJson1SearchPrincipalTypeList - */ -const se_SearchPrincipalTypeList = (input: SearchPrincipalType[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchPrincipalType(entry, context); - }); -}; +// se_SearchPrincipalTypeList omitted. -/** - * serializeAws_restJson1SearchQueryScopeTypeList - */ -const se_SearchQueryScopeTypeList = (input: (SearchQueryScopeType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchQueryScopeTypeList omitted. -/** - * serializeAws_restJson1SearchResourceTypeList - */ -const se_SearchResourceTypeList = (input: (SearchResourceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SearchResourceTypeList omitted. -/** - * serializeAws_restJson1SearchResultSortList - */ -const se_SearchResultSortList = (input: SearchSortResult[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SearchSortResult(entry, context); - }); -}; +// se_SearchResultSortList omitted. -/** - * serializeAws_restJson1SearchSortResult - */ -const se_SearchSortResult = (input: SearchSortResult, context: __SerdeContext): any => { - return { - ...(input.Field != null && { Field: input.Field }), - ...(input.Order != null && { Order: input.Order }), - }; -}; +// se_SearchSortResult omitted. -/** - * serializeAws_restJson1SharedLabels - */ -const se_SharedLabels = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SharedLabels omitted. -/** - * serializeAws_restJson1SharePrincipal - */ -const se_SharePrincipal = (input: SharePrincipal, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.Role != null && { Role: input.Role }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_SharePrincipal omitted. -/** - * serializeAws_restJson1SharePrincipalList - */ -const se_SharePrincipalList = (input: SharePrincipal[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SharePrincipal(entry, context); - }); -}; +// se_SharePrincipalList omitted. -/** - * serializeAws_restJson1StorageRuleType - */ -const se_StorageRuleType = (input: StorageRuleType, context: __SerdeContext): any => { - return { - ...(input.StorageAllocatedInBytes != null && { StorageAllocatedInBytes: input.StorageAllocatedInBytes }), - ...(input.StorageType != null && { StorageType: input.StorageType }), - }; -}; +// se_StorageRuleType omitted. -/** - * serializeAws_restJson1TextLocaleTypeList - */ -const se_TextLocaleTypeList = (input: (LanguageCodeType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TextLocaleTypeList omitted. /** * deserializeAws_restJson1Activity */ const de_Activity = (output: any, context: __SerdeContext): Activity => { - return { - CommentMetadata: output.CommentMetadata != null ? de_CommentMetadata(output.CommentMetadata, context) : undefined, - Initiator: output.Initiator != null ? de_UserMetadata(output.Initiator, context) : undefined, - IsIndirectActivity: __expectBoolean(output.IsIndirectActivity), - OrganizationId: __expectString(output.OrganizationId), - OriginalParent: output.OriginalParent != null ? de_ResourceMetadata(output.OriginalParent, context) : undefined, - Participants: output.Participants != null ? de_Participants(output.Participants, context) : undefined, - ResourceMetadata: - output.ResourceMetadata != null ? de_ResourceMetadata(output.ResourceMetadata, context) : undefined, - TimeStamp: - output.TimeStamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.TimeStamp))) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + CommentMetadata: (_: any) => de_CommentMetadata(_, context), + Initiator: _json, + IsIndirectActivity: __expectBoolean, + OrganizationId: __expectString, + OriginalParent: _json, + Participants: _json, + ResourceMetadata: _json, + TimeStamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Type: __expectString, + }) as any; }; /** * deserializeAws_restJson1Comment */ const de_Comment = (output: any, context: __SerdeContext): Comment => { - return { - CommentId: __expectString(output.CommentId), - Contributor: output.Contributor != null ? de_User(output.Contributor, context) : undefined, - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - ParentId: __expectString(output.ParentId), - RecipientId: __expectString(output.RecipientId), - Status: __expectString(output.Status), - Text: __expectString(output.Text), - ThreadId: __expectString(output.ThreadId), - Visibility: __expectString(output.Visibility), - } as any; + return take(output, { + CommentId: __expectString, + Contributor: (_: any) => de_User(_, context), + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParentId: __expectString, + RecipientId: __expectString, + Status: __expectString, + Text: __expectString, + ThreadId: __expectString, + Visibility: __expectString, + }) as any; }; /** @@ -5163,9 +4944,6 @@ const de_CommentList = (output: any, context: __SerdeContext): Comment[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Comment(entry, context); }); return retVal; @@ -5175,55 +4953,32 @@ const de_CommentList = (output: any, context: __SerdeContext): Comment[] => { * deserializeAws_restJson1CommentMetadata */ const de_CommentMetadata = (output: any, context: __SerdeContext): CommentMetadata => { - return { - CommentId: __expectString(output.CommentId), - CommentStatus: __expectString(output.CommentStatus), - Contributor: output.Contributor != null ? de_User(output.Contributor, context) : undefined, - ContributorId: __expectString(output.ContributorId), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - RecipientId: __expectString(output.RecipientId), - } as any; -}; - -/** - * deserializeAws_restJson1CustomMetadataMap - */ -const de_CustomMetadataMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); + return take(output, { + CommentId: __expectString, + CommentStatus: __expectString, + Contributor: (_: any) => de_User(_, context), + ContributorId: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RecipientId: __expectString, + }) as any; }; +// de_CustomMetadataMap omitted. + /** * deserializeAws_restJson1DocumentMetadata */ const de_DocumentMetadata = (output: any, context: __SerdeContext): DocumentMetadata => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - CreatorId: __expectString(output.CreatorId), - Id: __expectString(output.Id), - Labels: output.Labels != null ? de_SharedLabels(output.Labels, context) : undefined, - LatestVersionMetadata: - output.LatestVersionMetadata != null - ? de_DocumentVersionMetadata(output.LatestVersionMetadata, context) - : undefined, - ModifiedTimestamp: - output.ModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp))) - : undefined, - ParentFolderId: __expectString(output.ParentFolderId), - ResourceState: __expectString(output.ResourceState), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorId: __expectString, + Id: __expectString, + Labels: _json, + LatestVersionMetadata: (_: any) => de_DocumentVersionMetadata(_, context), + ModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ParentFolderId: __expectString, + ResourceState: __expectString, + }) as any; }; /** @@ -5233,77 +4988,34 @@ const de_DocumentMetadataList = (output: any, context: __SerdeContext): Document const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1DocumentSourceUrlMap - */ -const de_DocumentSourceUrlMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DocumentSourceType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_DocumentSourceUrlMap omitted. -/** - * deserializeAws_restJson1DocumentThumbnailUrlMap - */ -const de_DocumentThumbnailUrlMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce( - (acc: Record, [key, value]: [DocumentThumbnailType | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, - {} - ); -}; +// de_DocumentThumbnailUrlMap omitted. /** * deserializeAws_restJson1DocumentVersionMetadata */ const de_DocumentVersionMetadata = (output: any, context: __SerdeContext): DocumentVersionMetadata => { - return { - ContentCreatedTimestamp: - output.ContentCreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ContentCreatedTimestamp))) - : undefined, - ContentModifiedTimestamp: - output.ContentModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ContentModifiedTimestamp))) - : undefined, - ContentType: __expectString(output.ContentType), - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - CreatorId: __expectString(output.CreatorId), - Id: __expectString(output.Id), - ModifiedTimestamp: - output.ModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp))) - : undefined, - Name: __expectString(output.Name), - Signature: __expectString(output.Signature), - Size: __expectLong(output.Size), - Source: output.Source != null ? de_DocumentSourceUrlMap(output.Source, context) : undefined, - Status: __expectString(output.Status), - Thumbnail: output.Thumbnail != null ? de_DocumentThumbnailUrlMap(output.Thumbnail, context) : undefined, - } as any; + return take(output, { + ContentCreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContentModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ContentType: __expectString, + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorId: __expectString, + Id: __expectString, + ModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Signature: __expectString, + Size: __expectLong, + Source: _json, + Status: __expectString, + Thumbnail: _json, + }) as any; }; /** @@ -5313,52 +5025,30 @@ const de_DocumentVersionMetadataList = (output: any, context: __SerdeContext): D const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DocumentVersionMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1EntityIdList - */ -const de_EntityIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_EntityIdList omitted. /** * deserializeAws_restJson1FolderMetadata */ const de_FolderMetadata = (output: any, context: __SerdeContext): FolderMetadata => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - CreatorId: __expectString(output.CreatorId), - Id: __expectString(output.Id), - Labels: output.Labels != null ? de_SharedLabels(output.Labels, context) : undefined, - LatestVersionSize: __expectLong(output.LatestVersionSize), - ModifiedTimestamp: - output.ModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp))) - : undefined, - Name: __expectString(output.Name), - ParentFolderId: __expectString(output.ParentFolderId), - ResourceState: __expectString(output.ResourceState), - Signature: __expectString(output.Signature), - Size: __expectLong(output.Size), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + CreatorId: __expectString, + Id: __expectString, + Labels: _json, + LatestVersionSize: __expectLong, + ModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ParentFolderId: __expectString, + ResourceState: __expectString, + Signature: __expectString, + Size: __expectLong, + }) as any; }; /** @@ -5368,38 +5058,14 @@ const de_FolderMetadataList = (output: any, context: __SerdeContext): FolderMeta const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FolderMetadata(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1GroupMetadata - */ -const de_GroupMetadata = (output: any, context: __SerdeContext): GroupMetadata => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_GroupMetadata omitted. -/** - * deserializeAws_restJson1GroupMetadataList - */ -const de_GroupMetadataList = (output: any, context: __SerdeContext): GroupMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupMetadata(entry, context); - }); - return retVal; -}; +// de_GroupMetadataList omitted. /** * deserializeAws_restJson1OrganizationUserList @@ -5408,140 +5074,41 @@ const de_OrganizationUserList = (output: any, context: __SerdeContext): User[] = const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_User(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Participants - */ -const de_Participants = (output: any, context: __SerdeContext): Participants => { - return { - Groups: output.Groups != null ? de_GroupMetadataList(output.Groups, context) : undefined, - Users: output.Users != null ? de_UserMetadataList(output.Users, context) : undefined, - } as any; -}; +// de_Participants omitted. -/** - * deserializeAws_restJson1PermissionInfo - */ -const de_PermissionInfo = (output: any, context: __SerdeContext): PermissionInfo => { - return { - Role: __expectString(output.Role), - Type: __expectString(output.Type), - } as any; -}; +// de_PermissionInfo omitted. -/** - * deserializeAws_restJson1PermissionInfoList - */ -const de_PermissionInfoList = (output: any, context: __SerdeContext): PermissionInfo[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PermissionInfo(entry, context); - }); - return retVal; -}; +// de_PermissionInfoList omitted. -/** - * deserializeAws_restJson1Principal - */ -const de_Principal = (output: any, context: __SerdeContext): Principal => { - return { - Id: __expectString(output.Id), - Roles: output.Roles != null ? de_PermissionInfoList(output.Roles, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_Principal omitted. -/** - * deserializeAws_restJson1PrincipalList - */ -const de_PrincipalList = (output: any, context: __SerdeContext): Principal[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Principal(entry, context); - }); - return retVal; -}; +// de_PrincipalList omitted. -/** - * deserializeAws_restJson1ResourceMetadata - */ -const de_ResourceMetadata = (output: any, context: __SerdeContext): ResourceMetadata => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - OriginalName: __expectString(output.OriginalName), - Owner: output.Owner != null ? de_UserMetadata(output.Owner, context) : undefined, - ParentId: __expectString(output.ParentId), - Type: __expectString(output.Type), - VersionId: __expectString(output.VersionId), - } as any; -}; +// de_ResourceMetadata omitted. -/** - * deserializeAws_restJson1ResourcePath - */ -const de_ResourcePath = (output: any, context: __SerdeContext): ResourcePath => { - return { - Components: output.Components != null ? de_ResourcePathComponentList(output.Components, context) : undefined, - } as any; -}; +// de_ResourcePath omitted. -/** - * deserializeAws_restJson1ResourcePathComponent - */ -const de_ResourcePathComponent = (output: any, context: __SerdeContext): ResourcePathComponent => { - return { - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_ResourcePathComponent omitted. -/** - * deserializeAws_restJson1ResourcePathComponentList - */ -const de_ResourcePathComponentList = (output: any, context: __SerdeContext): ResourcePathComponent[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourcePathComponent(entry, context); - }); - return retVal; -}; +// de_ResourcePathComponentList omitted. /** * deserializeAws_restJson1ResponseItem */ const de_ResponseItem = (output: any, context: __SerdeContext): ResponseItem => { - return { - CommentMetadata: output.CommentMetadata != null ? de_CommentMetadata(output.CommentMetadata, context) : undefined, - DocumentMetadata: - output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined, - DocumentVersionMetadata: - output.DocumentVersionMetadata != null - ? de_DocumentVersionMetadata(output.DocumentVersionMetadata, context) - : undefined, - FolderMetadata: output.FolderMetadata != null ? de_FolderMetadata(output.FolderMetadata, context) : undefined, - ResourceType: __expectString(output.ResourceType), - WebUrl: __expectString(output.WebUrl), - } as any; + return take(output, { + CommentMetadata: (_: any) => de_CommentMetadata(_, context), + DocumentMetadata: (_: any) => de_DocumentMetadata(_, context), + DocumentVersionMetadata: (_: any) => de_DocumentVersionMetadata(_, context), + FolderMetadata: (_: any) => de_FolderMetadata(_, context), + ResourceType: __expectString, + WebUrl: __expectString, + }) as any; }; /** @@ -5551,144 +5118,48 @@ const de_ResponseItemsList = (output: any, context: __SerdeContext): ResponseIte const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResponseItem(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SharedLabels - */ -const de_SharedLabels = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SharedLabels omitted. -/** - * deserializeAws_restJson1ShareResult - */ -const de_ShareResult = (output: any, context: __SerdeContext): ShareResult => { - return { - InviteePrincipalId: __expectString(output.InviteePrincipalId), - PrincipalId: __expectString(output.PrincipalId), - Role: __expectString(output.Role), - ShareId: __expectString(output.ShareId), - Status: __expectString(output.Status), - StatusMessage: __expectString(output.StatusMessage), - } as any; -}; +// de_ShareResult omitted. -/** - * deserializeAws_restJson1ShareResultsList - */ -const de_ShareResultsList = (output: any, context: __SerdeContext): ShareResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ShareResult(entry, context); - }); - return retVal; -}; +// de_ShareResultsList omitted. -/** - * deserializeAws_restJson1SignedHeaderMap - */ -const de_SignedHeaderMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_SignedHeaderMap omitted. -/** - * deserializeAws_restJson1StorageRuleType - */ -const de_StorageRuleType = (output: any, context: __SerdeContext): StorageRuleType => { - return { - StorageAllocatedInBytes: __expectLong(output.StorageAllocatedInBytes), - StorageType: __expectString(output.StorageType), - } as any; -}; +// de_StorageRuleType omitted. -/** - * deserializeAws_restJson1Subscription - */ -const de_Subscription = (output: any, context: __SerdeContext): Subscription => { - return { - EndPoint: __expectString(output.EndPoint), - Protocol: __expectString(output.Protocol), - SubscriptionId: __expectString(output.SubscriptionId), - } as any; -}; +// de_Subscription omitted. -/** - * deserializeAws_restJson1SubscriptionList - */ -const de_SubscriptionList = (output: any, context: __SerdeContext): Subscription[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Subscription(entry, context); - }); - return retVal; -}; +// de_SubscriptionList omitted. -/** - * deserializeAws_restJson1UploadMetadata - */ -const de_UploadMetadata = (output: any, context: __SerdeContext): UploadMetadata => { - return { - SignedHeaders: output.SignedHeaders != null ? de_SignedHeaderMap(output.SignedHeaders, context) : undefined, - UploadUrl: __expectString(output.UploadUrl), - } as any; -}; +// de_UploadMetadata omitted. /** * deserializeAws_restJson1User */ const de_User = (output: any, context: __SerdeContext): User => { - return { - CreatedTimestamp: - output.CreatedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTimestamp))) - : undefined, - EmailAddress: __expectString(output.EmailAddress), - GivenName: __expectString(output.GivenName), - Id: __expectString(output.Id), - Locale: __expectString(output.Locale), - ModifiedTimestamp: - output.ModifiedTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedTimestamp))) - : undefined, - OrganizationId: __expectString(output.OrganizationId), - RecycleBinFolderId: __expectString(output.RecycleBinFolderId), - RootFolderId: __expectString(output.RootFolderId), - Status: __expectString(output.Status), - Storage: output.Storage != null ? de_UserStorageMetadata(output.Storage, context) : undefined, - Surname: __expectString(output.Surname), - TimeZoneId: __expectString(output.TimeZoneId), - Type: __expectString(output.Type), - Username: __expectString(output.Username), - } as any; + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EmailAddress: __expectString, + GivenName: __expectString, + Id: __expectString, + Locale: __expectString, + ModifiedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OrganizationId: __expectString, + RecycleBinFolderId: __expectString, + RootFolderId: __expectString, + Status: __expectString, + Storage: _json, + Surname: __expectString, + TimeZoneId: __expectString, + Type: __expectString, + Username: __expectString, + }) as any; }; /** @@ -5698,51 +5169,16 @@ const de_UserActivities = (output: any, context: __SerdeContext): Activity[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Activity(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1UserMetadata - */ -const de_UserMetadata = (output: any, context: __SerdeContext): UserMetadata => { - return { - EmailAddress: __expectString(output.EmailAddress), - GivenName: __expectString(output.GivenName), - Id: __expectString(output.Id), - Surname: __expectString(output.Surname), - Username: __expectString(output.Username), - } as any; -}; +// de_UserMetadata omitted. -/** - * deserializeAws_restJson1UserMetadataList - */ -const de_UserMetadataList = (output: any, context: __SerdeContext): UserMetadata[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserMetadata(entry, context); - }); - return retVal; -}; +// de_UserMetadataList omitted. -/** - * deserializeAws_restJson1UserStorageMetadata - */ -const de_UserStorageMetadata = (output: any, context: __SerdeContext): UserStorageMetadata => { - return { - StorageRule: output.StorageRule != null ? de_StorageRuleType(output.StorageRule, context) : undefined, - StorageUtilizedInBytes: __expectLong(output.StorageUtilizedInBytes), - } as any; -}; +// de_UserStorageMetadata omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-worklink/src/protocols/Aws_restJson1.ts b/clients/client-worklink/src/protocols/Aws_restJson1.ts index bf2fbfd1b413..8567a2833822 100644 --- a/clients/client-worklink/src/protocols/Aws_restJson1.ts +++ b/clients/client-worklink/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, @@ -8,10 +9,11 @@ import { expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -113,7 +115,6 @@ import { UpdateIdentityProviderConfigurationCommandOutput, } from "../commands/UpdateIdentityProviderConfigurationCommand"; import { - DeviceSummary, DomainSummary, FleetSummary, InternalServerErrorException, @@ -140,12 +141,14 @@ export const se_AssociateDomainCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateDomain"; let body: any; - body = JSON.stringify({ - ...(input.AcmCertificateArn != null && { AcmCertificateArn: input.AcmCertificateArn }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + AcmCertificateArn: [], + DisplayName: [], + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -171,11 +174,13 @@ export const se_AssociateWebsiteAuthorizationProviderCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateWebsiteAuthorizationProvider"; let body: any; - body = JSON.stringify({ - ...(input.AuthorizationProviderType != null && { AuthorizationProviderType: input.AuthorizationProviderType }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + AuthorizationProviderType: [], + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -201,11 +206,13 @@ export const se_AssociateWebsiteCertificateAuthorityCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/associateWebsiteCertificateAuthority"; let body: any; - body = JSON.stringify({ - ...(input.Certificate != null && { Certificate: input.Certificate }), - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + Certificate: [], + DisplayName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -230,12 +237,14 @@ export const se_CreateFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createFleet"; let body: any; - body = JSON.stringify({ - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.FleetName != null && { FleetName: input.FleetName }), - ...(input.OptimizeForEndUserLocation != null && { OptimizeForEndUserLocation: input.OptimizeForEndUserLocation }), - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + DisplayName: [], + FleetName: [], + OptimizeForEndUserLocation: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -260,9 +269,11 @@ export const se_DeleteFleetCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/deleteFleet"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -288,9 +299,11 @@ export const se_DescribeAuditStreamConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeAuditStreamConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -316,9 +329,11 @@ export const se_DescribeCompanyNetworkConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeCompanyNetworkConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -343,10 +358,12 @@ export const se_DescribeDeviceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeDevice"; let body: any; - body = JSON.stringify({ - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DeviceId: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -372,9 +389,11 @@ export const se_DescribeDevicePolicyConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeDevicePolicyConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -399,10 +418,12 @@ export const se_DescribeDomainCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeDomain"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -427,9 +448,11 @@ export const se_DescribeFleetMetadataCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeFleetMetadata"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -455,9 +478,11 @@ export const se_DescribeIdentityProviderConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeIdentityProviderConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -483,10 +508,12 @@ export const se_DescribeWebsiteCertificateAuthorityCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/describeWebsiteCertificateAuthority"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.WebsiteCaId != null && { WebsiteCaId: input.WebsiteCaId }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + WebsiteCaId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -511,10 +538,12 @@ export const se_DisassociateDomainCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateDomain"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -540,10 +569,12 @@ export const se_DisassociateWebsiteAuthorizationProviderCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateWebsiteAuthorizationProvider"; let body: any; - body = JSON.stringify({ - ...(input.AuthorizationProviderId != null && { AuthorizationProviderId: input.AuthorizationProviderId }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + AuthorizationProviderId: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -569,10 +600,12 @@ export const se_DisassociateWebsiteCertificateAuthorityCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/disassociateWebsiteCertificateAuthority"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.WebsiteCaId != null && { WebsiteCaId: input.WebsiteCaId }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + WebsiteCaId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -597,11 +630,13 @@ export const se_ListDevicesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listDevices"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -626,11 +661,13 @@ export const se_ListDomainsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listDomains"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -655,10 +692,12 @@ export const se_ListFleetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listFleets"; let body: any; - body = JSON.stringify({ - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -707,11 +746,13 @@ export const se_ListWebsiteAuthorizationProvidersCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listWebsiteAuthorizationProviders"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -737,11 +778,13 @@ export const se_ListWebsiteCertificateAuthoritiesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/listWebsiteCertificateAuthorities"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -766,10 +809,12 @@ export const se_RestoreDomainAccessCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restoreDomainAccess"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -794,10 +839,12 @@ export const se_RevokeDomainAccessCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/revokeDomainAccess"; let body: any; - body = JSON.stringify({ - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -822,10 +869,12 @@ export const se_SignOutUserCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/signOutUser"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.Username != null && { Username: input.Username }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + Username: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -851,9 +900,11 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}"; resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn!, "{ResourceArn}", false); let body: any; - body = JSON.stringify({ - ...(input.Tags != null && { Tags: se_TagMap(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -909,10 +960,12 @@ export const se_UpdateAuditStreamConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateAuditStreamConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.AuditStreamArn != null && { AuditStreamArn: input.AuditStreamArn }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + AuditStreamArn: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -938,12 +991,14 @@ export const se_UpdateCompanyNetworkConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateCompanyNetworkConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.SecurityGroupIds != null && { SecurityGroupIds: se_SecurityGroupIds(input.SecurityGroupIds, context) }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.VpcId != null && { VpcId: input.VpcId }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + SecurityGroupIds: (_) => _json(_), + SubnetIds: (_) => _json(_), + VpcId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -969,10 +1024,12 @@ export const se_UpdateDevicePolicyConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDevicePolicyConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.DeviceCaCertificate != null && { DeviceCaCertificate: input.DeviceCaCertificate }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DeviceCaCertificate: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -997,11 +1054,13 @@ export const se_UpdateDomainMetadataCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateDomainMetadata"; let body: any; - body = JSON.stringify({ - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - }); + body = JSON.stringify( + take(input, { + DisplayName: [], + DomainName: [], + FleetArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1026,11 +1085,13 @@ export const se_UpdateFleetMetadataCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateFleetMetadata"; let body: any; - body = JSON.stringify({ - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.OptimizeForEndUserLocation != null && { OptimizeForEndUserLocation: input.OptimizeForEndUserLocation }), - }); + body = JSON.stringify( + take(input, { + DisplayName: [], + FleetArn: [], + OptimizeForEndUserLocation: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1056,13 +1117,13 @@ export const se_UpdateIdentityProviderConfigurationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/updateIdentityProviderConfiguration"; let body: any; - body = JSON.stringify({ - ...(input.FleetArn != null && { FleetArn: input.FleetArn }), - ...(input.IdentityProviderSamlMetadata != null && { - IdentityProviderSamlMetadata: input.IdentityProviderSamlMetadata, - }), - ...(input.IdentityProviderType != null && { IdentityProviderType: input.IdentityProviderType }), - }); + body = JSON.stringify( + take(input, { + FleetArn: [], + IdentityProviderSamlMetadata: [], + IdentityProviderType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1124,10 +1185,9 @@ const de_AssociateDomainCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1147,9 +1207,10 @@ export const de_AssociateWebsiteAuthorizationProviderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuthorizationProviderId != null) { - contents.AuthorizationProviderId = __expectString(data.AuthorizationProviderId); - } + const doc = take(data, { + AuthorizationProviderId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1186,10 +1247,9 @@ const de_AssociateWebsiteAuthorizationProviderCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1209,9 +1269,10 @@ export const de_AssociateWebsiteCertificateAuthorityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.WebsiteCaId != null) { - contents.WebsiteCaId = __expectString(data.WebsiteCaId); - } + const doc = take(data, { + WebsiteCaId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1248,10 +1309,9 @@ const de_AssociateWebsiteCertificateAuthorityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1271,9 +1331,10 @@ export const de_CreateFleetCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FleetArn != null) { - contents.FleetArn = __expectString(data.FleetArn); - } + const doc = take(data, { + FleetArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1310,10 +1371,9 @@ const de_CreateFleetCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1366,10 +1426,9 @@ const de_DeleteFleetCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1389,9 +1448,10 @@ export const de_DescribeAuditStreamConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AuditStreamArn != null) { - contents.AuditStreamArn = __expectString(data.AuditStreamArn); - } + const doc = take(data, { + AuditStreamArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1425,10 +1485,9 @@ const de_DescribeAuditStreamConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1448,15 +1507,12 @@ export const de_DescribeCompanyNetworkConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SecurityGroupIds != null) { - contents.SecurityGroupIds = de_SecurityGroupIds(data.SecurityGroupIds, context); - } - if (data.SubnetIds != null) { - contents.SubnetIds = de_SubnetIds(data.SubnetIds, context); - } - if (data.VpcId != null) { - contents.VpcId = __expectString(data.VpcId); - } + const doc = take(data, { + SecurityGroupIds: _json, + SubnetIds: _json, + VpcId: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1490,10 +1546,9 @@ const de_DescribeCompanyNetworkConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1513,33 +1568,18 @@ export const de_DescribeDeviceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FirstAccessedTime != null) { - contents.FirstAccessedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.FirstAccessedTime))); - } - if (data.LastAccessedTime != null) { - contents.LastAccessedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastAccessedTime))); - } - if (data.Manufacturer != null) { - contents.Manufacturer = __expectString(data.Manufacturer); - } - if (data.Model != null) { - contents.Model = __expectString(data.Model); - } - if (data.OperatingSystem != null) { - contents.OperatingSystem = __expectString(data.OperatingSystem); - } - if (data.OperatingSystemVersion != null) { - contents.OperatingSystemVersion = __expectString(data.OperatingSystemVersion); - } - if (data.PatchLevel != null) { - contents.PatchLevel = __expectString(data.PatchLevel); - } - if (data.Status != null) { - contents.Status = __expectString(data.Status); - } - if (data.Username != null) { - contents.Username = __expectString(data.Username); - } + const doc = take(data, { + FirstAccessedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastAccessedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Manufacturer: __expectString, + Model: __expectString, + OperatingSystem: __expectString, + OperatingSystemVersion: __expectString, + PatchLevel: __expectString, + Status: __expectString, + Username: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1573,10 +1613,9 @@ const de_DescribeDeviceCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1596,9 +1635,10 @@ export const de_DescribeDevicePolicyConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.DeviceCaCertificate != null) { - contents.DeviceCaCertificate = __expectString(data.DeviceCaCertificate); - } + const doc = take(data, { + DeviceCaCertificate: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1632,10 +1672,9 @@ const de_DescribeDevicePolicyConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1655,21 +1694,14 @@ export const de_DescribeDomainCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.AcmCertificateArn != null) { - contents.AcmCertificateArn = __expectString(data.AcmCertificateArn); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.DisplayName != null) { - contents.DisplayName = __expectString(data.DisplayName); - } - if (data.DomainName != null) { - contents.DomainName = __expectString(data.DomainName); - } - if (data.DomainStatus != null) { - contents.DomainStatus = __expectString(data.DomainStatus); - } + const doc = take(data, { + AcmCertificateArn: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + DomainName: __expectString, + DomainStatus: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1703,10 +1735,9 @@ const de_DescribeDomainCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1726,30 +1757,17 @@ export const de_DescribeFleetMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.CompanyCode != null) { - contents.CompanyCode = __expectString(data.CompanyCode); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.DisplayName != null) { - contents.DisplayName = __expectString(data.DisplayName); - } - if (data.FleetName != null) { - contents.FleetName = __expectString(data.FleetName); - } - if (data.FleetStatus != null) { - contents.FleetStatus = __expectString(data.FleetStatus); - } - if (data.LastUpdatedTime != null) { - contents.LastUpdatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastUpdatedTime))); - } - if (data.OptimizeForEndUserLocation != null) { - contents.OptimizeForEndUserLocation = __expectBoolean(data.OptimizeForEndUserLocation); - } - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + CompanyCode: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + FleetName: __expectString, + FleetStatus: __expectString, + LastUpdatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + OptimizeForEndUserLocation: __expectBoolean, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1783,10 +1801,9 @@ const de_DescribeFleetMetadataCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1806,15 +1823,12 @@ export const de_DescribeIdentityProviderConfigurationCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.IdentityProviderSamlMetadata != null) { - contents.IdentityProviderSamlMetadata = __expectString(data.IdentityProviderSamlMetadata); - } - if (data.IdentityProviderType != null) { - contents.IdentityProviderType = __expectString(data.IdentityProviderType); - } - if (data.ServiceProviderSamlMetadata != null) { - contents.ServiceProviderSamlMetadata = __expectString(data.ServiceProviderSamlMetadata); - } + const doc = take(data, { + IdentityProviderSamlMetadata: __expectString, + IdentityProviderType: __expectString, + ServiceProviderSamlMetadata: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1848,10 +1862,9 @@ const de_DescribeIdentityProviderConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1871,15 +1884,12 @@ export const de_DescribeWebsiteCertificateAuthorityCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Certificate != null) { - contents.Certificate = __expectString(data.Certificate); - } - if (data.CreatedTime != null) { - contents.CreatedTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.CreatedTime))); - } - if (data.DisplayName != null) { - contents.DisplayName = __expectString(data.DisplayName); - } + const doc = take(data, { + Certificate: __expectString, + CreatedTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1913,10 +1923,9 @@ const de_DescribeWebsiteCertificateAuthorityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1969,10 +1978,9 @@ const de_DisassociateDomainCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2028,10 +2036,9 @@ const de_DisassociateWebsiteAuthorizationProviderCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2084,10 +2091,9 @@ const de_DisassociateWebsiteCertificateAuthorityCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2107,12 +2113,11 @@ export const de_ListDevicesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Devices != null) { - contents.Devices = de_DeviceSummaryList(data.Devices, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Devices: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2146,10 +2151,9 @@ const de_ListDevicesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2169,12 +2173,11 @@ export const de_ListDomainsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Domains != null) { - contents.Domains = de_DomainSummaryList(data.Domains, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Domains: (_) => de_DomainSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2208,10 +2211,9 @@ const de_ListDomainsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2231,12 +2233,11 @@ export const de_ListFleetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.FleetSummaryList != null) { - contents.FleetSummaryList = de_FleetSummaryList(data.FleetSummaryList, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + FleetSummaryList: (_) => de_FleetSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2267,10 +2268,9 @@ const de_ListFleetsCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2290,9 +2290,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Tags != null) { - contents.Tags = de_TagMap(data.Tags, context); - } + const doc = take(data, { + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2314,10 +2315,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2337,15 +2337,11 @@ export const de_ListWebsiteAuthorizationProvidersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WebsiteAuthorizationProviders != null) { - contents.WebsiteAuthorizationProviders = de_WebsiteAuthorizationProvidersSummaryList( - data.WebsiteAuthorizationProviders, - context - ); - } + const doc = take(data, { + NextToken: __expectString, + WebsiteAuthorizationProviders: (_) => de_WebsiteAuthorizationProvidersSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2379,10 +2375,9 @@ const de_ListWebsiteAuthorizationProvidersCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2402,12 +2397,11 @@ export const de_ListWebsiteCertificateAuthoritiesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.WebsiteCertificateAuthorities != null) { - contents.WebsiteCertificateAuthorities = de_WebsiteCaSummaryList(data.WebsiteCertificateAuthorities, context); - } + const doc = take(data, { + NextToken: __expectString, + WebsiteCertificateAuthorities: (_) => de_WebsiteCaSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2438,10 +2432,9 @@ const de_ListWebsiteCertificateAuthoritiesCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2494,10 +2487,9 @@ const de_RestoreDomainAccessCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2550,10 +2542,9 @@ const de_RevokeDomainAccessCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2606,10 +2597,9 @@ const de_SignOutUserCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2650,10 +2640,9 @@ const de_TagResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2694,10 +2683,9 @@ const de_UntagResourceCommandError = async ( throw await de_InvalidRequestExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2750,10 +2738,9 @@ const de_UpdateAuditStreamConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2806,10 +2793,9 @@ const de_UpdateCompanyNetworkConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2862,10 +2848,9 @@ const de_UpdateDevicePolicyConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2918,10 +2903,9 @@ const de_UpdateDomainMetadataCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2974,10 +2958,9 @@ const de_UpdateFleetMetadataCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3030,16 +3013,15 @@ const de_UpdateIdentityProviderConfigurationCommandError = async ( throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InternalServerErrorExceptionRes */ @@ -3049,9 +3031,10 @@ const de_InternalServerErrorExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerErrorException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3068,9 +3051,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3087,9 +3071,10 @@ const de_ResourceAlreadyExistsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3106,9 +3091,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3125,9 +3111,10 @@ const de_TooManyRequestsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3144,9 +3131,10 @@ const de_UnauthorizedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -3154,79 +3142,26 @@ const de_UnauthorizedExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1SecurityGroupIds - */ -const se_SecurityGroupIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIds omitted. -/** - * serializeAws_restJson1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIds omitted. -/** - * serializeAws_restJson1TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_TagMap omitted. -/** - * deserializeAws_restJson1DeviceSummary - */ -const de_DeviceSummary = (output: any, context: __SerdeContext): DeviceSummary => { - return { - DeviceId: __expectString(output.DeviceId), - DeviceStatus: __expectString(output.DeviceStatus), - } as any; -}; +// de_DeviceSummary omitted. -/** - * deserializeAws_restJson1DeviceSummaryList - */ -const de_DeviceSummaryList = (output: any, context: __SerdeContext): DeviceSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DeviceSummary(entry, context); - }); - return retVal; -}; +// de_DeviceSummaryList omitted. /** * deserializeAws_restJson1DomainSummary */ const de_DomainSummary = (output: any, context: __SerdeContext): DomainSummary => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - DomainName: __expectString(output.DomainName), - DomainStatus: __expectString(output.DomainStatus), - } as any; + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + DomainName: __expectString, + DomainStatus: __expectString, + }) as any; }; /** @@ -3236,9 +3171,6 @@ const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSumma const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_DomainSummary(entry, context); }); return retVal; @@ -3248,22 +3180,16 @@ const de_DomainSummaryList = (output: any, context: __SerdeContext): DomainSumma * deserializeAws_restJson1FleetSummary */ const de_FleetSummary = (output: any, context: __SerdeContext): FleetSummary => { - return { - CompanyCode: __expectString(output.CompanyCode), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - FleetArn: __expectString(output.FleetArn), - FleetName: __expectString(output.FleetName), - FleetStatus: __expectString(output.FleetStatus), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Tags: output.Tags != null ? de_TagMap(output.Tags, context) : undefined, - } as any; + return take(output, { + CompanyCode: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + FleetArn: __expectString, + FleetName: __expectString, + FleetStatus: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Tags: _json, + }) as any; }; /** @@ -3273,56 +3199,16 @@ const de_FleetSummaryList = (output: any, context: __SerdeContext): FleetSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_FleetSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1SecurityGroupIds - */ -const de_SecurityGroupIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIds omitted. -/** - * deserializeAws_restJson1SubnetIds - */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SubnetIds omitted. -/** - * deserializeAws_restJson1TagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_TagMap omitted. /** * deserializeAws_restJson1WebsiteAuthorizationProvidersSummaryList @@ -3334,9 +3220,6 @@ const de_WebsiteAuthorizationProvidersSummaryList = ( const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WebsiteAuthorizationProviderSummary(entry, context); }); return retVal; @@ -3349,29 +3232,23 @@ const de_WebsiteAuthorizationProviderSummary = ( output: any, context: __SerdeContext ): WebsiteAuthorizationProviderSummary => { - return { - AuthorizationProviderId: __expectString(output.AuthorizationProviderId), - AuthorizationProviderType: __expectString(output.AuthorizationProviderType), - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DomainName: __expectString(output.DomainName), - } as any; + return take(output, { + AuthorizationProviderId: __expectString, + AuthorizationProviderType: __expectString, + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + }) as any; }; /** * deserializeAws_restJson1WebsiteCaSummary */ const de_WebsiteCaSummary = (output: any, context: __SerdeContext): WebsiteCaSummary => { - return { - CreatedTime: - output.CreatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedTime))) - : undefined, - DisplayName: __expectString(output.DisplayName), - WebsiteCaId: __expectString(output.WebsiteCaId), - } as any; + return take(output, { + CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + WebsiteCaId: __expectString, + }) as any; }; /** @@ -3381,9 +3258,6 @@ const de_WebsiteCaSummaryList = (output: any, context: __SerdeContext): WebsiteC const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WebsiteCaSummary(entry, context); }); return retVal; diff --git a/clients/client-workmail/src/protocols/Aws_json1_1.ts b/clients/client-workmail/src/protocols/Aws_json1_1.ts index 699f0a00ddec..ac7296e823a4 100644 --- a/clients/client-workmail/src/protocols/Aws_json1_1.ts +++ b/clients/client-workmail/src/protocols/Aws_json1_1.ts @@ -1,16 +1,16 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, expectInt32 as __expectInt32, - expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -253,68 +253,38 @@ import { UpdateResourceCommandInput, UpdateResourceCommandOutput } from "../comm import { AccessControlRule, AssociateDelegateToResourceRequest, - AssociateDelegateToResourceResponse, AssociateMemberToGroupRequest, - AssociateMemberToGroupResponse, AssumeImpersonationRoleRequest, - AssumeImpersonationRoleResponse, AvailabilityConfiguration, BookingOptions, CancelMailboxExportJobRequest, - CancelMailboxExportJobResponse, CreateAliasRequest, - CreateAliasResponse, CreateAvailabilityConfigurationRequest, - CreateAvailabilityConfigurationResponse, CreateGroupRequest, - CreateGroupResponse, CreateImpersonationRoleRequest, - CreateImpersonationRoleResponse, CreateMobileDeviceAccessRuleRequest, - CreateMobileDeviceAccessRuleResponse, CreateOrganizationRequest, - CreateOrganizationResponse, CreateResourceRequest, - CreateResourceResponse, CreateUserRequest, - CreateUserResponse, - Delegate, DeleteAccessControlRuleRequest, - DeleteAccessControlRuleResponse, DeleteAliasRequest, - DeleteAliasResponse, DeleteAvailabilityConfigurationRequest, - DeleteAvailabilityConfigurationResponse, DeleteEmailMonitoringConfigurationRequest, - DeleteEmailMonitoringConfigurationResponse, DeleteGroupRequest, - DeleteGroupResponse, DeleteImpersonationRoleRequest, - DeleteImpersonationRoleResponse, DeleteMailboxPermissionsRequest, - DeleteMailboxPermissionsResponse, DeleteMobileDeviceAccessOverrideRequest, - DeleteMobileDeviceAccessOverrideResponse, DeleteMobileDeviceAccessRuleRequest, - DeleteMobileDeviceAccessRuleResponse, DeleteOrganizationRequest, - DeleteOrganizationResponse, DeleteResourceRequest, - DeleteResourceResponse, DeleteRetentionPolicyRequest, - DeleteRetentionPolicyResponse, DeleteUserRequest, - DeleteUserResponse, DeregisterFromWorkMailRequest, - DeregisterFromWorkMailResponse, DeregisterMailDomainRequest, - DeregisterMailDomainResponse, DescribeEmailMonitoringConfigurationRequest, - DescribeEmailMonitoringConfigurationResponse, DescribeGroupRequest, DescribeGroupResponse, DescribeInboundDmarcSettingsRequest, - DescribeInboundDmarcSettingsResponse, DescribeMailboxExportJobRequest, DescribeMailboxExportJobResponse, DescribeOrganizationRequest, @@ -327,10 +297,7 @@ import { DirectoryServiceAuthenticationFailedException, DirectoryUnavailableException, DisassociateDelegateFromResourceRequest, - DisassociateDelegateFromResourceResponse, DisassociateMemberFromGroupRequest, - DisassociateMemberFromGroupResponse, - DnsRecord, Domain, EmailAddressInUseException, EntityAlreadyRegisteredException, @@ -339,23 +306,17 @@ import { EwsAvailabilityProvider, FolderConfiguration, GetAccessControlEffectRequest, - GetAccessControlEffectResponse, GetDefaultRetentionPolicyRequest, - GetDefaultRetentionPolicyResponse, GetImpersonationRoleEffectRequest, - GetImpersonationRoleEffectResponse, GetImpersonationRoleRequest, GetImpersonationRoleResponse, GetMailboxDetailsRequest, GetMailboxDetailsResponse, GetMailDomainRequest, - GetMailDomainResponse, GetMobileDeviceAccessEffectRequest, - GetMobileDeviceAccessEffectResponse, GetMobileDeviceAccessOverrideRequest, GetMobileDeviceAccessOverrideResponse, Group, - ImpersonationMatchedRule, ImpersonationRole, ImpersonationRule, InvalidConfigurationException, @@ -367,7 +328,6 @@ import { ListAccessControlRulesRequest, ListAccessControlRulesResponse, ListAliasesRequest, - ListAliasesResponse, ListAvailabilityConfigurationsRequest, ListAvailabilityConfigurationsResponse, ListGroupMembersRequest, @@ -379,85 +339,55 @@ import { ListMailboxExportJobsRequest, ListMailboxExportJobsResponse, ListMailboxPermissionsRequest, - ListMailboxPermissionsResponse, ListMailDomainsRequest, - ListMailDomainsResponse, ListMobileDeviceAccessOverridesRequest, ListMobileDeviceAccessOverridesResponse, ListMobileDeviceAccessRulesRequest, ListMobileDeviceAccessRulesResponse, ListOrganizationsRequest, - ListOrganizationsResponse, ListResourceDelegatesRequest, - ListResourceDelegatesResponse, ListResourcesRequest, ListResourcesResponse, ListTagsForResourceRequest, - ListTagsForResourceResponse, ListUsersRequest, ListUsersResponse, MailboxExportJob, MailDomainInUseException, MailDomainNotFoundException, MailDomainStateException, - MailDomainSummary, Member, - MobileDeviceAccessMatchedRule, MobileDeviceAccessOverride, MobileDeviceAccessRule, NameAvailabilityException, OrganizationNotFoundException, OrganizationStateException, - OrganizationSummary, - Permission, PermissionType, PutAccessControlRuleRequest, - PutAccessControlRuleResponse, PutEmailMonitoringConfigurationRequest, - PutEmailMonitoringConfigurationResponse, PutInboundDmarcSettingsRequest, - PutInboundDmarcSettingsResponse, PutMailboxPermissionsRequest, - PutMailboxPermissionsResponse, PutMobileDeviceAccessOverrideRequest, - PutMobileDeviceAccessOverrideResponse, PutRetentionPolicyRequest, - PutRetentionPolicyResponse, - RedactedEwsAvailabilityProvider, RegisterMailDomainRequest, - RegisterMailDomainResponse, RegisterToWorkMailRequest, - RegisterToWorkMailResponse, ReservedNameException, ResetPasswordRequest, - ResetPasswordResponse, Resource, ResourceNotFoundException, StartMailboxExportJobRequest, - StartMailboxExportJobResponse, Tag, TagResourceRequest, - TagResourceResponse, TestAvailabilityConfigurationRequest, - TestAvailabilityConfigurationResponse, TooManyTagsException, UnsupportedOperationException, UntagResourceRequest, - UntagResourceResponse, UpdateAvailabilityConfigurationRequest, - UpdateAvailabilityConfigurationResponse, UpdateDefaultMailDomainRequest, - UpdateDefaultMailDomainResponse, UpdateImpersonationRoleRequest, - UpdateImpersonationRoleResponse, UpdateMailboxQuotaRequest, - UpdateMailboxQuotaResponse, UpdateMobileDeviceAccessRuleRequest, - UpdateMobileDeviceAccessRuleResponse, UpdatePrimaryEmailAddressRequest, - UpdatePrimaryEmailAddressResponse, UpdateResourceRequest, - UpdateResourceResponse, User, } from "../models/models_0"; import { WorkMailServiceException as __BaseException } from "../models/WorkMailServiceException"; @@ -471,7 +401,7 @@ export const se_AssociateDelegateToResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateDelegateToResource"); let body: any; - body = JSON.stringify(se_AssociateDelegateToResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -484,7 +414,7 @@ export const se_AssociateMemberToGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateMemberToGroup"); let body: any; - body = JSON.stringify(se_AssociateMemberToGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -497,7 +427,7 @@ export const se_AssumeImpersonationRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssumeImpersonationRole"); let body: any; - body = JSON.stringify(se_AssumeImpersonationRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -523,7 +453,7 @@ export const se_CreateAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateAlias"); let body: any; - body = JSON.stringify(se_CreateAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -549,7 +479,7 @@ export const se_CreateGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateGroup"); let body: any; - body = JSON.stringify(se_CreateGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -601,7 +531,7 @@ export const se_CreateResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateResource"); let body: any; - body = JSON.stringify(se_CreateResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -614,7 +544,7 @@ export const se_CreateUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUser"); let body: any; - body = JSON.stringify(se_CreateUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -627,7 +557,7 @@ export const se_DeleteAccessControlRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAccessControlRule"); let body: any; - body = JSON.stringify(se_DeleteAccessControlRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -640,7 +570,7 @@ export const se_DeleteAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAlias"); let body: any; - body = JSON.stringify(se_DeleteAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -653,7 +583,7 @@ export const se_DeleteAvailabilityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteAvailabilityConfiguration"); let body: any; - body = JSON.stringify(se_DeleteAvailabilityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -666,7 +596,7 @@ export const se_DeleteEmailMonitoringConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteEmailMonitoringConfiguration"); let body: any; - body = JSON.stringify(se_DeleteEmailMonitoringConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -679,7 +609,7 @@ export const se_DeleteGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteGroup"); let body: any; - body = JSON.stringify(se_DeleteGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -692,7 +622,7 @@ export const se_DeleteImpersonationRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteImpersonationRole"); let body: any; - body = JSON.stringify(se_DeleteImpersonationRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -705,7 +635,7 @@ export const se_DeleteMailboxPermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMailboxPermissions"); let body: any; - body = JSON.stringify(se_DeleteMailboxPermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -718,7 +648,7 @@ export const se_DeleteMobileDeviceAccessOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMobileDeviceAccessOverride"); let body: any; - body = JSON.stringify(se_DeleteMobileDeviceAccessOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -731,7 +661,7 @@ export const se_DeleteMobileDeviceAccessRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMobileDeviceAccessRule"); let body: any; - body = JSON.stringify(se_DeleteMobileDeviceAccessRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -757,7 +687,7 @@ export const se_DeleteResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteResource"); let body: any; - body = JSON.stringify(se_DeleteResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -770,7 +700,7 @@ export const se_DeleteRetentionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteRetentionPolicy"); let body: any; - body = JSON.stringify(se_DeleteRetentionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -783,7 +713,7 @@ export const se_DeleteUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteUser"); let body: any; - body = JSON.stringify(se_DeleteUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -796,7 +726,7 @@ export const se_DeregisterFromWorkMailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterFromWorkMail"); let body: any; - body = JSON.stringify(se_DeregisterFromWorkMailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -809,7 +739,7 @@ export const se_DeregisterMailDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterMailDomain"); let body: any; - body = JSON.stringify(se_DeregisterMailDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -822,7 +752,7 @@ export const se_DescribeEmailMonitoringConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeEmailMonitoringConfiguration"); let body: any; - body = JSON.stringify(se_DescribeEmailMonitoringConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -835,7 +765,7 @@ export const se_DescribeGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeGroup"); let body: any; - body = JSON.stringify(se_DescribeGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -848,7 +778,7 @@ export const se_DescribeInboundDmarcSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeInboundDmarcSettings"); let body: any; - body = JSON.stringify(se_DescribeInboundDmarcSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -861,7 +791,7 @@ export const se_DescribeMailboxExportJobCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeMailboxExportJob"); let body: any; - body = JSON.stringify(se_DescribeMailboxExportJobRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -874,7 +804,7 @@ export const se_DescribeOrganizationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeOrganization"); let body: any; - body = JSON.stringify(se_DescribeOrganizationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -887,7 +817,7 @@ export const se_DescribeResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeResource"); let body: any; - body = JSON.stringify(se_DescribeResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -900,7 +830,7 @@ export const se_DescribeUserCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeUser"); let body: any; - body = JSON.stringify(se_DescribeUserRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -913,7 +843,7 @@ export const se_DisassociateDelegateFromResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateDelegateFromResource"); let body: any; - body = JSON.stringify(se_DisassociateDelegateFromResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -926,7 +856,7 @@ export const se_DisassociateMemberFromGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateMemberFromGroup"); let body: any; - body = JSON.stringify(se_DisassociateMemberFromGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -939,7 +869,7 @@ export const se_GetAccessControlEffectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetAccessControlEffect"); let body: any; - body = JSON.stringify(se_GetAccessControlEffectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -952,7 +882,7 @@ export const se_GetDefaultRetentionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetDefaultRetentionPolicy"); let body: any; - body = JSON.stringify(se_GetDefaultRetentionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -965,7 +895,7 @@ export const se_GetImpersonationRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetImpersonationRole"); let body: any; - body = JSON.stringify(se_GetImpersonationRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -978,7 +908,7 @@ export const se_GetImpersonationRoleEffectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetImpersonationRoleEffect"); let body: any; - body = JSON.stringify(se_GetImpersonationRoleEffectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -991,7 +921,7 @@ export const se_GetMailboxDetailsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMailboxDetails"); let body: any; - body = JSON.stringify(se_GetMailboxDetailsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1004,7 +934,7 @@ export const se_GetMailDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMailDomain"); let body: any; - body = JSON.stringify(se_GetMailDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1017,7 +947,7 @@ export const se_GetMobileDeviceAccessEffectCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMobileDeviceAccessEffect"); let body: any; - body = JSON.stringify(se_GetMobileDeviceAccessEffectRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1030,7 +960,7 @@ export const se_GetMobileDeviceAccessOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetMobileDeviceAccessOverride"); let body: any; - body = JSON.stringify(se_GetMobileDeviceAccessOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1043,7 +973,7 @@ export const se_ListAccessControlRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAccessControlRules"); let body: any; - body = JSON.stringify(se_ListAccessControlRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1056,7 +986,7 @@ export const se_ListAliasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAliases"); let body: any; - body = JSON.stringify(se_ListAliasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1069,7 +999,7 @@ export const se_ListAvailabilityConfigurationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailabilityConfigurations"); let body: any; - body = JSON.stringify(se_ListAvailabilityConfigurationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1082,7 +1012,7 @@ export const se_ListGroupMembersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroupMembers"); let body: any; - body = JSON.stringify(se_ListGroupMembersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1095,7 +1025,7 @@ export const se_ListGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListGroups"); let body: any; - body = JSON.stringify(se_ListGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1108,7 +1038,7 @@ export const se_ListImpersonationRolesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListImpersonationRoles"); let body: any; - body = JSON.stringify(se_ListImpersonationRolesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1121,7 +1051,7 @@ export const se_ListMailboxExportJobsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMailboxExportJobs"); let body: any; - body = JSON.stringify(se_ListMailboxExportJobsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1134,7 +1064,7 @@ export const se_ListMailboxPermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMailboxPermissions"); let body: any; - body = JSON.stringify(se_ListMailboxPermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1147,7 +1077,7 @@ export const se_ListMailDomainsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMailDomains"); let body: any; - body = JSON.stringify(se_ListMailDomainsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1160,7 +1090,7 @@ export const se_ListMobileDeviceAccessOverridesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMobileDeviceAccessOverrides"); let body: any; - body = JSON.stringify(se_ListMobileDeviceAccessOverridesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1173,7 +1103,7 @@ export const se_ListMobileDeviceAccessRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMobileDeviceAccessRules"); let body: any; - body = JSON.stringify(se_ListMobileDeviceAccessRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1186,7 +1116,7 @@ export const se_ListOrganizationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListOrganizations"); let body: any; - body = JSON.stringify(se_ListOrganizationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1199,7 +1129,7 @@ export const se_ListResourceDelegatesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResourceDelegates"); let body: any; - body = JSON.stringify(se_ListResourceDelegatesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1212,7 +1142,7 @@ export const se_ListResourcesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListResources"); let body: any; - body = JSON.stringify(se_ListResourcesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1225,7 +1155,7 @@ export const se_ListTagsForResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); let body: any; - body = JSON.stringify(se_ListTagsForResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1238,7 +1168,7 @@ export const se_ListUsersCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListUsers"); let body: any; - body = JSON.stringify(se_ListUsersRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1251,7 +1181,7 @@ export const se_PutAccessControlRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutAccessControlRule"); let body: any; - body = JSON.stringify(se_PutAccessControlRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1264,7 +1194,7 @@ export const se_PutEmailMonitoringConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutEmailMonitoringConfiguration"); let body: any; - body = JSON.stringify(se_PutEmailMonitoringConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1277,7 +1207,7 @@ export const se_PutInboundDmarcSettingsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutInboundDmarcSettings"); let body: any; - body = JSON.stringify(se_PutInboundDmarcSettingsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1290,7 +1220,7 @@ export const se_PutMailboxPermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutMailboxPermissions"); let body: any; - body = JSON.stringify(se_PutMailboxPermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1303,7 +1233,7 @@ export const se_PutMobileDeviceAccessOverrideCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutMobileDeviceAccessOverride"); let body: any; - body = JSON.stringify(se_PutMobileDeviceAccessOverrideRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1316,7 +1246,7 @@ export const se_PutRetentionPolicyCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PutRetentionPolicy"); let body: any; - body = JSON.stringify(se_PutRetentionPolicyRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1342,7 +1272,7 @@ export const se_RegisterToWorkMailCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterToWorkMail"); let body: any; - body = JSON.stringify(se_RegisterToWorkMailRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1355,7 +1285,7 @@ export const se_ResetPasswordCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ResetPassword"); let body: any; - body = JSON.stringify(se_ResetPasswordRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1381,7 +1311,7 @@ export const se_TagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagResource"); let body: any; - body = JSON.stringify(se_TagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1394,7 +1324,7 @@ export const se_TestAvailabilityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TestAvailabilityConfiguration"); let body: any; - body = JSON.stringify(se_TestAvailabilityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1407,7 +1337,7 @@ export const se_UntagResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagResource"); let body: any; - body = JSON.stringify(se_UntagResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1420,7 +1350,7 @@ export const se_UpdateAvailabilityConfigurationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateAvailabilityConfiguration"); let body: any; - body = JSON.stringify(se_UpdateAvailabilityConfigurationRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1433,7 +1363,7 @@ export const se_UpdateDefaultMailDomainCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateDefaultMailDomain"); let body: any; - body = JSON.stringify(se_UpdateDefaultMailDomainRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1446,7 +1376,7 @@ export const se_UpdateImpersonationRoleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateImpersonationRole"); let body: any; - body = JSON.stringify(se_UpdateImpersonationRoleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1459,7 +1389,7 @@ export const se_UpdateMailboxQuotaCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMailboxQuota"); let body: any; - body = JSON.stringify(se_UpdateMailboxQuotaRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1472,7 +1402,7 @@ export const se_UpdateMobileDeviceAccessRuleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateMobileDeviceAccessRule"); let body: any; - body = JSON.stringify(se_UpdateMobileDeviceAccessRuleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1485,7 +1415,7 @@ export const se_UpdatePrimaryEmailAddressCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdatePrimaryEmailAddress"); let body: any; - body = JSON.stringify(se_UpdatePrimaryEmailAddressRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1498,7 +1428,7 @@ export const se_UpdateResourceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateResource"); let body: any; - body = JSON.stringify(se_UpdateResourceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1514,12 +1444,12 @@ export const de_AssociateDelegateToResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateDelegateToResourceResponse(data, context); + contents = _json(data); const response: AssociateDelegateToResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1552,10 +1482,9 @@ const de_AssociateDelegateToResourceCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1573,12 +1502,12 @@ export const de_AssociateMemberToGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateMemberToGroupResponse(data, context); + contents = _json(data); const response: AssociateMemberToGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1620,10 +1549,9 @@ const de_AssociateMemberToGroupCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1641,12 +1569,12 @@ export const de_AssumeImpersonationRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssumeImpersonationRoleResponse(data, context); + contents = _json(data); const response: AssumeImpersonationRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1676,10 +1604,9 @@ const de_AssumeImpersonationRoleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1697,12 +1624,12 @@ export const de_CancelMailboxExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CancelMailboxExportJobResponse(data, context); + contents = _json(data); const response: CancelMailboxExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1732,10 +1659,9 @@ const de_CancelMailboxExportJobCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1753,12 +1679,12 @@ export const de_CreateAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAliasResponse(data, context); + contents = _json(data); const response: CreateAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1803,10 +1729,9 @@ const de_CreateAliasCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1824,12 +1749,12 @@ export const de_CreateAvailabilityConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateAvailabilityConfigurationResponse(data, context); + contents = _json(data); const response: CreateAvailabilityConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1862,10 +1787,9 @@ const de_CreateAvailabilityConfigurationCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1883,12 +1807,12 @@ export const de_CreateGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateGroupResponse(data, context); + contents = _json(data); const response: CreateGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1930,10 +1854,9 @@ const de_CreateGroupCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1951,12 +1874,12 @@ export const de_CreateImpersonationRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateImpersonationRoleResponse(data, context); + contents = _json(data); const response: CreateImpersonationRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1992,10 +1915,9 @@ const de_CreateImpersonationRoleCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2013,12 +1935,12 @@ export const de_CreateMobileDeviceAccessRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateMobileDeviceAccessRuleResponse(data, context); + contents = _json(data); const response: CreateMobileDeviceAccessRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2048,10 +1970,9 @@ const de_CreateMobileDeviceAccessRuleCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2069,12 +1990,12 @@ export const de_CreateOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateOrganizationResponse(data, context); + contents = _json(data); const response: CreateOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2107,10 +2028,9 @@ const de_CreateOrganizationCommandError = async ( throw await de_NameAvailabilityExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2128,12 +2048,12 @@ export const de_CreateResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateResourceResponse(data, context); + contents = _json(data); const response: CreateResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2172,10 +2092,9 @@ const de_CreateResourceCommandError = async ( throw await de_ReservedNameExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2193,12 +2112,12 @@ export const de_CreateUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUserResponse(data, context); + contents = _json(data); const response: CreateUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2243,10 +2162,9 @@ const de_CreateUserCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2264,12 +2182,12 @@ export const de_DeleteAccessControlRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAccessControlRuleResponse(data, context); + contents = _json(data); const response: DeleteAccessControlRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2293,10 +2211,9 @@ const de_DeleteAccessControlRuleCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2314,12 +2231,12 @@ export const de_DeleteAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAliasResponse(data, context); + contents = _json(data); const response: DeleteAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2352,10 +2269,9 @@ const de_DeleteAliasCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2373,12 +2289,12 @@ export const de_DeleteAvailabilityConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteAvailabilityConfigurationResponse(data, context); + contents = _json(data); const response: DeleteAvailabilityConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2402,10 +2318,9 @@ const de_DeleteAvailabilityConfigurationCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2423,12 +2338,12 @@ export const de_DeleteEmailMonitoringConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteEmailMonitoringConfigurationResponse(data, context); + contents = _json(data); const response: DeleteEmailMonitoringConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2455,10 +2370,9 @@ const de_DeleteEmailMonitoringConfigurationCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2476,12 +2390,12 @@ export const de_DeleteGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteGroupResponse(data, context); + contents = _json(data); const response: DeleteGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2520,10 +2434,9 @@ const de_DeleteGroupCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2541,12 +2454,12 @@ export const de_DeleteImpersonationRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteImpersonationRoleResponse(data, context); + contents = _json(data); const response: DeleteImpersonationRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2573,10 +2486,9 @@ const de_DeleteImpersonationRoleCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2594,12 +2506,12 @@ export const de_DeleteMailboxPermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMailboxPermissionsResponse(data, context); + contents = _json(data); const response: DeleteMailboxPermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2632,10 +2544,9 @@ const de_DeleteMailboxPermissionsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2653,12 +2564,12 @@ export const de_DeleteMobileDeviceAccessOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMobileDeviceAccessOverrideResponse(data, context); + contents = _json(data); const response: DeleteMobileDeviceAccessOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2688,10 +2599,9 @@ const de_DeleteMobileDeviceAccessOverrideCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2709,12 +2619,12 @@ export const de_DeleteMobileDeviceAccessRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteMobileDeviceAccessRuleResponse(data, context); + contents = _json(data); const response: DeleteMobileDeviceAccessRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2741,10 +2651,9 @@ const de_DeleteMobileDeviceAccessRuleCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2762,12 +2671,12 @@ export const de_DeleteOrganizationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteOrganizationResponse(data, context); + contents = _json(data); const response: DeleteOrganizationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2794,10 +2703,9 @@ const de_DeleteOrganizationCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2815,12 +2723,12 @@ export const de_DeleteResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteResourceResponse(data, context); + contents = _json(data); const response: DeleteResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2850,10 +2758,9 @@ const de_DeleteResourceCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2871,12 +2778,12 @@ export const de_DeleteRetentionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteRetentionPolicyResponse(data, context); + contents = _json(data); const response: DeleteRetentionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2903,10 +2810,9 @@ const de_DeleteRetentionPolicyCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2924,12 +2830,12 @@ export const de_DeleteUserCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteUserResponse(data, context); + contents = _json(data); const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2968,10 +2874,9 @@ const de_DeleteUserCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2989,12 +2894,12 @@ export const de_DeregisterFromWorkMailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterFromWorkMailResponse(data, context); + contents = _json(data); const response: DeregisterFromWorkMailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3027,10 +2932,9 @@ const de_DeregisterFromWorkMailCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3048,12 +2952,12 @@ export const de_DeregisterMailDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterMailDomainResponse(data, context); + contents = _json(data); const response: DeregisterMailDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3086,10 +2990,9 @@ const de_DeregisterMailDomainCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3107,12 +3010,12 @@ export const de_DescribeEmailMonitoringConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeEmailMonitoringConfigurationResponse(data, context); + contents = _json(data); const response: DescribeEmailMonitoringConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3142,10 +3045,9 @@ const de_DescribeEmailMonitoringConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3168,7 +3070,7 @@ export const de_DescribeGroupCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3198,10 +3100,9 @@ const de_DescribeGroupCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3219,12 +3120,12 @@ export const de_DescribeInboundDmarcSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeInboundDmarcSettingsResponse(data, context); + contents = _json(data); const response: DescribeInboundDmarcSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3248,10 +3149,9 @@ const de_DescribeInboundDmarcSettingsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3274,7 +3174,7 @@ export const de_DescribeMailboxExportJobCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3304,10 +3204,9 @@ const de_DescribeMailboxExportJobCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3330,7 +3229,7 @@ export const de_DescribeOrganizationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3354,10 +3253,9 @@ const de_DescribeOrganizationCommandError = async ( throw await de_OrganizationNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3380,7 +3278,7 @@ export const de_DescribeResourceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3410,10 +3308,9 @@ const de_DescribeResourceCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3436,7 +3333,7 @@ export const de_DescribeUserCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3466,10 +3363,9 @@ const de_DescribeUserCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3487,12 +3383,12 @@ export const de_DisassociateDelegateFromResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateDelegateFromResourceResponse(data, context); + contents = _json(data); const response: DisassociateDelegateFromResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3525,10 +3421,9 @@ const de_DisassociateDelegateFromResourceCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3546,12 +3441,12 @@ export const de_DisassociateMemberFromGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateMemberFromGroupResponse(data, context); + contents = _json(data); const response: DisassociateMemberFromGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3593,10 +3488,9 @@ const de_DisassociateMemberFromGroupCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3614,12 +3508,12 @@ export const de_GetAccessControlEffectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetAccessControlEffectResponse(data, context); + contents = _json(data); const response: GetAccessControlEffectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3652,10 +3546,9 @@ const de_GetAccessControlEffectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3673,12 +3566,12 @@ export const de_GetDefaultRetentionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetDefaultRetentionPolicyResponse(data, context); + contents = _json(data); const response: GetDefaultRetentionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3708,10 +3601,9 @@ const de_GetDefaultRetentionPolicyCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3734,7 +3626,7 @@ export const de_GetImpersonationRoleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3764,10 +3656,9 @@ const de_GetImpersonationRoleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3785,12 +3676,12 @@ export const de_GetImpersonationRoleEffectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetImpersonationRoleEffectResponse(data, context); + contents = _json(data); const response: GetImpersonationRoleEffectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3826,10 +3717,9 @@ const de_GetImpersonationRoleEffectCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3852,7 +3742,7 @@ export const de_GetMailboxDetailsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3879,10 +3769,9 @@ const de_GetMailboxDetailsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3900,12 +3789,12 @@ export const de_GetMailDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMailDomainResponse(data, context); + contents = _json(data); const response: GetMailDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3935,10 +3824,9 @@ const de_GetMailDomainCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3956,12 +3844,12 @@ export const de_GetMobileDeviceAccessEffectCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GetMobileDeviceAccessEffectResponse(data, context); + contents = _json(data); const response: GetMobileDeviceAccessEffectCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3988,10 +3876,9 @@ const de_GetMobileDeviceAccessEffectCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4014,7 +3901,7 @@ export const de_GetMobileDeviceAccessOverrideCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4047,10 +3934,9 @@ const de_GetMobileDeviceAccessOverrideCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4073,7 +3959,7 @@ export const de_ListAccessControlRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4097,10 +3983,9 @@ const de_ListAccessControlRulesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4118,12 +4003,12 @@ export const de_ListAliasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAliasesResponse(data, context); + contents = _json(data); const response: ListAliasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4156,10 +4041,9 @@ const de_ListAliasesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4182,7 +4066,7 @@ export const de_ListAvailabilityConfigurationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4206,10 +4090,9 @@ const de_ListAvailabilityConfigurationsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4232,7 +4115,7 @@ export const de_ListGroupMembersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4265,10 +4148,9 @@ const de_ListGroupMembersCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4291,7 +4173,7 @@ export const de_ListGroupsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4321,10 +4203,9 @@ const de_ListGroupsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4347,7 +4228,7 @@ export const de_ListImpersonationRolesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4374,10 +4255,9 @@ const de_ListImpersonationRolesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4400,7 +4280,7 @@ export const de_ListMailboxExportJobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4427,10 +4307,9 @@ const de_ListMailboxExportJobsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4448,12 +4327,12 @@ export const de_ListMailboxPermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListMailboxPermissionsResponse(data, context); + contents = _json(data); const response: ListMailboxPermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4483,10 +4362,9 @@ const de_ListMailboxPermissionsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4504,12 +4382,12 @@ export const de_ListMailDomainsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListMailDomainsResponse(data, context); + contents = _json(data); const response: ListMailDomainsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4536,10 +4414,9 @@ const de_ListMailDomainsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4562,7 +4439,7 @@ export const de_ListMobileDeviceAccessOverridesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4592,10 +4469,9 @@ const de_ListMobileDeviceAccessOverridesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4618,7 +4494,7 @@ export const de_ListMobileDeviceAccessRulesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4645,10 +4521,9 @@ const de_ListMobileDeviceAccessRulesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4666,12 +4541,12 @@ export const de_ListOrganizationsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListOrganizationsResponse(data, context); + contents = _json(data); const response: ListOrganizationsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4692,10 +4567,9 @@ const de_ListOrganizationsCommandError = async ( throw await de_InvalidParameterExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4713,12 +4587,12 @@ export const de_ListResourceDelegatesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListResourceDelegatesResponse(data, context); + contents = _json(data); const response: ListResourceDelegatesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4751,10 +4625,9 @@ const de_ListResourceDelegatesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4777,7 +4650,7 @@ export const de_ListResourcesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4804,10 +4677,9 @@ const de_ListResourcesCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4825,12 +4697,12 @@ export const de_ListTagsForResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListTagsForResourceResponse(data, context); + contents = _json(data); const response: ListTagsForResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4851,10 +4723,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4877,7 +4748,7 @@ export const de_ListUsersCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4904,10 +4775,9 @@ const de_ListUsersCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4925,12 +4795,12 @@ export const de_PutAccessControlRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutAccessControlRuleResponse(data, context); + contents = _json(data); const response: PutAccessControlRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4966,10 +4836,9 @@ const de_PutAccessControlRuleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4987,12 +4856,12 @@ export const de_PutEmailMonitoringConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutEmailMonitoringConfigurationResponse(data, context); + contents = _json(data); const response: PutEmailMonitoringConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5022,10 +4891,9 @@ const de_PutEmailMonitoringConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5043,12 +4911,12 @@ export const de_PutInboundDmarcSettingsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutInboundDmarcSettingsResponse(data, context); + contents = _json(data); const response: PutInboundDmarcSettingsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5072,10 +4940,9 @@ const de_PutInboundDmarcSettingsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5093,12 +4960,12 @@ export const de_PutMailboxPermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutMailboxPermissionsResponse(data, context); + contents = _json(data); const response: PutMailboxPermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5131,10 +4998,9 @@ const de_PutMailboxPermissionsCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5152,12 +5018,12 @@ export const de_PutMobileDeviceAccessOverrideCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutMobileDeviceAccessOverrideResponse(data, context); + contents = _json(data); const response: PutMobileDeviceAccessOverrideCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5190,10 +5056,9 @@ const de_PutMobileDeviceAccessOverrideCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5211,12 +5076,12 @@ export const de_PutRetentionPolicyCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_PutRetentionPolicyResponse(data, context); + contents = _json(data); const response: PutRetentionPolicyCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5246,10 +5111,9 @@ const de_PutRetentionPolicyCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5267,12 +5131,12 @@ export const de_RegisterMailDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterMailDomainResponse(data, context); + contents = _json(data); const response: RegisterMailDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5305,10 +5169,9 @@ const de_RegisterMailDomainCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5326,12 +5189,12 @@ export const de_RegisterToWorkMailCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterToWorkMailResponse(data, context); + contents = _json(data); const response: RegisterToWorkMailCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5382,10 +5245,9 @@ const de_RegisterToWorkMailCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5403,12 +5265,12 @@ export const de_ResetPasswordCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ResetPasswordResponse(data, context); + contents = _json(data); const response: ResetPasswordCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5453,10 +5315,9 @@ const de_ResetPasswordCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5474,12 +5335,12 @@ export const de_StartMailboxExportJobCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartMailboxExportJobResponse(data, context); + contents = _json(data); const response: StartMailboxExportJobCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5512,10 +5373,9 @@ const de_StartMailboxExportJobCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5533,12 +5393,12 @@ export const de_TagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TagResourceResponse(data, context); + contents = _json(data); const response: TagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5565,10 +5425,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5586,12 +5445,12 @@ export const de_TestAvailabilityConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TestAvailabilityConfigurationResponse(data, context); + contents = _json(data); const response: TestAvailabilityConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5621,10 +5480,9 @@ const de_TestAvailabilityConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5642,12 +5500,12 @@ export const de_UntagResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UntagResourceResponse(data, context); + contents = _json(data); const response: UntagResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5668,10 +5526,9 @@ const de_UntagResourceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5689,12 +5546,12 @@ export const de_UpdateAvailabilityConfigurationCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateAvailabilityConfigurationResponse(data, context); + contents = _json(data); const response: UpdateAvailabilityConfigurationCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5724,10 +5581,9 @@ const de_UpdateAvailabilityConfigurationCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5745,12 +5601,12 @@ export const de_UpdateDefaultMailDomainCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateDefaultMailDomainResponse(data, context); + contents = _json(data); const response: UpdateDefaultMailDomainCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5783,10 +5639,9 @@ const de_UpdateDefaultMailDomainCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5804,12 +5659,12 @@ export const de_UpdateImpersonationRoleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateImpersonationRoleResponse(data, context); + contents = _json(data); const response: UpdateImpersonationRoleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5848,10 +5703,9 @@ const de_UpdateImpersonationRoleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5869,12 +5723,12 @@ export const de_UpdateMailboxQuotaCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMailboxQuotaResponse(data, context); + contents = _json(data); const response: UpdateMailboxQuotaCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5907,10 +5761,9 @@ const de_UpdateMailboxQuotaCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5928,12 +5781,12 @@ export const de_UpdateMobileDeviceAccessRuleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateMobileDeviceAccessRuleResponse(data, context); + contents = _json(data); const response: UpdateMobileDeviceAccessRuleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -5963,10 +5816,9 @@ const de_UpdateMobileDeviceAccessRuleCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -5984,12 +5836,12 @@ export const de_UpdatePrimaryEmailAddressCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdatePrimaryEmailAddressResponse(data, context); + contents = _json(data); const response: UpdatePrimaryEmailAddressCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6040,10 +5892,9 @@ const de_UpdatePrimaryEmailAddressCommandError = async ( throw await de_UnsupportedOperationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6061,12 +5912,12 @@ export const de_UpdateResourceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateResourceResponse(data, context); + contents = _json(data); const response: UpdateResourceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -6114,10 +5965,9 @@ const de_UpdateResourceCommandError = async ( throw await de_OrganizationStateExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -6131,7 +5981,7 @@ const de_DirectoryInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryInUseException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6147,7 +5997,7 @@ const de_DirectoryServiceAuthenticationFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryServiceAuthenticationFailedException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryServiceAuthenticationFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6163,7 +6013,7 @@ const de_DirectoryUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_DirectoryUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new DirectoryUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6179,7 +6029,7 @@ const de_EmailAddressInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EmailAddressInUseException(body, context); + const deserialized: any = _json(body); const exception = new EmailAddressInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6195,7 +6045,7 @@ const de_EntityAlreadyRegisteredExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntityAlreadyRegisteredException(body, context); + const deserialized: any = _json(body); const exception = new EntityAlreadyRegisteredException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6211,7 +6061,7 @@ const de_EntityNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntityNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new EntityNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6227,7 +6077,7 @@ const de_EntityStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_EntityStateException(body, context); + const deserialized: any = _json(body); const exception = new EntityStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6243,7 +6093,7 @@ const de_InvalidConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6259,7 +6109,7 @@ const de_InvalidCustomSesConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidCustomSesConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new InvalidCustomSesConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6275,7 +6125,7 @@ const de_InvalidParameterExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6291,7 +6141,7 @@ const de_InvalidPasswordExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidPasswordException(body, context); + const deserialized: any = _json(body); const exception = new InvalidPasswordException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6307,7 +6157,7 @@ const de_LimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_LimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new LimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6323,7 +6173,7 @@ const de_MailDomainInUseExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MailDomainInUseException(body, context); + const deserialized: any = _json(body); const exception = new MailDomainInUseException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6339,7 +6189,7 @@ const de_MailDomainNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MailDomainNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new MailDomainNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6355,7 +6205,7 @@ const de_MailDomainStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_MailDomainStateException(body, context); + const deserialized: any = _json(body); const exception = new MailDomainStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6371,7 +6221,7 @@ const de_NameAvailabilityExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_NameAvailabilityException(body, context); + const deserialized: any = _json(body); const exception = new NameAvailabilityException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6387,7 +6237,7 @@ const de_OrganizationNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6403,7 +6253,7 @@ const de_OrganizationStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OrganizationStateException(body, context); + const deserialized: any = _json(body); const exception = new OrganizationStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6419,7 +6269,7 @@ const de_ReservedNameExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ReservedNameException(body, context); + const deserialized: any = _json(body); const exception = new ReservedNameException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6435,7 +6285,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6451,7 +6301,7 @@ const de_TooManyTagsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_TooManyTagsException(body, context); + const deserialized: any = _json(body); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6467,7 +6317,7 @@ const de_UnsupportedOperationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedOperationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -6475,88 +6325,28 @@ const de_UnsupportedOperationExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ActionsList - */ -const se_ActionsList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ActionsList omitted. -/** - * serializeAws_json1_1AssociateDelegateToResourceRequest - */ -const se_AssociateDelegateToResourceRequest = ( - input: AssociateDelegateToResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_AssociateDelegateToResourceRequest omitted. -/** - * serializeAws_json1_1AssociateMemberToGroupRequest - */ -const se_AssociateMemberToGroupRequest = (input: AssociateMemberToGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.MemberId != null && { MemberId: input.MemberId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_AssociateMemberToGroupRequest omitted. -/** - * serializeAws_json1_1AssumeImpersonationRoleRequest - */ -const se_AssumeImpersonationRoleRequest = (input: AssumeImpersonationRoleRequest, context: __SerdeContext): any => { - return { - ...(input.ImpersonationRoleId != null && { ImpersonationRoleId: input.ImpersonationRoleId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_AssumeImpersonationRoleRequest omitted. -/** - * serializeAws_json1_1BookingOptions - */ -const se_BookingOptions = (input: BookingOptions, context: __SerdeContext): any => { - return { - ...(input.AutoAcceptRequests != null && { AutoAcceptRequests: input.AutoAcceptRequests }), - ...(input.AutoDeclineConflictingRequests != null && { - AutoDeclineConflictingRequests: input.AutoDeclineConflictingRequests, - }), - ...(input.AutoDeclineRecurringRequests != null && { - AutoDeclineRecurringRequests: input.AutoDeclineRecurringRequests, - }), - }; -}; +// se_BookingOptions omitted. /** * serializeAws_json1_1CancelMailboxExportJobRequest */ const se_CancelMailboxExportJobRequest = (input: CancelMailboxExportJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + JobId: [], + OrganizationId: [], + }); }; -/** - * serializeAws_json1_1CreateAliasRequest - */ -const se_CreateAliasRequest = (input: CreateAliasRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_CreateAliasRequest omitted. /** * serializeAws_json1_1CreateAvailabilityConfigurationRequest @@ -6565,39 +6355,29 @@ const se_CreateAvailabilityConfigurationRequest = ( input: CreateAvailabilityConfigurationRequest, context: __SerdeContext ): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EwsProvider != null && { EwsProvider: se_EwsAvailabilityProvider(input.EwsProvider, context) }), - ...(input.LambdaProvider != null && { - LambdaProvider: se_LambdaAvailabilityProvider(input.LambdaProvider, context), - }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DomainName: [], + EwsProvider: _json, + LambdaProvider: _json, + OrganizationId: [], + }); }; -/** - * serializeAws_json1_1CreateGroupRequest - */ -const se_CreateGroupRequest = (input: CreateGroupRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_CreateGroupRequest omitted. /** * serializeAws_json1_1CreateImpersonationRoleRequest */ const se_CreateImpersonationRoleRequest = (input: CreateImpersonationRoleRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Rules != null && { Rules: se_ImpersonationRuleList(input.Rules, context) }), - ...(input.Type != null && { Type: input.Type }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + Name: [], + OrganizationId: [], + Rules: _json, + Type: [], + }); }; /** @@ -6607,1543 +6387,389 @@ const se_CreateMobileDeviceAccessRuleRequest = ( input: CreateMobileDeviceAccessRuleRequest, context: __SerdeContext ): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceModels != null && { DeviceModels: se_DeviceModelList(input.DeviceModels, context) }), - ...(input.DeviceOperatingSystems != null && { - DeviceOperatingSystems: se_DeviceOperatingSystemList(input.DeviceOperatingSystems, context), - }), - ...(input.DeviceTypes != null && { DeviceTypes: se_DeviceTypeList(input.DeviceTypes, context) }), - ...(input.DeviceUserAgents != null && { - DeviceUserAgents: se_DeviceUserAgentList(input.DeviceUserAgents, context), - }), - ...(input.Effect != null && { Effect: input.Effect }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotDeviceModels != null && { NotDeviceModels: se_DeviceModelList(input.NotDeviceModels, context) }), - ...(input.NotDeviceOperatingSystems != null && { - NotDeviceOperatingSystems: se_DeviceOperatingSystemList(input.NotDeviceOperatingSystems, context), - }), - ...(input.NotDeviceTypes != null && { NotDeviceTypes: se_DeviceTypeList(input.NotDeviceTypes, context) }), - ...(input.NotDeviceUserAgents != null && { - NotDeviceUserAgents: se_DeviceUserAgentList(input.NotDeviceUserAgents, context), - }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + DeviceModels: _json, + DeviceOperatingSystems: _json, + DeviceTypes: _json, + DeviceUserAgents: _json, + Effect: [], + Name: [], + NotDeviceModels: _json, + NotDeviceOperatingSystems: _json, + NotDeviceTypes: _json, + NotDeviceUserAgents: _json, + OrganizationId: [], + }); }; /** * serializeAws_json1_1CreateOrganizationRequest */ const se_CreateOrganizationRequest = (input: CreateOrganizationRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Domains != null && { Domains: se_Domains(input.Domains, context) }), - ...(input.EnableInteroperability != null && { EnableInteroperability: input.EnableInteroperability }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - }; + return take(input, { + Alias: [], + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DirectoryId: [], + Domains: _json, + EnableInteroperability: [], + KmsKeyArn: [], + }); }; -/** - * serializeAws_json1_1CreateResourceRequest - */ -const se_CreateResourceRequest = (input: CreateResourceRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Type != null && { Type: input.Type }), - }; -}; +// se_CreateResourceRequest omitted. -/** - * serializeAws_json1_1CreateUserRequest - */ -const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { - return { - ...(input.DisplayName != null && { DisplayName: input.DisplayName }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Password != null && { Password: input.Password }), - }; -}; +// se_CreateUserRequest omitted. -/** - * serializeAws_json1_1DeleteAccessControlRuleRequest - */ -const se_DeleteAccessControlRuleRequest = (input: DeleteAccessControlRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteAccessControlRuleRequest omitted. -/** - * serializeAws_json1_1DeleteAliasRequest - */ -const se_DeleteAliasRequest = (input: DeleteAliasRequest, context: __SerdeContext): any => { - return { - ...(input.Alias != null && { Alias: input.Alias }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteAliasRequest omitted. -/** - * serializeAws_json1_1DeleteAvailabilityConfigurationRequest - */ -const se_DeleteAvailabilityConfigurationRequest = ( - input: DeleteAvailabilityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteAvailabilityConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteEmailMonitoringConfigurationRequest - */ -const se_DeleteEmailMonitoringConfigurationRequest = ( - input: DeleteEmailMonitoringConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteEmailMonitoringConfigurationRequest omitted. -/** - * serializeAws_json1_1DeleteGroupRequest - */ -const se_DeleteGroupRequest = (input: DeleteGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteGroupRequest omitted. -/** - * serializeAws_json1_1DeleteImpersonationRoleRequest - */ -const se_DeleteImpersonationRoleRequest = (input: DeleteImpersonationRoleRequest, context: __SerdeContext): any => { - return { - ...(input.ImpersonationRoleId != null && { ImpersonationRoleId: input.ImpersonationRoleId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteImpersonationRoleRequest omitted. -/** - * serializeAws_json1_1DeleteMailboxPermissionsRequest - */ -const se_DeleteMailboxPermissionsRequest = (input: DeleteMailboxPermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.GranteeId != null && { GranteeId: input.GranteeId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteMailboxPermissionsRequest omitted. -/** - * serializeAws_json1_1DeleteMobileDeviceAccessOverrideRequest - */ -const se_DeleteMobileDeviceAccessOverrideRequest = ( - input: DeleteMobileDeviceAccessOverrideRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_DeleteMobileDeviceAccessOverrideRequest omitted. -/** - * serializeAws_json1_1DeleteMobileDeviceAccessRuleRequest - */ -const se_DeleteMobileDeviceAccessRuleRequest = ( - input: DeleteMobileDeviceAccessRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.MobileDeviceAccessRuleId != null && { MobileDeviceAccessRuleId: input.MobileDeviceAccessRuleId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteMobileDeviceAccessRuleRequest omitted. /** * serializeAws_json1_1DeleteOrganizationRequest */ const se_DeleteOrganizationRequest = (input: DeleteOrganizationRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DeleteDirectory != null && { DeleteDirectory: input.DeleteDirectory }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DeleteDirectory: [], + OrganizationId: [], + }); }; -/** - * serializeAws_json1_1DeleteResourceRequest - */ -const se_DeleteResourceRequest = (input: DeleteResourceRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DeleteResourceRequest omitted. -/** - * serializeAws_json1_1DeleteRetentionPolicyRequest - */ -const se_DeleteRetentionPolicyRequest = (input: DeleteRetentionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Id != null && { Id: input.Id }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeleteRetentionPolicyRequest omitted. -/** - * serializeAws_json1_1DeleteUserRequest - */ -const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_DeleteUserRequest omitted. -/** - * serializeAws_json1_1DeregisterFromWorkMailRequest - */ -const se_DeregisterFromWorkMailRequest = (input: DeregisterFromWorkMailRequest, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeregisterFromWorkMailRequest omitted. -/** - * serializeAws_json1_1DeregisterMailDomainRequest - */ -const se_DeregisterMailDomainRequest = (input: DeregisterMailDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DeregisterMailDomainRequest omitted. -/** - * serializeAws_json1_1DescribeEmailMonitoringConfigurationRequest - */ -const se_DescribeEmailMonitoringConfigurationRequest = ( - input: DescribeEmailMonitoringConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DescribeEmailMonitoringConfigurationRequest omitted. -/** - * serializeAws_json1_1DescribeGroupRequest - */ -const se_DescribeGroupRequest = (input: DescribeGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DescribeGroupRequest omitted. -/** - * serializeAws_json1_1DescribeInboundDmarcSettingsRequest - */ -const se_DescribeInboundDmarcSettingsRequest = ( - input: DescribeInboundDmarcSettingsRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DescribeInboundDmarcSettingsRequest omitted. -/** - * serializeAws_json1_1DescribeMailboxExportJobRequest - */ -const se_DescribeMailboxExportJobRequest = (input: DescribeMailboxExportJobRequest, context: __SerdeContext): any => { - return { - ...(input.JobId != null && { JobId: input.JobId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DescribeMailboxExportJobRequest omitted. -/** - * serializeAws_json1_1DescribeOrganizationRequest - */ -const se_DescribeOrganizationRequest = (input: DescribeOrganizationRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DescribeOrganizationRequest omitted. -/** - * serializeAws_json1_1DescribeResourceRequest - */ -const se_DescribeResourceRequest = (input: DescribeResourceRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DescribeResourceRequest omitted. -/** - * serializeAws_json1_1DescribeUserRequest - */ -const se_DescribeUserRequest = (input: DescribeUserRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_DescribeUserRequest omitted. -/** - * serializeAws_json1_1DeviceModelList - */ -const se_DeviceModelList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceModelList omitted. -/** - * serializeAws_json1_1DeviceOperatingSystemList - */ -const se_DeviceOperatingSystemList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceOperatingSystemList omitted. -/** - * serializeAws_json1_1DeviceTypeList - */ -const se_DeviceTypeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceTypeList omitted. -/** - * serializeAws_json1_1DeviceUserAgentList - */ -const se_DeviceUserAgentList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeviceUserAgentList omitted. -/** - * serializeAws_json1_1DisassociateDelegateFromResourceRequest - */ -const se_DisassociateDelegateFromResourceRequest = ( - input: DisassociateDelegateFromResourceRequest, - context: __SerdeContext -): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DisassociateDelegateFromResourceRequest omitted. -/** - * serializeAws_json1_1DisassociateMemberFromGroupRequest - */ -const se_DisassociateMemberFromGroupRequest = ( - input: DisassociateMemberFromGroupRequest, - context: __SerdeContext -): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.MemberId != null && { MemberId: input.MemberId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_DisassociateMemberFromGroupRequest omitted. -/** - * serializeAws_json1_1Domain - */ -const se_Domain = (input: Domain, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.HostedZoneId != null && { HostedZoneId: input.HostedZoneId }), - }; -}; +// se_Domain omitted. -/** - * serializeAws_json1_1Domains - */ -const se_Domains = (input: Domain[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Domain(entry, context); - }); -}; +// se_Domains omitted. -/** - * serializeAws_json1_1EwsAvailabilityProvider - */ -const se_EwsAvailabilityProvider = (input: EwsAvailabilityProvider, context: __SerdeContext): any => { - return { - ...(input.EwsEndpoint != null && { EwsEndpoint: input.EwsEndpoint }), - ...(input.EwsPassword != null && { EwsPassword: input.EwsPassword }), - ...(input.EwsUsername != null && { EwsUsername: input.EwsUsername }), - }; -}; +// se_EwsAvailabilityProvider omitted. -/** - * serializeAws_json1_1FolderConfiguration - */ -const se_FolderConfiguration = (input: FolderConfiguration, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Period != null && { Period: input.Period }), - }; -}; +// se_FolderConfiguration omitted. -/** - * serializeAws_json1_1FolderConfigurations - */ -const se_FolderConfigurations = (input: FolderConfiguration[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_FolderConfiguration(entry, context); - }); -}; +// se_FolderConfigurations omitted. -/** - * serializeAws_json1_1GetAccessControlEffectRequest - */ -const se_GetAccessControlEffectRequest = (input: GetAccessControlEffectRequest, context: __SerdeContext): any => { - return { - ...(input.Action != null && { Action: input.Action }), - ...(input.ImpersonationRoleId != null && { ImpersonationRoleId: input.ImpersonationRoleId }), - ...(input.IpAddress != null && { IpAddress: input.IpAddress }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_GetAccessControlEffectRequest omitted. -/** - * serializeAws_json1_1GetDefaultRetentionPolicyRequest - */ -const se_GetDefaultRetentionPolicyRequest = (input: GetDefaultRetentionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_GetDefaultRetentionPolicyRequest omitted. -/** - * serializeAws_json1_1GetImpersonationRoleEffectRequest - */ -const se_GetImpersonationRoleEffectRequest = ( - input: GetImpersonationRoleEffectRequest, - context: __SerdeContext -): any => { - return { - ...(input.ImpersonationRoleId != null && { ImpersonationRoleId: input.ImpersonationRoleId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.TargetUser != null && { TargetUser: input.TargetUser }), - }; -}; +// se_GetImpersonationRoleEffectRequest omitted. -/** - * serializeAws_json1_1GetImpersonationRoleRequest - */ -const se_GetImpersonationRoleRequest = (input: GetImpersonationRoleRequest, context: __SerdeContext): any => { - return { - ...(input.ImpersonationRoleId != null && { ImpersonationRoleId: input.ImpersonationRoleId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_GetImpersonationRoleRequest omitted. -/** - * serializeAws_json1_1GetMailboxDetailsRequest - */ -const se_GetMailboxDetailsRequest = (input: GetMailboxDetailsRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_GetMailboxDetailsRequest omitted. -/** - * serializeAws_json1_1GetMailDomainRequest - */ -const se_GetMailDomainRequest = (input: GetMailDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_GetMailDomainRequest omitted. -/** - * serializeAws_json1_1GetMobileDeviceAccessEffectRequest - */ -const se_GetMobileDeviceAccessEffectRequest = ( - input: GetMobileDeviceAccessEffectRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeviceModel != null && { DeviceModel: input.DeviceModel }), - ...(input.DeviceOperatingSystem != null && { DeviceOperatingSystem: input.DeviceOperatingSystem }), - ...(input.DeviceType != null && { DeviceType: input.DeviceType }), - ...(input.DeviceUserAgent != null && { DeviceUserAgent: input.DeviceUserAgent }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_GetMobileDeviceAccessEffectRequest omitted. -/** - * serializeAws_json1_1GetMobileDeviceAccessOverrideRequest - */ -const se_GetMobileDeviceAccessOverrideRequest = ( - input: GetMobileDeviceAccessOverrideRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_GetMobileDeviceAccessOverrideRequest omitted. -/** - * serializeAws_json1_1ImpersonationRoleIdList - */ -const se_ImpersonationRoleIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ImpersonationRoleIdList omitted. -/** - * serializeAws_json1_1ImpersonationRule - */ -const se_ImpersonationRule = (input: ImpersonationRule, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Effect != null && { Effect: input.Effect }), - ...(input.ImpersonationRuleId != null && { ImpersonationRuleId: input.ImpersonationRuleId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotTargetUsers != null && { NotTargetUsers: se_TargetUsers(input.NotTargetUsers, context) }), - ...(input.TargetUsers != null && { TargetUsers: se_TargetUsers(input.TargetUsers, context) }), - }; -}; +// se_ImpersonationRule omitted. -/** - * serializeAws_json1_1ImpersonationRuleList - */ -const se_ImpersonationRuleList = (input: ImpersonationRule[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ImpersonationRule(entry, context); - }); -}; +// se_ImpersonationRuleList omitted. -/** - * serializeAws_json1_1IpRangeList - */ -const se_IpRangeList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_IpRangeList omitted. -/** - * serializeAws_json1_1LambdaAvailabilityProvider - */ -const se_LambdaAvailabilityProvider = (input: LambdaAvailabilityProvider, context: __SerdeContext): any => { - return { - ...(input.LambdaArn != null && { LambdaArn: input.LambdaArn }), - }; -}; +// se_LambdaAvailabilityProvider omitted. -/** - * serializeAws_json1_1ListAccessControlRulesRequest - */ -const se_ListAccessControlRulesRequest = (input: ListAccessControlRulesRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListAccessControlRulesRequest omitted. -/** - * serializeAws_json1_1ListAliasesRequest - */ -const se_ListAliasesRequest = (input: ListAliasesRequest, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListAliasesRequest omitted. -/** - * serializeAws_json1_1ListAvailabilityConfigurationsRequest - */ -const se_ListAvailabilityConfigurationsRequest = ( - input: ListAvailabilityConfigurationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListAvailabilityConfigurationsRequest omitted. -/** - * serializeAws_json1_1ListGroupMembersRequest - */ -const se_ListGroupMembersRequest = (input: ListGroupMembersRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListGroupMembersRequest omitted. -/** - * serializeAws_json1_1ListGroupsRequest - */ -const se_ListGroupsRequest = (input: ListGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListGroupsRequest omitted. -/** - * serializeAws_json1_1ListImpersonationRolesRequest - */ -const se_ListImpersonationRolesRequest = (input: ListImpersonationRolesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListImpersonationRolesRequest omitted. -/** - * serializeAws_json1_1ListMailboxExportJobsRequest - */ -const se_ListMailboxExportJobsRequest = (input: ListMailboxExportJobsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListMailboxExportJobsRequest omitted. -/** - * serializeAws_json1_1ListMailboxPermissionsRequest - */ -const se_ListMailboxPermissionsRequest = (input: ListMailboxPermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListMailboxPermissionsRequest omitted. -/** - * serializeAws_json1_1ListMailDomainsRequest - */ -const se_ListMailDomainsRequest = (input: ListMailDomainsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListMailDomainsRequest omitted. -/** - * serializeAws_json1_1ListMobileDeviceAccessOverridesRequest - */ -const se_ListMobileDeviceAccessOverridesRequest = ( - input: ListMobileDeviceAccessOverridesRequest, - context: __SerdeContext -): any => { - return { - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_ListMobileDeviceAccessOverridesRequest omitted. -/** - * serializeAws_json1_1ListMobileDeviceAccessRulesRequest - */ -const se_ListMobileDeviceAccessRulesRequest = ( - input: ListMobileDeviceAccessRulesRequest, - context: __SerdeContext -): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListMobileDeviceAccessRulesRequest omitted. -/** - * serializeAws_json1_1ListOrganizationsRequest - */ -const se_ListOrganizationsRequest = (input: ListOrganizationsRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_ListOrganizationsRequest omitted. -/** - * serializeAws_json1_1ListResourceDelegatesRequest - */ -const se_ListResourceDelegatesRequest = (input: ListResourceDelegatesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_ListResourceDelegatesRequest omitted. -/** - * serializeAws_json1_1ListResourcesRequest - */ -const se_ListResourcesRequest = (input: ListResourcesRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListResourcesRequest omitted. -/** - * serializeAws_json1_1ListTagsForResourceRequest - */ -const se_ListTagsForResourceRequest = (input: ListTagsForResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }; -}; +// se_ListTagsForResourceRequest omitted. -/** - * serializeAws_json1_1ListUsersRequest - */ -const se_ListUsersRequest = (input: ListUsersRequest, context: __SerdeContext): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_ListUsersRequest omitted. -/** - * serializeAws_json1_1PermissionValues - */ -const se_PermissionValues = (input: (PermissionType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_PermissionValues omitted. -/** - * serializeAws_json1_1PutAccessControlRuleRequest - */ -const se_PutAccessControlRuleRequest = (input: PutAccessControlRuleRequest, context: __SerdeContext): any => { - return { - ...(input.Actions != null && { Actions: se_ActionsList(input.Actions, context) }), - ...(input.Description != null && { Description: input.Description }), - ...(input.Effect != null && { Effect: input.Effect }), - ...(input.ImpersonationRoleIds != null && { - ImpersonationRoleIds: se_ImpersonationRoleIdList(input.ImpersonationRoleIds, context), - }), - ...(input.IpRanges != null && { IpRanges: se_IpRangeList(input.IpRanges, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotActions != null && { NotActions: se_ActionsList(input.NotActions, context) }), - ...(input.NotImpersonationRoleIds != null && { - NotImpersonationRoleIds: se_ImpersonationRoleIdList(input.NotImpersonationRoleIds, context), - }), - ...(input.NotIpRanges != null && { NotIpRanges: se_IpRangeList(input.NotIpRanges, context) }), - ...(input.NotUserIds != null && { NotUserIds: se_UserIdList(input.NotUserIds, context) }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserIds != null && { UserIds: se_UserIdList(input.UserIds, context) }), - }; -}; +// se_PutAccessControlRuleRequest omitted. -/** - * serializeAws_json1_1PutEmailMonitoringConfigurationRequest - */ -const se_PutEmailMonitoringConfigurationRequest = ( - input: PutEmailMonitoringConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - }; -}; +// se_PutEmailMonitoringConfigurationRequest omitted. -/** - * serializeAws_json1_1PutInboundDmarcSettingsRequest - */ -const se_PutInboundDmarcSettingsRequest = (input: PutInboundDmarcSettingsRequest, context: __SerdeContext): any => { - return { - ...(input.Enforced != null && { Enforced: input.Enforced }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_PutInboundDmarcSettingsRequest omitted. -/** - * serializeAws_json1_1PutMailboxPermissionsRequest - */ -const se_PutMailboxPermissionsRequest = (input: PutMailboxPermissionsRequest, context: __SerdeContext): any => { - return { - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.GranteeId != null && { GranteeId: input.GranteeId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.PermissionValues != null && { PermissionValues: se_PermissionValues(input.PermissionValues, context) }), - }; -}; +// se_PutMailboxPermissionsRequest omitted. -/** - * serializeAws_json1_1PutMobileDeviceAccessOverrideRequest - */ -const se_PutMobileDeviceAccessOverrideRequest = ( - input: PutMobileDeviceAccessOverrideRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceId != null && { DeviceId: input.DeviceId }), - ...(input.Effect != null && { Effect: input.Effect }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_PutMobileDeviceAccessOverrideRequest omitted. -/** - * serializeAws_json1_1PutRetentionPolicyRequest - */ -const se_PutRetentionPolicyRequest = (input: PutRetentionPolicyRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.FolderConfigurations != null && { - FolderConfigurations: se_FolderConfigurations(input.FolderConfigurations, context), - }), - ...(input.Id != null && { Id: input.Id }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_PutRetentionPolicyRequest omitted. /** * serializeAws_json1_1RegisterMailDomainRequest */ const se_RegisterMailDomainRequest = (input: RegisterMailDomainRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + DomainName: [], + OrganizationId: [], + }); }; -/** - * serializeAws_json1_1RegisterToWorkMailRequest - */ -const se_RegisterToWorkMailRequest = (input: RegisterToWorkMailRequest, context: __SerdeContext): any => { - return { - ...(input.Email != null && { Email: input.Email }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; +// se_RegisterToWorkMailRequest omitted. -/** - * serializeAws_json1_1ResetPasswordRequest - */ -const se_ResetPasswordRequest = (input: ResetPasswordRequest, context: __SerdeContext): any => { - return { - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Password != null && { Password: input.Password }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; +// se_ResetPasswordRequest omitted. /** * serializeAws_json1_1StartMailboxExportJobRequest */ const se_StartMailboxExportJobRequest = (input: StartMailboxExportJobRequest, context: __SerdeContext): any => { - return { - ClientToken: input.ClientToken ?? generateIdempotencyToken(), - ...(input.Description != null && { Description: input.Description }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.RoleArn != null && { RoleArn: input.RoleArn }), - ...(input.S3BucketName != null && { S3BucketName: input.S3BucketName }), - ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }), - }; -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TagResourceRequest - */ -const se_TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1TargetUsers - */ -const se_TargetUsers = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TestAvailabilityConfigurationRequest - */ -const se_TestAvailabilityConfigurationRequest = ( - input: TestAvailabilityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EwsProvider != null && { EwsProvider: se_EwsAvailabilityProvider(input.EwsProvider, context) }), - ...(input.LambdaProvider != null && { - LambdaProvider: se_LambdaAvailabilityProvider(input.LambdaProvider, context), - }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; - -/** - * serializeAws_json1_1UntagResourceRequest - */ -const se_UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateAvailabilityConfigurationRequest - */ -const se_UpdateAvailabilityConfigurationRequest = ( - input: UpdateAvailabilityConfigurationRequest, - context: __SerdeContext -): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.EwsProvider != null && { EwsProvider: se_EwsAvailabilityProvider(input.EwsProvider, context) }), - ...(input.LambdaProvider != null && { - LambdaProvider: se_LambdaAvailabilityProvider(input.LambdaProvider, context), - }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; - -/** - * serializeAws_json1_1UpdateDefaultMailDomainRequest - */ -const se_UpdateDefaultMailDomainRequest = (input: UpdateDefaultMailDomainRequest, context: __SerdeContext): any => { - return { - ...(input.DomainName != null && { DomainName: input.DomainName }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; - -/** - * serializeAws_json1_1UpdateImpersonationRoleRequest - */ -const se_UpdateImpersonationRoleRequest = (input: UpdateImpersonationRoleRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.ImpersonationRoleId != null && { ImpersonationRoleId: input.ImpersonationRoleId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.Rules != null && { Rules: se_ImpersonationRuleList(input.Rules, context) }), - ...(input.Type != null && { Type: input.Type }), - }; -}; - -/** - * serializeAws_json1_1UpdateMailboxQuotaRequest - */ -const se_UpdateMailboxQuotaRequest = (input: UpdateMailboxQuotaRequest, context: __SerdeContext): any => { - return { - ...(input.MailboxQuota != null && { MailboxQuota: input.MailboxQuota }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.UserId != null && { UserId: input.UserId }), - }; -}; - -/** - * serializeAws_json1_1UpdateMobileDeviceAccessRuleRequest - */ -const se_UpdateMobileDeviceAccessRuleRequest = ( - input: UpdateMobileDeviceAccessRuleRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.DeviceModels != null && { DeviceModels: se_DeviceModelList(input.DeviceModels, context) }), - ...(input.DeviceOperatingSystems != null && { - DeviceOperatingSystems: se_DeviceOperatingSystemList(input.DeviceOperatingSystems, context), - }), - ...(input.DeviceTypes != null && { DeviceTypes: se_DeviceTypeList(input.DeviceTypes, context) }), - ...(input.DeviceUserAgents != null && { - DeviceUserAgents: se_DeviceUserAgentList(input.DeviceUserAgents, context), - }), - ...(input.Effect != null && { Effect: input.Effect }), - ...(input.MobileDeviceAccessRuleId != null && { MobileDeviceAccessRuleId: input.MobileDeviceAccessRuleId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.NotDeviceModels != null && { NotDeviceModels: se_DeviceModelList(input.NotDeviceModels, context) }), - ...(input.NotDeviceOperatingSystems != null && { - NotDeviceOperatingSystems: se_DeviceOperatingSystemList(input.NotDeviceOperatingSystems, context), - }), - ...(input.NotDeviceTypes != null && { NotDeviceTypes: se_DeviceTypeList(input.NotDeviceTypes, context) }), - ...(input.NotDeviceUserAgents != null && { - NotDeviceUserAgents: se_DeviceUserAgentList(input.NotDeviceUserAgents, context), - }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; - -/** - * serializeAws_json1_1UpdatePrimaryEmailAddressRequest - */ -const se_UpdatePrimaryEmailAddressRequest = (input: UpdatePrimaryEmailAddressRequest, context: __SerdeContext): any => { - return { - ...(input.Email != null && { Email: input.Email }), - ...(input.EntityId != null && { EntityId: input.EntityId }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - }; -}; - -/** - * serializeAws_json1_1UpdateResourceRequest - */ -const se_UpdateResourceRequest = (input: UpdateResourceRequest, context: __SerdeContext): any => { - return { - ...(input.BookingOptions != null && { BookingOptions: se_BookingOptions(input.BookingOptions, context) }), - ...(input.Name != null && { Name: input.Name }), - ...(input.OrganizationId != null && { OrganizationId: input.OrganizationId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; - -/** - * serializeAws_json1_1UserIdList - */ -const se_UserIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * deserializeAws_json1_1AccessControlRule - */ -const de_AccessControlRule = (output: any, context: __SerdeContext): AccessControlRule => { - return { - Actions: output.Actions != null ? de_ActionsList(output.Actions, context) : undefined, - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - Description: __expectString(output.Description), - Effect: __expectString(output.Effect), - ImpersonationRoleIds: - output.ImpersonationRoleIds != null - ? de_ImpersonationRoleIdList(output.ImpersonationRoleIds, context) - : undefined, - IpRanges: output.IpRanges != null ? de_IpRangeList(output.IpRanges, context) : undefined, - Name: __expectString(output.Name), - NotActions: output.NotActions != null ? de_ActionsList(output.NotActions, context) : undefined, - NotImpersonationRoleIds: - output.NotImpersonationRoleIds != null - ? de_ImpersonationRoleIdList(output.NotImpersonationRoleIds, context) - : undefined, - NotIpRanges: output.NotIpRanges != null ? de_IpRangeList(output.NotIpRanges, context) : undefined, - NotUserIds: output.NotUserIds != null ? de_UserIdList(output.NotUserIds, context) : undefined, - UserIds: output.UserIds != null ? de_UserIdList(output.UserIds, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AccessControlRuleNameList - */ -const de_AccessControlRuleNameList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AccessControlRulesList - */ -const de_AccessControlRulesList = (output: any, context: __SerdeContext): AccessControlRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccessControlRule(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ActionsList - */ -const de_ActionsList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1Aliases - */ -const de_Aliases = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociateDelegateToResourceResponse - */ -const de_AssociateDelegateToResourceResponse = ( - output: any, - context: __SerdeContext -): AssociateDelegateToResourceResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssociateMemberToGroupResponse - */ -const de_AssociateMemberToGroupResponse = (output: any, context: __SerdeContext): AssociateMemberToGroupResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AssumeImpersonationRoleResponse - */ -const de_AssumeImpersonationRoleResponse = (output: any, context: __SerdeContext): AssumeImpersonationRoleResponse => { - return { - ExpiresIn: __expectLong(output.ExpiresIn), - Token: __expectString(output.Token), - } as any; -}; - -/** - * deserializeAws_json1_1AvailabilityConfiguration - */ -const de_AvailabilityConfiguration = (output: any, context: __SerdeContext): AvailabilityConfiguration => { - return { - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - DomainName: __expectString(output.DomainName), - EwsProvider: - output.EwsProvider != null ? de_RedactedEwsAvailabilityProvider(output.EwsProvider, context) : undefined, - LambdaProvider: - output.LambdaProvider != null ? de_LambdaAvailabilityProvider(output.LambdaProvider, context) : undefined, - ProviderType: __expectString(output.ProviderType), - } as any; -}; - -/** - * deserializeAws_json1_1AvailabilityConfigurationList - */ -const de_AvailabilityConfigurationList = (output: any, context: __SerdeContext): AvailabilityConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AvailabilityConfiguration(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1BookingOptions - */ -const de_BookingOptions = (output: any, context: __SerdeContext): BookingOptions => { - return { - AutoAcceptRequests: __expectBoolean(output.AutoAcceptRequests), - AutoDeclineConflictingRequests: __expectBoolean(output.AutoDeclineConflictingRequests), - AutoDeclineRecurringRequests: __expectBoolean(output.AutoDeclineRecurringRequests), - } as any; -}; - -/** - * deserializeAws_json1_1CancelMailboxExportJobResponse - */ -const de_CancelMailboxExportJobResponse = (output: any, context: __SerdeContext): CancelMailboxExportJobResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateAliasResponse - */ -const de_CreateAliasResponse = (output: any, context: __SerdeContext): CreateAliasResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateAvailabilityConfigurationResponse - */ -const de_CreateAvailabilityConfigurationResponse = ( - output: any, - context: __SerdeContext -): CreateAvailabilityConfigurationResponse => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateGroupResponse - */ -const de_CreateGroupResponse = (output: any, context: __SerdeContext): CreateGroupResponse => { - return { - GroupId: __expectString(output.GroupId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateImpersonationRoleResponse - */ -const de_CreateImpersonationRoleResponse = (output: any, context: __SerdeContext): CreateImpersonationRoleResponse => { - return { - ImpersonationRoleId: __expectString(output.ImpersonationRoleId), - } as any; + return take(input, { + ClientToken: (_) => _ ?? generateIdempotencyToken(), + Description: [], + EntityId: [], + KmsKeyArn: [], + OrganizationId: [], + RoleArn: [], + S3BucketName: [], + S3Prefix: [], + }); }; -/** - * deserializeAws_json1_1CreateMobileDeviceAccessRuleResponse - */ -const de_CreateMobileDeviceAccessRuleResponse = ( - output: any, - context: __SerdeContext -): CreateMobileDeviceAccessRuleResponse => { - return { - MobileDeviceAccessRuleId: __expectString(output.MobileDeviceAccessRuleId), - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1CreateOrganizationResponse - */ -const de_CreateOrganizationResponse = (output: any, context: __SerdeContext): CreateOrganizationResponse => { - return { - OrganizationId: __expectString(output.OrganizationId), - } as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1CreateResourceResponse - */ -const de_CreateResourceResponse = (output: any, context: __SerdeContext): CreateResourceResponse => { - return { - ResourceId: __expectString(output.ResourceId), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1CreateUserResponse - */ -const de_CreateUserResponse = (output: any, context: __SerdeContext): CreateUserResponse => { - return { - UserId: __expectString(output.UserId), - } as any; -}; +// se_TagResourceRequest omitted. -/** - * deserializeAws_json1_1Delegate - */ -const de_Delegate = (output: any, context: __SerdeContext): Delegate => { - return { - Id: __expectString(output.Id), - Type: __expectString(output.Type), - } as any; -}; +// se_TargetUsers omitted. -/** - * deserializeAws_json1_1DeleteAccessControlRuleResponse - */ -const de_DeleteAccessControlRuleResponse = (output: any, context: __SerdeContext): DeleteAccessControlRuleResponse => { - return {} as any; -}; +// se_TestAvailabilityConfigurationRequest omitted. -/** - * deserializeAws_json1_1DeleteAliasResponse - */ -const de_DeleteAliasResponse = (output: any, context: __SerdeContext): DeleteAliasResponse => { - return {} as any; -}; +// se_UntagResourceRequest omitted. -/** - * deserializeAws_json1_1DeleteAvailabilityConfigurationResponse - */ -const de_DeleteAvailabilityConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteAvailabilityConfigurationResponse => { - return {} as any; -}; +// se_UpdateAvailabilityConfigurationRequest omitted. -/** - * deserializeAws_json1_1DeleteEmailMonitoringConfigurationResponse - */ -const de_DeleteEmailMonitoringConfigurationResponse = ( - output: any, - context: __SerdeContext -): DeleteEmailMonitoringConfigurationResponse => { - return {} as any; -}; +// se_UpdateDefaultMailDomainRequest omitted. -/** - * deserializeAws_json1_1DeleteGroupResponse - */ -const de_DeleteGroupResponse = (output: any, context: __SerdeContext): DeleteGroupResponse => { - return {} as any; -}; +// se_UpdateImpersonationRoleRequest omitted. -/** - * deserializeAws_json1_1DeleteImpersonationRoleResponse - */ -const de_DeleteImpersonationRoleResponse = (output: any, context: __SerdeContext): DeleteImpersonationRoleResponse => { - return {} as any; -}; +// se_UpdateMailboxQuotaRequest omitted. -/** - * deserializeAws_json1_1DeleteMailboxPermissionsResponse - */ -const de_DeleteMailboxPermissionsResponse = ( - output: any, - context: __SerdeContext -): DeleteMailboxPermissionsResponse => { - return {} as any; -}; +// se_UpdateMobileDeviceAccessRuleRequest omitted. -/** - * deserializeAws_json1_1DeleteMobileDeviceAccessOverrideResponse - */ -const de_DeleteMobileDeviceAccessOverrideResponse = ( - output: any, - context: __SerdeContext -): DeleteMobileDeviceAccessOverrideResponse => { - return {} as any; -}; +// se_UpdatePrimaryEmailAddressRequest omitted. -/** - * deserializeAws_json1_1DeleteMobileDeviceAccessRuleResponse - */ -const de_DeleteMobileDeviceAccessRuleResponse = ( - output: any, - context: __SerdeContext -): DeleteMobileDeviceAccessRuleResponse => { - return {} as any; -}; +// se_UpdateResourceRequest omitted. -/** - * deserializeAws_json1_1DeleteOrganizationResponse - */ -const de_DeleteOrganizationResponse = (output: any, context: __SerdeContext): DeleteOrganizationResponse => { - return { - OrganizationId: __expectString(output.OrganizationId), - State: __expectString(output.State), - } as any; -}; +// se_UserIdList omitted. /** - * deserializeAws_json1_1DeleteResourceResponse + * deserializeAws_json1_1AccessControlRule */ -const de_DeleteResourceResponse = (output: any, context: __SerdeContext): DeleteResourceResponse => { - return {} as any; -}; +const de_AccessControlRule = (output: any, context: __SerdeContext): AccessControlRule => { + return take(output, { + Actions: _json, + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + Effect: __expectString, + ImpersonationRoleIds: _json, + IpRanges: _json, + Name: __expectString, + NotActions: _json, + NotImpersonationRoleIds: _json, + NotIpRanges: _json, + NotUserIds: _json, + UserIds: _json, + }) as any; +}; + +// de_AccessControlRuleNameList omitted. /** - * deserializeAws_json1_1DeleteRetentionPolicyResponse + * deserializeAws_json1_1AccessControlRulesList */ -const de_DeleteRetentionPolicyResponse = (output: any, context: __SerdeContext): DeleteRetentionPolicyResponse => { - return {} as any; +const de_AccessControlRulesList = (output: any, context: __SerdeContext): AccessControlRule[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AccessControlRule(entry, context); + }); + return retVal; }; -/** - * deserializeAws_json1_1DeleteUserResponse - */ -const de_DeleteUserResponse = (output: any, context: __SerdeContext): DeleteUserResponse => { - return {} as any; -}; +// de_ActionsList omitted. -/** - * deserializeAws_json1_1DeregisterFromWorkMailResponse - */ -const de_DeregisterFromWorkMailResponse = (output: any, context: __SerdeContext): DeregisterFromWorkMailResponse => { - return {} as any; -}; +// de_Aliases omitted. + +// de_AssociateDelegateToResourceResponse omitted. + +// de_AssociateMemberToGroupResponse omitted. + +// de_AssumeImpersonationRoleResponse omitted. /** - * deserializeAws_json1_1DeregisterMailDomainResponse + * deserializeAws_json1_1AvailabilityConfiguration */ -const de_DeregisterMailDomainResponse = (output: any, context: __SerdeContext): DeregisterMailDomainResponse => { - return {} as any; +const de_AvailabilityConfiguration = (output: any, context: __SerdeContext): AvailabilityConfiguration => { + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DomainName: __expectString, + EwsProvider: _json, + LambdaProvider: _json, + ProviderType: __expectString, + }) as any; }; /** - * deserializeAws_json1_1DescribeEmailMonitoringConfigurationResponse + * deserializeAws_json1_1AvailabilityConfigurationList */ -const de_DescribeEmailMonitoringConfigurationResponse = ( - output: any, - context: __SerdeContext -): DescribeEmailMonitoringConfigurationResponse => { - return { - LogGroupArn: __expectString(output.LogGroupArn), - RoleArn: __expectString(output.RoleArn), - } as any; +const de_AvailabilityConfigurationList = (output: any, context: __SerdeContext): AvailabilityConfiguration[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AvailabilityConfiguration(entry, context); + }); + return retVal; }; +// de_BookingOptions omitted. + +// de_CancelMailboxExportJobResponse omitted. + +// de_CreateAliasResponse omitted. + +// de_CreateAvailabilityConfigurationResponse omitted. + +// de_CreateGroupResponse omitted. + +// de_CreateImpersonationRoleResponse omitted. + +// de_CreateMobileDeviceAccessRuleResponse omitted. + +// de_CreateOrganizationResponse omitted. + +// de_CreateResourceResponse omitted. + +// de_CreateUserResponse omitted. + +// de_Delegate omitted. + +// de_DeleteAccessControlRuleResponse omitted. + +// de_DeleteAliasResponse omitted. + +// de_DeleteAvailabilityConfigurationResponse omitted. + +// de_DeleteEmailMonitoringConfigurationResponse omitted. + +// de_DeleteGroupResponse omitted. + +// de_DeleteImpersonationRoleResponse omitted. + +// de_DeleteMailboxPermissionsResponse omitted. + +// de_DeleteMobileDeviceAccessOverrideResponse omitted. + +// de_DeleteMobileDeviceAccessRuleResponse omitted. + +// de_DeleteOrganizationResponse omitted. + +// de_DeleteResourceResponse omitted. + +// de_DeleteRetentionPolicyResponse omitted. + +// de_DeleteUserResponse omitted. + +// de_DeregisterFromWorkMailResponse omitted. + +// de_DeregisterMailDomainResponse omitted. + +// de_DescribeEmailMonitoringConfigurationResponse omitted. + /** * deserializeAws_json1_1DescribeGroupResponse */ const de_DescribeGroupResponse = (output: any, context: __SerdeContext): DescribeGroupResponse => { - return { - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - Email: __expectString(output.Email), - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - GroupId: __expectString(output.GroupId), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Email: __expectString, + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GroupId: __expectString, + Name: __expectString, + State: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DescribeInboundDmarcSettingsResponse - */ -const de_DescribeInboundDmarcSettingsResponse = ( - output: any, - context: __SerdeContext -): DescribeInboundDmarcSettingsResponse => { - return { - Enforced: __expectBoolean(output.Enforced), - } as any; -}; +// de_DescribeInboundDmarcSettingsResponse omitted. /** * deserializeAws_json1_1DescribeMailboxExportJobResponse @@ -8152,387 +6778,139 @@ const de_DescribeMailboxExportJobResponse = ( output: any, context: __SerdeContext ): DescribeMailboxExportJobResponse => { - return { - Description: __expectString(output.Description), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - EntityId: __expectString(output.EntityId), - ErrorInfo: __expectString(output.ErrorInfo), - EstimatedProgress: __expectInt32(output.EstimatedProgress), - KmsKeyArn: __expectString(output.KmsKeyArn), - RoleArn: __expectString(output.RoleArn), - S3BucketName: __expectString(output.S3BucketName), - S3Path: __expectString(output.S3Path), - S3Prefix: __expectString(output.S3Prefix), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - } as any; + return take(output, { + Description: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EntityId: __expectString, + ErrorInfo: __expectString, + EstimatedProgress: __expectInt32, + KmsKeyArn: __expectString, + RoleArn: __expectString, + S3BucketName: __expectString, + S3Path: __expectString, + S3Prefix: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeOrganizationResponse */ const de_DescribeOrganizationResponse = (output: any, context: __SerdeContext): DescribeOrganizationResponse => { - return { - ARN: __expectString(output.ARN), - Alias: __expectString(output.Alias), - CompletedDate: - output.CompletedDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CompletedDate))) - : undefined, - DefaultMailDomain: __expectString(output.DefaultMailDomain), - DirectoryId: __expectString(output.DirectoryId), - DirectoryType: __expectString(output.DirectoryType), - ErrorMessage: __expectString(output.ErrorMessage), - OrganizationId: __expectString(output.OrganizationId), - State: __expectString(output.State), - } as any; + return take(output, { + ARN: __expectString, + Alias: __expectString, + CompletedDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DefaultMailDomain: __expectString, + DirectoryId: __expectString, + DirectoryType: __expectString, + ErrorMessage: __expectString, + OrganizationId: __expectString, + State: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeResourceResponse */ const de_DescribeResourceResponse = (output: any, context: __SerdeContext): DescribeResourceResponse => { - return { - BookingOptions: output.BookingOptions != null ? de_BookingOptions(output.BookingOptions, context) : undefined, - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - Email: __expectString(output.Email), - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - Name: __expectString(output.Name), - ResourceId: __expectString(output.ResourceId), - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; + return take(output, { + BookingOptions: _json, + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Email: __expectString, + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + ResourceId: __expectString, + State: __expectString, + Type: __expectString, + }) as any; }; /** * deserializeAws_json1_1DescribeUserResponse */ const de_DescribeUserResponse = (output: any, context: __SerdeContext): DescribeUserResponse => { - return { - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - DisplayName: __expectString(output.DisplayName), - Email: __expectString(output.Email), - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - Name: __expectString(output.Name), - State: __expectString(output.State), - UserId: __expectString(output.UserId), - UserRole: __expectString(output.UserRole), - } as any; -}; - -/** - * deserializeAws_json1_1DeviceModelList - */ -const de_DeviceModelList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + Email: __expectString, + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + State: __expectString, + UserId: __expectString, + UserRole: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1DeviceOperatingSystemList - */ -const de_DeviceOperatingSystemList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DeviceModelList omitted. -/** - * deserializeAws_json1_1DeviceTypeList - */ -const de_DeviceTypeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DeviceOperatingSystemList omitted. -/** - * deserializeAws_json1_1DeviceUserAgentList - */ -const de_DeviceUserAgentList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_DeviceTypeList omitted. -/** - * deserializeAws_json1_1DirectoryInUseException - */ -const de_DirectoryInUseException = (output: any, context: __SerdeContext): DirectoryInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DeviceUserAgentList omitted. -/** - * deserializeAws_json1_1DirectoryServiceAuthenticationFailedException - */ -const de_DirectoryServiceAuthenticationFailedException = ( - output: any, - context: __SerdeContext -): DirectoryServiceAuthenticationFailedException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DirectoryInUseException omitted. -/** - * deserializeAws_json1_1DirectoryUnavailableException - */ -const de_DirectoryUnavailableException = (output: any, context: __SerdeContext): DirectoryUnavailableException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DirectoryServiceAuthenticationFailedException omitted. -/** - * deserializeAws_json1_1DisassociateDelegateFromResourceResponse - */ -const de_DisassociateDelegateFromResourceResponse = ( - output: any, - context: __SerdeContext -): DisassociateDelegateFromResourceResponse => { - return {} as any; -}; +// de_DirectoryUnavailableException omitted. -/** - * deserializeAws_json1_1DisassociateMemberFromGroupResponse - */ -const de_DisassociateMemberFromGroupResponse = ( - output: any, - context: __SerdeContext -): DisassociateMemberFromGroupResponse => { - return {} as any; -}; +// de_DisassociateDelegateFromResourceResponse omitted. -/** - * deserializeAws_json1_1DnsRecord - */ -const de_DnsRecord = (output: any, context: __SerdeContext): DnsRecord => { - return { - Hostname: __expectString(output.Hostname), - Type: __expectString(output.Type), - Value: __expectString(output.Value), - } as any; -}; +// de_DisassociateMemberFromGroupResponse omitted. -/** - * deserializeAws_json1_1DnsRecords - */ -const de_DnsRecords = (output: any, context: __SerdeContext): DnsRecord[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_DnsRecord(entry, context); - }); - return retVal; -}; +// de_DnsRecord omitted. -/** - * deserializeAws_json1_1EmailAddressInUseException - */ -const de_EmailAddressInUseException = (output: any, context: __SerdeContext): EmailAddressInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_DnsRecords omitted. -/** - * deserializeAws_json1_1EntityAlreadyRegisteredException - */ -const de_EntityAlreadyRegisteredException = ( - output: any, - context: __SerdeContext -): EntityAlreadyRegisteredException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EmailAddressInUseException omitted. -/** - * deserializeAws_json1_1EntityNotFoundException - */ -const de_EntityNotFoundException = (output: any, context: __SerdeContext): EntityNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EntityAlreadyRegisteredException omitted. -/** - * deserializeAws_json1_1EntityStateException - */ -const de_EntityStateException = (output: any, context: __SerdeContext): EntityStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_EntityNotFoundException omitted. -/** - * deserializeAws_json1_1FolderConfiguration - */ -const de_FolderConfiguration = (output: any, context: __SerdeContext): FolderConfiguration => { - return { - Action: __expectString(output.Action), - Name: __expectString(output.Name), - Period: __expectInt32(output.Period), - } as any; -}; +// de_EntityStateException omitted. -/** - * deserializeAws_json1_1FolderConfigurations - */ -const de_FolderConfigurations = (output: any, context: __SerdeContext): FolderConfiguration[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FolderConfiguration(entry, context); - }); - return retVal; -}; +// de_FolderConfiguration omitted. -/** - * deserializeAws_json1_1GetAccessControlEffectResponse - */ -const de_GetAccessControlEffectResponse = (output: any, context: __SerdeContext): GetAccessControlEffectResponse => { - return { - Effect: __expectString(output.Effect), - MatchedRules: output.MatchedRules != null ? de_AccessControlRuleNameList(output.MatchedRules, context) : undefined, - } as any; -}; +// de_FolderConfigurations omitted. -/** - * deserializeAws_json1_1GetDefaultRetentionPolicyResponse - */ -const de_GetDefaultRetentionPolicyResponse = ( - output: any, - context: __SerdeContext -): GetDefaultRetentionPolicyResponse => { - return { - Description: __expectString(output.Description), - FolderConfigurations: - output.FolderConfigurations != null ? de_FolderConfigurations(output.FolderConfigurations, context) : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - } as any; -}; +// de_GetAccessControlEffectResponse omitted. -/** - * deserializeAws_json1_1GetImpersonationRoleEffectResponse - */ -const de_GetImpersonationRoleEffectResponse = ( - output: any, - context: __SerdeContext -): GetImpersonationRoleEffectResponse => { - return { - Effect: __expectString(output.Effect), - MatchedRules: - output.MatchedRules != null ? de_ImpersonationMatchedRuleList(output.MatchedRules, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_GetDefaultRetentionPolicyResponse omitted. + +// de_GetImpersonationRoleEffectResponse omitted. /** * deserializeAws_json1_1GetImpersonationRoleResponse */ const de_GetImpersonationRoleResponse = (output: any, context: __SerdeContext): GetImpersonationRoleResponse => { - return { - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - Description: __expectString(output.Description), - ImpersonationRoleId: __expectString(output.ImpersonationRoleId), - Name: __expectString(output.Name), - Rules: output.Rules != null ? de_ImpersonationRuleList(output.Rules, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ImpersonationRoleId: __expectString, + Name: __expectString, + Rules: _json, + Type: __expectString, + }) as any; }; /** * deserializeAws_json1_1GetMailboxDetailsResponse */ const de_GetMailboxDetailsResponse = (output: any, context: __SerdeContext): GetMailboxDetailsResponse => { - return { - MailboxQuota: __expectInt32(output.MailboxQuota), - MailboxSize: __limitedParseDouble(output.MailboxSize), - } as any; + return take(output, { + MailboxQuota: __expectInt32, + MailboxSize: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_json1_1GetMailDomainResponse - */ -const de_GetMailDomainResponse = (output: any, context: __SerdeContext): GetMailDomainResponse => { - return { - DkimVerificationStatus: __expectString(output.DkimVerificationStatus), - IsDefault: __expectBoolean(output.IsDefault), - IsTestDomain: __expectBoolean(output.IsTestDomain), - OwnershipVerificationStatus: __expectString(output.OwnershipVerificationStatus), - Records: output.Records != null ? de_DnsRecords(output.Records, context) : undefined, - } as any; -}; +// de_GetMailDomainResponse omitted. -/** - * deserializeAws_json1_1GetMobileDeviceAccessEffectResponse - */ -const de_GetMobileDeviceAccessEffectResponse = ( - output: any, - context: __SerdeContext -): GetMobileDeviceAccessEffectResponse => { - return { - Effect: __expectString(output.Effect), - MatchedRules: - output.MatchedRules != null ? de_MobileDeviceAccessMatchedRuleList(output.MatchedRules, context) : undefined, - } as any; -}; +// de_GetMobileDeviceAccessEffectResponse omitted. /** * deserializeAws_json1_1GetMobileDeviceAccessOverrideResponse @@ -8541,40 +6919,28 @@ const de_GetMobileDeviceAccessOverrideResponse = ( output: any, context: __SerdeContext ): GetMobileDeviceAccessOverrideResponse => { - return { - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - Description: __expectString(output.Description), - DeviceId: __expectString(output.DeviceId), - Effect: __expectString(output.Effect), - UserId: __expectString(output.UserId), - } as any; + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceId: __expectString, + Effect: __expectString, + UserId: __expectString, + }) as any; }; /** * deserializeAws_json1_1Group */ const de_Group = (output: any, context: __SerdeContext): Group => { - return { - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - Email: __expectString(output.Email), - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - } as any; + return take(output, { + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Email: __expectString, + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Name: __expectString, + State: __expectString, + }) as any; }; /** @@ -8584,72 +6950,29 @@ const de_Groups = (output: any, context: __SerdeContext): Group[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Group(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ImpersonationMatchedRule - */ -const de_ImpersonationMatchedRule = (output: any, context: __SerdeContext): ImpersonationMatchedRule => { - return { - ImpersonationRuleId: __expectString(output.ImpersonationRuleId), - Name: __expectString(output.Name), - } as any; -}; +// de_ImpersonationMatchedRule omitted. -/** - * deserializeAws_json1_1ImpersonationMatchedRuleList - */ -const de_ImpersonationMatchedRuleList = (output: any, context: __SerdeContext): ImpersonationMatchedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImpersonationMatchedRule(entry, context); - }); - return retVal; -}; +// de_ImpersonationMatchedRuleList omitted. /** * deserializeAws_json1_1ImpersonationRole */ const de_ImpersonationRole = (output: any, context: __SerdeContext): ImpersonationRole => { - return { - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - ImpersonationRoleId: __expectString(output.ImpersonationRoleId), - Name: __expectString(output.Name), - Type: __expectString(output.Type), - } as any; + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ImpersonationRoleId: __expectString, + Name: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ImpersonationRoleIdList - */ -const de_ImpersonationRoleIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ImpersonationRoleIdList omitted. /** * deserializeAws_json1_1ImpersonationRoleList @@ -8658,96 +6981,24 @@ const de_ImpersonationRoleList = (output: any, context: __SerdeContext): Imperso const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ImpersonationRole(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ImpersonationRule - */ -const de_ImpersonationRule = (output: any, context: __SerdeContext): ImpersonationRule => { - return { - Description: __expectString(output.Description), - Effect: __expectString(output.Effect), - ImpersonationRuleId: __expectString(output.ImpersonationRuleId), - Name: __expectString(output.Name), - NotTargetUsers: output.NotTargetUsers != null ? de_TargetUsers(output.NotTargetUsers, context) : undefined, - TargetUsers: output.TargetUsers != null ? de_TargetUsers(output.TargetUsers, context) : undefined, - } as any; -}; +// de_ImpersonationRule omitted. -/** - * deserializeAws_json1_1ImpersonationRuleList - */ -const de_ImpersonationRuleList = (output: any, context: __SerdeContext): ImpersonationRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImpersonationRule(entry, context); - }); - return retVal; -}; +// de_ImpersonationRuleList omitted. -/** - * deserializeAws_json1_1InvalidConfigurationException - */ -const de_InvalidConfigurationException = (output: any, context: __SerdeContext): InvalidConfigurationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidConfigurationException omitted. -/** - * deserializeAws_json1_1InvalidCustomSesConfigurationException - */ -const de_InvalidCustomSesConfigurationException = ( - output: any, - context: __SerdeContext -): InvalidCustomSesConfigurationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidCustomSesConfigurationException omitted. -/** - * deserializeAws_json1_1InvalidParameterException - */ -const de_InvalidParameterException = (output: any, context: __SerdeContext): InvalidParameterException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidParameterException omitted. -/** - * deserializeAws_json1_1InvalidPasswordException - */ -const de_InvalidPasswordException = (output: any, context: __SerdeContext): InvalidPasswordException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidPasswordException omitted. -/** - * deserializeAws_json1_1IpRangeList - */ -const de_IpRangeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_IpRangeList omitted. /** * deserializeAws_json1_1Jobs @@ -8756,50 +7007,25 @@ const de_Jobs = (output: any, context: __SerdeContext): MailboxExportJob[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MailboxExportJob(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1LambdaAvailabilityProvider - */ -const de_LambdaAvailabilityProvider = (output: any, context: __SerdeContext): LambdaAvailabilityProvider => { - return { - LambdaArn: __expectString(output.LambdaArn), - } as any; -}; +// de_LambdaAvailabilityProvider omitted. -/** - * deserializeAws_json1_1LimitExceededException - */ -const de_LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_LimitExceededException omitted. /** * deserializeAws_json1_1ListAccessControlRulesResponse */ const de_ListAccessControlRulesResponse = (output: any, context: __SerdeContext): ListAccessControlRulesResponse => { - return { - Rules: output.Rules != null ? de_AccessControlRulesList(output.Rules, context) : undefined, - } as any; + return take(output, { + Rules: (_: any) => de_AccessControlRulesList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListAliasesResponse - */ -const de_ListAliasesResponse = (output: any, context: __SerdeContext): ListAliasesResponse => { - return { - Aliases: output.Aliases != null ? de_Aliases(output.Aliases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListAliasesResponse omitted. /** * deserializeAws_json1_1ListAvailabilityConfigurationsResponse @@ -8808,74 +7034,55 @@ const de_ListAvailabilityConfigurationsResponse = ( output: any, context: __SerdeContext ): ListAvailabilityConfigurationsResponse => { - return { - AvailabilityConfigurations: - output.AvailabilityConfigurations != null - ? de_AvailabilityConfigurationList(output.AvailabilityConfigurations, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + AvailabilityConfigurations: (_: any) => de_AvailabilityConfigurationList(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListGroupMembersResponse */ const de_ListGroupMembersResponse = (output: any, context: __SerdeContext): ListGroupMembersResponse => { - return { - Members: output.Members != null ? de_Members(output.Members, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Members: (_: any) => de_Members(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListGroupsResponse */ const de_ListGroupsResponse = (output: any, context: __SerdeContext): ListGroupsResponse => { - return { - Groups: output.Groups != null ? de_Groups(output.Groups, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Groups: (_: any) => de_Groups(_, context), + NextToken: __expectString, + }) as any; }; /** * deserializeAws_json1_1ListImpersonationRolesResponse */ const de_ListImpersonationRolesResponse = (output: any, context: __SerdeContext): ListImpersonationRolesResponse => { - return { - NextToken: __expectString(output.NextToken), - Roles: output.Roles != null ? de_ImpersonationRoleList(output.Roles, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Roles: (_: any) => de_ImpersonationRoleList(_, context), + }) as any; }; /** * deserializeAws_json1_1ListMailboxExportJobsResponse */ const de_ListMailboxExportJobsResponse = (output: any, context: __SerdeContext): ListMailboxExportJobsResponse => { - return { - Jobs: output.Jobs != null ? de_Jobs(output.Jobs, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; + return take(output, { + Jobs: (_: any) => de_Jobs(_, context), + NextToken: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ListMailboxPermissionsResponse - */ -const de_ListMailboxPermissionsResponse = (output: any, context: __SerdeContext): ListMailboxPermissionsResponse => { - return { - NextToken: __expectString(output.NextToken), - Permissions: output.Permissions != null ? de_Permissions(output.Permissions, context) : undefined, - } as any; -}; +// de_ListMailboxPermissionsResponse omitted. -/** - * deserializeAws_json1_1ListMailDomainsResponse - */ -const de_ListMailDomainsResponse = (output: any, context: __SerdeContext): ListMailDomainsResponse => { - return { - MailDomains: output.MailDomains != null ? de_MailDomains(output.MailDomains, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListMailDomainsResponse omitted. /** * deserializeAws_json1_1ListMobileDeviceAccessOverridesResponse @@ -8884,10 +7091,10 @@ const de_ListMobileDeviceAccessOverridesResponse = ( output: any, context: __SerdeContext ): ListMobileDeviceAccessOverridesResponse => { - return { - NextToken: __expectString(output.NextToken), - Overrides: output.Overrides != null ? de_MobileDeviceAccessOverridesList(output.Overrides, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Overrides: (_: any) => de_MobileDeviceAccessOverridesList(_, context), + }) as any; }; /** @@ -8897,152 +7104,76 @@ const de_ListMobileDeviceAccessRulesResponse = ( output: any, context: __SerdeContext ): ListMobileDeviceAccessRulesResponse => { - return { - Rules: output.Rules != null ? de_MobileDeviceAccessRulesList(output.Rules, context) : undefined, - } as any; + return take(output, { + Rules: (_: any) => de_MobileDeviceAccessRulesList(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListOrganizationsResponse - */ -const de_ListOrganizationsResponse = (output: any, context: __SerdeContext): ListOrganizationsResponse => { - return { - NextToken: __expectString(output.NextToken), - OrganizationSummaries: - output.OrganizationSummaries != null - ? de_OrganizationSummaries(output.OrganizationSummaries, context) - : undefined, - } as any; -}; +// de_ListOrganizationsResponse omitted. -/** - * deserializeAws_json1_1ListResourceDelegatesResponse - */ -const de_ListResourceDelegatesResponse = (output: any, context: __SerdeContext): ListResourceDelegatesResponse => { - return { - Delegates: output.Delegates != null ? de_ResourceDelegates(output.Delegates, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// de_ListResourceDelegatesResponse omitted. /** * deserializeAws_json1_1ListResourcesResponse */ const de_ListResourcesResponse = (output: any, context: __SerdeContext): ListResourcesResponse => { - return { - NextToken: __expectString(output.NextToken), - Resources: output.Resources != null ? de_Resources(output.Resources, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Resources: (_: any) => de_Resources(_, context), + }) as any; }; -/** - * deserializeAws_json1_1ListTagsForResourceResponse - */ -const de_ListTagsForResourceResponse = (output: any, context: __SerdeContext): ListTagsForResourceResponse => { - return { - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - } as any; -}; +// de_ListTagsForResourceResponse omitted. /** * deserializeAws_json1_1ListUsersResponse */ const de_ListUsersResponse = (output: any, context: __SerdeContext): ListUsersResponse => { - return { - NextToken: __expectString(output.NextToken), - Users: output.Users != null ? de_Users(output.Users, context) : undefined, - } as any; + return take(output, { + NextToken: __expectString, + Users: (_: any) => de_Users(_, context), + }) as any; }; /** * deserializeAws_json1_1MailboxExportJob */ const de_MailboxExportJob = (output: any, context: __SerdeContext): MailboxExportJob => { - return { - Description: __expectString(output.Description), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - EntityId: __expectString(output.EntityId), - EstimatedProgress: __expectInt32(output.EstimatedProgress), - JobId: __expectString(output.JobId), - S3BucketName: __expectString(output.S3BucketName), - S3Path: __expectString(output.S3Path), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - } as any; + return take(output, { + Description: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EntityId: __expectString, + EstimatedProgress: __expectInt32, + JobId: __expectString, + S3BucketName: __expectString, + S3Path: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1MailDomainInUseException - */ -const de_MailDomainInUseException = (output: any, context: __SerdeContext): MailDomainInUseException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MailDomainInUseException omitted. -/** - * deserializeAws_json1_1MailDomainNotFoundException - */ -const de_MailDomainNotFoundException = (output: any, context: __SerdeContext): MailDomainNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MailDomainNotFoundException omitted. -/** - * deserializeAws_json1_1MailDomains - */ -const de_MailDomains = (output: any, context: __SerdeContext): MailDomainSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MailDomainSummary(entry, context); - }); - return retVal; -}; +// de_MailDomains omitted. -/** - * deserializeAws_json1_1MailDomainStateException - */ -const de_MailDomainStateException = (output: any, context: __SerdeContext): MailDomainStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_MailDomainStateException omitted. -/** - * deserializeAws_json1_1MailDomainSummary - */ -const de_MailDomainSummary = (output: any, context: __SerdeContext): MailDomainSummary => { - return { - DefaultDomain: __expectBoolean(output.DefaultDomain), - DomainName: __expectString(output.DomainName), - } as any; -}; +// de_MailDomainSummary omitted. /** * deserializeAws_json1_1Member */ const de_Member = (output: any, context: __SerdeContext): Member => { - return { - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; + return take(output, { + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Name: __expectString, + State: __expectString, + Type: __expectString, + }) as any; }; /** @@ -9052,60 +7183,27 @@ const de_Members = (output: any, context: __SerdeContext): Member[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Member(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1MobileDeviceAccessMatchedRule - */ -const de_MobileDeviceAccessMatchedRule = (output: any, context: __SerdeContext): MobileDeviceAccessMatchedRule => { - return { - MobileDeviceAccessRuleId: __expectString(output.MobileDeviceAccessRuleId), - Name: __expectString(output.Name), - } as any; -}; +// de_MobileDeviceAccessMatchedRule omitted. -/** - * deserializeAws_json1_1MobileDeviceAccessMatchedRuleList - */ -const de_MobileDeviceAccessMatchedRuleList = ( - output: any, - context: __SerdeContext -): MobileDeviceAccessMatchedRule[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MobileDeviceAccessMatchedRule(entry, context); - }); - return retVal; -}; +// de_MobileDeviceAccessMatchedRuleList omitted. /** * deserializeAws_json1_1MobileDeviceAccessOverride */ const de_MobileDeviceAccessOverride = (output: any, context: __SerdeContext): MobileDeviceAccessOverride => { - return { - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - Description: __expectString(output.Description), - DeviceId: __expectString(output.DeviceId), - Effect: __expectString(output.Effect), - UserId: __expectString(output.UserId), - } as any; + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceId: __expectString, + Effect: __expectString, + UserId: __expectString, + }) as any; }; /** @@ -9115,9 +7213,6 @@ const de_MobileDeviceAccessOverridesList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MobileDeviceAccessOverride(entry, context); }); return retVal; @@ -9127,36 +7222,22 @@ const de_MobileDeviceAccessOverridesList = (output: any, context: __SerdeContext * deserializeAws_json1_1MobileDeviceAccessRule */ const de_MobileDeviceAccessRule = (output: any, context: __SerdeContext): MobileDeviceAccessRule => { - return { - DateCreated: - output.DateCreated != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateCreated))) - : undefined, - DateModified: - output.DateModified != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DateModified))) - : undefined, - Description: __expectString(output.Description), - DeviceModels: output.DeviceModels != null ? de_DeviceModelList(output.DeviceModels, context) : undefined, - DeviceOperatingSystems: - output.DeviceOperatingSystems != null - ? de_DeviceOperatingSystemList(output.DeviceOperatingSystems, context) - : undefined, - DeviceTypes: output.DeviceTypes != null ? de_DeviceTypeList(output.DeviceTypes, context) : undefined, - DeviceUserAgents: - output.DeviceUserAgents != null ? de_DeviceUserAgentList(output.DeviceUserAgents, context) : undefined, - Effect: __expectString(output.Effect), - MobileDeviceAccessRuleId: __expectString(output.MobileDeviceAccessRuleId), - Name: __expectString(output.Name), - NotDeviceModels: output.NotDeviceModels != null ? de_DeviceModelList(output.NotDeviceModels, context) : undefined, - NotDeviceOperatingSystems: - output.NotDeviceOperatingSystems != null - ? de_DeviceOperatingSystemList(output.NotDeviceOperatingSystems, context) - : undefined, - NotDeviceTypes: output.NotDeviceTypes != null ? de_DeviceTypeList(output.NotDeviceTypes, context) : undefined, - NotDeviceUserAgents: - output.NotDeviceUserAgents != null ? de_DeviceUserAgentList(output.NotDeviceUserAgents, context) : undefined, - } as any; + return take(output, { + DateCreated: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DateModified: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + DeviceModels: _json, + DeviceOperatingSystems: _json, + DeviceTypes: _json, + DeviceUserAgents: _json, + Effect: __expectString, + MobileDeviceAccessRuleId: __expectString, + Name: __expectString, + NotDeviceModels: _json, + NotDeviceOperatingSystems: _json, + NotDeviceTypes: _json, + NotDeviceUserAgents: _json, + }) as any; }; /** @@ -9166,243 +7247,67 @@ const de_MobileDeviceAccessRulesList = (output: any, context: __SerdeContext): M const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_MobileDeviceAccessRule(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1NameAvailabilityException - */ -const de_NameAvailabilityException = (output: any, context: __SerdeContext): NameAvailabilityException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_NameAvailabilityException omitted. -/** - * deserializeAws_json1_1OrganizationNotFoundException - */ -const de_OrganizationNotFoundException = (output: any, context: __SerdeContext): OrganizationNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OrganizationNotFoundException omitted. -/** - * deserializeAws_json1_1OrganizationStateException - */ -const de_OrganizationStateException = (output: any, context: __SerdeContext): OrganizationStateException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_OrganizationStateException omitted. -/** - * deserializeAws_json1_1OrganizationSummaries - */ -const de_OrganizationSummaries = (output: any, context: __SerdeContext): OrganizationSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_OrganizationSummary(entry, context); - }); - return retVal; -}; +// de_OrganizationSummaries omitted. -/** - * deserializeAws_json1_1OrganizationSummary - */ -const de_OrganizationSummary = (output: any, context: __SerdeContext): OrganizationSummary => { - return { - Alias: __expectString(output.Alias), - DefaultMailDomain: __expectString(output.DefaultMailDomain), - ErrorMessage: __expectString(output.ErrorMessage), - OrganizationId: __expectString(output.OrganizationId), - State: __expectString(output.State), - } as any; -}; +// de_OrganizationSummary omitted. -/** - * deserializeAws_json1_1Permission - */ -const de_Permission = (output: any, context: __SerdeContext): Permission => { - return { - GranteeId: __expectString(output.GranteeId), - GranteeType: __expectString(output.GranteeType), - PermissionValues: - output.PermissionValues != null ? de_PermissionValues(output.PermissionValues, context) : undefined, - } as any; -}; +// de_Permission omitted. -/** - * deserializeAws_json1_1Permissions - */ -const de_Permissions = (output: any, context: __SerdeContext): Permission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Permission(entry, context); - }); - return retVal; -}; +// de_Permissions omitted. -/** - * deserializeAws_json1_1PermissionValues - */ -const de_PermissionValues = (output: any, context: __SerdeContext): (PermissionType | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_PermissionValues omitted. -/** - * deserializeAws_json1_1PutAccessControlRuleResponse - */ -const de_PutAccessControlRuleResponse = (output: any, context: __SerdeContext): PutAccessControlRuleResponse => { - return {} as any; -}; +// de_PutAccessControlRuleResponse omitted. -/** - * deserializeAws_json1_1PutEmailMonitoringConfigurationResponse - */ -const de_PutEmailMonitoringConfigurationResponse = ( - output: any, - context: __SerdeContext -): PutEmailMonitoringConfigurationResponse => { - return {} as any; -}; +// de_PutEmailMonitoringConfigurationResponse omitted. -/** - * deserializeAws_json1_1PutInboundDmarcSettingsResponse - */ -const de_PutInboundDmarcSettingsResponse = (output: any, context: __SerdeContext): PutInboundDmarcSettingsResponse => { - return {} as any; -}; +// de_PutInboundDmarcSettingsResponse omitted. -/** - * deserializeAws_json1_1PutMailboxPermissionsResponse - */ -const de_PutMailboxPermissionsResponse = (output: any, context: __SerdeContext): PutMailboxPermissionsResponse => { - return {} as any; -}; +// de_PutMailboxPermissionsResponse omitted. -/** - * deserializeAws_json1_1PutMobileDeviceAccessOverrideResponse - */ -const de_PutMobileDeviceAccessOverrideResponse = ( - output: any, - context: __SerdeContext -): PutMobileDeviceAccessOverrideResponse => { - return {} as any; -}; +// de_PutMobileDeviceAccessOverrideResponse omitted. -/** - * deserializeAws_json1_1PutRetentionPolicyResponse - */ -const de_PutRetentionPolicyResponse = (output: any, context: __SerdeContext): PutRetentionPolicyResponse => { - return {} as any; -}; +// de_PutRetentionPolicyResponse omitted. -/** - * deserializeAws_json1_1RedactedEwsAvailabilityProvider - */ -const de_RedactedEwsAvailabilityProvider = (output: any, context: __SerdeContext): RedactedEwsAvailabilityProvider => { - return { - EwsEndpoint: __expectString(output.EwsEndpoint), - EwsUsername: __expectString(output.EwsUsername), - } as any; -}; +// de_RedactedEwsAvailabilityProvider omitted. -/** - * deserializeAws_json1_1RegisterMailDomainResponse - */ -const de_RegisterMailDomainResponse = (output: any, context: __SerdeContext): RegisterMailDomainResponse => { - return {} as any; -}; +// de_RegisterMailDomainResponse omitted. -/** - * deserializeAws_json1_1RegisterToWorkMailResponse - */ -const de_RegisterToWorkMailResponse = (output: any, context: __SerdeContext): RegisterToWorkMailResponse => { - return {} as any; -}; +// de_RegisterToWorkMailResponse omitted. -/** - * deserializeAws_json1_1ReservedNameException - */ -const de_ReservedNameException = (output: any, context: __SerdeContext): ReservedNameException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ReservedNameException omitted. -/** - * deserializeAws_json1_1ResetPasswordResponse - */ -const de_ResetPasswordResponse = (output: any, context: __SerdeContext): ResetPasswordResponse => { - return {} as any; -}; +// de_ResetPasswordResponse omitted. /** * deserializeAws_json1_1Resource */ const de_Resource = (output: any, context: __SerdeContext): Resource => { - return { - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - Email: __expectString(output.Email), - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_json1_1ResourceDelegates - */ -const de_ResourceDelegates = (output: any, context: __SerdeContext): Delegate[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Delegate(entry, context); - }); - return retVal; + return take(output, { + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Email: __expectString, + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Name: __expectString, + State: __expectString, + Type: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_ResourceDelegates omitted. + +// de_ResourceNotFoundException omitted. /** * deserializeAws_json1_1Resources @@ -9411,203 +7316,61 @@ const de_Resources = (output: any, context: __SerdeContext): Resource[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Resource(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StartMailboxExportJobResponse - */ -const de_StartMailboxExportJobResponse = (output: any, context: __SerdeContext): StartMailboxExportJobResponse => { - return { - JobId: __expectString(output.JobId), - } as any; -}; +// de_StartMailboxExportJobResponse omitted. -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. -/** - * deserializeAws_json1_1TagResourceResponse - */ -const de_TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { - return {} as any; -}; +// de_TagResourceResponse omitted. -/** - * deserializeAws_json1_1TargetUsers - */ -const de_TargetUsers = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_TargetUsers omitted. -/** - * deserializeAws_json1_1TestAvailabilityConfigurationResponse - */ -const de_TestAvailabilityConfigurationResponse = ( - output: any, - context: __SerdeContext -): TestAvailabilityConfigurationResponse => { - return { - FailureReason: __expectString(output.FailureReason), - TestPassed: __expectBoolean(output.TestPassed), - } as any; -}; +// de_TestAvailabilityConfigurationResponse omitted. -/** - * deserializeAws_json1_1TooManyTagsException - */ -const de_TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_TooManyTagsException omitted. -/** - * deserializeAws_json1_1UnsupportedOperationException - */ -const de_UnsupportedOperationException = (output: any, context: __SerdeContext): UnsupportedOperationException => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_UnsupportedOperationException omitted. -/** - * deserializeAws_json1_1UntagResourceResponse - */ -const de_UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { - return {} as any; -}; +// de_UntagResourceResponse omitted. -/** - * deserializeAws_json1_1UpdateAvailabilityConfigurationResponse - */ -const de_UpdateAvailabilityConfigurationResponse = ( - output: any, - context: __SerdeContext -): UpdateAvailabilityConfigurationResponse => { - return {} as any; -}; +// de_UpdateAvailabilityConfigurationResponse omitted. -/** - * deserializeAws_json1_1UpdateDefaultMailDomainResponse - */ -const de_UpdateDefaultMailDomainResponse = (output: any, context: __SerdeContext): UpdateDefaultMailDomainResponse => { - return {} as any; -}; +// de_UpdateDefaultMailDomainResponse omitted. -/** - * deserializeAws_json1_1UpdateImpersonationRoleResponse - */ -const de_UpdateImpersonationRoleResponse = (output: any, context: __SerdeContext): UpdateImpersonationRoleResponse => { - return {} as any; -}; +// de_UpdateImpersonationRoleResponse omitted. -/** - * deserializeAws_json1_1UpdateMailboxQuotaResponse - */ -const de_UpdateMailboxQuotaResponse = (output: any, context: __SerdeContext): UpdateMailboxQuotaResponse => { - return {} as any; -}; +// de_UpdateMailboxQuotaResponse omitted. -/** - * deserializeAws_json1_1UpdateMobileDeviceAccessRuleResponse - */ -const de_UpdateMobileDeviceAccessRuleResponse = ( - output: any, - context: __SerdeContext -): UpdateMobileDeviceAccessRuleResponse => { - return {} as any; -}; +// de_UpdateMobileDeviceAccessRuleResponse omitted. -/** - * deserializeAws_json1_1UpdatePrimaryEmailAddressResponse - */ -const de_UpdatePrimaryEmailAddressResponse = ( - output: any, - context: __SerdeContext -): UpdatePrimaryEmailAddressResponse => { - return {} as any; -}; +// de_UpdatePrimaryEmailAddressResponse omitted. -/** - * deserializeAws_json1_1UpdateResourceResponse - */ -const de_UpdateResourceResponse = (output: any, context: __SerdeContext): UpdateResourceResponse => { - return {} as any; -}; +// de_UpdateResourceResponse omitted. /** * deserializeAws_json1_1User */ const de_User = (output: any, context: __SerdeContext): User => { - return { - DisabledDate: - output.DisabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DisabledDate))) - : undefined, - DisplayName: __expectString(output.DisplayName), - Email: __expectString(output.Email), - EnabledDate: - output.EnabledDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EnabledDate))) - : undefined, - Id: __expectString(output.Id), - Name: __expectString(output.Name), - State: __expectString(output.State), - UserRole: __expectString(output.UserRole), - } as any; -}; - -/** - * deserializeAws_json1_1UserIdList - */ -const de_UserIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + DisabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + DisplayName: __expectString, + Email: __expectString, + EnabledDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Id: __expectString, + Name: __expectString, + State: __expectString, + UserRole: __expectString, + }) as any; }; +// de_UserIdList omitted. + /** * deserializeAws_json1_1Users */ @@ -9615,9 +7378,6 @@ const de_Users = (output: any, context: __SerdeContext): User[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_User(entry, context); }); return retVal; @@ -9643,6 +7403,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-workmailmessageflow/src/protocols/Aws_restJson1.ts b/clients/client-workmailmessageflow/src/protocols/Aws_restJson1.ts index b0ade70768bc..4c0e66e43faf 100644 --- a/clients/client-workmailmessageflow/src/protocols/Aws_restJson1.ts +++ b/clients/client-workmailmessageflow/src/protocols/Aws_restJson1.ts @@ -1,11 +1,13 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectString as __expectString, - map as __map, + map, resolvedPath as __resolvedPath, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -69,9 +71,11 @@ export const se_PutRawMessageContentCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/messages/{messageId}"; resolvedPath = __resolvedPath(resolvedPath, input, "messageId", () => input.messageId!, "{messageId}", false); let body: any; - body = JSON.stringify({ - ...(input.content != null && { content: se_RawMessageContent(input.content, context) }), - }); + body = JSON.stringify( + take(input, { + content: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -120,10 +124,9 @@ const de_GetRawMessageContentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -173,16 +176,15 @@ const de_PutRawMessageContentCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InvalidContentLocationRes */ @@ -192,9 +194,10 @@ const de_InvalidContentLocationRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidContentLocation({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -208,9 +211,10 @@ const de_InvalidContentLocationRes = async ( const de_MessageFrozenRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MessageFrozen({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -224,9 +228,10 @@ const de_MessageFrozenRes = async (parsedOutput: any, context: __SerdeContext): const de_MessageRejectedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new MessageRejected({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -243,9 +248,10 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -253,25 +259,9 @@ const de_ResourceNotFoundExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1RawMessageContent - */ -const se_RawMessageContent = (input: RawMessageContent, context: __SerdeContext): any => { - return { - ...(input.s3Reference != null && { s3Reference: se_S3Reference(input.s3Reference, context) }), - }; -}; +// se_RawMessageContent omitted. -/** - * serializeAws_restJson1S3Reference - */ -const se_S3Reference = (input: S3Reference, context: __SerdeContext): any => { - return { - ...(input.bucket != null && { bucket: input.bucket }), - ...(input.key != null && { key: input.key }), - ...(input.objectVersion != null && { objectVersion: input.objectVersion }), - }; -}; +// se_S3Reference omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-workspaces-web/src/protocols/Aws_restJson1.ts b/clients/client-workspaces-web/src/protocols/Aws_restJson1.ts index 3dfd5a435e46..9f7b71d79cad 100644 --- a/clients/client-workspaces-web/src/protocols/Aws_restJson1.ts +++ b/clients/client-workspaces-web/src/protocols/Aws_restJson1.ts @@ -1,18 +1,19 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, strictParseInt32 as __strictParseInt32, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -170,16 +171,10 @@ import { import { UpdateUserSettingsCommandInput, UpdateUserSettingsCommandOutput } from "../commands/UpdateUserSettingsCommand"; import { AccessDeniedException, - BrowserSettings, - BrowserSettingsSummary, Certificate, CertificateSummary, ConflictException, - IdentityProvider, - IdentityProviderSummary, InternalServerException, - NetworkSettings, - NetworkSettingsSummary, Portal, PortalSummary, ResourceNotFoundException, @@ -187,14 +182,7 @@ import { Tag, ThrottlingException, TooManyTagsException, - TrustStore, - TrustStoreSummary, - UserAccessLoggingSettings, - UserAccessLoggingSettingsSummary, - UserSettings, - UserSettingsSummary, ValidationException, - ValidationExceptionField, } from "../models/models_0"; import { WorkSpacesWebServiceException as __BaseException } from "../models/WorkSpacesWebServiceException"; @@ -355,15 +343,15 @@ export const se_CreateBrowserSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/browserSettings"; let body: any; - body = JSON.stringify({ - ...(input.additionalEncryptionContext != null && { - additionalEncryptionContext: se_EncryptionContextMap(input.additionalEncryptionContext, context), - }), - ...(input.browserPolicy != null && { browserPolicy: input.browserPolicy }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.customerManagedKey != null && { customerManagedKey: input.customerManagedKey }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + additionalEncryptionContext: (_) => _json(_), + browserPolicy: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + customerManagedKey: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -388,15 +376,15 @@ export const se_CreateIdentityProviderCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/identityProviders"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.identityProviderDetails != null && { - identityProviderDetails: se_IdentityProviderDetails(input.identityProviderDetails, context), - }), - ...(input.identityProviderName != null && { identityProviderName: input.identityProviderName }), - ...(input.identityProviderType != null && { identityProviderType: input.identityProviderType }), - ...(input.portalArn != null && { portalArn: input.portalArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + identityProviderDetails: (_) => _json(_), + identityProviderName: [], + identityProviderType: [], + portalArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -421,15 +409,15 @@ export const se_CreateNetworkSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/networkSettings"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.securityGroupIds != null && { - securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context), - }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + securityGroupIds: (_) => _json(_), + subnetIds: (_) => _json(_), + tags: (_) => _json(_), + vpcId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -454,16 +442,16 @@ export const se_CreatePortalCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/portals"; let body: any; - body = JSON.stringify({ - ...(input.additionalEncryptionContext != null && { - additionalEncryptionContext: se_EncryptionContextMap(input.additionalEncryptionContext, context), - }), - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.customerManagedKey != null && { customerManagedKey: input.customerManagedKey }), - ...(input.displayName != null && { displayName: input.displayName }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + additionalEncryptionContext: (_) => _json(_), + authenticationType: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + customerManagedKey: [], + displayName: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -488,11 +476,13 @@ export const se_CreateTrustStoreCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/trustStores"; let body: any; - body = JSON.stringify({ - ...(input.certificateList != null && { certificateList: se_CertificateList(input.certificateList, context) }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + certificateList: (_) => se_CertificateList(_, context), + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -518,11 +508,13 @@ export const se_CreateUserAccessLoggingSettingsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/userAccessLoggingSettings"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.kinesisStreamArn != null && { kinesisStreamArn: input.kinesisStreamArn }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + kinesisStreamArn: [], + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -547,19 +539,19 @@ export const se_CreateUserSettingsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/userSettings"; let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.copyAllowed != null && { copyAllowed: input.copyAllowed }), - ...(input.disconnectTimeoutInMinutes != null && { disconnectTimeoutInMinutes: input.disconnectTimeoutInMinutes }), - ...(input.downloadAllowed != null && { downloadAllowed: input.downloadAllowed }), - ...(input.idleDisconnectTimeoutInMinutes != null && { - idleDisconnectTimeoutInMinutes: input.idleDisconnectTimeoutInMinutes, - }), - ...(input.pasteAllowed != null && { pasteAllowed: input.pasteAllowed }), - ...(input.printAllowed != null && { printAllowed: input.printAllowed }), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - ...(input.uploadAllowed != null && { uploadAllowed: input.uploadAllowed }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + copyAllowed: [], + disconnectTimeoutInMinutes: [], + downloadAllowed: [], + idleDisconnectTimeoutInMinutes: [], + pasteAllowed: [], + printAllowed: [], + tags: (_) => _json(_), + uploadAllowed: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1436,10 +1428,12 @@ export const se_TagResourceCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn+}"; resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn!, "{resourceArn+}", true); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.tags != null && { tags: se_TagList(input.tags, context) }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1503,10 +1497,12 @@ export const se_UpdateBrowserSettingsCommand = async ( true ); let body: any; - body = JSON.stringify({ - ...(input.browserPolicy != null && { browserPolicy: input.browserPolicy }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + browserPolicy: [], + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1540,14 +1536,14 @@ export const se_UpdateIdentityProviderCommand = async ( true ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.identityProviderDetails != null && { - identityProviderDetails: se_IdentityProviderDetails(input.identityProviderDetails, context), - }), - ...(input.identityProviderName != null && { identityProviderName: input.identityProviderName }), - ...(input.identityProviderType != null && { identityProviderType: input.identityProviderType }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + identityProviderDetails: (_) => _json(_), + identityProviderName: [], + identityProviderType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1581,14 +1577,14 @@ export const se_UpdateNetworkSettingsCommand = async ( true ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.securityGroupIds != null && { - securityGroupIds: se_SecurityGroupIdList(input.securityGroupIds, context), - }), - ...(input.subnetIds != null && { subnetIds: se_SubnetIdList(input.subnetIds, context) }), - ...(input.vpcId != null && { vpcId: input.vpcId }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + securityGroupIds: (_) => _json(_), + subnetIds: (_) => _json(_), + vpcId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1614,10 +1610,12 @@ export const se_UpdatePortalCommand = async ( let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/portals/{portalArn+}"; resolvedPath = __resolvedPath(resolvedPath, input, "portalArn", () => input.portalArn!, "{portalArn+}", true); let body: any; - body = JSON.stringify({ - ...(input.authenticationType != null && { authenticationType: input.authenticationType }), - ...(input.displayName != null && { displayName: input.displayName }), - }); + body = JSON.stringify( + take(input, { + authenticationType: [], + displayName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1651,13 +1649,13 @@ export const se_UpdateTrustStoreCommand = async ( true ); let body: any; - body = JSON.stringify({ - ...(input.certificatesToAdd != null && { certificatesToAdd: se_CertificateList(input.certificatesToAdd, context) }), - ...(input.certificatesToDelete != null && { - certificatesToDelete: se_CertificateThumbprintList(input.certificatesToDelete, context), - }), - clientToken: input.clientToken ?? generateIdempotencyToken(), - }); + body = JSON.stringify( + take(input, { + certificatesToAdd: (_) => se_CertificateList(_, context), + certificatesToDelete: (_) => _json(_), + clientToken: (_) => _ ?? generateIdempotencyToken(), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1692,10 +1690,12 @@ export const se_UpdateUserAccessLoggingSettingsCommand = async ( true ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.kinesisStreamArn != null && { kinesisStreamArn: input.kinesisStreamArn }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + kinesisStreamArn: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1729,18 +1729,18 @@ export const se_UpdateUserSettingsCommand = async ( true ); let body: any; - body = JSON.stringify({ - clientToken: input.clientToken ?? generateIdempotencyToken(), - ...(input.copyAllowed != null && { copyAllowed: input.copyAllowed }), - ...(input.disconnectTimeoutInMinutes != null && { disconnectTimeoutInMinutes: input.disconnectTimeoutInMinutes }), - ...(input.downloadAllowed != null && { downloadAllowed: input.downloadAllowed }), - ...(input.idleDisconnectTimeoutInMinutes != null && { - idleDisconnectTimeoutInMinutes: input.idleDisconnectTimeoutInMinutes, - }), - ...(input.pasteAllowed != null && { pasteAllowed: input.pasteAllowed }), - ...(input.printAllowed != null && { printAllowed: input.printAllowed }), - ...(input.uploadAllowed != null && { uploadAllowed: input.uploadAllowed }), - }); + body = JSON.stringify( + take(input, { + clientToken: (_) => _ ?? generateIdempotencyToken(), + copyAllowed: [], + disconnectTimeoutInMinutes: [], + downloadAllowed: [], + idleDisconnectTimeoutInMinutes: [], + pasteAllowed: [], + printAllowed: [], + uploadAllowed: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1766,12 +1766,11 @@ export const de_AssociateBrowserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.browserSettingsArn != null) { - contents.browserSettingsArn = __expectString(data.browserSettingsArn); - } - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } + const doc = take(data, { + browserSettingsArn: __expectString, + portalArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1808,10 +1807,9 @@ const de_AssociateBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1831,12 +1829,11 @@ export const de_AssociateNetworkSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSettingsArn != null) { - contents.networkSettingsArn = __expectString(data.networkSettingsArn); - } - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } + const doc = take(data, { + networkSettingsArn: __expectString, + portalArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1873,10 +1870,9 @@ const de_AssociateNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1896,12 +1892,11 @@ export const de_AssociateTrustStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.trustStoreArn != null) { - contents.trustStoreArn = __expectString(data.trustStoreArn); - } + const doc = take(data, { + portalArn: __expectString, + trustStoreArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1935,10 +1930,9 @@ const de_AssociateTrustStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1958,12 +1952,11 @@ export const de_AssociateUserAccessLoggingSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.userAccessLoggingSettingsArn != null) { - contents.userAccessLoggingSettingsArn = __expectString(data.userAccessLoggingSettingsArn); - } + const doc = take(data, { + portalArn: __expectString, + userAccessLoggingSettingsArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2000,10 +1993,9 @@ const de_AssociateUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2023,12 +2015,11 @@ export const de_AssociateUserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.userSettingsArn != null) { - contents.userSettingsArn = __expectString(data.userSettingsArn); - } + const doc = take(data, { + portalArn: __expectString, + userSettingsArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2065,10 +2056,9 @@ const de_AssociateUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2088,9 +2078,10 @@ export const de_CreateBrowserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.browserSettingsArn != null) { - contents.browserSettingsArn = __expectString(data.browserSettingsArn); - } + const doc = take(data, { + browserSettingsArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2130,10 +2121,9 @@ const de_CreateBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2153,9 +2143,10 @@ export const de_CreateIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identityProviderArn != null) { - contents.identityProviderArn = __expectString(data.identityProviderArn); - } + const doc = take(data, { + identityProviderArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2195,10 +2186,9 @@ const de_CreateIdentityProviderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2218,9 +2208,10 @@ export const de_CreateNetworkSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSettingsArn != null) { - contents.networkSettingsArn = __expectString(data.networkSettingsArn); - } + const doc = take(data, { + networkSettingsArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2257,10 +2248,9 @@ const de_CreateNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2280,12 +2270,11 @@ export const de_CreatePortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.portalEndpoint != null) { - contents.portalEndpoint = __expectString(data.portalEndpoint); - } + const doc = take(data, { + portalArn: __expectString, + portalEndpoint: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2325,10 +2314,9 @@ const de_CreatePortalCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2348,9 +2336,10 @@ export const de_CreateTrustStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustStoreArn != null) { - contents.trustStoreArn = __expectString(data.trustStoreArn); - } + const doc = take(data, { + trustStoreArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2387,10 +2376,9 @@ const de_CreateTrustStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2410,9 +2398,10 @@ export const de_CreateUserAccessLoggingSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userAccessLoggingSettingsArn != null) { - contents.userAccessLoggingSettingsArn = __expectString(data.userAccessLoggingSettingsArn); - } + const doc = take(data, { + userAccessLoggingSettingsArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2449,10 +2438,9 @@ const de_CreateUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2472,9 +2460,10 @@ export const de_CreateUserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userSettingsArn != null) { - contents.userSettingsArn = __expectString(data.userSettingsArn); - } + const doc = take(data, { + userSettingsArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2511,10 +2500,9 @@ const de_CreateUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2567,10 +2555,9 @@ const de_DeleteBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2623,10 +2610,9 @@ const de_DeleteIdentityProviderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2679,10 +2665,9 @@ const de_DeleteNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2735,10 +2720,9 @@ const de_DeletePortalCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2791,10 +2775,9 @@ const de_DeleteTrustStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2847,10 +2830,9 @@ const de_DeleteUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2903,10 +2885,9 @@ const de_DeleteUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2959,10 +2940,9 @@ const de_DisassociateBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3015,10 +2995,9 @@ const de_DisassociateNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3071,10 +3050,9 @@ const de_DisassociateTrustStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3127,10 +3105,9 @@ const de_DisassociateUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3183,10 +3160,9 @@ const de_DisassociateUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3206,9 +3182,10 @@ export const de_GetBrowserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.browserSettings != null) { - contents.browserSettings = de_BrowserSettings(data.browserSettings, context); - } + const doc = take(data, { + browserSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3242,10 +3219,9 @@ const de_GetBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3265,9 +3241,10 @@ export const de_GetIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identityProvider != null) { - contents.identityProvider = de_IdentityProvider(data.identityProvider, context); - } + const doc = take(data, { + identityProvider: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3301,10 +3278,9 @@ const de_GetIdentityProviderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3324,9 +3300,10 @@ export const de_GetNetworkSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSettings != null) { - contents.networkSettings = de_NetworkSettings(data.networkSettings, context); - } + const doc = take(data, { + networkSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3360,10 +3337,9 @@ const de_GetNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3383,9 +3359,10 @@ export const de_GetPortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portal != null) { - contents.portal = de_Portal(data.portal, context); - } + const doc = take(data, { + portal: (_) => de_Portal(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3419,10 +3396,9 @@ const de_GetPortalCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3442,12 +3418,11 @@ export const de_GetPortalServiceProviderMetadataCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portalArn != null) { - contents.portalArn = __expectString(data.portalArn); - } - if (data.serviceProviderSamlMetadata != null) { - contents.serviceProviderSamlMetadata = __expectString(data.serviceProviderSamlMetadata); - } + const doc = take(data, { + portalArn: __expectString, + serviceProviderSamlMetadata: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3481,10 +3456,9 @@ const de_GetPortalServiceProviderMetadataCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3504,9 +3478,10 @@ export const de_GetTrustStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustStore != null) { - contents.trustStore = de_TrustStore(data.trustStore, context); - } + const doc = take(data, { + trustStore: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3540,10 +3515,9 @@ const de_GetTrustStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3563,12 +3537,11 @@ export const de_GetTrustStoreCertificateCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificate != null) { - contents.certificate = de_Certificate(data.certificate, context); - } - if (data.trustStoreArn != null) { - contents.trustStoreArn = __expectString(data.trustStoreArn); - } + const doc = take(data, { + certificate: (_) => de_Certificate(_, context), + trustStoreArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3602,10 +3575,9 @@ const de_GetTrustStoreCertificateCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3625,9 +3597,10 @@ export const de_GetUserAccessLoggingSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userAccessLoggingSettings != null) { - contents.userAccessLoggingSettings = de_UserAccessLoggingSettings(data.userAccessLoggingSettings, context); - } + const doc = take(data, { + userAccessLoggingSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3661,10 +3634,9 @@ const de_GetUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3684,9 +3656,10 @@ export const de_GetUserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userSettings != null) { - contents.userSettings = de_UserSettings(data.userSettings, context); - } + const doc = take(data, { + userSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -3720,10 +3693,9 @@ const de_GetUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3743,12 +3715,11 @@ export const de_ListBrowserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.browserSettings != null) { - contents.browserSettings = de_BrowserSettingsList(data.browserSettings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + browserSettings: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3779,10 +3750,9 @@ const de_ListBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3802,12 +3772,11 @@ export const de_ListIdentityProvidersCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identityProviders != null) { - contents.identityProviders = de_IdentityProviderList(data.identityProviders, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + identityProviders: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3838,10 +3807,9 @@ const de_ListIdentityProvidersCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3861,12 +3829,11 @@ export const de_ListNetworkSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSettings != null) { - contents.networkSettings = de_NetworkSettingsList(data.networkSettings, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } + const doc = take(data, { + networkSettings: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3897,10 +3864,9 @@ const de_ListNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3920,12 +3886,11 @@ export const de_ListPortalsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.portals != null) { - contents.portals = de_PortalList(data.portals, context); - } + const doc = take(data, { + nextToken: __expectString, + portals: (_) => de_PortalList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3956,10 +3921,9 @@ const de_ListPortalsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3979,9 +3943,10 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.tags != null) { - contents.tags = de_TagList(data.tags, context); - } + const doc = take(data, { + tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4015,10 +3980,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4038,15 +4002,12 @@ export const de_ListTrustStoreCertificatesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.certificateList != null) { - contents.certificateList = de_CertificateSummaryList(data.certificateList, context); - } - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.trustStoreArn != null) { - contents.trustStoreArn = __expectString(data.trustStoreArn); - } + const doc = take(data, { + certificateList: (_) => de_CertificateSummaryList(_, context), + nextToken: __expectString, + trustStoreArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4080,10 +4041,9 @@ const de_ListTrustStoreCertificatesCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4103,12 +4063,11 @@ export const de_ListTrustStoresCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.trustStores != null) { - contents.trustStores = de_TrustStoreSummaryList(data.trustStores, context); - } + const doc = take(data, { + nextToken: __expectString, + trustStores: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4139,10 +4098,9 @@ const de_ListTrustStoresCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4162,12 +4120,11 @@ export const de_ListUserAccessLoggingSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.userAccessLoggingSettings != null) { - contents.userAccessLoggingSettings = de_UserAccessLoggingSettingsList(data.userAccessLoggingSettings, context); - } + const doc = take(data, { + nextToken: __expectString, + userAccessLoggingSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4198,10 +4155,9 @@ const de_ListUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4221,12 +4177,11 @@ export const de_ListUserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = __expectString(data.nextToken); - } - if (data.userSettings != null) { - contents.userSettings = de_UserSettingsList(data.userSettings, context); - } + const doc = take(data, { + nextToken: __expectString, + userSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4257,10 +4212,9 @@ const de_ListUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4316,10 +4270,9 @@ const de_TagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4372,10 +4325,9 @@ const de_UntagResourceCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4395,9 +4347,10 @@ export const de_UpdateBrowserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.browserSettings != null) { - contents.browserSettings = de_BrowserSettings(data.browserSettings, context); - } + const doc = take(data, { + browserSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4431,10 +4384,9 @@ const de_UpdateBrowserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4454,9 +4406,10 @@ export const de_UpdateIdentityProviderCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.identityProvider != null) { - contents.identityProvider = de_IdentityProvider(data.identityProvider, context); - } + const doc = take(data, { + identityProvider: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4490,10 +4443,9 @@ const de_UpdateIdentityProviderCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4513,9 +4465,10 @@ export const de_UpdateNetworkSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.networkSettings != null) { - contents.networkSettings = de_NetworkSettings(data.networkSettings, context); - } + const doc = take(data, { + networkSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4549,10 +4502,9 @@ const de_UpdateNetworkSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4572,9 +4524,10 @@ export const de_UpdatePortalCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.portal != null) { - contents.portal = de_Portal(data.portal, context); - } + const doc = take(data, { + portal: (_) => de_Portal(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4608,10 +4561,9 @@ const de_UpdatePortalCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4631,9 +4583,10 @@ export const de_UpdateTrustStoreCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.trustStoreArn != null) { - contents.trustStoreArn = __expectString(data.trustStoreArn); - } + const doc = take(data, { + trustStoreArn: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4670,10 +4623,9 @@ const de_UpdateTrustStoreCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4693,9 +4645,10 @@ export const de_UpdateUserAccessLoggingSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userAccessLoggingSettings != null) { - contents.userAccessLoggingSettings = de_UserAccessLoggingSettings(data.userAccessLoggingSettings, context); - } + const doc = take(data, { + userAccessLoggingSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4729,10 +4682,9 @@ const de_UpdateUserAccessLoggingSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4752,9 +4704,10 @@ export const de_UpdateUserSettingsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.userSettings != null) { - contents.userSettings = de_UserSettings(data.userSettings, context); - } + const doc = take(data, { + userSettings: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4788,16 +4741,15 @@ const de_UpdateUserSettingsCommandError = async ( throw await de_ValidationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1AccessDeniedExceptionRes */ @@ -4807,9 +4759,10 @@ const de_AccessDeniedExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4823,15 +4776,12 @@ const de_AccessDeniedExceptionRes = async ( const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ConflictException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4853,9 +4803,10 @@ const de_InternalServerExceptionRes = async ( ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new InternalServerException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4872,15 +4823,12 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } + const doc = take(data, { + message: __expectString, + resourceId: __expectString, + resourceType: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4897,21 +4845,14 @@ const de_ServiceQuotaExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.resourceId != null) { - contents.resourceId = __expectString(data.resourceId); - } - if (data.resourceType != null) { - contents.resourceType = __expectString(data.resourceType); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + resourceId: __expectString, + resourceType: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ServiceQuotaExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4930,15 +4871,12 @@ const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeCont ], }); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.quotaCode != null) { - contents.quotaCode = __expectString(data.quotaCode); - } - if (data.serviceCode != null) { - contents.serviceCode = __expectString(data.serviceCode); - } + const doc = take(data, { + message: __expectString, + quotaCode: __expectString, + serviceCode: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottlingException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4955,12 +4893,11 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.resourceName != null) { - contents.resourceName = __expectString(data.resourceName); - } + const doc = take(data, { + message: __expectString, + resourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -4974,15 +4911,12 @@ const de_TooManyTagsExceptionRes = async ( const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.fieldList != null) { - contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context); - } - if (data.message != null) { - contents.message = __expectString(data.message); - } - if (data.reason != null) { - contents.reason = __expectString(data.reason); - } + const doc = take(data, { + fieldList: _json, + message: __expectString, + reason: __expectString, + }); + Object.assign(contents, doc); const exception = new ValidationException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -5001,174 +4935,53 @@ const se_CertificateList = (input: Uint8Array[], context: __SerdeContext): any = }); }; -/** - * serializeAws_restJson1CertificateThumbprintList - */ -const se_CertificateThumbprintList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_CertificateThumbprintList omitted. -/** - * serializeAws_restJson1EncryptionContextMap - */ -const se_EncryptionContextMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_EncryptionContextMap omitted. -/** - * serializeAws_restJson1IdentityProviderDetails - */ -const se_IdentityProviderDetails = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_IdentityProviderDetails omitted. -/** - * serializeAws_restJson1SecurityGroupIdList - */ -const se_SecurityGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SecurityGroupIdList omitted. -/** - * serializeAws_restJson1SubnetIdList - */ -const se_SubnetIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SubnetIdList omitted. -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. -/** - * deserializeAws_restJson1ArnList - */ -const de_ArnList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ArnList omitted. -/** - * deserializeAws_restJson1BrowserSettings - */ -const de_BrowserSettings = (output: any, context: __SerdeContext): BrowserSettings => { - return { - associatedPortalArns: - output.associatedPortalArns != null ? de_ArnList(output.associatedPortalArns, context) : undefined, - browserPolicy: __expectString(output.browserPolicy), - browserSettingsArn: __expectString(output.browserSettingsArn), - } as any; -}; +// de_BrowserSettings omitted. -/** - * deserializeAws_restJson1BrowserSettingsList - */ -const de_BrowserSettingsList = (output: any, context: __SerdeContext): BrowserSettingsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_BrowserSettingsSummary(entry, context); - }); - return retVal; -}; +// de_BrowserSettingsList omitted. -/** - * deserializeAws_restJson1BrowserSettingsSummary - */ -const de_BrowserSettingsSummary = (output: any, context: __SerdeContext): BrowserSettingsSummary => { - return { - browserSettingsArn: __expectString(output.browserSettingsArn), - } as any; -}; +// de_BrowserSettingsSummary omitted. /** * deserializeAws_restJson1Certificate */ const de_Certificate = (output: any, context: __SerdeContext): Certificate => { - return { - body: output.body != null ? context.base64Decoder(output.body) : undefined, - issuer: __expectString(output.issuer), - notValidAfter: - output.notValidAfter != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notValidAfter))) - : undefined, - notValidBefore: - output.notValidBefore != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notValidBefore))) - : undefined, - subject: __expectString(output.subject), - thumbprint: __expectString(output.thumbprint), - } as any; + return take(output, { + body: context.base64Decoder, + issuer: __expectString, + notValidAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notValidBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + subject: __expectString, + thumbprint: __expectString, + }) as any; }; /** * deserializeAws_restJson1CertificateSummary */ const de_CertificateSummary = (output: any, context: __SerdeContext): CertificateSummary => { - return { - issuer: __expectString(output.issuer), - notValidAfter: - output.notValidAfter != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notValidAfter))) - : undefined, - notValidBefore: - output.notValidBefore != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.notValidBefore))) - : undefined, - subject: __expectString(output.subject), - thumbprint: __expectString(output.thumbprint), - } as any; + return take(output, { + issuer: __expectString, + notValidAfter: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + notValidBefore: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + subject: __expectString, + thumbprint: __expectString, + }) as any; }; /** @@ -5178,131 +4991,45 @@ const de_CertificateSummaryList = (output: any, context: __SerdeContext): Certif const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_CertificateSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1IdentityProvider - */ -const de_IdentityProvider = (output: any, context: __SerdeContext): IdentityProvider => { - return { - identityProviderArn: __expectString(output.identityProviderArn), - identityProviderDetails: - output.identityProviderDetails != null - ? de_IdentityProviderDetails(output.identityProviderDetails, context) - : undefined, - identityProviderName: __expectString(output.identityProviderName), - identityProviderType: __expectString(output.identityProviderType), - } as any; -}; +// de_IdentityProvider omitted. -/** - * deserializeAws_restJson1IdentityProviderDetails - */ -const de_IdentityProviderDetails = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_IdentityProviderDetails omitted. -/** - * deserializeAws_restJson1IdentityProviderList - */ -const de_IdentityProviderList = (output: any, context: __SerdeContext): IdentityProviderSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IdentityProviderSummary(entry, context); - }); - return retVal; -}; +// de_IdentityProviderList omitted. -/** - * deserializeAws_restJson1IdentityProviderSummary - */ -const de_IdentityProviderSummary = (output: any, context: __SerdeContext): IdentityProviderSummary => { - return { - identityProviderArn: __expectString(output.identityProviderArn), - identityProviderName: __expectString(output.identityProviderName), - identityProviderType: __expectString(output.identityProviderType), - } as any; -}; +// de_IdentityProviderSummary omitted. -/** - * deserializeAws_restJson1NetworkSettings - */ -const de_NetworkSettings = (output: any, context: __SerdeContext): NetworkSettings => { - return { - associatedPortalArns: - output.associatedPortalArns != null ? de_ArnList(output.associatedPortalArns, context) : undefined, - networkSettingsArn: __expectString(output.networkSettingsArn), - securityGroupIds: - output.securityGroupIds != null ? de_SecurityGroupIdList(output.securityGroupIds, context) : undefined, - subnetIds: output.subnetIds != null ? de_SubnetIdList(output.subnetIds, context) : undefined, - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_NetworkSettings omitted. -/** - * deserializeAws_restJson1NetworkSettingsList - */ -const de_NetworkSettingsList = (output: any, context: __SerdeContext): NetworkSettingsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_NetworkSettingsSummary(entry, context); - }); - return retVal; -}; +// de_NetworkSettingsList omitted. -/** - * deserializeAws_restJson1NetworkSettingsSummary - */ -const de_NetworkSettingsSummary = (output: any, context: __SerdeContext): NetworkSettingsSummary => { - return { - networkSettingsArn: __expectString(output.networkSettingsArn), - vpcId: __expectString(output.vpcId), - } as any; -}; +// de_NetworkSettingsSummary omitted. /** * deserializeAws_restJson1Portal */ const de_Portal = (output: any, context: __SerdeContext): Portal => { - return { - authenticationType: __expectString(output.authenticationType), - browserSettingsArn: __expectString(output.browserSettingsArn), - browserType: __expectString(output.browserType), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - displayName: __expectString(output.displayName), - networkSettingsArn: __expectString(output.networkSettingsArn), - portalArn: __expectString(output.portalArn), - portalEndpoint: __expectString(output.portalEndpoint), - portalStatus: __expectString(output.portalStatus), - rendererType: __expectString(output.rendererType), - statusReason: __expectString(output.statusReason), - trustStoreArn: __expectString(output.trustStoreArn), - userAccessLoggingSettingsArn: __expectString(output.userAccessLoggingSettingsArn), - userSettingsArn: __expectString(output.userSettingsArn), - } as any; + return take(output, { + authenticationType: __expectString, + browserSettingsArn: __expectString, + browserType: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + networkSettingsArn: __expectString, + portalArn: __expectString, + portalEndpoint: __expectString, + portalStatus: __expectString, + rendererType: __expectString, + statusReason: __expectString, + trustStoreArn: __expectString, + userAccessLoggingSettingsArn: __expectString, + userSettingsArn: __expectString, + }) as any; }; /** @@ -5312,9 +5039,6 @@ const de_PortalList = (output: any, context: __SerdeContext): PortalSummary[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_PortalSummary(entry, context); }); return retVal; @@ -5324,229 +5048,52 @@ const de_PortalList = (output: any, context: __SerdeContext): PortalSummary[] => * deserializeAws_restJson1PortalSummary */ const de_PortalSummary = (output: any, context: __SerdeContext): PortalSummary => { - return { - authenticationType: __expectString(output.authenticationType), - browserSettingsArn: __expectString(output.browserSettingsArn), - browserType: __expectString(output.browserType), - creationDate: - output.creationDate != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationDate))) - : undefined, - displayName: __expectString(output.displayName), - networkSettingsArn: __expectString(output.networkSettingsArn), - portalArn: __expectString(output.portalArn), - portalEndpoint: __expectString(output.portalEndpoint), - portalStatus: __expectString(output.portalStatus), - rendererType: __expectString(output.rendererType), - trustStoreArn: __expectString(output.trustStoreArn), - userAccessLoggingSettingsArn: __expectString(output.userAccessLoggingSettingsArn), - userSettingsArn: __expectString(output.userSettingsArn), - } as any; -}; - -/** - * deserializeAws_restJson1SecurityGroupIdList - */ -const de_SecurityGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + authenticationType: __expectString, + browserSettingsArn: __expectString, + browserType: __expectString, + creationDate: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + displayName: __expectString, + networkSettingsArn: __expectString, + portalArn: __expectString, + portalEndpoint: __expectString, + portalStatus: __expectString, + rendererType: __expectString, + trustStoreArn: __expectString, + userAccessLoggingSettingsArn: __expectString, + userSettingsArn: __expectString, + }) as any; }; -/** - * deserializeAws_restJson1SubnetIdList - */ -const de_SubnetIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_SecurityGroupIdList omitted. -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_SubnetIdList omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TrustStore - */ -const de_TrustStore = (output: any, context: __SerdeContext): TrustStore => { - return { - associatedPortalArns: - output.associatedPortalArns != null ? de_ArnList(output.associatedPortalArns, context) : undefined, - trustStoreArn: __expectString(output.trustStoreArn), - } as any; -}; +// de_TagList omitted. -/** - * deserializeAws_restJson1TrustStoreSummary - */ -const de_TrustStoreSummary = (output: any, context: __SerdeContext): TrustStoreSummary => { - return { - trustStoreArn: __expectString(output.trustStoreArn), - } as any; -}; +// de_TrustStore omitted. -/** - * deserializeAws_restJson1TrustStoreSummaryList - */ -const de_TrustStoreSummaryList = (output: any, context: __SerdeContext): TrustStoreSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TrustStoreSummary(entry, context); - }); - return retVal; -}; +// de_TrustStoreSummary omitted. -/** - * deserializeAws_restJson1UserAccessLoggingSettings - */ -const de_UserAccessLoggingSettings = (output: any, context: __SerdeContext): UserAccessLoggingSettings => { - return { - associatedPortalArns: - output.associatedPortalArns != null ? de_ArnList(output.associatedPortalArns, context) : undefined, - kinesisStreamArn: __expectString(output.kinesisStreamArn), - userAccessLoggingSettingsArn: __expectString(output.userAccessLoggingSettingsArn), - } as any; -}; +// de_TrustStoreSummaryList omitted. -/** - * deserializeAws_restJson1UserAccessLoggingSettingsList - */ -const de_UserAccessLoggingSettingsList = (output: any, context: __SerdeContext): UserAccessLoggingSettingsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserAccessLoggingSettingsSummary(entry, context); - }); - return retVal; -}; +// de_UserAccessLoggingSettings omitted. -/** - * deserializeAws_restJson1UserAccessLoggingSettingsSummary - */ -const de_UserAccessLoggingSettingsSummary = ( - output: any, - context: __SerdeContext -): UserAccessLoggingSettingsSummary => { - return { - kinesisStreamArn: __expectString(output.kinesisStreamArn), - userAccessLoggingSettingsArn: __expectString(output.userAccessLoggingSettingsArn), - } as any; -}; +// de_UserAccessLoggingSettingsList omitted. -/** - * deserializeAws_restJson1UserSettings - */ -const de_UserSettings = (output: any, context: __SerdeContext): UserSettings => { - return { - associatedPortalArns: - output.associatedPortalArns != null ? de_ArnList(output.associatedPortalArns, context) : undefined, - copyAllowed: __expectString(output.copyAllowed), - disconnectTimeoutInMinutes: __expectInt32(output.disconnectTimeoutInMinutes), - downloadAllowed: __expectString(output.downloadAllowed), - idleDisconnectTimeoutInMinutes: __expectInt32(output.idleDisconnectTimeoutInMinutes), - pasteAllowed: __expectString(output.pasteAllowed), - printAllowed: __expectString(output.printAllowed), - uploadAllowed: __expectString(output.uploadAllowed), - userSettingsArn: __expectString(output.userSettingsArn), - } as any; -}; +// de_UserAccessLoggingSettingsSummary omitted. -/** - * deserializeAws_restJson1UserSettingsList - */ -const de_UserSettingsList = (output: any, context: __SerdeContext): UserSettingsSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UserSettingsSummary(entry, context); - }); - return retVal; -}; +// de_UserSettings omitted. -/** - * deserializeAws_restJson1UserSettingsSummary - */ -const de_UserSettingsSummary = (output: any, context: __SerdeContext): UserSettingsSummary => { - return { - copyAllowed: __expectString(output.copyAllowed), - disconnectTimeoutInMinutes: __expectInt32(output.disconnectTimeoutInMinutes), - downloadAllowed: __expectString(output.downloadAllowed), - idleDisconnectTimeoutInMinutes: __expectInt32(output.idleDisconnectTimeoutInMinutes), - pasteAllowed: __expectString(output.pasteAllowed), - printAllowed: __expectString(output.printAllowed), - uploadAllowed: __expectString(output.uploadAllowed), - userSettingsArn: __expectString(output.userSettingsArn), - } as any; -}; +// de_UserSettingsList omitted. -/** - * deserializeAws_restJson1ValidationExceptionField - */ -const de_ValidationExceptionField = (output: any, context: __SerdeContext): ValidationExceptionField => { - return { - message: __expectString(output.message), - name: __expectString(output.name), - } as any; -}; +// de_UserSettingsSummary omitted. -/** - * deserializeAws_restJson1ValidationExceptionFieldList - */ -const de_ValidationExceptionFieldList = (output: any, context: __SerdeContext): ValidationExceptionField[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ValidationExceptionField(entry, context); - }); - return retVal; -}; +// de_ValidationExceptionField omitted. + +// de_ValidationExceptionFieldList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/clients/client-workspaces/src/protocols/Aws_json1_1.ts b/clients/client-workspaces/src/protocols/Aws_json1_1.ts index 3ce1453fcc45..574328711293 100644 --- a/clients/client-workspaces/src/protocols/Aws_json1_1.ts +++ b/clients/client-workspaces/src/protocols/Aws_json1_1.ts @@ -1,14 +1,14 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, - expectBoolean as __expectBoolean, - expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -222,85 +222,50 @@ import { AccountModification, Application, AssociateConnectionAliasRequest, - AssociateConnectionAliasResult, AssociateIpGroupsRequest, - AssociateIpGroupsResult, AuthorizeIpRulesRequest, - AuthorizeIpRulesResult, CertificateBasedAuthProperties, ClientDeviceType, ClientProperties, - ClientPropertiesResult, ComputeType, - ConnectClientAddIn, - ConnectionAlias, - ConnectionAliasAssociation, ConnectionAliasPermission, CopyWorkspaceImageRequest, - CopyWorkspaceImageResult, CreateConnectClientAddInRequest, - CreateConnectClientAddInResult, CreateConnectionAliasRequest, - CreateConnectionAliasResult, CreateIpGroupRequest, - CreateIpGroupResult, CreateStandbyWorkspacesRequest, - CreateStandbyWorkspacesResult, CreateTagsRequest, - CreateTagsResult, CreateUpdatedWorkspaceImageRequest, - CreateUpdatedWorkspaceImageResult, CreateWorkspaceBundleRequest, CreateWorkspaceBundleResult, CreateWorkspaceImageRequest, CreateWorkspaceImageResult, CreateWorkspacesRequest, - CreateWorkspacesResult, - DefaultClientBrandingAttributes, DefaultImportClientBrandingAttributes, - DefaultWorkspaceCreationProperties, DeletableCertificateBasedAuthProperty, DeletableSamlProperty, DeleteClientBrandingRequest, - DeleteClientBrandingResult, DeleteConnectClientAddInRequest, - DeleteConnectClientAddInResult, DeleteConnectionAliasRequest, - DeleteConnectionAliasResult, DeleteIpGroupRequest, - DeleteIpGroupResult, DeleteTagsRequest, - DeleteTagsResult, DeleteWorkspaceBundleRequest, - DeleteWorkspaceBundleResult, DeleteWorkspaceImageRequest, - DeleteWorkspaceImageResult, DeregisterWorkspaceDirectoryRequest, - DeregisterWorkspaceDirectoryResult, DescribeAccountModificationsRequest, DescribeAccountModificationsResult, DescribeAccountRequest, - DescribeAccountResult, DescribeClientBrandingRequest, - DescribeClientBrandingResult, DescribeClientPropertiesRequest, - DescribeClientPropertiesResult, DescribeConnectClientAddInsRequest, - DescribeConnectClientAddInsResult, DescribeConnectionAliasesRequest, - DescribeConnectionAliasesResult, DescribeConnectionAliasPermissionsRequest, - DescribeConnectionAliasPermissionsResult, DescribeIpGroupsRequest, - DescribeIpGroupsResult, DescribeTagsRequest, - DescribeTagsResult, DescribeWorkspaceBundlesRequest, DescribeWorkspaceBundlesResult, DescribeWorkspaceDirectoriesRequest, - DescribeWorkspaceDirectoriesResult, DescribeWorkspaceImagePermissionsRequest, - DescribeWorkspaceImagePermissionsResult, DescribeWorkspaceImagesRequest, DescribeWorkspaceImagesResult, DescribeWorkspacesConnectionStatusRequest, @@ -308,61 +273,33 @@ import { DescribeWorkspaceSnapshotsRequest, DescribeWorkspaceSnapshotsResult, DescribeWorkspacesRequest, - DescribeWorkspacesResult, DisassociateConnectionAliasRequest, - DisassociateConnectionAliasResult, DisassociateIpGroupsRequest, - DisassociateIpGroupsResult, - FailedCreateStandbyWorkspacesRequest, - FailedCreateWorkspaceRequest, - FailedWorkspaceChangeRequest, - ImagePermission, ImportClientBrandingRequest, - ImportClientBrandingResult, ImportWorkspaceImageRequest, - ImportWorkspaceImageResult, InvalidParameterValuesException, InvalidResourceStateException, - IosClientBrandingAttributes, IosImportClientBrandingAttributes, IpRuleItem, ListAvailableManagementCidrRangesRequest, - ListAvailableManagementCidrRangesResult, MigrateWorkspaceRequest, - MigrateWorkspaceResult, - ModificationState, ModifyAccountRequest, - ModifyAccountResult, ModifyCertificateBasedAuthPropertiesRequest, - ModifyCertificateBasedAuthPropertiesResult, ModifyClientPropertiesRequest, - ModifyClientPropertiesResult, ModifySamlPropertiesRequest, - ModifySamlPropertiesResult, ModifySelfservicePermissionsRequest, - ModifySelfservicePermissionsResult, ModifyWorkspaceAccessPropertiesRequest, - ModifyWorkspaceAccessPropertiesResult, ModifyWorkspaceCreationPropertiesRequest, - ModifyWorkspaceCreationPropertiesResult, ModifyWorkspacePropertiesRequest, - ModifyWorkspacePropertiesResult, ModifyWorkspaceStateRequest, - ModifyWorkspaceStateResult, - OperatingSystem, OperationInProgressException, OperationNotSupportedException, - PendingCreateStandbyWorkspacesRequest, Protocol, RebootRequest, RebootWorkspacesRequest, - RebootWorkspacesResult, RebuildRequest, RebuildWorkspacesRequest, - RebuildWorkspacesResult, RegisterWorkspaceDirectoryRequest, - RegisterWorkspaceDirectoryResult, - RelatedWorkspaceProperties, ResourceAlreadyExistsException, ResourceAssociatedException, ResourceCreationFailedException, @@ -370,9 +307,7 @@ import { ResourceNotFoundException, ResourceUnavailableException, RestoreWorkspaceRequest, - RestoreWorkspaceResult, RevokeIpRulesRequest, - RevokeIpRulesResult, RootStorage, SamlProperties, SelfservicePermissions, @@ -380,39 +315,27 @@ import { StandbyWorkspace, StartRequest, StartWorkspacesRequest, - StartWorkspacesResult, StopRequest, StopWorkspacesRequest, - StopWorkspacesResult, Tag, TerminateRequest, TerminateWorkspacesRequest, - TerminateWorkspacesResult, UnsupportedNetworkConfigurationException, UnsupportedWorkspaceConfigurationException, UpdateConnectClientAddInRequest, - UpdateConnectClientAddInResult, UpdateConnectionAliasPermissionRequest, - UpdateConnectionAliasPermissionResult, - UpdateResult, UpdateRulesOfIpGroupRequest, - UpdateRulesOfIpGroupResult, UpdateWorkspaceBundleRequest, - UpdateWorkspaceBundleResult, UpdateWorkspaceImagePermissionRequest, - UpdateWorkspaceImagePermissionResult, UserStorage, - Workspace, WorkspaceAccessProperties, WorkspaceBundle, WorkspaceConnectionStatus, WorkspaceCreationProperties, - WorkspaceDirectory, WorkspaceImage, WorkspaceProperties, WorkspaceRequest, WorkspacesDefaultRoleNotFoundException, - WorkspacesIpGroup, } from "../models/models_0"; import { WorkSpacesServiceException as __BaseException } from "../models/WorkSpacesServiceException"; @@ -425,7 +348,7 @@ export const se_AssociateConnectionAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateConnectionAlias"); let body: any; - body = JSON.stringify(se_AssociateConnectionAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -438,7 +361,7 @@ export const se_AssociateIpGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AssociateIpGroups"); let body: any; - body = JSON.stringify(se_AssociateIpGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -451,7 +374,7 @@ export const se_AuthorizeIpRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AuthorizeIpRules"); let body: any; - body = JSON.stringify(se_AuthorizeIpRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -464,7 +387,7 @@ export const se_CopyWorkspaceImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CopyWorkspaceImage"); let body: any; - body = JSON.stringify(se_CopyWorkspaceImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -477,7 +400,7 @@ export const se_CreateConnectClientAddInCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnectClientAddIn"); let body: any; - body = JSON.stringify(se_CreateConnectClientAddInRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -490,7 +413,7 @@ export const se_CreateConnectionAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateConnectionAlias"); let body: any; - body = JSON.stringify(se_CreateConnectionAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -503,7 +426,7 @@ export const se_CreateIpGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateIpGroup"); let body: any; - body = JSON.stringify(se_CreateIpGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -516,7 +439,7 @@ export const se_CreateStandbyWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateStandbyWorkspaces"); let body: any; - body = JSON.stringify(se_CreateStandbyWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -529,7 +452,7 @@ export const se_CreateTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateTags"); let body: any; - body = JSON.stringify(se_CreateTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -542,7 +465,7 @@ export const se_CreateUpdatedWorkspaceImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateUpdatedWorkspaceImage"); let body: any; - body = JSON.stringify(se_CreateUpdatedWorkspaceImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -555,7 +478,7 @@ export const se_CreateWorkspaceBundleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkspaceBundle"); let body: any; - body = JSON.stringify(se_CreateWorkspaceBundleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -568,7 +491,7 @@ export const se_CreateWorkspaceImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkspaceImage"); let body: any; - body = JSON.stringify(se_CreateWorkspaceImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -581,7 +504,7 @@ export const se_CreateWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateWorkspaces"); let body: any; - body = JSON.stringify(se_CreateWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -594,7 +517,7 @@ export const se_DeleteClientBrandingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteClientBranding"); let body: any; - body = JSON.stringify(se_DeleteClientBrandingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -607,7 +530,7 @@ export const se_DeleteConnectClientAddInCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnectClientAddIn"); let body: any; - body = JSON.stringify(se_DeleteConnectClientAddInRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -620,7 +543,7 @@ export const se_DeleteConnectionAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteConnectionAlias"); let body: any; - body = JSON.stringify(se_DeleteConnectionAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -633,7 +556,7 @@ export const se_DeleteIpGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteIpGroup"); let body: any; - body = JSON.stringify(se_DeleteIpGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -646,7 +569,7 @@ export const se_DeleteTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteTags"); let body: any; - body = JSON.stringify(se_DeleteTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -659,7 +582,7 @@ export const se_DeleteWorkspaceBundleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkspaceBundle"); let body: any; - body = JSON.stringify(se_DeleteWorkspaceBundleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -672,7 +595,7 @@ export const se_DeleteWorkspaceImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteWorkspaceImage"); let body: any; - body = JSON.stringify(se_DeleteWorkspaceImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -685,7 +608,7 @@ export const se_DeregisterWorkspaceDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeregisterWorkspaceDirectory"); let body: any; - body = JSON.stringify(se_DeregisterWorkspaceDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -698,7 +621,7 @@ export const se_DescribeAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccount"); let body: any; - body = JSON.stringify(se_DescribeAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -711,7 +634,7 @@ export const se_DescribeAccountModificationsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeAccountModifications"); let body: any; - body = JSON.stringify(se_DescribeAccountModificationsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -724,7 +647,7 @@ export const se_DescribeClientBrandingCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClientBranding"); let body: any; - body = JSON.stringify(se_DescribeClientBrandingRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -737,7 +660,7 @@ export const se_DescribeClientPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeClientProperties"); let body: any; - body = JSON.stringify(se_DescribeClientPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -750,7 +673,7 @@ export const se_DescribeConnectClientAddInsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnectClientAddIns"); let body: any; - body = JSON.stringify(se_DescribeConnectClientAddInsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -763,7 +686,7 @@ export const se_DescribeConnectionAliasesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnectionAliases"); let body: any; - body = JSON.stringify(se_DescribeConnectionAliasesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -776,7 +699,7 @@ export const se_DescribeConnectionAliasPermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeConnectionAliasPermissions"); let body: any; - body = JSON.stringify(se_DescribeConnectionAliasPermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -789,7 +712,7 @@ export const se_DescribeIpGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeIpGroups"); let body: any; - body = JSON.stringify(se_DescribeIpGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -802,7 +725,7 @@ export const se_DescribeTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeTags"); let body: any; - body = JSON.stringify(se_DescribeTagsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -815,7 +738,7 @@ export const se_DescribeWorkspaceBundlesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspaceBundles"); let body: any; - body = JSON.stringify(se_DescribeWorkspaceBundlesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -828,7 +751,7 @@ export const se_DescribeWorkspaceDirectoriesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspaceDirectories"); let body: any; - body = JSON.stringify(se_DescribeWorkspaceDirectoriesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -841,7 +764,7 @@ export const se_DescribeWorkspaceImagePermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspaceImagePermissions"); let body: any; - body = JSON.stringify(se_DescribeWorkspaceImagePermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -854,7 +777,7 @@ export const se_DescribeWorkspaceImagesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspaceImages"); let body: any; - body = JSON.stringify(se_DescribeWorkspaceImagesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -867,7 +790,7 @@ export const se_DescribeWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspaces"); let body: any; - body = JSON.stringify(se_DescribeWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -880,7 +803,7 @@ export const se_DescribeWorkspacesConnectionStatusCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspacesConnectionStatus"); let body: any; - body = JSON.stringify(se_DescribeWorkspacesConnectionStatusRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -893,7 +816,7 @@ export const se_DescribeWorkspaceSnapshotsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DescribeWorkspaceSnapshots"); let body: any; - body = JSON.stringify(se_DescribeWorkspaceSnapshotsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -906,7 +829,7 @@ export const se_DisassociateConnectionAliasCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateConnectionAlias"); let body: any; - body = JSON.stringify(se_DisassociateConnectionAliasRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -919,7 +842,7 @@ export const se_DisassociateIpGroupsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DisassociateIpGroups"); let body: any; - body = JSON.stringify(se_DisassociateIpGroupsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -945,7 +868,7 @@ export const se_ImportWorkspaceImageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ImportWorkspaceImage"); let body: any; - body = JSON.stringify(se_ImportWorkspaceImageRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -958,7 +881,7 @@ export const se_ListAvailableManagementCidrRangesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListAvailableManagementCidrRanges"); let body: any; - body = JSON.stringify(se_ListAvailableManagementCidrRangesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -971,7 +894,7 @@ export const se_MigrateWorkspaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("MigrateWorkspace"); let body: any; - body = JSON.stringify(se_MigrateWorkspaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -984,7 +907,7 @@ export const se_ModifyAccountCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyAccount"); let body: any; - body = JSON.stringify(se_ModifyAccountRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -997,7 +920,7 @@ export const se_ModifyCertificateBasedAuthPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyCertificateBasedAuthProperties"); let body: any; - body = JSON.stringify(se_ModifyCertificateBasedAuthPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1010,7 +933,7 @@ export const se_ModifyClientPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyClientProperties"); let body: any; - body = JSON.stringify(se_ModifyClientPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1023,7 +946,7 @@ export const se_ModifySamlPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifySamlProperties"); let body: any; - body = JSON.stringify(se_ModifySamlPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1036,7 +959,7 @@ export const se_ModifySelfservicePermissionsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifySelfservicePermissions"); let body: any; - body = JSON.stringify(se_ModifySelfservicePermissionsRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1049,7 +972,7 @@ export const se_ModifyWorkspaceAccessPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyWorkspaceAccessProperties"); let body: any; - body = JSON.stringify(se_ModifyWorkspaceAccessPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1062,7 +985,7 @@ export const se_ModifyWorkspaceCreationPropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyWorkspaceCreationProperties"); let body: any; - body = JSON.stringify(se_ModifyWorkspaceCreationPropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1075,7 +998,7 @@ export const se_ModifyWorkspacePropertiesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyWorkspaceProperties"); let body: any; - body = JSON.stringify(se_ModifyWorkspacePropertiesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1088,7 +1011,7 @@ export const se_ModifyWorkspaceStateCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ModifyWorkspaceState"); let body: any; - body = JSON.stringify(se_ModifyWorkspaceStateRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1101,7 +1024,7 @@ export const se_RebootWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebootWorkspaces"); let body: any; - body = JSON.stringify(se_RebootWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1114,7 +1037,7 @@ export const se_RebuildWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RebuildWorkspaces"); let body: any; - body = JSON.stringify(se_RebuildWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1127,7 +1050,7 @@ export const se_RegisterWorkspaceDirectoryCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RegisterWorkspaceDirectory"); let body: any; - body = JSON.stringify(se_RegisterWorkspaceDirectoryRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1140,7 +1063,7 @@ export const se_RestoreWorkspaceCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RestoreWorkspace"); let body: any; - body = JSON.stringify(se_RestoreWorkspaceRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1153,7 +1076,7 @@ export const se_RevokeIpRulesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RevokeIpRules"); let body: any; - body = JSON.stringify(se_RevokeIpRulesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1166,7 +1089,7 @@ export const se_StartWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartWorkspaces"); let body: any; - body = JSON.stringify(se_StartWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1179,7 +1102,7 @@ export const se_StopWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StopWorkspaces"); let body: any; - body = JSON.stringify(se_StopWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1192,7 +1115,7 @@ export const se_TerminateWorkspacesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TerminateWorkspaces"); let body: any; - body = JSON.stringify(se_TerminateWorkspacesRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1205,7 +1128,7 @@ export const se_UpdateConnectClientAddInCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnectClientAddIn"); let body: any; - body = JSON.stringify(se_UpdateConnectClientAddInRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1218,7 +1141,7 @@ export const se_UpdateConnectionAliasPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateConnectionAliasPermission"); let body: any; - body = JSON.stringify(se_UpdateConnectionAliasPermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1231,7 +1154,7 @@ export const se_UpdateRulesOfIpGroupCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateRulesOfIpGroup"); let body: any; - body = JSON.stringify(se_UpdateRulesOfIpGroupRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1244,7 +1167,7 @@ export const se_UpdateWorkspaceBundleCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkspaceBundle"); let body: any; - body = JSON.stringify(se_UpdateWorkspaceBundleRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1257,7 +1180,7 @@ export const se_UpdateWorkspaceImagePermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UpdateWorkspaceImagePermission"); let body: any; - body = JSON.stringify(se_UpdateWorkspaceImagePermissionRequest(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -1273,12 +1196,12 @@ export const de_AssociateConnectionAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateConnectionAliasResult(data, context); + contents = _json(data); const response: AssociateConnectionAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1314,10 +1237,9 @@ const de_AssociateConnectionAliasCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1335,12 +1257,12 @@ export const de_AssociateIpGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AssociateIpGroupsResult(data, context); + contents = _json(data); const response: AssociateIpGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1376,10 +1298,9 @@ const de_AssociateIpGroupsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1397,12 +1318,12 @@ export const de_AuthorizeIpRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_AuthorizeIpRulesResult(data, context); + contents = _json(data); const response: AuthorizeIpRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1435,10 +1356,9 @@ const de_AuthorizeIpRulesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1456,12 +1376,12 @@ export const de_CopyWorkspaceImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CopyWorkspaceImageResult(data, context); + contents = _json(data); const response: CopyWorkspaceImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1500,10 +1420,9 @@ const de_CopyWorkspaceImageCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1521,12 +1440,12 @@ export const de_CreateConnectClientAddInCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConnectClientAddInResult(data, context); + contents = _json(data); const response: CreateConnectClientAddInCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1559,10 +1478,9 @@ const de_CreateConnectClientAddInCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1580,12 +1498,12 @@ export const de_CreateConnectionAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateConnectionAliasResult(data, context); + contents = _json(data); const response: CreateConnectionAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1621,10 +1539,9 @@ const de_CreateConnectionAliasCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1642,12 +1559,12 @@ export const de_CreateIpGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateIpGroupResult(data, context); + contents = _json(data); const response: CreateIpGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1680,10 +1597,9 @@ const de_CreateIpGroupCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1701,12 +1617,12 @@ export const de_CreateStandbyWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateStandbyWorkspacesResult(data, context); + contents = _json(data); const response: CreateStandbyWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1739,10 +1655,9 @@ const de_CreateStandbyWorkspacesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1760,12 +1675,12 @@ export const de_CreateTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateTagsResult(data, context); + contents = _json(data); const response: CreateTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1792,10 +1707,9 @@ const de_CreateTagsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1813,12 +1727,12 @@ export const de_CreateUpdatedWorkspaceImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateUpdatedWorkspaceImageResult(data, context); + contents = _json(data); const response: CreateUpdatedWorkspaceImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1857,10 +1771,9 @@ const de_CreateUpdatedWorkspaceImageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1883,7 +1796,7 @@ export const de_CreateWorkspaceBundleCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1919,10 +1832,9 @@ const de_CreateWorkspaceBundleCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1945,7 +1857,7 @@ export const de_CreateWorkspaceImageCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1984,10 +1896,9 @@ const de_CreateWorkspaceImageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2005,12 +1916,12 @@ export const de_CreateWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_CreateWorkspacesResult(data, context); + contents = _json(data); const response: CreateWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2034,10 +1945,9 @@ const de_CreateWorkspacesCommandError = async ( throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2055,12 +1965,12 @@ export const de_DeleteClientBrandingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteClientBrandingResult(data, context); + contents = _json(data); const response: DeleteClientBrandingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2087,10 +1997,9 @@ const de_DeleteClientBrandingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2108,12 +2017,12 @@ export const de_DeleteConnectClientAddInCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConnectClientAddInResult(data, context); + contents = _json(data); const response: DeleteConnectClientAddInCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2140,10 +2049,9 @@ const de_DeleteConnectClientAddInCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2161,12 +2069,12 @@ export const de_DeleteConnectionAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteConnectionAliasResult(data, context); + contents = _json(data); const response: DeleteConnectionAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2202,10 +2110,9 @@ const de_DeleteConnectionAliasCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2223,12 +2130,12 @@ export const de_DeleteIpGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteIpGroupResult(data, context); + contents = _json(data); const response: DeleteIpGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2258,10 +2165,9 @@ const de_DeleteIpGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2279,12 +2185,12 @@ export const de_DeleteTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteTagsResult(data, context); + contents = _json(data); const response: DeleteTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2308,10 +2214,9 @@ const de_DeleteTagsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2329,12 +2234,12 @@ export const de_DeleteWorkspaceBundleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkspaceBundleResult(data, context); + contents = _json(data); const response: DeleteWorkspaceBundleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2364,10 +2269,9 @@ const de_DeleteWorkspaceBundleCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2385,12 +2289,12 @@ export const de_DeleteWorkspaceImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeleteWorkspaceImageResult(data, context); + contents = _json(data); const response: DeleteWorkspaceImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2417,10 +2321,9 @@ const de_DeleteWorkspaceImageCommandError = async ( throw await de_ResourceAssociatedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2438,12 +2341,12 @@ export const de_DeregisterWorkspaceDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DeregisterWorkspaceDirectoryResult(data, context); + contents = _json(data); const response: DeregisterWorkspaceDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2476,10 +2379,9 @@ const de_DeregisterWorkspaceDirectoryCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2497,12 +2399,12 @@ export const de_DescribeAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeAccountResult(data, context); + contents = _json(data); const response: DescribeAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2523,10 +2425,9 @@ const de_DescribeAccountCommandError = async ( throw await de_AccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2549,7 +2450,7 @@ export const de_DescribeAccountModificationsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2570,10 +2471,9 @@ const de_DescribeAccountModificationsCommandError = async ( throw await de_AccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2591,12 +2491,12 @@ export const de_DescribeClientBrandingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeClientBrandingResult(data, context); + contents = _json(data); const response: DescribeClientBrandingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2623,10 +2523,9 @@ const de_DescribeClientBrandingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2644,12 +2543,12 @@ export const de_DescribeClientPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeClientPropertiesResult(data, context); + contents = _json(data); const response: DescribeClientPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2676,10 +2575,9 @@ const de_DescribeClientPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2697,12 +2595,12 @@ export const de_DescribeConnectClientAddInsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConnectClientAddInsResult(data, context); + contents = _json(data); const response: DescribeConnectClientAddInsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2729,10 +2627,9 @@ const de_DescribeConnectClientAddInsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2750,12 +2647,12 @@ export const de_DescribeConnectionAliasesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConnectionAliasesResult(data, context); + contents = _json(data); const response: DescribeConnectionAliasesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2782,10 +2679,9 @@ const de_DescribeConnectionAliasesCommandError = async ( throw await de_OperationNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2803,12 +2699,12 @@ export const de_DescribeConnectionAliasPermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeConnectionAliasPermissionsResult(data, context); + contents = _json(data); const response: DescribeConnectionAliasPermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2838,10 +2734,9 @@ const de_DescribeConnectionAliasPermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2859,12 +2754,12 @@ export const de_DescribeIpGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeIpGroupsResult(data, context); + contents = _json(data); const response: DescribeIpGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2888,10 +2783,9 @@ const de_DescribeIpGroupsCommandError = async ( throw await de_InvalidParameterValuesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2909,12 +2803,12 @@ export const de_DescribeTagsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeTagsResult(data, context); + contents = _json(data); const response: DescribeTagsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2935,10 +2829,9 @@ const de_DescribeTagsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2961,7 +2854,7 @@ export const de_DescribeWorkspaceBundlesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -2982,10 +2875,9 @@ const de_DescribeWorkspaceBundlesCommandError = async ( throw await de_InvalidParameterValuesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3003,12 +2895,12 @@ export const de_DescribeWorkspaceDirectoriesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeWorkspaceDirectoriesResult(data, context); + contents = _json(data); const response: DescribeWorkspaceDirectoriesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3029,10 +2921,9 @@ const de_DescribeWorkspaceDirectoriesCommandError = async ( throw await de_InvalidParameterValuesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3050,12 +2941,12 @@ export const de_DescribeWorkspaceImagePermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeWorkspaceImagePermissionsResult(data, context); + contents = _json(data); const response: DescribeWorkspaceImagePermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3082,10 +2973,9 @@ const de_DescribeWorkspaceImagePermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3108,7 +2998,7 @@ export const de_DescribeWorkspaceImagesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3129,10 +3019,9 @@ const de_DescribeWorkspaceImagesCommandError = async ( throw await de_AccessDeniedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3150,12 +3039,12 @@ export const de_DescribeWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeWorkspacesResult(data, context); + contents = _json(data); const response: DescribeWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3179,10 +3068,9 @@ const de_DescribeWorkspacesCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3205,7 +3093,7 @@ export const de_DescribeWorkspacesConnectionStatusCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3226,10 +3114,9 @@ const de_DescribeWorkspacesConnectionStatusCommandError = async ( throw await de_InvalidParameterValuesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3252,7 +3139,7 @@ export const de_DescribeWorkspaceSnapshotsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3279,10 +3166,9 @@ const de_DescribeWorkspaceSnapshotsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3300,12 +3186,12 @@ export const de_DisassociateConnectionAliasCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateConnectionAliasResult(data, context); + contents = _json(data); const response: DisassociateConnectionAliasCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3338,10 +3224,9 @@ const de_DisassociateConnectionAliasCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3359,12 +3244,12 @@ export const de_DisassociateIpGroupsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DisassociateIpGroupsResult(data, context); + contents = _json(data); const response: DisassociateIpGroupsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3394,10 +3279,9 @@ const de_DisassociateIpGroupsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3415,12 +3299,12 @@ export const de_ImportClientBrandingCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportClientBrandingResult(data, context); + contents = _json(data); const response: ImportClientBrandingCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3450,10 +3334,9 @@ const de_ImportClientBrandingCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3471,12 +3354,12 @@ export const de_ImportWorkspaceImageCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ImportWorkspaceImageResult(data, context); + contents = _json(data); const response: ImportWorkspaceImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3512,10 +3395,9 @@ const de_ImportWorkspaceImageCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3533,12 +3415,12 @@ export const de_ListAvailableManagementCidrRangesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ListAvailableManagementCidrRangesResult(data, context); + contents = _json(data); const response: ListAvailableManagementCidrRangesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3562,10 +3444,9 @@ const de_ListAvailableManagementCidrRangesCommandError = async ( throw await de_InvalidParameterValuesExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3583,12 +3464,12 @@ export const de_MigrateWorkspaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_MigrateWorkspaceResult(data, context); + contents = _json(data); const response: MigrateWorkspaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3624,10 +3505,9 @@ const de_MigrateWorkspaceCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3645,12 +3525,12 @@ export const de_ModifyAccountCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyAccountResult(data, context); + contents = _json(data); const response: ModifyAccountCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3683,10 +3563,9 @@ const de_ModifyAccountCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3704,12 +3583,12 @@ export const de_ModifyCertificateBasedAuthPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyCertificateBasedAuthPropertiesResult(data, context); + contents = _json(data); const response: ModifyCertificateBasedAuthPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3739,10 +3618,9 @@ const de_ModifyCertificateBasedAuthPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3760,12 +3638,12 @@ export const de_ModifyClientPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyClientPropertiesResult(data, context); + contents = _json(data); const response: ModifyClientPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3792,10 +3670,9 @@ const de_ModifyClientPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3813,12 +3690,12 @@ export const de_ModifySamlPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifySamlPropertiesResult(data, context); + contents = _json(data); const response: ModifySamlPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3848,10 +3725,9 @@ const de_ModifySamlPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3869,12 +3745,12 @@ export const de_ModifySelfservicePermissionsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifySelfservicePermissionsResult(data, context); + contents = _json(data); const response: ModifySelfservicePermissionsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3901,10 +3777,9 @@ const de_ModifySelfservicePermissionsCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3922,12 +3797,12 @@ export const de_ModifyWorkspaceAccessPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyWorkspaceAccessPropertiesResult(data, context); + contents = _json(data); const response: ModifyWorkspaceAccessPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -3951,10 +3826,9 @@ const de_ModifyWorkspaceAccessPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3972,12 +3846,12 @@ export const de_ModifyWorkspaceCreationPropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyWorkspaceCreationPropertiesResult(data, context); + contents = _json(data); const response: ModifyWorkspaceCreationPropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4007,10 +3881,9 @@ const de_ModifyWorkspaceCreationPropertiesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4028,12 +3901,12 @@ export const de_ModifyWorkspacePropertiesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyWorkspacePropertiesResult(data, context); + contents = _json(data); const response: ModifyWorkspacePropertiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4072,10 +3945,9 @@ const de_ModifyWorkspacePropertiesCommandError = async ( throw await de_UnsupportedWorkspaceConfigurationExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4093,12 +3965,12 @@ export const de_ModifyWorkspaceStateCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_ModifyWorkspaceStateResult(data, context); + contents = _json(data); const response: ModifyWorkspaceStateCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4128,10 +4000,9 @@ const de_ModifyWorkspaceStateCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4149,12 +4020,12 @@ export const de_RebootWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RebootWorkspacesResult(data, context); + contents = _json(data); const response: RebootWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4175,10 +4046,9 @@ const de_RebootWorkspacesCommandError = async ( throw await de_OperationNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4196,12 +4066,12 @@ export const de_RebuildWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RebuildWorkspacesResult(data, context); + contents = _json(data); const response: RebuildWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4222,10 +4092,9 @@ const de_RebuildWorkspacesCommandError = async ( throw await de_OperationNotSupportedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4243,12 +4112,12 @@ export const de_RegisterWorkspaceDirectoryCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RegisterWorkspaceDirectoryResult(data, context); + contents = _json(data); const response: RegisterWorkspaceDirectoryCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4290,10 +4159,9 @@ const de_RegisterWorkspaceDirectoryCommandError = async ( throw await de_WorkspacesDefaultRoleNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4311,12 +4179,12 @@ export const de_RestoreWorkspaceCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RestoreWorkspaceResult(data, context); + contents = _json(data); const response: RestoreWorkspaceCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4346,10 +4214,9 @@ const de_RestoreWorkspaceCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4367,12 +4234,12 @@ export const de_RevokeIpRulesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RevokeIpRulesResult(data, context); + contents = _json(data); const response: RevokeIpRulesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4402,10 +4269,9 @@ const de_RevokeIpRulesCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4423,12 +4289,12 @@ export const de_StartWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StartWorkspacesResult(data, context); + contents = _json(data); const response: StartWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4444,10 +4310,9 @@ const de_StartWorkspacesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4464,12 +4329,12 @@ export const de_StopWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_StopWorkspacesResult(data, context); + contents = _json(data); const response: StopWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4485,10 +4350,9 @@ const de_StopWorkspacesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4505,12 +4369,12 @@ export const de_TerminateWorkspacesCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_TerminateWorkspacesResult(data, context); + contents = _json(data); const response: TerminateWorkspacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4526,10 +4390,9 @@ const de_TerminateWorkspacesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4546,12 +4409,12 @@ export const de_UpdateConnectClientAddInCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConnectClientAddInResult(data, context); + contents = _json(data); const response: UpdateConnectClientAddInCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4578,10 +4441,9 @@ const de_UpdateConnectClientAddInCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4599,12 +4461,12 @@ export const de_UpdateConnectionAliasPermissionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateConnectionAliasPermissionResult(data, context); + contents = _json(data); const response: UpdateConnectionAliasPermissionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4643,10 +4505,9 @@ const de_UpdateConnectionAliasPermissionCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4664,12 +4525,12 @@ export const de_UpdateRulesOfIpGroupCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateRulesOfIpGroupResult(data, context); + contents = _json(data); const response: UpdateRulesOfIpGroupCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4702,10 +4563,9 @@ const de_UpdateRulesOfIpGroupCommandError = async ( throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4723,12 +4583,12 @@ export const de_UpdateWorkspaceBundleCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWorkspaceBundleResult(data, context); + contents = _json(data); const response: UpdateWorkspaceBundleCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4761,10 +4621,9 @@ const de_UpdateWorkspaceBundleCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4782,12 +4641,12 @@ export const de_UpdateWorkspaceImagePermissionCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_UpdateWorkspaceImagePermissionResult(data, context); + contents = _json(data); const response: UpdateWorkspaceImagePermissionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -4820,10 +4679,9 @@ const de_UpdateWorkspaceImagePermissionCommandError = async ( throw await de_ResourceUnavailableExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -4837,7 +4695,7 @@ const de_AccessDeniedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_AccessDeniedException(body, context); + const deserialized: any = _json(body); const exception = new AccessDeniedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4853,7 +4711,7 @@ const de_InvalidParameterValuesExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidParameterValuesException(body, context); + const deserialized: any = _json(body); const exception = new InvalidParameterValuesException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4869,7 +4727,7 @@ const de_InvalidResourceStateExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidResourceStateException(body, context); + const deserialized: any = _json(body); const exception = new InvalidResourceStateException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4885,7 +4743,7 @@ const de_OperationInProgressExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationInProgressException(body, context); + const deserialized: any = _json(body); const exception = new OperationInProgressException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4901,7 +4759,7 @@ const de_OperationNotSupportedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_OperationNotSupportedException(body, context); + const deserialized: any = _json(body); const exception = new OperationNotSupportedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4917,7 +4775,7 @@ const de_ResourceAlreadyExistsExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAlreadyExistsException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAlreadyExistsException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4933,7 +4791,7 @@ const de_ResourceAssociatedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceAssociatedException(body, context); + const deserialized: any = _json(body); const exception = new ResourceAssociatedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4949,7 +4807,7 @@ const de_ResourceCreationFailedExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceCreationFailedException(body, context); + const deserialized: any = _json(body); const exception = new ResourceCreationFailedException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4965,7 +4823,7 @@ const de_ResourceLimitExceededExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceLimitExceededException(body, context); + const deserialized: any = _json(body); const exception = new ResourceLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4981,7 +4839,7 @@ const de_ResourceNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -4997,7 +4855,7 @@ const de_ResourceUnavailableExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ResourceUnavailableException(body, context); + const deserialized: any = _json(body); const exception = new ResourceUnavailableException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5013,7 +4871,7 @@ const de_UnsupportedNetworkConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedNetworkConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedNetworkConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5029,7 +4887,7 @@ const de_UnsupportedWorkspaceConfigurationExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_UnsupportedWorkspaceConfigurationException(body, context); + const deserialized: any = _json(body); const exception = new UnsupportedWorkspaceConfigurationException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5045,7 +4903,7 @@ const de_WorkspacesDefaultRoleNotFoundExceptionRes = async ( context: __SerdeContext ): Promise => { const body = parsedOutput.body; - const deserialized: any = de_WorkspacesDefaultRoleNotFoundException(body, context); + const deserialized: any = _json(body); const exception = new WorkspacesDefaultRoleNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -5053,237 +4911,47 @@ const de_WorkspacesDefaultRoleNotFoundExceptionRes = async ( return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_1ApplicationList - */ -const se_ApplicationList = (input: (Application | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ApplicationList omitted. -/** - * serializeAws_json1_1AssociateConnectionAliasRequest - */ -const se_AssociateConnectionAliasRequest = (input: AssociateConnectionAliasRequest, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_AssociateConnectionAliasRequest omitted. -/** - * serializeAws_json1_1AssociateIpGroupsRequest - */ -const se_AssociateIpGroupsRequest = (input: AssociateIpGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.GroupIds != null && { GroupIds: se_IpGroupIdList(input.GroupIds, context) }), - }; -}; +// se_AssociateIpGroupsRequest omitted. -/** - * serializeAws_json1_1AuthorizeIpRulesRequest - */ -const se_AuthorizeIpRulesRequest = (input: AuthorizeIpRulesRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.UserRules != null && { UserRules: se_IpRuleList(input.UserRules, context) }), - }; -}; +// se_AuthorizeIpRulesRequest omitted. -/** - * serializeAws_json1_1BundleIdList - */ -const se_BundleIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_BundleIdList omitted. -/** - * serializeAws_json1_1CertificateBasedAuthProperties - */ -const se_CertificateBasedAuthProperties = (input: CertificateBasedAuthProperties, context: __SerdeContext): any => { - return { - ...(input.CertificateAuthorityArn != null && { CertificateAuthorityArn: input.CertificateAuthorityArn }), - ...(input.Status != null && { Status: input.Status }), - }; -}; +// se_CertificateBasedAuthProperties omitted. -/** - * serializeAws_json1_1ClientDeviceTypeList - */ -const se_ClientDeviceTypeList = (input: (ClientDeviceType | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ClientDeviceTypeList omitted. -/** - * serializeAws_json1_1ClientProperties - */ -const se_ClientProperties = (input: ClientProperties, context: __SerdeContext): any => { - return { - ...(input.LogUploadEnabled != null && { LogUploadEnabled: input.LogUploadEnabled }), - ...(input.ReconnectEnabled != null && { ReconnectEnabled: input.ReconnectEnabled }), - }; -}; +// se_ClientProperties omitted. -/** - * serializeAws_json1_1ComputeType - */ -const se_ComputeType = (input: ComputeType, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - }; -}; +// se_ComputeType omitted. -/** - * serializeAws_json1_1ConnectionAliasIdList - */ -const se_ConnectionAliasIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ConnectionAliasIdList omitted. -/** - * serializeAws_json1_1ConnectionAliasPermission - */ -const se_ConnectionAliasPermission = (input: ConnectionAliasPermission, context: __SerdeContext): any => { - return { - ...(input.AllowAssociation != null && { AllowAssociation: input.AllowAssociation }), - ...(input.SharedAccountId != null && { SharedAccountId: input.SharedAccountId }), - }; -}; +// se_ConnectionAliasPermission omitted. -/** - * serializeAws_json1_1CopyWorkspaceImageRequest - */ -const se_CopyWorkspaceImageRequest = (input: CopyWorkspaceImageRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SourceImageId != null && { SourceImageId: input.SourceImageId }), - ...(input.SourceRegion != null && { SourceRegion: input.SourceRegion }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CopyWorkspaceImageRequest omitted. -/** - * serializeAws_json1_1CreateConnectClientAddInRequest - */ -const se_CreateConnectClientAddInRequest = (input: CreateConnectClientAddInRequest, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.URL != null && { URL: input.URL }), - }; -}; +// se_CreateConnectClientAddInRequest omitted. -/** - * serializeAws_json1_1CreateConnectionAliasRequest - */ -const se_CreateConnectionAliasRequest = (input: CreateConnectionAliasRequest, context: __SerdeContext): any => { - return { - ...(input.ConnectionString != null && { ConnectionString: input.ConnectionString }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateConnectionAliasRequest omitted. -/** - * serializeAws_json1_1CreateIpGroupRequest - */ -const se_CreateIpGroupRequest = (input: CreateIpGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupDesc != null && { GroupDesc: input.GroupDesc }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserRules != null && { UserRules: se_IpRuleList(input.UserRules, context) }), - }; -}; +// se_CreateIpGroupRequest omitted. -/** - * serializeAws_json1_1CreateStandbyWorkspacesRequest - */ -const se_CreateStandbyWorkspacesRequest = (input: CreateStandbyWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.PrimaryRegion != null && { PrimaryRegion: input.PrimaryRegion }), - ...(input.StandbyWorkspaces != null && { - StandbyWorkspaces: se_StandbyWorkspacesList(input.StandbyWorkspaces, context), - }), - }; -}; +// se_CreateStandbyWorkspacesRequest omitted. -/** - * serializeAws_json1_1CreateTagsRequest - */ -const se_CreateTagsRequest = (input: CreateTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateTagsRequest omitted. -/** - * serializeAws_json1_1CreateUpdatedWorkspaceImageRequest - */ -const se_CreateUpdatedWorkspaceImageRequest = ( - input: CreateUpdatedWorkspaceImageRequest, - context: __SerdeContext -): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.SourceImageId != null && { SourceImageId: input.SourceImageId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; +// se_CreateUpdatedWorkspaceImageRequest omitted. -/** - * serializeAws_json1_1CreateWorkspaceBundleRequest - */ -const se_CreateWorkspaceBundleRequest = (input: CreateWorkspaceBundleRequest, context: __SerdeContext): any => { - return { - ...(input.BundleDescription != null && { BundleDescription: input.BundleDescription }), - ...(input.BundleName != null && { BundleName: input.BundleName }), - ...(input.ComputeType != null && { ComputeType: se_ComputeType(input.ComputeType, context) }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.RootStorage != null && { RootStorage: se_RootStorage(input.RootStorage, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserStorage != null && { UserStorage: se_UserStorage(input.UserStorage, context) }), - }; -}; +// se_CreateWorkspaceBundleRequest omitted. -/** - * serializeAws_json1_1CreateWorkspaceImageRequest - */ -const se_CreateWorkspaceImageRequest = (input: CreateWorkspaceImageRequest, context: __SerdeContext): any => { - return { - ...(input.Description != null && { Description: input.Description }), - ...(input.Name != null && { Name: input.Name }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; +// se_CreateWorkspaceImageRequest omitted. -/** - * serializeAws_json1_1CreateWorkspacesRequest - */ -const se_CreateWorkspacesRequest = (input: CreateWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.Workspaces != null && { Workspaces: se_WorkspaceRequestList(input.Workspaces, context) }), - }; -}; +// se_CreateWorkspacesRequest omitted. /** * serializeAws_json1_1DefaultImportClientBrandingAttributes @@ -5292,2719 +4960,647 @@ const se_DefaultImportClientBrandingAttributes = ( input: DefaultImportClientBrandingAttributes, context: __SerdeContext ): any => { - return { - ...(input.ForgotPasswordLink != null && { ForgotPasswordLink: input.ForgotPasswordLink }), - ...(input.LoginMessage != null && { LoginMessage: se_LoginMessage(input.LoginMessage, context) }), - ...(input.Logo != null && { Logo: context.base64Encoder(input.Logo) }), - ...(input.SupportEmail != null && { SupportEmail: input.SupportEmail }), - ...(input.SupportLink != null && { SupportLink: input.SupportLink }), - }; + return take(input, { + ForgotPasswordLink: [], + LoginMessage: _json, + Logo: context.base64Encoder, + SupportEmail: [], + SupportLink: [], + }); }; -/** - * serializeAws_json1_1DeletableCertificateBasedAuthPropertiesList - */ -const se_DeletableCertificateBasedAuthPropertiesList = ( - input: (DeletableCertificateBasedAuthProperty | string)[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeletableCertificateBasedAuthPropertiesList omitted. -/** - * serializeAws_json1_1DeletableSamlPropertiesList - */ -const se_DeletableSamlPropertiesList = (input: (DeletableSamlProperty | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_DeletableSamlPropertiesList omitted. -/** - * serializeAws_json1_1DeleteClientBrandingRequest - */ -const se_DeleteClientBrandingRequest = (input: DeleteClientBrandingRequest, context: __SerdeContext): any => { - return { - ...(input.Platforms != null && { Platforms: se_ClientDeviceTypeList(input.Platforms, context) }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DeleteClientBrandingRequest omitted. -/** - * serializeAws_json1_1DeleteConnectClientAddInRequest - */ -const se_DeleteConnectClientAddInRequest = (input: DeleteConnectClientAddInRequest, context: __SerdeContext): any => { - return { - ...(input.AddInId != null && { AddInId: input.AddInId }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DeleteConnectClientAddInRequest omitted. -/** - * serializeAws_json1_1DeleteConnectionAliasRequest - */ -const se_DeleteConnectionAliasRequest = (input: DeleteConnectionAliasRequest, context: __SerdeContext): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - }; -}; +// se_DeleteConnectionAliasRequest omitted. -/** - * serializeAws_json1_1DeleteIpGroupRequest - */ -const se_DeleteIpGroupRequest = (input: DeleteIpGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - }; -}; +// se_DeleteIpGroupRequest omitted. -/** - * serializeAws_json1_1DeleteTagsRequest - */ -const se_DeleteTagsRequest = (input: DeleteTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }; -}; +// se_DeleteTagsRequest omitted. -/** - * serializeAws_json1_1DeleteWorkspaceBundleRequest - */ -const se_DeleteWorkspaceBundleRequest = (input: DeleteWorkspaceBundleRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - }; -}; +// se_DeleteWorkspaceBundleRequest omitted. -/** - * serializeAws_json1_1DeleteWorkspaceImageRequest - */ -const se_DeleteWorkspaceImageRequest = (input: DeleteWorkspaceImageRequest, context: __SerdeContext): any => { - return { - ...(input.ImageId != null && { ImageId: input.ImageId }), - }; -}; +// se_DeleteWorkspaceImageRequest omitted. -/** - * serializeAws_json1_1DeregisterWorkspaceDirectoryRequest - */ -const se_DeregisterWorkspaceDirectoryRequest = ( - input: DeregisterWorkspaceDirectoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - }; -}; +// se_DeregisterWorkspaceDirectoryRequest omitted. -/** - * serializeAws_json1_1DescribeAccountModificationsRequest - */ -const se_DescribeAccountModificationsRequest = ( - input: DescribeAccountModificationsRequest, - context: __SerdeContext -): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeAccountModificationsRequest omitted. -/** - * serializeAws_json1_1DescribeAccountRequest - */ -const se_DescribeAccountRequest = (input: DescribeAccountRequest, context: __SerdeContext): any => { - return {}; -}; +// se_DescribeAccountRequest omitted. -/** - * serializeAws_json1_1DescribeClientBrandingRequest - */ -const se_DescribeClientBrandingRequest = (input: DescribeClientBrandingRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DescribeClientBrandingRequest omitted. -/** - * serializeAws_json1_1DescribeClientPropertiesRequest - */ -const se_DescribeClientPropertiesRequest = (input: DescribeClientPropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceIds != null && { ResourceIds: se_ResourceIdList(input.ResourceIds, context) }), - }; -}; +// se_DescribeClientPropertiesRequest omitted. -/** - * serializeAws_json1_1DescribeConnectClientAddInsRequest - */ -const se_DescribeConnectClientAddInsRequest = ( - input: DescribeConnectClientAddInsRequest, - context: __SerdeContext -): any => { - return { - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DescribeConnectClientAddInsRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionAliasesRequest - */ -const se_DescribeConnectionAliasesRequest = (input: DescribeConnectionAliasesRequest, context: __SerdeContext): any => { - return { - ...(input.AliasIds != null && { AliasIds: se_ConnectionAliasIdList(input.AliasIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DescribeConnectionAliasesRequest omitted. -/** - * serializeAws_json1_1DescribeConnectionAliasPermissionsRequest - */ -const se_DescribeConnectionAliasPermissionsRequest = ( - input: DescribeConnectionAliasPermissionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeConnectionAliasPermissionsRequest omitted. -/** - * serializeAws_json1_1DescribeIpGroupsRequest - */ -const se_DescribeIpGroupsRequest = (input: DescribeIpGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.GroupIds != null && { GroupIds: se_IpGroupIdList(input.GroupIds, context) }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeIpGroupsRequest omitted. -/** - * serializeAws_json1_1DescribeTagsRequest - */ -const se_DescribeTagsRequest = (input: DescribeTagsRequest, context: __SerdeContext): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; +// se_DescribeTagsRequest omitted. -/** - * serializeAws_json1_1DescribeWorkspaceBundlesRequest - */ -const se_DescribeWorkspaceBundlesRequest = (input: DescribeWorkspaceBundlesRequest, context: __SerdeContext): any => { - return { - ...(input.BundleIds != null && { BundleIds: se_BundleIdList(input.BundleIds, context) }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Owner != null && { Owner: input.Owner }), - }; -}; +// se_DescribeWorkspaceBundlesRequest omitted. -/** - * serializeAws_json1_1DescribeWorkspaceDirectoriesRequest - */ -const se_DescribeWorkspaceDirectoriesRequest = ( - input: DescribeWorkspaceDirectoriesRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryIds != null && { DirectoryIds: se_DirectoryIdList(input.DirectoryIds, context) }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeWorkspaceDirectoriesRequest omitted. -/** - * serializeAws_json1_1DescribeWorkspaceImagePermissionsRequest - */ -const se_DescribeWorkspaceImagePermissionsRequest = ( - input: DescribeWorkspaceImagePermissionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; +// se_DescribeWorkspaceImagePermissionsRequest omitted. + +// se_DescribeWorkspaceImagesRequest omitted. + +// se_DescribeWorkspacesConnectionStatusRequest omitted. + +// se_DescribeWorkspaceSnapshotsRequest omitted. + +// se_DescribeWorkspacesRequest omitted. + +// se_DirectoryIdList omitted. + +// se_DisassociateConnectionAliasRequest omitted. + +// se_DisassociateIpGroupsRequest omitted. /** - * serializeAws_json1_1DescribeWorkspaceImagesRequest + * serializeAws_json1_1ImportClientBrandingRequest */ -const se_DescribeWorkspaceImagesRequest = (input: DescribeWorkspaceImagesRequest, context: __SerdeContext): any => { - return { - ...(input.ImageIds != null && { ImageIds: se_WorkspaceImageIdList(input.ImageIds, context) }), - ...(input.ImageType != null && { ImageType: input.ImageType }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; +const se_ImportClientBrandingRequest = (input: ImportClientBrandingRequest, context: __SerdeContext): any => { + return take(input, { + DeviceTypeAndroid: (_) => se_DefaultImportClientBrandingAttributes(_, context), + DeviceTypeIos: (_) => se_IosImportClientBrandingAttributes(_, context), + DeviceTypeLinux: (_) => se_DefaultImportClientBrandingAttributes(_, context), + DeviceTypeOsx: (_) => se_DefaultImportClientBrandingAttributes(_, context), + DeviceTypeWeb: (_) => se_DefaultImportClientBrandingAttributes(_, context), + DeviceTypeWindows: (_) => se_DefaultImportClientBrandingAttributes(_, context), + ResourceId: [], + }); }; +// se_ImportWorkspaceImageRequest omitted. + /** - * serializeAws_json1_1DescribeWorkspacesConnectionStatusRequest + * serializeAws_json1_1IosImportClientBrandingAttributes */ -const se_DescribeWorkspacesConnectionStatusRequest = ( - input: DescribeWorkspacesConnectionStatusRequest, +const se_IosImportClientBrandingAttributes = ( + input: IosImportClientBrandingAttributes, context: __SerdeContext ): any => { - return { - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.WorkspaceIds != null && { WorkspaceIds: se_WorkspaceIdList(input.WorkspaceIds, context) }), - }; + return take(input, { + ForgotPasswordLink: [], + LoginMessage: _json, + Logo: context.base64Encoder, + Logo2x: context.base64Encoder, + Logo3x: context.base64Encoder, + SupportEmail: [], + SupportLink: [], + }); }; -/** - * serializeAws_json1_1DescribeWorkspaceSnapshotsRequest - */ -const se_DescribeWorkspaceSnapshotsRequest = ( - input: DescribeWorkspaceSnapshotsRequest, - context: __SerdeContext -): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1DescribeWorkspacesRequest - */ -const se_DescribeWorkspacesRequest = (input: DescribeWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.Limit != null && { Limit: input.Limit }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.UserName != null && { UserName: input.UserName }), - ...(input.WorkspaceIds != null && { WorkspaceIds: se_WorkspaceIdList(input.WorkspaceIds, context) }), - }; -}; - -/** - * serializeAws_json1_1DirectoryIdList - */ -const se_DirectoryIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1DisassociateConnectionAliasRequest - */ -const se_DisassociateConnectionAliasRequest = ( - input: DisassociateConnectionAliasRequest, - context: __SerdeContext -): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - }; -}; - -/** - * serializeAws_json1_1DisassociateIpGroupsRequest - */ -const se_DisassociateIpGroupsRequest = (input: DisassociateIpGroupsRequest, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.GroupIds != null && { GroupIds: se_IpGroupIdList(input.GroupIds, context) }), - }; -}; - -/** - * serializeAws_json1_1ImportClientBrandingRequest - */ -const se_ImportClientBrandingRequest = (input: ImportClientBrandingRequest, context: __SerdeContext): any => { - return { - ...(input.DeviceTypeAndroid != null && { - DeviceTypeAndroid: se_DefaultImportClientBrandingAttributes(input.DeviceTypeAndroid, context), - }), - ...(input.DeviceTypeIos != null && { - DeviceTypeIos: se_IosImportClientBrandingAttributes(input.DeviceTypeIos, context), - }), - ...(input.DeviceTypeLinux != null && { - DeviceTypeLinux: se_DefaultImportClientBrandingAttributes(input.DeviceTypeLinux, context), - }), - ...(input.DeviceTypeOsx != null && { - DeviceTypeOsx: se_DefaultImportClientBrandingAttributes(input.DeviceTypeOsx, context), - }), - ...(input.DeviceTypeWeb != null && { - DeviceTypeWeb: se_DefaultImportClientBrandingAttributes(input.DeviceTypeWeb, context), - }), - ...(input.DeviceTypeWindows != null && { - DeviceTypeWindows: se_DefaultImportClientBrandingAttributes(input.DeviceTypeWindows, context), - }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; - -/** - * serializeAws_json1_1ImportWorkspaceImageRequest - */ -const se_ImportWorkspaceImageRequest = (input: ImportWorkspaceImageRequest, context: __SerdeContext): any => { - return { - ...(input.Applications != null && { Applications: se_ApplicationList(input.Applications, context) }), - ...(input.Ec2ImageId != null && { Ec2ImageId: input.Ec2ImageId }), - ...(input.ImageDescription != null && { ImageDescription: input.ImageDescription }), - ...(input.ImageName != null && { ImageName: input.ImageName }), - ...(input.IngestionProcess != null && { IngestionProcess: input.IngestionProcess }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }; -}; - -/** - * serializeAws_json1_1IosImportClientBrandingAttributes - */ -const se_IosImportClientBrandingAttributes = ( - input: IosImportClientBrandingAttributes, - context: __SerdeContext -): any => { - return { - ...(input.ForgotPasswordLink != null && { ForgotPasswordLink: input.ForgotPasswordLink }), - ...(input.LoginMessage != null && { LoginMessage: se_LoginMessage(input.LoginMessage, context) }), - ...(input.Logo != null && { Logo: context.base64Encoder(input.Logo) }), - ...(input.Logo2x != null && { Logo2x: context.base64Encoder(input.Logo2x) }), - ...(input.Logo3x != null && { Logo3x: context.base64Encoder(input.Logo3x) }), - ...(input.SupportEmail != null && { SupportEmail: input.SupportEmail }), - ...(input.SupportLink != null && { SupportLink: input.SupportLink }), - }; -}; - -/** - * serializeAws_json1_1IpGroupIdList - */ -const se_IpGroupIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1IpRevokedRuleList - */ -const se_IpRevokedRuleList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1IpRuleItem - */ -const se_IpRuleItem = (input: IpRuleItem, context: __SerdeContext): any => { - return { - ...(input.ipRule != null && { ipRule: input.ipRule }), - ...(input.ruleDesc != null && { ruleDesc: input.ruleDesc }), - }; -}; - -/** - * serializeAws_json1_1IpRuleList - */ -const se_IpRuleList = (input: IpRuleItem[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_IpRuleItem(entry, context); - }); -}; - -/** - * serializeAws_json1_1ListAvailableManagementCidrRangesRequest - */ -const se_ListAvailableManagementCidrRangesRequest = ( - input: ListAvailableManagementCidrRangesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ManagementCidrRangeConstraint != null && { - ManagementCidrRangeConstraint: input.ManagementCidrRangeConstraint, - }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }; -}; - -/** - * serializeAws_json1_1LoginMessage - */ -const se_LoginMessage = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_json1_1MigrateWorkspaceRequest - */ -const se_MigrateWorkspaceRequest = (input: MigrateWorkspaceRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.SourceWorkspaceId != null && { SourceWorkspaceId: input.SourceWorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1ModifyAccountRequest - */ -const se_ModifyAccountRequest = (input: ModifyAccountRequest, context: __SerdeContext): any => { - return { - ...(input.DedicatedTenancyManagementCidrRange != null && { - DedicatedTenancyManagementCidrRange: input.DedicatedTenancyManagementCidrRange, - }), - ...(input.DedicatedTenancySupport != null && { DedicatedTenancySupport: input.DedicatedTenancySupport }), - }; -}; - -/** - * serializeAws_json1_1ModifyCertificateBasedAuthPropertiesRequest - */ -const se_ModifyCertificateBasedAuthPropertiesRequest = ( - input: ModifyCertificateBasedAuthPropertiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.CertificateBasedAuthProperties != null && { - CertificateBasedAuthProperties: se_CertificateBasedAuthProperties(input.CertificateBasedAuthProperties, context), - }), - ...(input.PropertiesToDelete != null && { - PropertiesToDelete: se_DeletableCertificateBasedAuthPropertiesList(input.PropertiesToDelete, context), - }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; - -/** - * serializeAws_json1_1ModifyClientPropertiesRequest - */ -const se_ModifyClientPropertiesRequest = (input: ModifyClientPropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.ClientProperties != null && { ClientProperties: se_ClientProperties(input.ClientProperties, context) }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - }; -}; - -/** - * serializeAws_json1_1ModifySamlPropertiesRequest - */ -const se_ModifySamlPropertiesRequest = (input: ModifySamlPropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.PropertiesToDelete != null && { - PropertiesToDelete: se_DeletableSamlPropertiesList(input.PropertiesToDelete, context), - }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.SamlProperties != null && { SamlProperties: se_SamlProperties(input.SamlProperties, context) }), - }; -}; - -/** - * serializeAws_json1_1ModifySelfservicePermissionsRequest - */ -const se_ModifySelfservicePermissionsRequest = ( - input: ModifySelfservicePermissionsRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.SelfservicePermissions != null && { - SelfservicePermissions: se_SelfservicePermissions(input.SelfservicePermissions, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModifyWorkspaceAccessPropertiesRequest - */ -const se_ModifyWorkspaceAccessPropertiesRequest = ( - input: ModifyWorkspaceAccessPropertiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.WorkspaceAccessProperties != null && { - WorkspaceAccessProperties: se_WorkspaceAccessProperties(input.WorkspaceAccessProperties, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModifyWorkspaceCreationPropertiesRequest - */ -const se_ModifyWorkspaceCreationPropertiesRequest = ( - input: ModifyWorkspaceCreationPropertiesRequest, - context: __SerdeContext -): any => { - return { - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.WorkspaceCreationProperties != null && { - WorkspaceCreationProperties: se_WorkspaceCreationProperties(input.WorkspaceCreationProperties, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModifyWorkspacePropertiesRequest - */ -const se_ModifyWorkspacePropertiesRequest = (input: ModifyWorkspacePropertiesRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - ...(input.WorkspaceProperties != null && { - WorkspaceProperties: se_WorkspaceProperties(input.WorkspaceProperties, context), - }), - }; -}; - -/** - * serializeAws_json1_1ModifyWorkspaceStateRequest - */ -const se_ModifyWorkspaceStateRequest = (input: ModifyWorkspaceStateRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - ...(input.WorkspaceState != null && { WorkspaceState: input.WorkspaceState }), - }; -}; - -/** - * serializeAws_json1_1ProtocolList - */ -const se_ProtocolList = (input: (Protocol | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RebootRequest - */ -const se_RebootRequest = (input: RebootRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1RebootWorkspaceRequests - */ -const se_RebootWorkspaceRequests = (input: RebootRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RebootRequest(entry, context); - }); -}; - -/** - * serializeAws_json1_1RebootWorkspacesRequest - */ -const se_RebootWorkspacesRequest = (input: RebootWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.RebootWorkspaceRequests != null && { - RebootWorkspaceRequests: se_RebootWorkspaceRequests(input.RebootWorkspaceRequests, context), - }), - }; -}; - -/** - * serializeAws_json1_1RebuildRequest - */ -const se_RebuildRequest = (input: RebuildRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1RebuildWorkspaceRequests - */ -const se_RebuildWorkspaceRequests = (input: RebuildRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_RebuildRequest(entry, context); - }); -}; - -/** - * serializeAws_json1_1RebuildWorkspacesRequest - */ -const se_RebuildWorkspacesRequest = (input: RebuildWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.RebuildWorkspaceRequests != null && { - RebuildWorkspaceRequests: se_RebuildWorkspaceRequests(input.RebuildWorkspaceRequests, context), - }), - }; -}; - -/** - * serializeAws_json1_1RegisterWorkspaceDirectoryRequest - */ -const se_RegisterWorkspaceDirectoryRequest = ( - input: RegisterWorkspaceDirectoryRequest, - context: __SerdeContext -): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.EnableSelfService != null && { EnableSelfService: input.EnableSelfService }), - ...(input.EnableWorkDocs != null && { EnableWorkDocs: input.EnableWorkDocs }), - ...(input.SubnetIds != null && { SubnetIds: se_SubnetIds(input.SubnetIds, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.Tenancy != null && { Tenancy: input.Tenancy }), - }; -}; - -/** - * serializeAws_json1_1ResourceIdList - */ -const se_ResourceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1RestoreWorkspaceRequest - */ -const se_RestoreWorkspaceRequest = (input: RestoreWorkspaceRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1RevokeIpRulesRequest - */ -const se_RevokeIpRulesRequest = (input: RevokeIpRulesRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.UserRules != null && { UserRules: se_IpRevokedRuleList(input.UserRules, context) }), - }; -}; - -/** - * serializeAws_json1_1RootStorage - */ -const se_RootStorage = (input: RootStorage, context: __SerdeContext): any => { - return { - ...(input.Capacity != null && { Capacity: input.Capacity }), - }; -}; - -/** - * serializeAws_json1_1SamlProperties - */ -const se_SamlProperties = (input: SamlProperties, context: __SerdeContext): any => { - return { - ...(input.RelayStateParameterName != null && { RelayStateParameterName: input.RelayStateParameterName }), - ...(input.Status != null && { Status: input.Status }), - ...(input.UserAccessUrl != null && { UserAccessUrl: input.UserAccessUrl }), - }; -}; - -/** - * serializeAws_json1_1SelfservicePermissions - */ -const se_SelfservicePermissions = (input: SelfservicePermissions, context: __SerdeContext): any => { - return { - ...(input.ChangeComputeType != null && { ChangeComputeType: input.ChangeComputeType }), - ...(input.IncreaseVolumeSize != null && { IncreaseVolumeSize: input.IncreaseVolumeSize }), - ...(input.RebuildWorkspace != null && { RebuildWorkspace: input.RebuildWorkspace }), - ...(input.RestartWorkspace != null && { RestartWorkspace: input.RestartWorkspace }), - ...(input.SwitchRunningMode != null && { SwitchRunningMode: input.SwitchRunningMode }), - }; -}; - -/** - * serializeAws_json1_1StandbyWorkspace - */ -const se_StandbyWorkspace = (input: StandbyWorkspace, context: __SerdeContext): any => { - return { - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.PrimaryWorkspaceId != null && { PrimaryWorkspaceId: input.PrimaryWorkspaceId }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.VolumeEncryptionKey != null && { VolumeEncryptionKey: input.VolumeEncryptionKey }), - }; -}; - -/** - * serializeAws_json1_1StandbyWorkspacesList - */ -const se_StandbyWorkspacesList = (input: StandbyWorkspace[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StandbyWorkspace(entry, context); - }); -}; - -/** - * serializeAws_json1_1StartRequest - */ -const se_StartRequest = (input: StartRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1StartWorkspaceRequests - */ -const se_StartWorkspaceRequests = (input: StartRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StartRequest(entry, context); - }); -}; - -/** - * serializeAws_json1_1StartWorkspacesRequest - */ -const se_StartWorkspacesRequest = (input: StartWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.StartWorkspaceRequests != null && { - StartWorkspaceRequests: se_StartWorkspaceRequests(input.StartWorkspaceRequests, context), - }), - }; -}; - -/** - * serializeAws_json1_1StopRequest - */ -const se_StopRequest = (input: StopRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1StopWorkspaceRequests - */ -const se_StopWorkspaceRequests = (input: StopRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StopRequest(entry, context); - }); -}; - -/** - * serializeAws_json1_1StopWorkspacesRequest - */ -const se_StopWorkspacesRequest = (input: StopWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.StopWorkspaceRequests != null && { - StopWorkspaceRequests: se_StopWorkspaceRequests(input.StopWorkspaceRequests, context), - }), - }; -}; - -/** - * serializeAws_json1_1SubnetIds - */ -const se_SubnetIds = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; - -/** - * serializeAws_json1_1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; - -/** - * serializeAws_json1_1TerminateRequest - */ -const se_TerminateRequest = (input: TerminateRequest, context: __SerdeContext): any => { - return { - ...(input.WorkspaceId != null && { WorkspaceId: input.WorkspaceId }), - }; -}; - -/** - * serializeAws_json1_1TerminateWorkspaceRequests - */ -const se_TerminateWorkspaceRequests = (input: TerminateRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_TerminateRequest(entry, context); - }); -}; - -/** - * serializeAws_json1_1TerminateWorkspacesRequest - */ -const se_TerminateWorkspacesRequest = (input: TerminateWorkspacesRequest, context: __SerdeContext): any => { - return { - ...(input.TerminateWorkspaceRequests != null && { - TerminateWorkspaceRequests: se_TerminateWorkspaceRequests(input.TerminateWorkspaceRequests, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectClientAddInRequest - */ -const se_UpdateConnectClientAddInRequest = (input: UpdateConnectClientAddInRequest, context: __SerdeContext): any => { - return { - ...(input.AddInId != null && { AddInId: input.AddInId }), - ...(input.Name != null && { Name: input.Name }), - ...(input.ResourceId != null && { ResourceId: input.ResourceId }), - ...(input.URL != null && { URL: input.URL }), - }; -}; - -/** - * serializeAws_json1_1UpdateConnectionAliasPermissionRequest - */ -const se_UpdateConnectionAliasPermissionRequest = ( - input: UpdateConnectionAliasPermissionRequest, - context: __SerdeContext -): any => { - return { - ...(input.AliasId != null && { AliasId: input.AliasId }), - ...(input.ConnectionAliasPermission != null && { - ConnectionAliasPermission: se_ConnectionAliasPermission(input.ConnectionAliasPermission, context), - }), - }; -}; - -/** - * serializeAws_json1_1UpdateRulesOfIpGroupRequest - */ -const se_UpdateRulesOfIpGroupRequest = (input: UpdateRulesOfIpGroupRequest, context: __SerdeContext): any => { - return { - ...(input.GroupId != null && { GroupId: input.GroupId }), - ...(input.UserRules != null && { UserRules: se_IpRuleList(input.UserRules, context) }), - }; -}; - -/** - * serializeAws_json1_1UpdateWorkspaceBundleRequest - */ -const se_UpdateWorkspaceBundleRequest = (input: UpdateWorkspaceBundleRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - }; -}; - -/** - * serializeAws_json1_1UpdateWorkspaceImagePermissionRequest - */ -const se_UpdateWorkspaceImagePermissionRequest = ( - input: UpdateWorkspaceImagePermissionRequest, - context: __SerdeContext -): any => { - return { - ...(input.AllowCopyImage != null && { AllowCopyImage: input.AllowCopyImage }), - ...(input.ImageId != null && { ImageId: input.ImageId }), - ...(input.SharedAccountId != null && { SharedAccountId: input.SharedAccountId }), - }; -}; - -/** - * serializeAws_json1_1UserStorage - */ -const se_UserStorage = (input: UserStorage, context: __SerdeContext): any => { - return { - ...(input.Capacity != null && { Capacity: input.Capacity }), - }; -}; - -/** - * serializeAws_json1_1WorkspaceAccessProperties - */ -const se_WorkspaceAccessProperties = (input: WorkspaceAccessProperties, context: __SerdeContext): any => { - return { - ...(input.DeviceTypeAndroid != null && { DeviceTypeAndroid: input.DeviceTypeAndroid }), - ...(input.DeviceTypeChromeOs != null && { DeviceTypeChromeOs: input.DeviceTypeChromeOs }), - ...(input.DeviceTypeIos != null && { DeviceTypeIos: input.DeviceTypeIos }), - ...(input.DeviceTypeLinux != null && { DeviceTypeLinux: input.DeviceTypeLinux }), - ...(input.DeviceTypeOsx != null && { DeviceTypeOsx: input.DeviceTypeOsx }), - ...(input.DeviceTypeWeb != null && { DeviceTypeWeb: input.DeviceTypeWeb }), - ...(input.DeviceTypeWindows != null && { DeviceTypeWindows: input.DeviceTypeWindows }), - ...(input.DeviceTypeZeroClient != null && { DeviceTypeZeroClient: input.DeviceTypeZeroClient }), - }; -}; - -/** - * serializeAws_json1_1WorkspaceCreationProperties - */ -const se_WorkspaceCreationProperties = (input: WorkspaceCreationProperties, context: __SerdeContext): any => { - return { - ...(input.CustomSecurityGroupId != null && { CustomSecurityGroupId: input.CustomSecurityGroupId }), - ...(input.DefaultOu != null && { DefaultOu: input.DefaultOu }), - ...(input.EnableInternetAccess != null && { EnableInternetAccess: input.EnableInternetAccess }), - ...(input.EnableMaintenanceMode != null && { EnableMaintenanceMode: input.EnableMaintenanceMode }), - ...(input.EnableWorkDocs != null && { EnableWorkDocs: input.EnableWorkDocs }), - ...(input.UserEnabledAsLocalAdministrator != null && { - UserEnabledAsLocalAdministrator: input.UserEnabledAsLocalAdministrator, - }), - }; -}; - -/** - * serializeAws_json1_1WorkspaceIdList - */ -const se_WorkspaceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkspaceImageIdList - */ -const se_WorkspaceImageIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_json1_1WorkspaceProperties - */ -const se_WorkspaceProperties = (input: WorkspaceProperties, context: __SerdeContext): any => { - return { - ...(input.ComputeTypeName != null && { ComputeTypeName: input.ComputeTypeName }), - ...(input.Protocols != null && { Protocols: se_ProtocolList(input.Protocols, context) }), - ...(input.RootVolumeSizeGib != null && { RootVolumeSizeGib: input.RootVolumeSizeGib }), - ...(input.RunningMode != null && { RunningMode: input.RunningMode }), - ...(input.RunningModeAutoStopTimeoutInMinutes != null && { - RunningModeAutoStopTimeoutInMinutes: input.RunningModeAutoStopTimeoutInMinutes, - }), - ...(input.UserVolumeSizeGib != null && { UserVolumeSizeGib: input.UserVolumeSizeGib }), - }; -}; - -/** - * serializeAws_json1_1WorkspaceRequest - */ -const se_WorkspaceRequest = (input: WorkspaceRequest, context: __SerdeContext): any => { - return { - ...(input.BundleId != null && { BundleId: input.BundleId }), - ...(input.DirectoryId != null && { DirectoryId: input.DirectoryId }), - ...(input.RootVolumeEncryptionEnabled != null && { - RootVolumeEncryptionEnabled: input.RootVolumeEncryptionEnabled, - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - ...(input.UserName != null && { UserName: input.UserName }), - ...(input.UserVolumeEncryptionEnabled != null && { - UserVolumeEncryptionEnabled: input.UserVolumeEncryptionEnabled, - }), - ...(input.VolumeEncryptionKey != null && { VolumeEncryptionKey: input.VolumeEncryptionKey }), - ...(input.WorkspaceProperties != null && { - WorkspaceProperties: se_WorkspaceProperties(input.WorkspaceProperties, context), - }), - }; -}; - -/** - * serializeAws_json1_1WorkspaceRequestList - */ -const se_WorkspaceRequestList = (input: WorkspaceRequest[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_WorkspaceRequest(entry, context); - }); -}; - -/** - * deserializeAws_json1_1AccessDeniedException - */ -const de_AccessDeniedException = (output: any, context: __SerdeContext): AccessDeniedException => { - return { - message: __expectString(output.message), - } as any; -}; - -/** - * deserializeAws_json1_1AccountModification - */ -const de_AccountModification = (output: any, context: __SerdeContext): AccountModification => { - return { - DedicatedTenancyManagementCidrRange: __expectString(output.DedicatedTenancyManagementCidrRange), - DedicatedTenancySupport: __expectString(output.DedicatedTenancySupport), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ModificationState: __expectString(output.ModificationState), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1AccountModificationList - */ -const de_AccountModificationList = (output: any, context: __SerdeContext): AccountModification[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AccountModification(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1AssociateConnectionAliasResult - */ -const de_AssociateConnectionAliasResult = (output: any, context: __SerdeContext): AssociateConnectionAliasResult => { - return { - ConnectionIdentifier: __expectString(output.ConnectionIdentifier), - } as any; -}; - -/** - * deserializeAws_json1_1AssociateIpGroupsResult - */ -const de_AssociateIpGroupsResult = (output: any, context: __SerdeContext): AssociateIpGroupsResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1AuthorizeIpRulesResult - */ -const de_AuthorizeIpRulesResult = (output: any, context: __SerdeContext): AuthorizeIpRulesResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1BundleList - */ -const de_BundleList = (output: any, context: __SerdeContext): WorkspaceBundle[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkspaceBundle(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CertificateBasedAuthProperties - */ -const de_CertificateBasedAuthProperties = (output: any, context: __SerdeContext): CertificateBasedAuthProperties => { - return { - CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn), - Status: __expectString(output.Status), - } as any; -}; - -/** - * deserializeAws_json1_1ClientProperties - */ -const de_ClientProperties = (output: any, context: __SerdeContext): ClientProperties => { - return { - LogUploadEnabled: __expectString(output.LogUploadEnabled), - ReconnectEnabled: __expectString(output.ReconnectEnabled), - } as any; -}; - -/** - * deserializeAws_json1_1ClientPropertiesList - */ -const de_ClientPropertiesList = (output: any, context: __SerdeContext): ClientPropertiesResult[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ClientPropertiesResult(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ClientPropertiesResult - */ -const de_ClientPropertiesResult = (output: any, context: __SerdeContext): ClientPropertiesResult => { - return { - ClientProperties: - output.ClientProperties != null ? de_ClientProperties(output.ClientProperties, context) : undefined, - ResourceId: __expectString(output.ResourceId), - } as any; -}; - -/** - * deserializeAws_json1_1ComputeType - */ -const de_ComputeType = (output: any, context: __SerdeContext): ComputeType => { - return { - Name: __expectString(output.Name), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectClientAddIn - */ -const de_ConnectClientAddIn = (output: any, context: __SerdeContext): ConnectClientAddIn => { - return { - AddInId: __expectString(output.AddInId), - Name: __expectString(output.Name), - ResourceId: __expectString(output.ResourceId), - URL: __expectString(output.URL), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectClientAddInList - */ -const de_ConnectClientAddInList = (output: any, context: __SerdeContext): ConnectClientAddIn[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectClientAddIn(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionAlias - */ -const de_ConnectionAlias = (output: any, context: __SerdeContext): ConnectionAlias => { - return { - AliasId: __expectString(output.AliasId), - Associations: - output.Associations != null ? de_ConnectionAliasAssociationList(output.Associations, context) : undefined, - ConnectionString: __expectString(output.ConnectionString), - OwnerAccountId: __expectString(output.OwnerAccountId), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionAliasAssociation - */ -const de_ConnectionAliasAssociation = (output: any, context: __SerdeContext): ConnectionAliasAssociation => { - return { - AssociatedAccountId: __expectString(output.AssociatedAccountId), - AssociationStatus: __expectString(output.AssociationStatus), - ConnectionIdentifier: __expectString(output.ConnectionIdentifier), - ResourceId: __expectString(output.ResourceId), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionAliasAssociationList - */ -const de_ConnectionAliasAssociationList = (output: any, context: __SerdeContext): ConnectionAliasAssociation[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionAliasAssociation(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionAliasList - */ -const de_ConnectionAliasList = (output: any, context: __SerdeContext): ConnectionAlias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionAlias(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1ConnectionAliasPermission - */ -const de_ConnectionAliasPermission = (output: any, context: __SerdeContext): ConnectionAliasPermission => { - return { - AllowAssociation: __expectBoolean(output.AllowAssociation), - SharedAccountId: __expectString(output.SharedAccountId), - } as any; -}; - -/** - * deserializeAws_json1_1ConnectionAliasPermissions - */ -const de_ConnectionAliasPermissions = (output: any, context: __SerdeContext): ConnectionAliasPermission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ConnectionAliasPermission(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1CopyWorkspaceImageResult - */ -const de_CopyWorkspaceImageResult = (output: any, context: __SerdeContext): CopyWorkspaceImageResult => { - return { - ImageId: __expectString(output.ImageId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateConnectClientAddInResult - */ -const de_CreateConnectClientAddInResult = (output: any, context: __SerdeContext): CreateConnectClientAddInResult => { - return { - AddInId: __expectString(output.AddInId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateConnectionAliasResult - */ -const de_CreateConnectionAliasResult = (output: any, context: __SerdeContext): CreateConnectionAliasResult => { - return { - AliasId: __expectString(output.AliasId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateIpGroupResult - */ -const de_CreateIpGroupResult = (output: any, context: __SerdeContext): CreateIpGroupResult => { - return { - GroupId: __expectString(output.GroupId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateStandbyWorkspacesResult - */ -const de_CreateStandbyWorkspacesResult = (output: any, context: __SerdeContext): CreateStandbyWorkspacesResult => { - return { - FailedStandbyRequests: - output.FailedStandbyRequests != null - ? de_FailedCreateStandbyWorkspacesRequestList(output.FailedStandbyRequests, context) - : undefined, - PendingStandbyRequests: - output.PendingStandbyRequests != null - ? de_PendingCreateStandbyWorkspacesRequestList(output.PendingStandbyRequests, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateTagsResult - */ -const de_CreateTagsResult = (output: any, context: __SerdeContext): CreateTagsResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1CreateUpdatedWorkspaceImageResult - */ -const de_CreateUpdatedWorkspaceImageResult = ( - output: any, - context: __SerdeContext -): CreateUpdatedWorkspaceImageResult => { - return { - ImageId: __expectString(output.ImageId), - } as any; -}; - -/** - * deserializeAws_json1_1CreateWorkspaceBundleResult - */ -const de_CreateWorkspaceBundleResult = (output: any, context: __SerdeContext): CreateWorkspaceBundleResult => { - return { - WorkspaceBundle: output.WorkspaceBundle != null ? de_WorkspaceBundle(output.WorkspaceBundle, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1CreateWorkspaceImageResult - */ -const de_CreateWorkspaceImageResult = (output: any, context: __SerdeContext): CreateWorkspaceImageResult => { - return { - Created: - output.Created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Created))) : undefined, - Description: __expectString(output.Description), - ImageId: __expectString(output.ImageId), - Name: __expectString(output.Name), - OperatingSystem: output.OperatingSystem != null ? de_OperatingSystem(output.OperatingSystem, context) : undefined, - OwnerAccountId: __expectString(output.OwnerAccountId), - RequiredTenancy: __expectString(output.RequiredTenancy), - State: __expectString(output.State), - } as any; -}; - -/** - * deserializeAws_json1_1CreateWorkspacesResult - */ -const de_CreateWorkspacesResult = (output: any, context: __SerdeContext): CreateWorkspacesResult => { - return { - FailedRequests: - output.FailedRequests != null ? de_FailedCreateWorkspaceRequests(output.FailedRequests, context) : undefined, - PendingRequests: output.PendingRequests != null ? de_WorkspaceList(output.PendingRequests, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DedicatedTenancyCidrRangeList - */ -const de_DedicatedTenancyCidrRangeList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DefaultClientBrandingAttributes - */ -const de_DefaultClientBrandingAttributes = (output: any, context: __SerdeContext): DefaultClientBrandingAttributes => { - return { - ForgotPasswordLink: __expectString(output.ForgotPasswordLink), - LoginMessage: output.LoginMessage != null ? de_LoginMessage(output.LoginMessage, context) : undefined, - LogoUrl: __expectString(output.LogoUrl), - SupportEmail: __expectString(output.SupportEmail), - SupportLink: __expectString(output.SupportLink), - } as any; -}; - -/** - * deserializeAws_json1_1DefaultWorkspaceCreationProperties - */ -const de_DefaultWorkspaceCreationProperties = ( - output: any, - context: __SerdeContext -): DefaultWorkspaceCreationProperties => { - return { - CustomSecurityGroupId: __expectString(output.CustomSecurityGroupId), - DefaultOu: __expectString(output.DefaultOu), - EnableInternetAccess: __expectBoolean(output.EnableInternetAccess), - EnableMaintenanceMode: __expectBoolean(output.EnableMaintenanceMode), - EnableWorkDocs: __expectBoolean(output.EnableWorkDocs), - UserEnabledAsLocalAdministrator: __expectBoolean(output.UserEnabledAsLocalAdministrator), - } as any; -}; - -/** - * deserializeAws_json1_1DeleteClientBrandingResult - */ -const de_DeleteClientBrandingResult = (output: any, context: __SerdeContext): DeleteClientBrandingResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteConnectClientAddInResult - */ -const de_DeleteConnectClientAddInResult = (output: any, context: __SerdeContext): DeleteConnectClientAddInResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteConnectionAliasResult - */ -const de_DeleteConnectionAliasResult = (output: any, context: __SerdeContext): DeleteConnectionAliasResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteIpGroupResult - */ -const de_DeleteIpGroupResult = (output: any, context: __SerdeContext): DeleteIpGroupResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteTagsResult - */ -const de_DeleteTagsResult = (output: any, context: __SerdeContext): DeleteTagsResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteWorkspaceBundleResult - */ -const de_DeleteWorkspaceBundleResult = (output: any, context: __SerdeContext): DeleteWorkspaceBundleResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeleteWorkspaceImageResult - */ -const de_DeleteWorkspaceImageResult = (output: any, context: __SerdeContext): DeleteWorkspaceImageResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DeregisterWorkspaceDirectoryResult - */ -const de_DeregisterWorkspaceDirectoryResult = ( - output: any, - context: __SerdeContext -): DeregisterWorkspaceDirectoryResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DescribeAccountModificationsResult - */ -const de_DescribeAccountModificationsResult = ( - output: any, - context: __SerdeContext -): DescribeAccountModificationsResult => { - return { - AccountModifications: - output.AccountModifications != null - ? de_AccountModificationList(output.AccountModifications, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeAccountResult - */ -const de_DescribeAccountResult = (output: any, context: __SerdeContext): DescribeAccountResult => { - return { - DedicatedTenancyManagementCidrRange: __expectString(output.DedicatedTenancyManagementCidrRange), - DedicatedTenancySupport: __expectString(output.DedicatedTenancySupport), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeClientBrandingResult - */ -const de_DescribeClientBrandingResult = (output: any, context: __SerdeContext): DescribeClientBrandingResult => { - return { - DeviceTypeAndroid: - output.DeviceTypeAndroid != null - ? de_DefaultClientBrandingAttributes(output.DeviceTypeAndroid, context) - : undefined, - DeviceTypeIos: - output.DeviceTypeIos != null ? de_IosClientBrandingAttributes(output.DeviceTypeIos, context) : undefined, - DeviceTypeLinux: - output.DeviceTypeLinux != null ? de_DefaultClientBrandingAttributes(output.DeviceTypeLinux, context) : undefined, - DeviceTypeOsx: - output.DeviceTypeOsx != null ? de_DefaultClientBrandingAttributes(output.DeviceTypeOsx, context) : undefined, - DeviceTypeWeb: - output.DeviceTypeWeb != null ? de_DefaultClientBrandingAttributes(output.DeviceTypeWeb, context) : undefined, - DeviceTypeWindows: - output.DeviceTypeWindows != null - ? de_DefaultClientBrandingAttributes(output.DeviceTypeWindows, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeClientPropertiesResult - */ -const de_DescribeClientPropertiesResult = (output: any, context: __SerdeContext): DescribeClientPropertiesResult => { - return { - ClientPropertiesList: - output.ClientPropertiesList != null ? de_ClientPropertiesList(output.ClientPropertiesList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectClientAddInsResult - */ -const de_DescribeConnectClientAddInsResult = ( - output: any, - context: __SerdeContext -): DescribeConnectClientAddInsResult => { - return { - AddIns: output.AddIns != null ? de_ConnectClientAddInList(output.AddIns, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectionAliasesResult - */ -const de_DescribeConnectionAliasesResult = (output: any, context: __SerdeContext): DescribeConnectionAliasesResult => { - return { - ConnectionAliases: - output.ConnectionAliases != null ? de_ConnectionAliasList(output.ConnectionAliases, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeConnectionAliasPermissionsResult - */ -const de_DescribeConnectionAliasPermissionsResult = ( - output: any, - context: __SerdeContext -): DescribeConnectionAliasPermissionsResult => { - return { - AliasId: __expectString(output.AliasId), - ConnectionAliasPermissions: - output.ConnectionAliasPermissions != null - ? de_ConnectionAliasPermissions(output.ConnectionAliasPermissions, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeIpGroupsResult - */ -const de_DescribeIpGroupsResult = (output: any, context: __SerdeContext): DescribeIpGroupsResult => { - return { - NextToken: __expectString(output.NextToken), - Result: output.Result != null ? de_WorkspacesIpGroupsList(output.Result, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeTagsResult - */ -const de_DescribeTagsResult = (output: any, context: __SerdeContext): DescribeTagsResult => { - return { - TagList: output.TagList != null ? de_TagList(output.TagList, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspaceBundlesResult - */ -const de_DescribeWorkspaceBundlesResult = (output: any, context: __SerdeContext): DescribeWorkspaceBundlesResult => { - return { - Bundles: output.Bundles != null ? de_BundleList(output.Bundles, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspaceDirectoriesResult - */ -const de_DescribeWorkspaceDirectoriesResult = ( - output: any, - context: __SerdeContext -): DescribeWorkspaceDirectoriesResult => { - return { - Directories: output.Directories != null ? de_DirectoryList(output.Directories, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspaceImagePermissionsResult - */ -const de_DescribeWorkspaceImagePermissionsResult = ( - output: any, - context: __SerdeContext -): DescribeWorkspaceImagePermissionsResult => { - return { - ImageId: __expectString(output.ImageId), - ImagePermissions: - output.ImagePermissions != null ? de_ImagePermissions(output.ImagePermissions, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspaceImagesResult - */ -const de_DescribeWorkspaceImagesResult = (output: any, context: __SerdeContext): DescribeWorkspaceImagesResult => { - return { - Images: output.Images != null ? de_WorkspaceImageList(output.Images, context) : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspacesConnectionStatusResult - */ -const de_DescribeWorkspacesConnectionStatusResult = ( - output: any, - context: __SerdeContext -): DescribeWorkspacesConnectionStatusResult => { - return { - NextToken: __expectString(output.NextToken), - WorkspacesConnectionStatus: - output.WorkspacesConnectionStatus != null - ? de_WorkspaceConnectionStatusList(output.WorkspacesConnectionStatus, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspaceSnapshotsResult - */ -const de_DescribeWorkspaceSnapshotsResult = ( - output: any, - context: __SerdeContext -): DescribeWorkspaceSnapshotsResult => { - return { - RebuildSnapshots: output.RebuildSnapshots != null ? de_SnapshotList(output.RebuildSnapshots, context) : undefined, - RestoreSnapshots: output.RestoreSnapshots != null ? de_SnapshotList(output.RestoreSnapshots, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DescribeWorkspacesResult - */ -const de_DescribeWorkspacesResult = (output: any, context: __SerdeContext): DescribeWorkspacesResult => { - return { - NextToken: __expectString(output.NextToken), - Workspaces: output.Workspaces != null ? de_WorkspaceList(output.Workspaces, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1DirectoryList - */ -const de_DirectoryList = (output: any, context: __SerdeContext): WorkspaceDirectory[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkspaceDirectory(entry, context); - }); - return retVal; -}; - -/** - * deserializeAws_json1_1DisassociateConnectionAliasResult - */ -const de_DisassociateConnectionAliasResult = ( - output: any, - context: __SerdeContext -): DisassociateConnectionAliasResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DisassociateIpGroupsResult - */ -const de_DisassociateIpGroupsResult = (output: any, context: __SerdeContext): DisassociateIpGroupsResult => { - return {} as any; -}; - -/** - * deserializeAws_json1_1DnsIpAddresses - */ -const de_DnsIpAddresses = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; - -/** - * deserializeAws_json1_1FailedCreateStandbyWorkspacesRequest - */ -const de_FailedCreateStandbyWorkspacesRequest = ( - output: any, - context: __SerdeContext -): FailedCreateStandbyWorkspacesRequest => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - StandbyWorkspaceRequest: - output.StandbyWorkspaceRequest != null ? de_StandbyWorkspace(output.StandbyWorkspaceRequest, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1FailedCreateStandbyWorkspacesRequestList - */ -const de_FailedCreateStandbyWorkspacesRequestList = ( - output: any, - context: __SerdeContext -): FailedCreateStandbyWorkspacesRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedCreateStandbyWorkspacesRequest(entry, context); - }); - return retVal; -}; +// se_IpGroupIdList omitted. -/** - * deserializeAws_json1_1FailedCreateWorkspaceRequest - */ -const de_FailedCreateWorkspaceRequest = (output: any, context: __SerdeContext): FailedCreateWorkspaceRequest => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - WorkspaceRequest: - output.WorkspaceRequest != null ? de_WorkspaceRequest(output.WorkspaceRequest, context) : undefined, - } as any; -}; +// se_IpRevokedRuleList omitted. -/** - * deserializeAws_json1_1FailedCreateWorkspaceRequests - */ -const de_FailedCreateWorkspaceRequests = (output: any, context: __SerdeContext): FailedCreateWorkspaceRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedCreateWorkspaceRequest(entry, context); - }); - return retVal; -}; +// se_IpRuleItem omitted. -/** - * deserializeAws_json1_1FailedRebootWorkspaceRequests - */ -const de_FailedRebootWorkspaceRequests = (output: any, context: __SerdeContext): FailedWorkspaceChangeRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedWorkspaceChangeRequest(entry, context); - }); - return retVal; -}; +// se_IpRuleList omitted. -/** - * deserializeAws_json1_1FailedRebuildWorkspaceRequests - */ -const de_FailedRebuildWorkspaceRequests = (output: any, context: __SerdeContext): FailedWorkspaceChangeRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedWorkspaceChangeRequest(entry, context); - }); - return retVal; -}; +// se_ListAvailableManagementCidrRangesRequest omitted. -/** - * deserializeAws_json1_1FailedStartWorkspaceRequests - */ -const de_FailedStartWorkspaceRequests = (output: any, context: __SerdeContext): FailedWorkspaceChangeRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedWorkspaceChangeRequest(entry, context); - }); - return retVal; -}; +// se_LoginMessage omitted. -/** - * deserializeAws_json1_1FailedStopWorkspaceRequests - */ -const de_FailedStopWorkspaceRequests = (output: any, context: __SerdeContext): FailedWorkspaceChangeRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedWorkspaceChangeRequest(entry, context); - }); - return retVal; -}; +// se_MigrateWorkspaceRequest omitted. -/** - * deserializeAws_json1_1FailedTerminateWorkspaceRequests - */ -const de_FailedTerminateWorkspaceRequests = (output: any, context: __SerdeContext): FailedWorkspaceChangeRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FailedWorkspaceChangeRequest(entry, context); - }); - return retVal; -}; +// se_ModifyAccountRequest omitted. -/** - * deserializeAws_json1_1FailedWorkspaceChangeRequest - */ -const de_FailedWorkspaceChangeRequest = (output: any, context: __SerdeContext): FailedWorkspaceChangeRequest => { - return { - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - WorkspaceId: __expectString(output.WorkspaceId), - } as any; -}; +// se_ModifyCertificateBasedAuthPropertiesRequest omitted. -/** - * deserializeAws_json1_1ImagePermission - */ -const de_ImagePermission = (output: any, context: __SerdeContext): ImagePermission => { - return { - SharedAccountId: __expectString(output.SharedAccountId), - } as any; -}; +// se_ModifyClientPropertiesRequest omitted. -/** - * deserializeAws_json1_1ImagePermissions - */ -const de_ImagePermissions = (output: any, context: __SerdeContext): ImagePermission[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ImagePermission(entry, context); - }); - return retVal; -}; +// se_ModifySamlPropertiesRequest omitted. -/** - * deserializeAws_json1_1ImportClientBrandingResult - */ -const de_ImportClientBrandingResult = (output: any, context: __SerdeContext): ImportClientBrandingResult => { - return { - DeviceTypeAndroid: - output.DeviceTypeAndroid != null - ? de_DefaultClientBrandingAttributes(output.DeviceTypeAndroid, context) - : undefined, - DeviceTypeIos: - output.DeviceTypeIos != null ? de_IosClientBrandingAttributes(output.DeviceTypeIos, context) : undefined, - DeviceTypeLinux: - output.DeviceTypeLinux != null ? de_DefaultClientBrandingAttributes(output.DeviceTypeLinux, context) : undefined, - DeviceTypeOsx: - output.DeviceTypeOsx != null ? de_DefaultClientBrandingAttributes(output.DeviceTypeOsx, context) : undefined, - DeviceTypeWeb: - output.DeviceTypeWeb != null ? de_DefaultClientBrandingAttributes(output.DeviceTypeWeb, context) : undefined, - DeviceTypeWindows: - output.DeviceTypeWindows != null - ? de_DefaultClientBrandingAttributes(output.DeviceTypeWindows, context) - : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1ImportWorkspaceImageResult - */ -const de_ImportWorkspaceImageResult = (output: any, context: __SerdeContext): ImportWorkspaceImageResult => { - return { - ImageId: __expectString(output.ImageId), - } as any; -}; +// se_ModifySelfservicePermissionsRequest omitted. -/** - * deserializeAws_json1_1InvalidParameterValuesException - */ -const de_InvalidParameterValuesException = (output: any, context: __SerdeContext): InvalidParameterValuesException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ModifyWorkspaceAccessPropertiesRequest omitted. -/** - * deserializeAws_json1_1InvalidResourceStateException - */ -const de_InvalidResourceStateException = (output: any, context: __SerdeContext): InvalidResourceStateException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_ModifyWorkspaceCreationPropertiesRequest omitted. -/** - * deserializeAws_json1_1IosClientBrandingAttributes - */ -const de_IosClientBrandingAttributes = (output: any, context: __SerdeContext): IosClientBrandingAttributes => { - return { - ForgotPasswordLink: __expectString(output.ForgotPasswordLink), - LoginMessage: output.LoginMessage != null ? de_LoginMessage(output.LoginMessage, context) : undefined, - Logo2xUrl: __expectString(output.Logo2xUrl), - Logo3xUrl: __expectString(output.Logo3xUrl), - LogoUrl: __expectString(output.LogoUrl), - SupportEmail: __expectString(output.SupportEmail), - SupportLink: __expectString(output.SupportLink), - } as any; -}; +// se_ModifyWorkspacePropertiesRequest omitted. -/** - * deserializeAws_json1_1IpGroupIdList - */ -const de_IpGroupIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_ModifyWorkspaceStateRequest omitted. -/** - * deserializeAws_json1_1IpRuleItem - */ -const de_IpRuleItem = (output: any, context: __SerdeContext): IpRuleItem => { - return { - ipRule: __expectString(output.ipRule), - ruleDesc: __expectString(output.ruleDesc), - } as any; -}; +// se_ProtocolList omitted. -/** - * deserializeAws_json1_1IpRuleList - */ -const de_IpRuleList = (output: any, context: __SerdeContext): IpRuleItem[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_IpRuleItem(entry, context); - }); - return retVal; -}; +// se_RebootRequest omitted. -/** - * deserializeAws_json1_1ListAvailableManagementCidrRangesResult - */ -const de_ListAvailableManagementCidrRangesResult = ( - output: any, - context: __SerdeContext -): ListAvailableManagementCidrRangesResult => { - return { - ManagementCidrRanges: - output.ManagementCidrRanges != null - ? de_DedicatedTenancyCidrRangeList(output.ManagementCidrRanges, context) - : undefined, - NextToken: __expectString(output.NextToken), - } as any; -}; +// se_RebootWorkspaceRequests omitted. -/** - * deserializeAws_json1_1LoginMessage - */ -const de_LoginMessage = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// se_RebootWorkspacesRequest omitted. -/** - * deserializeAws_json1_1MigrateWorkspaceResult - */ -const de_MigrateWorkspaceResult = (output: any, context: __SerdeContext): MigrateWorkspaceResult => { - return { - SourceWorkspaceId: __expectString(output.SourceWorkspaceId), - TargetWorkspaceId: __expectString(output.TargetWorkspaceId), - } as any; -}; +// se_RebuildRequest omitted. -/** - * deserializeAws_json1_1ModificationState - */ -const de_ModificationState = (output: any, context: __SerdeContext): ModificationState => { - return { - Resource: __expectString(output.Resource), - State: __expectString(output.State), - } as any; -}; +// se_RebuildWorkspaceRequests omitted. -/** - * deserializeAws_json1_1ModificationStateList - */ -const de_ModificationStateList = (output: any, context: __SerdeContext): ModificationState[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ModificationState(entry, context); - }); - return retVal; -}; +// se_RebuildWorkspacesRequest omitted. -/** - * deserializeAws_json1_1ModifyAccountResult - */ -const de_ModifyAccountResult = (output: any, context: __SerdeContext): ModifyAccountResult => { - return {} as any; -}; +// se_RegisterWorkspaceDirectoryRequest omitted. -/** - * deserializeAws_json1_1ModifyCertificateBasedAuthPropertiesResult - */ -const de_ModifyCertificateBasedAuthPropertiesResult = ( - output: any, - context: __SerdeContext -): ModifyCertificateBasedAuthPropertiesResult => { - return {} as any; -}; +// se_ResourceIdList omitted. -/** - * deserializeAws_json1_1ModifyClientPropertiesResult - */ -const de_ModifyClientPropertiesResult = (output: any, context: __SerdeContext): ModifyClientPropertiesResult => { - return {} as any; -}; +// se_RestoreWorkspaceRequest omitted. -/** - * deserializeAws_json1_1ModifySamlPropertiesResult - */ -const de_ModifySamlPropertiesResult = (output: any, context: __SerdeContext): ModifySamlPropertiesResult => { - return {} as any; -}; +// se_RevokeIpRulesRequest omitted. -/** - * deserializeAws_json1_1ModifySelfservicePermissionsResult - */ -const de_ModifySelfservicePermissionsResult = ( - output: any, - context: __SerdeContext -): ModifySelfservicePermissionsResult => { - return {} as any; -}; +// se_RootStorage omitted. -/** - * deserializeAws_json1_1ModifyWorkspaceAccessPropertiesResult - */ -const de_ModifyWorkspaceAccessPropertiesResult = ( - output: any, - context: __SerdeContext -): ModifyWorkspaceAccessPropertiesResult => { - return {} as any; -}; +// se_SamlProperties omitted. -/** - * deserializeAws_json1_1ModifyWorkspaceCreationPropertiesResult - */ -const de_ModifyWorkspaceCreationPropertiesResult = ( - output: any, - context: __SerdeContext -): ModifyWorkspaceCreationPropertiesResult => { - return {} as any; -}; +// se_SelfservicePermissions omitted. -/** - * deserializeAws_json1_1ModifyWorkspacePropertiesResult - */ -const de_ModifyWorkspacePropertiesResult = (output: any, context: __SerdeContext): ModifyWorkspacePropertiesResult => { - return {} as any; -}; +// se_StandbyWorkspace omitted. -/** - * deserializeAws_json1_1ModifyWorkspaceStateResult - */ -const de_ModifyWorkspaceStateResult = (output: any, context: __SerdeContext): ModifyWorkspaceStateResult => { - return {} as any; -}; +// se_StandbyWorkspacesList omitted. -/** - * deserializeAws_json1_1OperatingSystem - */ -const de_OperatingSystem = (output: any, context: __SerdeContext): OperatingSystem => { - return { - Type: __expectString(output.Type), - } as any; -}; +// se_StartRequest omitted. -/** - * deserializeAws_json1_1OperationInProgressException - */ -const de_OperationInProgressException = (output: any, context: __SerdeContext): OperationInProgressException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_StartWorkspaceRequests omitted. -/** - * deserializeAws_json1_1OperationNotSupportedException - */ -const de_OperationNotSupportedException = (output: any, context: __SerdeContext): OperationNotSupportedException => { - return { - message: __expectString(output.message), - reason: __expectString(output.reason), - } as any; -}; +// se_StartWorkspacesRequest omitted. -/** - * deserializeAws_json1_1PendingCreateStandbyWorkspacesRequest - */ -const de_PendingCreateStandbyWorkspacesRequest = ( - output: any, - context: __SerdeContext -): PendingCreateStandbyWorkspacesRequest => { - return { - DirectoryId: __expectString(output.DirectoryId), - State: __expectString(output.State), - UserName: __expectString(output.UserName), - WorkspaceId: __expectString(output.WorkspaceId), - } as any; -}; +// se_StopRequest omitted. -/** - * deserializeAws_json1_1PendingCreateStandbyWorkspacesRequestList - */ -const de_PendingCreateStandbyWorkspacesRequestList = ( - output: any, - context: __SerdeContext -): PendingCreateStandbyWorkspacesRequest[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_PendingCreateStandbyWorkspacesRequest(entry, context); - }); - return retVal; -}; +// se_StopWorkspaceRequests omitted. -/** - * deserializeAws_json1_1ProtocolList - */ -const de_ProtocolList = (output: any, context: __SerdeContext): (Protocol | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// se_StopWorkspacesRequest omitted. -/** - * deserializeAws_json1_1RebootWorkspacesResult - */ -const de_RebootWorkspacesResult = (output: any, context: __SerdeContext): RebootWorkspacesResult => { - return { - FailedRequests: - output.FailedRequests != null ? de_FailedRebootWorkspaceRequests(output.FailedRequests, context) : undefined, - } as any; -}; +// se_SubnetIds omitted. -/** - * deserializeAws_json1_1RebuildWorkspacesResult - */ -const de_RebuildWorkspacesResult = (output: any, context: __SerdeContext): RebuildWorkspacesResult => { - return { - FailedRequests: - output.FailedRequests != null ? de_FailedRebuildWorkspaceRequests(output.FailedRequests, context) : undefined, - } as any; -}; +// se_Tag omitted. -/** - * deserializeAws_json1_1RegisterWorkspaceDirectoryResult - */ -const de_RegisterWorkspaceDirectoryResult = ( - output: any, - context: __SerdeContext -): RegisterWorkspaceDirectoryResult => { - return {} as any; -}; +// se_TagKeyList omitted. -/** - * deserializeAws_json1_1RelatedWorkspaceProperties - */ -const de_RelatedWorkspaceProperties = (output: any, context: __SerdeContext): RelatedWorkspaceProperties => { - return { - Region: __expectString(output.Region), - State: __expectString(output.State), - Type: __expectString(output.Type), - WorkspaceId: __expectString(output.WorkspaceId), - } as any; -}; +// se_TagList omitted. -/** - * deserializeAws_json1_1RelatedWorkspaces - */ -const de_RelatedWorkspaces = (output: any, context: __SerdeContext): RelatedWorkspaceProperties[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RelatedWorkspaceProperties(entry, context); - }); - return retVal; -}; +// se_TerminateRequest omitted. -/** - * deserializeAws_json1_1ResourceAlreadyExistsException - */ -const de_ResourceAlreadyExistsException = (output: any, context: __SerdeContext): ResourceAlreadyExistsException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TerminateWorkspaceRequests omitted. -/** - * deserializeAws_json1_1ResourceAssociatedException - */ -const de_ResourceAssociatedException = (output: any, context: __SerdeContext): ResourceAssociatedException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_TerminateWorkspacesRequest omitted. -/** - * deserializeAws_json1_1ResourceCreationFailedException - */ -const de_ResourceCreationFailedException = (output: any, context: __SerdeContext): ResourceCreationFailedException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateConnectClientAddInRequest omitted. -/** - * deserializeAws_json1_1ResourceLimitExceededException - */ -const de_ResourceLimitExceededException = (output: any, context: __SerdeContext): ResourceLimitExceededException => { - return { - message: __expectString(output.message), - } as any; -}; +// se_UpdateConnectionAliasPermissionRequest omitted. -/** - * deserializeAws_json1_1ResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - return { - ResourceId: __expectString(output.ResourceId), - message: __expectString(output.message), - } as any; -}; +// se_UpdateRulesOfIpGroupRequest omitted. -/** - * deserializeAws_json1_1ResourceUnavailableException - */ -const de_ResourceUnavailableException = (output: any, context: __SerdeContext): ResourceUnavailableException => { - return { - ResourceId: __expectString(output.ResourceId), - message: __expectString(output.message), - } as any; -}; +// se_UpdateWorkspaceBundleRequest omitted. -/** - * deserializeAws_json1_1RestoreWorkspaceResult - */ -const de_RestoreWorkspaceResult = (output: any, context: __SerdeContext): RestoreWorkspaceResult => { - return {} as any; -}; +// se_UpdateWorkspaceImagePermissionRequest omitted. -/** - * deserializeAws_json1_1RevokeIpRulesResult - */ -const de_RevokeIpRulesResult = (output: any, context: __SerdeContext): RevokeIpRulesResult => { - return {} as any; -}; +// se_UserStorage omitted. + +// se_WorkspaceAccessProperties omitted. + +// se_WorkspaceCreationProperties omitted. + +// se_WorkspaceIdList omitted. -/** - * deserializeAws_json1_1RootStorage - */ -const de_RootStorage = (output: any, context: __SerdeContext): RootStorage => { - return { - Capacity: __expectString(output.Capacity), - } as any; -}; +// se_WorkspaceImageIdList omitted. -/** - * deserializeAws_json1_1SamlProperties - */ -const de_SamlProperties = (output: any, context: __SerdeContext): SamlProperties => { - return { - RelayStateParameterName: __expectString(output.RelayStateParameterName), - Status: __expectString(output.Status), - UserAccessUrl: __expectString(output.UserAccessUrl), - } as any; -}; +// se_WorkspaceProperties omitted. -/** - * deserializeAws_json1_1SelfservicePermissions - */ -const de_SelfservicePermissions = (output: any, context: __SerdeContext): SelfservicePermissions => { - return { - ChangeComputeType: __expectString(output.ChangeComputeType), - IncreaseVolumeSize: __expectString(output.IncreaseVolumeSize), - RebuildWorkspace: __expectString(output.RebuildWorkspace), - RestartWorkspace: __expectString(output.RestartWorkspace), - SwitchRunningMode: __expectString(output.SwitchRunningMode), - } as any; -}; +// se_WorkspaceRequest omitted. + +// se_WorkspaceRequestList omitted. + +// de_AccessDeniedException omitted. /** - * deserializeAws_json1_1Snapshot + * deserializeAws_json1_1AccountModification */ -const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => { - return { - SnapshotTime: - output.SnapshotTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SnapshotTime))) - : undefined, - } as any; +const de_AccountModification = (output: any, context: __SerdeContext): AccountModification => { + return take(output, { + DedicatedTenancyManagementCidrRange: __expectString, + DedicatedTenancySupport: __expectString, + ErrorCode: __expectString, + ErrorMessage: __expectString, + ModificationState: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1SnapshotList + * deserializeAws_json1_1AccountModificationList */ -const de_SnapshotList = (output: any, context: __SerdeContext): Snapshot[] => { +const de_AccountModificationList = (output: any, context: __SerdeContext): AccountModification[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Snapshot(entry, context); + return de_AccountModification(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1StandbyWorkspace - */ -const de_StandbyWorkspace = (output: any, context: __SerdeContext): StandbyWorkspace => { - return { - DirectoryId: __expectString(output.DirectoryId), - PrimaryWorkspaceId: __expectString(output.PrimaryWorkspaceId), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - VolumeEncryptionKey: __expectString(output.VolumeEncryptionKey), - } as any; -}; +// de_AssociateConnectionAliasResult omitted. -/** - * deserializeAws_json1_1StartWorkspacesResult - */ -const de_StartWorkspacesResult = (output: any, context: __SerdeContext): StartWorkspacesResult => { - return { - FailedRequests: - output.FailedRequests != null ? de_FailedStartWorkspaceRequests(output.FailedRequests, context) : undefined, - } as any; -}; +// de_AssociateIpGroupsResult omitted. -/** - * deserializeAws_json1_1StopWorkspacesResult - */ -const de_StopWorkspacesResult = (output: any, context: __SerdeContext): StopWorkspacesResult => { - return { - FailedRequests: - output.FailedRequests != null ? de_FailedStopWorkspaceRequests(output.FailedRequests, context) : undefined, - } as any; -}; +// de_AuthorizeIpRulesResult omitted. /** - * deserializeAws_json1_1SubnetIds + * deserializeAws_json1_1BundleList */ -const de_SubnetIds = (output: any, context: __SerdeContext): string[] => { +const de_BundleList = (output: any, context: __SerdeContext): WorkspaceBundle[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; + return de_WorkspaceBundle(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_CertificateBasedAuthProperties omitted. -/** - * deserializeAws_json1_1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_ClientProperties omitted. -/** - * deserializeAws_json1_1TerminateWorkspacesResult - */ -const de_TerminateWorkspacesResult = (output: any, context: __SerdeContext): TerminateWorkspacesResult => { - return { - FailedRequests: - output.FailedRequests != null ? de_FailedTerminateWorkspaceRequests(output.FailedRequests, context) : undefined, - } as any; -}; +// de_ClientPropertiesList omitted. -/** - * deserializeAws_json1_1UnsupportedNetworkConfigurationException - */ -const de_UnsupportedNetworkConfigurationException = ( - output: any, - context: __SerdeContext -): UnsupportedNetworkConfigurationException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_ClientPropertiesResult omitted. + +// de_ComputeType omitted. + +// de_ConnectClientAddIn omitted. + +// de_ConnectClientAddInList omitted. + +// de_ConnectionAlias omitted. + +// de_ConnectionAliasAssociation omitted. + +// de_ConnectionAliasAssociationList omitted. + +// de_ConnectionAliasList omitted. + +// de_ConnectionAliasPermission omitted. + +// de_ConnectionAliasPermissions omitted. + +// de_CopyWorkspaceImageResult omitted. + +// de_CreateConnectClientAddInResult omitted. + +// de_CreateConnectionAliasResult omitted. + +// de_CreateIpGroupResult omitted. + +// de_CreateStandbyWorkspacesResult omitted. + +// de_CreateTagsResult omitted. + +// de_CreateUpdatedWorkspaceImageResult omitted. /** - * deserializeAws_json1_1UnsupportedWorkspaceConfigurationException + * deserializeAws_json1_1CreateWorkspaceBundleResult */ -const de_UnsupportedWorkspaceConfigurationException = ( - output: any, - context: __SerdeContext -): UnsupportedWorkspaceConfigurationException => { - return { - message: __expectString(output.message), - } as any; +const de_CreateWorkspaceBundleResult = (output: any, context: __SerdeContext): CreateWorkspaceBundleResult => { + return take(output, { + WorkspaceBundle: (_: any) => de_WorkspaceBundle(_, context), + }) as any; }; /** - * deserializeAws_json1_1UpdateConnectClientAddInResult + * deserializeAws_json1_1CreateWorkspaceImageResult */ -const de_UpdateConnectClientAddInResult = (output: any, context: __SerdeContext): UpdateConnectClientAddInResult => { - return {} as any; +const de_CreateWorkspaceImageResult = (output: any, context: __SerdeContext): CreateWorkspaceImageResult => { + return take(output, { + Created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ImageId: __expectString, + Name: __expectString, + OperatingSystem: _json, + OwnerAccountId: __expectString, + RequiredTenancy: __expectString, + State: __expectString, + }) as any; }; +// de_CreateWorkspacesResult omitted. + +// de_DedicatedTenancyCidrRangeList omitted. + +// de_DefaultClientBrandingAttributes omitted. + +// de_DefaultWorkspaceCreationProperties omitted. + +// de_DeleteClientBrandingResult omitted. + +// de_DeleteConnectClientAddInResult omitted. + +// de_DeleteConnectionAliasResult omitted. + +// de_DeleteIpGroupResult omitted. + +// de_DeleteTagsResult omitted. + +// de_DeleteWorkspaceBundleResult omitted. + +// de_DeleteWorkspaceImageResult omitted. + +// de_DeregisterWorkspaceDirectoryResult omitted. + /** - * deserializeAws_json1_1UpdateConnectionAliasPermissionResult + * deserializeAws_json1_1DescribeAccountModificationsResult */ -const de_UpdateConnectionAliasPermissionResult = ( +const de_DescribeAccountModificationsResult = ( output: any, context: __SerdeContext -): UpdateConnectionAliasPermissionResult => { - return {} as any; +): DescribeAccountModificationsResult => { + return take(output, { + AccountModifications: (_: any) => de_AccountModificationList(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeAccountResult omitted. + +// de_DescribeClientBrandingResult omitted. + +// de_DescribeClientPropertiesResult omitted. + +// de_DescribeConnectClientAddInsResult omitted. + +// de_DescribeConnectionAliasesResult omitted. + +// de_DescribeConnectionAliasPermissionsResult omitted. + +// de_DescribeIpGroupsResult omitted. + +// de_DescribeTagsResult omitted. + /** - * deserializeAws_json1_1UpdateResult + * deserializeAws_json1_1DescribeWorkspaceBundlesResult */ -const de_UpdateResult = (output: any, context: __SerdeContext): UpdateResult => { - return { - Description: __expectString(output.Description), - UpdateAvailable: __expectBoolean(output.UpdateAvailable), - } as any; +const de_DescribeWorkspaceBundlesResult = (output: any, context: __SerdeContext): DescribeWorkspaceBundlesResult => { + return take(output, { + Bundles: (_: any) => de_BundleList(_, context), + NextToken: __expectString, + }) as any; }; +// de_DescribeWorkspaceDirectoriesResult omitted. + +// de_DescribeWorkspaceImagePermissionsResult omitted. + /** - * deserializeAws_json1_1UpdateRulesOfIpGroupResult + * deserializeAws_json1_1DescribeWorkspaceImagesResult */ -const de_UpdateRulesOfIpGroupResult = (output: any, context: __SerdeContext): UpdateRulesOfIpGroupResult => { - return {} as any; +const de_DescribeWorkspaceImagesResult = (output: any, context: __SerdeContext): DescribeWorkspaceImagesResult => { + return take(output, { + Images: (_: any) => de_WorkspaceImageList(_, context), + NextToken: __expectString, + }) as any; }; /** - * deserializeAws_json1_1UpdateWorkspaceBundleResult + * deserializeAws_json1_1DescribeWorkspacesConnectionStatusResult */ -const de_UpdateWorkspaceBundleResult = (output: any, context: __SerdeContext): UpdateWorkspaceBundleResult => { - return {} as any; +const de_DescribeWorkspacesConnectionStatusResult = ( + output: any, + context: __SerdeContext +): DescribeWorkspacesConnectionStatusResult => { + return take(output, { + NextToken: __expectString, + WorkspacesConnectionStatus: (_: any) => de_WorkspaceConnectionStatusList(_, context), + }) as any; }; /** - * deserializeAws_json1_1UpdateWorkspaceImagePermissionResult + * deserializeAws_json1_1DescribeWorkspaceSnapshotsResult */ -const de_UpdateWorkspaceImagePermissionResult = ( +const de_DescribeWorkspaceSnapshotsResult = ( output: any, context: __SerdeContext -): UpdateWorkspaceImagePermissionResult => { - return {} as any; +): DescribeWorkspaceSnapshotsResult => { + return take(output, { + RebuildSnapshots: (_: any) => de_SnapshotList(_, context), + RestoreSnapshots: (_: any) => de_SnapshotList(_, context), + }) as any; }; +// de_DescribeWorkspacesResult omitted. + +// de_DirectoryList omitted. + +// de_DisassociateConnectionAliasResult omitted. + +// de_DisassociateIpGroupsResult omitted. + +// de_DnsIpAddresses omitted. + +// de_FailedCreateStandbyWorkspacesRequest omitted. + +// de_FailedCreateStandbyWorkspacesRequestList omitted. + +// de_FailedCreateWorkspaceRequest omitted. + +// de_FailedCreateWorkspaceRequests omitted. + +// de_FailedRebootWorkspaceRequests omitted. + +// de_FailedRebuildWorkspaceRequests omitted. + +// de_FailedStartWorkspaceRequests omitted. + +// de_FailedStopWorkspaceRequests omitted. + +// de_FailedTerminateWorkspaceRequests omitted. + +// de_FailedWorkspaceChangeRequest omitted. + +// de_ImagePermission omitted. + +// de_ImagePermissions omitted. + +// de_ImportClientBrandingResult omitted. + +// de_ImportWorkspaceImageResult omitted. + +// de_InvalidParameterValuesException omitted. + +// de_InvalidResourceStateException omitted. + +// de_IosClientBrandingAttributes omitted. + +// de_IpGroupIdList omitted. + +// de_IpRuleItem omitted. + +// de_IpRuleList omitted. + +// de_ListAvailableManagementCidrRangesResult omitted. + +// de_LoginMessage omitted. + +// de_MigrateWorkspaceResult omitted. + +// de_ModificationState omitted. + +// de_ModificationStateList omitted. + +// de_ModifyAccountResult omitted. + +// de_ModifyCertificateBasedAuthPropertiesResult omitted. + +// de_ModifyClientPropertiesResult omitted. + +// de_ModifySamlPropertiesResult omitted. + +// de_ModifySelfservicePermissionsResult omitted. + +// de_ModifyWorkspaceAccessPropertiesResult omitted. + +// de_ModifyWorkspaceCreationPropertiesResult omitted. + +// de_ModifyWorkspacePropertiesResult omitted. + +// de_ModifyWorkspaceStateResult omitted. + +// de_OperatingSystem omitted. + +// de_OperationInProgressException omitted. + +// de_OperationNotSupportedException omitted. + +// de_PendingCreateStandbyWorkspacesRequest omitted. + +// de_PendingCreateStandbyWorkspacesRequestList omitted. + +// de_ProtocolList omitted. + +// de_RebootWorkspacesResult omitted. + +// de_RebuildWorkspacesResult omitted. + +// de_RegisterWorkspaceDirectoryResult omitted. + +// de_RelatedWorkspaceProperties omitted. + +// de_RelatedWorkspaces omitted. + +// de_ResourceAlreadyExistsException omitted. + +// de_ResourceAssociatedException omitted. + +// de_ResourceCreationFailedException omitted. + +// de_ResourceLimitExceededException omitted. + +// de_ResourceNotFoundException omitted. + +// de_ResourceUnavailableException omitted. + +// de_RestoreWorkspaceResult omitted. + +// de_RevokeIpRulesResult omitted. + +// de_RootStorage omitted. + +// de_SamlProperties omitted. + +// de_SelfservicePermissions omitted. + /** - * deserializeAws_json1_1UserStorage + * deserializeAws_json1_1Snapshot */ -const de_UserStorage = (output: any, context: __SerdeContext): UserStorage => { - return { - Capacity: __expectString(output.Capacity), - } as any; +const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => { + return take(output, { + SnapshotTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** - * deserializeAws_json1_1Workspace + * deserializeAws_json1_1SnapshotList */ -const de_Workspace = (output: any, context: __SerdeContext): Workspace => { - return { - BundleId: __expectString(output.BundleId), - ComputerName: __expectString(output.ComputerName), - DirectoryId: __expectString(output.DirectoryId), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - IpAddress: __expectString(output.IpAddress), - ModificationStates: - output.ModificationStates != null ? de_ModificationStateList(output.ModificationStates, context) : undefined, - RelatedWorkspaces: - output.RelatedWorkspaces != null ? de_RelatedWorkspaces(output.RelatedWorkspaces, context) : undefined, - RootVolumeEncryptionEnabled: __expectBoolean(output.RootVolumeEncryptionEnabled), - State: __expectString(output.State), - SubnetId: __expectString(output.SubnetId), - UserName: __expectString(output.UserName), - UserVolumeEncryptionEnabled: __expectBoolean(output.UserVolumeEncryptionEnabled), - VolumeEncryptionKey: __expectString(output.VolumeEncryptionKey), - WorkspaceId: __expectString(output.WorkspaceId), - WorkspaceProperties: - output.WorkspaceProperties != null ? de_WorkspaceProperties(output.WorkspaceProperties, context) : undefined, - } as any; -}; - -/** - * deserializeAws_json1_1WorkspaceAccessProperties - */ -const de_WorkspaceAccessProperties = (output: any, context: __SerdeContext): WorkspaceAccessProperties => { - return { - DeviceTypeAndroid: __expectString(output.DeviceTypeAndroid), - DeviceTypeChromeOs: __expectString(output.DeviceTypeChromeOs), - DeviceTypeIos: __expectString(output.DeviceTypeIos), - DeviceTypeLinux: __expectString(output.DeviceTypeLinux), - DeviceTypeOsx: __expectString(output.DeviceTypeOsx), - DeviceTypeWeb: __expectString(output.DeviceTypeWeb), - DeviceTypeWindows: __expectString(output.DeviceTypeWindows), - DeviceTypeZeroClient: __expectString(output.DeviceTypeZeroClient), - } as any; +const de_SnapshotList = (output: any, context: __SerdeContext): Snapshot[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Snapshot(entry, context); + }); + return retVal; }; +// de_StandbyWorkspace omitted. + +// de_StartWorkspacesResult omitted. + +// de_StopWorkspacesResult omitted. + +// de_SubnetIds omitted. + +// de_Tag omitted. + +// de_TagList omitted. + +// de_TerminateWorkspacesResult omitted. + +// de_UnsupportedNetworkConfigurationException omitted. + +// de_UnsupportedWorkspaceConfigurationException omitted. + +// de_UpdateConnectClientAddInResult omitted. + +// de_UpdateConnectionAliasPermissionResult omitted. + +// de_UpdateResult omitted. + +// de_UpdateRulesOfIpGroupResult omitted. + +// de_UpdateWorkspaceBundleResult omitted. + +// de_UpdateWorkspaceImagePermissionResult omitted. + +// de_UserStorage omitted. + +// de_Workspace omitted. + +// de_WorkspaceAccessProperties omitted. + /** * deserializeAws_json1_1WorkspaceBundle */ const de_WorkspaceBundle = (output: any, context: __SerdeContext): WorkspaceBundle => { - return { - BundleId: __expectString(output.BundleId), - BundleType: __expectString(output.BundleType), - ComputeType: output.ComputeType != null ? de_ComputeType(output.ComputeType, context) : undefined, - CreationTime: - output.CreationTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreationTime))) - : undefined, - Description: __expectString(output.Description), - ImageId: __expectString(output.ImageId), - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - Name: __expectString(output.Name), - Owner: __expectString(output.Owner), - RootStorage: output.RootStorage != null ? de_RootStorage(output.RootStorage, context) : undefined, - State: __expectString(output.State), - UserStorage: output.UserStorage != null ? de_UserStorage(output.UserStorage, context) : undefined, - } as any; + return take(output, { + BundleId: __expectString, + BundleType: __expectString, + ComputeType: _json, + CreationTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ImageId: __expectString, + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Owner: __expectString, + RootStorage: _json, + State: __expectString, + UserStorage: _json, + }) as any; }; /** * deserializeAws_json1_1WorkspaceConnectionStatus */ const de_WorkspaceConnectionStatus = (output: any, context: __SerdeContext): WorkspaceConnectionStatus => { - return { - ConnectionState: __expectString(output.ConnectionState), - ConnectionStateCheckTimestamp: - output.ConnectionStateCheckTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ConnectionStateCheckTimestamp))) - : undefined, - LastKnownUserConnectionTimestamp: - output.LastKnownUserConnectionTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastKnownUserConnectionTimestamp))) - : undefined, - WorkspaceId: __expectString(output.WorkspaceId), - } as any; + return take(output, { + ConnectionState: __expectString, + ConnectionStateCheckTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + LastKnownUserConnectionTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + WorkspaceId: __expectString, + }) as any; }; /** @@ -8014,70 +5610,30 @@ const de_WorkspaceConnectionStatusList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkspaceConnectionStatus(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1WorkspaceDirectory - */ -const de_WorkspaceDirectory = (output: any, context: __SerdeContext): WorkspaceDirectory => { - return { - Alias: __expectString(output.Alias), - CertificateBasedAuthProperties: - output.CertificateBasedAuthProperties != null - ? de_CertificateBasedAuthProperties(output.CertificateBasedAuthProperties, context) - : undefined, - CustomerUserName: __expectString(output.CustomerUserName), - DirectoryId: __expectString(output.DirectoryId), - DirectoryName: __expectString(output.DirectoryName), - DirectoryType: __expectString(output.DirectoryType), - DnsIpAddresses: output.DnsIpAddresses != null ? de_DnsIpAddresses(output.DnsIpAddresses, context) : undefined, - IamRoleId: __expectString(output.IamRoleId), - RegistrationCode: __expectString(output.RegistrationCode), - SamlProperties: output.SamlProperties != null ? de_SamlProperties(output.SamlProperties, context) : undefined, - SelfservicePermissions: - output.SelfservicePermissions != null - ? de_SelfservicePermissions(output.SelfservicePermissions, context) - : undefined, - State: __expectString(output.State), - SubnetIds: output.SubnetIds != null ? de_SubnetIds(output.SubnetIds, context) : undefined, - Tenancy: __expectString(output.Tenancy), - WorkspaceAccessProperties: - output.WorkspaceAccessProperties != null - ? de_WorkspaceAccessProperties(output.WorkspaceAccessProperties, context) - : undefined, - WorkspaceCreationProperties: - output.WorkspaceCreationProperties != null - ? de_DefaultWorkspaceCreationProperties(output.WorkspaceCreationProperties, context) - : undefined, - WorkspaceSecurityGroupId: __expectString(output.WorkspaceSecurityGroupId), - ipGroupIds: output.ipGroupIds != null ? de_IpGroupIdList(output.ipGroupIds, context) : undefined, - } as any; -}; +// de_WorkspaceDirectory omitted. /** * deserializeAws_json1_1WorkspaceImage */ const de_WorkspaceImage = (output: any, context: __SerdeContext): WorkspaceImage => { - return { - Created: - output.Created != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Created))) : undefined, - Description: __expectString(output.Description), - ErrorCode: __expectString(output.ErrorCode), - ErrorMessage: __expectString(output.ErrorMessage), - ImageId: __expectString(output.ImageId), - Name: __expectString(output.Name), - OperatingSystem: output.OperatingSystem != null ? de_OperatingSystem(output.OperatingSystem, context) : undefined, - OwnerAccountId: __expectString(output.OwnerAccountId), - RequiredTenancy: __expectString(output.RequiredTenancy), - State: __expectString(output.State), - Updates: output.Updates != null ? de_UpdateResult(output.Updates, context) : undefined, - } as any; + return take(output, { + Created: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Description: __expectString, + ErrorCode: __expectString, + ErrorMessage: __expectString, + ImageId: __expectString, + Name: __expectString, + OperatingSystem: _json, + OwnerAccountId: __expectString, + RequiredTenancy: __expectString, + State: __expectString, + Updates: _json, + }) as any; }; /** @@ -8087,98 +5643,22 @@ const de_WorkspaceImageList = (output: any, context: __SerdeContext): WorkspaceI const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_WorkspaceImage(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1WorkspaceList - */ -const de_WorkspaceList = (output: any, context: __SerdeContext): Workspace[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Workspace(entry, context); - }); - return retVal; -}; +// de_WorkspaceList omitted. -/** - * deserializeAws_json1_1WorkspaceProperties - */ -const de_WorkspaceProperties = (output: any, context: __SerdeContext): WorkspaceProperties => { - return { - ComputeTypeName: __expectString(output.ComputeTypeName), - Protocols: output.Protocols != null ? de_ProtocolList(output.Protocols, context) : undefined, - RootVolumeSizeGib: __expectInt32(output.RootVolumeSizeGib), - RunningMode: __expectString(output.RunningMode), - RunningModeAutoStopTimeoutInMinutes: __expectInt32(output.RunningModeAutoStopTimeoutInMinutes), - UserVolumeSizeGib: __expectInt32(output.UserVolumeSizeGib), - } as any; -}; +// de_WorkspaceProperties omitted. -/** - * deserializeAws_json1_1WorkspaceRequest - */ -const de_WorkspaceRequest = (output: any, context: __SerdeContext): WorkspaceRequest => { - return { - BundleId: __expectString(output.BundleId), - DirectoryId: __expectString(output.DirectoryId), - RootVolumeEncryptionEnabled: __expectBoolean(output.RootVolumeEncryptionEnabled), - Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined, - UserName: __expectString(output.UserName), - UserVolumeEncryptionEnabled: __expectBoolean(output.UserVolumeEncryptionEnabled), - VolumeEncryptionKey: __expectString(output.VolumeEncryptionKey), - WorkspaceProperties: - output.WorkspaceProperties != null ? de_WorkspaceProperties(output.WorkspaceProperties, context) : undefined, - } as any; -}; +// de_WorkspaceRequest omitted. -/** - * deserializeAws_json1_1WorkspacesDefaultRoleNotFoundException - */ -const de_WorkspacesDefaultRoleNotFoundException = ( - output: any, - context: __SerdeContext -): WorkspacesDefaultRoleNotFoundException => { - return { - message: __expectString(output.message), - } as any; -}; +// de_WorkspacesDefaultRoleNotFoundException omitted. -/** - * deserializeAws_json1_1WorkspacesIpGroup - */ -const de_WorkspacesIpGroup = (output: any, context: __SerdeContext): WorkspacesIpGroup => { - return { - groupDesc: __expectString(output.groupDesc), - groupId: __expectString(output.groupId), - groupName: __expectString(output.groupName), - userRules: output.userRules != null ? de_IpRuleList(output.userRules, context) : undefined, - } as any; -}; +// de_WorkspacesIpGroup omitted. -/** - * deserializeAws_json1_1WorkspacesIpGroupsList - */ -const de_WorkspacesIpGroupsList = (output: any, context: __SerdeContext): WorkspacesIpGroup[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_WorkspacesIpGroup(entry, context); - }); - return retVal; -}; +// de_WorkspacesIpGroupsList omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -8200,6 +5680,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/clients/client-xray/src/protocols/Aws_restJson1.ts b/clients/client-xray/src/protocols/Aws_restJson1.ts index 6aeaa3579d1f..8de2e827bcea 100644 --- a/clients/client-xray/src/protocols/Aws_restJson1.ts +++ b/clients/client-xray/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -11,10 +12,11 @@ import { expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -83,50 +85,27 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../comman import { UpdateGroupCommandInput, UpdateGroupCommandOutput } from "../commands/UpdateGroupCommand"; import { UpdateSamplingRuleCommandInput, UpdateSamplingRuleCommandOutput } from "../commands/UpdateSamplingRuleCommand"; import { - Alias, AnnotationValue, - AnomalousService, - AvailabilityZoneDetail, BackendConnectionErrors, Edge, EdgeStatistics, - EncryptionConfig, - ErrorRootCause, - ErrorRootCauseEntity, - ErrorRootCauseService, - ErrorStatistics, - FaultRootCause, - FaultRootCauseEntity, - FaultRootCauseService, - FaultStatistics, - ForecastStatistics, - Group, - GroupSummary, HistogramEntry, - Http, Insight, - InsightCategory, InsightEvent, - InsightImpactGraphEdge, - InsightImpactGraphService, InsightsConfiguration, InsightState, InsightSummary, - InstanceIdDetail, InvalidPolicyRevisionIdException, InvalidRequestException, LockoutPreventionException, MalformedPolicyDocumentException, PolicyCountLimitExceededException, PolicySizeLimitExceededException, - RequestImpactStatistics, - ResourceARNDetail, ResourceNotFoundException, ResourcePolicy, ResponseTimeRootCause, ResponseTimeRootCauseEntity, ResponseTimeRootCauseService, - RootCauseException, RuleLimitExceededException, SamplingRule, SamplingRuleRecord, @@ -135,9 +114,7 @@ import { SamplingStatisticSummary, SamplingStrategy, SamplingTargetDocument, - Segment, Service, - ServiceId, ServiceStatistics, Tag, TelemetryRecord, @@ -146,9 +123,6 @@ import { TooManyTagsException, Trace, TraceSummary, - TraceUser, - UnprocessedStatistics, - UnprocessedTraceSegment, ValueWithServiceIds, } from "../models/models_0"; import { XRayServiceException as __BaseException } from "../models/XRayServiceException"; @@ -166,10 +140,12 @@ export const se_BatchGetTracesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Traces"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TraceIds != null && { TraceIds: se_TraceIdList(input.TraceIds, context) }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + TraceIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -194,14 +170,14 @@ export const se_CreateGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateGroup"; let body: any; - body = JSON.stringify({ - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.InsightsConfiguration != null && { - InsightsConfiguration: se_InsightsConfiguration(input.InsightsConfiguration, context), - }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + FilterExpression: [], + GroupName: [], + InsightsConfiguration: (_) => _json(_), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -226,10 +202,12 @@ export const se_CreateSamplingRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/CreateSamplingRule"; let body: any; - body = JSON.stringify({ - ...(input.SamplingRule != null && { SamplingRule: se_SamplingRule(input.SamplingRule, context) }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + SamplingRule: (_) => se_SamplingRule(_, context), + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -254,10 +232,12 @@ export const se_DeleteGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteGroup"; let body: any; - body = JSON.stringify({ - ...(input.GroupARN != null && { GroupARN: input.GroupARN }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + GroupARN: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -282,10 +262,12 @@ export const se_DeleteResourcePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteResourcePolicy"; let body: any; - body = JSON.stringify({ - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }), - }); + body = JSON.stringify( + take(input, { + PolicyName: [], + PolicyRevisionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -310,10 +292,12 @@ export const se_DeleteSamplingRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DeleteSamplingRule"; let body: any; - body = JSON.stringify({ - ...(input.RuleARN != null && { RuleARN: input.RuleARN }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - }); + body = JSON.stringify( + take(input, { + RuleARN: [], + RuleName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -363,10 +347,12 @@ export const se_GetGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetGroup"; let body: any; - body = JSON.stringify({ - ...(input.GroupARN != null && { GroupARN: input.GroupARN }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - }); + body = JSON.stringify( + take(input, { + GroupARN: [], + GroupName: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -391,9 +377,11 @@ export const se_GetGroupsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Groups"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -418,9 +406,11 @@ export const se_GetInsightCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/Insight"; let body: any; - body = JSON.stringify({ - ...(input.InsightId != null && { InsightId: input.InsightId }), - }); + body = JSON.stringify( + take(input, { + InsightId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -445,11 +435,13 @@ export const se_GetInsightEventsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InsightEvents"; let body: any; - body = JSON.stringify({ - ...(input.InsightId != null && { InsightId: input.InsightId }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + InsightId: [], + MaxResults: [], + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -474,12 +466,14 @@ export const se_GetInsightImpactGraphCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InsightImpactGraph"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.InsightId != null && { InsightId: input.InsightId }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + InsightId: [], + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -504,15 +498,17 @@ export const se_GetInsightSummariesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/InsightSummaries"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.GroupARN != null && { GroupARN: input.GroupARN }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.MaxResults != null && { MaxResults: input.MaxResults }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.States != null && { States: se_InsightStateList(input.States, context) }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + GroupARN: [], + GroupName: [], + MaxResults: [], + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + States: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -537,9 +533,11 @@ export const se_GetSamplingRulesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetSamplingRules"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -565,9 +563,11 @@ export const se_GetSamplingStatisticSummariesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SamplingStatisticSummaries"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -592,11 +592,11 @@ export const se_GetSamplingTargetsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SamplingTargets"; let body: any; - body = JSON.stringify({ - ...(input.SamplingStatisticsDocuments != null && { - SamplingStatisticsDocuments: se_SamplingStatisticsDocumentList(input.SamplingStatisticsDocuments, context), - }), - }); + body = JSON.stringify( + take(input, { + SamplingStatisticsDocuments: (_) => se_SamplingStatisticsDocumentList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -621,13 +621,15 @@ export const se_GetServiceGraphCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ServiceGraph"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.GroupARN != null && { GroupARN: input.GroupARN }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + GroupARN: [], + GroupName: [], + NextToken: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -653,16 +655,18 @@ export const se_GetTimeSeriesServiceStatisticsCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TimeSeriesServiceStatistics"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.EntitySelectorExpression != null && { EntitySelectorExpression: input.EntitySelectorExpression }), - ...(input.ForecastStatistics != null && { ForecastStatistics: input.ForecastStatistics }), - ...(input.GroupARN != null && { GroupARN: input.GroupARN }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Period != null && { Period: input.Period }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + EntitySelectorExpression: [], + ForecastStatistics: [], + GroupARN: [], + GroupName: [], + NextToken: [], + Period: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -687,10 +691,12 @@ export const se_GetTraceGraphCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TraceGraph"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.TraceIds != null && { TraceIds: se_TraceIdList(input.TraceIds, context) }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + TraceIds: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -715,15 +721,17 @@ export const se_GetTraceSummariesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TraceSummaries"; let body: any; - body = JSON.stringify({ - ...(input.EndTime != null && { EndTime: Math.round(input.EndTime.getTime() / 1000) }), - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.Sampling != null && { Sampling: input.Sampling }), - ...(input.SamplingStrategy != null && { SamplingStrategy: se_SamplingStrategy(input.SamplingStrategy, context) }), - ...(input.StartTime != null && { StartTime: Math.round(input.StartTime.getTime() / 1000) }), - ...(input.TimeRangeType != null && { TimeRangeType: input.TimeRangeType }), - }); + body = JSON.stringify( + take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + FilterExpression: [], + NextToken: [], + Sampling: [], + SamplingStrategy: (_) => se_SamplingStrategy(_, context), + StartTime: (_) => Math.round(_.getTime() / 1000), + TimeRangeType: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -748,9 +756,11 @@ export const se_ListResourcePoliciesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListResourcePolicies"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -775,10 +785,12 @@ export const se_ListTagsForResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/ListTagsForResource"; let body: any; - body = JSON.stringify({ - ...(input.NextToken != null && { NextToken: input.NextToken }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - }); + body = JSON.stringify( + take(input, { + NextToken: [], + ResourceARN: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -803,10 +815,12 @@ export const se_PutEncryptionConfigCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutEncryptionConfig"; let body: any; - body = JSON.stringify({ - ...(input.KeyId != null && { KeyId: input.KeyId }), - ...(input.Type != null && { Type: input.Type }), - }); + body = JSON.stringify( + take(input, { + KeyId: [], + Type: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -831,12 +845,14 @@ export const se_PutResourcePolicyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PutResourcePolicy"; let body: any; - body = JSON.stringify({ - ...(input.BypassPolicyLockoutCheck != null && { BypassPolicyLockoutCheck: input.BypassPolicyLockoutCheck }), - ...(input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument }), - ...(input.PolicyName != null && { PolicyName: input.PolicyName }), - ...(input.PolicyRevisionId != null && { PolicyRevisionId: input.PolicyRevisionId }), - }); + body = JSON.stringify( + take(input, { + BypassPolicyLockoutCheck: [], + PolicyDocument: [], + PolicyName: [], + PolicyRevisionId: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -861,14 +877,14 @@ export const se_PutTelemetryRecordsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TelemetryRecords"; let body: any; - body = JSON.stringify({ - ...(input.EC2InstanceId != null && { EC2InstanceId: input.EC2InstanceId }), - ...(input.Hostname != null && { Hostname: input.Hostname }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TelemetryRecords != null && { - TelemetryRecords: se_TelemetryRecordList(input.TelemetryRecords, context), - }), - }); + body = JSON.stringify( + take(input, { + EC2InstanceId: [], + Hostname: [], + ResourceARN: [], + TelemetryRecords: (_) => se_TelemetryRecordList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -893,11 +909,11 @@ export const se_PutTraceSegmentsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TraceSegments"; let body: any; - body = JSON.stringify({ - ...(input.TraceSegmentDocuments != null && { - TraceSegmentDocuments: se_TraceSegmentDocumentList(input.TraceSegmentDocuments, context), - }), - }); + body = JSON.stringify( + take(input, { + TraceSegmentDocuments: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -922,10 +938,12 @@ export const se_TagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/TagResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + Tags: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -950,10 +968,12 @@ export const se_UntagResourceCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UntagResource"; let body: any; - body = JSON.stringify({ - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.TagKeys != null && { TagKeys: se_TagKeyList(input.TagKeys, context) }), - }); + body = JSON.stringify( + take(input, { + ResourceARN: [], + TagKeys: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -978,14 +998,14 @@ export const se_UpdateGroupCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateGroup"; let body: any; - body = JSON.stringify({ - ...(input.FilterExpression != null && { FilterExpression: input.FilterExpression }), - ...(input.GroupARN != null && { GroupARN: input.GroupARN }), - ...(input.GroupName != null && { GroupName: input.GroupName }), - ...(input.InsightsConfiguration != null && { - InsightsConfiguration: se_InsightsConfiguration(input.InsightsConfiguration, context), - }), - }); + body = JSON.stringify( + take(input, { + FilterExpression: [], + GroupARN: [], + GroupName: [], + InsightsConfiguration: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1010,11 +1030,11 @@ export const se_UpdateSamplingRuleCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/UpdateSamplingRule"; let body: any; - body = JSON.stringify({ - ...(input.SamplingRuleUpdate != null && { - SamplingRuleUpdate: se_SamplingRuleUpdate(input.SamplingRuleUpdate, context), - }), - }); + body = JSON.stringify( + take(input, { + SamplingRuleUpdate: (_) => se_SamplingRuleUpdate(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1040,15 +1060,12 @@ export const de_BatchGetTracesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Traces != null) { - contents.Traces = de_TraceList(data.Traces, context); - } - if (data.UnprocessedTraceIds != null) { - contents.UnprocessedTraceIds = de_UnprocessedTraceIdList(data.UnprocessedTraceIds, context); - } + const doc = take(data, { + NextToken: __expectString, + Traces: (_) => de_TraceList(_, context), + UnprocessedTraceIds: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1073,10 +1090,9 @@ const de_BatchGetTracesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1096,9 +1112,10 @@ export const de_CreateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1123,10 +1140,9 @@ const de_CreateGroupCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1146,9 +1162,10 @@ export const de_CreateSamplingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SamplingRuleRecord != null) { - contents.SamplingRuleRecord = de_SamplingRuleRecord(data.SamplingRuleRecord, context); - } + const doc = take(data, { + SamplingRuleRecord: (_) => de_SamplingRuleRecord(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1176,10 +1193,9 @@ const de_CreateSamplingRuleCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1223,10 +1239,9 @@ const de_DeleteGroupCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1273,10 +1288,9 @@ const de_DeleteResourcePolicyCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1296,9 +1310,10 @@ export const de_DeleteSamplingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SamplingRuleRecord != null) { - contents.SamplingRuleRecord = de_SamplingRuleRecord(data.SamplingRuleRecord, context); - } + const doc = take(data, { + SamplingRuleRecord: (_) => de_SamplingRuleRecord(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1323,10 +1338,9 @@ const de_DeleteSamplingRuleCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1346,9 +1360,10 @@ export const de_GetEncryptionConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EncryptionConfig != null) { - contents.EncryptionConfig = de_EncryptionConfig(data.EncryptionConfig, context); - } + const doc = take(data, { + EncryptionConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1373,10 +1388,9 @@ const de_GetEncryptionConfigCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1396,9 +1410,10 @@ export const de_GetGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1423,10 +1438,9 @@ const de_GetGroupCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1446,12 +1460,11 @@ export const de_GetGroupsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Groups != null) { - contents.Groups = de_GroupSummaryList(data.Groups, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + Groups: _json, + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1476,10 +1489,9 @@ const de_GetGroupsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1499,9 +1511,10 @@ export const de_GetInsightCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Insight != null) { - contents.Insight = de_Insight(data.Insight, context); - } + const doc = take(data, { + Insight: (_) => de_Insight(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1526,10 +1539,9 @@ const de_GetInsightCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1549,12 +1561,11 @@ export const de_GetInsightEventsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InsightEvents != null) { - contents.InsightEvents = de_InsightEventList(data.InsightEvents, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InsightEvents: (_) => de_InsightEventList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1579,10 +1590,9 @@ const de_GetInsightEventsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1602,27 +1612,16 @@ export const de_GetInsightImpactGraphCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EndTime != null) { - contents.EndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.EndTime))); - } - if (data.InsightId != null) { - contents.InsightId = __expectString(data.InsightId); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ServiceGraphEndTime != null) { - contents.ServiceGraphEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ServiceGraphEndTime))); - } - if (data.ServiceGraphStartTime != null) { - contents.ServiceGraphStartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ServiceGraphStartTime))); - } - if (data.Services != null) { - contents.Services = de_InsightImpactGraphServiceList(data.Services, context); - } - if (data.StartTime != null) { - contents.StartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartTime))); - } + const doc = take(data, { + EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InsightId: __expectString, + NextToken: __expectString, + ServiceGraphEndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ServiceGraphStartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Services: _json, + StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1647,10 +1646,9 @@ const de_GetInsightImpactGraphCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1670,12 +1668,11 @@ export const de_GetInsightSummariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.InsightSummaries != null) { - contents.InsightSummaries = de_InsightSummaryList(data.InsightSummaries, context); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } + const doc = take(data, { + InsightSummaries: (_) => de_InsightSummaryList(_, context), + NextToken: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1700,10 +1697,9 @@ const de_GetInsightSummariesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1723,12 +1719,11 @@ export const de_GetSamplingRulesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SamplingRuleRecords != null) { - contents.SamplingRuleRecords = de_SamplingRuleRecordList(data.SamplingRuleRecords, context); - } + const doc = take(data, { + NextToken: __expectString, + SamplingRuleRecords: (_) => de_SamplingRuleRecordList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1753,10 +1748,9 @@ const de_GetSamplingRulesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1776,12 +1770,11 @@ export const de_GetSamplingStatisticSummariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.SamplingStatisticSummaries != null) { - contents.SamplingStatisticSummaries = de_SamplingStatisticSummaryList(data.SamplingStatisticSummaries, context); - } + const doc = take(data, { + NextToken: __expectString, + SamplingStatisticSummaries: (_) => de_SamplingStatisticSummaryList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1806,10 +1799,9 @@ const de_GetSamplingStatisticSummariesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1829,15 +1821,12 @@ export const de_GetSamplingTargetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.LastRuleModification != null) { - contents.LastRuleModification = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LastRuleModification))); - } - if (data.SamplingTargetDocuments != null) { - contents.SamplingTargetDocuments = de_SamplingTargetDocumentList(data.SamplingTargetDocuments, context); - } - if (data.UnprocessedStatistics != null) { - contents.UnprocessedStatistics = de_UnprocessedStatisticsList(data.UnprocessedStatistics, context); - } + const doc = take(data, { + LastRuleModification: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SamplingTargetDocuments: (_) => de_SamplingTargetDocumentList(_, context), + UnprocessedStatistics: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -1862,10 +1851,9 @@ const de_GetSamplingTargetsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1885,21 +1873,14 @@ export const de_GetServiceGraphCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContainsOldGroupVersions != null) { - contents.ContainsOldGroupVersions = __expectBoolean(data.ContainsOldGroupVersions); - } - if (data.EndTime != null) { - contents.EndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.EndTime))); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Services != null) { - contents.Services = de_ServiceList(data.Services, context); - } - if (data.StartTime != null) { - contents.StartTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.StartTime))); - } + const doc = take(data, { + ContainsOldGroupVersions: __expectBoolean, + EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextToken: __expectString, + Services: (_) => de_ServiceList(_, context), + StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1924,10 +1905,9 @@ const de_GetServiceGraphCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -1947,18 +1927,12 @@ export const de_GetTimeSeriesServiceStatisticsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ContainsOldGroupVersions != null) { - contents.ContainsOldGroupVersions = __expectBoolean(data.ContainsOldGroupVersions); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TimeSeriesServiceStatistics != null) { - contents.TimeSeriesServiceStatistics = de_TimeSeriesServiceStatisticsList( - data.TimeSeriesServiceStatistics, - context - ); - } + const doc = take(data, { + ContainsOldGroupVersions: __expectBoolean, + NextToken: __expectString, + TimeSeriesServiceStatistics: (_) => de_TimeSeriesServiceStatisticsList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1983,10 +1957,9 @@ const de_GetTimeSeriesServiceStatisticsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2006,12 +1979,11 @@ export const de_GetTraceGraphCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Services != null) { - contents.Services = de_ServiceList(data.Services, context); - } + const doc = take(data, { + NextToken: __expectString, + Services: (_) => de_ServiceList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2036,10 +2008,9 @@ const de_GetTraceGraphCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2059,18 +2030,13 @@ export const de_GetTraceSummariesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ApproximateTime != null) { - contents.ApproximateTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.ApproximateTime))); - } - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.TraceSummaries != null) { - contents.TraceSummaries = de_TraceSummaryList(data.TraceSummaries, context); - } - if (data.TracesProcessedCount != null) { - contents.TracesProcessedCount = __expectLong(data.TracesProcessedCount); - } + const doc = take(data, { + ApproximateTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + NextToken: __expectString, + TraceSummaries: (_) => de_TraceSummaryList(_, context), + TracesProcessedCount: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -2095,10 +2061,9 @@ const de_GetTraceSummariesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2118,12 +2083,11 @@ export const de_ListResourcePoliciesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.ResourcePolicies != null) { - contents.ResourcePolicies = de_ResourcePolicyList(data.ResourcePolicies, context); - } + const doc = take(data, { + NextToken: __expectString, + ResourcePolicies: (_) => de_ResourcePolicyList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2148,10 +2112,9 @@ const de_ListResourcePoliciesCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2171,12 +2134,11 @@ export const de_ListTagsForResourceCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.NextToken != null) { - contents.NextToken = __expectString(data.NextToken); - } - if (data.Tags != null) { - contents.Tags = de_TagList(data.Tags, context); - } + const doc = take(data, { + NextToken: __expectString, + Tags: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2204,10 +2166,9 @@ const de_ListTagsForResourceCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2227,9 +2188,10 @@ export const de_PutEncryptionConfigCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.EncryptionConfig != null) { - contents.EncryptionConfig = de_EncryptionConfig(data.EncryptionConfig, context); - } + const doc = take(data, { + EncryptionConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2254,10 +2216,9 @@ const de_PutEncryptionConfigCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2277,9 +2238,10 @@ export const de_PutResourcePolicyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.ResourcePolicy != null) { - contents.ResourcePolicy = de_ResourcePolicy(data.ResourcePolicy, context); - } + const doc = take(data, { + ResourcePolicy: (_) => de_ResourcePolicy(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2316,10 +2278,9 @@ const de_PutResourcePolicyCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2363,10 +2324,9 @@ const de_PutTelemetryRecordsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2386,9 +2346,10 @@ export const de_PutTraceSegmentsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.UnprocessedTraceSegments != null) { - contents.UnprocessedTraceSegments = de_UnprocessedTraceSegmentList(data.UnprocessedTraceSegments, context); - } + const doc = take(data, { + UnprocessedTraceSegments: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2413,10 +2374,9 @@ const de_PutTraceSegmentsCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2466,10 +2426,9 @@ const de_TagResourceCommandError = async ( throw await de_TooManyTagsExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2516,10 +2475,9 @@ const de_UntagResourceCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2539,9 +2497,10 @@ export const de_UpdateGroupCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.Group != null) { - contents.Group = de_Group(data.Group, context); - } + const doc = take(data, { + Group: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -2566,10 +2525,9 @@ const de_UpdateGroupCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -2589,9 +2547,10 @@ export const de_UpdateSamplingRuleCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.SamplingRuleRecord != null) { - contents.SamplingRuleRecord = de_SamplingRuleRecord(data.SamplingRuleRecord, context); - } + const doc = take(data, { + SamplingRuleRecord: (_) => de_SamplingRuleRecord(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2616,16 +2575,15 @@ const de_UpdateSamplingRuleCommandError = async ( throw await de_ThrottledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1InvalidPolicyRevisionIdExceptionRes */ @@ -2635,9 +2593,10 @@ const de_InvalidPolicyRevisionIdExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidPolicyRevisionIdException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2654,9 +2613,10 @@ const de_InvalidRequestExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2673,9 +2633,10 @@ const de_LockoutPreventionExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new LockoutPreventionException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2692,9 +2653,10 @@ const de_MalformedPolicyDocumentExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new MalformedPolicyDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2711,9 +2673,10 @@ const de_PolicyCountLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new PolicyCountLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2730,9 +2693,10 @@ const de_PolicySizeLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new PolicySizeLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2749,12 +2713,11 @@ const de_ResourceNotFoundExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2771,9 +2734,10 @@ const de_RuleLimitExceededExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new RuleLimitExceededException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2787,9 +2751,10 @@ const de_RuleLimitExceededExceptionRes = async ( const de_ThrottledExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new ThrottledException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2806,12 +2771,11 @@ const de_TooManyTagsExceptionRes = async ( ): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } - if (data.ResourceName != null) { - contents.ResourceName = __expectString(data.ResourceName); - } + const doc = take(data, { + Message: __expectString, + ResourceName: __expectString, + }); + Object.assign(contents, doc); const exception = new TooManyTagsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -2819,107 +2783,67 @@ const de_TooManyTagsExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1AttributeMap - */ -const se_AttributeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_AttributeMap omitted. -/** - * serializeAws_restJson1BackendConnectionErrors - */ -const se_BackendConnectionErrors = (input: BackendConnectionErrors, context: __SerdeContext): any => { - return { - ...(input.ConnectionRefusedCount != null && { ConnectionRefusedCount: input.ConnectionRefusedCount }), - ...(input.HTTPCode4XXCount != null && { HTTPCode4XXCount: input.HTTPCode4XXCount }), - ...(input.HTTPCode5XXCount != null && { HTTPCode5XXCount: input.HTTPCode5XXCount }), - ...(input.OtherCount != null && { OtherCount: input.OtherCount }), - ...(input.TimeoutCount != null && { TimeoutCount: input.TimeoutCount }), - ...(input.UnknownHostCount != null && { UnknownHostCount: input.UnknownHostCount }), - }; -}; +// se_BackendConnectionErrors omitted. -/** - * serializeAws_restJson1InsightsConfiguration - */ -const se_InsightsConfiguration = (input: InsightsConfiguration, context: __SerdeContext): any => { - return { - ...(input.InsightsEnabled != null && { InsightsEnabled: input.InsightsEnabled }), - ...(input.NotificationsEnabled != null && { NotificationsEnabled: input.NotificationsEnabled }), - }; -}; +// se_InsightsConfiguration omitted. -/** - * serializeAws_restJson1InsightStateList - */ -const se_InsightStateList = (input: (InsightState | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_InsightStateList omitted. /** * serializeAws_restJson1SamplingRule */ const se_SamplingRule = (input: SamplingRule, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_AttributeMap(input.Attributes, context) }), - ...(input.FixedRate != null && { FixedRate: __serializeFloat(input.FixedRate) }), - ...(input.HTTPMethod != null && { HTTPMethod: input.HTTPMethod }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.ReservoirSize != null && { ReservoirSize: input.ReservoirSize }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RuleARN != null && { RuleARN: input.RuleARN }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - ...(input.URLPath != null && { URLPath: input.URLPath }), - ...(input.Version != null && { Version: input.Version }), - }; + return take(input, { + Attributes: _json, + FixedRate: __serializeFloat, + HTTPMethod: [], + Host: [], + Priority: [], + ReservoirSize: [], + ResourceARN: [], + RuleARN: [], + RuleName: [], + ServiceName: [], + ServiceType: [], + URLPath: [], + Version: [], + }); }; /** * serializeAws_restJson1SamplingRuleUpdate */ const se_SamplingRuleUpdate = (input: SamplingRuleUpdate, context: __SerdeContext): any => { - return { - ...(input.Attributes != null && { Attributes: se_AttributeMap(input.Attributes, context) }), - ...(input.FixedRate != null && { FixedRate: __serializeFloat(input.FixedRate) }), - ...(input.HTTPMethod != null && { HTTPMethod: input.HTTPMethod }), - ...(input.Host != null && { Host: input.Host }), - ...(input.Priority != null && { Priority: input.Priority }), - ...(input.ReservoirSize != null && { ReservoirSize: input.ReservoirSize }), - ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), - ...(input.RuleARN != null && { RuleARN: input.RuleARN }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.ServiceName != null && { ServiceName: input.ServiceName }), - ...(input.ServiceType != null && { ServiceType: input.ServiceType }), - ...(input.URLPath != null && { URLPath: input.URLPath }), - }; + return take(input, { + Attributes: _json, + FixedRate: __serializeFloat, + HTTPMethod: [], + Host: [], + Priority: [], + ReservoirSize: [], + ResourceARN: [], + RuleARN: [], + RuleName: [], + ServiceName: [], + ServiceType: [], + URLPath: [], + }); }; /** * serializeAws_restJson1SamplingStatisticsDocument */ const se_SamplingStatisticsDocument = (input: SamplingStatisticsDocument, context: __SerdeContext): any => { - return { - ...(input.BorrowCount != null && { BorrowCount: input.BorrowCount }), - ...(input.ClientID != null && { ClientID: input.ClientID }), - ...(input.RequestCount != null && { RequestCount: input.RequestCount }), - ...(input.RuleName != null && { RuleName: input.RuleName }), - ...(input.SampledCount != null && { SampledCount: input.SampledCount }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - }; + return take(input, { + BorrowCount: [], + ClientID: [], + RequestCount: [], + RuleName: [], + SampledCount: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -2937,58 +2861,30 @@ const se_SamplingStatisticsDocumentList = (input: SamplingStatisticsDocument[], * serializeAws_restJson1SamplingStrategy */ const se_SamplingStrategy = (input: SamplingStrategy, context: __SerdeContext): any => { - return { - ...(input.Name != null && { Name: input.Name }), - ...(input.Value != null && { Value: __serializeFloat(input.Value) }), - }; + return take(input, { + Name: [], + Value: __serializeFloat, + }); }; -/** - * serializeAws_restJson1Tag - */ -const se_Tag = (input: Tag, context: __SerdeContext): any => { - return { - ...(input.Key != null && { Key: input.Key }), - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_Tag omitted. -/** - * serializeAws_restJson1TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TagKeyList omitted. -/** - * serializeAws_restJson1TagList - */ -const se_TagList = (input: Tag[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_Tag(entry, context); - }); -}; +// se_TagList omitted. /** * serializeAws_restJson1TelemetryRecord */ const se_TelemetryRecord = (input: TelemetryRecord, context: __SerdeContext): any => { - return { - ...(input.BackendConnectionErrors != null && { - BackendConnectionErrors: se_BackendConnectionErrors(input.BackendConnectionErrors, context), - }), - ...(input.SegmentsReceivedCount != null && { SegmentsReceivedCount: input.SegmentsReceivedCount }), - ...(input.SegmentsRejectedCount != null && { SegmentsRejectedCount: input.SegmentsRejectedCount }), - ...(input.SegmentsSentCount != null && { SegmentsSentCount: input.SegmentsSentCount }), - ...(input.SegmentsSpilloverCount != null && { SegmentsSpilloverCount: input.SegmentsSpilloverCount }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - }; + return take(input, { + BackendConnectionErrors: _json, + SegmentsReceivedCount: [], + SegmentsRejectedCount: [], + SegmentsSentCount: [], + SegmentsSpilloverCount: [], + Timestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -3002,68 +2898,15 @@ const se_TelemetryRecordList = (input: TelemetryRecord[], context: __SerdeContex }); }; -/** - * serializeAws_restJson1TraceIdList - */ -const se_TraceIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TraceIdList omitted. -/** - * serializeAws_restJson1TraceSegmentDocumentList - */ -const se_TraceSegmentDocumentList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_TraceSegmentDocumentList omitted. -/** - * deserializeAws_restJson1Alias - */ -const de_Alias = (output: any, context: __SerdeContext): Alias => { - return { - Name: __expectString(output.Name), - Names: output.Names != null ? de_AliasNames(output.Names, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_Alias omitted. -/** - * deserializeAws_restJson1AliasList - */ -const de_AliasList = (output: any, context: __SerdeContext): Alias[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Alias(entry, context); - }); - return retVal; -}; +// de_AliasList omitted. -/** - * deserializeAws_restJson1AliasNames - */ -const de_AliasNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_AliasNames omitted. /** * deserializeAws_restJson1Annotations @@ -3094,71 +2937,28 @@ const de_AnnotationValue = (output: any, context: __SerdeContext): AnnotationVal return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1AnomalousService - */ -const de_AnomalousService = (output: any, context: __SerdeContext): AnomalousService => { - return { - ServiceId: output.ServiceId != null ? de_ServiceId(output.ServiceId, context) : undefined, - } as any; -}; +// de_AnomalousService omitted. -/** - * deserializeAws_restJson1AnomalousServiceList - */ -const de_AnomalousServiceList = (output: any, context: __SerdeContext): AnomalousService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AnomalousService(entry, context); - }); - return retVal; -}; +// de_AnomalousServiceList omitted. -/** - * deserializeAws_restJson1AttributeMap - */ -const de_AttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_AttributeMap omitted. -/** - * deserializeAws_restJson1AvailabilityZoneDetail - */ -const de_AvailabilityZoneDetail = (output: any, context: __SerdeContext): AvailabilityZoneDetail => { - return { - Name: __expectString(output.Name), - } as any; -}; +// de_AvailabilityZoneDetail omitted. /** * deserializeAws_restJson1Edge */ const de_Edge = (output: any, context: __SerdeContext): Edge => { - return { - Aliases: output.Aliases != null ? de_AliasList(output.Aliases, context) : undefined, - EdgeType: __expectString(output.EdgeType), - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - ReceivedEventAgeHistogram: - output.ReceivedEventAgeHistogram != null ? de_Histogram(output.ReceivedEventAgeHistogram, context) : undefined, - ReferenceId: __expectInt32(output.ReferenceId), - ResponseTimeHistogram: - output.ResponseTimeHistogram != null ? de_Histogram(output.ResponseTimeHistogram, context) : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - SummaryStatistics: - output.SummaryStatistics != null ? de_EdgeStatistics(output.SummaryStatistics, context) : undefined, - } as any; + return take(output, { + Aliases: _json, + EdgeType: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ReceivedEventAgeHistogram: (_: any) => de_Histogram(_, context), + ReferenceId: __expectInt32, + ResponseTimeHistogram: (_: any) => de_Histogram(_, context), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SummaryStatistics: (_: any) => de_EdgeStatistics(_, context), + }) as any; }; /** @@ -3168,9 +2968,6 @@ const de_EdgeList = (output: any, context: __SerdeContext): Edge[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Edge(entry, context); }); return retVal; @@ -3180,261 +2977,52 @@ const de_EdgeList = (output: any, context: __SerdeContext): Edge[] => { * deserializeAws_restJson1EdgeStatistics */ const de_EdgeStatistics = (output: any, context: __SerdeContext): EdgeStatistics => { - return { - ErrorStatistics: output.ErrorStatistics != null ? de_ErrorStatistics(output.ErrorStatistics, context) : undefined, - FaultStatistics: output.FaultStatistics != null ? de_FaultStatistics(output.FaultStatistics, context) : undefined, - OkCount: __expectLong(output.OkCount), - TotalCount: __expectLong(output.TotalCount), - TotalResponseTime: __limitedParseDouble(output.TotalResponseTime), - } as any; + return take(output, { + ErrorStatistics: _json, + FaultStatistics: _json, + OkCount: __expectLong, + TotalCount: __expectLong, + TotalResponseTime: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1EncryptionConfig - */ -const de_EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => { - return { - KeyId: __expectString(output.KeyId), - Status: __expectString(output.Status), - Type: __expectString(output.Type), - } as any; -}; +// de_EncryptionConfig omitted. -/** - * deserializeAws_restJson1ErrorRootCause - */ -const de_ErrorRootCause = (output: any, context: __SerdeContext): ErrorRootCause => { - return { - ClientImpacting: __expectBoolean(output.ClientImpacting), - Services: output.Services != null ? de_ErrorRootCauseServices(output.Services, context) : undefined, - } as any; -}; +// de_ErrorRootCause omitted. -/** - * deserializeAws_restJson1ErrorRootCauseEntity - */ -const de_ErrorRootCauseEntity = (output: any, context: __SerdeContext): ErrorRootCauseEntity => { - return { - Exceptions: output.Exceptions != null ? de_RootCauseExceptions(output.Exceptions, context) : undefined, - Name: __expectString(output.Name), - Remote: __expectBoolean(output.Remote), - } as any; -}; +// de_ErrorRootCauseEntity omitted. -/** - * deserializeAws_restJson1ErrorRootCauseEntityPath - */ -const de_ErrorRootCauseEntityPath = (output: any, context: __SerdeContext): ErrorRootCauseEntity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorRootCauseEntity(entry, context); - }); - return retVal; -}; +// de_ErrorRootCauseEntityPath omitted. -/** - * deserializeAws_restJson1ErrorRootCauses - */ -const de_ErrorRootCauses = (output: any, context: __SerdeContext): ErrorRootCause[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorRootCause(entry, context); - }); - return retVal; -}; +// de_ErrorRootCauses omitted. -/** - * deserializeAws_restJson1ErrorRootCauseService - */ -const de_ErrorRootCauseService = (output: any, context: __SerdeContext): ErrorRootCauseService => { - return { - AccountId: __expectString(output.AccountId), - EntityPath: output.EntityPath != null ? de_ErrorRootCauseEntityPath(output.EntityPath, context) : undefined, - Inferred: __expectBoolean(output.Inferred), - Name: __expectString(output.Name), - Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_ErrorRootCauseService omitted. -/** - * deserializeAws_restJson1ErrorRootCauseServices - */ -const de_ErrorRootCauseServices = (output: any, context: __SerdeContext): ErrorRootCauseService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ErrorRootCauseService(entry, context); - }); - return retVal; -}; +// de_ErrorRootCauseServices omitted. -/** - * deserializeAws_restJson1ErrorStatistics - */ -const de_ErrorStatistics = (output: any, context: __SerdeContext): ErrorStatistics => { - return { - OtherCount: __expectLong(output.OtherCount), - ThrottleCount: __expectLong(output.ThrottleCount), - TotalCount: __expectLong(output.TotalCount), - } as any; -}; +// de_ErrorStatistics omitted. -/** - * deserializeAws_restJson1FaultRootCause - */ -const de_FaultRootCause = (output: any, context: __SerdeContext): FaultRootCause => { - return { - ClientImpacting: __expectBoolean(output.ClientImpacting), - Services: output.Services != null ? de_FaultRootCauseServices(output.Services, context) : undefined, - } as any; -}; +// de_FaultRootCause omitted. -/** - * deserializeAws_restJson1FaultRootCauseEntity - */ -const de_FaultRootCauseEntity = (output: any, context: __SerdeContext): FaultRootCauseEntity => { - return { - Exceptions: output.Exceptions != null ? de_RootCauseExceptions(output.Exceptions, context) : undefined, - Name: __expectString(output.Name), - Remote: __expectBoolean(output.Remote), - } as any; -}; +// de_FaultRootCauseEntity omitted. -/** - * deserializeAws_restJson1FaultRootCauseEntityPath - */ -const de_FaultRootCauseEntityPath = (output: any, context: __SerdeContext): FaultRootCauseEntity[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FaultRootCauseEntity(entry, context); - }); - return retVal; -}; +// de_FaultRootCauseEntityPath omitted. -/** - * deserializeAws_restJson1FaultRootCauses - */ -const de_FaultRootCauses = (output: any, context: __SerdeContext): FaultRootCause[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FaultRootCause(entry, context); - }); - return retVal; -}; +// de_FaultRootCauses omitted. -/** - * deserializeAws_restJson1FaultRootCauseService - */ -const de_FaultRootCauseService = (output: any, context: __SerdeContext): FaultRootCauseService => { - return { - AccountId: __expectString(output.AccountId), - EntityPath: output.EntityPath != null ? de_FaultRootCauseEntityPath(output.EntityPath, context) : undefined, - Inferred: __expectBoolean(output.Inferred), - Name: __expectString(output.Name), - Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; +// de_FaultRootCauseService omitted. -/** - * deserializeAws_restJson1FaultRootCauseServices - */ -const de_FaultRootCauseServices = (output: any, context: __SerdeContext): FaultRootCauseService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_FaultRootCauseService(entry, context); - }); - return retVal; -}; +// de_FaultRootCauseServices omitted. -/** - * deserializeAws_restJson1FaultStatistics - */ -const de_FaultStatistics = (output: any, context: __SerdeContext): FaultStatistics => { - return { - OtherCount: __expectLong(output.OtherCount), - TotalCount: __expectLong(output.TotalCount), - } as any; -}; +// de_FaultStatistics omitted. -/** - * deserializeAws_restJson1ForecastStatistics - */ -const de_ForecastStatistics = (output: any, context: __SerdeContext): ForecastStatistics => { - return { - FaultCountHigh: __expectLong(output.FaultCountHigh), - FaultCountLow: __expectLong(output.FaultCountLow), - } as any; -}; +// de_ForecastStatistics omitted. -/** - * deserializeAws_restJson1Group - */ -const de_Group = (output: any, context: __SerdeContext): Group => { - return { - FilterExpression: __expectString(output.FilterExpression), - GroupARN: __expectString(output.GroupARN), - GroupName: __expectString(output.GroupName), - InsightsConfiguration: - output.InsightsConfiguration != null - ? de_InsightsConfiguration(output.InsightsConfiguration, context) - : undefined, - } as any; -}; +// de_Group omitted. -/** - * deserializeAws_restJson1GroupSummary - */ -const de_GroupSummary = (output: any, context: __SerdeContext): GroupSummary => { - return { - FilterExpression: __expectString(output.FilterExpression), - GroupARN: __expectString(output.GroupARN), - GroupName: __expectString(output.GroupName), - InsightsConfiguration: - output.InsightsConfiguration != null - ? de_InsightsConfiguration(output.InsightsConfiguration, context) - : undefined, - } as any; -}; +// de_GroupSummary omitted. -/** - * deserializeAws_restJson1GroupSummaryList - */ -const de_GroupSummaryList = (output: any, context: __SerdeContext): GroupSummary[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_GroupSummary(entry, context); - }); - return retVal; -}; +// de_GroupSummaryList omitted. /** * deserializeAws_restJson1Histogram @@ -3443,9 +3031,6 @@ const de_Histogram = (output: any, context: __SerdeContext): HistogramEntry[] => const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_HistogramEntry(entry, context); }); return retVal; @@ -3455,89 +3040,47 @@ const de_Histogram = (output: any, context: __SerdeContext): HistogramEntry[] => * deserializeAws_restJson1HistogramEntry */ const de_HistogramEntry = (output: any, context: __SerdeContext): HistogramEntry => { - return { - Count: __expectInt32(output.Count), - Value: __limitedParseDouble(output.Value), - } as any; + return take(output, { + Count: __expectInt32, + Value: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1Http - */ -const de_Http = (output: any, context: __SerdeContext): Http => { - return { - ClientIp: __expectString(output.ClientIp), - HttpMethod: __expectString(output.HttpMethod), - HttpStatus: __expectInt32(output.HttpStatus), - HttpURL: __expectString(output.HttpURL), - UserAgent: __expectString(output.UserAgent), - } as any; -}; +// de_Http omitted. /** * deserializeAws_restJson1Insight */ const de_Insight = (output: any, context: __SerdeContext): Insight => { - return { - Categories: output.Categories != null ? de_InsightCategoryList(output.Categories, context) : undefined, - ClientRequestImpactStatistics: - output.ClientRequestImpactStatistics != null - ? de_RequestImpactStatistics(output.ClientRequestImpactStatistics, context) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - GroupARN: __expectString(output.GroupARN), - GroupName: __expectString(output.GroupName), - InsightId: __expectString(output.InsightId), - RootCauseServiceId: - output.RootCauseServiceId != null ? de_ServiceId(output.RootCauseServiceId, context) : undefined, - RootCauseServiceRequestImpactStatistics: - output.RootCauseServiceRequestImpactStatistics != null - ? de_RequestImpactStatistics(output.RootCauseServiceRequestImpactStatistics, context) - : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - Summary: __expectString(output.Summary), - TopAnomalousServices: - output.TopAnomalousServices != null ? de_AnomalousServiceList(output.TopAnomalousServices, context) : undefined, - } as any; -}; - -/** - * deserializeAws_restJson1InsightCategoryList - */ -const de_InsightCategoryList = (output: any, context: __SerdeContext): (InsightCategory | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; + return take(output, { + Categories: _json, + ClientRequestImpactStatistics: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GroupARN: __expectString, + GroupName: __expectString, + InsightId: __expectString, + RootCauseServiceId: _json, + RootCauseServiceRequestImpactStatistics: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + Summary: __expectString, + TopAnomalousServices: _json, + }) as any; }; +// de_InsightCategoryList omitted. + /** * deserializeAws_restJson1InsightEvent */ const de_InsightEvent = (output: any, context: __SerdeContext): InsightEvent => { - return { - ClientRequestImpactStatistics: - output.ClientRequestImpactStatistics != null - ? de_RequestImpactStatistics(output.ClientRequestImpactStatistics, context) - : undefined, - EventTime: - output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined, - RootCauseServiceRequestImpactStatistics: - output.RootCauseServiceRequestImpactStatistics != null - ? de_RequestImpactStatistics(output.RootCauseServiceRequestImpactStatistics, context) - : undefined, - Summary: __expectString(output.Summary), - TopAnomalousServices: - output.TopAnomalousServices != null ? de_AnomalousServiceList(output.TopAnomalousServices, context) : undefined, - } as any; + return take(output, { + ClientRequestImpactStatistics: _json, + EventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RootCauseServiceRequestImpactStatistics: _json, + Summary: __expectString, + TopAnomalousServices: _json, + }) as any; }; /** @@ -3547,109 +3090,40 @@ const de_InsightEventList = (output: any, context: __SerdeContext): InsightEvent const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InsightEvent(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InsightImpactGraphEdge - */ -const de_InsightImpactGraphEdge = (output: any, context: __SerdeContext): InsightImpactGraphEdge => { - return { - ReferenceId: __expectInt32(output.ReferenceId), - } as any; -}; +// de_InsightImpactGraphEdge omitted. -/** - * deserializeAws_restJson1InsightImpactGraphEdgeList - */ -const de_InsightImpactGraphEdgeList = (output: any, context: __SerdeContext): InsightImpactGraphEdge[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InsightImpactGraphEdge(entry, context); - }); - return retVal; -}; +// de_InsightImpactGraphEdgeList omitted. -/** - * deserializeAws_restJson1InsightImpactGraphService - */ -const de_InsightImpactGraphService = (output: any, context: __SerdeContext): InsightImpactGraphService => { - return { - AccountId: __expectString(output.AccountId), - Edges: output.Edges != null ? de_InsightImpactGraphEdgeList(output.Edges, context) : undefined, - Name: __expectString(output.Name), - Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined, - ReferenceId: __expectInt32(output.ReferenceId), - Type: __expectString(output.Type), - } as any; -}; +// de_InsightImpactGraphService omitted. -/** - * deserializeAws_restJson1InsightImpactGraphServiceList - */ -const de_InsightImpactGraphServiceList = (output: any, context: __SerdeContext): InsightImpactGraphService[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InsightImpactGraphService(entry, context); - }); - return retVal; -}; +// de_InsightImpactGraphServiceList omitted. -/** - * deserializeAws_restJson1InsightsConfiguration - */ -const de_InsightsConfiguration = (output: any, context: __SerdeContext): InsightsConfiguration => { - return { - InsightsEnabled: __expectBoolean(output.InsightsEnabled), - NotificationsEnabled: __expectBoolean(output.NotificationsEnabled), - } as any; -}; +// de_InsightsConfiguration omitted. /** * deserializeAws_restJson1InsightSummary */ const de_InsightSummary = (output: any, context: __SerdeContext): InsightSummary => { - return { - Categories: output.Categories != null ? de_InsightCategoryList(output.Categories, context) : undefined, - ClientRequestImpactStatistics: - output.ClientRequestImpactStatistics != null - ? de_RequestImpactStatistics(output.ClientRequestImpactStatistics, context) - : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - GroupARN: __expectString(output.GroupARN), - GroupName: __expectString(output.GroupName), - InsightId: __expectString(output.InsightId), - LastUpdateTime: - output.LastUpdateTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdateTime))) - : undefined, - RootCauseServiceId: - output.RootCauseServiceId != null ? de_ServiceId(output.RootCauseServiceId, context) : undefined, - RootCauseServiceRequestImpactStatistics: - output.RootCauseServiceRequestImpactStatistics != null - ? de_RequestImpactStatistics(output.RootCauseServiceRequestImpactStatistics, context) - : undefined, - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - Summary: __expectString(output.Summary), - TopAnomalousServices: - output.TopAnomalousServices != null ? de_AnomalousServiceList(output.TopAnomalousServices, context) : undefined, - } as any; + return take(output, { + Categories: _json, + ClientRequestImpactStatistics: _json, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + GroupARN: __expectString, + GroupName: __expectString, + InsightId: __expectString, + LastUpdateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RootCauseServiceId: _json, + RootCauseServiceRequestImpactStatistics: _json, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + Summary: __expectString, + TopAnomalousServices: _json, + }) as any; }; /** @@ -3659,56 +3133,27 @@ const de_InsightSummaryList = (output: any, context: __SerdeContext): InsightSum const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_InsightSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1InstanceIdDetail - */ -const de_InstanceIdDetail = (output: any, context: __SerdeContext): InstanceIdDetail => { - return { - Id: __expectString(output.Id), - } as any; -}; +// de_InstanceIdDetail omitted. -/** - * deserializeAws_restJson1RequestImpactStatistics - */ -const de_RequestImpactStatistics = (output: any, context: __SerdeContext): RequestImpactStatistics => { - return { - FaultCount: __expectLong(output.FaultCount), - OkCount: __expectLong(output.OkCount), - TotalCount: __expectLong(output.TotalCount), - } as any; -}; +// de_RequestImpactStatistics omitted. -/** - * deserializeAws_restJson1ResourceARNDetail - */ -const de_ResourceARNDetail = (output: any, context: __SerdeContext): ResourceARNDetail => { - return { - ARN: __expectString(output.ARN), - } as any; -}; +// de_ResourceARNDetail omitted. /** * deserializeAws_restJson1ResourcePolicy */ const de_ResourcePolicy = (output: any, context: __SerdeContext): ResourcePolicy => { - return { - LastUpdatedTime: - output.LastUpdatedTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastUpdatedTime))) - : undefined, - PolicyDocument: __expectString(output.PolicyDocument), - PolicyName: __expectString(output.PolicyName), - PolicyRevisionId: __expectString(output.PolicyRevisionId), - } as any; + return take(output, { + LastUpdatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + PolicyDocument: __expectString, + PolicyName: __expectString, + PolicyRevisionId: __expectString, + }) as any; }; /** @@ -3718,9 +3163,6 @@ const de_ResourcePolicyList = (output: any, context: __SerdeContext): ResourcePo const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResourcePolicy(entry, context); }); return retVal; @@ -3730,21 +3172,21 @@ const de_ResourcePolicyList = (output: any, context: __SerdeContext): ResourcePo * deserializeAws_restJson1ResponseTimeRootCause */ const de_ResponseTimeRootCause = (output: any, context: __SerdeContext): ResponseTimeRootCause => { - return { - ClientImpacting: __expectBoolean(output.ClientImpacting), - Services: output.Services != null ? de_ResponseTimeRootCauseServices(output.Services, context) : undefined, - } as any; + return take(output, { + ClientImpacting: __expectBoolean, + Services: (_: any) => de_ResponseTimeRootCauseServices(_, context), + }) as any; }; /** * deserializeAws_restJson1ResponseTimeRootCauseEntity */ const de_ResponseTimeRootCauseEntity = (output: any, context: __SerdeContext): ResponseTimeRootCauseEntity => { - return { - Coverage: __limitedParseDouble(output.Coverage), - Name: __expectString(output.Name), - Remote: __expectBoolean(output.Remote), - } as any; + return take(output, { + Coverage: __limitedParseDouble, + Name: __expectString, + Remote: __expectBoolean, + }) as any; }; /** @@ -3754,9 +3196,6 @@ const de_ResponseTimeRootCauseEntityPath = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResponseTimeRootCauseEntity(entry, context); }); return retVal; @@ -3769,9 +3208,6 @@ const de_ResponseTimeRootCauses = (output: any, context: __SerdeContext): Respon const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResponseTimeRootCause(entry, context); }); return retVal; @@ -3781,14 +3217,14 @@ const de_ResponseTimeRootCauses = (output: any, context: __SerdeContext): Respon * deserializeAws_restJson1ResponseTimeRootCauseService */ const de_ResponseTimeRootCauseService = (output: any, context: __SerdeContext): ResponseTimeRootCauseService => { - return { - AccountId: __expectString(output.AccountId), - EntityPath: output.EntityPath != null ? de_ResponseTimeRootCauseEntityPath(output.EntityPath, context) : undefined, - Inferred: __expectBoolean(output.Inferred), - Name: __expectString(output.Name), - Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined, - Type: __expectString(output.Type), - } as any; + return take(output, { + AccountId: __expectString, + EntityPath: (_: any) => de_ResponseTimeRootCauseEntityPath(_, context), + Inferred: __expectBoolean, + Name: __expectString, + Names: _json, + Type: __expectString, + }) as any; }; /** @@ -3798,71 +3234,45 @@ const de_ResponseTimeRootCauseServices = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ResponseTimeRootCauseService(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1RootCauseException - */ -const de_RootCauseException = (output: any, context: __SerdeContext): RootCauseException => { - return { - Message: __expectString(output.Message), - Name: __expectString(output.Name), - } as any; -}; +// de_RootCauseException omitted. -/** - * deserializeAws_restJson1RootCauseExceptions - */ -const de_RootCauseExceptions = (output: any, context: __SerdeContext): RootCauseException[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_RootCauseException(entry, context); - }); - return retVal; -}; +// de_RootCauseExceptions omitted. /** * deserializeAws_restJson1SamplingRule */ const de_SamplingRule = (output: any, context: __SerdeContext): SamplingRule => { - return { - Attributes: output.Attributes != null ? de_AttributeMap(output.Attributes, context) : undefined, - FixedRate: __limitedParseDouble(output.FixedRate), - HTTPMethod: __expectString(output.HTTPMethod), - Host: __expectString(output.Host), - Priority: __expectInt32(output.Priority), - ReservoirSize: __expectInt32(output.ReservoirSize), - ResourceARN: __expectString(output.ResourceARN), - RuleARN: __expectString(output.RuleARN), - RuleName: __expectString(output.RuleName), - ServiceName: __expectString(output.ServiceName), - ServiceType: __expectString(output.ServiceType), - URLPath: __expectString(output.URLPath), - Version: __expectInt32(output.Version), - } as any; + return take(output, { + Attributes: _json, + FixedRate: __limitedParseDouble, + HTTPMethod: __expectString, + Host: __expectString, + Priority: __expectInt32, + ReservoirSize: __expectInt32, + ResourceARN: __expectString, + RuleARN: __expectString, + RuleName: __expectString, + ServiceName: __expectString, + ServiceType: __expectString, + URLPath: __expectString, + Version: __expectInt32, + }) as any; }; /** * deserializeAws_restJson1SamplingRuleRecord */ const de_SamplingRuleRecord = (output: any, context: __SerdeContext): SamplingRuleRecord => { - return { - CreatedAt: - output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined, - ModifiedAt: - output.ModifiedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ModifiedAt))) : undefined, - SamplingRule: output.SamplingRule != null ? de_SamplingRule(output.SamplingRule, context) : undefined, - } as any; + return take(output, { + CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ModifiedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SamplingRule: (_: any) => de_SamplingRule(_, context), + }) as any; }; /** @@ -3872,9 +3282,6 @@ const de_SamplingRuleRecordList = (output: any, context: __SerdeContext): Sampli const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SamplingRuleRecord(entry, context); }); return retVal; @@ -3884,14 +3291,13 @@ const de_SamplingRuleRecordList = (output: any, context: __SerdeContext): Sampli * deserializeAws_restJson1SamplingStatisticSummary */ const de_SamplingStatisticSummary = (output: any, context: __SerdeContext): SamplingStatisticSummary => { - return { - BorrowCount: __expectInt32(output.BorrowCount), - RequestCount: __expectInt32(output.RequestCount), - RuleName: __expectString(output.RuleName), - SampledCount: __expectInt32(output.SampledCount), - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; + return take(output, { + BorrowCount: __expectInt32, + RequestCount: __expectInt32, + RuleName: __expectString, + SampledCount: __expectInt32, + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -3901,9 +3307,6 @@ const de_SamplingStatisticSummaryList = (output: any, context: __SerdeContext): const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SamplingStatisticSummary(entry, context); }); return retVal; @@ -3913,16 +3316,13 @@ const de_SamplingStatisticSummaryList = (output: any, context: __SerdeContext): * deserializeAws_restJson1SamplingTargetDocument */ const de_SamplingTargetDocument = (output: any, context: __SerdeContext): SamplingTargetDocument => { - return { - FixedRate: __limitedParseDouble(output.FixedRate), - Interval: __expectInt32(output.Interval), - ReservoirQuota: __expectInt32(output.ReservoirQuota), - ReservoirQuotaTTL: - output.ReservoirQuotaTTL != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ReservoirQuotaTTL))) - : undefined, - RuleName: __expectString(output.RuleName), - } as any; + return take(output, { + FixedRate: __limitedParseDouble, + Interval: __expectInt32, + ReservoirQuota: __expectInt32, + ReservoirQuotaTTL: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + RuleName: __expectString, + }) as any; }; /** @@ -3932,91 +3332,40 @@ const de_SamplingTargetDocumentList = (output: any, context: __SerdeContext): Sa const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_SamplingTargetDocument(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1Segment - */ -const de_Segment = (output: any, context: __SerdeContext): Segment => { - return { - Document: __expectString(output.Document), - Id: __expectString(output.Id), - } as any; -}; +// de_Segment omitted. -/** - * deserializeAws_restJson1SegmentList - */ -const de_SegmentList = (output: any, context: __SerdeContext): Segment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Segment(entry, context); - }); - return retVal; -}; +// de_SegmentList omitted. /** * deserializeAws_restJson1Service */ const de_Service = (output: any, context: __SerdeContext): Service => { - return { - AccountId: __expectString(output.AccountId), - DurationHistogram: output.DurationHistogram != null ? de_Histogram(output.DurationHistogram, context) : undefined, - Edges: output.Edges != null ? de_EdgeList(output.Edges, context) : undefined, - EndTime: - output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined, - Name: __expectString(output.Name), - Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined, - ReferenceId: __expectInt32(output.ReferenceId), - ResponseTimeHistogram: - output.ResponseTimeHistogram != null ? de_Histogram(output.ResponseTimeHistogram, context) : undefined, - Root: __expectBoolean(output.Root), - StartTime: - output.StartTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTime))) : undefined, - State: __expectString(output.State), - SummaryStatistics: - output.SummaryStatistics != null ? de_ServiceStatistics(output.SummaryStatistics, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ServiceId - */ -const de_ServiceId = (output: any, context: __SerdeContext): ServiceId => { - return { - AccountId: __expectString(output.AccountId), - Name: __expectString(output.Name), - Names: output.Names != null ? de_ServiceNames(output.Names, context) : undefined, - Type: __expectString(output.Type), - } as any; -}; - -/** - * deserializeAws_restJson1ServiceIds - */ -const de_ServiceIds = (output: any, context: __SerdeContext): ServiceId[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ServiceId(entry, context); - }); - return retVal; + return take(output, { + AccountId: __expectString, + DurationHistogram: (_: any) => de_Histogram(_, context), + Edges: (_: any) => de_EdgeList(_, context), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Name: __expectString, + Names: _json, + ReferenceId: __expectInt32, + ResponseTimeHistogram: (_: any) => de_Histogram(_, context), + Root: __expectBoolean, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + State: __expectString, + SummaryStatistics: (_: any) => de_ServiceStatistics(_, context), + Type: __expectString, + }) as any; }; +// de_ServiceId omitted. + +// de_ServiceIds omitted. + /** * deserializeAws_restJson1ServiceList */ @@ -4024,87 +3373,41 @@ const de_ServiceList = (output: any, context: __SerdeContext): Service[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Service(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1ServiceNames - */ -const de_ServiceNames = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ServiceNames omitted. /** * deserializeAws_restJson1ServiceStatistics */ const de_ServiceStatistics = (output: any, context: __SerdeContext): ServiceStatistics => { - return { - ErrorStatistics: output.ErrorStatistics != null ? de_ErrorStatistics(output.ErrorStatistics, context) : undefined, - FaultStatistics: output.FaultStatistics != null ? de_FaultStatistics(output.FaultStatistics, context) : undefined, - OkCount: __expectLong(output.OkCount), - TotalCount: __expectLong(output.TotalCount), - TotalResponseTime: __limitedParseDouble(output.TotalResponseTime), - } as any; + return take(output, { + ErrorStatistics: _json, + FaultStatistics: _json, + OkCount: __expectLong, + TotalCount: __expectLong, + TotalResponseTime: __limitedParseDouble, + }) as any; }; -/** - * deserializeAws_restJson1Tag - */ -const de_Tag = (output: any, context: __SerdeContext): Tag => { - return { - Key: __expectString(output.Key), - Value: __expectString(output.Value), - } as any; -}; +// de_Tag omitted. -/** - * deserializeAws_restJson1TagList - */ -const de_TagList = (output: any, context: __SerdeContext): Tag[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_Tag(entry, context); - }); - return retVal; -}; +// de_TagList omitted. /** * deserializeAws_restJson1TimeSeriesServiceStatistics */ const de_TimeSeriesServiceStatistics = (output: any, context: __SerdeContext): TimeSeriesServiceStatistics => { - return { - EdgeSummaryStatistics: - output.EdgeSummaryStatistics != null ? de_EdgeStatistics(output.EdgeSummaryStatistics, context) : undefined, - ResponseTimeHistogram: - output.ResponseTimeHistogram != null ? de_Histogram(output.ResponseTimeHistogram, context) : undefined, - ServiceForecastStatistics: - output.ServiceForecastStatistics != null - ? de_ForecastStatistics(output.ServiceForecastStatistics, context) - : undefined, - ServiceSummaryStatistics: - output.ServiceSummaryStatistics != null - ? de_ServiceStatistics(output.ServiceSummaryStatistics, context) - : undefined, - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - } as any; + return take(output, { + EdgeSummaryStatistics: (_: any) => de_EdgeStatistics(_, context), + ResponseTimeHistogram: (_: any) => de_Histogram(_, context), + ServiceForecastStatistics: _json, + ServiceSummaryStatistics: (_: any) => de_ServiceStatistics(_, context), + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -4114,9 +3417,6 @@ const de_TimeSeriesServiceStatisticsList = (output: any, context: __SerdeContext const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TimeSeriesServiceStatistics(entry, context); }); return retVal; @@ -4126,43 +3426,17 @@ const de_TimeSeriesServiceStatisticsList = (output: any, context: __SerdeContext * deserializeAws_restJson1Trace */ const de_Trace = (output: any, context: __SerdeContext): Trace => { - return { - Duration: __limitedParseDouble(output.Duration), - Id: __expectString(output.Id), - LimitExceeded: __expectBoolean(output.LimitExceeded), - Segments: output.Segments != null ? de_SegmentList(output.Segments, context) : undefined, - } as any; + return take(output, { + Duration: __limitedParseDouble, + Id: __expectString, + LimitExceeded: __expectBoolean, + Segments: _json, + }) as any; }; -/** - * deserializeAws_restJson1TraceAvailabilityZones - */ -const de_TraceAvailabilityZones = (output: any, context: __SerdeContext): AvailabilityZoneDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_AvailabilityZoneDetail(entry, context); - }); - return retVal; -}; +// de_TraceAvailabilityZones omitted. -/** - * deserializeAws_restJson1TraceInstanceIds - */ -const de_TraceInstanceIds = (output: any, context: __SerdeContext): InstanceIdDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_InstanceIdDetail(entry, context); - }); - return retVal; -}; +// de_TraceInstanceIds omitted. /** * deserializeAws_restJson1TraceList @@ -4171,62 +3445,39 @@ const de_TraceList = (output: any, context: __SerdeContext): Trace[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_Trace(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TraceResourceARNs - */ -const de_TraceResourceARNs = (output: any, context: __SerdeContext): ResourceARNDetail[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ResourceARNDetail(entry, context); - }); - return retVal; -}; +// de_TraceResourceARNs omitted. /** * deserializeAws_restJson1TraceSummary */ const de_TraceSummary = (output: any, context: __SerdeContext): TraceSummary => { - return { - Annotations: output.Annotations != null ? de_Annotations(output.Annotations, context) : undefined, - AvailabilityZones: - output.AvailabilityZones != null ? de_TraceAvailabilityZones(output.AvailabilityZones, context) : undefined, - Duration: __limitedParseDouble(output.Duration), - EntryPoint: output.EntryPoint != null ? de_ServiceId(output.EntryPoint, context) : undefined, - ErrorRootCauses: output.ErrorRootCauses != null ? de_ErrorRootCauses(output.ErrorRootCauses, context) : undefined, - FaultRootCauses: output.FaultRootCauses != null ? de_FaultRootCauses(output.FaultRootCauses, context) : undefined, - HasError: __expectBoolean(output.HasError), - HasFault: __expectBoolean(output.HasFault), - HasThrottle: __expectBoolean(output.HasThrottle), - Http: output.Http != null ? de_Http(output.Http, context) : undefined, - Id: __expectString(output.Id), - InstanceIds: output.InstanceIds != null ? de_TraceInstanceIds(output.InstanceIds, context) : undefined, - IsPartial: __expectBoolean(output.IsPartial), - MatchedEventTime: - output.MatchedEventTime != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.MatchedEventTime))) - : undefined, - ResourceARNs: output.ResourceARNs != null ? de_TraceResourceARNs(output.ResourceARNs, context) : undefined, - ResponseTime: __limitedParseDouble(output.ResponseTime), - ResponseTimeRootCauses: - output.ResponseTimeRootCauses != null - ? de_ResponseTimeRootCauses(output.ResponseTimeRootCauses, context) - : undefined, - Revision: __expectInt32(output.Revision), - ServiceIds: output.ServiceIds != null ? de_ServiceIds(output.ServiceIds, context) : undefined, - Users: output.Users != null ? de_TraceUsers(output.Users, context) : undefined, - } as any; + return take(output, { + Annotations: (_: any) => de_Annotations(_, context), + AvailabilityZones: _json, + Duration: __limitedParseDouble, + EntryPoint: _json, + ErrorRootCauses: _json, + FaultRootCauses: _json, + HasError: __expectBoolean, + HasFault: __expectBoolean, + HasThrottle: __expectBoolean, + Http: _json, + Id: __expectString, + InstanceIds: _json, + IsPartial: __expectBoolean, + MatchedEventTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + ResourceARNs: _json, + ResponseTime: __limitedParseDouble, + ResponseTimeRootCauses: (_: any) => de_ResponseTimeRootCauses(_, context), + Revision: __expectInt32, + ServiceIds: _json, + Users: _json, + }) as any; }; /** @@ -4236,105 +3487,24 @@ const de_TraceSummaryList = (output: any, context: __SerdeContext): TraceSummary const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_TraceSummary(entry, context); }); return retVal; }; -/** - * deserializeAws_restJson1TraceUser - */ -const de_TraceUser = (output: any, context: __SerdeContext): TraceUser => { - return { - ServiceIds: output.ServiceIds != null ? de_ServiceIds(output.ServiceIds, context) : undefined, - UserName: __expectString(output.UserName), - } as any; -}; +// de_TraceUser omitted. -/** - * deserializeAws_restJson1TraceUsers - */ -const de_TraceUsers = (output: any, context: __SerdeContext): TraceUser[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_TraceUser(entry, context); - }); - return retVal; -}; +// de_TraceUsers omitted. -/** - * deserializeAws_restJson1UnprocessedStatistics - */ -const de_UnprocessedStatistics = (output: any, context: __SerdeContext): UnprocessedStatistics => { - return { - ErrorCode: __expectString(output.ErrorCode), - Message: __expectString(output.Message), - RuleName: __expectString(output.RuleName), - } as any; -}; +// de_UnprocessedStatistics omitted. -/** - * deserializeAws_restJson1UnprocessedStatisticsList - */ -const de_UnprocessedStatisticsList = (output: any, context: __SerdeContext): UnprocessedStatistics[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedStatistics(entry, context); - }); - return retVal; -}; +// de_UnprocessedStatisticsList omitted. -/** - * deserializeAws_restJson1UnprocessedTraceIdList - */ -const de_UnprocessedTraceIdList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_UnprocessedTraceIdList omitted. -/** - * deserializeAws_restJson1UnprocessedTraceSegment - */ -const de_UnprocessedTraceSegment = (output: any, context: __SerdeContext): UnprocessedTraceSegment => { - return { - ErrorCode: __expectString(output.ErrorCode), - Id: __expectString(output.Id), - Message: __expectString(output.Message), - } as any; -}; +// de_UnprocessedTraceSegment omitted. -/** - * deserializeAws_restJson1UnprocessedTraceSegmentList - */ -const de_UnprocessedTraceSegmentList = (output: any, context: __SerdeContext): UnprocessedTraceSegment[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_UnprocessedTraceSegment(entry, context); - }); - return retVal; -}; +// de_UnprocessedTraceSegmentList omitted. /** * deserializeAws_restJson1ValuesWithServiceIds @@ -4343,9 +3513,6 @@ const de_ValuesWithServiceIds = (output: any, context: __SerdeContext): ValueWit const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_ValueWithServiceIds(entry, context); }); return retVal; @@ -4355,11 +3522,10 @@ const de_ValuesWithServiceIds = (output: any, context: __SerdeContext): ValueWit * deserializeAws_restJson1ValueWithServiceIds */ const de_ValueWithServiceIds = (output: any, context: __SerdeContext): ValueWithServiceIds => { - return { - AnnotationValue: - output.AnnotationValue != null ? de_AnnotationValue(__expectUnion(output.AnnotationValue), context) : undefined, - ServiceIds: output.ServiceIds != null ? de_ServiceIds(output.ServiceIds, context) : undefined, - } as any; + return take(output, { + AnnotationValue: (_: any) => de_AnnotationValue(__expectUnion(_), context), + ServiceIds: _json, + }) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberDeserVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberDeserVisitor.java index 3d7624952aaf..971110a4bec9 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberDeserVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberDeserVisitor.java @@ -43,6 +43,8 @@ final class JsonMemberDeserVisitor extends DocumentMemberDeserVisitor { Format defaultTimestampFormat) { super(context, dataSource, defaultTimestampFormat); this.memberShape = memberShape; + context.getWriter().addImport("_json", null, "@aws-sdk/smithy-client"); + serdeElision.setEnabledForModel(!context.getSettings().generateServerSdk()); } JsonMemberDeserVisitor(GenerationContext context, diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java index 5d7907219367..2a958c9d1f56 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java @@ -38,6 +38,8 @@ final class JsonMemberSerVisitor extends DocumentMemberSerVisitor { */ JsonMemberSerVisitor(GenerationContext context, String dataSource, Format defaultTimestampFormat) { super(context, dataSource, defaultTimestampFormat); + context.getWriter().addImport("_json", null, "@aws-sdk/smithy-client"); + serdeElision.setEnabledForModel(!context.getSettings().generateServerSdk()); } @Override diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java index 6f587f37bf7e..03fc7f6d3a82 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java @@ -182,4 +182,9 @@ private DocumentMemberDeserVisitor getMemberDeserVisitor(GenerationContext conte public void generateProtocolTests(GenerationContext context) { AwsProtocolUtils.generateProtocolTests(this, context); } + + @Override + protected boolean enableSerdeElision() { + return true; + } } diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeDeserVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeDeserVisitor.java index 90ad773dad38..6afd053be8b7 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeDeserVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeDeserVisitor.java @@ -41,6 +41,7 @@ import software.amazon.smithy.typescript.codegen.integration.DocumentMemberDeserVisitor; import software.amazon.smithy.typescript.codegen.integration.DocumentShapeDeserVisitor; import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator.GenerationContext; +import software.amazon.smithy.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.utils.SmithyInternalApi; /** @@ -59,10 +60,10 @@ final class JsonShapeDeserVisitor extends DocumentShapeDeserVisitor { JsonShapeDeserVisitor(GenerationContext context) { this(context, - // Use the jsonName trait value if present, otherwise use the member name. - (memberShape, memberName) -> memberShape.getTrait(JsonNameTrait.class) - .map(JsonNameTrait::getValue) - .orElse(memberName)); + // Use the jsonName trait value if present, otherwise use the member name. + (memberShape, memberName) -> memberShape.getTrait(JsonNameTrait.class) + .map(JsonNameTrait::getValue) + .orElse(memberName)); } JsonShapeDeserVisitor(GenerationContext context, BiFunction memberNameStrategy) { @@ -82,34 +83,52 @@ protected void deserializeCollection(GenerationContext context, CollectionShape // Filter out null entries if we don't have the sparse trait. String potentialFilter = ""; + if (!shape.hasTrait(SparseTrait.ID) && !artifactType.equals(ArtifactType.SSDK)) { potentialFilter = ".filter((e: any) => e != null)"; } - writer.openBlock("const retVal = (output || [])$L.map((entry: any) => {", "});", potentialFilter, () -> { - // Short circuit null values from serialization. - writer.openBlock("if (entry === null) {", "}", () -> { - // In the SSDK we want to be very strict about not accepting nulls in non-sparse lists. - if (!shape.hasTrait(SparseTrait.ID) && artifactType.equals(ArtifactType.SSDK)) { - writer.write("throw new TypeError('All elements of the non-sparse list $S must be non-null.');", - shape.getId()); - } else { - writer.write("return null as any;"); + final String filterExpression = potentialFilter; + + String returnExpression = target.accept(getMemberVisitor(shape.getMember(), "entry")); + + if (returnExpression.equals("entry") && !artifactType.equals(ArtifactType.SSDK)) { + writer.write("const retVal = (output || [])$L", filterExpression); + } else { + writer.openBlock("const retVal = (output || [])$L.map((entry: any) => {", "});", + filterExpression, () -> { + // Short circuit null values from serialization. + if (filterExpression.isEmpty()) { + writer.openBlock("if (entry === null) {", "}", () -> { + // In the SSDK we want to be very strict about not accepting nulls in non-sparse + // lists. + if (!shape.hasTrait(SparseTrait.ID) && artifactType.equals(ArtifactType.SSDK)) { + writer.write( + "throw new TypeError('All elements of the non-sparse list $S must be non-null.');", + shape.getId()); + } else { + writer.write("return null as any;"); + } + }); + } + + // Dispatch to the output value provider for any additional handling. + writer.write("return $L$L;", + target.accept(getMemberVisitor(shape.getMember(), "entry")), + usesExpect(target) ? " as any" : ""); } - }); + ); + } - // Dispatch to the output value provider for any additional handling. - writer.write("return $L$L;", target.accept(getMemberVisitor(shape.getMember(), "entry")), - usesExpect(target) ? " as any" : ""); - }); if (shape.isSetShape() && artifactType.equals(ArtifactType.SSDK)) { writer.addDependency(TypeScriptDependency.SERVER_COMMON); writer.addImport("findDuplicates", "__findDuplicates", "@aws-smithy/server-common"); writer.openBlock("if (__findDuplicates(retVal).length > 0) {", "}", () -> { writer.write("throw new TypeError('All elements of the set $S must be unique.');", - shape.getId()); + shape.getId()); }); } + writer.write("return retVal;"); } @@ -140,6 +159,7 @@ protected void deserializeMap(GenerationContext context, MapShape shape) { if (shape.hasTrait(SparseTrait.ID)) { writer.write("acc[key] = null as any;"); } + writer.write("return acc;"); }); @@ -158,28 +178,75 @@ protected void deserializeStructure(GenerationContext context, StructureShape sh // Prepare the document contents structure. // Use a TreeMap to sort the members. Map members = new TreeMap<>(shape.getAllMembers()); - writer.openBlock("return {", "} as any;", () -> { + writer.addImport("take", null, "@aws-sdk/smithy-client"); + writer.openBlock("return take(output, {", "}) as any;", () -> { // Set all the members to undefined to meet type constraints. members.forEach((memberName, memberShape) -> { - String locationName = memberNameStrategy.apply(memberShape, memberName); + String wireName = memberNameStrategy.apply(memberShape, memberName); + boolean hasJsonName = memberShape.hasTrait(JsonNameTrait.class); Shape target = context.getModel().expectShape(memberShape.getTarget()); - String propertyAccess = getFrom("output", locationName); + String propertyAccess = getFrom("output", wireName); + String value = target.accept(getMemberVisitor(memberShape, "_")); - if (usesExpect(target)) { - // Booleans and numbers will call expectBoolean/expectNumber which will handle - // null/undefined properly. - writer.write("$L: $L,", - memberName, - target.accept(getMemberVisitor(memberShape, propertyAccess))); + if (hasJsonName) { + if (usesExpect(target)) { + if (UnaryFunctionCall.check(value)) { + writer.write("'$L': [,$L,`$L`],", memberName, UnaryFunctionCall.toRef(value), wireName); + } else { + writer.write("'$L': [,$L,`$L`],", memberName, "_ => " + value, wireName); + } + } else { + String valueExpression = target.accept(getMemberVisitor(memberShape, propertyAccess)); + + if (valueExpression.equals(propertyAccess)) { + writer.write("'$L': [,,`$L`],", memberName, wireName); + } else { + String functionExpression = value; + boolean isUnaryCall = UnaryFunctionCall.check(functionExpression); + if (isUnaryCall) { + writer.write("'$L': [,$L,`$L`],", + memberName, + UnaryFunctionCall.toRef(functionExpression), + wireName + ); + } else { + writer.write("'$L': _ => [,$L,`$L`],", + memberName, + functionExpression, + wireName + ); + } + } + } } else { - writer.write( - "$1L: ($2L != null) ? $3L: undefined,", - memberName, - propertyAccess, - // Dispatch to the output value provider for any additional handling. - target.accept(getMemberVisitor(memberShape, propertyAccess)) - ); + if (usesExpect(target)) { + if (UnaryFunctionCall.check(value)) { + writer.write("'$L': $L,", memberName, UnaryFunctionCall.toRef(value)); + } else { + writer.write("'$L': $L,", memberName, "_ => " + value); + } + } else { + String valueExpression = target.accept(getMemberVisitor(memberShape, propertyAccess)); + + if (valueExpression.equals(propertyAccess)) { + writer.write("'$1L': [],", memberName); + } else { + String functionExpression = value; + boolean isUnaryCall = UnaryFunctionCall.check(functionExpression); + if (isUnaryCall) { + writer.write("'$1L': $2L,", + memberName, + UnaryFunctionCall.toRef(functionExpression) + ); + } else { + writer.write("'$1L': (_: any) => $2L,", + memberName, + functionExpression + ); + } + } + } } }); }); @@ -190,8 +257,10 @@ private boolean usesExpect(Shape shape) { if (shape.hasTrait(MediaTypeTrait.class)) { return !CodegenUtils.isJsonMediaType(shape.expectTrait(MediaTypeTrait.class).getValue()); } + return true; } + return shape.isBooleanShape() || shape instanceof NumberShape; } @@ -207,6 +276,7 @@ protected void deserializeUnion(GenerationContext context, UnionShape shape) { String locationName = memberNameStrategy.apply(memberShape, memberName); String memberValue = target.accept(getMemberVisitor(memberShape, getFrom("output", locationName))); + if (usesExpect(target)) { // Booleans and numbers will call expectBoolean/expectNumber which will handle // null/undefined properly. @@ -230,4 +300,4 @@ protected void deserializeUnion(GenerationContext context, UnionShape shape) { // Or write to the unknown member the element in the output. writer.write("return { $$unknown: Object.entries(output)[0] };"); } -} +} \ No newline at end of file diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java index b55504a5cc2a..23f954988658 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java @@ -37,6 +37,7 @@ import software.amazon.smithy.typescript.codegen.integration.DocumentMemberSerVisitor; import software.amazon.smithy.typescript.codegen.integration.DocumentShapeSerVisitor; import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator.GenerationContext; +import software.amazon.smithy.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.utils.SmithyInternalApi; /** @@ -84,15 +85,21 @@ public void serializeCollection(GenerationContext context, CollectionShape shape potentialFilter = ".filter((e: any) => e != null)"; } - writer.openBlock("return input$L.map(entry => {", "});", potentialFilter, () -> { - // Short circuit null values from serialization. - if (hasSparseTrait) { - writer.write("if (entry === null) { return null as any; }"); - } + String returnedExpression = target.accept(getMemberVisitor("entry")); - // Dispatch to the input value provider for any additional handling. - writer.write("return $L;", target.accept(getMemberVisitor("entry"))); - }); + if (returnedExpression.equals("entry")) { + writer.write("return input$L;", potentialFilter); + } else { + writer.openBlock("return input$L.map(entry => {", "});", potentialFilter, () -> { + // Short circuit null values from serialization. + if (hasSparseTrait) { + writer.write("if (entry === null) { return null as any; }"); + } + + // Dispatch to the input value provider for any additional handling. + writer.write("return $L;", target.accept(getMemberVisitor("entry"))); + }); + } } @Override @@ -133,26 +140,48 @@ public void serializeMap(GenerationContext context, MapShape shape) { @Override public void serializeStructure(GenerationContext context, StructureShape shape) { TypeScriptWriter writer = context.getWriter(); - - writer.openBlock("return {", "};", () -> { + writer.addImport("take", null, "@aws-sdk/smithy-client"); + writer.openBlock("return take(input, {", "});", () -> { // Use a TreeMap to sort the members. Map members = new TreeMap<>(shape.getAllMembers()); members.forEach((memberName, memberShape) -> { - String locationName = memberNameStrategy.apply(memberShape, memberName); + String wireName = memberNameStrategy.apply(memberShape, memberName); + boolean hasJsonName = memberShape.hasTrait(JsonNameTrait.class); Shape target = context.getModel().expectShape(memberShape.getTarget()); String inputLocation = "input." + memberName; // Handle @timestampFormat on members not just the targeted shape. - String valueProvider = memberShape.hasTrait(TimestampFormatTrait.class) - ? AwsProtocolUtils.getInputTimestampValueProvider(context, memberShape, - TIMESTAMP_FORMAT, inputLocation) - : target.accept(getMemberVisitor(inputLocation)); - - if (memberShape.hasTrait(IdempotencyTokenTrait.class)) { - writer.write("'$L': $L ?? generateIdempotencyToken(),", locationName, valueProvider); + String valueExpression = (memberShape.hasTrait(TimestampFormatTrait.class) + ? AwsProtocolUtils.getInputTimestampValueProvider(context, memberShape, + TIMESTAMP_FORMAT, "_") + : target.accept(getMemberVisitor("_"))); + String valueProvider = "_ => " + valueExpression; + boolean isUnaryCall = UnaryFunctionCall.check(valueExpression); + + if (hasJsonName) { + if (memberShape.hasTrait(IdempotencyTokenTrait.class)) { + writer.write("'$L': [, _ => _ ?? generateIdempotencyToken(), `$L`],", wireName, memberName); + } else { + if (valueProvider.equals("_ => _")) { + writer.write("'$L': [,,`$L`],", wireName, memberName); + } else if (isUnaryCall) { + writer.write("'$L': [,$L,`$L`],", wireName, UnaryFunctionCall.toRef(valueExpression), memberName); + } else { + writer.write("'$L': [,$L,`$L`],", wireName, valueProvider, memberName); + } + } } else { - writer.write("...($1L != null && { $2S: $3L }),", - inputLocation, locationName, valueProvider); + if (memberShape.hasTrait(IdempotencyTokenTrait.class)) { + writer.write("'$L': _ => _ ?? generateIdempotencyToken(),", memberName); + } else { + if (valueProvider.equals("_ => _")) { + writer.write("'$1L': [],", memberName); + } else if (isUnaryCall) { + writer.write("'$1L': $2L,", memberName, UnaryFunctionCall.toRef(valueExpression)); + } else { + writer.write("'$1L': $2L,", memberName, valueProvider); + } + } } }); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java index 5c59b6edd44e..1ee324966533 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java @@ -33,6 +33,7 @@ import software.amazon.smithy.typescript.codegen.integration.DocumentMemberDeserVisitor; import software.amazon.smithy.typescript.codegen.integration.DocumentMemberSerVisitor; import software.amazon.smithy.typescript.codegen.integration.HttpBindingProtocolGenerator; +import software.amazon.smithy.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.utils.IoUtils; import software.amazon.smithy.utils.SmithyInternalApi; @@ -84,6 +85,7 @@ public void generateSharedComponents(GenerationContext context) { TypeScriptWriter writer = context.getWriter(); writer.addUseImports(getApplicationProtocol().getResponseType()); + writer.addImport("take", null, "@aws-sdk/smithy-client"); writer.write(IoUtils.readUtf8Resource(getClass(), "load-json-error-code-stub.ts")); } @@ -145,30 +147,47 @@ protected void serializeErrorDocumentBody( private void serializeDocumentBody(GenerationContext context, List documentBindings) { TypeScriptWriter writer = context.getWriter(); SymbolProvider symbolProvider = context.getSymbolProvider(); - - writer.openBlock("body = JSON.stringify({", "});", () -> { + writer.addImport("take", null, "@aws-sdk/smithy-client"); + writer.openBlock("body = JSON.stringify(take(input, {", "}));", () -> { for (HttpBinding binding : documentBindings) { MemberShape memberShape = binding.getMember(); // The name of the member to get from the input shape. String memberName = symbolProvider.toMemberName(memberShape); String inputLocation = "input." + memberName; // Use the jsonName trait value if present, otherwise use the member name. - String locationName = memberShape.getTrait(JsonNameTrait.class) + String wireName = memberShape.getTrait(JsonNameTrait.class) .map(JsonNameTrait::getValue) .orElseGet(binding::getLocationName); + boolean hasJsonName = memberShape.hasTrait(JsonNameTrait.class); Shape target = context.getModel().expectShape(memberShape.getTarget()); // Handle @timestampFormat on members not just the targeted shape. - String valueProvider = memberShape.hasTrait(TimestampFormatTrait.class) + String valueProvider = "_ => " + (memberShape.hasTrait(TimestampFormatTrait.class) ? AwsProtocolUtils.getInputTimestampValueProvider(context, memberShape, - getDocumentTimestampFormat(), inputLocation) - : target.accept(getMemberSerVisitor(context, inputLocation)); - - if (memberShape.hasTrait(IdempotencyTokenTrait.class)) { - writer.write("'$L': $L ?? generateIdempotencyToken(),", locationName, valueProvider); + getDocumentTimestampFormat(), "_") + : target.accept(getMemberSerVisitor(context, "_"))); + + if (hasJsonName) { + if (memberShape.hasTrait(IdempotencyTokenTrait.class)) { + writer.write("'$L': [,_ => _ ?? generateIdempotencyToken(),`$L`],", + wireName, memberName); + } else { + if (valueProvider.equals("_ => _")) { + writer.write("'$L': [,,`$L`],", wireName, memberName); + } else { + writer.write("'$1L': [, $2L, `$3L`],", wireName, valueProvider, memberName); + } + } } else { - writer.write("...($1L != null && { $2S: $3L }),", - inputLocation, locationName, valueProvider); + if (memberShape.hasTrait(IdempotencyTokenTrait.class)) { + writer.write("'$L': _ => _ ?? generateIdempotencyToken(),", wireName); + } else { + if (valueProvider.equals("_ => _")) { + writer.write("'$1L': [],", wireName); + } else { + writer.write("'$1L': $2L,", wireName, valueProvider); + } + } } } }); @@ -282,21 +301,39 @@ private void deserializeDocumentBody( ) { TypeScriptWriter writer = context.getWriter(); SymbolProvider symbolProvider = context.getSymbolProvider(); + writer.addImport("take", null, "@aws-sdk/smithy-client"); - for (HttpBinding binding : documentBindings) { - Shape target = context.getModel().expectShape(binding.getMember().getTarget()); - // The name of the member to get from the input shape. - String memberName = symbolProvider.toMemberName(binding.getMember()); - // Use the jsonName trait value if present, otherwise use the member name. - String locationName = binding.getMember().getTrait(JsonNameTrait.class) - .map(JsonNameTrait::getValue) - .orElseGet(binding::getLocationName); - writer.openBlock("if (data.$L != null) {", "}", locationName, - () -> { - writer.write("contents.$L = $L;", memberName, - target.accept(getMemberDeserVisitor(context, binding.getMember(), "data." + locationName))); - }); - } + writer.openBlock("const doc = take(data, {", "});", () -> { + for (HttpBinding binding : documentBindings) { + Shape target = context.getModel().expectShape(binding.getMember().getTarget()); + // The name of the member to get from the input shape. + String memberName = symbolProvider.toMemberName(binding.getMember()); + // Use the jsonName trait value if present, otherwise use the member name. + String wireName = binding.getMember().getTrait(JsonNameTrait.class) + .map(JsonNameTrait::getValue) + .orElseGet(binding::getLocationName); + boolean hasJsonName = binding.getMember().hasTrait(JsonNameTrait.class); + + String valueExpression = target.accept( + getMemberDeserVisitor(context, binding.getMember(), "_")); + boolean isUnaryCall = UnaryFunctionCall.check(valueExpression); + if (hasJsonName) { + if (isUnaryCall) { + writer.write("'$L': [, $L, `$L`],", + memberName, UnaryFunctionCall.toRef(valueExpression), wireName); + } else { + writer.write("'$L': [, _ => $L, `$L`],", memberName, valueExpression, wireName); + } + } else { + if (isUnaryCall) { + writer.write("'$L': $L,", wireName, UnaryFunctionCall.toRef(valueExpression)); + } else { + writer.write("'$L': _ => $L,", wireName, valueExpression); + } + } + } + }); + writer.write("Object.assign(contents, doc);"); } @Override @@ -360,4 +397,9 @@ public void generateProtocolTests(GenerationContext context) { protected boolean requiresNumericEpochSecondsInPayload() { return true; } + + @Override + protected boolean enableSerdeElision() { + return true; + } } diff --git a/packages/smithy-client/src/default-error-handler.ts b/packages/smithy-client/src/default-error-handler.ts index f2b31832c4ef..cf742aa24eba 100644 --- a/packages/smithy-client/src/default-error-handler.ts +++ b/packages/smithy-client/src/default-error-handler.ts @@ -19,6 +19,17 @@ export const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode throw decorateServiceException(response, parsedBody); }; +/** + * @internal + * + * Creates {@link throwDefaultError} with bound ExceptionCtor. + */ +export const withBaseException = (ExceptionCtor: { new (...args: any): any }): any => { + return ({ output, parsedBody, errorCode }: any) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; +}; + const deserializeMetadata = (output: HttpResponse): ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: diff --git a/packages/smithy-client/src/index.ts b/packages/smithy-client/src/index.ts index 0b7db823a4eb..7828236d3647 100644 --- a/packages/smithy-client/src/index.ts +++ b/packages/smithy-client/src/index.ts @@ -15,5 +15,6 @@ export * from "./object-mapping"; export * from "./parse-utils"; export * from "./resolve-path"; export * from "./ser-utils"; +export * from "./serde-json"; export * from "./split-every"; export type { DocumentType, SdkError, SmithyException } from "@aws-sdk/types"; diff --git a/packages/smithy-client/src/serde-json.spec.ts b/packages/smithy-client/src/serde-json.spec.ts new file mode 100644 index 000000000000..cca3b35eabd6 --- /dev/null +++ b/packages/smithy-client/src/serde-json.spec.ts @@ -0,0 +1,39 @@ +import { _json } from "./serde-json"; + +describe(_json.name, () => { + it("removes nullish entries", () => { + expect( + _json({ + g: void 0, + a: { + e: void 0, + b: { + c: { + f: void 0, + }, + d: void 0, + }, + }, + }) + ).toEqual({ + a: { + b: { + c: {}, + }, + }, + }); + }); + + it("filters sparse lists", () => { + expect( + _json({ + a: { + b: 5, + c: [, , , 6], + }, + }) + ).toEqual({ + a: { b: 5, c: [6] }, + }); + }); +}); diff --git a/packages/smithy-client/src/serde-json.ts b/packages/smithy-client/src/serde-json.ts new file mode 100644 index 000000000000..bf5768f405a0 --- /dev/null +++ b/packages/smithy-client/src/serde-json.ts @@ -0,0 +1,28 @@ +/** + * @internal + * + * Maps an object through the default JSON serde behavior. + * This means removing nullish fields and un-sparsifying lists. + * + * @param obj - to be checked. + * @returns same object with default serde behavior applied. + */ +export const _json = (obj: any): any => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_: any) => _ != null); + } + if (typeof obj === 'object') { + const target: any = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; +} diff --git a/private/aws-echo-service/src/protocols/Aws_restJson1.ts b/private/aws-echo-service/src/protocols/Aws_restJson1.ts index 4feb301fd3ad..a1c91fe9cfce 100644 --- a/private/aws-echo-service/src/protocols/Aws_restJson1.ts +++ b/private/aws-echo-service/src/protocols/Aws_restJson1.ts @@ -10,9 +10,11 @@ import { expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, - map as __map, resolvedPath as __resolvedPath, - throwDefaultError, + _json, + map, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -31,9 +33,11 @@ export const se_EchoCommand = async (input: EchoCommandInput, context: __SerdeCo }; let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/echo"; let body: any; - body = JSON.stringify({ - ...(input.string != null && { string: input.string }), - }); + body = JSON.stringify( + take(input, { + string: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -76,9 +80,10 @@ export const de_EchoCommand = async (output: __HttpResponse, context: __SerdeCon $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.string != null) { - contents.string = __expectString(data.string); - } + const doc = take(data, { + string: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -97,10 +102,9 @@ const de_EchoCommandError = async (output: __HttpResponse, context: __SerdeConte throw await de_PalindromeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -120,9 +124,10 @@ export const de_LengthCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.length != null) { - contents.length = __expectInt32(data.length); - } + const doc = take(data, { + length: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -141,25 +146,25 @@ const de_LengthCommandError = async (output: __HttpResponse, context: __SerdeCon throw await de_PalindromeExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1PalindromeExceptionRes */ const de_PalindromeExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.message != null) { - contents.message = __expectString(data.message); - } + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); const exception = new PalindromeException({ $metadata: deserializeMetadata(parsedOutput), ...contents, diff --git a/private/aws-protocoltests-ec2/src/protocols/Aws_ec2.ts b/private/aws-protocoltests-ec2/src/protocols/Aws_ec2.ts index 038b5ccf64ec..bb03ec364461 100644 --- a/private/aws-protocoltests-ec2/src/protocols/Aws_ec2.ts +++ b/private/aws-protocoltests-ec2/src/protocols/Aws_ec2.ts @@ -21,7 +21,7 @@ import { strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, strictParseShort as __strictParseShort, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -520,7 +520,7 @@ export const de_DatetimeOffsetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -536,10 +536,9 @@ const de_DatetimeOffsetsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -561,7 +560,7 @@ export const de_EmptyInputAndEmptyOutputCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -577,10 +576,9 @@ const de_EmptyInputAndEmptyOutputCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -599,7 +597,7 @@ export const de_EndpointOperationCommand = async ( const response: EndpointOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -615,10 +613,9 @@ const de_EndpointOperationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -637,7 +634,7 @@ export const de_EndpointWithHostLabelOperationCommand = async ( const response: EndpointWithHostLabelOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -653,10 +650,9 @@ const de_EndpointWithHostLabelOperationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -678,7 +674,7 @@ export const de_FractionalSecondsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -694,10 +690,9 @@ const de_FractionalSecondsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -719,7 +714,7 @@ export const de_GreetingWithErrorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -743,10 +738,9 @@ const de_GreetingWithErrorsCommandError = async ( throw await de_InvalidGreetingRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -766,7 +760,7 @@ export const de_HostWithPathOperationCommand = async ( const response: HostWithPathOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -782,10 +776,9 @@ const de_HostWithPathOperationCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -807,7 +800,7 @@ export const de_IgnoresWrappingXmlNameCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -823,10 +816,9 @@ const de_IgnoresWrappingXmlNameCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -845,7 +837,7 @@ export const de_NestedStructuresCommand = async ( const response: NestedStructuresCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -861,10 +853,9 @@ const de_NestedStructuresCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -886,7 +877,7 @@ export const de_NoInputAndOutputCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -902,10 +893,9 @@ const de_NoInputAndOutputCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -924,7 +914,7 @@ export const de_QueryIdempotencyTokenAutoFillCommand = async ( const response: QueryIdempotencyTokenAutoFillCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -940,10 +930,9 @@ const de_QueryIdempotencyTokenAutoFillCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -962,7 +951,7 @@ export const de_QueryListsCommand = async ( const response: QueryListsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -978,10 +967,9 @@ const de_QueryListsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1000,7 +988,7 @@ export const de_QueryTimestampsCommand = async ( const response: QueryTimestampsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1016,10 +1004,9 @@ const de_QueryTimestampsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1041,7 +1028,7 @@ export const de_RecursiveXmlShapesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1057,10 +1044,9 @@ const de_RecursiveXmlShapesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1079,7 +1065,7 @@ export const de_SimpleInputParamsCommand = async ( const response: SimpleInputParamsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1095,10 +1081,9 @@ const de_SimpleInputParamsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1120,7 +1105,7 @@ export const de_SimpleScalarXmlPropertiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1136,10 +1121,9 @@ const de_SimpleScalarXmlPropertiesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1161,7 +1145,7 @@ export const de_XmlBlobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1177,10 +1161,9 @@ const de_XmlBlobsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1202,7 +1185,7 @@ export const de_XmlEmptyBlobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1218,10 +1201,9 @@ const de_XmlEmptyBlobsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1243,7 +1225,7 @@ export const de_XmlEmptyListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1259,10 +1241,9 @@ const de_XmlEmptyListsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1284,7 +1265,7 @@ export const de_XmlEnumsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1300,10 +1281,9 @@ const de_XmlEnumsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1325,7 +1305,7 @@ export const de_XmlIntEnumsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1341,10 +1321,9 @@ const de_XmlIntEnumsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1366,7 +1345,7 @@ export const de_XmlListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1382,10 +1361,9 @@ const de_XmlListsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1407,7 +1385,7 @@ export const de_XmlNamespacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1423,10 +1401,9 @@ const de_XmlNamespacesCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1448,7 +1425,7 @@ export const de_XmlTimestampsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1464,10 +1441,9 @@ const de_XmlTimestampsCommandError = async ( }; const errorCode = loadEc2ErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Errors.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2382,6 +2358,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/private/aws-protocoltests-json-10/src/protocols/Aws_json1_0.ts b/private/aws-protocoltests-json-10/src/protocols/Aws_json1_0.ts index 54385a39cb39..723f56d96b09 100644 --- a/private/aws-protocoltests-json-10/src/protocols/Aws_json1_0.ts +++ b/private/aws-protocoltests-json-10/src/protocols/Aws_json1_0.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, @@ -16,7 +17,8 @@ import { limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -52,17 +54,14 @@ import { ComplexError, ComplexNestedErrorData, EmptyInputAndEmptyOutputInput, - EmptyInputAndEmptyOutputOutput, EndpointWithHostLabelOperationInput, FooError, GreetingStruct, GreetingWithErrorsInput, - GreetingWithErrorsOutput, InvalidGreeting, JsonUnionsInput, JsonUnionsOutput, MyUnion, - NoInputAndOutputOutput, SimpleScalarPropertiesInput, SimpleScalarPropertiesOutput, } from "../models/models_0"; @@ -76,7 +75,7 @@ export const se_EmptyInputAndEmptyOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EmptyInputAndEmptyOutput"); let body: any; - body = JSON.stringify(se_EmptyInputAndEmptyOutputInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -108,7 +107,7 @@ export const se_EndpointWithHostLabelOperationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EndpointWithHostLabelOperation"); let body: any; - body = JSON.stringify(se_EndpointWithHostLabelOperationInput(input, context)); + body = JSON.stringify(_json(input)); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "foo.{label}." + resolvedHostname; @@ -132,7 +131,7 @@ export const se_GreetingWithErrorsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GreetingWithErrors"); let body: any; - body = JSON.stringify(se_GreetingWithErrorsInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -210,12 +209,12 @@ export const de_EmptyInputAndEmptyOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_EmptyInputAndEmptyOutputOutput(data, context); + contents = _json(data); const response: EmptyInputAndEmptyOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -231,10 +230,9 @@ const de_EmptyInputAndEmptyOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -253,7 +251,7 @@ export const de_EndpointOperationCommand = async ( const response: EndpointOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -269,10 +267,9 @@ const de_EndpointOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -291,7 +288,7 @@ export const de_EndpointWithHostLabelOperationCommand = async ( const response: EndpointWithHostLabelOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -307,10 +304,9 @@ const de_EndpointWithHostLabelOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -327,12 +323,12 @@ export const de_GreetingWithErrorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GreetingWithErrorsOutput(data, context); + contents = _json(data); const response: GreetingWithErrorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -359,10 +355,9 @@ const de_GreetingWithErrorsCommandError = async ( throw await de_InvalidGreetingRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -382,7 +377,7 @@ export const de_HostWithPathOperationCommand = async ( const response: HostWithPathOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -398,10 +393,9 @@ const de_HostWithPathOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -423,7 +417,7 @@ export const de_JsonUnionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -439,10 +433,9 @@ const de_JsonUnionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -461,7 +454,7 @@ export const de_NoInputAndNoOutputCommand = async ( const response: NoInputAndNoOutputCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -477,10 +470,9 @@ const de_NoInputAndNoOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -497,12 +489,12 @@ export const de_NoInputAndOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_NoInputAndOutputOutput(data, context); + contents = _json(data); const response: NoInputAndOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -518,10 +510,9 @@ const de_NoInputAndOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -543,7 +534,7 @@ export const de_SimpleScalarPropertiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -559,10 +550,9 @@ const de_SimpleScalarPropertiesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -585,7 +575,7 @@ const de_ComplexErrorRes = async (parsedOutput: any, context: __SerdeContext): P */ const de_FooErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FooError(body, context); + const deserialized: any = _json(body); const exception = new FooError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -598,7 +588,7 @@ const de_FooErrorRes = async (parsedOutput: any, context: __SerdeContext): Promi */ const de_InvalidGreetingRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGreeting(body, context); + const deserialized: any = _json(body); const exception = new InvalidGreeting({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -606,41 +596,19 @@ const de_InvalidGreetingRes = async (parsedOutput: any, context: __SerdeContext) return __decorateServiceException(exception, body); }; -/** - * serializeAws_json1_0EmptyInputAndEmptyOutputInput - */ -const se_EmptyInputAndEmptyOutputInput = (input: EmptyInputAndEmptyOutputInput, context: __SerdeContext): any => { - return {}; -}; +// se_EmptyInputAndEmptyOutputInput omitted. -/** - * serializeAws_json1_0EndpointWithHostLabelOperationInput - */ -const se_EndpointWithHostLabelOperationInput = ( - input: EndpointWithHostLabelOperationInput, - context: __SerdeContext -): any => { - return { - ...(input.label != null && { label: input.label }), - }; -}; +// se_EndpointWithHostLabelOperationInput omitted. -/** - * serializeAws_json1_0GreetingWithErrorsInput - */ -const se_GreetingWithErrorsInput = (input: GreetingWithErrorsInput, context: __SerdeContext): any => { - return { - ...(input.greeting != null && { greeting: input.greeting }), - }; -}; +// se_GreetingWithErrorsInput omitted. /** * serializeAws_json1_0JsonUnionsInput */ const se_JsonUnionsInput = (input: JsonUnionsInput, context: __SerdeContext): any => { - return { - ...(input.contents != null && { contents: se_MyUnion(input.contents, context) }), - }; + return take(input, { + contents: (_) => se_MyUnion(_, context), + }); }; /** @@ -652,11 +620,11 @@ const se_MyUnion = (input: MyUnion, context: __SerdeContext): any => { booleanValue: (value) => ({ booleanValue: value }), enumValue: (value) => ({ enumValue: value }), intEnumValue: (value) => ({ intEnumValue: value }), - listValue: (value) => ({ listValue: se_StringList(value, context) }), - mapValue: (value) => ({ mapValue: se_StringMap(value, context) }), + listValue: (value) => ({ listValue: _json(value) }), + mapValue: (value) => ({ mapValue: _json(value) }), numberValue: (value) => ({ numberValue: value }), stringValue: (value) => ({ stringValue: value }), - structureValue: (value) => ({ structureValue: se_GreetingStruct(value, context) }), + structureValue: (value) => ({ structureValue: _json(value) }), timestampValue: (value) => ({ timestampValue: Math.round(value.getTime() / 1000) }), _: (name, value) => ({ name: value } as any), }); @@ -666,103 +634,52 @@ const se_MyUnion = (input: MyUnion, context: __SerdeContext): any => { * serializeAws_json1_0SimpleScalarPropertiesInput */ const se_SimpleScalarPropertiesInput = (input: SimpleScalarPropertiesInput, context: __SerdeContext): any => { - return { - ...(input.doubleValue != null && { doubleValue: __serializeFloat(input.doubleValue) }), - ...(input.floatValue != null && { floatValue: __serializeFloat(input.floatValue) }), - }; + return take(input, { + doubleValue: __serializeFloat, + floatValue: __serializeFloat, + }); }; -/** - * serializeAws_json1_0GreetingStruct - */ -const se_GreetingStruct = (input: GreetingStruct, context: __SerdeContext): any => { - return { - ...(input.hi != null && { hi: input.hi }), - }; -}; +// se_GreetingStruct omitted. -/** - * serializeAws_json1_0StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_json1_0StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StringMap omitted. /** * deserializeAws_json1_0ComplexError */ const de_ComplexError = (output: any, context: __SerdeContext): ComplexError => { - return { - Nested: output.Nested != null ? de_ComplexNestedErrorData(output.Nested, context) : undefined, - TopLevel: __expectString(output.TopLevel), - } as any; + return take(output, { + Nested: (_: any) => de_ComplexNestedErrorData(_, context), + TopLevel: __expectString, + }) as any; }; /** * deserializeAws_json1_0ComplexNestedErrorData */ const de_ComplexNestedErrorData = (output: any, context: __SerdeContext): ComplexNestedErrorData => { - return { - Foo: __expectString(output.Foo), - } as any; + return take(output, { + Foo: [, __expectString, `Foo`], + }) as any; }; -/** - * deserializeAws_json1_0EmptyInputAndEmptyOutputOutput - */ -const de_EmptyInputAndEmptyOutputOutput = (output: any, context: __SerdeContext): EmptyInputAndEmptyOutputOutput => { - return {} as any; -}; +// de_EmptyInputAndEmptyOutputOutput omitted. -/** - * deserializeAws_json1_0FooError - */ -const de_FooError = (output: any, context: __SerdeContext): FooError => { - return {} as any; -}; +// de_FooError omitted. -/** - * deserializeAws_json1_0GreetingWithErrorsOutput - */ -const de_GreetingWithErrorsOutput = (output: any, context: __SerdeContext): GreetingWithErrorsOutput => { - return { - greeting: __expectString(output.greeting), - } as any; -}; +// de_GreetingWithErrorsOutput omitted. -/** - * deserializeAws_json1_0InvalidGreeting - */ -const de_InvalidGreeting = (output: any, context: __SerdeContext): InvalidGreeting => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidGreeting omitted. /** * deserializeAws_json1_0JsonUnionsOutput */ const de_JsonUnionsOutput = (output: any, context: __SerdeContext): JsonUnionsOutput => { - return { - contents: output.contents != null ? de_MyUnion(__expectUnion(output.contents), context) : undefined, - } as any; + return take(output, { + contents: (_: any) => de_MyUnion(__expectUnion(_), context), + }) as any; }; /** @@ -785,12 +702,12 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.listValue != null) { return { - listValue: de_StringList(output.listValue, context), + listValue: _json(output.listValue), }; } if (output.mapValue != null) { return { - mapValue: de_StringMap(output.mapValue, context), + mapValue: _json(output.mapValue), }; } if (__expectInt32(output.numberValue) !== undefined) { @@ -801,7 +718,7 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.structureValue != null) { return { - structureValue: de_GreetingStruct(output.structureValue, context), + structureValue: _json(output.structureValue), }; } if (output.timestampValue != null) { @@ -812,59 +729,23 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_json1_0NoInputAndOutputOutput - */ -const de_NoInputAndOutputOutput = (output: any, context: __SerdeContext): NoInputAndOutputOutput => { - return {} as any; -}; +// de_NoInputAndOutputOutput omitted. /** * deserializeAws_json1_0SimpleScalarPropertiesOutput */ const de_SimpleScalarPropertiesOutput = (output: any, context: __SerdeContext): SimpleScalarPropertiesOutput => { - return { - doubleValue: __limitedParseDouble(output.doubleValue), - floatValue: __limitedParseFloat32(output.floatValue), - } as any; + return take(output, { + doubleValue: __limitedParseDouble, + floatValue: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_0GreetingStruct - */ -const de_GreetingStruct = (output: any, context: __SerdeContext): GreetingStruct => { - return { - hi: __expectString(output.hi), - } as any; -}; +// de_GreetingStruct omitted. -/** - * deserializeAws_json1_0StringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_0StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -886,6 +767,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/private/aws-protocoltests-json/src/protocols/Aws_json1_1.ts b/private/aws-protocoltests-json/src/protocols/Aws_json1_1.ts index d18e43cea7e9..17ccf62404db 100644 --- a/private/aws-protocoltests-json/src/protocols/Aws_json1_1.ts +++ b/private/aws-protocoltests-json/src/protocols/Aws_json1_1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, dateToUtcString as __dateToUtcString, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, @@ -21,7 +22,8 @@ import { parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, parseRfc7231DateTime as __parseRfc7231DateTime, serializeFloat as __serializeFloat, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -76,7 +78,6 @@ import { FooError, FractionalSecondsOutput, GreetingStruct, - GreetingWithErrorsOutput, HostLabelInput, InvalidGreeting, JsonEnumsInputOutput, @@ -84,7 +85,6 @@ import { MyUnion, NullOperationInputOutput, OperationWithOptionalInputOutputInput, - OperationWithOptionalInputOutputOutput, PutAndGetInlineDocumentsInputOutput, SimpleScalarPropertiesInputOutput, SimpleStruct, @@ -144,7 +144,7 @@ export const se_EndpointWithHostLabelOperationCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("EndpointWithHostLabelOperation"); let body: any; - body = JSON.stringify(se_HostLabelInput(input, context)); + body = JSON.stringify(_json(input)); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "foo.{label}." + resolvedHostname; @@ -204,7 +204,7 @@ export const se_JsonEnumsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("JsonEnums"); let body: any; - body = JSON.stringify(se_JsonEnumsInputOutput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -256,7 +256,7 @@ export const se_OperationWithOptionalInputOutputCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("OperationWithOptionalInputOutput"); let body: any; - body = JSON.stringify(se_OperationWithOptionalInputOutputInput(input, context)); + body = JSON.stringify(_json(input)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -303,7 +303,7 @@ export const de_DatetimeOffsetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -319,10 +319,9 @@ const de_DatetimeOffsetsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -341,7 +340,7 @@ export const de_EmptyOperationCommand = async ( const response: EmptyOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -357,10 +356,9 @@ const de_EmptyOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -379,7 +377,7 @@ export const de_EndpointOperationCommand = async ( const response: EndpointOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -395,10 +393,9 @@ const de_EndpointOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -417,7 +414,7 @@ export const de_EndpointWithHostLabelOperationCommand = async ( const response: EndpointWithHostLabelOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -433,10 +430,9 @@ const de_EndpointWithHostLabelOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -458,7 +454,7 @@ export const de_FractionalSecondsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -474,10 +470,9 @@ const de_FractionalSecondsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -494,12 +489,12 @@ export const de_GreetingWithErrorsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_GreetingWithErrorsOutput(data, context); + contents = _json(data); const response: GreetingWithErrorsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -526,10 +521,9 @@ const de_GreetingWithErrorsCommandError = async ( throw await de_InvalidGreetingRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -549,7 +543,7 @@ export const de_HostWithPathOperationCommand = async ( const response: HostWithPathOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -565,10 +559,9 @@ const de_HostWithPathOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -585,12 +578,12 @@ export const de_JsonEnumsCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_JsonEnumsInputOutput(data, context); + contents = _json(data); const response: JsonEnumsCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -606,10 +599,9 @@ const de_JsonEnumsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -631,7 +623,7 @@ export const de_JsonUnionsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -647,10 +639,9 @@ const de_JsonUnionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -672,7 +663,7 @@ export const de_KitchenSinkOperationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -696,10 +687,9 @@ const de_KitchenSinkOperationCommandError = async ( throw await de_ErrorWithoutMembersRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -722,7 +712,7 @@ export const de_NullOperationCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -738,10 +728,9 @@ const de_NullOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -758,12 +747,12 @@ export const de_OperationWithOptionalInputOutputCommand = async ( } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_OperationWithOptionalInputOutputOutput(data, context); + contents = _json(data); const response: OperationWithOptionalInputOutputCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -779,10 +768,9 @@ const de_OperationWithOptionalInputOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -804,7 +792,7 @@ export const de_PutAndGetInlineDocumentsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -820,10 +808,9 @@ const de_PutAndGetInlineDocumentsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -845,7 +832,7 @@ export const de_SimpleScalarPropertiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -861,10 +848,9 @@ const de_SimpleScalarPropertiesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -900,7 +886,7 @@ const de_ErrorWithMembersRes = async (parsedOutput: any, context: __SerdeContext */ const de_ErrorWithoutMembersRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_ErrorWithoutMembers(body, context); + const deserialized: any = _json(body); const exception = new ErrorWithoutMembers({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -913,7 +899,7 @@ const de_ErrorWithoutMembersRes = async (parsedOutput: any, context: __SerdeCont */ const de_FooErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_FooError(body, context); + const deserialized: any = _json(body); const exception = new FooError({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -926,7 +912,7 @@ const de_FooErrorRes = async (parsedOutput: any, context: __SerdeContext): Promi */ const de_InvalidGreetingRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const body = parsedOutput.body; - const deserialized: any = de_InvalidGreeting(body, context); + const deserialized: any = _json(body); const exception = new InvalidGreeting({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, @@ -941,76 +927,44 @@ const se_Document = (input: __DocumentType, context: __SerdeContext): any => { return input; }; -/** - * serializeAws_json1_1EmptyStruct - */ -const se_EmptyStruct = (input: EmptyStruct, context: __SerdeContext): any => { - return {}; -}; +// se_EmptyStruct omitted. -/** - * serializeAws_json1_1HostLabelInput - */ -const se_HostLabelInput = (input: HostLabelInput, context: __SerdeContext): any => { - return { - ...(input.label != null && { label: input.label }), - }; -}; +// se_HostLabelInput omitted. -/** - * serializeAws_json1_1JsonEnumsInputOutput - */ -const se_JsonEnumsInputOutput = (input: JsonEnumsInputOutput, context: __SerdeContext): any => { - return { - ...(input.fooEnum1 != null && { fooEnum1: input.fooEnum1 }), - ...(input.fooEnum2 != null && { fooEnum2: input.fooEnum2 }), - ...(input.fooEnum3 != null && { fooEnum3: input.fooEnum3 }), - ...(input.fooEnumList != null && { fooEnumList: se_FooEnumList(input.fooEnumList, context) }), - ...(input.fooEnumMap != null && { fooEnumMap: se_FooEnumMap(input.fooEnumMap, context) }), - ...(input.fooEnumSet != null && { fooEnumSet: se_FooEnumSet(input.fooEnumSet, context) }), - }; -}; +// se_JsonEnumsInputOutput omitted. /** * serializeAws_json1_1KitchenSink */ const se_KitchenSink = (input: KitchenSink, context: __SerdeContext): any => { - return { - ...(input.Blob != null && { Blob: context.base64Encoder(input.Blob) }), - ...(input.Boolean != null && { Boolean: input.Boolean }), - ...(input.Double != null && { Double: __serializeFloat(input.Double) }), - ...(input.EmptyStruct != null && { EmptyStruct: se_EmptyStruct(input.EmptyStruct, context) }), - ...(input.Float != null && { Float: __serializeFloat(input.Float) }), - ...(input.HttpdateTimestamp != null && { HttpdateTimestamp: __dateToUtcString(input.HttpdateTimestamp) }), - ...(input.Integer != null && { Integer: input.Integer }), - ...(input.Iso8601Timestamp != null && { - Iso8601Timestamp: input.Iso8601Timestamp.toISOString().split(".")[0] + "Z", - }), - ...(input.JsonValue != null && { JsonValue: __LazyJsonString.fromObject(input.JsonValue) }), - ...(input.ListOfLists != null && { ListOfLists: se_ListOfListOfStrings(input.ListOfLists, context) }), - ...(input.ListOfMapsOfStrings != null && { - ListOfMapsOfStrings: se_ListOfMapsOfStrings(input.ListOfMapsOfStrings, context), - }), - ...(input.ListOfStrings != null && { ListOfStrings: se_ListOfStrings(input.ListOfStrings, context) }), - ...(input.ListOfStructs != null && { ListOfStructs: se_ListOfStructs(input.ListOfStructs, context) }), - ...(input.Long != null && { Long: input.Long }), - ...(input.MapOfListsOfStrings != null && { - MapOfListsOfStrings: se_MapOfListsOfStrings(input.MapOfListsOfStrings, context), - }), - ...(input.MapOfMaps != null && { MapOfMaps: se_MapOfMapOfStrings(input.MapOfMaps, context) }), - ...(input.MapOfStrings != null && { MapOfStrings: se_MapOfStrings(input.MapOfStrings, context) }), - ...(input.MapOfStructs != null && { MapOfStructs: se_MapOfStructs(input.MapOfStructs, context) }), - ...(input.RecursiveList != null && { RecursiveList: se_ListOfKitchenSinks(input.RecursiveList, context) }), - ...(input.RecursiveMap != null && { RecursiveMap: se_MapOfKitchenSinks(input.RecursiveMap, context) }), - ...(input.RecursiveStruct != null && { RecursiveStruct: se_KitchenSink(input.RecursiveStruct, context) }), - ...(input.SimpleStruct != null && { SimpleStruct: se_SimpleStruct(input.SimpleStruct, context) }), - ...(input.String != null && { String: input.String }), - ...(input.StructWithJsonName != null && { - StructWithJsonName: se_StructWithJsonName(input.StructWithJsonName, context), - }), - ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }), - ...(input.UnixTimestamp != null && { UnixTimestamp: Math.round(input.UnixTimestamp.getTime() / 1000) }), - }; + return take(input, { + Blob: context.base64Encoder, + Boolean: [], + Double: __serializeFloat, + EmptyStruct: _json, + Float: __serializeFloat, + HttpdateTimestamp: __dateToUtcString, + Integer: [], + Iso8601Timestamp: (_) => _.toISOString().split(".")[0] + "Z", + JsonValue: __LazyJsonString.fromObject, + ListOfLists: _json, + ListOfMapsOfStrings: _json, + ListOfStrings: _json, + ListOfStructs: _json, + Long: [], + MapOfListsOfStrings: _json, + MapOfMaps: _json, + MapOfStrings: _json, + MapOfStructs: _json, + RecursiveList: (_) => se_ListOfKitchenSinks(_, context), + RecursiveMap: (_) => se_MapOfKitchenSinks(_, context), + RecursiveStruct: (_) => se_KitchenSink(_, context), + SimpleStruct: _json, + String: [], + StructWithJsonName: (_) => se_StructWithJsonName(_, context), + Timestamp: (_) => Math.round(_.getTime() / 1000), + UnixTimestamp: (_) => Math.round(_.getTime() / 1000), + }); }; /** @@ -1024,49 +978,13 @@ const se_ListOfKitchenSinks = (input: KitchenSink[], context: __SerdeContext): a }); }; -/** - * serializeAws_json1_1ListOfListOfStrings - */ -const se_ListOfListOfStrings = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ListOfStrings(entry, context); - }); -}; +// se_ListOfListOfStrings omitted. -/** - * serializeAws_json1_1ListOfMapsOfStrings - */ -const se_ListOfMapsOfStrings = (input: Record[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_MapOfStrings(entry, context); - }); -}; +// se_ListOfMapsOfStrings omitted. -/** - * serializeAws_json1_1ListOfStrings - */ -const se_ListOfStrings = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_ListOfStrings omitted. -/** - * serializeAws_json1_1ListOfStructs - */ -const se_ListOfStructs = (input: SimpleStruct[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SimpleStruct(entry, context); - }); -}; +// se_ListOfStructs omitted. /** * serializeAws_json1_1MapOfKitchenSinks @@ -1081,57 +999,13 @@ const se_MapOfKitchenSinks = (input: Record, context: __Ser }, {}); }; -/** - * serializeAws_json1_1MapOfListsOfStrings - */ -const se_MapOfListsOfStrings = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_ListOfStrings(value, context); - return acc; - }, {}); -}; +// se_MapOfListsOfStrings omitted. -/** - * serializeAws_json1_1MapOfMapOfStrings - */ -const se_MapOfMapOfStrings = (input: Record>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MapOfStrings(value, context); - return acc; - }, {}); -}; +// se_MapOfMapOfStrings omitted. -/** - * serializeAws_json1_1MapOfStrings - */ -const se_MapOfStrings = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_MapOfStrings omitted. -/** - * serializeAws_json1_1MapOfStructs - */ -const se_MapOfStructs = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_SimpleStruct(value, context); - return acc; - }, {}); -}; +// se_MapOfStructs omitted. /** * serializeAws_json1_1MyUnion @@ -1141,11 +1015,11 @@ const se_MyUnion = (input: MyUnion, context: __SerdeContext): any => { blobValue: (value) => ({ blobValue: context.base64Encoder(value) }), booleanValue: (value) => ({ booleanValue: value }), enumValue: (value) => ({ enumValue: value }), - listValue: (value) => ({ listValue: se_StringList(value, context) }), - mapValue: (value) => ({ mapValue: se_StringMap(value, context) }), + listValue: (value) => ({ listValue: _json(value) }), + mapValue: (value) => ({ mapValue: _json(value) }), numberValue: (value) => ({ numberValue: value }), stringValue: (value) => ({ stringValue: value }), - structureValue: (value) => ({ structureValue: se_GreetingStruct(value, context) }), + structureValue: (value) => ({ structureValue: _json(value) }), timestampValue: (value) => ({ timestampValue: Math.round(value.getTime() / 1000) }), _: (name, value) => ({ name: value } as any), }); @@ -1155,24 +1029,14 @@ const se_MyUnion = (input: MyUnion, context: __SerdeContext): any => { * serializeAws_json1_1NullOperationInputOutput */ const se_NullOperationInputOutput = (input: NullOperationInputOutput, context: __SerdeContext): any => { - return { - ...(input.sparseStringList != null && { sparseStringList: se_SparseStringList(input.sparseStringList, context) }), - ...(input.sparseStringMap != null && { sparseStringMap: se_SparseStringMap(input.sparseStringMap, context) }), - ...(input.string != null && { string: input.string }), - }; + return take(input, { + sparseStringList: (_) => se_SparseStringList(_, context), + sparseStringMap: (_) => se_SparseStringMap(_, context), + string: [], + }); }; -/** - * serializeAws_json1_1OperationWithOptionalInputOutputInput - */ -const se_OperationWithOptionalInputOutputInput = ( - input: OperationWithOptionalInputOutputInput, - context: __SerdeContext -): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_OperationWithOptionalInputOutputInput omitted. /** * serializeAws_json1_1PutAndGetInlineDocumentsInputOutput @@ -1181,9 +1045,9 @@ const se_PutAndGetInlineDocumentsInputOutput = ( input: PutAndGetInlineDocumentsInputOutput, context: __SerdeContext ): any => { - return { - ...(input.inlineDocument != null && { inlineDocument: se_Document(input.inlineDocument, context) }), - }; + return take(input, { + inlineDocument: (_) => se_Document(_, context), + }); }; /** @@ -1193,93 +1057,45 @@ const se_SimpleScalarPropertiesInputOutput = ( input: SimpleScalarPropertiesInputOutput, context: __SerdeContext ): any => { - return { - ...(input.doubleValue != null && { doubleValue: __serializeFloat(input.doubleValue) }), - ...(input.floatValue != null && { floatValue: __serializeFloat(input.floatValue) }), - }; + return take(input, { + doubleValue: __serializeFloat, + floatValue: __serializeFloat, + }); }; -/** - * serializeAws_json1_1SimpleStruct - */ -const se_SimpleStruct = (input: SimpleStruct, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; -}; +// se_SimpleStruct omitted. /** * serializeAws_json1_1StructWithJsonName */ const se_StructWithJsonName = (input: StructWithJsonName, context: __SerdeContext): any => { - return { - ...(input.Value != null && { Value: input.Value }), - }; + return take(input, { + Value: [, , `Value`], + }); }; /** * serializeAws_json1_1UnionInputOutput */ const se_UnionInputOutput = (input: UnionInputOutput, context: __SerdeContext): any => { - return { - ...(input.contents != null && { contents: se_MyUnion(input.contents, context) }), - }; + return take(input, { + contents: (_) => se_MyUnion(_, context), + }); }; -/** - * serializeAws_json1_1FooEnumList - */ -const se_FooEnumList = (input: (FooEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FooEnumList omitted. -/** - * serializeAws_json1_1FooEnumMap - */ -const se_FooEnumMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_FooEnumMap omitted. -/** - * serializeAws_json1_1FooEnumSet - */ -const se_FooEnumSet = (input: (FooEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_FooEnumSet omitted. -/** - * serializeAws_json1_1GreetingStruct - */ -const se_GreetingStruct = (input: GreetingStruct, context: __SerdeContext): any => { - return { - ...(input.hi != null && { hi: input.hi }), - }; -}; +// se_GreetingStruct omitted. /** * serializeAws_json1_1SparseStringList */ const se_SparseStringList = (input: string[], context: __SerdeContext): any => { - return input.map((entry) => { - if (entry === null) { - return null as any; - } - return entry; - }); + return input; }; /** @@ -1296,56 +1112,36 @@ const se_SparseStringMap = (input: Record, context: __SerdeConte }, {}); }; -/** - * serializeAws_json1_1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_json1_1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StringMap omitted. /** * deserializeAws_json1_1ComplexError */ const de_ComplexError = (output: any, context: __SerdeContext): ComplexError => { - return { - Nested: output.Nested != null ? de_ComplexNestedErrorData(output.Nested, context) : undefined, - TopLevel: __expectString(output.TopLevel), - } as any; + return take(output, { + Nested: (_: any) => de_ComplexNestedErrorData(_, context), + TopLevel: __expectString, + }) as any; }; /** * deserializeAws_json1_1ComplexNestedErrorData */ const de_ComplexNestedErrorData = (output: any, context: __SerdeContext): ComplexNestedErrorData => { - return { - Foo: __expectString(output.Foo), - } as any; + return take(output, { + Foo: [, __expectString, `Foo`], + }) as any; }; /** * deserializeAws_json1_1DatetimeOffsetsOutput */ const de_DatetimeOffsetsOutput = (output: any, context: __SerdeContext): DatetimeOffsetsOutput => { - return { - datetime: output.datetime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.datetime)) : undefined, - } as any; + return take(output, { + datetime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }) as any; }; /** @@ -1355,127 +1151,75 @@ const de_Document = (output: any, context: __SerdeContext): __DocumentType => { return output; }; -/** - * deserializeAws_json1_1EmptyStruct - */ -const de_EmptyStruct = (output: any, context: __SerdeContext): EmptyStruct => { - return {} as any; -}; +// de_EmptyStruct omitted. /** * deserializeAws_json1_1ErrorWithMembers */ const de_ErrorWithMembers = (output: any, context: __SerdeContext): ErrorWithMembers => { - return { - Code: __expectString(output.Code), - ComplexData: output.ComplexData != null ? de_KitchenSink(output.ComplexData, context) : undefined, - IntegerField: __expectInt32(output.IntegerField), - ListField: output.ListField != null ? de_ListOfStrings(output.ListField, context) : undefined, - MapField: output.MapField != null ? de_MapOfStrings(output.MapField, context) : undefined, - Message: __expectString(output.Message), - StringField: __expectString(output.StringField), - } as any; + return take(output, { + Code: __expectString, + ComplexData: (_: any) => de_KitchenSink(_, context), + IntegerField: __expectInt32, + ListField: _json, + MapField: _json, + Message: __expectString, + StringField: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1ErrorWithoutMembers - */ -const de_ErrorWithoutMembers = (output: any, context: __SerdeContext): ErrorWithoutMembers => { - return {} as any; -}; +// de_ErrorWithoutMembers omitted. -/** - * deserializeAws_json1_1FooError - */ -const de_FooError = (output: any, context: __SerdeContext): FooError => { - return {} as any; -}; +// de_FooError omitted. /** * deserializeAws_json1_1FractionalSecondsOutput */ const de_FractionalSecondsOutput = (output: any, context: __SerdeContext): FractionalSecondsOutput => { - return { - datetime: output.datetime != null ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.datetime)) : undefined, - httpdate: output.httpdate != null ? __expectNonNull(__parseRfc7231DateTime(output.httpdate)) : undefined, - } as any; + return take(output, { + datetime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + httpdate: (_: any) => __expectNonNull(__parseRfc7231DateTime(_)), + }) as any; }; -/** - * deserializeAws_json1_1GreetingWithErrorsOutput - */ -const de_GreetingWithErrorsOutput = (output: any, context: __SerdeContext): GreetingWithErrorsOutput => { - return { - greeting: __expectString(output.greeting), - } as any; -}; +// de_GreetingWithErrorsOutput omitted. -/** - * deserializeAws_json1_1InvalidGreeting - */ -const de_InvalidGreeting = (output: any, context: __SerdeContext): InvalidGreeting => { - return { - Message: __expectString(output.Message), - } as any; -}; +// de_InvalidGreeting omitted. -/** - * deserializeAws_json1_1JsonEnumsInputOutput - */ -const de_JsonEnumsInputOutput = (output: any, context: __SerdeContext): JsonEnumsInputOutput => { - return { - fooEnum1: __expectString(output.fooEnum1), - fooEnum2: __expectString(output.fooEnum2), - fooEnum3: __expectString(output.fooEnum3), - fooEnumList: output.fooEnumList != null ? de_FooEnumList(output.fooEnumList, context) : undefined, - fooEnumMap: output.fooEnumMap != null ? de_FooEnumMap(output.fooEnumMap, context) : undefined, - fooEnumSet: output.fooEnumSet != null ? de_FooEnumSet(output.fooEnumSet, context) : undefined, - } as any; -}; +// de_JsonEnumsInputOutput omitted. /** * deserializeAws_json1_1KitchenSink */ const de_KitchenSink = (output: any, context: __SerdeContext): KitchenSink => { - return { - Blob: output.Blob != null ? context.base64Decoder(output.Blob) : undefined, - Boolean: __expectBoolean(output.Boolean), - Double: __limitedParseDouble(output.Double), - EmptyStruct: output.EmptyStruct != null ? de_EmptyStruct(output.EmptyStruct, context) : undefined, - Float: __limitedParseFloat32(output.Float), - HttpdateTimestamp: - output.HttpdateTimestamp != null ? __expectNonNull(__parseRfc7231DateTime(output.HttpdateTimestamp)) : undefined, - Integer: __expectInt32(output.Integer), - Iso8601Timestamp: - output.Iso8601Timestamp != null - ? __expectNonNull(__parseRfc3339DateTimeWithOffset(output.Iso8601Timestamp)) - : undefined, - JsonValue: output.JsonValue != null ? new __LazyJsonString(output.JsonValue) : undefined, - ListOfLists: output.ListOfLists != null ? de_ListOfListOfStrings(output.ListOfLists, context) : undefined, - ListOfMapsOfStrings: - output.ListOfMapsOfStrings != null ? de_ListOfMapsOfStrings(output.ListOfMapsOfStrings, context) : undefined, - ListOfStrings: output.ListOfStrings != null ? de_ListOfStrings(output.ListOfStrings, context) : undefined, - ListOfStructs: output.ListOfStructs != null ? de_ListOfStructs(output.ListOfStructs, context) : undefined, - Long: __expectLong(output.Long), - MapOfListsOfStrings: - output.MapOfListsOfStrings != null ? de_MapOfListsOfStrings(output.MapOfListsOfStrings, context) : undefined, - MapOfMaps: output.MapOfMaps != null ? de_MapOfMapOfStrings(output.MapOfMaps, context) : undefined, - MapOfStrings: output.MapOfStrings != null ? de_MapOfStrings(output.MapOfStrings, context) : undefined, - MapOfStructs: output.MapOfStructs != null ? de_MapOfStructs(output.MapOfStructs, context) : undefined, - RecursiveList: output.RecursiveList != null ? de_ListOfKitchenSinks(output.RecursiveList, context) : undefined, - RecursiveMap: output.RecursiveMap != null ? de_MapOfKitchenSinks(output.RecursiveMap, context) : undefined, - RecursiveStruct: output.RecursiveStruct != null ? de_KitchenSink(output.RecursiveStruct, context) : undefined, - SimpleStruct: output.SimpleStruct != null ? de_SimpleStruct(output.SimpleStruct, context) : undefined, - String: __expectString(output.String), - StructWithJsonName: - output.StructWithJsonName != null ? de_StructWithJsonName(output.StructWithJsonName, context) : undefined, - Timestamp: - output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined, - UnixTimestamp: - output.UnixTimestamp != null - ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UnixTimestamp))) - : undefined, - } as any; + return take(output, { + Blob: context.base64Decoder, + Boolean: __expectBoolean, + Double: __limitedParseDouble, + EmptyStruct: _json, + Float: __limitedParseFloat32, + HttpdateTimestamp: (_: any) => __expectNonNull(__parseRfc7231DateTime(_)), + Integer: __expectInt32, + Iso8601Timestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + JsonValue: (_: any) => new __LazyJsonString(_), + ListOfLists: _json, + ListOfMapsOfStrings: _json, + ListOfStrings: _json, + ListOfStructs: _json, + Long: __expectLong, + MapOfListsOfStrings: _json, + MapOfMaps: _json, + MapOfStrings: _json, + MapOfStructs: _json, + RecursiveList: (_: any) => de_ListOfKitchenSinks(_, context), + RecursiveMap: (_: any) => de_MapOfKitchenSinks(_, context), + RecursiveStruct: (_: any) => de_KitchenSink(_, context), + SimpleStruct: _json, + String: __expectString, + StructWithJsonName: (_: any) => de_StructWithJsonName(_, context), + Timestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + UnixTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; }; /** @@ -1485,73 +1229,18 @@ const de_ListOfKitchenSinks = (output: any, context: __SerdeContext): KitchenSin const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_KitchenSink(entry, context); }); return retVal; }; -/** - * deserializeAws_json1_1ListOfListOfStrings - */ -const de_ListOfListOfStrings = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_ListOfStrings(entry, context); - }); - return retVal; -}; +// de_ListOfListOfStrings omitted. -/** - * deserializeAws_json1_1ListOfMapsOfStrings - */ -const de_ListOfMapsOfStrings = (output: any, context: __SerdeContext): Record[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_MapOfStrings(entry, context); - }); - return retVal; -}; +// de_ListOfMapsOfStrings omitted. -/** - * deserializeAws_json1_1ListOfStrings - */ -const de_ListOfStrings = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_ListOfStrings omitted. -/** - * deserializeAws_json1_1ListOfStructs - */ -const de_ListOfStructs = (output: any, context: __SerdeContext): SimpleStruct[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_SimpleStruct(entry, context); - }); - return retVal; -}; +// de_ListOfStructs omitted. /** * deserializeAws_json1_1MapOfKitchenSinks @@ -1566,57 +1255,13 @@ const de_MapOfKitchenSinks = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_ListOfStrings(value, context); - return acc; - }, {}); -}; +// de_MapOfListsOfStrings omitted. -/** - * deserializeAws_json1_1MapOfMapOfStrings - */ -const de_MapOfMapOfStrings = (output: any, context: __SerdeContext): Record> => { - return Object.entries(output).reduce((acc: Record>, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_MapOfStrings(value, context); - return acc; - }, {}); -}; +// de_MapOfMapOfStrings omitted. -/** - * deserializeAws_json1_1MapOfStrings - */ -const de_MapOfStrings = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_MapOfStrings omitted. -/** - * deserializeAws_json1_1MapOfStructs - */ -const de_MapOfStructs = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_SimpleStruct(value, context); - return acc; - }, {}); -}; +// de_MapOfStructs omitted. /** * deserializeAws_json1_1MyUnion @@ -1635,12 +1280,12 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.listValue != null) { return { - listValue: de_StringList(output.listValue, context), + listValue: _json(output.listValue), }; } if (output.mapValue != null) { return { - mapValue: de_StringMap(output.mapValue, context), + mapValue: _json(output.mapValue), }; } if (__expectInt32(output.numberValue) !== undefined) { @@ -1651,7 +1296,7 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.structureValue != null) { return { - structureValue: de_GreetingStruct(output.structureValue, context), + structureValue: _json(output.structureValue), }; } if (output.timestampValue != null) { @@ -1666,25 +1311,14 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { * deserializeAws_json1_1NullOperationInputOutput */ const de_NullOperationInputOutput = (output: any, context: __SerdeContext): NullOperationInputOutput => { - return { - sparseStringList: - output.sparseStringList != null ? de_SparseStringList(output.sparseStringList, context) : undefined, - sparseStringMap: output.sparseStringMap != null ? de_SparseStringMap(output.sparseStringMap, context) : undefined, - string: __expectString(output.string), - } as any; + return take(output, { + sparseStringList: (_: any) => de_SparseStringList(_, context), + sparseStringMap: (_: any) => de_SparseStringMap(_, context), + string: __expectString, + }) as any; }; -/** - * deserializeAws_json1_1OperationWithOptionalInputOutputOutput - */ -const de_OperationWithOptionalInputOutputOutput = ( - output: any, - context: __SerdeContext -): OperationWithOptionalInputOutputOutput => { - return { - Value: __expectString(output.Value), - } as any; -}; +// de_OperationWithOptionalInputOutputOutput omitted. /** * deserializeAws_json1_1PutAndGetInlineDocumentsInputOutput @@ -1693,9 +1327,9 @@ const de_PutAndGetInlineDocumentsInputOutput = ( output: any, context: __SerdeContext ): PutAndGetInlineDocumentsInputOutput => { - return { - inlineDocument: output.inlineDocument != null ? de_Document(output.inlineDocument, context) : undefined, - } as any; + return take(output, { + inlineDocument: (_: any) => de_Document(_, context), + }) as any; }; /** @@ -1705,90 +1339,39 @@ const de_SimpleScalarPropertiesInputOutput = ( output: any, context: __SerdeContext ): SimpleScalarPropertiesInputOutput => { - return { - doubleValue: __limitedParseDouble(output.doubleValue), - floatValue: __limitedParseFloat32(output.floatValue), - } as any; + return take(output, { + doubleValue: __limitedParseDouble, + floatValue: __limitedParseFloat32, + }) as any; }; -/** - * deserializeAws_json1_1SimpleStruct - */ -const de_SimpleStruct = (output: any, context: __SerdeContext): SimpleStruct => { - return { - Value: __expectString(output.Value), - } as any; -}; +// de_SimpleStruct omitted. /** * deserializeAws_json1_1StructWithJsonName */ const de_StructWithJsonName = (output: any, context: __SerdeContext): StructWithJsonName => { - return { - Value: __expectString(output.Value), - } as any; + return take(output, { + Value: [, __expectString, `Value`], + }) as any; }; /** * deserializeAws_json1_1UnionInputOutput */ const de_UnionInputOutput = (output: any, context: __SerdeContext): UnionInputOutput => { - return { - contents: output.contents != null ? de_MyUnion(__expectUnion(output.contents), context) : undefined, - } as any; + return take(output, { + contents: (_: any) => de_MyUnion(__expectUnion(_), context), + }) as any; }; -/** - * deserializeAws_json1_1FooEnumList - */ -const de_FooEnumList = (output: any, context: __SerdeContext): (FooEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FooEnumList omitted. -/** - * deserializeAws_json1_1FooEnumMap - */ -const de_FooEnumMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FooEnumMap omitted. -/** - * deserializeAws_json1_1FooEnumSet - */ -const de_FooEnumSet = (output: any, context: __SerdeContext): (FooEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FooEnumSet omitted. -/** - * deserializeAws_json1_1GreetingStruct - */ -const de_GreetingStruct = (output: any, context: __SerdeContext): GreetingStruct => { - return { - hi: __expectString(output.hi), - } as any; -}; +// de_GreetingStruct omitted. /** * deserializeAws_json1_1SparseStringList @@ -1817,33 +1400,9 @@ const de_SparseStringMap = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_json1_1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, @@ -1865,6 +1424,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/private/aws-protocoltests-query/src/protocols/Aws_query.ts b/private/aws-protocoltests-query/src/protocols/Aws_query.ts index 3c7f63f26be7..762d72abdf9d 100644 --- a/private/aws-protocoltests-query/src/protocols/Aws_query.ts +++ b/private/aws-protocoltests-query/src/protocols/Aws_query.ts @@ -21,7 +21,7 @@ import { strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, strictParseShort as __strictParseShort, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -667,7 +667,7 @@ export const de_DatetimeOffsetsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -683,10 +683,9 @@ const de_DatetimeOffsetsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -708,7 +707,7 @@ export const de_EmptyInputAndEmptyOutputCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -724,10 +723,9 @@ const de_EmptyInputAndEmptyOutputCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -746,7 +744,7 @@ export const de_EndpointOperationCommand = async ( const response: EndpointOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -762,10 +760,9 @@ const de_EndpointOperationCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -784,7 +781,7 @@ export const de_EndpointWithHostLabelOperationCommand = async ( const response: EndpointWithHostLabelOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -800,10 +797,9 @@ const de_EndpointWithHostLabelOperationCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -825,7 +821,7 @@ export const de_FlattenedXmlMapCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -841,10 +837,9 @@ const de_FlattenedXmlMapCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -866,7 +861,7 @@ export const de_FlattenedXmlMapWithXmlNameCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -882,10 +877,9 @@ const de_FlattenedXmlMapWithXmlNameCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -907,7 +901,7 @@ export const de_FlattenedXmlMapWithXmlNamespaceCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -923,10 +917,9 @@ const de_FlattenedXmlMapWithXmlNamespaceCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -948,7 +941,7 @@ export const de_FractionalSecondsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -964,10 +957,9 @@ const de_FractionalSecondsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -989,7 +981,7 @@ export const de_GreetingWithErrorsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1016,10 +1008,9 @@ const de_GreetingWithErrorsCommandError = async ( throw await de_InvalidGreetingRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -1039,7 +1030,7 @@ export const de_HostWithPathOperationCommand = async ( const response: HostWithPathOperationCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1055,10 +1046,9 @@ const de_HostWithPathOperationCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1080,7 +1070,7 @@ export const de_IgnoresWrappingXmlNameCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1096,10 +1086,9 @@ const de_IgnoresWrappingXmlNameCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1118,7 +1107,7 @@ export const de_NestedStructuresCommand = async ( const response: NestedStructuresCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1134,10 +1123,9 @@ const de_NestedStructuresCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1156,7 +1144,7 @@ export const de_NoInputAndNoOutputCommand = async ( const response: NoInputAndNoOutputCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1172,10 +1160,9 @@ const de_NoInputAndNoOutputCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1197,7 +1184,7 @@ export const de_NoInputAndOutputCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1213,10 +1200,9 @@ const de_NoInputAndOutputCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1235,7 +1221,7 @@ export const de_QueryIdempotencyTokenAutoFillCommand = async ( const response: QueryIdempotencyTokenAutoFillCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1251,10 +1237,9 @@ const de_QueryIdempotencyTokenAutoFillCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1273,7 +1258,7 @@ export const de_QueryListsCommand = async ( const response: QueryListsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1289,10 +1274,9 @@ const de_QueryListsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1311,7 +1295,7 @@ export const de_QueryMapsCommand = async ( const response: QueryMapsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1327,10 +1311,9 @@ const de_QueryMapsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1349,7 +1332,7 @@ export const de_QueryTimestampsCommand = async ( const response: QueryTimestampsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1365,10 +1348,9 @@ const de_QueryTimestampsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1390,7 +1372,7 @@ export const de_RecursiveXmlShapesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1406,10 +1388,9 @@ const de_RecursiveXmlShapesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1428,7 +1409,7 @@ export const de_SimpleInputParamsCommand = async ( const response: SimpleInputParamsCommandOutput = { $metadata: deserializeMetadata(output), }; - return Promise.resolve(response); + return response; }; /** @@ -1444,10 +1425,9 @@ const de_SimpleInputParamsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1469,7 +1449,7 @@ export const de_SimpleScalarXmlPropertiesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1485,10 +1465,9 @@ const de_SimpleScalarXmlPropertiesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1510,7 +1489,7 @@ export const de_XmlBlobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1526,10 +1505,9 @@ const de_XmlBlobsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1551,7 +1529,7 @@ export const de_XmlEmptyBlobsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1567,10 +1545,9 @@ const de_XmlEmptyBlobsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1592,7 +1569,7 @@ export const de_XmlEmptyListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1608,10 +1585,9 @@ const de_XmlEmptyListsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1633,7 +1609,7 @@ export const de_XmlEmptyMapsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1649,10 +1625,9 @@ const de_XmlEmptyMapsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1674,7 +1649,7 @@ export const de_XmlEnumsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1690,10 +1665,9 @@ const de_XmlEnumsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1715,7 +1689,7 @@ export const de_XmlIntEnumsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1731,10 +1705,9 @@ const de_XmlIntEnumsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1756,7 +1729,7 @@ export const de_XmlListsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1772,10 +1745,9 @@ const de_XmlListsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1797,7 +1769,7 @@ export const de_XmlMapsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1813,10 +1785,9 @@ const de_XmlMapsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1838,7 +1809,7 @@ export const de_XmlMapsXmlNameCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1854,10 +1825,9 @@ const de_XmlMapsXmlNameCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1879,7 +1849,7 @@ export const de_XmlNamespacesCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1895,10 +1865,9 @@ const de_XmlNamespacesCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -1920,7 +1889,7 @@ export const de_XmlTimestampsCommand = async ( $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; /** @@ -1936,10 +1905,9 @@ const de_XmlTimestampsCommandError = async ( }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3173,6 +3141,7 @@ const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = withBaseException(__BaseException); const buildHttpRpcRequest = async ( context: __SerdeContext, headers: __HeaderBag, diff --git a/private/aws-protocoltests-restjson/src/protocols/Aws_restJson1.ts b/private/aws-protocoltests-restjson/src/protocols/Aws_restJson1.ts index 4944c923ddd2..edd1a4b7e2b7 100644 --- a/private/aws-protocoltests-restjson/src/protocols/Aws_restJson1.ts +++ b/private/aws-protocoltests-restjson/src/protocols/Aws_restJson1.ts @@ -5,6 +5,7 @@ import { isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http"; import { + _json, convertMap, dateToUtcString as __dateToUtcString, decorateServiceException as __decorateServiceException, @@ -22,7 +23,7 @@ import { LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseBoolean as __parseBoolean, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, @@ -36,7 +37,8 @@ import { strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, strictParseShort as __strictParseShort, - throwDefaultError, + take, + withBaseException, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -488,10 +490,12 @@ export const se_DocumentTypeCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/DocumentType"; let body: any; - body = JSON.stringify({ - ...(input.documentValue != null && { documentValue: se_Document(input.documentValue, context) }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }); + body = JSON.stringify( + take(input, { + documentValue: (_) => se_Document(_, context), + stringValue: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -607,9 +611,11 @@ export const se_EndpointWithHostLabelOperationCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/EndpointWithHostLabelOperation"; let body: any; - body = JSON.stringify({ - ...(input.label != null && { label: input.label }), - }); + body = JSON.stringify( + take(input, { + label: [], + }) + ); let { hostname: resolvedHostname } = await context.endpoint(); if (context.disableHostPrefix !== true) { resolvedHostname = "foo.{label}." + resolvedHostname; @@ -720,9 +726,11 @@ export const se_HttpChecksumRequiredCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/HttpChecksumRequired"; let body: any; - body = JSON.stringify({ - ...(input.foo != null && { foo: input.foo }), - }); + body = JSON.stringify( + take(input, { + foo: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -833,7 +841,7 @@ export const se_HttpPayloadWithStructureCommand = async ( `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/HttpPayloadWithStructure"; let body: any; if (input.nested !== undefined) { - body = se_NestedPayload(input.nested, context); + body = _json(input.nested); } if (body === undefined) { body = {}; @@ -1290,9 +1298,11 @@ export const se_JsonBlobsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonBlobs"; let body: any; - body = JSON.stringify({ - ...(input.data != null && { data: context.base64Encoder(input.data) }), - }); + body = JSON.stringify( + take(input, { + data: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1317,14 +1327,16 @@ export const se_JsonEnumsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonEnums"; let body: any; - body = JSON.stringify({ - ...(input.fooEnum1 != null && { fooEnum1: input.fooEnum1 }), - ...(input.fooEnum2 != null && { fooEnum2: input.fooEnum2 }), - ...(input.fooEnum3 != null && { fooEnum3: input.fooEnum3 }), - ...(input.fooEnumList != null && { fooEnumList: se_FooEnumList(input.fooEnumList, context) }), - ...(input.fooEnumMap != null && { fooEnumMap: se_FooEnumMap(input.fooEnumMap, context) }), - ...(input.fooEnumSet != null && { fooEnumSet: se_FooEnumSet(input.fooEnumSet, context) }), - }); + body = JSON.stringify( + take(input, { + fooEnum1: [], + fooEnum2: [], + fooEnum3: [], + fooEnumList: (_) => _json(_), + fooEnumMap: (_) => _json(_), + fooEnumSet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1349,14 +1361,16 @@ export const se_JsonIntEnumsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonIntEnums"; let body: any; - body = JSON.stringify({ - ...(input.integerEnum1 != null && { integerEnum1: input.integerEnum1 }), - ...(input.integerEnum2 != null && { integerEnum2: input.integerEnum2 }), - ...(input.integerEnum3 != null && { integerEnum3: input.integerEnum3 }), - ...(input.integerEnumList != null && { integerEnumList: se_IntegerEnumList(input.integerEnumList, context) }), - ...(input.integerEnumMap != null && { integerEnumMap: se_IntegerEnumMap(input.integerEnumMap, context) }), - ...(input.integerEnumSet != null && { integerEnumSet: se_IntegerEnumSet(input.integerEnumSet, context) }), - }); + body = JSON.stringify( + take(input, { + integerEnum1: [], + integerEnum2: [], + integerEnum3: [], + integerEnumList: (_) => _json(_), + integerEnumMap: (_) => _json(_), + integerEnumSet: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1381,18 +1395,20 @@ export const se_JsonListsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonLists"; let body: any; - body = JSON.stringify({ - ...(input.booleanList != null && { booleanList: se_BooleanList(input.booleanList, context) }), - ...(input.enumList != null && { enumList: se_FooEnumList(input.enumList, context) }), - ...(input.intEnumList != null && { intEnumList: se_IntegerEnumList(input.intEnumList, context) }), - ...(input.integerList != null && { integerList: se_IntegerList(input.integerList, context) }), - ...(input.nestedStringList != null && { nestedStringList: se_NestedStringList(input.nestedStringList, context) }), - ...(input.sparseStringList != null && { sparseStringList: se_SparseStringList(input.sparseStringList, context) }), - ...(input.stringList != null && { stringList: se_StringList(input.stringList, context) }), - ...(input.stringSet != null && { stringSet: se_StringSet(input.stringSet, context) }), - ...(input.structureList != null && { myStructureList: se_StructureList(input.structureList, context) }), - ...(input.timestampList != null && { timestampList: se_TimestampList(input.timestampList, context) }), - }); + body = JSON.stringify( + take(input, { + booleanList: (_) => _json(_), + enumList: (_) => _json(_), + intEnumList: (_) => _json(_), + integerList: (_) => _json(_), + nestedStringList: (_) => _json(_), + sparseStringList: (_) => se_SparseStringList(_, context), + stringList: (_) => _json(_), + stringSet: (_) => _json(_), + myStructureList: [, (_) => se_StructureList(_, context), `structureList`], + timestampList: (_) => se_TimestampList(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1417,18 +1433,20 @@ export const se_JsonMapsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonMaps"; let body: any; - body = JSON.stringify({ - ...(input.denseBooleanMap != null && { denseBooleanMap: se_DenseBooleanMap(input.denseBooleanMap, context) }), - ...(input.denseNumberMap != null && { denseNumberMap: se_DenseNumberMap(input.denseNumberMap, context) }), - ...(input.denseSetMap != null && { denseSetMap: se_DenseSetMap(input.denseSetMap, context) }), - ...(input.denseStringMap != null && { denseStringMap: se_DenseStringMap(input.denseStringMap, context) }), - ...(input.denseStructMap != null && { denseStructMap: se_DenseStructMap(input.denseStructMap, context) }), - ...(input.sparseBooleanMap != null && { sparseBooleanMap: se_SparseBooleanMap(input.sparseBooleanMap, context) }), - ...(input.sparseNumberMap != null && { sparseNumberMap: se_SparseNumberMap(input.sparseNumberMap, context) }), - ...(input.sparseSetMap != null && { sparseSetMap: se_SparseSetMap(input.sparseSetMap, context) }), - ...(input.sparseStringMap != null && { sparseStringMap: se_SparseStringMap(input.sparseStringMap, context) }), - ...(input.sparseStructMap != null && { sparseStructMap: se_SparseStructMap(input.sparseStructMap, context) }), - }); + body = JSON.stringify( + take(input, { + denseBooleanMap: (_) => _json(_), + denseNumberMap: (_) => _json(_), + denseSetMap: (_) => _json(_), + denseStringMap: (_) => _json(_), + denseStructMap: (_) => _json(_), + sparseBooleanMap: (_) => se_SparseBooleanMap(_, context), + sparseNumberMap: (_) => se_SparseNumberMap(_, context), + sparseSetMap: (_) => se_SparseSetMap(_, context), + sparseStringMap: (_) => se_SparseStringMap(_, context), + sparseStructMap: (_) => se_SparseStructMap(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1453,19 +1471,17 @@ export const se_JsonTimestampsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonTimestamps"; let body: any; - body = JSON.stringify({ - ...(input.dateTime != null && { dateTime: input.dateTime.toISOString().split(".")[0] + "Z" }), - ...(input.dateTimeOnTarget != null && { - dateTimeOnTarget: input.dateTimeOnTarget.toISOString().split(".")[0] + "Z", - }), - ...(input.epochSeconds != null && { epochSeconds: Math.round(input.epochSeconds.getTime() / 1000) }), - ...(input.epochSecondsOnTarget != null && { - epochSecondsOnTarget: Math.round(input.epochSecondsOnTarget.getTime() / 1000), - }), - ...(input.httpDate != null && { httpDate: __dateToUtcString(input.httpDate) }), - ...(input.httpDateOnTarget != null && { httpDateOnTarget: __dateToUtcString(input.httpDateOnTarget) }), - ...(input.normal != null && { normal: Math.round(input.normal.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + dateTime: (_) => _.toISOString().split(".")[0] + "Z", + dateTimeOnTarget: (_) => _.toISOString().split(".")[0] + "Z", + epochSeconds: (_) => Math.round(_.getTime() / 1000), + epochSecondsOnTarget: (_) => Math.round(_.getTime() / 1000), + httpDate: (_) => __dateToUtcString(_), + httpDateOnTarget: (_) => __dateToUtcString(_), + normal: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1490,9 +1506,11 @@ export const se_JsonUnionsCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/JsonUnions"; let body: any; - body = JSON.stringify({ - ...(input.contents != null && { contents: se_MyUnion(input.contents, context) }), - }); + body = JSON.stringify( + take(input, { + contents: (_) => se_MyUnion(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1595,9 +1613,11 @@ export const se_MalformedBlobCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedBlob"; let body: any; - body = JSON.stringify({ - ...(input.blob != null && { blob: context.base64Encoder(input.blob) }), - }); + body = JSON.stringify( + take(input, { + blob: (_) => context.base64Encoder(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1635,9 +1655,11 @@ export const se_MalformedBooleanCommand = async ( booleanInQuery: [() => input.booleanInQuery !== void 0, () => input.booleanInQuery!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.booleanInBody != null && { booleanInBody: input.booleanInBody }), - }); + body = JSON.stringify( + take(input, { + booleanInBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1676,9 +1698,11 @@ export const se_MalformedByteCommand = async ( byteInQuery: [() => input.byteInQuery !== void 0, () => input.byteInQuery!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.byteInBody != null && { byteInBody: input.byteInBody }), - }); + body = JSON.stringify( + take(input, { + byteInBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1705,9 +1729,11 @@ export const se_MalformedContentTypeWithBodyCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedContentTypeWithBody"; let body: any; - body = JSON.stringify({ - ...(input.hi != null && { hi: input.hi }), - }); + body = JSON.stringify( + take(input, { + hi: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1833,9 +1859,11 @@ export const se_MalformedDoubleCommand = async ( ], }); let body: any; - body = JSON.stringify({ - ...(input.doubleInBody != null && { doubleInBody: __serializeFloat(input.doubleInBody) }), - }); + body = JSON.stringify( + take(input, { + doubleInBody: (_) => __serializeFloat(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1880,9 +1908,11 @@ export const se_MalformedFloatCommand = async ( ], }); let body: any; - body = JSON.stringify({ - ...(input.floatInBody != null && { floatInBody: __serializeFloat(input.floatInBody) }), - }); + body = JSON.stringify( + take(input, { + floatInBody: (_) => __serializeFloat(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1921,9 +1951,11 @@ export const se_MalformedIntegerCommand = async ( integerInQuery: [() => input.integerInQuery !== void 0, () => input.integerInQuery!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.integerInBody != null && { integerInBody: input.integerInBody }), - }); + body = JSON.stringify( + take(input, { + integerInBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1949,9 +1981,11 @@ export const se_MalformedListCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedList"; let body: any; - body = JSON.stringify({ - ...(input.bodyList != null && { bodyList: se_SimpleList(input.bodyList, context) }), - }); + body = JSON.stringify( + take(input, { + bodyList: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -1989,9 +2023,11 @@ export const se_MalformedLongCommand = async ( longInQuery: [() => input.longInQuery !== void 0, () => input.longInQuery!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.longInBody != null && { longInBody: input.longInBody }), - }); + body = JSON.stringify( + take(input, { + longInBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2017,9 +2053,11 @@ export const se_MalformedMapCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedMap"; let body: any; - body = JSON.stringify({ - ...(input.bodyMap != null && { bodyMap: se_SimpleMap(input.bodyMap, context) }), - }); + body = JSON.stringify( + take(input, { + bodyMap: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2044,10 +2082,12 @@ export const se_MalformedRequestBodyCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedRequestBody"; let body: any; - body = JSON.stringify({ - ...(input.float != null && { float: __serializeFloat(input.float) }), - ...(input.int != null && { int: input.int }), - }); + body = JSON.stringify( + take(input, { + float: (_) => __serializeFloat(_), + int: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2085,9 +2125,11 @@ export const se_MalformedShortCommand = async ( shortInQuery: [() => input.shortInQuery !== void 0, () => input.shortInQuery!.toString()], }); let body: any; - body = JSON.stringify({ - ...(input.shortInBody != null && { shortInBody: input.shortInBody }), - }); + body = JSON.stringify( + take(input, { + shortInBody: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2141,9 +2183,11 @@ export const se_MalformedTimestampBodyDateTimeCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedTimestampBodyDateTime"; let body: any; - body = JSON.stringify({ - ...(input.timestamp != null && { timestamp: input.timestamp.toISOString().split(".")[0] + "Z" }), - }); + body = JSON.stringify( + take(input, { + timestamp: (_) => _.toISOString().split(".")[0] + "Z", + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2169,9 +2213,11 @@ export const se_MalformedTimestampBodyDefaultCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedTimestampBodyDefault"; let body: any; - body = JSON.stringify({ - ...(input.timestamp != null && { timestamp: Math.round(input.timestamp.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + timestamp: (_) => Math.round(_.getTime() / 1000), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2197,9 +2243,11 @@ export const se_MalformedTimestampBodyHttpDateCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedTimestampBodyHttpDate"; let body: any; - body = JSON.stringify({ - ...(input.timestamp != null && { timestamp: __dateToUtcString(input.timestamp) }), - }); + body = JSON.stringify( + take(input, { + timestamp: (_) => __dateToUtcString(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2490,9 +2538,11 @@ export const se_MalformedUnionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/MalformedUnion"; let body: any; - body = JSON.stringify({ - ...(input.union != null && { union: se_SimpleUnion(input.union, context) }), - }); + body = JSON.stringify( + take(input, { + union: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2730,9 +2780,11 @@ export const se_PostPlayerActionCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PostPlayerAction"; let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: se_PlayerAction(input.action, context) }), - }); + body = JSON.stringify( + take(input, { + action: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2757,9 +2809,11 @@ export const se_PostUnionWithJsonNameCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/PostUnionWithJsonName"; let body: any; - body = JSON.stringify({ - ...(input.value != null && { value: se_UnionWithJsonName(input.value, context) }), - }); + body = JSON.stringify( + take(input, { + value: (_) => se_UnionWithJsonName(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2865,9 +2919,11 @@ export const se_RecursiveShapesCommand = async ( }; const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/RecursiveShapes"; let body: any; - body = JSON.stringify({ - ...(input.nested != null && { nested: se_RecursiveShapesInputOutputNested1(input.nested, context) }), - }); + body = JSON.stringify( + take(input, { + nested: (_) => se_RecursiveShapesInputOutputNested1(_, context), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -2894,17 +2950,19 @@ export const se_SimpleScalarPropertiesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SimpleScalarProperties"; let body: any; - body = JSON.stringify({ - ...(input.byteValue != null && { byteValue: input.byteValue }), - ...(input.doubleValue != null && { DoubleDribble: __serializeFloat(input.doubleValue) }), - ...(input.falseBooleanValue != null && { falseBooleanValue: input.falseBooleanValue }), - ...(input.floatValue != null && { floatValue: __serializeFloat(input.floatValue) }), - ...(input.integerValue != null && { integerValue: input.integerValue }), - ...(input.longValue != null && { longValue: input.longValue }), - ...(input.shortValue != null && { shortValue: input.shortValue }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - ...(input.trueBooleanValue != null && { trueBooleanValue: input.trueBooleanValue }), - }); + body = JSON.stringify( + take(input, { + byteValue: [], + DoubleDribble: [, (_) => __serializeFloat(_), `doubleValue`], + falseBooleanValue: [], + floatValue: (_) => __serializeFloat(_), + integerValue: [], + longValue: [], + shortValue: [], + stringValue: [], + trueBooleanValue: [], + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3016,9 +3074,11 @@ export const se_TestBodyStructureCommand = async ( }); const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/body"; let body: any; - body = JSON.stringify({ - ...(input.testConfig != null && { testConfig: se_TestConfig(input.testConfig, context) }), - }); + body = JSON.stringify( + take(input, { + testConfig: (_) => _json(_), + }) + ); return new __HttpRequest({ protocol, hostname, @@ -3096,7 +3156,7 @@ export const se_TestPayloadStructureCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/payload"; let body: any; if (input.payloadConfig !== undefined) { - body = se_PayloadConfig(input.payloadConfig, context); + body = _json(input.payloadConfig); } if (body === undefined) { body = {}; @@ -3220,10 +3280,9 @@ const de_AllQueryStringTypesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3258,10 +3317,9 @@ const de_ConstantAndVariableQueryStringCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3296,10 +3354,9 @@ const de_ConstantQueryStringCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3318,9 +3375,10 @@ export const de_DatetimeOffsetsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datetime != null) { - contents.datetime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.datetime)); - } + const doc = take(data, { + datetime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3337,10 +3395,9 @@ const de_DatetimeOffsetsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3359,12 +3416,11 @@ export const de_DocumentTypeCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.documentValue != null) { - contents.documentValue = de_Document(data.documentValue, context); - } - if (data.stringValue != null) { - contents.stringValue = __expectString(data.stringValue); - } + const doc = take(data, { + documentValue: (_) => de_Document(_, context), + stringValue: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3381,10 +3437,9 @@ const de_DocumentTypeCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3421,10 +3476,9 @@ const de_DocumentTypeAsPayloadCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3459,10 +3513,9 @@ const de_EmptyInputAndEmptyOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3497,10 +3550,9 @@ const de_EndpointOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3535,10 +3587,9 @@ const de_EndpointWithHostLabelOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3557,12 +3608,11 @@ export const de_FractionalSecondsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.datetime != null) { - contents.datetime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.datetime)); - } - if (data.httpdate != null) { - contents.httpdate = __expectNonNull(__parseRfc7231DateTime(data.httpdate)); - } + const doc = take(data, { + datetime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + httpdate: (_) => __expectNonNull(__parseRfc7231DateTime(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -3579,10 +3629,9 @@ const de_FractionalSecondsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3629,10 +3678,9 @@ const de_GreetingWithErrorsCommandError = async ( throw await de_InvalidGreetingRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); } @@ -3668,10 +3716,9 @@ const de_HostWithPathOperationCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3690,9 +3737,10 @@ export const de_HttpChecksumRequiredCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.foo != null) { - contents.foo = __expectString(data.foo); - } + const doc = take(data, { + foo: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -3709,10 +3757,9 @@ const de_HttpChecksumRequiredCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3748,10 +3795,9 @@ const de_HttpEnumPayloadCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3788,10 +3834,9 @@ const de_HttpPayloadTraitsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3828,10 +3873,9 @@ const de_HttpPayloadTraitsWithMediaTypeCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3850,7 +3894,7 @@ export const de_HttpPayloadWithStructureCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.nested = de_NestedPayload(data, context); + contents.nested = _json(data); return contents; }; @@ -3867,10 +3911,9 @@ const de_HttpPayloadWithStructureCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3915,10 +3958,9 @@ const de_HttpPrefixHeadersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3962,10 +4004,9 @@ const de_HttpPrefixHeadersInResponseCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4000,10 +4041,9 @@ const de_HttpRequestWithFloatLabelsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4038,10 +4078,9 @@ const de_HttpRequestWithGreedyLabelInPathCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4076,10 +4115,9 @@ const de_HttpRequestWithLabelsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4114,10 +4152,9 @@ const de_HttpRequestWithLabelsAndTimestampFormatCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4152,10 +4189,9 @@ const de_HttpRequestWithRegexLiteralCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4193,10 +4229,9 @@ const de_HttpResponseCodeCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4232,10 +4267,9 @@ const de_HttpStringPayloadCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4254,9 +4288,10 @@ export const de_IgnoreQueryParamsInResponseCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.baz != null) { - contents.baz = __expectString(data.baz); - } + const doc = take(data, { + baz: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4273,10 +4308,9 @@ const de_IgnoreQueryParamsInResponseCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4366,10 +4400,9 @@ const de_InputAndOutputWithHeadersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4388,9 +4421,10 @@ export const de_JsonBlobsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.data != null) { - contents.data = context.base64Decoder(data.data); - } + const doc = take(data, { + data: context.base64Decoder, + }); + Object.assign(contents, doc); return contents; }; @@ -4407,10 +4441,9 @@ const de_JsonBlobsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4429,24 +4462,15 @@ export const de_JsonEnumsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fooEnum1 != null) { - contents.fooEnum1 = __expectString(data.fooEnum1); - } - if (data.fooEnum2 != null) { - contents.fooEnum2 = __expectString(data.fooEnum2); - } - if (data.fooEnum3 != null) { - contents.fooEnum3 = __expectString(data.fooEnum3); - } - if (data.fooEnumList != null) { - contents.fooEnumList = de_FooEnumList(data.fooEnumList, context); - } - if (data.fooEnumMap != null) { - contents.fooEnumMap = de_FooEnumMap(data.fooEnumMap, context); - } - if (data.fooEnumSet != null) { - contents.fooEnumSet = de_FooEnumSet(data.fooEnumSet, context); - } + const doc = take(data, { + fooEnum1: __expectString, + fooEnum2: __expectString, + fooEnum3: __expectString, + fooEnumList: _json, + fooEnumMap: _json, + fooEnumSet: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4463,10 +4487,9 @@ const de_JsonEnumsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4485,24 +4508,15 @@ export const de_JsonIntEnumsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.integerEnum1 != null) { - contents.integerEnum1 = __expectInt32(data.integerEnum1); - } - if (data.integerEnum2 != null) { - contents.integerEnum2 = __expectInt32(data.integerEnum2); - } - if (data.integerEnum3 != null) { - contents.integerEnum3 = __expectInt32(data.integerEnum3); - } - if (data.integerEnumList != null) { - contents.integerEnumList = de_IntegerEnumList(data.integerEnumList, context); - } - if (data.integerEnumMap != null) { - contents.integerEnumMap = de_IntegerEnumMap(data.integerEnumMap, context); - } - if (data.integerEnumSet != null) { - contents.integerEnumSet = de_IntegerEnumSet(data.integerEnumSet, context); - } + const doc = take(data, { + integerEnum1: __expectInt32, + integerEnum2: __expectInt32, + integerEnum3: __expectInt32, + integerEnumList: _json, + integerEnumMap: _json, + integerEnumSet: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -4519,10 +4533,9 @@ const de_JsonIntEnumsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4541,36 +4554,19 @@ export const de_JsonListsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.booleanList != null) { - contents.booleanList = de_BooleanList(data.booleanList, context); - } - if (data.enumList != null) { - contents.enumList = de_FooEnumList(data.enumList, context); - } - if (data.intEnumList != null) { - contents.intEnumList = de_IntegerEnumList(data.intEnumList, context); - } - if (data.integerList != null) { - contents.integerList = de_IntegerList(data.integerList, context); - } - if (data.nestedStringList != null) { - contents.nestedStringList = de_NestedStringList(data.nestedStringList, context); - } - if (data.sparseStringList != null) { - contents.sparseStringList = de_SparseStringList(data.sparseStringList, context); - } - if (data.stringList != null) { - contents.stringList = de_StringList(data.stringList, context); - } - if (data.stringSet != null) { - contents.stringSet = de_StringSet(data.stringSet, context); - } - if (data.myStructureList != null) { - contents.structureList = de_StructureList(data.myStructureList, context); - } - if (data.timestampList != null) { - contents.timestampList = de_TimestampList(data.timestampList, context); - } + const doc = take(data, { + booleanList: _json, + enumList: _json, + intEnumList: _json, + integerList: _json, + nestedStringList: _json, + sparseStringList: (_) => de_SparseStringList(_, context), + stringList: _json, + stringSet: _json, + structureList: [, (_) => de_StructureList(_, context), `myStructureList`], + timestampList: (_) => de_TimestampList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4587,10 +4583,9 @@ const de_JsonListsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4609,36 +4604,19 @@ export const de_JsonMapsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.denseBooleanMap != null) { - contents.denseBooleanMap = de_DenseBooleanMap(data.denseBooleanMap, context); - } - if (data.denseNumberMap != null) { - contents.denseNumberMap = de_DenseNumberMap(data.denseNumberMap, context); - } - if (data.denseSetMap != null) { - contents.denseSetMap = de_DenseSetMap(data.denseSetMap, context); - } - if (data.denseStringMap != null) { - contents.denseStringMap = de_DenseStringMap(data.denseStringMap, context); - } - if (data.denseStructMap != null) { - contents.denseStructMap = de_DenseStructMap(data.denseStructMap, context); - } - if (data.sparseBooleanMap != null) { - contents.sparseBooleanMap = de_SparseBooleanMap(data.sparseBooleanMap, context); - } - if (data.sparseNumberMap != null) { - contents.sparseNumberMap = de_SparseNumberMap(data.sparseNumberMap, context); - } - if (data.sparseSetMap != null) { - contents.sparseSetMap = de_SparseSetMap(data.sparseSetMap, context); - } - if (data.sparseStringMap != null) { - contents.sparseStringMap = de_SparseStringMap(data.sparseStringMap, context); - } - if (data.sparseStructMap != null) { - contents.sparseStructMap = de_SparseStructMap(data.sparseStructMap, context); - } + const doc = take(data, { + denseBooleanMap: _json, + denseNumberMap: _json, + denseSetMap: _json, + denseStringMap: _json, + denseStructMap: _json, + sparseBooleanMap: (_) => de_SparseBooleanMap(_, context), + sparseNumberMap: (_) => de_SparseNumberMap(_, context), + sparseSetMap: (_) => de_SparseSetMap(_, context), + sparseStringMap: (_) => de_SparseStringMap(_, context), + sparseStructMap: (_) => de_SparseStructMap(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -4655,10 +4633,9 @@ const de_JsonMapsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4677,27 +4654,16 @@ export const de_JsonTimestampsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dateTime != null) { - contents.dateTime = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.dateTime)); - } - if (data.dateTimeOnTarget != null) { - contents.dateTimeOnTarget = __expectNonNull(__parseRfc3339DateTimeWithOffset(data.dateTimeOnTarget)); - } - if (data.epochSeconds != null) { - contents.epochSeconds = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.epochSeconds))); - } - if (data.epochSecondsOnTarget != null) { - contents.epochSecondsOnTarget = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.epochSecondsOnTarget))); - } - if (data.httpDate != null) { - contents.httpDate = __expectNonNull(__parseRfc7231DateTime(data.httpDate)); - } - if (data.httpDateOnTarget != null) { - contents.httpDateOnTarget = __expectNonNull(__parseRfc7231DateTime(data.httpDateOnTarget)); - } - if (data.normal != null) { - contents.normal = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.normal))); - } + const doc = take(data, { + dateTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + dateTimeOnTarget: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + epochSeconds: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + epochSecondsOnTarget: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + httpDate: (_) => __expectNonNull(__parseRfc7231DateTime(_)), + httpDateOnTarget: (_) => __expectNonNull(__parseRfc7231DateTime(_)), + normal: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -4714,10 +4680,9 @@ const de_JsonTimestampsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4736,9 +4701,10 @@ export const de_JsonUnionsCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contents != null) { - contents.contents = de_MyUnion(__expectUnion(data.contents), context); - } + const doc = take(data, { + contents: (_) => de_MyUnion(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -4755,10 +4721,9 @@ const de_JsonUnionsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4777,9 +4742,10 @@ export const de_MalformedAcceptWithBodyCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.hi != null) { - contents.hi = __expectString(data.hi); - } + const doc = take(data, { + hi: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -4796,10 +4762,9 @@ const de_MalformedAcceptWithBodyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4835,10 +4800,9 @@ const de_MalformedAcceptWithGenericStringCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4874,10 +4838,9 @@ const de_MalformedAcceptWithPayloadCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4912,10 +4875,9 @@ const de_MalformedBlobCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4950,10 +4912,9 @@ const de_MalformedBooleanCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4988,10 +4949,9 @@ const de_MalformedByteCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5026,10 +4986,9 @@ const de_MalformedContentTypeWithBodyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5064,10 +5023,9 @@ const de_MalformedContentTypeWithGenericStringCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5102,10 +5060,9 @@ const de_MalformedContentTypeWithoutBodyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5140,10 +5097,9 @@ const de_MalformedContentTypeWithPayloadCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5178,10 +5134,9 @@ const de_MalformedDoubleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5216,10 +5171,9 @@ const de_MalformedFloatCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5254,10 +5208,9 @@ const de_MalformedIntegerCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5292,10 +5245,9 @@ const de_MalformedListCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5330,10 +5282,9 @@ const de_MalformedLongCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5368,10 +5319,9 @@ const de_MalformedMapCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5406,10 +5356,9 @@ const de_MalformedRequestBodyCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5444,10 +5393,9 @@ const de_MalformedShortCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5482,10 +5430,9 @@ const de_MalformedStringCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5520,10 +5467,9 @@ const de_MalformedTimestampBodyDateTimeCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5558,10 +5504,9 @@ const de_MalformedTimestampBodyDefaultCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5596,10 +5541,9 @@ const de_MalformedTimestampBodyHttpDateCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5634,10 +5578,9 @@ const de_MalformedTimestampHeaderDateTimeCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5672,10 +5615,9 @@ const de_MalformedTimestampHeaderDefaultCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5710,10 +5652,9 @@ const de_MalformedTimestampHeaderEpochCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5748,10 +5689,9 @@ const de_MalformedTimestampPathDefaultCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5786,10 +5726,9 @@ const de_MalformedTimestampPathEpochCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5824,10 +5763,9 @@ const de_MalformedTimestampPathHttpDateCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5862,10 +5800,9 @@ const de_MalformedTimestampQueryDefaultCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5900,10 +5837,9 @@ const de_MalformedTimestampQueryEpochCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5938,10 +5874,9 @@ const de_MalformedTimestampQueryHttpDateCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5976,10 +5911,9 @@ const de_MalformedUnionCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6018,10 +5952,9 @@ const de_MediaTypeHeaderCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6056,10 +5989,9 @@ const de_NoInputAndNoOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6094,10 +6026,9 @@ const de_NoInputAndOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6138,10 +6069,9 @@ const de_NullAndEmptyHeadersClientCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6182,10 +6112,9 @@ const de_NullAndEmptyHeadersServerCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6220,10 +6149,9 @@ const de_OmitsNullSerializesEmptyStringCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6258,10 +6186,9 @@ const de_OmitsSerializingEmptyListsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6280,9 +6207,10 @@ export const de_PostPlayerActionCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = de_PlayerAction(__expectUnion(data.action), context); - } + const doc = take(data, { + action: (_) => _json(__expectUnion(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -6299,10 +6227,9 @@ const de_PostPlayerActionCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6321,9 +6248,10 @@ export const de_PostUnionWithJsonNameCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.value != null) { - contents.value = de_UnionWithJsonName(__expectUnion(data.value), context); - } + const doc = take(data, { + value: (_) => de_UnionWithJsonName(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -6340,10 +6268,9 @@ const de_PostUnionWithJsonNameCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6378,10 +6305,9 @@ const de_QueryIdempotencyTokenAutoFillCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6416,10 +6342,9 @@ const de_QueryParamsAsStringListMapCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6454,10 +6379,9 @@ const de_QueryPrecedenceCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6476,9 +6400,10 @@ export const de_RecursiveShapesCommand = async ( $metadata: deserializeMetadata(output), }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nested != null) { - contents.nested = de_RecursiveShapesInputOutputNested1(data.nested, context); - } + const doc = take(data, { + nested: (_) => de_RecursiveShapesInputOutputNested1(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -6495,10 +6420,9 @@ const de_RecursiveShapesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6518,33 +6442,18 @@ export const de_SimpleScalarPropertiesCommand = async ( foo: [, output.headers["x-foo"]], }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.byteValue != null) { - contents.byteValue = __expectByte(data.byteValue); - } - if (data.DoubleDribble != null) { - contents.doubleValue = __limitedParseDouble(data.DoubleDribble); - } - if (data.falseBooleanValue != null) { - contents.falseBooleanValue = __expectBoolean(data.falseBooleanValue); - } - if (data.floatValue != null) { - contents.floatValue = __limitedParseFloat32(data.floatValue); - } - if (data.integerValue != null) { - contents.integerValue = __expectInt32(data.integerValue); - } - if (data.longValue != null) { - contents.longValue = __expectLong(data.longValue); - } - if (data.shortValue != null) { - contents.shortValue = __expectShort(data.shortValue); - } - if (data.stringValue != null) { - contents.stringValue = __expectString(data.stringValue); - } - if (data.trueBooleanValue != null) { - contents.trueBooleanValue = __expectBoolean(data.trueBooleanValue); - } + const doc = take(data, { + byteValue: __expectByte, + doubleValue: [, __limitedParseDouble, `DoubleDribble`], + falseBooleanValue: __expectBoolean, + floatValue: __limitedParseFloat32, + integerValue: __expectInt32, + longValue: __expectLong, + shortValue: __expectShort, + stringValue: __expectString, + trueBooleanValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -6561,10 +6470,9 @@ const de_SimpleScalarPropertiesCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6602,10 +6510,9 @@ const de_StreamingTraitsCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6640,10 +6547,9 @@ const de_StreamingTraitsRequireLengthCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6681,10 +6587,9 @@ const de_StreamingTraitsWithMediaTypeCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6704,9 +6609,10 @@ export const de_TestBodyStructureCommand = async ( testId: [, output.headers["x-amz-test-id"]], }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.testConfig != null) { - contents.testConfig = de_TestConfig(data.testConfig, context); - } + const doc = take(data, { + testConfig: _json, + }); + Object.assign(contents, doc); return contents; }; @@ -6723,10 +6629,9 @@ const de_TestBodyStructureCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6762,10 +6667,9 @@ const de_TestNoPayloadCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6802,10 +6706,9 @@ const de_TestPayloadBlobCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6825,7 +6728,7 @@ export const de_TestPayloadStructureCommand = async ( testId: [, output.headers["x-amz-test-id"]], }); const data: Record | undefined = __expectObject(await parseBody(output.body, context)); - contents.payloadConfig = de_PayloadConfig(data, context); + contents.payloadConfig = _json(data); return contents; }; @@ -6842,10 +6745,9 @@ const de_TestPayloadStructureCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6908,10 +6810,9 @@ const de_TimestampFormatHeadersCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; @@ -6946,15 +6847,14 @@ const de_UnitInputAndOutputCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: __BaseException, errorCode, }); }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restJson1ComplexErrorRes */ @@ -6963,12 +6863,11 @@ const de_ComplexErrorRes = async (parsedOutput: any, context: __SerdeContext): P Header: [, parsedOutput.headers["x-header"]], }); const data: any = parsedOutput.body; - if (data.Nested != null) { - contents.Nested = de_ComplexNestedErrorData(data.Nested, context); - } - if (data.TopLevel != null) { - contents.TopLevel = __expectString(data.TopLevel); - } + const doc = take(data, { + Nested: (_) => de_ComplexNestedErrorData(_, context), + TopLevel: __expectString, + }); + Object.assign(contents, doc); const exception = new ComplexError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6982,6 +6881,8 @@ const de_ComplexErrorRes = async (parsedOutput: any, context: __SerdeContext): P const de_FooErrorRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; + const doc = take(data, {}); + Object.assign(contents, doc); const exception = new FooError({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -6995,9 +6896,10 @@ const de_FooErrorRes = async (parsedOutput: any, context: __SerdeContext): Promi const de_InvalidGreetingRes = async (parsedOutput: any, context: __SerdeContext): Promise => { const contents: any = map({}); const data: any = parsedOutput.body; - if (data.Message != null) { - contents.Message = __expectString(data.Message); - } + const doc = take(data, { + Message: __expectString, + }); + Object.assign(contents, doc); const exception = new InvalidGreeting({ $metadata: deserializeMetadata(parsedOutput), ...contents, @@ -7005,70 +6907,15 @@ const de_InvalidGreetingRes = async (parsedOutput: any, context: __SerdeContext) return __decorateServiceException(exception, parsedOutput.body); }; -/** - * serializeAws_restJson1DenseBooleanMap - */ -const se_DenseBooleanMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DenseBooleanMap omitted. -/** - * serializeAws_restJson1DenseNumberMap - */ -const se_DenseNumberMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DenseNumberMap omitted. -/** - * serializeAws_restJson1DenseSetMap - */ -const se_DenseSetMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_StringSet(value, context); - return acc; - }, {}); -}; +// se_DenseSetMap omitted. -/** - * serializeAws_restJson1DenseStringMap - */ -const se_DenseStringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_DenseStringMap omitted. -/** - * serializeAws_restJson1DenseStructMap - */ -const se_DenseStructMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_GreetingStruct(value, context); - return acc; - }, {}); -}; +// se_DenseStructMap omitted. /** * serializeAws_restJson1Document @@ -7085,45 +6932,22 @@ const se_MyUnion = (input: MyUnion, context: __SerdeContext): any => { blobValue: (value) => ({ blobValue: context.base64Encoder(value) }), booleanValue: (value) => ({ booleanValue: value }), enumValue: (value) => ({ enumValue: value }), - listValue: (value) => ({ listValue: se_StringList(value, context) }), - mapValue: (value) => ({ mapValue: se_StringMap(value, context) }), + listValue: (value) => ({ listValue: _json(value) }), + mapValue: (value) => ({ mapValue: _json(value) }), numberValue: (value) => ({ numberValue: value }), - renamedStructureValue: (value) => ({ renamedStructureValue: se_RenamedGreeting(value, context) }), + renamedStructureValue: (value) => ({ renamedStructureValue: _json(value) }), stringValue: (value) => ({ stringValue: value }), - structureValue: (value) => ({ structureValue: se_GreetingStruct(value, context) }), + structureValue: (value) => ({ structureValue: _json(value) }), timestampValue: (value) => ({ timestampValue: Math.round(value.getTime() / 1000) }), _: (name, value) => ({ name: value } as any), }); }; -/** - * serializeAws_restJson1NestedPayload - */ -const se_NestedPayload = (input: NestedPayload, context: __SerdeContext): any => { - return { - ...(input.greeting != null && { greeting: input.greeting }), - ...(input.name != null && { name: input.name }), - }; -}; +// se_NestedPayload omitted. -/** - * serializeAws_restJson1PayloadConfig - */ -const se_PayloadConfig = (input: PayloadConfig, context: __SerdeContext): any => { - return { - ...(input.data != null && { data: input.data }), - }; -}; +// se_PayloadConfig omitted. -/** - * serializeAws_restJson1PlayerAction - */ -const se_PlayerAction = (input: PlayerAction, context: __SerdeContext): any => { - return PlayerAction.visit(input, { - quit: (value) => ({ quit: se_Unit(value, context) }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_PlayerAction omitted. /** * serializeAws_restJson1RecursiveShapesInputOutputNested1 @@ -7132,10 +6956,10 @@ const se_RecursiveShapesInputOutputNested1 = ( input: RecursiveShapesInputOutputNested1, context: __SerdeContext ): any => { - return { - ...(input.foo != null && { foo: input.foo }), - ...(input.nested != null && { nested: se_RecursiveShapesInputOutputNested2(input.nested, context) }), - }; + return take(input, { + foo: [], + nested: (_) => se_RecursiveShapesInputOutputNested2(_, context), + }); }; /** @@ -7145,48 +6969,17 @@ const se_RecursiveShapesInputOutputNested2 = ( input: RecursiveShapesInputOutputNested2, context: __SerdeContext ): any => { - return { - ...(input.bar != null && { bar: input.bar }), - ...(input.recursiveMember != null && { - recursiveMember: se_RecursiveShapesInputOutputNested1(input.recursiveMember, context), - }), - }; + return take(input, { + bar: [], + recursiveMember: (_) => se_RecursiveShapesInputOutputNested1(_, context), + }); }; -/** - * serializeAws_restJson1SimpleList - */ -const se_SimpleList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_SimpleList omitted. -/** - * serializeAws_restJson1SimpleMap - */ -const se_SimpleMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_SimpleMap omitted. -/** - * serializeAws_restJson1SimpleUnion - */ -const se_SimpleUnion = (input: SimpleUnion, context: __SerdeContext): any => { - return SimpleUnion.visit(input, { - int: (value) => ({ int: value }), - string: (value) => ({ string: value }), - _: (name, value) => ({ name: value } as any), - }); -}; +// se_SimpleUnion omitted. /** * serializeAws_restJson1SparseBooleanMap @@ -7225,7 +7018,7 @@ const se_SparseSetMap = (input: Record, context: __SerdeContex acc[key] = null as any; return acc; } - acc[key] = se_StringSet(value, context); + acc[key] = _json(value); return acc; }, {}); }; @@ -7239,7 +7032,7 @@ const se_SparseStructMap = (input: Record, context: __Se acc[key] = null as any; return acc; } - acc[key] = se_GreetingStruct(value, context); + acc[key] = _json(value); return acc; }, {}); }; @@ -7259,20 +7052,13 @@ const se_StructureList = (input: StructureListMember[], context: __SerdeContext) * serializeAws_restJson1StructureListMember */ const se_StructureListMember = (input: StructureListMember, context: __SerdeContext): any => { - return { - ...(input.a != null && { value: input.a }), - ...(input.b != null && { other: input.b }), - }; + return take(input, { + value: [, , `a`], + other: [, , `b`], + }); }; -/** - * serializeAws_restJson1TestConfig - */ -const se_TestConfig = (input: TestConfig, context: __SerdeContext): any => { - return { - ...(input.timeout != null && { timeout: input.timeout }), - }; -}; +// se_TestConfig omitted. /** * serializeAws_restJson1UnionWithJsonName @@ -7286,141 +7072,37 @@ const se_UnionWithJsonName = (input: UnionWithJsonName, context: __SerdeContext) }); }; -/** - * serializeAws_restJson1RenamedGreeting - */ -const se_RenamedGreeting = (input: RenamedGreeting, context: __SerdeContext): any => { - return { - ...(input.salutation != null && { salutation: input.salutation }), - }; -}; +// se_RenamedGreeting omitted. + +// se_BooleanList omitted. + +// se_FooEnumList omitted. + +// se_FooEnumMap omitted. + +// se_FooEnumSet omitted. + +// se_GreetingStruct omitted. + +// se_IntegerEnumList omitted. + +// se_IntegerEnumMap omitted. + +// se_IntegerEnumSet omitted. + +// se_IntegerList omitted. + +// se_NestedStringList omitted. /** - * serializeAws_restJson1BooleanList + * serializeAws_restJson1SparseStringList */ -const se_BooleanList = (input: boolean[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); +const se_SparseStringList = (input: string[], context: __SerdeContext): any => { + return input; }; /** - * serializeAws_restJson1FooEnumList - */ -const se_FooEnumList = (input: (FooEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1FooEnumMap - */ -const se_FooEnumMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1FooEnumSet - */ -const se_FooEnumSet = (input: (FooEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1GreetingStruct - */ -const se_GreetingStruct = (input: GreetingStruct, context: __SerdeContext): any => { - return { - ...(input.hi != null && { hi: input.hi }), - }; -}; - -/** - * serializeAws_restJson1IntegerEnumList - */ -const se_IntegerEnumList = (input: (IntegerEnum | number)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1IntegerEnumMap - */ -const se_IntegerEnumMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; - -/** - * serializeAws_restJson1IntegerEnumSet - */ -const se_IntegerEnumSet = (input: (IntegerEnum | number)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1IntegerList - */ -const se_IntegerList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; - -/** - * serializeAws_restJson1NestedStringList - */ -const se_NestedStringList = (input: string[][], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_StringList(entry, context); - }); -}; - -/** - * serializeAws_restJson1SparseStringList - */ -const se_SparseStringList = (input: string[], context: __SerdeContext): any => { - return input.map((entry) => { - if (entry === null) { - return null as any; - } - return entry; - }); -}; - -/** - * serializeAws_restJson1SparseStringMap + * serializeAws_restJson1SparseStringMap */ const se_SparseStringMap = (input: Record, context: __SerdeContext): any => { return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { @@ -7433,40 +7115,11 @@ const se_SparseStringMap = (input: Record, context: __SerdeConte }, {}); }; -/** - * serializeAws_restJson1StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringList omitted. -/** - * serializeAws_restJson1StringMap - */ -const se_StringMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = value; - return acc; - }, {}); -}; +// se_StringMap omitted. -/** - * serializeAws_restJson1StringSet - */ -const se_StringSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); -}; +// se_StringSet omitted. /** * serializeAws_restJson1TimestampList @@ -7479,86 +7132,26 @@ const se_TimestampList = (input: Date[], context: __SerdeContext): any => { }); }; -/** - * serializeAws_restJson1Unit - */ -const se_Unit = (input: Unit, context: __SerdeContext): any => { - return {}; -}; +// se_Unit omitted. /** * deserializeAws_restJson1ComplexNestedErrorData */ const de_ComplexNestedErrorData = (output: any, context: __SerdeContext): ComplexNestedErrorData => { - return { - Foo: __expectString(output.Fooooo), - } as any; + return take(output, { + Foo: [, __expectString, `Fooooo`], + }) as any; }; -/** - * deserializeAws_restJson1DenseBooleanMap - */ -const de_DenseBooleanMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectBoolean(value) as any; - return acc; - }, {}); -}; +// de_DenseBooleanMap omitted. -/** - * deserializeAws_restJson1DenseNumberMap - */ -const de_DenseNumberMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_DenseNumberMap omitted. -/** - * deserializeAws_restJson1DenseSetMap - */ -const de_DenseSetMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_StringSet(value, context); - return acc; - }, {}); -}; +// de_DenseSetMap omitted. -/** - * deserializeAws_restJson1DenseStringMap - */ -const de_DenseStringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_DenseStringMap omitted. -/** - * deserializeAws_restJson1DenseStructMap - */ -const de_DenseStructMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = de_GreetingStruct(value, context); - return acc; - }, {}); -}; +// de_DenseStructMap omitted. /** * deserializeAws_restJson1Document @@ -7584,12 +7177,12 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.listValue != null) { return { - listValue: de_StringList(output.listValue, context), + listValue: _json(output.listValue), }; } if (output.mapValue != null) { return { - mapValue: de_StringMap(output.mapValue, context), + mapValue: _json(output.mapValue), }; } if (__expectInt32(output.numberValue) !== undefined) { @@ -7597,7 +7190,7 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.renamedStructureValue != null) { return { - renamedStructureValue: de_RenamedGreeting(output.renamedStructureValue, context), + renamedStructureValue: _json(output.renamedStructureValue), }; } if (__expectString(output.stringValue) !== undefined) { @@ -7605,7 +7198,7 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { } if (output.structureValue != null) { return { - structureValue: de_GreetingStruct(output.structureValue, context), + structureValue: _json(output.structureValue), }; } if (output.timestampValue != null) { @@ -7616,36 +7209,11 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1NestedPayload - */ -const de_NestedPayload = (output: any, context: __SerdeContext): NestedPayload => { - return { - greeting: __expectString(output.greeting), - name: __expectString(output.name), - } as any; -}; +// de_NestedPayload omitted. -/** - * deserializeAws_restJson1PayloadConfig - */ -const de_PayloadConfig = (output: any, context: __SerdeContext): PayloadConfig => { - return { - data: __expectInt32(output.data), - } as any; -}; +// de_PayloadConfig omitted. -/** - * deserializeAws_restJson1PlayerAction - */ -const de_PlayerAction = (output: any, context: __SerdeContext): PlayerAction => { - if (output.quit != null) { - return { - quit: de_Unit(output.quit, context), - }; - } - return { $unknown: Object.entries(output)[0] }; -}; +// de_PlayerAction omitted. /** * deserializeAws_restJson1RecursiveShapesInputOutputNested1 @@ -7654,10 +7222,10 @@ const de_RecursiveShapesInputOutputNested1 = ( output: any, context: __SerdeContext ): RecursiveShapesInputOutputNested1 => { - return { - foo: __expectString(output.foo), - nested: output.nested != null ? de_RecursiveShapesInputOutputNested2(output.nested, context) : undefined, - } as any; + return take(output, { + foo: __expectString, + nested: (_: any) => de_RecursiveShapesInputOutputNested2(_, context), + }) as any; }; /** @@ -7667,13 +7235,10 @@ const de_RecursiveShapesInputOutputNested2 = ( output: any, context: __SerdeContext ): RecursiveShapesInputOutputNested2 => { - return { - bar: __expectString(output.bar), - recursiveMember: - output.recursiveMember != null - ? de_RecursiveShapesInputOutputNested1(output.recursiveMember, context) - : undefined, - } as any; + return take(output, { + bar: __expectString, + recursiveMember: (_: any) => de_RecursiveShapesInputOutputNested1(_, context), + }) as any; }; /** @@ -7713,7 +7278,7 @@ const de_SparseSetMap = (output: any, context: __SerdeContext): Record e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return de_StructureListMember(entry, context); }); return retVal; @@ -7751,20 +7313,13 @@ const de_StructureList = (output: any, context: __SerdeContext): StructureListMe * deserializeAws_restJson1StructureListMember */ const de_StructureListMember = (output: any, context: __SerdeContext): StructureListMember => { - return { - a: __expectString(output.value), - b: __expectString(output.other), - } as any; + return take(output, { + a: [, __expectString, `value`], + b: [, __expectString, `other`], + }) as any; }; -/** - * deserializeAws_restJson1TestConfig - */ -const de_TestConfig = (output: any, context: __SerdeContext): TestConfig => { - return { - timeout: __expectInt32(output.timeout), - } as any; -}; +// de_TestConfig omitted. /** * deserializeAws_restJson1UnionWithJsonName @@ -7782,154 +7337,27 @@ const de_UnionWithJsonName = (output: any, context: __SerdeContext): UnionWithJs return { $unknown: Object.entries(output)[0] }; }; -/** - * deserializeAws_restJson1RenamedGreeting - */ -const de_RenamedGreeting = (output: any, context: __SerdeContext): RenamedGreeting => { - return { - salutation: __expectString(output.salutation), - } as any; -}; +// de_RenamedGreeting omitted. -/** - * deserializeAws_restJson1BooleanList - */ -const de_BooleanList = (output: any, context: __SerdeContext): boolean[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectBoolean(entry) as any; - }); - return retVal; -}; +// de_BooleanList omitted. -/** - * deserializeAws_restJson1FooEnumList - */ -const de_FooEnumList = (output: any, context: __SerdeContext): (FooEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FooEnumList omitted. -/** - * deserializeAws_restJson1FooEnumMap - */ -const de_FooEnumMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_FooEnumMap omitted. -/** - * deserializeAws_restJson1FooEnumSet - */ -const de_FooEnumSet = (output: any, context: __SerdeContext): (FooEnum | string)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_FooEnumSet omitted. -/** - * deserializeAws_restJson1GreetingStruct - */ -const de_GreetingStruct = (output: any, context: __SerdeContext): GreetingStruct => { - return { - hi: __expectString(output.hi), - } as any; -}; +// de_GreetingStruct omitted. -/** - * deserializeAws_restJson1IntegerEnumList - */ -const de_IntegerEnumList = (output: any, context: __SerdeContext): (IntegerEnum | number)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_IntegerEnumList omitted. -/** - * deserializeAws_restJson1IntegerEnumMap - */ -const de_IntegerEnumMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectInt32(value) as any; - return acc; - }, {}); -}; +// de_IntegerEnumMap omitted. -/** - * deserializeAws_restJson1IntegerEnumSet - */ -const de_IntegerEnumSet = (output: any, context: __SerdeContext): (IntegerEnum | number)[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_IntegerEnumSet omitted. -/** - * deserializeAws_restJson1IntegerList - */ -const de_IntegerList = (output: any, context: __SerdeContext): number[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectInt32(entry) as any; - }); - return retVal; -}; +// de_IntegerList omitted. -/** - * deserializeAws_restJson1NestedStringList - */ -const de_NestedStringList = (output: any, context: __SerdeContext): string[][] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return de_StringList(entry, context); - }); - return retVal; -}; +// de_NestedStringList omitted. /** * deserializeAws_restJson1SparseStringList @@ -7958,48 +7386,11 @@ const de_SparseStringMap = (output: any, context: __SerdeContext): Record { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringList omitted. -/** - * deserializeAws_restJson1StringMap - */ -const de_StringMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = __expectString(value) as any; - return acc; - }, {}); -}; +// de_StringMap omitted. -/** - * deserializeAws_restJson1StringSet - */ -const de_StringSet = (output: any, context: __SerdeContext): string[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - if (entry === null) { - return null as any; - } - return __expectString(entry) as any; - }); - return retVal; -}; +// de_StringSet omitted. /** * deserializeAws_restJson1TimestampList @@ -8008,20 +7399,12 @@ const de_TimestampList = (output: any, context: __SerdeContext): Date[] => { const retVal = (output || []) .filter((e: any) => e != null) .map((entry: any) => { - if (entry === null) { - return null as any; - } return __expectNonNull(__parseEpochTimestamp(__expectNumber(entry))); }); return retVal; }; -/** - * deserializeAws_restJson1Unit - */ -const de_Unit = (output: any, context: __SerdeContext): Unit => { - return {} as any; -}; +// de_Unit omitted. const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, diff --git a/private/aws-protocoltests-restxml/src/protocols/Aws_restXml.ts b/private/aws-protocoltests-restxml/src/protocols/Aws_restXml.ts index baa2d3c4099d..77af0fac0d21 100644 --- a/private/aws-protocoltests-restxml/src/protocols/Aws_restXml.ts +++ b/private/aws-protocoltests-restxml/src/protocols/Aws_restXml.ts @@ -15,7 +15,7 @@ import { extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, - map as __map, + map, parseBoolean as __parseBoolean, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, @@ -28,7 +28,7 @@ import { strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, strictParseShort as __strictParseShort, - throwDefaultError, + withBaseException, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -2498,10 +2498,9 @@ const de_AllQueryStringTypesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2539,10 +2538,9 @@ const de_BodyWithXmlNameCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2577,10 +2575,9 @@ const de_ConstantAndVariableQueryStringCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2615,10 +2612,9 @@ const de_ConstantQueryStringCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2656,10 +2652,9 @@ const de_DatetimeOffsetsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2694,10 +2689,9 @@ const de_EmptyInputAndEmptyOutputCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2732,10 +2726,9 @@ const de_EndpointOperationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2770,10 +2763,9 @@ const de_EndpointWithHostLabelHeaderOperationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2808,10 +2800,9 @@ const de_EndpointWithHostLabelOperationCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2851,10 +2842,9 @@ const de_FlattenedXmlMapCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2894,10 +2884,9 @@ const de_FlattenedXmlMapWithXmlNameCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2937,10 +2926,9 @@ const de_FlattenedXmlMapWithXmlNamespaceCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -2981,10 +2969,9 @@ const de_FractionalSecondsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3028,10 +3015,9 @@ const de_GreetingWithErrorsCommandError = async ( throw await de_InvalidGreetingRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); } @@ -3069,10 +3055,9 @@ const de_HttpPayloadTraitsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3109,10 +3094,9 @@ const de_HttpPayloadTraitsWithMediaTypeCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3148,10 +3132,9 @@ const de_HttpPayloadWithMemberXmlNameCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3187,10 +3170,9 @@ const de_HttpPayloadWithStructureCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3226,10 +3208,9 @@ const de_HttpPayloadWithXmlNameCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3265,10 +3246,9 @@ const de_HttpPayloadWithXmlNamespaceCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3304,10 +3284,9 @@ const de_HttpPayloadWithXmlNamespaceAndPrefixCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3352,10 +3331,9 @@ const de_HttpPrefixHeadersCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3390,10 +3368,9 @@ const de_HttpRequestWithFloatLabelsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3428,10 +3405,9 @@ const de_HttpRequestWithGreedyLabelInPathCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3466,10 +3442,9 @@ const de_HttpRequestWithLabelsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3504,10 +3479,9 @@ const de_HttpRequestWithLabelsAndTimestampFormatCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3545,10 +3519,9 @@ const de_HttpResponseCodeCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3586,10 +3559,9 @@ const de_IgnoreQueryParamsInResponseCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3668,10 +3640,9 @@ const de_InputAndOutputWithHeadersCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3716,10 +3687,9 @@ const de_NestedXmlMapsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3754,10 +3724,9 @@ const de_NoInputAndNoOutputCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3792,10 +3761,9 @@ const de_NoInputAndOutputCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3836,10 +3804,9 @@ const de_NullAndEmptyHeadersClientCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3880,10 +3847,9 @@ const de_NullAndEmptyHeadersServerCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3918,10 +3884,9 @@ const de_OmitsNullSerializesEmptyStringCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3956,10 +3921,9 @@ const de_QueryIdempotencyTokenAutoFillCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -3994,10 +3958,9 @@ const de_QueryParamsAsStringListMapCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4032,10 +3995,9 @@ const de_QueryPrecedenceCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4073,10 +4035,9 @@ const de_RecursiveShapesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4139,10 +4100,9 @@ const de_SimpleScalarPropertiesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4205,10 +4165,9 @@ const de_TimestampFormatHeadersCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4249,10 +4208,9 @@ const de_XmlAttributesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4288,10 +4246,9 @@ const de_XmlAttributesOnPayloadCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4329,10 +4286,9 @@ const de_XmlBlobsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4370,10 +4326,9 @@ const de_XmlEmptyBlobsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4492,10 +4447,9 @@ const de_XmlEmptyListsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4535,10 +4489,9 @@ const de_XmlEmptyMapsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4576,10 +4529,9 @@ const de_XmlEmptyStringsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4638,10 +4590,9 @@ const de_XmlEnumsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4700,10 +4651,9 @@ const de_XmlIntEnumsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4822,10 +4772,9 @@ const de_XmlListsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4865,10 +4814,9 @@ const de_XmlMapsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4908,10 +4856,9 @@ const de_XmlMapsXmlNameCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -4949,10 +4896,9 @@ const de_XmlNamespacesCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5008,10 +4954,9 @@ const de_XmlTimestampsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; @@ -5051,15 +4996,14 @@ const de_XmlUnionsCommandError = async ( }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - throwDefaultError({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: __BaseException, errorCode, }); }; -const map = __map; +const throwDefaultError = withBaseException(__BaseException); /** * deserializeAws_restXmlComplexErrorRes */ diff --git a/private/aws-restjson-server/src/protocols/Aws_restJson1.ts b/private/aws-restjson-server/src/protocols/Aws_restJson1.ts index 5a884f5c7dec..34f556b0b1d7 100644 --- a/private/aws-restjson-server/src/protocols/Aws_restJson1.ts +++ b/private/aws-restjson-server/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, dateToUtcString as __dateToUtcString, expectBoolean as __expectBoolean, expectByte as __expectByte, @@ -15,7 +16,7 @@ import { LazyJsonString as __LazyJsonString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseBoolean as __parseBoolean, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTime as __parseRfc3339DateTime, @@ -28,6 +29,7 @@ import { strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, strictParseShort as __strictParseShort, + take, } from "@aws-sdk/smithy-client"; import { DocumentType as __DocumentType, @@ -673,12 +675,11 @@ export const deserializeDocumentTypeRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.documentValue != null) { - contents.documentValue = de_Document(data.documentValue, context); - } - if (data.stringValue != null) { - contents.stringValue = __expectString(data.stringValue); - } + const doc = take(data, { + documentValue: (_) => de_Document(_, context), + stringValue: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -786,9 +787,10 @@ export const deserializeEndpointWithHostLabelOperationRequest = async ( contents.label = parsedHost.groups.label; } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.label != null) { - contents.label = __expectString(data.label); - } + const doc = take(data, { + label: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -889,9 +891,10 @@ export const deserializeHttpChecksumRequiredRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.foo != null) { - contents.foo = __expectString(data.foo); - } + const doc = take(data, { + foo: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1410,9 +1413,10 @@ export const deserializeJsonBlobsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.data != null) { - contents.data = context.base64Decoder(data.data); - } + const doc = take(data, { + data: context.base64Decoder, + }); + Object.assign(contents, doc); return contents; }; @@ -1438,24 +1442,15 @@ export const deserializeJsonEnumsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.fooEnum1 != null) { - contents.fooEnum1 = __expectString(data.fooEnum1); - } - if (data.fooEnum2 != null) { - contents.fooEnum2 = __expectString(data.fooEnum2); - } - if (data.fooEnum3 != null) { - contents.fooEnum3 = __expectString(data.fooEnum3); - } - if (data.fooEnumList != null) { - contents.fooEnumList = de_FooEnumList(data.fooEnumList, context); - } - if (data.fooEnumMap != null) { - contents.fooEnumMap = de_FooEnumMap(data.fooEnumMap, context); - } - if (data.fooEnumSet != null) { - contents.fooEnumSet = de_FooEnumSet(data.fooEnumSet, context); - } + const doc = take(data, { + fooEnum1: __expectString, + fooEnum2: __expectString, + fooEnum3: __expectString, + fooEnumList: (_) => de_FooEnumList(_, context), + fooEnumMap: (_) => de_FooEnumMap(_, context), + fooEnumSet: (_) => de_FooEnumSet(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1481,24 +1476,15 @@ export const deserializeJsonIntEnumsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.integerEnum1 != null) { - contents.integerEnum1 = __expectInt32(data.integerEnum1); - } - if (data.integerEnum2 != null) { - contents.integerEnum2 = __expectInt32(data.integerEnum2); - } - if (data.integerEnum3 != null) { - contents.integerEnum3 = __expectInt32(data.integerEnum3); - } - if (data.integerEnumList != null) { - contents.integerEnumList = de_IntegerEnumList(data.integerEnumList, context); - } - if (data.integerEnumMap != null) { - contents.integerEnumMap = de_IntegerEnumMap(data.integerEnumMap, context); - } - if (data.integerEnumSet != null) { - contents.integerEnumSet = de_IntegerEnumSet(data.integerEnumSet, context); - } + const doc = take(data, { + integerEnum1: __expectInt32, + integerEnum2: __expectInt32, + integerEnum3: __expectInt32, + integerEnumList: (_) => de_IntegerEnumList(_, context), + integerEnumMap: (_) => de_IntegerEnumMap(_, context), + integerEnumSet: (_) => de_IntegerEnumSet(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1524,36 +1510,19 @@ export const deserializeJsonListsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.booleanList != null) { - contents.booleanList = de_BooleanList(data.booleanList, context); - } - if (data.enumList != null) { - contents.enumList = de_FooEnumList(data.enumList, context); - } - if (data.intEnumList != null) { - contents.intEnumList = de_IntegerEnumList(data.intEnumList, context); - } - if (data.integerList != null) { - contents.integerList = de_IntegerList(data.integerList, context); - } - if (data.nestedStringList != null) { - contents.nestedStringList = de_NestedStringList(data.nestedStringList, context); - } - if (data.sparseStringList != null) { - contents.sparseStringList = de_SparseStringList(data.sparseStringList, context); - } - if (data.stringList != null) { - contents.stringList = de_StringList(data.stringList, context); - } - if (data.stringSet != null) { - contents.stringSet = de_StringSet(data.stringSet, context); - } - if (data.myStructureList != null) { - contents.structureList = de_StructureList(data.myStructureList, context); - } - if (data.timestampList != null) { - contents.timestampList = de_TimestampList(data.timestampList, context); - } + const doc = take(data, { + booleanList: (_) => de_BooleanList(_, context), + enumList: (_) => de_FooEnumList(_, context), + intEnumList: (_) => de_IntegerEnumList(_, context), + integerList: (_) => de_IntegerList(_, context), + nestedStringList: (_) => de_NestedStringList(_, context), + sparseStringList: (_) => de_SparseStringList(_, context), + stringList: (_) => de_StringList(_, context), + stringSet: (_) => de_StringSet(_, context), + structureList: [, (_) => de_StructureList(_, context), `myStructureList`], + timestampList: (_) => de_TimestampList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1579,36 +1548,19 @@ export const deserializeJsonMapsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.denseBooleanMap != null) { - contents.denseBooleanMap = de_DenseBooleanMap(data.denseBooleanMap, context); - } - if (data.denseNumberMap != null) { - contents.denseNumberMap = de_DenseNumberMap(data.denseNumberMap, context); - } - if (data.denseSetMap != null) { - contents.denseSetMap = de_DenseSetMap(data.denseSetMap, context); - } - if (data.denseStringMap != null) { - contents.denseStringMap = de_DenseStringMap(data.denseStringMap, context); - } - if (data.denseStructMap != null) { - contents.denseStructMap = de_DenseStructMap(data.denseStructMap, context); - } - if (data.sparseBooleanMap != null) { - contents.sparseBooleanMap = de_SparseBooleanMap(data.sparseBooleanMap, context); - } - if (data.sparseNumberMap != null) { - contents.sparseNumberMap = de_SparseNumberMap(data.sparseNumberMap, context); - } - if (data.sparseSetMap != null) { - contents.sparseSetMap = de_SparseSetMap(data.sparseSetMap, context); - } - if (data.sparseStringMap != null) { - contents.sparseStringMap = de_SparseStringMap(data.sparseStringMap, context); - } - if (data.sparseStructMap != null) { - contents.sparseStructMap = de_SparseStructMap(data.sparseStructMap, context); - } + const doc = take(data, { + denseBooleanMap: (_) => de_DenseBooleanMap(_, context), + denseNumberMap: (_) => de_DenseNumberMap(_, context), + denseSetMap: (_) => de_DenseSetMap(_, context), + denseStringMap: (_) => de_DenseStringMap(_, context), + denseStructMap: (_) => de_DenseStructMap(_, context), + sparseBooleanMap: (_) => de_SparseBooleanMap(_, context), + sparseNumberMap: (_) => de_SparseNumberMap(_, context), + sparseSetMap: (_) => de_SparseSetMap(_, context), + sparseStringMap: (_) => de_SparseStringMap(_, context), + sparseStructMap: (_) => de_SparseStructMap(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -1634,27 +1586,16 @@ export const deserializeJsonTimestampsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.dateTime != null) { - contents.dateTime = __expectNonNull(__parseRfc3339DateTime(data.dateTime)); - } - if (data.dateTimeOnTarget != null) { - contents.dateTimeOnTarget = __expectNonNull(__parseRfc3339DateTime(data.dateTimeOnTarget)); - } - if (data.epochSeconds != null) { - contents.epochSeconds = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.epochSeconds))); - } - if (data.epochSecondsOnTarget != null) { - contents.epochSecondsOnTarget = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.epochSecondsOnTarget))); - } - if (data.httpDate != null) { - contents.httpDate = __expectNonNull(__parseRfc7231DateTime(data.httpDate)); - } - if (data.httpDateOnTarget != null) { - contents.httpDateOnTarget = __expectNonNull(__parseRfc7231DateTime(data.httpDateOnTarget)); - } - if (data.normal != null) { - contents.normal = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.normal))); - } + const doc = take(data, { + dateTime: (_) => __expectNonNull(__parseRfc3339DateTime(_)), + dateTimeOnTarget: (_) => __expectNonNull(__parseRfc3339DateTime(_)), + epochSeconds: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + epochSecondsOnTarget: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + httpDate: (_) => __expectNonNull(__parseRfc7231DateTime(_)), + httpDateOnTarget: (_) => __expectNonNull(__parseRfc7231DateTime(_)), + normal: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -1680,9 +1621,10 @@ export const deserializeJsonUnionsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.contents != null) { - contents.contents = de_MyUnion(__expectUnion(data.contents), context); - } + const doc = take(data, { + contents: (_) => de_MyUnion(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -1783,9 +1725,10 @@ export const deserializeMalformedBlobRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.blob != null) { - contents.blob = context.base64Decoder(data.blob); - } + const doc = take(data, { + blob: context.base64Decoder, + }); + Object.assign(contents, doc); return contents; }; @@ -1837,9 +1780,10 @@ export const deserializeMalformedBooleanRequest = async ( contents.booleanInPath = __parseBoolean(decodeURIComponent(parsedPath.groups.booleanInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.booleanInBody != null) { - contents.booleanInBody = __expectBoolean(data.booleanInBody); - } + const doc = take(data, { + booleanInBody: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -1891,9 +1835,10 @@ export const deserializeMalformedByteRequest = async ( contents.byteInPath = __strictParseByte(decodeURIComponent(parsedPath.groups.byteInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.byteInBody != null) { - contents.byteInBody = __expectByte(data.byteInBody); - } + const doc = take(data, { + byteInBody: __expectByte, + }); + Object.assign(contents, doc); return contents; }; @@ -1919,9 +1864,10 @@ export const deserializeMalformedContentTypeWithBodyRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.hi != null) { - contents.hi = __expectString(data.hi); - } + const doc = take(data, { + hi: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -2050,9 +1996,10 @@ export const deserializeMalformedDoubleRequest = async ( contents.doubleInPath = __strictParseDouble(decodeURIComponent(parsedPath.groups.doubleInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.doubleInBody != null) { - contents.doubleInBody = __limitedParseDouble(data.doubleInBody); - } + const doc = take(data, { + doubleInBody: __limitedParseDouble, + }); + Object.assign(contents, doc); return contents; }; @@ -2104,9 +2051,10 @@ export const deserializeMalformedFloatRequest = async ( contents.floatInPath = __strictParseFloat(decodeURIComponent(parsedPath.groups.floatInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.floatInBody != null) { - contents.floatInBody = __limitedParseFloat32(data.floatInBody); - } + const doc = take(data, { + floatInBody: __limitedParseFloat32, + }); + Object.assign(contents, doc); return contents; }; @@ -2158,9 +2106,10 @@ export const deserializeMalformedIntegerRequest = async ( contents.integerInPath = __strictParseInt32(decodeURIComponent(parsedPath.groups.integerInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.integerInBody != null) { - contents.integerInBody = __expectInt32(data.integerInBody); - } + const doc = take(data, { + integerInBody: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2186,9 +2135,10 @@ export const deserializeMalformedListRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bodyList != null) { - contents.bodyList = de_SimpleList(data.bodyList, context); - } + const doc = take(data, { + bodyList: (_) => de_SimpleList(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2240,9 +2190,10 @@ export const deserializeMalformedLongRequest = async ( contents.longInPath = __strictParseLong(decodeURIComponent(parsedPath.groups.longInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.longInBody != null) { - contents.longInBody = __expectLong(data.longInBody); - } + const doc = take(data, { + longInBody: __expectLong, + }); + Object.assign(contents, doc); return contents; }; @@ -2268,9 +2219,10 @@ export const deserializeMalformedMapRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.bodyMap != null) { - contents.bodyMap = de_SimpleMap(data.bodyMap, context); - } + const doc = take(data, { + bodyMap: (_) => de_SimpleMap(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -2296,12 +2248,11 @@ export const deserializeMalformedRequestBodyRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.float != null) { - contents.float = __limitedParseFloat32(data.float); - } - if (data.int != null) { - contents.int = __expectInt32(data.int); - } + const doc = take(data, { + float: __limitedParseFloat32, + int: __expectInt32, + }); + Object.assign(contents, doc); return contents; }; @@ -2353,9 +2304,10 @@ export const deserializeMalformedShortRequest = async ( contents.shortInPath = __strictParseShort(decodeURIComponent(parsedPath.groups.shortInPath)); } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.shortInBody != null) { - contents.shortInBody = __expectShort(data.shortInBody); - } + const doc = take(data, { + shortInBody: __expectShort, + }); + Object.assign(contents, doc); return contents; }; @@ -2414,9 +2366,10 @@ export const deserializeMalformedTimestampBodyDateTimeRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.timestamp != null) { - contents.timestamp = __expectNonNull(__parseRfc3339DateTime(data.timestamp)); - } + const doc = take(data, { + timestamp: (_) => __expectNonNull(__parseRfc3339DateTime(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2442,9 +2395,10 @@ export const deserializeMalformedTimestampBodyDefaultRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.timestamp != null) { - contents.timestamp = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.timestamp))); - } + const doc = take(data, { + timestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }); + Object.assign(contents, doc); return contents; }; @@ -2470,9 +2424,10 @@ export const deserializeMalformedTimestampBodyHttpDateRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.timestamp != null) { - contents.timestamp = __expectNonNull(__parseRfc7231DateTime(data.timestamp)); - } + const doc = take(data, { + timestamp: (_) => __expectNonNull(__parseRfc7231DateTime(_)), + }); + Object.assign(contents, doc); return contents; }; @@ -2801,9 +2756,10 @@ export const deserializeMalformedUnionRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.union != null) { - contents.union = de_SimpleUnion(__expectUnion(data.union), context); - } + const doc = take(data, { + union: (_) => de_SimpleUnion(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -3099,9 +3055,10 @@ export const deserializePostPlayerActionRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.action != null) { - contents.action = de_PlayerAction(__expectUnion(data.action), context); - } + const doc = take(data, { + action: (_) => de_PlayerAction(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -3127,9 +3084,10 @@ export const deserializePostUnionWithJsonNameRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.value != null) { - contents.value = de_UnionWithJsonName(__expectUnion(data.value), context); - } + const doc = take(data, { + value: (_) => de_UnionWithJsonName(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -3300,9 +3258,10 @@ export const deserializeRecursiveShapesRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.nested != null) { - contents.nested = de_RecursiveShapesInputOutputNested1(data.nested, context); - } + const doc = take(data, { + nested: (_) => de_RecursiveShapesInputOutputNested1(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3330,33 +3289,18 @@ export const deserializeSimpleScalarPropertiesRequest = async ( foo: [, output.headers["x-foo"]], }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.byteValue != null) { - contents.byteValue = __expectByte(data.byteValue); - } - if (data.DoubleDribble != null) { - contents.doubleValue = __limitedParseDouble(data.DoubleDribble); - } - if (data.falseBooleanValue != null) { - contents.falseBooleanValue = __expectBoolean(data.falseBooleanValue); - } - if (data.floatValue != null) { - contents.floatValue = __limitedParseFloat32(data.floatValue); - } - if (data.integerValue != null) { - contents.integerValue = __expectInt32(data.integerValue); - } - if (data.longValue != null) { - contents.longValue = __expectLong(data.longValue); - } - if (data.shortValue != null) { - contents.shortValue = __expectShort(data.shortValue); - } - if (data.stringValue != null) { - contents.stringValue = __expectString(data.stringValue); - } - if (data.trueBooleanValue != null) { - contents.trueBooleanValue = __expectBoolean(data.trueBooleanValue); - } + const doc = take(data, { + byteValue: __expectByte, + doubleValue: [, __limitedParseDouble, `DoubleDribble`], + falseBooleanValue: __expectBoolean, + floatValue: __limitedParseFloat32, + integerValue: __expectInt32, + longValue: __expectLong, + shortValue: __expectShort, + stringValue: __expectString, + trueBooleanValue: __expectBoolean, + }); + Object.assign(contents, doc); return contents; }; @@ -3443,9 +3387,10 @@ export const deserializeTestBodyStructureRequest = async ( testId: [, output.headers["x-amz-test-id"]], }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.testConfig != null) { - contents.testConfig = de_TestConfig(data.testConfig, context); - } + const doc = take(data, { + testConfig: (_) => de_TestConfig(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -3715,9 +3660,11 @@ export const serializeDatetimeOffsetsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.datetime != null && { datetime: input.datetime.toISOString().split(".")[0] + "Z" }), - }); + body = JSON.stringify( + take(input, { + datetime: (_) => _.toISOString().split(".")[0] + "Z", + }) + ); if ( body && Object.keys(headers) @@ -3754,10 +3701,12 @@ export const serializeDocumentTypeResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.documentValue != null && { documentValue: se_Document(input.documentValue, context) }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - }); + body = JSON.stringify( + take(input, { + documentValue: (_) => se_Document(_, context), + stringValue: [], + }) + ); if ( body && Object.keys(headers) @@ -3943,10 +3892,12 @@ export const serializeFractionalSecondsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.datetime != null && { datetime: input.datetime.toISOString().split(".")[0] + "Z" }), - ...(input.httpdate != null && { httpdate: __dateToUtcString(input.httpdate) }), - }); + body = JSON.stringify( + take(input, { + datetime: (_) => _.toISOString().split(".")[0] + "Z", + httpdate: (_) => __dateToUtcString(_), + }) + ); if ( body && Object.keys(headers) @@ -4055,9 +4006,11 @@ export const serializeHttpChecksumRequiredResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.foo != null && { foo: input.foo }), - }); + body = JSON.stringify( + take(input, { + foo: [], + }) + ); if ( body && Object.keys(headers) @@ -4590,9 +4543,11 @@ export const serializeIgnoreQueryParamsInResponseResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.baz != null && { baz: input.baz }), - }); + body = JSON.stringify( + take(input, { + baz: [], + }) + ); if ( body && Object.keys(headers) @@ -4714,9 +4669,11 @@ export const serializeJsonBlobsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.data != null && { data: context.base64Encoder(input.data) }), - }); + body = JSON.stringify( + take(input, { + data: (_) => context.base64Encoder(_), + }) + ); if ( body && Object.keys(headers) @@ -4753,14 +4710,16 @@ export const serializeJsonEnumsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.fooEnum1 != null && { fooEnum1: input.fooEnum1 }), - ...(input.fooEnum2 != null && { fooEnum2: input.fooEnum2 }), - ...(input.fooEnum3 != null && { fooEnum3: input.fooEnum3 }), - ...(input.fooEnumList != null && { fooEnumList: se_FooEnumList(input.fooEnumList, context) }), - ...(input.fooEnumMap != null && { fooEnumMap: se_FooEnumMap(input.fooEnumMap, context) }), - ...(input.fooEnumSet != null && { fooEnumSet: se_FooEnumSet(input.fooEnumSet, context) }), - }); + body = JSON.stringify( + take(input, { + fooEnum1: [], + fooEnum2: [], + fooEnum3: [], + fooEnumList: (_) => se_FooEnumList(_, context), + fooEnumMap: (_) => se_FooEnumMap(_, context), + fooEnumSet: (_) => se_FooEnumSet(_, context), + }) + ); if ( body && Object.keys(headers) @@ -4797,14 +4756,16 @@ export const serializeJsonIntEnumsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.integerEnum1 != null && { integerEnum1: input.integerEnum1 }), - ...(input.integerEnum2 != null && { integerEnum2: input.integerEnum2 }), - ...(input.integerEnum3 != null && { integerEnum3: input.integerEnum3 }), - ...(input.integerEnumList != null && { integerEnumList: se_IntegerEnumList(input.integerEnumList, context) }), - ...(input.integerEnumMap != null && { integerEnumMap: se_IntegerEnumMap(input.integerEnumMap, context) }), - ...(input.integerEnumSet != null && { integerEnumSet: se_IntegerEnumSet(input.integerEnumSet, context) }), - }); + body = JSON.stringify( + take(input, { + integerEnum1: [], + integerEnum2: [], + integerEnum3: [], + integerEnumList: (_) => se_IntegerEnumList(_, context), + integerEnumMap: (_) => se_IntegerEnumMap(_, context), + integerEnumSet: (_) => se_IntegerEnumSet(_, context), + }) + ); if ( body && Object.keys(headers) @@ -4841,18 +4802,20 @@ export const serializeJsonListsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.booleanList != null && { booleanList: se_BooleanList(input.booleanList, context) }), - ...(input.enumList != null && { enumList: se_FooEnumList(input.enumList, context) }), - ...(input.intEnumList != null && { intEnumList: se_IntegerEnumList(input.intEnumList, context) }), - ...(input.integerList != null && { integerList: se_IntegerList(input.integerList, context) }), - ...(input.nestedStringList != null && { nestedStringList: se_NestedStringList(input.nestedStringList, context) }), - ...(input.sparseStringList != null && { sparseStringList: se_SparseStringList(input.sparseStringList, context) }), - ...(input.stringList != null && { stringList: se_StringList(input.stringList, context) }), - ...(input.stringSet != null && { stringSet: se_StringSet(input.stringSet, context) }), - ...(input.structureList != null && { myStructureList: se_StructureList(input.structureList, context) }), - ...(input.timestampList != null && { timestampList: se_TimestampList(input.timestampList, context) }), - }); + body = JSON.stringify( + take(input, { + booleanList: (_) => se_BooleanList(_, context), + enumList: (_) => se_FooEnumList(_, context), + intEnumList: (_) => se_IntegerEnumList(_, context), + integerList: (_) => se_IntegerList(_, context), + nestedStringList: (_) => se_NestedStringList(_, context), + sparseStringList: (_) => se_SparseStringList(_, context), + stringList: (_) => se_StringList(_, context), + stringSet: (_) => se_StringSet(_, context), + myStructureList: [, (_) => se_StructureList(_, context), `structureList`], + timestampList: (_) => se_TimestampList(_, context), + }) + ); if ( body && Object.keys(headers) @@ -4889,18 +4852,20 @@ export const serializeJsonMapsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.denseBooleanMap != null && { denseBooleanMap: se_DenseBooleanMap(input.denseBooleanMap, context) }), - ...(input.denseNumberMap != null && { denseNumberMap: se_DenseNumberMap(input.denseNumberMap, context) }), - ...(input.denseSetMap != null && { denseSetMap: se_DenseSetMap(input.denseSetMap, context) }), - ...(input.denseStringMap != null && { denseStringMap: se_DenseStringMap(input.denseStringMap, context) }), - ...(input.denseStructMap != null && { denseStructMap: se_DenseStructMap(input.denseStructMap, context) }), - ...(input.sparseBooleanMap != null && { sparseBooleanMap: se_SparseBooleanMap(input.sparseBooleanMap, context) }), - ...(input.sparseNumberMap != null && { sparseNumberMap: se_SparseNumberMap(input.sparseNumberMap, context) }), - ...(input.sparseSetMap != null && { sparseSetMap: se_SparseSetMap(input.sparseSetMap, context) }), - ...(input.sparseStringMap != null && { sparseStringMap: se_SparseStringMap(input.sparseStringMap, context) }), - ...(input.sparseStructMap != null && { sparseStructMap: se_SparseStructMap(input.sparseStructMap, context) }), - }); + body = JSON.stringify( + take(input, { + denseBooleanMap: (_) => se_DenseBooleanMap(_, context), + denseNumberMap: (_) => se_DenseNumberMap(_, context), + denseSetMap: (_) => se_DenseSetMap(_, context), + denseStringMap: (_) => se_DenseStringMap(_, context), + denseStructMap: (_) => se_DenseStructMap(_, context), + sparseBooleanMap: (_) => se_SparseBooleanMap(_, context), + sparseNumberMap: (_) => se_SparseNumberMap(_, context), + sparseSetMap: (_) => se_SparseSetMap(_, context), + sparseStringMap: (_) => se_SparseStringMap(_, context), + sparseStructMap: (_) => se_SparseStructMap(_, context), + }) + ); if ( body && Object.keys(headers) @@ -4937,19 +4902,17 @@ export const serializeJsonTimestampsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.dateTime != null && { dateTime: input.dateTime.toISOString().split(".")[0] + "Z" }), - ...(input.dateTimeOnTarget != null && { - dateTimeOnTarget: input.dateTimeOnTarget.toISOString().split(".")[0] + "Z", - }), - ...(input.epochSeconds != null && { epochSeconds: Math.round(input.epochSeconds.getTime() / 1000) }), - ...(input.epochSecondsOnTarget != null && { - epochSecondsOnTarget: Math.round(input.epochSecondsOnTarget.getTime() / 1000), - }), - ...(input.httpDate != null && { httpDate: __dateToUtcString(input.httpDate) }), - ...(input.httpDateOnTarget != null && { httpDateOnTarget: __dateToUtcString(input.httpDateOnTarget) }), - ...(input.normal != null && { normal: Math.round(input.normal.getTime() / 1000) }), - }); + body = JSON.stringify( + take(input, { + dateTime: (_) => _.toISOString().split(".")[0] + "Z", + dateTimeOnTarget: (_) => _.toISOString().split(".")[0] + "Z", + epochSeconds: (_) => Math.round(_.getTime() / 1000), + epochSecondsOnTarget: (_) => Math.round(_.getTime() / 1000), + httpDate: (_) => __dateToUtcString(_), + httpDateOnTarget: (_) => __dateToUtcString(_), + normal: (_) => Math.round(_.getTime() / 1000), + }) + ); if ( body && Object.keys(headers) @@ -4986,9 +4949,11 @@ export const serializeJsonUnionsResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.contents != null && { contents: se_MyUnion(input.contents, context) }), - }); + body = JSON.stringify( + take(input, { + contents: (_) => se_MyUnion(_, context), + }) + ); if ( body && Object.keys(headers) @@ -5025,9 +4990,11 @@ export const serializeMalformedAcceptWithBodyResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.hi != null && { hi: input.hi }), - }); + body = JSON.stringify( + take(input, { + hi: [], + }) + ); if ( body && Object.keys(headers) @@ -6388,9 +6355,11 @@ export const serializePostPlayerActionResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.action != null && { action: se_PlayerAction(input.action, context) }), - }); + body = JSON.stringify( + take(input, { + action: (_) => se_PlayerAction(_, context), + }) + ); if ( body && Object.keys(headers) @@ -6427,9 +6396,11 @@ export const serializePostUnionWithJsonNameResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.value != null && { value: se_UnionWithJsonName(input.value, context) }), - }); + body = JSON.stringify( + take(input, { + value: (_) => se_UnionWithJsonName(_, context), + }) + ); if ( body && Object.keys(headers) @@ -6568,9 +6539,11 @@ export const serializeRecursiveShapesResponse = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.nested != null && { nested: se_RecursiveShapesInputOutputNested1(input.nested, context) }), - }); + body = JSON.stringify( + take(input, { + nested: (_) => se_RecursiveShapesInputOutputNested1(_, context), + }) + ); if ( body && Object.keys(headers) @@ -6608,17 +6581,19 @@ export const serializeSimpleScalarPropertiesResponse = async ( "x-foo": input.foo!, }); let body: any; - body = JSON.stringify({ - ...(input.byteValue != null && { byteValue: input.byteValue }), - ...(input.doubleValue != null && { DoubleDribble: __serializeFloat(input.doubleValue) }), - ...(input.falseBooleanValue != null && { falseBooleanValue: input.falseBooleanValue }), - ...(input.floatValue != null && { floatValue: __serializeFloat(input.floatValue) }), - ...(input.integerValue != null && { integerValue: input.integerValue }), - ...(input.longValue != null && { longValue: input.longValue }), - ...(input.shortValue != null && { shortValue: input.shortValue }), - ...(input.stringValue != null && { stringValue: input.stringValue }), - ...(input.trueBooleanValue != null && { trueBooleanValue: input.trueBooleanValue }), - }); + body = JSON.stringify( + take(input, { + byteValue: [], + DoubleDribble: [, (_) => __serializeFloat(_), `doubleValue`], + falseBooleanValue: [], + floatValue: (_) => __serializeFloat(_), + integerValue: [], + longValue: [], + shortValue: [], + stringValue: [], + trueBooleanValue: [], + }) + ); if ( body && Object.keys(headers) @@ -6770,9 +6745,11 @@ export const serializeTestBodyStructureResponse = async ( "x-amz-test-id": input.testId!, }); let body: any; - body = JSON.stringify({ - ...(input.testConfig != null && { testConfig: se_TestConfig(input.testConfig, context) }), - }); + body = JSON.stringify( + take(input, { + testConfig: (_) => se_TestConfig(_, context), + }) + ); if ( body && Object.keys(headers) @@ -7098,7 +7075,6 @@ export const serializeFrameworkException = async ( } }; -const map = __map; export const serializeComplexErrorError = async ( input: ComplexError, ctx: ServerSerdeContext @@ -7119,10 +7095,12 @@ export const serializeComplexErrorError = async ( "x-header": input.Header!, }); let body: any; - body = JSON.stringify({ - ...(input.Nested != null && { Nested: se_ComplexNestedErrorData(input.Nested, context) }), - ...(input.TopLevel != null && { TopLevel: input.TopLevel }), - }); + body = JSON.stringify( + take(input, { + Nested: (_) => se_ComplexNestedErrorData(_, context), + TopLevel: [], + }) + ); return new __HttpResponse({ headers, body, @@ -7173,9 +7151,11 @@ export const serializeInvalidGreetingError = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.Message != null && { Message: input.Message }), - }); + body = JSON.stringify( + take(input, { + Message: [], + }) + ); return new __HttpResponse({ headers, body, @@ -7187,9 +7167,9 @@ export const serializeInvalidGreetingError = async ( * serializeAws_restJson1ComplexNestedErrorData */ const se_ComplexNestedErrorData = (input: ComplexNestedErrorData, context: __SerdeContext): any => { - return { - ...(input.Foo != null && { Fooooo: input.Foo }), - }; + return take(input, { + Fooooo: [, , `Foo`], + }); }; /** @@ -7287,19 +7267,19 @@ const se_MyUnion = (input: MyUnion, context: __SerdeContext): any => { * serializeAws_restJson1NestedPayload */ const se_NestedPayload = (input: NestedPayload, context: __SerdeContext): any => { - return { - ...(input.greeting != null && { greeting: input.greeting }), - ...(input.name != null && { name: input.name }), - }; + return take(input, { + greeting: [], + name: [], + }); }; /** * serializeAws_restJson1PayloadConfig */ const se_PayloadConfig = (input: PayloadConfig, context: __SerdeContext): any => { - return { - ...(input.data != null && { data: input.data }), - }; + return take(input, { + data: [], + }); }; /** @@ -7319,10 +7299,10 @@ const se_RecursiveShapesInputOutputNested1 = ( input: RecursiveShapesInputOutputNested1, context: __SerdeContext ): any => { - return { - ...(input.foo != null && { foo: input.foo }), - ...(input.nested != null && { nested: se_RecursiveShapesInputOutputNested2(input.nested, context) }), - }; + return take(input, { + foo: [], + nested: (_) => se_RecursiveShapesInputOutputNested2(_, context), + }); }; /** @@ -7332,12 +7312,10 @@ const se_RecursiveShapesInputOutputNested2 = ( input: RecursiveShapesInputOutputNested2, context: __SerdeContext ): any => { - return { - ...(input.bar != null && { bar: input.bar }), - ...(input.recursiveMember != null && { - recursiveMember: se_RecursiveShapesInputOutputNested1(input.recursiveMember, context), - }), - }; + return take(input, { + bar: [], + recursiveMember: (_) => se_RecursiveShapesInputOutputNested1(_, context), + }); }; /** @@ -7411,19 +7389,19 @@ const se_StructureList = (input: StructureListMember[], context: __SerdeContext) * serializeAws_restJson1StructureListMember */ const se_StructureListMember = (input: StructureListMember, context: __SerdeContext): any => { - return { - ...(input.a != null && { value: input.a }), - ...(input.b != null && { other: input.b }), - }; + return take(input, { + value: [, , `a`], + other: [, , `b`], + }); }; /** * serializeAws_restJson1TestConfig */ const se_TestConfig = (input: TestConfig, context: __SerdeContext): any => { - return { - ...(input.timeout != null && { timeout: input.timeout }), - }; + return take(input, { + timeout: [], + }); }; /** @@ -7442,31 +7420,23 @@ const se_UnionWithJsonName = (input: UnionWithJsonName, context: __SerdeContext) * serializeAws_restJson1RenamedGreeting */ const se_RenamedGreeting = (input: RenamedGreeting, context: __SerdeContext): any => { - return { - ...(input.salutation != null && { salutation: input.salutation }), - }; + return take(input, { + salutation: [], + }); }; /** * serializeAws_restJson1BooleanList */ const se_BooleanList = (input: boolean[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** * serializeAws_restJson1FooEnumList */ const se_FooEnumList = (input: (FooEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** @@ -7486,31 +7456,23 @@ const se_FooEnumMap = (input: Record, context: __Serde * serializeAws_restJson1FooEnumSet */ const se_FooEnumSet = (input: (FooEnum | string)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** * serializeAws_restJson1GreetingStruct */ const se_GreetingStruct = (input: GreetingStruct, context: __SerdeContext): any => { - return { - ...(input.hi != null && { hi: input.hi }), - }; + return take(input, { + hi: [], + }); }; /** * serializeAws_restJson1IntegerEnumList */ const se_IntegerEnumList = (input: (IntegerEnum | number)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** @@ -7530,22 +7492,14 @@ const se_IntegerEnumMap = (input: Record, context: * serializeAws_restJson1IntegerEnumSet */ const se_IntegerEnumSet = (input: (IntegerEnum | number)[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** * serializeAws_restJson1IntegerList */ const se_IntegerList = (input: number[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** @@ -7563,12 +7517,7 @@ const se_NestedStringList = (input: string[][], context: __SerdeContext): any => * serializeAws_restJson1SparseStringList */ const se_SparseStringList = (input: string[], context: __SerdeContext): any => { - return input.map((entry) => { - if (entry === null) { - return null as any; - } - return entry; - }); + return input; }; /** @@ -7589,11 +7538,7 @@ const se_SparseStringMap = (input: Record, context: __SerdeConte * serializeAws_restJson1StringList */ const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** @@ -7613,11 +7558,7 @@ const se_StringMap = (input: Record, context: __SerdeContext): a * serializeAws_restJson1StringSet */ const se_StringSet = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return entry; - }); + return input.filter((e: any) => e != null); }; /** @@ -7635,7 +7576,7 @@ const se_TimestampList = (input: Date[], context: __SerdeContext): any => { * serializeAws_restJson1Unit */ const se_Unit = (input: Unit, context: __SerdeContext): any => { - return {}; + return take(input, {}); }; /** @@ -7763,19 +7704,19 @@ const de_MyUnion = (output: any, context: __SerdeContext): MyUnion => { * deserializeAws_restJson1NestedPayload */ const de_NestedPayload = (output: any, context: __SerdeContext): NestedPayload => { - return { - greeting: __expectString(output.greeting), - name: __expectString(output.name), - } as any; + return take(output, { + greeting: __expectString, + name: __expectString, + }) as any; }; /** * deserializeAws_restJson1PayloadConfig */ const de_PayloadConfig = (output: any, context: __SerdeContext): PayloadConfig => { - return { - data: __expectInt32(output.data), - } as any; + return take(output, { + data: __expectInt32, + }) as any; }; /** @@ -7797,10 +7738,10 @@ const de_RecursiveShapesInputOutputNested1 = ( output: any, context: __SerdeContext ): RecursiveShapesInputOutputNested1 => { - return { - foo: __expectString(output.foo), - nested: output.nested != null ? de_RecursiveShapesInputOutputNested2(output.nested, context) : undefined, - } as any; + return take(output, { + foo: __expectString, + nested: (_: any) => de_RecursiveShapesInputOutputNested2(_, context), + }) as any; }; /** @@ -7810,13 +7751,10 @@ const de_RecursiveShapesInputOutputNested2 = ( output: any, context: __SerdeContext ): RecursiveShapesInputOutputNested2 => { - return { - bar: __expectString(output.bar), - recursiveMember: - output.recursiveMember != null - ? de_RecursiveShapesInputOutputNested1(output.recursiveMember, context) - : undefined, - } as any; + return take(output, { + bar: __expectString, + recursiveMember: (_: any) => de_RecursiveShapesInputOutputNested1(_, context), + }) as any; }; /** @@ -7935,19 +7873,19 @@ const de_StructureList = (output: any, context: __SerdeContext): StructureListMe * deserializeAws_restJson1StructureListMember */ const de_StructureListMember = (output: any, context: __SerdeContext): StructureListMember => { - return { - a: __expectString(output.value), - b: __expectString(output.other), - } as any; + return take(output, { + a: [, __expectString, `value`], + b: [, __expectString, `other`], + }) as any; }; /** * deserializeAws_restJson1TestConfig */ const de_TestConfig = (output: any, context: __SerdeContext): TestConfig => { - return { - timeout: __expectInt32(output.timeout), - } as any; + return take(output, { + timeout: __expectInt32, + }) as any; }; /** @@ -7970,9 +7908,9 @@ const de_UnionWithJsonName = (output: any, context: __SerdeContext): UnionWithJs * deserializeAws_restJson1RenamedGreeting */ const de_RenamedGreeting = (output: any, context: __SerdeContext): RenamedGreeting => { - return { - salutation: __expectString(output.salutation), - } as any; + return take(output, { + salutation: __expectString, + }) as any; }; /** @@ -8037,9 +7975,9 @@ const de_FooEnumSet = (output: any, context: __SerdeContext): (FooEnum | string) * deserializeAws_restJson1GreetingStruct */ const de_GreetingStruct = (output: any, context: __SerdeContext): GreetingStruct => { - return { - hi: __expectString(output.hi), - } as any; + return take(output, { + hi: __expectString, + }) as any; }; /** @@ -8202,7 +8140,7 @@ const de_TimestampList = (output: any, context: __SerdeContext): Date[] => { * deserializeAws_restJson1Unit */ const de_Unit = (output: any, context: __SerdeContext): Unit => { - return {} as any; + return take(output, {}) as any; }; const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ diff --git a/private/aws-restjson-validation-server/src/protocols/Aws_restJson1.ts b/private/aws-restjson-validation-server/src/protocols/Aws_restJson1.ts index e7da5234ce53..a756766f5619 100644 --- a/private/aws-restjson-validation-server/src/protocols/Aws_restJson1.ts +++ b/private/aws-restjson-validation-server/src/protocols/Aws_restJson1.ts @@ -1,6 +1,7 @@ // smithy-typescript generated code import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; import { + _json, expectBoolean as __expectBoolean, expectByte as __expectByte, expectInt32 as __expectInt32, @@ -12,10 +13,11 @@ import { expectString as __expectString, expectUnion as __expectUnion, limitedParseFloat32 as __limitedParseFloat32, - map as __map, + map, parseEpochTimestamp as __parseEpochTimestamp, parseRfc3339DateTime as __parseRfc3339DateTime, parseRfc7231DateTime as __parseRfc7231DateTime, + take, } from "@aws-sdk/smithy-client"; import { Endpoint as __Endpoint, @@ -103,21 +105,14 @@ export const deserializeMalformedEnumRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.list != null) { - contents.list = de_EnumList(data.list, context); - } - if (data.map != null) { - contents.map = de_EnumMap(data.map, context); - } - if (data.string != null) { - contents.string = __expectString(data.string); - } - if (data.stringWithEnumTrait != null) { - contents.stringWithEnumTrait = __expectString(data.stringWithEnumTrait); - } - if (data.union != null) { - contents.union = de_EnumUnion(__expectUnion(data.union), context); - } + const doc = take(data, { + list: (_) => de_EnumList(_, context), + map: (_) => de_EnumMap(_, context), + string: __expectString, + stringWithEnumTrait: __expectString, + union: (_) => de_EnumUnion(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -143,24 +138,15 @@ export const deserializeMalformedLengthRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.blob != null) { - contents.blob = context.base64Decoder(data.blob); - } - if (data.list != null) { - contents.list = de_LengthList(data.list, context); - } - if (data.map != null) { - contents.map = de_LengthMap(data.map, context); - } - if (data.maxString != null) { - contents.maxString = __expectString(data.maxString); - } - if (data.minString != null) { - contents.minString = __expectString(data.minString); - } - if (data.string != null) { - contents.string = __expectString(data.string); - } + const doc = take(data, { + blob: context.base64Decoder, + list: (_) => de_LengthList(_, context), + map: (_) => de_LengthMap(_, context), + maxString: __expectString, + minString: __expectString, + string: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -186,24 +172,15 @@ export const deserializeMalformedLengthOverrideRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.blob != null) { - contents.blob = context.base64Decoder(data.blob); - } - if (data.list != null) { - contents.list = de_LengthList(data.list, context); - } - if (data.map != null) { - contents.map = de_LengthMap(data.map, context); - } - if (data.maxString != null) { - contents.maxString = __expectString(data.maxString); - } - if (data.minString != null) { - contents.minString = __expectString(data.minString); - } - if (data.string != null) { - contents.string = __expectString(data.string); - } + const doc = take(data, { + blob: context.base64Decoder, + list: (_) => de_LengthList(_, context), + map: (_) => de_LengthMap(_, context), + maxString: __expectString, + minString: __expectString, + string: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -270,21 +247,14 @@ export const deserializeMalformedPatternRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.evilString != null) { - contents.evilString = __expectString(data.evilString); - } - if (data.list != null) { - contents.list = de_PatternList(data.list, context); - } - if (data.map != null) { - contents.map = de_PatternMap(data.map, context); - } - if (data.string != null) { - contents.string = __expectString(data.string); - } - if (data.union != null) { - contents.union = de_PatternUnion(__expectUnion(data.union), context); - } + const doc = take(data, { + evilString: __expectString, + list: (_) => de_PatternList(_, context), + map: (_) => de_PatternMap(_, context), + string: __expectString, + union: (_) => de_PatternUnion(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -310,18 +280,13 @@ export const deserializeMalformedPatternOverrideRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.list != null) { - contents.list = de_PatternListOverride(data.list, context); - } - if (data.map != null) { - contents.map = de_PatternMapOverride(data.map, context); - } - if (data.string != null) { - contents.string = __expectString(data.string); - } - if (data.union != null) { - contents.union = de_PatternUnionOverride(__expectUnion(data.union), context); - } + const doc = take(data, { + list: (_) => de_PatternListOverride(_, context), + map: (_) => de_PatternMapOverride(_, context), + string: __expectString, + union: (_) => de_PatternUnionOverride(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -347,51 +312,24 @@ export const deserializeMalformedRangeRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.byte != null) { - contents.byte = __expectByte(data.byte); - } - if (data.float != null) { - contents.float = __limitedParseFloat32(data.float); - } - if (data.integer != null) { - contents.integer = __expectInt32(data.integer); - } - if (data.long != null) { - contents.long = __expectLong(data.long); - } - if (data.maxByte != null) { - contents.maxByte = __expectByte(data.maxByte); - } - if (data.maxFloat != null) { - contents.maxFloat = __limitedParseFloat32(data.maxFloat); - } - if (data.maxInteger != null) { - contents.maxInteger = __expectInt32(data.maxInteger); - } - if (data.maxLong != null) { - contents.maxLong = __expectLong(data.maxLong); - } - if (data.maxShort != null) { - contents.maxShort = __expectShort(data.maxShort); - } - if (data.minByte != null) { - contents.minByte = __expectByte(data.minByte); - } - if (data.minFloat != null) { - contents.minFloat = __limitedParseFloat32(data.minFloat); - } - if (data.minInteger != null) { - contents.minInteger = __expectInt32(data.minInteger); - } - if (data.minLong != null) { - contents.minLong = __expectLong(data.minLong); - } - if (data.minShort != null) { - contents.minShort = __expectShort(data.minShort); - } - if (data.short != null) { - contents.short = __expectShort(data.short); - } + const doc = take(data, { + byte: __expectByte, + float: __limitedParseFloat32, + integer: __expectInt32, + long: __expectLong, + maxByte: __expectByte, + maxFloat: __limitedParseFloat32, + maxInteger: __expectInt32, + maxLong: __expectLong, + maxShort: __expectShort, + minByte: __expectByte, + minFloat: __limitedParseFloat32, + minInteger: __expectInt32, + minLong: __expectLong, + minShort: __expectShort, + short: __expectShort, + }); + Object.assign(contents, doc); return contents; }; @@ -417,51 +355,24 @@ export const deserializeMalformedRangeOverrideRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.byte != null) { - contents.byte = __expectByte(data.byte); - } - if (data.float != null) { - contents.float = __limitedParseFloat32(data.float); - } - if (data.integer != null) { - contents.integer = __expectInt32(data.integer); - } - if (data.long != null) { - contents.long = __expectLong(data.long); - } - if (data.maxByte != null) { - contents.maxByte = __expectByte(data.maxByte); - } - if (data.maxFloat != null) { - contents.maxFloat = __limitedParseFloat32(data.maxFloat); - } - if (data.maxInteger != null) { - contents.maxInteger = __expectInt32(data.maxInteger); - } - if (data.maxLong != null) { - contents.maxLong = __expectLong(data.maxLong); - } - if (data.maxShort != null) { - contents.maxShort = __expectShort(data.maxShort); - } - if (data.minByte != null) { - contents.minByte = __expectByte(data.minByte); - } - if (data.minFloat != null) { - contents.minFloat = __limitedParseFloat32(data.minFloat); - } - if (data.minInteger != null) { - contents.minInteger = __expectInt32(data.minInteger); - } - if (data.minLong != null) { - contents.minLong = __expectLong(data.minLong); - } - if (data.minShort != null) { - contents.minShort = __expectShort(data.minShort); - } - if (data.short != null) { - contents.short = __expectShort(data.short); - } + const doc = take(data, { + byte: __expectByte, + float: __limitedParseFloat32, + integer: __expectInt32, + long: __expectLong, + maxByte: __expectByte, + maxFloat: __limitedParseFloat32, + maxInteger: __expectInt32, + maxLong: __expectLong, + maxShort: __expectShort, + minByte: __expectByte, + minFloat: __limitedParseFloat32, + minInteger: __expectInt32, + minLong: __expectLong, + minShort: __expectShort, + short: __expectShort, + }); + Object.assign(contents, doc); return contents; }; @@ -505,9 +416,10 @@ export const deserializeMalformedRequiredRequest = async ( } } const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.string != null) { - contents.string = __expectString(data.string); - } + const doc = take(data, { + string: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -533,51 +445,24 @@ export const deserializeMalformedUniqueItemsRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.blobList != null) { - contents.blobList = de_BlobSet(data.blobList, context); - } - if (data.booleanList != null) { - contents.booleanList = de_BooleanSet(data.booleanList, context); - } - if (data.byteList != null) { - contents.byteList = de_ByteSet(data.byteList, context); - } - if (data.dateTimeList != null) { - contents.dateTimeList = de_DateTimeSet(data.dateTimeList, context); - } - if (data.enumList != null) { - contents.enumList = de_FooEnumSet(data.enumList, context); - } - if (data.httpDateList != null) { - contents.httpDateList = de_HttpDateSet(data.httpDateList, context); - } - if (data.intEnumList != null) { - contents.intEnumList = de_IntegerEnumSet(data.intEnumList, context); - } - if (data.integerList != null) { - contents.integerList = de_IntegerSet(data.integerList, context); - } - if (data.listList != null) { - contents.listList = de_ListSet(data.listList, context); - } - if (data.longList != null) { - contents.longList = de_LongSet(data.longList, context); - } - if (data.shortList != null) { - contents.shortList = de_ShortSet(data.shortList, context); - } - if (data.stringList != null) { - contents.stringList = de_StringSet(data.stringList, context); - } - if (data.structureList != null) { - contents.structureList = de_StructureSet(data.structureList, context); - } - if (data.timestampList != null) { - contents.timestampList = de_TimestampSet(data.timestampList, context); - } - if (data.unionList != null) { - contents.unionList = de_UnionSet(data.unionList, context); - } + const doc = take(data, { + blobList: (_) => de_BlobSet(_, context), + booleanList: (_) => de_BooleanSet(_, context), + byteList: (_) => de_ByteSet(_, context), + dateTimeList: (_) => de_DateTimeSet(_, context), + enumList: (_) => de_FooEnumSet(_, context), + httpDateList: (_) => de_HttpDateSet(_, context), + intEnumList: (_) => de_IntegerEnumSet(_, context), + integerList: (_) => de_IntegerSet(_, context), + listList: (_) => de_ListSet(_, context), + longList: (_) => de_LongSet(_, context), + shortList: (_) => de_ShortSet(_, context), + stringList: (_) => de_StringSet(_, context), + structureList: (_) => de_StructureSet(_, context), + timestampList: (_) => de_TimestampSet(_, context), + unionList: (_) => de_UnionSet(_, context), + }); + Object.assign(contents, doc); return contents; }; @@ -603,9 +488,10 @@ export const deserializeRecursiveStructuresRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.union != null) { - contents.union = de_RecursiveUnionOne(__expectUnion(data.union), context); - } + const doc = take(data, { + union: (_) => de_RecursiveUnionOne(__expectUnion(_), context), + }); + Object.assign(contents, doc); return contents; }; @@ -631,9 +517,10 @@ export const deserializeSensitiveValidationRequest = async ( } const contents: any = map({}); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); - if (data.string != null) { - contents.string = __expectString(data.string); - } + const doc = take(data, { + string: __expectString, + }); + Object.assign(contents, doc); return contents; }; @@ -1132,7 +1019,6 @@ export const serializeFrameworkException = async ( } }; -const map = __map; export const serializeValidationExceptionError = async ( input: ValidationException, ctx: ServerSerdeContext @@ -1152,10 +1038,12 @@ export const serializeValidationExceptionError = async ( "content-type": "application/json", }); let body: any; - body = JSON.stringify({ - ...(input.fieldList != null && { fieldList: se_ValidationExceptionFieldList(input.fieldList, context) }), - ...(input.message != null && { message: input.message }), - }); + body = JSON.stringify( + take(input, { + fieldList: (_) => se_ValidationExceptionFieldList(_, context), + message: [], + }) + ); return new __HttpResponse({ headers, body, @@ -1167,10 +1055,10 @@ export const serializeValidationExceptionError = async ( * serializeAws_restJson1ValidationExceptionField */ const se_ValidationExceptionField = (input: ValidationExceptionField, context: __SerdeContext): any => { - return { - ...(input.message != null && { message: input.message }), - ...(input.path != null && { path: input.path }), - }; + return take(input, { + message: [], + path: [], + }); }; /** @@ -1456,9 +1344,9 @@ const de_FooUnion = (output: any, context: __SerdeContext): FooUnion => { * deserializeAws_restJson1GreetingStruct */ const de_GreetingStruct = (output: any, context: __SerdeContext): GreetingStruct => { - return { - hi: __expectString(output.hi), - } as any; + return take(output, { + hi: __expectString, + }) as any; }; /** diff --git a/scripts/byte-count/get-cjs-byte-count.js b/scripts/byte-count/get-cjs-byte-count.js new file mode 100644 index 000000000000..4ed5eeedb533 --- /dev/null +++ b/scripts/byte-count/get-cjs-byte-count.js @@ -0,0 +1,56 @@ +#!/usr/bin/env node + +const { join } = require("path"); +const { readdirSync, statSync, rmSync } = require("fs"); +const { removeSync } = require("fs-extra"); +const { spawnProcess } = require("../utils/spawn-process"); +const walk = require("../utils/walk"); +const assert = require("assert"); + +/** + * + * Counts packed byte size for clients with only dist-cjs included. + * + */ + +const locations = {}; + +locations.root = join(__dirname, "..", ".."); +locations.clients = join(locations.root, "clients"); + +(async () => { + const packs = []; + + for await (const clientFolderName of readdirSync(locations.clients)) { + const clientLocation = join(locations.clients, clientFolderName); + removeSync(join(clientLocation, "dist-types")); + removeSync(join(clientLocation, "dist-es")); + + packs.push( + spawnProcess("npm", ["pack"], { + cwd: clientLocation, + }) + ); + } + + await Promise.all(packs); + + let bytes = 0; + const packFiles = []; + + for await (file of walk(locations.clients)) { + if (file.includes("aws-sdk-client-") && file.endsWith(".tgz")) { + bytes += statSync(file).size; + packFiles.push(file); + } + } + + assert(6_000_000 < bytes, "byte count expected to be more than 6 million"); + assert(bytes < 20_000_000, "byte count expected to be less than 20 million"); + + console.log("all clients dist-cjs total bytes:", bytes); + + for (const packFile of packFiles) { + rmSync(packFile); + } +})(); diff --git a/turbo.json b/turbo.json index 2a9bd031cbb8..bc40343f1a0f 100644 --- a/turbo.json +++ b/turbo.json @@ -8,7 +8,7 @@ }, "build:cjs": { "outputs": ["dist-cjs/**"], - "dependsOn": ["build:types", "^build:types"] + "dependsOn": ["^build:types"] }, "build:docs": { "outputs": ["dist-cjs/**"], @@ -30,7 +30,9 @@ "outputs": ["dist-types/ts3.4/**"], "dependsOn": ["^build:types:downlevel"] }, - "clean": {}, + "clean": { + "cache": false + }, "generate:client": { "outputs": ["src/**", "package.json", "README.md"], "inputs": []